[
][
C:
/
Program Files
/
Microsoft VS Code
/
resources
/
app
/
out
/
vs
/
workbench
/]
Upload
Terminal
File Manager
Server Info
Current File :
C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js
/*!-------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/(function(){var ne=["exports","require","vs/base/common/lifecycle","vs/nls","vs/nls!vs/workbench/workbench.desktop.main","vs/platform/instantiation/common/instantiation","vs/base/common/event","vs/platform/contextkey/common/contextkey","vs/platform/configuration/common/configuration","vs/base/common/uri","vs/base/browser/dom","vs/base/common/async","vs/platform/theme/common/themeService","vs/base/common/types","vs/base/common/platform","vs/base/common/arrays","vs/platform/actions/common/actions","vs/platform/registry/common/platform","vs/base/common/network","vs/base/common/resources","vs/editor/common/core/range","vs/workbench/services/editor/common/editorService","vs/base/common/errors","vs/platform/files/common/files","vs/platform/storage/common/storage","vs/css!vs/workbench/workbench.desktop.main","vs/platform/notification/common/notification","vs/platform/telemetry/common/telemetry","vs/platform/commands/common/commands","vs/base/common/strings","vs/base/common/cancellation","vs/platform/log/common/log","vs/platform/theme/common/colorRegistry","vs/base/common/codicons","vs/platform/workspace/common/workspace","vs/platform/instantiation/common/extensions","vs/base/common/actions","vs/platform/contextview/browser/contextView","vs/platform/keybinding/common/keybinding","vs/editor/browser/editorExtensions","vs/workbench/services/extensions/common/extensions","vs/platform/opener/common/opener","vs/editor/common/languages/language","vs/workbench/common/views","vs/workbench/common/editor","vs/platform/label/common/label","vs/platform/product/common/productService","vs/workbench/common/contributions","vs/base/common/path","vs/editor/common/core/position","vs/workbench/services/environment/common/environmentService","vs/base/common/objects","vs/editor/common/services/model","vs/platform/quickinput/common/quickInput","vs/platform/dialogs/common/dialogs","vs/base/common/map","vs/platform/uriIdentity/common/uriIdentity","vs/platform/configuration/common/configurationRegistry","vs/editor/common/editorContextKeys","vs/workbench/services/editor/common/editorGroupsService","vs/base/common/buffer","vs/editor/common/services/resolverService","vs/editor/common/services/languageFeatures","vs/platform/theme/common/iconRegistry","vs/workbench/contrib/notebook/common/notebookCommon","vs/workbench/api/common/extHost.protocol","vs/base/common/color","vs/platform/progress/common/progress","vs/platform/theme/common/styler","vs/workbench/services/host/browser/host","vs/workbench/common/actions","vs/platform/list/browser/listService","vs/editor/browser/services/codeEditorService","vs/platform/actions/browser/menuEntryActionViewItem","vs/workbench/common/contextkeys","vs/workbench/services/extensions/common/extHostCustomers","vs/workbench/services/lifecycle/common/lifecycle","vs/base/browser/browser","vs/base/browser/ui/actionbar/actionbar","vs/platform/extensionManagement/common/extensionManagement","vs/workbench/services/layout/browser/layoutService","vs/base/common/severity","vs/workbench/common/theme","vs/workbench/services/textfile/common/textfiles","vs/editor/common/core/selection","vs/platform/environment/common/environment","vs/editor/common/languages","vs/platform/native/electron-sandbox/native","vs/workbench/services/panecomposite/browser/panecomposite","vs/base/common/uuid","vs/workbench/contrib/debug/common/debug","vs/base/browser/keyboardEvent","vs/base/common/iterator","vs/editor/common/model/textModel","vs/platform/keybinding/common/keybindingsRegistry","vs/platform/clipboard/common/clipboardService","vs/platform/userDataSync/common/userDataSync","vs/base/common/keyCodes","vs/platform/accessibility/common/accessibility","vs/platform/instantiation/common/descriptors","vs/platform/extensionManagement/common/extensionManagementUtil","vs/workbench/services/path/common/pathService","vs/base/common/filters","vs/platform/ipc/electron-sandbox/services","vs/workbench/contrib/notebook/browser/notebookBrowser","vs/workbench/contrib/terminal/browser/terminal","vs/editor/browser/editorBrowser","vs/platform/extensions/common/extensions","vs/workbench/services/preferences/common/preferences","vs/workbench/services/remote/common/remoteAgentService","vs/base/common/decorators","vs/base/common/labels","vs/base/browser/ui/aria/aria","vs/editor/common/services/textResourceConfiguration","vs/platform/workspace/common/workspaceTrust","vs/workbench/services/extensionManagement/common/extensionManagement","vs/base/common/hash","vs/base/common/htmlContent","vs/base/common/json","vs/workbench/contrib/extensions/common/extensions","vs/workbench/contrib/terminal/common/terminal","vs/workbench/services/environment/electron-sandbox/environmentService","vs/editor/common/model","vs/editor/common/config/editorOptions","vs/editor/common/languages/languageConfigurationRegistry","vs/platform/markers/common/markers","vs/editor/common/languages/modesRegistry","vs/platform/theme/common/theme","vs/base/browser/fastDomNode","vs/base/browser/touch","vs/base/common/errorMessage","vs/workbench/browser/parts/views/viewPane","vs/platform/editor/common/editor","vs/workbench/services/extensions/common/extensionsRegistry","vs/base/browser/ui/actionbar/actionViewItems","vs/workbench/services/workingCopy/common/workingCopyService","vs/editor/common/core/editOperation","vs/base/browser/mouseEvent","vs/base/browser/ui/widget","vs/base/browser/ui/scrollbar/scrollableElement","vs/editor/browser/services/bulkEditService","vs/platform/contextkey/common/contextkeys","vs/workbench/contrib/notebook/common/notebookService","vs/base/common/collections","vs/platform/remote/common/remoteAuthorityResolver","vs/workbench/services/statusbar/browser/statusbar","vs/platform/jsonschemas/common/jsonContributionRegistry","vs/platform/undoRedo/common/undoRedo","vs/workbench/contrib/files/common/files","vs/workbench/browser/editor","vs/base/common/functional","vs/base/common/stopwatch","vs/base/common/glob","vs/workbench/contrib/notebook/common/notebookContextKeys","vs/workbench/services/filesConfiguration/common/filesConfigurationService","vs/platform/instantiation/common/serviceCollection","vs/workbench/browser/dnd","vs/base/common/extpath","vs/workbench/contrib/notebook/common/notebookExecutionStateService","vs/workbench/services/editor/common/editorResolverService","vs/workbench/services/workingCopy/common/workingCopyBackup","vs/workbench/browser/parts/views/viewPaneContainer","vs/base/browser/ui/button/button","vs/base/browser/ui/toolbar/toolbar","vs/editor/common/core/editorColorRegistry","vs/editor/browser/widget/codeEditorWidget","vs/workbench/browser/parts/editor/editorPane","vs/workbench/common/editor/sideBySideEditorInput","vs/workbench/contrib/notebook/browser/controller/coreActions","vs/base/common/mime","vs/base/browser/dnd","vs/base/parts/ipc/common/ipc","vs/editor/contrib/peekView/browser/peekView","vs/editor/contrib/snippet/browser/snippetController2","vs/workbench/common/editor/editorInput","vs/workbench/contrib/notebook/browser/view/cellPart","vs/workbench/contrib/terminal/common/terminalContextKey","vs/workbench/services/history/common/history","vs/workbench/browser/labels","vs/workbench/contrib/debug/common/debugModel","vs/base/common/marshalling","vs/base/browser/ui/iconLabel/iconLabels","vs/editor/browser/view/viewPart","vs/base/browser/ui/inputbox/inputBox","vs/editor/common/services/editorWorker","vs/platform/layout/browser/layoutService","vs/editor/contrib/markdownRenderer/browser/markdownRenderer","vs/platform/request/common/request","vs/platform/terminal/common/terminal","vs/platform/workspaces/common/workspaces","vs/workbench/contrib/debug/browser/debugIcons","vs/workbench/services/configuration/common/configuration","vs/workbench/services/search/common/search","vs/workbench/services/themes/common/workbenchThemeService","vs/base/common/linkedList","vs/base/common/numbers","vs/base/common/process","vs/base/common/date","vs/editor/common/services/getIconClasses","vs/platform/telemetry/common/telemetryUtils","vs/workbench/contrib/notebook/browser/notebookIcons","vs/workbench/contrib/output/common/output","vs/workbench/contrib/webview/browser/webview","vs/workbench/common/editor/diffEditorInput","vs/workbench/browser/parts/editor/editorCommands","vs/workbench/services/extensions/common/extensionManifestPropertiesService","vs/base/common/stream","vs/base/parts/sandbox/electron-sandbox/globals","vs/base/browser/ui/list/listWidget","vs/base/browser/ui/splitview/splitview","vs/platform/quickinput/common/quickAccess","vs/editor/contrib/suggest/browser/suggest","vs/platform/tunnel/common/tunnel","vs/platform/window/common/window","vs/workbench/common/memento","vs/workbench/contrib/scm/common/scm","vs/workbench/contrib/testing/common/testResultService","vs/workbench/services/activity/common/activity","vs/workbench/services/configurationResolver/common/configurationResolver","vs/workbench/services/hover/browser/hover","vs/workbench/contrib/files/browser/files","vs/workbench/services/workingCopy/common/workingCopyFileService","vs/base/common/keybindings","vs/base/browser/canIUse","vs/base/browser/event","vs/base/common/iconLabels","vs/editor/common/cursorCommon","vs/editor/browser/config/domFontInfo","vs/editor/common/services/languageFeatureDebounce","vs/editor/browser/widget/embeddedCodeEditorWidget","vs/platform/workspace/common/virtualWorkspace","vs/workbench/contrib/debug/common/debugUtils","vs/workbench/contrib/notebook/common/notebookEditorInput","vs/workbench/services/environment/browser/environmentService","vs/base/browser/ui/iconLabel/iconLabel","vs/base/common/performance","vs/platform/history/browser/contextScopedHistoryWidget","vs/platform/opener/browser/link","vs/workbench/contrib/notebook/common/notebookKernelService","vs/workbench/contrib/terminal/common/terminalStrings","vs/workbench/services/workingCopy/common/workingCopyEditorService","vs/base/browser/ui/highlightedlabel/highlightedLabel","vs/base/browser/markdownRenderer","vs/editor/common/core/cursorColumns","vs/base/browser/ui/toggle/toggle","vs/platform/quickinput/browser/pickerQuickAccess","vs/platform/remote/common/remoteHosts","vs/editor/contrib/suggest/browser/suggestController","vs/workbench/common/configuration","vs/workbench/contrib/comments/browser/commentService","vs/workbench/contrib/testing/common/testService","vs/workbench/contrib/testing/common/testProfileService","vs/workbench/services/decorations/common/decorations","vs/workbench/services/editor/common/editorGroupColumn","vs/workbench/services/extensionRecommendations/common/extensionRecommendations","vs/workbench/services/output/common/output","vs/workbench/common/editor/textResourceEditorInput","vs/workbench/services/userDataSync/common/userDataSync","vs/base/browser/ui/countBadge/countBadge","vs/editor/common/viewModel","vs/editor/contrib/codeAction/browser/types","vs/editor/contrib/snippet/browser/snippetParser","vs/base/browser/ui/dropdown/dropdownActionViewItem","vs/editor/common/config/fontInfo","vs/platform/update/common/update","vs/workbench/common/editor/editorModel","vs/workbench/contrib/extensions/browser/extensionRecommendations","vs/workbench/contrib/notebook/browser/notebookEditorExtensions","vs/workbench/contrib/notebook/common/notebookRange","vs/workbench/contrib/tasks/common/taskService","vs/workbench/contrib/testing/common/testingContextKeys","vs/workbench/services/authentication/common/authentication","vs/workbench/services/configuration/common/jsonEditing","vs/workbench/contrib/tasks/common/tasks","vs/workbench/services/remote/common/remoteExplorerService","vs/workbench/contrib/debug/browser/debugCommands","vs/workbench/services/workspaces/common/workspaceEditing","vs/base/browser/ui/tree/tree","vs/base/common/lazy","vs/base/common/comparers","vs/base/browser/ui/progressbar/progressbar","vs/base/browser/ui/sash/sash","vs/editor/common/core/stringBuilder","vs/editor/common/core/wordHelper","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length","vs/editor/common/tokens/lineTokens","vs/editor/contrib/hover/browser/hoverTypes","vs/editor/contrib/editorState/browser/editorState","vs/editor/contrib/find/browser/findModel","vs/workbench/contrib/files/browser/fileConstants","vs/workbench/contrib/notebook/browser/notebookEditorService","vs/workbench/contrib/snippets/browser/snippets.contribution","vs/workbench/contrib/terminal/browser/terminalIcon","vs/workbench/contrib/testing/browser/icons","vs/workbench/contrib/webviewPanel/browser/webviewEditorInput","vs/workbench/services/assignment/common/assignmentService","vs/workbench/services/extensionResourceLoader/common/extensionResourceLoader","vs/workbench/contrib/tasks/common/problemMatcher","vs/workbench/browser/codeeditor","vs/workbench/browser/actions/windowActions","vs/workbench/contrib/extensions/browser/extensionsActions","vs/base/common/jsonFormatter","vs/base/common/jsonEdit","vs/base/common/linkedText","vs/base/browser/ui/mouseCursor/mouseCursor","vs/base/browser/ui/list/listView","vs/editor/common/editorCommon","vs/editor/common/textModelEvents","vs/editor/common/languages/textToHtmlTokenizer","vs/base/common/keybindingLabels","vs/platform/product/common/product","vs/platform/extensionManagement/common/extensionStorage","vs/editor/browser/coreCommands","vs/editor/contrib/contextmenu/browser/contextmenu","vs/editor/contrib/codeAction/browser/codeAction","vs/editor/contrib/find/browser/findState","vs/workbench/browser/parts/editor/editor","vs/workbench/browser/quickaccess","vs/workbench/contrib/codeEditor/browser/menuPreventer","vs/workbench/contrib/extensions/browser/extensionsIcons","vs/workbench/contrib/markers/browser/constants","vs/workbench/contrib/preferences/browser/preferencesIcons","vs/workbench/contrib/preferences/common/preferences","vs/workbench/contrib/search/common/constants","vs/workbench/contrib/searchEditor/browser/constants","vs/workbench/contrib/terminal/common/environmentVariable","vs/workbench/contrib/terminal/common/terminalColorRegistry","vs/workbench/contrib/testing/common/configuration","vs/workbench/contrib/testing/common/storedValue","vs/workbench/contrib/testing/common/testCollection","vs/workbench/contrib/testing/common/testingStates","vs/workbench/services/extensions/common/proxyIdentifier","vs/workbench/services/languageDetection/common/languageDetectionWorkerService","vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService","vs/workbench/services/search/common/queryBuilder","vs/workbench/contrib/search/common/searchModel","vs/workbench/services/workingCopy/common/workingCopy","vs/workbench/contrib/search/browser/searchActions","vs/base/common/idGenerator","vs/editor/common/core/characterClassifier","vs/editor/common/core/eolCounter","vs/editor/common/commands/replaceCommand","vs/editor/common/languages/languageConfiguration","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet","vs/editor/common/model/prefixSumComputer","vs/editor/common/model/textModelSearch","vs/editor/browser/view/dynamicViewOverlay","vs/platform/externalServices/common/serviceMachineId","vs/platform/history/browser/historyWidgetKeybindingHint","vs/platform/credentials/common/credentials","vs/editor/common/services/languagesAssociations","vs/editor/browser/widget/diffEditorWidget","vs/platform/userDataSync/common/abstractSynchronizer","vs/workbench/browser/part","vs/workbench/contrib/codeEditor/browser/selectionClipboard","vs/workbench/contrib/files/common/explorerModel","vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser","vs/workbench/contrib/notebook/common/notebookCellStatusBarService","vs/workbench/contrib/bulkEdit/browser/bulkCellEdits","vs/workbench/api/browser/mainThreadNotebookDto","vs/workbench/contrib/search/browser/searchIcons","vs/workbench/contrib/terminal/browser/links/terminalLinkHelpers","vs/workbench/contrib/testing/common/observableValue","vs/workbench/contrib/testing/common/testId","vs/workbench/contrib/customEditor/common/customEditor","vs/workbench/contrib/search/common/search","vs/workbench/contrib/tasks/common/taskDefinitionRegistry","vs/workbench/services/files/common/elevatedFileService","vs/workbench/services/language/common/languageService","vs/workbench/common/editor/textEditorModel","vs/workbench/services/outline/browser/outline","vs/workbench/contrib/debug/browser/baseDebugView","vs/workbench/services/untitled/common/untitledTextEditorInput","vs/workbench/services/workingCopy/common/workingCopyHistory","vs/workbench/services/untitled/common/untitledTextEditorService","vs/workbench/services/textfile/common/textEditorService","vs/workbench/browser/actions/workspaceCommands","vs/workbench/browser/actions/workspaceActions","vs/base/common/marked/marked","vs/base/common/history","vs/base/common/diff/diff","vs/base/browser/globalPointerMoveMonitor","vs/base/common/fuzzyScorer","vs/css!vs/workbench/contrib/scm/browser/media/scm","vs/editor/browser/view/renderingContext","vs/editor/common/core/wordCharacterClassifier","vs/editor/common/languages/supports","vs/editor/common/languages/supports/tokenization","vs/editor/common/viewEventHandler","vs/base/browser/ui/selectBox/selectBox","vs/base/browser/ui/tree/abstractTree","vs/base/common/jsonErrorMessages","vs/base/browser/ui/keybindingLabel/keybindingLabel","vs/editor/browser/config/fontMeasurements","vs/editor/common/model/editStack","vs/editor/contrib/gotoSymbol/browser/referencesModel","vs/platform/files/browser/webFileSystemAccess","vs/platform/debug/common/extensionHostDebug","vs/platform/download/common/download","vs/platform/extensionRecommendations/common/extensionRecommendations","vs/editor/contrib/documentSymbols/browser/outlineModel","vs/base/common/semver/semver","vs/editor/browser/editorDom","vs/editor/contrib/format/browser/format","vs/platform/theme/common/tokenClassificationRegistry","vs/editor/contrib/find/browser/findController","vs/editor/contrib/hover/browser/hover","vs/platform/url/common/url","vs/platform/userDataSync/common/ignoredExtensions","vs/workbench/common/editor/editorOptions","vs/workbench/common/notifications","vs/workbench/contrib/audioCues/browser/audioCueService","vs/workbench/contrib/debug/common/disassemblyViewInput","vs/workbench/contrib/logs/common/logConstants","vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView","vs/workbench/contrib/notebook/common/notebookEditorModelResolverService","vs/workbench/contrib/notebook/common/notebookExecutionService","vs/workbench/contrib/search/common/replace","vs/workbench/contrib/terminal/browser/terminalUri","vs/workbench/contrib/testing/common/testResult","vs/workbench/contrib/timeline/common/timeline","vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig","vs/workbench/api/browser/mainThreadWebviews","vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel","vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel","vs/workbench/contrib/terminal/browser/terminalEditorInput","vs/workbench/services/preferences/common/preferencesModels","vs/workbench/services/authentication/browser/authenticationService","vs/workbench/contrib/debug/browser/linkDetector","vs/workbench/services/textMate/browser/textMate","vs/workbench/services/textfile/common/encoding","vs/workbench/contrib/debug/common/replModel","vs/workbench/contrib/files/browser/editors/fileEditorInput","vs/workbench/contrib/snippets/browser/tabCompletion","vs/workbench/contrib/codeEditor/browser/simpleEditorOptions","vs/workbench/services/timer/browser/timerService","vs/workbench/browser/parts/editor/textEditor","vs/workbench/contrib/customEditor/browser/customEditorInput","vs/workbench/browser/parts/compositeBarActions","vs/workbench/browser/panecomposite","vs/workbench/contrib/terminal/browser/terminalActions","vs/base/browser/ui/list/list","vs/base/common/keybindingParser","vs/base/common/range","vs/base/common/scrollable","vs/base/common/uint","vs/base/browser/formattedTextRenderer","vs/base/browser/ui/tree/objectTreeModel","vs/base/common/worker/simpleWorker","vs/base/parts/ipc/common/ipc.net","vs/css!vs/base/parts/quickinput/browser/media/quickInput","vs/css!vs/workbench/contrib/searchEditor/browser/media/searchEditor","vs/editor/browser/config/tabFocus","vs/editor/browser/stableEditorScroll","vs/editor/common/config/editorZoom","vs/editor/common/core/textModelDefaults","vs/editor/common/cursor/cursorWordOperations","vs/editor/common/languageFeatureRegistry","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/ast","vs/editor/common/viewLayout/lineDecorations","vs/editor/common/viewLayout/viewLineRenderer","vs/editor/contrib/folding/browser/foldingRanges","vs/editor/contrib/inlineCompletions/browser/ghostText","vs/base/browser/ui/tree/asyncDataTree","vs/editor/common/services/markerDecorations","vs/platform/keybinding/common/resolvedKeybindingItem","vs/platform/log/common/logIpc","vs/platform/profiling/common/profiling","vs/platform/configuration/common/configurationModels","vs/platform/sign/common/sign","vs/editor/contrib/clipboard/browser/clipboard","vs/editor/contrib/message/browser/messageController","vs/editor/contrib/codeAction/browser/codeActionCommands","vs/platform/actions/browser/dropdownWithPrimaryActionViewItem","vs/platform/severityIcon/common/severityIcon","vs/platform/terminal/common/terminalProfiles","vs/editor/contrib/find/browser/findWidget","vs/editor/contrib/zoneWidget/browser/zoneWidget","vs/platform/userDataSync/common/content","vs/platform/userDataSync/common/userDataSyncAccount","vs/platform/userDataSync/common/userDataSyncStoreService","vs/workbench/browser/parts/editor/breadcrumbs","vs/workbench/browser/parts/notifications/notificationsCommands","vs/workbench/browser/style","vs/workbench/contrib/debug/browser/debugColors","vs/workbench/contrib/extensions/common/runtimeExtensionsInput","vs/workbench/contrib/externalUriOpener/common/configuration","vs/workbench/contrib/markers/browser/messages","vs/workbench/contrib/notebook/browser/notebookViewEvents","vs/workbench/contrib/notebook/common/model/notebookCellTextModel","vs/workbench/contrib/notebook/common/notebookOptions","vs/workbench/contrib/notebook/browser/controller/cellOperations","vs/workbench/contrib/notebook/browser/diff/diffElementViewModel","vs/workbench/contrib/preferences/common/settingsEditorColorRegistry","vs/workbench/contrib/tags/common/workspaceTags","vs/workbench/contrib/testing/browser/explorerProjections/index","vs/workbench/contrib/testing/common/testExplorerFilterState","vs/workbench/contrib/testing/common/testingPeekOpener","vs/workbench/contrib/debug/common/debugSource","vs/workbench/services/environment/electron-sandbox/shellEnvironmentService","vs/workbench/services/extensions/common/extensionDescriptionRegistry","vs/workbench/services/extensions/common/extensionDevOptions","vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService","vs/workbench/contrib/debug/browser/breakpointsView","vs/workbench/contrib/experiments/common/experimentService","vs/workbench/contrib/searchEditor/browser/searchEditorSerialization","vs/workbench/contrib/notebook/browser/notebookEditorWidget","vs/workbench/services/title/common/titleService","vs/workbench/services/views/browser/treeViewsService","vs/workbench/api/browser/mainThreadEditors","vs/workbench/browser/actions/layoutActions","vs/workbench/contrib/files/browser/fileActions","vs/workbench/contrib/files/browser/explorerViewlet","vs/workbench/contrib/remote/browser/remoteExplorer","vs/workbench/services/workspaces/common/workspaceTrust","vs/base/common/assert","vs/base/common/console","vs/base/browser/ui/iconLabel/simpleIconLabel","vs/base/browser/ui/tree/indexTreeModel","vs/base/browser/ui/scrollbar/scrollbarArrow","vs/base/browser/ui/codicons/codiconStyles","vs/base/browser/ui/hover/hoverWidget","vs/editor/common/core/indentation","vs/editor/browser/controller/textAreaInput","vs/editor/browser/view/viewLayer","vs/editor/common/cursor/cursorMoveOperations","vs/editor/common/cursor/cursorDeleteOperations","vs/editor/common/cursor/cursorMoveCommands","vs/editor/common/languages/supports/richEditBrackets","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer","vs/editor/common/model/utils","vs/editor/common/textModelGuides","vs/editor/common/languages/nullTokenize","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/tokenizer","vs/editor/browser/viewParts/glyphMargin/glyphMargin","vs/editor/common/viewEvents","vs/editor/common/viewModelEventDispatcher","vs/editor/contrib/folding/browser/syntaxRangeProvider","vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture","vs/editor/contrib/inlayHints/browser/inlayHints","vs/editor/contrib/inlineCompletions/browser/consts","vs/editor/contrib/inlineCompletions/browser/utils","vs/editor/contrib/inlineCompletions/browser/inlineCompletionToGhostText","vs/base/browser/ui/iconLabel/iconLabelHover","vs/base/browser/ui/tree/objectTree","vs/base/browser/ui/menu/menu","vs/editor/common/commands/shiftCommand","vs/editor/common/cursor/cursorTypeOperations","vs/editor/contrib/parameterHints/browser/provideSignatureHelp","vs/platform/diagnostics/common/diagnostics","vs/platform/keybinding/common/baseResolvedKeybinding","vs/platform/keyboardLayout/common/keyboardLayout","vs/editor/browser/services/editorWorkerService","vs/editor/common/config/editorConfigurationSchema","vs/platform/remote/common/remoteAgentConnection","vs/platform/terminal/common/capabilities/terminalCapabilityStore","vs/platform/terminal/electron-sandbox/terminal","vs/editor/contrib/hover/browser/markdownHoverParticipant","vs/editor/common/services/modelService","vs/editor/contrib/colorPicker/browser/colorDetector","vs/editor/contrib/gotoError/browser/gotoError","vs/editor/contrib/gotoSymbol/browser/peek/referencesController","vs/editor/contrib/gotoSymbol/browser/goToCommands","vs/editor/contrib/inlayHints/browser/inlayHintsController","vs/editor/contrib/inlineCompletions/browser/ghostTextController","vs/workbench/browser/actions","vs/workbench/common/editor/binaryEditorModel","vs/workbench/common/component","vs/workbench/browser/parts/editor/binaryEditor","vs/workbench/browser/parts/notifications/notificationsActions","vs/workbench/common/webview","vs/workbench/contrib/audioCues/browser/observable","vs/workbench/contrib/callHierarchy/common/callHierarchy","vs/workbench/contrib/comments/common/commentContextKeys","vs/workbench/contrib/comments/common/commentModel","vs/workbench/contrib/comments/browser/commentsTreeViewer","vs/workbench/contrib/debug/browser/callStackEditorContribution","vs/workbench/contrib/extensions/common/extensionQuery","vs/workbench/contrib/extensions/common/extensionsInput","vs/workbench/contrib/interactive/browser/interactiveDocumentService","vs/workbench/contrib/localHistory/browser/localHistory","vs/workbench/contrib/markdown/browser/markdownDocumentRenderer","vs/workbench/contrib/markers/browser/markersModel","vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPreview","vs/workbench/contrib/notebook/common/notebookPerformance","vs/workbench/contrib/notebook/common/notebookRendererMessagingService","vs/workbench/contrib/remote/browser/remoteIcons","vs/workbench/contrib/scm/browser/util","vs/workbench/contrib/search/common/searchHistoryService","vs/workbench/contrib/snippets/browser/snippetsFile","vs/workbench/contrib/terminal/browser/terminalIcons","vs/workbench/contrib/terminal/browser/terminalStatusList","vs/workbench/contrib/terminal/common/environmentVariableShared","vs/workbench/contrib/testing/browser/theme","vs/workbench/contrib/testing/common/constants","vs/workbench/contrib/testing/browser/explorerProjections/testItemContextOverlay","vs/workbench/contrib/testing/browser/testingOutputTerminalService","vs/workbench/contrib/testing/common/testingUri","vs/workbench/contrib/typeHierarchy/common/typeHierarchy","vs/workbench/contrib/webviewView/browser/webviewViewService","vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput","vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughInput","vs/workbench/services/banner/browser/bannerService","vs/workbench/services/editor/browser/editorDropService","vs/workbench/browser/parts/editor/editorQuickAccess","vs/workbench/browser/parts/editor/sideBySideEditor","vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions","vs/workbench/contrib/terminal/browser/terminalMenus","vs/workbench/services/editor/common/editorGroupFinder","vs/workbench/services/extensions/common/extensionHostProtocol","vs/workbench/services/files/common/files","vs/workbench/services/integrity/common/integrity","vs/workbench/services/issue/common/issue","vs/workbench/contrib/webviewPanel/browser/webviewEditor","vs/workbench/contrib/codeEditor/browser/toggleWordWrap","vs/workbench/contrib/extensions/electron-sandbox/runtimeExtensionsEditor","vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess","vs/workbench/services/preferences/browser/keybindingsEditorInput","vs/workbench/browser/parts/titlebar/menubarControl","vs/workbench/contrib/preferences/browser/preferencesWidgets","vs/workbench/contrib/preferences/browser/settingsTreeModels","vs/workbench/contrib/quickaccess/browser/commandsQuickAccess","vs/workbench/services/preferences/common/preferencesEditorInput","vs/workbench/services/progress/browser/progressIndicator","vs/workbench/services/extensions/common/workspaceContains","vs/workbench/contrib/debug/browser/debugActionViewItems","vs/workbench/contrib/debug/browser/variablesView","vs/workbench/contrib/scm/browser/dirtydiffDecorator","vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput","vs/workbench/contrib/comments/browser/simpleCommentEditor","vs/workbench/contrib/comments/browser/commentReply","vs/workbench/contrib/url/browser/trustedDomains","vs/workbench/services/themes/common/colorThemeSchema","vs/workbench/services/themes/common/productIconThemeSchema","vs/workbench/services/userData/browser/userDataInit","vs/workbench/browser/parts/editor/editorActions","vs/workbench/browser/parts/editor/textResourceEditor","vs/workbench/contrib/localHistory/browser/localHistoryCommands","vs/workbench/contrib/searchEditor/browser/searchEditorInput","vs/workbench/contrib/search/browser/searchWidget","vs/workbench/api/browser/mainThreadDocuments","vs/workbench/browser/parts/views/treeView","vs/workbench/browser/parts/panel/panelPart","vs/workbench/contrib/extensions/browser/extensionsList","vs/base/browser/ui/scrollbar/scrollbarState","vs/base/common/parsers","vs/base/common/ports","vs/base/common/processes","vs/base/common/cache","vs/base/browser/hash","vs/base/common/search","vs/base/common/paging","vs/base/browser/dompurify/dompurify","vs/base/browser/ui/scrollbar/abstractScrollbar","vs/base/common/uriIpc","vs/base/browser/defaultWorkerFactory","net","vs/base/parts/ipc/common/ipc.mp","vs/base/parts/quickinput/common/quickInput","vs/base/parts/request/common/request","vs/base/parts/ipc/electron-sandbox/ipc.mp","vs/base/parts/storage/common/storage","vs/css!vs/base/browser/ui/actionbar/actionbar","vs/base/browser/ui/contextview/contextview","vs/css!vs/base/browser/ui/dropdown/dropdown","vs/css!vs/base/browser/ui/findinput/findInput","vs/css!vs/base/browser/ui/grid/gridview","vs/css!vs/base/browser/ui/list/list","vs/base/browser/ui/list/listPaging","vs/base/browser/ui/grid/gridview","vs/base/browser/ui/grid/grid","vs/base/browser/ui/table/tableWidget","vs/base/parts/quickinput/browser/quickInputUtils","vs/css!vs/workbench/browser/parts/editor/media/breadcrumbscontrol","vs/css!vs/workbench/browser/parts/notifications/media/notificationsActions","vs/css!vs/workbench/browser/parts/panel/media/panelpart","vs/css!vs/workbench/browser/parts/sidebar/media/sidebarpart","vs/css!vs/workbench/browser/parts/views/media/paneviewlet","vs/css!vs/workbench/contrib/comments/browser/media/review","vs/css!vs/workbench/contrib/welcomeGettingStarted/browser/media/gettingStarted","vs/editor/browser/config/elementSizeObserver","vs/editor/browser/view/viewUserInputEvents","vs/editor/browser/viewParts/minimap/minimapCharSheet","vs/editor/browser/controller/textAreaState","vs/editor/browser/widget/diffNavigator","vs/editor/common/commands/trimTrailingWhitespaceCommand","vs/editor/common/core/rgba","vs/editor/common/core/textChange","vs/editor/common/cursor/cursorAtomicMoveOperations","vs/editor/common/languages/linkComputer","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/beforeEditPositionMapper","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/parser","vs/editor/common/model/intervalTree","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder","vs/editor/common/modelLineProjectionData","vs/editor/common/services/semanticTokensDto","vs/editor/common/services/unicodeTextModelHighlighter","vs/editor/common/standalone/standaloneEnums","vs/editor/common/model/guidesTextModelPart","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/brackets","vs/editor/common/tokens/contiguousTokensEditing","vs/editor/common/tokens/contiguousMultilineTokensBuilder","vs/editor/browser/viewParts/margin/margin","vs/editor/common/viewModel/minimapTokensColorTracker","vs/editor/common/viewModel/overviewZoneManager","vs/editor/contrib/comment/browser/blockCommentCommand","vs/editor/contrib/find/browser/replacePattern","vs/editor/contrib/format/browser/formattingEdit","vs/editor/contrib/hover/browser/hoverOperation","vs/editor/contrib/indentation/browser/indentUtils","vs/editor/contrib/smartSelect/browser/bracketSelections","vs/editor/contrib/suggest/browser/completionModel","vs/editor/contrib/suggest/browser/resizable","vs/editor/contrib/suggest/browser/wordDistance","vs/base/browser/ui/splitview/paneview","vs/base/browser/ui/tree/dataTree","vs/base/browser/ui/dialog/dialog","vs/base/browser/ui/findinput/findInputToggles","vs/base/browser/ui/findinput/findInput","vs/editor/common/viewModel/viewModelDecorations","vs/platform/extensionManagement/common/configRemotes","vs/platform/extensionManagement/common/extensionNls","vs/platform/extensions/common/extensionValidator","vs/platform/checksum/common/checksumService","vs/editor/common/services/getSemanticTokens","vs/editor/contrib/codelens/browser/codelens","vs/editor/contrib/colorPicker/browser/color","vs/editor/common/cursor/cursor","vs/platform/extensionManagement/common/extensionManagementIpc","vs/platform/extensionManagement/common/extensionUrlTrust","vs/platform/extensions/common/extensionHostStarter","vs/platform/externalTerminal/common/externalTerminal","vs/platform/files/common/diskFileSystemProviderClient","vs/platform/files/common/watcher","vs/platform/issue/electron-sandbox/issue","vs/platform/localizations/common/localizations","vs/editor/browser/services/webWorker","vs/editor/contrib/gotoError/browser/markerNavigationService","vs/platform/menubar/electron-sandbox/menubar","vs/editor/contrib/suggest/browser/suggestWidgetDetails","vs/platform/remote/common/sharedProcessTunnelService","vs/platform/extensionManagement/common/extensionEnablementService","vs/platform/quickinput/browser/commandsQuickAccess","vs/editor/browser/viewParts/lines/viewLine","vs/editor/browser/controller/mouseTarget","vs/editor/browser/services/abstractCodeEditorService","vs/editor/browser/viewParts/lineNumbers/lineNumbers","vs/editor/common/services/semanticTokensProviderStyling","vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess","vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess","vs/editor/contrib/symbolIcons/browser/symbolIcons","vs/editor/contrib/gotoSymbol/browser/goToSymbol","vs/editor/contrib/hover/browser/getHover","vs/editor/contrib/indentation/browser/indentation","vs/editor/contrib/linesOperations/browser/linesOperations","vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode","vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators","vs/editor/contrib/wordOperations/browser/wordOperations","vs/platform/terminal/common/terminalPlatformConfiguration","vs/editor/contrib/find/browser/findDecorations","vs/editor/contrib/folding/browser/folding","vs/editor/contrib/links/browser/links","vs/editor/contrib/multicursor/browser/multicursor","vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition","vs/platform/userDataSync/common/extensionsSync","vs/platform/userDataSync/common/globalStateSync","vs/platform/userDataSync/common/settingsMerge","vs/platform/userDataSync/common/userDataSyncIpc","vs/platform/userDataSync/common/userDataSyncMachines","vs/platform/window/electron-sandbox/window","vs/editor/contrib/snippet/browser/snippetVariables","vs/editor/contrib/snippet/browser/snippetSession","vs/editor/contrib/inlineCompletions/browser/inlineCompletionsModel","vs/workbench/api/common/shared/dataTransfer","vs/workbench/browser/parts/notifications/notificationsTelemetry","vs/workbench/browser/webview","vs/workbench/common/activity","vs/workbench/common/editor/diffEditorModel","vs/workbench/common/editor/resourceEditorInput","vs/workbench/common/editor/textDiffEditorModel","vs/workbench/browser/composite","vs/workbench/common/resources","vs/workbench/browser/parts/notifications/notificationsList","vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget","vs/workbench/contrib/comments/browser/commentColors","vs/workbench/contrib/comments/browser/commentFormActions","vs/workbench/contrib/comments/browser/commentGlyphWidget","vs/workbench/contrib/comments/common/commentsConfiguration","vs/workbench/contrib/comments/browser/timestamp","vs/workbench/contrib/extensions/common/extensionsFileTemplate","vs/workbench/contrib/codeEditor/browser/accessibility/accessibility","vs/workbench/contrib/interactive/browser/interactiveCommon","vs/workbench/contrib/interactive/browser/interactiveHistoryService","vs/workbench/contrib/localHistory/browser/localHistoryFileSystemProvider","vs/workbench/contrib/markers/browser/markersFilterOptions","vs/workbench/contrib/markers/browser/markersViewActions","vs/workbench/contrib/notebook/browser/diff/eventDispatcher","vs/workbench/contrib/notebook/browser/view/cellParts/stickyScroll","vs/workbench/contrib/notebook/common/model/notebookCellOutputTextModel","vs/workbench/contrib/notebook/browser/viewModel/cellOutputViewModel","vs/workbench/contrib/notebook/browser/viewParts/notebookKernelActionViewItem","vs/workbench/contrib/notebook/common/notebookKeymapService","vs/workbench/contrib/notebook/common/notebookProvider","vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver","vs/workbench/contrib/interactive/browser/interactiveEditorInput","vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd","vs/workbench/contrib/notebook/common/services/notebookWorkerService","vs/workbench/contrib/preferences/browser/settingsLayout","vs/workbench/contrib/scm/browser/scmRepositoryRenderer","vs/workbench/contrib/search/browser/patternInputWidget","vs/workbench/contrib/snippets/browser/snippetCompletionProvider","vs/workbench/contrib/snippets/browser/snippetPicker","vs/workbench/contrib/splash/browser/splash","vs/workbench/contrib/tasks/common/taskSystem","vs/workbench/contrib/terminal/browser/baseTerminalBackend","vs/workbench/contrib/terminal/browser/links/terminalLocalLinkDetector","vs/workbench/contrib/terminal/browser/terminalContextMenu","vs/workbench/contrib/terminal/browser/terminalProcessExtHostProxy","vs/workbench/contrib/terminal/browser/terminalTooltip","vs/workbench/contrib/terminal/common/history","vs/workbench/contrib/terminal/browser/terminalFindWidget","vs/workbench/contrib/terminal/common/terminalEnvironment","vs/workbench/contrib/testing/browser/explorerProjections/display","vs/workbench/contrib/testing/browser/explorerProjections/hierarchalNodes","vs/workbench/contrib/testing/common/testingDecorations","vs/workbench/contrib/testing/common/getComputedState","vs/workbench/contrib/testing/common/testResultStorage","vs/workbench/contrib/testing/browser/explorerProjections/hierarchalByLocation","vs/workbench/contrib/testing/common/testingAutoRun","vs/workbench/contrib/update/common/update","vs/workbench/contrib/url/common/urlGlob","vs/workbench/contrib/webview/browser/webviewWindowDragMonitor","vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedIcons","vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent","vs/workbench/contrib/welcomeViews/common/viewsWelcomeExtensionPoint","vs/workbench/contrib/welcomeWalkthrough/common/walkThroughContentProvider","vs/workbench/contrib/workspace/common/workspace","vs/workbench/services/configuration/common/configurationModels","vs/workbench/services/configurationResolver/common/configurationResolverSchema","vs/workbench/services/configurationResolver/common/configurationResolverUtils","vs/workbench/services/configurationResolver/common/variableResolver","vs/workbench/browser/parts/editor/editorWithViewState","vs/workbench/browser/parts/editor/binaryDiffEditor","vs/workbench/common/editor/editorGroupModel","vs/workbench/contrib/debug/common/debugContentProvider","vs/workbench/contrib/notebook/browser/contrib/navigation/arrow","vs/workbench/contrib/notebook/browser/controller/foldingController","vs/workbench/contrib/notebook/browser/notebookEditor","vs/workbench/contrib/search/browser/symbolsQuickAccess","vs/workbench/contrib/terminal/browser/terminalEditor","vs/workbench/contrib/terminal/browser/terminalQuickAccess","vs/workbench/services/encryption/common/encryptionService","vs/workbench/contrib/output/common/outputChannelModelService","vs/workbench/contrib/webview/browser/webviewElement","vs/workbench/contrib/extensions/electron-sandbox/extensionsSlowActions","vs/workbench/services/extensions/common/extensionPoints","vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughPart","vs/workbench/services/extensions/common/extensionsApiProposals","vs/workbench/contrib/debug/common/debugSchemas","vs/workbench/contrib/tasks/common/jsonSchemaCommon","vs/workbench/contrib/tasks/common/problemCollectors","vs/workbench/contrib/tasks/browser/runAutomaticTasks","vs/workbench/contrib/tasks/browser/taskQuickPick","vs/workbench/contrib/tasks/browser/terminalTaskSystem","vs/workbench/contrib/terminal/common/terminalExtensionPoints","vs/workbench/services/actions/common/menusExtensionPoint","vs/workbench/services/extensions/common/extensionsUtil","vs/workbench/api/browser/mainThreadEditor","vs/workbench/services/extensions/common/remoteConsoleUtil","vs/workbench/services/extensions/electron-sandbox/extensionHostProfiler","vs/workbench/contrib/externalTerminal/electron-sandbox/externalTerminal.contribution","vs/workbench/services/issue/electron-sandbox/issueService","vs/workbench/services/keybinding/browser/unboundCommands","vs/workbench/services/keybinding/common/windowsKeyboardMapper","vs/workbench/common/editor/textResourceEditorModel","vs/workbench/contrib/notebook/browser/controller/editActions","vs/workbench/contrib/notebook/browser/notebookDiffEditorInput","vs/workbench/services/languageStatus/common/languageStatusService","vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor","vs/workbench/contrib/extensions/common/extensionsUtils","vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel","vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys","vs/workbench/contrib/notebook/browser/view/notebookCellList","vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView","vs/workbench/contrib/webviewPanel/browser/webviewEditorInputSerializer","vs/workbench/services/extensions/browser/extensionUrlHandler","vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions","vs/workbench/contrib/testing/browser/testingProgressUiService","vs/workbench/services/preferences/browser/keybindingsEditorModel","vs/workbench/contrib/preferences/browser/keybindingWidgets","vs/workbench/services/preferences/common/preferencesValidation","vs/workbench/contrib/preferences/browser/settingsTree","vs/workbench/browser/parts/compositePart","vs/workbench/services/dialogs/browser/simpleFileDialog","vs/workbench/services/search/common/searchExtTypes","vs/workbench/contrib/search/browser/searchMessage","vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService","vs/workbench/services/search/common/searchHelpers","vs/workbench/services/textMate/common/TMGrammars","vs/workbench/services/textMate/common/TMHelper","vs/workbench/browser/parts/editor/breadcrumbsControl","vs/workbench/contrib/debug/browser/debugEditorContribution","vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler","vs/workbench/contrib/format/browser/formatModified","vs/workbench/contrib/snippets/browser/snippetsService","vs/workbench/contrib/comments/browser/commentThreadWidget","vs/workbench/contrib/comments/browser/commentsEditorContribution","vs/workbench/contrib/debug/browser/breakpointEditorContribution","vs/workbench/contrib/debug/browser/repl","vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController","vs/workbench/contrib/notebook/browser/diff/notebookTextDiffEditor","vs/workbench/contrib/tags/electron-sandbox/workspaceTags","vs/workbench/contrib/tasks/browser/abstractTaskService","vs/workbench/services/configuration/common/jsonEditingService","vs/workbench/services/keybinding/common/keybindingEditing","vs/workbench/services/themes/common/hostColorSchemeService","vs/workbench/services/themes/browser/fileIconThemeData","vs/workbench/services/themes/common/themeConfiguration","vs/workbench/services/themes/browser/productIconThemeData","vs/workbench/contrib/performance/browser/perfviewEditor","vs/workbench/services/timer/electron-sandbox/timerService","vs/workbench/browser/parts/editor/editorStatus","vs/workbench/services/workingCopy/common/resourceWorkingCopy","vs/workbench/contrib/welcomeGettingStarted/browser/startupPage","vs/workbench/services/workingCopy/common/abstractFileWorkingCopyManager","vs/workbench/services/workingCopy/common/workingCopyBackupService","vs/workbench/browser/parts/editor/textDiffEditor","vs/workbench/contrib/output/browser/outputView","vs/workbench/contrib/searchEditor/browser/searchEditorActions","vs/workbench/services/textfile/common/textFileEditorModel","vs/workbench/services/untitled/common/untitledTextEditorModel","vs/workbench/services/workingCopy/common/untitledFileWorkingCopy","vs/workbench/services/workingCopy/common/storedFileWorkingCopy","vs/workbench/browser/parts/compositeBar","vs/workbench/browser/parts/editor/titleControl","vs/workbench/browser/parts/panel/panelActions","vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart","vs/workbench/browser/parts/sidebar/sidebarPart","vs/workbench/browser/parts/views/viewsViewlet","vs/workbench/browser/parts/views/viewsService","vs/workbench/contrib/debug/browser/welcomeView","vs/workbench/contrib/debug/browser/debugViewlet","vs/workbench/contrib/files/browser/fileImportExport","vs/workbench/contrib/files/browser/fileActions.contribution","vs/workbench/contrib/files/browser/views/explorerViewer","vs/workbench/contrib/search/browser/searchView","vs/workbench/contrib/terminal/browser/terminalView","vs/workbench/contrib/extensions/browser/extensionsWidgets","vs/workbench/contrib/extensions/browser/extensionEditor","vs/workbench/contrib/extensions/browser/extensionsViewlet","vs/workbench/contrib/terminal/browser/terminalConfigHelper","vs/base/browser/iframe","vs/base/browser/ui/list/splice","vs/base/common/amd","vs/base/common/diff/diffChange","vs/base/common/navigator","vs/base/browser/ui/list/rangeMap","vs/base/common/skipList","vs/base/common/sequence","vs/base/common/normalization","vs/base/browser/ui/list/rowCache","vs/base/browser/ui/scrollbar/scrollbarVisibilityController","vs/base/browser/ui/selectBox/selectBoxNative","vs/base/browser/ui/tree/compressedObjectTreeModel","vs/base/browser/ui/scrollbar/horizontalScrollbar","vs/base/browser/ui/scrollbar/verticalScrollbar","vs/base/common/resourceTree","vs/base/node/decoder","vs/base/node/pfs","os","vs/base/node/ports","vs/base/parts/contextmenu/common/contextmenu","vs/base/parts/ipc/common/ipc.electron","vs/base/parts/request/browser/request","vs/base/parts/contextmenu/electron-sandbox/contextmenu","vs/base/parts/ipc/electron-sandbox/ipc.electron","vs/css!vs/base/browser/ui/aria/aria","vs/css!vs/base/browser/ui/breadcrumbs/breadcrumbsWidget","vs/css!vs/base/browser/ui/button/button","vs/css!vs/base/browser/ui/codicons/codicon/codicon","vs/css!vs/base/browser/ui/codicons/codicon/codicon-modifiers","vs/css!vs/base/browser/ui/contextview/contextview","vs/css!vs/base/browser/ui/countBadge/countBadge","vs/css!vs/base/browser/ui/dialog/dialog","vs/css!vs/base/browser/ui/hover/hover","vs/css!vs/base/browser/ui/iconLabel/iconlabel","vs/css!vs/base/browser/ui/inputbox/inputBox","vs/css!vs/base/browser/ui/keybindingLabel/keybindingLabel","vs/css!vs/base/browser/ui/menu/menubar","vs/css!vs/base/browser/ui/mouseCursor/mouseCursor","vs/css!vs/base/browser/ui/progressbar/progressbar","vs/css!vs/base/browser/ui/sash/sash","vs/css!vs/base/browser/ui/scrollbar/media/scrollbars","vs/base/browser/ui/breadcrumbs/breadcrumbsWidget","vs/css!vs/base/browser/ui/selectBox/selectBox","vs/css!vs/base/browser/ui/selectBox/selectBoxCustom","vs/css!vs/base/browser/ui/splitview/paneview","vs/css!vs/base/browser/ui/splitview/splitview","vs/base/browser/ui/centered/centeredViewLayout","vs/css!vs/base/browser/ui/table/table","vs/css!vs/base/browser/ui/toggle/toggle","vs/css!vs/base/browser/ui/toolbar/toolbar","vs/css!vs/base/browser/ui/tree/media/tree","vs/css!vs/editor/browser/controller/textAreaHandler","vs/css!vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight","vs/css!vs/editor/browser/viewParts/decorations/decorations","vs/css!vs/editor/browser/viewParts/glyphMargin/glyphMargin","vs/css!vs/editor/browser/viewParts/indentGuides/indentGuides","vs/css!vs/editor/browser/viewParts/lineNumbers/lineNumbers","vs/css!vs/editor/browser/viewParts/lines/viewLines","vs/css!vs/editor/browser/viewParts/linesDecorations/linesDecorations","vs/css!vs/editor/browser/viewParts/marginDecorations/marginDecorations","vs/css!vs/editor/browser/viewParts/minimap/minimap","vs/css!vs/editor/browser/viewParts/overlayWidgets/overlayWidgets","vs/css!vs/editor/browser/viewParts/rulers/rulers","vs/css!vs/editor/browser/viewParts/scrollDecoration/scrollDecoration","vs/css!vs/editor/browser/viewParts/selections/selections","vs/css!vs/editor/browser/viewParts/viewCursors/viewCursors","vs/css!vs/editor/browser/widget/media/diffEditor","vs/css!vs/editor/browser/widget/media/diffReview","vs/css!vs/editor/browser/widget/media/editor","vs/css!vs/editor/contrib/anchorSelect/browser/anchorSelect","vs/css!vs/editor/contrib/bracketMatching/browser/bracketMatching","vs/css!vs/editor/contrib/codeAction/browser/lightBulbWidget","vs/css!vs/editor/contrib/codelens/browser/codelensWidget","vs/css!vs/editor/contrib/colorPicker/browser/colorPicker","vs/css!vs/editor/contrib/dnd/browser/dnd","vs/css!vs/editor/contrib/find/browser/findWidget","vs/css!vs/editor/contrib/folding/browser/folding","vs/css!vs/editor/contrib/gotoError/browser/media/gotoErrorWidget","vs/css!vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition","vs/css!vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget","vs/css!vs/editor/contrib/inlineCompletions/browser/ghostText","vs/css!vs/editor/contrib/links/browser/links","vs/css!vs/editor/contrib/message/browser/messageController","vs/css!vs/editor/contrib/parameterHints/browser/parameterHints","vs/css!vs/editor/contrib/peekView/browser/media/peekViewWidget","vs/css!vs/editor/contrib/rename/browser/renameInputField","vs/css!vs/editor/contrib/snippet/browser/snippetSession","vs/css!vs/editor/contrib/suggest/browser/media/suggest","vs/css!vs/editor/contrib/unicodeHighlighter/browser/bannerController","vs/css!vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter","vs/css!vs/editor/contrib/zoneWidget/browser/zoneWidget","vs/css!vs/platform/actions/browser/menuEntryActionViewItem","vs/css!vs/platform/contextview/browser/contextMenuHandler","vs/css!vs/workbench/browser/actions/media/actions","vs/css!vs/workbench/browser/media/part","vs/css!vs/workbench/browser/media/style","vs/css!vs/workbench/browser/parts/activitybar/media/activityaction","vs/css!vs/workbench/browser/parts/activitybar/media/activitybarpart","vs/css!vs/workbench/browser/parts/auxiliarybar/media/auxiliaryBarPart","vs/css!vs/workbench/browser/parts/banner/media/bannerpart","vs/css!vs/workbench/browser/parts/editor/media/binaryeditor","vs/css!vs/workbench/browser/parts/editor/media/editordroptarget","vs/css!vs/workbench/browser/parts/editor/media/editorgroupview","vs/css!vs/workbench/browser/parts/editor/media/editorplaceholder","vs/css!vs/workbench/browser/parts/editor/media/editorquickaccess","vs/css!vs/workbench/browser/parts/editor/media/editorstatus","vs/css!vs/workbench/browser/parts/editor/media/notabstitlecontrol","vs/css!vs/workbench/browser/parts/editor/media/sidebysideeditor","vs/css!vs/workbench/browser/parts/editor/media/tabstitlecontrol","vs/css!vs/workbench/browser/parts/editor/media/titlecontrol","vs/css!vs/workbench/browser/parts/media/compositepart","vs/css!vs/workbench/browser/parts/notifications/media/notificationsCenter","vs/css!vs/workbench/browser/parts/notifications/media/notificationsList","vs/css!vs/workbench/browser/parts/notifications/media/notificationsToasts","vs/css!vs/workbench/browser/parts/panel/media/basepanelpart","vs/css!vs/workbench/browser/parts/statusbar/media/statusbarpart","vs/css!vs/workbench/browser/parts/titlebar/media/titlebarpart","vs/css!vs/workbench/browser/parts/views/media/views","vs/css!vs/workbench/contrib/bulkEdit/browser/preview/bulkEdit","vs/css!vs/workbench/contrib/callHierarchy/browser/media/callHierarchy","vs/css!vs/workbench/contrib/codeEditor/browser/accessibility/accessibility","vs/css!vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget","vs/css!vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens","vs/css!vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsTree","vs/css!vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput","vs/css!vs/workbench/contrib/comments/browser/media/panel","vs/css!vs/workbench/contrib/debug/browser/media/breakpointWidget","vs/css!vs/workbench/contrib/debug/browser/media/debug.contribution","vs/css!vs/workbench/contrib/debug/browser/media/debugHover","vs/css!vs/workbench/contrib/debug/browser/media/debugToolBar","vs/css!vs/workbench/contrib/debug/browser/media/debugViewlet","vs/css!vs/workbench/contrib/debug/browser/media/exceptionWidget","vs/css!vs/workbench/contrib/debug/browser/media/repl","vs/css!vs/workbench/contrib/extensions/browser/media/extension","vs/css!vs/workbench/contrib/extensions/browser/media/extensionActions","vs/css!vs/workbench/contrib/extensions/browser/media/extensionEditor","vs/css!vs/workbench/contrib/extensions/browser/media/extensionsViewlet","vs/css!vs/workbench/contrib/extensions/browser/media/extensionsWidgets","vs/css!vs/workbench/contrib/extensions/browser/media/runtimeExtensionsEditor","vs/css!vs/workbench/contrib/feedback/browser/media/feedback","vs/css!vs/workbench/contrib/files/browser/media/explorerviewlet","vs/css!vs/workbench/contrib/files/browser/views/media/openeditors","vs/css!vs/workbench/contrib/interactive/browser/media/interactive","vs/css!vs/workbench/contrib/languageStatus/browser/media/languageStatus","vs/css!vs/workbench/contrib/markers/browser/media/markers","vs/css!vs/workbench/contrib/notebook/browser/contrib/find/media/notebookFind","vs/css!vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget","vs/css!vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline","vs/css!vs/workbench/contrib/notebook/browser/diff/notebookDiff","vs/css!vs/workbench/contrib/notebook/browser/media/notebook","vs/css!vs/workbench/contrib/notebook/browser/media/notebookCellInsertToolbar","vs/css!vs/workbench/contrib/notebook/browser/media/notebookCellStatusBar","vs/css!vs/workbench/contrib/notebook/browser/media/notebookCellTitleToolbar","vs/css!vs/workbench/contrib/notebook/browser/media/notebookFocusIndicator","vs/css!vs/workbench/contrib/notebook/browser/media/notebookToolbar","vs/css!vs/workbench/contrib/notebook/browser/viewParts/notebookKernelActionViewItem","vs/css!vs/workbench/contrib/outline/browser/outlinePane","vs/css!vs/workbench/contrib/output/browser/media/output","vs/css!vs/workbench/contrib/preferences/browser/media/keybindings","vs/css!vs/workbench/contrib/preferences/browser/media/keybindingsEditor","vs/css!vs/workbench/contrib/preferences/browser/media/preferences","vs/css!vs/workbench/contrib/preferences/browser/media/settingsEditor2","vs/css!vs/workbench/contrib/preferences/browser/media/settingsWidgets","vs/css!vs/workbench/contrib/remote/browser/media/remoteViewlet","vs/css!vs/workbench/contrib/remote/browser/media/tunnelView","vs/css!vs/workbench/contrib/scm/browser/media/dirtydiffDecorator","vs/css!vs/workbench/contrib/search/browser/media/anythingQuickAccess","vs/css!vs/workbench/contrib/search/browser/media/searchview","vs/css!vs/workbench/contrib/terminal/browser/media/scrollbar","vs/css!vs/workbench/contrib/terminal/browser/media/terminal","vs/css!vs/workbench/contrib/terminal/browser/media/widgets","vs/css!vs/workbench/contrib/terminal/browser/media/xterm","vs/css!vs/workbench/contrib/testing/browser/media/testing","vs/css!vs/workbench/contrib/timeline/browser/media/timelinePane","vs/css!vs/workbench/contrib/typeHierarchy/browser/media/typeHierarchy","vs/css!vs/workbench/contrib/update/browser/media/releasenoteseditor","vs/css!vs/workbench/contrib/userDataSync/browser/media/userDataSyncViews","vs/css!vs/workbench/contrib/watermark/browser/media/watermark","vs/css!vs/workbench/contrib/welcomeOverlay/browser/media/welcomeOverlay","vs/css!vs/workbench/contrib/welcomeWalkthrough/browser/media/walkThroughPart","vs/css!vs/workbench/contrib/workspace/browser/media/workspaceTrustEditor","vs/css!vs/workbench/electron-sandbox/actions/media/actions","vs/css!vs/workbench/services/hover/browser/media/hover","vs/css!vs/workbench/services/progress/browser/media/progressService","vs/editor/browser/config/migrateOptions","vs/editor/browser/viewParts/lines/rangeUtil","vs/editor/browser/viewParts/minimap/minimapCharRenderer","vs/editor/browser/viewParts/minimap/minimapPreBaked","vs/editor/browser/viewParts/minimap/minimapCharRendererFactory","vs/editor/common/commands/surroundSelectionCommand","vs/editor/common/cursor/cursorContext","vs/editor/common/diff/diffComputer","vs/editor/common/editorAction","vs/editor/common/editorTheme","vs/editor/common/languageSelector","vs/editor/common/cursor/cursorColumnSelection","vs/editor/common/cursor/oneCursor","vs/editor/common/cursor/cursorCollection","vs/editor/common/languages/supports/characterPair","vs/editor/common/languages/supports/indentRules","vs/editor/common/languages/supports/inplaceReplaceSupport","vs/editor/common/languages/supports/onEnter","vs/editor/common/languages/supports/electricCharacter","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/nodeReader","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/concat23Trees","vs/editor/common/model/indentationGuesser","vs/editor/common/model/pieceTreeTextBuffer/rbTreeBase","vs/editor/common/model/mirrorTextModel","vs/editor/common/model/textModelPart","vs/editor/common/textModelBracketPairs","vs/editor/common/tokenizationRegistry","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/bracketPairsTree","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsImpl","vs/editor/common/model/bracketPairsTextModelPart/fixBrackets","vs/editor/common/services/editorBaseApi","vs/editor/common/services/editorSimpleWorker","vs/editor/common/tokens/contiguousMultilineTokens","vs/editor/common/model/textModelTokens","vs/editor/common/tokens/contiguousTokensStore","vs/editor/common/tokens/sparseMultilineTokens","vs/editor/common/tokens/sparseTokensStore","vs/editor/browser/viewParts/contentWidgets/contentWidgets","vs/editor/browser/viewParts/decorations/decorations","vs/editor/browser/viewParts/linesDecorations/linesDecorations","vs/editor/browser/viewParts/marginDecorations/marginDecorations","vs/editor/browser/viewParts/overlayWidgets/overlayWidgets","vs/editor/browser/viewParts/viewZones/viewZones","vs/editor/common/viewLayout/linesLayout","vs/editor/common/viewLayout/viewLinesViewportData","vs/editor/common/viewModel/modelLineProjection","vs/editor/common/viewModel/monospaceLineBreaksComputer","vs/editor/browser/viewParts/overviewRuler/overviewRuler","vs/editor/common/viewModel/viewContext","vs/editor/common/viewLayout/viewLayout","vs/editor/contrib/caretOperations/browser/moveCaretCommand","vs/editor/contrib/colorPicker/browser/colorPickerModel","vs/editor/contrib/dnd/browser/dragAndDropCommand","vs/editor/contrib/find/browser/replaceAllCommand","vs/editor/contrib/folding/browser/foldingModel","vs/editor/contrib/folding/browser/hiddenRangeModel","vs/editor/contrib/folding/browser/indentRangeProvider","vs/editor/contrib/folding/browser/intializingRangeProvider","vs/editor/contrib/inPlaceReplace/browser/inPlaceReplaceCommand","vs/editor/contrib/linesOperations/browser/copyLinesCommand","vs/editor/contrib/linesOperations/browser/sortLinesCommand","vs/editor/contrib/smartSelect/browser/wordSelections","vs/editor/contrib/suggest/browser/suggestCommitCharacters","vs/editor/contrib/suggest/browser/suggestOvertypingCapturer","vs/nls!vs/base/browser/ui/actionbar/actionViewItems","vs/nls!vs/base/browser/ui/dialog/dialog","vs/nls!vs/base/browser/ui/findinput/findInput","vs/nls!vs/base/browser/ui/findinput/findInputToggles","vs/nls!vs/base/browser/ui/findinput/replaceInput","vs/nls!vs/base/browser/ui/iconLabel/iconLabelHover","vs/nls!vs/base/browser/ui/inputbox/inputBox","vs/nls!vs/base/browser/ui/keybindingLabel/keybindingLabel","vs/nls!vs/base/browser/ui/menu/menubar","vs/nls!vs/base/browser/ui/selectBox/selectBoxCustom","vs/base/browser/ui/selectBox/selectBoxCustom","vs/nls!vs/base/browser/ui/splitview/paneview","vs/nls!vs/base/browser/ui/toolbar/toolbar","vs/nls!vs/base/browser/ui/tree/abstractTree","vs/nls!vs/base/browser/ui/tree/treeDefaults","vs/nls!vs/base/common/actions","vs/base/browser/ui/dropdown/dropdown","vs/base/browser/ui/menu/menubar","vs/base/browser/ui/findinput/replaceInput","vs/base/browser/ui/tree/treeDefaults","vs/base/parts/quickinput/browser/quickInputBox","vs/nls!vs/base/common/date","vs/nls!vs/base/common/errorMessage","vs/nls!vs/base/common/jsonErrorMessages","vs/nls!vs/base/common/keybindingLabels","vs/nls!vs/base/node/processes","vs/base/node/processes","vs/nls!vs/base/parts/quickinput/browser/quickInput","vs/nls!vs/base/parts/quickinput/browser/quickInputList","vs/base/parts/quickinput/browser/quickInputList","vs/base/parts/quickinput/browser/quickInput","vs/nls!vs/editor/browser/controller/textAreaHandler","vs/nls!vs/editor/browser/coreCommands","vs/nls!vs/editor/browser/editorExtensions","vs/nls!vs/editor/browser/widget/codeEditorWidget","vs/nls!vs/editor/browser/widget/diffEditorWidget","vs/nls!vs/editor/browser/widget/diffReview","vs/nls!vs/editor/browser/widget/inlineDiffMargin","vs/editor/browser/widget/inlineDiffMargin","vs/nls!vs/editor/common/config/editorConfigurationSchema","vs/nls!vs/editor/common/config/editorOptions","vs/editor/browser/config/charWidthReader","vs/editor/browser/view/domLineBreaksComputer","vs/editor/browser/view/viewOverlays","vs/editor/browser/viewParts/viewCursors/viewCursor","vs/nls!vs/editor/common/core/editorColorRegistry","vs/nls!vs/editor/common/editorContextKeys","vs/nls!vs/editor/common/languages/modesRegistry","vs/nls!vs/editor/common/model/editStack","vs/nls!vs/editor/common/standaloneStrings","vs/editor/common/standaloneStrings","vs/nls!vs/editor/contrib/anchorSelect/browser/anchorSelect","vs/nls!vs/editor/contrib/bracketMatching/browser/bracketMatching","vs/nls!vs/editor/contrib/caretOperations/browser/caretOperations","vs/nls!vs/editor/contrib/caretOperations/browser/transpose","vs/nls!vs/editor/contrib/clipboard/browser/clipboard","vs/nls!vs/editor/contrib/codeAction/browser/codeActionCommands","vs/nls!vs/editor/contrib/codeAction/browser/lightBulbWidget","vs/nls!vs/editor/contrib/codelens/browser/codelensController","vs/nls!vs/editor/contrib/colorPicker/browser/colorPickerWidget","vs/nls!vs/editor/contrib/comment/browser/comment","vs/nls!vs/editor/contrib/contextmenu/browser/contextmenu","vs/nls!vs/editor/contrib/cursorUndo/browser/cursorUndo","vs/nls!vs/editor/contrib/editorState/browser/keybindingCancellation","vs/nls!vs/editor/contrib/find/browser/findController","vs/nls!vs/editor/contrib/find/browser/findWidget","vs/nls!vs/editor/contrib/folding/browser/folding","vs/nls!vs/editor/contrib/folding/browser/foldingDecorations","vs/nls!vs/editor/contrib/fontZoom/browser/fontZoom","vs/nls!vs/editor/contrib/format/browser/format","vs/nls!vs/editor/contrib/format/browser/formatActions","vs/nls!vs/editor/contrib/gotoError/browser/gotoError","vs/nls!vs/editor/contrib/gotoError/browser/gotoErrorWidget","vs/nls!vs/editor/contrib/gotoSymbol/browser/goToCommands","vs/nls!vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition","vs/nls!vs/editor/contrib/gotoSymbol/browser/peek/referencesController","vs/nls!vs/editor/contrib/gotoSymbol/browser/peek/referencesTree","vs/nls!vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget","vs/nls!vs/editor/contrib/gotoSymbol/browser/referencesModel","vs/nls!vs/editor/contrib/gotoSymbol/browser/symbolNavigation","vs/nls!vs/editor/contrib/hover/browser/hover","vs/nls!vs/editor/contrib/hover/browser/markdownHoverParticipant","vs/nls!vs/editor/contrib/hover/browser/markerHoverParticipant","vs/nls!vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace","vs/nls!vs/editor/contrib/indentation/browser/indentation","vs/nls!vs/editor/contrib/inlayHints/browser/inlayHintsHover","vs/nls!vs/editor/contrib/inlineCompletions/browser/ghostTextController","vs/nls!vs/editor/contrib/inlineCompletions/browser/ghostTextHoverParticipant","vs/nls!vs/editor/contrib/lineSelection/browser/lineSelection","vs/nls!vs/editor/contrib/linesOperations/browser/linesOperations","vs/nls!vs/editor/contrib/linkedEditing/browser/linkedEditing","vs/nls!vs/editor/contrib/links/browser/links","vs/nls!vs/editor/contrib/message/browser/messageController","vs/nls!vs/editor/contrib/multicursor/browser/multicursor","vs/nls!vs/editor/contrib/parameterHints/browser/parameterHints","vs/nls!vs/editor/contrib/parameterHints/browser/parameterHintsWidget","vs/nls!vs/editor/contrib/peekView/browser/peekView","vs/nls!vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess","vs/nls!vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess","vs/nls!vs/editor/contrib/rename/browser/rename","vs/nls!vs/editor/contrib/rename/browser/renameInputField","vs/nls!vs/editor/contrib/smartSelect/browser/smartSelect","vs/nls!vs/editor/contrib/snippet/browser/snippetController2","vs/nls!vs/editor/contrib/snippet/browser/snippetVariables","vs/nls!vs/editor/contrib/suggest/browser/suggest","vs/nls!vs/editor/contrib/suggest/browser/suggestController","vs/nls!vs/editor/contrib/suggest/browser/suggestWidget","vs/nls!vs/editor/contrib/suggest/browser/suggestWidgetDetails","vs/nls!vs/editor/contrib/suggest/browser/suggestWidgetRenderer","vs/nls!vs/editor/contrib/suggest/browser/suggestWidgetStatus","vs/nls!vs/editor/contrib/symbolIcons/browser/symbolIcons","vs/nls!vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode","vs/nls!vs/editor/contrib/tokenization/browser/tokenization","vs/nls!vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter","vs/nls!vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators","vs/nls!vs/editor/contrib/wordHighlighter/browser/wordHighlighter","vs/nls!vs/editor/contrib/wordOperations/browser/wordOperations","vs/nls!vs/platform/actions/browser/menuEntryActionViewItem","vs/nls!vs/platform/configuration/common/configurationRegistry","vs/nls!vs/platform/contextkey/browser/contextKeyService","vs/nls!vs/platform/contextkey/common/contextkeys","vs/nls!vs/platform/dialogs/common/dialogs","vs/nls!vs/platform/extensionManagement/common/extensionManagement","vs/nls!vs/platform/extensionManagement/common/extensionManagementCLIService","vs/nls!vs/platform/extensions/common/extensionValidator","vs/nls!vs/platform/files/browser/htmlFileSystemProvider","vs/nls!vs/platform/files/common/fileService","vs/nls!vs/platform/files/common/files","vs/nls!vs/platform/files/common/io","vs/nls!vs/platform/history/browser/contextScopedHistoryWidget","vs/nls!vs/platform/keybinding/common/abstractKeybindingService","vs/nls!vs/platform/list/browser/listService","vs/nls!vs/platform/localizations/common/localizedStrings","vs/nls!vs/platform/markers/common/markers","vs/nls!vs/platform/quickinput/browser/commandsQuickAccess","vs/nls!vs/platform/quickinput/browser/helpQuickAccess","vs/nls!vs/platform/request/common/request","vs/nls!vs/platform/telemetry/common/telemetryService","vs/nls!vs/platform/terminal/common/terminalPlatformConfiguration","vs/nls!vs/platform/theme/common/colorRegistry","vs/nls!vs/platform/theme/common/iconRegistry","vs/nls!vs/platform/theme/common/tokenClassificationRegistry","vs/nls!vs/platform/undoRedo/common/undoRedoService","vs/nls!vs/platform/update/common/update.config.contribution","vs/nls!vs/platform/userDataSync/common/abstractSynchronizer","vs/nls!vs/platform/userDataSync/common/keybindingsSync","vs/nls!vs/platform/userDataSync/common/settingsSync","vs/nls!vs/platform/userDataSync/common/userDataSync","vs/nls!vs/platform/userDataSync/common/userDataSyncMachines","vs/nls!vs/platform/workspace/common/workspace","vs/nls!vs/platform/workspace/common/workspaceTrust","vs/nls!vs/workbench/api/browser/mainThreadAuthentication","vs/nls!vs/workbench/api/browser/mainThreadCLICommands","vs/nls!vs/workbench/api/browser/mainThreadComments","vs/nls!vs/workbench/api/browser/mainThreadCustomEditors","vs/nls!vs/workbench/api/browser/mainThreadExtensionService","vs/nls!vs/workbench/api/browser/mainThreadFileSystemEventService","vs/nls!vs/workbench/api/browser/mainThreadMessageService","vs/nls!vs/workbench/api/browser/mainThreadProgress","vs/nls!vs/workbench/api/browser/mainThreadSaveParticipant","vs/nls!vs/workbench/api/browser/mainThreadTask","vs/nls!vs/workbench/api/browser/mainThreadTunnelService","vs/nls!vs/workbench/api/browser/mainThreadUriOpeners","vs/nls!vs/workbench/api/browser/mainThreadWebviews","vs/nls!vs/workbench/api/browser/mainThreadWorkspace","vs/nls!vs/workbench/api/browser/viewsExtensionPoint","vs/nls!vs/workbench/api/common/configurationExtensionPoint","vs/nls!vs/workbench/api/common/jsonValidationExtensionPoint","vs/nls!vs/workbench/browser/actions/developerActions","vs/nls!vs/workbench/browser/actions/helpActions","vs/nls!vs/workbench/browser/actions/layoutActions","vs/nls!vs/workbench/browser/actions/navigationActions","vs/nls!vs/workbench/browser/actions/quickAccessActions","vs/nls!vs/workbench/browser/actions/textInputActions","vs/nls!vs/workbench/browser/actions/windowActions","vs/nls!vs/workbench/browser/actions/workspaceActions","vs/nls!vs/workbench/browser/actions/workspaceCommands","vs/nls!vs/workbench/browser/codeeditor","vs/nls!vs/workbench/browser/dnd","vs/nls!vs/workbench/browser/editor","vs/nls!vs/workbench/browser/parts/activitybar/activitybarActions","vs/nls!vs/workbench/browser/parts/activitybar/activitybarPart","vs/nls!vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions","vs/nls!vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart","vs/nls!vs/workbench/browser/parts/banner/bannerPart","vs/nls!vs/workbench/browser/parts/compositeBar","vs/nls!vs/workbench/browser/parts/compositeBarActions","vs/nls!vs/workbench/browser/parts/compositePart","vs/nls!vs/workbench/browser/parts/dialogs/dialogHandler","vs/nls!vs/workbench/browser/parts/editor/binaryDiffEditor","vs/nls!vs/workbench/browser/parts/editor/binaryEditor","vs/nls!vs/workbench/browser/parts/editor/breadcrumbs","vs/nls!vs/workbench/browser/parts/editor/breadcrumbsControl","vs/nls!vs/workbench/browser/parts/editor/breadcrumbsPicker","vs/nls!vs/workbench/browser/parts/editor/editor.contribution","vs/nls!vs/workbench/browser/parts/editor/editorActions","vs/nls!vs/workbench/browser/parts/editor/editorCommands","vs/nls!vs/workbench/browser/parts/editor/editorConfiguration","vs/nls!vs/workbench/browser/parts/editor/editorGroupView","vs/nls!vs/workbench/browser/parts/editor/editorPlaceholder","vs/nls!vs/workbench/browser/parts/editor/editorQuickAccess","vs/nls!vs/workbench/browser/parts/editor/editorStatus","vs/nls!vs/workbench/browser/parts/editor/sideBySideEditor","vs/nls!vs/workbench/browser/parts/editor/tabsTitleControl","vs/nls!vs/workbench/browser/parts/editor/textDiffEditor","vs/nls!vs/workbench/browser/parts/editor/textEditor","vs/nls!vs/workbench/browser/parts/editor/textResourceEditor","vs/nls!vs/workbench/browser/parts/editor/titleControl","vs/nls!vs/workbench/browser/parts/notifications/notificationsActions","vs/nls!vs/workbench/browser/parts/notifications/notificationsAlerts","vs/nls!vs/workbench/browser/parts/notifications/notificationsCenter","vs/nls!vs/workbench/browser/parts/notifications/notificationsCommands","vs/nls!vs/workbench/browser/parts/notifications/notificationsList","vs/nls!vs/workbench/browser/parts/notifications/notificationsStatus","vs/nls!vs/workbench/browser/parts/notifications/notificationsToasts","vs/nls!vs/workbench/browser/parts/notifications/notificationsViewer","vs/nls!vs/workbench/browser/parts/panel/panelActions","vs/nls!vs/workbench/browser/parts/panel/panelPart","vs/nls!vs/workbench/browser/parts/sidebar/sidebarActions","vs/nls!vs/workbench/browser/parts/statusbar/statusbarActions","vs/nls!vs/workbench/browser/parts/statusbar/statusbarPart","vs/nls!vs/workbench/browser/parts/titlebar/menubarControl","vs/nls!vs/workbench/browser/parts/titlebar/titlebarPart","vs/nls!vs/workbench/browser/parts/views/treeView","vs/nls!vs/workbench/browser/parts/views/viewPane","vs/nls!vs/workbench/browser/parts/views/viewPaneContainer","vs/nls!vs/workbench/browser/parts/views/viewsService","vs/nls!vs/workbench/browser/quickaccess","vs/nls!vs/workbench/browser/workbench","vs/nls!vs/workbench/browser/workbench.contribution","vs/nls!vs/workbench/common/actions","vs/nls!vs/workbench/common/configuration","vs/nls!vs/workbench/common/contextkeys","vs/nls!vs/workbench/common/editor","vs/nls!vs/workbench/common/editor/diffEditorInput","vs/nls!vs/workbench/common/editor/sideBySideEditorInput","vs/nls!vs/workbench/common/editor/textEditorModel","vs/nls!vs/workbench/common/theme","vs/nls!vs/workbench/common/views","vs/nls!vs/workbench/contrib/audioCues/browser/audioCueService","vs/nls!vs/workbench/contrib/audioCues/browser/audioCues.contribution","vs/nls!vs/workbench/contrib/audioCues/browser/commands","vs/nls!vs/workbench/contrib/bulkEdit/browser/bulkEditService","vs/nls!vs/workbench/contrib/bulkEdit/browser/preview/bulkEdit.contribution","vs/nls!vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPane","vs/nls!vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPreview","vs/nls!vs/workbench/contrib/bulkEdit/browser/preview/bulkEditTree","vs/nls!vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution","vs/nls!vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek","vs/nls!vs/workbench/contrib/callHierarchy/browser/callHierarchyTree","vs/nls!vs/workbench/contrib/codeActions/browser/codeActionsContribution","vs/nls!vs/workbench/contrib/codeActions/common/codeActionsExtensionPoint","vs/nls!vs/workbench/contrib/codeActions/common/documentationExtensionPoint","vs/nls!vs/workbench/contrib/codeEditor/browser/accessibility/accessibility","vs/nls!vs/workbench/contrib/codeEditor/browser/diffEditorHelper","vs/nls!vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget","vs/nls!vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens","vs/nls!vs/workbench/contrib/codeEditor/browser/inspectKeybindings","vs/nls!vs/workbench/contrib/codeEditor/browser/languageConfigurationExtensionPoint","vs/nls!vs/workbench/contrib/codeEditor/browser/largeFileOptimizations","vs/nls!vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsOutline","vs/nls!vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsTree","vs/nls!vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess","vs/nls!vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess","vs/nls!vs/workbench/contrib/codeEditor/browser/saveParticipants","vs/nls!vs/workbench/contrib/codeEditor/browser/toggleColumnSelection","vs/nls!vs/workbench/contrib/codeEditor/browser/toggleMinimap","vs/nls!vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier","vs/nls!vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter","vs/nls!vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace","vs/nls!vs/workbench/contrib/codeEditor/browser/toggleWordWrap","vs/nls!vs/workbench/contrib/codeEditor/browser/untitledTextEditorHint","vs/nls!vs/workbench/contrib/codeEditor/electron-sandbox/selectionClipboard","vs/nls!vs/workbench/contrib/codeEditor/electron-sandbox/startDebugTextMate","vs/nls!vs/workbench/contrib/comments/browser/commentColors","vs/nls!vs/workbench/contrib/comments/browser/commentGlyphWidget","vs/nls!vs/workbench/contrib/comments/browser/commentNode","vs/nls!vs/workbench/contrib/comments/browser/commentReply","vs/nls!vs/workbench/contrib/comments/browser/commentThreadBody","vs/nls!vs/workbench/contrib/comments/browser/commentThreadHeader","vs/nls!vs/workbench/contrib/comments/browser/comments.contribution","vs/nls!vs/workbench/contrib/comments/browser/commentsEditorContribution","vs/nls!vs/workbench/contrib/comments/browser/commentsTreeViewer","vs/nls!vs/workbench/contrib/comments/browser/commentsView","vs/nls!vs/workbench/contrib/comments/browser/reactionsAction","vs/nls!vs/workbench/contrib/comments/common/commentModel","vs/nls!vs/workbench/contrib/customEditor/common/contributedCustomEditors","vs/nls!vs/workbench/contrib/customEditor/common/customEditor","vs/nls!vs/workbench/contrib/customEditor/common/extensionPoint","vs/nls!vs/workbench/contrib/debug/browser/breakpointEditorContribution","vs/nls!vs/workbench/contrib/debug/browser/breakpointWidget","vs/nls!vs/workbench/contrib/debug/browser/breakpointsView","vs/nls!vs/workbench/contrib/debug/browser/callStackEditorContribution","vs/nls!vs/workbench/contrib/debug/browser/callStackView","vs/nls!vs/workbench/contrib/debug/browser/debug.contribution","vs/nls!vs/workbench/contrib/debug/browser/debugActionViewItems","vs/nls!vs/workbench/contrib/debug/browser/debugAdapterManager","vs/nls!vs/workbench/contrib/debug/browser/debugColors","vs/nls!vs/workbench/contrib/debug/browser/debugCommands","vs/nls!vs/workbench/contrib/debug/browser/debugConfigurationManager","vs/nls!vs/workbench/contrib/debug/browser/debugEditorActions","vs/nls!vs/workbench/contrib/debug/browser/debugEditorContribution","vs/nls!vs/workbench/contrib/debug/browser/debugHover","vs/nls!vs/workbench/contrib/debug/browser/debugIcons","vs/nls!vs/workbench/contrib/debug/browser/debugQuickAccess","vs/nls!vs/workbench/contrib/debug/browser/debugService","vs/nls!vs/workbench/contrib/debug/browser/debugSession","vs/nls!vs/workbench/contrib/debug/browser/debugStatus","vs/nls!vs/workbench/contrib/debug/browser/debugTaskRunner","vs/nls!vs/workbench/contrib/debug/browser/debugToolBar","vs/nls!vs/workbench/contrib/debug/browser/debugViewlet","vs/nls!vs/workbench/contrib/debug/browser/disassemblyView","vs/nls!vs/workbench/contrib/debug/browser/exceptionWidget","vs/nls!vs/workbench/contrib/debug/browser/linkDetector","vs/nls!vs/workbench/contrib/debug/browser/loadedScriptsView","vs/nls!vs/workbench/contrib/debug/browser/rawDebugSession","vs/nls!vs/workbench/contrib/debug/browser/repl","vs/nls!vs/workbench/contrib/debug/browser/replFilter","vs/nls!vs/workbench/contrib/debug/browser/replViewer","vs/nls!vs/workbench/contrib/debug/browser/statusbarColorProvider","vs/nls!vs/workbench/contrib/debug/browser/variablesView","vs/nls!vs/workbench/contrib/debug/browser/watchExpressionsView","vs/nls!vs/workbench/contrib/debug/browser/welcomeView","vs/nls!vs/workbench/contrib/debug/common/abstractDebugAdapter","vs/nls!vs/workbench/contrib/debug/common/debug","vs/nls!vs/workbench/contrib/debug/common/debugContentProvider","vs/nls!vs/workbench/contrib/debug/common/debugLifecycle","vs/nls!vs/workbench/contrib/debug/common/debugModel","vs/nls!vs/workbench/contrib/debug/common/debugSchemas","vs/nls!vs/workbench/contrib/debug/common/debugSource","vs/nls!vs/workbench/contrib/debug/common/debugger","vs/nls!vs/workbench/contrib/debug/common/disassemblyViewInput","vs/nls!vs/workbench/contrib/debug/common/replModel","vs/nls!vs/workbench/contrib/emmet/browser/actions/expandAbbreviation","vs/nls!vs/workbench/contrib/experiments/browser/experiments.contribution","vs/nls!vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor","vs/nls!vs/workbench/contrib/extensions/browser/configBasedRecommendations","vs/nls!vs/workbench/contrib/extensions/browser/dynamicWorkspaceRecommendations","vs/nls!vs/workbench/contrib/extensions/browser/exeBasedRecommendations","vs/nls!vs/workbench/contrib/extensions/browser/extensionEditor","vs/nls!vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService","vs/nls!vs/workbench/contrib/extensions/browser/extensions.contribution","vs/nls!vs/workbench/contrib/extensions/browser/extensionsActions","vs/nls!vs/workbench/contrib/extensions/browser/extensionsActivationProgress","vs/nls!vs/workbench/contrib/extensions/browser/extensionsCompletionItemsProvider","vs/nls!vs/workbench/contrib/extensions/browser/extensionsDependencyChecker","vs/nls!vs/workbench/contrib/extensions/browser/extensionsIcons","vs/nls!vs/workbench/contrib/extensions/browser/extensionsQuickAccess","vs/nls!vs/workbench/contrib/extensions/browser/extensionsViewer","vs/nls!vs/workbench/contrib/extensions/browser/extensionsViewlet","vs/nls!vs/workbench/contrib/extensions/browser/extensionsViews","vs/nls!vs/workbench/contrib/extensions/browser/extensionsWidgets","vs/nls!vs/workbench/contrib/extensions/browser/extensionsWorkbenchService","vs/nls!vs/workbench/contrib/extensions/browser/fileBasedRecommendations","vs/nls!vs/workbench/contrib/extensions/browser/webRecommendations","vs/nls!vs/workbench/contrib/extensions/browser/workspaceRecommendations","vs/nls!vs/workbench/contrib/extensions/common/extensionsFileTemplate","vs/nls!vs/workbench/contrib/extensions/common/extensionsInput","vs/nls!vs/workbench/contrib/extensions/common/extensionsUtils","vs/nls!vs/workbench/contrib/extensions/common/runtimeExtensionsInput","vs/nls!vs/workbench/contrib/extensions/electron-sandbox/debugExtensionHostAction","vs/nls!vs/workbench/contrib/extensions/electron-sandbox/extensionProfileService","vs/nls!vs/workbench/contrib/extensions/electron-sandbox/extensions.contribution","vs/nls!vs/workbench/contrib/extensions/electron-sandbox/extensionsActions","vs/nls!vs/workbench/contrib/extensions/electron-sandbox/extensionsAutoProfiler","vs/nls!vs/workbench/contrib/extensions/electron-sandbox/extensionsSlowActions","vs/nls!vs/workbench/contrib/extensions/electron-sandbox/reportExtensionIssueAction","vs/nls!vs/workbench/contrib/extensions/electron-sandbox/runtimeExtensionsEditor","vs/nls!vs/workbench/contrib/externalTerminal/browser/externalTerminal.contribution","vs/nls!vs/workbench/contrib/externalTerminal/electron-sandbox/externalTerminal.contribution","vs/nls!vs/workbench/contrib/externalUriOpener/common/configuration","vs/nls!vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService","vs/nls!vs/workbench/contrib/feedback/browser/feedback","vs/nls!vs/workbench/contrib/feedback/browser/feedbackStatusbarItem","vs/nls!vs/workbench/contrib/files/browser/editors/binaryFileEditor","vs/nls!vs/workbench/contrib/files/browser/editors/textFileEditor","vs/nls!vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler","vs/nls!vs/workbench/contrib/files/browser/explorerViewlet","vs/nls!vs/workbench/contrib/files/browser/fileActions","vs/nls!vs/workbench/contrib/files/browser/fileActions.contribution","vs/nls!vs/workbench/contrib/files/browser/fileCommands","vs/nls!vs/workbench/contrib/files/browser/fileConstants","vs/nls!vs/workbench/contrib/files/browser/fileImportExport","vs/nls!vs/workbench/contrib/files/browser/files.contribution","vs/nls!vs/workbench/contrib/files/browser/views/emptyView","vs/nls!vs/workbench/contrib/files/browser/views/explorerDecorationsProvider","vs/nls!vs/workbench/contrib/files/browser/views/explorerView","vs/nls!vs/workbench/contrib/files/browser/views/explorerViewer","vs/nls!vs/workbench/contrib/files/browser/views/openEditorsView","vs/nls!vs/workbench/contrib/files/browser/workspaceWatcher","vs/nls!vs/workbench/contrib/files/common/dirtyFilesIndicator","vs/nls!vs/workbench/contrib/files/common/files","vs/nls!vs/workbench/contrib/files/electron-sandbox/fileActions.contribution","vs/nls!vs/workbench/contrib/files/electron-sandbox/files.contribution","vs/nls!vs/workbench/contrib/files/electron-sandbox/textFileEditor","vs/nls!vs/workbench/contrib/format/browser/formatActionsMultiple","vs/nls!vs/workbench/contrib/format/browser/formatActionsNone","vs/nls!vs/workbench/contrib/format/browser/formatModified","vs/nls!vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty","vs/nls!vs/workbench/contrib/interactive/browser/interactive.contribution","vs/nls!vs/workbench/contrib/interactive/browser/interactiveEditor","vs/nls!vs/workbench/contrib/issue/electron-sandbox/issue.contribution","vs/nls!vs/workbench/contrib/issue/electron-sandbox/issueActions","vs/nls!vs/workbench/contrib/keybindings/browser/keybindings.contribution","vs/nls!vs/workbench/contrib/languageStatus/browser/languageStatus.contribution","vs/nls!vs/workbench/contrib/localHistory/browser/localHistory","vs/nls!vs/workbench/contrib/localHistory/browser/localHistoryCommands","vs/nls!vs/workbench/contrib/localHistory/browser/localHistoryTimeline","vs/nls!vs/workbench/contrib/localHistory/electron-sandbox/localHistoryCommands","vs/nls!vs/workbench/contrib/localizations/browser/localizations.contribution","vs/nls!vs/workbench/contrib/localizations/browser/localizationsActions","vs/nls!vs/workbench/contrib/localizations/browser/minimalTranslations","vs/nls!vs/workbench/contrib/logs/common/logs.contribution","vs/nls!vs/workbench/contrib/logs/common/logsActions","vs/nls!vs/workbench/contrib/logs/electron-sandbox/logsActions","vs/nls!vs/workbench/contrib/markers/browser/markers","vs/nls!vs/workbench/contrib/markers/browser/markers.contribution","vs/nls!vs/workbench/contrib/markers/browser/markersFileDecorations","vs/nls!vs/workbench/contrib/markers/browser/markersTreeViewer","vs/nls!vs/workbench/contrib/markers/browser/markersView","vs/nls!vs/workbench/contrib/markers/browser/markersViewActions","vs/nls!vs/workbench/contrib/markers/browser/messages","vs/nls!vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands","vs/nls!vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController","vs/nls!vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders","vs/nls!vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard","vs/nls!vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar","vs/nls!vs/workbench/contrib/notebook/browser/contrib/find/findController","vs/nls!vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget","vs/nls!vs/workbench/contrib/notebook/browser/contrib/format/formatting","vs/nls!vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted","vs/nls!vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions","vs/nls!vs/workbench/contrib/notebook/browser/contrib/navigation/arrow","vs/nls!vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline","vs/nls!vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile","vs/nls!vs/workbench/contrib/notebook/browser/controller/coreActions","vs/nls!vs/workbench/contrib/notebook/browser/controller/editActions","vs/nls!vs/workbench/contrib/notebook/browser/controller/executeActions","vs/nls!vs/workbench/contrib/notebook/browser/controller/foldingController","vs/nls!vs/workbench/contrib/notebook/browser/controller/insertCellActions","vs/nls!vs/workbench/contrib/notebook/browser/controller/layoutActions","vs/nls!vs/workbench/contrib/notebook/browser/diff/diffElementOutputs","vs/nls!vs/workbench/contrib/notebook/browser/diff/notebookDiffActions","vs/nls!vs/workbench/contrib/notebook/browser/diff/notebookTextDiffEditor","vs/nls!vs/workbench/contrib/notebook/browser/extensionPoint","vs/nls!vs/workbench/contrib/notebook/browser/notebook.contribution","vs/nls!vs/workbench/contrib/notebook/browser/notebookEditor","vs/nls!vs/workbench/contrib/notebook/browser/notebookEditorWidget","vs/nls!vs/workbench/contrib/notebook/browser/notebookExecutionServiceImpl","vs/nls!vs/workbench/contrib/notebook/browser/notebookIcons","vs/nls!vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl","vs/nls!vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions","vs/nls!vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput","vs/nls!vs/workbench/contrib/notebook/browser/view/cellParts/codeCell","vs/nls!vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon","vs/nls!vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar","vs/nls!vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput","vs/nls!vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint","vs/nls!vs/workbench/contrib/notebook/browser/view/cellParts/markdownCell","vs/nls!vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView","vs/nls!vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer","vs/nls!vs/workbench/contrib/notebook/browser/viewParts/notebookKernelActionViewItem","vs/nls!vs/workbench/contrib/notebook/common/notebookEditorModel","vs/nls!vs/workbench/contrib/outline/browser/outline.contribution","vs/nls!vs/workbench/contrib/outline/browser/outlinePane","vs/nls!vs/workbench/contrib/output/browser/logViewer","vs/nls!vs/workbench/contrib/output/browser/output.contribution","vs/nls!vs/workbench/contrib/output/browser/outputView","vs/nls!vs/workbench/contrib/performance/browser/performance.contribution","vs/nls!vs/workbench/contrib/performance/browser/perfviewEditor","vs/nls!vs/workbench/contrib/performance/electron-sandbox/startupProfiler","vs/nls!vs/workbench/contrib/preferences/browser/keybindingWidgets","vs/nls!vs/workbench/contrib/preferences/browser/keybindingsEditor","vs/nls!vs/workbench/contrib/preferences/browser/keybindingsEditorContribution","vs/nls!vs/workbench/contrib/preferences/browser/preferences.contribution","vs/nls!vs/workbench/contrib/preferences/browser/preferencesActions","vs/nls!vs/workbench/contrib/preferences/browser/preferencesIcons","vs/nls!vs/workbench/contrib/preferences/browser/preferencesRenderers","vs/nls!vs/workbench/contrib/preferences/browser/preferencesWidgets","vs/nls!vs/workbench/contrib/preferences/browser/settingsEditor2","vs/nls!vs/workbench/contrib/preferences/browser/settingsLayout","vs/nls!vs/workbench/contrib/preferences/browser/settingsTree","vs/nls!vs/workbench/contrib/preferences/browser/settingsTreeModels","vs/nls!vs/workbench/contrib/preferences/browser/settingsWidgets","vs/nls!vs/workbench/contrib/preferences/browser/tocTree","vs/nls!vs/workbench/contrib/preferences/common/preferencesContribution","vs/nls!vs/workbench/contrib/preferences/common/settingsEditorColorRegistry","vs/nls!vs/workbench/contrib/quickaccess/browser/commandsQuickAccess","vs/nls!vs/workbench/contrib/quickaccess/browser/quickAccess.contribution","vs/nls!vs/workbench/contrib/quickaccess/browser/viewQuickAccess","vs/nls!vs/workbench/contrib/relauncher/browser/relauncher.contribution","vs/nls!vs/workbench/contrib/remote/browser/explorerViewItems","vs/nls!vs/workbench/contrib/remote/browser/remote","vs/nls!vs/workbench/contrib/remote/browser/remoteExplorer","vs/nls!vs/workbench/contrib/remote/browser/remoteIcons","vs/nls!vs/workbench/contrib/remote/browser/remoteIndicator","vs/nls!vs/workbench/contrib/remote/browser/tunnelFactory","vs/nls!vs/workbench/contrib/remote/browser/tunnelView","vs/nls!vs/workbench/contrib/remote/common/remote.contribution","vs/nls!vs/workbench/contrib/remote/electron-sandbox/remote.contribution","vs/nls!vs/workbench/contrib/sash/browser/sash.contribution","vs/nls!vs/workbench/contrib/scm/browser/activity","vs/nls!vs/workbench/contrib/scm/browser/dirtydiffDecorator","vs/nls!vs/workbench/contrib/scm/browser/scm.contribution","vs/nls!vs/workbench/contrib/scm/browser/scmRepositoriesViewPane","vs/nls!vs/workbench/contrib/scm/browser/scmViewPane","vs/nls!vs/workbench/contrib/scm/browser/scmViewPaneContainer","vs/nls!vs/workbench/contrib/search/browser/anythingQuickAccess","vs/nls!vs/workbench/contrib/search/browser/patternInputWidget","vs/nls!vs/workbench/contrib/search/browser/replaceService","vs/nls!vs/workbench/contrib/search/browser/search.contribution","vs/nls!vs/workbench/contrib/search/browser/searchActions","vs/nls!vs/workbench/contrib/search/browser/searchIcons","vs/nls!vs/workbench/contrib/search/browser/searchMessage","vs/nls!vs/workbench/contrib/search/browser/searchResultsView","vs/nls!vs/workbench/contrib/search/browser/searchView","vs/nls!vs/workbench/contrib/search/browser/searchWidget","vs/nls!vs/workbench/contrib/search/browser/symbolsQuickAccess","vs/nls!vs/workbench/contrib/searchEditor/browser/searchEditor","vs/nls!vs/workbench/contrib/searchEditor/browser/searchEditor.contribution","vs/nls!vs/workbench/contrib/searchEditor/browser/searchEditorInput","vs/nls!vs/workbench/contrib/searchEditor/browser/searchEditorSerialization","vs/nls!vs/workbench/contrib/snippets/browser/configureSnippets","vs/nls!vs/workbench/contrib/snippets/browser/insertSnippet","vs/nls!vs/workbench/contrib/snippets/browser/snippetCompletionProvider","vs/nls!vs/workbench/contrib/snippets/browser/snippetPicker","vs/nls!vs/workbench/contrib/snippets/browser/snippets.contribution","vs/nls!vs/workbench/contrib/snippets/browser/snippetsFile","vs/nls!vs/workbench/contrib/snippets/browser/snippetsService","vs/nls!vs/workbench/contrib/snippets/browser/surroundWithSnippet","vs/nls!vs/workbench/contrib/surveys/browser/ces.contribution","vs/nls!vs/workbench/contrib/surveys/browser/languageSurveys.contribution","vs/nls!vs/workbench/contrib/surveys/browser/nps.contribution","vs/nls!vs/workbench/contrib/tasks/browser/abstractTaskService","vs/nls!vs/workbench/contrib/tasks/browser/runAutomaticTasks","vs/nls!vs/workbench/contrib/tasks/browser/task.contribution","vs/nls!vs/workbench/contrib/tasks/browser/taskQuickPick","vs/nls!vs/workbench/contrib/tasks/browser/taskTerminalStatus","vs/nls!vs/workbench/contrib/tasks/browser/tasksQuickAccess","vs/nls!vs/workbench/contrib/tasks/browser/terminalTaskSystem","vs/nls!vs/workbench/contrib/tasks/common/jsonSchemaCommon","vs/nls!vs/workbench/contrib/tasks/common/jsonSchema_v1","vs/nls!vs/workbench/contrib/tasks/common/jsonSchema_v2","vs/nls!vs/workbench/contrib/tasks/common/problemMatcher","vs/nls!vs/workbench/contrib/tasks/common/taskConfiguration","vs/nls!vs/workbench/contrib/tasks/common/taskDefinitionRegistry","vs/nls!vs/workbench/contrib/tasks/common/taskService","vs/nls!vs/workbench/contrib/tasks/common/taskTemplates","vs/nls!vs/workbench/contrib/tasks/common/tasks","vs/nls!vs/workbench/contrib/tasks/electron-sandbox/taskService","vs/nls!vs/workbench/contrib/terminal/browser/baseTerminalBackend","vs/nls!vs/workbench/contrib/terminal/browser/environmentVariableInfo","vs/nls!vs/workbench/contrib/terminal/browser/links/terminalLink","vs/nls!vs/workbench/contrib/terminal/browser/links/terminalLinkDetectorAdapter","vs/nls!vs/workbench/contrib/terminal/browser/links/terminalLinkManager","vs/nls!vs/workbench/contrib/terminal/browser/links/terminalLinkQuickpick","vs/nls!vs/workbench/contrib/terminal/browser/links/terminalShellIntegrationLinkDetector","vs/nls!vs/workbench/contrib/terminal/browser/terminal.contribution","vs/nls!vs/workbench/contrib/terminal/browser/terminalActions","vs/nls!vs/workbench/contrib/terminal/browser/terminalConfigHelper","vs/nls!vs/workbench/contrib/terminal/browser/terminalDecorationsProvider","vs/nls!vs/workbench/contrib/terminal/browser/terminalEditorInput","vs/nls!vs/workbench/contrib/terminal/browser/terminalIcons","vs/nls!vs/workbench/contrib/terminal/browser/terminalInstance","vs/nls!vs/workbench/contrib/terminal/browser/terminalMenus","vs/nls!vs/workbench/contrib/terminal/browser/terminalProcessManager","vs/nls!vs/workbench/contrib/terminal/browser/terminalProfileQuickpick","vs/nls!vs/workbench/contrib/terminal/browser/terminalProfileResolverService","vs/nls!vs/workbench/contrib/terminal/browser/terminalQuickAccess","vs/nls!vs/workbench/contrib/terminal/browser/terminalService","vs/nls!vs/workbench/contrib/terminal/browser/terminalTabbedView","vs/nls!vs/workbench/contrib/terminal/browser/terminalTabsList","vs/nls!vs/workbench/contrib/terminal/browser/terminalTooltip","vs/nls!vs/workbench/contrib/terminal/browser/terminalView","vs/nls!vs/workbench/contrib/terminal/browser/xterm/decorationAddon","vs/nls!vs/workbench/contrib/terminal/browser/xterm/xtermTerminal","vs/nls!vs/workbench/contrib/terminal/common/terminal","vs/nls!vs/workbench/contrib/terminal/common/terminalColorRegistry","vs/nls!vs/workbench/contrib/terminal/common/terminalConfiguration","vs/nls!vs/workbench/contrib/terminal/common/terminalContextKey","vs/nls!vs/workbench/contrib/terminal/common/terminalStrings","vs/nls!vs/workbench/contrib/terminal/electron-sandbox/terminalRemote","vs/nls!vs/workbench/contrib/testing/browser/icons","vs/nls!vs/workbench/contrib/testing/browser/testExplorerActions","vs/nls!vs/workbench/contrib/testing/browser/testing.contribution","vs/nls!vs/workbench/contrib/testing/browser/testingConfigurationUi","vs/nls!vs/workbench/contrib/testing/browser/testingDecorations","vs/nls!vs/workbench/contrib/testing/browser/testingExplorerFilter","vs/nls!vs/workbench/contrib/testing/browser/testingExplorerView","vs/nls!vs/workbench/contrib/testing/browser/testingOutputPeek","vs/nls!vs/workbench/contrib/testing/browser/testingOutputTerminalService","vs/nls!vs/workbench/contrib/testing/browser/testingProgressUiService","vs/nls!vs/workbench/contrib/testing/browser/testingViewPaneContainer","vs/nls!vs/workbench/contrib/testing/browser/theme","vs/nls!vs/workbench/contrib/testing/common/configuration","vs/nls!vs/workbench/contrib/testing/common/constants","vs/nls!vs/workbench/contrib/testing/common/testResult","vs/nls!vs/workbench/contrib/testing/common/testServiceImpl","vs/nls!vs/workbench/contrib/testing/common/testingContextKeys","vs/nls!vs/workbench/contrib/themes/browser/themes.contribution","vs/nls!vs/workbench/contrib/timeline/browser/timeline.contribution","vs/nls!vs/workbench/contrib/timeline/browser/timelinePane","vs/nls!vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution","vs/nls!vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek","vs/nls!vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree","vs/nls!vs/workbench/contrib/update/browser/releaseNotesEditor","vs/nls!vs/workbench/contrib/update/browser/update","vs/nls!vs/workbench/contrib/update/browser/update.contribution","vs/nls!vs/workbench/contrib/url/browser/trustedDomains","vs/nls!vs/workbench/contrib/url/browser/trustedDomainsValidator","vs/nls!vs/workbench/contrib/url/browser/url.contribution","vs/nls!vs/workbench/contrib/userDataSync/browser/userDataSync","vs/nls!vs/workbench/contrib/userDataSync/browser/userDataSync.contribution","vs/nls!vs/workbench/contrib/userDataSync/browser/userDataSyncMergesView","vs/nls!vs/workbench/contrib/userDataSync/browser/userDataSyncViews","vs/nls!vs/workbench/contrib/userDataSync/electron-sandbox/userDataSync.contribution","vs/nls!vs/workbench/contrib/watermark/browser/watermark","vs/nls!vs/workbench/contrib/webview/browser/webview.contribution","vs/nls!vs/workbench/contrib/webview/browser/webviewElement","vs/nls!vs/workbench/contrib/webview/electron-sandbox/webviewCommands","vs/nls!vs/workbench/contrib/webviewPanel/browser/webviewCommands","vs/nls!vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution","vs/nls!vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted","vs/nls!vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution","vs/nls!vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedColors","vs/nls!vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedExtensionPoint","vs/nls!vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedIcons","vs/nls!vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput","vs/nls!vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService","vs/nls!vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent","vs/nls!vs/workbench/contrib/welcomeGettingStarted/common/media/notebookProfile","vs/nls!vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker","vs/nls!vs/workbench/contrib/welcomeOverlay/browser/welcomeOverlay","vs/nls!vs/workbench/contrib/welcomeViews/common/newFile.contribution","vs/nls!vs/workbench/contrib/welcomeViews/common/viewsWelcomeContribution","vs/nls!vs/workbench/contrib/welcomeViews/common/viewsWelcomeExtensionPoint","vs/nls!vs/workbench/contrib/welcomeWalkthrough/browser/editor/editorWalkThrough","vs/nls!vs/workbench/contrib/welcomeWalkthrough/browser/walkThrough.contribution","vs/nls!vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughPart","vs/nls!vs/workbench/contrib/workspace/browser/workspace.contribution","vs/nls!vs/workbench/contrib/workspace/browser/workspaceTrustEditor","vs/nls!vs/workbench/contrib/workspace/common/workspace","vs/nls!vs/workbench/contrib/workspaces/browser/workspaces.contribution","vs/nls!vs/workbench/electron-sandbox/actions/developerActions","vs/nls!vs/workbench/electron-sandbox/actions/installActions","vs/nls!vs/workbench/electron-sandbox/actions/windowActions","vs/nls!vs/workbench/electron-sandbox/desktop.contribution","vs/nls!vs/workbench/electron-sandbox/parts/dialogs/dialogHandler","vs/nls!vs/workbench/electron-sandbox/window","vs/nls!vs/workbench/services/actions/common/menusExtensionPoint","vs/nls!vs/workbench/services/authentication/browser/authenticationService","vs/nls!vs/workbench/services/configuration/browser/configurationService","vs/nls!vs/workbench/services/configuration/common/configurationEditingService","vs/nls!vs/workbench/services/configuration/common/jsonEditingService","vs/nls!vs/workbench/services/configurationResolver/browser/configurationResolverService","vs/nls!vs/workbench/services/configurationResolver/common/configurationResolverSchema","vs/nls!vs/workbench/services/configurationResolver/common/configurationResolverUtils","vs/nls!vs/workbench/services/configurationResolver/common/variableResolver","vs/nls!vs/workbench/services/decorations/browser/decorationsService","vs/nls!vs/workbench/services/dialogs/browser/abstractFileDialogService","vs/nls!vs/workbench/services/dialogs/browser/simpleFileDialog","vs/nls!vs/workbench/services/editor/browser/editorResolverService","vs/nls!vs/workbench/services/editor/common/editorResolverService","vs/nls!vs/workbench/services/extensionManagement/browser/extensionBisect","vs/nls!vs/workbench/services/extensionManagement/browser/extensionEnablementService","vs/nls!vs/workbench/services/extensionManagement/browser/webExtensionsScannerService","vs/nls!vs/workbench/services/extensionManagement/common/extensionManagementService","vs/nls!vs/workbench/services/extensionManagement/electron-sandbox/extensionManagementServerService","vs/nls!vs/workbench/services/extensionManagement/electron-sandbox/remoteExtensionManagementService","vs/nls!vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig","vs/nls!vs/workbench/services/extensions/browser/extensionUrlHandler","vs/nls!vs/workbench/services/extensions/browser/webWorkerExtensionHost","vs/nls!vs/workbench/services/extensions/common/abstractExtensionService","vs/nls!vs/workbench/services/extensions/common/extensionHostManager","vs/nls!vs/workbench/services/extensions/common/extensionPoints","vs/nls!vs/workbench/services/extensions/common/extensionsRegistry","vs/nls!vs/workbench/services/extensions/common/extensionsUtil","vs/nls!vs/workbench/services/extensions/common/remoteExtensionHost","vs/nls!vs/workbench/services/extensions/electron-browser/extensionService","vs/nls!vs/workbench/services/extensions/electron-browser/localProcessExtensionHost","vs/nls!vs/workbench/services/extensions/electron-sandbox/cachedExtensionScanner","vs/nls!vs/workbench/services/history/browser/historyService","vs/nls!vs/workbench/services/integrity/electron-sandbox/integrityService","vs/nls!vs/workbench/services/keybinding/browser/keybindingService","vs/nls!vs/workbench/services/keybinding/common/keybindingEditing","vs/nls!vs/workbench/services/label/common/labelService","vs/nls!vs/workbench/services/language/common/languageService","vs/nls!vs/workbench/services/notification/common/notificationService","vs/nls!vs/workbench/services/preferences/browser/keybindingsEditorInput","vs/nls!vs/workbench/services/preferences/browser/keybindingsEditorModel","vs/nls!vs/workbench/services/preferences/browser/preferencesService","vs/nls!vs/workbench/services/preferences/common/preferencesEditorInput","vs/nls!vs/workbench/services/preferences/common/preferencesModels","vs/nls!vs/workbench/services/preferences/common/preferencesValidation","vs/nls!vs/workbench/services/progress/browser/progressService","vs/nls!vs/workbench/services/remote/common/remoteExplorerService","vs/nls!vs/workbench/services/remote/electron-sandbox/remoteAgentService","vs/nls!vs/workbench/services/search/common/queryBuilder","vs/nls!vs/workbench/services/textMate/browser/abstractTextMateService","vs/nls!vs/workbench/services/textMate/common/TMGrammars","vs/nls!vs/workbench/services/textfile/browser/textFileService","vs/nls!vs/workbench/services/textfile/common/textFileEditorModelManager","vs/nls!vs/workbench/services/textfile/common/textFileSaveParticipant","vs/nls!vs/workbench/services/themes/browser/fileIconThemeData","vs/nls!vs/workbench/services/themes/browser/productIconThemeData","vs/nls!vs/workbench/services/themes/browser/workbenchThemeService","vs/nls!vs/workbench/services/themes/common/colorExtensionPoint","vs/nls!vs/workbench/services/themes/common/colorThemeData","vs/nls!vs/workbench/services/themes/common/colorThemeSchema","vs/nls!vs/workbench/services/themes/common/fileIconThemeSchema","vs/nls!vs/workbench/services/themes/common/iconExtensionPoint","vs/nls!vs/workbench/services/themes/common/productIconThemeSchema","vs/nls!vs/workbench/services/themes/common/themeConfiguration","vs/nls!vs/workbench/services/themes/common/themeExtensionPoints","vs/nls!vs/workbench/services/themes/common/tokenClassificationExtensionPoint","vs/nls!vs/workbench/services/userDataSync/browser/userDataSyncWorkbenchService","vs/nls!vs/workbench/services/userDataSync/common/userDataSync","vs/nls!vs/workbench/services/views/browser/viewDescriptorService","vs/nls!vs/workbench/services/workingCopy/common/fileWorkingCopyManager","vs/nls!vs/workbench/services/workingCopy/common/storedFileWorkingCopy","vs/nls!vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant","vs/nls!vs/workbench/services/workingCopy/common/workingCopyHistoryService","vs/nls!vs/workbench/services/workingCopy/common/workingCopyHistoryTracker","vs/nls!vs/workbench/services/workingCopy/electron-sandbox/workingCopyBackupTracker","vs/nls!vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService","vs/nls!vs/workbench/services/workspaces/browser/workspaceTrustEditorInput","vs/nls!vs/workbench/services/workspaces/electron-sandbox/workspaceEditingService","vs/platform/assignment/common/assignment","vs/platform/backup/common/backup","vs/platform/debug/common/extensionHostDebugIpc","vs/platform/download/common/downloadIpc","vs/platform/driver/common/driverIpc","vs/platform/environment/common/environmentService","vs/platform/extensionRecommendations/electron-sandbox/extensionRecommendationsIpc","vs/platform/instantiation/common/graph","vs/editor/common/services/languageFeaturesService","vs/editor/contrib/links/browser/getLinks","vs/editor/common/services/textResourceConfigurationService","vs/editor/contrib/comment/browser/lineCommentCommand","vs/editor/contrib/linesOperations/browser/moveLinesCommand","vs/editor/contrib/parameterHints/browser/parameterHintsModel","vs/editor/contrib/suggest/browser/suggestAlternatives","vs/editor/contrib/suggest/browser/wordContextKey","vs/editor/browser/config/editorConfiguration","vs/platform/contextkey/browser/contextKeyService","vs/platform/files/browser/htmlFileSystemProvider","vs/platform/files/common/io","vs/platform/instantiation/common/instantiationService","vs/platform/ipc/electron-sandbox/mainProcessService","vs/platform/diagnostics/electron-sandbox/diagnosticsService","vs/platform/externalTerminal/electron-sandbox/externalTerminalMainService","vs/platform/keybinding/common/abstractKeybindingService","vs/platform/keybinding/common/keybindingResolver","vs/platform/keybinding/common/usLayoutResolvedKeybinding","vs/platform/keyboardLayout/common/dispatchConfig","vs/platform/keyboardLayout/common/keyboardMapper","vs/platform/accessibility/browser/accessibilityService","vs/platform/contextview/browser/contextViewService","vs/platform/layout/browser/zIndexRegistry","vs/platform/lifecycle/common/lifecycle","vs/platform/localizations/common/localizedStrings","vs/platform/driver/browser/baseDriver","vs/platform/files/common/diskFileSystemProvider","vs/platform/files/common/fileService","vs/platform/markers/common/markerService","vs/platform/driver/electron-sandbox/driver","vs/platform/native/electron-sandbox/nativeHostService","vs/editor/browser/services/openerService","vs/editor/contrib/documentSymbols/browser/documentSymbols","vs/platform/profiling/electron-sandbox/profilingService","vs/editor/common/services/languagesRegistry","vs/editor/common/services/languageService","vs/editor/contrib/hover/browser/marginHover","vs/platform/quickinput/browser/helpQuickAccess","vs/platform/quickinput/browser/quickAccess","vs/platform/remote/browser/browserSocketFactory","vs/platform/extensionManagement/common/extensionManagementCLIService","vs/platform/extensionManagement/common/unsupportedExtensionsMigration","vs/platform/remote/electron-sandbox/remoteAuthorityResolverService","vs/platform/remote/electron-sandbox/sharedProcessTunnelService","vs/platform/request/browser/requestService","vs/platform/download/common/downloadService","vs/platform/extensionManagement/common/extensionTipsService","vs/platform/sharedProcess/common/sharedProcessWorkerService","vs/editor/contrib/codelens/browser/codeLensCache","vs/editor/contrib/suggest/browser/suggestMemory","vs/platform/storage/common/storageIpc","vs/platform/storage/electron-sandbox/storageService","vs/platform/telemetry/common/commonProperties","vs/platform/telemetry/common/errorTelemetry","vs/platform/telemetry/browser/errorTelemetry","vs/editor/contrib/quickAccess/browser/commandsQuickAccess","vs/platform/telemetry/common/telemetryIpc","vs/platform/assignment/common/assignmentService","vs/platform/externalServices/common/marketplace","vs/platform/extensionManagement/common/extensionGalleryService","vs/platform/telemetry/common/telemetryService","vs/platform/telemetry/electron-sandbox/customEndpointTelemetryService","vs/platform/terminal/common/capabilities/commandDetectionCapability","vs/platform/terminal/common/capabilities/cwdDetectionCapability","vs/platform/terminal/common/capabilities/naiveCwdDetectionCapability","vs/platform/terminal/common/capabilities/partialCommandDetectionCapability","vs/platform/terminal/common/terminalDataBuffering","vs/platform/terminal/common/terminalEnvironment","vs/platform/terminal/common/terminalRecorder","vs/platform/terminal/common/xterm/shellIntegrationAddon","vs/editor/browser/controller/mouseHandler","vs/editor/browser/controller/pointerHandler","vs/editor/browser/viewParts/lines/viewLines","vs/platform/contextview/browser/contextMenuHandler","vs/editor/browser/viewParts/editorScrollbar/editorScrollbar","vs/editor/browser/viewParts/minimap/minimap","vs/editor/browser/viewParts/scrollDecoration/scrollDecoration","vs/editor/browser/viewParts/selections/selections","vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight","vs/editor/browser/viewParts/indentGuides/indentGuides","vs/editor/browser/controller/textAreaHandler","vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler","vs/editor/browser/viewParts/rulers/rulers","vs/editor/browser/viewParts/viewCursors/viewCursors","vs/editor/common/model/bracketPairsTextModelPart/colorizedBracketPairsDecorationProvider","vs/editor/common/services/markerDecorationsService","vs/editor/contrib/codeAction/browser/lightBulbWidget","vs/editor/contrib/colorPicker/browser/colorPickerWidget","vs/editor/contrib/gotoSymbol/browser/peek/referencesTree","vs/editor/contrib/inlineCompletions/browser/ghostTextWidget","vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess","vs/editor/contrib/rename/browser/renameInputField","vs/editor/browser/services/markerDecorations","vs/editor/browser/view/viewController","vs/editor/browser/view","vs/editor/contrib/anchorSelect/browser/anchorSelect","vs/editor/contrib/caretOperations/browser/caretOperations","vs/editor/contrib/caretOperations/browser/transpose","vs/editor/contrib/comment/browser/comment","vs/editor/contrib/cursorUndo/browser/cursorUndo","vs/editor/contrib/editorState/browser/keybindingCancellation","vs/editor/contrib/codeAction/browser/codeActionMenu","vs/editor/contrib/codeAction/browser/codeActionModel","vs/editor/contrib/fontZoom/browser/fontZoom","vs/editor/contrib/format/browser/formatActions","vs/editor/contrib/gotoSymbol/browser/symbolNavigation","vs/editor/contrib/lineSelection/browser/lineSelection","vs/editor/contrib/codeAction/browser/codeActionUi","vs/editor/contrib/codeAction/browser/codeActionContributions","vs/editor/contrib/rename/browser/rename","vs/editor/contrib/smartSelect/browser/smartSelect","vs/editor/contrib/suggest/browser/suggestInlineCompletions","vs/editor/contrib/tokenization/browser/tokenization","vs/editor/contrib/wordPartOperations/browser/wordPartOperations","vs/editor/contrib/suggest/browser/suggestWidgetStatus","vs/platform/actions/common/menuService","vs/platform/contextview/browser/contextMenuService","vs/platform/quickinput/browser/quickInput","vs/editor/browser/widget/diffReview","vs/editor/contrib/parameterHints/browser/parameterHintsWidget","vs/editor/contrib/parameterHints/browser/parameterHints","vs/editor/contrib/suggest/browser/suggestWidgetRenderer","vs/editor/contrib/unicodeHighlighter/browser/bannerController","vs/platform/theme/browser/iconsStyleSheet","vs/editor/common/services/modelUndoRedoParticipant","vs/editor/common/viewModel/viewModelLines","vs/editor/common/viewModel/viewModelImpl","vs/editor/contrib/bracketMatching/browser/bracketMatching","vs/editor/contrib/codelens/browser/codelensWidget","vs/editor/contrib/codelens/browser/codelensController","vs/editor/contrib/colorPicker/browser/colorHoverParticipant","vs/editor/contrib/dnd/browser/dnd","vs/editor/contrib/find/browser/findOptionsWidget","vs/editor/contrib/folding/browser/foldingDecorations","vs/editor/contrib/hover/browser/contentHover","vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace","vs/editor/contrib/linkedEditing/browser/linkedEditing","vs/editor/contrib/suggest/browser/suggestWidget","vs/editor/contrib/viewportSemanticTokens/browser/viewportSemanticTokens","vs/editor/contrib/wordHighlighter/browser/wordHighlighter","vs/editor/contrib/gotoError/browser/gotoErrorWidget","vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget","vs/editor/contrib/hover/browser/markerHoverParticipant","vs/editor/contrib/colorPicker/browser/colorContributions","vs/editor/contrib/inlayHints/browser/inlayHintsLocations","vs/editor/contrib/inlayHints/browser/inlayHintsHover","vs/editor/contrib/inlayHints/browser/inlayHintsContribution","vs/platform/undoRedo/common/undoRedoService","vs/platform/update/common/update.config.contribution","vs/platform/update/common/updateIpc","vs/platform/uriIdentity/common/uriIdentityService","vs/platform/url/common/urlIpc","vs/platform/url/common/urlService","vs/platform/userData/common/fileUserDataProvider","vs/platform/userDataSync/common/extensionsMerge","vs/platform/userDataSync/common/keybindingsMerge","vs/platform/userDataSync/common/snippetsMerge","vs/platform/userDataSync/common/globalStateMerge","vs/platform/userDataSync/common/keybindingsSync","vs/platform/userDataSync/common/settingsSync","vs/platform/userDataSync/common/snippetsSync","vs/platform/userDataSync/common/tasksSync","vs/platform/userDataSync/common/userDataSyncEnablementService","vs/platform/userDataSync/common/userDataSyncLog","vs/platform/userDataSync/common/userDataSyncServiceIpc","vs/platform/webview/common/mimeTypes","vs/platform/webview/common/webviewPortMapping","vs/editor/contrib/suggest/browser/suggestModel","vs/editor/contrib/inlineCompletions/browser/suggestWidgetInlineCompletionProvider","vs/editor/contrib/inlineCompletions/browser/suggestWidgetPreviewModel","vs/editor/contrib/inlineCompletions/browser/ghostTextModel","vs/editor/contrib/inlineCompletions/browser/ghostTextHoverParticipant","vs/editor/contrib/inlineCompletions/browser/ghostText.contribution","vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter","vs/editor/editor.all","vs/workbench/api/common/extHostRpcService","vs/workbench/api/common/extHostTunnelService","vs/workbench/api/common/extHostWebviewMessaging","vs/workbench/browser/actions/listCommands","vs/workbench/browser/parts/dialogs/dialogHandler","vs/workbench/browser/parts/notifications/notificationsAlerts","vs/workbench/browser/actions/quickAccessActions","vs/workbench/browser/workbench.contribution","vs/workbench/common/dialogs","vs/workbench/browser/parts/notifications/notificationsViewer","vs/workbench/contrib/bulkEdit/browser/bulkTextEdits","vs/workbench/contrib/callHierarchy/browser/callHierarchyTree","vs/workbench/contrib/codeActions/browser/codeActionsContribution","vs/workbench/contrib/codeActions/browser/documentationContribution","vs/workbench/contrib/codeEditor/browser/largeFileOptimizations","vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsTree","vs/workbench/contrib/codeEditor/browser/toggleColumnSelection","vs/workbench/contrib/codeEditor/browser/workbenchReferenceSearch","vs/workbench/contrib/codeEditor/electron-sandbox/inputClipboardActions","vs/workbench/contrib/comments/browser/commentMenus","vs/workbench/contrib/comments/browser/commentThreadHeader","vs/workbench/contrib/comments/browser/reactionsAction","vs/workbench/contrib/customEditor/common/customEditorModelManager","vs/workbench/contrib/debug/common/abstractDebugAdapter","vs/workbench/contrib/audioCues/browser/audioCueDebuggerContribution","vs/workbench/contrib/debug/browser/debugMemory","vs/workbench/contrib/debug/browser/debugProgress","vs/workbench/contrib/debug/common/debugCompoundRoot","vs/workbench/contrib/debug/common/debugTelemetry","vs/workbench/contrib/debug/browser/rawDebugSession","vs/workbench/contrib/debug/common/debugViewModel","vs/workbench/contrib/debug/electron-sandbox/extensionHostDebugService","vs/workbench/contrib/extensions/browser/configBasedRecommendations","vs/workbench/contrib/extensions/browser/exeBasedRecommendations","vs/workbench/contrib/extensions/browser/extensionsCompletionItemsProvider","vs/workbench/contrib/extensions/browser/keymapRecommendations","vs/workbench/contrib/extensions/browser/languageRecommendations","vs/workbench/contrib/extensions/electron-sandbox/reportExtensionIssueAction","vs/workbench/contrib/files/common/explorerFileNestingTrie","vs/workbench/contrib/files/electron-sandbox/fileCommands","vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty","vs/workbench/contrib/issue/common/commands","vs/workbench/contrib/localizations/browser/minimalTranslations","vs/workbench/contrib/notebook/browser/contrib/find/findFilters","vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget","vs/workbench/contrib/notebook/browser/notebookCellStatusBarServiceImpl","vs/workbench/contrib/notebook/browser/notebookLogger","vs/workbench/contrib/notebook/browser/view/cellParts/cellDecorations","vs/workbench/contrib/notebook/browser/view/cellParts/cellDragRenderer","vs/workbench/contrib/notebook/browser/view/cellParts/cellExecution","vs/workbench/contrib/notebook/browser/view/cellParts/cellFocus","vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellInput","vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads","vs/workbench/contrib/notebook/browser/view/renderers/webviewThemeMapping","vs/workbench/contrib/notebook/browser/viewModel/cellSelectionCollection","vs/workbench/contrib/notebook/browser/viewModel/eventDispatcher","vs/workbench/contrib/notebook/browser/viewModel/viewContext","vs/workbench/contrib/notebook/browser/viewParts/notebookEditorDecorations","vs/workbench/contrib/notebook/browser/viewParts/notebookOverviewRuler","vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar","vs/workbench/contrib/notebook/common/model/cellEdit","vs/workbench/contrib/notebook/browser/view/cellParts/cellFocusIndicator","vs/workbench/contrib/notebook/common/model/notebookTextModel","vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar","vs/workbench/contrib/bulkEdit/browser/conflicts","vs/workbench/contrib/bulkEdit/browser/preview/bulkEditTree","vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress","vs/workbench/contrib/notebook/browser/view/cellParts/cellProgressBar","vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon","vs/workbench/contrib/notebook/common/notebookOutputRenderer","vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController","vs/workbench/contrib/notebook/browser/viewModel/foldingModel","vs/workbench/contrib/notebook/browser/controller/apiActions","vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel","vs/workbench/contrib/notebook/browser/notebookExecutionStateServiceImpl","vs/workbench/contrib/notebook/browser/notebookKernelServiceImpl","vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl","vs/workbench/contrib/notebook/browser/contrib/find/findModel","vs/workbench/contrib/notebook/browser/contrib/viewportCustomMarkdown/viewportCustomMarkdown","vs/workbench/contrib/notebook/browser/diff/diffElementOutputs","vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput","vs/workbench/contrib/outline/browser/outlineViewState","vs/workbench/contrib/output/browser/outputLinkProvider","vs/workbench/contrib/output/common/outputChannelModel","vs/workbench/contrib/preferences/browser/settingsWidgets","vs/workbench/contrib/preferences/common/smartSnippetInserter","vs/workbench/contrib/remote/browser/urlFinder","vs/workbench/contrib/sash/browser/sash","vs/workbench/contrib/scm/browser/menus","vs/workbench/contrib/scm/browser/scmViewService","vs/workbench/contrib/scm/common/scmService","vs/workbench/contrib/search/common/cacheState","vs/workbench/contrib/snippets/browser/insertSnippet","vs/workbench/contrib/snippets/browser/surroundWithSnippet","vs/workbench/contrib/tags/common/javaWorkspaceTags","vs/workbench/contrib/extensions/browser/dynamicWorkspaceRecommendations","vs/workbench/contrib/debug/browser/debugTaskRunner","vs/workbench/contrib/tasks/common/taskTemplates","vs/workbench/contrib/terminal/browser/links/terminalExternalLinkDetector","vs/workbench/contrib/terminal/browser/links/terminalLink","vs/workbench/contrib/terminal/browser/links/terminalLinkDetectorAdapter","vs/workbench/contrib/terminal/browser/links/terminalUriLinkDetector","vs/workbench/contrib/terminal/browser/remotePty","vs/workbench/contrib/terminal/browser/links/terminalLinkQuickpick","vs/workbench/contrib/terminal/browser/terminalCommands","vs/workbench/contrib/terminal/browser/terminalEditorSerializer","vs/workbench/contrib/terminal/browser/terminalDecorationsProvider","vs/workbench/contrib/terminal/browser/widgets/widgetManager","vs/workbench/contrib/terminal/browser/xterm/lineDataEventAddon","vs/workbench/contrib/terminal/browser/xterm/navigationModeAddon","vs/workbench/contrib/terminal/browser/environmentVariableInfo","vs/workbench/contrib/terminal/common/environmentVariableCollection","vs/workbench/contrib/terminal/browser/links/terminalWordLinkDetector","vs/workbench/contrib/terminal/browser/terminalTypeAheadAddon","vs/workbench/contrib/debug/browser/debugANSIHandling","vs/workbench/contrib/terminal/browser/terminalProfileQuickpick","vs/workbench/contrib/terminal/browser/xterm/commandNavigationAddon","vs/workbench/contrib/terminal/common/terminalConfiguration","vs/workbench/contrib/terminal/browser/links/terminalShellIntegrationLinkDetector","vs/workbench/contrib/terminal/electron-sandbox/localPty","vs/workbench/contrib/testing/browser/explorerProjections/nodeHelper","vs/workbench/contrib/testing/common/mainThreadTestCollection","vs/workbench/contrib/testing/common/testCoverage","vs/workbench/contrib/testing/common/testExclusions","vs/workbench/contrib/testing/browser/testingConfigurationUi","vs/workbench/contrib/testing/browser/explorerProjections/hierarchalByName","vs/workbench/contrib/testing/browser/testingDecorations","vs/workbench/contrib/testing/common/testingContentProvider","vs/workbench/contrib/timeline/common/timelineService","vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree","vs/workbench/contrib/webview/browser/resourceLoading","vs/workbench/contrib/webview/browser/themeing","vs/workbench/contrib/webview/browser/overlayWebview","vs/workbench/contrib/webview/browser/webviewFindWidget","vs/workbench/contrib/webview/electron-sandbox/windowIgnoreMenuShortcutsManager","vs/workbench/contrib/webviewView/browser/webviewView.contribution","vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedColors","vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedList","vs/workbench/contrib/welcomeGettingStarted/common/media/notebookProfile","vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker","vs/workbench/contrib/welcomeWalkthrough/common/walkThroughUtils","vs/workbench/electron-sandbox/actions/installActions","vs/workbench/electron-sandbox/parts/dialogs/dialogHandler","vs/workbench/contrib/markers/browser/markers","vs/workbench/services/checksum/electron-sandbox/checksumService","vs/workbench/services/clipboard/electron-sandbox/clipboardService","vs/workbench/services/configuration/common/configurationCache","vs/workbench/services/configuration/browser/configuration","vs/workbench/services/contextmenu/electron-sandbox/contextmenuService","vs/workbench/services/credentials/electron-sandbox/credentialsService","vs/workbench/services/decorations/browser/decorationsService","vs/workbench/services/dialogs/common/dialogService","vs/workbench/contrib/terminal/browser/terminalMainContribution","vs/workbench/browser/parts/editor/editorsObserver","vs/workbench/contrib/audioCues/browser/audioCueLineFeatureContribution","vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek","vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution","vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess","vs/workbench/contrib/markers/browser/markersTreeViewer","vs/workbench/contrib/notebook/browser/contrib/find/findController","vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands","vs/workbench/contrib/notebook/browser/contrib/format/formatting","vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions","vs/workbench/contrib/notebook/browser/controller/executeActions","vs/workbench/contrib/notebook/browser/controller/insertCellActions","vs/workbench/contrib/notebook/browser/notebookExecutionServiceImpl","vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint","vs/workbench/contrib/notebook/browser/view/cellParts/markdownCell","vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar","vs/workbench/contrib/terminal/common/remoteTerminalChannel","vs/workbench/contrib/testing/common/testServiceImpl","vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek","vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution","vs/workbench/contrib/webview/browser/webview.contribution","vs/workbench/services/editor/browser/codeEditorService","vs/workbench/services/encryption/electron-sandbox/encryptionService","vs/workbench/contrib/url/browser/externalUriResolver","vs/workbench/contrib/debug/common/debugger","vs/workbench/contrib/logs/common/logsActions","vs/workbench/contrib/output/electron-sandbox/outputChannelModelService","vs/workbench/contrib/webview/browser/webviewService","vs/workbench/contrib/webview/electron-sandbox/webviewElement","vs/workbench/contrib/webview/electron-sandbox/webviewService","vs/workbench/contrib/welcomeWalkthrough/browser/editor/vs_code_editor_walkthrough","vs/workbench/contrib/welcomeWalkthrough/browser/editor/editorWalkThrough","vs/workbench/contrib/extensions/electron-sandbox/extensionsActions","vs/workbench/contrib/logs/electron-sandbox/logsActions","vs/workbench/services/extensionManagement/browser/builtinExtensionsScannerService","vs/workbench/contrib/extensions/browser/unsupportedExtensionsMigrationContribution","vs/workbench/contrib/extensions/browser/webRecommendations","vs/workbench/services/extensionManagement/electron-sandbox/extensionTipsService","vs/workbench/services/extensionManagement/electron-sandbox/extensionUrlTrustService","vs/workbench/contrib/extensions/browser/workspaceRecommendations","vs/workbench/services/extensionRecommendations/common/extensionIgnoredRecommendationsService","vs/workbench/services/extensionResourceLoader/electron-sandbox/extensionResourceLoaderService","vs/workbench/services/extensions/common/extensionStorageMigration","vs/workbench/browser/parts/editor/editorConfiguration","vs/workbench/contrib/configExporter/electron-sandbox/configurationExportHelper","vs/workbench/contrib/extensions/browser/extensionsActivationProgress","vs/workbench/contrib/extensions/electron-sandbox/debugExtensionHostAction","vs/workbench/contrib/externalUriOpener/common/contributedOpeners","vs/workbench/contrib/notebook/browser/notebookRendererMessagingServiceImpl","vs/workbench/contrib/notebook/browser/viewParts/notebookEditorWidgetContextKeys","vs/workbench/contrib/terminal/common/environmentVariableService","vs/workbench/contrib/terminal/common/environmentVariable.contribution","vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedDetailsRenderer","vs/workbench/contrib/welcomeViews/common/viewsWelcomeContribution","vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughActions","vs/workbench/services/commands/common/commandService","vs/workbench/services/editor/browser/editorResolverService","vs/workbench/api/common/configurationExtensionPoint","vs/workbench/api/common/jsonValidationExtensionPoint","vs/workbench/contrib/notebook/browser/extensionPoint","vs/workbench/contrib/tasks/common/jsonSchema_v1","vs/workbench/contrib/tasks/browser/taskTerminalStatus","vs/workbench/contrib/tasks/common/jsonSchema_v2","vs/workbench/contrib/tasks/browser/tasksQuickAccess","vs/workbench/contrib/tasks/common/taskConfiguration","vs/workbench/contrib/terminal/common/terminalExtensionPoints.contribution","vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedExtensionPoint","vs/workbench/services/extensions/common/lazyPromise","vs/workbench/api/browser/mainThreadClipboard","vs/workbench/api/browser/mainThreadCommands","vs/workbench/api/browser/mainThreadConfiguration","vs/workbench/api/browser/mainThreadDebugService","vs/workbench/api/browser/mainThreadDecorations","vs/workbench/api/browser/mainThreadDiagnostics","vs/workbench/api/browser/mainThreadDialogs","vs/workbench/api/browser/mainThreadDocumentContentProviders","vs/workbench/api/browser/mainThreadDownloadService","vs/workbench/api/browser/mainThreadErrors","vs/workbench/api/browser/mainThreadInteractive","vs/workbench/api/browser/mainThreadKeytar","vs/workbench/api/browser/mainThreadLabelService","vs/workbench/api/browser/mainThreadLanguageFeatures","vs/workbench/api/browser/mainThreadLogService","vs/workbench/api/browser/mainThreadMessageService","vs/workbench/api/browser/mainThreadNotebook","vs/workbench/api/browser/mainThreadNotebookEditors","vs/workbench/api/browser/mainThreadNotebookKernels","vs/workbench/api/browser/mainThreadNotebookRenderers","vs/workbench/api/browser/mainThreadProgress","vs/workbench/api/browser/mainThreadQuickOpen","vs/workbench/api/browser/mainThreadRemoteConnectionData","vs/workbench/api/browser/mainThreadSCM","vs/workbench/api/browser/mainThreadSecretState","vs/workbench/api/browser/mainThreadStorage","vs/workbench/api/browser/mainThreadTask","vs/workbench/api/browser/mainThreadTelemetry","vs/workbench/api/browser/mainThreadTesting","vs/workbench/api/browser/mainThreadTheming","vs/workbench/api/browser/mainThreadTimeline","vs/workbench/api/browser/mainThreadTreeViews","vs/workbench/api/browser/mainThreadCodeInsets","vs/workbench/api/browser/mainThreadWebviewViews","vs/workbench/api/browser/mainThreadConsole","vs/workbench/services/extensions/common/rpcProtocol","vs/workbench/services/extensions/electron-sandbox/extensionHostStarter","vs/workbench/api/browser/mainThreadFileSystem","vs/workbench/services/files/electron-sandbox/elevatedFileService","vs/workbench/services/files/electron-sandbox/watcherClient","vs/workbench/services/files/electron-sandbox/diskFileSystemProvider","vs/workbench/contrib/terminal/electron-sandbox/localTerminalBackend","vs/workbench/api/browser/mainThreadWindow","vs/workbench/contrib/codeEditor/browser/diffEditorHelper","vs/workbench/contrib/extensions/browser/extensionEnablementWorkspaceTrustTransitionParticipant","vs/workbench/contrib/extensions/browser/extensionsDependencyChecker","vs/workbench/contrib/files/browser/explorerService","vs/workbench/contrib/files/browser/workspaceWatcher","vs/workbench/services/extensions/electron-sandbox/cachedExtensionScanner","vs/workbench/services/host/electron-sandbox/nativeHostService","vs/workbench/contrib/terminal/browser/widgets/environmentVariableInfoWidget","vs/workbench/contrib/terminal/browser/widgets/terminalHoverWidget","vs/workbench/contrib/terminal/browser/xterm/decorationAddon","vs/workbench/contrib/terminal/browser/xterm/xtermTerminal","vs/workbench/services/hover/browser/hoverWidget","vs/workbench/services/hover/browser/hoverService","vs/workbench/services/keybinding/common/keybindingIO","vs/workbench/services/keybinding/browser/keybindingService","vs/workbench/services/keybinding/common/macLinuxFallbackKeyboardMapper","vs/workbench/services/keybinding/common/macLinuxKeyboardMapper","vs/workbench/services/keybinding/electron-sandbox/nativeKeyboardLayout","vs/workbench/contrib/codeActions/common/codeActionsExtensionPoint","vs/workbench/contrib/codeActions/common/documentationExtensionPoint","vs/workbench/contrib/customEditor/common/extensionPoint","vs/workbench/contrib/customEditor/common/contributedCustomEditors","vs/workbench/contrib/notebook/browser/notebookServiceImpl","vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars","vs/workbench/services/languageDetection/browser/languageDetectionWorkerServiceImpl","vs/workbench/api/browser/mainThreadLanguages","vs/workbench/browser/layoutState","vs/workbench/browser/parts/notifications/notificationsCenter","vs/workbench/browser/parts/notifications/notificationsToasts","vs/workbench/browser/actions/helpActions","vs/workbench/browser/parts/banner/bannerPart","vs/workbench/browser/actions/textInputActions","vs/workbench/contrib/codeActions/browser/codeActions.contribution","vs/workbench/contrib/codeEditor/browser/inspectKeybindings","vs/workbench/contrib/codeEditor/browser/toggleMinimap","vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier","vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter","vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace","vs/workbench/contrib/codeEditor/electron-sandbox/displayChangeRemeasureFonts","vs/workbench/contrib/codeEditor/electron-sandbox/selectionClipboard","vs/workbench/contrib/codeEditor/electron-sandbox/sleepResumeRepaintMinimap","vs/workbench/contrib/configExporter/electron-sandbox/configurationExportHelper.contribution","vs/workbench/contrib/contextmenu/browser/contextmenu.contribution","vs/workbench/contrib/debug/browser/debugAdapterManager","vs/workbench/contrib/debug/common/debugLifecycle","vs/workbench/contrib/extensions/electron-sandbox/extensionsAutoProfiler","vs/workbench/contrib/format/browser/formatActionsMultiple","vs/workbench/contrib/issue/electron-sandbox/issueActions","vs/workbench/contrib/issue/electron-sandbox/issue.contribution","vs/workbench/contrib/keybindings/browser/keybindings.contribution","vs/workbench/contrib/list/browser/list.contribution","vs/workbench/contrib/logs/common/logsDataCleaner","vs/workbench/contrib/logs/electron-sandbox/logs.contribution","vs/workbench/contrib/markers/browser/markersFileDecorations","vs/workbench/contrib/notebook/browser/contrib/breakpoints/notebookBreakpoints","vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders","vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard","vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted","vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider","vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile","vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout","vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo","vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl","vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart","vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl","vs/workbench/contrib/relauncher/browser/relauncher.contribution","vs/workbench/contrib/sash/browser/sash.contribution","vs/workbench/contrib/splash/browser/partsSplash","vs/workbench/contrib/splash/electron-sandbox/splash.contribution","vs/workbench/contrib/surveys/browser/ces.contribution","vs/workbench/contrib/surveys/browser/nps.contribution","vs/workbench/contrib/terminal/browser/terminalEditorService","vs/workbench/contrib/terminal/electron-sandbox/terminalRemote","vs/workbench/contrib/webview/electron-sandbox/webviewCommands","vs/workbench/contrib/webview/electron-sandbox/webview.contribution","vs/workbench/contrib/webviewPanel/browser/webviewCommands","vs/workbench/contrib/webviewPanel/browser/webviewIconManager","vs/workbench/api/browser/mainThreadWebviewPanels","vs/workbench/contrib/update/browser/releaseNotesEditor","vs/workbench/contrib/welcomeViews/common/newFile.contribution","vs/workbench/contrib/welcomeViews/common/viewsWelcome.contribution","vs/workbench/contrib/workspaces/browser/workspaces.contribution","vs/workbench/electron-sandbox/actions/developerActions","vs/workbench/electron-sandbox/actions/windowActions","vs/workbench/electron-sandbox/desktop.contribution","vs/workbench/electron-sandbox/parts/dialogs/dialog.contribution","vs/workbench/services/accessibility/electron-sandbox/accessibilityService","vs/workbench/services/extensionManagement/browser/extensionBisect","vs/workbench/api/browser/mainThreadUrls","vs/workbench/services/extensions/common/extensionHostManager","vs/workbench/services/integrity/electron-sandbox/integrityService","vs/workbench/services/lifecycle/common/lifecycleService","vs/workbench/services/lifecycle/electron-sandbox/lifecycleService","vs/workbench/services/localizations/electron-sandbox/localizationsService","vs/workbench/services/log/electron-sandbox/logService","vs/workbench/services/menubar/electron-sandbox/menubarService","vs/workbench/services/notification/common/notificationService","vs/workbench/browser/parts/editor/breadcrumbsModel","vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsOutline","vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline","vs/workbench/services/outline/browser/outlineService","vs/workbench/api/browser/mainThreadOutputService","vs/workbench/contrib/logs/common/logs.contribution","vs/workbench/contrib/output/browser/outputServices","vs/workbench/services/extensions/browser/webWorkerExtensionHost","vs/workbench/services/extensions/common/remoteExtensionHost","vs/workbench/browser/actions/navigationActions","vs/workbench/browser/parts/sidebar/sidebarActions","vs/workbench/contrib/extensions/browser/extensionsQuickAccess","vs/workbench/contrib/extensions/browser/fileBasedRecommendations","vs/workbench/contrib/format/browser/formatActionsNone","vs/workbench/contrib/localizations/browser/localizationsActions","vs/workbench/contrib/localizations/browser/localizations.contribution","vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput","vs/workbench/contrib/notebook/browser/view/cellParts/codeCell","vs/workbench/contrib/quickaccess/browser/viewQuickAccess","vs/workbench/services/activity/browser/activityService","vs/workbench/browser/parts/titlebar/titlebarPart","vs/workbench/contrib/audioCues/browser/commands","vs/workbench/contrib/audioCues/browser/audioCues.contribution","vs/workbench/api/browser/mainThreadUriOpeners","vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution","vs/workbench/contrib/notebook/browser/controller/layoutActions","vs/workbench/contrib/preferences/browser/preferencesActions","vs/workbench/contrib/preferences/browser/keybindingsEditorContribution","vs/workbench/contrib/quickaccess/browser/quickAccess.contribution","vs/workbench/contrib/welcomeOverlay/browser/welcomeOverlay","vs/workbench/electron-sandbox/parts/titlebar/menubarControl","vs/workbench/electron-sandbox/parts/titlebar/titlebarPart","vs/workbench/contrib/userDataSync/browser/userDataSyncTrigger","vs/workbench/contrib/preferences/browser/tocTree","vs/workbench/contrib/preferences/browser/preferencesRenderers","vs/workbench/contrib/preferences/browser/preferencesEditor","vs/workbench/contrib/preferences/browser/preferencesSearch","vs/workbench/contrib/outline/browser/outlinePane","vs/workbench/contrib/scm/browser/scmRepositoriesViewPane","vs/workbench/contrib/testing/browser/testExplorerActions","vs/workbench/contrib/webviewView/browser/webviewViewPane","vs/workbench/services/quickinput/browser/quickInputService","vs/workbench/services/remote/common/remoteAgentEnvironmentChannel","vs/workbench/services/remote/common/abstractRemoteAgentService","vs/workbench/api/browser/mainThreadTerminalService","vs/workbench/contrib/remote/common/remote.contribution","vs/workbench/contrib/terminal/browser/remoteTerminalBackend","vs/workbench/contrib/terminal/browser/terminalProfileResolverService","vs/workbench/contrib/terminal/electron-sandbox/terminalNativeContribution","vs/workbench/contrib/terminal/electron-sandbox/terminalProfileResolverService","vs/workbench/contrib/terminal/electron-sandbox/terminal.contribution","vs/workbench/api/browser/mainThreadAuthentication","vs/workbench/contrib/debug/browser/exceptionWidget","vs/workbench/contrib/terminal/browser/terminalProcessManager","vs/workbench/services/configurationResolver/browser/configurationResolverService","vs/workbench/services/configurationResolver/electron-sandbox/configurationResolverService","vs/workbench/contrib/remote/electron-sandbox/remote.contribution","vs/workbench/services/dialogs/browser/abstractFileDialogService","vs/workbench/services/dialogs/electron-sandbox/fileDialogService","vs/workbench/services/label/common/labelService","vs/workbench/services/model/common/modelService","vs/workbench/services/path/electron-sandbox/pathService","vs/workbench/api/browser/mainThreadTunnelService","vs/workbench/contrib/remote/browser/showCandidate","vs/workbench/contrib/remote/browser/tunnelFactory","vs/workbench/contrib/remote/browser/tunnelView","vs/workbench/services/remote/common/remoteFileSystemProviderClient","vs/workbench/services/remote/electron-sandbox/remoteAgentService","vs/workbench/services/request/electron-sandbox/requestService","vs/workbench/services/search/common/replace","vs/workbench/api/browser/mainThreadSearch","vs/workbench/services/history/browser/historyService","vs/workbench/contrib/terminal/browser/links/terminalLinkOpeners","vs/workbench/contrib/terminal/browser/links/terminalLinkManager","vs/workbench/services/search/common/searchService","vs/workbench/services/search/electron-sandbox/searchService","vs/workbench/services/sharedProcess/electron-sandbox/sharedProcessService","vs/workbench/services/sharedProcess/electron-sandbox/sharedProcessWorkerWorkbenchService","vs/workbench/api/browser/mainThreadStatusBar","vs/workbench/browser/parts/notifications/notificationsStatus","vs/workbench/browser/parts/statusbar/statusbarActions","vs/workbench/browser/parts/statusbar/statusbarItem","vs/workbench/browser/parts/statusbar/statusbarModel","vs/workbench/contrib/debug/browser/debugStatus","vs/workbench/contrib/debug/browser/statusbarColorProvider","vs/workbench/contrib/extensions/electron-sandbox/extensionProfileService","vs/workbench/contrib/feedback/browser/feedback","vs/workbench/contrib/feedback/browser/feedbackStatusbarItem","vs/workbench/contrib/feedback/browser/feedback.contribution","vs/workbench/contrib/languageStatus/browser/languageStatus.contribution","vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar","vs/workbench/contrib/remote/browser/remoteIndicator","vs/workbench/contrib/scm/browser/activity","vs/workbench/services/progress/browser/progressService","vs/workbench/services/telemetry/electron-sandbox/workbenchCommonProperties","vs/workbench/services/telemetry/electron-sandbox/telemetryService","vs/workbench/contrib/codeEditor/browser/languageConfigurationExtensionPoint","vs/workbench/contrib/codeEditor/electron-sandbox/startDebugTextMate","vs/workbench/contrib/codeEditor/electron-sandbox/codeEditor.contribution","vs/workbench/contrib/emmet/browser/emmetActions","vs/workbench/contrib/emmet/browser/actions/expandAbbreviation","vs/workbench/contrib/emmet/browser/emmet.contribution","vs/workbench/services/textMate/common/TMScopeRegistry","vs/workbench/services/textMate/common/TMGrammarFactory","vs/workbench/services/textMate/common/TMTokenization","vs/workbench/services/textfile/common/textFileSaveParticipant","vs/workbench/api/browser/mainThreadSaveParticipant","vs/workbench/browser/parts/editor/breadcrumbsPicker","vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPane","vs/workbench/contrib/customEditor/common/customTextEditorModel","vs/workbench/contrib/debug/browser/debugConfigurationManager","vs/workbench/contrib/debug/browser/debugEditorActions","vs/workbench/contrib/debug/browser/debugQuickAccess","vs/workbench/contrib/debug/browser/debugToolBar","vs/workbench/contrib/debug/browser/disassemblyView","vs/workbench/contrib/debug/common/debugStorage","vs/workbench/contrib/debug/browser/callStackView","vs/workbench/contrib/debug/browser/debugSession","vs/workbench/contrib/debug/browser/loadedScriptsView","vs/workbench/contrib/debug/browser/replFilter","vs/workbench/contrib/debug/browser/replViewer","vs/workbench/contrib/debug/browser/debugHover","vs/workbench/contrib/debug/browser/watchExpressionsView","vs/workbench/contrib/experiments/browser/experimentalPrompt","vs/workbench/contrib/experiments/browser/experiments.contribution","vs/workbench/contrib/extensions/browser/experimentalRecommendations","vs/workbench/contrib/extensions/browser/extensionRecommendationsService","vs/workbench/contrib/debug/browser/debugService","vs/workbench/contrib/files/browser/editors/binaryFileEditor","vs/workbench/contrib/externalTerminal/browser/externalTerminal.contribution","vs/workbench/contrib/codeEditor/browser/saveParticipants","vs/workbench/contrib/format/browser/format.contribution","vs/workbench/contrib/search/browser/replaceService","vs/workbench/contrib/search/browser/replaceContributions","vs/workbench/contrib/snippets/browser/configureSnippets","vs/workbench/contrib/comments/browser/commentNode","vs/workbench/contrib/comments/browser/commentThreadBody","vs/workbench/contrib/comments/browser/commentThreadZoneWidget","vs/workbench/contrib/comments/browser/comments.contribution","vs/workbench/contrib/comments/browser/commentsView","vs/workbench/contrib/debug/browser/breakpointWidget","vs/workbench/contrib/notebook/browser/diff/diffComponents","vs/workbench/contrib/notebook/browser/diff/notebookTextDiffList","vs/workbench/contrib/notebook/browser/view/cellParts/cellComments","vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer","vs/workbench/contrib/interactive/browser/interactiveEditor","vs/workbench/contrib/notebook/browser/diff/notebookDiffActions","vs/workbench/contrib/notebook/browser/notebookEditorServiceImpl","vs/workbench/contrib/surveys/browser/languageSurveys.contribution","vs/workbench/contrib/tags/electron-sandbox/tags.contribution","vs/workbench/contrib/tags/electron-sandbox/workspaceTagsService","vs/workbench/contrib/tasks/browser/task.contribution","vs/workbench/contrib/tasks/electron-sandbox/taskService","vs/workbench/contrib/testing/browser/testingExplorerFilter","vs/workbench/contrib/testing/browser/testingExplorerView","vs/workbench/contrib/testing/browser/testingOutputPeek","vs/workbench/contrib/url/browser/trustedDomainsFileSystemProvider","vs/workbench/contrib/url/browser/trustedDomainsValidator","vs/workbench/contrib/url/browser/url.contribution","vs/workbench/services/configuration/common/configurationEditingService","vs/workbench/services/configuration/browser/configurationService","vs/workbench/contrib/preferences/browser/keybindingsEditor","vs/workbench/services/textresourceProperties/common/textResourcePropertiesService","vs/workbench/services/themes/common/colorExtensionPoint","vs/workbench/services/themes/common/iconExtensionPoint","vs/workbench/services/themes/common/plistParser","vs/workbench/services/themes/common/fileIconThemeSchema","vs/workbench/services/themes/common/textMateScopeMatcher","vs/workbench/services/themes/common/themeCompatibility","vs/workbench/services/themes/common/tokenClassificationExtensionPoint","vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens","vs/workbench/contrib/telemetry/browser/telemetry.contribution","vs/workbench/contrib/themes/browser/themes.test.contribution","vs/workbench/services/textMate/browser/abstractTextMateService","vs/workbench/services/textMate/browser/nativeTextMateService","vs/workbench/services/themes/common/colorThemeData","vs/workbench/contrib/themes/browser/themes.contribution","vs/workbench/services/themes/common/themeExtensionPoints","vs/workbench/services/themes/electron-sandbox/nativeHostColorSchemeService","vs/workbench/api/browser/mainThreadExtensionService","vs/workbench/contrib/performance/browser/performance.contribution","vs/workbench/contrib/performance/electron-sandbox/startupProfiler","vs/workbench/contrib/performance/electron-sandbox/startupTimings","vs/workbench/contrib/performance/electron-sandbox/performance.contribution","vs/workbench/contrib/debug/browser/debugTitle","vs/workbench/services/title/electron-sandbox/titleService","vs/workbench/services/tunnel/electron-sandbox/tunnelService","vs/workbench/contrib/codeEditor/browser/untitledTextEditorHint","vs/workbench/contrib/codeEditor/browser/codeEditor.contribution","vs/workbench/services/update/electron-sandbox/updateService","vs/workbench/services/url/electron-sandbox/urlService","vs/workbench/services/userDataSync/browser/userDataSyncEnablementService","vs/workbench/contrib/preferences/browser/settingsEditor2","vs/workbench/contrib/update/browser/update","vs/workbench/contrib/update/browser/update.contribution","vs/workbench/contrib/userDataSync/electron-sandbox/userDataSync.contribution","vs/workbench/services/themes/browser/workbenchThemeService","vs/workbench/services/userDataSync/browser/userDataSyncWorkbenchService","vs/workbench/services/userDataSync/common/userDataSyncUtil","vs/workbench/services/userDataSync/electron-sandbox/userDataAutoSyncService","vs/workbench/services/userDataSync/electron-sandbox/userDataSyncAccountService","vs/workbench/services/userDataSync/electron-sandbox/userDataSyncMachinesService","vs/workbench/services/userDataSync/electron-sandbox/userDataSyncService","vs/workbench/services/userDataSync/electron-sandbox/userDataSyncStoreManagementService","vs/workbench/services/views/common/treeViewsService","vs/workbench/services/views/common/viewContainerModel","vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant","vs/workbench/contrib/searchEditor/browser/searchEditorModel","vs/workbench/services/workingCopy/common/workingCopyBackupTracker","vs/workbench/contrib/files/browser/editors/textFileEditorTracker","vs/workbench/services/workingCopy/common/workingCopyFileOperationParticipant","vs/workbench/browser/actions/developerActions","vs/workbench/browser/contextkeys","vs/workbench/browser/parts/editor/editorAutoSave","vs/workbench/browser/parts/editor/editorPlaceholder","vs/workbench/browser/parts/editor/editorPanes","vs/workbench/contrib/files/browser/editors/textFileEditor","vs/workbench/contrib/files/common/dirtyFilesIndicator","vs/workbench/contrib/files/electron-sandbox/textFileEditor","vs/workbench/contrib/files/electron-sandbox/files.contribution","vs/workbench/contrib/interactive/browser/interactive.contribution","vs/workbench/contrib/localHistory/browser/localHistoryTimeline","vs/workbench/contrib/localHistory/browser/localHistory.contribution","vs/workbench/contrib/localHistory/electron-sandbox/localHistoryCommands","vs/workbench/contrib/localHistory/electron-sandbox/localHistory.contribution","vs/workbench/contrib/output/browser/logViewer","vs/workbench/contrib/scm/browser/scmViewPane","vs/workbench/contrib/search/browser/anythingQuickAccess","vs/workbench/contrib/search/browser/searchResultsView","vs/workbench/contrib/searchEditor/browser/searchEditor","vs/workbench/contrib/searchEditor/browser/searchEditor.contribution","vs/workbench/contrib/timeline/browser/timelinePane","vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution","vs/workbench/contrib/welcomeWalkthrough/browser/walkThrough.contribution","vs/workbench/services/textmodelResolver/common/textModelResolverService","vs/workbench/api/browser/mainThreadEditorTabs","vs/workbench/contrib/customEditor/browser/customEditorInputFactory","vs/workbench/contrib/customEditor/browser/customEditors","vs/workbench/contrib/customEditor/browser/customEditor.contribution","vs/workbench/contrib/notebook/common/notebookEditorModel","vs/workbench/contrib/files/browser/editors/fileEditorHandler","vs/workbench/contrib/preferences/common/preferencesContribution","vs/workbench/services/editor/browser/editorService","vs/workbench/services/preferences/browser/preferencesService","vs/workbench/services/untitled/common/untitledTextEditorHandler","vs/workbench/browser/parts/editor/editor.contribution","vs/workbench/services/workingCopy/common/untitledFileWorkingCopyManager","vs/workbench/api/browser/mainThreadCustomEditors","vs/workbench/api/browser/mainThreadNotebookDocuments","vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors","vs/workbench/api/browser/mainThreadWebviewManager","vs/workbench/contrib/bulkEdit/browser/bulkFileEdits","vs/workbench/contrib/bulkEdit/browser/bulkEditService","vs/workbench/services/textfile/common/textFileEditorModelManager","vs/workbench/services/textfile/browser/textFileService","vs/workbench/services/textfile/electron-sandbox/nativeTextFileService","vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager","vs/workbench/services/workingCopy/common/fileWorkingCopyManager","vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl","vs/workbench/contrib/notebook/browser/notebook.contribution","vs/workbench/services/workingCopy/common/workingCopyHistoryTracker","vs/workbench/services/workingCopy/common/workingCopyHistoryService","vs/workbench/services/workingCopy/electron-sandbox/workingCopyBackupTracker","vs/workbench/services/workingCopy/electron-sandbox/workingCopyBackupService","vs/workbench/services/workingCopy/electron-sandbox/workingCopyHistoryService","vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService","vs/workbench/services/workspaces/browser/workspaceTrustEditorInput","vs/workbench/api/browser/mainThreadWorkspace","vs/workbench/api/browser/mainThreadBulkEdits","vs/workbench/api/browser/mainThreadDocumentsAndEditors","vs/workbench/api/browser/mainThreadFileSystemEventService","vs/workbench/browser/parts/activitybar/activitybarActions","vs/workbench/browser/parts/editor/editorDropTarget","vs/workbench/browser/parts/editor/noTabsTitleControl","vs/workbench/browser/parts/editor/tabsTitleControl","vs/workbench/browser/parts/editor/editorGroupView","vs/workbench/browser/parts/editor/editorPart","vs/workbench/browser/parts/activitybar/activitybarPart","vs/workbench/browser/parts/statusbar/statusbarPart","vs/workbench/api/browser/mainThreadComments","vs/workbench/browser/layout","vs/workbench/browser/parts/paneCompositePart","vs/workbench/browser/workbench","vs/workbench/contrib/bulkEdit/browser/preview/bulkEdit.contribution","vs/workbench/contrib/debug/browser/debug.contribution","vs/workbench/contrib/files/browser/fileCommands","vs/workbench/contrib/files/browser/views/emptyView","vs/workbench/contrib/files/browser/views/explorerDecorationsProvider","vs/workbench/contrib/files/browser/views/explorerView","vs/workbench/contrib/files/browser/views/openEditorsView","vs/workbench/contrib/files/browser/files.contribution","vs/workbench/contrib/files/electron-sandbox/fileActions.contribution","vs/workbench/contrib/markers/browser/markersView","vs/workbench/contrib/markers/browser/markers.contribution","vs/workbench/contrib/outline/browser/outline.contribution","vs/workbench/contrib/output/browser/output.contribution","vs/workbench/contrib/preferences/browser/preferences.contribution","vs/workbench/api/browser/viewsExtensionPoint","vs/workbench/contrib/remote/browser/explorerViewItems","vs/workbench/contrib/remote/browser/remote","vs/workbench/contrib/remote/browser/remote.contribution","vs/workbench/contrib/scm/browser/scmViewPaneContainer","vs/workbench/contrib/scm/browser/scm.contribution","vs/workbench/contrib/search/browser/search.contribution","vs/workbench/contrib/terminal/browser/terminalGroup","vs/workbench/contrib/terminal/browser/terminalGroupService","vs/workbench/contrib/terminal/browser/terminalInstance","vs/workbench/contrib/terminal/browser/terminalProfileService","vs/workbench/contrib/terminal/browser/terminalTabsList","vs/workbench/contrib/terminal/browser/terminalTabbedView","vs/workbench/contrib/testing/browser/testingViewPaneContainer","vs/workbench/contrib/testing/browser/testing.contribution","vs/workbench/contrib/timeline/browser/timeline.contribution","vs/workbench/contrib/userDataSync/browser/userDataSyncMergesView","vs/workbench/contrib/userDataSync/browser/userDataSyncViews","vs/workbench/contrib/userDataSync/browser/userDataSync","vs/workbench/contrib/userDataSync/browser/userDataSync.contribution","vs/workbench/contrib/watermark/browser/watermark","vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted","vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution","vs/workbench/electron-sandbox/window","vs/workbench/services/views/browser/viewDescriptorService","vs/workbench/electron-sandbox/desktop.main","vs/workbench/api/browser/mainThreadCLICommands","vs/workbench/api/browser/extensionHost.contribution","vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService","vs/workbench/contrib/extensions/browser/extensionsViewer","vs/workbench/contrib/extensions/browser/extensionsViews","vs/workbench/contrib/extensions/browser/extensionsWorkbenchService","vs/workbench/contrib/extensions/browser/extensions.contribution","vs/workbench/contrib/extensions/electron-sandbox/remoteExtensionsInit","vs/workbench/contrib/extensions/electron-sandbox/extensions.contribution","vs/workbench/contrib/terminal/browser/terminalInstanceService","vs/workbench/contrib/terminal/browser/terminalService","vs/workbench/contrib/terminal/browser/terminal.contribution","vs/workbench/contrib/workspace/browser/workspaceTrustEditor","vs/workbench/contrib/workspace/browser/workspace.contribution","vs/workbench/services/extensionManagement/browser/extensionEnablementService","vs/workbench/services/extensionManagement/browser/webExtensionsScannerService","vs/workbench/services/extensionManagement/common/extensionManagementService","vs/workbench/services/extensionManagement/electron-sandbox/extensionManagementService","vs/workbench/services/extensionManagement/electron-sandbox/remoteExtensionManagementService","vs/workbench/services/extensionManagement/electron-sandbox/extensionManagementServerService","vs/workbench/services/extensions/common/abstractExtensionService","vs/workbench/services/workspaces/electron-sandbox/workspaceEditingService","vs/workbench/services/workspaces/electron-sandbox/workspacesService","vs/workbench/workbench.common.main","vs/workbench/workbench.sandbox.main","vs/base/parts/ipc/node/ipc.net","vs/workbench/services/extensions/electron-browser/localProcessExtensionHost","vs/workbench/services/extensions/electron-browser/extensionService","string_decoder","fs","util","child_process","crypto","zlib","vs/workbench/workbench.desktop.main"],re=function(Q){for(var e=[],t=0,f=Q.length;t<f;t++)e[t]=ne[Q[t]];return e};/*! @license DOMPurify 2.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.1/LICENSE */function Bl(Q){if(Array.isArray(Q)){for(var e=0,t=Array(Q.length);e<Q.length;e++)t[e]=Q[e];return t}else return Array.from(Q)}var Wl=Object.hasOwnProperty,Ls=Object.setPrototypeOf,Vl=Object.isFrozen,zl=Object.getPrototypeOf,Ul=Object.getOwnPropertyDescriptor,qt=Object.freeze,oi=Object.seal,Hl=Object.create,Ms=typeof Reflect!="undefined"&&Reflect,Dn=Ms.apply,cr=Ms.construct;Dn||(Dn=function(e,t,f){return e.apply(t,f)}),qt||(qt=function(e){return e}),oi||(oi=function(e){return e}),cr||(cr=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(Bl(t))))});var Kl=Zt(Array.prototype.forEach),Ps=Zt(Array.prototype.pop),en=Zt(Array.prototype.push),wi=Zt(String.prototype.toLowerCase),Os=Zt(String.prototype.match),gi=Zt(String.prototype.replace),Gl=Zt(String.prototype.indexOf),$l=Zt(String.prototype.trim),ai=Zt(RegExp.prototype.test),Ns=ql(TypeError);function Zt(Q){return function(e){for(var t=arguments.length,f=Array(t>1?t-1:0),_=1;_<t;_++)f[_-1]=arguments[_];return Dn(Q,e,f)}}function ql(Q){return function(){for(var e=arguments.length,t=Array(e),f=0;f<e;f++)t[f]=arguments[f];return cr(Q,t)}}function xt(Q,e){Ls&&Ls(Q,null);for(var t=e.length;t--;){var f=e[t];if(typeof f=="string"){var _=wi(f);_!==f&&(Vl(e)||(e[t]=_),f=_)}Q[f]=!0}return Q}function Ei(Q){var e=Hl(null),t=void 0;for(t in Q)Dn(Wl,Q,[t])&&(e[t]=Q[t]);return e}function Tn(Q,e){for(;Q!==null;){var t=Ul(Q,e);if(t){if(t.get)return Zt(t.get);if(typeof t.value=="function")return Zt(t.value)}Q=zl(Q)}function f(_){return console.warn("fallback value for",_),null}return f}var xs=qt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),dr=qt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ur=qt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),jl=qt(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),hr=qt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),Yl=qt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Fs=qt(["#text"]),Bs=qt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),gr=qt(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ws=qt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),kn=qt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Xl=oi(/\{\{[\s\S]*|[\s\S]*\}\}/gm),Ql=oi(/<%[\s\S]*|[\s\S]*%>/gm),Jl=oi(/^data-[\-\w.\u00B7-\uFFFF]/),Zl=oi(/^aria-[\-\w]+$/),ec=oi(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),tc=oi(/^(?:\w+script|data):/i),ic=oi(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),tn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Q){return typeof Q}:function(Q){return Q&&typeof Symbol=="function"&&Q.constructor===Symbol&&Q!==Symbol.prototype?"symbol":typeof Q};function ei(Q){if(Array.isArray(Q)){for(var e=0,t=Array(Q.length);e<Q.length;e++)t[e]=Q[e];return t}else return Array.from(Q)}var nc=function(){return typeof window=="undefined"?null:window},rc=function(e,t){if((typeof e=="undefined"?"undefined":tn(e))!=="object"||typeof e.createPolicy!="function")return null;var f=null,_="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(_)&&(f=t.currentScript.getAttribute(_));var A="dompurify"+(f?"#"+f:"");try{return e.createPolicy(A,{createHTML:function(D){return D}})}catch{return console.warn("TrustedTypes policy "+A+" could not be created."),null}};function Vs(){var Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:nc(),e=function(Fe){return Vs(Fe)};if(e.version="2.3.1",e.removed=[],!Q||!Q.document||Q.document.nodeType!==9)return e.isSupported=!1,e;var t=Q.document,f=Q.document,_=Q.DocumentFragment,A=Q.HTMLTemplateElement,k=Q.Node,D=Q.Element,I=Q.NodeFilter,w=Q.NamedNodeMap,v=w===void 0?Q.NamedNodeMap||Q.MozNamedAttrMap:w,C=Q.Text,o=Q.Comment,c=Q.DOMParser,i=Q.trustedTypes,S=D.prototype,s=Tn(S,"cloneNode"),l=Tn(S,"nextSibling"),r=Tn(S,"childNodes"),p=Tn(S,"parentNode");if(typeof A=="function"){var u=f.createElement("template");u.content&&u.content.ownerDocument&&(f=u.content.ownerDocument)}var a=rc(i,t),n=a&&te?a.createHTML(""):"",h=f,g=h.implementation,d=h.createNodeIterator,m=h.createDocumentFragment,b=h.getElementsByTagName,E=t.importNode,y={};try{y=Ei(f).documentMode?f.documentMode:{}}catch{}var T={};e.isSupported=typeof p=="function"&&g&&typeof g.createHTMLDocument!="undefined"&&y!==9;var R=Xl,O=Ql,x=Jl,F=Zl,L=tc,M=ic,N=ec,B=null,P=xt({},[].concat(ei(xs),ei(dr),ei(ur),ei(hr),ei(Fs))),V=null,z=xt({},[].concat(ei(Bs),ei(gr),ei(Ws),ei(kn))),U=null,H=null,K=!0,G=!0,q=!1,Z=!1,j=!1,X=!1,Y=!1,$=!1,J=!1,ee=!0,te=!1,se=!0,ie=!0,ce=!1,le={},ae=null,ue=xt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),oe=null,fe=xt({},["audio","video","img","source","image","track"]),pe=null,me=xt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),be="http://www.w3.org/1998/Math/MathML",Ce="http://www.w3.org/2000/svg",ve="http://www.w3.org/1999/xhtml",he=ve,ge=!1,de=null,Se=f.createElement("form"),we=function(Fe){de&&de===Fe||((!Fe||(typeof Fe=="undefined"?"undefined":tn(Fe))!=="object")&&(Fe={}),Fe=Ei(Fe),B="ALLOWED_TAGS"in Fe?xt({},Fe.ALLOWED_TAGS):P,V="ALLOWED_ATTR"in Fe?xt({},Fe.ALLOWED_ATTR):z,pe="ADD_URI_SAFE_ATTR"in Fe?xt(Ei(me),Fe.ADD_URI_SAFE_ATTR):me,oe="ADD_DATA_URI_TAGS"in Fe?xt(Ei(fe),Fe.ADD_DATA_URI_TAGS):fe,ae="FORBID_CONTENTS"in Fe?xt({},Fe.FORBID_CONTENTS):ue,U="FORBID_TAGS"in Fe?xt({},Fe.FORBID_TAGS):{},H="FORBID_ATTR"in Fe?xt({},Fe.FORBID_ATTR):{},le="USE_PROFILES"in Fe?Fe.USE_PROFILES:!1,K=Fe.ALLOW_ARIA_ATTR!==!1,G=Fe.ALLOW_DATA_ATTR!==!1,q=Fe.ALLOW_UNKNOWN_PROTOCOLS||!1,Z=Fe.SAFE_FOR_TEMPLATES||!1,j=Fe.WHOLE_DOCUMENT||!1,$=Fe.RETURN_DOM||!1,J=Fe.RETURN_DOM_FRAGMENT||!1,ee=Fe.RETURN_DOM_IMPORT!==!1,te=Fe.RETURN_TRUSTED_TYPE||!1,Y=Fe.FORCE_BODY||!1,se=Fe.SANITIZE_DOM!==!1,ie=Fe.KEEP_CONTENT!==!1,ce=Fe.IN_PLACE||!1,N=Fe.ALLOWED_URI_REGEXP||N,he=Fe.NAMESPACE||ve,Z&&(G=!1),J&&($=!0),le&&(B=xt({},[].concat(ei(Fs))),V=[],le.html===!0&&(xt(B,xs),xt(V,Bs)),le.svg===!0&&(xt(B,dr),xt(V,gr),xt(V,kn)),le.svgFilters===!0&&(xt(B,ur),xt(V,gr),xt(V,kn)),le.mathMl===!0&&(xt(B,hr),xt(V,Ws),xt(V,kn))),Fe.ADD_TAGS&&(B===P&&(B=Ei(B)),xt(B,Fe.ADD_TAGS)),Fe.ADD_ATTR&&(V===z&&(V=Ei(V)),xt(V,Fe.ADD_ATTR)),Fe.ADD_URI_SAFE_ATTR&&xt(pe,Fe.ADD_URI_SAFE_ATTR),Fe.FORBID_CONTENTS&&(ae===ue&&(ae=Ei(ae)),xt(ae,Fe.FORBID_CONTENTS)),ie&&(B["#text"]=!0),j&&xt(B,["html","head","body"]),B.table&&(xt(B,["tbody"]),delete U.tbody),qt&&qt(Fe),de=Fe)},ye=xt({},["mi","mo","mn","ms","mtext"]),ke=xt({},["foreignobject","desc","title","annotation-xml"]),Ie=xt({},dr);xt(Ie,ur),xt(Ie,jl);var Te=xt({},hr);xt(Te,Yl);var De=function(Fe){var Qe=p(Fe);(!Qe||!Qe.tagName)&&(Qe={namespaceURI:ve,tagName:"template"});var qe=wi(Fe.tagName),Be=wi(Qe.tagName);if(Fe.namespaceURI===Ce)return Qe.namespaceURI===ve?qe==="svg":Qe.namespaceURI===be?qe==="svg"&&(Be==="annotation-xml"||ye[Be]):Boolean(Ie[qe]);if(Fe.namespaceURI===be)return Qe.namespaceURI===ve?qe==="math":Qe.namespaceURI===Ce?qe==="math"&&ke[Be]:Boolean(Te[qe]);if(Fe.namespaceURI===ve){if(Qe.namespaceURI===Ce&&!ke[Be]||Qe.namespaceURI===be&&!ye[Be])return!1;var Ke=xt({},["title","style","font","a","script"]);return!Te[qe]&&(Ke[qe]||!Ie[qe])}return!1},_e=function(Fe){en(e.removed,{element:Fe});try{Fe.parentNode.removeChild(Fe)}catch{try{Fe.outerHTML=n}catch{Fe.remove()}}},Re=function(Fe,Qe){try{en(e.removed,{attribute:Qe.getAttributeNode(Fe),from:Qe})}catch{en(e.removed,{attribute:null,from:Qe})}if(Qe.removeAttribute(Fe),Fe==="is"&&!V[Fe])if($||J)try{_e(Qe)}catch{}else try{Qe.setAttribute(Fe,"")}catch{}},Ne=function(Fe){var Qe=void 0,qe=void 0;if(Y)Fe="<remove></remove>"+Fe;else{var Be=Os(Fe,/^[\r\n\t ]+/);qe=Be&&Be[0]}var Ke=a?a.createHTML(Fe):Fe;if(he===ve)try{Qe=new c().parseFromString(Ke,"text/html")}catch{}if(!Qe||!Qe.documentElement){Qe=g.createDocument(he,"template",null);try{Qe.documentElement.innerHTML=ge?"":Ke}catch{}}var Xe=Qe.body||Qe.documentElement;return Fe&&qe&&Xe.insertBefore(f.createTextNode(qe),Xe.childNodes[0]||null),he===ve?b.call(Qe,j?"html":"body")[0]:j?Qe.documentElement:Xe},xe=function(Fe){return d.call(Fe.ownerDocument||Fe,Fe,I.SHOW_ELEMENT|I.SHOW_COMMENT|I.SHOW_TEXT,null,!1)},Ae=function(Fe){return Fe instanceof C||Fe instanceof o?!1:typeof Fe.nodeName!="string"||typeof Fe.textContent!="string"||typeof Fe.removeChild!="function"||!(Fe.attributes instanceof v)||typeof Fe.removeAttribute!="function"||typeof Fe.setAttribute!="function"||typeof Fe.namespaceURI!="string"||typeof Fe.insertBefore!="function"},Le=function(Fe){return(typeof k=="undefined"?"undefined":tn(k))==="object"?Fe instanceof k:Fe&&(typeof Fe=="undefined"?"undefined":tn(Fe))==="object"&&typeof Fe.nodeType=="number"&&typeof Fe.nodeName=="string"},Me=function(Fe,Qe,qe){!T[Fe]||Kl(T[Fe],function(Be){Be.call(e,Qe,qe,de)})},We=function(Fe){var Qe=void 0;if(Me("beforeSanitizeElements",Fe,null),Ae(Fe)||Os(Fe.nodeName,/[\u0080-\uFFFF]/))return _e(Fe),!0;var qe=wi(Fe.nodeName);if(Me("uponSanitizeElement",Fe,{tagName:qe,allowedTags:B}),!Le(Fe.firstElementChild)&&(!Le(Fe.content)||!Le(Fe.content.firstElementChild))&&ai(/<[/\w]/g,Fe.innerHTML)&&ai(/<[/\w]/g,Fe.textContent)||qe==="select"&&ai(/<template/i,Fe.innerHTML))return _e(Fe),!0;if(!B[qe]||U[qe]){if(ie&&!ae[qe]){var Be=p(Fe)||Fe.parentNode,Ke=r(Fe)||Fe.childNodes;if(Ke&&Be)for(var Xe=Ke.length,rt=Xe-1;rt>=0;--rt)Be.insertBefore(s(Ke[rt],!0),l(Fe))}return _e(Fe),!0}return Fe instanceof D&&!De(Fe)||(qe==="noscript"||qe==="noembed")&&ai(/<\/no(script|embed)/i,Fe.innerHTML)?(_e(Fe),!0):(Z&&Fe.nodeType===3&&(Qe=Fe.textContent,Qe=gi(Qe,R," "),Qe=gi(Qe,O," "),Fe.textContent!==Qe&&(en(e.removed,{element:Fe.cloneNode()}),Fe.textContent=Qe)),Me("afterSanitizeElements",Fe,null),!1)},Ve=function(Fe,Qe,qe){if(se&&(Qe==="id"||Qe==="name")&&(qe in f||qe in Se))return!1;if(!(G&&!H[Qe]&&ai(x,Qe))){if(!(K&&ai(F,Qe))){if(!V[Qe]||H[Qe])return!1;if(!pe[Qe]){if(!ai(N,gi(qe,M,""))){if(!((Qe==="src"||Qe==="xlink:href"||Qe==="href")&&Fe!=="script"&&Gl(qe,"data:")===0&&oe[Fe])){if(!(q&&!ai(L,gi(qe,M,"")))){if(qe)return!1}}}}}}return!0},Ue=function(Fe){var Qe=void 0,qe=void 0,Be=void 0,Ke=void 0;Me("beforeSanitizeAttributes",Fe,null);var Xe=Fe.attributes;if(!!Xe){var rt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:V};for(Ke=Xe.length;Ke--;){Qe=Xe[Ke];var it=Qe,at=it.name,ft=it.namespaceURI;if(qe=$l(Qe.value),Be=wi(at),rt.attrName=Be,rt.attrValue=qe,rt.keepAttr=!0,rt.forceKeepAttr=void 0,Me("uponSanitizeAttribute",Fe,rt),qe=rt.attrValue,!rt.forceKeepAttr&&(Re(at,Fe),!!rt.keepAttr)){if(ai(/\/>/i,qe)){Re(at,Fe);continue}Z&&(qe=gi(qe,R," "),qe=gi(qe,O," "));var vt=Fe.nodeName.toLowerCase();if(!!Ve(vt,Be,qe))try{ft?Fe.setAttributeNS(ft,at,qe):Fe.setAttribute(at,qe),Ps(e.removed)}catch{}}}Me("afterSanitizeAttributes",Fe,null)}},et=function Ze(Fe){var Qe=void 0,qe=xe(Fe);for(Me("beforeSanitizeShadowDOM",Fe,null);Qe=qe.nextNode();)Me("uponSanitizeShadowNode",Qe,null),!We(Qe)&&(Qe.content instanceof _&&Ze(Qe.content),Ue(Qe));Me("afterSanitizeShadowDOM",Fe,null)};return e.sanitize=function(Ze,Fe){var Qe=void 0,qe=void 0,Be=void 0,Ke=void 0,Xe=void 0;if(ge=!Ze,ge&&(Ze="<!-->"),typeof Ze!="string"&&!Le(Ze)){if(typeof Ze.toString!="function")throw Ns("toString is not a function");if(Ze=Ze.toString(),typeof Ze!="string")throw Ns("dirty is not a string, aborting")}if(!e.isSupported){if(tn(Q.toStaticHTML)==="object"||typeof Q.toStaticHTML=="function"){if(typeof Ze=="string")return Q.toStaticHTML(Ze);if(Le(Ze))return Q.toStaticHTML(Ze.outerHTML)}return Ze}if(X||we(Fe),e.removed=[],typeof Ze=="string"&&(ce=!1),!ce)if(Ze instanceof k)Qe=Ne("<!---->"),qe=Qe.ownerDocument.importNode(Ze,!0),qe.nodeType===1&&qe.nodeName==="BODY"||qe.nodeName==="HTML"?Qe=qe:Qe.appendChild(qe);else{if(!$&&!Z&&!j&&Ze.indexOf("<")===-1)return a&&te?a.createHTML(Ze):Ze;if(Qe=Ne(Ze),!Qe)return $?null:n}Qe&&Y&&_e(Qe.firstChild);for(var rt=xe(ce?Ze:Qe);Be=rt.nextNode();)Be.nodeType===3&&Be===Ke||We(Be)||(Be.content instanceof _&&et(Be.content),Ue(Be),Ke=Be);if(Ke=null,ce)return Ze;if($){if(J)for(Xe=m.call(Qe.ownerDocument);Qe.firstChild;)Xe.appendChild(Qe.firstChild);else Xe=Qe;return ee&&(Xe=E.call(t,Xe,!0)),Xe}var it=j?Qe.outerHTML:Qe.innerHTML;return Z&&(it=gi(it,R," "),it=gi(it,O," ")),a&&te?a.createHTML(it):it},e.setConfig=function(Ze){we(Ze),X=!0},e.clearConfig=function(){de=null,X=!1},e.isValidAttribute=function(Ze,Fe,Qe){de||we({});var qe=wi(Ze),Be=wi(Fe);return Ve(qe,Be,Qe)},e.addHook=function(Ze,Fe){typeof Fe=="function"&&(T[Ze]=T[Ze]||[],en(T[Ze],Fe))},e.removeHook=function(Ze){T[Ze]&&Ps(T[Ze])},e.removeHooks=function(Ze){T[Ze]&&(T[Ze]=[])},e.removeAllHooks=function(){T={}},e}var sc=Vs();define("vs/base/browser/dompurify/dompurify",function(){return sc}),define(ne[128],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createFastDomNode=e.FastDomNode=void 0;class t{constructor(k){this.domNode=k,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(k){const D=f(k);this._maxWidth!==D&&(this._maxWidth=D,this.domNode.style.maxWidth=this._maxWidth)}setWidth(k){const D=f(k);this._width!==D&&(this._width=D,this.domNode.style.width=this._width)}setHeight(k){const D=f(k);this._height!==D&&(this._height=D,this.domNode.style.height=this._height)}setTop(k){const D=f(k);this._top!==D&&(this._top=D,this.domNode.style.top=this._top)}setLeft(k){const D=f(k);this._left!==D&&(this._left=D,this.domNode.style.left=this._left)}setBottom(k){const D=f(k);this._bottom!==D&&(this._bottom=D,this.domNode.style.bottom=this._bottom)}setRight(k){const D=f(k);this._right!==D&&(this._right=D,this.domNode.style.right=this._right)}setFontFamily(k){this._fontFamily!==k&&(this._fontFamily=k,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(k){this._fontWeight!==k&&(this._fontWeight=k,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(k){const D=f(k);this._fontSize!==D&&(this._fontSize=D,this.domNode.style.fontSize=this._fontSize)}setFontStyle(k){this._fontStyle!==k&&(this._fontStyle=k,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(k){this._fontFeatureSettings!==k&&(this._fontFeatureSettings=k,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setTextDecoration(k){this._textDecoration!==k&&(this._textDecoration=k,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(k){const D=f(k);this._lineHeight!==D&&(this._lineHeight=D,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(k){const D=f(k);this._letterSpacing!==D&&(this._letterSpacing=D,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(k){this._className!==k&&(this._className=k,this.domNode.className=this._className)}toggleClassName(k,D){this.domNode.classList.toggle(k,D),this._className=this.domNode.className}setDisplay(k){this._display!==k&&(this._display=k,this.domNode.style.display=this._display)}setPosition(k){this._position!==k&&(this._position=k,this.domNode.style.position=this._position)}setVisibility(k){this._visibility!==k&&(this._visibility=k,this.domNode.style.visibility=this._visibility)}setColor(k){this._color!==k&&(this._color=k,this.domNode.style.color=this._color)}setBackgroundColor(k){this._backgroundColor!==k&&(this._backgroundColor=k,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(k){this._layerHint!==k&&(this._layerHint=k,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(k){this._boxShadow!==k&&(this._boxShadow=k,this.domNode.style.boxShadow=k)}setContain(k){this._contain!==k&&(this._contain=k,this.domNode.style.contain=this._contain)}setAttribute(k,D){this.domNode.setAttribute(k,D)}removeAttribute(k){this.domNode.removeAttribute(k)}appendChild(k){this.domNode.appendChild(k.domNode)}removeChild(k){this.domNode.removeChild(k.domNode)}}e.FastDomNode=t;function f(A){return typeof A=="number"?`${A}px`:A}function _(A){return new t(A)}e.createFastDomNode=_}),define(ne[952],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IframeUtils=void 0;let t=!1,f=null;function _(k){if(!k.parent||k.parent===k)return null;try{let D=k.location,I=k.parent.location;if(D.origin!=="null"&&I.origin!=="null"&&D.origin!==I.origin)return t=!0,null}catch{return t=!0,null}return k.parent}class A{static getSameOriginWindowChain(){if(!f){f=[];let D=window,I;do I=_(D),I?f.push({window:D,iframeElement:D.frameElement||null}):f.push({window:D,iframeElement:null}),D=I;while(D)}return f.slice(0)}static hasDifferentOriginAncestor(){return f||this.getSameOriginWindowChain(),t}static getPositionOfChildWindowRelativeToAncestorWindow(D,I){if(!I||D===I)return{top:0,left:0};let w=0,v=0,C=this.getSameOriginWindowChain();for(const o of C){if(w+=o.window.scrollY,v+=o.window.scrollX,o.window===I||!o.iframeElement)break;let c=o.iframeElement.getBoundingClientRect();w+=c.top,v+=c.left}return{top:w,left:v}}}e.IframeUtils=A}),define(ne[441],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CachedListVirtualDelegate=e.ListError=e.ListDragOverReactions=e.ListDragOverEffect=void 0;var t;(function(A){A[A.Copy=0]="Copy",A[A.Move=1]="Move"})(t=e.ListDragOverEffect||(e.ListDragOverEffect={})),e.ListDragOverReactions={reject(){return{accept:!1}},accept(){return{accept:!0}}};class f extends Error{constructor(k,D){super(`ListError [${k}] ${D}`)}}e.ListError=f;class _{constructor(){this.cache=new WeakMap}getHeight(k){return this.cache.get(k)??this.estimateHeight(k)}setDynamicHeight(k,D){D>0&&this.cache.set(k,D)}}e.CachedListVirtualDelegate=_}),define(ne[953],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CombinedSpliceable=void 0;class t{constructor(_){this.spliceables=_}splice(_,A,k){this.spliceables.forEach(D=>D.splice(_,A,k))}}e.CombinedSpliceable=t}),define(ne[644],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarState=void 0;const t=20;class f{constructor(A,k,D,I,w,v){this._scrollbarSize=Math.round(k),this._oppositeScrollbarSize=Math.round(D),this._arrowSize=Math.round(A),this._visibleSize=I,this._scrollSize=w,this._scrollPosition=v,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new f(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(A){const k=Math.round(A);return this._visibleSize!==k?(this._visibleSize=k,this._refreshComputedValues(),!0):!1}setScrollSize(A){const k=Math.round(A);return this._scrollSize!==k?(this._scrollSize=k,this._refreshComputedValues(),!0):!1}setScrollPosition(A){const k=Math.round(A);return this._scrollPosition!==k?(this._scrollPosition=k,this._refreshComputedValues(),!0):!1}setScrollbarSize(A){this._scrollbarSize=Math.round(A)}setOppositeScrollbarSize(A){this._oppositeScrollbarSize=Math.round(A)}static _computeValues(A,k,D,I,w){const v=Math.max(0,D-A),C=Math.max(0,v-2*k),o=I>0&&I>D;if(!o)return{computedAvailableSize:Math.round(v),computedIsNeeded:o,computedSliderSize:Math.round(C),computedSliderRatio:0,computedSliderPosition:0};const c=Math.round(Math.max(t,Math.floor(D*C/I))),i=(C-c)/(I-D),S=w*i;return{computedAvailableSize:Math.round(v),computedIsNeeded:o,computedSliderSize:Math.round(c),computedSliderRatio:i,computedSliderPosition:Math.round(S)}}_refreshComputedValues(){const A=f._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=A.computedAvailableSize,this._computedIsNeeded=A.computedIsNeeded,this._computedSliderSize=A.computedSliderSize,this._computedSliderRatio=A.computedSliderRatio,this._computedSliderPosition=A.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(A){if(!this._computedIsNeeded)return 0;const k=A-this._arrowSize-this._computedSliderSize/2;return Math.round(k/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(A){if(!this._computedIsNeeded)return 0;const k=A-this._arrowSize;let D=this._scrollPosition;return k<this._computedSliderPosition?D-=this._visibleSize:D+=this._visibleSize,D}getDesiredScrollPositionFromDelta(A){if(!this._computedIsNeeded)return 0;const k=this._computedSliderPosition+A;return Math.round(k/this._computedSliderRatio)}}e.ScrollbarState=f}),define(ne[277],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WeakMapper=e.TreeError=e.TreeDragOverReactions=e.TreeDragOverBubble=e.TreeMouseEventTarget=e.TreeVisibility=void 0;var t;(function(D){D[D.Hidden=0]="Hidden",D[D.Visible=1]="Visible",D[D.Recurse=2]="Recurse"})(t=e.TreeVisibility||(e.TreeVisibility={}));var f;(function(D){D[D.Unknown=0]="Unknown",D[D.Twistie=1]="Twistie",D[D.Element=2]="Element"})(f=e.TreeMouseEventTarget||(e.TreeMouseEventTarget={}));var _;(function(D){D[D.Down=0]="Down",D[D.Up=1]="Up"})(_=e.TreeDragOverBubble||(e.TreeDragOverBubble={})),e.TreeDragOverReactions={acceptBubbleUp(){return{accept:!0,bubble:1}},acceptBubbleDown(D=!1){return{accept:!0,bubble:0,autoExpand:D}},acceptCopyBubbleUp(){return{accept:!0,bubble:1,effect:0}},acceptCopyBubbleDown(D=!1){return{accept:!0,bubble:0,effect:0,autoExpand:D}}};class A extends Error{constructor(I,w){super(`TreeError [${I}] ${w}`)}}e.TreeError=A;class k{constructor(I){this.fn=I,this._map=new WeakMap}map(I){let w=this._map.get(I);return w||(w=this.fn(I),this._map.set(I,w)),w}}e.WeakMapper=k}),define(ne[954],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LoaderStats=void 0;class t{static get(){const _=new Map,A=new Map,k=new Map,D=new Map;function I(c,i){c.has(i.detail)||c.set(i.detail,-i.timestamp)}function w(c,i){let S=c.get(i.detail);!S||S>=0||c.set(i.detail,S+i.timestamp)}const v=Q.getStats().slice(0).sort((c,i)=>c.timestamp-i.timestamp);for(const c of v)switch(c.type){case 10:I(_,c);break;case 11:case 12:w(_,c);break;case 21:I(A,c);break;case 22:w(A,c);break;case 33:I(k,c);break;case 34:w(k,c);break;case 31:I(D,c);break;case 32:w(D,c);break}let C=0;k.forEach(c=>C+=c);function o(c){let i=[];return c.forEach((S,s)=>i.push([s,S])),i}return{amdLoad:o(_),amdInvoke:o(A),nodeRequire:o(k),nodeEval:o(D),nodeRequireTotal:C}}static toMarkdownTable(_,A){let k="",D=[];return _.forEach((I,w)=>{D[w]=I.length}),A.forEach(I=>{I.forEach((w,v)=>{typeof w=="undefined"&&(w=I[v]="-");const C=w.toString().length;D[v]=Math.max(C,D[v])})}),_.forEach((I,w)=>{k+=`| ${I+" ".repeat(D[w]-I.toString().length)} `}),k+=`| `,_.forEach((I,w)=>{k+=`| ${"-".repeat(D[w])} `}),k+=`| `,A.forEach(I=>{I.forEach((w,v)=>{typeof w!="undefined"&&(k+=`| ${w+" ".repeat(D[v]-w.toString().length)} `)}),k+=`| `}),k}}e.LoaderStats=t}),define(ne[515],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ok=void 0;function t(f,_){if(!f)throw new Error(_?`Assertion failed (${_})`:"Assertion Failed")}e.ok=t}),define(ne[33],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CSSIcon=e.getClassNamesArray=e.Codicon=e.getCodiconAriaLabel=void 0;function t(k){return k?k.replace(/\$\((.*?)\)/g,(D,I)=>` ${I} `).trim():""}e.getCodiconAriaLabel=t;class f{constructor(D,I,w){this.id=D,this.definition=I,this.description=w,f._allCodicons.push(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}static getAll(){return f._allCodicons}}e.Codicon=f,f._allCodicons=[],f.add=new f("add",{fontCharacter:"\\ea60"}),f.plus=new f("plus",f.add.definition),f.gistNew=new f("gist-new",f.add.definition),f.repoCreate=new f("repo-create",f.add.definition),f.lightbulb=new f("lightbulb",{fontCharacter:"\\ea61"}),f.lightBulb=new f("light-bulb",{fontCharacter:"\\ea61"}),f.repo=new f("repo",{fontCharacter:"\\ea62"}),f.repoDelete=new f("repo-delete",{fontCharacter:"\\ea62"}),f.gistFork=new f("gist-fork",{fontCharacter:"\\ea63"}),f.repoForked=new f("repo-forked",{fontCharacter:"\\ea63"}),f.gitPullRequest=new f("git-pull-request",{fontCharacter:"\\ea64"}),f.gitPullRequestAbandoned=new f("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),f.recordKeys=new f("record-keys",{fontCharacter:"\\ea65"}),f.keyboard=new f("keyboard",{fontCharacter:"\\ea65"}),f.tag=new f("tag",{fontCharacter:"\\ea66"}),f.tagAdd=new f("tag-add",{fontCharacter:"\\ea66"}),f.tagRemove=new f("tag-remove",{fontCharacter:"\\ea66"}),f.person=new f("person",{fontCharacter:"\\ea67"}),f.personFollow=new f("person-follow",{fontCharacter:"\\ea67"}),f.personOutline=new f("person-outline",{fontCharacter:"\\ea67"}),f.personFilled=new f("person-filled",{fontCharacter:"\\ea67"}),f.gitBranch=new f("git-branch",{fontCharacter:"\\ea68"}),f.gitBranchCreate=new f("git-branch-create",{fontCharacter:"\\ea68"}),f.gitBranchDelete=new f("git-branch-delete",{fontCharacter:"\\ea68"}),f.sourceControl=new f("source-control",{fontCharacter:"\\ea68"}),f.mirror=new f("mirror",{fontCharacter:"\\ea69"}),f.mirrorPublic=new f("mirror-public",{fontCharacter:"\\ea69"}),f.star=new f("star",{fontCharacter:"\\ea6a"}),f.starAdd=new f("star-add",{fontCharacter:"\\ea6a"}),f.starDelete=new f("star-delete",{fontCharacter:"\\ea6a"}),f.starEmpty=new f("star-empty",{fontCharacter:"\\ea6a"}),f.comment=new f("comment",{fontCharacter:"\\ea6b"}),f.commentAdd=new f("comment-add",{fontCharacter:"\\ea6b"}),f.alert=new f("alert",{fontCharacter:"\\ea6c"}),f.warning=new f("warning",{fontCharacter:"\\ea6c"}),f.search=new f("search",{fontCharacter:"\\ea6d"}),f.searchSave=new f("search-save",{fontCharacter:"\\ea6d"}),f.logOut=new f("log-out",{fontCharacter:"\\ea6e"}),f.signOut=new f("sign-out",{fontCharacter:"\\ea6e"}),f.logIn=new f("log-in",{fontCharacter:"\\ea6f"}),f.signIn=new f("sign-in",{fontCharacter:"\\ea6f"}),f.eye=new f("eye",{fontCharacter:"\\ea70"}),f.eyeUnwatch=new f("eye-unwatch",{fontCharacter:"\\ea70"}),f.eyeWatch=new f("eye-watch",{fontCharacter:"\\ea70"}),f.circleFilled=new f("circle-filled",{fontCharacter:"\\ea71"}),f.primitiveDot=new f("primitive-dot",{fontCharacter:"\\ea71"}),f.closeDirty=new f("close-dirty",{fontCharacter:"\\ea71"}),f.debugBreakpoint=new f("debug-breakpoint",{fontCharacter:"\\ea71"}),f.debugBreakpointDisabled=new f("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),f.debugHint=new f("debug-hint",{fontCharacter:"\\ea71"}),f.primitiveSquare=new f("primitive-square",{fontCharacter:"\\ea72"}),f.edit=new f("edit",{fontCharacter:"\\ea73"}),f.pencil=new f("pencil",{fontCharacter:"\\ea73"}),f.info=new f("info",{fontCharacter:"\\ea74"}),f.issueOpened=new f("issue-opened",{fontCharacter:"\\ea74"}),f.gistPrivate=new f("gist-private",{fontCharacter:"\\ea75"}),f.gitForkPrivate=new f("git-fork-private",{fontCharacter:"\\ea75"}),f.lock=new f("lock",{fontCharacter:"\\ea75"}),f.mirrorPrivate=new f("mirror-private",{fontCharacter:"\\ea75"}),f.close=new f("close",{fontCharacter:"\\ea76"}),f.removeClose=new f("remove-close",{fontCharacter:"\\ea76"}),f.x=new f("x",{fontCharacter:"\\ea76"}),f.repoSync=new f("repo-sync",{fontCharacter:"\\ea77"}),f.sync=new f("sync",{fontCharacter:"\\ea77"}),f.clone=new f("clone",{fontCharacter:"\\ea78"}),f.desktopDownload=new f("desktop-download",{fontCharacter:"\\ea78"}),f.beaker=new f("beaker",{fontCharacter:"\\ea79"}),f.microscope=new f("microscope",{fontCharacter:"\\ea79"}),f.vm=new f("vm",{fontCharacter:"\\ea7a"}),f.deviceDesktop=new f("device-desktop",{fontCharacter:"\\ea7a"}),f.file=new f("file",{fontCharacter:"\\ea7b"}),f.fileText=new f("file-text",{fontCharacter:"\\ea7b"}),f.more=new f("more",{fontCharacter:"\\ea7c"}),f.ellipsis=new f("ellipsis",{fontCharacter:"\\ea7c"}),f.kebabHorizontal=new f("kebab-horizontal",{fontCharacter:"\\ea7c"}),f.mailReply=new f("mail-reply",{fontCharacter:"\\ea7d"}),f.reply=new f("reply",{fontCharacter:"\\ea7d"}),f.organization=new f("organization",{fontCharacter:"\\ea7e"}),f.organizationFilled=new f("organization-filled",{fontCharacter:"\\ea7e"}),f.organizationOutline=new f("organization-outline",{fontCharacter:"\\ea7e"}),f.newFile=new f("new-file",{fontCharacter:"\\ea7f"}),f.fileAdd=new f("file-add",{fontCharacter:"\\ea7f"}),f.newFolder=new f("new-folder",{fontCharacter:"\\ea80"}),f.fileDirectoryCreate=new f("file-directory-create",{fontCharacter:"\\ea80"}),f.trash=new f("trash",{fontCharacter:"\\ea81"}),f.trashcan=new f("trashcan",{fontCharacter:"\\ea81"}),f.history=new f("history",{fontCharacter:"\\ea82"}),f.clock=new f("clock",{fontCharacter:"\\ea82"}),f.folder=new f("folder",{fontCharacter:"\\ea83"}),f.fileDirectory=new f("file-directory",{fontCharacter:"\\ea83"}),f.symbolFolder=new f("symbol-folder",{fontCharacter:"\\ea83"}),f.logoGithub=new f("logo-github",{fontCharacter:"\\ea84"}),f.markGithub=new f("mark-github",{fontCharacter:"\\ea84"}),f.github=new f("github",{fontCharacter:"\\ea84"}),f.terminal=new f("terminal",{fontCharacter:"\\ea85"}),f.console=new f("console",{fontCharacter:"\\ea85"}),f.repl=new f("repl",{fontCharacter:"\\ea85"}),f.zap=new f("zap",{fontCharacter:"\\ea86"}),f.symbolEvent=new f("symbol-event",{fontCharacter:"\\ea86"}),f.error=new f("error",{fontCharacter:"\\ea87"}),f.stop=new f("stop",{fontCharacter:"\\ea87"}),f.variable=new f("variable",{fontCharacter:"\\ea88"}),f.symbolVariable=new f("symbol-variable",{fontCharacter:"\\ea88"}),f.array=new f("array",{fontCharacter:"\\ea8a"}),f.symbolArray=new f("symbol-array",{fontCharacter:"\\ea8a"}),f.symbolModule=new f("symbol-module",{fontCharacter:"\\ea8b"}),f.symbolPackage=new f("symbol-package",{fontCharacter:"\\ea8b"}),f.symbolNamespace=new f("symbol-namespace",{fontCharacter:"\\ea8b"}),f.symbolObject=new f("symbol-object",{fontCharacter:"\\ea8b"}),f.symbolMethod=new f("symbol-method",{fontCharacter:"\\ea8c"}),f.symbolFunction=new f("symbol-function",{fontCharacter:"\\ea8c"}),f.symbolConstructor=new f("symbol-constructor",{fontCharacter:"\\ea8c"}),f.symbolBoolean=new f("symbol-boolean",{fontCharacter:"\\ea8f"}),f.symbolNull=new f("symbol-null",{fontCharacter:"\\ea8f"}),f.symbolNumeric=new f("symbol-numeric",{fontCharacter:"\\ea90"}),f.symbolNumber=new f("symbol-number",{fontCharacter:"\\ea90"}),f.symbolStructure=new f("symbol-structure",{fontCharacter:"\\ea91"}),f.symbolStruct=new f("symbol-struct",{fontCharacter:"\\ea91"}),f.symbolParameter=new f("symbol-parameter",{fontCharacter:"\\ea92"}),f.symbolTypeParameter=new f("symbol-type-parameter",{fontCharacter:"\\ea92"}),f.symbolKey=new f("symbol-key",{fontCharacter:"\\ea93"}),f.symbolText=new f("symbol-text",{fontCharacter:"\\ea93"}),f.symbolReference=new f("symbol-reference",{fontCharacter:"\\ea94"}),f.goToFile=new f("go-to-file",{fontCharacter:"\\ea94"}),f.symbolEnum=new f("symbol-enum",{fontCharacter:"\\ea95"}),f.symbolValue=new f("symbol-value",{fontCharacter:"\\ea95"}),f.symbolRuler=new f("symbol-ruler",{fontCharacter:"\\ea96"}),f.symbolUnit=new f("symbol-unit",{fontCharacter:"\\ea96"}),f.activateBreakpoints=new f("activate-breakpoints",{fontCharacter:"\\ea97"}),f.archive=new f("archive",{fontCharacter:"\\ea98"}),f.arrowBoth=new f("arrow-both",{fontCharacter:"\\ea99"}),f.arrowDown=new f("arrow-down",{fontCharacter:"\\ea9a"}),f.arrowLeft=new f("arrow-left",{fontCharacter:"\\ea9b"}),f.arrowRight=new f("arrow-right",{fontCharacter:"\\ea9c"}),f.arrowSmallDown=new f("arrow-small-down",{fontCharacter:"\\ea9d"}),f.arrowSmallLeft=new f("arrow-small-left",{fontCharacter:"\\ea9e"}),f.arrowSmallRight=new f("arrow-small-right",{fontCharacter:"\\ea9f"}),f.arrowSmallUp=new f("arrow-small-up",{fontCharacter:"\\eaa0"}),f.arrowUp=new f("arrow-up",{fontCharacter:"\\eaa1"}),f.bell=new f("bell",{fontCharacter:"\\eaa2"}),f.bold=new f("bold",{fontCharacter:"\\eaa3"}),f.book=new f("book",{fontCharacter:"\\eaa4"}),f.bookmark=new f("bookmark",{fontCharacter:"\\eaa5"}),f.debugBreakpointConditionalUnverified=new f("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),f.debugBreakpointConditional=new f("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),f.debugBreakpointConditionalDisabled=new f("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),f.debugBreakpointDataUnverified=new f("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),f.debugBreakpointData=new f("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),f.debugBreakpointDataDisabled=new f("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),f.debugBreakpointLogUnverified=new f("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),f.debugBreakpointLog=new f("debug-breakpoint-log",{fontCharacter:"\\eaab"}),f.debugBreakpointLogDisabled=new f("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),f.briefcase=new f("briefcase",{fontCharacter:"\\eaac"}),f.broadcast=new f("broadcast",{fontCharacter:"\\eaad"}),f.browser=new f("browser",{fontCharacter:"\\eaae"}),f.bug=new f("bug",{fontCharacter:"\\eaaf"}),f.calendar=new f("calendar",{fontCharacter:"\\eab0"}),f.caseSensitive=new f("case-sensitive",{fontCharacter:"\\eab1"}),f.check=new f("check",{fontCharacter:"\\eab2"}),f.checklist=new f("checklist",{fontCharacter:"\\eab3"}),f.chevronDown=new f("chevron-down",{fontCharacter:"\\eab4"}),f.dropDownButton=new f("drop-down-button",f.chevronDown.definition),f.chevronLeft=new f("chevron-left",{fontCharacter:"\\eab5"}),f.chevronRight=new f("chevron-right",{fontCharacter:"\\eab6"}),f.chevronUp=new f("chevron-up",{fontCharacter:"\\eab7"}),f.chromeClose=new f("chrome-close",{fontCharacter:"\\eab8"}),f.chromeMaximize=new f("chrome-maximize",{fontCharacter:"\\eab9"}),f.chromeMinimize=new f("chrome-minimize",{fontCharacter:"\\eaba"}),f.chromeRestore=new f("chrome-restore",{fontCharacter:"\\eabb"}),f.circleOutline=new f("circle-outline",{fontCharacter:"\\eabc"}),f.debugBreakpointUnverified=new f("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),f.circleSlash=new f("circle-slash",{fontCharacter:"\\eabd"}),f.circuitBoard=new f("circuit-board",{fontCharacter:"\\eabe"}),f.clearAll=new f("clear-all",{fontCharacter:"\\eabf"}),f.clippy=new f("clippy",{fontCharacter:"\\eac0"}),f.closeAll=new f("close-all",{fontCharacter:"\\eac1"}),f.cloudDownload=new f("cloud-download",{fontCharacter:"\\eac2"}),f.cloudUpload=new f("cloud-upload",{fontCharacter:"\\eac3"}),f.code=new f("code",{fontCharacter:"\\eac4"}),f.collapseAll=new f("collapse-all",{fontCharacter:"\\eac5"}),f.colorMode=new f("color-mode",{fontCharacter:"\\eac6"}),f.commentDiscussion=new f("comment-discussion",{fontCharacter:"\\eac7"}),f.compareChanges=new f("compare-changes",{fontCharacter:"\\eafd"}),f.creditCard=new f("credit-card",{fontCharacter:"\\eac9"}),f.dash=new f("dash",{fontCharacter:"\\eacc"}),f.dashboard=new f("dashboard",{fontCharacter:"\\eacd"}),f.database=new f("database",{fontCharacter:"\\eace"}),f.debugContinue=new f("debug-continue",{fontCharacter:"\\eacf"}),f.debugDisconnect=new f("debug-disconnect",{fontCharacter:"\\ead0"}),f.debugPause=new f("debug-pause",{fontCharacter:"\\ead1"}),f.debugRestart=new f("debug-restart",{fontCharacter:"\\ead2"}),f.debugStart=new f("debug-start",{fontCharacter:"\\ead3"}),f.debugStepInto=new f("debug-step-into",{fontCharacter:"\\ead4"}),f.debugStepOut=new f("debug-step-out",{fontCharacter:"\\ead5"}),f.debugStepOver=new f("debug-step-over",{fontCharacter:"\\ead6"}),f.debugStop=new f("debug-stop",{fontCharacter:"\\ead7"}),f.debug=new f("debug",{fontCharacter:"\\ead8"}),f.deviceCameraVideo=new f("device-camera-video",{fontCharacter:"\\ead9"}),f.deviceCamera=new f("device-camera",{fontCharacter:"\\eada"}),f.deviceMobile=new f("device-mobile",{fontCharacter:"\\eadb"}),f.diffAdded=new f("diff-added",{fontCharacter:"\\eadc"}),f.diffIgnored=new f("diff-ignored",{fontCharacter:"\\eadd"}),f.diffModified=new f("diff-modified",{fontCharacter:"\\eade"}),f.diffRemoved=new f("diff-removed",{fontCharacter:"\\eadf"}),f.diffRenamed=new f("diff-renamed",{fontCharacter:"\\eae0"}),f.diff=new f("diff",{fontCharacter:"\\eae1"}),f.discard=new f("discard",{fontCharacter:"\\eae2"}),f.editorLayout=new f("editor-layout",{fontCharacter:"\\eae3"}),f.emptyWindow=new f("empty-window",{fontCharacter:"\\eae4"}),f.exclude=new f("exclude",{fontCharacter:"\\eae5"}),f.extensions=new f("extensions",{fontCharacter:"\\eae6"}),f.eyeClosed=new f("eye-closed",{fontCharacter:"\\eae7"}),f.fileBinary=new f("file-binary",{fontCharacter:"\\eae8"}),f.fileCode=new f("file-code",{fontCharacter:"\\eae9"}),f.fileMedia=new f("file-media",{fontCharacter:"\\eaea"}),f.filePdf=new f("file-pdf",{fontCharacter:"\\eaeb"}),f.fileSubmodule=new f("file-submodule",{fontCharacter:"\\eaec"}),f.fileSymlinkDirectory=new f("file-symlink-directory",{fontCharacter:"\\eaed"}),f.fileSymlinkFile=new f("file-symlink-file",{fontCharacter:"\\eaee"}),f.fileZip=new f("file-zip",{fontCharacter:"\\eaef"}),f.files=new f("files",{fontCharacter:"\\eaf0"}),f.filter=new f("filter",{fontCharacter:"\\eaf1"}),f.flame=new f("flame",{fontCharacter:"\\eaf2"}),f.foldDown=new f("fold-down",{fontCharacter:"\\eaf3"}),f.foldUp=new f("fold-up",{fontCharacter:"\\eaf4"}),f.fold=new f("fold",{fontCharacter:"\\eaf5"}),f.folderActive=new f("folder-active",{fontCharacter:"\\eaf6"}),f.folderOpened=new f("folder-opened",{fontCharacter:"\\eaf7"}),f.gear=new f("gear",{fontCharacter:"\\eaf8"}),f.gift=new f("gift",{fontCharacter:"\\eaf9"}),f.gistSecret=new f("gist-secret",{fontCharacter:"\\eafa"}),f.gist=new f("gist",{fontCharacter:"\\eafb"}),f.gitCommit=new f("git-commit",{fontCharacter:"\\eafc"}),f.gitCompare=new f("git-compare",{fontCharacter:"\\eafd"}),f.gitMerge=new f("git-merge",{fontCharacter:"\\eafe"}),f.githubAction=new f("github-action",{fontCharacter:"\\eaff"}),f.githubAlt=new f("github-alt",{fontCharacter:"\\eb00"}),f.globe=new f("globe",{fontCharacter:"\\eb01"}),f.grabber=new f("grabber",{fontCharacter:"\\eb02"}),f.graph=new f("graph",{fontCharacter:"\\eb03"}),f.gripper=new f("gripper",{fontCharacter:"\\eb04"}),f.heart=new f("heart",{fontCharacter:"\\eb05"}),f.home=new f("home",{fontCharacter:"\\eb06"}),f.horizontalRule=new f("horizontal-rule",{fontCharacter:"\\eb07"}),f.hubot=new f("hubot",{fontCharacter:"\\eb08"}),f.inbox=new f("inbox",{fontCharacter:"\\eb09"}),f.issueClosed=new f("issue-closed",{fontCharacter:"\\eba4"}),f.issueReopened=new f("issue-reopened",{fontCharacter:"\\eb0b"}),f.issues=new f("issues",{fontCharacter:"\\eb0c"}),f.italic=new f("italic",{fontCharacter:"\\eb0d"}),f.jersey=new f("jersey",{fontCharacter:"\\eb0e"}),f.json=new f("json",{fontCharacter:"\\eb0f"}),f.kebabVertical=new f("kebab-vertical",{fontCharacter:"\\eb10"}),f.key=new f("key",{fontCharacter:"\\eb11"}),f.law=new f("law",{fontCharacter:"\\eb12"}),f.lightbulbAutofix=new f("lightbulb-autofix",{fontCharacter:"\\eb13"}),f.linkExternal=new f("link-external",{fontCharacter:"\\eb14"}),f.link=new f("link",{fontCharacter:"\\eb15"}),f.listOrdered=new f("list-ordered",{fontCharacter:"\\eb16"}),f.listUnordered=new f("list-unordered",{fontCharacter:"\\eb17"}),f.liveShare=new f("live-share",{fontCharacter:"\\eb18"}),f.loading=new f("loading",{fontCharacter:"\\eb19"}),f.location=new f("location",{fontCharacter:"\\eb1a"}),f.mailRead=new f("mail-read",{fontCharacter:"\\eb1b"}),f.mail=new f("mail",{fontCharacter:"\\eb1c"}),f.markdown=new f("markdown",{fontCharacter:"\\eb1d"}),f.megaphone=new f("megaphone",{fontCharacter:"\\eb1e"}),f.mention=new f("mention",{fontCharacter:"\\eb1f"}),f.milestone=new f("milestone",{fontCharacter:"\\eb20"}),f.mortarBoard=new f("mortar-board",{fontCharacter:"\\eb21"}),f.move=new f("move",{fontCharacter:"\\eb22"}),f.multipleWindows=new f("multiple-windows",{fontCharacter:"\\eb23"}),f.mute=new f("mute",{fontCharacter:"\\eb24"}),f.noNewline=new f("no-newline",{fontCharacter:"\\eb25"}),f.note=new f("note",{fontCharacter:"\\eb26"}),f.octoface=new f("octoface",{fontCharacter:"\\eb27"}),f.openPreview=new f("open-preview",{fontCharacter:"\\eb28"}),f.package_=new f("package",{fontCharacter:"\\eb29"}),f.paintcan=new f("paintcan",{fontCharacter:"\\eb2a"}),f.pin=new f("pin",{fontCharacter:"\\eb2b"}),f.play=new f("play",{fontCharacter:"\\eb2c"}),f.run=new f("run",{fontCharacter:"\\eb2c"}),f.plug=new f("plug",{fontCharacter:"\\eb2d"}),f.preserveCase=new f("preserve-case",{fontCharacter:"\\eb2e"}),f.preview=new f("preview",{fontCharacter:"\\eb2f"}),f.project=new f("project",{fontCharacter:"\\eb30"}),f.pulse=new f("pulse",{fontCharacter:"\\eb31"}),f.question=new f("question",{fontCharacter:"\\eb32"}),f.quote=new f("quote",{fontCharacter:"\\eb33"}),f.radioTower=new f("radio-tower",{fontCharacter:"\\eb34"}),f.reactions=new f("reactions",{fontCharacter:"\\eb35"}),f.references=new f("references",{fontCharacter:"\\eb36"}),f.refresh=new f("refresh",{fontCharacter:"\\eb37"}),f.regex=new f("regex",{fontCharacter:"\\eb38"}),f.remoteExplorer=new f("remote-explorer",{fontCharacter:"\\eb39"}),f.remote=new f("remote",{fontCharacter:"\\eb3a"}),f.remove=new f("remove",{fontCharacter:"\\eb3b"}),f.replaceAll=new f("replace-all",{fontCharacter:"\\eb3c"}),f.replace=new f("replace",{fontCharacter:"\\eb3d"}),f.repoClone=new f("repo-clone",{fontCharacter:"\\eb3e"}),f.repoForcePush=new f("repo-force-push",{fontCharacter:"\\eb3f"}),f.repoPull=new f("repo-pull",{fontCharacter:"\\eb40"}),f.repoPush=new f("repo-push",{fontCharacter:"\\eb41"}),f.report=new f("report",{fontCharacter:"\\eb42"}),f.requestChanges=new f("request-changes",{fontCharacter:"\\eb43"}),f.rocket=new f("rocket",{fontCharacter:"\\eb44"}),f.rootFolderOpened=new f("root-folder-opened",{fontCharacter:"\\eb45"}),f.rootFolder=new f("root-folder",{fontCharacter:"\\eb46"}),f.rss=new f("rss",{fontCharacter:"\\eb47"}),f.ruby=new f("ruby",{fontCharacter:"\\eb48"}),f.saveAll=new f("save-all",{fontCharacter:"\\eb49"}),f.saveAs=new f("save-as",{fontCharacter:"\\eb4a"}),f.save=new f("save",{fontCharacter:"\\eb4b"}),f.screenFull=new f("screen-full",{fontCharacter:"\\eb4c"}),f.screenNormal=new f("screen-normal",{fontCharacter:"\\eb4d"}),f.searchStop=new f("search-stop",{fontCharacter:"\\eb4e"}),f.server=new f("server",{fontCharacter:"\\eb50"}),f.settingsGear=new f("settings-gear",{fontCharacter:"\\eb51"}),f.settings=new f("settings",{fontCharacter:"\\eb52"}),f.shield=new f("shield",{fontCharacter:"\\eb53"}),f.smiley=new f("smiley",{fontCharacter:"\\eb54"}),f.sortPrecedence=new f("sort-precedence",{fontCharacter:"\\eb55"}),f.splitHorizontal=new f("split-horizontal",{fontCharacter:"\\eb56"}),f.splitVertical=new f("split-vertical",{fontCharacter:"\\eb57"}),f.squirrel=new f("squirrel",{fontCharacter:"\\eb58"}),f.starFull=new f("star-full",{fontCharacter:"\\eb59"}),f.starHalf=new f("star-half",{fontCharacter:"\\eb5a"}),f.symbolClass=new f("symbol-class",{fontCharacter:"\\eb5b"}),f.symbolColor=new f("symbol-color",{fontCharacter:"\\eb5c"}),f.symbolCustomColor=new f("symbol-customcolor",{fontCharacter:"\\eb5c"}),f.symbolConstant=new f("symbol-constant",{fontCharacter:"\\eb5d"}),f.symbolEnumMember=new f("symbol-enum-member",{fontCharacter:"\\eb5e"}),f.symbolField=new f("symbol-field",{fontCharacter:"\\eb5f"}),f.symbolFile=new f("symbol-file",{fontCharacter:"\\eb60"}),f.symbolInterface=new f("symbol-interface",{fontCharacter:"\\eb61"}),f.symbolKeyword=new f("symbol-keyword",{fontCharacter:"\\eb62"}),f.symbolMisc=new f("symbol-misc",{fontCharacter:"\\eb63"}),f.symbolOperator=new f("symbol-operator",{fontCharacter:"\\eb64"}),f.symbolProperty=new f("symbol-property",{fontCharacter:"\\eb65"}),f.wrench=new f("wrench",{fontCharacter:"\\eb65"}),f.wrenchSubaction=new f("wrench-subaction",{fontCharacter:"\\eb65"}),f.symbolSnippet=new f("symbol-snippet",{fontCharacter:"\\eb66"}),f.tasklist=new f("tasklist",{fontCharacter:"\\eb67"}),f.telescope=new f("telescope",{fontCharacter:"\\eb68"}),f.textSize=new f("text-size",{fontCharacter:"\\eb69"}),f.threeBars=new f("three-bars",{fontCharacter:"\\eb6a"}),f.thumbsdown=new f("thumbsdown",{fontCharacter:"\\eb6b"}),f.thumbsup=new f("thumbsup",{fontCharacter:"\\eb6c"}),f.tools=new f("tools",{fontCharacter:"\\eb6d"}),f.triangleDown=new f("triangle-down",{fontCharacter:"\\eb6e"}),f.triangleLeft=new f("triangle-left",{fontCharacter:"\\eb6f"}),f.triangleRight=new f("triangle-right",{fontCharacter:"\\eb70"}),f.triangleUp=new f("triangle-up",{fontCharacter:"\\eb71"}),f.twitter=new f("twitter",{fontCharacter:"\\eb72"}),f.unfold=new f("unfold",{fontCharacter:"\\eb73"}),f.unlock=new f("unlock",{fontCharacter:"\\eb74"}),f.unmute=new f("unmute",{fontCharacter:"\\eb75"}),f.unverified=new f("unverified",{fontCharacter:"\\eb76"}),f.verified=new f("verified",{fontCharacter:"\\eb77"}),f.versions=new f("versions",{fontCharacter:"\\eb78"}),f.vmActive=new f("vm-active",{fontCharacter:"\\eb79"}),f.vmOutline=new f("vm-outline",{fontCharacter:"\\eb7a"}),f.vmRunning=new f("vm-running",{fontCharacter:"\\eb7b"}),f.watch=new f("watch",{fontCharacter:"\\eb7c"}),f.whitespace=new f("whitespace",{fontCharacter:"\\eb7d"}),f.wholeWord=new f("whole-word",{fontCharacter:"\\eb7e"}),f.window=new f("window",{fontCharacter:"\\eb7f"}),f.wordWrap=new f("word-wrap",{fontCharacter:"\\eb80"}),f.zoomIn=new f("zoom-in",{fontCharacter:"\\eb81"}),f.zoomOut=new f("zoom-out",{fontCharacter:"\\eb82"}),f.listFilter=new f("list-filter",{fontCharacter:"\\eb83"}),f.listFlat=new f("list-flat",{fontCharacter:"\\eb84"}),f.listSelection=new f("list-selection",{fontCharacter:"\\eb85"}),f.selection=new f("selection",{fontCharacter:"\\eb85"}),f.listTree=new f("list-tree",{fontCharacter:"\\eb86"}),f.debugBreakpointFunctionUnverified=new f("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),f.debugBreakpointFunction=new f("debug-breakpoint-function",{fontCharacter:"\\eb88"}),f.debugBreakpointFunctionDisabled=new f("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),f.debugStackframeActive=new f("debug-stackframe-active",{fontCharacter:"\\eb89"}),f.debugStackframeDot=new f("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),f.debugStackframe=new f("debug-stackframe",{fontCharacter:"\\eb8b"}),f.debugStackframeFocused=new f("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),f.debugBreakpointUnsupported=new f("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),f.symbolString=new f("symbol-string",{fontCharacter:"\\eb8d"}),f.debugReverseContinue=new f("debug-reverse-continue",{fontCharacter:"\\eb8e"}),f.debugStepBack=new f("debug-step-back",{fontCharacter:"\\eb8f"}),f.debugRestartFrame=new f("debug-restart-frame",{fontCharacter:"\\eb90"}),f.callIncoming=new f("call-incoming",{fontCharacter:"\\eb92"}),f.callOutgoing=new f("call-outgoing",{fontCharacter:"\\eb93"}),f.menu=new f("menu",{fontCharacter:"\\eb94"}),f.expandAll=new f("expand-all",{fontCharacter:"\\eb95"}),f.feedback=new f("feedback",{fontCharacter:"\\eb96"}),f.groupByRefType=new f("group-by-ref-type",{fontCharacter:"\\eb97"}),f.ungroupByRefType=new f("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),f.account=new f("account",{fontCharacter:"\\eb99"}),f.bellDot=new f("bell-dot",{fontCharacter:"\\eb9a"}),f.debugConsole=new f("debug-console",{fontCharacter:"\\eb9b"}),f.library=new f("library",{fontCharacter:"\\eb9c"}),f.output=new f("output",{fontCharacter:"\\eb9d"}),f.runAll=new f("run-all",{fontCharacter:"\\eb9e"}),f.syncIgnored=new f("sync-ignored",{fontCharacter:"\\eb9f"}),f.pinned=new f("pinned",{fontCharacter:"\\eba0"}),f.githubInverted=new f("github-inverted",{fontCharacter:"\\eba1"}),f.debugAlt=new f("debug-alt",{fontCharacter:"\\eb91"}),f.serverProcess=new f("server-process",{fontCharacter:"\\eba2"}),f.serverEnvironment=new f("server-environment",{fontCharacter:"\\eba3"}),f.pass=new f("pass",{fontCharacter:"\\eba4"}),f.stopCircle=new f("stop-circle",{fontCharacter:"\\eba5"}),f.playCircle=new f("play-circle",{fontCharacter:"\\eba6"}),f.record=new f("record",{fontCharacter:"\\eba7"}),f.debugAltSmall=new f("debug-alt-small",{fontCharacter:"\\eba8"}),f.vmConnect=new f("vm-connect",{fontCharacter:"\\eba9"}),f.cloud=new f("cloud",{fontCharacter:"\\ebaa"}),f.merge=new f("merge",{fontCharacter:"\\ebab"}),f.exportIcon=new f("export",{fontCharacter:"\\ebac"}),f.graphLeft=new f("graph-left",{fontCharacter:"\\ebad"}),f.magnet=new f("magnet",{fontCharacter:"\\ebae"}),f.notebook=new f("notebook",{fontCharacter:"\\ebaf"}),f.redo=new f("redo",{fontCharacter:"\\ebb0"}),f.checkAll=new f("check-all",{fontCharacter:"\\ebb1"}),f.pinnedDirty=new f("pinned-dirty",{fontCharacter:"\\ebb2"}),f.passFilled=new f("pass-filled",{fontCharacter:"\\ebb3"}),f.circleLargeFilled=new f("circle-large-filled",{fontCharacter:"\\ebb4"}),f.circleLargeOutline=new f("circle-large-outline",{fontCharacter:"\\ebb5"}),f.combine=new f("combine",{fontCharacter:"\\ebb6"}),f.gather=new f("gather",{fontCharacter:"\\ebb6"}),f.table=new f("table",{fontCharacter:"\\ebb7"}),f.variableGroup=new f("variable-group",{fontCharacter:"\\ebb8"}),f.typeHierarchy=new f("type-hierarchy",{fontCharacter:"\\ebb9"}),f.typeHierarchySub=new f("type-hierarchy-sub",{fontCharacter:"\\ebba"}),f.typeHierarchySuper=new f("type-hierarchy-super",{fontCharacter:"\\ebbb"}),f.gitPullRequestCreate=new f("git-pull-request-create",{fontCharacter:"\\ebbc"}),f.runAbove=new f("run-above",{fontCharacter:"\\ebbd"}),f.runBelow=new f("run-below",{fontCharacter:"\\ebbe"}),f.notebookTemplate=new f("notebook-template",{fontCharacter:"\\ebbf"}),f.debugRerun=new f("debug-rerun",{fontCharacter:"\\ebc0"}),f.workspaceTrusted=new f("workspace-trusted",{fontCharacter:"\\ebc1"}),f.workspaceUntrusted=new f("workspace-untrusted",{fontCharacter:"\\ebc2"}),f.workspaceUnspecified=new f("workspace-unspecified",{fontCharacter:"\\ebc3"}),f.terminalCmd=new f("terminal-cmd",{fontCharacter:"\\ebc4"}),f.terminalDebian=new f("terminal-debian",{fontCharacter:"\\ebc5"}),f.terminalLinux=new f("terminal-linux",{fontCharacter:"\\ebc6"}),f.terminalPowershell=new f("terminal-powershell",{fontCharacter:"\\ebc7"}),f.terminalTmux=new f("terminal-tmux",{fontCharacter:"\\ebc8"}),f.terminalUbuntu=new f("terminal-ubuntu",{fontCharacter:"\\ebc9"}),f.terminalBash=new f("terminal-bash",{fontCharacter:"\\ebca"}),f.arrowSwap=new f("arrow-swap",{fontCharacter:"\\ebcb"}),f.copy=new f("copy",{fontCharacter:"\\ebcc"}),f.personAdd=new f("person-add",{fontCharacter:"\\ebcd"}),f.filterFilled=new f("filter-filled",{fontCharacter:"\\ebce"}),f.wand=new f("wand",{fontCharacter:"\\ebcf"}),f.debugLineByLine=new f("debug-line-by-line",{fontCharacter:"\\ebd0"}),f.inspect=new f("inspect",{fontCharacter:"\\ebd1"}),f.layers=new f("layers",{fontCharacter:"\\ebd2"}),f.layersDot=new f("layers-dot",{fontCharacter:"\\ebd3"}),f.layersActive=new f("layers-active",{fontCharacter:"\\ebd4"}),f.compass=new f("compass",{fontCharacter:"\\ebd5"}),f.compassDot=new f("compass-dot",{fontCharacter:"\\ebd6"}),f.compassActive=new f("compass-active",{fontCharacter:"\\ebd7"}),f.azure=new f("azure",{fontCharacter:"\\ebd8"}),f.issueDraft=new f("issue-draft",{fontCharacter:"\\ebd9"}),f.gitPullRequestClosed=new f("git-pull-request-closed",{fontCharacter:"\\ebda"}),f.gitPullRequestDraft=new f("git-pull-request-draft",{fontCharacter:"\\ebdb"}),f.debugAll=new f("debug-all",{fontCharacter:"\\ebdc"}),f.debugCoverage=new f("debug-coverage",{fontCharacter:"\\ebdd"}),f.runErrors=new f("run-errors",{fontCharacter:"\\ebde"}),f.folderLibrary=new f("folder-library",{fontCharacter:"\\ebdf"}),f.debugContinueSmall=new f("debug-continue-small",{fontCharacter:"\\ebe0"}),f.beakerStop=new f("beaker-stop",{fontCharacter:"\\ebe1"}),f.graphLine=new f("graph-line",{fontCharacter:"\\ebe2"}),f.graphScatter=new f("graph-scatter",{fontCharacter:"\\ebe3"}),f.pieChart=new f("pie-chart",{fontCharacter:"\\ebe4"}),f.bracket=new f("bracket",f.json.definition),f.bracketDot=new f("bracket-dot",{fontCharacter:"\\ebe5"}),f.bracketError=new f("bracket-error",{fontCharacter:"\\ebe6"}),f.lockSmall=new f("lock-small",{fontCharacter:"\\ebe7"}),f.azureDevops=new f("azure-devops",{fontCharacter:"\\ebe8"}),f.verifiedFilled=new f("verified-filled",{fontCharacter:"\\ebe9"}),f.newLine=new f("newline",{fontCharacter:"\\ebea"}),f.layout=new f("layout",{fontCharacter:"\\ebeb"}),f.layoutActivitybarLeft=new f("layout-activitybar-left",{fontCharacter:"\\ebec"}),f.layoutActivitybarRight=new f("layout-activitybar-right",{fontCharacter:"\\ebed"}),f.layoutPanelLeft=new f("layout-panel-left",{fontCharacter:"\\ebee"}),f.layoutPanelCenter=new f("layout-panel-center",{fontCharacter:"\\ebef"}),f.layoutPanelJustify=new f("layout-panel-justify",{fontCharacter:"\\ebf0"}),f.layoutPanelRight=new f("layout-panel-right",{fontCharacter:"\\ebf1"}),f.layoutPanel=new f("layout-panel",{fontCharacter:"\\ebf2"}),f.layoutSidebarLeft=new f("layout-sidebar-left",{fontCharacter:"\\ebf3"}),f.layoutSidebarRight=new f("layout-sidebar-right",{fontCharacter:"\\ebf4"}),f.layoutStatusbar=new f("layout-statusbar",{fontCharacter:"\\ebf5"}),f.layoutMenubar=new f("layout-menubar",{fontCharacter:"\\ebf6"}),f.layoutCentered=new f("layout-centered",{fontCharacter:"\\ebf7"}),f.target=new f("target",{fontCharacter:"\\ebf8"}),f.indent=new f("indent",{fontCharacter:"\\ebf9"}),f.recordSmall=new f("record-small",{fontCharacter:"\\ebfa"}),f.errorSmall=new f("error-small",{fontCharacter:"\\ebfb"}),f.arrowCircleDown=new f("arrow-circle-down",{fontCharacter:"\\ebfc"}),f.arrowCircleLeft=new f("arrow-circle-left",{fontCharacter:"\\ebfd"}),f.arrowCircleRight=new f("arrow-circle-right",{fontCharacter:"\\ebfe"}),f.arrowCircleUp=new f("arrow-circle-up",{fontCharacter:"\\ebff"}),f.dialogError=new f("dialog-error",f.error.definition),f.dialogWarning=new f("dialog-warning",f.warning.definition),f.dialogInfo=new f("dialog-info",f.info.definition),f.dialogClose=new f("dialog-close",f.close.definition),f.treeItemExpanded=new f("tree-item-expanded",f.chevronDown.definition),f.treeFilterOnTypeOn=new f("tree-filter-on-type-on",f.listFilter.definition),f.treeFilterOnTypeOff=new f("tree-filter-on-type-off",f.listSelection.definition),f.treeFilterClear=new f("tree-filter-clear",f.close.definition),f.treeItemLoading=new f("tree-item-loading",f.loading.definition),f.menuSelection=new f("menu-selection",f.check.definition),f.menuSubmenu=new f("menu-submenu",f.chevronRight.definition),f.menuBarMore=new f("menubar-more",f.more.definition),f.scrollbarButtonLeft=new f("scrollbar-button-left",f.triangleLeft.definition),f.scrollbarButtonRight=new f("scrollbar-button-right",f.triangleRight.definition),f.scrollbarButtonUp=new f("scrollbar-button-up",f.triangleUp.definition),f.scrollbarButtonDown=new f("scrollbar-button-down",f.triangleDown.definition),f.toolBarMore=new f("toolbar-more",f.more.definition),f.quickInputBack=new f("quick-input-back",f.arrowLeft.definition);function _(k,D){const I=["codicon","codicon-"+k];return D&&I.push("codicon-modifier-"+D),I}e.getClassNamesArray=_;var A;(function(k){k.iconNameSegment="[A-Za-z0-9]+",k.iconNameExpression="[A-Za-z0-9-]+",k.iconModifierExpression="~[A-Za-z]+",k.iconNameCharacter="[A-Za-z0-9~-]";const D=new RegExp(`^(${k.iconNameExpression})(${k.iconModifierExpression})?$`);function I(C){if(C instanceof f)return["codicon","codicon-"+C.id];const o=D.exec(C.id);if(!o)return I(f.error);let[,c,i]=o;const S=["codicon","codicon-"+c];return i&&S.push("codicon-modifier-"+i.substr(1)),S}k.asClassNameArray=I;function w(C){return I(C).join(" ")}k.asClassName=w;function v(C){return"."+I(C).join(".")}k.asCSSSelector=v})(A=e.CSSIcon||(e.CSSIcon={}))}),define(ne[143],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SetMap=e.diffMaps=e.diffSets=e.fromMap=e.groupBy=e.forEach=e.values=void 0;const t=Object.prototype.hasOwnProperty;function f(v){const C=[];for(let o in v)t.call(v,o)&&C.push(v[o]);return C}e.values=f;function _(v,C){for(let o in v)if(t.call(v,o)&&C({key:o,value:v[o]},function(){delete v[o]})===!1)return}e.forEach=_;function A(v,C){const o=Object.create(null);for(const c of v){const i=C(c);let S=o[i];S||(S=o[i]=[]),S.push(c)}return o}e.groupBy=A;function k(v){const C=Object.create(null);return v&&v.forEach((o,c)=>{C[c]=o}),C}e.fromMap=k;function D(v,C){const o=[],c=[];for(let i of v)C.has(i)||o.push(i);for(let i of C)v.has(i)||c.push(i);return{removed:o,added:c}}e.diffSets=D;function I(v,C){const o=[],c=[];for(let[i,S]of v)C.has(i)||o.push(S);for(let[i,S]of C)v.has(i)||c.push(S);return{removed:o,added:c}}e.diffMaps=I;class w{constructor(){this.map=new Map}add(C,o){let c=this.map.get(C);c||(c=new Set,this.map.set(C,c)),c.add(o)}delete(C,o){const c=this.map.get(C);!c||(c.delete(o),c.size===0&&this.map.delete(C))}forEach(C,o){const c=this.map.get(C);!c||c.forEach(o)}}e.SetMap=w}),define(ne[66],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Color=e.HSVA=e.HSLA=e.RGBA=void 0;function t(D,I){const w=Math.pow(10,I);return Math.round(D*w)/w}class f{constructor(I,w,v,C=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,I))|0,this.g=Math.min(255,Math.max(0,w))|0,this.b=Math.min(255,Math.max(0,v))|0,this.a=t(Math.max(Math.min(1,C),0),3)}static equals(I,w){return I.r===w.r&&I.g===w.g&&I.b===w.b&&I.a===w.a}}e.RGBA=f;class _{constructor(I,w,v,C){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,I),0)|0,this.s=t(Math.max(Math.min(1,w),0),3),this.l=t(Math.max(Math.min(1,v),0),3),this.a=t(Math.max(Math.min(1,C),0),3)}static equals(I,w){return I.h===w.h&&I.s===w.s&&I.l===w.l&&I.a===w.a}static fromRGBA(I){const w=I.r/255,v=I.g/255,C=I.b/255,o=I.a,c=Math.max(w,v,C),i=Math.min(w,v,C);let S=0,s=0;const l=(i+c)/2,r=c-i;if(r>0){switch(s=Math.min(l<=.5?r/(2*l):r/(2-2*l),1),c){case w:S=(v-C)/r+(v<C?6:0);break;case v:S=(C-w)/r+2;break;case C:S=(w-v)/r+4;break}S*=60,S=Math.round(S)}return new _(S,s,l,o)}static _hue2rgb(I,w,v){return v<0&&(v+=1),v>1&&(v-=1),v<1/6?I+(w-I)*6*v:v<1/2?w:v<2/3?I+(w-I)*(2/3-v)*6:I}static toRGBA(I){const w=I.h/360,{s:v,l:C,a:o}=I;let c,i,S;if(v===0)c=i=S=C;else{const s=C<.5?C*(1+v):C+v-C*v,l=2*C-s;c=_._hue2rgb(l,s,w+1/3),i=_._hue2rgb(l,s,w),S=_._hue2rgb(l,s,w-1/3)}return new f(Math.round(c*255),Math.round(i*255),Math.round(S*255),o)}}e.HSLA=_;class A{constructor(I,w,v,C){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,I),0)|0,this.s=t(Math.max(Math.min(1,w),0),3),this.v=t(Math.max(Math.min(1,v),0),3),this.a=t(Math.max(Math.min(1,C),0),3)}static equals(I,w){return I.h===w.h&&I.s===w.s&&I.v===w.v&&I.a===w.a}static fromRGBA(I){const w=I.r/255,v=I.g/255,C=I.b/255,o=Math.max(w,v,C),c=Math.min(w,v,C),i=o-c,S=o===0?0:i/o;let s;return i===0?s=0:o===w?s=((v-C)/i%6+6)%6:o===v?s=(C-w)/i+2:s=(w-v)/i+4,new A(Math.round(s*60),S,o,I.a)}static toRGBA(I){const{h:w,s:v,v:C,a:o}=I,c=C*v,i=c*(1-Math.abs(w/60%2-1)),S=C-c;let[s,l,r]=[0,0,0];return w<60?(s=c,l=i):w<120?(s=i,l=c):w<180?(l=c,r=i):w<240?(l=i,r=c):w<300?(s=i,r=c):w<=360&&(s=c,r=i),s=Math.round((s+S)*255),l=Math.round((l+S)*255),r=Math.round((r+S)*255),new f(s,l,r,o)}}e.HSVA=A;class k{constructor(I){if(I)if(I instanceof f)this.rgba=I;else if(I instanceof _)this._hsla=I,this.rgba=_.toRGBA(I);else if(I instanceof A)this._hsva=I,this.rgba=A.toRGBA(I);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}static fromHex(I){return k.Format.CSS.parseHex(I)||k.red}get hsla(){return this._hsla?this._hsla:_.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:A.fromRGBA(this.rgba)}equals(I){return!!I&&f.equals(this.rgba,I.rgba)&&_.equals(this.hsla,I.hsla)&&A.equals(this.hsva,I.hsva)}getRelativeLuminance(){const I=k._relativeLuminanceForComponent(this.rgba.r),w=k._relativeLuminanceForComponent(this.rgba.g),v=k._relativeLuminanceForComponent(this.rgba.b),C=.2126*I+.7152*w+.0722*v;return t(C,4)}static _relativeLuminanceForComponent(I){const w=I/255;return w<=.03928?w/12.92:Math.pow((w+.055)/1.055,2.4)}getContrastRatio(I){const w=this.getRelativeLuminance(),v=I.getRelativeLuminance();return w>v?(w+.05)/(v+.05):(v+.05)/(w+.05)}isDarker(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3<128}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(I){const w=this.getRelativeLuminance(),v=I.getRelativeLuminance();return w>v}isDarkerThan(I){const w=this.getRelativeLuminance(),v=I.getRelativeLuminance();return w<v}lighten(I){return new k(new _(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*I,this.hsla.a))}darken(I){return new k(new _(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*I,this.hsla.a))}transparent(I){const{r:w,g:v,b:C,a:o}=this.rgba;return new k(new f(w,v,C,o*I))}isTransparent(){return this.rgba.a===0}isOpaque(){return this.rgba.a===1}opposite(){return new k(new f(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}blend(I){const w=I.rgba,v=this.rgba.a,C=w.a,o=v+C*(1-v);if(o<1e-6)return k.transparent;const c=this.rgba.r*v/o+w.r*C*(1-v)/o,i=this.rgba.g*v/o+w.g*C*(1-v)/o,S=this.rgba.b*v/o+w.b*C*(1-v)/o;return new k(new f(c,i,S,o))}makeOpaque(I){if(this.isOpaque()||I.rgba.a!==1)return this;const{r:w,g:v,b:C,a:o}=this.rgba;return new k(new f(I.rgba.r-o*(I.rgba.r-w),I.rgba.g-o*(I.rgba.g-v),I.rgba.b-o*(I.rgba.b-C),1))}flatten(...I){const w=I.reduceRight((v,C)=>k._flatten(C,v));return k._flatten(this,w)}static _flatten(I,w){const v=1-I.rgba.a;return new k(new f(v*w.rgba.r+I.rgba.a*I.rgba.r,v*w.rgba.g+I.rgba.a*I.rgba.g,v*w.rgba.b+I.rgba.a*I.rgba.b))}toString(){return this._toString||(this._toString=k.Format.CSS.format(this)),this._toString}static getLighterColor(I,w,v){if(I.isLighterThan(w))return I;v=v||.5;const C=I.getRelativeLuminance(),o=w.getRelativeLuminance();return v=v*(o-C)/o,I.lighten(v)}static getDarkerColor(I,w,v){if(I.isDarkerThan(w))return I;v=v||.5;const C=I.getRelativeLuminance(),o=w.getRelativeLuminance();return v=v*(C-o)/C,I.darken(v)}}e.Color=k,k.white=new k(new f(255,255,255,1)),k.black=new k(new f(0,0,0,1)),k.red=new k(new f(255,0,0,1)),k.blue=new k(new f(0,0,255,1)),k.green=new k(new f(0,255,0,1)),k.cyan=new k(new f(0,255,255,1)),k.lightgrey=new k(new f(211,211,211,1)),k.transparent=new k(new f(0,0,0,0)),function(D){let I;(function(w){let v;(function(C){function o(n){return n.rgba.a===1?`rgb(${n.rgba.r}, ${n.rgba.g}, ${n.rgba.b})`:D.Format.CSS.formatRGBA(n)}C.formatRGB=o;function c(n){return`rgba(${n.rgba.r}, ${n.rgba.g}, ${n.rgba.b}, ${+n.rgba.a.toFixed(2)})`}C.formatRGBA=c;function i(n){return n.hsla.a===1?`hsl(${n.hsla.h}, ${(n.hsla.s*100).toFixed(2)}%, ${(n.hsla.l*100).toFixed(2)}%)`:D.Format.CSS.formatHSLA(n)}C.formatHSL=i;function S(n){return`hsla(${n.hsla.h}, ${(n.hsla.s*100).toFixed(2)}%, ${(n.hsla.l*100).toFixed(2)}%, ${n.hsla.a.toFixed(2)})`}C.formatHSLA=S;function s(n){const h=n.toString(16);return h.length!==2?"0"+h:h}function l(n){return`#${s(n.rgba.r)}${s(n.rgba.g)}${s(n.rgba.b)}`}C.formatHex=l;function r(n,h=!1){return h&&n.rgba.a===1?D.Format.CSS.formatHex(n):`#${s(n.rgba.r)}${s(n.rgba.g)}${s(n.rgba.b)}${s(Math.round(n.rgba.a*255))}`}C.formatHexA=r;function p(n){return n.isOpaque()?D.Format.CSS.formatHex(n):D.Format.CSS.formatRGBA(n)}C.format=p;function u(n){const h=n.length;if(h===0||n.charCodeAt(0)!==35)return null;if(h===7){const g=16*a(n.charCodeAt(1))+a(n.charCodeAt(2)),d=16*a(n.charCodeAt(3))+a(n.charCodeAt(4)),m=16*a(n.charCodeAt(5))+a(n.charCodeAt(6));return new D(new f(g,d,m,1))}if(h===9){const g=16*a(n.charCodeAt(1))+a(n.charCodeAt(2)),d=16*a(n.charCodeAt(3))+a(n.charCodeAt(4)),m=16*a(n.charCodeAt(5))+a(n.charCodeAt(6)),b=16*a(n.charCodeAt(7))+a(n.charCodeAt(8));return new D(new f(g,d,m,b/255))}if(h===4){const g=a(n.charCodeAt(1)),d=a(n.charCodeAt(2)),m=a(n.charCodeAt(3));return new D(new f(16*g+g,16*d+d,16*m+m))}if(h===5){const g=a(n.charCodeAt(1)),d=a(n.charCodeAt(2)),m=a(n.charCodeAt(3)),b=a(n.charCodeAt(4));return new D(new f(16*g+g,16*d+d,16*m+m,(16*b+b)/255))}return null}C.parseHex=u;function a(n){switch(n){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}})(v=w.CSS||(w.CSS={}))})(I=D.Format||(D.Format={}))}(k=e.Color||(e.Color={}))}),define(ne[110],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.throttle=e.debounce=e.memoize=e.createDecorator=void 0;function t(k){return(D,I,w)=>{let v=null,C=null;if(typeof w.value=="function"?(v="value",C=w.value):typeof w.get=="function"&&(v="get",C=w.get),!C)throw new Error("not supported");w[v]=k(C,I)}}e.createDecorator=t;function f(k,D,I){let w=null,v=null;if(typeof I.value=="function"?(w="value",v=I.value,v.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof I.get=="function"&&(w="get",v=I.get),!v)throw new Error("not supported");const C=`$memoize$${D}`;I[w]=function(...o){return this.hasOwnProperty(C)||Object.defineProperty(this,C,{configurable:!1,enumerable:!1,writable:!1,value:v.apply(this,o)}),this[C]}}e.memoize=f;function _(k,D,I){return t((w,v)=>{const C=`$debounce$${v}`,o=`$debounce$result$${v}`;return function(...c){this[o]||(this[o]=I?I():void 0),clearTimeout(this[C]),D&&(this[o]=D(this[o],...c),c=[this[o]]),this[C]=setTimeout(()=>{w.apply(this,c),this[o]=I?I():void 0},k)}})}e.debounce=_;function A(k,D,I){return t((w,v)=>{const C=`$throttle$timer$${v}`,o=`$throttle$result$${v}`,c=`$throttle$lastRun$${v}`,i=`$throttle$pending$${v}`;return function(...S){if(this[o]||(this[o]=I?I():void 0),(this[c]===null||this[c]===void 0)&&(this[c]=-Number.MAX_VALUE),D&&(this[o]=D(this[o],...S)),this[i])return;const s=this[c]+k;s<=Date.now()?(this[c]=Date.now(),w.apply(this,[this[o]]),this[o]=I?I():void 0):(this[i]=!0,this[C]=setTimeout(()=>{this[i]=!1,this[c]=Date.now(),w.apply(this,[this[o]]),this[o]=I?I():void 0},s-Date.now()))}})}e.throttle=A}),define(ne[955],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffChange=void 0;class t{constructor(_,A,k,D){this.originalStart=_,this.originalLength=A,this.modifiedStart=k,this.modifiedLength=D}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}e.DiffChange=t}),define(ne[22],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorNoTelemetry=e.ExpectedError=e.NotSupportedError=e.NotImplementedError=e.getErrorMessage=e.disposed=e.readonly=e.illegalState=e.illegalArgument=e.canceled=e.CancellationError=e.isCancellationError=e.transformErrorForSerialization=e.onUnexpectedExternalError=e.onUnexpectedError=e.setUnexpectedErrorHandler=e.errorHandler=e.ErrorHandler=void 0;class t{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(a){setTimeout(()=>{throw a.stack?new Error(a.message+` `+a.stack):a},0)}}addListener(a){return this.listeners.push(a),()=>{this._removeListener(a)}}emit(a){this.listeners.forEach(n=>{n(a)})}_removeListener(a){this.listeners.splice(this.listeners.indexOf(a),1)}setUnexpectedErrorHandler(a){this.unexpectedErrorHandler=a}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(a){this.unexpectedErrorHandler(a),this.emit(a)}onUnexpectedExternalError(a){this.unexpectedErrorHandler(a)}}e.ErrorHandler=t,e.errorHandler=new t;function f(u){e.errorHandler.setUnexpectedErrorHandler(u)}e.setUnexpectedErrorHandler=f;function _(u){I(u)||e.errorHandler.onUnexpectedError(u)}e.onUnexpectedError=_;function A(u){I(u)||e.errorHandler.onUnexpectedExternalError(u)}e.onUnexpectedExternalError=A;function k(u){if(u instanceof Error){let{name:a,message:n}=u;const h=u.stacktrace||u.stack;return{$isError:!0,name:a,message:n,stack:h}}return u}e.transformErrorForSerialization=k;const D="Canceled";function I(u){return u instanceof w?!0:u instanceof Error&&u.name===D&&u.message===D}e.isCancellationError=I;class w extends Error{constructor(){super(D);this.name=this.message}}e.CancellationError=w;function v(){const u=new Error(D);return u.name=u.message,u}e.canceled=v;function C(u){return u?new Error(`Illegal argument: ${u}`):new Error("Illegal argument")}e.illegalArgument=C;function o(u){return u?new Error(`Illegal state: ${u}`):new Error("Illegal state")}e.illegalState=o;function c(u){return u?new Error(`readonly property '${u} cannot be changed'`):new Error("readonly property cannot be changed")}e.readonly=c;function i(u){const a=new Error(`${u} has been disposed`);return a.name="DISPOSED",a}e.disposed=i;function S(u){return u?u.message?u.message:u.stack?u.stack.split(` `)[0]:String(u):"Error"}e.getErrorMessage=S;class s extends Error{constructor(a){super("NotImplemented");a&&(this.message=a)}}e.NotImplementedError=s;class l extends Error{constructor(a){super("NotSupported");a&&(this.message=a)}}e.NotSupportedError=l;class r extends Error{constructor(){super(...arguments);this.isExpected=!0}}e.ExpectedError=r;class p extends Error{constructor(){super(...arguments);this.logTelemetry=!1}static fromError(a){if(a&&a instanceof Error){const n=new p;return n.name=a.name,n.message=a.message,n.stack=a.stack,n}return new p(a)}}e.ErrorNoTelemetry=p}),define(ne[15],re([1,0,22]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ArrayQueue=e.findMinBy=e.findLastMaxBy=e.findMaxBy=e.numberComparator=e.compareBy=e.splice=e.insertInto=e.mapFind=e.getRandomElement=e.asArray=e.mapArrayOrNot=e.pushMany=e.pushToEnd=e.pushToStart=e.shuffle=e.arrayInsert=e.remove=e.insert=e.index=e.range=e.flatten=e.commonPrefixLength=e.lastOrDefault=e.firstOrDefault=e.lastIndex=e.findLast=e.uniqueFilter=e.distinct=e.isNonEmptyArray=e.isFalsyOrEmpty=e.move=e.coalesceInPlace=e.coalesce=e.topAsync=e.top=e.delta=e.sortedDiff=e.groupBy=e.quickSelect=e.findFirstInSorted=e.binarySearch=e.equals=e.tail2=e.tail=void 0;function f(Y,$=0){return Y[Y.length-(1+$)]}e.tail=f;function _(Y){if(Y.length===0)throw new Error("Invalid tail call");return[Y.slice(0,Y.length-1),Y[Y.length-1]]}e.tail2=_;function A(Y,$,J=(ee,te)=>ee===te){if(Y===$)return!0;if(!Y||!$||Y.length!==$.length)return!1;for(let ee=0,te=Y.length;ee<te;ee++)if(!J(Y[ee],$[ee]))return!1;return!0}e.equals=A;function k(Y,$,J){let ee=0,te=Y.length-1;for(;ee<=te;){const se=(ee+te)/2|0,ie=J(Y[se],$);if(ie<0)ee=se+1;else if(ie>0)te=se-1;else return se}return-(ee+1)}e.binarySearch=k;function D(Y,$){let J=0,ee=Y.length;if(ee===0)return 0;for(;J<ee;){const te=Math.floor((J+ee)/2);$(Y[te])?ee=te:J=te+1}return J}e.findFirstInSorted=D;function I(Y,$,J){if(Y=Y|0,Y>=$.length)throw new TypeError("invalid index");let ee=$[Math.floor($.length*Math.random())],te=[],se=[],ie=[];for(let ce of $){const le=J(ce,ee);le<0?te.push(ce):le>0?se.push(ce):ie.push(ce)}return Y<te.length?I(Y,te,J):Y<te.length+ie.length?ie[0]:I(Y-(te.length+ie.length),se,J)}e.quickSelect=I;function w(Y,$){const J=[];let ee;for(const te of Y.slice(0).sort($))!ee||$(ee[0],te)!==0?(ee=[te],J.push(ee)):ee.push(te);return J}e.groupBy=w;function v(Y,$,J){const ee=[];function te(ce,le,ae){if(le===0&&ae.length===0)return;const ue=ee[ee.length-1];ue&&ue.start+ue.deleteCount===ce?(ue.deleteCount+=le,ue.toInsert.push(...ae)):ee.push({start:ce,deleteCount:le,toInsert:ae})}let se=0,ie=0;for(;;){if(se===Y.length){te(se,0,$.slice(ie));break}if(ie===$.length){te(se,Y.length-se,[]);break}const ce=Y[se],le=$[ie],ae=J(ce,le);ae===0?(se+=1,ie+=1):ae<0?(te(se,1,[]),se+=1):ae>0&&(te(se,0,[le]),ie+=1)}return ee}e.sortedDiff=v;function C(Y,$,J){const ee=v(Y,$,J),te=[],se=[];for(const ie of ee)te.push(...Y.slice(ie.start,ie.start+ie.deleteCount)),se.push(...ie.toInsert);return{removed:te,added:se}}e.delta=C;function o(Y,$,J){if(J===0)return[];const ee=Y.slice(0,J).sort($);return i(Y,$,ee,J,Y.length),ee}e.top=o;function c(Y,$,J,ee,te){return J===0?Promise.resolve([]):new Promise((se,ie)=>{(async()=>{const ce=Y.length,le=Y.slice(0,J).sort($);for(let ae=J,ue=Math.min(J+ee,ce);ae<ce;ae=ue,ue=Math.min(ue+ee,ce)){if(ae>J&&await new Promise(oe=>setTimeout(oe)),te&&te.isCancellationRequested)throw(0,t.canceled)();i(Y,$,le,ae,ue)}return le})().then(se,ie)})}e.topAsync=c;function i(Y,$,J,ee,te){for(const se=J.length;ee<te;ee++){const ie=Y[ee];if($(ie,J[se-1])<0){J.pop();const ce=D(J,le=>$(ie,le)<0);J.splice(ce,0,ie)}}}function S(Y){return Y.filter($=>!!$)}e.coalesce=S;function s(Y){let $=0;for(let J=0;J<Y.length;J++)Y[J]&&(Y[$]=Y[J],$+=1);Y.length=$}e.coalesceInPlace=s;function l(Y,$,J){Y.splice(J,0,Y.splice($,1)[0])}e.move=l;function r(Y){return!Array.isArray(Y)||Y.length===0}e.isFalsyOrEmpty=r;function p(Y){return Array.isArray(Y)&&Y.length>0}e.isNonEmptyArray=p;function u(Y,$=J=>J){const J=new Set;return Y.filter(ee=>{const te=$(ee);return J.has(te)?!1:(J.add(te),!0)})}e.distinct=u;function a(Y){const $=new Set;return J=>{const ee=Y(J);return $.has(ee)?!1:($.add(ee),!0)}}e.uniqueFilter=a;function n(Y,$){const J=h(Y,$);if(J!==-1)return Y[J]}e.findLast=n;function h(Y,$){for(let J=Y.length-1;J>=0;J--){const ee=Y[J];if($(ee))return J}return-1}e.lastIndex=h;function g(Y,$){return Y.length>0?Y[0]:$}e.firstOrDefault=g;function d(Y,$){return Y.length>0?Y[Y.length-1]:$}e.lastOrDefault=d;function m(Y,$,J=(ee,te)=>ee===te){let ee=0;for(let te=0,se=Math.min(Y.length,$.length);te<se&&J(Y[te],$[te]);te++)ee++;return ee}e.commonPrefixLength=m;function b(Y){return[].concat(...Y)}e.flatten=b;function E(Y,$){let J=typeof $=="number"?Y:0;typeof $=="number"?J=Y:(J=0,$=Y);const ee=[];if(J<=$)for(let te=J;te<$;te++)ee.push(te);else for(let te=J;te>$;te--)ee.push(te);return ee}e.range=E;function y(Y,$,J){return Y.reduce((ee,te)=>(ee[$(te)]=J?J(te):te,ee),Object.create(null))}e.index=y;function T(Y,$){return Y.push($),()=>R(Y,$)}e.insert=T;function R(Y,$){const J=Y.indexOf($);if(J>-1)return Y.splice(J,1),$}e.remove=R;function O(Y,$,J){const ee=Y.slice(0,$),te=Y.slice($);return ee.concat(J,te)}e.arrayInsert=O;function x(Y,$){let J;if(typeof $=="number"){let ee=$;J=()=>{const te=Math.sin(ee++)*179426549;return te-Math.floor(te)}}else J=Math.random;for(let ee=Y.length-1;ee>0;ee-=1){const te=Math.floor(J()*(ee+1)),se=Y[ee];Y[ee]=Y[te],Y[te]=se}}e.shuffle=x;function F(Y,$){const J=Y.indexOf($);J>-1&&(Y.splice(J,1),Y.unshift($))}e.pushToStart=F;function L(Y,$){const J=Y.indexOf($);J>-1&&(Y.splice(J,1),Y.push($))}e.pushToEnd=L;function M(Y,$){for(const J of $)Y.push(J)}e.pushMany=M;function N(Y,$){return Array.isArray(Y)?Y.map($):$(Y)}e.mapArrayOrNot=N;function B(Y){return Array.isArray(Y)?Y:[Y]}e.asArray=B;function P(Y){return Y[Math.floor(Math.random()*Y.length)]}e.getRandomElement=P;function V(Y,$){for(const J of Y){const ee=$(J);if(ee!==void 0)return ee}}e.mapFind=V;function z(Y,$,J){const ee=H(Y,$),te=Y.length,se=J.length;Y.length=te+se;for(let ie=te-1;ie>=ee;ie--)Y[ie+se]=Y[ie];for(let ie=0;ie<se;ie++)Y[ie+ee]=J[ie]}e.insertInto=z;function U(Y,$,J,ee){const te=H(Y,$),se=Y.splice(te,J);return z(Y,te,ee),se}e.splice=U;function H(Y,$){return $<0?Math.max($+Y.length,0):Math.min($,Y.length)}function K(Y,$){return(J,ee)=>$(Y(J),Y(ee))}e.compareBy=K;const G=(Y,$)=>Y-$;e.numberComparator=G;function q(Y,$){if(Y.length===0)return;let J=Y[0];for(let ee=1;ee<Y.length;ee++){const te=Y[ee];$(te,J)>0&&(J=te)}return J}e.findMaxBy=q;function Z(Y,$){if(Y.length===0)return;let J=Y[0];for(let ee=1;ee<Y.length;ee++){const te=Y[ee];$(te,J)>=0&&(J=te)}return J}e.findLastMaxBy=Z;function j(Y,$){return q(Y,(J,ee)=>-$(J,ee))}e.findMinBy=j;class X{constructor($){this.items=$,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile($){let J=this.firstIdx;for(;J<this.items.length&&$(this.items[J]);)J++;const ee=J===this.firstIdx?null:this.items.slice(this.firstIdx,J);return this.firstIdx=J,ee}takeFromEndWhile($){let J=this.lastIdx;for(;J>=0&&$(this.items[J]);)J--;const ee=J===this.lastIdx?null:this.items.slice(J+1,this.lastIdx+1);return this.lastIdx=J,ee}peek(){return this.items[this.firstIdx]}dequeue(){const $=this.items[this.firstIdx];return this.firstIdx++,$}takeCount($){const J=this.items.slice(this.firstIdx,this.firstIdx+$);return this.firstIdx+=$,J}}e.ArrayQueue=X}),define(ne[150],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.once=void 0;function t(f){const _=this;let A=!1,k;return function(){return A||(A=!0,k=f.apply(_,arguments)),k}}e.once=t}),define(ne[338],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultGenerator=e.IdGenerator=void 0;class t{constructor(_){this._prefix=_,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}e.IdGenerator=t,e.defaultGenerator=new t("id#")}),define(ne[92],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Iterable=void 0;var t;(function(f){function _(a){return a&&typeof a=="object"&&typeof a[Symbol.iterator]=="function"}f.is=_;const A=Object.freeze([]);function k(){return A}f.empty=k;function*D(a){yield a}f.single=D;function I(a){return a||A}f.from=I;function w(a){return!a||a[Symbol.iterator]().next().done===!0}f.isEmpty=w;function v(a){return a[Symbol.iterator]().next().value}f.first=v;function C(a,n){for(const h of a)if(n(h))return!0;return!1}f.some=C;function o(a,n){for(const h of a)if(n(h))return h}f.find=o;function*c(a,n){for(const h of a)n(h)&&(yield h)}f.filter=c;function*i(a,n){let h=0;for(const g of a)yield n(g,h++)}f.map=i;function*S(...a){for(const n of a)for(const h of n)yield h}f.concat=S;function*s(a){for(const n of a)for(const h of n)yield h}f.concatNested=s;function l(a,n,h){let g=h;for(const d of a)g=n(g,d);return g}f.reduce=l;function*r(a,n,h=a.length){for(n<0&&(n+=a.length),h<0?h+=a.length:h>a.length&&(h=a.length);n<h;n++)yield a[n]}f.slice=r;function p(a,n=Number.POSITIVE_INFINITY){const h=[];if(n===0)return[h,a];const g=a[Symbol.iterator]();for(let d=0;d<n;d++){const m=g.next();if(m.done)return[h,f.empty()];h.push(m.value)}return[h,{[Symbol.iterator](){return g}}]}f.consume=p;function u(a,n,h=(g,d)=>g===d){const g=a[Symbol.iterator](),d=n[Symbol.iterator]();for(;;){const m=g.next(),b=d.next();if(m.done!==b.done)return!1;if(m.done)return!0;if(!h(m.value,b.value))return!1}}f.equals=u})(t=e.Iterable||(e.Iterable={}))}),define(ne[118],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getNodeType=e.stripComments=e.visit=e.findNodeAtOffset=e.contains=e.getNodeValue=e.getNodePath=e.findNodeAtLocation=e.parseTree=e.parse=e.getLocation=e.createScanner=e.ParseOptions=e.ParseErrorCode=e.SyntaxKind=e.ScanError=void 0;var t;(function(n){n[n.None=0]="None",n[n.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",n[n.UnexpectedEndOfString=2]="UnexpectedEndOfString",n[n.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",n[n.InvalidUnicode=4]="InvalidUnicode",n[n.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",n[n.InvalidCharacter=6]="InvalidCharacter"})(t=e.ScanError||(e.ScanError={}));var f;(function(n){n[n.OpenBraceToken=1]="OpenBraceToken",n[n.CloseBraceToken=2]="CloseBraceToken",n[n.OpenBracketToken=3]="OpenBracketToken",n[n.CloseBracketToken=4]="CloseBracketToken",n[n.CommaToken=5]="CommaToken",n[n.ColonToken=6]="ColonToken",n[n.NullKeyword=7]="NullKeyword",n[n.TrueKeyword=8]="TrueKeyword",n[n.FalseKeyword=9]="FalseKeyword",n[n.StringLiteral=10]="StringLiteral",n[n.NumericLiteral=11]="NumericLiteral",n[n.LineCommentTrivia=12]="LineCommentTrivia",n[n.BlockCommentTrivia=13]="BlockCommentTrivia",n[n.LineBreakTrivia=14]="LineBreakTrivia",n[n.Trivia=15]="Trivia",n[n.Unknown=16]="Unknown",n[n.EOF=17]="EOF"})(f=e.SyntaxKind||(e.SyntaxKind={}));var _;(function(n){n[n.InvalidSymbol=1]="InvalidSymbol",n[n.InvalidNumberFormat=2]="InvalidNumberFormat",n[n.PropertyNameExpected=3]="PropertyNameExpected",n[n.ValueExpected=4]="ValueExpected",n[n.ColonExpected=5]="ColonExpected",n[n.CommaExpected=6]="CommaExpected",n[n.CloseBraceExpected=7]="CloseBraceExpected",n[n.CloseBracketExpected=8]="CloseBracketExpected",n[n.EndOfFileExpected=9]="EndOfFileExpected",n[n.InvalidCommentToken=10]="InvalidCommentToken",n[n.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",n[n.UnexpectedEndOfString=12]="UnexpectedEndOfString",n[n.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",n[n.InvalidUnicode=14]="InvalidUnicode",n[n.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",n[n.InvalidCharacter=16]="InvalidCharacter"})(_=e.ParseErrorCode||(e.ParseErrorCode={}));var A;(function(n){n.DEFAULT={allowTrailingComma:!0}})(A=e.ParseOptions||(e.ParseOptions={}));function k(n,h=!1){let g=0,d=n.length,m="",b=0,E=16,y=0;function T(N){let B=0,P=0;for(;B<N;){const V=n.charCodeAt(g);if(V>=48&&V<=57)P=P*16+V-48;else if(V>=65&&V<=70)P=P*16+V-65+10;else if(V>=97&&V<=102)P=P*16+V-97+10;else break;g++,B++}return B<N&&(P=-1),P}function R(N){g=N,m="",b=0,E=16,y=0}function O(){const N=g;if(n.charCodeAt(g)===48)g++;else for(g++;g<n.length&&w(n.charCodeAt(g));)g++;if(g<n.length&&n.charCodeAt(g)===46)if(g++,g<n.length&&w(n.charCodeAt(g)))for(g++;g<n.length&&w(n.charCodeAt(g));)g++;else return y=3,n.substring(N,g);let B=g;if(g<n.length&&(n.charCodeAt(g)===69||n.charCodeAt(g)===101))if(g++,(g<n.length&&n.charCodeAt(g)===43||n.charCodeAt(g)===45)&&g++,g<n.length&&w(n.charCodeAt(g))){for(g++;g<n.length&&w(n.charCodeAt(g));)g++;B=g}else y=3;return n.substring(N,B)}function x(){let N="",B=g;for(;;){if(g>=d){N+=n.substring(B,g),y=2;break}const P=n.charCodeAt(g);if(P===34){N+=n.substring(B,g),g++;break}if(P===92){if(N+=n.substring(B,g),g++,g>=d){y=2;break}switch(n.charCodeAt(g++)){case 34:N+='"';break;case 92:N+="\\";break;case 47:N+="/";break;case 98:N+="\b";break;case 102:N+="\f";break;case 110:N+=` `;break;case 114:N+="\r";break;case 116:N+=" ";break;case 117:{const z=T(4);z>=0?N+=String.fromCharCode(z):y=4;break}default:y=5}B=g;continue}if(P>=0&&P<=31)if(I(P)){N+=n.substring(B,g),y=2;break}else y=6;g++}return N}function F(){if(m="",y=0,b=g,g>=d)return b=d,E=17;let N=n.charCodeAt(g);if(D(N)){do g++,m+=String.fromCharCode(N),N=n.charCodeAt(g);while(D(N));return E=15}if(I(N))return g++,m+=String.fromCharCode(N),N===13&&n.charCodeAt(g)===10&&(g++,m+=` `),E=14;switch(N){case 123:return g++,E=1;case 125:return g++,E=2;case 91:return g++,E=3;case 93:return g++,E=4;case 58:return g++,E=6;case 44:return g++,E=5;case 34:return g++,m=x(),E=10;case 47:{const B=g-1;if(n.charCodeAt(g+1)===47){for(g+=2;g<d&&!I(n.charCodeAt(g));)g++;return m=n.substring(B,g),E=12}if(n.charCodeAt(g+1)===42){g+=2;const P=d-1;let V=!1;for(;g<P;){if(n.charCodeAt(g)===42&&n.charCodeAt(g+1)===47){g+=2,V=!0;break}g++}return V||(g++,y=1),m=n.substring(B,g),E=13}return m+=String.fromCharCode(N),g++,E=16}case 45:if(m+=String.fromCharCode(N),g++,g===d||!w(n.charCodeAt(g)))return E=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return m+=O(),E=11;default:for(;g<d&&L(N);)g++,N=n.charCodeAt(g);if(b!==g){switch(m=n.substring(b,g),m){case"true":return E=8;case"false":return E=9;case"null":return E=7}return E=16}return m+=String.fromCharCode(N),g++,E=16}}function L(N){if(D(N)||I(N))return!1;switch(N){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function M(){let N;do N=F();while(N>=12&&N<=15);return N}return{setPosition:R,getPosition:()=>g,scan:h?M:F,getToken:()=>E,getTokenValue:()=>m,getTokenOffset:()=>b,getTokenLength:()=>g-b,getTokenError:()=>y}}e.createScanner=k;function D(n){return n===32||n===9||n===11||n===12||n===160||n===5760||n>=8192&&n<=8203||n===8239||n===8287||n===12288||n===65279}function I(n){return n===10||n===13||n===8232||n===8233}function w(n){return n>=48&&n<=57}var v;(function(n){n[n.nullCharacter=0]="nullCharacter",n[n.maxAsciiCharacter=127]="maxAsciiCharacter",n[n.lineFeed=10]="lineFeed",n[n.carriageReturn=13]="carriageReturn",n[n.lineSeparator=8232]="lineSeparator",n[n.paragraphSeparator=8233]="paragraphSeparator",n[n.nextLine=133]="nextLine",n[n.space=32]="space",n[n.nonBreakingSpace=160]="nonBreakingSpace",n[n.enQuad=8192]="enQuad",n[n.emQuad=8193]="emQuad",n[n.enSpace=8194]="enSpace",n[n.emSpace=8195]="emSpace",n[n.threePerEmSpace=8196]="threePerEmSpace",n[n.fourPerEmSpace=8197]="fourPerEmSpace",n[n.sixPerEmSpace=8198]="sixPerEmSpace",n[n.figureSpace=8199]="figureSpace",n[n.punctuationSpace=8200]="punctuationSpace",n[n.thinSpace=8201]="thinSpace",n[n.hairSpace=8202]="hairSpace",n[n.zeroWidthSpace=8203]="zeroWidthSpace",n[n.narrowNoBreakSpace=8239]="narrowNoBreakSpace",n[n.ideographicSpace=12288]="ideographicSpace",n[n.mathematicalSpace=8287]="mathematicalSpace",n[n.ogham=5760]="ogham",n[n._=95]="_",n[n.$=36]="$",n[n._0=48]="_0",n[n._1=49]="_1",n[n._2=50]="_2",n[n._3=51]="_3",n[n._4=52]="_4",n[n._5=53]="_5",n[n._6=54]="_6",n[n._7=55]="_7",n[n._8=56]="_8",n[n._9=57]="_9",n[n.a=97]="a",n[n.b=98]="b",n[n.c=99]="c",n[n.d=100]="d",n[n.e=101]="e",n[n.f=102]="f",n[n.g=103]="g",n[n.h=104]="h",n[n.i=105]="i",n[n.j=106]="j",n[n.k=107]="k",n[n.l=108]="l",n[n.m=109]="m",n[n.n=110]="n",n[n.o=111]="o",n[n.p=112]="p",n[n.q=113]="q",n[n.r=114]="r",n[n.s=115]="s",n[n.t=116]="t",n[n.u=117]="u",n[n.v=118]="v",n[n.w=119]="w",n[n.x=120]="x",n[n.y=121]="y",n[n.z=122]="z",n[n.A=65]="A",n[n.B=66]="B",n[n.C=67]="C",n[n.D=68]="D",n[n.E=69]="E",n[n.F=70]="F",n[n.G=71]="G",n[n.H=72]="H",n[n.I=73]="I",n[n.J=74]="J",n[n.K=75]="K",n[n.L=76]="L",n[n.M=77]="M",n[n.N=78]="N",n[n.O=79]="O",n[n.P=80]="P",n[n.Q=81]="Q",n[n.R=82]="R",n[n.S=83]="S",n[n.T=84]="T",n[n.U=85]="U",n[n.V=86]="V",n[n.W=87]="W",n[n.X=88]="X",n[n.Y=89]="Y",n[n.Z=90]="Z",n[n.ampersand=38]="ampersand",n[n.asterisk=42]="asterisk",n[n.at=64]="at",n[n.backslash=92]="backslash",n[n.bar=124]="bar",n[n.caret=94]="caret",n[n.closeBrace=125]="closeBrace",n[n.closeBracket=93]="closeBracket",n[n.closeParen=41]="closeParen",n[n.colon=58]="colon",n[n.comma=44]="comma",n[n.dot=46]="dot",n[n.doubleQuote=34]="doubleQuote",n[n.equals=61]="equals",n[n.exclamation=33]="exclamation",n[n.greaterThan=62]="greaterThan",n[n.lessThan=60]="lessThan",n[n.minus=45]="minus",n[n.openBrace=123]="openBrace",n[n.openBracket=91]="openBracket",n[n.openParen=40]="openParen",n[n.percent=37]="percent",n[n.plus=43]="plus",n[n.question=63]="question",n[n.semicolon=59]="semicolon",n[n.singleQuote=39]="singleQuote",n[n.slash=47]="slash",n[n.tilde=126]="tilde",n[n.backspace=8]="backspace",n[n.formFeed=12]="formFeed",n[n.byteOrderMark=65279]="byteOrderMark",n[n.tab=9]="tab",n[n.verticalTab=11]="verticalTab"})(v||(v={}));function C(n,h){const g=[],d=new Object;let m;const b={value:{},offset:0,length:0,type:"object",parent:void 0};let E=!1;function y(T,R,O,x){b.value=T,b.offset=R,b.length=O,b.type=x,b.colonOffset=void 0,m=b}try{p(n,{onObjectBegin:(T,R)=>{if(h<=T)throw d;m=void 0,E=h>T,g.push("")},onObjectProperty:(T,R,O)=>{if(h<R||(y(T,R,O,"property"),g[g.length-1]=T,h<=R+O))throw d},onObjectEnd:(T,R)=>{if(h<=T)throw d;m=void 0,g.pop()},onArrayBegin:(T,R)=>{if(h<=T)throw d;m=void 0,g.push(0)},onArrayEnd:(T,R)=>{if(h<=T)throw d;m=void 0,g.pop()},onLiteralValue:(T,R,O)=>{if(h<R||(y(T,R,O,a(T)),h<=R+O))throw d},onSeparator:(T,R,O)=>{if(h<=R)throw d;if(T===":"&&m&&m.type==="property")m.colonOffset=R,E=!1,m=void 0;else if(T===","){const x=g[g.length-1];typeof x=="number"?g[g.length-1]=x+1:(E=!0,g[g.length-1]=""),m=void 0}}})}catch(T){if(T!==d)throw T}return{path:g,previousNode:m,isAtPropertyKey:E,matches:T=>{let R=0;for(let O=0;R<T.length&&O<g.length;O++)if(T[R]===g[O]||T[R]==="*")R++;else if(T[R]!=="**")return!1;return R===T.length}}}e.getLocation=C;function o(n,h=[],g=A.DEFAULT){let d=null,m=[];const b=[];function E(T){Array.isArray(m)?m.push(T):d!==null&&(m[d]=T)}return p(n,{onObjectBegin:()=>{const T={};E(T),b.push(m),m=T,d=null},onObjectProperty:T=>{d=T},onObjectEnd:()=>{m=b.pop()},onArrayBegin:()=>{const T=[];E(T),b.push(m),m=T,d=null},onArrayEnd:()=>{m=b.pop()},onLiteralValue:E,onError:(T,R,O)=>{h.push({error:T,offset:R,length:O})}},g),m[0]}e.parse=o;function c(n,h=[],g=A.DEFAULT){let d={type:"array",offset:-1,length:-1,children:[],parent:void 0};function m(T){d.type==="property"&&(d.length=T-d.offset,d=d.parent)}function b(T){return d.children.push(T),T}p(n,{onObjectBegin:T=>{d=b({type:"object",offset:T,length:-1,parent:d,children:[]})},onObjectProperty:(T,R,O)=>{d=b({type:"property",offset:R,length:-1,parent:d,children:[]}),d.children.push({type:"string",value:T,offset:R,length:O,parent:d})},onObjectEnd:(T,R)=>{d.length=T+R-d.offset,d=d.parent,m(T+R)},onArrayBegin:(T,R)=>{d=b({type:"array",offset:T,length:-1,parent:d,children:[]})},onArrayEnd:(T,R)=>{d.length=T+R-d.offset,d=d.parent,m(T+R)},onLiteralValue:(T,R,O)=>{b({type:a(T),offset:R,length:O,parent:d,value:T}),m(R+O)},onSeparator:(T,R,O)=>{d.type==="property"&&(T===":"?d.colonOffset=R:T===","&&m(R))},onError:(T,R,O)=>{h.push({error:T,offset:R,length:O})}},g);const y=d.children[0];return y&&delete y.parent,y}e.parseTree=c;function i(n,h){if(!n)return;let g=n;for(let d of h)if(typeof d=="string"){if(g.type!=="object"||!Array.isArray(g.children))return;let m=!1;for(const b of g.children)if(Array.isArray(b.children)&&b.children[0].value===d){g=b.children[1],m=!0;break}if(!m)return}else{const m=d;if(g.type!=="array"||m<0||!Array.isArray(g.children)||m>=g.children.length)return;g=g.children[m]}return g}e.findNodeAtLocation=i;function S(n){if(!n.parent||!n.parent.children)return[];const h=S(n.parent);if(n.parent.type==="property"){const g=n.parent.children[0].value;h.push(g)}else if(n.parent.type==="array"){const g=n.parent.children.indexOf(n);g!==-1&&h.push(g)}return h}e.getNodePath=S;function s(n){switch(n.type){case"array":return n.children.map(s);case"object":{const h=Object.create(null);for(let g of n.children){const d=g.children[1];d&&(h[g.children[0].value]=s(d))}return h}case"null":case"string":case"number":case"boolean":return n.value;default:return}}e.getNodeValue=s;function l(n,h,g=!1){return h>=n.offset&&h<n.offset+n.length||g&&h===n.offset+n.length}e.contains=l;function r(n,h,g=!1){if(l(n,h,g)){const d=n.children;if(Array.isArray(d))for(let m=0;m<d.length&&d[m].offset<=h;m++){const b=r(d[m],h,g);if(b)return b}return n}}e.findNodeAtOffset=r;function p(n,h,g=A.DEFAULT){const d=k(n,!1);function m(Z){return Z?()=>Z(d.getTokenOffset(),d.getTokenLength()):()=>!0}function b(Z){return Z?j=>Z(j,d.getTokenOffset(),d.getTokenLength()):()=>!0}const E=m(h.onObjectBegin),y=b(h.onObjectProperty),T=m(h.onObjectEnd),R=m(h.onArrayBegin),O=m(h.onArrayEnd),x=b(h.onLiteralValue),F=b(h.onSeparator),L=m(h.onComment),M=b(h.onError),N=g&&g.disallowComments,B=g&&g.allowTrailingComma;function P(){for(;;){const Z=d.scan();switch(d.getTokenError()){case 4:V(14);break;case 5:V(15);break;case 3:V(13);break;case 1:N||V(11);break;case 2:V(12);break;case 6:V(16);break}switch(Z){case 12:case 13:N?V(10):L();break;case 16:V(1);break;case 15:case 14:break;default:return Z}}}function V(Z,j=[],X=[]){if(M(Z),j.length+X.length>0){let Y=d.getToken();for(;Y!==17;){if(j.indexOf(Y)!==-1){P();break}else if(X.indexOf(Y)!==-1)break;Y=P()}}}function z(Z){const j=d.getTokenValue();return Z?x(j):y(j),P(),!0}function U(){switch(d.getToken()){case 11:{let Z=0;try{Z=JSON.parse(d.getTokenValue()),typeof Z!="number"&&(V(2),Z=0)}catch{V(2)}x(Z);break}case 7:x(null);break;case 8:x(!0);break;case 9:x(!1);break;default:return!1}return P(),!0}function H(){return d.getToken()!==10?(V(3,[],[2,5]),!1):(z(!1),d.getToken()===6?(F(":"),P(),q()||V(4,[],[2,5])):V(5,[],[2,5]),!0)}function K(){E(),P();let Z=!1;for(;d.getToken()!==2&&d.getToken()!==17;){if(d.getToken()===5){if(Z||V(4,[],[]),F(","),P(),d.getToken()===2&&B)break}else Z&&V(6,[],[]);H()||V(4,[],[2,5]),Z=!0}return T(),d.getToken()!==2?V(7,[2],[]):P(),!0}function G(){R(),P();let Z=!1;for(;d.getToken()!==4&&d.getToken()!==17;){if(d.getToken()===5){if(Z||V(4,[],[]),F(","),P(),d.getToken()===4&&B)break}else Z&&V(6,[],[]);q()||V(4,[],[4,5]),Z=!0}return O(),d.getToken()!==4?V(8,[4],[]):P(),!0}function q(){switch(d.getToken()){case 3:return G();case 1:return K();case 10:return z(!0);default:return U()}}return P(),d.getToken()===17?g.allowEmptyContent?!0:(V(4,[],[]),!1):q()?(d.getToken()!==17&&V(9,[],[]),!0):(V(4,[],[]),!1)}e.visit=p;function u(n,h){let g=k(n),d=[],m,b=0,E;do switch(E=g.getPosition(),m=g.scan(),m){case 12:case 13:case 17:b!==E&&d.push(n.substring(b,E)),h!==void 0&&d.push(g.getTokenValue().replace(/[^\r\n]/g,h)),b=g.getPosition();break}while(m!==17);return d.join("")}e.stripComments=u;function a(n){switch(typeof n){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(n){if(Array.isArray(n))return"array"}else return"null";return"object"}default:return"null"}}e.getNodeType=a}),define(ne[301],re([1,0,118]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isEOL=e.getEOL=e.toFormattedString=e.format=void 0;function f(w,v,C){let o,c,i,S,s;if(v){for(S=v.offset,s=S+v.length,i=S;i>0&&!I(w,i-1);)i--;let E=s;for(;E<w.length&&!I(w,E);)E++;c=w.substring(i,E),o=k(c,C)}else c=w,o=0,i=0,S=0,s=w.length;const l=D(C,w);let r=!1,p=0,u;C.insertSpaces?u=A(" ",C.tabSize||4):u=" ";const a=(0,t.createScanner)(c,!1);let n=!1;function h(){return l+A(u,o+p)}function g(){let E=a.scan();for(r=!1;E===15||E===14;)r=r||E===14,E=a.scan();return n=E===16||a.getTokenError()!==0,E}const d=[];function m(E,y,T){!n&&y<s&&T>S&&w.substring(y,T)!==E&&d.push({offset:y,length:T-y,content:E})}let b=g();if(b!==17){const E=a.getTokenOffset()+i,y=A(u,o);m(y,i,E)}for(;b!==17;){let E=a.getTokenOffset()+a.getTokenLength()+i,y=g(),T="";for(;!r&&(y===12||y===13);){const O=a.getTokenOffset()+i;m(" ",E,O),E=a.getTokenOffset()+a.getTokenLength()+i,T=y===12?h():"",y=g()}if(y===2)b!==1&&(p--,T=h());else if(y===4)b!==3&&(p--,T=h());else{switch(b){case 3:case 1:p++,T=h();break;case 5:case 12:T=h();break;case 13:r?T=h():T=" ";break;case 6:T=" ";break;case 10:if(y===6){T="";break}case 7:case 8:case 9:case 11:case 2:case 4:y===12||y===13?T=" ":y!==5&&y!==17&&(n=!0);break;case 16:n=!0;break}r&&(y===12||y===13)&&(T=h())}const R=a.getTokenOffset()+i;m(T,E,R),b=y}return d}e.format=f;function _(w,v){const C=JSON.stringify(w,void 0,v.insertSpaces?v.tabSize||4:" ");return v.eol!==void 0?C.replace(/\r\n|\r|\n/g,v.eol):C}e.toFormattedString=_;function A(w,v){let C="";for(let o=0;o<v;o++)C+=w;return C}function k(w,v){let C=0,o=0;const c=v.tabSize||4;for(;C<w.length;){const i=w.charAt(C);if(i===" ")o++;else if(i===" ")o+=c;else break;C++}return Math.floor(o/c)}function D(w,v){for(let C=0;C<v.length;C++){const o=v.charAt(C);if(o==="\r")return C+1<v.length&&v.charAt(C+1)===` `?`\r `:"\r";if(o===` `)return` `}return w&&w.eol||` `}e.getEOL=D;function I(w,v){return`\r `.indexOf(w.charAt(v))!==-1}e.isEOL=I}),define(ne[302],re([1,0,118,301]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.applyEdits=e.applyEdit=e.withFormatting=e.setProperty=e.removeProperty=void 0;function _(w,v,C){return A(w,v,void 0,C)}e.removeProperty=_;function A(w,v,C,o,c){const i=v.slice(),S=[],s=(0,t.parseTree)(w,S);let l,r;for(;i.length>0&&(r=i.pop(),l=(0,t.findNodeAtLocation)(s,i),l===void 0&&C!==void 0);)typeof r=="string"?C={[r]:C}:C=[C];if(l)if(l.type==="object"&&typeof r=="string"&&Array.isArray(l.children)){const p=(0,t.findNodeAtLocation)(l,[r]);if(p!==void 0)if(C===void 0){if(!p.parent)throw new Error("Malformed AST");const u=l.children.indexOf(p.parent);let a,n=p.parent.offset+p.parent.length;if(u>0){const h=l.children[u-1];a=h.offset+h.length}else a=l.offset+1,l.children.length>1&&(n=l.children[1].offset);return k(w,{offset:a,length:n-a,content:""},o)}else return k(w,{offset:p.offset,length:p.length,content:JSON.stringify(C)},o);else{if(C===void 0)return[];const u=`${JSON.stringify(r)}: ${JSON.stringify(C)}`,a=c?c(l.children.map(h=>h.children[0].value)):l.children.length;let n;if(a>0){const h=l.children[a-1];n={offset:h.offset+h.length,length:0,content:","+u}}else l.children.length===0?n={offset:l.offset+1,length:0,content:u}:n={offset:l.offset+1,length:0,content:u+","};return k(w,n,o)}}else if(l.type==="array"&&typeof r=="number"&&Array.isArray(l.children))if(C!==void 0){const p=`${JSON.stringify(C)}`;let u;if(l.children.length===0||r===0)u={offset:l.offset+1,length:0,content:l.children.length===0?p:p+","};else{const a=r===-1||r>l.children.length?l.children.length:r,n=l.children[a-1];u={offset:n.offset+n.length,length:0,content:","+p}}return k(w,u,o)}else{const p=r,u=l.children[p];let a;if(l.children.length===1)a={offset:l.offset+1,length:l.length-2,content:""};else if(l.children.length-1===p){const n=l.children[p-1],h=n.offset+n.length,g=l.offset+l.length;a={offset:h,length:g-2-h,content:""}}else a={offset:u.offset,length:l.children[p+1].offset-u.offset,content:""};return k(w,a,o)}else throw new Error(`Can not add ${typeof r!="number"?"index":"property"} to parent of type ${l.type}`);else{if(C===void 0)throw new Error("Can not delete in empty document");return k(w,{offset:s?s.offset:0,length:s?s.length:0,content:JSON.stringify(C)},o)}}e.setProperty=A;function k(w,v,C){let o=D(w,v),c=v.offset,i=v.offset+v.content.length;if(v.length===0||v.content.length===0){for(;c>0&&!(0,f.isEOL)(o,c-1);)c--;for(;i<o.length&&!(0,f.isEOL)(o,i);)i++}const S=(0,f.format)(o,{offset:c,length:i-c},C);for(let l=S.length-1;l>=0;l--){const r=S[l];o=D(o,r),c=Math.min(c,r.offset),i=Math.max(i,r.offset+r.length),i+=r.content.length-r.length}const s=w.length-(o.length-i)-c;return[{offset:c,length:s,content:o.substring(c,i)}]}e.withFormatting=k;function D(w,v){return w.substring(0,v.offset)+v.content+w.substring(v.offset+v.length)}e.applyEdit=D;function I(w,v){let C=v.slice(0).sort((c,i)=>{const S=c.offset-i.offset;return S===0?c.length-i.length:S}),o=w.length;for(let c=C.length-1;c>=0;c--){let i=C[c];if(i.offset+i.length<=o)w=D(w,i);else throw new Error("Overlapping edit");o=i.offset}return w}e.applyEdits=I}),define(ne[97],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeyChord=e.KeyMod=e.KeyCodeUtils=e.IMMUTABLE_KEY_CODE_TO_CODE=e.IMMUTABLE_CODE_TO_KEY_CODE=e.ScanCodeUtils=e.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE=e.EVENT_KEY_CODE_MAP=e.ScanCode=e.KeyCode=void 0;var t;(function(i){i[i.DependsOnKbLayout=-1]="DependsOnKbLayout",i[i.Unknown=0]="Unknown",i[i.Backspace=1]="Backspace",i[i.Tab=2]="Tab",i[i.Enter=3]="Enter",i[i.Shift=4]="Shift",i[i.Ctrl=5]="Ctrl",i[i.Alt=6]="Alt",i[i.PauseBreak=7]="PauseBreak",i[i.CapsLock=8]="CapsLock",i[i.Escape=9]="Escape",i[i.Space=10]="Space",i[i.PageUp=11]="PageUp",i[i.PageDown=12]="PageDown",i[i.End=13]="End",i[i.Home=14]="Home",i[i.LeftArrow=15]="LeftArrow",i[i.UpArrow=16]="UpArrow",i[i.RightArrow=17]="RightArrow",i[i.DownArrow=18]="DownArrow",i[i.Insert=19]="Insert",i[i.Delete=20]="Delete",i[i.Digit0=21]="Digit0",i[i.Digit1=22]="Digit1",i[i.Digit2=23]="Digit2",i[i.Digit3=24]="Digit3",i[i.Digit4=25]="Digit4",i[i.Digit5=26]="Digit5",i[i.Digit6=27]="Digit6",i[i.Digit7=28]="Digit7",i[i.Digit8=29]="Digit8",i[i.Digit9=30]="Digit9",i[i.KeyA=31]="KeyA",i[i.KeyB=32]="KeyB",i[i.KeyC=33]="KeyC",i[i.KeyD=34]="KeyD",i[i.KeyE=35]="KeyE",i[i.KeyF=36]="KeyF",i[i.KeyG=37]="KeyG",i[i.KeyH=38]="KeyH",i[i.KeyI=39]="KeyI",i[i.KeyJ=40]="KeyJ",i[i.KeyK=41]="KeyK",i[i.KeyL=42]="KeyL",i[i.KeyM=43]="KeyM",i[i.KeyN=44]="KeyN",i[i.KeyO=45]="KeyO",i[i.KeyP=46]="KeyP",i[i.KeyQ=47]="KeyQ",i[i.KeyR=48]="KeyR",i[i.KeyS=49]="KeyS",i[i.KeyT=50]="KeyT",i[i.KeyU=51]="KeyU",i[i.KeyV=52]="KeyV",i[i.KeyW=53]="KeyW",i[i.KeyX=54]="KeyX",i[i.KeyY=55]="KeyY",i[i.KeyZ=56]="KeyZ",i[i.Meta=57]="Meta",i[i.ContextMenu=58]="ContextMenu",i[i.F1=59]="F1",i[i.F2=60]="F2",i[i.F3=61]="F3",i[i.F4=62]="F4",i[i.F5=63]="F5",i[i.F6=64]="F6",i[i.F7=65]="F7",i[i.F8=66]="F8",i[i.F9=67]="F9",i[i.F10=68]="F10",i[i.F11=69]="F11",i[i.F12=70]="F12",i[i.F13=71]="F13",i[i.F14=72]="F14",i[i.F15=73]="F15",i[i.F16=74]="F16",i[i.F17=75]="F17",i[i.F18=76]="F18",i[i.F19=77]="F19",i[i.NumLock=78]="NumLock",i[i.ScrollLock=79]="ScrollLock",i[i.Semicolon=80]="Semicolon",i[i.Equal=81]="Equal",i[i.Comma=82]="Comma",i[i.Minus=83]="Minus",i[i.Period=84]="Period",i[i.Slash=85]="Slash",i[i.Backquote=86]="Backquote",i[i.BracketLeft=87]="BracketLeft",i[i.Backslash=88]="Backslash",i[i.BracketRight=89]="BracketRight",i[i.Quote=90]="Quote",i[i.OEM_8=91]="OEM_8",i[i.IntlBackslash=92]="IntlBackslash",i[i.Numpad0=93]="Numpad0",i[i.Numpad1=94]="Numpad1",i[i.Numpad2=95]="Numpad2",i[i.Numpad3=96]="Numpad3",i[i.Numpad4=97]="Numpad4",i[i.Numpad5=98]="Numpad5",i[i.Numpad6=99]="Numpad6",i[i.Numpad7=100]="Numpad7",i[i.Numpad8=101]="Numpad8",i[i.Numpad9=102]="Numpad9",i[i.NumpadMultiply=103]="NumpadMultiply",i[i.NumpadAdd=104]="NumpadAdd",i[i.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",i[i.NumpadSubtract=106]="NumpadSubtract",i[i.NumpadDecimal=107]="NumpadDecimal",i[i.NumpadDivide=108]="NumpadDivide",i[i.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",i[i.ABNT_C1=110]="ABNT_C1",i[i.ABNT_C2=111]="ABNT_C2",i[i.AudioVolumeMute=112]="AudioVolumeMute",i[i.AudioVolumeUp=113]="AudioVolumeUp",i[i.AudioVolumeDown=114]="AudioVolumeDown",i[i.BrowserSearch=115]="BrowserSearch",i[i.BrowserHome=116]="BrowserHome",i[i.BrowserBack=117]="BrowserBack",i[i.BrowserForward=118]="BrowserForward",i[i.MediaTrackNext=119]="MediaTrackNext",i[i.MediaTrackPrevious=120]="MediaTrackPrevious",i[i.MediaStop=121]="MediaStop",i[i.MediaPlayPause=122]="MediaPlayPause",i[i.LaunchMediaPlayer=123]="LaunchMediaPlayer",i[i.LaunchMail=124]="LaunchMail",i[i.LaunchApp2=125]="LaunchApp2",i[i.Clear=126]="Clear",i[i.MAX_VALUE=127]="MAX_VALUE"})(t=e.KeyCode||(e.KeyCode={}));var f;(function(i){i[i.DependsOnKbLayout=-1]="DependsOnKbLayout",i[i.None=0]="None",i[i.Hyper=1]="Hyper",i[i.Super=2]="Super",i[i.Fn=3]="Fn",i[i.FnLock=4]="FnLock",i[i.Suspend=5]="Suspend",i[i.Resume=6]="Resume",i[i.Turbo=7]="Turbo",i[i.Sleep=8]="Sleep",i[i.WakeUp=9]="WakeUp",i[i.KeyA=10]="KeyA",i[i.KeyB=11]="KeyB",i[i.KeyC=12]="KeyC",i[i.KeyD=13]="KeyD",i[i.KeyE=14]="KeyE",i[i.KeyF=15]="KeyF",i[i.KeyG=16]="KeyG",i[i.KeyH=17]="KeyH",i[i.KeyI=18]="KeyI",i[i.KeyJ=19]="KeyJ",i[i.KeyK=20]="KeyK",i[i.KeyL=21]="KeyL",i[i.KeyM=22]="KeyM",i[i.KeyN=23]="KeyN",i[i.KeyO=24]="KeyO",i[i.KeyP=25]="KeyP",i[i.KeyQ=26]="KeyQ",i[i.KeyR=27]="KeyR",i[i.KeyS=28]="KeyS",i[i.KeyT=29]="KeyT",i[i.KeyU=30]="KeyU",i[i.KeyV=31]="KeyV",i[i.KeyW=32]="KeyW",i[i.KeyX=33]="KeyX",i[i.KeyY=34]="KeyY",i[i.KeyZ=35]="KeyZ",i[i.Digit1=36]="Digit1",i[i.Digit2=37]="Digit2",i[i.Digit3=38]="Digit3",i[i.Digit4=39]="Digit4",i[i.Digit5=40]="Digit5",i[i.Digit6=41]="Digit6",i[i.Digit7=42]="Digit7",i[i.Digit8=43]="Digit8",i[i.Digit9=44]="Digit9",i[i.Digit0=45]="Digit0",i[i.Enter=46]="Enter",i[i.Escape=47]="Escape",i[i.Backspace=48]="Backspace",i[i.Tab=49]="Tab",i[i.Space=50]="Space",i[i.Minus=51]="Minus",i[i.Equal=52]="Equal",i[i.BracketLeft=53]="BracketLeft",i[i.BracketRight=54]="BracketRight",i[i.Backslash=55]="Backslash",i[i.IntlHash=56]="IntlHash",i[i.Semicolon=57]="Semicolon",i[i.Quote=58]="Quote",i[i.Backquote=59]="Backquote",i[i.Comma=60]="Comma",i[i.Period=61]="Period",i[i.Slash=62]="Slash",i[i.CapsLock=63]="CapsLock",i[i.F1=64]="F1",i[i.F2=65]="F2",i[i.F3=66]="F3",i[i.F4=67]="F4",i[i.F5=68]="F5",i[i.F6=69]="F6",i[i.F7=70]="F7",i[i.F8=71]="F8",i[i.F9=72]="F9",i[i.F10=73]="F10",i[i.F11=74]="F11",i[i.F12=75]="F12",i[i.PrintScreen=76]="PrintScreen",i[i.ScrollLock=77]="ScrollLock",i[i.Pause=78]="Pause",i[i.Insert=79]="Insert",i[i.Home=80]="Home",i[i.PageUp=81]="PageUp",i[i.Delete=82]="Delete",i[i.End=83]="End",i[i.PageDown=84]="PageDown",i[i.ArrowRight=85]="ArrowRight",i[i.ArrowLeft=86]="ArrowLeft",i[i.ArrowDown=87]="ArrowDown",i[i.ArrowUp=88]="ArrowUp",i[i.NumLock=89]="NumLock",i[i.NumpadDivide=90]="NumpadDivide",i[i.NumpadMultiply=91]="NumpadMultiply",i[i.NumpadSubtract=92]="NumpadSubtract",i[i.NumpadAdd=93]="NumpadAdd",i[i.NumpadEnter=94]="NumpadEnter",i[i.Numpad1=95]="Numpad1",i[i.Numpad2=96]="Numpad2",i[i.Numpad3=97]="Numpad3",i[i.Numpad4=98]="Numpad4",i[i.Numpad5=99]="Numpad5",i[i.Numpad6=100]="Numpad6",i[i.Numpad7=101]="Numpad7",i[i.Numpad8=102]="Numpad8",i[i.Numpad9=103]="Numpad9",i[i.Numpad0=104]="Numpad0",i[i.NumpadDecimal=105]="NumpadDecimal",i[i.IntlBackslash=106]="IntlBackslash",i[i.ContextMenu=107]="ContextMenu",i[i.Power=108]="Power",i[i.NumpadEqual=109]="NumpadEqual",i[i.F13=110]="F13",i[i.F14=111]="F14",i[i.F15=112]="F15",i[i.F16=113]="F16",i[i.F17=114]="F17",i[i.F18=115]="F18",i[i.F19=116]="F19",i[i.F20=117]="F20",i[i.F21=118]="F21",i[i.F22=119]="F22",i[i.F23=120]="F23",i[i.F24=121]="F24",i[i.Open=122]="Open",i[i.Help=123]="Help",i[i.Select=124]="Select",i[i.Again=125]="Again",i[i.Undo=126]="Undo",i[i.Cut=127]="Cut",i[i.Copy=128]="Copy",i[i.Paste=129]="Paste",i[i.Find=130]="Find",i[i.AudioVolumeMute=131]="AudioVolumeMute",i[i.AudioVolumeUp=132]="AudioVolumeUp",i[i.AudioVolumeDown=133]="AudioVolumeDown",i[i.NumpadComma=134]="NumpadComma",i[i.IntlRo=135]="IntlRo",i[i.KanaMode=136]="KanaMode",i[i.IntlYen=137]="IntlYen",i[i.Convert=138]="Convert",i[i.NonConvert=139]="NonConvert",i[i.Lang1=140]="Lang1",i[i.Lang2=141]="Lang2",i[i.Lang3=142]="Lang3",i[i.Lang4=143]="Lang4",i[i.Lang5=144]="Lang5",i[i.Abort=145]="Abort",i[i.Props=146]="Props",i[i.NumpadParenLeft=147]="NumpadParenLeft",i[i.NumpadParenRight=148]="NumpadParenRight",i[i.NumpadBackspace=149]="NumpadBackspace",i[i.NumpadMemoryStore=150]="NumpadMemoryStore",i[i.NumpadMemoryRecall=151]="NumpadMemoryRecall",i[i.NumpadMemoryClear=152]="NumpadMemoryClear",i[i.NumpadMemoryAdd=153]="NumpadMemoryAdd",i[i.NumpadMemorySubtract=154]="NumpadMemorySubtract",i[i.NumpadClear=155]="NumpadClear",i[i.NumpadClearEntry=156]="NumpadClearEntry",i[i.ControlLeft=157]="ControlLeft",i[i.ShiftLeft=158]="ShiftLeft",i[i.AltLeft=159]="AltLeft",i[i.MetaLeft=160]="MetaLeft",i[i.ControlRight=161]="ControlRight",i[i.ShiftRight=162]="ShiftRight",i[i.AltRight=163]="AltRight",i[i.MetaRight=164]="MetaRight",i[i.BrightnessUp=165]="BrightnessUp",i[i.BrightnessDown=166]="BrightnessDown",i[i.MediaPlay=167]="MediaPlay",i[i.MediaRecord=168]="MediaRecord",i[i.MediaFastForward=169]="MediaFastForward",i[i.MediaRewind=170]="MediaRewind",i[i.MediaTrackNext=171]="MediaTrackNext",i[i.MediaTrackPrevious=172]="MediaTrackPrevious",i[i.MediaStop=173]="MediaStop",i[i.Eject=174]="Eject",i[i.MediaPlayPause=175]="MediaPlayPause",i[i.MediaSelect=176]="MediaSelect",i[i.LaunchMail=177]="LaunchMail",i[i.LaunchApp2=178]="LaunchApp2",i[i.LaunchApp1=179]="LaunchApp1",i[i.SelectTask=180]="SelectTask",i[i.LaunchScreenSaver=181]="LaunchScreenSaver",i[i.BrowserSearch=182]="BrowserSearch",i[i.BrowserHome=183]="BrowserHome",i[i.BrowserBack=184]="BrowserBack",i[i.BrowserForward=185]="BrowserForward",i[i.BrowserStop=186]="BrowserStop",i[i.BrowserRefresh=187]="BrowserRefresh",i[i.BrowserFavorites=188]="BrowserFavorites",i[i.ZoomToggle=189]="ZoomToggle",i[i.MailReply=190]="MailReply",i[i.MailForward=191]="MailForward",i[i.MailSend=192]="MailSend",i[i.MAX_VALUE=193]="MAX_VALUE"})(f=e.ScanCode||(e.ScanCode={}));class _{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(S,s){this._keyCodeToStr[S]=s,this._strToKeyCode[s.toLowerCase()]=S}keyCodeToStr(S){return this._keyCodeToStr[S]}strToKeyCode(S){return this._strToKeyCode[S.toLowerCase()]||0}}const A=new _,k=new _,D=new _;e.EVENT_KEY_CODE_MAP=new Array(230),e.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE={};const I=[],w=Object.create(null),v=Object.create(null);e.ScanCodeUtils={lowerCaseToEnum:i=>v[i]||0,toEnum:i=>w[i]||0,toString:i=>I[i]||"None"},e.IMMUTABLE_CODE_TO_KEY_CODE=[],e.IMMUTABLE_KEY_CODE_TO_CODE=[];for(let i=0;i<=193;i++)e.IMMUTABLE_CODE_TO_KEY_CODE[i]=-1;for(let i=0;i<=127;i++)e.IMMUTABLE_KEY_CODE_TO_CODE[i]=-1;(function(){const i="",S=[[0,1,0,"None",0,"unknown",0,"VK_UNKNOWN",i,i],[0,1,1,"Hyper",0,i,0,i,i,i],[0,1,2,"Super",0,i,0,i,i,i],[0,1,3,"Fn",0,i,0,i,i,i],[0,1,4,"FnLock",0,i,0,i,i,i],[0,1,5,"Suspend",0,i,0,i,i,i],[0,1,6,"Resume",0,i,0,i,i,i],[0,1,7,"Turbo",0,i,0,i,i,i],[0,1,8,"Sleep",0,i,0,"VK_SLEEP",i,i],[0,1,9,"WakeUp",0,i,0,i,i,i],[31,0,10,"KeyA",31,"A",65,"VK_A",i,i],[32,0,11,"KeyB",32,"B",66,"VK_B",i,i],[33,0,12,"KeyC",33,"C",67,"VK_C",i,i],[34,0,13,"KeyD",34,"D",68,"VK_D",i,i],[35,0,14,"KeyE",35,"E",69,"VK_E",i,i],[36,0,15,"KeyF",36,"F",70,"VK_F",i,i],[37,0,16,"KeyG",37,"G",71,"VK_G",i,i],[38,0,17,"KeyH",38,"H",72,"VK_H",i,i],[39,0,18,"KeyI",39,"I",73,"VK_I",i,i],[40,0,19,"KeyJ",40,"J",74,"VK_J",i,i],[41,0,20,"KeyK",41,"K",75,"VK_K",i,i],[42,0,21,"KeyL",42,"L",76,"VK_L",i,i],[43,0,22,"KeyM",43,"M",77,"VK_M",i,i],[44,0,23,"KeyN",44,"N",78,"VK_N",i,i],[45,0,24,"KeyO",45,"O",79,"VK_O",i,i],[46,0,25,"KeyP",46,"P",80,"VK_P",i,i],[47,0,26,"KeyQ",47,"Q",81,"VK_Q",i,i],[48,0,27,"KeyR",48,"R",82,"VK_R",i,i],[49,0,28,"KeyS",49,"S",83,"VK_S",i,i],[50,0,29,"KeyT",50,"T",84,"VK_T",i,i],[51,0,30,"KeyU",51,"U",85,"VK_U",i,i],[52,0,31,"KeyV",52,"V",86,"VK_V",i,i],[53,0,32,"KeyW",53,"W",87,"VK_W",i,i],[54,0,33,"KeyX",54,"X",88,"VK_X",i,i],[55,0,34,"KeyY",55,"Y",89,"VK_Y",i,i],[56,0,35,"KeyZ",56,"Z",90,"VK_Z",i,i],[22,0,36,"Digit1",22,"1",49,"VK_1",i,i],[23,0,37,"Digit2",23,"2",50,"VK_2",i,i],[24,0,38,"Digit3",24,"3",51,"VK_3",i,i],[25,0,39,"Digit4",25,"4",52,"VK_4",i,i],[26,0,40,"Digit5",26,"5",53,"VK_5",i,i],[27,0,41,"Digit6",27,"6",54,"VK_6",i,i],[28,0,42,"Digit7",28,"7",55,"VK_7",i,i],[29,0,43,"Digit8",29,"8",56,"VK_8",i,i],[30,0,44,"Digit9",30,"9",57,"VK_9",i,i],[21,0,45,"Digit0",21,"0",48,"VK_0",i,i],[3,1,46,"Enter",3,"Enter",13,"VK_RETURN",i,i],[9,1,47,"Escape",9,"Escape",27,"VK_ESCAPE",i,i],[1,1,48,"Backspace",1,"Backspace",8,"VK_BACK",i,i],[2,1,49,"Tab",2,"Tab",9,"VK_TAB",i,i],[10,1,50,"Space",10,"Space",32,"VK_SPACE",i,i],[83,0,51,"Minus",83,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[81,0,52,"Equal",81,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[87,0,53,"BracketLeft",87,"[",219,"VK_OEM_4","[","OEM_4"],[89,0,54,"BracketRight",89,"]",221,"VK_OEM_6","]","OEM_6"],[88,0,55,"Backslash",88,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,0,56,"IntlHash",0,i,0,i,i,i],[80,0,57,"Semicolon",80,";",186,"VK_OEM_1",";","OEM_1"],[90,0,58,"Quote",90,"'",222,"VK_OEM_7","'","OEM_7"],[86,0,59,"Backquote",86,"`",192,"VK_OEM_3","`","OEM_3"],[82,0,60,"Comma",82,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[84,0,61,"Period",84,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[85,0,62,"Slash",85,"/",191,"VK_OEM_2","/","OEM_2"],[8,1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",i,i],[59,1,64,"F1",59,"F1",112,"VK_F1",i,i],[60,1,65,"F2",60,"F2",113,"VK_F2",i,i],[61,1,66,"F3",61,"F3",114,"VK_F3",i,i],[62,1,67,"F4",62,"F4",115,"VK_F4",i,i],[63,1,68,"F5",63,"F5",116,"VK_F5",i,i],[64,1,69,"F6",64,"F6",117,"VK_F6",i,i],[65,1,70,"F7",65,"F7",118,"VK_F7",i,i],[66,1,71,"F8",66,"F8",119,"VK_F8",i,i],[67,1,72,"F9",67,"F9",120,"VK_F9",i,i],[68,1,73,"F10",68,"F10",121,"VK_F10",i,i],[69,1,74,"F11",69,"F11",122,"VK_F11",i,i],[70,1,75,"F12",70,"F12",123,"VK_F12",i,i],[0,1,76,"PrintScreen",0,i,0,i,i,i],[79,1,77,"ScrollLock",79,"ScrollLock",145,"VK_SCROLL",i,i],[7,1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",i,i],[19,1,79,"Insert",19,"Insert",45,"VK_INSERT",i,i],[14,1,80,"Home",14,"Home",36,"VK_HOME",i,i],[11,1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",i,i],[20,1,82,"Delete",20,"Delete",46,"VK_DELETE",i,i],[13,1,83,"End",13,"End",35,"VK_END",i,i],[12,1,84,"PageDown",12,"PageDown",34,"VK_NEXT",i,i],[17,1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",i],[15,1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",i],[18,1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",i],[16,1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",i],[78,1,89,"NumLock",78,"NumLock",144,"VK_NUMLOCK",i,i],[108,1,90,"NumpadDivide",108,"NumPad_Divide",111,"VK_DIVIDE",i,i],[103,1,91,"NumpadMultiply",103,"NumPad_Multiply",106,"VK_MULTIPLY",i,i],[106,1,92,"NumpadSubtract",106,"NumPad_Subtract",109,"VK_SUBTRACT",i,i],[104,1,93,"NumpadAdd",104,"NumPad_Add",107,"VK_ADD",i,i],[3,1,94,"NumpadEnter",3,i,0,i,i,i],[94,1,95,"Numpad1",94,"NumPad1",97,"VK_NUMPAD1",i,i],[95,1,96,"Numpad2",95,"NumPad2",98,"VK_NUMPAD2",i,i],[96,1,97,"Numpad3",96,"NumPad3",99,"VK_NUMPAD3",i,i],[97,1,98,"Numpad4",97,"NumPad4",100,"VK_NUMPAD4",i,i],[98,1,99,"Numpad5",98,"NumPad5",101,"VK_NUMPAD5",i,i],[99,1,100,"Numpad6",99,"NumPad6",102,"VK_NUMPAD6",i,i],[100,1,101,"Numpad7",100,"NumPad7",103,"VK_NUMPAD7",i,i],[101,1,102,"Numpad8",101,"NumPad8",104,"VK_NUMPAD8",i,i],[102,1,103,"Numpad9",102,"NumPad9",105,"VK_NUMPAD9",i,i],[93,1,104,"Numpad0",93,"NumPad0",96,"VK_NUMPAD0",i,i],[107,1,105,"NumpadDecimal",107,"NumPad_Decimal",110,"VK_DECIMAL",i,i],[92,0,106,"IntlBackslash",92,"OEM_102",226,"VK_OEM_102",i,i],[58,1,107,"ContextMenu",58,"ContextMenu",93,i,i,i],[0,1,108,"Power",0,i,0,i,i,i],[0,1,109,"NumpadEqual",0,i,0,i,i,i],[71,1,110,"F13",71,"F13",124,"VK_F13",i,i],[72,1,111,"F14",72,"F14",125,"VK_F14",i,i],[73,1,112,"F15",73,"F15",126,"VK_F15",i,i],[74,1,113,"F16",74,"F16",127,"VK_F16",i,i],[75,1,114,"F17",75,"F17",128,"VK_F17",i,i],[76,1,115,"F18",76,"F18",129,"VK_F18",i,i],[77,1,116,"F19",77,"F19",130,"VK_F19",i,i],[0,1,117,"F20",0,i,0,"VK_F20",i,i],[0,1,118,"F21",0,i,0,"VK_F21",i,i],[0,1,119,"F22",0,i,0,"VK_F22",i,i],[0,1,120,"F23",0,i,0,"VK_F23",i,i],[0,1,121,"F24",0,i,0,"VK_F24",i,i],[0,1,122,"Open",0,i,0,i,i,i],[0,1,123,"Help",0,i,0,i,i,i],[0,1,124,"Select",0,i,0,i,i,i],[0,1,125,"Again",0,i,0,i,i,i],[0,1,126,"Undo",0,i,0,i,i,i],[0,1,127,"Cut",0,i,0,i,i,i],[0,1,128,"Copy",0,i,0,i,i,i],[0,1,129,"Paste",0,i,0,i,i,i],[0,1,130,"Find",0,i,0,i,i,i],[0,1,131,"AudioVolumeMute",112,"AudioVolumeMute",173,"VK_VOLUME_MUTE",i,i],[0,1,132,"AudioVolumeUp",113,"AudioVolumeUp",175,"VK_VOLUME_UP",i,i],[0,1,133,"AudioVolumeDown",114,"AudioVolumeDown",174,"VK_VOLUME_DOWN",i,i],[105,1,134,"NumpadComma",105,"NumPad_Separator",108,"VK_SEPARATOR",i,i],[110,0,135,"IntlRo",110,"ABNT_C1",193,"VK_ABNT_C1",i,i],[0,1,136,"KanaMode",0,i,0,i,i,i],[0,0,137,"IntlYen",0,i,0,i,i,i],[0,1,138,"Convert",0,i,0,i,i,i],[0,1,139,"NonConvert",0,i,0,i,i,i],[0,1,140,"Lang1",0,i,0,i,i,i],[0,1,141,"Lang2",0,i,0,i,i,i],[0,1,142,"Lang3",0,i,0,i,i,i],[0,1,143,"Lang4",0,i,0,i,i,i],[0,1,144,"Lang5",0,i,0,i,i,i],[0,1,145,"Abort",0,i,0,i,i,i],[0,1,146,"Props",0,i,0,i,i,i],[0,1,147,"NumpadParenLeft",0,i,0,i,i,i],[0,1,148,"NumpadParenRight",0,i,0,i,i,i],[0,1,149,"NumpadBackspace",0,i,0,i,i,i],[0,1,150,"NumpadMemoryStore",0,i,0,i,i,i],[0,1,151,"NumpadMemoryRecall",0,i,0,i,i,i],[0,1,152,"NumpadMemoryClear",0,i,0,i,i,i],[0,1,153,"NumpadMemoryAdd",0,i,0,i,i,i],[0,1,154,"NumpadMemorySubtract",0,i,0,i,i,i],[0,1,155,"NumpadClear",126,"Clear",12,"VK_CLEAR",i,i],[0,1,156,"NumpadClearEntry",0,i,0,i,i,i],[5,1,0,i,5,"Ctrl",17,"VK_CONTROL",i,i],[4,1,0,i,4,"Shift",16,"VK_SHIFT",i,i],[6,1,0,i,6,"Alt",18,"VK_MENU",i,i],[57,1,0,i,57,"Meta",0,"VK_COMMAND",i,i],[5,1,157,"ControlLeft",5,i,0,"VK_LCONTROL",i,i],[4,1,158,"ShiftLeft",4,i,0,"VK_LSHIFT",i,i],[6,1,159,"AltLeft",6,i,0,"VK_LMENU",i,i],[57,1,160,"MetaLeft",57,i,0,"VK_LWIN",i,i],[5,1,161,"ControlRight",5,i,0,"VK_RCONTROL",i,i],[4,1,162,"ShiftRight",4,i,0,"VK_RSHIFT",i,i],[6,1,163,"AltRight",6,i,0,"VK_RMENU",i,i],[57,1,164,"MetaRight",57,i,0,"VK_RWIN",i,i],[0,1,165,"BrightnessUp",0,i,0,i,i,i],[0,1,166,"BrightnessDown",0,i,0,i,i,i],[0,1,167,"MediaPlay",0,i,0,i,i,i],[0,1,168,"MediaRecord",0,i,0,i,i,i],[0,1,169,"MediaFastForward",0,i,0,i,i,i],[0,1,170,"MediaRewind",0,i,0,i,i,i],[114,1,171,"MediaTrackNext",119,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",i,i],[115,1,172,"MediaTrackPrevious",120,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",i,i],[116,1,173,"MediaStop",121,"MediaStop",178,"VK_MEDIA_STOP",i,i],[0,1,174,"Eject",0,i,0,i,i,i],[117,1,175,"MediaPlayPause",122,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",i,i],[0,1,176,"MediaSelect",123,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",i,i],[0,1,177,"LaunchMail",124,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",i,i],[0,1,178,"LaunchApp2",125,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",i,i],[0,1,179,"LaunchApp1",0,i,0,"VK_MEDIA_LAUNCH_APP1",i,i],[0,1,180,"SelectTask",0,i,0,i,i,i],[0,1,181,"LaunchScreenSaver",0,i,0,i,i,i],[0,1,182,"BrowserSearch",115,"BrowserSearch",170,"VK_BROWSER_SEARCH",i,i],[0,1,183,"BrowserHome",116,"BrowserHome",172,"VK_BROWSER_HOME",i,i],[112,1,184,"BrowserBack",117,"BrowserBack",166,"VK_BROWSER_BACK",i,i],[113,1,185,"BrowserForward",118,"BrowserForward",167,"VK_BROWSER_FORWARD",i,i],[0,1,186,"BrowserStop",0,i,0,"VK_BROWSER_STOP",i,i],[0,1,187,"BrowserRefresh",0,i,0,"VK_BROWSER_REFRESH",i,i],[0,1,188,"BrowserFavorites",0,i,0,"VK_BROWSER_FAVORITES",i,i],[0,1,189,"ZoomToggle",0,i,0,i,i,i],[0,1,190,"MailReply",0,i,0,i,i,i],[0,1,191,"MailForward",0,i,0,i,i,i],[0,1,192,"MailSend",0,i,0,i,i,i],[109,1,0,i,109,"KeyInComposition",229,i,i,i],[111,1,0,i,111,"ABNT_C2",194,"VK_ABNT_C2",i,i],[91,1,0,i,91,"OEM_8",223,"VK_OEM_8",i,i],[0,1,0,i,0,i,0,"VK_KANA",i,i],[0,1,0,i,0,i,0,"VK_HANGUL",i,i],[0,1,0,i,0,i,0,"VK_JUNJA",i,i],[0,1,0,i,0,i,0,"VK_FINAL",i,i],[0,1,0,i,0,i,0,"VK_HANJA",i,i],[0,1,0,i,0,i,0,"VK_KANJI",i,i],[0,1,0,i,0,i,0,"VK_CONVERT",i,i],[0,1,0,i,0,i,0,"VK_NONCONVERT",i,i],[0,1,0,i,0,i,0,"VK_ACCEPT",i,i],[0,1,0,i,0,i,0,"VK_MODECHANGE",i,i],[0,1,0,i,0,i,0,"VK_SELECT",i,i],[0,1,0,i,0,i,0,"VK_PRINT",i,i],[0,1,0,i,0,i,0,"VK_EXECUTE",i,i],[0,1,0,i,0,i,0,"VK_SNAPSHOT",i,i],[0,1,0,i,0,i,0,"VK_HELP",i,i],[0,1,0,i,0,i,0,"VK_APPS",i,i],[0,1,0,i,0,i,0,"VK_PROCESSKEY",i,i],[0,1,0,i,0,i,0,"VK_PACKET",i,i],[0,1,0,i,0,i,0,"VK_DBE_SBCSCHAR",i,i],[0,1,0,i,0,i,0,"VK_DBE_DBCSCHAR",i,i],[0,1,0,i,0,i,0,"VK_ATTN",i,i],[0,1,0,i,0,i,0,"VK_CRSEL",i,i],[0,1,0,i,0,i,0,"VK_EXSEL",i,i],[0,1,0,i,0,i,0,"VK_EREOF",i,i],[0,1,0,i,0,i,0,"VK_PLAY",i,i],[0,1,0,i,0,i,0,"VK_ZOOM",i,i],[0,1,0,i,0,i,0,"VK_NONAME",i,i],[0,1,0,i,0,i,0,"VK_PA1",i,i],[0,1,0,i,0,i,0,"VK_OEM_CLEAR",i,i]];let s=[],l=[];for(const r of S){const[p,u,a,n,h,g,d,m,b,E]=r;if(l[a]||(l[a]=!0,I[a]=n,w[n]=a,v[n.toLowerCase()]=a,u&&(e.IMMUTABLE_CODE_TO_KEY_CODE[a]=h,h!==0&&h!==3&&h!==5&&h!==4&&h!==6&&h!==57&&(e.IMMUTABLE_KEY_CODE_TO_CODE[h]=a))),!s[h]){if(s[h]=!0,!g)throw new Error(`String representation missing for key code ${h} around scan code ${n}`);A.define(h,g),k.define(h,b||g),D.define(h,E||b||g)}d&&(e.EVENT_KEY_CODE_MAP[d]=h),m&&(e.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE[m]=h)}e.IMMUTABLE_KEY_CODE_TO_CODE[3]=46})();var C;(function(i){function S(a){return A.keyCodeToStr(a)}i.toString=S;function s(a){return A.strToKeyCode(a)}i.fromString=s;function l(a){return k.keyCodeToStr(a)}i.toUserSettingsUS=l;function r(a){return D.keyCodeToStr(a)}i.toUserSettingsGeneral=r;function p(a){return k.strToKeyCode(a)||D.strToKeyCode(a)}i.fromUserSettings=p;function u(a){if(a>=93&&a<=108)return null;switch(a){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return A.keyCodeToStr(a)}i.toElectronAccelerator=u})(C=e.KeyCodeUtils||(e.KeyCodeUtils={}));var o;(function(i){i[i.CtrlCmd=2048]="CtrlCmd",i[i.Shift=1024]="Shift",i[i.Alt=512]="Alt",i[i.WinCtrl=256]="WinCtrl"})(o=e.KeyMod||(e.KeyMod={}));function c(i,S){const s=(S&65535)<<16>>>0;return(i|s)>>>0}e.KeyChord=c}),define(ne[222],re([1,0,22]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResolvedKeybinding=e.ResolvedKeybindingPart=e.ScanCodeBinding=e.ChordKeybinding=e.SimpleKeybinding=e.createSimpleKeybinding=e.createKeybinding=void 0;var f;(function(C){C[C.CtrlCmd=2048]="CtrlCmd",C[C.Shift=1024]="Shift",C[C.Alt=512]="Alt",C[C.WinCtrl=256]="WinCtrl",C[C.KeyCode=255]="KeyCode"})(f||(f={}));function _(C,o){if(C===0)return null;const c=(C&65535)>>>0,i=(C&4294901760)>>>16;return i!==0?new D([A(c,o),A(i,o)]):new D([A(c,o)])}e.createKeybinding=_;function A(C,o){const c=!!(C&2048),i=!!(C&256),S=o===2?i:c,s=!!(C&1024),l=!!(C&512),r=o===2?c:i,p=C&255;return new k(S,s,l,r,p)}e.createSimpleKeybinding=A;class k{constructor(o,c,i,S,s){this.ctrlKey=o,this.shiftKey=c,this.altKey=i,this.metaKey=S,this.keyCode=s}equals(o){return this.ctrlKey===o.ctrlKey&&this.shiftKey===o.shiftKey&&this.altKey===o.altKey&&this.metaKey===o.metaKey&&this.keyCode===o.keyCode}getHashCode(){const o=this.ctrlKey?"1":"0",c=this.shiftKey?"1":"0",i=this.altKey?"1":"0",S=this.metaKey?"1":"0";return`${o}${c}${i}${S}${this.keyCode}`}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toChord(){return new D([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}}e.SimpleKeybinding=k;class D{constructor(o){if(o.length===0)throw(0,t.illegalArgument)("parts");this.parts=o}getHashCode(){let o="";for(let c=0,i=this.parts.length;c<i;c++)c!==0&&(o+=";"),o+=this.parts[c].getHashCode();return o}equals(o){if(o===null||this.parts.length!==o.parts.length)return!1;for(let c=0;c<this.parts.length;c++)if(!this.parts[c].equals(o.parts[c]))return!1;return!0}}e.ChordKeybinding=D;class I{constructor(o,c,i,S,s){this.ctrlKey=o,this.shiftKey=c,this.altKey=i,this.metaKey=S,this.scanCode=s}equals(o){return this.ctrlKey===o.ctrlKey&&this.shiftKey===o.shiftKey&&this.altKey===o.altKey&&this.metaKey===o.metaKey&&this.scanCode===o.scanCode}isDuplicateModifierCase(){return this.ctrlKey&&(this.scanCode===157||this.scanCode===161)||this.shiftKey&&(this.scanCode===158||this.scanCode===162)||this.altKey&&(this.scanCode===159||this.scanCode===163)||this.metaKey&&(this.scanCode===160||this.scanCode===164)}}e.ScanCodeBinding=I;class w{constructor(o,c,i,S,s,l){this.ctrlKey=o,this.shiftKey=c,this.altKey=i,this.metaKey=S,this.keyLabel=s,this.keyAriaLabel=l}}e.ResolvedKeybindingPart=w;class v{}e.ResolvedKeybinding=v}),define(ne[442],re([1,0,97,222]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingParser=void 0;class _{static _readModifiers(k){k=k.toLowerCase().trim();let D=!1,I=!1,w=!1,v=!1,C;do C=!1,/^ctrl(\+|\-)/.test(k)&&(D=!0,k=k.substr("ctrl-".length),C=!0),/^shift(\+|\-)/.test(k)&&(I=!0,k=k.substr("shift-".length),C=!0),/^alt(\+|\-)/.test(k)&&(w=!0,k=k.substr("alt-".length),C=!0),/^meta(\+|\-)/.test(k)&&(v=!0,k=k.substr("meta-".length),C=!0),/^win(\+|\-)/.test(k)&&(v=!0,k=k.substr("win-".length),C=!0),/^cmd(\+|\-)/.test(k)&&(v=!0,k=k.substr("cmd-".length),C=!0);while(C);let o;const c=k.indexOf(" ");return c>0?(o=k.substring(0,c),k=k.substring(c)):(o=k,k=""),{remains:k,ctrl:D,shift:I,alt:w,meta:v,key:o}}static parseSimpleKeybinding(k){const D=this._readModifiers(k),I=t.KeyCodeUtils.fromUserSettings(D.key);return[new f.SimpleKeybinding(D.ctrl,D.shift,D.alt,D.meta,I),D.remains]}static parseKeybinding(k,D){if(!k)return null;const I=[];let w;do[w,k]=this.parseSimpleKeybinding(k),I.push(w);while(k.length>0);return new f.ChordKeybinding(I)}static parseSimpleUserBinding(k){const D=this._readModifiers(k),I=D.key.match(/^\[([^\]]+)\]$/);if(I){const v=I[1],C=t.ScanCodeUtils.lowerCaseToEnum(v);return[new f.ScanCodeBinding(D.ctrl,D.shift,D.alt,D.meta,C),D.remains]}const w=t.KeyCodeUtils.fromUserSettings(D.key);return[new f.SimpleKeybinding(D.ctrl,D.shift,D.alt,D.meta,w),D.remains]}static parseUserBinding(k){if(!k)return[];const D=[];let I;for(;k.length>0;)[I,k]=this.parseSimpleUserBinding(k),D.push(I);return D}}e.KeybindingParser=_}),define(ne[278],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Lazy=void 0;class t{constructor(_){this.executor=_,this._didRun=!1}hasValue(){return this._didRun}getValue(){if(!this._didRun)try{this._value=this.executor()}catch(_){this._error=_}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}map(_){return new t(()=>_(this.getValue()))}}e.Lazy=t}),define(ne[2],re([1,0,150,92]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.disposeOnReturn=e.ImmortalReference=e.AsyncReferenceCollection=e.ReferenceCollection=e.SafeDisposable=e.RefCountedDisposable=e.MutableDisposable=e.Disposable=e.DisposableStore=e.toDisposable=e.combinedDisposable=e.dispose=e.isDisposable=e.MultiDisposeError=e.markAsSingleton=e.setDisposableTracker=void 0;const _=!1;let A=null;function k(m){A=m}if(e.setDisposableTracker=k,_){const m="__is_disposable_tracked__";k(new class{trackDisposable(b){const E=new Error("Potentially leaked disposable").stack;setTimeout(()=>{b[m]||console.log(E)},3e3)}setParent(b,E){if(b&&b!==r.None)try{b[m]=!0}catch{}}markAsDisposed(b){if(b&&b!==r.None)try{b[m]=!0}catch{}}markAsSingleton(b){}})}function D(m){return A?.trackDisposable(m),m}function I(m){A?.markAsDisposed(m)}function w(m,b){A?.setParent(m,b)}function v(m,b){if(!!A)for(const E of m)A.setParent(E,b)}function C(m){return A?.markAsSingleton(m),m}e.markAsSingleton=C;class o extends Error{constructor(b){super(`Encountered errors while disposing of store. Errors: [${b.join(", ")}]`);this.errors=b}}e.MultiDisposeError=o;function c(m){return typeof m.dispose=="function"&&m.dispose.length===0}e.isDisposable=c;function i(m){if(f.Iterable.is(m)){let b=[];for(const E of m)if(E)try{E.dispose()}catch(y){b.push(y)}if(b.length===1)throw b[0];if(b.length>1)throw new o(b);return Array.isArray(m)?[]:m}else if(m)return m.dispose(),m}e.dispose=i;function S(...m){const b=s(()=>i(m));return v(m,b),b}e.combinedDisposable=S;function s(m){const b=D({dispose:(0,t.once)(()=>{I(b),m()})});return b}e.toDisposable=s;class l{constructor(){this._toDispose=new Set,this._isDisposed=!1,D(this)}dispose(){this._isDisposed||(I(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){try{i(this._toDispose.values())}finally{this._toDispose.clear()}}add(b){if(!b)return b;if(b===this)throw new Error("Cannot register a disposable on itself!");return w(b,this),this._isDisposed?l.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(b),b}}e.DisposableStore=l,l.DISABLE_DISPOSED_WARNING=!1;class r{constructor(){this._store=new l,D(this),w(this._store,this)}dispose(){I(this),this._store.dispose()}_register(b){if(b===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(b)}}e.Disposable=r,r.None=Object.freeze({dispose(){}});class p{constructor(){this._isDisposed=!1,D(this)}get value(){return this._isDisposed?void 0:this._value}set value(b){this._isDisposed||b===this._value||(this._value?.dispose(),b&&w(b,this),this._value=b)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,I(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){const b=this._value;return this._value=void 0,b&&w(b,null),b}}e.MutableDisposable=p;class u{constructor(b){this._disposable=b,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter==0&&this._disposable.dispose(),this}}e.RefCountedDisposable=u;class a{constructor(){this.dispose=()=>{},this.unset=()=>{},this.isset=()=>!1,D(this)}set(b){let E=b;return this.unset=()=>E=void 0,this.isset=()=>E!==void 0,this.dispose=()=>{E&&(E(),E=void 0,I(this))},this}}e.SafeDisposable=a;class n{constructor(){this.references=new Map}acquire(b,...E){let y=this.references.get(b);y||(y={counter:0,object:this.createReferencedObject(b,...E)},this.references.set(b,y));const{object:T}=y,R=(0,t.once)(()=>{--y.counter==0&&(this.destroyReferencedObject(b,y.object),this.references.delete(b))});return y.counter++,{object:T,dispose:R}}}e.ReferenceCollection=n;class h{constructor(b){this.referenceCollection=b}async acquire(b,...E){const y=this.referenceCollection.acquire(b,...E);try{return{object:await y.object,dispose:()=>y.dispose()}}catch(T){throw y.dispose(),T}}}e.AsyncReferenceCollection=h;class g{constructor(b){this.object=b}dispose(){}}e.ImmortalReference=g;function d(m){const b=new l;try{m(b)}finally{b.dispose()}}e.disposeOnReturn=d}),define(ne[194],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedList=void 0;class t{constructor(A){this.element=A,this.next=t.Undefined,this.prev=t.Undefined}}t.Undefined=new t(void 0);class f{constructor(){this._first=t.Undefined,this._last=t.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===t.Undefined}clear(){let A=this._first;for(;A!==t.Undefined;){const k=A.next;A.prev=t.Undefined,A.next=t.Undefined,A=k}this._first=t.Undefined,this._last=t.Undefined,this._size=0}unshift(A){return this._insert(A,!1)}push(A){return this._insert(A,!0)}_insert(A,k){const D=new t(A);if(this._first===t.Undefined)this._first=D,this._last=D;else if(k){const w=this._last;this._last=D,D.prev=w,w.next=D}else{const w=this._first;this._first=D,D.next=w,w.prev=D}this._size+=1;let I=!1;return()=>{I||(I=!0,this._remove(D))}}shift(){if(this._first!==t.Undefined){const A=this._first.element;return this._remove(this._first),A}}pop(){if(this._last!==t.Undefined){const A=this._last.element;return this._remove(this._last),A}}_remove(A){if(A.prev!==t.Undefined&&A.next!==t.Undefined){const k=A.prev;k.next=A.next,A.next.prev=k}else A.prev===t.Undefined&&A.next===t.Undefined?(this._first=t.Undefined,this._last=t.Undefined):A.next===t.Undefined?(this._last=this._last.prev,this._last.next=t.Undefined):A.prev===t.Undefined&&(this._first=this._first.next,this._first.prev=t.Undefined);this._size-=1}*[Symbol.iterator](){let A=this._first;for(;A!==t.Undefined;)yield A.element,A=A.next}}e.LinkedList=f});var Ee=this&&this.__decorate||function(Q,e,t,f){var _=arguments.length,A=_<3?e:f===null?f=Object.getOwnPropertyDescriptor(e,t):f,k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(Q,e,t,f);else for(var D=Q.length-1;D>=0;D--)(k=Q[D])&&(A=(_<3?k(A):_>3?k(e,t,A):k(e,t))||A);return _>3&&A&&Object.defineProperty(e,t,A),A};define(ne[303],re([1,0,110]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseLinkedText=e.LinkedText=void 0;class f{constructor(D){this.nodes=D}toString(){return this.nodes.map(D=>typeof D=="string"?D:D.label).join("")}}Ee([t.memoize],f.prototype,"toString",null),e.LinkedText=f;const _=/\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: ("|')([^\3]+)(\3))?\)/gi;function A(k){const D=[];let I=0,w;for(;w=_.exec(k);){w.index-I>0&&D.push(k.substring(I,w.index));const[,v,C,,o]=w;o?D.push({label:v,href:C,title:o}):D.push({label:v,href:C}),I=w.index+w[0].length}return I<k.length&&D.push(k.substring(I)),new f(D)}e.parseLinkedText=A}),function(Q,e){typeof exports=="object"&&typeof module!="undefined"?e(exports):typeof define=="function"&&define.amd?define(ne[378],re([0]),e):(Q=typeof globalThis!="undefined"?globalThis:Q||self,e(Q.marked={}))}(this,function(Q){"use strict";function e(se,ie){for(var ce=0;ce<ie.length;ce++){var le=ie[ce];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(se,le.key,le)}}function t(se,ie,ce){return ie&&e(se.prototype,ie),ce&&e(se,ce),Object.defineProperty(se,"prototype",{writable:!1}),se}function f(se,ie){if(!!se){if(typeof se=="string")return _(se,ie);var ce=Object.prototype.toString.call(se).slice(8,-1);if(ce==="Object"&&se.constructor&&(ce=se.constructor.name),ce==="Map"||ce==="Set")return Array.from(se);if(ce==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ce))return _(se,ie)}}function _(se,ie){(ie==null||ie>se.length)&&(ie=se.length);for(var ce=0,le=new Array(ie);ce<ie;ce++)le[ce]=se[ce];return le}function A(se,ie){var ce=typeof Symbol!="undefined"&&se[Symbol.iterator]||se["@@iterator"];if(ce)return(ce=ce.call(se)).next.bind(ce);if(Array.isArray(se)||(ce=f(se))||ie&&se&&typeof se.length=="number"){ce&&(se=ce);var le=0;return function(){return le>=se.length?{done:!0}:{done:!1,value:se[le++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function k(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}Q.defaults=k();function D(se){Q.defaults=se}var I=/[&<>"']/,w=/[&<>"']/g,v=/[<>"']|&(?!#?\w+;)/,C=/[<>"']|&(?!#?\w+;)/g,o={"&":"&","<":"<",">":">",'"':""","'":"'"},c=function(ie){return o[ie]};function i(se,ie){if(ie){if(I.test(se))return se.replace(w,c)}else if(v.test(se))return se.replace(C,c);return se}var S=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function s(se){return se.replace(S,function(ie,ce){return ce=ce.toLowerCase(),ce==="colon"?":":ce.charAt(0)==="#"?ce.charAt(1)==="x"?String.fromCharCode(parseInt(ce.substring(2),16)):String.fromCharCode(+ce.substring(1)):""})}var l=/(^|[^\[])\^/g;function r(se,ie){se=se.source||se,ie=ie||"";var ce={replace:function(ae,ue){return ue=ue.source||ue,ue=ue.replace(l,"$1"),se=se.replace(ae,ue),ce},getRegex:function(){return new RegExp(se,ie)}};return ce}var p=/[^\w:]/g,u=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function a(se,ie,ce){if(se){var le;try{le=decodeURIComponent(s(ce)).replace(p,"").toLowerCase()}catch{return null}if(le.indexOf("javascript:")===0||le.indexOf("vbscript:")===0||le.indexOf("data:")===0)return null}ie&&!u.test(ce)&&(ce=m(ie,ce));try{ce=encodeURI(ce).replace(/%25/g,"%")}catch{return null}return ce}var n={},h=/^[^:]+:\/*[^/]*$/,g=/^([^:]+:)[\s\S]*$/,d=/^([^:]+:\/*[^/]*)[\s\S]*$/;function m(se,ie){n[" "+se]||(h.test(se)?n[" "+se]=se+"/":n[" "+se]=T(se,"/",!0)),se=n[" "+se];var ce=se.indexOf(":")===-1;return ie.substring(0,2)==="//"?ce?ie:se.replace(g,"$1")+ie:ie.charAt(0)==="/"?ce?ie:se.replace(d,"$1")+ie:se+ie}var b={exec:function(){}};function E(se){for(var ie=1,ce,le;ie<arguments.length;ie++){ce=arguments[ie];for(le in ce)Object.prototype.hasOwnProperty.call(ce,le)&&(se[le]=ce[le])}return se}function y(se,ie){var ce=se.replace(/\|/g,function(ue,oe,fe){for(var pe=!1,me=oe;--me>=0&&fe[me]==="\\";)pe=!pe;return pe?"|":" |"}),le=ce.split(/ \|/),ae=0;if(le[0].trim()||le.shift(),le[le.length-1].trim()||le.pop(),le.length>ie)le.splice(ie);else for(;le.length<ie;)le.push("");for(;ae<le.length;ae++)le[ae]=le[ae].trim().replace(/\\\|/g,"|");return le}function T(se,ie,ce){var le=se.length;if(le===0)return"";for(var ae=0;ae<le;){var ue=se.charAt(le-ae-1);if(ue===ie&&!ce)ae++;else if(ue!==ie&&ce)ae++;else break}return se.substr(0,le-ae)}function R(se,ie){if(se.indexOf(ie[1])===-1)return-1;for(var ce=se.length,le=0,ae=0;ae<ce;ae++)if(se[ae]==="\\")ae++;else if(se[ae]===ie[0])le++;else if(se[ae]===ie[1]&&(le--,le<0))return ae;return-1}function O(se){se&&se.sanitize&&!se.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function x(se,ie){if(ie<1)return"";for(var ce="";ie>1;)ie&1&&(ce+=se),ie>>=1,se+=se;return ce+se}function F(se,ie,ce,le){var ae=ie.href,ue=ie.title?i(ie.title):null,oe=se[1].replace(/\\([\[\]])/g,"$1");if(se[0].charAt(0)!=="!"){le.state.inLink=!0;var fe={type:"link",raw:ce,href:ae,title:ue,text:oe,tokens:le.inlineTokens(oe,[])};return le.state.inLink=!1,fe}else return{type:"image",raw:ce,href:ae,title:ue,text:i(oe)}}function L(se,ie){var ce=se.match(/^(\s+)(?:```)/);if(ce===null)return ie;var le=ce[1];return ie.split(` `).map(function(ae){var ue=ae.match(/^\s+/);if(ue===null)return ae;var oe=ue[0];return oe.length>=le.length?ae.slice(le.length):ae}).join(` `)}var M=function(){function se(ce){this.options=ce||Q.defaults}var ie=se.prototype;return ie.space=function(le){var ae=this.rules.block.newline.exec(le);if(ae&&ae[0].length>0)return{type:"space",raw:ae[0]}},ie.code=function(le){var ae=this.rules.block.code.exec(le);if(ae){var ue=ae[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:ae[0],codeBlockStyle:"indented",text:this.options.pedantic?ue:T(ue,` `)}}},ie.fences=function(le){var ae=this.rules.block.fences.exec(le);if(ae){var ue=ae[0],oe=L(ue,ae[3]||"");return{type:"code",raw:ue,lang:ae[2]?ae[2].trim():ae[2],text:oe}}},ie.heading=function(le){var ae=this.rules.block.heading.exec(le);if(ae){var ue=ae[2].trim();if(/#$/.test(ue)){var oe=T(ue,"#");(this.options.pedantic||!oe||/ $/.test(oe))&&(ue=oe.trim())}var fe={type:"heading",raw:ae[0],depth:ae[1].length,text:ue,tokens:[]};return this.lexer.inline(fe.text,fe.tokens),fe}},ie.hr=function(le){var ae=this.rules.block.hr.exec(le);if(ae)return{type:"hr",raw:ae[0]}},ie.blockquote=function(le){var ae=this.rules.block.blockquote.exec(le);if(ae){var ue=ae[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:ae[0],tokens:this.lexer.blockTokens(ue,[]),text:ue}}},ie.list=function(le){var ae=this.rules.block.list.exec(le);if(ae){var ue,oe,fe,pe,me,be,Ce,ve,he,ge,de,Se,we=ae[1].trim(),ye=we.length>1,ke={type:"list",raw:"",ordered:ye,start:ye?+we.slice(0,-1):"",loose:!1,items:[]};we=ye?"\\d{1,9}\\"+we.slice(-1):"\\"+we,this.options.pedantic&&(we=ye?we:"[*+-]");for(var Ie=new RegExp("^( {0,3}"+we+")((?: [^\\n]*)?(?:\\n|$))");le&&(Se=!1,!(!(ae=Ie.exec(le))||this.rules.block.hr.test(le)));){if(ue=ae[0],le=le.substring(ue.length),ve=ae[2].split(` `,1)[0],he=le.split(` `,1)[0],this.options.pedantic?(pe=2,de=ve.trimLeft()):(pe=ae[2].search(/[^ ]/),pe=pe>4?1:pe,de=ve.slice(pe),pe+=ae[1].length),be=!1,!ve&&/^ *$/.test(he)&&(ue+=he+` `,le=le.substring(he.length+1),Se=!0),!Se)for(var Te=new RegExp("^ {0,"+Math.min(3,pe-1)+"}(?:[*+-]|\\d{1,9}[.)])");le&&(ge=le.split(` `,1)[0],ve=ge,this.options.pedantic&&(ve=ve.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!Te.test(ve));){if(ve.search(/[^ ]/)>=pe||!ve.trim())de+=` `+ve.slice(pe);else if(!be)de+=` `+ve;else break;!be&&!ve.trim()&&(be=!0),ue+=ge+` `,le=le.substring(ge.length+1)}ke.loose||(Ce?ke.loose=!0:/\n *\n *$/.test(ue)&&(Ce=!0)),this.options.gfm&&(oe=/^\[[ xX]\] /.exec(de),oe&&(fe=oe[0]!=="[ ] ",de=de.replace(/^\[[ xX]\] +/,""))),ke.items.push({type:"list_item",raw:ue,task:!!oe,checked:fe,loose:!1,text:de}),ke.raw+=ue}ke.items[ke.items.length-1].raw=ue.trimRight(),ke.items[ke.items.length-1].text=de.trimRight(),ke.raw=ke.raw.trimRight();var De=ke.items.length;for(me=0;me<De;me++){this.lexer.state.top=!1,ke.items[me].tokens=this.lexer.blockTokens(ke.items[me].text,[]);var _e=ke.items[me].tokens.filter(function(Ne){return Ne.type==="space"}),Re=_e.every(function(Ne){for(var xe=Ne.raw.split(""),Ae=0,Le=A(xe),Me;!(Me=Le()).done;){var We=Me.value;if(We===` `&&(Ae+=1),Ae>1)return!0}return!1});!ke.loose&&_e.length&&Re&&(ke.loose=!0,ke.items[me].loose=!0)}return ke}},ie.html=function(le){var ae=this.rules.block.html.exec(le);if(ae){var ue={type:"html",raw:ae[0],pre:!this.options.sanitizer&&(ae[1]==="pre"||ae[1]==="script"||ae[1]==="style"),text:ae[0]};return this.options.sanitize&&(ue.type="paragraph",ue.text=this.options.sanitizer?this.options.sanitizer(ae[0]):i(ae[0]),ue.tokens=[],this.lexer.inline(ue.text,ue.tokens)),ue}},ie.def=function(le){var ae=this.rules.block.def.exec(le);if(ae){ae[3]&&(ae[3]=ae[3].substring(1,ae[3].length-1));var ue=ae[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:ue,raw:ae[0],href:ae[2],title:ae[3]}}},ie.table=function(le){var ae=this.rules.block.table.exec(le);if(ae){var ue={type:"table",header:y(ae[1]).map(function(Ce){return{text:Ce}}),align:ae[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:ae[3]?ae[3].replace(/\n[ \t]*$/,"").split(` `):[]};if(ue.header.length===ue.align.length){ue.raw=ae[0];var oe=ue.align.length,fe,pe,me,be;for(fe=0;fe<oe;fe++)/^ *-+: *$/.test(ue.align[fe])?ue.align[fe]="right":/^ *:-+: *$/.test(ue.align[fe])?ue.align[fe]="center":/^ *:-+ *$/.test(ue.align[fe])?ue.align[fe]="left":ue.align[fe]=null;for(oe=ue.rows.length,fe=0;fe<oe;fe++)ue.rows[fe]=y(ue.rows[fe],ue.header.length).map(function(Ce){return{text:Ce}});for(oe=ue.header.length,pe=0;pe<oe;pe++)ue.header[pe].tokens=[],this.lexer.inlineTokens(ue.header[pe].text,ue.header[pe].tokens);for(oe=ue.rows.length,pe=0;pe<oe;pe++)for(be=ue.rows[pe],me=0;me<be.length;me++)be[me].tokens=[],this.lexer.inlineTokens(be[me].text,be[me].tokens);return ue}}},ie.lheading=function(le){var ae=this.rules.block.lheading.exec(le);if(ae){var ue={type:"heading",raw:ae[0],depth:ae[2].charAt(0)==="="?1:2,text:ae[1],tokens:[]};return this.lexer.inline(ue.text,ue.tokens),ue}},ie.paragraph=function(le){var ae=this.rules.block.paragraph.exec(le);if(ae){var ue={type:"paragraph",raw:ae[0],text:ae[1].charAt(ae[1].length-1)===` `?ae[1].slice(0,-1):ae[1],tokens:[]};return this.lexer.inline(ue.text,ue.tokens),ue}},ie.text=function(le){var ae=this.rules.block.text.exec(le);if(ae){var ue={type:"text",raw:ae[0],text:ae[0],tokens:[]};return this.lexer.inline(ue.text,ue.tokens),ue}},ie.escape=function(le){var ae=this.rules.inline.escape.exec(le);if(ae)return{type:"escape",raw:ae[0],text:i(ae[1])}},ie.tag=function(le){var ae=this.rules.inline.tag.exec(le);if(ae)return!this.lexer.state.inLink&&/^<a /i.test(ae[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(ae[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(ae[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ae[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:ae[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ae[0]):i(ae[0]):ae[0]}},ie.link=function(le){var ae=this.rules.inline.link.exec(le);if(ae){var ue=ae[2].trim();if(!this.options.pedantic&&/^</.test(ue)){if(!/>$/.test(ue))return;var oe=T(ue.slice(0,-1),"\\");if((ue.length-oe.length)%2==0)return}else{var fe=R(ae[2],"()");if(fe>-1){var pe=ae[0].indexOf("!")===0?5:4,me=pe+ae[1].length+fe;ae[2]=ae[2].substring(0,fe),ae[0]=ae[0].substring(0,me).trim(),ae[3]=""}}var be=ae[2],Ce="";if(this.options.pedantic){var ve=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(be);ve&&(be=ve[1],Ce=ve[3])}else Ce=ae[3]?ae[3].slice(1,-1):"";return be=be.trim(),/^</.test(be)&&(this.options.pedantic&&!/>$/.test(ue)?be=be.slice(1):be=be.slice(1,-1)),F(ae,{href:be&&be.replace(this.rules.inline._escapes,"$1"),title:Ce&&Ce.replace(this.rules.inline._escapes,"$1")},ae[0],this.lexer)}},ie.reflink=function(le,ae){var ue;if((ue=this.rules.inline.reflink.exec(le))||(ue=this.rules.inline.nolink.exec(le))){var oe=(ue[2]||ue[1]).replace(/\s+/g," ");if(oe=ae[oe.toLowerCase()],!oe||!oe.href){var fe=ue[0].charAt(0);return{type:"text",raw:fe,text:fe}}return F(ue,oe,ue[0],this.lexer)}},ie.emStrong=function(le,ae,ue){ue===void 0&&(ue="");var oe=this.rules.inline.emStrong.lDelim.exec(le);if(!!oe&&!(oe[3]&&ue.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var fe=oe[1]||oe[2]||"";if(!fe||fe&&(ue===""||this.rules.inline.punctuation.exec(ue))){var pe=oe[0].length-1,me,be,Ce=pe,ve=0,he=oe[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(he.lastIndex=0,ae=ae.slice(-1*le.length+pe);(oe=he.exec(ae))!=null;)if(me=oe[1]||oe[2]||oe[3]||oe[4]||oe[5]||oe[6],!!me){if(be=me.length,oe[3]||oe[4]){Ce+=be;continue}else if((oe[5]||oe[6])&&pe%3&&!((pe+be)%3)){ve+=be;continue}if(Ce-=be,!(Ce>0)){if(be=Math.min(be,be+Ce+ve),Math.min(pe,be)%2){var ge=le.slice(1,pe+oe.index+be);return{type:"em",raw:le.slice(0,pe+oe.index+be+1),text:ge,tokens:this.lexer.inlineTokens(ge,[])}}var de=le.slice(2,pe+oe.index+be-1);return{type:"strong",raw:le.slice(0,pe+oe.index+be+1),text:de,tokens:this.lexer.inlineTokens(de,[])}}}}}},ie.codespan=function(le){var ae=this.rules.inline.code.exec(le);if(ae){var ue=ae[2].replace(/\n/g," "),oe=/[^ ]/.test(ue),fe=/^ /.test(ue)&&/ $/.test(ue);return oe&&fe&&(ue=ue.substring(1,ue.length-1)),ue=i(ue,!0),{type:"codespan",raw:ae[0],text:ue}}},ie.br=function(le){var ae=this.rules.inline.br.exec(le);if(ae)return{type:"br",raw:ae[0]}},ie.del=function(le){var ae=this.rules.inline.del.exec(le);if(ae)return{type:"del",raw:ae[0],text:ae[2],tokens:this.lexer.inlineTokens(ae[2],[])}},ie.autolink=function(le,ae){var ue=this.rules.inline.autolink.exec(le);if(ue){var oe,fe;return ue[2]==="@"?(oe=i(this.options.mangle?ae(ue[1]):ue[1]),fe="mailto:"+oe):(oe=i(ue[1]),fe=oe),{type:"link",raw:ue[0],text:oe,href:fe,tokens:[{type:"text",raw:oe,text:oe}]}}},ie.url=function(le,ae){var ue;if(ue=this.rules.inline.url.exec(le)){var oe,fe;if(ue[2]==="@")oe=i(this.options.mangle?ae(ue[0]):ue[0]),fe="mailto:"+oe;else{var pe;do pe=ue[0],ue[0]=this.rules.inline._backpedal.exec(ue[0])[0];while(pe!==ue[0]);oe=i(ue[0]),ue[1]==="www."?fe="http://"+oe:fe=oe}return{type:"link",raw:ue[0],text:oe,href:fe,tokens:[{type:"text",raw:oe,text:oe}]}}},ie.inlineText=function(le,ae){var ue=this.rules.inline.text.exec(le);if(ue){var oe;return this.lexer.state.inRawBlock?oe=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ue[0]):i(ue[0]):ue[0]:oe=i(this.options.smartypants?ae(ue[0]):ue[0]),{type:"text",raw:ue[0],text:oe}}},se}(),N={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?<?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:b,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};N._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/,N._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,N.def=r(N.def).replace("label",N._label).replace("title",N._title).getRegex(),N.bullet=/(?:[*+-]|\d{1,9}[.)])/,N.listItemStart=r(/^( *)(bull) */).replace("bull",N.bullet).getRegex(),N.list=r(N.list).replace(/bull/g,N.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+N.def.source+")").getRegex(),N._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",N._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,N.html=r(N.html,"i").replace("comment",N._comment).replace("tag",N._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),N.paragraph=r(N._paragraph).replace("hr",N.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",N._tag).getRegex(),N.blockquote=r(N.blockquote).replace("paragraph",N.paragraph).getRegex(),N.normal=E({},N),N.gfm=E({},N.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),N.gfm.table=r(N.gfm.table).replace("hr",N.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",N._tag).getRegex(),N.gfm.paragraph=r(N._paragraph).replace("hr",N.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",N.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",N._tag).getRegex(),N.pedantic=E({},N.normal,{html:r(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",N._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:b,paragraph:r(N.normal._paragraph).replace("hr",N.hr).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",N.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var B={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:b,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:b,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};B._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",B.punctuation=r(B.punctuation).replace(/punctuation/g,B._punctuation).getRegex(),B.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,B.escapedEmSt=/\\\*|\\_/g,B._comment=r(N._comment).replace("(?:-->|$)","-->").getRegex(),B.emStrong.lDelim=r(B.emStrong.lDelim).replace(/punct/g,B._punctuation).getRegex(),B.emStrong.rDelimAst=r(B.emStrong.rDelimAst,"g").replace(/punct/g,B._punctuation).getRegex(),B.emStrong.rDelimUnd=r(B.emStrong.rDelimUnd,"g").replace(/punct/g,B._punctuation).getRegex(),B._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,B._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,B._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,B.autolink=r(B.autolink).replace("scheme",B._scheme).replace("email",B._email).getRegex(),B._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,B.tag=r(B.tag).replace("comment",B._comment).replace("attribute",B._attribute).getRegex(),B._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,B._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,B._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,B.link=r(B.link).replace("label",B._label).replace("href",B._href).replace("title",B._title).getRegex(),B.reflink=r(B.reflink).replace("label",B._label).replace("ref",N._label).getRegex(),B.nolink=r(B.nolink).replace("ref",N._label).getRegex(),B.reflinkSearch=r(B.reflinkSearch,"g").replace("reflink",B.reflink).replace("nolink",B.nolink).getRegex(),B.normal=E({},B),B.pedantic=E({},B.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:r(/^!?\[(label)\]\((.*?)\)/).replace("label",B._label).getRegex(),reflink:r(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",B._label).getRegex()}),B.gfm=E({},B.normal,{escape:r(B.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),B.gfm.url=r(B.gfm.url,"i").replace("email",B.gfm._extended_email).getRegex(),B.breaks=E({},B.gfm,{br:r(B.br).replace("{2,}","*").getRegex(),text:r(B.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});function P(se){return se.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function V(se){var ie="",ce,le,ae=se.length;for(ce=0;ce<ae;ce++)le=se.charCodeAt(ce),Math.random()>.5&&(le="x"+le.toString(16)),ie+="&#"+le+";";return ie}var z=function(){function se(ce){this.tokens=[],this.tokens.links=Object.create(null),this.options=ce||Q.defaults,this.options.tokenizer=this.options.tokenizer||new M,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var le={block:N.normal,inline:B.normal};this.options.pedantic?(le.block=N.pedantic,le.inline=B.pedantic):this.options.gfm&&(le.block=N.gfm,this.options.breaks?le.inline=B.breaks:le.inline=B.gfm),this.tokenizer.rules=le}se.lex=function(le,ae){var ue=new se(ae);return ue.lex(le)},se.lexInline=function(le,ae){var ue=new se(ae);return ue.inlineTokens(le)};var ie=se.prototype;return ie.lex=function(le){le=le.replace(/\r\n|\r/g,` `).replace(/\t/g," "),this.blockTokens(le,this.tokens);for(var ae;ae=this.inlineQueue.shift();)this.inlineTokens(ae.src,ae.tokens);return this.tokens},ie.blockTokens=function(le,ae){var ue=this;ae===void 0&&(ae=[]),this.options.pedantic&&(le=le.replace(/^ +$/gm,""));for(var oe,fe,pe,me;le;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(function(Ce){return(oe=Ce.call({lexer:ue},le,ae))?(le=le.substring(oe.raw.length),ae.push(oe),!0):!1}))){if(oe=this.tokenizer.space(le)){le=le.substring(oe.raw.length),oe.raw.length===1&&ae.length>0?ae[ae.length-1].raw+=` `:ae.push(oe);continue}if(oe=this.tokenizer.code(le)){le=le.substring(oe.raw.length),fe=ae[ae.length-1],fe&&(fe.type==="paragraph"||fe.type==="text")?(fe.raw+=` `+oe.raw,fe.text+=` `+oe.text,this.inlineQueue[this.inlineQueue.length-1].src=fe.text):ae.push(oe);continue}if(oe=this.tokenizer.fences(le)){le=le.substring(oe.raw.length),ae.push(oe);continue}if(oe=this.tokenizer.heading(le)){le=le.substring(oe.raw.length),ae.push(oe);continue}if(oe=this.tokenizer.hr(le)){le=le.substring(oe.raw.length),ae.push(oe);continue}if(oe=this.tokenizer.blockquote(le)){le=le.substring(oe.raw.length),ae.push(oe);continue}if(oe=this.tokenizer.list(le)){le=le.substring(oe.raw.length),ae.push(oe);continue}if(oe=this.tokenizer.html(le)){le=le.substring(oe.raw.length),ae.push(oe);continue}if(oe=this.tokenizer.def(le)){le=le.substring(oe.raw.length),fe=ae[ae.length-1],fe&&(fe.type==="paragraph"||fe.type==="text")?(fe.raw+=` `+oe.raw,fe.text+=` `+oe.raw,this.inlineQueue[this.inlineQueue.length-1].src=fe.text):this.tokens.links[oe.tag]||(this.tokens.links[oe.tag]={href:oe.href,title:oe.title});continue}if(oe=this.tokenizer.table(le)){le=le.substring(oe.raw.length),ae.push(oe);continue}if(oe=this.tokenizer.lheading(le)){le=le.substring(oe.raw.length),ae.push(oe);continue}if(pe=le,this.options.extensions&&this.options.extensions.startBlock&&function(){var Ce=1/0,ve=le.slice(1),he=void 0;ue.options.extensions.startBlock.forEach(function(ge){he=ge.call({lexer:this},ve),typeof he=="number"&&he>=0&&(Ce=Math.min(Ce,he))}),Ce<1/0&&Ce>=0&&(pe=le.substring(0,Ce+1))}(),this.state.top&&(oe=this.tokenizer.paragraph(pe))){fe=ae[ae.length-1],me&&fe.type==="paragraph"?(fe.raw+=` `+oe.raw,fe.text+=` `+oe.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=fe.text):ae.push(oe),me=pe.length!==le.length,le=le.substring(oe.raw.length);continue}if(oe=this.tokenizer.text(le)){le=le.substring(oe.raw.length),fe=ae[ae.length-1],fe&&fe.type==="text"?(fe.raw+=` `+oe.raw,fe.text+=` `+oe.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=fe.text):ae.push(oe);continue}if(le){var be="Infinite loop on byte: "+le.charCodeAt(0);if(this.options.silent){console.error(be);break}else throw new Error(be)}}return this.state.top=!0,ae},ie.inline=function(le,ae){this.inlineQueue.push({src:le,tokens:ae})},ie.inlineTokens=function(le,ae){var ue=this;ae===void 0&&(ae=[]);var oe,fe,pe,me=le,be,Ce,ve;if(this.tokens.links){var he=Object.keys(this.tokens.links);if(he.length>0)for(;(be=this.tokenizer.rules.inline.reflinkSearch.exec(me))!=null;)he.includes(be[0].slice(be[0].lastIndexOf("[")+1,-1))&&(me=me.slice(0,be.index)+"["+x("a",be[0].length-2)+"]"+me.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(be=this.tokenizer.rules.inline.blockSkip.exec(me))!=null;)me=me.slice(0,be.index)+"["+x("a",be[0].length-2)+"]"+me.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(be=this.tokenizer.rules.inline.escapedEmSt.exec(me))!=null;)me=me.slice(0,be.index)+"++"+me.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;le;)if(Ce||(ve=""),Ce=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(function(de){return(oe=de.call({lexer:ue},le,ae))?(le=le.substring(oe.raw.length),ae.push(oe),!0):!1}))){if(oe=this.tokenizer.escape(le)){le=le.substring(oe.raw.length),ae.push(oe);continue}if(oe=this.tokenizer.tag(le)){le=le.substring(oe.raw.length),fe=ae[ae.length-1],fe&&oe.type==="text"&&fe.type==="text"?(fe.raw+=oe.raw,fe.text+=oe.text):ae.push(oe);continue}if(oe=this.tokenizer.link(le)){le=le.substring(oe.raw.length),ae.push(oe);continue}if(oe=this.tokenizer.reflink(le,this.tokens.links)){le=le.substring(oe.raw.length),fe=ae[ae.length-1],fe&&oe.type==="text"&&fe.type==="text"?(fe.raw+=oe.raw,fe.text+=oe.text):ae.push(oe);continue}if(oe=this.tokenizer.emStrong(le,me,ve)){le=le.substring(oe.raw.length),ae.push(oe);continue}if(oe=this.tokenizer.codespan(le)){le=le.substring(oe.raw.length),ae.push(oe);continue}if(oe=this.tokenizer.br(le)){le=le.substring(oe.raw.length),ae.push(oe);continue}if(oe=this.tokenizer.del(le)){le=le.substring(oe.raw.length),ae.push(oe);continue}if(oe=this.tokenizer.autolink(le,V)){le=le.substring(oe.raw.length),ae.push(oe);continue}if(!this.state.inLink&&(oe=this.tokenizer.url(le,V))){le=le.substring(oe.raw.length),ae.push(oe);continue}if(pe=le,this.options.extensions&&this.options.extensions.startInline&&function(){var de=1/0,Se=le.slice(1),we=void 0;ue.options.extensions.startInline.forEach(function(ye){we=ye.call({lexer:this},Se),typeof we=="number"&&we>=0&&(de=Math.min(de,we))}),de<1/0&&de>=0&&(pe=le.substring(0,de+1))}(),oe=this.tokenizer.inlineText(pe,P)){le=le.substring(oe.raw.length),oe.raw.slice(-1)!=="_"&&(ve=oe.raw.slice(-1)),Ce=!0,fe=ae[ae.length-1],fe&&fe.type==="text"?(fe.raw+=oe.raw,fe.text+=oe.text):ae.push(oe);continue}if(le){var ge="Infinite loop on byte: "+le.charCodeAt(0);if(this.options.silent){console.error(ge);break}else throw new Error(ge)}}return ae},t(se,null,[{key:"rules",get:function(){return{block:N,inline:B}}}]),se}(),U=function(){function se(ce){this.options=ce||Q.defaults}var ie=se.prototype;return ie.code=function(le,ae,ue){var oe=(ae||"").match(/\S*/)[0];if(this.options.highlight){var fe=this.options.highlight(le,oe);fe!=null&&fe!==le&&(ue=!0,le=fe)}return le=le.replace(/\n$/,"")+` `,oe?'<pre><code class="'+this.options.langPrefix+i(oe,!0)+'">'+(ue?le:i(le,!0))+`</code></pre> `:"<pre><code>"+(ue?le:i(le,!0))+`</code></pre> `},ie.blockquote=function(le){return`<blockquote> `+le+`</blockquote> `},ie.html=function(le){return le},ie.heading=function(le,ae,ue,oe){return this.options.headerIds?"<h"+ae+' id="'+this.options.headerPrefix+oe.slug(ue)+'">'+le+"</h"+ae+`> `:"<h"+ae+">"+le+"</h"+ae+`> `},ie.hr=function(){return this.options.xhtml?`<hr/> `:`<hr> `},ie.list=function(le,ae,ue){var oe=ae?"ol":"ul",fe=ae&&ue!==1?' start="'+ue+'"':"";return"<"+oe+fe+`> `+le+"</"+oe+`> `},ie.listitem=function(le){return"<li>"+le+`</li> `},ie.checkbox=function(le){return"<input "+(le?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},ie.paragraph=function(le){return"<p>"+le+`</p> `},ie.table=function(le,ae){return ae&&(ae="<tbody>"+ae+"</tbody>"),`<table> <thead> `+le+`</thead> `+ae+`</table> `},ie.tablerow=function(le){return`<tr> `+le+`</tr> `},ie.tablecell=function(le,ae){var ue=ae.header?"th":"td",oe=ae.align?"<"+ue+' align="'+ae.align+'">':"<"+ue+">";return oe+le+"</"+ue+`> `},ie.strong=function(le){return"<strong>"+le+"</strong>"},ie.em=function(le){return"<em>"+le+"</em>"},ie.codespan=function(le){return"<code>"+le+"</code>"},ie.br=function(){return this.options.xhtml?"<br/>":"<br>"},ie.del=function(le){return"<del>"+le+"</del>"},ie.link=function(le,ae,ue){if(le=a(this.options.sanitize,this.options.baseUrl,le),le===null)return ue;var oe='<a href="'+i(le)+'"';return ae&&(oe+=' title="'+ae+'"'),oe+=">"+ue+"</a>",oe},ie.image=function(le,ae,ue){if(le=a(this.options.sanitize,this.options.baseUrl,le),le===null)return ue;var oe='<img src="'+le+'" alt="'+ue+'"';return ae&&(oe+=' title="'+ae+'"'),oe+=this.options.xhtml?"/>":">",oe},ie.text=function(le){return le},se}(),H=function(){function se(){}var ie=se.prototype;return ie.strong=function(le){return le},ie.em=function(le){return le},ie.codespan=function(le){return le},ie.del=function(le){return le},ie.html=function(le){return le},ie.text=function(le){return le},ie.link=function(le,ae,ue){return""+ue},ie.image=function(le,ae,ue){return""+ue},ie.br=function(){return""},se}(),K=function(){function se(){this.seen={}}var ie=se.prototype;return ie.serialize=function(le){return le.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},ie.getNextSafeSlug=function(le,ae){var ue=le,oe=0;if(this.seen.hasOwnProperty(ue)){oe=this.seen[le];do oe++,ue=le+"-"+oe;while(this.seen.hasOwnProperty(ue))}return ae||(this.seen[le]=oe,this.seen[ue]=0),ue},ie.slug=function(le,ae){ae===void 0&&(ae={});var ue=this.serialize(le);return this.getNextSafeSlug(ue,ae.dryrun)},se}(),G=function(){function se(ce){this.options=ce||Q.defaults,this.options.renderer=this.options.renderer||new U,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new H,this.slugger=new K}se.parse=function(le,ae){var ue=new se(ae);return ue.parse(le)},se.parseInline=function(le,ae){var ue=new se(ae);return ue.parseInline(le)};var ie=se.prototype;return ie.parse=function(le,ae){ae===void 0&&(ae=!0);var ue="",oe,fe,pe,me,be,Ce,ve,he,ge,de,Se,we,ye,ke,Ie,Te,De,_e,Re,Ne=le.length;for(oe=0;oe<Ne;oe++){if(de=le[oe],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[de.type]&&(Re=this.options.extensions.renderers[de.type].call({parser:this},de),Re!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(de.type))){ue+=Re||"";continue}switch(de.type){case"space":continue;case"hr":{ue+=this.renderer.hr();continue}case"heading":{ue+=this.renderer.heading(this.parseInline(de.tokens),de.depth,s(this.parseInline(de.tokens,this.textRenderer)),this.slugger);continue}case"code":{ue+=this.renderer.code(de.text,de.lang,de.escaped);continue}case"table":{for(he="",ve="",me=de.header.length,fe=0;fe<me;fe++)ve+=this.renderer.tablecell(this.parseInline(de.header[fe].tokens),{header:!0,align:de.align[fe]});for(he+=this.renderer.tablerow(ve),ge="",me=de.rows.length,fe=0;fe<me;fe++){for(Ce=de.rows[fe],ve="",be=Ce.length,pe=0;pe<be;pe++)ve+=this.renderer.tablecell(this.parseInline(Ce[pe].tokens),{header:!1,align:de.align[pe]});ge+=this.renderer.tablerow(ve)}ue+=this.renderer.table(he,ge);continue}case"blockquote":{ge=this.parse(de.tokens),ue+=this.renderer.blockquote(ge);continue}case"list":{for(Se=de.ordered,we=de.start,ye=de.loose,me=de.items.length,ge="",fe=0;fe<me;fe++)Ie=de.items[fe],Te=Ie.checked,De=Ie.task,ke="",Ie.task&&(_e=this.renderer.checkbox(Te),ye?Ie.tokens.length>0&&Ie.tokens[0].type==="paragraph"?(Ie.tokens[0].text=_e+" "+Ie.tokens[0].text,Ie.tokens[0].tokens&&Ie.tokens[0].tokens.length>0&&Ie.tokens[0].tokens[0].type==="text"&&(Ie.tokens[0].tokens[0].text=_e+" "+Ie.tokens[0].tokens[0].text)):Ie.tokens.unshift({type:"text",text:_e}):ke+=_e),ke+=this.parse(Ie.tokens,ye),ge+=this.renderer.listitem(ke,De,Te);ue+=this.renderer.list(ge,Se,we);continue}case"html":{ue+=this.renderer.html(de.text);continue}case"paragraph":{ue+=this.renderer.paragraph(this.parseInline(de.tokens));continue}case"text":{for(ge=de.tokens?this.parseInline(de.tokens):de.text;oe+1<Ne&&le[oe+1].type==="text";)de=le[++oe],ge+=` `+(de.tokens?this.parseInline(de.tokens):de.text);ue+=ae?this.renderer.paragraph(ge):ge;continue}default:{var xe='Token with "'+de.type+'" type was not found.';if(this.options.silent){console.error(xe);return}else throw new Error(xe)}}}return ue},ie.parseInline=function(le,ae){ae=ae||this.renderer;var ue="",oe,fe,pe,me=le.length;for(oe=0;oe<me;oe++){if(fe=le[oe],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[fe.type]&&(pe=this.options.extensions.renderers[fe.type].call({parser:this},fe),pe!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(fe.type))){ue+=pe||"";continue}switch(fe.type){case"escape":{ue+=ae.text(fe.text);break}case"html":{ue+=ae.html(fe.text);break}case"link":{ue+=ae.link(fe.href,fe.title,this.parseInline(fe.tokens,ae));break}case"image":{ue+=ae.image(fe.href,fe.title,fe.text);break}case"strong":{ue+=ae.strong(this.parseInline(fe.tokens,ae));break}case"em":{ue+=ae.em(this.parseInline(fe.tokens,ae));break}case"codespan":{ue+=ae.codespan(fe.text);break}case"br":{ue+=ae.br();break}case"del":{ue+=ae.del(this.parseInline(fe.tokens,ae));break}case"text":{ue+=ae.text(fe.text);break}default:{var be='Token with "'+fe.type+'" type was not found.';if(this.options.silent){console.error(be);return}else throw new Error(be)}}}return ue},se}();function q(se,ie,ce){if(typeof se=="undefined"||se===null)throw new Error("marked(): input parameter is undefined or null");if(typeof se!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(se)+", string expected");if(typeof ie=="function"&&(ce=ie,ie=null),ie=E({},q.defaults,ie||{}),O(ie),ce){var le=ie.highlight,ae;try{ae=z.lex(se,ie)}catch(pe){return ce(pe)}var ue=function(me){var be;if(!me)try{ie.walkTokens&&q.walkTokens(ae,ie.walkTokens),be=G.parse(ae,ie)}catch(Ce){me=Ce}return ie.highlight=le,me?ce(me):ce(null,be)};if(!le||le.length<3||(delete ie.highlight,!ae.length))return ue();var oe=0;q.walkTokens(ae,function(pe){pe.type==="code"&&(oe++,setTimeout(function(){le(pe.text,pe.lang,function(me,be){if(me)return ue(me);be!=null&&be!==pe.text&&(pe.text=be,pe.escaped=!0),oe--,oe===0&&ue()})},0))}),oe===0&&ue();return}try{var fe=z.lex(se,ie);return ie.walkTokens&&q.walkTokens(fe,ie.walkTokens),G.parse(fe,ie)}catch(pe){if(pe.message+=` Please report this to https://github.com/markedjs/marked.`,ie.silent)return"<p>An error occurred:</p><pre>"+i(pe.message+"",!0)+"</pre>";throw pe}}q.options=q.setOptions=function(se){return E(q.defaults,se),D(q.defaults),q},q.getDefaults=k,q.defaults=Q.defaults,q.use=function(){for(var se=arguments.length,ie=new Array(se),ce=0;ce<se;ce++)ie[ce]=arguments[ce];var le=E.apply(void 0,[{}].concat(ie)),ae=q.defaults.extensions||{renderers:{},childTokens:{}},ue;ie.forEach(function(oe){if(oe.extensions&&(ue=!0,oe.extensions.forEach(function(pe){if(!pe.name)throw new Error("extension name required");if(pe.renderer){var me=ae.renderers?ae.renderers[pe.name]:null;me?ae.renderers[pe.name]=function(){for(var be=arguments.length,Ce=new Array(be),ve=0;ve<be;ve++)Ce[ve]=arguments[ve];var he=pe.renderer.apply(this,Ce);return he===!1&&(he=me.apply(this,Ce)),he}:ae.renderers[pe.name]=pe.renderer}if(pe.tokenizer){if(!pe.level||pe.level!=="block"&&pe.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");ae[pe.level]?ae[pe.level].unshift(pe.tokenizer):ae[pe.level]=[pe.tokenizer],pe.start&&(pe.level==="block"?ae.startBlock?ae.startBlock.push(pe.start):ae.startBlock=[pe.start]:pe.level==="inline"&&(ae.startInline?ae.startInline.push(pe.start):ae.startInline=[pe.start]))}pe.childTokens&&(ae.childTokens[pe.name]=pe.childTokens)})),oe.renderer&&function(){var pe=q.defaults.renderer||new U,me=function(ve){var he=pe[ve];pe[ve]=function(){for(var ge=arguments.length,de=new Array(ge),Se=0;Se<ge;Se++)de[Se]=arguments[Se];var we=oe.renderer[ve].apply(pe,de);return we===!1&&(we=he.apply(pe,de)),we}};for(var be in oe.renderer)me(be);le.renderer=pe}(),oe.tokenizer&&function(){var pe=q.defaults.tokenizer||new M,me=function(ve){var he=pe[ve];pe[ve]=function(){for(var ge=arguments.length,de=new Array(ge),Se=0;Se<ge;Se++)de[Se]=arguments[Se];var we=oe.tokenizer[ve].apply(pe,de);return we===!1&&(we=he.apply(pe,de)),we}};for(var be in oe.tokenizer)me(be);le.tokenizer=pe}(),oe.walkTokens){var fe=q.defaults.walkTokens;le.walkTokens=function(pe){oe.walkTokens.call(this,pe),fe&&fe.call(this,pe)}}ue&&(le.extensions=ae),q.setOptions(le)})},q.walkTokens=function(se,ie){for(var ce=function(){var oe=ae.value;switch(ie.call(q,oe),oe.type){case"table":{for(var fe=A(oe.header),pe;!(pe=fe()).done;){var me=pe.value;q.walkTokens(me.tokens,ie)}for(var be=A(oe.rows),Ce;!(Ce=be()).done;)for(var ve=Ce.value,he=A(ve),ge;!(ge=he()).done;){var de=ge.value;q.walkTokens(de.tokens,ie)}break}case"list":{q.walkTokens(oe.items,ie);break}default:q.defaults.extensions&&q.defaults.extensions.childTokens&&q.defaults.extensions.childTokens[oe.type]?q.defaults.extensions.childTokens[oe.type].forEach(function(Se){q.walkTokens(oe[Se],ie)}):oe.tokens&&q.walkTokens(oe.tokens,ie)}},le=A(se),ae;!(ae=le()).done;)ce()},q.parseInline=function(se,ie){if(typeof se=="undefined"||se===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof se!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(se)+", string expected");ie=E({},q.defaults,ie||{}),O(ie);try{var ce=z.lexInline(se,ie);return ie.walkTokens&&q.walkTokens(ce,ie.walkTokens),G.parseInline(ce,ie)}catch(le){if(le.message+=` Please report this to https://github.com/markedjs/marked.`,ie.silent)return"<p>An error occurred:</p><pre>"+i(le.message+"",!0)+"</pre>";throw le}},q.Parser=G,q.parser=G.parse,q.Renderer=U,q.TextRenderer=H,q.Lexer=z,q.lexer=z.lex,q.Tokenizer=M,q.Slugger=K,q.parse=q;var Z=q.options,j=q.setOptions,X=q.use,Y=q.walkTokens,$=q.parseInline,J=q,ee=G.parse,te=z.lex;Q.Lexer=z,Q.Parser=G,Q.Renderer=U,Q.Slugger=K,Q.TextRenderer=H,Q.Tokenizer=M,Q.getDefaults=k,Q.lexer=te,Q.marked=q,Q.options=Z,Q.parse=J,Q.parseInline=$,Q.parser=ee,Q.setOptions=j,Q.use=X,Q.walkTokens=Y,Object.defineProperty(Q,"__esModule",{value:!0})}),define(ne[956],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ArrayNavigator=void 0;class t{constructor(_,A=0,k=_.length,D=A-1){this.items=_,this.start=A,this.end=k,this.index=D}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}e.ArrayNavigator=t}),define(ne[379],re([1,0,956]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HistoryNavigator2=e.HistoryNavigator=void 0;class f{constructor(k=[],D=10){this._initialize(k),this._limit=D,this._onChange()}getHistory(){return this._elements}add(k){this._history.delete(k),this._history.add(k),this._onChange()}next(){return this._currentPosition()!==this._elements.length-1?this._navigator.next():null}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}has(k){return this._history.has(k)}clear(){this._initialize([]),this._onChange()}_onChange(){this._reduceToLimit();const k=this._elements;this._navigator=new t.ArrayNavigator(k,0,k.length,k.length)}_reduceToLimit(){const k=this._elements;k.length>this._limit&&this._initialize(k.slice(k.length-this._limit))}_currentPosition(){const k=this._navigator.current();return k?this._elements.indexOf(k):-1}_initialize(k){this._history=new Set;for(const D of k)this._history.add(D)}get _elements(){const k=[];return this._history.forEach(D=>k.push(D)),k}}e.HistoryNavigator=f;class _{constructor(k,D=10){if(this.capacity=D,k.length<1)throw new Error("not supported");this.size=1,this.head=this.tail=this.cursor={value:k[0],previous:void 0,next:void 0};for(let I=1;I<k.length;I++)this.add(k[I])}add(k){const D={value:k,previous:this.tail,next:void 0};for(this.tail.next=D,this.tail=D,this.cursor=this.tail,this.size++;this.size>this.capacity;)this.head=this.head.next,this.head.previous=void 0,this.size--}replaceLast(k){const D=this.tail.value;return this.tail.value=k,D}isAtEnd(){return this.cursor===this.tail}current(){return this.cursor.value}previous(){return this.cursor.previous&&(this.cursor=this.cursor.previous),this.cursor.value}next(){return this.cursor.next&&(this.cursor=this.cursor.next),this.cursor.value}has(k){let D=this.head;for(;D;){if(D.value===k)return!0;D=D.next}return!1}resetCursor(){return this.cursor=this.tail,this.cursor.value}*[Symbol.iterator](){let k=this.head;for(;k;)yield k.value,k=k.next}}e.HistoryNavigator2=_}),define(ne[195],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SlidingWindowAverage=e.MovingAverage=e.Counter=e.rot=e.clamp=void 0;function t(D,I,w){return Math.min(Math.max(D,I),w)}e.clamp=t;function f(D,I){return(I+D%I)%I}e.rot=f;class _{constructor(){this._next=0}getNext(){return this._next++}}e.Counter=_;class A{constructor(){this._n=1,this._val=0}update(I){return this._val=this._val+(I-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}e.MovingAverage=A;class k{constructor(I){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(I),this._values.fill(0,0,I)}update(I){const w=this._values[this._index];return this._values[this._index]=I,this._index=(this._index+1)%this._values.length,this._sum-=w,this._sum+=I,this._n<this._values.length&&(this._n+=1),this._val=this._sum/this._n,this._val}get value(){return this._val}}e.SlidingWindowAverage=k}),define(ne[645],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Parser=e.ValidationStatus=e.ValidationState=void 0;var t;(function(A){A[A.OK=0]="OK",A[A.Info=1]="Info",A[A.Warning=2]="Warning",A[A.Error=3]="Error",A[A.Fatal=4]="Fatal"})(t=e.ValidationState||(e.ValidationState={}));class f{constructor(){this._state=0}get state(){return this._state}set state(k){k>this._state&&(this._state=k)}isOK(){return this._state===0}isFatal(){return this._state===4}}e.ValidationStatus=f;class _{constructor(k){this._problemReporter=k}reset(){this._problemReporter.status.state=0}get problemReporter(){return this._problemReporter}info(k){this._problemReporter.info(k)}warn(k){this._problemReporter.warn(k)}error(k){this._problemReporter.error(k)}fatal(k){this._problemReporter.fatal(k)}}e.Parser=_}),function(){function Q(_){const A=[];typeof _=="number"&&A.push("code/timeOrigin",_);function k(I){A.push(I,Date.now())}function D(){const I=[];for(let w=0;w<A.length;w+=2)I.push({name:A[w],startTime:A[w+1]});return I}return{mark:k,getMarks:D}}function e(){if(typeof performance=="object"&&typeof performance.mark=="function"&&!performance.nodeTiming)return typeof performance.timeOrigin!="number"&&!performance.timing?Q():{mark(_){performance.mark(_)},getMarks(){let _=performance.timeOrigin;typeof _!="number"&&(_=performance.timing.navigationStart||performance.timing.redirectStart||performance.timing.fetchStart);const A=[{name:"code/timeOrigin",startTime:Math.round(_)}];for(const k of performance.getEntriesByType("mark"))A.push({name:k.name,startTime:Math.round(_+k.startTime)});return A}};if(typeof process=="object"){const _=Math.round((require.nodeRequire||require)("perf_hooks").performance.timeOrigin);return Q(_)}else return console.trace("perf-util loaded in UNKNOWN environment"),Q()}function t(_){return _.MonacoPerformanceMarks||(_.MonacoPerformanceMarks=e()),_.MonacoPerformanceMarks}var f;typeof global=="object"?f=global:typeof self=="object"?f=self:f={},typeof define=="function"?define("vs/base/common/performance",[],function(){return t(f)}):typeof module=="object"&&typeof module.exports=="object"?module.exports=t(f):(console.trace("perf-util defined in UNKNOWN context (neither requirejs or commonjs)"),f.perf=t(f))}(),define(ne[14],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isAndroid=e.isEdge=e.isSafari=e.isFirefox=e.isChrome=e.isLittleEndian=e.OS=e.OperatingSystem=e.setTimeout0=e.translationsConfigFile=e.locale=e.Language=e.language=e.userAgent=e.platform=e.isCI=e.isIOS=e.isWebWorker=e.isWeb=e.isElectron=e.isNative=e.isLinuxSnap=e.isLinux=e.isMacintosh=e.isWindows=e.PlatformToString=e.Platform=e.isElectronSandboxed=e.globals=void 0;const t="en";let f=!1,_=!1,A=!1,k=!1,D=!1,I=!1,w=!1,v=!1,C=!1,o,c=t,i,S;e.globals=typeof self=="object"?self:typeof global=="object"?global:{};let s;typeof e.globals.vscode!="undefined"&&typeof e.globals.vscode.process!="undefined"?s=e.globals.vscode.process:typeof process!="undefined"&&(s=process);const l=typeof s?.versions?.electron=="string",r=l&&s?.type==="renderer";if(e.isElectronSandboxed=r&&s?.sandboxed,typeof navigator=="object"&&!r)S=navigator.userAgent,f=S.indexOf("Windows")>=0,_=S.indexOf("Macintosh")>=0,v=(S.indexOf("Macintosh")>=0||S.indexOf("iPad")>=0||S.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,A=S.indexOf("Linux")>=0,I=!0,o=navigator.language,c=o;else if(typeof s=="object"){f=s.platform==="win32",_=s.platform==="darwin",A=s.platform==="linux",k=A&&!!s.env.SNAP&&!!s.env.SNAP_REVISION,w=l,C=!!s.env.CI||!!s.env.BUILD_ARTIFACTSTAGINGDIRECTORY,o=t,c=t;const b=s.env.VSCODE_NLS_CONFIG;if(b)try{const E=JSON.parse(b),y=E.availableLanguages["*"];o=E.locale,c=y||t,i=E._translationsConfigFile}catch{}D=!0}else console.error("Unable to resolve platform.");var p;(function(b){b[b.Web=0]="Web",b[b.Mac=1]="Mac",b[b.Linux=2]="Linux",b[b.Windows=3]="Windows"})(p=e.Platform||(e.Platform={}));function u(b){switch(b){case 0:return"Web";case 1:return"Mac";case 2:return"Linux";case 3:return"Windows"}}e.PlatformToString=u;let a=0;_?a=1:f?a=3:A&&(a=2),e.isWindows=f,e.isMacintosh=_,e.isLinux=A,e.isLinuxSnap=k,e.isNative=D,e.isElectron=w,e.isWeb=I,e.isWebWorker=I&&typeof e.globals.importScripts=="function",e.isIOS=v,e.isCI=C,e.platform=a,e.userAgent=S,e.language=c;var n;(function(b){function E(){return e.language}b.value=E;function y(){return e.language.length===2?e.language==="en":e.language.length>=3?e.language[0]==="e"&&e.language[1]==="n"&&e.language[2]==="-":!1}b.isDefaultVariant=y;function T(){return e.language==="en"}b.isDefault=T})(n=e.Language||(e.Language={})),e.locale=o,e.translationsConfigFile=i,e.setTimeout0=(()=>{if(typeof e.globals.postMessage=="function"&&!e.globals.importScripts){let b=[];e.globals.addEventListener("message",y=>{if(y.data&&y.data.vscodeScheduleAsyncWork)for(let T=0,R=b.length;T<R;T++){const O=b[T];if(O.id===y.data.vscodeScheduleAsyncWork){b.splice(T,1),O.callback();return}}});let E=0;return y=>{const T=++E;b.push({id:T,callback:y}),e.globals.postMessage({vscodeScheduleAsyncWork:T},"*")}}return b=>setTimeout(b)})();var h;(function(b){b[b.Windows=1]="Windows",b[b.Macintosh=2]="Macintosh",b[b.Linux=3]="Linux"})(h=e.OperatingSystem||(e.OperatingSystem={})),e.OS=_||v?2:f?1:3;let g=!0,d=!1;function m(){if(!d){d=!0;const b=new Uint8Array(2);b[0]=1,b[1]=2,g=new Uint16Array(b.buffer)[0]===(2<<8)+1}return g}e.isLittleEndian=m,e.isChrome=!!(e.userAgent&&e.userAgent.indexOf("Chrome")>=0),e.isFirefox=!!(e.userAgent&&e.userAgent.indexOf("Firefox")>=0),e.isSafari=!!(!e.isChrome&&e.userAgent&&e.userAgent.indexOf("Safari")>=0),e.isEdge=!!(e.userAgent&&e.userAgent.indexOf("Edg/")>=0),e.isAndroid=!!(e.userAgent&&e.userAgent.indexOf("Android")>=0)}),define(ne[646],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.randomPort=void 0;function t(){const f=1025;return f+Math.floor((65535-f)*Math.random())}e.randomPort=t}),define(ne[196],re([1,0,14]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.arch=e.platform=e.env=e.cwd=void 0;let f;if(typeof t.globals.vscode!="undefined"&&typeof t.globals.vscode.process!="undefined"){const _=t.globals.vscode.process;f={get platform(){return _.platform},get arch(){return _.arch},get env(){return _.env},cwd(){return _.cwd()}}}else typeof process!="undefined"?f={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:f={get platform(){return t.isWindows?"win32":t.isMacintosh?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};e.cwd=f.cwd,e.env=f.env,e.platform=f.platform,e.arch=f.arch}),define(ne[48],re([1,0,196]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.delimiter=e.sep=e.toNamespacedPath=e.parse=e.format=e.extname=e.basename=e.dirname=e.relative=e.resolve=e.join=e.isAbsolute=e.normalize=e.posix=e.win32=void 0;const f=65,_=97,A=90,k=122,D=46,I=47,w=92,v=58,C=63;class o extends Error{constructor(u,a,n){let h;typeof a=="string"&&a.indexOf("not ")===0?(h="must not be",a=a.replace(/^not /,"")):h="must be";const g=u.indexOf(".")!==-1?"property":"argument";let d=`The "${u}" ${g} ${h} of type ${a}`;d+=`. Received type ${typeof n}`;super(d);this.code="ERR_INVALID_ARG_TYPE"}}function c(p,u){if(typeof p!="string")throw new o(u,"string",p)}function i(p){return p===I||p===w}function S(p){return p===I}function s(p){return p>=f&&p<=A||p>=_&&p<=k}function l(p,u,a,n){let h="",g=0,d=-1,m=0,b=0;for(let E=0;E<=p.length;++E){if(E<p.length)b=p.charCodeAt(E);else{if(n(b))break;b=I}if(n(b)){if(!(d===E-1||m===1))if(m===2){if(h.length<2||g!==2||h.charCodeAt(h.length-1)!==D||h.charCodeAt(h.length-2)!==D){if(h.length>2){const y=h.lastIndexOf(a);y===-1?(h="",g=0):(h=h.slice(0,y),g=h.length-1-h.lastIndexOf(a)),d=E,m=0;continue}else if(h.length!==0){h="",g=0,d=E,m=0;continue}}u&&(h+=h.length>0?`${a}..`:"..",g=2)}else h.length>0?h+=`${a}${p.slice(d+1,E)}`:h=p.slice(d+1,E),g=E-d-1;d=E,m=0}else b===D&&m!==-1?++m:m=-1}return h}function r(p,u){if(u===null||typeof u!="object")throw new o("pathObject","Object",u);const a=u.dir||u.root,n=u.base||`${u.name||""}${u.ext||""}`;return a?a===u.root?`${a}${n}`:`${a}${p}${n}`:n}e.win32={resolve(...p){let u="",a="",n=!1;for(let h=p.length-1;h>=-1;h--){let g;if(h>=0){if(g=p[h],c(g,"path"),g.length===0)continue}else u.length===0?g=t.cwd():(g=t.env[`=${u}`]||t.cwd(),(g===void 0||g.slice(0,2).toLowerCase()!==u.toLowerCase()&&g.charCodeAt(2)===w)&&(g=`${u}\\`));const d=g.length;let m=0,b="",E=!1;const y=g.charCodeAt(0);if(d===1)i(y)&&(m=1,E=!0);else if(i(y))if(E=!0,i(g.charCodeAt(1))){let T=2,R=T;for(;T<d&&!i(g.charCodeAt(T));)T++;if(T<d&&T!==R){const O=g.slice(R,T);for(R=T;T<d&&i(g.charCodeAt(T));)T++;if(T<d&&T!==R){for(R=T;T<d&&!i(g.charCodeAt(T));)T++;(T===d||T!==R)&&(b=`\\\\${O}\\${g.slice(R,T)}`,m=T)}}}else m=1;else s(y)&&g.charCodeAt(1)===v&&(b=g.slice(0,2),m=2,d>2&&i(g.charCodeAt(2))&&(E=!0,m=3));if(b.length>0)if(u.length>0){if(b.toLowerCase()!==u.toLowerCase())continue}else u=b;if(n){if(u.length>0)break}else if(a=`${g.slice(m)}\\${a}`,n=E,E&&u.length>0)break}return a=l(a,!n,"\\",i),n?`${u}\\${a}`:`${u}${a}`||"."},normalize(p){c(p,"path");const u=p.length;if(u===0)return".";let a=0,n,h=!1;const g=p.charCodeAt(0);if(u===1)return S(g)?"\\":p;if(i(g))if(h=!0,i(p.charCodeAt(1))){let m=2,b=m;for(;m<u&&!i(p.charCodeAt(m));)m++;if(m<u&&m!==b){const E=p.slice(b,m);for(b=m;m<u&&i(p.charCodeAt(m));)m++;if(m<u&&m!==b){for(b=m;m<u&&!i(p.charCodeAt(m));)m++;if(m===u)return`\\\\${E}\\${p.slice(b)}\\`;m!==b&&(n=`\\\\${E}\\${p.slice(b,m)}`,a=m)}}}else a=1;else s(g)&&p.charCodeAt(1)===v&&(n=p.slice(0,2),a=2,u>2&&i(p.charCodeAt(2))&&(h=!0,a=3));let d=a<u?l(p.slice(a),!h,"\\",i):"";return d.length===0&&!h&&(d="."),d.length>0&&i(p.charCodeAt(u-1))&&(d+="\\"),n===void 0?h?`\\${d}`:d:h?`${n}\\${d}`:`${n}${d}`},isAbsolute(p){c(p,"path");const u=p.length;if(u===0)return!1;const a=p.charCodeAt(0);return i(a)||u>2&&s(a)&&p.charCodeAt(1)===v&&i(p.charCodeAt(2))},join(...p){if(p.length===0)return".";let u,a;for(let g=0;g<p.length;++g){const d=p[g];c(d,"path"),d.length>0&&(u===void 0?u=a=d:u+=`\\${d}`)}if(u===void 0)return".";let n=!0,h=0;if(typeof a=="string"&&i(a.charCodeAt(0))){++h;const g=a.length;g>1&&i(a.charCodeAt(1))&&(++h,g>2&&(i(a.charCodeAt(2))?++h:n=!1))}if(n){for(;h<u.length&&i(u.charCodeAt(h));)h++;h>=2&&(u=`\\${u.slice(h)}`)}return e.win32.normalize(u)},relative(p,u){if(c(p,"from"),c(u,"to"),p===u)return"";const a=e.win32.resolve(p),n=e.win32.resolve(u);if(a===n||(p=a.toLowerCase(),u=n.toLowerCase(),p===u))return"";let h=0;for(;h<p.length&&p.charCodeAt(h)===w;)h++;let g=p.length;for(;g-1>h&&p.charCodeAt(g-1)===w;)g--;const d=g-h;let m=0;for(;m<u.length&&u.charCodeAt(m)===w;)m++;let b=u.length;for(;b-1>m&&u.charCodeAt(b-1)===w;)b--;const E=b-m,y=d<E?d:E;let T=-1,R=0;for(;R<y;R++){const x=p.charCodeAt(h+R);if(x!==u.charCodeAt(m+R))break;x===w&&(T=R)}if(R!==y){if(T===-1)return n}else{if(E>y){if(u.charCodeAt(m+R)===w)return n.slice(m+R+1);if(R===2)return n.slice(m+R)}d>y&&(p.charCodeAt(h+R)===w?T=R:R===2&&(T=3)),T===-1&&(T=0)}let O="";for(R=h+T+1;R<=g;++R)(R===g||p.charCodeAt(R)===w)&&(O+=O.length===0?"..":"\\..");return m+=T,O.length>0?`${O}${n.slice(m,b)}`:(n.charCodeAt(m)===w&&++m,n.slice(m,b))},toNamespacedPath(p){if(typeof p!="string")return p;if(p.length===0)return"";const u=e.win32.resolve(p);if(u.length<=2)return p;if(u.charCodeAt(0)===w){if(u.charCodeAt(1)===w){const a=u.charCodeAt(2);if(a!==C&&a!==D)return`\\\\?\\UNC\\${u.slice(2)}`}}else if(s(u.charCodeAt(0))&&u.charCodeAt(1)===v&&u.charCodeAt(2)===w)return`\\\\?\\${u}`;return p},dirname(p){c(p,"path");const u=p.length;if(u===0)return".";let a=-1,n=0;const h=p.charCodeAt(0);if(u===1)return i(h)?p:".";if(i(h)){if(a=n=1,i(p.charCodeAt(1))){let m=2,b=m;for(;m<u&&!i(p.charCodeAt(m));)m++;if(m<u&&m!==b){for(b=m;m<u&&i(p.charCodeAt(m));)m++;if(m<u&&m!==b){for(b=m;m<u&&!i(p.charCodeAt(m));)m++;if(m===u)return p;m!==b&&(a=n=m+1)}}}}else s(h)&&p.charCodeAt(1)===v&&(a=u>2&&i(p.charCodeAt(2))?3:2,n=a);let g=-1,d=!0;for(let m=u-1;m>=n;--m)if(i(p.charCodeAt(m))){if(!d){g=m;break}}else d=!1;if(g===-1){if(a===-1)return".";g=a}return p.slice(0,g)},basename(p,u){u!==void 0&&c(u,"ext"),c(p,"path");let a=0,n=-1,h=!0,g;if(p.length>=2&&s(p.charCodeAt(0))&&p.charCodeAt(1)===v&&(a=2),u!==void 0&&u.length>0&&u.length<=p.length){if(u===p)return"";let d=u.length-1,m=-1;for(g=p.length-1;g>=a;--g){const b=p.charCodeAt(g);if(i(b)){if(!h){a=g+1;break}}else m===-1&&(h=!1,m=g+1),d>=0&&(b===u.charCodeAt(d)?--d==-1&&(n=g):(d=-1,n=m))}return a===n?n=m:n===-1&&(n=p.length),p.slice(a,n)}for(g=p.length-1;g>=a;--g)if(i(p.charCodeAt(g))){if(!h){a=g+1;break}}else n===-1&&(h=!1,n=g+1);return n===-1?"":p.slice(a,n)},extname(p){c(p,"path");let u=0,a=-1,n=0,h=-1,g=!0,d=0;p.length>=2&&p.charCodeAt(1)===v&&s(p.charCodeAt(0))&&(u=n=2);for(let m=p.length-1;m>=u;--m){const b=p.charCodeAt(m);if(i(b)){if(!g){n=m+1;break}continue}h===-1&&(g=!1,h=m+1),b===D?a===-1?a=m:d!==1&&(d=1):a!==-1&&(d=-1)}return a===-1||h===-1||d===0||d===1&&a===h-1&&a===n+1?"":p.slice(a,h)},format:r.bind(null,"\\"),parse(p){c(p,"path");const u={root:"",dir:"",base:"",ext:"",name:""};if(p.length===0)return u;const a=p.length;let n=0,h=p.charCodeAt(0);if(a===1)return i(h)?(u.root=u.dir=p,u):(u.base=u.name=p,u);if(i(h)){if(n=1,i(p.charCodeAt(1))){let T=2,R=T;for(;T<a&&!i(p.charCodeAt(T));)T++;if(T<a&&T!==R){for(R=T;T<a&&i(p.charCodeAt(T));)T++;if(T<a&&T!==R){for(R=T;T<a&&!i(p.charCodeAt(T));)T++;T===a?n=T:T!==R&&(n=T+1)}}}}else if(s(h)&&p.charCodeAt(1)===v){if(a<=2)return u.root=u.dir=p,u;if(n=2,i(p.charCodeAt(2))){if(a===3)return u.root=u.dir=p,u;n=3}}n>0&&(u.root=p.slice(0,n));let g=-1,d=n,m=-1,b=!0,E=p.length-1,y=0;for(;E>=n;--E){if(h=p.charCodeAt(E),i(h)){if(!b){d=E+1;break}continue}m===-1&&(b=!1,m=E+1),h===D?g===-1?g=E:y!==1&&(y=1):g!==-1&&(y=-1)}return m!==-1&&(g===-1||y===0||y===1&&g===m-1&&g===d+1?u.base=u.name=p.slice(d,m):(u.name=p.slice(d,g),u.base=p.slice(d,m),u.ext=p.slice(g,m))),d>0&&d!==n?u.dir=p.slice(0,d-1):u.dir=u.root,u},sep:"\\",delimiter:";",win32:null,posix:null},e.posix={resolve(...p){let u="",a=!1;for(let n=p.length-1;n>=-1&&!a;n--){const h=n>=0?p[n]:t.cwd();c(h,"path"),h.length!==0&&(u=`${h}/${u}`,a=h.charCodeAt(0)===I)}return u=l(u,!a,"/",S),a?`/${u}`:u.length>0?u:"."},normalize(p){if(c(p,"path"),p.length===0)return".";const u=p.charCodeAt(0)===I,a=p.charCodeAt(p.length-1)===I;return p=l(p,!u,"/",S),p.length===0?u?"/":a?"./":".":(a&&(p+="/"),u?`/${p}`:p)},isAbsolute(p){return c(p,"path"),p.length>0&&p.charCodeAt(0)===I},join(...p){if(p.length===0)return".";let u;for(let a=0;a<p.length;++a){const n=p[a];c(n,"path"),n.length>0&&(u===void 0?u=n:u+=`/${n}`)}return u===void 0?".":e.posix.normalize(u)},relative(p,u){if(c(p,"from"),c(u,"to"),p===u||(p=e.posix.resolve(p),u=e.posix.resolve(u),p===u))return"";const a=1,n=p.length,h=n-a,g=1,d=u.length-g,m=h<d?h:d;let b=-1,E=0;for(;E<m;E++){const T=p.charCodeAt(a+E);if(T!==u.charCodeAt(g+E))break;T===I&&(b=E)}if(E===m)if(d>m){if(u.charCodeAt(g+E)===I)return u.slice(g+E+1);if(E===0)return u.slice(g+E)}else h>m&&(p.charCodeAt(a+E)===I?b=E:E===0&&(b=0));let y="";for(E=a+b+1;E<=n;++E)(E===n||p.charCodeAt(E)===I)&&(y+=y.length===0?"..":"/..");return`${y}${u.slice(g+b)}`},toNamespacedPath(p){return p},dirname(p){if(c(p,"path"),p.length===0)return".";const u=p.charCodeAt(0)===I;let a=-1,n=!0;for(let h=p.length-1;h>=1;--h)if(p.charCodeAt(h)===I){if(!n){a=h;break}}else n=!1;return a===-1?u?"/":".":u&&a===1?"//":p.slice(0,a)},basename(p,u){u!==void 0&&c(u,"ext"),c(p,"path");let a=0,n=-1,h=!0,g;if(u!==void 0&&u.length>0&&u.length<=p.length){if(u===p)return"";let d=u.length-1,m=-1;for(g=p.length-1;g>=0;--g){const b=p.charCodeAt(g);if(b===I){if(!h){a=g+1;break}}else m===-1&&(h=!1,m=g+1),d>=0&&(b===u.charCodeAt(d)?--d==-1&&(n=g):(d=-1,n=m))}return a===n?n=m:n===-1&&(n=p.length),p.slice(a,n)}for(g=p.length-1;g>=0;--g)if(p.charCodeAt(g)===I){if(!h){a=g+1;break}}else n===-1&&(h=!1,n=g+1);return n===-1?"":p.slice(a,n)},extname(p){c(p,"path");let u=-1,a=0,n=-1,h=!0,g=0;for(let d=p.length-1;d>=0;--d){const m=p.charCodeAt(d);if(m===I){if(!h){a=d+1;break}continue}n===-1&&(h=!1,n=d+1),m===D?u===-1?u=d:g!==1&&(g=1):u!==-1&&(g=-1)}return u===-1||n===-1||g===0||g===1&&u===n-1&&u===a+1?"":p.slice(u,n)},format:r.bind(null,"/"),parse(p){c(p,"path");const u={root:"",dir:"",base:"",ext:"",name:""};if(p.length===0)return u;const a=p.charCodeAt(0)===I;let n;a?(u.root="/",n=1):n=0;let h=-1,g=0,d=-1,m=!0,b=p.length-1,E=0;for(;b>=n;--b){const y=p.charCodeAt(b);if(y===I){if(!m){g=b+1;break}continue}d===-1&&(m=!1,d=b+1),y===D?h===-1?h=b:E!==1&&(E=1):h!==-1&&(E=-1)}if(d!==-1){const y=g===0&&a?1:g;h===-1||E===0||E===1&&h===d-1&&h===g+1?u.base=u.name=p.slice(y,d):(u.name=p.slice(y,h),u.base=p.slice(y,d),u.ext=p.slice(h,d))}return g>0?u.dir=p.slice(0,g-1):a&&(u.dir="/"),u},sep:"/",delimiter:":",win32:null,posix:null},e.posix.win32=e.win32.win32=e.win32,e.posix.posix=e.win32.posix=e.posix,e.normalize=t.platform==="win32"?e.win32.normalize:e.posix.normalize,e.isAbsolute=t.platform==="win32"?e.win32.isAbsolute:e.posix.isAbsolute,e.join=t.platform==="win32"?e.win32.join:e.posix.join,e.resolve=t.platform==="win32"?e.win32.resolve:e.posix.resolve,e.relative=t.platform==="win32"?e.win32.relative:e.posix.relative,e.dirname=t.platform==="win32"?e.win32.dirname:e.posix.dirname,e.basename=t.platform==="win32"?e.win32.basename:e.posix.basename,e.extname=t.platform==="win32"?e.win32.extname:e.posix.extname,e.format=t.platform==="win32"?e.win32.format:e.posix.format,e.parse=t.platform==="win32"?e.win32.parse:e.posix.parse,e.toNamespacedPath=t.platform==="win32"?e.win32.toNamespacedPath:e.posix.toNamespacedPath,e.sep=t.platform==="win32"?e.win32.sep:e.posix.sep,e.delimiter=t.platform==="win32"?e.win32.delimiter:e.posix.delimiter}),define(ne[169],re([1,0,48]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeMimeType=e.getExtensionForMimeType=e.getMediaMime=e.getMediaOrTextMime=e.Mimes=void 0;var f;(function(C){C.text="text/plain",C.binary="application/octet-stream",C.unknown="application/unknown",C.markdown="text/markdown",C.latex="text/latex",C.uriList="text/uri-list"})(f=e.Mimes||(e.Mimes={}));const _={".css":"text/css",".csv":"text/csv",".htm":"text/html",".html":"text/html",".ics":"text/calendar",".js":"text/javascript",".mjs":"text/javascript",".txt":"text/plain",".xml":"text/xml"},A={".aac":"audio/x-aac",".avi":"video/x-msvideo",".bmp":"image/bmp",".flv":"video/x-flv",".gif":"image/gif",".ico":"image/x-icon",".jpe":"image/jpg",".jpeg":"image/jpg",".jpg":"image/jpg",".m1v":"video/mpeg",".m2a":"audio/mpeg",".m2v":"video/mpeg",".m3a":"audio/mpeg",".mid":"audio/midi",".midi":"audio/midi",".mk3d":"video/x-matroska",".mks":"video/x-matroska",".mkv":"video/x-matroska",".mov":"video/quicktime",".movie":"video/x-sgi-movie",".mp2":"audio/mpeg",".mp2a":"audio/mpeg",".mp3":"audio/mpeg",".mp4":"video/mp4",".mp4a":"audio/mp4",".mp4v":"video/mp4",".mpe":"video/mpeg",".mpeg":"video/mpeg",".mpg":"video/mpeg",".mpg4":"video/mp4",".mpga":"audio/mpeg",".oga":"audio/ogg",".ogg":"audio/ogg",".opus":"audio/opus",".ogv":"video/ogg",".png":"image/png",".psd":"image/vnd.adobe.photoshop",".qt":"video/quicktime",".spx":"audio/ogg",".svg":"image/svg+xml",".tga":"image/x-tga",".tif":"image/tiff",".tiff":"image/tiff",".wav":"audio/x-wav",".webm":"video/webm",".webp":"image/webp",".wma":"audio/x-ms-wma",".wmv":"video/x-ms-wmv",".woff":"application/font-woff"};function k(C){const o=(0,t.extname)(C),c=_[o.toLowerCase()];return c!==void 0?c:D(C)}e.getMediaOrTextMime=k;function D(C){const o=(0,t.extname)(C);return A[o.toLowerCase()]}e.getMediaMime=D;function I(C){for(const o in A)if(A[o]===C)return o}e.getExtensionForMimeType=I;const w=/^(.+)\/(.+?)(;.+)?$/;function v(C,o){const c=w.exec(C);return c?`${c[1].toLowerCase()}/${c[2].toLowerCase()}${c[3]??""}`:o?void 0:C}e.normalizeMimeType=v}),define(ne[647],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeProcessEnvironment=e.TerminateResponseCode=e.Source=void 0;var t;(function(A){A[A.stdout=0]="stdout",A[A.stderr=1]="stderr"})(t=e.Source||(e.Source={}));var f;(function(A){A[A.Success=0]="Success",A[A.Unknown=1]="Unknown",A[A.AccessDenied=2]="AccessDenied",A[A.ProcessNotFound=3]="ProcessNotFound"})(f=e.TerminateResponseCode||(e.TerminateResponseCode={}));function _(A,...k){const D=k.reduce((v,C)=>(v[C]=!0,v),{}),I=[/^ELECTRON_.+$/,/^VSCODE_(?!SHELL_LOGIN).+$/,/^SNAP(|_.*)$/,/^GDK_PIXBUF_.+$/];Object.keys(A).filter(v=>!D[v]).forEach(v=>{for(let C=0;C<I.length;C++)if(v.search(I[C])!==-1){delete A[v];break}})}e.sanitizeProcessEnvironment=_}),define(ne[443],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Range=void 0;var t;(function(f){function _(I,w){if(I.start>=w.end||w.start>=I.end)return{start:0,end:0};const v=Math.max(I.start,w.start),C=Math.min(I.end,w.end);return C-v<=0?{start:0,end:0}:{start:v,end:C}}f.intersect=_;function A(I){return I.end-I.start<=0}f.isEmpty=A;function k(I,w){return!A(_(I,w))}f.intersects=k;function D(I,w){const v=[],C={start:I.start,end:Math.min(w.start,I.end)},o={start:Math.max(w.end,I.start),end:I.end};return A(C)||v.push(C),A(o)||v.push(o),v}f.relativeComplement=D})(t=e.Range||(e.Range={}))}),define(ne[957],re([1,0,443]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RangeMap=e.consolidate=e.shift=e.groupIntersect=void 0;function f(I,w){const v=[];for(let C of w){if(I.start>=C.range.end)continue;if(I.end<C.range.start)break;const o=t.Range.intersect(I,C.range);t.Range.isEmpty(o)||v.push({range:o,size:C.size})}return v}e.groupIntersect=f;function _({start:I,end:w},v){return{start:I+v,end:w+v}}e.shift=_;function A(I){const w=[];let v=null;for(let C of I){const o=C.range.start,c=C.range.end,i=C.size;if(v&&i===v.size){v.range.end=c;continue}v={range:{start:o,end:c},size:i},w.push(v)}return w}e.consolidate=A;function k(...I){return A(I.reduce((w,v)=>w.concat(v),[]))}class D{constructor(){this.groups=[],this._size=0}splice(w,v,C=[]){const o=C.length-v,c=f({start:0,end:w},this.groups),i=f({start:w+v,end:Number.POSITIVE_INFINITY},this.groups).map(s=>({range:_(s.range,o),size:s.size})),S=C.map((s,l)=>({range:{start:w+l,end:w+l+1},size:s.size}));this.groups=k(c,S,i),this._size=this.groups.reduce((s,l)=>s+l.size*(l.range.end-l.range.start),0)}get count(){const w=this.groups.length;return w?this.groups[w-1].range.end:0}get size(){return this._size}indexAt(w){if(w<0)return-1;let v=0,C=0;for(let o of this.groups){const c=o.range.end-o.range.start,i=C+c*o.size;if(w<i)return v+Math.floor((w-C)/o.size);v+=c,C=i}return v}indexAfter(w){return Math.min(this.indexAt(w)+1,this.count)}positionAt(w){if(w<0)return-1;let v=0,C=0;for(let o of this.groups){const c=o.range.end-o.range.start,i=C+c;if(w<i)return v+(w-C)*o.size;v+=c*o.size,C=i}return-1}}e.RangeMap=D}),function(Q,e){if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define("vs/base/common/semver/semver",[],e);else{var t=e();for(var f in t)(typeof exports=="object"?exports:Q)[f]=t[f]}}(typeof self!="undefined"?self:this,function(){return function(Q){var e={};function t(f){if(e[f])return e[f].exports;var _=e[f]={i:f,l:!1,exports:{}};return Q[f].call(_.exports,_,_.exports,t),_.l=!0,_.exports}return t.m=Q,t.c=e,t.d=function(f,_,A){t.o(f,_)||Object.defineProperty(f,_,{enumerable:!0,get:A})},t.r=function(f){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(f,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(f,"__esModule",{value:!0})},t.t=function(f,_){if(1&_&&(f=t(f)),8&_||4&_&&typeof f=="object"&&f&&f.__esModule)return f;var A=Object.create(null);if(t.r(A),Object.defineProperty(A,"default",{enumerable:!0,value:f}),2&_&&typeof f!="string")for(var k in f)t.d(A,k,function(D){return f[D]}.bind(null,k));return A},t.n=function(f){var _=f&&f.__esModule?function(){return f.default}:function(){return f};return t.d(_,"a",_),_},t.o=function(f,_){return Object.prototype.hasOwnProperty.call(f,_)},t.p="",t(t.s=0)}([function(Q,e,t){(function(f){var _;e=Q.exports=X,_=typeof f=="object"&&f.env&&f.env.NODE_DEBUG&&/\bsemver\b/i.test(f.env.NODE_DEBUG)?function(){var he=Array.prototype.slice.call(arguments,0);he.unshift("SEMVER"),console.log.apply(console,he)}:function(){},e.SEMVER_SPEC_VERSION="2.0.0";var A=256,k=Number.MAX_SAFE_INTEGER||9007199254740991,D=e.re=[],I=e.src=[],w=0,v=w++;I[v]="0|[1-9]\\d*";var C=w++;I[C]="[0-9]+";var o=w++;I[o]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var c=w++;I[c]="("+I[v]+")\\.("+I[v]+")\\.("+I[v]+")";var i=w++;I[i]="("+I[C]+")\\.("+I[C]+")\\.("+I[C]+")";var S=w++;I[S]="(?:"+I[v]+"|"+I[o]+")";var s=w++;I[s]="(?:"+I[C]+"|"+I[o]+")";var l=w++;I[l]="(?:-("+I[S]+"(?:\\."+I[S]+")*))";var r=w++;I[r]="(?:-?("+I[s]+"(?:\\."+I[s]+")*))";var p=w++;I[p]="[0-9A-Za-z-]+";var u=w++;I[u]="(?:\\+("+I[p]+"(?:\\."+I[p]+")*))";var a=w++,n="v?"+I[c]+I[l]+"?"+I[u]+"?";I[a]="^"+n+"$";var h="[v=\\s]*"+I[i]+I[r]+"?"+I[u]+"?",g=w++;I[g]="^"+h+"$";var d=w++;I[d]="((?:<|>)?=?)";var m=w++;I[m]=I[C]+"|x|X|\\*";var b=w++;I[b]=I[v]+"|x|X|\\*";var E=w++;I[E]="[v=\\s]*("+I[b]+")(?:\\.("+I[b]+")(?:\\.("+I[b]+")(?:"+I[l]+")?"+I[u]+"?)?)?";var y=w++;I[y]="[v=\\s]*("+I[m]+")(?:\\.("+I[m]+")(?:\\.("+I[m]+")(?:"+I[r]+")?"+I[u]+"?)?)?";var T=w++;I[T]="^"+I[d]+"\\s*"+I[E]+"$";var R=w++;I[R]="^"+I[d]+"\\s*"+I[y]+"$";var O=w++;I[O]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var x=w++;I[x]="(?:~>?)";var F=w++;I[F]="(\\s*)"+I[x]+"\\s+",D[F]=new RegExp(I[F],"g");var L=w++;I[L]="^"+I[x]+I[E]+"$";var M=w++;I[M]="^"+I[x]+I[y]+"$";var N=w++;I[N]="(?:\\^)";var B=w++;I[B]="(\\s*)"+I[N]+"\\s+",D[B]=new RegExp(I[B],"g");var P=w++;I[P]="^"+I[N]+I[E]+"$";var V=w++;I[V]="^"+I[N]+I[y]+"$";var z=w++;I[z]="^"+I[d]+"\\s*("+h+")$|^$";var U=w++;I[U]="^"+I[d]+"\\s*("+n+")$|^$";var H=w++;I[H]="(\\s*)"+I[d]+"\\s*("+h+"|"+I[E]+")",D[H]=new RegExp(I[H],"g");var K=w++;I[K]="^\\s*("+I[E]+")\\s+-\\s+("+I[E]+")\\s*$";var G=w++;I[G]="^\\s*("+I[y]+")\\s+-\\s+("+I[y]+")\\s*$";var q=w++;I[q]="(<|>)?=?\\s*\\*";for(var Z=0;Z<35;Z++)_(Z,I[Z]),D[Z]||(D[Z]=new RegExp(I[Z]));function j(he,ge){if(he instanceof X)return he;if(typeof he!="string"||he.length>A||!(ge?D[g]:D[a]).test(he))return null;try{return new X(he,ge)}catch{return null}}function X(he,ge){if(he instanceof X){if(he.loose===ge)return he;he=he.version}else if(typeof he!="string")throw new TypeError("Invalid Version: "+he);if(he.length>A)throw new TypeError("version is longer than "+A+" characters");if(!(this instanceof X))return new X(he,ge);_("SemVer",he,ge),this.loose=ge;var de=he.trim().match(ge?D[g]:D[a]);if(!de)throw new TypeError("Invalid Version: "+he);if(this.raw=he,this.major=+de[1],this.minor=+de[2],this.patch=+de[3],this.major>k||this.major<0)throw new TypeError("Invalid major version");if(this.minor>k||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>k||this.patch<0)throw new TypeError("Invalid patch version");de[4]?this.prerelease=de[4].split(".").map(function(Se){if(/^[0-9]+$/.test(Se)){var we=+Se;if(we>=0&&we<k)return we}return Se}):this.prerelease=[],this.build=de[5]?de[5].split("."):[],this.format()}e.parse=j,e.valid=function(he,ge){var de=j(he,ge);return de?de.version:null},e.clean=function(he,ge){var de=j(he.trim().replace(/^[=v]+/,""),ge);return de?de.version:null},e.SemVer=X,X.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},X.prototype.toString=function(){return this.version},X.prototype.compare=function(he){return _("SemVer.compare",this.version,this.loose,he),he instanceof X||(he=new X(he,this.loose)),this.compareMain(he)||this.comparePre(he)},X.prototype.compareMain=function(he){return he instanceof X||(he=new X(he,this.loose)),$(this.major,he.major)||$(this.minor,he.minor)||$(this.patch,he.patch)},X.prototype.comparePre=function(he){if(he instanceof X||(he=new X(he,this.loose)),this.prerelease.length&&!he.prerelease.length)return-1;if(!this.prerelease.length&&he.prerelease.length)return 1;if(!this.prerelease.length&&!he.prerelease.length)return 0;var ge=0;do{var de=this.prerelease[ge],Se=he.prerelease[ge];if(_("prerelease compare",ge,de,Se),de===void 0&&Se===void 0)return 0;if(Se===void 0)return 1;if(de===void 0)return-1;if(de!==Se)return $(de,Se)}while(++ge)},X.prototype.inc=function(he,ge){switch(he){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",ge);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",ge);break;case"prepatch":this.prerelease.length=0,this.inc("patch",ge),this.inc("pre",ge);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",ge),this.inc("pre",ge);break;case"major":this.minor===0&&this.patch===0&&this.prerelease.length!==0||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":this.patch===0&&this.prerelease.length!==0||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{for(var de=this.prerelease.length;--de>=0;)typeof this.prerelease[de]=="number"&&(this.prerelease[de]++,de=-2);de===-1&&this.prerelease.push(0)}ge&&(this.prerelease[0]===ge?isNaN(this.prerelease[1])&&(this.prerelease=[ge,0]):this.prerelease=[ge,0]);break;default:throw new Error("invalid increment argument: "+he)}return this.format(),this.raw=this.version,this},e.inc=function(he,ge,de,Se){typeof de=="string"&&(Se=de,de=void 0);try{return new X(he,de).inc(ge,Se).version}catch{return null}},e.diff=function(he,ge){if(se(he,ge))return null;var de=j(he),Se=j(ge);if(de.prerelease.length||Se.prerelease.length){for(var we in de)if((we==="major"||we==="minor"||we==="patch")&&de[we]!==Se[we])return"pre"+we;return"prerelease"}for(var we in de)if((we==="major"||we==="minor"||we==="patch")&&de[we]!==Se[we])return we},e.compareIdentifiers=$;var Y=/^[0-9]+$/;function $(he,ge){var de=Y.test(he),Se=Y.test(ge);return de&&Se&&(he=+he,ge=+ge),de&&!Se?-1:Se&&!de?1:he<ge?-1:he>ge?1:0}function J(he,ge,de){return new X(he,de).compare(new X(ge,de))}function ee(he,ge,de){return J(he,ge,de)>0}function te(he,ge,de){return J(he,ge,de)<0}function se(he,ge,de){return J(he,ge,de)===0}function ie(he,ge,de){return J(he,ge,de)!==0}function ce(he,ge,de){return J(he,ge,de)>=0}function le(he,ge,de){return J(he,ge,de)<=0}function ae(he,ge,de,Se){var we;switch(ge){case"===":typeof he=="object"&&(he=he.version),typeof de=="object"&&(de=de.version),we=he===de;break;case"!==":typeof he=="object"&&(he=he.version),typeof de=="object"&&(de=de.version),we=he!==de;break;case"":case"=":case"==":we=se(he,de,Se);break;case"!=":we=ie(he,de,Se);break;case">":we=ee(he,de,Se);break;case">=":we=ce(he,de,Se);break;case"<":we=te(he,de,Se);break;case"<=":we=le(he,de,Se);break;default:throw new TypeError("Invalid operator: "+ge)}return we}function ue(he,ge){if(he instanceof ue){if(he.loose===ge)return he;he=he.value}if(!(this instanceof ue))return new ue(he,ge);_("comparator",he,ge),this.loose=ge,this.parse(he),this.semver===oe?this.value="":this.value=this.operator+this.semver.version,_("comp",this)}e.rcompareIdentifiers=function(he,ge){return $(ge,he)},e.major=function(he,ge){return new X(he,ge).major},e.minor=function(he,ge){return new X(he,ge).minor},e.patch=function(he,ge){return new X(he,ge).patch},e.compare=J,e.compareLoose=function(he,ge){return J(he,ge,!0)},e.rcompare=function(he,ge,de){return J(ge,he,de)},e.sort=function(he,ge){return he.sort(function(de,Se){return e.compare(de,Se,ge)})},e.rsort=function(he,ge){return he.sort(function(de,Se){return e.rcompare(de,Se,ge)})},e.gt=ee,e.lt=te,e.eq=se,e.neq=ie,e.gte=ce,e.lte=le,e.cmp=ae,e.Comparator=ue;var oe={};function fe(he,ge){if(he instanceof fe)return he.loose===ge?he:new fe(he.raw,ge);if(he instanceof ue)return new fe(he.value,ge);if(!(this instanceof fe))return new fe(he,ge);if(this.loose=ge,this.raw=he,this.set=he.split(/\s*\|\|\s*/).map(function(de){return this.parseRange(de.trim())},this).filter(function(de){return de.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+he);this.format()}function pe(he){return!he||he.toLowerCase()==="x"||he==="*"}function me(he,ge,de,Se,we,ye,ke,Ie,Te,De,_e,Re,Ne){return((ge=pe(de)?"":pe(Se)?">="+de+".0.0":pe(we)?">="+de+"."+Se+".0":">="+ge)+" "+(Ie=pe(Te)?"":pe(De)?"<"+(+Te+1)+".0.0":pe(_e)?"<"+Te+"."+(+De+1)+".0":Re?"<="+Te+"."+De+"."+_e+"-"+Re:"<="+Ie)).trim()}function be(he,ge){for(var de=0;de<he.length;de++)if(!he[de].test(ge))return!1;if(ge.prerelease.length){for(de=0;de<he.length;de++)if(_(he[de].semver),he[de].semver!==oe&&he[de].semver.prerelease.length>0){var Se=he[de].semver;if(Se.major===ge.major&&Se.minor===ge.minor&&Se.patch===ge.patch)return!0}return!1}return!0}function Ce(he,ge,de){try{ge=new fe(ge,de)}catch{return!1}return ge.test(he)}function ve(he,ge,de,Se){var we,ye,ke,Ie,Te;switch(he=new X(he,Se),ge=new fe(ge,Se),de){case">":we=ee,ye=le,ke=te,Ie=">",Te=">=";break;case"<":we=te,ye=ce,ke=ee,Ie="<",Te="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Ce(he,ge,Se))return!1;for(var De=0;De<ge.set.length;++De){var _e=ge.set[De],Re=null,Ne=null;if(_e.forEach(function(xe){xe.semver===oe&&(xe=new ue(">=0.0.0")),Re=Re||xe,Ne=Ne||xe,we(xe.semver,Re.semver,Se)?Re=xe:ke(xe.semver,Ne.semver,Se)&&(Ne=xe)}),Re.operator===Ie||Re.operator===Te||(!Ne.operator||Ne.operator===Ie)&&ye(he,Ne.semver)||Ne.operator===Te&&ke(he,Ne.semver))return!1}return!0}ue.prototype.parse=function(he){var ge=this.loose?D[z]:D[U],de=he.match(ge);if(!de)throw new TypeError("Invalid comparator: "+he);this.operator=de[1],this.operator==="="&&(this.operator=""),de[2]?this.semver=new X(de[2],this.loose):this.semver=oe},ue.prototype.toString=function(){return this.value},ue.prototype.test=function(he){return _("Comparator.test",he,this.loose),this.semver===oe||(typeof he=="string"&&(he=new X(he,this.loose)),ae(he,this.operator,this.semver,this.loose))},ue.prototype.intersects=function(he,ge){if(!(he instanceof ue))throw new TypeError("a Comparator is required");var de;if(this.operator==="")return de=new fe(he.value,ge),Ce(this.value,de,ge);if(he.operator==="")return de=new fe(this.value,ge),Ce(he.semver,de,ge);var Se=!(this.operator!==">="&&this.operator!==">"||he.operator!==">="&&he.operator!==">"),we=!(this.operator!=="<="&&this.operator!=="<"||he.operator!=="<="&&he.operator!=="<"),ye=this.semver.version===he.semver.version,ke=!(this.operator!==">="&&this.operator!=="<="||he.operator!==">="&&he.operator!=="<="),Ie=ae(this.semver,"<",he.semver,ge)&&(this.operator===">="||this.operator===">")&&(he.operator==="<="||he.operator==="<"),Te=ae(this.semver,">",he.semver,ge)&&(this.operator==="<="||this.operator==="<")&&(he.operator===">="||he.operator===">");return Se||we||ye&&ke||Ie||Te},e.Range=fe,fe.prototype.format=function(){return this.range=this.set.map(function(he){return he.join(" ").trim()}).join("||").trim(),this.range},fe.prototype.toString=function(){return this.range},fe.prototype.parseRange=function(he){var ge=this.loose;he=he.trim(),_("range",he,ge);var de=ge?D[G]:D[K];he=he.replace(de,me),_("hyphen replace",he),he=he.replace(D[H],"$1$2$3"),_("comparator trim",he,D[H]),he=(he=(he=he.replace(D[F],"$1~")).replace(D[B],"$1^")).split(/\s+/).join(" ");var Se=ge?D[z]:D[U],we=he.split(" ").map(function(ye){return function(ke,Ie){return _("comp",ke),ke=function(Te,De){return Te.trim().split(/\s+/).map(function(_e){return function(Re,Ne){_("caret",Re,Ne);var xe=Ne?D[V]:D[P];return Re.replace(xe,function(Ae,Le,Me,We,Ve){var Ue;return _("caret",Re,Ae,Le,Me,We,Ve),pe(Le)?Ue="":pe(Me)?Ue=">="+Le+".0.0 <"+(+Le+1)+".0.0":pe(We)?Ue=Le==="0"?">="+Le+"."+Me+".0 <"+Le+"."+(+Me+1)+".0":">="+Le+"."+Me+".0 <"+(+Le+1)+".0.0":Ve?(_("replaceCaret pr",Ve),Ve.charAt(0)!=="-"&&(Ve="-"+Ve),Ue=Le==="0"?Me==="0"?">="+Le+"."+Me+"."+We+Ve+" <"+Le+"."+Me+"."+(+We+1):">="+Le+"."+Me+"."+We+Ve+" <"+Le+"."+(+Me+1)+".0":">="+Le+"."+Me+"."+We+Ve+" <"+(+Le+1)+".0.0"):(_("no pr"),Ue=Le==="0"?Me==="0"?">="+Le+"."+Me+"."+We+" <"+Le+"."+Me+"."+(+We+1):">="+Le+"."+Me+"."+We+" <"+Le+"."+(+Me+1)+".0":">="+Le+"."+Me+"."+We+" <"+(+Le+1)+".0.0"),_("caret return",Ue),Ue})}(_e,De)}).join(" ")}(ke,Ie),_("caret",ke),ke=function(Te,De){return Te.trim().split(/\s+/).map(function(_e){return function(Re,Ne){var xe=Ne?D[M]:D[L];return Re.replace(xe,function(Ae,Le,Me,We,Ve){var Ue;return _("tilde",Re,Ae,Le,Me,We,Ve),pe(Le)?Ue="":pe(Me)?Ue=">="+Le+".0.0 <"+(+Le+1)+".0.0":pe(We)?Ue=">="+Le+"."+Me+".0 <"+Le+"."+(+Me+1)+".0":Ve?(_("replaceTilde pr",Ve),Ve.charAt(0)!=="-"&&(Ve="-"+Ve),Ue=">="+Le+"."+Me+"."+We+Ve+" <"+Le+"."+(+Me+1)+".0"):Ue=">="+Le+"."+Me+"."+We+" <"+Le+"."+(+Me+1)+".0",_("tilde return",Ue),Ue})}(_e,De)}).join(" ")}(ke,Ie),_("tildes",ke),ke=function(Te,De){return _("replaceXRanges",Te,De),Te.split(/\s+/).map(function(_e){return function(Re,Ne){Re=Re.trim();var xe=Ne?D[R]:D[T];return Re.replace(xe,function(Ae,Le,Me,We,Ve,Ue){_("xRange",Re,Ae,Le,Me,We,Ve,Ue);var et=pe(Me),Ze=et||pe(We),Fe=Ze||pe(Ve);return Le==="="&&Fe&&(Le=""),et?Ae=Le===">"||Le==="<"?"<0.0.0":"*":Le&&Fe?(Ze&&(We=0),Fe&&(Ve=0),Le===">"?(Le=">=",Ze?(Me=+Me+1,We=0,Ve=0):Fe&&(We=+We+1,Ve=0)):Le==="<="&&(Le="<",Ze?Me=+Me+1:We=+We+1),Ae=Le+Me+"."+We+"."+Ve):Ze?Ae=">="+Me+".0.0 <"+(+Me+1)+".0.0":Fe&&(Ae=">="+Me+"."+We+".0 <"+Me+"."+(+We+1)+".0"),_("xRange return",Ae),Ae})}(_e,De)}).join(" ")}(ke,Ie),_("xrange",ke),ke=function(Te,De){return _("replaceStars",Te,De),Te.trim().replace(D[q],"")}(ke,Ie),_("stars",ke),ke}(ye,ge)}).join(" ").split(/\s+/);return this.loose&&(we=we.filter(function(ye){return!!ye.match(Se)})),we=we.map(function(ye){return new ue(ye,ge)})},fe.prototype.intersects=function(he,ge){if(!(he instanceof fe))throw new TypeError("a Range is required");return this.set.some(function(de){return de.every(function(Se){return he.set.some(function(we){return we.every(function(ye){return Se.intersects(ye,ge)})})})})},e.toComparators=function(he,ge){return new fe(he,ge).set.map(function(de){return de.map(function(Se){return Se.value}).join(" ").trim().split(" ")})},fe.prototype.test=function(he){if(!he)return!1;typeof he=="string"&&(he=new X(he,this.loose));for(var ge=0;ge<this.set.length;ge++)if(be(this.set[ge],he))return!0;return!1},e.satisfies=Ce,e.maxSatisfying=function(he,ge,de){var Se=null,we=null;try{var ye=new fe(ge,de)}catch{return null}return he.forEach(function(ke){ye.test(ke)&&(Se&&we.compare(ke)!==-1||(we=new X(Se=ke,de)))}),Se},e.minSatisfying=function(he,ge,de){var Se=null,we=null;try{var ye=new fe(ge,de)}catch{return null}return he.forEach(function(ke){ye.test(ke)&&(Se&&we.compare(ke)!==1||(we=new X(Se=ke,de)))}),Se},e.validRange=function(he,ge){try{return new fe(he,ge).range||"*"}catch{return null}},e.ltr=function(he,ge,de){return ve(he,ge,"<",de)},e.gtr=function(he,ge,de){return ve(he,ge,">",de)},e.outside=ve,e.prerelease=function(he,ge){var de=j(he,ge);return de&&de.prerelease.length?de.prerelease:null},e.intersects=function(he,ge,de){return he=new fe(he,de),ge=new fe(ge,de),he.intersects(ge)},e.coerce=function(he){if(he instanceof X)return he;if(typeof he!="string")return null;var ge=he.match(D[O]);return ge==null?null:j((ge[1]||"0")+"."+(ge[2]||"0")+"."+(ge[3]||"0"))}}).call(this,t(1))},function(Q,e){var t,f,_=Q.exports={};function A(){throw new Error("setTimeout has not been defined")}function k(){throw new Error("clearTimeout has not been defined")}function D(s){if(t===setTimeout)return setTimeout(s,0);if((t===A||!t)&&setTimeout)return t=setTimeout,setTimeout(s,0);try{return t(s,0)}catch{try{return t.call(null,s,0)}catch{return t.call(this,s,0)}}}(function(){try{t=typeof setTimeout=="function"?setTimeout:A}catch{t=A}try{f=typeof clearTimeout=="function"?clearTimeout:k}catch{f=k}})();var I,w=[],v=!1,C=-1;function o(){v&&I&&(v=!1,I.length?w=I.concat(w):C=-1,w.length&&c())}function c(){if(!v){var s=D(o);v=!0;for(var l=w.length;l;){for(I=w,w=[];++C<l;)I&&I[C].run();C=-1,l=w.length}I=null,v=!1,function(r){if(f===clearTimeout)return clearTimeout(r);if((f===k||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(r);try{f(r)}catch{try{return f.call(null,r)}catch{return f.call(this,r)}}}(s)}}function i(s,l){this.fun=s,this.array=l}function S(){}_.nextTick=function(s){var l=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)l[r-1]=arguments[r];w.push(new i(s,l)),w.length!==1||v||D(c)},i.prototype.run=function(){this.fun.apply(null,this.array)},_.title="browser",_.browser=!0,_.env={},_.argv=[],_.version="",_.versions={},_.on=S,_.addListener=S,_.once=S,_.off=S,_.removeListener=S,_.removeAllListeners=S,_.emit=S,_.prependListener=S,_.prependOnceListener=S,_.listeners=function(s){return[]},_.binding=function(s){throw new Error("process.binding is not supported")},_.cwd=function(){return"/"},_.chdir=function(s){throw new Error("process.chdir is not supported")},_.umask=function(){return 0}}])}),define(ne[958],re([1,0]),function(Q,e){"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.SkipList=void 0;class f{constructor(D,I,w){this.level=D,this.key=I,this.value=w,this.forward=[]}}const _=void 0;class A{constructor(D,I=2**16){this.comparator=D,this[t]="SkipList",this._level=0,this._size=0,this._maxLevel=Math.max(1,Math.log2(I)|0),this._header=new f(this._maxLevel,_,_)}get size(){return this._size}clear(){this._header=new f(this._maxLevel,_,_)}has(D){return Boolean(A._search(this,D,this.comparator))}get(D){return A._search(this,D,this.comparator)?.value}set(D,I){return A._insert(this,D,I,this.comparator)&&(this._size+=1),this}delete(D){const I=A._delete(this,D,this.comparator);return I&&(this._size-=1),I}forEach(D,I){let w=this._header.forward[0];for(;w;)D.call(I,w.value,w.key,this),w=w.forward[0]}[(t=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}*entries(){let D=this._header.forward[0];for(;D;)yield[D.key,D.value],D=D.forward[0]}*keys(){let D=this._header.forward[0];for(;D;)yield D.key,D=D.forward[0]}*values(){let D=this._header.forward[0];for(;D;)yield D.value,D=D.forward[0]}toString(){let D="[SkipList]:",I=this._header.forward[0];for(;I;)D+=`node(${I.key}, ${I.value}, lvl:${I.level})`,I=I.forward[0];return D}static _search(D,I,w){let v=D._header;for(let C=D._level-1;C>=0;C--)for(;v.forward[C]&&w(v.forward[C].key,I)<0;)v=v.forward[C];if(v=v.forward[0],v&&w(v.key,I)===0)return v}static _insert(D,I,w,v){let C=[],o=D._header;for(let c=D._level-1;c>=0;c--){for(;o.forward[c]&&v(o.forward[c].key,I)<0;)o=o.forward[c];C[c]=o}if(o=o.forward[0],o&&v(o.key,I)===0)return o.value=w,!1;{let c=A._randomLevel(D);if(c>D._level){for(let i=D._level;i<c;i++)C[i]=D._header;D._level=c}o=new f(c,I,w);for(let i=0;i<c;i++)o.forward[i]=C[i].forward[i],C[i].forward[i]=o;return!0}}static _randomLevel(D,I=.5){let w=1;for(;Math.random()<I&&w<D._maxLevel;)w+=1;return w}static _delete(D,I,w){let v=[],C=D._header;for(let o=D._level-1;o>=0;o--){for(;C.forward[o]&&w(C.forward[o].key,I)<0;)C=C.forward[o];v[o]=C}if(C=C.forward[0],!C||w(C.key,I)!==0)return!1;for(let o=0;o<D._level&&v[o].forward[o]===C;o++)v[o].forward[o]=C.forward[o];for(;D._level>0&&D._header.forward[D._level-1]===_;)D._level-=1;return!0}}e.SkipList=A}),define(ne[151],re([1,0,14]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StopWatch=void 0;const f=t.globals.performance&&typeof t.globals.performance.now=="function";class _{constructor(k){this._highResolution=f&&k,this._startTime=this._now(),this._stopTime=-1}static create(k=!0){return new _(k)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?t.globals.performance.now():Date.now()}}e.StopWatch=_}),define(ne[6],re([1,0,22,150,2,194,151]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Relay=e.EventBufferer=e.EventMultiplexer=e.MicrotaskEmitter=e.DebounceEmitter=e.PauseableEmitter=e.AsyncEmitter=e.Emitter=e.setGlobalLeakWarningThreshold=e.Event=void 0;let D=!1,I=!1;var w;(function(g){g.None=()=>_.Disposable.None;function d(G){if(I){const{onListenerDidAdd:q}=G,Z=i.create();let j=0;G.onListenerDidAdd=()=>{++j==2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),Z.print()),q?.()}}}function m(G){return(q,Z=null,j)=>{let X=!1,Y;return Y=G($=>{if(!X)return Y?Y.dispose():X=!0,q.call(Z,$)},null,j),X&&Y.dispose(),Y}}g.once=m;function b(G,q,Z){return x((j,X=null,Y)=>G($=>j.call(X,q($)),null,Y),Z)}g.map=b;function E(G,q,Z){return x((j,X=null,Y)=>G($=>{q($),j.call(X,$)},null,Y),Z)}g.forEach=E;function y(G,q,Z){return x((j,X=null,Y)=>G($=>q($)&&j.call(X,$),null,Y),Z)}g.filter=y;function T(G){return G}g.signal=T;function R(...G){return(q,Z=null,j)=>(0,_.combinedDisposable)(...G.map(X=>X(Y=>q.call(Z,Y),null,j)))}g.any=R;function O(G,q,Z,j){let X=Z;return b(G,Y=>(X=q(X,Y),X),j)}g.reduce=O;function x(G,q){let Z;const j={onFirstListenerAdd(){Z=G(X.fire,X)},onLastListenerRemove(){Z.dispose()}};q||d(j);const X=new s(j);return q&&q.add(X),X.event}function F(G,q,Z=100,j=!1,X,Y){let $,J,ee,te=0;const se={leakWarningThreshold:X,onFirstListenerAdd(){$=G(ce=>{te++,J=q(J,ce),j&&!ee&&(ie.fire(J),J=void 0),clearTimeout(ee),ee=setTimeout(()=>{const le=J;J=void 0,ee=void 0,(!j||te>1)&&ie.fire(le),te=0},Z)})},onLastListenerRemove(){$.dispose()}};Y||d(se);const ie=new s(se);return Y&&Y.add(ie),ie.event}g.debounce=F;function L(G,q=(j,X)=>j===X,Z){let j=!0,X;return y(G,Y=>{const $=j||!q(Y,X);return j=!1,X=Y,$},Z)}g.latch=L;function M(G,q,Z){return[g.filter(G,q,Z),g.filter(G,j=>!q(j),Z)]}g.split=M;function N(G,q=!1,Z=[]){let j=Z.slice(),X=G(J=>{j?j.push(J):$.fire(J)});const Y=()=>{j&&j.forEach(J=>$.fire(J)),j=null},$=new s({onFirstListenerAdd(){X||(X=G(J=>$.fire(J)))},onFirstListenerDidAdd(){j&&(q?setTimeout(Y):Y())},onLastListenerRemove(){X&&X.dispose(),X=null}});return $.event}g.buffer=N;class B{constructor(q){this.event=q}map(q){return new B(b(this.event,q))}forEach(q){return new B(E(this.event,q))}filter(q){return new B(y(this.event,q))}reduce(q,Z){return new B(O(this.event,q,Z))}latch(){return new B(L(this.event))}debounce(q,Z=100,j=!1,X){return new B(F(this.event,q,Z,j,X))}on(q,Z,j){return this.event(q,Z,j)}once(q,Z,j){return m(this.event)(q,Z,j)}}function P(G){return new B(G)}g.chain=P;function V(G,q,Z=j=>j){const j=(...J)=>$.fire(Z(...J)),X=()=>G.on(q,j),Y=()=>G.removeListener(q,j),$=new s({onFirstListenerAdd:X,onLastListenerRemove:Y});return $.event}g.fromNodeEventEmitter=V;function z(G,q,Z=j=>j){const j=(...J)=>$.fire(Z(...J)),X=()=>G.addEventListener(q,j),Y=()=>G.removeEventListener(q,j),$=new s({onFirstListenerAdd:X,onLastListenerRemove:Y});return $.event}g.fromDOMEventEmitter=z;function U(G){return new Promise(q=>m(G)(q))}g.toPromise=U;function H(G,q){return q(void 0),G(Z=>q(Z))}g.runAndSubscribe=H;function K(G,q){let Z=null;function j(Y){Z?.dispose(),Z=new _.DisposableStore,q(Y,Z)}j(void 0);const X=G(Y=>j(Y));return(0,_.toDisposable)(()=>{X.dispose(),Z?.dispose()})}g.runAndSubscribeWithStore=K})(w=e.Event||(e.Event={}));class v{constructor(d){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${d}_${v._idPool++}`}start(d){this._stopWatch=new k.StopWatch(!0),this._listenerCount=d}stop(){if(this._stopWatch){const d=this._stopWatch.elapsed();this._elapsedOverall+=d,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${d.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}v._idPool=0;let C=-1;function o(g){const d=C;return C=g,{dispose(){C=d}}}e.setGlobalLeakWarningThreshold=o;class c{constructor(d,m=Math.random().toString(18).slice(2,5)){this.customThreshold=d,this.name=m,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(d,m){let b=C;if(typeof this.customThreshold=="number"&&(b=this.customThreshold),b<=0||m<b)return;this._stacks||(this._stacks=new Map);const E=this._stacks.get(d.value)||0;if(this._stacks.set(d.value,E+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=b*.5;let y,T=0;for(const[R,O]of this._stacks)(!y||T<O)&&(y=R,T=O);console.warn(`[${this.name}] potential listener LEAK detected, having ${m} listeners already. MOST frequent listener (${T}):`),console.warn(y)}return()=>{const y=this._stacks.get(d.value)||0;this._stacks.set(d.value,y-1)}}}class i{constructor(d){this.value=d}static create(){return new i(new Error().stack??"")}print(){console.warn(this.value.split(` `).slice(2).join(` `))}}class S{constructor(d,m,b){this.callback=d,this.callbackThis=m,this.stack=b,this.subscription=new _.SafeDisposable}invoke(d){this.callback.call(this.callbackThis,d)}}class s{constructor(d){this._disposed=!1,this._options=d,this._leakageMon=C>0?new c(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=this._options?._profName?new v(this._options._profName):void 0}dispose(){if(!this._disposed){if(this._disposed=!0,this._listeners){if(D){const d=Array.from(this._listeners);queueMicrotask(()=>{for(const m of d)m.subscription.isset()&&(m.subscription.unset(),m.stack?.print())})}this._listeners.clear()}this._deliveryQueue?.clear(),this._options?.onLastListenerRemove?.(),this._leakageMon?.dispose()}}get event(){return this._event||(this._event=(d,m,b)=>{this._listeners||(this._listeners=new A.LinkedList);const E=this._listeners.isEmpty();E&&this._options?.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);let y,T;this._leakageMon&&this._listeners.size>=30&&(T=i.create(),y=this._leakageMon.check(T,this._listeners.size+1)),D&&(T=T??i.create());const R=new S(d,m,T),O=this._listeners.push(R);E&&this._options?.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options?.onListenerDidAdd&&this._options.onListenerDidAdd(this,d,m);const x=R.subscription.set(()=>{y&&y(),this._disposed||(O(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return b instanceof _.DisposableStore?b.add(x):Array.isArray(b)&&b.push(x),x}),this._event}fire(d){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new A.LinkedList);for(let m of this._listeners)this._deliveryQueue.push([m,d]);for(this._perfMon?.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[m,b]=this._deliveryQueue.shift();try{m.invoke(b)}catch(E){(0,t.onUnexpectedError)(E)}}this._perfMon?.stop()}}hasListeners(){return this._listeners?!this._listeners.isEmpty():!1}}e.Emitter=s;class l extends s{async fireAsync(d,m,b){if(!!this._listeners){this._asyncDeliveryQueue||(this._asyncDeliveryQueue=new A.LinkedList);for(const E of this._listeners)this._asyncDeliveryQueue.push([E,d]);for(;this._asyncDeliveryQueue.size>0&&!m.isCancellationRequested;){const[E,y]=this._asyncDeliveryQueue.shift(),T=[],R={...y,token:m,waitUntil:O=>{if(Object.isFrozen(T))throw new Error("waitUntil can NOT be called asynchronous");b&&(O=b(O,E.callback)),T.push(O)}};try{E.invoke(R)}catch(O){(0,t.onUnexpectedError)(O);continue}Object.freeze(T),await Promise.allSettled(T).then(O=>{for(const x of O)x.status==="rejected"&&(0,t.onUnexpectedError)(x.reason)})}}}}e.AsyncEmitter=l;class r extends s{constructor(d){super(d);this._isPaused=0,this._eventQueue=new A.LinkedList,this._mergeFn=d?.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused==0)if(this._mergeFn){const d=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(d))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(d){this._listeners&&(this._isPaused!==0?this._eventQueue.push(d):super.fire(d))}}e.PauseableEmitter=r;class p extends r{constructor(d){super(d);this._delay=d.delay??100}fire(d){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(d)}}e.DebounceEmitter=p;class u extends s{constructor(d){super(d);this._queuedEvents=[],this._mergeFn=d?.merge}fire(d){this._queuedEvents.push(d),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(m=>super.fire(m)),this._queuedEvents=[]})}}e.MicrotaskEmitter=u;class a{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new s({onFirstListenerAdd:()=>this.onFirstListenerAdd(),onLastListenerRemove:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(d){const m={event:d,listener:null};this.events.push(m),this.hasListeners&&this.hook(m);const b=()=>{this.hasListeners&&this.unhook(m);const E=this.events.indexOf(m);this.events.splice(E,1)};return(0,_.toDisposable)((0,f.once)(b))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(d=>this.hook(d))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(d=>this.unhook(d))}hook(d){d.listener=d.event(m=>this.emitter.fire(m))}unhook(d){d.listener&&d.listener.dispose(),d.listener=null}dispose(){this.emitter.dispose()}}e.EventMultiplexer=a;class n{constructor(){this.buffers=[]}wrapEvent(d){return(m,b,E)=>d(y=>{const T=this.buffers[this.buffers.length-1];T?T.push(()=>m.call(b,y)):m.call(b,y)},void 0,E)}bufferEvents(d){const m=[];this.buffers.push(m);const b=d();return this.buffers.pop(),m.forEach(E=>E()),b}}e.EventBufferer=n;class h{constructor(){this.listening=!1,this.inputEvent=w.None,this.inputEventListener=_.Disposable.None,this.emitter=new s({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(d){this.inputEvent=d,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=d(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}e.Relay=h}),define(ne[77],re([1,0,6,2]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isStandalone=e.isAndroid=e.isElectron=e.isWebkitWebView=e.isSafari=e.isChrome=e.isWebKit=e.isFirefox=e.onDidChangeFullscreen=e.isFullscreen=e.setFullscreen=e.setZoomFactor=e.getZoomFactor=e.getZoomLevel=e.setZoomLevel=e.PixelRatio=e.addMatchMediaChangeListener=void 0;class _{constructor(){this._zoomLevel=0,this._zoomFactor=1,this._fullscreen=!1,this._onDidChangeFullscreen=new t.Emitter,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(p,u){this._zoomLevel!==p&&(this._zoomLevel=p)}getZoomFactor(){return this._zoomFactor}setZoomFactor(p){this._zoomFactor=p}setFullscreen(p){this._fullscreen!==p&&(this._fullscreen=p,this._onDidChangeFullscreen.fire())}isFullscreen(){return this._fullscreen}}_.INSTANCE=new _;class A extends f.Disposable{constructor(){super();this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(!0),this._mediaQueryList=null,this._handleChange(!1)}_handleChange(p){this._mediaQueryList&&this._mediaQueryList.removeEventListener("change",this._listener),this._mediaQueryList=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),p&&this._onDidChange.fire()}}class k extends f.Disposable{constructor(){super();this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio();const p=this._register(new A);this._register(p.onDidChange(()=>{this._value=this._getPixelRatio(),this._onDidChange.fire(this._value)}))}get value(){return this._value}_getPixelRatio(){const p=document.createElement("canvas").getContext("2d"),u=window.devicePixelRatio||1,a=p.webkitBackingStorePixelRatio||p.mozBackingStorePixelRatio||p.msBackingStorePixelRatio||p.oBackingStorePixelRatio||p.backingStorePixelRatio||1;return u/a}}class D{constructor(){this._pixelRatioMonitor=null}_getOrCreatePixelRatioMonitor(){return this._pixelRatioMonitor||(this._pixelRatioMonitor=(0,f.markAsSingleton)(new k)),this._pixelRatioMonitor}get value(){return this._getOrCreatePixelRatioMonitor().value}get onDidChange(){return this._getOrCreatePixelRatioMonitor().onDidChange}}function I(r,p){typeof r=="string"&&(r=window.matchMedia(r)),r.addEventListener("change",p)}e.addMatchMediaChangeListener=I,e.PixelRatio=new D;function w(r,p){_.INSTANCE.setZoomLevel(r,p)}e.setZoomLevel=w;function v(){return _.INSTANCE.getZoomLevel()}e.getZoomLevel=v;function C(){return _.INSTANCE.getZoomFactor()}e.getZoomFactor=C;function o(r){_.INSTANCE.setZoomFactor(r)}e.setZoomFactor=o;function c(r){_.INSTANCE.setFullscreen(r)}e.setFullscreen=c;function i(){return _.INSTANCE.isFullscreen()}e.isFullscreen=i,e.onDidChangeFullscreen=_.INSTANCE.onDidChangeFullscreen;const S=navigator.userAgent;e.isFirefox=S.indexOf("Firefox")>=0,e.isWebKit=S.indexOf("AppleWebKit")>=0,e.isChrome=S.indexOf("Chrome")>=0,e.isSafari=!e.isChrome&&S.indexOf("Safari")>=0,e.isWebkitWebView=!e.isChrome&&!e.isSafari&&e.isWebKit,e.isElectron=S.indexOf("Electron/")>=0,e.isAndroid=S.indexOf("Android")>=0;let s=!1;if(window.matchMedia){const r=window.matchMedia("(display-mode: standalone)");s=r.matches,I(r,({matches:p})=>{s=p})}function l(){return s}e.isStandalone=l}),define(ne[223],re([1,0,77,14]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserFeatures=e.KeyboardSupport=void 0;var _;(function(A){A[A.Always=0]="Always",A[A.FullScreen=1]="FullScreen",A[A.None=2]="None"})(_=e.KeyboardSupport||(e.KeyboardSupport={})),e.BrowserFeatures={clipboard:{writeText:f.isNative||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:f.isNative||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:(()=>f.isNative||t.isStandalone()?0:navigator.keyboard||t.isSafari?1:2)(),touch:"ontouchstart"in window||navigator.maxTouchPoints>0,pointerEvents:window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0)}}),define(ne[224],re([1,0,6]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.stop=e.stopEvent=e.DomEmitter=void 0;class f{constructor(D,I,w){const v=C=>this.emitter.fire(C);this.emitter=new t.Emitter({onFirstListenerAdd:()=>D.addEventListener(I,v,w),onLastListenerRemove:()=>D.removeEventListener(I,v,w)})}get event(){return this.emitter.event}dispose(){this.emitter.dispose()}}e.DomEmitter=f;function _(k){return k.preventDefault(),k.stopPropagation(),k}e.stopEvent=_;function A(k){return t.Event.map(k,_)}e.stop=A}),define(ne[91],re([1,0,77,97,222,14]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandardKeyboardEvent=e.printStandardKeyboardEvent=e.printKeyboardEvent=void 0;function k(i){if(i.charCode){let s=String.fromCharCode(i.charCode).toUpperCase();return f.KeyCodeUtils.fromString(s)}const S=i.keyCode;if(S===3)return 7;if(t.isFirefox){if(S===59)return 80;if(S===107)return 81;if(S===109)return 83;if(A.isMacintosh&&S===224)return 57}else if(t.isWebKit){if(S===91)return 57;if(A.isMacintosh&&S===93)return 57;if(!A.isMacintosh&&S===92)return 57}return f.EVENT_KEY_CODE_MAP[S]||0}const D=A.isMacintosh?256:2048,I=512,w=1024,v=A.isMacintosh?2048:256;function C(i){let S=[];return i.ctrlKey&&S.push("ctrl"),i.shiftKey&&S.push("shift"),i.altKey&&S.push("alt"),i.metaKey&&S.push("meta"),`modifiers: [${S.join(",")}], code: ${i.code}, keyCode: ${i.keyCode}, key: ${i.key}`}e.printKeyboardEvent=C;function o(i){let S=[];return i.ctrlKey&&S.push("ctrl"),i.shiftKey&&S.push("shift"),i.altKey&&S.push("alt"),i.metaKey&&S.push("meta"),`modifiers: [${S.join(",")}], code: ${i.code}, keyCode: ${i.keyCode} ('${f.KeyCodeUtils.toString(i.keyCode)}')`}e.printStandardKeyboardEvent=o;class c{constructor(S){this._standardKeyboardEventBrand=!0;let s=S;this.browserEvent=s,this.target=s.target,this.ctrlKey=s.ctrlKey,this.shiftKey=s.shiftKey,this.altKey=s.altKey,this.metaKey=s.metaKey,this.keyCode=k(s),this.code=s.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asRuntimeKeybinding=this._computeRuntimeKeybinding()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeybinding(){return this._asRuntimeKeybinding}equals(S){return this._asKeybinding===S}_computeKeybinding(){let S=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(S=this.keyCode);let s=0;return this.ctrlKey&&(s|=D),this.altKey&&(s|=I),this.shiftKey&&(s|=w),this.metaKey&&(s|=v),s|=S,s}_computeRuntimeKeybinding(){let S=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(S=this.keyCode),new _.SimpleKeybinding(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,S)}}e.StandardKeyboardEvent=c}),define(ne[137],re([1,0,77,952,14]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandardWheelEvent=e.DragMouseEvent=e.StandardMouseEvent=void 0;class A{constructor(w){this.timestamp=Date.now(),this.browserEvent=w,this.leftButton=w.button===0,this.middleButton=w.button===1,this.rightButton=w.button===2,this.buttons=w.buttons,this.target=w.target,this.detail=w.detail||1,w.type==="dblclick"&&(this.detail=2),this.ctrlKey=w.ctrlKey,this.shiftKey=w.shiftKey,this.altKey=w.altKey,this.metaKey=w.metaKey,typeof w.pageX=="number"?(this.posx=w.pageX,this.posy=w.pageY):(this.posx=w.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=w.clientY+document.body.scrollTop+document.documentElement.scrollTop);let v=f.IframeUtils.getPositionOfChildWindowRelativeToAncestorWindow(self,w.view);this.posx-=v.left,this.posy-=v.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}e.StandardMouseEvent=A;class k extends A{constructor(w){super(w);this.dataTransfer=w.dataTransfer}}e.DragMouseEvent=k;class D{constructor(w,v=0,C=0){if(this.browserEvent=w||null,this.target=w?w.target||w.targetNode||w.srcElement:null,this.deltaY=C,this.deltaX=v,w){let o=w,c=w;if(typeof o.wheelDeltaY!="undefined")this.deltaY=o.wheelDeltaY/120;else if(typeof c.VERTICAL_AXIS!="undefined"&&c.axis===c.VERTICAL_AXIS)this.deltaY=-c.detail/3;else if(w.type==="wheel"){const i=w;i.deltaMode===i.DOM_DELTA_LINE?t.isFirefox&&!_.isMacintosh?this.deltaY=-w.deltaY/3:this.deltaY=-w.deltaY:this.deltaY=-w.deltaY/40}if(typeof o.wheelDeltaX!="undefined")t.isSafari&&_.isWindows?this.deltaX=-(o.wheelDeltaX/120):this.deltaX=o.wheelDeltaX/120;else if(typeof c.HORIZONTAL_AXIS!="undefined"&&c.axis===c.HORIZONTAL_AXIS)this.deltaX=-w.detail/3;else if(w.type==="wheel"){const i=w;i.deltaMode===i.DOM_DELTA_LINE?t.isFirefox&&!_.isMacintosh?this.deltaX=-w.deltaX/3:this.deltaX=-w.deltaX:this.deltaX=-w.deltaX/40}this.deltaY===0&&this.deltaX===0&&w.wheelDelta&&(this.deltaY=w.wheelDelta/120)}}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation()}}e.StandardWheelEvent=D}),define(ne[30],re([1,0,6]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;const f=Object.freeze(function(D,I){const w=setTimeout(D.bind(I),0);return{dispose(){clearTimeout(w)}}});var _;(function(D){function I(w){return w===D.None||w===D.Cancelled||w instanceof A?!0:!w||typeof w!="object"?!1:typeof w.isCancellationRequested=="boolean"&&typeof w.onCancellationRequested=="function"}D.isCancellationToken=I,D.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:t.Event.None}),D.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:f})})(_=e.CancellationToken||(e.CancellationToken={}));class A{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?f:(this._emitter||(this._emitter=new t.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class k{constructor(I){this._token=void 0,this._parentListener=void 0,this._parentListener=I&&I.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new A),this._token}cancel(){this._token?this._token instanceof A&&this._token.cancel():this._token=_.Cancelled}dispose(I=!1){I&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof A&&this._token.dispose():this._token=_.None}}e.CancellationTokenSource=k}),define(ne[648],re([1,0,30]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCachedComputed=e.Cache=void 0;class f{constructor(k){this.task=k,this.result=null}get(){if(this.result)return this.result;const k=new t.CancellationTokenSource,D=this.task(k.token);return this.result={promise:D,dispose:()=>{this.result=null,k.cancel(),k.dispose()}},this.result}}e.Cache=f;class _{constructor(k){this.computeFn=k,this.lastCache=void 0,this.lastArgKey=void 0}get(k){const D=JSON.stringify(k);return this.lastArgKey!==D&&(this.lastArgKey=D,this.lastCache=this.computeFn(k)),this.lastCache}}e.LRUCachedComputed=_}),define(ne[444],re([1,0,6,2]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SmoothScrollingOperation=e.SmoothScrollingUpdate=e.Scrollable=e.ScrollState=e.ScrollbarVisibility=void 0;var _;(function(c){c[c.Auto=1]="Auto",c[c.Hidden=2]="Hidden",c[c.Visible=3]="Visible"})(_=e.ScrollbarVisibility||(e.ScrollbarVisibility={}));class A{constructor(i,S,s,l,r,p,u){this._forceIntegerValues=i,this._scrollStateBrand=void 0,this._forceIntegerValues&&(S=S|0,s=s|0,l=l|0,r=r|0,p=p|0,u=u|0),this.rawScrollLeft=l,this.rawScrollTop=u,S<0&&(S=0),l+S>s&&(l=s-S),l<0&&(l=0),r<0&&(r=0),u+r>p&&(u=p-r),u<0&&(u=0),this.width=S,this.scrollWidth=s,this.scrollLeft=l,this.height=r,this.scrollHeight=p,this.scrollTop=u}equals(i){return this.rawScrollLeft===i.rawScrollLeft&&this.rawScrollTop===i.rawScrollTop&&this.width===i.width&&this.scrollWidth===i.scrollWidth&&this.scrollLeft===i.scrollLeft&&this.height===i.height&&this.scrollHeight===i.scrollHeight&&this.scrollTop===i.scrollTop}withScrollDimensions(i,S){return new A(this._forceIntegerValues,typeof i.width!="undefined"?i.width:this.width,typeof i.scrollWidth!="undefined"?i.scrollWidth:this.scrollWidth,S?this.rawScrollLeft:this.scrollLeft,typeof i.height!="undefined"?i.height:this.height,typeof i.scrollHeight!="undefined"?i.scrollHeight:this.scrollHeight,S?this.rawScrollTop:this.scrollTop)}withScrollPosition(i){return new A(this._forceIntegerValues,this.width,this.scrollWidth,typeof i.scrollLeft!="undefined"?i.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof i.scrollTop!="undefined"?i.scrollTop:this.rawScrollTop)}createScrollEvent(i,S){const s=this.width!==i.width,l=this.scrollWidth!==i.scrollWidth,r=this.scrollLeft!==i.scrollLeft,p=this.height!==i.height,u=this.scrollHeight!==i.scrollHeight,a=this.scrollTop!==i.scrollTop;return{inSmoothScrolling:S,oldWidth:i.width,oldScrollWidth:i.scrollWidth,oldScrollLeft:i.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:i.height,oldScrollHeight:i.scrollHeight,oldScrollTop:i.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:s,scrollWidthChanged:l,scrollLeftChanged:r,heightChanged:p,scrollHeightChanged:u,scrollTopChanged:a}}}e.ScrollState=A;class k extends f.Disposable{constructor(i){super();this._scrollableBrand=void 0,this._onScroll=this._register(new t.Emitter),this.onScroll=this._onScroll.event,this._smoothScrollDuration=i.smoothScrollDuration,this._scheduleAtNextAnimationFrame=i.scheduleAtNextAnimationFrame,this._state=new A(i.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(i){this._smoothScrollDuration=i}validateScrollPosition(i){return this._state.withScrollPosition(i)}getScrollDimensions(){return this._state}setScrollDimensions(i,S){const s=this._state.withScrollDimensions(i,S);this._setState(s,Boolean(this._smoothScrolling)),this._smoothScrolling&&this._smoothScrolling.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(i){const S=this._state.withScrollPosition(i);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(S,!1)}setScrollPositionSmooth(i,S){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(i);if(this._smoothScrolling){i={scrollLeft:typeof i.scrollLeft=="undefined"?this._smoothScrolling.to.scrollLeft:i.scrollLeft,scrollTop:typeof i.scrollTop=="undefined"?this._smoothScrolling.to.scrollTop:i.scrollTop};const s=this._state.withScrollPosition(i);if(this._smoothScrolling.to.scrollLeft===s.scrollLeft&&this._smoothScrolling.to.scrollTop===s.scrollTop)return;let l;S?l=new v(this._smoothScrolling.from,s,this._smoothScrolling.startTime,this._smoothScrolling.duration):l=this._smoothScrolling.combine(this._state,s,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=l}else{const s=this._state.withScrollPosition(i);this._smoothScrolling=v.start(this._state,s,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{!this._smoothScrolling||(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}_performSmoothScrolling(){if(!this._smoothScrolling)return;const i=this._smoothScrolling.tick(),S=this._state.withScrollPosition(i);if(this._setState(S,!0),!!this._smoothScrolling){if(i.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{!this._smoothScrolling||(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(i,S){const s=this._state;s.equals(i)||(this._state=i,this._onScroll.fire(this._state.createScrollEvent(s,S)))}}e.Scrollable=k;class D{constructor(i,S,s){this.scrollLeft=i,this.scrollTop=S,this.isDone=s}}e.SmoothScrollingUpdate=D;function I(c,i){const S=i-c;return function(s){return c+S*o(s)}}function w(c,i,S){return function(s){return s<S?c(s/S):i((s-S)/(1-S))}}class v{constructor(i,S,s,l){this.from=i,this.to=S,this.duration=l,this.startTime=s,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(i,S,s){if(Math.abs(i-S)>2.5*s){let r,p;return i<S?(r=i+.75*s,p=S-.75*s):(r=i-.75*s,p=S+.75*s),w(I(i,r),I(p,S),.33)}return I(i,S)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(i){this.to=i.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(i){const S=(i-this.startTime)/this.duration;if(S<1){const s=this.scrollLeft(S),l=this.scrollTop(S);return new D(s,l,!1)}return new D(this.to.scrollLeft,this.to.scrollTop,!0)}combine(i,S,s){return v.start(i,S,s)}static start(i,S,s){s=s+10;const l=Date.now()-10;return new v(i,S,l,s)}}e.SmoothScrollingOperation=v;function C(c){return Math.pow(c,3)}function o(c){return 1-C(1-c)}}),define(ne[959],re([1,0,6]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleSequence=e.Sequence=void 0;class f{constructor(){this.elements=[],this._onDidSplice=new t.Emitter,this.onDidSplice=this._onDidSplice.event}splice(k,D,I=[]){this.elements.splice(k,D,...I),this._onDidSplice.fire({start:k,deleteCount:D,toInsert:I})}}e.Sequence=f;class _{constructor(k,D,I){this._elements=[...k],this.onDidSplice=t.Event.any(t.Event.map(D,w=>({start:this.elements.length,deleteCount:0,toInsert:[w]})),t.Event.map(t.Event.filter(t.Event.map(I,w=>this.elements.indexOf(w)),w=>w>-1),w=>({start:w,deleteCount:1,toInsert:[]}))),this.disposable=this.onDidSplice(({start:w,deleteCount:v,toInsert:C})=>this._elements.splice(w,v,...C))}get elements(){return this._elements}dispose(){this.disposable.dispose()}}e.SimpleSequence=_}),define(ne[206],re([1,0,22,2]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.prefixedStream=e.prefixedReadable=e.transform=e.toReadable=e.emptyStream=e.toStream=e.peekStream=e.listenStream=e.consumeStream=e.peekReadable=e.consumeReadable=e.newWriteableStream=e.isReadableBufferedStream=e.isReadableStream=e.isReadable=void 0;function _(u){const a=u;return a?typeof a.read=="function":!1}e.isReadable=_;function A(u){const a=u;return a?[a.on,a.pause,a.resume,a.destroy].every(n=>typeof n=="function"):!1}e.isReadableStream=A;function k(u){const a=u;return a?A(a.stream)&&Array.isArray(a.buffer)&&typeof a.ended=="boolean":!1}e.isReadableBufferedStream=k;function D(u,a){return new I(u,a)}e.newWriteableStream=D;class I{constructor(a,n){this.reducer=a,this.options=n,this.state={flowing:!1,ended:!1,destroyed:!1},this.buffer={data:[],error:[]},this.listeners={data:[],error:[],end:[]},this.pendingWritePromises=[]}pause(){this.state.destroyed||(this.state.flowing=!1)}resume(){this.state.destroyed||this.state.flowing||(this.state.flowing=!0,this.flowData(),this.flowErrors(),this.flowEnd())}write(a){if(!this.state.destroyed){if(this.state.flowing)this.emitData(a);else if(this.buffer.data.push(a),typeof this.options?.highWaterMark=="number"&&this.buffer.data.length>this.options.highWaterMark)return new Promise(n=>this.pendingWritePromises.push(n))}}error(a){this.state.destroyed||(this.state.flowing?this.emitError(a):this.buffer.error.push(a))}end(a){this.state.destroyed||(typeof a!="undefined"&&this.write(a),this.state.flowing?(this.emitEnd(),this.destroy()):this.state.ended=!0)}emitData(a){this.listeners.data.slice(0).forEach(n=>n(a))}emitError(a){this.listeners.error.length===0?(0,t.onUnexpectedError)(a):this.listeners.error.slice(0).forEach(n=>n(a))}emitEnd(){this.listeners.end.slice(0).forEach(a=>a())}on(a,n){if(!this.state.destroyed)switch(a){case"data":this.listeners.data.push(n),this.resume();break;case"end":this.listeners.end.push(n),this.state.flowing&&this.flowEnd()&&this.destroy();break;case"error":this.listeners.error.push(n),this.state.flowing&&this.flowErrors();break}}removeListener(a,n){if(this.state.destroyed)return;let h;switch(a){case"data":h=this.listeners.data;break;case"end":h=this.listeners.end;break;case"error":h=this.listeners.error;break}if(h){const g=h.indexOf(n);g>=0&&h.splice(g,1)}}flowData(){if(this.buffer.data.length>0){const a=this.reducer(this.buffer.data);this.emitData(a),this.buffer.data.length=0;const n=[...this.pendingWritePromises];this.pendingWritePromises.length=0,n.forEach(h=>h())}}flowErrors(){if(this.listeners.error.length>0){for(const a of this.buffer.error)this.emitError(a);this.buffer.error.length=0}}flowEnd(){return this.state.ended?(this.emitEnd(),this.listeners.end.length>0):!1}destroy(){this.state.destroyed||(this.state.destroyed=!0,this.state.ended=!0,this.buffer.data.length=0,this.buffer.error.length=0,this.listeners.data.length=0,this.listeners.error.length=0,this.listeners.end.length=0,this.pendingWritePromises.length=0)}}function w(u,a){const n=[];let h;for(;(h=u.read())!==null;)n.push(h);return a(n)}e.consumeReadable=w;function v(u,a,n){const h=[];let g;for(;(g=u.read())!==null&&h.length<n;)h.push(g);return g===null&&h.length>0?a(h):{read:()=>{if(h.length>0)return h.shift();if(typeof g!="undefined"){const d=g;return g=void 0,d}return u.read()}}}e.peekReadable=v;function C(u,a){return new Promise((n,h)=>{const g=[];o(u,{onData:d=>{a&&g.push(d)},onError:d=>{a?h(d):n(void 0)},onEnd:()=>{n(a?a(g):void 0)}})})}e.consumeStream=C;function o(u,a){let n=!1;return u.on("error",h=>{n||a.onError(h)}),u.on("end",()=>{n||a.onEnd()}),u.on("data",h=>{n||a.onData(h)}),(0,f.toDisposable)(()=>n=!0)}e.listenStream=o;function c(u,a){return new Promise((n,h)=>{const g=new f.DisposableStore,d=[],m=y=>{if(d.push(y),d.length>a)return g.dispose(),u.pause(),n({stream:u,buffer:d,ended:!1})},b=y=>h(y),E=()=>n({stream:u,buffer:d,ended:!0});g.add((0,f.toDisposable)(()=>u.removeListener("error",b))),u.on("error",b),g.add((0,f.toDisposable)(()=>u.removeListener("end",E))),u.on("end",E),g.add((0,f.toDisposable)(()=>u.removeListener("data",m))),u.on("data",m)})}e.peekStream=c;function i(u,a){const n=D(a);return n.end(u),n}e.toStream=i;function S(){const u=D(()=>{throw new Error("not supported")});return u.end(),u}e.emptyStream=S;function s(u){let a=!1;return{read:()=>a?null:(a=!0,u)}}e.toReadable=s;function l(u,a,n){const h=D(n);return o(u,{onData:g=>h.write(a.data(g)),onError:g=>h.error(a.error?a.error(g):g),onEnd:()=>h.end()}),h}e.transform=l;function r(u,a,n){let h=!1;return{read:()=>{const g=a.read();return h?g:(h=!0,g!==null?n([u,g]):u)}}}e.prefixedReadable=r;function p(u,a,n){let h=!1;const g=D(n);return o(a,{onData:d=>h?g.write(d):(h=!0,g.write(n([u,d]))),onError:d=>g.error(d),onEnd:()=>{h||(h=!0,g.write(u)),g.end()}}),g}e.prefixedStream=p}),define(ne[60],re([1,0,206]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodeBase64=e.decodeBase64=e.prefixedBufferStream=e.prefixedBufferReadable=e.newWriteableBufferStream=e.streamToBufferReadableStream=e.bufferToStream=e.bufferedStreamToBuffer=e.streamToBuffer=e.bufferToReadable=e.readableToBuffer=e.writeUInt8=e.readUInt8=e.writeUInt32LE=e.readUInt32LE=e.writeUInt32BE=e.readUInt32BE=e.writeUInt16LE=e.readUInt16LE=e.VSBuffer=void 0;const f=typeof Buffer!="undefined";let _,A;class k{constructor(y){this.buffer=y,this.byteLength=this.buffer.byteLength}static alloc(y){return f?new k(Buffer.allocUnsafe(y)):new k(new Uint8Array(y))}static wrap(y){return f&&!Buffer.isBuffer(y)&&(y=Buffer.from(y.buffer,y.byteOffset,y.byteLength)),new k(y)}static fromString(y,T){return!(T?.dontUseNodeBuffer||!1)&&f?new k(Buffer.from(y)):(_||(_=new TextEncoder),new k(_.encode(y)))}static fromByteArray(y){const T=k.alloc(y.length);for(let R=0,O=y.length;R<O;R++)T.buffer[R]=y[R];return T}static concat(y,T){if(typeof T=="undefined"){T=0;for(let x=0,F=y.length;x<F;x++)T+=y[x].byteLength}const R=k.alloc(T);let O=0;for(let x=0,F=y.length;x<F;x++){const L=y[x];R.set(L,O),O+=L.byteLength}return R}clone(){const y=k.alloc(this.byteLength);return y.set(this),y}toString(){return f?this.buffer.toString():(A||(A=new TextDecoder),A.decode(this.buffer))}slice(y,T){return new k(this.buffer.subarray(y,T))}set(y,T){if(y instanceof k)this.buffer.set(y.buffer,T);else if(y instanceof Uint8Array)this.buffer.set(y,T);else if(y instanceof ArrayBuffer)this.buffer.set(new Uint8Array(y),T);else if(ArrayBuffer.isView(y))this.buffer.set(new Uint8Array(y.buffer,y.byteOffset,y.byteLength),T);else throw new Error("Unknown argument 'array'")}readUInt32BE(y){return w(this.buffer,y)}writeUInt32BE(y,T){v(this.buffer,y,T)}readUInt32LE(y){return C(this.buffer,y)}writeUInt32LE(y,T){o(this.buffer,y,T)}readUInt8(y){return c(this.buffer,y)}writeUInt8(y,T){i(this.buffer,y,T)}}e.VSBuffer=k;function D(E,y){return E[y+0]<<0>>>0|E[y+1]<<8>>>0}e.readUInt16LE=D;function I(E,y,T){E[T+0]=y&255,y=y>>>8,E[T+1]=y&255}e.writeUInt16LE=I;function w(E,y){return E[y]*2**24+E[y+1]*2**16+E[y+2]*2**8+E[y+3]}e.readUInt32BE=w;function v(E,y,T){E[T+3]=y,y=y>>>8,E[T+2]=y,y=y>>>8,E[T+1]=y,y=y>>>8,E[T]=y}e.writeUInt32BE=v;function C(E,y){return E[y+0]<<0>>>0|E[y+1]<<8>>>0|E[y+2]<<16>>>0|E[y+3]<<24>>>0}e.readUInt32LE=C;function o(E,y,T){E[T+0]=y&255,y=y>>>8,E[T+1]=y&255,y=y>>>8,E[T+2]=y&255,y=y>>>8,E[T+3]=y&255}e.writeUInt32LE=o;function c(E,y){return E[y]}e.readUInt8=c;function i(E,y,T){E[T]=y}e.writeUInt8=i;function S(E){return t.consumeReadable(E,y=>k.concat(y))}e.readableToBuffer=S;function s(E){return t.toReadable(E)}e.bufferToReadable=s;function l(E){return t.consumeStream(E,y=>k.concat(y))}e.streamToBuffer=l;async function r(E){return E.ended?k.concat(E.buffer):k.concat([...E.buffer,await l(E.stream)])}e.bufferedStreamToBuffer=r;function p(E){return t.toStream(E,y=>k.concat(y))}e.bufferToStream=p;function u(E){return t.transform(E,{data:y=>typeof y=="string"?k.fromString(y):k.wrap(y)},y=>k.concat(y))}e.streamToBufferReadableStream=u;function a(E){return t.newWriteableStream(y=>k.concat(y),E)}e.newWriteableBufferStream=a;function n(E,y){return t.prefixedReadable(E,y,T=>k.concat(T))}e.prefixedBufferReadable=n;function h(E,y){return t.prefixedStream(E,y,T=>k.concat(T))}e.prefixedBufferStream=h;function g(E){let y=0,T=0,R=0;const O=new Uint8Array(Math.floor(E.length/4*3)),x=L=>{switch(T){case 3:O[R++]=y|L,T=0;break;case 2:O[R++]=y|L>>>2,y=L<<6,T=3;break;case 1:O[R++]=y|L>>>4,y=L<<4,T=2;break;default:y=L<<2,T=1}};for(let L=0;L<E.length;L++){const M=E.charCodeAt(L);if(M>=65&&M<=90)x(M-65);else if(M>=97&&M<=122)x(M-97+26);else if(M>=48&&M<=57)x(M-48+52);else if(M===43||M===45)x(62);else if(M===47||M===95)x(63);else{if(M===61)break;throw new SyntaxError(`Unexpected base64 character ${E[L]}`)}}const F=R;for(;T>0;)x(0);return k.wrap(O).slice(0,F)}e.decodeBase64=g;const d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";function b({buffer:E},y=!0,T=!1){const R=T?m:d;let O="";const x=E.byteLength%3;let F=0;for(;F<E.byteLength-x;F+=3){const L=E[F+0],M=E[F+1],N=E[F+2];O+=R[L>>>2],O+=R[(L<<4|M>>>4)&63],O+=R[(M<<2|N>>>6)&63],O+=R[N&63]}if(x===1){const L=E[F+0];O+=R[L>>>2],O+=R[L<<4&63],y&&(O+="==")}else if(x===2){const L=E[F+0],M=E[F+1];O+=R[L>>>2],O+=R[(L<<4|M>>>4)&63],O+=R[M<<2&63],y&&(O+="=")}return O}e.encodeBase64=b}),define(ne[29],re([1,0,648,278]),function(Q,e,t,f){"use strict";var _;Object.defineProperty(e,"__esModule",{value:!0}),e.InvisibleCharacters=e.AmbiguousCharacters=e.noBreakWhitespace=e.getLeftDeleteOffset=e.GraphemeBreakType=e.getGraphemeBreakType=e.singleLetterHash=e.getNLines=e.uppercaseFirstLetter=e.containsUppercaseCharacter=e.fuzzyContains=e.stripUTF8BOM=e.startsWithUTF8BOM=e.UTF8_BOM_CHARACTER=e.removeAnsiEscapeCodes=e.lcut=e.isEmojiImprecise=e.isFullWidthCharacter=e.containsUnusualLineTerminators=e.UNUSUAL_LINE_TERMINATORS=e.isBasicASCII=e.containsRTL=e.getCharContainingOffset=e.prevCharLength=e.nextCharLength=e.GraphemeIterator=e.CodePointIterator=e.getNextCodePoint=e.computeCodePoint=e.isLowSurrogate=e.isHighSurrogate=e.commonSuffixLength=e.commonPrefixLength=e.startsWithIgnoreCase=e.equalsIgnoreCase=e.isUpperAsciiLetter=e.isLowerAsciiLetter=e.compareSubstringIgnoreCase=e.compareIgnoreCase=e.compareSubstring=e.compare=e.lastNonWhitespaceIndex=e.getLeadingWhitespace=e.firstNonWhitespaceIndex=e.splitLines=e.regExpFlags=e.regExpContainsBackreference=e.regExpLeadsToEndlessLoop=e.createRegExp=e.stripWildcards=e.convertSimple2RegExpPattern=e.rtrim=e.ltrim=e.trim=e.truncate=e.count=e.escapeRegExpCharacters=e.escape=e.format2=e.format=e.isFalsyOrWhitespace=void 0;function A(De){return!De||typeof De!="string"?!0:De.trim().length===0}e.isFalsyOrWhitespace=A;const k=/{(\d+)}/g;function D(De,..._e){return _e.length===0?De:De.replace(k,function(Re,Ne){const xe=parseInt(Ne,10);return isNaN(xe)||xe<0||xe>=_e.length?Re:_e[xe]})}e.format=D;const I=/{([^}]+)}/g;function w(De,_e){return De.replace(I,(Re,Ne)=>_e[Ne]??Re)}e.format2=w;function v(De){return De.replace(/[<>&]/g,function(_e){switch(_e){case"<":return"<";case">":return">";case"&":return"&";default:return _e}})}e.escape=v;function C(De){return De.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}e.escapeRegExpCharacters=C;function o(De,_e){let Re=0;const Ne=_e.charCodeAt(0);for(let xe=De.length-1;xe>=0;xe--)De.charCodeAt(xe)===Ne&&Re++;return Re}e.count=o;function c(De,_e,Re="\u2026"){return De.length<=_e?De:`${De.substr(0,_e)}${Re}`}e.truncate=c;function i(De,_e=" "){const Re=S(De,_e);return s(Re,_e)}e.trim=i;function S(De,_e){if(!De||!_e)return De;const Re=_e.length;if(Re===0||De.length===0)return De;let Ne=0;for(;De.indexOf(_e,Ne)===Ne;)Ne=Ne+Re;return De.substring(Ne)}e.ltrim=S;function s(De,_e){if(!De||!_e)return De;const Re=_e.length,Ne=De.length;if(Re===0||Ne===0)return De;let xe=Ne,Ae=-1;for(;Ae=De.lastIndexOf(_e,xe-1),!(Ae===-1||Ae+Re!==xe);){if(Ae===0)return"";xe=Ae}return De.substring(0,xe)}e.rtrim=s;function l(De){return De.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}e.convertSimple2RegExpPattern=l;function r(De){return De.replace(/\*/g,"")}e.stripWildcards=r;function p(De,_e,Re={}){if(!De)throw new Error("Cannot create regex from empty string");_e||(De=C(De)),Re.wholeWord&&(/\B/.test(De.charAt(0))||(De="\\b"+De),/\B/.test(De.charAt(De.length-1))||(De=De+"\\b"));let Ne="";return Re.global&&(Ne+="g"),Re.matchCase||(Ne+="i"),Re.multiline&&(Ne+="m"),Re.unicode&&(Ne+="u"),new RegExp(De,Ne)}e.createRegExp=p;function u(De){return De.source==="^"||De.source==="^$"||De.source==="$"||De.source==="^\\s*$"?!1:!!(De.exec("")&&De.lastIndex===0)}e.regExpLeadsToEndlessLoop=u;function a(De){return!!De.match(/([^\\]|^)(\\\\)*\\\d+/)}e.regExpContainsBackreference=a;function n(De){return(De.global?"g":"")+(De.ignoreCase?"i":"")+(De.multiline?"m":"")+(De.unicode?"u":"")}e.regExpFlags=n;function h(De){return De.split(/\r\n|\r|\n/)}e.splitLines=h;function g(De){for(let _e=0,Re=De.length;_e<Re;_e++){const Ne=De.charCodeAt(_e);if(Ne!==32&&Ne!==9)return _e}return-1}e.firstNonWhitespaceIndex=g;function d(De,_e=0,Re=De.length){for(let Ne=_e;Ne<Re;Ne++){const xe=De.charCodeAt(Ne);if(xe!==32&&xe!==9)return De.substring(_e,Ne)}return De.substring(_e,Re)}e.getLeadingWhitespace=d;function m(De,_e=De.length-1){for(let Re=_e;Re>=0;Re--){const Ne=De.charCodeAt(Re);if(Ne!==32&&Ne!==9)return Re}return-1}e.lastNonWhitespaceIndex=m;function b(De,_e){return De<_e?-1:De>_e?1:0}e.compare=b;function E(De,_e,Re=0,Ne=De.length,xe=0,Ae=_e.length){for(;Re<Ne&&xe<Ae;Re++,xe++){let We=De.charCodeAt(Re),Ve=_e.charCodeAt(xe);if(We<Ve)return-1;if(We>Ve)return 1}const Le=Ne-Re,Me=Ae-xe;return Le<Me?-1:Le>Me?1:0}e.compareSubstring=E;function y(De,_e){return T(De,_e,0,De.length,0,_e.length)}e.compareIgnoreCase=y;function T(De,_e,Re=0,Ne=De.length,xe=0,Ae=_e.length){for(;Re<Ne&&xe<Ae;Re++,xe++){let We=De.charCodeAt(Re),Ve=_e.charCodeAt(xe);if(We===Ve)continue;if(We>=128||Ve>=128)return E(De.toLowerCase(),_e.toLowerCase(),Re,Ne,xe,Ae);R(We)&&(We-=32),R(Ve)&&(Ve-=32);const Ue=We-Ve;if(Ue!==0)return Ue}const Le=Ne-Re,Me=Ae-xe;return Le<Me?-1:Le>Me?1:0}e.compareSubstringIgnoreCase=T;function R(De){return De>=97&&De<=122}e.isLowerAsciiLetter=R;function O(De){return De>=65&&De<=90}e.isUpperAsciiLetter=O;function x(De,_e){return De.length===_e.length&&T(De,_e)===0}e.equalsIgnoreCase=x;function F(De,_e){const Re=_e.length;return _e.length>De.length?!1:T(De,_e,0,Re)===0}e.startsWithIgnoreCase=F;function L(De,_e){let Re,Ne=Math.min(De.length,_e.length);for(Re=0;Re<Ne;Re++)if(De.charCodeAt(Re)!==_e.charCodeAt(Re))return Re;return Ne}e.commonPrefixLength=L;function M(De,_e){let Re,Ne=Math.min(De.length,_e.length);const xe=De.length-1,Ae=_e.length-1;for(Re=0;Re<Ne;Re++)if(De.charCodeAt(xe-Re)!==_e.charCodeAt(Ae-Re))return Re;return Ne}e.commonSuffixLength=M;function N(De){return 55296<=De&&De<=56319}e.isHighSurrogate=N;function B(De){return 56320<=De&&De<=57343}e.isLowSurrogate=B;function P(De,_e){return(De-55296<<10)+(_e-56320)+65536}e.computeCodePoint=P;function V(De,_e,Re){const Ne=De.charCodeAt(Re);if(N(Ne)&&Re+1<_e){const xe=De.charCodeAt(Re+1);if(B(xe))return P(Ne,xe)}return Ne}e.getNextCodePoint=V;function z(De,_e){const Re=De.charCodeAt(_e-1);if(B(Re)&&_e>1){const Ne=De.charCodeAt(_e-2);if(N(Ne))return P(Ne,Re)}return Re}class U{constructor(_e,Re=0){this._str=_e,this._len=_e.length,this._offset=Re}get offset(){return this._offset}setOffset(_e){this._offset=_e}prevCodePoint(){const _e=z(this._str,this._offset);return this._offset-=_e>=65536?2:1,_e}nextCodePoint(){const _e=V(this._str,this._len,this._offset);return this._offset+=_e>=65536?2:1,_e}eol(){return this._offset>=this._len}}e.CodePointIterator=U;class H{constructor(_e,Re=0){this._iterator=new U(_e,Re)}get offset(){return this._iterator.offset}nextGraphemeLength(){const _e=ge.getInstance(),Re=this._iterator,Ne=Re.offset;let xe=_e.getGraphemeBreakType(Re.nextCodePoint());for(;!Re.eol();){const Ae=Re.offset,Le=_e.getGraphemeBreakType(Re.nextCodePoint());if(ve(xe,Le)){Re.setOffset(Ae);break}xe=Le}return Re.offset-Ne}prevGraphemeLength(){const _e=ge.getInstance(),Re=this._iterator,Ne=Re.offset;let xe=_e.getGraphemeBreakType(Re.prevCodePoint());for(;Re.offset>0;){const Ae=Re.offset,Le=_e.getGraphemeBreakType(Re.prevCodePoint());if(ve(Le,xe)){Re.setOffset(Ae);break}xe=Le}return Ne-Re.offset}eol(){return this._iterator.eol()}}e.GraphemeIterator=H;function K(De,_e){return new H(De,_e).nextGraphemeLength()}e.nextCharLength=K;function G(De,_e){return new H(De,_e).prevGraphemeLength()}e.prevCharLength=G;function q(De,_e){_e>0&&B(De.charCodeAt(_e))&&_e--;const Re=_e+K(De,_e);return[Re-G(De,Re),Re]}e.getCharContainingOffset=q;const Z=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function j(De){return Z.test(De)}e.containsRTL=j;const X=/^[\t\n\r\x20-\x7E]*$/;function Y(De){return X.test(De)}e.isBasicASCII=Y,e.UNUSUAL_LINE_TERMINATORS=/[\u2028\u2029]/;function $(De){return e.UNUSUAL_LINE_TERMINATORS.test(De)}e.containsUnusualLineTerminators=$;function J(De){return De>=11904&&De<=55215||De>=63744&&De<=64255||De>=65281&&De<=65374}e.isFullWidthCharacter=J;function ee(De){return De>=127462&&De<=127487||De===8986||De===8987||De===9200||De===9203||De>=9728&&De<=10175||De===11088||De===11093||De>=127744&&De<=128591||De>=128640&&De<=128764||De>=128992&&De<=129008||De>=129280&&De<=129535||De>=129648&&De<=129782}e.isEmojiImprecise=ee;function te(De,_e){if(De.length<_e)return De;const Re=/\b/g;let Ne=0;for(;Re.test(De)&&!(De.length-Re.lastIndex<_e);)Ne=Re.lastIndex,Re.lastIndex+=1;return De.substring(Ne).replace(/^\s/,"")}e.lcut=te;const se=/\x1B\x5B[12]?K/g,ie=/\x1b\[\d+m/g,ce=/\x1b\[0?m/g;function le(De){return De&&(De=De.replace(se,""),De=De.replace(ie,""),De=De.replace(ce,"")),De}e.removeAnsiEscapeCodes=le,e.UTF8_BOM_CHARACTER=String.fromCharCode(65279);function ae(De){return!!(De&&De.length>0&&De.charCodeAt(0)===65279)}e.startsWithUTF8BOM=ae;function ue(De){return ae(De)?De.substr(1):De}e.stripUTF8BOM=ue;function oe(De,_e){if(!De||!_e||De.length<_e.length)return!1;const Re=_e.length,Ne=De.toLowerCase();let xe=0,Ae=-1;for(;xe<Re;){const Le=Ne.indexOf(_e[xe],Ae+1);if(Le<0)return!1;Ae=Le,xe++}return!0}e.fuzzyContains=oe;function fe(De,_e=!1){return De?(_e&&(De=De.replace(/\\./g,"")),De.toLowerCase()!==De):!1}e.containsUppercaseCharacter=fe;function pe(De){return De.charAt(0).toUpperCase()+De.slice(1)}e.uppercaseFirstLetter=pe;function me(De,_e=1){if(_e===0)return"";let Re=-1;do Re=De.indexOf(` `,Re+1),_e--;while(_e>0&&Re>=0);return Re===-1?De:(De[Re-1]==="\r"&&Re--,De.substr(0,Re))}e.getNLines=me;function be(De){const _e=90-65+1;return De=De%(2*_e),De<_e?String.fromCharCode(97+De):String.fromCharCode(65+De-_e)}e.singleLetterHash=be;function Ce(De){return ge.getInstance().getGraphemeBreakType(De)}e.getGraphemeBreakType=Ce;function ve(De,_e){return De===0?_e!==5&&_e!==7:De===2&&_e===3?!1:De===4||De===2||De===3||_e===4||_e===2||_e===3?!0:!(De===8&&(_e===8||_e===9||_e===11||_e===12)||(De===11||De===9)&&(_e===9||_e===10)||(De===12||De===10)&&_e===10||_e===5||_e===13||_e===7||De===1||De===13&&_e===14||De===6&&_e===6)}var he;(function(De){De[De.Other=0]="Other",De[De.Prepend=1]="Prepend",De[De.CR=2]="CR",De[De.LF=3]="LF",De[De.Control=4]="Control",De[De.Extend=5]="Extend",De[De.Regional_Indicator=6]="Regional_Indicator",De[De.SpacingMark=7]="SpacingMark",De[De.L=8]="L",De[De.V=9]="V",De[De.T=10]="T",De[De.LV=11]="LV",De[De.LVT=12]="LVT",De[De.ZWJ=13]="ZWJ",De[De.Extended_Pictographic=14]="Extended_Pictographic"})(he=e.GraphemeBreakType||(e.GraphemeBreakType={}));class ge{constructor(){this._data=de()}static getInstance(){return ge._INSTANCE||(ge._INSTANCE=new ge),ge._INSTANCE}getGraphemeBreakType(_e){if(_e<32)return _e===10?3:_e===13?2:4;if(_e<127)return 0;const Re=this._data,Ne=Re.length/3;let xe=1;for(;xe<=Ne;)if(_e<Re[3*xe])xe=2*xe;else if(_e>Re[3*xe+1])xe=2*xe+1;else return Re[3*xe+2];return 0}}ge._INSTANCE=null;function de(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}function Se(De,_e){if(De===0)return 0;const Re=we(De,_e);if(Re!==void 0)return Re;const Ne=new U(_e,De);return Ne.prevCodePoint(),Ne.offset}e.getLeftDeleteOffset=Se;function we(De,_e){const Re=new U(_e,De);let Ne=Re.prevCodePoint();for(;ye(Ne)||Ne===65039||Ne===8419;){if(Re.offset===0)return;Ne=Re.prevCodePoint()}if(!ee(Ne))return;let xe=Re.offset;return xe>0&&Re.prevCodePoint()===8205&&(xe=Re.offset),xe}function ye(De){return 127995<=De&&De<=127999}var ke;(function(De){De[De.zwj=8205]="zwj",De[De.emojiVariantSelector=65039]="emojiVariantSelector",De[De.enclosingKeyCap=8419]="enclosingKeyCap"})(ke||(ke={})),e.noBreakWhitespace="\xA0";class Ie{constructor(_e){this.confusableDictionary=_e}static getInstance(_e){return Ie.cache.get(Array.from(_e))}static getLocales(){return Ie._locales.getValue()}isAmbiguous(_e){return this.confusableDictionary.has(_e)}getPrimaryConfusable(_e){return this.confusableDictionary.get(_e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}e.AmbiguousCharacters=Ie,_=Ie,Ie.ambiguousCharacterData=new f.Lazy(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}')),Ie.cache=new t.LRUCachedComputed(De=>{function _e(Ve){const Ue=new Map;for(let et=0;et<Ve.length;et+=2)Ue.set(Ve[et],Ve[et+1]);return Ue}function Re(Ve,Ue){const et=new Map(Ve);for(const[Ze,Fe]of Ue)et.set(Ze,Fe);return et}function Ne(Ve,Ue){if(!Ve)return Ue;const et=new Map;for(const[Ze,Fe]of Ve)Ue.has(Ze)&&et.set(Ze,Fe);return et}const xe=_.ambiguousCharacterData.getValue();let Ae=De.filter(Ve=>!Ve.startsWith("_")&&Ve in xe);Ae.length===0&&(Ae=["_default"]);let Le;for(const Ve of Ae){const Ue=_e(xe[Ve]);Le=Ne(Le,Ue)}const Me=_e(xe._common),We=Re(Me,Le);return new Ie(We)}),Ie._locales=new f.Lazy(()=>Object.keys(Ie.ambiguousCharacterData.getValue()).filter(De=>!De.startsWith("_")));class Te{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static getData(){return this._data||(this._data=new Set(Te.getRawData())),this._data}static isInvisibleCharacter(_e){return Te.getData().has(_e)}static get codePoints(){return Te.getData()}}e.InvisibleCharacters=Te,Te._data=void 0}),define(ne[116],re([1,0,29]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringSHA1=e.toHexString=e.Hasher=e.stringHash=e.numberHash=e.doHash=e.hash=void 0;function f(l){return _(l,0)}e.hash=f;function _(l,r){switch(typeof l){case"object":return l===null?A(349,r):Array.isArray(l)?I(l,r):w(l,r);case"string":return D(l,r);case"boolean":return k(l,r);case"number":return A(l,r);case"undefined":return A(937,r);default:return A(617,r)}}e.doHash=_;function A(l,r){return(r<<5)-r+l|0}e.numberHash=A;function k(l,r){return A(l?433:863,r)}function D(l,r){r=A(149417,r);for(let p=0,u=l.length;p<u;p++)r=A(l.charCodeAt(p),r);return r}e.stringHash=D;function I(l,r){return r=A(104579,r),l.reduce((p,u)=>_(u,p),r)}function w(l,r){return r=A(181387,r),Object.keys(l).sort().reduce((p,u)=>(p=D(u,p),_(l[u],p)),r)}class v{constructor(){this._value=0}get value(){return this._value}hash(r){return this._value=_(r,this._value),this._value}}e.Hasher=v;var C;(function(l){l[l.BLOCK_SIZE=64]="BLOCK_SIZE",l[l.UNICODE_REPLACEMENT=65533]="UNICODE_REPLACEMENT"})(C||(C={}));function o(l,r,p=32){const u=p-r,a=~((1<<u)-1);return(l<<r|(a&l)>>>u)>>>0}function c(l,r=0,p=l.byteLength,u=0){for(let a=0;a<p;a++)l[r+a]=u}function i(l,r,p="0"){for(;l.length<r;)l=p+l;return l}function S(l,r=32){return l instanceof ArrayBuffer?Array.from(new Uint8Array(l)).map(p=>p.toString(16).padStart(2,"0")).join(""):i((l>>>0).toString(16),r/4)}e.toHexString=S;class s{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(64+3),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(r){const p=r.length;if(p===0)return;const u=this._buff;let a=this._buffLen,n=this._leftoverHighSurrogate,h,g;for(n!==0?(h=n,g=-1,n=0):(h=r.charCodeAt(0),g=0);;){let d=h;if(t.isHighSurrogate(h))if(g+1<p){const m=r.charCodeAt(g+1);t.isLowSurrogate(m)?(g++,d=t.computeCodePoint(h,m)):d=65533}else{n=h;break}else t.isLowSurrogate(h)&&(d=65533);if(a=this._push(u,a,d),g++,g<p)h=r.charCodeAt(g);else break}this._buffLen=a,this._leftoverHighSurrogate=n}_push(r,p,u){return u<128?r[p++]=u:u<2048?(r[p++]=192|(u&1984)>>>6,r[p++]=128|(u&63)>>>0):u<65536?(r[p++]=224|(u&61440)>>>12,r[p++]=128|(u&4032)>>>6,r[p++]=128|(u&63)>>>0):(r[p++]=240|(u&1835008)>>>18,r[p++]=128|(u&258048)>>>12,r[p++]=128|(u&4032)>>>6,r[p++]=128|(u&63)>>>0),p>=64&&(this._step(),p-=64,this._totalLen+=64,r[0]=r[64+0],r[1]=r[64+1],r[2]=r[64+2]),p}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),S(this._h0)+S(this._h1)+S(this._h2)+S(this._h3)+S(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,c(this._buff,this._buffLen),this._buffLen>56&&(this._step(),c(this._buff));const r=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(r/4294967296),!1),this._buffDV.setUint32(60,r%4294967296,!1),this._step()}_step(){const r=s._bigBlock32,p=this._buffDV;for(let E=0;E<64;E+=4)r.setUint32(E,p.getUint32(E,!1),!1);for(let E=64;E<320;E+=4)r.setUint32(E,o(r.getUint32(E-12,!1)^r.getUint32(E-32,!1)^r.getUint32(E-56,!1)^r.getUint32(E-64,!1),1),!1);let u=this._h0,a=this._h1,n=this._h2,h=this._h3,g=this._h4,d,m,b;for(let E=0;E<80;E++)E<20?(d=a&n|~a&h,m=1518500249):E<40?(d=a^n^h,m=1859775393):E<60?(d=a&n|a&h|n&h,m=2400959708):(d=a^n^h,m=3395469782),b=o(u,5)+d+g+m+r.getUint32(E*4,!1)&4294967295,g=h,h=n,n=o(a,30),a=u,u=b;this._h0=this._h0+u&4294967295,this._h1=this._h1+a&4294967295,this._h2=this._h2+n&4294967295,this._h3=this._h3+h&4294967295,this._h4=this._h4+g&4294967295}}e.StringSHA1=s,s._bigBlock32=new DataView(new ArrayBuffer(320))}),define(ne[649],re([1,0,60,116]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sha1Hex=void 0;async function _(A){if(globalThis?.crypto?.subtle){const k=t.VSBuffer.fromString(A,{dontUseNodeBuffer:!0}).buffer,D=await globalThis.crypto.subtle.digest({name:"sha-1"},k);return(0,f.toHexString)(D)}else{const k=new f.StringSHA1;return k.update(A),k.digest()}}e.sha1Hex=_}),define(ne[380],re([1,0,955,116]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LcsDiff=e.MyArray=e.Debug=e.stringDiff=e.StringDiffSequence=void 0;class _{constructor(o){this.source=o}getElements(){const o=this.source,c=new Int32Array(o.length);for(let i=0,S=o.length;i<S;i++)c[i]=o.charCodeAt(i);return c}}e.StringDiffSequence=_;function A(C,o,c){return new v(new _(C),new _(o)).ComputeDiff(c).changes}e.stringDiff=A;class k{static Assert(o,c){if(!o)throw new Error(c)}}e.Debug=k;class D{static Copy(o,c,i,S,s){for(let l=0;l<s;l++)i[S+l]=o[c+l]}static Copy2(o,c,i,S,s){for(let l=0;l<s;l++)i[S+l]=o[c+l]}}e.MyArray=D;var I;(function(C){C[C.MaxDifferencesHistory=1447]="MaxDifferencesHistory"})(I||(I={}));class w{constructor(){this.m_changes=[],this.m_originalStart=1073741824,this.m_modifiedStart=1073741824,this.m_originalCount=0,this.m_modifiedCount=0}MarkNextChange(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new t.DiffChange(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(o,c){this.m_originalStart=Math.min(this.m_originalStart,o),this.m_modifiedStart=Math.min(this.m_modifiedStart,c),this.m_originalCount++}AddModifiedElement(o,c){this.m_originalStart=Math.min(this.m_originalStart,o),this.m_modifiedStart=Math.min(this.m_modifiedStart,c),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class v{constructor(o,c,i=null){this.ContinueProcessingPredicate=i,this._originalSequence=o,this._modifiedSequence=c;const[S,s,l]=v._getElements(o),[r,p,u]=v._getElements(c);this._hasStrings=l&&u,this._originalStringElements=S,this._originalElementsOrHash=s,this._modifiedStringElements=r,this._modifiedElementsOrHash=p,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(o){return o.length>0&&typeof o[0]=="string"}static _getElements(o){const c=o.getElements();if(v._isStringArray(c)){const i=new Int32Array(c.length);for(let S=0,s=c.length;S<s;S++)i[S]=(0,f.stringHash)(c[S],0);return[c,i,!0]}return c instanceof Int32Array?[[],c,!1]:[[],new Int32Array(c),!1]}ElementsAreEqual(o,c){return this._originalElementsOrHash[o]!==this._modifiedElementsOrHash[c]?!1:this._hasStrings?this._originalStringElements[o]===this._modifiedStringElements[c]:!0}ElementsAreStrictEqual(o,c){if(!this.ElementsAreEqual(o,c))return!1;const i=v._getStrictElement(this._originalSequence,o),S=v._getStrictElement(this._modifiedSequence,c);return i===S}static _getStrictElement(o,c){return typeof o.getStrictElement=="function"?o.getStrictElement(c):null}OriginalElementsAreEqual(o,c){return this._originalElementsOrHash[o]!==this._originalElementsOrHash[c]?!1:this._hasStrings?this._originalStringElements[o]===this._originalStringElements[c]:!0}ModifiedElementsAreEqual(o,c){return this._modifiedElementsOrHash[o]!==this._modifiedElementsOrHash[c]?!1:this._hasStrings?this._modifiedStringElements[o]===this._modifiedStringElements[c]:!0}ComputeDiff(o){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,o)}_ComputeDiff(o,c,i,S,s){const l=[!1];let r=this.ComputeDiffRecursive(o,c,i,S,l);return s&&(r=this.PrettifyChanges(r)),{quitEarly:l[0],changes:r}}ComputeDiffRecursive(o,c,i,S,s){for(s[0]=!1;o<=c&&i<=S&&this.ElementsAreEqual(o,i);)o++,i++;for(;c>=o&&S>=i&&this.ElementsAreEqual(c,S);)c--,S--;if(o>c||i>S){let n;return i<=S?(k.Assert(o===c+1,"originalStart should only be one more than originalEnd"),n=[new t.DiffChange(o,0,i,S-i+1)]):o<=c?(k.Assert(i===S+1,"modifiedStart should only be one more than modifiedEnd"),n=[new t.DiffChange(o,c-o+1,i,0)]):(k.Assert(o===c+1,"originalStart should only be one more than originalEnd"),k.Assert(i===S+1,"modifiedStart should only be one more than modifiedEnd"),n=[]),n}const l=[0],r=[0],p=this.ComputeRecursionPoint(o,c,i,S,l,r,s),u=l[0],a=r[0];if(p!==null)return p;if(!s[0]){const n=this.ComputeDiffRecursive(o,u,i,a,s);let h=[];return s[0]?h=[new t.DiffChange(u+1,c-(u+1)+1,a+1,S-(a+1)+1)]:h=this.ComputeDiffRecursive(u+1,c,a+1,S,s),this.ConcatenateChanges(n,h)}return[new t.DiffChange(o,c-o+1,i,S-i+1)]}WALKTRACE(o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y){let T=null,R=null,O=new w,x=c,F=i,L=g[0]-b[0]-S,M=-1073741824,N=this.m_forwardHistory.length-1;do{const B=L+o;B===x||B<F&&u[B-1]<u[B+1]?(n=u[B+1],d=n-L-S,n<M&&O.MarkNextChange(),M=n,O.AddModifiedElement(n+1,d),L=B+1-o):(n=u[B-1]+1,d=n-L-S,n<M&&O.MarkNextChange(),M=n-1,O.AddOriginalElement(n,d+1),L=B-1-o),N>=0&&(u=this.m_forwardHistory[N],o=u[0],x=1,F=u.length-1)}while(--N>=-1);if(T=O.getReverseChanges(),y[0]){let B=g[0]+1,P=b[0]+1;if(T!==null&&T.length>0){const V=T[T.length-1];B=Math.max(B,V.getOriginalEnd()),P=Math.max(P,V.getModifiedEnd())}R=[new t.DiffChange(B,h-B+1,P,m-P+1)]}else{O=new w,x=l,F=r,L=g[0]-b[0]-p,M=1073741824,N=E?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const B=L+s;B===x||B<F&&a[B-1]>=a[B+1]?(n=a[B+1]-1,d=n-L-p,n>M&&O.MarkNextChange(),M=n+1,O.AddOriginalElement(n+1,d+1),L=B+1-s):(n=a[B-1],d=n-L-p,n>M&&O.MarkNextChange(),M=n,O.AddModifiedElement(n+1,d+1),L=B-1-s),N>=0&&(a=this.m_reverseHistory[N],s=a[0],x=1,F=a.length-1)}while(--N>=-1);R=O.getChanges()}return this.ConcatenateChanges(T,R)}ComputeRecursionPoint(o,c,i,S,s,l,r){let p=0,u=0,a=0,n=0,h=0,g=0;o--,i--,s[0]=0,l[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const d=c-o+(S-i),m=d+1,b=new Int32Array(m),E=new Int32Array(m),y=S-i,T=c-o,R=o-i,O=c-S,F=(T-y)%2==0;b[y]=o,E[T]=c,r[0]=!1;for(let L=1;L<=d/2+1;L++){let M=0,N=0;a=this.ClipDiagonalBound(y-L,L,y,m),n=this.ClipDiagonalBound(y+L,L,y,m);for(let P=a;P<=n;P+=2){P===a||P<n&&b[P-1]<b[P+1]?p=b[P+1]:p=b[P-1]+1,u=p-(P-y)-R;const V=p;for(;p<c&&u<S&&this.ElementsAreEqual(p+1,u+1);)p++,u++;if(b[P]=p,p+u>M+N&&(M=p,N=u),!F&&Math.abs(P-T)<=L-1&&p>=E[P])return s[0]=p,l[0]=u,V<=E[P]&&1447>0&&L<=1447+1?this.WALKTRACE(y,a,n,R,T,h,g,O,b,E,p,c,s,u,S,l,F,r):null}const B=(M-o+(N-i)-L)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(M,B))return r[0]=!0,s[0]=M,l[0]=N,B>0&&1447>0&&L<=1447+1?this.WALKTRACE(y,a,n,R,T,h,g,O,b,E,p,c,s,u,S,l,F,r):(o++,i++,[new t.DiffChange(o,c-o+1,i,S-i+1)]);h=this.ClipDiagonalBound(T-L,L,T,m),g=this.ClipDiagonalBound(T+L,L,T,m);for(let P=h;P<=g;P+=2){P===h||P<g&&E[P-1]>=E[P+1]?p=E[P+1]-1:p=E[P-1],u=p-(P-T)-O;const V=p;for(;p>o&&u>i&&this.ElementsAreEqual(p,u);)p--,u--;if(E[P]=p,F&&Math.abs(P-y)<=L&&p<=b[P])return s[0]=p,l[0]=u,V>=b[P]&&1447>0&&L<=1447+1?this.WALKTRACE(y,a,n,R,T,h,g,O,b,E,p,c,s,u,S,l,F,r):null}if(L<=1447){let P=new Int32Array(n-a+2);P[0]=y-a+1,D.Copy2(b,a,P,1,n-a+1),this.m_forwardHistory.push(P),P=new Int32Array(g-h+2),P[0]=T-h+1,D.Copy2(E,h,P,1,g-h+1),this.m_reverseHistory.push(P)}}return this.WALKTRACE(y,a,n,R,T,h,g,O,b,E,p,c,s,u,S,l,F,r)}PrettifyChanges(o){for(let c=0;c<o.length;c++){const i=o[c],S=c<o.length-1?o[c+1].originalStart:this._originalElementsOrHash.length,s=c<o.length-1?o[c+1].modifiedStart:this._modifiedElementsOrHash.length,l=i.originalLength>0,r=i.modifiedLength>0;for(;i.originalStart+i.originalLength<S&&i.modifiedStart+i.modifiedLength<s&&(!l||this.OriginalElementsAreEqual(i.originalStart,i.originalStart+i.originalLength))&&(!r||this.ModifiedElementsAreEqual(i.modifiedStart,i.modifiedStart+i.modifiedLength));){const u=this.ElementsAreStrictEqual(i.originalStart,i.modifiedStart);if(this.ElementsAreStrictEqual(i.originalStart+i.originalLength,i.modifiedStart+i.modifiedLength)&&!u)break;i.originalStart++,i.modifiedStart++}let p=[null];if(c<o.length-1&&this.ChangesOverlap(o[c],o[c+1],p)){o[c]=p[0],o.splice(c+1,1),c--;continue}}for(let c=o.length-1;c>=0;c--){const i=o[c];let S=0,s=0;if(c>0){const n=o[c-1];S=n.originalStart+n.originalLength,s=n.modifiedStart+n.modifiedLength}const l=i.originalLength>0,r=i.modifiedLength>0;let p=0,u=this._boundaryScore(i.originalStart,i.originalLength,i.modifiedStart,i.modifiedLength);for(let n=1;;n++){const h=i.originalStart-n,g=i.modifiedStart-n;if(h<S||g<s||l&&!this.OriginalElementsAreEqual(h,h+i.originalLength)||r&&!this.ModifiedElementsAreEqual(g,g+i.modifiedLength))break;const m=(h===S&&g===s?5:0)+this._boundaryScore(h,i.originalLength,g,i.modifiedLength);m>u&&(u=m,p=n)}i.originalStart-=p,i.modifiedStart-=p;const a=[null];if(c>0&&this.ChangesOverlap(o[c-1],o[c],a)){o[c-1]=a[0],o.splice(c,1),c++;continue}}if(this._hasStrings)for(let c=1,i=o.length;c<i;c++){const S=o[c-1],s=o[c],l=s.originalStart-S.originalStart-S.originalLength,r=S.originalStart,p=s.originalStart+s.originalLength,u=p-r,a=S.modifiedStart,n=s.modifiedStart+s.modifiedLength,h=n-a;if(l<5&&u<20&&h<20){const g=this._findBetterContiguousSequence(r,u,a,h,l);if(g){const[d,m]=g;(d!==S.originalStart+S.originalLength||m!==S.modifiedStart+S.modifiedLength)&&(S.originalLength=d-S.originalStart,S.modifiedLength=m-S.modifiedStart,s.originalStart=d+l,s.modifiedStart=m+l,s.originalLength=p-s.originalStart,s.modifiedLength=n-s.modifiedStart)}}}return o}_findBetterContiguousSequence(o,c,i,S,s){if(c<s||S<s)return null;const l=o+c-s+1,r=i+S-s+1;let p=0,u=0,a=0;for(let n=o;n<l;n++)for(let h=i;h<r;h++){const g=this._contiguousSequenceScore(n,h,s);g>0&&g>p&&(p=g,u=n,a=h)}return p>0?[u,a]:null}_contiguousSequenceScore(o,c,i){let S=0;for(let s=0;s<i;s++){if(!this.ElementsAreEqual(o+s,c+s))return 0;S+=this._originalStringElements[o+s].length}return S}_OriginalIsBoundary(o){return o<=0||o>=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[o])}_OriginalRegionIsBoundary(o,c){if(this._OriginalIsBoundary(o)||this._OriginalIsBoundary(o-1))return!0;if(c>0){const i=o+c;if(this._OriginalIsBoundary(i-1)||this._OriginalIsBoundary(i))return!0}return!1}_ModifiedIsBoundary(o){return o<=0||o>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[o])}_ModifiedRegionIsBoundary(o,c){if(this._ModifiedIsBoundary(o)||this._ModifiedIsBoundary(o-1))return!0;if(c>0){const i=o+c;if(this._ModifiedIsBoundary(i-1)||this._ModifiedIsBoundary(i))return!0}return!1}_boundaryScore(o,c,i,S){const s=this._OriginalRegionIsBoundary(o,c)?1:0,l=this._ModifiedRegionIsBoundary(i,S)?1:0;return s+l}ConcatenateChanges(o,c){let i=[];if(o.length===0||c.length===0)return c.length>0?c:o;if(this.ChangesOverlap(o[o.length-1],c[0],i)){const S=new Array(o.length+c.length-1);return D.Copy(o,0,S,0,o.length-1),S[o.length-1]=i[0],D.Copy(c,1,S,o.length,c.length-1),S}else{const S=new Array(o.length+c.length);return D.Copy(o,0,S,0,o.length),D.Copy(c,0,S,o.length,c.length),S}}ChangesOverlap(o,c,i){if(k.Assert(o.originalStart<=c.originalStart,"Left change is not less than or equal to right change"),k.Assert(o.modifiedStart<=c.modifiedStart,"Left change is not less than or equal to right change"),o.originalStart+o.originalLength>=c.originalStart||o.modifiedStart+o.modifiedLength>=c.modifiedStart){const S=o.originalStart;let s=o.originalLength;const l=o.modifiedStart;let r=o.modifiedLength;return o.originalStart+o.originalLength>=c.originalStart&&(s=c.originalStart+c.originalLength-o.originalStart),o.modifiedStart+o.modifiedLength>=c.modifiedStart&&(r=c.modifiedStart+c.modifiedLength-o.modifiedStart),i[0]=new t.DiffChange(S,s,l,r),!0}else return i[0]=null,!1}ClipDiagonalBound(o,c,i,S){if(o>=0&&o<S)return o;const s=i,l=S-i-1,r=c%2==0;if(o<0){const p=s%2==0;return r===p?0:1}else{const p=l%2==0;return r===p?S-1:S-2}}}e.LcsDiff=v});var Ot=this&&this.__classPrivateFieldSet||function(Q,e,t,f,_){if(f==="m")throw new TypeError("Private method is not writable");if(f==="a"&&!_)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?Q!==e||!_:!e.has(Q))throw new TypeError("Cannot write private member to an object whose class did not declare it");return f==="a"?_.call(Q,t):_?_.value=t:e.set(Q,t),t},dt=this&&this.__classPrivateFieldGet||function(Q,e,t,f){if(t==="a"&&!f)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?Q!==e||!f:!e.has(Q))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?f:t==="a"?f.call(Q):f?f.value:e.get(Q)};define(ne[55],re([1,0,15,29]),function(Q,e,t,f){"use strict";var _,A,k;Object.defineProperty(e,"__esModule",{value:!0}),e.ReadonlyMapView=e.LRUCache=e.LinkedMap=e.Touch=e.ResourceMap=e.TernarySearchTree=e.UriIterator=e.PathIterator=e.ConfigKeysIterator=e.StringIterator=e.setToString=e.mapToString=e.getOrSet=void 0;function D(g,d,m){let b=g.get(d);return b===void 0&&(b=m,g.set(d,b)),b}e.getOrSet=D;function I(g){const d=[];return g.forEach((m,b)=>{d.push(`${b} => ${m}`)}),`Map(${g.size}) {${d.join(", ")}}`}e.mapToString=I;function w(g){const d=[];return g.forEach(m=>{d.push(m)}),`Set(${g.size}) {${d.join(", ")}}`}e.setToString=w;class v{constructor(){this._value="",this._pos=0}reset(d){return this._value=d,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(d){const m=d.charCodeAt(0),b=this._value.charCodeAt(this._pos);return m-b}value(){return this._value[this._pos]}}e.StringIterator=v;class C{constructor(d=!0){this._caseSensitive=d}reset(d){return this._value=d,this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let d=!0;for(;this._to<this._value.length;this._to++)if(this._value.charCodeAt(this._to)===46)if(d)this._from++;else break;else d=!1;return this}cmp(d){return this._caseSensitive?(0,f.compareSubstring)(d,this._value,0,d.length,this._from,this._to):(0,f.compareSubstringIgnoreCase)(d,this._value,0,d.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}e.ConfigKeysIterator=C;class o{constructor(d=!0,m=!0){this._splitOnBackslash=d,this._caseSensitive=m}reset(d){this._from=0,this._to=0,this._value=d,this._valueLen=d.length;for(let m=d.length-1;m>=0;m--,this._valueLen--){const b=this._value.charCodeAt(m);if(!(b===47||this._splitOnBackslash&&b===92))break}return this.next()}hasNext(){return this._to<this._valueLen}next(){this._from=this._to;let d=!0;for(;this._to<this._valueLen;this._to++){const m=this._value.charCodeAt(this._to);if(m===47||this._splitOnBackslash&&m===92)if(d)this._from++;else break;else d=!1}return this}cmp(d){return this._caseSensitive?(0,f.compareSubstring)(d,this._value,0,d.length,this._from,this._to):(0,f.compareSubstringIgnoreCase)(d,this._value,0,d.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}e.PathIterator=o;var c;(function(g){g[g.Scheme=1]="Scheme",g[g.Authority=2]="Authority",g[g.Path=3]="Path",g[g.Query=4]="Query",g[g.Fragment=5]="Fragment"})(c||(c={}));class i{constructor(d){this._ignorePathCasing=d,this._states=[],this._stateIdx=0}reset(d){return this._value=d,this._states=[],this._value.scheme&&this._states.push(1),this._value.authority&&this._states.push(2),this._value.path&&(this._pathIterator=new o(!1,!this._ignorePathCasing(d)),this._pathIterator.reset(d.path),this._pathIterator.value()&&this._states.push(3)),this._value.query&&this._states.push(4),this._value.fragment&&this._states.push(5),this._stateIdx=0,this}next(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()?this._pathIterator.next():this._stateIdx+=1,this}hasNext(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()||this._stateIdx<this._states.length-1}cmp(d){if(this._states[this._stateIdx]===1)return(0,f.compareIgnoreCase)(d,this._value.scheme);if(this._states[this._stateIdx]===2)return(0,f.compareIgnoreCase)(d,this._value.authority);if(this._states[this._stateIdx]===3)return this._pathIterator.cmp(d);if(this._states[this._stateIdx]===4)return(0,f.compare)(d,this._value.query);if(this._states[this._stateIdx]===5)return(0,f.compare)(d,this._value.fragment);throw new Error}value(){if(this._states[this._stateIdx]===1)return this._value.scheme;if(this._states[this._stateIdx]===2)return this._value.authority;if(this._states[this._stateIdx]===3)return this._pathIterator.value();if(this._states[this._stateIdx]===4)return this._value.query;if(this._states[this._stateIdx]===5)return this._value.fragment;throw new Error}}e.UriIterator=i;class S{constructor(){this.height=1}isEmpty(){return!this.left&&!this.mid&&!this.right&&!this.value}rotateLeft(){const d=this.right;return this.right=d.left,d.left=this,this.updateHeight(),d.updateHeight(),d}rotateRight(){const d=this.left;return this.left=d.right,d.right=this,this.updateHeight(),d.updateHeight(),d}updateHeight(){this.height=1+Math.max(this.heightLeft,this.heightRight)}balanceFactor(){return this.heightRight-this.heightLeft}get heightLeft(){return this.left?.height??0}get heightRight(){return this.right?.height??0}}var s;(function(g){g[g.Left=-1]="Left",g[g.Mid=0]="Mid",g[g.Right=1]="Right"})(s||(s={}));class l{constructor(d){this._iter=d}static forUris(d=()=>!1){return new l(new i(d))}static forPaths(d=!1){return new l(new o(void 0,!d))}static forStrings(){return new l(new v)}static forConfigKeys(){return new l(new C)}clear(){this._root=void 0}fill(d,m){if(m){const b=m.slice(0);(0,t.shuffle)(b);for(let E of b)this.set(E,d)}else{const b=d.slice(0);(0,t.shuffle)(b);for(let E of b)this.set(E[0],E[1])}}set(d,m){const b=this._iter.reset(d);let E;this._root||(this._root=new S,this._root.segment=b.value());const y=[];for(E=this._root;;){const R=b.cmp(E.segment);if(R>0)E.left||(E.left=new S,E.left.segment=b.value()),y.push([-1,E]),E=E.left;else if(R<0)E.right||(E.right=new S,E.right.segment=b.value()),y.push([1,E]),E=E.right;else if(b.hasNext())b.next(),E.mid||(E.mid=new S,E.mid.segment=b.value()),y.push([0,E]),E=E.mid;else break}const T=E.value;E.value=m,E.key=d;for(let R=y.length-1;R>=0;R--){const O=y[R][1];O.updateHeight();const x=O.balanceFactor();if(x<-1||x>1){const F=y[R][0],L=y[R+1][0];if(F===1&&L===1)y[R][1]=O.rotateLeft();else if(F===-1&&L===-1)y[R][1]=O.rotateRight();else if(F===1&&L===-1)O.right=y[R+1][1]=y[R+1][1].rotateRight(),y[R][1]=O.rotateLeft();else if(F===-1&&L===1)O.left=y[R+1][1]=y[R+1][1].rotateLeft(),y[R][1]=O.rotateRight();else throw new Error;if(R>0)switch(y[R-1][0]){case-1:y[R-1][1].left=y[R][1];break;case 1:y[R-1][1].right=y[R][1];break;case 0:y[R-1][1].mid=y[R][1];break}else this._root=y[0][1]}}return T}get(d){return this._getNode(d)?.value}_getNode(d){const m=this._iter.reset(d);let b=this._root;for(;b;){const E=m.cmp(b.segment);if(E>0)b=b.left;else if(E<0)b=b.right;else if(m.hasNext())m.next(),b=b.mid;else break}return b}has(d){const m=this._getNode(d);return!(m?.value===void 0&&m?.mid===void 0)}delete(d){return this._delete(d,!1)}deleteSuperstr(d){return this._delete(d,!0)}_delete(d,m){const b=this._iter.reset(d),E=[];let y=this._root;for(;y;){const T=b.cmp(y.segment);if(T>0)E.push([-1,y]),y=y.left;else if(T<0)E.push([1,y]),y=y.right;else if(b.hasNext())b.next(),E.push([0,y]),y=y.mid;else break}if(!!y){if(m?(y.left=void 0,y.mid=void 0,y.right=void 0,y.height=1):(y.key=void 0,y.value=void 0),!y.mid&&!y.value)if(y.left&&y.right){const T=this._min(y.right),{key:R,value:O,segment:x}=T;this._delete(T.key,!1),y.key=R,y.value=O,y.segment=x}else{const T=y.left??y.right;if(E.length>0){const[R,O]=E[E.length-1];switch(R){case-1:O.left=T;break;case 0:O.mid=T;break;case 1:O.right=T;break}}else this._root=T}for(let T=E.length-1;T>=0;T--){const R=E[T][1];R.updateHeight();const O=R.balanceFactor();if(O>1?(R.right.balanceFactor()>=0||(R.right=R.right.rotateRight()),E[T][1]=R.rotateLeft()):O<-1&&(R.left.balanceFactor()<=0||(R.left=R.left.rotateLeft()),E[T][1]=R.rotateRight()),T>0)switch(E[T-1][0]){case-1:E[T-1][1].left=E[T][1];break;case 1:E[T-1][1].right=E[T][1];break;case 0:E[T-1][1].mid=E[T][1];break}else this._root=E[0][1]}}}_min(d){for(;d.left;)d=d.left;return d}findSubstr(d){const m=this._iter.reset(d);let b=this._root,E;for(;b;){const y=m.cmp(b.segment);if(y>0)b=b.left;else if(y<0)b=b.right;else if(m.hasNext())m.next(),E=b.value||E,b=b.mid;else break}return b&&b.value||E}findSuperstr(d){const m=this._iter.reset(d);let b=this._root;for(;b;){const E=m.cmp(b.segment);if(E>0)b=b.left;else if(E<0)b=b.right;else if(m.hasNext())m.next(),b=b.mid;else return b.mid?this._entries(b.mid):void 0}}forEach(d){for(const[m,b]of this)d(b,m)}*[Symbol.iterator](){yield*this._entries(this._root)}*_entries(d){!d||(d.left&&(yield*this._entries(d.left)),d.value&&(yield[d.key,d.value]),d.mid&&(yield*this._entries(d.mid)),d.right&&(yield*this._entries(d.right)))}_isBalanced(){const d=m=>{if(!m)return!0;const b=m.balanceFactor();return b<-1||b>1?!1:d(m.left)&&d(m.right)};return d(this._root)}}e.TernarySearchTree=l;class r{constructor(d,m){this.uri=d,this.value=m}}class p{constructor(d,m){this[_]="ResourceMap",d instanceof p?(this.map=new Map(d.map),this.toKey=m??p.defaultToKey):(this.map=new Map,this.toKey=d??p.defaultToKey)}set(d,m){return this.map.set(this.toKey(d),new r(d,m)),this}get(d){return this.map.get(this.toKey(d))?.value}has(d){return this.map.has(this.toKey(d))}get size(){return this.map.size}clear(){this.map.clear()}delete(d){return this.map.delete(this.toKey(d))}forEach(d,m){typeof m!="undefined"&&(d=d.bind(m));for(let[b,E]of this.map)d(E.value,E.uri,this)}*values(){for(let d of this.map.values())yield d.value}*keys(){for(let d of this.map.values())yield d.uri}*entries(){for(let d of this.map.values())yield[d.uri,d.value]}*[(_=Symbol.toStringTag,Symbol.iterator)](){for(let[,d]of this.map)yield[d.uri,d.value]}}e.ResourceMap=p,p.defaultToKey=g=>g.toString();var u;(function(g){g[g.None=0]="None",g[g.AsOld=1]="AsOld",g[g.AsNew=2]="AsNew"})(u=e.Touch||(e.Touch={}));class a{constructor(){this[A]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(d){return this._map.has(d)}get(d,m=0){const b=this._map.get(d);if(!!b)return m!==0&&this.touch(b,m),b.value}set(d,m,b=0){let E=this._map.get(d);if(E)E.value=m,b!==0&&this.touch(E,b);else{switch(E={key:d,value:m,next:void 0,previous:void 0},b){case 0:this.addItemLast(E);break;case 1:this.addItemFirst(E);break;case 2:this.addItemLast(E);break;default:this.addItemLast(E);break}this._map.set(d,E),this._size++}return this}delete(d){return!!this.remove(d)}remove(d){const m=this._map.get(d);if(!!m)return this._map.delete(d),this.removeItem(m),this._size--,m.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const d=this._head;return this._map.delete(d.key),this.removeItem(d),this._size--,d.value}forEach(d,m){const b=this._state;let E=this._head;for(;E;){if(m?d.bind(m)(E.value,E.key,this):d(E.value,E.key,this),this._state!==b)throw new Error("LinkedMap got modified during iteration.");E=E.next}}keys(){const d=this,m=this._state;let b=this._head;const E={[Symbol.iterator](){return E},next(){if(d._state!==m)throw new Error("LinkedMap got modified during iteration.");if(b){const y={value:b.key,done:!1};return b=b.next,y}else return{value:void 0,done:!0}}};return E}values(){const d=this,m=this._state;let b=this._head;const E={[Symbol.iterator](){return E},next(){if(d._state!==m)throw new Error("LinkedMap got modified during iteration.");if(b){const y={value:b.value,done:!1};return b=b.next,y}else return{value:void 0,done:!0}}};return E}entries(){const d=this,m=this._state;let b=this._head;const E={[Symbol.iterator](){return E},next(){if(d._state!==m)throw new Error("LinkedMap got modified during iteration.");if(b){const y={value:[b.key,b.value],done:!1};return b=b.next,y}else return{value:void 0,done:!0}}};return E}[(A=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(d){if(d>=this.size)return;if(d===0){this.clear();return}let m=this._head,b=this.size;for(;m&&b>d;)this._map.delete(m.key),m=m.next,b--;this._head=m,this._size=b,m&&(m.previous=void 0),this._state++}addItemFirst(d){if(!this._head&&!this._tail)this._tail=d;else if(this._head)d.next=this._head,this._head.previous=d;else throw new Error("Invalid list");this._head=d,this._state++}addItemLast(d){if(!this._head&&!this._tail)this._head=d;else if(this._tail)d.previous=this._tail,this._tail.next=d;else throw new Error("Invalid list");this._tail=d,this._state++}removeItem(d){if(d===this._head&&d===this._tail)this._head=void 0,this._tail=void 0;else if(d===this._head){if(!d.next)throw new Error("Invalid list");d.next.previous=void 0,this._head=d.next}else if(d===this._tail){if(!d.previous)throw new Error("Invalid list");d.previous.next=void 0,this._tail=d.previous}else{const m=d.next,b=d.previous;if(!m||!b)throw new Error("Invalid list");m.previous=b,b.next=m}d.next=void 0,d.previous=void 0,this._state++}touch(d,m){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(m!==1&&m!==2)){if(m===1){if(d===this._head)return;const b=d.next,E=d.previous;d===this._tail?(E.next=void 0,this._tail=E):(b.previous=E,E.next=b),d.previous=void 0,d.next=this._head,this._head.previous=d,this._head=d,this._state++}else if(m===2){if(d===this._tail)return;const b=d.next,E=d.previous;d===this._head?(b.previous=void 0,this._head=b):(b.previous=E,E.next=b),d.next=void 0,d.previous=this._tail,this._tail.next=d,this._tail=d,this._state++}}}toJSON(){const d=[];return this.forEach((m,b)=>{d.push([b,m])}),d}fromJSON(d){this.clear();for(const[m,b]of d)this.set(m,b)}}e.LinkedMap=a;class n extends a{constructor(d,m=1){super();this._limit=d,this._ratio=Math.min(Math.max(0,m),1)}get limit(){return this._limit}set limit(d){this._limit=d,this.checkTrim()}get ratio(){return this._ratio}set ratio(d){this._ratio=Math.min(Math.max(0,d),1),this.checkTrim()}get(d,m=2){return super.get(d,m)}peek(d){return super.get(d,0)}set(d,m){return super.set(d,m,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}e.LRUCache=n;class h{constructor(d){k.set(this,void 0),Ot(this,k,d,"f")}get size(){return dt(this,k,"f").size}forEach(d,m){dt(this,k,"f").forEach(d,m)}get(d){return dt(this,k,"f").get(d)}has(d){return dt(this,k,"f").has(d)}entries(){return dt(this,k,"f").entries()}keys(){return dt(this,k,"f").keys()}values(){return dt(this,k,"f").values()}[(k=new WeakMap,Symbol.iterator)](){return dt(this,k,"f").entries()}}e.ReadonlyMapView=h}),define(ne[102],re([1,0,55,29]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fuzzyScoreGraceful=e.fuzzyScoreGracefulAggressive=e.fuzzyScore=e.FuzzyScore=e.isPatternInWord=e.createMatches=e.anyScore=e.matchesFuzzy2=e.matchesFuzzy=e.matchesWords=e.matchesCamelCase=e.isUpper=e.matchesSubString=e.matchesContiguousSubString=e.matchesPrefix=e.matchesStrictPrefix=e.or=void 0;function _(...ae){return function(ue,oe){for(let fe=0,pe=ae.length;fe<pe;fe++){const me=ae[fe](ue,oe);if(me)return me}return null}}e.or=_,e.matchesStrictPrefix=A.bind(void 0,!1),e.matchesPrefix=A.bind(void 0,!0);function A(ae,ue,oe){if(!oe||oe.length<ue.length)return null;let fe;return ae?fe=f.startsWithIgnoreCase(oe,ue):fe=oe.indexOf(ue)===0,fe?ue.length>0?[{start:0,end:ue.length}]:[]:null}function k(ae,ue){const oe=ue.toLowerCase().indexOf(ae.toLowerCase());return oe===-1?null:[{start:oe,end:oe+ae.length}]}e.matchesContiguousSubString=k;function D(ae,ue){return I(ae.toLowerCase(),ue.toLowerCase(),0,0)}e.matchesSubString=D;function I(ae,ue,oe,fe){if(oe===ae.length)return[];if(fe===ue.length)return null;if(ae[oe]===ue[fe]){let pe=null;return(pe=I(ae,ue,oe+1,fe+1))?l({start:fe,end:fe+1},pe):null}return I(ae,ue,oe,fe+1)}function w(ae){return 97<=ae&&ae<=122}function v(ae){return 65<=ae&&ae<=90}e.isUpper=v;function C(ae){return 48<=ae&&ae<=57}function o(ae){return ae===32||ae===9||ae===10||ae===13}const c=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(ae=>c.add(ae.charCodeAt(0)));function i(ae){return o(ae)||c.has(ae)}function S(ae,ue){return ae===ue||i(ae)&&i(ue)}function s(ae){return w(ae)||v(ae)||C(ae)}function l(ae,ue){return ue.length===0?ue=[ae]:ae.end===ue[0].start?ue[0].start=ae.start:ue.unshift(ae),ue}function r(ae,ue){for(let oe=ue;oe<ae.length;oe++){const fe=ae.charCodeAt(oe);if(v(fe)||C(fe)||oe>0&&!s(ae.charCodeAt(oe-1)))return oe}return ae.length}function p(ae,ue,oe,fe){if(oe===ae.length)return[];if(fe===ue.length)return null;if(ae[oe]!==ue[fe].toLowerCase())return null;{let pe=null,me=fe+1;for(pe=p(ae,ue,oe+1,fe+1);!pe&&(me=r(ue,me))<ue.length;)pe=p(ae,ue,oe+1,me),me++;return pe===null?null:l({start:fe,end:fe+1},pe)}}function u(ae){let ue=0,oe=0,fe=0,pe=0,me=0;for(let ge=0;ge<ae.length;ge++)me=ae.charCodeAt(ge),v(me)&&ue++,w(me)&&oe++,s(me)&&fe++,C(me)&&pe++;const be=ue/ae.length,Ce=oe/ae.length,ve=fe/ae.length,he=pe/ae.length;return{upperPercent:be,lowerPercent:Ce,alphaPercent:ve,numericPercent:he}}function a(ae){const{upperPercent:ue,lowerPercent:oe}=ae;return oe===0&&ue>.6}function n(ae){const{upperPercent:ue,lowerPercent:oe,alphaPercent:fe,numericPercent:pe}=ae;return oe>.2&&ue<.8&&fe>.6&&pe<.2}function h(ae){let ue=0,oe=0,fe=0,pe=0;for(let me=0;me<ae.length;me++)fe=ae.charCodeAt(me),v(fe)&&ue++,w(fe)&&oe++,o(fe)&&pe++;return(ue===0||oe===0)&&pe===0?ae.length<=30:ue<=5}function g(ae,ue){if(!ue||(ue=ue.trim(),ue.length===0)||!h(ae)||ue.length>60)return null;const oe=u(ue);if(!n(oe)){if(!a(oe))return null;ue=ue.toLowerCase()}let fe=null,pe=0;for(ae=ae.toLowerCase();pe<ue.length&&(fe=p(ae,ue,0,pe))===null;)pe=r(ue,pe+1);return fe}e.matchesCamelCase=g;function d(ae,ue,oe=!1){if(!ue||ue.length===0)return null;let fe=null,pe=0;for(ae=ae.toLowerCase(),ue=ue.toLowerCase();pe<ue.length&&(fe=m(ae,ue,0,pe,oe))===null;)pe=b(ue,pe+1);return fe}e.matchesWords=d;function m(ae,ue,oe,fe,pe){if(oe===ae.length)return[];if(fe===ue.length)return null;if(S(ae.charCodeAt(oe),ue.charCodeAt(fe))){let me=null,be=fe+1;if(me=m(ae,ue,oe+1,fe+1,pe),!pe)for(;!me&&(be=b(ue,be))<ue.length;)me=m(ae,ue,oe+1,be,pe),be++;return me===null?null:l({start:fe,end:fe+1},me)}else return null}function b(ae,ue){for(let oe=ue;oe<ae.length;oe++)if(i(ae.charCodeAt(oe))||oe>0&&i(ae.charCodeAt(oe-1)))return oe;return ae.length}const E=_(e.matchesPrefix,g,k),y=_(e.matchesPrefix,g,D),T=new t.LRUCache(1e4);function R(ae,ue,oe=!1){if(typeof ae!="string"||typeof ue!="string")return null;let fe=T.get(ae);fe||(fe=new RegExp(f.convertSimple2RegExpPattern(ae),"i"),T.set(ae,fe));const pe=fe.exec(ue);return pe?[{start:pe.index,end:pe.index+pe[0].length}]:oe?y(ae,ue):E(ae,ue)}e.matchesFuzzy=R;function O(ae,ue){const oe=J(ae,ae.toLowerCase(),0,ue,ue.toLowerCase(),0,!0);return oe?F(oe):null}e.matchesFuzzy2=O;function x(ae,ue,oe,fe,pe,me){const be=Math.min(13,ae.length);for(;oe<be;oe++){const Ce=J(ae,ue,oe,fe,pe,me,!1);if(Ce)return Ce}return[0,me]}e.anyScore=x;function F(ae){if(typeof ae=="undefined")return[];const ue=[],oe=ae[1];for(let fe=ae.length-1;fe>1;fe--){const pe=ae[fe]+oe,me=ue[ue.length-1];me&&me.end===pe?me.end=pe+1:ue.push({start:pe,end:pe+1})}return ue}e.createMatches=F;const L=128;function M(){const ae=[],ue=[];for(let oe=0;oe<=L;oe++)ue[oe]=0;for(let oe=0;oe<=L;oe++)ae.push(ue.slice(0));return ae}function N(ae){const ue=[];for(let oe=0;oe<=ae;oe++)ue[oe]=0;return ue}const B=N(2*L),P=N(2*L),V=M(),z=M(),U=M(),H=!1;function K(ae,ue,oe,fe,pe){function me(Ce,ve,he=" "){for(;Ce.length<ve;)Ce=he+Ce;return Ce}let be=` | |${fe.split("").map(Ce=>me(Ce,3)).join("|")} `;for(let Ce=0;Ce<=oe;Ce++)Ce===0?be+=" |":be+=`${ue[Ce-1]}|`,be+=ae[Ce].slice(0,pe+1).map(ve=>me(ve.toString(),3)).join("|")+` `;return be}function G(ae,ue,oe,fe){ae=ae.substr(ue),oe=oe.substr(fe),console.log(K(z,ae,ae.length,oe,oe.length)),console.log(K(U,ae,ae.length,oe,oe.length)),console.log(K(V,ae,ae.length,oe,oe.length))}function q(ae,ue){if(ue<0||ue>=ae.length)return!1;const oe=ae.codePointAt(ue);switch(oe){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 40:case 91:return!0;case void 0:return!1;default:return!!f.isEmojiImprecise(oe)}}function Z(ae,ue){if(ue<0||ue>=ae.length)return!1;switch(ae.charCodeAt(ue)){case 32:case 9:return!0;default:return!1}}function j(ae,ue,oe){return ue[ae]!==oe[ae]}function X(ae,ue,oe,fe,pe,me,be=!1){for(;ue<oe&&pe<me;)ae[ue]===fe[pe]&&(be&&(B[ue]=pe),ue+=1),pe+=1;return ue===oe}e.isPatternInWord=X;var Y;(function(ae){ae[ae.Diag=1]="Diag",ae[ae.Left=2]="Left",ae[ae.LeftLeft=3]="LeftLeft"})(Y||(Y={}));var $;(function(ae){ae.Default=[-100,0];function ue(oe){return!oe||oe.length===2&&oe[0]===-100&&oe[1]===0}ae.isDefault=ue})($=e.FuzzyScore||(e.FuzzyScore={}));function J(ae,ue,oe,fe,pe,me,be){const Ce=ae.length>L?L:ae.length,ve=fe.length>L?L:fe.length;if(oe>=Ce||me>=ve||Ce-oe>ve-me||!X(ue,oe,Ce,pe,me,ve,!0))return;ee(Ce,ve,oe,me,ue,pe);let he=1,ge=1,de=oe,Se=me;const we=[!1];for(he=1,de=oe;de<Ce;he++,de++){const De=B[de],_e=P[de],Re=de+1<Ce?P[de+1]:ve;for(ge=De-me+1,Se=De;Se<Re;ge++,Se++){let Ne=Number.MIN_SAFE_INTEGER,xe=!1;Se<=_e&&(Ne=te(ae,ue,de,oe,fe,pe,Se,ve,me,V[he-1][ge-1]===0,we));let Ae=0;Ne!==Number.MAX_SAFE_INTEGER&&(xe=!0,Ae=Ne+z[he-1][ge-1]);const Le=Se>De,Me=Le?z[he][ge-1]+(V[he][ge-1]>0?-5:0):0,We=Se>De+1&&V[he][ge-1]>0,Ve=We?z[he][ge-2]+(V[he][ge-2]>0?-5:0):0;if(We&&(!Le||Ve>=Me)&&(!xe||Ve>=Ae))z[he][ge]=Ve,U[he][ge]=3,V[he][ge]=0;else if(Le&&(!xe||Me>=Ae))z[he][ge]=Me,U[he][ge]=2,V[he][ge]=0;else if(xe)z[he][ge]=Ae,U[he][ge]=1,V[he][ge]=V[he-1][ge-1]+1;else throw new Error("not possible")}}if(H&&G(ae,oe,fe,me),!we[0]&&!be)return;he--,ge--;const ye=[z[he][ge],me];let ke=0,Ie=0;for(;he>=1;){let De=ge;do{const _e=U[he][De];if(_e===3)De=De-2;else if(_e===2)De=De-1;else break}while(De>=1);ke>1&&ue[oe+he-1]===pe[me+ge-1]&&!j(De+me-1,fe,pe)&&ke+1>V[he][De]&&(De=ge),De===ge?ke++:ke=1,Ie||(Ie=De),he--,ge=De-1,ye.push(ge)}ve===Ce&&(ye[0]+=2);const Te=Ie-Ce;return ye[0]-=Te,ye}e.fuzzyScore=J;function ee(ae,ue,oe,fe,pe,me){let be=ae-1,Ce=ue-1;for(;be>=oe&&Ce>=fe;)pe[be]===me[Ce]&&(P[be]=Ce,be--),Ce--}function te(ae,ue,oe,fe,pe,me,be,Ce,ve,he,ge){if(ue[oe]!==me[be])return Number.MIN_SAFE_INTEGER;let de=1,Se=!1;return be===oe-fe?de=ae[oe]===pe[be]?7:5:j(be,pe,me)&&(be===0||!j(be-1,pe,me))?(de=ae[oe]===pe[be]?7:5,Se=!0):q(me,be)&&(be===0||!q(me,be-1))?de=5:(q(me,be-1)||Z(me,be-1))&&(de=5,Se=!0),de>1&&oe===fe&&(ge[0]=!0),Se||(Se=j(be,pe,me)||q(me,be-1)||Z(me,be-1)),oe===fe?be>ve&&(de-=Se?3:5):he?de+=Se?2:0:de+=Se?0:1,be+1===Ce&&(de-=Se?3:5),de}function se(ae,ue,oe,fe,pe,me,be){return ce(ae,ue,oe,fe,pe,me,!0,be)}e.fuzzyScoreGracefulAggressive=se;function ie(ae,ue,oe,fe,pe,me,be){return ce(ae,ue,oe,fe,pe,me,!1,be)}e.fuzzyScoreGraceful=ie;function ce(ae,ue,oe,fe,pe,me,be,Ce){let ve=J(ae,ue,oe,fe,pe,me,Ce);if(ve&&!be)return ve;if(ae.length>=3){const he=Math.min(7,ae.length-1);for(let ge=oe+1;ge<he;ge++){const de=le(ae,ge);if(de){const Se=J(de,de.toLowerCase(),oe,fe,pe,me,Ce);Se&&(Se[0]-=3,(!ve||Se[0]>ve[0])&&(ve=Se))}}}return ve}function le(ae,ue){if(ue+1>=ae.length)return;const oe=ae[ue],fe=ae[ue+1];if(oe!==fe)return ae.slice(0,ue)+fe+oe+ae.slice(ue+2)}}),define(ne[225],re([1,0,33,102,29]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.matchesFuzzyIconAware=e.parseLabelWithIcons=e.stripIcons=e.markdownEscapeEscapedIcons=e.escapeIcons=e.iconStartMarker=void 0,e.iconStartMarker="$(";const A=new RegExp(`\\$\\(${t.CSSIcon.iconNameExpression}(?:${t.CSSIcon.iconModifierExpression})?\\)`,"g"),k=new RegExp(t.CSSIcon.iconNameCharacter),D=new RegExp(`(\\\\)?${A.source}`,"g");function I(s){return s.replace(D,(l,r)=>r?l:`\\${l}`)}e.escapeIcons=I;const w=new RegExp(`\\\\${A.source}`,"g");function v(s){return s.replace(w,l=>`\\${l}`)}e.markdownEscapeEscapedIcons=v;const C=new RegExp(`(\\s)?(\\\\)?${A.source}(\\s)?`,"g");function o(s){return s.indexOf(e.iconStartMarker)===-1?s:s.replace(C,(l,r,p,u)=>p?l:r||u||"")}e.stripIcons=o;function c(s){const l=s.indexOf(e.iconStartMarker);return l===-1?{text:s}:i(s,l)}e.parseLabelWithIcons=c;function i(s,l){const r=[];let p="";function u(E){if(E){p+=E;for(const y of E)r.push(h)}}let a=-1,n="",h=0,g,d,m=l;const b=s.length;for(u(s.substr(0,l));m<b;)g=s[m],d=s[m+1],g===e.iconStartMarker[0]&&d===e.iconStartMarker[1]?(a=m,u(n),n=e.iconStartMarker,m++):g===")"&&a!==-1?(h+=m-a+1,a=-1,n=""):a!==-1?k.test(g)?n+=g:(u(n),a=-1,n=""):u(g),m++;return u(n),{text:p,iconOffsets:r}}function S(s,l,r=!1){const{text:p,iconOffsets:u}=l;if(!u||u.length===0)return(0,f.matchesFuzzy)(s,p,r);const a=(0,_.ltrim)(p," "),n=p.length-a.length,h=(0,f.matchesFuzzy)(s,a,r);if(h)for(const g of h){const d=u[g.start+n]+n;g.start+=d,g.end+=d}return h}e.matchesFuzzyIconAware=S}),define(ne[960],re([1,0,55]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeAccents=e.normalizeNFD=e.normalizeNFC=void 0;const f=new t.LRUCache(1e4);function _(w){return I(w,"NFC",f)}e.normalizeNFC=_;const A=new t.LRUCache(1e4);function k(w){return I(w,"NFD",A)}e.normalizeNFD=k;const D=/[^\u0000-\u0080]/;function I(w,v,C){if(!w)return w;const o=C.get(w);if(o)return o;let c;return D.test(w)?c=w.normalize(v):c=w,C.set(w,c),c}e.removeAccents=function(){const w=/[\u0300-\u036f]/g;return function(v){return k(v).replace(w,"")}}()}),define(ne[650],re([1,0,29]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.buildReplaceStringWithCasePreserved=void 0;function f(k,D){if(k&&k[0]!==""){const I=_(k,D,"-"),w=_(k,D,"_");return I&&!w?A(k,D,"-"):!I&&w?A(k,D,"_"):k[0].toUpperCase()===k[0]?D.toUpperCase():k[0].toLowerCase()===k[0]?D.toLowerCase():t.containsUppercaseCharacter(k[0][0])&&D.length>0?D[0].toUpperCase()+D.substr(1):k[0][0].toUpperCase()!==k[0][0]&&D.length>0?D[0].toLowerCase()+D.substr(1):D}else return D}e.buildReplaceStringWithCasePreserved=f;function _(k,D,I){return k[0].indexOf(I)!==-1&&D.indexOf(I)!==-1&&k[0].split(I).length===D.split(I).length}function A(k,D,I){const w=D.split(I),v=k[0].split(I);let C="";return w.forEach((o,c)=>{C+=f([v[c]],o)+I}),C.slice(0,-1)}}),define(ne[81],re([1,0,29]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var f;(function(_){_[_.Ignore=0]="Ignore",_[_.Info=1]="Info",_[_.Warning=2]="Warning",_[_.Error=3]="Error"})(f||(f={})),function(_){const A="error",k="warning",D="warn",I="info",w="ignore";function v(o){return o?t.equalsIgnoreCase(A,o)?_.Error:t.equalsIgnoreCase(k,o)||t.equalsIgnoreCase(D,o)?_.Warning:t.equalsIgnoreCase(I,o)?_.Info:_.Ignore:_.Ignore}_.fromValue=v;function C(o){switch(o){case _.Error:return A;case _.Warning:return k;case _.Info:return I;default:return w}}_.toString=C}(f||(f={})),e.default=f}),define(ne[13],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assertNever=e.withUndefinedAsNull=e.withNullAsUndefined=e.createProxyObject=e.getAllMethodNames=e.getAllPropertyNames=e.validateConstraint=e.validateConstraints=e.areFunctions=e.isFunction=e.isEmptyObject=e.assertAllDefined=e.assertIsDefined=e.assertType=e.isUndefinedOrNull=e.isDefined=e.isUndefined=e.isBoolean=e.isIterable=e.isNumber=e.isTypedArray=e.isObject=e.isStringArray=e.isString=e.isArray=void 0;function t(E){return Array.isArray(E)}e.isArray=t;function f(E){return typeof E=="string"}e.isString=f;function _(E){return Array.isArray(E)&&E.every(y=>f(y))}e.isStringArray=_;function A(E){return typeof E=="object"&&E!==null&&!Array.isArray(E)&&!(E instanceof RegExp)&&!(E instanceof Date)}e.isObject=A;function k(E){return typeof E=="object"&&(E instanceof Uint8Array||E instanceof Uint16Array||E instanceof Uint32Array||E instanceof Float32Array||E instanceof Float64Array||E instanceof Int8Array||E instanceof Int16Array||E instanceof Int32Array||E instanceof BigInt64Array||E instanceof BigUint64Array||E instanceof Uint8ClampedArray)}e.isTypedArray=k;function D(E){return typeof E=="number"&&!isNaN(E)}e.isNumber=D;function I(E){return!!E&&typeof E[Symbol.iterator]=="function"}e.isIterable=I;function w(E){return E===!0||E===!1}e.isBoolean=w;function v(E){return typeof E=="undefined"}e.isUndefined=v;function C(E){return!o(E)}e.isDefined=C;function o(E){return v(E)||E===null}e.isUndefinedOrNull=o;function c(E,y){if(!E)throw new Error(y?`Unexpected type, expected '${y}'`:"Unexpected type")}e.assertType=c;function i(E){if(o(E))throw new Error("Assertion Failed: argument is undefined or null");return E}e.assertIsDefined=i;function S(...E){const y=[];for(let T=0;T<E.length;T++){const R=E[T];if(o(R))throw new Error(`Assertion Failed: argument at index ${T} is undefined or null`);y.push(R)}return y}e.assertAllDefined=S;const s=Object.prototype.hasOwnProperty;function l(E){if(!A(E))return!1;for(let y in E)if(s.call(E,y))return!1;return!0}e.isEmptyObject=l;function r(E){return typeof E=="function"}e.isFunction=r;function p(...E){return E.length>0&&E.every(r)}e.areFunctions=p;function u(E,y){const T=Math.min(E.length,y.length);for(let R=0;R<T;R++)a(E[R],y[R])}e.validateConstraints=u;function a(E,y){if(f(y)){if(typeof E!==y)throw new Error(`argument does not match constraint: typeof ${y}`)}else if(r(y)){try{if(E instanceof y)return}catch{}if(!o(E)&&E.constructor===y||y.length===1&&y.call(void 0,E)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}e.validateConstraint=a;function n(E){let y=[],T=Object.getPrototypeOf(E);for(;Object.prototype!==T;)y=y.concat(Object.getOwnPropertyNames(T)),T=Object.getPrototypeOf(T);return y}e.getAllPropertyNames=n;function h(E){const y=[];for(const T of n(E))typeof E[T]=="function"&&y.push(T);return y}e.getAllMethodNames=h;function g(E,y){const T=O=>function(){const x=Array.prototype.slice.call(arguments,0);return y(O,x)};let R={};for(const O of E)R[O]=T(O);return R}e.createProxyObject=g;function d(E){return E===null?void 0:E}e.withNullAsUndefined=d;function m(E){return typeof E=="undefined"?null:E}e.withUndefinedAsNull=m;function b(E,y="Unreachable"){throw new Error(y)}e.assertNever=b}),define(ne[157],re([1,0,48,14,29,13]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.randomPath=e.parseLineAndColumnAware=e.indexOfPath=e.getDriveLetter=e.hasDriveLetter=e.isRootOrDriveLetter=e.sanitizeFilePath=e.isWindowsDriveLetter=e.isEqualOrParent=e.isEqual=e.isValidBasename=e.isUNC=e.getRoot=e.toPosixPath=e.toSlashes=e.isPathSeparator=void 0;function k(m){return m===47||m===92}e.isPathSeparator=k;function D(m){return m.replace(/[\\/]/g,t.posix.sep)}e.toSlashes=D;function I(m){return m.indexOf("/")===-1&&(m=D(m)),/^[a-zA-Z]:(\/|$)/.test(m)&&(m="/"+m),m}e.toPosixPath=I;function w(m,b=t.posix.sep){if(!m)return"";const E=m.length,y=m.charCodeAt(0);if(k(y)){if(k(m.charCodeAt(1))&&!k(m.charCodeAt(2))){let R=3;const O=R;for(;R<E&&!k(m.charCodeAt(R));R++);if(O!==R&&!k(m.charCodeAt(R+1))){for(R+=1;R<E;R++)if(k(m.charCodeAt(R)))return m.slice(0,R+1).replace(/[\\/]/g,b)}}return b}else if(l(y)&&m.charCodeAt(1)===58)return k(m.charCodeAt(2))?m.slice(0,2)+b:m.slice(0,2);let T=m.indexOf("://");if(T!==-1){for(T+=3;T<E;T++)if(k(m.charCodeAt(T)))return m.slice(0,T+1)}return""}e.getRoot=w;function v(m){if(!f.isWindows||!m||m.length<5)return!1;let b=m.charCodeAt(0);if(b!==92||(b=m.charCodeAt(1),b!==92))return!1;let E=2;const y=E;for(;E<m.length&&(b=m.charCodeAt(E),b!==92);E++);return!(y===E||(b=m.charCodeAt(E+1),isNaN(b)||b===92))}e.isUNC=v;const C=/[\\/:\*\?"<>\|]/g,o=/[\\/]/g,c=/^(con|prn|aux|clock\$|nul|lpt[0-9]|com[0-9])(\.(.*?))?$/i;function i(m,b=f.isWindows){const E=b?C:o;return!(!m||m.length===0||/^\s+$/.test(m)||(E.lastIndex=0,E.test(m))||b&&c.test(m)||m==="."||m===".."||b&&m[m.length-1]==="."||b&&m.length!==m.trim().length||m.length>255)}e.isValidBasename=i;function S(m,b,E){const y=m===b;return!E||y?y:!m||!b?!1:(0,_.equalsIgnoreCase)(m,b)}e.isEqual=S;function s(m,b,E,y=t.sep){if(m===b)return!0;if(!m||!b||b.length>m.length)return!1;if(E){if(!(0,_.startsWithIgnoreCase)(m,b))return!1;if(b.length===m.length)return!0;let R=b.length;return b.charAt(b.length-1)===y&&R--,m.charAt(R)===y}return b.charAt(b.length-1)!==y&&(b+=y),m.indexOf(b)===0}e.isEqualOrParent=s;function l(m){return m>=65&&m<=90||m>=97&&m<=122}e.isWindowsDriveLetter=l;function r(m,b){return f.isWindows&&m.endsWith(":")&&(m+=t.sep),(0,t.isAbsolute)(m)||(m=(0,t.join)(b,m)),m=(0,t.normalize)(m),f.isWindows?(m=(0,_.rtrim)(m,t.sep),m.endsWith(":")&&(m+=t.sep)):(m=(0,_.rtrim)(m,t.sep),m||(m=t.sep)),m}e.sanitizeFilePath=r;function p(m){const b=(0,t.normalize)(m);return f.isWindows?m.length>3?!1:u(b)&&(m.length===2||b.charCodeAt(2)===92):b===t.posix.sep}e.isRootOrDriveLetter=p;function u(m,b){return(b!==void 0?b:f.isWindows)?l(m.charCodeAt(0))&&m.charCodeAt(1)===58:!1}e.hasDriveLetter=u;function a(m){return u(m)?m[0]:void 0}e.getDriveLetter=a;function n(m,b,E){return b.length>m.length?-1:m===b?0:(E&&(m=m.toLowerCase(),b=b.toLowerCase()),m.indexOf(b))}e.indexOfPath=n;function h(m){const b=m.split(":");let E,y,T;for(const R of b){const O=Number(R);(0,A.isNumber)(O)?y===void 0?y=O:T===void 0&&(T=O):E=E?[E,R].join(":"):R}if(!E)throw new Error("Format for `--goto` should be: `FILE:LINE(:COLUMN)`");return{path:E,line:y!==void 0?y:void 0,column:T!==void 0?T:y!==void 0?1:void 0}}e.parseLineAndColumnAware=h;const g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";function d(m,b,E=8){let y="";for(let R=0;R<E;R++)y+=g.charAt(Math.floor(Math.random()*g.length));let T;return b?T=`${b}-${y}`:T=y,m?(0,t.join)(m,T):T}e.randomPath=d}),define(ne[51],re([1,0,13]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.filter=e.getCaseInsensitive=e.distinct=e.getOrDefault=e.safeStringify=e.equals=e.mixin=e.cloneAndChange=e.deepFreeze=e.deepClone=void 0;function f(S){if(!S||typeof S!="object"||S instanceof RegExp)return S;const s=Array.isArray(S)?[]:{};return Object.keys(S).forEach(l=>{S[l]&&typeof S[l]=="object"?s[l]=f(S[l]):s[l]=S[l]}),s}e.deepClone=f;function _(S){if(!S||typeof S!="object")return S;const s=[S];for(;s.length>0;){const l=s.shift();Object.freeze(l);for(const r in l)if(A.call(l,r)){const p=l[r];typeof p=="object"&&!Object.isFrozen(p)&&!(0,t.isTypedArray)(p)&&s.push(p)}}return S}e.deepFreeze=_;const A=Object.prototype.hasOwnProperty;function k(S,s){return D(S,s,new Set)}e.cloneAndChange=k;function D(S,s,l){if((0,t.isUndefinedOrNull)(S))return S;const r=s(S);if(typeof r!="undefined")return r;if((0,t.isArray)(S)){const p=[];for(const u of S)p.push(D(u,s,l));return p}if((0,t.isObject)(S)){if(l.has(S))throw new Error("Cannot clone recursive data-structure");l.add(S);const p={};for(let u in S)A.call(S,u)&&(p[u]=D(S[u],s,l));return l.delete(S),p}return S}function I(S,s,l=!0){return(0,t.isObject)(S)?((0,t.isObject)(s)&&Object.keys(s).forEach(r=>{r in S?l&&((0,t.isObject)(S[r])&&(0,t.isObject)(s[r])?I(S[r],s[r],l):S[r]=s[r]):S[r]=s[r]}),S):s}e.mixin=I;function w(S,s){if(S===s)return!0;if(S==null||s===null||s===void 0||typeof S!=typeof s||typeof S!="object"||Array.isArray(S)!==Array.isArray(s))return!1;let l,r;if(Array.isArray(S)){if(S.length!==s.length)return!1;for(l=0;l<S.length;l++)if(!w(S[l],s[l]))return!1}else{const p=[];for(r in S)p.push(r);p.sort();const u=[];for(r in s)u.push(r);if(u.sort(),!w(p,u))return!1;for(l=0;l<p.length;l++)if(!w(S[p[l]],s[p[l]]))return!1}return!0}e.equals=w;function v(S){const s=new Set;return JSON.stringify(S,(l,r)=>{if((0,t.isObject)(r)||Array.isArray(r)){if(s.has(r))return"[Circular]";s.add(r)}return r})}e.safeStringify=v;function C(S,s,l){const r=s(S);return typeof r=="undefined"?l:r}e.getOrDefault=C;function o(S,s){const l=Object.create(null);return!S||!s||Object.keys(s).forEach(p=>{const u=S[p],a=s[p];w(u,a)||(l[p]=a)}),l}e.distinct=o;function c(S,s){const l=s.toLowerCase(),r=Object.keys(S).find(p=>p.toLowerCase()===l);return r?S[r]:S[s]}e.getCaseInsensitive=c;function i(S,s){const l=Object.create(null);for(const[r,p]of Object.entries(S))s(r,p)&&(l[r]=p);return l}e.filter=i}),define(ne[651],re([1,0,15,30,22,13]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mapPager=e.DelayedPagedModel=e.PagedModel=e.singlePagePager=void 0;function k(C){return{isResolved:!!C,promise:null,cts:null,promiseIndexes:new Set,elements:C||[]}}function D(C){return{firstPage:C,total:C.length,pageSize:C.length,getPage:(o,c)=>Promise.resolve(C)}}e.singlePagePager=D;class I{constructor(o){this.pages=[],this.pager=(0,A.isArray)(o)?D(o):o;const c=Math.ceil(this.pager.total/this.pager.pageSize);this.pages=[k(this.pager.firstPage.slice()),...(0,t.range)(c-1).map(()=>k())]}get length(){return this.pager.total}isResolved(o){const c=Math.floor(o/this.pager.pageSize);return!!this.pages[c].isResolved}get(o){const c=Math.floor(o/this.pager.pageSize),i=o%this.pager.pageSize;return this.pages[c].elements[i]}resolve(o,c){if(c.isCancellationRequested)return Promise.reject((0,_.canceled)());const i=Math.floor(o/this.pager.pageSize),S=o%this.pager.pageSize,s=this.pages[i];return s.isResolved?Promise.resolve(s.elements[S]):(s.promise||(s.cts=new f.CancellationTokenSource,s.promise=this.pager.getPage(i,s.cts.token).then(l=>{s.elements=l,s.isResolved=!0,s.promise=null,s.cts=null},l=>(s.isResolved=!1,s.promise=null,s.cts=null,Promise.reject(l)))),c.onCancellationRequested(()=>{!s.cts||(s.promiseIndexes.delete(o),s.promiseIndexes.size===0&&s.cts.cancel())}),s.promiseIndexes.add(o),s.promise.then(()=>s.elements[S]))}}e.PagedModel=I;class w{constructor(o,c=500){this.model=o,this.timeout=c}get length(){return this.model.length}isResolved(o){return this.model.isResolved(o)}get(o){return this.model.get(o)}resolve(o,c){return new Promise((i,S)=>{if(c.isCancellationRequested)return S((0,_.canceled)());const s=setTimeout(()=>{if(c.isCancellationRequested)return S((0,_.canceled)());l.dispose(),this.model.resolve(o,c).then(i,S)},this.timeout),l=c.onCancellationRequested(()=>{clearTimeout(s),l.dispose(),S((0,_.canceled)())})})}}e.DelayedPagedModel=w;function v(C,o){return{firstPage:C.firstPage.map(o),total:C.total,pageSize:C.pageSize,getPage:(c,i)=>C.getPage(c,i).then(S=>S.map(o))}}e.mapPager=v}),define(ne[445],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toUint32=e.toUint8=e.Constants=void 0;var t;(function(A){A[A.MAX_SAFE_SMALL_INTEGER=1073741824]="MAX_SAFE_SMALL_INTEGER",A[A.MIN_SAFE_SMALL_INTEGER=-1073741824]="MIN_SAFE_SMALL_INTEGER",A[A.MAX_UINT_8=255]="MAX_UINT_8",A[A.MAX_UINT_16=65535]="MAX_UINT_16",A[A.MAX_UINT_32=4294967295]="MAX_UINT_32",A[A.UNICODE_SUPPLEMENTARY_PLANE_BEGIN=65536]="UNICODE_SUPPLEMENTARY_PLANE_BEGIN"})(t=e.Constants||(e.Constants={}));function f(A){return A<0?0:A>255?255:A|0}e.toUint8=f;function _(A){return A<0?0:A>4294967295?4294967295:A|0}e.toUint32=_}),define(ne[9],re([1,0,48,14]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.uriToFsPath=e.URI=void 0;const _=/^\w[\w\d+.-]*$/,A=/^\//,k=/^\/\//;function D(g,d){if(!g.scheme&&d)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${g.authority}", path: "${g.path}", query: "${g.query}", fragment: "${g.fragment}"}`);if(g.scheme&&!_.test(g.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(g.path){if(g.authority){if(!A.test(g.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(k.test(g.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function I(g,d){return!g&&!d?"file":g}function w(g,d){switch(g){case"https":case"http":case"file":d?d[0]!==C&&(d=C+d):d=C;break}return d}const v="",C="/",o=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class c{constructor(d,m,b,E,y,T=!1){typeof d=="object"?(this.scheme=d.scheme||v,this.authority=d.authority||v,this.path=d.path||v,this.query=d.query||v,this.fragment=d.fragment||v):(this.scheme=I(d,T),this.authority=m||v,this.path=w(this.scheme,b||v),this.query=E||v,this.fragment=y||v,D(this,T))}static isUri(d){return d instanceof c?!0:d?typeof d.authority=="string"&&typeof d.fragment=="string"&&typeof d.path=="string"&&typeof d.query=="string"&&typeof d.scheme=="string"&&typeof d.fsPath=="string"&&typeof d.with=="function"&&typeof d.toString=="function":!1}get fsPath(){return p(this,!1)}with(d){if(!d)return this;let{scheme:m,authority:b,path:E,query:y,fragment:T}=d;return m===void 0?m=this.scheme:m===null&&(m=v),b===void 0?b=this.authority:b===null&&(b=v),E===void 0?E=this.path:E===null&&(E=v),y===void 0?y=this.query:y===null&&(y=v),T===void 0?T=this.fragment:T===null&&(T=v),m===this.scheme&&b===this.authority&&E===this.path&&y===this.query&&T===this.fragment?this:new S(m,b,E,y,T)}static parse(d,m=!1){const b=o.exec(d);return b?new S(b[2]||v,h(b[4]||v),h(b[5]||v),h(b[7]||v),h(b[9]||v),m):new S(v,v,v,v,v)}static file(d){let m=v;if(f.isWindows&&(d=d.replace(/\\/g,C)),d[0]===C&&d[1]===C){const b=d.indexOf(C,2);b===-1?(m=d.substring(2),d=C):(m=d.substring(2,b),d=d.substring(b)||C)}return new S("file",m,d,v,v)}static from(d){const m=new S(d.scheme,d.authority,d.path,d.query,d.fragment);return D(m,!0),m}static joinPath(d,...m){if(!d.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let b;return f.isWindows&&d.scheme==="file"?b=c.file(t.win32.join(p(d,!0),...m)).path:b=t.posix.join(d.path,...m),d.with({path:b})}toString(d=!1){return u(this,d)}toJSON(){return this}static revive(d){if(d){if(d instanceof c)return d;{const m=new S(d);return m._formatted=d.external,m._fsPath=d._sep===i?d.fsPath:null,m}}else return d}}e.URI=c;const i=f.isWindows?1:void 0;class S extends c{constructor(){super(...arguments);this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=p(this,!1)),this._fsPath}toString(d=!1){return d?u(this,!0):(this._formatted||(this._formatted=u(this,!1)),this._formatted)}toJSON(){const d={$mid:1};return this._fsPath&&(d.fsPath=this._fsPath,d._sep=i),this._formatted&&(d.external=this._formatted),this.path&&(d.path=this.path),this.scheme&&(d.scheme=this.scheme),this.authority&&(d.authority=this.authority),this.query&&(d.query=this.query),this.fragment&&(d.fragment=this.fragment),d}}const s={[58]:"%3A",[47]:"%2F",[63]:"%3F",[35]:"%23",[91]:"%5B",[93]:"%5D",[64]:"%40",[33]:"%21",[36]:"%24",[38]:"%26",[39]:"%27",[40]:"%28",[41]:"%29",[42]:"%2A",[43]:"%2B",[44]:"%2C",[59]:"%3B",[61]:"%3D",[32]:"%20"};function l(g,d){let m,b=-1;for(let E=0;E<g.length;E++){const y=g.charCodeAt(E);if(y>=97&&y<=122||y>=65&&y<=90||y>=48&&y<=57||y===45||y===46||y===95||y===126||d&&y===47)b!==-1&&(m+=encodeURIComponent(g.substring(b,E)),b=-1),m!==void 0&&(m+=g.charAt(E));else{m===void 0&&(m=g.substr(0,E));const T=s[y];T!==void 0?(b!==-1&&(m+=encodeURIComponent(g.substring(b,E)),b=-1),m+=T):b===-1&&(b=E)}}return b!==-1&&(m+=encodeURIComponent(g.substring(b))),m!==void 0?m:g}function r(g){let d;for(let m=0;m<g.length;m++){const b=g.charCodeAt(m);b===35||b===63?(d===void 0&&(d=g.substr(0,m)),d+=s[b]):d!==void 0&&(d+=g[m])}return d!==void 0?d:g}function p(g,d){let m;return g.authority&&g.path.length>1&&g.scheme==="file"?m=`//${g.authority}${g.path}`:g.path.charCodeAt(0)===47&&(g.path.charCodeAt(1)>=65&&g.path.charCodeAt(1)<=90||g.path.charCodeAt(1)>=97&&g.path.charCodeAt(1)<=122)&&g.path.charCodeAt(2)===58?d?m=g.path.substr(1):m=g.path[1].toLowerCase()+g.path.substr(2):m=g.path,f.isWindows&&(m=m.replace(/\//g,"\\")),m}e.uriToFsPath=p;function u(g,d){const m=d?r:l;let b="",{scheme:E,authority:y,path:T,query:R,fragment:O}=g;if(E&&(b+=E,b+=":"),(y||E==="file")&&(b+=C,b+=C),y){let x=y.indexOf("@");if(x!==-1){const F=y.substr(0,x);y=y.substr(x+1),x=F.indexOf(":"),x===-1?b+=m(F,!1):(b+=m(F.substr(0,x),!1),b+=":",b+=m(F.substr(x+1),!1)),b+="@"}y=y.toLowerCase(),x=y.indexOf(":"),x===-1?b+=m(y,!1):(b+=m(y.substr(0,x),!1),b+=y.substr(x))}if(T){if(T.length>=3&&T.charCodeAt(0)===47&&T.charCodeAt(2)===58){const x=T.charCodeAt(1);x>=65&&x<=90&&(T=`/${String.fromCharCode(x+32)}:${T.substr(3)}`)}else if(T.length>=2&&T.charCodeAt(1)===58){const x=T.charCodeAt(0);x>=65&&x<=90&&(T=`${String.fromCharCode(x+32)}:${T.substr(2)}`)}b+=m(T,!0)}return R&&(b+="?",b+=m(R,!1)),O&&(b+="#",b+=d?O:l(O,!1)),b}function a(g){try{return decodeURIComponent(g)}catch{return g.length>3?g.substr(0,3)+a(g.substr(3)):g}}const n=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function h(g){return g.match(n)?g.replace(n,d=>a(d)):g}}),define(ne[516],re([1,0,9]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.log=e.getFirstFrame=e.parse=e.isRemoteConsoleLog=void 0;function f(w){const v=w;return v&&typeof v.type=="string"&&typeof v.severity=="string"}e.isRemoteConsoleLog=f;function _(w){const v=[];let C;try{const o=JSON.parse(w.arguments),c=o[o.length-1];c&&c.__$stack&&(o.pop(),C=c.__$stack),v.push(...o)}catch{v.push("Unable to log remote console arguments",w.arguments)}return{args:v,stack:C}}e.parse=_;function A(w){if(typeof w!="string")return A(_(w).stack);const v=w;if(v){const C=k(v),o=/at [^\/]*((?:(?:[a-zA-Z]+:)|(?:[\/])|(?:\\\\))(?:.+)):(\d+):(\d+)/.exec(C||"");if(o&&o.length===4)return{uri:t.URI.file(o[1]),line:Number(o[2]),column:Number(o[3])}}}e.getFirstFrame=A;function k(w){if(!w)return w;const v=w.indexOf(` `);return v===-1?w:w.substring(0,v)}function D(w,v){const{args:C,stack:o}=_(w),c=typeof C[0]=="string"&&C.length===1;let i=k(o);i&&(i=`(${i.trim()})`);let S=[];if(typeof C[0]=="string"?i&&c?S=[`%c[${v}] %c${C[0]} %c${i}`,I("blue"),I(""),I("grey")]:S=[`%c[${v}] %c${C[0]}`,I("blue"),I(""),...C.slice(1)]:S=[`%c[${v}]%`,I("blue"),...C],i&&!c&&S.push(i),typeof console[w.severity]!="function")throw new Error("Unknown console method");console[w.severity].apply(console,S)}e.log=D;function I(w){return`color: ${w}`}}),define(ne[180],re([1,0,60,29,9]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.revive=e.parse=e.stringify=void 0;function A(w){return JSON.stringify(w,D)}e.stringify=A;function k(w){let v=JSON.parse(w);return v=I(v),v}e.parse=k;function D(w,v){return v instanceof RegExp?{$mid:2,source:v.source,flags:(0,f.regExpFlags)(v)}:v}function I(w,v=0){if(!w||v>200)return w;if(typeof w=="object"){switch(w.$mid){case 1:return _.URI.revive(w);case 2:return new RegExp(w.source,w.flags);case 14:return new Date(w.source)}if(w instanceof t.VSBuffer||w instanceof Uint8Array)return w;if(Array.isArray(w))for(let C=0;C<w.length;++C)w[C]=I(w[C],v+1);else for(const C in w)Object.hasOwnProperty.call(w,C)&&(w[C]=I(w[C],v+1))}return w}e.revive=I}),define(ne[18],re([1,0,14,9]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileAccess=e.RemoteAuthorities=e.connectionTokenQueryName=e.connectionTokenCookieName=e.Schemas=void 0;var _;(function(D){D.inMemory="inmemory",D.vscode="vscode",D.internal="private",D.walkThrough="walkThrough",D.walkThroughSnippet="walkThroughSnippet",D.http="http",D.https="https",D.file="file",D.mailto="mailto",D.untitled="untitled",D.data="data",D.command="command",D.vscodeRemote="vscode-remote",D.vscodeRemoteResource="vscode-remote-resource",D.vscodeUserData="vscode-userdata",D.vscodeCustomEditor="vscode-custom-editor",D.vscodeNotebook="vscode-notebook",D.vscodeNotebookCell="vscode-notebook-cell",D.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",D.vscodeNotebookCellOutput="vscode-notebook-cell-output",D.vscodeInteractive="vscode-interactive",D.vscodeInteractiveInput="vscode-interactive-input",D.vscodeSettings="vscode-settings",D.vscodeWorkspaceTrust="vscode-workspace-trust",D.vscodeTerminal="vscode-terminal",D.webviewPanel="webview-panel",D.vscodeWebview="vscode-webview",D.extension="extension",D.vscodeFileResource="vscode-file",D.tmp="tmp",D.vsls="vsls"})(_=e.Schemas||(e.Schemas={})),e.connectionTokenCookieName="vscode-tkn",e.connectionTokenQueryName="tkn";class A{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null}setPreferredWebSchema(I){this._preferredWebSchema=I}setDelegate(I){this._delegate=I}set(I,w,v){this._hosts[I]=w,this._ports[I]=v}setConnectionToken(I,w){this._connectionTokens[I]=w}getPreferredWebSchema(){return this._preferredWebSchema}rewrite(I){if(this._delegate)return this._delegate(I);const w=I.authority;let v=this._hosts[w];v&&v.indexOf(":")!==-1&&(v=`[${v}]`);const C=this._ports[w],o=this._connectionTokens[w];let c=`path=${encodeURIComponent(I.path)}`;return typeof o=="string"&&(c+=`&${e.connectionTokenQueryName}=${encodeURIComponent(o)}`),f.URI.from({scheme:t.isWeb?this._preferredWebSchema:_.vscodeRemoteResource,authority:`${v}:${C}`,path:"/vscode-remote-resource",query:c})}}e.RemoteAuthorities=new A;class k{asBrowserUri(I,w){const v=this.toUri(I,w);return v.scheme===_.vscodeRemote?e.RemoteAuthorities.rewrite(v):v.scheme===_.file&&(t.isNative||t.isWebWorker&&t.globals.origin===`${_.vscodeFileResource}://${k.FALLBACK_AUTHORITY}`)?v.with({scheme:_.vscodeFileResource,authority:v.authority||k.FALLBACK_AUTHORITY,query:null,fragment:null}):v}asFileUri(I,w){const v=this.toUri(I,w);return v.scheme===_.vscodeFileResource?v.with({scheme:_.file,authority:v.authority!==k.FALLBACK_AUTHORITY?v.authority:null,query:null,fragment:null}):v}toUri(I,w){return f.URI.isUri(I)?I:f.URI.parse(w.toUrl(I))}}k.FALLBACK_AUTHORITY="vscode-app",e.FileAccess=new k}),define(ne[19],re([1,0,157,18,48,14,29,9]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toLocalResource=e.DataUri=e.distinctParents=e.addTrailingPathSeparator=e.removeTrailingPathSeparator=e.hasTrailingPathSeparator=e.isEqualAuthority=e.isAbsolutePath=e.resolvePath=e.relativePath=e.normalizePath=e.joinPath=e.dirname=e.extname=e.basename=e.basenameOrAuthority=e.getComparisonKey=e.isEqualOrParent=e.isEqual=e.extUriIgnorePathCase=e.extUriBiasedIgnorePathCase=e.extUri=e.ExtUri=e.originalFSPath=void 0;function I(c){return(0,D.uriToFsPath)(c,!0)}e.originalFSPath=I;class w{constructor(i){this._ignorePathCasing=i}compare(i,S,s=!1){return i===S?0:(0,k.compare)(this.getComparisonKey(i,s),this.getComparisonKey(S,s))}isEqual(i,S,s=!1){return i===S?!0:!i||!S?!1:this.getComparisonKey(i,s)===this.getComparisonKey(S,s)}getComparisonKey(i,S=!1){return i.with({path:this._ignorePathCasing(i)?i.path.toLowerCase():void 0,fragment:S?null:void 0}).toString()}ignorePathCasing(i){return this._ignorePathCasing(i)}isEqualOrParent(i,S,s=!1){if(i.scheme===S.scheme){if(i.scheme===f.Schemas.file)return t.isEqualOrParent(I(i),I(S),this._ignorePathCasing(i))&&i.query===S.query&&(s||i.fragment===S.fragment);if((0,e.isEqualAuthority)(i.authority,S.authority))return t.isEqualOrParent(i.path,S.path,this._ignorePathCasing(i),"/")&&i.query===S.query&&(s||i.fragment===S.fragment)}return!1}joinPath(i,...S){return D.URI.joinPath(i,...S)}basenameOrAuthority(i){return(0,e.basename)(i)||i.authority}basename(i){return _.posix.basename(i.path)}extname(i){return _.posix.extname(i.path)}dirname(i){if(i.path.length===0)return i;let S;return i.scheme===f.Schemas.file?S=D.URI.file(_.dirname(I(i))).path:(S=_.posix.dirname(i.path),i.authority&&S.length&&S.charCodeAt(0)!==47&&(console.error(`dirname("${i.toString})) resulted in a relative path`),S="/")),i.with({path:S})}normalizePath(i){if(!i.path.length)return i;let S;return i.scheme===f.Schemas.file?S=D.URI.file(_.normalize(I(i))).path:S=_.posix.normalize(i.path),i.with({path:S})}relativePath(i,S){if(i.scheme!==S.scheme||!(0,e.isEqualAuthority)(i.authority,S.authority))return;if(i.scheme===f.Schemas.file){const r=_.relative(I(i),I(S));return A.isWindows?t.toSlashes(r):r}let s=i.path||"/",l=S.path||"/";if(this._ignorePathCasing(i)){let r=0;for(const p=Math.min(s.length,l.length);r<p&&!(s.charCodeAt(r)!==l.charCodeAt(r)&&s.charAt(r).toLowerCase()!==l.charAt(r).toLowerCase());r++);s=l.substr(0,r)+s.substr(r)}return _.posix.relative(s,l)}resolvePath(i,S){if(i.scheme===f.Schemas.file){const s=D.URI.file(_.resolve(I(i),S));return i.with({authority:s.authority,path:s.path})}return S=t.toPosixPath(S),i.with({path:_.posix.resolve(i.path,S)})}isAbsolutePath(i){return!!i.path&&i.path[0]==="/"}isEqualAuthority(i,S){return i===S||i!==void 0&&S!==void 0&&(0,k.equalsIgnoreCase)(i,S)}hasTrailingPathSeparator(i,S=_.sep){if(i.scheme===f.Schemas.file){const s=I(i);return s.length>t.getRoot(s).length&&s[s.length-1]===S}else{const s=i.path;return s.length>1&&s.charCodeAt(s.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(i.fsPath)}}removeTrailingPathSeparator(i,S=_.sep){return(0,e.hasTrailingPathSeparator)(i,S)?i.with({path:i.path.substr(0,i.path.length-1)}):i}addTrailingPathSeparator(i,S=_.sep){let s=!1;if(i.scheme===f.Schemas.file){const l=I(i);s=l!==void 0&&l.length===t.getRoot(l).length&&l[l.length-1]===S}else{S="/";const l=i.path;s=l.length===1&&l.charCodeAt(l.length-1)===47}return!s&&!(0,e.hasTrailingPathSeparator)(i,S)?i.with({path:i.path+"/"}):i}}e.ExtUri=w,e.extUri=new w(()=>!1),e.extUriBiasedIgnorePathCase=new w(c=>c.scheme===f.Schemas.file?!A.isLinux:!0),e.extUriIgnorePathCase=new w(c=>!0),e.isEqual=e.extUri.isEqual.bind(e.extUri),e.isEqualOrParent=e.extUri.isEqualOrParent.bind(e.extUri),e.getComparisonKey=e.extUri.getComparisonKey.bind(e.extUri),e.basenameOrAuthority=e.extUri.basenameOrAuthority.bind(e.extUri),e.basename=e.extUri.basename.bind(e.extUri),e.extname=e.extUri.extname.bind(e.extUri),e.dirname=e.extUri.dirname.bind(e.extUri),e.joinPath=e.extUri.joinPath.bind(e.extUri),e.normalizePath=e.extUri.normalizePath.bind(e.extUri),e.relativePath=e.extUri.relativePath.bind(e.extUri),e.resolvePath=e.extUri.resolvePath.bind(e.extUri),e.isAbsolutePath=e.extUri.isAbsolutePath.bind(e.extUri),e.isEqualAuthority=e.extUri.isEqualAuthority.bind(e.extUri),e.hasTrailingPathSeparator=e.extUri.hasTrailingPathSeparator.bind(e.extUri),e.removeTrailingPathSeparator=e.extUri.removeTrailingPathSeparator.bind(e.extUri),e.addTrailingPathSeparator=e.extUri.addTrailingPathSeparator.bind(e.extUri);function v(c,i){const S=[];for(let s=0;s<c.length;s++){const l=i(c[s]);c.some((r,p)=>p===s?!1:(0,e.isEqualOrParent)(l,i(r)))||S.push(c[s])}return S}e.distinctParents=v;var C;(function(c){c.META_DATA_LABEL="label",c.META_DATA_DESCRIPTION="description",c.META_DATA_SIZE="size",c.META_DATA_MIME="mime";function i(S){const s=new Map;S.path.substring(S.path.indexOf(";")+1,S.path.lastIndexOf(";")).split(";").forEach(p=>{const[u,a]=p.split(":");u&&a&&s.set(u,a)});const r=S.path.substring(0,S.path.indexOf(";"));return r&&s.set(c.META_DATA_MIME,r),s}c.parseMetaData=i})(C=e.DataUri||(e.DataUri={}));function o(c,i,S){if(i){let s=c.path;return s&&s[0]!==_.posix.sep&&(s=_.posix.sep+s),c.with({scheme:S,authority:i,path:s})}return c.with({scheme:S})}e.toLocalResource=o}),define(ne[11],re([1,0,30,22,6,2,19,14]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createCancelableAsyncIterable=e.CancelableAsyncIterableObject=e.AsyncIterableObject=e.Promises=e.DeferredPromise=e.IntervalCounter=e.TaskSequentializer=e.retry=e.IdleValue=e.runWhenIdle=e.ThrottledWorker=e.RunOnceWorker=e.ProcessTimeRunOnceScheduler=e.RunOnceScheduler=e.IntervalTimer=e.TimeoutTimer=e.ResourceQueue=e.Queue=e.Limiter=e.firstParallel=e.first=e.sequence=e.disposableTimeout=e.timeout=e.AutoOpenBarrier=e.Barrier=e.ThrottledDelayer=e.Delayer=e.MicrotaskDelay=e.SequencerByKey=e.Sequencer=e.Throttler=e.asPromise=e.raceTimeout=e.raceCancellablePromises=e.raceCancellationError=e.raceCancellation=e.createCancelablePromise=e.isThenable=void 0;function I(j){return!!j&&typeof j.then=="function"}e.isThenable=I;function w(j){const X=new t.CancellationTokenSource,Y=j(X.token),$=new Promise((J,ee)=>{const te=X.token.onCancellationRequested(()=>{te.dispose(),X.dispose(),ee(new f.CancellationError)});Promise.resolve(Y).then(se=>{te.dispose(),X.dispose(),J(se)},se=>{te.dispose(),X.dispose(),ee(se)})});return new class{cancel(){X.cancel()}then(J,ee){return $.then(J,ee)}catch(J){return this.then(void 0,J)}finally(J){return $.finally(J)}}}e.createCancelablePromise=w;function v(j,X,Y){return new Promise(($,J)=>{const ee=X.onCancellationRequested(()=>{ee.dispose(),$(Y)});j.then($,J).finally(()=>ee.dispose())})}e.raceCancellation=v;function C(j,X){return new Promise((Y,$)=>{const J=X.onCancellationRequested(()=>{J.dispose(),$(new f.CancellationError)});j.then(Y,$).finally(()=>J.dispose())})}e.raceCancellationError=C;async function o(j){let X=-1;const Y=j.map((J,ee)=>J.then(te=>(X=ee,te))),$=await Promise.race(Y);return j.forEach((J,ee)=>{ee!==X&&J.cancel()}),$}e.raceCancellablePromises=o;function c(j,X,Y){let $;const J=setTimeout(()=>{$?.(void 0),Y?.()},X);return Promise.race([j.finally(()=>clearTimeout(J)),new Promise(ee=>$=ee)])}e.raceTimeout=c;function i(j){return new Promise((X,Y)=>{const $=j();I($)?$.then(X,Y):X($)})}e.asPromise=i;class S{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(X){if(this.activePromise){if(this.queuedPromiseFactory=X,!this.queuedPromise){const Y=()=>{this.queuedPromise=null;const $=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,$};this.queuedPromise=new Promise($=>{this.activePromise.then(Y,Y).then($)})}return new Promise((Y,$)=>{this.queuedPromise.then(Y,$)})}return this.activePromise=X(),new Promise((Y,$)=>{this.activePromise.then(J=>{this.activePromise=null,Y(J)},J=>{this.activePromise=null,$(J)})})}}e.Throttler=S;class s{constructor(){this.current=Promise.resolve(null)}queue(X){return this.current=this.current.then(()=>X(),()=>X())}}e.Sequencer=s;class l{constructor(){this.promiseMap=new Map}queue(X,Y){const J=(this.promiseMap.get(X)??Promise.resolve()).catch(()=>{}).then(Y).finally(()=>{this.promiseMap.get(X)===J&&this.promiseMap.delete(X)});return this.promiseMap.set(X,J),J}}e.SequencerByKey=l;const r=(j,X)=>{let Y=!0;const $=setTimeout(()=>{Y=!1,X()},j);return{isTriggered:()=>Y,dispose:()=>{clearTimeout($),Y=!1}}},p=j=>{let X=!0;return queueMicrotask(()=>{X&&(X=!1,j())}),{isTriggered:()=>X,dispose:()=>{X=!1}}};e.MicrotaskDelay=Symbol("MicrotaskDelay");class u{constructor(X){this.defaultDelay=X,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(X,Y=this.defaultDelay){this.task=X,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((J,ee)=>{this.doResolve=J,this.doReject=ee}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const J=this.task;return this.task=null,J()}}));const $=()=>{this.deferred=null,this.doResolve?.(null)};return this.deferred=Y===e.MicrotaskDelay?p($):r(Y,$),this.completionPromise}isTriggered(){return!!this.deferred?.isTriggered()}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject&&this.doReject(new f.CancellationError),this.completionPromise=null)}cancelTimeout(){this.deferred?.dispose(),this.deferred=null}dispose(){this.cancel()}}e.Delayer=u;class a{constructor(X){this.delayer=new u(X),this.throttler=new S}trigger(X,Y){return this.delayer.trigger(()=>this.throttler.queue(X),Y)}isTriggered(){return this.delayer.isTriggered()}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose()}}e.ThrottledDelayer=a;class n{constructor(){this._isOpen=!1,this._promise=new Promise((X,Y)=>{this._completePromise=X})}isOpen(){return this._isOpen}open(){this._isOpen=!0,this._completePromise(!0)}wait(){return this._promise}}e.Barrier=n;class h extends n{constructor(X){super();this._timeout=setTimeout(()=>this.open(),X)}open(){clearTimeout(this._timeout),super.open()}}e.AutoOpenBarrier=h;function g(j,X){return X?new Promise((Y,$)=>{const J=setTimeout(()=>{ee.dispose(),Y()},j),ee=X.onCancellationRequested(()=>{clearTimeout(J),ee.dispose(),$(new f.CancellationError)})}):w(Y=>g(j,Y))}e.timeout=g;function d(j,X=0){const Y=setTimeout(j,X);return(0,A.toDisposable)(()=>clearTimeout(Y))}e.disposableTimeout=d;function m(j){const X=[];let Y=0;const $=j.length;function J(){return Y<$?j[Y++]():null}function ee(te){te!=null&&X.push(te);const se=J();return se?se.then(ee):Promise.resolve(X)}return Promise.resolve(null).then(ee)}e.sequence=m;function b(j,X=$=>!!$,Y=null){let $=0;const J=j.length,ee=()=>{if($>=J)return Promise.resolve(Y);const te=j[$++];return Promise.resolve(te()).then(ie=>X(ie)?Promise.resolve(ie):ee())};return ee()}e.first=b;function E(j,X=$=>!!$,Y=null){if(j.length===0)return Promise.resolve(Y);let $=j.length;const J=()=>{$=-1;for(const ee of j)ee.cancel?.()};return new Promise((ee,te)=>{for(const se of j)se.then(ie=>{--$>=0&&X(ie)?(J(),ee(ie)):$===0&&ee(Y)}).catch(ie=>{--$>=0&&(J(),te(ie))})})}e.firstParallel=E;class y{constructor(X){this._size=0,this.maxDegreeOfParalellism=X,this.outstandingPromises=[],this.runningPromises=0,this._onDrained=new _.Emitter}get onDrained(){return this._onDrained.event}get size(){return this._size}queue(X){return this._size++,new Promise((Y,$)=>{this.outstandingPromises.push({factory:X,c:Y,e:$}),this.consume()})}consume(){for(;this.outstandingPromises.length&&this.runningPromises<this.maxDegreeOfParalellism;){const X=this.outstandingPromises.shift();this.runningPromises++;const Y=X.factory();Y.then(X.c,X.e),Y.then(()=>this.consumed(),()=>this.consumed())}}consumed(){this._size--,this.runningPromises--,this.outstandingPromises.length>0?this.consume():this._onDrained.fire()}dispose(){this._onDrained.dispose()}}e.Limiter=y;class T extends y{constructor(){super(1)}}e.Queue=T;class R{constructor(){this.queues=new Map,this.drainers=new Set}async whenDrained(){if(this.isDrained())return;const X=new U;return this.drainers.add(X),X.p}isDrained(){for(const[,X]of this.queues)if(X.size>0)return!1;return!0}queueFor(X,Y=k.extUri){const $=Y.getComparisonKey(X);let J=this.queues.get($);return J||(J=new T,_.Event.once(J.onDrained)(()=>{J?.dispose(),this.queues.delete($),this.onDidQueueDrain()}),this.queues.set($,J)),J}onDidQueueDrain(){!this.isDrained()||this.releaseDrainers()}releaseDrainers(){for(const X of this.drainers)X.complete();this.drainers.clear()}dispose(){for(const[,X]of this.queues)X.dispose();this.queues.clear(),this.releaseDrainers()}}e.ResourceQueue=R;class O{constructor(X,Y){this._token=-1,typeof X=="function"&&typeof Y=="number"&&this.setIfNotSet(X,Y)}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(X,Y){this.cancel(),this._token=setTimeout(()=>{this._token=-1,X()},Y)}setIfNotSet(X,Y){this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,X()},Y))}}e.TimeoutTimer=O;class x{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearInterval(this._token),this._token=-1)}cancelAndSet(X,Y){this.cancel(),this._token=setInterval(()=>{X()},Y)}}e.IntervalTimer=x;class F{constructor(X,Y){this.timeoutToken=-1,this.runner=X,this.timeout=Y,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(X=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,X)}get delay(){return this.timeout}set delay(X){this.timeout=X}isScheduled(){return this.timeoutToken!==-1}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner&&this.runner()}}e.RunOnceScheduler=F;class L{constructor(X,Y){Y%1e3!=0&&console.warn(`ProcessTimeRunOnceScheduler resolution is 1s, ${Y}ms is not a multiple of 1000ms.`),this.runner=X,this.timeout=Y,this.counter=0,this.intervalToken=-1,this.intervalHandler=this.onInterval.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearInterval(this.intervalToken),this.intervalToken=-1)}schedule(X=this.timeout){X%1e3!=0&&console.warn(`ProcessTimeRunOnceScheduler resolution is 1s, ${X}ms is not a multiple of 1000ms.`),this.cancel(),this.counter=Math.ceil(X/1e3),this.intervalToken=setInterval(this.intervalHandler,1e3)}isScheduled(){return this.intervalToken!==-1}onInterval(){this.counter--,!(this.counter>0)&&(clearInterval(this.intervalToken),this.intervalToken=-1,this.runner&&this.runner())}}e.ProcessTimeRunOnceScheduler=L;class M extends F{constructor(X,Y){super(X,Y);this.units=[]}work(X){this.units.push(X),this.isScheduled()||this.schedule()}doRun(){const X=this.units;this.units=[],this.runner&&this.runner(X)}dispose(){this.units=[],super.dispose()}}e.RunOnceWorker=M;class N extends A.Disposable{constructor(X,Y){super();this.options=X,this.handler=Y,this.pendingWork=[],this.throttler=this._register(new A.MutableDisposable),this.disposed=!1}get pending(){return this.pendingWork.length}work(X){if(this.disposed)return!1;if(typeof this.options.maxBufferedWork=="number"){if(this.throttler.value){if(this.pending+X.length>this.options.maxBufferedWork)return!1}else if(this.pending+X.length-this.options.maxWorkChunkSize>this.options.maxBufferedWork)return!1}return this.pendingWork.push(...X),this.throttler.value||this.doWork(),!0}doWork(){this.handler(this.pendingWork.splice(0,this.options.maxWorkChunkSize)),this.pendingWork.length>0&&(this.throttler.value=new F(()=>{this.throttler.clear(),this.doWork()},this.options.throttleDelay),this.throttler.value.schedule())}dispose(){super.dispose(),this.disposed=!0}}e.ThrottledWorker=N,function(){typeof requestIdleCallback!="function"||typeof cancelIdleCallback!="function"?e.runWhenIdle=j=>{(0,D.setTimeout0)(()=>{if(X)return;const Y=Date.now()+15;j(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,Y-Date.now())}}))});let X=!1;return{dispose(){X||(X=!0)}}}:e.runWhenIdle=(j,X)=>{const Y=requestIdleCallback(j,typeof X=="number"?{timeout:X}:void 0);let $=!1;return{dispose(){$||($=!0,cancelIdleCallback(Y))}}}}();class B{constructor(X){this._didRun=!1,this._executor=()=>{try{this._value=X()}catch(Y){this._error=Y}finally{this._didRun=!0}},this._handle=(0,e.runWhenIdle)(()=>this._executor())}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}}e.IdleValue=B;async function P(j,X,Y){let $;for(let J=0;J<Y;J++)try{return await j()}catch(ee){$=ee,await g(X)}throw $}e.retry=P;class V{hasPending(X){return this._pending?typeof X=="number"?this._pending.taskId===X:!!this._pending:!1}get pending(){return this._pending?this._pending.promise:void 0}cancelPending(){this._pending?.cancel()}setPending(X,Y,$){return this._pending={taskId:X,cancel:()=>$?.(),promise:Y},Y.then(()=>this.donePending(X),()=>this.donePending(X)),Y}donePending(X){this._pending&&X===this._pending.taskId&&(this._pending=void 0,this.triggerNext())}triggerNext(){if(this._next){const X=this._next;this._next=void 0,X.run().then(X.promiseResolve,X.promiseReject)}}setNext(X){if(this._next)this._next.run=X;else{let Y,$;const J=new Promise((ee,te)=>{Y=ee,$=te});this._next={run:X,promise:J,promiseResolve:Y,promiseReject:$}}return this._next.promise}}e.TaskSequentializer=V;class z{constructor(X,Y=()=>Date.now()){this.interval=X,this.nowFn=Y,this.lastIncrementTime=0,this.value=0}increment(){const X=this.nowFn();return X-this.lastIncrementTime>this.interval&&(this.lastIncrementTime=X,this.value=0),this.value++,this.value}}e.IntervalCounter=z;class U{constructor(){this.rejected=!1,this.resolved=!1,this.p=new Promise((X,Y)=>{this.completeCallback=X,this.errorCallback=Y})}get isRejected(){return this.rejected}get isResolved(){return this.resolved}get isSettled(){return this.rejected||this.resolved}complete(X){return new Promise(Y=>{this.completeCallback(X),this.resolved=!0,Y()})}error(X){return new Promise(Y=>{this.errorCallback(X),this.rejected=!0,Y()})}cancel(){new Promise(X=>{this.errorCallback(new f.CancellationError),this.rejected=!0,X()})}}e.DeferredPromise=U;var H;(function(j){async function X($){let J;const ee=await Promise.all($.map(te=>te.then(se=>se,se=>{J||(J=se)})));if(typeof J!="undefined")throw J;return ee}j.settled=X;function Y($){return new Promise(async(J,ee)=>{try{await $(J,ee)}catch(te){ee(te)}})}j.withAsyncBody=Y})(H=e.Promises||(e.Promises={}));var K;(function(j){j[j.Initial=0]="Initial",j[j.DoneOK=1]="DoneOK",j[j.DoneError=2]="DoneError"})(K||(K={}));class G{constructor(X){this._state=0,this._results=[],this._error=null,this._onStateChanged=new _.Emitter,queueMicrotask(async()=>{const Y={emitOne:$=>this.emitOne($),emitMany:$=>this.emitMany($),reject:$=>this.reject($)};try{await Promise.resolve(X(Y)),this.resolve()}catch($){this.reject($)}finally{Y.emitOne=void 0,Y.emitMany=void 0,Y.reject=void 0}})}static fromArray(X){return new G(Y=>{Y.emitMany(X)})}static fromPromise(X){return new G(async Y=>{Y.emitMany(await X)})}static fromPromises(X){return new G(async Y=>{await Promise.all(X.map(async $=>Y.emitOne(await $)))})}static merge(X){return new G(async Y=>{await Promise.all(X.map(async $=>{for await(const J of $)Y.emitOne(J)}))})}[Symbol.asyncIterator](){let X=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(X<this._results.length)return{done:!1,value:this._results[X++]};if(this._state===1)return{done:!0,value:void 0};await _.Event.toPromise(this._onStateChanged.event)}while(!0)}}}static map(X,Y){return new G(async $=>{for await(const J of X)$.emitOne(Y(J))})}map(X){return G.map(this,X)}static filter(X,Y){return new G(async $=>{for await(const J of X)Y(J)&&$.emitOne(J)})}filter(X){return G.filter(this,X)}static coalesce(X){return G.filter(X,Y=>!!Y)}coalesce(){return G.coalesce(this)}static async toPromise(X){const Y=[];for await(const $ of X)Y.push($);return Y}toPromise(){return G.toPromise(this)}emitOne(X){this._state===0&&(this._results.push(X),this._onStateChanged.fire())}emitMany(X){this._state===0&&(this._results=this._results.concat(X),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(X){this._state===0&&(this._state=2,this._error=X,this._onStateChanged.fire())}}e.AsyncIterableObject=G,G.EMPTY=G.fromArray([]);class q extends G{constructor(X,Y){super(Y);this._source=X}cancel(){this._source.cancel()}}e.CancelableAsyncIterableObject=q;function Z(j){const X=new t.CancellationTokenSource,Y=j(X.token);return new q(X,async $=>{const J=X.token.onCancellationRequested(()=>{J.dispose(),X.dispose(),$.reject(new f.CancellationError)});try{for await(const ee of Y){if(X.token.isCancellationRequested)return;$.emitOne(ee)}J.dispose(),X.dispose()}catch(ee){J.dispose(),X.dispose(),$.reject(ee)}})}e.createCancelableAsyncIterable=Z}),define(ne[10],re([1,0,77,223,91,137,11,22,6,652,2,18,14,13,9]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DragAndDropObserver=e.ZIndex=e.getCookieValue=e.ModifierKeyEmitter=e.multibyteAwareBtoa=e.safeInnerHtml=e.hookDomPurifyHrefAndSrcSanitizer=e.detectFullscreen=e.DetectedFullscreenMode=e.triggerUpload=e.triggerDownload=e.asCSSPropertyValue=e.asCSSUrl=e.animate=e.windowOpenWithSuccess=e.windowOpenPopup=e.windowOpenNoOpener=e.computeScreenAwareSize=e.domContentLoaded=e.finalHandler=e.getElementsByTagName=e.removeTabIndexAndUpdateFocus=e.hide=e.show=e.join=e.$=e.Namespace=e.reset=e.prepend=e.append=e.after=e.trackFocus=e.restoreParentsScrollTop=e.saveParentsScrollTop=e.EventHelper=e.EventType=e.isHTMLElement=e.removeCSSRulesContainingSelector=e.createCSSRule=e.createMetaElement=e.createStyleSheet=e.getActiveElement=e.getShadowRoot=e.isInShadowDOM=e.isShadowRoot=e.hasParentWithClass=e.findParentWithClass=e.isAncestorUsingFlowTo=e.setParentFlowTo=e.isAncestor=e.getLargestChildWidth=e.getTotalHeight=e.getContentHeight=e.getTotalScrollWidth=e.getContentWidth=e.getTotalWidth=e.StandardWindow=e.getDomNodePagePosition=e.position=e.size=e.getTopLeftOffset=e.Dimension=e.getClientArea=e.getComputedStyle=e.addDisposableThrottledListener=e.modify=e.measure=e.scheduleAtNextAnimationFrame=e.runAtThisOrScheduleAtNextAnimationFrame=e.createEventEmitter=e.addDisposableNonBubblingPointerOutListener=e.addDisposableNonBubblingMouseOutListener=e.addDisposableGenericMouseUpListener=e.addDisposableGenericMouseMoveListener=e.addDisposableGenericMouseDownListener=e.addStandardDisposableGenericMouseUpListener=e.addStandardDisposableGenericMouseDownListener=e.addStandardDisposableListener=e.addDisposableListener=e.isInDOM=e.clearNode=void 0;function S($e){for(;$e.firstChild;)$e.firstChild.remove()}e.clearNode=S;function s($e){return $e?.isConnected??!1}e.isInDOM=s;class l{constructor(Pe,Ge,Ye,je){this._node=Pe,this._type=Ge,this._handler=Ye,this._options=je||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){!this._handler||(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}}function r($e,Pe,Ge,Ye){return new l($e,Pe,Ge,Ye)}e.addDisposableListener=r;function p($e){return function(Pe){return $e(new A.StandardMouseEvent(Pe))}}function u($e){return function(Pe){return $e(new _.StandardKeyboardEvent(Pe))}}let a=function(Pe,Ge,Ye,je){let Oe=Ye;return Ge==="click"||Ge==="mousedown"?Oe=p(Ye):(Ge==="keydown"||Ge==="keypress"||Ge==="keyup")&&(Oe=u(Ye)),r(Pe,Ge,Oe,je)};e.addStandardDisposableListener=a;let n=function(Pe,Ge,Ye){let je=p(Ge);return g(Pe,je,Ye)};e.addStandardDisposableGenericMouseDownListener=n;let h=function(Pe,Ge,Ye){let je=p(Ge);return m(Pe,je,Ye)};e.addStandardDisposableGenericMouseUpListener=h;function g($e,Pe,Ge){return r($e,o.isIOS&&f.BrowserFeatures.pointerEvents?e.EventType.POINTER_DOWN:e.EventType.MOUSE_DOWN,Pe,Ge)}e.addDisposableGenericMouseDownListener=g;function d($e,Pe,Ge){return r($e,o.isIOS&&f.BrowserFeatures.pointerEvents?e.EventType.POINTER_MOVE:e.EventType.MOUSE_MOVE,Pe,Ge)}e.addDisposableGenericMouseMoveListener=d;function m($e,Pe,Ge){return r($e,o.isIOS&&f.BrowserFeatures.pointerEvents?e.EventType.POINTER_UP:e.EventType.MOUSE_UP,Pe,Ge)}e.addDisposableGenericMouseUpListener=m;function b($e,Pe){return r($e,"mouseout",Ge=>{let Ye=Ge.relatedTarget;for(;Ye&&Ye!==$e;)Ye=Ye.parentNode;Ye!==$e&&Pe(Ge)})}e.addDisposableNonBubblingMouseOutListener=b;function E($e,Pe){return r($e,"pointerout",Ge=>{let Ye=Ge.relatedTarget;for(;Ye&&Ye!==$e;)Ye=Ye.parentNode;Ye!==$e&&Pe(Ge)})}e.addDisposableNonBubblingPointerOutListener=E;function y($e,Pe,Ge){let Ye=null;const je=ot=>Je.fire(ot),Oe=()=>{Ye||(Ye=new l($e,Pe,je,Ge))},ze=()=>{Ye&&(Ye.dispose(),Ye=null)},Je=new I.Emitter({onFirstListenerAdd:Oe,onLastListenerRemove:ze});return Je}e.createEventEmitter=y;let T=null;function R($e){if(!T){const Pe=Ge=>setTimeout(()=>Ge(new Date().getTime()),0);T=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||Pe}return T.call(self,$e)}class O{constructor(Pe,Ge=0){this._runner=Pe,this.priority=Ge,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(Pe){(0,D.onUnexpectedError)(Pe)}}static sort(Pe,Ge){return Ge.priority-Pe.priority}}(function(){let $e=[],Pe=null,Ge=!1,Ye=!1,je=()=>{for(Ge=!1,Pe=$e,$e=[],Ye=!0;Pe.length>0;)Pe.sort(O.sort),Pe.shift().execute();Ye=!1};e.scheduleAtNextAnimationFrame=(Oe,ze=0)=>{let Je=new O(Oe,ze);return $e.push(Je),Ge||(Ge=!0,R(je)),Je},e.runAtThisOrScheduleAtNextAnimationFrame=(Oe,ze)=>{if(Ye){let Je=new O(Oe,ze);return Pe.push(Je),Je}else return(0,e.scheduleAtNextAnimationFrame)(Oe,ze)}})();function x($e){return(0,e.scheduleAtNextAnimationFrame)($e,1e4)}e.measure=x;function F($e){return(0,e.scheduleAtNextAnimationFrame)($e,-1e4)}e.modify=F;const L=8,M=function($e,Pe){return Pe};class N extends v.Disposable{constructor(Pe,Ge,Ye,je=M,Oe=L){super();let ze=null,Je=0,ot=this._register(new k.TimeoutTimer),ht=()=>{Je=new Date().getTime(),Ye(ze),ze=null};this._register(r(Pe,Ge,gt=>{ze=je(ze,gt);let bt=new Date().getTime()-Je;bt>=Oe?(ot.cancel(),ht()):ot.setIfNotSet(ht,Oe-bt)}))}}function B($e,Pe,Ge,Ye,je){return new N($e,Pe,Ge,Ye,je)}e.addDisposableThrottledListener=B;function P($e){return document.defaultView.getComputedStyle($e,null)}e.getComputedStyle=P;function V($e){if($e!==document.body)return new U($e.clientWidth,$e.clientHeight);if(o.isIOS&&window.visualViewport)return new U(window.visualViewport.width,window.visualViewport.height);if(window.innerWidth&&window.innerHeight)return new U(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new U(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new U(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}e.getClientArea=V;class z{static convertToPixels(Pe,Ge){return parseFloat(Ge)||0}static getDimension(Pe,Ge,Ye){let je=P(Pe),Oe="0";return je&&(je.getPropertyValue?Oe=je.getPropertyValue(Ge):Oe=je.getAttribute(Ye)),z.convertToPixels(Pe,Oe)}static getBorderLeftWidth(Pe){return z.getDimension(Pe,"border-left-width","borderLeftWidth")}static getBorderRightWidth(Pe){return z.getDimension(Pe,"border-right-width","borderRightWidth")}static getBorderTopWidth(Pe){return z.getDimension(Pe,"border-top-width","borderTopWidth")}static getBorderBottomWidth(Pe){return z.getDimension(Pe,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(Pe){return z.getDimension(Pe,"padding-left","paddingLeft")}static getPaddingRight(Pe){return z.getDimension(Pe,"padding-right","paddingRight")}static getPaddingTop(Pe){return z.getDimension(Pe,"padding-top","paddingTop")}static getPaddingBottom(Pe){return z.getDimension(Pe,"padding-bottom","paddingBottom")}static getMarginLeft(Pe){return z.getDimension(Pe,"margin-left","marginLeft")}static getMarginTop(Pe){return z.getDimension(Pe,"margin-top","marginTop")}static getMarginRight(Pe){return z.getDimension(Pe,"margin-right","marginRight")}static getMarginBottom(Pe){return z.getDimension(Pe,"margin-bottom","marginBottom")}}class U{constructor(Pe,Ge){this.width=Pe,this.height=Ge}with(Pe=this.width,Ge=this.height){return Pe!==this.width||Ge!==this.height?new U(Pe,Ge):this}static is(Pe){return typeof Pe=="object"&&typeof Pe.height=="number"&&typeof Pe.width=="number"}static lift(Pe){return Pe instanceof U?Pe:new U(Pe.width,Pe.height)}static equals(Pe,Ge){return Pe===Ge?!0:!Pe||!Ge?!1:Pe.width===Ge.width&&Pe.height===Ge.height}}e.Dimension=U,U.None=new U(0,0);function H($e){let Pe=$e.offsetParent,Ge=$e.offsetTop,Ye=$e.offsetLeft;for(;($e=$e.parentNode)!==null&&$e!==document.body&&$e!==document.documentElement;){Ge-=$e.scrollTop;const je=oe($e)?null:P($e);je&&(Ye-=je.direction!=="rtl"?$e.scrollLeft:-$e.scrollLeft),$e===Pe&&(Ye+=z.getBorderLeftWidth($e),Ge+=z.getBorderTopWidth($e),Ge+=$e.offsetTop,Ye+=$e.offsetLeft,Pe=$e.offsetParent)}return{left:Ye,top:Ge}}e.getTopLeftOffset=H;function K($e,Pe,Ge){typeof Pe=="number"&&($e.style.width=`${Pe}px`),typeof Ge=="number"&&($e.style.height=`${Ge}px`)}e.size=K;function G($e,Pe,Ge,Ye,je,Oe="absolute"){typeof Pe=="number"&&($e.style.top=`${Pe}px`),typeof Ge=="number"&&($e.style.right=`${Ge}px`),typeof Ye=="number"&&($e.style.bottom=`${Ye}px`),typeof je=="number"&&($e.style.left=`${je}px`),$e.style.position=Oe}e.position=G;function q($e){let Pe=$e.getBoundingClientRect();return{left:Pe.left+e.StandardWindow.scrollX,top:Pe.top+e.StandardWindow.scrollY,width:Pe.width,height:Pe.height}}e.getDomNodePagePosition=q,e.StandardWindow=new class{get scrollX(){return typeof window.scrollX=="number"?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft}get scrollY(){return typeof window.scrollY=="number"?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop}};function Z($e){let Pe=z.getMarginLeft($e)+z.getMarginRight($e);return $e.offsetWidth+Pe}e.getTotalWidth=Z;function j($e){let Pe=z.getBorderLeftWidth($e)+z.getBorderRightWidth($e),Ge=z.getPaddingLeft($e)+z.getPaddingRight($e);return $e.offsetWidth-Pe-Ge}e.getContentWidth=j;function X($e){let Pe=z.getMarginLeft($e)+z.getMarginRight($e);return $e.scrollWidth+Pe}e.getTotalScrollWidth=X;function Y($e){let Pe=z.getBorderTopWidth($e)+z.getBorderBottomWidth($e),Ge=z.getPaddingTop($e)+z.getPaddingBottom($e);return $e.offsetHeight-Pe-Ge}e.getContentHeight=Y;function $($e){let Pe=z.getMarginTop($e)+z.getMarginBottom($e);return $e.offsetHeight+Pe}e.getTotalHeight=$;function J($e,Pe){if($e===null)return 0;let Ge=H($e),Ye=H(Pe);return Ge.left-Ye.left}function ee($e,Pe){let Ge=Pe.map(je=>Math.max(X(je),Z(je))+J(je,$e)||0);return Math.max(...Ge)}e.getLargestChildWidth=ee;function te($e,Pe){for(;$e;){if($e===Pe)return!0;$e=$e.parentNode}return!1}e.isAncestor=te;const se="parentFlowToElementId";function ie($e,Pe){$e.dataset[se]=Pe.id}e.setParentFlowTo=ie;function ce($e){const Pe=$e.dataset[se];return typeof Pe=="string"?document.getElementById(Pe):null}function le($e,Pe){let Ge=$e;for(;Ge;){if(Ge===Pe)return!0;if(Ge instanceof HTMLElement){const Ye=ce(Ge);if(Ye){Ge=Ye;continue}}Ge=Ge.parentNode}return!1}e.isAncestorUsingFlowTo=le;function ae($e,Pe,Ge){for(;$e&&$e.nodeType===$e.ELEMENT_NODE;){if($e.classList.contains(Pe))return $e;if(Ge){if(typeof Ge=="string"){if($e.classList.contains(Ge))return null}else if($e===Ge)return null}$e=$e.parentNode}return null}e.findParentWithClass=ae;function ue($e,Pe,Ge){return!!ae($e,Pe,Ge)}e.hasParentWithClass=ue;function oe($e){return $e&&!!$e.host&&!!$e.mode}e.isShadowRoot=oe;function fe($e){return!!pe($e)}e.isInShadowDOM=fe;function pe($e){for(;$e.parentNode;){if($e===document.body)return null;$e=$e.parentNode}return oe($e)?$e:null}e.getShadowRoot=pe;function me(){let $e=document.activeElement;for(;$e?.shadowRoot;)$e=$e.shadowRoot.activeElement;return $e}e.getActiveElement=me;function be($e=document.getElementsByTagName("head")[0]){let Pe=document.createElement("style");return Pe.type="text/css",Pe.media="screen",$e.appendChild(Pe),Pe}e.createStyleSheet=be;function Ce($e=document.getElementsByTagName("head")[0]){let Pe=document.createElement("meta");return $e.appendChild(Pe),Pe}e.createMetaElement=Ce;let ve=null;function he(){return ve||(ve=be()),ve}function ge($e){return $e?.sheet?.rules?$e.sheet.rules:$e?.sheet?.cssRules?$e.sheet.cssRules:[]}function de($e,Pe,Ge=he()){!Ge||!Pe||Ge.sheet.insertRule($e+"{"+Pe+"}",0)}e.createCSSRule=de;function Se($e,Pe=he()){if(!Pe)return;let Ge=ge(Pe),Ye=[];for(let je=0;je<Ge.length;je++)Ge[je].selectorText.indexOf($e)!==-1&&Ye.push(je);for(let je=Ye.length-1;je>=0;je--)Pe.sheet.deleteRule(Ye[je])}e.removeCSSRulesContainingSelector=Se;function we($e){return typeof HTMLElement=="object"?$e instanceof HTMLElement:$e&&typeof $e=="object"&&$e.nodeType===1&&typeof $e.nodeName=="string"}e.isHTMLElement=we,e.EventType={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:t.isWebKit?"webkitAnimationStart":"animationstart",ANIMATION_END:t.isWebKit?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:t.isWebKit?"webkitAnimationIteration":"animationiteration"},e.EventHelper={stop:function($e,Pe){$e.preventDefault?$e.preventDefault():$e.returnValue=!1,Pe&&($e.stopPropagation?$e.stopPropagation():$e.cancelBubble=!0)}};function ye($e){let Pe=[];for(let Ge=0;$e&&$e.nodeType===$e.ELEMENT_NODE;Ge++)Pe[Ge]=$e.scrollTop,$e=$e.parentNode;return Pe}e.saveParentsScrollTop=ye;function ke($e,Pe){for(let Ge=0;$e&&$e.nodeType===$e.ELEMENT_NODE;Ge++)$e.scrollTop!==Pe[Ge]&&($e.scrollTop=Pe[Ge]),$e=$e.parentNode}e.restoreParentsScrollTop=ke;class Ie extends v.Disposable{constructor(Pe){super();this._onDidFocus=this._register(new I.Emitter),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new I.Emitter),this.onDidBlur=this._onDidBlur.event;let Ge=Ie.hasFocusWithin(Pe),Ye=!1;const je=()=>{Ye=!1,Ge||(Ge=!0,this._onDidFocus.fire())},Oe=()=>{Ge&&(Ye=!0,window.setTimeout(()=>{Ye&&(Ye=!1,Ge=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{Ie.hasFocusWithin(Pe)!==Ge&&(Ge?Oe():je())},this._register(r(Pe,e.EventType.FOCUS,je,!0)),this._register(r(Pe,e.EventType.BLUR,Oe,!0)),this._register(r(Pe,e.EventType.FOCUS_IN,()=>this._refreshStateHandler())),this._register(r(Pe,e.EventType.FOCUS_OUT,()=>this._refreshStateHandler()))}static hasFocusWithin(Pe){const Ge=pe(Pe),Ye=Ge?Ge.activeElement:document.activeElement;return te(Ye,Pe)}refreshState(){this._refreshStateHandler()}}function Te($e){return new Ie($e)}e.trackFocus=Te;function De($e,Pe){return $e.after(Pe),Pe}e.after=De;function _e($e,...Pe){if($e.append(...Pe),Pe.length===1&&typeof Pe[0]!="string")return Pe[0]}e.append=_e;function Re($e,Pe){return $e.insertBefore(Pe,$e.firstChild),Pe}e.prepend=Re;function Ne($e,...Pe){$e.innerText="",_e($e,...Pe)}e.reset=Ne;const xe=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var Ae;(function($e){$e.HTML="http://www.w3.org/1999/xhtml",$e.SVG="http://www.w3.org/2000/svg"})(Ae=e.Namespace||(e.Namespace={}));function Le($e,Pe,Ge,...Ye){let je=xe.exec(Pe);if(!je)throw new Error("Bad use of emmet");Ge={...Ge||{}};let Oe=je[1]||"div",ze;return $e!==Ae.HTML?ze=document.createElementNS($e,Oe):ze=document.createElement(Oe),je[3]&&(ze.id=je[3]),je[4]&&(ze.className=je[4].replace(/\./g," ").trim()),Object.keys(Ge).forEach(Je=>{const ot=Ge[Je];typeof ot!="undefined"&&(/^on\w+$/.test(Je)?ze[Je]=ot:Je==="selected"?ot&&ze.setAttribute(Je,"true"):ze.setAttribute(Je,ot))}),ze.append(...Ye),ze}function Me($e,Pe,...Ge){return Le(Ae.HTML,$e,Pe,...Ge)}e.$=Me,Me.SVG=function($e,Pe,...Ge){return Le(Ae.SVG,$e,Pe,...Ge)};function We($e,Pe){const Ge=[];return $e.forEach((Ye,je)=>{je>0&&(Pe instanceof Node?Ge.push(Pe.cloneNode()):Ge.push(document.createTextNode(Pe))),Ge.push(Ye)}),Ge}e.join=We;function Ve(...$e){for(let Pe of $e)Pe.style.display="",Pe.removeAttribute("aria-hidden")}e.show=Ve;function Ue(...$e){for(let Pe of $e)Pe.style.display="none",Pe.setAttribute("aria-hidden","true")}e.hide=Ue;function et($e,Pe){for(;$e&&$e.nodeType===$e.ELEMENT_NODE;){if($e instanceof HTMLElement&&$e.hasAttribute(Pe))return $e;$e=$e.parentNode}return null}function Ze($e){if(!(!$e||!$e.hasAttribute("tabIndex"))){if(document.activeElement===$e){let Pe=et($e.parentElement,"tabIndex");Pe&&Pe.focus()}$e.removeAttribute("tabindex")}}e.removeTabIndexAndUpdateFocus=Ze;function Fe($e){return Array.prototype.slice.call(document.getElementsByTagName($e),0)}e.getElementsByTagName=Fe;function Qe($e){return Pe=>{Pe.preventDefault(),Pe.stopPropagation(),$e(Pe)}}e.finalHandler=Qe;function qe(){return new Promise($e=>{document.readyState==="complete"||document&&document.body!==null?$e(void 0):window.addEventListener("DOMContentLoaded",$e,!1)})}e.domContentLoaded=qe;function Be($e){const Pe=window.devicePixelRatio*$e;return Math.max(1,Math.floor(Pe))/window.devicePixelRatio}e.computeScreenAwareSize=Be;function Ke($e){window.open($e,"_blank","noopener")}e.windowOpenNoOpener=Ke;const Xe=780,rt=640;function it($e){const Pe=Math.floor(window.screenLeft+window.innerWidth/2-Xe/2),Ge=Math.floor(window.screenTop+window.innerHeight/2-rt/2);window.open($e,"_blank",`width=${Xe},height=${rt},top=${Ge},left=${Pe}`)}e.windowOpenPopup=it;function at($e,Pe=!0){const Ge=window.open();return Ge?(Pe&&(Ge.opener=null),Ge.location.href=$e,!0):!1}e.windowOpenWithSuccess=at;function ft($e){const Pe=()=>{$e(),Ge=(0,e.scheduleAtNextAnimationFrame)(Pe)};let Ge=(0,e.scheduleAtNextAnimationFrame)(Pe);return(0,v.toDisposable)(()=>Ge.dispose())}e.animate=ft,C.RemoteAuthorities.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");function vt($e){return $e?`url('${C.FileAccess.asBrowserUri($e).toString(!0).replace(/'/g,"%27")}')`:"url('')"}e.asCSSUrl=vt;function Dt($e){return`'${$e.replace(/'/g,"%27")}'`}e.asCSSPropertyValue=Dt;function kt($e,Pe){let Ge;if(i.URI.isUri($e))Ge=$e.toString(!0);else{const je=new Blob([$e]);Ge=URL.createObjectURL(je),setTimeout(()=>URL.revokeObjectURL(Ge))}const Ye=document.createElement("a");document.body.appendChild(Ye),Ye.download=Pe,Ye.href=Ge,Ye.click(),setTimeout(()=>document.body.removeChild(Ye))}e.triggerDownload=kt;function At(){return new Promise($e=>{const Pe=document.createElement("input");document.body.appendChild(Pe),Pe.type="file",Pe.multiple=!0,I.Event.once(I.Event.fromDOMEventEmitter(Pe,"input"))(()=>{$e((0,c.withNullAsUndefined)(Pe.files))}),Pe.click(),setTimeout(()=>document.body.removeChild(Pe))})}e.triggerUpload=At;var St;(function($e){$e[$e.DOCUMENT=1]="DOCUMENT",$e[$e.BROWSER=2]="BROWSER"})(St=e.DetectedFullscreenMode||(e.DetectedFullscreenMode={}));function He(){return document.fullscreenElement||document.webkitFullscreenElement||document.webkitIsFullScreen?{mode:St.DOCUMENT,guess:!1}:window.innerHeight===screen.height?{mode:St.BROWSER,guess:!1}:(o.isMacintosh||o.isLinux)&&window.outerHeight===screen.height&&window.outerWidth===screen.width?{mode:St.BROWSER,guess:!0}:null}e.detectFullscreen=He;function ct($e,Pe=!1){const Ge=document.createElement("a");return w.addHook("afterSanitizeAttributes",Ye=>{for(const je of["href","src"])if(Ye.hasAttribute(je)){const Oe=Ye.getAttribute(je);if(je==="href"&&Oe.startsWith("#"))continue;if(Ge.href=Oe,!$e.includes(Ge.protocol.replace(/:$/,""))){if(Pe&&je==="src"&&Ge.href.startsWith("data:"))continue;Ye.removeAttribute(je)}}}),(0,v.toDisposable)(()=>{w.removeHook("afterSanitizeAttributes")})}e.hookDomPurifyHrefAndSrcSanitizer=ct;const lt=[C.Schemas.http,C.Schemas.https,C.Schemas.command];function ut($e,Pe){const Ge={ALLOWED_TAGS:["a","button","blockquote","code","div","h1","h2","h3","h4","h5","h6","hr","input","label","li","p","pre","select","small","span","strong","textarea","ul","ol"],ALLOWED_ATTR:["href","data-href","data-command","target","title","name","src","alt","class","id","role","tabindex","style","data-code","width","height","align","x-dispatch","required","checked","placeholder","type"],RETURN_DOM:!1,RETURN_DOM_FRAGMENT:!1},Ye=ct(lt);try{const je=w.sanitize(Pe,{...Ge,RETURN_TRUSTED_TYPE:!0});$e.innerHTML=je}finally{Ye.dispose()}}e.safeInnerHtml=ut;function pt($e){const Pe=new Uint16Array($e.length);for(let je=0;je<Pe.length;je++)Pe[je]=$e.charCodeAt(je);let Ge="";const Ye=new Uint8Array(Pe.buffer);for(let je=0;je<Ye.length;je++)Ge+=String.fromCharCode(Ye[je]);return Ge}function Et($e){return btoa(pt($e))}e.multibyteAwareBtoa=Et;class yt extends I.Emitter{constructor(){super();this._subscriptions=new v.DisposableStore,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(r(window,"keydown",Pe=>{if(Pe.defaultPrevented)return;const Ge=new _.StandardKeyboardEvent(Pe);if(!(Ge.keyCode===6&&Pe.repeat)){if(Pe.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(Pe.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(Pe.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(Pe.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else if(Ge.keyCode!==6)this._keyStatus.lastKeyPressed=void 0;else return;this._keyStatus.altKey=Pe.altKey,this._keyStatus.ctrlKey=Pe.ctrlKey,this._keyStatus.metaKey=Pe.metaKey,this._keyStatus.shiftKey=Pe.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=Pe,this.fire(this._keyStatus))}},!0)),this._subscriptions.add(r(window,"keyup",Pe=>{Pe.defaultPrevented||(!Pe.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!Pe.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!Pe.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!Pe.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=Pe.altKey,this._keyStatus.ctrlKey=Pe.ctrlKey,this._keyStatus.metaKey=Pe.metaKey,this._keyStatus.shiftKey=Pe.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=Pe,this.fire(this._keyStatus)))},!0)),this._subscriptions.add(r(document.body,"mousedown",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(r(document.body,"mouseup",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(r(document.body,"mousemove",Pe=>{Pe.buttons&&(this._keyStatus.lastKeyPressed=void 0)},!0)),this._subscriptions.add(r(window,"blur",()=>{this.resetKeyStatus()}))}get keyStatus(){return this._keyStatus}get isModifierPressed(){return this._keyStatus.altKey||this._keyStatus.ctrlKey||this._keyStatus.metaKey||this._keyStatus.shiftKey}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return yt.instance||(yt.instance=new yt),yt.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}e.ModifierKeyEmitter=yt;function mt($e){const Pe=document.cookie.match("(^|[^;]+)\\s*"+$e+"\\s*=\\s*([^;]+)");return Pe?Pe.pop():void 0}e.getCookieValue=mt;var It;(function($e){$e[$e.SASH=35]="SASH",$e[$e.SuggestWidget=40]="SuggestWidget",$e[$e.Hover=50]="Hover",$e[$e.DragImage=1e3]="DragImage",$e[$e.MenubarMenuItemsHolder=2e3]="MenubarMenuItemsHolder",$e[$e.ContextView=2500]="ContextView",$e[$e.ModalDialog=2600]="ModalDialog",$e[$e.PaneDropOverlay=1e4]="PaneDropOverlay"})(It=e.ZIndex||(e.ZIndex={}));class Rt extends v.Disposable{constructor(Pe,Ge){super();this.element=Pe,this.callbacks=Ge,this.counter=0,this.registerListeners()}registerListeners(){this._register(r(this.element,e.EventType.DRAG_ENTER,Pe=>{this.counter++,this.callbacks.onDragEnter(Pe)})),this._register(r(this.element,e.EventType.DRAG_OVER,Pe=>{Pe.preventDefault(),this.callbacks.onDragOver&&this.callbacks.onDragOver(Pe)})),this._register(r(this.element,e.EventType.DRAG_LEAVE,Pe=>{this.counter--,this.counter===0&&this.callbacks.onDragLeave(Pe)})),this._register(r(this.element,e.EventType.DRAG_END,Pe=>{this.counter=0,this.callbacks.onDragEnd(Pe)})),this._register(r(this.element,e.EventType.DROP,Pe=>{this.counter=0,this.callbacks.onDrop(Pe)}))}}e.DragAndDropObserver=Rt}),define(ne[170],re([1,0,10,2,169]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StaticDND=e.DragAndDropData=e.applyDragImage=e.DataTransfers=e.DelayedDragHandler=void 0;class A extends f.Disposable{constructor(w,v){super();this._register((0,t.addDisposableListener)(w,"dragover",C=>{C.preventDefault(),this.timeout||(this.timeout=setTimeout(()=>{v(),this.timeout=null},800))})),["dragleave","drop","dragend"].forEach(C=>{this._register((0,t.addDisposableListener)(w,C,()=>{this.clearDragTimeout()}))})}clearDragTimeout(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)}dispose(){super.dispose(),this.clearDragTimeout()}}e.DelayedDragHandler=A,e.DataTransfers={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:_.Mimes.text,TERMINALS:"Terminals"};function k(I,w,v){const C=document.createElement("div");C.className=v,C.textContent=w,I.dataTransfer&&(document.body.appendChild(C),I.dataTransfer.setDragImage(C,-10,-10),setTimeout(()=>document.body.removeChild(C),0))}e.applyDragImage=k;class D{constructor(w){this.data=w}update(){}getData(){return this.data}}e.DragAndDropData=D,e.StaticDND={CurrentDragAndDropData:void 0}}),define(ne[446],re([1,0,10]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createElement=e.renderFormattedText=e.renderText=void 0;function f(o,c={}){const i=A(c);return i.textContent=o,i}e.renderText=f;function _(o,c={}){const i=A(c);return I(i,w(o,!!c.renderCodeSegments),c.actionHandler,c.renderCodeSegments),i}e.renderFormattedText=_;function A(o){const c=o.inline?"span":"div",i=document.createElement(c);return o.className&&(i.className=o.className),i}e.createElement=A;class k{constructor(c){this.source=c,this.index=0}eos(){return this.index>=this.source.length}next(){const c=this.peek();return this.advance(),c}peek(){return this.source[this.index]}advance(){this.index++}}var D;(function(o){o[o.Invalid=0]="Invalid",o[o.Root=1]="Root",o[o.Text=2]="Text",o[o.Bold=3]="Bold",o[o.Italics=4]="Italics",o[o.Action=5]="Action",o[o.ActionClose=6]="ActionClose",o[o.Code=7]="Code",o[o.NewLine=8]="NewLine"})(D||(D={}));function I(o,c,i,S){let s;if(c.type===2)s=document.createTextNode(c.content||"");else if(c.type===3)s=document.createElement("b");else if(c.type===4)s=document.createElement("i");else if(c.type===7&&S)s=document.createElement("code");else if(c.type===5&&i){const l=document.createElement("a");i.disposables.add(t.addStandardDisposableListener(l,"click",r=>{i.callback(String(c.index),r)})),s=l}else c.type===8?s=document.createElement("br"):c.type===1&&(s=o);s&&o!==s&&o.appendChild(s),s&&Array.isArray(c.children)&&c.children.forEach(l=>{I(s,l,i,S)})}function w(o,c){const i={type:1,children:[]};let S=0,s=i;const l=[],r=new k(o);for(;!r.eos();){let p=r.next();const u=p==="\\"&&C(r.peek(),c)!==0;if(u&&(p=r.next()),!u&&v(p,c)&&p===r.peek()){r.advance(),s.type===2&&(s=l.pop());const a=C(p,c);if(s.type===a||s.type===5&&a===6)s=l.pop();else{const n={type:a,children:[]};a===5&&(n.index=S,S++),s.children.push(n),l.push(s),s=n}}else if(p===` `)s.type===2&&(s=l.pop()),s.children.push({type:8});else if(s.type!==2){const a={type:2,content:p};s.children.push(a),l.push(s),s=a}else s.content+=p}return s.type===2&&(s=l.pop()),l.length,i}function v(o,c){return C(o,c)!==0}function C(o,c){switch(o){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return c?7:0;default:return 0}}}),define(ne[381],re([1,0,10,2]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalPointerMoveMonitor=e.standardPointerMoveMerger=void 0;function _(k,D){return D.preventDefault(),{leftButton:D.button===0,buttons:D.buttons,pageX:D.pageX,pageY:D.pageY}}e.standardPointerMoveMerger=_;class A{constructor(){this._hooks=new f.DisposableStore,this._pointerMoveEventMerger=null,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(D,I){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveEventMerger=null,this._pointerMoveCallback=null;const w=this._onStopCallback;this._onStopCallback=null,D&&w&&w(I)}isMonitoring(){return!!this._pointerMoveEventMerger}startMonitoring(D,I,w,v,C,o){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveEventMerger=v,this._pointerMoveCallback=C,this._onStopCallback=o;try{D.setPointerCapture(I),this._hooks.add((0,f.toDisposable)(()=>{D.releasePointerCapture(I)}))}catch{}this._hooks.add(t.addDisposableThrottledListener(D,t.EventType.POINTER_MOVE,c=>{if(c.buttons!==w){this.stopMonitoring(!0);return}this._pointerMoveCallback(c)},(c,i)=>this._pointerMoveEventMerger(c,i))),this._hooks.add(t.addDisposableListener(D,t.EventType.POINTER_UP,c=>this.stopMonitoring(!0)))}}e.GlobalPointerMoveMonitor=A}),define(ne[129],re([1,0,10,15,110,2]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Gesture=e.EventType=void 0;var k;(function(I){I.Tap="-monaco-gesturetap",I.Change="-monaco-gesturechange",I.Start="-monaco-gesturestart",I.End="-monaco-gesturesend",I.Contextmenu="-monaco-gesturecontextmenu"})(k=e.EventType||(e.EventType={}));class D extends A.Disposable{constructor(){super();this.dispatched=!1,this.activeTouches={},this.handle=null,this.targets=[],this.ignoreTargets=[],this._lastSetTapCountTime=0,this._register(t.addDisposableListener(document,"touchstart",w=>this.onTouchStart(w),{passive:!1})),this._register(t.addDisposableListener(document,"touchend",w=>this.onTouchEnd(w))),this._register(t.addDisposableListener(document,"touchmove",w=>this.onTouchMove(w),{passive:!1}))}static addTarget(w){return D.isTouchDevice()?(D.INSTANCE||(D.INSTANCE=new D),D.INSTANCE.targets.push(w),{dispose:()=>{D.INSTANCE.targets=D.INSTANCE.targets.filter(v=>v!==w)}}):A.Disposable.None}static ignoreTarget(w){return D.isTouchDevice()?(D.INSTANCE||(D.INSTANCE=new D),D.INSTANCE.ignoreTargets.push(w),{dispose:()=>{D.INSTANCE.ignoreTargets=D.INSTANCE.ignoreTargets.filter(v=>v!==w)}}):A.Disposable.None}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(w){let v=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let C=0,o=w.targetTouches.length;C<o;C++){let c=w.targetTouches.item(C);this.activeTouches[c.identifier]={id:c.identifier,initialTarget:c.target,initialTimeStamp:v,initialPageX:c.pageX,initialPageY:c.pageY,rollingTimestamps:[v],rollingPageX:[c.pageX],rollingPageY:[c.pageY]};let i=this.newGestureEvent(k.Start,c.target);i.pageX=c.pageX,i.pageY=c.pageY,this.dispatchEvent(i)}this.dispatched&&(w.preventDefault(),w.stopPropagation(),this.dispatched=!1)}onTouchEnd(w){let v=Date.now(),C=Object.keys(this.activeTouches).length;for(let o=0,c=w.changedTouches.length;o<c;o++){let i=w.changedTouches.item(o);if(!this.activeTouches.hasOwnProperty(String(i.identifier))){console.warn("move of an UNKNOWN touch",i);continue}let S=this.activeTouches[i.identifier],s=Date.now()-S.initialTimeStamp;if(s<D.HOLD_DELAY&&Math.abs(S.initialPageX-f.tail(S.rollingPageX))<30&&Math.abs(S.initialPageY-f.tail(S.rollingPageY))<30){let l=this.newGestureEvent(k.Tap,S.initialTarget);l.pageX=f.tail(S.rollingPageX),l.pageY=f.tail(S.rollingPageY),this.dispatchEvent(l)}else if(s>=D.HOLD_DELAY&&Math.abs(S.initialPageX-f.tail(S.rollingPageX))<30&&Math.abs(S.initialPageY-f.tail(S.rollingPageY))<30){let l=this.newGestureEvent(k.Contextmenu,S.initialTarget);l.pageX=f.tail(S.rollingPageX),l.pageY=f.tail(S.rollingPageY),this.dispatchEvent(l)}else if(C===1){let l=f.tail(S.rollingPageX),r=f.tail(S.rollingPageY),p=f.tail(S.rollingTimestamps)-S.rollingTimestamps[0],u=l-S.rollingPageX[0],a=r-S.rollingPageY[0];const n=this.targets.filter(h=>S.initialTarget instanceof Node&&h.contains(S.initialTarget));this.inertia(n,v,Math.abs(u)/p,u>0?1:-1,l,Math.abs(a)/p,a>0?1:-1,r)}this.dispatchEvent(this.newGestureEvent(k.End,S.initialTarget)),delete this.activeTouches[i.identifier]}this.dispatched&&(w.preventDefault(),w.stopPropagation(),this.dispatched=!1)}newGestureEvent(w,v){let C=document.createEvent("CustomEvent");return C.initEvent(w,!1,!0),C.initialTarget=v,C.tapCount=0,C}dispatchEvent(w){if(w.type===k.Tap){const v=new Date().getTime();let C=0;v-this._lastSetTapCountTime>D.CLEAR_TAP_COUNT_TIME?C=1:C=2,this._lastSetTapCountTime=v,w.tapCount=C}else(w.type===k.Change||w.type===k.Contextmenu)&&(this._lastSetTapCountTime=0);for(let v=0;v<this.ignoreTargets.length;v++)if(w.initialTarget instanceof Node&&this.ignoreTargets[v].contains(w.initialTarget))return;this.targets.forEach(v=>{w.initialTarget instanceof Node&&v.contains(w.initialTarget)&&(v.dispatchEvent(w),this.dispatched=!0)})}inertia(w,v,C,o,c,i,S,s){this.handle=t.scheduleAtNextAnimationFrame(()=>{let l=Date.now(),r=l-v,p=0,u=0,a=!0;C+=D.SCROLL_FRICTION*r,i+=D.SCROLL_FRICTION*r,C>0&&(a=!1,p=o*C*r),i>0&&(a=!1,u=S*i*r);let n=this.newGestureEvent(k.Change);n.translationX=p,n.translationY=u,w.forEach(h=>h.dispatchEvent(n)),a||this.inertia(w,l,C,o,c+p,i,S,s+u)})}onTouchMove(w){let v=Date.now();for(let C=0,o=w.changedTouches.length;C<o;C++){let c=w.changedTouches.item(C);if(!this.activeTouches.hasOwnProperty(String(c.identifier))){console.warn("end of an UNKNOWN touch",c);continue}let i=this.activeTouches[c.identifier],S=this.newGestureEvent(k.Change,i.initialTarget);S.translationX=c.pageX-f.tail(i.rollingPageX),S.translationY=c.pageY-f.tail(i.rollingPageY),S.pageX=c.pageX,S.pageY=c.pageY,this.dispatchEvent(S),i.rollingPageX.length>3&&(i.rollingPageX.shift(),i.rollingPageY.shift(),i.rollingTimestamps.shift()),i.rollingPageX.push(c.pageX),i.rollingPageY.push(c.pageY),i.rollingTimestamps.push(v)}this.dispatched&&(w.preventDefault(),w.stopPropagation(),this.dispatched=!1)}}D.SCROLL_FRICTION=-.005,D.HOLD_DELAY=700,D.CLEAR_TAP_COUNT_TIME=400,Ee([_.memoize],D,"isTouchDevice",null),e.Gesture=D}),define(ne[181],re([1,0,10,33]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderIcon=e.renderLabelWithIcons=void 0;const _=new RegExp(`(\\\\)?\\$\\((${f.CSSIcon.iconNameExpression}(?:${f.CSSIcon.iconModifierExpression})?)\\)`,"g");function A(D){const I=new Array;let w,v=0,C=0;for(;(w=_.exec(D))!==null;){C=w.index||0,I.push(D.substring(v,C)),v=(w.index||0)+w[0].length;const[,o,c]=w;I.push(o?`$(${c})`:k({id:c}))}return v<D.length&&I.push(D.substring(v)),I}e.renderLabelWithIcons=A;function k(D){const I=t.$("span");return I.classList.add(...f.CSSIcon.asClassNameArray(D)),I}e.renderIcon=k}),define(ne[241],re([1,0,10,181,51]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HighlightedLabel=void 0;class A{constructor(D,I){this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=I?.supportIcons??!1,this.domNode=t.append(D,t.$("span.monaco-highlighted-label"))}get element(){return this.domNode}set(D,I=[],w="",v){D||(D=""),v&&(D=A.escapeNewLines(D,I)),!(this.didEverRender&&this.text===D&&this.title===w&&_.equals(this.highlights,I))&&(this.text=D,this.title=w,this.highlights=I,this.render())}render(){const D=[];let I=0;for(const w of this.highlights){if(w.end===w.start)continue;if(I<w.start){const o=this.text.substring(I,w.start);D.push(t.$("span",void 0,...this.supportIcons?(0,f.renderLabelWithIcons)(o):[o])),I=w.end}const v=this.text.substring(w.start,w.end),C=t.$("span.highlight",void 0,...this.supportIcons?(0,f.renderLabelWithIcons)(v):[v]);w.extraClasses&&C.classList.add(...w.extraClasses),D.push(C),I=w.end}if(I<this.text.length){const w=this.text.substring(I);D.push(t.$("span",void 0,...this.supportIcons?(0,f.renderLabelWithIcons)(w):[w]))}t.reset(this.domNode,...D),this.title?this.domNode.title=this.title:this.domNode.removeAttribute("title"),this.didEverRender=!0}static escapeNewLines(D,I){let w=0,v=0;return D.replace(/\r\n|\r|\n/g,(C,o)=>{v=C===`\r `?-1:0,o+=w;for(const c of I)c.end<=o||(c.start>=o&&(c.start+=v),c.end>=o&&(c.end+=v));return w+=v,"\u23CE"})}}e.HighlightedLabel=A}),define(ne[517],re([1,0,10,181]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleIconLabel=void 0;class _{constructor(k){this._container=k}set text(k){(0,t.reset)(this._container,...(0,f.renderLabelWithIcons)(k??""))}set title(k){this._container.title=k}}e.SimpleIconLabel=_}),define(ne[961],re([1,0,10]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RowCache=void 0;function f(A){try{A.parentElement&&A.parentElement.removeChild(A)}catch{}}class _{constructor(k){this.renderers=k,this.cache=new Map}alloc(k){let D=this.getTemplateCache(k).pop();if(!D){const I=(0,t.$)(".monaco-list-row"),v=this.getRenderer(k).renderTemplate(I);D={domNode:I,templateId:k,templateData:v}}return D}release(k){!k||this.releaseRow(k)}releaseRow(k){const{domNode:D,templateId:I}=k;D&&(D.classList.remove("scrolling"),f(D)),this.getTemplateCache(I).push(k)}getTemplateCache(k){let D=this.cache.get(k);return D||(D=[],this.cache.set(k,D)),D}dispose(){this.cache.forEach((k,D)=>{for(const I of k)this.getRenderer(D).disposeTemplate(I.templateData),I.templateData=null}),this.cache.clear()}getRenderer(k){const D=this.renderers.get(k);if(!D)throw new Error(`No renderer found for ${k}`);return D}}e.RowCache=_}),define(ne[962],re([1,0,11,2]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarVisibilityController=void 0;class _ extends f.Disposable{constructor(k,D,I){super();this._visibility=k,this._visibleClassName=D,this._invisibleClassName=I,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new t.TimeoutTimer)}setVisibility(k){this._visibility!==k&&(this._visibility=k,this._updateShouldBeVisible())}setShouldBeVisible(k){this._rawShouldBeVisible=k,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){const k=this._applyVisibilitySetting();this._shouldBeVisible!==k&&(this._shouldBeVisible=k,this.ensureVisibility())}setIsNeeded(k){this._isNeeded!==k&&(this._isNeeded=k,this.ensureVisibility())}setDomNode(k){this._domNode=k,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{this._domNode&&this._domNode.setClassName(this._visibleClassName)},0))}_hide(k){this._revealTimer.cancel(),!!this._isVisible&&(this._isVisible=!1,this._domNode&&this._domNode.setClassName(this._invisibleClassName+(k?" fade":"")))}}e.ScrollbarVisibilityController=_}),define(ne[963],re([1,0,10,129,15,6,2,14]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectBoxNative=void 0;class I extends k.Disposable{constructor(v,C,o,c){super();this.selected=0,this.selectBoxOptions=c||Object.create(null),this.options=[],this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box",typeof this.selectBoxOptions.ariaLabel=="string"&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),this._onDidSelect=this._register(new A.Emitter),this.styles=o,this.registerListeners(),this.setOptions(v,C)}registerListeners(){this._register(f.Gesture.addTarget(this.selectElement)),[f.EventType.Tap].forEach(v=>{this._register(t.addDisposableListener(this.selectElement,v,C=>{this.selectElement.focus()}))}),this._register(t.addStandardDisposableListener(this.selectElement,"click",v=>{t.EventHelper.stop(v,!0)})),this._register(t.addStandardDisposableListener(this.selectElement,"change",v=>{this.selectElement.title=v.target.value,this._onDidSelect.fire({index:v.target.selectedIndex,selected:v.target.value})})),this._register(t.addStandardDisposableListener(this.selectElement,"keydown",v=>{let C=!1;D.isMacintosh?(v.keyCode===18||v.keyCode===16||v.keyCode===10)&&(C=!0):(v.keyCode===18&&v.altKey||v.keyCode===10||v.keyCode===3)&&(C=!0),C&&v.stopPropagation()}))}get onDidSelect(){return this._onDidSelect.event}setOptions(v,C){(!this.options||!_.equals(this.options,v))&&(this.options=v,this.selectElement.options.length=0,this.options.forEach((o,c)=>{this.selectElement.add(this.createOption(o.text,c,o.isDisabled))})),C!==void 0&&this.select(C)}select(v){this.options.length===0?this.selected=0:v>=0&&v<this.options.length?this.selected=v:v>this.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selected<this.options.length&&typeof this.options[this.selected].text=="string"?this.selectElement.title=this.options[this.selected].text:this.selectElement.title=""}setAriaLabel(v){this.selectBoxOptions.ariaLabel=v,this.selectElement.setAttribute("aria-label",v)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(v){this.selectElement.tabIndex=v?0:-1}render(v){v.classList.add("select-container"),v.appendChild(this.selectElement),this.setOptions(this.options,this.selected),this.applyStyles()}style(v){this.styles=v,this.applyStyles()}applyStyles(){if(this.selectElement){const v=this.styles.selectBackground?this.styles.selectBackground.toString():"",C=this.styles.selectForeground?this.styles.selectForeground.toString():"",o=this.styles.selectBorder?this.styles.selectBorder.toString():"";this.selectElement.style.backgroundColor=v,this.selectElement.style.color=C,this.selectElement.style.borderColor=o}}createOption(v,C,o){const c=document.createElement("option");return c.value=v,c.text=v,c.disabled=!!o,c}}e.SelectBoxNative=I}),define(ne[518],re([1,0,277,15,11,380,6,92]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndexTreeModel=e.getVisibleState=e.isFilterResult=void 0;function I(o){return typeof o=="object"&&"visibility"in o&&"data"in o}e.isFilterResult=I;function w(o){switch(o){case!0:return 1;case!1:return 0;default:return o}}e.getVisibleState=w;function v(o){return typeof o.collapsible=="boolean"}class C{constructor(c,i,S,s={}){this.user=c,this.list=i,this.rootRef=[],this.eventBufferer=new k.EventBufferer,this._onDidChangeCollapseState=new k.Emitter,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new k.Emitter,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new k.Emitter,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new _.Delayer(_.MicrotaskDelay),this.collapseByDefault=typeof s.collapseByDefault=="undefined"?!1:s.collapseByDefault,this.filter=s.filter,this.autoExpandSingleChildren=typeof s.autoExpandSingleChildren=="undefined"?!1:s.autoExpandSingleChildren,this.root={parent:void 0,element:S,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(c,i,S=D.Iterable.empty(),s={}){if(c.length===0)throw new t.TreeError(this.user,"Invalid tree location");s.diffIdentityProvider?this.spliceSmart(s.diffIdentityProvider,c,i,S,s):this.spliceSimple(c,i,S,s)}spliceSmart(c,i,S,s=D.Iterable.empty(),l,r=l.diffDepth??0){const{parentNode:p}=this.getParentNodeWithListIndex(i);if(!p.lastDiffIds)return this.spliceSimple(i,S,s,l);const u=[...s],a=i[i.length-1],n=new A.LcsDiff({getElements:()=>p.lastDiffIds},{getElements:()=>[...p.children.slice(0,a),...u,...p.children.slice(a+S)].map(b=>c.getId(b.element).toString())}).ComputeDiff(!1);if(n.quitEarly)return p.lastDiffIds=void 0,this.spliceSimple(i,S,u,l);const h=i.slice(0,-1),g=(b,E,y)=>{if(r>0)for(let T=0;T<y;T++)b--,E--,this.spliceSmart(c,[...h,b,0],Number.MAX_SAFE_INTEGER,u[E].children,l,r-1)};let d=Math.min(p.children.length,a+S),m=u.length;for(const b of n.changes.sort((E,y)=>y.originalStart-E.originalStart))g(d,m,d-(b.originalStart+b.originalLength)),d=b.originalStart,m=b.modifiedStart-a,this.spliceSimple([...h,d],b.originalLength,D.Iterable.slice(u,m,m+b.modifiedLength),l);g(d,m,d)}spliceSimple(c,i,S=D.Iterable.empty(),{onDidCreateNode:s,onDidDeleteNode:l,diffIdentityProvider:r}){const{parentNode:p,listIndex:u,revealed:a,visible:n}=this.getParentNodeWithListIndex(c),h=[],g=D.Iterable.map(S,L=>this.createTreeNode(L,p,p.visible?1:0,a,h,s)),d=c[c.length-1],m=p.children.length>0;let b=0;for(let L=d;L>=0&&L<p.children.length;L--){const M=p.children[L];if(M.visible){b=M.visibleChildIndex;break}}const E=[];let y=0,T=0;for(const L of g)E.push(L),T+=L.renderNodeCount,L.visible&&(L.visibleChildIndex=b+y++);const R=(0,f.splice)(p.children,d,i,E);r?p.lastDiffIds?(0,f.splice)(p.lastDiffIds,d,i,E.map(L=>r.getId(L.element).toString())):p.lastDiffIds=p.children.map(L=>r.getId(L.element).toString()):p.lastDiffIds=void 0;let O=0;for(const L of R)L.visible&&O++;if(O!==0)for(let L=d+E.length;L<p.children.length;L++){const M=p.children[L];M.visible&&(M.visibleChildIndex-=O)}if(p.visibleChildrenCount+=y-O,a&&n){const L=R.reduce((M,N)=>M+(N.visible?N.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(p,T-L),this.list.splice(u,L,h)}if(R.length>0&&l){const L=M=>{l(M),M.children.forEach(L)};R.forEach(L)}this._onDidSplice.fire({insertedNodes:E,deletedNodes:R});const x=p.children.length>0;m!==x&&this.setCollapsible(c.slice(0,-1),x);let F=p;for(;F;){if(F.visibility===2){this.refilterDelayer.trigger(()=>this.refilter());break}F=F.parent}}rerender(c){if(c.length===0)throw new t.TreeError(this.user,"Invalid tree location");const{node:i,listIndex:S,revealed:s}=this.getTreeNodeWithListIndex(c);i.visible&&s&&this.list.splice(S,1,[i])}updateElementHeight(c,i){if(c.length===0)throw new t.TreeError(this.user,"Invalid tree location");const{listIndex:S}=this.getTreeNodeWithListIndex(c);this.list.updateElementHeight(S,i)}has(c){return this.hasTreeNode(c)}getListIndex(c){const{listIndex:i,visible:S,revealed:s}=this.getTreeNodeWithListIndex(c);return S&&s?i:-1}getListRenderCount(c){return this.getTreeNode(c).renderNodeCount}isCollapsible(c){return this.getTreeNode(c).collapsible}setCollapsible(c,i){const S=this.getTreeNode(c);typeof i=="undefined"&&(i=!S.collapsible);const s={collapsible:i};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(c,s))}isCollapsed(c){return this.getTreeNode(c).collapsed}setCollapsed(c,i,S){const s=this.getTreeNode(c);typeof i=="undefined"&&(i=!s.collapsed);const l={collapsed:i,recursive:S||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(c,l))}_setCollapseState(c,i){const{node:S,listIndex:s,revealed:l}=this.getTreeNodeWithListIndex(c),r=this._setListNodeCollapseState(S,s,l,i);if(S!==this.root&&this.autoExpandSingleChildren&&r&&!v(i)&&S.collapsible&&!S.collapsed&&!i.recursive){let p=-1;for(let u=0;u<S.children.length;u++)if(S.children[u].visible)if(p>-1){p=-1;break}else p=u;p>-1&&this._setCollapseState([...c,p],i)}return r}_setListNodeCollapseState(c,i,S,s){const l=this._setNodeCollapseState(c,s,!1);if(!S||!c.visible||!l)return l;const r=c.renderNodeCount,p=this.updateNodeAfterCollapseChange(c),u=r-(i===-1?0:1);return this.list.splice(i+1,u,p.slice(1)),l}_setNodeCollapseState(c,i,S){let s;if(c===this.root?s=!1:(v(i)?(s=c.collapsible!==i.collapsible,c.collapsible=i.collapsible):c.collapsible?(s=c.collapsed!==i.collapsed,c.collapsed=i.collapsed):s=!1,s&&this._onDidChangeCollapseState.fire({node:c,deep:S})),!v(i)&&i.recursive)for(const l of c.children)s=this._setNodeCollapseState(l,i,!0)||s;return s}expandTo(c){this.eventBufferer.bufferEvents(()=>{let i=this.getTreeNode(c);for(;i.parent;)i=i.parent,c=c.slice(0,c.length-1),i.collapsed&&this._setCollapseState(c,{collapsed:!1,recursive:!1})})}refilter(){const c=this.root.renderNodeCount,i=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,c,i),this.refilterDelayer.cancel()}createTreeNode(c,i,S,s,l,r){const p={parent:i,element:c.element,children:[],depth:i.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof c.collapsible=="boolean"?c.collapsible:typeof c.collapsed!="undefined",collapsed:typeof c.collapsed=="undefined"?this.collapseByDefault:c.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},u=this._filterNode(p,S);p.visibility=u,s&&l.push(p);const a=c.children||D.Iterable.empty(),n=s&&u!==0&&!p.collapsed,h=D.Iterable.map(a,m=>this.createTreeNode(m,p,u,n,l,r));let g=0,d=1;for(const m of h)p.children.push(m),d+=m.renderNodeCount,m.visible&&(m.visibleChildIndex=g++);return p.collapsible=p.collapsible||p.children.length>0,p.visibleChildrenCount=g,p.visible=u===2?g>0:u===1,p.visible?p.collapsed||(p.renderNodeCount=d):(p.renderNodeCount=0,s&&l.pop()),r&&r(p),p}updateNodeAfterCollapseChange(c){const i=c.renderNodeCount,S=[];return this._updateNodeAfterCollapseChange(c,S),this._updateAncestorsRenderNodeCount(c.parent,S.length-i),S}_updateNodeAfterCollapseChange(c,i){if(c.visible===!1)return 0;if(i.push(c),c.renderNodeCount=1,!c.collapsed)for(const S of c.children)c.renderNodeCount+=this._updateNodeAfterCollapseChange(S,i);return this._onDidChangeRenderNodeCount.fire(c),c.renderNodeCount}updateNodeAfterFilterChange(c){const i=c.renderNodeCount,S=[];return this._updateNodeAfterFilterChange(c,c.visible?1:0,S),this._updateAncestorsRenderNodeCount(c.parent,S.length-i),S}_updateNodeAfterFilterChange(c,i,S,s=!0){let l;if(c!==this.root){if(l=this._filterNode(c,i),l===0)return c.visible=!1,c.renderNodeCount=0,!1;s&&S.push(c)}const r=S.length;c.renderNodeCount=c===this.root?0:1;let p=!1;if(!c.collapsed||l!==0){let u=0;for(const a of c.children)p=this._updateNodeAfterFilterChange(a,l,S,s&&!c.collapsed)||p,a.visible&&(a.visibleChildIndex=u++);c.visibleChildrenCount=u}else c.visibleChildrenCount=0;return c!==this.root&&(c.visible=l===2?p:l===1,c.visibility=l),c.visible?c.collapsed||(c.renderNodeCount+=S.length-r):(c.renderNodeCount=0,s&&S.pop()),this._onDidChangeRenderNodeCount.fire(c),c.visible}_updateAncestorsRenderNodeCount(c,i){if(i!==0)for(;c;)c.renderNodeCount+=i,this._onDidChangeRenderNodeCount.fire(c),c=c.parent}_filterNode(c,i){const S=this.filter?this.filter.filter(c.element,i):1;return typeof S=="boolean"?(c.filterData=void 0,S?1:0):I(S)?(c.filterData=S.data,w(S.visibility)):(c.filterData=void 0,w(S))}hasTreeNode(c,i=this.root){if(!c||c.length===0)return!0;const[S,...s]=c;return S<0||S>i.children.length?!1:this.hasTreeNode(s,i.children[S])}getTreeNode(c,i=this.root){if(!c||c.length===0)return i;const[S,...s]=c;if(S<0||S>i.children.length)throw new t.TreeError(this.user,"Invalid tree location");return this.getTreeNode(s,i.children[S])}getTreeNodeWithListIndex(c){if(c.length===0)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:i,listIndex:S,revealed:s,visible:l}=this.getParentNodeWithListIndex(c),r=c[c.length-1];if(r<0||r>i.children.length)throw new t.TreeError(this.user,"Invalid tree location");const p=i.children[r];return{node:p,listIndex:S,revealed:s,visible:l&&p.visible}}getParentNodeWithListIndex(c,i=this.root,S=0,s=!0,l=!0){const[r,...p]=c;if(r<0||r>i.children.length)throw new t.TreeError(this.user,"Invalid tree location");for(let u=0;u<r;u++)S+=i.children[u].renderNodeCount;return s=s&&!i.collapsed,l=l&&i.visible,p.length===0?{parentNode:i,listIndex:S,revealed:s,visible:l}:this.getParentNodeWithListIndex(p,i.children[r],S+1,s,l)}getNode(c=[]){return this.getTreeNode(c)}getNodeLocation(c){const i=[];let S=c;for(;S.parent;)i.push(S.parent.children.indexOf(S)),S=S.parent;return i.reverse()}getParentNodeLocation(c){if(c.length!==0)return c.length===1?[]:(0,f.tail2)(c)[0]}getFirstElementChild(c){const i=this.getTreeNode(c);if(i.children.length!==0)return i.children[0].element}getLastElementAncestor(c=[]){const i=this.getTreeNode(c);if(i.children.length!==0)return this._getLastElementAncestor(i)}_getLastElementAncestor(c){return c.children.length===0?c.element:this._getLastElementAncestor(c.children[c.children.length-1])}}e.IndexTreeModel=C}),define(ne[447],re([1,0,518,277,92]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectTreeModel=void 0;class A{constructor(D,I,w={}){this.user=D,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new t.IndexTreeModel(D,I,null,w),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,w.sorter&&(this.sorter={compare(v,C){return w.sorter.compare(v.element,C.element)}}),this.identityProvider=w.identityProvider}get size(){return this.nodes.size}setChildren(D,I=_.Iterable.empty(),w={}){const v=this.getElementLocation(D);this._setChildren(v,this.preserveCollapseState(I),w)}_setChildren(D,I=_.Iterable.empty(),w){const v=new Set,C=new Set,o=i=>{if(i.element===null)return;const S=i;if(v.add(S.element),this.nodes.set(S.element,S),this.identityProvider){const s=this.identityProvider.getId(S.element).toString();C.add(s),this.nodesByIdentity.set(s,S)}w.onDidCreateNode?.(S)},c=i=>{if(i.element===null)return;const S=i;if(v.has(S.element)||this.nodes.delete(S.element),this.identityProvider){const s=this.identityProvider.getId(S.element).toString();C.has(s)||this.nodesByIdentity.delete(s)}w.onDidDeleteNode?.(S)};this.model.splice([...D,0],Number.MAX_VALUE,I,{...w,onDidCreateNode:o,onDidDeleteNode:c})}preserveCollapseState(D=_.Iterable.empty()){return this.sorter&&(D=[...D].sort(this.sorter.compare.bind(this.sorter))),_.Iterable.map(D,I=>{let w=this.nodes.get(I.element);if(!w&&this.identityProvider){const o=this.identityProvider.getId(I.element).toString();w=this.nodesByIdentity.get(o)}if(!w)return{...I,children:this.preserveCollapseState(I.children)};const v=typeof I.collapsible=="boolean"?I.collapsible:w.collapsible,C=typeof I.collapsed!="undefined"?I.collapsed:w.collapsed;return{...I,collapsible:v,collapsed:C,children:this.preserveCollapseState(I.children)}})}rerender(D){const I=this.getElementLocation(D);this.model.rerender(I)}updateElementHeight(D,I){const w=this.getElementLocation(D);this.model.updateElementHeight(w,I)}resort(D=null,I=!0){if(!this.sorter)return;const w=this.getElementLocation(D),v=this.model.getNode(w);this._setChildren(w,this.resortChildren(v,I),{})}resortChildren(D,I,w=!0){let v=[...D.children];return(I||w)&&(v=v.sort(this.sorter.compare.bind(this.sorter))),_.Iterable.map(v,C=>({element:C.element,collapsible:C.collapsible,collapsed:C.collapsed,children:this.resortChildren(C,I,!1)}))}getFirstElementChild(D=null){const I=this.getElementLocation(D);return this.model.getFirstElementChild(I)}getLastElementAncestor(D=null){const I=this.getElementLocation(D);return this.model.getLastElementAncestor(I)}has(D){return this.nodes.has(D)}getListIndex(D){const I=this.getElementLocation(D);return this.model.getListIndex(I)}getListRenderCount(D){const I=this.getElementLocation(D);return this.model.getListRenderCount(I)}isCollapsible(D){const I=this.getElementLocation(D);return this.model.isCollapsible(I)}setCollapsible(D,I){const w=this.getElementLocation(D);return this.model.setCollapsible(w,I)}isCollapsed(D){const I=this.getElementLocation(D);return this.model.isCollapsed(I)}setCollapsed(D,I,w){const v=this.getElementLocation(D);return this.model.setCollapsed(v,I,w)}expandTo(D){const I=this.getElementLocation(D);this.model.expandTo(I)}refilter(){this.model.refilter()}getNode(D=null){if(D===null)return this.model.getNode(this.model.rootRef);const I=this.nodes.get(D);if(!I)throw new f.TreeError(this.user,`Tree element not found: ${D}`);return I}getNodeLocation(D){return D.element}getParentNodeLocation(D){if(D===null)throw new f.TreeError(this.user,"Invalid getParentNodeLocation call");const I=this.nodes.get(D);if(!I)throw new f.TreeError(this.user,`Tree element not found: ${D}`);const w=this.model.getNodeLocation(I),v=this.model.getParentNodeLocation(w);return this.model.getNode(v).element}getElementLocation(D){if(D===null)return[];const I=this.nodes.get(D);if(!I)throw new f.TreeError(this.user,`Tree element not found: ${D}`);return this.model.getNodeLocation(I)}}e.ObjectTreeModel=A}),define(ne[964],re([1,0,447,277,6,92]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleObjectTreeModel=e.DefaultElementMapper=e.CompressedObjectTreeModel=e.decompress=e.compress=void 0;function k(r){const p=[r.element],u=r.incompressible||!1;return{element:{elements:p,incompressible:u},children:A.Iterable.map(A.Iterable.from(r.children),k),collapsible:r.collapsible,collapsed:r.collapsed}}function D(r){const p=[r.element],u=r.incompressible||!1;let a,n;for(;[n,a]=A.Iterable.consume(A.Iterable.from(r.children),2),!(n.length!==1||n[0].incompressible);)r=n[0],p.push(r.element);return{element:{elements:p,incompressible:u},children:A.Iterable.map(A.Iterable.concat(n,a),D),collapsible:r.collapsible,collapsed:r.collapsed}}e.compress=D;function I(r,p=0){let u;return p<r.element.elements.length-1?u=[I(r,p+1)]:u=A.Iterable.map(A.Iterable.from(r.children),a=>I(a,0)),p===0&&r.element.incompressible?{element:r.element.elements[p],children:u,incompressible:!0,collapsible:r.collapsible,collapsed:r.collapsed}:{element:r.element.elements[p],children:u,collapsible:r.collapsible,collapsed:r.collapsed}}function w(r){return I(r,0)}e.decompress=w;function v(r,p,u){return r.element===p?{...r,children:u}:{...r,children:A.Iterable.map(A.Iterable.from(r.children),a=>v(a,p,u))}}const C=r=>({getId(p){return p.elements.map(u=>r.getId(u).toString()).join("\0")}});class o{constructor(p,u,a={}){this.user=p,this.rootRef=null,this.nodes=new Map,this.model=new t.ObjectTreeModel(p,u,a),this.enabled=typeof a.compressionEnabled=="undefined"?!0:a.compressionEnabled,this.identityProvider=a.identityProvider}get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}get size(){return this.nodes.size}setChildren(p,u=A.Iterable.empty(),a){const n=a.diffIdentityProvider&&C(a.diffIdentityProvider);if(p===null){const R=A.Iterable.map(u,this.enabled?D:k);this._setChildren(null,R,{diffIdentityProvider:n,diffDepth:1/0});return}const h=this.nodes.get(p);if(!h)throw new Error("Unknown compressed tree node");const g=this.model.getNode(h),d=this.model.getParentNodeLocation(h),m=this.model.getNode(d),b=w(g),E=v(b,p,u),y=(this.enabled?D:k)(E),T=m.children.map(R=>R===g?y:R);this._setChildren(m.element,T,{diffIdentityProvider:n,diffDepth:g.depth-m.depth})}isCompressionEnabled(){return this.enabled}setCompressionEnabled(p){if(p===this.enabled)return;this.enabled=p;const a=this.model.getNode().children,n=A.Iterable.map(a,w),h=A.Iterable.map(n,p?D:k);this._setChildren(null,h,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(p,u,a){const n=new Set,h=d=>{for(const m of d.element.elements)n.add(m),this.nodes.set(m,d.element)},g=d=>{for(const m of d.element.elements)n.has(m)||this.nodes.delete(m)};this.model.setChildren(p,u,{...a,onDidCreateNode:h,onDidDeleteNode:g})}has(p){return this.nodes.has(p)}getListIndex(p){const u=this.getCompressedNode(p);return this.model.getListIndex(u)}getListRenderCount(p){const u=this.getCompressedNode(p);return this.model.getListRenderCount(u)}getNode(p){if(typeof p=="undefined")return this.model.getNode();const u=this.getCompressedNode(p);return this.model.getNode(u)}getNodeLocation(p){const u=this.model.getNodeLocation(p);return u===null?null:u.elements[u.elements.length-1]}getParentNodeLocation(p){const u=this.getCompressedNode(p),a=this.model.getParentNodeLocation(u);return a===null?null:a.elements[a.elements.length-1]}getFirstElementChild(p){const u=this.getCompressedNode(p);return this.model.getFirstElementChild(u)}getLastElementAncestor(p){const u=typeof p=="undefined"?void 0:this.getCompressedNode(p);return this.model.getLastElementAncestor(u)}isCollapsible(p){const u=this.getCompressedNode(p);return this.model.isCollapsible(u)}setCollapsible(p,u){const a=this.getCompressedNode(p);return this.model.setCollapsible(a,u)}isCollapsed(p){const u=this.getCompressedNode(p);return this.model.isCollapsed(u)}setCollapsed(p,u,a){const n=this.getCompressedNode(p);return this.model.setCollapsed(n,u,a)}expandTo(p){const u=this.getCompressedNode(p);this.model.expandTo(u)}rerender(p){const u=this.getCompressedNode(p);this.model.rerender(u)}updateElementHeight(p,u){const a=this.getCompressedNode(p);!a||this.model.updateElementHeight(a,u)}refilter(){this.model.refilter()}resort(p=null,u=!0){const a=this.getCompressedNode(p);this.model.resort(a,u)}getCompressedNode(p){if(p===null)return null;const u=this.nodes.get(p);if(!u)throw new f.TreeError(this.user,`Tree element not found: ${p}`);return u}}e.CompressedObjectTreeModel=o;const c=r=>r[r.length-1];e.DefaultElementMapper=c;class i{constructor(p,u){this.unwrapper=p,this.node=u}get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(p=>new i(this.unwrapper,p))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}function S(r,p){return{splice(u,a,n){p.splice(u,a,n.map(h=>r.map(h)))},updateElementHeight(u,a){p.updateElementHeight(u,a)}}}function s(r,p){return{...p,identityProvider:p.identityProvider&&{getId(u){return p.identityProvider.getId(r(u))}},sorter:p.sorter&&{compare(u,a){return p.sorter.compare(u.elements[0],a.elements[0])}},filter:p.filter&&{filter(u,a){return p.filter.filter(r(u),a)}}}}class l{constructor(p,u,a={}){this.rootRef=null,this.elementMapper=a.elementMapper||e.DefaultElementMapper;const n=h=>this.elementMapper(h.elements);this.nodeMapper=new f.WeakMapper(h=>new i(n,h)),this.model=new o(p,S(this.nodeMapper,u),s(n,a))}get onDidSplice(){return _.Event.map(this.model.onDidSplice,({insertedNodes:p,deletedNodes:u})=>({insertedNodes:p.map(a=>this.nodeMapper.map(a)),deletedNodes:u.map(a=>this.nodeMapper.map(a))}))}get onDidChangeCollapseState(){return _.Event.map(this.model.onDidChangeCollapseState,({node:p,deep:u})=>({node:this.nodeMapper.map(p),deep:u}))}get onDidChangeRenderNodeCount(){return _.Event.map(this.model.onDidChangeRenderNodeCount,p=>this.nodeMapper.map(p))}setChildren(p,u=A.Iterable.empty(),a={}){this.model.setChildren(p,u,a)}isCompressionEnabled(){return this.model.isCompressionEnabled()}setCompressionEnabled(p){this.model.setCompressionEnabled(p)}has(p){return this.model.has(p)}getListIndex(p){return this.model.getListIndex(p)}getListRenderCount(p){return this.model.getListRenderCount(p)}getNode(p){return this.nodeMapper.map(this.model.getNode(p))}getNodeLocation(p){return p.element}getParentNodeLocation(p){return this.model.getParentNodeLocation(p)}getFirstElementChild(p){const u=this.model.getFirstElementChild(p);return u===null||typeof u=="undefined"?u:this.elementMapper(u.elements)}getLastElementAncestor(p){const u=this.model.getLastElementAncestor(p);return u===null||typeof u=="undefined"?u:this.elementMapper(u.elements)}isCollapsible(p){return this.model.isCollapsible(p)}setCollapsible(p,u){return this.model.setCollapsible(p,u)}isCollapsed(p){return this.model.isCollapsed(p)}setCollapsed(p,u,a){return this.model.setCollapsed(p,u,a)}expandTo(p){return this.model.expandTo(p)}rerender(p){return this.model.rerender(p)}updateElementHeight(p,u){this.model.updateElementHeight(p,u)}refilter(){return this.model.refilter()}resort(p=null,u=!0){return this.model.resort(p,u)}getCompressedTreeNode(p=null){return this.model.getNode(p)}}e.CompressibleObjectTreeModel=l}),define(ne[138],re([1,0,10,91,137,129,2]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Widget=void 0;class D extends k.Disposable{onclick(w,v){this._register(t.addDisposableListener(w,t.EventType.CLICK,C=>v(new _.StandardMouseEvent(C))))}onmousedown(w,v){this._register(t.addDisposableListener(w,t.EventType.MOUSE_DOWN,C=>v(new _.StandardMouseEvent(C))))}onmouseover(w,v){this._register(t.addDisposableListener(w,t.EventType.MOUSE_OVER,C=>v(new _.StandardMouseEvent(C))))}onnonbubblingmouseout(w,v){this._register(t.addDisposableNonBubblingMouseOutListener(w,C=>v(new _.StandardMouseEvent(C))))}onkeydown(w,v){this._register(t.addDisposableListener(w,t.EventType.KEY_DOWN,C=>v(new f.StandardKeyboardEvent(C))))}onkeyup(w,v){this._register(t.addDisposableListener(w,t.EventType.KEY_UP,C=>v(new f.StandardKeyboardEvent(C))))}oninput(w,v){this._register(t.addDisposableListener(w,t.EventType.INPUT,v))}onblur(w,v){this._register(t.addDisposableListener(w,t.EventType.BLUR,v))}onfocus(w,v){this._register(t.addDisposableListener(w,t.EventType.FOCUS,v))}onchange(w,v){this._register(t.addDisposableListener(w,t.EventType.CHANGE,v))}ignoreGesture(w){A.Gesture.ignoreTarget(w)}}e.Widget=D}),define(ne[519],re([1,0,381,138,11,10]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarArrow=e.ARROW_IMG_SIZE=void 0,e.ARROW_IMG_SIZE=11;class k extends f.Widget{constructor(I){super();this._onActivate=I.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=I.bgWidth+"px",this.bgDomNode.style.height=I.bgHeight+"px",typeof I.top!="undefined"&&(this.bgDomNode.style.top="0px"),typeof I.left!="undefined"&&(this.bgDomNode.style.left="0px"),typeof I.bottom!="undefined"&&(this.bgDomNode.style.bottom="0px"),typeof I.right!="undefined"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=I.className,this.domNode.classList.add(...I.icon.classNamesArray),this.domNode.style.position="absolute",this.domNode.style.width=e.ARROW_IMG_SIZE+"px",this.domNode.style.height=e.ARROW_IMG_SIZE+"px",typeof I.top!="undefined"&&(this.domNode.style.top=I.top+"px"),typeof I.left!="undefined"&&(this.domNode.style.left=I.left+"px"),typeof I.bottom!="undefined"&&(this.domNode.style.bottom=I.bottom+"px"),typeof I.right!="undefined"&&(this.domNode.style.right=I.right+"px"),this._pointerMoveMonitor=this._register(new t.GlobalPointerMoveMonitor),this._register(A.addStandardDisposableListener(this.bgDomNode,A.EventType.POINTER_DOWN,w=>this._arrowPointerDown(w))),this._register(A.addStandardDisposableListener(this.domNode,A.EventType.POINTER_DOWN,w=>this._arrowPointerDown(w))),this._pointerdownRepeatTimer=this._register(new _.IntervalTimer),this._pointerdownScheduleRepeatTimer=this._register(new _.TimeoutTimer)}_arrowPointerDown(I){if(!I.target||!(I.target instanceof Element))return;const w=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24)};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(w,200),this._pointerMoveMonitor.startMonitoring(I.target,I.pointerId,I.buttons,t.standardPointerMoveMerger,v=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),I.preventDefault()}}e.ScrollbarArrow=k}),define(ne[653],re([1,0,10,128,381,519,962,138,14]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractScrollbar=void 0;const w=140;class v extends D.Widget{constructor(o){super();this._lazyRender=o.lazyRender,this._host=o.host,this._scrollable=o.scrollable,this._scrollByPage=o.scrollByPage,this._scrollbarState=o.scrollbarState,this._visibilityController=this._register(new k.ScrollbarVisibilityController(o.visibility,"visible scrollbar "+o.extraScrollbarClassName,"invisible scrollbar "+o.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new _.GlobalPointerMoveMonitor),this._shouldRender=!0,this.domNode=(0,f.createFastDomNode)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(t.addDisposableListener(this.domNode.domNode,t.EventType.POINTER_DOWN,c=>this._domNodePointerDown(c)))}_createArrow(o){const c=this._register(new A.ScrollbarArrow(o));this.domNode.domNode.appendChild(c.bgDomNode),this.domNode.domNode.appendChild(c.domNode)}_createSlider(o,c,i,S){this.slider=(0,f.createFastDomNode)(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(o),this.slider.setLeft(c),typeof i=="number"&&this.slider.setWidth(i),typeof S=="number"&&this.slider.setHeight(S),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(t.addDisposableListener(this.slider.domNode,t.EventType.POINTER_DOWN,s=>{s.button===0&&(s.preventDefault(),this._sliderPointerDown(s))})),this.onclick(this.slider.domNode,s=>{s.leftButton&&s.stopPropagation()})}_onElementSize(o){return this._scrollbarState.setVisibleSize(o)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(o){return this._scrollbarState.setScrollSize(o)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(o){return this._scrollbarState.setScrollPosition(o)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){!this._shouldRender||(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(o){o.target===this.domNode.domNode&&this._onPointerDown(o)}delegatePointerDown(o){const c=this.domNode.domNode.getClientRects()[0].top,i=c+this._scrollbarState.getSliderPosition(),S=c+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),s=this._sliderPointerPosition(o);i<=s&&s<=S?o.button===0&&(o.preventDefault(),this._sliderPointerDown(o)):this._onPointerDown(o)}_onPointerDown(o){let c,i;if(o.target===this.domNode.domNode&&typeof o.offsetX=="number"&&typeof o.offsetY=="number")c=o.offsetX,i=o.offsetY;else{const s=t.getDomNodePagePosition(this.domNode.domNode);c=o.pageX-s.left,i=o.pageY-s.top}const S=this._pointerDownRelativePosition(c,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(S):this._scrollbarState.getDesiredScrollPositionFromOffset(S)),o.button===0&&(o.preventDefault(),this._sliderPointerDown(o))}_sliderPointerDown(o){if(!o.target||!(o.target instanceof Element))return;const c=this._sliderPointerPosition(o),i=this._sliderOrthogonalPointerPosition(o),S=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(o.target,o.pointerId,o.buttons,_.standardPointerMoveMerger,s=>{const l=this._sliderOrthogonalPointerPosition(s),r=Math.abs(l-i);if(I.isWindows&&r>w){this._setDesiredScrollPositionNow(S.getScrollPosition());return}const u=this._sliderPointerPosition(s)-c;this._setDesiredScrollPositionNow(S.getDesiredScrollPositionFromDelta(u))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(o){const c={};this.writeScrollPosition(c,o),this._scrollable.setScrollPositionNow(c)}updateScrollbarSize(o){this._updateScrollbarSize(o),this._scrollbarState.setScrollbarSize(o),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}e.AbstractScrollbar=v}),define(ne[965],re([1,0,137,653,519,644,33]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HorizontalScrollbar=void 0;class D extends f.AbstractScrollbar{constructor(w,v,C){const o=w.getScrollDimensions(),c=w.getCurrentScrollPosition();super({lazyRender:v.lazyRender,host:C,scrollbarState:new A.ScrollbarState(v.horizontalHasArrows?v.arrowSize:0,v.horizontal===2?0:v.horizontalScrollbarSize,v.vertical===2?0:v.verticalScrollbarSize,o.width,o.scrollWidth,c.scrollLeft),visibility:v.horizontal,extraScrollbarClassName:"horizontal",scrollable:w,scrollByPage:v.scrollByPage});if(v.horizontalHasArrows){const i=(v.arrowSize-_.ARROW_IMG_SIZE)/2,S=(v.horizontalScrollbarSize-_.ARROW_IMG_SIZE)/2;this._createArrow({className:"scra",icon:k.Codicon.scrollbarButtonLeft,top:S,left:i,bottom:void 0,right:void 0,bgWidth:v.arrowSize,bgHeight:v.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new t.StandardWheelEvent(null,1,0))}),this._createArrow({className:"scra",icon:k.Codicon.scrollbarButtonRight,top:S,left:void 0,bottom:void 0,right:i,bgWidth:v.arrowSize,bgHeight:v.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new t.StandardWheelEvent(null,-1,0))})}this._createSlider(Math.floor((v.horizontalScrollbarSize-v.horizontalSliderSize)/2),0,void 0,v.horizontalSliderSize)}_updateSlider(w,v){this.slider.setWidth(w),this.slider.setLeft(v)}_renderDomNode(w,v){this.domNode.setWidth(w),this.domNode.setHeight(v),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(w){return this._shouldRender=this._onElementScrollSize(w.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(w.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(w.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(w,v){return w}_sliderPointerPosition(w){return w.pageX}_sliderOrthogonalPointerPosition(w){return w.pageY}_updateScrollbarSize(w){this.slider.setHeight(w)}writeScrollPosition(w,v){w.scrollLeft=v}updateOptions(w){this.updateScrollbarSize(w.horizontal===2?0:w.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(w.vertical===2?0:w.verticalScrollbarSize),this._visibilityController.setVisibility(w.horizontal),this._scrollByPage=w.scrollByPage}}e.HorizontalScrollbar=D}),define(ne[966],re([1,0,137,653,519,644,33]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VerticalScrollbar=void 0;class D extends f.AbstractScrollbar{constructor(w,v,C){const o=w.getScrollDimensions(),c=w.getCurrentScrollPosition();super({lazyRender:v.lazyRender,host:C,scrollbarState:new A.ScrollbarState(v.verticalHasArrows?v.arrowSize:0,v.vertical===2?0:v.verticalScrollbarSize,0,o.height,o.scrollHeight,c.scrollTop),visibility:v.vertical,extraScrollbarClassName:"vertical",scrollable:w,scrollByPage:v.scrollByPage});if(v.verticalHasArrows){const i=(v.arrowSize-_.ARROW_IMG_SIZE)/2,S=(v.verticalScrollbarSize-_.ARROW_IMG_SIZE)/2;this._createArrow({className:"scra",icon:k.Codicon.scrollbarButtonUp,top:i,left:S,bottom:void 0,right:void 0,bgWidth:v.verticalScrollbarSize,bgHeight:v.arrowSize,onActivate:()=>this._host.onMouseWheel(new t.StandardWheelEvent(null,0,1))}),this._createArrow({className:"scra",icon:k.Codicon.scrollbarButtonDown,top:void 0,left:S,bottom:i,right:void 0,bgWidth:v.verticalScrollbarSize,bgHeight:v.arrowSize,onActivate:()=>this._host.onMouseWheel(new t.StandardWheelEvent(null,0,-1))})}this._createSlider(0,Math.floor((v.verticalScrollbarSize-v.verticalSliderSize)/2),v.verticalSliderSize,void 0)}_updateSlider(w,v){this.slider.setHeight(w),this.slider.setTop(v)}_renderDomNode(w,v){this.domNode.setWidth(v),this.domNode.setHeight(w),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(w){return this._shouldRender=this._onElementScrollSize(w.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(w.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(w.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(w,v){return v}_sliderPointerPosition(w){return w.pageY}_sliderOrthogonalPointerPosition(w){return w.pageX}_updateScrollbarSize(w){this.slider.setWidth(w)}writeScrollPosition(w,v){w.scrollTop=v}updateOptions(w){this.updateScrollbarSize(w.vertical===2?0:w.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(w.vertical),this._scrollByPage=w.scrollByPage}}e.VerticalScrollbar=D}),define(ne[279],re([1,0,11,48]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compareByPrefix=e.compareAnything=e.comparePaths=e.compareFileExtensionsUnicode=e.compareFileExtensionsLower=e.compareFileExtensionsUpper=e.compareFileExtensionsDefault=e.compareFileExtensions=e.noIntlCompareFileNames=e.compareFileNamesUnicode=e.compareFileNamesLower=e.compareFileNamesUpper=e.compareFileNamesDefault=e.compareFileNames=void 0;const _=new t.IdleValue(()=>{const T=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:T,collatorIsNumeric:T.resolvedOptions().numeric}}),A=new t.IdleValue(()=>({collator:new Intl.Collator(void 0,{numeric:!0})})),k=new t.IdleValue(()=>({collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"})}));function D(T,R,O=!1){const x=T||"",F=R||"",L=_.value.collator.compare(x,F);return _.value.collatorIsNumeric&&L===0&&x!==F?x<F?-1:1:L}e.compareFileNames=D;function I(T,R){const O=A.value.collator;return T=T||"",R=R||"",a(O,T,R)}e.compareFileNamesDefault=I;function w(T,R){const O=A.value.collator;return T=T||"",R=R||"",d(T,R)||a(O,T,R)}e.compareFileNamesUpper=w;function v(T,R){const O=A.value.collator;return T=T||"",R=R||"",g(T,R)||a(O,T,R)}e.compareFileNamesLower=v;function C(T,R){return T=T||"",R=R||"",T===R?0:T<R?-1:1}e.compareFileNamesUnicode=C;function o(T,R,O=!1){O||(T=T&&T.toLowerCase(),R=R&&R.toLowerCase());const[x,F]=p(T),[L,M]=p(R);return x!==L?x<L?-1:1:F===M?0:F<M?-1:1}e.noIntlCompareFileNames=o;function c(T,R){const[O,x]=p(T),[F,L]=p(R);let M=_.value.collator.compare(x,L);if(M===0){if(_.value.collatorIsNumeric&&x!==L)return x<L?-1:1;if(M=_.value.collator.compare(O,F),_.value.collatorIsNumeric&&M===0&&O!==F)return O<F?-1:1}return M}e.compareFileExtensions=c;function i(T,R){T=T||"",R=R||"";const O=u(T),x=u(R),F=A.value.collator,L=k.value.collator;return a(L,O,x)||a(F,T,R)}e.compareFileExtensionsDefault=i;function S(T,R){T=T||"",R=R||"";const O=u(T),x=u(R),F=A.value.collator,L=k.value.collator;return a(L,O,x)||d(T,R)||a(F,T,R)}e.compareFileExtensionsUpper=S;function s(T,R){T=T||"",R=R||"";const O=u(T),x=u(R),F=A.value.collator,L=k.value.collator;return a(L,O,x)||g(T,R)||a(F,T,R)}e.compareFileExtensionsLower=s;function l(T,R){T=T||"",R=R||"";const O=u(T).toLowerCase(),x=u(R).toLowerCase();return O!==x?O<x?-1:1:T!==R?T<R?-1:1:0}e.compareFileExtensionsUnicode=l;const r=/^(.*?)(\.([^.]*))?$/;function p(T,R=!1){const O=T?r.exec(T):[];let x=[O&&O[1]||"",O&&O[3]||""];return R&&(!x[0]&&x[1]||x[0]&&x[0].charAt(0)===".")&&(x=[x[0]+"."+x[1],""]),x}function u(T){const R=T?r.exec(T):[];return R&&R[1]&&R[1].charAt(0)!=="."&&R[3]||""}function a(T,R,O){let x=T.compare(R,O);return x!==0?x:R.length!==O.length?R.length<O.length?-1:1:0}function n(T){const R=T.charAt(0);return R.toLocaleUpperCase()!==R}function h(T){const R=T.charAt(0);return R.toLocaleLowerCase()!==R}function g(T,R){return n(T)&&h(R)?-1:h(T)&&n(R)?1:0}function d(T,R){return h(T)&&n(R)?-1:n(T)&&h(R)?1:0}function m(T,R,O=!1){return O||(T=T&&T.toLowerCase(),R=R&&R.toLowerCase()),T===R?0:T<R?-1:1}function b(T,R,O=!1){const x=T.split(f.sep),F=R.split(f.sep),L=x.length-1,M=F.length-1;let N,B;for(let P=0;;P++){if(N=L===P,B=M===P,N&&B)return D(x[P],F[P],O);if(N)return-1;if(B)return 1;const V=m(x[P],F[P],O);if(V!==0)return V}}e.comparePaths=b;function E(T,R,O){const x=T.toLowerCase(),F=R.toLowerCase(),L=y(T,R,O);if(L)return L;const M=x.endsWith(O),N=F.endsWith(O);if(M!==N)return M?-1:1;const B=D(x,F);return B!==0?B:x.localeCompare(F)}e.compareAnything=E;function y(T,R,O){const x=T.toLowerCase(),F=R.toLowerCase(),L=x.startsWith(O),M=F.startsWith(O);if(L!==M)return L?-1:1;if(L&&M){if(x.length<F.length)return-1;if(x.length>F.length)return 1}return 0}e.compareByPrefix=y}),define(ne[382],re([1,0,279,102,116,48,14,29]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pieceToQuery=e.prepareQuery=e.compareItemsByFuzzyScore=e.scoreItemFuzzy=e.scoreFuzzy2=e.scoreFuzzy=void 0;const I=0,w=[I,[]];function v(V,z,U,H){if(!V||!z)return w;const K=V.length,G=z.length;if(K<G)return w;const q=V.toLowerCase();return C(z,U,G,V,q,K,H)}e.scoreFuzzy=v;function C(V,z,U,H,K,G,q){const Z=[],j=[];for(let J=0;J<U;J++){const ee=J*G,te=ee-G,se=J>0,ie=V[J],ce=z[J];for(let le=0;le<G;le++){const ae=le>0,ue=ee+le,oe=ue-1,fe=te+le-1,pe=ae?Z[oe]:0,me=se&&ae?Z[fe]:0,be=se&&ae?j[fe]:0;let Ce;!me&&se?Ce=0:Ce=o(ie,ce,H,K,le,be),Ce&&me+Ce>=pe&&(q||se||K.startsWith(z,le))?(j[ue]=be+1,Z[ue]=me+Ce):(j[ue]=I,Z[ue]=pe)}}const X=[];let Y=U-1,$=G-1;for(;Y>=0&&$>=0;){const J=Y*G+$;j[J]===I||(X.push($),Y--),$--}return[Z[U*G-1],X.reverse()]}function o(V,z,U,H,K,G){let q=0;if(!c(z,H[K]))return q;if(q+=1,G>0&&(q+=G*5),V===U[K]&&(q+=1),K===0)q+=8;else{const Z=i(U.charCodeAt(K-1));Z?q+=Z:(0,f.isUpper)(U.charCodeAt(K))&&G===0&&(q+=2)}return q}function c(V,z){return V===z?!0:V==="/"||V==="\\"?z==="/"||z==="\\":!1}function i(V){switch(V){case 47:case 92:return 5;case 95:case 45:case 46:case 32:case 39:case 34:case 58:return 4;default:return 0}}const S=[void 0,[]];function s(V,z,U=0,H=0){const K=z;return K.values&&K.values.length>1?l(V,K.values,U,H):r(V,z,U,H)}e.scoreFuzzy2=s;function l(V,z,U,H){let K=0;const G=[];for(const q of z){const[Z,j]=r(V,q,U,H);if(typeof Z!="number")return S;K+=Z,G.push(...j)}return[K,y(G)]}function r(V,z,U,H){const K=(0,f.fuzzyScore)(z.original,z.originalLowercase,U,V,V.toLowerCase(),H,!0);return K?[K[0],(0,f.createMatches)(K)]:S}const p=Object.freeze({score:0}),u=1<<18,a=1<<17,n=1<<16;function h(V,z,U,H){const K=H.values?H.values:[H];return(0,_.hash)({[H.normalized]:{values:K.map(q=>({value:q.normalized,expectContiguousMatch:q.expectContiguousMatch})),label:V,description:z,allowNonContiguousMatches:U}})}function g(V,z,U,H,K){if(!V||!z.normalized)return p;const G=H.getItemLabel(V);if(!G)return p;const q=H.getItemDescription(V),Z=h(G,q,U,z),j=K[Z];if(j)return j;const X=d(G,q,H.getItemPath(V),z,U);return K[Z]=X,X}e.scoreItemFuzzy=g;function d(V,z,U,H,K){const G=!U||!H.containsPathSeparator;return U&&(k.isLinux?H.pathNormalized===U:(0,D.equalsIgnoreCase)(H.pathNormalized,U))?{score:u,labelMatch:[{start:0,end:V.length}],descriptionMatch:z?[{start:0,end:z.length}]:void 0}:H.values&&H.values.length>1?m(V,z,U,H.values,G,K):b(V,z,U,H,G,K)}function m(V,z,U,H,K,G){let q=0;const Z=[],j=[];for(const X of H){const{score:Y,labelMatch:$,descriptionMatch:J}=b(V,z,U,X,K,G);if(Y===I)return p;q+=Y,$&&Z.push(...$),J&&j.push(...J)}return{score:q,labelMatch:y(Z),descriptionMatch:y(j)}}function b(V,z,U,H,K,G){if(K||!z){const[q,Z]=v(V,H.normalized,H.normalizedLowercase,G&&!H.expectContiguousMatch);if(q){const j=(0,f.matchesPrefix)(H.normalized,V);let X;return j?(X=a,X+=Math.round(H.normalized.length/V.length*100)):X=n,{score:X+q,labelMatch:j||E(Z)}}}if(z){let q=z;U&&(q=`${z}${A.sep}`);const Z=q.length,j=`${q}${V}`,[X,Y]=v(j,H.normalized,H.normalizedLowercase,G&&!H.expectContiguousMatch);if(X){const $=E(Y),J=[],ee=[];return $.forEach(te=>{te.start<Z&&te.end>Z?(J.push({start:0,end:te.end-Z}),ee.push({start:te.start,end:Z})):te.start>=Z?J.push({start:te.start-Z,end:te.end-Z}):ee.push(te)}),{score:X,labelMatch:J,descriptionMatch:ee}}}return p}function E(V){const z=[];if(!V)return z;let U;for(const H of V)U&&U.end===H?U.end+=1:(U={start:H,end:H+1},z.push(U));return z}function y(V){const z=V.sort((K,G)=>K.start-G.start),U=[];let H;for(const K of z)!H||!T(H,K)?(H=K,U.push(K)):(H.start=Math.min(H.start,K.start),H.end=Math.max(H.end,K.end));return U}function T(V,z){return!(V.end<z.start||z.end<V.start)}function R(V,z,U,H,K,G){const q=g(V,U,H,K,G),Z=g(z,U,H,K,G),j=q.score,X=Z.score;if((j===u||X===u)&&j!==X)return j===u?-1:1;if(j>n||X>n){if(j!==X)return j>X?-1:1;if(j<a&&X<a){const ie=x(q.labelMatch,Z.labelMatch);if(ie!==0)return ie}const te=K.getItemLabel(V)||"",se=K.getItemLabel(z)||"";if(te.length!==se.length)return te.length-se.length}if(j!==X)return j>X?-1:1;const Y=Array.isArray(q.labelMatch)&&q.labelMatch.length>0,$=Array.isArray(Z.labelMatch)&&Z.labelMatch.length>0;if(Y&&!$)return-1;if($&&!Y)return 1;const J=O(V,q,K),ee=O(z,Z,K);return J&&ee&&J!==ee?ee>J?-1:1:F(V,z,U,K)}e.compareItemsByFuzzyScore=R;function O(V,z,U){let H=-1,K=-1;if(z.descriptionMatch&&z.descriptionMatch.length?H=z.descriptionMatch[0].start:z.labelMatch&&z.labelMatch.length&&(H=z.labelMatch[0].start),z.labelMatch&&z.labelMatch.length){if(K=z.labelMatch[z.labelMatch.length-1].end,z.descriptionMatch&&z.descriptionMatch.length){const G=U.getItemDescription(V);G&&(K+=G.length)}}else z.descriptionMatch&&z.descriptionMatch.length&&(K=z.descriptionMatch[z.descriptionMatch.length-1].end);return K-H}function x(V,z){if(!V&&!z||(!V||!V.length)&&(!z||!z.length))return 0;if(!z||!z.length)return-1;if(!V||!V.length)return 1;const U=V[0].start,K=V[V.length-1].end-U,G=z[0].start,Z=z[z.length-1].end-G;return K===Z?0:Z<K?1:-1}function F(V,z,U,H){const K=H.getItemLabel(V)||"",G=H.getItemLabel(z)||"",q=H.getItemDescription(V),Z=H.getItemDescription(z),j=K.length+(q?q.length:0),X=G.length+(Z?Z.length:0);if(j!==X)return j-X;const Y=H.getItemPath(V),$=H.getItemPath(z);return Y&&$&&Y.length!==$.length?Y.length-$.length:K!==G?(0,t.compareAnything)(K,G,U.normalized):q&&Z&&q!==Z?(0,t.compareAnything)(q,Z,U.normalized):Y&&$&&Y!==$?(0,t.compareAnything)(Y,$,U.normalized):0}function L(V){return V.startsWith('"')&&V.endsWith('"')}const M=" ";function N(V){typeof V!="string"&&(V="");const z=V.toLowerCase(),{pathNormalized:U,normalized:H,normalizedLowercase:K}=B(V),G=U.indexOf(A.sep)>=0,q=L(V);let Z;const j=V.split(M);if(j.length>1)for(const X of j){const Y=L(X),{pathNormalized:$,normalized:J,normalizedLowercase:ee}=B(X);J&&(Z||(Z=[]),Z.push({original:X,originalLowercase:X.toLowerCase(),pathNormalized:$,normalized:J,normalizedLowercase:ee,expectContiguousMatch:Y}))}return{original:V,originalLowercase:z,pathNormalized:U,normalized:H,normalizedLowercase:K,values:Z,containsPathSeparator:G,expectContiguousMatch:q}}e.prepareQuery=N;function B(V){let z;k.isWindows?z=V.replace(/\//g,A.sep):z=V.replace(/\\/g,A.sep);const U=(0,D.stripWildcards)(z).replace(/\s|"/g,"");return{pathNormalized:z,normalized:U,normalizedLowercase:U.toLowerCase()}}function P(V){return Array.isArray(V)?N(V.map(z=>z.original).join(M)):N(V.original)}e.pieceToQuery=P}),define(ne[152],re([1,0,11,157,55,48,14,29]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getPathTerms=e.getBasenameTerms=e.isRelativePattern=e.parse=e.match=e.splitGlobAware=e.GLOB_SPLIT=e.GLOBSTAR=e.getEmptyExpression=void 0;function I(){return Object.create(null)}e.getEmptyExpression=I,e.GLOBSTAR="**",e.GLOB_SPLIT="/";const w="[/\\\\]",v="[^/\\\\]",C=/\//g;function o(V,z){switch(V){case 0:return"";case 1:return`${v}*?`;default:return`(?:${w}|${v}+${w}${z?`|${w}${v}+`:""})*?`}}function c(V,z){if(!V)return[];const U=[];let H=!1,K=!1,G="";for(const q of V){switch(q){case z:if(!H&&!K){U.push(G),G="";continue}break;case"{":H=!0;break;case"}":H=!1;break;case"[":K=!0;break;case"]":K=!1;break}G+=q}return G&&U.push(G),U}e.splitGlobAware=c;function i(V){if(!V)return"";let z="";const U=c(V,e.GLOB_SPLIT);if(U.every(H=>H===e.GLOBSTAR))z=".*";else{let H=!1;U.forEach((K,G)=>{if(K===e.GLOBSTAR){if(H)return;z+=o(2,G===U.length-1)}else{let q=!1,Z="",j=!1,X="";for(const Y of K){if(Y!=="}"&&q){Z+=Y;continue}if(j&&(Y!=="]"||!X)){let $;Y==="-"?$=Y:(Y==="^"||Y==="!")&&!X?$="^":Y===e.GLOB_SPLIT?$="":$=(0,D.escapeRegExpCharacters)(Y),X+=$;continue}switch(Y){case"{":q=!0;continue;case"[":j=!0;continue;case"}":{z+=`(?:${c(Z,",").map(ee=>i(ee)).join("|")})`,q=!1,Z="";break}case"]":{z+="["+X+"]",j=!1,X="";break}case"?":z+=v;continue;case"*":z+=o(1);continue;default:z+=(0,D.escapeRegExpCharacters)(Y)}}G<U.length-1&&(U[G+1]!==e.GLOBSTAR||G+2<U.length)&&(z+=w)}H=K===e.GLOBSTAR})}return z}const S=/^\*\*\/\*\.[\w\.-]+$/,s=/^\*\*\/([\w\.-]+)\/?$/,l=/^{\*\*\/\*?[\w\.-]+\/?(,\*\*\/\*?[\w\.-]+\/?)*}$/,r=/^{\*\*\/\*?[\w\.-]+(\/(\*\*)?)?(,\*\*\/\*?[\w\.-]+(\/(\*\*)?)?)*}$/,p=/^\*\*((\/[\w\.-]+)+)\/?$/,u=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,a=new _.LRUCache(1e4),n=function(){return!1},h=function(){return null};function g(V,z){if(!V)return h;let U;typeof V!="string"?U=V.pattern:U=V,U=U.trim();const H=`${U}_${!!z.trimForExclusions}`;let K=a.get(H);if(K)return d(K,V);let G;return S.test(U)?K=b(U.substr(4),U):(G=s.exec(m(U,z)))?K=E(G[1],U):(z.trimForExclusions?r:l).test(U)?K=y(U,z):(G=p.exec(m(U,z)))?K=T(G[1].substr(1),U,!0):(G=u.exec(m(U,z)))?K=T(G[1],U,!1):K=R(U),a.set(H,K),d(K,V)}function d(V,z){return typeof z=="string"?V:function(U,H){return(0,f.isEqualOrParent)(U,z.base,!k.isLinux)?V(U.substr(z.base.length+1),H):null}}function m(V,z){return z.trimForExclusions&&V.endsWith("/**")?V.substr(0,V.length-2):V}function b(V,z){return function(U,H){return typeof U=="string"&&U.endsWith(V)?z:null}}function E(V,z){const U=`/${V}`,H=`\\${V}`,K=function(q,Z){return typeof q!="string"?null:Z?Z===V?z:null:q===V||q.endsWith(U)||q.endsWith(H)?z:null},G=[V];return K.basenames=G,K.patterns=[z],K.allBasenames=G,K}function y(V,z){const U=P(V.slice(1,-1).split(",").map(Z=>g(Z,z)).filter(Z=>Z!==h),V),H=U.length;if(!H)return h;if(H===1)return U[0];const K=function(Z,j){for(let X=0,Y=U.length;X<Y;X++)if(U[X](Z,j))return V;return null},G=U.find(Z=>!!Z.allBasenames);G&&(K.allBasenames=G.allBasenames);const q=U.reduce((Z,j)=>j.allPaths?Z.concat(j.allPaths):Z,[]);return q.length&&(K.allPaths=q),K}function T(V,z,U){const H=A.sep===A.posix.sep,K=H?V:V.replace(C,A.sep),G=A.sep+K,q=A.posix.sep+V;let Z;return U?Z=function(j,X){return typeof j=="string"&&(j===K||j.endsWith(G)||!H&&(j===V||j.endsWith(q)))?z:null}:Z=function(j,X){return typeof j=="string"&&(j===K||!H&&j===V)?z:null},Z.allPaths=[(U?"*/":"./")+V],Z}function R(V){try{const z=new RegExp(`^${i(V)}$`);return function(U){return z.lastIndex=0,typeof U=="string"&&z.test(U)?V:null}}catch{return h}}function O(V,z,U){return!V||typeof z!="string"?!1:x(V)(z,void 0,U)}e.match=O;function x(V,z={}){if(!V)return n;if(typeof V=="string"||F(V)){const U=g(V,z);if(U===h)return n;const H=function(K,G){return!!U(K,G)};return U.allBasenames&&(H.allBasenames=U.allBasenames),U.allPaths&&(H.allPaths=U.allPaths),H}return N(V,z)}e.parse=x;function F(V){const z=V;return z?typeof z.base=="string"&&typeof z.pattern=="string":!1}e.isRelativePattern=F;function L(V){return V.allBasenames||[]}e.getBasenameTerms=L;function M(V){return V.allPaths||[]}e.getPathTerms=M;function N(V,z){const U=P(Object.getOwnPropertyNames(V).map(Z=>B(Z,V[Z],z)).filter(Z=>Z!==h)),H=U.length;if(!H)return h;if(!U.some(Z=>!!Z.requiresSiblings)){if(H===1)return U[0];const Z=function(Y,$){for(let J=0,ee=U.length;J<ee;J++){const te=U[J](Y,$);if(te)return te}return null},j=U.find(Y=>!!Y.allBasenames);j&&(Z.allBasenames=j.allBasenames);const X=U.reduce((Y,$)=>$.allPaths?Y.concat($.allPaths):Y,[]);return X.length&&(Z.allPaths=X),Z}const K=function(Z,j,X){let Y;for(let $=0,J=U.length;$<J;$++){const ee=U[$];ee.requiresSiblings&&X&&(j||(j=(0,A.basename)(Z)),Y||(Y=j.substr(0,j.length-(0,A.extname)(Z).length)));const te=ee(Z,j,Y,X);if(te)return te}return null},G=U.find(Z=>!!Z.allBasenames);G&&(K.allBasenames=G.allBasenames);const q=U.reduce((Z,j)=>j.allPaths?Z.concat(j.allPaths):Z,[]);return q.length&&(K.allPaths=q),K}function B(V,z,U){if(z===!1)return h;const H=g(V,U);if(H===h)return h;if(typeof z=="boolean")return H;if(z){const K=z.when;if(typeof K=="string"){const G=(q,Z,j,X)=>{if(!X||!H(q,Z))return null;const Y=K.replace("$(basename)",j),$=X(Y);return(0,t.isThenable)($)?$.then(J=>J?V:null):$?V:null};return G.requiresSiblings=!0,G}}return H}function P(V,z){const U=V.filter(Z=>!!Z.basenames);if(U.length<2)return V;const H=U.reduce((Z,j)=>{const X=j.basenames;return X?Z.concat(X):Z},[]);let K;if(z){K=[];for(let Z=0,j=H.length;Z<j;Z++)K.push(z)}else K=U.reduce((Z,j)=>{const X=j.patterns;return X?Z.concat(X):Z},[]);const G=function(Z,j){if(typeof Z!="string")return null;if(!j){let Y;for(Y=Z.length;Y>0;Y--){const $=Z.charCodeAt(Y-1);if($===47||$===92)break}j=Z.substr(Y)}const X=H.indexOf(j);return X!==-1?K[X]:null};G.basenames=H,G.patterns=K,G.allBasenames=H;const q=V.filter(Z=>!Z.basenames);return q.push(G),q}}),define(ne[117],re([1,0,22,225,19,29,9]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseHrefAndDimensions=e.removeMarkdownEscapes=e.escapeMarkdownSyntaxTokens=e.markdownStringEqual=e.isMarkdownString=e.isEmptyMarkdownString=e.MarkdownString=e.MarkdownStringTextNewlineStyle=void 0;var D;(function(S){S[S.Paragraph=0]="Paragraph",S[S.Break=1]="Break"})(D=e.MarkdownStringTextNewlineStyle||(e.MarkdownStringTextNewlineStyle={}));class I{constructor(s="",l=!1){if(this.value=s,typeof this.value!="string")throw(0,t.illegalArgument)("value");typeof l=="boolean"?(this.isTrusted=l,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=l.isTrusted??void 0,this.supportThemeIcons=l.supportThemeIcons??!1,this.supportHtml=l.supportHtml??!1)}appendText(s,l=0){return this.value+=o(this.supportThemeIcons?(0,f.escapeIcons)(s):s).replace(/([ \t]+)/g,(r,p)=>" ".repeat(p.length)).replace(/\>/gm,"\\>").replace(/\n/g,l===1?`\\ `:` `),this}appendMarkdown(s){return this.value+=s,this}appendCodeblock(s,l){return this.value+="\n```",this.value+=s,this.value+=` `,this.value+=l,this.value+="\n```\n",this}appendLink(s,l,r){return this.value+="[",this.value+=this._escape(l,"]"),this.value+="](",this.value+=this._escape(String(s),")"),r&&(this.value+=` "${this._escape(this._escape(r,'"'),")")}"`),this.value+=")",this}_escape(s,l){const r=new RegExp((0,A.escapeRegExpCharacters)(l),"g");return s.replace(r,(p,u)=>s.charAt(u-1)!=="\\"?`\\${p}`:p)}}e.MarkdownString=I;function w(S){return v(S)?!S.value:Array.isArray(S)?S.every(w):!0}e.isEmptyMarkdownString=w;function v(S){return S instanceof I?!0:S&&typeof S=="object"?typeof S.value=="string"&&(typeof S.isTrusted=="boolean"||S.isTrusted===void 0)&&(typeof S.supportThemeIcons=="boolean"||S.supportThemeIcons===void 0):!1}e.isMarkdownString=v;function C(S,s){return S===s?!0:!S||!s?!1:S.value===s.value&&S.isTrusted===s.isTrusted&&S.supportThemeIcons===s.supportThemeIcons&&S.supportHtml===s.supportHtml&&(S.baseUri===s.baseUri||!!S.baseUri&&!!s.baseUri&&(0,_.isEqual)(k.URI.from(S.baseUri),k.URI.from(s.baseUri)))}e.markdownStringEqual=C;function o(S){return S.replace(/[\\`*_{}[\]()#+\-!]/g,"\\$&")}e.escapeMarkdownSyntaxTokens=o;function c(S){return S&&S.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1")}e.removeMarkdownEscapes=c;function i(S){const s=[],l=S.split("|").map(p=>p.trim());S=l[0];const r=l[1];if(r){const p=/height=(\d+)/.exec(r),u=/width=(\d+)/.exec(r),a=p?p[1]:"",n=u?u[1]:"",h=isFinite(parseInt(n)),g=isFinite(parseInt(a));h&&s.push(`width="${n}"`),g&&s.push(`height="${a}"`)}return{href:S,dimensions:s}}e.parseHrefAndDimensions=i}),define(ne[242],re([1,0,10,652,224,446,137,181,11,30,22,6,117,225,338,2,378,180,18,51,19,29,9]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderMarkdownAsPlaintext=e.renderStringAsPlaintext=e.renderMarkdown=void 0;function h(y,T={},R={}){const O=new S.DisposableStore;let x=!1;const F=O.add(new w.CancellationTokenSource),L=(0,A.createElement)(T),M=function(G){let q;try{q=(0,l.parse)(decodeURIComponent(G))}catch{}return q?(q=(0,p.cloneAndChange)(q,Z=>{if(y.uris&&y.uris[Z])return n.URI.revive(y.uris[Z])}),encodeURIComponent(JSON.stringify(q))):G},N=function(G,q){const Z=y.uris&&y.uris[G];let j=n.URI.revive(Z);return q?G.startsWith(r.Schemas.data+":")?G:(j||(j=n.URI.parse(G)),r.FileAccess.asBrowserUri(j).toString(!0)):!j||n.URI.parse(G).toString()===j.toString()?G:(j.query&&(j=j.with({query:M(j.query)})),j.toString())};let B;const P=new Promise(G=>B=G),V=new s.marked.Renderer;if(V.image=(G,q,Z)=>{let j=[],X=[];return G&&({href:G,dimensions:j}=(0,o.parseHrefAndDimensions)(G),X.push(`src="${G}"`)),Z&&X.push(`alt="${Z}"`),q&&X.push(`title="${q}"`),j.length&&(X=X.concat(j)),"<img "+X.join(" ")+">"},V.link=(G,q,Z)=>typeof G!="string"?"":(G===Z&&(Z=(0,o.removeMarkdownEscapes)(Z)),G=N(G,!1),y.baseUri&&(G=g(n.URI.from(y.baseUri),G)),q=typeof q=="string"?(0,o.removeMarkdownEscapes)(q):"",G=(0,o.removeMarkdownEscapes)(G),!G||/^data:|javascript:/i.test(G)||/^command:/i.test(G)&&!y.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(G)?Z:(G=G.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),`<a data-href="${G}" title="${q||G}">${Z}</a>`)),V.paragraph=G=>`<p>${G}</p>`,T.codeBlockRenderer&&(V.code=(G,q)=>{const Z=T.codeBlockRenderer(q??"",G),j=i.defaultGenerator.nextId();return(0,I.raceCancellation)(Promise.all([Z,P]),F.token).then(X=>{if(!x&&X){const Y=L.querySelector(`div[data-code="${j}"]`);Y&&t.reset(Y,X[0]),T.asyncRenderCallback?.()}}).catch(()=>{}),`<div class="code" data-code="${j}">${(0,a.escape)(G)}</div>`}),T.actionHandler){const G=T.actionHandler.disposables.add(new _.DomEmitter(L,"click")),q=T.actionHandler.disposables.add(new _.DomEmitter(L,"auxclick"));T.actionHandler.disposables.add(C.Event.any(G.event,q.event)(Z=>{const j=new k.StandardMouseEvent(Z);if(!j.leftButton&&!j.middleButton)return;let X=j.target;if(!(X.tagName!=="A"&&(X=X.parentElement,!X||X.tagName!=="A")))try{let Y=X.dataset.href;Y&&(y.baseUri&&(Y=g(n.URI.from(y.baseUri),Y)),T.actionHandler.callback(Y,j))}catch(Y){(0,v.onUnexpectedError)(Y)}finally{j.preventDefault()}}))}y.supportHtml||(R.sanitizer=G=>(y.isTrusted?G.match(/^(<span[^>]+>)|(<\/\s*span>)$/):void 0)?G:"",R.sanitize=!0,R.silent=!0),R.renderer=V;let z=y.value??"";z.length>1e5&&(z=`${z.substr(0,1e5)}\u2026`),y.supportThemeIcons&&(z=(0,c.markdownEscapeEscapedIcons)(z));let U=s.marked.parse(z,R);y.supportThemeIcons&&(U=(0,D.renderLabelWithIcons)(U).map(q=>typeof q=="string"?q:q.outerHTML).join(""));const K=new DOMParser().parseFromString(d(y,U),"text/html");if(K.body.querySelectorAll("img").forEach(G=>{const q=G.getAttribute("src");if(q){let Z=q;try{y.baseUri&&(Z=g(n.URI.from(y.baseUri),Z))}catch{}G.src=N(Z,!0)}}),L.innerHTML=d(y,K.body.innerHTML),B(),T.asyncRenderCallback)for(const G of L.getElementsByTagName("img")){const q=O.add(t.addDisposableListener(G,"load",()=>{q.dispose(),T.asyncRenderCallback()}))}return{element:L,dispose:()=>{x=!0,F.cancel(),O.dispose()}}}e.renderMarkdown=h;function g(y,T){return/^\w[\w\d+.-]*:/.test(T)?T:y.path.endsWith("/")?(0,u.resolvePath)(y,T).toString():(0,u.resolvePath)((0,u.dirname)(y),T).toString()}function d(y,T){const{config:R,allowedSchemes:O}=m(y);f.addHook("uponSanitizeAttribute",(F,L)=>{if(L.attrName==="style"||L.attrName==="class"){if(F.tagName==="SPAN"){if(L.attrName==="style"){L.keepAttr=/^(color\:#[0-9a-fA-F]+;)?(background-color\:#[0-9a-fA-F]+;)?$/.test(L.attrValue);return}else if(L.attrName==="class"){L.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(L.attrValue);return}}L.keepAttr=!1;return}});const x=t.hookDomPurifyHrefAndSrcSanitizer(O);try{return f.sanitize(T,{...R,RETURN_TRUSTED_TYPE:!0})}finally{f.removeHook("uponSanitizeAttribute"),x.dispose()}}function m(y){const T=[r.Schemas.http,r.Schemas.https,r.Schemas.mailto,r.Schemas.data,r.Schemas.file,r.Schemas.vscodeFileResource,r.Schemas.vscodeRemote,r.Schemas.vscodeRemoteResource];return y.isTrusted&&T.push(r.Schemas.command),{config:{ALLOWED_TAGS:["ul","li","p","b","i","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"],ALLOWED_ATTR:["href","data-href","target","title","src","alt","class","style","data-code","width","height","align"],ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:T}}function b(y){return typeof y=="string"?y:E(y)}e.renderStringAsPlaintext=b;function E(y){const T=new s.marked.Renderer;T.code=F=>F,T.blockquote=F=>F,T.html=F=>"",T.heading=(F,L,M)=>F+` `,T.hr=()=>"",T.list=(F,L)=>F,T.listitem=F=>F+` `,T.paragraph=F=>F+` `,T.table=(F,L)=>F+L+` `,T.tablerow=F=>F,T.tablecell=(F,L)=>F+" ",T.strong=F=>F,T.em=F=>F,T.codespan=F=>F,T.br=()=>` `,T.del=F=>F,T.image=(F,L,M)=>"",T.text=F=>F,T.link=(F,L,M)=>M;let R=y.value??"";R.length>1e5&&(R=`${R.substr(0,1e5)}\u2026`);const O=new Map([[""",'"'],[" "," "],["&","&"],["'","'"],["<","<"],[">",">"]]),x=s.marked.parse(R,{renderer:T}).replace(/&(#\d+|[a-zA-Z]+);/g,F=>O.get(F)??F);return d({isTrusted:!1},x).toString()}e.renderMarkdownAsPlaintext=E}),define(ne[111],re([1,0,157,18,48,14,19,29,9]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.splitName=e.unmnemonicLabel=e.mnemonicButtonLabel=e.mnemonicMenuLabel=e.template=e.shorten=e.untildify=e.tildify=e.normalizeDriveLetter=e.getBaseLabel=e.getPathLabel=void 0;function w(d,m,b){if(typeof d=="string"&&(d=I.URI.file(d)),b){const y=b.getWorkspaceFolder(d);if(y){const T=b.getWorkspace().folders.length>1;let R;if((0,k.isEqual)(y.uri,d)?R="":R=(0,k.relativePath)(y.uri,d),T){const O=y.name?y.name:(0,k.basename)(y.uri);R=R?O+" \u2022 "+R:O}return R}}if(d.scheme!==f.Schemas.file&&d.scheme!==f.Schemas.untitled)return d.with({query:null,fragment:null}).toString(!0);if((0,t.hasDriveLetter)(d.fsPath))return(0,_.normalize)(C(d.fsPath));let E=(0,_.normalize)(d.fsPath);return!A.isWindows&&m?.userHome&&(E=c(E,m.userHome.fsPath)),E}e.getPathLabel=w;function v(d){if(!d)return;typeof d=="string"&&(d=I.URI.file(d));const m=(0,k.basename)(d)||(d.scheme===f.Schemas.file?d.fsPath:d.path);return A.isWindows&&(0,t.isRootOrDriveLetter)(m)?C(m):m}e.getBaseLabel=v;function C(d,m){return(0,t.hasDriveLetter)(d,m)?d.charAt(0).toUpperCase()+d.slice(1):d}e.normalizeDriveLetter=C;let o=Object.create(null);function c(d,m){if(A.isWindows||!d||!m)return d;let b=o.original===m?o.normalized:void 0;return b||(b=`${(0,D.rtrim)(m,_.posix.sep)}${_.posix.sep}`,o={original:m,normalized:b}),(A.isLinux?d.startsWith(b):(0,D.startsWithIgnoreCase)(d,b))&&(d=`~/${d.substr(b.length)}`),d}e.tildify=c;function i(d,m){return d.replace(/^~($|\/|\\)/,`${m}$1`)}e.untildify=i;const S="\u2026",s="\\\\",l="~";function r(d,m=_.sep){const b=new Array(d.length);let E=!1;for(let y=0;y<d.length;y++){let T=d[y];if(T===""){b[y]=`.${m}`;continue}if(!T){b[y]=T;continue}E=!0;let R="";T.indexOf(s)===0?(R=T.substr(0,T.indexOf(s)+s.length),T=T.substr(T.indexOf(s)+s.length)):T.indexOf(m)===0?(R=T.substr(0,T.indexOf(m)+m.length),T=T.substr(T.indexOf(m)+m.length)):T.indexOf(l)===0&&(R=T.substr(0,T.indexOf(l)+l.length),T=T.substr(T.indexOf(l)+l.length));const O=T.split(m);for(let x=1;E&&x<=O.length;x++)for(let F=O.length-x;E&&F>=0;F--){E=!1;let L=O.slice(F,F+x).join(m);for(let M=0;!E&&M<d.length;M++)if(M!==y&&d[M]&&d[M].indexOf(L)>-1){const N=F+x===O.length,B=F>0&&d[M].indexOf(m)>-1?m+L:L,P=d[M].endsWith(B);E=!N||P}if(!E){let M="";(O[0].endsWith(":")||R!=="")&&(F===1&&(F=0,x++,L=O[0]+m+L),F>0&&(M=O[0]+m),M=R+M),F>0&&(M=M+S+m),M=M+L,F+x<O.length&&(M=M+m+S),b[y]=M}}E&&(b[y]=T)}return b}e.shorten=r;var p;(function(d){d[d.TEXT=0]="TEXT",d[d.VARIABLE=1]="VARIABLE",d[d.SEPARATOR=2]="SEPARATOR"})(p||(p={}));function u(d,m=Object.create(null)){const b=[];let E=!1,y="";for(const T of d)if(T==="$"||E&&T==="{")y&&b.push({value:y,type:p.TEXT}),y="",E=!0;else if(T==="}"&&E){const R=m[y];if(typeof R=="string")R.length&&b.push({value:R,type:p.VARIABLE});else if(R){const O=b[b.length-1];(!O||O.type!==p.SEPARATOR)&&b.push({value:R.label,type:p.SEPARATOR})}y="",E=!1}else y+=T;return y&&!E&&b.push({value:y,type:p.TEXT}),b.filter((T,R)=>{if(T.type===p.SEPARATOR){const O=b[R-1],x=b[R+1];return[O,x].every(F=>F&&(F.type===p.VARIABLE||F.type===p.TEXT)&&F.value.length>0)}return!0}).map(T=>T.value).join("")}e.template=u;function a(d,m){return A.isMacintosh||m?d.replace(/\(&&\w\)|&&/g,"").replace(/&/g,A.isMacintosh?"&":"&&"):d.replace(/&&|&/g,b=>b==="&"?"&&":"&")}e.mnemonicMenuLabel=a;function n(d,m){return A.isMacintosh||m?d.replace(/\(&&\w\)|&&/g,""):A.isWindows?d.replace(/&&|&/g,b=>b==="&"?"&&":"&"):d.replace(/&&/g,"_")}e.mnemonicButtonLabel=n;function h(d){return d.replace(/&/g,"&&")}e.unmnemonicLabel=h;function g(d){const m=d.indexOf("/")!==-1?_.posix:_.win32,b=m.basename(d),E=m.dirname(d);return b.length?{name:b,parentPath:E}:{name:E,parentPath:""}}e.splitName=g}),define(ne[967],re([1,0,110,55,48,19,9]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceTree=void 0;class D{constructor(C,o,c,i=void 0,S=void 0){this.uri=C,this.relativePath=o,this.context=c,this.element=i,this.parent=S,this._children=new Map}get childrenCount(){return this._children.size}get children(){return this._children.values()}get name(){return _.posix.basename(this.relativePath)}get(C){return this._children.get(C)}set(C,o){this._children.set(C,o)}delete(C){this._children.delete(C)}clear(){this._children.clear()}}Ee([t.memoize],D.prototype,"name",null);function I(v,C){typeof v.element!="undefined"&&C.push(v.element);for(const o of v.children)I(o,C);return C}class w{constructor(C,o=k.URI.file("/"),c=A.extUri){this.extUri=c,this.root=new D(o,"",C)}static getRoot(C){for(;C.parent;)C=C.parent;return C}static collect(C){return I(C,[])}static isResourceNode(C){return C instanceof D}add(C,o){const c=this.extUri.relativePath(this.root.uri,C)||C.path,i=new f.PathIterator(!1).reset(c);let S=this.root,s="";for(;;){const l=i.value();s=s+"/"+l;let r=S.get(l);if(r?i.hasNext()||(r.element=o):(r=new D(this.extUri.joinPath(this.root.uri,s),s,this.root.context,i.hasNext()?void 0:o,S),S.set(l,r)),S=r,!i.hasNext())return;i.next()}}delete(C){const o=this.extUri.relativePath(this.root.uri,C)||C.path,c=new f.PathIterator(!1).reset(o);return this._delete(this.root,c)}_delete(C,o){const c=o.value(),i=C.get(c);if(!!i){if(o.hasNext()){const S=this._delete(i,o.next());return typeof S!="undefined"&&i.childrenCount===0&&C.delete(c),S}return C.delete(c),i.element}}clear(){this.root.clear()}getNode(C){const o=this.extUri.relativePath(this.root.uri,C)||C.path,c=new f.PathIterator(!1).reset(o);let i=this.root;for(;;){const S=c.value(),s=i.get(S);if(!s||!c.hasNext())return s;i=s,c.next()}}}e.ResourceTree=w}),define(ne[654],re([1,0,9]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.transformAndReviveIncomingURIs=e.transformIncomingURIs=e.transformOutgoingURIs=e.DefaultURITransformer=e.URITransformer=void 0;function f(v){return v.toJSON()}class _{constructor(C){this._uriTransformer=C}transformIncoming(C){const o=this._uriTransformer.transformIncoming(C);return o===C?C:f(t.URI.from(o))}transformOutgoing(C){const o=this._uriTransformer.transformOutgoing(C);return o===C?C:f(t.URI.from(o))}transformOutgoingURI(C){const o=this._uriTransformer.transformOutgoing(C);return o===C?C:t.URI.from(o)}transformOutgoingScheme(C){return this._uriTransformer.transformOutgoingScheme(C)}}e.URITransformer=_,e.DefaultURITransformer=new class{transformIncoming(v){return v}transformOutgoing(v){return v}transformOutgoingURI(v){return v}transformOutgoingScheme(v){return v}};function A(v,C,o){if(!v||o>200)return null;if(typeof v=="object"){if(v instanceof t.URI)return C.transformOutgoing(v);for(let c in v)if(Object.hasOwnProperty.call(v,c)){const i=A(v[c],C,o+1);i!==null&&(v[c]=i)}}return null}function k(v,C){const o=A(v,C,0);return o===null?v:o}e.transformOutgoingURIs=k;function D(v,C,o,c){if(!v||c>200)return null;if(typeof v=="object"){if(v.$mid===1)return o?t.URI.revive(C.transformIncoming(v)):C.transformIncoming(v);for(let i in v)if(Object.hasOwnProperty.call(v,i)){const S=D(v[i],C,o,c+1);S!==null&&(v[i]=S)}}return null}function I(v,C){const o=D(v,C,!1,0);return o===null?v:o}e.transformIncomingURIs=I;function w(v,C){const o=D(v,C,!0,0);return o===null?v:o}e.transformAndReviveIncomingURIs=w}),define(ne[89],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateUuid=e.isUUID=void 0;const t=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function f(I){return t.test(I)}e.isUUID=f;const _=new Uint8Array(16),A=[];for(let I=0;I<256;I++)A.push(I.toString(16).padStart(2,"0"));let k;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?k=crypto.getRandomValues.bind(crypto):k=function(I){for(let w=0;w<I.length;w++)I[w]=Math.floor(Math.random()*256);return I};function D(){k(_),_[6]=_[6]&15|64,_[8]=_[8]&63|128;let I=0,w="";return w+=A[_[I++]],w+=A[_[I++]],w+=A[_[I++]],w+=A[_[I++]],w+="-",w+=A[_[I++]],w+=A[_[I++]],w+="-",w+=A[_[I++]],w+=A[_[I++]],w+="-",w+=A[_[I++]],w+=A[_[I++]],w+="-",w+=A[_[I++]],w+=A[_[I++]],w+=A[_[I++]],w+=A[_[I++]],w+=A[_[I++]],w+=A[_[I++]],w}e.generateUuid=D}),define(ne[448],re([1,0,22,6,2,14,13,29]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.SimpleWorkerServer=e.SimpleWorkerClient=e.logOnceWebWorkerWarning=void 0;const I="$initialize";let w=!1;function v(g){!A.isWeb||(w||(w=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(g.message))}e.logOnceWebWorkerWarning=v;var C;(function(g){g[g.Request=0]="Request",g[g.Reply=1]="Reply",g[g.SubscribeEvent=2]="SubscribeEvent",g[g.Event=3]="Event",g[g.UnsubscribeEvent=4]="UnsubscribeEvent"})(C||(C={}));class o{constructor(d,m,b,E){this.vsWorker=d,this.req=m,this.method=b,this.args=E,this.type=0}}class c{constructor(d,m,b,E){this.vsWorker=d,this.seq=m,this.res=b,this.err=E,this.type=1}}class i{constructor(d,m,b,E){this.vsWorker=d,this.req=m,this.eventName=b,this.arg=E,this.type=2}}class S{constructor(d,m,b){this.vsWorker=d,this.req=m,this.event=b,this.type=3}}class s{constructor(d,m){this.vsWorker=d,this.req=m,this.type=4}}class l{constructor(d){this._workerId=-1,this._handler=d,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(d){this._workerId=d}sendMessage(d,m){const b=String(++this._lastSentReq);return new Promise((E,y)=>{this._pendingReplies[b]={resolve:E,reject:y},this._send(new o(this._workerId,b,d,m))})}listen(d,m){let b=null;const E=new f.Emitter({onFirstListenerAdd:()=>{b=String(++this._lastSentReq),this._pendingEmitters.set(b,E),this._send(new i(this._workerId,b,d,m))},onLastListenerRemove:()=>{this._pendingEmitters.delete(b),this._send(new s(this._workerId,b)),b=null}});return E.event}handleMessage(d){!d||!d.vsWorker||this._workerId!==-1&&d.vsWorker!==this._workerId||this._handleMessage(d)}_handleMessage(d){switch(d.type){case 1:return this._handleReplyMessage(d);case 0:return this._handleRequestMessage(d);case 2:return this._handleSubscribeEventMessage(d);case 3:return this._handleEventMessage(d);case 4:return this._handleUnsubscribeEventMessage(d)}}_handleReplyMessage(d){if(!this._pendingReplies[d.seq]){console.warn("Got reply to unknown seq");return}let m=this._pendingReplies[d.seq];if(delete this._pendingReplies[d.seq],d.err){let b=d.err;d.err.$isError&&(b=new Error,b.name=d.err.name,b.message=d.err.message,b.stack=d.err.stack),m.reject(b);return}m.resolve(d.res)}_handleRequestMessage(d){let m=d.req;this._handler.handleMessage(d.method,d.args).then(E=>{this._send(new c(this._workerId,m,E,void 0))},E=>{E.detail instanceof Error&&(E.detail=(0,t.transformErrorForSerialization)(E.detail)),this._send(new c(this._workerId,m,void 0,(0,t.transformErrorForSerialization)(E)))})}_handleSubscribeEventMessage(d){const m=d.req,b=this._handler.handleEvent(d.eventName,d.arg)(E=>{this._send(new S(this._workerId,m,E))});this._pendingEvents.set(m,b)}_handleEventMessage(d){if(!this._pendingEmitters.has(d.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(d.req).fire(d.event)}_handleUnsubscribeEventMessage(d){if(!this._pendingEvents.has(d.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(d.req).dispose(),this._pendingEvents.delete(d.req)}_send(d){let m=[];if(d.type===0)for(let b=0;b<d.args.length;b++)d.args[b]instanceof ArrayBuffer&&m.push(d.args[b]);else d.type===1&&d.res instanceof ArrayBuffer&&m.push(d.res);this._handler.sendMessage(d,m)}}class r extends _.Disposable{constructor(d,m,b){super();let E=null;this._worker=this._register(d.create("vs/base/common/worker/simpleWorker",x=>{this._protocol.handleMessage(x)},x=>{E&&E(x)})),this._protocol=new l({sendMessage:(x,F)=>{this._worker.postMessage(x,F)},handleMessage:(x,F)=>{if(typeof b[x]!="function")return Promise.reject(new Error("Missing method "+x+" on main thread host."));try{return Promise.resolve(b[x].apply(b,F))}catch(L){return Promise.reject(L)}},handleEvent:(x,F)=>{if(u(x)){const L=b[x].call(b,F);if(typeof L!="function")throw new Error(`Missing dynamic event ${x} on main thread host.`);return L}if(p(x)){const L=b[x];if(typeof L!="function")throw new Error(`Missing event ${x} on main thread host.`);return L}throw new Error(`Malformed event name ${x}`)}}),this._protocol.setWorkerId(this._worker.getId());let y=null;typeof A.globals.require!="undefined"&&typeof A.globals.require.getConfig=="function"?y=A.globals.require.getConfig():typeof A.globals.requirejs!="undefined"&&(y=A.globals.requirejs.s.contexts._.config);const T=k.getAllMethodNames(b);this._onModuleLoaded=this._protocol.sendMessage(I,[this._worker.getId(),JSON.parse(JSON.stringify(y)),m,T]);const R=(x,F)=>this._request(x,F),O=(x,F)=>this._protocol.listen(x,F);this._lazyProxy=new Promise((x,F)=>{E=F,this._onModuleLoaded.then(L=>{x(a(L,R,O))},L=>{F(L),this._onError("Worker failed to load "+m,L)})})}getProxyObject(){return this._lazyProxy}_request(d,m){return new Promise((b,E)=>{this._onModuleLoaded.then(()=>{this._protocol.sendMessage(d,m).then(b,E)},E)})}_onError(d,m){console.error(d),console.info(m)}}e.SimpleWorkerClient=r;function p(g){return g[0]==="o"&&g[1]==="n"&&D.isUpperAsciiLetter(g.charCodeAt(2))}function u(g){return/^onDynamic/.test(g)&&D.isUpperAsciiLetter(g.charCodeAt(9))}function a(g,d,m){const b=T=>function(){const R=Array.prototype.slice.call(arguments,0);return d(T,R)},E=T=>function(R){return m(T,R)};let y={};for(const T of g){if(u(T)){y[T]=E(T);continue}if(p(T)){y[T]=m(T,void 0);continue}y[T]=b(T)}return y}class n{constructor(d,m){this._requestHandlerFactory=m,this._requestHandler=null,this._protocol=new l({sendMessage:(b,E)=>{d(b,E)},handleMessage:(b,E)=>this._handleMessage(b,E),handleEvent:(b,E)=>this._handleEvent(b,E)})}onmessage(d){this._protocol.handleMessage(d)}_handleMessage(d,m){if(d===I)return this.initialize(m[0],m[1],m[2],m[3]);if(!this._requestHandler||typeof this._requestHandler[d]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+d));try{return Promise.resolve(this._requestHandler[d].apply(this._requestHandler,m))}catch(b){return Promise.reject(b)}}_handleEvent(d,m){if(!this._requestHandler)throw new Error("Missing requestHandler");if(u(d)){const b=this._requestHandler[d].call(this._requestHandler,m);if(typeof b!="function")throw new Error(`Missing dynamic event ${d} on request handler.`);return b}if(p(d)){const b=this._requestHandler[d];if(typeof b!="function")throw new Error(`Missing event ${d} on request handler.`);return b}throw new Error(`Malformed event name ${d}`)}initialize(d,m,b,E){this._protocol.setWorkerId(d);const R=a(E,(O,x)=>this._protocol.sendMessage(O,x),(O,x)=>this._protocol.listen(O,x));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(R),Promise.resolve(k.getAllMethodNames(this._requestHandler))):(m&&(typeof m.baseUrl!="undefined"&&delete m.baseUrl,typeof m.paths!="undefined"&&typeof m.paths.vs!="undefined"&&delete m.paths.vs,typeof m.trustedTypesPolicy!==void 0&&delete m.trustedTypesPolicy,m.catchError=!0,A.globals.require.config(m)),new Promise((O,x)=>{(A.globals.require||Q)([b],L=>{if(this._requestHandler=L.create(R),!this._requestHandler){x(new Error("No RequestHandler!"));return}O(k.getAllMethodNames(this._requestHandler))},x)}))}}e.SimpleWorkerServer=n;function h(g){return new n(g,null)}e.create=h}),define(ne[655],re([1,0,14,448]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultWorkerFactory=e.getWorkerBootstrapUrl=void 0;const _=window.trustedTypes?.createPolicy("defaultWorkerFactory",{createScriptURL:v=>v});function A(v){if(t.globals.MonacoEnvironment){if(typeof t.globals.MonacoEnvironment.getWorker=="function")return t.globals.MonacoEnvironment.getWorker("workerMain.js",v);if(typeof t.globals.MonacoEnvironment.getWorkerUrl=="function"){const C=t.globals.MonacoEnvironment.getWorkerUrl("workerMain.js",v);return new Worker(_?_.createScriptURL(C):C,{name:v})}}if(typeof Q=="function"){const C=Q.toUrl("vs/base/worker/workerMain.js"),o=k(C,v);return new Worker(_?_.createScriptURL(o):o,{name:v})}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function k(v,C){if(/^((http:)|(https:)|(file:))/.test(v)&&v.substring(0,self.origin.length)!==self.origin){const o="vs/base/worker/defaultWorkerFactory.js",c=Q.toUrl(o).slice(0,-o.length),i=`/*${C}*/self.MonacoEnvironment={baseUrl: '${c}'};const ttPolicy = self.trustedTypes?.createPolicy('defaultWorkerFactory', { createScriptURL: value => value });importScripts(ttPolicy?.createScriptURL('${v}') ?? '${v}');/*${C}*/`,S=new Blob([i],{type:"application/javascript"});return URL.createObjectURL(S)}return v+"#"+C}e.getWorkerBootstrapUrl=k;function D(v){return typeof v.then=="function"}class I{constructor(C,o,c,i,S){this.id=o;const s=A(c);D(s)?this.worker=s:this.worker=Promise.resolve(s),this.postMessage(C,[]),this.worker.then(l=>{l.onmessage=function(r){i(r.data)},l.onmessageerror=S,typeof l.addEventListener=="function"&&l.addEventListener("error",S)})}getId(){return this.id}postMessage(C,o){this.worker&&this.worker.then(c=>c.postMessage(C,o))}dispose(){this.worker&&this.worker.then(C=>C.terminate()),this.worker=null}}class w{constructor(C){this._label=C,this._webWorkerFailedBeforeError=!1}create(C,o,c){let i=++w.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new I(C,i,this._label||"anonymous"+i,o,S=>{(0,f.logOnceWebWorkerWarning)(S),this._webWorkerFailedBeforeError=S,c(S)})}}e.DefaultWorkerFactory=w,w.LAST_WORKER_ID=0}),define(ne[968],re([1,0,2824]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineDecoder=void 0;class f{constructor(A="utf8"){this.stringDecoder=new t.StringDecoder(A),this.remaining=null}write(A){const k=[],D=this.remaining?this.remaining+this.stringDecoder.write(A):this.stringDecoder.write(A);if(D.length<1)return k;let I=0,w,v=I;for(;v<D.length;)if(w=D.charCodeAt(v),w===13||w===10){if(k.push(D.substring(I,v)),v++,v<D.length){const C=w;w=D.charCodeAt(v),(C===13&&w===10||C===10&&w===13)&&v++}I=v}else v++;return this.remaining=I<D.length?D.substr(I):null,k}end(){return this.remaining}}e.LineDecoder=f}),define(ne[969],re([1,0,2825,970,2826,11,157,960,48,14,19,9]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Promises=e.writeFileSync=e.SymlinkSupport=e.whenDeleted=e.readdirSync=e.rimrafSync=e.RimRafMode=void 0;var o;(function(N){N[N.UNLINK=0]="UNLINK",N[N.MOVE=1]="MOVE"})(o=e.RimRafMode||(e.RimRafMode={}));async function c(N,B=o.UNLINK){if((0,k.isRootOrDriveLetter)(N))throw new Error("rimraf - will refuse to recursively delete root");return B===o.UNLINK?S(N):i(N)}async function i(N){try{const B=(0,k.randomPath)((0,f.tmpdir)());try{await t.promises.rename(N,B)}catch{return S(N)}S(B).catch(P=>{})}catch(B){if(B.code!=="ENOENT")throw B}}async function S(N){return(0,_.promisify)(t.rm)(N,{recursive:!0,force:!0,maxRetries:3})}function s(N){if((0,k.isRootOrDriveLetter)(N))throw new Error("rimraf - will refuse to recursively delete root");t.rmSync(N,{recursive:!0,force:!0,maxRetries:3})}e.rimrafSync=s;async function l(N,B){return u(await(B?r(N):(0,_.promisify)(t.readdir)(N)))}async function r(N){try{return await(0,_.promisify)(t.readdir)(N,{withFileTypes:!0})}catch(V){console.warn("[node.js fs] readdir with filetypes failed with error: ",V)}const B=[],P=await l(N);for(const V of P){let z=!1,U=!1,H=!1;try{const K=await e.Promises.lstat((0,I.join)(N,V));z=K.isFile(),U=K.isDirectory(),H=K.isSymbolicLink()}catch(K){console.warn("[node.js fs] unexpected error from lstat after readdir: ",K)}B.push({name:V,isFile:()=>z,isDirectory:()=>U,isSymbolicLink:()=>H})}return B}function p(N){return u(t.readdirSync(N))}e.readdirSync=p;function u(N){return N.map(B=>typeof B=="string"?w.isMacintosh?(0,D.normalizeNFC)(B):B:(B.name=w.isMacintosh?(0,D.normalizeNFC)(B.name):B.name,B))}async function a(N){const B=await l(N),P=[];for(const V of B)await h.existsDirectory((0,I.join)(N,V))&&P.push(V);return P}function n(N,B=1e3){return new Promise(P=>{let V=!1;const z=setInterval(()=>{V||(V=!0,t.access(N,U=>{V=!1,U&&(clearInterval(z),P(void 0))}))},B)})}e.whenDeleted=n;var h;(function(N){async function B(z){let U;try{if(U=await e.Promises.lstat(z),!U.isSymbolicLink())return{stat:U}}catch{}try{return{stat:await e.Promises.stat(z),symbolicLink:U?.isSymbolicLink()?{dangling:!1}:void 0}}catch(H){if(H.code==="ENOENT"&&U)return{stat:U,symbolicLink:{dangling:!0}};if(w.isWindows&&H.code==="EACCES")try{return{stat:await e.Promises.stat(await e.Promises.readlink(z)),symbolicLink:{dangling:!1}}}catch(K){if(K.code==="ENOENT"&&U)return{stat:U,symbolicLink:{dangling:!0}};throw K}throw H}}N.stat=B;async function P(z){try{const{stat:U,symbolicLink:H}=await N.stat(z);return U.isFile()&&H?.dangling!==!0}catch{}return!1}N.existsFile=P;async function V(z){try{const{stat:U,symbolicLink:H}=await N.stat(z);return U.isDirectory()&&H?.dangling!==!0}catch{}return!1}N.existsDirectory=V})(h=e.SymlinkSupport||(e.SymlinkSupport={}));const g=new A.ResourceQueue;function d(N,B,P){return g.queueFor(C.URI.file(N),v.extUriBiasedIgnorePathCase).queue(()=>{const V=y(P);return new Promise((z,U)=>b(N,B,V,H=>H?U(H):z()))})}let m=!0;function b(N,B,P,V){if(!m)return t.writeFile(N,B,{mode:P.mode,flag:P.flag},V);t.open(N,P.flag,P.mode,(z,U)=>{if(z)return V(z);t.writeFile(U,B,H=>{if(H)return t.close(U,()=>V(H));t.fdatasync(U,K=>(K&&(console.warn("[node.js fs] fdatasync is now disabled for this session because it failed: ",K),m=!1),t.close(U,G=>V(G))))})})}function E(N,B,P){const V=y(P);if(!m)return t.writeFileSync(N,B,{mode:V.mode,flag:V.flag});const z=t.openSync(N,V.flag,V.mode);try{t.writeFileSync(z,B);try{t.fdatasyncSync(z)}catch(U){console.warn("[node.js fs] fdatasyncSync is now disabled for this session because it failed: ",U),m=!1}}finally{t.closeSync(z)}}e.writeFileSync=E;function y(N){return N?{mode:typeof N.mode=="number"?N.mode:438,flag:typeof N.flag=="string"?N.flag:"w"}:{mode:438,flag:"w"}}async function T(N,B){if(N!==B)try{await e.Promises.rename(N,B)}catch(P){if(N.toLowerCase()!==B.toLowerCase()&&P.code==="EXDEV"||N.endsWith("."))await R(N,B,{preserveSymlinks:!1}),await c(N,o.MOVE);else throw P}}async function R(N,B,P){return x(N,B,{root:{source:N,target:B},options:P,handledSourcePaths:new Set})}const O=511;async function x(N,B,P){if(P.handledSourcePaths.has(N))return;P.handledSourcePaths.add(N);const{stat:V,symbolicLink:z}=await h.stat(N);if(z){if(P.options.preserveSymlinks)try{return await M(N,B,P)}catch(U){console.warn("[node.js fs] copy of symlink failed: ",U)}if(z.dangling)return}return V.isDirectory()?F(N,B,V.mode&O,P):L(N,B,V.mode&O)}async function F(N,B,P,V){await e.Promises.mkdir(B,{recursive:!0,mode:P});const z=await l(N);for(const U of z)await x((0,I.join)(N,U),(0,I.join)(B,U),V)}async function L(N,B,P){await e.Promises.copyFile(N,B),await e.Promises.chmod(B,P)}async function M(N,B,P){let V=await e.Promises.readlink(N);(0,k.isEqualOrParent)(V,P.root.source,!w.isLinux)&&(V=(0,I.join)(P.root.target,V.substr(P.root.source.length+1))),await e.Promises.symlink(V,B)}e.Promises=new class{get access(){return(0,_.promisify)(t.access)}get stat(){return(0,_.promisify)(t.stat)}get lstat(){return(0,_.promisify)(t.lstat)}get utimes(){return(0,_.promisify)(t.utimes)}get read(){return(N,B,P,V,z)=>new Promise((U,H)=>{t.read(N,B,P,V,z,(K,G,q)=>K?H(K):U({bytesRead:G,buffer:q}))})}get readFile(){return(0,_.promisify)(t.readFile)}get write(){return(N,B,P,V,z)=>new Promise((U,H)=>{t.write(N,B,P,V,z,(K,G,q)=>K?H(K):U({bytesWritten:G,buffer:q}))})}get appendFile(){return(0,_.promisify)(t.appendFile)}get fdatasync(){return(0,_.promisify)(t.fdatasync)}get truncate(){return(0,_.promisify)(t.truncate)}get rename(){return(0,_.promisify)(t.rename)}get copyFile(){return(0,_.promisify)(t.copyFile)}get open(){return(0,_.promisify)(t.open)}get close(){return(0,_.promisify)(t.close)}get symlink(){return(0,_.promisify)(t.symlink)}get readlink(){return(0,_.promisify)(t.readlink)}get chmod(){return(0,_.promisify)(t.chmod)}get mkdir(){return(0,_.promisify)(t.mkdir)}get unlink(){return(0,_.promisify)(t.unlink)}get rmdir(){return(0,_.promisify)(t.rmdir)}get realpath(){return(0,_.promisify)(t.realpath)}async exists(N){try{return await e.Promises.access(N),!0}catch{return!1}}get readdir(){return l}get readDirsInDir(){return a}get writeFile(){return d}get rm(){return c}get move(){return T}get copy(){return R}}}),define(ne[971],re([1,0,656]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.findFreePortFaster=e.BROWSER_RESTRICTED_PORTS=e.findFreePort=void 0;function f(D,I,w,v=1){let C=!1;return new Promise(o=>{const c=setTimeout(()=>{if(!C)return C=!0,o(0)},w);_(D,I,v,i=>{if(!C)return C=!0,clearTimeout(c),o(i)})})}e.findFreePort=f;function _(D,I,w,v){if(I===0)return v(0);const C=new t.Socket;C.once("connect",()=>(k(C),_(D+w,I-1,w,v))),C.once("data",()=>{}),C.once("error",o=>(k(C),o.code!=="ECONNREFUSED"?_(D+w,I-1,w,v):v(D))),C.connect(D,"127.0.0.1")}e.BROWSER_RESTRICTED_PORTS={1:!0,7:!0,9:!0,11:!0,13:!0,15:!0,17:!0,19:!0,20:!0,21:!0,22:!0,23:!0,25:!0,37:!0,42:!0,43:!0,53:!0,69:!0,77:!0,79:!0,87:!0,95:!0,101:!0,102:!0,103:!0,104:!0,109:!0,110:!0,111:!0,113:!0,115:!0,117:!0,119:!0,123:!0,135:!0,137:!0,139:!0,143:!0,161:!0,179:!0,389:!0,427:!0,465:!0,512:!0,513:!0,514:!0,515:!0,526:!0,530:!0,531:!0,532:!0,540:!0,548:!0,554:!0,556:!0,563:!0,587:!0,601:!0,636:!0,989:!0,990:!0,993:!0,995:!0,1719:!0,1720:!0,1723:!0,2049:!0,3659:!0,4045:!0,5060:!0,5061:!0,6e3:!0,6566:!0,6665:!0,6666:!0,6667:!0,6668:!0,6669:!0,6697:!0,10080:!0};function A(D,I,w){let v=!1,C,o=1;const c=t.createServer({pauseOnConnect:!0});function i(S,s){v||(v=!0,c.removeAllListeners(),c.close(),C&&clearTimeout(C),s(S))}return new Promise(S=>{C=setTimeout(()=>{i(0,S)},w),c.on("listening",()=>{i(D,S)}),c.on("error",s=>{s&&(s.code==="EADDRINUSE"||s.code==="EACCES")&&o<I?(D++,o++,c.listen(D,"127.0.0.1")):i(0,S)}),c.on("close",()=>{i(0,S)}),c.listen(D,"127.0.0.1")})}e.findFreePortFaster=A;function k(D){try{D.removeAllListeners("connect"),D.removeAllListeners("error"),D.end(),D.destroy(),D.unref()}catch(I){console.error(I)}}}),define(ne[972],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONTEXT_MENU_CLOSE_CHANNEL=e.CONTEXT_MENU_CHANNEL=void 0,e.CONTEXT_MENU_CHANNEL="vscode:contextmenu",e.CONTEXT_MENU_CLOSE_CHANNEL="vscode:onCloseContextMenu"}),define(ne[171],re([1,0,15,11,60,30,110,22,6,2,180,29,13]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IPCLogger=e.logWithColors=e.ProxyChannel=e.StaticRouter=e.getNextTickChannel=e.getDelayedChannel=e.IPCClient=e.IPCServer=e.ChannelClient=e.RequestInitiator=e.ChannelServer=e.ResponseType=e.RequestType=void 0;var c;(function(U){U[U.Promise=100]="Promise",U[U.PromiseCancel=101]="PromiseCancel",U[U.EventListen=102]="EventListen",U[U.EventDispose=103]="EventDispose"})(c=e.RequestType||(e.RequestType={}));function i(U){switch(U){case 100:return"req";case 101:return"cancel";case 102:return"subscribe";case 103:return"unsubscribe"}}var S;(function(U){U[U.Initialize=200]="Initialize",U[U.PromiseSuccess=201]="PromiseSuccess",U[U.PromiseError=202]="PromiseError",U[U.PromiseErrorObj=203]="PromiseErrorObj",U[U.EventFire=204]="EventFire"})(S=e.ResponseType||(e.ResponseType={}));function s(U){switch(U){case 200:return"init";case 201:return"reply:";case 202:case 203:return"replyErr:";case 204:return"event:"}}var l;(function(U){U[U.Uninitialized=0]="Uninitialized",U[U.Idle=1]="Idle"})(l||(l={}));class r{constructor(H){this.buffer=H,this.pos=0}read(H){const K=this.buffer.slice(this.pos,this.pos+H);return this.pos+=K.byteLength,K}}class p{constructor(){this.buffers=[]}get buffer(){return _.VSBuffer.concat(this.buffers)}write(H){this.buffers.push(H)}}var u;(function(U){U[U.Undefined=0]="Undefined",U[U.String=1]="String",U[U.Buffer=2]="Buffer",U[U.VSBuffer=3]="VSBuffer",U[U.Array=4]="Array",U[U.Object=5]="Object"})(u||(u={}));function a(U){const H=_.VSBuffer.alloc(4);return H.writeUInt32BE(U,0),H}function n(U){return U.read(4).readUInt32BE(0)}function h(U){const H=_.VSBuffer.alloc(1);return H.writeUInt8(U,0),H}const g={Undefined:h(u.Undefined),String:h(u.String),Buffer:h(u.Buffer),VSBuffer:h(u.VSBuffer),Array:h(u.Array),Object:h(u.Object)},d=typeof Buffer!="undefined";function m(U,H){if(typeof H=="undefined")U.write(g.Undefined);else if(typeof H=="string"){const K=_.VSBuffer.fromString(H);U.write(g.String),U.write(a(K.byteLength)),U.write(K)}else if(d&&Buffer.isBuffer(H)){const K=_.VSBuffer.wrap(H);U.write(g.Buffer),U.write(a(K.byteLength)),U.write(K)}else if(H instanceof _.VSBuffer)U.write(g.VSBuffer),U.write(a(H.byteLength)),U.write(H);else if(Array.isArray(H)){U.write(g.Array),U.write(a(H.length));for(const K of H)m(U,K)}else{const K=_.VSBuffer.fromString(JSON.stringify(H));U.write(g.Object),U.write(a(K.byteLength)),U.write(K)}}function b(U){switch(U.read(1).readUInt8(0)){case u.Undefined:return;case u.String:return U.read(n(U)).toString();case u.Buffer:return U.read(n(U)).buffer;case u.VSBuffer:return U.read(n(U));case u.Array:{const K=n(U),G=[];for(let q=0;q<K;q++)G.push(b(U));return G}case u.Object:return JSON.parse(U.read(n(U)).toString())}}class E{constructor(H,K,G=null,q=1e3){this.protocol=H,this.ctx=K,this.logger=G,this.timeoutDelay=q,this.channels=new Map,this.activeRequests=new Map,this.pendingRequests=new Map,this.protocolListener=this.protocol.onMessage(Z=>this.onRawMessage(Z)),this.sendResponse({type:200})}registerChannel(H,K){this.channels.set(H,K),setTimeout(()=>this.flushPendingRequests(H),0)}sendResponse(H){switch(H.type){case 200:{const K=this.send([H.type]);this.logger?.logOutgoing(K,0,1,s(H.type));return}case 201:case 202:case 204:case 203:{const K=this.send([H.type,H.id],H.data);this.logger?.logOutgoing(K,H.id,1,s(H.type),H.data);return}}}send(H,K=void 0){const G=new p;return m(G,H),m(G,K),this.sendBuffer(G.buffer)}sendBuffer(H){try{return this.protocol.send(H),H.byteLength}catch{return 0}}onRawMessage(H){const K=new r(H),G=b(K),q=b(K),Z=G[0];switch(Z){case 100:return this.logger?.logIncoming(H.byteLength,G[1],1,`${i(Z)}: ${G[2]}.${G[3]}`,q),this.onPromise({type:Z,id:G[1],channelName:G[2],name:G[3],arg:q});case 102:return this.logger?.logIncoming(H.byteLength,G[1],1,`${i(Z)}: ${G[2]}.${G[3]}`,q),this.onEventListen({type:Z,id:G[1],channelName:G[2],name:G[3],arg:q});case 101:return this.logger?.logIncoming(H.byteLength,G[1],1,`${i(Z)}`),this.disposeActiveRequest({type:Z,id:G[1]});case 103:return this.logger?.logIncoming(H.byteLength,G[1],1,`${i(Z)}`),this.disposeActiveRequest({type:Z,id:G[1]})}}onPromise(H){const K=this.channels.get(H.channelName);if(!K){this.collectPendingRequest(H);return}const G=new A.CancellationTokenSource;let q;try{q=K.call(this.ctx,H.name,H.arg,G.token)}catch(X){q=Promise.reject(X)}const Z=H.id;q.then(X=>{this.sendResponse({id:Z,data:X,type:201}),this.activeRequests.delete(H.id)},X=>{X instanceof Error?this.sendResponse({id:Z,data:{message:X.message,name:X.name,stack:X.stack?X.stack.split?X.stack.split(` `):X.stack:void 0},type:202}):this.sendResponse({id:Z,data:X,type:203}),this.activeRequests.delete(H.id)});const j=(0,w.toDisposable)(()=>G.cancel());this.activeRequests.set(H.id,j)}onEventListen(H){const K=this.channels.get(H.channelName);if(!K){this.collectPendingRequest(H);return}const G=H.id,Z=K.listen(this.ctx,H.name,H.arg)(j=>this.sendResponse({id:G,data:j,type:204}));this.activeRequests.set(H.id,Z)}disposeActiveRequest(H){const K=this.activeRequests.get(H.id);K&&(K.dispose(),this.activeRequests.delete(H.id))}collectPendingRequest(H){let K=this.pendingRequests.get(H.channelName);K||(K=[],this.pendingRequests.set(H.channelName,K));const G=setTimeout(()=>{console.error(`Unknown channel: ${H.channelName}`),H.type===100&&this.sendResponse({id:H.id,data:{name:"Unknown channel",message:`Channel name '${H.channelName}' timed out after ${this.timeoutDelay}ms`,stack:void 0},type:202})},this.timeoutDelay);K.push({request:H,timeoutTimer:G})}flushPendingRequests(H){const K=this.pendingRequests.get(H);if(K){for(const G of K)switch(clearTimeout(G.timeoutTimer),G.request.type){case 100:this.onPromise(G.request);break;case 102:this.onEventListen(G.request);break}this.pendingRequests.delete(H)}}dispose(){this.protocolListener&&(this.protocolListener.dispose(),this.protocolListener=null),(0,w.dispose)(this.activeRequests.values()),this.activeRequests.clear()}}e.ChannelServer=E;var y;(function(U){U[U.LocalSide=0]="LocalSide",U[U.OtherSide=1]="OtherSide"})(y=e.RequestInitiator||(e.RequestInitiator={}));class T{constructor(H,K=null){this.protocol=H,this.isDisposed=!1,this.state=l.Uninitialized,this.activeRequests=new Set,this.handlers=new Map,this.lastRequestId=0,this._onDidInitialize=new I.Emitter,this.onDidInitialize=this._onDidInitialize.event,this.protocolListener=this.protocol.onMessage(G=>this.onBuffer(G)),this.logger=K}getChannel(H){const K=this;return{call(G,q,Z){return K.isDisposed?Promise.reject(D.canceled()):K.requestPromise(H,G,q,Z)},listen(G,q){return K.isDisposed?I.Event.None:K.requestEvent(H,G,q)}}}requestPromise(H,K,G,q=A.CancellationToken.None){const Z=this.lastRequestId++,X={id:Z,type:100,channelName:H,name:K,arg:G};if(q.isCancellationRequested)return Promise.reject(D.canceled());let Y;return new Promise((J,ee)=>{if(q.isCancellationRequested)return ee(D.canceled());const te=()=>{const le=ae=>{switch(ae.type){case 201:this.handlers.delete(Z),J(ae.data);break;case 202:{this.handlers.delete(Z);const ue=new Error(ae.data.message);ue.stack=ae.data.stack,ue.name=ae.data.name,ee(ue);break}case 203:this.handlers.delete(Z),ee(ae.data);break}};this.handlers.set(Z,le),this.sendRequest(X)};let se=null;this.state===l.Idle?te():(se=(0,f.createCancelablePromise)(le=>this.whenInitialized()),se.then(()=>{se=null,te()}));const ie=()=>{se?(se.cancel(),se=null):this.sendRequest({id:Z,type:101}),ee(D.canceled())},ce=q.onCancellationRequested(ie);Y=(0,w.combinedDisposable)((0,w.toDisposable)(ie),ce),this.activeRequests.add(Y)}).finally(()=>{this.activeRequests.delete(Y)})}requestEvent(H,K,G){const q=this.lastRequestId++,j={id:q,type:102,channelName:H,name:K,arg:G};let X=null;const Y=new I.Emitter({onFirstListenerAdd:()=>{X=(0,f.createCancelablePromise)(J=>this.whenInitialized()),X.then(()=>{X=null,this.activeRequests.add(Y),this.sendRequest(j)})},onLastListenerRemove:()=>{X?(X.cancel(),X=null):(this.activeRequests.delete(Y),this.sendRequest({id:q,type:103}))}}),$=J=>Y.fire(J.data);return this.handlers.set(q,$),Y.event}sendRequest(H){switch(H.type){case 100:case 102:{const K=this.send([H.type,H.id,H.channelName,H.name],H.arg);this.logger&&this.logger.logOutgoing(K,H.id,0,`${i(H.type)}: ${H.channelName}.${H.name}`,H.arg);return}case 101:case 103:{const K=this.send([H.type,H.id]);this.logger&&this.logger.logOutgoing(K,H.id,0,i(H.type));return}}}send(H,K=void 0){const G=new p;return m(G,H),m(G,K),this.sendBuffer(G.buffer)}sendBuffer(H){try{return this.protocol.send(H),H.byteLength}catch{return 0}}onBuffer(H){const K=new r(H),G=b(K),q=b(K),Z=G[0];switch(Z){case 200:return this.logger&&this.logger.logIncoming(H.byteLength,0,0,s(Z)),this.onResponse({type:G[0]});case 201:case 202:case 204:case 203:return this.logger&&this.logger.logIncoming(H.byteLength,G[1],0,s(Z),q),this.onResponse({type:G[0],id:G[1],data:q})}}onResponse(H){if(H.type===200){this.state=l.Idle,this._onDidInitialize.fire();return}const K=this.handlers.get(H.id);K&&K(H)}get onDidInitializePromise(){return I.Event.toPromise(this.onDidInitialize)}whenInitialized(){return this.state===l.Idle?Promise.resolve():this.onDidInitializePromise}dispose(){this.isDisposed=!0,this.protocolListener&&(this.protocolListener.dispose(),this.protocolListener=null),(0,w.dispose)(this.activeRequests.values()),this.activeRequests.clear()}}Ee([k.memoize],T.prototype,"onDidInitializePromise",null),e.ChannelClient=T;class R{constructor(H){this.channels=new Map,this._connections=new Set,this._onDidAddConnection=new I.Emitter,this.onDidAddConnection=this._onDidAddConnection.event,this._onDidRemoveConnection=new I.Emitter,this.onDidRemoveConnection=this._onDidRemoveConnection.event,H(({protocol:K,onDidClientDisconnect:G})=>{I.Event.once(K.onMessage)(Z=>{const j=new r(Z),X=b(j),Y=new E(K,X),$=new T(K);this.channels.forEach((ee,te)=>Y.registerChannel(te,ee));const J={channelServer:Y,channelClient:$,ctx:X};this._connections.add(J),this._onDidAddConnection.fire(J),G(()=>{Y.dispose(),$.dispose(),this._connections.delete(J),this._onDidRemoveConnection.fire(J)})})})}get connections(){const H=[];return this._connections.forEach(K=>H.push(K)),H}getChannel(H,K){const G=this;return{call(q,Z,j){let X;if((0,o.isFunction)(K)){let $=(0,t.getRandomElement)(G.connections.filter(K));X=$?Promise.resolve($):I.Event.toPromise(I.Event.filter(G.onDidAddConnection,K))}else X=K.routeCall(G,q,Z);const Y=X.then($=>$.channelClient.getChannel(H));return x(Y).call(q,Z,j)},listen(q,Z){if((0,o.isFunction)(K))return G.getMulticastEvent(H,K,q,Z);const j=K.routeEvent(G,q,Z).then(X=>X.channelClient.getChannel(H));return x(j).listen(q,Z)}}}getMulticastEvent(H,K,G,q){const Z=this;let j=new w.DisposableStore;const X=new I.Emitter({onFirstListenerAdd:()=>{j=new w.DisposableStore;const Y=new I.EventMultiplexer,$=new Map,J=te=>{const ie=te.channelClient.getChannel(H).listen(G,q),ce=Y.add(ie);$.set(te,ce)},ee=te=>{const se=$.get(te);!se||(se.dispose(),$.delete(te))};Z.connections.filter(K).forEach(J),I.Event.filter(Z.onDidAddConnection,K)(J,void 0,j),Z.onDidRemoveConnection(ee,void 0,j),Y.event(X.fire,X,j),j.add(Y)},onLastListenerRemove:()=>{j.dispose()}});return X.event}registerChannel(H,K){this.channels.set(H,K),this._connections.forEach(G=>{G.channelServer.registerChannel(H,K)})}dispose(){this.channels.clear(),this._connections.clear(),this._onDidAddConnection.dispose(),this._onDidRemoveConnection.dispose()}}e.IPCServer=R;class O{constructor(H,K,G=null){const q=new p;m(q,K),H.send(q.buffer),this.channelClient=new T(H,G),this.channelServer=new E(H,K,G)}getChannel(H){return this.channelClient.getChannel(H)}registerChannel(H,K){this.channelServer.registerChannel(H,K)}dispose(){this.channelClient.dispose(),this.channelServer.dispose()}}e.IPCClient=O;function x(U){return{call(H,K,G){return U.then(q=>q.call(H,K,G))},listen(H,K){const G=new I.Relay;return U.then(q=>G.input=q.listen(H,K)),G.event}}}e.getDelayedChannel=x;function F(U){let H=!1;return{call(K,G,q){return H?U.call(K,G,q):(0,f.timeout)(0).then(()=>H=!0).then(()=>U.call(K,G,q))},listen(K,G){if(H)return U.listen(K,G);const q=new I.Relay;return(0,f.timeout)(0).then(()=>H=!0).then(()=>q.input=U.listen(K,G)),q.event}}}e.getNextTickChannel=F;class L{constructor(H){this.fn=H}routeCall(H){return this.route(H)}routeEvent(H){return this.route(H)}async route(H){for(const K of H.connections)if(await Promise.resolve(this.fn(K.ctx)))return Promise.resolve(K);return await I.Event.toPromise(H.onDidAddConnection),await this.route(H)}}e.StaticRouter=L;var M;(function(U){function H(Z,j){const X=Z,Y=j&&j.disableMarshalling,$=new Map;for(const J in X)G(J)&&$.set(J,I.Event.buffer(X[J],!0));return new class{listen(J,ee,te){const se=$.get(ee);if(se)return se;if(q(ee)){const ie=X[ee];if(typeof ie=="function")return ie.call(X,te)}throw new Error(`Event not found: ${ee}`)}call(J,ee,te){const se=X[ee];if(typeof se=="function"){if(!Y&&Array.isArray(te))for(let ie=0;ie<te.length;ie++)te[ie]=(0,v.revive)(te[ie]);return se.apply(X,te)}throw new Error(`Method not found: ${ee}`)}}}U.fromService=H;function K(Z,j){const X=j&&j.disableMarshalling;return new Proxy({},{get(Y,$){if(typeof $=="string")return j?.properties?.has($)?j.properties.get($):q($)?function(J){return Z.listen($,J)}:G($)?Z.listen($):async function(...J){let ee;j&&!(0,o.isUndefinedOrNull)(j.context)?ee=[j.context,...J]:ee=J;const te=await Z.call($,ee);return X?te:(0,v.revive)(te)};throw new Error(`Property not found: ${String($)}`)}})}U.toService=K;function G(Z){return Z[0]==="o"&&Z[1]==="n"&&C.isUpperAsciiLetter(Z.charCodeAt(2))}function q(Z){return/^onDynamic/.test(Z)&&C.isUpperAsciiLetter(Z.charCodeAt(9))}})(M=e.ProxyChannel||(e.ProxyChannel={}));const N=[["#2977B1","#FC802D","#34A13A","#D3282F","#9366BA"],["#8B564C","#E177C0","#7F7F7F","#BBBE3D","#2EBECD"]];function B(U){if(Array.isArray(U))return U;if(U&&typeof U=="object"&&typeof U.toString=="function"){let H=U.toString();if(H!=="[object Object]")return H}return U}function P(U){return Array.isArray(U)?U.map(B):B(U)}function V(U,H,K,G,q,Z,j){j=P(j);const X=N[q],Y=X[G%X.length];let $=[`%c[${U}]%c[${String(H).padStart(7," ")}]%c[len: ${String(K).padStart(5," ")}]%c${String(G).padStart(5," ")} - ${Z}`,"color: darkgreen","color: grey","color: grey",`color: ${Y}`];/\($/.test(Z)?($=$.concat(j),$.push(")")):$.push(j),console.log.apply(console,$)}e.logWithColors=V;class z{constructor(H,K){this._outgoingPrefix=H,this._incomingPrefix=K,this._totalIncoming=0,this._totalOutgoing=0}logOutgoing(H,K,G,q,Z){this._totalOutgoing+=H,V(this._outgoingPrefix,this._totalOutgoing,H,K,G,q,Z)}logIncoming(H,K,G,q,Z){this._totalIncoming+=H,V(this._incomingPrefix,this._totalIncoming,H,K,G,q,Z)}}e.IPCLogger=z}),define(ne[973],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Protocol=void 0;class t{constructor(_,A){this.sender=_,this.onMessage=A}send(_){try{this.sender.send("vscode:message",_.buffer)}catch{}}disconnect(){this.sender.send("vscode:disconnect",null)}}e.Protocol=t}),define(ne[657],re([1,0,60,6,171]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Client=e.Protocol=void 0;class A{constructor(I){this.port=I,this.onMessage=f.Event.fromDOMEventEmitter(this.port,"message",w=>t.VSBuffer.wrap(w.data)),I.start()}send(I){this.port.postMessage(I.buffer)}disconnect(){this.port.close()}}e.Protocol=A;class k extends _.IPCClient{constructor(I,w){const v=new A(I);super(v,w);this.protocol=v}dispose(){this.protocol.disconnect()}}e.Client=k}),define(ne[449],re([1,0,60,6,2,171]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PersistentProtocol=e.BufferedEmitter=e.Client=e.Protocol=e.ProtocolConstants=e.ChunkStream=e.SocketCloseEventType=e.SocketDiagnostics=e.SocketDiagnosticsEventType=void 0;var k;(function(d){d.Created="created",d.Read="read",d.Write="write",d.Open="open",d.Error="error",d.Close="close",d.BrowserWebSocketBlobReceived="browserWebSocketBlobReceived",d.NodeEndReceived="nodeEndReceived",d.NodeEndSent="nodeEndSent",d.NodeDrainBegin="nodeDrainBegin",d.NodeDrainEnd="nodeDrainEnd",d.zlibInflateError="zlibInflateError",d.zlibInflateData="zlibInflateData",d.zlibInflateInitialWrite="zlibInflateInitialWrite",d.zlibInflateInitialFlushFired="zlibInflateInitialFlushFired",d.zlibInflateWrite="zlibInflateWrite",d.zlibInflateFlushFired="zlibInflateFlushFired",d.zlibDeflateError="zlibDeflateError",d.zlibDeflateData="zlibDeflateData",d.zlibDeflateWrite="zlibDeflateWrite",d.zlibDeflateFlushFired="zlibDeflateFlushFired",d.WebSocketNodeSocketWrite="webSocketNodeSocketWrite",d.WebSocketNodeSocketPeekedHeader="webSocketNodeSocketPeekedHeader",d.WebSocketNodeSocketReadHeader="webSocketNodeSocketReadHeader",d.WebSocketNodeSocketReadData="webSocketNodeSocketReadData",d.WebSocketNodeSocketUnmaskedData="webSocketNodeSocketUnmaskedData",d.WebSocketNodeSocketDrainBegin="webSocketNodeSocketDrainBegin",d.WebSocketNodeSocketDrainEnd="webSocketNodeSocketDrainEnd",d.ProtocolHeaderRead="protocolHeaderRead",d.ProtocolMessageRead="protocolMessageRead",d.ProtocolHeaderWrite="protocolHeaderWrite",d.ProtocolMessageWrite="protocolMessageWrite",d.ProtocolWrite="protocolWrite"})(k=e.SocketDiagnosticsEventType||(e.SocketDiagnosticsEventType={}));var D;(function(d){d.enableDiagnostics=!1,d.records=[];const m=new WeakMap;let b=0;function E(T,R){if(!m.has(T)){const O=String(++b);m.set(T,O)}return m.get(T)}function y(T,R,O,x){if(!d.enableDiagnostics)return;const F=E(T,R);if(x instanceof t.VSBuffer||x instanceof Uint8Array||x instanceof ArrayBuffer||ArrayBuffer.isView(x)){const L=t.VSBuffer.alloc(x.byteLength);L.set(x),d.records.push({timestamp:Date.now(),id:F,label:R,type:O,buff:L})}else d.records.push({timestamp:Date.now(),id:F,label:R,type:O,data:x})}d.traceSocketEvent=y})(D=e.SocketDiagnostics||(e.SocketDiagnostics={}));var I;(function(d){d[d.NodeSocketCloseEvent=0]="NodeSocketCloseEvent",d[d.WebSocketCloseEvent=1]="WebSocketCloseEvent"})(I=e.SocketCloseEventType||(e.SocketCloseEventType={}));let w=null;function v(){return w||(w=t.VSBuffer.alloc(0)),w}class C{constructor(){this._chunks=[],this._totalLength=0}get byteLength(){return this._totalLength}acceptChunk(m){this._chunks.push(m),this._totalLength+=m.byteLength}read(m){return this._read(m,!0)}peek(m){return this._read(m,!1)}_read(m,b){if(m===0)return v();if(m>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===m){const R=this._chunks[0];return b&&(this._chunks.shift(),this._totalLength-=m),R}if(this._chunks[0].byteLength>m){const R=this._chunks[0].slice(0,m);return b&&(this._chunks[0]=this._chunks[0].slice(m),this._totalLength-=m),R}let E=t.VSBuffer.alloc(m),y=0,T=0;for(;m>0;){const R=this._chunks[T];if(R.byteLength>m){const O=R.slice(0,m);E.set(O,y),y+=m,b&&(this._chunks[T]=R.slice(m),this._totalLength-=m),m-=m}else E.set(R,y),y+=R.byteLength,b?(this._chunks.shift(),this._totalLength-=R.byteLength):T++,m-=R.byteLength}return E}}e.ChunkStream=C;var o;(function(d){d[d.None=0]="None",d[d.Regular=1]="Regular",d[d.Control=2]="Control",d[d.Ack=3]="Ack",d[d.Disconnect=5]="Disconnect",d[d.ReplayRequest=6]="ReplayRequest",d[d.Pause=7]="Pause",d[d.Resume=8]="Resume"})(o||(o={}));function c(d){switch(d){case 0:return"None";case 1:return"Regular";case 2:return"Control";case 3:return"Ack";case 5:return"Disconnect";case 6:return"ReplayRequest";case 7:return"PauseWriting";case 8:return"ResumeWriting"}}var i;(function(d){d[d.HeaderLength=13]="HeaderLength",d[d.AcknowledgeTime=2e3]="AcknowledgeTime",d[d.TimeoutTime=2e4]="TimeoutTime",d[d.ReconnectionGraceTime=108e5]="ReconnectionGraceTime",d[d.ReconnectionShortGraceTime=3e5]="ReconnectionShortGraceTime"})(i=e.ProtocolConstants||(e.ProtocolConstants={}));class S{constructor(m,b,E,y){this.type=m,this.id=b,this.ack=E,this.data=y,this.writtenTime=0}get size(){return this.data.byteLength}}class s extends _.Disposable{constructor(m){super();this._onMessage=this._register(new f.Emitter),this.onMessage=this._onMessage.event,this._state={readHead:!0,readLen:13,messageType:0,id:0,ack:0},this._socket=m,this._isDisposed=!1,this._incomingData=new C,this._register(this._socket.onData(b=>this.acceptChunk(b))),this.lastReadTime=Date.now()}acceptChunk(m){if(!(!m||m.byteLength===0))for(this.lastReadTime=Date.now(),this._incomingData.acceptChunk(m);this._incomingData.byteLength>=this._state.readLen;){const b=this._incomingData.read(this._state.readLen);if(this._state.readHead)this._state.readHead=!1,this._state.readLen=b.readUInt32BE(9),this._state.messageType=b.readUInt8(0),this._state.id=b.readUInt32BE(1),this._state.ack=b.readUInt32BE(5),this._socket.traceSocketEvent("protocolHeaderRead",{messageType:c(this._state.messageType),id:this._state.id,ack:this._state.ack,messageSize:this._state.readLen});else{const E=this._state.messageType,y=this._state.id,T=this._state.ack;if(this._state.readHead=!0,this._state.readLen=13,this._state.messageType=0,this._state.id=0,this._state.ack=0,this._socket.traceSocketEvent("protocolMessageRead",b),this._onMessage.fire(new S(E,y,T,b)),this._isDisposed)break}}}readEntireBuffer(){return this._incomingData.read(this._incomingData.byteLength)}dispose(){this._isDisposed=!0,super.dispose()}}class l{constructor(m){this._writeNowTimeout=null,this._isDisposed=!1,this._isPaused=!1,this._socket=m,this._data=[],this._totalLength=0,this.lastWriteTime=0}dispose(){try{this.flush()}catch{}this._isDisposed=!0}drain(){return this.flush(),this._socket.drain()}flush(){this._writeNow()}pause(){this._isPaused=!0}resume(){this._isPaused=!1,this._scheduleWriting()}write(m){if(this._isDisposed)return;m.writtenTime=Date.now(),this.lastWriteTime=Date.now();const b=t.VSBuffer.alloc(13);b.writeUInt8(m.type,0),b.writeUInt32BE(m.id,1),b.writeUInt32BE(m.ack,5),b.writeUInt32BE(m.data.byteLength,9),this._socket.traceSocketEvent("protocolHeaderWrite",{messageType:c(m.type),id:m.id,ack:m.ack,messageSize:m.data.byteLength}),this._socket.traceSocketEvent("protocolMessageWrite",m.data),this._writeSoon(b,m.data)}_bufferAdd(m,b){const E=this._totalLength===0;return this._data.push(m,b),this._totalLength+=m.byteLength+b.byteLength,E}_bufferTake(){const m=t.VSBuffer.concat(this._data,this._totalLength);return this._data.length=0,this._totalLength=0,m}_writeSoon(m,b){this._bufferAdd(m,b)&&this._scheduleWriting()}_scheduleWriting(){this._writeNowTimeout||(this._writeNowTimeout=setTimeout(()=>{this._writeNowTimeout=null,this._writeNow()}))}_writeNow(){if(this._totalLength===0||this._isPaused)return;const m=this._bufferTake();this._socket.traceSocketEvent("protocolWrite",{byteLength:m.byteLength}),this._socket.write(m)}}class r extends _.Disposable{constructor(m){super();this._onMessage=new f.Emitter,this.onMessage=this._onMessage.event,this._onDidDispose=new f.Emitter,this.onDidDispose=this._onDidDispose.event,this._socket=m,this._socketWriter=this._register(new l(this._socket)),this._socketReader=this._register(new s(this._socket)),this._register(this._socketReader.onMessage(b=>{b.type===1&&this._onMessage.fire(b.data)})),this._register(this._socket.onClose(()=>this._onDidDispose.fire()))}drain(){return this._socketWriter.drain()}getSocket(){return this._socket}sendDisconnect(){}send(m){this._socketWriter.write(new S(1,0,0,m))}}e.Protocol=r;class p extends A.IPCClient{constructor(m,b,E=null){super(m,b,E);this.protocol=m}static fromSocket(m,b){return new p(new r(m),b)}get onDidDispose(){return this.protocol.onDidDispose}dispose(){super.dispose();const m=this.protocol.getSocket();this.protocol.sendDisconnect(),this.protocol.dispose(),m.end()}}e.Client=p;class u{constructor(){this._hasListeners=!1,this._isDeliveringMessages=!1,this._bufferedMessages=[],this._emitter=new f.Emitter({onFirstListenerAdd:()=>{this._hasListeners=!0,queueMicrotask(()=>this._deliverMessages())},onLastListenerRemove:()=>{this._hasListeners=!1}}),this.event=this._emitter.event}_deliverMessages(){if(!this._isDeliveringMessages){for(this._isDeliveringMessages=!0;this._hasListeners&&this._bufferedMessages.length>0;)this._emitter.fire(this._bufferedMessages.shift());this._isDeliveringMessages=!1}}fire(m){this._hasListeners?this._bufferedMessages.length>0?this._bufferedMessages.push(m):this._emitter.fire(m):this._bufferedMessages.push(m)}flushBuffer(){this._bufferedMessages=[]}}e.BufferedEmitter=u;class a{constructor(m){this.data=m,this.next=null}}class n{constructor(){this._first=null,this._last=null}peek(){return this._first?this._first.data:null}toArray(){let m=[],b=0,E=this._first;for(;E;)m[b++]=E.data,E=E.next;return m}pop(){if(!!this._first){if(this._first===this._last){this._first=null,this._last=null;return}this._first=this._first.next}}push(m){const b=new a(m);if(!this._first){this._first=b,this._last=b;return}this._last.next=b,this._last=b}}class h{constructor(){this.lastRuns=[];const m=Date.now();for(let b=0;b<h._HISTORY_LENGTH;b++)this.lastRuns[b]=m-1e3*b;setInterval(()=>{for(let b=h._HISTORY_LENGTH;b>=1;b--)this.lastRuns[b]=this.lastRuns[b-1];this.lastRuns[0]=Date.now()},1e3)}static getInstance(){return h._INSTANCE||(h._INSTANCE=new h),h._INSTANCE}load(){const m=Date.now(),b=(1+h._HISTORY_LENGTH)*1e3;let E=0;for(let y=0;y<h._HISTORY_LENGTH;y++)m-this.lastRuns[y]<=b&&E++;return 1-E/h._HISTORY_LENGTH}hasHighLoad(){return this.load()>=.5}}h._HISTORY_LENGTH=10,h._INSTANCE=null;class g{constructor(m,b=null,E=h.getInstance()){this._onControlMessage=new u,this.onControlMessage=this._onControlMessage.event,this._onMessage=new u,this.onMessage=this._onMessage.event,this._onDidDispose=new u,this.onDidDispose=this._onDidDispose.event,this._onSocketClose=new u,this.onSocketClose=this._onSocketClose.event,this._onSocketTimeout=new u,this.onSocketTimeout=this._onSocketTimeout.event,this._loadEstimator=E,this._isReconnecting=!1,this._outgoingUnackMsg=new n,this._outgoingMsgId=0,this._outgoingAckId=0,this._outgoingAckTimeout=null,this._incomingMsgId=0,this._incomingAckId=0,this._incomingMsgLastTime=0,this._incomingAckTimeout=null,this._lastReplayRequestTime=0,this._lastSocketTimeoutTime=Date.now(),this._socketDisposables=[],this._socket=m,this._socketWriter=new l(this._socket),this._socketDisposables.push(this._socketWriter),this._socketReader=new s(this._socket),this._socketDisposables.push(this._socketReader),this._socketDisposables.push(this._socketReader.onMessage(y=>this._receiveMessage(y))),this._socketDisposables.push(this._socket.onClose(y=>this._onSocketClose.fire(y))),b&&this._socketReader.acceptChunk(b)}get unacknowledgedCount(){return this._outgoingMsgId-this._outgoingAckId}dispose(){this._outgoingAckTimeout&&(clearTimeout(this._outgoingAckTimeout),this._outgoingAckTimeout=null),this._incomingAckTimeout&&(clearTimeout(this._incomingAckTimeout),this._incomingAckTimeout=null),this._socketDisposables=(0,_.dispose)(this._socketDisposables)}drain(){return this._socketWriter.drain()}sendDisconnect(){const m=new S(5,0,0,v());this._socketWriter.write(m),this._socketWriter.flush()}sendPause(){const m=new S(7,0,0,v());this._socketWriter.write(m)}sendResume(){const m=new S(8,0,0,v());this._socketWriter.write(m)}pauseSocketWriting(){this._socketWriter.pause()}getSocket(){return this._socket}getMillisSinceLastIncomingData(){return Date.now()-this._socketReader.lastReadTime}beginAcceptReconnection(m,b){this._isReconnecting=!0,this._socketDisposables=(0,_.dispose)(this._socketDisposables),this._onControlMessage.flushBuffer(),this._onSocketClose.flushBuffer(),this._onSocketTimeout.flushBuffer(),this._socket.dispose(),this._lastReplayRequestTime=0,this._lastSocketTimeoutTime=Date.now(),this._socket=m,this._socketWriter=new l(this._socket),this._socketDisposables.push(this._socketWriter),this._socketReader=new s(this._socket),this._socketDisposables.push(this._socketReader),this._socketDisposables.push(this._socketReader.onMessage(E=>this._receiveMessage(E))),this._socketDisposables.push(this._socket.onClose(E=>this._onSocketClose.fire(E))),this._socketReader.acceptChunk(b)}endAcceptReconnection(){this._isReconnecting=!1,this._incomingAckId=this._incomingMsgId;const m=new S(3,0,this._incomingAckId,v());this._socketWriter.write(m);const b=this._outgoingUnackMsg.toArray();for(let E=0,y=b.length;E<y;E++)this._socketWriter.write(b[E]);this._recvAckCheck()}acceptDisconnect(){this._onDidDispose.fire()}_receiveMessage(m){if(m.ack>this._outgoingAckId){this._outgoingAckId=m.ack;do{const b=this._outgoingUnackMsg.peek();if(b&&b.id<=m.ack)this._outgoingUnackMsg.pop();else break}while(!0)}switch(m.type){case 0:break;case 1:{if(m.id>this._incomingMsgId)if(m.id!==this._incomingMsgId+1){const b=Date.now();b-this._lastReplayRequestTime>1e4&&(this._lastReplayRequestTime=b,this._socketWriter.write(new S(6,0,0,v())))}else this._incomingMsgId=m.id,this._incomingMsgLastTime=Date.now(),this._sendAckCheck(),this._onMessage.fire(m.data);break}case 2:{this._onControlMessage.fire(m.data);break}case 3:break;case 5:{this._onDidDispose.fire();break}case 6:{const b=this._outgoingUnackMsg.toArray();for(let E=0,y=b.length;E<y;E++)this._socketWriter.write(b[E]);this._recvAckCheck();break}case 7:{this._socketWriter.pause();break}case 8:{this._socketWriter.resume();break}}}readEntireBuffer(){return this._socketReader.readEntireBuffer()}flush(){this._socketWriter.flush()}send(m){const b=++this._outgoingMsgId;this._incomingAckId=this._incomingMsgId;const E=new S(1,b,this._incomingAckId,m);this._outgoingUnackMsg.push(E),this._isReconnecting||(this._socketWriter.write(E),this._recvAckCheck())}sendControl(m){const b=new S(2,0,0,m);this._socketWriter.write(b)}_sendAckCheck(){if(this._incomingMsgId<=this._incomingAckId||this._incomingAckTimeout)return;const m=Date.now()-this._incomingMsgLastTime;if(m>=2e3){this._sendAck();return}this._incomingAckTimeout=setTimeout(()=>{this._incomingAckTimeout=null,this._sendAckCheck()},2e3-m+5)}_recvAckCheck(){if(this._outgoingMsgId<=this._outgoingAckId||this._outgoingAckTimeout||this._isReconnecting)return;const m=this._outgoingUnackMsg.peek(),b=Date.now()-m.writtenTime,E=Date.now()-this._socketReader.lastReadTime,y=Date.now()-this._lastSocketTimeoutTime;if(b>=2e4&&E>=2e4&&y>=2e4&&!this._loadEstimator.hasHighLoad()){this._lastSocketTimeoutTime=Date.now(),this._onSocketTimeout.fire(void 0);return}const T=Math.max(2e4-b,2e4-E,2e4-y,500);this._outgoingAckTimeout=setTimeout(()=>{this._outgoingAckTimeout=null,this._recvAckCheck()},T)}_sendAck(){if(this._incomingMsgId<=this._incomingAckId)return;this._incomingAckId=this._incomingMsgId;const m=new S(3,0,this._incomingAckId,v());this._socketWriter.write(m)}}e.PersistentProtocol=g}),define(ne[658],re([1,0,18]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.quickPickItemScorerAccessor=e.QuickPickItemScorerAccessor=e.ItemActivation=e.QuickInputHideReason=e.NO_KEY_MODS=void 0,e.NO_KEY_MODS={ctrlCmd:!1,alt:!1};var f;(function(k){k[k.Blur=1]="Blur",k[k.Gesture=2]="Gesture",k[k.Other=3]="Other"})(f=e.QuickInputHideReason||(e.QuickInputHideReason={}));var _;(function(k){k[k.NONE=0]="NONE",k[k.FIRST=1]="FIRST",k[k.SECOND=2]="SECOND",k[k.LAST=3]="LAST"})(_=e.ItemActivation||(e.ItemActivation={}));class A{constructor(D){this.options=D}getItemLabel(D){return D.label}getItemDescription(D){if(!this.options?.skipDescription)return D.description}getItemPath(D){if(!this.options?.skipPath)return D.resource?.scheme===t.Schemas.file?D.resource.fsPath:D.resource?.path}}e.QuickPickItemScorerAccessor=A,e.quickPickItemScorerAccessor=new A}),define(ne[659],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OfflineError=e.isOfflineError=void 0;const t="Offline";function f(A){return A instanceof _?!0:A instanceof Error&&A.name===t&&A.message===t}e.isOfflineError=f;class _ extends Error{constructor(){super(t);this.name=this.message}}e.OfflineError=_}),define(ne[974],re([1,0,60,22,659]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.request=void 0;function A(I,w){if(!navigator.onLine)throw new _.OfflineError;I.proxyAuthorization&&(I.headers={...I.headers||{},"Proxy-Authorization":I.proxyAuthorization});const v=new XMLHttpRequest;return new Promise((C,o)=>{v.open(I.type||"GET",I.url||"",!0,I.user,I.password),k(v,I),v.responseType="arraybuffer",v.onerror=c=>o(new Error(v.statusText&&"XHR failed: "+v.statusText||"XHR failed")),v.onload=c=>{C({res:{statusCode:v.status,headers:D(v)},stream:(0,t.bufferToStream)(t.VSBuffer.wrap(new Uint8Array(v.response)))})},v.ontimeout=c=>o(new Error(`XHR timeout: ${I.timeout}ms`)),I.timeout&&(v.timeout=I.timeout),v.send(I.data),w.onCancellationRequested(()=>{v.abort(),o((0,f.canceled)())})})}e.request=A;function k(I,w){if(w.headers){e:for(let v in w.headers){switch(v){case"User-Agent":case"Accept-Encoding":case"Content-Length":continue e}I.setRequestHeader(v,w.headers[v])}}}function D(I){const w=Object.create(null);for(const v of I.getAllResponseHeaders().split(/\r\n|\n|\r/g))if(v){const C=v.indexOf(":");w[v.substr(0,C).trim().toLowerCase()]=v.substr(C+1).trim()}return w}}),define(ne[207],re([1,0,14]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.context=e.process=e.webFrame=e.ipcMessagePort=e.ipcRenderer=void 0,e.ipcRenderer=t.globals.vscode.ipcRenderer,e.ipcMessagePort=t.globals.vscode.ipcMessagePort,e.webFrame=t.globals.vscode.webFrame,e.process=t.globals.vscode.process,e.context=t.globals.vscode.context}),define(ne[975],re([1,0,972,207]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.popup=void 0;let _=0;function A(D,I,w){const v=[],C=_++,o=`vscode:onContextMenu${C}`,c=(i,S,s)=>{const l=v[S];l.click&&l.click(s)};f.ipcRenderer.once(o,c),f.ipcRenderer.once(t.CONTEXT_MENU_CLOSE_CHANNEL,(i,S)=>{S===C&&(f.ipcRenderer.removeListener(o,c),w&&w())}),f.ipcRenderer.send(t.CONTEXT_MENU_CHANNEL,C,D.map(i=>k(i,v)),o,I)}e.popup=A;function k(D,I){const w={id:I.length,label:D.label,type:D.type,accelerator:D.accelerator,checked:D.checked,enabled:typeof D.enabled=="boolean"?D.enabled:!0,visible:typeof D.visible=="boolean"?D.visible:!0};return I.push(D),Array.isArray(D.submenu)&&(w.submenu=D.submenu.map(v=>k(v,I))),w}}),define(ne[976],re([1,0,60,6,171,973,207]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Client=void 0;class D extends _.IPCClient{constructor(w){const v=D.createProtocol();super(v,w);this.protocol=v}static createProtocol(){const w=f.Event.fromNodeEventEmitter(k.ipcRenderer,"vscode:message",(v,C)=>t.VSBuffer.wrap(C));return k.ipcRenderer.send("vscode:hello"),new A.Protocol(k.ipcRenderer,w)}dispose(){this.protocol.disconnect()}}e.Client=D}),define(ne[660],re([1,0,6,89,207]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.acquirePort=void 0;async function A(k,D,I=(0,f.generateUuid)()){_.ipcMessagePort.acquire(D,I),typeof k=="string"&&_.ipcRenderer.send(k,I);const w=t.Event.fromDOMEventEmitter(window,"message",C=>({nonce:C.data,port:C.ports[0],source:C.source})),{port:v}=await t.Event.toPromise(t.Event.once(t.Event.filter(w,C=>C.nonce===I&&C.source===window)));return v}e.acquirePort=A}),define(ne[661],re([1,0,11,6,2,13]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryStorageDatabase=e.Storage=e.StorageState=e.isStorageItemsChangeEvent=e.StorageHint=void 0;var k;(function(C){C[C.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST"})(k=e.StorageHint||(e.StorageHint={}));function D(C){const o=C;return o?.changed instanceof Map||o?.deleted instanceof Set}e.isStorageItemsChangeEvent=D;var I;(function(C){C[C.None=0]="None",C[C.Initialized=1]="Initialized",C[C.Closed=2]="Closed"})(I=e.StorageState||(e.StorageState={}));class w extends _.Disposable{constructor(o,c=Object.create(null)){super();this.database=o,this.options=c,this._onDidChangeStorage=this._register(new f.Emitter),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=I.None,this.cache=new Map,this.flushDelayer=new t.ThrottledDelayer(w.DEFAULT_FLUSH_DELAY),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.pendingClose=void 0,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(o=>this.onDidChangeItemsExternal(o)))}onDidChangeItemsExternal(o){o.changed?.forEach((c,i)=>this.accept(i,c)),o.deleted?.forEach(c=>this.accept(c,void 0))}accept(o,c){if(this.state===I.Closed)return;let i=!1;(0,A.isUndefinedOrNull)(c)?i=this.cache.delete(o):this.cache.get(o)!==c&&(this.cache.set(o,c),i=!0),i&&this._onDidChangeStorage.fire(o)}get items(){return this.cache}get size(){return this.cache.size}async init(){this.state===I.None&&(this.state=I.Initialized,this.options.hint!==k.STORAGE_DOES_NOT_EXIST&&(this.cache=await this.database.getItems()))}get(o,c){const i=this.cache.get(o);return(0,A.isUndefinedOrNull)(i)?c:i}getBoolean(o,c){const i=this.get(o);return(0,A.isUndefinedOrNull)(i)?c:i==="true"}getNumber(o,c){const i=this.get(o);return(0,A.isUndefinedOrNull)(i)?c:parseInt(i,10)}async set(o,c){if(this.state===I.Closed)return;if((0,A.isUndefinedOrNull)(c))return this.delete(o);const i=String(c);if(this.cache.get(o)!==i)return this.cache.set(o,i),this.pendingInserts.set(o,i),this.pendingDeletes.delete(o),this._onDidChangeStorage.fire(o),this.doFlush()}async delete(o){if(!(this.state===I.Closed||!this.cache.delete(o)))return this.pendingDeletes.has(o)||this.pendingDeletes.add(o),this.pendingInserts.delete(o),this._onDidChangeStorage.fire(o),this.doFlush()}async close(){return this.pendingClose||(this.pendingClose=this.doClose()),this.pendingClose}async doClose(){this.state=I.Closed;try{await this.doFlush(0)}catch{}await this.database.close(()=>this.cache)}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}async flushPending(){if(!this.hasPending)return;const o={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(o).finally(()=>{if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)this.whenFlushedCallbacks.pop()?.()})}async flush(o){if(!!this.hasPending)return this.doFlush(o)}async doFlush(o){return this.flushDelayer.trigger(()=>this.flushPending(),o)}async whenFlushed(){if(!!this.hasPending)return new Promise(o=>this.whenFlushedCallbacks.push(o))}dispose(){this.flushDelayer.dispose(),super.dispose()}}e.Storage=w,w.DEFAULT_FLUSH_DELAY=100;class v{constructor(){this.onDidChangeItemsExternal=f.Event.None,this.items=new Map}async getItems(){return this.items}async updateItems(o){o.insert&&o.insert.forEach((c,i)=>this.items.set(i,c)),o.delete&&o.delete.forEach(c=>this.items.delete(c))}async close(){}}e.InMemoryStorageDatabase=v}),define(ne[662],re([25]),{}),define(ne[977],re([25]),{}),define(ne[112],re([1,0,10,14,977]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.status=e.alert=e.setARIAContainer=void 0;const _=2e4;let A,k,D,I,w;function v(i){A=document.createElement("div"),A.className="monaco-aria-container";const S=()=>{const l=document.createElement("div");return l.className="monaco-alert",l.setAttribute("role","alert"),l.setAttribute("aria-atomic","true"),A.appendChild(l),l};k=S(),D=S();const s=()=>{const l=document.createElement("div");return l.className="monaco-status",l.setAttribute("role","complementary"),l.setAttribute("aria-live","polite"),l.setAttribute("aria-atomic","true"),A.appendChild(l),l};I=s(),w=s(),i.appendChild(A)}e.setARIAContainer=v;function C(i){!A||(k.textContent!==i?(t.clearNode(D),c(k,i)):(t.clearNode(k),c(D,i)))}e.alert=C;function o(i){!A||(f.isMacintosh?C(i):I.textContent!==i?(t.clearNode(w),c(I,i)):(t.clearNode(I),c(w,i)))}e.status=o;function c(i,S){t.clearNode(i),S.length>_&&(S=S.substr(0,_)),i.textContent=S,i.style.visibility="hidden",i.style.visibility="visible"}}),define(ne[978],re([25]),{}),define(ne[979],re([25]),{}),define(ne[980],re([25]),{}),define(ne[981],re([25]),{}),define(ne[520],re([1,0,33,980,981]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.formatRule=void 0;function f(_){let A=_.definition;for(;A instanceof t.Codicon;)A=A.definition;return`.codicon-${_.id}:before { content: '${A.fontCharacter}'; }`}e.formatRule=f}),define(ne[982],re([25]),{}),define(ne[663],re([1,0,223,10,2,14,443,982]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextView=e.layout=e.LayoutAnchorMode=e.LayoutAnchorPosition=e.AnchorAxisAlignment=e.AnchorPosition=e.AnchorAlignment=e.ContextViewDOMPosition=void 0;var D;(function(s){s[s.ABSOLUTE=1]="ABSOLUTE",s[s.FIXED=2]="FIXED",s[s.FIXED_SHADOW=3]="FIXED_SHADOW"})(D=e.ContextViewDOMPosition||(e.ContextViewDOMPosition={}));var I;(function(s){s[s.LEFT=0]="LEFT",s[s.RIGHT=1]="RIGHT"})(I=e.AnchorAlignment||(e.AnchorAlignment={}));var w;(function(s){s[s.BELOW=0]="BELOW",s[s.ABOVE=1]="ABOVE"})(w=e.AnchorPosition||(e.AnchorPosition={}));var v;(function(s){s[s.VERTICAL=0]="VERTICAL",s[s.HORIZONTAL=1]="HORIZONTAL"})(v=e.AnchorAxisAlignment||(e.AnchorAxisAlignment={}));var C;(function(s){s[s.Before=0]="Before",s[s.After=1]="After"})(C=e.LayoutAnchorPosition||(e.LayoutAnchorPosition={}));var o;(function(s){s[s.AVOID=0]="AVOID",s[s.ALIGN=1]="ALIGN"})(o=e.LayoutAnchorMode||(e.LayoutAnchorMode={}));function c(s,l,r){const p=r.mode===o.ALIGN?r.offset:r.offset+r.size,u=r.mode===o.ALIGN?r.offset+r.size:r.offset;return r.position===0?l<=s-p?p:l<=u?u-l:Math.max(s-l,0):l<=u?u-l:l<=s-p?p:0}e.layout=c;class i extends _.Disposable{constructor(l,r){super();this.container=null,this.delegate=null,this.toDisposeOnClean=_.Disposable.None,this.toDisposeOnSetContainer=_.Disposable.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=f.$(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,f.hide(this.view),this.setContainer(l,r),this._register((0,_.toDisposable)(()=>this.setContainer(null,1)))}setContainer(l,r){if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,this.shadowRootHostElement?.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),l){if(this.container=l,this.useFixedPosition=r!==1,this.useShadowDOM=r===3,this.useShadowDOM){this.shadowRootHostElement=f.$(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const u=document.createElement("style");u.textContent=S,this.shadowRoot.appendChild(u),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(f.$("slot"))}else this.container.appendChild(this.view);const p=new _.DisposableStore;i.BUBBLE_UP_EVENTS.forEach(u=>{p.add(f.addStandardDisposableListener(this.container,u,a=>{this.onDOMEvent(a,!1)}))}),i.BUBBLE_DOWN_EVENTS.forEach(u=>{p.add(f.addStandardDisposableListener(this.container,u,a=>{this.onDOMEvent(a,!0)},!0))}),this.toDisposeOnSetContainer=p}}show(l){this.isVisible()&&this.hide(),f.clearNode(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2500",this.view.style.position=this.useFixedPosition?"fixed":"absolute",f.show(this.view),this.toDisposeOnClean=l.render(this.view)||_.Disposable.None,this.delegate=l,this.doLayout(),this.delegate.focus&&this.delegate.focus()}getViewElement(){return this.view}layout(){if(!!this.isVisible()){if(this.delegate.canRelayout===!1&&!(A.isIOS&&t.BrowserFeatures.pointerEvents)){this.hide();return}this.delegate.layout&&this.delegate.layout(),this.doLayout()}}doLayout(){if(!this.isVisible())return;let l=this.delegate.getAnchor(),r;if(f.isHTMLElement(l)){let b=f.getDomNodePagePosition(l);r={top:b.top,left:b.left,width:b.width,height:b.height}}else r={top:l.y,left:l.x,width:l.width||1,height:l.height||2};const p=f.getTotalWidth(this.view),u=f.getTotalHeight(this.view),a=this.delegate.anchorPosition||0,n=this.delegate.anchorAlignment||0,h=this.delegate.anchorAxisAlignment||0;let g,d;if(h===0){const b={offset:r.top-window.pageYOffset,size:r.height,position:a===0?0:1},E={offset:r.left,size:r.width,position:n===0?0:1,mode:o.ALIGN};g=c(window.innerHeight,u,b)+window.pageYOffset,k.Range.intersects({start:g,end:g+u},{start:b.offset,end:b.offset+b.size})&&(E.mode=o.AVOID),d=c(window.innerWidth,p,E)}else{const b={offset:r.left,size:r.width,position:n===0?0:1},E={offset:r.top,size:r.height,position:a===0?0:1,mode:o.ALIGN};d=c(window.innerWidth,p,b),k.Range.intersects({start:d,end:d+p},{start:b.offset,end:b.offset+b.size})&&(E.mode=o.AVOID),g=c(window.innerHeight,u,E)+window.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(a===0?"bottom":"top"),this.view.classList.add(n===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const m=f.getDomNodePagePosition(this.container);this.view.style.top=`${g-(this.useFixedPosition?f.getDomNodePagePosition(this.view).top:m.top)}px`,this.view.style.left=`${d-(this.useFixedPosition?f.getDomNodePagePosition(this.view).left:m.left)}px`,this.view.style.width="initial"}hide(l){const r=this.delegate;this.delegate=null,r?.onHide&&r.onHide(l),this.toDisposeOnClean.dispose(),f.hide(this.view)}isVisible(){return!!this.delegate}onDOMEvent(l,r){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(l,document.activeElement):r&&!f.isAncestor(l.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}e.ContextView=i,i.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],i.BUBBLE_DOWN_EVENTS=["click"];let S=` :host { all: initial; /* 1st rule so subsequent properties are reset. */ } @font-face { font-family: "codicon"; font-display: block; src: url("./codicon.ttf?5d4d76ab2ce5108968ad644d591a16a6") format("truetype"); } .codicon[class*='codicon-'] { font: normal normal normal 16px/1 codicon; display: inline-block; text-decoration: none; text-rendering: auto; text-align: center; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; user-select: none; -webkit-user-select: none; -ms-user-select: none; } :host { font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif; } :host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; } :host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; } :host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; } :host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; } :host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; } :host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; } :host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; } :host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; } :host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; } :host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; } :host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; } :host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; } :host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; } :host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; } :host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; } `}),define(ne[983],re([25]),{}),define(ne[258],re([1,0,10,66,51,29,983]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CountBadge=void 0;const k={badgeBackground:f.Color.fromHex("#4D4D4D"),badgeForeground:f.Color.fromHex("#FFFFFF")};class D{constructor(w,v){this.count=0,this.options=v||Object.create(null),(0,_.mixin)(this.options,k,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=(0,t.append)(w,(0,t.$)(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(w){this.count=w,this.render()}setCountFormat(w){this.countFormat=w,this.render()}setTitleFormat(w){this.titleFormat=w,this.render()}render(){this.element.textContent=(0,A.format)(this.countFormat,this.count),this.element.title=(0,A.format)(this.titleFormat,this.count),this.applyStyles()}style(w){this.badgeBackground=w.badgeBackground,this.badgeForeground=w.badgeForeground,this.badgeBorder=w.badgeBorder,this.applyStyles()}applyStyles(){if(this.element){const w=this.badgeBackground?this.badgeBackground.toString():"",v=this.badgeForeground?this.badgeForeground.toString():"",C=this.badgeBorder?this.badgeBorder.toString():"";this.element.style.backgroundColor=w,this.element.style.color=v,this.element.style.borderWidth=C?"1px":"",this.element.style.borderStyle=C?"solid":"",this.element.style.borderColor=C}}}e.CountBadge=D}),define(ne[984],re([25]),{}),define(ne[664],re([25]),{}),define(ne[665],re([25]),{}),define(ne[666],re([25]),{}),define(ne[985],re([25]),{}),define(ne[986],re([25]),{}),define(ne[987],re([25]),{}),define(ne[988],re([25]),{}),define(ne[667],re([25]),{}),define(ne[989],re([25]),{}),define(ne[990],re([25]),{}),define(ne[304],re([1,0,990]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME=void 0,e.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME="monaco-mouse-cursor-text"}),define(ne[991],re([25]),{}),define(ne[280],re([1,0,10,11,66,2,51,13,991]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressBar=void 0;const I="done",w="active",v="infinite",C="infinite-long-running",o="discrete",c={progressBarBackground:_.Color.fromHex("#0E70C0")};class i extends A.Disposable{constructor(s,l){super();this.options=l||Object.create(null),(0,k.mixin)(this.options,c,!1),this.workedVal=0,this.progressBarBackground=this.options.progressBarBackground,this.showDelayedScheduler=this._register(new f.RunOnceScheduler(()=>(0,t.show)(this.element),0)),this.longRunningScheduler=this._register(new f.RunOnceScheduler(()=>this.infiniteLongRunning(),i.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(s)}create(s){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),s.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.element.appendChild(this.bit),this.applyStyles()}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(w,v,C,o),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel()}done(){return this.doDone(!0)}stop(){return this.doDone(!1)}doDone(s){return this.element.classList.add(I),this.element.classList.contains(v)?(this.bit.style.opacity="0",s?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",s?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(o,I,C),this.element.classList.add(w,v),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(C)}total(s){return this.workedVal=0,this.totalWork=s,this.element.setAttribute("aria-valuemax",s.toString()),this}hasTotal(){return(0,D.isNumber)(this.totalWork)}worked(s){return s=Math.max(1,Number(s)),this.doSetWorked(this.workedVal+s)}setWorked(s){return s=Math.max(1,Number(s)),this.doSetWorked(s)}doSetWorked(s){const l=this.totalWork||100;return this.workedVal=s,this.workedVal=Math.min(l,this.workedVal),this.element.classList.remove(v,C,I),this.element.classList.add(w,o),this.element.setAttribute("aria-valuenow",s.toString()),this.bit.style.width=100*(this.workedVal/l)+"%",this}getContainer(){return this.element}show(s){this.showDelayedScheduler.cancel(),typeof s=="number"?this.showDelayedScheduler.schedule(s):(0,t.show)(this.element)}hide(){(0,t.hide)(this.element),this.showDelayedScheduler.cancel()}style(s){this.progressBarBackground=s.progressBarBackground,this.applyStyles()}applyStyles(){if(this.bit){const s=this.progressBarBackground?this.progressBarBackground.toString():"";this.bit.style.backgroundColor=s}}}e.ProgressBar=i,i.LONG_RUNNING_INFINITE_THRESHOLD=1e4}),define(ne[992],re([25]),{}),define(ne[281],re([1,0,10,224,129,11,110,6,2,14,992]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sash=e.setGlobalHoverDelay=e.setGlobalSashSize=e.SashState=e.Orientation=e.OrthogonalEdge=void 0;let v=!1;var C;(function(d){d.North="north",d.South="south",d.East="east",d.West="west"})(C=e.OrthogonalEdge||(e.OrthogonalEdge={}));var o;(function(d){d[d.VERTICAL=0]="VERTICAL",d[d.HORIZONTAL=1]="HORIZONTAL"})(o=e.Orientation||(e.Orientation={}));var c;(function(d){d[d.Disabled=0]="Disabled",d[d.AtMinimum=1]="AtMinimum",d[d.AtMaximum=2]="AtMaximum",d[d.Enabled=3]="Enabled"})(c=e.SashState||(e.SashState={}));let i=4;const S=new D.Emitter;function s(d){i=d,S.fire(d)}e.setGlobalSashSize=s;let l=300;const r=new D.Emitter;function p(d){l=d,r.fire(d)}e.setGlobalHoverDelay=p;class u{constructor(){this.disposables=new I.DisposableStore}get onPointerMove(){return this.disposables.add(new f.DomEmitter(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new f.DomEmitter(window,"mouseup")).event}dispose(){this.disposables.dispose()}}Ee([k.memoize],u.prototype,"onPointerMove",null),Ee([k.memoize],u.prototype,"onPointerUp",null);class a{constructor(m){this.el=m,this.disposables=new I.DisposableStore}get onPointerMove(){return this.disposables.add(new f.DomEmitter(this.el,_.EventType.Change)).event}get onPointerUp(){return this.disposables.add(new f.DomEmitter(this.el,_.EventType.End)).event}dispose(){this.disposables.dispose()}}Ee([k.memoize],a.prototype,"onPointerMove",null),Ee([k.memoize],a.prototype,"onPointerUp",null);class n{constructor(m){this.factory=m}get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}dispose(){}}Ee([k.memoize],n.prototype,"onPointerMove",null),Ee([k.memoize],n.prototype,"onPointerUp",null);const h="pointer-events-disabled";class g extends I.Disposable{constructor(m,b,E){super();this.hoverDelay=l,this.hoverDelayer=this._register(new A.Delayer(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new D.Emitter),this._onDidStart=this._register(new D.Emitter),this._onDidChange=this._register(new D.Emitter),this._onDidReset=this._register(new D.Emitter),this._onDidEnd=this._register(new D.Emitter),this.orthogonalStartSashDisposables=this._register(new I.DisposableStore),this.orthogonalStartDragHandleDisposables=this._register(new I.DisposableStore),this.orthogonalEndSashDisposables=this._register(new I.DisposableStore),this.orthogonalEndDragHandleDisposables=this._register(new I.DisposableStore),this.onDidStart=this._onDidStart.event,this.onDidChange=this._onDidChange.event,this.onDidReset=this._onDidReset.event,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.el=(0,t.append)(m,(0,t.$)(".monaco-sash")),E.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${E.orthogonalEdge}`),w.isMacintosh&&this.el.classList.add("mac");const y=this._register(new f.DomEmitter(this.el,"mousedown")).event;this._register(y(M=>this.onPointerStart(M,new u),this));const T=this._register(new f.DomEmitter(this.el,"dblclick")).event;this._register(T(this.onPointerDoublePress,this));const R=this._register(new f.DomEmitter(this.el,"mouseenter")).event;this._register(R(()=>g.onMouseEnter(this)));const O=this._register(new f.DomEmitter(this.el,"mouseleave")).event;this._register(O(()=>g.onMouseLeave(this))),this._register(_.Gesture.addTarget(this.el));const x=D.Event.map(this._register(new f.DomEmitter(this.el,_.EventType.Start)).event,M=>({...M,target:M.initialTarget??null}));this._register(x(M=>this.onPointerStart(M,new a(this.el)),this));const F=this._register(new f.DomEmitter(this.el,_.EventType.Tap)).event,L=D.Event.map(D.Event.filter(D.Event.debounce(F,(M,N)=>({event:N,count:(M?.count??0)+1}),250),({count:M})=>M===2),({event:M})=>({...M,target:M.initialTarget??null}));this._register(L(this.onPointerDoublePress,this)),typeof E.size=="number"?(this.size=E.size,E.orientation===0?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=i,this._register(S.event(M=>{this.size=M,this.layout()}))),this._register(r.event(M=>this.hoverDelay=M)),this.layoutProvider=b,this.orthogonalStartSash=E.orthogonalStartSash,this.orthogonalEndSash=E.orthogonalEndSash,this.orientation=E.orientation||0,this.orientation===1?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",v),this.layout()}get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(m){this._state!==m&&(this.el.classList.toggle("disabled",m===0),this.el.classList.toggle("minimum",m===1),this.el.classList.toggle("maximum",m===2),this._state=m,this.onDidEnablementChange.fire(m))}set orthogonalStartSash(m){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),m){const b=E=>{this.orthogonalStartDragHandleDisposables.clear(),E!==0&&(this._orthogonalStartDragHandle=(0,t.append)(this.el,(0,t.$)(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add((0,I.toDisposable)(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add(new f.DomEmitter(this._orthogonalStartDragHandle,"mouseenter")).event(()=>g.onMouseEnter(m),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new f.DomEmitter(this._orthogonalStartDragHandle,"mouseleave")).event(()=>g.onMouseLeave(m),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(m.onDidEnablementChange.event(b,this)),b(m.state)}this._orthogonalStartSash=m}set orthogonalEndSash(m){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),m){const b=E=>{this.orthogonalEndDragHandleDisposables.clear(),E!==0&&(this._orthogonalEndDragHandle=(0,t.append)(this.el,(0,t.$)(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add((0,I.toDisposable)(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add(new f.DomEmitter(this._orthogonalEndDragHandle,"mouseenter")).event(()=>g.onMouseEnter(m),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new f.DomEmitter(this._orthogonalEndDragHandle,"mouseleave")).event(()=>g.onMouseLeave(m),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(m.onDidEnablementChange.event(b,this)),b(m.state)}this._orthogonalEndSash=m}onPointerStart(m,b){t.EventHelper.stop(m);let E=!1;if(!m.__orthogonalSashEvent){const P=this.getOrthogonalSash(m);P&&(E=!0,m.__orthogonalSashEvent=!0,P.onPointerStart(m,new n(b)))}if(this.linkedSash&&!m.__linkedSashEvent&&(m.__linkedSashEvent=!0,this.linkedSash.onPointerStart(m,new n(b))),!this.state)return;const y=(0,t.getElementsByTagName)("iframe");for(const P of y)P.classList.add(h);const T=m.pageX,R=m.pageY,O=m.altKey,x={startX:T,currentX:T,startY:R,currentY:R,altKey:O};this.el.classList.add("active"),this._onDidStart.fire(x);const F=(0,t.createStyleSheet)(this.el),L=()=>{let P="";E?P="all-scroll":this.orientation===1?this.state===1?P="s-resize":this.state===2?P="n-resize":P=w.isMacintosh?"row-resize":"ns-resize":this.state===1?P="e-resize":this.state===2?P="w-resize":P=w.isMacintosh?"col-resize":"ew-resize",F.textContent=`* { cursor: ${P} !important; }`},M=new I.DisposableStore;L(),E||this.onDidEnablementChange.event(L,null,M);const N=P=>{t.EventHelper.stop(P,!1);const V={startX:T,currentX:P.pageX,startY:R,currentY:P.pageY,altKey:O};this._onDidChange.fire(V)},B=P=>{t.EventHelper.stop(P,!1),this.el.removeChild(F),this.el.classList.remove("active"),this._onDidEnd.fire(),M.dispose();for(const V of y)V.classList.remove(h)};b.onPointerMove(N,null,M),b.onPointerUp(B,null,M),M.add(b)}onPointerDoublePress(m){const b=this.getOrthogonalSash(m);b&&b._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(m,b=!1){m.el.classList.contains("active")?(m.hoverDelayer.cancel(),m.el.classList.add("hover")):m.hoverDelayer.trigger(()=>m.el.classList.add("hover"),m.hoverDelay).then(void 0,()=>{}),!b&&m.linkedSash&&g.onMouseEnter(m.linkedSash,!0)}static onMouseLeave(m,b=!1){m.hoverDelayer.cancel(),m.el.classList.remove("hover"),!b&&m.linkedSash&&g.onMouseLeave(m.linkedSash,!0)}clearSashHoverState(){g.onMouseLeave(this)}layout(){if(this.orientation===0){const m=this.layoutProvider;this.el.style.left=m.getVerticalSashLeft(this)-this.size/2+"px",m.getVerticalSashTop&&(this.el.style.top=m.getVerticalSashTop(this)+"px"),m.getVerticalSashHeight&&(this.el.style.height=m.getVerticalSashHeight(this)+"px")}else{const m=this.layoutProvider;this.el.style.top=m.getHorizontalSashTop(this)-this.size/2+"px",m.getHorizontalSashLeft&&(this.el.style.left=m.getHorizontalSashLeft(this)+"px"),m.getHorizontalSashWidth&&(this.el.style.width=m.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(m){if(!(!m.target||!(m.target instanceof HTMLElement))&&m.target.classList.contains("orthogonal-drag-handle"))return m.target.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}e.Sash=g}),define(ne[993],re([25]),{}),define(ne[139],re([1,0,77,10,128,137,965,966,138,11,6,2,14,444,993]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DomScrollableElement=e.SmoothScrollableElement=e.ScrollableElement=e.AbstractScrollableElement=e.MouseWheelClassifier=void 0;const i=500,S=50,s=!0;class l{constructor(d,m,b){this.timestamp=d,this.deltaX=m,this.deltaY=b,this.score=0}}class r{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let d=1,m=0,b=1,E=this._rear;do{const y=E===this._front?d:Math.pow(2,-b);if(d-=y,m+=this._memory[E].score*y,E===this._front)break;E=(this._capacity+E-1)%this._capacity,b++}while(!0);return m<=.5}accept(d,m,b){const E=new l(d,m,b);E.score=this._computeScore(E),this._front===-1&&this._rear===-1?(this._memory[0]=E,this._front=0,this._rear=0):(this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=E)}_computeScore(d){if(Math.abs(d.deltaX)>0&&Math.abs(d.deltaY)>0)return 1;let m=.5;const b=this._front===-1&&this._rear===-1?null:this._memory[this._rear];return(!this._isAlmostInt(d.deltaX)||!this._isAlmostInt(d.deltaY))&&(m+=.25),Math.min(Math.max(m,0),1)}_isAlmostInt(d){return Math.abs(Math.round(d)-d)<.01}}e.MouseWheelClassifier=r,r.INSTANCE=new r;class p extends I.Widget{constructor(d,m,b){super();this._onScroll=this._register(new v.Emitter),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new v.Emitter),this.onWillScroll=this._onWillScroll.event,d.style.overflow="hidden",this._options=h(m),this._scrollable=b,this._register(this._scrollable.onScroll(y=>{this._onWillScroll.fire(y),this._onDidScroll(y),this._onScroll.fire(y)}));const E={onMouseWheel:y=>this._onMouseWheel(y),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new D.VerticalScrollbar(this._scrollable,this._options,E)),this._horizontalScrollbar=this._register(new k.HorizontalScrollbar(this._scrollable,this._options,E)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(d),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=(0,_.createFastDomNode)(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=(0,_.createFastDomNode)(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=(0,_.createFastDomNode)(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,y=>this._onMouseOver(y)),this.onnonbubblingmouseout(this._listenOnDomNode,y=>this._onMouseOut(y)),this._hideTimeout=this._register(new w.TimeoutTimer),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=(0,C.dispose)(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(d){this._verticalScrollbar.delegatePointerDown(d)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(d){this._scrollable.setScrollDimensions(d,!1)}updateClassName(d){this._options.className=d,o.isMacintosh&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(d){typeof d.handleMouseWheel!="undefined"&&(this._options.handleMouseWheel=d.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof d.mouseWheelScrollSensitivity!="undefined"&&(this._options.mouseWheelScrollSensitivity=d.mouseWheelScrollSensitivity),typeof d.fastScrollSensitivity!="undefined"&&(this._options.fastScrollSensitivity=d.fastScrollSensitivity),typeof d.scrollPredominantAxis!="undefined"&&(this._options.scrollPredominantAxis=d.scrollPredominantAxis),typeof d.horizontal!="undefined"&&(this._options.horizontal=d.horizontal),typeof d.vertical!="undefined"&&(this._options.vertical=d.vertical),typeof d.horizontalScrollbarSize!="undefined"&&(this._options.horizontalScrollbarSize=d.horizontalScrollbarSize),typeof d.verticalScrollbarSize!="undefined"&&(this._options.verticalScrollbarSize=d.verticalScrollbarSize),typeof d.scrollByPage!="undefined"&&(this._options.scrollByPage=d.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}setRevealOnScroll(d){this._revealOnScroll=d}triggerScrollFromMouseWheelEvent(d){this._onMouseWheel(new A.StandardWheelEvent(d))}_setListeningToMouseWheel(d){if(this._mouseWheelToDispose.length>0!==d&&(this._mouseWheelToDispose=(0,C.dispose)(this._mouseWheelToDispose),d)){const b=E=>{this._onMouseWheel(new A.StandardWheelEvent(E))};this._mouseWheelToDispose.push(f.addDisposableListener(this._listenOnDomNode,f.EventType.MOUSE_WHEEL,b,{passive:!1}))}}_onMouseWheel(d){const m=r.INSTANCE;if(s){const y=window.devicePixelRatio/(0,t.getZoomFactor)();o.isWindows||o.isLinux?m.accept(Date.now(),d.deltaX/y,d.deltaY/y):m.accept(Date.now(),d.deltaX,d.deltaY)}let b=!1;if(d.deltaY||d.deltaX){let y=d.deltaY*this._options.mouseWheelScrollSensitivity,T=d.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(Math.abs(y)>=Math.abs(T)?T=0:y=0),this._options.flipAxes&&([y,T]=[T,y]);const R=!o.isMacintosh&&d.browserEvent&&d.browserEvent.shiftKey;(this._options.scrollYToX||R)&&!T&&(T=y,y=0),d.browserEvent&&d.browserEvent.altKey&&(T=T*this._options.fastScrollSensitivity,y=y*this._options.fastScrollSensitivity);const O=this._scrollable.getFutureScrollPosition();let x={};if(y){const F=S*y,L=O.scrollTop-(F<0?Math.floor(F):Math.ceil(F));this._verticalScrollbar.writeScrollPosition(x,L)}if(T){const F=S*T,L=O.scrollLeft-(F<0?Math.floor(F):Math.ceil(F));this._horizontalScrollbar.writeScrollPosition(x,L)}x=this._scrollable.validateScrollPosition(x),(O.scrollLeft!==x.scrollLeft||O.scrollTop!==x.scrollTop)&&(s&&this._options.mouseWheelSmoothScroll&&m.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(x):this._scrollable.setScrollPositionNow(x),b=!0)}let E=b;!E&&this._options.alwaysConsumeMouseWheel&&(E=!0),!E&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(E=!0),E&&(d.preventDefault(),d.stopPropagation())}_onDidScroll(d){this._shouldRender=this._horizontalScrollbar.onDidScroll(d)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(d)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(!!this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const d=this._scrollable.getCurrentScrollPosition(),m=d.scrollTop>0,b=d.scrollLeft>0,E=b?" left":"",y=m?" top":"",T=b||m?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${E}`),this._topShadowDomNode.setClassName(`shadow${y}`),this._topLeftShadowDomNode.setClassName(`shadow${T}${y}${E}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseOut(d){this._mouseIsOver=!1,this._hide()}_onMouseOver(d){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),i)}}e.AbstractScrollableElement=p;class u extends p{constructor(d,m){m=m||{},m.mouseWheelSmoothScroll=!1;const b=new c.Scrollable({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:E=>f.scheduleAtNextAnimationFrame(E)});super(d,m,b);this._register(b)}setScrollPosition(d){this._scrollable.setScrollPositionNow(d)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}e.ScrollableElement=u;class a extends p{constructor(d,m,b){super(d,m,b)}setScrollPosition(d){d.reuseAnimation?this._scrollable.setScrollPositionSmooth(d,d.reuseAnimation):this._scrollable.setScrollPositionNow(d)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}e.SmoothScrollableElement=a;class n extends p{constructor(d,m){m=m||{},m.mouseWheelSmoothScroll=!1;const b=new c.Scrollable({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:E=>f.scheduleAtNextAnimationFrame(E)});super(d,m,b);this._register(b),this._element=d,this.onScroll(E=>{E.scrollTopChanged&&(this._element.scrollTop=E.scrollTop),E.scrollLeftChanged&&(this._element.scrollLeft=E.scrollLeft)}),this.scanDomNode()}setScrollPosition(d){this._scrollable.setScrollPositionNow(d)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}e.DomScrollableElement=n;function h(g){const d={lazyRender:typeof g.lazyRender!="undefined"?g.lazyRender:!1,className:typeof g.className!="undefined"?g.className:"",useShadows:typeof g.useShadows!="undefined"?g.useShadows:!0,handleMouseWheel:typeof g.handleMouseWheel!="undefined"?g.handleMouseWheel:!0,flipAxes:typeof g.flipAxes!="undefined"?g.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof g.consumeMouseWheelIfScrollbarIsNeeded!="undefined"?g.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof g.alwaysConsumeMouseWheel!="undefined"?g.alwaysConsumeMouseWheel:!1,scrollYToX:typeof g.scrollYToX!="undefined"?g.scrollYToX:!1,mouseWheelScrollSensitivity:typeof g.mouseWheelScrollSensitivity!="undefined"?g.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof g.fastScrollSensitivity!="undefined"?g.fastScrollSensitivity:5,scrollPredominantAxis:typeof g.scrollPredominantAxis!="undefined"?g.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof g.mouseWheelSmoothScroll!="undefined"?g.mouseWheelSmoothScroll:!0,arrowSize:typeof g.arrowSize!="undefined"?g.arrowSize:11,listenOnDomNode:typeof g.listenOnDomNode!="undefined"?g.listenOnDomNode:null,horizontal:typeof g.horizontal!="undefined"?g.horizontal:1,horizontalScrollbarSize:typeof g.horizontalScrollbarSize!="undefined"?g.horizontalScrollbarSize:10,horizontalSliderSize:typeof g.horizontalSliderSize!="undefined"?g.horizontalSliderSize:0,horizontalHasArrows:typeof g.horizontalHasArrows!="undefined"?g.horizontalHasArrows:!1,vertical:typeof g.vertical!="undefined"?g.vertical:1,verticalScrollbarSize:typeof g.verticalScrollbarSize!="undefined"?g.verticalScrollbarSize:10,verticalHasArrows:typeof g.verticalHasArrows!="undefined"?g.verticalHasArrows:!1,verticalSliderSize:typeof g.verticalSliderSize!="undefined"?g.verticalSliderSize:0,scrollByPage:typeof g.scrollByPage!="undefined"?g.scrollByPage:!1};return d.horizontalSliderSize=typeof g.horizontalSliderSize!="undefined"?g.horizontalSliderSize:d.horizontalScrollbarSize,d.verticalSliderSize=typeof g.verticalSliderSize!="undefined"?g.verticalSliderSize:d.verticalScrollbarSize,o.isMacintosh&&(d.className+=" mac"),d}}),define(ne[994],re([1,0,10,139,15,33,6,2,978]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BreadcrumbsWidget=e.BreadcrumbsItem=void 0;class I{dispose(){}}e.BreadcrumbsItem=I;class w{constructor(C,o,c){this._disposables=new D.DisposableStore,this._onDidSelectItem=new k.Emitter,this._onDidFocusItem=new k.Emitter,this._onDidChangeFocus=new k.Emitter,this.onDidSelectItem=this._onDidSelectItem.event,this.onDidFocusItem=this._onDidFocusItem.event,this.onDidChangeFocus=this._onDidChangeFocus.event,this._items=new Array,this._nodes=new Array,this._freeNodes=new Array,this._enabled=!0,this._focusedItemIdx=-1,this._selectedItemIdx=-1,this._domNode=document.createElement("div"),this._domNode.className="monaco-breadcrumbs",this._domNode.tabIndex=0,this._domNode.setAttribute("role","list"),this._scrollable=new f.DomScrollableElement(this._domNode,{vertical:2,horizontal:1,horizontalScrollbarSize:o,useShadows:!1,scrollYToX:!0}),this._separatorIcon=c,this._disposables.add(this._scrollable),this._disposables.add(t.addStandardDisposableListener(this._domNode,"click",S=>this._onClick(S))),C.appendChild(this._scrollable.getDomNode()),this._styleElement=t.createStyleSheet(this._domNode);const i=t.trackFocus(this._domNode);this._disposables.add(i),this._disposables.add(i.onDidBlur(S=>this._onDidChangeFocus.fire(!1))),this._disposables.add(i.onDidFocus(S=>this._onDidChangeFocus.fire(!0)))}setHorizontalScrollbarSize(C){this._scrollable.updateOptions({horizontalScrollbarSize:C})}dispose(){this._disposables.dispose(),this._pendingLayout?.dispose(),this._onDidSelectItem.dispose(),this._onDidFocusItem.dispose(),this._onDidChangeFocus.dispose(),this._domNode.remove(),this._nodes.length=0,this._freeNodes.length=0}layout(C){C&&t.Dimension.equals(C,this._dimension)||(this._pendingLayout?.dispose(),C?this._pendingLayout=this._updateDimensions(C):this._pendingLayout=this._updateScrollbar())}_updateDimensions(C){const o=new D.DisposableStore;return o.add(t.modify(()=>{this._dimension=C,this._domNode.style.width=`${C.width}px`,this._domNode.style.height=`${C.height}px`,o.add(this._updateScrollbar())})),o}_updateScrollbar(){return t.measure(()=>{t.measure(()=>{this._scrollable.setRevealOnScroll(!1),this._scrollable.scanDomNode(),this._scrollable.setRevealOnScroll(!0)})})}style(C){let o="";C.breadcrumbsBackground&&(o+=`.monaco-breadcrumbs { background-color: ${C.breadcrumbsBackground}}`),C.breadcrumbsForeground&&(o+=`.monaco-breadcrumbs .monaco-breadcrumb-item { color: ${C.breadcrumbsForeground}} `),C.breadcrumbsFocusForeground&&(o+=`.monaco-breadcrumbs .monaco-breadcrumb-item.focused { color: ${C.breadcrumbsFocusForeground}} `),C.breadcrumbsFocusAndSelectionForeground&&(o+=`.monaco-breadcrumbs .monaco-breadcrumb-item.focused.selected { color: ${C.breadcrumbsFocusAndSelectionForeground}} `),C.breadcrumbsHoverForeground&&(o+=`.monaco-breadcrumbs:not(.disabled ) .monaco-breadcrumb-item:hover:not(.focused):not(.selected) { color: ${C.breadcrumbsHoverForeground}} `),this._styleElement.innerText!==o&&(this._styleElement.innerText=o)}setEnabled(C){this._enabled=C,this._domNode.classList.toggle("disabled",!this._enabled)}domFocus(){let C=this._focusedItemIdx>=0?this._focusedItemIdx:this._items.length-1;C>=0&&C<this._items.length?this._focus(C,void 0):this._domNode.focus()}isDOMFocused(){let C=document.activeElement;for(;C;){if(this._domNode===C)return!0;C=C.parentElement}return!1}getFocused(){return this._items[this._focusedItemIdx]}setFocused(C,o){this._focus(this._items.indexOf(C),o)}focusPrev(C){this._focusedItemIdx>0&&this._focus(this._focusedItemIdx-1,C)}focusNext(C){this._focusedItemIdx+1<this._nodes.length&&this._focus(this._focusedItemIdx+1,C)}_focus(C,o){this._focusedItemIdx=-1;for(let c=0;c<this._nodes.length;c++){const i=this._nodes[c];c!==C?i.classList.remove("focused"):(this._focusedItemIdx=c,i.classList.add("focused"),i.focus())}this._reveal(this._focusedItemIdx,!0),this._onDidFocusItem.fire({type:"focus",item:this._items[this._focusedItemIdx],node:this._nodes[this._focusedItemIdx],payload:o})}reveal(C){let o=this._items.indexOf(C);o>=0&&this._reveal(o,!1)}_reveal(C,o){const c=this._nodes[C];if(c){const{width:i}=this._scrollable.getScrollDimensions(),{scrollLeft:S}=this._scrollable.getScrollPosition();(!o||c.offsetLeft>S+i||c.offsetLeft<S)&&(this._scrollable.setRevealOnScroll(!1),this._scrollable.setScrollPosition({scrollLeft:c.offsetLeft}),this._scrollable.setRevealOnScroll(!0))}}getSelection(){return this._items[this._selectedItemIdx]}setSelection(C,o){this._select(this._items.indexOf(C),o)}_select(C,o){this._selectedItemIdx=-1;for(let c=0;c<this._nodes.length;c++){const i=this._nodes[c];c!==C?i.classList.remove("selected"):(this._selectedItemIdx=c,i.classList.add("selected"))}this._onDidSelectItem.fire({type:"select",item:this._items[this._selectedItemIdx],node:this._nodes[this._selectedItemIdx],payload:o})}getItems(){return this._items}setItems(C){let o,c=[];try{o=(0,_.commonPrefixLength)(this._items,C,(i,S)=>i.equals(S)),c=this._items.splice(o,this._items.length-o,...C.slice(o)),this._render(o),(0,D.dispose)(c),this._focus(-1,void 0)}catch(i){let S=new Error(`BreadcrumbsItem#setItems: newItems: ${C.length}, prefix: ${o}, removed: ${c.length}`);throw S.name=i.name,S.stack=i.stack,S}}_render(C){let o=!1;for(;C<this._items.length&&C<this._nodes.length;C++){let c=this._items[C],i=this._nodes[C];this._renderItem(c,i),o=!0}for(;C<this._nodes.length;){const c=this._nodes.pop();c&&(this._freeNodes.push(c),c.remove(),o=!0)}for(;C<this._items.length;C++){let c=this._items[C],i=this._freeNodes.length>0?this._freeNodes.pop():document.createElement("div");i&&(this._renderItem(c,i),this._domNode.appendChild(i),this._nodes.push(i),o=!0)}o&&this.layout(void 0)}_renderItem(C,o){t.clearNode(o),o.className="";try{C.render(o)}catch(i){o.innerText="<<RENDER ERROR>>",console.error(i)}o.tabIndex=-1,o.setAttribute("role","listitem"),o.classList.add("monaco-breadcrumb-item");const c=t.$(A.CSSIcon.asCSSSelector(this._separatorIcon));o.appendChild(c)}_onClick(C){if(!!this._enabled)for(let o=C.target;o;o=o.parentElement){let c=this._nodes.indexOf(o);if(c>=0){this._focus(c,C),this._select(c,C);break}}}}e.BreadcrumbsWidget=w}),define(ne[521],re([1,0,10,91,139,2,985]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverAction=e.HoverWidget=e.HoverPosition=void 0;const k=t.$;var D;(function(v){v[v.LEFT=0]="LEFT",v[v.RIGHT=1]="RIGHT",v[v.BELOW=2]="BELOW",v[v.ABOVE=3]="ABOVE"})(D=e.HoverPosition||(e.HoverPosition={}));class I extends A.Disposable{constructor(){super();this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new _.DomScrollableElement(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}e.HoverWidget=I;class w extends A.Disposable{constructor(C,o,c){super();this.actionContainer=t.append(C,k("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=t.append(this.actionContainer,k("a.action")),this.action.setAttribute("role","button"),o.iconClass&&t.append(this.action,k(`span.icon.${o.iconClass}`));const i=t.append(this.action,k("span"));i.textContent=c?`${o.label} (${c})`:o.label,this._register(t.addDisposableListener(this.actionContainer,t.EventType.CLICK,S=>{S.stopPropagation(),S.preventDefault(),o.run(this.actionContainer)})),this._register(t.addDisposableListener(this.actionContainer,t.EventType.KEY_UP,S=>{new f.StandardKeyboardEvent(S).equals(3)&&(S.stopPropagation(),S.preventDefault(),o.run(this.actionContainer))})),this.setEnabled(!0)}static render(C,o,c){return new w(C,o,c)}setEnabled(C){C?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}e.HoverAction=w}),define(ne[305],re([1,0,77,170,10,224,129,139,15,11,110,6,2,51,443,444,957,961]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListView=e.NativeDragAndDropData=e.ExternalElementsDragAndDropData=e.ElementsDragAndDropData=void 0;const r={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(d){return[d]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class p{constructor(m){this.elements=m}get context(){return this._context}set context(m){this._context=m}update(){}getData(){return this.elements}}e.ElementsDragAndDropData=p;class u{constructor(m){this.elements=m}update(){}getData(){return this.elements}}e.ExternalElementsDragAndDropData=u;class a{constructor(){this.types=[],this.files=[]}update(m){if(m.types&&this.types.splice(0,this.types.length,...m.types),m.files){this.files.splice(0,this.files.length);for(let b=0;b<m.files.length;b++){const E=m.files.item(b);E&&(E.size||E.type)&&this.files.push(E)}}}getData(){return{types:this.types,files:this.files}}}e.NativeDragAndDropData=a;function n(d,m){return Array.isArray(d)&&Array.isArray(m)?(0,I.equals)(d,m):d===m}class h{constructor(m){m?.getSetSize?this.getSetSize=m.getSetSize.bind(m):this.getSetSize=(b,E,y)=>y,m?.getPosInSet?this.getPosInSet=m.getPosInSet.bind(m):this.getPosInSet=(b,E)=>E+1,m?.getRole?this.getRole=m.getRole.bind(m):this.getRole=b=>"listitem",m?.isChecked?this.isChecked=m.isChecked.bind(m):this.isChecked=b=>{}}}class g{constructor(m,b,E,y=r){if(this.virtualDelegate=b,this.domId=`list_id_${++g.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new w.Delayer(50),this.splicing=!1,this.dragOverAnimationStopDisposable=o.Disposable.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=o.Disposable.None,this.onDragLeaveTimeout=o.Disposable.None,this.disposables=new o.DisposableStore,this._onDidChangeContentHeight=new C.Emitter,this.onDidChangeContentHeight=C.Event.latch(this._onDidChangeContentHeight.event),this._horizontalScrolling=!1,y.horizontalScrolling&&y.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new s.RangeMap;for(const R of E)this.renderers.set(R.templateId,R);this.cache=this.disposables.add(new l.RowCache(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support",typeof y.mouseSupport=="boolean"?y.mouseSupport:!0),this._horizontalScrolling=(0,c.getOrDefault)(y,R=>R.horizontalScrolling,r.horizontalScrolling),this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.additionalScrollHeight=typeof y.additionalScrollHeight=="undefined"?0:y.additionalScrollHeight,this.accessibilityProvider=new h(y.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",(0,c.getOrDefault)(y,R=>R.transformOptimization,r.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)"),this.disposables.add(k.Gesture.addTarget(this.rowsContainer)),this.scrollable=new S.Scrollable({forceIntegerValues:!0,smoothScrollDuration:(0,c.getOrDefault)(y,R=>R.smoothScrolling,!1)?125:0,scheduleAtNextAnimationFrame:R=>(0,_.scheduleAtNextAnimationFrame)(R)}),this.scrollableElement=this.disposables.add(new D.SmoothScrollableElement(this.rowsContainer,{alwaysConsumeMouseWheel:(0,c.getOrDefault)(y,R=>R.alwaysConsumeMouseWheel,r.alwaysConsumeMouseWheel),horizontal:1,vertical:(0,c.getOrDefault)(y,R=>R.verticalScrollMode,r.verticalScrollMode),useShadows:(0,c.getOrDefault)(y,R=>R.useShadows,r.useShadows),mouseWheelScrollSensitivity:y.mouseWheelScrollSensitivity,fastScrollSensitivity:y.fastScrollSensitivity},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),m.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add((0,_.addDisposableListener)(this.rowsContainer,k.EventType.Change,R=>this.onTouchChange(R))),this.disposables.add((0,_.addDisposableListener)(this.scrollableElement.getDomNode(),"scroll",R=>R.target.scrollTop=0)),this.disposables.add((0,_.addDisposableListener)(this.domNode,"dragover",R=>this.onDragOver(this.toDragEvent(R)))),this.disposables.add((0,_.addDisposableListener)(this.domNode,"drop",R=>this.onDrop(this.toDragEvent(R)))),this.disposables.add((0,_.addDisposableListener)(this.domNode,"dragleave",R=>this.onDragLeave(this.toDragEvent(R)))),this.disposables.add((0,_.addDisposableListener)(this.domNode,"dragend",R=>this.onDragEnd(R))),this.setRowLineHeight=(0,c.getOrDefault)(y,R=>R.setRowLineHeight,r.setRowLineHeight),this.setRowHeight=(0,c.getOrDefault)(y,R=>R.setRowHeight,r.setRowHeight),this.supportDynamicHeights=(0,c.getOrDefault)(y,R=>R.supportDynamicHeights,r.supportDynamicHeights),this.dnd=(0,c.getOrDefault)(y,R=>R.dnd,r.dnd),this.layout()}get contentHeight(){return this.rangeMap.size}get onDidScroll(){return this.scrollableElement.onScroll}get onWillScroll(){return this.scrollableElement.onWillScroll}get containerDomNode(){return this.rowsContainer}get scrollableElementDomNode(){return this.scrollableElement.getDomNode()}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(m){if(m!==this._horizontalScrolling){if(m&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=m,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const b of this.items)this.measureItemWidth(b);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:(0,_.getContentWidth)(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}updateOptions(m){m.additionalScrollHeight!==void 0&&(this.additionalScrollHeight=m.additionalScrollHeight,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),m.smoothScrolling!==void 0&&this.scrollable.setSmoothScrollDuration(m.smoothScrolling?125:0),m.horizontalScrolling!==void 0&&(this.horizontalScrolling=m.horizontalScrolling),m.mouseWheelScrollSensitivity!==void 0&&this.scrollableElement.updateOptions({mouseWheelScrollSensitivity:m.mouseWheelScrollSensitivity}),m.fastScrollSensitivity!==void 0&&this.scrollableElement.updateOptions({fastScrollSensitivity:m.fastScrollSensitivity})}triggerScrollFromMouseWheelEvent(m){this.scrollableElement.triggerScrollFromMouseWheelEvent(m)}updateElementHeight(m,b,E){if(m<0||m>=this.items.length)return;const y=this.items[m].size;if(typeof b=="undefined"){if(!this.supportDynamicHeights){console.warn("Dynamic heights not supported");return}this.items[m].lastDynamicHeightWidth=void 0,b=y+this.probeDynamicHeight(m)}if(y===b)return;const T=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);let R=0;m<T.start||E!==null&&E>m&&E<=T.end?R=b-y:R=0,this.rangeMap.splice(m,1,[{size:b}]),this.items[m].size=b,this.render(T,Math.max(0,this.lastRenderTop+R),this.lastRenderHeight,void 0,void 0,!0),this.setScrollTop(this.lastRenderTop),this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.lastRenderTop,this.lastRenderHeight)}splice(m,b,E=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(m,b,E)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(m,b,E=[]){const y=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),T={start:m,end:m+b},R=i.Range.intersect(y,T),O=new Map;for(let Z=R.end-1;Z>=R.start;Z--){const j=this.items[Z];if(j.dragStartDisposable.dispose(),j.checkedDisposable.dispose(),j.row){let X=O.get(j.templateId);X||(X=[],O.set(j.templateId,X));const Y=this.renderers.get(j.templateId);Y&&Y.disposeElement&&Y.disposeElement(j.element,Z,j.row.templateData,j.size),X.push(j.row)}j.row=null}const x={start:m+b,end:this.items.length},F=i.Range.intersect(x,y),L=i.Range.relativeComplement(x,y),M=E.map(Z=>({id:String(this.itemId++),element:Z,templateId:this.virtualDelegate.getTemplateId(Z),size:this.virtualDelegate.getHeight(Z),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(Z),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:o.Disposable.None,checkedDisposable:o.Disposable.None}));let N;m===0&&b>=this.items.length?(this.rangeMap=new s.RangeMap,this.rangeMap.splice(0,0,M),N=this.items,this.items=M):(this.rangeMap.splice(m,b,M),N=this.items.splice(m,b,...M));const B=E.length-b,P=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),V=(0,s.shift)(F,B),z=i.Range.intersect(P,V);for(let Z=z.start;Z<z.end;Z++)this.updateItemInDOM(this.items[Z],Z);const U=i.Range.relativeComplement(V,P);for(const Z of U)for(let j=Z.start;j<Z.end;j++)this.removeItemFromDOM(j);const H=L.map(Z=>(0,s.shift)(Z,B)),G=[{start:m,end:m+E.length},...H].map(Z=>i.Range.intersect(P,Z)),q=this.getNextToLastElement(G);for(const Z of G)for(let j=Z.start;j<Z.end;j++){const X=this.items[j],$=O.get(X.templateId)?.pop();this.insertItemInDOM(j,q,$)}for(const Z of O.values())for(const j of Z)this.cache.release(j);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),N.map(Z=>Z.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=(0,_.scheduleAtNextAnimationFrame)(()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){if(!this.horizontalScrolling){this.scrollableElementWidthDelayer.cancel();return}this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth())}updateScrollWidth(){if(!this.horizontalScrolling)return;let m=0;for(const b of this.items)typeof b.width!="undefined"&&(m=Math.max(m,b.width));this.scrollWidth=m,this.scrollableElement.setScrollDimensions({scrollWidth:m===0?0:m+10})}updateWidth(m){if(!this.horizontalScrolling||typeof this.scrollWidth=="undefined")return;const b=this.items[m];this.measureItemWidth(b),typeof b.width!="undefined"&&b.width>this.scrollWidth&&(this.scrollWidth=b.width,this.scrollableElement.setScrollDimensions({scrollWidth:this.scrollWidth+10}))}rerender(){if(!!this.supportDynamicHeights){for(const m of this.items)m.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}get firstVisibleIndex(){const m=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),b=this.rangeMap.positionAt(m.start),E=this.rangeMap.positionAt(m.start+1);return E!==-1&&(E-b)/2+b<this.scrollTop?m.start+1:m.start}get lastVisibleIndex(){return this.getRenderRange(this.lastRenderTop,this.lastRenderHeight).end-1}element(m){return this.items[m].element}indexOf(m){return this.items.findIndex(b=>b.element===m)}domElement(m){const b=this.items[m].row;return b&&b.domNode}elementHeight(m){return this.items[m].size}elementTop(m){return this.rangeMap.positionAt(m)}indexAt(m){return this.rangeMap.indexAt(m)}indexAfter(m){return this.rangeMap.indexAfter(m)}layout(m,b){let E={height:typeof m=="number"?m:(0,_.getContentHeight)(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,E.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(E),typeof b!="undefined"&&(this.renderWidth=b,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:typeof b=="number"?b:(0,_.getContentWidth)(this.domNode)})}render(m,b,E,y,T,R=!1){const O=this.getRenderRange(b,E),x=i.Range.relativeComplement(O,m),F=i.Range.relativeComplement(m,O),L=this.getNextToLastElement(x);if(R){const M=i.Range.intersect(m,O);for(let N=M.start;N<M.end;N++)this.updateItemInDOM(this.items[N],N)}for(const M of x)for(let N=M.start;N<M.end;N++)this.insertItemInDOM(N,L);for(const M of F)for(let N=M.start;N<M.end;N++)this.removeItemFromDOM(N);y!==void 0&&(this.rowsContainer.style.left=`-${y}px`),this.rowsContainer.style.top=`-${b}px`,this.horizontalScrolling&&T!==void 0&&(this.rowsContainer.style.width=`${Math.max(T,this.renderWidth)}px`),this.lastRenderTop=b,this.lastRenderHeight=E}insertItemInDOM(m,b,E){const y=this.items[m];y.row||(y.row=E??this.cache.alloc(y.templateId));const T=this.accessibilityProvider.getRole(y.element)||"listitem";y.row.domNode.setAttribute("role",T);const R=this.accessibilityProvider.isChecked(y.element);if(typeof R=="boolean")y.row.domNode.setAttribute("aria-checked",String(!!R));else if(R){const F=L=>y.row.domNode.setAttribute("aria-checked",String(!!L));F(R.value),y.checkedDisposable=R.onDidChange(F)}y.row.domNode.parentElement||(b?this.rowsContainer.insertBefore(y.row.domNode,b):this.rowsContainer.appendChild(y.row.domNode)),this.updateItemInDOM(y,m);const O=this.renderers.get(y.templateId);if(!O)throw new Error(`No renderer found for template id ${y.templateId}`);O&&O.renderElement(y.element,m,y.row.templateData,y.size);const x=this.dnd.getDragURI(y.element);y.dragStartDisposable.dispose(),y.row.domNode.draggable=!!x,x&&(y.dragStartDisposable=(0,_.addDisposableListener)(y.row.domNode,"dragstart",F=>this.onDragStart(y.element,x,F))),this.horizontalScrolling&&(this.measureItemWidth(y),this.eventuallyUpdateScrollWidth())}measureItemWidth(m){if(!m.row||!m.row.domNode)return;m.row.domNode.style.width=t.isFirefox?"-moz-fit-content":"fit-content",m.width=(0,_.getContentWidth)(m.row.domNode);const b=window.getComputedStyle(m.row.domNode);b.paddingLeft&&(m.width+=parseFloat(b.paddingLeft)),b.paddingRight&&(m.width+=parseFloat(b.paddingRight)),m.row.domNode.style.width=""}updateItemInDOM(m,b){m.row.domNode.style.top=`${this.elementTop(b)}px`,this.setRowHeight&&(m.row.domNode.style.height=`${m.size}px`),this.setRowLineHeight&&(m.row.domNode.style.lineHeight=`${m.size}px`),m.row.domNode.setAttribute("data-index",`${b}`),m.row.domNode.setAttribute("data-last-element",b===this.length-1?"true":"false"),m.row.domNode.setAttribute("data-parity",b%2==0?"even":"odd"),m.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(m.element,b,this.length))),m.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(m.element,b))),m.row.domNode.setAttribute("id",this.getElementDomId(b)),m.row.domNode.classList.toggle("drop-target",m.dropTarget)}removeItemFromDOM(m){const b=this.items[m];if(b.dragStartDisposable.dispose(),b.checkedDisposable.dispose(),b.row){const E=this.renderers.get(b.templateId);E&&E.disposeElement&&E.disposeElement(b.element,m,b.row.templateData,b.size),this.cache.release(b.row),b.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(m,b){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:m,reuseAnimation:b})}getScrollLeft(){return this.scrollableElement.getScrollPosition().scrollLeft}setScrollLeft(m){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollWidth:this.scrollWidth})),this.scrollableElement.setScrollPosition({scrollLeft:m})}get scrollTop(){return this.getScrollTop()}set scrollTop(m){this.setScrollTop(m)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.additionalScrollHeight}get onMouseClick(){return C.Event.map(this.disposables.add(new A.DomEmitter(this.domNode,"click")).event,m=>this.toMouseEvent(m))}get onMouseDblClick(){return C.Event.map(this.disposables.add(new A.DomEmitter(this.domNode,"dblclick")).event,m=>this.toMouseEvent(m))}get onMouseMiddleClick(){return C.Event.filter(C.Event.map(this.disposables.add(new A.DomEmitter(this.domNode,"auxclick")).event,m=>this.toMouseEvent(m)),m=>m.browserEvent.button===1)}get onMouseUp(){return C.Event.map(this.disposables.add(new A.DomEmitter(this.domNode,"mouseup")).event,m=>this.toMouseEvent(m))}get onMouseDown(){return C.Event.map(this.disposables.add(new A.DomEmitter(this.domNode,"mousedown")).event,m=>this.toMouseEvent(m))}get onMouseOver(){return C.Event.map(this.disposables.add(new A.DomEmitter(this.domNode,"mouseover")).event,m=>this.toMouseEvent(m))}get onMouseMove(){return C.Event.map(this.disposables.add(new A.DomEmitter(this.domNode,"mousemove")).event,m=>this.toMouseEvent(m))}get onMouseOut(){return C.Event.map(this.disposables.add(new A.DomEmitter(this.domNode,"mouseout")).event,m=>this.toMouseEvent(m))}get onContextMenu(){return C.Event.any(C.Event.map(this.disposables.add(new A.DomEmitter(this.domNode,"contextmenu")).event,m=>this.toMouseEvent(m)),C.Event.map(this.disposables.add(new A.DomEmitter(this.domNode,k.EventType.Contextmenu)).event,m=>this.toGestureEvent(m)))}get onTouchStart(){return C.Event.map(this.disposables.add(new A.DomEmitter(this.domNode,"touchstart")).event,m=>this.toTouchEvent(m))}get onTap(){return C.Event.map(this.disposables.add(new A.DomEmitter(this.rowsContainer,k.EventType.Tap)).event,m=>this.toGestureEvent(m))}toMouseEvent(m){const b=this.getItemIndexFromEventTarget(m.target||null),E=typeof b=="undefined"?void 0:this.items[b],y=E&&E.element;return{browserEvent:m,index:b,element:y}}toTouchEvent(m){const b=this.getItemIndexFromEventTarget(m.target||null),E=typeof b=="undefined"?void 0:this.items[b],y=E&&E.element;return{browserEvent:m,index:b,element:y}}toGestureEvent(m){const b=this.getItemIndexFromEventTarget(m.initialTarget||null),E=typeof b=="undefined"?void 0:this.items[b],y=E&&E.element;return{browserEvent:m,index:b,element:y}}toDragEvent(m){const b=this.getItemIndexFromEventTarget(m.target||null),E=typeof b=="undefined"?void 0:this.items[b],y=E&&E.element;return{browserEvent:m,index:b,element:y}}onScroll(m){try{const b=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(b,m.scrollTop,m.height,m.scrollLeft,m.scrollWidth),this.supportDynamicHeights&&this._rerender(m.scrollTop,m.height,m.inSmoothScrolling)}catch(b){throw console.error("Got bad scroll event:",m),b}}onTouchChange(m){m.preventDefault(),m.stopPropagation(),this.scrollTop-=m.translationY}onDragStart(m,b,E){if(!E.dataTransfer)return;const y=this.dnd.getDragElements(m);if(E.dataTransfer.effectAllowed="copyMove",E.dataTransfer.setData(f.DataTransfers.TEXT,b),E.dataTransfer.setDragImage){let T;this.dnd.getDragLabel&&(T=this.dnd.getDragLabel(y,E)),typeof T=="undefined"&&(T=String(y.length));const R=(0,_.$)(".monaco-drag-image");R.textContent=T,document.body.appendChild(R),E.dataTransfer.setDragImage(R,-10,-10),setTimeout(()=>document.body.removeChild(R),0)}this.currentDragData=new p(y),f.StaticDND.CurrentDragAndDropData=new u(y),this.dnd.onDragStart&&this.dnd.onDragStart(this.currentDragData,E)}onDragOver(m){if(m.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),f.StaticDND.CurrentDragAndDropData&&f.StaticDND.CurrentDragAndDropData.getData()==="vscode-ui"||(this.setupDragAndDropScrollTopAnimation(m.browserEvent),!m.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(f.StaticDND.CurrentDragAndDropData)this.currentDragData=f.StaticDND.CurrentDragAndDropData;else{if(!m.browserEvent.dataTransfer.types)return!1;this.currentDragData=new a}const b=this.dnd.onDragOver(this.currentDragData,m.element,m.index,m.browserEvent);if(this.canDrop=typeof b=="boolean"?b:b.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;m.browserEvent.dataTransfer.dropEffect=typeof b!="boolean"&&b.effect===0?"copy":"move";let E;if(typeof b!="boolean"&&b.feedback?E=b.feedback:typeof m.index=="undefined"?E=[-1]:E=[m.index],E=(0,I.distinct)(E).filter(y=>y>=-1&&y<this.length).sort((y,T)=>y-T),E=E[0]===-1?[-1]:E,n(this.currentDragFeedback,E))return!0;if(this.currentDragFeedback=E,this.currentDragFeedbackDisposable.dispose(),E[0]===-1)this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=(0,o.toDisposable)(()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")});else{for(const y of E){const T=this.items[y];T.dropTarget=!0,T.row&&T.row.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=(0,o.toDisposable)(()=>{for(const y of E){const T=this.items[y];T.dropTarget=!1,T.row&&T.row.domNode.classList.remove("drop-target")}})}return!0}onDragLeave(m){this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=(0,w.disposableTimeout)(()=>this.clearDragOverFeedback(),100),this.currentDragData&&this.dnd.onDragLeave?.(this.currentDragData,m.element,m.index,m.browserEvent)}onDrop(m){if(!this.canDrop)return;const b=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,f.StaticDND.CurrentDragAndDropData=void 0,!(!b||!m.browserEvent.dataTransfer)&&(m.browserEvent.preventDefault(),b.update(m.browserEvent.dataTransfer),this.dnd.drop(b,m.element,m.index,m.browserEvent))}onDragEnd(m){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,f.StaticDND.CurrentDragAndDropData=void 0,this.dnd.onDragEnd&&this.dnd.onDragEnd(m)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=o.Disposable.None}setupDragAndDropScrollTopAnimation(m){if(!this.dragOverAnimationDisposable){const b=(0,_.getTopLeftOffset)(this.domNode).top;this.dragOverAnimationDisposable=(0,_.animate)(this.animateDragAndDropScrollTop.bind(this,b))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=(0,w.disposableTimeout)(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3),this.dragOverMouseY=m.pageY}animateDragAndDropScrollTop(m){if(this.dragOverMouseY===void 0)return;const b=this.dragOverMouseY-m,E=this.renderHeight-35;b<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(b-35))):b>E&&(this.scrollTop+=Math.min(14,Math.floor(.3*(b-E))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(m){const b=this.scrollableElement.getDomNode();let E=m;for(;E instanceof HTMLElement&&E!==this.rowsContainer&&b.contains(E);){const y=E.getAttribute("data-index");if(y){const T=Number(y);if(!isNaN(T))return T}E=E.parentElement}}getRenderRange(m,b){return{start:this.rangeMap.indexAt(m),end:this.rangeMap.indexAfter(m+b-1)}}_rerender(m,b,E){const y=this.getRenderRange(m,b);let T,R;m===this.elementTop(y.start)?(T=y.start,R=0):y.end-y.start>1&&(T=y.start+1,R=this.elementTop(T)-m);let O=0;for(;;){const x=this.getRenderRange(m,b);let F=!1;for(let L=x.start;L<x.end;L++){const M=this.probeDynamicHeight(L);M!==0&&this.rangeMap.splice(L,1,[this.items[L]]),O+=M,F=F||M!==0}if(!F){O!==0&&this.eventuallyUpdateScrollDimensions();const L=i.Range.relativeComplement(y,x);for(const N of L)for(let B=N.start;B<N.end;B++)this.items[B].row&&this.removeItemFromDOM(B);const M=i.Range.relativeComplement(x,y);for(const N of M)for(let B=N.start;B<N.end;B++){const P=B+1,V=P<this.items.length?this.items[P].row:null,z=V?V.domNode:null;this.insertItemInDOM(B,z)}for(let N=x.start;N<x.end;N++)this.items[N].row&&this.updateItemInDOM(this.items[N],N);if(typeof T=="number"){const N=this.scrollable.getFutureScrollPosition().scrollTop-m,B=this.elementTop(T)-R+N;this.setScrollTop(B,E)}this._onDidChangeContentHeight.fire(this.contentHeight);return}}}probeDynamicHeight(m){const b=this.items[m];if(this.virtualDelegate.getDynamicHeight){const R=this.virtualDelegate.getDynamicHeight(b.element);if(R!==null){const O=b.size;return b.size=R,b.lastDynamicHeightWidth=this.renderWidth,R-O}}if(!b.hasDynamicHeight||b.lastDynamicHeightWidth===this.renderWidth||!!this.virtualDelegate.hasDynamicHeight&&!this.virtualDelegate.hasDynamicHeight(b.element))return 0;const E=b.size;if(!this.setRowHeight&&b.row){let R=b.row.domNode.offsetHeight;return b.size=R,b.lastDynamicHeightWidth=this.renderWidth,R-E}const y=this.cache.alloc(b.templateId);y.domNode.style.height="",this.rowsContainer.appendChild(y.domNode);const T=this.renderers.get(b.templateId);return T&&(T.renderElement(b.element,m,y.templateData,void 0),T.disposeElement&&T.disposeElement(b.element,m,y.templateData,void 0)),b.size=y.domNode.offsetHeight,this.virtualDelegate.setDynamicHeight&&this.virtualDelegate.setDynamicHeight(b.element,b.size),b.lastDynamicHeightWidth=this.renderWidth,this.rowsContainer.removeChild(y.domNode),this.cache.release(y),b.size-E}getNextToLastElement(m){const b=m[m.length-1];if(!b)return null;const E=this.items[b.end];return!E||!E.row?null:E.row.domNode}getElementDomId(m){return`${this.domId}_${m}`}dispose(){if(this.items){for(const m of this.items)if(m.row){const b=this.renderers.get(m.row.templateId);b&&(b.disposeElement&&b.disposeElement(m.element,-1,m.row.templateData,void 0),b.disposeTemplate(m.row.templateData))}this.items=[]}this.domNode&&this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),(0,o.dispose)(this.disposables)}}g.InstanceCount=0,Ee([v.memoize],g.prototype,"onMouseClick",null),Ee([v.memoize],g.prototype,"onMouseDblClick",null),Ee([v.memoize],g.prototype,"onMouseMiddleClick",null),Ee([v.memoize],g.prototype,"onMouseUp",null),Ee([v.memoize],g.prototype,"onMouseDown",null),Ee([v.memoize],g.prototype,"onMouseOver",null),Ee([v.memoize],g.prototype,"onMouseMove",null),Ee([v.memoize],g.prototype,"onMouseOut",null),Ee([v.memoize],g.prototype,"onContextMenu",null),Ee([v.memoize],g.prototype,"onTouchStart",null),Ee([v.memoize],g.prototype,"onTap",null),e.ListView=g}),define(ne[208],re([1,0,10,224,91,129,112,953,15,11,66,110,6,102,2,195,51,14,13,441,305,667]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.List=e.DefaultStyleController=e.MouseController=e.isSelectionRangeChangeEvent=e.isSelectionSingleChangeEvent=e.DefaultKeyboardNavigationDelegate=e.isMonacoEditor=e.isInputElement=void 0;class a{constructor(j){this.trait=j,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(j){return j}renderElement(j,X,Y){const $=this.renderedElements.findIndex(J=>J.templateData===Y);if($>=0){const J=this.renderedElements[$];this.trait.unrender(Y),J.index=X}else{const J={index:X,templateData:Y};this.renderedElements.push(J)}this.trait.renderIndex(X,Y)}splice(j,X,Y){const $=[];for(const J of this.renderedElements)J.index<j?$.push(J):J.index>=j+X&&$.push({index:J.index+Y-X,templateData:J.templateData});this.renderedElements=$}renderIndexes(j){for(const{index:X,templateData:Y}of this.renderedElements)j.indexOf(X)>-1&&this.trait.renderIndex(X,Y)}disposeTemplate(j){const X=this.renderedElements.findIndex(Y=>Y.templateData===j);X<0||this.renderedElements.splice(X,1)}}class n{constructor(j){this._trait=j,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new o.Emitter,this.onChange=this._onChange.event}get name(){return this._trait}get renderer(){return new a(this)}splice(j,X,Y){X=Math.max(0,Math.min(X,this.length-j));const $=Y.length-X,J=j+X,ee=[...this.sortedIndexes.filter(se=>se<j),...Y.map((se,ie)=>se?ie+j:-1).filter(se=>se!==-1),...this.sortedIndexes.filter(se=>se>=J).map(se=>se+$)],te=this.length+$;if(this.sortedIndexes.length>0&&ee.length===0&&te>0){const se=this.sortedIndexes.find(ie=>ie>=j)??te-1;ee.push(Math.min(se,te-1))}this.renderer.splice(j,X,Y.length),this._set(ee,ee),this.length=te}renderIndex(j,X){X.classList.toggle(this._trait,this.contains(j))}unrender(j){j.classList.remove(this._trait)}set(j,X){return this._set(j,[...j].sort(U),X)}_set(j,X,Y){const $=this.indexes,J=this.sortedIndexes;this.indexes=j,this.sortedIndexes=X;const ee=V(J,j);return this.renderer.renderIndexes(ee),this._onChange.fire({indexes:j,browserEvent:Y}),$}get(){return this.indexes}contains(j){return(0,I.binarySearch)(this.sortedIndexes,j,U)>=0}dispose(){(0,i.dispose)(this._onChange)}}Ee([C.memoize],n.prototype,"renderer",null);class h extends n{constructor(j){super("selected");this.setAriaSelected=j}renderIndex(j,X){super.renderIndex(j,X),this.setAriaSelected&&(this.contains(j)?X.setAttribute("aria-selected","true"):X.setAttribute("aria-selected","false"))}}class g{constructor(j,X,Y){this.trait=j,this.view=X,this.identityProvider=Y}splice(j,X,Y){if(!this.identityProvider)return this.trait.splice(j,X,Y.map(()=>!1));const $=this.trait.get().map(ee=>this.identityProvider.getId(this.view.element(ee)).toString()),J=Y.map(ee=>$.indexOf(this.identityProvider.getId(ee).toString())>-1);this.trait.splice(j,X,J)}}function d(Z){return Z.tagName==="INPUT"||Z.tagName==="TEXTAREA"}e.isInputElement=d;function m(Z){return Z.classList.contains("monaco-editor")?!0:Z.classList.contains("monaco-list")||!Z.parentElement?!1:m(Z.parentElement)}e.isMonacoEditor=m;class b{constructor(j,X,Y){this.list=j,this.view=X,this.disposables=new i.DisposableStore,this.multipleSelectionDisposables=new i.DisposableStore,this.onKeyDown.filter($=>$.keyCode===3).on(this.onEnter,this,this.disposables),this.onKeyDown.filter($=>$.keyCode===16).on(this.onUpArrow,this,this.disposables),this.onKeyDown.filter($=>$.keyCode===18).on(this.onDownArrow,this,this.disposables),this.onKeyDown.filter($=>$.keyCode===11).on(this.onPageUpArrow,this,this.disposables),this.onKeyDown.filter($=>$.keyCode===12).on(this.onPageDownArrow,this,this.disposables),this.onKeyDown.filter($=>$.keyCode===9).on(this.onEscape,this,this.disposables),Y.multipleSelectionSupport!==!1&&this.onKeyDown.filter($=>(l.isMacintosh?$.metaKey:$.ctrlKey)&&$.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables)}get onKeyDown(){return o.Event.chain(this.disposables.add(new f.DomEmitter(this.view.domNode,"keydown")).event).filter(j=>!d(j.target)).map(j=>new _.StandardKeyboardEvent(j))}updateOptions(j){j.multipleSelectionSupport!==void 0&&(this.multipleSelectionDisposables.clear(),j.multipleSelectionSupport&&this.onKeyDown.filter(X=>(l.isMacintosh?X.metaKey:X.ctrlKey)&&X.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables))}onEnter(j){j.preventDefault(),j.stopPropagation(),this.list.setSelection(this.list.getFocus(),j.browserEvent)}onUpArrow(j){j.preventDefault(),j.stopPropagation(),this.list.focusPrevious(1,!1,j.browserEvent);const X=this.list.getFocus()[0];this.list.setAnchor(X),this.list.reveal(X),this.view.domNode.focus()}onDownArrow(j){j.preventDefault(),j.stopPropagation(),this.list.focusNext(1,!1,j.browserEvent);const X=this.list.getFocus()[0];this.list.setAnchor(X),this.list.reveal(X),this.view.domNode.focus()}onPageUpArrow(j){j.preventDefault(),j.stopPropagation(),this.list.focusPreviousPage(j.browserEvent);const X=this.list.getFocus()[0];this.list.setAnchor(X),this.list.reveal(X),this.view.domNode.focus()}onPageDownArrow(j){j.preventDefault(),j.stopPropagation(),this.list.focusNextPage(j.browserEvent);const X=this.list.getFocus()[0];this.list.setAnchor(X),this.list.reveal(X),this.view.domNode.focus()}onCtrlA(j){j.preventDefault(),j.stopPropagation(),this.list.setSelection((0,I.range)(this.list.length),j.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(j){this.list.getSelection().length&&(j.preventDefault(),j.stopPropagation(),this.list.setSelection([],j.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}Ee([C.memoize],b.prototype,"onKeyDown",null);var E;(function(Z){Z[Z.Idle=0]="Idle",Z[Z.Typing=1]="Typing"})(E||(E={})),e.DefaultKeyboardNavigationDelegate=new class{mightProducePrintableCharacter(Z){return Z.ctrlKey||Z.metaKey||Z.altKey?!1:Z.keyCode>=31&&Z.keyCode<=56||Z.keyCode>=21&&Z.keyCode<=30||Z.keyCode>=93&&Z.keyCode<=102||Z.keyCode>=80&&Z.keyCode<=90}};class y{constructor(j,X,Y,$){this.list=j,this.view=X,this.keyboardNavigationLabelProvider=Y,this.delegate=$,this.enabled=!1,this.state=E.Idle,this.automaticKeyboardNavigation=!0,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new i.DisposableStore,this.disposables=new i.DisposableStore,this.updateOptions(j.options)}updateOptions(j){(typeof j.enableKeyboardNavigation=="undefined"?!0:!!j.enableKeyboardNavigation)?this.enable():this.disable(),typeof j.automaticKeyboardNavigation!="undefined"&&(this.automaticKeyboardNavigation=j.automaticKeyboardNavigation)}toggle(){this.triggered=!this.triggered}enable(){if(this.enabled)return;const j=o.Event.chain(this.enabledDisposables.add(new f.DomEmitter(this.view.domNode,"keydown")).event).filter($=>!d($.target)).filter(()=>this.automaticKeyboardNavigation||this.triggered).map($=>new _.StandardKeyboardEvent($)).filter($=>this.delegate.mightProducePrintableCharacter($)).forEach($=>$.preventDefault()).map($=>$.browserEvent.key).event,X=o.Event.debounce(j,()=>null,800);o.Event.reduce(o.Event.any(j,X),($,J)=>J===null?null:($||"")+J)(this.onInput,this,this.enabledDisposables),X(this.onClear,this,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){!this.enabled||(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){const j=this.list.getFocus();if(j.length>0&&j[0]===this.previouslyFocused){const X=this.list.options.accessibilityProvider?.getAriaLabel(this.list.element(j[0]));X&&(0,k.alert)(X)}this.previouslyFocused=-1}onInput(j){if(!j){this.state=E.Idle,this.triggered=!1;return}const X=this.list.getFocus(),Y=X.length>0?X[0]:0,$=this.state===E.Idle?1:0;this.state=E.Typing;for(let J=0;J<this.list.length;J++){const ee=(Y+J+$)%this.list.length,te=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(this.view.element(ee)),se=te&&te.toString();if(typeof se=="undefined"||(0,c.matchesPrefix)(j,se)){this.previouslyFocused=Y,this.list.setFocus([ee]),this.list.reveal(ee);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class T{constructor(j,X){this.list=j,this.view=X,this.disposables=new i.DisposableStore,o.Event.chain(this.disposables.add(new f.DomEmitter(X.domNode,"keydown")).event).filter($=>!d($.target)).map($=>new _.StandardKeyboardEvent($)).filter($=>$.keyCode===2&&!$.ctrlKey&&!$.metaKey&&!$.shiftKey&&!$.altKey).on(this.onTab,this,this.disposables)}onTab(j){if(j.target!==this.view.domNode)return;const X=this.list.getFocus();if(X.length===0)return;const Y=this.view.domElement(X[0]);if(!Y)return;const $=Y.querySelector("[tabIndex]");if(!$||!($ instanceof HTMLElement)||$.tabIndex===-1)return;const J=window.getComputedStyle($);J.visibility==="hidden"||J.display==="none"||(j.preventDefault(),j.stopPropagation(),$.focus())}dispose(){this.disposables.dispose()}}function R(Z){return l.isMacintosh?Z.browserEvent.metaKey:Z.browserEvent.ctrlKey}e.isSelectionSingleChangeEvent=R;function O(Z){return Z.browserEvent.shiftKey}e.isSelectionRangeChangeEvent=O;function x(Z){return Z instanceof MouseEvent&&Z.button===2}const F={isSelectionSingleChangeEvent:R,isSelectionRangeChangeEvent:O};class L{constructor(j){this.list=j,this.disposables=new i.DisposableStore,this._onPointer=new o.Emitter,this.onPointer=this._onPointer.event,j.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||F),this.mouseSupport=typeof j.options.mouseSupport=="undefined"||!!j.options.mouseSupport,this.mouseSupport&&(j.onMouseDown(this.onMouseDown,this,this.disposables),j.onContextMenu(this.onContextMenu,this,this.disposables),j.onMouseDblClick(this.onDoubleClick,this,this.disposables),j.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(A.Gesture.addTarget(j.getHTMLElement()))),o.Event.any(j.onMouseClick,j.onMouseMiddleClick,j.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(j){j.multipleSelectionSupport!==void 0&&(this.multipleSelectionController=void 0,j.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||F))}isSelectionSingleChangeEvent(j){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(j):!1}isSelectionRangeChangeEvent(j){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(j):!1}isSelectionChangeEvent(j){return this.isSelectionSingleChangeEvent(j)||this.isSelectionRangeChangeEvent(j)}onMouseDown(j){m(j.browserEvent.target)||document.activeElement!==j.browserEvent.target&&this.list.domFocus()}onContextMenu(j){if(m(j.browserEvent.target))return;const X=typeof j.index=="undefined"?[]:[j.index];this.list.setFocus(X,j.browserEvent)}onViewPointer(j){if(!this.mouseSupport||d(j.browserEvent.target)||m(j.browserEvent.target))return;const X=j.index;if(typeof X=="undefined"){this.list.setFocus([],j.browserEvent),this.list.setSelection([],j.browserEvent),this.list.setAnchor(void 0);return}if(this.isSelectionRangeChangeEvent(j))return this.changeSelection(j);if(this.isSelectionChangeEvent(j))return this.changeSelection(j);this.list.setFocus([X],j.browserEvent),this.list.setAnchor(X),x(j.browserEvent)||this.list.setSelection([X],j.browserEvent),this._onPointer.fire(j)}onDoubleClick(j){if(d(j.browserEvent.target)||m(j.browserEvent.target)||this.isSelectionChangeEvent(j))return;const X=this.list.getFocus();this.list.setSelection(X,j.browserEvent)}changeSelection(j){const X=j.index;let Y=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(j)){typeof Y=="undefined"&&(Y=this.list.getFocus()[0]??X,this.list.setAnchor(Y));const $=Math.min(Y,X),J=Math.max(Y,X),ee=(0,I.range)($,J+1),te=this.list.getSelection(),se=P(V(te,[Y]),Y);if(se.length===0)return;const ie=V(ee,z(te,se));this.list.setSelection(ie,j.browserEvent),this.list.setFocus([X],j.browserEvent)}else if(this.isSelectionSingleChangeEvent(j)){const $=this.list.getSelection(),J=$.filter(ee=>ee!==X);this.list.setFocus([X]),this.list.setAnchor(X),$.length===J.length?this.list.setSelection([...J,X],j.browserEvent):this.list.setSelection(J,j.browserEvent)}}dispose(){this.disposables.dispose()}}e.MouseController=L;class M{constructor(j,X){this.styleElement=j,this.selectorSuffix=X}style(j){const X=this.selectorSuffix&&`.${this.selectorSuffix}`,Y=[];j.listBackground&&(j.listBackground.isOpaque()?Y.push(`.monaco-list${X} .monaco-list-rows { background: ${j.listBackground}; }`):l.isMacintosh||console.warn(`List with id '${this.selectorSuffix}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`)),j.listFocusBackground&&(Y.push(`.monaco-list${X}:focus .monaco-list-row.focused { background-color: ${j.listFocusBackground}; }`),Y.push(`.monaco-list${X}:focus .monaco-list-row.focused:hover { background-color: ${j.listFocusBackground}; }`)),j.listFocusForeground&&Y.push(`.monaco-list${X}:focus .monaco-list-row.focused { color: ${j.listFocusForeground}; }`),j.listActiveSelectionBackground&&(Y.push(`.monaco-list${X}:focus .monaco-list-row.selected { background-color: ${j.listActiveSelectionBackground}; }`),Y.push(`.monaco-list${X}:focus .monaco-list-row.selected:hover { background-color: ${j.listActiveSelectionBackground}; }`)),j.listActiveSelectionForeground&&Y.push(`.monaco-list${X}:focus .monaco-list-row.selected { color: ${j.listActiveSelectionForeground}; }`),j.listActiveSelectionIconForeground&&Y.push(`.monaco-list${X}:focus .monaco-list-row.selected .codicon { color: ${j.listActiveSelectionIconForeground}; }`),j.listFocusAndSelectionBackground&&Y.push(` .monaco-drag-image, .monaco-list${X}:focus .monaco-list-row.selected.focused { background-color: ${j.listFocusAndSelectionBackground}; } `),j.listFocusAndSelectionForeground&&Y.push(` .monaco-drag-image, .monaco-list${X}:focus .monaco-list-row.selected.focused { color: ${j.listFocusAndSelectionForeground}; } `),j.listInactiveFocusForeground&&(Y.push(`.monaco-list${X} .monaco-list-row.focused { color: ${j.listInactiveFocusForeground}; }`),Y.push(`.monaco-list${X} .monaco-list-row.focused:hover { color: ${j.listInactiveFocusForeground}; }`)),j.listInactiveSelectionIconForeground&&Y.push(`.monaco-list${X} .monaco-list-row.focused .codicon { color: ${j.listInactiveSelectionIconForeground}; }`),j.listInactiveFocusBackground&&(Y.push(`.monaco-list${X} .monaco-list-row.focused { background-color: ${j.listInactiveFocusBackground}; }`),Y.push(`.monaco-list${X} .monaco-list-row.focused:hover { background-color: ${j.listInactiveFocusBackground}; }`)),j.listInactiveSelectionBackground&&(Y.push(`.monaco-list${X} .monaco-list-row.selected { background-color: ${j.listInactiveSelectionBackground}; }`),Y.push(`.monaco-list${X} .monaco-list-row.selected:hover { background-color: ${j.listInactiveSelectionBackground}; }`)),j.listInactiveSelectionForeground&&Y.push(`.monaco-list${X} .monaco-list-row.selected { color: ${j.listInactiveSelectionForeground}; }`),j.listHoverBackground&&Y.push(`.monaco-list${X}:not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${j.listHoverBackground}; }`),j.listHoverForeground&&Y.push(`.monaco-list${X} .monaco-list-row:hover:not(.selected):not(.focused) { color: ${j.listHoverForeground}; }`),j.listSelectionOutline&&Y.push(`.monaco-list${X} .monaco-list-row.selected { outline: 1px dotted ${j.listSelectionOutline}; outline-offset: -1px; }`),j.listFocusOutline&&Y.push(` .monaco-drag-image, .monaco-list${X}:focus .monaco-list-row.focused { outline: 1px solid ${j.listFocusOutline}; outline-offset: -1px; } .monaco-workbench.context-menu-visible .monaco-list${X}.last-focused .monaco-list-row.focused { outline: 1px solid ${j.listFocusOutline}; outline-offset: -1px; } `),j.listInactiveFocusOutline&&Y.push(`.monaco-list${X} .monaco-list-row.focused { outline: 1px dotted ${j.listInactiveFocusOutline}; outline-offset: -1px; }`),j.listHoverOutline&&Y.push(`.monaco-list${X} .monaco-list-row:hover { outline: 1px dashed ${j.listHoverOutline}; outline-offset: -1px; }`),j.listDropBackground&&Y.push(` .monaco-list${X}.drop-target, .monaco-list${X} .monaco-list-rows.drop-target, .monaco-list${X} .monaco-list-row.drop-target { background-color: ${j.listDropBackground} !important; color: inherit !important; } `),j.listFilterWidgetBackground&&Y.push(`.monaco-list-type-filter { background-color: ${j.listFilterWidgetBackground} }`),j.listFilterWidgetOutline&&Y.push(`.monaco-list-type-filter { border: 1px solid ${j.listFilterWidgetOutline}; }`),j.listFilterWidgetNoMatchesOutline&&Y.push(`.monaco-list-type-filter.no-matches { border: 1px solid ${j.listFilterWidgetNoMatchesOutline}; }`),j.listMatchesShadow&&Y.push(`.monaco-list-type-filter { box-shadow: 1px 1px 1px ${j.listMatchesShadow}; }`),j.tableColumnsBorder&&Y.push(` .monaco-table:hover > .monaco-split-view2, .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before { border-color: ${j.tableColumnsBorder}; }`),j.tableOddRowsBackgroundColor&&Y.push(` .monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr, .monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr, .monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr { background-color: ${j.tableOddRowsBackgroundColor}; } `),this.styleElement.textContent=Y.join(` `)}}e.DefaultStyleController=M;const N={listFocusBackground:v.Color.fromHex("#7FB0D0"),listActiveSelectionBackground:v.Color.fromHex("#0E639C"),listActiveSelectionForeground:v.Color.fromHex("#FFFFFF"),listActiveSelectionIconForeground:v.Color.fromHex("#FFFFFF"),listFocusAndSelectionBackground:v.Color.fromHex("#094771"),listFocusAndSelectionForeground:v.Color.fromHex("#FFFFFF"),listInactiveSelectionBackground:v.Color.fromHex("#3F3F46"),listInactiveSelectionIconForeground:v.Color.fromHex("#FFFFFF"),listHoverBackground:v.Color.fromHex("#2A2D2E"),listDropBackground:v.Color.fromHex("#383B3D"),treeIndentGuidesStroke:v.Color.fromHex("#a9a9a9"),tableColumnsBorder:v.Color.fromHex("#cccccc").transparent(.2),tableOddRowsBackgroundColor:v.Color.fromHex("#cccccc").transparent(.04)},B={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}}};function P(Z,j){const X=Z.indexOf(j);if(X===-1)return[];const Y=[];let $=X-1;for(;$>=0&&Z[$]===j-(X-$);)Y.push(Z[$--]);for(Y.reverse(),$=X;$<Z.length&&Z[$]===j+($-X);)Y.push(Z[$++]);return Y}function V(Z,j){const X=[];let Y=0,$=0;for(;Y<Z.length||$<j.length;)if(Y>=Z.length)X.push(j[$++]);else if($>=j.length)X.push(Z[Y++]);else if(Z[Y]===j[$]){X.push(Z[Y]),Y++,$++;continue}else Z[Y]<j[$]?X.push(Z[Y++]):X.push(j[$++]);return X}function z(Z,j){const X=[];let Y=0,$=0;for(;Y<Z.length||$<j.length;)if(Y>=Z.length)X.push(j[$++]);else if($>=j.length)X.push(Z[Y++]);else if(Z[Y]===j[$]){Y++,$++;continue}else Z[Y]<j[$]?X.push(Z[Y++]):$++;return X}const U=(Z,j)=>Z-j;class H{constructor(j,X){this._templateId=j,this.renderers=X}get templateId(){return this._templateId}renderTemplate(j){return this.renderers.map(X=>X.renderTemplate(j))}renderElement(j,X,Y,$){let J=0;for(const ee of this.renderers)ee.renderElement(j,X,Y[J++],$)}disposeElement(j,X,Y,$){let J=0;for(const ee of this.renderers)ee.disposeElement&&ee.disposeElement(j,X,Y[J],$),J+=1}disposeTemplate(j){let X=0;for(const Y of this.renderers)Y.disposeTemplate(j[X++])}}class K{constructor(j){this.accessibilityProvider=j,this.templateId="a18n"}renderTemplate(j){return j}renderElement(j,X,Y){const $=this.accessibilityProvider.getAriaLabel(j);$?Y.setAttribute("aria-label",$):Y.removeAttribute("aria-label");const J=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(j);typeof J=="number"?Y.setAttribute("aria-level",`${J}`):Y.removeAttribute("aria-level")}disposeTemplate(j){}}class G{constructor(j,X){this.list=j,this.dnd=X}getDragElements(j){const X=this.list.getSelectedElements();return X.indexOf(j)>-1?X:[j]}getDragURI(j){return this.dnd.getDragURI(j)}getDragLabel(j,X){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(j,X)}onDragStart(j,X){this.dnd.onDragStart&&this.dnd.onDragStart(j,X)}onDragOver(j,X,Y,$){return this.dnd.onDragOver(j,X,Y,$)}onDragLeave(j,X,Y,$){this.dnd.onDragLeave?.(j,X,Y,$)}onDragEnd(j){this.dnd.onDragEnd&&this.dnd.onDragEnd(j)}drop(j,X,Y,$){this.dnd.drop(j,X,Y,$)}}class q{constructor(j,X,Y,$,J=B){this.user=j,this._options=J,this.focus=new n("focused"),this.anchor=new n("anchor"),this.eventBufferer=new o.EventBufferer,this._ariaLabel="",this.disposables=new i.DisposableStore,this._onDidDispose=new o.Emitter,this.onDidDispose=this._onDidDispose.event;const ee=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?this._options.accessibilityProvider?.getWidgetRole():"list";this.selection=new h(ee!=="listbox"),(0,s.mixin)(J,N,!1);const te=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=J.accessibilityProvider,this.accessibilityProvider&&(te.push(new K(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant&&this.accessibilityProvider.onDidChangeActiveDescendant(this.onDidChangeActiveDescendant,this,this.disposables)),$=$.map(ie=>new H(ie.templateId,[...te,ie]));const se={...J,dnd:J.dnd&&new G(this,J.dnd)};if(this.view=new u.ListView(X,Y,$,se),this.view.domNode.setAttribute("role",ee),J.styleController)this.styleController=J.styleController(this.view.domId);else{const ie=(0,t.createStyleSheet)(this.view.domNode);this.styleController=new M(ie,this.view.domId)}if(this.spliceable=new D.CombinedSpliceable([new g(this.focus,this.view,J.identityProvider),new g(this.selection,this.view,J.identityProvider),new g(this.anchor,this.view,J.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new T(this,this.view)),(typeof J.keyboardSupport!="boolean"||J.keyboardSupport)&&(this.keyboardController=new b(this,this.view,J),this.disposables.add(this.keyboardController)),J.keyboardNavigationLabelProvider){const ie=J.keyboardNavigationDelegate||e.DefaultKeyboardNavigationDelegate;this.typeLabelController=new y(this,this.view,J.keyboardNavigationLabelProvider,ie),this.disposables.add(this.typeLabelController)}this.mouseController=this.createMouseController(J),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),this._options.multipleSelectionSupport!==!1&&this.view.domNode.setAttribute("aria-multiselectable","true")}get onDidChangeFocus(){return o.Event.map(this.eventBufferer.wrapEvent(this.focus.onChange),j=>this.toListEvent(j))}get onDidChangeSelection(){return o.Event.map(this.eventBufferer.wrapEvent(this.selection.onChange),j=>this.toListEvent(j))}get domId(){return this.view.domId}get onDidScroll(){return this.view.onDidScroll}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseUp(){return this.view.onMouseUp}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseMove(){return this.view.onMouseMove}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let j=!1;const X=o.Event.chain(this.disposables.add(new f.DomEmitter(this.view.domNode,"keydown")).event).map(J=>new _.StandardKeyboardEvent(J)).filter(J=>j=J.keyCode===58||J.shiftKey&&J.keyCode===68).map(f.stopEvent).filter(()=>!1).event,Y=o.Event.chain(this.disposables.add(new f.DomEmitter(this.view.domNode,"keyup")).event).forEach(()=>j=!1).map(J=>new _.StandardKeyboardEvent(J)).filter(J=>J.keyCode===58||J.shiftKey&&J.keyCode===68).map(f.stopEvent).map(({browserEvent:J})=>{const ee=this.getFocus(),te=ee.length?ee[0]:void 0,se=typeof te!="undefined"?this.view.element(te):void 0,ie=typeof te!="undefined"?this.view.domElement(te):this.view.domNode;return{index:te,element:se,anchor:ie,browserEvent:J}}).event,$=o.Event.chain(this.view.onContextMenu).filter(J=>!j).map(({element:J,index:ee,browserEvent:te})=>({element:J,index:ee,anchor:{x:te.pageX+1,y:te.pageY},browserEvent:te})).event;return o.Event.any(X,Y,$)}get onKeyDown(){return this.disposables.add(new f.DomEmitter(this.view.domNode,"keydown")).event}get onKeyUp(){return this.disposables.add(new f.DomEmitter(this.view.domNode,"keyup")).event}get onKeyPress(){return this.disposables.add(new f.DomEmitter(this.view.domNode,"keypress")).event}get onDidFocus(){return o.Event.signal(this.disposables.add(new f.DomEmitter(this.view.domNode,"focus",!0)).event)}get onDidBlur(){return o.Event.signal(this.disposables.add(new f.DomEmitter(this.view.domNode,"blur",!0)).event)}createMouseController(j){return new L(this)}updateOptions(j={}){this._options={...this._options,...j},this.typeLabelController&&this.typeLabelController.updateOptions(this._options),this._options.multipleSelectionController!==void 0&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(j),this.keyboardController?.updateOptions(j),this.view.updateOptions(j)}get options(){return this._options}splice(j,X,Y=[]){if(j<0||j>this.view.length)throw new p.ListError(this.user,`Invalid start index: ${j}`);if(X<0)throw new p.ListError(this.user,`Invalid delete count: ${X}`);X===0&&Y.length===0||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(j,X,Y))}updateWidth(j){this.view.updateWidth(j)}updateElementHeight(j,X){this.view.updateElementHeight(j,X,null)}rerender(){this.view.rerender()}element(j){return this.view.element(j)}indexOf(j){return this.view.indexOf(j)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get onDidChangeContentHeight(){return this.view.onDidChangeContentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(j){this.view.setScrollTop(j)}get scrollLeft(){return this.view.getScrollLeft()}set scrollLeft(j){this.view.setScrollLeft(j)}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get lastVisibleIndex(){return this.view.lastVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(j){this._ariaLabel=j,this.view.domNode.setAttribute("aria-label",j)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(j,X){this.view.layout(j,X)}toggleKeyboardNavigation(){this.typeLabelController&&this.typeLabelController.toggle()}setSelection(j,X){for(const Y of j)if(Y<0||Y>=this.length)throw new p.ListError(this.user,`Invalid index ${Y}`);this.selection.set(j,X)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(j=>this.view.element(j))}setAnchor(j){if(typeof j=="undefined"){this.anchor.set([]);return}if(j<0||j>=this.length)throw new p.ListError(this.user,`Invalid index ${j}`);this.anchor.set([j])}getAnchor(){return(0,I.firstOrDefault)(this.anchor.get(),void 0)}getAnchorElement(){const j=this.getAnchor();return typeof j=="undefined"?void 0:this.element(j)}setFocus(j,X){for(const Y of j)if(Y<0||Y>=this.length)throw new p.ListError(this.user,`Invalid index ${Y}`);this.focus.set(j,X)}focusNext(j=1,X=!1,Y,$){if(this.length===0)return;const J=this.focus.get(),ee=this.findNextIndex(J.length>0?J[0]+j:0,X,$);ee>-1&&this.setFocus([ee],Y)}focusPrevious(j=1,X=!1,Y,$){if(this.length===0)return;const J=this.focus.get(),ee=this.findPreviousIndex(J.length>0?J[0]-j:0,X,$);ee>-1&&this.setFocus([ee],Y)}async focusNextPage(j,X){let Y=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);Y=Y===0?0:Y-1;const $=this.view.element(Y),J=this.getFocusedElements()[0];if(J!==$){const ee=this.findPreviousIndex(Y,!1,X);ee>-1&&J!==this.view.element(ee)?this.setFocus([ee],j):this.setFocus([Y],j)}else{const ee=this.view.getScrollTop();this.view.setScrollTop(ee+this.view.renderHeight-this.view.elementHeight(Y)),this.view.getScrollTop()!==ee&&(this.setFocus([]),await(0,w.timeout)(0),await this.focusNextPage(j,X))}}async focusPreviousPage(j,X){let Y;const $=this.view.getScrollTop();$===0?Y=this.view.indexAt($):Y=this.view.indexAfter($-1);const J=this.view.element(Y),ee=this.getFocusedElements()[0];if(ee!==J){const te=this.findNextIndex(Y,!1,X);te>-1&&ee!==this.view.element(te)?this.setFocus([te],j):this.setFocus([Y],j)}else{const te=$;this.view.setScrollTop($-this.view.renderHeight),this.view.getScrollTop()!==te&&(this.setFocus([]),await(0,w.timeout)(0),await this.focusPreviousPage(j,X))}}focusLast(j,X){if(this.length===0)return;const Y=this.findPreviousIndex(this.length-1,!1,X);Y>-1&&this.setFocus([Y],j)}focusFirst(j,X){this.focusNth(0,j,X)}focusNth(j,X,Y){if(this.length===0)return;const $=this.findNextIndex(j,!1,Y);$>-1&&this.setFocus([$],X)}findNextIndex(j,X=!1,Y){for(let $=0;$<this.length;$++){if(j>=this.length&&!X)return-1;if(j=j%this.length,!Y||Y(this.element(j)))return j;j++}return-1}findPreviousIndex(j,X=!1,Y){for(let $=0;$<this.length;$++){if(j<0&&!X)return-1;if(j=(this.length+j%this.length)%this.length,!Y||Y(this.element(j)))return j;j--}return-1}getFocus(){return this.focus.get()}getFocusedElements(){return this.getFocus().map(j=>this.view.element(j))}reveal(j,X){if(j<0||j>=this.length)throw new p.ListError(this.user,`Invalid index ${j}`);const Y=this.view.getScrollTop(),$=this.view.elementTop(j),J=this.view.elementHeight(j);if((0,r.isNumber)(X)){const ee=J-this.view.renderHeight;this.view.setScrollTop(ee*(0,S.clamp)(X,0,1)+$)}else{const ee=$+J,te=Y+this.view.renderHeight;$<Y&&ee>=te||($<Y||ee>=te&&J>=this.view.renderHeight?this.view.setScrollTop($):ee>=te&&this.view.setScrollTop(ee-this.view.renderHeight))}}getRelativeTop(j){if(j<0||j>=this.length)throw new p.ListError(this.user,`Invalid index ${j}`);const X=this.view.getScrollTop(),Y=this.view.elementTop(j),$=this.view.elementHeight(j);if(Y<X||Y+$>X+this.view.renderHeight)return null;const J=$-this.view.renderHeight;return Math.abs((X-Y)/J)}isDOMFocused(){return this.view.domNode===document.activeElement}getHTMLElement(){return this.view.domNode}style(j){this.styleController.style(j)}toListEvent({indexes:j,browserEvent:X}){return{indexes:j,elements:j.map(Y=>this.view.element(Y)),browserEvent:X}}_onFocusChange(){const j=this.focus.get();this.view.domNode.classList.toggle("element-focused",j.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){const j=this.focus.get();if(j.length>0){let X;this.accessibilityProvider?.getActiveDescendantId&&(X=this.accessibilityProvider.getActiveDescendantId(this.view.element(j[0]))),this.view.domNode.setAttribute("aria-activedescendant",X||this.view.getElementDomId(j[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const j=this.selection.get();this.view.domNode.classList.toggle("selection-none",j.length===0),this.view.domNode.classList.toggle("selection-single",j.length===1),this.view.domNode.classList.toggle("selection-multiple",j.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}Ee([C.memoize],q.prototype,"onDidChangeFocus",null),Ee([C.memoize],q.prototype,"onDidChangeSelection",null),Ee([C.memoize],q.prototype,"onContextMenu",null),Ee([C.memoize],q.prototype,"onKeyDown",null),Ee([C.memoize],q.prototype,"onKeyUp",null),Ee([C.memoize],q.prototype,"onKeyPress",null),Ee([C.memoize],q.prototype,"onDidFocus",null),Ee([C.memoize],q.prototype,"onDidBlur",null),e.List=q}),define(ne[668],re([1,0,15,30,6,2,208,667]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PagedList=void 0;class D{constructor(o,c){this.renderer=o,this.modelProvider=c}get templateId(){return this.renderer.templateId}renderTemplate(o){return{data:this.renderer.renderTemplate(o),disposable:A.Disposable.None}}renderElement(o,c,i,S){if(i.disposable&&i.disposable.dispose(),!i.data)return;const s=this.modelProvider();if(s.isResolved(o))return this.renderer.renderElement(s.get(o),o,i.data,S);const l=new f.CancellationTokenSource,r=s.resolve(o,l.token);i.disposable={dispose:()=>l.cancel()},this.renderer.renderPlaceholder(o,i.data),r.then(p=>this.renderer.renderElement(p,o,i.data,S))}disposeTemplate(o){o.disposable&&(o.disposable.dispose(),o.disposable=void 0),o.data&&(this.renderer.disposeTemplate(o.data),o.data=void 0)}}class I{constructor(o,c){this.modelProvider=o,this.accessibilityProvider=c}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(o){const c=this.modelProvider();return c.isResolved(o)?this.accessibilityProvider.getAriaLabel(c.get(o)):null}}function w(C,o){return{...o,accessibilityProvider:o.accessibilityProvider&&new I(C,o.accessibilityProvider)}}class v{constructor(o,c,i,S,s={}){const l=()=>this.model,r=S.map(p=>new D(p,l));this.list=new k.List(o,c,i,r,w(l,s))}updateOptions(o){this.list.updateOptions(o)}getHTMLElement(){return this.list.getHTMLElement()}isDOMFocused(){return this.list.getHTMLElement()===document.activeElement}domFocus(){this.list.domFocus()}get onDidFocus(){return this.list.onDidFocus}get onDidBlur(){return this.list.onDidBlur}get widget(){return this.list}get onDidDispose(){return this.list.onDidDispose}get onMouseClick(){return _.Event.map(this.list.onMouseClick,({element:o,index:c,browserEvent:i})=>({element:o===void 0?void 0:this._model.get(o),index:c,browserEvent:i}))}get onMouseDblClick(){return _.Event.map(this.list.onMouseDblClick,({element:o,index:c,browserEvent:i})=>({element:o===void 0?void 0:this._model.get(o),index:c,browserEvent:i}))}get onTap(){return _.Event.map(this.list.onTap,({element:o,index:c,browserEvent:i})=>({element:o===void 0?void 0:this._model.get(o),index:c,browserEvent:i}))}get onPointer(){return _.Event.map(this.list.onPointer,({element:o,index:c,browserEvent:i})=>({element:o===void 0?void 0:this._model.get(o),index:c,browserEvent:i}))}get onDidChangeFocus(){return _.Event.map(this.list.onDidChangeFocus,({elements:o,indexes:c,browserEvent:i})=>({elements:o.map(S=>this._model.get(S)),indexes:c,browserEvent:i}))}get onDidChangeSelection(){return _.Event.map(this.list.onDidChangeSelection,({elements:o,indexes:c,browserEvent:i})=>({elements:o.map(S=>this._model.get(S)),indexes:c,browserEvent:i}))}get onContextMenu(){return _.Event.map(this.list.onContextMenu,({element:o,index:c,anchor:i,browserEvent:S})=>typeof o=="undefined"?{element:o,index:c,anchor:i,browserEvent:S}:{element:this._model.get(o),index:c,anchor:i,browserEvent:S})}get model(){return this._model}set model(o){this._model=o,this.list.splice(0,this.list.length,(0,t.range)(o.length))}get length(){return this.list.length}get scrollTop(){return this.list.scrollTop}set scrollTop(o){this.list.scrollTop=o}get scrollLeft(){return this.list.scrollLeft}set scrollLeft(o){this.list.scrollLeft=o}setAnchor(o){this.list.setAnchor(o)}getAnchor(){return this.list.getAnchor()}setFocus(o){this.list.setFocus(o)}focusNext(o,c){this.list.focusNext(o,c)}focusPrevious(o,c){this.list.focusPrevious(o,c)}focusNextPage(){return this.list.focusNextPage()}focusPreviousPage(){return this.list.focusPreviousPage()}focusLast(){this.list.focusLast()}focusFirst(){this.list.focusFirst()}getFocus(){return this.list.getFocus()}setSelection(o,c){this.list.setSelection(o,c)}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map(o=>this.model.get(o))}layout(o,c){this.list.layout(o,c)}toggleKeyboardNavigation(){this.list.toggleKeyboardNavigation()}reveal(o,c){this.list.reveal(o,c)}style(o){this.list.style(o)}dispose(){this.list.dispose()}}e.PagedList=v}),define(ne[995],re([25]),{}),define(ne[996],re([25]),{}),define(ne[997],re([25]),{}),define(ne[998],re([25]),{}),define(ne[209],re([1,0,10,281,139,15,66,6,2,195,444,13,281,998]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SplitView=e.Sizing=e.LayoutPriority=e.Orientation=void 0,Object.defineProperty(e,"Orientation",{enumerable:!0,get:function(){return o.Orientation}});const c={separatorBorder:k.Color.transparent};var i;(function(a){a[a.Normal=0]="Normal",a[a.Low=1]="Low",a[a.High=2]="High"})(i=e.LayoutPriority||(e.LayoutPriority={}));class S{constructor(n,h,g,d){this.container=n,this.view=h,this.disposable=d,this._cachedVisibleSize=void 0,typeof g=="number"?(this._size=g,this._cachedVisibleSize=void 0,n.classList.add("visible")):(this._size=0,this._cachedVisibleSize=g.cachedVisibleSize)}set size(n){this._size=n}get size(){return this._size}get cachedVisibleSize(){return this._cachedVisibleSize}get visible(){return typeof this._cachedVisibleSize=="undefined"}setVisible(n,h){n!==this.visible&&(n?(this.size=(0,w.clamp)(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof h=="number"?h:this.size,this.size=0),this.container.classList.toggle("visible",n),this.view.setVisible&&this.view.setVisible(n))}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get snap(){return!!this.view.snap}set enabled(n){this.container.style.pointerEvents=n?"":"none"}layout(n,h){this.layoutContainer(n),this.view.layout(this.size,n,h)}dispose(){return this.disposable.dispose(),this.view}}class s extends S{layoutContainer(n){this.container.style.top=`${n}px`,this.container.style.height=`${this.size}px`}}class l extends S{layoutContainer(n){this.container.style.left=`${n}px`,this.container.style.width=`${this.size}px`}}var r;(function(a){a[a.Idle=0]="Idle",a[a.Busy=1]="Busy"})(r||(r={}));var p;(function(a){a.Distribute={type:"distribute"};function n(g){return{type:"split",index:g}}a.Split=n;function h(g){return{type:"invisible",cachedVisibleSize:g}}a.Invisible=h})(p=e.Sizing||(e.Sizing={}));class u extends I.Disposable{constructor(n,h={}){super();this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=r.Idle,this._onDidSashChange=this._register(new D.Emitter),this._onDidSashReset=this._register(new D.Emitter),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=h.orientation??0,this.inverseAltBehavior=h.inverseAltBehavior??!1,this.proportionalLayout=h.proportionalLayout??!0,this.getSashOrthogonalSize=h.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(this.orientation===0?"vertical":"horizontal"),n.appendChild(this.el),this.sashContainer=(0,t.append)(this.el,(0,t.$)(".sash-container")),this.viewContainer=(0,t.$)(".split-view-container"),this.scrollable=new v.Scrollable({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:t.scheduleAtNextAnimationFrame}),this.scrollableElement=this._register(new _.SmoothScrollableElement(this.viewContainer,{vertical:this.orientation===0?h.scrollbarVisibility??1:2,horizontal:this.orientation===1?h.scrollbarVisibility??1:2},this.scrollable)),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll(g=>{this.viewContainer.scrollTop=g.scrollTop,this.viewContainer.scrollLeft=g.scrollLeft})),(0,t.append)(this.el,this.scrollableElement.getDomNode()),this.style(h.styles||c),h.descriptor&&(this.size=h.descriptor.size,h.descriptor.views.forEach((g,d)=>{const m=C.isUndefined(g.visible)||g.visible?g.size:{type:"invisible",cachedVisibleSize:g.size},b=g.view;this.doAddView(b,m,d,!0)}),this.contentSize=this.viewItems.reduce((g,d)=>g+d.size,0),this.saveProportions())}get length(){return this.viewItems.length}get minimumSize(){return this.viewItems.reduce((n,h)=>n+h.minimumSize,0)}get maximumSize(){return this.length===0?Number.POSITIVE_INFINITY:this.viewItems.reduce((n,h)=>n+h.maximumSize,0)}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(n){for(const h of this.sashItems)h.sash.orthogonalStartSash=n;this._orthogonalStartSash=n}set orthogonalEndSash(n){for(const h of this.sashItems)h.sash.orthogonalEndSash=n;this._orthogonalEndSash=n}get sashes(){return this.sashItems.map(n=>n.sash)}set startSnappingEnabled(n){this._startSnappingEnabled!==n&&(this._startSnappingEnabled=n,this.updateSashEnablement())}set endSnappingEnabled(n){this._endSnappingEnabled!==n&&(this._endSnappingEnabled=n,this.updateSashEnablement())}style(n){n.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",n.separatorBorder.toString()))}addView(n,h,g=this.viewItems.length,d){this.doAddView(n,h,g,d)}removeView(n,h){if(this.state!==r.Idle)throw new Error("Cant modify splitview");if(this.state=r.Busy,n<0||n>=this.viewItems.length)throw new Error("Index out of bounds");const d=this.viewItems.splice(n,1)[0].dispose();if(this.viewItems.length>=1){const m=Math.max(n-1,0);this.sashItems.splice(m,1)[0].disposable.dispose()}return this.relayout(),this.state=r.Idle,h?.type==="distribute"&&this.distributeViewSizes(),d}moveView(n,h){if(this.state!==r.Idle)throw new Error("Cant modify splitview");const g=this.getViewCachedVisibleSize(n),d=typeof g=="undefined"?this.getViewSize(n):p.Invisible(g),m=this.removeView(n);this.addView(m,d,h)}swapViews(n,h){if(this.state!==r.Idle)throw new Error("Cant modify splitview");if(n>h)return this.swapViews(h,n);const g=this.getViewSize(n),d=this.getViewSize(h),m=this.removeView(h),b=this.removeView(n);this.addView(m,g,n),this.addView(b,d,h)}isViewVisible(n){if(n<0||n>=this.viewItems.length)throw new Error("Index out of bounds");return this.viewItems[n].visible}setViewVisible(n,h){if(n<0||n>=this.viewItems.length)throw new Error("Index out of bounds");this.viewItems[n].setVisible(h),this.distributeEmptySpace(n),this.layoutViews(),this.saveProportions()}getViewCachedVisibleSize(n){if(n<0||n>=this.viewItems.length)throw new Error("Index out of bounds");return this.viewItems[n].cachedVisibleSize}layout(n,h){const g=Math.max(this.size,this.contentSize);if(this.size=n,this.layoutContext=h,this.proportions)for(let d=0;d<this.viewItems.length;d++){const m=this.viewItems[d];m.size=(0,w.clamp)(Math.round(this.proportions[d]*n),m.minimumSize,m.maximumSize)}else{const d=(0,A.range)(this.viewItems.length),m=d.filter(E=>this.viewItems[E].priority===1),b=d.filter(E=>this.viewItems[E].priority===2);this.resize(this.viewItems.length-1,n-g,void 0,m,b)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map(n=>n.size/this.contentSize))}onSashStart({sash:n,start:h,alt:g}){for(const E of this.viewItems)E.enabled=!1;const d=this.sashItems.findIndex(E=>E.sash===n),m=(0,I.combinedDisposable)((0,t.addDisposableListener)(document.body,"keydown",E=>b(this.sashDragState.current,E.altKey)),(0,t.addDisposableListener)(document.body,"keyup",()=>b(this.sashDragState.current,!1))),b=(E,y)=>{const T=this.viewItems.map(L=>L.size);let R=Number.NEGATIVE_INFINITY,O=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(y=!y),y)if(d===this.sashItems.length-1){const M=this.viewItems[d];R=(M.minimumSize-M.size)/2,O=(M.maximumSize-M.size)/2}else{const M=this.viewItems[d+1];R=(M.size-M.maximumSize)/2,O=(M.size-M.minimumSize)/2}let x,F;if(!y){const L=(0,A.range)(d,-1),M=(0,A.range)(d+1,this.viewItems.length),N=L.reduce((G,q)=>G+(this.viewItems[q].minimumSize-T[q]),0),B=L.reduce((G,q)=>G+(this.viewItems[q].viewMaximumSize-T[q]),0),P=M.length===0?Number.POSITIVE_INFINITY:M.reduce((G,q)=>G+(T[q]-this.viewItems[q].minimumSize),0),V=M.length===0?Number.NEGATIVE_INFINITY:M.reduce((G,q)=>G+(T[q]-this.viewItems[q].viewMaximumSize),0),z=Math.max(N,V),U=Math.min(P,B),H=this.findFirstSnapIndex(L),K=this.findFirstSnapIndex(M);if(typeof H=="number"){const G=this.viewItems[H],q=Math.floor(G.viewMinimumSize/2);x={index:H,limitDelta:G.visible?z-q:z+q,size:G.size}}if(typeof K=="number"){const G=this.viewItems[K],q=Math.floor(G.viewMinimumSize/2);F={index:K,limitDelta:G.visible?U+q:U-q,size:G.size}}}this.sashDragState={start:E,current:E,index:d,sizes:T,minDelta:R,maxDelta:O,alt:y,snapBefore:x,snapAfter:F,disposable:m}};b(h,g)}onSashChange({current:n}){const{index:h,start:g,sizes:d,alt:m,minDelta:b,maxDelta:E,snapBefore:y,snapAfter:T}=this.sashDragState;this.sashDragState.current=n;const R=n-g,O=this.resize(h,R,d,void 0,void 0,b,E,y,T);if(m){const x=h===this.sashItems.length-1,F=this.viewItems.map(V=>V.size),L=x?h:h+1,M=this.viewItems[L],N=M.size-M.maximumSize,B=M.size-M.minimumSize,P=x?h-1:h+1;this.resize(P,-O,F,void 0,void 0,N,B)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(n){this._onDidSashChange.fire(n),this.sashDragState.disposable.dispose(),this.saveProportions();for(const h of this.viewItems)h.enabled=!0}onViewChange(n,h){const g=this.viewItems.indexOf(n);g<0||g>=this.viewItems.length||(h=typeof h=="number"?h:n.size,h=(0,w.clamp)(h,n.minimumSize,n.maximumSize),this.inverseAltBehavior&&g>0?(this.resize(g-1,Math.floor((n.size-h)/2)),this.distributeEmptySpace(),this.layoutViews()):(n.size=h,this.relayout([g],void 0)))}resizeView(n,h){if(this.state!==r.Idle)throw new Error("Cant modify splitview");if(this.state=r.Busy,n<0||n>=this.viewItems.length)return;const g=(0,A.range)(this.viewItems.length).filter(E=>E!==n),d=[...g.filter(E=>this.viewItems[E].priority===1),n],m=g.filter(E=>this.viewItems[E].priority===2),b=this.viewItems[n];h=Math.round(h),h=(0,w.clamp)(h,b.minimumSize,Math.min(b.maximumSize,this.size)),b.size=h,this.relayout(d,m),this.state=r.Idle}distributeViewSizes(){const n=[];let h=0;for(const E of this.viewItems)E.maximumSize-E.minimumSize>0&&(n.push(E),h+=E.size);const g=Math.floor(h/n.length);for(const E of n)E.size=(0,w.clamp)(g,E.minimumSize,E.maximumSize);const d=(0,A.range)(this.viewItems.length),m=d.filter(E=>this.viewItems[E].priority===1),b=d.filter(E=>this.viewItems[E].priority===2);this.relayout(m,b)}getViewSize(n){return n<0||n>=this.viewItems.length?-1:this.viewItems[n].size}doAddView(n,h,g=this.viewItems.length,d){if(this.state!==r.Idle)throw new Error("Cant modify splitview");this.state=r.Busy;const m=(0,t.$)(".split-view-view");g===this.viewItems.length?this.viewContainer.appendChild(m):this.viewContainer.insertBefore(m,this.viewContainer.children.item(g));const b=n.onDidChange(x=>this.onViewChange(R,x)),E=(0,I.toDisposable)(()=>this.viewContainer.removeChild(m)),y=(0,I.combinedDisposable)(b,E);let T;typeof h=="number"?T=h:h.type==="split"?T=this.getViewSize(h.index)/2:h.type==="invisible"?T={cachedVisibleSize:h.cachedVisibleSize}:T=n.minimumSize;const R=this.orientation===0?new s(m,n,T,y):new l(m,n,T,y);if(this.viewItems.splice(g,0,R),this.viewItems.length>1){let x={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash};const F=this.orientation===0?new f.Sash(this.sashContainer,{getHorizontalSashTop:G=>this.getSashPosition(G),getHorizontalSashWidth:this.getSashOrthogonalSize},{...x,orientation:1}):new f.Sash(this.sashContainer,{getVerticalSashLeft:G=>this.getSashPosition(G),getVerticalSashHeight:this.getSashOrthogonalSize},{...x,orientation:0}),L=this.orientation===0?G=>({sash:F,start:G.startY,current:G.currentY,alt:G.altKey}):G=>({sash:F,start:G.startX,current:G.currentX,alt:G.altKey}),N=D.Event.map(F.onDidStart,L)(this.onSashStart,this),P=D.Event.map(F.onDidChange,L)(this.onSashChange,this),z=D.Event.map(F.onDidEnd,()=>this.sashItems.findIndex(G=>G.sash===F))(this.onSashEnd,this),U=F.onDidReset(()=>{const G=this.sashItems.findIndex(Y=>Y.sash===F),q=(0,A.range)(G,-1),Z=(0,A.range)(G+1,this.viewItems.length),j=this.findFirstSnapIndex(q),X=this.findFirstSnapIndex(Z);typeof j=="number"&&!this.viewItems[j].visible||typeof X=="number"&&!this.viewItems[X].visible||this._onDidSashReset.fire(G)}),H=(0,I.combinedDisposable)(N,P,z,U,F),K={sash:F,disposable:H};this.sashItems.splice(g-1,0,K)}m.appendChild(n.element);let O;typeof h!="number"&&h.type==="split"&&(O=[h.index]),d||this.relayout([g],O),this.state=r.Idle,!d&&typeof h!="number"&&h.type==="distribute"&&this.distributeViewSizes()}relayout(n,h){const g=this.viewItems.reduce((d,m)=>d+m.size,0);this.resize(this.viewItems.length-1,this.size-g,void 0,n,h),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(n,h,g=this.viewItems.map(R=>R.size),d,m,b=Number.NEGATIVE_INFINITY,E=Number.POSITIVE_INFINITY,y,T){if(n<0||n>=this.viewItems.length)return 0;const R=(0,A.range)(n,-1),O=(0,A.range)(n+1,this.viewItems.length);if(m)for(const K of m)(0,A.pushToStart)(R,K),(0,A.pushToStart)(O,K);if(d)for(const K of d)(0,A.pushToEnd)(R,K),(0,A.pushToEnd)(O,K);const x=R.map(K=>this.viewItems[K]),F=R.map(K=>g[K]),L=O.map(K=>this.viewItems[K]),M=O.map(K=>g[K]),N=R.reduce((K,G)=>K+(this.viewItems[G].minimumSize-g[G]),0),B=R.reduce((K,G)=>K+(this.viewItems[G].maximumSize-g[G]),0),P=O.length===0?Number.POSITIVE_INFINITY:O.reduce((K,G)=>K+(g[G]-this.viewItems[G].minimumSize),0),V=O.length===0?Number.NEGATIVE_INFINITY:O.reduce((K,G)=>K+(g[G]-this.viewItems[G].maximumSize),0),z=Math.max(N,V,b),U=Math.min(P,B,E);let H=!1;if(y){const K=this.viewItems[y.index],G=h>=y.limitDelta;H=G!==K.visible,K.setVisible(G,y.size)}if(!H&&T){const K=this.viewItems[T.index],G=h<T.limitDelta;H=G!==K.visible,K.setVisible(G,T.size)}if(H)return this.resize(n,h,g,d,m,b,E);h=(0,w.clamp)(h,z,U);for(let K=0,G=h;K<x.length;K++){const q=x[K],Z=(0,w.clamp)(F[K]+G,q.minimumSize,q.maximumSize);G-=Z-F[K],q.size=Z}for(let K=0,G=h;K<L.length;K++){const q=L[K],Z=(0,w.clamp)(M[K]-G,q.minimumSize,q.maximumSize);G+=Z-M[K],q.size=Z}return h}distributeEmptySpace(n){const h=this.viewItems.reduce((E,y)=>E+y.size,0);let g=this.size-h;const d=(0,A.range)(this.viewItems.length-1,-1),m=d.filter(E=>this.viewItems[E].priority===1),b=d.filter(E=>this.viewItems[E].priority===2);for(const E of b)(0,A.pushToStart)(d,E);for(const E of m)(0,A.pushToEnd)(d,E);typeof n=="number"&&(0,A.pushToEnd)(d,n);for(let E=0;g!==0&&E<d.length;E++){const y=this.viewItems[d[E]],T=(0,w.clamp)(y.size+g,y.minimumSize,y.maximumSize);g-=T-y.size,y.size=T}}layoutViews(){this.contentSize=this.viewItems.reduce((h,g)=>h+g.size,0);let n=0;for(const h of this.viewItems)h.layout(n,this.layoutContext),n+=h.size;this.sashItems.forEach(h=>h.sash.layout()),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){this.orientation===0?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this.contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this.contentSize})}updateSashEnablement(){let n=!1;const h=this.viewItems.map(y=>n=y.size-y.minimumSize>0||n);n=!1;const g=this.viewItems.map(y=>n=y.maximumSize-y.size>0||n),d=[...this.viewItems].reverse();n=!1;const m=d.map(y=>n=y.size-y.minimumSize>0||n).reverse();n=!1;const b=d.map(y=>n=y.maximumSize-y.size>0||n).reverse();let E=0;for(let y=0;y<this.sashItems.length;y++){const{sash:T}=this.sashItems[y];E+=this.viewItems[y].size;const O=!(h[y]&&b[y+1]),x=!(g[y]&&m[y+1]);if(O&&x){const F=(0,A.range)(y,-1),L=(0,A.range)(y+1,this.viewItems.length),M=this.findFirstSnapIndex(F),N=this.findFirstSnapIndex(L),B=typeof M=="number"&&!this.viewItems[M].visible,P=typeof N=="number"&&!this.viewItems[N].visible;B&&m[y]&&(E>0||this.startSnappingEnabled)?T.state=1:P&&h[y]&&(E<this.contentSize||this.endSnappingEnabled)?T.state=2:T.state=0}else O&&!x?T.state=1:!O&&x?T.state=2:T.state=3}}getSashPosition(n){let h=0;for(let g=0;g<this.sashItems.length;g++)if(h+=this.viewItems[g].size,this.sashItems[g].sash===n)return h;return 0}findFirstSnapIndex(n){for(const h of n){const g=this.viewItems[h];if(!!g.visible&&g.snap)return h}for(const h of n){const g=this.viewItems[h];if(g.visible&&g.maximumSize-g.minimumSize>0)return;if(!g.visible&&g.snap)return h}}dispose(){super.dispose(),(0,I.dispose)(this.viewItems),this.viewItems=[],this.sashItems.forEach(n=>n.disposable.dispose()),this.sashItems=[]}}e.SplitView=u}),define(ne[999],re([1,0,10,209,6,2]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CenteredViewLayout=void 0;const k={leftMarginRatio:.1909,rightMarginRatio:.1909};function D(v){const C=(0,t.$)(".centered-layout-margin");return C.style.height="100%",v&&(C.style.backgroundColor=v.toString()),{element:C,layout:()=>{},minimumSize:60,maximumSize:Number.POSITIVE_INFINITY,onDidChange:_.Event.None}}function I(v,C){return{element:v.element,get maximumSize(){return v.maximumWidth},get minimumSize(){return v.minimumWidth},onDidChange:_.Event.map(v.onDidChange,o=>o&&o.width),layout:(o,c,i)=>v.layout(o,C(),i?.top??0,(i?.left??0)+c)}}class w{constructor(C,o,c={leftMarginRatio:k.leftMarginRatio,rightMarginRatio:k.rightMarginRatio}){this.container=C,this.view=o,this.state=c,this.width=0,this.height=0,this.didLayout=!1,this.splitViewDisposables=new A.DisposableStore,this._boundarySashes={},this.container.appendChild(this.view.element),this.container.style.overflow="hidden"}get minimumWidth(){return this.splitView?this.splitView.minimumSize:this.view.minimumWidth}get maximumWidth(){return this.splitView?this.splitView.maximumSize:this.view.maximumWidth}get minimumHeight(){return this.view.minimumHeight}get maximumHeight(){return this.view.maximumHeight}get onDidChange(){return this.view.onDidChange}get boundarySashes(){return this._boundarySashes}set boundarySashes(C){this._boundarySashes=C,!!this.splitView&&(this.splitView.orthogonalStartSash=C.top,this.splitView.orthogonalEndSash=C.bottom)}layout(C,o,c,i){this.width=C,this.height=o,this.splitView?(this.splitView.layout(C),this.didLayout||this.resizeMargins()):this.view.layout(C,o,c,i),this.didLayout=!0}resizeMargins(){!this.splitView||(this.splitView.resizeView(0,this.state.leftMarginRatio*this.width),this.splitView.resizeView(2,this.state.rightMarginRatio*this.width))}isActive(){return!!this.splitView}styles(C){this.style=C,this.splitView&&this.emptyViews&&(this.splitView.style(this.style),this.emptyViews[0].element.style.backgroundColor=this.style.background.toString(),this.emptyViews[1].element.style.backgroundColor=this.style.background.toString())}activate(C){if(C!==this.isActive())if(C){this.container.removeChild(this.view.element),this.splitView=new f.SplitView(this.container,{inverseAltBehavior:!0,orientation:1,styles:this.style}),this.splitView.orthogonalStartSash=this.boundarySashes.top,this.splitView.orthogonalEndSash=this.boundarySashes.bottom,this.splitViewDisposables.add(this.splitView.onDidSashChange(()=>{this.splitView&&(this.state.leftMarginRatio=this.splitView.getViewSize(0)/this.width,this.state.rightMarginRatio=this.splitView.getViewSize(2)/this.width)})),this.splitViewDisposables.add(this.splitView.onDidSashReset(()=>{this.state.leftMarginRatio=k.leftMarginRatio,this.state.rightMarginRatio=k.rightMarginRatio,this.resizeMargins()})),this.splitView.layout(this.width),this.splitView.addView(I(this.view,()=>this.height),0);const o=this.style?this.style.background:void 0;this.emptyViews=[D(o),D(o)],this.splitView.addView(this.emptyViews[0],this.state.leftMarginRatio*this.width,0),this.splitView.addView(this.emptyViews[1],this.state.rightMarginRatio*this.width,2)}else this.splitView&&this.container.removeChild(this.splitView.el),this.splitViewDisposables.clear(),this.splitView&&this.splitView.dispose(),this.splitView=void 0,this.emptyViews=void 0,this.container.appendChild(this.view.element),this.view.layout(this.width,this.height,0,0)}isDefault(C){return C.leftMarginRatio===k.leftMarginRatio&&C.rightMarginRatio===k.rightMarginRatio}dispose(){this.splitViewDisposables.dispose(),this.splitView&&(this.splitView.dispose(),this.splitView=void 0)}}e.CenteredViewLayout=w}),define(ne[669],re([1,0,10,209,15,66,6,2,195,13,281,209,666]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GridView=e.isGridBranchNode=e.orthogonal=e.Sizing=e.LayoutPriority=e.Orientation=void 0,Object.defineProperty(e,"Orientation",{enumerable:!0,get:function(){return v.Orientation}}),Object.defineProperty(e,"LayoutPriority",{enumerable:!0,get:function(){return C.LayoutPriority}}),Object.defineProperty(e,"Sizing",{enumerable:!0,get:function(){return C.Sizing}});const o={separatorBorder:A.Color.transparent};function c(g){return g===0?1:0}e.orthogonal=c;function i(g){return!!g.children}e.isGridBranchNode=i;class S{constructor(d){this.isLayoutEnabled=d}}function s(g,d){return d===1?{left:g.start,right:g.end,top:g.orthogonalStart,bottom:g.orthogonalEnd}:{top:g.start,bottom:g.end,left:g.orthogonalStart,right:g.orthogonalEnd}}function l(g,d){return d===1?{start:g.left,end:g.right,orthogonalStart:g.top,orthogonalEnd:g.bottom}:{start:g.top,end:g.bottom,orthogonalStart:g.left,orthogonalEnd:g.right}}function r(g,d){if(Math.abs(g)>d)throw new Error("Invalid index");return(0,I.rot)(g,d+1)}class p{constructor(d,m,b,E,y=0,T=0,R=!1,O){if(this.orientation=d,this.layoutController=m,this.proportionalLayout=E,this.children=[],this.absoluteOffset=0,this.absoluteOrthogonalOffset=0,this.absoluteOrthogonalSize=0,this._onDidChange=new k.Emitter,this.onDidChange=this._onDidChange.event,this._onDidScroll=new k.Emitter,this.onDidScrollDisposable=D.Disposable.None,this.onDidScroll=this._onDidScroll.event,this.childrenChangeDisposable=D.Disposable.None,this._onDidSashReset=new k.Emitter,this.onDidSashReset=this._onDidSashReset.event,this.splitviewSashResetDisposable=D.Disposable.None,this.childrenSashResetDisposable=D.Disposable.None,this._boundarySashes={},this._edgeSnapping=!1,this._styles=b,this._size=y,this._orthogonalSize=T,this.element=(0,t.$)(".monaco-grid-branch-node"),!O)this.splitview=new f.SplitView(this.element,{orientation:d,styles:b,proportionalLayout:E}),this.splitview.layout(y,{orthogonalSize:T,absoluteOffset:0,absoluteOrthogonalOffset:0,absoluteSize:y,absoluteOrthogonalSize:T});else{const F={views:O.map(M=>({view:M.node,size:M.node.size,visible:M.node instanceof a&&M.visible!==void 0?M.visible:!0})),size:this.orthogonalSize},L={proportionalLayout:E,orientation:d,styles:b};this.children=O.map(M=>M.node),this.splitview=new f.SplitView(this.element,{...L,descriptor:F}),this.children.forEach((M,N)=>{const B=N===0,P=N===this.children.length;M.boundarySashes={start:this.boundarySashes.orthogonalStart,end:this.boundarySashes.orthogonalEnd,orthogonalStart:B?this.boundarySashes.start:this.splitview.sashes[N-1],orthogonalEnd:P?this.boundarySashes.end:this.splitview.sashes[N]}})}const x=k.Event.map(this.splitview.onDidSashReset,F=>[F]);this.splitviewSashResetDisposable=x(this._onDidSashReset.fire,this._onDidSashReset),this.updateChildrenEvents()}get size(){return this._size}get orthogonalSize(){return this._orthogonalSize}get styles(){return this._styles}get width(){return this.orientation===1?this.size:this.orthogonalSize}get height(){return this.orientation===1?this.orthogonalSize:this.size}get top(){return this.orientation===1?this.absoluteOffset:this.absoluteOrthogonalOffset}get left(){return this.orientation===1?this.absoluteOrthogonalOffset:this.absoluteOffset}get minimumSize(){return this.children.length===0?0:Math.max(...this.children.map(d=>d.minimumOrthogonalSize))}get maximumSize(){return Math.min(...this.children.map(d=>d.maximumOrthogonalSize))}get priority(){if(this.children.length===0)return 0;const d=this.children.map(m=>typeof m.priority=="undefined"?0:m.priority);return d.some(m=>m===2)?2:d.some(m=>m===1)?1:0}get minimumOrthogonalSize(){return this.splitview.minimumSize}get maximumOrthogonalSize(){return this.splitview.maximumSize}get minimumWidth(){return this.orientation===1?this.minimumOrthogonalSize:this.minimumSize}get minimumHeight(){return this.orientation===1?this.minimumSize:this.minimumOrthogonalSize}get maximumWidth(){return this.orientation===1?this.maximumOrthogonalSize:this.maximumSize}get maximumHeight(){return this.orientation===1?this.maximumSize:this.maximumOrthogonalSize}get boundarySashes(){return this._boundarySashes}set boundarySashes(d){this._boundarySashes=d,this.splitview.orthogonalStartSash=d.orthogonalStart,this.splitview.orthogonalEndSash=d.orthogonalEnd;for(let m=0;m<this.children.length;m++){const b=this.children[m],E=m===0,y=m===this.children.length-1;b.boundarySashes={start:d.orthogonalStart,end:d.orthogonalEnd,orthogonalStart:E?d.start:b.boundarySashes.orthogonalStart,orthogonalEnd:y?d.end:b.boundarySashes.orthogonalEnd}}}get edgeSnapping(){return this._edgeSnapping}set edgeSnapping(d){if(this._edgeSnapping!==d){this._edgeSnapping=d;for(const m of this.children)m instanceof p&&(m.edgeSnapping=d);this.updateSplitviewEdgeSnappingEnablement()}}style(d){this._styles=d,this.splitview.style(d);for(const m of this.children)m instanceof p&&m.style(d)}layout(d,m,b){if(!!this.layoutController.isLayoutEnabled){if(typeof b=="undefined")throw new Error("Invalid state");this._size=b.orthogonalSize,this._orthogonalSize=d,this.absoluteOffset=b.absoluteOffset+m,this.absoluteOrthogonalOffset=b.absoluteOrthogonalOffset,this.absoluteOrthogonalSize=b.absoluteOrthogonalSize,this.splitview.layout(b.orthogonalSize,{orthogonalSize:d,absoluteOffset:this.absoluteOrthogonalOffset,absoluteOrthogonalOffset:this.absoluteOffset,absoluteSize:b.absoluteOrthogonalSize,absoluteOrthogonalSize:b.absoluteSize}),this.updateSplitviewEdgeSnappingEnablement()}}setVisible(d){for(const m of this.children)m.setVisible(d)}addChild(d,m,b,E){b=r(b,this.children.length),this.splitview.addView(d,m,b,E),this._addChild(d,b),this.onDidChildrenChange()}_addChild(d,m){const b=m===0,E=m===this.children.length;this.children.splice(m,0,d),d.boundarySashes={start:this.boundarySashes.orthogonalStart,end:this.boundarySashes.orthogonalEnd,orthogonalStart:b?this.boundarySashes.start:this.splitview.sashes[m-1],orthogonalEnd:E?this.boundarySashes.end:this.splitview.sashes[m]},b||(this.children[m-1].boundarySashes={...this.children[m-1].boundarySashes,orthogonalEnd:this.splitview.sashes[m-1]}),E||(this.children[m+1].boundarySashes={...this.children[m+1].boundarySashes,orthogonalStart:this.splitview.sashes[m]})}removeChild(d,m){d=r(d,this.children.length),this.splitview.removeView(d,m),this._removeChild(d),this.onDidChildrenChange()}_removeChild(d){const m=d===0,b=d===this.children.length-1,[E]=this.children.splice(d,1);return m||(this.children[d-1].boundarySashes={...this.children[d-1].boundarySashes,orthogonalEnd:this.splitview.sashes[d-1]}),b||(this.children[d].boundarySashes={...this.children[d].boundarySashes,orthogonalStart:this.splitview.sashes[Math.max(d-1,0)]}),E}moveChild(d,m){if(d=r(d,this.children.length),m=r(m,this.children.length),d===m)return;d<m&&m--,this.splitview.moveView(d,m);const b=this._removeChild(d);this._addChild(b,m),this.onDidChildrenChange()}swapChildren(d,m){d=r(d,this.children.length),m=r(m,this.children.length),d!==m&&(this.splitview.swapViews(d,m),[this.children[d].boundarySashes,this.children[m].boundarySashes]=[this.children[d].boundarySashes,this.children[m].boundarySashes],[this.children[d],this.children[m]]=[this.children[m],this.children[d]],this.onDidChildrenChange())}resizeChild(d,m){d=r(d,this.children.length),this.splitview.resizeView(d,m)}distributeViewSizes(d=!1){if(this.splitview.distributeViewSizes(),d)for(const m of this.children)m instanceof p&&m.distributeViewSizes(!0)}getChildSize(d){return d=r(d,this.children.length),this.splitview.getViewSize(d)}isChildVisible(d){return d=r(d,this.children.length),this.splitview.isViewVisible(d)}setChildVisible(d,m){d=r(d,this.children.length),this.splitview.isViewVisible(d)!==m&&this.splitview.setViewVisible(d,m)}getChildCachedVisibleSize(d){return d=r(d,this.children.length),this.splitview.getViewCachedVisibleSize(d)}onDidChildrenChange(){this.updateChildrenEvents(),this._onDidChange.fire(void 0)}updateChildrenEvents(){const d=k.Event.map(k.Event.any(...this.children.map(E=>E.onDidChange)),()=>{});this.childrenChangeDisposable.dispose(),this.childrenChangeDisposable=d(this._onDidChange.fire,this._onDidChange);const m=k.Event.any(...this.children.map((E,y)=>k.Event.map(E.onDidSashReset,T=>[y,...T])));this.childrenSashResetDisposable.dispose(),this.childrenSashResetDisposable=m(this._onDidSashReset.fire,this._onDidSashReset);const b=k.Event.any(k.Event.signal(this.splitview.onDidScroll),...this.children.map(E=>E.onDidScroll));this.onDidScrollDisposable.dispose(),this.onDidScrollDisposable=b(this._onDidScroll.fire,this._onDidScroll)}trySet2x2(d){if(this.children.length!==2||d.children.length!==2||this.getChildSize(0)!==d.getChildSize(0))return D.Disposable.None;const[m,b]=this.children,[E,y]=d.children;if(!(m instanceof a)||!(b instanceof a)||!(E instanceof a)||!(y instanceof a))return D.Disposable.None;this.orientation===0?(b.linkedWidthNode=E.linkedHeightNode=m,m.linkedWidthNode=y.linkedHeightNode=b,y.linkedWidthNode=m.linkedHeightNode=E,E.linkedWidthNode=b.linkedHeightNode=y):(E.linkedWidthNode=b.linkedHeightNode=m,y.linkedWidthNode=m.linkedHeightNode=b,m.linkedWidthNode=y.linkedHeightNode=E,b.linkedWidthNode=E.linkedHeightNode=y);const T=this.splitview.sashes[0],R=d.splitview.sashes[0];return T.linkedSash=R,R.linkedSash=T,this._onDidChange.fire(void 0),d._onDidChange.fire(void 0),(0,D.toDisposable)(()=>{T.linkedSash=R.linkedSash=void 0,m.linkedHeightNode=m.linkedWidthNode=void 0,b.linkedHeightNode=b.linkedWidthNode=void 0,E.linkedHeightNode=E.linkedWidthNode=void 0,y.linkedHeightNode=y.linkedWidthNode=void 0})}updateSplitviewEdgeSnappingEnablement(){this.splitview.startSnappingEnabled=this._edgeSnapping||this.absoluteOrthogonalOffset>0,this.splitview.endSnappingEnabled=this._edgeSnapping||this.absoluteOrthogonalOffset+this._size<this.absoluteOrthogonalSize}dispose(){for(const d of this.children)d.dispose();this._onDidChange.dispose(),this._onDidSashReset.dispose(),this.splitviewSashResetDisposable.dispose(),this.childrenSashResetDisposable.dispose(),this.childrenChangeDisposable.dispose(),this.splitview.dispose()}}function u(g){const[d,m]=k.Event.split(g.onDidChange,w.isUndefined);return k.Event.any(m,k.Event.map(k.Event.latch(k.Event.map(d,b=>[g.minimumWidth,g.maximumWidth,g.minimumHeight,g.maximumHeight]),_.equals),b=>{}))}class a{constructor(d,m,b,E,y=0){this.view=d,this.orientation=m,this.layoutController=b,this._size=0,this.absoluteOffset=0,this.absoluteOrthogonalOffset=0,this.onDidScroll=k.Event.None,this.onDidSashReset=k.Event.None,this._onDidLinkedWidthNodeChange=new k.Relay,this._linkedWidthNode=void 0,this._onDidLinkedHeightNodeChange=new k.Relay,this._linkedHeightNode=void 0,this._onDidSetLinkedNode=new k.Emitter,this.disposables=new D.DisposableStore,this._boundarySashes={},this.cachedWidth=0,this.cachedHeight=0,this.cachedTop=0,this.cachedLeft=0,this._orthogonalSize=E,this._size=y;const T=u(d);this._onDidViewChange=k.Event.map(T,R=>R&&(this.orientation===0?R.width:R.height),this.disposables),this.onDidChange=k.Event.any(this._onDidViewChange,this._onDidSetLinkedNode.event,this._onDidLinkedWidthNodeChange.event,this._onDidLinkedHeightNodeChange.event)}get size(){return this._size}get orthogonalSize(){return this._orthogonalSize}get linkedWidthNode(){return this._linkedWidthNode}set linkedWidthNode(d){this._onDidLinkedWidthNodeChange.input=d?d._onDidViewChange:k.Event.None,this._linkedWidthNode=d,this._onDidSetLinkedNode.fire(void 0)}get linkedHeightNode(){return this._linkedHeightNode}set linkedHeightNode(d){this._onDidLinkedHeightNodeChange.input=d?d._onDidViewChange:k.Event.None,this._linkedHeightNode=d,this._onDidSetLinkedNode.fire(void 0)}get width(){return this.orientation===1?this.orthogonalSize:this.size}get height(){return this.orientation===1?this.size:this.orthogonalSize}get top(){return this.orientation===1?this.absoluteOffset:this.absoluteOrthogonalOffset}get left(){return this.orientation===1?this.absoluteOrthogonalOffset:this.absoluteOffset}get element(){return this.view.element}get minimumWidth(){return this.linkedWidthNode?Math.max(this.linkedWidthNode.view.minimumWidth,this.view.minimumWidth):this.view.minimumWidth}get maximumWidth(){return this.linkedWidthNode?Math.min(this.linkedWidthNode.view.maximumWidth,this.view.maximumWidth):this.view.maximumWidth}get minimumHeight(){return this.linkedHeightNode?Math.max(this.linkedHeightNode.view.minimumHeight,this.view.minimumHeight):this.view.minimumHeight}get maximumHeight(){return this.linkedHeightNode?Math.min(this.linkedHeightNode.view.maximumHeight,this.view.maximumHeight):this.view.maximumHeight}get minimumSize(){return this.orientation===1?this.minimumHeight:this.minimumWidth}get maximumSize(){return this.orientation===1?this.maximumHeight:this.maximumWidth}get priority(){return this.view.priority}get snap(){return this.view.snap}get minimumOrthogonalSize(){return this.orientation===1?this.minimumWidth:this.minimumHeight}get maximumOrthogonalSize(){return this.orientation===1?this.maximumWidth:this.maximumHeight}get boundarySashes(){return this._boundarySashes}set boundarySashes(d){this._boundarySashes=d,this.view.setBoundarySashes&&this.view.setBoundarySashes(s(d,this.orientation))}layout(d,m,b){if(!!this.layoutController.isLayoutEnabled){if(typeof b=="undefined")throw new Error("Invalid state");this._size=d,this._orthogonalSize=b.orthogonalSize,this.absoluteOffset=b.absoluteOffset+m,this.absoluteOrthogonalOffset=b.absoluteOrthogonalOffset,this._layout(this.width,this.height,this.top,this.left)}}_layout(d,m,b,E){this.cachedWidth===d&&this.cachedHeight===m&&this.cachedTop===b&&this.cachedLeft===E||(this.cachedWidth=d,this.cachedHeight=m,this.cachedTop=b,this.cachedLeft=E,this.view.layout(d,m,b,E))}setVisible(d){this.view.setVisible&&this.view.setVisible(d)}dispose(){this.disposables.dispose()}}function n(g,d,m){if(g instanceof p){const b=new p(c(g.orientation),g.layoutController,g.styles,g.proportionalLayout,d,m,g.edgeSnapping);let E=0;for(let y=g.children.length-1;y>=0;y--){const T=g.children[y],R=T instanceof p?T.orthogonalSize:T.size;let O=g.size===0?0:Math.round(d*R/g.size);E+=O,y===0&&(O+=d-E),b.addChild(n(T,m,O),O,0,!0)}return b}else return new a(g.view,c(g.orientation),g.layoutController,m)}class h{constructor(d={}){this.onDidSashResetRelay=new k.Relay,this._onDidScroll=new k.Relay,this._onDidChange=new k.Relay,this._boundarySashes={},this.disposable2x2=D.Disposable.None,this.onDidSashReset=this.onDidSashResetRelay.event,this.onDidScroll=this._onDidScroll.event,this.onDidChange=this._onDidChange.event,this.element=(0,t.$)(".monaco-grid-view"),this.styles=d.styles||o,this.proportionalLayout=typeof d.proportionalLayout!="undefined"?!!d.proportionalLayout:!0,this.layoutController=new S(!1),this.root=new p(0,this.layoutController,this.styles,this.proportionalLayout)}get root(){return this._root}set root(d){const m=this._root;m&&(this.element.removeChild(m.element),m.dispose()),this._root=d,this.element.appendChild(d.element),this.onDidSashResetRelay.input=d.onDidSashReset,this._onDidChange.input=k.Event.map(d.onDidChange,()=>{}),this._onDidScroll.input=d.onDidScroll}get width(){return this.root.width}get height(){return this.root.height}get minimumWidth(){return this.root.minimumWidth}get minimumHeight(){return this.root.minimumHeight}get maximumWidth(){return this.root.maximumHeight}get maximumHeight(){return this.root.maximumHeight}get orientation(){return this._root.orientation}get boundarySashes(){return this._boundarySashes}set orientation(d){if(this._root.orientation===d)return;const{size:m,orthogonalSize:b}=this._root;this.root=n(this._root,b,m),this.root.layout(m,0,{orthogonalSize:b,absoluteOffset:0,absoluteOrthogonalOffset:0,absoluteSize:m,absoluteOrthogonalSize:b}),this.boundarySashes=this.boundarySashes}set boundarySashes(d){this._boundarySashes=d,this.root.boundarySashes=l(d,this.orientation)}set edgeSnapping(d){this.root.edgeSnapping=d}style(d){this.styles=d,this.root.style(d)}layout(d,m,b=0,E=0){this.layoutController.isLayoutEnabled=!0;const[y,T,R,O]=this.root.orientation===1?[m,d,b,E]:[d,m,E,b];this.root.layout(y,R,{orthogonalSize:T,absoluteOffset:R,absoluteOrthogonalOffset:O,absoluteSize:y,absoluteOrthogonalSize:T})}addView(d,m,b){this.disposable2x2.dispose(),this.disposable2x2=D.Disposable.None;const[E,y]=(0,_.tail2)(b),[T,R]=this.getNode(E);if(R instanceof p){const O=new a(d,c(R.orientation),this.layoutController,R.orthogonalSize);R.addChild(O,m,y)}else{const[,O]=(0,_.tail2)(T),[,x]=(0,_.tail2)(E);let F=0;const L=O.getChildCachedVisibleSize(x);typeof L=="number"&&(F=f.Sizing.Invisible(L)),O.removeChild(x);const M=new p(R.orientation,R.layoutController,this.styles,this.proportionalLayout,R.size,R.orthogonalSize,O.edgeSnapping);O.addChild(M,R.size,x);const N=new a(R.view,O.orientation,this.layoutController,R.size);M.addChild(N,F,0),typeof m!="number"&&m.type==="split"&&(m=f.Sizing.Split(0));const B=new a(d,O.orientation,this.layoutController,R.size);M.addChild(B,m,y)}this.trySet2x2()}removeView(d,m){this.disposable2x2.dispose(),this.disposable2x2=D.Disposable.None;const[b,E]=(0,_.tail2)(d),[y,T]=this.getNode(b);if(!(T instanceof p))throw new Error("Invalid location");const R=T.children[E];if(!(R instanceof a))throw new Error("Invalid location");if(T.removeChild(E,m),T.children.length===0)throw new Error("Invalid grid state");if(T.children.length>1)return this.trySet2x2(),R.view;if(y.length===0){const N=T.children[0];return N instanceof a||(T.removeChild(0),this.root=N,this.boundarySashes=this.boundarySashes,this.trySet2x2()),R.view}const[,O]=(0,_.tail2)(y),[,x]=(0,_.tail2)(b),F=T.children[0],L=T.isChildVisible(0);T.removeChild(0);const M=O.children.map((N,B)=>O.getChildSize(B));if(O.removeChild(x,m),F instanceof p){M.splice(x,1,...F.children.map(N=>N.size));for(let N=0;N<F.children.length;N++){const B=F.children[N];O.addChild(B,B.size,x+N)}}else{const N=new a(F.view,c(F.orientation),this.layoutController,F.size),B=L?F.orthogonalSize:f.Sizing.Invisible(F.orthogonalSize);O.addChild(N,B,x)}for(let N=0;N<M.length;N++)O.resizeChild(N,M[N]);return this.trySet2x2(),R.view}moveView(d,m,b){const[,E]=this.getNode(d);if(!(E instanceof p))throw new Error("Invalid location");E.moveChild(m,b),this.trySet2x2()}swapViews(d,m){const[b,E]=(0,_.tail2)(d),[,y]=this.getNode(b);if(!(y instanceof p))throw new Error("Invalid from location");const T=y.getChildSize(E),R=y.children[E];if(!(R instanceof a))throw new Error("Invalid from location");const[O,x]=(0,_.tail2)(m),[,F]=this.getNode(O);if(!(F instanceof p))throw new Error("Invalid to location");const L=F.getChildSize(x),M=F.children[x];if(!(M instanceof a))throw new Error("Invalid to location");y===F?y.swapChildren(E,x):(y.removeChild(E),F.removeChild(x),y.addChild(M,T,E),F.addChild(R,L,x)),this.trySet2x2()}resizeView(d,m){const[b,E]=(0,_.tail2)(d),[y,T]=this.getNode(b);if(!(T instanceof p))throw new Error("Invalid location");if(!m.width&&!m.height)return;const[R,O]=T.orientation===1?[m.width,m.height]:[m.height,m.width];if(typeof O=="number"&&y.length>0){const[,x]=(0,_.tail2)(y),[,F]=(0,_.tail2)(b);x.resizeChild(F,O)}typeof R=="number"&&T.resizeChild(E,R),this.trySet2x2()}getViewSize(d){if(!d)return{width:this.root.width,height:this.root.height};const[,m]=this.getNode(d);return{width:m.width,height:m.height}}getViewCachedVisibleSize(d){const[m,b]=(0,_.tail2)(d),[,E]=this.getNode(m);if(!(E instanceof p))throw new Error("Invalid location");return E.getChildCachedVisibleSize(b)}maximizeViewSize(d){const[m,b]=this.getNode(d);if(!(b instanceof a))throw new Error("Invalid location");for(let E=0;E<m.length;E++)m[E].resizeChild(d[E],Number.POSITIVE_INFINITY)}distributeViewSizes(d){if(!d){this.root.distributeViewSizes(!0);return}const[,m]=this.getNode(d);if(!(m instanceof p))throw new Error("Invalid location");m.distributeViewSizes(),this.trySet2x2()}isViewVisible(d){const[m,b]=(0,_.tail2)(d),[,E]=this.getNode(m);if(!(E instanceof p))throw new Error("Invalid from location");return E.isChildVisible(b)}setViewVisible(d,m){const[b,E]=(0,_.tail2)(d),[,y]=this.getNode(b);if(!(y instanceof p))throw new Error("Invalid from location");y.setChildVisible(E,m)}getView(d){const m=d?this.getNode(d)[1]:this._root;return this._getViews(m,this.orientation)}static deserialize(d,m,b={}){if(typeof d.orientation!="number")throw new Error("Invalid JSON: 'orientation' property must be a number.");if(typeof d.width!="number")throw new Error("Invalid JSON: 'width' property must be a number.");if(typeof d.height!="number")throw new Error("Invalid JSON: 'height' property must be a number.");if(d.root?.type!=="branch")throw new Error("Invalid JSON: 'root' property must have 'type' value of branch.");const E=d.orientation,y=d.height,T=new h(b);return T._deserialize(d.root,E,m,y),T}_deserialize(d,m,b,E){this.root=this._deserializeNode(d,m,b,E)}_deserializeNode(d,m,b,E){let y;if(d.type==="branch"){const R=d.data.map(O=>({node:this._deserializeNode(O,c(m),b,d.size),visible:O.visible}));y=new p(m,this.layoutController,this.styles,this.proportionalLayout,d.size,E,void 0,R)}else y=new a(b.fromJSON(d.data),m,this.layoutController,E,d.size);return y}_getViews(d,m,b){const E={top:d.top,left:d.left,width:d.width,height:d.height};if(d instanceof a)return{view:d.view,box:E,cachedVisibleSize:b};const y=[];for(let T=0;T<d.children.length;T++){const R=d.children[T],O=d.getChildCachedVisibleSize(T);y.push(this._getViews(R,c(m),O))}return{children:y,box:E}}getNode(d,m=this.root,b=[]){if(d.length===0)return[b,m];if(!(m instanceof p))throw new Error("Invalid location");const[E,...y]=d;if(E<0||E>=m.children.length)throw new Error("Invalid location");const T=m.children[E];return b.push(m),this.getNode(y,T,b)}trySet2x2(){if(this.disposable2x2.dispose(),this.disposable2x2=D.Disposable.None,this.root.children.length!==2)return;const[d,m]=this.root.children;!(d instanceof p)||!(m instanceof p)||(this.disposable2x2=d.trySet2x2(m))}getViewMap(d,m){m||(m=this.root),m instanceof p?m.children.forEach(b=>this.getViewMap(d,b)):d.set(m.view,m.element)}dispose(){this.onDidSashResetRelay.dispose(),this.root.dispose(),this.element&&this.element.parentElement&&this.element.parentElement.removeChild(this.element)}}e.GridView=h}),define(ne[670],re([1,0,15,2,669,669,666]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createSerializedGrid=e.sanitizeGridNodeDescriptor=e.SerializableGrid=e.Grid=e.Sizing=e.getRelativeLocation=e.isGridBranchNode=e.Direction=e.orthogonal=e.Orientation=e.LayoutPriority=void 0,Object.defineProperty(e,"LayoutPriority",{enumerable:!0,get:function(){return A.LayoutPriority}}),Object.defineProperty(e,"Orientation",{enumerable:!0,get:function(){return A.Orientation}}),Object.defineProperty(e,"orthogonal",{enumerable:!0,get:function(){return A.orthogonal}});var k;(function(d){d[d.Up=0]="Up",d[d.Down=1]="Down",d[d.Left=2]="Left",d[d.Right=3]="Right"})(k=e.Direction||(e.Direction={}));function D(d){switch(d){case 0:return 1;case 1:return 0;case 2:return 3;case 3:return 2}}function I(d){return!!d.children}e.isGridBranchNode=I;function w(d,m){if(m.length===0)return d;if(!I(d))throw new Error("Invalid location");const[b,...E]=m;return w(d.children[b],E)}function v(d,m){return!(d.start>=m.end||m.start>=d.end)}function C(d,m){const b=i(m),E=m===0?d.top:m===3?d.left+d.width:m===1?d.top+d.height:d.left,y={start:b===1?d.top:d.left,end:b===1?d.top+d.height:d.left+d.width};return{offset:E,range:y}}function o(d,m,b){const E=[];function y(T,R,O){if(I(T))for(const x of T.children)y(x,R,O);else{const{offset:x,range:F}=C(T.box,R);x===O.offset&&v(F,O.range)&&E.push(T)}}return y(d,m,b),E}function c(d,m){return m.length%2==0?(0,_.orthogonal)(d):d}function i(d){return d===0||d===1?0:1}function S(d,m,b){const E=c(d,m),y=i(b);if(E===y){let[T,R]=(0,t.tail2)(m);return(b===3||b===1)&&(R+=1),[...T,R]}else{const T=b===3||b===1?1:0;return[...m,T]}}e.getRelativeLocation=S;function s(d){const m=d.parentElement;if(!m)throw new Error("Invalid grid element");let b=m.firstElementChild,E=0;for(;b!==d&&b!==m.lastElementChild&&b;)b=b.nextElementSibling,E++;return E}function l(d){const m=d.parentElement;if(!m)throw new Error("Invalid grid element");if(/\bmonaco-grid-view\b/.test(m.className))return[];const b=s(m),E=m.parentElement.parentElement.parentElement.parentElement;return[...l(E),b]}var r;(function(d){d.Distribute={type:"distribute"},d.Split={type:"split"};function m(b){return{type:"invisible",cachedVisibleSize:b}}d.Invisible=m})(r=e.Sizing||(e.Sizing={}));class p extends f.Disposable{constructor(m,b={}){super();this.views=new Map,this.didLayout=!1,m instanceof _.GridView?(this.gridview=m,this.gridview.getViewMap(this.views)):this.gridview=new _.GridView(b),this._register(this.gridview),this._register(this.gridview.onDidSashReset(this.onDidSashReset,this)),m instanceof _.GridView||this._addView(m,0,[0]),this.onDidChange=this.gridview.onDidChange,this.onDidScroll=this.gridview.onDidScroll}get orientation(){return this.gridview.orientation}set orientation(m){this.gridview.orientation=m}get width(){return this.gridview.width}get height(){return this.gridview.height}get minimumWidth(){return this.gridview.minimumWidth}get minimumHeight(){return this.gridview.minimumHeight}get maximumWidth(){return this.gridview.maximumWidth}get maximumHeight(){return this.gridview.maximumHeight}get boundarySashes(){return this.gridview.boundarySashes}set boundarySashes(m){this.gridview.boundarySashes=m}set edgeSnapping(m){this.gridview.edgeSnapping=m}get element(){return this.gridview.element}style(m){this.gridview.style(m)}layout(m,b,E=0,y=0){this.gridview.layout(m,b,E,y),this.didLayout=!0}addView(m,b,E,y){if(this.views.has(m))throw new Error("Can't add same view twice");const T=i(y);this.views.size===1&&this.orientation!==T&&(this.orientation=T);const R=this.getViewLocation(E),O=S(this.gridview.orientation,R,y);let x;if(typeof b=="number")x=b;else if(b.type==="split"){const[,F]=(0,t.tail2)(R);x=_.Sizing.Split(F)}else b.type==="distribute"?x=_.Sizing.Distribute:x=b;this._addView(m,x,O)}addViewAt(m,b,E){if(this.views.has(m))throw new Error("Can't add same view twice");let y;typeof b=="number"?y=b:b.type==="distribute"?y=_.Sizing.Distribute:y=b,this._addView(m,y,E)}_addView(m,b,E){this.views.set(m,m.element),this.gridview.addView(m,b,E)}removeView(m,b){if(this.views.size===1)throw new Error("Can't remove last view");const E=this.getViewLocation(m);this.gridview.removeView(E,b&&b.type==="distribute"?_.Sizing.Distribute:void 0),this.views.delete(m)}moveView(m,b,E,y){const T=this.getViewLocation(m),[R,O]=(0,t.tail2)(T),x=this.getViewLocation(E),F=S(this.gridview.orientation,x,y),[L,M]=(0,t.tail2)(F);(0,t.equals)(R,L)?this.gridview.moveView(R,O,M):(this.removeView(m,typeof b=="number"?void 0:b),this.addView(m,b,E,y))}moveViewTo(m,b){const E=this.getViewLocation(m),[y,T]=(0,t.tail2)(E),[R,O]=(0,t.tail2)(b);if((0,t.equals)(y,R))this.gridview.moveView(y,T,O);else{const x=this.getViewSize(m),F=c(this.gridview.orientation,E),L=this.getViewCachedVisibleSize(m),M=typeof L=="undefined"?F===1?x.width:x.height:r.Invisible(L);this.removeView(m),this.addViewAt(m,M,b)}}swapViews(m,b){const E=this.getViewLocation(m),y=this.getViewLocation(b);return this.gridview.swapViews(E,y)}resizeView(m,b){const E=this.getViewLocation(m);return this.gridview.resizeView(E,b)}getViewSize(m){if(!m)return this.gridview.getViewSize();const b=this.getViewLocation(m);return this.gridview.getViewSize(b)}getViewCachedVisibleSize(m){const b=this.getViewLocation(m);return this.gridview.getViewCachedVisibleSize(b)}maximizeViewSize(m){const b=this.getViewLocation(m);this.gridview.maximizeViewSize(b)}distributeViewSizes(){this.gridview.distributeViewSizes()}isViewVisible(m){const b=this.getViewLocation(m);return this.gridview.isViewVisible(b)}setViewVisible(m,b){const E=this.getViewLocation(m);this.gridview.setViewVisible(E,b)}getViews(){return this.gridview.getView()}getNeighborViews(m,b,E=!1){if(!this.didLayout)throw new Error("Can't call getNeighborViews before first layout");const y=this.getViewLocation(m),T=this.getViews(),R=w(T,y);let O=C(R.box,b);return E&&(b===0&&R.box.top===0?O={offset:T.box.top+T.box.height,range:O.range}:b===3&&R.box.left+R.box.width===T.box.width?O={offset:0,range:O.range}:b===1&&R.box.top+R.box.height===T.box.height?O={offset:0,range:O.range}:b===2&&R.box.left===0&&(O={offset:T.box.left+T.box.width,range:O.range})),o(T,D(b),O).map(x=>x.view)}getViewLocation(m){const b=this.views.get(m);if(!b)throw new Error("View not found");return l(b)}onDidSashReset(m){const b=T=>{const R=this.gridview.getView(T);if(I(R))return!1;const O=c(this.orientation,T),x=O===1?R.view.preferredWidth:R.view.preferredHeight;if(typeof x!="number")return!1;const F=O===1?{width:Math.round(x)}:{height:Math.round(x)};return this.gridview.resizeView(T,F),!0};if(b(m))return;const[E,y]=(0,t.tail2)(m);b([...E,y+1])||this.gridview.distributeViewSizes(E)}}e.Grid=p;class u extends p{constructor(){super(...arguments);this.initialLayoutContext=!0}static serializeNode(m,b){const E=b===0?m.box.width:m.box.height;return I(m)?{type:"branch",data:m.children.map(y=>u.serializeNode(y,(0,_.orthogonal)(b))),size:E}:typeof m.cachedVisibleSize=="number"?{type:"leaf",data:m.view.toJSON(),size:m.cachedVisibleSize,visible:!1}:{type:"leaf",data:m.view.toJSON(),size:E}}static deserialize(m,b,E={}){if(typeof m.orientation!="number")throw new Error("Invalid JSON: 'orientation' property must be a number.");if(typeof m.width!="number")throw new Error("Invalid JSON: 'width' property must be a number.");if(typeof m.height!="number")throw new Error("Invalid JSON: 'height' property must be a number.");const y=_.GridView.deserialize(m,b,E);return new u(y,E)}serialize(){return{root:u.serializeNode(this.getViews(),this.orientation),orientation:this.orientation,width:this.width,height:this.height}}layout(m,b,E=0,y=0){super.layout(m,b,E,y),this.initialLayoutContext&&(this.initialLayoutContext=!1,this.gridview.trySet2x2())}}e.SerializableGrid=u;function a(d,m){if(!m&&d.groups&&d.groups.length<=1&&(d.groups=void 0),!d.groups)return;let b=0,E=0;for(const O of d.groups)a(O,!1),O.size&&(b+=O.size,E++);const y=E>0?b:1,T=d.groups.length-E,R=y/T;for(const O of d.groups)O.size||(O.size=R)}e.sanitizeGridNodeDescriptor=a;function n(d){return d.groups?{type:"branch",data:d.groups.map(m=>n(m)),size:d.size}:{type:"leaf",data:null,size:d.size}}function h(d,m){if(d.type==="branch"){const b=d.data.map(E=>h(E,(0,_.orthogonal)(m)));if(m===0){const E=d.size||(b.length===0?void 0:Math.max(...b.map(T=>T.width||0))),y=b.length===0?void 0:b.reduce((T,R)=>T+(R.height||0),0);return{width:E,height:y}}else{const E=b.length===0?void 0:b.reduce((T,R)=>T+(R.width||0),0),y=d.size||(b.length===0?void 0:Math.max(...b.map(T=>T.height||0)));return{width:E,height:y}}}else{const b=m===0?d.size:void 0,E=m===0?void 0:d.size;return{width:b,height:E}}}function g(d){a(d,!0);const m=n(d),{width:b,height:E}=h(m,d.orientation);return{root:m,orientation:d.orientation,width:b||1,height:E||1}}e.createSerializedGrid=g}),define(ne[1e3],re([25]),{}),define(ne[671],re([1,0,10,208,209,6,2,1e3]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Table=void 0;class D{constructor(o,c,i){this.columns=o,this.getColumnSize=i,this.templateId=D.TemplateId,this.renderedTemplates=new Set;const S=new Map(c.map(s=>[s.templateId,s]));this.renderers=[];for(const s of o){const l=S.get(s.templateId);if(!l)throw new Error(`Table cell renderer for template id ${s.templateId} not found.`);this.renderers.push(l)}}renderTemplate(o){const c=(0,t.append)(o,(0,t.$)(".monaco-table-tr")),i=[],S=[];for(let l=0;l<this.columns.length;l++){const r=this.renderers[l],p=(0,t.append)(c,(0,t.$)(".monaco-table-td",{"data-col-index":l}));p.style.width=`${this.getColumnSize(l)}px`,i.push(p),S.push(r.renderTemplate(p))}const s={container:o,cellContainers:i,cellTemplateData:S};return this.renderedTemplates.add(s),s}renderElement(o,c,i,S){for(let s=0;s<this.columns.length;s++){const r=this.columns[s].project(o);this.renderers[s].renderElement(r,c,i.cellTemplateData[s],S)}}disposeElement(o,c,i,S){for(let s=0;s<this.columns.length;s++){const l=this.renderers[s];if(l.disposeElement){const p=this.columns[s].project(o);l.disposeElement(p,c,i.cellTemplateData[s],S)}}}disposeTemplate(o){for(let c=0;c<this.columns.length;c++)this.renderers[c].disposeTemplate(o.cellTemplateData[c]);(0,t.clearNode)(o.container),this.renderedTemplates.delete(o)}layoutColumn(o,c){for(const{cellContainers:i}of this.renderedTemplates)i[o].style.width=`${c}px`}}D.TemplateId="row";function I(C){return{getHeight(o){return C.getHeight(o)},getTemplateId(){return D.TemplateId}}}class w{constructor(o,c){this.column=o,this.index=c,this._onDidLayout=new A.Emitter,this.onDidLayout=this._onDidLayout.event,this.element=(0,t.$)(".monaco-table-th",{"data-col-index":c,title:o.tooltip},o.label)}get minimumSize(){return this.column.minimumWidth??120}get maximumSize(){return this.column.maximumWidth??Number.POSITIVE_INFINITY}get onDidChange(){return this.column.onDidChangeWidthConstraints??A.Event.None}layout(o){this._onDidLayout.fire([this.index,o])}}class v{constructor(o,c,i,S,s,l){this.virtualDelegate=i,this.domId=`table_id_${++v.InstanceCount}`,this.disposables=new k.DisposableStore,this.cachedWidth=0,this.cachedHeight=0,this.domNode=(0,t.append)(c,(0,t.$)(`.monaco-table.${this.domId}`));const r=S.map((a,n)=>new w(a,n)),p={size:r.reduce((a,n)=>a+n.column.weight,0),views:r.map(a=>({size:a.column.weight,view:a}))};this.splitview=this.disposables.add(new _.SplitView(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:p})),this.splitview.el.style.height=`${i.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${i.headerRowHeight}px`;const u=new D(S,s,a=>this.splitview.getViewSize(a));this.list=this.disposables.add(new f.List(o,this.domNode,I(i),[u],l)),A.Event.any(...r.map(a=>a.onDidLayout))(([a,n])=>u.layoutColumn(a,n),null,this.disposables),this.splitview.onDidSashReset(a=>{const n=S.reduce((g,d)=>g+d.weight,0),h=S[a].weight/n*this.cachedWidth;this.splitview.resizeView(a,h)},null,this.disposables),this.styleElement=(0,t.createStyleSheet)(this.domNode),this.style({})}get onDidChangeFocus(){return this.list.onDidChangeFocus}get onDidChangeSelection(){return this.list.onDidChangeSelection}get onDidScroll(){return this.list.onDidScroll}get onMouseClick(){return this.list.onMouseClick}get onMouseDblClick(){return this.list.onMouseDblClick}get onMouseMiddleClick(){return this.list.onMouseMiddleClick}get onPointer(){return this.list.onPointer}get onMouseUp(){return this.list.onMouseUp}get onMouseDown(){return this.list.onMouseDown}get onMouseOver(){return this.list.onMouseOver}get onMouseMove(){return this.list.onMouseMove}get onMouseOut(){return this.list.onMouseOut}get onTouchStart(){return this.list.onTouchStart}get onTap(){return this.list.onTap}get onContextMenu(){return this.list.onContextMenu}get onDidFocus(){return this.list.onDidFocus}get onDidBlur(){return this.list.onDidBlur}get scrollTop(){return this.list.scrollTop}set scrollTop(o){this.list.scrollTop=o}get scrollLeft(){return this.list.scrollLeft}set scrollLeft(o){this.list.scrollLeft=o}get scrollHeight(){return this.list.scrollHeight}get renderHeight(){return this.list.renderHeight}get onDidDispose(){return this.list.onDidDispose}updateOptions(o){this.list.updateOptions(o)}splice(o,c,i=[]){this.list.splice(o,c,i)}rerender(){this.list.rerender()}row(o){return this.list.element(o)}indexOf(o){return this.list.indexOf(o)}get length(){return this.list.length}getHTMLElement(){return this.domNode}layout(o,c){o=o??(0,t.getContentHeight)(this.domNode),c=c??(0,t.getContentWidth)(this.domNode),this.cachedWidth=c,this.cachedHeight=o,this.splitview.layout(c);const i=o-this.virtualDelegate.headerRowHeight;this.list.getHTMLElement().style.height=`${i}px`,this.list.layout(i,c)}toggleKeyboardNavigation(){this.list.toggleKeyboardNavigation()}style(o){const c=[];c.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before { top: ${this.virtualDelegate.headerRowHeight+1}px; height: calc(100% - ${this.virtualDelegate.headerRowHeight}px); }`),this.styleElement.textContent=c.join(` `),this.list.style(o)}domFocus(){this.list.domFocus()}setAnchor(o){this.list.setAnchor(o)}getAnchor(){return this.list.getAnchor()}getSelectedElements(){return this.list.getSelectedElements()}setSelection(o,c){this.list.setSelection(o,c)}getSelection(){return this.list.getSelection()}setFocus(o,c){this.list.setFocus(o,c)}focusNext(o=1,c=!1,i){this.list.focusNext(o,c,i)}focusPrevious(o=1,c=!1,i){this.list.focusPrevious(o,c,i)}focusNextPage(o){return this.list.focusNextPage(o)}focusPreviousPage(o){return this.list.focusPreviousPage(o)}focusFirst(o){this.list.focusFirst(o)}focusLast(o){this.list.focusLast(o)}getFocus(){return this.list.getFocus()}getFocusedElements(){return this.list.getFocusedElements()}reveal(o,c){this.list.reveal(o,c)}dispose(){this.disposables.dispose()}}e.Table=v,v.InstanceCount=0}),define(ne[1001],re([25]),{}),define(ne[1002],re([25]),{}),define(ne[1003],re([25]),{}),define(ne[450],re([25]),{}),define(ne[672],re([1,0,10,338,450]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIconClass=void 0;const _={},A=new f.IdGenerator("quick-input-button-icon-");function k(D){if(!D)return;let I;const w=D.dark.toString();return _[w]?I=_[w]:(I=A.nextId(),t.createCSSRule(`.${I}, .hc-light .${I}`,`background-image: ${t.asCSSUrl(D.light||D.dark)}`),t.createCSSRule(`.vs-dark .${I}, .hc-black .${I}`,`background-image: ${t.asCSSUrl(D.dark)}`),_[w]=I),I}e.getIconClass=k}),define(ne[1004],re([25]),{}),define(ne[1005],re([25]),{}),define(ne[1006],re([25]),{}),define(ne[1007],re([25]),{}),define(ne[1008],re([25]),{}),define(ne[1009],re([25]),{}),define(ne[1010],re([25]),{}),define(ne[1011],re([25]),{}),define(ne[1012],re([25]),{}),define(ne[1013],re([25]),{}),define(ne[1014],re([25]),{}),define(ne[1015],re([25]),{}),define(ne[1016],re([25]),{}),define(ne[1017],re([25]),{}),define(ne[1018],re([25]),{}),define(ne[1019],re([25]),{}),define(ne[1020],re([25]),{}),define(ne[1021],re([25]),{}),define(ne[1022],re([25]),{}),define(ne[1023],re([25]),{}),define(ne[1024],re([25]),{}),define(ne[1025],re([25]),{}),define(ne[1026],re([25]),{}),define(ne[1027],re([25]),{}),define(ne[1028],re([25]),{}),define(ne[1029],re([25]),{}),define(ne[1030],re([25]),{}),define(ne[1031],re([25]),{}),define(ne[1032],re([25]),{}),define(ne[1033],re([25]),{}),define(ne[1034],re([25]),{}),define(ne[1035],re([25]),{}),define(ne[1036],re([25]),{}),define(ne[1037],re([25]),{}),define(ne[1038],re([25]),{}),define(ne[1039],re([25]),{}),define(ne[1040],re([25]),{}),define(ne[1041],re([25]),{}),define(ne[1042],re([25]),{}),define(ne[1043],re([25]),{}),define(ne[1044],re([25]),{}),define(ne[1045],re([25]),{}),define(ne[1046],re([25]),{}),define(ne[1047],re([25]),{}),define(ne[1048],re([25]),{}),define(ne[1049],re([25]),{}),define(ne[1050],re([25]),{}),define(ne[1051],re([25]),{}),define(ne[1052],re([25]),{}),define(ne[1053],re([25]),{}),define(ne[673],re([25]),{}),define(ne[1054],re([25]),{}),define(ne[1055],re([25]),{}),define(ne[1056],re([25]),{}),define(ne[1057],re([25]),{}),define(ne[1058],re([25]),{}),define(ne[1059],re([25]),{}),define(ne[1060],re([25]),{}),define(ne[1061],re([25]),{}),define(ne[1062],re([25]),{}),define(ne[1063],re([25]),{}),define(ne[674],re([25]),{}),define(ne[1064],re([25]),{}),define(ne[1065],re([25]),{}),define(ne[1066],re([25]),{}),define(ne[1067],re([25]),{}),define(ne[675],re([25]),{}),define(ne[676],re([25]),{}),define(ne[1068],re([25]),{}),define(ne[1069],re([25]),{}),define(ne[677],re([25]),{}),define(ne[1070],re([25]),{}),define(ne[1071],re([25]),{}),define(ne[1072],re([25]),{}),define(ne[1073],re([25]),{}),define(ne[1074],re([25]),{}),define(ne[1075],re([25]),{}),define(ne[1076],re([25]),{}),define(ne[1077],re([25]),{}),define(ne[1078],re([25]),{}),define(ne[678],re([25]),{}),define(ne[1079],re([25]),{}),define(ne[1080],re([25]),{}),define(ne[1081],re([25]),{}),define(ne[1082],re([25]),{}),define(ne[1083],re([25]),{}),define(ne[1084],re([25]),{}),define(ne[1085],re([25]),{}),define(ne[1086],re([25]),{}),define(ne[1087],re([25]),{}),define(ne[1088],re([25]),{}),define(ne[1089],re([25]),{}),define(ne[1090],re([25]),{}),define(ne[1091],re([25]),{}),define(ne[1092],re([25]),{}),define(ne[1093],re([25]),{}),define(ne[1094],re([25]),{}),define(ne[1095],re([25]),{}),define(ne[1096],re([25]),{}),define(ne[1097],re([25]),{}),define(ne[1098],re([25]),{}),define(ne[1099],re([25]),{}),define(ne[1100],re([25]),{}),define(ne[1101],re([25]),{}),define(ne[1102],re([25]),{}),define(ne[1103],re([25]),{}),define(ne[1104],re([25]),{}),define(ne[1105],re([25]),{}),define(ne[1106],re([25]),{}),define(ne[1107],re([25]),{}),define(ne[1108],re([25]),{}),define(ne[1109],re([25]),{}),define(ne[1110],re([25]),{}),define(ne[1111],re([25]),{}),define(ne[1112],re([25]),{}),define(ne[1113],re([25]),{}),define(ne[1114],re([25]),{}),define(ne[1115],re([25]),{}),define(ne[1116],re([25]),{}),define(ne[1117],re([25]),{}),define(ne[1118],re([25]),{}),define(ne[383],re([25]),{}),define(ne[1119],re([25]),{}),define(ne[1120],re([25]),{}),define(ne[451],re([25]),{}),define(ne[1121],re([25]),{}),define(ne[1122],re([25]),{}),define(ne[1123],re([25]),{}),define(ne[1124],re([25]),{}),define(ne[1125],re([25]),{}),define(ne[1126],re([25]),{}),define(ne[1127],re([25]),{}),define(ne[1128],re([25]),{}),define(ne[1129],re([25]),{}),define(ne[1130],re([25]),{}),define(ne[679],re([25]),{}),define(ne[1131],re([25]),{}),define(ne[1132],re([25]),{}),define(ne[1133],re([25]),{}),define(ne[1134],re([25]),{}),define(ne[1135],re([25]),{}),define(ne[1136],re([25]),{}),define(ne[680],re([1,0,2,6]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElementSizeObserver=void 0;class _ extends t.Disposable{constructor(k,D){super();this._onDidChange=this._register(new f.Emitter),this.onDidChange=this._onDidChange.event,this._referenceDomElement=k,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,D)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){!this._resizeObserver&&this._referenceDomElement&&(this._resizeObserver=new ResizeObserver(k=>{k&&k[0]&&k[0].contentRect?this.observe({width:k[0].contentRect.width,height:k[0].contentRect.height}):this.observe()}),this._resizeObserver.observe(this._referenceDomElement))}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(k){this.measureReferenceDomElement(!0,k)}measureReferenceDomElement(k,D){let I=0,w=0;D?(I=D.width,w=D.height):this._referenceDomElement&&(I=this._referenceDomElement.clientWidth,w=this._referenceDomElement.clientHeight),I=Math.max(5,I),w=Math.max(5,w),(this._width!==I||this._height!==w)&&(this._width=I,this._height=w,k&&this._onDidChange.fire())}}e.ElementSizeObserver=_}),define(ne[1137],re([1,0,143]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.migrateOptions=void 0;function f(_){const A=_.wordWrap;A===!0?_.wordWrap="on":A===!1&&(_.wordWrap="off");const k=_.lineNumbers;k===!0?_.lineNumbers="on":k===!1&&(_.lineNumbers="off"),_.autoClosingBrackets===!1&&(_.autoClosingBrackets="never",_.autoClosingQuotes="never",_.autoSurround="never"),_.cursorBlinking==="visible"&&(_.cursorBlinking="solid");const w=_.renderWhitespace;w===!0?_.renderWhitespace="boundary":w===!1&&(_.renderWhitespace="none");const v=_.renderLineHighlight;v===!0?_.renderLineHighlight="line":v===!1&&(_.renderLineHighlight="none");const C=_.acceptSuggestionOnEnter;C===!0?_.acceptSuggestionOnEnter="on":C===!1&&(_.acceptSuggestionOnEnter="off");const o=_.tabCompletion;o===!1?_.tabCompletion="off":o===!0&&(_.tabCompletion="onlySnippets");const c=_.suggest;if(c&&typeof c.filteredTypes=="object"&&c.filteredTypes){const u={};u.method="showMethods",u.function="showFunctions",u.constructor="showConstructors",u.deprecated="showDeprecated",u.field="showFields",u.variable="showVariables",u.class="showClasses",u.struct="showStructs",u.interface="showInterfaces",u.module="showModules",u.property="showProperties",u.event="showEvents",u.operator="showOperators",u.unit="showUnits",u.value="showValues",u.constant="showConstants",u.enum="showEnums",u.enumMember="showEnumMembers",u.keyword="showKeywords",u.text="showWords",u.color="showColors",u.file="showFiles",u.reference="showReferences",u.folder="showFolders",u.typeParameter="showTypeParameters",u.snippet="showSnippets",(0,t.forEach)(u,a=>{const n=c.filteredTypes[a.key];n===!1&&(c[a.value]=n)})}const i=_.hover;i===!0?_.hover={enabled:!0}:i===!1&&(_.hover={enabled:!1});const S=_.parameterHints;S===!0?_.parameterHints={enabled:!0}:S===!1&&(_.parameterHints={enabled:!1});const s=_.autoIndent;s===!0?_.autoIndent="full":s===!1&&(_.autoIndent="advanced");const l=_.matchBrackets;l===!0?_.matchBrackets="always":l===!1&&(_.matchBrackets="never");const{renderIndentGuides:r,highlightActiveIndentGuide:p}=_;_.guides||(_.guides={}),r!==void 0&&(_.guides.indentation=!!r),p!==void 0&&(_.guides.highlightActiveIndentation=!!p)}e.migrateOptions=f}),define(ne[452],re([1,0,6]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TabFocus=void 0;class f{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new t.Emitter,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(A){this._tabFocus!==A&&(this._tabFocus=A,this._onDidChangeTabFocus.fire(this._tabFocus))}}e.TabFocus=new f}),define(ne[453],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StableEditorScrollState=void 0;class t{constructor(_,A,k){this._visiblePosition=_,this._visiblePositionScrollDelta=A,this._cursorPosition=k}static capture(_){let A=null,k=0;if(_.getScrollTop()!==0){const D=_.getVisibleRanges();if(D.length>0){A=D[0].getStartPosition();const I=_.getTopForPosition(A.lineNumber,A.column);k=_.getScrollTop()-I}}return new t(A,k,_.getPosition())}restore(_){if(this._visiblePosition){const A=_.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);_.setScrollTop(A+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(_){const A=_.getPosition();if(!this._cursorPosition||!A)return;const k=_.getTopForLineNumber(A.lineNumber)-_.getTopForLineNumber(this._cursorPosition.lineNumber);_.setScrollTop(_.getScrollTop()+k)}}e.StableEditorScrollState=t}),define(ne[384],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VisibleRanges=e.HorizontalPosition=e.FloatHorizontalRange=e.HorizontalRange=e.LineVisibleRanges=e.RenderingContext=e.RestrictedRenderingContext=void 0;class t{constructor(v,C){this._restrictedRenderingContextBrand=void 0,this._viewLayout=v,this.viewportData=C,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const o=this._viewLayout.getCurrentViewport();this.scrollTop=o.top,this.scrollLeft=o.left,this.viewportWidth=o.width,this.viewportHeight=o.height}getScrolledTopFromAbsoluteTop(v){return v-this.scrollTop}getVerticalOffsetForLineNumber(v){return this._viewLayout.getVerticalOffsetForLineNumber(v)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}e.RestrictedRenderingContext=t;class f extends t{constructor(v,C,o){super(v,C);this._renderingContextBrand=void 0,this._viewLines=o}linesVisibleRangesForRange(v,C){return this._viewLines.linesVisibleRangesForRange(v,C)}visibleRangeForPosition(v){return this._viewLines.visibleRangeForPosition(v)}}e.RenderingContext=f;class _{constructor(v,C,o){this.outsideRenderedLine=v,this.lineNumber=C,this.ranges=o}}e.LineVisibleRanges=_;class A{constructor(v,C){this._horizontalRangeBrand=void 0,this.left=Math.round(v),this.width=Math.round(C)}static from(v){const C=new Array(v.length);for(let o=0,c=v.length;o<c;o++){const i=v[o];C[o]=new A(i.left,i.width)}return C}toString(){return`[${this.left},${this.width}]`}}e.HorizontalRange=A;class k{constructor(v,C){this._floatHorizontalRangeBrand=void 0,this.left=v,this.width=C}toString(){return`[${this.left},${this.width}]`}static compare(v,C){return v.left-C.left}}e.FloatHorizontalRange=k;class D{constructor(v,C){this.outsideRenderedLine=v,this.originalLeft=C,this.left=Math.round(this.originalLeft)}}e.HorizontalPosition=D;class I{constructor(v,C){this.outsideRenderedLine=v,this.ranges=C}}e.VisibleRanges=I}),define(ne[681],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewUserInputEvents=void 0;class t{constructor(_){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=_}emitKeyDown(_){this.onKeyDown&&this.onKeyDown(_)}emitKeyUp(_){this.onKeyUp&&this.onKeyUp(_)}emitContextMenu(_){this.onContextMenu&&this.onContextMenu(this._convertViewToModelMouseEvent(_))}emitMouseMove(_){this.onMouseMove&&this.onMouseMove(this._convertViewToModelMouseEvent(_))}emitMouseLeave(_){this.onMouseLeave&&this.onMouseLeave(this._convertViewToModelMouseEvent(_))}emitMouseDown(_){this.onMouseDown&&this.onMouseDown(this._convertViewToModelMouseEvent(_))}emitMouseUp(_){this.onMouseUp&&this.onMouseUp(this._convertViewToModelMouseEvent(_))}emitMouseDrag(_){this.onMouseDrag&&this.onMouseDrag(this._convertViewToModelMouseEvent(_))}emitMouseDrop(_){this.onMouseDrop&&this.onMouseDrop(this._convertViewToModelMouseEvent(_))}emitMouseDropCanceled(){this.onMouseDropCanceled&&this.onMouseDropCanceled()}emitMouseWheel(_){this.onMouseWheel&&this.onMouseWheel(_)}_convertViewToModelMouseEvent(_){return _.target?{event:_.event,target:this._convertViewToModelMouseTarget(_.target)}:_}_convertViewToModelMouseTarget(_){return t.convertViewToModelMouseTarget(_,this._coordinatesConverter)}static convertViewToModelMouseTarget(_,A){const k={..._};return k.position&&(k.position=A.convertViewPositionToModelPosition(k.position)),k.range&&(k.range=A.convertViewRangeToModelRange(k.range)),k}}e.ViewUserInputEvents=t}),define(ne[1138],re([1,0,384]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RangeUtil=void 0;class f{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(A,k){A.selectNodeContents(k)}static _readClientRects(A,k,D,I,w){const v=this._createRange();try{return v.setStart(A,k),v.setEnd(D,I),v.getClientRects()}catch{return null}finally{this._detachRange(v,w)}}static _mergeAdjacentRanges(A){if(A.length===1)return A;A.sort(t.FloatHorizontalRange.compare);const k=[];let D=0,I=A[0];for(let w=1,v=A.length;w<v;w++){const C=A[w];I.left+I.width+.9>=C.left?I.width=Math.max(I.width,C.left+C.width-I.left):(k[D++]=I,I=C)}return k[D++]=I,k}static _createHorizontalRangesFromClientRects(A,k,D){if(!A||A.length===0)return null;const I=[];for(let w=0,v=A.length;w<v;w++){const C=A[w];I[w]=new t.FloatHorizontalRange(Math.max(0,(C.left-k)/D),C.width/D)}return this._mergeAdjacentRanges(I)}static readHorizontalRanges(A,k,D,I,w,v,C,o){const c=0,i=A.children.length-1;if(c>i)return null;if(k=Math.min(i,Math.max(c,k)),I=Math.min(i,Math.max(c,I)),k===I&&D===w&&D===0&&!A.children[k].firstChild){const r=A.children[k].getClientRects();return this._createHorizontalRangesFromClientRects(r,v,C)}k!==I&&I>0&&w===0&&(I--,w=1073741824);let S=A.children[k].firstChild,s=A.children[I].firstChild;if((!S||!s)&&(!S&&D===0&&k>0&&(S=A.children[k-1].firstChild,D=1073741824),!s&&w===0&&I>0&&(s=A.children[I-1].firstChild,w=1073741824)),!S||!s)return null;D=Math.min(S.textContent.length,Math.max(0,D)),w=Math.min(s.textContent.length,Math.max(0,w));const l=this._readClientRects(S,D,s,w,o);return this._createHorizontalRangesFromClientRects(l,v,C)}}e.RangeUtil=f}),define(ne[682],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCharIndex=e.allCharCodes=e.Constants=void 0;var t;(function(_){_[_.START_CH_CODE=32]="START_CH_CODE",_[_.END_CH_CODE=126]="END_CH_CODE",_[_.UNKNOWN_CODE=65533]="UNKNOWN_CODE",_[_.CHAR_COUNT=96]="CHAR_COUNT",_[_.SAMPLED_CHAR_HEIGHT=16]="SAMPLED_CHAR_HEIGHT",_[_.SAMPLED_CHAR_WIDTH=10]="SAMPLED_CHAR_WIDTH",_[_.BASE_CHAR_HEIGHT=2]="BASE_CHAR_HEIGHT",_[_.BASE_CHAR_WIDTH=1]="BASE_CHAR_WIDTH",_[_.RGBA_CHANNELS_CNT=4]="RGBA_CHANNELS_CNT",_[_.RGBA_SAMPLED_ROW_WIDTH=3840]="RGBA_SAMPLED_ROW_WIDTH"})(t=e.Constants||(e.Constants={})),e.allCharCodes=(()=>{const _=[];for(let A=32;A<=126;A++)_.push(A);return _.push(65533),_})();const f=(_,A)=>(_-=32,_<0||_>96?A<=2?(_+96)%96:96-1:_);e.getCharIndex=f}),define(ne[1139],re([1,0,682,445]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapCharRenderer=void 0;class _{constructor(k,D){this.scale=D,this._minimapCharRendererBrand=void 0,this.charDataNormal=_.soften(k,12/15),this.charDataLight=_.soften(k,50/60)}static soften(k,D){const I=new Uint8ClampedArray(k.length);for(let w=0,v=k.length;w<v;w++)I[w]=(0,f.toUint8)(k[w]*D);return I}renderChar(k,D,I,w,v,C,o,c,i,S,s){const l=1*this.scale,r=2*this.scale,p=s?1:r;if(D+l>k.width||I+p>k.height){console.warn("bad render request outside image data");return}const u=S?this.charDataLight:this.charDataNormal,a=(0,t.getCharIndex)(w,i),n=k.width*4,h=o.r,g=o.g,d=o.b,m=v.r-h,b=v.g-g,E=v.b-d,y=Math.max(C,c),T=k.data;let R=a*l*r,O=I*n+D*4;for(let x=0;x<p;x++){let F=O;for(let L=0;L<l;L++){const M=u[R++]/255*(C/255);T[F++]=h+m*M,T[F++]=g+b*M,T[F++]=d+E*M,T[F++]=y}O+=n}}blockRenderChar(k,D,I,w,v,C,o,c){const i=1*this.scale,S=2*this.scale,s=c?1:S;if(D+i>k.width||I+s>k.height){console.warn("bad render request outside image data");return}const l=k.width*4,r=.5*(v/255),p=C.r,u=C.g,a=C.b,n=w.r-p,h=w.g-u,g=w.b-a,d=p+n*r,m=u+h*r,b=a+g*r,E=Math.max(v,o),y=k.data;let T=I*l+D*4;for(let R=0;R<s;R++){let O=T;for(let x=0;x<i;x++)y[O++]=d,y[O++]=m,y[O++]=b,y[O++]=E;T+=l}}}e.MinimapCharRenderer=_}),define(ne[1140],re([1,0,150]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.prebakedMiniMaps=void 0;const f={"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,A:10,B:11,C:12,D:13,E:14,F:15},_=A=>{const k=new Uint8ClampedArray(A.length/2);for(let D=0;D<A.length;D+=2)k[D>>1]=f[A[D]]<<4|f[A[D+1]]&15;return k};e.prebakedMiniMaps={1:(0,t.once)(()=>_("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:(0,t.once)(()=>_("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))}}),define(ne[1141],re([1,0,1139,682,1140,445]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapCharRendererFactory=void 0;class k{static create(I,w){if(this.lastCreated&&I===this.lastCreated.scale&&w===this.lastFontFamily)return this.lastCreated;let v;return _.prebakedMiniMaps[I]?v=new t.MinimapCharRenderer(_.prebakedMiniMaps[I](),I):v=k.createFromSampleData(k.createSampleData(w).data,I),this.lastFontFamily=w,this.lastCreated=v,v}static createSampleData(I){const w=document.createElement("canvas"),v=w.getContext("2d");w.style.height=`${16}px`,w.height=16,w.width=96*10,w.style.width=96*10+"px",v.fillStyle="#ffffff",v.font=`bold ${16}px ${I}`,v.textBaseline="middle";let C=0;for(const o of f.allCharCodes)v.fillText(String.fromCharCode(o),C,16/2),C+=10;return v.getImageData(0,0,96*10,16)}static createFromSampleData(I,w){const v=16*10*4*96;if(I.length!==v)throw new Error("Unexpected source in MinimapCharRenderer");const C=k._downsample(I,w);return new t.MinimapCharRenderer(C,w)}static _downsampleChar(I,w,v,C,o){const c=1*o,i=2*o;let S=C,s=0;for(let l=0;l<i;l++){const r=l/i*16,p=(l+1)/i*16;for(let u=0;u<c;u++){const a=u/c*10,n=(u+1)/c*10;let h=0,g=0;for(let m=r;m<p;m++){const b=w+Math.floor(m)*3840,E=1-(m-Math.floor(m));for(let y=a;y<n;y++){const T=1-(y-Math.floor(y)),R=b+Math.floor(y)*4,O=T*E;g+=O,h+=I[R]*I[R+3]/255*O}}const d=h/g;s=Math.max(s,d),v[S++]=(0,A.toUint8)(d)}}return s}static _downsample(I,w){const v=2*w*1*w,C=v*96,o=new Uint8ClampedArray(C);let c=0,i=0,S=0;for(let s=0;s<96;s++)S=Math.max(S,this._downsampleChar(I,i,o,c,w)),c+=v,i+=10*4;if(S>0){const s=255/S;for(let l=0;l<C;l++)o[l]*=s}return o}}e.MinimapCharRendererFactory=k}),define(ne[454],re([1,0,6]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorZoom=void 0,e.EditorZoom=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new t.Emitter,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(f){f=Math.min(Math.max(-5,f),20),this._zoomLevel!==f&&(this._zoomLevel=f,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}}),define(ne[339],re([1,0,445]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CharacterSet=e.CharacterClassifier=void 0;class f{constructor(D){const I=(0,t.toUint8)(D);this._defaultValue=I,this._asciiMap=f._createAsciiMap(I),this._map=new Map}static _createAsciiMap(D){const I=new Uint8Array(256);for(let w=0;w<256;w++)I[w]=D;return I}set(D,I){const w=(0,t.toUint8)(I);D>=0&&D<256?this._asciiMap[D]=w:this._map.set(D,w)}get(D){return D>=0&&D<256?this._asciiMap[D]:this._map.get(D)||this._defaultValue}}e.CharacterClassifier=f;var _;(function(k){k[k.False=0]="False",k[k.True=1]="True"})(_||(_={}));class A{constructor(){this._actual=new f(0)}add(D){this._actual.set(D,1)}has(D){return this._actual.get(D)===1}}e.CharacterSet=A}),define(ne[243],re([1,0,29]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorColumns=void 0;class f{static _nextVisibleColumn(A,k,D){return A===9?f.nextRenderTabStop(k,D):t.isFullWidthCharacter(A)||t.isEmojiImprecise(A)?k+2:k+1}static visibleColumnFromColumn(A,k,D){const I=Math.min(k-1,A.length),w=A.substring(0,I),v=new t.GraphemeIterator(w);let C=0;for(;!v.eol();){const o=t.getNextCodePoint(w,I,v.offset);v.nextGraphemeLength(),C=this._nextVisibleColumn(o,C,D)}return C}static toStatusbarColumn(A,k,D){const I=A.substring(0,Math.min(k-1,A.length)),w=new t.CodePointIterator(I);let v=0;for(;!w.eol();)w.nextCodePoint()===9?v=f.nextRenderTabStop(v,D):v=v+1;return v+1}static columnFromVisibleColumn(A,k,D){if(k<=0)return 1;const I=A.length,w=new t.GraphemeIterator(A);let v=0,C=1;for(;!w.eol();){const o=t.getNextCodePoint(A,I,w.offset);w.nextGraphemeLength();const c=this._nextVisibleColumn(o,v,D),i=w.offset+1;if(c>=k){const S=k-v;return c-k<S?i:C}v=c,C=i}return I+1}static nextRenderTabStop(A,k){return A+k-A%k}static nextIndentTabStop(A,k){return A+k-A%k}static prevRenderTabStop(A,k){return Math.max(0,A-1-(A-1)%k)}static prevIndentTabStop(A,k){return Math.max(0,A-1-(A-1)%k)}}e.CursorColumns=f}),define(ne[340],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.countEOL=e.StringEOL=void 0;var t;(function(_){_[_.Unknown=0]="Unknown",_[_.Invalid=3]="Invalid",_[_.LF=1]="LF",_[_.CRLF=2]="CRLF"})(t=e.StringEOL||(e.StringEOL={}));function f(_){let A=0,k=0,D=0,I=0;for(let w=0,v=_.length;w<v;w++){const C=_.charCodeAt(w);C===13?(A===0&&(k=w),A++,w+1<v&&_.charCodeAt(w+1)===10?(I|=2,w++):I|=3,D=w+1):C===10&&(I|=1,A===0&&(k=w),A++,D=w+1)}return A===0&&(k=_.length),[A,k,_.length-D,I]}e.countEOL=f}),define(ne[522],re([1,0,29]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeIndentation=void 0;function f(A,k,D){let I=0;for(let v=0;v<A.length;v++)A.charAt(v)===" "?I+=k:I++;let w="";if(!D){const v=Math.floor(I/k);I=I%k;for(let C=0;C<v;C++)w+=" "}for(let v=0;v<I;v++)w+=" ";return w}function _(A,k,D){let I=t.firstNonWhitespaceIndex(A);return I===-1&&(I=A.length),f(A.substring(0,I),k,D)+A.substring(I)}e.normalizeIndentation=_}),define(ne[49],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Position=void 0;class t{constructor(_,A){this.lineNumber=_,this.column=A}with(_=this.lineNumber,A=this.column){return _===this.lineNumber&&A===this.column?this:new t(_,A)}delta(_=0,A=0){return this.with(this.lineNumber+_,this.column+A)}equals(_){return t.equals(this,_)}static equals(_,A){return!_&&!A?!0:!!_&&!!A&&_.lineNumber===A.lineNumber&&_.column===A.column}isBefore(_){return t.isBefore(this,_)}static isBefore(_,A){return _.lineNumber<A.lineNumber?!0:A.lineNumber<_.lineNumber?!1:_.column<A.column}isBeforeOrEqual(_){return t.isBeforeOrEqual(this,_)}static isBeforeOrEqual(_,A){return _.lineNumber<A.lineNumber?!0:A.lineNumber<_.lineNumber?!1:_.column<=A.column}static compare(_,A){const k=_.lineNumber|0,D=A.lineNumber|0;if(k===D){const I=_.column|0,w=A.column|0;return I-w}return k-D}clone(){return new t(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(_){return new t(_.lineNumber,_.column)}static isIPosition(_){return _&&typeof _.lineNumber=="number"&&typeof _.column=="number"}}e.Position=t}),define(ne[20],re([1,0,49]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Range=void 0;class f{constructor(A,k,D,I){A>D||A===D&&k>I?(this.startLineNumber=D,this.startColumn=I,this.endLineNumber=A,this.endColumn=k):(this.startLineNumber=A,this.startColumn=k,this.endLineNumber=D,this.endColumn=I)}isEmpty(){return f.isEmpty(this)}static isEmpty(A){return A.startLineNumber===A.endLineNumber&&A.startColumn===A.endColumn}containsPosition(A){return f.containsPosition(this,A)}static containsPosition(A,k){return!(k.lineNumber<A.startLineNumber||k.lineNumber>A.endLineNumber||k.lineNumber===A.startLineNumber&&k.column<A.startColumn||k.lineNumber===A.endLineNumber&&k.column>A.endColumn)}static strictContainsPosition(A,k){return!(k.lineNumber<A.startLineNumber||k.lineNumber>A.endLineNumber||k.lineNumber===A.startLineNumber&&k.column<=A.startColumn||k.lineNumber===A.endLineNumber&&k.column>=A.endColumn)}containsRange(A){return f.containsRange(this,A)}static containsRange(A,k){return!(k.startLineNumber<A.startLineNumber||k.endLineNumber<A.startLineNumber||k.startLineNumber>A.endLineNumber||k.endLineNumber>A.endLineNumber||k.startLineNumber===A.startLineNumber&&k.startColumn<A.startColumn||k.endLineNumber===A.endLineNumber&&k.endColumn>A.endColumn)}strictContainsRange(A){return f.strictContainsRange(this,A)}static strictContainsRange(A,k){return!(k.startLineNumber<A.startLineNumber||k.endLineNumber<A.startLineNumber||k.startLineNumber>A.endLineNumber||k.endLineNumber>A.endLineNumber||k.startLineNumber===A.startLineNumber&&k.startColumn<=A.startColumn||k.endLineNumber===A.endLineNumber&&k.endColumn>=A.endColumn)}plusRange(A){return f.plusRange(this,A)}static plusRange(A,k){let D,I,w,v;return k.startLineNumber<A.startLineNumber?(D=k.startLineNumber,I=k.startColumn):k.startLineNumber===A.startLineNumber?(D=k.startLineNumber,I=Math.min(k.startColumn,A.startColumn)):(D=A.startLineNumber,I=A.startColumn),k.endLineNumber>A.endLineNumber?(w=k.endLineNumber,v=k.endColumn):k.endLineNumber===A.endLineNumber?(w=k.endLineNumber,v=Math.max(k.endColumn,A.endColumn)):(w=A.endLineNumber,v=A.endColumn),new f(D,I,w,v)}intersectRanges(A){return f.intersectRanges(this,A)}static intersectRanges(A,k){let D=A.startLineNumber,I=A.startColumn,w=A.endLineNumber,v=A.endColumn,C=k.startLineNumber,o=k.startColumn,c=k.endLineNumber,i=k.endColumn;return D<C?(D=C,I=o):D===C&&(I=Math.max(I,o)),w>c?(w=c,v=i):w===c&&(v=Math.min(v,i)),D>w||D===w&&I>v?null:new f(D,I,w,v)}equalsRange(A){return f.equalsRange(this,A)}static equalsRange(A,k){return!!A&&!!k&&A.startLineNumber===k.startLineNumber&&A.startColumn===k.startColumn&&A.endLineNumber===k.endLineNumber&&A.endColumn===k.endColumn}getEndPosition(){return f.getEndPosition(this)}static getEndPosition(A){return new t.Position(A.endLineNumber,A.endColumn)}getStartPosition(){return f.getStartPosition(this)}static getStartPosition(A){return new t.Position(A.startLineNumber,A.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(A,k){return new f(this.startLineNumber,this.startColumn,A,k)}setStartPosition(A,k){return new f(A,k,this.endLineNumber,this.endColumn)}collapseToStart(){return f.collapseToStart(this)}static collapseToStart(A){return new f(A.startLineNumber,A.startColumn,A.startLineNumber,A.startColumn)}static fromPositions(A,k=A){return new f(A.lineNumber,A.column,k.lineNumber,k.column)}static lift(A){return A?new f(A.startLineNumber,A.startColumn,A.endLineNumber,A.endColumn):null}static isIRange(A){return A&&typeof A.startLineNumber=="number"&&typeof A.startColumn=="number"&&typeof A.endLineNumber=="number"&&typeof A.endColumn=="number"}static areIntersectingOrTouching(A,k){return!(A.endLineNumber<k.startLineNumber||A.endLineNumber===k.startLineNumber&&A.endColumn<k.startColumn||k.endLineNumber<A.startLineNumber||k.endLineNumber===A.startLineNumber&&k.endColumn<A.startColumn)}static areIntersecting(A,k){return!(A.endLineNumber<k.startLineNumber||A.endLineNumber===k.startLineNumber&&A.endColumn<=k.startColumn||k.endLineNumber<A.startLineNumber||k.endLineNumber===A.startLineNumber&&k.endColumn<=A.startColumn)}static compareRangesUsingStarts(A,k){if(A&&k){const w=A.startLineNumber|0,v=k.startLineNumber|0;if(w===v){const C=A.startColumn|0,o=k.startColumn|0;if(C===o){const c=A.endLineNumber|0,i=k.endLineNumber|0;if(c===i){const S=A.endColumn|0,s=k.endColumn|0;return S-s}return c-i}return C-o}return w-v}return(A?1:0)-(k?1:0)}static compareRangesUsingEnds(A,k){return A.endLineNumber===k.endLineNumber?A.endColumn===k.endColumn?A.startLineNumber===k.startLineNumber?A.startColumn-k.startColumn:A.startLineNumber-k.startLineNumber:A.endColumn-k.endColumn:A.endLineNumber-k.endLineNumber}static spansMultipleLines(A){return A.endLineNumber>A.startLineNumber}toJSON(){return this}}e.Range=f}),define(ne[683],re([1,0,29,49,20]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PagedScreenReaderStrategy=e.TextAreaState=e._debugComposition=void 0,e._debugComposition=!1;class A{constructor(I,w,v,C,o){this.value=I,this.selectionStart=w,this.selectionEnd=v,this.selectionStartPosition=C,this.selectionEndPosition=o}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(I){return new A(I.getValue(),I.getSelectionStart(),I.getSelectionEnd(),null,null)}collapseSelection(){return new A(this.value,this.value.length,this.value.length,null,null)}writeToTextArea(I,w,v){e._debugComposition&&console.log(`writeToTextArea ${I}: ${this.toString()}`),w.setValue(I,this.value),v&&w.setSelectionRange(I,this.selectionStart,this.selectionEnd)}deduceEditorPosition(I){if(I<=this.selectionStart){const C=this.value.substring(I,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,C,-1)}if(I>=this.selectionEnd){const C=this.value.substring(this.selectionEnd,I);return this._finishDeduceEditorPosition(this.selectionEndPosition,C,1)}const w=this.value.substring(this.selectionStart,I);if(w.indexOf(String.fromCharCode(8230))===-1)return this._finishDeduceEditorPosition(this.selectionStartPosition,w,1);const v=this.value.substring(I,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,v,-1)}_finishDeduceEditorPosition(I,w,v){let C=0,o=-1;for(;(o=w.indexOf(` `,o+1))!==-1;)C++;return[I,v*w.length,C]}static deduceInput(I,w,v){if(!I)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};e._debugComposition&&(console.log("------------------------deduceInput"),console.log(`PREVIOUS STATE: ${I.toString()}`),console.log(`CURRENT STATE: ${w.toString()}`));const C=Math.min(t.commonPrefixLength(I.value,w.value),I.selectionStart,w.selectionStart),o=Math.min(t.commonSuffixLength(I.value,w.value),I.value.length-I.selectionEnd,w.value.length-w.selectionEnd),c=I.value.substring(C,I.value.length-o),i=w.value.substring(C,w.value.length-o),S=I.selectionStart-C,s=I.selectionEnd-C,l=w.selectionStart-C,r=w.selectionEnd-C;if(e._debugComposition&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${c}>, selectionStart: ${S}, selectionEnd: ${s}`),console.log(`AFTER DIFFING CURRENT STATE: <${i}>, selectionStart: ${l}, selectionEnd: ${r}`)),l===r){const u=I.selectionStart-C;return e._debugComposition&&console.log(`REMOVE PREVIOUS: ${u} chars`),{text:i,replacePrevCharCnt:u,replaceNextCharCnt:0,positionDelta:0}}const p=s-S;return{text:i,replacePrevCharCnt:p,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(I,w){if(!I)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(e._debugComposition&&(console.log("------------------------deduceAndroidCompositionInput"),console.log(`PREVIOUS STATE: ${I.toString()}`),console.log(`CURRENT STATE: ${w.toString()}`)),I.value===w.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:w.selectionEnd-I.selectionEnd};const v=Math.min(t.commonPrefixLength(I.value,w.value),I.selectionEnd),C=Math.min(t.commonSuffixLength(I.value,w.value),I.value.length-I.selectionEnd),o=I.value.substring(v,I.value.length-C),c=w.value.substring(v,w.value.length-C),i=I.selectionStart-v,S=I.selectionEnd-v,s=w.selectionStart-v,l=w.selectionEnd-v;return e._debugComposition&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${o}>, selectionStart: ${i}, selectionEnd: ${S}`),console.log(`AFTER DIFFING CURRENT STATE: <${c}>, selectionStart: ${s}, selectionEnd: ${l}`)),{text:c,replacePrevCharCnt:S,replaceNextCharCnt:o.length-S,positionDelta:l-c.length}}}e.TextAreaState=A,A.EMPTY=new A("",0,0,null,null);class k{static _getPageOfLine(I,w){return Math.floor((I-1)/w)}static _getRangeForPage(I,w){const v=I*w,C=v+1,o=v+w;return new _.Range(C,1,o+1,1)}static fromEditorSelection(I,w,v,C,o){const c=k._getPageOfLine(v.startLineNumber,C),i=k._getRangeForPage(c,C),S=k._getPageOfLine(v.endLineNumber,C),s=k._getRangeForPage(S,C),l=i.intersectRanges(new _.Range(1,1,v.startLineNumber,v.startColumn));let r=w.getValueInRange(l,1);const p=w.getLineCount(),u=w.getLineMaxColumn(p),a=s.intersectRanges(new _.Range(v.endLineNumber,v.endColumn,p,u));let n=w.getValueInRange(a,1),h;if(c===S||c+1===S)h=w.getValueInRange(v,1);else{const g=i.intersectRanges(v),d=s.intersectRanges(v);h=w.getValueInRange(g,1)+String.fromCharCode(8230)+w.getValueInRange(d,1)}if(o){const g=500;r.length>g&&(r=r.substring(r.length-g,r.length)),n.length>g&&(n=n.substring(0,g)),h.length>2*g&&(h=h.substring(0,g)+String.fromCharCode(8230)+h.substring(h.length-g,h.length))}return new A(r+h+n,r.length,r.length+h.length,new f.Position(v.startLineNumber,v.startColumn),new f.Position(v.endLineNumber,v.endColumn))}}e.PagedScreenReaderStrategy=k}),define(ne[684],re([1,0,515,6,2,51,20]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffNavigator=void 0;const D={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0};class I extends _.Disposable{constructor(v,C={}){super();this._onDidUpdate=this._register(new f.Emitter),this.onDidUpdate=this._onDidUpdate.event,this._editor=v,this._options=A.mixin(C,D,!1),this.disposed=!1,this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=Boolean(this._options.alwaysRevealFirst),this._register(this._editor.onDidDispose(()=>this.dispose())),this._register(this._editor.onDidUpdateDiff(()=>this._onDiffUpdated())),this._options.followsCaret&&this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition(o=>{this.ignoreSelectionChange||(this.nextIdx=-1)})),this._options.alwaysRevealFirst&&this._register(this._editor.getModifiedEditor().onDidChangeModel(o=>{this.revealFirst=!0})),this._init()}_init(){!!this._editor.getLineChanges()}_onDiffUpdated(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&this._editor.getLineChanges()!==null&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))}_compute(v){this.ranges=[],v&&v.forEach(C=>{!this._options.ignoreCharChanges&&C.charChanges?C.charChanges.forEach(o=>{this.ranges.push({rhs:!0,range:new k.Range(o.modifiedStartLineNumber,o.modifiedStartColumn,o.modifiedEndLineNumber,o.modifiedEndColumn)})}):C.modifiedEndLineNumber===0?this.ranges.push({rhs:!0,range:new k.Range(C.modifiedStartLineNumber,1,C.modifiedStartLineNumber+1,1)}):this.ranges.push({rhs:!0,range:new k.Range(C.modifiedStartLineNumber,1,C.modifiedEndLineNumber+1,1)})}),this.ranges.sort((C,o)=>k.Range.compareRangesUsingStarts(C.range,o.range)),this._onDidUpdate.fire(this)}_initIdx(v){let C=!1;const o=this._editor.getPosition();if(!o){this.nextIdx=0;return}for(let c=0,i=this.ranges.length;c<i&&!C;c++){const S=this.ranges[c].range;o.isBeforeOrEqual(S.getStartPosition())&&(this.nextIdx=c+(v?0:-1),C=!0)}C||(this.nextIdx=v?0:this.ranges.length-1),this.nextIdx<0&&(this.nextIdx=this.ranges.length-1)}_move(v,C){if(t.ok(!this.disposed,"Illegal State - diff navigator has been disposed"),!this.canNavigate())return;this.nextIdx===-1?this._initIdx(v):v?(this.nextIdx+=1,this.nextIdx>=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));const o=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{const c=o.range.getStartPosition();this._editor.setPosition(c),this._editor.revealRangeInCenter(o.range,C)}finally{this.ignoreSelectionChange=!1}}canNavigate(){return this.ranges&&this.ranges.length>0}next(v=0){this._move(!0,v)}previous(v=0){this._move(!1,v)}dispose(){super.dispose(),this.ranges=[],this.disposed=!0}}e.DiffNavigator=I}),define(ne[136],re([1,0,20]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditOperation=void 0;class f{static insert(A,k){return{range:new t.Range(A.lineNumber,A.column,A.lineNumber,A.column),text:k,forceMoveMarkers:!0}}static delete(A){return{range:A,text:null}}static replace(A,k){return{range:A,text:k}}static replaceMove(A,k){return{range:A,text:k,forceMoveMarkers:!0}}}e.EditOperation=f}),define(ne[685],re([1,0,29,136,20]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.trimTrailingWhitespace=e.TrimTrailingWhitespaceCommand=void 0;class A{constructor(I,w){this._selection=I,this._cursors=w,this._selectionId=null}getEditOperations(I,w){const v=k(I,this._cursors);for(let C=0,o=v.length;C<o;C++){const c=v[C];w.addEditOperation(c.range,c.text)}this._selectionId=w.trackSelection(this._selection)}computeCursorState(I,w){return w.getTrackedSelection(this._selectionId)}}e.TrimTrailingWhitespaceCommand=A;function k(D,I){I.sort((c,i)=>c.lineNumber===i.lineNumber?c.column-i.column:c.lineNumber-i.lineNumber);for(let c=I.length-2;c>=0;c--)I[c].lineNumber===I[c+1].lineNumber&&I.splice(c,1);const w=[];let v=0,C=0;const o=I.length;for(let c=1,i=D.getLineCount();c<=i;c++){const S=D.getLineContent(c),s=S.length+1;let l=0;if(C<o&&I[C].lineNumber===c&&(l=I[C].column,C++,l===s)||S.length===0)continue;const r=t.lastNonWhitespaceIndex(S);let p=0;if(r===-1)p=1;else if(r!==S.length-1)p=r+2;else continue;p=Math.max(l,p),w[v++]=f.EditOperation.delete(new _.Range(c,p,c,s))}return w}e.trimTrailingWhitespace=k}),define(ne[686],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RGBA8=void 0;class t{constructor(_,A,k,D){this._rgba8Brand=void 0,this.r=t._clamp(_),this.g=t._clamp(A),this.b=t._clamp(k),this.a=t._clamp(D)}equals(_){return this.r===_.r&&this.g===_.g&&this.b===_.b&&this.a===_.a}static _clamp(_){return _<0?0:_>255?255:_|0}}e.RGBA8=t,t.Empty=new t(0,0,0,0)}),define(ne[84],re([1,0,49,20]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Selection=e.SelectionDirection=void 0;var _;(function(k){k[k.LTR=0]="LTR",k[k.RTL=1]="RTL"})(_=e.SelectionDirection||(e.SelectionDirection={}));class A extends f.Range{constructor(D,I,w,v){super(D,I,w,v);this.selectionStartLineNumber=D,this.selectionStartColumn=I,this.positionLineNumber=w,this.positionColumn=v}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(D){return A.selectionsEqual(this,D)}static selectionsEqual(D,I){return D.selectionStartLineNumber===I.selectionStartLineNumber&&D.selectionStartColumn===I.selectionStartColumn&&D.positionLineNumber===I.positionLineNumber&&D.positionColumn===I.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(D,I){return this.getDirection()===0?new A(this.startLineNumber,this.startColumn,D,I):new A(D,I,this.startLineNumber,this.startColumn)}getPosition(){return new t.Position(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new t.Position(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(D,I){return this.getDirection()===0?new A(D,I,this.endLineNumber,this.endColumn):new A(this.endLineNumber,this.endColumn,D,I)}static fromPositions(D,I=D){return new A(D.lineNumber,D.column,I.lineNumber,I.column)}static fromRange(D,I){return I===0?new A(D.startLineNumber,D.startColumn,D.endLineNumber,D.endColumn):new A(D.endLineNumber,D.endColumn,D.startLineNumber,D.startColumn)}static liftSelection(D){return new A(D.selectionStartLineNumber,D.selectionStartColumn,D.positionLineNumber,D.positionColumn)}static selectionsArrEqual(D,I){if(D&&!I||!D&&I)return!1;if(!D&&!I)return!0;if(D.length!==I.length)return!1;for(let w=0,v=D.length;w<v;w++)if(!this.selectionsEqual(D[w],I[w]))return!1;return!0}static isISelection(D){return D&&typeof D.selectionStartLineNumber=="number"&&typeof D.selectionStartColumn=="number"&&typeof D.positionLineNumber=="number"&&typeof D.positionColumn=="number"}static createWithDirection(D,I,w,v,C){return C===0?new A(D,I,w,v):new A(w,v,D,I)}}e.Selection=A}),define(ne[523],re([1,0,77,10,91,11,6,2,169,29,683,84]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextAreaWrapper=e.TextAreaInput=e.InMemoryClipboardMetadataManager=e.CopyOptions=e.TextAreaSyntethicEvents=void 0;var o;(function(r){r.Tap="-monaco-textarea-synthetic-tap"})(o=e.TextAreaSyntethicEvents||(e.TextAreaSyntethicEvents={})),e.CopyOptions={forceCopyWithSyntaxHighlighting:!1};class c{constructor(){this._lastState=null}set(p,u){this._lastState={lastCopiedValue:p,data:u}}get(p){return this._lastState&&this._lastState.lastCopiedValue===p?this._lastState.data:(this._lastState=null,null)}}e.InMemoryClipboardMetadataManager=c,c.INSTANCE=new c;class i{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(p){p=p||"";const u={text:p,replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=p.length,u}}class S extends D.Disposable{constructor(p,u,a,n){super();this._host=p,this._textArea=u,this._OS=a,this._browser=n,this._onFocus=this._register(new k.Emitter),this.onFocus=this._onFocus.event,this._onBlur=this._register(new k.Emitter),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new k.Emitter),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new k.Emitter),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new k.Emitter),this.onCut=this._onCut.event,this._onPaste=this._register(new k.Emitter),this.onPaste=this._onPaste.event,this._onType=this._register(new k.Emitter),this.onType=this._onType.event,this._onCompositionStart=this._register(new k.Emitter),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new k.Emitter),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new k.Emitter),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new k.Emitter),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncTriggerCut=this._register(new A.RunOnceScheduler(()=>this._onCut.fire(),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new A.RunOnceScheduler(()=>this.writeScreenReaderContent("asyncFocusGain"),0)),this._textAreaState=v.TextAreaState.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._currentComposition=null;let h=null;this._register(this._textArea.onKeyDown(g=>{const d=new _.StandardKeyboardEvent(g);(d.keyCode===109||this._currentComposition&&d.keyCode===1)&&d.stopPropagation(),d.equals(9)&&d.preventDefault(),h=d,this._onKeyDown.fire(d)})),this._register(this._textArea.onKeyUp(g=>{const d=new _.StandardKeyboardEvent(g);this._onKeyUp.fire(d)})),this._register(this._textArea.onCompositionStart(g=>{v._debugComposition&&console.log("[compositionstart]",g);const d=new i;if(this._currentComposition){this._currentComposition=d;return}if(this._currentComposition=d,this._OS===2&&h&&h.equals(109)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===g.data&&(h.code==="ArrowRight"||h.code==="ArrowLeft")){v._debugComposition&&console.log("[compositionstart] Handling long press case on macOS + arrow key",g),d.handleCompositionUpdate("x"),this._onCompositionStart.fire({data:g.data});return}if(this._browser.isAndroid){this._onCompositionStart.fire({data:g.data});return}this._onCompositionStart.fire({data:g.data})})),this._register(this._textArea.onCompositionUpdate(g=>{v._debugComposition&&console.log("[compositionupdate]",g);const d=this._currentComposition;if(!d)return;if(this._browser.isAndroid){const b=v.TextAreaState.readFromTextArea(this._textArea),E=v.TextAreaState.deduceAndroidCompositionInput(this._textAreaState,b);this._textAreaState=b,this._onType.fire(E),this._onCompositionUpdate.fire(g);return}const m=d.handleCompositionUpdate(g.data);this._textAreaState=v.TextAreaState.readFromTextArea(this._textArea),this._onType.fire(m),this._onCompositionUpdate.fire(g)})),this._register(this._textArea.onCompositionEnd(g=>{v._debugComposition&&console.log("[compositionend]",g);const d=this._currentComposition;if(!d)return;if(this._currentComposition=null,this._browser.isAndroid){const b=v.TextAreaState.readFromTextArea(this._textArea),E=v.TextAreaState.deduceAndroidCompositionInput(this._textAreaState,b);this._textAreaState=b,this._onType.fire(E),this._onCompositionEnd.fire();return}const m=d.handleCompositionUpdate(g.data);this._textAreaState=v.TextAreaState.readFromTextArea(this._textArea),this._onType.fire(m),this._onCompositionEnd.fire()})),this._register(this._textArea.onInput(g=>{if(v._debugComposition&&console.log("[input]",g),this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;const d=v.TextAreaState.readFromTextArea(this._textArea),m=v.TextAreaState.deduceInput(this._textAreaState,d,this._OS===2);m.replacePrevCharCnt===0&&m.text.length===1&&w.isHighSurrogate(m.text.charCodeAt(0))||(this._textAreaState=d,(m.text!==""||m.replacePrevCharCnt!==0||m.replaceNextCharCnt!==0||m.positionDelta!==0)&&this._onType.fire(m))})),this._register(this._textArea.onCut(g=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(g),this._asyncTriggerCut.schedule()})),this._register(this._textArea.onCopy(g=>{this._ensureClipboardGetsEditorSelection(g)})),this._register(this._textArea.onPaste(g=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),g.preventDefault(),!g.clipboardData)return;let[d,m]=s.getTextData(g.clipboardData);!d||(m=m||c.INSTANCE.get(d),this._onPaste.fire({text:d,metadata:m}))})),this._register(this._textArea.onFocus(()=>{const g=this._hasFocus;this._setHasFocus(!0),this._browser.isSafari&&!g&&this._hasFocus&&this._asyncFocusGainWriteScreenReaderContent.schedule()})),this._register(this._textArea.onBlur(()=>{this._currentComposition&&(this._currentComposition=null,this.writeScreenReaderContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)})),this._register(this._textArea.onSyntheticTap(()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeScreenReaderContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())}))}_initializeFromTest(){this._hasFocus=!0,this._textAreaState=v.TextAreaState.readFromTextArea(this._textArea)}_installSelectionChangeListener(){let p=0;return f.addDisposableListener(document,"selectionchange",u=>{if(!this._hasFocus||this._currentComposition||!this._browser.isChrome)return;const a=Date.now(),n=a-p;if(p=a,n<5)return;const h=a-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),h<100||!this._textAreaState.selectionStartPosition||!this._textAreaState.selectionEndPosition)return;const g=this._textArea.getValue();if(this._textAreaState.value!==g)return;const d=this._textArea.getSelectionStart(),m=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===d&&this._textAreaState.selectionEnd===m)return;const b=this._textAreaState.deduceEditorPosition(d),E=this._host.deduceModelPosition(b[0],b[1],b[2]),y=this._textAreaState.deduceEditorPosition(m),T=this._host.deduceModelPosition(y[0],y[1],y[2]),R=new C.Selection(E.lineNumber,E.column,T.lineNumber,T.column);this._onSelectionChangeRequest.fire(R)})}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(p){this._hasFocus!==p&&(this._hasFocus=p,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeScreenReaderContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(p,u){this._hasFocus||(u=u.collapseSelection()),u.writeToTextArea(p,this._textArea,this._hasFocus),this._textAreaState=u}writeScreenReaderContent(p){this._currentComposition||this._setAndWriteTextAreaState(p,this._host.getScreenReaderContent(this._textAreaState))}_ensureClipboardGetsEditorSelection(p){const u=this._host.getDataToCopy(),a={version:1,isFromEmptySelection:u.isFromEmptySelection,multicursorText:u.multicursorText,mode:u.mode};c.INSTANCE.set(this._browser.isFirefox?u.text.replace(/\r\n/g,` `):u.text,a),p.preventDefault(),p.clipboardData&&s.setTextData(p.clipboardData,u.text,u.html,a)}}e.TextAreaInput=S;class s{static getTextData(p){const u=p.getData(I.Mimes.text);let a=null;const n=p.getData("vscode-editor-data");if(typeof n=="string")try{a=JSON.parse(n),a.version!==1&&(a=null)}catch{}return[u,a]}static setTextData(p,u,a,n){p.setData(I.Mimes.text,u),typeof a=="string"&&p.setData("text/html",a),p.setData("vscode-editor-data",JSON.stringify(n))}}class l extends D.Disposable{constructor(p){super();this._actual=p,this.onKeyDown=this._register(f.createEventEmitter(this._actual,"keydown")).event,this.onKeyPress=this._register(f.createEventEmitter(this._actual,"keypress")).event,this.onKeyUp=this._register(f.createEventEmitter(this._actual,"keyup")).event,this.onCompositionStart=this._register(f.createEventEmitter(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(f.createEventEmitter(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(f.createEventEmitter(this._actual,"compositionend")).event,this.onBeforeInput=this._register(f.createEventEmitter(this._actual,"beforeinput")).event,this.onInput=this._register(f.createEventEmitter(this._actual,"input")).event,this.onCut=this._register(f.createEventEmitter(this._actual,"cut")).event,this.onCopy=this._register(f.createEventEmitter(this._actual,"copy")).event,this.onPaste=this._register(f.createEventEmitter(this._actual,"paste")).event,this.onFocus=this._register(f.createEventEmitter(this._actual,"focus")).event,this.onBlur=this._register(f.createEventEmitter(this._actual,"blur")).event,this._onSyntheticTap=this._register(new k.Emitter),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(f.addDisposableListener(this._actual,o.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){const p=f.getShadowRoot(this._actual);return p?p.activeElement===this._actual:f.isInDOM(this._actual)?document.activeElement===this._actual:!1}setIgnoreSelectionChangeTime(p){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(p,u){const a=this._actual;a.value!==u&&(this.setIgnoreSelectionChangeTime("setValue"),a.value=u)}getSelectionStart(){return this._actual.selectionDirection==="backward"?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return this._actual.selectionDirection==="backward"?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(p,u,a){const n=this._actual;let h=null;const g=f.getShadowRoot(n);g?h=g.activeElement:h=document.activeElement;const d=h===n,m=n.selectionStart,b=n.selectionEnd;if(d&&m===u&&b===a){t.isFirefox&&window.parent!==window&&n.focus();return}if(d){this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(u,a),t.isFirefox&&window.parent!==window&&n.focus();return}try{const E=f.saveParentsScrollTop(n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(u,a),f.restoreParentsScrollTop(n,E)}catch{}}}e.TextAreaWrapper=l}),define(ne[341],re([1,0,84]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaceCommandThatPreservesSelection=e.ReplaceCommandWithOffsetCursorState=e.ReplaceCommandWithoutChangingPosition=e.ReplaceCommandThatSelectsText=e.ReplaceCommand=void 0;class f{constructor(w,v,C=!1){this._range=w,this._text=v,this.insertsAutoWhitespace=C}getEditOperations(w,v){v.addTrackedEditOperation(this._range,this._text)}computeCursorState(w,v){const o=v.getInverseEditOperations()[0].range;return t.Selection.fromPositions(o.getEndPosition())}}e.ReplaceCommand=f;class _{constructor(w,v){this._range=w,this._text=v}getEditOperations(w,v){v.addTrackedEditOperation(this._range,this._text)}computeCursorState(w,v){const o=v.getInverseEditOperations()[0].range;return t.Selection.fromRange(o,0)}}e.ReplaceCommandThatSelectsText=_;class A{constructor(w,v,C=!1){this._range=w,this._text=v,this.insertsAutoWhitespace=C}getEditOperations(w,v){v.addTrackedEditOperation(this._range,this._text)}computeCursorState(w,v){const o=v.getInverseEditOperations()[0].range;return t.Selection.fromPositions(o.getStartPosition())}}e.ReplaceCommandWithoutChangingPosition=A;class k{constructor(w,v,C,o,c=!1){this._range=w,this._text=v,this._columnDeltaOffset=o,this._lineNumberDeltaOffset=C,this.insertsAutoWhitespace=c}getEditOperations(w,v){v.addTrackedEditOperation(this._range,this._text)}computeCursorState(w,v){const o=v.getInverseEditOperations()[0].range;return t.Selection.fromPositions(o.getEndPosition().delta(this._lineNumberDeltaOffset,this._columnDeltaOffset))}}e.ReplaceCommandWithOffsetCursorState=k;class D{constructor(w,v,C,o=!1){this._range=w,this._text=v,this._initialSelection=C,this._forceMoveMarkers=o,this._selectionId=null}getEditOperations(w,v){v.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=v.trackSelection(this._initialSelection)}computeCursorState(w,v){return v.getTrackedSelection(this._selectionId)}}e.ReplaceCommandThatPreservesSelection=D}),define(ne[1142],re([1,0,20,84]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositionSurroundSelectionCommand=e.SurroundSelectionCommand=void 0;class _{constructor(D,I,w){this._range=D,this._charBeforeSelection=I,this._charAfterSelection=w}getEditOperations(D,I){I.addTrackedEditOperation(new t.Range(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),I.addTrackedEditOperation(new t.Range(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(D,I){const w=I.getInverseEditOperations(),v=w[0].range,C=w[1].range;return new f.Selection(v.endLineNumber,v.endColumn,C.endLineNumber,C.endColumn-this._charAfterSelection.length)}}e.SurroundSelectionCommand=_;class A{constructor(D,I,w){this._position=D,this._text=I,this._charAfter=w}getEditOperations(D,I){I.addTrackedEditOperation(new t.Range(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column),this._text+this._charAfter)}computeCursorState(D,I){const v=I.getInverseEditOperations()[0].range;return new f.Selection(v.endLineNumber,v.startColumn,v.endLineNumber,v.endColumn-this._charAfter.length)}}e.CompositionSurroundSelectionCommand=A}),define(ne[282],re([1,0,29,14,60]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodeUTF16LE=e.createStringBuilder=e.hasTextDecoder=e.getPlatformTextDecoder=void 0;let A;function k(){return A||(A=new TextDecoder("UTF-16LE")),A}let D;function I(){return D||(D=new TextDecoder("UTF-16BE")),D}let w;function v(){return w||(w=f.isLittleEndian()?k():I()),w}e.getPlatformTextDecoder=v,e.hasTextDecoder=typeof TextDecoder!="undefined",e.hasTextDecoder?(e.createStringBuilder=S=>new c(S),e.decodeUTF16LE=C):(e.createStringBuilder=S=>new i,e.decodeUTF16LE=o);function C(S,s,l){const r=new Uint16Array(S.buffer,s,l);return l>0&&(r[0]===65279||r[0]===65534)?o(S,s,l):k().decode(r)}function o(S,s,l){const r=[];let p=0;for(let u=0;u<l;u++){const a=_.readUInt16LE(S,s);s+=2,r[p++]=String.fromCharCode(a)}return r.join("")}class c{constructor(s){this._capacity=s|0,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return this._completedStrings!==null?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(this._bufferLength===0)return"";const s=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return v().decode(s)}_flushBuffer(){const s=this._buildBuffer();this._bufferLength=0,this._completedStrings===null?this._completedStrings=[s]:this._completedStrings[this._completedStrings.length]=s}write1(s){const l=this._capacity-this._bufferLength;l<=1&&(l===0||t.isHighSurrogate(s))&&this._flushBuffer(),this._buffer[this._bufferLength++]=s}appendASCII(s){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=s}appendASCIIString(s){const l=s.length;if(this._bufferLength+l>=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=s;return}for(let r=0;r<l;r++)this._buffer[this._bufferLength++]=s.charCodeAt(r)}}class i{constructor(){this._pieces=[],this._piecesLen=0}reset(){this._pieces=[],this._piecesLen=0}build(){return this._pieces.join("")}write1(s){this._pieces[this._piecesLen++]=String.fromCharCode(s)}appendASCII(s){this._pieces[this._piecesLen++]=String.fromCharCode(s)}appendASCIIString(s){this._pieces[this._piecesLen++]=s}}}),define(ne[524],re([1,0,128,282]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VisibleLinesCollection=e.RenderedLinesCollection=void 0;class _{constructor(I){this._createLine=I,this._set(1,[])}flush(){this._set(1,[])}_set(I,w){this._lines=w,this._rendLineNumberStart=I}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(I){const w=I-this._rendLineNumberStart;if(w<0||w>=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[w]}onLinesDeleted(I,w){if(this.getCount()===0)return null;const v=this.getStartLineNumber(),C=this.getEndLineNumber();if(w<v){const S=w-I+1;return this._rendLineNumberStart-=S,null}if(I>C)return null;let o=0,c=0;for(let S=v;S<=C;S++){const s=S-this._rendLineNumberStart;I<=S&&S<=w&&(c===0?(o=s,c=1):c++)}if(I<v){let S=0;w<v?S=w-I+1:S=v-I,this._rendLineNumberStart-=S}return this._lines.splice(o,c)}onLinesChanged(I,w){const v=I+w-1;if(this.getCount()===0)return!1;const C=this.getStartLineNumber(),o=this.getEndLineNumber();let c=!1;for(let i=I;i<=v;i++)i>=C&&i<=o&&(this._lines[i-this._rendLineNumberStart].onContentChanged(),c=!0);return c}onLinesInserted(I,w){if(this.getCount()===0)return null;const v=w-I+1,C=this.getStartLineNumber(),o=this.getEndLineNumber();if(I<=C)return this._rendLineNumberStart+=v,null;if(I>o)return null;if(v+I>o)return this._lines.splice(I-this._rendLineNumberStart,o-I+1);const c=[];for(let r=0;r<v;r++)c[r]=this._createLine();const i=I-this._rendLineNumberStart,S=this._lines.slice(0,i),s=this._lines.slice(i,this._lines.length-v),l=this._lines.slice(this._lines.length-v,this._lines.length);return this._lines=S.concat(c).concat(s),l}onTokensChanged(I){if(this.getCount()===0)return!1;const w=this.getStartLineNumber(),v=this.getEndLineNumber();let C=!1;for(let o=0,c=I.length;o<c;o++){const i=I[o];if(i.toLineNumber<w||i.fromLineNumber>v)continue;const S=Math.max(w,i.fromLineNumber),s=Math.min(v,i.toLineNumber);for(let l=S;l<=s;l++){const r=l-this._rendLineNumberStart;this._lines[r].onTokensChanged(),C=!0}}return C}}e.RenderedLinesCollection=_;class A{constructor(I){this._host=I,this.domNode=this._createDomNode(),this._linesCollection=new _(()=>this._host.createVisibleLine())}_createDomNode(){const I=(0,t.createFastDomNode)(document.createElement("div"));return I.setClassName("view-layer"),I.setPosition("absolute"),I.domNode.setAttribute("role","presentation"),I.domNode.setAttribute("aria-hidden","true"),I}onConfigurationChanged(I){return!!I.hasChanged(131)}onFlushed(I){return this._linesCollection.flush(),!0}onLinesChanged(I){return this._linesCollection.onLinesChanged(I.fromLineNumber,I.count)}onLinesDeleted(I){const w=this._linesCollection.onLinesDeleted(I.fromLineNumber,I.toLineNumber);if(w)for(let v=0,C=w.length;v<C;v++){const o=w[v].getDomNode();o&&this.domNode.domNode.removeChild(o)}return!0}onLinesInserted(I){const w=this._linesCollection.onLinesInserted(I.fromLineNumber,I.toLineNumber);if(w)for(let v=0,C=w.length;v<C;v++){const o=w[v].getDomNode();o&&this.domNode.domNode.removeChild(o)}return!0}onScrollChanged(I){return I.scrollTopChanged}onTokensChanged(I){return this._linesCollection.onTokensChanged(I.ranges)}onZonesChanged(I){return!0}getStartLineNumber(){return this._linesCollection.getStartLineNumber()}getEndLineNumber(){return this._linesCollection.getEndLineNumber()}getVisibleLine(I){return this._linesCollection.getLine(I)}renderLines(I){const w=this._linesCollection._get(),v=new k(this.domNode.domNode,this._host,I),C={rendLineNumberStart:w.rendLineNumberStart,lines:w.lines,linesLength:w.lines.length},o=v.render(C,I.startLineNumber,I.endLineNumber,I.relativeVerticalOffset);this._linesCollection._set(o.rendLineNumberStart,o.lines)}}e.VisibleLinesCollection=A;class k{constructor(I,w,v){this.domNode=I,this.host=w,this.viewportData=v}render(I,w,v,C){const o={rendLineNumberStart:I.rendLineNumberStart,lines:I.lines.slice(0),linesLength:I.linesLength};if(o.rendLineNumberStart+o.linesLength-1<w||v<o.rendLineNumberStart){o.rendLineNumberStart=w,o.linesLength=v-w+1,o.lines=[];for(let c=w;c<=v;c++)o.lines[c-w]=this.host.createVisibleLine();return this._finishRendering(o,!0,C),o}if(this._renderUntouchedLines(o,Math.max(w-o.rendLineNumberStart,0),Math.min(v-o.rendLineNumberStart,o.linesLength-1),C,w),o.rendLineNumberStart>w){const c=w,i=Math.min(v,o.rendLineNumberStart-1);c<=i&&(this._insertLinesBefore(o,c,i,C,w),o.linesLength+=i-c+1)}else if(o.rendLineNumberStart<w){const c=Math.min(o.linesLength,w-o.rendLineNumberStart);c>0&&(this._removeLinesBefore(o,c),o.linesLength-=c)}if(o.rendLineNumberStart=w,o.rendLineNumberStart+o.linesLength-1<v){const c=o.rendLineNumberStart+o.linesLength,i=v;c<=i&&(this._insertLinesAfter(o,c,i,C,w),o.linesLength+=i-c+1)}else if(o.rendLineNumberStart+o.linesLength-1>v){const c=Math.max(0,v-o.rendLineNumberStart+1),S=o.linesLength-1-c+1;S>0&&(this._removeLinesAfter(o,S),o.linesLength-=S)}return this._finishRendering(o,!1,C),o}_renderUntouchedLines(I,w,v,C,o){const c=I.rendLineNumberStart,i=I.lines;for(let S=w;S<=v;S++){const s=c+S;i[S].layoutLine(s,C[s-o])}}_insertLinesBefore(I,w,v,C,o){const c=[];let i=0;for(let S=w;S<=v;S++)c[i++]=this.host.createVisibleLine();I.lines=c.concat(I.lines)}_removeLinesBefore(I,w){for(let v=0;v<w;v++){const C=I.lines[v].getDomNode();C&&this.domNode.removeChild(C)}I.lines.splice(0,w)}_insertLinesAfter(I,w,v,C,o){const c=[];let i=0;for(let S=w;S<=v;S++)c[i++]=this.host.createVisibleLine();I.lines=I.lines.concat(c)}_removeLinesAfter(I,w){const v=I.linesLength-w;for(let C=0;C<w;C++){const o=I.lines[v+C].getDomNode();o&&this.domNode.removeChild(o)}I.lines.splice(v,w)}_finishRenderingNewLines(I,w,v,C){k._ttPolicy&&(v=k._ttPolicy.createHTML(v));const o=this.domNode.lastChild;w||!o?this.domNode.innerHTML=v:o.insertAdjacentHTML("afterend",v);let c=this.domNode.lastChild;for(let i=I.linesLength-1;i>=0;i--){const S=I.lines[i];C[i]&&(S.setDomNode(c),c=c.previousSibling)}}_finishRenderingInvalidLines(I,w,v){const C=document.createElement("div");k._ttPolicy&&(w=k._ttPolicy.createHTML(w)),C.innerHTML=w;for(let o=0;o<I.linesLength;o++){const c=I.lines[o];if(v[o]){const i=C.firstChild,S=c.getDomNode();S.parentNode.replaceChild(i,S),c.setDomNode(i)}}}_finishRendering(I,w,v){const C=k._sb,o=I.linesLength,c=I.lines,i=I.rendLineNumberStart,S=[];{C.reset();let s=!1;for(let l=0;l<o;l++){const r=c[l];S[l]=!1,!(r.getDomNode()||!r.renderLine(l+i,v[l],this.viewportData,C))&&(S[l]=!0,s=!0)}s&&this._finishRenderingNewLines(I,w,C.build(),S)}{C.reset();let s=!1;const l=[];for(let r=0;r<o;r++){const p=c[r];l[r]=!1,!(S[r]||!p.renderLine(r+i,v[r],this.viewportData,C))&&(l[r]=!0,s=!0)}s&&this._finishRenderingInvalidLines(I,C.build(),l)}}}k._ttPolicy=window.trustedTypes?.createPolicy("editorViewLayer",{createHTML:D=>D}),k._sb=(0,f.createStringBuilder)(1e5)}),define(ne[687],re([1,0,60,282]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compressConsecutiveTextChanges=e.TextChange=void 0;function _(I){return I.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class A{constructor(w,v,C,o){this.oldPosition=w,this.oldText=v,this.newPosition=C,this.newText=o}get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${_(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${_(this.oldText)}")`:`(replace@${this.oldPosition} "${_(this.oldText)}" with "${_(this.newText)}")`}static _writeStringSize(w){return 4+2*w.length}static _writeString(w,v,C){const o=v.length;t.writeUInt32BE(w,o,C),C+=4;for(let c=0;c<o;c++)t.writeUInt16LE(w,v.charCodeAt(c),C),C+=2;return C}static _readString(w,v){const C=t.readUInt32BE(w,v);return v+=4,(0,f.decodeUTF16LE)(w,v,C)}writeSize(){return 4+4+A._writeStringSize(this.oldText)+A._writeStringSize(this.newText)}write(w,v){return t.writeUInt32BE(w,this.oldPosition,v),v+=4,t.writeUInt32BE(w,this.newPosition,v),v+=4,v=A._writeString(w,this.oldText,v),v=A._writeString(w,this.newText,v),v}static read(w,v,C){const o=t.readUInt32BE(w,v);v+=4;const c=t.readUInt32BE(w,v);v+=4;const i=A._readString(w,v);v+=A._writeStringSize(i);const S=A._readString(w,v);return v+=A._writeStringSize(S),C.push(new A(o,i,c,S)),v}}e.TextChange=A;function k(I,w){return I===null||I.length===0?w:new D(I,w).compress()}e.compressConsecutiveTextChanges=k;class D{constructor(w,v){this._prevEdits=w,this._currEdits=v,this._result=[],this._resultLen=0,this._prevLen=this._prevEdits.length,this._prevDeltaOffset=0,this._currLen=this._currEdits.length,this._currDeltaOffset=0}compress(){let w=0,v=0,C=this._getPrev(w),o=this._getCurr(v);for(;w<this._prevLen||v<this._currLen;){if(C===null){this._acceptCurr(o),o=this._getCurr(++v);continue}if(o===null){this._acceptPrev(C),C=this._getPrev(++w);continue}if(o.oldEnd<=C.newPosition){this._acceptCurr(o),o=this._getCurr(++v);continue}if(C.newEnd<=o.oldPosition){this._acceptPrev(C),C=this._getPrev(++w);continue}if(o.oldPosition<C.newPosition){const[l,r]=D._splitCurr(o,C.newPosition-o.oldPosition);this._acceptCurr(l),o=r;continue}if(C.newPosition<o.oldPosition){const[l,r]=D._splitPrev(C,o.oldPosition-C.newPosition);this._acceptPrev(l),C=r;continue}let S,s;if(o.oldEnd===C.newEnd)S=C,s=o,C=this._getPrev(++w),o=this._getCurr(++v);else if(o.oldEnd<C.newEnd){const[l,r]=D._splitPrev(C,o.oldLength);S=l,s=o,C=r,o=this._getCurr(++v)}else{const[l,r]=D._splitCurr(o,C.newLength);S=C,s=l,C=this._getPrev(++w),o=r}this._result[this._resultLen++]=new A(S.oldPosition,S.oldText,s.newPosition,s.newText),this._prevDeltaOffset+=S.newLength-S.oldLength,this._currDeltaOffset+=s.newLength-s.oldLength}const c=D._merge(this._result);return D._removeNoOps(c)}_acceptCurr(w){this._result[this._resultLen++]=D._rebaseCurr(this._prevDeltaOffset,w),this._currDeltaOffset+=w.newLength-w.oldLength}_getCurr(w){return w<this._currLen?this._currEdits[w]:null}_acceptPrev(w){this._result[this._resultLen++]=D._rebasePrev(this._currDeltaOffset,w),this._prevDeltaOffset+=w.newLength-w.oldLength}_getPrev(w){return w<this._prevLen?this._prevEdits[w]:null}static _rebaseCurr(w,v){return new A(v.oldPosition-w,v.oldText,v.newPosition,v.newText)}static _rebasePrev(w,v){return new A(v.oldPosition,v.oldText,v.newPosition+w,v.newText)}static _splitPrev(w,v){const C=w.newText.substr(0,v),o=w.newText.substr(v);return[new A(w.oldPosition,w.oldText,w.newPosition,C),new A(w.oldEnd,"",w.newPosition+v,o)]}static _splitCurr(w,v){const C=w.oldText.substr(0,v),o=w.oldText.substr(v);return[new A(w.oldPosition,C,w.newPosition,w.newText),new A(w.oldPosition+v,o,w.newEnd,"")]}static _merge(w){if(w.length===0)return w;const v=[];let C=0,o=w[0];for(let c=1;c<w.length;c++){const i=w[c];o.oldEnd===i.oldPosition?o=new A(o.oldPosition,o.oldText+i.oldText,o.newPosition,o.newText+i.newText):(v[C++]=o,o=i)}return v[C++]=o,v}static _removeNoOps(w){if(w.length===0)return w;const v=[];let C=0;for(let o=0;o<w.length;o++){const c=w[o];c.oldText!==c.newText&&(v[C++]=c)}return v}}}),define(ne[455],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EDITOR_MODEL_DEFAULTS=void 0,e.EDITOR_MODEL_DEFAULTS={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!1,independentColorPoolPerBracketType:!1}}}),define(ne[385],re([1,0,339]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMapForWordSeparators=e.WordCharacterClassifier=e.WordCharacterClass=void 0;var f;(function(k){k[k.Regular=0]="Regular",k[k.Whitespace=1]="Whitespace",k[k.WordSeparator=2]="WordSeparator"})(f=e.WordCharacterClass||(e.WordCharacterClass={}));class _ extends t.CharacterClassifier{constructor(D){super(0);for(let I=0,w=D.length;I<w;I++)this.set(D.charCodeAt(I),2);this.set(32,1),this.set(9,1)}}e.WordCharacterClassifier=_;function A(k){const D={};return I=>(D.hasOwnProperty(I)||(D[I]=k(I)),D[I])}e.getMapForWordSeparators=A(k=>new _(k))}),define(ne[283],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getWordAtText=e.ensureValidWordDefinition=e.DEFAULT_WORD_REGEXP=e.USUAL_WORD_SEPARATORS=void 0,e.USUAL_WORD_SEPARATORS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function t(D=""){let I="(-?\\d*\\.\\d\\w*)|([^";for(const w of e.USUAL_WORD_SEPARATORS)D.indexOf(w)>=0||(I+="\\"+w);return I+="\\s]+)",new RegExp(I,"g")}e.DEFAULT_WORD_REGEXP=t();function f(D){let I=e.DEFAULT_WORD_REGEXP;if(D&&D instanceof RegExp)if(D.global)I=D;else{let w="g";D.ignoreCase&&(w+="i"),D.multiline&&(w+="m"),D.unicode&&(w+="u"),I=new RegExp(D.source,w)}return I.lastIndex=0,I}e.ensureValidWordDefinition=f;const _={maxLen:1e3,windowSize:15,timeBudget:150};function A(D,I,w,v,C=_){if(w.length>C.maxLen){let s=D-C.maxLen/2;return s<0?s=0:v+=s,w=w.substring(s,D+C.maxLen/2),A(D,I,w,v,C)}const o=Date.now(),c=D-1-v;let i=-1,S=null;for(let s=1;!(Date.now()-o>=C.timeBudget);s++){const l=c-C.windowSize*s;I.lastIndex=Math.max(0,l);const r=k(I,w,c,i);if(!r&&S||(S=r,l<=0))break;i=l}if(S){const s={word:S[0],startColumn:v+1+S.index,endColumn:v+1+S.index+S[0].length};return I.lastIndex=0,s}return null}e.getWordAtText=A;function k(D,I,w,v){let C;for(;C=D.exec(I);){const o=C.index||0;if(o<=w&&D.lastIndex>=w)return C;if(v>0&&o>v)return null}return null}}),define(ne[688],re([1,0,243]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AtomicTabMoveOperations=e.Direction=void 0;var f;(function(A){A[A.Left=0]="Left",A[A.Right=1]="Right",A[A.Nearest=2]="Nearest"})(f=e.Direction||(e.Direction={}));class _{static whitespaceVisibleColumn(k,D,I){const w=k.length;let v=0,C=-1,o=-1;for(let c=0;c<w;c++){if(c===D)return[C,o,v];switch(v%I==0&&(C=c,o=v),k.charCodeAt(c)){case 32:v+=1;break;case 9:v=t.CursorColumns.nextRenderTabStop(v,I);break;default:return[-1,-1,-1]}}return D===w?[C,o,v]:[-1,-1,-1]}static atomicPosition(k,D,I,w){const v=k.length,[C,o,c]=_.whitespaceVisibleColumn(k,D,I);if(c===-1)return-1;let i;switch(w){case 0:i=!0;break;case 1:i=!1;break;case 2:if(c%I==0)return D;i=c%I<=I/2;break}if(i){if(C===-1)return-1;let l=o;for(let r=C;r<v;++r){if(l===o+I)return C;switch(k.charCodeAt(r)){case 32:l+=1;break;case 9:l=t.CursorColumns.nextRenderTabStop(l,I);break;default:return-1}}return l===o+I?C:-1}const S=t.CursorColumns.nextRenderTabStop(c,I);let s=c;for(let l=D;l<v;l++){if(s===S)return l;switch(k.charCodeAt(l)){case 32:s+=1;break;case 9:s=t.CursorColumns.nextRenderTabStop(s,I);break;default:return-1}}return s===S?v:-1}}e.AtomicTabMoveOperations=_}),define(ne[1143],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorContext=void 0;class t{constructor(_,A,k,D){this._cursorContextBrand=void 0,this.model=_,this.viewModel=A,this.coordinatesConverter=k,this.cursorConfig=D}}e.CursorContext=t}),define(ne[1144],re([1,0,380,29]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffComputer=void 0;const _=3;function A(S,s,l,r){return new t.LcsDiff(S,s,l).ComputeDiff(r)}class k{constructor(s){const l=[],r=[];for(let p=0,u=s.length;p<u;p++)l[p]=o(s[p],1),r[p]=c(s[p],1);this.lines=s,this._startColumns=l,this._endColumns=r}getElements(){const s=[];for(let l=0,r=this.lines.length;l<r;l++)s[l]=this.lines[l].substring(this._startColumns[l]-1,this._endColumns[l]-1);return s}getStrictElement(s){return this.lines[s]}getStartLineNumber(s){return s+1}getEndLineNumber(s){return s+1}createCharSequence(s,l,r){const p=[],u=[],a=[];let n=0;for(let h=l;h<=r;h++){const g=this.lines[h],d=s?this._startColumns[h]:1,m=s?this._endColumns[h]:g.length+1;for(let b=d;b<m;b++)p[n]=g.charCodeAt(b-1),u[n]=h+1,a[n]=b,n++}return new D(p,u,a)}}class D{constructor(s,l,r){this._charCodes=s,this._lineNumbers=l,this._columns=r}getElements(){return this._charCodes}getStartLineNumber(s){return this._lineNumbers[s]}getStartColumn(s){return this._columns[s]}getEndLineNumber(s){return this._lineNumbers[s]}getEndColumn(s){return this._columns[s]+1}}class I{constructor(s,l,r,p,u,a,n,h){this.originalStartLineNumber=s,this.originalStartColumn=l,this.originalEndLineNumber=r,this.originalEndColumn=p,this.modifiedStartLineNumber=u,this.modifiedStartColumn=a,this.modifiedEndLineNumber=n,this.modifiedEndColumn=h}static createFromDiffChange(s,l,r){let p,u,a,n,h,g,d,m;return s.originalLength===0?(p=0,u=0,a=0,n=0):(p=l.getStartLineNumber(s.originalStart),u=l.getStartColumn(s.originalStart),a=l.getEndLineNumber(s.originalStart+s.originalLength-1),n=l.getEndColumn(s.originalStart+s.originalLength-1)),s.modifiedLength===0?(h=0,g=0,d=0,m=0):(h=r.getStartLineNumber(s.modifiedStart),g=r.getStartColumn(s.modifiedStart),d=r.getEndLineNumber(s.modifiedStart+s.modifiedLength-1),m=r.getEndColumn(s.modifiedStart+s.modifiedLength-1)),new I(p,u,a,n,h,g,d,m)}}function w(S){if(S.length<=1)return S;const s=[S[0]];let l=s[0];for(let r=1,p=S.length;r<p;r++){const u=S[r],a=u.originalStart-(l.originalStart+l.originalLength),n=u.modifiedStart-(l.modifiedStart+l.modifiedLength);Math.min(a,n)<_?(l.originalLength=u.originalStart+u.originalLength-l.originalStart,l.modifiedLength=u.modifiedStart+u.modifiedLength-l.modifiedStart):(s.push(u),l=u)}return s}class v{constructor(s,l,r,p,u){this.originalStartLineNumber=s,this.originalEndLineNumber=l,this.modifiedStartLineNumber=r,this.modifiedEndLineNumber=p,this.charChanges=u}static createFromDiffResult(s,l,r,p,u,a,n){let h,g,d,m,b;if(l.originalLength===0?(h=r.getStartLineNumber(l.originalStart)-1,g=0):(h=r.getStartLineNumber(l.originalStart),g=r.getEndLineNumber(l.originalStart+l.originalLength-1)),l.modifiedLength===0?(d=p.getStartLineNumber(l.modifiedStart)-1,m=0):(d=p.getStartLineNumber(l.modifiedStart),m=p.getEndLineNumber(l.modifiedStart+l.modifiedLength-1)),a&&l.originalLength>0&&l.originalLength<20&&l.modifiedLength>0&&l.modifiedLength<20&&u()){const E=r.createCharSequence(s,l.originalStart,l.originalStart+l.originalLength-1),y=p.createCharSequence(s,l.modifiedStart,l.modifiedStart+l.modifiedLength-1);let T=A(E,y,u,!0).changes;n&&(T=w(T)),b=[];for(let R=0,O=T.length;R<O;R++)b.push(I.createFromDiffChange(T[R],E,y))}return new v(h,g,d,m,b)}}class C{constructor(s,l,r){this.shouldComputeCharChanges=r.shouldComputeCharChanges,this.shouldPostProcessCharChanges=r.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=r.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=r.shouldMakePrettyDiff,this.originalLines=s,this.modifiedLines=l,this.original=new k(s),this.modified=new k(l),this.continueLineDiff=i(r.maxComputationTime),this.continueCharDiff=i(r.maxComputationTime===0?0:Math.min(r.maxComputationTime,5e3))}computeDiff(){if(this.original.lines.length===1&&this.original.lines[0].length===0)return this.modified.lines.length===1&&this.modified.lines[0].length===0?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};if(this.modified.lines.length===1&&this.modified.lines[0].length===0)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};const s=A(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),l=s.changes,r=s.quitEarly;if(this.shouldIgnoreTrimWhitespace){const n=[];for(let h=0,g=l.length;h<g;h++)n.push(v.createFromDiffResult(this.shouldIgnoreTrimWhitespace,l[h],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:r,changes:n}}const p=[];let u=0,a=0;for(let n=-1,h=l.length;n<h;n++){const g=n+1<h?l[n+1]:null,d=g?g.originalStart:this.originalLines.length,m=g?g.modifiedStart:this.modifiedLines.length;for(;u<d&&a<m;){const b=this.originalLines[u],E=this.modifiedLines[a];if(b!==E){{let y=o(b,1),T=o(E,1);for(;y>1&&T>1;){const R=b.charCodeAt(y-2),O=E.charCodeAt(T-2);if(R!==O)break;y--,T--}(y>1||T>1)&&this._pushTrimWhitespaceCharChange(p,u+1,1,y,a+1,1,T)}{let y=c(b,1),T=c(E,1);const R=b.length+1,O=E.length+1;for(;y<R&&T<O;){const x=b.charCodeAt(y-1),F=b.charCodeAt(T-1);if(x!==F)break;y++,T++}(y<R||T<O)&&this._pushTrimWhitespaceCharChange(p,u+1,y,R,a+1,T,O)}}u++,a++}g&&(p.push(v.createFromDiffResult(this.shouldIgnoreTrimWhitespace,g,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),u+=g.originalLength,a+=g.modifiedLength)}return{quitEarly:r,changes:p}}_pushTrimWhitespaceCharChange(s,l,r,p,u,a,n){if(this._mergeTrimWhitespaceCharChange(s,l,r,p,u,a,n))return;let h;this.shouldComputeCharChanges&&(h=[new I(l,r,l,p,u,a,u,n)]),s.push(new v(l,l,u,u,h))}_mergeTrimWhitespaceCharChange(s,l,r,p,u,a,n){const h=s.length;if(h===0)return!1;const g=s[h-1];return g.originalEndLineNumber===0||g.modifiedEndLineNumber===0?!1:g.originalEndLineNumber+1===l&&g.modifiedEndLineNumber+1===u?(g.originalEndLineNumber=l,g.modifiedEndLineNumber=u,this.shouldComputeCharChanges&&g.charChanges&&g.charChanges.push(new I(l,r,l,p,u,a,u,n)),!0):!1}}e.DiffComputer=C;function o(S,s){const l=f.firstNonWhitespaceIndex(S);return l===-1?s:l+1}function c(S,s){const l=f.lastNonWhitespaceIndex(S);return l===-1?s:l+2}function i(S){if(S===0)return()=>!0;const s=Date.now();return()=>Date.now()-s<S}}),define(ne[1145],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InternalEditorAction=void 0;class t{constructor(_,A,k,D,I,w){this.id=_,this.label=A,this.alias=k,this._precondition=D,this._run=I,this._contextKeyService=w}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(){return this.isSupported()?this._run():Promise.resolve(void 0)}}e.InternalEditorAction=t}),define(ne[306],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Handler=e.EditorType=e.isThemeColor=e.ScrollType=void 0;var t;(function(A){A[A.Smooth=0]="Smooth",A[A.Immediate=1]="Immediate"})(t=e.ScrollType||(e.ScrollType={}));function f(A){return A&&typeof A.id=="string"}e.isThemeColor=f,e.EditorType={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"};var _;(function(A){A.CompositionStart="compositionStart",A.CompositionEnd="compositionEnd",A.Type="type",A.ReplacePreviousChar="replacePreviousChar",A.CompositionType="compositionType",A.Paste="paste",A.Cut="cut"})(_=e.Handler||(e.Handler={}))}),define(ne[106],re([1,0,306]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIEditor=e.getCodeEditor=e.isCompositeEditor=e.isDiffEditor=e.isCodeEditor=e.DiffEditorState=e.MouseTargetType=e.OverlayWidgetPositionPreference=e.ContentWidgetPositionPreference=void 0;var f;(function(o){o[o.EXACT=0]="EXACT",o[o.ABOVE=1]="ABOVE",o[o.BELOW=2]="BELOW"})(f=e.ContentWidgetPositionPreference||(e.ContentWidgetPositionPreference={}));var _;(function(o){o[o.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",o[o.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",o[o.TOP_CENTER=2]="TOP_CENTER"})(_=e.OverlayWidgetPositionPreference||(e.OverlayWidgetPositionPreference={}));var A;(function(o){o[o.UNKNOWN=0]="UNKNOWN",o[o.TEXTAREA=1]="TEXTAREA",o[o.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",o[o.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",o[o.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",o[o.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",o[o.CONTENT_TEXT=6]="CONTENT_TEXT",o[o.CONTENT_EMPTY=7]="CONTENT_EMPTY",o[o.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",o[o.CONTENT_WIDGET=9]="CONTENT_WIDGET",o[o.OVERVIEW_RULER=10]="OVERVIEW_RULER",o[o.SCROLLBAR=11]="SCROLLBAR",o[o.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",o[o.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(A=e.MouseTargetType||(e.MouseTargetType={}));var k;(function(o){o[o.Idle=0]="Idle",o[o.ComputingDiff=1]="ComputingDiff",o[o.DiffComputed=2]="DiffComputed"})(k=e.DiffEditorState||(e.DiffEditorState={}));function D(o){return o&&typeof o.getEditorType=="function"?o.getEditorType()===t.EditorType.ICodeEditor:!1}e.isCodeEditor=D;function I(o){return o&&typeof o.getEditorType=="function"?o.getEditorType()===t.EditorType.IDiffEditor:!1}e.isDiffEditor=I;function w(o){return!!o&&typeof o=="object"&&typeof o.onDidChangeActiveEditor=="function"}e.isCompositeEditor=w;function v(o){return D(o)?o:I(o)?o.getModifiedEditor():null}e.getCodeEditor=v;function C(o){return D(o)||I(o)?o:null}e.getIEditor=C}),define(ne[1146],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorTheme=void 0;class t{constructor(_){this._theme=_}get type(){return this._theme.type}get value(){return this._theme}update(_){this._theme=_}getColor(_){return this._theme.getColor(_)}}e.EditorTheme=t}),define(ne[1147],re([1,0,152,48]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.score=void 0;function _(A,k,D,I,w){if(Array.isArray(A)){let v=0;for(const C of A){const o=_(C,k,D,I,w);if(o===10)return o;o>v&&(v=o)}return v}else{if(typeof A=="string")return I?A==="*"?5:A===D?10:0:0;if(A){const{language:v,pattern:C,scheme:o,hasAccessToAllModels:c,notebookType:i}=A;if(!I&&!c)return 0;let S=0;if(o)if(o===k.scheme)S=10;else if(o==="*")S=5;else return 0;if(v)if(v===D)S=10;else if(v==="*")S=Math.max(S,5);else return 0;if(i)if(i===w)S=10;else if(i==="*")S=Math.max(S,5);else return 0;if(C){let s;if(typeof C=="string"?s=C:s={...C,base:(0,f.normalize)(C.base)},s===k.fsPath||(0,t.match)(s,k.fsPath))S=10;else return 0}return S}else return 0}}e.score=_}),define(ne[342],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoClosingPairs=e.StandardAutoClosingPairConditional=e.IndentAction=void 0;var t;(function(k){k[k.None=0]="None",k[k.Indent=1]="Indent",k[k.IndentOutdent=2]="IndentOutdent",k[k.Outdent=3]="Outdent"})(t=e.IndentAction||(e.IndentAction={}));class f{constructor(D){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=D.open,this.close=D.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(D.notIn))for(let I=0,w=D.notIn.length;I<w;I++)switch(D.notIn[I]){case"string":this._inString=!1;break;case"comment":this._inComment=!1;break;case"regex":this._inRegEx=!1;break}}isOK(D){switch(D){case 0:return!0;case 1:return this._inComment;case 2:return this._inString;case 3:return this._inRegEx}}shouldAutoClose(D,I){if(D.getTokenCount()===0)return!0;const w=D.findTokenIndexAtOffset(I-2),v=D.getStandardTokenType(w);return this.isOK(v)}_findNeutralCharacterInRange(D,I){for(let w=D;w<=I;w++){const v=String.fromCharCode(w);if(!this.open.includes(v)&&!this.close.includes(v))return v}return null}findNeutralCharacter(){return this._neutralCharacterSearched||(this._neutralCharacterSearched=!0,this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(48,57)),this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(97,122)),this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(65,90))),this._neutralCharacter}}e.StandardAutoClosingPairConditional=f;class _{constructor(D){this.autoClosingPairsOpenByStart=new Map,this.autoClosingPairsOpenByEnd=new Map,this.autoClosingPairsCloseByStart=new Map,this.autoClosingPairsCloseByEnd=new Map,this.autoClosingPairsCloseSingleChar=new Map;for(const I of D)A(this.autoClosingPairsOpenByStart,I.open.charAt(0),I),A(this.autoClosingPairsOpenByEnd,I.open.charAt(I.open.length-1),I),A(this.autoClosingPairsCloseByStart,I.close.charAt(0),I),A(this.autoClosingPairsCloseByEnd,I.close.charAt(I.close.length-1),I),I.close.length===1&&I.open.length===1&&A(this.autoClosingPairsCloseSingleChar,I.close,I)}}e.AutoClosingPairs=_;function A(k,D,I){k.has(D)?k.get(D).push(I):k.set(D,[I])}}),define(ne[689],re([1,0,339]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeLinks=e.LinkComputer=e.StateMachine=e.Uint8Matrix=e.State=void 0;var f;(function(c){c[c.Invalid=0]="Invalid",c[c.Start=1]="Start",c[c.H=2]="H",c[c.HT=3]="HT",c[c.HTT=4]="HTT",c[c.HTTP=5]="HTTP",c[c.F=6]="F",c[c.FI=7]="FI",c[c.FIL=8]="FIL",c[c.BeforeColon=9]="BeforeColon",c[c.AfterColon=10]="AfterColon",c[c.AlmostThere=11]="AlmostThere",c[c.End=12]="End",c[c.Accept=13]="Accept",c[c.LastKnownState=14]="LastKnownState"})(f=e.State||(e.State={}));class _{constructor(i,S,s){const l=new Uint8Array(i*S);for(let r=0,p=i*S;r<p;r++)l[r]=s;this._data=l,this.rows=i,this.cols=S}get(i,S){return this._data[i*this.cols+S]}set(i,S,s){this._data[i*this.cols+S]=s}}e.Uint8Matrix=_;class A{constructor(i){let S=0,s=0;for(let r=0,p=i.length;r<p;r++){const[u,a,n]=i[r];a>S&&(S=a),u>s&&(s=u),n>s&&(s=n)}S++,s++;const l=new _(s,S,0);for(let r=0,p=i.length;r<p;r++){const[u,a,n]=i[r];l.set(u,a,n)}this._states=l,this._maxCharCode=S}nextState(i,S){return S<0||S>=this._maxCharCode?0:this._states.get(i,S)}}e.StateMachine=A;let k=null;function D(){return k===null&&(k=new A([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),k}var I;(function(c){c[c.None=0]="None",c[c.ForceTermination=1]="ForceTermination",c[c.CannotEndIn=2]="CannotEndIn"})(I||(I={}));let w=null;function v(){if(w===null){w=new t.CharacterClassifier(0);const c=` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026`;for(let S=0;S<c.length;S++)w.set(c.charCodeAt(S),1);const i=".,;";for(let S=0;S<i.length;S++)w.set(i.charCodeAt(S),2)}return w}class C{static _createLink(i,S,s,l,r){let p=r-1;do{const u=S.charCodeAt(p);if(i.get(u)!==2)break;p--}while(p>l);if(l>0){const u=S.charCodeAt(l-1),a=S.charCodeAt(p);(u===40&&a===41||u===91&&a===93||u===123&&a===125)&&p--}return{range:{startLineNumber:s,startColumn:l+1,endLineNumber:s,endColumn:p+2},url:S.substring(l,p+1)}}static computeLinks(i,S=D()){const s=v(),l=[];for(let r=1,p=i.getLineCount();r<=p;r++){const u=i.getLineContent(r),a=u.length;let n=0,h=0,g=0,d=1,m=!1,b=!1,E=!1,y=!1;for(;n<a;){let T=!1;const R=u.charCodeAt(n);if(d===13){let O;switch(R){case 40:m=!0,O=0;break;case 41:O=m?0:1;break;case 91:E=!0,b=!0,O=0;break;case 93:E=!1,O=b?0:1;break;case 123:y=!0,O=0;break;case 125:O=y?0:1;break;case 39:O=g===34||g===96?0:1;break;case 34:O=g===39||g===96?0:1;break;case 96:O=g===39||g===34?0:1;break;case 42:O=g===42?1:0;break;case 124:O=g===124?1:0;break;case 32:O=E?0:1;break;default:O=s.get(R)}O===1&&(l.push(C._createLink(s,u,r,h,n)),T=!0)}else if(d===12){let O;R===91?(b=!0,O=0):O=s.get(R),O===1?T=!0:d=13}else d=S.nextState(d,R),d===0&&(T=!0);T&&(d=1,m=!1,b=!1,y=!1,h=n+1,g=R),n++}d===13&&l.push(C._createLink(s,u,r,h,a))}return l}}e.LinkComputer=C;function o(c){return!c||typeof c.getLineCount!="function"||typeof c.getLineContent!="function"?[]:C.computeLinks(c)}e.computeLinks=o}),define(ne[386],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ignoreBracketsInToken=e.ScopedLineTokens=e.createScopedLineTokens=void 0;function t(k,D){const I=k.getCount(),w=k.findTokenIndexAtOffset(D),v=k.getLanguageId(w);let C=w;for(;C+1<I&&k.getLanguageId(C+1)===v;)C++;let o=w;for(;o>0&&k.getLanguageId(o-1)===v;)o--;return new f(k,v,o,C+1,k.getStartOffset(o),k.getEndOffset(C))}e.createScopedLineTokens=t;class f{constructor(D,I,w,v,C,o){this._scopedLineTokensBrand=void 0,this._actual=D,this.languageId=I,this._firstTokenIndex=w,this._lastTokenIndex=v,this.firstCharOffset=C,this._lastCharOffset=o}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(D){return this._actual.getLineContent().substring(0,this.firstCharOffset+D)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(D){return this._actual.findTokenIndexAtOffset(D+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(D){return this._actual.getStandardTokenType(D+this._firstTokenIndex)}}e.ScopedLineTokens=f;var _;(function(k){k[k.value=3]="value"})(_||(_={}));function A(k){return(k&3)!=0}e.ignoreBracketsInToken=A}),define(ne[226],re([1,0,49,20,84,386,243,522]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isQuote=e.EditOperationResult=e.SingleCursorState=e.PartialViewCursorState=e.PartialModelCursorState=e.CursorState=e.CursorConfiguration=e.EditOperationType=e.RevealTarget=void 0;var I;(function(u){u[u.Primary=0]="Primary",u[u.TopMost=1]="TopMost",u[u.BottomMost=2]="BottomMost"})(I=e.RevealTarget||(e.RevealTarget={}));var w;(function(u){u[u.Other=0]="Other",u[u.DeletingLeft=2]="DeletingLeft",u[u.DeletingRight=3]="DeletingRight",u[u.TypingOther=4]="TypingOther",u[u.TypingFirstSpace=5]="TypingFirstSpace",u[u.TypingConsecutiveSpace=6]="TypingConsecutiveSpace"})(w=e.EditOperationType||(e.EditOperationType={}));const v=()=>!0,C=()=>!1,o=u=>u===" "||u===" ";class c{constructor(a,n,h,g){this.languageConfigurationService=g,this._cursorMoveConfigurationBrand=void 0,this._languageId=a;const d=h.options,m=d.get(131);this.readOnly=d.get(81),this.tabSize=n.tabSize,this.indentSize=n.indentSize,this.insertSpaces=n.insertSpaces,this.stickyTabStops=d.get(104),this.lineHeight=d.get(59),this.pageSize=Math.max(1,Math.floor(m.height/this.lineHeight)-2),this.useTabStops=d.get(116),this.wordSeparators=d.get(117),this.emptySelectionClipboard=d.get(32),this.copyWithSyntaxHighlighting=d.get(21),this.multiCursorMergeOverlapping=d.get(69),this.multiCursorPaste=d.get(71),this.autoClosingBrackets=d.get(5),this.autoClosingQuotes=d.get(8),this.autoClosingDelete=d.get(6),this.autoClosingOvertype=d.get(7),this.autoSurround=d.get(11),this.autoIndent=d.get(9),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(a,this.autoClosingQuotes),bracket:this._getShouldAutoClose(a,this.autoClosingBrackets)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(a).getAutoClosingPairs();const b=this.languageConfigurationService.getLanguageConfiguration(a).getSurroundingPairs();if(b)for(const E of b)this.surroundingPairs[E.open]=E.close}static shouldRecreate(a){return a.hasChanged(131)||a.hasChanged(117)||a.hasChanged(32)||a.hasChanged(69)||a.hasChanged(71)||a.hasChanged(5)||a.hasChanged(8)||a.hasChanged(6)||a.hasChanged(7)||a.hasChanged(11)||a.hasChanged(116)||a.hasChanged(59)||a.hasChanged(81)}get electricChars(){if(!this._electricChars){this._electricChars={};const a=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter?.getElectricCharacters();if(a)for(const n of a)this._electricChars[n]=!0}return this._electricChars}onElectricCharacter(a,n,h){const g=(0,A.createScopedLineTokens)(n,h-1),d=this.languageConfigurationService.getLanguageConfiguration(g.languageId).electricCharacter;return d?d.onElectricCharacter(a,g,h-g.firstCharOffset):null}normalizeIndentation(a){return(0,D.normalizeIndentation)(a,this.indentSize,this.insertSpaces)}_getShouldAutoClose(a,n){switch(n){case"beforeWhitespace":return o;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(a);case"always":return v;case"never":return C}}_getLanguageDefinedShouldAutoClose(a){const n=this.languageConfigurationService.getLanguageConfiguration(a).getAutoCloseBeforeSet();return h=>n.indexOf(h)!==-1}visibleColumnFromColumn(a,n){return k.CursorColumns.visibleColumnFromColumn(a.getLineContent(n.lineNumber),n.column,this.tabSize)}columnFromVisibleColumn(a,n,h){const g=k.CursorColumns.columnFromVisibleColumn(a.getLineContent(n),h,this.tabSize),d=a.getLineMinColumn(n);if(g<d)return d;const m=a.getLineMaxColumn(n);return g>m?m:g}}e.CursorConfiguration=c;class i{constructor(a,n){this._cursorStateBrand=void 0,this.modelState=a,this.viewState=n}static fromModelState(a){return new S(a)}static fromViewState(a){return new s(a)}static fromModelSelection(a){const n=_.Selection.liftSelection(a),h=new l(f.Range.fromPositions(n.getSelectionStart()),0,n.getPosition(),0);return i.fromModelState(h)}static fromModelSelections(a){const n=[];for(let h=0,g=a.length;h<g;h++)n[h]=this.fromModelSelection(a[h]);return n}equals(a){return this.viewState.equals(a.viewState)&&this.modelState.equals(a.modelState)}}e.CursorState=i;class S{constructor(a){this.modelState=a,this.viewState=null}}e.PartialModelCursorState=S;class s{constructor(a){this.modelState=null,this.viewState=a}}e.PartialViewCursorState=s;class l{constructor(a,n,h,g){this._singleCursorStateBrand=void 0,this.selectionStart=a,this.selectionStartLeftoverVisibleColumns=n,this.position=h,this.leftoverVisibleColumns=g,this.selection=l._computeSelection(this.selectionStart,this.position)}equals(a){return this.selectionStartLeftoverVisibleColumns===a.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===a.leftoverVisibleColumns&&this.position.equals(a.position)&&this.selectionStart.equalsRange(a.selectionStart)}hasSelection(){return!this.selection.isEmpty()||!this.selectionStart.isEmpty()}move(a,n,h,g){return a?new l(this.selectionStart,this.selectionStartLeftoverVisibleColumns,new t.Position(n,h),g):new l(new f.Range(n,h,n,h),g,new t.Position(n,h),g)}static _computeSelection(a,n){return a.isEmpty()||!n.isBeforeOrEqual(a.getStartPosition())?_.Selection.fromPositions(a.getStartPosition(),n):_.Selection.fromPositions(a.getEndPosition(),n)}}e.SingleCursorState=l;class r{constructor(a,n,h){this._editOperationResultBrand=void 0,this.type=a,this.commands=n,this.shouldPushStackElementBefore=h.shouldPushStackElementBefore,this.shouldPushStackElementAfter=h.shouldPushStackElementAfter}}e.EditOperationResult=r;function p(u){return u==="'"||u==='"'||u==="`"}e.isQuote=p}),define(ne[1148],re([1,0,226,49,20]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColumnSelection=void 0;class A{static columnSelect(D,I,w,v,C,o){const c=Math.abs(C-w)+1,i=w>C,S=v>o,s=v<o,l=[];for(let r=0;r<c;r++){const p=w+(i?-r:r),u=D.columnFromVisibleColumn(I,p,v),a=D.columnFromVisibleColumn(I,p,o),n=D.visibleColumnFromColumn(I,new f.Position(p,u)),h=D.visibleColumnFromColumn(I,new f.Position(p,a));s&&(n>o||h<v)||S&&(h>v||n<o)||l.push(new t.SingleCursorState(new _.Range(p,u,p,u),0,new f.Position(p,a),0))}if(l.length===0)for(let r=0;r<c;r++){const p=w+(i?-r:r),u=I.getLineMaxColumn(p);l.push(new t.SingleCursorState(new _.Range(p,u,p,u),0,new f.Position(p,u),0))}return{viewStates:l,reversed:i,fromLineNumber:w,fromVisualColumn:v,toLineNumber:C,toVisualColumn:o}}static columnSelectLeft(D,I,w){let v=w.toViewVisualColumn;return v>0&&v--,A.columnSelect(D,I,w.fromViewLineNumber,w.fromViewVisualColumn,w.toViewLineNumber,v)}static columnSelectRight(D,I,w){let v=0;const C=Math.min(w.fromViewLineNumber,w.toViewLineNumber),o=Math.max(w.fromViewLineNumber,w.toViewLineNumber);for(let i=C;i<=o;i++){const S=I.getLineMaxColumn(i),s=D.visibleColumnFromColumn(I,new f.Position(i,S));v=Math.max(v,s)}let c=w.toViewVisualColumn;return c<v&&c++,this.columnSelect(D,I,w.fromViewLineNumber,w.fromViewVisualColumn,w.toViewLineNumber,c)}static columnSelectUp(D,I,w,v){const C=v?D.pageSize:1,o=Math.max(1,w.toViewLineNumber-C);return this.columnSelect(D,I,w.fromViewLineNumber,w.fromViewVisualColumn,o,w.toViewVisualColumn)}static columnSelectDown(D,I,w,v){const C=v?D.pageSize:1,o=Math.min(I.getLineCount(),w.toViewLineNumber+C);return this.columnSelect(D,I,w.fromViewLineNumber,w.fromViewVisualColumn,o,w.toViewVisualColumn)}}e.ColumnSelection=A}),define(ne[525],re([1,0,226,243,49,20,29,688]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveOperations=e.CursorPosition=void 0;class I{constructor(C,o,c){this._cursorPositionBrand=void 0,this.lineNumber=C,this.column=o,this.leftoverVisibleColumns=c}}e.CursorPosition=I;class w{static leftPosition(C,o){if(o.column>C.getLineMinColumn(o.lineNumber))return o.delta(void 0,-k.prevCharLength(C.getLineContent(o.lineNumber),o.column-1));if(o.lineNumber>1){const c=o.lineNumber-1;return new _.Position(c,C.getLineMaxColumn(c))}else return o}static leftPositionAtomicSoftTabs(C,o,c){if(o.column<=C.getLineIndentColumn(o.lineNumber)){const i=C.getLineMinColumn(o.lineNumber),S=C.getLineContent(o.lineNumber),s=D.AtomicTabMoveOperations.atomicPosition(S,o.column-1,c,0);if(s!==-1&&s+1>=i)return new _.Position(o.lineNumber,s+1)}return this.leftPosition(C,o)}static left(C,o,c){const i=C.stickyTabStops?w.leftPositionAtomicSoftTabs(o,c,C.tabSize):w.leftPosition(o,c);return new I(i.lineNumber,i.column,0)}static moveLeft(C,o,c,i,S){let s,l;if(c.hasSelection()&&!i)s=c.selection.startLineNumber,l=c.selection.startColumn;else{const r=c.position.delta(void 0,-(S-1)),p=o.normalizePosition(w.clipPositionColumn(r,o),0),u=w.left(C,o,p);s=u.lineNumber,l=u.column}return c.move(i,s,l,0)}static clipPositionColumn(C,o){return new _.Position(C.lineNumber,w.clipRange(C.column,o.getLineMinColumn(C.lineNumber),o.getLineMaxColumn(C.lineNumber)))}static clipRange(C,o,c){return C<o?o:C>c?c:C}static rightPosition(C,o,c){return c<C.getLineMaxColumn(o)?c=c+k.nextCharLength(C.getLineContent(o),c-1):o<C.getLineCount()&&(o=o+1,c=C.getLineMinColumn(o)),new _.Position(o,c)}static rightPositionAtomicSoftTabs(C,o,c,i,S){if(c<C.getLineIndentColumn(o)){const s=C.getLineContent(o),l=D.AtomicTabMoveOperations.atomicPosition(s,c-1,i,1);if(l!==-1)return new _.Position(o,l+1)}return this.rightPosition(C,o,c)}static right(C,o,c){const i=C.stickyTabStops?w.rightPositionAtomicSoftTabs(o,c.lineNumber,c.column,C.tabSize,C.indentSize):w.rightPosition(o,c.lineNumber,c.column);return new I(i.lineNumber,i.column,0)}static moveRight(C,o,c,i,S){let s,l;if(c.hasSelection()&&!i)s=c.selection.endLineNumber,l=c.selection.endColumn;else{const r=c.position.delta(void 0,S-1),p=o.normalizePosition(w.clipPositionColumn(r,o),1),u=w.right(C,o,p);s=u.lineNumber,l=u.column}return c.move(i,s,l,0)}static vertical(C,o,c,i,S,s,l,r){const p=f.CursorColumns.visibleColumnFromColumn(o.getLineContent(c),i,C.tabSize)+S,u=o.getLineCount(),a=c===1&&i===1,n=c===u&&i===o.getLineMaxColumn(c),h=s<c?a:n;if(c=s,c<1?(c=1,l?i=o.getLineMinColumn(c):i=Math.min(o.getLineMaxColumn(c),i)):c>u?(c=u,l?i=o.getLineMaxColumn(c):i=Math.min(o.getLineMaxColumn(c),i)):i=C.columnFromVisibleColumn(o,c,p),h?S=0:S=p-f.CursorColumns.visibleColumnFromColumn(o.getLineContent(c),i,C.tabSize),r!==void 0){const g=new _.Position(c,i),d=o.normalizePosition(g,r);S=S+(i-d.column),c=d.lineNumber,i=d.column}return new I(c,i,S)}static down(C,o,c,i,S,s,l){return this.vertical(C,o,c,i,S,c+s,l,1)}static moveDown(C,o,c,i,S){let s,l;c.hasSelection()&&!i?(s=c.selection.endLineNumber,l=c.selection.endColumn):(s=c.position.lineNumber,l=c.position.column);const r=w.down(C,o,s,l,c.leftoverVisibleColumns,S,!0);return c.move(i,r.lineNumber,r.column,r.leftoverVisibleColumns)}static translateDown(C,o,c){const i=c.selection,S=w.down(C,o,i.selectionStartLineNumber,i.selectionStartColumn,c.selectionStartLeftoverVisibleColumns,1,!1),s=w.down(C,o,i.positionLineNumber,i.positionColumn,c.leftoverVisibleColumns,1,!1);return new t.SingleCursorState(new A.Range(S.lineNumber,S.column,S.lineNumber,S.column),S.leftoverVisibleColumns,new _.Position(s.lineNumber,s.column),s.leftoverVisibleColumns)}static up(C,o,c,i,S,s,l){return this.vertical(C,o,c,i,S,c-s,l,0)}static moveUp(C,o,c,i,S){let s,l;c.hasSelection()&&!i?(s=c.selection.startLineNumber,l=c.selection.startColumn):(s=c.position.lineNumber,l=c.position.column);const r=w.up(C,o,s,l,c.leftoverVisibleColumns,S,!0);return c.move(i,r.lineNumber,r.column,r.leftoverVisibleColumns)}static translateUp(C,o,c){const i=c.selection,S=w.up(C,o,i.selectionStartLineNumber,i.selectionStartColumn,c.selectionStartLeftoverVisibleColumns,1,!1),s=w.up(C,o,i.positionLineNumber,i.positionColumn,c.leftoverVisibleColumns,1,!1);return new t.SingleCursorState(new A.Range(S.lineNumber,S.column,S.lineNumber,S.column),S.leftoverVisibleColumns,new _.Position(s.lineNumber,s.column),s.leftoverVisibleColumns)}static _isBlankLine(C,o){return C.getLineFirstNonWhitespaceColumn(o)===0}static moveToPrevBlankLine(C,o,c,i){let S=c.position.lineNumber;for(;S>1&&this._isBlankLine(o,S);)S--;for(;S>1&&!this._isBlankLine(o,S);)S--;return c.move(i,S,o.getLineMinColumn(S),0)}static moveToNextBlankLine(C,o,c,i){const S=o.getLineCount();let s=c.position.lineNumber;for(;s<S&&this._isBlankLine(o,s);)s++;for(;s<S&&!this._isBlankLine(o,s);)s++;return c.move(i,s,o.getLineMinColumn(s),0)}static moveToBeginningOfLine(C,o,c,i){const S=c.position.lineNumber,s=o.getLineMinColumn(S),l=o.getLineFirstNonWhitespaceColumn(S)||s;let r;return c.position.column===l?r=s:r=l,c.move(i,S,r,0)}static moveToEndOfLine(C,o,c,i,S){const s=c.position.lineNumber,l=o.getLineMaxColumn(s);return c.move(i,s,l,S?1073741824-l:0)}static moveToBeginningOfBuffer(C,o,c,i){return c.move(i,1,1,0)}static moveToEndOfBuffer(C,o,c,i){const S=o.getLineCount(),s=o.getLineMaxColumn(S);return c.move(i,S,s,0)}}e.MoveOperations=w}),define(ne[526],re([1,0,29,341,226,243,525,20,49]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DeleteOperations=void 0;class w{static deleteRight(C,o,c,i){const S=[];let s=C!==3;for(let l=0,r=i.length;l<r;l++){const p=i[l];let u=p;if(u.isEmpty()){const a=p.getPosition(),n=k.MoveOperations.right(o,c,a);u=new D.Range(n.lineNumber,n.column,a.lineNumber,a.column)}if(u.isEmpty()){S[l]=null;continue}u.startLineNumber!==u.endLineNumber&&(s=!0),S[l]=new f.ReplaceCommand(u,"")}return[s,S]}static isAutoClosingPairDelete(C,o,c,i,S,s,l){if(o==="never"&&c==="never"||C==="never")return!1;for(let r=0,p=s.length;r<p;r++){const u=s[r],a=u.getPosition();if(!u.isEmpty())return!1;const n=S.getLineContent(a.lineNumber);if(a.column<2||a.column>=n.length+1)return!1;const h=n.charAt(a.column-2),g=i.get(h);if(!g)return!1;if((0,_.isQuote)(h)){if(c==="never")return!1}else if(o==="never")return!1;const d=n.charAt(a.column-1);let m=!1;for(const b of g)b.open===h&&b.close===d&&(m=!0);if(!m)return!1;if(C==="auto"){let b=!1;for(let E=0,y=l.length;E<y;E++){const T=l[E];if(a.lineNumber===T.startLineNumber&&a.column===T.startColumn){b=!0;break}}if(!b)return!1}}return!0}static _runAutoClosingPairDelete(C,o,c){const i=[];for(let S=0,s=c.length;S<s;S++){const l=c[S].getPosition(),r=new D.Range(l.lineNumber,l.column-1,l.lineNumber,l.column+1);i[S]=new f.ReplaceCommand(r,"")}return[!0,i]}static deleteLeft(C,o,c,i,S){if(this.isAutoClosingPairDelete(o.autoClosingDelete,o.autoClosingBrackets,o.autoClosingQuotes,o.autoClosingPairs.autoClosingPairsOpenByEnd,c,i,S))return this._runAutoClosingPairDelete(o,c,i);const s=[];let l=C!==2;for(let r=0,p=i.length;r<p;r++){const u=w.getDeleteRange(i[r],c,o);if(u.isEmpty()){s[r]=null;continue}u.startLineNumber!==u.endLineNumber&&(l=!0),s[r]=new f.ReplaceCommand(u,"")}return[l,s]}static getDeleteRange(C,o,c){if(!C.isEmpty())return C;const i=C.getPosition();if(c.useTabStops&&i.column>1){const S=o.getLineContent(i.lineNumber),s=t.firstNonWhitespaceIndex(S),l=s===-1?S.length+1:s+1;if(i.column<=l){const r=c.visibleColumnFromColumn(o,i),p=A.CursorColumns.prevIndentTabStop(r,c.indentSize),u=c.columnFromVisibleColumn(o,i.lineNumber,p);return new D.Range(i.lineNumber,u,i.lineNumber,i.column)}}return D.Range.fromPositions(w.getPositionAfterDeleteLeft(i,o),i)}static getPositionAfterDeleteLeft(C,o){if(C.column>1){const c=t.getLeftDeleteOffset(C.column-1,o.getLineContent(C.lineNumber));return C.with(void 0,c+1)}else if(C.lineNumber>1){const c=C.lineNumber-1;return new I.Position(c,o.getLineMaxColumn(c))}else return C}static cut(C,o,c){const i=[];let S=null;c.sort((s,l)=>I.Position.compare(s.getStartPosition(),l.getEndPosition()));for(let s=0,l=c.length;s<l;s++){const r=c[s];if(r.isEmpty())if(C.emptySelectionClipboard){const p=r.getPosition();let u,a,n,h;p.lineNumber<o.getLineCount()?(u=p.lineNumber,a=1,n=p.lineNumber+1,h=1):p.lineNumber>1&&S?.endLineNumber!==p.lineNumber?(u=p.lineNumber-1,a=o.getLineMaxColumn(p.lineNumber-1),n=p.lineNumber,h=o.getLineMaxColumn(p.lineNumber)):(u=p.lineNumber,a=1,n=p.lineNumber,h=o.getLineMaxColumn(p.lineNumber));const g=new D.Range(u,a,n,h);S=g,g.isEmpty()?i[s]=null:i[s]=new f.ReplaceCommand(g,"")}else i[s]=null;else i[s]=new f.ReplaceCommand(r,"")}return new _.EditOperationResult(0,i,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}e.DeleteOperations=w}),define(ne[456],re([1,0,29,226,526,385,49,20]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordPartOperations=e.WordOperations=e.WordNavigationType=void 0;var I;(function(c){c[c.None=0]="None",c[c.Regular=1]="Regular",c[c.Separator=2]="Separator"})(I||(I={}));var w;(function(c){c[c.WordStart=0]="WordStart",c[c.WordStartFast=1]="WordStartFast",c[c.WordEnd=2]="WordEnd",c[c.WordAccessibility=3]="WordAccessibility"})(w=e.WordNavigationType||(e.WordNavigationType={}));class v{static _createWord(i,S,s,l,r){return{start:l,end:r,wordType:S,nextCharClass:s}}static _findPreviousWordOnLine(i,S,s){const l=S.getLineContent(s.lineNumber);return this._doFindPreviousWordOnLine(l,i,s)}static _doFindPreviousWordOnLine(i,S,s){let l=0;for(let r=s.column-2;r>=0;r--){const p=i.charCodeAt(r),u=S.get(p);if(u===0){if(l===2)return this._createWord(i,l,u,r+1,this._findEndOfWord(i,S,l,r+1));l=1}else if(u===2){if(l===1)return this._createWord(i,l,u,r+1,this._findEndOfWord(i,S,l,r+1));l=2}else if(u===1&&l!==0)return this._createWord(i,l,u,r+1,this._findEndOfWord(i,S,l,r+1))}return l!==0?this._createWord(i,l,1,0,this._findEndOfWord(i,S,l,0)):null}static _findEndOfWord(i,S,s,l){const r=i.length;for(let p=l;p<r;p++){const u=i.charCodeAt(p),a=S.get(u);if(a===1||s===1&&a===2||s===2&&a===0)return p}return r}static _findNextWordOnLine(i,S,s){const l=S.getLineContent(s.lineNumber);return this._doFindNextWordOnLine(l,i,s)}static _doFindNextWordOnLine(i,S,s){let l=0;const r=i.length;for(let p=s.column-1;p<r;p++){const u=i.charCodeAt(p),a=S.get(u);if(a===0){if(l===2)return this._createWord(i,l,a,this._findStartOfWord(i,S,l,p-1),p);l=1}else if(a===2){if(l===1)return this._createWord(i,l,a,this._findStartOfWord(i,S,l,p-1),p);l=2}else if(a===1&&l!==0)return this._createWord(i,l,a,this._findStartOfWord(i,S,l,p-1),p)}return l!==0?this._createWord(i,l,1,this._findStartOfWord(i,S,l,r-1),r):null}static _findStartOfWord(i,S,s,l){for(let r=l;r>=0;r--){const p=i.charCodeAt(r),u=S.get(p);if(u===1||s===1&&u===2||s===2&&u===0)return r+1}return 0}static moveWordLeft(i,S,s,l){let r=s.lineNumber,p=s.column;p===1&&r>1&&(r=r-1,p=S.getLineMaxColumn(r));let u=v._findPreviousWordOnLine(i,S,new k.Position(r,p));if(l===0)return new k.Position(r,u?u.start+1:1);if(l===1)return u&&u.wordType===2&&u.end-u.start==1&&u.nextCharClass===0&&(u=v._findPreviousWordOnLine(i,S,new k.Position(r,u.start+1))),new k.Position(r,u?u.start+1:1);if(l===3){for(;u&&u.wordType===2;)u=v._findPreviousWordOnLine(i,S,new k.Position(r,u.start+1));return new k.Position(r,u?u.start+1:1)}return u&&p<=u.end+1&&(u=v._findPreviousWordOnLine(i,S,new k.Position(r,u.start+1))),new k.Position(r,u?u.end+1:1)}static _moveWordPartLeft(i,S){const s=S.lineNumber,l=i.getLineMaxColumn(s);if(S.column===1)return s>1?new k.Position(s-1,i.getLineMaxColumn(s-1)):S;const r=i.getLineContent(s);for(let p=S.column-1;p>1;p--){const u=r.charCodeAt(p-2),a=r.charCodeAt(p-1);if(u===95&&a!==95)return new k.Position(s,p);if(t.isLowerAsciiLetter(u)&&t.isUpperAsciiLetter(a))return new k.Position(s,p);if(t.isUpperAsciiLetter(u)&&t.isUpperAsciiLetter(a)&&p+1<l){const n=r.charCodeAt(p);if(t.isLowerAsciiLetter(n))return new k.Position(s,p)}}return new k.Position(s,1)}static moveWordRight(i,S,s,l){let r=s.lineNumber,p=s.column,u=!1;p===S.getLineMaxColumn(r)&&r<S.getLineCount()&&(u=!0,r=r+1,p=1);let a=v._findNextWordOnLine(i,S,new k.Position(r,p));if(l===2)a&&a.wordType===2&&a.end-a.start==1&&a.nextCharClass===0&&(a=v._findNextWordOnLine(i,S,new k.Position(r,a.end+1))),a?p=a.end+1:p=S.getLineMaxColumn(r);else if(l===3){for(u&&(p=0);a&&(a.wordType===2||a.start+1<=p);)a=v._findNextWordOnLine(i,S,new k.Position(r,a.end+1));a?p=a.start+1:p=S.getLineMaxColumn(r)}else a&&!u&&p>=a.start+1&&(a=v._findNextWordOnLine(i,S,new k.Position(r,a.end+1))),a?p=a.start+1:p=S.getLineMaxColumn(r);return new k.Position(r,p)}static _moveWordPartRight(i,S){const s=S.lineNumber,l=i.getLineMaxColumn(s);if(S.column===l)return s<i.getLineCount()?new k.Position(s+1,1):S;const r=i.getLineContent(s);for(let p=S.column+1;p<l;p++){const u=r.charCodeAt(p-2),a=r.charCodeAt(p-1);if(u!==95&&a===95)return new k.Position(s,p);if(t.isLowerAsciiLetter(u)&&t.isUpperAsciiLetter(a))return new k.Position(s,p);if(t.isUpperAsciiLetter(u)&&t.isUpperAsciiLetter(a)&&p+1<l){const n=r.charCodeAt(p);if(t.isLowerAsciiLetter(n))return new k.Position(s,p)}}return new k.Position(s,l)}static _deleteWordLeftWhitespace(i,S){const s=i.getLineContent(S.lineNumber),l=S.column-2,r=t.lastNonWhitespaceIndex(s,l);return r+1<l?new D.Range(S.lineNumber,r+2,S.lineNumber,S.column):null}static deleteWordLeft(i,S){const s=i.wordSeparators,l=i.model,r=i.selection,p=i.whitespaceHeuristics;if(!r.isEmpty())return r;if(_.DeleteOperations.isAutoClosingPairDelete(i.autoClosingDelete,i.autoClosingBrackets,i.autoClosingQuotes,i.autoClosingPairs.autoClosingPairsOpenByEnd,i.model,[i.selection],i.autoClosedCharacters)){const g=i.selection.getPosition();return new D.Range(g.lineNumber,g.column-1,g.lineNumber,g.column+1)}const u=new k.Position(r.positionLineNumber,r.positionColumn);let a=u.lineNumber,n=u.column;if(a===1&&n===1)return null;if(p){const g=this._deleteWordLeftWhitespace(l,u);if(g)return g}let h=v._findPreviousWordOnLine(s,l,u);return S===0?h?n=h.start+1:n>1?n=1:(a--,n=l.getLineMaxColumn(a)):(h&&n<=h.end+1&&(h=v._findPreviousWordOnLine(s,l,new k.Position(a,h.start+1))),h?n=h.end+1:n>1?n=1:(a--,n=l.getLineMaxColumn(a))),new D.Range(a,n,u.lineNumber,u.column)}static deleteInsideWord(i,S,s){if(!s.isEmpty())return s;const l=new k.Position(s.positionLineNumber,s.positionColumn),r=this._deleteInsideWordWhitespace(S,l);return r||this._deleteInsideWordDetermineDeleteRange(i,S,l)}static _charAtIsWhitespace(i,S){const s=i.charCodeAt(S);return s===32||s===9}static _deleteInsideWordWhitespace(i,S){const s=i.getLineContent(S.lineNumber),l=s.length;if(l===0)return null;let r=Math.max(S.column-2,0);if(!this._charAtIsWhitespace(s,r))return null;let p=Math.min(S.column-1,l-1);if(!this._charAtIsWhitespace(s,p))return null;for(;r>0&&this._charAtIsWhitespace(s,r-1);)r--;for(;p+1<l&&this._charAtIsWhitespace(s,p+1);)p++;return new D.Range(S.lineNumber,r+1,S.lineNumber,p+2)}static _deleteInsideWordDetermineDeleteRange(i,S,s){const l=S.getLineContent(s.lineNumber),r=l.length;if(r===0)return s.lineNumber>1?new D.Range(s.lineNumber-1,S.getLineMaxColumn(s.lineNumber-1),s.lineNumber,1):s.lineNumber<S.getLineCount()?new D.Range(s.lineNumber,1,s.lineNumber+1,1):new D.Range(s.lineNumber,1,s.lineNumber,1);const p=g=>g.start+1<=s.column&&s.column<=g.end+1,u=(g,d)=>(g=Math.min(g,s.column),d=Math.max(d,s.column),new D.Range(s.lineNumber,g,s.lineNumber,d)),a=g=>{let d=g.start+1,m=g.end+1,b=!1;for(;m-1<r&&this._charAtIsWhitespace(l,m-1);)b=!0,m++;if(!b)for(;d>1&&this._charAtIsWhitespace(l,d-2);)d--;return u(d,m)},n=v._findPreviousWordOnLine(i,S,s);if(n&&p(n))return a(n);const h=v._findNextWordOnLine(i,S,s);return h&&p(h)?a(h):n&&h?u(n.end+1,h.start+1):n?u(n.start+1,n.end+1):h?u(h.start+1,h.end+1):u(1,r+1)}static _deleteWordPartLeft(i,S){if(!S.isEmpty())return S;const s=S.getPosition(),l=v._moveWordPartLeft(i,s);return new D.Range(s.lineNumber,s.column,l.lineNumber,l.column)}static _findFirstNonWhitespaceChar(i,S){const s=i.length;for(let l=S;l<s;l++){const r=i.charAt(l);if(r!==" "&&r!==" ")return l}return s}static _deleteWordRightWhitespace(i,S){const s=i.getLineContent(S.lineNumber),l=S.column-1,r=this._findFirstNonWhitespaceChar(s,l);return l+1<r?new D.Range(S.lineNumber,S.column,S.lineNumber,r+1):null}static deleteWordRight(i,S){const s=i.wordSeparators,l=i.model,r=i.selection,p=i.whitespaceHeuristics;if(!r.isEmpty())return r;const u=new k.Position(r.positionLineNumber,r.positionColumn);let a=u.lineNumber,n=u.column;const h=l.getLineCount(),g=l.getLineMaxColumn(a);if(a===h&&n===g)return null;if(p){const m=this._deleteWordRightWhitespace(l,u);if(m)return m}let d=v._findNextWordOnLine(s,l,u);return S===2?d?n=d.end+1:n<g||a===h?n=g:(a++,d=v._findNextWordOnLine(s,l,new k.Position(a,1)),d?n=d.start+1:n=l.getLineMaxColumn(a)):(d&&n>=d.start+1&&(d=v._findNextWordOnLine(s,l,new k.Position(a,d.end+1))),d?n=d.start+1:n<g||a===h?n=g:(a++,d=v._findNextWordOnLine(s,l,new k.Position(a,1)),d?n=d.start+1:n=l.getLineMaxColumn(a))),new D.Range(a,n,u.lineNumber,u.column)}static _deleteWordPartRight(i,S){if(!S.isEmpty())return S;const s=S.getPosition(),l=v._moveWordPartRight(i,s);return new D.Range(s.lineNumber,s.column,l.lineNumber,l.column)}static _createWordAtPosition(i,S,s){const l=new D.Range(S,s.start+1,S,s.end+1);return{word:i.getValueInRange(l),startColumn:l.startColumn,endColumn:l.endColumn}}static getWordAtPosition(i,S,s){const l=(0,A.getMapForWordSeparators)(S),r=v._findPreviousWordOnLine(l,i,s);if(r&&r.wordType===1&&r.start<=s.column-1&&s.column-1<=r.end)return v._createWordAtPosition(i,s.lineNumber,r);const p=v._findNextWordOnLine(l,i,s);return p&&p.wordType===1&&p.start<=s.column-1&&s.column-1<=p.end?v._createWordAtPosition(i,s.lineNumber,p):null}static word(i,S,s,l,r){const p=(0,A.getMapForWordSeparators)(i.wordSeparators),u=v._findPreviousWordOnLine(p,S,r),a=v._findNextWordOnLine(p,S,r);if(!l){let m,b;return u&&u.wordType===1&&u.start<=r.column-1&&r.column-1<=u.end?(m=u.start+1,b=u.end+1):a&&a.wordType===1&&a.start<=r.column-1&&r.column-1<=a.end?(m=a.start+1,b=a.end+1):(u?m=u.end+1:m=1,a?b=a.start+1:b=S.getLineMaxColumn(r.lineNumber)),new f.SingleCursorState(new D.Range(r.lineNumber,m,r.lineNumber,b),0,new k.Position(r.lineNumber,b),0)}let n,h;u&&u.wordType===1&&u.start<r.column-1&&r.column-1<u.end?(n=u.start+1,h=u.end+1):a&&a.wordType===1&&a.start<r.column-1&&r.column-1<a.end?(n=a.start+1,h=a.end+1):(n=r.column,h=r.column);const g=r.lineNumber;let d;if(s.selectionStart.containsPosition(r))d=s.selectionStart.endColumn;else if(r.isBeforeOrEqual(s.selectionStart.getStartPosition())){d=n;const m=new k.Position(g,d);s.selectionStart.containsPosition(m)&&(d=s.selectionStart.endColumn)}else{d=h;const m=new k.Position(g,d);s.selectionStart.containsPosition(m)&&(d=s.selectionStart.startColumn)}return s.move(!0,g,d,0)}}e.WordOperations=v;class C extends v{static deleteWordPartLeft(i){const S=o([v.deleteWordLeft(i,0),v.deleteWordLeft(i,2),v._deleteWordPartLeft(i.model,i.selection)]);return S.sort(D.Range.compareRangesUsingEnds),S[2]}static deleteWordPartRight(i){const S=o([v.deleteWordRight(i,0),v.deleteWordRight(i,2),v._deleteWordPartRight(i.model,i.selection)]);return S.sort(D.Range.compareRangesUsingStarts),S[0]}static moveWordPartLeft(i,S,s){const l=o([v.moveWordLeft(i,S,s,0),v.moveWordLeft(i,S,s,2),v._moveWordPartLeft(S,s)]);return l.sort(k.Position.compare),l[2]}static moveWordPartRight(i,S,s){const l=o([v.moveWordRight(i,S,s,0),v.moveWordRight(i,S,s,2),v._moveWordPartRight(S,s)]);return l.sort(k.Position.compare),l[0]}}e.WordPartOperations=C;function o(c){return c.filter(i=>Boolean(i))}}),define(ne[527],re([1,0,13,226,525,456,49,20]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorMove=e.CursorMoveCommands=void 0;class I{static addCursorDown(C,o,c){const i=[];let S=0;for(let s=0,l=o.length;s<l;s++){const r=o[s];i[S++]=new f.CursorState(r.modelState,r.viewState),c?i[S++]=f.CursorState.fromModelState(_.MoveOperations.translateDown(C.cursorConfig,C.model,r.modelState)):i[S++]=f.CursorState.fromViewState(_.MoveOperations.translateDown(C.cursorConfig,C,r.viewState))}return i}static addCursorUp(C,o,c){const i=[];let S=0;for(let s=0,l=o.length;s<l;s++){const r=o[s];i[S++]=new f.CursorState(r.modelState,r.viewState),c?i[S++]=f.CursorState.fromModelState(_.MoveOperations.translateUp(C.cursorConfig,C.model,r.modelState)):i[S++]=f.CursorState.fromViewState(_.MoveOperations.translateUp(C.cursorConfig,C,r.viewState))}return i}static moveToBeginningOfLine(C,o,c){let i=[];for(let S=0,s=o.length;S<s;S++){const l=o[S];i[S]=this._moveToLineStart(C,l,c)}return i}static _moveToLineStart(C,o,c){const i=o.viewState.position.column,S=o.modelState.position.column,s=i===S,l=o.viewState.position.lineNumber,r=C.getLineFirstNonWhitespaceColumn(l);return!s&&!(i===r)?this._moveToLineStartByView(C,o,c):this._moveToLineStartByModel(C,o,c)}static _moveToLineStartByView(C,o,c){return f.CursorState.fromViewState(_.MoveOperations.moveToBeginningOfLine(C.cursorConfig,C,o.viewState,c))}static _moveToLineStartByModel(C,o,c){return f.CursorState.fromModelState(_.MoveOperations.moveToBeginningOfLine(C.cursorConfig,C.model,o.modelState,c))}static moveToEndOfLine(C,o,c,i){const S=[];for(let s=0,l=o.length;s<l;s++){const r=o[s];S[s]=this._moveToLineEnd(C,r,c,i)}return S}static _moveToLineEnd(C,o,c,i){const S=o.viewState.position,s=C.getLineMaxColumn(S.lineNumber),l=S.column===s,r=o.modelState.position,p=C.model.getLineMaxColumn(r.lineNumber),u=s-S.column==p-r.column;return l||u?this._moveToLineEndByModel(C,o,c,i):this._moveToLineEndByView(C,o,c,i)}static _moveToLineEndByView(C,o,c,i){return f.CursorState.fromViewState(_.MoveOperations.moveToEndOfLine(C.cursorConfig,C,o.viewState,c,i))}static _moveToLineEndByModel(C,o,c,i){return f.CursorState.fromModelState(_.MoveOperations.moveToEndOfLine(C.cursorConfig,C.model,o.modelState,c,i))}static expandLineSelection(C,o){const c=[];for(let i=0,S=o.length;i<S;i++){const s=o[i],l=s.modelState.selection.startLineNumber,r=C.model.getLineCount();let p=s.modelState.selection.endLineNumber,u;p===r?u=C.model.getLineMaxColumn(r):(p++,u=1),c[i]=f.CursorState.fromModelState(new f.SingleCursorState(new D.Range(l,1,l,1),0,new k.Position(p,u),0))}return c}static moveToBeginningOfBuffer(C,o,c){const i=[];for(let S=0,s=o.length;S<s;S++){const l=o[S];i[S]=f.CursorState.fromModelState(_.MoveOperations.moveToBeginningOfBuffer(C.cursorConfig,C.model,l.modelState,c))}return i}static moveToEndOfBuffer(C,o,c){const i=[];for(let S=0,s=o.length;S<s;S++){const l=o[S];i[S]=f.CursorState.fromModelState(_.MoveOperations.moveToEndOfBuffer(C.cursorConfig,C.model,l.modelState,c))}return i}static selectAll(C,o){const c=C.model.getLineCount(),i=C.model.getLineMaxColumn(c);return f.CursorState.fromModelState(new f.SingleCursorState(new D.Range(1,1,1,1),0,new k.Position(c,i),0))}static line(C,o,c,i,S){const s=C.model.validatePosition(i),l=S?C.coordinatesConverter.validateViewPosition(new k.Position(S.lineNumber,S.column),s):C.coordinatesConverter.convertModelPositionToViewPosition(s);if(!c||!o.modelState.hasSelection()){const p=C.model.getLineCount();let u=s.lineNumber+1,a=1;return u>p&&(u=p,a=C.model.getLineMaxColumn(u)),f.CursorState.fromModelState(new f.SingleCursorState(new D.Range(s.lineNumber,1,u,a),0,new k.Position(u,a),0))}const r=o.modelState.selectionStart.getStartPosition().lineNumber;if(s.lineNumber<r)return f.CursorState.fromViewState(o.viewState.move(o.modelState.hasSelection(),l.lineNumber,1,0));if(s.lineNumber>r){const p=C.getLineCount();let u=l.lineNumber+1,a=1;return u>p&&(u=p,a=C.getLineMaxColumn(u)),f.CursorState.fromViewState(o.viewState.move(o.modelState.hasSelection(),u,a,0))}else{const p=o.modelState.selectionStart.getEndPosition();return f.CursorState.fromModelState(o.modelState.move(o.modelState.hasSelection(),p.lineNumber,p.column,0))}}static word(C,o,c,i){const S=C.model.validatePosition(i);return f.CursorState.fromModelState(A.WordOperations.word(C.cursorConfig,C.model,o.modelState,c,S))}static cancelSelection(C,o){if(!o.modelState.hasSelection())return new f.CursorState(o.modelState,o.viewState);const c=o.viewState.position.lineNumber,i=o.viewState.position.column;return f.CursorState.fromViewState(new f.SingleCursorState(new D.Range(c,i,c,i),0,new k.Position(c,i),0))}static moveTo(C,o,c,i,S){const s=C.model.validatePosition(i),l=S?C.coordinatesConverter.validateViewPosition(new k.Position(S.lineNumber,S.column),s):C.coordinatesConverter.convertModelPositionToViewPosition(s);return f.CursorState.fromViewState(o.viewState.move(c,l.lineNumber,l.column,0))}static simpleMove(C,o,c,i,S,s){switch(c){case 0:return s===4?this._moveHalfLineLeft(C,o,i):this._moveLeft(C,o,i,S);case 1:return s===4?this._moveHalfLineRight(C,o,i):this._moveRight(C,o,i,S);case 2:return s===2?this._moveUpByViewLines(C,o,i,S):this._moveUpByModelLines(C,o,i,S);case 3:return s===2?this._moveDownByViewLines(C,o,i,S):this._moveDownByModelLines(C,o,i,S);case 4:return s===2?o.map(l=>f.CursorState.fromViewState(_.MoveOperations.moveToPrevBlankLine(C.cursorConfig,C,l.viewState,i))):o.map(l=>f.CursorState.fromModelState(_.MoveOperations.moveToPrevBlankLine(C.cursorConfig,C.model,l.modelState,i)));case 5:return s===2?o.map(l=>f.CursorState.fromViewState(_.MoveOperations.moveToNextBlankLine(C.cursorConfig,C,l.viewState,i))):o.map(l=>f.CursorState.fromModelState(_.MoveOperations.moveToNextBlankLine(C.cursorConfig,C.model,l.modelState,i)));case 6:return this._moveToViewMinColumn(C,o,i);case 7:return this._moveToViewFirstNonWhitespaceColumn(C,o,i);case 8:return this._moveToViewCenterColumn(C,o,i);case 9:return this._moveToViewMaxColumn(C,o,i);case 10:return this._moveToViewLastNonWhitespaceColumn(C,o,i);default:return null}}static viewportMove(C,o,c,i,S){const s=C.getCompletelyVisibleViewRange(),l=C.coordinatesConverter.convertViewRangeToModelRange(s);switch(c){case 11:{const r=this._firstLineNumberInRange(C.model,l,S),p=C.model.getLineFirstNonWhitespaceColumn(r);return[this._moveToModelPosition(C,o[0],i,r,p)]}case 13:{const r=this._lastLineNumberInRange(C.model,l,S),p=C.model.getLineFirstNonWhitespaceColumn(r);return[this._moveToModelPosition(C,o[0],i,r,p)]}case 12:{const r=Math.round((l.startLineNumber+l.endLineNumber)/2),p=C.model.getLineFirstNonWhitespaceColumn(r);return[this._moveToModelPosition(C,o[0],i,r,p)]}case 14:{const r=[];for(let p=0,u=o.length;p<u;p++){const a=o[p];r[p]=this.findPositionInViewportIfOutside(C,a,s,i)}return r}default:return null}}static findPositionInViewportIfOutside(C,o,c,i){const S=o.viewState.position.lineNumber;if(c.startLineNumber<=S&&S<=c.endLineNumber-1)return new f.CursorState(o.modelState,o.viewState);{let s;S>c.endLineNumber-1?s=c.endLineNumber-1:S<c.startLineNumber?s=c.startLineNumber:s=S;const l=_.MoveOperations.vertical(C.cursorConfig,C,S,o.viewState.position.column,o.viewState.leftoverVisibleColumns,s,!1);return f.CursorState.fromViewState(o.viewState.move(i,l.lineNumber,l.column,l.leftoverVisibleColumns))}}static _firstLineNumberInRange(C,o,c){let i=o.startLineNumber;return o.startColumn!==C.getLineMinColumn(i)&&i++,Math.min(o.endLineNumber,i+c-1)}static _lastLineNumberInRange(C,o,c){let i=o.startLineNumber;return o.startColumn!==C.getLineMinColumn(i)&&i++,Math.max(i,o.endLineNumber-c+1)}static _moveLeft(C,o,c,i){return o.map(S=>f.CursorState.fromViewState(_.MoveOperations.moveLeft(C.cursorConfig,C,S.viewState,c,i)))}static _moveHalfLineLeft(C,o,c){const i=[];for(let S=0,s=o.length;S<s;S++){const l=o[S],r=l.viewState.position.lineNumber,p=Math.round(C.getLineContent(r).length/2);i[S]=f.CursorState.fromViewState(_.MoveOperations.moveLeft(C.cursorConfig,C,l.viewState,c,p))}return i}static _moveRight(C,o,c,i){return o.map(S=>f.CursorState.fromViewState(_.MoveOperations.moveRight(C.cursorConfig,C,S.viewState,c,i)))}static _moveHalfLineRight(C,o,c){const i=[];for(let S=0,s=o.length;S<s;S++){const l=o[S],r=l.viewState.position.lineNumber,p=Math.round(C.getLineContent(r).length/2);i[S]=f.CursorState.fromViewState(_.MoveOperations.moveRight(C.cursorConfig,C,l.viewState,c,p))}return i}static _moveDownByViewLines(C,o,c,i){const S=[];for(let s=0,l=o.length;s<l;s++){const r=o[s];S[s]=f.CursorState.fromViewState(_.MoveOperations.moveDown(C.cursorConfig,C,r.viewState,c,i))}return S}static _moveDownByModelLines(C,o,c,i){const S=[];for(let s=0,l=o.length;s<l;s++){const r=o[s];S[s]=f.CursorState.fromModelState(_.MoveOperations.moveDown(C.cursorConfig,C.model,r.modelState,c,i))}return S}static _moveUpByViewLines(C,o,c,i){const S=[];for(let s=0,l=o.length;s<l;s++){const r=o[s];S[s]=f.CursorState.fromViewState(_.MoveOperations.moveUp(C.cursorConfig,C,r.viewState,c,i))}return S}static _moveUpByModelLines(C,o,c,i){const S=[];for(let s=0,l=o.length;s<l;s++){const r=o[s];S[s]=f.CursorState.fromModelState(_.MoveOperations.moveUp(C.cursorConfig,C.model,r.modelState,c,i))}return S}static _moveToViewPosition(C,o,c,i,S){return f.CursorState.fromViewState(o.viewState.move(c,i,S,0))}static _moveToModelPosition(C,o,c,i,S){return f.CursorState.fromModelState(o.modelState.move(c,i,S,0))}static _moveToViewMinColumn(C,o,c){const i=[];for(let S=0,s=o.length;S<s;S++){const l=o[S],r=l.viewState.position.lineNumber,p=C.getLineMinColumn(r);i[S]=this._moveToViewPosition(C,l,c,r,p)}return i}static _moveToViewFirstNonWhitespaceColumn(C,o,c){const i=[];for(let S=0,s=o.length;S<s;S++){const l=o[S],r=l.viewState.position.lineNumber,p=C.getLineFirstNonWhitespaceColumn(r);i[S]=this._moveToViewPosition(C,l,c,r,p)}return i}static _moveToViewCenterColumn(C,o,c){const i=[];for(let S=0,s=o.length;S<s;S++){const l=o[S],r=l.viewState.position.lineNumber,p=Math.round((C.getLineMaxColumn(r)+C.getLineMinColumn(r))/2);i[S]=this._moveToViewPosition(C,l,c,r,p)}return i}static _moveToViewMaxColumn(C,o,c){const i=[];for(let S=0,s=o.length;S<s;S++){const l=o[S],r=l.viewState.position.lineNumber,p=C.getLineMaxColumn(r);i[S]=this._moveToViewPosition(C,l,c,r,p)}return i}static _moveToViewLastNonWhitespaceColumn(C,o,c){const i=[];for(let S=0,s=o.length;S<s;S++){const l=o[S],r=l.viewState.position.lineNumber,p=C.getLineLastNonWhitespaceColumn(r);i[S]=this._moveToViewPosition(C,l,c,r,p)}return i}}e.CursorMoveCommands=I;var w;(function(v){const C=function(S){if(!t.isObject(S))return!1;const s=S;return!(!t.isString(s.to)||!t.isUndefined(s.select)&&!t.isBoolean(s.select)||!t.isUndefined(s.by)&&!t.isString(s.by)||!t.isUndefined(s.value)&&!t.isNumber(s.value))};v.description={description:"Move cursor to a logical position in the view",args:[{name:"Cursor move argument object",description:`Property-value pairs that can be passed through this argument: * 'to': A mandatory logical position value providing where to move the cursor. \`\`\` 'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine', 'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter' 'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter' 'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside' \`\`\` * 'by': Unit to move. Default is computed based on 'to' value. \`\`\` 'line', 'wrappedLine', 'character', 'halfLine' \`\`\` * 'value': Number of units to move. Default is '1'. * 'select': If 'true' makes the selection. Default is 'false'. `,constraint:C,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["left","right","up","down","prevBlankLine","nextBlankLine","wrappedLineStart","wrappedLineEnd","wrappedLineColumnCenter","wrappedLineFirstNonWhitespaceCharacter","wrappedLineLastNonWhitespaceCharacter","viewPortTop","viewPortCenter","viewPortBottom","viewPortIfOutside"]},by:{type:"string",enum:["line","wrappedLine","character","halfLine"]},value:{type:"number",default:1},select:{type:"boolean",default:!1}}}}]},v.RawDirection={Left:"left",Right:"right",Up:"up",Down:"down",PrevBlankLine:"prevBlankLine",NextBlankLine:"nextBlankLine",WrappedLineStart:"wrappedLineStart",WrappedLineFirstNonWhitespaceCharacter:"wrappedLineFirstNonWhitespaceCharacter",WrappedLineColumnCenter:"wrappedLineColumnCenter",WrappedLineEnd:"wrappedLineEnd",WrappedLineLastNonWhitespaceCharacter:"wrappedLineLastNonWhitespaceCharacter",ViewPortTop:"viewPortTop",ViewPortCenter:"viewPortCenter",ViewPortBottom:"viewPortBottom",ViewPortIfOutside:"viewPortIfOutside"},v.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"};function o(S){if(!S.to)return null;let s;switch(S.to){case v.RawDirection.Left:s=0;break;case v.RawDirection.Right:s=1;break;case v.RawDirection.Up:s=2;break;case v.RawDirection.Down:s=3;break;case v.RawDirection.PrevBlankLine:s=4;break;case v.RawDirection.NextBlankLine:s=5;break;case v.RawDirection.WrappedLineStart:s=6;break;case v.RawDirection.WrappedLineFirstNonWhitespaceCharacter:s=7;break;case v.RawDirection.WrappedLineColumnCenter:s=8;break;case v.RawDirection.WrappedLineEnd:s=9;break;case v.RawDirection.WrappedLineLastNonWhitespaceCharacter:s=10;break;case v.RawDirection.ViewPortTop:s=11;break;case v.RawDirection.ViewPortBottom:s=13;break;case v.RawDirection.ViewPortCenter:s=12;break;case v.RawDirection.ViewPortIfOutside:s=14;break;default:return null}let l=0;switch(S.by){case v.RawUnit.Line:l=1;break;case v.RawUnit.WrappedLine:l=2;break;case v.RawUnit.Character:l=3;break;case v.RawUnit.HalfLine:l=4;break}return{direction:s,unit:l,select:!!S.select,value:S.value||1}}v.parse=o;let c;(function(S){S[S.Left=0]="Left",S[S.Right=1]="Right",S[S.Up=2]="Up",S[S.Down=3]="Down",S[S.PrevBlankLine=4]="PrevBlankLine",S[S.NextBlankLine=5]="NextBlankLine",S[S.WrappedLineStart=6]="WrappedLineStart",S[S.WrappedLineFirstNonWhitespaceCharacter=7]="WrappedLineFirstNonWhitespaceCharacter",S[S.WrappedLineColumnCenter=8]="WrappedLineColumnCenter",S[S.WrappedLineEnd=9]="WrappedLineEnd",S[S.WrappedLineLastNonWhitespaceCharacter=10]="WrappedLineLastNonWhitespaceCharacter",S[S.ViewPortTop=11]="ViewPortTop",S[S.ViewPortCenter=12]="ViewPortCenter",S[S.ViewPortBottom=13]="ViewPortBottom",S[S.ViewPortIfOutside=14]="ViewPortIfOutside"})(c=v.Direction||(v.Direction={}));let i;(function(S){S[S.None=0]="None",S[S.Line=1]="Line",S[S.WrappedLine=2]="WrappedLine",S[S.Character=3]="Character",S[S.HalfLine=4]="HalfLine"})(i=v.Unit||(v.Unit={}))})(w=e.CursorMove||(e.CursorMove={}))}),define(ne[1149],re([1,0,226,49,20,84]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Cursor=void 0;class k{constructor(I){this._selTrackedRange=null,this._trackSelection=!0,this._setState(I,new t.SingleCursorState(new _.Range(1,1,1,1),0,new f.Position(1,1),0),new t.SingleCursorState(new _.Range(1,1,1,1),0,new f.Position(1,1),0))}dispose(I){this._removeTrackedRange(I)}startTrackingSelection(I){this._trackSelection=!0,this._updateTrackedRange(I)}stopTrackingSelection(I){this._trackSelection=!1,this._removeTrackedRange(I)}_updateTrackedRange(I){!this._trackSelection||(this._selTrackedRange=I.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(I){this._selTrackedRange=I.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new t.CursorState(this.modelState,this.viewState)}readSelectionFromMarkers(I){const w=I.model._getTrackedRange(this._selTrackedRange);return A.Selection.fromRange(w,this.modelState.selection.getDirection())}ensureValidState(I){this._setState(I,this.modelState,this.viewState)}setState(I,w,v){this._setState(I,w,v)}static _validatePositionWithCache(I,w,v,C){return w.equals(v)?C:I.normalizePosition(w,2)}static _validateViewState(I,w){const v=w.position,C=w.selectionStart.getStartPosition(),o=w.selectionStart.getEndPosition(),c=I.normalizePosition(v,2),i=this._validatePositionWithCache(I,C,v,c),S=this._validatePositionWithCache(I,o,C,i);return v.equals(c)&&C.equals(i)&&o.equals(S)?w:new t.SingleCursorState(_.Range.fromPositions(i,S),w.selectionStartLeftoverVisibleColumns+C.column-i.column,c,w.leftoverVisibleColumns+v.column-c.column)}_setState(I,w,v){if(v&&(v=k._validateViewState(I.viewModel,v)),w){const C=I.model.validateRange(w.selectionStart),o=w.selectionStart.equalsRange(C)?w.selectionStartLeftoverVisibleColumns:0,c=I.model.validatePosition(w.position),i=w.position.equals(c)?w.leftoverVisibleColumns:0;w=new t.SingleCursorState(C,o,c,i)}else{if(!v)return;const C=I.model.validateRange(I.coordinatesConverter.convertViewRangeToModelRange(v.selectionStart)),o=I.model.validatePosition(I.coordinatesConverter.convertViewPositionToModelPosition(v.position));w=new t.SingleCursorState(C,v.selectionStartLeftoverVisibleColumns,o,v.leftoverVisibleColumns)}if(v){const C=I.coordinatesConverter.validateViewRange(v.selectionStart,w.selectionStart),o=I.coordinatesConverter.validateViewPosition(v.position,w.position);v=new t.SingleCursorState(C,w.selectionStartLeftoverVisibleColumns,o,w.leftoverVisibleColumns)}else{const C=I.coordinatesConverter.convertModelPositionToViewPosition(new f.Position(w.selectionStart.startLineNumber,w.selectionStart.startColumn)),o=I.coordinatesConverter.convertModelPositionToViewPosition(new f.Position(w.selectionStart.endLineNumber,w.selectionStart.endColumn)),c=new _.Range(C.lineNumber,C.column,o.lineNumber,o.column),i=I.coordinatesConverter.convertModelPositionToViewPosition(w.position);v=new t.SingleCursorState(c,w.selectionStartLeftoverVisibleColumns,i,w.leftoverVisibleColumns)}this.modelState=w,this.viewState=v,this._updateTrackedRange(I)}}e.Cursor=k}),define(ne[1150],re([1,0,15,226,1149,49,20,84]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorCollection=void 0;class I{constructor(v){this.context=v,this.cursors=[new _.Cursor(v)],this.lastAddedCursorIndex=0}dispose(){for(const v of this.cursors)v.dispose(this.context)}startTrackingSelections(){for(const v of this.cursors)v.startTrackingSelection(this.context)}stopTrackingSelections(){for(const v of this.cursors)v.stopTrackingSelection(this.context)}updateContext(v){this.context=v}ensureValidState(){for(const v of this.cursors)v.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map(v=>v.readSelectionFromMarkers(this.context))}getAll(){return this.cursors.map(v=>v.asCursorState())}getViewPositions(){return this.cursors.map(v=>v.viewState.position)}getTopMostViewPosition(){return(0,t.findMinBy)(this.cursors,(0,t.compareBy)(v=>v.viewState.position,A.Position.compare)).viewState.position}getBottomMostViewPosition(){return(0,t.findLastMaxBy)(this.cursors,(0,t.compareBy)(v=>v.viewState.position,A.Position.compare)).viewState.position}getSelections(){return this.cursors.map(v=>v.modelState.selection)}getViewSelections(){return this.cursors.map(v=>v.viewState.selection)}setSelections(v){this.setStates(f.CursorState.fromModelSelections(v))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(v){v!==null&&(this.cursors[0].setState(this.context,v[0].modelState,v[0].viewState),this._setSecondaryStates(v.slice(1)))}_setSecondaryStates(v){const C=this.cursors.length-1,o=v.length;if(C<o){const c=o-C;for(let i=0;i<c;i++)this._addSecondaryCursor()}else if(C>o){const c=C-o;for(let i=0;i<c;i++)this._removeSecondaryCursor(this.cursors.length-2)}for(let c=0;c<o;c++)this.cursors[c+1].setState(this.context,v[c].modelState,v[c].viewState)}killSecondaryCursors(){this._setSecondaryStates([])}_addSecondaryCursor(){this.cursors.push(new _.Cursor(this.context)),this.lastAddedCursorIndex=this.cursors.length-1}getLastAddedCursorIndex(){return this.cursors.length===1||this.lastAddedCursorIndex===0?0:this.lastAddedCursorIndex}_removeSecondaryCursor(v){this.lastAddedCursorIndex>=v+1&&this.lastAddedCursorIndex--,this.cursors[v+1].dispose(this.context),this.cursors.splice(v+1,1)}normalize(){if(this.cursors.length===1)return;const v=this.cursors.slice(0),C=[];for(let o=0,c=v.length;o<c;o++)C.push({index:o,selection:v[o].modelState.selection});C.sort((0,t.compareBy)(o=>o.selection,k.Range.compareRangesUsingStarts));for(let o=0;o<C.length-1;o++){const c=C[o],i=C[o+1],S=c.selection,s=i.selection;if(!this.context.cursorConfig.multiCursorMergeOverlapping)continue;let l;if(s.isEmpty()||S.isEmpty()?l=s.getStartPosition().isBeforeOrEqual(S.getEndPosition()):l=s.getStartPosition().isBefore(S.getEndPosition()),l){const r=c.index<i.index?o:o+1,p=c.index<i.index?o+1:o,u=C[p].index,a=C[r].index,n=C[p].selection,h=C[r].selection;if(!n.equalsSelection(h)){const g=n.plusRange(h),d=n.selectionStartLineNumber===n.startLineNumber&&n.selectionStartColumn===n.startColumn,m=h.selectionStartLineNumber===h.startLineNumber&&h.selectionStartColumn===h.startColumn;let b;u===this.lastAddedCursorIndex?(b=d,this.lastAddedCursorIndex=a):b=m;let E;b?E=new D.Selection(g.startLineNumber,g.startColumn,g.endLineNumber,g.endColumn):E=new D.Selection(g.endLineNumber,g.endColumn,g.startLineNumber,g.startColumn),C[r].selection=E;const y=f.CursorState.fromModelSelection(E);v[a].setState(this.context,y.modelState,y.viewState)}for(const g of C)g.index>u&&g.index--;v.splice(u,1),C.splice(p,1),this._removeSecondaryCursor(u-1),o--}}}}e.CursorCollection=I}),define(ne[1151],re([1,0,342]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CharacterPairSupport=void 0;class f{constructor(k){if(k.autoClosingPairs?this._autoClosingPairs=k.autoClosingPairs.map(D=>new t.StandardAutoClosingPairConditional(D)):k.brackets?this._autoClosingPairs=k.brackets.map(D=>new t.StandardAutoClosingPairConditional({open:D[0],close:D[1]})):this._autoClosingPairs=[],k.colorizedBracketPairs?this._colorizedBracketPairs=_(k.colorizedBracketPairs.map(D=>[D[0],D[1]])):k.brackets?this._colorizedBracketPairs=_(k.brackets.map(D=>[D[0],D[1]]).filter(D=>!(D[0]==="<"&&D[1]===">"))):this._colorizedBracketPairs=[],k.__electricCharacterSupport&&k.__electricCharacterSupport.docComment){const D=k.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new t.StandardAutoClosingPairConditional({open:D.open,close:D.close||""}))}this._autoCloseBefore=typeof k.autoCloseBefore=="string"?k.autoCloseBefore:f.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=k.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(){return this._autoCloseBefore}getSurroundingPairs(){return this._surroundingPairs}getColorizedBrackets(){return this._colorizedBracketPairs}}e.CharacterPairSupport=f,f.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=`;:.,=}])> `,f.DEFAULT_AUTOCLOSE_BEFORE_WHITESPACE=` `;function _(A){return A.filter(([k,D])=>k!==""&&D!=="")}}),define(ne[1152],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentRulesSupport=e.IndentConsts=void 0;var t;(function(A){A[A.INCREASE_MASK=1]="INCREASE_MASK",A[A.DECREASE_MASK=2]="DECREASE_MASK",A[A.INDENT_NEXTLINE_MASK=4]="INDENT_NEXTLINE_MASK",A[A.UNINDENT_MASK=8]="UNINDENT_MASK"})(t=e.IndentConsts||(e.IndentConsts={}));function f(A){return A.global&&(A.lastIndex=0),!0}class _{constructor(k){this._indentationRules=k}shouldIncrease(k){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&f(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(k))}shouldDecrease(k){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&f(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(k))}shouldIndentNextLine(k){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&f(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(k))}shouldIgnore(k){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&f(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(k))}getIndentMetadata(k){let D=0;return this.shouldIncrease(k)&&(D+=1),this.shouldDecrease(k)&&(D+=2),this.shouldIndentNextLine(k)&&(D+=4),this.shouldIgnore(k)&&(D+=8),D}}e.IndentRulesSupport=_}),define(ne[1153],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BasicInplaceReplace=void 0;class t{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}navigateValueSet(_,A,k,D,I){if(_&&A){const w=this.doNavigateValueSet(A,I);if(w)return{range:_,value:w}}if(k&&D){const w=this.doNavigateValueSet(D,I);if(w)return{range:k,value:w}}return null}doNavigateValueSet(_,A){const k=this.numberReplace(_,A);return k!==null?k:this.textReplace(_,A)}numberReplace(_,A){const k=Math.pow(10,_.length-(_.lastIndexOf(".")+1));let D=Number(_),I=parseFloat(_);return!isNaN(D)&&!isNaN(I)&&D===I?D===0&&!A?null:(D=Math.floor(D*k),D+=A?k:-k,String(D/k)):null}textReplace(_,A){return this.valueSetsReplace(this._defaultValueSet,_,A)}valueSetsReplace(_,A,k){let D=null;for(let I=0,w=_.length;D===null&&I<w;I++)D=this.valueSetReplace(_[I],A,k);return D}valueSetReplace(_,A,k){let D=_.indexOf(A);return D>=0?(D+=k?1:-1,D<0?D=_.length-1:D%=_.length,_[D]):null}}e.BasicInplaceReplace=t,t.INSTANCE=new t}),define(ne[1154],re([1,0,22,29,342]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OnEnterSupport=void 0;class A{constructor(D){D=D||{},D.brackets=D.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],D.brackets.forEach(I=>{const w=A._createOpenBracketRegExp(I[0]),v=A._createCloseBracketRegExp(I[1]);w&&v&&this._brackets.push({open:I[0],openRegExp:w,close:I[1],closeRegExp:v})}),this._regExpRules=D.onEnterRules||[]}onEnter(D,I,w,v){if(D>=3)for(let C=0,o=this._regExpRules.length;C<o;C++){const c=this._regExpRules[C];if([{reg:c.beforeText,text:w},{reg:c.afterText,text:v},{reg:c.previousLineText,text:I}].every(S=>S.reg?(S.reg.lastIndex=0,S.reg.test(S.text)):!0))return c.action}if(D>=2&&w.length>0&&v.length>0)for(let C=0,o=this._brackets.length;C<o;C++){const c=this._brackets[C];if(c.openRegExp.test(w)&&c.closeRegExp.test(v))return{indentAction:_.IndentAction.IndentOutdent}}if(D>=2&&w.length>0){for(let C=0,o=this._brackets.length;C<o;C++)if(this._brackets[C].openRegExp.test(w))return{indentAction:_.IndentAction.Indent}}return null}static _createOpenBracketRegExp(D){let I=f.escapeRegExpCharacters(D);return/\B/.test(I.charAt(0))||(I="\\b"+I),I+="\\s*$",A._safeRegExp(I)}static _createCloseBracketRegExp(D){let I=f.escapeRegExpCharacters(D);return/\B/.test(I.charAt(I.length-1))||(I=I+"\\b"),I="^\\s*"+I,A._safeRegExp(I)}static _safeRegExp(D){try{return new RegExp(D)}catch(I){return(0,t.onUnexpectedError)(I),null}}}e.OnEnterSupport=A}),define(ne[528],re([1,0,29,282,20]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketsUtils=e.RichEditBrackets=e.RichEditBracket=void 0;class A{constructor(u,a,n,h,g,d){this._richEditBracketBrand=void 0,this.languageId=u,this.index=a,this.open=n,this.close=h,this.forwardRegex=g,this.reversedRegex=d,this._openSet=A._toSet(this.open),this._closeSet=A._toSet(this.close)}isOpen(u){return this._openSet.has(u)}isClose(u){return this._closeSet.has(u)}static _toSet(u){const a=new Set;for(const n of u)a.add(n);return a}}e.RichEditBracket=A;function k(p){const u=p.length;p=p.map(d=>[d[0].toLowerCase(),d[1].toLowerCase()]);const a=[];for(let d=0;d<u;d++)a[d]=d;const n=(d,m)=>{const[b,E]=d,[y,T]=m;return b===y||b===T||E===y||E===T},h=(d,m)=>{const b=Math.min(d,m),E=Math.max(d,m);for(let y=0;y<u;y++)a[y]===E&&(a[y]=b)};for(let d=0;d<u;d++){const m=p[d];for(let b=d+1;b<u;b++){const E=p[b];n(m,E)&&h(a[d],a[b])}}const g=[];for(let d=0;d<u;d++){const m=[],b=[];for(let E=0;E<u;E++)if(a[E]===d){const[y,T]=p[E];m.push(y),b.push(T)}m.length>0&&g.push({open:m,close:b})}return g}class D{constructor(u,a){this._richEditBracketsBrand=void 0;const n=k(a);this.brackets=n.map((h,g)=>new A(u,g,h.open,h.close,C(h.open,h.close,n,g),o(h.open,h.close,n,g))),this.forwardRegex=c(this.brackets),this.reversedRegex=i(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const h of this.brackets){for(const g of h.open)this.textIsBracket[g]=h,this.textIsOpenBracket[g]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,g.length);for(const g of h.close)this.textIsBracket[g]=h,this.textIsOpenBracket[g]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,g.length)}}}e.RichEditBrackets=D;function I(p,u,a,n){for(let h=0,g=u.length;h<g;h++){if(h===a)continue;const d=u[h];for(const m of d.open)m.indexOf(p)>=0&&n.push(m);for(const m of d.close)m.indexOf(p)>=0&&n.push(m)}}function w(p,u){return p.length-u.length}function v(p){if(p.length<=1)return p;const u=[],a=new Set;for(const n of p)a.has(n)||(u.push(n),a.add(n));return u}function C(p,u,a,n){let h=[];h=h.concat(p),h=h.concat(u);for(let g=0,d=h.length;g<d;g++)I(h[g],a,n,h);return h=v(h),h.sort(w),h.reverse(),s(h)}function o(p,u,a,n){let h=[];h=h.concat(p),h=h.concat(u);for(let g=0,d=h.length;g<d;g++)I(h[g],a,n,h);return h=v(h),h.sort(w),h.reverse(),s(h.map(l))}function c(p){let u=[];for(const a of p){for(const n of a.open)u.push(n);for(const n of a.close)u.push(n)}return u=v(u),s(u)}function i(p){let u=[];for(const a of p){for(const n of a.open)u.push(n);for(const n of a.close)u.push(n)}return u=v(u),s(u.map(l))}function S(p){const u=/^[\w ]+$/.test(p);return p=t.escapeRegExpCharacters(p),u?`\\b${p}\\b`:p}function s(p){const u=`(${p.map(S).join(")|(")})`;return t.createRegExp(u,!0)}const l=function(){function p(n){if(f.hasTextDecoder){const h=new Uint16Array(n.length);let g=0;for(let d=n.length-1;d>=0;d--)h[g++]=n.charCodeAt(d);return f.getPlatformTextDecoder().decode(h)}else{const h=[];let g=0;for(let d=n.length-1;d>=0;d--)h[g++]=n.charAt(d);return h.join("")}}let u=null,a=null;return function(h){return u!==h&&(u=h,a=p(u)),a}}();class r{static _findPrevBracketInText(u,a,n,h){const g=n.match(u);if(!g)return null;const d=n.length-(g.index||0),m=g[0].length,b=h+d;return new _.Range(a,b-m+1,a,b+1)}static findPrevBracketInRange(u,a,n,h,g){const m=l(n).substring(n.length-g,n.length-h);return this._findPrevBracketInText(u,a,m,h)}static findNextBracketInText(u,a,n,h){const g=n.match(u);if(!g)return null;const d=g.index||0,m=g[0].length;if(m===0)return null;const b=h+d;return new _.Range(a,b+1,a,b+1+m)}static findNextBracketInRange(u,a,n,h,g){const d=n.substring(h,g);return this.findNextBracketInText(u,a,d,h)}}e.BracketsUtils=r}),define(ne[1155],re([1,0,15,386,528]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketElectricCharacterSupport=void 0;class A{constructor(D){this._richEditBrackets=D}getElectricCharacters(){const D=[];if(this._richEditBrackets)for(const I of this._richEditBrackets.brackets)for(const w of I.close){const v=w.charAt(w.length-1);D.push(v)}return(0,t.distinct)(D)}onElectricCharacter(D,I,w){if(!this._richEditBrackets||this._richEditBrackets.brackets.length===0)return null;const v=I.findTokenIndexAtOffset(w-1);if((0,f.ignoreBracketsInToken)(I.getStandardTokenType(v)))return null;const C=this._richEditBrackets.reversedRegex,o=I.getLineContent().substring(0,w-1)+D,c=_.BracketsUtils.findPrevBracketInRange(C,1,o,0,o.length);if(!c)return null;const i=o.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[i])return null;const s=I.getActualLineContentBefore(c.startColumn-1);return/^\s*$/.test(s)?{matchOpenBracket:i}:null}}e.BracketElectricCharacterSupport=A}),define(ne[387],re([1,0,66]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateTokensCSSForColorMap=e.ThemeTrieElement=e.ExternalThemeTrieElement=e.ThemeTrieElementRule=e.strcmp=e.toStandardTokenType=e.TokenTheme=e.ColorMap=e.parseTokenTheme=e.ParsedTokenThemeRule=void 0;class f{constructor(l,r,p,u,a){this._parsedThemeRuleBrand=void 0,this.token=l,this.index=r,this.fontStyle=p,this.foreground=u,this.background=a}}e.ParsedTokenThemeRule=f;function _(s){if(!s||!Array.isArray(s))return[];const l=[];let r=0;for(let p=0,u=s.length;p<u;p++){const a=s[p];let n=-1;if(typeof a.fontStyle=="string"){n=0;const d=a.fontStyle.split(" ");for(let m=0,b=d.length;m<b;m++)switch(d[m]){case"italic":n=n|1;break;case"bold":n=n|2;break;case"underline":n=n|4;break;case"strikethrough":n=n|8;break}}let h=null;typeof a.foreground=="string"&&(h=a.foreground);let g=null;typeof a.background=="string"&&(g=a.background),l[r++]=new f(a.token||"",p,n,h,g)}return l}e.parseTokenTheme=_;function A(s,l){s.sort((m,b)=>{const E=C(m.token,b.token);return E!==0?E:m.index-b.index});let r=0,p="000000",u="ffffff";for(;s.length>=1&&s[0].token==="";){const m=s.shift();m.fontStyle!==-1&&(r=m.fontStyle),m.foreground!==null&&(p=m.foreground),m.background!==null&&(u=m.background)}const a=new D;for(let m of l)a.getId(m);const n=a.getId(p),h=a.getId(u),g=new o(r,n,h),d=new i(g);for(let m=0,b=s.length;m<b;m++){const E=s[m];d.insert(E.token,E.fontStyle,a.getId(E.foreground),a.getId(E.background))}return new I(a,d)}const k=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class D{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(l){if(l===null)return 0;const r=l.match(k);if(!r)throw new Error("Illegal value for token color: "+l);l=r[1].toUpperCase();let p=this._color2id.get(l);return p||(p=++this._lastColorId,this._color2id.set(l,p),this._id2color[p]=t.Color.fromHex("#"+l),p)}getColorMap(){return this._id2color.slice(0)}}e.ColorMap=D;class I{constructor(l,r){this._colorMap=l,this._root=r,this._cache=new Map}static createFromRawTokenTheme(l,r){return this.createFromParsedTokenTheme(_(l),r)}static createFromParsedTokenTheme(l,r){return A(l,r)}getColorMap(){return this._colorMap.getColorMap()}getThemeTrieElement(){return this._root.toExternalThemeTrieElement()}_match(l){return this._root.match(l)}match(l,r){let p=this._cache.get(r);if(typeof p=="undefined"){const u=this._match(r),a=v(r);p=(u.metadata|a<<8)>>>0,this._cache.set(r,p)}return(p|l<<0)>>>0}}e.TokenTheme=I;const w=/\b(comment|string|regex|regexp)\b/;function v(s){const l=s.match(w);if(!l)return 0;switch(l[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"regexp":return 3}throw new Error("Unexpected match for standard token type!")}e.toStandardTokenType=v;function C(s,l){return s<l?-1:s>l?1:0}e.strcmp=C;class o{constructor(l,r,p){this._themeTrieElementRuleBrand=void 0,this._fontStyle=l,this._foreground=r,this._background=p,this.metadata=(this._fontStyle<<10|this._foreground<<14|this._background<<23)>>>0}clone(){return new o(this._fontStyle,this._foreground,this._background)}acceptOverwrite(l,r,p){l!==-1&&(this._fontStyle=l),r!==0&&(this._foreground=r),p!==0&&(this._background=p),this.metadata=(this._fontStyle<<10|this._foreground<<14|this._background<<23)>>>0}}e.ThemeTrieElementRule=o;class c{constructor(l,r=new Map){if(this.mainRule=l,r instanceof Map)this.children=r;else{this.children=new Map;for(const p in r)this.children.set(p,r[p])}}}e.ExternalThemeTrieElement=c;class i{constructor(l){this._themeTrieElementBrand=void 0,this._mainRule=l,this._children=new Map}toExternalThemeTrieElement(){const l=new Map;return this._children.forEach((r,p)=>{l.set(p,r.toExternalThemeTrieElement())}),new c(this._mainRule,l)}match(l){if(l==="")return this._mainRule;const r=l.indexOf(".");let p,u;r===-1?(p=l,u=""):(p=l.substring(0,r),u=l.substring(r+1));const a=this._children.get(p);return typeof a!="undefined"?a.match(u):this._mainRule}insert(l,r,p,u){if(l===""){this._mainRule.acceptOverwrite(r,p,u);return}const a=l.indexOf(".");let n,h;a===-1?(n=l,h=""):(n=l.substring(0,a),h=l.substring(a+1));let g=this._children.get(n);typeof g=="undefined"&&(g=new i(this._mainRule.clone()),this._children.set(n,g)),g.insert(h,r,p,u)}}e.ThemeTrieElement=i;function S(s){const l=[];for(let r=1,p=s.length;r<p;r++){const u=s[r];l[r]=`.mtk${r} { color: ${u}; }`}return l.push(".mtki { font-style: italic; }"),l.push(".mtkb { font-weight: bold; }"),l.push(".mtku { text-decoration: underline; text-underline-position: under; }"),l.push(".mtks { text-decoration: line-through; }"),l.push(".mtks.mtku { text-decoration: underline line-through; text-underline-position: under; }"),l.join(` `)}e.generateTokensCSSForColorMap=S}),define(ne[122],re([1,0,51]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.shouldSynchronizeModel=e.ApplyEditsResult=e.SearchData=e.ValidAnnotatedEditOperation=e.ModelConstants=e.PositionAffinity=e.TrackedRangeStickiness=e.FindMatch=e.TextModelResolvedOptions=e.EndOfLineSequence=e.DefaultEndOfLine=e.EndOfLinePreference=e.InjectedTextCursorStops=e.MinimapPosition=e.OverviewRulerLane=void 0;var f;(function(r){r[r.Left=1]="Left",r[r.Center=2]="Center",r[r.Right=4]="Right",r[r.Full=7]="Full"})(f=e.OverviewRulerLane||(e.OverviewRulerLane={}));var _;(function(r){r[r.Inline=1]="Inline",r[r.Gutter=2]="Gutter"})(_=e.MinimapPosition||(e.MinimapPosition={}));var A;(function(r){r[r.Both=0]="Both",r[r.Right=1]="Right",r[r.Left=2]="Left",r[r.None=3]="None"})(A=e.InjectedTextCursorStops||(e.InjectedTextCursorStops={}));var k;(function(r){r[r.TextDefined=0]="TextDefined",r[r.LF=1]="LF",r[r.CRLF=2]="CRLF"})(k=e.EndOfLinePreference||(e.EndOfLinePreference={}));var D;(function(r){r[r.LF=1]="LF",r[r.CRLF=2]="CRLF"})(D=e.DefaultEndOfLine||(e.DefaultEndOfLine={}));var I;(function(r){r[r.LF=0]="LF",r[r.CRLF=1]="CRLF"})(I=e.EndOfLineSequence||(e.EndOfLineSequence={}));class w{constructor(p){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,p.tabSize|0),this.indentSize=p.tabSize|0,this.insertSpaces=Boolean(p.insertSpaces),this.defaultEOL=p.defaultEOL|0,this.trimAutoWhitespace=Boolean(p.trimAutoWhitespace),this.bracketPairColorizationOptions=p.bracketPairColorizationOptions}equals(p){return this.tabSize===p.tabSize&&this.indentSize===p.indentSize&&this.insertSpaces===p.insertSpaces&&this.defaultEOL===p.defaultEOL&&this.trimAutoWhitespace===p.trimAutoWhitespace&&(0,t.equals)(this.bracketPairColorizationOptions,p.bracketPairColorizationOptions)}createChangeEvent(p){return{tabSize:this.tabSize!==p.tabSize,indentSize:this.indentSize!==p.indentSize,insertSpaces:this.insertSpaces!==p.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==p.trimAutoWhitespace}}}e.TextModelResolvedOptions=w;class v{constructor(p,u){this._findMatchBrand=void 0,this.range=p,this.matches=u}}e.FindMatch=v;var C;(function(r){r[r.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",r[r.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",r[r.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",r[r.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(C=e.TrackedRangeStickiness||(e.TrackedRangeStickiness={}));var o;(function(r){r[r.Left=0]="Left",r[r.Right=1]="Right",r[r.None=2]="None"})(o=e.PositionAffinity||(e.PositionAffinity={}));var c;(function(r){r[r.FIRST_LINE_DETECTION_LENGTH_LIMIT=1e3]="FIRST_LINE_DETECTION_LENGTH_LIMIT"})(c=e.ModelConstants||(e.ModelConstants={}));class i{constructor(p,u,a,n,h,g){this.identifier=p,this.range=u,this.text=a,this.forceMoveMarkers=n,this.isAutoWhitespaceEdit=h,this._isTracked=g}}e.ValidAnnotatedEditOperation=i;class S{constructor(p,u,a){this.regex=p,this.wordSeparators=u,this.simpleSearch=a}}e.SearchData=S;class s{constructor(p,u,a){this.reverseEdits=p,this.changes=u,this.trimAutoWhitespaceLineNumbers=a}}e.ApplyEditsResult=s;function l(r){return!r.isTooLargeForSyncing()&&!r.isForSimpleWidget}e.shouldSynchronizeModel=l}),define(ne[457],re([1,0,6,2,122,1147]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageFeatureRegistry=void 0;function k(w){return typeof w=="string"?!1:Array.isArray(w)?w.every(k):!!w.exclusive}class D{constructor(v,C,o){this.uri=v,this.languageId=C,this.notebookType=o}equals(v){return this.notebookType===v.notebookType&&this.languageId===v.languageId&&this.uri.toString()===v.uri.toString()}}class I{constructor(v){this._notebookInfoResolver=v,this._clock=0,this._entries=[],this._onDidChange=new t.Emitter,this.onDidChange=this._onDidChange.event}register(v,C){let o={selector:v,provider:C,_score:-1,_time:this._clock++};return this._entries.push(o),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),(0,f.toDisposable)(()=>{if(o){const c=this._entries.indexOf(o);c>=0&&(this._entries.splice(c,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),o=void 0)}})}has(v){return this.all(v).length>0}all(v){if(!v)return[];this._updateScores(v);const C=[];for(let o of this._entries)o._score>0&&C.push(o.provider);return C}ordered(v){const C=[];return this._orderedForEach(v,o=>C.push(o.provider)),C}orderedGroups(v){const C=[];let o,c;return this._orderedForEach(v,i=>{o&&c===i._score?o.push(i.provider):(c=i._score,o=[i.provider],C.push(o))}),C}_orderedForEach(v,C){this._updateScores(v);for(const o of this._entries)o._score>0&&C(o)}_updateScores(v){const C=this._notebookInfoResolver?.(v.uri),o=C?new D(C.uri,v.getLanguageId(),C.type):new D(v.uri,v.getLanguageId(),void 0);if(!this._lastCandidate?.equals(o)){this._lastCandidate=o;for(let c of this._entries)if(c._score=(0,A.score)(c.selector,o.uri,o.languageId,(0,_.shouldSynchronizeModel)(v),o.notebookType),k(c.selector)&&c._score>0){for(let i of this._entries)i._score=0;c._score=1e3;break}this._entries.sort(I._compareByScoreAndTime)}}static _compareByScoreAndTime(v,C){return v._score<C._score?1:v._score>C._score?-1:v._time<C._time?1:v._time>C._time?-1:0}}e.LanguageFeatureRegistry=I}),define(ne[284],re([1,0,29,49,20]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.lengthHash=e.lengthOfStringObj=e.lengthOfString=e.lengthCompare=e.lengthsToRange=e.positionToLength=e.lengthToPosition=e.lengthGreaterThanEqual=e.lengthLessThanEqual=e.lengthLessThan=e.lengthDiffNonNegative=e.lengthAdd=e.lengthGetColumnCountIfZeroLineCount=e.lengthGetLineCount=e.lengthToObj=e.toLength=e.lengthIsZero=e.lengthZero=e.lengthDiff=e.LengthObj=void 0;class A{constructor(m,b){this.lineCount=m,this.columnCount=b}static lengthDiffNonNegative(m,b){return b.isLessThan(m)?A.zero:m.lineCount===b.lineCount?new A(0,b.columnCount-m.columnCount):new A(b.lineCount-m.lineCount,b.columnCount)}isZero(){return this.lineCount===0&&this.columnCount===0}toLength(){return w(this.lineCount,this.columnCount)}isLessThan(m){return this.lineCount!==m.lineCount?this.lineCount<m.lineCount:this.columnCount<m.columnCount}isGreaterThan(m){return this.lineCount!==m.lineCount?this.lineCount>m.lineCount:this.columnCount>m.columnCount}equals(m){return this.lineCount===m.lineCount&&this.columnCount===m.columnCount}compare(m){return this.lineCount!==m.lineCount?this.lineCount-m.lineCount:this.columnCount-m.columnCount}add(m){return m.lineCount===0?new A(this.lineCount,this.columnCount+m.columnCount):new A(this.lineCount+m.lineCount,m.columnCount)}toString(){return`${this.lineCount},${this.columnCount}`}}e.LengthObj=A,A.zero=new A(0,0);function k(d,m,b,E){return d!==b?w(b-d,E):w(0,E-m)}e.lengthDiff=k,e.lengthZero=0;function D(d){return d===0}e.lengthIsZero=D;const I=2**26;function w(d,m){return d*I+m}e.toLength=w;function v(d){const m=d,b=Math.floor(m/I),E=m-b*I;return new A(b,E)}e.lengthToObj=v;function C(d){return Math.floor(d/I)}e.lengthGetLineCount=C;function o(d){return d}e.lengthGetColumnCountIfZeroLineCount=o;function c(d,m){return m<I?d+m:d-d%I+m}e.lengthAdd=c;function i(d,m){const b=d,E=m;if(E-b<=0)return e.lengthZero;const T=Math.floor(b/I),R=Math.floor(E/I),O=E-R*I;if(T===R){const x=b-T*I;return w(0,O-x)}else return w(R-T,O)}e.lengthDiffNonNegative=i;function S(d,m){return d<m}e.lengthLessThan=S;function s(d,m){return d<=m}e.lengthLessThanEqual=s;function l(d,m){return d>=m}e.lengthGreaterThanEqual=l;function r(d){const m=d,b=Math.floor(m/I),E=m-b*I;return new f.Position(b+1,E+1)}e.lengthToPosition=r;function p(d){return w(d.lineNumber-1,d.column-1)}e.positionToLength=p;function u(d,m){const b=d,E=Math.floor(b/I),y=b-E*I,T=m,R=Math.floor(T/I),O=T-R*I;return new _.Range(E+1,y+1,R+1,O+1)}e.lengthsToRange=u;function a(d,m){return d-m}e.lengthCompare=a;function n(d){const m=(0,t.splitLines)(d);return w(m.length-1,m[m.length-1].length)}e.lengthOfString=n;function h(d){const m=(0,t.splitLines)(d);return new A(m.length-1,m[m.length-1].length)}e.lengthOfStringObj=h;function g(d){return d}e.lengthHash=g}),define(ne[690],re([1,0,284]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BeforeEditPositionMapper=e.TextEditInfo=void 0;class f{constructor(D,I,w){this.startOffset=D,this.endOffset=I,this.newLength=w}}e.TextEditInfo=f;class _{constructor(D,I){this.documentLength=I,this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=D.map(w=>A.from(w))}getOffsetBeforeChange(D){return this.adjustNextEdit(D),this.translateCurToOld(D)}getDistanceToNextChange(D){this.adjustNextEdit(D);const I=this.edits[this.nextEditIdx],w=I?this.translateOldToCur(I.offsetObj):this.documentLength;return(0,t.lengthDiffNonNegative)(D,w)}translateOldToCur(D){return D.lineCount===this.deltaLineIdxInOld?(0,t.toLength)(D.lineCount+this.deltaOldToNewLineCount,D.columnCount+this.deltaOldToNewColumnCount):(0,t.toLength)(D.lineCount+this.deltaOldToNewLineCount,D.columnCount)}translateCurToOld(D){const I=(0,t.lengthToObj)(D);return I.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?(0,t.toLength)(I.lineCount-this.deltaOldToNewLineCount,I.columnCount-this.deltaOldToNewColumnCount):(0,t.toLength)(I.lineCount-this.deltaOldToNewLineCount,I.columnCount)}adjustNextEdit(D){for(;this.nextEditIdx<this.edits.length;){const I=this.edits[this.nextEditIdx],w=this.translateOldToCur(I.endOffsetAfterObj);if((0,t.lengthLessThanEqual)(w,D)){this.nextEditIdx++;const v=(0,t.lengthToObj)(w),C=(0,t.lengthToObj)(this.translateOldToCur(I.endOffsetBeforeObj)),o=v.lineCount-C.lineCount;this.deltaOldToNewLineCount+=o;const c=this.deltaLineIdxInOld===I.endOffsetBeforeObj.lineCount?this.deltaOldToNewColumnCount:0,i=v.columnCount-C.columnCount;this.deltaOldToNewColumnCount=c+i,this.deltaLineIdxInOld=I.endOffsetBeforeObj.lineCount}else break}}}e.BeforeEditPositionMapper=_;class A{constructor(D,I,w){this.endOffsetBeforeObj=(0,t.lengthToObj)(I),this.endOffsetAfterObj=(0,t.lengthToObj)((0,t.lengthAdd)(D,w)),this.offsetObj=(0,t.lengthToObj)(D)}static from(D){return new A(D.startOffset,D.endOffset,D.newLength)}}}),define(ne[1156],re([1,0,284]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeReader=void 0;class f{constructor(D){this.lastOffset=t.lengthZero,this.nextNodes=[D],this.offsets=[t.lengthZero],this.idxs=[]}readLongestNodeAt(D,I){if((0,t.lengthLessThan)(D,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=D;;){const w=A(this.nextNodes);if(!w)return;const v=A(this.offsets);if((0,t.lengthLessThan)(D,v))return;if((0,t.lengthLessThan)(v,D))if((0,t.lengthAdd)(v,w.length)<=D)this.nextNodeAfterCurrent();else{const C=_(w);C!==-1?(this.nextNodes.push(w.getChild(C)),this.offsets.push(v),this.idxs.push(C)):this.nextNodeAfterCurrent()}else{if(I(w))return this.nextNodeAfterCurrent(),w;{const C=_(w);if(C===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(w.getChild(C)),this.offsets.push(v),this.idxs.push(C)}}}}nextNodeAfterCurrent(){for(;;){const D=A(this.offsets),I=A(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;const w=A(this.nextNodes),v=_(w,this.idxs[this.idxs.length-1]);if(v!==-1){this.nextNodes.push(w.getChild(v)),this.offsets.push((0,t.lengthAdd)(D,I.length)),this.idxs[this.idxs.length-1]=v;break}else this.idxs.pop()}}}e.NodeReader=f;function _(k,D=-1){for(;;){if(D++,D>=k.childrenLength)return-1;if(k.getChild(D))return D}}function A(k){return k.length>0?k[k.length-1]:void 0}}),define(ne[343],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DenseKeyProvider=e.identityKeyProvider=e.SmallImmutableSet=void 0;const t=new Array;class f{constructor(k,D){this.items=k,this.additionalItems=D}static create(k,D){if(k<=128&&D.length===0){let I=f.cache[k];return I||(I=new f(k,D),f.cache[k]=I),I}return new f(k,D)}static getEmpty(){return this.empty}add(k,D){const I=D.getKey(k);let w=I>>5;if(w===0){const C=1<<I|this.items;return C===this.items?this:f.create(C,this.additionalItems)}w--;const v=this.additionalItems.slice(0);for(;v.length<w;)v.push(0);return v[w]|=1<<(I&31),f.create(this.items,v)}has(k,D){const I=D.getKey(k);let w=I>>5;return w===0?(this.items&1<<I)!=0:(w--,((this.additionalItems[w]||0)&1<<(I&31))!=0)}merge(k){const D=this.items|k.items;if(this.additionalItems===t&&k.additionalItems===t)return D===this.items?this:D===k.items?k:f.create(D,t);const I=new Array;for(let w=0;w<Math.max(this.additionalItems.length,k.additionalItems.length);w++){const v=this.additionalItems[w]||0,C=k.additionalItems[w]||0;I.push(v|C)}return f.create(D,I)}intersects(k){if((this.items&k.items)!=0)return!0;for(let D=0;D<Math.min(this.additionalItems.length,k.additionalItems.length);D++)if((this.additionalItems[D]&k.additionalItems[D])!=0)return!0;return!1}equals(k){if(this.items!==k.items||this.additionalItems.length!==k.additionalItems.length)return!1;for(let D=0;D<this.additionalItems.length;D++)if(this.additionalItems[D]!==k.additionalItems[D])return!1;return!0}}e.SmallImmutableSet=f,f.cache=new Array(129),f.empty=f.create(0,t),e.identityKeyProvider={getKey(A){return A}};class _{constructor(){this.items=new Map}getKey(k){let D=this.items.get(k);return D===void 0&&(D=this.items.size,this.items.set(k,D)),D}reverseLookup(k){return[...this.items].find(([D,I])=>I===k)?.[0]}reverseLookupSet(k){const D=[];for(const[I]of this.items)k.has(I,this)&&D.push(I);return D}keys(){return this.items.keys()}}e.DenseKeyProvider=_}),define(ne[458],re([1,0,243,284,343]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InvalidBracketAstNode=e.BracketAstNode=e.TextAstNode=e.ListAstNode=e.PairAstNode=e.AstNodeKind=void 0;var A;(function(r){r[r.Text=0]="Text",r[r.Bracket=1]="Bracket",r[r.Pair=2]="Pair",r[r.UnexpectedClosingBracket=3]="UnexpectedClosingBracket",r[r.List=4]="List"})(A=e.AstNodeKind||(e.AstNodeKind={}));class k{constructor(p){this._length=p}get length(){return this._length}}class D extends k{constructor(p,u,a,n,h){super(p);this.openingBracket=u,this.child=a,this.closingBracket=n,this.missingOpeningBracketIds=h}static create(p,u,a){let n=p.length;return u&&(n=(0,f.lengthAdd)(n,u.length)),a&&(n=(0,f.lengthAdd)(n,a.length)),new D(n,p,u,a,u?u.missingOpeningBracketIds:_.SmallImmutableSet.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(p){switch(p){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){const p=new Array;return p.push(this.openingBracket),this.child&&p.push(this.child),this.closingBracket&&p.push(this.closingBracket),p}canBeReused(p){return!(this.closingBracket===null||p.intersects(this.missingOpeningBracketIds))}flattenLists(){return D.create(this.openingBracket.flattenLists(),this.child&&this.child.flattenLists(),this.closingBracket&&this.closingBracket.flattenLists())}deepClone(){return new D(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(p,u){return this.child?this.child.computeMinIndentation((0,f.lengthAdd)(p,this.openingBracket.length),u):Number.MAX_SAFE_INTEGER}}e.PairAstNode=D;class I extends k{constructor(p,u,a){super(p);this.listHeight=u,this._missingOpeningBracketIds=a,this.cachedMinIndentation=-1}static create23(p,u,a,n=!1){let h=p.length,g=p.missingOpeningBracketIds;if(p.listHeight!==u.listHeight)throw new Error("Invalid list heights");if(h=(0,f.lengthAdd)(h,u.length),g=g.merge(u.missingOpeningBracketIds),a){if(p.listHeight!==a.listHeight)throw new Error("Invalid list heights");h=(0,f.lengthAdd)(h,a.length),g=g.merge(a.missingOpeningBracketIds)}return n?new v(h,p.listHeight+1,p,u,a,g):new w(h,p.listHeight+1,p,u,a,g)}static create(p,u=!1){if(p.length===0)return this.getEmpty();{let a=p[0].length,n=p[0].missingOpeningBracketIds;for(let h=1;h<p.length;h++)a=(0,f.lengthAdd)(a,p[h].length),n=n.merge(p[h].missingOpeningBracketIds);return u?new o(a,p[0].listHeight+1,p,n):new C(a,p[0].listHeight+1,p,n)}}static getEmpty(){return new o(f.lengthZero,0,[],_.SmallImmutableSet.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();const p=this.childrenLength;if(p===0)return;const u=this.getChild(p-1),a=u.kind===4?u.toMutable():u;return u!==a&&this.setChild(p-1,a),a}makeFirstElementMutable(){if(this.throwIfImmutable(),this.childrenLength===0)return;const u=this.getChild(0),a=u.kind===4?u.toMutable():u;return u!==a&&this.setChild(0,a),a}canBeReused(p){if(p.intersects(this.missingOpeningBracketIds))return!1;let u=this,a;for(;u.kind===4&&(a=u.childrenLength)>0;)u=u.getChild(a-1);return u.canBeReused(p)}handleChildrenChanged(){this.throwIfImmutable();const p=this.childrenLength;let u=this.getChild(0).length,a=this.getChild(0).missingOpeningBracketIds;for(let n=1;n<p;n++){const h=this.getChild(n);u=(0,f.lengthAdd)(u,h.length),a=a.merge(h.missingOpeningBracketIds)}this._length=u,this._missingOpeningBracketIds=a,this.cachedMinIndentation=-1}flattenLists(){const p=new Array;for(const u of this.children){const a=u.flattenLists();a.kind===4?p.push(...a.children):p.push(a)}return I.create(p)}computeMinIndentation(p,u){if(this.cachedMinIndentation!==-1)return this.cachedMinIndentation;let a=Number.MAX_SAFE_INTEGER,n=p;for(let h=0;h<this.childrenLength;h++){const g=this.getChild(h);g&&(a=Math.min(a,g.computeMinIndentation(n,u)),n=(0,f.lengthAdd)(n,g.length))}return this.cachedMinIndentation=a,a}}e.ListAstNode=I;class w extends I{constructor(p,u,a,n,h,g){super(p,u,g);this._item1=a,this._item2=n,this._item3=h}get childrenLength(){return this._item3!==null?3:2}getChild(p){switch(p){case 0:return this._item1;case 1:return this._item2;case 2:return this._item3}throw new Error("Invalid child index")}setChild(p,u){switch(p){case 0:this._item1=u;return;case 1:this._item2=u;return;case 2:this._item3=u;return}throw new Error("Invalid child index")}get children(){return this._item3?[this._item1,this._item2,this._item3]:[this._item1,this._item2]}get item1(){return this._item1}get item2(){return this._item2}get item3(){return this._item3}deepClone(){return new w(this.length,this.listHeight,this._item1.deepClone(),this._item2.deepClone(),this._item3?this._item3.deepClone():null,this.missingOpeningBracketIds)}appendChildOfSameHeight(p){if(this._item3)throw new Error("Cannot append to a full (2,3) tree node");this.throwIfImmutable(),this._item3=p,this.handleChildrenChanged()}unappendChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const p=this._item3;return this._item3=null,this.handleChildrenChanged(),p}prependChildOfSameHeight(p){if(this._item3)throw new Error("Cannot prepend to a full (2,3) tree node");this.throwIfImmutable(),this._item3=this._item2,this._item2=this._item1,this._item1=p,this.handleChildrenChanged()}unprependChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const p=this._item1;return this._item1=this._item2,this._item2=this._item3,this._item3=null,this.handleChildrenChanged(),p}toMutable(){return this}}class v extends w{toMutable(){return new w(this.length,this.listHeight,this.item1,this.item2,this.item3,this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}class C extends I{constructor(p,u,a,n){super(p,u,n);this._children=a}get childrenLength(){return this._children.length}getChild(p){return this._children[p]}setChild(p,u){this._children[p]=u}get children(){return this._children}deepClone(){const p=new Array(this._children.length);for(let u=0;u<this._children.length;u++)p[u]=this._children[u].deepClone();return new C(this.length,this.listHeight,p,this.missingOpeningBracketIds)}appendChildOfSameHeight(p){this.throwIfImmutable(),this._children.push(p),this.handleChildrenChanged()}unappendChild(){this.throwIfImmutable();const p=this._children.pop();return this.handleChildrenChanged(),p}prependChildOfSameHeight(p){this.throwIfImmutable(),this._children.unshift(p),this.handleChildrenChanged()}unprependChild(){this.throwIfImmutable();const p=this._children.shift();return this.handleChildrenChanged(),p}toMutable(){return this}}class o extends C{toMutable(){return new C(this.length,this.listHeight,[...this.children],this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}const c=[];class i extends k{get listHeight(){return 0}get childrenLength(){return 0}getChild(p){return null}get children(){return c}flattenLists(){return this}deepClone(){return this}}class S extends i{get kind(){return 0}get missingOpeningBracketIds(){return _.SmallImmutableSet.getEmpty()}canBeReused(p){return!0}computeMinIndentation(p,u){const a=(0,f.lengthToObj)(p),n=(a.columnCount===0?a.lineCount:a.lineCount+1)+1,h=(0,f.lengthGetLineCount)((0,f.lengthAdd)(p,this.length))+1;let g=Number.MAX_SAFE_INTEGER;for(let d=n;d<=h;d++){const m=u.getLineFirstNonWhitespaceColumn(d),b=u.getLineContent(d);if(m===0)continue;const E=t.CursorColumns.visibleColumnFromColumn(b,m,u.getOptions().tabSize);g=Math.min(g,E)}return g}}e.TextAstNode=S;class s extends i{constructor(p,u,a,n){super(p);this.languageId=u,this.text=a,this.bracketIds=n}static create(p,u,a,n){return new s(p,u,a,n)}get kind(){return 1}get missingOpeningBracketIds(){return _.SmallImmutableSet.getEmpty()}canBeReused(p){return!1}computeMinIndentation(p,u){return Number.MAX_SAFE_INTEGER}}e.BracketAstNode=s;class l extends i{constructor(p,u){super(u);this.missingOpeningBracketIds=p}get kind(){return 3}canBeReused(p){return!p.intersects(this.missingOpeningBracketIds)}computeMinIndentation(p,u){return Number.MAX_SAFE_INTEGER}}e.InvalidBracketAstNode=l}),define(ne[1157],re([1,0,458]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.concat23TreesOfSameHeight=e.concat23Trees=void 0;function f(w){if(w.length===0)return null;if(w.length===1)return w[0];let v=0;function C(){if(v>=w.length)return null;const S=v,s=w[S].listHeight;for(v++;v<w.length&&w[v].listHeight===s;)v++;return v-S>=2?_(S===0&&v===w.length?w:w.slice(S,v),!1):w[S]}let o=C(),c=C();if(!c)return o;for(let S=C();S;S=C())A(o,c)<=A(c,S)?(o=k(o,c),c=S):c=k(c,S);return k(o,c)}e.concat23Trees=f;function _(w,v=!1){if(w.length===0)return null;if(w.length===1)return w[0];let C=w.length;for(;C>3;){const o=C>>1;for(let c=0;c<o;c++){const i=c<<1;w[c]=t.ListAstNode.create23(w[i],w[i+1],i+3===C?w[i+2]:null,v)}C=o}return t.ListAstNode.create23(w[0],w[1],C>=3?w[2]:null,v)}e.concat23TreesOfSameHeight=_;function A(w,v){return Math.abs(w.listHeight-v.listHeight)}function k(w,v){return w.listHeight===v.listHeight?t.ListAstNode.create23(w,v,null,!1):w.listHeight>v.listHeight?D(w,v):I(v,w)}function D(w,v){w=w.toMutable();let C=w;const o=new Array;let c;for(;;){if(v.listHeight===C.listHeight){c=v;break}if(C.kind!==4)throw new Error("unexpected");o.push(C),C=C.makeLastElementMutable()}for(let i=o.length-1;i>=0;i--){const S=o[i];c?S.childrenLength>=3?c=t.ListAstNode.create23(S.unappendChild(),c,null,!1):(S.appendChildOfSameHeight(c),c=void 0):S.handleChildrenChanged()}return c?t.ListAstNode.create23(w,c,null,!1):w}function I(w,v){w=w.toMutable();let C=w;const o=new Array;for(;v.listHeight!==C.listHeight;){if(C.kind!==4)throw new Error("unexpected");o.push(C),C=C.makeFirstElementMutable()}let c=v;for(let i=o.length-1;i>=0;i--){const S=o[i];c?S.childrenLength>=3?c=t.ListAstNode.create23(c,S.unprependChild(),null,!1):(S.prependChildOfSameHeight(c),c=void 0):S.handleChildrenChanged()}return c?t.ListAstNode.create23(c,w,null,!1):w}}),define(ne[691],re([1,0,458,690,343,284,1157,1156]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseDocument=void 0;function I(v,C,o,c){return new w(v,C,o,c).parseDocument()}e.parseDocument=I;class w{constructor(C,o,c,i){if(this.tokenizer=C,this.createImmutableLists=i,this._itemsConstructed=0,this._itemsFromCache=0,c&&i)throw new Error("Not supported");this.oldNodeReader=c?new D.NodeReader(c):void 0,this.positionMapper=new f.BeforeEditPositionMapper(o,C.length)}get nodesConstructed(){return this._itemsConstructed}get nodesReused(){return this._itemsFromCache}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let C=this.parseList(_.SmallImmutableSet.getEmpty());return C||(C=t.ListAstNode.getEmpty()),C}parseList(C){const o=new Array;for(;;){const i=this.tokenizer.peek();if(!i||i.kind===2&&i.bracketIds.intersects(C))break;const S=this.parseChild(C);S.kind===4&&S.childrenLength===0||o.push(S)}return this.oldNodeReader?(0,k.concat23Trees)(o):(0,k.concat23TreesOfSameHeight)(o,this.createImmutableLists)}parseChild(C){if(this.oldNodeReader){const c=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(!(0,A.lengthIsZero)(c)){const i=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),S=>(0,A.lengthLessThan)(S.length,c)?S.canBeReused(C):!1);if(i)return this._itemsFromCache++,this.tokenizer.skip(i.length),i}}this._itemsConstructed++;const o=this.tokenizer.read();switch(o.kind){case 2:return new t.InvalidBracketAstNode(o.bracketIds,o.length);case 0:return o.astNode;case 1:{const c=C.merge(o.bracketIds),i=this.parseList(c),S=this.tokenizer.peek();return S&&S.kind===2&&(S.bracketId===o.bracketId||S.bracketIds.intersects(o.bracketIds))?(this.tokenizer.read(),t.PairAstNode.create(o.astNode,i,S.astNode)):t.PairAstNode.create(o.astNode,i,null)}default:throw new Error("unexpected")}}}}),define(ne[1158],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.guessIndentation=void 0;class t{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function f(A,k,D,I,w){w.spacesDiff=0,w.looksLikeAlignment=!1;let v;for(v=0;v<k&&v<I;v++){const l=A.charCodeAt(v),r=D.charCodeAt(v);if(l!==r)break}let C=0,o=0;for(let l=v;l<k;l++)A.charCodeAt(l)===32?C++:o++;let c=0,i=0;for(let l=v;l<I;l++)D.charCodeAt(l)===32?c++:i++;if(C>0&&o>0||c>0&&i>0)return;const S=Math.abs(o-i),s=Math.abs(C-c);if(S===0){w.spacesDiff=s,s>0&&0<=c-1&&c-1<A.length&&c<D.length&&D.charCodeAt(c)!==32&&A.charCodeAt(c-1)===32&&A.charCodeAt(A.length-1)===44&&(w.looksLikeAlignment=!0);return}if(s%S==0){w.spacesDiff=s/S;return}}function _(A,k,D){const I=Math.min(A.getLineCount(),1e4);let w=0,v=0,C="",o=0;const c=[2,4,6,8,3,5,7],i=8,S=[0,0,0,0,0,0,0,0,0],s=new t;for(let p=1;p<=I;p++){const u=A.getLineLength(p),a=A.getLineContent(p),n=u<=65536;let h=!1,g=0,d=0,m=0;for(let E=0,y=u;E<y;E++){const T=n?a.charCodeAt(E):A.getLineCharCode(p,E);if(T===9)m++;else if(T===32)d++;else{h=!0,g=E;break}}if(!h||(m>0?w++:d>1&&v++,f(C,o,a,g,s),s.looksLikeAlignment&&!(D&&k===s.spacesDiff)))continue;const b=s.spacesDiff;b<=i&&S[b]++,C=a,o=g}let l=D;w!==v&&(l=w<v);let r=k;if(l){let p=l?0:.1*I;c.forEach(u=>{const a=S[u];a>p&&(p=a,r=u)}),r===4&&S[4]>0&&S[2]>0&&S[2]>=S[4]/2&&(r=2)}return{insertSpaces:l,tabSize:r}}e.guessIndentation=_}),define(ne[692],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.intervalCompare=e.recomputeMaxEnd=e.nodeAcceptEdit=e.IntervalTree=e.SENTINEL=e.IntervalNode=e.setNodeStickiness=e.getNodeColor=e.NodeColor=e.ClassName=void 0;var t;(function(P){P.EditorHintDecoration="squiggly-hint",P.EditorInfoDecoration="squiggly-info",P.EditorWarningDecoration="squiggly-warning",P.EditorErrorDecoration="squiggly-error",P.EditorUnnecessaryDecoration="squiggly-unnecessary",P.EditorUnnecessaryInlineDecoration="squiggly-inline-unnecessary",P.EditorDeprecatedInlineDecoration="squiggly-inline-deprecated"})(t=e.ClassName||(e.ClassName={}));var f;(function(P){P[P.Black=0]="Black",P[P.Red=1]="Red"})(f=e.NodeColor||(e.NodeColor={}));var _;(function(P){P[P.ColorMask=1]="ColorMask",P[P.ColorMaskInverse=254]="ColorMaskInverse",P[P.ColorOffset=0]="ColorOffset",P[P.IsVisitedMask=2]="IsVisitedMask",P[P.IsVisitedMaskInverse=253]="IsVisitedMaskInverse",P[P.IsVisitedOffset=1]="IsVisitedOffset",P[P.IsForValidationMask=4]="IsForValidationMask",P[P.IsForValidationMaskInverse=251]="IsForValidationMaskInverse",P[P.IsForValidationOffset=2]="IsForValidationOffset",P[P.StickinessMask=24]="StickinessMask",P[P.StickinessMaskInverse=231]="StickinessMaskInverse",P[P.StickinessOffset=3]="StickinessOffset",P[P.CollapseOnReplaceEditMask=32]="CollapseOnReplaceEditMask",P[P.CollapseOnReplaceEditMaskInverse=223]="CollapseOnReplaceEditMaskInverse",P[P.CollapseOnReplaceEditOffset=5]="CollapseOnReplaceEditOffset",P[P.MIN_SAFE_DELTA=-1073741824]="MIN_SAFE_DELTA",P[P.MAX_SAFE_DELTA=1073741824]="MAX_SAFE_DELTA"})(_||(_={}));function A(P){return(P.metadata&1)>>>0}e.getNodeColor=A;function k(P,V){P.metadata=P.metadata&254|V<<0}function D(P){return(P.metadata&2)>>>1==1}function I(P,V){P.metadata=P.metadata&253|(V?1:0)<<1}function w(P){return(P.metadata&4)>>>2==1}function v(P,V){P.metadata=P.metadata&251|(V?1:0)<<2}function C(P){return(P.metadata&24)>>>3}function o(P,V){P.metadata=P.metadata&231|V<<3}function c(P){return(P.metadata&32)>>>5==1}function i(P,V){P.metadata=P.metadata&223|(V?1:0)<<5}function S(P,V){o(P,V)}e.setNodeStickiness=S;class s{constructor(V,z,U){this.metadata=0,this.parent=this,this.left=this,this.right=this,k(this,1),this.start=z,this.end=U,this.delta=0,this.maxEnd=U,this.id=V,this.ownerId=0,this.options=null,v(this,!1),o(this,1),i(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=z,this.cachedAbsoluteEnd=U,this.range=null,I(this,!1)}reset(V,z,U,H){this.start=z,this.end=U,this.maxEnd=U,this.cachedVersionId=V,this.cachedAbsoluteStart=z,this.cachedAbsoluteEnd=U,this.range=H}setOptions(V){this.options=V;const z=this.options.className;v(this,z==="squiggly-error"||z==="squiggly-warning"||z==="squiggly-info"),o(this,this.options.stickiness),i(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(V,z,U){this.cachedVersionId!==U&&(this.range=null),this.cachedVersionId=U,this.cachedAbsoluteStart=V,this.cachedAbsoluteEnd=z}detach(){this.parent=null,this.left=null,this.right=null}}e.IntervalNode=s,e.SENTINEL=new s(null,0,0),e.SENTINEL.parent=e.SENTINEL,e.SENTINEL.left=e.SENTINEL,e.SENTINEL.right=e.SENTINEL,k(e.SENTINEL,0);class l{constructor(){this.root=e.SENTINEL,this.requestNormalizeDelta=!1}intervalSearch(V,z,U,H,K){return this.root===e.SENTINEL?[]:b(this,V,z,U,H,K)}search(V,z,U){return this.root===e.SENTINEL?[]:m(this,V,z,U)}collectNodesFromOwner(V){return g(this,V)}collectNodesPostOrder(){return d(this)}insert(V){E(this,V),this._normalizeDeltaIfNecessary()}delete(V){T(this,V),this._normalizeDeltaIfNecessary()}resolveNode(V,z){const U=V;let H=0;for(;V!==this.root;)V===V.parent.right&&(H+=V.parent.delta),V=V.parent;const K=U.start+H,G=U.end+H;U.setCachedOffsets(K,G,z)}acceptReplace(V,z,U,H){const K=n(this,V,V+z);for(let G=0,q=K.length;G<q;G++){const Z=K[G];T(this,Z)}this._normalizeDeltaIfNecessary(),h(this,V,V+z,U),this._normalizeDeltaIfNecessary();for(let G=0,q=K.length;G<q;G++){const Z=K[G];Z.start=Z.cachedAbsoluteStart,Z.end=Z.cachedAbsoluteEnd,a(Z,V,V+z,U,H),Z.maxEnd=Z.end,E(this,Z)}this._normalizeDeltaIfNecessary()}getAllInOrder(){return m(this,0,!1,0)}_normalizeDeltaIfNecessary(){!this.requestNormalizeDelta||(this.requestNormalizeDelta=!1,r(this))}}e.IntervalTree=l;function r(P){let V=P.root,z=0;for(;V!==e.SENTINEL;){if(V.left!==e.SENTINEL&&!D(V.left)){V=V.left;continue}if(V.right!==e.SENTINEL&&!D(V.right)){z+=V.delta,V=V.right;continue}V.start=z+V.start,V.end=z+V.end,V.delta=0,M(V),I(V,!0),I(V.left,!1),I(V.right,!1),V===V.parent.right&&(z-=V.parent.delta),V=V.parent}I(P.root,!1)}var p;(function(P){P[P.MarkerDefined=0]="MarkerDefined",P[P.ForceMove=1]="ForceMove",P[P.ForceStay=2]="ForceStay"})(p||(p={}));function u(P,V,z,U){return P<z?!0:P>z||U===1?!1:U===2?!0:V}function a(P,V,z,U,H){const K=C(P),G=K===0||K===2,q=K===1||K===2,Z=z-V,j=U,X=Math.min(Z,j),Y=P.start;let $=!1;const J=P.end;let ee=!1;V<=Y&&J<=z&&c(P)&&(P.start=V,$=!0,P.end=V,ee=!0);{const se=H?1:Z>0?2:0;!$&&u(Y,G,V,se)&&($=!0),!ee&&u(J,q,V,se)&&(ee=!0)}if(X>0&&!H){const se=Z>j?2:0;!$&&u(Y,G,V+X,se)&&($=!0),!ee&&u(J,q,V+X,se)&&(ee=!0)}{const se=H?1:0;!$&&u(Y,G,z,se)&&(P.start=V+j,$=!0),!ee&&u(J,q,z,se)&&(P.end=V+j,ee=!0)}const te=j-Z;$||(P.start=Math.max(0,Y+te)),ee||(P.end=Math.max(0,J+te)),P.start>P.end&&(P.end=P.start)}e.nodeAcceptEdit=a;function n(P,V,z){let U=P.root,H=0,K=0,G=0,q=0;const Z=[];let j=0;for(;U!==e.SENTINEL;){if(D(U)){I(U.left,!1),I(U.right,!1),U===U.parent.right&&(H-=U.parent.delta),U=U.parent;continue}if(!D(U.left)){if(K=H+U.maxEnd,K<V){I(U,!0);continue}if(U.left!==e.SENTINEL){U=U.left;continue}}if(G=H+U.start,G>z){I(U,!0);continue}if(q=H+U.end,q>=V&&(U.setCachedOffsets(G,q,0),Z[j++]=U),I(U,!0),U.right!==e.SENTINEL&&!D(U.right)){H+=U.delta,U=U.right;continue}}return I(P.root,!1),Z}function h(P,V,z,U){let H=P.root,K=0,G=0,q=0;const Z=U-(z-V);for(;H!==e.SENTINEL;){if(D(H)){I(H.left,!1),I(H.right,!1),H===H.parent.right&&(K-=H.parent.delta),M(H),H=H.parent;continue}if(!D(H.left)){if(G=K+H.maxEnd,G<V){I(H,!0);continue}if(H.left!==e.SENTINEL){H=H.left;continue}}if(q=K+H.start,q>z){H.start+=Z,H.end+=Z,H.delta+=Z,(H.delta<-1073741824||H.delta>1073741824)&&(P.requestNormalizeDelta=!0),I(H,!0);continue}if(I(H,!0),H.right!==e.SENTINEL&&!D(H.right)){K+=H.delta,H=H.right;continue}}I(P.root,!1)}function g(P,V){let z=P.root;const U=[];let H=0;for(;z!==e.SENTINEL;){if(D(z)){I(z.left,!1),I(z.right,!1),z=z.parent;continue}if(z.left!==e.SENTINEL&&!D(z.left)){z=z.left;continue}if(z.ownerId===V&&(U[H++]=z),I(z,!0),z.right!==e.SENTINEL&&!D(z.right)){z=z.right;continue}}return I(P.root,!1),U}function d(P){let V=P.root;const z=[];let U=0;for(;V!==e.SENTINEL;){if(D(V)){I(V.left,!1),I(V.right,!1),V=V.parent;continue}if(V.left!==e.SENTINEL&&!D(V.left)){V=V.left;continue}if(V.right!==e.SENTINEL&&!D(V.right)){V=V.right;continue}z[U++]=V,I(V,!0)}return I(P.root,!1),z}function m(P,V,z,U){let H=P.root,K=0,G=0,q=0;const Z=[];let j=0;for(;H!==e.SENTINEL;){if(D(H)){I(H.left,!1),I(H.right,!1),H===H.parent.right&&(K-=H.parent.delta),H=H.parent;continue}if(H.left!==e.SENTINEL&&!D(H.left)){H=H.left;continue}G=K+H.start,q=K+H.end,H.setCachedOffsets(G,q,U);let X=!0;if(V&&H.ownerId&&H.ownerId!==V&&(X=!1),z&&w(H)&&(X=!1),X&&(Z[j++]=H),I(H,!0),H.right!==e.SENTINEL&&!D(H.right)){K+=H.delta,H=H.right;continue}}return I(P.root,!1),Z}function b(P,V,z,U,H,K){let G=P.root,q=0,Z=0,j=0,X=0;const Y=[];let $=0;for(;G!==e.SENTINEL;){if(D(G)){I(G.left,!1),I(G.right,!1),G===G.parent.right&&(q-=G.parent.delta),G=G.parent;continue}if(!D(G.left)){if(Z=q+G.maxEnd,Z<V){I(G,!0);continue}if(G.left!==e.SENTINEL){G=G.left;continue}}if(j=q+G.start,j>z){I(G,!0);continue}if(X=q+G.end,X>=V){G.setCachedOffsets(j,X,K);let J=!0;U&&G.ownerId&&G.ownerId!==U&&(J=!1),H&&w(G)&&(J=!1),J&&(Y[$++]=G)}if(I(G,!0),G.right!==e.SENTINEL&&!D(G.right)){q+=G.delta,G=G.right;continue}}return I(P.root,!1),Y}function E(P,V){if(P.root===e.SENTINEL)return V.parent=e.SENTINEL,V.left=e.SENTINEL,V.right=e.SENTINEL,k(V,0),P.root=V,P.root;y(P,V),N(V.parent);let z=V;for(;z!==P.root&&A(z.parent)===1;)if(z.parent===z.parent.parent.left){const U=z.parent.parent.right;A(U)===1?(k(z.parent,0),k(U,0),k(z.parent.parent,1),z=z.parent.parent):(z===z.parent.right&&(z=z.parent,x(P,z)),k(z.parent,0),k(z.parent.parent,1),F(P,z.parent.parent))}else{const U=z.parent.parent.left;A(U)===1?(k(z.parent,0),k(U,0),k(z.parent.parent,1),z=z.parent.parent):(z===z.parent.left&&(z=z.parent,F(P,z)),k(z.parent,0),k(z.parent.parent,1),x(P,z.parent.parent))}return k(P.root,0),V}function y(P,V){let z=0,U=P.root;const H=V.start,K=V.end;for(;;)if(B(H,K,U.start+z,U.end+z)<0)if(U.left===e.SENTINEL){V.start-=z,V.end-=z,V.maxEnd-=z,U.left=V;break}else U=U.left;else if(U.right===e.SENTINEL){V.start-=z+U.delta,V.end-=z+U.delta,V.maxEnd-=z+U.delta,U.right=V;break}else z+=U.delta,U=U.right;V.parent=U,V.left=e.SENTINEL,V.right=e.SENTINEL,k(V,1)}function T(P,V){let z,U;if(V.left===e.SENTINEL?(z=V.right,U=V,z.delta+=V.delta,(z.delta<-1073741824||z.delta>1073741824)&&(P.requestNormalizeDelta=!0),z.start+=V.delta,z.end+=V.delta):V.right===e.SENTINEL?(z=V.left,U=V):(U=R(V.right),z=U.right,z.start+=U.delta,z.end+=U.delta,z.delta+=U.delta,(z.delta<-1073741824||z.delta>1073741824)&&(P.requestNormalizeDelta=!0),U.start+=V.delta,U.end+=V.delta,U.delta=V.delta,(U.delta<-1073741824||U.delta>1073741824)&&(P.requestNormalizeDelta=!0)),U===P.root){P.root=z,k(z,0),V.detach(),O(),M(z),P.root.parent=e.SENTINEL;return}const H=A(U)===1;if(U===U.parent.left?U.parent.left=z:U.parent.right=z,U===V?z.parent=U.parent:(U.parent===V?z.parent=U:z.parent=U.parent,U.left=V.left,U.right=V.right,U.parent=V.parent,k(U,A(V)),V===P.root?P.root=U:V===V.parent.left?V.parent.left=U:V.parent.right=U,U.left!==e.SENTINEL&&(U.left.parent=U),U.right!==e.SENTINEL&&(U.right.parent=U)),V.detach(),H){N(z.parent),U!==V&&(N(U),N(U.parent)),O();return}N(z),N(z.parent),U!==V&&(N(U),N(U.parent));let K;for(;z!==P.root&&A(z)===0;)z===z.parent.left?(K=z.parent.right,A(K)===1&&(k(K,0),k(z.parent,1),x(P,z.parent),K=z.parent.right),A(K.left)===0&&A(K.right)===0?(k(K,1),z=z.parent):(A(K.right)===0&&(k(K.left,0),k(K,1),F(P,K),K=z.parent.right),k(K,A(z.parent)),k(z.parent,0),k(K.right,0),x(P,z.parent),z=P.root)):(K=z.parent.left,A(K)===1&&(k(K,0),k(z.parent,1),F(P,z.parent),K=z.parent.left),A(K.left)===0&&A(K.right)===0?(k(K,1),z=z.parent):(A(K.left)===0&&(k(K.right,0),k(K,1),x(P,K),K=z.parent.left),k(K,A(z.parent)),k(z.parent,0),k(K.left,0),F(P,z.parent),z=P.root));k(z,0),O()}function R(P){for(;P.left!==e.SENTINEL;)P=P.left;return P}function O(){e.SENTINEL.parent=e.SENTINEL,e.SENTINEL.delta=0,e.SENTINEL.start=0,e.SENTINEL.end=0}function x(P,V){const z=V.right;z.delta+=V.delta,(z.delta<-1073741824||z.delta>1073741824)&&(P.requestNormalizeDelta=!0),z.start+=V.delta,z.end+=V.delta,V.right=z.left,z.left!==e.SENTINEL&&(z.left.parent=V),z.parent=V.parent,V.parent===e.SENTINEL?P.root=z:V===V.parent.left?V.parent.left=z:V.parent.right=z,z.left=V,V.parent=z,M(V),M(z)}function F(P,V){const z=V.left;V.delta-=z.delta,(V.delta<-1073741824||V.delta>1073741824)&&(P.requestNormalizeDelta=!0),V.start-=z.delta,V.end-=z.delta,V.left=z.right,z.right!==e.SENTINEL&&(z.right.parent=V),z.parent=V.parent,V.parent===e.SENTINEL?P.root=z:V===V.parent.right?V.parent.right=z:V.parent.left=z,z.right=V,V.parent=z,M(V),M(z)}function L(P){let V=P.end;if(P.left!==e.SENTINEL){const z=P.left.maxEnd;z>V&&(V=z)}if(P.right!==e.SENTINEL){const z=P.right.maxEnd+P.delta;z>V&&(V=z)}return V}function M(P){P.maxEnd=L(P)}e.recomputeMaxEnd=M;function N(P){for(;P!==e.SENTINEL;){const V=L(P);if(P.maxEnd===V)return;P.maxEnd=V,P=P.parent}}function B(P,V,z,U){return P===z?V-U:P-z}e.intervalCompare=B}),define(ne[1159],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.recomputeTreeMetadata=e.updateTreeMetadata=e.fixInsert=e.rbDelete=e.rightRotate=e.leftRotate=e.resetSentinel=e.calculateLF=e.calculateSize=e.righttest=e.leftest=e.SENTINEL=e.NodeColor=e.TreeNode=void 0;class t{constructor(s,l){this.piece=s,this.color=l,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==e.SENTINEL)return _(this.right);let s=this;for(;s.parent!==e.SENTINEL&&s.parent.left!==s;)s=s.parent;return s.parent===e.SENTINEL?e.SENTINEL:s.parent}prev(){if(this.left!==e.SENTINEL)return A(this.left);let s=this;for(;s.parent!==e.SENTINEL&&s.parent.right!==s;)s=s.parent;return s.parent===e.SENTINEL?e.SENTINEL:s.parent}detach(){this.parent=null,this.left=null,this.right=null}}e.TreeNode=t;var f;(function(S){S[S.Black=0]="Black",S[S.Red=1]="Red"})(f=e.NodeColor||(e.NodeColor={})),e.SENTINEL=new t(null,0),e.SENTINEL.parent=e.SENTINEL,e.SENTINEL.left=e.SENTINEL,e.SENTINEL.right=e.SENTINEL,e.SENTINEL.color=0;function _(S){for(;S.left!==e.SENTINEL;)S=S.left;return S}e.leftest=_;function A(S){for(;S.right!==e.SENTINEL;)S=S.right;return S}e.righttest=A;function k(S){return S===e.SENTINEL?0:S.size_left+S.piece.length+k(S.right)}e.calculateSize=k;function D(S){return S===e.SENTINEL?0:S.lf_left+S.piece.lineFeedCnt+D(S.right)}e.calculateLF=D;function I(){e.SENTINEL.parent=e.SENTINEL}e.resetSentinel=I;function w(S,s){const l=s.right;l.size_left+=s.size_left+(s.piece?s.piece.length:0),l.lf_left+=s.lf_left+(s.piece?s.piece.lineFeedCnt:0),s.right=l.left,l.left!==e.SENTINEL&&(l.left.parent=s),l.parent=s.parent,s.parent===e.SENTINEL?S.root=l:s.parent.left===s?s.parent.left=l:s.parent.right=l,l.left=s,s.parent=l}e.leftRotate=w;function v(S,s){const l=s.left;s.left=l.right,l.right!==e.SENTINEL&&(l.right.parent=s),l.parent=s.parent,s.size_left-=l.size_left+(l.piece?l.piece.length:0),s.lf_left-=l.lf_left+(l.piece?l.piece.lineFeedCnt:0),s.parent===e.SENTINEL?S.root=l:s===s.parent.right?s.parent.right=l:s.parent.left=l,l.right=s,s.parent=l}e.rightRotate=v;function C(S,s){let l,r;if(s.left===e.SENTINEL?(r=s,l=r.right):s.right===e.SENTINEL?(r=s,l=r.left):(r=_(s.right),l=r.right),r===S.root){S.root=l,l.color=0,s.detach(),I(),S.root.parent=e.SENTINEL;return}const p=r.color===1;if(r===r.parent.left?r.parent.left=l:r.parent.right=l,r===s?(l.parent=r.parent,i(S,l)):(r.parent===s?l.parent=r:l.parent=r.parent,i(S,l),r.left=s.left,r.right=s.right,r.parent=s.parent,r.color=s.color,s===S.root?S.root=r:s===s.parent.left?s.parent.left=r:s.parent.right=r,r.left!==e.SENTINEL&&(r.left.parent=r),r.right!==e.SENTINEL&&(r.right.parent=r),r.size_left=s.size_left,r.lf_left=s.lf_left,i(S,r)),s.detach(),l.parent.left===l){const a=k(l),n=D(l);if(a!==l.parent.size_left||n!==l.parent.lf_left){const h=a-l.parent.size_left,g=n-l.parent.lf_left;l.parent.size_left=a,l.parent.lf_left=n,c(S,l.parent,h,g)}}if(i(S,l.parent),p){I();return}let u;for(;l!==S.root&&l.color===0;)l===l.parent.left?(u=l.parent.right,u.color===1&&(u.color=0,l.parent.color=1,w(S,l.parent),u=l.parent.right),u.left.color===0&&u.right.color===0?(u.color=1,l=l.parent):(u.right.color===0&&(u.left.color=0,u.color=1,v(S,u),u=l.parent.right),u.color=l.parent.color,l.parent.color=0,u.right.color=0,w(S,l.parent),l=S.root)):(u=l.parent.left,u.color===1&&(u.color=0,l.parent.color=1,v(S,l.parent),u=l.parent.left),u.left.color===0&&u.right.color===0?(u.color=1,l=l.parent):(u.left.color===0&&(u.right.color=0,u.color=1,w(S,u),u=l.parent.left),u.color=l.parent.color,l.parent.color=0,u.left.color=0,v(S,l.parent),l=S.root));l.color=0,I()}e.rbDelete=C;function o(S,s){for(i(S,s);s!==S.root&&s.parent.color===1;)if(s.parent===s.parent.parent.left){const l=s.parent.parent.right;l.color===1?(s.parent.color=0,l.color=0,s.parent.parent.color=1,s=s.parent.parent):(s===s.parent.right&&(s=s.parent,w(S,s)),s.parent.color=0,s.parent.parent.color=1,v(S,s.parent.parent))}else{const l=s.parent.parent.left;l.color===1?(s.parent.color=0,l.color=0,s.parent.parent.color=1,s=s.parent.parent):(s===s.parent.left&&(s=s.parent,v(S,s)),s.parent.color=0,s.parent.parent.color=1,w(S,s.parent.parent))}S.root.color=0}e.fixInsert=o;function c(S,s,l,r){for(;s!==S.root&&s!==e.SENTINEL;)s.parent.left===s&&(s.parent.size_left+=l,s.parent.lf_left+=r),s=s.parent}e.updateTreeMetadata=c;function i(S,s){let l=0,r=0;if(s!==S.root){for(;s!==S.root&&s===s.parent.right;)s=s.parent;if(s!==S.root)for(s=s.parent,l=k(s.left)-s.size_left,r=D(s.left)-s.lf_left,s.size_left+=l,s.lf_left+=r;s!==S.root&&(l!==0||r!==0);)s.parent.left===s&&(s.parent.size_left+=l,s.parent.lf_left+=r),s=s.parent}}e.recomputeTreeMetadata=i}),define(ne[344],re([1,0,15,445]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PrefixSumIndexOfResult=e.ConstantTimePrefixSumComputer=e.PrefixSumComputer=void 0;class _{constructor(I){this.values=I,this.prefixSum=new Uint32Array(I.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}getCount(){return this.values.length}insertValues(I,w){I=(0,f.toUint32)(I);const v=this.values,C=this.prefixSum,o=w.length;return o===0?!1:(this.values=new Uint32Array(v.length+o),this.values.set(v.subarray(0,I),0),this.values.set(v.subarray(I),I+o),this.values.set(w,I),I-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=I-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(C.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(I,w){return I=(0,f.toUint32)(I),w=(0,f.toUint32)(w),this.values[I]===w?!1:(this.values[I]=w,I-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=I-1),!0)}removeValues(I,w){I=(0,f.toUint32)(I),w=(0,f.toUint32)(w);const v=this.values,C=this.prefixSum;if(I>=v.length)return!1;const o=v.length-I;return w>=o&&(w=o),w===0?!1:(this.values=new Uint32Array(v.length-w),this.values.set(v.subarray(0,I),0),this.values.set(v.subarray(I+w),I),this.prefixSum=new Uint32Array(this.values.length),I-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=I-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(C.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(I){return I<0?0:(I=(0,f.toUint32)(I),this._getPrefixSum(I))}_getPrefixSum(I){if(I<=this.prefixSumValidIndex[0])return this.prefixSum[I];let w=this.prefixSumValidIndex[0]+1;w===0&&(this.prefixSum[0]=this.values[0],w++),I>=this.values.length&&(I=this.values.length-1);for(let v=w;v<=I;v++)this.prefixSum[v]=this.prefixSum[v-1]+this.values[v];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],I),this.prefixSum[I]}getIndexOf(I){I=Math.floor(I),this.getTotalSum();let w=0,v=this.values.length-1,C=0,o=0,c=0;for(;w<=v;)if(C=w+(v-w)/2|0,o=this.prefixSum[C],c=o-this.values[C],I<c)v=C-1;else if(I>=o)w=C+1;else break;return new k(C,I-c)}}e.PrefixSumComputer=_;class A{constructor(I){this._values=I,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(I){return this._ensureValid(),I===0?0:this._prefixSum[I-1]}getIndexOf(I){this._ensureValid();const w=this._indexBySum[I],v=w>0?this._prefixSum[w-1]:0;return new k(w,I-v)}removeValues(I,w){this._values.splice(I,w),this._invalidate(I)}insertValues(I,w){this._values=(0,t.arrayInsert)(this._values,I,w),this._invalidate(I)}_invalidate(I){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,I-1)}_ensureValid(){if(!this._isValid){for(let I=this._validEndIndex+1,w=this._values.length;I<w;I++){const v=this._values[I],C=I>0?this._prefixSum[I-1]:0;this._prefixSum[I]=C+v;for(let o=0;o<v;o++)this._indexBySum[C+o]=I}this._prefixSum.length=this._values.length,this._indexBySum.length=this._prefixSum[this._prefixSum.length-1],this._isValid=!0,this._validEndIndex=this._values.length-1}}setValue(I,w){this._values[I]!==w&&(this._values[I]=w,this._invalidate(I))}}e.ConstantTimePrefixSumComputer=A;class k{constructor(I,w){this.index=I,this.remainder=w,this._prefixSumIndexOfResultBrand=void 0,this.index=I,this.remainder=w}}e.PrefixSumIndexOfResult=k}),define(ne[1160],re([1,0,29,49,344]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MirrorTextModel=void 0;class A{constructor(D,I,w,v){this._uri=D,this._lines=I,this._eol=w,this._versionId=v,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(D){D.eol&&D.eol!==this._eol&&(this._eol=D.eol,this._lineStarts=null);const I=D.changes;for(const w of I)this._acceptDeleteRange(w.range),this._acceptInsertText(new f.Position(w.range.startLineNumber,w.range.startColumn),w.text);this._versionId=D.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const D=this._eol.length,I=this._lines.length,w=new Uint32Array(I);for(let v=0;v<I;v++)w[v]=this._lines[v].length+D;this._lineStarts=new _.PrefixSumComputer(w)}}_setLineText(D,I){this._lines[D]=I,this._lineStarts&&this._lineStarts.setValue(D,this._lines[D].length+this._eol.length)}_acceptDeleteRange(D){if(D.startLineNumber===D.endLineNumber){if(D.startColumn===D.endColumn)return;this._setLineText(D.startLineNumber-1,this._lines[D.startLineNumber-1].substring(0,D.startColumn-1)+this._lines[D.startLineNumber-1].substring(D.endColumn-1));return}this._setLineText(D.startLineNumber-1,this._lines[D.startLineNumber-1].substring(0,D.startColumn-1)+this._lines[D.endLineNumber-1].substring(D.endColumn-1)),this._lines.splice(D.startLineNumber,D.endLineNumber-D.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(D.startLineNumber,D.endLineNumber-D.startLineNumber)}_acceptInsertText(D,I){if(I.length===0)return;const w=(0,t.splitLines)(I);if(w.length===1){this._setLineText(D.lineNumber-1,this._lines[D.lineNumber-1].substring(0,D.column-1)+w[0]+this._lines[D.lineNumber-1].substring(D.column-1));return}w[w.length-1]+=this._lines[D.lineNumber-1].substring(D.column-1),this._setLineText(D.lineNumber-1,this._lines[D.lineNumber-1].substring(0,D.column-1)+w[0]);const v=new Uint32Array(w.length-1);for(let C=1;C<w.length;C++)this._lines.splice(D.lineNumber+C-1,0,w[C]),v[C-1]=w[C].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(D.lineNumber,v)}}e.MirrorTextModel=A}),define(ne[1161],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextModelPart=void 0;class t{constructor(){this._isDisposed=!1}dispose(){this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}e.TextModelPart=t}),define(ne[345],re([1,0,29,385,49,20,122]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Searcher=e.isValidMatch=e.TextModelSearch=e.createFindMatch=e.isMultilineRegexSource=e.SearchParams=void 0;const D=999;class I{constructor(r,p,u,a){this.searchString=r,this.isRegex=p,this.matchCase=u,this.wordSeparators=a}parseSearchRequest(){if(this.searchString==="")return null;let r;this.isRegex?r=w(this.searchString):r=this.searchString.indexOf(` `)>=0;let p=null;try{p=t.createRegExp(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:r,global:!0,unicode:!0})}catch{return null}if(!p)return null;let u=!this.isRegex&&!r;return u&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(u=this.matchCase),new k.SearchData(p,this.wordSeparators?(0,f.getMapForWordSeparators)(this.wordSeparators):null,u?this.searchString:null)}}e.SearchParams=I;function w(l){if(!l||l.length===0)return!1;for(let r=0,p=l.length;r<p;r++)if(l.charCodeAt(r)===92){if(r++,r>=p)break;const a=l.charCodeAt(r);if(a===110||a===114||a===87)return!0}return!1}e.isMultilineRegexSource=w;function v(l,r,p){if(!p)return new k.FindMatch(l,null);const u=[];for(let a=0,n=r.length;a<n;a++)u[a]=r[a];return new k.FindMatch(l,u)}e.createFindMatch=v;class C{constructor(r){const p=[];let u=0;for(let a=0,n=r.length;a<n;a++)r.charCodeAt(a)===10&&(p[u++]=a);this._lineFeedsOffsets=p}findLineFeedCountBeforeOffset(r){const p=this._lineFeedsOffsets;let u=0,a=p.length-1;if(a===-1||r<=p[0])return 0;for(;u<a;){const n=u+((a-u)/2>>0);p[n]>=r?a=n-1:p[n+1]>=r?(u=n,a=n):u=n+1}return u+1}}class o{static findMatches(r,p,u,a,n){const h=p.parseSearchRequest();return h?h.regex.multiline?this._doFindMatchesMultiline(r,u,new s(h.wordSeparators,h.regex),a,n):this._doFindMatchesLineByLine(r,u,h,a,n):[]}static _getMultilineMatchRange(r,p,u,a,n,h){let g,d=0;a?(d=a.findLineFeedCountBeforeOffset(n),g=p+n+d):g=p+n;let m;if(a){const T=a.findLineFeedCountBeforeOffset(n+h.length)-d;m=g+h.length+T}else m=g+h.length;const b=r.getPositionAt(g),E=r.getPositionAt(m);return new A.Range(b.lineNumber,b.column,E.lineNumber,E.column)}static _doFindMatchesMultiline(r,p,u,a,n){const h=r.getOffsetAt(p.getStartPosition()),g=r.getValueInRange(p,1),d=r.getEOL()===`\r `?new C(g):null,m=[];let b=0,E;for(u.reset(0);E=u.next(g);)if(m[b++]=v(this._getMultilineMatchRange(r,h,g,d,E.index,E[0]),E,a),b>=n)return m;return m}static _doFindMatchesLineByLine(r,p,u,a,n){const h=[];let g=0;if(p.startLineNumber===p.endLineNumber){const m=r.getLineContent(p.startLineNumber).substring(p.startColumn-1,p.endColumn-1);return g=this._findMatchesInLine(u,m,p.startLineNumber,p.startColumn-1,g,h,a,n),h}const d=r.getLineContent(p.startLineNumber).substring(p.startColumn-1);g=this._findMatchesInLine(u,d,p.startLineNumber,p.startColumn-1,g,h,a,n);for(let m=p.startLineNumber+1;m<p.endLineNumber&&g<n;m++)g=this._findMatchesInLine(u,r.getLineContent(m),m,0,g,h,a,n);if(g<n){const m=r.getLineContent(p.endLineNumber).substring(0,p.endColumn-1);g=this._findMatchesInLine(u,m,p.endLineNumber,0,g,h,a,n)}return h}static _findMatchesInLine(r,p,u,a,n,h,g,d){const m=r.wordSeparators;if(!g&&r.simpleSearch){const y=r.simpleSearch,T=y.length,R=p.length;let O=-T;for(;(O=p.indexOf(y,O+T))!==-1;)if((!m||S(m,p,R,O,T))&&(h[n++]=new k.FindMatch(new A.Range(u,O+1+a,u,O+1+T+a),null),n>=d))return n;return n}const b=new s(r.wordSeparators,r.regex);let E;b.reset(0);do if(E=b.next(p),E&&(h[n++]=v(new A.Range(u,E.index+1+a,u,E.index+1+E[0].length+a),E,g),n>=d))return n;while(E);return n}static findNextMatch(r,p,u,a){const n=p.parseSearchRequest();if(!n)return null;const h=new s(n.wordSeparators,n.regex);return n.regex.multiline?this._doFindNextMatchMultiline(r,u,h,a):this._doFindNextMatchLineByLine(r,u,h,a)}static _doFindNextMatchMultiline(r,p,u,a){const n=new _.Position(p.lineNumber,1),h=r.getOffsetAt(n),g=r.getLineCount(),d=r.getValueInRange(new A.Range(n.lineNumber,n.column,g,r.getLineMaxColumn(g)),1),m=r.getEOL()===`\r `?new C(d):null;u.reset(p.column-1);let b=u.next(d);return b?v(this._getMultilineMatchRange(r,h,d,m,b.index,b[0]),b,a):p.lineNumber!==1||p.column!==1?this._doFindNextMatchMultiline(r,new _.Position(1,1),u,a):null}static _doFindNextMatchLineByLine(r,p,u,a){const n=r.getLineCount(),h=p.lineNumber,g=r.getLineContent(h),d=this._findFirstMatchInLine(u,g,h,p.column,a);if(d)return d;for(let m=1;m<=n;m++){const b=(h+m-1)%n,E=r.getLineContent(b+1),y=this._findFirstMatchInLine(u,E,b+1,1,a);if(y)return y}return null}static _findFirstMatchInLine(r,p,u,a,n){r.reset(a-1);const h=r.next(p);return h?v(new A.Range(u,h.index+1,u,h.index+1+h[0].length),h,n):null}static findPreviousMatch(r,p,u,a){const n=p.parseSearchRequest();if(!n)return null;const h=new s(n.wordSeparators,n.regex);return n.regex.multiline?this._doFindPreviousMatchMultiline(r,u,h,a):this._doFindPreviousMatchLineByLine(r,u,h,a)}static _doFindPreviousMatchMultiline(r,p,u,a){const n=this._doFindMatchesMultiline(r,new A.Range(1,1,p.lineNumber,p.column),u,a,10*D);if(n.length>0)return n[n.length-1];const h=r.getLineCount();return p.lineNumber!==h||p.column!==r.getLineMaxColumn(h)?this._doFindPreviousMatchMultiline(r,new _.Position(h,r.getLineMaxColumn(h)),u,a):null}static _doFindPreviousMatchLineByLine(r,p,u,a){const n=r.getLineCount(),h=p.lineNumber,g=r.getLineContent(h).substring(0,p.column-1),d=this._findLastMatchInLine(u,g,h,a);if(d)return d;for(let m=1;m<=n;m++){const b=(n+h-m-1)%n,E=r.getLineContent(b+1),y=this._findLastMatchInLine(u,E,b+1,a);if(y)return y}return null}static _findLastMatchInLine(r,p,u,a){let n=null,h;for(r.reset(0);h=r.next(p);)n=v(new A.Range(u,h.index+1,u,h.index+1+h[0].length),h,a);return n}}e.TextModelSearch=o;function c(l,r,p,u,a){if(u===0)return!0;const n=r.charCodeAt(u-1);if(l.get(n)!==0||n===13||n===10)return!0;if(a>0){const h=r.charCodeAt(u);if(l.get(h)!==0)return!0}return!1}function i(l,r,p,u,a){if(u+a===p)return!0;const n=r.charCodeAt(u+a);if(l.get(n)!==0||n===13||n===10)return!0;if(a>0){const h=r.charCodeAt(u+a-1);if(l.get(h)!==0)return!0}return!1}function S(l,r,p,u,a){return c(l,r,p,u,a)&&i(l,r,p,u,a)}e.isValidMatch=S;class s{constructor(r,p){this._wordSeparators=r,this._searchRegex=p,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(r){this._searchRegex.lastIndex=r,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(r){const p=r.length;let u;do{if(this._prevMatchStartIndex+this._prevMatchLength===p||(u=this._searchRegex.exec(r),!u))return null;const a=u.index,n=u[0].length;if(a===this._prevMatchStartIndex&&n===this._prevMatchLength){if(n===0){t.getNextCodePoint(r,p,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=a,this._prevMatchLength=n,!this._wordSeparators||S(this._wordSeparators,r,p,a,n))return u}while(u);return null}}e.Searcher=s}),define(ne[693],re([1,0,49,20,122,1159,345]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeBase=e.StringBuffer=e.Piece=e.createLineStarts=e.createLineStartsFast=e.LineStarts=e.createUintArray=e.AverageBufferSize=void 0,e.AverageBufferSize=65535;function D(s){let l;return s[s.length-1]<65536?l=new Uint16Array(s.length):l=new Uint32Array(s.length),l.set(s,0),l}e.createUintArray=D;class I{constructor(l,r,p,u,a){this.lineStarts=l,this.cr=r,this.lf=p,this.crlf=u,this.isBasicASCII=a}}e.LineStarts=I;function w(s,l=!0){const r=[0];let p=1;for(let u=0,a=s.length;u<a;u++){const n=s.charCodeAt(u);n===13?u+1<a&&s.charCodeAt(u+1)===10?(r[p++]=u+2,u++):r[p++]=u+1:n===10&&(r[p++]=u+1)}return l?D(r):r}e.createLineStartsFast=w;function v(s,l){s.length=0,s[0]=0;let r=1,p=0,u=0,a=0,n=!0;for(let g=0,d=l.length;g<d;g++){const m=l.charCodeAt(g);m===13?g+1<d&&l.charCodeAt(g+1)===10?(a++,s[r++]=g+2,g++):(p++,s[r++]=g+1):m===10?(u++,s[r++]=g+1):n&&m!==9&&(m<32||m>126)&&(n=!1)}const h=new I(D(s),p,u,a,n);return s.length=0,h}e.createLineStarts=v;class C{constructor(l,r,p,u,a){this.bufferIndex=l,this.start=r,this.end=p,this.lineFeedCnt=u,this.length=a}}e.Piece=C;class o{constructor(l,r){this.buffer=l,this.lineStarts=r}}e.StringBuffer=o;class c{constructor(l,r){this._pieces=[],this._tree=l,this._BOM=r,this._index=0,l.root!==A.SENTINEL&&l.iterate(l.root,p=>(p!==A.SENTINEL&&this._pieces.push(p.piece),!0))}read(){return this._pieces.length===0?this._index===0?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:this._index===0?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class i{constructor(l){this._limit=l,this._cache=[]}get(l){for(let r=this._cache.length-1;r>=0;r--){const p=this._cache[r];if(p.nodeStartOffset<=l&&p.nodeStartOffset+p.node.piece.length>=l)return p}return null}get2(l){for(let r=this._cache.length-1;r>=0;r--){const p=this._cache[r];if(p.nodeStartLineNumber&&p.nodeStartLineNumber<l&&p.nodeStartLineNumber+p.node.piece.lineFeedCnt>=l)return p}return null}set(l){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(l)}validate(l){let r=!1;const p=this._cache;for(let u=0;u<p.length;u++){const a=p[u];if(a.node.parent===null||a.nodeStartOffset>=l){p[u]=null,r=!0;continue}}if(r){const u=[];for(const a of p)a!==null&&u.push(a);this._cache=u}}}class S{constructor(l,r,p){this.create(l,r,p)}create(l,r,p){this._buffers=[new o("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=A.SENTINEL,this._lineCnt=1,this._length=0,this._EOL=r,this._EOLLength=r.length,this._EOLNormalized=p;let u=null;for(let a=0,n=l.length;a<n;a++)if(l[a].buffer.length>0){l[a].lineStarts||(l[a].lineStarts=w(l[a].buffer));const h=new C(a+1,{line:0,column:0},{line:l[a].lineStarts.length-1,column:l[a].buffer.length-l[a].lineStarts[l[a].lineStarts.length-1]},l[a].lineStarts.length-1,l[a].buffer.length);this._buffers.push(l[a]),u=this.rbInsertRight(u,h)}this._searchCache=new i(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(l){const r=e.AverageBufferSize,p=r-Math.floor(r/3),u=p*2;let a="",n=0;const h=[];if(this.iterate(this.root,g=>{const d=this.getNodeContent(g),m=d.length;if(n<=p||n+m<u)return a+=d,n+=m,!0;const b=a.replace(/\r\n|\r|\n/g,l);return h.push(new o(b,w(b))),a=d,n=m,!0}),n>0){const g=a.replace(/\r\n|\r|\n/g,l);h.push(new o(g,w(g)))}this.create(h,l,!0)}getEOL(){return this._EOL}setEOL(l){this._EOL=l,this._EOLLength=this._EOL.length,this.normalizeEOL(l)}createSnapshot(l){return new c(this,l)}equal(l){if(this.getLength()!==l.getLength()||this.getLineCount()!==l.getLineCount())return!1;const r=0;return this.iterate(this.root,u=>{if(u===A.SENTINEL)return!0;const a=this.getNodeContent(u),n=a.length,h=l.nodeAt(r),g=l.nodeAt(r+n),d=l.getValueInRange2(h,g);return a===d})}getOffsetAt(l,r){let p=0,u=this.root;for(;u!==A.SENTINEL;)if(u.left!==A.SENTINEL&&u.lf_left+1>=l)u=u.left;else{if(u.lf_left+u.piece.lineFeedCnt+1>=l)return p+=u.size_left,p+=this.getAccumulatedValue(u,l-u.lf_left-2)+r-1;l-=u.lf_left+u.piece.lineFeedCnt,p+=u.size_left+u.piece.length,u=u.right}return p}getPositionAt(l){l=Math.floor(l),l=Math.max(0,l);let r=this.root,p=0;const u=l;for(;r!==A.SENTINEL;)if(r.size_left!==0&&r.size_left>=l)r=r.left;else if(r.size_left+r.piece.length>=l){const a=this.getIndexOf(r,l-r.size_left);if(p+=r.lf_left+a.index,a.index===0){const n=this.getOffsetAt(p+1,1),h=u-n;return new t.Position(p+1,h+1)}return new t.Position(p+1,a.remainder+1)}else if(l-=r.size_left+r.piece.length,p+=r.lf_left+r.piece.lineFeedCnt,r.right===A.SENTINEL){const a=this.getOffsetAt(p+1,1),n=u-l-a;return new t.Position(p+1,n+1)}else r=r.right;return new t.Position(1,1)}getValueInRange(l,r){if(l.startLineNumber===l.endLineNumber&&l.startColumn===l.endColumn)return"";const p=this.nodeAt2(l.startLineNumber,l.startColumn),u=this.nodeAt2(l.endLineNumber,l.endColumn),a=this.getValueInRange2(p,u);return r?r!==this._EOL||!this._EOLNormalized?a.replace(/\r\n|\r|\n/g,r):r===this.getEOL()&&this._EOLNormalized?a:a.replace(/\r\n|\r|\n/g,r):a}getValueInRange2(l,r){if(l.node===r.node){const h=l.node,g=this._buffers[h.piece.bufferIndex].buffer,d=this.offsetInBuffer(h.piece.bufferIndex,h.piece.start);return g.substring(d+l.remainder,d+r.remainder)}let p=l.node;const u=this._buffers[p.piece.bufferIndex].buffer,a=this.offsetInBuffer(p.piece.bufferIndex,p.piece.start);let n=u.substring(a+l.remainder,a+p.piece.length);for(p=p.next();p!==A.SENTINEL;){const h=this._buffers[p.piece.bufferIndex].buffer,g=this.offsetInBuffer(p.piece.bufferIndex,p.piece.start);if(p===r.node){n+=h.substring(g,g+r.remainder);break}else n+=h.substr(g,p.piece.length);p=p.next()}return n}getLinesContent(){const l=[];let r=0,p="",u=!1;return this.iterate(this.root,a=>{if(a===A.SENTINEL)return!0;const n=a.piece;let h=n.length;if(h===0)return!0;const g=this._buffers[n.bufferIndex].buffer,d=this._buffers[n.bufferIndex].lineStarts,m=n.start.line,b=n.end.line;let E=d[m]+n.start.column;if(u&&(g.charCodeAt(E)===10&&(E++,h--),l[r++]=p,p="",u=!1,h===0))return!0;if(m===b)return!this._EOLNormalized&&g.charCodeAt(E+h-1)===13?(u=!0,p+=g.substr(E,h-1)):p+=g.substr(E,h),!0;p+=this._EOLNormalized?g.substring(E,Math.max(E,d[m+1]-this._EOLLength)):g.substring(E,d[m+1]).replace(/(\r\n|\r|\n)$/,""),l[r++]=p;for(let y=m+1;y<b;y++)p=this._EOLNormalized?g.substring(d[y],d[y+1]-this._EOLLength):g.substring(d[y],d[y+1]).replace(/(\r\n|\r|\n)$/,""),l[r++]=p;return!this._EOLNormalized&&g.charCodeAt(d[b]+n.end.column-1)===13?(u=!0,n.end.column===0?r--:p=g.substr(d[b],n.end.column-1)):p=g.substr(d[b],n.end.column),!0}),u&&(l[r++]=p,p=""),l[r++]=p,l}getLength(){return this._length}getLineCount(){return this._lineCnt}getLineContent(l){return this._lastVisitedLine.lineNumber===l?this._lastVisitedLine.value:(this._lastVisitedLine.lineNumber=l,l===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(l):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(l,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(l).replace(/(\r\n|\r|\n)$/,""),this._lastVisitedLine.value)}_getCharCode(l){if(l.remainder===l.node.piece.length){const r=l.node.next();if(!r)return 0;const p=this._buffers[r.piece.bufferIndex],u=this.offsetInBuffer(r.piece.bufferIndex,r.piece.start);return p.buffer.charCodeAt(u)}else{const r=this._buffers[l.node.piece.bufferIndex],u=this.offsetInBuffer(l.node.piece.bufferIndex,l.node.piece.start)+l.remainder;return r.buffer.charCodeAt(u)}}getLineCharCode(l,r){const p=this.nodeAt2(l,r+1);return this._getCharCode(p)}getLineLength(l){if(l===this.getLineCount()){const r=this.getOffsetAt(l,1);return this.getLength()-r}return this.getOffsetAt(l+1,1)-this.getOffsetAt(l,1)-this._EOLLength}getCharCode(l){const r=this.nodeAt(l);return this._getCharCode(r)}findMatchesInNode(l,r,p,u,a,n,h,g,d,m,b){const E=this._buffers[l.piece.bufferIndex],y=this.offsetInBuffer(l.piece.bufferIndex,l.piece.start),T=this.offsetInBuffer(l.piece.bufferIndex,a),R=this.offsetInBuffer(l.piece.bufferIndex,n);let O;const x={line:0,column:0};let F,L;r._wordSeparators?(F=E.buffer.substring(T,R),L=M=>M+T,r.reset(0)):(F=E.buffer,L=M=>M,r.reset(T));do if(O=r.next(F),O){if(L(O.index)>=R)return m;this.positionInBuffer(l,L(O.index)-y,x);const M=this.getLineFeedCnt(l.piece.bufferIndex,a,x),N=x.line===a.line?x.column-a.column+u:x.column+1,B=N+O[0].length;if(b[m++]=(0,k.createFindMatch)(new f.Range(p+M,N,p+M,B),O,g),L(O.index)+O[0].length>=R||m>=d)return m}while(O);return m}findMatchesLineByLine(l,r,p,u){const a=[];let n=0;const h=new k.Searcher(r.wordSeparators,r.regex);let g=this.nodeAt2(l.startLineNumber,l.startColumn);if(g===null)return[];const d=this.nodeAt2(l.endLineNumber,l.endColumn);if(d===null)return[];let m=this.positionInBuffer(g.node,g.remainder);const b=this.positionInBuffer(d.node,d.remainder);if(g.node===d.node)return this.findMatchesInNode(g.node,h,l.startLineNumber,l.startColumn,m,b,r,p,u,n,a),a;let E=l.startLineNumber,y=g.node;for(;y!==d.node;){const R=this.getLineFeedCnt(y.piece.bufferIndex,m,y.piece.end);if(R>=1){const x=this._buffers[y.piece.bufferIndex].lineStarts,F=this.offsetInBuffer(y.piece.bufferIndex,y.piece.start),L=x[m.line+R],M=E===l.startLineNumber?l.startColumn:1;if(n=this.findMatchesInNode(y,h,E,M,m,this.positionInBuffer(y,L-F),r,p,u,n,a),n>=u)return a;E+=R}const O=E===l.startLineNumber?l.startColumn-1:0;if(E===l.endLineNumber){const x=this.getLineContent(E).substring(O,l.endColumn-1);return n=this._findMatchesInLine(r,h,x,l.endLineNumber,O,n,a,p,u),a}if(n=this._findMatchesInLine(r,h,this.getLineContent(E).substr(O),E,O,n,a,p,u),n>=u)return a;E++,g=this.nodeAt2(E,1),y=g.node,m=this.positionInBuffer(g.node,g.remainder)}if(E===l.endLineNumber){const R=E===l.startLineNumber?l.startColumn-1:0,O=this.getLineContent(E).substring(R,l.endColumn-1);return n=this._findMatchesInLine(r,h,O,l.endLineNumber,R,n,a,p,u),a}const T=E===l.startLineNumber?l.startColumn:1;return n=this.findMatchesInNode(d.node,h,E,T,m,b,r,p,u,n,a),a}_findMatchesInLine(l,r,p,u,a,n,h,g,d){const m=l.wordSeparators;if(!g&&l.simpleSearch){const E=l.simpleSearch,y=E.length,T=p.length;let R=-y;for(;(R=p.indexOf(E,R+y))!==-1;)if((!m||(0,k.isValidMatch)(m,p,T,R,y))&&(h[n++]=new _.FindMatch(new f.Range(u,R+1+a,u,R+1+y+a),null),n>=d))return n;return n}let b;r.reset(0);do if(b=r.next(p),b&&(h[n++]=(0,k.createFindMatch)(new f.Range(u,b.index+1+a,u,b.index+1+b[0].length+a),b,g),n>=d))return n;while(b);return n}insert(l,r,p=!1){if(this._EOLNormalized=this._EOLNormalized&&p,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==A.SENTINEL){const{node:u,remainder:a,nodeStartOffset:n}=this.nodeAt(l),h=u.piece,g=h.bufferIndex,d=this.positionInBuffer(u,a);if(u.piece.bufferIndex===0&&h.end.line===this._lastChangeBufferPos.line&&h.end.column===this._lastChangeBufferPos.column&&n+h.length===l&&r.length<e.AverageBufferSize){this.appendToNode(u,r),this.computeBufferMetadata();return}if(n===l)this.insertContentToNodeLeft(r,u),this._searchCache.validate(l);else if(n+u.piece.length>l){const m=[];let b=new C(h.bufferIndex,d,h.end,this.getLineFeedCnt(h.bufferIndex,d,h.end),this.offsetInBuffer(g,h.end)-this.offsetInBuffer(g,d));if(this.shouldCheckCRLF()&&this.endWithCR(r)&&this.nodeCharCodeAt(u,a)===10){const R={line:b.start.line+1,column:0};b=new C(b.bufferIndex,R,b.end,this.getLineFeedCnt(b.bufferIndex,R,b.end),b.length-1),r+=` `}if(this.shouldCheckCRLF()&&this.startWithLF(r))if(this.nodeCharCodeAt(u,a-1)===13){const R=this.positionInBuffer(u,a-1);this.deleteNodeTail(u,R),r="\r"+r,u.piece.length===0&&m.push(u)}else this.deleteNodeTail(u,d);else this.deleteNodeTail(u,d);const E=this.createNewPieces(r);b.length>0&&this.rbInsertRight(u,b);let y=u;for(let T=0;T<E.length;T++)y=this.rbInsertRight(y,E[T]);this.deleteNodes(m)}else this.insertContentToNodeRight(r,u)}else{const u=this.createNewPieces(r);let a=this.rbInsertLeft(null,u[0]);for(let n=1;n<u.length;n++)a=this.rbInsertRight(a,u[n])}this.computeBufferMetadata()}delete(l,r){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",r<=0||this.root===A.SENTINEL)return;const p=this.nodeAt(l),u=this.nodeAt(l+r),a=p.node,n=u.node;if(a===n){const E=this.positionInBuffer(a,p.remainder),y=this.positionInBuffer(a,u.remainder);if(p.nodeStartOffset===l){if(r===a.piece.length){const T=a.next();(0,A.rbDelete)(this,a),this.validateCRLFWithPrevNode(T),this.computeBufferMetadata();return}this.deleteNodeHead(a,y),this._searchCache.validate(l),this.validateCRLFWithPrevNode(a),this.computeBufferMetadata();return}if(p.nodeStartOffset+a.piece.length===l+r){this.deleteNodeTail(a,E),this.validateCRLFWithNextNode(a),this.computeBufferMetadata();return}this.shrinkNode(a,E,y),this.computeBufferMetadata();return}const h=[],g=this.positionInBuffer(a,p.remainder);this.deleteNodeTail(a,g),this._searchCache.validate(l),a.piece.length===0&&h.push(a);const d=this.positionInBuffer(n,u.remainder);this.deleteNodeHead(n,d),n.piece.length===0&&h.push(n);const m=a.next();for(let E=m;E!==A.SENTINEL&&E!==n;E=E.next())h.push(E);const b=a.piece.length===0?a.prev():a;this.deleteNodes(h),this.validateCRLFWithNextNode(b),this.computeBufferMetadata()}insertContentToNodeLeft(l,r){const p=[];if(this.shouldCheckCRLF()&&this.endWithCR(l)&&this.startWithLF(r)){const n=r.piece,h={line:n.start.line+1,column:0},g=new C(n.bufferIndex,h,n.end,this.getLineFeedCnt(n.bufferIndex,h,n.end),n.length-1);r.piece=g,l+=` `,(0,A.updateTreeMetadata)(this,r,-1,-1),r.piece.length===0&&p.push(r)}const u=this.createNewPieces(l);let a=this.rbInsertLeft(r,u[u.length-1]);for(let n=u.length-2;n>=0;n--)a=this.rbInsertLeft(a,u[n]);this.validateCRLFWithPrevNode(a),this.deleteNodes(p)}insertContentToNodeRight(l,r){this.adjustCarriageReturnFromNext(l,r)&&(l+=` `);const p=this.createNewPieces(l),u=this.rbInsertRight(r,p[0]);let a=u;for(let n=1;n<p.length;n++)a=this.rbInsertRight(a,p[n]);this.validateCRLFWithPrevNode(u)}positionInBuffer(l,r,p){const u=l.piece,a=l.piece.bufferIndex,n=this._buffers[a].lineStarts,g=n[u.start.line]+u.start.column+r;let d=u.start.line,m=u.end.line,b=0,E=0,y=0;for(;d<=m&&(b=d+(m-d)/2|0,y=n[b],b!==m);)if(E=n[b+1],g<y)m=b-1;else if(g>=E)d=b+1;else break;return p?(p.line=b,p.column=g-y,null):{line:b,column:g-y}}getLineFeedCnt(l,r,p){if(p.column===0)return p.line-r.line;const u=this._buffers[l].lineStarts;if(p.line===u.length-1)return p.line-r.line;const a=u[p.line+1],n=u[p.line]+p.column;if(a>n+1)return p.line-r.line;const h=n-1;return this._buffers[l].buffer.charCodeAt(h)===13?p.line-r.line+1:p.line-r.line}offsetInBuffer(l,r){return this._buffers[l].lineStarts[r.line]+r.column}deleteNodes(l){for(let r=0;r<l.length;r++)(0,A.rbDelete)(this,l[r])}createNewPieces(l){if(l.length>e.AverageBufferSize){const m=[];for(;l.length>e.AverageBufferSize;){const E=l.charCodeAt(e.AverageBufferSize-1);let y;E===13||E>=55296&&E<=56319?(y=l.substring(0,e.AverageBufferSize-1),l=l.substring(e.AverageBufferSize-1)):(y=l.substring(0,e.AverageBufferSize),l=l.substring(e.AverageBufferSize));const T=w(y);m.push(new C(this._buffers.length,{line:0,column:0},{line:T.length-1,column:y.length-T[T.length-1]},T.length-1,y.length)),this._buffers.push(new o(y,T))}const b=w(l);return m.push(new C(this._buffers.length,{line:0,column:0},{line:b.length-1,column:l.length-b[b.length-1]},b.length-1,l.length)),this._buffers.push(new o(l,b)),m}let r=this._buffers[0].buffer.length;const p=w(l,!1);let u=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===r&&r!==0&&this.startWithLF(l)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},u=this._lastChangeBufferPos;for(let m=0;m<p.length;m++)p[m]+=r+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(p.slice(1)),this._buffers[0].buffer+="_"+l,r+=1}else{if(r!==0)for(let m=0;m<p.length;m++)p[m]+=r;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(p.slice(1)),this._buffers[0].buffer+=l}const a=this._buffers[0].buffer.length,n=this._buffers[0].lineStarts.length-1,h=a-this._buffers[0].lineStarts[n],g={line:n,column:h},d=new C(0,u,g,this.getLineFeedCnt(0,u,g),a-r);return this._lastChangeBufferPos=g,[d]}getLinesRawContent(){return this.getContentOfSubTree(this.root)}getLineRawContent(l,r=0){let p=this.root,u="";const a=this._searchCache.get2(l);if(a){p=a.node;const n=this.getAccumulatedValue(p,l-a.nodeStartLineNumber-1),h=this._buffers[p.piece.bufferIndex].buffer,g=this.offsetInBuffer(p.piece.bufferIndex,p.piece.start);if(a.nodeStartLineNumber+p.piece.lineFeedCnt===l)u=h.substring(g+n,g+p.piece.length);else{const d=this.getAccumulatedValue(p,l-a.nodeStartLineNumber);return h.substring(g+n,g+d-r)}}else{let n=0;const h=l;for(;p!==A.SENTINEL;)if(p.left!==A.SENTINEL&&p.lf_left>=l-1)p=p.left;else if(p.lf_left+p.piece.lineFeedCnt>l-1){const g=this.getAccumulatedValue(p,l-p.lf_left-2),d=this.getAccumulatedValue(p,l-p.lf_left-1),m=this._buffers[p.piece.bufferIndex].buffer,b=this.offsetInBuffer(p.piece.bufferIndex,p.piece.start);return n+=p.size_left,this._searchCache.set({node:p,nodeStartOffset:n,nodeStartLineNumber:h-(l-1-p.lf_left)}),m.substring(b+g,b+d-r)}else if(p.lf_left+p.piece.lineFeedCnt===l-1){const g=this.getAccumulatedValue(p,l-p.lf_left-2),d=this._buffers[p.piece.bufferIndex].buffer,m=this.offsetInBuffer(p.piece.bufferIndex,p.piece.start);u=d.substring(m+g,m+p.piece.length);break}else l-=p.lf_left+p.piece.lineFeedCnt,n+=p.size_left+p.piece.length,p=p.right}for(p=p.next();p!==A.SENTINEL;){const n=this._buffers[p.piece.bufferIndex].buffer;if(p.piece.lineFeedCnt>0){const h=this.getAccumulatedValue(p,0),g=this.offsetInBuffer(p.piece.bufferIndex,p.piece.start);return u+=n.substring(g,g+h-r),u}else{const h=this.offsetInBuffer(p.piece.bufferIndex,p.piece.start);u+=n.substr(h,p.piece.length)}p=p.next()}return u}computeBufferMetadata(){let l=this.root,r=1,p=0;for(;l!==A.SENTINEL;)r+=l.lf_left+l.piece.lineFeedCnt,p+=l.size_left+l.piece.length,l=l.right;this._lineCnt=r,this._length=p,this._searchCache.validate(this._length)}getIndexOf(l,r){const p=l.piece,u=this.positionInBuffer(l,r),a=u.line-p.start.line;if(this.offsetInBuffer(p.bufferIndex,p.end)-this.offsetInBuffer(p.bufferIndex,p.start)===r){const n=this.getLineFeedCnt(l.piece.bufferIndex,p.start,u);if(n!==a)return{index:n,remainder:0}}return{index:a,remainder:u.column}}getAccumulatedValue(l,r){if(r<0)return 0;const p=l.piece,u=this._buffers[p.bufferIndex].lineStarts,a=p.start.line+r+1;return a>p.end.line?u[p.end.line]+p.end.column-u[p.start.line]-p.start.column:u[a]-u[p.start.line]-p.start.column}deleteNodeTail(l,r){const p=l.piece,u=p.lineFeedCnt,a=this.offsetInBuffer(p.bufferIndex,p.end),n=r,h=this.offsetInBuffer(p.bufferIndex,n),g=this.getLineFeedCnt(p.bufferIndex,p.start,n),d=g-u,m=h-a,b=p.length+m;l.piece=new C(p.bufferIndex,p.start,n,g,b),(0,A.updateTreeMetadata)(this,l,m,d)}deleteNodeHead(l,r){const p=l.piece,u=p.lineFeedCnt,a=this.offsetInBuffer(p.bufferIndex,p.start),n=r,h=this.getLineFeedCnt(p.bufferIndex,n,p.end),g=this.offsetInBuffer(p.bufferIndex,n),d=h-u,m=a-g,b=p.length+m;l.piece=new C(p.bufferIndex,n,p.end,h,b),(0,A.updateTreeMetadata)(this,l,m,d)}shrinkNode(l,r,p){const u=l.piece,a=u.start,n=u.end,h=u.length,g=u.lineFeedCnt,d=r,m=this.getLineFeedCnt(u.bufferIndex,u.start,d),b=this.offsetInBuffer(u.bufferIndex,r)-this.offsetInBuffer(u.bufferIndex,a);l.piece=new C(u.bufferIndex,u.start,d,m,b),(0,A.updateTreeMetadata)(this,l,b-h,m-g);const E=new C(u.bufferIndex,p,n,this.getLineFeedCnt(u.bufferIndex,p,n),this.offsetInBuffer(u.bufferIndex,n)-this.offsetInBuffer(u.bufferIndex,p)),y=this.rbInsertRight(l,E);this.validateCRLFWithPrevNode(y)}appendToNode(l,r){this.adjustCarriageReturnFromNext(r,l)&&(r+=` `);const p=this.shouldCheckCRLF()&&this.startWithLF(r)&&this.endWithCR(l),u=this._buffers[0].buffer.length;this._buffers[0].buffer+=r;const a=w(r,!1);for(let y=0;y<a.length;y++)a[y]+=u;if(p){const y=this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-2];this._buffers[0].lineStarts.pop(),this._lastChangeBufferPos={line:this._lastChangeBufferPos.line-1,column:u-y}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(a.slice(1));const n=this._buffers[0].lineStarts.length-1,h=this._buffers[0].buffer.length-this._buffers[0].lineStarts[n],g={line:n,column:h},d=l.piece.length+r.length,m=l.piece.lineFeedCnt,b=this.getLineFeedCnt(0,l.piece.start,g),E=b-m;l.piece=new C(l.piece.bufferIndex,l.piece.start,g,b,d),this._lastChangeBufferPos=g,(0,A.updateTreeMetadata)(this,l,r.length,E)}nodeAt(l){let r=this.root;const p=this._searchCache.get(l);if(p)return{node:p.node,nodeStartOffset:p.nodeStartOffset,remainder:l-p.nodeStartOffset};let u=0;for(;r!==A.SENTINEL;)if(r.size_left>l)r=r.left;else if(r.size_left+r.piece.length>=l){u+=r.size_left;const a={node:r,remainder:l-r.size_left,nodeStartOffset:u};return this._searchCache.set(a),a}else l-=r.size_left+r.piece.length,u+=r.size_left+r.piece.length,r=r.right;return null}nodeAt2(l,r){let p=this.root,u=0;for(;p!==A.SENTINEL;)if(p.left!==A.SENTINEL&&p.lf_left>=l-1)p=p.left;else if(p.lf_left+p.piece.lineFeedCnt>l-1){const a=this.getAccumulatedValue(p,l-p.lf_left-2),n=this.getAccumulatedValue(p,l-p.lf_left-1);return u+=p.size_left,{node:p,remainder:Math.min(a+r-1,n),nodeStartOffset:u}}else if(p.lf_left+p.piece.lineFeedCnt===l-1){const a=this.getAccumulatedValue(p,l-p.lf_left-2);if(a+r-1<=p.piece.length)return{node:p,remainder:a+r-1,nodeStartOffset:u};r-=p.piece.length-a;break}else l-=p.lf_left+p.piece.lineFeedCnt,u+=p.size_left+p.piece.length,p=p.right;for(p=p.next();p!==A.SENTINEL;){if(p.piece.lineFeedCnt>0){const a=this.getAccumulatedValue(p,0),n=this.offsetOfNode(p);return{node:p,remainder:Math.min(r-1,a),nodeStartOffset:n}}else if(p.piece.length>=r-1){const a=this.offsetOfNode(p);return{node:p,remainder:r-1,nodeStartOffset:a}}else r-=p.piece.length;p=p.next()}return null}nodeCharCodeAt(l,r){if(l.piece.lineFeedCnt<1)return-1;const p=this._buffers[l.piece.bufferIndex],u=this.offsetInBuffer(l.piece.bufferIndex,l.piece.start)+r;return p.buffer.charCodeAt(u)}offsetOfNode(l){if(!l)return 0;let r=l.size_left;for(;l!==this.root;)l.parent.right===l&&(r+=l.parent.size_left+l.parent.piece.length),l=l.parent;return r}shouldCheckCRLF(){return!(this._EOLNormalized&&this._EOL===` `)}startWithLF(l){if(typeof l=="string")return l.charCodeAt(0)===10;if(l===A.SENTINEL||l.piece.lineFeedCnt===0)return!1;const r=l.piece,p=this._buffers[r.bufferIndex].lineStarts,u=r.start.line,a=p[u]+r.start.column;return u===p.length-1||p[u+1]>a+1?!1:this._buffers[r.bufferIndex].buffer.charCodeAt(a)===10}endWithCR(l){return typeof l=="string"?l.charCodeAt(l.length-1)===13:l===A.SENTINEL||l.piece.lineFeedCnt===0?!1:this.nodeCharCodeAt(l,l.piece.length-1)===13}validateCRLFWithPrevNode(l){if(this.shouldCheckCRLF()&&this.startWithLF(l)){const r=l.prev();this.endWithCR(r)&&this.fixCRLF(r,l)}}validateCRLFWithNextNode(l){if(this.shouldCheckCRLF()&&this.endWithCR(l)){const r=l.next();this.startWithLF(r)&&this.fixCRLF(l,r)}}fixCRLF(l,r){const p=[],u=this._buffers[l.piece.bufferIndex].lineStarts;let a;l.piece.end.column===0?a={line:l.piece.end.line-1,column:u[l.piece.end.line]-u[l.piece.end.line-1]-1}:a={line:l.piece.end.line,column:l.piece.end.column-1};const n=l.piece.length-1,h=l.piece.lineFeedCnt-1;l.piece=new C(l.piece.bufferIndex,l.piece.start,a,h,n),(0,A.updateTreeMetadata)(this,l,-1,-1),l.piece.length===0&&p.push(l);const g={line:r.piece.start.line+1,column:0},d=r.piece.length-1,m=this.getLineFeedCnt(r.piece.bufferIndex,g,r.piece.end);r.piece=new C(r.piece.bufferIndex,g,r.piece.end,m,d),(0,A.updateTreeMetadata)(this,r,-1,-1),r.piece.length===0&&p.push(r);const b=this.createNewPieces(`\r `);this.rbInsertRight(l,b[0]);for(let E=0;E<p.length;E++)(0,A.rbDelete)(this,p[E])}adjustCarriageReturnFromNext(l,r){if(this.shouldCheckCRLF()&&this.endWithCR(l)){const p=r.next();if(this.startWithLF(p)){if(l+=` `,p.piece.length===1)(0,A.rbDelete)(this,p);else{const u=p.piece,a={line:u.start.line+1,column:0},n=u.length-1,h=this.getLineFeedCnt(u.bufferIndex,a,u.end);p.piece=new C(u.bufferIndex,a,u.end,h,n),(0,A.updateTreeMetadata)(this,p,-1,-1)}return!0}}return!1}iterate(l,r){if(l===A.SENTINEL)return r(A.SENTINEL);const p=this.iterate(l.left,r);return p&&r(l)&&this.iterate(l.right,r)}getNodeContent(l){if(l===A.SENTINEL)return"";const r=this._buffers[l.piece.bufferIndex];let p;const u=l.piece,a=this.offsetInBuffer(u.bufferIndex,u.start),n=this.offsetInBuffer(u.bufferIndex,u.end);return p=r.buffer.substring(a,n),p}getPieceContent(l){const r=this._buffers[l.bufferIndex],p=this.offsetInBuffer(l.bufferIndex,l.start),u=this.offsetInBuffer(l.bufferIndex,l.end);return r.buffer.substring(p,u)}rbInsertRight(l,r){const p=new A.TreeNode(r,1);if(p.left=A.SENTINEL,p.right=A.SENTINEL,p.parent=A.SENTINEL,p.size_left=0,p.lf_left=0,this.root===A.SENTINEL)this.root=p,p.color=0;else if(l.right===A.SENTINEL)l.right=p,p.parent=l;else{const a=(0,A.leftest)(l.right);a.left=p,p.parent=a}return(0,A.fixInsert)(this,p),p}rbInsertLeft(l,r){const p=new A.TreeNode(r,1);if(p.left=A.SENTINEL,p.right=A.SENTINEL,p.parent=A.SENTINEL,p.size_left=0,p.lf_left=0,this.root===A.SENTINEL)this.root=p,p.color=0;else if(l.left===A.SENTINEL)l.left=p,p.parent=l;else{const u=(0,A.righttest)(l.left);u.right=p,p.parent=u}return(0,A.fixInsert)(this,p),p}getContentOfSubTree(l){let r="";return this.iterate(l,p=>(r+=this.getNodeContent(p),!0)),r}}e.PieceTreeBase=S}),define(ne[529],re([1,0,6,29,20,122,693,340,687,2]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeTextBuffer=void 0;class v extends w.Disposable{constructor(o,c,i,S,s,l,r){super();this._onDidChangeContent=this._register(new t.Emitter),this.onDidChangeContent=this._onDidChangeContent.event,this._BOM=c,this._mightContainNonBasicASCII=!l,this._mightContainRTL=S,this._mightContainUnusualLineTerminators=s,this._pieceTree=new k.PieceTreeBase(o,i,r)}equals(o){return!(o instanceof v)||this._BOM!==o._BOM||this.getEOL()!==o.getEOL()?!1:this._pieceTree.equal(o._pieceTree)}mightContainRTL(){return this._mightContainRTL}mightContainUnusualLineTerminators(){return this._mightContainUnusualLineTerminators}resetMightContainUnusualLineTerminators(){this._mightContainUnusualLineTerminators=!1}mightContainNonBasicASCII(){return this._mightContainNonBasicASCII}getBOM(){return this._BOM}getEOL(){return this._pieceTree.getEOL()}createSnapshot(o){return this._pieceTree.createSnapshot(o?this._BOM:"")}getOffsetAt(o,c){return this._pieceTree.getOffsetAt(o,c)}getPositionAt(o){return this._pieceTree.getPositionAt(o)}getRangeAt(o,c){const i=o+c,S=this.getPositionAt(o),s=this.getPositionAt(i);return new _.Range(S.lineNumber,S.column,s.lineNumber,s.column)}getValueInRange(o,c=0){if(o.isEmpty())return"";const i=this._getEndOfLine(c);return this._pieceTree.getValueInRange(o,i)}getValueLengthInRange(o,c=0){if(o.isEmpty())return 0;if(o.startLineNumber===o.endLineNumber)return o.endColumn-o.startColumn;const i=this.getOffsetAt(o.startLineNumber,o.startColumn);return this.getOffsetAt(o.endLineNumber,o.endColumn)-i}getCharacterCountInRange(o,c=0){if(this._mightContainNonBasicASCII){let i=0;const S=o.startLineNumber,s=o.endLineNumber;for(let l=S;l<=s;l++){const r=this.getLineContent(l),p=l===S?o.startColumn-1:0,u=l===s?o.endColumn-1:r.length;for(let a=p;a<u;a++)f.isHighSurrogate(r.charCodeAt(a))?(i=i+1,a=a+1):i=i+1}return i+=this._getEndOfLine(c).length*(s-S),i}return this.getValueLengthInRange(o,c)}getLength(){return this._pieceTree.getLength()}getLineCount(){return this._pieceTree.getLineCount()}getLinesContent(){return this._pieceTree.getLinesContent()}getLineContent(o){return this._pieceTree.getLineContent(o)}getLineCharCode(o,c){return this._pieceTree.getLineCharCode(o,c)}getCharCode(o){return this._pieceTree.getCharCode(o)}getLineLength(o){return this._pieceTree.getLineLength(o)}getLineMinColumn(o){return 1}getLineMaxColumn(o){return this.getLineLength(o)+1}getLineFirstNonWhitespaceColumn(o){const c=f.firstNonWhitespaceIndex(this.getLineContent(o));return c===-1?0:c+1}getLineLastNonWhitespaceColumn(o){const c=f.lastNonWhitespaceIndex(this.getLineContent(o));return c===-1?0:c+2}_getEndOfLine(o){switch(o){case 1:return` `;case 2:return`\r `;case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(o){this._pieceTree.setEOL(o)}applyEdits(o,c,i){let S=this._mightContainRTL,s=this._mightContainUnusualLineTerminators,l=this._mightContainNonBasicASCII,r=!0,p=[];for(let m=0;m<o.length;m++){const b=o[m];r&&b._isTracked&&(r=!1);const E=b.range;if(b.text){let x=!0;l||(x=!f.isBasicASCII(b.text),l=x),!S&&x&&(S=f.containsRTL(b.text)),!s&&x&&(s=f.containsUnusualLineTerminators(b.text))}let y="",T=0,R=0,O=0;if(b.text){let x;[T,R,O,x]=(0,D.countEOL)(b.text);const F=this.getEOL();x===0||x===(F===`\r `?2:1)?y=b.text:y=b.text.replace(/\r\n|\r|\n/g,F)}p[m]={sortIndex:m,identifier:b.identifier||null,range:E,rangeOffset:this.getOffsetAt(E.startLineNumber,E.startColumn),rangeLength:this.getValueLengthInRange(E),text:y,eolCount:T,firstLineLength:R,lastLineLength:O,forceMoveMarkers:Boolean(b.forceMoveMarkers),isAutoWhitespaceEdit:b.isAutoWhitespaceEdit||!1}}p.sort(v._sortOpsAscending);let u=!1;for(let m=0,b=p.length-1;m<b;m++){const E=p[m].range.getEndPosition(),y=p[m+1].range.getStartPosition();if(y.isBeforeOrEqual(E)){if(y.isBefore(E))throw new Error("Overlapping ranges are not allowed!");u=!0}}r&&(p=this._reduceOperations(p));const a=i||c?v._getInverseEditRanges(p):[],n=[];if(c)for(let m=0;m<p.length;m++){const b=p[m],E=a[m];if(b.isAutoWhitespaceEdit&&b.range.isEmpty())for(let y=E.startLineNumber;y<=E.endLineNumber;y++){let T="";y===E.startLineNumber&&(T=this.getLineContent(b.range.startLineNumber),f.firstNonWhitespaceIndex(T)!==-1)||n.push({lineNumber:y,oldContent:T})}}let h=null;if(i){let m=0;h=[];for(let b=0;b<p.length;b++){const E=p[b],y=a[b],T=this.getValueInRange(E.range),R=E.rangeOffset+m;m+=E.text.length-T.length,h[b]={sortIndex:E.sortIndex,identifier:E.identifier,range:y,text:T,textChange:new I.TextChange(E.rangeOffset,T,R,E.text)}}u||h.sort((b,E)=>b.sortIndex-E.sortIndex)}this._mightContainRTL=S,this._mightContainUnusualLineTerminators=s,this._mightContainNonBasicASCII=l;const g=this._doApplyEdits(p);let d=null;if(c&&n.length>0){n.sort((m,b)=>b.lineNumber-m.lineNumber),d=[];for(let m=0,b=n.length;m<b;m++){const E=n[m].lineNumber;if(m>0&&n[m-1].lineNumber===E)continue;const y=n[m].oldContent,T=this.getLineContent(E);T.length===0||T===y||f.firstNonWhitespaceIndex(T)!==-1||d.push(E)}}return this._onDidChangeContent.fire(),new A.ApplyEditsResult(h,g,d)}_reduceOperations(o){return o.length<1e3?o:[this._toSingleEditOperation(o)]}_toSingleEditOperation(o){let c=!1;const i=o[0].range,S=o[o.length-1].range,s=new _.Range(i.startLineNumber,i.startColumn,S.endLineNumber,S.endColumn);let l=i.startLineNumber,r=i.startColumn;const p=[];for(let g=0,d=o.length;g<d;g++){const m=o[g],b=m.range;c=c||m.forceMoveMarkers,p.push(this.getValueInRange(new _.Range(l,r,b.startLineNumber,b.startColumn))),m.text.length>0&&p.push(m.text),l=b.endLineNumber,r=b.endColumn}const u=p.join(""),[a,n,h]=(0,D.countEOL)(u);return{sortIndex:0,identifier:o[0].identifier,range:s,rangeOffset:this.getOffsetAt(s.startLineNumber,s.startColumn),rangeLength:this.getValueLengthInRange(s,0),text:u,eolCount:a,firstLineLength:n,lastLineLength:h,forceMoveMarkers:c,isAutoWhitespaceEdit:!1}}_doApplyEdits(o){o.sort(v._sortOpsDescending);const c=[];for(let i=0;i<o.length;i++){const S=o[i],s=S.range.startLineNumber,l=S.range.startColumn,r=S.range.endLineNumber,p=S.range.endColumn;if(s===r&&l===p&&S.text.length===0)continue;S.text?(this._pieceTree.delete(S.rangeOffset,S.rangeLength),this._pieceTree.insert(S.rangeOffset,S.text,!0)):this._pieceTree.delete(S.rangeOffset,S.rangeLength);const u=new _.Range(s,l,r,p);c.push({range:u,rangeLength:S.rangeLength,text:S.text,rangeOffset:S.rangeOffset,forceMoveMarkers:S.forceMoveMarkers})}return c}findMatchesLineByLine(o,c,i,S){return this._pieceTree.findMatchesLineByLine(o,c,i,S)}getPieceTree(){return this._pieceTree}static _getInverseEditRange(o,c){const i=o.startLineNumber,S=o.startColumn,[s,l,r]=(0,D.countEOL)(c);let p;if(c.length>0){const u=s+1;u===1?p=new _.Range(i,S,i,S+l):p=new _.Range(i,S,i+u-1,r+1)}else p=new _.Range(i,S,i,S);return p}static _getInverseEditRanges(o){const c=[];let i=0,S=0,s=null;for(let l=0,r=o.length;l<r;l++){const p=o[l];let u,a;s?s.range.endLineNumber===p.range.startLineNumber?(u=i,a=S+(p.range.startColumn-s.range.endColumn)):(u=i+(p.range.startLineNumber-s.range.endLineNumber),a=p.range.startColumn):(u=p.range.startLineNumber,a=p.range.startColumn);let n;if(p.text.length>0){const h=p.eolCount+1;h===1?n=new _.Range(u,a,u,a+p.firstLineLength):n=new _.Range(u,a,u+h-1,p.lastLineLength+1)}else n=new _.Range(u,a,u,a);i=n.endLineNumber,S=n.endColumn,c.push(n),s=p}return c}static _sortOpsAscending(o,c){const i=_.Range.compareRangesUsingEnds(o.range,c.range);return i===0?o.sortIndex-c.sortIndex:i}static _sortOpsDescending(o,c){const i=_.Range.compareRangesUsingEnds(o.range,c.range);return i===0?c.sortIndex-o.sortIndex:-i}}e.PieceTreeTextBuffer=v}),define(ne[694],re([1,0,29,693,529]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeTextBufferBuilder=e.PieceTreeTextBufferFactory=void 0;class A{constructor(I,w,v,C,o,c,i,S,s){this._chunks=I,this._bom=w,this._cr=v,this._lf=C,this._crlf=o,this._containsRTL=c,this._containsUnusualLineTerminators=i,this._isBasicASCII=S,this._normalizeEOL=s}_getEOL(I){const w=this._cr+this._lf+this._crlf,v=this._cr+this._crlf;return w===0?I===1?` `:`\r `:v>w/2?`\r `:` `}create(I){const w=this._getEOL(I),v=this._chunks;if(this._normalizeEOL&&(w===`\r `&&(this._cr>0||this._lf>0)||w===` `&&(this._cr>0||this._crlf>0)))for(let o=0,c=v.length;o<c;o++){const i=v[o].buffer.replace(/\r\n|\r|\n/g,w),S=(0,f.createLineStartsFast)(i);v[o]=new f.StringBuffer(i,S)}const C=new _.PieceTreeTextBuffer(v,this._bom,w,this._containsRTL,this._containsUnusualLineTerminators,this._isBasicASCII,this._normalizeEOL);return{textBuffer:C,disposable:C}}getFirstLineText(I){return this._chunks[0].buffer.substr(0,I).split(/\r\n|\r|\n/)[0]}}e.PieceTreeTextBufferFactory=A;class k{constructor(){this.chunks=[],this.BOM="",this._hasPreviousChar=!1,this._previousChar=0,this._tmpLineStarts=[],this.cr=0,this.lf=0,this.crlf=0,this.containsRTL=!1,this.containsUnusualLineTerminators=!1,this.isBasicASCII=!0}acceptChunk(I){if(I.length===0)return;this.chunks.length===0&&t.startsWithUTF8BOM(I)&&(this.BOM=t.UTF8_BOM_CHARACTER,I=I.substr(1));const w=I.charCodeAt(I.length-1);w===13||w>=55296&&w<=56319?(this._acceptChunk1(I.substr(0,I.length-1),!1),this._hasPreviousChar=!0,this._previousChar=w):(this._acceptChunk1(I,!1),this._hasPreviousChar=!1,this._previousChar=w)}_acceptChunk1(I,w){!w&&I.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+I):this._acceptChunk2(I))}_acceptChunk2(I){const w=(0,f.createLineStarts)(this._tmpLineStarts,I);this.chunks.push(new f.StringBuffer(I,w.lineStarts)),this.cr+=w.cr,this.lf+=w.lf,this.crlf+=w.crlf,this.isBasicASCII&&(this.isBasicASCII=w.isBasicASCII),!this.isBasicASCII&&!this.containsRTL&&(this.containsRTL=t.containsRTL(I)),!this.isBasicASCII&&!this.containsUnusualLineTerminators&&(this.containsUnusualLineTerminators=t.containsUnusualLineTerminators(I))}finish(I=!0){return this._finish(),new A(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,I)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const I=this.chunks[this.chunks.length-1];I.buffer+=String.fromCharCode(this._previousChar);const w=(0,f.createLineStartsFast)(I.buffer);I.lineStarts=w,this._previousChar===13&&this.cr++}}}e.PieceTreeTextBufferBuilder=k}),define(ne[530],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeIndentLevel=void 0;function t(f,_){let A=0,k=0;const D=f.length;for(;k<D;){const I=f.charCodeAt(k);if(I===32)A++;else if(I===9)A=A-A%_+_;else break;k++}return k===D?-1:A}e.computeIndentLevel=t}),define(ne[695],re([1,0,13,49,122]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutputPosition=e.InjectedText=e.ModelLineProjectionData=void 0;class A{constructor(C,o,c,i,S){this.injectionOffsets=C,this.injectionOptions=o,this.breakOffsets=c,this.breakOffsetsVisibleColumn=i,this.wrappedTextIndentLength=S}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(C){return C>0?this.wrappedTextIndentLength:0}getLineLength(C){const o=C>0?this.breakOffsets[C-1]:0;let i=this.breakOffsets[C]-o;return C>0&&(i+=this.wrappedTextIndentLength),i}getMaxOutputOffset(C){return this.getLineLength(C)}translateToInputOffset(C,o){C>0&&(o=Math.max(0,o-this.wrappedTextIndentLength));let i=C===0?o:this.breakOffsets[C-1]+o;if(this.injectionOffsets!==null)for(let S=0;S<this.injectionOffsets.length&&i>this.injectionOffsets[S];S++)i<this.injectionOffsets[S]+this.injectionOptions[S].content.length?i=this.injectionOffsets[S]:i-=this.injectionOptions[S].content.length;return i}translateToOutputPosition(C,o=2){let c=C;if(this.injectionOffsets!==null)for(let i=0;i<this.injectionOffsets.length&&!(C<this.injectionOffsets[i]||o!==1&&C===this.injectionOffsets[i]);i++)c+=this.injectionOptions[i].content.length;return this.offsetInInputWithInjectionsToOutputPosition(c,o)}offsetInInputWithInjectionsToOutputPosition(C,o=2){let c=0,i=this.breakOffsets.length-1,S=0,s=0;for(;c<=i;){S=c+(i-c)/2|0;const r=this.breakOffsets[S];if(s=S>0?this.breakOffsets[S-1]:0,o===0)if(C<=s)i=S-1;else if(C>r)c=S+1;else break;else if(C<s)i=S-1;else if(C>=r)c=S+1;else break}let l=C-s;return S>0&&(l+=this.wrappedTextIndentLength),new w(S,l)}normalizeOutputPosition(C,o,c){if(this.injectionOffsets!==null){const i=this.outputPositionToOffsetInInputWithInjections(C,o),S=this.normalizeOffsetInInputWithInjectionsAroundInjections(i,c);if(S!==i)return this.offsetInInputWithInjectionsToOutputPosition(S,c)}if(c===0){if(C>0&&o===this.getMinOutputOffset(C))return new w(C-1,this.getMaxOutputOffset(C-1))}else if(c===1){const i=this.getOutputLineCount()-1;if(C<i&&o===this.getMaxOutputOffset(C))return new w(C+1,this.getMinOutputOffset(C+1))}return new w(C,o)}outputPositionToOffsetInInputWithInjections(C,o){return C>0&&(o=Math.max(0,o-this.wrappedTextIndentLength)),(C>0?this.breakOffsets[C-1]:0)+o}normalizeOffsetInInputWithInjectionsAroundInjections(C,o){const c=this.getInjectedTextAtOffset(C);if(!c)return C;if(o===2){if(C===c.offsetInInputWithInjections+c.length&&k(this.injectionOptions[c.injectedTextIndex].cursorStops))return c.offsetInInputWithInjections+c.length;{let i=c.offsetInInputWithInjections;if(D(this.injectionOptions[c.injectedTextIndex].cursorStops))return i;let S=c.injectedTextIndex-1;for(;S>=0&&this.injectionOffsets[S]===this.injectionOffsets[c.injectedTextIndex]&&!(k(this.injectionOptions[S].cursorStops)||(i-=this.injectionOptions[S].content.length,D(this.injectionOptions[S].cursorStops)));)S--;return i}}else if(o===1){let i=c.offsetInInputWithInjections+c.length,S=c.injectedTextIndex;for(;S+1<this.injectionOffsets.length&&this.injectionOffsets[S+1]===this.injectionOffsets[S];)i+=this.injectionOptions[S+1].content.length,S++;return i}else if(o===0){let i=c.offsetInInputWithInjections,S=c.injectedTextIndex;for(;S-1>=0&&this.injectionOffsets[S-1]===this.injectionOffsets[S];)i-=this.injectionOptions[S-1].content.length,S--;return i}(0,t.assertNever)(o)}getInjectedText(C,o){const c=this.outputPositionToOffsetInInputWithInjections(C,o),i=this.getInjectedTextAtOffset(c);return i?{options:this.injectionOptions[i.injectedTextIndex]}:null}getInjectedTextAtOffset(C){const o=this.injectionOffsets,c=this.injectionOptions;if(o!==null){let i=0;for(let S=0;S<o.length;S++){const s=c[S].content.length,l=o[S]+i,r=o[S]+i+s;if(l>C)break;if(C<=r)return{injectedTextIndex:S,offsetInInputWithInjections:l,length:s};i+=s}}}}e.ModelLineProjectionData=A;function k(v){return v==null?!0:v===_.InjectedTextCursorStops.Right||v===_.InjectedTextCursorStops.Both}function D(v){return v==null?!0:v===_.InjectedTextCursorStops.Left||v===_.InjectedTextCursorStops.Both}class I{constructor(C){this.options=C}}e.InjectedText=I;class w{constructor(C,o){this.outputLineIndex=C,this.outputOffset=o}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(C){return new f.Position(C+this.outputLineIndex,this.outputOffset+1)}}e.OutputPosition=w}),define(ne[696],re([1,0,60,14]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodeSemanticTokensDto=e.encodeSemanticTokensDto=void 0;var _;(function(C){C[C.Full=1]="Full",C[C.Delta=2]="Delta"})(_||(_={}));function A(C){for(let o=0,c=C.length;o<c;o+=4){const i=C[o+0],S=C[o+1],s=C[o+2],l=C[o+3];C[o+0]=l,C[o+1]=s,C[o+2]=S,C[o+3]=i}}function k(C){const o=new Uint8Array(C.buffer,C.byteOffset,C.length*4);return f.isLittleEndian()||A(o),t.VSBuffer.wrap(o)}function D(C){const o=C.buffer;if(f.isLittleEndian()||A(o),o.byteOffset%4==0)return new Uint32Array(o.buffer,o.byteOffset,o.length/4);{const c=new Uint8Array(o.byteLength);return c.set(o),new Uint32Array(c.buffer,c.byteOffset,c.length/4)}}function I(C){const o=new Uint32Array(w(C));let c=0;if(o[c++]=C.id,C.type==="full")o[c++]=1,o[c++]=C.data.length,o.set(C.data,c),c+=C.data.length;else{o[c++]=2,o[c++]=C.deltas.length;for(const i of C.deltas)o[c++]=i.start,o[c++]=i.deleteCount,i.data?(o[c++]=i.data.length,o.set(i.data,c),c+=i.data.length):o[c++]=0}return k(o)}e.encodeSemanticTokensDto=I;function w(C){let o=0;if(o+=1+1,C.type==="full")o+=1+C.data.length;else{o+=1,o+=(1+1+1)*C.deltas.length;for(const c of C.deltas)c.data&&(o+=c.data.length)}return o}function v(C){const o=D(C);let c=0;const i=o[c++];if(o[c++]===1){const r=o[c++],p=o.subarray(c,c+r);return c+=r,{id:i,type:"full",data:p}}const s=o[c++],l=[];for(let r=0;r<s;r++){const p=o[c++],u=o[c++],a=o[c++];let n;a>0&&(n=o.subarray(c,c+a),c+=a),l[r]={start:p,deleteCount:u,data:n}}return{id:i,type:"delta",deltas:l}}e.decodeSemanticTokensDto=v}),define(ne[697],re([1,0,20,345,29,13,283]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnicodeHighlighterReasonKind=e.UnicodeTextModelHighlighter=void 0;class D{static computeUnicodeHighlights(i,S,s){const l=s?s.startLineNumber:1,r=s?s.endLineNumber:i.getLineCount(),p=new v(S),u=p.getCandidateCodePoints();let a;u==="allNonBasicAscii"?a=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):a=new RegExp(`${I(Array.from(u))}`,"g");const n=new f.Searcher(null,a),h=[];let g=!1,d,m=0,b=0,E=0;e:for(let y=l,T=r;y<=T;y++){const R=i.getLineContent(y),O=R.length;n.reset(0);do if(d=n.next(R),d){let x=d.index,F=d.index+d[0].length;if(x>0){const B=R.charCodeAt(x-1);_.isHighSurrogate(B)&&x--}if(F+1<O){const B=R.charCodeAt(F-1);_.isHighSurrogate(B)&&F++}const L=R.substring(x,F),M=(0,k.getWordAtText)(x+1,k.DEFAULT_WORD_REGEXP,R,0),N=p.shouldHighlightNonBasicASCII(L,M?M.word:null);if(N!==0){N===3?m++:N===2?b++:N===1?E++:(0,A.assertNever)(N);const B=1e3;if(h.length>=B){g=!0;break e}h.push(new t.Range(y,x+1,y,F+1))}}while(d)}return{ranges:h,hasMore:g,ambiguousCharacterCount:m,invisibleCharacterCount:b,nonBasicAsciiCharacterCount:E}}static computeUnicodeHighlightReason(i,S){const s=new v(S);switch(s.shouldHighlightNonBasicASCII(i,null)){case 0:return null;case 2:return{kind:1};case 3:{const r=i.codePointAt(0),p=s.ambiguousCharacters.getPrimaryConfusable(r),u=_.AmbiguousCharacters.getLocales().filter(a=>!_.AmbiguousCharacters.getInstance(new Set([...S.allowedLocales,a])).isAmbiguous(r));return{kind:0,confusableWith:String.fromCodePoint(p),notAmbiguousInLocales:u}}case 1:return{kind:2}}}}e.UnicodeTextModelHighlighter=D;function I(c,i){return`[${_.escapeRegExpCharacters(c.map(s=>String.fromCodePoint(s)).join(""))}]`}var w;(function(c){c[c.Ambiguous=0]="Ambiguous",c[c.Invisible=1]="Invisible",c[c.NonBasicAscii=2]="NonBasicAscii"})(w=e.UnicodeHighlighterReasonKind||(e.UnicodeHighlighterReasonKind={}));class v{constructor(i){this.options=i,this.allowedCodePoints=new Set(i.allowedCodePoints),this.ambiguousCharacters=_.AmbiguousCharacters.getInstance(new Set(i.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const i=new Set;if(this.options.invisibleCharacters)for(const S of _.InvisibleCharacters.codePoints)C(String.fromCodePoint(S))||i.add(S);if(this.options.ambiguousCharacters)for(const S of this.ambiguousCharacters.getConfusableCodePoints())i.add(S);for(const S of this.allowedCodePoints)i.delete(S);return i}shouldHighlightNonBasicASCII(i,S){const s=i.codePointAt(0);if(this.allowedCodePoints.has(s))return 0;if(this.options.nonBasicASCII)return 1;let l=!1,r=!1;if(S)for(let p of S){const u=p.codePointAt(0),a=_.isBasicASCII(p);l=l||a,!a&&!this.ambiguousCharacters.isAmbiguous(u)&&!_.InvisibleCharacters.isInvisibleCharacter(u)&&(r=!0)}return!l&&r?0:this.options.invisibleCharacters&&!C(i)&&_.InvisibleCharacters.isInvisibleCharacter(s)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(s)?3:0}}function C(c){return c===" "||c===` `||c===" "}var o;(function(c){c[c.None=0]="None",c[c.NonBasicASCII=1]="NonBasicASCII",c[c.Invisible=2]="Invisible",c[c.Ambiguous=3]="Ambiguous"})(o||(o={}))}),define(ne[698],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WrappingIndent=e.TrackedRangeStickiness=e.TextEditorCursorStyle=e.TextEditorCursorBlinkingStyle=e.SymbolTag=e.SymbolKind=e.SignatureHelpTriggerKind=e.SelectionDirection=e.ScrollbarVisibility=e.ScrollType=e.RenderMinimap=e.RenderLineNumbersType=e.PositionAffinity=e.OverviewRulerLane=e.OverlayWidgetPositionPreference=e.MouseTargetType=e.MinimapPosition=e.MarkerTag=e.MarkerSeverity=e.KeyCode=e.InlineCompletionTriggerKind=e.InlayHintKind=e.InjectedTextCursorStops=e.IndentAction=e.EndOfLineSequence=e.EndOfLinePreference=e.EditorOption=e.EditorAutoIndentStrategy=e.DocumentHighlightKind=e.DefaultEndOfLine=e.CursorChangeReason=e.ContentWidgetPositionPreference=e.CompletionTriggerKind=e.CompletionItemTag=e.CompletionItemKind=e.CompletionItemInsertTextRule=e.AccessibilitySupport=void 0;var t;(function(P){P[P.Unknown=0]="Unknown",P[P.Disabled=1]="Disabled",P[P.Enabled=2]="Enabled"})(t=e.AccessibilitySupport||(e.AccessibilitySupport={}));var f;(function(P){P[P.KeepWhitespace=1]="KeepWhitespace",P[P.InsertAsSnippet=4]="InsertAsSnippet"})(f=e.CompletionItemInsertTextRule||(e.CompletionItemInsertTextRule={}));var _;(function(P){P[P.Method=0]="Method",P[P.Function=1]="Function",P[P.Constructor=2]="Constructor",P[P.Field=3]="Field",P[P.Variable=4]="Variable",P[P.Class=5]="Class",P[P.Struct=6]="Struct",P[P.Interface=7]="Interface",P[P.Module=8]="Module",P[P.Property=9]="Property",P[P.Event=10]="Event",P[P.Operator=11]="Operator",P[P.Unit=12]="Unit",P[P.Value=13]="Value",P[P.Constant=14]="Constant",P[P.Enum=15]="Enum",P[P.EnumMember=16]="EnumMember",P[P.Keyword=17]="Keyword",P[P.Text=18]="Text",P[P.Color=19]="Color",P[P.File=20]="File",P[P.Reference=21]="Reference",P[P.Customcolor=22]="Customcolor",P[P.Folder=23]="Folder",P[P.TypeParameter=24]="TypeParameter",P[P.User=25]="User",P[P.Issue=26]="Issue",P[P.Snippet=27]="Snippet"})(_=e.CompletionItemKind||(e.CompletionItemKind={}));var A;(function(P){P[P.Deprecated=1]="Deprecated"})(A=e.CompletionItemTag||(e.CompletionItemTag={}));var k;(function(P){P[P.Invoke=0]="Invoke",P[P.TriggerCharacter=1]="TriggerCharacter",P[P.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(k=e.CompletionTriggerKind||(e.CompletionTriggerKind={}));var D;(function(P){P[P.EXACT=0]="EXACT",P[P.ABOVE=1]="ABOVE",P[P.BELOW=2]="BELOW"})(D=e.ContentWidgetPositionPreference||(e.ContentWidgetPositionPreference={}));var I;(function(P){P[P.NotSet=0]="NotSet",P[P.ContentFlush=1]="ContentFlush",P[P.RecoverFromMarkers=2]="RecoverFromMarkers",P[P.Explicit=3]="Explicit",P[P.Paste=4]="Paste",P[P.Undo=5]="Undo",P[P.Redo=6]="Redo"})(I=e.CursorChangeReason||(e.CursorChangeReason={}));var w;(function(P){P[P.LF=1]="LF",P[P.CRLF=2]="CRLF"})(w=e.DefaultEndOfLine||(e.DefaultEndOfLine={}));var v;(function(P){P[P.Text=0]="Text",P[P.Read=1]="Read",P[P.Write=2]="Write"})(v=e.DocumentHighlightKind||(e.DocumentHighlightKind={}));var C;(function(P){P[P.None=0]="None",P[P.Keep=1]="Keep",P[P.Brackets=2]="Brackets",P[P.Advanced=3]="Advanced",P[P.Full=4]="Full"})(C=e.EditorAutoIndentStrategy||(e.EditorAutoIndentStrategy={}));var o;(function(P){P[P.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",P[P.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",P[P.accessibilitySupport=2]="accessibilitySupport",P[P.accessibilityPageSize=3]="accessibilityPageSize",P[P.ariaLabel=4]="ariaLabel",P[P.autoClosingBrackets=5]="autoClosingBrackets",P[P.autoClosingDelete=6]="autoClosingDelete",P[P.autoClosingOvertype=7]="autoClosingOvertype",P[P.autoClosingQuotes=8]="autoClosingQuotes",P[P.autoIndent=9]="autoIndent",P[P.automaticLayout=10]="automaticLayout",P[P.autoSurround=11]="autoSurround",P[P.bracketPairColorization=12]="bracketPairColorization",P[P.guides=13]="guides",P[P.codeLens=14]="codeLens",P[P.codeLensFontFamily=15]="codeLensFontFamily",P[P.codeLensFontSize=16]="codeLensFontSize",P[P.colorDecorators=17]="colorDecorators",P[P.columnSelection=18]="columnSelection",P[P.comments=19]="comments",P[P.contextmenu=20]="contextmenu",P[P.copyWithSyntaxHighlighting=21]="copyWithSyntaxHighlighting",P[P.cursorBlinking=22]="cursorBlinking",P[P.cursorSmoothCaretAnimation=23]="cursorSmoothCaretAnimation",P[P.cursorStyle=24]="cursorStyle",P[P.cursorSurroundingLines=25]="cursorSurroundingLines",P[P.cursorSurroundingLinesStyle=26]="cursorSurroundingLinesStyle",P[P.cursorWidth=27]="cursorWidth",P[P.disableLayerHinting=28]="disableLayerHinting",P[P.disableMonospaceOptimizations=29]="disableMonospaceOptimizations",P[P.domReadOnly=30]="domReadOnly",P[P.dragAndDrop=31]="dragAndDrop",P[P.emptySelectionClipboard=32]="emptySelectionClipboard",P[P.extraEditorClassName=33]="extraEditorClassName",P[P.fastScrollSensitivity=34]="fastScrollSensitivity",P[P.find=35]="find",P[P.fixedOverflowWidgets=36]="fixedOverflowWidgets",P[P.folding=37]="folding",P[P.foldingStrategy=38]="foldingStrategy",P[P.foldingHighlight=39]="foldingHighlight",P[P.foldingImportsByDefault=40]="foldingImportsByDefault",P[P.foldingMaximumRegions=41]="foldingMaximumRegions",P[P.unfoldOnClickAfterEndOfLine=42]="unfoldOnClickAfterEndOfLine",P[P.fontFamily=43]="fontFamily",P[P.fontInfo=44]="fontInfo",P[P.fontLigatures=45]="fontLigatures",P[P.fontSize=46]="fontSize",P[P.fontWeight=47]="fontWeight",P[P.formatOnPaste=48]="formatOnPaste",P[P.formatOnType=49]="formatOnType",P[P.glyphMargin=50]="glyphMargin",P[P.gotoLocation=51]="gotoLocation",P[P.hideCursorInOverviewRuler=52]="hideCursorInOverviewRuler",P[P.hover=53]="hover",P[P.inDiffEditor=54]="inDiffEditor",P[P.inlineSuggest=55]="inlineSuggest",P[P.letterSpacing=56]="letterSpacing",P[P.lightbulb=57]="lightbulb",P[P.lineDecorationsWidth=58]="lineDecorationsWidth",P[P.lineHeight=59]="lineHeight",P[P.lineNumbers=60]="lineNumbers",P[P.lineNumbersMinChars=61]="lineNumbersMinChars",P[P.linkedEditing=62]="linkedEditing",P[P.links=63]="links",P[P.matchBrackets=64]="matchBrackets",P[P.minimap=65]="minimap",P[P.mouseStyle=66]="mouseStyle",P[P.mouseWheelScrollSensitivity=67]="mouseWheelScrollSensitivity",P[P.mouseWheelZoom=68]="mouseWheelZoom",P[P.multiCursorMergeOverlapping=69]="multiCursorMergeOverlapping",P[P.multiCursorModifier=70]="multiCursorModifier",P[P.multiCursorPaste=71]="multiCursorPaste",P[P.occurrencesHighlight=72]="occurrencesHighlight",P[P.overviewRulerBorder=73]="overviewRulerBorder",P[P.overviewRulerLanes=74]="overviewRulerLanes",P[P.padding=75]="padding",P[P.parameterHints=76]="parameterHints",P[P.peekWidgetDefaultFocus=77]="peekWidgetDefaultFocus",P[P.definitionLinkOpensInPeek=78]="definitionLinkOpensInPeek",P[P.quickSuggestions=79]="quickSuggestions",P[P.quickSuggestionsDelay=80]="quickSuggestionsDelay",P[P.readOnly=81]="readOnly",P[P.renameOnType=82]="renameOnType",P[P.renderControlCharacters=83]="renderControlCharacters",P[P.renderFinalNewline=84]="renderFinalNewline",P[P.renderLineHighlight=85]="renderLineHighlight",P[P.renderLineHighlightOnlyWhenFocus=86]="renderLineHighlightOnlyWhenFocus",P[P.renderValidationDecorations=87]="renderValidationDecorations",P[P.renderWhitespace=88]="renderWhitespace",P[P.revealHorizontalRightPadding=89]="revealHorizontalRightPadding",P[P.roundedSelection=90]="roundedSelection",P[P.rulers=91]="rulers",P[P.scrollbar=92]="scrollbar",P[P.scrollBeyondLastColumn=93]="scrollBeyondLastColumn",P[P.scrollBeyondLastLine=94]="scrollBeyondLastLine",P[P.scrollPredominantAxis=95]="scrollPredominantAxis",P[P.selectionClipboard=96]="selectionClipboard",P[P.selectionHighlight=97]="selectionHighlight",P[P.selectOnLineNumbers=98]="selectOnLineNumbers",P[P.showFoldingControls=99]="showFoldingControls",P[P.showUnused=100]="showUnused",P[P.snippetSuggestions=101]="snippetSuggestions",P[P.smartSelect=102]="smartSelect",P[P.smoothScrolling=103]="smoothScrolling",P[P.stickyTabStops=104]="stickyTabStops",P[P.stopRenderingLineAfter=105]="stopRenderingLineAfter",P[P.suggest=106]="suggest",P[P.suggestFontSize=107]="suggestFontSize",P[P.suggestLineHeight=108]="suggestLineHeight",P[P.suggestOnTriggerCharacters=109]="suggestOnTriggerCharacters",P[P.suggestSelection=110]="suggestSelection",P[P.tabCompletion=111]="tabCompletion",P[P.tabIndex=112]="tabIndex",P[P.unicodeHighlighting=113]="unicodeHighlighting",P[P.unusualLineTerminators=114]="unusualLineTerminators",P[P.useShadowDOM=115]="useShadowDOM",P[P.useTabStops=116]="useTabStops",P[P.wordSeparators=117]="wordSeparators",P[P.wordWrap=118]="wordWrap",P[P.wordWrapBreakAfterCharacters=119]="wordWrapBreakAfterCharacters",P[P.wordWrapBreakBeforeCharacters=120]="wordWrapBreakBeforeCharacters",P[P.wordWrapColumn=121]="wordWrapColumn",P[P.wordWrapOverride1=122]="wordWrapOverride1",P[P.wordWrapOverride2=123]="wordWrapOverride2",P[P.wrappingIndent=124]="wrappingIndent",P[P.wrappingStrategy=125]="wrappingStrategy",P[P.showDeprecated=126]="showDeprecated",P[P.inlayHints=127]="inlayHints",P[P.editorClassName=128]="editorClassName",P[P.pixelRatio=129]="pixelRatio",P[P.tabFocusMode=130]="tabFocusMode",P[P.layoutInfo=131]="layoutInfo",P[P.wrappingInfo=132]="wrappingInfo"})(o=e.EditorOption||(e.EditorOption={}));var c;(function(P){P[P.TextDefined=0]="TextDefined",P[P.LF=1]="LF",P[P.CRLF=2]="CRLF"})(c=e.EndOfLinePreference||(e.EndOfLinePreference={}));var i;(function(P){P[P.LF=0]="LF",P[P.CRLF=1]="CRLF"})(i=e.EndOfLineSequence||(e.EndOfLineSequence={}));var S;(function(P){P[P.None=0]="None",P[P.Indent=1]="Indent",P[P.IndentOutdent=2]="IndentOutdent",P[P.Outdent=3]="Outdent"})(S=e.IndentAction||(e.IndentAction={}));var s;(function(P){P[P.Both=0]="Both",P[P.Right=1]="Right",P[P.Left=2]="Left",P[P.None=3]="None"})(s=e.InjectedTextCursorStops||(e.InjectedTextCursorStops={}));var l;(function(P){P[P.Type=1]="Type",P[P.Parameter=2]="Parameter"})(l=e.InlayHintKind||(e.InlayHintKind={}));var r;(function(P){P[P.Automatic=0]="Automatic",P[P.Explicit=1]="Explicit"})(r=e.InlineCompletionTriggerKind||(e.InlineCompletionTriggerKind={}));var p;(function(P){P[P.DependsOnKbLayout=-1]="DependsOnKbLayout",P[P.Unknown=0]="Unknown",P[P.Backspace=1]="Backspace",P[P.Tab=2]="Tab",P[P.Enter=3]="Enter",P[P.Shift=4]="Shift",P[P.Ctrl=5]="Ctrl",P[P.Alt=6]="Alt",P[P.PauseBreak=7]="PauseBreak",P[P.CapsLock=8]="CapsLock",P[P.Escape=9]="Escape",P[P.Space=10]="Space",P[P.PageUp=11]="PageUp",P[P.PageDown=12]="PageDown",P[P.End=13]="End",P[P.Home=14]="Home",P[P.LeftArrow=15]="LeftArrow",P[P.UpArrow=16]="UpArrow",P[P.RightArrow=17]="RightArrow",P[P.DownArrow=18]="DownArrow",P[P.Insert=19]="Insert",P[P.Delete=20]="Delete",P[P.Digit0=21]="Digit0",P[P.Digit1=22]="Digit1",P[P.Digit2=23]="Digit2",P[P.Digit3=24]="Digit3",P[P.Digit4=25]="Digit4",P[P.Digit5=26]="Digit5",P[P.Digit6=27]="Digit6",P[P.Digit7=28]="Digit7",P[P.Digit8=29]="Digit8",P[P.Digit9=30]="Digit9",P[P.KeyA=31]="KeyA",P[P.KeyB=32]="KeyB",P[P.KeyC=33]="KeyC",P[P.KeyD=34]="KeyD",P[P.KeyE=35]="KeyE",P[P.KeyF=36]="KeyF",P[P.KeyG=37]="KeyG",P[P.KeyH=38]="KeyH",P[P.KeyI=39]="KeyI",P[P.KeyJ=40]="KeyJ",P[P.KeyK=41]="KeyK",P[P.KeyL=42]="KeyL",P[P.KeyM=43]="KeyM",P[P.KeyN=44]="KeyN",P[P.KeyO=45]="KeyO",P[P.KeyP=46]="KeyP",P[P.KeyQ=47]="KeyQ",P[P.KeyR=48]="KeyR",P[P.KeyS=49]="KeyS",P[P.KeyT=50]="KeyT",P[P.KeyU=51]="KeyU",P[P.KeyV=52]="KeyV",P[P.KeyW=53]="KeyW",P[P.KeyX=54]="KeyX",P[P.KeyY=55]="KeyY",P[P.KeyZ=56]="KeyZ",P[P.Meta=57]="Meta",P[P.ContextMenu=58]="ContextMenu",P[P.F1=59]="F1",P[P.F2=60]="F2",P[P.F3=61]="F3",P[P.F4=62]="F4",P[P.F5=63]="F5",P[P.F6=64]="F6",P[P.F7=65]="F7",P[P.F8=66]="F8",P[P.F9=67]="F9",P[P.F10=68]="F10",P[P.F11=69]="F11",P[P.F12=70]="F12",P[P.F13=71]="F13",P[P.F14=72]="F14",P[P.F15=73]="F15",P[P.F16=74]="F16",P[P.F17=75]="F17",P[P.F18=76]="F18",P[P.F19=77]="F19",P[P.NumLock=78]="NumLock",P[P.ScrollLock=79]="ScrollLock",P[P.Semicolon=80]="Semicolon",P[P.Equal=81]="Equal",P[P.Comma=82]="Comma",P[P.Minus=83]="Minus",P[P.Period=84]="Period",P[P.Slash=85]="Slash",P[P.Backquote=86]="Backquote",P[P.BracketLeft=87]="BracketLeft",P[P.Backslash=88]="Backslash",P[P.BracketRight=89]="BracketRight",P[P.Quote=90]="Quote",P[P.OEM_8=91]="OEM_8",P[P.IntlBackslash=92]="IntlBackslash",P[P.Numpad0=93]="Numpad0",P[P.Numpad1=94]="Numpad1",P[P.Numpad2=95]="Numpad2",P[P.Numpad3=96]="Numpad3",P[P.Numpad4=97]="Numpad4",P[P.Numpad5=98]="Numpad5",P[P.Numpad6=99]="Numpad6",P[P.Numpad7=100]="Numpad7",P[P.Numpad8=101]="Numpad8",P[P.Numpad9=102]="Numpad9",P[P.NumpadMultiply=103]="NumpadMultiply",P[P.NumpadAdd=104]="NumpadAdd",P[P.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",P[P.NumpadSubtract=106]="NumpadSubtract",P[P.NumpadDecimal=107]="NumpadDecimal",P[P.NumpadDivide=108]="NumpadDivide",P[P.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",P[P.ABNT_C1=110]="ABNT_C1",P[P.ABNT_C2=111]="ABNT_C2",P[P.AudioVolumeMute=112]="AudioVolumeMute",P[P.AudioVolumeUp=113]="AudioVolumeUp",P[P.AudioVolumeDown=114]="AudioVolumeDown",P[P.BrowserSearch=115]="BrowserSearch",P[P.BrowserHome=116]="BrowserHome",P[P.BrowserBack=117]="BrowserBack",P[P.BrowserForward=118]="BrowserForward",P[P.MediaTrackNext=119]="MediaTrackNext",P[P.MediaTrackPrevious=120]="MediaTrackPrevious",P[P.MediaStop=121]="MediaStop",P[P.MediaPlayPause=122]="MediaPlayPause",P[P.LaunchMediaPlayer=123]="LaunchMediaPlayer",P[P.LaunchMail=124]="LaunchMail",P[P.LaunchApp2=125]="LaunchApp2",P[P.Clear=126]="Clear",P[P.MAX_VALUE=127]="MAX_VALUE"})(p=e.KeyCode||(e.KeyCode={}));var u;(function(P){P[P.Hint=1]="Hint",P[P.Info=2]="Info",P[P.Warning=4]="Warning",P[P.Error=8]="Error"})(u=e.MarkerSeverity||(e.MarkerSeverity={}));var a;(function(P){P[P.Unnecessary=1]="Unnecessary",P[P.Deprecated=2]="Deprecated"})(a=e.MarkerTag||(e.MarkerTag={}));var n;(function(P){P[P.Inline=1]="Inline",P[P.Gutter=2]="Gutter"})(n=e.MinimapPosition||(e.MinimapPosition={}));var h;(function(P){P[P.UNKNOWN=0]="UNKNOWN",P[P.TEXTAREA=1]="TEXTAREA",P[P.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",P[P.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",P[P.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",P[P.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",P[P.CONTENT_TEXT=6]="CONTENT_TEXT",P[P.CONTENT_EMPTY=7]="CONTENT_EMPTY",P[P.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",P[P.CONTENT_WIDGET=9]="CONTENT_WIDGET",P[P.OVERVIEW_RULER=10]="OVERVIEW_RULER",P[P.SCROLLBAR=11]="SCROLLBAR",P[P.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",P[P.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(h=e.MouseTargetType||(e.MouseTargetType={}));var g;(function(P){P[P.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",P[P.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",P[P.TOP_CENTER=2]="TOP_CENTER"})(g=e.OverlayWidgetPositionPreference||(e.OverlayWidgetPositionPreference={}));var d;(function(P){P[P.Left=1]="Left",P[P.Center=2]="Center",P[P.Right=4]="Right",P[P.Full=7]="Full"})(d=e.OverviewRulerLane||(e.OverviewRulerLane={}));var m;(function(P){P[P.Left=0]="Left",P[P.Right=1]="Right",P[P.None=2]="None"})(m=e.PositionAffinity||(e.PositionAffinity={}));var b;(function(P){P[P.Off=0]="Off",P[P.On=1]="On",P[P.Relative=2]="Relative",P[P.Interval=3]="Interval",P[P.Custom=4]="Custom"})(b=e.RenderLineNumbersType||(e.RenderLineNumbersType={}));var E;(function(P){P[P.None=0]="None",P[P.Text=1]="Text",P[P.Blocks=2]="Blocks"})(E=e.RenderMinimap||(e.RenderMinimap={}));var y;(function(P){P[P.Smooth=0]="Smooth",P[P.Immediate=1]="Immediate"})(y=e.ScrollType||(e.ScrollType={}));var T;(function(P){P[P.Auto=1]="Auto",P[P.Hidden=2]="Hidden",P[P.Visible=3]="Visible"})(T=e.ScrollbarVisibility||(e.ScrollbarVisibility={}));var R;(function(P){P[P.LTR=0]="LTR",P[P.RTL=1]="RTL"})(R=e.SelectionDirection||(e.SelectionDirection={}));var O;(function(P){P[P.Invoke=1]="Invoke",P[P.TriggerCharacter=2]="TriggerCharacter",P[P.ContentChange=3]="ContentChange"})(O=e.SignatureHelpTriggerKind||(e.SignatureHelpTriggerKind={}));var x;(function(P){P[P.File=0]="File",P[P.Module=1]="Module",P[P.Namespace=2]="Namespace",P[P.Package=3]="Package",P[P.Class=4]="Class",P[P.Method=5]="Method",P[P.Property=6]="Property",P[P.Field=7]="Field",P[P.Constructor=8]="Constructor",P[P.Enum=9]="Enum",P[P.Interface=10]="Interface",P[P.Function=11]="Function",P[P.Variable=12]="Variable",P[P.Constant=13]="Constant",P[P.String=14]="String",P[P.Number=15]="Number",P[P.Boolean=16]="Boolean",P[P.Array=17]="Array",P[P.Object=18]="Object",P[P.Key=19]="Key",P[P.Null=20]="Null",P[P.EnumMember=21]="EnumMember",P[P.Struct=22]="Struct",P[P.Event=23]="Event",P[P.Operator=24]="Operator",P[P.TypeParameter=25]="TypeParameter"})(x=e.SymbolKind||(e.SymbolKind={}));var F;(function(P){P[P.Deprecated=1]="Deprecated"})(F=e.SymbolTag||(e.SymbolTag={}));var L;(function(P){P[P.Hidden=0]="Hidden",P[P.Blink=1]="Blink",P[P.Smooth=2]="Smooth",P[P.Phase=3]="Phase",P[P.Expand=4]="Expand",P[P.Solid=5]="Solid"})(L=e.TextEditorCursorBlinkingStyle||(e.TextEditorCursorBlinkingStyle={}));var M;(function(P){P[P.Line=1]="Line",P[P.Block=2]="Block",P[P.Underline=3]="Underline",P[P.LineThin=4]="LineThin",P[P.BlockOutline=5]="BlockOutline",P[P.UnderlineThin=6]="UnderlineThin"})(M=e.TextEditorCursorStyle||(e.TextEditorCursorStyle={}));var N;(function(P){P[P.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",P[P.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",P[P.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",P[P.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(N=e.TrackedRangeStickiness||(e.TrackedRangeStickiness={}));var B;(function(P){P[P.None=0]="None",P[P.Same=1]="Same",P[P.Indent=2]="Indent",P[P.DeepIndent=3]="DeepIndent"})(B=e.WrappingIndent||(e.WrappingIndent={}))}),define(ne[1162],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairWithMinIndentationInfo=e.BracketPairInfo=e.BracketInfo=void 0;class t{constructor(k,D,I,w){this.range=k,this.nestingLevel=D,this.nestingLevelOfEqualBracketType=I,this.isInvalid=w}}e.BracketInfo=t;class f{constructor(k,D,I,w,v){this.range=k,this.openingBracketRange=D,this.closingBracketRange=I,this.nestingLevel=w,this.nestingLevelOfEqualBracketType=v}}e.BracketPairInfo=f;class _ extends f{constructor(k,D,I,w,v,C){super(k,D,I,w,v);this.minVisibleColumnIndentation=C}}e.BracketPairWithMinIndentationInfo=_}),define(ne[307],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InternalModelContentChangeEvent=e.ModelInjectedTextChangedEvent=e.ModelRawContentChangedEvent=e.ModelRawEOLChanged=e.ModelRawLinesInserted=e.ModelRawLinesDeleted=e.ModelRawLineChanged=e.LineInjectedText=e.ModelRawFlush=e.RawContentChangedType=void 0;var t;(function(o){o[o.Flush=1]="Flush",o[o.LineChanged=2]="LineChanged",o[o.LinesDeleted=3]="LinesDeleted",o[o.LinesInserted=4]="LinesInserted",o[o.EOLChanged=5]="EOLChanged"})(t=e.RawContentChangedType||(e.RawContentChangedType={}));class f{constructor(){this.changeType=1}}e.ModelRawFlush=f;class _{constructor(c,i,S,s,l){this.ownerId=c,this.lineNumber=i,this.column=S,this.options=s,this.order=l}static applyInjectedText(c,i){if(!i||i.length===0)return c;let S="",s=0;for(const l of i)S+=c.substring(s,l.column-1),s=l.column-1,S+=l.options.content;return S+=c.substring(s),S}static fromDecorations(c){const i=[];for(const S of c)S.options.before&&S.options.before.content.length>0&&i.push(new _(S.ownerId,S.range.startLineNumber,S.range.startColumn,S.options.before,0)),S.options.after&&S.options.after.content.length>0&&i.push(new _(S.ownerId,S.range.endLineNumber,S.range.endColumn,S.options.after,1));return i.sort((S,s)=>S.lineNumber===s.lineNumber?S.column===s.column?S.order-s.order:S.column-s.column:S.lineNumber-s.lineNumber),i}withText(c){return new _(this.ownerId,this.lineNumber,this.column,{...this.options,content:c},this.order)}}e.LineInjectedText=_;class A{constructor(c,i,S){this.changeType=2,this.lineNumber=c,this.detail=i,this.injectedText=S}}e.ModelRawLineChanged=A;class k{constructor(c,i){this.changeType=3,this.fromLineNumber=c,this.toLineNumber=i}}e.ModelRawLinesDeleted=k;class D{constructor(c,i,S,s){this.changeType=4,this.injectedTexts=s,this.fromLineNumber=c,this.toLineNumber=i,this.detail=S}}e.ModelRawLinesInserted=D;class I{constructor(){this.changeType=5}}e.ModelRawEOLChanged=I;class w{constructor(c,i,S,s){this.changes=c,this.versionId=i,this.isUndoing=S,this.isRedoing=s,this.resultingSelection=null}containsEvent(c){for(let i=0,S=this.changes.length;i<S;i++)if(this.changes[i].changeType===c)return!0;return!1}static merge(c,i){const S=[].concat(c.changes).concat(i.changes),s=i.versionId,l=c.isUndoing||i.isUndoing,r=c.isRedoing||i.isRedoing;return new w(S,s,l,r)}}e.ModelRawContentChangedEvent=w;class v{constructor(c){this.changes=c}}e.ModelInjectedTextChangedEvent=v;class C{constructor(c,i){this.rawContentChangedEvent=c,this.contentChangedEvent=i}merge(c){const i=w.merge(this.rawContentChangedEvent,c.rawContentChangedEvent),S=C._mergeChangeEvents(this.contentChangedEvent,c.contentChangedEvent);return new C(i,S)}static _mergeChangeEvents(c,i){const S=[].concat(c.changes).concat(i.changes),s=i.eol,l=i.versionId,r=c.isUndoing||i.isUndoing,p=c.isRedoing||i.isRedoing,u=c.isFlush||i.isFlush;return{changes:S,eol:s,versionId:l,isUndoing:r,isRedoing:p,isFlush:u}}}e.InternalModelContentChangeEvent=C}),define(ne[531],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentGuideHorizontalLine=e.IndentGuide=e.HorizontalGuidesState=void 0;var t;(function(A){A[A.Disabled=0]="Disabled",A[A.EnabledForActive=1]="EnabledForActive",A[A.Enabled=2]="Enabled"})(t=e.HorizontalGuidesState||(e.HorizontalGuidesState={}));class f{constructor(k,D,I){this.visibleColumn=k,this.className=D,this.horizontalLine=I}}e.IndentGuide=f;class _{constructor(k,D){this.top=k,this.endColumn=D}}e.IndentGuideHorizontalLine=_}),define(ne[699],re([1,0,15,29,243,20,1161,530,531]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairGuidesClassNames=e.GuidesTextModelPart=void 0;class w extends k.TextModelPart{constructor(o,c){super();this.textModel=o,this.languageConfigurationService=c}getLanguageConfiguration(o){return this.languageConfigurationService.getLanguageConfiguration(o)}_computeIndentLevel(o){return(0,D.computeIndentLevel)(this.textModel.getLineContent(o+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(o,c,i){this.assertNotDisposed();const S=this.textModel.getLineCount();if(o<1||o>S)throw new Error("Illegal value for lineNumber");const s=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,l=Boolean(s&&s.offSide);let r=-2,p=-1,u=-2,a=-1;const n=F=>{if(r!==-1&&(r===-2||r>F-1)){r=-1,p=-1;for(let L=F-2;L>=0;L--){const M=this._computeIndentLevel(L);if(M>=0){r=L,p=M;break}}}if(u===-2){u=-1,a=-1;for(let L=F;L<S;L++){const M=this._computeIndentLevel(L);if(M>=0){u=L,a=M;break}}}};let h=-2,g=-1,d=-2,m=-1;const b=F=>{if(h===-2){h=-1,g=-1;for(let L=F-2;L>=0;L--){const M=this._computeIndentLevel(L);if(M>=0){h=L,g=M;break}}}if(d!==-1&&(d===-2||d<F-1)){d=-1,m=-1;for(let L=F;L<S;L++){const M=this._computeIndentLevel(L);if(M>=0){d=L,m=M;break}}}};let E=0,y=!0,T=0,R=!0,O=0,x=0;for(let F=0;y||R;F++){const L=o-F,M=o+F;F>1&&(L<1||L<c)&&(y=!1),F>1&&(M>S||M>i)&&(R=!1),F>5e4&&(y=!1,R=!1);let N=-1;if(y&&L>=1){const P=this._computeIndentLevel(L-1);P>=0?(u=L-1,a=P,N=Math.ceil(P/this.textModel.getOptions().indentSize)):(n(L),N=this._getIndentLevelForWhitespaceLine(l,p,a))}let B=-1;if(R&&M<=S){const P=this._computeIndentLevel(M-1);P>=0?(h=M-1,g=P,B=Math.ceil(P/this.textModel.getOptions().indentSize)):(b(M),B=this._getIndentLevelForWhitespaceLine(l,g,m))}if(F===0){x=N;continue}if(F===1){if(M<=S&&B>=0&&x+1===B){y=!1,E=M,T=M,O=B;continue}if(L>=1&&N>=0&&N-1===x){R=!1,E=L,T=L,O=N;continue}if(E=o,T=o,O=x,O===0)return{startLineNumber:E,endLineNumber:T,indent:O}}y&&(N>=O?E=L:y=!1),R&&(B>=O?T=M:R=!1)}return{startLineNumber:E,endLineNumber:T,indent:O}}getLinesBracketGuides(o,c,i,S){const s=[],l=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new A.Range(o,1,c,this.textModel.getLineMaxColumn(c)));let r;if(i&&l.length>0){const g=(o<=i.lineNumber&&i.lineNumber<=c?l:this.textModel.bracketPairs.getBracketPairsInRange(A.Range.fromPositions(i))).filter(d=>A.Range.strictContainsPosition(d.range,i));r=(0,t.findLast)(g,d=>d.range.startLineNumber!==d.range.endLineNumber)?.range}const p=new t.ArrayQueue(l),u=new Array,a=new Array,n=new v,h=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType;for(let g=o;g<=c;g++){let d=new Array;a.length>0&&(d=d.concat(a),a.length=0),s.push(d);for(const b of p.takeWhile(E=>E.openingBracketRange.startLineNumber<=g)||[]){if(b.range.startLineNumber===b.range.endLineNumber)continue;const E=Math.min(this.getVisibleColumnFromPosition(b.openingBracketRange.getStartPosition()),this.getVisibleColumnFromPosition(b.closingBracketRange?.getStartPosition()??b.range.getEndPosition()),b.minVisibleColumnIndentation+1);let y=!1;b.closingBracketRange&&f.firstNonWhitespaceIndex(this.textModel.getLineContent(b.closingBracketRange.startLineNumber))<b.closingBracketRange.startColumn-1&&(y=!0);const T=b.openingBracketRange.getStartPosition(),R=b.closingBracketRange?.getStartPosition()??b.range.getEndPosition();b.closingBracketRange===void 0?u[b.nestingLevel]=null:u[b.nestingLevel]={nestingLevel:b.nestingLevel,nestingLevelOfEqualBracketType:b.nestingLevelOfEqualBracketType,guideVisibleColumn:E,start:T,visibleStartColumn:this.getVisibleColumnFromPosition(T),end:R,visibleEndColumn:this.getVisibleColumnFromPosition(R),bracketPair:b,renderHorizontalEndLineAtTheBottom:y}}for(const b of u){if(!b)continue;const E=r&&b.bracketPair.range.equalsRange(r),y=n.getInlineClassName(b.nestingLevel,b.nestingLevelOfEqualBracketType,h)+(S.highlightActive&&E?" "+n.activeClassName:"");(E&&S.horizontalGuides!==I.HorizontalGuidesState.Disabled||S.includeInactive&&S.horizontalGuides===I.HorizontalGuidesState.Enabled)&&(b.start.lineNumber===g&&b.guideVisibleColumn<b.visibleStartColumn&&d.push(new I.IndentGuide(b.guideVisibleColumn,y,new I.IndentGuideHorizontalLine(!1,b.start.column))),b.end.lineNumber===g+1&&b.guideVisibleColumn<b.visibleEndColumn&&a.push(new I.IndentGuide(b.guideVisibleColumn,y,new I.IndentGuideHorizontalLine(!b.renderHorizontalEndLineAtTheBottom,b.end.column))))}let m=Number.MAX_SAFE_INTEGER;for(let b=u.length-1;b>=0;b--){const E=u[b];if(!E)continue;const y=S.highlightActive&&r&&E.bracketPair.range.equalsRange(r),T=n.getInlineClassName(E.nestingLevel,E.nestingLevelOfEqualBracketType,h)+(y?" "+n.activeClassName:"");(y||S.includeInactive)&&E.renderHorizontalEndLineAtTheBottom&&E.end.lineNumber===g+1&&a.push(new I.IndentGuide(E.guideVisibleColumn,T,null)),!(E.end.lineNumber<=g||E.start.lineNumber>=g)&&(E.guideVisibleColumn>=m&&!y||(m=E.guideVisibleColumn,(y||S.includeInactive)&&d.push(new I.IndentGuide(E.guideVisibleColumn,T,null))))}d.sort((b,E)=>b.visibleColumn-E.visibleColumn)}return s}getVisibleColumnFromPosition(o){return _.CursorColumns.visibleColumnFromColumn(this.textModel.getLineContent(o.lineNumber),o.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(o,c){this.assertNotDisposed();const i=this.textModel.getLineCount();if(o<1||o>i)throw new Error("Illegal value for startLineNumber");if(c<1||c>i)throw new Error("Illegal value for endLineNumber");const S=this.textModel.getOptions(),s=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,l=Boolean(s&&s.offSide),r=new Array(c-o+1);let p=-2,u=-1,a=-2,n=-1;for(let h=o;h<=c;h++){const g=h-o,d=this._computeIndentLevel(h-1);if(d>=0){p=h-1,u=d,r[g]=Math.ceil(d/S.indentSize);continue}if(p===-2){p=-1,u=-1;for(let m=h-2;m>=0;m--){const b=this._computeIndentLevel(m);if(b>=0){p=m,u=b;break}}}if(a!==-1&&(a===-2||a<h-1)){a=-1,n=-1;for(let m=h;m<i;m++){const b=this._computeIndentLevel(m);if(b>=0){a=m,n=b;break}}}r[g]=this._getIndentLevelForWhitespaceLine(l,u,n)}return r}_getIndentLevelForWhitespaceLine(o,c,i){const S=this.textModel.getOptions();return c===-1||i===-1?0:c<i?1+Math.floor(c/S.indentSize):c===i||o?Math.ceil(i/S.indentSize):1+Math.floor(i/S.indentSize)}}e.GuidesTextModelPart=w;class v{constructor(){this.activeClassName="indent-active"}getInlineClassName(o,c,i){return this.getInlineClassNameOfLevel(i?c:o)}getInlineClassNameOfLevel(o){return`bracket-indent-guide lvl-${o%30}`}}e.BracketPairGuidesClassNames=v}),define(ne[1163],re([1,0,6,2]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenizationRegistry=void 0;class _{constructor(){this._map=new Map,this._factories=new Map,this._onDidChange=new t.Emitter,this.onDidChange=this._onDidChange.event,this._colorMap=null}fire(D){this._onDidChange.fire({changedLanguages:D,changedColorMap:!1})}register(D,I){return this._map.set(D,I),this.fire([D]),(0,f.toDisposable)(()=>{this._map.get(D)===I&&(this._map.delete(D),this.fire([D]))})}registerFactory(D,I){this._factories.get(D)?.dispose();const w=new A(this,D,I);return this._factories.set(D,w),(0,f.toDisposable)(()=>{const v=this._factories.get(D);!v||v!==w||(this._factories.delete(D),v.dispose())})}async getOrCreate(D){const I=this.get(D);if(I)return I;const w=this._factories.get(D);return!w||w.isResolved?null:(await w.resolve(),this.get(D))}get(D){return this._map.get(D)||null}isResolved(D){if(this.get(D))return!0;const w=this._factories.get(D);return!!(!w||w.isResolved)}setColorMap(D){this._colorMap=D,this._onDidChange.fire({changedLanguages:Array.from(this._map.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}e.TokenizationRegistry=_;class A extends f.Disposable{constructor(D,I,w){super();this._registry=D,this._languageId=I,this._factory=w,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}get isResolved(){return this._isResolved}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){const D=await Promise.resolve(this._factory.createTokenizationSupport());this._isResolved=!0,D&&!this._isDisposed&&this._register(this._registry.register(this._languageId,D))}}}),define(ne[86],re([1,0,9,20,1163,33]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExternalUriOpenerPriority=e.TokenizationRegistry=e.InlayHintKind=e.CommentMode=e.CommentThreadState=e.CommentThreadCollapsibleState=e.Command=e.FoldingRangeKind=e.SymbolKinds=e.SymbolTag=e.SymbolKind=e.isLocationLink=e.DocumentHighlightKind=e.SignatureHelpTriggerKind=e.CodeActionTriggerType=e.InlineCompletionTriggerKind=e.CompletionTriggerKind=e.CompletionItemInsertTextRule=e.CompletionItemTag=e.CompletionItemKinds=e.CompletionItemKind=e.EncodedTokenizationResult=e.TokenizationResult=e.Token=e.TokenMetadata=e.MetadataConsts=e.StandardTokenType=e.ColorId=e.FontStyle=e.LanguageId=void 0;var k;(function(L){L[L.Null=0]="Null",L[L.PlainText=1]="PlainText"})(k=e.LanguageId||(e.LanguageId={}));var D;(function(L){L[L.NotSet=-1]="NotSet",L[L.None=0]="None",L[L.Italic=1]="Italic",L[L.Bold=2]="Bold",L[L.Underline=4]="Underline",L[L.Strikethrough=8]="Strikethrough"})(D=e.FontStyle||(e.FontStyle={}));var I;(function(L){L[L.None=0]="None",L[L.DefaultForeground=1]="DefaultForeground",L[L.DefaultBackground=2]="DefaultBackground"})(I=e.ColorId||(e.ColorId={}));var w;(function(L){L[L.Other=0]="Other",L[L.Comment=1]="Comment",L[L.String=2]="String",L[L.RegEx=3]="RegEx"})(w=e.StandardTokenType||(e.StandardTokenType={}));var v;(function(L){L[L.LANGUAGEID_MASK=255]="LANGUAGEID_MASK",L[L.TOKEN_TYPE_MASK=768]="TOKEN_TYPE_MASK",L[L.FONT_STYLE_MASK=15360]="FONT_STYLE_MASK",L[L.FOREGROUND_MASK=8372224]="FOREGROUND_MASK",L[L.BACKGROUND_MASK=4286578688]="BACKGROUND_MASK",L[L.ITALIC_MASK=1024]="ITALIC_MASK",L[L.BOLD_MASK=2048]="BOLD_MASK",L[L.UNDERLINE_MASK=4096]="UNDERLINE_MASK",L[L.STRIKETHROUGH_MASK=8192]="STRIKETHROUGH_MASK",L[L.SEMANTIC_USE_ITALIC=1]="SEMANTIC_USE_ITALIC",L[L.SEMANTIC_USE_BOLD=2]="SEMANTIC_USE_BOLD",L[L.SEMANTIC_USE_UNDERLINE=4]="SEMANTIC_USE_UNDERLINE",L[L.SEMANTIC_USE_STRIKETHROUGH=8]="SEMANTIC_USE_STRIKETHROUGH",L[L.SEMANTIC_USE_FOREGROUND=16]="SEMANTIC_USE_FOREGROUND",L[L.SEMANTIC_USE_BACKGROUND=32]="SEMANTIC_USE_BACKGROUND",L[L.LANGUAGEID_OFFSET=0]="LANGUAGEID_OFFSET",L[L.TOKEN_TYPE_OFFSET=8]="TOKEN_TYPE_OFFSET",L[L.FONT_STYLE_OFFSET=10]="FONT_STYLE_OFFSET",L[L.FOREGROUND_OFFSET=14]="FOREGROUND_OFFSET",L[L.BACKGROUND_OFFSET=23]="BACKGROUND_OFFSET"})(v=e.MetadataConsts||(e.MetadataConsts={}));class C{static getLanguageId(M){return(M&255)>>>0}static getTokenType(M){return(M&768)>>>8}static getFontStyle(M){return(M&15360)>>>10}static getForeground(M){return(M&8372224)>>>14}static getBackground(M){return(M&4286578688)>>>23}static getClassNameFromMetadata(M){const N=this.getForeground(M);let B="mtk"+N;const P=this.getFontStyle(M);return P&1&&(B+=" mtki"),P&2&&(B+=" mtkb"),P&4&&(B+=" mtku"),P&8&&(B+=" mtks"),B}static getInlineStyleFromMetadata(M,N){const B=this.getForeground(M),P=this.getFontStyle(M);let V=`color: ${N[B]};`;P&1&&(V+="font-style: italic;"),P&2&&(V+="font-weight: bold;");let z="";return P&4&&(z+=" underline"),P&8&&(z+=" line-through"),z&&(V+=`text-decoration:${z};`),V}static getPresentationFromMetadata(M){const N=this.getForeground(M),B=this.getFontStyle(M);return{foreground:N,italic:Boolean(B&1),bold:Boolean(B&2),underline:Boolean(B&4),strikethrough:Boolean(B&8)}}}e.TokenMetadata=C;class o{constructor(M,N,B){this._tokenBrand=void 0,this.offset=M,this.type=N,this.language=B}toString(){return"("+this.offset+", "+this.type+")"}}e.Token=o;class c{constructor(M,N){this._tokenizationResultBrand=void 0,this.tokens=M,this.endState=N}}e.TokenizationResult=c;class i{constructor(M,N){this._encodedTokenizationResultBrand=void 0,this.tokens=M,this.endState=N}}e.EncodedTokenizationResult=i;var S;(function(L){L[L.Method=0]="Method",L[L.Function=1]="Function",L[L.Constructor=2]="Constructor",L[L.Field=3]="Field",L[L.Variable=4]="Variable",L[L.Class=5]="Class",L[L.Struct=6]="Struct",L[L.Interface=7]="Interface",L[L.Module=8]="Module",L[L.Property=9]="Property",L[L.Event=10]="Event",L[L.Operator=11]="Operator",L[L.Unit=12]="Unit",L[L.Value=13]="Value",L[L.Constant=14]="Constant",L[L.Enum=15]="Enum",L[L.EnumMember=16]="EnumMember",L[L.Keyword=17]="Keyword",L[L.Text=18]="Text",L[L.Color=19]="Color",L[L.File=20]="File",L[L.Reference=21]="Reference",L[L.Customcolor=22]="Customcolor",L[L.Folder=23]="Folder",L[L.TypeParameter=24]="TypeParameter",L[L.User=25]="User",L[L.Issue=26]="Issue",L[L.Snippet=27]="Snippet"})(S=e.CompletionItemKind||(e.CompletionItemKind={}));var s;(function(L){const M=new Map;M.set(0,A.Codicon.symbolMethod),M.set(1,A.Codicon.symbolFunction),M.set(2,A.Codicon.symbolConstructor),M.set(3,A.Codicon.symbolField),M.set(4,A.Codicon.symbolVariable),M.set(5,A.Codicon.symbolClass),M.set(6,A.Codicon.symbolStruct),M.set(7,A.Codicon.symbolInterface),M.set(8,A.Codicon.symbolModule),M.set(9,A.Codicon.symbolProperty),M.set(10,A.Codicon.symbolEvent),M.set(11,A.Codicon.symbolOperator),M.set(12,A.Codicon.symbolUnit),M.set(13,A.Codicon.symbolValue),M.set(15,A.Codicon.symbolEnum),M.set(14,A.Codicon.symbolConstant),M.set(15,A.Codicon.symbolEnum),M.set(16,A.Codicon.symbolEnumMember),M.set(17,A.Codicon.symbolKeyword),M.set(27,A.Codicon.symbolSnippet),M.set(18,A.Codicon.symbolText),M.set(19,A.Codicon.symbolColor),M.set(20,A.Codicon.symbolFile),M.set(21,A.Codicon.symbolReference),M.set(22,A.Codicon.symbolCustomColor),M.set(23,A.Codicon.symbolFolder),M.set(24,A.Codicon.symbolTypeParameter),M.set(25,A.Codicon.account),M.set(26,A.Codicon.issues);function N(V){let z=M.get(V);return z||(console.info("No codicon found for CompletionItemKind "+V),z=A.Codicon.symbolProperty),z}L.toIcon=N;const B=new Map;B.set("method",0),B.set("function",1),B.set("constructor",2),B.set("field",3),B.set("variable",4),B.set("class",5),B.set("struct",6),B.set("interface",7),B.set("module",8),B.set("property",9),B.set("event",10),B.set("operator",11),B.set("unit",12),B.set("value",13),B.set("constant",14),B.set("enum",15),B.set("enum-member",16),B.set("enumMember",16),B.set("keyword",17),B.set("snippet",27),B.set("text",18),B.set("color",19),B.set("file",20),B.set("reference",21),B.set("customcolor",22),B.set("folder",23),B.set("type-parameter",24),B.set("typeParameter",24),B.set("account",25),B.set("issue",26);function P(V,z){let U=B.get(V);return typeof U=="undefined"&&!z&&(U=9),U}L.fromString=P})(s=e.CompletionItemKinds||(e.CompletionItemKinds={}));var l;(function(L){L[L.Deprecated=1]="Deprecated"})(l=e.CompletionItemTag||(e.CompletionItemTag={}));var r;(function(L){L[L.KeepWhitespace=1]="KeepWhitespace",L[L.InsertAsSnippet=4]="InsertAsSnippet"})(r=e.CompletionItemInsertTextRule||(e.CompletionItemInsertTextRule={}));var p;(function(L){L[L.Invoke=0]="Invoke",L[L.TriggerCharacter=1]="TriggerCharacter",L[L.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(p=e.CompletionTriggerKind||(e.CompletionTriggerKind={}));var u;(function(L){L[L.Automatic=0]="Automatic",L[L.Explicit=1]="Explicit"})(u=e.InlineCompletionTriggerKind||(e.InlineCompletionTriggerKind={}));var a;(function(L){L[L.Invoke=1]="Invoke",L[L.Auto=2]="Auto"})(a=e.CodeActionTriggerType||(e.CodeActionTriggerType={}));var n;(function(L){L[L.Invoke=1]="Invoke",L[L.TriggerCharacter=2]="TriggerCharacter",L[L.ContentChange=3]="ContentChange"})(n=e.SignatureHelpTriggerKind||(e.SignatureHelpTriggerKind={}));var h;(function(L){L[L.Text=0]="Text",L[L.Read=1]="Read",L[L.Write=2]="Write"})(h=e.DocumentHighlightKind||(e.DocumentHighlightKind={}));function g(L){return L&&t.URI.isUri(L.uri)&&f.Range.isIRange(L.range)&&(f.Range.isIRange(L.originSelectionRange)||f.Range.isIRange(L.targetSelectionRange))}e.isLocationLink=g;var d;(function(L){L[L.File=0]="File",L[L.Module=1]="Module",L[L.Namespace=2]="Namespace",L[L.Package=3]="Package",L[L.Class=4]="Class",L[L.Method=5]="Method",L[L.Property=6]="Property",L[L.Field=7]="Field",L[L.Constructor=8]="Constructor",L[L.Enum=9]="Enum",L[L.Interface=10]="Interface",L[L.Function=11]="Function",L[L.Variable=12]="Variable",L[L.Constant=13]="Constant",L[L.String=14]="String",L[L.Number=15]="Number",L[L.Boolean=16]="Boolean",L[L.Array=17]="Array",L[L.Object=18]="Object",L[L.Key=19]="Key",L[L.Null=20]="Null",L[L.EnumMember=21]="EnumMember",L[L.Struct=22]="Struct",L[L.Event=23]="Event",L[L.Operator=24]="Operator",L[L.TypeParameter=25]="TypeParameter"})(d=e.SymbolKind||(e.SymbolKind={}));var m;(function(L){L[L.Deprecated=1]="Deprecated"})(m=e.SymbolTag||(e.SymbolTag={}));var b;(function(L){const M=new Map;M.set(0,A.Codicon.symbolFile),M.set(1,A.Codicon.symbolModule),M.set(2,A.Codicon.symbolNamespace),M.set(3,A.Codicon.symbolPackage),M.set(4,A.Codicon.symbolClass),M.set(5,A.Codicon.symbolMethod),M.set(6,A.Codicon.symbolProperty),M.set(7,A.Codicon.symbolField),M.set(8,A.Codicon.symbolConstructor),M.set(9,A.Codicon.symbolEnum),M.set(10,A.Codicon.symbolInterface),M.set(11,A.Codicon.symbolFunction),M.set(12,A.Codicon.symbolVariable),M.set(13,A.Codicon.symbolConstant),M.set(14,A.Codicon.symbolString),M.set(15,A.Codicon.symbolNumber),M.set(16,A.Codicon.symbolBoolean),M.set(17,A.Codicon.symbolArray),M.set(18,A.Codicon.symbolObject),M.set(19,A.Codicon.symbolKey),M.set(20,A.Codicon.symbolNull),M.set(21,A.Codicon.symbolEnumMember),M.set(22,A.Codicon.symbolStruct),M.set(23,A.Codicon.symbolEvent),M.set(24,A.Codicon.symbolOperator),M.set(25,A.Codicon.symbolTypeParameter);function N(B){let P=M.get(B);return P||(console.info("No codicon found for SymbolKind "+B),P=A.Codicon.symbolProperty),P}L.toIcon=N})(b=e.SymbolKinds||(e.SymbolKinds={}));class E{constructor(M){this.value=M}}e.FoldingRangeKind=E,E.Comment=new E("comment"),E.Imports=new E("imports"),E.Region=new E("region");var y;(function(L){function M(N){return!N||typeof N!="object"?!1:typeof N.id=="string"&&typeof N.title=="string"}L.is=M})(y=e.Command||(e.Command={}));var T;(function(L){L[L.Collapsed=0]="Collapsed",L[L.Expanded=1]="Expanded"})(T=e.CommentThreadCollapsibleState||(e.CommentThreadCollapsibleState={}));var R;(function(L){L[L.Unresolved=0]="Unresolved",L[L.Resolved=1]="Resolved"})(R=e.CommentThreadState||(e.CommentThreadState={}));var O;(function(L){L[L.Editing=0]="Editing",L[L.Preview=1]="Preview"})(O=e.CommentMode||(e.CommentMode={}));var x;(function(L){L[L.Type=1]="Type",L[L.Parameter=2]="Parameter"})(x=e.InlayHintKind||(e.InlayHintKind={})),e.TokenizationRegistry=new _.TokenizationRegistry;var F;(function(L){L[L.None=0]="None",L[L.Option=1]="Option",L[L.Default=2]="Default",L[L.Preferred=3]="Preferred"})(F=e.ExternalUriOpenerPriority||(e.ExternalUriOpenerPriority={}))}),define(ne[532],re([1,0,86]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.nullTokenizeEncoded=e.nullTokenize=e.NullState=void 0,e.NullState=new class{clone(){return this}equals(A){return this===A}};function f(A,k){return new t.TokenizationResult([new t.Token(0,"",A)],k)}e.nullTokenize=f;function _(A,k){const D=new Uint32Array(2);return D[0]=0,D[1]=(A<<0|0<<8|0<<10|1<<14|2<<23)>>>0,new t.EncodedTokenizationResult(D,k===null?e.NullState:k)}e.nullTokenizeEncoded=_}),define(ne[533],re([1,0,22,86,458,284,343]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FastTokenizer=e.TextBufferTokenizer=e.Token=e.TokenKind=void 0;var D;(function(o){o[o.Text=0]="Text",o[o.OpeningBracket=1]="OpeningBracket",o[o.ClosingBracket=2]="ClosingBracket"})(D=e.TokenKind||(e.TokenKind={}));class I{constructor(c,i,S,s,l){this.length=c,this.kind=i,this.bracketId=S,this.bracketIds=s,this.astNode=l}}e.Token=I;class w{constructor(c,i){this.textModel=c,this.bracketTokens=i,this.reader=new v(this.textModel,this.bracketTokens),this._offset=A.lengthZero,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=c.getLineCount(),this.textBufferLastLineLength=c.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return(0,A.toLength)(this.textBufferLineCount,this.textBufferLastLineLength)}getText(){return this.textModel.getValue()}skip(c){this.didPeek=!1,this._offset=(0,A.lengthAdd)(this._offset,c);const i=(0,A.lengthToObj)(this._offset);this.reader.setPosition(i.lineCount,i.columnCount)}read(){let c;return this.peeked?(this.didPeek=!1,c=this.peeked):c=this.reader.read(),c&&(this._offset=(0,A.lengthAdd)(this._offset,c.length)),c}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}}e.TextBufferTokenizer=w;class v{constructor(c,i){this.textModel=c,this.bracketTokens=i,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=c.getLineCount(),this.textBufferLastLineLength=c.getLineLength(this.textBufferLineCount)}setPosition(c,i){c===this.lineIdx?(this.lineCharOffset=i,this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset)):(this.lineIdx=c,this.lineCharOffset=i,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){const l=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=(0,A.lengthGetColumnCountIfZeroLineCount)(l.length),l}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;this.line===null&&(this.lineTokens=this.textModel.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const c=this.lineIdx,i=this.lineCharOffset;let S=0;for(;;){const l=this.lineTokens,r=l.getCount();let p=null;if(this.lineTokenOffset<r){const u=l.getMetadata(this.lineTokenOffset);for(;this.lineTokenOffset+1<r&&u===l.getMetadata(this.lineTokenOffset+1);)this.lineTokenOffset++;const a=f.TokenMetadata.getTokenType(u)===0,n=l.getEndOffset(this.lineTokenOffset);if(a&&n!==this.lineCharOffset){const h=l.getLanguageId(this.lineTokenOffset),g=this.line.substring(this.lineCharOffset,n),d=this.bracketTokens.getSingleLanguageBracketTokens(h),m=d.regExpGlobal;if(m){m.lastIndex=0;const b=m.exec(g);b&&(p=d.getToken(b[0]),p&&(this.lineCharOffset+=b.index))}}if(S+=n-this.lineCharOffset,p)if(c!==this.lineIdx||i!==this.lineCharOffset){this.peekedToken=p;break}else return this.lineCharOffset+=(0,A.lengthGetColumnCountIfZeroLineCount)(p.length),p;else this.lineTokenOffset++,this.lineCharOffset=n}else if(this.lineIdx===this.textBufferLineCount-1||(this.lineIdx++,this.lineTokens=this.textModel.getLineTokens(this.lineIdx+1),this.lineTokenOffset=0,this.line=this.lineTokens.getLineContent(),this.lineCharOffset=0,S+=33,S>1e3))break;if(S>1500)break}const s=(0,A.lengthDiff)(c,i,this.lineIdx,this.lineCharOffset);return new I(s,0,-1,k.SmallImmutableSet.getEmpty(),new _.TextAstNode(s))}}class C{constructor(c,i){this.text=c,this._offset=A.lengthZero,this.idx=0;const s=i.getRegExpStr()?new RegExp(i.getRegExpStr()+`| `,"g"):null,l=[];let r,p=0,u=0,a=0,n=0;const h=new Array;for(let m=0;m<60;m++)h.push(new I((0,A.toLength)(0,m),0,-1,k.SmallImmutableSet.getEmpty(),new _.TextAstNode((0,A.toLength)(0,m))));const g=new Array;for(let m=0;m<60;m++)g.push(new I((0,A.toLength)(1,m),0,-1,k.SmallImmutableSet.getEmpty(),new _.TextAstNode((0,A.toLength)(1,m))));if(s)for(s.lastIndex=0;(r=s.exec(c))!==null;){const m=r.index,b=r[0];if(b===` `)p++,u=m+1;else{if(a!==m){let E;if(n===p){const y=m-a;if(y<h.length)E=h[y];else{const T=(0,A.toLength)(0,y);E=new I(T,0,-1,k.SmallImmutableSet.getEmpty(),new _.TextAstNode(T))}}else{const y=p-n,T=m-u;if(y===1&&T<g.length)E=g[T];else{const R=(0,A.toLength)(y,T);E=new I(R,0,-1,k.SmallImmutableSet.getEmpty(),new _.TextAstNode(R))}}l.push(E)}l.push(i.getToken(b)),a=m+b.length,n=p}}const d=c.length;if(a!==d){const m=n===p?(0,A.toLength)(0,d-a):(0,A.toLength)(p-n,d-u);l.push(new I(m,0,-1,k.SmallImmutableSet.getEmpty(),new _.TextAstNode(m)))}this.length=(0,A.toLength)(p,d-u),this.tokens=l}get offset(){return this._offset}read(){return this.tokens[this.idx++]||null}peek(){return this.tokens[this.idx]||null}skip(c){throw new t.NotSupportedError}getText(){return this.text}}e.FastTokenizer=C}),define(ne[700],re([1,0,29,458,284,343,533]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageAgnosticBracketTokens=e.BracketTokens=void 0;class D{constructor(C){this.map=C,this.hasRegExp=!1,this._regExpGlobal=null}static createFromLanguage(C,o){function c(r,p){return o.getKey(`${r}:::${p}`)}const i=C.characterPair.getColorizedBrackets(),S=new Map,s=new Set;for(const[r,p]of i){s.add(r);let u=S.get(p);const a=c(C.languageId,r);u||(u={openingBrackets:A.SmallImmutableSet.getEmpty(),first:a},S.set(p,u)),u.openingBrackets=u.openingBrackets.add(a,A.identityKeyProvider)}const l=new Map;for(const[r,p]of S){const u=(0,_.toLength)(0,r.length);l.set(r,new k.Token(u,2,p.first,p.openingBrackets,f.BracketAstNode.create(u,C.languageId,r,p.openingBrackets)))}for(const r of s){const p=(0,_.toLength)(0,r.length),u=c(C.languageId,r),a=A.SmallImmutableSet.getEmpty().add(u,A.identityKeyProvider);l.set(r,new k.Token(p,1,u,a,f.BracketAstNode.create(p,C.languageId,r,a)))}return new D(l)}getRegExpStr(){if(this.isEmpty)return null;{const C=[...this.map.keys()];return C.sort(),C.reverse(),C.map(o=>I(o)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const C=this.getRegExpStr();this._regExpGlobal=C?new RegExp(C,"g"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(C){return this.map.get(C)}findClosingTokenText(C){for(const[o,c]of this.map)if(c.bracketIds.intersects(C))return o}get isEmpty(){return this.map.size===0}}e.BracketTokens=D;function I(v){const C=(0,t.escapeRegExpCharacters)(v);return/^[\w ]+$/.test(v)?`\\b${C}\\b`:C}class w{constructor(C,o){this.denseKeyProvider=C,this.getLanguageConfiguration=o,this.languageIdToBracketTokens=new Map}didLanguageChange(C){const o=this.languageIdToBracketTokens.get(C);if(!o)return!1;const c=D.createFromLanguage(this.getLanguageConfiguration(C),this.denseKeyProvider).getRegExpStr();return o.getRegExpStr()!==c}getSingleLanguageBracketTokens(C){let o=this.languageIdToBracketTokens.get(C);return o||(o=D.createFromLanguage(this.getLanguageConfiguration(C),this.denseKeyProvider),this.languageIdToBracketTokens.set(C,o)),o}getToken(C,o){return this.getSingleLanguageBracketTokens(o).getToken(C)}}e.LanguageAgnosticBracketTokens=w}),define(ne[1164],re([1,0,6,2,20,1162,690,700,284,691,343,533]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairsTree=void 0;class o extends f.Disposable{constructor(l,r){super();if(this.textModel=l,this.getLanguageConfiguration=r,this.didChangeEmitter=new t.Emitter,this.denseKeyProvider=new v.DenseKeyProvider,this.brackets=new D.LanguageAgnosticBracketTokens(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,l.backgroundTokenizationState===0){const p=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),u=new C.FastTokenizer(this.textModel.getValue(),p);this.initialAstWithoutTokens=(0,w.parseDocument)(u,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}else l.backgroundTokenizationState===2?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):l.backgroundTokenizationState===1&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens)}didLanguageChange(l){return this.brackets.didLanguageChange(l)}handleDidChangeBackgroundTokenizationState(){if(this.textModel.backgroundTokenizationState===2){const l=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0,l||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:l}){const r=l.map(p=>new k.TextEditInfo((0,I.toLength)(p.fromLineNumber-1,0),(0,I.toLength)(p.toLineNumber,0),(0,I.toLength)(p.toLineNumber-p.fromLineNumber+1,0)));this.astWithTokens=this.parseDocumentFromTextBuffer(r,this.astWithTokens,!1),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(l){const r=l.changes.map(p=>{const u=_.Range.lift(p.range);return new k.TextEditInfo((0,I.positionToLength)(u.getStartPosition()),(0,I.positionToLength)(u.getEndPosition()),(0,I.lengthOfString)(p.text))}).reverse();this.astWithTokens=this.parseDocumentFromTextBuffer(r,this.astWithTokens,!1),this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(r,this.initialAstWithoutTokens,!1))}parseDocumentFromTextBuffer(l,r,p){const a=!1?r?.deepClone():r,n=new C.TextBufferTokenizer(this.textModel,this.brackets);return(0,w.parseDocument)(n,l,a,p)}getBracketsInRange(l){const r=(0,I.toLength)(l.startLineNumber-1,l.startColumn-1),p=(0,I.toLength)(l.endLineNumber-1,l.endColumn-1),u=new Array,a=this.initialAstWithoutTokens||this.astWithTokens;return c(a,I.lengthZero,a.length,r,p,u,0,new Map),u}getBracketPairsInRange(l,r){const p=new Array,u=(0,I.positionToLength)(l.getStartPosition()),a=(0,I.positionToLength)(l.getEndPosition()),n=this.initialAstWithoutTokens||this.astWithTokens,h=new i(p,r,this.textModel);return S(n,I.lengthZero,n.length,u,a,h,0,new Map),p}}e.BracketPairsTree=o;function c(s,l,r,p,u,a,n,h){if(s.kind===4)for(const g of s.children)r=(0,I.lengthAdd)(l,g.length),(0,I.lengthLessThanEqual)(l,u)&&(0,I.lengthGreaterThanEqual)(r,p)&&c(g,l,r,p,u,a,n,h),l=r;else if(s.kind===2){let g=0;if(h){let d=h.get(s.openingBracket.text);d===void 0&&(d=0),g=d,d++,h.set(s.openingBracket.text,d)}{const d=s.openingBracket;if(r=(0,I.lengthAdd)(l,d.length),(0,I.lengthLessThanEqual)(l,u)&&(0,I.lengthGreaterThanEqual)(r,p)){const m=(0,I.lengthsToRange)(l,r);a.push(new A.BracketInfo(m,n,g,!s.closingBracket))}l=r}if(s.child){const d=s.child;r=(0,I.lengthAdd)(l,d.length),(0,I.lengthLessThanEqual)(l,u)&&(0,I.lengthGreaterThanEqual)(r,p)&&c(d,l,r,p,u,a,n+1,h),l=r}if(s.closingBracket){const d=s.closingBracket;if(r=(0,I.lengthAdd)(l,d.length),(0,I.lengthLessThanEqual)(l,u)&&(0,I.lengthGreaterThanEqual)(r,p)){const m=(0,I.lengthsToRange)(l,r);a.push(new A.BracketInfo(m,n,g,!1))}l=r}h&&h.set(s.openingBracket.text,g)}else if(s.kind===3){const g=(0,I.lengthsToRange)(l,r);a.push(new A.BracketInfo(g,n-1,0,!0))}else if(s.kind===1){const g=(0,I.lengthsToRange)(l,r);a.push(new A.BracketInfo(g,n-1,0,!1))}}class i{constructor(l,r,p){this.result=l,this.includeMinIndentation=r,this.textModel=p}}function S(s,l,r,p,u,a,n,h){if(s.kind===2){let g=0;if(h){let b=h.get(s.openingBracket.text);b===void 0&&(b=0),g=b,b++,h.set(s.openingBracket.text,b)}const d=(0,I.lengthAdd)(l,s.openingBracket.length);let m=-1;if(a.includeMinIndentation&&(m=s.computeMinIndentation(l,a.textModel)),a.result.push(new A.BracketPairWithMinIndentationInfo((0,I.lengthsToRange)(l,r),(0,I.lengthsToRange)(l,d),s.closingBracket?(0,I.lengthsToRange)((0,I.lengthAdd)(d,s.child?.length||I.lengthZero),r):void 0,n,g,m)),l=d,s.child){const b=s.child;r=(0,I.lengthAdd)(l,b.length),(0,I.lengthLessThanEqual)(l,u)&&(0,I.lengthGreaterThanEqual)(r,p)&&S(b,l,r,p,u,a,n+1,h)}h&&h.set(s.openingBracket.text,g)}else{let g=l;for(const d of s.children){const m=g;g=(0,I.lengthAdd)(g,d.length),(0,I.lengthLessThanEqual)(m,u)&&(0,I.lengthLessThanEqual)(p,g)&&S(d,m,g,p,u,a,n,h)}}}}),define(ne[1165],re([1,0,6,2,1164,386,528]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairsTextModelPart=void 0;class D extends f.Disposable{constructor(c,i){super();this.textModel=c,this.languageConfigurationService=i,this.bracketPairsTree=this._register(new f.MutableDisposable),this.onDidChangeEmitter=new t.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(this.languageConfigurationService.onDidChange(S=>{(!S.languageId||this.bracketPairsTree.value?.object.didLanguageChange(S.languageId))&&(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}))}get isDocumentSupported(){const c=5e4*100;return this.textModel.getValueLength()<=c}handleDidChangeOptions(c){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(c){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(c){this.bracketPairsTree.value?.object.handleContentChanged(c)}handleDidChangeBackgroundTokenizationState(){this.bracketPairsTree.value?.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(c){this.bracketPairsTree.value?.object.handleDidChangeTokens(c)}updateBracketPairsTree(){if(this.bracketsRequested&&this.isDocumentSupported){if(!this.bracketPairsTree.value){const c=new f.DisposableStore;this.bracketPairsTree.value=I(c.add(new _.BracketPairsTree(this.textModel,i=>this.languageConfigurationService.getLanguageConfiguration(i))),c),c.add(this.bracketPairsTree.value.object.onDidChange(i=>this.onDidChangeEmitter.fire(i))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(c){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(c,!1)||[]}getBracketPairsInRangeWithMinIndentation(c){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(c,!0)||[]}getBracketsInRange(c){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketsInRange(c)||[]}findMatchingBracketUp(c,i,S){const s=c.toLowerCase(),l=this.textModel.validatePosition(i),r=this.textModel.getLanguageIdAtPosition(l.lineNumber,l.column),p=this.languageConfigurationService.getLanguageConfiguration(r).brackets;if(!p)return null;const u=p.textIsBracket[s];return u?C(this._findMatchingBracketUp(u,l,w(S))):null}matchBracket(c,i){const S=w(i);return this._matchBracket(this.textModel.validatePosition(c),S)}_establishBracketSearchOffsets(c,i,S,s){const l=i.getCount(),r=i.getLanguageId(s);let p=Math.max(0,c.column-1-S.maxBracketLength);for(let a=s-1;a>=0;a--){const n=i.getEndOffset(a);if(n<=p)break;if((0,A.ignoreBracketsInToken)(i.getStandardTokenType(a))||i.getLanguageId(a)!==r){p=n;break}}let u=Math.min(i.getLineContent().length,c.column-1+S.maxBracketLength);for(let a=s+1;a<l;a++){const n=i.getStartOffset(a);if(n>=u)break;if((0,A.ignoreBracketsInToken)(i.getStandardTokenType(a))||i.getLanguageId(a)!==r){u=n;break}}return{searchStartOffset:p,searchEndOffset:u}}_matchBracket(c,i){const S=c.lineNumber,s=this.textModel.getLineTokens(S),l=this.textModel.getLineContent(S),r=s.findTokenIndexAtOffset(c.column-1);if(r<0)return null;const p=this.languageConfigurationService.getLanguageConfiguration(s.getLanguageId(r)).brackets;if(p&&!(0,A.ignoreBracketsInToken)(s.getStandardTokenType(r))){let{searchStartOffset:u,searchEndOffset:a}=this._establishBracketSearchOffsets(c,s,p,r),n=null;for(;;){const h=k.BracketsUtils.findNextBracketInRange(p.forwardRegex,S,l,u,a);if(!h)break;if(h.startColumn<=c.column&&c.column<=h.endColumn){const g=l.substring(h.startColumn-1,h.endColumn-1).toLowerCase(),d=this._matchFoundBracket(h,p.textIsBracket[g],p.textIsOpenBracket[g],i);if(d){if(d instanceof v)return null;n=d}}u=h.endColumn-1}if(n)return n}if(r>0&&s.getStartOffset(r)===c.column-1){const u=r-1,a=this.languageConfigurationService.getLanguageConfiguration(s.getLanguageId(u)).brackets;if(a&&!(0,A.ignoreBracketsInToken)(s.getStandardTokenType(u))){const{searchStartOffset:n,searchEndOffset:h}=this._establishBracketSearchOffsets(c,s,a,u),g=k.BracketsUtils.findPrevBracketInRange(a.reversedRegex,S,l,n,h);if(g&&g.startColumn<=c.column&&c.column<=g.endColumn){const d=l.substring(g.startColumn-1,g.endColumn-1).toLowerCase(),m=this._matchFoundBracket(g,a.textIsBracket[d],a.textIsOpenBracket[d],i);if(m)return m instanceof v?null:m}}}return null}_matchFoundBracket(c,i,S,s){if(!i)return null;const l=S?this._findMatchingBracketDown(i,c.getEndPosition(),s):this._findMatchingBracketUp(i,c.getStartPosition(),s);return l?l instanceof v?l:[c,l]:null}_findMatchingBracketUp(c,i,S){const s=c.languageId,l=c.reversedRegex;let r=-1,p=0;const u=(a,n,h,g)=>{for(;;){if(S&&++p%100==0&&!S())return v.INSTANCE;const d=k.BracketsUtils.findPrevBracketInRange(l,a,n,h,g);if(!d)break;const m=n.substring(d.startColumn-1,d.endColumn-1).toLowerCase();if(c.isOpen(m)?r++:c.isClose(m)&&r--,r===0)return d;g=d.startColumn-1}return null};for(let a=i.lineNumber;a>=1;a--){const n=this.textModel.getLineTokens(a),h=n.getCount(),g=this.textModel.getLineContent(a);let d=h-1,m=g.length,b=g.length;a===i.lineNumber&&(d=n.findTokenIndexAtOffset(i.column-1),m=i.column-1,b=i.column-1);let E=!0;for(;d>=0;d--){const y=n.getLanguageId(d)===s&&!(0,A.ignoreBracketsInToken)(n.getStandardTokenType(d));if(y)E?m=n.getStartOffset(d):(m=n.getStartOffset(d),b=n.getEndOffset(d));else if(E&&m!==b){const T=u(a,g,m,b);if(T)return T}E=y}if(E&&m!==b){const y=u(a,g,m,b);if(y)return y}}return null}_findMatchingBracketDown(c,i,S){const s=c.languageId,l=c.forwardRegex;let r=1,p=0;const u=(n,h,g,d)=>{for(;;){if(S&&++p%100==0&&!S())return v.INSTANCE;const m=k.BracketsUtils.findNextBracketInRange(l,n,h,g,d);if(!m)break;const b=h.substring(m.startColumn-1,m.endColumn-1).toLowerCase();if(c.isOpen(b)?r++:c.isClose(b)&&r--,r===0)return m;g=m.endColumn-1}return null},a=this.textModel.getLineCount();for(let n=i.lineNumber;n<=a;n++){const h=this.textModel.getLineTokens(n),g=h.getCount(),d=this.textModel.getLineContent(n);let m=0,b=0,E=0;n===i.lineNumber&&(m=h.findTokenIndexAtOffset(i.column-1),b=i.column-1,E=i.column-1);let y=!0;for(;m<g;m++){const T=h.getLanguageId(m)===s&&!(0,A.ignoreBracketsInToken)(h.getStandardTokenType(m));if(T)y||(b=h.getStartOffset(m)),E=h.getEndOffset(m);else if(y&&b!==E){const R=u(n,d,b,E);if(R)return R}y=T}if(y&&b!==E){const T=u(n,d,b,E);if(T)return T}}return null}findPrevBracket(c){const i=this.textModel.validatePosition(c);let S=null,s=null;for(let l=i.lineNumber;l>=1;l--){const r=this.textModel.getLineTokens(l),p=r.getCount(),u=this.textModel.getLineContent(l);let a=p-1,n=u.length,h=u.length;if(l===i.lineNumber){a=r.findTokenIndexAtOffset(i.column-1),n=i.column-1,h=i.column-1;const d=r.getLanguageId(a);S!==d&&(S=d,s=this.languageConfigurationService.getLanguageConfiguration(S).brackets)}let g=!0;for(;a>=0;a--){const d=r.getLanguageId(a);if(S!==d){if(s&&g&&n!==h){const b=k.BracketsUtils.findPrevBracketInRange(s.reversedRegex,l,u,n,h);if(b)return this._toFoundBracket(s,b);g=!1}S=d,s=this.languageConfigurationService.getLanguageConfiguration(S).brackets}const m=!!s&&!(0,A.ignoreBracketsInToken)(r.getStandardTokenType(a));if(m)g?n=r.getStartOffset(a):(n=r.getStartOffset(a),h=r.getEndOffset(a));else if(s&&g&&n!==h){const b=k.BracketsUtils.findPrevBracketInRange(s.reversedRegex,l,u,n,h);if(b)return this._toFoundBracket(s,b)}g=m}if(s&&g&&n!==h){const d=k.BracketsUtils.findPrevBracketInRange(s.reversedRegex,l,u,n,h);if(d)return this._toFoundBracket(s,d)}}return null}findNextBracket(c){const i=this.textModel.validatePosition(c),S=this.textModel.getLineCount();let s=null,l=null;for(let r=i.lineNumber;r<=S;r++){const p=this.textModel.getLineTokens(r),u=p.getCount(),a=this.textModel.getLineContent(r);let n=0,h=0,g=0;if(r===i.lineNumber){n=p.findTokenIndexAtOffset(i.column-1),h=i.column-1,g=i.column-1;const m=p.getLanguageId(n);s!==m&&(s=m,l=this.languageConfigurationService.getLanguageConfiguration(s).brackets)}let d=!0;for(;n<u;n++){const m=p.getLanguageId(n);if(s!==m){if(l&&d&&h!==g){const E=k.BracketsUtils.findNextBracketInRange(l.forwardRegex,r,a,h,g);if(E)return this._toFoundBracket(l,E);d=!1}s=m,l=this.languageConfigurationService.getLanguageConfiguration(s).brackets}const b=!!l&&!(0,A.ignoreBracketsInToken)(p.getStandardTokenType(n));if(b)d||(h=p.getStartOffset(n)),g=p.getEndOffset(n);else if(l&&d&&h!==g){const E=k.BracketsUtils.findNextBracketInRange(l.forwardRegex,r,a,h,g);if(E)return this._toFoundBracket(l,E)}d=b}if(l&&d&&h!==g){const m=k.BracketsUtils.findNextBracketInRange(l.forwardRegex,r,a,h,g);if(m)return this._toFoundBracket(l,m)}}return null}findEnclosingBrackets(c,i){const S=w(i),s=this.textModel.validatePosition(c),l=this.textModel.getLineCount(),r=new Map;let p=[];const u=(d,m)=>{if(!r.has(d)){const b=[];for(let E=0,y=m?m.brackets.length:0;E<y;E++)b[E]=0;r.set(d,b)}p=r.get(d)};let a=0;const n=(d,m,b,E,y)=>{for(;;){if(S&&++a%100==0&&!S())return v.INSTANCE;const T=k.BracketsUtils.findNextBracketInRange(d.forwardRegex,m,b,E,y);if(!T)break;const R=b.substring(T.startColumn-1,T.endColumn-1).toLowerCase(),O=d.textIsBracket[R];if(O&&(O.isOpen(R)?p[O.index]++:O.isClose(R)&&p[O.index]--,p[O.index]===-1))return this._matchFoundBracket(T,O,!1,S);E=T.endColumn-1}return null};let h=null,g=null;for(let d=s.lineNumber;d<=l;d++){const m=this.textModel.getLineTokens(d),b=m.getCount(),E=this.textModel.getLineContent(d);let y=0,T=0,R=0;if(d===s.lineNumber){y=m.findTokenIndexAtOffset(s.column-1),T=s.column-1,R=s.column-1;const x=m.getLanguageId(y);h!==x&&(h=x,g=this.languageConfigurationService.getLanguageConfiguration(h).brackets,u(h,g))}let O=!0;for(;y<b;y++){const x=m.getLanguageId(y);if(h!==x){if(g&&O&&T!==R){const L=n(g,d,E,T,R);if(L)return C(L);O=!1}h=x,g=this.languageConfigurationService.getLanguageConfiguration(h).brackets,u(h,g)}const F=!!g&&!(0,A.ignoreBracketsInToken)(m.getStandardTokenType(y));if(F)O||(T=m.getStartOffset(y)),R=m.getEndOffset(y);else if(g&&O&&T!==R){const L=n(g,d,E,T,R);if(L)return C(L)}O=F}if(g&&O&&T!==R){const x=n(g,d,E,T,R);if(x)return C(x)}}return null}_toFoundBracket(c,i){if(!i)return null;let S=this.textModel.getValueInRange(i);S=S.toLowerCase();const s=c.textIsBracket[S];return s?{range:i,open:s.open,close:s.close,isOpen:c.textIsOpenBracket[S]}:null}}e.BracketPairsTextModelPart=D;function I(o,c){return{object:o,dispose:()=>c?.dispose()}}function w(o){if(typeof o=="undefined")return()=>!0;{const c=Date.now();return()=>Date.now()-c<=o}}class v{constructor(){this._searchCanceledBrand=void 0}}v.INSTANCE=new v;function C(o){return o instanceof v?null:o}}),define(ne[1166],re([1,0,700,284,691,343,533]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fixBracketsInLine=void 0;function D(w,v){const C=new A.DenseKeyProvider,o=new t.LanguageAgnosticBracketTokens(C,r=>v.getLanguageConfiguration(r)),c=new k.TextBufferTokenizer(new I([w]),o),i=(0,_.parseDocument)(c,[],void 0,!0);let S="";const s=w.getLineContent();function l(r,p){if(r.kind===2)l(r.openingBracket,p),p=(0,f.lengthAdd)(p,r.openingBracket.length),r.child&&(l(r.child,p),p=(0,f.lengthAdd)(p,r.child.length)),r.closingBracket?(l(r.closingBracket,p),p=(0,f.lengthAdd)(p,r.closingBracket.length)):S+=o.getSingleLanguageBracketTokens(r.openingBracket.languageId).findClosingTokenText(r.openingBracket.bracketIds);else if(r.kind!==3){if(r.kind===0||r.kind===1)S+=s.substring((0,f.lengthGetColumnCountIfZeroLineCount)(p),(0,f.lengthGetColumnCountIfZeroLineCount)((0,f.lengthAdd)(p,r.length)));else if(r.kind===4)for(const u of r.children)l(u,p),p=(0,f.lengthAdd)(p,u.length)}}return l(i,f.lengthZero),S}e.fixBracketsInLine=D;class I{constructor(v){this.lines=v}getValue(){return this.lines.map(v=>v.getLineContent()).join(` `)}getLineCount(){return this.lines.length}getLineLength(v){return this.lines[v-1].getLineContent().length}getLineTokens(v){return this.lines[v-1]}}}),define(ne[1167],re([1,0,30,6,97,9,49,20,84,86,698]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMonacoBaseAPI=e.KeyMod=void 0;class C{static chord(i,S){return(0,_.KeyChord)(i,S)}}e.KeyMod=C,C.CtrlCmd=2048,C.Shift=1024,C.Alt=512,C.WinCtrl=256;function o(){return{editor:void 0,languages:void 0,CancellationTokenSource:t.CancellationTokenSource,Emitter:f.Emitter,KeyCode:v.KeyCode,KeyMod:C,Position:k.Position,Range:D.Range,Selection:I.Selection,SelectionDirection:v.SelectionDirection,MarkerSeverity:v.MarkerSeverity,MarkerTag:v.MarkerTag,Uri:A.URI,Token:w.Token}}e.createMonacoBaseAPI=o}),define(ne[1168],re([1,0,380,14,9,49,20,1144,1160,283,689,1153,1167,13,151,697]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.EditorSimpleWorker=e.MirrorModel=void 0;class s extends I.MirrorTextModel{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(u){return this._lines[u-1]}getWordAtPosition(u,a){const n=(0,w.getWordAtText)(u.column,(0,w.ensureValidWordDefinition)(a),this._lines[u.lineNumber-1],0);return n?new k.Range(u.lineNumber,n.startColumn,u.lineNumber,n.endColumn):null}getWordUntilPosition(u,a){const n=this.getWordAtPosition(u,a);return n?{word:this._lines[u.lineNumber-1].substring(n.startColumn-1,u.column-1),startColumn:n.startColumn,endColumn:u.column}:{word:"",startColumn:u.column,endColumn:u.column}}words(u){const a=this._lines,n=this._wordenize.bind(this);let h=0,g="",d=0,m=[];return{*[Symbol.iterator](){for(;;)if(d<m.length){const b=g.substring(m[d].start,m[d].end);d+=1,yield b}else if(h<a.length)g=a[h],m=n(g,u),d=0,h+=1;else break}}}getLineWords(u,a){const n=this._lines[u-1],h=this._wordenize(n,a),g=[];for(const d of h)g.push({word:n.substring(d.start,d.end),startColumn:d.start+1,endColumn:d.end+1});return g}_wordenize(u,a){const n=[];let h;for(a.lastIndex=0;(h=a.exec(u))&&h[0].length!==0;)n.push({start:h.index,end:h.index+h[0].length});return n}getValueInRange(u){if(u=this._validateRange(u),u.startLineNumber===u.endLineNumber)return this._lines[u.startLineNumber-1].substring(u.startColumn-1,u.endColumn-1);const a=this._eol,n=u.startLineNumber-1,h=u.endLineNumber-1,g=[];g.push(this._lines[n].substring(u.startColumn-1));for(let d=n+1;d<h;d++)g.push(this._lines[d]);return g.push(this._lines[h].substring(0,u.endColumn-1)),g.join(a)}offsetAt(u){return u=this._validatePosition(u),this._ensureLineStarts(),this._lineStarts.getPrefixSum(u.lineNumber-2)+(u.column-1)}positionAt(u){u=Math.floor(u),u=Math.max(0,u),this._ensureLineStarts();const a=this._lineStarts.getIndexOf(u),n=this._lines[a.index].length;return{lineNumber:1+a.index,column:1+Math.min(a.remainder,n)}}_validateRange(u){const a=this._validatePosition({lineNumber:u.startLineNumber,column:u.startColumn}),n=this._validatePosition({lineNumber:u.endLineNumber,column:u.endColumn});return a.lineNumber!==u.startLineNumber||a.column!==u.startColumn||n.lineNumber!==u.endLineNumber||n.column!==u.endColumn?{startLineNumber:a.lineNumber,startColumn:a.column,endLineNumber:n.lineNumber,endColumn:n.column}:u}_validatePosition(u){if(!A.Position.isIPosition(u))throw new Error("bad position");let{lineNumber:a,column:n}=u,h=!1;if(a<1)a=1,n=1,h=!0;else if(a>this._lines.length)a=this._lines.length,n=this._lines[a-1].length+1,h=!0;else{const g=this._lines[a-1].length+1;n<1?(n=1,h=!0):n>g&&(n=g,h=!0)}return h?{lineNumber:a,column:n}:u}}e.MirrorModel=s;class l{constructor(u,a){this._host=u,this._models=Object.create(null),this._foreignModuleFactory=a,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(u){return this._models[u]}_getModels(){const u=[];return Object.keys(this._models).forEach(a=>u.push(this._models[a])),u}acceptNewModel(u){this._models[u.url]=new s(_.URI.parse(u.url),u.lines,u.EOL,u.versionId)}acceptModelChanged(u,a){if(!this._models[u])return;this._models[u].onEvents(a)}acceptRemovedModel(u){!this._models[u]||delete this._models[u]}async computeUnicodeHighlights(u,a,n){const h=this._getModel(u);return h?S.UnicodeTextModelHighlighter.computeUnicodeHighlights(h,a,n):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async computeDiff(u,a,n,h){const g=this._getModel(u),d=this._getModel(a);if(!g||!d)return null;const m=g.getLinesContent(),b=d.getLinesContent(),y=new D.DiffComputer(m,b,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0,maxComputationTime:h}).computeDiff(),T=y.changes.length>0?!1:this._modelsAreIdentical(g,d);return{quitEarly:y.quitEarly,identical:T,changes:y.changes}}_modelsAreIdentical(u,a){const n=u.getLineCount(),h=a.getLineCount();if(n!==h)return!1;for(let g=1;g<=n;g++){const d=u.getLineContent(g),m=a.getLineContent(g);if(d!==m)return!1}return!0}async computeDirtyDiff(u,a,n){const h=this._getModel(u),g=this._getModel(a);if(!h||!g)return null;const d=h.getLinesContent(),m=g.getLinesContent();return new D.DiffComputer(d,m,{shouldComputeCharChanges:!1,shouldPostProcessCharChanges:!1,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0,maxComputationTime:1e3}).computeDiff().changes}async computeMoreMinimalEdits(u,a){const n=this._getModel(u);if(!n)return a;const h=[];let g;a=a.slice(0).sort((d,m)=>{if(d.range&&m.range)return k.Range.compareRangesUsingStarts(d.range,m.range);const b=d.range?0:1,E=m.range?0:1;return b-E});for(let{range:d,text:m,eol:b}of a){if(typeof b=="number"&&(g=b),k.Range.isEmpty(d)&&!m)continue;const E=n.getValueInRange(d);if(m=m.replace(/\r\n|\n|\r/g,n.eol),E===m)continue;if(Math.max(m.length,E.length)>l._diffLimit){h.push({range:d,text:m});continue}const y=(0,t.stringDiff)(E,m,!1),T=n.offsetAt(k.Range.lift(d).getStartPosition());for(const R of y){const O=n.positionAt(T+R.originalStart),x=n.positionAt(T+R.originalStart+R.originalLength),F={text:m.substr(R.modifiedStart,R.modifiedLength),range:{startLineNumber:O.lineNumber,startColumn:O.column,endLineNumber:x.lineNumber,endColumn:x.column}};n.getValueInRange(F.range)!==F.text&&h.push(F)}}return typeof g=="number"&&h.push({eol:g,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),h}async computeLinks(u){const a=this._getModel(u);return a?(0,v.computeLinks)(a):null}async textualSuggest(u,a,n,h){const g=new i.StopWatch(!0),d=new RegExp(n,h),m=new Set;e:for(let b of u){const E=this._getModel(b);if(!!E){for(let y of E.words(d))if(!(y===a||!isNaN(Number(y)))&&(m.add(y),m.size>l._suggestionsLimit))break e}}return{words:Array.from(m),duration:g.elapsed()}}async computeWordRanges(u,a,n,h){const g=this._getModel(u);if(!g)return Object.create(null);const d=new RegExp(n,h),m=Object.create(null);for(let b=a.startLineNumber;b<a.endLineNumber;b++){const E=g.getLineWords(b,d);for(const y of E){if(!isNaN(Number(y.word)))continue;let T=m[y.word];T||(T=[],m[y.word]=T),T.push({startLineNumber:b,startColumn:y.startColumn,endLineNumber:b,endColumn:y.endColumn})}}return m}async navigateValueSet(u,a,n,h,g){const d=this._getModel(u);if(!d)return null;const m=new RegExp(h,g);a.startColumn===a.endColumn&&(a={startLineNumber:a.startLineNumber,startColumn:a.startColumn,endLineNumber:a.endLineNumber,endColumn:a.endColumn+1});const b=d.getValueInRange(a),E=d.getWordAtPosition({lineNumber:a.startLineNumber,column:a.startColumn},m);if(!E)return null;const y=d.getValueInRange(E);return C.BasicInplaceReplace.INSTANCE.navigateValueSet(a,b,E,y,n)}loadForeignModule(u,a,n){const h=(m,b)=>this._host.fhr(m,b),d={host:c.createProxyObject(n,h),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(d,a),Promise.resolve(c.getAllMethodNames(this._foreignModule))):new Promise((m,b)=>{Q([u],E=>{this._foreignModule=E.create(d,a),m(c.getAllMethodNames(this._foreignModule))},b)})}fmr(u,a){if(!this._foreignModule||typeof this._foreignModule[u]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+u));try{return Promise.resolve(this._foreignModule[u].apply(this._foreignModule,a))}catch(n){return Promise.reject(n)}}}e.EditorSimpleWorker=l,l._diffLimit=1e5,l._suggestionsLimit=1e4;function r(p){return new l(p,null)}e.create=r,typeof importScripts=="function"&&(f.globals.monaco=(0,o.createMonacoBaseAPI)())}),define(ne[285],re([1,0,86]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineTokens=void 0;class f{constructor(k,D,I){this._lineTokensBrand=void 0,this._tokens=k,this._tokensCount=this._tokens.length>>>1,this._text=D,this._languageIdCodec=I}static createEmpty(k,D){const I=f.defaultTokenMetadata,w=new Uint32Array(2);return w[0]=k.length,w[1]=I,new f(w,k,D)}equals(k){return k instanceof f?this.slicedEquals(k,0,this._tokensCount):!1}slicedEquals(k,D,I){if(this._text!==k._text||this._tokensCount!==k._tokensCount)return!1;const w=D<<1,v=w+(I<<1);for(let C=w;C<v;C++)if(this._tokens[C]!==k._tokens[C])return!1;return!0}getLineContent(){return this._text}getCount(){return this._tokensCount}getStartOffset(k){return k>0?this._tokens[k-1<<1]:0}getMetadata(k){return this._tokens[(k<<1)+1]}getLanguageId(k){const D=this._tokens[(k<<1)+1],I=t.TokenMetadata.getLanguageId(D);return this._languageIdCodec.decodeLanguageId(I)}getStandardTokenType(k){const D=this._tokens[(k<<1)+1];return t.TokenMetadata.getTokenType(D)}getForeground(k){const D=this._tokens[(k<<1)+1];return t.TokenMetadata.getForeground(D)}getClassName(k){const D=this._tokens[(k<<1)+1];return t.TokenMetadata.getClassNameFromMetadata(D)}getInlineStyle(k,D){const I=this._tokens[(k<<1)+1];return t.TokenMetadata.getInlineStyleFromMetadata(I,D)}getPresentation(k){const D=this._tokens[(k<<1)+1];return t.TokenMetadata.getPresentationFromMetadata(D)}getEndOffset(k){return this._tokens[k<<1]}findTokenIndexAtOffset(k){return f.findIndexInTokensArray(this._tokens,k)}inflate(){return this}sliceAndInflate(k,D,I){return new _(this,k,D,I)}static convertToEndOffset(k,D){const w=(k.length>>>1)-1;for(let v=0;v<w;v++)k[v<<1]=k[v+1<<1];k[w<<1]=D}static findIndexInTokensArray(k,D){if(k.length<=2)return 0;let I=0,w=(k.length>>>1)-1;for(;I<w;){const v=I+Math.floor((w-I)/2),C=k[v<<1];if(C===D)return v+1;C<D?I=v+1:C>D&&(w=v)}return I}withInserted(k){if(k.length===0)return this;let D=0,I=0,w="";const v=new Array;let C=0;for(;;){const o=D<this._tokensCount?this._tokens[D<<1]:-1,c=I<k.length?k[I]:null;if(o!==-1&&(c===null||o<=c.offset)){w+=this._text.substring(C,o);const i=this._tokens[(D<<1)+1];v.push(w.length,i),D++,C=o}else if(c){if(c.offset>C){w+=this._text.substring(C,c.offset);const i=this._tokens[(D<<1)+1];v.push(w.length,i),C=c.offset}w+=c.text,v.push(w.length,c.tokenMetadata),I++}else break}return new f(new Uint32Array(v),w,this._languageIdCodec)}}e.LineTokens=f,f.defaultTokenMetadata=(0<<10|1<<14|2<<23)>>>0;class _{constructor(k,D,I,w){this._source=k,this._startOffset=D,this._endOffset=I,this._deltaOffset=w,this._firstTokenIndex=k.findTokenIndexAtOffset(D),this._tokensCount=0;for(let v=this._firstTokenIndex,C=k.getCount();v<C&&!(k.getStartOffset(v)>=I);v++)this._tokensCount++}getMetadata(k){return this._source.getMetadata(this._firstTokenIndex+k)}getLanguageId(k){return this._source.getLanguageId(this._firstTokenIndex+k)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(k){return k instanceof _?this._startOffset===k._startOffset&&this._endOffset===k._endOffset&&this._deltaOffset===k._deltaOffset&&this._source.slicedEquals(k._source,this._firstTokenIndex,this._tokensCount):!1}getCount(){return this._tokensCount}getForeground(k){return this._source.getForeground(this._firstTokenIndex+k)}getEndOffset(k){const D=this._source.getEndOffset(this._firstTokenIndex+k);return Math.min(this._endOffset,D)-this._startOffset+this._deltaOffset}getClassName(k){return this._source.getClassName(this._firstTokenIndex+k)}getInlineStyle(k,D){return this._source.getInlineStyle(this._firstTokenIndex+k,D)}getPresentation(k){return this._source.getPresentation(this._firstTokenIndex+k)}findTokenIndexAtOffset(k){return this._source.findTokenIndexAtOffset(k+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}}),define(ne[308],re([1,0,29,285,86,532]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e._tokenizeToString=e.tokenizeLineToHTML=e.tokenizeToString=e.tokenizeToStringSync=void 0;const k={getInitialState:()=>A.NullState,tokenizeEncoded:(C,o,c)=>(0,A.nullTokenizeEncoded)(0,c)};function D(C,o,c){return v(o,C.languageIdCodec,_.TokenizationRegistry.get(c)||k)}e.tokenizeToStringSync=D;async function I(C,o,c){if(!c)return v(o,C.languageIdCodec,k);const i=await _.TokenizationRegistry.getOrCreate(c);return v(o,C.languageIdCodec,i||k)}e.tokenizeToString=I;function w(C,o,c,i,S,s,l){let r="<div>",p=i,u=0,a=!0;for(let n=0,h=o.getCount();n<h;n++){const g=o.getEndOffset(n);if(g<=i)continue;let d="";for(;p<g&&p<S;p++){const m=C.charCodeAt(p);switch(m){case 9:{let b=s-(p+u)%s;for(u+=b-1;b>0;)l&&a?(d+=" ",a=!1):(d+=" ",a=!0),b--;break}case 60:d+="<",a=!1;break;case 62:d+=">",a=!1;break;case 38:d+="&",a=!1;break;case 0:d+="�",a=!1;break;case 65279:case 8232:case 8233:case 133:d+="\uFFFD",a=!1;break;case 13:d+="​",a=!1;break;case 32:l&&a?(d+=" ",a=!1):(d+=" ",a=!0);break;default:d+=String.fromCharCode(m),a=!1}}if(r+=`<span style="${o.getInlineStyle(n,c)}">${d}</span>`,g>S||p>=S)break}return r+="</div>",r}e.tokenizeLineToHTML=w;function v(C,o,c){let i='<div class="monaco-tokenized-source">';const S=t.splitLines(C);let s=c.getInitialState();for(let l=0,r=S.length;l<r;l++){const p=S[l];l>0&&(i+="<br/>");const u=c.tokenizeEncoded(p,!0,s);f.LineTokens.convertToEndOffset(u.tokens,p.length);const n=new f.LineTokens(u.tokens,p,o).inflate();let h=0;for(let g=0,d=n.getCount();g<d;g++){const m=n.getClassName(g),b=n.getEndOffset(g);i+=`<span class="${m}">${t.escape(p.substring(h,b))}</span>`,h=b}s=u.endState}return i+="</div>",i}e._tokenizeToString=v}),define(ne[701],re([1,0,285]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toUint32Array=e.ContiguousTokensEditing=e.EMPTY_LINE_TOKENS=void 0,e.EMPTY_LINE_TOKENS=new Uint32Array(0).buffer;class f{static deleteBeginning(k,D){return k===null||k===e.EMPTY_LINE_TOKENS?k:f.delete(k,0,D)}static deleteEnding(k,D){if(k===null||k===e.EMPTY_LINE_TOKENS)return k;const I=_(k),w=I[I.length-2];return f.delete(k,D,w)}static delete(k,D,I){if(k===null||k===e.EMPTY_LINE_TOKENS||D===I)return k;const w=_(k),v=w.length>>>1;if(D===0&&w[w.length-2]===I)return e.EMPTY_LINE_TOKENS;const C=t.LineTokens.findIndexInTokensArray(w,D),o=C>0?w[C-1<<1]:0,c=w[C<<1];if(I<c){const r=I-D;for(let p=C;p<v;p++)w[p<<1]-=r;return k}let i,S;o!==D?(w[C<<1]=D,i=C+1<<1,S=D):(i=C<<1,S=o);const s=I-D;for(let r=C+1;r<v;r++){const p=w[r<<1]-s;p>S&&(w[i++]=p,w[i++]=w[(r<<1)+1],S=p)}if(i===w.length)return k;const l=new Uint32Array(i);return l.set(w.subarray(0,i),0),l.buffer}static append(k,D){if(D===e.EMPTY_LINE_TOKENS)return k;if(k===e.EMPTY_LINE_TOKENS)return D;if(k===null)return k;if(D===null)return null;const I=_(k),w=_(D),v=w.length>>>1,C=new Uint32Array(I.length+w.length);C.set(I,0);let o=I.length;const c=I[I.length-2];for(let i=0;i<v;i++)C[o++]=w[i<<1]+c,C[o++]=w[(i<<1)+1];return C.buffer}static insert(k,D,I){if(k===null||k===e.EMPTY_LINE_TOKENS)return k;const w=_(k),v=w.length>>>1;let C=t.LineTokens.findIndexInTokensArray(w,D);C>0&&w[C-1<<1]===D&&C--;for(let o=C;o<v;o++)w[o<<1]+=I;return k}}e.ContiguousTokensEditing=f;function _(A){return A instanceof Uint32Array?A:new Uint32Array(A)}e.toUint32Array=_}),define(ne[1169],re([1,0,15,60,49,340,701]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContiguousMultilineTokens=void 0;class D{constructor(w,v){this._startLineNumber=w,this._tokens=v}static deserialize(w,v,C){const o=new Uint32Array(w.buffer),c=(0,f.readUInt32BE)(w,v);v+=4;const i=(0,f.readUInt32BE)(w,v);v+=4;const S=[];for(let s=0;s<i;s++){const l=(0,f.readUInt32BE)(w,v);v+=4,S.push(o.subarray(v/4,v/4+l/4)),v+=l}return C.push(new D(c,S)),v}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._startLineNumber+this._tokens.length-1}getLineTokens(w){return this._tokens[w-this._startLineNumber]}appendLineTokens(w){this._tokens.push(w)}serializeSize(){let w=0;w+=4,w+=4;for(let v=0;v<this._tokens.length;v++){const C=this._tokens[v];if(!(C instanceof Uint32Array))throw new Error("Not supported!");w+=4,w+=C.byteLength}return w}serialize(w,v){(0,f.writeUInt32BE)(w,this._startLineNumber,v),v+=4,(0,f.writeUInt32BE)(w,this._tokens.length,v),v+=4;for(let C=0;C<this._tokens.length;C++){const o=this._tokens[C];if(!(o instanceof Uint32Array))throw new Error("Not supported!");(0,f.writeUInt32BE)(w,o.byteLength,v),v+=4,w.set(new Uint8Array(o.buffer),v),v+=o.byteLength}return v}applyEdit(w,v){const[C,o]=(0,A.countEOL)(v);this._acceptDeleteRange(w),this._acceptInsertText(new _.Position(w.startLineNumber,w.startColumn),C,o)}_acceptDeleteRange(w){if(w.startLineNumber===w.endLineNumber&&w.startColumn===w.endColumn)return;const v=w.startLineNumber-this._startLineNumber,C=w.endLineNumber-this._startLineNumber;if(C<0){const o=C-v;this._startLineNumber-=o;return}if(!(v>=this._tokens.length)){if(v<0&&C>=this._tokens.length){this._startLineNumber=0,this._tokens=[];return}if(v===C){this._tokens[v]=k.ContiguousTokensEditing.delete(this._tokens[v],w.startColumn-1,w.endColumn-1);return}if(v>=0)if(this._tokens[v]=k.ContiguousTokensEditing.deleteEnding(this._tokens[v],w.startColumn-1),C<this._tokens.length){const o=k.ContiguousTokensEditing.deleteBeginning(this._tokens[C],w.endColumn-1);this._tokens[v]=k.ContiguousTokensEditing.append(this._tokens[v],o),this._tokens.splice(v+1,C-v)}else this._tokens[v]=k.ContiguousTokensEditing.append(this._tokens[v],null),this._tokens=this._tokens.slice(0,v+1);else{const o=-v;this._startLineNumber-=o,this._tokens[C]=k.ContiguousTokensEditing.deleteBeginning(this._tokens[C],w.endColumn-1),this._tokens=this._tokens.slice(C)}}}_acceptInsertText(w,v,C){if(v===0&&C===0)return;const o=w.lineNumber-this._startLineNumber;if(o<0){this._startLineNumber+=v;return}if(!(o>=this._tokens.length)){if(v===0){this._tokens[o]=k.ContiguousTokensEditing.insert(this._tokens[o],w.column-1,C);return}this._tokens[o]=k.ContiguousTokensEditing.deleteEnding(this._tokens[o],w.column-1),this._tokens[o]=k.ContiguousTokensEditing.insert(this._tokens[o],w.column-1,C),this._insertLines(w.lineNumber,v)}}_insertLines(w,v){if(v===0)return;const C=[];for(let o=0;o<v;o++)C[o]=null;this._tokens=t.arrayInsert(this._tokens,w,C)}}e.ContiguousMultilineTokens=D}),define(ne[702],re([1,0,60,1169]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContiguousMultilineTokensBuilder=void 0;class _{constructor(){this._tokens=[]}static deserialize(k){let D=0;const I=(0,t.readUInt32BE)(k,D);D+=4;const w=[];for(let v=0;v<I;v++)D=f.ContiguousMultilineTokens.deserialize(k,D,w);return w}add(k,D){if(this._tokens.length>0){const I=this._tokens[this._tokens.length-1];if(I.endLineNumber+1===k){I.appendLineTokens(D);return}}this._tokens.push(new f.ContiguousMultilineTokens(k,[D]))}finalize(){return this._tokens}serialize(){const k=this._serializeSize(),D=new Uint8Array(k);return this._serialize(D),D}_serializeSize(){let k=0;k+=4;for(let D=0;D<this._tokens.length;D++)k+=this._tokens[D].serializeSize();return k}_serialize(k){let D=0;(0,t.writeUInt32BE)(k,this._tokens.length,D),D+=4;for(let I=0;I<this._tokens.length;I++)D=this._tokens[I].serialize(k,D)}}e.ContiguousMultilineTokensBuilder=_}),define(ne[1170],re([1,0,15,22,285,86,532,2,151,340,702,11,14]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextModelTokenization=e.TokenizationStateStore=void 0;var c;(function(p){p[p.CHEAP_TOKENIZATION_LENGTH_LIMIT=2048]="CHEAP_TOKENIZATION_LENGTH_LIMIT"})(c||(c={}));class i{constructor(u){this._default=u,this._store=[]}get(u){return u<this._store.length?this._store[u]:this._default}set(u,a){for(;u>=this._store.length;)this._store[this._store.length]=this._default;this._store[u]=a}delete(u,a){a===0||u>=this._store.length||this._store.splice(u,a)}insert(u,a){if(a===0||u>=this._store.length)return;const n=[];for(let h=0;h<a;h++)n[h]=this._default;this._store=t.arrayInsert(this._store,u,n)}}class S{constructor(u,a){this.tokenizationSupport=u,this.initialState=a,this._lineBeginState=new i(null),this._lineNeedsTokenization=new i(!0),this._firstLineNeedsTokenization=0,this._lineBeginState.set(0,this.initialState)}get invalidLineStartIndex(){return this._firstLineNeedsTokenization}markMustBeTokenized(u){this._lineNeedsTokenization.set(u,!0),this._firstLineNeedsTokenization=Math.min(this._firstLineNeedsTokenization,u)}getBeginState(u){return this._lineBeginState.get(u)}setEndState(u,a,n){if(this._lineNeedsTokenization.set(a,!1),this._firstLineNeedsTokenization=a+1,a===u-1)return;const h=this._lineBeginState.get(a+1);if(h===null||!n.equals(h)){this._lineBeginState.set(a+1,n),this.markMustBeTokenized(a+1);return}let g=a+1;for(;g<u&&!this._lineNeedsTokenization.get(g);)g++;this._firstLineNeedsTokenization=g}applyEdits(u,a){this.markMustBeTokenized(u.startLineNumber-1),this._lineBeginState.delete(u.startLineNumber,u.endLineNumber-u.startLineNumber),this._lineNeedsTokenization.delete(u.startLineNumber,u.endLineNumber-u.startLineNumber),this._lineBeginState.insert(u.startLineNumber,a),this._lineNeedsTokenization.insert(u.startLineNumber,a)}}e.TokenizationStateStore=S;class s extends D.Disposable{constructor(u,a){super();this._textModel=u,this._languageIdCodec=a,this._isScheduled=!1,this._isDisposed=!1,this._tokenizationStateStore=null,this._register(A.TokenizationRegistry.onDidChange(n=>{const h=this._textModel.getLanguageId();n.changedLanguages.indexOf(h)!==-1&&(this._resetTokenizationState(),this._textModel.clearTokens())})),this._resetTokenizationState()}dispose(){this._isDisposed=!0,super.dispose()}handleDidChangeContent(u){if(u.isFlush){this._resetTokenizationState();return}if(this._tokenizationStateStore)for(let a=0,n=u.changes.length;a<n;a++){const h=u.changes[a],[g]=(0,w.countEOL)(h.text);this._tokenizationStateStore.applyEdits(h.range,g)}this._beginBackgroundTokenization()}handleDidChangeAttached(){this._beginBackgroundTokenization()}handleDidChangeLanguage(u){this._resetTokenizationState(),this._textModel.clearTokens()}_resetTokenizationState(){const[u,a]=l(this._textModel);u&&a?this._tokenizationStateStore=new S(u,a):this._tokenizationStateStore=null,this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._isScheduled||!this._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._isScheduled=!0,(0,C.runWhenIdle)(u=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(u)}))}_backgroundTokenizeWithDeadline(u){const a=Date.now()+u.timeRemaining(),n=()=>{this._isDisposed||!this._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._backgroundTokenizeForAtLeast1ms(),Date.now()<a?(0,o.setTimeout0)(n):this._beginBackgroundTokenization())};n()}_backgroundTokenizeForAtLeast1ms(){const u=this._textModel.getLineCount(),a=new v.ContiguousMultilineTokensBuilder,n=I.StopWatch.create(!1);do if(n.elapsed()>1||this._tokenizeOneInvalidLine(a)>=u)break;while(this._hasLinesToTokenize());this._textModel.setTokens(a.finalize(),this._isTokenizationComplete())}tokenizeViewport(u,a){const n=new v.ContiguousMultilineTokensBuilder;this._tokenizeViewport(n,u,a),this._textModel.setTokens(n.finalize(),this._isTokenizationComplete())}reset(){this._resetTokenizationState(),this._textModel.clearTokens()}forceTokenization(u){const a=new v.ContiguousMultilineTokensBuilder;this._updateTokensUntilLine(a,u),this._textModel.setTokens(a.finalize(),this._isTokenizationComplete())}getTokenTypeIfInsertingCharacter(u,a){if(!this._tokenizationStateStore)return 0;this.forceTokenization(u.lineNumber);const n=this._tokenizationStateStore.getBeginState(u.lineNumber-1);if(!n)return 0;const h=this._textModel.getLanguageId(),g=this._textModel.getLineContent(u.lineNumber),d=g.substring(0,u.column-1)+a+g.substring(u.column-1),m=r(this._languageIdCodec,h,this._tokenizationStateStore.tokenizationSupport,d,!0,n),b=new _.LineTokens(m.tokens,d,this._languageIdCodec);if(b.getCount()===0)return 0;const E=b.findTokenIndexAtOffset(u.column-1);return b.getStandardTokenType(E)}tokenizeLineWithEdit(u,a,n){const h=u.lineNumber,g=u.column;if(!this._tokenizationStateStore)return null;this.forceTokenization(h);const d=this._tokenizationStateStore.getBeginState(h-1);if(!d)return null;const m=this._textModel.getLineContent(h),b=m.substring(0,g-1)+n+m.substring(g-1+a),E=this._textModel.getLanguageIdAtPosition(h,0),y=r(this._languageIdCodec,E,this._tokenizationStateStore.tokenizationSupport,b,!0,d);return new _.LineTokens(y.tokens,b,this._languageIdCodec)}isCheapToTokenize(u){if(!this._tokenizationStateStore)return!0;const a=this._tokenizationStateStore.invalidLineStartIndex+1;return u>a?!1:u<a||this._textModel.getLineLength(u)<2048}_hasLinesToTokenize(){return this._tokenizationStateStore?this._tokenizationStateStore.invalidLineStartIndex<this._textModel.getLineCount():!1}_isTokenizationComplete(){return this._tokenizationStateStore?this._tokenizationStateStore.invalidLineStartIndex>=this._textModel.getLineCount():!1}_tokenizeOneInvalidLine(u){if(!this._tokenizationStateStore||!this._hasLinesToTokenize())return this._textModel.getLineCount()+1;const a=this._tokenizationStateStore.invalidLineStartIndex+1;return this._updateTokensUntilLine(u,a),a}_updateTokensUntilLine(u,a){if(!this._tokenizationStateStore)return;const n=this._textModel.getLanguageId(),h=this._textModel.getLineCount(),g=a-1;for(let d=this._tokenizationStateStore.invalidLineStartIndex;d<=g;d++){const m=this._textModel.getLineContent(d+1),b=this._tokenizationStateStore.getBeginState(d),E=r(this._languageIdCodec,n,this._tokenizationStateStore.tokenizationSupport,m,!0,b);u.add(d+1,E.tokens),this._tokenizationStateStore.setEndState(h,d,E.endState),d=this._tokenizationStateStore.invalidLineStartIndex-1}}_tokenizeViewport(u,a,n){if(!this._tokenizationStateStore||n<=this._tokenizationStateStore.invalidLineStartIndex)return;if(a<=this._tokenizationStateStore.invalidLineStartIndex){this._updateTokensUntilLine(u,n);return}let h=this._textModel.getLineFirstNonWhitespaceColumn(a);const g=[];let d=null;for(let E=a-1;h>1&&E>=1;E--){const y=this._textModel.getLineFirstNonWhitespaceColumn(E);if(y!==0&&y<h){if(d=this._tokenizationStateStore.getBeginState(E-1),d)break;g.push(this._textModel.getLineContent(E)),h=y}}d||(d=this._tokenizationStateStore.initialState);const m=this._textModel.getLanguageId();let b=d;for(let E=g.length-1;E>=0;E--)b=r(this._languageIdCodec,m,this._tokenizationStateStore.tokenizationSupport,g[E],!1,b).endState;for(let E=a;E<=n;E++){const y=this._textModel.getLineContent(E),T=r(this._languageIdCodec,m,this._tokenizationStateStore.tokenizationSupport,y,!0,b);u.add(E,T.tokens),this._tokenizationStateStore.markMustBeTokenized(E-1),b=T.endState}}}e.TextModelTokenization=s;function l(p){if(p.isTooLargeForTokenization())return[null,null];const u=A.TokenizationRegistry.get(p.getLanguageId());if(!u)return[null,null];let a;try{a=u.getInitialState()}catch(n){return(0,f.onUnexpectedError)(n),[null,null]}return[u,a]}function r(p,u,a,n,h,g){let d=null;if(a)try{d=a.tokenizeEncoded(n,h,g.clone())}catch(m){(0,f.onUnexpectedError)(m)}return d||(d=(0,k.nullTokenizeEncoded)(p.encodeLanguageId(u),g)),_.LineTokens.convertToEndOffset(d.tokens,n.length),d}}),define(ne[1171],re([1,0,15,49,701,285,86]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContiguousTokensStore=void 0;class D{constructor(v){this._lineTokens=[],this._len=0,this._languageIdCodec=v}flush(){this._lineTokens=[],this._len=0}getTokens(v,C,o){let c=null;if(C<this._len&&(c=this._lineTokens[C]),c!==null&&c!==_.EMPTY_LINE_TOKENS)return new A.LineTokens((0,_.toUint32Array)(c),o,this._languageIdCodec);const i=new Uint32Array(2);return i[0]=o.length,i[1]=I(this._languageIdCodec.encodeLanguageId(v)),new A.LineTokens(i,o,this._languageIdCodec)}static _massageTokens(v,C,o){const c=o?(0,_.toUint32Array)(o):null;if(C===0){let i=!1;if(c&&c.length>1&&(i=k.TokenMetadata.getLanguageId(c[1])!==v),!i)return _.EMPTY_LINE_TOKENS}if(!c||c.length===0){const i=new Uint32Array(2);return i[0]=C,i[1]=I(v),i.buffer}return c[c.length-2]=C,c.byteOffset===0&&c.byteLength===c.buffer.byteLength?c.buffer:c}_ensureLine(v){for(;v>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(v,C){C!==0&&(v+C>this._len&&(C=this._len-v),this._lineTokens.splice(v,C),this._len-=C)}_insertLines(v,C){if(C===0)return;const o=[];for(let c=0;c<C;c++)o[c]=null;this._lineTokens=t.arrayInsert(this._lineTokens,v,o),this._len+=C}setTokens(v,C,o,c,i){const S=D._massageTokens(this._languageIdCodec.encodeLanguageId(v),o,c);this._ensureLine(C);const s=this._lineTokens[C];return this._lineTokens[C]=S,i?!D._equals(s,S):!1}static _equals(v,C){if(!v||!C)return!v&&!C;const o=(0,_.toUint32Array)(v),c=(0,_.toUint32Array)(C);if(o.length!==c.length)return!1;for(let i=0,S=o.length;i<S;i++)if(o[i]!==c[i])return!1;return!0}acceptEdit(v,C,o){this._acceptDeleteRange(v),this._acceptInsertText(new f.Position(v.startLineNumber,v.startColumn),C,o)}_acceptDeleteRange(v){const C=v.startLineNumber-1;if(C>=this._len)return;if(v.startLineNumber===v.endLineNumber){if(v.startColumn===v.endColumn)return;this._lineTokens[C]=_.ContiguousTokensEditing.delete(this._lineTokens[C],v.startColumn-1,v.endColumn-1);return}this._lineTokens[C]=_.ContiguousTokensEditing.deleteEnding(this._lineTokens[C],v.startColumn-1);const o=v.endLineNumber-1;let c=null;o<this._len&&(c=_.ContiguousTokensEditing.deleteBeginning(this._lineTokens[o],v.endColumn-1)),this._lineTokens[C]=_.ContiguousTokensEditing.append(this._lineTokens[C],c),this._deleteLines(v.startLineNumber,v.endLineNumber-v.startLineNumber)}_acceptInsertText(v,C,o){if(C===0&&o===0)return;const c=v.lineNumber-1;if(!(c>=this._len)){if(C===0){this._lineTokens[c]=_.ContiguousTokensEditing.insert(this._lineTokens[c],v.column-1,o);return}this._lineTokens[c]=_.ContiguousTokensEditing.deleteEnding(this._lineTokens[c],v.column-1),this._lineTokens[c]=_.ContiguousTokensEditing.insert(this._lineTokens[c],v.column-1,o),this._insertLines(v.lineNumber,C)}}}e.ContiguousTokensStore=D;function I(w){return(w<<0|0<<8|0<<10|1<<14|2<<23)>>>0}}),define(ne[1172],re([1,0,49,20,340]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SparseLineTokens=e.SparseMultilineTokens=void 0;class A{constructor(w,v){this._startLineNumber=w,this._tokens=v,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}static create(w,v){return new A(w,new k(v))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(w){return this._startLineNumber<=w&&w<=this._endLineNumber?this._tokens.getLineTokens(w-this._startLineNumber):null}getRange(){const w=this._tokens.getRange();return w&&new f.Range(this._startLineNumber+w.startLineNumber,w.startColumn,this._startLineNumber+w.endLineNumber,w.endColumn)}removeTokens(w){const v=w.startLineNumber-this._startLineNumber,C=w.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(v,w.startColumn-1,C,w.endColumn-1),this._updateEndLineNumber()}split(w){const v=w.startLineNumber-this._startLineNumber,C=w.endLineNumber-this._startLineNumber,[o,c,i]=this._tokens.split(v,w.startColumn-1,C,w.endColumn-1);return[new A(this._startLineNumber,o),new A(this._startLineNumber+i,c)]}applyEdit(w,v){const[C,o,c]=(0,_.countEOL)(v);this.acceptEdit(w,C,o,c,v.length>0?v.charCodeAt(0):0)}acceptEdit(w,v,C,o,c){this._acceptDeleteRange(w),this._acceptInsertText(new t.Position(w.startLineNumber,w.startColumn),v,C,o,c),this._updateEndLineNumber()}_acceptDeleteRange(w){if(w.startLineNumber===w.endLineNumber&&w.startColumn===w.endColumn)return;const v=w.startLineNumber-this._startLineNumber,C=w.endLineNumber-this._startLineNumber;if(C<0){const c=C-v;this._startLineNumber-=c;return}const o=this._tokens.getMaxDeltaLine();if(!(v>=o+1)){if(v<0&&C>=o+1){this._startLineNumber=0,this._tokens.clear();return}if(v<0){const c=-v;this._startLineNumber-=c,this._tokens.acceptDeleteRange(w.startColumn-1,0,0,C,w.endColumn-1)}else this._tokens.acceptDeleteRange(0,v,w.startColumn-1,C,w.endColumn-1)}}_acceptInsertText(w,v,C,o,c){if(v===0&&C===0)return;const i=w.lineNumber-this._startLineNumber;if(i<0){this._startLineNumber+=v;return}const S=this._tokens.getMaxDeltaLine();i>=S+1||this._tokens.acceptInsertText(i,w.column-1,v,C,o,c)}}e.SparseMultilineTokens=A;class k{constructor(w){this._tokens=w,this._tokenCount=w.length/4}toString(w){const v=[];for(let C=0;C<this._tokenCount;C++)v.push(`(${this._getDeltaLine(C)+w},${this._getStartCharacter(C)}-${this._getEndCharacter(C)})`);return`[${v.join(",")}]`}getMaxDeltaLine(){const w=this._getTokenCount();return w===0?-1:this._getDeltaLine(w-1)}getRange(){const w=this._getTokenCount();if(w===0)return null;const v=this._getStartCharacter(0),C=this._getDeltaLine(w-1),o=this._getEndCharacter(w-1);return new f.Range(0,v+1,C,o+1)}_getTokenCount(){return this._tokenCount}_getDeltaLine(w){return this._tokens[4*w]}_getStartCharacter(w){return this._tokens[4*w+1]}_getEndCharacter(w){return this._tokens[4*w+2]}isEmpty(){return this._getTokenCount()===0}getLineTokens(w){let v=0,C=this._getTokenCount()-1;for(;v<C;){const o=v+Math.floor((C-v)/2),c=this._getDeltaLine(o);if(c<w)v=o+1;else if(c>w)C=o-1;else{let i=o;for(;i>v&&this._getDeltaLine(i-1)===w;)i--;let S=o;for(;S<C&&this._getDeltaLine(S+1)===w;)S++;return new D(this._tokens.subarray(4*i,4*S+4))}}return this._getDeltaLine(v)===w?new D(this._tokens.subarray(4*v,4*v+4)):null}clear(){this._tokenCount=0}removeTokens(w,v,C,o){const c=this._tokens,i=this._tokenCount;let S=0,s=!1,l=0;for(let r=0;r<i;r++){const p=4*r,u=c[p],a=c[p+1],n=c[p+2],h=c[p+3];if((u>w||u===w&&n>=v)&&(u<C||u===C&&a<=o))s=!0;else{if(S===0&&(l=u),s){const g=4*S;c[g]=u-l,c[g+1]=a,c[g+2]=n,c[g+3]=h}S++}}return this._tokenCount=S,l}split(w,v,C,o){const c=this._tokens,i=this._tokenCount,S=[],s=[];let l=S,r=0,p=0;for(let u=0;u<i;u++){const a=4*u,n=c[a],h=c[a+1],g=c[a+2],d=c[a+3];if(n>w||n===w&&g>=v){if(n<C||n===C&&h<=o)continue;l!==s&&(l=s,r=0,p=n)}l[r++]=n-p,l[r++]=h,l[r++]=g,l[r++]=d}return[new k(new Uint32Array(S)),new k(new Uint32Array(s)),p]}acceptDeleteRange(w,v,C,o,c){const i=this._tokens,S=this._tokenCount,s=o-v;let l=0,r=!1;for(let p=0;p<S;p++){const u=4*p;let a=i[u],n=i[u+1],h=i[u+2];const g=i[u+3];if(a<v||a===v&&h<=C){l++;continue}else if(a===v&&n<C)a===o&&h>c?h-=c-C:h=C;else if(a===v&&n===C)if(a===o&&h>c)h-=c-C;else{r=!0;continue}else if(a<o||a===o&&n<c)if(a===o&&h>c)a===v?(n=C,h=n+(h-c)):(n=0,h=n+(h-c));else{r=!0;continue}else if(a>o){if(s===0&&!r){l=S;break}a-=s}else if(a===o&&n>=c)w&&a===0&&(n+=w,h+=w),a-=s,n-=c-C,h-=c-C;else throw new Error("Not possible!");const d=4*l;i[d]=a,i[d+1]=n,i[d+2]=h,i[d+3]=g,l++}this._tokenCount=l}acceptInsertText(w,v,C,o,c,i){const S=C===0&&o===1&&(i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122),s=this._tokens,l=this._tokenCount;for(let r=0;r<l;r++){const p=4*r;let u=s[p],a=s[p+1],n=s[p+2];if(!(u<w||u===w&&n<v)){if(u===w&&n===v)if(S)n+=1;else continue;else if(u===w&&a<v&&v<n)C===0?n+=o:n=v;else{if(u===w&&a===v&&S)continue;if(u===w)if(u+=C,C===0)a+=o,n+=o;else{const h=n-a;a=c+(a-v),n=a+h}else u+=C}s[p]=u,s[p+1]=a,s[p+2]=n}}}}class D{constructor(w){this._tokens=w}getCount(){return this._tokens.length/4}getStartCharacter(w){return this._tokens[4*w+1]}getEndCharacter(w){return this._tokens[4*w+2]}getMetadata(w){return this._tokens[4*w+3]}}e.SparseLineTokens=D}),define(ne[1173],re([1,0,15,285]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SparseTokensStore=void 0;class _{constructor(k){this._pieces=[],this._isComplete=!1,this._languageIdCodec=k}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return this._pieces.length===0}set(k,D){this._pieces=k||[],this._isComplete=D}setPartial(k,D){let I=k;if(D.length>0){const v=D[0].getRange(),C=D[D.length-1].getRange();if(!v||!C)return k;I=k.plusRange(v).plusRange(C)}let w=null;for(let v=0,C=this._pieces.length;v<C;v++){const o=this._pieces[v];if(o.endLineNumber<I.startLineNumber)continue;if(o.startLineNumber>I.endLineNumber){w=w||{index:v};break}if(o.removeTokens(I),o.isEmpty()){this._pieces.splice(v,1),v--,C--;continue}if(o.endLineNumber<I.startLineNumber)continue;if(o.startLineNumber>I.endLineNumber){w=w||{index:v};continue}const[c,i]=o.split(I);if(c.isEmpty()){w=w||{index:v};continue}i.isEmpty()||(this._pieces.splice(v,1,c,i),v++,C++,w=w||{index:v})}return w=w||{index:this._pieces.length},D.length>0&&(this._pieces=t.arrayInsert(this._pieces,w.index,D)),I}isComplete(){return this._isComplete}addSparseTokens(k,D){const I=this._pieces;if(I.length===0)return D;const w=_._findFirstPieceWithLine(I,k),v=I[w].getLineTokens(k);if(!v)return D;const C=D.getCount(),o=v.getCount();let c=0;const i=[];let S=0,s=0;const l=(r,p)=>{r!==s&&(s=r,i[S++]=r,i[S++]=p)};for(let r=0;r<o;r++){const p=v.getStartCharacter(r),u=v.getEndCharacter(r),a=v.getMetadata(r),n=((a&1?1024:0)|(a&2?2048:0)|(a&4?4096:0)|(a&8?8192:0)|(a&16?8372224:0)|(a&32?4286578688:0))>>>0,h=~n>>>0;for(;c<C&&D.getEndOffset(c)<=p;)l(D.getEndOffset(c),D.getMetadata(c)),c++;for(c<C&&D.getStartOffset(c)<p&&l(p,D.getMetadata(c));c<C&&D.getEndOffset(c)<u;)l(D.getEndOffset(c),D.getMetadata(c)&h|a&n),c++;if(c<C)l(u,D.getMetadata(c)&h|a&n),D.getEndOffset(c)===u&&c++;else{const g=Math.min(Math.max(0,c-1),C-1);l(u,D.getMetadata(g)&h|a&n)}}for(;c<C;)l(D.getEndOffset(c),D.getMetadata(c)),c++;return new f.LineTokens(new Uint32Array(i),D.getLineContent(),this._languageIdCodec)}static _findFirstPieceWithLine(k,D){let I=0,w=k.length-1;for(;I<w;){let v=I+Math.floor((w-I)/2);if(k[v].endLineNumber<D)I=v+1;else if(k[v].startLineNumber>D)w=v-1;else{for(;v>I&&k[v-1].startLineNumber<=D&&D<=k[v-1].endLineNumber;)v--;return v}}return I}acceptEdit(k,D,I,w,v){for(const C of this._pieces)C.acceptEdit(k,D,I,w,v)}}e.SparseTokensStore=_}),define(ne[388],re([1,0,2]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewEventHandler=void 0;class f extends t.Disposable{constructor(){super();this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(A){return!1}onCompositionEnd(A){return!1}onConfigurationChanged(A){return!1}onCursorStateChanged(A){return!1}onDecorationsChanged(A){return!1}onFlushed(A){return!1}onFocusChanged(A){return!1}onLanguageConfigurationChanged(A){return!1}onLineMappingChanged(A){return!1}onLinesChanged(A){return!1}onLinesDeleted(A){return!1}onLinesInserted(A){return!1}onRevealRangeRequest(A){return!1}onScrollChanged(A){return!1}onThemeChanged(A){return!1}onTokensChanged(A){return!1}onTokensColorsChanged(A){return!1}onZonesChanged(A){return!1}handleEvents(A){let k=!1;for(let D=0,I=A.length;D<I;D++){const w=A[D];switch(w.type){case 0:this.onCompositionStart(w)&&(k=!0);break;case 1:this.onCompositionEnd(w)&&(k=!0);break;case 2:this.onConfigurationChanged(w)&&(k=!0);break;case 3:this.onCursorStateChanged(w)&&(k=!0);break;case 4:this.onDecorationsChanged(w)&&(k=!0);break;case 5:this.onFlushed(w)&&(k=!0);break;case 6:this.onFocusChanged(w)&&(k=!0);break;case 7:this.onLanguageConfigurationChanged(w)&&(k=!0);break;case 8:this.onLineMappingChanged(w)&&(k=!0);break;case 9:this.onLinesChanged(w)&&(k=!0);break;case 10:this.onLinesDeleted(w)&&(k=!0);break;case 11:this.onLinesInserted(w)&&(k=!0);break;case 12:this.onRevealRangeRequest(w)&&(k=!0);break;case 13:this.onScrollChanged(w)&&(k=!0);break;case 15:this.onTokensChanged(w)&&(k=!0);break;case 14:this.onThemeChanged(w)&&(k=!0);break;case 16:this.onTokensColorsChanged(w)&&(k=!0);break;case 17:this.onZonesChanged(w)&&(k=!0);break;default:console.info("View received unknown event: "),console.info(w)}}k&&(this._shouldRender=!0)}}e.ViewEventHandler=f}),define(ne[346],re([1,0,388]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicViewOverlay=void 0;class f extends t.ViewEventHandler{}e.DynamicViewOverlay=f}),define(ne[182],re([1,0,388]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PartFingerprints=e.PartFingerprint=e.ViewPart=void 0;class f extends t.ViewEventHandler{constructor(D){super();this._context=D,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}}e.ViewPart=f;var _;(function(k){k[k.None=0]="None",k[k.ContentWidgets=1]="ContentWidgets",k[k.OverflowingContentWidgets=2]="OverflowingContentWidgets",k[k.OverflowGuard=3]="OverflowGuard",k[k.OverlayWidgets=4]="OverlayWidgets",k[k.ScrollableElement=5]="ScrollableElement",k[k.TextArea=6]="TextArea",k[k.ViewLines=7]="ViewLines",k[k.Minimap=8]="Minimap"})(_=e.PartFingerprint||(e.PartFingerprint={}));class A{static write(D,I){D.setAttribute("data-mprt",String(I))}static read(D){const I=D.getAttribute("data-mprt");return I===null?0:parseInt(I,10)}static collect(D,I){const w=[];let v=0;for(;D&&D!==document.body&&D!==I;)D.nodeType===D.ELEMENT_NODE&&(w[v++]=this.read(D)),D=D.parentElement;const C=new Uint8Array(v);for(let o=0;o<v;o++)C[o]=w[v-o-1];return C}}e.PartFingerprints=A}),define(ne[1174],re([1,0,10,128,182]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewContentWidgets=void 0;class A{constructor(v,C){this._coordinateBrand=void 0,this.top=v,this.left=C}}class k extends _.ViewPart{constructor(v,C){super(v);this._viewDomNode=C,this._widgets={},this.domNode=(0,f.createFastDomNode)(document.createElement("div")),_.PartFingerprints.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=(0,f.createFastDomNode)(document.createElement("div")),_.PartFingerprints.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(v){const C=Object.keys(this._widgets);for(const o of C)this._widgets[o].onConfigurationChanged(v);return!0}onDecorationsChanged(v){return!0}onFlushed(v){return!0}onLineMappingChanged(v){const C=Object.keys(this._widgets);for(const o of C)this._widgets[o].onLineMappingChanged(v);return!0}onLinesChanged(v){return!0}onLinesDeleted(v){return!0}onLinesInserted(v){return!0}onScrollChanged(v){return!0}onZonesChanged(v){return!0}addWidget(v){const C=new D(this._context,this._viewDomNode,v);this._widgets[C.id]=C,C.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(C.domNode):this.domNode.appendChild(C.domNode),this.setShouldRender()}setWidgetPosition(v,C,o,c){this._widgets[v.getId()].setPosition(C,o,c),this.setShouldRender()}removeWidget(v){const C=v.getId();if(this._widgets.hasOwnProperty(C)){const o=this._widgets[C];delete this._widgets[C];const c=o.domNode.domNode;c.parentNode.removeChild(c),c.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(v){return this._widgets.hasOwnProperty(v)?this._widgets[v].suppressMouseDown:!1}onBeforeRender(v){const C=Object.keys(this._widgets);for(const o of C)this._widgets[o].onBeforeRender(v)}prepareRender(v){const C=Object.keys(this._widgets);for(const o of C)this._widgets[o].prepareRender(v)}render(v){const C=Object.keys(this._widgets);for(const o of C)this._widgets[o].render(v)}}e.ViewContentWidgets=k;class D{constructor(v,C,o){this._context=v,this._viewDomNode=C,this._actual=o,this.domNode=(0,f.createFastDomNode)(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const c=this._context.configuration.options,i=c.get(131);this._fixedOverflowWidgets=c.get(36),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this._lineHeight=c.get(59),this._range=null,this._viewRange=null,this._affinity=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(v){const C=this._context.configuration.options;if(this._lineHeight=C.get(59),v.hasChanged(131)){const o=C.get(131);this._contentLeft=o.contentLeft,this._contentWidth=o.contentWidth,this._maxWidth=this._getMaxWidth()}}onLineMappingChanged(v){this._setPosition(this._range,this._affinity)}_setPosition(v,C){if(this._range=v,this._viewRange=null,this._affinity=C,this._range){const o=this._context.viewModel.model.validateRange(this._range);(this._context.viewModel.coordinatesConverter.modelPositionIsVisible(o.getStartPosition())||this._context.viewModel.coordinatesConverter.modelPositionIsVisible(o.getEndPosition()))&&(this._viewRange=this._context.viewModel.coordinatesConverter.convertModelRangeToViewRange(o,this._affinity??void 0))}}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.offsetWidth||document.body.offsetWidth:this._contentWidth}setPosition(v,C,o){this._setPosition(v,o),this._preference=C,this._viewRange&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(v,C,o,c,i){const S=v.top,s=S,l=C.top+this._lineHeight,r=i.viewportHeight-l,p=S-c,u=s>=c,a=l,n=r>=c;let h=v.left,g=C.left;return h+o>i.scrollLeft+i.viewportWidth&&(h=i.scrollLeft+i.viewportWidth-o),g+o>i.scrollLeft+i.viewportWidth&&(g=i.scrollLeft+i.viewportWidth-o),h<i.scrollLeft&&(h=i.scrollLeft),g<i.scrollLeft&&(g=i.scrollLeft),{fitsAbove:u,aboveTop:p,aboveLeft:h,fitsBelow:n,belowTop:a,belowLeft:g}}_layoutHorizontalSegmentInPage(v,C,o,c){const i=Math.max(0,C.left-c),S=Math.min(C.left+C.width+c,v.width);let s=C.left+o-t.StandardWindow.scrollX;if(s+c>S){const l=s-(S-c);s-=l,o-=l}if(s<i){const l=s-i;s-=l,o-=l}return[o,s]}_layoutBoxInPage(v,C,o,c,i){const S=v.top-c,s=C.top+this._lineHeight,l=t.getDomNodePagePosition(this._viewDomNode.domNode),r=l.top+S-t.StandardWindow.scrollY,p=l.top+s-t.StandardWindow.scrollY,u=t.getClientArea(document.body),[a,n]=this._layoutHorizontalSegmentInPage(u,l,v.left-i.scrollLeft+this._contentLeft,o),[h,g]=this._layoutHorizontalSegmentInPage(u,l,C.left-i.scrollLeft+this._contentLeft,o),d=22,m=22,b=r>=d,E=p+c<=u.height-m;return this._fixedOverflowWidgets?{fitsAbove:b,aboveTop:Math.max(r,d),aboveLeft:n,fitsBelow:E,belowTop:p,belowLeft:g}:{fitsAbove:b,aboveTop:S,aboveLeft:a,fitsBelow:E,belowTop:s,belowLeft:h}}_prepareRenderWidgetAtExactPositionOverflowing(v){return new A(v.top,v.left+this._contentLeft)}_getTopAndBottomLeft(v){if(!this._viewRange)return[null,null];const C=v.linesVisibleRangesForRange(this._viewRange,!1);if(!C||C.length===0)return[null,null];let o=C[0],c=C[0];for(const u of C)u.lineNumber<o.lineNumber&&(o=u),u.lineNumber>c.lineNumber&&(c=u);let i=1073741824;for(const u of o.ranges)u.left<i&&(i=u.left);let S=1073741824;for(const u of c.ranges)u.left<S&&(S=u.left);const s=v.getVerticalOffsetForLineNumber(o.lineNumber)-v.scrollTop,l=new A(s,i),r=v.getVerticalOffsetForLineNumber(c.lineNumber)-v.scrollTop,p=new A(r,S);return[l,p]}_prepareRenderWidget(v){if(!this._preference||this._preference.length===0)return null;const[C,o]=this._getTopAndBottomLeft(v);if(!C||!o)return null;if(this._cachedDomNodeOffsetWidth===-1||this._cachedDomNodeOffsetHeight===-1){let i=null;if(typeof this._actual.beforeRender=="function"&&(i=I(this._actual.beforeRender,this._actual)),i)this._cachedDomNodeOffsetWidth=i.width,this._cachedDomNodeOffsetHeight=i.height;else{const s=this.domNode.domNode.getBoundingClientRect();this._cachedDomNodeOffsetWidth=Math.round(s.width),this._cachedDomNodeOffsetHeight=Math.round(s.height)}}let c;this.allowEditorOverflow?c=this._layoutBoxInPage(C,o,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,v):c=this._layoutBoxInViewport(C,o,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,v);for(let i=1;i<=2;i++)for(const S of this._preference)if(S===1){if(!c)return null;if(i===2||c.fitsAbove)return{coordinate:new A(c.aboveTop,c.aboveLeft),position:1}}else if(S===2){if(!c)return null;if(i===2||c.fitsBelow)return{coordinate:new A(c.belowTop,c.belowLeft),position:2}}else return this.allowEditorOverflow?{coordinate:this._prepareRenderWidgetAtExactPositionOverflowing(C),position:0}:{coordinate:C,position:0};return null}onBeforeRender(v){!this._viewRange||!this._preference||this._viewRange.endLineNumber<v.startLineNumber||this._viewRange.startLineNumber>v.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(v){this._renderData=this._prepareRenderWidget(v)}render(v){if(!this._renderData){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&I(this._actual.afterRender,this._actual,null);return}this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+v.scrollTop-v.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),typeof this._actual.afterRender=="function"&&I(this._actual.afterRender,this._actual,this._renderData.position)}}function I(w,v,...C){try{return w.call(v,...C)}catch{return null}}}),define(ne[1175],re([1,0,346,20,384,1006]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationsOverlay=void 0;class A extends t.DynamicViewOverlay{constructor(D){super();this._context=D;const I=this._context.configuration.options;this._lineHeight=I.get(59),this._typicalHalfwidthCharacterWidth=I.get(44).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(D){const I=this._context.configuration.options;return this._lineHeight=I.get(59),this._typicalHalfwidthCharacterWidth=I.get(44).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(D){return!0}onFlushed(D){return!0}onLinesChanged(D){return!0}onLinesDeleted(D){return!0}onLinesInserted(D){return!0}onScrollChanged(D){return D.scrollTopChanged||D.scrollWidthChanged}onZonesChanged(D){return!0}prepareRender(D){const I=D.getDecorationsInViewport();let w=[],v=0;for(let i=0,S=I.length;i<S;i++){const s=I[i];s.options.className&&(w[v++]=s)}w=w.sort((i,S)=>{if(i.options.zIndex<S.options.zIndex)return-1;if(i.options.zIndex>S.options.zIndex)return 1;const s=i.options.className,l=S.options.className;return s<l?-1:s>l?1:f.Range.compareRangesUsingStarts(i.range,S.range)});const C=D.visibleRange.startLineNumber,o=D.visibleRange.endLineNumber,c=[];for(let i=C;i<=o;i++){const S=i-C;c[S]=""}this._renderWholeLineDecorations(D,w,c),this._renderNormalDecorations(D,w,c),this._renderResult=c}_renderWholeLineDecorations(D,I,w){const v=String(this._lineHeight),C=D.visibleRange.startLineNumber,o=D.visibleRange.endLineNumber;for(let c=0,i=I.length;c<i;c++){const S=I[c];if(!S.options.isWholeLine)continue;const s='<div class="cdr '+S.options.className+'" style="left:0;width:100%;height:'+v+'px;"></div>',l=Math.max(S.range.startLineNumber,C),r=Math.min(S.range.endLineNumber,o);for(let p=l;p<=r;p++){const u=p-C;w[u]+=s}}}_renderNormalDecorations(D,I,w){const v=String(this._lineHeight),C=D.visibleRange.startLineNumber;let o=null,c=!1,i=null;for(let S=0,s=I.length;S<s;S++){const l=I[S];if(l.options.isWholeLine)continue;const r=l.options.className,p=Boolean(l.options.showIfCollapsed);let u=l.range;if(p&&u.endColumn===1&&u.endLineNumber!==u.startLineNumber&&(u=new f.Range(u.startLineNumber,u.startColumn,u.endLineNumber-1,this._context.viewModel.getLineMaxColumn(u.endLineNumber-1))),o===r&&c===p&&f.Range.areIntersectingOrTouching(i,u)){i=f.Range.plusRange(i,u);continue}o!==null&&this._renderNormalDecoration(D,i,o,c,v,C,w),o=r,c=p,i=u}o!==null&&this._renderNormalDecoration(D,i,o,c,v,C,w)}_renderNormalDecoration(D,I,w,v,C,o,c){const i=D.linesVisibleRangesForRange(I,w==="findMatch");if(!!i)for(let S=0,s=i.length;S<s;S++){const l=i[S];if(l.outsideRenderedLine)continue;const r=l.lineNumber-o;if(v&&l.ranges.length===1){const p=l.ranges[0];if(p.width<this._typicalHalfwidthCharacterWidth){const u=Math.round(p.left+p.width/2),a=Math.max(0,Math.round(u-this._typicalHalfwidthCharacterWidth/2));l.ranges[0]=new _.HorizontalRange(a,this._typicalHalfwidthCharacterWidth)}}for(let p=0,u=l.ranges.length;p<u;p++){const a=l.ranges[p],n='<div class="cdr '+w+'" style="left:'+String(a.left)+"px;width:"+String(a.width)+"px;height:"+C+'px;"></div>';c[r]+=n}}}render(D,I){if(!this._renderResult)return"";const w=I-D;return w<0||w>=this._renderResult.length?"":this._renderResult[w]}}e.DecorationsOverlay=A}),define(ne[534],re([1,0,346,1007]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlyphMarginOverlay=e.DedupOverlay=e.DecorationToRender=void 0;class f{constructor(D,I,w){this._decorationToRenderBrand=void 0,this.startLineNumber=+D,this.endLineNumber=+I,this.className=String(w)}}e.DecorationToRender=f;class _ extends t.DynamicViewOverlay{_render(D,I,w){const v=[];for(let c=D;c<=I;c++){const i=c-D;v[i]=[]}if(w.length===0)return v;w.sort((c,i)=>c.className===i.className?c.startLineNumber===i.startLineNumber?c.endLineNumber-i.endLineNumber:c.startLineNumber-i.startLineNumber:c.className<i.className?-1:1);let C=null,o=0;for(let c=0,i=w.length;c<i;c++){const S=w[c],s=S.className;let l=Math.max(S.startLineNumber,D)-D;const r=Math.min(S.endLineNumber,I)-D;C===s?(l=Math.max(o+1,l),o=Math.max(o,r)):(C=s,o=r);for(let p=l;p<=o;p++)v[p].push(C)}return v}}e.DedupOverlay=_;class A extends _{constructor(D){super();this._context=D;const I=this._context.configuration.options,w=I.get(131);this._lineHeight=I.get(59),this._glyphMargin=I.get(50),this._glyphMarginLeft=w.glyphMarginLeft,this._glyphMarginWidth=w.glyphMarginWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(D){const I=this._context.configuration.options,w=I.get(131);return this._lineHeight=I.get(59),this._glyphMargin=I.get(50),this._glyphMarginLeft=w.glyphMarginLeft,this._glyphMarginWidth=w.glyphMarginWidth,!0}onDecorationsChanged(D){return!0}onFlushed(D){return!0}onLinesChanged(D){return!0}onLinesDeleted(D){return!0}onLinesInserted(D){return!0}onScrollChanged(D){return D.scrollTopChanged}onZonesChanged(D){return!0}_getDecorations(D){const I=D.getDecorationsInViewport(),w=[];let v=0;for(let C=0,o=I.length;C<o;C++){const c=I[C],i=c.options.glyphMarginClassName;i&&(w[v++]=new f(c.range.startLineNumber,c.range.endLineNumber,i))}return w}prepareRender(D){if(!this._glyphMargin){this._renderResult=null;return}const I=D.visibleRange.startLineNumber,w=D.visibleRange.endLineNumber,v=this._render(I,w,this._getDecorations(D)),C=this._lineHeight.toString(),o=this._glyphMarginLeft.toString(),c=this._glyphMarginWidth.toString(),i='" style="left:'+o+"px;width:"+c+"px;height:"+C+'px;"></div>',S=[];for(let s=I;s<=w;s++){const l=s-I,r=v[l];r.length===0?S[l]="":S[l]='<div class="cgmr codicon '+r.join(" ")+i}this._renderResult=S}render(D,I){if(!this._renderResult)return"";const w=I-D;return w<0||w>=this._renderResult.length?"":this._renderResult[w]}}e.GlyphMarginOverlay=A}),define(ne[1176],re([1,0,534,1011]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinesDecorationsOverlay=void 0;class f extends t.DedupOverlay{constructor(A){super();this._context=A;const D=this._context.configuration.options.get(131);this._decorationsLeft=D.decorationsLeft,this._decorationsWidth=D.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(A){const D=this._context.configuration.options.get(131);return this._decorationsLeft=D.decorationsLeft,this._decorationsWidth=D.decorationsWidth,!0}onDecorationsChanged(A){return!0}onFlushed(A){return!0}onLinesChanged(A){return!0}onLinesDeleted(A){return!0}onLinesInserted(A){return!0}onScrollChanged(A){return A.scrollTopChanged}onZonesChanged(A){return!0}_getDecorations(A){const k=A.getDecorationsInViewport(),D=[];let I=0;for(let w=0,v=k.length;w<v;w++){const C=k[w],o=C.options.linesDecorationsClassName;o&&(D[I++]=new t.DecorationToRender(C.range.startLineNumber,C.range.endLineNumber,o));const c=C.options.firstLineDecorationClassName;c&&(D[I++]=new t.DecorationToRender(C.range.startLineNumber,C.range.startLineNumber,c))}return D}prepareRender(A){const k=A.visibleRange.startLineNumber,D=A.visibleRange.endLineNumber,I=this._render(k,D,this._getDecorations(A)),w=this._decorationsLeft.toString(),v=this._decorationsWidth.toString(),C='" style="left:'+w+"px;width:"+v+'px;"></div>',o=[];for(let c=k;c<=D;c++){const i=c-k,S=I[i];let s="";for(let l=0,r=S.length;l<r;l++)s+='<div class="cldr '+S[l]+C;o[i]=s}this._renderResult=o}render(A,k){return this._renderResult?this._renderResult[k-A]:""}}e.LinesDecorationsOverlay=f}),define(ne[703],re([1,0,128,182]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Margin=void 0;class _ extends f.ViewPart{constructor(k){super(k);const D=this._context.configuration.options,I=D.get(131);this._canUseLayerHinting=!D.get(28),this._contentLeft=I.contentLeft,this._glyphMarginLeft=I.glyphMarginLeft,this._glyphMarginWidth=I.glyphMarginWidth,this._domNode=(0,t.createFastDomNode)(document.createElement("div")),this._domNode.setClassName(_.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=(0,t.createFastDomNode)(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(_.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(k){const D=this._context.configuration.options,I=D.get(131);return this._canUseLayerHinting=!D.get(28),this._contentLeft=I.contentLeft,this._glyphMarginLeft=I.glyphMarginLeft,this._glyphMarginWidth=I.glyphMarginWidth,!0}onScrollChanged(k){return super.onScrollChanged(k)||k.scrollTopChanged}prepareRender(k){}render(k){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const D=k.scrollTop-k.bigNumbersDelta;this._domNode.setTop(-D);const I=Math.min(k.scrollHeight,1e6);this._domNode.setHeight(I),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(I)}}e.Margin=_,_.CLASS_NAME="glyph-margin",_.OUTER_CLASS_NAME="margin"}),define(ne[1177],re([1,0,534,1012]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarginViewLineDecorationsOverlay=void 0;class f extends t.DedupOverlay{constructor(A){super();this._context=A,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(A){return!0}onDecorationsChanged(A){return!0}onFlushed(A){return!0}onLinesChanged(A){return!0}onLinesDeleted(A){return!0}onLinesInserted(A){return!0}onScrollChanged(A){return A.scrollTopChanged}onZonesChanged(A){return!0}_getDecorations(A){const k=A.getDecorationsInViewport(),D=[];let I=0;for(let w=0,v=k.length;w<v;w++){const C=k[w],o=C.options.marginClassName;o&&(D[I++]=new t.DecorationToRender(C.range.startLineNumber,C.range.endLineNumber,o))}return D}prepareRender(A){const k=A.visibleRange.startLineNumber,D=A.visibleRange.endLineNumber,I=this._render(k,D,this._getDecorations(A)),w=[];for(let v=k;v<=D;v++){const C=v-k,o=I[C];let c="";for(let i=0,S=o.length;i<S;i++)c+='<div class="cmdr '+o[i]+'" style=""></div>';w[C]=c}this._renderResult=w}render(A,k){return this._renderResult?this._renderResult[k-A]:""}}e.MarginViewLineDecorationsOverlay=f}),define(ne[1178],re([1,0,128,182,1014]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewOverlayWidgets=void 0;class _ extends f.ViewPart{constructor(k){super(k);const I=this._context.configuration.options.get(131);this._widgets={},this._verticalScrollbarWidth=I.verticalScrollbarWidth,this._minimapWidth=I.minimap.minimapWidth,this._horizontalScrollbarHeight=I.horizontalScrollbarHeight,this._editorHeight=I.height,this._editorWidth=I.width,this._domNode=(0,t.createFastDomNode)(document.createElement("div")),f.PartFingerprints.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(k){const I=this._context.configuration.options.get(131);return this._verticalScrollbarWidth=I.verticalScrollbarWidth,this._minimapWidth=I.minimap.minimapWidth,this._horizontalScrollbarHeight=I.horizontalScrollbarHeight,this._editorHeight=I.height,this._editorWidth=I.width,!0}addWidget(k){const D=(0,t.createFastDomNode)(k.getDomNode());this._widgets[k.getId()]={widget:k,preference:null,domNode:D},D.setPosition("absolute"),D.setAttribute("widgetId",k.getId()),this._domNode.appendChild(D),this.setShouldRender()}setWidgetPosition(k,D){const I=this._widgets[k.getId()];return I.preference===D?!1:(I.preference=D,this.setShouldRender(),!0)}removeWidget(k){const D=k.getId();if(this._widgets.hasOwnProperty(D)){const w=this._widgets[D].domNode.domNode;delete this._widgets[D],w.parentNode.removeChild(w),this.setShouldRender()}}_renderWidget(k){const D=k.domNode;if(k.preference===null){D.setTop("");return}if(k.preference===0)D.setTop(0),D.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(k.preference===1){const I=D.domNode.clientHeight;D.setTop(this._editorHeight-I-2*this._horizontalScrollbarHeight),D.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else k.preference===2&&(D.setTop(0),D.domNode.style.right="50%")}prepareRender(k){}render(k){this._domNode.setWidth(this._editorWidth);const D=Object.keys(this._widgets);for(let I=0,w=D.length;I<w;I++){const v=D[I];this._renderWidget(this._widgets[v])}}}e.ViewOverlayWidgets=_}),define(ne[1179],re([1,0,128,22,182,49]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewZones=void 0;const k=()=>{throw new Error("Invalid change accessor")};class D extends _.ViewPart{constructor(v){super(v);const C=this._context.configuration.options,o=C.get(131);this._lineHeight=C.get(59),this._contentWidth=o.contentWidth,this._contentLeft=o.contentLeft,this.domNode=(0,t.createFastDomNode)(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=(0,t.createFastDomNode)(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const v=this._context.viewLayout.getWhitespaces(),C=new Map;for(const c of v)C.set(c.id,c);let o=!1;return this._context.viewModel.changeWhitespace(c=>{const i=Object.keys(this._zones);for(let S=0,s=i.length;S<s;S++){const l=i[S],r=this._zones[l],p=this._computeWhitespaceProps(r.delegate);r.isInHiddenArea=p.isInHiddenArea;const u=C.get(l);u&&(u.afterLineNumber!==p.afterViewLineNumber||u.height!==p.heightInPx)&&(c.changeOneWhitespace(l,p.afterViewLineNumber,p.heightInPx),this._safeCallOnComputedHeight(r.delegate,p.heightInPx),o=!0)}}),o}onConfigurationChanged(v){const C=this._context.configuration.options,o=C.get(131);return this._lineHeight=C.get(59),this._contentWidth=o.contentWidth,this._contentLeft=o.contentLeft,v.hasChanged(59)&&this._recomputeWhitespacesProps(),!0}onLineMappingChanged(v){return this._recomputeWhitespacesProps()}onLinesDeleted(v){return!0}onScrollChanged(v){return v.scrollTopChanged||v.scrollWidthChanged}onZonesChanged(v){return!0}onLinesInserted(v){return!0}_getZoneOrdinal(v){return typeof v.afterColumn!="undefined"?v.afterColumn:1e4}_computeWhitespaceProps(v){if(v.afterLineNumber===0)return{isInHiddenArea:!1,afterViewLineNumber:0,heightInPx:this._heightInPixels(v),minWidthInPx:this._minWidthInPixels(v)};let C;if(typeof v.afterColumn!="undefined")C=this._context.viewModel.model.validatePosition({lineNumber:v.afterLineNumber,column:v.afterColumn});else{const S=this._context.viewModel.model.validatePosition({lineNumber:v.afterLineNumber,column:1}).lineNumber;C=new A.Position(S,this._context.viewModel.model.getLineMaxColumn(S))}let o;C.column===this._context.viewModel.model.getLineMaxColumn(C.lineNumber)?o=this._context.viewModel.model.validatePosition({lineNumber:C.lineNumber+1,column:1}):o=this._context.viewModel.model.validatePosition({lineNumber:C.lineNumber,column:C.column+1});const c=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(C,v.afterColumnAffinity),i=this._context.viewModel.coordinatesConverter.modelPositionIsVisible(o);return{isInHiddenArea:!i,afterViewLineNumber:c.lineNumber,heightInPx:i?this._heightInPixels(v):0,minWidthInPx:this._minWidthInPixels(v)}}changeViewZones(v){let C=!1;return this._context.viewModel.changeWhitespace(o=>{const c={addZone:i=>(C=!0,this._addZone(o,i)),removeZone:i=>{!i||(C=this._removeZone(o,i)||C)},layoutZone:i=>{!i||(C=this._layoutZone(o,i)||C)}};I(v,c),c.addZone=k,c.removeZone=k,c.layoutZone=k}),C}_addZone(v,C){const o=this._computeWhitespaceProps(C),i={whitespaceId:v.insertWhitespace(o.afterViewLineNumber,this._getZoneOrdinal(C),o.heightInPx,o.minWidthInPx),delegate:C,isInHiddenArea:o.isInHiddenArea,isVisible:!1,domNode:(0,t.createFastDomNode)(C.domNode),marginDomNode:C.marginDomNode?(0,t.createFastDomNode)(C.marginDomNode):null};return this._safeCallOnComputedHeight(i.delegate,o.heightInPx),i.domNode.setPosition("absolute"),i.domNode.domNode.style.width="100%",i.domNode.setDisplay("none"),i.domNode.setAttribute("monaco-view-zone",i.whitespaceId),this.domNode.appendChild(i.domNode),i.marginDomNode&&(i.marginDomNode.setPosition("absolute"),i.marginDomNode.domNode.style.width="100%",i.marginDomNode.setDisplay("none"),i.marginDomNode.setAttribute("monaco-view-zone",i.whitespaceId),this.marginDomNode.appendChild(i.marginDomNode)),this._zones[i.whitespaceId]=i,this.setShouldRender(),i.whitespaceId}_removeZone(v,C){if(this._zones.hasOwnProperty(C)){const o=this._zones[C];return delete this._zones[C],v.removeWhitespace(o.whitespaceId),o.domNode.removeAttribute("monaco-visible-view-zone"),o.domNode.removeAttribute("monaco-view-zone"),o.domNode.domNode.parentNode.removeChild(o.domNode.domNode),o.marginDomNode&&(o.marginDomNode.removeAttribute("monaco-visible-view-zone"),o.marginDomNode.removeAttribute("monaco-view-zone"),o.marginDomNode.domNode.parentNode.removeChild(o.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(v,C){if(this._zones.hasOwnProperty(C)){const o=this._zones[C],c=this._computeWhitespaceProps(o.delegate);return o.isInHiddenArea=c.isInHiddenArea,v.changeOneWhitespace(o.whitespaceId,c.afterViewLineNumber,c.heightInPx),this._safeCallOnComputedHeight(o.delegate,c.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(v){if(this._zones.hasOwnProperty(v)){const C=this._zones[v];return Boolean(C.delegate.suppressMouseDown)}return!1}_heightInPixels(v){return typeof v.heightInPx=="number"?v.heightInPx:typeof v.heightInLines=="number"?this._lineHeight*v.heightInLines:this._lineHeight}_minWidthInPixels(v){return typeof v.minWidthInPx=="number"?v.minWidthInPx:0}_safeCallOnComputedHeight(v,C){if(typeof v.onComputedHeight=="function")try{v.onComputedHeight(C)}catch(o){(0,f.onUnexpectedError)(o)}}_safeCallOnDomNodeTop(v,C){if(typeof v.onDomNodeTop=="function")try{v.onDomNodeTop(C)}catch(o){(0,f.onUnexpectedError)(o)}}prepareRender(v){}render(v){const C=v.viewportData.whitespaceViewportData,o={};let c=!1;for(const S of C)this._zones[S.id].isInHiddenArea||(o[S.id]=S,c=!0);const i=Object.keys(this._zones);for(let S=0,s=i.length;S<s;S++){const l=i[S],r=this._zones[l];let p=0,u=0,a="none";o.hasOwnProperty(l)?(p=o[l].verticalOffset-v.bigNumbersDelta,u=o[l].height,a="block",r.isVisible||(r.domNode.setAttribute("monaco-visible-view-zone","true"),r.isVisible=!0),this._safeCallOnDomNodeTop(r.delegate,v.getScrolledTopFromAbsoluteTop(o[l].verticalOffset))):(r.isVisible&&(r.domNode.removeAttribute("monaco-visible-view-zone"),r.isVisible=!1),this._safeCallOnDomNodeTop(r.delegate,v.getScrolledTopFromAbsoluteTop(-1e6))),r.domNode.setTop(p),r.domNode.setHeight(u),r.domNode.setDisplay(a),r.marginDomNode&&(r.marginDomNode.setTop(p),r.marginDomNode.setHeight(u),r.marginDomNode.setDisplay(a))}c&&(this.domNode.setWidth(Math.max(v.scrollWidth,this._contentWidth)),this.marginDomNode.setWidth(this._contentLeft))}}e.ViewZones=D;function I(w,v){try{return w(v)}catch(C){(0,f.onUnexpectedError)(C)}}}),define(ne[535],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewZonesChangedEvent=e.ViewTokensColorsChangedEvent=e.ViewTokensChangedEvent=e.ViewThemeChangedEvent=e.ViewScrollChangedEvent=e.ViewRevealRangeRequestEvent=e.VerticalRevealType=e.ViewLinesInsertedEvent=e.ViewLinesDeletedEvent=e.ViewLinesChangedEvent=e.ViewLineMappingChangedEvent=e.ViewLanguageConfigurationEvent=e.ViewFocusChangedEvent=e.ViewFlushedEvent=e.ViewDecorationsChangedEvent=e.ViewCursorStateChangedEvent=e.ViewConfigurationChangedEvent=e.ViewCompositionEndEvent=e.ViewCompositionStartEvent=e.ViewEventType=void 0;var t;(function(n){n[n.ViewCompositionStart=0]="ViewCompositionStart",n[n.ViewCompositionEnd=1]="ViewCompositionEnd",n[n.ViewConfigurationChanged=2]="ViewConfigurationChanged",n[n.ViewCursorStateChanged=3]="ViewCursorStateChanged",n[n.ViewDecorationsChanged=4]="ViewDecorationsChanged",n[n.ViewFlushed=5]="ViewFlushed",n[n.ViewFocusChanged=6]="ViewFocusChanged",n[n.ViewLanguageConfigurationChanged=7]="ViewLanguageConfigurationChanged",n[n.ViewLineMappingChanged=8]="ViewLineMappingChanged",n[n.ViewLinesChanged=9]="ViewLinesChanged",n[n.ViewLinesDeleted=10]="ViewLinesDeleted",n[n.ViewLinesInserted=11]="ViewLinesInserted",n[n.ViewRevealRangeRequest=12]="ViewRevealRangeRequest",n[n.ViewScrollChanged=13]="ViewScrollChanged",n[n.ViewThemeChanged=14]="ViewThemeChanged",n[n.ViewTokensChanged=15]="ViewTokensChanged",n[n.ViewTokensColorsChanged=16]="ViewTokensColorsChanged",n[n.ViewZonesChanged=17]="ViewZonesChanged"})(t=e.ViewEventType||(e.ViewEventType={}));class f{constructor(){this.type=0}}e.ViewCompositionStartEvent=f;class _{constructor(){this.type=1}}e.ViewCompositionEndEvent=_;class A{constructor(h){this.type=2,this._source=h}hasChanged(h){return this._source.hasChanged(h)}}e.ViewConfigurationChangedEvent=A;class k{constructor(h,g){this.type=3,this.selections=h,this.modelSelections=g}}e.ViewCursorStateChangedEvent=k;class D{constructor(h){this.type=4,h?(this.affectsMinimap=h.affectsMinimap,this.affectsOverviewRuler=h.affectsOverviewRuler):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0)}}e.ViewDecorationsChangedEvent=D;class I{constructor(){this.type=5}}e.ViewFlushedEvent=I;class w{constructor(h){this.type=6,this.isFocused=h}}e.ViewFocusChangedEvent=w;class v{constructor(){this.type=7}}e.ViewLanguageConfigurationEvent=v;class C{constructor(){this.type=8}}e.ViewLineMappingChangedEvent=C;class o{constructor(h,g){this.fromLineNumber=h,this.count=g,this.type=9}}e.ViewLinesChangedEvent=o;class c{constructor(h,g){this.type=10,this.fromLineNumber=h,this.toLineNumber=g}}e.ViewLinesDeletedEvent=c;class i{constructor(h,g){this.type=11,this.fromLineNumber=h,this.toLineNumber=g}}e.ViewLinesInsertedEvent=i;var S;(function(n){n[n.Simple=0]="Simple",n[n.Center=1]="Center",n[n.CenterIfOutsideViewport=2]="CenterIfOutsideViewport",n[n.Top=3]="Top",n[n.Bottom=4]="Bottom",n[n.NearTop=5]="NearTop",n[n.NearTopIfOutsideViewport=6]="NearTopIfOutsideViewport"})(S=e.VerticalRevealType||(e.VerticalRevealType={}));class s{constructor(h,g,d,m,b,E,y){this.source=h,this.minimalReveal=g,this.range=d,this.selections=m,this.verticalType=b,this.revealHorizontal=E,this.scrollType=y,this.type=12}}e.ViewRevealRangeRequestEvent=s;class l{constructor(h){this.type=13,this.scrollWidth=h.scrollWidth,this.scrollLeft=h.scrollLeft,this.scrollHeight=h.scrollHeight,this.scrollTop=h.scrollTop,this.scrollWidthChanged=h.scrollWidthChanged,this.scrollLeftChanged=h.scrollLeftChanged,this.scrollHeightChanged=h.scrollHeightChanged,this.scrollTopChanged=h.scrollTopChanged}}e.ViewScrollChangedEvent=l;class r{constructor(h){this.theme=h,this.type=14}}e.ViewThemeChangedEvent=r;class p{constructor(h){this.type=15,this.ranges=h}}e.ViewTokensChangedEvent=p;class u{constructor(){this.type=16}}e.ViewTokensColorsChangedEvent=u;class a{constructor(){this.type=17}}e.ViewZonesChangedEvent=a}),define(ne[459],re([1,0,29]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineDecorationsNormalizer=e.DecorationSegment=e.LineDecoration=void 0;class f{constructor(I,w,v,C){this.startColumn=I,this.endColumn=w,this.className=v,this.type=C,this._lineDecorationBrand=void 0}static _equals(I,w){return I.startColumn===w.startColumn&&I.endColumn===w.endColumn&&I.className===w.className&&I.type===w.type}static equalsArr(I,w){const v=I.length,C=w.length;if(v!==C)return!1;for(let o=0;o<v;o++)if(!f._equals(I[o],w[o]))return!1;return!0}static extractWrapped(I,w,v){if(I.length===0)return I;const C=w+1,o=v+1,c=v-w,i=[];let S=0;for(const s of I)s.endColumn<=C||s.startColumn>=o||(i[S++]=new f(Math.max(1,s.startColumn-C+1),Math.min(c+1,s.endColumn-C+1),s.className,s.type));return i}static filter(I,w,v,C){if(I.length===0)return[];const o=[];let c=0;for(let i=0,S=I.length;i<S;i++){const s=I[i],l=s.range;if(l.endLineNumber<w||l.startLineNumber>w||l.isEmpty()&&(s.type===0||s.type===3))continue;const r=l.startLineNumber===w?l.startColumn:v,p=l.endLineNumber===w?l.endColumn:C;o[c++]=new f(r,p,s.inlineClassName,s.type)}return o}static _typeCompare(I,w){const v=[2,0,1,3];return v[I]-v[w]}static compare(I,w){if(I.startColumn!==w.startColumn)return I.startColumn-w.startColumn;if(I.endColumn!==w.endColumn)return I.endColumn-w.endColumn;const v=f._typeCompare(I.type,w.type);return v!==0?v:I.className!==w.className?I.className<w.className?-1:1:0}}e.LineDecoration=f;class _{constructor(I,w,v,C){this.startOffset=I,this.endOffset=w,this.className=v,this.metadata=C}}e.DecorationSegment=_;class A{constructor(){this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}static _metadata(I){let w=0;for(let v=0,C=I.length;v<C;v++)w|=I[v];return w}consumeLowerThan(I,w,v){for(;this.count>0&&this.stopOffsets[0]<I;){let C=0;for(;C+1<this.count&&this.stopOffsets[C]===this.stopOffsets[C+1];)C++;v.push(new _(w,this.stopOffsets[C],this.classNames.join(" "),A._metadata(this.metadata))),w=this.stopOffsets[C]+1,this.stopOffsets.splice(0,C+1),this.classNames.splice(0,C+1),this.metadata.splice(0,C+1),this.count-=C+1}return this.count>0&&w<I&&(v.push(new _(w,I-1,this.classNames.join(" "),A._metadata(this.metadata))),w=I),w}insert(I,w,v){if(this.count===0||this.stopOffsets[this.count-1]<=I)this.stopOffsets.push(I),this.classNames.push(w),this.metadata.push(v);else for(let C=0;C<this.count;C++)if(this.stopOffsets[C]>=I){this.stopOffsets.splice(C,0,I),this.classNames.splice(C,0,w),this.metadata.splice(C,0,v);break}this.count++}}class k{static normalize(I,w){if(w.length===0)return[];const v=[],C=new A;let o=0;for(let c=0,i=w.length;c<i;c++){const S=w[c];let s=S.startColumn,l=S.endColumn;const r=S.className,p=S.type===1?2:S.type===2?4:0;if(s>1){const n=I.charCodeAt(s-2);t.isHighSurrogate(n)&&s--}if(l>1){const n=I.charCodeAt(l-2);t.isHighSurrogate(n)&&l--}const u=s-1,a=l-2;o=C.consumeLowerThan(u,o,v),C.count===0&&(o=u),C.insert(a,r,p)}return C.consumeLowerThan(1073741824,o,v),v}}e.LineDecorationsNormalizer=k}),define(ne[1180],re([1,0,29]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinesLayout=e.EditorWhitespace=void 0;class f{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(D){this._hasPending=!0,this._inserts.push(D)}change(D){this._hasPending=!0,this._changes.push(D)}remove(D){this._hasPending=!0,this._removes.push(D)}mustCommit(){return this._hasPending}commit(D){if(!this._hasPending)return;const I=this._inserts,w=this._changes,v=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],D._commitPendingChanges(I,w,v)}}class _{constructor(D,I,w,v,C){this.id=D,this.afterLineNumber=I,this.ordinal=w,this.height=v,this.minWidth=C,this.prefixSum=0}}e.EditorWhitespace=_;class A{constructor(D,I,w,v){this._instanceId=t.singleLetterHash(++A.INSTANCE_COUNT),this._pendingChanges=new f,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=D,this._lineHeight=I,this._paddingTop=w,this._paddingBottom=v}static findInsertionIndex(D,I,w){let v=0,C=D.length;for(;v<C;){const o=v+C>>>1;I===D[o].afterLineNumber?w<D[o].ordinal?C=o:v=o+1:I<D[o].afterLineNumber?C=o:v=o+1}return v}setLineHeight(D){this._checkPendingChanges(),this._lineHeight=D}setPadding(D,I){this._paddingTop=D,this._paddingBottom=I}onFlushed(D){this._checkPendingChanges(),this._lineCount=D}changeWhitespace(D){let I=!1;try{D({insertWhitespace:(v,C,o,c)=>{I=!0,v=v|0,C=C|0,o=o|0,c=c|0;const i=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new _(i,v,C,o,c)),i},changeOneWhitespace:(v,C,o)=>{I=!0,C=C|0,o=o|0,this._pendingChanges.change({id:v,newAfterLineNumber:C,newHeight:o})},removeWhitespace:v=>{I=!0,this._pendingChanges.remove({id:v})}})}finally{this._pendingChanges.commit(this)}return I}_commitPendingChanges(D,I,w){if((D.length>0||w.length>0)&&(this._minWidth=-1),D.length+I.length+w.length<=1){for(const i of D)this._insertWhitespace(i);for(const i of I)this._changeOneWhitespace(i.id,i.newAfterLineNumber,i.newHeight);for(const i of w){const S=this._findWhitespaceIndex(i.id);S!==-1&&this._removeWhitespace(S)}return}const v=new Set;for(const i of w)v.add(i.id);const C=new Map;for(const i of I)C.set(i.id,i);const o=i=>{const S=[];for(const s of i)if(!v.has(s.id)){if(C.has(s.id)){const l=C.get(s.id);s.afterLineNumber=l.newAfterLineNumber,s.height=l.newHeight}S.push(s)}return S},c=o(this._arr).concat(o(D));c.sort((i,S)=>i.afterLineNumber===S.afterLineNumber?i.ordinal-S.ordinal:i.afterLineNumber-S.afterLineNumber),this._arr=c,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(D){const I=A.findInsertionIndex(this._arr,D.afterLineNumber,D.ordinal);this._arr.splice(I,0,D),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,I-1)}_findWhitespaceIndex(D){const I=this._arr;for(let w=0,v=I.length;w<v;w++)if(I[w].id===D)return w;return-1}_changeOneWhitespace(D,I,w){const v=this._findWhitespaceIndex(D);if(v!==-1&&(this._arr[v].height!==w&&(this._arr[v].height=w,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,v-1)),this._arr[v].afterLineNumber!==I)){const C=this._arr[v];this._removeWhitespace(v),C.afterLineNumber=I,this._insertWhitespace(C)}}_removeWhitespace(D){this._arr.splice(D,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,D-1)}onLinesDeleted(D,I){this._checkPendingChanges(),D=D|0,I=I|0,this._lineCount-=I-D+1;for(let w=0,v=this._arr.length;w<v;w++){const C=this._arr[w].afterLineNumber;D<=C&&C<=I?this._arr[w].afterLineNumber=D-1:C>I&&(this._arr[w].afterLineNumber-=I-D+1)}}onLinesInserted(D,I){this._checkPendingChanges(),D=D|0,I=I|0,this._lineCount+=I-D+1;for(let w=0,v=this._arr.length;w<v;w++){const C=this._arr[w].afterLineNumber;D<=C&&(this._arr[w].afterLineNumber+=I-D+1)}}getWhitespacesTotalHeight(){return this._checkPendingChanges(),this._arr.length===0?0:this.getWhitespacesAccumulatedHeight(this._arr.length-1)}getWhitespacesAccumulatedHeight(D){this._checkPendingChanges(),D=D|0;let I=Math.max(0,this._prefixSumValidIndex+1);I===0&&(this._arr[0].prefixSum=this._arr[0].height,I++);for(let w=I;w<=D;w++)this._arr[w].prefixSum=this._arr[w-1].prefixSum+this._arr[w].height;return this._prefixSumValidIndex=Math.max(this._prefixSumValidIndex,D),this._arr[D].prefixSum}getLinesTotalHeight(){this._checkPendingChanges();const D=this._lineHeight*this._lineCount,I=this.getWhitespacesTotalHeight();return D+I+this._paddingTop+this._paddingBottom}getWhitespaceAccumulatedHeightBeforeLineNumber(D){this._checkPendingChanges(),D=D|0;const I=this._findLastWhitespaceBeforeLineNumber(D);return I===-1?0:this.getWhitespacesAccumulatedHeight(I)}_findLastWhitespaceBeforeLineNumber(D){D=D|0;const I=this._arr;let w=0,v=I.length-1;for(;w<=v;){const o=(v-w|0)/2|0,c=w+o|0;if(I[c].afterLineNumber<D){if(c+1>=I.length||I[c+1].afterLineNumber>=D)return c;w=c+1|0}else v=c-1|0}return-1}_findFirstWhitespaceAfterLineNumber(D){D=D|0;const w=this._findLastWhitespaceBeforeLineNumber(D)+1;return w<this._arr.length?w:-1}getFirstWhitespaceIndexAfterLineNumber(D){return this._checkPendingChanges(),D=D|0,this._findFirstWhitespaceAfterLineNumber(D)}getVerticalOffsetForLineNumber(D){this._checkPendingChanges(),D=D|0;let I;D>1?I=this._lineHeight*(D-1):I=0;const w=this.getWhitespaceAccumulatedHeightBeforeLineNumber(D);return I+w+this._paddingTop}hasWhitespace(){return this._checkPendingChanges(),this.getWhitespacesCount()>0}getWhitespaceMinWidth(){if(this._checkPendingChanges(),this._minWidth===-1){let D=0;for(let I=0,w=this._arr.length;I<w;I++)D=Math.max(D,this._arr[I].minWidth);this._minWidth=D}return this._minWidth}isAfterLines(D){this._checkPendingChanges();const I=this.getLinesTotalHeight();return D>I}isInTopPadding(D){return this._paddingTop===0?!1:(this._checkPendingChanges(),D<this._paddingTop)}isInBottomPadding(D){if(this._paddingBottom===0)return!1;this._checkPendingChanges();const I=this.getLinesTotalHeight();return D>=I-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(D){if(this._checkPendingChanges(),D=D|0,D<0)return 1;const I=this._lineCount|0,w=this._lineHeight;let v=1,C=I;for(;v<C;){const o=(v+C)/2|0,c=this.getVerticalOffsetForLineNumber(o)|0;if(D>=c+w)v=o+1;else{if(D>=c)return o;C=o}}return v>I?I:v}getLinesViewportData(D,I){this._checkPendingChanges(),D=D|0,I=I|0;const w=this._lineHeight,v=this.getLineNumberAtOrAfterVerticalOffset(D)|0,C=this.getVerticalOffsetForLineNumber(v)|0;let o=this._lineCount|0,c=this.getFirstWhitespaceIndexAfterLineNumber(v)|0;const i=this.getWhitespacesCount()|0;let S,s;c===-1?(c=i,s=o+1,S=0):(s=this.getAfterLineNumberForWhitespaceIndex(c)|0,S=this.getHeightForWhitespaceIndex(c)|0);let l=C,r=l;const p=5e5;let u=0;C>=p&&(u=Math.floor(C/p)*p,u=Math.floor(u/w)*w,r-=u);const a=[],n=D+(I-D)/2;let h=-1;for(let b=v;b<=o;b++){if(h===-1){const E=l,y=l+w;(E<=n&&n<y||E>n)&&(h=b)}for(l+=w,a[b-v]=r,r+=w;s===b;)r+=S,l+=S,c++,c>=i?s=o+1:(s=this.getAfterLineNumberForWhitespaceIndex(c)|0,S=this.getHeightForWhitespaceIndex(c)|0);if(l>=I){o=b;break}}h===-1&&(h=o);const g=this.getVerticalOffsetForLineNumber(o)|0;let d=v,m=o;return d<m&&C<D&&d++,d<m&&g+w>I&&m--,{bigNumbersDelta:u,startLineNumber:v,endLineNumber:o,relativeVerticalOffset:a,centeredLineNumber:h,completelyVisibleStartLineNumber:d,completelyVisibleEndLineNumber:m}}getVerticalOffsetForWhitespaceIndex(D){this._checkPendingChanges(),D=D|0;const I=this.getAfterLineNumberForWhitespaceIndex(D);let w;I>=1?w=this._lineHeight*I:w=0;let v;return D>0?v=this.getWhitespacesAccumulatedHeight(D-1):v=0,w+v+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(D){this._checkPendingChanges(),D=D|0;let I=0,w=this.getWhitespacesCount()-1;if(w<0)return-1;const v=this.getVerticalOffsetForWhitespaceIndex(w),C=this.getHeightForWhitespaceIndex(w);if(D>=v+C)return-1;for(;I<w;){const o=Math.floor((I+w)/2),c=this.getVerticalOffsetForWhitespaceIndex(o),i=this.getHeightForWhitespaceIndex(o);if(D>=c+i)I=o+1;else{if(D>=c)return o;w=o}}return I}getWhitespaceAtVerticalOffset(D){this._checkPendingChanges(),D=D|0;const I=this.getWhitespaceIndexAtOrAfterVerticallOffset(D);if(I<0||I>=this.getWhitespacesCount())return null;const w=this.getVerticalOffsetForWhitespaceIndex(I);if(w>D)return null;const v=this.getHeightForWhitespaceIndex(I),C=this.getIdForWhitespaceIndex(I),o=this.getAfterLineNumberForWhitespaceIndex(I);return{id:C,afterLineNumber:o,verticalOffset:w,height:v}}getWhitespaceViewportData(D,I){this._checkPendingChanges(),D=D|0,I=I|0;const w=this.getWhitespaceIndexAtOrAfterVerticallOffset(D),v=this.getWhitespacesCount()-1;if(w<0)return[];const C=[];for(let o=w;o<=v;o++){const c=this.getVerticalOffsetForWhitespaceIndex(o),i=this.getHeightForWhitespaceIndex(o);if(c>=I)break;C.push({id:this.getIdForWhitespaceIndex(o),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(o),verticalOffset:c,height:i})}return C}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(D){return this._checkPendingChanges(),D=D|0,this._arr[D].id}getAfterLineNumberForWhitespaceIndex(D){return this._checkPendingChanges(),D=D|0,this._arr[D].afterLineNumber}getHeightForWhitespaceIndex(D){return this._checkPendingChanges(),D=D|0,this._arr[D].height}}e.LinesLayout=A,A.INSTANCE_COUNT=0}),define(ne[460],re([1,0,29,282,459]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderViewLine2=e.RenderLineOutput2=e.renderViewLine=e.RenderLineOutput=e.ForeignElementType=e.CharacterMapping=e.DomPosition=e.CharacterMappingConstants=e.RenderLineInput=e.LineRange=e.LinePartMetadata=e.RenderWhitespace=void 0;var A;(function(y){y[y.None=0]="None",y[y.Boundary=1]="Boundary",y[y.Selection=2]="Selection",y[y.Trailing=3]="Trailing",y[y.All=4]="All"})(A=e.RenderWhitespace||(e.RenderWhitespace={}));var k;(function(y){y[y.IS_WHITESPACE=1]="IS_WHITESPACE",y[y.PSEUDO_BEFORE=2]="PSEUDO_BEFORE",y[y.PSEUDO_AFTER=4]="PSEUDO_AFTER",y[y.IS_WHITESPACE_MASK=1]="IS_WHITESPACE_MASK",y[y.PSEUDO_BEFORE_MASK=2]="PSEUDO_BEFORE_MASK",y[y.PSEUDO_AFTER_MASK=4]="PSEUDO_AFTER_MASK"})(k=e.LinePartMetadata||(e.LinePartMetadata={}));class D{constructor(T,R,O,x){this.endIndex=T,this.type=R,this.metadata=O,this.containsRTL=x,this._linePartBrand=void 0}isWhitespace(){return!!(this.metadata&1)}isPseudoAfter(){return!!(this.metadata&4)}}class I{constructor(T,R){this.startOffset=T,this.endOffset=R}equals(T){return this.startOffset===T.startOffset&&this.endOffset===T.endOffset}}e.LineRange=I;class w{constructor(T,R,O,x,F,L,M,N,B,P,V,z,U,H,K,G,q,Z,j){this.useMonospaceOptimizations=T,this.canUseHalfwidthRightwardsArrow=R,this.lineContent=O,this.continuesWithWrappedLine=x,this.isBasicASCII=F,this.containsRTL=L,this.fauxIndentLength=M,this.lineTokens=N,this.lineDecorations=B.sort(_.LineDecoration.compare),this.tabSize=P,this.startVisibleColumn=V,this.spaceWidth=z,this.stopRenderingLineAfter=K,this.renderWhitespace=G==="all"?4:G==="boundary"?1:G==="selection"?2:G==="trailing"?3:0,this.renderControlCharacters=q,this.fontLigatures=Z,this.selectionsOnLine=j&&j.sort(($,J)=>$.startOffset<J.startOffset?-1:1);const X=Math.abs(H-z),Y=Math.abs(U-z);X<Y?(this.renderSpaceWidth=H,this.renderSpaceCharCode=11825):(this.renderSpaceWidth=U,this.renderSpaceCharCode=183)}sameSelection(T){if(this.selectionsOnLine===null)return T===null;if(T===null||T.length!==this.selectionsOnLine.length)return!1;for(let R=0;R<this.selectionsOnLine.length;R++)if(!this.selectionsOnLine[R].equals(T[R]))return!1;return!0}equals(T){return this.useMonospaceOptimizations===T.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===T.canUseHalfwidthRightwardsArrow&&this.lineContent===T.lineContent&&this.continuesWithWrappedLine===T.continuesWithWrappedLine&&this.isBasicASCII===T.isBasicASCII&&this.containsRTL===T.containsRTL&&this.fauxIndentLength===T.fauxIndentLength&&this.tabSize===T.tabSize&&this.startVisibleColumn===T.startVisibleColumn&&this.spaceWidth===T.spaceWidth&&this.renderSpaceWidth===T.renderSpaceWidth&&this.renderSpaceCharCode===T.renderSpaceCharCode&&this.stopRenderingLineAfter===T.stopRenderingLineAfter&&this.renderWhitespace===T.renderWhitespace&&this.renderControlCharacters===T.renderControlCharacters&&this.fontLigatures===T.fontLigatures&&_.LineDecoration.equalsArr(this.lineDecorations,T.lineDecorations)&&this.lineTokens.equals(T.lineTokens)&&this.sameSelection(T.selectionsOnLine)}}e.RenderLineInput=w;var v;(function(y){y[y.PART_INDEX_MASK=4294901760]="PART_INDEX_MASK",y[y.CHAR_INDEX_MASK=65535]="CHAR_INDEX_MASK",y[y.CHAR_INDEX_OFFSET=0]="CHAR_INDEX_OFFSET",y[y.PART_INDEX_OFFSET=16]="PART_INDEX_OFFSET"})(v=e.CharacterMappingConstants||(e.CharacterMappingConstants={}));class C{constructor(T,R){this.partIndex=T,this.charIndex=R}}e.DomPosition=C;class o{constructor(T,R){this.length=T,this._data=new Uint32Array(this.length),this._absoluteOffsets=new Uint32Array(this.length)}static getPartIndex(T){return(T&4294901760)>>>16}static getCharIndex(T){return(T&65535)>>>0}setColumnInfo(T,R,O,x){const F=(R<<16|O<<0)>>>0;this._data[T-1]=F,this._absoluteOffsets[T-1]=x+O}getAbsoluteOffset(T){return this._absoluteOffsets.length===0?0:this._absoluteOffsets[T-1]}charOffsetToPartData(T){return this.length===0?0:T<0?this._data[0]:T>=this.length?this._data[this.length-1]:this._data[T]}getDomPosition(T){const R=this.charOffsetToPartData(T-1),O=o.getPartIndex(R),x=o.getCharIndex(R);return new C(O,x)}getColumn(T,R){return this.partDataToCharOffset(T.partIndex,R,T.charIndex)+1}partDataToCharOffset(T,R,O){if(this.length===0)return 0;const x=(T<<16|O<<0)>>>0;let F=0,L=this.length-1;for(;F+1<L;){const K=F+L>>>1,G=this._data[K];if(G===x)return K;G>x?L=K:F=K}if(F===L)return F;const M=this._data[F],N=this._data[L];if(M===x)return F;if(N===x)return L;const B=o.getPartIndex(M),P=o.getCharIndex(M),V=o.getPartIndex(N);let z;B!==V?z=R:z=o.getCharIndex(N);const U=O-P,H=z-O;return U<=H?F:L}}e.CharacterMapping=o;var c;(function(y){y[y.None=0]="None",y[y.Before=1]="Before",y[y.After=2]="After"})(c=e.ForeignElementType||(e.ForeignElementType={}));class i{constructor(T,R,O){this._renderLineOutputBrand=void 0,this.characterMapping=T,this.containsRTL=R,this.containsForeignElements=O}}e.RenderLineOutput=i;function S(y,T){if(y.lineContent.length===0){if(y.lineDecorations.length>0){T.appendASCIIString("<span>");let R=0,O=0,x=0;for(const L of y.lineDecorations)(L.type===1||L.type===2)&&(T.appendASCIIString('<span class="'),T.appendASCIIString(L.className),T.appendASCIIString('"></span>'),L.type===1&&(x|=1,R++),L.type===2&&(x|=2,O++));T.appendASCIIString("</span>");const F=new o(1,R+O);return F.setColumnInfo(1,R,0,0),new i(F,!1,x)}return T.appendASCIIString("<span><span></span></span>"),new i(new o(0,0),!1,0)}return b(p(y),T)}e.renderViewLine=S;class s{constructor(T,R,O,x){this.characterMapping=T,this.html=R,this.containsRTL=O,this.containsForeignElements=x}}e.RenderLineOutput2=s;function l(y){const T=(0,f.createStringBuilder)(1e4),R=S(y,T);return new s(R.characterMapping,T.build(),R.containsRTL,R.containsForeignElements)}e.renderViewLine2=l;class r{constructor(T,R,O,x,F,L,M,N,B,P,V,z,U,H,K){this.fontIsMonospace=T,this.canUseHalfwidthRightwardsArrow=R,this.lineContent=O,this.len=x,this.isOverflowing=F,this.parts=L,this.containsForeignElements=M,this.fauxIndentLength=N,this.tabSize=B,this.startVisibleColumn=P,this.containsRTL=V,this.spaceWidth=z,this.renderSpaceCharCode=U,this.renderWhitespace=H,this.renderControlCharacters=K}}function p(y){const T=y.lineContent;let R,O;y.stopRenderingLineAfter!==-1&&y.stopRenderingLineAfter<T.length?(R=!0,O=y.stopRenderingLineAfter):(R=!1,O=T.length);let x=u(T,y.containsRTL,y.lineTokens,y.fauxIndentLength,O);y.renderControlCharacters&&!y.isBasicASCII&&(x=g(T,x)),(y.renderWhitespace===4||y.renderWhitespace===1||y.renderWhitespace===2&&!!y.selectionsOnLine||y.renderWhitespace===3)&&(x=d(y,T,O,x));let F=0;if(y.lineDecorations.length>0){for(let L=0,M=y.lineDecorations.length;L<M;L++){const N=y.lineDecorations[L];N.type===3||N.type===1?F|=1:N.type===2&&(F|=2)}x=m(T,O,x,y.lineDecorations)}return y.containsRTL||(x=n(T,x,!y.isBasicASCII||y.fontLigatures)),new r(y.useMonospaceOptimizations,y.canUseHalfwidthRightwardsArrow,T,O,R,x,F,y.fauxIndentLength,y.tabSize,y.startVisibleColumn,y.containsRTL,y.spaceWidth,y.renderSpaceCharCode,y.renderWhitespace,y.renderControlCharacters)}function u(y,T,R,O,x){const F=[];let L=0;O>0&&(F[L++]=new D(O,"",0,!1));let M=O;for(let N=0,B=R.getCount();N<B;N++){const P=R.getEndOffset(N);if(P<=O)continue;const V=R.getClassName(N);if(P>=x){const U=T?t.containsRTL(y.substring(M,x)):!1;F[L++]=new D(x,V,0,U);break}const z=T?t.containsRTL(y.substring(M,P)):!1;F[L++]=new D(P,V,0,z),M=P}return F}var a;(function(y){y[y.LongToken=50]="LongToken"})(a||(a={}));function n(y,T,R){let O=0;const x=[];let F=0;if(R)for(let L=0,M=T.length;L<M;L++){const N=T[L],B=N.endIndex;if(O+50<B){const P=N.type,V=N.metadata,z=N.containsRTL;let U=-1,H=O;for(let K=O;K<B;K++)y.charCodeAt(K)===32&&(U=K),U!==-1&&K-H>=50&&(x[F++]=new D(U+1,P,V,z),H=U+1,U=-1);H!==B&&(x[F++]=new D(B,P,V,z))}else x[F++]=N;O=B}else for(let L=0,M=T.length;L<M;L++){const N=T[L],B=N.endIndex,P=B-O;if(P>50){const V=N.type,z=N.metadata,U=N.containsRTL,H=Math.ceil(P/50);for(let K=1;K<H;K++){const G=O+K*50;x[F++]=new D(G,V,z,U)}x[F++]=new D(B,V,z,U)}else x[F++]=N;O=B}return x}function h(y){return y<32?y!==9:y===127||y>=8234&&y<=8238||y>=8294&&y<=8297||y>=8206&&y<=8207||y===1564}function g(y,T){const R=[];let O=new D(0,"",0,!1),x=0;for(const F of T){const L=F.endIndex;for(;x<L;x++){const M=y.charCodeAt(x);h(M)&&(x>O.endIndex&&(O=new D(x,F.type,F.metadata,F.containsRTL),R.push(O)),O=new D(x+1,"mtkcontrol",F.metadata,!1),R.push(O))}x>O.endIndex&&(O=new D(L,F.type,F.metadata,F.containsRTL),R.push(O))}return R}function d(y,T,R,O){const x=y.continuesWithWrappedLine,F=y.fauxIndentLength,L=y.tabSize,M=y.startVisibleColumn,N=y.useMonospaceOptimizations,B=y.selectionsOnLine,P=y.renderWhitespace===1,V=y.renderWhitespace===3,z=y.renderSpaceWidth!==y.spaceWidth,U=[];let H=0,K=0,G=O[K].type,q=O[K].containsRTL,Z=O[K].endIndex;const j=O.length;let X=!1,Y=t.firstNonWhitespaceIndex(T),$;Y===-1?(X=!0,Y=R,$=R):$=t.lastNonWhitespaceIndex(T);let J=!1,ee=0,te=B&&B[ee],se=M%L;for(let ce=F;ce<R;ce++){const le=T.charCodeAt(ce);te&&ce>=te.endOffset&&(ee++,te=B&&B[ee]);let ae;if(ce<Y||ce>$)ae=!0;else if(le===9)ae=!0;else if(le===32)if(P)if(J)ae=!0;else{const ue=ce+1<R?T.charCodeAt(ce+1):0;ae=ue===32||ue===9}else ae=!0;else ae=!1;if(ae&&B&&(ae=!!te&&te.startOffset<=ce&&te.endOffset>ce),ae&&V&&(ae=X||ce>$),ae&&q&&ce>=Y&&ce<=$&&(ae=!1),J){if(!ae||!N&&se>=L){if(z){const ue=H>0?U[H-1].endIndex:F;for(let oe=ue+1;oe<=ce;oe++)U[H++]=new D(oe,"mtkw",1,!1)}else U[H++]=new D(ce,"mtkw",1,!1);se=se%L}}else(ce===Z||ae&&ce>F)&&(U[H++]=new D(ce,G,0,q),se=se%L);for(le===9?se=L:t.isFullWidthCharacter(le)?se+=2:se++,J=ae;ce===Z&&(K++,K<j);)G=O[K].type,q=O[K].containsRTL,Z=O[K].endIndex}let ie=!1;if(J)if(x&&P){const ce=R>0?T.charCodeAt(R-1):0,le=R>1?T.charCodeAt(R-2):0;ce===32&&le!==32&&le!==9||(ie=!0)}else ie=!0;if(ie)if(z){const ce=H>0?U[H-1].endIndex:F;for(let le=ce+1;le<=R;le++)U[H++]=new D(le,"mtkw",1,!1)}else U[H++]=new D(R,"mtkw",1,!1);else U[H++]=new D(R,G,0,q);return U}function m(y,T,R,O){O.sort(_.LineDecoration.compare);const x=_.LineDecorationsNormalizer.normalize(y,O),F=x.length;let L=0;const M=[];let N=0,B=0;for(let V=0,z=R.length;V<z;V++){const U=R[V],H=U.endIndex,K=U.type,G=U.metadata,q=U.containsRTL;for(;L<F&&x[L].startOffset<H;){const Z=x[L];if(Z.startOffset>B&&(B=Z.startOffset,M[N++]=new D(B,K,G,q)),Z.endOffset+1<=H)B=Z.endOffset+1,M[N++]=new D(B,K+" "+Z.className,G|Z.metadata,q),L++;else{B=H,M[N++]=new D(B,K+" "+Z.className,G|Z.metadata,q);break}}H>B&&(B=H,M[N++]=new D(B,K,G,q))}const P=R[R.length-1].endIndex;if(L<F&&x[L].startOffset===P)for(;L<F&&x[L].startOffset===P;){const V=x[L];M[N++]=new D(B,V.className,V.metadata,!1),L++}return M}function b(y,T){const R=y.fontIsMonospace,O=y.canUseHalfwidthRightwardsArrow,x=y.containsForeignElements,F=y.lineContent,L=y.len,M=y.isOverflowing,N=y.parts,B=y.fauxIndentLength,P=y.tabSize,V=y.startVisibleColumn,z=y.containsRTL,U=y.spaceWidth,H=y.renderSpaceCharCode,K=y.renderWhitespace,G=y.renderControlCharacters,q=new o(L+1,N.length);let Z=!1,j=0,X=V,Y=0,$=0,J=0,ee=0;z?T.appendASCIIString('<span dir="ltr">'):T.appendASCIIString("<span>");for(let te=0,se=N.length;te<se;te++){ee+=J;const ie=N[te],ce=ie.endIndex,le=ie.type,ae=ie.containsRTL,ue=K!==0&&ie.isWhitespace(),oe=ue&&!R&&(le==="mtkw"||!x),fe=j===ce&&ie.isPseudoAfter();if(Y=0,T.appendASCIIString("<span "),ae&&T.appendASCIIString('style="unicode-bidi:isolate" '),T.appendASCIIString('class="'),T.appendASCIIString(oe?"mtkz":le),T.appendASCII(34),ue){let pe=0;{let me=j,be=X;for(;me<ce;me++){const ve=(F.charCodeAt(me)===9?P-be%P:1)|0;pe+=ve,me>=B&&(be+=ve)}}for(oe&&(T.appendASCIIString(' style="width:'),T.appendASCIIString(String(U*pe)),T.appendASCIIString('px"')),T.appendASCII(62);j<ce;j++){q.setColumnInfo(j+1,te-$,Y,ee),$=0;const me=F.charCodeAt(j);let be;if(me===9){be=P-X%P|0,!O||be>1?T.write1(8594):T.write1(65515);for(let Ce=2;Ce<=be;Ce++)T.write1(160)}else be=1,T.write1(H);Y+=be,j>=B&&(X+=be)}J=pe}else{let pe=0;for(T.appendASCII(62);j<ce;j++){q.setColumnInfo(j+1,te-$,Y,ee),$=0;const me=F.charCodeAt(j);let be=1,Ce=1;switch(me){case 9:be=P-X%P,Ce=be;for(let ve=1;ve<=be;ve++)T.write1(160);break;case 32:T.write1(160);break;case 60:T.appendASCIIString("<");break;case 62:T.appendASCIIString(">");break;case 38:T.appendASCIIString("&");break;case 0:G?T.write1(9216):T.appendASCIIString("�");break;case 65279:case 8232:case 8233:case 133:T.write1(65533);break;default:t.isFullWidthCharacter(me)&&Ce++,G&&me<32?T.write1(9216+me):G&&me===127?T.write1(9249):G&&h(me)?(T.appendASCIIString("[U+"),T.appendASCIIString(E(me)),T.appendASCIIString("]"),be=8):T.write1(me)}Y+=be,pe+=be,j>=B&&(X+=Ce)}J=pe}fe?$++:$=0,j>=L&&!Z&&ie.isPseudoAfter()&&(Z=!0,q.setColumnInfo(j+1,te,Y,ee)),T.appendASCIIString("</span>")}return Z||q.setColumnInfo(L+1,N.length-1,Y,ee),M&&T.appendASCIIString("<span>…</span>"),T.appendASCIIString("</span>"),new i(q,z,x)}function E(y){return y.toString(16).toUpperCase().padStart(4,"0")}}),define(ne[1181],re([1,0,20]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewportData=void 0;class f{constructor(A,k,D,I){this.selections=A,this.startLineNumber=k.startLineNumber|0,this.endLineNumber=k.endLineNumber|0,this.relativeVerticalOffset=k.relativeVerticalOffset,this.bigNumbersDelta=k.bigNumbersDelta|0,this.whitespaceViewportData=D,this._model=I,this.visibleRange=new t.Range(k.startLineNumber,this._model.getLineMinColumn(k.startLineNumber),k.endLineNumber,this._model.getLineMaxColumn(k.endLineNumber))}getViewLineRenderingData(A){return this._model.getViewLineRenderingData(this.visibleRange,A)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}e.ViewportData=f}),define(ne[259],re([1,0,29,20]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewRulerDecorationsGroup=e.ViewModelDecoration=e.SingleLineInlineDecoration=e.InlineDecoration=e.InlineDecorationType=e.ViewLineRenderingData=e.ViewLineData=e.MinimapLinesRenderingData=e.Viewport=void 0;class _{constructor(i,S,s,l){this._viewportBrand=void 0,this.top=i|0,this.left=S|0,this.width=s|0,this.height=l|0}}e.Viewport=_;class A{constructor(i,S){this.tabSize=i,this.data=S}}e.MinimapLinesRenderingData=A;class k{constructor(i,S,s,l,r,p,u){this._viewLineDataBrand=void 0,this.content=i,this.continuesWithWrappedLine=S,this.minColumn=s,this.maxColumn=l,this.startVisibleColumn=r,this.tokens=p,this.inlineDecorations=u}}e.ViewLineData=k;class D{constructor(i,S,s,l,r,p,u,a,n,h){this.minColumn=i,this.maxColumn=S,this.content=s,this.continuesWithWrappedLine=l,this.isBasicASCII=D.isBasicASCII(s,p),this.containsRTL=D.containsRTL(s,this.isBasicASCII,r),this.tokens=u,this.inlineDecorations=a,this.tabSize=n,this.startVisibleColumn=h}static isBasicASCII(i,S){return S?t.isBasicASCII(i):!0}static containsRTL(i,S,s){return!S&&s?t.containsRTL(i):!1}}e.ViewLineRenderingData=D;var I;(function(c){c[c.Regular=0]="Regular",c[c.Before=1]="Before",c[c.After=2]="After",c[c.RegularAffectingLetterSpacing=3]="RegularAffectingLetterSpacing"})(I=e.InlineDecorationType||(e.InlineDecorationType={}));class w{constructor(i,S,s){this.range=i,this.inlineClassName=S,this.type=s}}e.InlineDecoration=w;class v{constructor(i,S,s,l){this.startOffset=i,this.endOffset=S,this.inlineClassName=s,this.inlineClassNameAffectsLetterSpacing=l}toInlineDecoration(i){return new w(new f.Range(i,this.startOffset+1,i,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}e.SingleLineInlineDecoration=v;class C{constructor(i,S){this._viewModelDecorationBrand=void 0,this.range=i,this.options=S}}e.ViewModelDecoration=C;class o{constructor(i,S,s){this.color=i,this.zIndex=S,this.data=s}static cmp(i,S){return i.zIndex===S.zIndex?i.color<S.color?-1:i.color>S.color?1:0:i.zIndex-S.zIndex}}e.OverviewRulerDecorationsGroup=o}),define(ne[704],re([1,0,6,2,686,86]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapTokensColorTracker=void 0;class k extends f.Disposable{constructor(){super();this._onDidChange=new t.Emitter,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(A.TokenizationRegistry.onDidChange(I=>{I.changedColorMap&&this._updateColorMap()}))}static getInstance(){return this._INSTANCE||(this._INSTANCE=(0,f.markAsSingleton)(new k)),this._INSTANCE}_updateColorMap(){const I=A.TokenizationRegistry.getColorMap();if(!I){this._colors=[_.RGBA8.Empty],this._backgroundIsLight=!0;return}this._colors=[_.RGBA8.Empty];for(let v=1;v<I.length;v++){const C=I[v].rgba;this._colors[v]=new _.RGBA8(C.r,C.g,C.b,Math.round(C.a*255))}const w=I[2].getRelativeLuminance();this._backgroundIsLight=w>=.5,this._onDidChange.fire(void 0)}getColor(I){return(I<1||I>=this._colors.length)&&(I=2),this._colors[I]}backgroundIsLight(){return this._backgroundIsLight}}e.MinimapTokensColorTracker=k,k._INSTANCE=null}),define(ne[1182],re([1,0,285,49,307,259]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createModelLineProjection=void 0;function k(c,i){return c===null?i?I.INSTANCE:w.INSTANCE:new D(c,i)}e.createModelLineProjection=k;class D{constructor(i,S){this._projectionData=i,this._isVisible=S}isVisible(){return this._isVisible}setVisible(i){return this._isVisible=i,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(i,S,s){this._assertVisible();const l=s>0?this._projectionData.breakOffsets[s-1]:0,r=this._projectionData.breakOffsets[s];let p;if(this._projectionData.injectionOffsets!==null){const u=this._projectionData.injectionOffsets.map((n,h)=>new _.LineInjectedText(0,0,n+1,this._projectionData.injectionOptions[h],0));p=_.LineInjectedText.applyInjectedText(i.getLineContent(S),u).substring(l,r)}else p=i.getValueInRange({startLineNumber:S,startColumn:l+1,endLineNumber:S,endColumn:r+1});return s>0&&(p=C(this._projectionData.wrappedTextIndentLength)+p),p}getViewLineLength(i,S,s){return this._assertVisible(),this._projectionData.getLineLength(s)}getViewLineMinColumn(i,S,s){return this._assertVisible(),this._projectionData.getMinOutputOffset(s)+1}getViewLineMaxColumn(i,S,s){return this._assertVisible(),this._projectionData.getMaxOutputOffset(s)+1}getViewLineData(i,S,s){const l=new Array;return this.getViewLinesData(i,S,s,1,0,[!0],l),l[0]}getViewLinesData(i,S,s,l,r,p,u){this._assertVisible();const a=this._projectionData,n=a.injectionOffsets,h=a.injectionOptions;let g=null;if(n){g=[];let m=0,b=0;for(let E=0;E<a.getOutputLineCount();E++){const y=new Array;g[E]=y;const T=E>0?a.breakOffsets[E-1]:0,R=a.breakOffsets[E];for(;b<n.length;){const O=h[b].content.length,x=n[b]+m,F=x+O;if(x>R)break;if(T<F){const L=h[b];if(L.inlineClassName){const M=E>0?a.wrappedTextIndentLength:0,N=M+Math.max(x-T,0),B=M+Math.min(F-T,R);N!==B&&y.push(new A.SingleLineInlineDecoration(N,B,L.inlineClassName,L.inlineClassNameAffectsLetterSpacing))}}if(F<=R)m+=O,b++;else break}}}let d;n?d=i.getLineTokens(S).withInserted(n.map((m,b)=>({offset:m,text:h[b].content,tokenMetadata:t.LineTokens.defaultTokenMetadata}))):d=i.getLineTokens(S);for(let m=s;m<s+l;m++){const b=r+m-s;if(!p[b]){u[b]=null;continue}u[b]=this._getViewLineData(d,g?g[m]:null,m)}}_getViewLineData(i,S,s){this._assertVisible();const l=this._projectionData,r=s>0?l.wrappedTextIndentLength:0,p=s>0?l.breakOffsets[s-1]:0,u=l.breakOffsets[s],a=i.sliceAndInflate(p,u,r);let n=a.getLineContent();s>0&&(n=C(l.wrappedTextIndentLength)+n);const h=this._projectionData.getMinOutputOffset(s)+1,g=n.length+1,d=s+1<this.getViewLineCount(),m=s===0?0:l.breakOffsetsVisibleColumn[s-1];return new A.ViewLineData(n,d,h,g,m,a,S)}getModelColumnOfViewPosition(i,S){return this._assertVisible(),this._projectionData.translateToInputOffset(i,S-1)+1}getViewPositionOfModelPosition(i,S,s=2){return this._assertVisible(),this._projectionData.translateToOutputPosition(S-1,s).toPosition(i)}getViewLineNumberOfModelPosition(i,S){this._assertVisible();const s=this._projectionData.translateToOutputPosition(S-1);return i+s.outputLineIndex}normalizePosition(i,S,s){const l=S.lineNumber-i;return this._projectionData.normalizeOutputPosition(i,S.column-1,s).toPosition(l)}getInjectedTextAt(i,S){return this._projectionData.getInjectedText(i,S-1)}_assertVisible(){if(!this._isVisible)throw new Error("Not supported")}}class I{constructor(){}isVisible(){return!0}setVisible(i){return i?this:w.INSTANCE}getProjectionData(){return null}getViewLineCount(){return 1}getViewLineContent(i,S,s){return i.getLineContent(S)}getViewLineLength(i,S,s){return i.getLineLength(S)}getViewLineMinColumn(i,S,s){return i.getLineMinColumn(S)}getViewLineMaxColumn(i,S,s){return i.getLineMaxColumn(S)}getViewLineData(i,S,s){const l=i.getLineTokens(S),r=l.getLineContent();return new A.ViewLineData(r,!1,1,r.length+1,0,l.inflate(),null)}getViewLinesData(i,S,s,l,r,p,u){if(!p[r]){u[r]=null;return}u[r]=this.getViewLineData(i,S,0)}getModelColumnOfViewPosition(i,S){return S}getViewPositionOfModelPosition(i,S){return new f.Position(i,S)}getViewLineNumberOfModelPosition(i,S){return i}normalizePosition(i,S,s){return S}getInjectedTextAt(i,S){return null}}I.INSTANCE=new I;class w{constructor(){}isVisible(){return!1}setVisible(i){return i?I.INSTANCE:this}getProjectionData(){return null}getViewLineCount(){return 0}getViewLineContent(i,S,s){throw new Error("Not supported")}getViewLineLength(i,S,s){throw new Error("Not supported")}getViewLineMinColumn(i,S,s){throw new Error("Not supported")}getViewLineMaxColumn(i,S,s){throw new Error("Not supported")}getViewLineData(i,S,s){throw new Error("Not supported")}getViewLinesData(i,S,s,l,r,p,u){throw new Error("Not supported")}getModelColumnOfViewPosition(i,S){throw new Error("Not supported")}getViewPositionOfModelPosition(i,S){throw new Error("Not supported")}getViewLineNumberOfModelPosition(i,S){throw new Error("Not supported")}normalizePosition(i,S,s){throw new Error("Not supported")}getInjectedTextAt(i,S){throw new Error("Not supported")}}w.INSTANCE=new w;let v=[""];function C(c){if(c>=v.length)for(let i=1;i<=c;i++)v[i]=o(i);return v[c]}function o(c){return new Array(c+1).join(" ")}}),define(ne[1183],re([1,0,29,339,307,695]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonospaceLineBreaksComputerFactory=void 0;class k{constructor(r,p){this.classifier=new I(r,p)}static create(r){return new k(r.get(120),r.get(119))}createLineBreaksComputer(r,p,u,a){const n=[],h=[],g=[];return{addRequest:(d,m,b)=>{n.push(d),h.push(m),g.push(b)},finalize:()=>{const d=r.typicalFullwidthCharacterWidth/r.typicalHalfwidthCharacterWidth,m=[];for(let b=0,E=n.length;b<E;b++){const y=h[b],T=g[b];T&&!T.injectionOptions&&!y?m[b]=C(this.classifier,T,n[b],p,u,d,a):m[b]=o(this.classifier,n[b],y,p,u,d,a)}return w.length=0,v.length=0,m}}}}e.MonospaceLineBreaksComputerFactory=k;var D;(function(l){l[l.NONE=0]="NONE",l[l.BREAK_BEFORE=1]="BREAK_BEFORE",l[l.BREAK_AFTER=2]="BREAK_AFTER",l[l.BREAK_IDEOGRAPHIC=3]="BREAK_IDEOGRAPHIC"})(D||(D={}));class I extends f.CharacterClassifier{constructor(r,p){super(0);for(let u=0;u<r.length;u++)this.set(r.charCodeAt(u),1);for(let u=0;u<p.length;u++)this.set(p.charCodeAt(u),2)}get(r){return r>=0&&r<256?this._asciiMap[r]:r>=12352&&r<=12543||r>=13312&&r<=19903||r>=19968&&r<=40959?3:this._map.get(r)||this._defaultValue}}let w=[],v=[];function C(l,r,p,u,a,n,h){if(a===-1)return null;const g=p.length;if(g<=1)return null;const d=r.breakOffsets,m=r.breakOffsetsVisibleColumn,b=s(p,u,a,n,h),E=a-b,y=w,T=v;let R=0,O=0,x=0,F=a;const L=d.length;let M=0;if(M>=0){let N=Math.abs(m[M]-F);for(;M+1<L;){const B=Math.abs(m[M+1]-F);if(B>=N)break;N=B,M++}}for(;M<L;){let N=M<0?0:d[M],B=M<0?0:m[M];O>N&&(N=O,B=x);let P=0,V=0,z=0,U=0;if(B<=F){let K=B,G=N===0?0:p.charCodeAt(N-1),q=N===0?0:l.get(G),Z=!0;for(let j=N;j<g;j++){const X=j,Y=p.charCodeAt(j);let $,J;if(t.isHighSurrogate(Y)?(j++,$=0,J=2):($=l.get(Y),J=c(Y,K,u,n)),X>O&&S(G,q,Y,$)&&(P=X,V=K),K+=J,K>F){X>O?(z=X,U=K-J):(z=j+1,U=K),K-V>E&&(P=0),Z=!1;break}G=Y,q=$}if(Z){R>0&&(y[R]=d[d.length-1],T[R]=m[d.length-1],R++);break}}if(P===0){let K=B,G=p.charCodeAt(N),q=l.get(G),Z=!1;for(let j=N-1;j>=O;j--){const X=j+1,Y=p.charCodeAt(j);if(Y===9){Z=!0;break}let $,J;if(t.isLowSurrogate(Y)?(j--,$=0,J=2):($=l.get(Y),J=t.isFullWidthCharacter(Y)?n:1),K<=F){if(z===0&&(z=X,U=K),K<=F-E)break;if(S(Y,$,G,q)){P=X,V=K;break}}K-=J,G=Y,q=$}if(P!==0){const j=E-(U-V);if(j<=u){const X=p.charCodeAt(z);let Y;t.isHighSurrogate(X)?Y=2:Y=c(X,U,u,n),j-Y<0&&(P=0)}}if(Z){M--;continue}}if(P===0&&(P=z,V=U),P<=O){const K=p.charCodeAt(O);t.isHighSurrogate(K)?(P=O+2,V=x+2):(P=O+1,V=x+c(K,x,u,n))}for(O=P,y[R]=P,x=V,T[R]=V,R++,F=V+E;M<0||M<L&&m[M]<V;)M++;let H=Math.abs(m[M]-F);for(;M+1<L;){const K=Math.abs(m[M+1]-F);if(K>=H)break;H=K,M++}}return R===0?null:(y.length=R,T.length=R,w=r.breakOffsets,v=r.breakOffsetsVisibleColumn,r.breakOffsets=y,r.breakOffsetsVisibleColumn=T,r.wrappedTextIndentLength=b,r)}function o(l,r,p,u,a,n,h){const g=_.LineInjectedText.applyInjectedText(r,p);let d,m;if(p&&p.length>0?(d=p.map(V=>V.options),m=p.map(V=>V.column-1)):(d=null,m=null),a===-1)return d?new A.ModelLineProjectionData(m,d,[g.length],[],0):null;const b=g.length;if(b<=1)return d?new A.ModelLineProjectionData(m,d,[g.length],[],0):null;const E=s(g,u,a,n,h),y=a-E,T=[],R=[];let O=0,x=0,F=0,L=a,M=g.charCodeAt(0),N=l.get(M),B=c(M,0,u,n),P=1;t.isHighSurrogate(M)&&(B+=1,M=g.charCodeAt(1),N=l.get(M),P++);for(let V=P;V<b;V++){const z=V,U=g.charCodeAt(V);let H,K;t.isHighSurrogate(U)?(V++,H=0,K=2):(H=l.get(U),K=c(U,B,u,n)),S(M,N,U,H)&&(x=z,F=B),B+=K,B>L&&((x===0||B-F>y)&&(x=z,F=B-K),T[O]=x,R[O]=F,O++,L=F+y,x=0),M=U,N=H}return O===0&&(!p||p.length===0)?null:(T[O]=b,R[O]=B,new A.ModelLineProjectionData(m,d,T,R,E))}function c(l,r,p,u){return l===9?p-r%p:t.isFullWidthCharacter(l)||l<32?u:1}function i(l,r){return r-l%r}function S(l,r,p,u){return p!==32&&(r===2||r===3&&u!==2||u===1||u===3&&r!==1)}function s(l,r,p,u,a){let n=0;if(a!==0){const h=t.firstNonWhitespaceIndex(l);if(h!==-1){for(let d=0;d<h;d++)n+=l.charCodeAt(d)===9?i(n,r):1;const g=a===3?2:a===2?1:0;for(let d=0;d<g;d++)n+=i(n,r);n+u>p&&(n=0)}}return n}}),define(ne[705],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewZoneManager=e.OverviewRulerZone=e.ColorZone=void 0;var t;(function(k){k[k.MINIMUM_HEIGHT=4]="MINIMUM_HEIGHT"})(t||(t={}));class f{constructor(D,I,w){this._colorZoneBrand=void 0,this.from=D|0,this.to=I|0,this.colorId=w|0}static compare(D,I){return D.colorId===I.colorId?D.from===I.from?D.to-I.to:D.from-I.from:D.colorId-I.colorId}}e.ColorZone=f;class _{constructor(D,I,w,v){this._overviewRulerZoneBrand=void 0,this.startLineNumber=D,this.endLineNumber=I,this.heightInLines=w,this.color=v,this._colorZone=null}static compare(D,I){return D.color===I.color?D.startLineNumber===I.startLineNumber?D.heightInLines===I.heightInLines?D.endLineNumber-I.endLineNumber:D.heightInLines-I.heightInLines:D.startLineNumber-I.startLineNumber:D.color<I.color?-1:1}setColorZone(D){this._colorZone=D}getColorZones(){return this._colorZone}}e.OverviewRulerZone=_;class A{constructor(D){this._getVerticalOffsetForLine=D,this._zones=[],this._colorZonesInvalid=!1,this._lineHeight=0,this._domWidth=0,this._domHeight=0,this._outerHeight=0,this._pixelRatio=1,this._lastAssignedId=0,this._color2Id=Object.create(null),this._id2Color=[]}getId2Color(){return this._id2Color}setZones(D){this._zones=D,this._zones.sort(_.compare)}setLineHeight(D){return this._lineHeight===D?!1:(this._lineHeight=D,this._colorZonesInvalid=!0,!0)}setPixelRatio(D){this._pixelRatio=D,this._colorZonesInvalid=!0}getDOMWidth(){return this._domWidth}getCanvasWidth(){return this._domWidth*this._pixelRatio}setDOMWidth(D){return this._domWidth===D?!1:(this._domWidth=D,this._colorZonesInvalid=!0,!0)}getDOMHeight(){return this._domHeight}getCanvasHeight(){return this._domHeight*this._pixelRatio}setDOMHeight(D){return this._domHeight===D?!1:(this._domHeight=D,this._colorZonesInvalid=!0,!0)}getOuterHeight(){return this._outerHeight}setOuterHeight(D){return this._outerHeight===D?!1:(this._outerHeight=D,this._colorZonesInvalid=!0,!0)}resolveColorZones(){const D=this._colorZonesInvalid,I=Math.floor(this._lineHeight),w=Math.floor(this.getCanvasHeight()),v=Math.floor(this._outerHeight),C=w/v,o=Math.floor(4*this._pixelRatio/2),c=[];for(let i=0,S=this._zones.length;i<S;i++){const s=this._zones[i];if(!D){const m=s.getColorZones();if(m){c.push(m);continue}}const l=this._getVerticalOffsetForLine(s.startLineNumber),r=s.heightInLines===0?this._getVerticalOffsetForLine(s.endLineNumber)+I:l+s.heightInLines*I,p=Math.floor(C*l),u=Math.floor(C*r);let a=Math.floor((p+u)/2),n=u-a;n<o&&(n=o),a-n<0&&(a=n),a+n>w&&(a=w-n);const h=s.color;let g=this._color2Id[h];g||(g=++this._lastAssignedId,this._color2Id[h]=g,this._id2Color[g]=h);const d=new f(a-n,a+n,g);s.setColorZone(d),c.push(d)}return this._colorZonesInvalid=!1,c.sort(f.compare),c}}e.OverviewZoneManager=A}),define(ne[1184],re([1,0,128,705,388]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewRuler=void 0;class A extends _.ViewEventHandler{constructor(D,I){super();this._context=D;const w=this._context.configuration.options;this._domNode=(0,t.createFastDomNode)(document.createElement("canvas")),this._domNode.setClassName(I),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new f.OverviewZoneManager(v=>this._context.viewLayout.getVerticalOffsetForLineNumber(v)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(w.get(59)),this._zoneManager.setPixelRatio(w.get(129)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(D){const I=this._context.configuration.options;return D.hasChanged(59)&&(this._zoneManager.setLineHeight(I.get(59)),this._render()),D.hasChanged(129)&&(this._zoneManager.setPixelRatio(I.get(129)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(D){return this._render(),!0}onScrollChanged(D){return D.scrollHeightChanged&&(this._zoneManager.setOuterHeight(D.scrollHeight),this._render()),!0}onZonesChanged(D){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(D){this._domNode.setTop(D.top),this._domNode.setRight(D.right);let I=!1;I=this._zoneManager.setDOMWidth(D.width)||I,I=this._zoneManager.setDOMHeight(D.height)||I,I&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(D){this._zoneManager.setZones(D),this._render()}_render(){if(this._zoneManager.getOuterHeight()===0)return!1;const D=this._zoneManager.getCanvasWidth(),I=this._zoneManager.getCanvasHeight(),w=this._zoneManager.resolveColorZones(),v=this._zoneManager.getId2Color(),C=this._domNode.domNode.getContext("2d");return C.clearRect(0,0,D,I),w.length>0&&this._renderOneLane(C,w,v,D),!0}_renderOneLane(D,I,w,v){let C=0,o=0,c=0;for(const i of I){const S=i.colorId,s=i.from,l=i.to;S!==C?(D.fillRect(0,o,v,c-o),C=S,D.fillStyle=w[C],o=s,c=l):c>=s?c=Math.max(c,l):(D.fillRect(0,o,v,c-o),o=s,c=l)}D.fillRect(0,o,v,c-o)}}e.OverviewRuler=A}),define(ne[1185],re([1,0,1146]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewContext=void 0;class f{constructor(A,k,D){this.configuration=A,this.theme=new t.EditorTheme(k),this.viewModel=D,this.viewLayout=D.viewLayout}addEventHandler(A){this.viewModel.addViewEventHandler(A)}removeEventHandler(A){this.viewModel.removeViewEventHandler(A)}}e.ViewContext=f}),define(ne[536],re([1,0,6,2]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReadOnlyEditAttemptEvent=e.CursorStateChangedEvent=e.HiddenAreasChangedEvent=e.ViewZonesChangedEvent=e.ScrollChangedEvent=e.FocusChangedEvent=e.ContentSizeChangedEvent=e.OutgoingViewModelEventKind=e.ViewModelEventsCollector=e.ViewModelEventDispatcher=void 0;class _ extends f.Disposable{constructor(){super();this._onEvent=this._register(new t.Emitter),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(S){this._addOutgoingEvent(S),this._emitOutgoingEvents()}_addOutgoingEvent(S){for(let s=0,l=this._outgoingEvents.length;s<l;s++)if(this._outgoingEvents[s].kind===S.kind){this._outgoingEvents[s]=this._outgoingEvents[s].merge(S);return}this._outgoingEvents.push(S)}_emitOutgoingEvents(){for(;this._outgoingEvents.length>0;){if(this._collector||this._isConsumingViewEventQueue)return;const S=this._outgoingEvents.shift();S.isNoOp()||this._onEvent.fire(S)}}addViewEventHandler(S){for(let s=0,l=this._eventHandlers.length;s<l;s++)this._eventHandlers[s]===S&&console.warn("Detected duplicate listener in ViewEventDispatcher",S);this._eventHandlers.push(S)}removeViewEventHandler(S){for(let s=0;s<this._eventHandlers.length;s++)if(this._eventHandlers[s]===S){this._eventHandlers.splice(s,1);break}}beginEmitViewEvents(){return this._collectorCnt++,this._collectorCnt===1&&(this._collector=new A),this._collector}endEmitViewEvents(){if(this._collectorCnt--,this._collectorCnt===0){const S=this._collector.outgoingEvents,s=this._collector.viewEvents;this._collector=null;for(const l of S)this._addOutgoingEvent(l);s.length>0&&this._emitMany(s)}this._emitOutgoingEvents()}emitSingleViewEvent(S){try{this.beginEmitViewEvents().emitViewEvent(S)}finally{this.endEmitViewEvents()}}_emitMany(S){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(S):this._viewEventQueue=S,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const S=this._viewEventQueue;this._viewEventQueue=null;const s=this._eventHandlers.slice(0);for(const l of s)l.handleEvents(S)}}}e.ViewModelEventDispatcher=_;class A{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(S){this.viewEvents.push(S)}emitOutgoingEvent(S){this.outgoingEvents.push(S)}}e.ViewModelEventsCollector=A;var k;(function(i){i[i.ContentSizeChanged=0]="ContentSizeChanged",i[i.FocusChanged=1]="FocusChanged",i[i.ScrollChanged=2]="ScrollChanged",i[i.ViewZonesChanged=3]="ViewZonesChanged",i[i.HiddenAreasChanged=4]="HiddenAreasChanged",i[i.ReadOnlyEditAttempt=5]="ReadOnlyEditAttempt",i[i.CursorStateChanged=6]="CursorStateChanged"})(k=e.OutgoingViewModelEventKind||(e.OutgoingViewModelEventKind={}));class D{constructor(S,s,l,r){this.kind=0,this._oldContentWidth=S,this._oldContentHeight=s,this.contentWidth=l,this.contentHeight=r,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}merge(S){return S.kind!==0?this:new D(this._oldContentWidth,this._oldContentHeight,S.contentWidth,S.contentHeight)}}e.ContentSizeChangedEvent=D;class I{constructor(S,s){this.kind=1,this.oldHasFocus=S,this.hasFocus=s}isNoOp(){return this.oldHasFocus===this.hasFocus}merge(S){return S.kind!==1?this:new I(this.oldHasFocus,S.hasFocus)}}e.FocusChangedEvent=I;class w{constructor(S,s,l,r,p,u,a,n){this.kind=2,this._oldScrollWidth=S,this._oldScrollLeft=s,this._oldScrollHeight=l,this._oldScrollTop=r,this.scrollWidth=p,this.scrollLeft=u,this.scrollHeight=a,this.scrollTop=n,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}merge(S){return S.kind!==2?this:new w(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,S.scrollWidth,S.scrollLeft,S.scrollHeight,S.scrollTop)}}e.ScrollChangedEvent=w;class v{constructor(){this.kind=3}isNoOp(){return!1}merge(S){return this}}e.ViewZonesChangedEvent=v;class C{constructor(){this.kind=4}isNoOp(){return!1}merge(S){return this}}e.HiddenAreasChangedEvent=C;class o{constructor(S,s,l,r,p,u,a){this.kind=6,this.oldSelections=S,this.selections=s,this.oldModelVersionId=l,this.modelVersionId=r,this.source=p,this.reason=u,this.reachedMaxCursorCount=a}static _selectionsAreEqual(S,s){if(!S&&!s)return!0;if(!S||!s)return!1;const l=S.length,r=s.length;if(l!==r)return!1;for(let p=0;p<l;p++)if(!S[p].equalsSelection(s[p]))return!1;return!0}isNoOp(){return o._selectionsAreEqual(this.oldSelections,this.selections)&&this.oldModelVersionId===this.modelVersionId}merge(S){return S.kind!==6?this:new o(this.oldSelections,S.selections,this.oldModelVersionId,S.modelVersionId,S.source,S.reason,this.reachedMaxCursorCount||S.reachedMaxCursorCount)}}e.CursorStateChangedEvent=o;class c{constructor(){this.kind=5}isNoOp(){return!1}merge(S){return this}}e.ReadOnlyEditAttemptEvent=c}),define(ne[1186],re([1,0,6,2,444,1180,259,536]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewLayout=void 0;const I=125;class w{constructor(c,i,S,s){c=c|0,i=i|0,S=S|0,s=s|0,c<0&&(c=0),i<0&&(i=0),S<0&&(S=0),s<0&&(s=0),this.width=c,this.contentWidth=i,this.scrollWidth=Math.max(c,i),this.height=S,this.contentHeight=s,this.scrollHeight=Math.max(S,s)}equals(c){return this.width===c.width&&this.contentWidth===c.contentWidth&&this.height===c.height&&this.contentHeight===c.contentHeight}}class v extends f.Disposable{constructor(c,i){super();this._onDidContentSizeChange=this._register(new t.Emitter),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new w(0,0,0,0),this._scrollable=this._register(new _.Scrollable({forceIntegerValues:!0,smoothScrollDuration:c,scheduleAtNextAnimationFrame:i})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(c){this._scrollable.setSmoothScrollDuration(c)}validateScrollPosition(c){return this._scrollable.validateScrollPosition(c)}getScrollDimensions(){return this._dimensions}setScrollDimensions(c){if(this._dimensions.equals(c))return;const i=this._dimensions;this._dimensions=c,this._scrollable.setScrollDimensions({width:c.width,scrollWidth:c.scrollWidth,height:c.height,scrollHeight:c.scrollHeight},!0);const S=i.contentWidth!==c.contentWidth,s=i.contentHeight!==c.contentHeight;(S||s)&&this._onDidContentSizeChange.fire(new D.ContentSizeChangedEvent(i.contentWidth,i.contentHeight,c.contentWidth,c.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(c){this._scrollable.setScrollPositionNow(c)}setScrollPositionSmooth(c){this._scrollable.setScrollPositionSmooth(c)}}class C extends f.Disposable{constructor(c,i,S){super();this._configuration=c;const s=this._configuration.options,l=s.get(131),r=s.get(75);this._linesLayout=new A.LinesLayout(i,s.get(59),r.top,r.bottom),this._scrollable=this._register(new v(0,S)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new w(l.contentWidth,0,l.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(103)?I:0)}onConfigurationChanged(c){const i=this._configuration.options;if(c.hasChanged(59)&&this._linesLayout.setLineHeight(i.get(59)),c.hasChanged(75)){const S=i.get(75);this._linesLayout.setPadding(S.top,S.bottom)}if(c.hasChanged(131)){const S=i.get(131),s=S.contentWidth,l=S.height,r=this._scrollable.getScrollDimensions(),p=r.contentWidth;this._scrollable.setScrollDimensions(new w(s,r.contentWidth,l,this._getContentHeight(s,l,p)))}else this._updateHeight();c.hasChanged(103)&&this._configureSmoothScrollDuration()}onFlushed(c){this._linesLayout.onFlushed(c)}onLinesDeleted(c,i){this._linesLayout.onLinesDeleted(c,i)}onLinesInserted(c,i){this._linesLayout.onLinesInserted(c,i)}_getHorizontalScrollbarHeight(c,i){const s=this._configuration.options.get(92);return s.horizontal===2||c>=i?0:s.horizontalScrollbarSize}_getContentHeight(c,i,S){const s=this._configuration.options;let l=this._linesLayout.getLinesTotalHeight();return s.get(94)?l+=Math.max(0,i-s.get(59)-s.get(75).bottom):l+=this._getHorizontalScrollbarHeight(c,S),l}_updateHeight(){const c=this._scrollable.getScrollDimensions(),i=c.width,S=c.height,s=c.contentWidth;this._scrollable.setScrollDimensions(new w(i,c.contentWidth,S,this._getContentHeight(i,S,s)))}getCurrentViewport(){const c=this._scrollable.getScrollDimensions(),i=this._scrollable.getCurrentScrollPosition();return new k.Viewport(i.scrollTop,i.scrollLeft,c.width,c.height)}getFutureViewport(){const c=this._scrollable.getScrollDimensions(),i=this._scrollable.getFutureScrollPosition();return new k.Viewport(i.scrollTop,i.scrollLeft,c.width,c.height)}_computeContentWidth(c){const i=this._configuration.options,S=i.get(132),s=i.get(44);if(S.isViewportWrapping){const l=i.get(131),r=i.get(65);return c>l.contentWidth+s.typicalHalfwidthCharacterWidth&&r.enabled&&r.side==="right"?c+l.verticalScrollbarWidth:c}else{const l=i.get(93)*s.typicalHalfwidthCharacterWidth,r=this._linesLayout.getWhitespaceMinWidth();return Math.max(c+l,r)}}setMaxLineWidth(c){const i=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new w(i.width,this._computeContentWidth(c),i.height,i.contentHeight)),this._updateHeight()}saveState(){const c=this._scrollable.getFutureScrollPosition(),i=c.scrollTop,S=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(i),s=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(S);return{scrollTop:i,scrollTopWithoutViewZones:i-s,scrollLeft:c.scrollLeft}}changeWhitespace(c){const i=this._linesLayout.changeWhitespace(c);return i&&this.onHeightMaybeChanged(),i}getVerticalOffsetForLineNumber(c){return this._linesLayout.getVerticalOffsetForLineNumber(c)}isAfterLines(c){return this._linesLayout.isAfterLines(c)}isInTopPadding(c){return this._linesLayout.isInTopPadding(c)}isInBottomPadding(c){return this._linesLayout.isInBottomPadding(c)}getLineNumberAtVerticalOffset(c){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(c)}getWhitespaceAtVerticalOffset(c){return this._linesLayout.getWhitespaceAtVerticalOffset(c)}getLinesViewportData(){const c=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(c.top,c.top+c.height)}getLinesViewportDataAtScrollTop(c){const i=this._scrollable.getScrollDimensions();return c+i.height>i.scrollHeight&&(c=i.scrollHeight-i.height),c<0&&(c=0),this._linesLayout.getLinesViewportData(c,c+i.height)}getWhitespaceViewportData(){const c=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(c.top,c.top+c.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(c){return this._scrollable.validateScrollPosition(c)}setScrollPosition(c,i){i===1?this._scrollable.setScrollPositionNow(c):this._scrollable.setScrollPositionSmooth(c)}deltaScrollNow(c,i){const S=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:S.scrollLeft+c,scrollTop:S.scrollTop+i})}}e.ViewLayout=C}),define(ne[1187],re([1,0,20,84]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveCaretCommand=void 0;class _{constructor(k,D){this._selection=k,this._isMovingLeft=D}getEditOperations(k,D){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const I=this._selection.startLineNumber,w=this._selection.startColumn,v=this._selection.endColumn;if(!(this._isMovingLeft&&w===1)&&!(!this._isMovingLeft&&v===k.getLineMaxColumn(I)))if(this._isMovingLeft){const C=new t.Range(I,w-1,I,w),o=k.getValueInRange(C);D.addEditOperation(C,null),D.addEditOperation(new t.Range(I,v,I,v),o)}else{const C=new t.Range(I,v,I,v+1),o=k.getValueInRange(C);D.addEditOperation(C,null),D.addEditOperation(new t.Range(I,w,I,w),o)}}computeCursorState(k,D){return this._isMovingLeft?new f.Selection(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new f.Selection(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}e.MoveCaretCommand=_}),define(ne[260],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionCommandArgs=e.filtersAction=e.mayIncludeActionsOfKind=e.CodeActionAutoApply=e.CodeActionKind=void 0;class t{constructor(w){this.value=w}equals(w){return this.value===w.value}contains(w){return this.equals(w)||this.value===""||w.value.startsWith(this.value+t.sep)}intersects(w){return this.contains(w)||w.contains(this)}append(w){return new t(this.value+t.sep+w)}}e.CodeActionKind=t,t.sep=".",t.None=new t("@@none@@"),t.Empty=new t(""),t.QuickFix=new t("quickfix"),t.Refactor=new t("refactor"),t.Source=new t("source"),t.SourceOrganizeImports=t.Source.append("organizeImports"),t.SourceFixAll=t.Source.append("fixAll");var f;(function(I){I.IfSingle="ifSingle",I.First="first",I.Never="never"})(f=e.CodeActionAutoApply||(e.CodeActionAutoApply={}));function _(I,w){return!(I.include&&!I.include.intersects(w)||I.excludes&&I.excludes.some(v=>k(w,v,I.include))||!I.includeSourceActions&&t.Source.contains(w))}e.mayIncludeActionsOfKind=_;function A(I,w){const v=w.kind?new t(w.kind):void 0;return!(I.include&&(!v||!I.include.contains(v))||I.excludes&&v&&I.excludes.some(C=>k(v,C,I.include))||!I.includeSourceActions&&v&&t.Source.contains(v)||I.onlyIncludePreferredActions&&!w.isPreferred)}e.filtersAction=A;function k(I,w,v){return!(!w.contains(I)||v&&w.contains(v))}class D{constructor(w,v,C){this.kind=w,this.apply=v,this.preferred=C}static fromUser(w,v){return!w||typeof w!="object"?new D(v.kind,v.apply,!1):new D(D.getKindFromUser(w,v.kind),D.getApplyFromUser(w,v.apply),D.getPreferredUser(w))}static getApplyFromUser(w,v){switch(typeof w.apply=="string"?w.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return v}}static getKindFromUser(w,v){return typeof w.kind=="string"?new t(w.kind):v}static getPreferredUser(w){return typeof w.preferred=="boolean"?w.preferred:!1}}e.CodeActionCommandArgs=D}),define(ne[1188],re([1,0,6]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPickerModel=void 0;class f{constructor(A,k,D){this.presentationIndex=D,this._onColorFlushed=new t.Emitter,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new t.Emitter,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new t.Emitter,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=A,this._color=A,this._colorPresentations=k}get color(){return this._color}set color(A){this._color.equals(A)||(this._color=A,this._onDidChangeColor.fire(A))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(A){this._colorPresentations=A,this.presentationIndex>A.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(A,k){for(let D=0;D<this.colorPresentations.length;D++)if(k.toLowerCase()===this.colorPresentations[D].label){this.presentationIndex=D,this._onDidChangePresentation.fire(this.presentation);break}}flushColor(){this._onColorFlushed.fire(this._color)}}e.ColorPickerModel=f}),define(ne[706],re([1,0,136,49,20,84]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BlockCommentCommand=void 0;class k{constructor(I,w,v){this.languageConfigurationService=v,this._selection=I,this._insertSpace=w,this._usedEndToken=null}static _haystackHasNeedleAtOffset(I,w,v){if(v<0)return!1;const C=w.length,o=I.length;if(v+C>o)return!1;for(let c=0;c<C;c++){const i=I.charCodeAt(v+c),S=w.charCodeAt(c);if(i!==S&&!(i>=65&&i<=90&&i+32===S)&&!(S>=65&&S<=90&&S+32===i))return!1}return!0}_createOperationsForBlockComment(I,w,v,C,o,c){const i=I.startLineNumber,S=I.startColumn,s=I.endLineNumber,l=I.endColumn,r=o.getLineContent(i),p=o.getLineContent(s);let u=r.lastIndexOf(w,S-1+w.length),a=p.indexOf(v,l-1-v.length);if(u!==-1&&a!==-1)if(i===s)r.substring(u+w.length,a).indexOf(v)>=0&&(u=-1,a=-1);else{const h=r.substring(u+w.length),g=p.substring(0,a);(h.indexOf(v)>=0||g.indexOf(v)>=0)&&(u=-1,a=-1)}let n;u!==-1&&a!==-1?(C&&u+w.length<r.length&&r.charCodeAt(u+w.length)===32&&(w=w+" "),C&&a>0&&p.charCodeAt(a-1)===32&&(v=" "+v,a-=1),n=k._createRemoveBlockCommentOperations(new _.Range(i,u+w.length+1,s,a+1),w,v)):(n=k._createAddBlockCommentOperations(I,w,v,this._insertSpace),this._usedEndToken=n.length===1?v:null);for(const h of n)c.addTrackedEditOperation(h.range,h.text)}static _createRemoveBlockCommentOperations(I,w,v){let C=[];return _.Range.isEmpty(I)?C.push(t.EditOperation.delete(new _.Range(I.startLineNumber,I.startColumn-w.length,I.endLineNumber,I.endColumn+v.length))):(C.push(t.EditOperation.delete(new _.Range(I.startLineNumber,I.startColumn-w.length,I.startLineNumber,I.startColumn))),C.push(t.EditOperation.delete(new _.Range(I.endLineNumber,I.endColumn,I.endLineNumber,I.endColumn+v.length)))),C}static _createAddBlockCommentOperations(I,w,v,C){let o=[];return _.Range.isEmpty(I)?o.push(t.EditOperation.replace(new _.Range(I.startLineNumber,I.startColumn,I.endLineNumber,I.endColumn),w+" "+v)):(o.push(t.EditOperation.insert(new f.Position(I.startLineNumber,I.startColumn),w+(C?" ":""))),o.push(t.EditOperation.insert(new f.Position(I.endLineNumber,I.endColumn),(C?" ":"")+v))),o}getEditOperations(I,w){const v=this._selection.startLineNumber,C=this._selection.startColumn;I.tokenizeIfCheap(v);const o=I.getLanguageIdAtPosition(v,C),c=this.languageConfigurationService.getLanguageConfiguration(o).comments;!c||!c.blockCommentStartToken||!c.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,c.blockCommentStartToken,c.blockCommentEndToken,this._insertSpace,I,w)}computeCursorState(I,w){const v=w.getInverseEditOperations();if(v.length===2){const C=v[0],o=v[1];return new A.Selection(C.range.endLineNumber,C.range.endColumn,o.range.startLineNumber,o.range.startColumn)}else{const C=v[0].range,o=this._usedEndToken?-this._usedEndToken.length-1:0;return new A.Selection(C.endLineNumber,C.endColumn+o,C.endLineNumber,C.endColumn+o)}}}e.BlockCommentCommand=k}),define(ne[1189],re([1,0,20,84]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DragAndDropCommand=void 0;class _{constructor(k,D,I){this.selection=k,this.targetPosition=D,this.copy=I,this.targetSelection=null}getEditOperations(k,D){let I=k.getValueInRange(this.selection);if(this.copy||D.addEditOperation(this.selection,null),D.addEditOperation(new t.Range(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),I),this.selection.containsPosition(this.targetPosition)&&!(this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition)))){this.targetSelection=this.selection;return}if(this.copy){this.targetSelection=new f.Selection(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber>this.selection.endLineNumber){this.targetSelection=new f.Selection(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber<this.selection.endLineNumber){this.targetSelection=new f.Selection(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber+this.selection.endLineNumber-this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}this.selection.endColumn<=this.targetPosition.column?this.targetSelection=new f.Selection(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column-this.selection.endColumn+this.selection.startColumn:this.targetPosition.column-this.selection.endColumn+this.selection.startColumn,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column:this.selection.endColumn):this.targetSelection=new f.Selection(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column+this.selection.endColumn-this.selection.startColumn)}computeCursorState(k,D){return this.targetSelection}}e.DragAndDropCommand=_}),define(ne[1190],re([1,0,20]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaceAllCommand=void 0;class f{constructor(A,k,D){this._editorSelection=A,this._ranges=k,this._replaceStrings=D,this._trackedEditorSelectionId=null}getEditOperations(A,k){if(this._ranges.length>0){let D=[];for(let v=0;v<this._ranges.length;v++)D.push({range:this._ranges[v],text:this._replaceStrings[v]});D.sort((v,C)=>t.Range.compareRangesUsingStarts(v.range,C.range));let I=[],w=D[0];for(let v=1;v<D.length;v++)w.range.endLineNumber===D[v].range.startLineNumber&&w.range.endColumn===D[v].range.startColumn?(w.range=w.range.plusRange(D[v].range),w.text=w.text+D[v].text):(I.push(w),w=D[v]);I.push(w);for(const v of I)k.addEditOperation(v.range,v.text)}this._trackedEditorSelectionId=k.trackSelection(this._editorSelection)}computeCursorState(A,k){return k.getTrackedSelection(this._trackedEditorSelectionId)}}e.ReplaceAllCommand=f}),define(ne[707],re([1,0,650]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseReplaceString=e.ReplacePiece=e.ReplacePattern=void 0;var f;(function(v){v[v.StaticValue=0]="StaticValue",v[v.DynamicPieces=1]="DynamicPieces"})(f||(f={}));class _{constructor(C){this.staticValue=C,this.kind=0}}class A{constructor(C){this.pieces=C,this.kind=1}}class k{constructor(C){!C||C.length===0?this._state=new _(""):C.length===1&&C[0].staticValue!==null?this._state=new _(C[0].staticValue):this._state=new A(C)}static fromStaticValue(C){return new k([D.staticValue(C)])}get hasReplacementPatterns(){return this._state.kind===1}buildReplaceString(C,o){if(this._state.kind===0)return o?(0,t.buildReplaceStringWithCasePreserved)(C,this._state.staticValue):this._state.staticValue;let c="";for(let i=0,S=this._state.pieces.length;i<S;i++){let s=this._state.pieces[i];if(s.staticValue!==null){c+=s.staticValue;continue}let l=k._substitute(s.matchIndex,C);if(s.caseOps!==null&&s.caseOps.length>0){let r=[],p=s.caseOps.length,u=0;for(let a=0,n=l.length;a<n;a++){if(u>=p){r.push(l.slice(a));break}switch(s.caseOps[u]){case"U":r.push(l[a].toUpperCase());break;case"u":r.push(l[a].toUpperCase()),u++;break;case"L":r.push(l[a].toLowerCase());break;case"l":r.push(l[a].toLowerCase()),u++;break;default:r.push(l[a])}}l=r.join("")}c+=l}return c}static _substitute(C,o){if(o===null)return"";if(C===0)return o[0];let c="";for(;C>0;){if(C<o.length)return(o[C]||"")+c;c=String(C%10)+c,C=Math.floor(C/10)}return"$"+c}}e.ReplacePattern=k;class D{constructor(C,o,c){this.staticValue=C,this.matchIndex=o,!c||c.length===0?this.caseOps=null:this.caseOps=c.slice(0)}static staticValue(C){return new D(C,-1,null)}static matchIndex(C){return new D(null,C,null)}static caseOps(C,o){return new D(null,C,o)}}e.ReplacePiece=D;class I{constructor(C){this._source=C,this._lastCharIndex=0,this._result=[],this._resultLen=0,this._currentStaticPiece=""}emitUnchanged(C){this._emitStatic(this._source.substring(this._lastCharIndex,C)),this._lastCharIndex=C}emitStatic(C,o){this._emitStatic(C),this._lastCharIndex=o}_emitStatic(C){C.length!==0&&(this._currentStaticPiece+=C)}emitMatchIndex(C,o,c){this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=D.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),this._result[this._resultLen++]=D.caseOps(C,c),this._lastCharIndex=o}finalize(){return this.emitUnchanged(this._source.length),this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=D.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),new k(this._result)}}function w(v){if(!v||v.length===0)return new k(null);let C=[],o=new I(v);for(let c=0,i=v.length;c<i;c++){let S=v.charCodeAt(c);if(S===92){if(c++,c>=i)break;let s=v.charCodeAt(c);switch(s){case 92:o.emitUnchanged(c-1),o.emitStatic("\\",c+1);break;case 110:o.emitUnchanged(c-1),o.emitStatic(` `,c+1);break;case 116:o.emitUnchanged(c-1),o.emitStatic(" ",c+1);break;case 117:case 85:case 108:case 76:o.emitUnchanged(c-1),o.emitStatic("",c+1),C.push(String.fromCharCode(s));break}continue}if(S===36){if(c++,c>=i)break;let s=v.charCodeAt(c);if(s===36){o.emitUnchanged(c-1),o.emitStatic("$",c+1);continue}if(s===48||s===38){o.emitUnchanged(c-1),o.emitMatchIndex(0,c+1,C),C.length=0;continue}if(49<=s&&s<=57){let l=s-48;if(c+1<i){let r=v.charCodeAt(c+1);if(48<=r&&r<=57){c++,l=l*10+(r-48),o.emitUnchanged(c-2),o.emitMatchIndex(l,c+1,C),C.length=0;continue}}o.emitUnchanged(c-1),o.emitMatchIndex(l,c+1,C),C.length=0;continue}}}return o.finalize()}e.parseReplaceString=w}),define(ne[461],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRegion=e.FoldingRegions=e.MAX_LINE_NUMBER=e.MAX_FOLDING_REGIONS=void 0,e.MAX_FOLDING_REGIONS=65535,e.MAX_LINE_NUMBER=16777215;const t=4278190080;class f{constructor(k,D,I){if(k.length!==D.length||k.length>e.MAX_FOLDING_REGIONS)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=k,this._endIndexes=D,this._collapseStates=new Uint32Array(Math.ceil(k.length/32)),this._types=I,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;let k=[],D=(I,w)=>{let v=k[k.length-1];return this.getStartLineNumber(v)<=I&&this.getEndLineNumber(v)>=w};for(let I=0,w=this._startIndexes.length;I<w;I++){let v=this._startIndexes[I],C=this._endIndexes[I];if(v>e.MAX_LINE_NUMBER||C>e.MAX_LINE_NUMBER)throw new Error("startLineNumber or endLineNumber must not exceed "+e.MAX_LINE_NUMBER);for(;k.length>0&&!D(v,C);)k.pop();let o=k.length>0?k[k.length-1]:-1;k.push(I),this._startIndexes[I]=v+((o&255)<<24),this._endIndexes[I]=C+((o&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(k){return this._startIndexes[k]&e.MAX_LINE_NUMBER}getEndLineNumber(k){return this._endIndexes[k]&e.MAX_LINE_NUMBER}getType(k){return this._types?this._types[k]:void 0}hasTypes(){return!!this._types}isCollapsed(k){let D=k/32|0,I=k%32;return(this._collapseStates[D]&1<<I)!=0}setCollapsed(k,D){let I=k/32|0,w=k%32,v=this._collapseStates[I];D?this._collapseStates[I]=v|1<<w:this._collapseStates[I]=v&~(1<<w)}setCollapsedAllOfType(k,D){let I=!1;if(this._types)for(let w=0;w<this._types.length;w++)this._types[w]===k&&(this.setCollapsed(w,D),I=!0);return I}toRegion(k){return new _(this,k)}getParentIndex(k){this.ensureParentIndices();let D=((this._startIndexes[k]&t)>>>24)+((this._endIndexes[k]&t)>>>16);return D===e.MAX_FOLDING_REGIONS?-1:D}contains(k,D){return this.getStartLineNumber(k)<=D&&this.getEndLineNumber(k)>=D}findIndex(k){let D=0,I=this._startIndexes.length;if(I===0)return-1;for(;D<I;){let w=Math.floor((D+I)/2);k<this.getStartLineNumber(w)?I=w:D=w+1}return D-1}findRange(k){let D=this.findIndex(k);if(D>=0){if(this.getEndLineNumber(D)>=k)return D;for(D=this.getParentIndex(D);D!==-1;){if(this.contains(D,k))return D;D=this.getParentIndex(D)}}return-1}toString(){let k=[];for(let D=0;D<this.length;D++)k[D]=`[${this.isCollapsed(D)?"+":"-"}] ${this.getStartLineNumber(D)}/${this.getEndLineNumber(D)}`;return k.join(", ")}equals(k){if(this.length!==k.length)return!1;for(let D=0;D<this.length;D++)if(this.getStartLineNumber(D)!==k.getStartLineNumber(D)||this.getEndLineNumber(D)!==k.getEndLineNumber(D)||this.getType(D)!==k.getType(D))return!1;return!0}}e.FoldingRegions=f;class _{constructor(k,D){this.ranges=k,this.index=D}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(k){return k.startLineNumber<=this.startLineNumber&&k.endLineNumber>=this.endLineNumber}containsLine(k){return this.startLineNumber<=k&&k<=this.endLineNumber}hidesLine(k){return this.startLineNumber<k&&k<=this.endLineNumber}}e.FoldingRegion=_}),define(ne[1191],re([1,0,6,461]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getNextFoldLine=e.getPreviousFoldLine=e.getParentFoldLine=e.setCollapseStateForType=e.setCollapseStateForMatchingLines=e.setCollapseStateForRest=e.setCollapseStateAtLevel=e.setCollapseStateUp=e.setCollapseStateLevelsUp=e.setCollapseStateLevelsDown=e.toggleCollapseState=e.FoldingModel=void 0;class _{constructor(l,r){this._updateEventEmitter=new t.Emitter,this.onDidChange=this._updateEventEmitter.event,this._textModel=l,this._decorationProvider=r,this._regions=new f.FoldingRegions(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[],this._isInitialized=!1}get regions(){return this._regions}get textModel(){return this._textModel}get isInitialized(){return this._isInitialized}get decorationProvider(){return this._decorationProvider}toggleCollapseState(l){if(!l.length)return;l=l.sort((p,u)=>p.regionIndex-u.regionIndex);const r={};this._decorationProvider.changeDecorations(p=>{let u=0,a=-1,n=-1;const h=g=>{for(;u<g;){const d=this._regions.getEndLineNumber(u),m=this._regions.isCollapsed(u);d<=a&&p.changeDecorationOptions(this._editorDecorationIds[u],this._decorationProvider.getDecorationOption(m,d<=n)),m&&d>n&&(n=d),u++}};for(let g of l){let d=g.regionIndex,m=this._editorDecorationIds[d];if(m&&!r[m]){r[m]=!0,h(d);let b=!this._regions.isCollapsed(d);this._regions.setCollapsed(d,b),a=Math.max(a,this._regions.getEndLineNumber(d))}}h(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:l})}update(l,r=[]){let p=[],u=(b,E)=>{for(let y of r)if(b<y&&y<=E)return!0;return!1},a=-1,n=(b,E)=>{const y=l.getStartLineNumber(b),T=l.getEndLineNumber(b);E||(E=l.isCollapsed(b)),E&&u(y,T)&&(E=!1),l.setCollapsed(b,E);const R=this._textModel.getLineMaxColumn(y),O={startLineNumber:y,startColumn:Math.max(R-1,1),endLineNumber:y,endColumn:R};p.push({range:O,options:this._decorationProvider.getDecorationOption(E,T<=a)}),E&&T>a&&(a=T)},h=0,g=()=>{for(;h<this._regions.length;){let b=this._regions.isCollapsed(h);if(h++,b)return h-1}return-1},d=0,m=g();for(;m!==-1&&d<l.length;){let b=this._textModel.getDecorationRange(this._editorDecorationIds[m]);if(b){let E=b.startLineNumber;if(b.startColumn===Math.max(b.endColumn-1,1)&&this._textModel.getLineMaxColumn(E)===b.endColumn)for(;d<l.length;){let y=l.getStartLineNumber(d);if(E>=y)n(d,E===y),d++;else break}}m=g()}for(;d<l.length;)n(d,!1),d++;this._editorDecorationIds=this._decorationProvider.deltaDecorations(this._editorDecorationIds,p),this._regions=l,this._isInitialized=!0,this._updateEventEmitter.fire({model:this})}getMemento(){let l=[];for(let r=0;r<this._regions.length;r++)if(this._regions.isCollapsed(r)){let p=this._textModel.getDecorationRange(this._editorDecorationIds[r]);if(p){let u=p.startLineNumber,a=p.endLineNumber+this._regions.getEndLineNumber(r)-this._regions.getStartLineNumber(r);l.push({startLineNumber:u,endLineNumber:a})}}if(l.length>0)return l}applyMemento(l){if(!Array.isArray(l))return;let r=[];for(let p of l){let u=this.getRegionAtLine(p.startLineNumber);u&&!u.isCollapsed&&r.push(u)}this.toggleCollapseState(r)}dispose(){this._decorationProvider.deltaDecorations(this._editorDecorationIds,[])}getAllRegionsAtLine(l,r){let p=[];if(this._regions){let u=this._regions.findRange(l),a=1;for(;u>=0;){let n=this._regions.toRegion(u);(!r||r(n,a))&&p.push(n),a++,u=n.parentIndex}}return p}getRegionAtLine(l){if(this._regions){let r=this._regions.findRange(l);if(r>=0)return this._regions.toRegion(r)}return null}getRegionsInside(l,r){let p=[],u=l?l.regionIndex+1:0,a=l?l.endLineNumber:Number.MAX_VALUE;if(r&&r.length===2){const n=[];for(let h=u,g=this._regions.length;h<g;h++){let d=this._regions.toRegion(h);if(this._regions.getStartLineNumber(h)<a){for(;n.length>0&&!d.containedBy(n[n.length-1]);)n.pop();n.push(d),r(d,n.length)&&p.push(d)}else break}}else for(let n=u,h=this._regions.length;n<h;n++){let g=this._regions.toRegion(n);if(this._regions.getStartLineNumber(n)<a)(!r||r(g))&&p.push(g);else break}return p}}e.FoldingModel=_;function A(s,l,r){let p=[];for(let u of r){let a=s.getRegionAtLine(u);if(a){const n=!a.isCollapsed;if(p.push(a),l>1){let h=s.getRegionsInside(a,(g,d)=>g.isCollapsed!==n&&d<l);p.push(...h)}}}s.toggleCollapseState(p)}e.toggleCollapseState=A;function k(s,l,r=Number.MAX_VALUE,p){let u=[];if(p&&p.length>0)for(let a of p){let n=s.getRegionAtLine(a);if(n&&(n.isCollapsed!==l&&u.push(n),r>1)){let h=s.getRegionsInside(n,(g,d)=>g.isCollapsed!==l&&d<r);u.push(...h)}}else{let a=s.getRegionsInside(null,(n,h)=>n.isCollapsed!==l&&h<r);u.push(...a)}s.toggleCollapseState(u)}e.setCollapseStateLevelsDown=k;function D(s,l,r,p){let u=[];for(let a of p){let n=s.getAllRegionsAtLine(a,(h,g)=>h.isCollapsed!==l&&g<=r);u.push(...n)}s.toggleCollapseState(u)}e.setCollapseStateLevelsUp=D;function I(s,l,r){let p=[];for(let u of r){let a=s.getAllRegionsAtLine(u,n=>n.isCollapsed!==l);a.length>0&&p.push(a[0])}s.toggleCollapseState(p)}e.setCollapseStateUp=I;function w(s,l,r,p){let u=(n,h)=>h===l&&n.isCollapsed!==r&&!p.some(g=>n.containsLine(g)),a=s.getRegionsInside(null,u);s.toggleCollapseState(a)}e.setCollapseStateAtLevel=w;function v(s,l,r){let p=[];for(let n of r){const h=s.getAllRegionsAtLine(n,void 0);h.length>0&&p.push(h[0])}let u=n=>p.every(h=>!h.containedBy(n)&&!n.containedBy(h))&&n.isCollapsed!==l,a=s.getRegionsInside(null,u);s.toggleCollapseState(a)}e.setCollapseStateForRest=v;function C(s,l,r){let p=s.textModel,u=s.regions,a=[];for(let n=u.length-1;n>=0;n--)if(r!==u.isCollapsed(n)){let h=u.getStartLineNumber(n);l.test(p.getLineContent(h))&&a.push(u.toRegion(n))}s.toggleCollapseState(a)}e.setCollapseStateForMatchingLines=C;function o(s,l,r){let p=s.regions,u=[];for(let a=p.length-1;a>=0;a--)r!==p.isCollapsed(a)&&l===p.getType(a)&&u.push(p.toRegion(a));s.toggleCollapseState(u)}e.setCollapseStateForType=o;function c(s,l){let r=null,p=l.getRegionAtLine(s);if(p!==null&&(r=p.startLineNumber,s===r)){let u=p.parentIndex;u!==-1?r=l.regions.getStartLineNumber(u):r=null}return r}e.getParentFoldLine=c;function i(s,l){let r=l.getRegionAtLine(s);if(r!==null&&r.startLineNumber===s){if(s!==r.startLineNumber)return r.startLineNumber;{let p=r.parentIndex,u=0;for(p!==-1&&(u=l.regions.getStartLineNumber(r.parentIndex));r!==null;)if(r.regionIndex>0){if(r=l.regions.toRegion(r.regionIndex-1),r.startLineNumber<=u)return null;if(r.parentIndex===p)return r.startLineNumber}else return null}}else if(l.regions.length>0)for(r=l.regions.toRegion(l.regions.length-1);r!==null;){if(r.startLineNumber<s)return r.startLineNumber;r.regionIndex>0?r=l.regions.toRegion(r.regionIndex-1):r=null}return null}e.getPreviousFoldLine=i;function S(s,l){let r=l.getRegionAtLine(s);if(r!==null&&r.startLineNumber===s){let p=r.parentIndex,u=0;if(p!==-1)u=l.regions.getEndLineNumber(r.parentIndex);else{if(l.regions.length===0)return null;u=l.regions.getEndLineNumber(l.regions.length-1)}for(;r!==null;)if(r.regionIndex<l.regions.length){if(r=l.regions.toRegion(r.regionIndex+1),r.startLineNumber>=u)return null;if(r.parentIndex===p)return r.startLineNumber}else return null}else if(l.regions.length>0)for(r=l.regions.toRegion(0);r!==null;){if(r.startLineNumber>s)return r.startLineNumber;r.regionIndex<l.regions.length?r=l.regions.toRegion(r.regionIndex+1):r=null}return null}e.getNextFoldLine=S}),define(ne[1192],re([1,0,15,6,20,340]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HiddenRangeModel=void 0;class k{constructor(v){this._updateEventEmitter=new f.Emitter,this._hasLineChanges=!1,this._foldingModel=v,this._foldingModelListener=v.onDidChange(C=>this.updateHiddenRanges()),this._hiddenRanges=[],v.regions.length&&this.updateHiddenRanges()}get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}notifyChangeModelContent(v){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=v.changes.some(C=>C.range.endLineNumber!==C.range.startLineNumber||(0,A.countEOL)(C.text)[0]!==0))}updateHiddenRanges(){let v=!1,C=[],o=0,c=0,i=Number.MAX_VALUE,S=-1,s=this._foldingModel.regions;for(;o<s.length;o++){if(!s.isCollapsed(o))continue;let l=s.getStartLineNumber(o)+1,r=s.getEndLineNumber(o);i<=l&&r<=S||(!v&&c<this._hiddenRanges.length&&this._hiddenRanges[c].startLineNumber===l&&this._hiddenRanges[c].endLineNumber===r?(C.push(this._hiddenRanges[c]),c++):(v=!0,C.push(new _.Range(l,1,r,1))),i=l,S=r)}(this._hasLineChanges||v||c<this._hiddenRanges.length)&&this.applyHiddenRanges(C)}applyMemento(v){if(!Array.isArray(v)||v.length===0)return!1;let C=[];for(let o of v){if(!o.startLineNumber||!o.endLineNumber)return!1;C.push(new _.Range(o.startLineNumber+1,1,o.endLineNumber,1))}return this.applyHiddenRanges(C),!0}getMemento(){return this._hiddenRanges.map(v=>({startLineNumber:v.startLineNumber-1,endLineNumber:v.endLineNumber}))}applyHiddenRanges(v){this._hiddenRanges=v,this._hasLineChanges=!1,this._updateEventEmitter.fire(v)}hasRanges(){return this._hiddenRanges.length>0}isHidden(v){return I(this._hiddenRanges,v)!==null}adjustSelections(v){let C=!1,o=this._foldingModel.textModel,c=null,i=S=>((!c||!D(S,c))&&(c=I(this._hiddenRanges,S)),c?c.startLineNumber-1:null);for(let S=0,s=v.length;S<s;S++){let l=v[S],r=i(l.startLineNumber);r&&(l=l.setStartPosition(r,o.getLineMaxColumn(r)),C=!0);let p=i(l.endLineNumber);p&&(l=l.setEndPosition(p,o.getLineMaxColumn(p)),C=!0),v[S]=l}return C}dispose(){this.hiddenRanges.length>0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}e.HiddenRangeModel=k;function D(w,v){return w>=v.startLineNumber&&w<=v.endLineNumber}function I(w,v){let C=(0,t.findFirstInSorted)(w,o=>v<o.startLineNumber)-1;return C>=0&&w[C].endLineNumber>=v?w[C]:null}}),define(ne[1193],re([1,0,530,461]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeRanges=e.RangesCollector=e.IndentRangeProvider=e.ID_INDENT_PROVIDER=void 0;const _=5e3;e.ID_INDENT_PROVIDER="indent";class A{constructor(w,v,C){this.editorModel=w,this.languageConfigurationService=v,this.maxFoldingRegions=C,this.id=e.ID_INDENT_PROVIDER}dispose(){}compute(w,v){let C=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,o=C&&!!C.offSide,c=C&&C.markers;return Promise.resolve(D(this.editorModel,o,c,this.maxFoldingRegions,v))}}e.IndentRangeProvider=A;class k{constructor(w,v){this._notifyTooManyRegions=v,this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=w}insertFirst(w,v,C){if(w>f.MAX_LINE_NUMBER||v>f.MAX_LINE_NUMBER)return;let o=this._length;this._startIndexes[o]=w,this._endIndexes[o]=v,this._length++,C<1e3&&(this._indentOccurrences[C]=(this._indentOccurrences[C]||0)+1)}toIndentRanges(w){if(this._length<=this._foldingRangesLimit){let v=new Uint32Array(this._length),C=new Uint32Array(this._length);for(let o=this._length-1,c=0;o>=0;o--,c++)v[c]=this._startIndexes[o],C[c]=this._endIndexes[o];return new f.FoldingRegions(v,C)}else{this._notifyTooManyRegions&&this._notifyTooManyRegions(this._foldingRangesLimit);let v=0,C=this._indentOccurrences.length;for(let S=0;S<this._indentOccurrences.length;S++){let s=this._indentOccurrences[S];if(s){if(s+v>this._foldingRangesLimit){C=S;break}v+=s}}const o=w.getOptions().tabSize;let c=new Uint32Array(this._foldingRangesLimit),i=new Uint32Array(this._foldingRangesLimit);for(let S=this._length-1,s=0;S>=0;S--){let l=this._startIndexes[S],r=w.getLineContent(l),p=(0,t.computeIndentLevel)(r,o);(p<C||p===C&&v++<this._foldingRangesLimit)&&(c[s]=l,i[s]=this._endIndexes[S],s++)}return new f.FoldingRegions(c,i)}}}e.RangesCollector=k;function D(I,w,v,C,o){const c=I.getOptions().tabSize;C=C??_;let i=new k(C,o),S;v&&(S=new RegExp(`(${v.start.source})|(?:${v.end.source})`));let s=[],l=I.getLineCount()+1;s.push({indent:-1,endAbove:l,line:l});for(let r=I.getLineCount();r>0;r--){let p=I.getLineContent(r),u=(0,t.computeIndentLevel)(p,c),a=s[s.length-1];if(u===-1){w&&(a.endAbove=r);continue}let n;if(S&&(n=p.match(S)))if(n[1]){let h=s.length-1;for(;h>0&&s[h].indent!==-2;)h--;if(h>0){s.length=h+1,a=s[h],i.insertFirst(r,a.line,u),a.line=r,a.indent=u,a.endAbove=r;continue}}else{s.push({indent:-2,endAbove:r,line:r});continue}if(a.indent>u){do s.pop(),a=s[s.length-1];while(a.indent>u);let h=a.endAbove-1;h-r>=1&&i.insertFirst(r,h,u)}a.indent===u?a.endAbove=r:s.push({indent:u,endAbove:r,line:r})}return i.toIndentRanges(I)}e.computeRanges=D}),define(ne[537],re([1,0,22,2,461]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeRanges=e.RangesCollector=e.SyntaxRangeProvider=e.ID_SYNTAX_PROVIDER=void 0;const A={};e.ID_SYNTAX_PROVIDER="syntax";class k{constructor(C,o,c,i){this.editorModel=C,this.providers=o,this.limit=i,this.id=e.ID_SYNTAX_PROVIDER;for(const S of o)typeof S.onDidChange=="function"&&(this.disposables||(this.disposables=new f.DisposableStore),this.disposables.add(S.onDidChange(c)))}compute(C,o){return D(this.providers,this.editorModel,C).then(c=>c?w(c,this.limit,o):null)}dispose(){this.disposables?.dispose()}}e.SyntaxRangeProvider=k;function D(v,C,o){let c=null,i=v.map((S,s)=>Promise.resolve(S.provideFoldingRanges(C,A,o)).then(l=>{if(!o.isCancellationRequested&&Array.isArray(l)){Array.isArray(c)||(c=[]);let r=C.getLineCount();for(let p of l)p.start>0&&p.end>p.start&&p.end<=r&&c.push({start:p.start,end:p.end,rank:s,kind:p.kind})}},t.onUnexpectedExternalError));return Promise.all(i).then(S=>c)}class I{constructor(C,o){this._notifyTooManyRegions=o,this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=C}add(C,o,c,i){if(C>_.MAX_LINE_NUMBER||o>_.MAX_LINE_NUMBER)return;let S=this._length;this._startIndexes[S]=C,this._endIndexes[S]=o,this._nestingLevels[S]=i,this._types[S]=c,this._length++,i<30&&(this._nestingLevelCounts[i]=(this._nestingLevelCounts[i]||0)+1)}toIndentRanges(){if(this._length<=this._foldingRangesLimit){let C=new Uint32Array(this._length),o=new Uint32Array(this._length);for(let c=0;c<this._length;c++)C[c]=this._startIndexes[c],o[c]=this._endIndexes[c];return new _.FoldingRegions(C,o,this._types)}else{this._notifyTooManyRegions&&this._notifyTooManyRegions(this._foldingRangesLimit);let C=0,o=this._nestingLevelCounts.length;for(let s=0;s<this._nestingLevelCounts.length;s++){let l=this._nestingLevelCounts[s];if(l){if(l+C>this._foldingRangesLimit){o=s;break}C+=l}}let c=new Uint32Array(this._foldingRangesLimit),i=new Uint32Array(this._foldingRangesLimit),S=[];for(let s=0,l=0;s<this._length;s++){let r=this._nestingLevels[s];(r<o||r===o&&C++<this._foldingRangesLimit)&&(c[l]=this._startIndexes[s],i[l]=this._endIndexes[s],S[l]=this._types[s],l++)}return new _.FoldingRegions(c,i,S)}}}e.RangesCollector=I;function w(v,C,o){let c=v.sort((l,r)=>{let p=l.start-r.start;return p===0&&(p=l.rank-r.rank),p}),i=new I(C,o),S,s=[];for(let l of c)if(!S)S=l,i.add(l.start,l.end,l.kind&&l.kind.value,s.length);else if(l.start>S.start)if(l.end<=S.end)s.push(S),S=l,i.add(l.start,l.end,l.kind&&l.kind.value,s.length);else{if(l.start>S.end){do S=s.pop();while(S&&l.start>S.end);S&&s.push(S),S=l}i.add(l.start,l.end,l.kind&&l.kind.value,s.length)}return i.toIndentRanges()}e.sanitizeRanges=w}),define(ne[1194],re([1,0,537]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InitializingRangeProvider=e.ID_INIT_PROVIDER=void 0,e.ID_INIT_PROVIDER="init";class f{constructor(A,k,D,I){if(this.editorModel=A,this.id=e.ID_INIT_PROVIDER,k.length){let w=v=>({range:{startLineNumber:v.startLineNumber,startColumn:0,endLineNumber:v.endLineNumber,endColumn:A.getLineLength(v.endLineNumber)},options:{description:"folding-initializing-range-provider",stickiness:1}});this.decorationIds=A.deltaDecorations([],k.map(w)),this.timeout=setTimeout(D,I)}}dispose(){this.decorationIds&&(this.editorModel.deltaDecorations(this.decorationIds,[]),this.decorationIds=void 0),typeof this.timeout=="number"&&(clearTimeout(this.timeout),this.timeout=void 0)}compute(A){let k=[];if(this.decorationIds)for(let D of this.decorationIds){let I=this.editorModel.getDecorationRange(D);I&&k.push({start:I.startLineNumber,end:I.endLineNumber,rank:1})}return Promise.resolve((0,t.sanitizeRanges)(k,Number.MAX_VALUE))}}e.InitializingRangeProvider=f}),define(ne[708],re([1,0,136,20]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FormattingEdit=void 0;class _{static _handleEolEdits(k,D){let I,w=[];for(let v of D)typeof v.eol=="number"&&(I=v.eol),v.range&&typeof v.text=="string"&&w.push(v);return typeof I=="number"&&k.hasModel()&&k.getModel().pushEOL(I),w}static _isFullModelReplaceEdit(k,D){if(!k.hasModel())return!1;const I=k.getModel(),w=I.validateRange(D.range);return I.getFullModelRange().equalsRange(w)}static execute(k,D,I){I&&k.pushUndoStop();const w=_._handleEolEdits(k,D);w.length===1&&_._isFullModelReplaceEdit(k,w[0])?k.executeEdits("formatEditsCommand",w.map(v=>t.EditOperation.replace(f.Range.lift(v.range),v.text))):k.executeEdits("formatEditsCommand",w.map(v=>t.EditOperation.replaceMove(f.Range.lift(v.range),v.text))),I&&k.pushUndoStop()}}e.FormattingEdit=_}),define(ne[538],re([1,0,6,2,14]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClickLinkGesture=e.ClickLinkOptions=e.ClickLinkKeyboardEvent=e.ClickLinkMouseEvent=void 0;function A(C,o){return!!C[o]}class k{constructor(o,c){this.target=o.target,this.hasTriggerModifier=A(o.event,c.triggerModifier),this.hasSideBySideModifier=A(o.event,c.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=o.event.detail<=1}}e.ClickLinkMouseEvent=k;class D{constructor(o,c){this.keyCodeIsTriggerKey=o.keyCode===c.triggerKey,this.keyCodeIsSideBySideKey=o.keyCode===c.triggerSideBySideKey,this.hasTriggerModifier=A(o,c.triggerModifier)}}e.ClickLinkKeyboardEvent=D;class I{constructor(o,c,i,S){this.triggerKey=o,this.triggerModifier=c,this.triggerSideBySideKey=i,this.triggerSideBySideModifier=S}equals(o){return this.triggerKey===o.triggerKey&&this.triggerModifier===o.triggerModifier&&this.triggerSideBySideKey===o.triggerSideBySideKey&&this.triggerSideBySideModifier===o.triggerSideBySideModifier}}e.ClickLinkOptions=I;function w(C){return C==="altKey"?_.isMacintosh?new I(57,"metaKey",6,"altKey"):new I(5,"ctrlKey",6,"altKey"):_.isMacintosh?new I(6,"altKey",57,"metaKey"):new I(6,"altKey",5,"ctrlKey")}class v extends f.Disposable{constructor(o){super();this._onMouseMoveOrRelevantKeyDown=this._register(new t.Emitter),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new t.Emitter),this.onExecute=this._onExecute.event,this._onCancel=this._register(new t.Emitter),this.onCancel=this._onCancel.event,this._editor=o,this._opts=w(this._editor.getOption(70)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(c=>{if(c.hasChanged(70)){const i=w(this._editor.getOption(70));if(this._opts.equals(i))return;this._opts=i,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(c=>this._onEditorMouseMove(new k(c,this._opts)))),this._register(this._editor.onMouseDown(c=>this._onEditorMouseDown(new k(c,this._opts)))),this._register(this._editor.onMouseUp(c=>this._onEditorMouseUp(new k(c,this._opts)))),this._register(this._editor.onKeyDown(c=>this._onEditorKeyDown(new D(c,this._opts)))),this._register(this._editor.onKeyUp(c=>this._onEditorKeyUp(new D(c,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(c=>this._onDidChangeCursorSelection(c))),this._register(this._editor.onDidChangeModel(c=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(c=>{(c.scrollTopChanged||c.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(o){o.selection&&o.selection.startColumn!==o.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(o){this._lastMouseMoveEvent=o,this._onMouseMoveOrRelevantKeyDown.fire([o,null])}_onEditorMouseDown(o){this._hasTriggerKeyOnMouseDown=o.hasTriggerModifier,this._lineNumberOnMouseDown=o.target.position?o.target.position.lineNumber:0}_onEditorMouseUp(o){const c=o.target.position?o.target.position.lineNumber:0;this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===c&&this._onExecute.fire(o)}_onEditorKeyDown(o){this._lastMouseMoveEvent&&(o.keyCodeIsTriggerKey||o.keyCodeIsSideBySideKey&&o.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,o]):o.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(o){o.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}e.ClickLinkGesture=v}),define(ne[709],re([1,0,11,22,6,2]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverOperation=e.HoverResult=e.HoverStartMode=void 0;var k;(function(v){v[v.Idle=0]="Idle",v[v.FirstWait=1]="FirstWait",v[v.SecondWait=2]="SecondWait",v[v.WaitingForAsync=3]="WaitingForAsync",v[v.WaitingForAsyncShowingLoading=4]="WaitingForAsyncShowingLoading"})(k||(k={}));var D;(function(v){v[v.Delayed=0]="Delayed",v[v.Immediate=1]="Immediate"})(D=e.HoverStartMode||(e.HoverStartMode={}));class I{constructor(C,o,c){this.value=C,this.isComplete=o,this.hasLoadingMessage=c}}e.HoverResult=I;class w extends A.Disposable{constructor(C,o){super();this._editor=C,this._computer=o,this._onResult=this._register(new _.Emitter),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new t.RunOnceScheduler(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new t.RunOnceScheduler(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new t.RunOnceScheduler(()=>this._triggerLoadingMessage(),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(53).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(C,o=!0){this._state=C,o&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=(0,t.createCancelableAsyncIterable)(C=>this._computer.computeAsync(C)),(async()=>{try{for await(const C of this._asyncIterable)C&&(this._result.push(C),this._fireResult());this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(C){(0,f.onUnexpectedError)(C)}})()):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){this._state===3&&this._setState(4)}_fireResult(){if(this._state===1||this._state===2)return;const C=this._state===0,o=this._state===4;this._onResult.fire(new I(this._result.slice(0),C,o))}start(C){if(C===0)this._state===0&&(this._setState(1),this._firstWaitScheduler.schedule(this._firstWaitTime),this._loadingMessageScheduler.schedule(this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}e.HoverOperation=w}),define(ne[286],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverParticipantRegistry=e.HoverForeignElementAnchor=e.HoverRangeAnchor=e.HoverAnchorType=void 0;var t;(function(A){A[A.Range=1]="Range",A[A.ForeignElement=2]="ForeignElement"})(t=e.HoverAnchorType||(e.HoverAnchorType={}));class f{constructor(k,D){this.priority=k,this.range=D,this.type=1}equals(k){return k.type===1&&this.range.equalsRange(k.range)}canAdoptVisibleHover(k,D){return k.type===1&&D.lineNumber===this.range.startLineNumber}}e.HoverRangeAnchor=f;class _{constructor(k,D,I){this.priority=k,this.owner=D,this.range=I,this.type=2}equals(k){return k.type===2&&this.owner===k.owner}canAdoptVisibleHover(k,D){return k.type===2&&this.owner===k.owner}}e.HoverForeignElementAnchor=_,e.HoverParticipantRegistry=new class{constructor(){this._participants=[]}register(k){this._participants.push(k)}getAll(){return this._participants}}}),define(ne[1195],re([1,0,84]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InPlaceReplaceCommand=void 0;class f{constructor(A,k,D){this._editRange=A,this._originalSelection=k,this._text=D}getEditOperations(A,k){k.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(A,k){const I=k.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new t.Selection(I.endLineNumber,Math.min(this._originalSelection.positionColumn,I.endColumn),I.endLineNumber,Math.min(this._originalSelection.positionColumn,I.endColumn)):new t.Selection(I.endLineNumber,I.endColumn-this._text.length,I.endLineNumber,I.endColumn)}}e.InPlaceReplaceCommand=f}),define(ne[710],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateIndent=e.getSpaceCnt=void 0;function t(_,A){let k=0;for(let D=0;D<_.length;D++)_.charAt(D)===" "?k+=A:k++;return k}e.getSpaceCnt=t;function f(_,A,k){_=_<0?0:_;let D="";if(!k){let I=Math.floor(_/A);_=_%A;for(let w=0;w<I;w++)D+=" "}for(let I=0;I<_;I++)D+=" ";return D}e.generateIndent=f}),define(ne[539],re([1,0,22,2,49,20,18,9]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.asCommandLink=e.InlayHintsFragments=e.InlayHintItem=e.InlayHintAnchor=void 0;class I{constructor(c,i){this.range=c,this.direction=i}}e.InlayHintAnchor=I;class w{constructor(c,i,S){this.hint=c,this.anchor=i,this.provider=S,this._isResolved=!1}with(c){const i=new w(this.hint,c.anchor,this.provider);return i._isResolved=this._isResolved,i._currentResolve=this._currentResolve,i}async resolve(c){if(typeof this.provider.resolveInlayHint=="function"){if(this._currentResolve)return await this._currentResolve,c.isCancellationRequested?void 0:this.resolve(c);this._isResolved||(this._currentResolve=this._doResolve(c).finally(()=>this._currentResolve=void 0)),await this._currentResolve}}async _doResolve(c){try{const i=await Promise.resolve(this.provider.resolveInlayHint(this.hint,c));this.hint.tooltip=i?.tooltip??this.hint.tooltip,this.hint.label=i?.label??this.hint.label,this._isResolved=!0}catch(i){(0,t.onUnexpectedExternalError)(i),this._isResolved=!1}}}e.InlayHintItem=w;class v{constructor(c,i,S){this._disposables=new f.DisposableStore,this.ranges=c,this.provider=new Set;const s=[];for(const[l,r]of i){this._disposables.add(l),this.provider.add(r);for(const p of l.hints){let u=S.validatePosition(p.position),a="before";const n=v._getRangeAtPosition(S,u);let h;n.getStartPosition().isBefore(u)?(h=A.Range.fromPositions(n.getStartPosition(),u),a="after"):(h=A.Range.fromPositions(u,n.getEndPosition()),a="before"),s.push(new w(p,new I(h,a),r))}}this.items=s.sort((l,r)=>_.Position.compare(l.hint.position,r.hint.position))}static async create(c,i,S,s){const l=[],r=c.ordered(i).reverse().map(p=>S.map(async u=>{try{const a=await p.provideInlayHints(i,u,s);a?.hints.length&&l.push([a,p])}catch(a){(0,t.onUnexpectedExternalError)(a)}}));if(await Promise.all(r.flat()),s.isCancellationRequested||i.isDisposed())throw new t.CancellationError;return new v(S,l,i)}dispose(){this._disposables.dispose()}static _getRangeAtPosition(c,i){const S=i.lineNumber,s=c.getWordAtPosition(i);if(s)return new A.Range(S,s.startColumn,S,s.endColumn);c.tokenizeIfCheap(S);const l=c.getLineTokens(S),r=i.column-1,p=l.findTokenIndexAtOffset(r);let u=l.getStartOffset(p),a=l.getEndOffset(p);return a-u==1&&(u===r&&p>1?(u=l.getStartOffset(p-1),a=l.getEndOffset(p-1)):a===r&&p<l.getCount()-1&&(u=l.getStartOffset(p+1),a=l.getEndOffset(p+1))),new A.Range(S,u+1,S,a+1)}}e.InlayHintsFragments=v;function C(o){return D.URI.from({scheme:k.Schemas.command,path:o.id,query:o.arguments&&encodeURIComponent(JSON.stringify(o.arguments))}).toString()}e.asCommandLink=C}),define(ne[540],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.inlineSuggestCommitId=void 0,e.inlineSuggestCommitId="editor.action.inlineSuggest.commit"}),define(ne[541],re([1,0,20]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getReadonlyEmptyArray=e.applyEdits=e.createDisposableRef=void 0;function f(I,w){return{object:I,dispose:()=>w?.dispose()}}e.createDisposableRef=f;function _(I,w){const v=new A(I),C=w.map(o=>{const c=t.Range.lift(o.range);return{startOffset:v.getOffset(c.getStartPosition()),endOffset:v.getOffset(c.getEndPosition()),text:o.text}});C.sort((o,c)=>c.startOffset-o.startOffset);for(const o of C)I=I.substring(0,o.startOffset)+o.text+I.substring(o.endOffset);return I}e.applyEdits=_;class A{constructor(w){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let v=0;v<w.length;v++)w.charAt(v)===` `&&this.lineStartOffsetByLineIdx.push(v+1)}getOffset(w){return this.lineStartOffsetByLineIdx[w.lineNumber-1]+w.column-1}}const k=[];function D(){return k}e.getReadonlyEmptyArray=D}),define(ne[462],re([1,0,6,2,541]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseGhostTextWidgetModel=e.GhostTextReplacement=e.GhostTextPart=e.GhostText=void 0;class A{constructor(v,C,o=0){this.lineNumber=v,this.parts=C,this.additionalReservedLineCount=o}static equals(v,C){return v===C||!!v&&!!C&&v.equals(C)}equals(v){return this.lineNumber===v.lineNumber&&this.parts.length===v.parts.length&&this.parts.every((C,o)=>C.equals(v.parts[o]))}render(v,C=!1){const o=this.lineNumber;return(0,_.applyEdits)(v,[...this.parts.map(c=>({range:{startLineNumber:o,endLineNumber:o,startColumn:c.column,endColumn:c.column},text:C?`[${c.lines.join(` `)}]`:c.lines.join(` `)}))])}renderForScreenReader(v){if(this.parts.length===0)return"";const C=this.parts[this.parts.length-1],o=v.substr(0,C.column-1);return(0,_.applyEdits)(o,this.parts.map(i=>({range:{startLineNumber:1,endLineNumber:1,startColumn:i.column,endColumn:i.column},text:i.lines.join(` `)}))).substring(this.parts[0].column-1)}isEmpty(){return this.parts.every(v=>v.lines.length===0)}}e.GhostText=A;class k{constructor(v,C,o){this.column=v,this.lines=C,this.preview=o}equals(v){return this.column===v.column&&this.lines.length===v.lines.length&&this.lines.every((C,o)=>C===v.lines[o])}}e.GhostTextPart=k;class D{constructor(v,C,o,c,i=0){this.lineNumber=v,this.columnStart=C,this.length=o,this.newLines=c,this.additionalReservedLineCount=i,this.parts=[new k(this.columnStart+this.length,this.newLines,!1)]}renderForScreenReader(v){return this.newLines.join(` `)}render(v,C=!1){const o=this.lineNumber,c=this.lineNumber;return C?(0,_.applyEdits)(v,[{range:{startLineNumber:o,endLineNumber:c,startColumn:this.columnStart,endColumn:this.columnStart},text:"("},{range:{startLineNumber:o,endLineNumber:c,startColumn:this.columnStart+this.length,endColumn:this.columnStart+this.length},text:`)[${this.newLines.join(` `)}]`}]):(0,_.applyEdits)(v,[{range:{startLineNumber:o,endLineNumber:c,startColumn:this.columnStart,endColumn:this.columnStart+this.length},text:this.newLines.join(` `)}])}}e.GhostTextReplacement=D;class I extends f.Disposable{constructor(v){super();this.editor=v,this._expanded=void 0,this.onDidChangeEmitter=new t.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this._register(v.onDidChangeConfiguration(C=>{C.hasChanged(106)&&this._expanded===void 0&&this.onDidChangeEmitter.fire()}))}get expanded(){return this._expanded===void 0?!0:this._expanded}setExpanded(v){this._expanded=!0,this.onDidChangeEmitter.fire()}}e.BaseGhostTextWidgetModel=I}),define(ne[542],re([1,0,380,29,20,462]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.inlineCompletionToGhostText=e.normalizedInlineCompletionsEquals=e.minimizeInlineCompletion=void 0;function k(c,i){if(!i)return i;const S=c.getValueInRange(i.range),s=f.commonPrefixLength(S,i.insertText),l=c.getOffsetAt(i.range.getStartPosition())+s,r=c.getPositionAt(l),p=S.substr(s),u=f.commonSuffixLength(p,i.insertText),a=c.getPositionAt(Math.max(l,c.getOffsetAt(i.range.getEndPosition())-u));return{range:_.Range.fromPositions(r,a),insertText:i.insertText.substr(s,i.insertText.length-s-u),snippetInfo:i.snippetInfo,filterText:i.filterText,additionalTextEdits:i.additionalTextEdits}}e.minimizeInlineCompletion=k;function D(c,i){return c===i?!0:!c||!i?!1:c.range.equalsRange(i.range)&&c.insertText===i.insertText&&c.command===i.command}e.normalizedInlineCompletionsEquals=D;function I(c,i,S,s,l=0){if(c.range.startLineNumber!==c.range.endLineNumber)return;const r=i.getLineContent(c.range.startLineNumber),p=f.getLeadingWhitespace(r).length;if(c.range.startColumn-1<=p){const m=f.getLeadingWhitespace(c.insertText).length,b=r.substring(c.range.startColumn-1,p),E=_.Range.fromPositions(c.range.getStartPosition().delta(0,b.length),c.range.getEndPosition()),y=c.insertText.startsWith(b)?c.insertText.substring(b.length):c.insertText.substring(m);c={range:E,insertText:y,command:c.command,snippetInfo:void 0,filterText:c.filterText,additionalTextEdits:c.additionalTextEdits}}const a=i.getValueInRange(c.range),n=v(a,c.insertText);if(!n)return;const h=c.range.startLineNumber,g=new Array;if(S==="prefix"){const m=n.filter(b=>b.originalLength===0);if(m.length>1||m.length===1&&m[0].originalStart!==a.length)return}const d=c.insertText.length-l;for(const m of n){const b=c.range.startColumn+m.originalStart+m.originalLength;if(S==="subwordSmart"&&s&&s.lineNumber===c.range.startLineNumber&&b<s.column||m.originalLength>0)return;if(m.modifiedLength===0)continue;const E=m.modifiedStart+m.modifiedLength,y=Math.max(m.modifiedStart,Math.min(E,d)),T=c.insertText.substring(m.modifiedStart,y),R=c.insertText.substring(y,Math.max(m.modifiedStart,E));if(T.length>0){const O=f.splitLines(T);g.push(new A.GhostTextPart(b,O,!1))}if(R.length>0){const O=f.splitLines(R);g.push(new A.GhostTextPart(b,O,!0))}}return new A.GhostText(h,g,0)}e.inlineCompletionToGhostText=I;let w;function v(c,i){if(w?.originalValue===c&&w?.newValue===i)return w?.changes;{let S=o(c,i,!0);if(S){const s=C(S);if(s>0){const l=o(c,i,!1);l&&C(l)<s&&(S=l)}}return w={originalValue:c,newValue:i,changes:S},S}}function C(c){let i=0;for(const S of c)i+=Math.max(S.originalLength-S.modifiedLength,0);return i}function o(c,i,S){if(c.length>5e3||i.length>5e3)return;function s(n){let h=0;for(let g=0,d=n.length;g<d;g++){const m=n.charCodeAt(g);m>h&&(h=m)}return h}const l=Math.max(s(c),s(i));function r(n){if(n<0)throw new Error("unexpected");return l+n+1}function p(n){let h=0,g=0;const d=new Int32Array(n.length);for(let m=0,b=n.length;m<b;m++)if(S&&n[m]==="("){const E=g*100+h;d[m]=r(2*E),h++}else if(S&&n[m]===")"){h=Math.max(h-1,0);const E=g*100+h;d[m]=r(2*E+1),h===0&&g++}else d[m]=n.charCodeAt(m);return d}const u=p(c),a=p(i);return new t.LcsDiff({getElements:()=>u},{getElements:()=>a}).ComputeDiff(!1).changes}}),define(ne[1196],re([1,0,20,84]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CopyLinesCommand=void 0;class _{constructor(k,D,I){this._selection=k,this._isCopyingDown=D,this._noop=I||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(k,D){let I=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,I.startLineNumber<I.endLineNumber&&I.endColumn===1&&(this._endLineNumberDelta=1,I=I.setEndPosition(I.endLineNumber-1,k.getLineMaxColumn(I.endLineNumber-1)));let w=[];for(let C=I.startLineNumber;C<=I.endLineNumber;C++)w.push(k.getLineContent(C));const v=w.join(` `);v===""&&this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++),this._noop?D.addEditOperation(new t.Range(I.endLineNumber,k.getLineMaxColumn(I.endLineNumber),I.endLineNumber+1,1),I.endLineNumber===k.getLineCount()?"":` `):this._isCopyingDown?D.addEditOperation(new t.Range(I.startLineNumber,1,I.startLineNumber,1),v+` `):D.addEditOperation(new t.Range(I.endLineNumber,k.getLineMaxColumn(I.endLineNumber),I.endLineNumber,k.getLineMaxColumn(I.endLineNumber)),` `+v),this._selectionId=D.trackSelection(I),this._selectionDirection=this._selection.getDirection()}computeCursorState(k,D){let I=D.getTrackedSelection(this._selectionId);if(this._startLineNumberDelta!==0||this._endLineNumberDelta!==0){let w=I.startLineNumber,v=I.startColumn,C=I.endLineNumber,o=I.endColumn;this._startLineNumberDelta!==0&&(w=w+this._startLineNumberDelta,v=1),this._endLineNumberDelta!==0&&(C=C+this._endLineNumberDelta,o=1),I=f.Selection.createWithDirection(w,v,C,o,this._selectionDirection)}return I}}e.CopyLinesCommand=_}),define(ne[1197],re([1,0,136,20]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SortLinesCommand=void 0;class _{constructor(I,w){this.selection=I,this.descending=w,this.selectionId=null}static getCollator(){return _._COLLATOR||(_._COLLATOR=new Intl.Collator),_._COLLATOR}getEditOperations(I,w){let v=k(I,this.selection,this.descending);v&&w.addEditOperation(v.range,v.text),this.selectionId=w.trackSelection(this.selection)}computeCursorState(I,w){return w.getTrackedSelection(this.selectionId)}static canRun(I,w,v){if(I===null)return!1;let C=A(I,w,v);if(!C)return!1;for(let o=0,c=C.before.length;o<c;o++)if(C.before[o]!==C.after[o])return!0;return!1}}e.SortLinesCommand=_,_._COLLATOR=null;function A(D,I,w){let v=I.startLineNumber,C=I.endLineNumber;if(I.endColumn===1&&C--,v>=C)return null;let o=[];for(let i=v;i<=C;i++)o.push(D.getLineContent(i));let c=o.slice(0);return c.sort(_.getCollator().compare),w===!0&&(c=c.reverse()),{startLineNumber:v,endLineNumber:C,before:o,after:c}}function k(D,I,w){let v=A(D,I,w);return v?t.EditOperation.replace(new f.Range(v.startLineNumber,1,v.endLineNumber,D.getLineMaxColumn(v.endLineNumber)),v.after.join(` `)):null}}),define(ne[711],re([1,0,194,49,20]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketSelectionRangeProvider=void 0;class A{async provideSelectionRanges(D,I){const w=[];for(const v of I){const C=[];w.push(C);const o=new Map;await new Promise(c=>A._bracketsRightYield(c,0,D,v,o)),await new Promise(c=>A._bracketsLeftYield(c,0,D,v,o,C))}return w}static _bracketsRightYield(D,I,w,v,C){const o=new Map,c=Date.now();for(;;){if(I>=A._maxRounds){D();break}if(!v){D();break}let i=w.bracketPairs.findNextBracket(v);if(!i){D();break}if(Date.now()-c>A._maxDuration){setTimeout(()=>A._bracketsRightYield(D,I+1,w,v,C));break}const s=i.close[0];if(i.isOpen){let l=o.has(s)?o.get(s):0;o.set(s,l+1)}else{let l=o.has(s)?o.get(s):0;if(l-=1,o.set(s,Math.max(0,l)),l<0){let r=C.get(s);r||(r=new t.LinkedList,C.set(s,r)),r.push(i.range)}}v=i.range.getEndPosition()}}static _bracketsLeftYield(D,I,w,v,C,o){const c=new Map,i=Date.now();for(;;){if(I>=A._maxRounds&&C.size===0){D();break}if(!v){D();break}let S=w.bracketPairs.findPrevBracket(v);if(!S){D();break}if(Date.now()-i>A._maxDuration){setTimeout(()=>A._bracketsLeftYield(D,I+1,w,v,C,o));break}const l=S.close[0];if(S.isOpen){let r=c.has(l)?c.get(l):0;if(r-=1,c.set(l,Math.max(0,r)),r<0){let p=C.get(l);if(p){let u=p.shift();p.size===0&&C.delete(l);const a=_.Range.fromPositions(S.range.getEndPosition(),u.getStartPosition()),n=_.Range.fromPositions(S.range.getStartPosition(),u.getEndPosition());o.push({range:a}),o.push({range:n}),A._addBracketLeading(w,n,o)}}}else{let r=c.has(l)?c.get(l):0;c.set(l,r+1)}v=S.range.getStartPosition()}}static _addBracketLeading(D,I,w){if(I.startLineNumber===I.endLineNumber)return;const v=I.startLineNumber,C=D.getLineFirstNonWhitespaceColumn(v);C!==0&&C!==I.startColumn&&(w.push({range:_.Range.fromPositions(new f.Position(v,C),I.getEndPosition())}),w.push({range:_.Range.fromPositions(new f.Position(v,1),I.getEndPosition())}));const o=v-1;if(o>0){const c=D.getLineFirstNonWhitespaceColumn(o);c===I.startColumn&&c!==D.getLineLastNonWhitespaceColumn(o)&&(w.push({range:_.Range.fromPositions(new f.Position(o,c),I.getEndPosition())}),w.push({range:_.Range.fromPositions(new f.Position(o,1),I.getEndPosition())}))}}}e.BracketSelectionRangeProvider=A,A._maxDuration=30,A._maxRounds=2}),define(ne[1198],re([1,0,29,20]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordSelectionRangeProvider=void 0;class _{provideSelectionRanges(k,D){const I=[];for(const w of D){const v=[];I.push(v),this._addInWordRanges(v,k,w),this._addWordRanges(v,k,w),this._addWhitespaceLine(v,k,w),v.push({range:k.getFullModelRange()})}return I}_addInWordRanges(k,D,I){const w=D.getWordAtPosition(I);if(!w)return;let{word:v,startColumn:C}=w,o=I.column-C,c=o,i=o,S=0;for(;c>=0;c--){let s=v.charCodeAt(c);if(c!==o&&(s===95||s===45))break;if((0,t.isLowerAsciiLetter)(s)&&(0,t.isUpperAsciiLetter)(S))break;S=s}for(c+=1;i<v.length;i++){let s=v.charCodeAt(i);if((0,t.isUpperAsciiLetter)(s)&&(0,t.isLowerAsciiLetter)(S))break;if(s===95||s===45)break;S=s}c<i&&k.push({range:new f.Range(I.lineNumber,C+c,I.lineNumber,C+i)})}_addWordRanges(k,D,I){const w=D.getWordAtPosition(I);w&&k.push({range:new f.Range(I.lineNumber,w.startColumn,I.lineNumber,w.endColumn)})}_addWhitespaceLine(k,D,I){D.getLineLength(I.lineNumber)>0&&D.getLineFirstNonWhitespaceColumn(I.lineNumber)===0&&D.getLineLastNonWhitespaceColumn(I.lineNumber)===0&&k.push({range:new f.Range(I.lineNumber,1,I.lineNumber,D.getLineMaxColumn(I.lineNumber))})}}e.WordSelectionRangeProvider=_}),define(ne[261],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetParser=e.TextmateSnippet=e.Variable=e.FormatString=e.Transform=e.Choice=e.Placeholder=e.TransformableMarker=e.Text=e.Marker=e.Scanner=e.TokenType=void 0;var t;(function(S){S[S.Dollar=0]="Dollar",S[S.Colon=1]="Colon",S[S.Comma=2]="Comma",S[S.CurlyOpen=3]="CurlyOpen",S[S.CurlyClose=4]="CurlyClose",S[S.Backslash=5]="Backslash",S[S.Forwardslash=6]="Forwardslash",S[S.Pipe=7]="Pipe",S[S.Int=8]="Int",S[S.VariableName=9]="VariableName",S[S.Format=10]="Format",S[S.Plus=11]="Plus",S[S.Dash=12]="Dash",S[S.QuestionMark=13]="QuestionMark",S[S.EOF=14]="EOF"})(t=e.TokenType||(e.TokenType={}));class f{constructor(){this.value="",this.pos=0}static isDigitCharacter(s){return s>=48&&s<=57}static isVariableCharacter(s){return s===95||s>=97&&s<=122||s>=65&&s<=90}text(s){this.value=s,this.pos=0}tokenText(s){return this.value.substr(s.pos,s.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};let s=this.pos,l=0,r=this.value.charCodeAt(s),p;if(p=f._table[r],typeof p=="number")return this.pos+=1,{type:p,pos:s,len:1};if(f.isDigitCharacter(r)){p=8;do l+=1,r=this.value.charCodeAt(s+l);while(f.isDigitCharacter(r));return this.pos+=l,{type:p,pos:s,len:l}}if(f.isVariableCharacter(r)){p=9;do r=this.value.charCodeAt(s+ ++l);while(f.isVariableCharacter(r)||f.isDigitCharacter(r));return this.pos+=l,{type:p,pos:s,len:l}}p=10;do l+=1,r=this.value.charCodeAt(s+l);while(!isNaN(r)&&typeof f._table[r]=="undefined"&&!f.isDigitCharacter(r)&&!f.isVariableCharacter(r));return this.pos+=l,{type:p,pos:s,len:l}}}e.Scanner=f,f._table={[36]:0,[58]:1,[44]:2,[123]:3,[125]:4,[92]:5,[47]:6,[124]:7,[43]:11,[45]:12,[63]:13};class _{constructor(){this._children=[]}appendChild(s){return s instanceof A&&this._children[this._children.length-1]instanceof A?this._children[this._children.length-1].value+=s.value:(s.parent=this,this._children.push(s)),this}replace(s,l){const{parent:r}=s,p=r.children.indexOf(s),u=r.children.slice(0);u.splice(p,1,...l),r._children=u,function a(n,h){for(const g of n)g.parent=h,a(g.children,g)}(l,r)}get children(){return this._children}get snippet(){let s=this;for(;;){if(!s)return;if(s instanceof c)return s;s=s.parent}}toString(){return this.children.reduce((s,l)=>s+l.toString(),"")}len(){return 0}}e.Marker=_;class A extends _{constructor(s){super();this.value=s}static escape(s){return s.replace(/\$|}|\\/g,"\\$&")}toString(){return this.value}toTextmateString(){return A.escape(this.value)}len(){return this.value.length}clone(){return new A(this.value)}}e.Text=A;class k extends _{}e.TransformableMarker=k;class D extends k{constructor(s){super();this.index=s}static compareByIndex(s,l){return s.index===l.index?0:s.isFinalTabstop?1:l.isFinalTabstop||s.index<l.index?-1:s.index>l.index?1:0}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof I?this._children[0]:void 0}toTextmateString(){let s="";return this.transform&&(s=this.transform.toTextmateString()),this.children.length===0&&!this.transform?`$${this.index}`:this.children.length===0?`\${${this.index}${s}}`:this.choice?`\${${this.index}|${this.choice.toTextmateString()}|${s}}`:`\${${this.index}:${this.children.map(l=>l.toTextmateString()).join("")}${s}}`}clone(){let s=new D(this.index);return this.transform&&(s.transform=this.transform.clone()),s._children=this.children.map(l=>l.clone()),s}}e.Placeholder=D;class I extends _{constructor(){super(...arguments);this.options=[]}appendChild(s){return s instanceof A&&(s.parent=this,this.options.push(s)),this}toString(){return this.options[0].value}toTextmateString(){return this.options.map(s=>s.value.replace(/\||,/g,"\\$&")).join(",")}len(){return this.options[0].len()}clone(){let s=new I;return this.options.forEach(s.appendChild,s),s}}e.Choice=I;class w extends _{constructor(){super(...arguments);this.regexp=new RegExp("")}resolve(s){const l=this;let r=!1,p=s.replace(this.regexp,function(){return r=!0,l._replace(Array.prototype.slice.call(arguments,0,-2))});return!r&&this._children.some(u=>u instanceof v&&Boolean(u.elseValue))&&(p=this._replace([])),p}_replace(s){let l="";for(const r of this._children)if(r instanceof v){let p=s[r.index]||"";p=r.resolve(p),l+=p}else l+=r.toString();return l}toString(){return""}toTextmateString(){return`/${this.regexp.source}/${this.children.map(s=>s.toTextmateString())}/${(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")}`}clone(){let s=new w;return s.regexp=new RegExp(this.regexp.source,""+(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),s._children=this.children.map(l=>l.clone()),s}}e.Transform=w;class v extends _{constructor(s,l,r,p){super();this.index=s,this.shorthandName=l,this.ifValue=r,this.elseValue=p}resolve(s){return this.shorthandName==="upcase"?s?s.toLocaleUpperCase():"":this.shorthandName==="downcase"?s?s.toLocaleLowerCase():"":this.shorthandName==="capitalize"?s?s[0].toLocaleUpperCase()+s.substr(1):"":this.shorthandName==="pascalcase"?s?this._toPascalCase(s):"":this.shorthandName==="camelcase"?s?this._toCamelCase(s):"":Boolean(s)&&typeof this.ifValue=="string"?this.ifValue:!Boolean(s)&&typeof this.elseValue=="string"?this.elseValue:s||""}_toPascalCase(s){const l=s.match(/[a-z0-9]+/gi);return l?l.map(r=>r.charAt(0).toUpperCase()+r.substr(1).toLowerCase()).join(""):s}_toCamelCase(s){const l=s.match(/[a-z0-9]+/gi);return l?l.map((r,p)=>p===0?r.toLowerCase():r.charAt(0).toUpperCase()+r.substr(1).toLowerCase()).join(""):s}toTextmateString(){let s="${";return s+=this.index,this.shorthandName?s+=`:/${this.shorthandName}`:this.ifValue&&this.elseValue?s+=`:?${this.ifValue}:${this.elseValue}`:this.ifValue?s+=`:+${this.ifValue}`:this.elseValue&&(s+=`:-${this.elseValue}`),s+="}",s}clone(){return new v(this.index,this.shorthandName,this.ifValue,this.elseValue)}}e.FormatString=v;class C extends k{constructor(s){super();this.name=s}resolve(s){let l=s.resolve(this);return this.transform&&(l=this.transform.resolve(l||"")),l!==void 0?(this._children=[new A(l)],!0):!1}toTextmateString(){let s="";return this.transform&&(s=this.transform.toTextmateString()),this.children.length===0?`\${${this.name}${s}}`:`\${${this.name}:${this.children.map(l=>l.toTextmateString()).join("")}${s}}`}clone(){const s=new C(this.name);return this.transform&&(s.transform=this.transform.clone()),s._children=this.children.map(l=>l.clone()),s}}e.Variable=C;function o(S,s){const l=[...S];for(;l.length>0;){const r=l.shift();if(!s(r))break;l.unshift(...r.children)}}class c extends _{get placeholderInfo(){if(!this._placeholders){let s=[],l;this.walk(function(r){return r instanceof D&&(s.push(r),l=!l||l.index<r.index?r:l),!0}),this._placeholders={all:s,last:l}}return this._placeholders}get placeholders(){const{all:s}=this.placeholderInfo;return s}offset(s){let l=0,r=!1;return this.walk(p=>p===s?(r=!0,!1):(l+=p.len(),!0)),r?l:-1}fullLen(s){let l=0;return o([s],r=>(l+=r.len(),!0)),l}enclosingPlaceholders(s){let l=[],{parent:r}=s;for(;r;)r instanceof D&&l.push(r),r=r.parent;return l}resolveVariables(s){return this.walk(l=>(l instanceof C&&l.resolve(s)&&(this._placeholders=void 0),!0)),this}appendChild(s){return this._placeholders=void 0,super.appendChild(s)}replace(s,l){return this._placeholders=void 0,super.replace(s,l)}toTextmateString(){return this.children.reduce((s,l)=>s+l.toTextmateString(),"")}clone(){let s=new c;return this._children=this.children.map(l=>l.clone()),s}walk(s){o(this.children,s)}}e.TextmateSnippet=c;class i{constructor(){this._scanner=new f,this._token={type:14,pos:0,len:0}}static escape(s){return s.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(s){return/\${?CLIPBOARD/.test(s)}text(s){return this.parse(s).toString()}parse(s,l,r){this._scanner.text(s),this._token=this._scanner.next();const p=new c;for(;this._parse(p););const u=new Map,a=[];let n=0;p.walk(h=>(h instanceof D&&(n+=1,h.isFinalTabstop?u.set(0,void 0):!u.has(h.index)&&h.children.length>0?u.set(h.index,h.children):a.push(h)),!0));for(const h of a){const g=u.get(h.index);if(g){const d=new D(h.index);d.transform=h.transform;for(const m of g)d.appendChild(m.clone());p.replace(h,[d])}}return r||(r=n>0&&l),!u.has(0)&&r&&p.appendChild(new D(0)),p}_accept(s,l){if(s===void 0||this._token.type===s){let r=l?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),r}return!1}_backTo(s){return this._scanner.pos=s.pos+s.len,this._token=s,!1}_until(s){const l=this._token;for(;this._token.type!==s;){if(this._token.type===14)return!1;if(this._token.type===5){const p=this._scanner.next();if(p.type!==0&&p.type!==4&&p.type!==5)return!1}this._token=this._scanner.next()}const r=this._scanner.value.substring(l.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),r}_parse(s){return this._parseEscaped(s)||this._parseTabstopOrVariableName(s)||this._parseComplexPlaceholder(s)||this._parseComplexVariable(s)||this._parseAnything(s)}_parseEscaped(s){let l;return(l=this._accept(5,!0))?(l=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||l,s.appendChild(new A(l)),!0):!1}_parseTabstopOrVariableName(s){let l;const r=this._token;return this._accept(0)&&(l=this._accept(9,!0)||this._accept(8,!0))?(s.appendChild(/^\d+$/.test(l)?new D(Number(l)):new C(l)),!0):this._backTo(r)}_parseComplexPlaceholder(s){let l;const r=this._token;if(!(this._accept(0)&&this._accept(3)&&(l=this._accept(8,!0))))return this._backTo(r);const u=new D(Number(l));if(this._accept(1))for(;;){if(this._accept(4))return s.appendChild(u),!0;if(!this._parse(u))return s.appendChild(new A("${"+l+":")),u.children.forEach(s.appendChild,s),!0}else if(u.index>0&&this._accept(7)){const a=new I;for(;;){if(this._parseChoiceElement(a)){if(this._accept(2))continue;if(this._accept(7)&&(u.appendChild(a),this._accept(4)))return s.appendChild(u),!0}return this._backTo(r),!1}}else return this._accept(6)?this._parseTransform(u)?(s.appendChild(u),!0):(this._backTo(r),!1):this._accept(4)?(s.appendChild(u),!0):this._backTo(r)}_parseChoiceElement(s){const l=this._token,r=[];for(;!(this._token.type===2||this._token.type===7);){let p;if((p=this._accept(5,!0))?p=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||p:p=this._accept(void 0,!0),!p)return this._backTo(l),!1;r.push(p)}return r.length===0?(this._backTo(l),!1):(s.appendChild(new A(r.join(""))),!0)}_parseComplexVariable(s){let l;const r=this._token;if(!(this._accept(0)&&this._accept(3)&&(l=this._accept(9,!0))))return this._backTo(r);const u=new C(l);if(this._accept(1))for(;;){if(this._accept(4))return s.appendChild(u),!0;if(!this._parse(u))return s.appendChild(new A("${"+l+":")),u.children.forEach(s.appendChild,s),!0}else return this._accept(6)?this._parseTransform(u)?(s.appendChild(u),!0):(this._backTo(r),!1):this._accept(4)?(s.appendChild(u),!0):this._backTo(r)}_parseTransform(s){let l=new w,r="",p="";for(;!this._accept(6);){let u;if(u=this._accept(5,!0)){u=this._accept(6,!0)||u,r+=u;continue}if(this._token.type!==14){r+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let u;if(u=this._accept(5,!0)){u=this._accept(5,!0)||this._accept(6,!0)||u,l.appendChild(new A(u));continue}if(!(this._parseFormatString(l)||this._parseAnything(l)))return!1}for(;!this._accept(4);){if(this._token.type!==14){p+=this._accept(void 0,!0);continue}return!1}try{l.regexp=new RegExp(r,p)}catch{return!1}return s.transform=l,!0}_parseFormatString(s){const l=this._token;if(!this._accept(0))return!1;let r=!1;this._accept(3)&&(r=!0);let p=this._accept(8,!0);if(p)if(r){if(this._accept(4))return s.appendChild(new v(Number(p))),!0;if(!this._accept(1))return this._backTo(l),!1}else return s.appendChild(new v(Number(p))),!0;else return this._backTo(l),!1;if(this._accept(6)){let u=this._accept(9,!0);return!u||!this._accept(4)?(this._backTo(l),!1):(s.appendChild(new v(Number(p),u)),!0)}else if(this._accept(11)){let u=this._until(4);if(u)return s.appendChild(new v(Number(p),void 0,u,void 0)),!0}else if(this._accept(12)){let u=this._until(4);if(u)return s.appendChild(new v(Number(p),void 0,void 0,u)),!0}else if(this._accept(13)){let u=this._until(1);if(u){let a=this._until(4);if(a)return s.appendChild(new v(Number(p),void 0,u,a)),!0}}else{let u=this._until(4);if(u)return s.appendChild(new v(Number(p),void 0,void 0,u)),!0}return this._backTo(l),!1}_parseAnything(s){return this._token.type!==14?(s.appendChild(new A(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}e.SnippetParser=i}),define(ne[712],re([1,0,15,102,29]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompletionModel=e.LineContext=void 0;class A{constructor(w,v){this.leadingLineContent=w,this.characterCountDelta=v}}e.LineContext=A;var k;(function(I){I[I.Nothing=0]="Nothing",I[I.All=1]="All",I[I.Incr=2]="Incr"})(k||(k={}));class D{constructor(w,v,C,o,c,i,S){this.clipboardText=S,this._snippetCompareFn=D._compareCompletionItems,this._items=w,this._column=v,this._wordDistance=o,this._options=c,this._refilterKind=1,this._lineContext=C,i==="top"?this._snippetCompareFn=D._compareCompletionItemsSnippetsUp:i==="bottom"&&(this._snippetCompareFn=D._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(w){(this._lineContext.leadingLineContent!==w.leadingLineContent||this._lineContext.characterCountDelta!==w.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta<w.characterCountDelta&&this._filteredItems?2:1,this._lineContext=w)}get items(){return this._ensureCachedState(),this._filteredItems}get allProvider(){return this._ensureCachedState(),this._providerInfo.keys()}get incomplete(){this._ensureCachedState();const w=new Set;for(let[v,C]of this._providerInfo)C&&w.add(v);return w}adopt(w){let v=[];for(let C=0;C<this._items.length;)w.has(this._items[C].provider)?C++:(v.push(this._items[C]),this._items[C]=this._items[this._items.length-1],this._items.pop());return this._refilterKind=1,v}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){this._providerInfo=new Map;const w=[],{leadingLineContent:v,characterCountDelta:C}=this._lineContext;let o="",c="";const i=this._refilterKind===1?this._items:this._filteredItems,S=[],s=!this._options.filterGraceful||i.length>2e3?f.fuzzyScore:f.fuzzyScoreGracefulAggressive;for(let l=0;l<i.length;l++){const r=i[l];if(r.isInvalid)continue;this._providerInfo.set(r.provider,Boolean(r.container.incomplete));const p=r.position.column-r.editStart.column,u=p+C-(r.position.column-this._column);if(o.length!==u&&(o=u===0?"":v.slice(-u),c=o.toLowerCase()),r.word=o,u===0)r.score=f.FuzzyScore.Default;else{let a=0;for(;a<p;){const n=o.charCodeAt(a);if(n===32||n===9)a+=1;else break}if(a>=u)r.score=f.FuzzyScore.Default;else if(typeof r.completion.filterText=="string"){let n=s(o,c,a,r.completion.filterText,r.filterTextLow,0,!1);if(!n)continue;(0,_.compareIgnoreCase)(r.completion.filterText,r.textLabel)===0?r.score=n:(r.score=(0,f.anyScore)(o,c,a,r.textLabel,r.labelLow,0),r.score[0]=n[0])}else{let n=s(o,c,a,r.textLabel,r.labelLow,0,!1);if(!n)continue;r.score=n}}r.idx=l,r.distance=this._wordDistance.distance(r.position,r.completion),S.push(r),w.push(r.textLabel.length)}this._filteredItems=S.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:w.length?(0,t.quickSelect)(w.length-.85,w,(l,r)=>l-r):0}}static _compareCompletionItems(w,v){return w.score[0]>v.score[0]?-1:w.score[0]<v.score[0]?1:w.distance<v.distance?-1:w.distance>v.distance?1:w.idx<v.idx?-1:w.idx>v.idx?1:0}static _compareCompletionItemsSnippetsDown(w,v){if(w.completion.kind!==v.completion.kind){if(w.completion.kind===27)return 1;if(v.completion.kind===27)return-1}return D._compareCompletionItems(w,v)}static _compareCompletionItemsSnippetsUp(w,v){if(w.completion.kind!==v.completion.kind){if(w.completion.kind===27)return-1;if(v.completion.kind===27)return 1}return D._compareCompletionItems(w,v)}}e.CompletionModel=D}),define(ne[713],re([1,0,10,281,6,2]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResizableHTMLElement=void 0;class k{constructor(){this._onDidWillResize=new _.Emitter,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new _.Emitter,this.onDidResize=this._onDidResize.event,this._sashListener=new A.DisposableStore,this._size=new t.Dimension(0,0),this._minSize=new t.Dimension(0,0),this._maxSize=new t.Dimension(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new f.Sash(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new f.Sash(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new f.Sash(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:f.OrthogonalEdge.North}),this._southSash=new f.Sash(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:f.OrthogonalEdge.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let I,w=0,v=0;this._sashListener.add(_.Event.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{I===void 0&&(this._onDidWillResize.fire(),I=this._size,w=0,v=0)})),this._sashListener.add(_.Event.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{I!==void 0&&(I=void 0,w=0,v=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(C=>{I&&(v=C.currentX-C.startX,this.layout(I.height+w,I.width+v),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(C=>{I&&(v=-(C.currentX-C.startX),this.layout(I.height+w,I.width+v),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(C=>{I&&(w=-(C.currentY-C.startY),this.layout(I.height+w,I.width+v),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(C=>{I&&(w=C.currentY-C.startY,this.layout(I.height+w,I.width+v),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(_.Event.any(this._eastSash.onDidReset,this._westSash.onDidReset)(C=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(_.Event.any(this._northSash.onDidReset,this._southSash.onDidReset)(C=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(I,w,v,C){this._northSash.state=I?3:0,this._eastSash.state=w?3:0,this._southSash.state=v?3:0,this._westSash.state=C?3:0}layout(I=this.size.height,w=this.size.width){const{height:v,width:C}=this._minSize,{height:o,width:c}=this._maxSize;I=Math.max(v,Math.min(o,I)),w=Math.max(C,Math.min(c,w));const i=new t.Dimension(w,I);t.Dimension.equals(i,this._size)||(this.domNode.style.height=I+"px",this.domNode.style.width=w+"px",this._size=i,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(I){this._maxSize=I}get maxSize(){return this._maxSize}set minSize(I){this._minSize=I}get minSize(){return this._minSize}set preferredSize(I){this._preferredSize=I}get preferredSize(){return this._preferredSize}}e.ResizableHTMLElement=k}),define(ne[1199],re([1,0,15,2,339]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommitCharacterController=void 0;class A{constructor(D,I,w){this._disposables=new f.DisposableStore,this._disposables.add(I.onDidShow(()=>this._onItem(I.getFocusedItem()))),this._disposables.add(I.onDidFocus(this._onItem,this)),this._disposables.add(I.onDidHide(this.reset,this)),this._disposables.add(D.onWillType(v=>{if(this._active&&!I.isFrozen()){const C=v.charCodeAt(v.length-1);this._active.acceptCharacters.has(C)&&D.getOption(0)&&w(this._active.item)}}))}_onItem(D){if(!D||!(0,t.isNonEmptyArray)(D.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===D.item)return;const I=new _.CharacterSet;for(const w of D.item.completion.commitCharacters)w.length>0&&I.add(w.charCodeAt(0));this._active={acceptCharacters:I,item:D}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}e.CommitCharacterController=A}),define(ne[1200],re([1,0,2]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OvertypingCapturer=void 0;class f{constructor(A,k){this._disposables=new t.DisposableStore,this._lastOvertyped=[],this._empty=!0,this._disposables.add(A.onWillType(()=>{if(!this._empty||!A.hasModel())return;const D=A.getSelections(),I=D.length;let w=!1;for(let C=0;C<I;C++)if(!D[C].isEmpty()){w=!0;break}if(!w)return;this._lastOvertyped=[];const v=A.getModel();for(let C=0;C<I;C++){const o=D[C];if(v.getValueLengthInRange(o)>f._maxSelectionLength)return;this._lastOvertyped[C]={value:v.getValueInRange(o),multiline:o.startLineNumber!==o.endLineNumber}}this._empty=!1})),this._disposables.add(k.onDidCancel(D=>{!this._empty&&!D.retrigger&&(this._empty=!0)}))}getLastOvertypedInfo(A){if(!this._empty&&A>=0&&A<this._lastOvertyped.length)return this._lastOvertyped[A]}dispose(){this._disposables.dispose()}}e.OvertypingCapturer=f,f._maxSelectionLength=51200}),define(ne[714],re([1,0,15,20,711]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordDistance=void 0;class A{static async create(D,I){if(!I.getOption(106).localityBonus||!I.hasModel())return A.None;const w=I.getModel(),v=I.getPosition();if(!D.canComputeWordRanges(w.uri))return A.None;const[C]=await new _.BracketSelectionRangeProvider().provideSelectionRanges(w,[v]);if(C.length===0)return A.None;const o=await D.computeWordRanges(w.uri,C[0].range);if(!o)return A.None;const c=w.getWordUntilPosition(v);return delete o[c.word],new class extends A{distance(i,S){if(!v.equals(I.getPosition()))return 0;if(S.kind===17)return 2<<20;let s=typeof S.label=="string"?S.label:S.label.label,l=o[s];if((0,t.isFalsyOrEmpty)(l))return 2<<20;let r=(0,t.binarySearch)(l,f.Range.fromPositions(i),f.Range.compareRangesUsingStarts),p=r>=0?l[r]:l[Math.max(0,~r-1)],u=C.length;for(const a of C){if(!f.Range.containsRange(a.range,p))break;u-=1}return u}}}}e.WordDistance=A,A.None=new class extends A{distance(){return 0}}}),define(ne[1201],re([3,4]),function(Q,e){return Q.create("vs/base/browser/ui/actionbar/actionViewItems",e)}),define(ne[1202],re([3,4]),function(Q,e){return Q.create("vs/base/browser/ui/dialog/dialog",e)}),define(ne[1203],re([3,4]),function(Q,e){return Q.create("vs/base/browser/ui/findinput/findInput",e)}),define(ne[1204],re([3,4]),function(Q,e){return Q.create("vs/base/browser/ui/findinput/findInputToggles",e)}),define(ne[1205],re([3,4]),function(Q,e){return Q.create("vs/base/browser/ui/findinput/replaceInput",e)}),define(ne[1206],re([3,4]),function(Q,e){return Q.create("vs/base/browser/ui/iconLabel/iconLabelHover",e)}),define(ne[543],re([1,0,10,11,30,117,225,2,13,1206]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setupCustomHover=e.setupNativeHover=void 0;function v(c,i){(0,I.isString)(i)?c.title=(0,k.stripIcons)(i):i?.markdownNotSupportedFallback?c.title=i.markdownNotSupportedFallback:c.removeAttribute("title")}e.setupNativeHover=v;class C{constructor(i,S,s){this.hoverDelegate=i,this.target=S,this.fadeInAnimation=s}async update(i,S){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let s;if(i===void 0||(0,I.isString)(i)||i instanceof HTMLElement)s=i;else if(!(0,I.isFunction)(i.markdown))s=i.markdown??i.markdownNotSupportedFallback;else{this._hoverWidget||this.show((0,w.localize)(0,null),S),this._cancellationTokenSource=new _.CancellationTokenSource;const l=this._cancellationTokenSource.token;if(s=await i.markdown(l),s===void 0&&(s=i.markdownNotSupportedFallback),this.isDisposed||l.isCancellationRequested)return}this.show(s,S)}show(i,S){const s=this._hoverWidget;if(this.hasContent(i)){const l={content:i,target:this.target,showPointer:this.hoverDelegate.placement==="element",hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!s};this._hoverWidget=this.hoverDelegate.showHover(l,S)}s?.dispose()}hasContent(i){return i?(0,A.isMarkdownString)(i)?!!i.value:!0:!1}get isDisposed(){return this._hoverWidget?.isDisposed}dispose(){this._hoverWidget?.dispose(),this._cancellationTokenSource?.dispose(!0),this._cancellationTokenSource=void 0}}function o(c,i,S){let s,l;const r=(h,g)=>{h&&(l?.dispose(),l=void 0),g&&(s?.dispose(),s=void 0),c.onDidHideHover?.()},p=(h,g,d)=>new f.TimeoutTimer(async()=>{(!l||l.isDisposed)&&(l=new C(c,d||i,h>0),await l.update(S,g))},h),u=()=>{if(s)return;const h=new D.DisposableStore,g=b=>r(!1,b.fromElement===i);h.add(t.addDisposableListener(i,t.EventType.MOUSE_LEAVE,g,!0));const d=()=>r(!0,!0);h.add(t.addDisposableListener(i,t.EventType.MOUSE_DOWN,d,!0));const m={targetElements:[i],dispose:()=>{}};if(c.placement===void 0||c.placement==="mouse"){const b=E=>m.x=E.x+10;h.add(t.addDisposableListener(i,t.EventType.MOUSE_MOVE,b,!0))}h.add(p(c.delay,!1,m)),s=h},a=t.addDisposableListener(i,t.EventType.MOUSE_OVER,u,!0);return{show:h=>{r(!1,!0),p(0,h)},hide:()=>{r(!0,!0)},update:async h=>{S=h,await l?.update(S)},dispose:()=>{a.dispose(),r(!0,!0)}}}e.setupCustomHover=o}),define(ne[234],re([1,0,10,241,543,2,51,443,986]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IconLabel=void 0;class I{constructor(i){this._element=i}get element(){return this._element}set textContent(i){this.disposed||i===this._textContent||(this._textContent=i,this._element.textContent=i)}set className(i){this.disposed||i===this._className||(this._className=i,this._element.className=i)}set empty(i){this.disposed||i===this._empty||(this._empty=i,this._element.style.marginLeft=i?"0":"")}dispose(){this.disposed=!0}}class w extends A.Disposable{constructor(i,S){super();this.customHovers=new Map,this.domNode=this._register(new I(t.append(i,t.$(".monaco-icon-label")))),this.labelContainer=t.append(this.domNode.element,t.$(".monaco-icon-label-container"));const s=t.append(this.labelContainer,t.$("span.monaco-icon-name-container"));this.descriptionContainer=this._register(new I(t.append(this.labelContainer,t.$("span.monaco-icon-description-container")))),S?.supportHighlights||S?.supportIcons?this.nameNode=new o(s,!!S.supportIcons):this.nameNode=new v(s),S?.supportDescriptionHighlights?this.descriptionNodeFactory=()=>new f.HighlightedLabel(t.append(this.descriptionContainer.element,t.$("span.label-description")),{supportIcons:!!S.supportIcons}):this.descriptionNodeFactory=()=>this._register(new I(t.append(this.descriptionContainer.element,t.$("span.label-description")))),this.hoverDelegate=S?.hoverDelegate}get element(){return this.domNode.element}setLabel(i,S,s){const l=["monaco-icon-label"];s&&(s.extraClasses&&l.push(...s.extraClasses),s.italic&&l.push("italic"),s.strikethrough&&l.push("strikethrough")),this.domNode.className=l.join(" "),this.setupHover(s?.descriptionTitle?this.labelContainer:this.element,s?.title),this.nameNode.setLabel(i,s),(S||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof f.HighlightedLabel?(this.descriptionNode.set(S||"",s?s.descriptionMatches:void 0),this.setupHover(this.descriptionNode.element,s?.descriptionTitle)):(this.descriptionNode.textContent=S||"",this.setupHover(this.descriptionNode.element,s?.descriptionTitle||""),this.descriptionNode.empty=!S))}setupHover(i,S){const s=this.customHovers.get(i);if(s&&(s.dispose(),this.customHovers.delete(i)),!S){i.removeAttribute("title");return}if(!this.hoverDelegate)(0,_.setupNativeHover)(i,S);else{const l=(0,_.setupCustomHover)(this.hoverDelegate,i,S);l&&this.customHovers.set(i,l)}}dispose(){super.dispose();for(const i of this.customHovers.values())i.dispose();this.customHovers.clear()}}e.IconLabel=w;class v{constructor(i){this.container=i,this.label=void 0,this.singleLabel=void 0}setLabel(i,S){if(!(this.label===i&&(0,k.equals)(this.options,S)))if(this.label=i,this.options=S,typeof i=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=t.append(this.container,t.$("a.label-name",{id:S?.domId}))),this.singleLabel.textContent=i;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let s=0;s<i.length;s++){const l=i[s],r=S?.domId&&`${S?.domId}_${s}`;t.append(this.container,t.$("a.label-name",{id:r,"data-icon-label-count":i.length,"data-icon-label-index":s,role:"treeitem"},l)),s<i.length-1&&t.append(this.container,t.$("span.label-separator",void 0,S?.separator||"/"))}}}}function C(c,i,S){if(!S)return;let s=0;return c.map(l=>{const r={start:s,end:s+l.length},p=S.map(u=>D.Range.intersect(r,u)).filter(u=>!D.Range.isEmpty(u)).map(({start:u,end:a})=>({start:u-s,end:a-s}));return s=r.end+i.length,p})}class o{constructor(i,S){this.container=i,this.supportIcons=S,this.label=void 0,this.singleLabel=void 0}setLabel(i,S){if(!(this.label===i&&(0,k.equals)(this.options,S)))if(this.label=i,this.options=S,typeof i=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=new f.HighlightedLabel(t.append(this.container,t.$("a.label-name",{id:S?.domId})),{supportIcons:this.supportIcons})),this.singleLabel.set(i,S?.matches,void 0,S?.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const s=S?.separator||"/",l=C(i,s,S?.matches);for(let r=0;r<i.length;r++){const p=i[r],u=l?l[r]:void 0,a=S?.domId&&`${S?.domId}_${r}`,n=t.$("a.label-name",{id:a,"data-icon-label-count":i.length,"data-icon-label-index":r,role:"treeitem"});new f.HighlightedLabel(t.append(this.container,n),{supportIcons:this.supportIcons}).set(p,u,void 0,S?.labelEscapeNewLines),r<i.length-1&&t.append(n,t.$("span.label-separator",void 0,s))}}}}}),define(ne[1207],re([3,4]),function(Q,e){return Q.create("vs/base/browser/ui/inputbox/inputBox",e)}),define(ne[1208],re([3,4]),function(Q,e){return Q.create("vs/base/browser/ui/keybindingLabel/keybindingLabel",e)}),define(ne[1209],re([3,4]),function(Q,e){return Q.create("vs/base/browser/ui/menu/menubar",e)}),define(ne[1210],re([3,4]),function(Q,e){return Q.create("vs/base/browser/ui/selectBox/selectBoxCustom",e)}),define(ne[1211],re([1,0,10,224,91,242,208,15,6,97,2,14,1210,996]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectBoxList=void 0;const c=t.$,i="selectOption.entry.template";class S{get templateId(){return i}renderTemplate(r){const p=Object.create(null);return p.disposables=[],p.root=r,p.text=t.append(r,c(".option-text")),p.detail=t.append(r,c(".option-detail")),p.decoratorRight=t.append(r,c(".option-decorator-right")),p}renderElement(r,p,u){const a=u,n=r.text,h=r.detail,g=r.decoratorRight,d=r.isDisabled;a.text.textContent=n,a.detail.textContent=h||"",a.decoratorRight.innerText=g||"",d?a.root.classList.add("option-disabled"):a.root.classList.remove("option-disabled")}disposeTemplate(r){r.disposables=(0,v.dispose)(r.disposables)}}class s extends v.Disposable{constructor(r,p,u,a,n){super();this.options=[],this._currentSelection=0,this._hasDetails=!1,this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.selectBoxOptions=n||Object.create(null),typeof this.selectBoxOptions.minBottomMargin!="number"?this.selectBoxOptions.minBottomMargin=s.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN:this.selectBoxOptions.minBottomMargin<0&&(this.selectBoxOptions.minBottomMargin=0),this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box monaco-select-box-dropdown-padding",typeof this.selectBoxOptions.ariaLabel=="string"&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),this._onDidSelect=new I.Emitter,this._register(this._onDidSelect),this.styles=a,this.registerListeners(),this.constructSelectDropDown(u),this.selected=p||0,r&&this.setOptions(r,p)}getHeight(){return 18}getTemplateId(){return i}constructSelectDropDown(r){this.contextViewProvider=r,this.selectDropDownContainer=t.$(".monaco-select-box-dropdown-container"),this.selectDropDownContainer.classList.add("monaco-select-box-dropdown-padding"),this.selectionDetailsPane=t.append(this.selectDropDownContainer,c(".select-box-details-pane"));let p=t.append(this.selectDropDownContainer,c(".select-box-dropdown-container-width-control")),u=t.append(p,c(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",t.append(u,this.widthControlElement),this._dropDownPosition=0,this.styleElement=t.createStyleSheet(this.selectDropDownContainer),this.selectDropDownContainer.setAttribute("draggable","true"),this._register(t.addDisposableListener(this.selectDropDownContainer,t.EventType.DRAG_START,a=>{t.EventHelper.stop(a,!0)}))}registerListeners(){this._register(t.addStandardDisposableListener(this.selectElement,"change",p=>{this.selected=p.target.selectedIndex,this._onDidSelect.fire({index:p.target.selectedIndex,selected:p.target.value}),!!this.options[this.selected]&&!!this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)})),this._register(t.addDisposableListener(this.selectElement,t.EventType.CLICK,p=>{t.EventHelper.stop(p),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(t.addDisposableListener(this.selectElement,t.EventType.MOUSE_DOWN,p=>{t.EventHelper.stop(p)}));let r;this._register(t.addDisposableListener(this.selectElement,"touchstart",p=>{r=this._isVisible})),this._register(t.addDisposableListener(this.selectElement,"touchend",p=>{t.EventHelper.stop(p),r?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(t.addDisposableListener(this.selectElement,t.EventType.KEY_DOWN,p=>{const u=new _.StandardKeyboardEvent(p);let a=!1;C.isMacintosh?(u.keyCode===18||u.keyCode===16||u.keyCode===10||u.keyCode===3)&&(a=!0):(u.keyCode===18&&u.altKey||u.keyCode===16&&u.altKey||u.keyCode===10||u.keyCode===3)&&(a=!0),a&&(this.showSelectDropDown(),t.EventHelper.stop(p,!0))}))}get onDidSelect(){return this._onDidSelect.event}setOptions(r,p){D.equals(this.options,r)||(this.options=r,this.selectElement.options.length=0,this._hasDetails=!1,this.options.forEach((u,a)=>{this.selectElement.add(this.createOption(u.text,a,u.isDisabled)),typeof u.description=="string"&&(this._hasDetails=!0)})),p!==void 0&&(this.select(p),this._currentSelection=this.selected)}setOptionsList(){this.selectList&&this.selectList.splice(0,this.selectList.length,this.options)}select(r){r>=0&&r<this.options.length?this.selected=r:r>this.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,!!this.options[this.selected]&&!!this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)}setAriaLabel(r){this.selectBoxOptions.ariaLabel=r,this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(r){this.selectElement.tabIndex=r?0:-1}render(r){this.container=r,r.classList.add("select-container"),r.appendChild(this.selectElement),this.applyStyles()}style(r){const p=[];this.styles=r,this.styles.listFocusBackground&&p.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { background-color: ${this.styles.listFocusBackground} !important; }`),this.styles.listFocusForeground&&p.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { color: ${this.styles.listFocusForeground} !important; }`),this.styles.decoratorRightForeground&&p.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.focused) .option-decorator-right { color: ${this.styles.decoratorRightForeground}; }`),this.styles.selectBackground&&this.styles.selectBorder&&!this.styles.selectBorder.equals(this.styles.selectBackground)?(p.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `),p.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `),p.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)):this.styles.selectListBorder&&(p.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `),p.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)),this.styles.listHoverForeground&&p.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { color: ${this.styles.listHoverForeground} !important; }`),this.styles.listHoverBackground&&p.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: ${this.styles.listHoverBackground} !important; }`),this.styles.listFocusOutline&&p.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1.6px dotted ${this.styles.listFocusOutline} !important; outline-offset: -1.6px !important; }`),this.styles.listHoverOutline&&p.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { outline: 1.6px dashed ${this.styles.listHoverOutline} !important; outline-offset: -1.6px !important; }`),p.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled.focused { background-color: transparent !important; color: inherit !important; outline: none !important; }"),p.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: transparent !important; color: inherit !important; outline: none !important; }"),this.styleElement.textContent=p.join(` `),this.applyStyles()}applyStyles(){if(this.selectElement){const r=this.styles.selectBackground?this.styles.selectBackground.toString():"",p=this.styles.selectForeground?this.styles.selectForeground.toString():"",u=this.styles.selectBorder?this.styles.selectBorder.toString():"";this.selectElement.style.backgroundColor=r,this.selectElement.style.color=p,this.selectElement.style.borderColor=u}this.selectList&&this.styleList()}styleList(){if(this.selectList){const r=this.styles.selectBackground?this.styles.selectBackground.toString():"";this.selectList.style({});const p=this.styles.selectListBackground?this.styles.selectListBackground.toString():r;this.selectDropDownListContainer.style.backgroundColor=p,this.selectionDetailsPane.style.backgroundColor=p;const u=this.styles.focusBorder?this.styles.focusBorder.toString():"";this.selectDropDownContainer.style.outlineColor=u,this.selectDropDownContainer.style.outlineOffset="-1px"}}createOption(r,p,u){let a=document.createElement("option");return a.value=r,a.text=r,a.disabled=!!u,a}showSelectDropDown(){this.selectionDetailsPane.innerText="",!(!this.contextViewProvider||this._isVisible)&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:r=>this.renderSelectDropDown(r,!0),layout:()=>{this.layoutSelectDropDown()},onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._isVisible=!0,this.hideSelectDropDown(!1),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:r=>this.renderSelectDropDown(r),layout:()=>this.layoutSelectDropDown(),onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._currentSelection=this.selected,this._isVisible=!0,this.selectElement.setAttribute("aria-expanded","true"))}hideSelectDropDown(r){!this.contextViewProvider||!this._isVisible||(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),r&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(r,p){return r.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(p),{dispose:()=>{try{r.removeChild(this.selectDropDownContainer)}catch{}}}}measureMaxDetailsHeight(){let r=0;return this.options.forEach((p,u)=>{this.updateDetail(u),this.selectionDetailsPane.offsetHeight>r&&(r=this.selectionDetailsPane.offsetHeight)}),r}layoutSelectDropDown(r){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");const p=t.getDomNodePagePosition(this.selectElement),u=getComputedStyle(this.selectElement),a=parseFloat(u.getPropertyValue("--dropdown-padding-top"))+parseFloat(u.getPropertyValue("--dropdown-padding-bottom")),n=window.innerHeight-p.top-p.height-(this.selectBoxOptions.minBottomMargin||0),h=p.top-s.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,g=this.selectElement.offsetWidth,d=this.setWidthControlElement(this.widthControlElement),m=Math.max(d,Math.round(g)).toString()+"px";this.selectDropDownContainer.style.width=m,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let b=this.selectList.contentHeight;const E=this._hasDetails?this.measureMaxDetailsHeight():0,y=b+a+E,T=Math.floor((n-a-E)/this.getHeight()),R=Math.floor((h-a-E)/this.getHeight());if(r)return p.top+p.height>window.innerHeight-22||p.top<s.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN||T<1&&R<1?!1:(T<s.DEFAULT_MINIMUM_VISIBLE_OPTIONS&&R>T&&this.options.length>T?(this._dropDownPosition=1,this.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectionDetailsPane.classList.remove("border-top"),this.selectionDetailsPane.classList.add("border-bottom")):(this._dropDownPosition=0,this.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectionDetailsPane.classList.remove("border-bottom"),this.selectionDetailsPane.classList.add("border-top")),!0);if(p.top+p.height>window.innerHeight-22||p.top<s.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN||this._dropDownPosition===0&&T<1||this._dropDownPosition===1&&R<1)return this.hideSelectDropDown(!0),!1;if(this._dropDownPosition===0){if(this._isVisible&&T+R<1)return this.hideSelectDropDown(!0),!1;y>n&&(b=T*this.getHeight())}else y>h&&(b=R*this.getHeight());return this.selectList.layout(b),this.selectList.domFocus(),this.selectList.length>0&&(this.selectList.setFocus([this.selected||0]),this.selectList.reveal(this.selectList.getFocus()[0]||0)),this._hasDetails?(this.selectList.getHTMLElement().style.height=b+a+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=b+a+"px",this.updateDetail(this.selected),this.selectDropDownContainer.style.width=m,this.selectDropDownListContainer.setAttribute("tabindex","0"),this.selectElement.classList.add("synthetic-focus"),this.selectDropDownContainer.classList.add("synthetic-focus"),!0}else return!1}setWidthControlElement(r){let p=0;if(r){let u=0,a=0;this.options.forEach((n,h)=>{const g=n.detail?n.detail.length:0,d=n.decoratorRight?n.decoratorRight.length:0,m=n.text.length+g+d;m>a&&(u=h,a=m)}),r.textContent=this.options[u].text+(this.options[u].decoratorRight?this.options[u].decoratorRight+" ":""),p=t.getTotalWidth(r)}return p}createSelectList(r){if(this.selectList)return;this.selectDropDownListContainer=t.append(r,c(".select-box-dropdown-list-container")),this.listRenderer=new S,this.selectList=new k.List("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:a=>{let n=a.text;return a.detail&&(n+=`. ${a.detail}`),a.decoratorRight&&(n+=`. ${a.decoratorRight}`),a.description&&(n+=`. ${a.description}`),n},getWidgetAriaLabel:()=>(0,o.localize)(0,null),getRole:()=>"option",getWidgetRole:()=>"listbox"}}),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);const p=this._register(new f.DomEmitter(this.selectDropDownListContainer,"keydown")),u=I.Event.chain(p.event).filter(()=>this.selectList.length>0).map(a=>new _.StandardKeyboardEvent(a));this._register(u.filter(a=>a.keyCode===3).on(a=>this.onEnter(a),this)),this._register(u.filter(a=>a.keyCode===2).on(a=>this.onEnter(a),this)),this._register(u.filter(a=>a.keyCode===9).on(a=>this.onEscape(a),this)),this._register(u.filter(a=>a.keyCode===16).on(a=>this.onUpArrow(a),this)),this._register(u.filter(a=>a.keyCode===18).on(a=>this.onDownArrow(a),this)),this._register(u.filter(a=>a.keyCode===12).on(this.onPageDown,this)),this._register(u.filter(a=>a.keyCode===11).on(this.onPageUp,this)),this._register(u.filter(a=>a.keyCode===14).on(this.onHome,this)),this._register(u.filter(a=>a.keyCode===13).on(this.onEnd,this)),this._register(u.filter(a=>a.keyCode>=21&&a.keyCode<=56||a.keyCode>=80&&a.keyCode<=108).on(this.onCharacter,this)),this._register(t.addDisposableListener(this.selectList.getHTMLElement(),t.EventType.POINTER_UP,a=>this.onPointerUp(a))),this._register(this.selectList.onMouseOver(a=>typeof a.index!="undefined"&&this.selectList.setFocus([a.index]))),this._register(this.selectList.onDidChangeFocus(a=>this.onListFocus(a))),this._register(t.addDisposableListener(this.selectDropDownContainer,t.EventType.FOCUS_OUT,a=>{!this._isVisible||t.isAncestor(a.relatedTarget,this.selectDropDownContainer)||this.onListBlur()})),this.selectList.getHTMLElement().setAttribute("aria-label",this.selectBoxOptions.ariaLabel||""),this.selectList.getHTMLElement().setAttribute("aria-expanded","true"),this.styleList()}onPointerUp(r){if(!this.selectList.length)return;t.EventHelper.stop(r);const p=r.target;if(!p||p.classList.contains("slider"))return;const u=p.closest(".monaco-list-row");if(!u)return;const a=Number(u.getAttribute("data-index")),n=u.classList.contains("option-disabled");a>=0&&a<this.options.length&&!n&&(this.selected=a,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]),this.selected!==this._currentSelection&&(this._currentSelection=this.selected,this._onDidSelect.fire({index:this.selectElement.selectedIndex,selected:this.options[this.selected].text}),!!this.options[this.selected]&&!!this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)),this.hideSelectDropDown(!0))}onListBlur(){this._sticky||(this.selected!==this._currentSelection&&this.select(this._currentSelection),this.hideSelectDropDown(!1))}renderDescriptionMarkdown(r,p){const u=n=>{for(let h=0;h<n.childNodes.length;h++){const g=n.childNodes.item(h);(g.tagName&&g.tagName.toLowerCase())==="img"?n.removeChild(g):u(g)}},a=(0,A.renderMarkdown)({value:r},{actionHandler:p});return a.element.classList.add("select-box-description-markdown"),u(a.element),a.element}onListFocus(r){!this._isVisible||!this._hasDetails||this.updateDetail(r.indexes[0])}updateDetail(r){this.selectionDetailsPane.innerText="";const p=this.options[r],u=p?.description??"",a=p?.descriptionIsMarkdown??!1;if(u){if(a){const n=p.descriptionMarkdownActionHandler;this.selectionDetailsPane.appendChild(this.renderDescriptionMarkdown(u,n))}else this.selectionDetailsPane.innerText=u;this.selectionDetailsPane.style.display="block"}else this.selectionDetailsPane.style.display="none";this._skipLayout=!0,this.contextViewProvider.layout(),this._skipLayout=!1}onEscape(r){t.EventHelper.stop(r),this.select(this._currentSelection),this.hideSelectDropDown(!0)}onEnter(r){t.EventHelper.stop(r),this.selected!==this._currentSelection&&(this._currentSelection=this.selected,this._onDidSelect.fire({index:this.selectElement.selectedIndex,selected:this.options[this.selected].text}),!!this.options[this.selected]&&!!this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)),this.hideSelectDropDown(!0)}onDownArrow(r){if(this.selected<this.options.length-1){t.EventHelper.stop(r,!0);const p=this.options[this.selected+1].isDisabled;if(p&&this.options.length>this.selected+2)this.selected+=2;else{if(p)return;this.selected++}this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(r){this.selected>0&&(t.EventHelper.stop(r,!0),this.options[this.selected-1].isDisabled&&this.selected>1?this.selected-=2:this.selected--,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]))}onPageUp(r){t.EventHelper.stop(r),this.selectList.focusPreviousPage(),setTimeout(()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected<this.options.length-1&&(this.selected++,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)},1)}onPageDown(r){t.EventHelper.stop(r),this.selectList.focusNextPage(),setTimeout(()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected>0&&(this.selected--,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)},1)}onHome(r){t.EventHelper.stop(r),!(this.options.length<2)&&(this.selected=0,this.options[this.selected].isDisabled&&this.selected>1&&this.selected++,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onEnd(r){t.EventHelper.stop(r),!(this.options.length<2)&&(this.selected=this.options.length-1,this.options[this.selected].isDisabled&&this.selected>1&&this.selected--,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onCharacter(r){const p=w.KeyCodeUtils.toString(r.keyCode);let u=-1;for(let a=0;a<this.options.length-1;a++)if(u=(a+this.selected+1)%this.options.length,this.options[u].text.charAt(0).toUpperCase()===p&&!this.options[u].isDisabled){this.select(u),this.selectList.setFocus([u]),this.selectList.reveal(this.selectList.getFocus()[0]),t.EventHelper.stop(r);break}}dispose(){this.hideSelectDropDown(!1),super.dispose()}}e.SelectBoxList=s,s.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN=32,s.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN=2,s.DEFAULT_MINIMUM_VISIBLE_OPTIONS=3}),define(ne[389],re([1,0,1211,963,138,66,51,14,995]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectBox=e.defaultStyles=void 0,e.defaultStyles={selectBackground:A.Color.fromHex("#3C3C3C"),selectForeground:A.Color.fromHex("#F0F0F0"),selectBorder:A.Color.fromHex("#3C3C3C")};class I extends _.Widget{constructor(v,C,o,c=(0,k.deepClone)(e.defaultStyles),i){super();D.isMacintosh&&!i?.useCustomDrawn?this.selectBoxDelegate=new f.SelectBoxNative(v,C,c,i):this.selectBoxDelegate=new t.SelectBoxList(v,C,o,c,i),this._register(this.selectBoxDelegate)}get onDidSelect(){return this.selectBoxDelegate.onDidSelect}setOptions(v,C){this.selectBoxDelegate.setOptions(v,C)}select(v){this.selectBoxDelegate.select(v)}setAriaLabel(v){this.selectBoxDelegate.setAriaLabel(v)}focus(){this.selectBoxDelegate.focus()}blur(){this.selectBoxDelegate.blur()}setFocusable(v){this.selectBoxDelegate.setFocusable(v)}render(v){this.selectBoxDelegate.render(v)}style(v){this.selectBoxDelegate.style(v)}applyStyles(){this.selectBoxDelegate.applyStyles()}}e.SelectBox=I}),define(ne[1212],re([3,4]),function(Q,e){return Q.create("vs/base/browser/ui/splitview/paneview",e)}),define(ne[715],re([1,0,77,170,10,224,91,129,66,6,2,1212,209,997]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PaneView=e.DefaultPaneDndController=e.Pane=void 0;class c extends v.Disposable{constructor(r){super();this.expandedSize=void 0,this._headerVisible=!0,this.styles={},this.animationTimer=void 0,this._onDidChange=this._register(new w.Emitter),this.onDidChange=this._onDidChange.event,this._onDidChangeExpansionState=this._register(new w.Emitter),this.onDidChangeExpansionState=this._onDidChangeExpansionState.event,this.orthogonalSize=0,this._expanded=typeof r.expanded=="undefined"?!0:!!r.expanded,this._orientation=typeof r.orientation=="undefined"?0:r.orientation,this.ariaHeaderLabel=(0,C.localize)(0,null,r.title),this._minimumBodySize=typeof r.minimumBodySize=="number"?r.minimumBodySize:this._orientation===1?200:120,this._maximumBodySize=typeof r.maximumBodySize=="number"?r.maximumBodySize:Number.POSITIVE_INFINITY,this.element=(0,_.$)(".pane")}get draggableElement(){return this.header}get dropTargetElement(){return this.element}get dropBackground(){return this._dropBackground}get minimumBodySize(){return this._minimumBodySize}set minimumBodySize(r){this._minimumBodySize=r,this._onDidChange.fire(void 0)}get maximumBodySize(){return this._maximumBodySize}set maximumBodySize(r){this._maximumBodySize=r,this._onDidChange.fire(void 0)}get headerSize(){return this.headerVisible?c.HEADER_SIZE:0}get minimumSize(){const r=this.headerSize,u=!this.headerVisible||this.isExpanded()?this.minimumBodySize:0;return r+u}get maximumSize(){const r=this.headerSize,u=!this.headerVisible||this.isExpanded()?this.maximumBodySize:0;return r+u}isExpanded(){return this._expanded}setExpanded(r){return this._expanded===!!r?!1:(this.element&&this.element.classList.toggle("expanded",r),this._expanded=!!r,this.updateHeader(),r?(typeof this.animationTimer=="number"&&clearTimeout(this.animationTimer),(0,_.append)(this.element,this.body)):this.animationTimer=window.setTimeout(()=>{this.body.remove()},200),this._onDidChangeExpansionState.fire(r),this._onDidChange.fire(r?this.expandedSize:void 0),!0)}get headerVisible(){return this._headerVisible}set headerVisible(r){this._headerVisible!==!!r&&(this._headerVisible=!!r,this.updateHeader(),this._onDidChange.fire(void 0))}get orientation(){return this._orientation}set orientation(r){this._orientation!==r&&(this._orientation=r,this.element&&(this.element.classList.toggle("horizontal",this.orientation===1),this.element.classList.toggle("vertical",this.orientation===0)),this.header&&this.updateHeader())}render(){this.element.classList.toggle("expanded",this.isExpanded()),this.element.classList.toggle("horizontal",this.orientation===1),this.element.classList.toggle("vertical",this.orientation===0),this.header=(0,_.$)(".pane-header"),(0,_.append)(this.element,this.header),this.header.setAttribute("tabindex","0"),this.header.setAttribute("role","button"),this.header.setAttribute("aria-label",this.ariaHeaderLabel),this.renderHeader(this.header);const r=(0,_.trackFocus)(this.header);this._register(r),this._register(r.onDidFocus(()=>this.header.classList.add("focused"),null)),this._register(r.onDidBlur(()=>this.header.classList.remove("focused"),null)),this.updateHeader();const p=this._register(new v.DisposableStore),u=this._register(new A.DomEmitter(this.header,"keydown")),a=w.Event.map(u.event,n=>new k.StandardKeyboardEvent(n),p);this._register(w.Event.filter(a,n=>n.keyCode===3||n.keyCode===10,p)(()=>this.setExpanded(!this.isExpanded()),null)),this._register(w.Event.filter(a,n=>n.keyCode===15,p)(()=>this.setExpanded(!1),null)),this._register(w.Event.filter(a,n=>n.keyCode===17,p)(()=>this.setExpanded(!0),null)),this._register(D.Gesture.addTarget(this.header)),[_.EventType.CLICK,D.EventType.Tap].forEach(n=>{this._register((0,_.addDisposableListener)(this.header,n,h=>{h.defaultPrevented||this.setExpanded(!this.isExpanded())}))}),this.body=(0,_.append)(this.element,(0,_.$)(".pane-body")),this.renderBody(this.body),this.isExpanded()||this.body.remove()}layout(r){const p=this.headerVisible?c.HEADER_SIZE:0,u=this._orientation===0?this.orthogonalSize:r,a=this._orientation===0?r-p:this.orthogonalSize-p;this.isExpanded()&&(this.body.classList.toggle("wide",u>=600),this.layoutBody(a,u),this.expandedSize=r)}style(r){this.styles=r,!!this.header&&this.updateHeader()}updateHeader(){const r=!this.headerVisible||this.isExpanded();this.header.style.lineHeight=`${this.headerSize}px`,this.header.classList.toggle("hidden",!this.headerVisible),this.header.classList.toggle("expanded",r),this.header.setAttribute("aria-expanded",String(r)),this.header.style.color=this.styles.headerForeground?this.styles.headerForeground.toString():"",this.header.style.backgroundColor=this.styles.headerBackground?this.styles.headerBackground.toString():"",this.header.style.borderTop=this.styles.headerBorder&&this.orientation===0?`1px solid ${this.styles.headerBorder}`:"",this._dropBackground=this.styles.dropBackground,this.element.style.borderLeft=this.styles.leftBorder&&this.orientation===1?`1px solid ${this.styles.leftBorder}`:""}}e.Pane=c,c.HEADER_SIZE=22;class i extends v.Disposable{constructor(r,p,u){super();this.pane=r,this.dnd=p,this.context=u,this.dragOverCounter=0,this._onDidDrop=this._register(new w.Emitter),this.onDidDrop=this._onDidDrop.event,r.draggableElement.draggable=!0,this._register((0,_.addDisposableListener)(r.draggableElement,"dragstart",a=>this.onDragStart(a))),this._register((0,_.addDisposableListener)(r.dropTargetElement,"dragenter",a=>this.onDragEnter(a))),this._register((0,_.addDisposableListener)(r.dropTargetElement,"dragleave",a=>this.onDragLeave(a))),this._register((0,_.addDisposableListener)(r.dropTargetElement,"dragend",a=>this.onDragEnd(a))),this._register((0,_.addDisposableListener)(r.dropTargetElement,"drop",a=>this.onDrop(a)))}onDragStart(r){if(!this.dnd.canDrag(this.pane)||!r.dataTransfer){r.preventDefault(),r.stopPropagation();return}r.dataTransfer.effectAllowed="move",t.isFirefox&&r.dataTransfer?.setData(f.DataTransfers.TEXT,this.pane.draggableElement.textContent||"");const p=(0,_.append)(document.body,(0,_.$)(".monaco-drag-image",{},this.pane.draggableElement.textContent||""));r.dataTransfer.setDragImage(p,-10,-10),setTimeout(()=>document.body.removeChild(p),0),this.context.draggable=this}onDragEnter(r){!this.context.draggable||this.context.draggable===this||!this.dnd.canDrop(this.context.draggable.pane,this.pane)||(this.dragOverCounter++,this.render())}onDragLeave(r){!this.context.draggable||this.context.draggable===this||!this.dnd.canDrop(this.context.draggable.pane,this.pane)||(this.dragOverCounter--,this.dragOverCounter===0&&this.render())}onDragEnd(r){!this.context.draggable||(this.dragOverCounter=0,this.render(),this.context.draggable=null)}onDrop(r){!this.context.draggable||(_.EventHelper.stop(r),this.dragOverCounter=0,this.render(),this.dnd.canDrop(this.context.draggable.pane,this.pane)&&this.context.draggable!==this&&this._onDidDrop.fire({from:this.context.draggable.pane,to:this.pane}),this.context.draggable=null)}render(){let r=null;this.dragOverCounter>0&&(r=(this.pane.dropBackground||i.DefaultDragOverBackgroundColor).toString()),this.pane.dropTargetElement.style.backgroundColor=r||""}}i.DefaultDragOverBackgroundColor=new I.Color(new I.RGBA(128,128,128,.5));class S{canDrag(r){return!0}canDrop(r,p){return!0}}e.DefaultPaneDndController=S;class s extends v.Disposable{constructor(r,p={}){super();this.dndContext={draggable:null},this.paneItems=[],this.orthogonalSize=0,this.size=0,this.animationTimer=void 0,this._onDidDrop=this._register(new w.Emitter),this.onDidDrop=this._onDidDrop.event,this.dnd=p.dnd,this.orientation=p.orientation??0,this.element=(0,_.append)(r,(0,_.$)(".monaco-pane-view")),this.splitview=this._register(new o.SplitView(this.element,{orientation:this.orientation})),this.onDidSashReset=this.splitview.onDidSashReset,this.onDidSashChange=this.splitview.onDidSashChange,this.onDidScroll=this.splitview.onDidScroll;const u=this._register(new v.DisposableStore),a=this._register(new A.DomEmitter(this.element,"keydown")),n=w.Event.map(w.Event.filter(a.event,h=>h.target instanceof HTMLElement&&h.target.classList.contains("pane-header"),u),h=>new k.StandardKeyboardEvent(h),u);this._register(w.Event.filter(n,h=>h.keyCode===16,u)(()=>this.focusPrevious())),this._register(w.Event.filter(n,h=>h.keyCode===18,u)(()=>this.focusNext()))}addPane(r,p,u=this.splitview.length){const a=new v.DisposableStore;r.onDidChangeExpansionState(this.setupAnimation,this,a);const n={pane:r,disposable:a};if(this.paneItems.splice(u,0,n),r.orientation=this.orientation,r.orthogonalSize=this.orthogonalSize,this.splitview.addView(r,p,u),this.dnd){const h=new i(r,this.dnd,this.dndContext);a.add(h),a.add(h.onDidDrop(this._onDidDrop.fire,this._onDidDrop))}}removePane(r){const p=this.paneItems.findIndex(a=>a.pane===r);if(p===-1)return;this.splitview.removeView(p,r.isExpanded()?o.Sizing.Distribute:void 0),this.paneItems.splice(p,1)[0].disposable.dispose()}movePane(r,p){const u=this.paneItems.findIndex(h=>h.pane===r),a=this.paneItems.findIndex(h=>h.pane===p);if(u===-1||a===-1)return;const[n]=this.paneItems.splice(u,1);this.paneItems.splice(a,0,n),this.splitview.moveView(u,a)}resizePane(r,p){const u=this.paneItems.findIndex(a=>a.pane===r);u!==-1&&this.splitview.resizeView(u,p)}getPaneSize(r){const p=this.paneItems.findIndex(u=>u.pane===r);return p===-1?-1:this.splitview.getViewSize(p)}layout(r,p){this.orthogonalSize=this.orientation===0?p:r,this.size=this.orientation===1?p:r;for(const u of this.paneItems)u.pane.orthogonalSize=this.orthogonalSize;this.splitview.layout(this.size)}flipOrientation(r,p){this.orientation=this.orientation===0?1:0;const u=this.paneItems.map(h=>this.getPaneSize(h.pane));this.splitview.dispose(),(0,_.clearNode)(this.element),this.splitview=this._register(new o.SplitView(this.element,{orientation:this.orientation}));const a=this.orientation===0?p:r,n=this.orientation===1?p:r;this.paneItems.forEach((h,g)=>{h.pane.orthogonalSize=a,h.pane.orientation=this.orientation;const d=this.size===0?0:n*u[g]/this.size;this.splitview.addView(h.pane,d,g)}),this.size=n,this.orthogonalSize=a,this.splitview.layout(this.size)}setupAnimation(){typeof this.animationTimer=="number"&&window.clearTimeout(this.animationTimer),this.element.classList.add("animated"),this.animationTimer=window.setTimeout(()=>{this.animationTimer=void 0,this.element.classList.remove("animated")},200)}getPaneHeaderElements(){return[...this.element.querySelectorAll(".pane-header")]}focusPrevious(){const r=this.getPaneHeaderElements(),p=r.indexOf(document.activeElement);p!==-1&&r[Math.max(p-1,0)].focus()}focusNext(){const r=this.getPaneHeaderElements(),p=r.indexOf(document.activeElement);p!==-1&&r[Math.min(p+1,r.length-1)].focus()}dispose(){super.dispose(),this.paneItems.forEach(r=>r.disposable.dispose())}}e.PaneView=s}),define(ne[1213],re([3,4]),function(Q,e){return Q.create("vs/base/browser/ui/toolbar/toolbar",e)}),define(ne[1214],re([3,4]),function(Q,e){return Q.create("vs/base/browser/ui/tree/abstractTree",e)}),define(ne[390],re([1,0,170,10,224,91,305,208,518,277,15,11,33,143,6,102,2,195,14,1214,1003]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractTree=e.RenderIndentGuides=e.AbstractTreeViewState=e.ComposedTreeDelegate=void 0;class u extends k.ElementsDragAndDropData{constructor(V){super(V.elements.map(z=>z.element));this.data=V}set context(V){this.data.context=V}get context(){return this.data.context}}function a(P){return P instanceof k.ElementsDragAndDropData?new u(P):P}class n{constructor(V,z){this.modelProvider=V,this.dnd=z,this.autoExpandDisposable=s.Disposable.None}getDragURI(V){return this.dnd.getDragURI(V.element)}getDragLabel(V,z){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(V.map(U=>U.element),z)}onDragStart(V,z){this.dnd.onDragStart&&this.dnd.onDragStart(a(V),z)}onDragOver(V,z,U,H,K=!0){const G=this.dnd.onDragOver(a(V),z&&z.element,U,H),q=this.autoExpandNode!==z;if(q&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=z),typeof z=="undefined")return G;if(q&&typeof G!="boolean"&&G.autoExpand&&(this.autoExpandDisposable=(0,C.disposableTimeout)(()=>{const $=this.modelProvider(),J=$.getNodeLocation(z);$.isCollapsed(J)&&$.setCollapsed(J,!1),this.autoExpandNode=void 0},500)),typeof G=="boolean"||!G.accept||typeof G.bubble=="undefined"||G.feedback){if(!K){const $=typeof G=="boolean"?G:G.accept,J=typeof G=="boolean"?void 0:G.effect;return{accept:$,effect:J,feedback:[U]}}return G}if(G.bubble===1){const $=this.modelProvider(),J=$.getNodeLocation(z),ee=$.getParentNodeLocation(J),te=$.getNode(ee),se=ee&&$.getListIndex(ee);return this.onDragOver(V,te,se,H,!1)}const Z=this.modelProvider(),j=Z.getNodeLocation(z),X=Z.getListIndex(j),Y=Z.getListRenderCount(j);return{...G,feedback:(0,v.range)(X,X+Y)}}drop(V,z,U,H){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(a(V),z&&z.element,U,H)}onDragEnd(V){this.dnd.onDragEnd&&this.dnd.onDragEnd(V)}}function h(P,V){return V&&{...V,identityProvider:V.identityProvider&&{getId(z){return V.identityProvider.getId(z.element)}},dnd:V.dnd&&new n(P,V.dnd),multipleSelectionController:V.multipleSelectionController&&{isSelectionSingleChangeEvent(z){return V.multipleSelectionController.isSelectionSingleChangeEvent({...z,element:z.element})},isSelectionRangeChangeEvent(z){return V.multipleSelectionController.isSelectionRangeChangeEvent({...z,element:z.element})}},accessibilityProvider:V.accessibilityProvider&&{...V.accessibilityProvider,getSetSize(z){const U=P(),H=U.getNodeLocation(z),K=U.getParentNodeLocation(H);return U.getNode(K).visibleChildrenCount},getPosInSet(z){return z.visibleChildIndex+1},isChecked:V.accessibilityProvider&&V.accessibilityProvider.isChecked?z=>V.accessibilityProvider.isChecked(z.element):void 0,getRole:V.accessibilityProvider&&V.accessibilityProvider.getRole?z=>V.accessibilityProvider.getRole(z.element):()=>"treeitem",getAriaLabel(z){return V.accessibilityProvider.getAriaLabel(z.element)},getWidgetAriaLabel(){return V.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:V.accessibilityProvider&&V.accessibilityProvider.getWidgetRole?()=>V.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:V.accessibilityProvider&&V.accessibilityProvider.getAriaLevel?z=>V.accessibilityProvider.getAriaLevel(z.element):z=>z.depth,getActiveDescendantId:V.accessibilityProvider.getActiveDescendantId&&(z=>V.accessibilityProvider.getActiveDescendantId(z.element))},keyboardNavigationLabelProvider:V.keyboardNavigationLabelProvider&&{...V.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(z){return V.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(z.element)}},enableKeyboardNavigation:V.simpleKeyboardNavigation}}class g{constructor(V){this.delegate=V}getHeight(V){return this.delegate.getHeight(V.element)}getTemplateId(V){return this.delegate.getTemplateId(V.element)}hasDynamicHeight(V){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(V.element)}setDynamicHeight(V,z){this.delegate.setDynamicHeight&&this.delegate.setDynamicHeight(V.element,z)}}e.ComposedTreeDelegate=g;class d{constructor(V){if(this.focus=new Set(V.focus),this.selection=new Set(V.selection),V.expanded instanceof Array){this.expanded=Object.create(null);for(const z of V.expanded)this.expanded[z]=1}else this.expanded=V.expanded;this.expanded=V.expanded,this.scrollTop=V.scrollTop}static lift(V){return V instanceof d?V:new d(V)}static empty(V=0){return new d({focus:[],selection:[],expanded:Object.create(null),scrollTop:V})}toJSON(){return{focus:Array.from(this.focus),selection:Array.from(this.selection),expanded:this.expanded,scrollTop:this.scrollTop}}}e.AbstractTreeViewState=d;var m;(function(P){P.None="none",P.OnHover="onHover",P.Always="always"})(m=e.RenderIndentGuides||(e.RenderIndentGuides={}));class b{constructor(V,z=[]){this._elements=z,this.onDidChange=i.Event.forEach(V,U=>this._elements=U)}get elements(){return this._elements}}class E{constructor(V,z,U,H,K={}){this.renderer=V,this.modelProvider=z,this.activeNodes=H,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=E.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.renderedIndentGuides=new c.SetMap,this.activeIndentNodes=new Set,this.indentGuidesDisposable=s.Disposable.None,this.disposables=new s.DisposableStore,this.templateId=V.templateId,this.updateOptions(K),i.Event.map(U,G=>G.node)(this.onDidChangeNodeTwistieState,this,this.disposables),V.onDidChangeTwistieState&&V.onDidChangeTwistieState(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(V={}){if(typeof V.indent!="undefined"&&(this.indent=(0,l.clamp)(V.indent,0,40)),typeof V.renderIndentGuides!="undefined"){const z=V.renderIndentGuides!==m.None;if(z!==this.shouldRenderIndentGuides&&(this.shouldRenderIndentGuides=z,this.indentGuidesDisposable.dispose(),z)){const U=new s.DisposableStore;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,U),this.indentGuidesDisposable=U,this._onDidChangeActiveNodes(this.activeNodes.elements)}}typeof V.hideTwistiesOfChildlessElements!="undefined"&&(this.hideTwistiesOfChildlessElements=V.hideTwistiesOfChildlessElements)}renderTemplate(V){const z=(0,f.append)(V,(0,f.$)(".monaco-tl-row")),U=(0,f.append)(z,(0,f.$)(".monaco-tl-indent")),H=(0,f.append)(z,(0,f.$)(".monaco-tl-twistie")),K=(0,f.append)(z,(0,f.$)(".monaco-tl-contents")),G=this.renderer.renderTemplate(K);return{container:V,indent:U,twistie:H,indentGuidesDisposable:s.Disposable.None,templateData:G}}renderElement(V,z,U,H){typeof H=="number"&&(this.renderedNodes.set(V,{templateData:U,height:H}),this.renderedElements.set(V.element,V));const K=E.DefaultIndent+(V.depth-1)*this.indent;U.twistie.style.paddingLeft=`${K}px`,U.indent.style.width=`${K+this.indent-16}px`,this.renderTwistie(V,U),typeof H=="number"&&this.renderIndentGuides(V,U),this.renderer.renderElement(V,z,U.templateData,H)}disposeElement(V,z,U,H){U.indentGuidesDisposable.dispose(),this.renderer.disposeElement&&this.renderer.disposeElement(V,z,U.templateData,H),typeof H=="number"&&(this.renderedNodes.delete(V),this.renderedElements.delete(V.element))}disposeTemplate(V){this.renderer.disposeTemplate(V.templateData)}onDidChangeTwistieState(V){const z=this.renderedElements.get(V);!z||this.onDidChangeNodeTwistieState(z)}onDidChangeNodeTwistieState(V){const z=this.renderedNodes.get(V);!z||(this.renderTwistie(V,z.templateData),this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderIndentGuides(V,z.templateData))}renderTwistie(V,z){z.twistie.classList.remove(...o.Codicon.treeItemExpanded.classNamesArray);let U=!1;this.renderer.renderTwistie&&(U=this.renderer.renderTwistie(V.element,z.twistie)),V.collapsible&&(!this.hideTwistiesOfChildlessElements||V.visibleChildrenCount>0)?(U||z.twistie.classList.add(...o.Codicon.treeItemExpanded.classNamesArray),z.twistie.classList.add("collapsible"),z.twistie.classList.toggle("collapsed",V.collapsed)):z.twistie.classList.remove("collapsible","collapsed"),V.collapsible?z.container.setAttribute("aria-expanded",String(!V.collapsed)):z.container.removeAttribute("aria-expanded")}renderIndentGuides(V,z){if((0,f.clearNode)(z.indent),z.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const U=new s.DisposableStore,H=this.modelProvider();let K=V;for(;;){const G=H.getNodeLocation(K),q=H.getParentNodeLocation(G);if(!q)break;const Z=H.getNode(q),j=(0,f.$)(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(Z)&&j.classList.add("active"),z.indent.childElementCount===0?z.indent.appendChild(j):z.indent.insertBefore(j,z.indent.firstElementChild),this.renderedIndentGuides.add(Z,j),U.add((0,s.toDisposable)(()=>this.renderedIndentGuides.delete(Z,j))),K=Z}z.indentGuidesDisposable=U}_onDidChangeActiveNodes(V){if(!this.shouldRenderIndentGuides)return;const z=new Set,U=this.modelProvider();V.forEach(H=>{const K=U.getNodeLocation(H);try{const G=U.getParentNodeLocation(K);H.collapsible&&H.children.length>0&&!H.collapsed?z.add(H):G&&z.add(U.getNode(G))}catch{}}),this.activeIndentNodes.forEach(H=>{z.has(H)||this.renderedIndentGuides.forEach(H,K=>K.classList.remove("active"))}),z.forEach(H=>{this.activeIndentNodes.has(H)||this.renderedIndentGuides.forEach(H,K=>K.classList.add("active"))}),this.activeIndentNodes=z}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),(0,s.dispose)(this.disposables)}}E.DefaultIndent=8;class y{constructor(V,z,U){this.tree=V,this.keyboardNavigationLabelProvider=z,this._filter=U,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new s.DisposableStore,V.onWillRefilter(this.reset,this,this.disposables)}get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}set pattern(V){this._pattern=V,this._lowercasePattern=V.toLowerCase()}filter(V,z){if(this._filter){const K=this._filter.filter(V,z);if(this.tree.options.simpleKeyboardNavigation)return K;let G;if(typeof K=="boolean"?G=K?1:0:(0,I.isFilterResult)(K)?G=(0,I.getVisibleState)(K.visibility):G=K,G===0)return!1}if(this._totalCount++,this.tree.options.simpleKeyboardNavigation||!this._pattern)return this._matchCount++,{data:S.FuzzyScore.Default,visibility:!0};const U=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(V),H=Array.isArray(U)?U:[U];for(const K of H){const G=K&&K.toString();if(typeof G=="undefined")return{data:S.FuzzyScore.Default,visibility:!0};const q=(0,S.fuzzyScore)(this._pattern,this._lowercasePattern,0,G,G.toLowerCase(),0,!0);if(q)return this._matchCount++,H.length===1?{data:q,visibility:!0}:{data:{label:G,score:q},visibility:!0}}return this.tree.options.filterOnType?2:{data:S.FuzzyScore.Default,visibility:!0}}reset(){this._totalCount=0,this._matchCount=0}dispose(){(0,s.dispose)(this.disposables)}}class T{constructor(V,z,U,H,K){this.tree=V,this.view=U,this.filter=H,this.keyboardNavigationDelegate=K,this._enabled=!1,this._pattern="",this._empty=!1,this._onDidChangeEmptyState=new i.Emitter,this.onDidChangeEmptyState=i.Event.latch(this._onDidChangeEmptyState.event),this.positionClassName="ne",this.automaticKeyboardNavigation=!0,this.triggered=!1,this._onDidChangePattern=new i.Emitter,this.onDidChangePattern=this._onDidChangePattern.event,this.enabledDisposables=new s.DisposableStore,this.disposables=new s.DisposableStore,this.domNode=(0,f.$)(`.monaco-list-type-filter.${this.positionClassName}`),this.domNode.draggable=!0,this.disposables.add((0,f.addDisposableListener)(this.domNode,"dragstart",()=>this.onDragStart())),this.messageDomNode=(0,f.append)(U.getHTMLElement(),(0,f.$)(".monaco-list-type-filter-message")),this.labelDomNode=(0,f.append)(this.domNode,(0,f.$)("span.label"));const G=(0,f.append)(this.domNode,(0,f.$)(".controls"));this._filterOnType=!!V.options.filterOnType,this.filterOnTypeDomNode=(0,f.append)(G,(0,f.$)("input.filter")),this.filterOnTypeDomNode.type="checkbox",this.filterOnTypeDomNode.checked=this._filterOnType,this.filterOnTypeDomNode.tabIndex=-1,this.updateFilterOnTypeTitleAndIcon(),this.disposables.add((0,f.addDisposableListener)(this.filterOnTypeDomNode,"input",()=>this.onDidChangeFilterOnType())),this.clearDomNode=(0,f.append)(G,(0,f.$)("button.clear"+o.Codicon.treeFilterClear.cssSelector)),this.clearDomNode.tabIndex=-1,this.clearDomNode.title=(0,p.localize)(0,null),this.keyboardNavigationEventFilter=V.options.keyboardNavigationEventFilter,z.onDidSplice(this.onDidSpliceModel,this,this.disposables),this.updateOptions(V.options)}get enabled(){return this._enabled}get pattern(){return this._pattern}get filterOnType(){return this._filterOnType}get empty(){return this._empty}updateOptions(V){V.simpleKeyboardNavigation?this.disable():this.enable(),typeof V.filterOnType!="undefined"&&(this._filterOnType=!!V.filterOnType,this.filterOnTypeDomNode.checked=this._filterOnType,this.updateFilterOnTypeTitleAndIcon()),typeof V.automaticKeyboardNavigation!="undefined"&&(this.automaticKeyboardNavigation=V.automaticKeyboardNavigation),this.tree.refilter(),this.render(),this.automaticKeyboardNavigation||this.onEventOrInput("")}toggle(){this.triggered=!this.triggered,this.triggered||this.onEventOrInput("")}enable(){if(this._enabled)return;const V=this.enabledDisposables.add(new _.DomEmitter(this.view.getHTMLElement(),"keydown")),z=i.Event.chain(V.event).filter(H=>!(0,D.isInputElement)(H.target)||H.target===this.filterOnTypeDomNode).filter(H=>H.key!=="Dead"&&!/^Media/.test(H.key)).map(H=>new A.StandardKeyboardEvent(H)).filter(this.keyboardNavigationEventFilter||(()=>!0)).filter(()=>this.automaticKeyboardNavigation||this.triggered).filter(H=>this.keyboardNavigationDelegate.mightProducePrintableCharacter(H)&&!(H.keyCode===18||H.keyCode===16||H.keyCode===15||H.keyCode===17)||(this.pattern.length>0||this.triggered)&&(H.keyCode===9||H.keyCode===1)&&!H.altKey&&!H.ctrlKey&&!H.metaKey||H.keyCode===1&&(r.isMacintosh?H.altKey&&!H.metaKey:H.ctrlKey)&&!H.shiftKey).forEach(H=>{H.stopPropagation(),H.preventDefault()}).event,U=this.enabledDisposables.add(new _.DomEmitter(this.clearDomNode,"click"));i.Event.chain(i.Event.any(z,U.event)).event(this.onEventOrInput,this,this.enabledDisposables),this.filter.pattern="",this.tree.refilter(),this.render(),this._enabled=!0,this.triggered=!1}disable(){!this._enabled||(this.domNode.remove(),this.enabledDisposables.clear(),this.tree.refilter(),this.render(),this._enabled=!1,this.triggered=!1)}onEventOrInput(V){typeof V=="string"?this.onInput(V):V instanceof MouseEvent||V.keyCode===9||V.keyCode===1&&(r.isMacintosh?V.altKey:V.ctrlKey)?this.onInput(""):V.keyCode===1?this.onInput(this.pattern.length===0?"":this.pattern.substr(0,this.pattern.length-1)):this.onInput(this.pattern+V.browserEvent.key)}onInput(V){const z=this.view.getHTMLElement();V&&!this.domNode.parentElement?z.append(this.domNode):!V&&this.domNode.parentElement&&(this.domNode.remove(),this.tree.domFocus()),this._pattern=V,this._onDidChangePattern.fire(V),this.filter.pattern=V,this.tree.refilter(),V&&this.tree.focusNext(0,!0,void 0,H=>!S.FuzzyScore.isDefault(H.filterData));const U=this.tree.getFocus();if(U.length>0){const H=U[0];this.tree.getRelativeTop(H)===null&&this.tree.reveal(H,.5)}this.render(),V||(this.triggered=!1)}onDragStart(){const V=this.view.getHTMLElement(),{left:z}=(0,f.getDomNodePagePosition)(V),U=V.clientWidth,H=U/2,K=this.domNode.clientWidth,G=new s.DisposableStore;let q=this.positionClassName;const Z=()=>{switch(q){case"nw":this.domNode.style.top="4px",this.domNode.style.left="4px";break;case"ne":this.domNode.style.top="4px",this.domNode.style.left=`${U-K-6}px`;break}},j=Y=>{Y.preventDefault();const $=Y.clientX-z;Y.dataTransfer&&(Y.dataTransfer.dropEffect="none"),$<H?q="nw":q="ne",Z()},X=()=>{this.positionClassName=q,this.domNode.className=`monaco-list-type-filter ${this.positionClassName}`,this.domNode.style.top="",this.domNode.style.left="",(0,s.dispose)(G)};Z(),this.domNode.classList.remove(q),this.domNode.classList.add("dragging"),G.add((0,s.toDisposable)(()=>this.domNode.classList.remove("dragging"))),G.add((0,f.addDisposableListener)(document,"dragover",Y=>j(Y))),G.add((0,f.addDisposableListener)(this.domNode,"dragend",()=>X())),t.StaticDND.CurrentDragAndDropData=new t.DragAndDropData("vscode-ui"),G.add((0,s.toDisposable)(()=>t.StaticDND.CurrentDragAndDropData=void 0))}onDidSpliceModel(){!this._enabled||this.pattern.length===0||(this.tree.refilter(),this.render())}onDidChangeFilterOnType(){this.tree.updateOptions({filterOnType:this.filterOnTypeDomNode.checked}),this.tree.refilter(),this.tree.domFocus(),this.render(),this.updateFilterOnTypeTitleAndIcon()}updateFilterOnTypeTitleAndIcon(){this.filterOnType?(this.filterOnTypeDomNode.classList.remove(...o.Codicon.treeFilterOnTypeOff.classNamesArray),this.filterOnTypeDomNode.classList.add(...o.Codicon.treeFilterOnTypeOn.classNamesArray),this.filterOnTypeDomNode.title=(0,p.localize)(1,null)):(this.filterOnTypeDomNode.classList.remove(...o.Codicon.treeFilterOnTypeOn.classNamesArray),this.filterOnTypeDomNode.classList.add(...o.Codicon.treeFilterOnTypeOff.classNamesArray),this.filterOnTypeDomNode.title=(0,p.localize)(2,null))}render(){const V=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&this.tree.options.filterOnType&&V?(this.messageDomNode.textContent=(0,p.localize)(3,null),this._empty=!0):(this.messageDomNode.innerText="",this._empty=!1),this.domNode.classList.toggle("no-matches",V),this.domNode.title=(0,p.localize)(4,null,this.filter.matchCount,this.filter.totalCount),this.labelDomNode.textContent=this.pattern.length>16?"\u2026"+this.pattern.substr(this.pattern.length-16):this.pattern,this._onDidChangeEmptyState.fire(this._empty)}shouldAllowFocus(V){return!this.enabled||!this.pattern||this.filterOnType||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!S.FuzzyScore.isDefault(V.filterData)}dispose(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.dispose(),this._enabled=!1,this.triggered=!1),this._onDidChangePattern.dispose(),(0,s.dispose)(this.disposables)}}function R(P){let V=w.TreeMouseEventTarget.Unknown;return(0,f.hasParentWithClass)(P.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?V=w.TreeMouseEventTarget.Twistie:(0,f.hasParentWithClass)(P.browserEvent.target,"monaco-tl-contents","monaco-tl-row")&&(V=w.TreeMouseEventTarget.Element),{browserEvent:P.browserEvent,element:P.element?P.element.element:null,target:V}}function O(P){return{element:P.element?P.element.element:null,browserEvent:P.browserEvent,anchor:P.anchor}}function x(P,V){V(P),P.children.forEach(z=>x(z,V))}class F{constructor(V,z){this.getFirstViewElementWithTrait=V,this.identityProvider=z,this.nodes=[],this._onDidChange=new i.Emitter,this.onDidChange=this._onDidChange.event}get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}set(V,z){!z?.__forceEvent&&(0,v.equals)(this.nodes,V)||this._set(V,!1,z)}_set(V,z,U){if(this.nodes=[...V],this.elements=void 0,this._nodeSet=void 0,!z){const H=this;this._onDidChange.fire({get elements(){return H.get()},browserEvent:U})}}get(){return this.elements||(this.elements=this.nodes.map(V=>V.element)),[...this.elements]}getNodes(){return this.nodes}has(V){return this.nodeSet.has(V)}onDidModelSplice({insertedNodes:V,deletedNodes:z}){if(!this.identityProvider){const Z=this.createNodeSet(),j=X=>Z.delete(X);z.forEach(X=>x(X,j)),this.set([...Z.values()]);return}const U=new Set,H=Z=>U.add(this.identityProvider.getId(Z.element).toString());z.forEach(Z=>x(Z,H));const K=new Map,G=Z=>K.set(this.identityProvider.getId(Z.element).toString(),Z);V.forEach(Z=>x(Z,G));const q=[];for(const Z of this.nodes){const j=this.identityProvider.getId(Z.element).toString();if(!U.has(j))q.push(Z);else{const Y=K.get(j);Y&&q.push(Y)}}if(this.nodes.length>0&&q.length===0){const Z=this.getFirstViewElementWithTrait();Z&&q.push(Z)}this._set(q,!0)}createNodeSet(){const V=new Set;for(const z of this.nodes)V.add(z);return V}}class L extends D.MouseController{constructor(V,z){super(V);this.tree=z}onViewPointer(V){if((0,D.isInputElement)(V.browserEvent.target)||(0,D.isMonacoEditor)(V.browserEvent.target))return;const z=V.element;if(!z)return super.onViewPointer(V);if(this.isSelectionRangeChangeEvent(V)||this.isSelectionSingleChangeEvent(V))return super.onViewPointer(V);const U=V.browserEvent.target,H=U.classList.contains("monaco-tl-twistie")||U.classList.contains("monaco-icon-label")&&U.classList.contains("folder-icon")&&V.browserEvent.offsetX<16;let K=!1;if(typeof this.tree.expandOnlyOnTwistieClick=="function"?K=this.tree.expandOnlyOnTwistieClick(z.element):K=!!this.tree.expandOnlyOnTwistieClick,K&&!H&&V.browserEvent.detail!==2)return super.onViewPointer(V);if(!this.tree.expandOnDoubleClick&&V.browserEvent.detail===2)return super.onViewPointer(V);if(z.collapsible){const G=this.tree.model,q=G.getNodeLocation(z),Z=V.browserEvent.altKey;if(this.tree.setFocus([q]),G.setCollapsed(q,void 0,Z),K&&H)return}super.onViewPointer(V)}onDoubleClick(V){V.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||super.onDoubleClick(V)}}class M extends D.List{constructor(V,z,U,H,K,G,q,Z){super(V,z,U,H,Z);this.focusTrait=K,this.selectionTrait=G,this.anchorTrait=q}createMouseController(V){return new L(this,V.tree)}splice(V,z,U=[]){if(super.splice(V,z,U),U.length===0)return;const H=[],K=[];let G;U.forEach((q,Z)=>{this.focusTrait.has(q)&&H.push(V+Z),this.selectionTrait.has(q)&&K.push(V+Z),this.anchorTrait.has(q)&&(G=V+Z)}),H.length>0&&super.setFocus((0,v.distinct)([...super.getFocus(),...H])),K.length>0&&super.setSelection((0,v.distinct)([...super.getSelection(),...K])),typeof G=="number"&&super.setAnchor(G)}setFocus(V,z,U=!1){super.setFocus(V,z),U||this.focusTrait.set(V.map(H=>this.element(H)),z)}setSelection(V,z,U=!1){super.setSelection(V,z),U||this.selectionTrait.set(V.map(H=>this.element(H)),z)}setAnchor(V,z=!1){super.setAnchor(V),z||(typeof V=="undefined"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(V)]))}}class N{constructor(V,z,U,H,K={}){this._user=V,this._options=K,this.eventBufferer=new i.EventBufferer,this.disposables=new s.DisposableStore,this._onWillRefilter=new i.Emitter,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new i.Emitter,this.onDidUpdateOptions=this._onDidUpdateOptions.event;const G=new g(U),q=new i.Relay,Z=new i.Relay,j=new b(Z.event);this.renderers=H.map($=>new E($,()=>this.model,q.event,j,K));for(let $ of this.renderers)this.disposables.add($);let X;K.keyboardNavigationLabelProvider&&(X=new y(this,K.keyboardNavigationLabelProvider,K.filter),K={...K,filter:X},this.disposables.add(X)),this.focus=new F(()=>this.view.getFocusedElements()[0],K.identityProvider),this.selection=new F(()=>this.view.getSelectedElements()[0],K.identityProvider),this.anchor=new F(()=>this.view.getAnchorElement(),K.identityProvider),this.view=new M(V,z,G,this.renderers,this.focus,this.selection,this.anchor,{...h(()=>this.model,K),tree:this}),this.model=this.createModel(V,this.view,K),q.input=this.model.onDidChangeCollapseState;const Y=i.Event.forEach(this.model.onDidSplice,$=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice($),this.selection.onDidModelSplice($)})});if(Y(()=>null,null,this.disposables),Z.input=i.Event.chain(i.Event.any(Y,this.focus.onDidChange,this.selection.onDidChange)).debounce(()=>null,0).map(()=>{const $=new Set;for(const J of this.focus.getNodes())$.add(J);for(const J of this.selection.getNodes())$.add(J);return[...$.values()]}).event,K.keyboardSupport!==!1){const $=i.Event.chain(this.view.onKeyDown).filter(J=>!(0,D.isInputElement)(J.target)).map(J=>new A.StandardKeyboardEvent(J));$.filter(J=>J.keyCode===15).on(this.onLeftArrow,this,this.disposables),$.filter(J=>J.keyCode===17).on(this.onRightArrow,this,this.disposables),$.filter(J=>J.keyCode===10).on(this.onSpace,this,this.disposables)}if(K.keyboardNavigationLabelProvider){const $=K.keyboardNavigationDelegate||D.DefaultKeyboardNavigationDelegate;this.typeFilterController=new T(this,this.model,this.view,X,$),this.focusNavigationFilter=J=>this.typeFilterController.shouldAllowFocus(J),this.disposables.add(this.typeFilterController)}this.styleElement=(0,f.createStyleSheet)(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===m.Always)}get onDidScroll(){return this.view.onDidScroll}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseClick(){return i.Event.map(this.view.onMouseClick,R)}get onMouseDblClick(){return i.Event.map(this.view.onMouseDblClick,R)}get onContextMenu(){return i.Event.map(this.view.onContextMenu,O)}get onTap(){return i.Event.map(this.view.onTap,R)}get onPointer(){return i.Event.map(this.view.onPointer,R)}get onKeyDown(){return this.view.onKeyDown}get onKeyUp(){return this.view.onKeyUp}get onKeyPress(){return this.view.onKeyPress}get onDidFocus(){return this.view.onDidFocus}get onDidBlur(){return this.view.onDidBlur}get onDidChangeModel(){return i.Event.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}get filterOnType(){return!!this._options.filterOnType}get onDidChangeTypeFilterPattern(){return this.typeFilterController?this.typeFilterController.onDidChangePattern:i.Event.None}get expandOnDoubleClick(){return typeof this._options.expandOnDoubleClick=="undefined"?!0:this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return typeof this._options.expandOnlyOnTwistieClick=="undefined"?!0:this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}updateOptions(V={}){this._options={...this._options,...V};for(const z of this.renderers)z.updateOptions(V);this.view.updateOptions({...this._options,enableKeyboardNavigation:this._options.simpleKeyboardNavigation}),this.typeFilterController&&this.typeFilterController.updateOptions(this._options),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===m.Always)}get options(){return this._options}updateWidth(V){const z=this.model.getListIndex(V);z!==-1&&this.view.updateWidth(z)}getHTMLElement(){return this.view.getHTMLElement()}get contentHeight(){return this.typeFilterController&&this.typeFilterController.filterOnType&&this.typeFilterController.empty?100:this.view.contentHeight}get onDidChangeContentHeight(){let V=this.view.onDidChangeContentHeight;return this.typeFilterController&&(V=i.Event.any(V,i.Event.map(this.typeFilterController.onDidChangeEmptyState,()=>this.contentHeight))),V}get scrollTop(){return this.view.scrollTop}set scrollTop(V){this.view.scrollTop=V}get scrollLeft(){return this.view.scrollLeft}set scrollLeft(V){this.view.scrollLeft=V}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleElement(){const V=this.view.firstVisibleIndex;return V<0||V>=this.view.length?void 0:this.view.element(V).element}get lastVisibleElement(){const V=this.view.lastVisibleIndex;return this.view.element(V).element}get ariaLabel(){return this.view.ariaLabel}set ariaLabel(V){this.view.ariaLabel=V}domFocus(){this.view.domFocus()}isDOMFocused(){return this.getHTMLElement()===document.activeElement}layout(V,z){this.view.layout(V,z)}style(V){const z=`.${this.view.domId}`,U=[];V.treeIndentGuidesStroke&&(U.push(`.monaco-list${z}:hover .monaco-tl-indent > .indent-guide, .monaco-list${z}.always .monaco-tl-indent > .indent-guide { border-color: ${V.treeIndentGuidesStroke.transparent(.4)}; }`),U.push(`.monaco-list${z} .monaco-tl-indent > .indent-guide.active { border-color: ${V.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=U.join(` `),this.view.style(V)}getParentElement(V){const z=this.model.getParentNodeLocation(V);return this.model.getNode(z).element}getFirstElementChild(V){return this.model.getFirstElementChild(V)}getNode(V){return this.model.getNode(V)}collapse(V,z=!1){return this.model.setCollapsed(V,!0,z)}expand(V,z=!1){return this.model.setCollapsed(V,!1,z)}toggleCollapsed(V,z=!1){return this.model.setCollapsed(V,void 0,z)}expandAll(){this.model.setCollapsed(this.model.rootRef,!1,!0)}collapseAll(){this.model.setCollapsed(this.model.rootRef,!0,!0)}isCollapsible(V){return this.model.isCollapsible(V)}setCollapsible(V,z){return this.model.setCollapsible(V,z)}isCollapsed(V){return this.model.isCollapsed(V)}toggleKeyboardNavigation(){this.view.toggleKeyboardNavigation(),this.typeFilterController&&this.typeFilterController.toggle()}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setAnchor(V){if(typeof V=="undefined")return this.view.setAnchor(void 0);const z=this.model.getNode(V);this.anchor.set([z]);const U=this.model.getListIndex(V);U>-1&&this.view.setAnchor(U,!0)}getAnchor(){return(0,v.firstOrDefault)(this.anchor.get(),void 0)}setSelection(V,z){const U=V.map(K=>this.model.getNode(K));this.selection.set(U,z);const H=V.map(K=>this.model.getListIndex(K)).filter(K=>K>-1);this.view.setSelection(H,z,!0)}getSelection(){return this.selection.get()}setFocus(V,z){const U=V.map(K=>this.model.getNode(K));this.focus.set(U,z);const H=V.map(K=>this.model.getListIndex(K)).filter(K=>K>-1);this.view.setFocus(H,z,!0)}focusNext(V=1,z=!1,U,H=this.focusNavigationFilter){this.view.focusNext(V,z,U,H)}focusPrevious(V=1,z=!1,U,H=this.focusNavigationFilter){this.view.focusPrevious(V,z,U,H)}focusNextPage(V,z=this.focusNavigationFilter){return this.view.focusNextPage(V,z)}focusPreviousPage(V,z=this.focusNavigationFilter){return this.view.focusPreviousPage(V,z)}focusLast(V,z=this.focusNavigationFilter){this.view.focusLast(V,z)}focusFirst(V,z=this.focusNavigationFilter){this.view.focusFirst(V,z)}getFocus(){return this.focus.get()}reveal(V,z){this.model.expandTo(V);const U=this.model.getListIndex(V);U!==-1&&this.view.reveal(U,z)}getRelativeTop(V){const z=this.model.getListIndex(V);return z===-1?null:this.view.getRelativeTop(z)}getViewState(V=this.options.identityProvider){if(!V)throw new w.TreeError(this._user,"Can't get tree view state without an identity provider");const z=G=>V.getId(G).toString(),U=d.empty(this.scrollTop);for(const G of this.getFocus())U.focus.add(z(G));for(const G of this.getSelection())U.selection.add(z(G));const H=this.model.getNode(),K=[H];for(;K.length>0;){const G=K.shift();G!==H&&G.collapsible&&(U.expanded[z(G.element)]=G.collapsed?0:1),K.push(...G.children)}return U}onLeftArrow(V){V.preventDefault(),V.stopPropagation();const z=this.view.getFocusedElements();if(z.length===0)return;const U=z[0],H=this.model.getNodeLocation(U);if(!this.model.setCollapsed(H,!0)){const G=this.model.getParentNodeLocation(H);if(!G)return;const q=this.model.getListIndex(G);this.view.reveal(q),this.view.setFocus([q])}}onRightArrow(V){V.preventDefault(),V.stopPropagation();const z=this.view.getFocusedElements();if(z.length===0)return;const U=z[0],H=this.model.getNodeLocation(U);if(!this.model.setCollapsed(H,!1)){if(!U.children.some(Z=>Z.visible))return;const[G]=this.view.getFocus(),q=G+1;this.view.reveal(q),this.view.setFocus([q])}}onSpace(V){V.preventDefault(),V.stopPropagation();const z=this.view.getFocusedElements();if(z.length===0)return;const U=z[0],H=this.model.getNodeLocation(U),K=V.browserEvent.altKey;this.model.setCollapsed(H,void 0,K)}navigate(V){return new B(this.view,this.model,V)}dispose(){(0,s.dispose)(this.disposables),this.view.dispose()}}e.AbstractTree=N;class B{constructor(V,z,U){this.view=V,this.model=z,U?this.index=this.model.getListIndex(U):this.index=-1}current(){return this.index<0||this.index>=this.view.length?null:this.view.element(this.index).element}previous(){return this.index--,this.current()}next(){return this.index++,this.current()}first(){return this.index=0,this.current()}last(){return this.index=this.view.length-1,this.current()}}}),define(ne[716],re([1,0,390,447,277,92]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataTree=void 0;class k extends t.AbstractTree{constructor(I,w,v,C,o,c={}){super(I,w,v,C,c);this.user=I,this.dataSource=o,this.nodesByIdentity=new Map,this.identityProvider=c.identityProvider}getInput(){return this.input}setInput(I,w){if(w&&!this.identityProvider)throw new _.TreeError(this.user,"Can't restore tree view state without an identity provider");if(this.input=I,!I){this.nodesByIdentity.clear(),this.model.setChildren(null,A.Iterable.empty());return}if(!w){this._refresh(I);return}const v=[],C=[],o=i=>{const S=this.identityProvider.getId(i).toString();return!w.expanded[S]},c=i=>{const S=this.identityProvider.getId(i.element).toString();w.focus.has(S)&&v.push(i.element),w.selection.has(S)&&C.push(i.element)};this._refresh(I,o,c),this.setFocus(v),this.setSelection(C),w&&typeof w.scrollTop=="number"&&(this.scrollTop=w.scrollTop)}updateChildren(I=this.input){if(typeof this.input=="undefined")throw new _.TreeError(this.user,"Tree input not set");let w;this.identityProvider&&(w=v=>{const C=this.identityProvider.getId(v).toString(),o=this.nodesByIdentity.get(C);if(!!o)return o.collapsed}),this._refresh(I,w)}resort(I=this.input,w=!0){this.model.resort(I===this.input?null:I,w)}refresh(I){if(I===void 0){this.view.rerender();return}this.model.rerender(I)}_refresh(I,w,v){let C;if(this.identityProvider){const o=new Set,c=v;v=i=>{const S=this.identityProvider.getId(i.element).toString();o.add(S),this.nodesByIdentity.set(S,i),c&&c(i)},C=i=>{const S=this.identityProvider.getId(i.element).toString();o.has(S)||this.nodesByIdentity.delete(S)}}this.model.setChildren(I===this.input?null:I,this.iterate(I,w).elements,{onDidCreateNode:v,onDidDeleteNode:C})}iterate(I,w){const v=[...this.dataSource.getChildren(I)];return{elements:A.Iterable.map(v,o=>{const{elements:c,size:i}=this.iterate(o,w),S=this.dataSource.hasChildren?this.dataSource.hasChildren(o):void 0,s=i===0?void 0:w&&w(o);return{element:o,children:c,collapsible:S,collapsed:s}}),size:v.length}}createModel(I,w,v){return new f.ObjectTreeModel(I,w,v)}}e.DataTree=k}),define(ne[544],re([1,0,390,964,447,110,92]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleObjectTree=e.ObjectTree=void 0;class D extends t.AbstractTree{constructor(o,c,i,S,s={}){super(o,c,i,S,s);this.user=o}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}setChildren(o,c=k.Iterable.empty(),i){this.model.setChildren(o,c,i)}rerender(o){if(o===void 0){this.view.rerender();return}this.model.rerender(o)}updateElementHeight(o,c){this.model.updateElementHeight(o,c)}resort(o,c=!0){this.model.resort(o,c)}hasElement(o){return this.model.has(o)}createModel(o,c,i){return new _.ObjectTreeModel(o,c,i)}}e.ObjectTree=D;class I{constructor(o,c){this._compressedTreeNodeProvider=o,this.renderer=c,this.templateId=c.templateId,c.onDidChangeTwistieState&&(this.onDidChangeTwistieState=c.onDidChangeTwistieState)}get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}renderTemplate(o){const c=this.renderer.renderTemplate(o);return{compressedTreeNode:void 0,data:c}}renderElement(o,c,i,S){const s=this.compressedTreeNodeProvider.getCompressedTreeNode(o.element);s.element.elements.length===1?(i.compressedTreeNode=void 0,this.renderer.renderElement(o,c,i.data,S)):(i.compressedTreeNode=s,this.renderer.renderCompressedElements(s,c,i.data,S))}disposeElement(o,c,i,S){i.compressedTreeNode?this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(i.compressedTreeNode,c,i.data,S):this.renderer.disposeElement&&this.renderer.disposeElement(o,c,i.data,S)}disposeTemplate(o){this.renderer.disposeTemplate(o.data)}renderTwistie(o,c){return this.renderer.renderTwistie?this.renderer.renderTwistie(o,c):!1}}Ee([A.memoize],I.prototype,"compressedTreeNodeProvider",null);function w(C,o){return o&&{...o,keyboardNavigationLabelProvider:o.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(c){let i;try{i=C().getCompressedTreeNode(c)}catch{return o.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(c)}return i.element.elements.length===1?o.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(c):o.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(i.element.elements)}}}}class v extends D{constructor(o,c,i,S,s={}){const l=()=>this,r=S.map(p=>new I(l,p));super(o,c,i,r,w(l,s))}setChildren(o,c=k.Iterable.empty(),i){this.model.setChildren(o,c,i)}createModel(o,c,i){return new f.CompressibleObjectTreeModel(o,c,i)}updateOptions(o={}){super.updateOptions(o),typeof o.compressionEnabled!="undefined"&&this.model.setCompressionEnabled(o.compressionEnabled)}getCompressedTreeNode(o=null){return this.model.getCompressedTreeNode(o)}}e.CompressibleObjectTree=v}),define(ne[463],re([1,0,305,390,518,544,277,11,33,22,6,92,2,13]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleAsyncDataTree=e.AsyncDataTree=void 0;function i(x){return{...x,children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0}}function S(x,F){return F.parent?F.parent===x?!0:S(x,F.parent):!1}function s(x,F){return x===F||S(x,F)||S(F,x)}class l{constructor(F){this.node=F}get element(){return this.node.element.element}get children(){return this.node.children.map(F=>new l(F))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class r{constructor(F,L,M){this.renderer=F,this.nodeMapper=L,this.onDidChangeTwistieState=M,this.renderedNodes=new Map,this.templateId=F.templateId}renderTemplate(F){return{templateData:this.renderer.renderTemplate(F)}}renderElement(F,L,M,N){this.renderer.renderElement(this.nodeMapper.map(F),L,M.templateData,N)}renderTwistie(F,L){return F.slow?(L.classList.add(...I.Codicon.treeItemLoading.classNamesArray),!0):(L.classList.remove(...I.Codicon.treeItemLoading.classNamesArray),!1)}disposeElement(F,L,M,N){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(F),L,M.templateData,N)}disposeTemplate(F){this.renderer.disposeTemplate(F.templateData)}dispose(){this.renderedNodes.clear()}}function p(x){return{browserEvent:x.browserEvent,elements:x.elements.map(F=>F.element)}}function u(x){return{browserEvent:x.browserEvent,element:x.element&&x.element.element,target:x.target}}function a(x){return{browserEvent:x.browserEvent,element:x.element&&x.element.element,anchor:x.anchor}}class n extends t.ElementsDragAndDropData{constructor(F){super(F.elements.map(L=>L.element));this.data=F}set context(F){this.data.context=F}get context(){return this.data.context}}function h(x){return x instanceof t.ElementsDragAndDropData?new n(x):x}class g{constructor(F){this.dnd=F}getDragURI(F){return this.dnd.getDragURI(F.element)}getDragLabel(F,L){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(F.map(M=>M.element),L)}onDragStart(F,L){this.dnd.onDragStart&&this.dnd.onDragStart(h(F),L)}onDragOver(F,L,M,N,B=!0){return this.dnd.onDragOver(h(F),L&&L.element,M,N)}drop(F,L,M,N){this.dnd.drop(h(F),L&&L.element,M,N)}onDragEnd(F){this.dnd.onDragEnd&&this.dnd.onDragEnd(F)}}function d(x){return x&&{...x,collapseByDefault:!0,identityProvider:x.identityProvider&&{getId(F){return x.identityProvider.getId(F.element)}},dnd:x.dnd&&new g(x.dnd),multipleSelectionController:x.multipleSelectionController&&{isSelectionSingleChangeEvent(F){return x.multipleSelectionController.isSelectionSingleChangeEvent({...F,element:F.element})},isSelectionRangeChangeEvent(F){return x.multipleSelectionController.isSelectionRangeChangeEvent({...F,element:F.element})}},accessibilityProvider:x.accessibilityProvider&&{...x.accessibilityProvider,getPosInSet:void 0,getSetSize:void 0,getRole:x.accessibilityProvider.getRole?F=>x.accessibilityProvider.getRole(F.element):()=>"treeitem",isChecked:x.accessibilityProvider.isChecked?F=>!!x.accessibilityProvider?.isChecked(F.element):void 0,getAriaLabel(F){return x.accessibilityProvider.getAriaLabel(F.element)},getWidgetAriaLabel(){return x.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:x.accessibilityProvider.getWidgetRole?()=>x.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:x.accessibilityProvider.getAriaLevel&&(F=>x.accessibilityProvider.getAriaLevel(F.element)),getActiveDescendantId:x.accessibilityProvider.getActiveDescendantId&&(F=>x.accessibilityProvider.getActiveDescendantId(F.element))},filter:x.filter&&{filter(F,L){return x.filter.filter(F.element,L)}},keyboardNavigationLabelProvider:x.keyboardNavigationLabelProvider&&{...x.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(F){return x.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(F.element)}},sorter:void 0,expandOnlyOnTwistieClick:typeof x.expandOnlyOnTwistieClick=="undefined"?void 0:typeof x.expandOnlyOnTwistieClick!="function"?x.expandOnlyOnTwistieClick:F=>x.expandOnlyOnTwistieClick(F.element),additionalScrollHeight:x.additionalScrollHeight}}function m(x,F){F(x),x.children.forEach(L=>m(L,F))}class b{constructor(F,L,M,N,B,P={}){this.user=F,this.dataSource=B,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new v.Emitter,this._onDidChangeNodeSlowState=new v.Emitter,this.nodeMapper=new k.WeakMapper(V=>new l(V)),this.disposables=new o.DisposableStore,this.identityProvider=P.identityProvider,this.autoExpandSingleChildren=typeof P.autoExpandSingleChildren=="undefined"?!1:P.autoExpandSingleChildren,this.sorter=P.sorter,this.collapseByDefault=P.collapseByDefault,this.tree=this.createTree(F,L,M,N,P),this.root=i({element:void 0,parent:null,hasChildren:!0}),this.identityProvider&&(this.root={...this.root,id:null}),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return v.Event.map(this.tree.onDidChangeFocus,p)}get onDidChangeSelection(){return v.Event.map(this.tree.onDidChangeSelection,p)}get onKeyDown(){return this.tree.onKeyDown}get onMouseClick(){return v.Event.map(this.tree.onMouseClick,u)}get onMouseDblClick(){return v.Event.map(this.tree.onMouseDblClick,u)}get onContextMenu(){return v.Event.map(this.tree.onContextMenu,a)}get onTap(){return v.Event.map(this.tree.onTap,u)}get onPointer(){return v.Event.map(this.tree.onPointer,u)}get onDidFocus(){return this.tree.onDidFocus}get onDidBlur(){return this.tree.onDidBlur}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidUpdateOptions(){return this.tree.onDidUpdateOptions}get filterOnType(){return this.tree.filterOnType}get expandOnlyOnTwistieClick(){if(typeof this.tree.expandOnlyOnTwistieClick=="boolean")return this.tree.expandOnlyOnTwistieClick;const F=this.tree.expandOnlyOnTwistieClick;return L=>F(this.nodes.get(L===this.root.element?null:L)||null)}get onDidDispose(){return this.tree.onDidDispose}createTree(F,L,M,N,B){const P=new f.ComposedTreeDelegate(M),V=N.map(U=>new r(U,this.nodeMapper,this._onDidChangeNodeSlowState.event)),z=d(B)||{};return new A.ObjectTree(F,L,P,V,z)}updateOptions(F={}){this.tree.updateOptions(F)}get options(){return this.tree.options}getHTMLElement(){return this.tree.getHTMLElement()}get contentHeight(){return this.tree.contentHeight}get onDidChangeContentHeight(){return this.tree.onDidChangeContentHeight}get scrollTop(){return this.tree.scrollTop}set scrollTop(F){this.tree.scrollTop=F}get scrollLeft(){return this.tree.scrollLeft}set scrollLeft(F){this.tree.scrollLeft=F}get scrollHeight(){return this.tree.scrollHeight}get renderHeight(){return this.tree.renderHeight}get lastVisibleElement(){return this.tree.lastVisibleElement.element}get ariaLabel(){return this.tree.ariaLabel}set ariaLabel(F){this.tree.ariaLabel=F}domFocus(){this.tree.domFocus()}layout(F,L){this.tree.layout(F,L)}style(F){this.tree.style(F)}getInput(){return this.root.element}async setInput(F,L){this.refreshPromises.forEach(N=>N.cancel()),this.refreshPromises.clear(),this.root.element=F;const M=L&&{viewState:L,focus:[],selection:[]};await this._updateChildren(F,!0,!1,M),M&&(this.tree.setFocus(M.focus),this.tree.setSelection(M.selection)),L&&typeof L.scrollTop=="number"&&(this.scrollTop=L.scrollTop)}async updateChildren(F=this.root.element,L=!0,M=!1,N){await this._updateChildren(F,L,M,void 0,N)}async _updateChildren(F=this.root.element,L=!0,M=!1,N,B){if(typeof this.root.element=="undefined")throw new k.TreeError(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await v.Event.toPromise(this._onDidRender.event));const P=this.getDataNode(F);if(await this.refreshAndRenderNode(P,L,N,B),M)try{this.tree.rerender(P)}catch{}}resort(F=this.root.element,L=!0){this.tree.resort(this.getDataNode(F),L)}hasNode(F){return F===this.root.element||this.nodes.has(F)}rerender(F){if(F===void 0||F===this.root.element){this.tree.rerender();return}const L=this.getDataNode(F);this.tree.rerender(L)}updateWidth(F){const L=this.getDataNode(F);this.tree.updateWidth(L)}getNode(F=this.root.element){const L=this.getDataNode(F),M=this.tree.getNode(L===this.root?null:L);return this.nodeMapper.map(M)}collapse(F,L=!1){const M=this.getDataNode(F);return this.tree.collapse(M===this.root?null:M,L)}async expand(F,L=!1){if(typeof this.root.element=="undefined")throw new k.TreeError(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await v.Event.toPromise(this._onDidRender.event));const M=this.getDataNode(F);if(this.tree.hasElement(M)&&!this.tree.isCollapsible(M)||(M.refreshPromise&&(await this.root.refreshPromise,await v.Event.toPromise(this._onDidRender.event)),M!==this.root&&!M.refreshPromise&&!this.tree.isCollapsed(M)))return!1;const N=this.tree.expand(M===this.root?null:M,L);return M.refreshPromise&&(await this.root.refreshPromise,await v.Event.toPromise(this._onDidRender.event)),N}toggleCollapsed(F,L=!1){return this.tree.toggleCollapsed(this.getDataNode(F),L)}expandAll(){this.tree.expandAll()}collapseAll(){this.tree.collapseAll()}isCollapsible(F){return this.tree.isCollapsible(this.getDataNode(F))}isCollapsed(F){return this.tree.isCollapsed(this.getDataNode(F))}toggleKeyboardNavigation(){this.tree.toggleKeyboardNavigation()}refilter(){this.tree.refilter()}setAnchor(F){this.tree.setAnchor(typeof F=="undefined"?void 0:this.getDataNode(F))}getAnchor(){return this.tree.getAnchor()?.element}setSelection(F,L){const M=F.map(N=>this.getDataNode(N));this.tree.setSelection(M,L)}getSelection(){return this.tree.getSelection().map(L=>L.element)}setFocus(F,L){const M=F.map(N=>this.getDataNode(N));this.tree.setFocus(M,L)}focusNext(F=1,L=!1,M){this.tree.focusNext(F,L,M)}focusPrevious(F=1,L=!1,M){this.tree.focusPrevious(F,L,M)}focusNextPage(F){return this.tree.focusNextPage(F)}focusPreviousPage(F){return this.tree.focusPreviousPage(F)}focusLast(F){this.tree.focusLast(F)}focusFirst(F){this.tree.focusFirst(F)}getFocus(){return this.tree.getFocus().map(L=>L.element)}reveal(F,L){this.tree.reveal(this.getDataNode(F),L)}getRelativeTop(F){return this.tree.getRelativeTop(this.getDataNode(F))}getParentElement(F){const L=this.tree.getParentElement(this.getDataNode(F));return L&&L.element}getFirstElementChild(F=this.root.element){const L=this.getDataNode(F),M=this.tree.getFirstElementChild(L===this.root?null:L);return M&&M.element}getDataNode(F){const L=this.nodes.get(F===this.root.element?null:F);if(!L)throw new k.TreeError(this.user,`Data tree node not found: ${F}`);return L}async refreshAndRenderNode(F,L,M,N){await this.refreshNode(F,L,M),this.render(F,M,N)}async refreshNode(F,L,M){let N;return this.subTreeRefreshPromises.forEach((B,P)=>{!N&&s(P,F)&&(N=B.then(()=>this.refreshNode(F,L,M)))}),N||this.doRefreshSubTree(F,L,M)}async doRefreshSubTree(F,L,M){let N;F.refreshPromise=new Promise(B=>N=B),this.subTreeRefreshPromises.set(F,F.refreshPromise),F.refreshPromise.finally(()=>{F.refreshPromise=void 0,this.subTreeRefreshPromises.delete(F)});try{const B=await this.doRefreshNode(F,L,M);F.stale=!1,await D.Promises.settled(B.map(P=>this.doRefreshSubTree(P,L,M)))}finally{N()}}async doRefreshNode(F,L,M){F.hasChildren=!!this.dataSource.hasChildren(F.element);let N;if(!F.hasChildren)N=Promise.resolve(C.Iterable.empty());else{const B=this.doGetChildren(F);if((0,c.isIterable)(B))N=Promise.resolve(B);else{const P=(0,D.timeout)(800);P.then(()=>{F.slow=!0,this._onDidChangeNodeSlowState.fire(F)},V=>null),N=B.finally(()=>P.cancel())}}try{const B=await N;return this.setChildren(F,B,L,M)}catch(B){if(F!==this.root&&this.tree.hasElement(F)&&this.tree.collapse(F),(0,w.isCancellationError)(B))return[];throw B}finally{F.slow&&(F.slow=!1,this._onDidChangeNodeSlowState.fire(F))}}doGetChildren(F){let L=this.refreshPromises.get(F);if(L)return L;const M=this.dataSource.getChildren(F.element);return(0,c.isIterable)(M)?this.processChildren(M):(L=(0,D.createCancelablePromise)(async()=>this.processChildren(await M)),this.refreshPromises.set(F,L),L.finally(()=>{this.refreshPromises.delete(F)}))}_onDidChangeCollapseState({node:F,deep:L}){F.element!==null&&!F.collapsed&&F.element.stale&&(L?this.collapse(F.element.element):this.refreshAndRenderNode(F.element,!1).catch(w.onUnexpectedError))}setChildren(F,L,M,N){const B=[...L];if(F.children.length===0&&B.length===0)return[];const P=new Map,V=new Map;for(const H of F.children)if(P.set(H.element,H),this.identityProvider){const K=this.tree.isCollapsed(H);V.set(H.id,{node:H,collapsed:K})}const z=[],U=B.map(H=>{const K=!!this.dataSource.hasChildren(H);if(!this.identityProvider){const j=i({element:H,parent:F,hasChildren:K});return K&&this.collapseByDefault&&!this.collapseByDefault(H)&&(j.collapsedByDefault=!1,z.push(j)),j}const G=this.identityProvider.getId(H).toString(),q=V.get(G);if(q){const j=q.node;return P.delete(j.element),this.nodes.delete(j.element),this.nodes.set(H,j),j.element=H,j.hasChildren=K,M?q.collapsed?(j.children.forEach(X=>m(X,Y=>this.nodes.delete(Y.element))),j.children.splice(0,j.children.length),j.stale=!0):z.push(j):K&&this.collapseByDefault&&!this.collapseByDefault(H)&&(j.collapsedByDefault=!1,z.push(j)),j}const Z=i({element:H,parent:F,id:G,hasChildren:K});return N&&N.viewState.focus&&N.viewState.focus.indexOf(G)>-1&&N.focus.push(Z),N&&N.viewState.selection&&N.viewState.selection.indexOf(G)>-1&&N.selection.push(Z),N&&N.viewState.expanded&&N.viewState.expanded.indexOf(G)>-1?z.push(Z):K&&this.collapseByDefault&&!this.collapseByDefault(H)&&(Z.collapsedByDefault=!1,z.push(Z)),Z});for(const H of P.values())m(H,K=>this.nodes.delete(K.element));for(const H of U)this.nodes.set(H.element,H);return F.children.splice(0,F.children.length,...U),F!==this.root&&this.autoExpandSingleChildren&&U.length===1&&z.length===0&&(U[0].collapsedByDefault=!1,z.push(U[0])),z}render(F,L,M){const N=F.children.map(P=>this.asTreeElement(P,L)),B=M&&{...M,diffIdentityProvider:M.diffIdentityProvider&&{getId(P){return M.diffIdentityProvider.getId(P.element)}}};this.tree.setChildren(F===this.root?null:F,N,B),F!==this.root&&this.tree.setCollapsible(F,F.hasChildren),this._onDidRender.fire()}asTreeElement(F,L){if(F.stale)return{element:F,collapsible:F.hasChildren,collapsed:!0};let M;return L&&L.viewState.expanded&&F.id&&L.viewState.expanded.indexOf(F.id)>-1?M=!1:M=F.collapsedByDefault,F.collapsedByDefault=void 0,{element:F,children:F.hasChildren?C.Iterable.map(F.children,N=>this.asTreeElement(N,L)):[],collapsible:F.hasChildren,collapsed:M}}processChildren(F){return this.sorter&&(F=[...F].sort(this.sorter.compare.bind(this.sorter))),F}getViewState(){if(!this.identityProvider)throw new k.TreeError(this.user,"Can't get tree view state without an identity provider");const F=V=>this.identityProvider.getId(V).toString(),L=this.getFocus().map(F),M=this.getSelection().map(F),N=[],B=this.tree.getNode(),P=[B];for(;P.length>0;){const V=P.pop();V!==B&&V.collapsible&&!V.collapsed&&N.push(F(V.element.element)),P.push(...V.children)}return{focus:L,selection:M,expanded:N,scrollTop:this.scrollTop}}dispose(){this.disposables.dispose()}}e.AsyncDataTree=b;class E{constructor(F){this.node=F}get element(){return{elements:this.node.element.elements.map(F=>F.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(F=>new E(F))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class y{constructor(F,L,M,N){this.renderer=F,this.nodeMapper=L,this.compressibleNodeMapperProvider=M,this.onDidChangeTwistieState=N,this.renderedNodes=new Map,this.disposables=[],this.templateId=F.templateId}renderTemplate(F){return{templateData:this.renderer.renderTemplate(F)}}renderElement(F,L,M,N){this.renderer.renderElement(this.nodeMapper.map(F),L,M.templateData,N)}renderCompressedElements(F,L,M,N){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(F),L,M.templateData,N)}renderTwistie(F,L){return F.slow?(L.classList.add(...I.Codicon.treeItemLoading.classNamesArray),!0):(L.classList.remove(...I.Codicon.treeItemLoading.classNamesArray),!1)}disposeElement(F,L,M,N){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(F),L,M.templateData,N)}disposeCompressedElements(F,L,M,N){this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(F),L,M.templateData,N)}disposeTemplate(F){this.renderer.disposeTemplate(F.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=(0,o.dispose)(this.disposables)}}function T(x){const F=x&&d(x);return F&&{...F,keyboardNavigationLabelProvider:F.keyboardNavigationLabelProvider&&{...F.keyboardNavigationLabelProvider,getCompressedNodeKeyboardNavigationLabel(L){return x.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(L.map(M=>M.element))}}}}class R extends b{constructor(F,L,M,N,B,P,V={}){super(F,L,M,B,P,V);this.compressionDelegate=N,this.compressibleNodeMapper=new k.WeakMapper(z=>new E(z)),this.filter=V.filter}createTree(F,L,M,N,B){const P=new f.ComposedTreeDelegate(M),V=N.map(U=>new y(U,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),z=T(B)||{};return new A.CompressibleObjectTree(F,L,P,V,z)}asTreeElement(F,L){return{incompressible:this.compressionDelegate.isIncompressible(F.element),...super.asTreeElement(F,L)}}updateOptions(F={}){this.tree.updateOptions(F)}getViewState(){if(!this.identityProvider)throw new k.TreeError(this.user,"Can't get tree view state without an identity provider");const F=V=>this.identityProvider.getId(V).toString(),L=this.getFocus().map(F),M=this.getSelection().map(F),N=[],B=this.tree.getCompressedTreeNode(),P=[B];for(;P.length>0;){const V=P.shift();if(V!==B&&V.collapsible&&!V.collapsed)for(const z of V.element.elements)N.push(F(z.element));P.push(...V.children)}return{focus:L,selection:M,expanded:N,scrollTop:this.scrollTop}}render(F,L){if(!this.identityProvider)return super.render(F,L);const M=G=>this.identityProvider.getId(G).toString(),N=G=>{const q=new Set;for(const Z of G){const j=this.tree.getCompressedTreeNode(Z===this.root?null:Z);if(!!j.element)for(const X of j.element.elements)q.add(M(X.element))}return q},B=N(this.tree.getSelection()),P=N(this.tree.getFocus());super.render(F,L);const V=this.getSelection();let z=!1;const U=this.getFocus();let H=!1;const K=G=>{const q=G.element;if(q)for(let Z=0;Z<q.elements.length;Z++){const j=M(q.elements[Z].element),X=q.elements[q.elements.length-1].element;B.has(j)&&V.indexOf(X)===-1&&(V.push(X),z=!0),P.has(j)&&U.indexOf(X)===-1&&(U.push(X),H=!0)}G.children.forEach(K)};K(this.tree.getCompressedTreeNode(F===this.root?null:F)),z&&this.setSelection(V),H&&this.setFocus(U)}processChildren(F){return this.filter&&(F=C.Iterable.filter(F,L=>{const M=this.filter.filter(L,1),N=O(M);if(N===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return N===1})),super.processChildren(F)}}e.CompressibleAsyncDataTree=R;function O(x){return typeof x=="boolean"?x?1:0:(0,_.isFilterResult)(x)?(0,_.getVisibleState)(x.visibility):(0,_.getVisibleState)(x)}}),define(ne[1215],re([3,4]),function(Q,e){return Q.create("vs/base/browser/ui/tree/treeDefaults",e)}),define(ne[1216],re([3,4]),function(Q,e){return Q.create("vs/base/common/actions",e)}),define(ne[36],re([1,0,6,2,1216]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toAction=e.EmptySubmenuAction=e.SubmenuAction=e.Separator=e.ActionRunner=e.Action=void 0;class A extends f.Disposable{constructor(o,c="",i="",S=!0,s){super();this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=o,this._label=c,this._cssClass=i,this._enabled=S,this._actionCallback=s}get id(){return this._id}get label(){return this._label}set label(o){this._setLabel(o)}_setLabel(o){this._label!==o&&(this._label=o,this._onDidChange.fire({label:o}))}get tooltip(){return this._tooltip||""}set tooltip(o){this._setTooltip(o)}_setTooltip(o){this._tooltip!==o&&(this._tooltip=o,this._onDidChange.fire({tooltip:o}))}get class(){return this._cssClass}set class(o){this._setClass(o)}_setClass(o){this._cssClass!==o&&(this._cssClass=o,this._onDidChange.fire({class:o}))}get enabled(){return this._enabled}set enabled(o){this._setEnabled(o)}_setEnabled(o){this._enabled!==o&&(this._enabled=o,this._onDidChange.fire({enabled:o}))}get checked(){return this._checked}set checked(o){this._setChecked(o)}_setChecked(o){this._checked!==o&&(this._checked=o,this._onDidChange.fire({checked:o}))}async run(o,c){this._actionCallback&&await this._actionCallback(o)}}e.Action=A;class k extends f.Disposable{constructor(){super(...arguments);this._onBeforeRun=this._register(new t.Emitter),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new t.Emitter),this.onDidRun=this._onDidRun.event}async run(o,c){if(!o.enabled)return;this._onBeforeRun.fire({action:o});let i;try{await this.runAction(o,c)}catch(S){i=S}this._onDidRun.fire({action:o,error:i})}async runAction(o,c){await o.run(c)}}e.ActionRunner=k;class D extends A{constructor(o){super(D.ID,o,o?"separator text":"separator");this.checked=!1,this.enabled=!1}static join(...o){let c=[];for(const i of o)i.length&&(c.length?c=[...c,new D,...i]:c=i);return c}}e.Separator=D,D.ID="vs.actions.separator";class I{constructor(o,c,i,S){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=o,this.label=c,this.class=S,this._actions=i}get actions(){return this._actions}dispose(){}async run(){}}e.SubmenuAction=I;class w extends A{constructor(){super(w.ID,_.localize(0,null),void 0,!1)}}e.EmptySubmenuAction=w,w.ID="vs.actions.empty";function v(C){return{id:C.id,label:C.label,class:void 0,enabled:C.enabled??!0,checked:C.checked??!1,run:async()=>C.run(),tooltip:C.label,dispose:()=>{}}}e.toAction=v}),define(ne[134],re([1,0,77,170,10,129,389,36,2,14,13,1201,662]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectActionViewItem=e.ActionViewItem=e.BaseActionViewItem=void 0;class o extends I.Disposable{constructor(s,l,r={}){super();this.options=r,this._context=s||this,this._action=l,l instanceof D.Action&&this._register(l.onDidChange(p=>{!this.element||this.handleActionChangeEvent(p)}))}get action(){return this._action}handleActionChangeEvent(s){s.enabled!==void 0&&this.updateEnabled(),s.checked!==void 0&&this.updateChecked(),s.class!==void 0&&this.updateClass(),s.label!==void 0&&(this.updateLabel(),this.updateTooltip()),s.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new D.ActionRunner)),this._actionRunner}set actionRunner(s){this._actionRunner=s}getAction(){return this._action}isEnabled(){return this._action.enabled}setActionContext(s){this._context=s}render(s){const l=this.element=s;this._register(A.Gesture.addTarget(s));const r=this.options&&this.options.draggable;r&&(s.draggable=!0,t.isFirefox&&this._register((0,_.addDisposableListener)(s,_.EventType.DRAG_START,p=>p.dataTransfer?.setData(f.DataTransfers.TEXT,this._action.label)))),this._register((0,_.addDisposableListener)(l,A.EventType.Tap,p=>this.onClick(p,!0))),this._register((0,_.addDisposableListener)(l,_.EventType.MOUSE_DOWN,p=>{r||_.EventHelper.stop(p,!0),this._action.enabled&&p.button===0&&l.classList.add("active")})),w.isMacintosh&&this._register((0,_.addDisposableListener)(l,_.EventType.CONTEXT_MENU,p=>{p.button===0&&p.ctrlKey===!0&&this.onClick(p)})),this._register((0,_.addDisposableListener)(l,_.EventType.CLICK,p=>{_.EventHelper.stop(p,!0),this.options&&this.options.isMenu||this.onClick(p)})),this._register((0,_.addDisposableListener)(l,_.EventType.DBLCLICK,p=>{_.EventHelper.stop(p,!0)})),[_.EventType.MOUSE_UP,_.EventType.MOUSE_OUT].forEach(p=>{this._register((0,_.addDisposableListener)(l,p,u=>{_.EventHelper.stop(u),l.classList.remove("active")}))})}onClick(s,l=!1){_.EventHelper.stop(s,!0);const r=v.isUndefinedOrNull(this._context)?this.options?.useEventAsContext?s:{preserveFocus:l}:this._context;this.actionRunner.run(this._action,r)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}isFocused(){return!!this.element?.classList.contains("focused")}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(s){this.element&&(this.element.tabIndex=s?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}updateTooltip(){}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),super.dispose()}}e.BaseActionViewItem=o;class c extends o{constructor(s,l,r={}){super(s,l,r);this.options=r,this.options.icon=r.icon!==void 0?r.icon:!1,this.options.label=r.label!==void 0?r.label:!0,this.cssClass=""}render(s){super.render(s),this.element&&(this.label=(0,_.append)(this.element,(0,_.$)("a.action-label"))),this.label&&(this._action.id===D.Separator.ID?this.label.setAttribute("role","presentation"):this.options.isMenu?this.label.setAttribute("role","menuitem"):this.label.setAttribute("role","button")),this.options.label&&this.options.keybinding&&this.element&&((0,_.append)(this.element,(0,_.$)("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}isFocused(){return!!this.label&&this.label?.tabIndex===0}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(s){this.label&&(this.label.tabIndex=s?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.getAction().label)}updateTooltip(){let s=null;this.getAction().tooltip?s=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(s=this.getAction().label,this.options.keybinding&&(s=C.localize(0,null,s,this.options.keybinding))),s&&this.label&&(this.label.title=s)}updateClass(){this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getAction().class,this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):this.label&&this.label.classList.remove("codicon")}updateEnabled(){this.getAction().enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),this.element&&this.element.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),this.element&&this.element.classList.add("disabled"))}updateChecked(){this.label&&(this.getAction().checked?this.label.classList.add("checked"):this.label.classList.remove("checked"))}}e.ActionViewItem=c;class i extends o{constructor(s,l,r,p,u,a){super(s,l);this.selectBox=new k.SelectBox(r,p,u,void 0,a),this.selectBox.setFocusable(!1),this._register(this.selectBox),this.registerListeners()}setOptions(s,l){this.selectBox.setOptions(s,l)}select(s){this.selectBox.select(s)}registerListeners(){this._register(this.selectBox.onDidSelect(s=>{this.actionRunner.run(this._action,this.getActionContext(s.selected,s.index))}))}getActionContext(s,l){return s}setFocusable(s){this.selectBox.setFocusable(s)}focus(){this.selectBox&&this.selectBox.focus()}blur(){this.selectBox&&this.selectBox.blur()}render(s){this.selectBox.render(s)}}e.SelectActionViewItem=i}),define(ne[78],re([1,0,10,91,134,36,6,2,13,662]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.prepareActions=e.ActionBar=e.ActionsOrientation=void 0;var w;(function(o){o[o.HORIZONTAL=0]="HORIZONTAL",o[o.VERTICAL=1]="VERTICAL"})(w=e.ActionsOrientation||(e.ActionsOrientation={}));class v extends D.Disposable{constructor(c,i={}){super();this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new k.Emitter),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new k.Emitter({onFirstListenerAdd:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new k.Emitter),this.onDidRun=this._onDidRun.event,this._onBeforeRun=this._register(new k.Emitter),this.onBeforeRun=this._onBeforeRun.event,this.options=i,this._context=i.context??null,this._orientation=this.options.orientation??0,this._triggerKeys={keyDown:this.options.triggerKeys?.keyDown??!1,keys:this.options.triggerKeys?.keys??[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new A.ActionRunner,this._register(this._actionRunner)),this._register(this._actionRunner.onDidRun(l=>this._onDidRun.fire(l))),this._register(this._actionRunner.onBeforeRun(l=>this._onBeforeRun.fire(l))),this._actionIds=[],this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",i.animated!==!1&&this.domNode.classList.add("animated");let S,s;switch(this._orientation){case 0:S=[15],s=[17];break;case 1:S=[16],s=[18],this.domNode.className+=" vertical";break}this._register(t.addDisposableListener(this.domNode,t.EventType.KEY_DOWN,l=>{const r=new f.StandardKeyboardEvent(l);let p=!0;const u=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;S&&(r.equals(S[0])||r.equals(S[1]))?p=this.focusPrevious():s&&(r.equals(s[0])||r.equals(s[1]))?p=this.focusNext():r.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():r.equals(14)?p=this.focusFirst():r.equals(13)?p=this.focusLast():r.equals(2)&&u instanceof _.BaseActionViewItem&&u.trapsArrowNavigation?p=this.focusNext():this.isTriggerKeyEvent(r)?this._triggerKeys.keyDown?this.doTrigger(r):this.triggerKeyDown=!0:p=!1,p&&(r.preventDefault(),r.stopPropagation())})),this._register(t.addDisposableListener(this.domNode,t.EventType.KEY_UP,l=>{const r=new f.StandardKeyboardEvent(l);this.isTriggerKeyEvent(r)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(r)),r.preventDefault(),r.stopPropagation()):(r.equals(2)||r.equals(1024|2))&&this.updateFocusedItem()})),this.focusTracker=this._register(t.trackFocus(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{(t.getActiveElement()===this.domNode||!t.isAncestor(t.getActiveElement(),this.domNode))&&(this._onDidBlur.fire(),this.focusedItem=void 0,this.previouslyFocusedItem=void 0,this.triggerKeyDown=!1)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.actionsList.setAttribute("role","toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),c.appendChild(this.domNode)}refreshRole(){this.length()>=2?this.actionsList.setAttribute("role","toolbar"):this.actionsList.setAttribute("role","presentation")}setAriaLabel(c){c?this.actionsList.setAttribute("aria-label",c):this.actionsList.removeAttribute("aria-label")}setFocusable(c){if(this.focusable=c,this.focusable){const i=this.viewItems.find(S=>S instanceof _.BaseActionViewItem&&S.isEnabled());i instanceof _.BaseActionViewItem&&i.setFocusable(!0)}else this.viewItems.forEach(i=>{i instanceof _.BaseActionViewItem&&i.setFocusable(!1)})}isTriggerKeyEvent(c){let i=!1;return this._triggerKeys.keys.forEach(S=>{i=i||c.equals(S)}),i}updateFocusedItem(){for(let c=0;c<this.actionsList.children.length;c++){const i=this.actionsList.children[c];if(t.isAncestor(t.getActiveElement(),i)){this.focusedItem=c;break}}}get context(){return this._context}set context(c){this._context=c,this.viewItems.forEach(i=>i.setActionContext(c))}get actionRunner(){return this._actionRunner}set actionRunner(c){c&&(this._actionRunner=c,this.viewItems.forEach(i=>i.actionRunner=c))}getContainer(){return this.domNode}hasAction(c){return this._actionIds.includes(c.id)}getAction(c){return this.viewItems[c].action}push(c,i={}){const S=Array.isArray(c)?c:[c];let s=I.isNumber(i.index)?i.index:null;S.forEach(l=>{const r=document.createElement("li");r.className="action-item",r.setAttribute("role","presentation"),this.options.allowContextMenu||this._register(t.addDisposableListener(r,t.EventType.CONTEXT_MENU,u=>{t.EventHelper.stop(u,!0)}));let p;this.options.actionViewItemProvider&&(p=this.options.actionViewItemProvider(l)),p||(p=new _.ActionViewItem(this.context,l,i)),p.actionRunner=this._actionRunner,p.setActionContext(this.context),p.render(r),this.focusable&&p instanceof _.BaseActionViewItem&&this.viewItems.length===0&&p.setFocusable(!0),s===null||s<0||s>=this.actionsList.children.length?(this.actionsList.appendChild(r),this.viewItems.push(p),this._actionIds.push(l.id)):(this.actionsList.insertBefore(r,this.actionsList.children[s]),this.viewItems.splice(s,0,p),this._actionIds.splice(s,0,l.id),s++)}),typeof this.focusedItem=="number"&&this.focus(this.focusedItem),this.refreshRole()}getWidth(c){if(c>=0&&c<this.actionsList.children.length){const i=this.actionsList.children.item(c);if(i)return i.clientWidth}return 0}getHeight(c){if(c>=0&&c<this.actionsList.children.length){const i=this.actionsList.children.item(c);if(i)return i.clientHeight}return 0}pull(c){c>=0&&c<this.viewItems.length&&(this.actionsList.removeChild(this.actionsList.childNodes[c]),(0,D.dispose)(this.viewItems.splice(c,1)),this._actionIds.splice(c,1),this.refreshRole())}clear(){(0,D.dispose)(this.viewItems),this.viewItems=[],this._actionIds=[],t.clearNode(this.actionsList),this.refreshRole()}length(){return this.viewItems.length}isEmpty(){return this.viewItems.length===0}focus(c){let i=!1,S;if(c===void 0?i=!0:typeof c=="number"?S=c:typeof c=="boolean"&&(i=c),i&&typeof this.focusedItem=="undefined"){const s=this.viewItems.findIndex(l=>l.isEnabled());this.focusedItem=s===-1?void 0:s,this.updateFocus(void 0,void 0,!0)}else S!==void 0&&(this.focusedItem=S),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(c){if(typeof this.focusedItem=="undefined")this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const i=this.focusedItem;let S;do{if(!c&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=i,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,S=this.viewItems[this.focusedItem]}while(this.focusedItem!==i&&this.options.focusOnlyEnabledItems&&!S.isEnabled());return this.updateFocus(),!0}focusPrevious(c){if(typeof this.focusedItem=="undefined")this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const i=this.focusedItem;let S;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!c&&this.options.preventLoopNavigation)return this.focusedItem=i,!1;this.focusedItem=this.viewItems.length-1}S=this.viewItems[this.focusedItem]}while(this.focusedItem!==i&&this.options.focusOnlyEnabledItems&&!S.isEnabled());return this.updateFocus(!0),!0}updateFocus(c,i,S=!1){typeof this.focusedItem=="undefined"&&this.actionsList.focus({preventScroll:i}),this.previouslyFocusedItem!==void 0&&this.previouslyFocusedItem!==this.focusedItem&&this.viewItems[this.previouslyFocusedItem]?.blur();const s=this.focusedItem!==void 0&&this.viewItems[this.focusedItem];if(s){let l=!0;I.isFunction(s.focus)||(l=!1),this.options.focusOnlyEnabledItems&&I.isFunction(s.isEnabled)&&!s.isEnabled()&&(l=!1),l?(S||this.previouslyFocusedItem!==this.focusedItem)&&(s.focus(c),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:i}),this.previouslyFocusedItem=void 0)}}doTrigger(c){if(typeof this.focusedItem=="undefined")return;const i=this.viewItems[this.focusedItem];if(i instanceof _.BaseActionViewItem){const S=i._context===null||i._context===void 0?c:i._context;this.run(i._action,S)}}async run(c,i){await this._actionRunner.run(c,i)}dispose(){(0,D.dispose)(this.viewItems),this.viewItems=[],this._actionIds=[],this.getContainer().remove(),super.dispose()}}e.ActionBar=v;function C(o){if(!o.length)return o;let c=-1;for(let S=0;S<o.length;S++)if(o[S].id!==A.Separator.ID){c=S;break}if(c===-1)return[];o=o.slice(c);for(let S=o.length-1;S>=0&&o[S].id===A.Separator.ID;S--)o.splice(S,1);let i=!1;for(let S=o.length-1;S>=0;S--){const s=o[S].id===A.Separator.ID;s&&!i?o.splice(S,1):s?s&&(i=!1):i=!0}return o}e.prepareActions=C}),define(ne[162],re([1,0,10,91,129,181,36,33,66,6,2,51,979]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ButtonBar=e.ButtonWithDescription=e.ButtonWithDropdown=e.Button=void 0;const o={buttonBackground:I.Color.fromHex("#0E639C"),buttonHoverBackground:I.Color.fromHex("#006BB3"),buttonForeground:I.Color.white};class c extends v.Disposable{constructor(r,p){super();this._onDidClick=this._register(new w.Emitter),this.options=p||Object.create(null),(0,C.mixin)(this.options,o,!1),this.buttonForeground=this.options.buttonForeground,this.buttonBackground=this.options.buttonBackground,this.buttonHoverBackground=this.options.buttonHoverBackground,this.buttonSecondaryForeground=this.options.buttonSecondaryForeground,this.buttonSecondaryBackground=this.options.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=this.options.buttonSecondaryHoverBackground,this.buttonBorder=this.options.buttonBorder,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),r.appendChild(this._element),this._register(_.Gesture.addTarget(this._element)),[t.EventType.CLICK,_.EventType.Tap].forEach(u=>{this._register((0,t.addDisposableListener)(this._element,u,a=>{if(!this.enabled){t.EventHelper.stop(a);return}this._onDidClick.fire(a)}))}),this._register((0,t.addDisposableListener)(this._element,t.EventType.KEY_DOWN,u=>{const a=new f.StandardKeyboardEvent(u);let n=!1;this.enabled&&(a.equals(3)||a.equals(10))?(this._onDidClick.fire(u),n=!0):a.equals(9)&&(this._element.blur(),n=!0),n&&t.EventHelper.stop(a,!0)})),this._register((0,t.addDisposableListener)(this._element,t.EventType.MOUSE_OVER,u=>{this._element.classList.contains("disabled")||this.setHoverBackground()})),this._register((0,t.addDisposableListener)(this._element,t.EventType.MOUSE_OUT,u=>{this.applyStyles()})),this.focusTracker=this._register((0,t.trackFocus)(this._element)),this._register(this.focusTracker.onDidFocus(()=>this.setHoverBackground())),this._register(this.focusTracker.onDidBlur(()=>this.applyStyles())),this.applyStyles()}get onDidClick(){return this._onDidClick.event}setHoverBackground(){let r;this.options.secondary?r=this.buttonSecondaryHoverBackground?this.buttonSecondaryHoverBackground.toString():null:r=this.buttonHoverBackground?this.buttonHoverBackground.toString():null,r&&(this._element.style.backgroundColor=r)}style(r){this.buttonForeground=r.buttonForeground,this.buttonBackground=r.buttonBackground,this.buttonHoverBackground=r.buttonHoverBackground,this.buttonSecondaryForeground=r.buttonSecondaryForeground,this.buttonSecondaryBackground=r.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=r.buttonSecondaryHoverBackground,this.buttonBorder=r.buttonBorder,this.applyStyles()}applyStyles(){if(this._element){let r,p;this.options.secondary?(p=this.buttonSecondaryForeground?this.buttonSecondaryForeground.toString():"",r=this.buttonSecondaryBackground?this.buttonSecondaryBackground.toString():""):(p=this.buttonForeground?this.buttonForeground.toString():"",r=this.buttonBackground?this.buttonBackground.toString():"");const u=this.buttonBorder?this.buttonBorder.toString():"";this._element.style.color=p,this._element.style.backgroundColor=r,this._element.style.borderWidth=u?"1px":"",this._element.style.borderStyle=u?"solid":"",this._element.style.borderColor=u}}get element(){return this._element}set label(r){this._element.classList.add("monaco-text-button"),this.options.supportIcons?(0,t.reset)(this._element,...(0,A.renderLabelWithIcons)(r)):this._element.textContent=r,typeof this.options.title=="string"?this._element.title=this.options.title:this.options.title&&(this._element.title=r)}set icon(r){this._element.classList.add(...D.CSSIcon.asClassNameArray(r))}set enabled(r){r?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}focus(){this._element.focus()}hasFocus(){return this._element===document.activeElement}}e.Button=c;class i extends v.Disposable{constructor(r,p){super();this._onDidClick=this._register(new w.Emitter),this.onDidClick=this._onDidClick.event,this.element=document.createElement("div"),this.element.classList.add("monaco-button-dropdown"),r.appendChild(this.element),this.button=this._register(new c(this.element,p)),this._register(this.button.onDidClick(u=>this._onDidClick.fire(u))),this.action=this._register(new k.Action("primaryAction",this.button.label,void 0,!0,async()=>this._onDidClick.fire(void 0))),this.dropdownButton=this._register(new c(this.element,{...p,title:!1,supportIcons:!0})),this.dropdownButton.element.classList.add("monaco-dropdown-button"),this.dropdownButton.icon=D.Codicon.dropDownButton,this._register(this.dropdownButton.onDidClick(u=>{p.contextMenuProvider.showContextMenu({getAnchor:()=>this.dropdownButton.element,getActions:()=>[this.action,...p.actions],actionRunner:p.actionRunner,onHide:()=>this.dropdownButton.element.setAttribute("aria-expanded","false")}),this.dropdownButton.element.setAttribute("aria-expanded","true")}))}set label(r){this.button.label=r,this.action.label=r}set icon(r){this.button.icon=r}set enabled(r){this.button.enabled=r,this.dropdownButton.enabled=r}get enabled(){return this.button.enabled}style(r){this.button.style(r),this.dropdownButton.style(r)}focus(){this.button.focus()}hasFocus(){return this.button.hasFocus()||this.dropdownButton.hasFocus()}}e.ButtonWithDropdown=i;class S extends c{constructor(r,p){super(r,p);this._element.classList.add("monaco-description-button"),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._labelElement.tabIndex=-1,this._element.appendChild(this._labelElement),this._descriptionElement=document.createElement("div"),this._descriptionElement.classList.add("monaco-button-description"),this._descriptionElement.tabIndex=-1,this._element.appendChild(this._descriptionElement)}set label(r){this._element.classList.add("monaco-text-button"),this.options.supportIcons?(0,t.reset)(this._labelElement,...(0,A.renderLabelWithIcons)(r)):this._labelElement.textContent=r,typeof this.options.title=="string"?this._element.title=this.options.title:this.options.title&&(this._element.title=r)}set description(r){this.options.supportIcons?(0,t.reset)(this._descriptionElement,...(0,A.renderLabelWithIcons)(r)):this._descriptionElement.textContent=r}}e.ButtonWithDescription=S;class s extends v.Disposable{constructor(r){super();this.container=r,this._buttons=[]}get buttons(){return this._buttons}addButton(r){const p=this._register(new c(this.container,r));return this.pushButton(p),p}addButtonWithDescription(r){const p=this._register(new S(this.container,r));return this.pushButton(p),p}addButtonWithDropdown(r){const p=this._register(new i(this.container,r));return this.pushButton(p),p}pushButton(r){this._buttons.push(r);const p=this._buttons.length-1;this._register((0,t.addDisposableListener)(r.element,t.EventType.KEY_DOWN,u=>{const a=new f.StandardKeyboardEvent(u);let n=!0,h;a.equals(15)?h=p>0?p-1:this._buttons.length-1:a.equals(17)?h=p===this._buttons.length-1?0:p+1:n=!1,n&&typeof h=="number"&&(this._buttons[h].focus(),t.EventHelper.stop(u,!0))}))}}e.ButtonBar=s}),define(ne[1217],re([1,0,10,91,129,36,6,664]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownMenu=e.Dropdown=e.BaseDropdown=void 0;class D extends A.ActionRunner{constructor(C,o){super();this._onDidChangeVisibility=this._register(new k.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=(0,t.append)(C,(0,t.$)(".monaco-dropdown")),this._label=(0,t.append)(this._element,(0,t.$)(".dropdown-label"));let c=o.labelRenderer;c||(c=S=>(S.textContent=o.label||"",null));for(const S of[t.EventType.CLICK,t.EventType.MOUSE_DOWN,_.EventType.Tap])this._register((0,t.addDisposableListener)(this.element,S,s=>t.EventHelper.stop(s,!0)));for(const S of[t.EventType.MOUSE_DOWN,_.EventType.Tap])this._register((0,t.addDisposableListener)(this._label,S,s=>{s instanceof MouseEvent&&s.detail>1||(this.visible?this.hide():this.show())}));this._register((0,t.addDisposableListener)(this._label,t.EventType.KEY_UP,S=>{const s=new f.StandardKeyboardEvent(S);(s.equals(3)||s.equals(10))&&(t.EventHelper.stop(S,!0),this.visible?this.hide():this.show())}));const i=c(this._label);i&&this._register(i),this._register(_.Gesture.addTarget(this._label))}get element(){return this._element}get label(){return this._label}set tooltip(C){this._label&&(this._label.title=C)}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}isVisible(){return!!this.visible}onEvent(C,o){this.hide()}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}e.BaseDropdown=D;class I extends D{constructor(C,o){super(C,o);this.contextViewProvider=o.contextViewProvider}show(){super.show(),this.element.classList.add("active"),this.contextViewProvider.showContextView({getAnchor:()=>this.getAnchor(),render:C=>this.renderContents(C),onDOMEvent:(C,o)=>{this.onEvent(C,o)},onHide:()=>this.onHide()})}getAnchor(){return this.element}onHide(){this.element.classList.remove("active")}hide(){super.hide(),this.contextViewProvider&&this.contextViewProvider.hideContextView()}renderContents(C){return null}}e.Dropdown=I;class w extends D{constructor(C,o){super(C,o);this._actions=[],this._contextMenuProvider=o.contextMenuProvider,this.actions=o.actions||[],this.actionProvider=o.actionProvider,this.menuClassName=o.menuClassName||"",this.menuAsChild=!!o.menuAsChild}set menuOptions(C){this._menuOptions=C}get menuOptions(){return this._menuOptions}get actions(){return this.actionProvider?this.actionProvider.getActions():this._actions}set actions(C){this._actions=C}show(){super.show(),this.element.classList.add("active"),this._contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:C=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(C):void 0,getKeyBinding:C=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(C):void 0,getMenuClassName:()=>this.menuClassName,onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this.menuAsChild?this.element:void 0})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}e.DropdownMenu=w}),define(ne[262],re([1,0,10,91,134,1217,36,33,6,664]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionWithDropdownActionViewItem=e.DropdownMenuActionViewItem=void 0;class w extends _.BaseActionViewItem{constructor(o,c,i,S=Object.create(null)){super(null,o,S);this.actionItem=null,this._onDidChangeVisibility=this._register(new I.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.menuActionsOrProvider=c,this.contextMenuProvider=i,this.options=S,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(o){this.actionItem=o;const c=s=>{this.element=(0,t.append)(s,(0,t.$)("a.action-label"));let l=[];return typeof this.options.classNames=="string"?l=this.options.classNames.split(/\s+/g).filter(r=>!!r):this.options.classNames&&(l=this.options.classNames),l.find(r=>r==="icon")||l.push("codicon"),this.element.classList.add(...l),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",null},i=Array.isArray(this.menuActionsOrProvider),S={contextMenuProvider:this.contextMenuProvider,labelRenderer:c,menuAsChild:this.options.menuAsChild,actions:i?this.menuActionsOrProvider:void 0,actionProvider:i?void 0:this.menuActionsOrProvider};if(this.dropdownMenu=this._register(new A.DropdownMenu(o,S)),this._register(this.dropdownMenu.onDidChangeVisibility(s=>{this.element?.setAttribute("aria-expanded",`${s}`),this._onDidChangeVisibility.fire(s)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const s=this;this.dropdownMenu.menuOptions={...this.dropdownMenu.menuOptions,get anchorAlignment(){return s.options.anchorAlignmentProvider()}}}this.updateEnabled()}setActionContext(o){super.setActionContext(o),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=o:this.dropdownMenu.menuOptions={context:o})}show(){this.dropdownMenu&&this.dropdownMenu.show()}updateEnabled(){const o=!this.getAction().enabled;this.actionItem?.classList.toggle("disabled",o),this.element?.classList.toggle("disabled",o)}}e.DropdownMenuActionViewItem=w;class v extends _.ActionViewItem{constructor(o,c,i,S){super(o,c,i);this.contextMenuProvider=S}render(o){if(super.render(o),this.element){this.element.classList.add("action-dropdown-item");const c={getActions:()=>{const i=this.options.menuActionsOrProvider;return Array.isArray(i)?i:i.getActions()}};this.dropdownMenuActionViewItem=new w(this._register(new k.Action("dropdownAction",void 0)),c,this.contextMenuProvider,{classNames:["dropdown",...D.Codicon.dropDownButton.classNamesArray,...this.options.menuActionClassNames||[]]}),this.dropdownMenuActionViewItem.render(this.element),this._register((0,t.addDisposableListener)(this.element,t.EventType.KEY_DOWN,i=>{const S=new f.StandardKeyboardEvent(i);let s=!1;this.dropdownMenuActionViewItem?.isFocused()&&S.equals(15)?(s=!0,this.dropdownMenuActionViewItem?.blur(),this.focus()):this.isFocused()&&S.equals(17)&&(s=!0,this.blur(),this.dropdownMenuActionViewItem?.focus()),s&&(S.preventDefault(),S.stopPropagation())}))}}blur(){super.blur(),this.dropdownMenuActionViewItem?.blur()}setFocusable(o){super.setFocusable(o),this.dropdownMenuActionViewItem?.setFocusable(o)}}e.ActionWithDropdownActionViewItem=v}),define(ne[183],re([1,0,10,224,446,78,112,139,138,66,6,379,51,1207,987]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HistoryInputBox=e.InputBox=e.MessageType=void 0;const i=t.$;var S;(function(p){p[p.INFO=1]="INFO",p[p.WARNING=2]="WARNING",p[p.ERROR=3]="ERROR"})(S=e.MessageType||(e.MessageType={}));const s={inputBackground:w.Color.fromHex("#3C3C3C"),inputForeground:w.Color.fromHex("#CCCCCC"),inputValidationInfoBorder:w.Color.fromHex("#55AAFF"),inputValidationInfoBackground:w.Color.fromHex("#063B49"),inputValidationWarningBorder:w.Color.fromHex("#B89500"),inputValidationWarningBackground:w.Color.fromHex("#352A05"),inputValidationErrorBorder:w.Color.fromHex("#BE1100"),inputValidationErrorBackground:w.Color.fromHex("#5A1D1D")};class l extends I.Widget{constructor(u,a,n){super();this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new v.Emitter),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new v.Emitter),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=a,this.options=n||Object.create(null),(0,o.mixin)(this.options,s,!1),this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=this.options.tooltip??(this.placeholder||""),this.ariaLabel=this.options.ariaLabel||"",this.inputBackground=this.options.inputBackground,this.inputForeground=this.options.inputForeground,this.inputBorder=this.options.inputBorder,this.inputValidationInfoBorder=this.options.inputValidationInfoBorder,this.inputValidationInfoBackground=this.options.inputValidationInfoBackground,this.inputValidationInfoForeground=this.options.inputValidationInfoForeground,this.inputValidationWarningBorder=this.options.inputValidationWarningBorder,this.inputValidationWarningBackground=this.options.inputValidationWarningBackground,this.inputValidationWarningForeground=this.options.inputValidationWarningForeground,this.inputValidationErrorBorder=this.options.inputValidationErrorBorder,this.inputValidationErrorBackground=this.options.inputValidationErrorBackground,this.inputValidationErrorForeground=this.options.inputValidationErrorForeground,this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=t.append(u,i(".monaco-inputbox.idle"));let h=this.options.flexibleHeight?"textarea":"input",g=t.append(this.element,i(".ibwrapper"));if(this.input=t.append(g,i(h+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight=typeof this.options.flexibleMaxHeight=="number"?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=t.append(g,i("div.mirror")),this.mirror.innerText="\xA0",this.scrollableElement=new D.ScrollableElement(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),t.append(u,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(b=>this.input.scrollTop=b.scrollTop));const d=this._register(new f.DomEmitter(document,"selectionchange")),m=v.Event.filter(d.event,()=>document.getSelection()?.anchorNode===g);this._register(m(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this.ignoreGesture(this.input),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new A.ActionBar(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(u){this.placeholder=u,this.input.setAttribute("placeholder",u)}setTooltip(u){this.tooltip=u,this.input.title=u}setAriaLabel(u){this.ariaLabel=u,u?this.input.setAttribute("aria-label",this.ariaLabel):this.input.removeAttribute("aria-label")}getAriaLabel(){return this.ariaLabel}get mirrorElement(){return this.mirror}get inputElement(){return this.input}get value(){return this.input.value}set value(u){this.input.value!==u&&(this.input.value=u,this.onValueChange())}get height(){return typeof this.cachedHeight=="number"?this.cachedHeight:t.getTotalHeight(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(u=null){this.input.select(),u&&(this.input.setSelectionRange(u.start,u.end),u.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}setEnabled(u){u?this.enable():this.disable()}get width(){return t.getTotalWidth(this.input)}set width(u){if(this.options.flexibleHeight&&this.options.flexibleWidth){let a=0;if(this.mirror){const n=parseFloat(this.mirror.style.paddingLeft||"")||0,h=parseFloat(this.mirror.style.paddingRight||"")||0;a=n+h}this.input.style.width=u-a+"px"}else this.input.style.width=u+"px";this.mirror&&(this.mirror.style.width=u+"px")}set paddingRight(u){this.input.style.width=`calc(100% - ${u}px)`,this.mirror&&(this.mirror.style.paddingRight=u+"px")}updateScrollDimensions(){if(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!this.scrollableElement)return;const u=this.cachedContentHeight,a=this.cachedHeight,n=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:u,height:a}),this.scrollableElement.setScrollPosition({scrollTop:n})}showMessage(u,a){this.message=u,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(u.type));const n=this.stylesForType(this.message.type);this.element.style.border=n.border?`1px solid ${n.border}`:"",(this.hasFocus()||a)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}isInputValid(){return!!this.validation&&!this.validation(this.value)}validate(){let u=null;return this.validation&&(u=this.validation(this.value),u?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(u)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),u?.type}stylesForType(u){switch(u){case 1:return{border:this.inputValidationInfoBorder,background:this.inputValidationInfoBackground,foreground:this.inputValidationInfoForeground};case 2:return{border:this.inputValidationWarningBorder,background:this.inputValidationWarningBackground,foreground:this.inputValidationWarningForeground};default:return{border:this.inputValidationErrorBorder,background:this.inputValidationErrorBackground,foreground:this.inputValidationErrorForeground}}}classForType(u){switch(u){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let u,a=()=>u.style.width=t.getTotalWidth(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:h=>{if(!this.message)return null;u=t.append(h,i(".monaco-inputbox-container")),a();const g={inline:!0,className:"monaco-inputbox-message"},d=this.message.formatContent?(0,_.renderFormattedText)(this.message.content,g):(0,_.renderText)(this.message.content,g);d.classList.add(this.classForType(this.message.type));const m=this.stylesForType(this.message.type);return d.style.backgroundColor=m.background?m.background.toString():"",d.style.color=m.foreground?m.foreground.toString():"",d.style.border=m.border?`1px solid ${m.border}`:"",t.append(u,d),null},onHide:()=>{this.state="closed"},layout:a});let n;this.message.type===3?n=c.localize(0,null,this.message.content):this.message.type===2?n=c.localize(1,null,this.message.content):n=c.localize(2,null,this.message.content),k.alert(n),this.state="open"}_hideMessage(){!this.contextViewProvider||(this.state==="open"&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),this.state==="open"&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const u=this.value,n=u.charCodeAt(u.length-1)===10?" ":"";(u+n).replace(/\u000c/g,"")?this.mirror.textContent=u+n:this.mirror.innerText="\xA0",this.layout()}style(u){this.inputBackground=u.inputBackground,this.inputForeground=u.inputForeground,this.inputBorder=u.inputBorder,this.inputValidationInfoBackground=u.inputValidationInfoBackground,this.inputValidationInfoForeground=u.inputValidationInfoForeground,this.inputValidationInfoBorder=u.inputValidationInfoBorder,this.inputValidationWarningBackground=u.inputValidationWarningBackground,this.inputValidationWarningForeground=u.inputValidationWarningForeground,this.inputValidationWarningBorder=u.inputValidationWarningBorder,this.inputValidationErrorBackground=u.inputValidationErrorBackground,this.inputValidationErrorForeground=u.inputValidationErrorForeground,this.inputValidationErrorBorder=u.inputValidationErrorBorder,this.applyStyles()}applyStyles(){const u=this.inputBackground?this.inputBackground.toString():"",a=this.inputForeground?this.inputForeground.toString():"",n=this.inputBorder?this.inputBorder.toString():"";this.element.style.backgroundColor=u,this.element.style.color=a,this.input.style.backgroundColor="inherit",this.input.style.color=a,this.element.style.borderWidth=n?"1px":"",this.element.style.borderStyle=n?"solid":"",this.element.style.borderColor=n}layout(){if(!this.mirror)return;const u=this.cachedContentHeight;this.cachedContentHeight=t.getTotalHeight(this.mirror),u!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(u){const a=this.inputElement,n=a.selectionStart,h=a.selectionEnd,g=a.value;n!==null&&h!==null&&(this.value=g.substr(0,n)+u+g.substr(h),a.setSelectionRange(n+1,n+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar&&this.actionbar.dispose(),super.dispose()}}e.InputBox=l;class r extends l{constructor(u,a,n){const h=c.localize(3,null),g=` or \u21C5 ${h}`,d=` (\u21C5 ${h})`;super(u,a,n);this.history=new C.HistoryNavigator(n.history,100);const m=()=>{if(n.showHistoryHint&&n.showHistoryHint()&&!this.placeholder.endsWith(g)&&!this.placeholder.endsWith(d)&&this.history.getHistory().length){const b=this.placeholder.endsWith(")")?g:d,E=this.placeholder+b;n.showPlaceholderOnFocus&&document.activeElement!==this.input?this.placeholder=E:this.setPlaceHolder(E)}};this.observer=new MutationObserver((b,E)=>{b.forEach(y=>{y.target.textContent||m()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>m()),this.onblur(this.input,()=>{const b=E=>{if(this.placeholder.endsWith(E)){const y=this.placeholder.slice(0,this.placeholder.length-E.length);return n.showPlaceholderOnFocus?this.placeholder=y:this.setPlaceHolder(y),!0}else return!1};b(d)||b(g)})}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(){this.value&&this.value!==this.getCurrentValue()&&this.history.add(this.value)}getHistory(){return this.history.getHistory()}showNextValue(){this.history.has(this.value)||this.addToHistory();let u=this.getNextValue();u&&(u=u===this.value?this.getNextValue():u),u&&(this.value=u,k.status(this.value))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let u=this.getPreviousValue();u&&(u=u===this.value?this.getPreviousValue():u),u&&(this.value=u,k.status(this.value))}clearHistory(){this.history.clear()}getCurrentValue(){let u=this.history.current();return u||(u=this.history.last(),this.history.next()),u}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()||this.history.last()}}e.HistoryInputBox=r}),define(ne[545],re([1,0,77,129,10,91,137,78,134,520,663,139,36,11,33,225,2,14,29]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cleanMnemonic=e.Menu=e.Direction=e.MENU_ESCAPED_MNEMONIC_REGEX=e.MENU_MNEMONIC_REGEX=void 0,e.MENU_MNEMONIC_REGEX=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,e.MENU_ESCAPED_MNEMONIC_REGEX=/(&)?(&)([^\s&])/g;var p;(function(m){m[m.Right=0]="Right",m[m.Left=1]="Left"})(p=e.Direction||(e.Direction={}));class u extends D.ActionBar{constructor(b,E,y={}){b.classList.add("monaco-menu-container"),b.setAttribute("role","presentation");const T=document.createElement("div");T.classList.add("monaco-menu"),T.setAttribute("role","presentation");super(T,{orientation:1,actionViewItemProvider:x=>this.doGetActionViewItem(x,y,R),context:y.context,actionRunner:y.actionRunner,ariaLabel:y.ariaLabel,focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...l.isMacintosh||l.isLinux?[10]:[]],keyDown:!0}});this.menuElement=T,this.actionsList.setAttribute("role","menu"),this.actionsList.tabIndex=0,this.menuDisposables=this._register(new s.DisposableStore),this.initializeOrUpdateStyleSheet(b,{}),this._register(f.Gesture.addTarget(T)),(0,_.addDisposableListener)(T,_.EventType.KEY_DOWN,x=>{new A.StandardKeyboardEvent(x).equals(2)&&x.preventDefault()}),y.enableMnemonics&&this.menuDisposables.add((0,_.addDisposableListener)(T,_.EventType.KEY_DOWN,x=>{const F=x.key.toLocaleLowerCase();if(this.mnemonics.has(F)){_.EventHelper.stop(x,!0);const L=this.mnemonics.get(F);if(L.length===1&&(L[0]instanceof n&&L[0].container&&this.focusItemByElement(L[0].container),L[0].onClick(x)),L.length>1){const M=L.shift();M&&M.container&&(this.focusItemByElement(M.container),L.push(M)),this.mnemonics.set(F,L)}}})),l.isLinux&&this._register((0,_.addDisposableListener)(T,_.EventType.KEY_DOWN,x=>{const F=new A.StandardKeyboardEvent(x);F.equals(14)||F.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),_.EventHelper.stop(x,!0)):(F.equals(13)||F.equals(12))&&(this.focusedItem=0,this.focusPrevious(),_.EventHelper.stop(x,!0))})),this._register((0,_.addDisposableListener)(this.domNode,_.EventType.MOUSE_OUT,x=>{let F=x.relatedTarget;(0,_.isAncestor)(F,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),x.stopPropagation())})),this._register((0,_.addDisposableListener)(this.actionsList,_.EventType.MOUSE_OVER,x=>{let F=x.target;if(!(!F||!(0,_.isAncestor)(F,this.actionsList)||F===this.actionsList)){for(;F.parentElement!==this.actionsList&&F.parentElement!==null;)F=F.parentElement;if(F.classList.contains("action-item")){const L=this.focusedItem;this.setFocusedItem(F),L!==this.focusedItem&&this.updateFocus()}}})),this._register(f.Gesture.addTarget(this.actionsList)),this._register((0,_.addDisposableListener)(this.actionsList,f.EventType.Tap,x=>{let F=x.initialTarget;if(!(!F||!(0,_.isAncestor)(F,this.actionsList)||F===this.actionsList)){for(;F.parentElement!==this.actionsList&&F.parentElement!==null;)F=F.parentElement;if(F.classList.contains("action-item")){const L=this.focusedItem;this.setFocusedItem(F),L!==this.focusedItem&&this.updateFocus()}}}));let R={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new C.DomScrollableElement(T,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const O=this.scrollableElement.getDomNode();O.style.position="",this._register((0,_.addDisposableListener)(T,f.EventType.Change,x=>{_.EventHelper.stop(x,!0);const F=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:F-x.translationY})})),this._register((0,_.addDisposableListener)(O,_.EventType.MOUSE_UP,x=>{x.preventDefault()})),T.style.maxHeight=`${Math.max(10,window.innerHeight-b.getBoundingClientRect().top-35)}px`,E=E.filter(x=>y.submenuIds?.has(x.id)?(console.warn(`Found submenu cycle: ${x.id}`),!1):!0),this.push(E,{icon:!0,label:!0,isMenu:!0}),b.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(x=>!(x instanceof h)).forEach((x,F,L)=>{x.updatePositionInSet(F+1,L.length)})}initializeOrUpdateStyleSheet(b,E){this.styleSheet||((0,_.isInShadowDOM)(b)?this.styleSheet=(0,_.createStyleSheet)(b):(u.globalStyleSheet||(u.globalStyleSheet=(0,_.createStyleSheet)()),this.styleSheet=u.globalStyleSheet)),this.styleSheet.textContent=d(E,(0,_.isInShadowDOM)(b))}style(b){const E=this.getContainer();this.initializeOrUpdateStyleSheet(E,b);const y=b.foregroundColor?`${b.foregroundColor}`:"",T=b.backgroundColor?`${b.backgroundColor}`:"",R=b.borderColor?`1px solid ${b.borderColor}`:"",O=b.shadowColor?`0 2px 4px ${b.shadowColor}`:"";E.style.border=R,this.domNode.style.color=y,this.domNode.style.backgroundColor=T,E.style.boxShadow=O,this.viewItems&&this.viewItems.forEach(x=>{(x instanceof a||x instanceof h)&&x.style(b)})}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}get scrollOffset(){return this.menuElement.scrollTop}trigger(b){if(b<=this.viewItems.length&&b>=0){const E=this.viewItems[b];if(E instanceof n)super.focus(b),E.open(!0);else if(E instanceof a)super.run(E._action,E._context);else return}}focusItemByElement(b){const E=this.focusedItem;this.setFocusedItem(b),E!==this.focusedItem&&this.updateFocus()}setFocusedItem(b){for(let E=0;E<this.actionsList.children.length;E++){let y=this.actionsList.children[E];if(b===y){this.focusedItem=E;break}}}updateFocus(b){super.updateFocus(b,!0,!0),typeof this.focusedItem!="undefined"&&this.scrollableElement.setScrollPosition({scrollTop:Math.round(this.menuElement.scrollTop)})}doGetActionViewItem(b,E,y){if(b instanceof o.Separator)return new h(E.context,b,{icon:!0});if(b instanceof o.SubmenuAction){const T=new n(b,b.actions,y,{...E,submenuIds:new Set([...E.submenuIds||[],b.id])});if(E.enableMnemonics){const R=T.getMnemonic();if(R&&T.isEnabled()){let O=[];this.mnemonics.has(R)&&(O=this.mnemonics.get(R)),O.push(T),this.mnemonics.set(R,O)}}return T}else{const T={enableMnemonics:E.enableMnemonics,useEventAsContext:E.useEventAsContext};if(E.getKeyBinding){const O=E.getKeyBinding(b);if(O){const x=O.getLabel();x&&(T.keybinding=x)}}const R=new a(E.context,b,T);if(E.enableMnemonics){const O=R.getMnemonic();if(O&&R.isEnabled()){let x=[];this.mnemonics.has(O)&&(x=this.mnemonics.get(O)),x.push(R),this.mnemonics.set(O,x)}}return R}}}e.Menu=u;class a extends I.BaseActionViewItem{constructor(b,E,y={}){y.isMenu=!0;super(E,E,y);if(this.options=y,this.options.icon=y.icon!==void 0?y.icon:!1,this.options.label=y.label!==void 0?y.label:!0,this.cssClass="",this.options.label&&y.enableMnemonics){let T=this.getAction().label;if(T){let R=e.MENU_MNEMONIC_REGEX.exec(T);R&&(this.mnemonic=(R[1]?R[1]:R[3]).toLocaleLowerCase())}}this.runOnceToEnableMouseUp=new c.RunOnceScheduler(()=>{!this.element||(this._register((0,_.addDisposableListener)(this.element,_.EventType.MOUSE_UP,T=>{if(_.EventHelper.stop(T,!0),t.isFirefox){if(new k.StandardMouseEvent(T).rightButton)return;this.onClick(T)}else setTimeout(()=>{this.onClick(T)},0)})),this._register((0,_.addDisposableListener)(this.element,_.EventType.CONTEXT_MENU,T=>{_.EventHelper.stop(T,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(b){super.render(b),!!this.element&&(this.container=b,this.item=(0,_.append)(this.element,(0,_.$)("a.action-menu-item")),this._action.id===o.Separator.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=(0,_.append)(this.item,(0,_.$)("span.menu-item-check"+i.Codicon.menuSelection.cssSelector)),this.check.setAttribute("role","none"),this.label=(0,_.append)(this.item,(0,_.$)("span.action-label")),this.options.label&&this.options.keybinding&&((0,_.append)(this.item,(0,_.$)("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked())}blur(){super.blur(),this.applyStyle()}focus(){super.focus(),this.item&&this.item.focus(),this.applyStyle()}updatePositionInSet(b,E){this.item&&(this.item.setAttribute("aria-posinset",`${b}`),this.item.setAttribute("aria-setsize",`${E}`))}updateLabel(){if(!!this.label&&this.options.label){(0,_.clearNode)(this.label);let b=(0,S.stripIcons)(this.getAction().label);if(b){const E=g(b);this.options.enableMnemonics||(b=E),this.label.setAttribute("aria-label",E.replace(/&&/g,"&"));const y=e.MENU_MNEMONIC_REGEX.exec(b);if(y){b=r.escape(b),e.MENU_ESCAPED_MNEMONIC_REGEX.lastIndex=0;let T=e.MENU_ESCAPED_MNEMONIC_REGEX.exec(b);for(;T&&T[1];)T=e.MENU_ESCAPED_MNEMONIC_REGEX.exec(b);const R=O=>O.replace(/&&/g,"&");T?this.label.append(r.ltrim(R(b.substr(0,T.index))," "),(0,_.$)("u",{"aria-hidden":"true"},T[3]),r.rtrim(R(b.substr(T.index+T[0].length))," ")):this.label.innerText=R(b).trim(),this.item&&this.item.setAttribute("aria-keyshortcuts",(y[1]?y[1]:y[3]).toLocaleLowerCase())}else this.label.innerText=b.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.getAction().class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.getAction().enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;const b=this.getAction().checked;this.item.classList.toggle("checked",!!b),b!==void 0?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",b?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){if(!this.menuStyle)return;const b=this.element&&this.element.classList.contains("focused"),E=b&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,y=b&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,T=b&&this.menuStyle.selectionBorderColor?`thin solid ${this.menuStyle.selectionBorderColor}`:"";this.item&&(this.item.style.color=E?E.toString():"",this.item.style.backgroundColor=y?y.toString():""),this.check&&(this.check.style.color=E?E.toString():""),this.container&&(this.container.style.border=T)}style(b){this.menuStyle=b,this.applyStyle()}}class n extends a{constructor(b,E,y,T){super(b,b,T);this.submenuActions=E,this.parentData=y,this.submenuOptions=T,this.mysubmenu=null,this.submenuDisposables=this._register(new s.DisposableStore),this.mouseOver=!1,this.expandDirection=T&&T.expandDirection!==void 0?T.expandDirection:p.Right,this.showScheduler=new c.RunOnceScheduler(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new c.RunOnceScheduler(()=>{this.element&&!(0,_.isAncestor)((0,_.getActiveElement)(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(b){super.render(b),!!this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=(0,_.append)(this.item,(0,_.$)("span.submenu-indicator"+i.Codicon.menuSubmenu.cssSelector)),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register((0,_.addDisposableListener)(this.element,_.EventType.KEY_UP,E=>{let y=new A.StandardKeyboardEvent(E);(y.equals(17)||y.equals(3))&&(_.EventHelper.stop(E,!0),this.createSubmenu(!0))})),this._register((0,_.addDisposableListener)(this.element,_.EventType.KEY_DOWN,E=>{let y=new A.StandardKeyboardEvent(E);(0,_.getActiveElement)()===this.item&&(y.equals(17)||y.equals(3))&&_.EventHelper.stop(E,!0)})),this._register((0,_.addDisposableListener)(this.element,_.EventType.MOUSE_OVER,E=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register((0,_.addDisposableListener)(this.element,_.EventType.MOUSE_LEAVE,E=>{this.mouseOver=!1})),this._register((0,_.addDisposableListener)(this.element,_.EventType.FOCUS_OUT,E=>{this.element&&!(0,_.isAncestor)((0,_.getActiveElement)(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))})))}updateEnabled(){}open(b){this.cleanupExistingSubmenu(!1),this.createSubmenu(b)}onClick(b){_.EventHelper.stop(b,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(b){if(this.parentData.submenu&&(b||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch{}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(b,E,y,T){const R={top:0,left:0};return R.left=(0,v.layout)(b.width,E.width,{position:T===p.Right?0:1,offset:y.left,size:y.width}),R.left>=y.left&&R.left<y.left+y.width&&(y.left+10+E.width<=b.width&&(R.left=y.left+10),y.top+=10,y.height=0),R.top=(0,v.layout)(b.height,E.height,{position:0,offset:y.top,size:0}),R.top+E.height===y.top&&R.top+y.height+E.height<=b.height&&(R.top+=y.height),R}createSubmenu(b=!0){if(!!this.element)if(this.parentData.submenu)this.parentData.submenu.focus(!1);else{this.updateAriaExpanded("true"),this.submenuContainer=(0,_.append)(this.element,(0,_.$)("div.monaco-submenu")),this.submenuContainer.classList.add("menubar-menu-items-holder","context-view");const E=getComputedStyle(this.parentData.parent.domNode),y=parseFloat(E.paddingTop||"0")||0;this.submenuContainer.style.zIndex="1",this.submenuContainer.style.position="fixed",this.submenuContainer.style.top="0",this.submenuContainer.style.left="0",this.parentData.submenu=new u(this.submenuContainer,this.submenuActions.length?this.submenuActions:[new o.EmptySubmenuAction],this.submenuOptions),this.menuStyle&&this.parentData.submenu.style(this.menuStyle);const T=this.element.getBoundingClientRect(),R={top:T.top-y,left:T.left,height:T.height+2*y,width:T.width},O=this.submenuContainer.getBoundingClientRect(),{top:x,left:F}=this.calculateSubmenuMenuLayout(new _.Dimension(window.innerWidth,window.innerHeight),_.Dimension.lift(O),R,this.expandDirection);this.submenuContainer.style.left=`${F-O.left}px`,this.submenuContainer.style.top=`${x-O.top}px`,this.submenuDisposables.add((0,_.addDisposableListener)(this.submenuContainer,_.EventType.KEY_UP,L=>{new A.StandardKeyboardEvent(L).equals(15)&&(_.EventHelper.stop(L,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add((0,_.addDisposableListener)(this.submenuContainer,_.EventType.KEY_DOWN,L=>{new A.StandardKeyboardEvent(L).equals(15)&&_.EventHelper.stop(L,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(b),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(b){this.item&&this.item?.setAttribute("aria-expanded",b)}applyStyle(){if(super.applyStyle(),!this.menuStyle)return;const E=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=E?`${E}`:""),this.parentData.submenu&&this.parentData.submenu.style(this.menuStyle)}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class h extends I.ActionViewItem{style(b){this.label&&(this.label.style.borderBottomColor=b.separatorColor?`${b.separatorColor}`:"")}}function g(m){const b=e.MENU_MNEMONIC_REGEX,E=b.exec(m);if(!E)return m;const y=!E[1];return m.replace(b,y?"$2$3":"").trim()}e.cleanMnemonic=g;function d(m,b){let E=` .monaco-menu { font-size: 13px; } ${(0,w.formatRule)(i.Codicon.menuSelection)} ${(0,w.formatRule)(i.Codicon.menuSubmenu)} .monaco-menu .monaco-action-bar { text-align: right; overflow: hidden; white-space: nowrap; } .monaco-menu .monaco-action-bar .actions-container { display: flex; margin: 0 auto; padding: 0; width: 100%; justify-content: flex-end; } .monaco-menu .monaco-action-bar.vertical .actions-container { display: inline-block; } .monaco-menu .monaco-action-bar.reverse .actions-container { flex-direction: row-reverse; } .monaco-menu .monaco-action-bar .action-item { cursor: pointer; display: inline-block; transition: transform 50ms ease; position: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */ } .monaco-menu .monaco-action-bar .action-item.disabled { cursor: default; } .monaco-menu .monaco-action-bar.animated .action-item.active { transform: scale(1.272019649, 1.272019649); /* 1.272019649 = \u221A\u03C6 */ } .monaco-menu .monaco-action-bar .action-item .icon, .monaco-menu .monaco-action-bar .action-item .codicon { display: inline-block; } .monaco-menu .monaco-action-bar .action-item .codicon { display: flex; align-items: center; } .monaco-menu .monaco-action-bar .action-label { font-size: 11px; margin-right: 4px; } .monaco-menu .monaco-action-bar .action-item.disabled .action-label, .monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover { opacity: 0.4; } /* Vertical actions */ .monaco-menu .monaco-action-bar.vertical { text-align: left; } .monaco-menu .monaco-action-bar.vertical .action-item { display: block; } .monaco-menu .monaco-action-bar.vertical .action-label.separator { display: block; border-bottom: 1px solid #bbb; padding-top: 1px; margin-left: .8em; margin-right: .8em; } .monaco-menu .secondary-actions .monaco-action-bar .action-label { margin-left: 6px; } /* Action Items */ .monaco-menu .monaco-action-bar .action-item.select-container { overflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */ flex: 1; max-width: 170px; min-width: 60px; display: flex; align-items: center; justify-content: center; margin-right: 10px; } .monaco-menu .monaco-action-bar.vertical { margin-left: 0; overflow: visible; } .monaco-menu .monaco-action-bar.vertical .actions-container { display: block; } .monaco-menu .monaco-action-bar.vertical .action-item { padding: 0; transform: none; display: flex; } .monaco-menu .monaco-action-bar.vertical .action-item.active { transform: none; } .monaco-menu .monaco-action-bar.vertical .action-menu-item { flex: 1 1 auto; display: flex; height: 2em; align-items: center; position: relative; } .monaco-menu .monaco-action-bar.vertical .action-label { flex: 1 1 auto; text-decoration: none; padding: 0 1em; background: none; font-size: 12px; line-height: 1; } .monaco-menu .monaco-action-bar.vertical .keybinding, .monaco-menu .monaco-action-bar.vertical .submenu-indicator { display: inline-block; flex: 2 1 auto; padding: 0 1em; text-align: right; font-size: 12px; line-height: 1; } .monaco-menu .monaco-action-bar.vertical .submenu-indicator { height: 100%; } .monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon { font-size: 16px !important; display: flex; align-items: center; } .monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before { margin-left: auto; margin-right: -20px; } .monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding, .monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator { opacity: 0.4; } .monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) { display: inline-block; box-sizing: border-box; margin: 0; } .monaco-menu .monaco-action-bar.vertical .action-item { position: static; overflow: visible; } .monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu { position: absolute; } .monaco-menu .monaco-action-bar.vertical .action-label.separator { padding: 0.5em 0 0 0; margin-bottom: 0.5em; width: 100%; height: 0px !important; margin-left: .8em !important; margin-right: .8em !important; } .monaco-menu .monaco-action-bar.vertical .action-label.separator.text { padding: 0.7em 1em 0.1em 1em; font-weight: bold; opacity: 1; } .monaco-menu .monaco-action-bar.vertical .action-label:hover { color: inherit; } .monaco-menu .monaco-action-bar.vertical .menu-item-check { position: absolute; visibility: hidden; width: 1em; height: 100%; } .monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check { visibility: visible; display: flex; align-items: center; justify-content: center; } /* Context Menu */ .context-view.monaco-menu-container { outline: 0; border: none; animation: fadeIn 0.083s linear; -webkit-app-region: no-drag; } .context-view.monaco-menu-container :focus, .context-view.monaco-menu-container .monaco-action-bar.vertical:focus, .context-view.monaco-menu-container .monaco-action-bar.vertical :focus { outline: 0; } .monaco-menu .monaco-action-bar.vertical .action-item { border: thin solid transparent; /* prevents jumping behaviour on hover or focus */ } /* High Contrast Theming */ :host-context(.hc-black) .context-view.monaco-menu-container, :host-context(.hc-light) .context-view.monaco-menu-container { box-shadow: none; } :host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused, :host-context(.hc-light) .monaco-menu .monaco-action-bar.vertical .action-item.focused { background: none; } /* Vertical Action Bar Styles */ .monaco-menu .monaco-action-bar.vertical { padding: .5em 0; } .monaco-menu .monaco-action-bar.vertical .action-menu-item { height: 1.8em; } .monaco-menu .monaco-action-bar.vertical .action-label:not(.separator), .monaco-menu .monaco-action-bar.vertical .keybinding { font-size: inherit; padding: 0 2em; } .monaco-menu .monaco-action-bar.vertical .menu-item-check { font-size: inherit; width: 2em; } .monaco-menu .monaco-action-bar.vertical .action-label.separator { font-size: inherit; padding: 0.2em 0 0 0; margin-bottom: 0.2em; } :host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator { margin-left: 0; margin-right: 0; } .monaco-menu .monaco-action-bar.vertical .submenu-indicator { font-size: 60%; padding: 0 1.8em; } :host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator { height: 100%; mask-size: 10px 10px; -webkit-mask-size: 10px 10px; } .monaco-menu .action-item { cursor: default; }`;if(b){E+=` /* Arrows */ .monaco-scrollable-element > .scrollbar > .scra { cursor: pointer; font-size: 11px !important; } .monaco-scrollable-element > .visible { opacity: 1; /* Background rule added for IE9 - to allow clicks on dom node */ background:rgba(0,0,0,0); transition: opacity 100ms linear; } .monaco-scrollable-element > .invisible { opacity: 0; pointer-events: none; } .monaco-scrollable-element > .invisible.fade { transition: opacity 800ms linear; } /* Scrollable Content Inset Shadow */ .monaco-scrollable-element > .shadow { position: absolute; display: none; } .monaco-scrollable-element > .shadow.top { display: block; top: 0; left: 3px; height: 3px; width: 100%; } .monaco-scrollable-element > .shadow.left { display: block; top: 3px; left: 0; height: 100%; width: 3px; } .monaco-scrollable-element > .shadow.top-left-corner { display: block; top: 0; left: 0; height: 3px; width: 3px; } `;const y=m.scrollbarShadow;y&&(E+=` .monaco-scrollable-element > .shadow.top { box-shadow: ${y} 0 6px 6px -6px inset; } .monaco-scrollable-element > .shadow.left { box-shadow: ${y} 6px 0 6px -6px inset; } .monaco-scrollable-element > .shadow.top.left { box-shadow: ${y} 6px 6px 6px -6px inset; } `);const T=m.scrollbarSliderBackground;T&&(E+=` .monaco-scrollable-element > .scrollbar > .slider { background: ${T}; } `);const R=m.scrollbarSliderHoverBackground;R&&(E+=` .monaco-scrollable-element > .scrollbar > .slider:hover { background: ${R}; } `);const O=m.scrollbarSliderActiveBackground;O&&(E+=` .monaco-scrollable-element > .scrollbar > .slider.active { background: ${O}; } `)}return E}}),define(ne[1218],re([1,0,77,10,91,137,129,545,36,15,11,33,6,97,2,14,29,13,1209,989]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenuBar=void 0;const p=f.$;var u;(function(n){n[n.HIDDEN=0]="HIDDEN",n[n.VISIBLE=1]="VISIBLE",n[n.FOCUSED=2]="FOCUSED",n[n.OPEN=3]="OPEN"})(u||(u={}));class a extends i.Disposable{constructor(h,g={}){super();this.container=h,this.options=g,this._mnemonicsInUse=!1,this.openedViaKeyboard=!1,this.awaitingAltRelease=!1,this.ignoreNextMouseUp=!1,this.updatePending=!1,this.numMenusShown=0,this.overflowLayoutScheduled=void 0,this.container.setAttribute("role","menubar"),this.isCompact&&this.container.classList.add("compact"),this.menus=[],this.mnemonics=new Map,this._focusState=u.VISIBLE,this._onVisibilityChange=this._register(new o.Emitter),this._onFocusStateChange=this._register(new o.Emitter),this.createOverflowMenu(),this.menuUpdater=this._register(new v.RunOnceScheduler(()=>this.update(),200)),this.actionRunner=this.options.actionRunner??this._register(new I.ActionRunner),this._register(this.actionRunner.onBeforeRun(()=>{this.setUnfocusedState()})),this._register(f.ModifierKeyEmitter.getInstance().event(this.onModifierKeyToggled,this)),this._register(f.addDisposableListener(this.container,f.EventType.KEY_DOWN,d=>{let m=new _.StandardKeyboardEvent(d),b=!0;const E=d.key?d.key.toLocaleLowerCase():"",y=S.isMacintosh&&!this.isCompact;if(m.equals(15)||y&&m.equals(2|1024))this.focusPrevious();else if(m.equals(17)||y&&m.equals(2))this.focusNext();else if(m.equals(9)&&this.isFocused&&!this.isOpen)this.setUnfocusedState();else if(!this.isOpen&&!m.ctrlKey&&this.options.enableMnemonics&&this.mnemonicsInUse&&this.mnemonics.has(E)){const T=this.mnemonics.get(E);this.onMenuTriggered(T,!1)}else b=!1;!this.isCompact&&(m.equals(2|1024)||m.equals(2))&&m.preventDefault(),b&&(m.preventDefault(),m.stopPropagation())})),this._register(f.addDisposableListener(window,f.EventType.MOUSE_DOWN,()=>{this.isFocused&&this.setUnfocusedState()})),this._register(f.addDisposableListener(this.container,f.EventType.FOCUS_IN,d=>{let m=d;m.relatedTarget&&(this.container.contains(m.relatedTarget)||(this.focusToReturn=m.relatedTarget))})),this._register(f.addDisposableListener(this.container,f.EventType.FOCUS_OUT,d=>{let m=d;m.relatedTarget?m.relatedTarget&&!this.container.contains(m.relatedTarget)&&(this.focusToReturn=void 0,this.setUnfocusedState()):this.setUnfocusedState()})),this._register(f.addDisposableListener(window,f.EventType.KEY_DOWN,d=>{if(!this.options.enableMnemonics||!d.altKey||d.ctrlKey||d.defaultPrevented)return;const m=d.key.toLocaleLowerCase();if(!this.mnemonics.has(m))return;this.mnemonicsInUse=!0,this.updateMnemonicVisibility(!0);const b=this.mnemonics.get(m);this.onMenuTriggered(b,!1)})),this.setUnfocusedState()}push(h){(0,w.asArray)(h).forEach(d=>{const m=this.menus.length,b=(0,D.cleanMnemonic)(d.label);let E=D.MENU_MNEMONIC_REGEX.exec(d.label);if(E){let y=E[1]?E[1]:E[3];this.registerMnemonic(this.menus.length,y)}if(this.isCompact)this.menus.push(d);else{const y=p("div.menubar-menu-button",{role:"menuitem",tabindex:-1,"aria-label":b,"aria-haspopup":!0}),T=p("div.menubar-menu-title",{role:"none","aria-hidden":!0});y.appendChild(T),this.container.insertBefore(y,this.overflowMenu.buttonElement),this.updateLabels(T,y,d.label),this._register(f.addDisposableListener(y,f.EventType.KEY_UP,R=>{let O=new _.StandardKeyboardEvent(R),x=!0;(O.equals(18)||O.equals(3))&&!this.isOpen?(this.focusedMenu={index:m},this.openedViaKeyboard=!0,this.focusState=u.OPEN):x=!1,x&&(O.preventDefault(),O.stopPropagation())})),this._register(k.Gesture.addTarget(y)),this._register(f.addDisposableListener(y,k.EventType.Tap,R=>{this.isOpen&&this.focusedMenu&&this.focusedMenu.holder&&f.isAncestor(R.initialTarget,this.focusedMenu.holder)||(this.ignoreNextMouseUp=!1,this.onMenuTriggered(m,!0),R.preventDefault(),R.stopPropagation())})),this._register(f.addDisposableListener(y,f.EventType.MOUSE_DOWN,R=>{if(!new A.StandardMouseEvent(R).leftButton){R.preventDefault();return}this.isOpen?this.ignoreNextMouseUp=!1:(this.ignoreNextMouseUp=!0,this.onMenuTriggered(m,!0)),R.preventDefault(),R.stopPropagation()})),this._register(f.addDisposableListener(y,f.EventType.MOUSE_UP,R=>{R.defaultPrevented||(this.ignoreNextMouseUp?this.ignoreNextMouseUp=!1:this.isFocused&&this.onMenuTriggered(m,!0))})),this._register(f.addDisposableListener(y,f.EventType.MOUSE_ENTER,()=>{this.isOpen&&!this.isCurrentMenu(m)?(y.focus(),this.cleanupCustomMenu(),this.showCustomMenu(m,!1)):this.isFocused&&!this.isOpen&&(this.focusedMenu={index:m},y.focus())})),this.menus.push({label:d.label,actions:d.actions,buttonElement:y,titleElement:T})}})}createOverflowMenu(){const h=this.isCompact?r.localize(0,null):r.localize(1,null),g=this.isCompact?h:void 0,d=p("div.menubar-menu-button",{role:"menuitem",tabindex:this.isCompact?0:-1,"aria-label":h,title:g,"aria-haspopup":!0}),m=p("div.menubar-menu-title.toolbar-toggle-more"+C.Codicon.menuBarMore.cssSelector,{role:"none","aria-hidden":!0});d.appendChild(m),this.container.appendChild(d),d.style.visibility="hidden",this._register(f.addDisposableListener(d,f.EventType.KEY_UP,b=>{let E=new _.StandardKeyboardEvent(b),y=!0;const T=[3];this.isCompact?(T.push(10),T.push(this.options.compactMode===D.Direction.Right?17:15)):T.push(18),T.some(R=>E.equals(R))&&!this.isOpen?(this.focusedMenu={index:a.OVERFLOW_INDEX},this.openedViaKeyboard=!0,this.focusState=u.OPEN):y=!1,y&&(E.preventDefault(),E.stopPropagation())})),this._register(k.Gesture.addTarget(d)),this._register(f.addDisposableListener(d,k.EventType.Tap,b=>{this.isOpen&&this.focusedMenu&&this.focusedMenu.holder&&f.isAncestor(b.initialTarget,this.focusedMenu.holder)||(this.ignoreNextMouseUp=!1,this.onMenuTriggered(a.OVERFLOW_INDEX,!0),b.preventDefault(),b.stopPropagation())})),this._register(f.addDisposableListener(d,f.EventType.MOUSE_DOWN,b=>{if(!new A.StandardMouseEvent(b).leftButton){b.preventDefault();return}this.isOpen?this.ignoreNextMouseUp=!1:(this.ignoreNextMouseUp=!0,this.onMenuTriggered(a.OVERFLOW_INDEX,!0)),b.preventDefault(),b.stopPropagation()})),this._register(f.addDisposableListener(d,f.EventType.MOUSE_UP,b=>{b.defaultPrevented||(this.ignoreNextMouseUp?this.ignoreNextMouseUp=!1:this.isFocused&&this.onMenuTriggered(a.OVERFLOW_INDEX,!0))})),this._register(f.addDisposableListener(d,f.EventType.MOUSE_ENTER,()=>{this.isOpen&&!this.isCurrentMenu(a.OVERFLOW_INDEX)?(this.overflowMenu.buttonElement.focus(),this.cleanupCustomMenu(),this.showCustomMenu(a.OVERFLOW_INDEX,!1)):this.isFocused&&!this.isOpen&&(this.focusedMenu={index:a.OVERFLOW_INDEX},d.focus())})),this.overflowMenu={buttonElement:d,titleElement:m,label:"More",actions:[]}}updateMenu(h){const g=this.menus.filter(d=>d.label===h.label);g&&g.length&&(g[0].actions=h.actions)}dispose(){super.dispose(),this.menus.forEach(h=>{h.titleElement?.remove(),h.buttonElement?.remove()}),this.overflowMenu.titleElement.remove(),this.overflowMenu.buttonElement.remove(),(0,i.dispose)(this.overflowLayoutScheduled),this.overflowLayoutScheduled=void 0}blur(){this.setUnfocusedState()}getWidth(){if(!this.isCompact&&this.menus){const h=this.menus[0].buttonElement.getBoundingClientRect().left;return(this.hasOverflow?this.overflowMenu.buttonElement.getBoundingClientRect().right:this.menus[this.menus.length-1].buttonElement.getBoundingClientRect().right)-h}return 0}getHeight(){return this.container.clientHeight}toggleFocus(){!this.isFocused&&this.options.visibility!=="hidden"?(this.mnemonicsInUse=!0,this.focusedMenu={index:this.numMenusShown>0?0:a.OVERFLOW_INDEX},this.focusState=u.FOCUSED):this.isOpen||this.setUnfocusedState()}updateOverflowAction(){if(!this.menus||!this.menus.length)return;const h=this.container.offsetWidth;let g=0,d=this.isCompact;const m=this.numMenusShown;this.numMenusShown=0;const b=this.menus.filter(E=>E.buttonElement!==void 0&&E.titleElement!==void 0);for(let E of b){if(!d){const y=E.buttonElement.offsetWidth;g+y>h?d=!0:(g+=y,this.numMenusShown++,this.numMenusShown>m&&(E.buttonElement.style.visibility="visible"))}d&&(E.buttonElement.style.visibility="hidden")}if(this.isCompact){this.overflowMenu.actions=[];for(let y=this.numMenusShown;y<this.menus.length;y++)this.overflowMenu.actions.push(new I.SubmenuAction(`menubar.submenu.${this.menus[y].label}`,this.menus[y].label,this.menus[y].actions||[]));const E=this.options.getCompactMenuActions?.();E&&E.length&&(this.overflowMenu.actions.push(new I.Separator),this.overflowMenu.actions.push(...E)),this.overflowMenu.buttonElement.style.visibility="visible"}else if(d){for(;g+this.overflowMenu.buttonElement.offsetWidth>h&&this.numMenusShown>0;){this.numMenusShown--;const E=b[this.numMenusShown].buttonElement.offsetWidth;b[this.numMenusShown].buttonElement.style.visibility="hidden",g-=E}this.overflowMenu.actions=[];for(let E=this.numMenusShown;E<b.length;E++)this.overflowMenu.actions.push(new I.SubmenuAction(`menubar.submenu.${b[E].label}`,b[E].label,b[E].actions||[]));this.overflowMenu.buttonElement.nextElementSibling!==b[this.numMenusShown].buttonElement&&(this.overflowMenu.buttonElement.remove(),this.container.insertBefore(this.overflowMenu.buttonElement,b[this.numMenusShown].buttonElement)),this.overflowMenu.buttonElement.style.visibility="visible"}else this.overflowMenu.buttonElement.remove(),this.container.appendChild(this.overflowMenu.buttonElement),this.overflowMenu.buttonElement.style.visibility="hidden"}updateLabels(h,g,d){const m=(0,D.cleanMnemonic)(d);if(this.options.enableMnemonics){let E=s.escape(d);D.MENU_ESCAPED_MNEMONIC_REGEX.lastIndex=0;let y=D.MENU_ESCAPED_MNEMONIC_REGEX.exec(E);for(;y&&y[1];)y=D.MENU_ESCAPED_MNEMONIC_REGEX.exec(E);const T=R=>R.replace(/&&/g,"&");y?(h.innerText="",h.append(s.ltrim(T(E.substr(0,y.index))," "),p("mnemonic",{"aria-hidden":"true"},y[3]),s.rtrim(T(E.substr(y.index+y[0].length))," "))):h.innerText=T(E).trim()}else h.innerText=m.replace(/&&/g,"&");let b=D.MENU_MNEMONIC_REGEX.exec(d);if(b){let E=b[1]?b[1]:b[3];this.options.enableMnemonics?g.setAttribute("aria-keyshortcuts","Alt+"+E.toLocaleLowerCase()):g.removeAttribute("aria-keyshortcuts")}}style(h){this.menuStyle=h}update(h){if(h&&(this.options=h),this.isFocused){this.updatePending=!0;return}this.menus.forEach(g=>{!g.buttonElement||!g.titleElement||this.updateLabels(g.titleElement,g.buttonElement,g.label)}),this.overflowLayoutScheduled||(this.overflowLayoutScheduled=f.scheduleAtNextAnimationFrame(()=>{this.updateOverflowAction(),this.overflowLayoutScheduled=void 0})),this.setUnfocusedState()}registerMnemonic(h,g){this.mnemonics.set(g.toLocaleLowerCase(),h)}hideMenubar(){this.container.style.display!=="none"&&(this.container.style.display="none",this._onVisibilityChange.fire(!1))}showMenubar(){this.container.style.display!=="flex"&&(this.container.style.display="flex",this._onVisibilityChange.fire(!0),this.updateOverflowAction())}get focusState(){return this._focusState}set focusState(h){if(this._focusState>=u.FOCUSED&&h<u.FOCUSED&&this.updatePending&&(this.menuUpdater.schedule(),this.updatePending=!1),h===this._focusState)return;const g=this.isVisible,d=this.isOpen,m=this.isFocused;switch(this._focusState=h,h){case u.HIDDEN:g&&this.hideMenubar(),d&&this.cleanupCustomMenu(),m&&(this.focusedMenu=void 0,this.focusToReturn&&(this.focusToReturn.focus(),this.focusToReturn=void 0));break;case u.VISIBLE:g||this.showMenubar(),d&&this.cleanupCustomMenu(),m&&(this.focusedMenu&&(this.focusedMenu.index===a.OVERFLOW_INDEX?this.overflowMenu.buttonElement.blur():this.menus[this.focusedMenu.index].buttonElement?.blur()),this.focusedMenu=void 0,this.focusToReturn&&(this.focusToReturn.focus(),this.focusToReturn=void 0));break;case u.FOCUSED:g||this.showMenubar(),d&&this.cleanupCustomMenu(),this.focusedMenu&&(this.focusedMenu.index===a.OVERFLOW_INDEX?this.overflowMenu.buttonElement.focus():this.menus[this.focusedMenu.index].buttonElement?.focus());break;case u.OPEN:g||this.showMenubar(),this.focusedMenu&&this.showCustomMenu(this.focusedMenu.index,this.openedViaKeyboard);break}this._focusState=h,this._onFocusStateChange.fire(this.focusState>=u.FOCUSED)}get isVisible(){return this.focusState>=u.VISIBLE}get isFocused(){return this.focusState>=u.FOCUSED}get isOpen(){return this.focusState>=u.OPEN}get hasOverflow(){return this.isCompact||this.numMenusShown<this.menus.length}get isCompact(){return this.options.compactMode!==void 0}setUnfocusedState(){this.options.visibility==="toggle"||this.options.visibility==="hidden"?this.focusState=u.HIDDEN:this.options.visibility==="classic"&&t.isFullscreen()?this.focusState=u.HIDDEN:this.focusState=u.VISIBLE,this.ignoreNextMouseUp=!1,this.mnemonicsInUse=!1,this.updateMnemonicVisibility(!1)}focusPrevious(){if(!this.focusedMenu||this.numMenusShown===0)return;let h=(this.focusedMenu.index-1+this.numMenusShown)%this.numMenusShown;this.focusedMenu.index===a.OVERFLOW_INDEX?h=this.numMenusShown-1:this.focusedMenu.index===0&&this.hasOverflow&&(h=a.OVERFLOW_INDEX),h!==this.focusedMenu.index&&(this.isOpen?(this.cleanupCustomMenu(),this.showCustomMenu(h)):this.isFocused&&(this.focusedMenu.index=h,h===a.OVERFLOW_INDEX?this.overflowMenu.buttonElement.focus():this.menus[h].buttonElement?.focus()))}focusNext(){if(!this.focusedMenu||this.numMenusShown===0)return;let h=(this.focusedMenu.index+1)%this.numMenusShown;this.focusedMenu.index===a.OVERFLOW_INDEX?h=0:this.focusedMenu.index===this.numMenusShown-1&&(h=a.OVERFLOW_INDEX),h!==this.focusedMenu.index&&(this.isOpen?(this.cleanupCustomMenu(),this.showCustomMenu(h)):this.isFocused&&(this.focusedMenu.index=h,h===a.OVERFLOW_INDEX?this.overflowMenu.buttonElement.focus():this.menus[h].buttonElement?.focus()))}updateMnemonicVisibility(h){this.menus&&this.menus.forEach(g=>{if(g.titleElement&&g.titleElement.children.length){let d=g.titleElement.children.item(0);d&&(d.style.textDecoration=this.options.alwaysOnMnemonics||h?"underline":"")}})}get mnemonicsInUse(){return this._mnemonicsInUse}set mnemonicsInUse(h){this._mnemonicsInUse=h}get shouldAltKeyFocus(){return S.isMacintosh?!1:!this.options.disableAltFocus||this.options.visibility==="toggle"}get onVisibilityChange(){return this._onVisibilityChange.event}get onFocusStateChange(){return this._onFocusStateChange.event}onMenuTriggered(h,g){this.isOpen?this.isCurrentMenu(h)?this.setUnfocusedState():(this.cleanupCustomMenu(),this.showCustomMenu(h,this.openedViaKeyboard)):(this.focusedMenu={index:h},this.openedViaKeyboard=!g,this.focusState=u.OPEN)}onModifierKeyToggled(h){const g=!h.altKey&&!h.ctrlKey&&!h.shiftKey&&!h.metaKey;this.options.visibility!=="hidden"&&(h.event&&this.shouldAltKeyFocus&&c.ScanCodeUtils.toEnum(h.event.code)===159&&h.event.preventDefault(),this.isFocused&&h.lastKeyPressed==="alt"&&h.altKey&&(this.setUnfocusedState(),this.mnemonicsInUse=!1,this.awaitingAltRelease=!0),g&&h.lastKeyPressed==="alt"&&h.lastKeyReleased==="alt"&&(this.awaitingAltRelease||(!this.isFocused&&this.shouldAltKeyFocus?(this.mnemonicsInUse=!0,this.focusedMenu={index:this.numMenusShown>0?0:a.OVERFLOW_INDEX},this.focusState=u.FOCUSED):this.isOpen||this.setUnfocusedState())),!h.altKey&&h.lastKeyReleased==="alt"&&(this.awaitingAltRelease=!1),this.options.enableMnemonics&&this.menus&&!this.isOpen&&this.updateMnemonicVisibility(!this.awaitingAltRelease&&h.altKey||this.mnemonicsInUse))}isCurrentMenu(h){return this.focusedMenu?this.focusedMenu.index===h:!1}cleanupCustomMenu(){this.focusedMenu&&(this.focusedMenu.index===a.OVERFLOW_INDEX?this.overflowMenu.buttonElement.focus():this.menus[this.focusedMenu.index].buttonElement?.focus(),this.focusedMenu.holder&&(this.focusedMenu.holder.parentElement&&this.focusedMenu.holder.parentElement.classList.remove("open"),this.focusedMenu.holder.remove()),this.focusedMenu.widget&&this.focusedMenu.widget.dispose(),this.focusedMenu={index:this.focusedMenu.index})}showCustomMenu(h,g=!0){const d=h>=this.numMenusShown?a.OVERFLOW_INDEX:h,m=d===a.OVERFLOW_INDEX?this.overflowMenu:this.menus[d];if(!m.actions||!m.buttonElement)return;const b=p("div.menubar-menu-items-holder",{title:""});m.buttonElement.classList.add("open");const E=m.buttonElement.getBoundingClientRect();this.options.compactMode===D.Direction.Right?(b.style.top=`${E.top}px`,b.style.left=`${E.left+this.container.clientWidth}px`):this.options.compactMode===D.Direction.Left?(b.style.top=`${E.top}px`,b.style.right=`${this.container.clientWidth}px`,b.style.left="auto"):(b.style.top=`${E.bottom}px`,b.style.left=`${E.left}px`),m.buttonElement.appendChild(b);let y={getKeyBinding:this.options.getKeybinding,actionRunner:this.actionRunner,enableMnemonics:this.options.alwaysOnMnemonics||this.mnemonicsInUse&&this.options.enableMnemonics,ariaLabel:(0,l.withNullAsUndefined)(m.buttonElement.getAttribute("aria-label")),expandDirection:this.isCompact?this.options.compactMode:D.Direction.Right,useEventAsContext:!0},T=this._register(new D.Menu(b,m.actions,y));this.menuStyle&&T.style(this.menuStyle),this._register(T.onDidCancel(()=>{this.focusState=u.FOCUSED})),d!==h?T.trigger(h-this.numMenusShown):T.focus(g),this.focusedMenu={index:d,holder:b,widget:T}}}e.MenuBar=a,a.OVERFLOW_INDEX=-1}),define(ne[244],re([1,0,134,138,33,66,6,1001]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Checkbox=e.Toggle=e.ToggleActionViewItem=void 0;const D={inputActiveOptionBorder:A.Color.fromHex("#007ACC00"),inputActiveOptionForeground:A.Color.fromHex("#FFFFFF"),inputActiveOptionBackground:A.Color.fromHex("#0E639C50")};class I extends t.BaseActionViewItem{constructor(o,c,i){super(o,c,i);this.toggle=this._register(new w({actionClassName:this._action.class,isChecked:!!this._action.checked,title:this.options.keybinding?`${this._action.label} (${this.options.keybinding})`:this._action.label,notFocusable:!0})),this._register(this.toggle.onChange(()=>this._action.checked=!!this.toggle&&this.toggle.checked))}render(o){this.element=o,this.element.appendChild(this.toggle.domNode)}updateEnabled(){this.toggle&&(this.isEnabled()?this.toggle.enable():this.toggle.disable())}updateChecked(){this.toggle.checked=!!this._action.checked}focus(){this.toggle.domNode.tabIndex=0,this.toggle.focus()}blur(){this.toggle.domNode.tabIndex=-1,this.toggle.domNode.blur()}setFocusable(o){this.toggle.domNode.tabIndex=o?0:-1}}e.ToggleActionViewItem=I;class w extends f.Widget{constructor(o){super();this._onChange=this._register(new k.Emitter),this.onChange=this._onChange.event,this._onKeyDown=this._register(new k.Emitter),this.onKeyDown=this._onKeyDown.event,this._opts={...D,...o},this._checked=this._opts.isChecked;const c=["monaco-custom-toggle"];this._opts.icon&&c.push(..._.CSSIcon.asClassNameArray(this._opts.icon)),this._opts.actionClassName&&c.push(...this._opts.actionClassName.split(" ")),this._checked&&c.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=this._opts.title,this.domNode.classList.add(...c),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,i=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),i.preventDefault())}),this.ignoreGesture(this.domNode),this.onkeydown(this.domNode,i=>{if(i.keyCode===10||i.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),i.preventDefault();return}this._onKeyDown.fire(i)})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(o){this._checked=o,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 2+2+2+16}style(o){o.inputActiveOptionBorder&&(this._opts.inputActiveOptionBorder=o.inputActiveOptionBorder),o.inputActiveOptionForeground&&(this._opts.inputActiveOptionForeground=o.inputActiveOptionForeground),o.inputActiveOptionBackground&&(this._opts.inputActiveOptionBackground=o.inputActiveOptionBackground),this.applyStyles()}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder?this._opts.inputActiveOptionBorder.toString():"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground?this._opts.inputActiveOptionForeground.toString():"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground?this._opts.inputActiveOptionBackground.toString():"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}setTitle(o){this.domNode.title=o,this.domNode.setAttribute("aria-label",o)}}e.Toggle=w;class v extends f.Widget{constructor(o,c){super();this.title=o,this.isChecked=c,this.checkbox=new w({title:this.title,isChecked:this.isChecked,icon:_.Codicon.check,actionClassName:"monaco-checkbox"}),this.domNode=this.checkbox.domNode,this.styles={},this.checkbox.onChange(()=>{this.applyStyles()})}get checked(){return this.checkbox.checked}set checked(o){this.checkbox.checked=o,this.applyStyles()}focus(){this.domNode.focus()}hasFocus(){return this.domNode===document.activeElement}style(o){this.styles=o,this.applyStyles()}applyStyles(){this.domNode.style.color=this.styles.checkboxForeground?this.styles.checkboxForeground.toString():"",this.domNode.style.backgroundColor=this.styles.checkboxBackground?this.styles.checkboxBackground.toString():"",this.domNode.style.borderColor=this.styles.checkboxBorder?this.styles.checkboxBorder.toString():""}}e.Checkbox=v}),define(ne[717],re([1,0,10,91,78,162,244,183,36,33,111,2,14,1202,984]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Dialog=void 0;class i extends C.Disposable{constructor(s,l,r,p){super();this.container=s,this.message=l,this.options=p,this.modalElement=this.container.appendChild((0,t.$)(".monaco-dialog-modal-block.dimmed")),this.shadowElement=this.modalElement.appendChild((0,t.$)(".dialog-shadow")),this.element=this.shadowElement.appendChild((0,t.$)(".monaco-dialog-box")),this.element.setAttribute("role","dialog"),this.element.tabIndex=-1,(0,t.hide)(this.element),Array.isArray(r)&&r.length>0?this.buttons=r:this.options.disableDefaultAction?this.buttons=[]:this.buttons=[c.localize(0,null)];const u=this.element.appendChild((0,t.$)(".dialog-buttons-row"));this.buttonsContainer=u.appendChild((0,t.$)(".dialog-buttons"));const a=this.element.appendChild((0,t.$)(".dialog-message-row"));if(this.iconElement=a.appendChild((0,t.$)("#monaco-dialog-icon.dialog-icon")),this.iconElement.setAttribute("aria-label",this.getIconAriaLabel()),this.messageContainer=a.appendChild((0,t.$)(".dialog-message-container")),this.options.detail||this.options.renderBody){const g=this.messageContainer.appendChild((0,t.$)(".dialog-message")).appendChild((0,t.$)("#monaco-dialog-message-text.dialog-message-text"));g.innerText=this.message}if(this.messageDetailElement=this.messageContainer.appendChild((0,t.$)("#monaco-dialog-message-detail.dialog-message-detail")),this.options.detail||!this.options.renderBody?this.messageDetailElement.innerText=this.options.detail?this.options.detail:l:this.messageDetailElement.style.display="none",this.options.renderBody){const h=this.messageContainer.appendChild((0,t.$)("#monaco-dialog-message-body.dialog-message-body"));this.options.renderBody(h);for(const g of this.messageContainer.querySelectorAll("a"))g.tabIndex=0}if(this.options.inputs?this.inputs=this.options.inputs.map(h=>{const g=this.messageContainer.appendChild((0,t.$)(".dialog-message-input")),d=this._register(new D.InputBox(g,void 0,{placeholder:h.placeholder,type:h.type??"text"}));return h.value&&(d.value=h.value),d}):this.inputs=[],this.options.checkboxLabel){const h=this.messageContainer.appendChild((0,t.$)(".dialog-checkbox-row")),g=this.checkbox=this._register(new k.Checkbox(this.options.checkboxLabel,!!this.options.checkboxChecked));h.appendChild(g.domNode);const d=h.appendChild((0,t.$)(".dialog-checkbox-message"));d.innerText=this.options.checkboxLabel,this._register((0,t.addDisposableListener)(d,t.EventType.CLICK,()=>g.checked=!g.checked))}const n=this.element.appendChild((0,t.$)(".dialog-toolbar-row"));this.toolbarContainer=n.appendChild((0,t.$)(".dialog-toolbar"))}getIconAriaLabel(){let s=c.localize(1,null);switch(this.options.type){case"error":c.localize(2,null);break;case"warning":c.localize(3,null);break;case"pending":c.localize(4,null);break;case"none":case"info":case"question":default:break}return s}updateMessage(s){this.messageDetailElement.innerText=s}async show(){return this.focusToReturn=document.activeElement,new Promise(s=>{(0,t.clearNode)(this.buttonsContainer);const l=this.buttonBar=this._register(new A.ButtonBar(this.buttonsContainer)),r=this.rearrangeButtons(this.buttons,this.options.cancelId);r.forEach((u,a)=>{const n=r[a].index===0,h=this.options.buttonDetails?this._register(l.addButtonWithDescription({title:!0,secondary:!n})):this._register(l.addButton({title:!0,secondary:!n}));h.label=(0,v.mnemonicButtonLabel)(r[a].label,!0),h instanceof A.ButtonWithDescription&&(h.description=this.options.buttonDetails[r[a].index]),this._register(h.onDidClick(g=>{g&&t.EventHelper.stop(g),s({button:r[a].index,checkboxChecked:this.checkbox?this.checkbox.checked:void 0,values:this.inputs.length>0?this.inputs.map(d=>d.value):void 0})}))}),this._register((0,t.addDisposableListener)(window,"keydown",u=>{const a=new f.StandardKeyboardEvent(u);if(a.equals(512)&&a.preventDefault(),a.equals(3)){this.inputs.some(h=>h.hasFocus())&&(t.EventHelper.stop(u),s({button:r.find(h=>h.index!==this.options.cancelId)?.index??0,checkboxChecked:this.checkbox?this.checkbox.checked:void 0,values:this.inputs.length>0?this.inputs.map(h=>h.value):void 0}));return}if(a.equals(10))return;let n=!1;if(a.equals(2)||a.equals(17)||a.equals(1024|2)||a.equals(15)){const h=[];let g=-1;if(this.messageContainer){const d=this.messageContainer.querySelectorAll("a");for(const m of d)h.push(m),m===document.activeElement&&(g=h.length-1)}for(const d of this.inputs)h.push(d),d.hasFocus()&&(g=h.length-1);if(this.checkbox&&(h.push(this.checkbox),this.checkbox.hasFocus()&&(g=h.length-1)),this.buttonBar)for(const d of this.buttonBar.buttons)h.push(d),d.hasFocus()&&(g=h.length-1);if(a.equals(2)||a.equals(17)){g===-1&&(g=0);const d=(g+1)%h.length;h[d].focus()}else{g===-1&&(g=h.length);let d=g-1;d===-1&&(d=h.length-1),h[d].focus()}n=!0}n?t.EventHelper.stop(u,!0):this.options.keyEventProcessor&&this.options.keyEventProcessor(a)},!0)),this._register((0,t.addDisposableListener)(window,"keyup",u=>{t.EventHelper.stop(u,!0);const a=new f.StandardKeyboardEvent(u);!this.options.disableCloseAction&&a.equals(9)&&s({button:this.options.cancelId||0,checkboxChecked:this.checkbox?this.checkbox.checked:void 0})},!0)),this._register((0,t.addDisposableListener)(this.element,"focusout",u=>{!!u.relatedTarget&&!!this.element&&((0,t.isAncestor)(u.relatedTarget,this.element)||(this.focusToReturn=u.relatedTarget,u.target&&(u.target.focus(),t.EventHelper.stop(u,!0))))},!1));const p="codicon-modifier-spin";if(this.iconElement.classList.remove(...w.Codicon.dialogError.classNamesArray,...w.Codicon.dialogWarning.classNamesArray,...w.Codicon.dialogInfo.classNamesArray,...w.Codicon.loading.classNamesArray,p),this.options.icon)this.iconElement.classList.add(...this.options.icon.classNamesArray);else switch(this.options.type){case"error":this.iconElement.classList.add(...w.Codicon.dialogError.classNamesArray);break;case"warning":this.iconElement.classList.add(...w.Codicon.dialogWarning.classNamesArray);break;case"pending":this.iconElement.classList.add(...w.Codicon.loading.classNamesArray,p);break;case"none":case"info":case"question":default:this.iconElement.classList.add(...w.Codicon.dialogInfo.classNamesArray);break}if(!this.options.disableCloseAction){const u=this._register(new _.ActionBar(this.toolbarContainer,{})),a=this._register(new I.Action("dialog.close",c.localize(5,null),w.Codicon.dialogClose.classNames,!0,async()=>{s({button:this.options.cancelId||0,checkboxChecked:this.checkbox?this.checkbox.checked:void 0})}));u.push(a,{icon:!0,label:!1})}this.applyStyles(),this.element.setAttribute("aria-modal","true"),this.element.setAttribute("aria-labelledby","monaco-dialog-icon monaco-dialog-message-text"),this.element.setAttribute("aria-describedby","monaco-dialog-icon monaco-dialog-message-text monaco-dialog-message-detail monaco-dialog-message-body"),(0,t.show)(this.element),this.inputs.length>0?(this.inputs[0].focus(),this.inputs[0].select()):r.forEach((u,a)=>{u.index===0&&l.buttons[a].focus()})})}applyStyles(){if(this.styles){const s=this.styles,l=s.dialogForeground,r=s.dialogBackground,p=s.dialogShadow?`0 0px 8px ${s.dialogShadow}`:"",u=s.dialogBorder?`1px solid ${s.dialogBorder}`:"",a=s.textLinkForeground;if(this.shadowElement.style.boxShadow=p,this.element.style.color=l?.toString()??"",this.element.style.backgroundColor=r?.toString()??"",this.element.style.border=u,this.buttonBar&&this.buttonBar.buttons.forEach(h=>h.style(s)),this.checkbox&&this.checkbox.style(s),l&&r){const h=l.transparent(.9);this.messageDetailElement.style.color=h.makeOpaque(r).toString()}if(a)for(const h of this.messageContainer.getElementsByTagName("a"))h.style.color=a.toString();let n;switch(this.options.type){case"error":n=s.errorIconForeground;break;case"warning":n=s.warningIconForeground;break;default:n=s.infoIconForeground;break}n&&(this.iconElement.style.color=n.toString());for(const h of this.inputs)h.style(s)}}style(s){this.styles=s,this.applyStyles()}dispose(){super.dispose(),this.modalElement&&(this.modalElement.remove(),this.modalElement=void 0),this.focusToReturn&&(0,t.isAncestor)(this.focusToReturn,document.body)&&(this.focusToReturn.focus(),this.focusToReturn=void 0)}rearrangeButtons(s,l){const r=[];if(s.length===0)return r;if(s.forEach((p,u)=>{r.push({label:p,index:u})}),(o.isMacintosh||o.isLinux)&&l!==void 0&&l<s.length){const p=r.splice(l,1)[0];r.reverse(),r.splice(r.length-1,0,p)}return r}}e.Dialog=i}),define(ne[718],re([1,0,244,33,1204]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RegexToggle=e.WholeWordsToggle=e.CaseSensitiveToggle=void 0;const A=_.localize(0,null),k=_.localize(1,null),D=_.localize(2,null);class I extends t.Toggle{constructor(o){super({icon:f.Codicon.caseSensitive,title:A+o.appendTitle,isChecked:o.isChecked,inputActiveOptionBorder:o.inputActiveOptionBorder,inputActiveOptionForeground:o.inputActiveOptionForeground,inputActiveOptionBackground:o.inputActiveOptionBackground})}}e.CaseSensitiveToggle=I;class w extends t.Toggle{constructor(o){super({icon:f.Codicon.wholeWord,title:k+o.appendTitle,isChecked:o.isChecked,inputActiveOptionBorder:o.inputActiveOptionBorder,inputActiveOptionForeground:o.inputActiveOptionForeground,inputActiveOptionBackground:o.inputActiveOptionBackground})}}e.WholeWordsToggle=w;class v extends t.Toggle{constructor(o){super({icon:f.Codicon.regex,title:D+o.appendTitle,isChecked:o.isChecked,inputActiveOptionBorder:o.inputActiveOptionBorder,inputActiveOptionForeground:o.inputActiveOptionForeground,inputActiveOptionBackground:o.inputActiveOptionBackground})}}e.RegexToggle=v}),define(ne[719],re([1,0,10,718,183,138,6,1203,665]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindInput=void 0;const I=D.localize(0,null);class w extends A.Widget{constructor(C,o,c,i){super();this._showOptionButtons=c,this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this._onDidOptionChange=this._register(new k.Emitter),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new k.Emitter),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new k.Emitter),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new k.Emitter),this.onInput=this._onInput.event,this._onKeyUp=this._register(new k.Emitter),this.onKeyUp=this._onKeyUp.event,this._onCaseSensitiveKeyDown=this._register(new k.Emitter),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new k.Emitter),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.contextViewProvider=o,this.placeholder=i.placeholder||"",this.validation=i.validation,this.label=i.label||I,this.inputActiveOptionBorder=i.inputActiveOptionBorder,this.inputActiveOptionForeground=i.inputActiveOptionForeground,this.inputActiveOptionBackground=i.inputActiveOptionBackground,this.inputBackground=i.inputBackground,this.inputForeground=i.inputForeground,this.inputBorder=i.inputBorder,this.inputValidationInfoBorder=i.inputValidationInfoBorder,this.inputValidationInfoBackground=i.inputValidationInfoBackground,this.inputValidationInfoForeground=i.inputValidationInfoForeground,this.inputValidationWarningBorder=i.inputValidationWarningBorder,this.inputValidationWarningBackground=i.inputValidationWarningBackground,this.inputValidationWarningForeground=i.inputValidationWarningForeground,this.inputValidationErrorBorder=i.inputValidationErrorBorder,this.inputValidationErrorBackground=i.inputValidationErrorBackground,this.inputValidationErrorForeground=i.inputValidationErrorForeground;const S=i.appendCaseSensitiveLabel||"",s=i.appendWholeWordsLabel||"",l=i.appendRegexLabel||"",r=i.history||[],p=!!i.flexibleHeight,u=!!i.flexibleWidth,a=i.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new _.HistoryInputBox(this.domNode,this.contextViewProvider,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:r,showHistoryHint:i.showHistoryHint,flexibleHeight:p,flexibleWidth:u,flexibleMaxHeight:a})),this.regex=this._register(new f.RegexToggle({appendTitle:l,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.regex.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(h=>{this._onRegexKeyDown.fire(h)})),this.wholeWords=this._register(new f.WholeWordsToggle({appendTitle:s,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.wholeWords.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new f.CaseSensitiveToggle({appendTitle:S,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.caseSensitive.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(h=>{this._onCaseSensitiveKeyDown.fire(h)})),this._showOptionButtons&&(this.inputBox.paddingRight=this.caseSensitive.width()+this.wholeWords.width()+this.regex.width());let n=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,h=>{if(h.equals(15)||h.equals(17)||h.equals(9)){let g=n.indexOf(document.activeElement);if(g>=0){let d=-1;h.equals(17)?d=(g+1)%n.length:h.equals(15)&&(g===0?d=n.length-1:d=g-1),h.equals(9)?(n[g].blur(),this.inputBox.focus()):d>=0&&n[d].focus(),t.EventHelper.stop(h,!0)}}}),this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this._showOptionButtons?"block":"none",this.controls.appendChild(this.caseSensitive.domNode),this.controls.appendChild(this.wholeWords.domNode),this.controls.appendChild(this.regex.domNode),this.domNode.appendChild(this.controls),C&&C.appendChild(this.domNode),this._register(t.addDisposableListener(this.inputBox.inputElement,"compositionstart",h=>{this.imeSessionInProgress=!0})),this._register(t.addDisposableListener(this.inputBox.inputElement,"compositionend",h=>{this.imeSessionInProgress=!1,this._onInput.fire()})),this.onkeydown(this.inputBox.inputElement,h=>this._onKeyDown.fire(h)),this.onkeyup(this.inputBox.inputElement,h=>this._onKeyUp.fire(h)),this.oninput(this.inputBox.inputElement,h=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,h=>this._onMouseDown.fire(h))}get isImeSessionInProgress(){return this.imeSessionInProgress}get onDidChange(){return this.inputBox.onDidChange}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.regex.disable(),this.wholeWords.disable(),this.caseSensitive.disable()}setFocusInputOnOptionClick(C){this.fixFocusOnOptionClickEnabled=C}setEnabled(C){C?this.enable():this.disable()}clear(){this.clearValidation(),this.setValue(""),this.focus()}getValue(){return this.inputBox.value}setValue(C){this.inputBox.value!==C&&(this.inputBox.value=C)}onSearchSubmit(){this.inputBox.addToHistory()}style(C){this.inputActiveOptionBorder=C.inputActiveOptionBorder,this.inputActiveOptionForeground=C.inputActiveOptionForeground,this.inputActiveOptionBackground=C.inputActiveOptionBackground,this.inputBackground=C.inputBackground,this.inputForeground=C.inputForeground,this.inputBorder=C.inputBorder,this.inputValidationInfoBackground=C.inputValidationInfoBackground,this.inputValidationInfoForeground=C.inputValidationInfoForeground,this.inputValidationInfoBorder=C.inputValidationInfoBorder,this.inputValidationWarningBackground=C.inputValidationWarningBackground,this.inputValidationWarningForeground=C.inputValidationWarningForeground,this.inputValidationWarningBorder=C.inputValidationWarningBorder,this.inputValidationErrorBackground=C.inputValidationErrorBackground,this.inputValidationErrorForeground=C.inputValidationErrorForeground,this.inputValidationErrorBorder=C.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const C={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.regex.style(C),this.wholeWords.style(C),this.caseSensitive.style(C);const o={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(o)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){return this.caseSensitive.checked}setCaseSensitive(C){this.caseSensitive.checked=C}getWholeWords(){return this.wholeWords.checked}setWholeWords(C){this.wholeWords.checked=C}getRegex(){return this.regex.checked}setRegex(C){this.regex.checked=C,this.validate()}focusOnCaseSensitive(){this.caseSensitive.focus()}focusOnRegex(){this.regex.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}showMessage(C){this.inputBox.showMessage(C)}clearMessage(){this.inputBox.hideMessage()}clearValidation(){this.inputBox.hideMessage()}}e.FindInput=w,w.OPTION_CHANGE="optionChange"}),define(ne[1219],re([1,0,10,244,183,138,33,6,1205,665]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaceInput=e.PreserveCaseToggle=void 0;const w=I.localize(0,null),v=I.localize(1,null);class C extends f.Toggle{constructor(i){super({icon:k.Codicon.preserveCase,title:v+i.appendTitle,isChecked:i.isChecked,inputActiveOptionBorder:i.inputActiveOptionBorder,inputActiveOptionForeground:i.inputActiveOptionForeground,inputActiveOptionBackground:i.inputActiveOptionBackground})}}e.PreserveCaseToggle=C;class o extends A.Widget{constructor(i,S,s,l){super();this._showOptionButtons=s,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new D.Emitter),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new D.Emitter),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new D.Emitter),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new D.Emitter),this.onInput=this._onInput.event,this._onKeyUp=this._register(new D.Emitter),this.onKeyUp=this._onKeyUp.event,this._onPreserveCaseKeyDown=this._register(new D.Emitter),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this._lastHighlightFindOptions=0,this.contextViewProvider=S,this.placeholder=l.placeholder||"",this.validation=l.validation,this.label=l.label||w,this.inputActiveOptionBorder=l.inputActiveOptionBorder,this.inputActiveOptionForeground=l.inputActiveOptionForeground,this.inputActiveOptionBackground=l.inputActiveOptionBackground,this.inputBackground=l.inputBackground,this.inputForeground=l.inputForeground,this.inputBorder=l.inputBorder,this.inputValidationInfoBorder=l.inputValidationInfoBorder,this.inputValidationInfoBackground=l.inputValidationInfoBackground,this.inputValidationInfoForeground=l.inputValidationInfoForeground,this.inputValidationWarningBorder=l.inputValidationWarningBorder,this.inputValidationWarningBackground=l.inputValidationWarningBackground,this.inputValidationWarningForeground=l.inputValidationWarningForeground,this.inputValidationErrorBorder=l.inputValidationErrorBorder,this.inputValidationErrorBackground=l.inputValidationErrorBackground,this.inputValidationErrorForeground=l.inputValidationErrorForeground;const r=l.appendPreserveCaseLabel||"",p=l.history||[],u=!!l.flexibleHeight,a=!!l.flexibleWidth,n=l.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new _.HistoryInputBox(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:p,showHistoryHint:l.showHistoryHint,flexibleHeight:u,flexibleWidth:a,flexibleMaxHeight:n})),this.preserveCase=this._register(new C({appendTitle:r,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.preserveCase.onChange(d=>{this._onDidOptionChange.fire(d),!d&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(d=>{this._onPreserveCaseKeyDown.fire(d)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;let h=[this.preserveCase.domNode];this.onkeydown(this.domNode,d=>{if(d.equals(15)||d.equals(17)||d.equals(9)){let m=h.indexOf(document.activeElement);if(m>=0){let b=-1;d.equals(17)?b=(m+1)%h.length:d.equals(15)&&(m===0?b=h.length-1:b=m-1),d.equals(9)?(h[m].blur(),this.inputBox.focus()):b>=0&&h[b].focus(),t.EventHelper.stop(d,!0)}}});let g=document.createElement("div");g.className="controls",g.style.display=this._showOptionButtons?"block":"none",g.appendChild(this.preserveCase.domNode),this.domNode.appendChild(g),i&&i.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,d=>this._onKeyDown.fire(d)),this.onkeyup(this.inputBox.inputElement,d=>this._onKeyUp.fire(d)),this.oninput(this.inputBox.inputElement,d=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,d=>this._onMouseDown.fire(d))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setFocusInputOnOptionClick(i){this.fixFocusOnOptionClickEnabled=i}setEnabled(i){i?this.enable():this.disable()}clear(){this.clearValidation(),this.setValue(""),this.focus()}getValue(){return this.inputBox.value}setValue(i){this.inputBox.value!==i&&(this.inputBox.value=i)}onSearchSubmit(){this.inputBox.addToHistory()}style(i){this.inputActiveOptionBorder=i.inputActiveOptionBorder,this.inputActiveOptionForeground=i.inputActiveOptionForeground,this.inputActiveOptionBackground=i.inputActiveOptionBackground,this.inputBackground=i.inputBackground,this.inputForeground=i.inputForeground,this.inputBorder=i.inputBorder,this.inputValidationInfoBackground=i.inputValidationInfoBackground,this.inputValidationInfoForeground=i.inputValidationInfoForeground,this.inputValidationInfoBorder=i.inputValidationInfoBorder,this.inputValidationWarningBackground=i.inputValidationWarningBackground,this.inputValidationWarningForeground=i.inputValidationWarningForeground,this.inputValidationWarningBorder=i.inputValidationWarningBorder,this.inputValidationErrorBackground=i.inputValidationErrorBackground,this.inputValidationErrorForeground=i.inputValidationErrorForeground,this.inputValidationErrorBorder=i.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const i={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.preserveCase.style(i);const S={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(S)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(i){this.preserveCase.checked=i}focusOnPreserve(){this.preserveCase.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox&&this.inputBox.validate()}showMessage(i){this.inputBox&&this.inputBox.showMessage(i)}clearMessage(){this.inputBox&&this.inputBox.hideMessage()}clearValidation(){this.inputBox&&this.inputBox.hideMessage()}set width(i){this.inputBox.paddingRight=this.cachedOptionsWidth,this.inputBox.width=i,this.domNode.style.width=i+"px"}dispose(){super.dispose()}}e.ReplaceInput=o,o.OPTION_CHANGE="optionChange"}),define(ne[163],re([1,0,78,262,36,33,6,2,13,1213,1002]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleMenuAction=e.ToolBar=void 0;class v extends D.Disposable{constructor(c,i,S={orientation:0}){super();this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new k.EventMultiplexer),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=new D.DisposableStore,this.options=S,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new C(()=>this.toggleMenuActionViewItem?.show(),S.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",c.appendChild(this.element),this.actionBar=this._register(new t.ActionBar(this.element,{orientation:S.orientation,ariaLabel:S.ariaLabel,actionRunner:S.actionRunner,actionViewItemProvider:s=>{if(s.id===C.ID)return this.toggleMenuActionViewItem=new f.DropdownMenuActionViewItem(s,s.menuActions,i,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:A.CSSIcon.asClassNameArray(S.moreIcon??A.Codicon.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(S.actionViewItemProvider){const l=S.actionViewItemProvider(s);if(l)return l}if(s instanceof _.SubmenuAction){const l=new f.DropdownMenuActionViewItem(s,s.actions,i,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:s.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement});return l.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(l),this.disposables.add(this._onDidChangeDropdownVisibility.add(l.onDidChangeVisibility)),l}}}))}set actionRunner(c){this.actionBar.actionRunner=c}get actionRunner(){return this.actionBar.actionRunner}set context(c){this.actionBar.context=c,this.toggleMenuActionViewItem&&this.toggleMenuActionViewItem.setActionContext(c);for(const i of this.submenuActionViewItems)i.setActionContext(c)}getElement(){return this.element}getItemsWidth(){let c=0;for(let i=0;i<this.actionBar.length();i++)c+=this.actionBar.getWidth(i);return c}getItemAction(c){return this.actionBar.getAction(c)}getItemWidth(c){return this.actionBar.getWidth(c)}getItemsLength(){return this.actionBar.length()}setAriaLabel(c){this.actionBar.setAriaLabel(c)}setActions(c,i){this.clear();let S=c?c.slice(0):[];this.hasSecondaryActions=!!(i&&i.length>0),this.hasSecondaryActions&&i&&(this.toggleMenuAction.menuActions=i.slice(0),S.push(this.toggleMenuAction)),S.forEach(s=>{this.actionBar.push(s,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(s)})})}getKeybindingLabel(c){const i=this.lookupKeybindings?this.options.getKeyBinding?.(c):void 0;return(0,I.withNullAsUndefined)(i?.getLabel())}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),super.dispose()}}e.ToolBar=v;class C extends _.Action{constructor(c,i){i=i||w.localize(0,null);super(C.ID,i,void 0,!0);this._menuActions=[],this.toggleDropdownMenu=c}async run(){this.toggleDropdownMenu()}get menuActions(){return this._menuActions}set menuActions(c){this._menuActions=c}}e.ToggleMenuAction=C,C.ID="toolbar.toggle.more"}),define(ne[1220],re([1,0,36,1215]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CollapseAllAction=void 0;class _ extends t.Action{constructor(k,D){super("vs.tree.collapse",f.localize(0,null),"collapse-all",D);this.viewer=k}async run(){this.viewer.collapseAll(),this.viewer.setSelection([]),this.viewer.setFocus([])}}e.CollapseAllAction=_}),define(ne[1221],re([1,0,10,91,137,183,2,81,450]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputBox=void 0;const I=t.$;class w extends k.Disposable{constructor(C){super();this.parent=C,this.onKeyDown=o=>t.addDisposableListener(this.inputBox.inputElement,t.EventType.KEY_DOWN,c=>{o(new f.StandardKeyboardEvent(c))}),this.onMouseDown=o=>t.addDisposableListener(this.inputBox.inputElement,t.EventType.MOUSE_DOWN,c=>{o(new _.StandardMouseEvent(c))}),this.onDidChange=o=>this.inputBox.onDidChange(o),this.container=t.append(this.parent,I(".quick-input-box")),this.inputBox=this._register(new A.InputBox(this.container,void 0))}get value(){return this.inputBox.value}set value(C){this.inputBox.value=C}select(C=null){this.inputBox.select(C)}isSelectionAtEnd(){return this.inputBox.isSelectionAtEnd()}setPlaceholder(C){this.inputBox.setPlaceHolder(C)}get placeholder(){return this.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(C){this.inputBox.setPlaceHolder(C)}get ariaLabel(){return this.inputBox.getAriaLabel()}set ariaLabel(C){this.inputBox.setAriaLabel(C)}get password(){return this.inputBox.inputElement.type==="password"}set password(C){this.inputBox.inputElement.type=C?"password":"text"}set enabled(C){this.inputBox.setEnabled(C)}hasFocus(){return this.inputBox.hasFocus()}setAttribute(C,o){this.inputBox.inputElement.setAttribute(C,o)}removeAttribute(C){this.inputBox.inputElement.removeAttribute(C)}showDecoration(C){C===D.default.Ignore?this.inputBox.hideMessage():this.inputBox.showMessage({type:C===D.default.Info?1:C===D.default.Warning?2:3,content:""})}stylesForType(C){return this.inputBox.stylesForType(C===D.default.Info?1:C===D.default.Warning?2:3)}setFocus(){this.inputBox.focus()}layout(){this.inputBox.layout()}style(C){this.inputBox.style(C)}}e.QuickInputBox=w}),define(ne[1222],re([3,4]),function(Q,e){return Q.create("vs/base/common/date",e)}),define(ne[197],re([1,0,1222]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toLocalISOString=e.fromNow=void 0;const f=60,_=f*60,A=_*24,k=A*7,D=A*30,I=A*365;function w(C,o,c){typeof C!="number"&&(C=C.getTime());const i=Math.round((new Date().getTime()-C)/1e3);if(i<-30)return(0,t.localize)(0,null,w(new Date().getTime()+i*1e3,!1));if(i<30)return(0,t.localize)(1,null);let S;return i<f?(S=i,o?S===1?c?(0,t.localize)(2,null,S):(0,t.localize)(3,null,S):c?(0,t.localize)(4,null,S):(0,t.localize)(5,null,S):S===1?c?(0,t.localize)(6,null,S):(0,t.localize)(7,null,S):c?(0,t.localize)(8,null,S):(0,t.localize)(9,null,S)):i<_?(S=Math.floor(i/f),o?S===1?c?(0,t.localize)(10,null,S):(0,t.localize)(11,null,S):c?(0,t.localize)(12,null,S):(0,t.localize)(13,null,S):S===1?c?(0,t.localize)(14,null,S):(0,t.localize)(15,null,S):c?(0,t.localize)(16,null,S):(0,t.localize)(17,null,S)):i<A?(S=Math.floor(i/_),o?S===1?c?(0,t.localize)(18,null,S):(0,t.localize)(19,null,S):c?(0,t.localize)(20,null,S):(0,t.localize)(21,null,S):S===1?c?(0,t.localize)(22,null,S):(0,t.localize)(23,null,S):c?(0,t.localize)(24,null,S):(0,t.localize)(25,null,S)):i<k?(S=Math.floor(i/A),o?S===1?(0,t.localize)(26,null,S):(0,t.localize)(27,null,S):S===1?(0,t.localize)(28,null,S):(0,t.localize)(29,null,S)):i<D?(S=Math.floor(i/k),o?S===1?c?(0,t.localize)(30,null,S):(0,t.localize)(31,null,S):c?(0,t.localize)(32,null,S):(0,t.localize)(33,null,S):S===1?c?(0,t.localize)(34,null,S):(0,t.localize)(35,null,S):c?(0,t.localize)(36,null,S):(0,t.localize)(37,null,S)):i<I?(S=Math.floor(i/D),o?S===1?c?(0,t.localize)(38,null,S):(0,t.localize)(39,null,S):c?(0,t.localize)(40,null,S):(0,t.localize)(41,null,S):S===1?c?(0,t.localize)(42,null,S):(0,t.localize)(43,null,S):c?(0,t.localize)(44,null,S):(0,t.localize)(45,null,S)):(S=Math.floor(i/I),o?S===1?c?(0,t.localize)(46,null,S):(0,t.localize)(47,null,S):c?(0,t.localize)(48,null,S):(0,t.localize)(49,null,S):S===1?c?(0,t.localize)(50,null,S):(0,t.localize)(51,null,S):c?(0,t.localize)(52,null,S):(0,t.localize)(53,null,S))}e.fromNow=w;function v(C){return C.getFullYear()+"-"+String(C.getMonth()+1).padStart(2,"0")+"-"+String(C.getDate()).padStart(2,"0")+"T"+String(C.getHours()).padStart(2,"0")+":"+String(C.getMinutes()).padStart(2,"0")+":"+String(C.getSeconds()).padStart(2,"0")+"."+(C.getMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"}e.toLocalISOString=v}),define(ne[1223],re([3,4]),function(Q,e){return Q.create("vs/base/common/errorMessage",e)}),define(ne[130],re([1,0,15,13,1223]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createErrorWithActions=e.isErrorWithActions=e.toErrorMessage=void 0;function A(C,o){return o&&(C.stack||C.stacktrace)?_.localize(0,null,D(C),k(C.stack)||k(C.stacktrace)):D(C)}function k(C){return Array.isArray(C)?C.join(` `):C}function D(C){return typeof C.code=="string"&&typeof C.errno=="number"&&typeof C.syscall=="string"?_.localize(1,null,C.message):C.message||_.localize(2,null)}function I(C=null,o=!1){if(!C)return _.localize(3,null);if(Array.isArray(C)){const c=t.coalesce(C),i=I(c[0],o);return c.length>1?_.localize(4,null,i,c.length):i}if(f.isString(C))return C;if(C.detail){const c=C.detail;if(c.error)return A(c.error,o);if(c.exception)return A(c.exception,o)}return C.stack?A(C,o):C.message?C.message:_.localize(5,null)}e.toErrorMessage=I;function w(C){const o=C;return o instanceof Error&&Array.isArray(o.actions)}e.isErrorWithActions=w;function v(C,o=Object.create(null)){const c=new Error(C);return o.actions&&(c.actions=o.actions),c}e.createErrorWithActions=v}),define(ne[1224],re([3,4]),function(Q,e){return Q.create("vs/base/common/jsonErrorMessages",e)}),define(ne[391],re([1,0,1224]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getParseErrorMessage=void 0;function f(_){switch(_){case 1:return(0,t.localize)(0,null);case 2:return(0,t.localize)(1,null);case 3:return(0,t.localize)(2,null);case 4:return(0,t.localize)(3,null);case 5:return(0,t.localize)(4,null);case 6:return(0,t.localize)(5,null);case 7:return(0,t.localize)(6,null);case 8:return(0,t.localize)(7,null);case 9:return(0,t.localize)(8,null);default:return""}}e.getParseErrorMessage=f}),define(ne[1225],re([3,4]),function(Q,e){return Q.create("vs/base/common/keybindingLabels",e)}),define(ne[309],re([1,0,1225]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserSettingsLabelProvider=e.ElectronAcceleratorLabelProvider=e.AriaLabelProvider=e.UILabelProvider=e.ModifierLabelProvider=void 0;class f{constructor(k,D,I=D){this.modifierLabels=[null],this.modifierLabels[2]=k,this.modifierLabels[1]=D,this.modifierLabels[3]=I}toLabel(k,D,I){if(D.length===0)return null;const w=[];for(let v=0,C=D.length;v<C;v++){const o=D[v],c=I(o);if(c===null)return null;w[v]=_(o,c,this.modifierLabels[k])}return w.join(" ")}}e.ModifierLabelProvider=f,e.UILabelProvider=new f({ctrlKey:"\u2303",shiftKey:"\u21E7",altKey:"\u2325",metaKey:"\u2318",separator:""},{ctrlKey:t.localize(0,null),shiftKey:t.localize(1,null),altKey:t.localize(2,null),metaKey:t.localize(3,null),separator:"+"},{ctrlKey:t.localize(4,null),shiftKey:t.localize(5,null),altKey:t.localize(6,null),metaKey:t.localize(7,null),separator:"+"}),e.AriaLabelProvider=new f({ctrlKey:t.localize(8,null),shiftKey:t.localize(9,null),altKey:t.localize(10,null),metaKey:t.localize(11,null),separator:"+"},{ctrlKey:t.localize(12,null),shiftKey:t.localize(13,null),altKey:t.localize(14,null),metaKey:t.localize(15,null),separator:"+"},{ctrlKey:t.localize(16,null),shiftKey:t.localize(17,null),altKey:t.localize(18,null),metaKey:t.localize(19,null),separator:"+"}),e.ElectronAcceleratorLabelProvider=new f({ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Cmd",separator:"+"},{ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Super",separator:"+"}),e.UserSettingsLabelProvider=new f({ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"cmd",separator:"+"},{ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"win",separator:"+"},{ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"meta",separator:"+"});function _(A,k,D){if(k===null)return"";const I=[];return A.ctrlKey&&I.push(D.ctrlKey),A.shiftKey&&I.push(D.shiftKey),A.altKey&&I.push(D.altKey),A.metaKey&&I.push(D.metaKey),k!==""&&I.push(k),I.join(D.separator)}}),define(ne[392],re([1,0,10,309,51,1208,988]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingLabel=void 0;const k=t.$;class D{constructor(w,v,C){this.os=v,this.keyElements=new Set,this.options=C||Object.create(null),this.labelBackground=this.options.keybindingLabelBackground,this.labelForeground=this.options.keybindingLabelForeground,this.labelBorder=this.options.keybindingLabelBorder,this.labelBottomBorder=this.options.keybindingLabelBottomBorder,this.labelShadow=this.options.keybindingLabelShadow,this.domNode=t.append(w,k(".monaco-keybinding")),this.didEverRender=!1,w.appendChild(this.domNode)}get element(){return this.domNode}set(w,v){this.didEverRender&&this.keybinding===w&&D.areSame(this.matches,v)||(this.keybinding=w,this.matches=v,this.render())}render(){if(this.clear(),this.keybinding){let[w,v]=this.keybinding.getParts();w&&this.renderPart(this.domNode,w,this.matches?this.matches.firstPart:null),v&&(t.append(this.domNode,k("span.monaco-keybinding-key-chord-separator",void 0," ")),this.renderPart(this.domNode,v,this.matches?this.matches.chordPart:null)),this.domNode.title=this.keybinding.getAriaLabel()||""}else this.options&&this.options.renderUnboundKeybindings&&this.renderUnbound(this.domNode);this.applyStyles(),this.didEverRender=!0}clear(){t.clearNode(this.domNode),this.keyElements.clear()}renderPart(w,v,C){const o=f.UILabelProvider.modifierLabels[this.os];v.ctrlKey&&this.renderKey(w,o.ctrlKey,Boolean(C?.ctrlKey),o.separator),v.shiftKey&&this.renderKey(w,o.shiftKey,Boolean(C?.shiftKey),o.separator),v.altKey&&this.renderKey(w,o.altKey,Boolean(C?.altKey),o.separator),v.metaKey&&this.renderKey(w,o.metaKey,Boolean(C?.metaKey),o.separator);const c=v.keyLabel;c&&this.renderKey(w,c,Boolean(C?.keyCode),"")}renderKey(w,v,C,o){t.append(w,this.createKeyElement(v,C?".highlight":"")),o&&t.append(w,k("span.monaco-keybinding-key-separator",void 0,o))}renderUnbound(w){t.append(w,this.createKeyElement((0,A.localize)(0,null)))}createKeyElement(w,v=""){const C=k("span.monaco-keybinding-key"+v,void 0,w);return this.keyElements.add(C),C}style(w){this.labelBackground=w.keybindingLabelBackground,this.labelForeground=w.keybindingLabelForeground,this.labelBorder=w.keybindingLabelBorder,this.labelBottomBorder=w.keybindingLabelBottomBorder,this.labelShadow=w.keybindingLabelShadow,this.applyStyles()}applyStyles(){if(this.element){for(const w of this.keyElements)this.labelBackground&&(w.style.backgroundColor=this.labelBackground?.toString()),this.labelBorder&&(w.style.borderColor=this.labelBorder.toString()),this.labelBottomBorder&&(w.style.borderBottomColor=this.labelBottomBorder.toString()),this.labelShadow&&(w.style.boxShadow=`inset 0 -1px 0 ${this.labelShadow}`);this.labelForeground&&(this.element.style.color=this.labelForeground.toString())}}static areSame(w,v){return w===v||!w&&!v?!0:!!w&&!!v&&(0,_.equals)(w.firstPart,v.firstPart)&&(0,_.equals)(w.chordPart,v.chordPart)}}e.KeybindingLabel=D}),define(ne[1226],re([3,4]),function(Q,e){return Q.create("vs/base/node/processes",e)}),define(ne[1227],re([1,0,2827,157,18,51,48,14,196,647,13,968,969,1226]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.win32=e.createQueuedSender=e.LineProcess=e.AbstractProcess=e.getWindowsShell=e.removeDangerousEnvVariables=e.TerminateResponseCode=e.Source=void 0,Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return w.Source}}),Object.defineProperty(e,"TerminateResponseCode",{enumerable:!0,get:function(){return w.TerminateResponseCode}});function i(n){switch(n){case 0:return 0;case 1:return 2;case 128:return 3;default:return 1}}function S(n,h){if(D.isWindows)try{const g={stdio:["pipe","pipe","ignore"]};h&&(g.cwd=h);const d=t.execFile("taskkill",["/T","/F","/PID",n.pid.toString()],g);return new Promise(m=>{d.once("error",b=>{m({success:!1,error:b})}),d.once("exit",(b,E)=>{m(b===0?{success:!0}:{success:!1,code:b!==null?b:1})})})}catch(g){return Promise.resolve({success:!1,error:g,code:g.status?i(g.status):1})}else if(D.isLinux||D.isMacintosh)try{const g=_.FileAccess.asFileUri("vs/base/node/terminateProcess.sh",Q).fsPath;return new Promise(d=>{t.execFile(g,[n.pid.toString()],{encoding:"utf8",shell:!0},(m,b,E)=>{d(m?{success:!1,error:m}:{success:!0})})})}catch(g){return Promise.resolve({success:!1,error:g})}else n.kill("SIGKILL");return Promise.resolve({success:!0})}function s(n){!n||(delete n.DEBUG,D.isMacintosh&&delete n.DYLD_LIBRARY_PATH,D.isLinux&&delete n.LD_PRELOAD)}e.removeDangerousEnvVariables=s;function l(n=I.env){return n.comspec||"cmd.exe"}e.getWindowsShell=l;class r{constructor(h,g,d,m){if(g!==void 0&&d!==void 0&&m!==void 0)this.cmd=h,this.args=g,this.shell=d,this.options=m;else{const b=h;this.cmd=b.command,this.shell=b.isShellCommand,this.args=b.args.slice(0),this.options=b.options||{}}if(this.childProcess=null,this.childProcessPromise=null,this.terminateRequested=!1,this.options.env){const b=Object.create(null);Object.keys(I.env).forEach(E=>{b[E]=I.env[E]}),Object.keys(this.options.env).forEach(E=>{b[E]=this.options.env[E]}),this.options.env=b}}getSanitizedCommand(){let h=this.cmd.toLowerCase();const g=h.lastIndexOf(k.sep);return g!==-1&&(h=h.substring(g+1)),r.WellKnowCommands[h]?h:"other"}start(h){return D.isWindows&&(this.options&&this.options.cwd&&f.isUNC(this.options.cwd)||!this.options&&f.isUNC(I.cwd()))?Promise.reject(new Error(c.localize(0,null))):this.useExec().then(g=>{let d,m;const b=new Promise((E,y)=>{d=E,m=y});if(g){let E=this.cmd;this.args&&(E=E+" "+this.args.join(" ")),this.childProcess=t.exec(E,this.options,(y,T,R)=>{this.childProcess=null;const O=y;O&&O.killed?m({killed:this.terminateRequested,stdout:T.toString(),stderr:R.toString()}):this.handleExec(d,h,y,T,R)})}else{let E=null;const y=T=>{this.childProcess=null,this.childProcessPromise=null,this.handleClose(T,d,h,m);const R={terminated:this.terminateRequested};v.isNumber(T)&&(R.cmdCode=T),d(R)};if(this.shell&&D.isWindows){const T=A.deepClone(this.options);T.windowsVerbatimArguments=!0,T.detached=!1;let R=!1,O=!1;const x=[];let F=this.ensureQuotes(this.cmd);x.push(F.value),R=F.quoted,this.args&&this.args.forEach(M=>{F=this.ensureQuotes(M),x.push(F.value),O=O&&F.quoted});const L=["/s","/c"];R?O?L.push('"'+x.join(" ")+'"'):x.length>1?L.push('"'+x[0]+'" '+x.slice(1).join(" ")):L.push('"'+x[0]+'"'):L.push(x.join(" ")),E=t.spawn(l(),L,T)}else this.cmd&&(E=t.spawn(this.cmd,this.args,this.options));E&&(this.childProcess=E,this.childProcessPromise=Promise.resolve(E),this.pidResolve&&(this.pidResolve(v.isNumber(E.pid)?E.pid:-1),this.pidResolve=void 0),E.on("error",T=>{this.childProcess=null,m({terminated:this.terminateRequested,error:T})}),E.pid&&(this.childProcess.on("close",y),this.handleSpawn(E,d,h,m,!0)))}return b})}handleClose(h,g,d,m){}ensureQuotes(h){return r.regexp.test(h)?{value:'"'+h+'"',quoted:!0}:{value:h,quoted:h.length>0&&h[0]==='"'&&h[h.length-1]==='"'}}get pid(){return this.childProcessPromise?this.childProcessPromise.then(h=>h.pid,h=>-1):new Promise(h=>{this.pidResolve=h})}terminate(){return this.childProcessPromise?this.childProcessPromise.then(h=>(this.terminateRequested=!0,S(h,this.options.cwd).then(g=>(g.success&&(this.childProcess=null),g))),h=>({success:!0})):Promise.resolve({success:!0})}useExec(){return new Promise(h=>{if(!this.shell||!D.isWindows)return h(!1);const g=t.spawn(l(),["/s","/c"]);g.on("error",d=>h(!0)),g.on("exit",d=>h(!1))})}}e.AbstractProcess=r,r.WellKnowCommands={ant:!0,cmake:!0,eslint:!0,gradle:!0,grunt:!0,gulp:!0,jake:!0,jenkins:!0,jshint:!0,make:!0,maven:!0,msbuild:!0,msc:!0,nmake:!0,npm:!0,rake:!0,tsc:!0,xbuild:!0},r.regexp=/^[^"].* .*[^"]/;class p extends r{constructor(h,g,d,m){super(h,g,d,m);this.stdoutLineDecoder=null,this.stderrLineDecoder=null}handleExec(h,g,d,m,b){[m,b].forEach((E,y)=>{const T=new C.LineDecoder;T.write(E).forEach(x=>{g({line:x,source:y===0?0:1})});const O=T.end();O&&g({line:O,source:y===0?0:1})}),h({terminated:this.terminateRequested,error:d})}handleSpawn(h,g,d,m,b){const E=new C.LineDecoder,y=new C.LineDecoder;h.stdout.on("data",T=>{E.write(T).forEach(O=>d({line:O,source:0}))}),h.stderr.on("data",T=>{y.write(T).forEach(O=>d({line:O,source:1}))}),this.stdoutLineDecoder=E,this.stderrLineDecoder=y}handleClose(h,g,d,m){const b=this.stdoutLineDecoder?this.stdoutLineDecoder.end():null;b&&d({line:b,source:0});const E=this.stderrLineDecoder?this.stderrLineDecoder.end():null;E&&d({line:E,source:1})}}e.LineProcess=p;function u(n){let h=[],g=!1;const d=function(m){if(g){h.push(m);return}(!n.send(m,E=>{if(E&&console.error(E),g=!1,h.length>0){const y=h.slice(0);h=[],y.forEach(T=>d(T))}})||D.isWindows)&&(g=!0)};return{send:d}}e.createQueuedSender=u;var a;(function(n){async function h(g,d,m){if(k.isAbsolute(g))return g;if(d===void 0&&(d=I.cwd()),k.dirname(g)!=="."||(m===void 0&&v.isString(I.env.PATH)&&(m=I.env.PATH.split(k.delimiter)),m===void 0||m.length===0))return k.join(d,g);async function E(y){if(await o.Promises.exists(y)){let T;try{T=await o.Promises.stat(y)}catch(R){R.message.startsWith("EACCES")&&(T=await o.Promises.lstat(y))}return T?!T.isDirectory():!1}return!1}for(let y of m){let T;if(k.isAbsolute(y)?T=k.join(y,g):T=k.join(d,y,g),await E(T))return T;let R=T+".com";if(await E(R)||(R=T+".exe",await E(R)))return R}return k.join(d,g)}n.findExecutable=h})(a=e.win32||(e.win32={}))}),define(ne[1228],re([3,4]),function(Q,e){return Q.create("vs/base/parts/quickinput/browser/quickInput",e)}),define(ne[1229],re([3,4]),function(Q,e){return Q.create("vs/base/parts/quickinput/browser/quickInputList",e)}),define(ne[1230],re([1,0,10,91,78,234,392,36,15,33,279,110,6,225,2,14,13,672,1229,450]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputList=e.QuickInputListFocus=void 0;const p=t.$;class u{constructor(E){this.hidden=!1,this._onChecked=new o.Emitter,this.onChecked=this._onChecked.event,Object.assign(this,E)}get checked(){return!!this._checked}set checked(E){E!==this._checked&&(this._checked=E,this._onChecked.fire(E))}dispose(){this._onChecked.dispose()}}class a{get templateId(){return a.ID}renderTemplate(E){const y=Object.create(null);y.toDisposeElement=[],y.toDisposeTemplate=[],y.entry=t.append(E,p(".quick-input-list-entry"));const T=t.append(y.entry,p("label.quick-input-list-label"));y.toDisposeTemplate.push(t.addStandardDisposableListener(T,t.EventType.CLICK,M=>{y.checkbox.offsetParent||M.preventDefault()})),y.checkbox=t.append(T,p("input.quick-input-list-checkbox")),y.checkbox.type="checkbox",y.toDisposeTemplate.push(t.addStandardDisposableListener(y.checkbox,t.EventType.CHANGE,M=>{y.element.checked=y.checkbox.checked}));const R=t.append(T,p(".quick-input-list-rows")),O=t.append(R,p(".quick-input-list-row")),x=t.append(R,p(".quick-input-list-row"));y.label=new A.IconLabel(O,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0});const F=t.append(O,p(".quick-input-list-entry-keybinding"));y.keybinding=new k.KeybindingLabel(F,S.OS);const L=t.append(x,p(".quick-input-list-label-meta"));return y.detail=new A.IconLabel(L,{supportHighlights:!0,supportIcons:!0}),y.separator=t.append(y.entry,p(".quick-input-list-separator")),y.actionBar=new _.ActionBar(y.entry),y.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),y.toDisposeTemplate.push(y.actionBar),y}renderElement(E,y,T){T.toDisposeElement=(0,i.dispose)(T.toDisposeElement),T.element=E,T.checkbox.checked=E.checked,T.toDisposeElement.push(E.onChecked(M=>T.checkbox.checked=M));const{labelHighlights:R,descriptionHighlights:O,detailHighlights:x}=E,F=Object.create(null);F.matches=R||[],F.descriptionTitle=E.saneDescription,F.descriptionMatches=O||[],F.extraClasses=E.item.iconClasses,F.italic=E.item.italic,F.strikethrough=E.item.strikethrough,T.label.setLabel(E.saneLabel,E.saneDescription,F),T.keybinding.set(E.item.keybinding),E.saneDetail&&T.detail.setLabel(E.saneDetail,void 0,{matches:x,title:E.saneDetail}),E.separator&&E.separator.label?(T.separator.textContent=E.separator.label,T.separator.style.display=""):T.separator.style.display="none",T.entry.classList.toggle("quick-input-list-separator-border",!!E.separator),T.actionBar.clear();const L=E.item.buttons;L&&L.length?(T.actionBar.push(L.map((M,N)=>{let B=M.iconClass||(M.iconPath?(0,l.getIconClass)(M.iconPath):void 0);M.alwaysVisible&&(B=B?`${B} always-visible`:"always-visible");const P=new D.Action(`id-${N}`,"",B,!0,async()=>{E.fireButtonTriggered({button:M,item:E.item})});return P.tooltip=M.tooltip||"",P}),{icon:!0,label:!1}),T.entry.classList.add("has-actions")):T.entry.classList.remove("has-actions")}disposeElement(E,y,T){T.toDisposeElement=(0,i.dispose)(T.toDisposeElement)}disposeTemplate(E){E.toDisposeElement=(0,i.dispose)(E.toDisposeElement),E.toDisposeTemplate=(0,i.dispose)(E.toDisposeTemplate)}}a.ID="listelement";class n{getHeight(E){return E.saneDetail?44:22}getTemplateId(E){return a.ID}}var h;(function(b){b[b.First=1]="First",b[b.Second=2]="Second",b[b.Last=3]="Last",b[b.Next=4]="Next",b[b.Previous=5]="Previous",b[b.NextPage=6]="NextPage",b[b.PreviousPage=7]="PreviousPage"})(h=e.QuickInputListFocus||(e.QuickInputListFocus={}));class g{constructor(E,y,T){this.parent=E,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnMeta=!0,this.sortByLabel=!0,this._onChangedAllVisibleChecked=new o.Emitter,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new o.Emitter,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new o.Emitter,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new o.Emitter,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new o.Emitter,this.onButtonTriggered=this._onButtonTriggered.event,this._onKeyDown=new o.Emitter,this.onKeyDown=this._onKeyDown.event,this._onLeave=new o.Emitter,this.onLeave=this._onLeave.event,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=y,this.container=t.append(this.parent,p(".quick-input-list"));const R=new n,O=new m;this.list=T.createList("QuickInput",this.container,R,[new a],{identityProvider:{getId:x=>x.saneLabel},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:O}),this.list.getHTMLElement().id=y,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(x=>{const F=new f.StandardKeyboardEvent(x);switch(F.keyCode){case 10:this.toggleCheckbox();break;case 31:(S.isMacintosh?x.metaKey:x.ctrlKey)&&this.list.setFocus((0,I.range)(this.list.length));break;case 16:{const L=this.list.getFocus();L.length===1&&L[0]===0&&this._onLeave.fire();break}case 18:{const L=this.list.getFocus();L.length===1&&L[0]===this.list.length-1&&this._onLeave.fire();break}}this._onKeyDown.fire(F)})),this.disposables.push(this.list.onMouseDown(x=>{x.browserEvent.button!==2&&x.browserEvent.preventDefault()})),this.disposables.push(t.addDisposableListener(this.container,t.EventType.CLICK,x=>{(x.x||x.y)&&this._onLeave.fire()})),this.disposables.push(this.list.onMouseMiddleClick(x=>{this._onLeave.fire()})),this.disposables.push(this.list.onContextMenu(x=>{typeof x.index=="number"&&(x.browserEvent.preventDefault(),this.list.setSelection([x.index]))})),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return o.Event.map(this.list.onDidChangeFocus,E=>E.elements.map(y=>y.item))}get onDidChangeSelection(){return o.Event.map(this.list.onDidChangeSelection,E=>({items:E.elements.map(y=>y.item),event:E.browserEvent}))}get scrollTop(){return this.list.scrollTop}set scrollTop(E){this.list.scrollTop=E}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(E,y=!0){for(let T=0,R=E.length;T<R;T++){const O=E[T];if(!O.hidden)if(O.checked)y=!0;else return!1}return y}getCheckedCount(){let E=0;const y=this.elements;for(let T=0,R=y.length;T<R;T++)y[T].checked&&E++;return E}getVisibleCount(){let E=0;const y=this.elements;for(let T=0,R=y.length;T<R;T++)y[T].hidden||E++;return E}setAllVisibleChecked(E){try{this._fireCheckedEvents=!1,this.elements.forEach(y=>{y.hidden||(y.checked=E)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(E){this.elementDisposables=(0,i.dispose)(this.elementDisposables);const y=T=>this.fireButtonTriggered(T);this.inputElements=E,this.elements=E.reduce((T,R,O)=>{if(R.type!=="separator"){const x=O&&E[O-1],F=R.label&&R.label.replace(/\r?\n/g," "),L=R.meta&&R.meta.replace(/\r?\n/g," "),M=R.description&&R.description.replace(/\r?\n/g," "),N=R.detail&&R.detail.replace(/\r?\n/g," "),B=R.ariaLabel||[F,M,N].map(V=>(0,w.getCodiconAriaLabel)(V)).filter(V=>!!V).join(", "),P=this.parent.classList.contains("show-checkboxes");T.push(new u({hasCheckbox:P,index:O,item:R,saneLabel:F,saneMeta:L,saneAriaLabel:B,saneDescription:M,saneDetail:N,labelHighlights:R.highlights?.label,descriptionHighlights:R.highlights?.description,detailHighlights:R.highlights?.detail,checked:!1,separator:x&&x.type==="separator"?x:void 0,fireButtonTriggered:y}))}return T},[]),this.elementDisposables.push(...this.elements),this.elementDisposables.push(...this.elements.map(T=>T.onChecked(()=>this.fireCheckedEvents()))),this.elementsToIndexes=this.elements.reduce((T,R,O)=>(T.set(R.item,O),T),new Map),this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getElementsCount(){return this.inputElements.length}getFocusedElements(){return this.list.getFocusedElements().map(E=>E.item)}setFocusedElements(E){if(this.list.setFocus(E.filter(y=>this.elementsToIndexes.has(y)).map(y=>this.elementsToIndexes.get(y))),E.length>0){const y=this.list.getFocus()[0];typeof y=="number"&&this.list.reveal(y)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}getSelectedElements(){return this.list.getSelectedElements().map(E=>E.item)}setSelectedElements(E){this.list.setSelection(E.filter(y=>this.elementsToIndexes.has(y)).map(y=>this.elementsToIndexes.get(y)))}getCheckedElements(){return this.elements.filter(E=>E.checked).map(E=>E.item)}setCheckedElements(E){try{this._fireCheckedEvents=!1;const y=new Set;for(const T of E)y.add(T);for(const T of this.elements)T.checked=y.has(T.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(E){this.list.getHTMLElement().style.pointerEvents=E?"":"none"}focus(E){if(!this.list.length)return;switch(E===h.Next&&this.list.getFocus()[0]===this.list.length-1&&(E=h.First),E===h.Previous&&this.list.getFocus()[0]===0&&(E=h.Last),E===h.Second&&this.list.length<2&&(E=h.First),E){case h.First:this.list.focusFirst();break;case h.Second:this.list.focusNth(1);break;case h.Last:this.list.focusLast();break;case h.Next:this.list.focusNext();break;case h.Previous:this.list.focusPrevious();break;case h.NextPage:this.list.focusNextPage();break;case h.PreviousPage:this.list.focusPreviousPage();break}const y=this.list.getFocus()[0];typeof y=="number"&&this.list.reveal(y)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}layout(E){this.list.getHTMLElement().style.maxHeight=E?`calc(${Math.floor(E/44)*44}px)`:"",this.list.layout()}filter(E){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;if(E=E.trim(),!E||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this.elements.forEach(T=>{T.labelHighlights=void 0,T.descriptionHighlights=void 0,T.detailHighlights=void 0,T.hidden=!1;const R=T.index&&this.inputElements[T.index-1];T.separator=R&&R.type==="separator"?R:void 0});else{let T;this.elements.forEach(R=>{const O=this.matchOnLabel?(0,s.withNullAsUndefined)((0,c.matchesFuzzyIconAware)(E,(0,c.parseLabelWithIcons)(R.saneLabel))):void 0,x=this.matchOnDescription?(0,s.withNullAsUndefined)((0,c.matchesFuzzyIconAware)(E,(0,c.parseLabelWithIcons)(R.saneDescription||""))):void 0,F=this.matchOnDetail?(0,s.withNullAsUndefined)((0,c.matchesFuzzyIconAware)(E,(0,c.parseLabelWithIcons)(R.saneDetail||""))):void 0,L=this.matchOnMeta?(0,s.withNullAsUndefined)((0,c.matchesFuzzyIconAware)(E,(0,c.parseLabelWithIcons)(R.saneMeta||""))):void 0;if(O||x||F||L?(R.labelHighlights=O,R.descriptionHighlights=x,R.detailHighlights=F,R.hidden=!1):(R.labelHighlights=void 0,R.descriptionHighlights=void 0,R.detailHighlights=void 0,R.hidden=!R.item.alwaysShow),R.separator=void 0,!this.sortByLabel){const M=R.index&&this.inputElements[R.index-1];T=M&&M.type==="separator"?M:T,T&&!R.hidden&&(R.separator=T,T=void 0)}})}const y=this.elements.filter(T=>!T.hidden);if(this.sortByLabel&&E){const T=E.toLowerCase();y.sort((R,O)=>d(R,O,T))}return this.elementsToIndexes=y.reduce((T,R,O)=>(T.set(R.item,O),T),new Map),this.list.splice(0,this.list.length,y),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(y.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const E=this.list.getFocusedElements(),y=this.allVisibleChecked(E);for(const T of E)T.checked=!y}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(E){this.container.style.display=E?"":"none"}isDisplayed(){return this.container.style.display!=="none"}dispose(){this.elementDisposables=(0,i.dispose)(this.elementDisposables),this.disposables=(0,i.dispose)(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(E){this._onButtonTriggered.fire(E)}style(E){this.list.style(E)}}Ee([C.memoize],g.prototype,"onDidChangeFocus",null),Ee([C.memoize],g.prototype,"onDidChangeSelection",null),e.QuickInputList=g;function d(b,E,y){const T=b.labelHighlights||[],R=E.labelHighlights||[];return T.length&&!R.length?-1:!T.length&&R.length?1:T.length===0&&R.length===0?0:(0,v.compareAnything)(b.saneLabel,E.saneLabel,y)}class m{getWidgetAriaLabel(){return(0,r.localize)(0,null)}getAriaLabel(E){return E.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(E){return E.hasCheckbox?"checkbox":"option"}isChecked(E){if(!!E.hasCheckbox)return{value:E.checked,onDidChange:E.onChecked}}}}),define(ne[1231],re([1,0,10,91,78,162,258,181,280,36,15,11,30,33,6,2,14,81,13,672,658,1228,1221,1230,450]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputController=void 0;const g=t.$,d={iconClass:c.Codicon.quickInputBack.classNames,tooltip:(0,a.localize)(0,null),handle:-1};class m extends S.Disposable{constructor(R){super();this.ui=R,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.noValidationMessage=m.noPromptMessage,this._severity=l.default.Ignore,this.buttonsUpdated=!1,this.onDidTriggerButtonEmitter=this._register(new i.Emitter),this.onDidHideEmitter=this._register(new i.Emitter),this.onDisposeEmitter=this._register(new i.Emitter),this.visibleDisposables=this._register(new S.DisposableStore),this.onDidTriggerButton=this.onDidTriggerButtonEmitter.event,this.onDidHide=this.onDidHideEmitter.event,this.onDispose=this.onDisposeEmitter.event}get title(){return this._title}set title(R){this._title=R,this.update()}get description(){return this._description}set description(R){this._description=R,this.update()}get step(){return this._steps}set step(R){this._steps=R,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(R){this._totalSteps=R,this.update()}get enabled(){return this._enabled}set enabled(R){this._enabled=R,this.update()}get contextKey(){return this._contextKey}set contextKey(R){this._contextKey=R,this.update()}get busy(){return this._busy}set busy(R){this._busy=R,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(R){const O=this._ignoreFocusOut!==R&&!s.isIOS;this._ignoreFocusOut=R&&!s.isIOS,O&&this.update()}get buttons(){return this._buttons}set buttons(R){this._buttons=R,this.buttonsUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(R){this._validationMessage=R,this.update()}get severity(){return this._severity}set severity(R){this._severity=R,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(R=>{this.buttons.indexOf(R)!==-1&&this.onDidTriggerButtonEmitter.fire(R)})),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.update())}hide(){!this.visible||this.ui.hide()}didHide(R=u.QuickInputHideReason.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:R})}update(){if(!this.visible)return;const R=this.getTitle();R&&this.ui.title.textContent!==R?this.ui.title.textContent=R:!R&&this.ui.title.innerHTML!==" "&&(this.ui.title.innerText="\xA0");const O=this.getDescription();if(this.ui.description1.textContent!==O&&(this.ui.description1.textContent=O),this.ui.description2.textContent!==O&&(this.ui.description2.textContent=O),this.busy&&!this.busyDelay&&(this.busyDelay=new C.TimeoutTimer,this.busyDelay.setIfNotSet(()=>{this.visible&&this.ui.progressBar.infinite()},800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const F=this.buttons.filter(M=>M===d);this.ui.leftActionBar.push(F.map((M,N)=>{const B=new w.Action(`id-${N}`,"",M.iconClass||(0,p.getIconClass)(M.iconPath),!0,async()=>{this.onDidTriggerButtonEmitter.fire(M)});return B.tooltip=M.tooltip||"",B}),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const L=this.buttons.filter(M=>M!==d);this.ui.rightActionBar.push(L.map((M,N)=>{const B=new w.Action(`id-${N}`,"",M.iconClass||(0,p.getIconClass)(M.iconPath),!0,async()=>{this.onDidTriggerButtonEmitter.fire(M)});return B.tooltip=M.tooltip||"",B}),{icon:!0,label:!1})}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const x=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==x&&(this._lastValidationMessage=x,t.reset(this.ui.message,...(0,D.renderLabelWithIcons)(x))),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?(0,a.localize)(2,null,this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(R){if(this.ui.inputBox.showDecoration(R),R!==l.default.Ignore){const O=this.ui.inputBox.stylesForType(R);this.ui.message.style.color=O.foreground?`${O.foreground}`:"",this.ui.message.style.backgroundColor=O.background?`${O.background}`:"",this.ui.message.style.border=O.border?`1px solid ${O.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}m.noPromptMessage=(0,a.localize)(1,null);class b extends m{constructor(){super(...arguments);this._value="",this.onDidChangeValueEmitter=this._register(new i.Emitter),this.onWillAcceptEmitter=this._register(new i.Emitter),this.onDidAcceptEmitter=this._register(new i.Emitter),this.onDidCustomEmitter=this._register(new i.Emitter),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._sortByLabel=!0,this._autoFocusOnList=!0,this._keepScrollPosition=!1,this._itemActivation=this.ui.isScreenReaderOptimized()?u.ItemActivation.NONE:u.ItemActivation.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new i.Emitter),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new i.Emitter),this.onDidTriggerItemButtonEmitter=this._register(new i.Emitter),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=R=>R,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidCustom=this.onDidCustomEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(R){this._quickNavigate=R,this.update()}get value(){return this._value}set value(R){this.doSetValue(R)}doSetValue(R,O){this._value!==R&&(this._value=R,O||this.update(),this.visible&&this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(R){this._ariaLabel=R,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(R){this._placeholder=R,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(R){this.ui.list.scrollTop=R}set items(R){this._items=R,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(R){this._canSelectMany=R,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(R){this._canAcceptInBackground=R}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(R){this._matchOnDescription=R,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(R){this._matchOnDetail=R,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(R){this._matchOnLabel=R,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(R){this._sortByLabel=R,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(R){this._autoFocusOnList=R,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(R){this._keepScrollPosition=R}get itemActivation(){return this._itemActivation}set itemActivation(R){this._itemActivation=R}get activeItems(){return this._activeItems}set activeItems(R){this._activeItems=R,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(R){this._selectedItems=R,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?u.NO_KEY_MODS:this.ui.keyMods}set valueSelection(R){this._valueSelection=R,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(R){this._customButton=R,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(R){this._customButtonLabel=R,this.update()}get customHover(){return this._customButtonHover}set customHover(R){this._customButtonHover=R,this.update()}get ok(){return this._ok}set ok(R){this._ok=R,this.update()}inputHasFocus(){return this.visible?this.ui.inputBox.hasFocus():!1}focusOnInput(){this.ui.inputBox.setFocus()}get hideInput(){return!!this._hideInput}set hideInput(R){this._hideInput=R,this.update()}get hideCheckAll(){return!!this._hideCheckAll}set hideCheckAll(R){this._hideCheckAll=R,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(h.QuickInputListFocus.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(R=>{this.doSetValue(R,!0)})),this.visibleDisposables.add(this.ui.inputBox.onMouseDown(R=>{this.autoFocusOnList||this.ui.list.clearFocus()})),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown(R=>{switch(R.keyCode){case 18:this.ui.list.focus(h.QuickInputListFocus.Next),this.canSelectMany&&this.ui.list.domFocus(),t.EventHelper.stop(R,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(h.QuickInputListFocus.Previous):this.ui.list.focus(h.QuickInputListFocus.Last),this.canSelectMany&&this.ui.list.domFocus(),t.EventHelper.stop(R,!0);break;case 12:this.ui.list.focus(h.QuickInputListFocus.NextPage),this.canSelectMany&&this.ui.list.domFocus(),t.EventHelper.stop(R,!0);break;case 11:this.ui.list.focus(h.QuickInputListFocus.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),t.EventHelper.stop(R,!0);break;case 17:if(!this._canAcceptInBackground||!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!0));break;case 14:(R.ctrlKey||R.metaKey)&&!R.shiftKey&&!R.altKey&&(this.ui.list.focus(h.QuickInputListFocus.First),t.EventHelper.stop(R,!0));break;case 13:(R.ctrlKey||R.metaKey)&&!R.shiftKey&&!R.altKey&&(this.ui.list.focus(h.QuickInputListFocus.Last),t.EventHelper.stop(R,!0));break}})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)})),this.visibleDisposables.add(this.ui.onDidCustom(()=>{this.onDidCustomEmitter.fire()})),this.visibleDisposables.add(this.ui.list.onDidChangeFocus(R=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&(0,v.equals)(R,this._activeItems,(O,x)=>O===x)||(this._activeItems=R,this.onDidChangeActiveEmitter.fire(R))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:R,event:O})=>{if(this.canSelectMany){R.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&(0,v.equals)(R,this._selectedItems,(x,F)=>x===F)||(this._selectedItems=R,this.onDidChangeSelectionEmitter.fire(R),R.length&&this.handleAccept(O instanceof MouseEvent&&O.button===1))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(R=>{!this.canSelectMany||this.selectedItemsToConfirm!==this._selectedItems&&(0,v.equals)(R,this._selectedItems,(O,x)=>O===x)||(this._selectedItems=R,this.onDidChangeSelectionEmitter.fire(R))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(R=>this.onDidTriggerItemButtonEmitter.fire(R))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(R){let O=!1;this.onWillAcceptEmitter.fire({veto:()=>O=!0}),O||this.onDidAcceptEmitter.fire({inBackground:R})}registerQuickNavigation(){return t.addDisposableListener(this.ui.container,t.EventType.KEY_UP,R=>{if(this.canSelectMany||!this._quickNavigate)return;const O=new f.StandardKeyboardEvent(R),x=O.keyCode;this._quickNavigate.keybindings.some(M=>{const[N,B]=M.getParts();return B?!1:N.shiftKey&&x===4?!(O.ctrlKey||O.altKey||O.metaKey):!!(N.altKey&&x===6||N.ctrlKey&&x===5||N.metaKey&&x===57)})&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)})}update(){if(!this.visible)return;const R=this.keepScrollPosition?this.scrollTop:0,O=!!this._hideInput&&this._items.length>0;this.ui.container.classList.toggle("hidden-input",O&&!this.description);const x={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!O,progressBar:!O,visibleCount:!0,count:this.canSelectMany,ok:this.ok==="default"?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(x),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");const F=this.ariaLabel||this.placeholder||b.DEFAULT_ARIA_LABEL;if(this.ui.inputBox.ariaLabel!==F&&(this.ui.inputBox.ariaLabel=F),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated)switch(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case u.ItemActivation.NONE:this._itemActivation=u.ItemActivation.FIRST;break;case u.ItemActivation.SECOND:this.ui.list.focus(h.QuickInputListFocus.Second),this._itemActivation=u.ItemActivation.FIRST;break;case u.ItemActivation.LAST:this.ui.list.focus(h.QuickInputListFocus.Last),this._itemActivation=u.ItemActivation.FIRST;break;default:this.trySelectFirst();break}this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",this.ui.setComboboxAccessibility(!0),x.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(h.QuickInputListFocus.First)),this.keepScrollPosition&&(this.scrollTop=R)}}b.DEFAULT_ARIA_LABEL=(0,a.localize)(3,null);class E extends m{constructor(){super(...arguments);this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new i.Emitter),this.onDidAcceptEmitter=this._register(new i.Emitter),this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(R){this._value=R||"",this.update()}set valueSelection(R){this._valueSelection=R,this.valueSelectionUpdated=!0,this.update()}get placeholder(){return this._placeholder}set placeholder(R){this._placeholder=R,this.update()}get password(){return this._password}set password(R){this._password=R,this.update()}get prompt(){return this._prompt}set prompt(R){this._prompt=R,this.noValidationMessage=R?(0,a.localize)(4,null,R):m.noPromptMessage,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(R=>{R!==this.value&&(this._value=R,this.onDidValueChangeEmitter.fire(R))})),this.visibleDisposables.add(this.ui.onDidAccept(()=>this.onDidAcceptEmitter.fire())),this.valueSelectionUpdated=!0),super.show()}update(){if(!this.visible)return;const R={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description||!!this.step,inputBox:!0,message:!0};this.ui.setVisibilities(R),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||""),this.ui.inputBox.password!==this.password&&(this.ui.inputBox.password=this.password)}}class y extends S.Disposable{constructor(R){super();this.options=R,this.comboboxAccessibility=!1,this.enabled=!0,this.onDidAcceptEmitter=this._register(new i.Emitter),this.onDidCustomEmitter=this._register(new i.Emitter),this.onDidTriggerButtonEmitter=this._register(new i.Emitter),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new i.Emitter),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new i.Emitter),this.onHide=this.onHideEmitter.event,this.backButton=d,this.idPrefix=R.idPrefix,this.parentElement=R.container,this.styles=R.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const R=O=>{this.keyMods.ctrlCmd=O.ctrlKey||O.metaKey,this.keyMods.alt=O.altKey};this._register(t.addDisposableListener(window,t.EventType.KEY_DOWN,R,!0)),this._register(t.addDisposableListener(window,t.EventType.KEY_UP,R,!0)),this._register(t.addDisposableListener(window,t.EventType.MOUSE_DOWN,R,!0))}getUI(){if(this.ui)return this.ui;const R=t.append(this.parentElement,g(".quick-input-widget.show-file-icons"));R.tabIndex=-1,R.style.display="none";const O=t.createStyleSheet(R),x=t.append(R,g(".quick-input-titlebar")),F=this._register(new _.ActionBar(x));F.domNode.classList.add("quick-input-left-action-bar");const L=t.append(x,g(".quick-input-title")),M=this._register(new _.ActionBar(x));M.domNode.classList.add("quick-input-right-action-bar");const N=t.append(R,g(".quick-input-description")),B=t.append(R,g(".quick-input-header")),P=t.append(B,g("input.quick-input-check-all"));P.type="checkbox",this._register(t.addStandardDisposableListener(P,t.EventType.CHANGE,ie=>{const ce=P.checked;ee.setAllVisibleChecked(ce)})),this._register(t.addDisposableListener(P,t.EventType.CLICK,ie=>{(ie.x||ie.y)&&H.setFocus()}));const V=t.append(B,g(".quick-input-description")),z=t.append(B,g(".quick-input-and-message")),U=t.append(z,g(".quick-input-filter")),H=this._register(new n.QuickInputBox(U));H.setAttribute("aria-describedby",`${this.idPrefix}message`);const K=t.append(U,g(".quick-input-visible-count"));K.setAttribute("aria-live","polite"),K.setAttribute("aria-atomic","true");const G=new k.CountBadge(K,{countFormat:(0,a.localize)(5,null)}),q=t.append(U,g(".quick-input-count"));q.setAttribute("aria-live","polite");const Z=new k.CountBadge(q,{countFormat:(0,a.localize)(6,null)}),j=t.append(B,g(".quick-input-action")),X=new A.Button(j);X.label=(0,a.localize)(7,null),this._register(X.onDidClick(ie=>{this.onDidAcceptEmitter.fire()}));const Y=t.append(B,g(".quick-input-action")),$=new A.Button(Y);$.label=(0,a.localize)(8,null),this._register($.onDidClick(ie=>{this.onDidCustomEmitter.fire()}));const J=t.append(z,g(`#${this.idPrefix}message.quick-input-message`)),ee=this._register(new h.QuickInputList(R,this.idPrefix+"list",this.options));this._register(ee.onChangedAllVisibleChecked(ie=>{P.checked=ie})),this._register(ee.onChangedVisibleCount(ie=>{G.setCount(ie)})),this._register(ee.onChangedCheckedCount(ie=>{Z.setCount(ie)})),this._register(ee.onLeave(()=>{setTimeout(()=>{H.setFocus(),this.controller instanceof b&&this.controller.canSelectMany&&ee.clearFocus()},0)})),this._register(ee.onDidChangeFocus(()=>{this.comboboxAccessibility&&this.getUI().inputBox.setAttribute("aria-activedescendant",this.getUI().list.getActiveDescendant()||"")}));const te=new I.ProgressBar(R);te.getContainer().classList.add("quick-input-progress");const se=t.trackFocus(R);return this._register(se),this._register(t.addDisposableListener(R,t.EventType.FOCUS,ie=>{this.previousFocusElement=ie.relatedTarget instanceof HTMLElement?ie.relatedTarget:void 0},!0)),this._register(se.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(u.QuickInputHideReason.Blur),this.previousFocusElement=void 0})),this._register(t.addDisposableListener(R,t.EventType.FOCUS,ie=>{H.setFocus()})),this._register(t.addDisposableListener(R,t.EventType.KEY_DOWN,ie=>{const ce=new f.StandardKeyboardEvent(ie);switch(ce.keyCode){case 3:t.EventHelper.stop(ie,!0),this.onDidAcceptEmitter.fire();break;case 9:t.EventHelper.stop(ie,!0),this.hide(u.QuickInputHideReason.Gesture);break;case 2:if(!ce.altKey&&!ce.ctrlKey&&!ce.metaKey){const le=[".action-label.codicon"];R.classList.contains("show-checkboxes")?le.push("input"):le.push("input[type=text]"),this.getUI().list.isDisplayed()&&le.push(".monaco-list");const ae=R.querySelectorAll(le.join(", "));ce.shiftKey&&ce.target===ae[0]?(t.EventHelper.stop(ie,!0),ae[ae.length-1].focus()):!ce.shiftKey&&ce.target===ae[ae.length-1]&&(t.EventHelper.stop(ie,!0),ae[0].focus())}break}})),this.ui={container:R,styleSheet:O,leftActionBar:F,titleBar:x,title:L,description1:N,description2:V,rightActionBar:M,checkAll:P,filterContainer:U,inputBox:H,visibleCountContainer:K,visibleCount:G,countContainer:q,count:Z,okContainer:j,ok:X,message:J,customButtonContainer:Y,customButton:$,list:ee,progressBar:te,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,isScreenReaderOptimized:()=>this.options.isScreenReaderOptimized(),show:ie=>this.show(ie),hide:()=>this.hide(),setVisibilities:ie=>this.setVisibilities(ie),setComboboxAccessibility:ie=>this.setComboboxAccessibility(ie),setEnabled:ie=>this.setEnabled(ie),setContextKey:ie=>this.options.setContextKey(ie)},this.updateStyles(),this.ui}pick(R,O={},x=o.CancellationToken.None){return new Promise((F,L)=>{let M=V=>{M=F,O.onKeyMods&&O.onKeyMods(N.keyMods),F(V)};if(x.isCancellationRequested){M(void 0);return}const N=this.createQuickPick();let B;const P=[N,N.onDidAccept(()=>{if(N.canSelectMany)M(N.selectedItems.slice()),N.hide();else{const V=N.activeItems[0];V&&(M(V),N.hide())}}),N.onDidChangeActive(V=>{const z=V[0];z&&O.onDidFocus&&O.onDidFocus(z)}),N.onDidChangeSelection(V=>{if(!N.canSelectMany){const z=V[0];z&&(M(z),N.hide())}}),N.onDidTriggerItemButton(V=>O.onDidTriggerItemButton&&O.onDidTriggerItemButton({...V,removeItem:()=>{const z=N.items.indexOf(V.item);if(z!==-1){const U=N.items.slice(),H=U.splice(z,1),K=N.activeItems.filter(q=>q!==H[0]),G=N.keepScrollPosition;N.keepScrollPosition=!0,N.items=U,K&&(N.activeItems=K),N.keepScrollPosition=G}}})),N.onDidChangeValue(V=>{B&&!V&&(N.activeItems.length!==1||N.activeItems[0]!==B)&&(N.activeItems=[B])}),x.onCancellationRequested(()=>{N.hide()}),N.onDidHide(()=>{(0,S.dispose)(P),M(void 0)})];N.title=O.title,N.canSelectMany=!!O.canPickMany,N.placeholder=O.placeHolder,N.ignoreFocusOut=!!O.ignoreFocusLost,N.matchOnDescription=!!O.matchOnDescription,N.matchOnDetail=!!O.matchOnDetail,N.matchOnLabel=O.matchOnLabel===void 0||O.matchOnLabel,N.autoFocusOnList=O.autoFocusOnList===void 0||O.autoFocusOnList,N.quickNavigate=O.quickNavigate,N.contextKey=O.contextKey,N.busy=!0,Promise.all([R,O.activeItem]).then(([V,z])=>{B=z,N.busy=!1,N.items=V,N.canSelectMany&&(N.selectedItems=V.filter(U=>U.type!=="separator"&&U.picked)),B&&(N.activeItems=[B])}),N.show(),Promise.resolve(R).then(void 0,V=>{L(V),N.hide()})})}setValidationOnInput(R,O){O&&(0,r.isString)(O)?(R.severity=l.default.Error,R.validationMessage=O):O&&!(0,r.isString)(O)?(R.severity=O.severity,R.validationMessage=O.content):(R.severity=l.default.Ignore,R.validationMessage=void 0)}input(R={},O=o.CancellationToken.None){return new Promise(x=>{if(O.isCancellationRequested){x(void 0);return}const F=this.createInputBox(),L=R.validateInput||(()=>Promise.resolve(void 0)),M=i.Event.debounce(F.onDidChangeValue,(V,z)=>z,100);let N=R.value||"",B=Promise.resolve(L(N));const P=[F,M(V=>{V!==N&&(B=Promise.resolve(L(V)),N=V),B.then(z=>{V===N&&this.setValidationOnInput(F,z)})}),F.onDidAccept(()=>{const V=F.value;V!==N&&(B=Promise.resolve(L(V)),N=V),B.then(z=>{!z||!(0,r.isString)(z)&&z.severity!==l.default.Error?(x(V),F.hide()):V===N&&this.setValidationOnInput(F,z)})}),O.onCancellationRequested(()=>{F.hide()}),F.onDidHide(()=>{(0,S.dispose)(P),x(void 0)})];F.title=R.title,F.value=R.value||"",F.valueSelection=R.valueSelection,F.prompt=R.prompt,F.placeholder=R.placeHolder,F.password=!!R.password,F.ignoreFocusOut=!!R.ignoreFocusLost,F.show()})}createQuickPick(){const R=this.getUI();return new b(R)}createInputBox(){const R=this.getUI();return new E(R)}show(R){const O=this.getUI();this.onShowEmitter.fire();const x=this.controller;this.controller=R,x&&x.didHide(),this.setEnabled(!0),O.leftActionBar.clear(),O.title.textContent="",O.description1.textContent="",O.description2.textContent="",O.rightActionBar.clear(),O.checkAll.checked=!1,O.inputBox.placeholder="",O.inputBox.password=!1,O.inputBox.showDecoration(l.default.Ignore),O.visibleCount.setCount(0),O.count.setCount(0),t.reset(O.message),O.progressBar.stop(),O.list.setElements([]),O.list.matchOnDescription=!1,O.list.matchOnDetail=!1,O.list.matchOnLabel=!0,O.list.sortByLabel=!0,O.ignoreFocusOut=!1,this.setComboboxAccessibility(!1),O.inputBox.ariaLabel="";const F=this.options.backKeybindingLabel();d.tooltip=F?(0,a.localize)(9,null,F):(0,a.localize)(10,null),O.container.style.display="",this.updateLayout(),O.inputBox.setFocus()}setVisibilities(R){const O=this.getUI();O.title.style.display=R.title?"":"none",O.description1.style.display=R.description&&(R.inputBox||R.checkAll)?"":"none",O.description2.style.display=R.description&&!(R.inputBox||R.checkAll)?"":"none",O.checkAll.style.display=R.checkAll?"":"none",O.filterContainer.style.display=R.inputBox?"":"none",O.visibleCountContainer.style.display=R.visibleCount?"":"none",O.countContainer.style.display=R.count?"":"none",O.okContainer.style.display=R.ok?"":"none",O.customButtonContainer.style.display=R.customButton?"":"none",O.message.style.display=R.message?"":"none",O.progressBar.getContainer().style.display=R.progressBar?"":"none",O.list.display(!!R.list),O.container.classList[R.checkBox?"add":"remove"]("show-checkboxes"),this.updateLayout()}setComboboxAccessibility(R){if(R!==this.comboboxAccessibility){const O=this.getUI();this.comboboxAccessibility=R,this.comboboxAccessibility?(O.inputBox.setAttribute("role","combobox"),O.inputBox.setAttribute("aria-haspopup","true"),O.inputBox.setAttribute("aria-autocomplete","list"),O.inputBox.setAttribute("aria-activedescendant",O.list.getActiveDescendant()||"")):(O.inputBox.removeAttribute("role"),O.inputBox.removeAttribute("aria-haspopup"),O.inputBox.removeAttribute("aria-autocomplete"),O.inputBox.removeAttribute("aria-activedescendant"))}}setEnabled(R){if(R!==this.enabled){this.enabled=R;for(const O of this.getUI().leftActionBar.viewItems)O.getAction().enabled=R;for(const O of this.getUI().rightActionBar.viewItems)O.getAction().enabled=R;this.getUI().checkAll.disabled=!R,this.getUI().ok.enabled=R,this.getUI().list.enabled=R}}hide(R){const O=this.controller;if(O){const x=!this.ui?.container.contains(document.activeElement);if(this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",!x){let F=this.previousFocusElement;for(;F&&!F.offsetParent;)F=(0,r.withNullAsUndefined)(F.parentElement);F?.offsetParent?(F.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}O.didHide(R)}}focus(){if(this.isDisplayed()){const R=this.getUI();R.inputBox.enabled?R.inputBox.setFocus():R.list.domFocus()}}toggle(){this.isDisplayed()&&this.controller instanceof b&&this.controller.canSelectMany&&this.getUI().list.toggleCheckbox()}navigate(R,O){this.isDisplayed()&&this.getUI().list.isDisplayed()&&(this.getUI().list.focus(R?h.QuickInputListFocus.Next:h.QuickInputListFocus.Previous),O&&this.controller instanceof b&&(this.controller.quickNavigate=O))}async accept(R={alt:!1,ctrlCmd:!1}){this.keyMods.alt=R.alt,this.keyMods.ctrlCmd=R.ctrlCmd,this.onDidAcceptEmitter.fire()}async back(){this.onDidTriggerButtonEmitter.fire(this.backButton)}async cancel(){this.hide()}layout(R,O){this.dimension=R,this.titleBarOffset=O,this.updateLayout()}updateLayout(){if(this.ui){this.ui.container.style.top=`${this.titleBarOffset}px`;const R=this.ui.container.style,O=Math.min(this.dimension.width*.62,y.MAX_WIDTH);R.width=O+"px",R.marginLeft="-"+O/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(R){this.styles=R,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:R,quickInputBackground:O,quickInputForeground:x,contrastBorder:F,widgetShadow:L}=this.styles.widget;this.ui.titleBar.style.backgroundColor=R?R.toString():"",this.ui.container.style.backgroundColor=O?O.toString():"",this.ui.container.style.color=x?x.toString():"",this.ui.container.style.border=F?`1px solid ${F}`:"",this.ui.container.style.boxShadow=L?`0 0 8px 2px ${L}`:"",this.ui.inputBox.style(this.styles.inputBox),this.ui.count.style(this.styles.countBadge),this.ui.ok.style(this.styles.button),this.ui.customButton.style(this.styles.button),this.ui.progressBar.style(this.styles.progressBar),this.ui.list.style(this.styles.list);const M=[];this.styles.list.pickerGroupBorder&&M.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.list.pickerGroupBorder}; }`),this.styles.list.pickerGroupForeground&&M.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.list.pickerGroupForeground}; }`),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(M.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&M.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&M.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&M.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&M.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&M.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),M.push("}"));const N=M.join(` `);N!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=N)}}isDisplayed(){return this.ui&&this.ui.container.style.display!=="none"}}e.QuickInputController=y,y.MAX_WIDTH=600}),define(ne[1232],re([3,4]),function(Q,e){return Q.create("vs/editor/browser/controller/textAreaHandler",e)}),define(ne[1233],re([3,4]),function(Q,e){return Q.create("vs/editor/browser/coreCommands",e)}),define(ne[1234],re([3,4]),function(Q,e){return Q.create("vs/editor/browser/editorExtensions",e)}),define(ne[1235],re([3,4]),function(Q,e){return Q.create("vs/editor/browser/widget/codeEditorWidget",e)}),define(ne[1236],re([3,4]),function(Q,e){return Q.create("vs/editor/browser/widget/diffEditorWidget",e)}),define(ne[1237],re([3,4]),function(Q,e){return Q.create("vs/editor/browser/widget/diffReview",e)}),define(ne[1238],re([3,4]),function(Q,e){return Q.create("vs/editor/browser/widget/inlineDiffMargin",e)}),define(ne[1239],re([1,0,1238,10,36,2,20,33]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineDiffMargin=void 0;class I extends A.Disposable{constructor(v,C,o,c,i,S){super();this._viewZoneId=v,this._marginDomNode=C,this.editor=o,this.diff=c,this._contextMenuService=i,this._clipboardService=S,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=D.Codicon.lightBulb.classNames+" lightbulb-glyph",this._diffActions.style.position="absolute";const s=o.getOption(59),l=o.getModel().getEOL();this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${s}px`,this._diffActions.style.lineHeight=`${s}px`,this._marginDomNode.appendChild(this._diffActions);const r=[],p=c.modifiedEndLineNumber===0;r.push(new _.Action("diff.clipboard.copyDeletedContent",p?c.originalEndLineNumber>c.modifiedStartLineNumber?t.localize(0,null):t.localize(1,null):c.originalEndLineNumber>c.modifiedStartLineNumber?t.localize(2,null):t.localize(3,null),void 0,!0,async()=>{const g=new k.Range(c.originalStartLineNumber,1,c.originalEndLineNumber+1,1),d=c.originalModel.getValueInRange(g);await this._clipboardService.writeText(d)}));let u=0,a;c.originalEndLineNumber>c.modifiedStartLineNumber&&(a=new _.Action("diff.clipboard.copyDeletedLineContent",p?t.localize(4,null,c.originalStartLineNumber):t.localize(5,null,c.originalStartLineNumber),void 0,!0,async()=>{const g=c.originalModel.getLineContent(c.originalStartLineNumber+u);if(g===""){const d=c.originalModel.getEndOfLineSequence();await this._clipboardService.writeText(d===0?` `:`\r `)}else await this._clipboardService.writeText(g)}),r.push(a)),o.getOption(81)||r.push(new _.Action("diff.inline.revertChange",t.localize(6,null),void 0,!0,async()=>{const g=new k.Range(c.originalStartLineNumber,1,c.originalEndLineNumber,c.originalModel.getLineMaxColumn(c.originalEndLineNumber)),d=c.originalModel.getValueInRange(g);if(c.modifiedEndLineNumber===0){const m=o.getModel().getLineMaxColumn(c.modifiedStartLineNumber);o.executeEdits("diffEditor",[{range:new k.Range(c.modifiedStartLineNumber,m,c.modifiedStartLineNumber,m),text:l+d}])}else{const m=o.getModel().getLineMaxColumn(c.modifiedEndLineNumber);o.executeEdits("diffEditor",[{range:new k.Range(c.modifiedStartLineNumber,1,c.modifiedEndLineNumber,m),text:d}])}}));const h=(g,d)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:g,y:d}),getActions:()=>(a&&(a.label=p?t.localize(7,null,c.originalStartLineNumber+u):t.localize(8,null,c.originalStartLineNumber+u)),r),autoSelectFirstItem:!0})};this._register(f.addStandardDisposableListener(this._diffActions,"mousedown",g=>{const{top:d,height:m}=f.getDomNodePagePosition(this._diffActions),b=Math.floor(s/3);g.preventDefault(),h(g.posx,d+m+b)})),this._register(o.onMouseMove(g=>{g.target.type===8||g.target.type===5?g.target.detail.viewZoneId===this._viewZoneId?(this.visibility=!0,u=this._updateLightBulbPosition(this._marginDomNode,g.event.browserEvent.y,s)):this.visibility=!1:this.visibility=!1})),this._register(o.onMouseDown(g=>{!g.event.rightButton||(g.target.type===8||g.target.type===5)&&g.target.detail.viewZoneId===this._viewZoneId&&(g.event.preventDefault(),u=this._updateLightBulbPosition(this._marginDomNode,g.event.browserEvent.y,s),h(g.event.posx,g.event.posy+s))}))}get visibility(){return this._visibility}set visibility(v){this._visibility!==v&&(this._visibility=v,v?this._diffActions.style.visibility="visible":this._diffActions.style.visibility="hidden")}_updateLightBulbPosition(v,C,o){const{top:c}=f.getDomNodePagePosition(v),i=C-c,S=Math.floor(i/o),s=S*o;if(this._diffActions.style.top=`${s}px`,this.diff.viewLineCounts){let l=0;for(let r=0;r<this.diff.viewLineCounts.length;r++)if(l+=this.diff.viewLineCounts[r],S<l)return r}return S}}e.InlineDiffMargin=I}),define(ne[1240],re([3,4]),function(Q,e){return Q.create("vs/editor/common/config/editorConfigurationSchema",e)}),define(ne[1241],re([3,4]),function(Q,e){return Q.create("vs/editor/common/config/editorOptions",e)}),define(ne[123],re([1,0,1241,14,283,15,51,455]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorOptions=e.EditorOption=e.editorOptionsRegistry=e.EDITOR_FONT_DEFAULTS=e.WrappingIndent=e.unicodeHighlightConfigKeys=e.inUntrustedWorkspace=e.filterValidationDecorations=e.RenderLineNumbersType=e.EditorLayoutInfoComputer=e.RenderMinimap=e.EditorFontLigatures=e.cursorStyleToString=e.TextEditorCursorStyle=e.TextEditorCursorBlinkingStyle=e.stringSet=e.clampedInt=e.boolean=e.ApplyUpdateResult=e.ComputeOptionsMemory=e.ConfigurationChangedEvent=e.MINIMAP_GUTTER_WIDTH=e.EditorAutoIndentStrategy=void 0;var I;(function(Ie){Ie[Ie.None=0]="None",Ie[Ie.Keep=1]="Keep",Ie[Ie.Brackets=2]="Brackets",Ie[Ie.Advanced=3]="Advanced",Ie[Ie.Full=4]="Full"})(I=e.EditorAutoIndentStrategy||(e.EditorAutoIndentStrategy={})),e.MINIMAP_GUTTER_WIDTH=8;class w{constructor(Te){this._values=Te}hasChanged(Te){return this._values[Te]}}e.ConfigurationChangedEvent=w;class v{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}e.ComputeOptionsMemory=v;class C{constructor(Te,De,_e,Re){this.id=Te,this.name=De,this.defaultValue=_e,this.schema=Re}applyUpdate(Te,De){return c(Te,De)}compute(Te,De,_e){return _e}}class o{constructor(Te,De){this.newValue=Te,this.didChange=De}}e.ApplyUpdateResult=o;function c(Ie,Te){if(typeof Ie!="object"||typeof Te!="object"||!Ie||!Te)return new o(Te,Ie!==Te);if(Array.isArray(Ie)||Array.isArray(Te)){const _e=Array.isArray(Ie)&&Array.isArray(Te)&&A.equals(Ie,Te);return new o(Te,_e)}let De=!1;for(const _e in Te)if(Te.hasOwnProperty(_e)){const Re=c(Ie[_e],Te[_e]);Re.didChange&&(Ie[_e]=Re.newValue,De=!0)}return new o(Ie,De)}class i{constructor(Te){this.schema=void 0,this.id=Te,this.name="_never_",this.defaultValue=void 0}applyUpdate(Te,De){return c(Te,De)}validate(Te){return this.defaultValue}}class S{constructor(Te,De,_e,Re){this.id=Te,this.name=De,this.defaultValue=_e,this.schema=Re}applyUpdate(Te,De){return c(Te,De)}validate(Te){return typeof Te=="undefined"?this.defaultValue:Te}compute(Te,De,_e){return _e}}function s(Ie,Te){return typeof Ie=="undefined"?Te:Ie==="false"?!1:Boolean(Ie)}e.boolean=s;class l extends S{constructor(Te,De,_e,Re=void 0){typeof Re!="undefined"&&(Re.type="boolean",Re.default=_e);super(Te,De,_e,Re)}validate(Te){return s(Te,this.defaultValue)}}function r(Ie,Te,De,_e){if(typeof Ie=="undefined")return Te;let Re=parseInt(Ie,10);return isNaN(Re)?Te:(Re=Math.max(De,Re),Re=Math.min(_e,Re),Re|0)}e.clampedInt=r;class p extends S{constructor(Te,De,_e,Re,Ne,xe=void 0){typeof xe!="undefined"&&(xe.type="integer",xe.default=_e,xe.minimum=Re,xe.maximum=Ne);super(Te,De,_e,xe);this.minimum=Re,this.maximum=Ne}static clampedInt(Te,De,_e,Re){return r(Te,De,_e,Re)}validate(Te){return p.clampedInt(Te,this.defaultValue,this.minimum,this.maximum)}}class u extends S{constructor(Te,De,_e,Re,Ne){typeof Ne!="undefined"&&(Ne.type="number",Ne.default=_e);super(Te,De,_e,Ne);this.validationFn=Re}static clamp(Te,De,_e){return Te<De?De:Te>_e?_e:Te}static float(Te,De){if(typeof Te=="number")return Te;if(typeof Te=="undefined")return De;const _e=parseFloat(Te);return isNaN(_e)?De:_e}validate(Te){return this.validationFn(u.float(Te,this.defaultValue))}}class a extends S{static string(Te,De){return typeof Te!="string"?De:Te}constructor(Te,De,_e,Re=void 0){typeof Re!="undefined"&&(Re.type="string",Re.default=_e);super(Te,De,_e,Re)}validate(Te){return a.string(Te,this.defaultValue)}}function n(Ie,Te,De){return typeof Ie!="string"||De.indexOf(Ie)===-1?Te:Ie}e.stringSet=n;class h extends S{constructor(Te,De,_e,Re,Ne=void 0){typeof Ne!="undefined"&&(Ne.type="string",Ne.enum=Re,Ne.default=_e);super(Te,De,_e,Ne);this._allowedValues=Re}validate(Te){return n(Te,this.defaultValue,this._allowedValues)}}class g extends C{constructor(Te,De,_e,Re,Ne,xe,Ae=void 0){typeof Ae!="undefined"&&(Ae.type="string",Ae.enum=Ne,Ae.default=Re);super(Te,De,_e,Ae);this._allowedValues=Ne,this._convert=xe}validate(Te){return typeof Te!="string"?this.defaultValue:this._allowedValues.indexOf(Te)===-1?this.defaultValue:this._convert(Te)}}function d(Ie){switch(Ie){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class m extends C{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[t.localize(0,null),t.localize(1,null),t.localize(2,null)],default:"auto",description:t.localize(3,null)})}validate(Te){switch(Te){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(Te,De,_e){return _e===0?Te.accessibilitySupport:_e}}class b extends C{constructor(){const Te={insertSpace:!0,ignoreEmptyLines:!0};super(19,"comments",Te,{"editor.comments.insertSpace":{type:"boolean",default:Te.insertSpace,description:t.localize(4,null)},"editor.comments.ignoreEmptyLines":{type:"boolean",default:Te.ignoreEmptyLines,description:t.localize(5,null)}})}validate(Te){if(!Te||typeof Te!="object")return this.defaultValue;const De=Te;return{insertSpace:s(De.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:s(De.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}var E;(function(Ie){Ie[Ie.Hidden=0]="Hidden",Ie[Ie.Blink=1]="Blink",Ie[Ie.Smooth=2]="Smooth",Ie[Ie.Phase=3]="Phase",Ie[Ie.Expand=4]="Expand",Ie[Ie.Solid=5]="Solid"})(E=e.TextEditorCursorBlinkingStyle||(e.TextEditorCursorBlinkingStyle={}));function y(Ie){switch(Ie){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var T;(function(Ie){Ie[Ie.Line=1]="Line",Ie[Ie.Block=2]="Block",Ie[Ie.Underline=3]="Underline",Ie[Ie.LineThin=4]="LineThin",Ie[Ie.BlockOutline=5]="BlockOutline",Ie[Ie.UnderlineThin=6]="UnderlineThin"})(T=e.TextEditorCursorStyle||(e.TextEditorCursorStyle={}));function R(Ie){switch(Ie){case T.Line:return"line";case T.Block:return"block";case T.Underline:return"underline";case T.LineThin:return"line-thin";case T.BlockOutline:return"block-outline";case T.UnderlineThin:return"underline-thin"}}e.cursorStyleToString=R;function O(Ie){switch(Ie){case"line":return T.Line;case"block":return T.Block;case"underline":return T.Underline;case"line-thin":return T.LineThin;case"block-outline":return T.BlockOutline;case"underline-thin":return T.UnderlineThin}}class x extends i{constructor(){super(128)}compute(Te,De,_e){const Re=["monaco-editor"];return De.get(33)&&Re.push(De.get(33)),Te.extraEditorClassName&&Re.push(Te.extraEditorClassName),De.get(66)==="default"?Re.push("mouse-default"):De.get(66)==="copy"&&Re.push("mouse-copy"),De.get(100)&&Re.push("showUnused"),De.get(126)&&Re.push("showDeprecated"),Re.join(" ")}}class F extends l{constructor(){super(32,"emptySelectionClipboard",!0,{description:t.localize(6,null)})}compute(Te,De,_e){return _e&&Te.emptySelectionClipboard}}class L extends C{constructor(){const Te={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(35,"find",Te,{"editor.find.cursorMoveOnType":{type:"boolean",default:Te.cursorMoveOnType,description:t.localize(7,null)},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:Te.seedSearchStringFromSelection,enumDescriptions:[t.localize(8,null),t.localize(9,null),t.localize(10,null)],description:t.localize(11,null)},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:Te.autoFindInSelection,enumDescriptions:[t.localize(12,null),t.localize(13,null),t.localize(14,null)],description:t.localize(15,null)},"editor.find.globalFindClipboard":{type:"boolean",default:Te.globalFindClipboard,description:t.localize(16,null),included:f.isMacintosh},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:Te.addExtraSpaceOnTop,description:t.localize(17,null)},"editor.find.loop":{type:"boolean",default:Te.loop,description:t.localize(18,null)}})}validate(Te){if(!Te||typeof Te!="object")return this.defaultValue;const De=Te;return{cursorMoveOnType:s(De.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof Te.seedSearchStringFromSelection=="boolean"?Te.seedSearchStringFromSelection?"always":"never":n(De.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof Te.autoFindInSelection=="boolean"?Te.autoFindInSelection?"always":"never":n(De.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:s(De.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:s(De.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:s(De.loop,this.defaultValue.loop)}}}class M extends C{constructor(){super(45,"fontLigatures",M.OFF,{anyOf:[{type:"boolean",description:t.localize(19,null)},{type:"string",description:t.localize(20,null)}],description:t.localize(21,null),default:!1})}validate(Te){return typeof Te=="undefined"?this.defaultValue:typeof Te=="string"?Te==="false"?M.OFF:Te==="true"?M.ON:Te:Boolean(Te)?M.ON:M.OFF}}e.EditorFontLigatures=M,M.OFF='"liga" off, "calt" off',M.ON='"liga" on, "calt" on';class N extends i{constructor(){super(44)}compute(Te,De,_e){return Te.fontInfo}}class B extends S{constructor(){super(46,"fontSize",e.EDITOR_FONT_DEFAULTS.fontSize,{type:"number",minimum:6,maximum:100,default:e.EDITOR_FONT_DEFAULTS.fontSize,description:t.localize(22,null)})}validate(Te){const De=u.float(Te,this.defaultValue);return De===0?e.EDITOR_FONT_DEFAULTS.fontSize:u.clamp(De,6,100)}compute(Te,De,_e){return Te.fontInfo.fontSize}}class P extends C{constructor(){super(47,"fontWeight",e.EDITOR_FONT_DEFAULTS.fontWeight,{anyOf:[{type:"number",minimum:P.MINIMUM_VALUE,maximum:P.MAXIMUM_VALUE,errorMessage:t.localize(23,null)},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:P.SUGGESTION_VALUES}],default:e.EDITOR_FONT_DEFAULTS.fontWeight,description:t.localize(24,null)})}validate(Te){return Te==="normal"||Te==="bold"?Te:String(p.clampedInt(Te,e.EDITOR_FONT_DEFAULTS.fontWeight,P.MINIMUM_VALUE,P.MAXIMUM_VALUE))}}P.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],P.MINIMUM_VALUE=1,P.MAXIMUM_VALUE=1e3;class V extends C{constructor(){const Te={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},De={type:"string",enum:["peek","gotoAndPeek","goto"],default:Te.multiple,enumDescriptions:[t.localize(25,null),t.localize(26,null),t.localize(27,null)]},_e=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(51,"gotoLocation",Te,{"editor.gotoLocation.multiple":{deprecationMessage:t.localize(28,null)},"editor.gotoLocation.multipleDefinitions":{description:t.localize(29,null),...De},"editor.gotoLocation.multipleTypeDefinitions":{description:t.localize(30,null),...De},"editor.gotoLocation.multipleDeclarations":{description:t.localize(31,null),...De},"editor.gotoLocation.multipleImplementations":{description:t.localize(32,null),...De},"editor.gotoLocation.multipleReferences":{description:t.localize(33,null),...De},"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:Te.alternativeDefinitionCommand,enum:_e,description:t.localize(34,null)},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:Te.alternativeTypeDefinitionCommand,enum:_e,description:t.localize(35,null)},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:Te.alternativeDeclarationCommand,enum:_e,description:t.localize(36,null)},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:Te.alternativeImplementationCommand,enum:_e,description:t.localize(37,null)},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:Te.alternativeReferenceCommand,enum:_e,description:t.localize(38,null)}})}validate(Te){if(!Te||typeof Te!="object")return this.defaultValue;const De=Te;return{multiple:n(De.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:De.multipleDefinitions??n(De.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:De.multipleTypeDefinitions??n(De.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:De.multipleDeclarations??n(De.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:De.multipleImplementations??n(De.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:De.multipleReferences??n(De.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:a.string(De.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:a.string(De.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:a.string(De.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:a.string(De.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:a.string(De.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class z extends C{constructor(){const Te={enabled:!0,delay:300,sticky:!0,above:!0};super(53,"hover",Te,{"editor.hover.enabled":{type:"boolean",default:Te.enabled,description:t.localize(39,null)},"editor.hover.delay":{type:"number",default:Te.delay,minimum:0,maximum:1e4,description:t.localize(40,null)},"editor.hover.sticky":{type:"boolean",default:Te.sticky,description:t.localize(41,null)},"editor.hover.above":{type:"boolean",default:Te.above,description:t.localize(42,null)}})}validate(Te){if(!Te||typeof Te!="object")return this.defaultValue;const De=Te;return{enabled:s(De.enabled,this.defaultValue.enabled),delay:p.clampedInt(De.delay,this.defaultValue.delay,0,1e4),sticky:s(De.sticky,this.defaultValue.sticky),above:s(De.above,this.defaultValue.above)}}}var U;(function(Ie){Ie[Ie.None=0]="None",Ie[Ie.Text=1]="Text",Ie[Ie.Blocks=2]="Blocks"})(U=e.RenderMinimap||(e.RenderMinimap={}));class H extends i{constructor(){super(131)}compute(Te,De,_e){return H.computeLayout(De,{memory:Te.memory,outerWidth:Te.outerWidth,outerHeight:Te.outerHeight,isDominatedByLongLines:Te.isDominatedByLongLines,lineHeight:Te.fontInfo.lineHeight,viewLineCount:Te.viewLineCount,lineNumbersDigitCount:Te.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:Te.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:Te.fontInfo.maxDigitWidth,pixelRatio:Te.pixelRatio})}static computeContainedMinimapLineCount(Te){const De=Te.height/Te.lineHeight,_e=Te.scrollBeyondLastLine?De-1:0,Re=(Te.viewLineCount+_e)/(Te.pixelRatio*Te.height),Ne=Math.floor(Te.viewLineCount/Re);return{typicalViewportLineCount:De,extraLinesBeyondLastLine:_e,desiredRatio:Re,minimapLineCount:Ne}}static _computeMinimapLayout(Te,De){const _e=Te.outerWidth,Re=Te.outerHeight,Ne=Te.pixelRatio;if(!Te.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(Ne*Re),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:Re};const xe=De.stableMinimapLayoutInput,Ae=xe&&Te.outerHeight===xe.outerHeight&&Te.lineHeight===xe.lineHeight&&Te.typicalHalfwidthCharacterWidth===xe.typicalHalfwidthCharacterWidth&&Te.pixelRatio===xe.pixelRatio&&Te.scrollBeyondLastLine===xe.scrollBeyondLastLine&&Te.minimap.enabled===xe.minimap.enabled&&Te.minimap.side===xe.minimap.side&&Te.minimap.size===xe.minimap.size&&Te.minimap.showSlider===xe.minimap.showSlider&&Te.minimap.renderCharacters===xe.minimap.renderCharacters&&Te.minimap.maxColumn===xe.minimap.maxColumn&&Te.minimap.scale===xe.minimap.scale&&Te.verticalScrollbarWidth===xe.verticalScrollbarWidth&&Te.isViewportWrapping===xe.isViewportWrapping,Le=Te.lineHeight,Me=Te.typicalHalfwidthCharacterWidth,We=Te.scrollBeyondLastLine,Ve=Te.minimap.renderCharacters;let Ue=Ne>=2?Math.round(Te.minimap.scale*2):Te.minimap.scale;const et=Te.minimap.maxColumn,Ze=Te.minimap.size,Fe=Te.minimap.side,Qe=Te.verticalScrollbarWidth,qe=Te.viewLineCount,Be=Te.remainingWidth,Ke=Te.isViewportWrapping,Xe=Ve?2:3;let rt=Math.floor(Ne*Re);const it=rt/Ne;let at=!1,ft=!1,vt=Xe*Ue,Dt=Ue/Ne,kt=1;if(Ze==="fill"||Ze==="fit"){const{typicalViewportLineCount:pt,extraLinesBeyondLastLine:Et,desiredRatio:yt,minimapLineCount:mt}=H.computeContainedMinimapLineCount({viewLineCount:qe,scrollBeyondLastLine:We,height:Re,lineHeight:Le,pixelRatio:Ne});if(qe/mt>1)at=!0,ft=!0,Ue=1,vt=1,Dt=Ue/Ne;else{let Rt=!1,$e=Ue+1;if(Ze==="fit"){const Pe=Math.ceil((qe+Et)*vt);Ke&&Ae&&Be<=De.stableFitRemainingWidth?(Rt=!0,$e=De.stableFitMaxMinimapScale):Rt=Pe>rt}if(Ze==="fill"||Rt){at=!0;const Pe=Ue;vt=Math.min(Le*Ne,Math.max(1,Math.floor(1/yt))),Ke&&Ae&&Be<=De.stableFitRemainingWidth&&($e=De.stableFitMaxMinimapScale),Ue=Math.min($e,Math.max(1,Math.floor(vt/Xe))),Ue>Pe&&(kt=Math.min(2,Ue/Pe)),Dt=Ue/Ne/kt,rt=Math.ceil(Math.max(pt,qe+Et)*vt),Ke?(De.stableMinimapLayoutInput=Te,De.stableFitRemainingWidth=Be,De.stableFitMaxMinimapScale=Ue):(De.stableMinimapLayoutInput=null,De.stableFitRemainingWidth=0)}}}const At=Math.floor(et*Dt),St=Math.min(At,Math.max(0,Math.floor((Be-Qe-2)*Dt/(Me+Dt)))+e.MINIMAP_GUTTER_WIDTH);let He=Math.floor(Ne*St);const ct=He/Ne;He=Math.floor(He*kt);const lt=Ve?1:2,ut=Fe==="left"?0:_e-St-Qe;return{renderMinimap:lt,minimapLeft:ut,minimapWidth:St,minimapHeightIsEditorHeight:at,minimapIsSampling:ft,minimapScale:Ue,minimapLineHeight:vt,minimapCanvasInnerWidth:He,minimapCanvasInnerHeight:rt,minimapCanvasOuterWidth:ct,minimapCanvasOuterHeight:it}}static computeLayout(Te,De){const _e=De.outerWidth|0,Re=De.outerHeight|0,Ne=De.lineHeight|0,xe=De.lineNumbersDigitCount|0,Ae=De.typicalHalfwidthCharacterWidth,Le=De.maxDigitWidth,Me=De.pixelRatio,We=De.viewLineCount,Ve=Te.get(123),Ue=Ve==="inherit"?Te.get(122):Ve,et=Ue==="inherit"?Te.get(118):Ue,Ze=Te.get(121),Fe=Te.get(2),Qe=De.isDominatedByLongLines,qe=Te.get(50),Be=Te.get(60).renderType!==0,Ke=Te.get(61),Xe=Te.get(94),rt=Te.get(65),it=Te.get(92),at=it.verticalScrollbarSize,ft=it.verticalHasArrows,vt=it.arrowSize,Dt=it.horizontalScrollbarSize,kt=Te.get(58),At=Te.get(37);let St;if(typeof kt=="string"&&/^\d+(\.\d+)?ch$/.test(kt)){const je=parseFloat(kt.substr(0,kt.length-2));St=p.clampedInt(je*Ae,0,0,1e3)}else St=p.clampedInt(kt,0,0,1e3);At&&(St+=16);let He=0;if(Be){const je=Math.max(xe,Ke);He=Math.round(je*Le)}let ct=0;qe&&(ct=Ne);let lt=0,ut=lt+ct,pt=ut+He,Et=pt+St;const yt=_e-ct-He-St;let mt=!1,It=!1,Rt=-1;Fe!==2&&(Ue==="inherit"&&Qe?(mt=!0,It=!0):et==="on"||et==="bounded"?It=!0:et==="wordWrapColumn"&&(Rt=Ze));const $e=H._computeMinimapLayout({outerWidth:_e,outerHeight:Re,lineHeight:Ne,typicalHalfwidthCharacterWidth:Ae,pixelRatio:Me,scrollBeyondLastLine:Xe,minimap:rt,verticalScrollbarWidth:at,viewLineCount:We,remainingWidth:yt,isViewportWrapping:It},De.memory||new v);$e.renderMinimap!==0&&$e.minimapLeft===0&&(lt+=$e.minimapWidth,ut+=$e.minimapWidth,pt+=$e.minimapWidth,Et+=$e.minimapWidth);const Pe=yt-$e.minimapWidth,Ge=Math.max(1,Math.floor((Pe-at-2)/Ae)),Ye=ft?vt:0;return It&&(Rt=Math.max(1,Ge),et==="bounded"&&(Rt=Math.min(Rt,Ze))),{width:_e,height:Re,glyphMarginLeft:lt,glyphMarginWidth:ct,lineNumbersLeft:ut,lineNumbersWidth:He,decorationsLeft:pt,decorationsWidth:St,contentLeft:Et,contentWidth:Pe,minimap:$e,viewportColumn:Ge,isWordWrapMinified:mt,isViewportWrapping:It,wrappingColumn:Rt,verticalScrollbarWidth:at,horizontalScrollbarHeight:Dt,overviewRuler:{top:Ye,width:at,height:Re-2*Ye,right:0}}}}e.EditorLayoutInfoComputer=H;class K extends C{constructor(){const Te={enabled:!0};super(57,"lightbulb",Te,{"editor.lightbulb.enabled":{type:"boolean",default:Te.enabled,description:t.localize(43,null)}})}validate(Te){return!Te||typeof Te!="object"?this.defaultValue:{enabled:s(Te.enabled,this.defaultValue.enabled)}}}class G extends C{constructor(){const Te={enabled:!0,fontSize:0,fontFamily:""};super(127,"inlayHints",Te,{"editor.inlayHints.enabled":{type:"boolean",default:Te.enabled,description:t.localize(44,null)},"editor.inlayHints.fontSize":{type:"number",default:Te.fontSize,markdownDescription:t.localize(45,null)},"editor.inlayHints.fontFamily":{type:"string",default:Te.fontFamily,markdownDescription:t.localize(46,null)}})}validate(Te){if(!Te||typeof Te!="object")return this.defaultValue;const De=Te;return{enabled:s(De.enabled,this.defaultValue.enabled),fontSize:p.clampedInt(De.fontSize,this.defaultValue.fontSize,0,100),fontFamily:a.string(De.fontFamily,this.defaultValue.fontFamily)}}}class q extends u{constructor(){super(59,"lineHeight",e.EDITOR_FONT_DEFAULTS.lineHeight,Te=>u.clamp(Te,0,150),{markdownDescription:t.localize(47,null)})}compute(Te,De,_e){return Te.fontInfo.lineHeight}}class Z extends C{constructor(){const Te={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120,scale:1};super(65,"minimap",Te,{"editor.minimap.enabled":{type:"boolean",default:Te.enabled,description:t.localize(48,null)},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[t.localize(49,null),t.localize(50,null),t.localize(51,null)],default:Te.size,description:t.localize(52,null)},"editor.minimap.side":{type:"string",enum:["left","right"],default:Te.side,description:t.localize(53,null)},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:Te.showSlider,description:t.localize(54,null)},"editor.minimap.scale":{type:"number",default:Te.scale,minimum:1,maximum:3,enum:[1,2,3],description:t.localize(55,null)},"editor.minimap.renderCharacters":{type:"boolean",default:Te.renderCharacters,description:t.localize(56,null)},"editor.minimap.maxColumn":{type:"number",default:Te.maxColumn,description:t.localize(57,null)}})}validate(Te){if(!Te||typeof Te!="object")return this.defaultValue;const De=Te;return{enabled:s(De.enabled,this.defaultValue.enabled),size:n(De.size,this.defaultValue.size,["proportional","fill","fit"]),side:n(De.side,this.defaultValue.side,["right","left"]),showSlider:n(De.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:s(De.renderCharacters,this.defaultValue.renderCharacters),scale:p.clampedInt(De.scale,1,1,3),maxColumn:p.clampedInt(De.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function j(Ie){return Ie==="ctrlCmd"?f.isMacintosh?"metaKey":"ctrlKey":"altKey"}class X extends C{constructor(){super(75,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:t.localize(58,null)},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:t.localize(59,null)}})}validate(Te){if(!Te||typeof Te!="object")return this.defaultValue;const De=Te;return{top:p.clampedInt(De.top,0,0,1e3),bottom:p.clampedInt(De.bottom,0,0,1e3)}}}class Y extends C{constructor(){const Te={enabled:!0,cycle:!1};super(76,"parameterHints",Te,{"editor.parameterHints.enabled":{type:"boolean",default:Te.enabled,description:t.localize(60,null)},"editor.parameterHints.cycle":{type:"boolean",default:Te.cycle,description:t.localize(61,null)}})}validate(Te){if(!Te||typeof Te!="object")return this.defaultValue;const De=Te;return{enabled:s(De.enabled,this.defaultValue.enabled),cycle:s(De.cycle,this.defaultValue.cycle)}}}class $ extends i{constructor(){super(129)}compute(Te,De,_e){return Te.pixelRatio}}class J extends C{constructor(){const Te={other:"on",comments:"off",strings:"off"},De=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[t.localize(62,null),t.localize(63,null),t.localize(64,null)]}];super(79,"quickSuggestions",Te,{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{anyOf:De,default:Te.strings,description:t.localize(65,null)},comments:{anyOf:De,default:Te.comments,description:t.localize(66,null)},other:{anyOf:De,default:Te.other,description:t.localize(67,null)}}}],default:Te,markdownDescription:t.localize(68,null)});this.defaultValue=Te}validate(Te){if(typeof Te=="boolean"){const Me=Te?"on":"off";return{comments:Me,strings:Me,other:Me}}if(!Te||typeof Te!="object")return this.defaultValue;const{other:De,comments:_e,strings:Re}=Te,Ne=["on","inline","off"];let xe,Ae,Le;return typeof De=="boolean"?xe=De?"on":"off":xe=n(De,this.defaultValue.other,Ne),typeof _e=="boolean"?Ae=_e?"on":"off":Ae=n(_e,this.defaultValue.comments,Ne),typeof Re=="boolean"?Le=Re?"on":"off":Le=n(Re,this.defaultValue.strings,Ne),{other:xe,comments:Ae,strings:Le}}}var ee;(function(Ie){Ie[Ie.Off=0]="Off",Ie[Ie.On=1]="On",Ie[Ie.Relative=2]="Relative",Ie[Ie.Interval=3]="Interval",Ie[Ie.Custom=4]="Custom"})(ee=e.RenderLineNumbersType||(e.RenderLineNumbersType={}));class te extends C{constructor(){super(60,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[t.localize(69,null),t.localize(70,null),t.localize(71,null),t.localize(72,null)],default:"on",description:t.localize(73,null)})}validate(Te){let De=this.defaultValue.renderType,_e=this.defaultValue.renderFn;return typeof Te!="undefined"&&(typeof Te=="function"?(De=4,_e=Te):Te==="interval"?De=3:Te==="relative"?De=2:Te==="on"?De=1:De=0),{renderType:De,renderFn:_e}}}function se(Ie){const Te=Ie.get(87);return Te==="editable"?Ie.get(81):Te!=="on"}e.filterValidationDecorations=se;class ie extends C{constructor(){const Te=[],De={type:"number",description:t.localize(74,null)};super(91,"rulers",Te,{type:"array",items:{anyOf:[De,{type:["object"],properties:{column:De,color:{type:"string",description:t.localize(75,null),format:"color-hex"}}}]},default:Te,description:t.localize(76,null)})}validate(Te){if(Array.isArray(Te)){const De=[];for(let _e of Te)if(typeof _e=="number")De.push({column:p.clampedInt(_e,0,0,1e4),color:null});else if(_e&&typeof _e=="object"){const Re=_e;De.push({column:p.clampedInt(Re.column,0,0,1e4),color:Re.color})}return De.sort((_e,Re)=>_e.column-Re.column),De}return this.defaultValue}}function ce(Ie,Te){if(typeof Ie!="string")return Te;switch(Ie){case"hidden":return 2;case"visible":return 3;default:return 1}}class le extends C{constructor(){const Te={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1};super(92,"scrollbar",Te,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[t.localize(77,null),t.localize(78,null),t.localize(79,null)],default:"auto",description:t.localize(80,null)},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[t.localize(81,null),t.localize(82,null),t.localize(83,null)],default:"auto",description:t.localize(84,null)},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:Te.verticalScrollbarSize,description:t.localize(85,null)},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:Te.horizontalScrollbarSize,description:t.localize(86,null)},"editor.scrollbar.scrollByPage":{type:"boolean",default:Te.scrollByPage,description:t.localize(87,null)}})}validate(Te){if(!Te||typeof Te!="object")return this.defaultValue;const De=Te,_e=p.clampedInt(De.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),Re=p.clampedInt(De.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:p.clampedInt(De.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:ce(De.vertical,this.defaultValue.vertical),horizontal:ce(De.horizontal,this.defaultValue.horizontal),useShadows:s(De.useShadows,this.defaultValue.useShadows),verticalHasArrows:s(De.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:s(De.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:s(De.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:s(De.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:_e,horizontalSliderSize:p.clampedInt(De.horizontalSliderSize,_e,0,1e3),verticalScrollbarSize:Re,verticalSliderSize:p.clampedInt(De.verticalSliderSize,Re,0,1e3),scrollByPage:s(De.scrollByPage,this.defaultValue.scrollByPage)}}}e.inUntrustedWorkspace="inUntrustedWorkspace",e.unicodeHighlightConfigKeys={allowedCharacters:"editor.unicodeHighlight.allowedCharacters",invisibleCharacters:"editor.unicodeHighlight.invisibleCharacters",nonBasicASCII:"editor.unicodeHighlight.nonBasicASCII",ambiguousCharacters:"editor.unicodeHighlight.ambiguousCharacters",includeComments:"editor.unicodeHighlight.includeComments",includeStrings:"editor.unicodeHighlight.includeStrings",allowedLocales:"editor.unicodeHighlight.allowedLocales"};class ae extends C{constructor(){const Te={nonBasicASCII:e.inUntrustedWorkspace,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:e.inUntrustedWorkspace,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(113,"unicodeHighlight",Te,{[e.unicodeHighlightConfigKeys.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:Te.nonBasicASCII,description:t.localize(88,null)},[e.unicodeHighlightConfigKeys.invisibleCharacters]:{restricted:!0,type:"boolean",default:Te.invisibleCharacters,description:t.localize(89,null)},[e.unicodeHighlightConfigKeys.ambiguousCharacters]:{restricted:!0,type:"boolean",default:Te.ambiguousCharacters,description:t.localize(90,null)},[e.unicodeHighlightConfigKeys.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:Te.includeComments,description:t.localize(91,null)},[e.unicodeHighlightConfigKeys.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:Te.includeStrings,description:t.localize(92,null)},[e.unicodeHighlightConfigKeys.allowedCharacters]:{restricted:!0,type:"object",default:Te.allowedCharacters,description:t.localize(93,null),additionalProperties:{type:"boolean"}},[e.unicodeHighlightConfigKeys.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:Te.allowedLocales,description:t.localize(94,null)}})}applyUpdate(Te,De){let _e=!1;De.allowedCharacters&&(k.equals(Te.allowedCharacters,De.allowedCharacters)||(Te={...Te,allowedCharacters:De.allowedCharacters},_e=!0)),De.allowedLocales&&(k.equals(Te.allowedLocales,De.allowedLocales)||(Te={...Te,allowedLocales:De.allowedLocales},_e=!0));const Re=super.applyUpdate(Te,De);return _e?new o(Re.newValue,!0):Re}validate(Te){if(!Te||typeof Te!="object")return this.defaultValue;const De=Te;return{nonBasicASCII:pe(De.nonBasicASCII,e.inUntrustedWorkspace,[!0,!1,e.inUntrustedWorkspace]),invisibleCharacters:s(De.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:s(De.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:pe(De.includeComments,e.inUntrustedWorkspace,[!0,!1,e.inUntrustedWorkspace]),includeStrings:pe(De.includeStrings,e.inUntrustedWorkspace,[!0,!1,e.inUntrustedWorkspace]),allowedCharacters:this.validateBooleanMap(Te.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(Te.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(Te,De){if(typeof Te!="object"||!Te)return De;const _e={};for(const[Re,Ne]of Object.entries(Te))Ne===!0&&(_e[Re]=!0);return _e}}class ue extends C{constructor(){const Te={enabled:!0,mode:"subwordSmart"};super(55,"inlineSuggest",Te,{"editor.inlineSuggest.enabled":{type:"boolean",default:Te.enabled,description:t.localize(95,null)}})}validate(Te){if(!Te||typeof Te!="object")return this.defaultValue;const De=Te;return{enabled:s(De.enabled,this.defaultValue.enabled),mode:n(De.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"])}}}class oe extends C{constructor(){const Te={enabled:D.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:D.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(12,"bracketPairColorization",Te,{"editor.bracketPairColorization.enabled":{type:"boolean",default:Te.enabled,markdownDescription:t.localize(96,null)},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:Te.independentColorPoolPerBracketType,description:t.localize(97,null)}})}validate(Te){if(!Te||typeof Te!="object")return this.defaultValue;const De=Te;return{enabled:s(De.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:s(De.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}class fe extends C{constructor(){const Te={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(13,"guides",Te,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[t.localize(98,null),t.localize(99,null),t.localize(100,null)],default:Te.bracketPairs,description:t.localize(101,null)},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[t.localize(102,null),t.localize(103,null),t.localize(104,null)],default:Te.bracketPairsHorizontal,description:t.localize(105,null)},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:Te.highlightActiveBracketPair,description:t.localize(106,null)},"editor.guides.indentation":{type:"boolean",default:Te.indentation,description:t.localize(107,null)},"editor.guides.highlightActiveIndentation":{type:"boolean",default:Te.highlightActiveIndentation,description:t.localize(108,null)}})}validate(Te){if(!Te||typeof Te!="object")return this.defaultValue;const De=Te;return{bracketPairs:pe(De.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:pe(De.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:s(De.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:s(De.indentation,this.defaultValue.indentation),highlightActiveIndentation:s(De.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation)}}}function pe(Ie,Te,De){const _e=De.indexOf(Ie);return _e===-1?Te:De[_e]}class me extends C{constructor(){const Te={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(106,"suggest",Te,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[t.localize(109,null),t.localize(110,null)],default:Te.insertMode,description:t.localize(111,null)},"editor.suggest.filterGraceful":{type:"boolean",default:Te.filterGraceful,description:t.localize(112,null)},"editor.suggest.localityBonus":{type:"boolean",default:Te.localityBonus,description:t.localize(113,null)},"editor.suggest.shareSuggestSelections":{type:"boolean",default:Te.shareSuggestSelections,markdownDescription:t.localize(114,null)},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:Te.snippetsPreventQuickSuggestions,description:t.localize(115,null)},"editor.suggest.showIcons":{type:"boolean",default:Te.showIcons,description:t.localize(116,null)},"editor.suggest.showStatusBar":{type:"boolean",default:Te.showStatusBar,description:t.localize(117,null)},"editor.suggest.preview":{type:"boolean",default:Te.preview,description:t.localize(118,null)},"editor.suggest.showInlineDetails":{type:"boolean",default:Te.showInlineDetails,description:t.localize(119,null)},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:t.localize(120,null)},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:t.localize(121,null)},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:t.localize(122,null)},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:t.localize(123,null)},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:t.localize(124,null)},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:t.localize(125,null)},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:t.localize(126,null)},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:t.localize(127,null)},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:t.localize(128,null)},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:t.localize(129,null)},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:t.localize(130,null)},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:t.localize(131,null)},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:t.localize(132,null)},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:t.localize(133,null)},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:t.localize(134,null)},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:t.localize(135,null)},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:t.localize(136,null)},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:t.localize(137,null)},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:t.localize(138,null)},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:t.localize(139,null)},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:t.localize(140,null)},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:t.localize(141,null)},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:t.localize(142,null)},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:t.localize(143,null)},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:t.localize(144,null)},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:t.localize(145,null)},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:t.localize(146,null)},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:t.localize(147,null)},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:t.localize(148,null)},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:t.localize(149,null)},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:t.localize(150,null)}})}validate(Te){if(!Te||typeof Te!="object")return this.defaultValue;const De=Te;return{insertMode:n(De.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:s(De.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:s(De.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:s(De.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:s(De.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:s(De.showIcons,this.defaultValue.showIcons),showStatusBar:s(De.showStatusBar,this.defaultValue.showStatusBar),preview:s(De.preview,this.defaultValue.preview),previewMode:n(De.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:s(De.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:s(De.showMethods,this.defaultValue.showMethods),showFunctions:s(De.showFunctions,this.defaultValue.showFunctions),showConstructors:s(De.showConstructors,this.defaultValue.showConstructors),showDeprecated:s(De.showDeprecated,this.defaultValue.showDeprecated),showFields:s(De.showFields,this.defaultValue.showFields),showVariables:s(De.showVariables,this.defaultValue.showVariables),showClasses:s(De.showClasses,this.defaultValue.showClasses),showStructs:s(De.showStructs,this.defaultValue.showStructs),showInterfaces:s(De.showInterfaces,this.defaultValue.showInterfaces),showModules:s(De.showModules,this.defaultValue.showModules),showProperties:s(De.showProperties,this.defaultValue.showProperties),showEvents:s(De.showEvents,this.defaultValue.showEvents),showOperators:s(De.showOperators,this.defaultValue.showOperators),showUnits:s(De.showUnits,this.defaultValue.showUnits),showValues:s(De.showValues,this.defaultValue.showValues),showConstants:s(De.showConstants,this.defaultValue.showConstants),showEnums:s(De.showEnums,this.defaultValue.showEnums),showEnumMembers:s(De.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:s(De.showKeywords,this.defaultValue.showKeywords),showWords:s(De.showWords,this.defaultValue.showWords),showColors:s(De.showColors,this.defaultValue.showColors),showFiles:s(De.showFiles,this.defaultValue.showFiles),showReferences:s(De.showReferences,this.defaultValue.showReferences),showFolders:s(De.showFolders,this.defaultValue.showFolders),showTypeParameters:s(De.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:s(De.showSnippets,this.defaultValue.showSnippets),showUsers:s(De.showUsers,this.defaultValue.showUsers),showIssues:s(De.showIssues,this.defaultValue.showIssues)}}}class be extends C{constructor(){super(102,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:t.localize(151,null),default:!0,type:"boolean"}})}validate(Te){return!Te||typeof Te!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:s(Te.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}}}class Ce extends i{constructor(){super(130)}compute(Te,De,_e){return De.get(81)?!0:Te.tabFocusMode}}var ve;(function(Ie){Ie[Ie.None=0]="None",Ie[Ie.Same=1]="Same",Ie[Ie.Indent=2]="Indent",Ie[Ie.DeepIndent=3]="DeepIndent"})(ve=e.WrappingIndent||(e.WrappingIndent={}));function he(Ie){switch(Ie){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}}class ge extends i{constructor(){super(132)}compute(Te,De,_e){const Re=De.get(131);return{isDominatedByLongLines:Te.isDominatedByLongLines,isWordWrapMinified:Re.isWordWrapMinified,isViewportWrapping:Re.isViewportWrapping,wrappingColumn:Re.wrappingColumn}}}const de="Consolas, 'Courier New', monospace",Se="Menlo, Monaco, 'Courier New', monospace",we="'Droid Sans Mono', 'monospace', monospace";e.EDITOR_FONT_DEFAULTS={fontFamily:f.isMacintosh?Se:f.isLinux?we:de,fontWeight:"normal",fontSize:f.isMacintosh?12:14,lineHeight:0,letterSpacing:0},e.editorOptionsRegistry=[];function ye(Ie){return e.editorOptionsRegistry[Ie.id]=Ie,Ie}var ke;(function(Ie){Ie[Ie.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",Ie[Ie.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",Ie[Ie.accessibilitySupport=2]="accessibilitySupport",Ie[Ie.accessibilityPageSize=3]="accessibilityPageSize",Ie[Ie.ariaLabel=4]="ariaLabel",Ie[Ie.autoClosingBrackets=5]="autoClosingBrackets",Ie[Ie.autoClosingDelete=6]="autoClosingDelete",Ie[Ie.autoClosingOvertype=7]="autoClosingOvertype",Ie[Ie.autoClosingQuotes=8]="autoClosingQuotes",Ie[Ie.autoIndent=9]="autoIndent",Ie[Ie.automaticLayout=10]="automaticLayout",Ie[Ie.autoSurround=11]="autoSurround",Ie[Ie.bracketPairColorization=12]="bracketPairColorization",Ie[Ie.guides=13]="guides",Ie[Ie.codeLens=14]="codeLens",Ie[Ie.codeLensFontFamily=15]="codeLensFontFamily",Ie[Ie.codeLensFontSize=16]="codeLensFontSize",Ie[Ie.colorDecorators=17]="colorDecorators",Ie[Ie.columnSelection=18]="columnSelection",Ie[Ie.comments=19]="comments",Ie[Ie.contextmenu=20]="contextmenu",Ie[Ie.copyWithSyntaxHighlighting=21]="copyWithSyntaxHighlighting",Ie[Ie.cursorBlinking=22]="cursorBlinking",Ie[Ie.cursorSmoothCaretAnimation=23]="cursorSmoothCaretAnimation",Ie[Ie.cursorStyle=24]="cursorStyle",Ie[Ie.cursorSurroundingLines=25]="cursorSurroundingLines",Ie[Ie.cursorSurroundingLinesStyle=26]="cursorSurroundingLinesStyle",Ie[Ie.cursorWidth=27]="cursorWidth",Ie[Ie.disableLayerHinting=28]="disableLayerHinting",Ie[Ie.disableMonospaceOptimizations=29]="disableMonospaceOptimizations",Ie[Ie.domReadOnly=30]="domReadOnly",Ie[Ie.dragAndDrop=31]="dragAndDrop",Ie[Ie.emptySelectionClipboard=32]="emptySelectionClipboard",Ie[Ie.extraEditorClassName=33]="extraEditorClassName",Ie[Ie.fastScrollSensitivity=34]="fastScrollSensitivity",Ie[Ie.find=35]="find",Ie[Ie.fixedOverflowWidgets=36]="fixedOverflowWidgets",Ie[Ie.folding=37]="folding",Ie[Ie.foldingStrategy=38]="foldingStrategy",Ie[Ie.foldingHighlight=39]="foldingHighlight",Ie[Ie.foldingImportsByDefault=40]="foldingImportsByDefault",Ie[Ie.foldingMaximumRegions=41]="foldingMaximumRegions",Ie[Ie.unfoldOnClickAfterEndOfLine=42]="unfoldOnClickAfterEndOfLine",Ie[Ie.fontFamily=43]="fontFamily",Ie[Ie.fontInfo=44]="fontInfo",Ie[Ie.fontLigatures=45]="fontLigatures",Ie[Ie.fontSize=46]="fontSize",Ie[Ie.fontWeight=47]="fontWeight",Ie[Ie.formatOnPaste=48]="formatOnPaste",Ie[Ie.formatOnType=49]="formatOnType",Ie[Ie.glyphMargin=50]="glyphMargin",Ie[Ie.gotoLocation=51]="gotoLocation",Ie[Ie.hideCursorInOverviewRuler=52]="hideCursorInOverviewRuler",Ie[Ie.hover=53]="hover",Ie[Ie.inDiffEditor=54]="inDiffEditor",Ie[Ie.inlineSuggest=55]="inlineSuggest",Ie[Ie.letterSpacing=56]="letterSpacing",Ie[Ie.lightbulb=57]="lightbulb",Ie[Ie.lineDecorationsWidth=58]="lineDecorationsWidth",Ie[Ie.lineHeight=59]="lineHeight",Ie[Ie.lineNumbers=60]="lineNumbers",Ie[Ie.lineNumbersMinChars=61]="lineNumbersMinChars",Ie[Ie.linkedEditing=62]="linkedEditing",Ie[Ie.links=63]="links",Ie[Ie.matchBrackets=64]="matchBrackets",Ie[Ie.minimap=65]="minimap",Ie[Ie.mouseStyle=66]="mouseStyle",Ie[Ie.mouseWheelScrollSensitivity=67]="mouseWheelScrollSensitivity",Ie[Ie.mouseWheelZoom=68]="mouseWheelZoom",Ie[Ie.multiCursorMergeOverlapping=69]="multiCursorMergeOverlapping",Ie[Ie.multiCursorModifier=70]="multiCursorModifier",Ie[Ie.multiCursorPaste=71]="multiCursorPaste",Ie[Ie.occurrencesHighlight=72]="occurrencesHighlight",Ie[Ie.overviewRulerBorder=73]="overviewRulerBorder",Ie[Ie.overviewRulerLanes=74]="overviewRulerLanes",Ie[Ie.padding=75]="padding",Ie[Ie.parameterHints=76]="parameterHints",Ie[Ie.peekWidgetDefaultFocus=77]="peekWidgetDefaultFocus",Ie[Ie.definitionLinkOpensInPeek=78]="definitionLinkOpensInPeek",Ie[Ie.quickSuggestions=79]="quickSuggestions",Ie[Ie.quickSuggestionsDelay=80]="quickSuggestionsDelay",Ie[Ie.readOnly=81]="readOnly",Ie[Ie.renameOnType=82]="renameOnType",Ie[Ie.renderControlCharacters=83]="renderControlCharacters",Ie[Ie.renderFinalNewline=84]="renderFinalNewline",Ie[Ie.renderLineHighlight=85]="renderLineHighlight",Ie[Ie.renderLineHighlightOnlyWhenFocus=86]="renderLineHighlightOnlyWhenFocus",Ie[Ie.renderValidationDecorations=87]="renderValidationDecorations",Ie[Ie.renderWhitespace=88]="renderWhitespace",Ie[Ie.revealHorizontalRightPadding=89]="revealHorizontalRightPadding",Ie[Ie.roundedSelection=90]="roundedSelection",Ie[Ie.rulers=91]="rulers",Ie[Ie.scrollbar=92]="scrollbar",Ie[Ie.scrollBeyondLastColumn=93]="scrollBeyondLastColumn",Ie[Ie.scrollBeyondLastLine=94]="scrollBeyondLastLine",Ie[Ie.scrollPredominantAxis=95]="scrollPredominantAxis",Ie[Ie.selectionClipboard=96]="selectionClipboard",Ie[Ie.selectionHighlight=97]="selectionHighlight",Ie[Ie.selectOnLineNumbers=98]="selectOnLineNumbers",Ie[Ie.showFoldingControls=99]="showFoldingControls",Ie[Ie.showUnused=100]="showUnused",Ie[Ie.snippetSuggestions=101]="snippetSuggestions",Ie[Ie.smartSelect=102]="smartSelect",Ie[Ie.smoothScrolling=103]="smoothScrolling",Ie[Ie.stickyTabStops=104]="stickyTabStops",Ie[Ie.stopRenderingLineAfter=105]="stopRenderingLineAfter",Ie[Ie.suggest=106]="suggest",Ie[Ie.suggestFontSize=107]="suggestFontSize",Ie[Ie.suggestLineHeight=108]="suggestLineHeight",Ie[Ie.suggestOnTriggerCharacters=109]="suggestOnTriggerCharacters",Ie[Ie.suggestSelection=110]="suggestSelection",Ie[Ie.tabCompletion=111]="tabCompletion",Ie[Ie.tabIndex=112]="tabIndex",Ie[Ie.unicodeHighlighting=113]="unicodeHighlighting",Ie[Ie.unusualLineTerminators=114]="unusualLineTerminators",Ie[Ie.useShadowDOM=115]="useShadowDOM",Ie[Ie.useTabStops=116]="useTabStops",Ie[Ie.wordSeparators=117]="wordSeparators",Ie[Ie.wordWrap=118]="wordWrap",Ie[Ie.wordWrapBreakAfterCharacters=119]="wordWrapBreakAfterCharacters",Ie[Ie.wordWrapBreakBeforeCharacters=120]="wordWrapBreakBeforeCharacters",Ie[Ie.wordWrapColumn=121]="wordWrapColumn",Ie[Ie.wordWrapOverride1=122]="wordWrapOverride1",Ie[Ie.wordWrapOverride2=123]="wordWrapOverride2",Ie[Ie.wrappingIndent=124]="wrappingIndent",Ie[Ie.wrappingStrategy=125]="wrappingStrategy",Ie[Ie.showDeprecated=126]="showDeprecated",Ie[Ie.inlayHints=127]="inlayHints",Ie[Ie.editorClassName=128]="editorClassName",Ie[Ie.pixelRatio=129]="pixelRatio",Ie[Ie.tabFocusMode=130]="tabFocusMode",Ie[Ie.layoutInfo=131]="layoutInfo",Ie[Ie.wrappingInfo=132]="wrappingInfo"})(ke=e.EditorOption||(e.EditorOption={})),e.EditorOptions={acceptSuggestionOnCommitCharacter:ye(new l(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:t.localize(152,null)})),acceptSuggestionOnEnter:ye(new h(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",t.localize(153,null),""],markdownDescription:t.localize(154,null)})),accessibilitySupport:ye(new m),accessibilityPageSize:ye(new p(3,"accessibilityPageSize",10,1,1073741824,{description:t.localize(155,null)})),ariaLabel:ye(new a(4,"ariaLabel",t.localize(156,null))),autoClosingBrackets:ye(new h(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",t.localize(157,null),t.localize(158,null),""],description:t.localize(159,null)})),autoClosingDelete:ye(new h(6,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",t.localize(160,null),""],description:t.localize(161,null)})),autoClosingOvertype:ye(new h(7,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",t.localize(162,null),""],description:t.localize(163,null)})),autoClosingQuotes:ye(new h(8,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",t.localize(164,null),t.localize(165,null),""],description:t.localize(166,null)})),autoIndent:ye(new g(9,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],d,{enumDescriptions:[t.localize(167,null),t.localize(168,null),t.localize(169,null),t.localize(170,null),t.localize(171,null)],description:t.localize(172,null)})),automaticLayout:ye(new l(10,"automaticLayout",!1)),autoSurround:ye(new h(11,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[t.localize(173,null),t.localize(174,null),t.localize(175,null),""],description:t.localize(176,null)})),bracketPairColorization:ye(new oe),bracketPairGuides:ye(new fe),stickyTabStops:ye(new l(104,"stickyTabStops",!1,{description:t.localize(177,null)})),codeLens:ye(new l(14,"codeLens",!0,{description:t.localize(178,null)})),codeLensFontFamily:ye(new a(15,"codeLensFontFamily","",{description:t.localize(179,null)})),codeLensFontSize:ye(new p(16,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:t.localize(180,null)})),colorDecorators:ye(new l(17,"colorDecorators",!0,{description:t.localize(181,null)})),columnSelection:ye(new l(18,"columnSelection",!1,{description:t.localize(182,null)})),comments:ye(new b),contextmenu:ye(new l(20,"contextmenu",!0)),copyWithSyntaxHighlighting:ye(new l(21,"copyWithSyntaxHighlighting",!0,{description:t.localize(183,null)})),cursorBlinking:ye(new g(22,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],y,{description:t.localize(184,null)})),cursorSmoothCaretAnimation:ye(new l(23,"cursorSmoothCaretAnimation",!1,{description:t.localize(185,null)})),cursorStyle:ye(new g(24,"cursorStyle",T.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],O,{description:t.localize(186,null)})),cursorSurroundingLines:ye(new p(25,"cursorSurroundingLines",0,0,1073741824,{description:t.localize(187,null)})),cursorSurroundingLinesStyle:ye(new h(26,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[t.localize(188,null),t.localize(189,null)],description:t.localize(190,null)})),cursorWidth:ye(new p(27,"cursorWidth",0,0,1073741824,{markdownDescription:t.localize(191,null)})),disableLayerHinting:ye(new l(28,"disableLayerHinting",!1)),disableMonospaceOptimizations:ye(new l(29,"disableMonospaceOptimizations",!1)),domReadOnly:ye(new l(30,"domReadOnly",!1)),dragAndDrop:ye(new l(31,"dragAndDrop",!0,{description:t.localize(192,null)})),emptySelectionClipboard:ye(new F),extraEditorClassName:ye(new a(33,"extraEditorClassName","")),fastScrollSensitivity:ye(new u(34,"fastScrollSensitivity",5,Ie=>Ie<=0?5:Ie,{markdownDescription:t.localize(193,null)})),find:ye(new L),fixedOverflowWidgets:ye(new l(36,"fixedOverflowWidgets",!1)),folding:ye(new l(37,"folding",!0,{description:t.localize(194,null)})),foldingStrategy:ye(new h(38,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[t.localize(195,null),t.localize(196,null)],description:t.localize(197,null)})),foldingHighlight:ye(new l(39,"foldingHighlight",!0,{description:t.localize(198,null)})),foldingImportsByDefault:ye(new l(40,"foldingImportsByDefault",!1,{description:t.localize(199,null)})),foldingMaximumRegions:ye(new p(41,"foldingMaximumRegions",5e3,10,65e3,{description:t.localize(200,null)})),unfoldOnClickAfterEndOfLine:ye(new l(42,"unfoldOnClickAfterEndOfLine",!1,{description:t.localize(201,null)})),fontFamily:ye(new a(43,"fontFamily",e.EDITOR_FONT_DEFAULTS.fontFamily,{description:t.localize(202,null)})),fontInfo:ye(new N),fontLigatures2:ye(new M),fontSize:ye(new B),fontWeight:ye(new P),formatOnPaste:ye(new l(48,"formatOnPaste",!1,{description:t.localize(203,null)})),formatOnType:ye(new l(49,"formatOnType",!1,{description:t.localize(204,null)})),glyphMargin:ye(new l(50,"glyphMargin",!0,{description:t.localize(205,null)})),gotoLocation:ye(new V),hideCursorInOverviewRuler:ye(new l(52,"hideCursorInOverviewRuler",!1,{description:t.localize(206,null)})),hover:ye(new z),inDiffEditor:ye(new l(54,"inDiffEditor",!1)),letterSpacing:ye(new u(56,"letterSpacing",e.EDITOR_FONT_DEFAULTS.letterSpacing,Ie=>u.clamp(Ie,-5,20),{description:t.localize(207,null)})),lightbulb:ye(new K),lineDecorationsWidth:ye(new S(58,"lineDecorationsWidth",10)),lineHeight:ye(new q),lineNumbers:ye(new te),lineNumbersMinChars:ye(new p(61,"lineNumbersMinChars",5,1,300)),linkedEditing:ye(new l(62,"linkedEditing",!1,{description:t.localize(208,null)})),links:ye(new l(63,"links",!0,{description:t.localize(209,null)})),matchBrackets:ye(new h(64,"matchBrackets","always",["always","near","never"],{description:t.localize(210,null)})),minimap:ye(new Z),mouseStyle:ye(new h(66,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:ye(new u(67,"mouseWheelScrollSensitivity",1,Ie=>Ie===0?1:Ie,{markdownDescription:t.localize(211,null)})),mouseWheelZoom:ye(new l(68,"mouseWheelZoom",!1,{markdownDescription:t.localize(212,null)})),multiCursorMergeOverlapping:ye(new l(69,"multiCursorMergeOverlapping",!0,{description:t.localize(213,null)})),multiCursorModifier:ye(new g(70,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],j,{markdownEnumDescriptions:[t.localize(214,null),t.localize(215,null)],markdownDescription:t.localize(216,null)})),multiCursorPaste:ye(new h(71,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[t.localize(217,null),t.localize(218,null)],markdownDescription:t.localize(219,null)})),occurrencesHighlight:ye(new l(72,"occurrencesHighlight",!0,{description:t.localize(220,null)})),overviewRulerBorder:ye(new l(73,"overviewRulerBorder",!0,{description:t.localize(221,null)})),overviewRulerLanes:ye(new p(74,"overviewRulerLanes",3,0,3)),padding:ye(new X),parameterHints:ye(new Y),peekWidgetDefaultFocus:ye(new h(77,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[t.localize(222,null),t.localize(223,null)],description:t.localize(224,null)})),definitionLinkOpensInPeek:ye(new l(78,"definitionLinkOpensInPeek",!1,{description:t.localize(225,null)})),quickSuggestions:ye(new J),quickSuggestionsDelay:ye(new p(80,"quickSuggestionsDelay",10,0,1073741824,{description:t.localize(226,null)})),readOnly:ye(new l(81,"readOnly",!1)),renameOnType:ye(new l(82,"renameOnType",!1,{description:t.localize(227,null),markdownDeprecationMessage:t.localize(228,null)})),renderControlCharacters:ye(new l(83,"renderControlCharacters",!0,{description:t.localize(229,null),restricted:!0})),renderFinalNewline:ye(new l(84,"renderFinalNewline",!0,{description:t.localize(230,null)})),renderLineHighlight:ye(new h(85,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",t.localize(231,null)],description:t.localize(232,null)})),renderLineHighlightOnlyWhenFocus:ye(new l(86,"renderLineHighlightOnlyWhenFocus",!1,{description:t.localize(233,null)})),renderValidationDecorations:ye(new h(87,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:ye(new h(88,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",t.localize(234,null),t.localize(235,null),t.localize(236,null),""],description:t.localize(237,null)})),revealHorizontalRightPadding:ye(new p(89,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:ye(new l(90,"roundedSelection",!0,{description:t.localize(238,null)})),rulers:ye(new ie),scrollbar:ye(new le),scrollBeyondLastColumn:ye(new p(93,"scrollBeyondLastColumn",5,0,1073741824,{description:t.localize(239,null)})),scrollBeyondLastLine:ye(new l(94,"scrollBeyondLastLine",!0,{description:t.localize(240,null)})),scrollPredominantAxis:ye(new l(95,"scrollPredominantAxis",!0,{description:t.localize(241,null)})),selectionClipboard:ye(new l(96,"selectionClipboard",!0,{description:t.localize(242,null),included:f.isLinux})),selectionHighlight:ye(new l(97,"selectionHighlight",!0,{description:t.localize(243,null)})),selectOnLineNumbers:ye(new l(98,"selectOnLineNumbers",!0)),showFoldingControls:ye(new h(99,"showFoldingControls","mouseover",["always","mouseover"],{enumDescriptions:[t.localize(244,null),t.localize(245,null)],description:t.localize(246,null)})),showUnused:ye(new l(100,"showUnused",!0,{description:t.localize(247,null)})),showDeprecated:ye(new l(126,"showDeprecated",!0,{description:t.localize(248,null)})),inlayHints:ye(new G),snippetSuggestions:ye(new h(101,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[t.localize(249,null),t.localize(250,null),t.localize(251,null),t.localize(252,null)],description:t.localize(253,null)})),smartSelect:ye(new be),smoothScrolling:ye(new l(103,"smoothScrolling",!1,{description:t.localize(254,null)})),stopRenderingLineAfter:ye(new p(105,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:ye(new me),inlineSuggest:ye(new ue),suggestFontSize:ye(new p(107,"suggestFontSize",0,0,1e3,{markdownDescription:t.localize(255,null)})),suggestLineHeight:ye(new p(108,"suggestLineHeight",0,0,1e3,{markdownDescription:t.localize(256,null)})),suggestOnTriggerCharacters:ye(new l(109,"suggestOnTriggerCharacters",!0,{description:t.localize(257,null)})),suggestSelection:ye(new h(110,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[t.localize(258,null),t.localize(259,null),t.localize(260,null)],description:t.localize(261,null)})),tabCompletion:ye(new h(111,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[t.localize(262,null),t.localize(263,null),t.localize(264,null)],description:t.localize(265,null)})),tabIndex:ye(new p(112,"tabIndex",0,-1,1073741824)),unicodeHighlight:ye(new ae),unusualLineTerminators:ye(new h(114,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[t.localize(266,null),t.localize(267,null),t.localize(268,null)],description:t.localize(269,null)})),useShadowDOM:ye(new l(115,"useShadowDOM",!0)),useTabStops:ye(new l(116,"useTabStops",!0,{description:t.localize(270,null)})),wordSeparators:ye(new a(117,"wordSeparators",_.USUAL_WORD_SEPARATORS,{description:t.localize(271,null)})),wordWrap:ye(new h(118,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[t.localize(272,null),t.localize(273,null),t.localize(274,null),t.localize(275,null)],description:t.localize(276,null)})),wordWrapBreakAfterCharacters:ye(new a(119,"wordWrapBreakAfterCharacters"," })]?|/&.,;\xA2\xB0\u2032\u2033\u2030\u2103\u3001\u3002\uFF61\uFF64\uFFE0\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF01\uFF05\u30FB\uFF65\u309D\u309E\u30FD\u30FE\u30FC\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u31F0\u31F1\u31F2\u31F3\u31F4\u31F5\u31F6\u31F7\u31F8\u31F9\u31FA\u31FB\u31FC\u31FD\u31FE\u31FF\u3005\u303B\uFF67\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F\uFF70\u201D\u3009\u300B\u300D\u300F\u3011\u3015\uFF09\uFF3D\uFF5D\uFF63")),wordWrapBreakBeforeCharacters:ye(new a(120,"wordWrapBreakBeforeCharacters","([{\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\xA3\xA5\uFF04\uFFE1\uFFE5+\uFF0B")),wordWrapColumn:ye(new p(121,"wordWrapColumn",80,1,1073741824,{markdownDescription:t.localize(277,null)})),wordWrapOverride1:ye(new h(122,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:ye(new h(123,"wordWrapOverride2","inherit",["off","on","inherit"])),wrappingIndent:ye(new g(124,"wrappingIndent",1,"same",["none","same","indent","deepIndent"],he,{enumDescriptions:[t.localize(278,null),t.localize(279,null),t.localize(280,null),t.localize(281,null)],description:t.localize(282,null)})),wrappingStrategy:ye(new h(125,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[t.localize(283,null),t.localize(284,null)],description:t.localize(285,null)})),editorClassName:ye(new x),pixelRatio:ye(new $),tabFocusMode:ye(new Ce),layoutInfo:ye(new H),wrappingInfo:ye(new ge)}}),define(ne[227],re([1,0,77,128,123]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.applyFontInfo=void 0;function A(k,D){k instanceof f.FastDomNode?(k.setFontFamily(D.getMassagedFontFamily(t.isSafari?_.EDITOR_FONT_DEFAULTS.fontFamily:null)),k.setFontWeight(D.fontWeight),k.setFontSize(D.fontSize),k.setFontFeatureSettings(D.fontFeatureSettings),k.setLineHeight(D.lineHeight),k.setLetterSpacing(D.letterSpacing)):(k.style.fontFamily=D.getMassagedFontFamily(t.isSafari?_.EDITOR_FONT_DEFAULTS.fontFamily:null),k.style.fontWeight=D.fontWeight,k.style.fontSize=D.fontSize+"px",k.style.fontFeatureSettings=D.fontFeatureSettings,k.style.lineHeight=D.lineHeight+"px",k.style.letterSpacing=D.letterSpacing+"px")}e.applyFontInfo=A}),define(ne[1242],re([1,0,227]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readCharWidths=e.CharWidthRequest=e.CharWidthRequestType=void 0;var f;(function(D){D[D.Regular=0]="Regular",D[D.Italic=1]="Italic",D[D.Bold=2]="Bold"})(f=e.CharWidthRequestType||(e.CharWidthRequestType={}));class _{constructor(I,w){this.chr=I,this.type=w,this.width=0}fulfill(I){this.width=I}}e.CharWidthRequest=_;class A{constructor(I,w){this._bareFontInfo=I,this._requests=w,this._container=null,this._testElements=null}read(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null}_createDomElements(){const I=document.createElement("div");I.style.position="absolute",I.style.top="-50000px",I.style.width="50000px";const w=document.createElement("div");(0,t.applyFontInfo)(w,this._bareFontInfo),I.appendChild(w);const v=document.createElement("div");(0,t.applyFontInfo)(v,this._bareFontInfo),v.style.fontWeight="bold",I.appendChild(v);const C=document.createElement("div");(0,t.applyFontInfo)(C,this._bareFontInfo),C.style.fontStyle="italic",I.appendChild(C);const o=[];for(const c of this._requests){let i;c.type===0&&(i=w),c.type===2&&(i=v),c.type===1&&(i=C),i.appendChild(document.createElement("br"));const S=document.createElement("span");A._render(S,c),i.appendChild(S),o.push(S)}this._container=I,this._testElements=o}static _render(I,w){if(w.chr===" "){let v="\xA0";for(let C=0;C<8;C++)v+=v;I.innerText=v}else{let v=w.chr;for(let C=0;C<8;C++)v+=v;I.textContent=v}}_readFromDomElements(){for(let I=0,w=this._requests.length;I<w;I++){const v=this._requests[I],C=this._testElements[I];v.fulfill(C.offsetWidth/256)}}}function k(D,I){new A(D,I).read()}e.readCharWidths=k}),define(ne[1243],re([1,0,282,29,227,307,695]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DOMLineBreaksComputerFactory=void 0;const D=window.trustedTypes?.createPolicy("domLineBreaksComputer",{createHTML:S=>S});class I{static create(){return new I}constructor(){}createLineBreaksComputer(s,l,r,p){const u=[],a=[];return{addRequest:(n,h,g)=>{u.push(n),a.push(h)},finalize:()=>w(u,s,l,r,p,a)}}}e.DOMLineBreaksComputerFactory=I;function w(S,s,l,r,p,u){function a(B){const P=u[B];if(P){const V=A.LineInjectedText.applyInjectedText(S[B],P),z=P.map(H=>H.options),U=P.map(H=>H.column-1);return new k.ModelLineProjectionData(U,z,[V.length],[],0)}else return null}if(r===-1){const B=[];for(let P=0,V=S.length;P<V;P++)B[P]=a(P);return B}const n=Math.round(r*s.typicalHalfwidthCharacterWidth),g=Math.round(l*(p===3?2:p===2?1:0)),d=Math.ceil(s.spaceWidth*g),m=document.createElement("div");(0,_.applyFontInfo)(m,s);const b=(0,t.createStringBuilder)(1e4),E=[],y=[],T=[],R=[],O=[];for(let B=0;B<S.length;B++){const P=A.LineInjectedText.applyInjectedText(S[B],u[B]);let V=0,z=0,U=n;if(p!==0)if(V=f.firstNonWhitespaceIndex(P),V===-1)V=0;else{for(let q=0;q<V;q++)z+=P.charCodeAt(q)===9?l-z%l:1;const G=Math.ceil(s.spaceWidth*z);G+s.typicalFullwidthCharacterWidth>n?(V=0,z=0):U=n-G}const H=P.substr(V),K=C(H,z,l,U,b,d);E[B]=V,y[B]=z,T[B]=H,R[B]=K[0],O[B]=K[1]}const x=b.build(),F=D?.createHTML(x)??x;m.innerHTML=F,m.style.position="absolute",m.style.top="10000",m.style.wordWrap="break-word",document.body.appendChild(m);const L=document.createRange(),M=Array.prototype.slice.call(m.children,0),N=[];for(let B=0;B<S.length;B++){const P=M[B],V=o(L,P,T[B],R[B]);if(V===null){N[B]=a(B);continue}const z=E[B],U=y[B]+g,H=O[B],K=[];for(let j=0,X=V.length;j<X;j++)K[j]=H[V[j]];if(z!==0)for(let j=0,X=V.length;j<X;j++)V[j]+=z;let G,q;const Z=u[B];Z?(G=Z.map(j=>j.options),q=Z.map(j=>j.column-1)):(G=null,q=null),N[B]=new k.ModelLineProjectionData(q,G,V,K,U)}return document.body.removeChild(m),N}var v;(function(S){S[S.SPAN_MODULO_LIMIT=16384]="SPAN_MODULO_LIMIT"})(v||(v={}));function C(S,s,l,r,p,u){if(u!==0){const b=String(u);p.appendASCIIString('<div style="text-indent: -'),p.appendASCIIString(b),p.appendASCIIString("px; padding-left: "),p.appendASCIIString(b),p.appendASCIIString("px; box-sizing: border-box; width:")}else p.appendASCIIString('<div style="width:');p.appendASCIIString(String(r)),p.appendASCIIString('px;">');const a=S.length;let n=s,h=0;const g=[],d=[];let m=0<a?S.charCodeAt(0):0;p.appendASCIIString("<span>");for(let b=0;b<a;b++){b!==0&&b%16384==0&&p.appendASCIIString("</span><span>"),g[b]=h,d[b]=n;const E=m;m=b+1<a?S.charCodeAt(b+1):0;let y=1,T=1;switch(E){case 9:y=l-n%l,T=y;for(let R=1;R<=y;R++)R<y?p.write1(160):p.appendASCII(32);break;case 32:m===32?p.write1(160):p.appendASCII(32);break;case 60:p.appendASCIIString("<");break;case 62:p.appendASCIIString(">");break;case 38:p.appendASCIIString("&");break;case 0:p.appendASCIIString("�");break;case 65279:case 8232:case 8233:case 133:p.write1(65533);break;default:f.isFullWidthCharacter(E)&&T++,E<32?p.write1(9216+E):p.write1(E)}h+=y,n+=T}return p.appendASCIIString("</span>"),g[S.length]=h,d[S.length]=n,p.appendASCIIString("</div>"),[g,d]}function o(S,s,l,r){if(l.length<=1)return null;const p=Array.prototype.slice.call(s.children,0),u=[];try{c(S,p,r,0,null,l.length-1,null,u)}catch(a){return console.log(a),null}return u.length===0?null:(u.push(l.length),u)}function c(S,s,l,r,p,u,a,n){if(r===u||(p=p||i(S,s,l[r],l[r+1]),a=a||i(S,s,l[u],l[u+1]),Math.abs(p[0].top-a[0].top)<=.1))return;if(r+1===u){n.push(u);return}const h=r+(u-r)/2|0,g=i(S,s,l[h],l[h+1]);c(S,s,l,r,p,h,g,n),c(S,s,l,h,g,u,a,n)}function i(S,s,l,r){return S.setStart(s[l/16384|0].firstChild,l%16384),S.setEnd(s[r/16384|0].firstChild,r%16384),S.getClientRects()}}),define(ne[1244],re([1,0,128,227,524,182]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarginViewOverlays=e.ContentViewOverlays=e.ViewOverlayLine=e.ViewOverlays=void 0;class k extends A.ViewPart{constructor(C){super(C);this._visibleLines=new _.VisibleLinesCollection(this),this.domNode=this._visibleLines.domNode,this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let C=0,o=this._dynamicOverlays.length;C<o;C++)if(this._dynamicOverlays[C].shouldRender())return!0;return!1}dispose(){super.dispose();for(let C=0,o=this._dynamicOverlays.length;C<o;C++)this._dynamicOverlays[C].dispose();this._dynamicOverlays=[]}getDomNode(){return this.domNode}createVisibleLine(){return new D(this._context.configuration,this._dynamicOverlays)}addDynamicOverlay(C){this._dynamicOverlays.push(C)}onConfigurationChanged(C){this._visibleLines.onConfigurationChanged(C);const o=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let i=o;i<=c;i++)this._visibleLines.getVisibleLine(i).onConfigurationChanged(C);return!0}onFlushed(C){return this._visibleLines.onFlushed(C)}onFocusChanged(C){return this._isFocused=C.isFocused,!0}onLinesChanged(C){return this._visibleLines.onLinesChanged(C)}onLinesDeleted(C){return this._visibleLines.onLinesDeleted(C)}onLinesInserted(C){return this._visibleLines.onLinesInserted(C)}onScrollChanged(C){return this._visibleLines.onScrollChanged(C)||!0}onTokensChanged(C){return this._visibleLines.onTokensChanged(C)}onZonesChanged(C){return this._visibleLines.onZonesChanged(C)}prepareRender(C){const o=this._dynamicOverlays.filter(c=>c.shouldRender());for(let c=0,i=o.length;c<i;c++){const S=o[c];S.prepareRender(C),S.onDidRender()}}render(C){this._viewOverlaysRender(C),this.domNode.toggleClassName("focused",this._isFocused)}_viewOverlaysRender(C){this._visibleLines.renderLines(C.viewportData)}}e.ViewOverlays=k;class D{constructor(C,o){this._configuration=C,this._lineHeight=this._configuration.options.get(59),this._dynamicOverlays=o,this._domNode=null,this._renderedContent=null}getDomNode(){return this._domNode?this._domNode.domNode:null}setDomNode(C){this._domNode=(0,t.createFastDomNode)(C)}onContentChanged(){}onTokensChanged(){}onConfigurationChanged(C){this._lineHeight=this._configuration.options.get(59)}renderLine(C,o,c,i){let S="";for(let s=0,l=this._dynamicOverlays.length;s<l;s++)S+=this._dynamicOverlays[s].render(c.startLineNumber,C);return this._renderedContent===S?!1:(this._renderedContent=S,i.appendASCIIString('<div style="position:absolute;top:'),i.appendASCIIString(String(o)),i.appendASCIIString("px;width:100%;height:"),i.appendASCIIString(String(this._lineHeight)),i.appendASCIIString('px;">'),i.appendASCIIString(S),i.appendASCIIString("</div>"),!0)}layoutLine(C,o){this._domNode&&(this._domNode.setTop(o),this._domNode.setHeight(this._lineHeight))}}e.ViewOverlayLine=D;class I extends k{constructor(C){super(C);const c=this._context.configuration.options.get(131);this._contentWidth=c.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(C){const c=this._context.configuration.options.get(131);return this._contentWidth=c.contentWidth,super.onConfigurationChanged(C)||!0}onScrollChanged(C){return super.onScrollChanged(C)||C.scrollWidthChanged}_viewOverlaysRender(C){super._viewOverlaysRender(C),this.domNode.setWidth(Math.max(C.scrollWidth,this._contentWidth))}}e.ContentViewOverlays=I;class w extends k{constructor(C){super(C);const o=this._context.configuration.options,c=o.get(131);this._contentLeft=c.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),(0,f.applyFontInfo)(this.domNode,o.get(44))}onConfigurationChanged(C){const o=this._context.configuration.options;(0,f.applyFontInfo)(this.domNode,o.get(44));const c=o.get(131);return this._contentLeft=c.contentLeft,super.onConfigurationChanged(C)||!0}onScrollChanged(C){return super.onScrollChanged(C)||C.scrollHeightChanged}_viewOverlaysRender(C){super._viewOverlaysRender(C);const o=Math.min(C.scrollHeight,1e6);this.domNode.setHeight(o),this.domNode.setWidth(this._contentLeft)}}e.MarginViewOverlays=w}),define(ne[1245],re([1,0,10,128,29,227,123,49,20,304]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewCursor=void 0;class v{constructor(c,i,S,s,l,r){this.top=c,this.left=i,this.width=S,this.height=s,this.textContent=l,this.textContentClassName=r}}class C{constructor(c){this._context=c;const i=this._context.configuration.options,S=i.get(44);this._cursorStyle=i.get(24),this._lineHeight=i.get(59),this._typicalHalfwidthCharacterWidth=S.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(i.get(27),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=(0,f.createFastDomNode)(document.createElement("div")),this._domNode.setClassName(`cursor ${w.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),(0,A.applyFontInfo)(this._domNode,S),this._domNode.setDisplay("none"),this._position=new D.Position(1,1),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(c){const i=this._context.configuration.options,S=i.get(44);return this._cursorStyle=i.get(24),this._lineHeight=i.get(59),this._typicalHalfwidthCharacterWidth=S.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(i.get(27),this._typicalHalfwidthCharacterWidth),(0,A.applyFontInfo)(this._domNode,S),!0}onCursorPositionChanged(c){return this._position=c,!0}_getGraphemeAwarePosition(){const{lineNumber:c,column:i}=this._position,S=this._context.viewModel.getLineContent(c),[s,l]=_.getCharContainingOffset(S,i-1);return[new D.Position(c,s+1),S.substring(s,l)]}_prepareRender(c){let i="";const[S,s]=this._getGraphemeAwarePosition();if(this._cursorStyle===k.TextEditorCursorStyle.Line||this._cursorStyle===k.TextEditorCursorStyle.LineThin){const g=c.visibleRangeForPosition(S);if(!g||g.outsideRenderedLine)return null;let d;this._cursorStyle===k.TextEditorCursorStyle.Line?(d=t.computeScreenAwareSize(this._lineCursorWidth>0?this._lineCursorWidth:2),d>2&&(i=s)):d=t.computeScreenAwareSize(1);let m=g.left;d>=2&&m>=1&&(m-=1);const b=c.getVerticalOffsetForLineNumber(S.lineNumber)-c.bigNumbersDelta;return new v(b,m,d,this._lineHeight,i,"")}const l=c.linesVisibleRangesForRange(new I.Range(S.lineNumber,S.column,S.lineNumber,S.column+s.length),!1);if(!l||l.length===0)return null;const r=l[0];if(r.outsideRenderedLine||r.ranges.length===0)return null;const p=r.ranges[0],u=p.width<1?this._typicalHalfwidthCharacterWidth:p.width;let a="";if(this._cursorStyle===k.TextEditorCursorStyle.Block){const g=this._context.viewModel.getViewLineData(S.lineNumber);i=s;const d=g.tokens.findTokenIndexAtOffset(S.column-1);a=g.tokens.getClassName(d)}let n=c.getVerticalOffsetForLineNumber(S.lineNumber)-c.bigNumbersDelta,h=this._lineHeight;return(this._cursorStyle===k.TextEditorCursorStyle.Underline||this._cursorStyle===k.TextEditorCursorStyle.UnderlineThin)&&(n+=this._lineHeight-2,h=2),new v(n,p.left,u,h,i,a)}prepareRender(c){this._renderData=this._prepareRender(c)}render(c){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${w.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}e.ViewCursor=C}),define(ne[263],re([1,0,14,123,454]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontInfo=e.SERIALIZED_FONT_INFO_VERSION=e.BareFontInfo=void 0;const A=t.isMacintosh?1.5:1.35,k=8;class D{constructor(v){this._bareFontInfoBrand=void 0,this.pixelRatio=v.pixelRatio,this.fontFamily=String(v.fontFamily),this.fontWeight=String(v.fontWeight),this.fontSize=v.fontSize,this.fontFeatureSettings=v.fontFeatureSettings,this.lineHeight=v.lineHeight|0,this.letterSpacing=v.letterSpacing}static createFromValidatedSettings(v,C,o){const c=v.get(43),i=v.get(47),S=v.get(46),s=v.get(45),l=v.get(59),r=v.get(56);return D._create(c,i,S,s,l,r,C,o)}static createFromRawSettings(v,C,o=!1){const c=f.EditorOptions.fontFamily.validate(v.fontFamily),i=f.EditorOptions.fontWeight.validate(v.fontWeight),S=f.EditorOptions.fontSize.validate(v.fontSize),s=f.EditorOptions.fontLigatures2.validate(v.fontLigatures),l=f.EditorOptions.lineHeight.validate(v.lineHeight),r=f.EditorOptions.letterSpacing.validate(v.letterSpacing);return D._create(c,i,S,s,l,r,C,o)}static _create(v,C,o,c,i,S,s,l){i===0?i=A*o:i<k&&(i=i*o),i=Math.round(i),i<k&&(i=k);const r=1+(l?0:_.EditorZoom.getZoomLevel()*.1);return o*=r,i*=r,new D({pixelRatio:s,fontFamily:v,fontWeight:C,fontSize:o,fontFeatureSettings:c,lineHeight:i,letterSpacing:S})}getId(){return`${this.pixelRatio}-${this.fontFamily}-${this.fontWeight}-${this.fontSize}-${this.fontFeatureSettings}-${this.lineHeight}-${this.letterSpacing}`}getMassagedFontFamily(v){const C=D._wrapInQuotes(this.fontFamily);return v&&this.fontFamily!==v?`${C}, ${v}`:C}static _wrapInQuotes(v){return/[,"']/.test(v)?v:/[+ ]/.test(v)?`"${v}"`:v}}e.BareFontInfo=D,e.SERIALIZED_FONT_INFO_VERSION=1;class I extends D{constructor(v,C){super(v);this._editorStylingBrand=void 0,this.version=e.SERIALIZED_FONT_INFO_VERSION,this.isTrusted=C,this.isMonospace=v.isMonospace,this.typicalHalfwidthCharacterWidth=v.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=v.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=v.canUseHalfwidthRightwardsArrow,this.spaceWidth=v.spaceWidth,this.middotWidth=v.middotWidth,this.wsmiddotWidth=v.wsmiddotWidth,this.maxDigitWidth=v.maxDigitWidth}equals(v){return this.fontFamily===v.fontFamily&&this.fontWeight===v.fontWeight&&this.fontSize===v.fontSize&&this.fontFeatureSettings===v.fontFeatureSettings&&this.lineHeight===v.lineHeight&&this.letterSpacing===v.letterSpacing&&this.typicalHalfwidthCharacterWidth===v.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===v.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===v.canUseHalfwidthRightwardsArrow&&this.spaceWidth===v.spaceWidth&&this.middotWidth===v.middotWidth&&this.wsmiddotWidth===v.wsmiddotWidth&&this.maxDigitWidth===v.maxDigitWidth}}e.FontInfo=I}),define(ne[393],re([1,0,77,6,2,1242,123,263]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontMeasurements=void 0;class I extends _.Disposable{constructor(){super();this._onDidChange=this._register(new f.Emitter),this.onDidChange=this._onDidChange.event,this._cache=new w,this._evictUntrustedReadingsTimeout=-1}dispose(){this._evictUntrustedReadingsTimeout!==-1&&(window.clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearAllFontInfos(){this._cache=new w,this._onDidChange.fire()}_writeToCache(C,o){this._cache.put(C,o),!o.isTrusted&&this._evictUntrustedReadingsTimeout===-1&&(this._evictUntrustedReadingsTimeout=window.setTimeout(()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()},5e3))}_evictUntrustedReadings(){const C=this._cache.getValues();let o=!1;for(const c of C)c.isTrusted||(o=!0,this._cache.remove(c));o&&this._onDidChange.fire()}serializeFontInfo(){return this._cache.getValues().filter(C=>C.isTrusted)}restoreFontInfo(C){for(const o of C){if(o.version!==D.SERIALIZED_FONT_INFO_VERSION)continue;const c=new D.FontInfo(o,!1);this._writeToCache(c,c)}}readFontInfo(C){if(!this._cache.has(C)){let o=this._actualReadFontInfo(C);(o.typicalHalfwidthCharacterWidth<=2||o.typicalFullwidthCharacterWidth<=2||o.spaceWidth<=2||o.maxDigitWidth<=2)&&(o=new D.FontInfo({pixelRatio:t.PixelRatio.value,fontFamily:o.fontFamily,fontWeight:o.fontWeight,fontSize:o.fontSize,fontFeatureSettings:o.fontFeatureSettings,lineHeight:o.lineHeight,letterSpacing:o.letterSpacing,isMonospace:o.isMonospace,typicalHalfwidthCharacterWidth:Math.max(o.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(o.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:o.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(o.spaceWidth,5),middotWidth:Math.max(o.middotWidth,5),wsmiddotWidth:Math.max(o.wsmiddotWidth,5),maxDigitWidth:Math.max(o.maxDigitWidth,5)},!1)),this._writeToCache(C,o)}return this._cache.get(C)}_createRequest(C,o,c,i){const S=new A.CharWidthRequest(C,o);return c.push(S),i&&i.push(S),S}_actualReadFontInfo(C){const o=[],c=[],i=this._createRequest("n",0,o,c),S=this._createRequest("\uFF4D",0,o,null),s=this._createRequest(" ",0,o,c),l=this._createRequest("0",0,o,c),r=this._createRequest("1",0,o,c),p=this._createRequest("2",0,o,c),u=this._createRequest("3",0,o,c),a=this._createRequest("4",0,o,c),n=this._createRequest("5",0,o,c),h=this._createRequest("6",0,o,c),g=this._createRequest("7",0,o,c),d=this._createRequest("8",0,o,c),m=this._createRequest("9",0,o,c),b=this._createRequest("\u2192",0,o,c),E=this._createRequest("\uFFEB",0,o,null),y=this._createRequest("\xB7",0,o,c),T=this._createRequest(String.fromCharCode(11825),0,o,null),R="|/-_ilm%";for(let M=0,N=R.length;M<N;M++)this._createRequest(R.charAt(M),0,o,c),this._createRequest(R.charAt(M),1,o,c),this._createRequest(R.charAt(M),2,o,c);(0,A.readCharWidths)(C,o);const O=Math.max(l.width,r.width,p.width,u.width,a.width,n.width,h.width,g.width,d.width,m.width);let x=C.fontFeatureSettings===k.EditorFontLigatures.OFF;const F=c[0].width;for(let M=1,N=c.length;x&&M<N;M++){const B=F-c[M].width;if(B<-.001||B>.001){x=!1;break}}let L=!0;return x&&E.width!==F&&(L=!1),E.width>b.width&&(L=!1),new D.FontInfo({pixelRatio:t.PixelRatio.value,fontFamily:C.fontFamily,fontWeight:C.fontWeight,fontSize:C.fontSize,fontFeatureSettings:C.fontFeatureSettings,lineHeight:C.lineHeight,letterSpacing:C.letterSpacing,isMonospace:x,typicalHalfwidthCharacterWidth:i.width,typicalFullwidthCharacterWidth:S.width,canUseHalfwidthRightwardsArrow:L,spaceWidth:s.width,middotWidth:y.width,wsmiddotWidth:T.width,maxDigitWidth:O},!0)}}class w{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(C){const o=C.getId();return!!this._values[o]}get(C){const o=C.getId();return this._values[o]}put(C,o){const c=C.getId();this._keys[c]=C,this._values[c]=o}remove(C){const o=C.getId();delete this._keys[o],delete this._values[o]}getValues(){return Object.keys(this._keys).map(C=>this._values[C])}}e.FontMeasurements=new I}),define(ne[720],re([1,0,49,20,259,123]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isModelDecorationInString=e.isModelDecorationInComment=e.isModelDecorationVisible=e.ViewModelDecorations=void 0;class k{constructor(o,c,i,S,s){this.editorId=o,this.model=c,this.configuration=i,this._linesCollection=S,this._coordinatesConverter=s,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(o){const c=o.id;let i=this._decorationsCache[c];if(!i){const S=o.range,s=o.options;let l;if(s.isWholeLine){const r=this._coordinatesConverter.convertModelPositionToViewPosition(new t.Position(S.startLineNumber,1),0),p=this._coordinatesConverter.convertModelPositionToViewPosition(new t.Position(S.endLineNumber,this.model.getLineMaxColumn(S.endLineNumber)),1);l=new f.Range(r.lineNumber,r.column,p.lineNumber,p.column)}else l=this._coordinatesConverter.convertModelRangeToViewRange(S,1);i=new _.ViewModelDecoration(l,s),this._decorationsCache[c]=i}return i}getDecorationsViewportData(o){let c=this._cachedModelDecorationsResolver!==null;return c=c&&o.equalsRange(this._cachedModelDecorationsResolverViewRange),c||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(o),this._cachedModelDecorationsResolverViewRange=o),this._cachedModelDecorationsResolver}_getDecorationsViewportData(o){const c=this._linesCollection.getDecorationsInRange(o,this.editorId,(0,A.filterValidationDecorations)(this.configuration.options)),i=o.startLineNumber,S=o.endLineNumber,s=[];let l=0;const r=[];for(let p=i;p<=S;p++)r[p-i]=[];for(let p=0,u=c.length;p<u;p++){const a=c[p],n=a.options;if(!D(this.model,a))continue;const h=this._getOrCreateViewModelDecoration(a),g=h.range;if(s[l++]=h,n.inlineClassName){const d=new _.InlineDecoration(g,n.inlineClassName,n.inlineClassNameAffectsLetterSpacing?3:0),m=Math.max(i,g.startLineNumber),b=Math.min(S,g.endLineNumber);for(let E=m;E<=b;E++)r[E-i].push(d)}if(n.beforeContentClassName&&i<=g.startLineNumber&&g.startLineNumber<=S){const d=new _.InlineDecoration(new f.Range(g.startLineNumber,g.startColumn,g.startLineNumber,g.startColumn),n.beforeContentClassName,1);r[g.startLineNumber-i].push(d)}if(n.afterContentClassName&&i<=g.endLineNumber&&g.endLineNumber<=S){const d=new _.InlineDecoration(new f.Range(g.endLineNumber,g.endColumn,g.endLineNumber,g.endColumn),n.afterContentClassName,2);r[g.endLineNumber-i].push(d)}}return{decorations:s,inlineDecorations:r}}}e.ViewModelDecorations=k;function D(C,o){return!(o.options.hideInCommentTokens&&I(C,o)||o.options.hideInStringTokens&&w(C,o))}e.isModelDecorationVisible=D;function I(C,o){return v(C,o.range,c=>c===1)}e.isModelDecorationInComment=I;function w(C,o){return v(C,o.range,c=>c===2)}e.isModelDecorationInString=w;function v(C,o,c){for(let i=o.startLineNumber;i<=o.endLineNumber;i++){const S=C.getLineTokens(i),s=i===o.startLineNumber,l=i===o.endLineNumber;let r=s?S.findTokenIndexAtOffset(o.startColumn-1):0;for(;r<S.getCount()&&!(l&&S.getStartOffset(r)>o.endColumn-1);){if(!c(S.getStandardTokenType(r)))return!1;r++}}return!0}}),define(ne[1246],re([3,4]),function(Q,e){return Q.create("vs/editor/common/core/editorColorRegistry",e)}),define(ne[1247],re([3,4]),function(Q,e){return Q.create("vs/editor/common/editorContextKeys",e)}),define(ne[1248],re([3,4]),function(Q,e){return Q.create("vs/editor/common/languages/modesRegistry",e)}),define(ne[1249],re([3,4]),function(Q,e){return Q.create("vs/editor/common/model/editStack",e)}),define(ne[394],re([1,0,1249,22,84,9,687,60,19]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditStack=e.isEditStackElement=e.MultiModelEditStackElement=e.SingleModelEditStackElement=e.SingleModelEditStackData=void 0;function w(s){return s.toString()}class v{constructor(l,r,p,u,a,n,h){this.beforeVersionId=l,this.afterVersionId=r,this.beforeEOL=p,this.afterEOL=u,this.beforeCursorState=a,this.afterCursorState=n,this.changes=h}static create(l,r){const p=l.getAlternativeVersionId(),u=c(l);return new v(p,p,u,u,r,r,[])}append(l,r,p,u,a){r.length>0&&(this.changes=(0,k.compressConsecutiveTextChanges)(this.changes,r)),this.afterEOL=p,this.afterVersionId=u,this.afterCursorState=a}static _writeSelectionsSize(l){return 4+4*4*(l?l.length:0)}static _writeSelections(l,r,p){if(D.writeUInt32BE(l,r?r.length:0,p),p+=4,r)for(const u of r)D.writeUInt32BE(l,u.selectionStartLineNumber,p),p+=4,D.writeUInt32BE(l,u.selectionStartColumn,p),p+=4,D.writeUInt32BE(l,u.positionLineNumber,p),p+=4,D.writeUInt32BE(l,u.positionColumn,p),p+=4;return p}static _readSelections(l,r,p){const u=D.readUInt32BE(l,r);r+=4;for(let a=0;a<u;a++){const n=D.readUInt32BE(l,r);r+=4;const h=D.readUInt32BE(l,r);r+=4;const g=D.readUInt32BE(l,r);r+=4;const d=D.readUInt32BE(l,r);r+=4,p.push(new _.Selection(n,h,g,d))}return r}serialize(){let l=4+4+1+1+v._writeSelectionsSize(this.beforeCursorState)+v._writeSelectionsSize(this.afterCursorState)+4;for(const u of this.changes)l+=u.writeSize();const r=new Uint8Array(l);let p=0;D.writeUInt32BE(r,this.beforeVersionId,p),p+=4,D.writeUInt32BE(r,this.afterVersionId,p),p+=4,D.writeUInt8(r,this.beforeEOL,p),p+=1,D.writeUInt8(r,this.afterEOL,p),p+=1,p=v._writeSelections(r,this.beforeCursorState,p),p=v._writeSelections(r,this.afterCursorState,p),D.writeUInt32BE(r,this.changes.length,p),p+=4;for(const u of this.changes)p=u.write(r,p);return r.buffer}static deserialize(l){const r=new Uint8Array(l);let p=0;const u=D.readUInt32BE(r,p);p+=4;const a=D.readUInt32BE(r,p);p+=4;const n=D.readUInt8(r,p);p+=1;const h=D.readUInt8(r,p);p+=1;const g=[];p=v._readSelections(r,p,g);const d=[];p=v._readSelections(r,p,d);const m=D.readUInt32BE(r,p);p+=4;const b=[];for(let E=0;E<m;E++)p=k.TextChange.read(r,p,b);return new v(u,a,n,h,g,d,b)}}e.SingleModelEditStackData=v;class C{constructor(l,r,p,u){this.label=l,this.code=r,this.model=p,this._data=v.create(p,u)}get type(){return 0}get resource(){return A.URI.isUri(this.model)?this.model:this.model.uri}toString(){return(this._data instanceof v?this._data:v.deserialize(this._data)).changes.map(r=>r.toString()).join(", ")}matchesResource(l){return(A.URI.isUri(this.model)?this.model:this.model.uri).toString()===l.toString()}setModel(l){this.model=l}canAppend(l){return this.model===l&&this._data instanceof v}append(l,r,p,u,a){this._data instanceof v&&this._data.append(l,r,p,u,a)}close(){this._data instanceof v&&(this._data=this._data.serialize())}open(){this._data instanceof v||(this._data=v.deserialize(this._data))}undo(){if(A.URI.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof v&&(this._data=this._data.serialize());const l=v.deserialize(this._data);this.model._applyUndo(l.changes,l.beforeEOL,l.beforeVersionId,l.beforeCursorState)}redo(){if(A.URI.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof v&&(this._data=this._data.serialize());const l=v.deserialize(this._data);this.model._applyRedo(l.changes,l.afterEOL,l.afterVersionId,l.afterCursorState)}heapSize(){return this._data instanceof v&&(this._data=this._data.serialize()),this._data.byteLength+168}}e.SingleModelEditStackElement=C;class o{constructor(l,r,p){this.label=l,this.code=r,this.type=1,this._isOpen=!0,this._editStackElementsArr=p.slice(0),this._editStackElementsMap=new Map;for(const u of this._editStackElementsArr){const a=w(u.resource);this._editStackElementsMap.set(a,u)}this._delegate=null}get resources(){return this._editStackElementsArr.map(l=>l.resource)}setDelegate(l){this._delegate=l}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}getMissingModels(){const l=[];for(const r of this._editStackElementsArr)A.URI.isUri(r.model)&&l.push(r.model);return l}matchesResource(l){const r=w(l);return this._editStackElementsMap.has(r)}setModel(l){const r=w(A.URI.isUri(l)?l:l.uri);this._editStackElementsMap.has(r)&&this._editStackElementsMap.get(r).setModel(l)}canAppend(l){if(!this._isOpen)return!1;const r=w(l.uri);return this._editStackElementsMap.has(r)?this._editStackElementsMap.get(r).canAppend(l):!1}append(l,r,p,u,a){const n=w(l.uri);this._editStackElementsMap.get(n).append(l,r,p,u,a)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const l of this._editStackElementsArr)l.undo()}redo(){for(const l of this._editStackElementsArr)l.redo()}heapSize(l){const r=w(l);return this._editStackElementsMap.has(r)?this._editStackElementsMap.get(r).heapSize():0}split(){return this._editStackElementsArr}toString(){let l=[];for(const r of this._editStackElementsArr)l.push(`${(0,I.basename)(r.resource)}: ${r}`);return`{${l.join(", ")}}`}}e.MultiModelEditStackElement=o;function c(s){return s.getEOL()===` `?0:1}function i(s){return s?s instanceof C||s instanceof o:!1}e.isEditStackElement=i;class S{constructor(l,r){this._model=l,this._undoRedoService=r}pushStackElement(){const l=this._undoRedoService.getLastElement(this._model.uri);i(l)&&l.close()}popStackElement(){const l=this._undoRedoService.getLastElement(this._model.uri);i(l)&&l.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(l){const r=this._undoRedoService.getLastElement(this._model.uri);if(i(r)&&r.canAppend(this._model))return r;const p=new C(t.localize(0,null),"undoredo.textBufferEdit",this._model,l);return this._undoRedoService.pushElement(p),p}pushEOL(l){const r=this._getOrCreateEditStackElement(null);this._model.setEOL(l),r.append(this._model,[],c(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(l,r,p){const u=this._getOrCreateEditStackElement(l),a=this._model.applyEdits(r,!0),n=S._computeCursorState(p,a),h=a.map((g,d)=>({index:d,textChange:g.textChange}));return h.sort((g,d)=>g.textChange.oldPosition===d.textChange.oldPosition?g.index-d.index:g.textChange.oldPosition-d.textChange.oldPosition),u.append(this._model,h.map(g=>g.textChange),c(this._model),this._model.getAlternativeVersionId(),n),n}static _computeCursorState(l,r){try{return l?l(r):null}catch(p){return(0,f.onUnexpectedError)(p),null}}}e.EditStack=S}),define(ne[1250],re([3,4]),function(Q,e){return Q.create("vs/editor/common/standaloneStrings",e)}),define(ne[1251],re([1,0,1250]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneServicesNLS=e.ToggleHighContrastNLS=e.StandaloneCodeEditorNLS=e.QuickOutlineNLS=e.QuickCommandNLS=e.QuickHelpNLS=e.GoToLineNLS=e.InspectTokensNLS=e.AccessibilityHelpNLS=void 0;var f;(function(o){o.noSelection=t.localize(0,null),o.singleSelectionRange=t.localize(1,null),o.singleSelection=t.localize(2,null),o.multiSelectionRange=t.localize(3,null),o.multiSelection=t.localize(4,null),o.emergencyConfOn=t.localize(5,null),o.openingDocs=t.localize(6,null),o.readonlyDiffEditor=t.localize(7,null),o.editableDiffEditor=t.localize(8,null),o.readonlyEditor=t.localize(9,null),o.editableEditor=t.localize(10,null),o.changeConfigToOnMac=t.localize(11,null),o.changeConfigToOnWinLinux=t.localize(12,null),o.auto_on=t.localize(13,null),o.auto_off=t.localize(14,null),o.tabFocusModeOnMsg=t.localize(15,null),o.tabFocusModeOnMsgNoKb=t.localize(16,null),o.tabFocusModeOffMsg=t.localize(17,null),o.tabFocusModeOffMsgNoKb=t.localize(18,null),o.openDocMac=t.localize(19,null),o.openDocWinLinux=t.localize(20,null),o.outroMsg=t.localize(21,null),o.showAccessibilityHelpAction=t.localize(22,null)})(f=e.AccessibilityHelpNLS||(e.AccessibilityHelpNLS={}));var _;(function(o){o.inspectTokensAction=t.localize(23,null)})(_=e.InspectTokensNLS||(e.InspectTokensNLS={}));var A;(function(o){o.gotoLineActionLabel=t.localize(24,null)})(A=e.GoToLineNLS||(e.GoToLineNLS={}));var k;(function(o){o.helpQuickAccessActionLabel=t.localize(25,null)})(k=e.QuickHelpNLS||(e.QuickHelpNLS={}));var D;(function(o){o.quickCommandActionLabel=t.localize(26,null),o.quickCommandHelp=t.localize(27,null)})(D=e.QuickCommandNLS||(e.QuickCommandNLS={}));var I;(function(o){o.quickOutlineActionLabel=t.localize(28,null),o.quickOutlineByCategoryActionLabel=t.localize(29,null)})(I=e.QuickOutlineNLS||(e.QuickOutlineNLS={}));var w;(function(o){o.editorViewAccessibleLabel=t.localize(30,null),o.accessibilityHelpMessage=t.localize(31,null)})(w=e.StandaloneCodeEditorNLS||(e.StandaloneCodeEditorNLS={}));var v;(function(o){o.toggleHighContrast=t.localize(32,null)})(v=e.ToggleHighContrastNLS||(e.ToggleHighContrastNLS={}));var C;(function(o){o.bulkEditServiceSummary=t.localize(33,null)})(C=e.StandaloneServicesNLS||(e.StandaloneServicesNLS={}))}),define(ne[1252],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/anchorSelect/browser/anchorSelect",e)}),define(ne[1253],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/bracketMatching/browser/bracketMatching",e)}),define(ne[1254],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/caretOperations/browser/caretOperations",e)}),define(ne[1255],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/caretOperations/browser/transpose",e)}),define(ne[1256],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/clipboard/browser/clipboard",e)}),define(ne[1257],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/codeAction/browser/codeActionCommands",e)}),define(ne[1258],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/codeAction/browser/lightBulbWidget",e)}),define(ne[1259],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/codelens/browser/codelensController",e)}),define(ne[1260],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/colorPicker/browser/colorPickerWidget",e)}),define(ne[1261],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/comment/browser/comment",e)}),define(ne[1262],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/contextmenu/browser/contextmenu",e)}),define(ne[1263],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/cursorUndo/browser/cursorUndo",e)}),define(ne[1264],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/editorState/browser/keybindingCancellation",e)}),define(ne[1265],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/find/browser/findController",e)}),define(ne[1266],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/find/browser/findWidget",e)}),define(ne[1267],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/folding/browser/folding",e)}),define(ne[1268],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/folding/browser/foldingDecorations",e)}),define(ne[1269],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/fontZoom/browser/fontZoom",e)}),define(ne[1270],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/format/browser/format",e)}),define(ne[1271],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/format/browser/formatActions",e)}),define(ne[1272],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/gotoError/browser/gotoError",e)}),define(ne[1273],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/gotoError/browser/gotoErrorWidget",e)}),define(ne[1274],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/gotoSymbol/browser/goToCommands",e)}),define(ne[1275],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition",e)}),define(ne[1276],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/gotoSymbol/browser/peek/referencesController",e)}),define(ne[1277],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/gotoSymbol/browser/peek/referencesTree",e)}),define(ne[1278],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget",e)}),define(ne[1279],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/gotoSymbol/browser/referencesModel",e)}),define(ne[395],re([1,0,22,6,338,2,55,19,29,20,1279]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReferencesModel=e.FileReferences=e.FilePreview=e.OneReference=void 0;class C{constructor(s,l,r,p){this.isProviderFirst=s,this.parent=l,this.link=r,this._rangeCallback=p,this.id=_.defaultGenerator.nextId()}get uri(){return this.link.uri}get range(){return this._range??this.link.targetSelectionRange??this.link.range}set range(s){this._range=s,this._rangeCallback(this)}get ariaMessage(){const s=this.parent.getPreview(this)?.preview(this.range);return s?(0,v.localize)(1,null,(0,D.basename)(this.uri),this.range.startLineNumber,this.range.startColumn,s.value):(0,v.localize)(0,null,(0,D.basename)(this.uri),this.range.startLineNumber,this.range.startColumn)}}e.OneReference=C;class o{constructor(s){this._modelReference=s}dispose(){this._modelReference.dispose()}preview(s,l=8){const r=this._modelReference.object.textEditorModel;if(!r)return;const{startLineNumber:p,startColumn:u,endLineNumber:a,endColumn:n}=s,h=r.getWordUntilPosition({lineNumber:p,column:u-l}),g=new w.Range(p,h.startColumn,p,u),d=new w.Range(a,n,a,1073741824),m=r.getValueInRange(g).replace(/^\s+/,""),b=r.getValueInRange(s),E=r.getValueInRange(d).replace(/\s+$/,"");return{value:m+b+E,highlight:{start:m.length,end:m.length+b.length}}}}e.FilePreview=o;class c{constructor(s,l){this.parent=s,this.uri=l,this.children=[],this._previews=new k.ResourceMap}dispose(){(0,A.dispose)(this._previews.values()),this._previews.clear()}getPreview(s){return this._previews.get(s.uri)}get ariaMessage(){const s=this.children.length;return s===1?(0,v.localize)(2,null,(0,D.basename)(this.uri),this.uri.fsPath):(0,v.localize)(3,null,s,(0,D.basename)(this.uri),this.uri.fsPath)}async resolve(s){if(this._previews.size!==0)return this;for(let l of this.children)if(!this._previews.has(l.uri))try{const r=await s.createModelReference(l.uri);this._previews.set(l.uri,new o(r))}catch(r){(0,t.onUnexpectedError)(r)}return this}}e.FileReferences=c;class i{constructor(s,l){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new f.Emitter,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=s,this._title=l;const[r]=s;s.sort(i._compareReferences);let p;for(let u of s)if((!p||!D.extUri.isEqual(p.uri,u.uri,!0))&&(p=new c(this,u.uri),this.groups.push(p)),p.children.length===0||i._compareReferences(u,p.children[p.children.length-1])!==0){const a=new C(r===u,p,u,n=>this._onDidChangeReferenceRange.fire(n));this.references.push(a),p.children.push(a)}}dispose(){(0,A.dispose)(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new i(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?(0,v.localize)(4,null):this.references.length===1?(0,v.localize)(5,null,this.references[0].uri.fsPath):this.groups.length===1?(0,v.localize)(6,null,this.references.length,this.groups[0].uri.fsPath):(0,v.localize)(7,null,this.references.length,this.groups.length)}nextOrPreviousReference(s,l){let{parent:r}=s,p=r.children.indexOf(s),u=r.children.length,a=r.parent.groups.length;return a===1||l&&p+1<u||!l&&p>0?(l?p=(p+1)%u:p=(p+u-1)%u,r.children[p]):(p=r.parent.groups.indexOf(r),l?(p=(p+1)%a,r.parent.groups[p].children[0]):(p=(p+a-1)%a,r.parent.groups[p].children[r.parent.groups[p].children.length-1]))}nearestReference(s,l){const r=this.references.map((p,u)=>({idx:u,prefixLen:I.commonPrefixLength(p.uri.toString(),s.toString()),offsetDist:Math.abs(p.range.startLineNumber-l.lineNumber)*100+Math.abs(p.range.startColumn-l.column)})).sort((p,u)=>p.prefixLen>u.prefixLen?-1:p.prefixLen<u.prefixLen?1:p.offsetDist<u.offsetDist?-1:p.offsetDist>u.offsetDist?1:0)[0];if(r)return this.references[r.idx]}referenceAt(s,l){for(const r of this.references)if(r.uri.toString()===s.toString()&&w.Range.containsPosition(r.range,l))return r}firstReference(){for(const s of this.references)if(s.isProviderFirst)return s;return this.references[0]}static _compareReferences(s,l){return D.extUri.compare(s.uri,l.uri)||w.Range.compareRangesUsingStarts(s.range,l.range)}}e.ReferencesModel=i}),define(ne[1280],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/gotoSymbol/browser/symbolNavigation",e)}),define(ne[1281],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/hover/browser/hover",e)}),define(ne[1282],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/hover/browser/markdownHoverParticipant",e)}),define(ne[1283],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/hover/browser/markerHoverParticipant",e)}),define(ne[1284],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace",e)}),define(ne[1285],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/indentation/browser/indentation",e)}),define(ne[1286],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/inlayHints/browser/inlayHintsHover",e)}),define(ne[1287],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/inlineCompletions/browser/ghostTextController",e)}),define(ne[1288],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/inlineCompletions/browser/ghostTextHoverParticipant",e)}),define(ne[1289],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/lineSelection/browser/lineSelection",e)}),define(ne[1290],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/linesOperations/browser/linesOperations",e)}),define(ne[1291],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/linkedEditing/browser/linkedEditing",e)}),define(ne[1292],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/links/browser/links",e)}),define(ne[1293],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/message/browser/messageController",e)}),define(ne[1294],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/multicursor/browser/multicursor",e)}),define(ne[1295],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/parameterHints/browser/parameterHints",e)}),define(ne[1296],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/parameterHints/browser/parameterHintsWidget",e)}),define(ne[1297],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/peekView/browser/peekView",e)}),define(ne[1298],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess",e)}),define(ne[1299],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess",e)}),define(ne[1300],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/rename/browser/rename",e)}),define(ne[1301],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/rename/browser/renameInputField",e)}),define(ne[1302],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/smartSelect/browser/smartSelect",e)}),define(ne[1303],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/snippet/browser/snippetController2",e)}),define(ne[1304],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/snippet/browser/snippetVariables",e)}),define(ne[1305],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/suggest/browser/suggest",e)}),define(ne[1306],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/suggest/browser/suggestController",e)}),define(ne[1307],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/suggest/browser/suggestWidget",e)}),define(ne[1308],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/suggest/browser/suggestWidgetDetails",e)}),define(ne[1309],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/suggest/browser/suggestWidgetRenderer",e)}),define(ne[1310],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/suggest/browser/suggestWidgetStatus",e)}),define(ne[1311],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/symbolIcons/browser/symbolIcons",e)}),define(ne[1312],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode",e)}),define(ne[1313],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/tokenization/browser/tokenization",e)}),define(ne[1314],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter",e)}),define(ne[1315],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators",e)}),define(ne[1316],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/wordHighlighter/browser/wordHighlighter",e)}),define(ne[1317],re([3,4]),function(Q,e){return Q.create("vs/editor/contrib/wordOperations/browser/wordOperations",e)}),define(ne[1318],re([3,4]),function(Q,e){return Q.create("vs/platform/actions/browser/menuEntryActionViewItem",e)}),define(ne[1319],re([3,4]),function(Q,e){return Q.create("vs/platform/configuration/common/configurationRegistry",e)}),define(ne[1320],re([3,4]),function(Q,e){return Q.create("vs/platform/contextkey/browser/contextKeyService",e)}),define(ne[1321],re([3,4]),function(Q,e){return Q.create("vs/platform/contextkey/common/contextkeys",e)}),define(ne[1322],re([3,4]),function(Q,e){return Q.create("vs/platform/dialogs/common/dialogs",e)}),define(ne[1323],re([3,4]),function(Q,e){return Q.create("vs/platform/extensionManagement/common/extensionManagement",e)}),define(ne[1324],re([3,4]),function(Q,e){return Q.create("vs/platform/extensionManagement/common/extensionManagementCLIService",e)}),define(ne[1325],re([3,4]),function(Q,e){return Q.create("vs/platform/extensions/common/extensionValidator",e)}),define(ne[1326],re([3,4]),function(Q,e){return Q.create("vs/platform/files/browser/htmlFileSystemProvider",e)}),define(ne[1327],re([3,4]),function(Q,e){return Q.create("vs/platform/files/common/fileService",e)}),define(ne[1328],re([3,4]),function(Q,e){return Q.create("vs/platform/files/common/files",e)}),define(ne[1329],re([3,4]),function(Q,e){return Q.create("vs/platform/files/common/io",e)}),define(ne[1330],re([3,4]),function(Q,e){return Q.create("vs/platform/history/browser/contextScopedHistoryWidget",e)}),define(ne[1331],re([3,4]),function(Q,e){return Q.create("vs/platform/keybinding/common/abstractKeybindingService",e)}),define(ne[1332],re([3,4]),function(Q,e){return Q.create("vs/platform/list/browser/listService",e)}),define(ne[1333],re([3,4]),function(Q,e){return Q.create("vs/platform/localizations/common/localizedStrings",e)}),define(ne[1334],re([3,4]),function(Q,e){return Q.create("vs/platform/markers/common/markers",e)}),define(ne[1335],re([3,4]),function(Q,e){return Q.create("vs/platform/quickinput/browser/commandsQuickAccess",e)}),define(ne[1336],re([3,4]),function(Q,e){return Q.create("vs/platform/quickinput/browser/helpQuickAccess",e)}),define(ne[1337],re([3,4]),function(Q,e){return Q.create("vs/platform/request/common/request",e)}),define(ne[1338],re([3,4]),function(Q,e){return Q.create("vs/platform/telemetry/common/telemetryService",e)}),define(ne[1339],re([3,4]),function(Q,e){return Q.create("vs/platform/terminal/common/terminalPlatformConfiguration",e)}),define(ne[1340],re([3,4]),function(Q,e){return Q.create("vs/platform/theme/common/colorRegistry",e)}),define(ne[1341],re([3,4]),function(Q,e){return Q.create("vs/platform/theme/common/iconRegistry",e)}),define(ne[1342],re([3,4]),function(Q,e){return Q.create("vs/platform/theme/common/tokenClassificationRegistry",e)}),define(ne[1343],re([3,4]),function(Q,e){return Q.create("vs/platform/undoRedo/common/undoRedoService",e)}),define(ne[1344],re([3,4]),function(Q,e){return Q.create("vs/platform/update/common/update.config.contribution",e)}),define(ne[1345],re([3,4]),function(Q,e){return Q.create("vs/platform/userDataSync/common/abstractSynchronizer",e)}),define(ne[1346],re([3,4]),function(Q,e){return Q.create("vs/platform/userDataSync/common/keybindingsSync",e)}),define(ne[1347],re([3,4]),function(Q,e){return Q.create("vs/platform/userDataSync/common/settingsSync",e)}),define(ne[1348],re([3,4]),function(Q,e){return Q.create("vs/platform/userDataSync/common/userDataSync",e)}),define(ne[1349],re([3,4]),function(Q,e){return Q.create("vs/platform/userDataSync/common/userDataSyncMachines",e)}),define(ne[1350],re([3,4]),function(Q,e){return Q.create("vs/platform/workspace/common/workspace",e)}),define(ne[1351],re([3,4]),function(Q,e){return Q.create("vs/platform/workspace/common/workspaceTrust",e)}),define(ne[1352],re([3,4]),function(Q,e){return Q.create("vs/workbench/api/browser/mainThreadAuthentication",e)}),define(ne[1353],re([3,4]),function(Q,e){return Q.create("vs/workbench/api/browser/mainThreadCLICommands",e)}),define(ne[1354],re([3,4]),function(Q,e){return Q.create("vs/workbench/api/browser/mainThreadComments",e)}),define(ne[1355],re([3,4]),function(Q,e){return Q.create("vs/workbench/api/browser/mainThreadCustomEditors",e)}),define(ne[1356],re([3,4]),function(Q,e){return Q.create("vs/workbench/api/browser/mainThreadExtensionService",e)}),define(ne[1357],re([3,4]),function(Q,e){return Q.create("vs/workbench/api/browser/mainThreadFileSystemEventService",e)}),define(ne[1358],re([3,4]),function(Q,e){return Q.create("vs/workbench/api/browser/mainThreadMessageService",e)}),define(ne[1359],re([3,4]),function(Q,e){return Q.create("vs/workbench/api/browser/mainThreadProgress",e)}),define(ne[1360],re([3,4]),function(Q,e){return Q.create("vs/workbench/api/browser/mainThreadSaveParticipant",e)}),define(ne[1361],re([3,4]),function(Q,e){return Q.create("vs/workbench/api/browser/mainThreadTask",e)}),define(ne[1362],re([3,4]),function(Q,e){return Q.create("vs/workbench/api/browser/mainThreadTunnelService",e)}),define(ne[1363],re([3,4]),function(Q,e){return Q.create("vs/workbench/api/browser/mainThreadUriOpeners",e)}),define(ne[1364],re([3,4]),function(Q,e){return Q.create("vs/workbench/api/browser/mainThreadWebviews",e)}),define(ne[1365],re([3,4]),function(Q,e){return Q.create("vs/workbench/api/browser/mainThreadWorkspace",e)}),define(ne[1366],re([3,4]),function(Q,e){return Q.create("vs/workbench/api/browser/viewsExtensionPoint",e)}),define(ne[1367],re([3,4]),function(Q,e){return Q.create("vs/workbench/api/common/configurationExtensionPoint",e)}),define(ne[1368],re([3,4]),function(Q,e){return Q.create("vs/workbench/api/common/jsonValidationExtensionPoint",e)}),define(ne[1369],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/actions/developerActions",e)}),define(ne[1370],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/actions/helpActions",e)}),define(ne[1371],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/actions/layoutActions",e)}),define(ne[1372],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/actions/navigationActions",e)}),define(ne[1373],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/actions/quickAccessActions",e)}),define(ne[1374],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/actions/textInputActions",e)}),define(ne[1375],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/actions/windowActions",e)}),define(ne[1376],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/actions/workspaceActions",e)}),define(ne[1377],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/actions/workspaceCommands",e)}),define(ne[1378],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/codeeditor",e)}),define(ne[1379],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/dnd",e)}),define(ne[1380],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/editor",e)}),define(ne[1381],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/activitybar/activitybarActions",e)}),define(ne[1382],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/activitybar/activitybarPart",e)}),define(ne[1383],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions",e)}),define(ne[1384],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart",e)}),define(ne[1385],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/banner/bannerPart",e)}),define(ne[1386],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/compositeBar",e)}),define(ne[1387],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/compositeBarActions",e)}),define(ne[1388],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/compositePart",e)}),define(ne[1389],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/dialogs/dialogHandler",e)}),define(ne[1390],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/editor/binaryDiffEditor",e)}),define(ne[1391],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/editor/binaryEditor",e)}),define(ne[1392],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/editor/breadcrumbs",e)}),define(ne[1393],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/editor/breadcrumbsControl",e)}),define(ne[1394],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/editor/breadcrumbsPicker",e)}),define(ne[1395],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/editor/editor.contribution",e)}),define(ne[1396],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/editor/editorActions",e)}),define(ne[1397],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/editor/editorCommands",e)}),define(ne[1398],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/editor/editorConfiguration",e)}),define(ne[1399],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/editor/editorGroupView",e)}),define(ne[1400],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/editor/editorPlaceholder",e)}),define(ne[1401],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/editor/editorQuickAccess",e)}),define(ne[1402],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/editor/editorStatus",e)}),define(ne[1403],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/editor/sideBySideEditor",e)}),define(ne[1404],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/editor/tabsTitleControl",e)}),define(ne[1405],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/editor/textDiffEditor",e)}),define(ne[1406],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/editor/textEditor",e)}),define(ne[1407],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/editor/textResourceEditor",e)}),define(ne[1408],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/editor/titleControl",e)}),define(ne[1409],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/notifications/notificationsActions",e)}),define(ne[1410],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/notifications/notificationsAlerts",e)}),define(ne[1411],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/notifications/notificationsCenter",e)}),define(ne[1412],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/notifications/notificationsCommands",e)}),define(ne[1413],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/notifications/notificationsList",e)}),define(ne[1414],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/notifications/notificationsStatus",e)}),define(ne[1415],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/notifications/notificationsToasts",e)}),define(ne[1416],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/notifications/notificationsViewer",e)}),define(ne[1417],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/panel/panelActions",e)}),define(ne[1418],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/panel/panelPart",e)}),define(ne[1419],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/sidebar/sidebarActions",e)}),define(ne[1420],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/statusbar/statusbarActions",e)}),define(ne[1421],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/statusbar/statusbarPart",e)}),define(ne[1422],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/titlebar/menubarControl",e)}),define(ne[1423],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/titlebar/titlebarPart",e)}),define(ne[1424],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/views/treeView",e)}),define(ne[1425],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/views/viewPane",e)}),define(ne[1426],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/views/viewPaneContainer",e)}),define(ne[1427],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/parts/views/viewsService",e)}),define(ne[1428],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/quickaccess",e)}),define(ne[1429],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/workbench",e)}),define(ne[1430],re([3,4]),function(Q,e){return Q.create("vs/workbench/browser/workbench.contribution",e)}),define(ne[1431],re([3,4]),function(Q,e){return Q.create("vs/workbench/common/actions",e)}),define(ne[1432],re([3,4]),function(Q,e){return Q.create("vs/workbench/common/configuration",e)}),define(ne[1433],re([3,4]),function(Q,e){return Q.create("vs/workbench/common/contextkeys",e)}),define(ne[1434],re([3,4]),function(Q,e){return Q.create("vs/workbench/common/editor",e)}),define(ne[1435],re([3,4]),function(Q,e){return Q.create("vs/workbench/common/editor/diffEditorInput",e)}),define(ne[1436],re([3,4]),function(Q,e){return Q.create("vs/workbench/common/editor/sideBySideEditorInput",e)}),define(ne[1437],re([3,4]),function(Q,e){return Q.create("vs/workbench/common/editor/textEditorModel",e)}),define(ne[1438],re([3,4]),function(Q,e){return Q.create("vs/workbench/common/theme",e)}),define(ne[1439],re([3,4]),function(Q,e){return Q.create("vs/workbench/common/views",e)}),define(ne[1440],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/audioCues/browser/audioCueService",e)}),define(ne[1441],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/audioCues/browser/audioCues.contribution",e)}),define(ne[1442],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/audioCues/browser/commands",e)}),define(ne[1443],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/bulkEdit/browser/bulkEditService",e)}),define(ne[1444],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/bulkEdit/browser/preview/bulkEdit.contribution",e)}),define(ne[1445],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPane",e)}),define(ne[1446],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPreview",e)}),define(ne[1447],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/bulkEdit/browser/preview/bulkEditTree",e)}),define(ne[1448],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution",e)}),define(ne[1449],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek",e)}),define(ne[1450],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/callHierarchy/browser/callHierarchyTree",e)}),define(ne[1451],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/codeActions/browser/codeActionsContribution",e)}),define(ne[1452],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/codeActions/common/codeActionsExtensionPoint",e)}),define(ne[1453],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/codeActions/common/documentationExtensionPoint",e)}),define(ne[1454],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/codeEditor/browser/accessibility/accessibility",e)}),define(ne[1455],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/codeEditor/browser/diffEditorHelper",e)}),define(ne[1456],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget",e)}),define(ne[1457],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens",e)}),define(ne[1458],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/codeEditor/browser/inspectKeybindings",e)}),define(ne[1459],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/codeEditor/browser/languageConfigurationExtensionPoint",e)}),define(ne[1460],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/codeEditor/browser/largeFileOptimizations",e)}),define(ne[1461],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsOutline",e)}),define(ne[1462],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsTree",e)}),define(ne[1463],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess",e)}),define(ne[1464],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess",e)}),define(ne[1465],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/codeEditor/browser/saveParticipants",e)}),define(ne[1466],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/codeEditor/browser/toggleColumnSelection",e)}),define(ne[1467],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/codeEditor/browser/toggleMinimap",e)}),define(ne[1468],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier",e)}),define(ne[1469],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter",e)}),define(ne[1470],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace",e)}),define(ne[1471],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/codeEditor/browser/toggleWordWrap",e)}),define(ne[1472],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/codeEditor/browser/untitledTextEditorHint",e)}),define(ne[1473],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/codeEditor/electron-sandbox/selectionClipboard",e)}),define(ne[1474],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/codeEditor/electron-sandbox/startDebugTextMate",e)}),define(ne[1475],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/comments/browser/commentColors",e)}),define(ne[1476],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/comments/browser/commentGlyphWidget",e)}),define(ne[1477],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/comments/browser/commentNode",e)}),define(ne[1478],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/comments/browser/commentReply",e)}),define(ne[1479],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/comments/browser/commentThreadBody",e)}),define(ne[1480],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/comments/browser/commentThreadHeader",e)}),define(ne[1481],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/comments/browser/comments.contribution",e)}),define(ne[1482],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/comments/browser/commentsEditorContribution",e)}),define(ne[1483],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/comments/browser/commentsTreeViewer",e)}),define(ne[1484],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/comments/browser/commentsView",e)}),define(ne[1485],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/comments/browser/reactionsAction",e)}),define(ne[1486],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/comments/common/commentModel",e)}),define(ne[1487],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/customEditor/common/contributedCustomEditors",e)}),define(ne[1488],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/customEditor/common/customEditor",e)}),define(ne[1489],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/customEditor/common/extensionPoint",e)}),define(ne[1490],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/breakpointEditorContribution",e)}),define(ne[1491],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/breakpointWidget",e)}),define(ne[1492],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/breakpointsView",e)}),define(ne[1493],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/callStackEditorContribution",e)}),define(ne[1494],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/callStackView",e)}),define(ne[1495],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/debug.contribution",e)}),define(ne[1496],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/debugActionViewItems",e)}),define(ne[1497],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/debugAdapterManager",e)}),define(ne[1498],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/debugColors",e)}),define(ne[1499],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/debugCommands",e)}),define(ne[1500],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/debugConfigurationManager",e)}),define(ne[1501],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/debugEditorActions",e)}),define(ne[1502],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/debugEditorContribution",e)}),define(ne[1503],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/debugHover",e)}),define(ne[1504],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/debugIcons",e)}),define(ne[1505],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/debugQuickAccess",e)}),define(ne[1506],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/debugService",e)}),define(ne[1507],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/debugSession",e)}),define(ne[1508],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/debugStatus",e)}),define(ne[1509],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/debugTaskRunner",e)}),define(ne[1510],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/debugToolBar",e)}),define(ne[1511],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/debugViewlet",e)}),define(ne[1512],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/disassemblyView",e)}),define(ne[1513],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/exceptionWidget",e)}),define(ne[1514],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/linkDetector",e)}),define(ne[1515],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/loadedScriptsView",e)}),define(ne[1516],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/rawDebugSession",e)}),define(ne[1517],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/repl",e)}),define(ne[1518],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/replFilter",e)}),define(ne[1519],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/replViewer",e)}),define(ne[1520],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/statusbarColorProvider",e)}),define(ne[1521],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/variablesView",e)}),define(ne[1522],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/watchExpressionsView",e)}),define(ne[1523],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/browser/welcomeView",e)}),define(ne[1524],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/common/abstractDebugAdapter",e)}),define(ne[1525],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/common/debug",e)}),define(ne[1526],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/common/debugContentProvider",e)}),define(ne[1527],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/common/debugLifecycle",e)}),define(ne[1528],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/common/debugModel",e)}),define(ne[1529],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/common/debugSchemas",e)}),define(ne[1530],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/common/debugSource",e)}),define(ne[1531],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/common/debugger",e)}),define(ne[1532],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/common/disassemblyViewInput",e)}),define(ne[1533],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/debug/common/replModel",e)}),define(ne[1534],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/emmet/browser/actions/expandAbbreviation",e)}),define(ne[1535],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/experiments/browser/experiments.contribution",e)}),define(ne[1536],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor",e)}),define(ne[1537],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/browser/configBasedRecommendations",e)}),define(ne[1538],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/browser/dynamicWorkspaceRecommendations",e)}),define(ne[1539],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/browser/exeBasedRecommendations",e)}),define(ne[1540],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/browser/extensionEditor",e)}),define(ne[1541],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService",e)}),define(ne[1542],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/browser/extensions.contribution",e)}),define(ne[1543],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/browser/extensionsActions",e)}),define(ne[1544],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/browser/extensionsActivationProgress",e)}),define(ne[1545],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/browser/extensionsCompletionItemsProvider",e)}),define(ne[1546],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/browser/extensionsDependencyChecker",e)}),define(ne[1547],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/browser/extensionsIcons",e)}),define(ne[1548],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/browser/extensionsQuickAccess",e)}),define(ne[1549],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/browser/extensionsViewer",e)}),define(ne[1550],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/browser/extensionsViewlet",e)}),define(ne[1551],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/browser/extensionsViews",e)}),define(ne[1552],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/browser/extensionsWidgets",e)}),define(ne[1553],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/browser/extensionsWorkbenchService",e)}),define(ne[1554],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/browser/fileBasedRecommendations",e)}),define(ne[1555],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/browser/webRecommendations",e)}),define(ne[1556],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/browser/workspaceRecommendations",e)}),define(ne[1557],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/common/extensionsFileTemplate",e)}),define(ne[1558],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/common/extensionsInput",e)}),define(ne[1559],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/common/extensionsUtils",e)}),define(ne[1560],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/common/runtimeExtensionsInput",e)}),define(ne[1561],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/electron-sandbox/debugExtensionHostAction",e)}),define(ne[1562],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/electron-sandbox/extensionProfileService",e)}),define(ne[1563],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/electron-sandbox/extensions.contribution",e)}),define(ne[1564],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/electron-sandbox/extensionsActions",e)}),define(ne[1565],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/electron-sandbox/extensionsAutoProfiler",e)}),define(ne[1566],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/electron-sandbox/extensionsSlowActions",e)}),define(ne[1567],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/electron-sandbox/reportExtensionIssueAction",e)}),define(ne[1568],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/extensions/electron-sandbox/runtimeExtensionsEditor",e)}),define(ne[1569],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/externalTerminal/browser/externalTerminal.contribution",e)}),define(ne[1570],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/externalTerminal/electron-sandbox/externalTerminal.contribution",e)}),define(ne[1571],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/externalUriOpener/common/configuration",e)}),define(ne[1572],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService",e)}),define(ne[1573],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/feedback/browser/feedback",e)}),define(ne[1574],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/feedback/browser/feedbackStatusbarItem",e)}),define(ne[1575],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/files/browser/editors/binaryFileEditor",e)}),define(ne[1576],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/files/browser/editors/textFileEditor",e)}),define(ne[1577],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler",e)}),define(ne[1578],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/files/browser/explorerViewlet",e)}),define(ne[1579],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/files/browser/fileActions",e)}),define(ne[1580],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/files/browser/fileActions.contribution",e)}),define(ne[1581],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/files/browser/fileCommands",e)}),define(ne[1582],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/files/browser/fileConstants",e)}),define(ne[1583],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/files/browser/fileImportExport",e)}),define(ne[1584],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/files/browser/files.contribution",e)}),define(ne[1585],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/files/browser/views/emptyView",e)}),define(ne[1586],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/files/browser/views/explorerDecorationsProvider",e)}),define(ne[1587],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/files/browser/views/explorerView",e)}),define(ne[1588],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/files/browser/views/explorerViewer",e)}),define(ne[1589],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/files/browser/views/openEditorsView",e)}),define(ne[1590],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/files/browser/workspaceWatcher",e)}),define(ne[1591],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/files/common/dirtyFilesIndicator",e)}),define(ne[1592],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/files/common/files",e)}),define(ne[1593],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/files/electron-sandbox/fileActions.contribution",e)}),define(ne[1594],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/files/electron-sandbox/files.contribution",e)}),define(ne[1595],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/files/electron-sandbox/textFileEditor",e)}),define(ne[1596],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/format/browser/formatActionsMultiple",e)}),define(ne[1597],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/format/browser/formatActionsNone",e)}),define(ne[1598],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/format/browser/formatModified",e)}),define(ne[1599],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty",e)}),define(ne[1600],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/interactive/browser/interactive.contribution",e)}),define(ne[1601],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/interactive/browser/interactiveEditor",e)}),define(ne[1602],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/issue/electron-sandbox/issue.contribution",e)}),define(ne[1603],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/issue/electron-sandbox/issueActions",e)}),define(ne[1604],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/keybindings/browser/keybindings.contribution",e)}),define(ne[1605],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/languageStatus/browser/languageStatus.contribution",e)}),define(ne[1606],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/localHistory/browser/localHistory",e)}),define(ne[1607],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/localHistory/browser/localHistoryCommands",e)}),define(ne[1608],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/localHistory/browser/localHistoryTimeline",e)}),define(ne[1609],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/localHistory/electron-sandbox/localHistoryCommands",e)}),define(ne[1610],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/localizations/browser/localizations.contribution",e)}),define(ne[1611],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/localizations/browser/localizationsActions",e)}),define(ne[1612],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/localizations/browser/minimalTranslations",e)}),define(ne[1613],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/logs/common/logs.contribution",e)}),define(ne[1614],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/logs/common/logsActions",e)}),define(ne[1615],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/logs/electron-sandbox/logsActions",e)}),define(ne[1616],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/markers/browser/markers",e)}),define(ne[1617],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/markers/browser/markers.contribution",e)}),define(ne[1618],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/markers/browser/markersFileDecorations",e)}),define(ne[1619],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/markers/browser/markersTreeViewer",e)}),define(ne[1620],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/markers/browser/markersView",e)}),define(ne[1621],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/markers/browser/markersViewActions",e)}),define(ne[1622],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/markers/browser/messages",e)}),define(ne[1623],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands",e)}),define(ne[1624],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController",e)}),define(ne[1625],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders",e)}),define(ne[1626],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard",e)}),define(ne[1627],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar",e)}),define(ne[1628],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/contrib/find/findController",e)}),define(ne[1629],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget",e)}),define(ne[1630],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/contrib/format/formatting",e)}),define(ne[1631],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted",e)}),define(ne[1632],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions",e)}),define(ne[1633],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/contrib/navigation/arrow",e)}),define(ne[1634],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline",e)}),define(ne[1635],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile",e)}),define(ne[1636],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/controller/coreActions",e)}),define(ne[1637],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/controller/editActions",e)}),define(ne[1638],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/controller/executeActions",e)}),define(ne[1639],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/controller/foldingController",e)}),define(ne[1640],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/controller/insertCellActions",e)}),define(ne[1641],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/controller/layoutActions",e)}),define(ne[1642],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/diff/diffElementOutputs",e)}),define(ne[1643],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/diff/notebookDiffActions",e)}),define(ne[1644],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/diff/notebookTextDiffEditor",e)}),define(ne[1645],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/extensionPoint",e)}),define(ne[1646],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/notebook.contribution",e)}),define(ne[1647],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/notebookEditor",e)}),define(ne[1648],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/notebookEditorWidget",e)}),define(ne[1649],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/notebookExecutionServiceImpl",e)}),define(ne[1650],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/notebookIcons",e)}),define(ne[1651],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl",e)}),define(ne[1652],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions",e)}),define(ne[1653],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput",e)}),define(ne[1654],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/view/cellParts/codeCell",e)}),define(ne[1655],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon",e)}),define(ne[1656],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar",e)}),define(ne[1657],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput",e)}),define(ne[1658],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint",e)}),define(ne[1659],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/view/cellParts/markdownCell",e)}),define(ne[1660],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView",e)}),define(ne[1661],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer",e)}),define(ne[1662],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/browser/viewParts/notebookKernelActionViewItem",e)}),define(ne[1663],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/notebook/common/notebookEditorModel",e)}),define(ne[1664],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/outline/browser/outline.contribution",e)}),define(ne[1665],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/outline/browser/outlinePane",e)}),define(ne[1666],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/output/browser/logViewer",e)}),define(ne[1667],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/output/browser/output.contribution",e)}),define(ne[1668],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/output/browser/outputView",e)}),define(ne[1669],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/performance/browser/performance.contribution",e)}),define(ne[1670],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/performance/browser/perfviewEditor",e)}),define(ne[1671],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/performance/electron-sandbox/startupProfiler",e)}),define(ne[1672],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/preferences/browser/keybindingWidgets",e)}),define(ne[1673],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/preferences/browser/keybindingsEditor",e)}),define(ne[1674],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/preferences/browser/keybindingsEditorContribution",e)}),define(ne[1675],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/preferences/browser/preferences.contribution",e)}),define(ne[1676],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/preferences/browser/preferencesActions",e)}),define(ne[1677],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/preferences/browser/preferencesIcons",e)}),define(ne[1678],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/preferences/browser/preferencesRenderers",e)}),define(ne[1679],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/preferences/browser/preferencesWidgets",e)}),define(ne[1680],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/preferences/browser/settingsEditor2",e)}),define(ne[1681],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/preferences/browser/settingsLayout",e)}),define(ne[1682],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/preferences/browser/settingsTree",e)}),define(ne[1683],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/preferences/browser/settingsTreeModels",e)}),define(ne[1684],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/preferences/browser/settingsWidgets",e)}),define(ne[1685],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/preferences/browser/tocTree",e)}),define(ne[1686],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/preferences/common/preferencesContribution",e)}),define(ne[1687],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/preferences/common/settingsEditorColorRegistry",e)}),define(ne[1688],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/quickaccess/browser/commandsQuickAccess",e)}),define(ne[1689],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/quickaccess/browser/quickAccess.contribution",e)}),define(ne[1690],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/quickaccess/browser/viewQuickAccess",e)}),define(ne[1691],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/relauncher/browser/relauncher.contribution",e)}),define(ne[1692],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/remote/browser/explorerViewItems",e)}),define(ne[1693],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/remote/browser/remote",e)}),define(ne[1694],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/remote/browser/remoteExplorer",e)}),define(ne[1695],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/remote/browser/remoteIcons",e)}),define(ne[1696],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/remote/browser/remoteIndicator",e)}),define(ne[1697],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/remote/browser/tunnelFactory",e)}),define(ne[1698],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/remote/browser/tunnelView",e)}),define(ne[1699],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/remote/common/remote.contribution",e)}),define(ne[1700],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/remote/electron-sandbox/remote.contribution",e)}),define(ne[1701],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/sash/browser/sash.contribution",e)}),define(ne[1702],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/scm/browser/activity",e)}),define(ne[1703],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/scm/browser/dirtydiffDecorator",e)}),define(ne[1704],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/scm/browser/scm.contribution",e)}),define(ne[1705],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/scm/browser/scmRepositoriesViewPane",e)}),define(ne[1706],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/scm/browser/scmViewPane",e)}),define(ne[1707],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/scm/browser/scmViewPaneContainer",e)}),define(ne[1708],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/search/browser/anythingQuickAccess",e)}),define(ne[1709],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/search/browser/patternInputWidget",e)}),define(ne[1710],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/search/browser/replaceService",e)}),define(ne[1711],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/search/browser/search.contribution",e)}),define(ne[1712],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/search/browser/searchActions",e)}),define(ne[1713],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/search/browser/searchIcons",e)}),define(ne[1714],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/search/browser/searchMessage",e)}),define(ne[1715],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/search/browser/searchResultsView",e)}),define(ne[1716],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/search/browser/searchView",e)}),define(ne[1717],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/search/browser/searchWidget",e)}),define(ne[1718],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/search/browser/symbolsQuickAccess",e)}),define(ne[1719],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/searchEditor/browser/searchEditor",e)}),define(ne[1720],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/searchEditor/browser/searchEditor.contribution",e)}),define(ne[1721],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/searchEditor/browser/searchEditorInput",e)}),define(ne[1722],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/searchEditor/browser/searchEditorSerialization",e)}),define(ne[1723],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/snippets/browser/configureSnippets",e)}),define(ne[1724],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/snippets/browser/insertSnippet",e)}),define(ne[1725],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/snippets/browser/snippetCompletionProvider",e)}),define(ne[1726],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/snippets/browser/snippetPicker",e)}),define(ne[1727],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/snippets/browser/snippets.contribution",e)}),define(ne[1728],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/snippets/browser/snippetsFile",e)}),define(ne[1729],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/snippets/browser/snippetsService",e)}),define(ne[1730],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/snippets/browser/surroundWithSnippet",e)}),define(ne[1731],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/surveys/browser/ces.contribution",e)}),define(ne[1732],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/surveys/browser/languageSurveys.contribution",e)}),define(ne[1733],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/surveys/browser/nps.contribution",e)}),define(ne[1734],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/tasks/browser/abstractTaskService",e)}),define(ne[1735],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/tasks/browser/runAutomaticTasks",e)}),define(ne[1736],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/tasks/browser/task.contribution",e)}),define(ne[1737],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/tasks/browser/taskQuickPick",e)}),define(ne[1738],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/tasks/browser/taskTerminalStatus",e)}),define(ne[1739],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/tasks/browser/tasksQuickAccess",e)}),define(ne[1740],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/tasks/browser/terminalTaskSystem",e)}),define(ne[1741],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/tasks/common/jsonSchemaCommon",e)}),define(ne[1742],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/tasks/common/jsonSchema_v1",e)}),define(ne[1743],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/tasks/common/jsonSchema_v2",e)}),define(ne[1744],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/tasks/common/problemMatcher",e)}),define(ne[1745],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/tasks/common/taskConfiguration",e)}),define(ne[1746],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/tasks/common/taskDefinitionRegistry",e)}),define(ne[1747],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/tasks/common/taskService",e)}),define(ne[1748],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/tasks/common/taskTemplates",e)}),define(ne[1749],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/tasks/common/tasks",e)}),define(ne[1750],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/tasks/electron-sandbox/taskService",e)}),define(ne[1751],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/terminal/browser/baseTerminalBackend",e)}),define(ne[1752],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/terminal/browser/environmentVariableInfo",e)}),define(ne[1753],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/terminal/browser/links/terminalLink",e)}),define(ne[1754],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/terminal/browser/links/terminalLinkDetectorAdapter",e)}),define(ne[1755],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/terminal/browser/links/terminalLinkManager",e)}),define(ne[1756],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/terminal/browser/links/terminalLinkQuickpick",e)}),define(ne[1757],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/terminal/browser/links/terminalShellIntegrationLinkDetector",e)}),define(ne[1758],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/terminal/browser/terminal.contribution",e)}),define(ne[1759],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/terminal/browser/terminalActions",e)}),define(ne[1760],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/terminal/browser/terminalConfigHelper",e)}),define(ne[1761],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/terminal/browser/terminalDecorationsProvider",e)}),define(ne[1762],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/terminal/browser/terminalEditorInput",e)}),define(ne[1763],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/terminal/browser/terminalIcons",e)}),define(ne[1764],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/terminal/browser/terminalInstance",e)}),define(ne[1765],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/terminal/browser/terminalMenus",e)}),define(ne[1766],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/terminal/browser/terminalProcessManager",e)}),define(ne[1767],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/terminal/browser/terminalProfileQuickpick",e)}),define(ne[1768],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/terminal/browser/terminalProfileResolverService",e)}),define(ne[1769],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/terminal/browser/terminalQuickAccess",e)}),define(ne[1770],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/terminal/browser/terminalService",e)}),define(ne[1771],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/terminal/browser/terminalTabbedView",e)}),define(ne[1772],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/terminal/browser/terminalTabsList",e)}),define(ne[1773],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/terminal/browser/terminalTooltip",e)}),define(ne[1774],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/terminal/browser/terminalView",e)}),define(ne[1775],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/terminal/browser/xterm/decorationAddon",e)}),define(ne[1776],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/terminal/browser/xterm/xtermTerminal",e)}),define(ne[1777],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/terminal/common/terminal",e)}),define(ne[1778],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/terminal/common/terminalColorRegistry",e)}),define(ne[1779],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/terminal/common/terminalConfiguration",e)}),define(ne[1780],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/terminal/common/terminalContextKey",e)}),define(ne[1781],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/terminal/common/terminalStrings",e)}),define(ne[1782],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/terminal/electron-sandbox/terminalRemote",e)}),define(ne[1783],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/testing/browser/icons",e)}),define(ne[1784],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/testing/browser/testExplorerActions",e)}),define(ne[1785],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/testing/browser/testing.contribution",e)}),define(ne[1786],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/testing/browser/testingConfigurationUi",e)}),define(ne[1787],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/testing/browser/testingDecorations",e)}),define(ne[1788],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/testing/browser/testingExplorerFilter",e)}),define(ne[1789],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/testing/browser/testingExplorerView",e)}),define(ne[1790],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/testing/browser/testingOutputPeek",e)}),define(ne[1791],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/testing/browser/testingOutputTerminalService",e)}),define(ne[1792],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/testing/browser/testingProgressUiService",e)}),define(ne[1793],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/testing/browser/testingViewPaneContainer",e)}),define(ne[1794],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/testing/browser/theme",e)}),define(ne[1795],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/testing/common/configuration",e)}),define(ne[1796],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/testing/common/constants",e)}),define(ne[1797],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/testing/common/testResult",e)}),define(ne[1798],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/testing/common/testServiceImpl",e)}),define(ne[1799],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/testing/common/testingContextKeys",e)}),define(ne[1800],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/themes/browser/themes.contribution",e)}),define(ne[1801],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/timeline/browser/timeline.contribution",e)}),define(ne[1802],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/timeline/browser/timelinePane",e)}),define(ne[1803],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution",e)}),define(ne[1804],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek",e)}),define(ne[1805],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree",e)}),define(ne[1806],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/update/browser/releaseNotesEditor",e)}),define(ne[1807],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/update/browser/update",e)}),define(ne[1808],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/update/browser/update.contribution",e)}),define(ne[1809],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/url/browser/trustedDomains",e)}),define(ne[1810],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/url/browser/trustedDomainsValidator",e)}),define(ne[1811],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/url/browser/url.contribution",e)}),define(ne[1812],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/userDataSync/browser/userDataSync",e)}),define(ne[1813],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/userDataSync/browser/userDataSync.contribution",e)}),define(ne[1814],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/userDataSync/browser/userDataSyncMergesView",e)}),define(ne[1815],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/userDataSync/browser/userDataSyncViews",e)}),define(ne[1816],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/userDataSync/electron-sandbox/userDataSync.contribution",e)}),define(ne[1817],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/watermark/browser/watermark",e)}),define(ne[1818],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/webview/browser/webview.contribution",e)}),define(ne[1819],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/webview/browser/webviewElement",e)}),define(ne[1820],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/webview/electron-sandbox/webviewCommands",e)}),define(ne[1821],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/webviewPanel/browser/webviewCommands",e)}),define(ne[1822],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution",e)}),define(ne[1823],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted",e)}),define(ne[1824],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution",e)}),define(ne[1825],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedColors",e)}),define(ne[1826],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedExtensionPoint",e)}),define(ne[1827],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedIcons",e)}),define(ne[1828],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput",e)}),define(ne[1829],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService",e)}),define(ne[1830],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent",e)}),define(ne[1831],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/welcomeGettingStarted/common/media/notebookProfile",e)}),define(ne[1832],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker",e)}),define(ne[1833],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/welcomeOverlay/browser/welcomeOverlay",e)}),define(ne[1834],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/welcomeViews/common/newFile.contribution",e)}),define(ne[1835],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/welcomeViews/common/viewsWelcomeContribution",e)}),define(ne[1836],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/welcomeViews/common/viewsWelcomeExtensionPoint",e)}),define(ne[1837],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/welcomeWalkthrough/browser/editor/editorWalkThrough",e)}),define(ne[1838],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/welcomeWalkthrough/browser/walkThrough.contribution",e)}),define(ne[1839],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughPart",e)}),define(ne[1840],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/workspace/browser/workspace.contribution",e)}),define(ne[1841],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/workspace/browser/workspaceTrustEditor",e)}),define(ne[1842],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/workspace/common/workspace",e)}),define(ne[1843],re([3,4]),function(Q,e){return Q.create("vs/workbench/contrib/workspaces/browser/workspaces.contribution",e)}),define(ne[1844],re([3,4]),function(Q,e){return Q.create("vs/workbench/electron-sandbox/actions/developerActions",e)}),define(ne[1845],re([3,4]),function(Q,e){return Q.create("vs/workbench/electron-sandbox/actions/installActions",e)}),define(ne[1846],re([3,4]),function(Q,e){return Q.create("vs/workbench/electron-sandbox/actions/windowActions",e)}),define(ne[1847],re([3,4]),function(Q,e){return Q.create("vs/workbench/electron-sandbox/desktop.contribution",e)}),define(ne[1848],re([3,4]),function(Q,e){return Q.create("vs/workbench/electron-sandbox/parts/dialogs/dialogHandler",e)}),define(ne[1849],re([3,4]),function(Q,e){return Q.create("vs/workbench/electron-sandbox/window",e)}),define(ne[1850],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/actions/common/menusExtensionPoint",e)}),define(ne[1851],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/authentication/browser/authenticationService",e)}),define(ne[1852],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/configuration/browser/configurationService",e)}),define(ne[1853],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/configuration/common/configurationEditingService",e)}),define(ne[1854],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/configuration/common/jsonEditingService",e)}),define(ne[1855],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/configurationResolver/browser/configurationResolverService",e)}),define(ne[1856],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/configurationResolver/common/configurationResolverSchema",e)}),define(ne[1857],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/configurationResolver/common/configurationResolverUtils",e)}),define(ne[1858],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/configurationResolver/common/variableResolver",e)}),define(ne[1859],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/decorations/browser/decorationsService",e)}),define(ne[1860],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/dialogs/browser/abstractFileDialogService",e)}),define(ne[1861],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/dialogs/browser/simpleFileDialog",e)}),define(ne[1862],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/editor/browser/editorResolverService",e)}),define(ne[1863],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/editor/common/editorResolverService",e)}),define(ne[1864],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/extensionManagement/browser/extensionBisect",e)}),define(ne[1865],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/extensionManagement/browser/extensionEnablementService",e)}),define(ne[1866],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/extensionManagement/browser/webExtensionsScannerService",e)}),define(ne[1867],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/extensionManagement/common/extensionManagementService",e)}),define(ne[1868],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/extensionManagement/electron-sandbox/extensionManagementServerService",e)}),define(ne[1869],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/extensionManagement/electron-sandbox/remoteExtensionManagementService",e)}),define(ne[1870],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig",e)}),define(ne[1871],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/extensions/browser/extensionUrlHandler",e)}),define(ne[1872],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/extensions/browser/webWorkerExtensionHost",e)}),define(ne[1873],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/extensions/common/abstractExtensionService",e)}),define(ne[1874],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/extensions/common/extensionHostManager",e)}),define(ne[1875],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/extensions/common/extensionPoints",e)}),define(ne[1876],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/extensions/common/extensionsRegistry",e)}),define(ne[1877],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/extensions/common/extensionsUtil",e)}),define(ne[1878],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/extensions/common/remoteExtensionHost",e)}),define(ne[1879],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/extensions/electron-browser/extensionService",e)}),define(ne[1880],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/extensions/electron-browser/localProcessExtensionHost",e)}),define(ne[1881],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/extensions/electron-sandbox/cachedExtensionScanner",e)}),define(ne[1882],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/history/browser/historyService",e)}),define(ne[1883],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/integrity/electron-sandbox/integrityService",e)}),define(ne[1884],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/keybinding/browser/keybindingService",e)}),define(ne[1885],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/keybinding/common/keybindingEditing",e)}),define(ne[1886],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/label/common/labelService",e)}),define(ne[1887],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/language/common/languageService",e)}),define(ne[1888],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/notification/common/notificationService",e)}),define(ne[1889],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/preferences/browser/keybindingsEditorInput",e)}),define(ne[1890],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/preferences/browser/keybindingsEditorModel",e)}),define(ne[1891],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/preferences/browser/preferencesService",e)}),define(ne[1892],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/preferences/common/preferencesEditorInput",e)}),define(ne[1893],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/preferences/common/preferencesModels",e)}),define(ne[1894],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/preferences/common/preferencesValidation",e)}),define(ne[1895],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/progress/browser/progressService",e)}),define(ne[1896],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/remote/common/remoteExplorerService",e)}),define(ne[1897],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/remote/electron-sandbox/remoteAgentService",e)}),define(ne[1898],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/search/common/queryBuilder",e)}),define(ne[1899],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/textMate/browser/abstractTextMateService",e)}),define(ne[1900],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/textMate/common/TMGrammars",e)}),define(ne[1901],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/textfile/browser/textFileService",e)}),define(ne[1902],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/textfile/common/textFileEditorModelManager",e)}),define(ne[1903],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/textfile/common/textFileSaveParticipant",e)}),define(ne[1904],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/themes/browser/fileIconThemeData",e)}),define(ne[1905],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/themes/browser/productIconThemeData",e)}),define(ne[1906],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/themes/browser/workbenchThemeService",e)}),define(ne[1907],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/themes/common/colorExtensionPoint",e)}),define(ne[1908],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/themes/common/colorThemeData",e)}),define(ne[1909],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/themes/common/colorThemeSchema",e)}),define(ne[1910],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/themes/common/fileIconThemeSchema",e)}),define(ne[1911],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/themes/common/iconExtensionPoint",e)}),define(ne[1912],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/themes/common/productIconThemeSchema",e)}),define(ne[1913],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/themes/common/themeConfiguration",e)}),define(ne[1914],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/themes/common/themeExtensionPoints",e)}),define(ne[1915],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/themes/common/tokenClassificationExtensionPoint",e)}),define(ne[1916],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/userDataSync/browser/userDataSyncWorkbenchService",e)}),define(ne[1917],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/userDataSync/common/userDataSync",e)}),define(ne[1918],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/views/browser/viewDescriptorService",e)}),define(ne[1919],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/workingCopy/common/fileWorkingCopyManager",e)}),define(ne[1920],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/workingCopy/common/storedFileWorkingCopy",e)}),define(ne[1921],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant",e)}),define(ne[1922],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/workingCopy/common/workingCopyHistoryService",e)}),define(ne[1923],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/workingCopy/common/workingCopyHistoryTracker",e)}),define(ne[1924],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/workingCopy/electron-sandbox/workingCopyBackupTracker",e)}),define(ne[1925],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService",e)}),define(ne[1926],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/workspaces/browser/workspaceTrustEditorInput",e)}),define(ne[1927],re([3,4]),function(Q,e){return Q.create("vs/workbench/services/workspaces/electron-sandbox/workspaceEditingService",e)}),define(ne[1928],re([1,0,14]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AssignmentFilterProvider=e.Filters=e.TargetPopulation=e.ASSIGNMENT_REFETCH_INTERVAL=e.ASSIGNMENT_STORAGE_KEY=void 0,e.ASSIGNMENT_STORAGE_KEY="VSCode.ABExp.FeatureData",e.ASSIGNMENT_REFETCH_INTERVAL=0;var f;(function(k){k.Team="team",k.Internal="internal",k.Insiders="insider",k.Public="public"})(f=e.TargetPopulation||(e.TargetPopulation={}));var _;(function(k){k.Market="X-MSEdge-Market",k.CorpNet="X-FD-Corpnet",k.ApplicationVersion="X-VSCode-AppVersion",k.Build="X-VSCode-Build",k.ClientId="X-MSEdge-ClientId",k.ExtensionName="X-VSCode-ExtensionName",k.Language="X-VSCode-Language",k.TargetPopulation="X-VSCode-TargetPopulation"})(_=e.Filters||(e.Filters={}));class A{constructor(D,I,w,v){this.version=D,this.appName=I,this.machineId=w,this.targetPopulation=v}getFilterValue(D){switch(D){case _.ApplicationVersion:return this.version;case _.Build:return this.appName;case _.ClientId:return this.machineId;case _.Language:return t.language;case _.ExtensionName:return"vscode-core";case _.TargetPopulation:return this.targetPopulation;default:return""}}getFilters(){let D=new Map,I=Object.values(_);for(let w of I)D.set(w,this.getFilterValue(w));return D}}e.AssignmentFilterProvider=A}),define(ne[1929],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isWorkspaceBackupInfo=e.isFolderBackupInfo=void 0;function t(_){return _&&_.hasOwnProperty("folderUri")}e.isFolderBackupInfo=t;function f(_){return _&&_.hasOwnProperty("workspace")}e.isWorkspaceBackupInfo=f}),define(ne[1930],re([1,0,6,2]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionHostDebugChannelClient=e.ExtensionHostDebugBroadcastChannel=void 0;class _{constructor(){this._onCloseEmitter=new t.Emitter,this._onReloadEmitter=new t.Emitter,this._onTerminateEmitter=new t.Emitter,this._onAttachEmitter=new t.Emitter}call(D,I,w){switch(I){case"close":return Promise.resolve(this._onCloseEmitter.fire({sessionId:w[0]}));case"reload":return Promise.resolve(this._onReloadEmitter.fire({sessionId:w[0]}));case"terminate":return Promise.resolve(this._onTerminateEmitter.fire({sessionId:w[0]}));case"attach":return Promise.resolve(this._onAttachEmitter.fire({sessionId:w[0],port:w[1],subId:w[2]}))}throw new Error("Method not implemented.")}listen(D,I,w){switch(I){case"close":return this._onCloseEmitter.event;case"reload":return this._onReloadEmitter.event;case"terminate":return this._onTerminateEmitter.event;case"attach":return this._onAttachEmitter.event}throw new Error("Method not implemented.")}}e.ExtensionHostDebugBroadcastChannel=_,_.ChannelName="extensionhostdebugservice";class A extends f.Disposable{constructor(D){super();this.channel=D}reload(D){this.channel.call("reload",[D])}get onReload(){return this.channel.listen("reload")}close(D){this.channel.call("close",[D])}get onClose(){return this.channel.listen("close")}attachSession(D,I,w){this.channel.call("attach",[D,I,w])}get onAttachSession(){return this.channel.listen("attach")}terminateSession(D,I){this.channel.call("terminate",[D,I])}get onTerminateSession(){return this.channel.listen("terminate")}openExtensionDevelopmentHostWindow(D,I){return this.channel.call("openExtensionDevelopmentHostWindow",[D,I])}}e.ExtensionHostDebugChannelClient=A}),define(ne[1931],re([1,0,9]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DownloadServiceChannelClient=e.DownloadServiceChannel=void 0;class f{constructor(k){this.service=k}listen(k,D,I){throw new Error("Invalid listen")}call(k,D,I){switch(D){case"download":return this.service.download(t.URI.revive(I[0]),t.URI.revive(I[1]))}throw new Error("Invalid call")}}e.DownloadServiceChannel=f;class _{constructor(k,D){this.channel=k,this.getUriTransformer=D}async download(k,D){const I=this.getUriTransformer();I&&(k=I.transformOutgoingURI(k),D=I.transformOutgoingURI(D)),await this.channel.call("download",[k,D])}}e.DownloadServiceChannelClient=_}),define(ne[1932],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WindowDriverRegistryChannelClient=e.WindowDriverChannelClient=e.WindowDriverChannel=void 0;class t{constructor(k){this.driver=k}listen(k,D){throw new Error(`No event found: ${D}`)}call(k,D,I){switch(D){case"click":return this.driver.click(I[0],I[1],I[2]);case"doubleClick":return this.driver.doubleClick(I);case"setValue":return this.driver.setValue(I[0],I[1]);case"getTitle":return this.driver.getTitle();case"isActiveElement":return this.driver.isActiveElement(I);case"getElements":return this.driver.getElements(I[0],I[1]);case"getElementXY":return this.driver.getElementXY(I[0],I[1],I[2]);case"typeInEditor":return this.driver.typeInEditor(I[0],I[1]);case"getTerminalBuffer":return this.driver.getTerminalBuffer(I);case"writeInTerminal":return this.driver.writeInTerminal(I[0],I[1]);case"getLocaleInfo":return this.driver.getLocaleInfo();case"getLocalizedStrings":return this.driver.getLocalizedStrings()}throw new Error(`Call not found: ${D}`)}}e.WindowDriverChannel=t;class f{constructor(k){this.channel=k}click(k,D,I){return this.channel.call("click",[k,D,I])}doubleClick(k){return this.channel.call("doubleClick",k)}setValue(k,D){return this.channel.call("setValue",[k,D])}getTitle(){return this.channel.call("getTitle")}isActiveElement(k){return this.channel.call("isActiveElement",k)}getElements(k,D){return this.channel.call("getElements",[k,D])}getElementXY(k,D,I){return this.channel.call("getElementXY",[k,D,I])}typeInEditor(k,D){return this.channel.call("typeInEditor",[k,D])}getTerminalBuffer(k){return this.channel.call("getTerminalBuffer",k)}writeInTerminal(k,D){return this.channel.call("writeInTerminal",[k,D])}getLocaleInfo(){return this.channel.call("getLocaleInfo")}getLocalizedStrings(){return this.channel.call("getLocalizedStrings")}}e.WindowDriverChannelClient=f;class _{constructor(k){this.channel=k}registerWindowDriver(k){return this.channel.call("registerWindowDriver",k)}reloadWindowDriver(k){return this.channel.call("reloadWindowDriver",k)}}e.WindowDriverRegistryChannelClient=_}),define(ne[132],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextEditorSelectionSource=e.TextEditorSelectionRevealType=e.EditorOpenSource=e.EditorResolution=e.EditorActivation=void 0;var t;(function(D){D[D.ACTIVATE=1]="ACTIVATE",D[D.RESTORE=2]="RESTORE",D[D.PRESERVE=3]="PRESERVE"})(t=e.EditorActivation||(e.EditorActivation={}));var f;(function(D){D[D.PICK=0]="PICK",D[D.DISABLED=1]="DISABLED",D[D.EXCLUSIVE_ONLY=2]="EXCLUSIVE_ONLY"})(f=e.EditorResolution||(e.EditorResolution={}));var _;(function(D){D[D.API=0]="API",D[D.USER=1]="USER"})(_=e.EditorOpenSource||(e.EditorOpenSource={}));var A;(function(D){D[D.Center=0]="Center",D[D.CenterIfOutsideViewport=1]="CenterIfOutsideViewport",D[D.NearTop=2]="NearTop",D[D.NearTopIfOutsideViewport=3]="NearTopIfOutsideViewport"})(A=e.TextEditorSelectionRevealType||(e.TextEditorSelectionRevealType={}));var k;(function(D){D.PROGRAMMATIC="api",D.NAVIGATION="code.navigation",D.JUMP="code.jump"})(k=e.TextEditorSelectionSource||(e.TextEditorSelectionSource={}))}),define(ne[1933],re([1,0,197,110,18,48,196,19,9]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parsePtyHostPort=e.parseSearchPort=e.parseExtensionHostPort=e.AbstractNativeEnvironmentService=void 0;class w{constructor(S,s,l){this._args=S,this.paths=s,this.productService=l}get appRoot(){return(0,A.dirname)(_.FileAccess.asFileUri("",Q).fsPath)}get userHome(){return I.URI.file(this.paths.homeDir)}get userDataPath(){return this.paths.userDataDir}get appSettingsHome(){return I.URI.file((0,A.join)(this.userDataPath,"User"))}get tmpDir(){return I.URI.file(this.paths.tmpDir)}get cacheHome(){return I.URI.file(this.userDataPath)}get userRoamingDataHome(){return this.appSettingsHome}get settingsResource(){return(0,D.joinPath)(this.userRoamingDataHome,"settings.json")}get userDataSyncHome(){return(0,D.joinPath)(this.userRoamingDataHome,"sync")}get logsPath(){if(!this.args.logsPath){const S=(0,t.toLocalISOString)(new Date).replace(/-|:|\.\d+Z$/g,"");this.args.logsPath=(0,A.join)(this.userDataPath,"logs",S)}return this.args.logsPath}get userDataSyncLogResource(){return I.URI.file((0,A.join)(this.logsPath,"userDataSync.log"))}get sync(){return this.args.sync}get machineSettingsResource(){return(0,D.joinPath)(I.URI.file((0,A.join)(this.userDataPath,"Machine")),"settings.json")}get globalStorageHome(){return(0,D.joinPath)(this.appSettingsHome,"globalStorage")}get workspaceStorageHome(){return(0,D.joinPath)(this.appSettingsHome,"workspaceStorage")}get localHistoryHome(){return(0,D.joinPath)(this.appSettingsHome,"History")}get keybindingsResource(){return(0,D.joinPath)(this.userRoamingDataHome,"keybindings.json")}get keyboardLayoutResource(){return(0,D.joinPath)(this.userRoamingDataHome,"keyboardLayout.json")}get argvResource(){const S=k.env.VSCODE_PORTABLE;return S?I.URI.file((0,A.join)(S,"argv.json")):(0,D.joinPath)(this.userHome,this.productService.dataFolderName,"argv.json")}get snippetsHome(){return(0,D.joinPath)(this.userRoamingDataHome,"snippets")}get isExtensionDevelopment(){return!!this.args.extensionDevelopmentPath}get untitledWorkspacesHome(){return I.URI.file((0,A.join)(this.userDataPath,"Workspaces"))}get installSourcePath(){return(0,A.join)(this.userDataPath,"installSource")}get builtinExtensionsPath(){const S=this.args["builtin-extensions-dir"];return S?(0,A.resolve)(S):(0,A.normalize)((0,A.join)(_.FileAccess.asFileUri("",Q).fsPath,"..","extensions"))}get extensionsDownloadPath(){const S=this.args["extensions-download-dir"];return S?(0,A.resolve)(S):(0,A.join)(this.userDataPath,"CachedExtensionVSIXs")}get extensionsPath(){const S=this.args["extensions-dir"];if(S)return(0,A.resolve)(S);const s=k.env.VSCODE_EXTENSIONS;if(s)return s;const l=k.env.VSCODE_PORTABLE;return l?(0,A.join)(l,"extensions"):(0,D.joinPath)(this.userHome,this.productService.dataFolderName,"extensions").fsPath}get extensionDevelopmentLocationURI(){const S=this.args.extensionDevelopmentPath;if(Array.isArray(S))return S.map(s=>/^[^:/?#]+?:\/\//.test(s)?I.URI.parse(s):I.URI.file((0,A.normalize)(s)))}get extensionDevelopmentKind(){return this.args.extensionDevelopmentKind?.map(S=>S==="ui"||S==="workspace"||S==="web"?S:"workspace")}get extensionTestsLocationURI(){const S=this.args.extensionTestsPath;if(S)return/^[^:/?#]+?:\/\//.test(S)?I.URI.parse(S):I.URI.file((0,A.normalize)(S))}get disableExtensions(){if(this.args["disable-extensions"])return!0;const S=this.args["disable-extension"];if(S){if(typeof S=="string")return[S];if(Array.isArray(S)&&S.length>0)return S}return!1}get debugExtensionHost(){return v(this.args,this.isBuilt)}get debugRenderer(){return!!this.args.debugRenderer}get isBuilt(){return!k.env.VSCODE_DEV}get verbose(){return!!this.args.verbose}get logLevel(){return this.args.log}get serviceMachineIdResource(){return(0,D.joinPath)(I.URI.file(this.userDataPath),"machineid")}get crashReporterId(){return this.args["crash-reporter-id"]}get crashReporterDirectory(){return this.args["crash-reporter-directory"]}get driverHandle(){return this.args.driver}get telemetryLogResource(){return I.URI.file((0,A.join)(this.logsPath,"telemetry.log"))}get disableTelemetry(){return!!this.args["disable-telemetry"]}get disableWorkspaceTrust(){return!!this.args["disable-workspace-trust"]}get args(){return this._args}}Ee([f.memoize],w.prototype,"appRoot",null),Ee([f.memoize],w.prototype,"userHome",null),Ee([f.memoize],w.prototype,"userDataPath",null),Ee([f.memoize],w.prototype,"appSettingsHome",null),Ee([f.memoize],w.prototype,"tmpDir",null),Ee([f.memoize],w.prototype,"cacheHome",null),Ee([f.memoize],w.prototype,"userRoamingDataHome",null),Ee([f.memoize],w.prototype,"settingsResource",null),Ee([f.memoize],w.prototype,"userDataSyncHome",null),Ee([f.memoize],w.prototype,"userDataSyncLogResource",null),Ee([f.memoize],w.prototype,"sync",null),Ee([f.memoize],w.prototype,"machineSettingsResource",null),Ee([f.memoize],w.prototype,"globalStorageHome",null),Ee([f.memoize],w.prototype,"workspaceStorageHome",null),Ee([f.memoize],w.prototype,"localHistoryHome",null),Ee([f.memoize],w.prototype,"keybindingsResource",null),Ee([f.memoize],w.prototype,"keyboardLayoutResource",null),Ee([f.memoize],w.prototype,"argvResource",null),Ee([f.memoize],w.prototype,"snippetsHome",null),Ee([f.memoize],w.prototype,"isExtensionDevelopment",null),Ee([f.memoize],w.prototype,"untitledWorkspacesHome",null),Ee([f.memoize],w.prototype,"installSourcePath",null),Ee([f.memoize],w.prototype,"builtinExtensionsPath",null),Ee([f.memoize],w.prototype,"extensionsPath",null),Ee([f.memoize],w.prototype,"extensionDevelopmentLocationURI",null),Ee([f.memoize],w.prototype,"extensionDevelopmentKind",null),Ee([f.memoize],w.prototype,"extensionTestsLocationURI",null),Ee([f.memoize],w.prototype,"debugExtensionHost",null),Ee([f.memoize],w.prototype,"serviceMachineIdResource",null),Ee([f.memoize],w.prototype,"telemetryLogResource",null),Ee([f.memoize],w.prototype,"disableWorkspaceTrust",null),e.AbstractNativeEnvironmentService=w;function v(i,S){return c(i["inspect-extensions"],i["inspect-brk-extensions"],5870,S,i.debugId,i.extensionEnvironment)}e.parseExtensionHostPort=v;function C(i,S){return c(i["inspect-search"],i["inspect-brk-search"],5876,S,i.extensionEnvironment)}e.parseSearchPort=C;function o(i,S){return c(i["inspect-ptyhost"],i["inspect-brk-ptyhost"],5877,S,i.extensionEnvironment)}e.parsePtyHostPort=o;function c(i,S,s,l,r,p){const a=Number(S||i)||(l?null:s),n=a?Boolean(!!S):!1;let h;if(p)try{h=JSON.parse(p)}catch{}return{port:a,break:n,debugId:r,env:h}}}),define(ne[721],re([1,0,9]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getRemotes=e.getDomainsOfRemotes=e.AllowedSecondLevelDomains=void 0;const f=/^([^@:]+@)?([^:]+):/,_=/^([^@:]+@)?([^:]+):(.+)$/,A=/^([^@]+@)?([^:]+)(:\d+)?$/,k=/([^@:.]+\.[^@:.]+)(:\d+)?$/,D=/^\s*url\s*=\s*(.+\S)\s*$/mg,I=/[^.]/g;e.AllowedSecondLevelDomains=["github.com","bitbucket.org","visualstudio.com","gitlab.com","heroku.com","azurewebsites.net","ibm.com","amazon.com","amazonaws.com","cloudapp.net","rhcloud.com","google.com","azure.com"];function w(s){const l=s.match(k);return l?l[1]:null}function v(s){if(s.indexOf("://")===-1){const l=s.match(f);return l?w(l[2]):null}try{const l=t.URI.parse(s);if(l.authority)return w(l.authority)}catch{}return null}function C(s,l){const r=new Set;let p;for(;p=D.exec(s);){const a=v(p[1]);a&&r.add(a)}const u=new Set(l);return Array.from(r).map(a=>u.has(a)?a:a.replace(I,"a"))}e.getDomainsOfRemotes=C;function o(s){const l=s.match(A);return l?l[2]:null}function c(s,l,r){return s&&l?(r&&l.endsWith(".git")&&(l=l.substr(0,l.length-4)),l.indexOf("/")===0?`${s}${l}`:`${s}/${l}`):null}function i(s,l){if(s.indexOf("://")===-1){const r=s.match(_);if(r)return c(r[2],r[3],l)}try{const r=t.URI.parse(s);if(r.authority)return c(o(r.authority),r.path,l)}catch{}return null}function S(s,l=!1){const r=[];let p;for(;p=D.exec(s);){const u=i(p[1],l);u&&r.push(u)}return r}e.getRemotes=S}),define(ne[722],re([1,0,51]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.localizeManifest=void 0;const f=/^%([\w\d.-]+)%$/i;function _(A,k){const D=I=>{if(typeof I!="string")return;const w=f.exec(I);if(!w)return;const v=k[w[1]]??I;return typeof v=="string"?v:typeof v.message=="string"?v.message:I};return(0,t.cloneAndChange)(A,D)}e.localizeManifest=_}),define(ne[1934],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionRecommendationNotificationServiceChannel=e.ExtensionRecommendationNotificationServiceChannelClient=void 0;class t{constructor(A){this.channel=A}get ignoredRecommendations(){throw new Error("not supported")}promptImportantExtensionsInstallNotification(A,k,D,I){return this.channel.call("promptImportantExtensionsInstallNotification",[A,k,D,I])}promptWorkspaceRecommendations(A){throw new Error("not supported")}hasToIgnoreRecommendationNotifications(){throw new Error("not supported")}}e.ExtensionRecommendationNotificationServiceChannelClient=t;class f{constructor(A){this.service=A}listen(A,k){throw new Error(`Event not found: ${k}`)}call(A,k,D){switch(k){case"promptImportantExtensionsInstallNotification":return this.service.promptImportantExtensionsInstallNotification(D[0],D[1],D[2],D[3])}throw new Error(`Call not found: ${k}`)}}e.ExtensionRecommendationNotificationServiceChannel=f}),define(ne[723],re([1,0,1325]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isEngineValid=e.isValidExtensionVersion=e.isValidVersion=e.normalizeVersion=e.parseVersion=e.isValidVersionStr=void 0;const f=/^(\^|>=)?((\d+)|x)\.((\d+)|x)\.((\d+)|x)(\-.*)?$/,_=/^-(\d{4})(\d{2})(\d{2})$/;function A(o){return o=o.trim(),o==="*"||f.test(o)}e.isValidVersionStr=A;function k(o){if(!A(o))return null;if(o=o.trim(),o==="*")return{hasCaret:!1,hasGreaterEquals:!1,majorBase:0,majorMustEqual:!1,minorBase:0,minorMustEqual:!1,patchBase:0,patchMustEqual:!1,preRelease:null};let c=o.match(f);return c?{hasCaret:c[1]==="^",hasGreaterEquals:c[1]===">=",majorBase:c[2]==="x"?0:parseInt(c[2],10),majorMustEqual:c[2]!=="x",minorBase:c[4]==="x"?0:parseInt(c[4],10),minorMustEqual:c[4]!=="x",patchBase:c[6]==="x"?0:parseInt(c[6],10),patchMustEqual:c[6]!=="x",preRelease:c[8]||null}:null}e.parseVersion=k;function D(o){if(!o)return null;let c=o.majorBase,i=o.majorMustEqual,S=o.minorBase,s=o.minorMustEqual,l=o.patchBase,r=o.patchMustEqual;o.hasCaret&&(c===0||(s=!1),r=!1);let p=0;if(o.preRelease){const u=_.exec(o.preRelease);if(u){const[,a,n,h]=u;p=Date.UTC(Number(a),Number(n)-1,Number(h))}}return{majorBase:c,majorMustEqual:i,minorBase:S,minorMustEqual:s,patchBase:l,patchMustEqual:r,isMinimum:o.hasGreaterEquals,notBefore:p}}e.normalizeVersion=D;function I(o,c,i){let S;typeof o=="string"?S=D(k(o)):S=o;let s;c instanceof Date?s=c.getTime():typeof c=="string"&&(s=new Date(c).getTime());let l;if(typeof i=="string"?l=D(k(i)):l=i,!S||!l)return!1;let r=S.majorBase,p=S.minorBase,u=S.patchBase,a=l.majorBase,n=l.minorBase,h=l.patchBase,g=l.notBefore,d=l.majorMustEqual,m=l.minorMustEqual,b=l.patchMustEqual;return l.isMinimum?r>a?!0:r<a?!1:p>n?!0:p<n||s&&s<g?!1:u>=h:(r===1&&a===0&&(!d||!m||!b)&&(a=1,n=0,h=0,d=!0,m=!1,b=!1),r<a?!1:r>a?!d:p<n?!1:p>n?!m:u<h?!1:u>h?!b:!(s&&s<g))}e.isValidVersion=I;function w(o,c,i,S,s){return S||typeof i.main=="undefined"&&typeof i.browser=="undefined"?!0:C(o,c,i.engines.vscode,s)}e.isValidExtensionVersion=w;function v(o,c,i){return o==="*"||C(c,i,o)}e.isEngineValid=v;function C(o,c,i,S=[]){let s=D(k(i));if(!s)return S.push(t.localize(0,null,i)),!1;if(s.majorBase===0){if(!s.majorMustEqual||!s.minorMustEqual)return S.push(t.localize(1,null,i)),!1}else if(!s.majorMustEqual)return S.push(t.localize(2,null,i)),!1;return I(o,c,s)?!0:(S.push(t.localize(3,null,o,i)),!1)}}),define(ne[347],re([1,0,60,89]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getServiceMachineId=void 0;async function _(A,k,D){let I=D&&D.get("storage.serviceMachineId",0)||null;if(I)return I;try{const v=(await k.readFile(A.serviceMachineIdResource)).value.toString();I=(0,f.isUUID)(v)?v:null}catch{I=null}if(!I){I=(0,f.generateUuid)();try{await k.writeFile(A.serviceMachineIdResource,t.VSBuffer.fromString(I))}catch{}}return D&&D.store("storage.serviceMachineId",I,0,1),I}e.getServiceMachineId=_}),define(ne[396],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebFileSystemAccess=void 0;var t;(function(f){function _(I){return typeof I?.showDirectoryPicker=="function"}f.supported=_;function A(I){const w=I;return w?typeof w.kind=="string"&&typeof w.queryPermission=="function"&&typeof w.requestPermission=="function":!1}f.isFileSystemHandle=A;function k(I){return I.kind==="file"}f.isFileSystemFileHandle=k;function D(I){return I.kind==="directory"}f.isFileSystemDirectoryHandle=D})(t=e.WebFileSystemAccess||(e.WebFileSystemAccess={}))}),define(ne[348],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.showHistoryKeybindingHint=void 0;function t(f){return f.lookupKeybinding("history.showPrevious")?.getElectronAccelerator()==="Up"&&f.lookupKeybinding("history.showNext")?.getElectronAccelerator()==="Down"}e.showHistoryKeybindingHint=t}),define(ne[99],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SyncDescriptor=void 0;class t{constructor(_,A=[],k=!1){this.ctor=_,this.staticArguments=A,this.supportsDelayedInstantiation=k}}e.SyncDescriptor=t}),define(ne[35],re([1,0,99]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSingletonServiceDescriptors=e.registerSingleton=void 0;const f=[];function _(k,D,I){D instanceof t.SyncDescriptor||(D=new t.SyncDescriptor(D,[],I)),f.push([k,D])}e.registerSingleton=_;function A(){return f}e.getSingletonServiceDescriptors=A}),define(ne[1935],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Graph=e.Node=void 0;class t{constructor(A){this.incoming=new Map,this.outgoing=new Map,this.data=A}}e.Node=t;class f{constructor(A){this._hashFn=A,this._nodes=new Map}roots(){const A=[];for(let k of this._nodes.values())k.outgoing.size===0&&A.push(k);return A}insertEdge(A,k){const D=this.lookupOrInsertNode(A),I=this.lookupOrInsertNode(k);D.outgoing.set(this._hashFn(k),I),I.incoming.set(this._hashFn(A),D)}removeNode(A){const k=this._hashFn(A);this._nodes.delete(k);for(let D of this._nodes.values())D.outgoing.delete(k),D.incoming.delete(k)}lookupOrInsertNode(A){const k=this._hashFn(A);let D=this._nodes.get(k);return D||(D=new t(A),this._nodes.set(k,D)),D}lookup(A){return this._nodes.get(this._hashFn(A))}isEmpty(){return this._nodes.size===0}toString(){let A=[];for(let[k,D]of this._nodes)A.push(`${k}, (incoming)[${[...D.incoming.keys()].join(", ")}], (outgoing)[${[...D.outgoing.keys()].join(",")}]`);return A.join(` `)}findCycleSlow(){for(let[A,k]of this._nodes){const D=new Set([A]),I=this._findCycle(k,D);if(I)return I}}_findCycle(A,k){for(let[D,I]of A.outgoing){if(k.has(D))return[...k,D].join(" -> ");k.add(D);const w=this._findCycle(I,k);if(w)return w;k.delete(D)}}}e.Graph=f}),define(ne[5],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.refineServiceDecorator=e.createDecorator=e.IInstantiationService=e._util=void 0;var t;(function(k){k.serviceIds=new Map,k.DI_TARGET="$di$target",k.DI_DEPENDENCIES="$di$dependencies";function D(I){return I[k.DI_DEPENDENCIES]||[]}k.getServiceDependencies=D})(t=e._util||(e._util={})),e.IInstantiationService=_("instantiationService");function f(k,D,I){D[t.DI_TARGET]===D?D[t.DI_DEPENDENCIES].push({id:k,index:I}):(D[t.DI_DEPENDENCIES]=[{id:k,index:I}],D[t.DI_TARGET]=D)}function _(k){if(t.serviceIds.has(k))return t.serviceIds.get(k);const D=function(I,w,v){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");f(D,I,v)};return D.toString=()=>k,t.serviceIds.set(k,D),D}e.createDecorator=_;function A(k){return k}e.refineServiceDecorator=A}),define(ne[140],re([1,0,5,9,13]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceFileEdit=e.ResourceTextEdit=e.ResourceEdit=e.IBulkEditService=void 0,e.IBulkEditService=(0,t.createDecorator)("IWorkspaceEditService");function A(v){return(0,_.isObject)(v)&&(Boolean(v.newUri)||Boolean(v.oldUri))}function k(v){return(0,_.isObject)(v)&&f.URI.isUri(v.resource)&&(0,_.isObject)(v.edit)}class D{constructor(C){this.metadata=C}static convert(C){return C.edits.map(o=>{if(k(o))return new I(o.resource,o.edit,o.modelVersionId,o.metadata);if(A(o))return new w(o.oldUri,o.newUri,o.options,o.metadata);throw new Error("Unsupported edit")})}}e.ResourceEdit=D;class I extends D{constructor(C,o,c,i){super(i);this.resource=C,this.textEdit=o,this.versionId=c}}e.ResourceTextEdit=I;class w extends D{constructor(C,o,c,i){super(i);this.oldResource=C,this.newResource=o,this.options=c}}e.ResourceFileEdit=w}),define(ne[72],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ICodeEditorService=void 0,e.ICodeEditorService=(0,t.createDecorator)("codeEditorService")}),define(ne[42],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILanguageService=void 0,e.ILanguageService=(0,t.createDecorator)("languageService")}),define(ne[184],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEditorWorkerService=e.ID_EDITOR_WORKER_SERVICE=void 0,e.ID_EDITOR_WORKER_SERVICE="editorWorkerService",e.IEditorWorkerService=(0,t.createDecorator)(e.ID_EDITOR_WORKER_SERVICE)}),define(ne[62],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILanguageFeaturesService=void 0,e.ILanguageFeaturesService=(0,t.createDecorator)("ILanguageFeaturesService")}),define(ne[1936],re([1,0,457,62,35]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageFeaturesService=void 0;class A{constructor(){this.referenceProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.renameProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.codeActionProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.definitionProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.typeDefinitionProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.declarationProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.implementationProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.documentSymbolProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.inlayHintsProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.colorProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.codeLensProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.documentFormattingEditProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.documentRangeFormattingEditProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.onTypeFormattingEditProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.signatureHelpProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.hoverProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.documentHighlightProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.selectionRangeProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.foldingRangeProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.linkProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.inlineCompletionsProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.completionProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.linkedEditingRangeProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.inlineValuesProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.evaluatableExpressionProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.documentSemanticTokensProvider=new t.LanguageFeatureRegistry(this._score.bind(this))}setNotebookTypeResolver(D){this._notebookTypeResolver=D}_score(D){return this._notebookTypeResolver?.(D)}}e.LanguageFeaturesService=A,(0,_.registerSingleton)(f.ILanguageFeaturesService,A,!0)}),define(ne[464],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerDecorationsService=void 0,e.IMarkerDecorationsService=(0,t.createDecorator)("markerDecorationsService")}),define(ne[52],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IModelService=void 0,e.IModelService=(0,t.createDecorator)("modelService")}),define(ne[61],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITextModelService=void 0,e.ITextModelService=(0,t.createDecorator)("textModelService")}),define(ne[113],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITextResourcePropertiesService=e.ITextResourceConfigurationService=void 0,e.ITextResourceConfigurationService=(0,t.createDecorator)("textResourceConfigurationService"),e.ITextResourcePropertiesService=(0,t.createDecorator)("textResourcePropertiesService")}),define(ne[724],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IChecksumService=void 0,e.IChecksumService=(0,t.createDecorator)("checksumService")}),define(ne[95],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IClipboardService=void 0,e.IClipboardService=(0,t.createDecorator)("clipboardService")}),define(ne[28],re([1,0,6,92,2,194,13,5]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NullCommandService=e.CommandsRegistry=e.ICommandService=void 0,e.ICommandService=(0,D.createDecorator)("commandService"),e.CommandsRegistry=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new t.Emitter,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(I,w){if(!I)throw new Error("invalid command");if(typeof I=="string"){if(!w)throw new Error("invalid command");return this.registerCommand({id:I,handler:w})}if(I.description){const i=[];for(let s of I.description.args)i.push(s.constraint);const S=I.handler;I.handler=function(s,...l){return(0,k.validateConstraints)(l,i),S(s,...l)}}const{id:v}=I;let C=this._commands.get(v);C||(C=new A.LinkedList,this._commands.set(v,C));let o=C.unshift(I),c=(0,_.toDisposable)(()=>{o(),this._commands.get(v)?.isEmpty()&&this._commands.delete(v)});return this._onDidRegisterCommand.fire(v),c}registerCommandAlias(I,w){return e.CommandsRegistry.registerCommand(I,(v,...C)=>v.get(e.ICommandService).executeCommand(w,...C))}getCommand(I){const w=this._commands.get(I);if(!(!w||w.isEmpty()))return f.Iterable.first(w)}getCommands(){const I=new Map;for(const w of this._commands.keys()){const v=this.getCommand(w);v&&I.set(w,v)}return I}},e.NullCommandService={_serviceBrand:void 0,onWillExecuteCommand:()=>_.Disposable.None,onDidExecuteCommand:()=>_.Disposable.None,executeCommand(){return Promise.resolve(void 0)}},e.CommandsRegistry.registerCommand("noop",()=>{})}),define(ne[725],re([1,0,30,22,9,52,28,13,696,20,62]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getDocumentRangeSemanticTokens=e.hasDocumentRangeSemanticTokensProvider=e.getDocumentSemanticTokens=e.hasDocumentSemanticTokensProvider=e.DocumentSemanticTokensResult=e.isSemanticTokensEdits=e.isSemanticTokens=void 0;function C(n){return n&&!!n.data}e.isSemanticTokens=C;function o(n){return n&&Array.isArray(n.edits)}e.isSemanticTokensEdits=o;class c{constructor(h,g,d){this.provider=h,this.tokens=g,this.error=d}}e.DocumentSemanticTokensResult=c;function i(n,h){return n.has(h)}e.hasDocumentSemanticTokensProvider=i;function S(n,h){const g=n.orderedGroups(h);return g.length>0?g[0]:[]}async function s(n,h,g,d,m){const b=S(n,h),E=await Promise.all(b.map(async y=>{let T,R=null;try{T=await y.provideDocumentSemanticTokens(h,y===g?d:null,m)}catch(O){R=O,T=null}return(!T||!C(T)&&!o(T))&&(T=null),new c(y,T,R)}));for(const y of E){if(y.error)throw y.error;if(y.tokens)return y}return E.length>0?E[0]:null}e.getDocumentSemanticTokens=s;function l(n,h){const g=n.orderedGroups(h);return g.length>0?g[0]:null}class r{constructor(h,g){this.provider=h,this.tokens=g}}function p(n,h){return n.has(h)}e.hasDocumentRangeSemanticTokensProvider=p;function u(n,h){const g=n.orderedGroups(h);return g.length>0?g[0]:[]}async function a(n,h,g,d){const m=u(n,h),b=await Promise.all(m.map(async E=>{let y;try{y=await E.provideDocumentRangeSemanticTokens(h,g,d)}catch(T){(0,f.onUnexpectedExternalError)(T),y=null}return(!y||!C(y))&&(y=null),new r(E,y)}));for(const E of b)if(E.tokens)return E;return b.length>0?b[0]:null}e.getDocumentRangeSemanticTokens=a,k.CommandsRegistry.registerCommand("_provideDocumentSemanticTokensLegend",async(n,...h)=>{const[g]=h;(0,D.assertType)(g instanceof _.URI);const d=n.get(A.IModelService).getModel(g);if(!d)return;const{documentSemanticTokensProvider:m}=n.get(v.ILanguageFeaturesService),b=l(m,d);return b?b[0].getLegend():n.get(k.ICommandService).executeCommand("_provideDocumentRangeSemanticTokensLegend",g)}),k.CommandsRegistry.registerCommand("_provideDocumentSemanticTokens",async(n,...h)=>{const[g]=h;(0,D.assertType)(g instanceof _.URI);const d=n.get(A.IModelService).getModel(g);if(!d)return;const{documentSemanticTokensProvider:m}=n.get(v.ILanguageFeaturesService);if(!i(m,d))return n.get(k.ICommandService).executeCommand("_provideDocumentRangeSemanticTokens",g,d.getFullModelRange());const b=await s(m,d,null,null,t.CancellationToken.None);if(!b)return;const{provider:E,tokens:y}=b;if(!y||!C(y))return;const T=(0,I.encodeSemanticTokensDto)({id:0,type:"full",data:y.data});return y.resultId&&E.releaseDocumentSemanticTokens(y.resultId),T}),k.CommandsRegistry.registerCommand("_provideDocumentRangeSemanticTokensLegend",async(n,...h)=>{const[g,d]=h;(0,D.assertType)(g instanceof _.URI);const m=n.get(A.IModelService).getModel(g);if(!m)return;const{documentRangeSemanticTokensProvider:b}=n.get(v.ILanguageFeaturesService),E=u(b,m);if(E.length===0)return;if(E.length===1)return E[0].getLegend();if(!d||!w.Range.isIRange(d))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),E[0].getLegend();const y=await a(b,m,w.Range.lift(d),t.CancellationToken.None);if(!!y)return y.provider.getLegend()}),k.CommandsRegistry.registerCommand("_provideDocumentRangeSemanticTokens",async(n,...h)=>{const[g,d]=h;(0,D.assertType)(g instanceof _.URI),(0,D.assertType)(w.Range.isIRange(d));const m=n.get(A.IModelService).getModel(g);if(!m)return;const{documentRangeSemanticTokensProvider:b}=n.get(v.ILanguageFeaturesService),E=await a(b,m,w.Range.lift(d),t.CancellationToken.None);if(!(!E||!E.tokens))return(0,I.encodeSemanticTokensDto)({id:0,type:"full",data:E.tokens.data})})}),define(ne[726],re([1,0,30,22,2,13,9,52,28,62]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCodeLensModel=e.CodeLensModel=void 0;class v{constructor(){this.lenses=[],this._disposables=new _.DisposableStore}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(c,i){this._disposables.add(c);for(const S of c.lenses)this.lenses.push({symbol:S,provider:i})}}e.CodeLensModel=v;async function C(o,c,i){const S=o.ordered(c),s=new Map,l=new v,r=S.map(async(p,u)=>{s.set(p,u);try{const a=await Promise.resolve(p.provideCodeLenses(c,i));a&&l.add(a,p)}catch(a){(0,f.onUnexpectedExternalError)(a)}});return await Promise.all(r),l.lenses=l.lenses.sort((p,u)=>p.symbol.range.startLineNumber<u.symbol.range.startLineNumber?-1:p.symbol.range.startLineNumber>u.symbol.range.startLineNumber?1:s.get(p.provider)<s.get(u.provider)?-1:s.get(p.provider)>s.get(u.provider)?1:p.symbol.range.startColumn<u.symbol.range.startColumn?-1:p.symbol.range.startColumn>u.symbol.range.startColumn?1:0),l}e.getCodeLensModel=C,I.CommandsRegistry.registerCommand("_executeCodeLensProvider",function(o,...c){let[i,S]=c;(0,A.assertType)(k.URI.isUri(i)),(0,A.assertType)(typeof S=="number"||!S);const{codeLensProvider:s}=o.get(w.ILanguageFeaturesService),l=o.get(D.IModelService).getModel(i);if(!l)throw(0,f.illegalArgument)();const r=[],p=new _.DisposableStore;return C(s,l,t.CancellationToken.None).then(u=>{p.add(u);let a=[];for(const n of u.lenses)S==null||Boolean(n.symbol.command)?r.push(n.symbol):S-- >0&&n.provider.resolveCodeLens&&a.push(Promise.resolve(n.provider.resolveCodeLens(l,n.symbol,t.CancellationToken.None)).then(h=>r.push(h||n.symbol)));return Promise.all(a)}).then(()=>r).finally(()=>{setTimeout(()=>p.dispose(),100)})})}),define(ne[727],re([1,0,30,22,9,20,52,28,62]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getColorPresentations=e.getColors=void 0;function w(C,o,c){const i=[],s=C.ordered(o).reverse().map(l=>Promise.resolve(l.provideDocumentColors(o,c)).then(r=>{if(Array.isArray(r))for(let p of r)i.push({colorInfo:p,provider:l})}));return Promise.all(s).then(()=>i)}e.getColors=w;function v(C,o,c,i){return Promise.resolve(c.provideColorPresentations(C,o,i))}e.getColorPresentations=v,D.CommandsRegistry.registerCommand("_executeDocumentColorProvider",function(C,...o){const[c]=o;if(!(c instanceof _.URI))throw(0,f.illegalArgument)();const{colorProvider:i}=C.get(I.ILanguageFeaturesService),S=C.get(k.IModelService).getModel(c);if(!S)throw(0,f.illegalArgument)();const s=[],r=i.ordered(S).reverse().map(p=>Promise.resolve(p.provideDocumentColors(S,t.CancellationToken.None)).then(u=>{if(Array.isArray(u))for(let a of u)s.push({range:a.range,color:[a.color.red,a.color.green,a.color.blue,a.color.alpha]})}));return Promise.all(r).then(()=>s)}),D.CommandsRegistry.registerCommand("_executeColorPresentationProvider",function(C,...o){const[c,i]=o,{uri:S,range:s}=i;if(!(S instanceof _.URI)||!Array.isArray(c)||c.length!==4||!A.Range.isIRange(s))throw(0,f.illegalArgument)();const[l,r,p,u]=c,{colorProvider:a}=C.get(I.ILanguageFeaturesService),n=C.get(k.IModelService).getModel(S);if(!n)throw(0,f.illegalArgument)();const h={range:s,color:{red:l,green:r,blue:p,alpha:u}},g=[],m=a.ordered(n).reverse().map(b=>Promise.resolve(b.provideColorPresentations(n,h,t.CancellationToken.None)).then(E=>{Array.isArray(E)&&g.push(...E)}));return Promise.all(m).then(()=>g)})}),define(ne[1937],re([1,0,15,30,22,2,13,9,20,52,28,62]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLinks=e.LinksList=e.Link=void 0;class o{constructor(s,l){this._link=s,this._provider=l}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}async resolve(s){return this._link.url?this._link.url:typeof this._provider.resolveLink=="function"?Promise.resolve(this._provider.resolveLink(this._link,s)).then(l=>(this._link=l||this._link,this._link.url?this.resolve(s):Promise.reject(new Error("missing")))):Promise.reject(new Error("missing"))}}e.Link=o;class c{constructor(s){this._disposables=new A.DisposableStore;let l=[];for(const[r,p]of s){const u=r.links.map(a=>new o(a,p));l=c._union(l,u),(0,A.isDisposable)(r)&&this._disposables.add(r)}this.links=l}dispose(){this._disposables.dispose(),this.links.length=0}static _union(s,l){let r=[],p,u,a,n;for(p=0,a=0,u=s.length,n=l.length;p<u&&a<n;){const h=s[p],g=l[a];if(I.Range.areIntersectingOrTouching(h.range,g.range)){p++;continue}I.Range.compareRangesUsingStarts(h.range,g.range)<0?(r.push(h),p++):(r.push(g),a++)}for(;p<u;p++)r.push(s[p]);for(;a<n;a++)r.push(l[a]);return r}}e.LinksList=c;function i(S,s,l){const r=[],p=S.ordered(s).reverse().map((u,a)=>Promise.resolve(u.provideLinks(s,l)).then(n=>{n&&(r[a]=[n,u])},_.onUnexpectedExternalError));return Promise.all(p).then(()=>{const u=new c((0,t.coalesce)(r));return l.isCancellationRequested?(u.dispose(),new c([])):u})}e.getLinks=i,v.CommandsRegistry.registerCommand("_executeLinkProvider",async(S,...s)=>{let[l,r]=s;(0,k.assertType)(l instanceof D.URI),typeof r!="number"&&(r=0);const{linkProvider:p}=S.get(C.ILanguageFeaturesService),u=S.get(w.IModelService).getModel(l);if(!u)return[];const a=await i(p,u,f.CancellationToken.None);if(!a)return[];for(let h=0;h<Math.min(r,a.links.length);h++)await a.links[h].resolve(f.CancellationToken.None);const n=a.links.slice(0);return a.dispose(),n})}),define(ne[8],re([1,0,13,9,5]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLanguageTagSettingPlainKey=e.getMigratedSettingValue=e.merge=e.getConfigurationValue=e.removeFromValueTree=e.addToValueTree=e.toValuesTree=e.ConfigurationTargetToString=e.ConfigurationTarget=e.isConfigurationUpdateOverrides=e.isConfigurationOverrides=e.IConfigurationService=void 0,e.IConfigurationService=(0,_.createDecorator)("configurationService");function A(l){return l&&typeof l=="object"&&(!l.overrideIdentifier||typeof l.overrideIdentifier=="string")&&(!l.resource||l.resource instanceof f.URI)}e.isConfigurationOverrides=A;function k(l){return l&&typeof l=="object"&&(!l.overrideIdentifiers||t.isArray(l.overrideIdentifiers))&&!l.overrideIdentifier&&(!l.resource||l.resource instanceof f.URI)}e.isConfigurationUpdateOverrides=k;var D;(function(l){l[l.USER=1]="USER",l[l.USER_LOCAL=2]="USER_LOCAL",l[l.USER_REMOTE=3]="USER_REMOTE",l[l.WORKSPACE=4]="WORKSPACE",l[l.WORKSPACE_FOLDER=5]="WORKSPACE_FOLDER",l[l.DEFAULT=6]="DEFAULT",l[l.MEMORY=7]="MEMORY"})(D=e.ConfigurationTarget||(e.ConfigurationTarget={}));function I(l){switch(l){case 1:return"USER";case 2:return"USER_LOCAL";case 3:return"USER_REMOTE";case 4:return"WORKSPACE";case 5:return"WORKSPACE_FOLDER";case 6:return"DEFAULT";case 7:return"MEMORY"}}e.ConfigurationTargetToString=I;function w(l,r){const p=Object.create(null);for(let u in l)v(p,u,l[u],r);return p}e.toValuesTree=w;function v(l,r,p,u){const a=r.split("."),n=a.pop();let h=l;for(let g=0;g<a.length;g++){let d=a[g],m=h[d];switch(typeof m){case"undefined":m=h[d]=Object.create(null);break;case"object":break;default:u(`Ignoring ${r} as ${a.slice(0,g+1).join(".")} is ${JSON.stringify(m)}`);return}h=m}if(typeof h=="object"&&h!==null)try{h[n]=p}catch{u(`Ignoring ${r} as ${a.join(".")} is ${JSON.stringify(h)}`)}else u(`Ignoring ${r} as ${a.join(".")} is ${JSON.stringify(h)}`)}e.addToValueTree=v;function C(l,r){const p=r.split(".");o(l,p)}e.removeFromValueTree=C;function o(l,r){const p=r.shift();if(r.length===0){delete l[p];return}if(Object.keys(l).indexOf(p)!==-1){const u=l[p];typeof u=="object"&&!Array.isArray(u)&&(o(u,r),Object.keys(u).length===0&&delete l[p])}}function c(l,r,p){function u(h,g){let d=h;for(const m of g){if(typeof d!="object"||d===null)return;d=d[m]}return d}const a=r.split("."),n=u(l,a);return typeof n=="undefined"?p:n}e.getConfigurationValue=c;function i(l,r,p){Object.keys(r).forEach(u=>{u!=="__proto__"&&(u in l?t.isObject(l[u])&&t.isObject(r[u])?i(l[u],r[u],p):p&&(l[u]=r[u]):l[u]=r[u])})}e.merge=i;function S(l,r,p){const u=l.inspect(r),a=l.inspect(p);return typeof u.userValue!="undefined"||typeof u.workspaceValue!="undefined"||typeof u.workspaceFolderValue!="undefined"?u.value:typeof a.userValue!="undefined"||typeof a.workspaceValue!="undefined"||typeof a.workspaceFolderValue!="undefined"?a.value:u.defaultValue}e.getMigratedSettingValue=S;function s(l){return l.replace(/[\[\]]/g,"")}e.getLanguageTagSettingPlainKey=s});var W=this&&this.__param||function(Q,e){return function(t,f){e(t,f,Q)}};define(ne[124],re([1,0,6,2,29,283,342,386,1151,1155,1152,1154,528,5,8,42,35]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResolvedLanguageConfiguration=e.LanguageConfigurationRegistry=e.LanguageConfigurationRegistryImpl=e.LanguageConfigurationChangeEvent=e.LanguageConfigurationService=e.ILanguageConfigurationService=e.LanguageConfigurationServiceChangeEvent=void 0;class l{constructor(T){this.languageId=T}affects(T){return this.languageId?this.languageId===T:!0}}e.LanguageConfigurationServiceChangeEvent=l,e.ILanguageConfigurationService=(0,c.createDecorator)("languageConfigurationService");let r=class extends f.Disposable{constructor(T,R){super();this.configurationService=T,this.languageService=R,this.onDidChangeEmitter=this._register(new t.Emitter),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const O=new Set(Object.values(u));this._register(this.configurationService.onDidChangeConfiguration(x=>{const F=x.change.keys.some(M=>O.has(M)),L=x.change.overrides.filter(([M,N])=>N.some(B=>O.has(B))).map(([M])=>M);if(F)this.configurations.clear(),this.onDidChangeEmitter.fire(new l(void 0));else for(const M of L)this.languageService.isRegisteredLanguageId(M)&&(this.configurations.delete(M),this.onDidChangeEmitter.fire(new l(M)))})),this._register(e.LanguageConfigurationRegistry.onDidChange(x=>{this.configurations.delete(x.languageId),this.onDidChangeEmitter.fire(new l(x.languageId))}))}getLanguageConfiguration(T){let R=this.configurations.get(T);return R||(R=p(T,this.configurationService,this.languageService),this.configurations.set(T,R)),R}};r=Ee([W(0,i.IConfigurationService),W(1,S.ILanguageService)],r),e.LanguageConfigurationService=r;function p(y,T,R){let O=e.LanguageConfigurationRegistry.getLanguageConfiguration(y);if(!O){if(!R.isRegisteredLanguageId(y))throw new Error(`Language id "${y}" is not configured nor known`);O=new E(y,{})}const x=a(O.languageId,T),F=m([O.underlyingConfig,x]);return new E(O.languageId,F)}const u={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function a(y,T){const R=T.getValue(u.brackets,{overrideIdentifier:y}),O=T.getValue(u.colorizedBracketPairs,{overrideIdentifier:y});return{brackets:n(R),colorizedBracketPairs:n(O)}}function n(y){if(!!Array.isArray(y))return y.map(T=>{if(!(!Array.isArray(T)||T.length!==2))return[T[0],T[1]]}).filter(T=>!!T)}class h{constructor(T){this.languageId=T}}e.LanguageConfigurationChangeEvent=h;class g{constructor(){this._entries=new Map,this._onDidChange=new t.Emitter,this.onDidChange=this._onDidChange.event}register(T,R,O=0){let x=this._entries.get(T);x||(x=new d(T),this._entries.set(T,x));const F=x.register(R,O);return this._onDidChange.fire(new h(T)),(0,f.toDisposable)(()=>{F.dispose(),this._onDidChange.fire(new h(T))})}getLanguageConfiguration(T){return this._entries.get(T)?.getResolvedConfiguration()||null}getComments(T){const R=this.getLanguageConfiguration(T);return R&&R.comments||null}getIndentRulesSupport(T){const R=this.getLanguageConfiguration(T);return R&&R.indentRulesSupport||null}getPrecedingValidLine(T,R,O){const x=T.getLanguageIdAtPosition(R,0);if(R>1){let F,L=-1;for(F=R-1;F>=1;F--){if(T.getLanguageIdAtPosition(F,0)!==x)return L;const M=T.getLineContent(F);if(O.shouldIgnore(M)||/^\s+$/.test(M)||M===""){L=F;continue}return F}}return-1}getInheritIndentForLine(T,R,O,x=!0){if(T<4)return null;const F=this.getIndentRulesSupport(R.getLanguageId());if(!F)return null;if(O<=1)return{indentation:"",action:null};const L=this.getPrecedingValidLine(R,O,F);if(L<0)return null;if(L<1)return{indentation:"",action:null};const M=R.getLineContent(L);if(F.shouldIncrease(M)||F.shouldIndentNextLine(M))return{indentation:_.getLeadingWhitespace(M),action:k.IndentAction.Indent,line:L};if(F.shouldDecrease(M))return{indentation:_.getLeadingWhitespace(M),action:null,line:L};{if(L===1)return{indentation:_.getLeadingWhitespace(R.getLineContent(L)),action:null,line:L};const N=L-1,B=F.getIndentMetadata(R.getLineContent(N));if(!(B&(1|2))&&B&4){let P=0;for(let V=N-1;V>0;V--)if(!F.shouldIndentNextLine(R.getLineContent(V))){P=V;break}return{indentation:_.getLeadingWhitespace(R.getLineContent(P+1)),action:null,line:P+1}}if(x)return{indentation:_.getLeadingWhitespace(R.getLineContent(L)),action:null,line:L};for(let P=L;P>0;P--){const V=R.getLineContent(P);if(F.shouldIncrease(V))return{indentation:_.getLeadingWhitespace(V),action:k.IndentAction.Indent,line:P};if(F.shouldIndentNextLine(V)){let z=0;for(let U=P-1;U>0;U--)if(!F.shouldIndentNextLine(R.getLineContent(P))){z=U;break}return{indentation:_.getLeadingWhitespace(R.getLineContent(z+1)),action:null,line:z+1}}else if(F.shouldDecrease(V))return{indentation:_.getLeadingWhitespace(V),action:null,line:P}}return{indentation:_.getLeadingWhitespace(R.getLineContent(1)),action:null,line:1}}}getGoodIndentForLine(T,R,O,x,F){if(T<4)return null;const L=this.getLanguageConfiguration(O);if(!L)return null;const M=this.getIndentRulesSupport(O);if(!M)return null;const N=this.getInheritIndentForLine(T,R,x),B=R.getLineContent(x);if(N){const P=N.line;if(P!==void 0){const V=L.onEnter(T,"",R.getLineContent(P),"");if(V){let z=_.getLeadingWhitespace(R.getLineContent(P));return V.removeText&&(z=z.substring(0,z.length-V.removeText)),V.indentAction===k.IndentAction.Indent||V.indentAction===k.IndentAction.IndentOutdent?z=F.shiftIndent(z):V.indentAction===k.IndentAction.Outdent&&(z=F.unshiftIndent(z)),M.shouldDecrease(B)&&(z=F.unshiftIndent(z)),V.appendText&&(z+=V.appendText),_.getLeadingWhitespace(z)}}return M.shouldDecrease(B)?N.action===k.IndentAction.Indent?N.indentation:F.unshiftIndent(N.indentation):N.action===k.IndentAction.Indent?F.shiftIndent(N.indentation):N.indentation}return null}getIndentForEnter(T,R,O,x){if(T<4)return null;R.forceTokenization(O.startLineNumber);const F=R.getLineTokens(O.startLineNumber),L=(0,D.createScopedLineTokens)(F,O.startColumn-1),M=L.getLineContent();let N=!1,B;L.firstCharOffset>0&&F.getLanguageId(0)!==L.languageId?(N=!0,B=M.substr(0,O.startColumn-1-L.firstCharOffset)):B=F.getLineContent().substring(0,O.startColumn-1);let P;O.isEmpty()?P=M.substr(O.startColumn-1-L.firstCharOffset):P=this.getScopedLineTokens(R,O.endLineNumber,O.endColumn).getLineContent().substr(O.endColumn-1-L.firstCharOffset);const V=this.getIndentRulesSupport(L.languageId);if(!V)return null;const z=B,U=_.getLeadingWhitespace(B),H={getLineTokens:Z=>R.getLineTokens(Z),getLanguageId:()=>R.getLanguageId(),getLanguageIdAtPosition:(Z,j)=>R.getLanguageIdAtPosition(Z,j),getLineContent:Z=>Z===O.startLineNumber?z:R.getLineContent(Z)},K=_.getLeadingWhitespace(F.getLineContent()),G=this.getInheritIndentForLine(T,H,O.startLineNumber+1);if(!G){const Z=N?K:U;return{beforeEnter:Z,afterEnter:Z}}let q=N?K:G.indentation;return G.action===k.IndentAction.Indent&&(q=x.shiftIndent(q)),V.shouldDecrease(P)&&(q=x.unshiftIndent(q)),{beforeEnter:N?K:U,afterEnter:q}}getIndentActionForType(T,R,O,x,F){if(T<4)return null;const L=this.getScopedLineTokens(R,O.startLineNumber,O.startColumn);if(L.firstCharOffset)return null;const M=this.getIndentRulesSupport(L.languageId);if(!M)return null;const N=L.getLineContent(),B=N.substr(0,O.startColumn-1-L.firstCharOffset);let P;if(O.isEmpty()?P=N.substr(O.startColumn-1-L.firstCharOffset):P=this.getScopedLineTokens(R,O.endLineNumber,O.endColumn).getLineContent().substr(O.endColumn-1-L.firstCharOffset),!M.shouldDecrease(B+P)&&M.shouldDecrease(B+x+P)){const V=this.getInheritIndentForLine(T,R,O.startLineNumber,!1);if(!V)return null;let z=V.indentation;return V.action!==k.IndentAction.Indent&&(z=F.unshiftIndent(z)),z}return null}getIndentMetadata(T,R){const O=this.getIndentRulesSupport(T.getLanguageId());return!O||R<1||R>T.getLineCount()?null:O.getIndentMetadata(T.getLineContent(R))}getEnterAction(T,R,O){const x=this.getScopedLineTokens(R,O.startLineNumber,O.startColumn),F=this.getLanguageConfiguration(x.languageId);if(!F)return null;const L=x.getLineContent(),M=L.substr(0,O.startColumn-1-x.firstCharOffset);let N;O.isEmpty()?N=L.substr(O.startColumn-1-x.firstCharOffset):N=this.getScopedLineTokens(R,O.endLineNumber,O.endColumn).getLineContent().substr(O.endColumn-1-x.firstCharOffset);let B="";if(O.startLineNumber>1&&x.firstCharOffset===0){const K=this.getScopedLineTokens(R,O.startLineNumber-1);K.languageId===x.languageId&&(B=K.getLineContent())}const P=F.onEnter(T,B,M,N);if(!P)return null;const V=P.indentAction;let z=P.appendText;const U=P.removeText||0;z?V===k.IndentAction.Indent&&(z=" "+z):V===k.IndentAction.Indent||V===k.IndentAction.IndentOutdent?z=" ":z="";let H=this.getIndentationAtPosition(R,O.startLineNumber,O.startColumn);return U&&(H=H.substring(0,H.length-U)),{indentAction:V,appendText:z,removeText:U,indentation:H}}getIndentationAtPosition(T,R,O){const x=T.getLineContent(R);let F=_.getLeadingWhitespace(x);return F.length>O-1&&(F=F.substring(0,O-1)),F}getScopedLineTokens(T,R,O){T.forceTokenization(R);const x=T.getLineTokens(R),F=typeof O=="undefined"?T.getLineMaxColumn(R)-1:O-1;return(0,D.createScopedLineTokens)(x,F)}getBracketsSupport(T){const R=this.getLanguageConfiguration(T);return R&&R.brackets||null}getColorizedBracketPairs(T){return this.getLanguageConfiguration(T)?.characterPair.getColorizedBrackets()||[]}}e.LanguageConfigurationRegistryImpl=g,e.LanguageConfigurationRegistry=new g;class d{constructor(T){this.languageId=T,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(T,R){const O=new b(T,R,++this._order);return this._entries.push(O),this._resolved=null,(0,f.toDisposable)(()=>{for(let x=0;x<this._entries.length;x++)if(this._entries[x]===O){this._entries.splice(x,1),this._resolved=null;break}})}getResolvedConfiguration(){if(!this._resolved){const T=this._resolve();T&&(this._resolved=new E(this.languageId,T))}return this._resolved}_resolve(){return this._entries.length===0?null:(this._entries.sort(b.cmp),m(this._entries.map(T=>T.configuration)))}}function m(y){let T={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const R of y)T={comments:R.comments||T.comments,brackets:R.brackets||T.brackets,wordPattern:R.wordPattern||T.wordPattern,indentationRules:R.indentationRules||T.indentationRules,onEnterRules:R.onEnterRules||T.onEnterRules,autoClosingPairs:R.autoClosingPairs||T.autoClosingPairs,surroundingPairs:R.surroundingPairs||T.surroundingPairs,autoCloseBefore:R.autoCloseBefore||T.autoCloseBefore,folding:R.folding||T.folding,colorizedBracketPairs:R.colorizedBracketPairs||T.colorizedBracketPairs,__electricCharacterSupport:R.__electricCharacterSupport||T.__electricCharacterSupport};return T}class b{constructor(T,R,O){this.configuration=T,this.priority=R,this.order=O}static cmp(T,R){return T.priority===R.priority?T.order-R.order:T.priority-R.priority}}class E{constructor(T,R){this.languageId=T,this.underlyingConfig=R,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new C.OnEnterSupport(this.underlyingConfig):null,this.comments=E._handleComments(this.underlyingConfig),this.characterPair=new I.CharacterPairSupport(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||A.DEFAULT_WORD_REGEXP,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new v.IndentRulesSupport(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{}}getWordDefinition(){return(0,A.ensureValidWordDefinition)(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new o.RichEditBrackets(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new w.BracketElectricCharacterSupport(this.brackets)),this._electricCharacter}onEnter(T,R,O,x){return this._onEnterSupport?this._onEnterSupport.onEnter(T,R,O,x):null}getAutoClosingPairs(){return new k.AutoClosingPairs(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(){return this.characterPair.getAutoCloseBeforeSet()}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(T){const R=T.comments;if(!R)return null;const O={};if(R.lineComment&&(O.lineCommentToken=R.lineComment),R.blockComment){const[x,F]=R.blockComment;O.blockCommentStartToken=x,O.blockCommentEndToken=F}return O}}e.ResolvedLanguageConfiguration=E,(0,s.registerSingleton)(e.ILanguageConfigurationService,r)}),define(ne[546],re([1,0,29,243,20,84,124]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShiftCommand=e.cachedStringRepeat=void 0;const D=Object.create(null);function I(v,C){if(C<=0)return"";D[v]||(D[v]=["",v]);const o=D[v];for(let c=o.length;c<=C;c++)o[c]=o[c-1]+v;return o[C]}e.cachedStringRepeat=I;class w{constructor(C,o){this._opts=o,this._selection=C,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}static unshiftIndent(C,o,c,i,S){const s=f.CursorColumns.visibleColumnFromColumn(C,o,c);if(S){const l=I(" ",i),p=f.CursorColumns.prevIndentTabStop(s,i)/i;return I(l,p)}else{const l=" ",p=f.CursorColumns.prevRenderTabStop(s,c)/c;return I(l,p)}}static shiftIndent(C,o,c,i,S){const s=f.CursorColumns.visibleColumnFromColumn(C,o,c);if(S){const l=I(" ",i),p=f.CursorColumns.nextIndentTabStop(s,i)/i;return I(l,p)}else{const l=" ",p=f.CursorColumns.nextRenderTabStop(s,c)/c;return I(l,p)}}_addEditOperation(C,o,c){this._useLastEditRangeForCursorEndPosition?C.addTrackedEditOperation(o,c):C.addEditOperation(o,c)}getEditOperations(C,o){const c=this._selection.startLineNumber;let i=this._selection.endLineNumber;this._selection.endColumn===1&&c!==i&&(i=i-1);const{tabSize:S,indentSize:s,insertSpaces:l}=this._opts,r=c===i;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(C.getLineContent(c))&&(this._useLastEditRangeForCursorEndPosition=!0);let p=0,u=0;for(let a=c;a<=i;a++,p=u){u=0;const n=C.getLineContent(a);let h=t.firstNonWhitespaceIndex(n);if(this._opts.isUnshift&&(n.length===0||h===0)||!r&&!this._opts.isUnshift&&n.length===0)continue;if(h===-1&&(h=n.length),a>1&&f.CursorColumns.visibleColumnFromColumn(n,h+1,S)%s!=0&&C.isCheapToTokenize(a-1)){const m=k.LanguageConfigurationRegistry.getEnterAction(this._opts.autoIndent,C,new _.Range(a-1,C.getLineMaxColumn(a-1),a-1,C.getLineMaxColumn(a-1)));if(m){if(u=p,m.appendText)for(let b=0,E=m.appendText.length;b<E&&u<s&&m.appendText.charCodeAt(b)===32;b++)u++;m.removeText&&(u=Math.max(0,u-m.removeText));for(let b=0;b<u&&!(h===0||n.charCodeAt(h-1)!==32);b++)h--}}if(this._opts.isUnshift&&h===0)continue;let g;this._opts.isUnshift?g=w.unshiftIndent(n,h+1,S,s,l):g=w.shiftIndent(n,h+1,S,s,l),this._addEditOperation(o,new _.Range(a,1,a,h+1),g),a===c&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn<=h+1)}}else{!this._opts.isUnshift&&this._selection.isEmpty()&&C.getLineLength(c)===0&&(this._useLastEditRangeForCursorEndPosition=!0);const p=l?I(" ",s):" ";for(let u=c;u<=i;u++){const a=C.getLineContent(u);let n=t.firstNonWhitespaceIndex(a);if(!(this._opts.isUnshift&&(a.length===0||n===0))&&!(!r&&!this._opts.isUnshift&&a.length===0)&&(n===-1&&(n=a.length),!(this._opts.isUnshift&&n===0)))if(this._opts.isUnshift){n=Math.min(n,s);for(let h=0;h<n;h++)if(a.charCodeAt(h)===9){n=h+1;break}this._addEditOperation(o,new _.Range(u,1,u,n+1),"")}else this._addEditOperation(o,new _.Range(u,1,u,1),p),u===c&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn===1)}}this._selectionId=o.trackSelection(this._selection)}computeCursorState(C,o){if(this._useLastEditRangeForCursorEndPosition){const i=o.getInverseEditOperations()[0];return new A.Selection(i.range.endLineNumber,i.range.endColumn,i.range.endLineNumber,i.range.endColumn)}const c=o.getTrackedSelection(this._selectionId);if(this._selectionStartColumnStaysPut){const i=this._selection.startColumn;return c.startColumn<=i?c:c.getDirection()===0?new A.Selection(c.startLineNumber,i,c.endLineNumber,c.endColumn):new A.Selection(c.endLineNumber,c.endColumn,c.startLineNumber,i)}return c}}e.ShiftCommand=w}),define(ne[547],re([1,0,22,29,341,546,1142,226,385,20,49,342,124,386]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositionOutcome=e.TypeWithAutoClosingCommand=e.TypeOperations=void 0;class i{static indent(n,h,g){if(h===null||g===null)return[];const d=[];for(let m=0,b=g.length;m<b;m++)d[m]=new A.ShiftCommand(g[m],{isUnshift:!1,tabSize:n.tabSize,indentSize:n.indentSize,insertSpaces:n.insertSpaces,useTabStops:n.useTabStops,autoIndent:n.autoIndent});return d}static outdent(n,h,g){const d=[];for(let m=0,b=g.length;m<b;m++)d[m]=new A.ShiftCommand(g[m],{isUnshift:!0,tabSize:n.tabSize,indentSize:n.indentSize,insertSpaces:n.insertSpaces,useTabStops:n.useTabStops,autoIndent:n.autoIndent});return d}static shiftIndent(n,h,g){return g=g||1,A.ShiftCommand.shiftIndent(h,h.length+g,n.tabSize,n.indentSize,n.insertSpaces)}static unshiftIndent(n,h,g){return g=g||1,A.ShiftCommand.unshiftIndent(h,h.length+g,n.tabSize,n.indentSize,n.insertSpaces)}static _distributedPaste(n,h,g,d){const m=[];for(let b=0,E=g.length;b<E;b++)m[b]=new _.ReplaceCommand(g[b],d[b]);return new D.EditOperationResult(0,m,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _simplePaste(n,h,g,d,m){const b=[];for(let E=0,y=g.length;E<y;E++){const T=g[E],R=T.getPosition();if(m&&!T.isEmpty()&&(m=!1),m&&d.indexOf(` `)!==d.length-1&&(m=!1),m){const O=new w.Range(R.lineNumber,1,R.lineNumber,1);b[E]=new _.ReplaceCommandThatPreservesSelection(O,d,T,!0)}else b[E]=new _.ReplaceCommand(T,d)}return new D.EditOperationResult(0,b,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _distributePasteToCursors(n,h,g,d,m){if(d||h.length===1)return null;if(m&&m.length===h.length)return m;if(n.multiCursorPaste==="spread"){g.charCodeAt(g.length-1)===10&&(g=g.substr(0,g.length-1)),g.charCodeAt(g.length-1)===13&&(g=g.substr(0,g.length-1));const b=f.splitLines(g);if(b.length===h.length)return b}return null}static paste(n,h,g,d,m,b){const E=this._distributePasteToCursors(n,g,d,m,b);return E?(g=g.sort(w.Range.compareRangesUsingStarts),this._distributedPaste(n,h,g,E)):this._simplePaste(n,h,g,d,m)}static _goodIndentForLine(n,h,g){let d=null,m="";const b=o.LanguageConfigurationRegistry.getInheritIndentForLine(n.autoIndent,h,g,!1);if(b)d=b.action,m=b.indentation;else if(g>1){let E;for(E=g-1;E>=1;E--){const R=h.getLineContent(E);if(f.lastNonWhitespaceIndex(R)>=0)break}if(E<1)return null;const y=h.getLineMaxColumn(E),T=o.LanguageConfigurationRegistry.getEnterAction(n.autoIndent,h,new w.Range(E,y,E,y));T&&(m=T.indentation+T.appendText)}return d&&(d===C.IndentAction.Indent&&(m=i.shiftIndent(n,m)),d===C.IndentAction.Outdent&&(m=i.unshiftIndent(n,m)),m=n.normalizeIndentation(m)),m||null}static _replaceJumpToNextIndent(n,h,g,d){let m="";const b=g.getStartPosition();if(n.insertSpaces){const E=n.visibleColumnFromColumn(h,b),y=n.indentSize,T=y-E%y;for(let R=0;R<T;R++)m+=" "}else m=" ";return new _.ReplaceCommand(g,m,d)}static tab(n,h,g){const d=[];for(let m=0,b=g.length;m<b;m++){const E=g[m];if(E.isEmpty()){const y=h.getLineContent(E.startLineNumber);if(/^\s*$/.test(y)&&h.isCheapToTokenize(E.startLineNumber)){let T=this._goodIndentForLine(n,h,E.startLineNumber);T=T||" ";const R=n.normalizeIndentation(T);if(!y.startsWith(R)){d[m]=new _.ReplaceCommand(new w.Range(E.startLineNumber,1,E.startLineNumber,y.length+1),R,!0);continue}}d[m]=this._replaceJumpToNextIndent(n,h,E,!0)}else{if(E.startLineNumber===E.endLineNumber){const y=h.getLineMaxColumn(E.startLineNumber);if(E.startColumn!==1||E.endColumn!==y){d[m]=this._replaceJumpToNextIndent(n,h,E,!1);continue}}d[m]=new A.ShiftCommand(E,{isUnshift:!1,tabSize:n.tabSize,indentSize:n.indentSize,insertSpaces:n.insertSpaces,useTabStops:n.useTabStops,autoIndent:n.autoIndent})}}return d}static compositionType(n,h,g,d,m,b,E,y){const T=d.map(R=>this._compositionType(g,R,m,b,E,y));return new D.EditOperationResult(4,T,{shouldPushStackElementBefore:r(n,4),shouldPushStackElementAfter:!1})}static _compositionType(n,h,g,d,m,b){if(!h.isEmpty())return null;const E=h.getPosition(),y=Math.max(1,E.column-d),T=Math.min(n.getLineMaxColumn(E.lineNumber),E.column+m),R=new w.Range(E.lineNumber,y,E.lineNumber,T);return n.getValueInRange(R)===g&&b===0?null:new _.ReplaceCommandWithOffsetCursorState(R,g,0,b)}static _typeCommand(n,h,g){return g?new _.ReplaceCommandWithoutChangingPosition(n,h,!0):new _.ReplaceCommand(n,h,!0)}static _enter(n,h,g,d){if(n.autoIndent===0)return i._typeCommand(d,` `,g);if(!h.isCheapToTokenize(d.getStartPosition().lineNumber)||n.autoIndent===1){const y=h.getLineContent(d.startLineNumber),T=f.getLeadingWhitespace(y).substring(0,d.startColumn-1);return i._typeCommand(d,` `+n.normalizeIndentation(T),g)}const m=o.LanguageConfigurationRegistry.getEnterAction(n.autoIndent,h,d);if(m){if(m.indentAction===C.IndentAction.None)return i._typeCommand(d,` `+n.normalizeIndentation(m.indentation+m.appendText),g);if(m.indentAction===C.IndentAction.Indent)return i._typeCommand(d,` `+n.normalizeIndentation(m.indentation+m.appendText),g);if(m.indentAction===C.IndentAction.IndentOutdent){const y=n.normalizeIndentation(m.indentation),T=n.normalizeIndentation(m.indentation+m.appendText),R=` `+T+` `+y;return g?new _.ReplaceCommandWithoutChangingPosition(d,R,!0):new _.ReplaceCommandWithOffsetCursorState(d,R,-1,T.length-y.length,!0)}else if(m.indentAction===C.IndentAction.Outdent){const y=i.unshiftIndent(n,m.indentation);return i._typeCommand(d,` `+n.normalizeIndentation(y+m.appendText),g)}}const b=h.getLineContent(d.startLineNumber),E=f.getLeadingWhitespace(b).substring(0,d.startColumn-1);if(n.autoIndent>=4){const y=o.LanguageConfigurationRegistry.getIndentForEnter(n.autoIndent,h,d,{unshiftIndent:T=>i.unshiftIndent(n,T),shiftIndent:T=>i.shiftIndent(n,T),normalizeIndentation:T=>n.normalizeIndentation(T)});if(y){let T=n.visibleColumnFromColumn(h,d.getEndPosition());const R=d.endColumn,O=h.getLineContent(d.endLineNumber),x=f.firstNonWhitespaceIndex(O);if(x>=0?d=d.setEndPosition(d.endLineNumber,Math.max(d.endColumn,x+1)):d=d.setEndPosition(d.endLineNumber,h.getLineMaxColumn(d.endLineNumber)),g)return new _.ReplaceCommandWithoutChangingPosition(d,` `+n.normalizeIndentation(y.afterEnter),!0);{let F=0;return R<=x+1&&(n.insertSpaces||(T=Math.ceil(T/n.indentSize)),F=Math.min(T+1-n.normalizeIndentation(y.afterEnter).length-1,0)),new _.ReplaceCommandWithOffsetCursorState(d,` `+n.normalizeIndentation(y.afterEnter),0,F,!0)}}}return i._typeCommand(d,` `+n.normalizeIndentation(E),g)}static _isAutoIndentType(n,h,g){if(n.autoIndent<4)return!1;for(let d=0,m=g.length;d<m;d++)if(!h.isCheapToTokenize(g[d].getEndPosition().lineNumber))return!1;return!0}static _runAutoIndentType(n,h,g,d){const m=o.LanguageConfigurationRegistry.getIndentationAtPosition(h,g.startLineNumber,g.startColumn),b=o.LanguageConfigurationRegistry.getIndentActionForType(n.autoIndent,h,g,d,{shiftIndent:E=>i.shiftIndent(n,E),unshiftIndent:E=>i.unshiftIndent(n,E)});if(b===null)return null;if(b!==n.normalizeIndentation(m)){const E=h.getLineFirstNonWhitespaceColumn(g.startLineNumber);return E===0?i._typeCommand(new w.Range(g.startLineNumber,1,g.endLineNumber,g.endColumn),n.normalizeIndentation(b)+d,!1):i._typeCommand(new w.Range(g.startLineNumber,1,g.endLineNumber,g.endColumn),n.normalizeIndentation(b)+h.getLineContent(g.startLineNumber).substring(E-1,g.startColumn-1)+d,!1)}return null}static _isAutoClosingOvertype(n,h,g,d,m){if(n.autoClosingOvertype==="never"||!n.autoClosingPairs.autoClosingPairsCloseSingleChar.has(m))return!1;for(let b=0,E=g.length;b<E;b++){const y=g[b];if(!y.isEmpty())return!1;const T=y.getPosition(),R=h.getLineContent(T.lineNumber);if(R.charAt(T.column-1)!==m)return!1;const x=(0,D.isQuote)(m);if((T.column>2?R.charCodeAt(T.column-2):0)===92&&x)return!1;if(n.autoClosingOvertype==="auto"){let L=!1;for(let M=0,N=d.length;M<N;M++){const B=d[M];if(T.lineNumber===B.startLineNumber&&T.column===B.startColumn){L=!0;break}}if(!L)return!1}}return!0}static _runAutoClosingOvertype(n,h,g,d,m){const b=[];for(let E=0,y=d.length;E<y;E++){const R=d[E].getPosition(),O=new w.Range(R.lineNumber,R.column,R.lineNumber,R.column+1);b[E]=new _.ReplaceCommand(O,m)}return new D.EditOperationResult(4,b,{shouldPushStackElementBefore:r(n,4),shouldPushStackElementAfter:!1})}static _isBeforeClosingBrace(n,h){const g=h.charAt(0),d=n.autoClosingPairs.autoClosingPairsOpenByStart.get(g)||[],m=n.autoClosingPairs.autoClosingPairsCloseByStart.get(g)||[],b=d.some(y=>h.startsWith(y.open)),E=m.some(y=>h.startsWith(y.close));return!b&&E}static _findAutoClosingPairOpen(n,h,g,d){const m=n.autoClosingPairs.autoClosingPairsOpenByEnd.get(d);if(!m)return null;let b=null;for(const E of m)if(b===null||E.open.length>b.open.length){let y=!0;for(const T of g)if(h.getValueInRange(new w.Range(T.lineNumber,T.column-E.open.length+1,T.lineNumber,T.column))+d!==E.open){y=!1;break}y&&(b=E)}return b}static _findContainedAutoClosingPair(n,h){if(h.open.length<=1)return null;const g=h.close.charAt(h.close.length-1),d=n.autoClosingPairs.autoClosingPairsCloseByEnd.get(g)||[];let m=null;for(const b of d)b.open!==h.open&&h.open.includes(b.open)&&h.close.endsWith(b.close)&&(!m||b.open.length>m.open.length)&&(m=b);return m}static _getAutoClosingPairClose(n,h,g,d,m){const b=(0,D.isQuote)(d),E=b?n.autoClosingQuotes:n.autoClosingBrackets,y=b?n.shouldAutoCloseBefore.quote:n.shouldAutoCloseBefore.bracket;if(E==="never")return null;for(const L of g)if(!L.isEmpty())return null;const T=g.map(L=>{const M=L.getPosition();return m?{lineNumber:M.lineNumber,beforeColumn:M.column-d.length,afterColumn:M.column}:{lineNumber:M.lineNumber,beforeColumn:M.column,afterColumn:M.column}}),R=this._findAutoClosingPairOpen(n,h,T.map(L=>new v.Position(L.lineNumber,L.beforeColumn)),d);if(!R)return null;const O=this._findContainedAutoClosingPair(n,R),x=O?O.close:"";let F=!0;for(const L of T){const{lineNumber:M,beforeColumn:N,afterColumn:B}=L,P=h.getLineContent(M),V=P.substring(0,N-1),z=P.substring(B-1);if(z.startsWith(x)||(F=!1),z.length>0){const G=z.charAt(0);if(!i._isBeforeClosingBrace(n,z)&&!y(G))return null}if(R.open.length===1&&(d==="'"||d==='"')&&E!=="always"){const G=(0,I.getMapForWordSeparators)(n.wordSeparators);if(V.length>0){const q=V.charCodeAt(V.length-1);if(G.get(q)===0)return null}}if(!h.isCheapToTokenize(M))return null;h.forceTokenization(M);const U=h.getLineTokens(M),H=(0,c.createScopedLineTokens)(U,N-1);if(!R.shouldAutoClose(H,N-H.firstCharOffset))return null;const K=R.findNeutralCharacter();if(K){const G=h.getTokenTypeIfInsertingCharacter(M,N,K);if(!R.isOK(G))return null}}return F?R.close.substring(0,R.close.length-x.length):R.close}static _runAutoClosingOpenCharType(n,h,g,d,m,b,E){const y=[];for(let T=0,R=d.length;T<R;T++){const O=d[T];y[T]=new S(O,m,!b,E)}return new D.EditOperationResult(4,y,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static _shouldSurroundChar(n,h){return(0,D.isQuote)(h)?n.autoSurround==="quotes"||n.autoSurround==="languageDefined":n.autoSurround==="brackets"||n.autoSurround==="languageDefined"}static _isSurroundSelectionType(n,h,g,d){if(!i._shouldSurroundChar(n,d)||!n.surroundingPairs.hasOwnProperty(d))return!1;const m=(0,D.isQuote)(d);for(const b of g){if(b.isEmpty())return!1;let E=!0;for(let y=b.startLineNumber;y<=b.endLineNumber;y++){const T=h.getLineContent(y),R=y===b.startLineNumber?b.startColumn-1:0,O=y===b.endLineNumber?b.endColumn-1:T.length,x=T.substring(R,O);if(/[^ \t]/.test(x)){E=!1;break}}if(E)return!1;if(m&&b.startLineNumber===b.endLineNumber&&b.startColumn+1===b.endColumn){const y=h.getValueInRange(b);if((0,D.isQuote)(y))return!1}}return!0}static _runSurroundSelectionType(n,h,g,d,m){const b=[];for(let E=0,y=d.length;E<y;E++){const T=d[E],R=h.surroundingPairs[m];b[E]=new k.SurroundSelectionCommand(T,m,R)}return new D.EditOperationResult(0,b,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _isTypeInterceptorElectricChar(n,h,g){return!!(g.length===1&&h.isCheapToTokenize(g[0].getEndPosition().lineNumber))}static _typeInterceptorElectricChar(n,h,g,d,m){if(!h.electricChars.hasOwnProperty(m)||!d.isEmpty())return null;const b=d.getPosition();g.forceTokenization(b.lineNumber);const E=g.getLineTokens(b.lineNumber);let y;try{y=h.onElectricCharacter(m,E,b.column)}catch(T){return(0,t.onUnexpectedError)(T),null}if(!y)return null;if(y.matchOpenBracket){const T=(E.getLineContent()+m).lastIndexOf(y.matchOpenBracket)+1,R=g.bracketPairs.findMatchingBracketUp(y.matchOpenBracket,{lineNumber:b.lineNumber,column:T},500);if(R){if(R.startLineNumber===b.lineNumber)return null;const O=g.getLineContent(R.startLineNumber),x=f.getLeadingWhitespace(O),F=h.normalizeIndentation(x),L=g.getLineContent(b.lineNumber),M=g.getLineFirstNonWhitespaceColumn(b.lineNumber)||b.column,N=L.substring(M-1,b.column-1),B=F+N+m,P=new w.Range(b.lineNumber,1,b.lineNumber,b.column),V=new _.ReplaceCommand(P,B);return new D.EditOperationResult(l(B,n),[V],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!0})}}return null}static compositionEndWithInterceptors(n,h,g,d,m,b){if(!d)return null;let E=null;for(const O of d)if(E===null)E=O.insertedText;else if(E!==O.insertedText)return null;if(!E||E.length!==1)return null;const y=E;let T=!1;for(const O of d)if(O.deletedText.length!==0){T=!0;break}if(T){if(!i._shouldSurroundChar(h,y)||!h.surroundingPairs.hasOwnProperty(y))return null;const O=(0,D.isQuote)(y);for(const L of d)if(L.deletedSelectionStart!==0||L.deletedSelectionEnd!==L.deletedText.length||/^[ \t]+$/.test(L.deletedText)||O&&(0,D.isQuote)(L.deletedText))return null;const x=[];for(const L of m){if(!L.isEmpty())return null;x.push(L.getPosition())}if(x.length!==d.length)return null;const F=[];for(let L=0,M=x.length;L<M;L++)F.push(new k.CompositionSurroundSelectionCommand(x[L],d[L].deletedText,y));return new D.EditOperationResult(4,F,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(this._isAutoClosingOvertype(h,g,m,b,y)){const O=m.map(x=>new _.ReplaceCommand(new w.Range(x.positionLineNumber,x.positionColumn,x.positionLineNumber,x.positionColumn+1),"",!1));return new D.EditOperationResult(4,O,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const R=this._getAutoClosingPairClose(h,g,m,y,!0);return R!==null?this._runAutoClosingOpenCharType(n,h,g,m,y,!0,R):null}static typeWithInterceptors(n,h,g,d,m,b,E){if(!n&&E===` `){const R=[];for(let O=0,x=m.length;O<x;O++)R[O]=i._enter(g,d,!1,m[O]);return new D.EditOperationResult(4,R,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!n&&this._isAutoIndentType(g,d,m)){const R=[];let O=!1;for(let x=0,F=m.length;x<F;x++)if(R[x]=this._runAutoIndentType(g,d,m[x],E),!R[x]){O=!0;break}if(!O)return new D.EditOperationResult(4,R,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(this._isAutoClosingOvertype(g,d,m,b,E))return this._runAutoClosingOvertype(h,g,d,m,E);if(!n){const R=this._getAutoClosingPairClose(g,d,m,E,!1);if(R)return this._runAutoClosingOpenCharType(h,g,d,m,E,!1,R)}if(!n&&this._isSurroundSelectionType(g,d,m,E))return this._runSurroundSelectionType(h,g,d,m,E);if(!n&&this._isTypeInterceptorElectricChar(g,d,m)){const R=this._typeInterceptorElectricChar(h,g,d,m[0],E);if(R)return R}const y=[];for(let R=0,O=m.length;R<O;R++)y[R]=new _.ReplaceCommand(m[R],E);const T=l(E,h);return new D.EditOperationResult(T,y,{shouldPushStackElementBefore:r(h,T),shouldPushStackElementAfter:!1})}static typeWithoutInterceptors(n,h,g,d,m){const b=[];for(let y=0,T=d.length;y<T;y++)b[y]=new _.ReplaceCommand(d[y],m);const E=l(m,n);return new D.EditOperationResult(E,b,{shouldPushStackElementBefore:r(n,E),shouldPushStackElementAfter:!1})}static lineInsertBefore(n,h,g){if(h===null||g===null)return[];const d=[];for(let m=0,b=g.length;m<b;m++){let E=g[m].positionLineNumber;if(E===1)d[m]=new _.ReplaceCommandWithoutChangingPosition(new w.Range(1,1,1,1),` `);else{E--;const y=h.getLineMaxColumn(E);d[m]=this._enter(n,h,!1,new w.Range(E,y,E,y))}}return d}static lineInsertAfter(n,h,g){if(h===null||g===null)return[];const d=[];for(let m=0,b=g.length;m<b;m++){const E=g[m].positionLineNumber,y=h.getLineMaxColumn(E);d[m]=this._enter(n,h,!1,new w.Range(E,y,E,y))}return d}static lineBreakInsert(n,h,g){const d=[];for(let m=0,b=g.length;m<b;m++)d[m]=this._enter(n,h,!0,g[m]);return d}}e.TypeOperations=i;class S extends _.ReplaceCommandWithOffsetCursorState{constructor(n,h,g,d){super(n,(g?h:"")+d,0,-d.length);this._openCharacter=h,this._closeCharacter=d,this.closeCharacterRange=null,this.enclosingRange=null}computeCursorState(n,h){const d=h.getInverseEditOperations()[0].range;return this.closeCharacterRange=new w.Range(d.startLineNumber,d.endColumn-this._closeCharacter.length,d.endLineNumber,d.endColumn),this.enclosingRange=new w.Range(d.startLineNumber,d.endColumn-this._openCharacter.length-this._closeCharacter.length,d.endLineNumber,d.endColumn),super.computeCursorState(n,h)}}e.TypeWithAutoClosingCommand=S;class s{constructor(n,h,g,d,m,b){this.deletedText=n,this.deletedSelectionStart=h,this.deletedSelectionEnd=g,this.insertedText=d,this.insertedSelectionStart=m,this.insertedSelectionEnd=b}}e.CompositionOutcome=s;function l(a,n){return a===" "?n===5||n===6?6:5:4}function r(a,n){return u(a)&&!u(n)?!0:a===5?!1:p(a)!==p(n)}function p(a){return a===6||a===5?"space":a}function u(a){return a===4||a===5||a===6}}),define(ne[728],re([1,0,22,29,1150,226,1143,526,547,20,84,307,535,2,536]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorsController=void 0;class S extends c.Disposable{constructor(n,h,g,d){super();this._model=n,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=h,this._coordinatesConverter=g,this.context=new k.CursorContext(this._model,this._viewModel,this._coordinatesConverter,d),this._cursors=new _.CursorCollection(this.context),this._hasFocus=!1,this._isHandling=!1,this._compositionState=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=(0,c.dispose)(this._autoClosedActions),super.dispose()}updateConfiguration(n){this.context=new k.CursorContext(this._model,this._viewModel,this._coordinatesConverter,n),this._cursors.updateContext(this.context)}onLineMappingChanged(n){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(n,"viewModel",0,this.getCursorStates())}setHasFocus(n){this._hasFocus=n}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){const n=this._cursors.getSelections();for(let h=0;h<this._autoClosedActions.length;h++){const g=this._autoClosedActions[h];g.isValid(n)||(g.dispose(),this._autoClosedActions.splice(h,1),h--)}}}getPrimaryCursorState(){return this._cursors.getPrimaryCursor()}getLastAddedCursorIndex(){return this._cursors.getLastAddedCursorIndex()}getCursorStates(){return this._cursors.getAll()}setStates(n,h,g,d){let m=!1;d!==null&&d.length>S.MAX_CURSOR_COUNT&&(d=d.slice(0,S.MAX_CURSOR_COUNT),m=!0);const b=s.from(this._model,this);return this._cursors.setStates(d),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(n,h,g,b,m)}setCursorColumnSelectData(n){this._columnSelectData=n}revealPrimary(n,h,g,d,m,b){const E=this._cursors.getViewPositions();let y=null,T=null;E.length>1?T=this._cursors.getViewSelections():y=w.Range.fromPositions(E[0],E[0]),n.emitViewEvent(new o.ViewRevealRangeRequestEvent(h,g,y,T,d,m,b))}saveState(){const n=[],h=this._cursors.getSelections();for(let g=0,d=h.length;g<d;g++){const m=h[g];n.push({inSelectionMode:!m.isEmpty(),selectionStart:{lineNumber:m.selectionStartLineNumber,column:m.selectionStartColumn},position:{lineNumber:m.positionLineNumber,column:m.positionColumn}})}return n}restoreState(n,h){const g=[];for(let d=0,m=h.length;d<m;d++){const b=h[d];let E=1,y=1;b.position&&b.position.lineNumber&&(E=b.position.lineNumber),b.position&&b.position.column&&(y=b.position.column);let T=E,R=y;b.selectionStart&&b.selectionStart.lineNumber&&(T=b.selectionStart.lineNumber),b.selectionStart&&b.selectionStart.column&&(R=b.selectionStart.column),g.push({selectionStartLineNumber:T,selectionStartColumn:R,positionLineNumber:E,positionColumn:y})}this.setStates(n,"restoreState",0,A.CursorState.fromModelSelections(g)),this.revealPrimary(n,"restoreState",!1,0,!0,1)}onModelContentChanged(n,h){if(h instanceof C.ModelInjectedTextChangedEvent){if(this._isHandling)return;this._isHandling=!0;try{this.setStates(n,"modelChange",0,this.getCursorStates())}finally{this._isHandling=!1}}else{if(this._knownModelVersionId=h.versionId,this._isHandling)return;const g=h.containsEvent(1);if(this._prevEditOperationType=0,g)this._cursors.dispose(),this._cursors=new _.CursorCollection(this.context),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(n,"model",1,null,!1);else if(this._hasFocus&&h.resultingSelection&&h.resultingSelection.length>0){const d=A.CursorState.fromModelSelections(h.resultingSelection);this.setStates(n,"modelChange",h.isUndoing?5:h.isRedoing?6:2,d)&&this.revealPrimary(n,"modelChange",!1,0,!0,0)}else{const d=this._cursors.readSelectionFromMarkers();this.setStates(n,"modelChange",2,A.CursorState.fromModelSelections(d))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const n=this._cursors.getPrimaryCursor(),h=n.viewState.selectionStart.getStartPosition(),g=n.viewState.position;return{isReal:!1,fromViewLineNumber:h.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,h),toViewLineNumber:g.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,g)}}getSelections(){return this._cursors.getSelections()}getPosition(){return this._cursors.getPrimaryCursor().modelState.position}setSelections(n,h,g,d){this.setStates(n,h,d,A.CursorState.fromModelSelections(g))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(n){this._prevEditOperationType=n}_pushAutoClosedAction(n,h){const g=[],d=[];for(let E=0,y=n.length;E<y;E++)g.push({range:n[E],options:{description:"auto-closed-character",inlineClassName:"auto-closed-character",stickiness:1}}),d.push({range:h[E],options:{description:"auto-closed-enclosing",stickiness:1}});const m=this._model.deltaDecorations([],g),b=this._model.deltaDecorations([],d);this._autoClosedActions.push(new l(this._model,m,b))}_executeEditOperation(n){if(!n)return;n.shouldPushStackElementBefore&&this._model.pushStackElement();const h=r.executeCommands(this._model,this._cursors.getSelections(),n.commands);if(h){this._interpretCommandResult(h);const g=[],d=[];for(let m=0;m<n.commands.length;m++){const b=n.commands[m];b instanceof I.TypeWithAutoClosingCommand&&b.enclosingRange&&b.closeCharacterRange&&(g.push(b.closeCharacterRange),d.push(b.enclosingRange))}g.length>0&&this._pushAutoClosedAction(g,d),this._prevEditOperationType=n.type}n.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(n){(!n||n.length===0)&&(n=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(n),this._cursors.normalize()}_emitStateChangedIfNecessary(n,h,g,d,m){const b=s.from(this._model,this);if(b.equals(d))return!1;const E=this._cursors.getSelections(),y=this._cursors.getViewSelections();if(n.emitViewEvent(new o.ViewCursorStateChangedEvent(y,E)),!d||d.cursorState.length!==b.cursorState.length||b.cursorState.some((T,R)=>!T.modelState.equals(d.cursorState[R].modelState))){const T=d?d.cursorState.map(O=>O.modelState.selection):null,R=d?d.modelVersionId:0;n.emitOutgoingEvent(new i.CursorStateChangedEvent(T,E,R,b.modelVersionId,h||"keyboard",g,m))}return!0}_findAutoClosingPairs(n){if(!n.length)return null;const h=[];for(let g=0,d=n.length;g<d;g++){const m=n[g];if(!m.text||m.text.indexOf(` `)>=0)return null;const b=m.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!b)return null;const E=b[1],y=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(E);if(!y||y.length!==1)return null;const T=y[0].open,R=m.text.length-b[2].length-1,O=m.text.lastIndexOf(T,R-1);if(O===-1)return null;h.push([O,R])}return h}executeEdits(n,h,g,d){let m=null;h==="snippet"&&(m=this._findAutoClosingPairs(g)),m&&(g[0]._isTracked=!0);const b=[],E=[],y=this._model.pushEditOperations(this.getSelections(),g,T=>{if(m)for(let O=0,x=m.length;O<x;O++){const[F,L]=m[O],M=T[O],N=M.range.startLineNumber,B=M.range.startColumn-1+F,P=M.range.startColumn-1+L;b.push(new w.Range(N,P+1,N,P+2)),E.push(new w.Range(N,B+1,N,P+2))}const R=d(T);return R&&(this._isHandling=!0),R});y&&(this._isHandling=!1,this.setSelections(n,h,y,0)),b.length>0&&this._pushAutoClosedAction(b,E)}_executeEdit(n,h,g,d=0){if(this.context.cursorConfig.readOnly)return;const m=s.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),n()}catch(b){(0,t.onUnexpectedError)(b)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(h,g,d,m,!1)&&this.revealPrimary(h,g,!1,0,!0,0)}getAutoClosedCharacters(){return l.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(n){this._compositionState=new u(this._model,this.getSelections())}endComposition(n,h){const g=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit(()=>{h==="keyboard"&&this._executeEditOperation(I.TypeOperations.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,g,this.getSelections(),this.getAutoClosedCharacters()))},n,h)}type(n,h,g){this._executeEdit(()=>{if(g==="keyboard"){const d=h.length;let m=0;for(;m<d;){const b=f.nextCharLength(h,m),E=h.substr(m,b);this._executeEditOperation(I.TypeOperations.typeWithInterceptors(!!this._compositionState,this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),this.getAutoClosedCharacters(),E)),m+=b}}else this._executeEditOperation(I.TypeOperations.typeWithoutInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),h))},n,g)}compositionType(n,h,g,d,m,b){if(h.length===0&&g===0&&d===0){if(m!==0){const E=this.getSelections().map(y=>{const T=y.getPosition();return new v.Selection(T.lineNumber,T.column+m,T.lineNumber,T.column+m)});this.setSelections(n,b,E,0)}return}this._executeEdit(()=>{this._executeEditOperation(I.TypeOperations.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),h,g,d,m))},n,b)}paste(n,h,g,d,m){this._executeEdit(()=>{this._executeEditOperation(I.TypeOperations.paste(this.context.cursorConfig,this._model,this.getSelections(),h,g,d||[]))},n,m,4)}cut(n,h){this._executeEdit(()=>{this._executeEditOperation(D.DeleteOperations.cut(this.context.cursorConfig,this._model,this.getSelections()))},n,h)}executeCommand(n,h,g){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new A.EditOperationResult(0,[h],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},n,g)}executeCommands(n,h,g){this._executeEdit(()=>{this._executeEditOperation(new A.EditOperationResult(0,h,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},n,g)}}e.CursorsController=S,S.MAX_CURSOR_COUNT=1e4;class s{constructor(n,h){this.modelVersionId=n,this.cursorState=h}static from(n,h){return new s(n.getVersionId(),h.getCursorStates())}equals(n){if(!n||this.modelVersionId!==n.modelVersionId||this.cursorState.length!==n.cursorState.length)return!1;for(let h=0,g=this.cursorState.length;h<g;h++)if(!this.cursorState[h].equals(n.cursorState[h]))return!1;return!0}}class l{constructor(n,h,g){this._model=n,this._autoClosedCharactersDecorations=h,this._autoClosedEnclosingDecorations=g}static getAllAutoClosedCharacters(n){let h=[];for(const g of n)h=h.concat(g.getAutoClosedCharactersRanges());return h}dispose(){this._autoClosedCharactersDecorations=this._model.deltaDecorations(this._autoClosedCharactersDecorations,[]),this._autoClosedEnclosingDecorations=this._model.deltaDecorations(this._autoClosedEnclosingDecorations,[])}getAutoClosedCharactersRanges(){const n=[];for(let h=0;h<this._autoClosedCharactersDecorations.length;h++){const g=this._model.getDecorationRange(this._autoClosedCharactersDecorations[h]);g&&n.push(g)}return n}isValid(n){const h=[];for(let g=0;g<this._autoClosedEnclosingDecorations.length;g++){const d=this._model.getDecorationRange(this._autoClosedEnclosingDecorations[g]);if(d&&(h.push(d),d.startLineNumber!==d.endLineNumber))return!1}h.sort(w.Range.compareRangesUsingStarts),n.sort(w.Range.compareRangesUsingStarts);for(let g=0;g<n.length;g++)if(g>=h.length||!h[g].strictContainsRange(n[g]))return!1;return!0}}class r{static executeCommands(n,h,g){const d={model:n,selectionsBefore:h,trackedRanges:[],trackedRangesDirection:[]},m=this._innerExecuteCommands(d,g);for(let b=0,E=d.trackedRanges.length;b<E;b++)d.model._setTrackedRange(d.trackedRanges[b],null,0);return m}static _innerExecuteCommands(n,h){if(this._arrayIsEmpty(h))return null;const g=this._getEditOperations(n,h);if(g.operations.length===0)return null;const d=g.operations,m=this._getLoserCursorMap(d);if(m.hasOwnProperty("0"))return console.warn("Ignoring commands"),null;const b=[];for(let T=0,R=d.length;T<R;T++)m.hasOwnProperty(d[T].identifier.major.toString())||b.push(d[T]);g.hadTrackedEditOperation&&b.length>0&&(b[0]._isTracked=!0);let E=n.model.pushEditOperations(n.selectionsBefore,b,T=>{const R=[];for(let F=0;F<n.selectionsBefore.length;F++)R[F]=[];for(const F of T)!F.identifier||R[F.identifier.major].push(F);const O=(F,L)=>F.identifier.minor-L.identifier.minor,x=[];for(let F=0;F<n.selectionsBefore.length;F++)R[F].length>0?(R[F].sort(O),x[F]=h[F].computeCursorState(n.model,{getInverseEditOperations:()=>R[F],getTrackedSelection:L=>{const M=parseInt(L,10),N=n.model._getTrackedRange(n.trackedRanges[M]);return n.trackedRangesDirection[M]===0?new v.Selection(N.startLineNumber,N.startColumn,N.endLineNumber,N.endColumn):new v.Selection(N.endLineNumber,N.endColumn,N.startLineNumber,N.startColumn)}})):x[F]=n.selectionsBefore[F];return x});E||(E=n.selectionsBefore);const y=[];for(let T in m)m.hasOwnProperty(T)&&y.push(parseInt(T,10));y.sort((T,R)=>R-T);for(const T of y)E.splice(T,1);return E}static _arrayIsEmpty(n){for(let h=0,g=n.length;h<g;h++)if(n[h])return!1;return!0}static _getEditOperations(n,h){let g=[],d=!1;for(let m=0,b=h.length;m<b;m++){const E=h[m];if(E){const y=this._getEditOperationsFromCommand(n,m,E);g=g.concat(y.operations),d=d||y.hadTrackedEditOperation}}return{operations:g,hadTrackedEditOperation:d}}static _getEditOperationsFromCommand(n,h,g){const d=[];let m=0;const b=(O,x,F=!1)=>{w.Range.isEmpty(O)&&x===""||d.push({identifier:{major:h,minor:m++},range:O,text:x,forceMoveMarkers:F,isAutoWhitespaceEdit:g.insertsAutoWhitespace})};let E=!1;const R={addEditOperation:b,addTrackedEditOperation:(O,x,F)=>{E=!0,b(O,x,F)},trackSelection:(O,x)=>{const F=v.Selection.liftSelection(O);let L;if(F.isEmpty())if(typeof x=="boolean")x?L=2:L=3;else{const B=n.model.getLineMaxColumn(F.startLineNumber);F.startColumn===B?L=2:L=3}else L=1;const M=n.trackedRanges.length,N=n.model._setTrackedRange(null,F,L);return n.trackedRanges[M]=N,n.trackedRangesDirection[M]=F.getDirection(),M.toString()}};try{g.getEditOperations(n.model,R)}catch(O){return(0,t.onUnexpectedError)(O),{operations:[],hadTrackedEditOperation:!1}}return{operations:d,hadTrackedEditOperation:E}}static _getLoserCursorMap(n){n=n.slice(0),n.sort((g,d)=>-w.Range.compareRangesUsingEnds(g.range,d.range));const h={};for(let g=1;g<n.length;g++){const d=n[g-1],m=n[g];if(w.Range.getStartPosition(d.range).isBefore(w.Range.getEndPosition(m.range))){let b;d.identifier.major>m.identifier.major?b=d.identifier.major:b=m.identifier.major,h[b.toString()]=!0;for(let E=0;E<n.length;E++)n[E].identifier.major===b&&(n.splice(E,1),E<g&&g--,E--);g>0&&g--}}return h}}class p{constructor(n,h,g){this.text=n,this.startSelection=h,this.endSelection=g}}class u{constructor(n,h){this._original=u._capture(n,h)}static _capture(n,h){const g=[];for(const d of h){if(d.startLineNumber!==d.endLineNumber)return null;g.push(new p(n.getLineContent(d.startLineNumber),d.startColumn-1,d.endColumn-1))}return g}deduceOutcome(n,h){if(!this._original)return null;const g=u._capture(n,h);if(!g||this._original.length!==g.length)return null;const d=[];for(let m=0,b=this._original.length;m<b;m++)d.push(u._deduceOutcome(this._original[m],g[m]));return d}static _deduceOutcome(n,h){const g=Math.min(n.startSelection,h.startSelection,f.commonPrefixLength(n.text,h.text)),d=Math.min(n.text.length-n.endSelection,h.text.length-h.endSelection,f.commonSuffixLength(n.text,h.text)),m=n.text.substring(g,n.text.length-d),b=h.text.substring(g,h.text.length-d);return new I.CompositionOutcome(m,n.startSelection-g,n.endSelection-g,b,h.startSelection-g,h.endSelection-g)}}}),define(ne[1938],re([1,0,6,2,49,42,52,8]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextResourceConfigurationService=void 0;let I=class extends f.Disposable{constructor(v,C,o){super();this.configurationService=v,this.modelService=C,this.languageService=o,this._onDidChangeConfiguration=this._register(new t.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._register(this.configurationService.onDidChangeConfiguration(c=>this._onDidChangeConfiguration.fire(this.toResourceConfigurationChangeEvent(c))))}getValue(v,C,o){return typeof o=="string"?this._getValue(v,_.Position.isIPosition(C)?C:null,o):this._getValue(v,null,typeof C=="string"?C:void 0)}updateValue(v,C,o,c){const i=this.getLanguage(v,null),S=this.configurationService.inspect(C,{resource:v,overrideIdentifier:i});switch(c===void 0&&(c=this.deriveConfigurationTarget(S,i)),c){case 7:return this._updateValue(C,o,c,S.memory?.override,v,i);case 5:return this._updateValue(C,o,c,S.workspaceFolder?.override,v,i);case 4:return this._updateValue(C,o,c,S.workspace?.override,v,i);case 3:return this._updateValue(C,o,c,S.userRemote?.override,v,i);default:return this._updateValue(C,o,c,S.userLocal?.override,v,i)}}_updateValue(v,C,o,c,i,S){return S&&c!==void 0?this.configurationService.updateValue(v,C,{resource:i,overrideIdentifier:S},o):this.configurationService.updateValue(v,C,{resource:i},o)}deriveConfigurationTarget(v,C){if(C){if(v.memory?.override!==void 0)return 7;if(v.workspaceFolder?.override!==void 0)return 5;if(v.workspace?.override!==void 0)return 4;if(v.userRemote?.override!==void 0)return 3;if(v.userLocal?.override!==void 0)return 2}return v.memory?.value!==void 0?7:v.workspaceFolder?.value!==void 0?5:v.workspace?.value!==void 0?4:v.userRemote?.value!==void 0?3:2}_getValue(v,C,o){const c=v?this.getLanguage(v,C):void 0;return typeof o=="undefined"?this.configurationService.getValue({resource:v,overrideIdentifier:c}):this.configurationService.getValue(o,{resource:v,overrideIdentifier:c})}getLanguage(v,C){const o=this.modelService.getModel(v);return o?C?o.getLanguageIdAtPosition(C.lineNumber,C.column):o.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(v)}toResourceConfigurationChangeEvent(v){return{affectedKeys:v.affectedKeys,affectsConfiguration:(C,o)=>{const c=this.getLanguage(C,null);return v.affectsConfiguration(o,{resource:C,overrideIdentifier:c})}}}};I=Ee([W(0,D.IConfigurationService),W(1,k.IModelService),W(2,A.ILanguageService)],I),e.TextResourceConfigurationService=I}),define(ne[1939],re([1,0,29,136,49,20,84,124,706]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineCommentCommand=e.Type=void 0;var w;(function(C){C[C.Toggle=0]="Toggle",C[C.ForceAdd=1]="ForceAdd",C[C.ForceRemove=2]="ForceRemove"})(w=e.Type||(e.Type={}));class v{constructor(o,c,i,S,s,l,r){this.languageConfigurationService=o,this._selection=c,this._tabSize=i,this._type=S,this._insertSpace=s,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=l,this._ignoreFirstLine=r||!1}static _gatherPreflightCommentStrings(o,c,i,S){o.tokenizeIfCheap(c);const s=o.getLanguageIdAtPosition(c,1),l=S.getLanguageConfiguration(s).comments,r=l?l.lineCommentToken:null;if(!r)return null;let p=[];for(let u=0,a=i-c+1;u<a;u++)p[u]={ignore:!1,commentStr:r,commentStrOffset:0,commentStrLength:r.length};return p}static _analyzeLines(o,c,i,S,s,l,r,p){let u=!0,a;o===0?a=!0:o===1?a=!1:a=!0;for(let n=0,h=S.length;n<h;n++){const g=S[n],d=s+n;if(d===s&&r){g.ignore=!0;continue}const m=i.getLineContent(d),b=t.firstNonWhitespaceIndex(m);if(b===-1){g.ignore=l,g.commentStrOffset=m.length;continue}if(u=!1,g.ignore=!1,g.commentStrOffset=b,a&&!I.BlockCommentCommand._haystackHasNeedleAtOffset(m,g.commentStr,b)&&(o===0?a=!1:o===1||(g.ignore=!0)),a&&c){const E=b+g.commentStrLength;E<m.length&&m.charCodeAt(E)===32&&(g.commentStrLength+=1)}}if(o===0&&u){a=!1;for(let n=0,h=S.length;n<h;n++)S[n].ignore=!1}return{supported:!0,shouldRemoveComments:a,lines:S}}static _gatherPreflightData(o,c,i,S,s,l,r,p){const u=v._gatherPreflightCommentStrings(i,S,s,p);return u===null?{supported:!1}:v._analyzeLines(o,c,i,u,S,l,r,p)}_executeLineComments(o,c,i,S){let s;i.shouldRemoveComments?s=v._createRemoveLineCommentsOperations(i.lines,S.startLineNumber):(v._normalizeInsertionPoint(o,i.lines,S.startLineNumber,this._tabSize),s=this._createAddLineCommentsOperations(i.lines,S.startLineNumber));const l=new _.Position(S.positionLineNumber,S.positionColumn);for(let r=0,p=s.length;r<p;r++)c.addEditOperation(s[r].range,s[r].text),A.Range.isEmpty(s[r].range)&&A.Range.getStartPosition(s[r].range).equals(l)&&o.getLineContent(l.lineNumber).length+1===l.column&&(this._deltaColumn=(s[r].text||"").length);this._selectionId=c.trackSelection(S)}_attemptRemoveBlockComment(o,c,i,S){let s=c.startLineNumber,l=c.endLineNumber,r=S.length+Math.max(o.getLineFirstNonWhitespaceColumn(c.startLineNumber),c.startColumn),p=o.getLineContent(s).lastIndexOf(i,r-1),u=o.getLineContent(l).indexOf(S,c.endColumn-1-i.length);return p!==-1&&u===-1&&(u=o.getLineContent(s).indexOf(S,p+i.length),l=s),p===-1&&u!==-1&&(p=o.getLineContent(l).lastIndexOf(i,u),s=l),c.isEmpty()&&(p===-1||u===-1)&&(p=o.getLineContent(s).indexOf(i),p!==-1&&(u=o.getLineContent(s).indexOf(S,p+i.length))),p!==-1&&o.getLineContent(s).charCodeAt(p+i.length)===32&&(i+=" "),u!==-1&&o.getLineContent(l).charCodeAt(u-1)===32&&(S=" "+S,u-=1),p!==-1&&u!==-1?I.BlockCommentCommand._createRemoveBlockCommentOperations(new A.Range(s,p+i.length+1,l,u+1),i,S):null}_executeBlockComment(o,c,i){o.tokenizeIfCheap(i.startLineNumber);let S=o.getLanguageIdAtPosition(i.startLineNumber,1),s=D.LanguageConfigurationRegistry.getComments(S);if(!s||!s.blockCommentStartToken||!s.blockCommentEndToken)return;const l=s.blockCommentStartToken,r=s.blockCommentEndToken;let p=this._attemptRemoveBlockComment(o,i,l,r);if(!p){if(i.isEmpty()){const u=o.getLineContent(i.startLineNumber);let a=t.firstNonWhitespaceIndex(u);a===-1&&(a=u.length),p=I.BlockCommentCommand._createAddBlockCommentOperations(new A.Range(i.startLineNumber,a+1,i.startLineNumber,u.length+1),l,r,this._insertSpace)}else p=I.BlockCommentCommand._createAddBlockCommentOperations(new A.Range(i.startLineNumber,o.getLineFirstNonWhitespaceColumn(i.startLineNumber),i.endLineNumber,o.getLineMaxColumn(i.endLineNumber)),l,r,this._insertSpace);p.length===1&&(this._deltaColumn=l.length+1)}this._selectionId=c.trackSelection(i);for(const u of p)c.addEditOperation(u.range,u.text)}getEditOperations(o,c){let i=this._selection;if(this._moveEndPositionDown=!1,i.startLineNumber===i.endLineNumber&&this._ignoreFirstLine){c.addEditOperation(new A.Range(i.startLineNumber,o.getLineMaxColumn(i.startLineNumber),i.startLineNumber+1,1),i.startLineNumber===o.getLineCount()?"":` `),this._selectionId=c.trackSelection(i);return}i.startLineNumber<i.endLineNumber&&i.endColumn===1&&(this._moveEndPositionDown=!0,i=i.setEndPosition(i.endLineNumber-1,o.getLineMaxColumn(i.endLineNumber-1)));const S=v._gatherPreflightData(this._type,this._insertSpace,o,i.startLineNumber,i.endLineNumber,this._ignoreEmptyLines,this._ignoreFirstLine,this.languageConfigurationService);return S.supported?this._executeLineComments(o,c,S,i):this._executeBlockComment(o,c,i)}computeCursorState(o,c){let i=c.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),new k.Selection(i.selectionStartLineNumber,i.selectionStartColumn+this._deltaColumn,i.positionLineNumber,i.positionColumn+this._deltaColumn)}static _createRemoveLineCommentsOperations(o,c){let i=[];for(let S=0,s=o.length;S<s;S++){const l=o[S];l.ignore||i.push(f.EditOperation.delete(new A.Range(c+S,l.commentStrOffset+1,c+S,l.commentStrOffset+l.commentStrLength+1)))}return i}_createAddLineCommentsOperations(o,c){let i=[];const S=this._insertSpace?" ":"";for(let s=0,l=o.length;s<l;s++){const r=o[s];r.ignore||i.push(f.EditOperation.insert(new _.Position(c+s,r.commentStrOffset+1),r.commentStr+S))}return i}static nextVisibleColumn(o,c,i,S){return i?o+(c-o%c):o+S}static _normalizeInsertionPoint(o,c,i,S){let s=1073741824,l,r;for(let p=0,u=c.length;p<u;p++){if(c[p].ignore)continue;const a=o.getLineContent(i+p);let n=0;for(let h=0,g=c[p].commentStrOffset;n<s&&h<g;h++)n=v.nextVisibleColumn(n,S,a.charCodeAt(h)===9,1);n<s&&(s=n)}s=Math.floor(s/S)*S;for(let p=0,u=c.length;p<u;p++){if(c[p].ignore)continue;const a=o.getLineContent(i+p);let n=0;for(l=0,r=c[p].commentStrOffset;n<s&&l<r;l++)n=v.nextVisibleColumn(n,S,a.charCodeAt(l)===9,1);n>s?c[p].commentStrOffset=l-1:c[p].commentStrOffset=l}}}e.LineCommentCommand=v}),define(ne[1940],re([1,0,29,546,20,84,342,124,710]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveLinesCommand=void 0;class w{constructor(C,o,c){this._selection=C,this._isMovingDown=o,this._autoIndent=c,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(C,o){let c=C.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===c){this._selectionId=o.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=o.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let i=this._selection;i.startLineNumber<i.endLineNumber&&i.endColumn===1&&(this._moveEndPositionDown=!0,i=i.setEndPosition(i.endLineNumber-1,C.getLineMaxColumn(i.endLineNumber-1)));const{tabSize:S,indentSize:s,insertSpaces:l}=C.getOptions();let r=this.buildIndentConverter(S,s,l),p={getLineTokens:u=>C.getLineTokens(u),getLanguageId:()=>C.getLanguageId(),getLanguageIdAtPosition:(u,a)=>C.getLanguageIdAtPosition(u,a),getLineContent:null};if(i.startLineNumber===i.endLineNumber&&C.getLineMaxColumn(i.startLineNumber)===1){let u=i.startLineNumber,a=this._isMovingDown?u+1:u-1;C.getLineMaxColumn(a)===1?o.addEditOperation(new _.Range(1,1,1,1),null):(o.addEditOperation(new _.Range(u,1,u,1),C.getLineContent(a)),o.addEditOperation(new _.Range(a,1,a,C.getLineMaxColumn(a)),null)),i=new A.Selection(a,1,a,1)}else{let u,a;if(this._isMovingDown){u=i.endLineNumber+1,a=C.getLineContent(u),o.addEditOperation(new _.Range(u-1,C.getLineMaxColumn(u-1),u,C.getLineMaxColumn(u)),null);let n=a;if(this.shouldAutoIndent(C,i)){let h=this.matchEnterRule(C,r,S,u,i.startLineNumber-1);if(h!==null){let d=t.getLeadingWhitespace(C.getLineContent(u)),m=h+I.getSpaceCnt(d,S);n=I.generateIndent(m,S,l)+this.trimLeft(a)}else{p.getLineContent=m=>m===i.startLineNumber?C.getLineContent(u):C.getLineContent(m);let d=D.LanguageConfigurationRegistry.getGoodIndentForLine(this._autoIndent,p,C.getLanguageIdAtPosition(u,1),i.startLineNumber,r);if(d!==null){let m=t.getLeadingWhitespace(C.getLineContent(u)),b=I.getSpaceCnt(d,S),E=I.getSpaceCnt(m,S);b!==E&&(n=I.generateIndent(b,S,l)+this.trimLeft(a))}}o.addEditOperation(new _.Range(i.startLineNumber,1,i.startLineNumber,1),n+` `);let g=this.matchEnterRuleMovingDown(C,r,S,i.startLineNumber,u,n);if(g!==null)g!==0&&this.getIndentEditsOfMovingBlock(C,o,i,S,l,g);else{p.getLineContent=m=>m===i.startLineNumber?n:m>=i.startLineNumber+1&&m<=i.endLineNumber+1?C.getLineContent(m-1):C.getLineContent(m);let d=D.LanguageConfigurationRegistry.getGoodIndentForLine(this._autoIndent,p,C.getLanguageIdAtPosition(u,1),i.startLineNumber+1,r);if(d!==null){const m=t.getLeadingWhitespace(C.getLineContent(i.startLineNumber)),b=I.getSpaceCnt(d,S),E=I.getSpaceCnt(m,S);if(b!==E){const y=b-E;this.getIndentEditsOfMovingBlock(C,o,i,S,l,y)}}}}else o.addEditOperation(new _.Range(i.startLineNumber,1,i.startLineNumber,1),n+` `)}else if(u=i.startLineNumber-1,a=C.getLineContent(u),o.addEditOperation(new _.Range(u,1,u+1,1),null),o.addEditOperation(new _.Range(i.endLineNumber,C.getLineMaxColumn(i.endLineNumber),i.endLineNumber,C.getLineMaxColumn(i.endLineNumber)),` `+a),this.shouldAutoIndent(C,i)){p.getLineContent=h=>h===u?C.getLineContent(i.startLineNumber):C.getLineContent(h);let n=this.matchEnterRule(C,r,S,i.startLineNumber,i.startLineNumber-2);if(n!==null)n!==0&&this.getIndentEditsOfMovingBlock(C,o,i,S,l,n);else{let h=D.LanguageConfigurationRegistry.getGoodIndentForLine(this._autoIndent,p,C.getLanguageIdAtPosition(i.startLineNumber,1),u,r);if(h!==null){let g=t.getLeadingWhitespace(C.getLineContent(i.startLineNumber)),d=I.getSpaceCnt(h,S),m=I.getSpaceCnt(g,S);if(d!==m){let b=d-m;this.getIndentEditsOfMovingBlock(C,o,i,S,l,b)}}}}}this._selectionId=o.trackSelection(i)}buildIndentConverter(C,o,c){return{shiftIndent:i=>f.ShiftCommand.shiftIndent(i,i.length+1,C,o,c),unshiftIndent:i=>f.ShiftCommand.unshiftIndent(i,i.length+1,C,o,c)}}parseEnterResult(C,o,c,i,S){if(S){let s=S.indentation;S.indentAction===k.IndentAction.None||S.indentAction===k.IndentAction.Indent?s=S.indentation+S.appendText:S.indentAction===k.IndentAction.IndentOutdent?s=S.indentation:S.indentAction===k.IndentAction.Outdent&&(s=o.unshiftIndent(S.indentation)+S.appendText);let l=C.getLineContent(i);if(this.trimLeft(l).indexOf(this.trimLeft(s))>=0){let r=t.getLeadingWhitespace(C.getLineContent(i)),p=t.getLeadingWhitespace(s),u=D.LanguageConfigurationRegistry.getIndentMetadata(C,i);u!==null&&u&2&&(p=o.unshiftIndent(p));let a=I.getSpaceCnt(p,c),n=I.getSpaceCnt(r,c);return a-n}}return null}matchEnterRuleMovingDown(C,o,c,i,S,s){if(t.lastNonWhitespaceIndex(s)>=0){let l=C.getLineMaxColumn(S),r=D.LanguageConfigurationRegistry.getEnterAction(this._autoIndent,C,new _.Range(S,l,S,l));return this.parseEnterResult(C,o,c,i,r)}else{let l=i-1;for(;l>=1;){let u=C.getLineContent(l);if(t.lastNonWhitespaceIndex(u)>=0)break;l--}if(l<1||i>C.getLineCount())return null;let r=C.getLineMaxColumn(l),p=D.LanguageConfigurationRegistry.getEnterAction(this._autoIndent,C,new _.Range(l,r,l,r));return this.parseEnterResult(C,o,c,i,p)}}matchEnterRule(C,o,c,i,S,s){let l=S;for(;l>=1;){let u;if(l===S&&s!==void 0?u=s:u=C.getLineContent(l),t.lastNonWhitespaceIndex(u)>=0)break;l--}if(l<1||i>C.getLineCount())return null;let r=C.getLineMaxColumn(l),p=D.LanguageConfigurationRegistry.getEnterAction(this._autoIndent,C,new _.Range(l,r,l,r));return this.parseEnterResult(C,o,c,i,p)}trimLeft(C){return C.replace(/^\s+/,"")}shouldAutoIndent(C,o){if(this._autoIndent<4||!C.isCheapToTokenize(o.startLineNumber))return!1;let c=C.getLanguageIdAtPosition(o.startLineNumber,1),i=C.getLanguageIdAtPosition(o.endLineNumber,1);return!(c!==i||D.LanguageConfigurationRegistry.getIndentRulesSupport(c)===null)}getIndentEditsOfMovingBlock(C,o,c,i,S,s){for(let l=c.startLineNumber;l<=c.endLineNumber;l++){let r=C.getLineContent(l),p=t.getLeadingWhitespace(r),a=I.getSpaceCnt(p,i)+s,n=I.generateIndent(a,i,S);n!==p&&(o.addEditOperation(new _.Range(l,1,l,p.length+1),n),l===c.endLineNumber&&c.endColumn<=p.length+1&&n===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(C,o){let c=o.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(c=c.setEndPosition(c.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&c.startLineNumber<c.endLineNumber&&(c=c.setEndPosition(c.endLineNumber,2)),c}}e.MoveLinesCommand=w}),define(ne[7],re([1,0,14,29,5]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.implies=e.SET_CONTEXT_COMMAND_ID=e.IContextKeyService=e.RawContextKey=e.ContextKeyNotRegexExpr=e.ContextKeyRegexExpr=e.ContextKeySmallerEqualsExpr=e.ContextKeySmallerExpr=e.ContextKeyGreaterEqualsExpr=e.ContextKeyGreaterExpr=e.ContextKeyNotExpr=e.ContextKeyNotEqualsExpr=e.ContextKeyNotInExpr=e.ContextKeyInExpr=e.ContextKeyEqualsExpr=e.ContextKeyDefinedExpr=e.ContextKeyTrueExpr=e.ContextKeyFalseExpr=e.expressionsAreEqualWithConstantSubstitution=e.ContextKeyExpr=e.ContextKeyExprType=void 0;const A=new Map;A.set("false",!1),A.set("true",!0),A.set("isMac",t.isMacintosh),A.set("isLinux",t.isLinux),A.set("isWindows",t.isWindows),A.set("isWeb",t.isWeb),A.set("isMacNative",t.isMacintosh&&!t.isWeb),A.set("isEdge",t.isEdge),A.set("isFirefox",t.isFirefox),A.set("isChrome",t.isChrome),A.set("isSafari",t.isSafari);const k=Object.prototype.hasOwnProperty;var D;(function(F){F[F.False=0]="False",F[F.True=1]="True",F[F.Defined=2]="Defined",F[F.Not=3]="Not",F[F.Equals=4]="Equals",F[F.NotEquals=5]="NotEquals",F[F.And=6]="And",F[F.Regex=7]="Regex",F[F.NotRegex=8]="NotRegex",F[F.Or=9]="Or",F[F.In=10]="In",F[F.NotIn=11]="NotIn",F[F.Greater=12]="Greater",F[F.GreaterEquals=13]="GreaterEquals",F[F.Smaller=14]="Smaller",F[F.SmallerEquals=15]="SmallerEquals"})(D=e.ContextKeyExprType||(e.ContextKeyExprType={}));class I{static false(){return C.INSTANCE}static true(){return o.INSTANCE}static has(L){return c.create(L)}static equals(L,M){return i.create(L,M)}static notEquals(L,M){return l.create(L,M)}static regex(L,M){return g.create(L,M)}static in(L,M){return S.create(L,M)}static not(L){return r.create(L)}static and(...L){return b.create(L,null)}static or(...L){return E.create(L,null,!0)}static greater(L,M){return u.create(L,M)}static greaterEquals(L,M){return a.create(L,M)}static smaller(L,M){return n.create(L,M)}static smallerEquals(L,M){return h.create(L,M)}static deserialize(L,M=!1){if(!!L)return this._deserializeOrExpression(L,M)}static _deserializeOrExpression(L,M){let N=L.split("||");return E.create(N.map(B=>this._deserializeAndExpression(B,M)),null,!0)}static _deserializeAndExpression(L,M){let N=L.split("&&");return b.create(N.map(B=>this._deserializeOne(B,M)),null)}static _deserializeOne(L,M){if(L=L.trim(),L.indexOf("!=")>=0){let N=L.split("!=");return l.create(N[0].trim(),this._deserializeValue(N[1],M))}if(L.indexOf("==")>=0){let N=L.split("==");return i.create(N[0].trim(),this._deserializeValue(N[1],M))}if(L.indexOf("=~")>=0){let N=L.split("=~");return g.create(N[0].trim(),this._deserializeRegexValue(N[1],M))}if(L.indexOf(" in ")>=0){let N=L.split(" in ");return S.create(N[0].trim(),N[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(L)){const N=L.split(">=");return a.create(N[0].trim(),N[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(L)){const N=L.split(">");return u.create(N[0].trim(),N[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(L)){const N=L.split("<=");return h.create(N[0].trim(),N[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(L)){const N=L.split("<");return n.create(N[0].trim(),N[1].trim())}return/^\!\s*/.test(L)?r.create(L.substr(1).trim()):c.create(L)}static _deserializeValue(L,M){if(L=L.trim(),L==="true")return!0;if(L==="false")return!1;let N=/^'([^']*)'$/.exec(L);return N?N[1].trim():L}static _deserializeRegexValue(L,M){if((0,f.isFalsyOrWhitespace)(L)){if(M)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let N=L.indexOf("/"),B=L.lastIndexOf("/");if(N===B||N<0){if(M)throw new Error(`bad regexp-value '${L}', missing /-enclosure`);return console.warn(`bad regexp-value '${L}', missing /-enclosure`),null}let P=L.slice(N+1,B),V=L[B+1]==="i"?"i":"";try{return new RegExp(P,V)}catch(z){if(M)throw new Error(`bad regexp-value '${L}', parse error: ${z}`);return console.warn(`bad regexp-value '${L}', parse error: ${z}`),null}}}e.ContextKeyExpr=I;function w(F,L){const M=F?F.substituteConstants():void 0,N=L?L.substituteConstants():void 0;return!M&&!N?!0:!M||!N?!1:M.equals(N)}e.expressionsAreEqualWithConstantSubstitution=w;function v(F,L){return F.cmp(L)}class C{constructor(){this.type=0}cmp(L){return this.type-L.type}equals(L){return L.type===this.type}substituteConstants(){return this}evaluate(L){return!1}serialize(){return"false"}keys(){return[]}map(L){return this}negate(){return o.INSTANCE}}e.ContextKeyFalseExpr=C,C.INSTANCE=new C;class o{constructor(){this.type=1}cmp(L){return this.type-L.type}equals(L){return L.type===this.type}substituteConstants(){return this}evaluate(L){return!0}serialize(){return"true"}keys(){return[]}map(L){return this}negate(){return C.INSTANCE}}e.ContextKeyTrueExpr=o,o.INSTANCE=new o;class c{constructor(L,M){this.key=L,this.negated=M,this.type=2}static create(L,M=null){const N=A.get(L);return typeof N=="boolean"?N?o.INSTANCE:C.INSTANCE:new c(L,M)}cmp(L){return L.type!==this.type?this.type-L.type:T(this.key,L.key)}equals(L){return L.type===this.type?this.key===L.key:!1}substituteConstants(){const L=A.get(this.key);return typeof L=="boolean"?L?o.INSTANCE:C.INSTANCE:this}evaluate(L){return!!L.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}map(L){return L.mapDefined(this.key)}negate(){return this.negated||(this.negated=r.create(this.key,this)),this.negated}}e.ContextKeyDefinedExpr=c;class i{constructor(L,M,N){this.key=L,this.value=M,this.negated=N,this.type=4}static create(L,M,N=null){if(typeof M=="boolean")return M?c.create(L,N):r.create(L,N);const B=A.get(L);return typeof B=="boolean"?M===(B?"true":"false")?o.INSTANCE:C.INSTANCE:new i(L,M,N)}cmp(L){return L.type!==this.type?this.type-L.type:R(this.key,this.value,L.key,L.value)}equals(L){return L.type===this.type?this.key===L.key&&this.value===L.value:!1}substituteConstants(){const L=A.get(this.key);if(typeof L=="boolean"){const M=L?"true":"false";return this.value===M?o.INSTANCE:C.INSTANCE}return this}evaluate(L){return L.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}map(L){return L.mapEquals(this.key,this.value)}negate(){return this.negated||(this.negated=l.create(this.key,this.value,this)),this.negated}}e.ContextKeyEqualsExpr=i;class S{constructor(L,M){this.key=L,this.valueKey=M,this.type=10,this.negated=null}static create(L,M){return new S(L,M)}cmp(L){return L.type!==this.type?this.type-L.type:R(this.key,this.valueKey,L.key,L.valueKey)}equals(L){return L.type===this.type?this.key===L.key&&this.valueKey===L.valueKey:!1}substituteConstants(){return this}evaluate(L){const M=L.getValue(this.valueKey),N=L.getValue(this.key);return Array.isArray(M)?M.indexOf(N)>=0:typeof N=="string"&&typeof M=="object"&&M!==null?k.call(M,N):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}map(L){return L.mapIn(this.key,this.valueKey)}negate(){return this.negated||(this.negated=s.create(this)),this.negated}}e.ContextKeyInExpr=S;class s{constructor(L){this._actual=L,this.type=11}static create(L){return new s(L)}cmp(L){return L.type!==this.type?this.type-L.type:this._actual.cmp(L._actual)}equals(L){return L.type===this.type?this._actual.equals(L._actual):!1}substituteConstants(){return this}evaluate(L){return!this._actual.evaluate(L)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}map(L){return new s(this._actual.map(L))}negate(){return this._actual}}e.ContextKeyNotInExpr=s;class l{constructor(L,M,N){this.key=L,this.value=M,this.negated=N,this.type=5}static create(L,M,N=null){if(typeof M=="boolean")return M?r.create(L,N):c.create(L,N);const B=A.get(L);return typeof B=="boolean"?M===(B?"true":"false")?C.INSTANCE:o.INSTANCE:new l(L,M,N)}cmp(L){return L.type!==this.type?this.type-L.type:R(this.key,this.value,L.key,L.value)}equals(L){return L.type===this.type?this.key===L.key&&this.value===L.value:!1}substituteConstants(){const L=A.get(this.key);if(typeof L=="boolean"){const M=L?"true":"false";return this.value===M?C.INSTANCE:o.INSTANCE}return this}evaluate(L){return L.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}map(L){return L.mapNotEquals(this.key,this.value)}negate(){return this.negated||(this.negated=i.create(this.key,this.value,this)),this.negated}}e.ContextKeyNotEqualsExpr=l;class r{constructor(L,M){this.key=L,this.negated=M,this.type=3}static create(L,M=null){const N=A.get(L);return typeof N=="boolean"?N?C.INSTANCE:o.INSTANCE:new r(L,M)}cmp(L){return L.type!==this.type?this.type-L.type:T(this.key,L.key)}equals(L){return L.type===this.type?this.key===L.key:!1}substituteConstants(){const L=A.get(this.key);return typeof L=="boolean"?L?C.INSTANCE:o.INSTANCE:this}evaluate(L){return!L.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}map(L){return L.mapNot(this.key)}negate(){return this.negated||(this.negated=c.create(this.key,this)),this.negated}}e.ContextKeyNotExpr=r;function p(F,L){if(typeof F=="string"){const M=parseFloat(F);isNaN(M)||(F=M)}return typeof F=="string"||typeof F=="number"?L(F):C.INSTANCE}class u{constructor(L,M,N){this.key=L,this.value=M,this.negated=N,this.type=12}static create(L,M,N=null){return p(M,B=>new u(L,B,N))}cmp(L){return L.type!==this.type?this.type-L.type:R(this.key,this.value,L.key,L.value)}equals(L){return L.type===this.type?this.key===L.key&&this.value===L.value:!1}substituteConstants(){return this}evaluate(L){return typeof this.value=="string"?!1:parseFloat(L.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}map(L){return L.mapGreater(this.key,this.value)}negate(){return this.negated||(this.negated=h.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterExpr=u;class a{constructor(L,M,N){this.key=L,this.value=M,this.negated=N,this.type=13}static create(L,M,N=null){return p(M,B=>new a(L,B,N))}cmp(L){return L.type!==this.type?this.type-L.type:R(this.key,this.value,L.key,L.value)}equals(L){return L.type===this.type?this.key===L.key&&this.value===L.value:!1}substituteConstants(){return this}evaluate(L){return typeof this.value=="string"?!1:parseFloat(L.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}map(L){return L.mapGreaterEquals(this.key,this.value)}negate(){return this.negated||(this.negated=n.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterEqualsExpr=a;class n{constructor(L,M,N){this.key=L,this.value=M,this.negated=N,this.type=14}static create(L,M,N=null){return p(M,B=>new n(L,B,N))}cmp(L){return L.type!==this.type?this.type-L.type:R(this.key,this.value,L.key,L.value)}equals(L){return L.type===this.type?this.key===L.key&&this.value===L.value:!1}substituteConstants(){return this}evaluate(L){return typeof this.value=="string"?!1:parseFloat(L.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}map(L){return L.mapSmaller(this.key,this.value)}negate(){return this.negated||(this.negated=a.create(this.key,this.value,this)),this.negated}}e.ContextKeySmallerExpr=n;class h{constructor(L,M,N){this.key=L,this.value=M,this.negated=N,this.type=15}static create(L,M,N=null){return p(M,B=>new h(L,B,N))}cmp(L){return L.type!==this.type?this.type-L.type:R(this.key,this.value,L.key,L.value)}equals(L){return L.type===this.type?this.key===L.key&&this.value===L.value:!1}substituteConstants(){return this}evaluate(L){return typeof this.value=="string"?!1:parseFloat(L.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}map(L){return L.mapSmallerEquals(this.key,this.value)}negate(){return this.negated||(this.negated=u.create(this.key,this.value,this)),this.negated}}e.ContextKeySmallerEqualsExpr=h;class g{constructor(L,M){this.key=L,this.regexp=M,this.type=7,this.negated=null}static create(L,M){return new g(L,M)}cmp(L){if(L.type!==this.type)return this.type-L.type;if(this.key<L.key)return-1;if(this.key>L.key)return 1;const M=this.regexp?this.regexp.source:"",N=L.regexp?L.regexp.source:"";return M<N?-1:M>N?1:0}equals(L){if(L.type===this.type){const M=this.regexp?this.regexp.source:"",N=L.regexp?L.regexp.source:"";return this.key===L.key&&M===N}return!1}substituteConstants(){return this}evaluate(L){let M=L.getValue(this.key);return this.regexp?this.regexp.test(M):!1}serialize(){const L=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${L}`}keys(){return[this.key]}map(L){return L.mapRegex(this.key,this.regexp)}negate(){return this.negated||(this.negated=d.create(this)),this.negated}}e.ContextKeyRegexExpr=g;class d{constructor(L){this._actual=L,this.type=8}static create(L){return new d(L)}cmp(L){return L.type!==this.type?this.type-L.type:this._actual.cmp(L._actual)}equals(L){return L.type===this.type?this._actual.equals(L._actual):!1}substituteConstants(){return this}evaluate(L){return!this._actual.evaluate(L)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}map(L){return new d(this._actual.map(L))}negate(){return this._actual}}e.ContextKeyNotRegexExpr=d;function m(F){let L=null;for(let M=0,N=F.length;M<N;M++){const B=F[M].substituteConstants();if(F[M]!==B&&L===null){L=[];for(let P=0;P<M;P++)L[P]=F[P]}L!==null&&(L[M]=B)}return L===null?F:L}class b{constructor(L,M){this.expr=L,this.negated=M,this.type=6}static create(L,M){return b._normalizeArr(L,M)}cmp(L){if(L.type!==this.type)return this.type-L.type;if(this.expr.length<L.expr.length)return-1;if(this.expr.length>L.expr.length)return 1;for(let M=0,N=this.expr.length;M<N;M++){const B=v(this.expr[M],L.expr[M]);if(B!==0)return B}return 0}equals(L){if(L.type===this.type){if(this.expr.length!==L.expr.length)return!1;for(let M=0,N=this.expr.length;M<N;M++)if(!this.expr[M].equals(L.expr[M]))return!1;return!0}return!1}substituteConstants(){const L=m(this.expr);return L===this.expr?this:b.create(L,this.negated)}evaluate(L){for(let M=0,N=this.expr.length;M<N;M++)if(!this.expr[M].evaluate(L))return!1;return!0}static _normalizeArr(L,M){const N=[];let B=!1;for(const P of L)if(!!P){if(P.type===1){B=!0;continue}if(P.type===0)return C.INSTANCE;if(P.type===6){N.push(...P.expr);continue}N.push(P)}if(N.length===0&&B)return o.INSTANCE;if(N.length!==0){if(N.length===1)return N[0];N.sort(v);for(let P=1;P<N.length;P++)N[P-1].equals(N[P])&&(N.splice(P,1),P--);if(N.length===1)return N[0];for(;N.length>1;){const P=N[N.length-1];if(P.type!==9)break;N.pop();const V=N.pop(),z=N.length===0,U=E.create(P.expr.map(H=>b.create([H,V],null)),null,z);U&&(N.push(U),N.sort(v))}return N.length===1?N[0]:new b(N,M)}}serialize(){return this.expr.map(L=>L.serialize()).join(" && ")}keys(){const L=[];for(let M of this.expr)L.push(...M.keys());return L}map(L){return new b(this.expr.map(M=>M.map(L)),null)}negate(){if(!this.negated){const L=[];for(let M of this.expr)L.push(M.negate());this.negated=E.create(L,this,!0)}return this.negated}}class E{constructor(L,M){this.expr=L,this.negated=M,this.type=9}static create(L,M,N){return E._normalizeArr(L,M,N)}cmp(L){if(L.type!==this.type)return this.type-L.type;if(this.expr.length<L.expr.length)return-1;if(this.expr.length>L.expr.length)return 1;for(let M=0,N=this.expr.length;M<N;M++){const B=v(this.expr[M],L.expr[M]);if(B!==0)return B}return 0}equals(L){if(L.type===this.type){if(this.expr.length!==L.expr.length)return!1;for(let M=0,N=this.expr.length;M<N;M++)if(!this.expr[M].equals(L.expr[M]))return!1;return!0}return!1}substituteConstants(){const L=m(this.expr);return L===this.expr?this:E.create(L,this.negated,!1)}evaluate(L){for(let M=0,N=this.expr.length;M<N;M++)if(this.expr[M].evaluate(L))return!0;return!1}static _normalizeArr(L,M,N){let B=[],P=!1;if(L){for(let V=0,z=L.length;V<z;V++){const U=L[V];if(!!U){if(U.type===0){P=!0;continue}if(U.type===1)return o.INSTANCE;if(U.type===9){B=B.concat(U.expr);continue}B.push(U)}}if(B.length===0&&P)return C.INSTANCE;B.sort(v)}if(B.length!==0){if(B.length===1)return B[0];for(let V=1;V<B.length;V++)B[V-1].equals(B[V])&&(B.splice(V,1),V--);if(B.length===1)return B[0];if(N){for(let V=0;V<B.length;V++)for(let z=V+1;z<B.length;z++)O(B[V],B[z])&&(B.splice(z,1),z--);if(B.length===1)return B[0]}return new E(B,M)}}serialize(){return this.expr.map(L=>L.serialize()).join(" || ")}keys(){const L=[];for(let M of this.expr)L.push(...M.keys());return L}map(L){return new E(this.expr.map(M=>M.map(L)),null)}negate(){if(!this.negated){let L=[];for(let M of this.expr)L.push(M.negate());for(;L.length>1;){const M=L.shift(),N=L.shift(),B=[];for(const V of x(M))for(const z of x(N))B.push(b.create([V,z],null));const P=L.length===0;L.unshift(E.create(B,null,P))}this.negated=L[0]}return this.negated}}class y extends c{constructor(L,M,N){super(L,null);this._defaultValue=M,typeof N=="object"?y._info.push({...N,key:L}):N!==!0&&y._info.push({key:L,description:N,type:M!=null?typeof M:void 0})}static all(){return y._info.values()}bindTo(L){return L.createKey(this.key,this._defaultValue)}getValue(L){return L.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(L){return i.create(this.key,L)}notEqualsTo(L){return l.create(this.key,L)}}e.RawContextKey=y,y._info=[],e.IContextKeyService=(0,_.createDecorator)("contextKeyService"),e.SET_CONTEXT_COMMAND_ID="setContext";function T(F,L){return F<L?-1:F>L?1:0}function R(F,L,M,N){return F<M?-1:F>M?1:L<N?-1:L>N?1:0}function O(F,L){if(L.type===6&&F.type!==9&&F.type!==6){for(const B of L.expr)if(F.equals(B))return!0}const M=F.negate(),N=x(M).concat(x(L));N.sort(v);for(let B=0;B<N.length;B++){const V=N[B].negate();for(let z=B+1;z<N.length;z++){const U=N[z];if(V.equals(U))return!0}}return!1}e.implies=O;function x(F){return F.type===9?F.expr:[F]}}),define(ne[58],re([1,0,1247,7]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorContextKeys=void 0;var _;(function(A){A.editorSimpleInput=new f.RawContextKey("editorSimpleInput",!1,!0),A.editorTextFocus=new f.RawContextKey("editorTextFocus",!1,t.localize(0,null)),A.focus=new f.RawContextKey("editorFocus",!1,t.localize(1,null)),A.textInputFocus=new f.RawContextKey("textInputFocus",!1,t.localize(2,null)),A.readOnly=new f.RawContextKey("editorReadonly",!1,t.localize(3,null)),A.inDiffEditor=new f.RawContextKey("inDiffEditor",!1,t.localize(4,null)),A.columnSelection=new f.RawContextKey("editorColumnSelection",!1,t.localize(5,null)),A.writable=A.readOnly.toNegated(),A.hasNonEmptySelection=new f.RawContextKey("editorHasSelection",!1,t.localize(6,null)),A.hasOnlyEmptySelection=A.hasNonEmptySelection.toNegated(),A.hasMultipleSelections=new f.RawContextKey("editorHasMultipleSelections",!1,t.localize(7,null)),A.hasSingleSelection=A.hasMultipleSelections.toNegated(),A.tabMovesFocus=new f.RawContextKey("editorTabMovesFocus",!1,t.localize(8,null)),A.tabDoesNotMoveFocus=A.tabMovesFocus.toNegated(),A.isInWalkThroughSnippet=new f.RawContextKey("isInEmbeddedEditor",!1,!0),A.canUndo=new f.RawContextKey("canUndo",!1,!0),A.canRedo=new f.RawContextKey("canRedo",!1,!0),A.hoverVisible=new f.RawContextKey("editorHoverVisible",!1,t.localize(9,null)),A.inCompositeEditor=new f.RawContextKey("inCompositeEditor",void 0,t.localize(10,null)),A.notInCompositeEditor=A.inCompositeEditor.toNegated(),A.languageId=new f.RawContextKey("editorLangId","",t.localize(11,null)),A.hasCompletionItemProvider=new f.RawContextKey("editorHasCompletionItemProvider",!1,t.localize(12,null)),A.hasCodeActionsProvider=new f.RawContextKey("editorHasCodeActionsProvider",!1,t.localize(13,null)),A.hasCodeLensProvider=new f.RawContextKey("editorHasCodeLensProvider",!1,t.localize(14,null)),A.hasDefinitionProvider=new f.RawContextKey("editorHasDefinitionProvider",!1,t.localize(15,null)),A.hasDeclarationProvider=new f.RawContextKey("editorHasDeclarationProvider",!1,t.localize(16,null)),A.hasImplementationProvider=new f.RawContextKey("editorHasImplementationProvider",!1,t.localize(17,null)),A.hasTypeDefinitionProvider=new f.RawContextKey("editorHasTypeDefinitionProvider",!1,t.localize(18,null)),A.hasHoverProvider=new f.RawContextKey("editorHasHoverProvider",!1,t.localize(19,null)),A.hasDocumentHighlightProvider=new f.RawContextKey("editorHasDocumentHighlightProvider",!1,t.localize(20,null)),A.hasDocumentSymbolProvider=new f.RawContextKey("editorHasDocumentSymbolProvider",!1,t.localize(21,null)),A.hasReferenceProvider=new f.RawContextKey("editorHasReferenceProvider",!1,t.localize(22,null)),A.hasRenameProvider=new f.RawContextKey("editorHasRenameProvider",!1,t.localize(23,null)),A.hasSignatureHelpProvider=new f.RawContextKey("editorHasSignatureHelpProvider",!1,t.localize(24,null)),A.hasInlayHintsProvider=new f.RawContextKey("editorHasInlayHintsProvider",!1,t.localize(25,null)),A.hasDocumentFormattingProvider=new f.RawContextKey("editorHasDocumentFormattingProvider",!1,t.localize(26,null)),A.hasDocumentSelectionFormattingProvider=new f.RawContextKey("editorHasDocumentSelectionFormattingProvider",!1,t.localize(27,null)),A.hasMultipleDocumentFormattingProvider=new f.RawContextKey("editorHasMultipleDocumentFormattingProvider",!1,t.localize(28,null)),A.hasMultipleDocumentSelectionFormattingProvider=new f.RawContextKey("editorHasMultipleDocumentSelectionFormattingProvider",!1,t.localize(29,null))})(_=e.EditorContextKeys||(e.EditorContextKeys={}))}),define(ne[548],re([1,0,30,22,13,9,49,86,61,28,7,62]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.provideSignatureHelp=e.Context=void 0,e.Context={Visible:new v.RawContextKey("parameterHintsVisible",!1),MultipleSignatures:new v.RawContextKey("parameterHintsMultipleSignatures",!1)};async function o(c,i,S,s,l){const r=c.ordered(i);for(const p of r)try{const u=await p.provideSignatureHelp(i,S,l,s);if(u)return u}catch(u){(0,f.onUnexpectedExternalError)(u)}}e.provideSignatureHelp=o,w.CommandsRegistry.registerCommand("_executeSignatureHelpProvider",async(c,...i)=>{const[S,s,l]=i;(0,_.assertType)(A.URI.isUri(S)),(0,_.assertType)(k.Position.isIPosition(s)),(0,_.assertType)(typeof l=="string"||!l);const r=c.get(C.ILanguageFeaturesService),p=await c.get(I.ITextModelService).createModelReference(S);try{const u=await o(r.signatureHelpProvider,p.object.textEditorModel,k.Position.lift(s),{triggerKind:D.SignatureHelpTriggerKind.Invoke,isRetrigger:!1,triggerCharacter:l},t.CancellationToken.None);return u?(setTimeout(()=>u.dispose(),0),u.value):void 0}finally{p.dispose()}})}),define(ne[1941],re([1,0,11,22,6,2,339,86,548]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ParameterHintsModel=void 0;var w;(function(o){let c;(function(s){s[s.Default=0]="Default",s[s.Active=1]="Active",s[s.Pending=2]="Pending"})(c=o.Type||(o.Type={})),o.Default={type:0};class i{constructor(l,r){this.request=l,this.previouslyActiveHints=r,this.type=2}}o.Pending=i;class S{constructor(l){this.hints=l,this.type=1}}o.Active=S})(w||(w={}));class v extends A.Disposable{constructor(c,i,S=v.DEFAULT_DELAY){super();this._onChangedHints=this._register(new _.Emitter),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=w.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new A.MutableDisposable),this.triggerChars=new k.CharacterSet,this.retriggerChars=new k.CharacterSet,this.triggerId=0,this.editor=c,this.providers=i,this.throttledDelayer=new t.Delayer(S),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(s=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(s=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(s=>this.onCursorChange(s))),this._register(this.editor.onDidChangeModelContent(s=>this.onModelContentChange())),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(s=>this.onDidType(s))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(c){this._state.type===2&&this._state.request.cancel(),this._state=c}cancel(c=!1){this.state=w.Default,this.throttledDelayer.cancel(),c||this._onChangedHints.fire(void 0)}trigger(c,i){const S=this.editor.getModel();if(!S||!this.providers.has(S))return;const s=++this.triggerId;this._pendingTriggers.push(c),this.throttledDelayer.trigger(()=>this.doTrigger(s),i).catch(f.onUnexpectedError)}next(){if(this.state.type!==1)return;const c=this.state.hints.signatures.length,i=this.state.hints.activeSignature,S=i%c==c-1,s=this.editor.getOption(76).cycle;if((c<2||S)&&!s){this.cancel();return}this.updateActiveSignature(S&&s?0:i+1)}previous(){if(this.state.type!==1)return;const c=this.state.hints.signatures.length,i=this.state.hints.activeSignature,S=i===0,s=this.editor.getOption(76).cycle;if((c<2||S)&&!s){this.cancel();return}this.updateActiveSignature(S&&s?c-1:i-1)}updateActiveSignature(c){this.state.type===1&&(this.state=new w.Active({...this.state.hints,activeSignature:c}),this._onChangedHints.fire(this.state.hints))}async doTrigger(c){const i=this.state.type===1||this.state.type===2,S=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;const s=this._pendingTriggers.reduce(C);this._pendingTriggers=[];const l={triggerKind:s.triggerKind,triggerCharacter:s.triggerCharacter,isRetrigger:i,activeSignatureHelp:S};if(!this.editor.hasModel())return!1;const r=this.editor.getModel(),p=this.editor.getPosition();this.state=new w.Pending((0,t.createCancelablePromise)(u=>(0,I.provideSignatureHelp)(this.providers,r,p,l,u)),S);try{const u=await this.state.request;return c!==this.triggerId?(u?.dispose(),!1):!u||!u.value.signatures||u.value.signatures.length===0?(u?.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new w.Active(u.value),this._lastSignatureHelpResult.value=u,this._onChangedHints.fire(this.state.hints),!0)}catch(u){return c===this.triggerId&&(this.state=w.Default),(0,f.onUnexpectedError)(u),!1}}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return this.state.type===1||this.state.type===2||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars=new k.CharacterSet,this.retriggerChars=new k.CharacterSet;const c=this.editor.getModel();if(!!c)for(const i of this.providers.ordered(c)){for(const S of i.signatureHelpTriggerCharacters||[])this.triggerChars.add(S.charCodeAt(0)),this.retriggerChars.add(S.charCodeAt(0));for(const S of i.signatureHelpRetriggerCharacters||[])this.retriggerChars.add(S.charCodeAt(0))}}onDidType(c){if(!this.triggerOnType)return;const i=c.length-1,S=c.charCodeAt(i);(this.triggerChars.has(S)||this.isTriggered&&this.retriggerChars.has(S))&&this.trigger({triggerKind:D.SignatureHelpTriggerKind.TriggerCharacter,triggerCharacter:c.charAt(i)})}onCursorChange(c){c.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:D.SignatureHelpTriggerKind.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:D.SignatureHelpTriggerKind.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(76).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}e.ParameterHintsModel=v,v.DEFAULT_DELAY=120;function C(o,c){switch(c.triggerKind){case D.SignatureHelpTriggerKind.Invoke:return c;case D.SignatureHelpTriggerKind.ContentChange:return o;case D.SignatureHelpTriggerKind.TriggerCharacter:default:return c}}}),define(ne[1942],re([1,0,7]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestAlternatives=void 0;let f=class _n{constructor(A,k){this._editor=A,this._index=0,this._ckOtherSuggestions=_n.OtherSuggestions.bindTo(k)}dispose(){this.reset()}reset(){this._ckOtherSuggestions.reset(),this._listener?.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:A,index:k},D){if(A.items.length===0){this.reset();return}if(_n._moveIndex(!0,A,k)===k){this.reset();return}this._acceptNext=D,this._model=A,this._index=k,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(A,k,D){let I=D;for(;I=(I+k.items.length+(A?1:-1))%k.items.length,!(I===D||!k.items[I].completion.additionalTextEdits););return I}next(){this._move(!0)}prev(){this._move(!1)}_move(A){if(!!this._model)try{this._ignore=!0,this._index=_n._moveIndex(A,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};f.OtherSuggestions=new t.RawContextKey("hasOtherSuggestions",!1),f=Ee([W(1,t.IContextKeyService)],f),e.SuggestAlternatives=f}),define(ne[1943],re([1,0,7]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordContextKey=void 0;let f=class zs{constructor(A,k){this._editor=A,this._enabled=!1,this._ckAtEnd=zs.AtEnd.bindTo(k),this._configListener=this._editor.onDidChangeConfiguration(D=>D.hasChanged(111)&&this._update()),this._update()}dispose(){this._configListener.dispose(),this._selectionListener?.dispose(),this._ckAtEnd.reset()}_update(){const A=this._editor.getOption(111)==="on";if(this._enabled!==A)if(this._enabled=A,this._enabled){const k=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}const D=this._editor.getModel(),I=this._editor.getSelection(),w=D.getWordAtPosition(I.getStartPosition());if(!w){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(w.endColumn===I.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection(k),k()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};f.AtEnd=new t.RawContextKey("atEndOfWord",!1),f=Ee([W(1,t.IContextKeyService)],f),e.WordContextKey=f}),define(ne[98],re([1,0,7,5]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONTEXT_ACCESSIBILITY_MODE_ENABLED=e.AccessibilitySupport=e.IAccessibilityService=void 0,e.IAccessibilityService=(0,f.createDecorator)("accessibilityService");var _;(function(A){A[A.Unknown=0]="Unknown",A[A.Disabled=1]="Disabled",A[A.Enabled=2]="Enabled"})(_=e.AccessibilitySupport||(e.AccessibilitySupport={})),e.CONTEXT_ACCESSIBILITY_MODE_ENABLED=new t.RawContextKey("accessibilityModeEnabled",!1)}),define(ne[1944],re([1,0,77,15,6,2,51,14,680,393,1137,452,123,454,263,98]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComputedEditorOptions=e.EditorConfiguration=void 0;let s=class extends A.Disposable{constructor(g,d,m,b){super();this._accessibilityService=b,this._onDidChange=this._register(new _.Emitter),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new _.Emitter),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._computeOptionsMemory=new o.ComputeOptionsMemory,this.isSimpleWidget=g,this._containerObserver=this._register(new I.ElementSizeObserver(m,d.dimension)),this._rawOptions=n(d),this._validatedOptions=a.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(10)&&this._containerObserver.startObserving(),this._register(c.EditorZoom.onDidChangeZoomLevel(()=>this._recomputeOptions())),this._register(C.TabFocus.onDidChangeTabFocus(()=>this._recomputeOptions())),this._register(this._containerObserver.onDidChange(()=>this._recomputeOptions())),this._register(w.FontMeasurements.onDidChange(()=>this._recomputeOptions())),this._register(t.PixelRatio.onDidChange(()=>this._recomputeOptions())),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions()))}_recomputeOptions(){const g=this._computeOptions(),d=a.checkEquals(this.options,g);d!==null&&(this.options=g,this._onDidChangeFast.fire(d),this._onDidChange.fire(d))}_computeOptions(){const g=this._readEnvConfiguration(),d=i.BareFontInfo.createFromValidatedSettings(this._validatedOptions,g.pixelRatio,this.isSimpleWidget),m=this._readFontInfo(d),b={memory:this._computeOptionsMemory,outerWidth:g.outerWidth,outerHeight:g.outerHeight-this._reservedHeight,fontInfo:m,extraEditorClassName:g.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:g.emptySelectionClipboard,pixelRatio:g.pixelRatio,tabFocusMode:C.TabFocus.getTabFocusMode(),accessibilitySupport:g.accessibilitySupport};return a.computeOptions(this._validatedOptions,b)}_readEnvConfiguration(){return{extraEditorClassName:r(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:t.isWebKit||t.isFirefox,pixelRatio:t.PixelRatio.value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(g){return w.FontMeasurements.readFontInfo(g)}getRawOptions(){return this._rawOptions}updateOptions(g){const d=n(g);!a.applyUpdate(this._rawOptions,d)||(this._validatedOptions=a.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(g){this._containerObserver.observe(g)}setIsDominatedByLongLines(g){this._isDominatedByLongLines!==g&&(this._isDominatedByLongLines=g,this._recomputeOptions())}setModelLineCount(g){const d=l(g);this._lineNumbersDigitCount!==d&&(this._lineNumbersDigitCount=d,this._recomputeOptions())}setViewLineCount(g){this._viewLineCount!==g&&(this._viewLineCount=g,this._recomputeOptions())}setReservedHeight(g){this._reservedHeight!==g&&(this._reservedHeight=g,this._recomputeOptions())}};s=Ee([W(3,S.IAccessibilityService)],s),e.EditorConfiguration=s;function l(h){let g=0;for(;h;)h=Math.floor(h/10),g++;return g||1}function r(){let h="";return!t.isSafari&&!t.isWebkitWebView&&(h+="no-user-select "),t.isSafari&&(h+="no-minimap-shadow ",h+="enable-user-select "),D.isMacintosh&&(h+="mac "),h}class p{constructor(){this._values=[]}_read(g){return this._values[g]}get(g){return this._values[g]}_write(g,d){this._values[g]=d}}class u{constructor(){this._values=[]}_read(g){if(g>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[g]}get(g){return this._read(g)}_write(g,d){this._values[g]=d}}e.ComputedEditorOptions=u;class a{static validateOptions(g){const d=new p;for(const m of o.editorOptionsRegistry){const b=m.name==="_never_"?void 0:g[m.name];d._write(m.id,m.validate(b))}return d}static computeOptions(g,d){const m=new u;for(const b of o.editorOptionsRegistry)m._write(b.id,b.compute(d,m,g._read(b.id)));return m}static _deepEquals(g,d){if(typeof g!="object"||typeof d!="object"||!g||!d)return g===d;if(Array.isArray(g)||Array.isArray(d))return Array.isArray(g)&&Array.isArray(d)?f.equals(g,d):!1;if(Object.keys(g).length!==Object.keys(d).length)return!1;for(const m in g)if(!a._deepEquals(g[m],d[m]))return!1;return!0}static checkEquals(g,d){const m=[];let b=!1;for(const E of o.editorOptionsRegistry){const y=!a._deepEquals(g._read(E.id),d._read(E.id));m[E.id]=y,y&&(b=!0)}return b?new o.ConfigurationChangedEvent(m):null}static applyUpdate(g,d){let m=!1;for(const b of o.editorOptionsRegistry)if(d.hasOwnProperty(b.name)){const E=b.applyUpdate(g[b.name],d[b.name]);g[b.name]=E.newValue,m=m||E.didChange}return m}}function n(h){const g=k.deepClone(h);return(0,v.migrateOptions)(g),g}}),define(ne[1945],re([1,0,6,92,2,55,51,1320,28,8,7]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextKeyService=e.AbstractContextKeyService=e.Context=void 0;const C="data-keybinding-context";class o{constructor(m,b){this._id=m,this._parent=b,this._value=Object.create(null),this._value._contextId=m}setValue(m,b){return this._value[m]!==b?(this._value[m]=b,!0):!1}removeValue(m){return m in this._value?(delete this._value[m],!0):!1}getValue(m){const b=this._value[m];return typeof b=="undefined"&&this._parent?this._parent.getValue(m):b}updateParent(m){this._parent=m}collectAllValues(){let m=this._parent?this._parent.collectAllValues():Object.create(null);return m={...m,...this._value},delete m._contextId,m}}e.Context=o;class c extends o{constructor(){super(-1,null)}setValue(m,b){return!1}removeValue(m){return!1}getValue(m){}collectAllValues(){return Object.create(null)}}c.INSTANCE=new c;class i extends o{constructor(m,b,E){super(m,null);this._configurationService=b,this._values=A.TernarySearchTree.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(y=>{if(y.source===6){const T=Array.from(f.Iterable.map(this._values,([R])=>R));this._values.clear(),E.fire(new l(T))}else{const T=[];for(const R of y.affectedKeys){const O=`config.${R}`,x=this._values.findSuperstr(O);x!==void 0&&(T.push(...f.Iterable.map(x,([F])=>F)),this._values.deleteSuperstr(O)),this._values.has(O)&&(T.push(O),this._values.delete(O))}E.fire(new l(T))}})}dispose(){this._listener.dispose()}getValue(m){if(m.indexOf(i._keyPrefix)!==0)return super.getValue(m);if(this._values.has(m))return this._values.get(m);const b=m.substr(i._keyPrefix.length),E=this._configurationService.getValue(b);let y;switch(typeof E){case"number":case"boolean":case"string":y=E;break;default:Array.isArray(E)?y=JSON.stringify(E):y=E}return this._values.set(m,y),y}setValue(m,b){return super.setValue(m,b)}removeValue(m){return super.removeValue(m)}collectAllValues(){const m=Object.create(null);return this._values.forEach((b,E)=>m[E]=b),{...m,...super.collectAllValues()}}}i._keyPrefix="config.";class S{constructor(m,b,E){this._service=m,this._key=b,this._defaultValue=E,this.reset()}set(m){this._service.setContext(this._key,m)}reset(){typeof this._defaultValue=="undefined"?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class s{constructor(m){this.key=m}affectsSome(m){return m.has(this.key)}}class l{constructor(m){this.keys=m}affectsSome(m){for(const b of this.keys)if(m.has(b))return!0;return!1}}class r{constructor(m){this.events=m}affectsSome(m){for(const b of this.events)if(b.affectsSome(m))return!0;return!1}}class p{constructor(m){this._onDidChangeContext=new t.PauseableEmitter({merge:b=>new r(b)}),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=m}get contextId(){return this._myContextId}createKey(m,b){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new S(this,m,b)}bufferChangeEvents(m){this._onDidChangeContext.pause();try{m()}finally{this._onDidChangeContext.resume()}}createScoped(m){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new a(this,m)}createOverlay(m=f.Iterable.empty()){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new h(this,m)}contextMatchesRules(m){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const b=this.getContextValuesContainer(this._myContextId);return m?m.evaluate(b):!0}getContextKeyValue(m){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(m)}setContext(m,b){if(this._isDisposed)return;const E=this.getContextValuesContainer(this._myContextId);!E||E.setValue(m,b)&&this._onDidChangeContext.fire(new s(m))}removeContext(m){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(m)&&this._onDidChangeContext.fire(new s(m))}getContext(m){return this._isDisposed?c.INSTANCE:this.getContextValuesContainer(g(m))}}e.AbstractContextKeyService=p;let u=class extends p{constructor(m){super(0);this._contexts=new Map,this._toDispose=new _.DisposableStore,this._lastContextId=0;const b=new i(this._myContextId,m,this._onDidChangeContext);this._contexts.set(this._myContextId,b),this._toDispose.add(b)}dispose(){this._onDidChangeContext.dispose(),this._isDisposed=!0,this._toDispose.dispose()}getContextValuesContainer(m){return this._isDisposed?c.INSTANCE:this._contexts.get(m)||c.INSTANCE}createChildContext(m=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");let b=++this._lastContextId;return this._contexts.set(b,new o(b,this.getContextValuesContainer(m))),b}disposeContext(m){this._isDisposed||this._contexts.delete(m)}updateParent(m){throw new Error("Cannot update parent of root ContextKeyService")}};u=Ee([W(0,w.IConfigurationService)],u),e.ContextKeyService=u;class a extends p{constructor(m,b){super(m.createChildContext());if(this._parentChangeListener=new _.MutableDisposable,this._parent=m,this._updateParentChangeListener(),this._domNode=b,this._domNode.hasAttribute(C)){let E="";this._domNode.classList&&(E=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${E?": "+E:""}`)}this._domNode.setAttribute(C,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(this._onDidChangeContext.fire,this._onDidChangeContext)}dispose(){this._isDisposed||(this._onDidChangeContext.dispose(),this._parent.disposeContext(this._myContextId),this._parentChangeListener.dispose(),this._domNode.removeAttribute(C),this._isDisposed=!0)}getContextValuesContainer(m){return this._isDisposed?c.INSTANCE:this._parent.getContextValuesContainer(m)}createChildContext(m=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(m)}disposeContext(m){this._isDisposed||this._parent.disposeContext(m)}updateParent(m){const b=this._parent.getContextValuesContainer(this._myContextId),E=b.collectAllValues();this._parent=m,this._updateParentChangeListener();const y=this._parent.getContextValuesContainer(this._parent.contextId);b.updateParent(y);const T=b.collectAllValues(),R={...(0,k.distinct)(E,T),...(0,k.distinct)(T,E)},O=Object.keys(R);this._onDidChangeContext.fire(new l(O))}}class n{constructor(m,b){this.parent=m,this.overlay=b}getValue(m){return this.overlay.has(m)?this.overlay.get(m):this.parent.getValue(m)}}class h{constructor(m,b){this.parent=m,this.overlay=new Map(b)}get contextId(){return this.parent.contextId}get onDidChangeContext(){return this.parent.onDidChangeContext}bufferChangeEvents(m){this.parent.bufferChangeEvents(m)}createKey(){throw new Error("Not supported.")}getContext(m){return new n(this.parent.getContext(m),this.overlay)}getContextValuesContainer(m){const b=this.parent.getContextValuesContainer(m);return new n(b,this.overlay)}contextMatchesRules(m){const b=this.getContextValuesContainer(this.contextId);return m?m.evaluate(b):!0}getContextKeyValue(m){return this.overlay.has(m)?this.overlay.get(m):this.parent.getContextKeyValue(m)}createScoped(){throw new Error("Not supported.")}createOverlay(m=f.Iterable.empty()){return new h(this,m)}updateParent(){throw new Error("Not supported.")}dispose(){}}function g(d){for(;d;){if(d.hasAttribute(C)){const m=d.getAttribute(C);return m?parseInt(m,10):NaN}d=d.parentElement}return 0}I.CommandsRegistry.registerCommand(v.SET_CONTEXT_COMMAND_ID,function(d,m,b){d.get(v.IContextKeyService).createKey(String(m),b)}),I.CommandsRegistry.registerCommand({id:"getContextKeyInfo",handler(){return[...v.RawContextKey.all()].sort((d,m)=>d.key.localeCompare(m.key))},description:{description:(0,D.localize)(0,null),args:[]}}),I.CommandsRegistry.registerCommand("_generateContextKeyInfo",function(){const d=[],m=new Set;for(let b of v.RawContextKey.all())m.has(b.key)||(m.add(b.key),d.push(b));d.sort((b,E)=>b.key.localeCompare(E.key)),console.log(JSON.stringify(d,void 0,2))})}),define(ne[141],re([1,0,14,1321,7]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputFocusedContext=e.InputFocusedContextKey=e.IsDevelopmentContext=e.IsIOSContext=e.IsMacNativeContext=e.IsWebContext=e.IsWindowsContext=e.IsLinuxContext=e.IsMacContext=void 0,e.IsMacContext=new _.RawContextKey("isMac",t.isMacintosh,(0,f.localize)(0,null)),e.IsLinuxContext=new _.RawContextKey("isLinux",t.isLinux,(0,f.localize)(1,null)),e.IsWindowsContext=new _.RawContextKey("isWindows",t.isWindows,(0,f.localize)(2,null)),e.IsWebContext=new _.RawContextKey("isWeb",t.isWeb,(0,f.localize)(3,null)),e.IsMacNativeContext=new _.RawContextKey("isMacNative",t.isMacintosh&&!t.isWeb,(0,f.localize)(4,null)),e.IsIOSContext=new _.RawContextKey("isIOS",t.isIOS,(0,f.localize)(5,null)),e.IsDevelopmentContext=new _.RawContextKey("isDevelopment",!1,!0),e.InputFocusedContextKey="inputFocus",e.InputFocusedContext=new _.RawContextKey(e.InputFocusedContextKey,!1,(0,f.localize)(6,null))}),define(ne[37],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IContextMenuService=e.IContextViewService=void 0,e.IContextViewService=(0,t.createDecorator)("contextViewService"),e.IContextMenuService=(0,t.createDecorator)("contextMenuService")}),define(ne[349],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryCredentialsProvider=e.ICredentialsMainService=e.ICredentialsService=void 0,e.ICredentialsService=(0,t.createDecorator)("credentialsService"),e.ICredentialsMainService=(0,t.createDecorator)("credentialsMainService");class f{constructor(){this.secretVault={}}async getPassword(A,k){return this.secretVault[A]?.[k]??null}async setPassword(A,k,D){this.secretVault[A]=this.secretVault[A]??{},this.secretVault[A][k]=D}async deletePassword(A,k){return this.secretVault[A]?.[k]?(delete this.secretVault[A][k],Object.keys(this.secretVault[A]).length===0&&delete this.secretVault[A],!0):!1}async findPassword(A){return JSON.stringify(this.secretVault[A])??null}async findCredentials(A){const k=[];for(const D of Object.keys(this.secretVault[A]||{}))k.push({account:D,password:this.secretVault[A][D]});return k}async clear(){this.secretVault={}}}e.InMemoryCredentialsProvider=f}),define(ne[397],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtensionHostDebugService=void 0,e.IExtensionHostDebugService=(0,t.createDecorator)("extensionHostDebugService")}),define(ne[549],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NullDiagnosticsService=e.isRemoteDiagnosticError=e.IDiagnosticsService=e.ID=void 0,e.ID="diagnosticsService",e.IDiagnosticsService=(0,t.createDecorator)(e.ID);function f(A){return!!A.hostName&&!!A.errorMessage}e.isRemoteDiagnosticError=f;class _{async getPerformanceInfo(k,D){return{}}async getSystemInfo(k,D){return{processArgs:"nullProcessArgs",gpuStatus:"nullGpuStatus",screenReader:"nullScreenReader",remoteData:[],os:"nullOs",memory:"nullMemory",vmHint:"nullVmHint"}}async getDiagnostics(k,D){return""}async getWorkspaceFileExtensions(k){return{extensions:[]}}async reportWorkspaceStats(k){}}e.NullDiagnosticsService=_}),define(ne[54],re([1,0,19,1322,5]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getFileNamesMessage=e.ConfirmResult=e.IFileDialogService=e.IDialogService=void 0,e.IDialogService=(0,_.createDecorator)("dialogService"),e.IFileDialogService=(0,_.createDecorator)("fileDialogService");var A;(function(I){I[I.SAVE=0]="SAVE",I[I.DONT_SAVE=1]="DONT_SAVE",I[I.CANCEL=2]="CANCEL"})(A=e.ConfirmResult||(e.ConfirmResult={}));const k=10;function D(I){const w=[];return w.push(...I.slice(0,k).map(v=>typeof v=="string"?v:(0,t.basename)(v))),I.length>k&&(I.length-k==1?w.push((0,f.localize)(0,null)):w.push((0,f.localize)(1,null,I.length-k))),w.push(""),w.join(` `)}e.getFileNamesMessage=D}),define(ne[398],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDownloadService=void 0,e.IDownloadService=(0,t.createDecorator)("downloadService")}),define(ne[85],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INativeEnvironmentService=e.IEnvironmentService=void 0,e.IEnvironmentService=(0,t.createDecorator)("environmentService"),e.INativeEnvironmentService=(0,t.refineServiceDecorator)(e.IEnvironmentService)}),define(ne[79],re([1,0,1323,5]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtensionManagementCLIService=e.PreferencesLocalizedLabel=e.PreferencesLabel=e.ExtensionsChannelId=e.ExtensionsLocalizedLabel=e.ExtensionsLabel=e.IExtensionTipsService=e.IGlobalExtensionEnablementService=e.ENABLED_EXTENSIONS_STORAGE_PATH=e.DISABLED_EXTENSIONS_STORAGE_PATH=e.IExtensionManagementService=e.ExtensionManagementError=e.ExtensionManagementErrorCode=e.IExtensionGalleryService=e.InstallOperation=e.StatisticType=e.SortOrder=e.SortBy=e.isIExtensionIdentifier=e.getFallbackTargetPlarforms=e.isTargetPlatformCompatible=e.isNotWebExtensionInWebTargetPlatform=e.getTargetPlatform=e.toTargetPlatform=e.TargetPlatformToString=e.WEB_EXTENSION_TAG=e.EXTENSION_IDENTIFIER_REGEX=e.EXTENSION_IDENTIFIER_PATTERN=void 0,e.EXTENSION_IDENTIFIER_PATTERN="^([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$",e.EXTENSION_IDENTIFIER_REGEX=new RegExp(e.EXTENSION_IDENTIFIER_PATTERN),e.WEB_EXTENSION_TAG="__web_extension";function _(l){switch(l){case"win32-x64":return"Windows 64 bit";case"win32-ia32":return"Windows 32 bit";case"win32-arm64":return"Windows ARM";case"linux-x64":return"Linux 64 bit";case"linux-arm64":return"Linux ARM 64";case"linux-armhf":return"Linux ARM";case"alpine-x64":return"Alpine Linux 64 bit";case"alpine-arm64":return"Alpine ARM 64";case"darwin-x64":return"Mac";case"darwin-arm64":return"Mac Silicon";case"web":return"Web";case"universal":return"universal";case"unknown":return"unknown";case"undefined":return"undefined"}}e.TargetPlatformToString=_;function A(l){switch(l){case"win32-x64":return"win32-x64";case"win32-ia32":return"win32-ia32";case"win32-arm64":return"win32-arm64";case"linux-x64":return"linux-x64";case"linux-arm64":return"linux-arm64";case"linux-armhf":return"linux-armhf";case"alpine-x64":return"alpine-x64";case"alpine-arm64":return"alpine-arm64";case"darwin-x64":return"darwin-x64";case"darwin-arm64":return"darwin-arm64";case"web":return"web";case"universal":return"universal";default:return"unknown"}}e.toTargetPlatform=A;function k(l,r){switch(l){case 3:return r==="x64"?"win32-x64":r==="ia32"?"win32-ia32":r==="arm64"?"win32-arm64":"unknown";case 2:return r==="x64"?"linux-x64":r==="arm64"?"linux-arm64":r==="arm"?"linux-armhf":"unknown";case"alpine":return r==="x64"?"alpine-x64":r==="arm64"?"alpine-arm64":"unknown";case 1:return r==="x64"?"darwin-x64":r==="arm64"?"darwin-arm64":"unknown";case 0:return"web"}}e.getTargetPlatform=k;function D(l,r){return r==="web"&&!l.includes("web")}e.isNotWebExtensionInWebTargetPlatform=D;function I(l,r,p){return D(r,p)?!1:l==="undefined"||l==="universal"?!0:l==="unknown"?!1:l===p?!0:w(p).includes(l)}e.isTargetPlatformCompatible=I;function w(l){switch(l){case"win32-x64":return["win32-ia32"];case"win32-arm64":return["win32-ia32"]}return[]}e.getFallbackTargetPlarforms=w;function v(l){return l&&typeof l=="object"&&typeof l.id=="string"&&(!l.uuid||typeof l.uuid=="string")}e.isIExtensionIdentifier=v;var C;(function(l){l[l.NoneOrRelevance=0]="NoneOrRelevance",l[l.LastUpdatedDate=1]="LastUpdatedDate",l[l.Title=2]="Title",l[l.PublisherName=3]="PublisherName",l[l.InstallCount=4]="InstallCount",l[l.PublishedDate=10]="PublishedDate",l[l.AverageRating=6]="AverageRating",l[l.WeightedRating=12]="WeightedRating"})(C=e.SortBy||(e.SortBy={}));var o;(function(l){l[l.Default=0]="Default",l[l.Ascending=1]="Ascending",l[l.Descending=2]="Descending"})(o=e.SortOrder||(e.SortOrder={}));var c;(function(l){l.Install="install",l.Uninstall="uninstall"})(c=e.StatisticType||(e.StatisticType={}));var i;(function(l){l[l.None=1]="None",l[l.Install=2]="Install",l[l.Update=3]="Update",l[l.Migrate=4]="Migrate"})(i=e.InstallOperation||(e.InstallOperation={})),e.IExtensionGalleryService=(0,f.createDecorator)("extensionGalleryService");var S;(function(l){l.Unsupported="Unsupported",l.UnsupportedPreRelease="UnsupportedPreRelease",l.Malicious="Malicious",l.Incompatible="Incompatible",l.IncompatiblePreRelease="IncompatiblePreRelease",l.IncompatibleTargetPlatform="IncompatibleTargetPlatform",l.ReleaseVersionNotFound="ReleaseVersionNotFound",l.Invalid="Invalid",l.Download="Download",l.Extract="Extract",l.Delete="Delete",l.Rename="Rename",l.CorruptZip="CorruptZip",l.IncompleteZip="IncompleteZip",l.Internal="Internal"})(S=e.ExtensionManagementErrorCode||(e.ExtensionManagementErrorCode={}));class s extends Error{constructor(r,p){super(r);this.code=p,this.name=p}}e.ExtensionManagementError=s,e.IExtensionManagementService=(0,f.createDecorator)("extensionManagementService"),e.DISABLED_EXTENSIONS_STORAGE_PATH="extensionsIdentifiers/disabled",e.ENABLED_EXTENSIONS_STORAGE_PATH="extensionsIdentifiers/enabled",e.IGlobalExtensionEnablementService=(0,f.createDecorator)("IGlobalExtensionEnablementService"),e.IExtensionTipsService=(0,f.createDecorator)("IExtensionTipsService"),e.ExtensionsLabel=(0,t.localize)(0,null),e.ExtensionsLocalizedLabel={value:e.ExtensionsLabel,original:"Extensions"},e.ExtensionsChannelId="extensions",e.PreferencesLabel=(0,t.localize)(1,null),e.PreferencesLocalizedLabel={value:e.PreferencesLabel,original:"Preferences"},e.IExtensionManagementCLIService=(0,f.createDecorator)("IExtensionManagementCLIService")}),define(ne[729],re([1,0,6,2,51,9,654,79]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionTipsChannel=e.ExtensionManagementChannelClient=e.ExtensionManagementChannel=void 0;function I(S,s){return A.URI.revive(s?s.transformIncoming(S):S)}function w(S,s){return s?s.transformOutgoingURI(S):S}function v(S,s){s=s||k.DefaultURITransformer;const l=S.manifest;return{...(0,k.transformAndReviveIncomingURIs)({...S,manifest:void 0},s),manifest:l}}function C(S,s){return s?(0,_.cloneAndChange)(S,l=>l instanceof A.URI?s.transformOutgoingURI(l):void 0):S}class o{constructor(s,l){this.service=s,this.getUriTransformer=l,this.onInstallExtension=t.Event.buffer(s.onInstallExtension,!0),this.onDidInstallExtensions=t.Event.buffer(s.onDidInstallExtensions,!0),this.onUninstallExtension=t.Event.buffer(s.onUninstallExtension,!0),this.onDidUninstallExtension=t.Event.buffer(s.onDidUninstallExtension,!0)}listen(s,l){const r=this.getUriTransformer(s);switch(l){case"onInstallExtension":return this.onInstallExtension;case"onDidInstallExtensions":return t.Event.map(this.onDidInstallExtensions,p=>p.map(u=>({...u,local:u.local?C(u.local,r):u.local})));case"onUninstallExtension":return this.onUninstallExtension;case"onDidUninstallExtension":return this.onDidUninstallExtension}throw new Error("Invalid listen")}call(s,l,r){const p=this.getUriTransformer(s);switch(l){case"zip":return this.service.zip(v(r[0],p)).then(u=>w(u,p));case"unzip":return this.service.unzip(I(r[0],p));case"install":return this.service.install(I(r[0],p),r[1]);case"getManifest":return this.service.getManifest(I(r[0],p));case"getTargetPlatform":return this.service.getTargetPlatform();case"canInstall":return this.service.canInstall(r[0]);case"installFromGallery":return this.service.installFromGallery(r[0],r[1]);case"uninstall":return this.service.uninstall(v(r[0],p),r[1]);case"reinstallFromGallery":return this.service.reinstallFromGallery(v(r[0],p));case"getInstalled":return this.service.getInstalled(r[0]).then(u=>u.map(a=>C(a,p)));case"updateMetadata":return this.service.updateMetadata(v(r[0],p),r[1]).then(u=>C(u,p));case"updateExtensionScope":return this.service.updateExtensionScope(v(r[0],p),r[1]).then(u=>C(u,p));case"getExtensionsControlManifest":return this.service.getExtensionsControlManifest()}throw new Error("Invalid call")}}e.ExtensionManagementChannel=o;class c extends f.Disposable{constructor(s){super();this.channel=s,this._onInstallExtension=this._register(new t.Emitter),this.onInstallExtension=this._onInstallExtension.event,this._onDidInstallExtensions=this._register(new t.Emitter),this.onDidInstallExtensions=this._onDidInstallExtensions.event,this._onUninstallExtension=this._register(new t.Emitter),this.onUninstallExtension=this._onUninstallExtension.event,this._onDidUninstallExtension=this._register(new t.Emitter),this.onDidUninstallExtension=this._onDidUninstallExtension.event,this._register(this.channel.listen("onInstallExtension")(l=>this._onInstallExtension.fire({identifier:l.identifier,source:this.isUriComponents(l.source)?A.URI.revive(l.source):l.source}))),this._register(this.channel.listen("onDidInstallExtensions")(l=>this._onDidInstallExtensions.fire(l.map(r=>({...r,local:r.local?v(r.local,null):r.local,source:this.isUriComponents(r.source)?A.URI.revive(r.source):r.source}))))),this._register(this.channel.listen("onUninstallExtension")(l=>this._onUninstallExtension.fire(l))),this._register(this.channel.listen("onDidUninstallExtension")(l=>this._onDidUninstallExtension.fire(l)))}isUriComponents(s){return s?typeof s.path=="string"&&typeof s.scheme=="string":!1}getTargetPlatform(){return this._targetPlatformPromise||(this._targetPlatformPromise=this.channel.call("getTargetPlatform")),this._targetPlatformPromise}async canInstall(s){const l=await this.getTargetPlatform();return s.allTargetPlatforms.some(r=>(0,D.isTargetPlatformCompatible)(r,s.allTargetPlatforms,l))}zip(s){return Promise.resolve(this.channel.call("zip",[s]).then(l=>A.URI.revive(l)))}unzip(s){return Promise.resolve(this.channel.call("unzip",[s]))}install(s,l){return Promise.resolve(this.channel.call("install",[s,l])).then(r=>v(r,null))}getManifest(s){return Promise.resolve(this.channel.call("getManifest",[s]))}installFromGallery(s,l){return Promise.resolve(this.channel.call("installFromGallery",[s,l])).then(r=>v(r,null))}uninstall(s,l){return Promise.resolve(this.channel.call("uninstall",[s,l]))}reinstallFromGallery(s){return Promise.resolve(this.channel.call("reinstallFromGallery",[s]))}getInstalled(s=null){return Promise.resolve(this.channel.call("getInstalled",[s])).then(l=>l.map(r=>v(r,null)))}updateMetadata(s,l){return Promise.resolve(this.channel.call("updateMetadata",[s,l])).then(r=>v(r,null))}updateExtensionScope(s,l){return Promise.resolve(this.channel.call("updateExtensionScope",[s,l])).then(r=>v(r,null))}getExtensionsControlManifest(){return Promise.resolve(this.channel.call("getExtensionsControlManifest"))}registerParticipant(){throw new Error("Not Supported")}}e.ExtensionManagementChannelClient=c;class i{constructor(s){this.service=s}listen(s,l){throw new Error("Invalid listen")}call(s,l,r){switch(l){case"getConfigBasedTips":return this.service.getConfigBasedTips(A.URI.revive(r[0]));case"getImportantExecutableBasedTips":return this.service.getImportantExecutableBasedTips();case"getOtherExecutableBasedTips":return this.service.getOtherExecutableBasedTips();case"getAllWorkspacesTips":return this.service.getAllWorkspacesTips()}throw new Error("Invalid call")}}e.ExtensionTipsChannel=i}),define(ne[730],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtensionUrlTrustService=void 0,e.IExtensionUrlTrustService=(0,t.createDecorator)("extensionUrlTrustService")}),define(ne[399],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtensionRecommendationNotificationService=e.RecommendationsNotificationResult=e.RecommendationSourceToString=e.RecommendationSource=void 0;var f;(function(k){k[k.FILE=1]="FILE",k[k.WORKSPACE=2]="WORKSPACE",k[k.EXE=3]="EXE"})(f=e.RecommendationSource||(e.RecommendationSource={}));function _(k){switch(k){case 1:return"file";case 2:return"workspace";case 3:return"exe"}}e.RecommendationSourceToString=_;var A;(function(k){k.Ignored="ignored",k.Cancelled="cancelled",k.TooMany="toomany",k.IncompatibleWindow="incompatibleWindow",k.Accepted="reacted"})(A=e.RecommendationsNotificationResult||(e.RecommendationsNotificationResult={})),e.IExtensionRecommendationNotificationService=(0,t.createDecorator)("IExtensionRecommendationNotificationService")}),define(ne[731],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ipcExtensionHostStarterChannelName=e.IExtensionHostStarter=void 0,e.IExtensionHostStarter=(0,t.createDecorator)("extensionHostStarter"),e.ipcExtensionHostStarterChannelName="extensionHostStarter"}),define(ne[732],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExternalTerminalMainService=e.DEFAULT_TERMINAL_OSX=e.IExternalTerminalService=void 0,e.IExternalTerminalService=(0,t.createDecorator)("externalTerminal"),e.DEFAULT_TERMINAL_OSX="Terminal.app",e.IExternalTerminalMainService=(0,t.createDecorator)("externalTerminal")}),define(ne[23],re([1,0,22,55,48,29,13,9,1328,5]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getPlatformLimits=e.Arch=e.ByteSize=e.FALLBACK_MAX_MEMORY_SIZE_MB=e.MIN_MAX_MEMORY_SIZE_MB=e.whenProviderRegistered=e.etag=e.ETAG_DISABLED=e.FileKind=e.FILES_EXCLUDE_CONFIG=e.FILES_ASSOCIATIONS_CONFIG=e.HotExitConfiguration=e.AutoSaveConfiguration=e.FileOperationResult=e.NotModifiedSinceFileOperationError=e.FileOperationError=e.isParent=e.FileChangesEvent=e.FileChangeType=e.FileOperationEvent=e.FileOperation=e.toFileOperationResult=e.toFileSystemProviderErrorCode=e.markAsFileSystemProviderError=e.ensureFileSystemProviderError=e.createFileSystemProviderError=e.FileSystemProviderError=e.FileSystemProviderErrorCode=e.hasFileAtomicReadCapability=e.hasFileReadStreamCapability=e.hasOpenReadWriteCloseCapability=e.hasFileCloneCapability=e.hasFileFolderCopyCapability=e.hasReadWriteCapability=e.FileSystemProviderCapabilities=e.FilePermission=e.FileType=e.isFileOpenForWriteOptions=e.IFileService=void 0,e.IFileService=(0,w.createDecorator)("fileService");function v(z){return z.create===!0}e.isFileOpenForWriteOptions=v;var C;(function(z){z[z.Unknown=0]="Unknown",z[z.File=1]="File",z[z.Directory=2]="Directory",z[z.SymbolicLink=64]="SymbolicLink"})(C=e.FileType||(e.FileType={}));var o;(function(z){z[z.Readonly=1]="Readonly"})(o=e.FilePermission||(e.FilePermission={}));var c;(function(z){z[z.FileReadWrite=2]="FileReadWrite",z[z.FileOpenReadWriteClose=4]="FileOpenReadWriteClose",z[z.FileReadStream=16]="FileReadStream",z[z.FileFolderCopy=8]="FileFolderCopy",z[z.PathCaseSensitive=1024]="PathCaseSensitive",z[z.Readonly=2048]="Readonly",z[z.Trash=4096]="Trash",z[z.FileWriteUnlock=8192]="FileWriteUnlock",z[z.FileAtomicRead=16384]="FileAtomicRead",z[z.FileClone=32768]="FileClone"})(c=e.FileSystemProviderCapabilities||(e.FileSystemProviderCapabilities={}));function i(z){return!!(z.capabilities&2)}e.hasReadWriteCapability=i;function S(z){return!!(z.capabilities&8)}e.hasFileFolderCopyCapability=S;function s(z){return!!(z.capabilities&32768)}e.hasFileCloneCapability=s;function l(z){return!!(z.capabilities&4)}e.hasOpenReadWriteCloseCapability=l;function r(z){return!!(z.capabilities&16)}e.hasFileReadStreamCapability=r;function p(z){return i(z)?!!(z.capabilities&16384):!1}e.hasFileAtomicReadCapability=p;var u;(function(z){z.FileExists="EntryExists",z.FileNotFound="EntryNotFound",z.FileNotADirectory="EntryNotADirectory",z.FileIsADirectory="EntryIsADirectory",z.FileExceedsMemoryLimit="EntryExceedsMemoryLimit",z.FileTooLarge="EntryTooLarge",z.FileWriteLocked="EntryWriteLocked",z.NoPermissions="NoPermissions",z.Unavailable="Unavailable",z.Unknown="Unknown"})(u=e.FileSystemProviderErrorCode||(e.FileSystemProviderErrorCode={}));class a extends Error{constructor(U,H){super(U);this.code=H}}e.FileSystemProviderError=a;function n(z,U){const H=new a(z.toString(),U);return g(H,U),H}e.createFileSystemProviderError=n;function h(z){return z||n((0,I.localize)(0,null),u.Unknown)}e.ensureFileSystemProviderError=h;function g(z,U){return z.name=U?`${U} (FileSystemError)`:"FileSystemError",z}e.markAsFileSystemProviderError=g;function d(z){if(!z)return u.Unknown;if(z instanceof a)return z.code;const U=/^(.+) \(FileSystemError\)$/.exec(z.name);if(!U)return u.Unknown;switch(U[1]){case u.FileExists:return u.FileExists;case u.FileIsADirectory:return u.FileIsADirectory;case u.FileNotADirectory:return u.FileNotADirectory;case u.FileNotFound:return u.FileNotFound;case u.FileExceedsMemoryLimit:return u.FileExceedsMemoryLimit;case u.FileTooLarge:return u.FileTooLarge;case u.FileWriteLocked:return u.FileWriteLocked;case u.NoPermissions:return u.NoPermissions;case u.Unavailable:return u.Unavailable}return u.Unknown}e.toFileSystemProviderErrorCode=d;function m(z){if(z instanceof O)return z.fileOperationResult;switch(d(z)){case u.FileNotFound:return 1;case u.FileIsADirectory:return 0;case u.FileNotADirectory:return 10;case u.FileWriteLocked:return 5;case u.NoPermissions:return 6;case u.FileExists:return 4;case u.FileExceedsMemoryLimit:return 9;case u.FileTooLarge:return 7;default:return 11}}e.toFileOperationResult=m;var b;(function(z){z[z.CREATE=0]="CREATE",z[z.DELETE=1]="DELETE",z[z.MOVE=2]="MOVE",z[z.COPY=3]="COPY",z[z.WRITE=4]="WRITE"})(b=e.FileOperation||(e.FileOperation={}));class E{constructor(U,H,K){this.resource=U,this.operation=H,this.target=K}isOperation(U){return this.operation===U}}e.FileOperationEvent=E;var y;(function(z){z[z.UPDATED=0]="UPDATED",z[z.ADDED=1]="ADDED",z[z.DELETED=2]="DELETED"})(y=e.FileChangeType||(e.FileChangeType={}));class T{constructor(U,H){this.added=void 0,this.updated=void 0,this.deleted=void 0,this.rawChanges=[],this.rawAdded=[],this.rawUpdated=[],this.rawDeleted=[],this.rawChanges=U;const K=new Map;for(const G of U){const q=K.get(G.type);switch(q?q.push([G.resource,G]):K.set(G.type,[[G.resource,G]]),G.type){case 1:this.rawAdded.push(G.resource);break;case 0:this.rawUpdated.push(G.resource);break;case 2:this.rawDeleted.push(G.resource);break}}for(const[G,q]of K)switch(G){case 1:this.added=f.TernarySearchTree.forUris(()=>H),this.added.fill(q);break;case 0:this.updated=f.TernarySearchTree.forUris(()=>H),this.updated.fill(q);break;case 2:this.deleted=f.TernarySearchTree.forUris(()=>H),this.deleted.fill(q);break}}contains(U,...H){return this.doContains(U,{includeChildren:!1},...H)}affects(U,...H){return this.doContains(U,{includeChildren:!0},...H)}doContains(U,H,...K){if(!U)return!1;const G=K.length>0;return!!((!G||K.includes(1))&&(this.added?.get(U)||H.includeChildren&&this.added?.findSuperstr(U))||(!G||K.includes(0))&&(this.updated?.get(U)||H.includeChildren&&this.updated?.findSuperstr(U))||(!G||K.includes(2))&&(this.deleted?.findSubstr(U)||H.includeChildren&&this.deleted?.findSuperstr(U)))}gotAdded(){return!!this.added}gotDeleted(){return!!this.deleted}gotUpdated(){return!!this.updated}}e.FileChangesEvent=T;function R(z,U,H){return!z||!U||z===U||U.length>z.length?!1:(U.charAt(U.length-1)!==_.sep&&(U+=_.sep),H?(0,A.startsWithIgnoreCase)(z,U):z.indexOf(U)===0)}e.isParent=R;class O extends t.ErrorNoTelemetry{constructor(U,H,K){super(U);this.fileOperationResult=H,this.options=K}}e.FileOperationError=O;class x extends O{constructor(U,H,K){super(U,2,K);this.stat=H}}e.NotModifiedSinceFileOperationError=x;var F;(function(z){z[z.FILE_IS_DIRECTORY=0]="FILE_IS_DIRECTORY",z[z.FILE_NOT_FOUND=1]="FILE_NOT_FOUND",z[z.FILE_NOT_MODIFIED_SINCE=2]="FILE_NOT_MODIFIED_SINCE",z[z.FILE_MODIFIED_SINCE=3]="FILE_MODIFIED_SINCE",z[z.FILE_MOVE_CONFLICT=4]="FILE_MOVE_CONFLICT",z[z.FILE_WRITE_LOCKED=5]="FILE_WRITE_LOCKED",z[z.FILE_PERMISSION_DENIED=6]="FILE_PERMISSION_DENIED",z[z.FILE_TOO_LARGE=7]="FILE_TOO_LARGE",z[z.FILE_INVALID_PATH=8]="FILE_INVALID_PATH",z[z.FILE_EXCEEDS_MEMORY_LIMIT=9]="FILE_EXCEEDS_MEMORY_LIMIT",z[z.FILE_NOT_DIRECTORY=10]="FILE_NOT_DIRECTORY",z[z.FILE_OTHER_ERROR=11]="FILE_OTHER_ERROR"})(F=e.FileOperationResult||(e.FileOperationResult={})),e.AutoSaveConfiguration={OFF:"off",AFTER_DELAY:"afterDelay",ON_FOCUS_CHANGE:"onFocusChange",ON_WINDOW_CHANGE:"onWindowChange"},e.HotExitConfiguration={OFF:"off",ON_EXIT:"onExit",ON_EXIT_AND_WINDOW_CLOSE:"onExitAndWindowClose"},e.FILES_ASSOCIATIONS_CONFIG="files.associations",e.FILES_EXCLUDE_CONFIG="files.exclude";var L;(function(z){z[z.FILE=0]="FILE",z[z.FOLDER=1]="FOLDER",z[z.ROOT_FOLDER=2]="ROOT_FOLDER"})(L=e.FileKind||(e.FileKind={})),e.ETAG_DISABLED="";function M(z){if(!(typeof z.size!="number"||typeof z.mtime!="number"))return z.mtime.toString(29)+z.size.toString(31)}e.etag=M;async function N(z,U){if(!U.hasProvider(D.URI.from({scheme:z.scheme})))return new Promise(H=>{const K=U.onDidChangeFileSystemProviderRegistrations(G=>{G.scheme===z.scheme&&G.added&&(K.dispose(),H())})})}e.whenProviderRegistered=N,e.MIN_MAX_MEMORY_SIZE_MB=2048,e.FALLBACK_MAX_MEMORY_SIZE_MB=4096;class B{static formatSize(U){return(0,k.isNumber)(U)||(U=0),U<B.KB?(0,I.localize)(1,null,U.toFixed(0)):U<B.MB?(0,I.localize)(2,null,(U/B.KB).toFixed(2)):U<B.GB?(0,I.localize)(3,null,(U/B.MB).toFixed(2)):U<B.TB?(0,I.localize)(4,null,(U/B.GB).toFixed(2)):(0,I.localize)(5,null,(U/B.TB).toFixed(2))}}e.ByteSize=B,B.KB=1024,B.MB=B.KB*B.KB,B.GB=B.MB*B.KB,B.TB=B.GB*B.KB;var P;(function(z){z[z.IA32=0]="IA32",z[z.OTHER=1]="OTHER"})(P=e.Arch||(e.Arch={}));function V(z){return{maxFileSize:z===0?300*B.MB:16*B.GB,maxHeapSize:z===0?700*B.MB:2*700*B.MB}}e.getPlatformLimits=V}),define(ne[1946],re([1,0,1326,9,60,6,2,18,48,14,19,206,23,396]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HTMLFileSystemProvider=void 0;class i{constructor(s,l,r){this.indexedDB=s,this.store=l,this.logService=r,this.onDidChangeCapabilities=A.Event.None,this.onDidChangeFile=A.Event.None,this.extUri=w.isLinux?v.extUri:v.extUriIgnorePathCase,this._files=new Map,this._directories=new Map}get capabilities(){return this._capabilities||(this._capabilities=2|16,w.isLinux&&(this._capabilities|=1024)),this._capabilities}async stat(s){try{const l=await this.getHandle(s);if(!l)throw this.createFileSystemProviderError(s,"No such file or directory, stat",o.FileSystemProviderErrorCode.FileNotFound);if(c.WebFileSystemAccess.isFileSystemFileHandle(l)){const r=await l.getFile();return{type:o.FileType.File,mtime:r.lastModified,ctime:0,size:r.size}}return{type:o.FileType.Directory,mtime:0,ctime:0,size:0}}catch(l){throw this.toFileSystemProviderError(l)}}async readdir(s){try{const l=await this.getDirectoryHandle(s);if(!l)throw this.createFileSystemProviderError(s,"No such file or directory, readdir",o.FileSystemProviderErrorCode.FileNotFound);const r=[];for await(const[p,u]of l)r.push([p,c.WebFileSystemAccess.isFileSystemFileHandle(u)?o.FileType.File:o.FileType.Directory]);return r}catch(l){throw this.toFileSystemProviderError(l)}}readFileStream(s,l,r){const p=(0,C.newWriteableStream)(u=>_.VSBuffer.concat(u.map(a=>_.VSBuffer.wrap(a))).buffer,{highWaterMark:10});return(async()=>{try{const u=await this.getFileHandle(s);if(!u)throw this.createFileSystemProviderError(s,"No such file or directory, readFile",o.FileSystemProviderErrorCode.FileNotFound);const a=await u.getFile();if(typeof l.length=="number"||typeof l.position=="number"){let n=new Uint8Array(await a.arrayBuffer());typeof l?.position=="number"&&(n=n.slice(l.position)),typeof l?.length=="number"&&(n=n.slice(0,l.length)),p.end(n)}else{const n=a.stream().getReader();let h=await n.read();for(;!h.done&&!(r.isCancellationRequested||(await p.write(h.value),r.isCancellationRequested));)h=await n.read();p.end(void 0)}}catch(u){p.error(this.toFileSystemProviderError(u)),p.end()}})(),p}async readFile(s){try{const l=await this.getFileHandle(s);if(!l)throw this.createFileSystemProviderError(s,"No such file or directory, readFile",o.FileSystemProviderErrorCode.FileNotFound);const r=await l.getFile();return new Uint8Array(await r.arrayBuffer())}catch(l){throw this.toFileSystemProviderError(l)}}async writeFile(s,l,r){try{let p=await this.getFileHandle(s);if(!r.create||!r.overwrite){if(p){if(!r.overwrite)throw this.createFileSystemProviderError(s,"File already exists, writeFile",o.FileSystemProviderErrorCode.FileExists)}else if(!r.create)throw this.createFileSystemProviderError(s,"No such file, writeFile",o.FileSystemProviderErrorCode.FileNotFound)}if(!p){const a=await this.getDirectoryHandle(this.extUri.dirname(s));if(!a)throw this.createFileSystemProviderError(s,"No such parent directory, writeFile",o.FileSystemProviderErrorCode.FileNotFound);if(p=await a.getFileHandle(this.extUri.basename(s),{create:!0}),!p)throw this.createFileSystemProviderError(s,"Unable to create file , writeFile",o.FileSystemProviderErrorCode.Unknown)}const u=await p.createWritable();await u.write(l),await u.close()}catch(p){throw this.toFileSystemProviderError(p)}}async mkdir(s){try{const l=await this.getDirectoryHandle(this.extUri.dirname(s));if(!l)throw this.createFileSystemProviderError(s,"No such parent directory, mkdir",o.FileSystemProviderErrorCode.FileNotFound);await l.getDirectoryHandle(this.extUri.basename(s),{create:!0})}catch(l){throw this.toFileSystemProviderError(l)}}async delete(s,l){try{const r=await this.getDirectoryHandle(this.extUri.dirname(s));if(!r)throw this.createFileSystemProviderError(s,"No such parent directory, delete",o.FileSystemProviderErrorCode.FileNotFound);return r.removeEntry(this.extUri.basename(s),{recursive:l.recursive})}catch(r){throw this.toFileSystemProviderError(r)}}async rename(s,l,r){try{if(this.extUri.isEqual(s,l))return;let p=await this.getFileHandle(s);if(p){const u=await p.getFile(),a=new Uint8Array(await u.arrayBuffer());await this.writeFile(l,a,{create:!0,overwrite:r.overwrite,unlock:!1}),await this.delete(s,{recursive:!1,useTrash:!1})}else throw this.createFileSystemProviderError(s,(0,t.localize)(0,null),o.FileSystemProviderErrorCode.Unavailable)}catch(p){throw this.toFileSystemProviderError(p)}}watch(s,l){return k.Disposable.None}registerFileHandle(s){return this.registerHandle(s,this._files)}registerDirectoryHandle(s){return this.registerHandle(s,this._directories)}get directories(){return this._directories.values()}async registerHandle(s,l){let r=`/${s.name}`;if(l.has(r)&&!await l.get(r)?.isSameEntry(s)){const p=(0,I.extname)(s.name),u=(0,I.basename)(s.name,p);let a=1;do r=`/${u}-${a++}${p}`;while(l.has(r)&&!await l.get(r)?.isSameEntry(s))}l.set(r,s);try{await this.indexedDB?.runInTransaction(this.store,"readwrite",p=>p.put(s,r))}catch(p){this.logService.error(p)}return f.URI.from({scheme:D.Schemas.file,path:r})}async getHandle(s){let l=await this.doGetHandle(s);if(!l){const r=await this.getDirectoryHandle(this.extUri.dirname(s));if(r){const p=v.extUri.basename(s);try{l=await r.getFileHandle(p)}catch{try{l=await r.getDirectoryHandle(p)}catch{}}}}return l}async getFileHandle(s){const l=await this.doGetHandle(s);if(l instanceof FileSystemFileHandle)return l;const r=await this.getDirectoryHandle(this.extUri.dirname(s));try{return await r?.getFileHandle(v.extUri.basename(s))}catch{return}}async getDirectoryHandle(s){const l=await this.doGetHandle(s);if(l instanceof FileSystemDirectoryHandle)return l;const r=this.extUri.dirname(s);if(this.extUri.isEqual(r,s))return;const p=await this.getDirectoryHandle(r);try{return await p?.getDirectoryHandle(v.extUri.basename(s))}catch{return}}async doGetHandle(s){if(this.extUri.dirname(s).path!=="/")return;const l=s.path.replace(/\/$/,""),r=this._files.get(l)??this._directories.get(l);if(r)return r;const p=await this.indexedDB?.runInTransaction(this.store,"readonly",u=>u.get(l));if(c.WebFileSystemAccess.isFileSystemHandle(p)){let u=await p.queryPermission()==="granted";try{u||(u=await p.requestPermission()==="granted")}catch(a){this.logService.error(a)}if(u)return c.WebFileSystemAccess.isFileSystemFileHandle(p)?this._files.set(l,p):c.WebFileSystemAccess.isFileSystemDirectoryHandle(p)&&this._directories.set(l,p),p}throw this.createFileSystemProviderError(s,"No file system handle registered",o.FileSystemProviderErrorCode.Unavailable)}toFileSystemProviderError(s){if(s instanceof o.FileSystemProviderError)return s;let l=o.FileSystemProviderErrorCode.Unknown;return s.name==="NotAllowedError"&&(s=new Error((0,t.localize)(1,null)),l=o.FileSystemProviderErrorCode.Unavailable),(0,o.createFileSystemProviderError)(s,l)}createFileSystemProviderError(s,l,r){return(0,o.createFileSystemProviderError)(new Error(`${l} (${(0,I.normalize)(s.path)})`),r)}}e.HTMLFileSystemProvider=i}),define(ne[733],re([1,0,60,130,22,6,2,206,9,89,23]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiskFileSystemProviderClient=e.LOCAL_FILE_SYSTEM_CHANNEL_NAME=void 0,e.LOCAL_FILE_SYSTEM_CHANNEL_NAME="localFilesystem";class C extends k.Disposable{constructor(c,i){super();this.channel=c,this.extraCapabilities=i,this.onDidChangeCapabilities=A.Event.None,this._onDidChange=this._register(new A.Emitter),this.onDidChangeFile=this._onDidChange.event,this._onDidWatchError=this._register(new A.Emitter),this.onDidWatchError=this._onDidWatchError.event,this.sessionId=(0,w.generateUuid)(),this.registerFileChangeListeners()}get capabilities(){return this._capabilities||(this._capabilities=2|4|16|8|8192|16384|32768,this.extraCapabilities.pathCaseSensitive&&(this._capabilities|=1024),this.extraCapabilities.trash&&(this._capabilities|=4096)),this._capabilities}stat(c){return this.channel.call("stat",[c])}readdir(c){return this.channel.call("readdir",[c])}async readFile(c,i){const{buffer:S}=await this.channel.call("readFile",[c,i]);return S}readFileStream(c,i,S){const s=(0,D.newWriteableStream)(r=>t.VSBuffer.concat(r.map(p=>t.VSBuffer.wrap(p))).buffer),l=this.channel.listen("readFileStream",[c,i])(r=>{if(r instanceof t.VSBuffer)s.write(r.buffer);else{if(r==="end")s.end();else{let p=r;p instanceof Error||(p=(0,v.createFileSystemProviderError)((0,f.toErrorMessage)(p),v.FileSystemProviderErrorCode.Unknown)),s.error(p),s.end()}l.dispose()}});return S.onCancellationRequested(()=>{s.error((0,_.canceled)()),s.end(),l.dispose()}),s}writeFile(c,i,S){return this.channel.call("writeFile",[c,t.VSBuffer.wrap(i),S])}open(c,i){return this.channel.call("open",[c,i])}close(c){return this.channel.call("close",[c])}async read(c,i,S,s,l){const[r,p]=await this.channel.call("read",[c,i,l]);return S.set(r.buffer.slice(0,p),s),p}write(c,i,S,s,l){return this.channel.call("write",[c,i,t.VSBuffer.wrap(S),s,l])}mkdir(c){return this.channel.call("mkdir",[c])}delete(c,i){return this.channel.call("delete",[c,i])}rename(c,i,S){return this.channel.call("rename",[c,i,S])}copy(c,i,S){return this.channel.call("copy",[c,i,S])}cloneFile(c,i){return this.channel.call("cloneFile",[c,i])}registerFileChangeListeners(){this._register(this.channel.listen("fileChange",[this.sessionId])(c=>{if(Array.isArray(c)){const i=c;this._onDidChange.fire(i.map(S=>({resource:I.URI.revive(S.resource),type:S.type})))}else{const i=c;this._onDidWatchError.fire(i)}}))}watch(c,i){const S=(0,w.generateUuid)();return this.channel.call("watch",[this.sessionId,S,c,i]),(0,k.toDisposable)(()=>this.channel.call("unwatch",[this.sessionId,S]))}}e.DiskFileSystemProviderClient=C}),define(ne[1947],re([1,0,60,22,1329,23]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readFileIntoStream=void 0;async function k(v,C,o,c,i,S){let s;try{await D(v,C,o,c,i,S)}catch(l){s=l}finally{s&&i.errorTransformer&&(s=i.errorTransformer(s)),typeof s!="undefined"&&o.error(s),o.end()}}e.readFileIntoStream=k;async function D(v,C,o,c,i,S){I(S);const s=await v.open(C,{create:!1});try{I(S);let l=0,r=0,p=i&&typeof i.length=="number"?i.length:void 0,u=t.VSBuffer.alloc(Math.min(i.bufferSize,typeof p=="number"?p:i.bufferSize)),a=i&&typeof i.position=="number"?i.position:0,n=0;do r=await v.read(s,a,u.buffer,n,u.byteLength-n),a+=r,n+=r,l+=r,typeof p=="number"&&(p-=r),n===u.byteLength&&(await o.write(c(u)),u=t.VSBuffer.alloc(Math.min(i.bufferSize,typeof p=="number"?p:i.bufferSize)),n=0);while(r>0&&(typeof p!="number"||p>0)&&I(S)&&w(l,i));if(n>0){let h=n;typeof p=="number"&&(h=Math.min(n,p)),o.write(c(u.slice(0,h)))}}catch(l){throw(0,A.ensureFileSystemProviderError)(l)}finally{await v.close(s)}}function I(v){if(v.isCancellationRequested)throw(0,f.canceled)();return!0}function w(v,C){if(C?.limits){if(typeof C.limits.memory=="number"&&v>C.limits.memory)throw(0,A.createFileSystemProviderError)((0,_.localize)(0,null),A.FileSystemProviderErrorCode.FileExceedsMemoryLimit);if(typeof C.limits.size=="number"&&v>C.limits.size)throw(0,A.createFileSystemProviderError)((0,_.localize)(1,null),A.FileSystemProviderErrorCode.FileTooLarge)}return!0}}),define(ne[734],re([1,0,2,14,9,23]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.coalesceEvents=e.toFileChanges=e.AbstractUniversalWatcherClient=e.AbstractNonRecursiveWatcherClient=e.AbstractWatcherClient=e.isRecursiveWatchRequest=void 0;function k(c){return c.recursive===!0}e.isRecursiveWatchRequest=k;class D extends t.Disposable{constructor(i,S,s,l){super();this.onFileChanges=i,this.onLogMessage=S,this.verboseLogging=s,this.options=l,this.watcherDisposables=this._register(new t.MutableDisposable),this.requests=void 0,this.restartCounter=0}init(){const i=new t.DisposableStore;this.watcherDisposables.value=i,this.watcher=this.createWatcher(i),this.watcher.setVerboseLogging(this.verboseLogging),i.add(this.watcher.onDidChangeFile(S=>this.onFileChanges(S))),i.add(this.watcher.onDidLogMessage(S=>this.onLogMessage(S))),i.add(this.watcher.onDidError(S=>this.onError(S)))}onError(i){this.options.restartOnError?this.restartCounter<D.MAX_RESTARTS&&this.requests?(this.error(`restarting watcher after error: ${i}`),this.restart(this.requests)):this.error(`gave up attempting to restart watcher after error: ${i}`):this.error(i)}restart(i){this.restartCounter++,this.init(),this.watch(i)}async watch(i){this.requests=i,await this.watcher?.watch(i)}async setVerboseLogging(i){this.verboseLogging=i,await this.watcher?.setVerboseLogging(i)}error(i){this.onLogMessage({type:"error",message:`[File Watcher (${this.options.type})] ${i}`})}dispose(){return this.watcher=void 0,super.dispose()}}e.AbstractWatcherClient=D,D.MAX_RESTARTS=5;class I extends D{constructor(i,S,s){super(i,S,s,{type:"node.js",restartOnError:!1})}}e.AbstractNonRecursiveWatcherClient=I;class w extends D{constructor(i,S,s){super(i,S,s,{type:"universal",restartOnError:!0})}}e.AbstractUniversalWatcherClient=w;function v(c){return c.map(i=>({type:i.type,resource:_.URI.file(i.path)}))}e.toFileChanges=v;function C(c){const i=new o;for(const S of c)i.processEvent(S);return i.coalesce()}e.coalesceEvents=C;class o{constructor(){this.coalesced=new Set,this.mapPathToChange=new Map}toKey(i){return f.isLinux?i.path:i.path.toLowerCase()}processEvent(i){const S=this.mapPathToChange.get(this.toKey(i));let s=!1;if(S){const l=S.type,r=i.type;S.path!==i.path&&(i.type===2||i.type===1)?s=!0:l===1&&r===2?(this.mapPathToChange.delete(this.toKey(i)),this.coalesced.delete(S)):l===2&&r===1?S.type=0:l===1&&r===0||(S.type=r)}else s=!0;s&&(this.coalesced.add(i),this.mapPathToChange.set(this.toKey(i),i))}coalesce(){const i=[],S=[];return Array.from(this.coalesced).filter(s=>s.type!==2?(i.push(s),!1):!0).sort((s,l)=>s.path.length-l.path.length).filter(s=>S.some(l=>(0,A.isParent)(s.path,l,!f.isLinux))?!1:(S.push(s.path),!0)).concat(i)}}}),define(ne[155],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServiceCollection=void 0;class t{constructor(..._){this._entries=new Map;for(let[A,k]of _)this.set(A,k)}set(_,A){const k=this._entries.get(_);return this._entries.set(_,A),k}has(_){return this._entries.has(_)}get(_){return this._entries.get(_)}}e.ServiceCollection=t}),define(ne[1948],re([1,0,11,22,99,1935,5,155]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Trace=e.InstantiationService=void 0;const I=!1;class w extends Error{constructor(i){super("cyclic dependency between services");this.message=i.findCycleSlow()??`UNABLE to detect cycle, dumping graph: ${i.toString()}`}}class v{constructor(i=new D.ServiceCollection,S=!1,s){this._activeInstantiations=new Set,this._services=i,this._strict=S,this._parent=s,this._services.set(k.IInstantiationService,this)}createChild(i){return new v(i,this._strict,this)}invokeFunction(i,...S){let s=o.traceInvocation(i),l=!1;try{return i({get:p=>{if(l)throw(0,f.illegalState)("service accessor is only valid during the invocation of its target method");const u=this._getOrCreateServiceInstance(p,s);if(!u)throw new Error(`[invokeFunction] unknown service '${p}'`);return u}},...S)}finally{l=!0,s.stop()}}createInstance(i,...S){let s,l;return i instanceof _.SyncDescriptor?(s=o.traceCreation(i.ctor),l=this._createInstance(i.ctor,i.staticArguments.concat(S),s)):(s=o.traceCreation(i),l=this._createInstance(i,S,s)),s.stop(),l}_createInstance(i,S=[],s){let l=k._util.getServiceDependencies(i).sort((u,a)=>u.index-a.index),r=[];for(const u of l){let a=this._getOrCreateServiceInstance(u.id,s);a||this._throwIfStrict(`[createInstance] ${i.name} depends on UNKNOWN service ${u.id}.`,!1),r.push(a)}let p=l.length>0?l[0].index:S.length;if(S.length!==p){console.trace(`[createInstance] First service dependency of ${i.name} at position ${p+1} conflicts with ${S.length} static arguments`);let u=p-S.length;u>0?S=S.concat(new Array(u)):S=S.slice(0,p)}return new i(...[...S,...r])}_setServiceInstance(i,S){if(this._services.get(i)instanceof _.SyncDescriptor)this._services.set(i,S);else if(this._parent)this._parent._setServiceInstance(i,S);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(i){let S=this._services.get(i);return!S&&this._parent?this._parent._getServiceInstanceOrDescriptor(i):S}_getOrCreateServiceInstance(i,S){let s=this._getServiceInstanceOrDescriptor(i);return s instanceof _.SyncDescriptor?this._safeCreateAndCacheServiceInstance(i,s,S.branch(i,!0)):(S.branch(i,!1),s)}_safeCreateAndCacheServiceInstance(i,S,s){if(this._activeInstantiations.has(i))throw new Error(`illegal state - RECURSIVELY instantiating service '${i}'`);this._activeInstantiations.add(i);try{return this._createAndCacheServiceInstance(i,S,s)}finally{this._activeInstantiations.delete(i)}}_createAndCacheServiceInstance(i,S,s){const l=new A.Graph(u=>u.id.toString());let r=0;const p=[{id:i,desc:S,_trace:s}];for(;p.length;){const u=p.pop();if(l.lookupOrInsertNode(u),r++>1e3)throw new w(l);for(let a of k._util.getServiceDependencies(u.desc.ctor)){let n=this._getServiceInstanceOrDescriptor(a.id);if(n||this._throwIfStrict(`[createInstance] ${i} depends on ${a.id} which is NOT registered.`,!0),n instanceof _.SyncDescriptor){const h={id:a.id,desc:n,_trace:u._trace.branch(a.id,!0)};l.insertEdge(u,h),p.push(h)}}}for(;;){const u=l.roots();if(u.length===0){if(!l.isEmpty())throw new w(l);break}for(const{data:a}of u){if(this._getServiceInstanceOrDescriptor(a.id)instanceof _.SyncDescriptor){const h=this._createServiceInstanceWithOwner(a.id,a.desc.ctor,a.desc.staticArguments,a.desc.supportsDelayedInstantiation,a._trace);this._setServiceInstance(a.id,h)}l.removeNode(a)}}return this._getServiceInstanceOrDescriptor(i)}_createServiceInstanceWithOwner(i,S,s=[],l,r){if(this._services.get(i)instanceof _.SyncDescriptor)return this._createServiceInstance(S,s,l,r);if(this._parent)return this._parent._createServiceInstanceWithOwner(i,S,s,l,r);throw new Error(`illegalState - creating UNKNOWN service instance ${S.name}`)}_createServiceInstance(i,S=[],s,l){if(s){const r=new t.IdleValue(()=>this._createInstance(i,S,l));return new Proxy(Object.create(null),{get(p,u){if(u in p)return p[u];let a=r.value,n=a[u];return typeof n!="function"||(n=n.bind(a),p[u]=n),n},set(p,u,a){return r.value[u]=a,!0}})}else return this._createInstance(i,S,l)}_throwIfStrict(i,S){if(S&&console.warn(S),this._strict)throw new Error(i)}}e.InstantiationService=v;var C;(function(c){c[c.Creation=0]="Creation",c[c.Invocation=1]="Invocation",c[c.Branch=2]="Branch"})(C||(C={}));class o{constructor(i,S){this.type=i,this.name=S,this._start=Date.now(),this._dep=[]}static traceInvocation(i){return I?new o(1,i.name||i.toString().substring(0,42).replace(/\n/g,"")):o._None}static traceCreation(i){return I?new o(0,i.name):o._None}branch(i,S){let s=new o(2,i.toString());return this._dep.push([i,S,s]),s}stop(){let i=Date.now()-this._start;o._totals+=i;let S=!1;function s(r,p){let u=[],a=new Array(r+1).join(" ");for(const[n,h,g]of p._dep)if(h&&g){S=!0,u.push(`${a}CREATES -> ${n}`);let d=s(r+1,g);d&&u.push(d)}else u.push(`${a}uses -> ${n}`);return u.join(` `)}let l=[`${this.type===0?"CREATE":"CALL"} ${this.name}`,`${s(1,this)}`,`DONE, took ${i.toFixed(2)}ms (grand total ${o._totals.toFixed(2)}ms)`];(i>2||S)&&console.log(l.join(` `))}}e.Trace=o,o._None=new class extends o{constructor(){super(-1,null)}stop(){}branch(){return this}},o._totals=0}),define(ne[1949],re([1,0,2,976]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElectronIPCMainProcessService=void 0;class _ extends t.Disposable{constructor(k){super();this.mainProcessConnection=this._register(new f.Client(`window:${k}`))}getChannel(k){return this.mainProcessConnection.getChannel(k)}registerChannel(k,D){this.mainProcessConnection.registerChannel(k,D)}}e.ElectronIPCMainProcessService=_}),define(ne[103],re([1,0,171,99,35,5]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerSharedProcessRemoteService=e.ISharedProcessService=e.registerMainProcessRemoteService=e.IMainProcessService=void 0;class k{constructor(c,i,S){const s=S.getChannel(c);return D(i)?new i.channelClientCtor(s):t.ProxyChannel.toService(s,i?.proxyOptions)}}function D(o){return!!o?.channelClientCtor}e.IMainProcessService=(0,A.createDecorator)("mainProcessService");let I=class extends k{constructor(c,i,S){super(c,i,S)}};I=Ee([W(2,e.IMainProcessService)],I);function w(o,c,i){(0,_.registerSingleton)(o,new f.SyncDescriptor(I,[c,i],i?.supportsDelayedInstantiation))}e.registerMainProcessRemoteService=w,e.ISharedProcessService=(0,A.createDecorator)("sharedProcessService");let v=class extends k{constructor(c,i,S){super(c,i,S)}};v=Ee([W(2,e.ISharedProcessService)],v);function C(o,c,i){(0,_.registerSingleton)(o,new f.SyncDescriptor(v,[c,i],i?.supportsDelayedInstantiation))}e.registerSharedProcessRemoteService=C}),define(ne[1950],re([1,0,549,103]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,f.registerSharedProcessRemoteService)(t.IDiagnosticsService,"diagnostics",{supportsDelayedInstantiation:!0})}),define(ne[1951],re([1,0,5,103]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExternalTerminalMainService=void 0,e.IExternalTerminalMainService=(0,t.createDecorator)("externalTerminal"),(0,f.registerMainProcessRemoteService)(e.IExternalTerminalMainService,"externalTerminal",{supportsDelayedInstantiation:!0})}),define(ne[735],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IIssueService=void 0,e.IIssueService=(0,t.createDecorator)("issueService")}),define(ne[1952],re([1,0,15,11,6,2,1331]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractKeybindingService=void 0;const D=/^(cursor|delete)/;class I extends A.Disposable{constructor(C,o,c,i,S){super();this._contextKeyService=C,this._commandService=o,this._telemetryService=c,this._notificationService=i,this._logService=S,this._onDidUpdateKeybindings=this._register(new _.Emitter),this._currentChord=null,this._currentChordChecker=new f.IntervalTimer,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=w.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new f.TimeoutTimer,this._logging=!1}get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:_.Event.None}get inChordMode(){return!!this._currentChord}dispose(){super.dispose()}getDefaultKeybindingsContent(){return""}toggleLogging(){return this._logging=!this._logging,this._logging}_log(C){this._logging&&this._logService.info(`[KeybindingService]: ${C}`)}getDefaultKeybindings(){return this._getResolver().getDefaultKeybindings()}getKeybindings(){return this._getResolver().getKeybindings()}customKeybindingsCount(){return 0}lookupKeybindings(C){return t.coalesce(this._getResolver().lookupKeybindings(C).map(o=>o.resolvedKeybinding))}lookupKeybinding(C,o){const c=this._getResolver().lookupPrimaryKeybinding(C,o||this._contextKeyService);if(!!c)return c.resolvedKeybinding}dispatchEvent(C,o){return this._dispatch(C,o)}softDispatch(C,o){const c=this.resolveKeyboardEvent(C);if(c.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),null;const[i]=c.getDispatchParts();if(i===null)return null;const S=this._contextKeyService.getContext(o),s=this._currentChord?this._currentChord.keypress:null;return this._getResolver().resolve(S,s,i)}_enterChordMode(C,o){this._currentChord={keypress:C,label:o},this._currentChordStatusMessage=this._notificationService.status(k.localize(0,null,o));const c=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-c>5e3&&this._leaveChordMode()},500)}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null}dispatchByUserSettingsLabel(C,o){this._log(`/ Dispatching keybinding triggered via menu entry accelerator - ${C}`);const c=this.resolveUserBinding(C);c.length===0?this._log(`\\ Could not resolve - ${C}`):this._doDispatch(c[0],o,!1)}_dispatch(C,o){return this._doDispatch(this.resolveKeyboardEvent(C),o,!1)}_singleModifierDispatch(C,o){const c=this.resolveKeyboardEvent(C),[i]=c.getSingleModifierDispatchParts();if(i)return this._ignoreSingleModifiers.has(i)?(this._log(`+ Ignoring single modifier ${i} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=w.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=w.EMPTY,this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${i}.`),this._currentSingleModifier=i,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):i===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${i} ${i}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(c,o,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${i}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[S]=c.getParts();return this._ignoreSingleModifiers=new w(S),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(C,o,c=!1){let i=!1;if(C.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),!1;let S=null,s=null;if(c){const[u]=C.getSingleModifierDispatchParts();S=u,s=u}else[S]=C.getDispatchParts(),s=this._currentChord?this._currentChord.keypress:null;if(S===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),i;const l=this._contextKeyService.getContext(o),r=C.getLabel(),p=this._getResolver().resolve(l,s,S);return this._logService.trace("KeybindingService#dispatch",r,p?.commandId),p&&p.enterChord?(i=!0,this._enterChordMode(S,r),i):(this._currentChord&&(!p||!p.commandId)&&(this._notificationService.status(k.localize(1,null,this._currentChord.label,r),{hideAfter:10*1e3}),i=!0),this._leaveChordMode(),p&&p.commandId&&(p.bubble||(i=!0),typeof p.commandArgs=="undefined"?this._commandService.executeCommand(p.commandId).then(void 0,u=>this._notificationService.warn(u)):this._commandService.executeCommand(p.commandId,p.commandArgs).then(void 0,u=>this._notificationService.warn(u)),D.test(p.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:p.commandId,from:"keybinding"})),i)}mightProducePrintableCharacter(C){return C.ctrlKey||C.metaKey?!1:C.keyCode>=31&&C.keyCode<=56||C.keyCode>=21&&C.keyCode<=30}}e.AbstractKeybindingService=I;class w{constructor(C){this._ctrlKey=C?C.ctrlKey:!1,this._shiftKey=C?C.shiftKey:!1,this._altKey=C?C.altKey:!1,this._metaKey=C?C.metaKey:!1}has(C){switch(C){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}w.EMPTY=new w(null)}),define(ne[550],re([1,0,22,309,222]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseResolvedKeybinding=void 0;class A extends _.ResolvedKeybinding{constructor(D,I){super();if(I.length===0)throw(0,t.illegalArgument)("parts");this._os=D,this._parts=I}getLabel(){return f.UILabelProvider.toLabel(this._os,this._parts,D=>this._getLabel(D))}getAriaLabel(){return f.AriaLabelProvider.toLabel(this._os,this._parts,D=>this._getAriaLabel(D))}getElectronAccelerator(){return this._parts.length>1||this._parts[0].isDuplicateModifierCase()?null:f.ElectronAcceleratorLabelProvider.toLabel(this._os,this._parts,D=>this._getElectronAccelerator(D))}getUserSettingsLabel(){return f.UserSettingsLabelProvider.toLabel(this._os,this._parts,D=>this._getUserSettingsLabel(D))}isWYSIWYG(){return this._parts.every(D=>this._isWYSIWYG(D))}isChord(){return this._parts.length>1}getParts(){return this._parts.map(D=>this._getPart(D))}_getPart(D){return new _.ResolvedKeybindingPart(D.ctrlKey,D.shiftKey,D.altKey,D.metaKey,this._getLabel(D),this._getAriaLabel(D))}getDispatchParts(){return this._parts.map(D=>this._getDispatchPart(D))}getSingleModifierDispatchParts(){return this._parts.map(D=>this._getSingleModifierDispatchPart(D))}}e.BaseResolvedKeybinding=A}),define(ne[38],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IKeybindingService=e.KeybindingSource=void 0;var f;(function(_){_[_.Default=1]="Default",_[_.User=2]="User"})(f=e.KeybindingSource||(e.KeybindingSource={})),e.IKeybindingService=(0,t.createDecorator)("keybindingService")}),define(ne[1953],re([1,0,7]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingResolver=void 0;class f{constructor(D,I,w){this._log=w,this._defaultKeybindings=D,this._defaultBoundCommands=new Map;for(const v of D){const C=v.command;C&&C.charAt(0)!=="-"&&this._defaultBoundCommands.set(C,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=f.handleRemovals([].concat(D).concat(I));for(let v=0,C=this._keybindings.length;v<C;v++){let o=this._keybindings[v];o.keypressParts.length!==0&&(o.when&&o.when.type===0||this._addKeyPress(o.keypressParts[0],o))}}static _isTargetedForRemoval(D,I,w,v){return!(I&&D.keypressParts[0]!==I||w&&D.keypressParts[1]!==w||v&&(!D.when||!(0,t.expressionsAreEqualWithConstantSubstitution)(v,D.when)))}static handleRemovals(D){const I=new Map;for(let v=0,C=D.length;v<C;v++){const o=D[v];if(o.command&&o.command.charAt(0)==="-"){const c=o.command.substring(1);I.has(c)?I.get(c).push(o):I.set(c,[o])}}if(I.size===0)return D;const w=[];for(let v=0,C=D.length;v<C;v++){const o=D[v];if(!o.command||o.command.length===0){w.push(o);continue}if(o.command.charAt(0)==="-")continue;const c=I.get(o.command);if(!c||!o.isDefault){w.push(o);continue}let i=!1;for(const S of c){const s=S.keypressParts[0],l=S.keypressParts[1],r=S.when;if(this._isTargetedForRemoval(o,s,l,r)){i=!0;break}}if(!i){w.push(o);continue}}return w}_addKeyPress(D,I){const w=this._map.get(D);if(typeof w=="undefined"){this._map.set(D,[I]),this._addToLookupMap(I);return}for(let v=w.length-1;v>=0;v--){let C=w[v];if(C.command===I.command)continue;const o=C.keypressParts.length>1,c=I.keypressParts.length>1;o&&c&&C.keypressParts[1]!==I.keypressParts[1]||f.whenIsEntirelyIncluded(C.when,I.when)&&this._removeFromLookupMap(C)}w.push(I),this._addToLookupMap(I)}_addToLookupMap(D){if(!D.command)return;let I=this._lookupMap.get(D.command);typeof I=="undefined"?(I=[D],this._lookupMap.set(D.command,I)):I.push(D)}_removeFromLookupMap(D){if(!D.command)return;let I=this._lookupMap.get(D.command);if(typeof I!="undefined"){for(let w=0,v=I.length;w<v;w++)if(I[w]===D){I.splice(w,1);return}}}static whenIsEntirelyIncluded(D,I){return!I||I.type===1?!0:!D||D.type===1?!1:(0,t.implies)(D,I)}getDefaultBoundCommands(){return this._defaultBoundCommands}getDefaultKeybindings(){return this._defaultKeybindings}getKeybindings(){return this._keybindings}lookupKeybindings(D){let I=this._lookupMap.get(D);if(typeof I=="undefined"||I.length===0)return[];let w=[],v=0;for(let C=I.length-1;C>=0;C--)w[v++]=I[C];return w}lookupPrimaryKeybinding(D,I){const w=this._lookupMap.get(D);if(typeof w=="undefined"||w.length===0)return null;if(w.length===1)return w[0];for(let v=w.length-1;v>=0;v--){const C=w[v];if(I.contextMatchesRules(C.when))return C}return w[w.length-1]}resolve(D,I,w){this._log(`| Resolving ${w}${I?` chorded from ${I}`:""}`);let v=null;if(I!==null){const o=this._map.get(I);if(typeof o=="undefined")return this._log("\\ No keybinding entries."),null;v=[];for(let c=0,i=o.length;c<i;c++){let S=o[c];S.keypressParts[1]===w&&v.push(S)}}else{const o=this._map.get(w);if(typeof o=="undefined")return this._log("\\ No keybinding entries."),null;v=o}let C=this._findCommand(D,v);return C?I===null&&C.keypressParts.length>1&&C.keypressParts[1]!==null?(this._log(`\\ From ${v.length} keybinding entries, matched chord, when: ${_(C.when)}, source: ${A(C)}.`),{enterChord:!0,leaveChord:!1,commandId:null,commandArgs:null,bubble:!1}):(this._log(`\\ From ${v.length} keybinding entries, matched ${C.command}, when: ${_(C.when)}, source: ${A(C)}.`),{enterChord:!1,leaveChord:C.keypressParts.length>1,commandId:C.command,commandArgs:C.commandArgs,bubble:C.bubble}):(this._log(`\\ From ${v.length} keybinding entries, no when clauses matched the context.`),null)}_findCommand(D,I){for(let w=I.length-1;w>=0;w--){let v=I[w];if(!!f._contextMatchesRules(D,v.when))return v}return null}static _contextMatchesRules(D,I){return I?I.evaluate(D):!0}}e.KeybindingResolver=f;function _(k){return k?`${k.serialize()}`:"no when condition"}function A(k){return k.extensionId?k.isBuiltinExtension?`built-in extension ${k.extensionId}`:`user extension ${k.extensionId}`:k.isDefault?"built-in":"user"}}),define(ne[465],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeElementsAfterNulls=e.ResolvedKeybindingItem=void 0;class t{constructor(A,k,D,I,w,v,C){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=A,this.keypressParts=A?f(A.getDispatchParts()):[],A&&this.keypressParts.length===0&&(this.keypressParts=f(A.getSingleModifierDispatchParts())),this.bubble=k?k.charCodeAt(0)===94:!1,this.command=this.bubble?k.substr(1):k,this.commandArgs=D,this.when=I,this.isDefault=w,this.extensionId=v,this.isBuiltinExtension=C}}e.ResolvedKeybindingItem=t;function f(_){let A=[];for(let k=0,D=_.length;k<D;k++){const I=_[k];if(!I)return A;A.push(I)}return A}e.removeElementsAfterNulls=f}),define(ne[1954],re([1,0,97,222,550,465]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.USLayoutResolvedKeybinding=void 0;class k extends _.BaseResolvedKeybinding{constructor(I,w){super(w,I.parts)}_keyCodeToUILabel(I){if(this._os===2)switch(I){case 15:return"\u2190";case 16:return"\u2191";case 17:return"\u2192";case 18:return"\u2193"}return t.KeyCodeUtils.toString(I)}_getLabel(I){return I.isDuplicateModifierCase()?"":this._keyCodeToUILabel(I.keyCode)}_getAriaLabel(I){return I.isDuplicateModifierCase()?"":t.KeyCodeUtils.toString(I.keyCode)}_getElectronAccelerator(I){return t.KeyCodeUtils.toElectronAccelerator(I.keyCode)}_getUserSettingsLabel(I){if(I.isDuplicateModifierCase())return"";const w=t.KeyCodeUtils.toUserSettingsUS(I.keyCode);return w&&w.toLowerCase()}_isWYSIWYG(){return!0}_getDispatchPart(I){return k.getDispatchStr(I)}static getDispatchStr(I){if(I.isModifierKey())return null;let w="";return I.ctrlKey&&(w+="ctrl+"),I.shiftKey&&(w+="shift+"),I.altKey&&(w+="alt+"),I.metaKey&&(w+="meta+"),w+=t.KeyCodeUtils.toString(I.keyCode),w}_getSingleModifierDispatchPart(I){return I.keyCode===5&&!I.shiftKey&&!I.altKey&&!I.metaKey?"ctrl":I.keyCode===4&&!I.ctrlKey&&!I.altKey&&!I.metaKey?"shift":I.keyCode===6&&!I.ctrlKey&&!I.shiftKey&&!I.metaKey?"alt":I.keyCode===57&&!I.ctrlKey&&!I.shiftKey&&!I.altKey?"meta":null}static _scanCodeToKeyCode(I){const w=t.IMMUTABLE_CODE_TO_KEY_CODE[I];if(w!==-1)return w;switch(I){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 83;case 52:return 81;case 53:return 87;case 54:return 89;case 55:return 88;case 56:return 0;case 57:return 80;case 58:return 90;case 59:return 86;case 60:return 82;case 61:return 84;case 62:return 85;case 106:return 92}return 0}static _resolveSimpleUserBinding(I){if(!I)return null;if(I instanceof f.SimpleKeybinding)return I;const w=this._scanCodeToKeyCode(I.scanCode);return w===0?null:new f.SimpleKeybinding(I.ctrlKey,I.shiftKey,I.altKey,I.metaKey,w)}static resolveUserBinding(I,w){const v=(0,A.removeElementsAfterNulls)(I.map(C=>this._resolveSimpleUserBinding(C)));return v.length>0?[new k(new f.ChordKeybinding(v),w)]:[]}}e.USLayoutResolvedKeybinding=k}),define(ne[1955],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getDispatchConfig=e.DispatchConfig=void 0;var t;(function(_){_[_.Code=0]="Code",_[_.KeyCode=1]="KeyCode"})(t=e.DispatchConfig||(e.DispatchConfig={}));function f(_){const A=_.getValue("keyboard");return(A?A.dispatch:null)==="keyCode"?1:0}e.getDispatchConfig=f}),define(ne[551],re([1,0,97,5]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.macLinuxKeyboardMappingEquals=e.windowsKeyboardMappingEquals=e.getKeyboardLayoutId=e.parseKeyboardLayoutDescription=e.areKeyboardLayoutsEqual=e.IKeyboardLayoutService=void 0,e.IKeyboardLayoutService=(0,f.createDecorator)("keyboardLayoutService");function _(C,o){return!C||!o?!1:!!(C.name&&o.name&&C.name===o.name||C.id&&o.id&&C.id===o.id||C.model&&o.model&&C.model===o.model&&C.layout===o.layout)}e.areKeyboardLayoutsEqual=_;function A(C){if(!C)return{label:"",description:""};if(C.name)return{label:C.text,description:""};if(C.id){let c=C;return c.localizedName?{label:c.localizedName,description:""}:/^com\.apple\.keylayout\./.test(c.id)?{label:c.id.replace(/^com\.apple\.keylayout\./,"").replace(/-/," "),description:""}:/^.*inputmethod\./.test(c.id)?{label:c.id.replace(/^.*inputmethod\./,"").replace(/[-\.]/," "),description:`Input Method (${c.lang})`}:{label:c.lang,description:""}}return{label:C.layout,description:""}}e.parseKeyboardLayoutDescription=A;function k(C){return C.name?C.name:C.id?C.id:C.layout}e.getKeyboardLayoutId=k;function D(C,o){return!C&&!o?!0:!C||!o?!1:C.vkey===o.vkey&&C.value===o.value&&C.withShift===o.withShift&&C.withAltGr===o.withAltGr&&C.withShiftAltGr===o.withShiftAltGr}function I(C,o){if(!C&&!o)return!0;if(!C||!o)return!1;for(let c=0;c<193;c++){const i=t.ScanCodeUtils.toString(c),S=C[i],s=o[i];if(!D(S,s))return!1}return!0}e.windowsKeyboardMappingEquals=I;function w(C,o){return!C&&!o?!0:!C||!o?!1:C.value===o.value&&C.withShift===o.withShift&&C.withAltGr===o.withAltGr&&C.withShiftAltGr===o.withShiftAltGr}function v(C,o){if(!C&&!o)return!0;if(!C||!o)return!1;for(let c=0;c<193;c++){const i=t.ScanCodeUtils.toString(c),S=C[i],s=o[i];if(!w(S,s))return!1}return!0}e.macLinuxKeyboardMappingEquals=v}),define(ne[1956],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CachedKeyboardMapper=void 0;class t{constructor(_){this._actual=_,this._cache=new Map}dumpDebugInfo(){return this._actual.dumpDebugInfo()}resolveKeybinding(_){const A=_.getHashCode(),k=this._cache.get(A);if(!k){const D=this._actual.resolveKeybinding(_);return this._cache.set(A,D),D}return k}resolveKeyboardEvent(_){return this._actual.resolveKeyboardEvent(_)}resolveUserBinding(_){return this._actual.resolveUserBinding(_)}}e.CachedKeyboardMapper=t}),define(ne[45],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILabelService=void 0,e.ILabelService=(0,t.createDecorator)("labelService")}),define(ne[185],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILayoutService=void 0,e.ILayoutService=(0,t.createDecorator)("layoutService")}),define(ne[1957],re([1,0,10,112,6,2,98,8,7,185]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccessibilityService=void 0;let v=class extends A.Disposable{constructor(o,c,i){super();this._contextKeyService=o,this._layoutService=c,this._configurationService=i,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new _.Emitter,this._onDidChangeReducedMotion=new _.Emitter,this._accessibilityModeEnabledContext=k.CONTEXT_ACCESSIBILITY_MODE_ENABLED.bindTo(this._contextKeyService);const S=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(l=>{l.affectsConfiguration("editor.accessibilitySupport")&&(S(),this._onDidChangeScreenReaderOptimized.fire()),l.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())})),S(),this._register(this.onDidChangeScreenReaderOptimized(()=>S()));const s=window.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=s.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this.initReducedMotionListeners(s)}initReducedMotionListeners(o){if(!this._layoutService.hasContainer)return;this._register((0,t.addDisposableListener)(o,"change",()=>{this._systemMotionReduced=o.matches,this._configMotionReduced==="auto"&&this._onDidChangeReducedMotion.fire()}));const c=()=>{const i=this.isMotionReduced();this._layoutService.container.classList.toggle("reduce-motion",i),this._layoutService.container.classList.toggle("enable-motion",!i)};c(),this._register(this.onDidChangeReducedMotion(()=>c()))}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const o=this._configurationService.getValue("editor.accessibilitySupport");return o==="on"||o==="auto"&&this._accessibilitySupport===2}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){const o=this._configMotionReduced;return o==="on"||o==="auto"&&this._systemMotionReduced}alwaysUnderlineAccessKeys(){return Promise.resolve(!1)}getAccessibilitySupport(){return this._accessibilitySupport}setAccessibilitySupport(o){this._accessibilitySupport!==o&&(this._accessibilitySupport=o,this._onDidChangeScreenReaderOptimized.fire())}alert(o){(0,f.alert)(o)}};v=Ee([W(0,I.IContextKeyService),W(1,w.ILayoutService),W(2,D.IConfigurationService)],v),e.AccessibilityService=v}),define(ne[1958],re([1,0,663,2,185]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextViewService=void 0;let A=class extends f.Disposable{constructor(D){super();this.layoutService=D,this.currentViewDisposable=f.Disposable.None,this.container=D.hasContainer?D.container:null,this.contextView=this._register(new t.ContextView(this.container,1)),this.layout(),this._register(D.onDidLayout(()=>this.layout()))}setContainer(D,I){this.contextView.setContainer(D,I||1)}showContextView(D,I,w){I?I!==this.container&&(this.container=I,this.setContainer(I,w?3:2)):this.layoutService.hasContainer&&this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.contextView.show(D);const v=(0,f.toDisposable)(()=>{this.currentViewDisposable===v&&this.hideContextView()});return this.currentViewDisposable=v,v}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(D){this.contextView.hide(D)}};A=Ee([W(0,_.ILayoutService)],A),e.ContextViewService=A}),define(ne[1959],re([1,0,10,11]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerZIndex=e.ZIndex=void 0;var _;(function(v){v[v.Base=0]="Base",v[v.Sash=35]="Sash",v[v.SuggestWidget=40]="SuggestWidget",v[v.Hover=50]="Hover",v[v.DragImage=1e3]="DragImage",v[v.MenubarMenuItemsHolder=2e3]="MenubarMenuItemsHolder",v[v.ContextView=2500]="ContextView",v[v.ModalDialog=2600]="ModalDialog",v[v.PaneDropOverlay=1e4]="PaneDropOverlay"})(_=e.ZIndex||(e.ZIndex={}));const A=Object.keys(_).filter(v=>!isNaN(Number(v))).map(v=>Number(v)).sort((v,C)=>C-v);function k(v){for(const C of A)if(v>=C)return C;return-1}class D{constructor(){this.styleSheet=(0,t.createStyleSheet)(),this.zIndexMap=new Map,this.scheduler=new f.RunOnceScheduler(()=>this.updateStyleElement(),200)}registerZIndex(C,o,c){if(this.zIndexMap.get(c))throw new Error(`z-index with name ${c} has already been registered.`);const i=C+o;if(k(i)!==C)throw new Error(`Relative layer: ${C} + z-index: ${o} exceeds next layer ${i}.`);return this.zIndexMap.set(c,i),this.scheduler.schedule(),this.getVarName(c)}getVarName(C){return`--z-index-${C}`}updateStyleElement(){(0,t.clearNode)(this.styleSheet);let C="";this.zIndexMap.forEach((o,c)=>{C+=`${this.getVarName(c)}: ${o}; `}),(0,t.createCSSRule)(":root",C,this.styleSheet)}}const I=new D;function w(v,C,o){return I.registerZIndex(v,C,o)}e.registerZIndex=w}),define(ne[1960],re([1,0,11]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.handleVetos=void 0;function f(_,A){if(_.length===0)return Promise.resolve(!1);const k=[];let D=!1;for(let I of _){if(I===!0)return Promise.resolve(!0);(0,t.isThenable)(I)&&k.push(I.then(w=>{w&&(D=!0)},w=>{A(w),D=!0}))}return t.Promises.settled(k).then(()=>D)}e.handleVetos=f}),define(ne[736],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isValidLocalization=e.ILocalizationsService=void 0,e.ILocalizationsService=(0,t.createDecorator)("localizationsService");function f(_){if(typeof _.languageId!="string"||!Array.isArray(_.translations)||_.translations.length===0)return!1;for(const A of _.translations)if(typeof A.id!="string"||typeof A.path!="string")return!1;return!(_.languageName&&typeof _.languageName!="string"||_.localizedLanguageName&&typeof _.localizedLanguageName!="string")}e.isValidLocalization=f}),define(ne[1961],re([1,0,1333]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const f=t.localize(0,null),_=t.localize(1,null),A=t.localize(2,null);e.default={open:f,close:_,find:A}}),define(ne[1962],re([1,0,10,15,14,1961]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseWindowDriver=void 0;class k{async setValue(I,w){const v=document.querySelector(I);if(!v)return Promise.reject(new Error(`Element not found: ${I}`));const C=v;C.value=w;const o=new Event("input",{bubbles:!0,cancelable:!0});C.dispatchEvent(o)}async getTitle(){return document.title}async isActiveElement(I){if(document.querySelector(I)!==document.activeElement){const v=[];let C=document.activeElement;for(;C;){const o=C.tagName,c=C.id?`#${C.id}`:"",i=(0,f.coalesce)(C.className.split(/\s+/g).map(S=>S.trim())).map(S=>`.${S}`).join("");v.unshift(`${o}${c}${i}`),C=C.parentElement}throw new Error(`Active element not found. Current active element is '${v.join(" > ")}'. Looking for ${I}`)}return!0}async getElements(I,w){const v=document.querySelectorAll(I),C=[];for(let o=0;o<v.length;o++){const c=v.item(o);C.push(this.serializeElement(c,w))}return C}serializeElement(I,w){const v=Object.create(null);for(let i=0;i<I.attributes.length;i++){const S=I.attributes.item(i);S&&(v[S.name]=S.value)}const C=[];if(w)for(let i=0;i<I.children.length;i++){const S=I.children.item(i);S&&C.push(this.serializeElement(S,!0))}const{left:o,top:c}=(0,t.getTopLeftOffset)(I);return{tagName:I.tagName,className:I.className,textContent:I.textContent||"",attributes:v,children:C,left:o,top:c}}async getElementXY(I,w,v){const C=typeof w=="number"&&typeof v=="number"?{x:w,y:v}:void 0;return this._getElementXY(I,C)}async typeInEditor(I,w){const v=document.querySelector(I);if(!v)throw new Error(`Editor not found: ${I}`);const C=v,o=C.selectionStart,c=o+w.length,i=C.value,S=i.substr(0,o)+w+i.substr(o);C.value=S,C.setSelectionRange(c,c);const s=new Event("input",{bubbles:!0,cancelable:!0});C.dispatchEvent(s)}async getTerminalBuffer(I){const w=document.querySelector(I);if(!w)throw new Error(`Terminal not found: ${I}`);const v=w.xterm;if(!v)throw new Error(`Xterm not found: ${I}`);const C=[];for(let o=0;o<v.buffer.active.length;o++)C.push(v.buffer.active.getLine(o).translateToString(!0));return C}async writeInTerminal(I,w){const v=document.querySelector(I);if(!v)throw new Error(`Element not found: ${I}`);const C=v.xterm;if(!C)throw new Error(`Xterm not found: ${I}`);C._core.coreService.triggerDataEvent(w)}getLocaleInfo(){return Promise.resolve({language:_.language,locale:_.locale})}getLocalizedStrings(){return Promise.resolve({open:A.default.open,close:A.default.close,find:A.default.find})}async _getElementXY(I,w){const v=document.querySelector(I);if(!v)return Promise.reject(new Error(`Element not found: ${I}`));const{left:C,top:o}=(0,t.getTopLeftOffset)(v),{width:c,height:i}=(0,t.getClientArea)(v);let S,s;return w?(S=C+w.x,s=o+w.y):(S=C+c/2,s=o+i/2),S=Math.round(S),s=Math.round(s),{x:S,y:s}}}e.BaseWindowDriver=k}),define(ne[31],re([1,0,130,6,2,14,5]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LogLevelToString=e.parseLogLevel=e.getLogLevel=e.NullLogService=e.AbstractLoggerService=e.LogService=e.MultiplexLogService=e.AdapterLogger=e.ConsoleLogger=e.ConsoleMainLogger=e.AbstractMessageLogger=e.AbstractLogger=e.format=e.log=e.DEFAULT_LOG_LEVEL=e.LogLevel=e.ILoggerService=e.ILogService=void 0,e.ILogService=(0,k.createDecorator)("logService"),e.ILoggerService=(0,k.createDecorator)("loggerService");function D(){return new Date().toISOString()}var I;(function(h){h[h.Trace=0]="Trace",h[h.Debug=1]="Debug",h[h.Info=2]="Info",h[h.Warning=3]="Warning",h[h.Error=4]="Error",h[h.Critical=5]="Critical",h[h.Off=6]="Off"})(I=e.LogLevel||(e.LogLevel={})),e.DEFAULT_LOG_LEVEL=I.Info;function w(h,g,d){switch(g){case I.Trace:h.trace(d);break;case I.Debug:h.debug(d);break;case I.Info:h.info(d);break;case I.Warning:h.warn(d);break;case I.Error:h.error(d);break;case I.Critical:h.critical(d);break;default:throw new Error("Invalid log level")}}e.log=w;function v(h){let g="";for(let d=0;d<h.length;d++){let m=h[d];if(typeof m=="object")try{m=JSON.stringify(m)}catch{}g+=(d>0?" ":"")+m}return g}e.format=v;class C extends _.Disposable{constructor(){super(...arguments);this.level=e.DEFAULT_LOG_LEVEL,this._onDidChangeLogLevel=this._register(new f.Emitter),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(g){this.level!==g&&(this.level=g,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}e.AbstractLogger=C;class o extends C{constructor(g){super();this.logAlways=g}checkLogLevel(g){return this.logAlways||this.getLevel()<=g}trace(g,...d){this.checkLogLevel(I.Trace)&&this.log(I.Trace,v([g,...d]))}debug(g,...d){this.checkLogLevel(I.Debug)&&this.log(I.Debug,v([g,...d]))}info(g,...d){this.checkLogLevel(I.Info)&&this.log(I.Info,v([g,...d]))}warn(g,...d){this.checkLogLevel(I.Warning)&&this.log(I.Warning,v([g,...d]))}error(g,...d){if(this.checkLogLevel(I.Error))if(g instanceof Error){const m=Array.prototype.slice.call(arguments);m[0]=g.stack,this.log(I.Error,v(m))}else this.log(I.Error,v([g,...d]))}critical(g,...d){this.checkLogLevel(I.Critical)&&this.log(I.Critical,v([g,...d]))}flush(){}}e.AbstractMessageLogger=o;class c extends C{constructor(g=e.DEFAULT_LOG_LEVEL){super();this.setLevel(g),this.useColors=!A.isWindows}trace(g,...d){this.getLevel()<=I.Trace&&(this.useColors?console.log(`[90m[main ${D()}][0m`,g,...d):console.log(`[main ${D()}]`,g,...d))}debug(g,...d){this.getLevel()<=I.Debug&&(this.useColors?console.log(`[90m[main ${D()}][0m`,g,...d):console.log(`[main ${D()}]`,g,...d))}info(g,...d){this.getLevel()<=I.Info&&(this.useColors?console.log(`[90m[main ${D()}][0m`,g,...d):console.log(`[main ${D()}]`,g,...d))}warn(g,...d){this.getLevel()<=I.Warning&&(this.useColors?console.warn(`[93m[main ${D()}][0m`,g,...d):console.warn(`[main ${D()}]`,g,...d))}error(g,...d){this.getLevel()<=I.Error&&(this.useColors?console.error(`[91m[main ${D()}][0m`,g,...d):console.error(`[main ${D()}]`,g,...d))}critical(g,...d){this.getLevel()<=I.Critical&&(this.useColors?console.error(`[90m[main ${D()}][0m`,g,...d):console.error(`[main ${D()}]`,g,...d))}dispose(){}flush(){}}e.ConsoleMainLogger=c;class i extends C{constructor(g=e.DEFAULT_LOG_LEVEL){super();this.setLevel(g)}trace(g,...d){this.getLevel()<=I.Trace&&console.log("%cTRACE","color: #888",g,...d)}debug(g,...d){this.getLevel()<=I.Debug&&console.log("%cDEBUG","background: #eee; color: #888",g,...d)}info(g,...d){this.getLevel()<=I.Info&&console.log("%c INFO","color: #33f",g,...d)}warn(g,...d){this.getLevel()<=I.Warning&&console.log("%c WARN","color: #993",g,...d)}error(g,...d){this.getLevel()<=I.Error&&console.log("%c ERR","color: #f33",g,...d)}critical(g,...d){this.getLevel()<=I.Critical&&console.log("%cCRITI","background: #f33; color: white",g,...d)}dispose(){}flush(){}}e.ConsoleLogger=i;class S extends C{constructor(g,d=e.DEFAULT_LOG_LEVEL){super();this.adapter=g,this.setLevel(d)}trace(g,...d){this.getLevel()<=I.Trace&&this.adapter.log(I.Trace,[this.extractMessage(g),...d])}debug(g,...d){this.getLevel()<=I.Debug&&this.adapter.log(I.Debug,[this.extractMessage(g),...d])}info(g,...d){this.getLevel()<=I.Info&&this.adapter.log(I.Info,[this.extractMessage(g),...d])}warn(g,...d){this.getLevel()<=I.Warning&&this.adapter.log(I.Warning,[this.extractMessage(g),...d])}error(g,...d){this.getLevel()<=I.Error&&this.adapter.log(I.Error,[this.extractMessage(g),...d])}critical(g,...d){this.getLevel()<=I.Critical&&this.adapter.log(I.Critical,[this.extractMessage(g),...d])}extractMessage(g){return typeof g=="string"?g:(0,t.toErrorMessage)(g,this.getLevel()<=I.Trace)}dispose(){}flush(){}}e.AdapterLogger=S;class s extends C{constructor(g){super();this.logServices=g,g.length&&this.setLevel(g[0].getLevel())}setLevel(g){for(const d of this.logServices)d.setLevel(g);super.setLevel(g)}trace(g,...d){for(const m of this.logServices)m.trace(g,...d)}debug(g,...d){for(const m of this.logServices)m.debug(g,...d)}info(g,...d){for(const m of this.logServices)m.info(g,...d)}warn(g,...d){for(const m of this.logServices)m.warn(g,...d)}error(g,...d){for(const m of this.logServices)m.error(g,...d)}critical(g,...d){for(const m of this.logServices)m.critical(g,...d)}flush(){for(const g of this.logServices)g.flush()}dispose(){for(const g of this.logServices)g.dispose()}}e.MultiplexLogService=s;class l extends _.Disposable{constructor(g){super();this.logger=g,this._register(g)}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(g){this.logger.setLevel(g)}getLevel(){return this.logger.getLevel()}trace(g,...d){this.logger.trace(g,...d)}debug(g,...d){this.logger.debug(g,...d)}info(g,...d){this.logger.info(g,...d)}warn(g,...d){this.logger.warn(g,...d)}error(g,...d){this.logger.error(g,...d)}critical(g,...d){this.logger.critical(g,...d)}flush(){this.logger.flush()}}e.LogService=l;class r extends _.Disposable{constructor(g,d){super();this.logLevel=g,this.loggers=new Map,this.logLevelChangeableLoggers=[],this._register(d(m=>{this.logLevel=m,this.logLevelChangeableLoggers.forEach(b=>b.setLevel(m))}))}getLogger(g){return this.loggers.get(g.toString())}createLogger(g,d){let m=this.loggers.get(g.toString());return m||(m=this.doCreateLogger(g,d?.always?I.Trace:this.logLevel,d),this.loggers.set(g.toString(),m),d?.always||this.logLevelChangeableLoggers.push(m)),m}dispose(){this.logLevelChangeableLoggers.splice(0,this.logLevelChangeableLoggers.length),this.loggers.forEach(g=>g.dispose()),this.loggers.clear(),super.dispose()}}e.AbstractLoggerService=r;class p{constructor(){this.onDidChangeLogLevel=new f.Emitter().event}setLevel(g){}getLevel(){return I.Info}trace(g,...d){}debug(g,...d){}info(g,...d){}warn(g,...d){}error(g,...d){}critical(g,...d){}dispose(){}flush(){}}e.NullLogService=p;function u(h){if(h.verbose)return I.Trace;if(typeof h.logLevel=="string"){const g=a(h.logLevel.toLowerCase());if(g!==void 0)return g}return e.DEFAULT_LOG_LEVEL}e.getLogLevel=u;function a(h){switch(h){case"trace":return I.Trace;case"debug":return I.Debug;case"info":return I.Info;case"warn":return I.Warning;case"error":return I.Error;case"critical":return I.Critical;case"off":return I.Off}}e.parseLogLevel=a;function n(h){switch(h){case I.Trace:return"trace";case I.Debug:return"debug";case I.Info:return"info";case I.Warning:return"warn";case I.Error:return"error";case I.Critical:return"critical";case I.Off:return"off"}}e.LogLevelToString=n}),define(ne[552],re([1,0,11,2,448,655,20,124,1168,52,113,29,15,31,151,22,62]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorWorkerClient=e.EditorWorkerHost=e.EditorWorkerService=void 0;const l=60*1e3,r=5*60*1e3;function p(b,E){const y=b.getModel(E);return!(!y||y.isTooLargeForSyncing())}let u=class extends f.Disposable{constructor(E,y,T,R,O){super();this._modelService=E,this._workerManager=this._register(new n(this._modelService,R)),this._logService=T,this._register(O.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(x,F)=>p(this._modelService,x.uri)?this._workerManager.withWorker().then(L=>L.computeLinks(x.uri)).then(L=>L&&{links:L}):Promise.resolve({links:[]})})),this._register(O.completionProvider.register("*",new a(this._workerManager,y,this._modelService,R)))}dispose(){super.dispose()}canComputeUnicodeHighlights(E){return p(this._modelService,E)}computedUnicodeHighlights(E,y,T){return this._workerManager.withWorker().then(R=>R.computedUnicodeHighlights(E,y,T))}computeDiff(E,y,T,R){return this._workerManager.withWorker().then(O=>O.computeDiff(E,y,T,R))}canComputeDirtyDiff(E,y){return p(this._modelService,E)&&p(this._modelService,y)}computeDirtyDiff(E,y,T){return this._workerManager.withWorker().then(R=>R.computeDirtyDiff(E,y,T))}computeMoreMinimalEdits(E,y){if((0,o.isNonEmptyArray)(y)){if(!p(this._modelService,E))return Promise.resolve(y);const T=i.StopWatch.create(!0),R=this._workerManager.withWorker().then(O=>O.computeMoreMinimalEdits(E,y));return R.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",E.toString(!0),T.elapsed())),Promise.race([R,(0,t.timeout)(1e3).then(()=>y)])}else return Promise.resolve(void 0)}canNavigateValueSet(E){return p(this._modelService,E)}navigateValueSet(E,y,T){return this._workerManager.withWorker().then(R=>R.navigateValueSet(E,y,T))}canComputeWordRanges(E){return p(this._modelService,E)}computeWordRanges(E,y){return this._workerManager.withWorker().then(T=>T.computeWordRanges(E,y))}};u=Ee([W(0,w.IModelService),W(1,v.ITextResourceConfigurationService),W(2,c.ILogService),W(3,D.ILanguageConfigurationService),W(4,s.ILanguageFeaturesService)],u),e.EditorWorkerService=u;class a{constructor(E,y,T,R){this.languageConfigurationService=R,this._debugDisplayName="wordbasedCompletions",this._workerManager=E,this._configurationService=y,this._modelService=T}async provideCompletionItems(E,y){const T=this._configurationService.getValue(E.uri,y,"editor");if(!T.wordBasedSuggestions)return;const R=[];if(T.wordBasedSuggestionsMode==="currentDocument")p(this._modelService,E.uri)&&R.push(E.uri);else for(const B of this._modelService.getModels())!p(this._modelService,B.uri)||(B===E?R.unshift(B.uri):(T.wordBasedSuggestionsMode==="allDocuments"||B.getLanguageId()===E.getLanguageId())&&R.push(B.uri));if(R.length===0)return;const O=this.languageConfigurationService.getLanguageConfiguration(E.getLanguageId()).getWordDefinition(),x=E.getWordAtPosition(y),F=x?new k.Range(y.lineNumber,x.startColumn,y.lineNumber,x.endColumn):k.Range.fromPositions(y),L=F.setEndPosition(y.lineNumber,y.column),N=await(await this._workerManager.withWorker()).textualSuggest(R,x?.word,O);if(!!N)return{duration:N.duration,suggestions:N.words.map(B=>({kind:18,label:B,insertText:B,range:{insert:L,replace:F}}))}}}class n extends f.Disposable{constructor(E,y){super();this.languageConfigurationService=y,this._modelService=E,this._editorWorkerClient=null,this._lastWorkerUsedTime=new Date().getTime(),this._register(new t.IntervalTimer).cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(r/2)),this._register(this._modelService.onModelRemoved(R=>this._checkStopEmptyWorker()))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return;this._modelService.getModels().length===0&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;new Date().getTime()-this._lastWorkerUsedTime>r&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=new Date().getTime(),this._editorWorkerClient||(this._editorWorkerClient=new m(this._modelService,!1,"editorWorkerService",this.languageConfigurationService)),Promise.resolve(this._editorWorkerClient)}}class h extends f.Disposable{constructor(E,y,T){super();if(this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=E,this._modelService=y,!T){const R=new t.IntervalTimer;R.cancelAndSet(()=>this._checkStopModelSync(),Math.round(l/2)),this._register(R)}}dispose(){for(let E in this._syncedModels)(0,f.dispose)(this._syncedModels[E]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(E,y){for(const T of E){const R=T.toString();this._syncedModels[R]||this._beginModelSync(T,y),this._syncedModels[R]&&(this._syncedModelsLastUsedTime[R]=new Date().getTime())}}_checkStopModelSync(){const E=new Date().getTime(),y=[];for(let T in this._syncedModelsLastUsedTime)E-this._syncedModelsLastUsedTime[T]>l&&y.push(T);for(const T of y)this._stopModelSync(T)}_beginModelSync(E,y){const T=this._modelService.getModel(E);if(!T||!y&&T.isTooLargeForSyncing())return;const R=E.toString();this._proxy.acceptNewModel({url:T.uri.toString(),lines:T.getLinesContent(),EOL:T.getEOL(),versionId:T.getVersionId()});const O=new f.DisposableStore;O.add(T.onDidChangeContent(x=>{this._proxy.acceptModelChanged(R.toString(),x)})),O.add(T.onWillDispose(()=>{this._stopModelSync(R)})),O.add((0,f.toDisposable)(()=>{this._proxy.acceptRemovedModel(R)})),this._syncedModels[R]=O}_stopModelSync(E){const y=this._syncedModels[E];delete this._syncedModels[E],delete this._syncedModelsLastUsedTime[E],(0,f.dispose)(y)}}class g{constructor(E){this._instance=E,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class d{constructor(E){this._workerClient=E}fhr(E,y){return this._workerClient.fhr(E,y)}}e.EditorWorkerHost=d;class m extends f.Disposable{constructor(E,y,T,R){super();this.languageConfigurationService=R,this._disposed=!1,this._modelService=E,this._keepIdleModels=y,this._workerFactory=new A.DefaultWorkerFactory(T),this._worker=null,this._modelManager=null}fhr(E,y){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new _.SimpleWorkerClient(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new d(this)))}catch(E){(0,_.logOnceWebWorkerWarning)(E),this._worker=new g(new I.EditorSimpleWorker(new d(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,E=>((0,_.logOnceWebWorkerWarning)(E),this._worker=new g(new I.EditorSimpleWorker(new d(this),null)),this._getOrCreateWorker().getProxyObject()))}_getOrCreateModelManager(E){return this._modelManager||(this._modelManager=this._register(new h(E,this._modelService,this._keepIdleModels))),this._modelManager}async _withSyncedResources(E,y=!1){return this._disposed?Promise.reject((0,S.canceled)()):this._getProxy().then(T=>(this._getOrCreateModelManager(T).ensureSyncedResources(E,y),T))}computedUnicodeHighlights(E,y,T){return this._withSyncedResources([E]).then(R=>R.computeUnicodeHighlights(E.toString(),y,T))}computeDiff(E,y,T,R){return this._withSyncedResources([E,y],!0).then(O=>O.computeDiff(E.toString(),y.toString(),T,R))}computeDirtyDiff(E,y,T){return this._withSyncedResources([E,y]).then(R=>R.computeDirtyDiff(E.toString(),y.toString(),T))}computeMoreMinimalEdits(E,y){return this._withSyncedResources([E]).then(T=>T.computeMoreMinimalEdits(E.toString(),y))}computeLinks(E){return this._withSyncedResources([E]).then(y=>y.computeLinks(E.toString()))}async textualSuggest(E,y,T){const R=await this._withSyncedResources(E),O=T.source,x=(0,C.regExpFlags)(T);return R.textualSuggest(E.map(F=>F.toString()),y,O,x)}computeWordRanges(E,y){return this._withSyncedResources([E]).then(T=>{const R=this._modelService.getModel(E);if(!R)return Promise.resolve(null);const O=this.languageConfigurationService.getLanguageConfiguration(R.getLanguageId()).getWordDefinition(),x=O.source,F=(0,C.regExpFlags)(O);return T.computeWordRanges(E.toString(),y,x,F)})}navigateValueSet(E,y,T){return this._withSyncedResources([E]).then(R=>{const O=this._modelService.getModel(E);if(!O)return null;const x=this.languageConfigurationService.getLanguageConfiguration(O.getLanguageId()).getWordDefinition(),F=x.source,L=(0,C.regExpFlags)(x);return R.navigateValueSet(E.toString(),y,T,F,L)})}dispose(){super.dispose(),this._disposed=!0}}e.EditorWorkerClient=m}),define(ne[737],re([1,0,552,13]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createWebWorker=void 0;function _(k,D,I){return new A(k,D,I)}e.createWebWorker=_;class A extends t.EditorWorkerClient{constructor(D,I,w){super(D,w.keepIdleModels||!1,w.label,I);this._foreignModuleId=w.moduleId,this._foreignModuleCreateData=w.createData||null,this._foreignModuleHost=w.host||null,this._foreignProxy=null}fhr(D,I){if(!this._foreignModuleHost||typeof this._foreignModuleHost[D]!="function")return Promise.reject(new Error("Missing method "+D+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[D].apply(this._foreignModuleHost,I))}catch(w){return Promise.reject(w)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(D=>{const I=this._foreignModuleHost?f.getAllMethodNames(this._foreignModuleHost):[];return D.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,I).then(w=>{this._foreignModuleCreateData=null;const v=(c,i)=>D.fmr(c,i),C=(c,i)=>function(){const S=Array.prototype.slice.call(arguments,0);return i(c,S)},o={};for(const c of w)o[c]=C(c,v);return o})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(D){return this._withSyncedResources(D).then(I=>this.getProxy())}}}),define(ne[1963],re([1,0,15,11,22,6,2,48,734,31]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractDiskFileSystemProvider=void 0;class v extends k.Disposable{constructor(o,c){super();this.logService=o,this.options=c,this._onDidChangeFile=this._register(new A.Emitter),this.onDidChangeFile=this._onDidChangeFile.event,this._onDidWatchError=this._register(new A.Emitter),this.onDidWatchError=this._onDidWatchError.event,this.universalPathsToWatch=[],this.universalWatchRequestDelayer=this._register(new f.ThrottledDelayer(0)),this.nonRecursivePathsToWatch=[],this.nonRecursiveWatchRequestDelayer=this._register(new f.ThrottledDelayer(0))}watch(o,c){return c.recursive||this.options?.watcher?.forceUniversal?this.watchUniversal(o,c):this.watchNonRecursive(o,c)}watchUniversal(o,c){const i={path:this.toFilePath(o),excludes:c.excludes,recursive:c.recursive},S=(0,t.insert)(this.universalPathsToWatch,i);return this.refreshUniversalWatchers(),(0,k.toDisposable)(()=>{S(),this.refreshUniversalWatchers()})}refreshUniversalWatchers(){this.universalWatchRequestDelayer.trigger(()=>this.doRefreshUniversalWatchers()).catch(o=>(0,_.onUnexpectedError)(o))}doRefreshUniversalWatchers(){this.universalWatcher||(this.universalWatcher=this._register(this.createUniversalWatcher(c=>this._onDidChangeFile.fire((0,I.toFileChanges)(c)),c=>this.onWatcherLogMessage(c),this.logService.getLevel()===w.LogLevel.Trace)),this._register(this.logService.onDidChangeLogLevel(()=>{this.universalWatcher?.setVerboseLogging(this.logService.getLevel()===w.LogLevel.Trace)})));const o=this.options?.watcher?.recursive?.usePolling;if(o===!0)for(const c of this.universalPathsToWatch)(0,I.isRecursiveWatchRequest)(c)&&(c.pollingInterval=this.options?.watcher?.recursive?.pollingInterval??5e3);else if(Array.isArray(o))for(const c of this.universalPathsToWatch)(0,I.isRecursiveWatchRequest)(c)&&o.includes(c.path)&&(c.pollingInterval=this.options?.watcher?.recursive?.pollingInterval??5e3);return this.universalWatcher.watch(this.universalPathsToWatch)}watchNonRecursive(o,c){const i={path:this.toFilePath(o),excludes:c.excludes,recursive:!1},S=(0,t.insert)(this.nonRecursivePathsToWatch,i);return this.refreshNonRecursiveWatchers(),(0,k.toDisposable)(()=>{S(),this.refreshNonRecursiveWatchers()})}refreshNonRecursiveWatchers(){this.nonRecursiveWatchRequestDelayer.trigger(()=>this.doRefreshNonRecursiveWatchers()).catch(o=>(0,_.onUnexpectedError)(o))}doRefreshNonRecursiveWatchers(){return this.nonRecursiveWatcher||(this.nonRecursiveWatcher=this._register(this.createNonRecursiveWatcher(o=>this._onDidChangeFile.fire((0,I.toFileChanges)(o)),o=>this.onWatcherLogMessage(o),this.logService.getLevel()===w.LogLevel.Trace)),this._register(this.logService.onDidChangeLogLevel(()=>{this.nonRecursiveWatcher?.setVerboseLogging(this.logService.getLevel()===w.LogLevel.Trace)}))),this.nonRecursiveWatcher.watch(this.nonRecursivePathsToWatch)}onWatcherLogMessage(o){o.type==="error"&&this._onDidWatchError.fire(o.message),this.logService[o.type](o.message)}toFilePath(o){return(0,D.normalize)(o.fsPath)}}e.AbstractDiskFileSystemProvider=v}),define(ne[1964],re([1,0,15,11,60,30,6,116,92,2,55,18,235,19,206,1327,23,1947,31]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileService=void 0;let p=class extends w.Disposable{constructor(a){super();this.logService=a,this.BUFFER_SIZE=256*1024,this._onDidChangeFileSystemProviderRegistrations=this._register(new k.Emitter),this.onDidChangeFileSystemProviderRegistrations=this._onDidChangeFileSystemProviderRegistrations.event,this._onWillActivateFileSystemProvider=this._register(new k.Emitter),this.onWillActivateFileSystemProvider=this._onWillActivateFileSystemProvider.event,this._onDidChangeFileSystemProviderCapabilities=this._register(new k.Emitter),this.onDidChangeFileSystemProviderCapabilities=this._onDidChangeFileSystemProviderCapabilities.event,this.provider=new Map,this._onDidRunOperation=this._register(new k.Emitter),this.onDidRunOperation=this._onDidRunOperation.event,this._onDidFilesChange=this._register(new k.Emitter),this.onDidFilesChange=this._onDidFilesChange.event,this._onDidWatchError=this._register(new k.Emitter),this.onDidWatchError=this._onDidWatchError.event,this.activeWatchers=new Map,this.writeQueue=this._register(new f.ResourceQueue)}registerProvider(a,n){if(this.provider.has(a))throw new Error(`A filesystem provider for the scheme '${a}' is already registered.`);(0,o.mark)(`code/registerFilesystem/${a}`);const h=new w.DisposableStore;return this.provider.set(a,n),this._onDidChangeFileSystemProviderRegistrations.fire({added:!0,scheme:a,provider:n}),h.add(n.onDidChangeFile(g=>this._onDidFilesChange.fire(new s.FileChangesEvent(g,!this.isPathCaseSensitive(n))))),typeof n.onDidWatchError=="function"&&h.add(n.onDidWatchError(g=>this._onDidWatchError.fire(new Error(g)))),h.add(n.onDidChangeCapabilities(()=>this._onDidChangeFileSystemProviderCapabilities.fire({provider:n,scheme:a}))),(0,w.toDisposable)(()=>{this._onDidChangeFileSystemProviderRegistrations.fire({added:!1,scheme:a,provider:n}),this.provider.delete(a),(0,w.dispose)(h)})}getProvider(a){return this.provider.get(a)}async activateProvider(a){const n=[];this._onWillActivateFileSystemProvider.fire({scheme:a,join(h){n.push(h)}}),!this.provider.has(a)&&await f.Promises.settled(n)}async canHandleResource(a){return await this.activateProvider(a.scheme),this.hasProvider(a)}hasProvider(a){return this.provider.has(a.scheme)}hasCapability(a,n){const h=this.provider.get(a.scheme);return!!(h&&h.capabilities&n)}listCapabilities(){return I.Iterable.map(this.provider,([a,n])=>({scheme:a,capabilities:n.capabilities}))}async withProvider(a){if(!(0,c.isAbsolutePath)(a))throw new s.FileOperationError((0,S.localize)(0,null,this.resourceForError(a)),8);await this.activateProvider(a.scheme);const n=this.provider.get(a.scheme);if(!n){const h=new Error;throw h.name="ENOPRO",h.message=(0,S.localize)(1,null,a.toString()),h}return n}async withReadProvider(a){const n=await this.withProvider(a);if((0,s.hasOpenReadWriteCloseCapability)(n)||(0,s.hasReadWriteCapability)(n)||(0,s.hasFileReadStreamCapability)(n))return n;throw new Error(`Filesystem provider for scheme '${a.scheme}' neither has FileReadWrite, FileReadStream nor FileOpenReadWriteClose capability which is needed for the read operation.`)}async withWriteProvider(a){const n=await this.withProvider(a);if((0,s.hasOpenReadWriteCloseCapability)(n)||(0,s.hasReadWriteCapability)(n))return n;throw new Error(`Filesystem provider for scheme '${a.scheme}' neither has FileReadWrite nor FileOpenReadWriteClose capability which is needed for the write operation.`)}async resolve(a,n){try{return await this.doResolveFile(a,n)}catch(h){throw(0,s.toFileSystemProviderErrorCode)(h)===s.FileSystemProviderErrorCode.FileNotFound?new s.FileOperationError((0,S.localize)(2,null,this.resourceForError(a)),1):(0,s.ensureFileSystemProviderError)(h)}}async doResolveFile(a,n){const h=await this.withProvider(a),g=this.isPathCaseSensitive(h),d=n?.resolveTo,m=n?.resolveSingleChildDescendants,b=n?.resolveMetadata,E=await h.stat(a);let y;return this.toFileStat(h,a,E,void 0,!!b,(T,R)=>(y||(y=v.TernarySearchTree.forUris(()=>!g),y.set(a,!0),d&&y.fill(!0,d)),y.get(T.resource)||y.findSuperstr(T.resource.with({query:null,fragment:null}))?!0:T.isDirectory&&m?R===1:!1))}async toFileStat(a,n,h,g,d,m){const{providerExtUri:b}=this.getExtUri(a),E={resource:n,name:b.basename(n),isFile:(h.type&s.FileType.File)!=0,isDirectory:(h.type&s.FileType.Directory)!=0,isSymbolicLink:(h.type&s.FileType.SymbolicLink)!=0,mtime:h.mtime,ctime:h.ctime,size:h.size,readonly:Boolean((h.permissions??0)&s.FilePermission.Readonly)||Boolean(a.capabilities&2048),etag:(0,s.etag)({mtime:h.mtime,size:h.size}),children:void 0};if(E.isDirectory&&m(E,g)){try{const y=await a.readdir(n),T=await f.Promises.settled(y.map(async([R,O])=>{try{const x=b.joinPath(n,R),F=d?await a.stat(x):{type:O};return await this.toFileStat(a,x,F,y.length,d,m)}catch(x){return this.logService.trace(x),null}}));E.children=(0,t.coalesce)(T)}catch(y){this.logService.trace(y),E.children=[]}return E}return E}async resolveAll(a){return f.Promises.settled(a.map(async n=>{try{return{stat:await this.doResolveFile(n.resource,n.options),success:!0}}catch(h){return this.logService.trace(h),{stat:void 0,success:!1}}}))}async stat(a){const n=await this.withProvider(a),h=await n.stat(a);return this.toFileStat(n,a,h,void 0,!0,()=>!1)}async exists(a){const n=await this.withProvider(a);try{return!!await n.stat(a)}catch{return!1}}async canCreateFile(a,n){try{await this.doValidateCreateFile(a,n)}catch(h){return h}return!0}async doValidateCreateFile(a,n){if(!n?.overwrite&&await this.exists(a))throw new s.FileOperationError((0,S.localize)(3,null,this.resourceForError(a)),3,n)}async createFile(a,n=_.VSBuffer.fromString(""),h){await this.doValidateCreateFile(a,h);const g=await this.writeFile(a,n);return this._onDidRunOperation.fire(new s.FileOperationEvent(a,0,g)),g}async writeFile(a,n,h){const g=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(a),a),{providerExtUri:d}=this.getExtUri(g);try{await this.validateWriteFile(g,a,h)||await this.mkdirp(g,d.dirname(a));let b;if((0,s.hasReadWriteCapability)(g)&&!(n instanceof _.VSBuffer))if((0,i.isReadableStream)(n)){const E=await(0,i.peekStream)(n,3);E.ended?b=_.VSBuffer.concat(E.buffer):b=E}else b=(0,i.peekReadable)(n,E=>_.VSBuffer.concat(E),3);else b=n;!(0,s.hasOpenReadWriteCloseCapability)(g)||(0,s.hasReadWriteCapability)(g)&&b instanceof _.VSBuffer?await this.doWriteUnbuffered(g,a,h,b):await this.doWriteBuffered(g,a,h,b instanceof _.VSBuffer?(0,_.bufferToReadable)(b):b),this._onDidRunOperation.fire(new s.FileOperationEvent(a,4))}catch(m){throw new s.FileOperationError((0,S.localize)(4,null,this.resourceForError(a),(0,s.ensureFileSystemProviderError)(m).toString()),(0,s.toFileOperationResult)(m),h)}return this.resolve(a,{resolveMetadata:!0})}async validateWriteFile(a,n,h){if(!!h?.unlock&&!(a.capabilities&8192))throw new Error((0,S.localize)(5,null,this.resourceForError(n)));let d;try{d=await a.stat(n)}catch{return}if((d.type&s.FileType.Directory)!=0)throw new s.FileOperationError((0,S.localize)(6,null,this.resourceForError(n)),0,h);if(this.throwIfFileIsReadonly(n,d),typeof h?.mtime=="number"&&typeof h.etag=="string"&&h.etag!==s.ETAG_DISABLED&&typeof d.mtime=="number"&&typeof d.size=="number"&&h.mtime<d.mtime&&h.etag!==(0,s.etag)({mtime:h.mtime,size:d.size}))throw new s.FileOperationError((0,S.localize)(7,null),3,h);return d}async readFile(a,n,h){const g=await this.withReadProvider(a);return n?.atomic?this.doReadFileAtomic(g,a,n,h):this.doReadFile(g,a,n,h)}async doReadFileAtomic(a,n,h,g){return new Promise((d,m)=>{this.writeQueue.queueFor(n,this.getExtUri(a).providerExtUri).queue(async()=>{try{const b=await this.doReadFile(a,n,h,g);d(b)}catch(b){m(b)}})})}async doReadFile(a,n,h,g){const d=await this.doReadFileStream(a,n,{...h,preferUnbuffered:!0},g);return{...d,value:await(0,_.streamToBuffer)(d.value)}}async readFileStream(a,n,h){const g=await this.withReadProvider(a);return this.doReadFileStream(g,a,n,h)}async doReadFileStream(a,n,h,g){const d=new A.CancellationTokenSource(g),m=this.validateReadFile(n,h).then(E=>E,E=>{throw d.cancel(),E});let b;try{return typeof h?.etag=="string"&&h.etag!==s.ETAG_DISABLED&&await m,h?.atomic&&(0,s.hasFileAtomicReadCapability)(a)||!((0,s.hasOpenReadWriteCloseCapability)(a)||(0,s.hasFileReadStreamCapability)(a))||(0,s.hasReadWriteCapability)(a)&&h?.preferUnbuffered?b=this.readFileUnbuffered(a,n,h):(0,s.hasFileReadStreamCapability)(a)?b=this.readFileStreamed(a,n,d.token,h):b=this.readFileBuffered(a,n,d.token,h),{...await m,value:b}}catch(E){b&&await(0,i.consumeStream)(b);const y=(0,S.localize)(8,null,this.resourceForError(n),(0,s.ensureFileSystemProviderError)(E).toString());throw E instanceof s.NotModifiedSinceFileOperationError?new s.NotModifiedSinceFileOperationError(y,E.stat,h):new s.FileOperationError(y,(0,s.toFileOperationResult)(E),h)}}readFileStreamed(a,n,h,g=Object.create(null)){const d=a.readFileStream(n,g,h);return(0,i.transform)(d,{data:m=>m instanceof _.VSBuffer?m:_.VSBuffer.wrap(m),error:m=>new s.FileOperationError((0,S.localize)(9,null,this.resourceForError(n),(0,s.ensureFileSystemProviderError)(m).toString()),(0,s.toFileOperationResult)(m),g)},m=>_.VSBuffer.concat(m))}readFileBuffered(a,n,h,g=Object.create(null)){const d=(0,_.newWriteableBufferStream)();return(0,l.readFileIntoStream)(a,n,d,m=>m,{...g,bufferSize:this.BUFFER_SIZE,errorTransformer:m=>new s.FileOperationError((0,S.localize)(10,null,this.resourceForError(n),(0,s.ensureFileSystemProviderError)(m).toString()),(0,s.toFileOperationResult)(m),g)},h),d}readFileUnbuffered(a,n,h){const g=(0,i.newWriteableStream)(d=>_.VSBuffer.concat(d));return(async()=>{try{let d;h?.atomic&&(0,s.hasFileAtomicReadCapability)(a)?d=await a.readFile(n,{atomic:!0}):d=await a.readFile(n),typeof h?.position=="number"&&(d=d.slice(h.position)),typeof h?.length=="number"&&(d=d.slice(0,h.length)),this.validateReadFileLimits(n,d.byteLength,h),g.end(_.VSBuffer.wrap(d))}catch(d){g.error(d),g.end()}})(),g}async validateReadFile(a,n){const h=await this.resolve(a,{resolveMetadata:!0});if(h.isDirectory)throw new s.FileOperationError((0,S.localize)(11,null,this.resourceForError(a)),0,n);if(typeof n?.etag=="string"&&n.etag!==s.ETAG_DISABLED&&n.etag===h.etag)throw new s.NotModifiedSinceFileOperationError((0,S.localize)(12,null),h,n);return this.validateReadFileLimits(a,h.size,n),h}validateReadFileLimits(a,n,h){if(h?.limits){let g;if(typeof h.limits.memory=="number"&&n>h.limits.memory&&(g=9),typeof h.limits.size=="number"&&n>h.limits.size&&(g=7),typeof g=="number")throw new s.FileOperationError((0,S.localize)(13,null,this.resourceForError(a)),g)}}async canMove(a,n,h){return this.doCanMoveCopy(a,n,"move",h)}async canCopy(a,n,h){return this.doCanMoveCopy(a,n,"copy",h)}async doCanMoveCopy(a,n,h,g){if(a.toString()!==n.toString())try{const d=h==="move"?this.throwIfFileSystemIsReadonly(await this.withWriteProvider(a),a):await this.withReadProvider(a),m=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(n),n);await this.doValidateMoveCopy(d,a,m,n,h,g)}catch(d){return d}return!0}async move(a,n,h){const g=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(a),a),d=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(n),n),m=await this.doMoveCopy(g,a,d,n,"move",!!h),b=await this.resolve(n,{resolveMetadata:!0});return this._onDidRunOperation.fire(new s.FileOperationEvent(a,m==="move"?2:3,b)),b}async copy(a,n,h){const g=await this.withReadProvider(a),d=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(n),n),m=await this.doMoveCopy(g,a,d,n,"copy",!!h),b=await this.resolve(n,{resolveMetadata:!0});return this._onDidRunOperation.fire(new s.FileOperationEvent(a,m==="copy"?3:2,b)),b}async doMoveCopy(a,n,h,g,d,m){if(n.toString()===g.toString())return d;const{exists:b,isSameResourceWithDifferentPathCase:E}=await this.doValidateMoveCopy(a,n,h,g,d,m);if(b&&!E&&m&&await this.del(g,{recursive:!0}),await this.mkdirp(h,this.getExtUri(h).providerExtUri.dirname(g)),d==="copy"){if(a===h&&(0,s.hasFileFolderCopyCapability)(a))await a.copy(n,g,{overwrite:m});else{const y=await this.resolve(n);y.isDirectory?await this.doCopyFolder(a,y,h,g):await this.doCopyFile(a,n,h,g)}return d}else return a===h?(await a.rename(n,g,{overwrite:m}),d):(await this.doMoveCopy(a,n,h,g,"copy",m),await this.del(n,{recursive:!0}),"copy")}async doCopyFile(a,n,h,g){if((0,s.hasOpenReadWriteCloseCapability)(a)&&(0,s.hasOpenReadWriteCloseCapability)(h))return this.doPipeBuffered(a,n,h,g);if((0,s.hasOpenReadWriteCloseCapability)(a)&&(0,s.hasReadWriteCapability)(h))return this.doPipeBufferedToUnbuffered(a,n,h,g);if((0,s.hasReadWriteCapability)(a)&&(0,s.hasOpenReadWriteCloseCapability)(h))return this.doPipeUnbufferedToBuffered(a,n,h,g);if((0,s.hasReadWriteCapability)(a)&&(0,s.hasReadWriteCapability)(h))return this.doPipeUnbuffered(a,n,h,g)}async doCopyFolder(a,n,h,g){await h.mkdir(g),Array.isArray(n.children)&&await f.Promises.settled(n.children.map(async d=>{const m=this.getExtUri(h).providerExtUri.joinPath(g,d.name);return d.isDirectory?this.doCopyFolder(a,await this.resolve(d.resource),h,m):this.doCopyFile(a,d.resource,h,m)}))}async doValidateMoveCopy(a,n,h,g,d,m){let b=!1;if(a===h){const{providerExtUri:y,isPathCaseSensitive:T}=this.getExtUri(a);if(T||(b=y.isEqual(n,g)),b&&d==="copy")throw new Error((0,S.localize)(14,null,this.resourceForError(n),this.resourceForError(g)));if(!b&&y.isEqualOrParent(g,n))throw new Error((0,S.localize)(15,null,this.resourceForError(n),this.resourceForError(g)))}const E=await this.exists(g);if(E&&!b){if(!m)throw new s.FileOperationError((0,S.localize)(16,null,this.resourceForError(n),this.resourceForError(g)),4);if(a===h){const{providerExtUri:y}=this.getExtUri(a);if(y.isEqualOrParent(n,g))throw new Error((0,S.localize)(17,null,this.resourceForError(n),this.resourceForError(g)))}}return{exists:E,isSameResourceWithDifferentPathCase:b}}getExtUri(a){const n=this.isPathCaseSensitive(a);return{providerExtUri:n?c.extUri:c.extUriIgnorePathCase,isPathCaseSensitive:n}}isPathCaseSensitive(a){return!!(a.capabilities&1024)}async createFolder(a){const n=this.throwIfFileSystemIsReadonly(await this.withProvider(a),a);await this.mkdirp(n,a);const h=await this.resolve(a,{resolveMetadata:!0});return this._onDidRunOperation.fire(new s.FileOperationEvent(a,0,h)),h}async mkdirp(a,n){const h=[],{providerExtUri:g}=this.getExtUri(a);for(;!g.isEqual(n,g.dirname(n));)try{if(((await a.stat(n)).type&s.FileType.Directory)==0)throw new Error((0,S.localize)(18,null,this.resourceForError(n)));break}catch(d){if((0,s.toFileSystemProviderErrorCode)(d)!==s.FileSystemProviderErrorCode.FileNotFound)throw d;h.push(g.basename(n)),n=g.dirname(n)}for(let d=h.length-1;d>=0;d--){n=g.joinPath(n,h[d]);try{await a.mkdir(n)}catch(m){if((0,s.toFileSystemProviderErrorCode)(m)!==s.FileSystemProviderErrorCode.FileExists)throw m}}}async canDelete(a,n){try{await this.doValidateDelete(a,n)}catch(h){return h}return!0}async doValidateDelete(a,n){const h=this.throwIfFileSystemIsReadonly(await this.withProvider(a),a);if(!!n?.useTrash&&!(h.capabilities&4096))throw new Error((0,S.localize)(19,null,this.resourceForError(a)));let d;try{d=await h.stat(a)}catch{}if(d)this.throwIfFileIsReadonly(a,d);else throw new s.FileOperationError((0,S.localize)(20,null,this.resourceForError(a)),1);if(!!!n?.recursive){const b=await this.resolve(a);if(b.isDirectory&&Array.isArray(b.children)&&b.children.length>0)throw new Error((0,S.localize)(21,null,this.resourceForError(a)))}return h}async del(a,n){const h=await this.doValidateDelete(a,n),g=!!n?.useTrash,d=!!n?.recursive;await h.delete(a,{recursive:d,useTrash:g}),this._onDidRunOperation.fire(new s.FileOperationEvent(a,1))}async cloneFile(a,n){const h=await this.withProvider(a),g=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(n),n);if(h===g&&this.getExtUri(h).providerExtUri.isEqual(a,n))return;if(h===g&&(0,s.hasFileCloneCapability)(h))return h.cloneFile(a,n);await this.mkdirp(g,this.getExtUri(g).providerExtUri.dirname(n));const d=this.writeQueue.queueFor(a,this.getExtUri(h).providerExtUri);return h===g&&(0,s.hasFileFolderCopyCapability)(h)?d.queue(()=>h.copy(a,n,{overwrite:!0})):d.queue(()=>this.doCopyFile(h,a,g,n))}watch(a,n={recursive:!1,excludes:[]}){const h=new w.DisposableStore;let g=!1,d=()=>{g=!0};return h.add((0,w.toDisposable)(()=>d())),(async()=>{try{const m=await this.doWatch(a,n);g?(0,w.dispose)(m):d=()=>(0,w.dispose)(m)}catch(m){this.logService.error(m)}})(),h}async doWatch(a,n){const h=await this.withProvider(a),g=(0,D.hash)([this.getExtUri(h).providerExtUri.getComparisonKey(a),n]);let d=this.activeWatchers.get(g);return d||(d={count:0,disposable:h.watch(a,n)},this.activeWatchers.set(g,d)),d.count+=1,(0,w.toDisposable)(()=>{d&&(d.count--,d.count===0&&((0,w.dispose)(d.disposable),this.activeWatchers.delete(g)))})}dispose(){super.dispose();for(const[,a]of this.activeWatchers)(0,w.dispose)(a.disposable);this.activeWatchers.clear()}async doWriteBuffered(a,n,h,g){return this.writeQueue.queueFor(n,this.getExtUri(a).providerExtUri).queue(async()=>{const d=await a.open(n,{create:!0,unlock:h?.unlock??!1});try{(0,i.isReadableStream)(g)||(0,i.isReadableBufferedStream)(g)?await this.doWriteStreamBufferedQueued(a,d,g):await this.doWriteReadableBufferedQueued(a,d,g)}catch(m){throw(0,s.ensureFileSystemProviderError)(m)}finally{await a.close(d)}})}async doWriteStreamBufferedQueued(a,n,h){let g=0,d;if((0,i.isReadableBufferedStream)(h)){if(h.buffer.length>0){const m=_.VSBuffer.concat(h.buffer);await this.doWriteBuffer(a,n,m,m.byteLength,g,0),g+=m.byteLength}if(h.ended)return;d=h.stream}else d=h;return new Promise((m,b)=>{(0,i.listenStream)(d,{onData:async E=>{d.pause();try{await this.doWriteBuffer(a,n,E,E.byteLength,g,0)}catch(y){return b(y)}g+=E.byteLength,setTimeout(()=>d.resume())},onError:E=>b(E),onEnd:()=>m()})})}async doWriteReadableBufferedQueued(a,n,h){let g=0,d;for(;(d=h.read())!==null;)await this.doWriteBuffer(a,n,d,d.byteLength,g,0),g+=d.byteLength}async doWriteBuffer(a,n,h,g,d,m){let b=0;for(;b<g;)b+=await a.write(n,d+b,h.buffer,m+b,g-b)}async doWriteUnbuffered(a,n,h,g){return this.writeQueue.queueFor(n,this.getExtUri(a).providerExtUri).queue(()=>this.doWriteUnbufferedQueued(a,n,h,g))}async doWriteUnbufferedQueued(a,n,h,g){let d;g instanceof _.VSBuffer?d=g:(0,i.isReadableStream)(g)?d=await(0,_.streamToBuffer)(g):(0,i.isReadableBufferedStream)(g)?d=await(0,_.bufferedStreamToBuffer)(g):d=(0,_.readableToBuffer)(g),await a.writeFile(n,d.buffer,{create:!0,overwrite:!0,unlock:h?.unlock??!1})}async doPipeBuffered(a,n,h,g){return this.writeQueue.queueFor(g,this.getExtUri(h).providerExtUri).queue(()=>this.doPipeBufferedQueued(a,n,h,g))}async doPipeBufferedQueued(a,n,h,g){let d,m;try{d=await a.open(n,{create:!1}),m=await h.open(g,{create:!0,unlock:!1});const b=_.VSBuffer.alloc(this.BUFFER_SIZE);let E=0,y=0,T=0;do T=await a.read(d,E,b.buffer,y,b.byteLength-y),await this.doWriteBuffer(h,m,b,T,E,y),E+=T,y+=T,y===b.byteLength&&(y=0);while(T>0)}catch(b){throw(0,s.ensureFileSystemProviderError)(b)}finally{await f.Promises.settled([typeof d=="number"?a.close(d):Promise.resolve(),typeof m=="number"?h.close(m):Promise.resolve()])}}async doPipeUnbuffered(a,n,h,g){return this.writeQueue.queueFor(g,this.getExtUri(h).providerExtUri).queue(()=>this.doPipeUnbufferedQueued(a,n,h,g))}async doPipeUnbufferedQueued(a,n,h,g){return h.writeFile(g,await a.readFile(n),{create:!0,overwrite:!0,unlock:!1})}async doPipeUnbufferedToBuffered(a,n,h,g){return this.writeQueue.queueFor(g,this.getExtUri(h).providerExtUri).queue(()=>this.doPipeUnbufferedToBufferedQueued(a,n,h,g))}async doPipeUnbufferedToBufferedQueued(a,n,h,g){const d=await h.open(g,{create:!0,unlock:!1});try{const m=await a.readFile(n);await this.doWriteBuffer(h,d,_.VSBuffer.wrap(m),m.byteLength,0,0)}catch(m){throw(0,s.ensureFileSystemProviderError)(m)}finally{await h.close(d)}}async doPipeBufferedToUnbuffered(a,n,h,g){const d=await(0,_.streamToBuffer)(this.readFileBuffered(a,n,A.CancellationToken.None));await this.doWriteUnbuffered(h,g,void 0,d)}throwIfFileSystemIsReadonly(a,n){if(a.capabilities&2048)throw new s.FileOperationError((0,S.localize)(22,null,this.resourceForError(n)),6);return a}throwIfFileIsReadonly(a,n){if((n.permissions??0)&s.FilePermission.Readonly)throw new s.FileOperationError((0,S.localize)(23,null,this.resourceForError(a)),6)}resourceForError(a){return a.scheme===C.Schemas.file?a.fsPath:a.toString(!0)}};p=Ee([W(0,r.ILogService)],p),e.FileService=p}),define(ne[466],re([1,0,6,9,31]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FollowerLogService=e.LoggerChannelClient=e.LoggerChannel=e.LogLevelChannelClient=e.LogLevelChannel=void 0;class A{constructor(o){this.service=o,this.onDidChangeLogLevel=t.Event.buffer(o.onDidChangeLogLevel,!0)}listen(o,c){switch(c){case"onDidChangeLogLevel":return this.onDidChangeLogLevel}throw new Error(`Event not found: ${c}`)}async call(o,c,i){switch(c){case"setLevel":return this.service.setLevel(i)}throw new Error(`Call not found: ${c}`)}}e.LogLevelChannel=A;class k{constructor(o){this.channel=o}get onDidChangeLogLevel(){return this.channel.listen("onDidChangeLogLevel")}setLevel(o){k.setLevel(this.channel,o)}static setLevel(o,c){return o.call("setLevel",c)}}e.LogLevelChannelClient=k;class D{constructor(o){this.loggerService=o,this.loggers=new Map}listen(o,c){throw new Error(`Event not found: ${c}`)}async call(o,c,i){switch(c){case"createLogger":this.createLogger(f.URI.revive(i[0]),i[1]);return;case"log":return this.log(f.URI.revive(i[0]),i[1]);case"consoleLog":return this.consoleLog(i[0],i[1])}throw new Error(`Call not found: ${c}`)}createLogger(o,c){this.loggers.set(o.toString(),this.loggerService.createLogger(o,c))}consoleLog(o,c){let i=console.log;switch(o){case _.LogLevel.Error:i=console.error;break;case _.LogLevel.Warning:i=console.warn;break;case _.LogLevel.Info:i=console.info;break}i.call(console,...c)}log(o,c){const i=this.loggers.get(o.toString());if(!i)throw new Error("Create the logger before logging");for(const[S,s]of c)(0,_.log)(i,S,s)}}e.LoggerChannel=D;class I extends _.AbstractLoggerService{constructor(o,c,i){super(o,c);this.channel=i}createConsoleMainLogger(){return new _.AdapterLogger({log:(o,c)=>{this.channel.call("consoleLog",[o,c])}})}doCreateLogger(o,c,i){return new w(this.channel,o,c,i)}}e.LoggerChannelClient=I;class w extends _.AbstractMessageLogger{constructor(o,c,i,S){super(S?.always);this.channel=o,this.file=c,this.isLoggerCreated=!1,this.buffer=[],this.setLevel(i),this.channel.call("createLogger",[c,S]).then(()=>{this.doLog(this.buffer),this.isLoggerCreated=!0})}log(o,c){const i=[[o,c]];this.isLoggerCreated?this.doLog(i):this.buffer.push(...i)}doLog(o){this.channel.call("log",[this.file,o])}}class v extends _.LogService{constructor(o,c){super(c);this.parent=o,this._register(o.onDidChangeLogLevel(i=>c.setLevel(i)))}setLevel(o){super.setLevel(o),this.parent.setLevel(o)}}e.FollowerLogService=v}),define(ne[125],re([1,0,81,1334,5]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerService=e.IMarkerData=e.MarkerSeverity=e.MarkerTag=void 0;var A;(function(I){I[I.Unnecessary=1]="Unnecessary",I[I.Deprecated=2]="Deprecated"})(A=e.MarkerTag||(e.MarkerTag={}));var k;(function(I){I[I.Hint=1]="Hint",I[I.Info=2]="Info",I[I.Warning=4]="Warning",I[I.Error=8]="Error"})(k=e.MarkerSeverity||(e.MarkerSeverity={})),function(I){function w(i,S){return S-i}I.compare=w;const v=Object.create(null);v[I.Error]=(0,f.localize)(0,null),v[I.Warning]=(0,f.localize)(1,null),v[I.Info]=(0,f.localize)(2,null);function C(i){return v[i]||""}I.toString=C;function o(i){switch(i){case t.default.Error:return I.Error;case t.default.Warning:return I.Warning;case t.default.Info:return I.Info;case t.default.Ignore:return I.Hint}}I.fromSeverity=o;function c(i){switch(i){case I.Error:return t.default.Error;case I.Warning:return t.default.Warning;case I.Info:return t.default.Info;case I.Hint:return t.default.Ignore}}I.toSeverity=c}(k=e.MarkerSeverity||(e.MarkerSeverity={}));var D;(function(I){const w="";function v(o){return C(o,!0)}I.makeKey=v;function C(o,c){let i=[w];return o.source?i.push(o.source.replace("\xA6","\\\xA6")):i.push(w),o.code?typeof o.code=="string"?i.push(o.code.replace("\xA6","\\\xA6")):i.push(o.code.value.replace("\xA6","\\\xA6")):i.push(w),o.severity!==void 0&&o.severity!==null?i.push(k.toString(o.severity)):i.push(w),o.message&&c?i.push(o.message.replace("\xA6","\\\xA6")):i.push(w),o.startLineNumber!==void 0&&o.startLineNumber!==null?i.push(o.startLineNumber.toString()):i.push(w),o.startColumn!==void 0&&o.startColumn!==null?i.push(o.startColumn.toString()):i.push(w),o.endLineNumber!==void 0&&o.endLineNumber!==null?i.push(o.endLineNumber.toString()):i.push(w),o.endColumn!==void 0&&o.endColumn!==null?i.push(o.endColumn.toString()):i.push(w),i.push(w),i.join("\xA6")}I.makeKeyOptionalMessage=C})(D=e.IMarkerData||(e.IMarkerData={})),e.IMarkerService=(0,_.createDecorator)("markerService")}),define(ne[738],re([1,0,15,6,2,194,29,9,20,35,5,125,8]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerNavigationService=e.MarkerList=e.MarkerCoordinate=void 0;class c{constructor(l,r,p){this.marker=l,this.index=r,this.total=p}}e.MarkerCoordinate=c;let i=class{constructor(l,r,p){this._markerService=r,this._configService=p,this._onDidChange=new f.Emitter,this.onDidChange=this._onDidChange.event,this._dispoables=new _.DisposableStore,this._markers=[],this._nextIdx=-1,D.URI.isUri(l)?this._resourceFilter=h=>h.toString()===l.toString():l&&(this._resourceFilter=l);const u=this._configService.getValue("problems.sortOrder"),a=(h,g)=>{let d=(0,k.compare)(h.resource.toString(),g.resource.toString());return d===0&&(u==="position"?d=I.Range.compareRangesUsingStarts(h,g)||C.MarkerSeverity.compare(h.severity,g.severity):d=C.MarkerSeverity.compare(h.severity,g.severity)||I.Range.compareRangesUsingStarts(h,g)),d},n=()=>{this._markers=this._markerService.read({resource:D.URI.isUri(l)?l:void 0,severities:C.MarkerSeverity.Error|C.MarkerSeverity.Warning|C.MarkerSeverity.Info}),typeof l=="function"&&(this._markers=this._markers.filter(h=>this._resourceFilter(h.resource))),this._markers.sort(a)};n(),this._dispoables.add(r.onMarkerChanged(h=>{(!this._resourceFilter||h.some(g=>this._resourceFilter(g)))&&(n(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(l){return!this._resourceFilter&&!l?!0:!this._resourceFilter||!l?!1:this._resourceFilter(l)}get selected(){const l=this._markers[this._nextIdx];return l&&new c(l,this._nextIdx+1,this._markers.length)}_initIdx(l,r,p){let u=!1,a=this._markers.findIndex(n=>n.resource.toString()===l.uri.toString());a<0&&(a=(0,t.binarySearch)(this._markers,{resource:l.uri},(n,h)=>(0,k.compare)(n.resource.toString(),h.resource.toString())),a<0&&(a=~a));for(let n=a;n<this._markers.length;n++){let h=I.Range.lift(this._markers[n]);if(h.isEmpty()){const g=l.getWordAtPosition(h.getStartPosition());g&&(h=new I.Range(h.startLineNumber,g.startColumn,h.startLineNumber,g.endColumn))}if(r&&(h.containsPosition(r)||r.isBeforeOrEqual(h.getStartPosition()))){this._nextIdx=n,u=!0;break}if(this._markers[n].resource.toString()!==l.uri.toString())break}u||(this._nextIdx=p?0:this._markers.length-1),this._nextIdx<0&&(this._nextIdx=this._markers.length-1)}resetIndex(){this._nextIdx=-1}move(l,r,p){if(this._markers.length===0)return!1;let u=this._nextIdx;return this._nextIdx===-1?this._initIdx(r,p,l):l?this._nextIdx=(this._nextIdx+1)%this._markers.length:l||(this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length),u!==this._nextIdx}find(l,r){let p=this._markers.findIndex(u=>u.resource.toString()===l.toString());if(!(p<0)){for(;p<this._markers.length;p++)if(I.Range.containsPosition(this._markers[p],r))return new c(this._markers[p],p+1,this._markers.length)}}};i=Ee([W(1,C.IMarkerService),W(2,o.IConfigurationService)],i),e.MarkerList=i,e.IMarkerNavigationService=(0,v.createDecorator)("IMarkerNavigationService");let S=class{constructor(l,r){this._markerService=l,this._configService=r,this._provider=new A.LinkedList}registerProvider(l){const r=this._provider.unshift(l);return(0,_.toDisposable)(()=>r())}getMarkerList(l){for(let r of this._provider){const p=r.getMarkerList(l);if(p)return p}return new i(l,this._markerService,this._configService)}};S=Ee([W(0,C.IMarkerService),W(1,o.IConfigurationService)],S),(0,w.registerSingleton)(e.IMarkerNavigationService,S,!0)}),define(ne[1965],re([1,0,15,6,92,55,18,9,125]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerService=void 0;class w{constructor(){this._byResource=new A.ResourceMap,this._byOwner=new Map}set(c,i,S){let s=this._byResource.get(c);s||(s=new Map,this._byResource.set(c,s)),s.set(i,S);let l=this._byOwner.get(i);l||(l=new A.ResourceMap,this._byOwner.set(i,l)),l.set(c,S)}get(c,i){return this._byResource.get(c)?.get(i)}delete(c,i){let S=!1,s=!1,l=this._byResource.get(c);l&&(S=l.delete(i));let r=this._byOwner.get(i);if(r&&(s=r.delete(c)),S!==s)throw new Error("illegal state");return S&&s}values(c){return typeof c=="string"?this._byOwner.get(c)?.values()??_.Iterable.empty():D.URI.isUri(c)?this._byResource.get(c)?.values()??_.Iterable.empty():_.Iterable.map(_.Iterable.concat(...this._byOwner.values()),i=>i[1])}}class v{constructor(c){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new A.ResourceMap,this._service=c,this._subscription=c.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(c){for(const i of c){const S=this._data.get(i);S&&this._substract(S);const s=this._resourceStats(i);this._add(s),this._data.set(i,s)}}_resourceStats(c){const i={errors:0,warnings:0,infos:0,unknowns:0};if(c.scheme===k.Schemas.inMemory||c.scheme===k.Schemas.walkThrough||c.scheme===k.Schemas.walkThroughSnippet)return i;for(const{severity:S}of this._service.read({resource:c}))S===I.MarkerSeverity.Error?i.errors+=1:S===I.MarkerSeverity.Warning?i.warnings+=1:S===I.MarkerSeverity.Info?i.infos+=1:i.unknowns+=1;return i}_substract(c){this.errors-=c.errors,this.warnings-=c.warnings,this.infos-=c.infos,this.unknowns-=c.unknowns}_add(c){this.errors+=c.errors,this.warnings+=c.warnings,this.infos+=c.infos,this.unknowns+=c.unknowns}}class C{constructor(){this._onMarkerChanged=new f.DebounceEmitter({delay:0,merge:C._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new w,this._stats=new v(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}getStatistics(){return this._stats}remove(c,i){for(const S of i||[])this.changeOne(c,S,[])}changeOne(c,i,S){if((0,t.isFalsyOrEmpty)(S))this._data.delete(i,c)&&this._onMarkerChanged.fire([i]);else{const s=[];for(const l of S){const r=C._toMarker(c,i,l);r&&s.push(r)}this._data.set(i,c,s),this._onMarkerChanged.fire([i])}}static _toMarker(c,i,S){let{code:s,severity:l,message:r,source:p,startLineNumber:u,startColumn:a,endLineNumber:n,endColumn:h,relatedInformation:g,tags:d}=S;if(!!r)return u=u>0?u:1,a=a>0?a:1,n=n>=u?n:u,h=h>0?h:a,{resource:i,owner:c,code:s,severity:l,message:r,source:p,startLineNumber:u,startColumn:a,endLineNumber:n,endColumn:h,relatedInformation:g,tags:d}}changeAll(c,i){const S=[],s=this._data.values(c);if(s)for(let l of s){const r=_.Iterable.first(l);r&&(S.push(r.resource),this._data.delete(r.resource,c))}if((0,t.isNonEmptyArray)(i)){const l=new A.ResourceMap;for(const{resource:r,marker:p}of i){const u=C._toMarker(c,r,p);if(!u)continue;const a=l.get(r);a?a.push(u):(l.set(r,[u]),S.push(r))}for(const[r,p]of l)this._data.set(r,c,p)}S.length>0&&this._onMarkerChanged.fire(S)}read(c=Object.create(null)){let{owner:i,resource:S,severities:s,take:l}=c;if((!l||l<0)&&(l=-1),i&&S){const r=this._data.get(S,i);if(r){const p=[];for(const u of r)if(C._accept(u,s)){const a=p.push(u);if(l>0&&a===l)break}return p}else return[]}else if(!i&&!S){const r=[];for(let p of this._data.values())for(let u of p)if(C._accept(u,s)){const a=r.push(u);if(l>0&&a===l)return r}return r}else{const r=this._data.values(S??i),p=[];for(const u of r)for(const a of u)if(C._accept(a,s)){const n=p.push(a);if(l>0&&n===l)return p}return p}}static _accept(c,i){return i===void 0||(i&c.severity)===c.severity}static _merge(c){const i=new A.ResourceMap;for(let S of c)for(let s of S)i.set(s,!0);return Array.from(i.keys())}}e.MarkerService=C}),define(ne[739],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMenubarService=void 0,e.IMenubarService=(0,t.createDecorator)("menubarService")}),define(ne[87],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INativeHostService=void 0,e.INativeHostService=(0,t.createDecorator)("nativeHostService")}),define(ne[1966],re([1,0,11,2,1962,1932,5,103,87]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerWindowDriver=void 0;let w=class extends _.BaseWindowDriver{constructor(o){super();this.nativeHostService=o}click(o,c,i){const S=typeof c=="number"&&typeof i=="number"?{x:c,y:i}:void 0;return this._click(o,1,S)}doubleClick(o){return this._click(o,2)}async _click(o,c,i){const{x:S,y:s}=await this._getElementXY(o,i);await this.nativeHostService.sendInputEvent({type:"mouseDown",x:S,y:s,button:"left",clickCount:c}),await(0,t.timeout)(10),await this.nativeHostService.sendInputEvent({type:"mouseUp",x:S,y:s,button:"left",clickCount:c}),await(0,t.timeout)(100)}async openDevTools(){await this.nativeHostService.openDevTools({mode:"detach"})}};w=Ee([W(0,I.INativeHostService)],w);async function v(C,o){const c=C.get(k.IInstantiationService),i=C.get(D.IMainProcessService),S=c.createInstance(w),s=new A.WindowDriverChannel(S);i.registerChannel("windowDriver",s);const l=i.getChannel("windowDriverRegistry"),r=new A.WindowDriverRegistryChannelClient(l);return await r.registerWindowDriver(o),(0,f.toDisposable)(()=>r.reloadWindowDriver(o))}e.registerWindowDriver=v}),define(ne[1967],re([1,0,171,103]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeHostService=void 0;let _=class{constructor(k,D){return this.windowId=k,t.ProxyChannel.toService(D.getChannel("nativeHost"),{context:k,properties:(()=>{const I=new Map;return I.set("windowId",k),I})()})}};_=Ee([W(1,f.IMainProcessService)],_),e.NativeHostService=_}),define(ne[26],re([1,0,6,81,5]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoOpProgress=e.NoOpNotification=e.NotificationsFilter=e.NeverShowAgainScope=e.INotificationService=e.Severity=void 0,e.Severity=f.default,e.INotificationService=(0,_.createDecorator)("notificationService");var A;(function(w){w[w.WORKSPACE=0]="WORKSPACE",w[w.GLOBAL=1]="GLOBAL"})(A=e.NeverShowAgainScope||(e.NeverShowAgainScope={}));var k;(function(w){w[w.OFF=0]="OFF",w[w.SILENT=1]="SILENT",w[w.ERROR=2]="ERROR"})(k=e.NotificationsFilter||(e.NotificationsFilter={}));class D{constructor(){this.progress=new I,this.onDidClose=t.Event.None,this.onDidChangeVisibility=t.Event.None}updateSeverity(v){}updateMessage(v){}updateActions(v){}close(){}}e.NoOpNotification=D;class I{infinite(){}done(){}total(v){}worked(v){}}e.NoOpProgress=I}),define(ne[41],re([1,0,2,29,9,5]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.extractSelection=e.withSelection=e.matchesSomeScheme=e.matchesScheme=e.NullOpenerService=e.IOpenerService=void 0,e.IOpenerService=(0,A.createDecorator)("openerService"),e.NullOpenerService=Object.freeze({_serviceBrand:void 0,registerOpener(){return t.Disposable.None},registerValidator(){return t.Disposable.None},registerExternalUriResolver(){return t.Disposable.None},setDefaultExternalOpener(){},registerExternalOpener(){return t.Disposable.None},async open(){return!1},async resolveExternalUri(v){return{resolved:v,dispose(){}}}});function k(v,C){return _.URI.isUri(v)?(0,f.equalsIgnoreCase)(v.scheme,C):(0,f.startsWithIgnoreCase)(v,C+":")}e.matchesScheme=k;function D(v,...C){return C.some(o=>k(v,o))}e.matchesSomeScheme=D;function I(v,C){return v.with({fragment:`${C.startLineNumber},${C.startColumn}${C.endLineNumber?`-${C.endLineNumber}${C.endColumn?`,${C.endColumn}`:""}`:""}`})}e.withSelection=I;function w(v){let C;const o=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(v.fragment);return o&&(C={startLineNumber:parseInt(o[1]),startColumn:o[2]?parseInt(o[2]):1,endLineNumber:o[4]?parseInt(o[4]):void 0,endColumn:o[4]?o[5]?parseInt(o[5]):1:void 0},v=v.with({fragment:""})),{selection:C,uri:v}}e.extractSelection=w}),define(ne[1968],re([1,0,10,30,194,55,180,18,19,9,72,28,132,41]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenerService=void 0;let i=class{constructor(r){this._commandService=r}async open(r,p){if(!(0,c.matchesScheme)(r,D.Schemas.command))return!1;if(!p?.allowCommands)return!0;typeof r=="string"&&(r=w.URI.parse(r));let u=[];try{u=(0,k.parse)(decodeURIComponent(r.query))}catch{try{u=(0,k.parse)(r.query)}catch{}}return Array.isArray(u)||(u=[u]),await this._commandService.executeCommand(r.path,...u),!0}};i=Ee([W(0,C.ICommandService)],i);let S=class{constructor(r){this._editorService=r}async open(r,p){typeof r=="string"&&(r=w.URI.parse(r));const{selection:u,uri:a}=(0,c.extractSelection)(r);return r=a,r.scheme===D.Schemas.file&&(r=(0,I.normalizePath)(r)),await this._editorService.openCodeEditor({resource:r,options:{selection:u,source:p?.fromUserGesture?o.EditorOpenSource.USER:o.EditorOpenSource.API,...p?.editorOptions}},this._editorService.getFocusedCodeEditor(),p?.openToSide),!0}};S=Ee([W(0,v.ICodeEditorService)],S);let s=class{constructor(r,p){this._openers=new _.LinkedList,this._validators=new _.LinkedList,this._resolvers=new _.LinkedList,this._resolvedUriTargets=new A.ResourceMap(u=>u.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new _.LinkedList,this._defaultExternalOpener={openExternal:async u=>((0,c.matchesSomeScheme)(u,D.Schemas.http,D.Schemas.https)?t.windowOpenNoOpener(u):window.location.href=u,!0)},this._openers.push({open:async(u,a)=>a?.openExternal||(0,c.matchesSomeScheme)(u,D.Schemas.mailto,D.Schemas.http,D.Schemas.https,D.Schemas.vsls)?(await this._doOpenExternal(u,a),!0):!1}),this._openers.push(new i(p)),this._openers.push(new S(r))}registerOpener(r){return{dispose:this._openers.unshift(r)}}registerValidator(r){return{dispose:this._validators.push(r)}}registerExternalUriResolver(r){return{dispose:this._resolvers.push(r)}}setDefaultExternalOpener(r){this._defaultExternalOpener=r}registerExternalOpener(r){return{dispose:this._externalOpeners.push(r)}}async open(r,p){const u=typeof r=="string"?w.URI.parse(r):r,a=this._resolvedUriTargets.get(u)??r;for(const n of this._validators)if(!await n.shouldOpen(a))return!1;for(const n of this._openers)if(await n.open(r,p))return!0;return!1}async resolveExternalUri(r,p){for(const u of this._resolvers)try{const a=await u.resolveExternalUri(r,p);if(a)return this._resolvedUriTargets.has(a.resolved)||this._resolvedUriTargets.set(a.resolved,r),a}catch{}throw new Error("Could not resolve external URI: "+r.toString())}async _doOpenExternal(r,p){const u=typeof r=="string"?w.URI.parse(r):r;let a;try{a=(await this.resolveExternalUri(u,p)).resolved}catch{a=u}let n;if(typeof r=="string"&&u.toString()===a.toString()?n=r:n=encodeURI(a.toString(!0)),p?.allowContributedOpeners){const h=typeof p?.allowContributedOpeners=="string"?p?.allowContributedOpeners:void 0;for(const g of this._externalOpeners)if(await g.openExternal(n,{sourceUri:u,preferredOpenerId:h},f.CancellationToken.None))return!0}return this._defaultExternalOpener.openExternal(n,{sourceUri:u},f.CancellationToken.None)}dispose(){this._validators.clear()}};s=Ee([W(0,v.ICodeEditorService),W(1,C.ICommandService)],s),e.OpenerService=s}),define(ne[228],re([1,0,116,55,195,35,5,31,41]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageFeatureDebounceService=e.ILanguageFeatureDebounceService=void 0,e.ILanguageFeatureDebounceService=(0,k.createDecorator)("ILanguageFeatureDebounceService");var w;(function(o){const c=new WeakMap;let i=0;function S(s){let l=c.get(s);return l===void 0&&(l=++i,c.set(s,l)),l}o.of=S})(w||(w={}));class v{constructor(c,i,S,s,l,r){this._logService=c,this._name=i,this._registry=S,this._default=s,this._min=l,this._max=r,this._cache=new f.LRUCache(50,.7)}_key(c){return c.id+this._registry.all(c).reduce((i,S)=>(0,t.doHash)(w.of(S),i),0)}get(c){const i=this._key(c),S=this._cache.get(i);return S?(0,_.clamp)(S.value,this._min,this._max):this.default()}update(c,i){const S=this._key(c);let s=this._cache.get(S);s||(s=new _.SlidingWindowAverage(6),this._cache.set(S,s));const l=(0,_.clamp)(s.update(i),this._min,this._max);return(0,I.matchesScheme)(c.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${c.uri.toString()} is ${l}ms`),l}_overall(){const c=new _.MovingAverage;for(const[,i]of this._cache)c.update(i.value);return c.value}default(){const c=this._overall()|0||this._default;return(0,_.clamp)(c,this._min,this._max)}}let C=class{constructor(c){this._logService=c,this._data=new Map}for(c,i,S){const s=S?.min??50,l=S?.max??s**2,r=S?.key??void 0,p=`${w.of(c)},${s}${r?","+r:""}`;let u=this._data.get(p);return u||(u=new v(this._logService,i,c,this._overallAverage()|0||s*1.5,s,l),this._data.set(p,u)),u}_overallAverage(){let c=new _.MovingAverage;for(let i of this._data.values())c.update(i.default());return c.value}};C=Ee([W(0,D.ILogService)],C),e.LanguageFeatureDebounceService=C,(0,A.registerSingleton)(e.ILanguageFeatureDebounceService,C,!0)}),define(ne[400],re([1,0,15,30,22,92,55,29,49,20,228,5,35,52,2,62]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlineModelService=e.IOutlineModelService=e.OutlineModel=e.OutlineGroup=e.OutlineElement=e.TreeElement=void 0;class s{remove(){this.parent&&this.parent.children.delete(this.id)}static findId(n,h){let g;typeof n=="string"?g=`${h.id}/${n}`:(g=`${h.id}/${n.name}`,h.children.get(g)!==void 0&&(g=`${h.id}/${n.name}_${n.range.startLineNumber}_${n.range.startColumn}`));let d=g;for(let m=0;h.children.get(d)!==void 0;m++)d=`${g}_${m}`;return d}static getElementById(n,h){if(!n)return;let g=(0,D.commonPrefixLength)(n,h.id);if(g===n.length)return h;if(!(g<h.id.length))for(const[,d]of h.children){let m=s.getElementById(n,d);if(m)return m}}static size(n){let h=1;for(const[,g]of n.children)h+=s.size(g);return h}static empty(n){return n.children.size===0}}e.TreeElement=s;class l extends s{constructor(n,h,g){super();this.id=n,this.parent=h,this.symbol=g,this.children=new Map}}e.OutlineElement=l;class r extends s{constructor(n,h,g,d){super();this.id=n,this.parent=h,this.label=g,this.order=d,this.children=new Map}getItemEnclosingPosition(n){return n?this._getItemEnclosingPosition(n,this.children):void 0}_getItemEnclosingPosition(n,h){for(const[,g]of h)if(!(!g.symbol.range||!w.Range.containsPosition(g.symbol.range,n)))return this._getItemEnclosingPosition(n,g.children)||g}updateMarker(n){for(const[,h]of this.children)this._updateMarker(n,h)}_updateMarker(n,h){h.marker=void 0;let g=(0,t.binarySearch)(n,h.symbol.range,w.Range.compareRangesUsingStarts),d;g<0?(d=~g,d>0&&w.Range.areIntersecting(n[d-1],h.symbol.range)&&(d-=1)):d=g;let m=[],b;for(;d<n.length&&w.Range.areIntersecting(h.symbol.range,n[d]);d++){let E=n[d];m.push(E),n[d]=void 0,(!b||E.severity>b)&&(b=E.severity)}for(const[,E]of h.children)this._updateMarker(m,E);b&&(h.marker={count:m.length,topSev:b}),(0,t.coalesceInPlace)(n)}}e.OutlineGroup=r;class p extends s{constructor(n){super();this.uri=n,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}static create(n,h,g){const d=new f.CancellationTokenSource(g),m=new p(h.uri),b=n.ordered(h),E=b.map((T,R)=>{let O=s.findId(`provider_${R}`,m),x=new r(O,m,T.displayName??"Unknown Outline Provider",R);return Promise.resolve(T.provideDocumentSymbols(h,d.token)).then(F=>{for(const L of F||[])p._makeOutlineElement(L,x);return x},F=>((0,_.onUnexpectedExternalError)(F),x)).then(F=>{s.empty(F)?F.remove():m._groups.set(O,F)})}),y=n.onDidChange(()=>{const T=n.ordered(h);(0,t.equals)(T,b)||d.cancel()});return Promise.all(E).then(()=>d.token.isCancellationRequested&&!g.isCancellationRequested?p.create(n,h,g):m._compact()).finally(()=>{y.dispose()})}static _makeOutlineElement(n,h){let g=s.findId(n,h),d=new l(g,h,n);if(n.children)for(const m of n.children)p._makeOutlineElement(m,d);h.children.set(d.id,d)}static get(n){for(;n;){if(n instanceof p)return n;n=n.parent}}_compact(){let n=0;for(const[h,g]of this._groups)g.children.size===0?this._groups.delete(h):n+=1;if(n!==1)this.children=this._groups;else{let h=A.Iterable.first(this._groups.values());for(let[,g]of h.children)g.parent=this,this.children.set(g.id,g)}return this}merge(n){return this.uri.toString()!==n.uri.toString()||this._groups.size!==n._groups.size?!1:(this._groups=n._groups,this.children=n.children,!0)}getItemEnclosingPosition(n,h){let g;if(h){let m=h.parent;for(;m&&!g;)m instanceof r&&(g=m),m=m.parent}let d;for(const[,m]of this._groups)if(d=m.getItemEnclosingPosition(n),d&&(!g||g===m))break;return d}getItemById(n){return s.getElementById(n,this)}updateMarker(n){n.sort(w.Range.compareRangesUsingStarts);for(const[,h]of this._groups)h.updateMarker(n.slice(0))}getTopLevelSymbols(){const n=[];for(const h of this.children.values())h instanceof l?n.push(h.symbol):n.push(...A.Iterable.map(h.children.values(),g=>g.symbol));return n.sort((h,g)=>w.Range.compareRangesUsingStarts(h.range,g.range))}asListOfDocumentSymbols(){const n=this.getTopLevelSymbols(),h=[];return p._flattenDocumentSymbols(h,n,""),h.sort((g,d)=>I.Position.compare(w.Range.getStartPosition(g.range),w.Range.getStartPosition(d.range))||I.Position.compare(w.Range.getEndPosition(d.range),w.Range.getEndPosition(g.range)))}static _flattenDocumentSymbols(n,h,g){for(const d of h)n.push({kind:d.kind,tags:d.tags,name:d.name,detail:d.detail,containerName:d.containerName||g,range:d.range,selectionRange:d.selectionRange,children:void 0}),d.children&&p._flattenDocumentSymbols(n,d.children,d.name)}}e.OutlineModel=p,e.IOutlineModelService=(0,C.createDecorator)("IOutlineModelService");let u=class{constructor(n,h,g){this._languageFeaturesService=n,this._disposables=new i.DisposableStore,this._cache=new k.LRUCache(10,.7),this._debounceInformation=h.for(n.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(g.onModelRemoved(d=>{this._cache.delete(d.id)}))}dispose(){this._disposables.dispose()}async getOrCreate(n,h){const g=this._languageFeaturesService.documentSymbolProvider,d=g.ordered(n);let m=this._cache.get(n.id);if(!m||m.versionId!==n.getVersionId()||!(0,t.equals)(m.provider,d)){let E=new f.CancellationTokenSource;m={versionId:n.getVersionId(),provider:d,promiseCnt:0,source:E,promise:p.create(g,n,E.token),model:void 0},this._cache.set(n.id,m);const y=Date.now();m.promise.then(T=>{m.model=T,this._debounceInformation.update(n,Date.now()-y)}).catch(T=>{this._cache.delete(n.id)})}if(m.model)return m.model;m.promiseCnt+=1;const b=h.onCancellationRequested(()=>{--m.promiseCnt==0&&(m.source.cancel(),this._cache.delete(n.id))});try{return await m.promise}finally{b.dispose()}}getDebounceValue(n){return this._debounceInformation.get(n)}};u=Ee([W(0,S.ILanguageFeaturesService),W(1,v.ILanguageFeatureDebounceService),W(2,c.IModelService)],u),e.OutlineModelService=u,(0,o.registerSingleton)(e.IOutlineModelService,u,!0)}),define(ne[1969],re([1,0,30,13,9,61,400,28]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),D.CommandsRegistry.registerCommand("_executeDocumentSymbolProvider",async function(I,...w){const[v]=w;(0,f.assertType)(_.URI.isUri(v));const C=I.get(k.IOutlineModelService),c=await I.get(A.ITextModelService).createModelReference(v);try{return(await C.getOrCreate(c.object.textEditorModel,t.CancellationToken.None)).getTopLevelSymbols()}finally{c.dispose()}})}),define(ne[310],re([1,0,18,14,196,19]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let k;if(typeof f.globals.vscode!="undefined"&&typeof f.globals.vscode.context!="undefined"){const D=f.globals.vscode.context.configuration();if(D)k=D.product;else throw new Error("Sandbox: unable to resolve product configuration from preload script.")}else if(typeof Q?.__$__nodeRequire=="function"){const D=(0,A.dirname)(t.FileAccess.asFileUri("",Q));k=Q.__$__nodeRequire((0,A.joinPath)(D,"product.json").fsPath);const I=Q.__$__nodeRequire((0,A.joinPath)(D,"package.json").fsPath);_.env.VSCODE_DEV&&Object.assign(k,{nameShort:`${k.nameShort} Dev`,nameLong:`${k.nameLong} Dev`,dataFolderName:`${k.dataFolderName}-dev`,serverDataFolderName:k.serverDataFolderName?`${k.serverDataFolderName}-dev`:void 0}),Object.assign(k,{version:I.version})}else k={},Object.keys(k).length===0&&Object.assign(k,{version:"1.66.0-dev",nameShort:"Code - OSS Dev",nameLong:"Code - OSS Dev",applicationName:"code-oss",dataFolderName:".vscode-oss",urlProtocol:"code-oss",reportIssueUrl:"https://github.com/microsoft/vscode/issues/new",licenseName:"MIT",licenseUrl:"https://github.com/microsoft/vscode/blob/main/LICENSE.txt"});e.default=k}),define(ne[46],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.productSchemaId=e.IProductService=void 0,e.IProductService=(0,t.createDecorator)("productService"),e.productSchemaId="vscode://schemas/vscode-product"}),define(ne[467],re([1,0,48,5]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Utils=e.IV8InspectProfilingService=void 0,e.IV8InspectProfilingService=(0,f.createDecorator)("IV8InspectProfilingService");var _;(function(A){function k(D,I="noAbsolutePaths"){for(const w of D.nodes)w.callFrame&&w.callFrame.url&&((0,t.isAbsolute)(w.callFrame.url)||/^\w[\w\d+.-]*:\/\/\//.test(w.callFrame.url))&&(w.callFrame.url=(0,t.join)(I,(0,t.basename)(w.callFrame.url)));return D}A.rewriteAbsolutePaths=k})(_=e.Utils||(e.Utils={}))}),define(ne[1970],re([1,0,103,467]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerSharedProcessRemoteService)(f.IV8InspectProfilingService,"v8InspectProfiling",{supportsDelayedInstantiation:!0})}),define(ne[67],re([1,0,11,30,2,5]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEditorProgressService=e.LongRunningOperation=e.UnmanagedProgress=e.Progress=e.emptyProgressRunner=e.ProgressLocation=e.IProgressService=void 0,e.IProgressService=(0,A.createDecorator)("progressService");var k;(function(v){v[v.Explorer=1]="Explorer",v[v.Scm=3]="Scm",v[v.Extensions=5]="Extensions",v[v.Window=10]="Window",v[v.Notification=15]="Notification",v[v.Dialog=20]="Dialog"})(k=e.ProgressLocation||(e.ProgressLocation={})),e.emptyProgressRunner=Object.freeze({total(){},worked(){},done(){}});class D{constructor(C){this.callback=C}get value(){return this._value}report(C){this._value=C,this.callback(this._value)}}e.Progress=D,D.None=Object.freeze({report(){}});let I=class extends _.Disposable{constructor(C,o){super();this.deferred=new t.DeferredPromise,o.withProgress(C,c=>(this.reporter=c,this.lastStep&&c.report(this.lastStep),this.deferred.p)),this._register((0,_.toDisposable)(()=>this.deferred.complete()))}report(C){this.reporter?this.reporter.report(C):this.lastStep=C}};I=Ee([W(1,e.IProgressService)],I),e.UnmanagedProgress=I;class w extends _.Disposable{constructor(C){super();this.progressIndicator=C,this.currentOperationId=0,this.currentOperationDisposables=this._register(new _.DisposableStore)}start(C){this.stop();const o=++this.currentOperationId,c=new f.CancellationTokenSource;return this.currentProgressTimeout=setTimeout(()=>{o===this.currentOperationId&&(this.currentProgressRunner=this.progressIndicator.show(!0))},C),this.currentOperationDisposables.add((0,_.toDisposable)(()=>clearTimeout(this.currentProgressTimeout))),this.currentOperationDisposables.add((0,_.toDisposable)(()=>c.cancel())),this.currentOperationDisposables.add((0,_.toDisposable)(()=>this.currentProgressRunner?this.currentProgressRunner.done():void 0)),{id:o,token:c.token,stop:()=>this.doStop(o),isCurrent:()=>this.currentOperationId===o}}stop(){this.doStop(this.currentOperationId)}doStop(C){this.currentOperationId===C&&this.currentOperationDisposables.clear()}}e.LongRunningOperation=w,e.IEditorProgressService=(0,A.createDecorator)("editorProgressService")}),define(ne[245],re([1,0,11,30,2]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PickerQuickAccessProvider=e.TriggerAction=void 0;var A;(function(w){w[w.NO_ACTION=0]="NO_ACTION",w[w.CLOSE_PICKER=1]="CLOSE_PICKER",w[w.REFRESH_PICKER=2]="REFRESH_PICKER",w[w.REMOVE_ITEM=3]="REMOVE_ITEM"})(A=e.TriggerAction||(e.TriggerAction={}));function k(w){const v=w;return Array.isArray(v.items)}function D(w){const v=w;return!!v.picks&&v.additionalPicks instanceof Promise}class I extends _.Disposable{constructor(v,C){super();this.prefix=v,this.options=C}provide(v,C){const o=new _.DisposableStore;v.canAcceptInBackground=!!this.options?.canAcceptInBackground,v.matchOnLabel=v.matchOnDescription=v.matchOnDetail=v.sortByLabel=!1;let c;const i=o.add(new _.MutableDisposable),S=async()=>{const s=i.value=new _.DisposableStore;c?.dispose(!0),v.busy=!1,c=new f.CancellationTokenSource(C);const l=c.token,r=v.value.substr(this.prefix.length).trim(),p=this._getPicks(r,s,l),u=(a,n)=>{let h,g;if(k(a)?(h=a.items,g=a.active):h=a,h.length===0){if(n)return!1;r.length>0&&this.options?.noResultsPick&&(h=[this.options.noResultsPick])}return v.items=h,g&&(v.activeItems=[g]),!0};if(p!==null)if(D(p)){let a=!1,n=!1;await Promise.all([(async()=>{await(0,t.timeout)(I.FAST_PICKS_RACE_DELAY),!l.isCancellationRequested&&(n||(a=u(p.picks,!0)))})(),(async()=>{v.busy=!0;try{const h=await p.additionalPicks;if(l.isCancellationRequested)return;let g,d;k(p.picks)?(g=p.picks.items,d=p.picks.active):g=p.picks;let m,b;if(k(h)?(m=h.items,b=h.active):m=h,m.length>0||!a){let E;if(!d&&!b){const y=v.activeItems[0];y&&g.indexOf(y)!==-1&&(E=y)}u({items:[...g,...m],active:d||b||E})}}finally{l.isCancellationRequested||(v.busy=!1),n=!0}})()])}else if(!(p instanceof Promise))u(p);else{v.busy=!0;try{const a=await p;if(l.isCancellationRequested)return;u(a)}finally{l.isCancellationRequested||(v.busy=!1)}}};return o.add(v.onDidChangeValue(()=>S())),S(),o.add(v.onDidAccept(s=>{const[l]=v.selectedItems;typeof l?.accept=="function"&&(s.inBackground||v.hide(),l.accept(v.keyMods,s))})),o.add(v.onDidTriggerItemButton(async({button:s,item:l})=>{if(typeof l.trigger=="function"){const r=l.buttons?.indexOf(s)??-1;if(r>=0){const p=l.trigger(r,v.keyMods),u=typeof p=="number"?p:await p;if(C.isCancellationRequested)return;switch(u){case A.NO_ACTION:break;case A.CLOSE_PICKER:v.hide();break;case A.REFRESH_PICKER:S();break;case A.REMOVE_ITEM:{const a=v.items.indexOf(l);if(a!==-1){const n=v.items.slice(),h=n.splice(a,1),g=v.activeItems.filter(m=>m!==h[0]),d=v.keepScrollPosition;v.keepScrollPosition=!0,v.items=n,g&&(v.activeItems=g),v.keepScrollPosition=d}break}}}}})),o}}e.PickerQuickAccessProvider=I,I.FAST_PICKS_RACE_DELAY=200});var oc=this&&this.__createBinding||(Object.create?function(Q,e,t,f){f===void 0&&(f=t);var _=Object.getOwnPropertyDescriptor(e,t);(!_||("get"in _?!e.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(Q,f,_)}:function(Q,e,t,f){f===void 0&&(f=t),Q[f]=e[t]}),ac=this&&this.__exportStar||function(Q,e){for(var t in Q)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&oc(e,Q,t)};define(ne[53],re([1,0,5,658]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IQuickInputService=void 0,ac(f,e),e.IQuickInputService=(0,t.createDecorator)("quickInputService")}),define(ne[17],re([1,0,515,13]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Registry=void 0;class _{constructor(){this.data=new Map}add(k,D){t.ok(f.isString(k)),t.ok(f.isObject(D)),t.ok(!this.data.has(k),"There is already an extension with this id"),this.data.set(k,D)}knows(k){return this.data.has(k)}as(k){return this.data.get(k)||null}}e.Registry=new _}),define(ne[146],re([1,0,6,17]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=void 0,e.Extensions={JSONContribution:"base.contributions.json"};function _(D){return D.length>0&&D.charAt(D.length-1)==="#"?D.substring(0,D.length-1):D}class A{constructor(){this._onDidChangeSchema=new t.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.schemasById={}}registerSchema(I,w){this.schemasById[_(I)]=w,this._onDidChangeSchema.fire(I)}notifySchemaChanged(I){this._onDidChangeSchema.fire(I)}getSchemaContributions(){return{schemas:this.schemasById}}}const k=new A;f.Registry.add(e.Extensions.JSONContribution,k)}),define(ne[57],re([1,0,15,6,13,1319,8,146,17]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getScopes=e.validateProperty=e.getDefaultValue=e.keyFromOverrideIdentifiers=e.overrideIdentifiersFromKey=e.OVERRIDE_PROPERTY_REGEX=e.OVERRIDE_PROPERTY_PATTERN=e.configurationDefaultsSchemaId=e.resourceLanguageSettingsSchemaId=e.resourceSettings=e.windowSettings=e.machineOverridableSettings=e.machineSettings=e.applicationSettings=e.allSettings=e.ConfigurationScope=e.Extensions=e.EditPresentationTypes=void 0;var w;(function(a){a.Multiline="multilineText",a.Singleline="singlelineText"})(w=e.EditPresentationTypes||(e.EditPresentationTypes={})),e.Extensions={Configuration:"base.contributions.configuration"};var v;(function(a){a[a.APPLICATION=1]="APPLICATION",a[a.MACHINE=2]="MACHINE",a[a.WINDOW=3]="WINDOW",a[a.RESOURCE=4]="RESOURCE",a[a.LANGUAGE_OVERRIDABLE=5]="LANGUAGE_OVERRIDABLE",a[a.MACHINE_OVERRIDABLE=6]="MACHINE_OVERRIDABLE"})(v=e.ConfigurationScope||(e.ConfigurationScope={})),e.allSettings={properties:{},patternProperties:{}},e.applicationSettings={properties:{},patternProperties:{}},e.machineSettings={properties:{},patternProperties:{}},e.machineOverridableSettings={properties:{},patternProperties:{}},e.windowSettings={properties:{},patternProperties:{}},e.resourceSettings={properties:{},patternProperties:{}},e.resourceLanguageSettingsSchemaId="vscode://schemas/settings/resourceLanguage",e.configurationDefaultsSchemaId="vscode://schemas/settings/configurationDefaults";const C=I.Registry.as(D.Extensions.JSONContribution);class o{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new f.Emitter,this.onDidSchemaChange=this._onDidSchemaChange.event,this._onDidUpdateConfiguration=new f.Emitter,this.onDidUpdateConfiguration=this._onDidUpdateConfiguration.event,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:A.localize(0,null),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting",allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.excludedConfigurationProperties={},C.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(n,h=!0){this.registerConfigurations([n],h)}registerConfigurations(n,h=!0){const g=this.doRegisterConfigurations(n,h);C.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:g})}deregisterConfigurations(n){const h=this.doDeregisterConfigurations(n);C.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:h})}updateConfigurations({add:n,remove:h}){const g=[];g.push(...this.doDeregisterConfigurations(h)),g.push(...this.doRegisterConfigurations(n,!1)),C.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:(0,t.distinct)(g)})}registerDefaultConfigurations(n){const h=[],g=[];for(const{overrides:d,source:m}of n)for(const b in d)if(h.push(b),e.OVERRIDE_PROPERTY_REGEX.test(b)){const E={...this.configurationDefaultsOverrides.get(b)?.value||{},...d[b]};this.configurationDefaultsOverrides.set(b,{source:m,value:E});const y=(0,k.getLanguageTagSettingPlainKey)(b),T={type:"object",default:E,description:A.localize(1,null,y),$ref:e.resourceLanguageSettingsSchemaId,defaultDefaultValue:E,source:_.isString(m)?void 0:m};g.push(...S(b)),this.configurationProperties[b]=T,this.defaultLanguageConfigurationOverridesNode.properties[b]=T}else{this.configurationDefaultsOverrides.set(b,{value:d[b],source:m});const E=this.configurationProperties[b];E&&(this.updatePropertyDefaultValue(b,E),this.updateSchema(b,E))}this.registerOverrideIdentifiers(g),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:h,defaultsOverrides:!0})}deregisterDefaultConfigurations(n){const h=[];for(const{overrides:g,source:d}of n)for(const m in g){const b=this.configurationDefaultsOverrides.get(m),E=_.isString(d)?d:d?.id,y=_.isString(b?.source)?b?.source:b?.source?.id;if(E===y)if(h.push(m),this.configurationDefaultsOverrides.delete(m),e.OVERRIDE_PROPERTY_REGEX.test(m))delete this.configurationProperties[m],delete this.defaultLanguageConfigurationOverridesNode.properties[m];else{const T=this.configurationProperties[m];T&&(this.updatePropertyDefaultValue(m,T),this.updateSchema(m,T))}}this.updateOverridePropertyPatternKey(),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:h,defaultsOverrides:!0})}notifyConfigurationSchemaUpdated(...n){this._onDidSchemaChange.fire()}registerOverrideIdentifiers(n){for(const h of n)this.overrideIdentifiers.add(h);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(n,h){const g=[];return n.forEach(d=>{g.push(...this.validateAndRegisterProperties(d,h,d.extensionInfo,d.restrictedProperties)),this.configurationContributors.push(d),this.registerJSONConfiguration(d)}),g}doDeregisterConfigurations(n){const h=[],g=d=>{if(d.properties)for(const m in d.properties)h.push(m),delete this.configurationProperties[m],this.removeFromSchema(m,d.properties[m]);d.allOf&&d.allOf.forEach(m=>g(m))};for(const d of n){g(d);const m=this.configurationContributors.indexOf(d);m!==-1&&this.configurationContributors.splice(m,1)}return h}validateAndRegisterProperties(n,h=!0,g,d,m=3){m=_.isUndefinedOrNull(n.scope)?m:n.scope;let b=[],E=n.properties;if(E)for(let T in E){if(h&&p(T)){delete E[T];continue}const R=E[T];if(R.source=g,R.defaultDefaultValue=E[T].default,this.updatePropertyDefaultValue(T,R),e.OVERRIDE_PROPERTY_REGEX.test(T)?R.scope=void 0:(R.scope=_.isUndefinedOrNull(R.scope)?m:R.scope,R.restricted=_.isUndefinedOrNull(R.restricted)?!!d?.includes(T):R.restricted),E[T].hasOwnProperty("included")&&!E[T].included){this.excludedConfigurationProperties[T]=E[T],delete E[T];continue}else this.configurationProperties[T]=E[T];!E[T].deprecationMessage&&E[T].markdownDeprecationMessage&&(E[T].deprecationMessage=E[T].markdownDeprecationMessage),b.push(T)}let y=n.allOf;if(y)for(let T of y)b.push(...this.validateAndRegisterProperties(T,h,g,d,m));return b}getConfigurations(){return this.configurationContributors}getConfigurationProperties(){return this.configurationProperties}getExcludedConfigurationProperties(){return this.excludedConfigurationProperties}getConfigurationDefaultsOverrides(){return this.configurationDefaultsOverrides}registerJSONConfiguration(n){const h=g=>{let d=g.properties;if(d)for(const b in d)this.updateSchema(b,d[b]);let m=g.allOf;m&&m.forEach(h)};h(n)}updateSchema(n,h){switch(e.allSettings.properties[n]=h,h.scope){case 1:e.applicationSettings.properties[n]=h;break;case 2:e.machineSettings.properties[n]=h;break;case 6:e.machineOverridableSettings.properties[n]=h;break;case 3:e.windowSettings.properties[n]=h;break;case 4:e.resourceSettings.properties[n]=h;break;case 5:e.resourceSettings.properties[n]=h,this.resourceLanguageSettingsSchema.properties[n]=h;break}}removeFromSchema(n,h){switch(delete e.allSettings.properties[n],h.scope){case 1:delete e.applicationSettings.properties[n];break;case 2:delete e.machineSettings.properties[n];break;case 6:delete e.machineOverridableSettings.properties[n];break;case 3:delete e.windowSettings.properties[n];break;case 4:case 5:delete e.resourceSettings.properties[n],delete this.resourceLanguageSettingsSchema.properties[n];break}}updateOverridePropertyPatternKey(){for(const n of this.overrideIdentifiers.values()){const h=`[${n}]`,g={type:"object",description:A.localize(2,null),errorMessage:A.localize(3,null),$ref:e.resourceLanguageSettingsSchemaId};this.updatePropertyDefaultValue(h,g),e.allSettings.properties[h]=g,e.applicationSettings.properties[h]=g,e.machineSettings.properties[h]=g,e.machineOverridableSettings.properties[h]=g,e.windowSettings.properties[h]=g,e.resourceSettings.properties[h]=g}this._onDidSchemaChange.fire()}registerOverridePropertyPatternKey(){const n={type:"object",description:A.localize(4,null),errorMessage:A.localize(5,null),$ref:e.resourceLanguageSettingsSchemaId};e.allSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=n,e.applicationSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=n,e.machineSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=n,e.machineOverridableSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=n,e.windowSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=n,e.resourceSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=n,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(n,h){const g=this.configurationDefaultsOverrides.get(n);let d=g?.value,m=g?.source;_.isUndefined(d)&&(d=h.defaultDefaultValue,m=void 0),_.isUndefined(d)&&(d=l(h.type)),h.default=d,h.defaultValueSource=m}}const c="\\[([^\\]]+)\\]",i=new RegExp(c,"g");e.OVERRIDE_PROPERTY_PATTERN=`^(${c})+$`,e.OVERRIDE_PROPERTY_REGEX=new RegExp(e.OVERRIDE_PROPERTY_PATTERN);function S(a){const n=[];if(e.OVERRIDE_PROPERTY_REGEX.test(a)){let h=i.exec(a);for(;h?.length;){const g=h[1].trim();g&&n.push(g),h=i.exec(a)}}return(0,t.distinct)(n)}e.overrideIdentifiersFromKey=S;function s(a){return a.reduce((n,h)=>`${n}[${h}]`,"")}e.keyFromOverrideIdentifiers=s;function l(a){switch(Array.isArray(a)?a[0]:a){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}e.getDefaultValue=l;const r=new o;I.Registry.add(e.Extensions.Configuration,r);function p(a){return a.trim()?e.OVERRIDE_PROPERTY_REGEX.test(a)?A.localize(7,null,a):r.getConfigurationProperties()[a]!==void 0?A.localize(8,null,a):null:A.localize(6,null)}e.validateProperty=p;function u(){const a=[],n=r.getConfigurationProperties();for(const h of Object.keys(n))a.push([h,n[h].scope]);return a.push(["launch",4]),a.push(["task",4]),a}e.getScopes=u}),define(ne[553],re([1,0,123,455,1240,57,17]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isDiffEditorConfigurationKey=e.isEditorConfigurationKey=e.editorConfigurationBaseNode=void 0,e.editorConfigurationBaseNode=Object.freeze({id:"editor",order:5,type:"object",title:_.localize(0,null),scope:5});const D={...e.editorConfigurationBaseNode,properties:{"editor.tabSize":{type:"number",default:f.EDITOR_MODEL_DEFAULTS.tabSize,minimum:1,markdownDescription:_.localize(1,null)},"editor.insertSpaces":{type:"boolean",default:f.EDITOR_MODEL_DEFAULTS.insertSpaces,markdownDescription:_.localize(2,null)},"editor.detectIndentation":{type:"boolean",default:f.EDITOR_MODEL_DEFAULTS.detectIndentation,markdownDescription:_.localize(3,null)},"editor.trimAutoWhitespace":{type:"boolean",default:f.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,description:_.localize(4,null)},"editor.largeFileOptimizations":{type:"boolean",default:f.EDITOR_MODEL_DEFAULTS.largeFileOptimizations,description:_.localize(5,null)},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:_.localize(6,null)},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[_.localize(7,null),_.localize(8,null),_.localize(9,null)],description:_.localize(10,null)},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[_.localize(11,null),_.localize(12,null),_.localize(13,null)],default:"configuredByTheme",description:_.localize(14,null)},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:_.localize(15,null)},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:_.localize(16,null)},"editor.language.brackets":{type:"array",default:!1,description:_.localize(17,null),items:{type:"array",items:[{type:"string",description:_.localize(18,null)},{type:"string",description:_.localize(19,null)}]}},"editor.language.colorizedBracketPairs":{type:"array",default:!1,description:_.localize(20,null),items:{type:"array",items:[{type:"string",description:_.localize(21,null)},{type:"string",description:_.localize(22,null)}]}},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:_.localize(23,null)},"diffEditor.maxFileSize":{type:"number",default:50,description:_.localize(24,null)},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:_.localize(25,null)},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:_.localize(26,null)},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:_.localize(27,null)},"diffEditor.codeLens":{type:"boolean",default:!1,description:_.localize(28,null)},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:"inherit",markdownEnumDescriptions:[_.localize(29,null),_.localize(30,null),_.localize(31,null)]}}};function I(i){return typeof i.type!="undefined"||typeof i.anyOf!="undefined"}for(const i of t.editorOptionsRegistry){const S=i.schema;if(typeof S!="undefined")if(I(S))D.properties[`editor.${i.name}`]=S;else for(const s in S)Object.hasOwnProperty.call(S,s)&&(D.properties[s]=S[s])}let w=null;function v(){return w===null&&(w=Object.create(null),Object.keys(D.properties).forEach(i=>{w[i]=!0})),w}function C(i){return v()[`editor.${i}`]||!1}e.isEditorConfigurationKey=C;function o(i){return v()[`diffEditor.${i}`]||!1}e.isDiffEditorConfigurationKey=o,k.Registry.as(A.Extensions.Configuration).registerConfiguration(D)}),define(ne[126],re([1,0,1248,6,124,17,169,57]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PLAINTEXT_EXTENSION=e.PLAINTEXT_LANGUAGE_ID=e.ModesRegistry=e.EditorModesRegistry=e.Extensions=void 0,e.Extensions={ModesRegistry:"editor.modesRegistry"};class I{constructor(){this._onDidChangeLanguages=new f.Emitter,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(v){return this._languages.push(v),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let C=0,o=this._languages.length;C<o;C++)if(this._languages[C]===v){this._languages.splice(C,1);return}}}}getLanguages(){return this._languages}}e.EditorModesRegistry=I,e.ModesRegistry=new I,A.Registry.add(e.Extensions.ModesRegistry,e.ModesRegistry),e.PLAINTEXT_LANGUAGE_ID="plaintext",e.PLAINTEXT_EXTENSION=".txt",e.ModesRegistry.registerLanguage({id:e.PLAINTEXT_LANGUAGE_ID,extensions:[e.PLAINTEXT_EXTENSION],aliases:[t.localize(0,null),"text"],mimetypes:[k.Mimes.text]}),_.LanguageConfigurationRegistry.register(e.PLAINTEXT_LANGUAGE_ID,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0),A.Registry.as(D.Extensions.Configuration).registerDefaultConfigurations([{overrides:{"[plaintext]":{"editor.unicodeHighlight.ambiguousCharacters":!1,"editor.unicodeHighlight.invisibleCharacters":!1}}}])}),define(ne[198],re([1,0,18,19,126,23]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cssEscape=e.getIconClassesForLanguageId=e.getIconClasses=void 0;const k=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function D(C,o,c,i){const S=i===A.FileKind.ROOT_FOLDER?["rootfolder-icon"]:i===A.FileKind.FOLDER?["folder-icon"]:["file-icon"];if(c){let s;if(c.scheme===t.Schemas.data)s=f.DataUri.parseMetaData(c).get(f.DataUri.META_DATA_LABEL);else{const l=c.path.match(k);l?(s=v(l[2].toLowerCase()),l[1]&&S.push(`${v(l[1].toLowerCase())}-name-dir-icon`)):s=v(c.authority.toLowerCase())}if(i===A.FileKind.FOLDER)S.push(`${s}-name-folder-icon`);else{if(s){if(S.push(`${s}-name-file-icon`),S.push("name-file-icon"),s.length<=255){const r=s.split(".");for(let p=1;p<r.length;p++)S.push(`${r.slice(p).join(".")}-ext-file-icon`)}S.push("ext-file-icon")}const l=w(C,o,c);l&&S.push(`${v(l)}-lang-file-icon`)}}return S}e.getIconClasses=D;function I(C){return["file-icon",`${v(C)}-lang-file-icon`]}e.getIconClassesForLanguageId=I;function w(C,o,c){if(!c)return null;let i=null;if(c.scheme===t.Schemas.data){const s=f.DataUri.parseMetaData(c).get(f.DataUri.META_DATA_MIME);s&&(i=o.getLanguageIdByMimeType(s))}else{const S=C.getModel(c);S&&(i=S.getLanguageId())}return i&&i!==_.PLAINTEXT_LANGUAGE_ID?i:o.guessLanguageIdByFilepathOrFirstLine(c)}function v(C){return C.replace(/[\11\12\14\15\40]/g,"/")}e.cssEscape=v}),define(ne[350],re([1,0,152,169,18,48,19,29,126]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLanguageIds=e.getMimeTypes=e.clearConfiguredLanguageAssociations=e.clearPlatformLanguageAssociations=e.registerConfiguredLanguageAssociation=e.registerPlatformLanguageAssociation=void 0;let w=[],v=[],C=[];function o(h,g=!1){i(h,!1,g)}e.registerPlatformLanguageAssociation=o;function c(h){i(h,!0,!1)}e.registerConfiguredLanguageAssociation=c;function i(h,g,d){const m=S(h,g);w.push(m),m.userConfigured?C.push(m):v.push(m),d&&!m.userConfigured&&w.forEach(b=>{b.mime===m.mime||b.userConfigured||(m.extension&&b.extension===m.extension&&console.warn(`Overwriting extension <<${m.extension}>> to now point to mime <<${m.mime}>>`),m.filename&&b.filename===m.filename&&console.warn(`Overwriting filename <<${m.filename}>> to now point to mime <<${m.mime}>>`),m.filepattern&&b.filepattern===m.filepattern&&console.warn(`Overwriting filepattern <<${m.filepattern}>> to now point to mime <<${m.mime}>>`),m.firstline&&b.firstline===m.firstline&&console.warn(`Overwriting firstline <<${m.firstline}>> to now point to mime <<${m.mime}>>`))})}function S(h,g){return{id:h.id,mime:h.mime,filename:h.filename,extension:h.extension,filepattern:h.filepattern,firstline:h.firstline,userConfigured:g,filenameLowercase:h.filename?h.filename.toLowerCase():void 0,extensionLowercase:h.extension?h.extension.toLowerCase():void 0,filepatternLowercase:h.filepattern?(0,t.parse)(h.filepattern.toLowerCase()):void 0,filepatternOnPath:h.filepattern?h.filepattern.indexOf(A.posix.sep)>=0:!1}}function s(){w=w.filter(h=>h.userConfigured),v=[]}e.clearPlatformLanguageAssociations=s;function l(){w=w.filter(h=>!h.userConfigured),C=[]}e.clearConfiguredLanguageAssociations=l;function r(h,g){return u(h,g).map(d=>d.mime)}e.getMimeTypes=r;function p(h,g){return u(h,g).map(d=>d.id)}e.getLanguageIds=p;function u(h,g){let d;if(h)switch(h.scheme){case _.Schemas.file:d=h.fsPath;break;case _.Schemas.data:{d=k.DataUri.parseMetaData(h).get(k.DataUri.META_DATA_LABEL);break}default:d=h.path}if(!d)return[{id:"unknown",mime:f.Mimes.unknown}];d=d.toLowerCase();const m=(0,A.basename)(d),b=a(d,m,C);if(b)return[b,{id:I.PLAINTEXT_LANGUAGE_ID,mime:f.Mimes.text}];const E=a(d,m,v);if(E)return[E,{id:I.PLAINTEXT_LANGUAGE_ID,mime:f.Mimes.text}];if(g){const y=n(g);if(y)return[y,{id:I.PLAINTEXT_LANGUAGE_ID,mime:f.Mimes.text}]}return[{id:"unknown",mime:f.Mimes.unknown}]}function a(h,g,d){let m,b,E;for(let y=d.length-1;y>=0;y--){const T=d[y];if(g===T.filenameLowercase){m=T;break}if(T.filepattern&&(!b||T.filepattern.length>b.filepattern.length)){const R=T.filepatternOnPath?h:g;T.filepatternLowercase?.(R)&&(b=T)}T.extension&&(!E||T.extension.length>E.extension.length)&&g.endsWith(T.extensionLowercase)&&(E=T)}if(m)return m;if(b)return b;if(E)return E}function n(h){if((0,D.startsWithUTF8BOM)(h)&&(h=h.substr(1)),h.length>0)for(let g=w.length-1;g>=0;g--){const d=w[g];if(!d.firstline)continue;const m=h.match(d.firstline);if(m&&m.length>0)return d}}}),define(ne[1971],re([1,0,22,6,2,29,350,126,57,17,124]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguagesRegistry=e.LanguageIdCodec=void 0;const C=Object.prototype.hasOwnProperty,o="vs.editor.nullLanguage";v.LanguageConfigurationRegistry.register(o,{});class c{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(o,0),this._register(D.PLAINTEXT_LANGUAGE_ID,1),this._nextLanguageId=2}_register(s,l){this._languageIdToLanguage[l]=s,this._languageToLanguageId.set(s,l)}register(s){if(this._languageToLanguageId.has(s))return;const l=this._nextLanguageId++;this._register(s,l)}encodeLanguageId(s){return this._languageToLanguageId.get(s)||0}decodeLanguageId(s){return this._languageIdToLanguage[s]||o}}e.LanguageIdCodec=c;class i extends _.Disposable{constructor(s=!0,l=!1){super();this._onDidChange=this._register(new f.Emitter),this.onDidChange=this._onDidChange.event,i.instanceCount++,this._warnOnOverwrite=l,this.languageIdCodec=new c,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},s&&(this._initializeFromRegistry(),this._register(D.ModesRegistry.onDidChangeLanguages(r=>{this._initializeFromRegistry()})))}dispose(){i.instanceCount--,super.dispose()}setDynamicLanguages(s){this._dynamicLanguages=s,this._initializeFromRegistry()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},(0,k.clearPlatformLanguageAssociations)();const s=[].concat(D.ModesRegistry.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(s)}_registerLanguages(s){for(const l of s)this._registerLanguage(l);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(l=>{const r=this._languages[l];r.name&&(this._nameMap[r.name]=r.identifier),r.aliases.forEach(p=>{this._lowercaseNameMap[p.toLowerCase()]=r.identifier}),r.mimetypes.forEach(p=>{this._mimeTypesMap[p]=r.identifier})}),w.Registry.as(I.Extensions.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(s){const l=s.id;let r;C.call(this._languages,l)?r=this._languages[l]:(this.languageIdCodec.register(l),r={identifier:l,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[l]=r),this._mergeLanguage(r,s)}_mergeLanguage(s,l){const r=l.id;let p=null;if(Array.isArray(l.mimetypes)&&l.mimetypes.length>0&&(s.mimetypes.push(...l.mimetypes),p=l.mimetypes[0]),p||(p=`text/x-${r}`,s.mimetypes.push(p)),Array.isArray(l.extensions)){l.configuration?s.extensions=l.extensions.concat(s.extensions):s.extensions=s.extensions.concat(l.extensions);for(let n of l.extensions)(0,k.registerPlatformLanguageAssociation)({id:r,mime:p,extension:n},this._warnOnOverwrite)}if(Array.isArray(l.filenames))for(let n of l.filenames)(0,k.registerPlatformLanguageAssociation)({id:r,mime:p,filename:n},this._warnOnOverwrite),s.filenames.push(n);if(Array.isArray(l.filenamePatterns))for(let n of l.filenamePatterns)(0,k.registerPlatformLanguageAssociation)({id:r,mime:p,filepattern:n},this._warnOnOverwrite);if(typeof l.firstLine=="string"&&l.firstLine.length>0){let n=l.firstLine;n.charAt(0)!=="^"&&(n="^"+n);try{const h=new RegExp(n);(0,A.regExpLeadsToEndlessLoop)(h)||(0,k.registerPlatformLanguageAssociation)({id:r,mime:p,firstline:h},this._warnOnOverwrite)}catch(h){(0,t.onUnexpectedError)(h)}}s.aliases.push(r);let u=null;if(typeof l.aliases!="undefined"&&Array.isArray(l.aliases)&&(l.aliases.length===0?u=[null]:u=l.aliases),u!==null)for(const n of u)!n||n.length===0||s.aliases.push(n);const a=u!==null&&u.length>0;if(!(a&&u[0]===null)){const n=(a?u[0]:null)||r;(a||!s.name)&&(s.name=n)}l.configuration&&s.configurationFiles.push(l.configuration),l.icon&&s.icons.push(l.icon)}isRegisteredLanguageId(s){return s?C.call(this._languages,s):!1}getRegisteredLanguageIds(){return Object.keys(this._languages)}getSortedRegisteredLanguageNames(){const s=[];for(const l in this._nameMap)C.call(this._nameMap,l)&&s.push({languageName:l,languageId:this._nameMap[l]});return s.sort((l,r)=>(0,A.compareIgnoreCase)(l.languageName,r.languageName)),s}getLanguageName(s){return C.call(this._languages,s)?this._languages[s].name:null}getMimeType(s){return C.call(this._languages,s)&&this._languages[s].mimetypes[0]||null}getExtensions(s){return C.call(this._languages,s)?this._languages[s].extensions:[]}getFilenames(s){return C.call(this._languages,s)?this._languages[s].filenames:[]}getIcon(s){return C.call(this._languages,s)&&this._languages[s].icons[0]||null}getConfigurationFiles(s){return C.call(this._languages,s)?this._languages[s].configurationFiles||[]:[]}getLanguageIdByLanguageName(s){const l=s.toLowerCase();return C.call(this._lowercaseNameMap,l)?this._lowercaseNameMap[l]:null}getLanguageIdByMimeType(s){return s&&C.call(this._mimeTypesMap,s)?this._mimeTypesMap[s]:null}guessLanguageIdByFilepathOrFirstLine(s,l){return!s&&!l?[]:(0,k.getLanguageIds)(s,l)}}e.LanguagesRegistry=i,i.instanceCount=0}),define(ne[1972],re([1,0,6,2,1971,15,86,126]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageService=void 0;class I extends f.Disposable{constructor(C=!1){super();this._onDidEncounterLanguage=this._register(new t.Emitter),this.onDidEncounterLanguage=this._onDidEncounterLanguage.event,this._onDidChange=this._register(new t.Emitter({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,I.instanceCount++,this._encounteredLanguages=new Set,this._registry=this._register(new _.LanguagesRegistry(!0,C)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onDidChange.fire()))}dispose(){I.instanceCount--,super.dispose()}isRegisteredLanguageId(C){return this._registry.isRegisteredLanguageId(C)}getRegisteredLanguageIds(){return this._registry.getRegisteredLanguageIds()}getSortedRegisteredLanguageNames(){return this._registry.getSortedRegisteredLanguageNames()}getLanguageName(C){return this._registry.getLanguageName(C)}getMimeType(C){return this._registry.getMimeType(C)}getIcon(C){return this._registry.getIcon(C)}getExtensions(C){return this._registry.getExtensions(C)}getFilenames(C){return this._registry.getFilenames(C)}getConfigurationFiles(C){return this._registry.getConfigurationFiles(C)}getLanguageIdByLanguageName(C){return this._registry.getLanguageIdByLanguageName(C)}getLanguageIdByMimeType(C){return this._registry.getLanguageIdByMimeType(C)}guessLanguageIdByFilepathOrFirstLine(C,o){const c=this._registry.guessLanguageIdByFilepathOrFirstLine(C,o);return(0,A.firstOrDefault)(c,null)}createById(C){return new w(this.onDidChange,()=>this._createAndGetLanguageIdentifier(C))}createByMimeType(C){return new w(this.onDidChange,()=>{const o=this.getLanguageIdByMimeType(C);return this._createAndGetLanguageIdentifier(o)})}createByFilepathOrFirstLine(C,o){return new w(this.onDidChange,()=>{const c=this.guessLanguageIdByFilepathOrFirstLine(C,o);return this._createAndGetLanguageIdentifier(c)})}_createAndGetLanguageIdentifier(C){return(!C||!this.isRegisteredLanguageId(C))&&(C=D.PLAINTEXT_LANGUAGE_ID),this._encounteredLanguages.has(C)||(this._encounteredLanguages.add(C),k.TokenizationRegistry.getOrCreate(C),this._onDidEncounterLanguage.fire(C)),C}}e.LanguageService=I,I.instanceCount=0;class w{constructor(C,o){this._onDidChangeLanguages=C,this._selector=o,this._listener=null,this._emitter=null,this.languageId=this._selector()}_dispose(){this._listener&&(this._listener.dispose(),this._listener=null),this._emitter&&(this._emitter.dispose(),this._emitter=null)}get onDidChange(){return this._listener||(this._listener=this._onDidChangeLanguages(()=>this._evaluate())),this._emitter||(this._emitter=new t.Emitter({onLastListenerRemove:()=>{this._dispose()}})),this._emitter.event}_evaluate(){const C=this._selector();C!==this.languageId&&(this.languageId=C,this._emitter&&this._emitter.fire(this.languageId))}}}),define(ne[186],re([1,0,242,41,42,22,308,6,2,227,126]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkdownRenderer=void 0;let C=class Us{constructor(c,i,S){this._options=c,this._languageService=i,this._openerService=S,this._onDidRenderAsync=new D.Emitter,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(c,i,S){if(!c)return{element:document.createElement("span"),dispose:()=>{}};const s=new I.DisposableStore;return{element:s.add((0,t.renderMarkdown)(c,{...this._getRenderOptions(c,s),...i},S)).element,dispose:()=>s.dispose()}}_getRenderOptions(c,i){return{codeBlockRenderer:async(S,s)=>{let l;S?l=this._languageService.getLanguageIdByLanguageName(S):this._options.editor&&(l=this._options.editor.getModel()?.getLanguageId()),l||(l=v.PLAINTEXT_LANGUAGE_ID);const r=await(0,k.tokenizeToString)(this._languageService,s,l),p=document.createElement("span");if(p.innerHTML=Us._ttpTokenizer?.createHTML(r)??r,this._options.editor){const u=this._options.editor.getOption(44);(0,w.applyFontInfo)(p,u)}else this._options.codeBlockFontFamily&&(p.style.fontFamily=this._options.codeBlockFontFamily);return p},asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:S=>this._openerService.open(S,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:c.isTrusted}).catch(A.onUnexpectedError),disposables:i}}}};C._ttpTokenizer=window.trustedTypes?.createPolicy("tokenizeToString",{createHTML(o){return o}}),C=Ee([W(1,_.ILanguageService),W(2,f.IOpenerService)],C),e.MarkdownRenderer=C}),define(ne[1973],re([1,0,10,15,117,2,186,709,41,521]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarginHoverWidget=void 0;const v=t.$;class C extends A.Disposable{constructor(i,S,s=I.NullOpenerService){super();this._renderDisposeables=this._register(new A.DisposableStore),this._editor=i,this._isVisible=!1,this._messages=[],this._hover=this._register(new w.HoverWidget),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new k.MarkdownRenderer({editor:this._editor},S,s)),this._computer=new o(this._editor),this._hoverOperation=this._register(new D.HoverOperation(this._editor,this._computer)),this._register(this._hoverOperation.onResult(l=>{this._withResult(l.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(l=>{l.hasChanged(44)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return C.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(S=>this._editor.applyFontInfo(S))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(i){this._computer.lineNumber!==i&&(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=i,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),!!this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(i){this._messages=i,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(i,S){this._renderDisposeables.clear();const s=document.createDocumentFragment();for(const l of S){const r=v("div.hover-row.markdown-hover"),p=t.append(r,v("div.hover-contents")),u=this._renderDisposeables.add(this._markdownRenderer.render(l.value));p.appendChild(u.element),s.appendChild(r)}this._updateContents(s),this._showAt(i)}_updateContents(i){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(i),this._updateFont()}_showAt(i){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const S=this._editor.getLayoutInfo(),s=this._editor.getTopForLineNumber(i),l=this._editor.getScrollTop(),r=this._editor.getOption(59),p=this._hover.containerDomNode.clientHeight,u=s-l-(p-r)/2;this._hover.containerDomNode.style.left=`${S.glyphMarginLeft+S.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(u),0)}px`}}e.MarginHoverWidget=C,C.ID="editor.contrib.modesGlyphHoverWidget";class o{constructor(i){this._editor=i,this._lineNumber=-1}get lineNumber(){return this._lineNumber}set lineNumber(i){this._lineNumber=i}computeSync(){const i=l=>({value:l}),S=this._editor.getLineDecorations(this._lineNumber),s=[];if(!S)return s;for(const l of S){if(!l.options.glyphMarginClassName)continue;const r=l.options.glyphMarginHoverMessage;!r||(0,_.isEmptyMarkdownString)(r)||s.push(...(0,f.asArray)(r).map(i))}return s}}}),define(ne[740],re([1,0,77,10,139,33,6,117,2,186,123,713,1308,5]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestDetailsOverlay=e.SuggestDetailsWidget=e.canExpandCompletionItem=void 0;function i(l){return!!l&&Boolean(l.completion.documentation||l.completion.detail&&l.completion.detail!==l.completion.label)}e.canExpandCompletionItem=i;let S=class{constructor(r,p){this._editor=r,this._onDidClose=new k.Emitter,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new k.Emitter,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new I.DisposableStore,this._renderDisposeable=new I.DisposableStore,this._borderWidth=1,this._size=new f.Dimension(330,0),this.domNode=f.$(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=p.createInstance(w.MarkdownRenderer,{editor:r}),this._body=f.$(".body"),this._scrollbar=new _.DomScrollableElement(this._body,{}),f.append(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=f.append(this._body,f.$(".header")),this._close=f.append(this._header,f.$("span"+A.Codicon.close.cssSelector)),this._close.title=o.localize(0,null),this._type=f.append(this._header,f.$("p.type")),this._docs=f.append(this._body,f.$("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(u=>{u.hasChanged(44)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const r=this._editor.getOptions(),p=r.get(44),u=p.getMassagedFontFamily(t.isSafari?v.EDITOR_FONT_DEFAULTS.fontFamily:null),a=r.get(107)||p.fontSize,n=r.get(108)||p.lineHeight,h=p.fontWeight,g=`${a}px`,d=`${n}px`;this.domNode.style.fontSize=g,this.domNode.style.lineHeight=`${n/a}`,this.domNode.style.fontWeight=h,this.domNode.style.fontFeatureSettings=p.fontFeatureSettings,this._type.style.fontFamily=u,this._close.style.height=d,this._close.style.width=d}getLayoutInfo(){const r=this._editor.getOption(108)||this._editor.getOption(44).lineHeight,p=this._borderWidth,u=p*2;return{lineHeight:r,borderWidth:p,borderHeight:u,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=o.localize(1,null),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,this.getLayoutInfo().lineHeight*2),this._onDidChangeContents.fire(this)}renderItem(r,p){this._renderDisposeable.clear();let{detail:u,documentation:a}=r.completion;if(p){let n="";n+=`score: ${r.score[0]} `,n+=`prefix: ${r.word??"(no prefix)"} `,n+=`word: ${r.completion.filterText?r.completion.filterText+" (filterText)":r.textLabel} `,n+=`distance: ${r.distance} (localityBonus-setting) `,n+=`index: ${r.idx}, based on ${r.completion.sortText&&`sortText: "${r.completion.sortText}"`||"label"} `,n+=`commit_chars: ${r.completion.commitCharacters?.join("")} `,a=new D.MarkdownString().appendCodeblock("empty",n),u=`Provider: ${r.provider._debugDisplayName}`}if(!p&&!i(r)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),u){const n=u.length>1e5?`${u.substr(0,1e5)}\u2026`:u;this._type.textContent=n,this._type.title=n,f.show(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(n))}else f.clearNode(this._type),this._type.title="",f.hide(this._type),this.domNode.classList.add("no-type");if(f.clearNode(this._docs),typeof a=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=a;else if(a){this._docs.classList.add("markdown-docs"),f.clearNode(this._docs);const n=this._markdownRenderer.render(a);this._docs.appendChild(n.element),this._renderDisposeable.add(n),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync(()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=n=>{n.preventDefault(),n.stopPropagation()},this._close.onclick=n=>{n.preventDefault(),n.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get size(){return this._size}layout(r,p){const u=new f.Dimension(r,p);f.Dimension.equals(u,this._size)||(this._size=u,f.size(this.domNode,r,p)),this._scrollbar.scanDomNode()}scrollDown(r=8){this._body.scrollTop+=r}scrollUp(r=8){this._body.scrollTop-=r}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(r){this._borderWidth=r}get borderWidth(){return this._borderWidth}};S=Ee([W(1,c.IInstantiationService)],S),e.SuggestDetailsWidget=S;class s{constructor(r,p){this.widget=r,this._editor=p,this._disposables=new I.DisposableStore,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new C.ResizableHTMLElement,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(r.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let u,a,n=0,h=0;this._disposables.add(this._resizable.onDidWillResize(()=>{u=this._topLeft,a=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(g=>{if(u&&a){this.widget.layout(g.dimension.width,g.dimension.height);let d=!1;g.west&&(h=a.width-g.dimension.width,d=!0),g.north&&(n=a.height-g.dimension.height,d=!0),d&&this._applyTopLeft({top:u.top+n,left:u.left+h})}g.done&&(u=void 0,a=void 0,n=0,h=0,this._userSize=g.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{this._anchorBox&&this._placeAtAnchor(this._anchorBox,this._userSize??this.widget.size,this._preferAlignAtTop)}))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return null}show(){this._added||(this._editor.addOverlayWidget(this),this.getDomNode().style.position="fixed",this._added=!0)}hide(r=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),r&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(r,p){const u=r.getBoundingClientRect();this._anchorBox=u,this._preferAlignAtTop=p,this._placeAtAnchor(this._anchorBox,this._userSize??this.widget.size,p)}_placeAtAnchor(r,p,u){const a=f.getClientArea(document.body),n=this.widget.getLayoutInfo(),h=new f.Dimension(220,2*n.lineHeight),g=r.top,d=function(){const L=a.width-(r.left+r.width+n.borderWidth+n.horizontalPadding),M=-n.borderWidth+r.left+r.width,N=new f.Dimension(L,a.height-r.top-n.borderHeight-n.verticalPadding),B=N.with(void 0,r.top+r.height-n.borderHeight-n.verticalPadding);return{top:g,left:M,fit:L-p.width,maxSizeTop:N,maxSizeBottom:B,minSize:h.with(Math.min(L,h.width))}}(),m=function(){const L=r.left-n.borderWidth-n.horizontalPadding,M=Math.max(n.horizontalPadding,r.left-p.width-n.borderWidth),N=new f.Dimension(L,a.height-r.top-n.borderHeight-n.verticalPadding),B=N.with(void 0,r.top+r.height-n.borderHeight-n.verticalPadding);return{top:g,left:M,fit:L-p.width,maxSizeTop:N,maxSizeBottom:B,minSize:h.with(Math.min(L,h.width))}}(),b=function(){const L=r.left,M=-n.borderWidth+r.top+r.height,N=new f.Dimension(r.width-n.borderHeight,a.height-r.top-r.height-n.verticalPadding);return{top:M,left:L,fit:N.height-p.height,maxSizeBottom:N,maxSizeTop:N,minSize:h.with(N.width)}}(),E=[d,m,b],y=E.find(L=>L.fit>=0)??E.sort((L,M)=>M.fit-L.fit)[0],T=r.top+r.height-n.borderHeight;let R,O=p.height;const x=Math.max(y.maxSizeTop.height,y.maxSizeBottom.height);O>x&&(O=x);let F;u?O<=y.maxSizeTop.height?(R=!0,F=y.maxSizeTop):(R=!1,F=y.maxSizeBottom):O<=y.maxSizeBottom.height?(R=!1,F=y.maxSizeBottom):(R=!0,F=y.maxSizeTop),this._applyTopLeft({left:y.left,top:R?y.top:T-O}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!R,y===d,R,y!==d),this._resizable.minSize=y.minSize,this._resizable.maxSize=F,this._resizable.layout(O,Math.min(F.width,p.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(r){this._topLeft=r,this.getDomNode().style.left=`${this._topLeft.left}px`,this.getDomNode().style.top=`${this._topLeft.top}px`}}e.SuggestDetailsOverlay=s}),define(ne[468],re([1,0,15,6,118,2,55,51,13,9,8,57,17]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AllKeysConfigurationChangeEvent=e.ConfigurationChangeEvent=e.mergeChanges=e.Configuration=e.UserSettings=e.ConfigurationModelParser=e.DefaultConfigurationModel=e.ConfigurationModel=void 0;class c{constructor(g={},d=[],m=[]){this._contents=g,this._keys=d,this._overrides=m,this.isFrozen=!1,this.overrideConfigurations=new Map}get contents(){return this.checkAndFreeze(this._contents)}get overrides(){return this.checkAndFreeze(this._overrides)}get keys(){return this.checkAndFreeze(this._keys)}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(g){return g?(0,v.getConfigurationValue)(this.contents,g):this.contents}getOverrideValue(g,d){const m=this.getContentsForOverrideIdentifer(d);return m?g?(0,v.getConfigurationValue)(m,g):m:void 0}getKeysForOverrideIdentifier(g){const d=[];for(const m of this.overrides)m.identifiers.includes(g)&&d.push(...m.keys);return t.distinct(d)}getAllOverrideIdentifiers(){const g=[];for(const d of this.overrides)g.push(...d.identifiers);return t.distinct(g)}override(g){let d=this.overrideConfigurations.get(g);return d||(d=this.createOverrideConfigurationModel(g),this.overrideConfigurations.set(g,d)),d}merge(...g){const d=D.deepClone(this.contents),m=D.deepClone(this.overrides),b=[...this.keys];for(const E of g){this.mergeContents(d,E.contents);for(const y of E.overrides){const[T]=m.filter(R=>t.equals(R.identifiers,y.identifiers));T?(this.mergeContents(T.contents,y.contents),T.keys.push(...y.keys),T.keys=t.distinct(T.keys)):m.push(D.deepClone(y))}for(const y of E.keys)b.indexOf(y)===-1&&b.push(y)}return new c(d,b,m)}freeze(){return this.isFrozen=!0,this}createOverrideConfigurationModel(g){const d=this.getContentsForOverrideIdentifer(g);if(!d||typeof d!="object"||!Object.keys(d).length)return this;let m={};for(const b of t.distinct([...Object.keys(this.contents),...Object.keys(d)])){let E=this.contents[b],y=d[b];y&&(typeof E=="object"&&typeof y=="object"?(E=D.deepClone(E),this.mergeContents(E,y)):E=y),m[b]=E}return new c(m,this.keys,this.overrides)}mergeContents(g,d){for(const m of Object.keys(d)){if(m in g&&I.isObject(g[m])&&I.isObject(d[m])){this.mergeContents(g[m],d[m]);continue}g[m]=D.deepClone(d[m])}}checkAndFreeze(g){return this.isFrozen&&!Object.isFrozen(g)?D.deepFreeze(g):g}getContentsForOverrideIdentifer(g){let d=null,m=null;const b=E=>{E&&(m?this.mergeContents(m,E):m=D.deepClone(E))};for(const E of this.overrides)t.equals(E.identifiers,[g])?d=E.contents:E.identifiers.includes(g)&&b(E.contents);return b(d),m}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(g,d){this.addKey(g),(0,v.addToValueTree)(this.contents,g,d,m=>{throw new Error(m)})}removeValue(g){this.removeKey(g)&&(0,v.removeFromValueTree)(this.contents,g)}addKey(g){let d=this.keys.length;for(let m=0;m<d;m++)g.indexOf(this.keys[m])===0&&(d=m);this.keys.splice(d,1,g)}removeKey(g){let d=this.keys.indexOf(g);return d!==-1?(this.keys.splice(d,1),!0):!1}}e.ConfigurationModel=c;class i extends c{constructor(g={}){const d=o.Registry.as(C.Extensions.Configuration).getConfigurationProperties(),m=Object.keys(d),b=Object.create(null),E=[];for(const y in d){const T=g[y],R=T!==void 0?T:d[y].default;(0,v.addToValueTree)(b,y,R,O=>console.error(`Conflict in default settings: ${O}`))}for(const y of Object.keys(b))C.OVERRIDE_PROPERTY_REGEX.test(y)&&E.push({identifiers:(0,C.overrideIdentifiersFromKey)(y),keys:Object.keys(b[y]),contents:(0,v.toValuesTree)(b[y],T=>console.error(`Conflict in default settings file: ${T}`))});super(b,m,E)}}e.DefaultConfigurationModel=i;class S{constructor(g){this._name=g,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[],this._parseErrors=[]}get configurationModel(){return this._configurationModel||new c}get restrictedConfigurations(){return this._restrictedConfigurations}get errors(){return this._parseErrors}parse(g,d){if(!I.isUndefinedOrNull(g)){const m=this.doParseContent(g);this.parseRaw(m,d)}}reparse(g){this._raw&&this.parseRaw(this._raw,g)}parseRaw(g,d){this._raw=g;const{contents:m,keys:b,overrides:E,restricted:y}=this.doParseRaw(g,d);this._configurationModel=new c(m,b,E),this._restrictedConfigurations=y||[]}doParseContent(g){let d={},m=null,b=[],E=[],y=[];function T(O){Array.isArray(b)?b.push(O):m!==null&&(b[m]=O)}let R={onObjectBegin:()=>{let O={};T(O),E.push(b),b=O,m=null},onObjectProperty:O=>{m=O},onObjectEnd:()=>{b=E.pop()},onArrayBegin:()=>{let O=[];T(O),E.push(b),b=O,m=null},onArrayEnd:()=>{b=E.pop()},onLiteralValue:T,onError:(O,x,F)=>{y.push({error:O,offset:x,length:F})}};if(g)try{_.visit(g,R),d=b[0]||{}}catch(O){console.error(`Error while parsing settings file ${this._name}: ${O}`),this._parseErrors=[O]}return d}doParseRaw(g,d){const m=o.Registry.as(C.Extensions.Configuration).getConfigurationProperties(),b=this.filter(g,m,!0,d);g=b.raw;const E=(0,v.toValuesTree)(g,R=>console.error(`Conflict in settings file ${this._name}: ${R}`)),y=Object.keys(g),T=this.toOverrides(g,R=>console.error(`Conflict in settings file ${this._name}: ${R}`));return{contents:E,keys:y,overrides:T,restricted:b.restricted}}filter(g,d,m,b){if(!b?.scopes&&!b?.skipRestricted)return{raw:g,restricted:[]};const E={},y=[];for(let T in g)if(C.OVERRIDE_PROPERTY_REGEX.test(T)&&m){const R=this.filter(g[T],d,!1,b);E[T]=R.raw,y.push(...R.restricted)}else{const R=d[T],O=R?typeof R.scope!="undefined"?R.scope:3:void 0;R?.restricted&&y.push(T),(O===void 0||b.scopes===void 0||b.scopes.includes(O))&&(b.skipRestricted&&R?.restricted||(E[T]=g[T]))}return{raw:E,restricted:y}}toOverrides(g,d){const m=[];for(const b of Object.keys(g))if(C.OVERRIDE_PROPERTY_REGEX.test(b)){const E={};for(const y in g[b])E[y]=g[b][y];m.push({identifiers:(0,C.overrideIdentifiersFromKey)(b),keys:Object.keys(E),contents:(0,v.toValuesTree)(E,d)})}return m}}e.ConfigurationModelParser=S;class s extends A.Disposable{constructor(g,d,m,b){super();this.userSettingsResource=g,this.scopes=d,this.fileService=b,this._onDidChange=this._register(new f.Emitter),this.onDidChange=this._onDidChange.event,this.parser=new S(this.userSettingsResource.toString()),this.parseOptions={scopes:this.scopes},this._register(this.fileService.watch(m.dirname(this.userSettingsResource))),this._register(this.fileService.watch(this.userSettingsResource)),this._register(f.Event.any(f.Event.filter(this.fileService.onDidFilesChange,E=>E.contains(this.userSettingsResource)),f.Event.filter(this.fileService.onDidRunOperation,E=>(E.isOperation(0)||E.isOperation(3)||E.isOperation(1)||E.isOperation(4))&&m.isEqual(E.resource,g)))(()=>this._onDidChange.fire()))}async loadConfiguration(){try{const g=await this.fileService.readFile(this.userSettingsResource);return this.parser.parse(g.value.toString()||"{}",this.parseOptions),this.parser.configurationModel}catch{return new c}}reparse(){return this.parser.reparse(this.parseOptions),this.parser.configurationModel}getRestrictedSettings(){return this.parser.restrictedConfigurations}}e.UserSettings=s;class l{constructor(g,d,m=new c,b=new c,E=new k.ResourceMap,y=new c,T=new k.ResourceMap,R=!0){this._defaultConfiguration=g,this._localUserConfiguration=d,this._remoteUserConfiguration=m,this._workspaceConfiguration=b,this._folderConfigurations=E,this._memoryConfiguration=y,this._memoryConfigurationByResource=T,this._freeze=R,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new k.ResourceMap,this._userConfiguration=null}getValue(g,d,m){return this.getConsolidateConfigurationModel(d,m).getValue(g)}updateValue(g,d,m={}){let b;m.resource?(b=this._memoryConfigurationByResource.get(m.resource),b||(b=new c,this._memoryConfigurationByResource.set(m.resource,b))):b=this._memoryConfiguration,d===void 0?b.removeValue(g):b.setValue(g,d),m.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(g,d,m){const b=this.getConsolidateConfigurationModel(d,m),E=this.getFolderConfigurationModelForResource(d.resource,m),y=d.resource?this._memoryConfigurationByResource.get(d.resource)||this._memoryConfiguration:this._memoryConfiguration,T=d.overrideIdentifier?this._defaultConfiguration.freeze().override(d.overrideIdentifier).getValue(g):this._defaultConfiguration.freeze().getValue(g),R=d.overrideIdentifier?this.userConfiguration.freeze().override(d.overrideIdentifier).getValue(g):this.userConfiguration.freeze().getValue(g),O=d.overrideIdentifier?this.localUserConfiguration.freeze().override(d.overrideIdentifier).getValue(g):this.localUserConfiguration.freeze().getValue(g),x=d.overrideIdentifier?this.remoteUserConfiguration.freeze().override(d.overrideIdentifier).getValue(g):this.remoteUserConfiguration.freeze().getValue(g),F=m?d.overrideIdentifier?this._workspaceConfiguration.freeze().override(d.overrideIdentifier).getValue(g):this._workspaceConfiguration.freeze().getValue(g):void 0,L=E?d.overrideIdentifier?E.freeze().override(d.overrideIdentifier).getValue(g):E.freeze().getValue(g):void 0,M=d.overrideIdentifier?y.override(d.overrideIdentifier).getValue(g):y.getValue(g),N=b.getValue(g),B=t.distinct(t.flatten(b.overrides.map(P=>P.identifiers))).filter(P=>b.getOverrideValue(g,P)!==void 0);return{defaultValue:T,userValue:R,userLocalValue:O,userRemoteValue:x,workspaceValue:F,workspaceFolderValue:L,memoryValue:M,value:N,default:T!==void 0?{value:this._defaultConfiguration.freeze().getValue(g),override:d.overrideIdentifier?this._defaultConfiguration.freeze().getOverrideValue(g,d.overrideIdentifier):void 0}:void 0,user:R!==void 0?{value:this.userConfiguration.freeze().getValue(g),override:d.overrideIdentifier?this.userConfiguration.freeze().getOverrideValue(g,d.overrideIdentifier):void 0}:void 0,userLocal:O!==void 0?{value:this.localUserConfiguration.freeze().getValue(g),override:d.overrideIdentifier?this.localUserConfiguration.freeze().getOverrideValue(g,d.overrideIdentifier):void 0}:void 0,userRemote:x!==void 0?{value:this.remoteUserConfiguration.freeze().getValue(g),override:d.overrideIdentifier?this.remoteUserConfiguration.freeze().getOverrideValue(g,d.overrideIdentifier):void 0}:void 0,workspace:F!==void 0?{value:this._workspaceConfiguration.freeze().getValue(g),override:d.overrideIdentifier?this._workspaceConfiguration.freeze().getOverrideValue(g,d.overrideIdentifier):void 0}:void 0,workspaceFolder:L!==void 0?{value:E?.freeze().getValue(g),override:d.overrideIdentifier?E?.freeze().getOverrideValue(g,d.overrideIdentifier):void 0}:void 0,memory:M!==void 0?{value:y.getValue(g),override:d.overrideIdentifier?y.getOverrideValue(g,d.overrideIdentifier):void 0}:void 0,overrideIdentifiers:B.length?B:void 0}}keys(g){const d=this.getFolderConfigurationModelForResource(void 0,g);return{default:this._defaultConfiguration.freeze().keys,user:this.userConfiguration.freeze().keys,workspace:this._workspaceConfiguration.freeze().keys,workspaceFolder:d?d.freeze().keys:[]}}updateDefaultConfiguration(g){this._defaultConfiguration=g,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateLocalUserConfiguration(g){this._localUserConfiguration=g,this._userConfiguration=null,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateRemoteUserConfiguration(g){this._remoteUserConfiguration=g,this._userConfiguration=null,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateWorkspaceConfiguration(g){this._workspaceConfiguration=g,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateFolderConfiguration(g,d){this._folderConfigurations.set(g,d),this._foldersConsolidatedConfigurations.delete(g)}deleteFolderConfiguration(g){this.folderConfigurations.delete(g),this._foldersConsolidatedConfigurations.delete(g)}compareAndUpdateDefaultConfiguration(g,d){const m=[];if(!d){const{added:b,updated:E,removed:y}=a(this._defaultConfiguration,g);d=[...b,...E,...y]}for(const b of d)for(const E of(0,C.overrideIdentifiersFromKey)(b)){const y=this._defaultConfiguration.getKeysForOverrideIdentifier(E),T=g.getKeysForOverrideIdentifier(E),R=[...T.filter(O=>y.indexOf(O)===-1),...y.filter(O=>T.indexOf(O)===-1),...y.filter(O=>!D.equals(this._defaultConfiguration.override(E).getValue(O),g.override(E).getValue(O)))];m.push([E,R])}return this.updateDefaultConfiguration(g),{keys:d,overrides:m}}compareAndUpdateLocalUserConfiguration(g){const{added:d,updated:m,removed:b,overrides:E}=a(this.localUserConfiguration,g),y=[...d,...m,...b];return y.length&&this.updateLocalUserConfiguration(g),{keys:y,overrides:E}}compareAndUpdateRemoteUserConfiguration(g){const{added:d,updated:m,removed:b,overrides:E}=a(this.remoteUserConfiguration,g);let y=[...d,...m,...b];return y.length&&this.updateRemoteUserConfiguration(g),{keys:y,overrides:E}}compareAndUpdateWorkspaceConfiguration(g){const{added:d,updated:m,removed:b,overrides:E}=a(this.workspaceConfiguration,g);let y=[...d,...m,...b];return y.length&&this.updateWorkspaceConfiguration(g),{keys:y,overrides:E}}compareAndUpdateFolderConfiguration(g,d){const m=this.folderConfigurations.get(g),{added:b,updated:E,removed:y,overrides:T}=a(m,d);let R=[...b,...E,...y];return(R.length||!m)&&this.updateFolderConfiguration(g,d),{keys:R,overrides:T}}compareAndDeleteFolderConfiguration(g){const d=this.folderConfigurations.get(g);if(!d)throw new Error("Unknown folder");this.deleteFolderConfiguration(g);const{added:m,updated:b,removed:E,overrides:y}=a(d,void 0);return{keys:[...m,...b,...E],overrides:y}}get defaults(){return this._defaultConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration),this._freeze&&this._userConfiguration.freeze()),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}get workspaceConfiguration(){return this._workspaceConfiguration}get folderConfigurations(){return this._folderConfigurations}getConsolidateConfigurationModel(g,d){let m=this.getConsolidatedConfigurationModelForResource(g,d);return g.overrideIdentifier?m.override(g.overrideIdentifier):m}getConsolidatedConfigurationModelForResource({resource:g},d){let m=this.getWorkspaceConsolidatedConfiguration();if(d&&g){const b=d.getFolder(g);b&&(m=this.getFolderConsolidatedConfiguration(b.uri)||m);const E=this._memoryConfigurationByResource.get(g);E&&(m=m.merge(E))}return m}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(g){let d=this._foldersConsolidatedConfigurations.get(g);if(!d){const m=this.getWorkspaceConsolidatedConfiguration(),b=this._folderConfigurations.get(g);b?(d=m.merge(b),this._freeze&&(d=d.freeze()),this._foldersConsolidatedConfigurations.set(g,d)):d=m}return d}getFolderConfigurationModelForResource(g,d){if(d&&g){const m=d.getFolder(g);if(m)return this._folderConfigurations.get(m.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((g,d)=>{const{contents:m,overrides:b,keys:E}=this._folderConfigurations.get(d);return g.push([d,{contents:m,overrides:b,keys:E}]),g},[])}}allKeys(){const g=new Set;return this._defaultConfiguration.freeze().keys.forEach(d=>g.add(d)),this.userConfiguration.freeze().keys.forEach(d=>g.add(d)),this._workspaceConfiguration.freeze().keys.forEach(d=>g.add(d)),this._folderConfigurations.forEach(d=>d.freeze().keys.forEach(m=>g.add(m))),[...g.values()]}allOverrideIdentifiers(){const g=new Set;return this._defaultConfiguration.freeze().getAllOverrideIdentifiers().forEach(d=>g.add(d)),this.userConfiguration.freeze().getAllOverrideIdentifiers().forEach(d=>g.add(d)),this._workspaceConfiguration.freeze().getAllOverrideIdentifiers().forEach(d=>g.add(d)),this._folderConfigurations.forEach(d=>d.freeze().getAllOverrideIdentifiers().forEach(m=>g.add(m))),[...g.values()]}getAllKeysForOverrideIdentifier(g){const d=new Set;return this._defaultConfiguration.getKeysForOverrideIdentifier(g).forEach(m=>d.add(m)),this.userConfiguration.getKeysForOverrideIdentifier(g).forEach(m=>d.add(m)),this._workspaceConfiguration.getKeysForOverrideIdentifier(g).forEach(m=>d.add(m)),this._folderConfigurations.forEach(m=>m.getKeysForOverrideIdentifier(g).forEach(b=>d.add(b))),[...d.values()]}static parse(g){const d=this.parseConfigurationModel(g.defaults),m=this.parseConfigurationModel(g.user),b=this.parseConfigurationModel(g.workspace),E=g.folders.reduce((y,T)=>(y.set(w.URI.revive(T[0]),this.parseConfigurationModel(T[1])),y),new k.ResourceMap);return new l(d,m,new c,b,E,new c,new k.ResourceMap,!1)}static parseConfigurationModel(g){return new c(g.contents,g.keys,g.overrides).freeze()}}e.Configuration=l;function r(...h){if(h.length===0)return{keys:[],overrides:[]};if(h.length===1)return h[0];const g=new Set,d=new Map;for(const b of h)b.keys.forEach(E=>g.add(E)),b.overrides.forEach(([E,y])=>{const T=(0,k.getOrSet)(d,E,new Set);y.forEach(R=>T.add(R))});const m=[];return d.forEach((b,E)=>m.push([E,[...b.values()]])),{keys:[...g.values()],overrides:m}}e.mergeChanges=r;class p{constructor(g,d,m,b){this.change=g,this.previous=d,this.currentConfiguraiton=m,this.currentWorkspace=b,this._previousConfiguration=void 0;const E=new Set;g.keys.forEach(T=>E.add(T)),g.overrides.forEach(([,T])=>T.forEach(R=>E.add(R))),this.affectedKeys=[...E.values()];const y=new c;this.affectedKeys.forEach(T=>y.setValue(T,{})),this.affectedKeysTree=y.contents}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=l.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(g,d){if(this.doesAffectedKeysTreeContains(this.affectedKeysTree,g)){if(d){const m=this.previousConfiguration?this.previousConfiguration.getValue(g,d,this.previous?.workspace):void 0,b=this.currentConfiguraiton.getValue(g,d,this.currentWorkspace);return!D.equals(m,b)}return!0}return!1}doesAffectedKeysTreeContains(g,d){let m=(0,v.toValuesTree)({[d]:!0},()=>{}),b;for(;typeof m=="object"&&(b=Object.keys(m)[0]);){if(g=g[b],!g)return!1;m=m[b]}return!0}}e.ConfigurationChangeEvent=p;class u extends p{constructor(g,d,m,b){super({keys:g.allKeys(),overrides:[]},void 0,g,d);this.source=m,this.sourceConfig=b}}e.AllKeysConfigurationChangeEvent=u;function a(h,g){const{added:d,removed:m,updated:b}=n(g,h),E=[],y=h?.getAllOverrideIdentifiers()||[],T=g?.getAllOverrideIdentifiers()||[];if(g){const R=T.filter(O=>!y.includes(O));for(const O of R)E.push([O,g.getKeysForOverrideIdentifier(O)])}if(h){const R=y.filter(O=>!T.includes(O));for(const O of R)E.push([O,h.getKeysForOverrideIdentifier(O)])}if(g&&h){for(const R of y)if(T.includes(R)){const O=n({contents:h.getOverrideValue(void 0,R)||{},keys:h.getKeysForOverrideIdentifier(R)},{contents:g.getOverrideValue(void 0,R)||{},keys:g.getKeysForOverrideIdentifier(R)});E.push([R,[...O.added,...O.removed,...O.updated]])}}return{added:d,removed:m,updated:b,overrides:E}}function n(h,g){const d=h?g?h.keys.filter(E=>g.keys.indexOf(E)===-1):[...h.keys]:[],m=g?h?g.keys.filter(E=>h.keys.indexOf(E)===-1):[...g.keys]:[],b=[];if(h&&g){for(const E of g.keys)if(h.keys.indexOf(E)!==-1){const y=(0,v.getConfigurationValue)(g.contents,E),T=(0,v.getConfigurationValue)(h.contents,E);D.equals(y,T)||b.push(E)}}return{added:d,removed:m,updated:b}}}),define(ne[94],re([1,0,222,14,28,17]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=e.KeybindingsRegistry=e.KeybindingWeight=void 0;var k;(function(w){w[w.EditorCore=0]="EditorCore",w[w.EditorContrib=100]="EditorContrib",w[w.WorkbenchContrib=200]="WorkbenchContrib",w[w.BuiltinExtension=300]="BuiltinExtension",w[w.ExternalExtension=400]="ExternalExtension"})(k=e.KeybindingWeight||(e.KeybindingWeight={}));class D{constructor(){this._coreKeybindings=[],this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(v){if(f.OS===1){if(v&&v.win)return v.win}else if(f.OS===2){if(v&&v.mac)return v.mac}else if(v&&v.linux)return v.linux;return v}registerKeybindingRule(v){const C=D.bindToCurrentPlatform(v);if(C&&C.primary){const o=(0,t.createKeybinding)(C.primary,f.OS);o&&this._registerDefaultKeybinding(o,v.id,v.args,v.weight,0,v.when)}if(C&&Array.isArray(C.secondary))for(let o=0,c=C.secondary.length;o<c;o++){const i=C.secondary[o],S=(0,t.createKeybinding)(i,f.OS);S&&this._registerDefaultKeybinding(S,v.id,v.args,v.weight,-o-1,v.when)}}setExtensionKeybindings(v){let C=[],o=0;for(const c of v)c.keybinding.length>0&&(C[o++]={keybinding:c.keybinding,command:c.id,commandArgs:c.args,when:c.when,weight1:c.weight,weight2:0,extensionId:c.extensionId||null,isBuiltinExtension:c.isBuiltinExtension||!1});this._extensionKeybindings=C,this._cachedMergedKeybindings=null}registerCommandAndKeybindingRule(v){this.registerKeybindingRule(v),_.CommandsRegistry.registerCommand(v)}static _mightProduceChar(v){return v>=21&&v<=30||v>=31&&v<=56?!0:v===80||v===81||v===82||v===83||v===84||v===85||v===86||v===110||v===111||v===87||v===88||v===89||v===90||v===91||v===92}_assertNoCtrlAlt(v,C){v.ctrlKey&&v.altKey&&!v.metaKey&&D._mightProduceChar(v.keyCode)&&console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",v," for ",C)}_registerDefaultKeybinding(v,C,o,c,i,S){f.OS===1&&this._assertNoCtrlAlt(v.parts[0],C),this._coreKeybindings.push({keybinding:v.parts,command:C,commandArgs:o,when:S,weight1:c,weight2:i,extensionId:null,isBuiltinExtension:!1}),this._cachedMergedKeybindings=null}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=[].concat(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(I)),this._cachedMergedKeybindings.slice(0)}}e.KeybindingsRegistry=new D,e.Extensions={EditorModes:"platform.keybindingsRegistry"},A.Registry.add(e.Extensions.EditorModes,e.KeybindingsRegistry);function I(w,v){return w.weight1!==v.weight1?w.weight1-v.weight1:w.command<v.command?-1:w.command>v.command?1:w.weight2-v.weight2}}),define(ne[236],re([1,0,719,1219,183,7,94,1330]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextScopedReplaceInput=e.ContextScopedFindInput=e.ContextScopedHistoryInputBox=e.createAndBindHistoryNavigationWidgetScopedContextKeyService=e.HistoryNavigationWidgetContext=e.historyNavigationVisible=void 0,e.historyNavigationVisible=new A.RawContextKey("suggestWidgetVisible",!1,(0,D.localize)(0,null)),e.HistoryNavigationWidgetContext="historyNavigationWidget";const I="historyNavigationForwardsEnabled",w="historyNavigationBackwardsEnabled";function v(l,r,p){new A.RawContextKey(p,r).bindTo(l)}function C(l,r){return l.createScoped(r.target)}function o(l,r){return l.getContext(document.activeElement).getValue(r)}function c(l,r){const p=C(l,r);v(p,r,e.HistoryNavigationWidgetContext);const u=new A.RawContextKey(I,!0).bindTo(p),a=new A.RawContextKey(w,!0).bindTo(p);return{scopedContextKeyService:p,historyNavigationForwardsEnablement:u,historyNavigationBackwardsEnablement:a}}e.createAndBindHistoryNavigationWidgetScopedContextKeyService=c;let i=class extends _.HistoryInputBox{constructor(r,p,u,a){super(r,p,u);this._register(c(a,{target:this.element,historyNavigator:this}).scopedContextKeyService)}};i=Ee([W(3,A.IContextKeyService)],i),e.ContextScopedHistoryInputBox=i;let S=class extends t.FindInput{constructor(r,p,u,a,n=!1){super(r,p,n,u);this._register(c(a,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};S=Ee([W(3,A.IContextKeyService)],S),e.ContextScopedFindInput=S;let s=class extends f.ReplaceInput{constructor(r,p,u,a,n=!1){super(r,p,n,u);this._register(c(a,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};s=Ee([W(3,A.IContextKeyService)],s),e.ContextScopedReplaceInput=s,k.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:A.ContextKeyExpr.and(A.ContextKeyExpr.has(e.HistoryNavigationWidgetContext),A.ContextKeyExpr.equals(w,!0),e.historyNavigationVisible.isEqualTo(!1)),primary:16,secondary:[512|16],handler:l=>{const r=o(l.get(A.IContextKeyService),e.HistoryNavigationWidgetContext);r&&r.historyNavigator.showPreviousValue()}}),k.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:A.ContextKeyExpr.and(A.ContextKeyExpr.has(e.HistoryNavigationWidgetContext),A.ContextKeyExpr.equals(I,!0),e.historyNavigationVisible.isEqualTo(!1)),primary:18,secondary:[512|18],handler:l=>{const r=o(l.get(A.IContextKeyService),e.HistoryNavigationWidgetContext);r&&r.historyNavigator.showNextValue()}})}),define(ne[210],re([1,0,15,2,17]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickAccessRegistry=e.Extensions=e.DefaultQuickAccessFilterValue=void 0;var A;(function(D){D[D.PRESERVE=0]="PRESERVE",D[D.LAST=1]="LAST"})(A=e.DefaultQuickAccessFilterValue||(e.DefaultQuickAccessFilterValue={})),e.Extensions={Quickaccess:"workbench.contributions.quickaccess"};class k{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(I){return I.prefix.length===0?this.defaultProvider=I:this.providers.push(I),this.providers.sort((w,v)=>v.prefix.length-w.prefix.length),(0,f.toDisposable)(()=>{this.providers.splice(this.providers.indexOf(I),1),this.defaultProvider===I&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return(0,t.coalesce)([this.defaultProvider,...this.providers])}getQuickAccessProvider(I){return I&&this.providers.find(v=>I.startsWith(v.prefix))||void 0||this.defaultProvider}clear(){const I=[...this.providers],w=this.defaultProvider;return this.providers=[],this.defaultProvider=void 0,()=>{this.providers=I,this.defaultProvider=w}}}e.QuickAccessRegistry=k,_.Registry.add(e.Extensions.Quickaccess,new k)}),define(ne[1974],re([1,0,2,1336,210,53,17]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HelpQuickAccessProvider=void 0;let D=class Rn{constructor(w){this.quickInputService=w,this.registry=k.Registry.as(_.Extensions.Quickaccess)}provide(w){const v=new t.DisposableStore;v.add(w.onDidAccept(()=>{const[c]=w.selectedItems;c&&this.quickInputService.quickAccess.show(c.prefix,{preserveValue:!0})})),v.add(w.onDidChangeValue(c=>{const i=this.registry.getQuickAccessProvider(c.substr(Rn.PREFIX.length));i&&i.prefix&&i.prefix!==Rn.PREFIX&&this.quickInputService.quickAccess.show(i.prefix,{preserveValue:!0})}));const{editorProviders:C,globalProviders:o}=this.getQuickAccessProviders();return w.items=C.length===0||o.length===0?[...C.length===0?o:C]:[{label:(0,f.localize)(0,null),type:"separator"},...o,{label:(0,f.localize)(1,null),type:"separator"},...C],v}getQuickAccessProviders(){const w=[],v=[];for(const C of this.registry.getQuickAccessProviders().sort((o,c)=>o.prefix.localeCompare(c.prefix)))if(C.prefix!==Rn.PREFIX)for(const o of C.helpEntries){const c=o.prefix||C.prefix,i=c||"\u2026";(o.needsEditor?v:w).push({prefix:c,label:i,ariaLabel:(0,f.localize)(2,null,i,o.description),description:o.description})}return{editorProviders:v,globalProviders:w}}};D.PREFIX="?",D=Ee([W(0,A.IQuickInputService)],D),e.HelpQuickAccessProvider=D}),define(ne[1975],re([1,0,11,30,150,2,5,210,53,17]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickAccessController=void 0;let v=class extends A.Disposable{constructor(o,c){super();this.quickInputService=o,this.instantiationService=c,this.registry=w.Registry.as(D.Extensions.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}pick(o="",c){return this.doShowOrPick(o,!0,c)}show(o="",c){this.doShowOrPick(o,!1,c)}doShowOrPick(o,c,i){const[S,s]=this.getOrInstantiateProvider(o),l=this.visibleQuickAccess,r=l?.descriptor;if(l&&s&&r===s){o!==s.prefix&&!i?.preserveValue&&(l.picker.value=o),this.adjustValueSelection(l.picker,s,i);return}if(s&&!i?.preserveValue){let h;if(l&&r&&r!==s){const g=l.value.substr(r.prefix.length);g&&(h=`${s.prefix}${g}`)}if(!h){const g=S?.defaultFilterValue;g===D.DefaultQuickAccessFilterValue.LAST?h=this.lastAcceptedPickerValues.get(s):typeof g=="string"&&(h=`${s.prefix}${g}`)}typeof h=="string"&&(o=h)}const p=new A.DisposableStore,u=p.add(this.quickInputService.createQuickPick());u.value=o,this.adjustValueSelection(u,s,i),u.placeholder=s?.placeholder,u.quickNavigate=i?.quickNavigateConfiguration,u.hideInput=!!u.quickNavigate&&!l,(typeof i?.itemActivation=="number"||i?.quickNavigateConfiguration)&&(u.itemActivation=i?.itemActivation??I.ItemActivation.SECOND),u.contextKey=s?.contextKey,u.filterValue=h=>h.substring(s?s.prefix.length:0),s?.placeholder&&(u.ariaLabel=s?.placeholder);let a;c&&(a=new t.DeferredPromise,p.add((0,_.once)(u.onWillAccept)(h=>{h.veto(),u.hide()}))),p.add(this.registerPickerListeners(u,S,s,o));const n=p.add(new f.CancellationTokenSource);if(S&&p.add(S.provide(u,n.token)),(0,_.once)(u.onDidHide)(()=>{u.selectedItems.length===0&&n.cancel(),p.dispose(),a?.complete(u.selectedItems.slice(0))}),u.show(),c)return a?.p}adjustValueSelection(o,c,i){let S;i?.preserveValue?S=[o.value.length,o.value.length]:S=[c?.prefix.length??0,o.value.length],o.valueSelection=S}registerPickerListeners(o,c,i,S){const s=new A.DisposableStore,l=this.visibleQuickAccess={picker:o,descriptor:i,value:S};return s.add((0,A.toDisposable)(()=>{l===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),s.add(o.onDidChangeValue(r=>{const[p]=this.getOrInstantiateProvider(r);p!==c?this.show(r,{preserveValue:!0}):l.value=r})),i&&s.add(o.onDidAccept(()=>{this.lastAcceptedPickerValues.set(i,o.value)})),s}getOrInstantiateProvider(o){const c=this.registry.getQuickAccessProvider(o);if(!c)return[void 0,void 0];let i=this.mapProviderToDescriptor.get(c);return i||(i=this.instantiationService.createInstance(c.ctor),this.mapProviderToDescriptor.set(c,i)),[i,c]}};v=Ee([W(0,I.IQuickInputService),W(1,k.IInstantiationService)],v),e.QuickAccessController=v}),define(ne[144],re([1,0,22,5]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteAuthorityResolverError=e.RemoteAuthorityResolverErrorCode=e.IRemoteAuthorityResolverService=void 0,e.IRemoteAuthorityResolverService=(0,f.createDecorator)("remoteAuthorityResolverService");var _;(function(k){k.Unknown="Unknown",k.NotAvailable="NotAvailable",k.TemporarilyNotAvailable="TemporarilyNotAvailable",k.NoResolverFound="NoResolverFound"})(_=e.RemoteAuthorityResolverErrorCode||(e.RemoteAuthorityResolverErrorCode={}));class A extends t.ErrorNoTelemetry{constructor(D,I=_.Unknown,w){super(D);this._message=D,this._code=I,this._detail=w,this.isHandled=I===_.NotAvailable&&w===!0,typeof Object.setPrototypeOf=="function"&&Object.setPrototypeOf(this,A.prototype)}static isTemporarilyNotAvailable(D){return D instanceof A&&D._code===_.TemporarilyNotAvailable}static isNoResolverFound(D){return D instanceof A&&D._code===_.NoResolverFound}static isHandled(D){return D instanceof A&&D.isHandled}}e.RemoteAuthorityResolverError=A}),define(ne[1976],re([1,0,10,11,60,6,2,449,144]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserSocketFactory=e.defaultWebSocketFactory=void 0;class w extends k.Disposable{constructor(c,i){super();this._onData=new A.Emitter,this.onData=this._onData.event,this._onOpen=this._register(new A.Emitter),this.onOpen=this._onOpen.event,this._onClose=this._register(new A.Emitter),this.onClose=this._onClose.event,this._onError=this._register(new A.Emitter),this.onError=this._onError.event,this._debugLabel=i,this._socket=new WebSocket(c),this.traceSocketEvent("created",{type:"BrowserWebSocket",url:c}),this._fileReader=new FileReader,this._queue=[],this._isReading=!1,this._isClosed=!1,this._fileReader.onload=a=>{this._isReading=!1;const n=a.target.result;this.traceSocketEvent("read",n),this._onData.fire(n),this._queue.length>0&&S(this._queue.shift())};const S=a=>{if(this._isReading){this._queue.push(a);return}this._isReading=!0,this._fileReader.readAsArrayBuffer(a)};this._socketMessageListener=a=>{const n=a.data;this.traceSocketEvent("browserWebSocketBlobReceived",{type:n.type,size:n.size}),S(n)},this._socket.addEventListener("message",this._socketMessageListener),this._register(t.addDisposableListener(this._socket,"open",a=>{this.traceSocketEvent("open"),this._onOpen.fire()}));let s=null;const l=()=>{const a=s;s=null,this._onError.fire(a)},r=this._register(new f.RunOnceScheduler(l,0)),p=a=>{r.cancel(),s=a,r.schedule()},u=a=>{r.cancel(),s=a,l()};this._register(t.addDisposableListener(this._socket,"close",a=>{this.traceSocketEvent("close",{code:a.code,reason:a.reason,wasClean:a.wasClean}),this._isClosed=!0,s&&(window.navigator.onLine?a.wasClean?(r.cancel(),l()):u(new I.RemoteAuthorityResolverError(a.reason||`WebSocket close with status code ${a.code}`,I.RemoteAuthorityResolverErrorCode.TemporarilyNotAvailable,a)):u(new I.RemoteAuthorityResolverError("Browser is offline",I.RemoteAuthorityResolverErrorCode.TemporarilyNotAvailable,a))),this._onClose.fire({code:a.code,reason:a.reason,wasClean:a.wasClean,event:a})})),this._register(t.addDisposableListener(this._socket,"error",a=>{this.traceSocketEvent("error",{message:a?.message}),p(a)}))}traceSocketEvent(c,i){D.SocketDiagnostics.traceSocketEvent(this._socket,this._debugLabel,c,i)}send(c){this._isClosed||(this.traceSocketEvent("write",c),this._socket.send(c))}close(){this._isClosed=!0,this.traceSocketEvent("close"),this._socket.close(),this._socket.removeEventListener("message",this._socketMessageListener),this.dispose()}}e.defaultWebSocketFactory=new class{create(o,c){return new w(o,c)}};class v{constructor(c,i){this.socket=c,this.debugLabel=i}traceSocketEvent(c,i){typeof this.socket.traceSocketEvent=="function"?this.socket.traceSocketEvent(c,i):D.SocketDiagnostics.traceSocketEvent(this.socket,this.debugLabel,c,i)}dispose(){this.socket.close()}onData(c){return this.socket.onData(i=>c(_.VSBuffer.wrap(new Uint8Array(i))))}onClose(c){const i=S=>{c(typeof S=="undefined"?S:{type:1,code:S.code,reason:S.reason,wasClean:S.wasClean,event:S.event})};return this.socket.onClose(i)}onEnd(c){return k.Disposable.None}write(c){this.socket.send(c.buffer)}end(){this.socket.close()}drain(){return Promise.resolve()}}class C{constructor(c){this._webSocketFactory=c||e.defaultWebSocketFactory}connect(c,i,S,s,l){const r=/^https:/.test(window.location.href)?"wss":"ws",p=this._webSocketFactory.create(`${r}://${/:/.test(c)?`[${c}]`:c}:${i}/?${S}&skipWebSocketFrames=false`,s),u=p.onError(a=>l(a,void 0));p.onOpen(()=>{u.dispose(),l(void 0,new v(p,s))})}}e.BrowserSocketFactory=C}),define(ne[554],re([1,0,11,60,30,22,6,2,89,449,144]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionHostPersistentConnection=e.ManagementPersistentConnection=e.PersistentConnection=e.ReconnectionPermanentFailureEvent=e.ConnectionGainEvent=e.ReconnectionRunningEvent=e.ReconnectionWaitEvent=e.ConnectionLostEvent=e.PersistentConnectionEventType=e.connectRemoteAgentTunnel=e.connectRemoteAgentExtensionHost=e.connectRemoteAgentManagement=e.ConnectionType=void 0;const C=30*1e3;var o;(function(G){G[G.Management=1]="Management",G[G.ExtensionHost=2]="ExtensionHost",G[G.Tunnel=3]="Tunnel"})(o=e.ConnectionType||(e.ConnectionType={}));function c(G){switch(G){case 1:return"Management";case 2:return"ExtensionHost";case 3:return"Tunnel"}}function i(G){const q=new _.CancellationTokenSource;return setTimeout(()=>q.cancel(),G),q.token}function S(G,q){if(G.isCancellationRequested||q.isCancellationRequested)return _.CancellationToken.Cancelled;const Z=new _.CancellationTokenSource;return G.onCancellationRequested(()=>Z.cancel()),q.onCancellationRequested(()=>Z.cancel()),Z.token}class s{constructor(q){this._state="pending",this._disposables=new D.DisposableStore,this.promise=new Promise((Z,j)=>{this._resolvePromise=Z,this._rejectPromise=j}),q.isCancellationRequested?this._timeout():this._disposables.add(q.onCancellationRequested(()=>this._timeout()))}get didTimeout(){return this._state==="timedout"}registerDisposable(q){this._state==="pending"?this._disposables.add(q):q.dispose()}_timeout(){this._state==="pending"&&(this._disposables.dispose(),this._state="timedout",this._rejectPromise(this._createTimeoutError()))}_createTimeoutError(){const q=new Error("Time limit reached");return q.code="ETIMEDOUT",q.syscall="connect",q}resolve(q){this._state==="pending"&&(this._disposables.dispose(),this._state="resolved",this._resolvePromise(q))}reject(q){this._state==="pending"&&(this._disposables.dispose(),this._state="rejected",this._rejectPromise(q))}}function l(G,q){const Z=new s(q);return Z.registerDisposable(G.onControlMessage(j=>{const X=JSON.parse(j.toString()),Y=V(X);Y?Z.reject(Y):Z.resolve(X)})),Z.promise}function r(G,q,Z,j,X,Y,$){const J=new s($);return q.connect(Z,j,X,Y,(ee,te)=>{J.didTimeout?(ee&&G.error(ee),te?.dispose()):ee||!te?J.reject(ee):J.resolve(te)}),J.promise}function p(G,q){const Z=new s(q);return G.then(j=>{Z.didTimeout||Z.resolve(j)},j=>{Z.didTimeout||Z.reject(j)}),Z.promise}async function u(G,q,Z,j){const X=H(G,q);G.logService.trace(`${X} 1/6. invoking socketFactory.connect().`);let Y;try{Y=await r(G.logService,G.socketFactory,G.host,G.port,`reconnectionToken=${G.reconnectionToken}&reconnection=${G.reconnectionProtocol?"true":"false"}`,`renderer-${c(q)}-${G.reconnectionToken}`,j)}catch(se){throw G.logService.error(`${X} socketFactory.connect() failed or timed out. Error:`),G.logService.error(se),se}G.logService.trace(`${X} 2/6. socketFactory.connect() was successful.`);let $,J;G.reconnectionProtocol?(G.reconnectionProtocol.beginAcceptReconnection(Y,null),$=G.reconnectionProtocol,J=!1):($=new w.PersistentProtocol(Y,null),J=!0),G.logService.trace(`${X} 3/6. sending AuthRequest control message.`);const ee=await p(G.signService.createNewMessage((0,I.generateUuid)()),j),te={type:"auth",auth:G.connectionToken||"00000000000000000000",data:ee.data};$.sendControl(f.VSBuffer.fromString(JSON.stringify(te)));try{const se=await l($,S(j,i(1e4)));if(se.type!=="sign"||typeof se.data!="string"){const ae=new Error("Unexpected handshake message");throw ae.code="VSCODE_CONNECTION_ERROR",ae}if(G.logService.trace(`${X} 4/6. received SignRequest control message.`),!await p(G.signService.validate(ee,se.signedData),j)){const ae=new Error("Refused to connect to unsupported server");throw ae.code="VSCODE_CONNECTION_ERROR",ae}const ce=await p(G.signService.sign(se.data),j),le={type:"connectionType",commit:G.commit,signedData:ce,desiredConnectionType:q};return Z&&(le.args=Z),G.logService.trace(`${X} 5/6. sending ConnectionTypeRequest control message.`),$.sendControl(f.VSBuffer.fromString(JSON.stringify(le))),{protocol:$,ownsProtocol:J}}catch(se){throw se&&se.code==="ETIMEDOUT"&&(G.logService.error(`${X} the handshake timed out. Error:`),G.logService.error(se)),se&&se.code==="VSCODE_CONNECTION_ERROR"&&(G.logService.error(`${X} received error control message when negotiating connection. Error:`),G.logService.error(se)),J&&P($),se}}async function a(G,q,Z,j){const X=Date.now(),Y=H(G,q),{protocol:$,ownsProtocol:J}=await u(G,q,Z,j),ee=new s(j);return ee.registerDisposable($.onControlMessage(te=>{const se=JSON.parse(te.toString()),ie=V(se);ie?(G.logService.error(`${Y} received error control message when negotiating connection. Error:`),G.logService.error(ie),J&&P($),ee.reject(ie)):(G.reconnectionProtocol&&G.reconnectionProtocol.endAcceptReconnection(),G.logService.trace(`${Y} 6/6. handshake finished, connection is up and running after ${K(X)}!`),ee.resolve({protocol:$,firstMessage:se}))})),ee.promise}async function n(G,q){const{protocol:Z}=await a(G,1,void 0,q);return{protocol:Z}}async function h(G,q,Z){const{protocol:j,firstMessage:X}=await a(G,2,q,Z),Y=X&&X.debugPort;return{protocol:j,debugPort:Y}}async function g(G,q,Z){const j=Date.now(),X=H(G,3),{protocol:Y}=await u(G,3,q,Z);return G.logService.trace(`${X} 6/6. handshake finished, connection is up and running after ${K(j)}!`),Y}async function d(G,q,Z){const{host:j,port:X,connectionToken:Y}=await G.addressProvider.getAddress();return{commit:G.commit,host:j,port:X,connectionToken:Y,reconnectionToken:q,reconnectionProtocol:Z,socketFactory:G.socketFactory,signService:G.signService,logService:G.logService}}async function m(G,q,Z){try{const j=(0,I.generateUuid)(),X=await d(G,j,null),{protocol:Y}=await n(X,_.CancellationToken.None);return new N(G,q,Z,j,Y)}catch(j){throw G.logService.error("[remote-connection] An error occurred in the very first connect attempt, it will be treated as a permanent error! Error:"),G.logService.error(j),M.triggerPermanentFailure(0,0,v.RemoteAuthorityResolverError.isHandled(j)),j}}e.connectRemoteAgentManagement=m;async function b(G,q){try{const Z=(0,I.generateUuid)(),j=await d(G,Z,null),{protocol:X,debugPort:Y}=await h(j,q,_.CancellationToken.None);return new B(G,q,Z,X,Y)}catch(Z){throw G.logService.error("[remote-connection] An error occurred in the very first connect attempt, it will be treated as a permanent error! Error:"),G.logService.error(Z),M.triggerPermanentFailure(0,0,v.RemoteAuthorityResolverError.isHandled(Z)),Z}}e.connectRemoteAgentExtensionHost=b;async function E(G,q,Z){const j=await d(G,(0,I.generateUuid)(),null);return await g(j,{host:q,port:Z},_.CancellationToken.None)}e.connectRemoteAgentTunnel=E;function y(G){return(0,t.createCancelablePromise)(q=>new Promise((Z,j)=>{const X=setTimeout(Z,G*1e3);q.onCancellationRequested(()=>{clearTimeout(X),Z()})}))}var T;(function(G){G[G.ConnectionLost=0]="ConnectionLost",G[G.ReconnectionWait=1]="ReconnectionWait",G[G.ReconnectionRunning=2]="ReconnectionRunning",G[G.ReconnectionPermanentFailure=3]="ReconnectionPermanentFailure",G[G.ConnectionGain=4]="ConnectionGain"})(T=e.PersistentConnectionEventType||(e.PersistentConnectionEventType={}));class R{constructor(q,Z){this.reconnectionToken=q,this.millisSinceLastIncomingData=Z,this.type=0}}e.ConnectionLostEvent=R;class O{constructor(q,Z,j,X){this.reconnectionToken=q,this.millisSinceLastIncomingData=Z,this.durationSeconds=j,this.cancellableTimer=X,this.type=1}skipWait(){this.cancellableTimer.cancel()}}e.ReconnectionWaitEvent=O;class x{constructor(q,Z,j){this.reconnectionToken=q,this.millisSinceLastIncomingData=Z,this.attempt=j,this.type=2}}e.ReconnectionRunningEvent=x;class F{constructor(q,Z,j){this.reconnectionToken=q,this.millisSinceLastIncomingData=Z,this.attempt=j,this.type=4}}e.ConnectionGainEvent=F;class L{constructor(q,Z,j,X){this.reconnectionToken=q,this.millisSinceLastIncomingData=Z,this.attempt=j,this.handled=X,this.type=3}}e.ReconnectionPermanentFailureEvent=L;class M extends D.Disposable{constructor(q,Z,j,X,Y){super();this._connectionType=q,this._options=Z,this.reconnectionToken=j,this.protocol=X,this._reconnectionFailureIsFatal=Y,this._onDidStateChange=this._register(new k.Emitter),this.onDidStateChange=this._onDidStateChange.event,this._permanentFailure=!1,this._isReconnecting=!1,this._onDidStateChange.fire(new F(this.reconnectionToken,0,0)),this._register(X.onSocketClose($=>{const J=U(this._connectionType,this.reconnectionToken,!0);$?$.type===0?(this._options.logService.info(`${J} received socket close event (hadError: ${$.hadError}).`),$.error&&this._options.logService.error($.error)):(this._options.logService.info(`${J} received socket close event (wasClean: ${$.wasClean}, code: ${$.code}, reason: ${$.reason}).`),$.event&&this._options.logService.error($.event)):this._options.logService.info(`${J} received socket close event.`),this._beginReconnecting()})),this._register(X.onSocketTimeout(()=>{const $=U(this._connectionType,this.reconnectionToken,!0);this._options.logService.info(`${$} received socket timeout event.`),this._beginReconnecting()})),M._instances.push(this),this._register((0,D.toDisposable)(()=>{const $=M._instances.indexOf(this);$>=0&&M._instances.splice($,1)})),this._isPermanentFailure&&this._gotoPermanentFailure(M._permanentFailureMillisSinceLastIncomingData,M._permanentFailureAttempt,M._permanentFailureHandled)}static triggerPermanentFailure(q,Z,j){this._permanentFailure=!0,this._permanentFailureMillisSinceLastIncomingData=q,this._permanentFailureAttempt=Z,this._permanentFailureHandled=j,this._instances.forEach(X=>X._gotoPermanentFailure(this._permanentFailureMillisSinceLastIncomingData,this._permanentFailureAttempt,this._permanentFailureHandled))}static debugTriggerReconnection(){this._instances.forEach(q=>q._beginReconnecting())}static debugPauseSocketWriting(){this._instances.forEach(q=>q._pauseSocketWriting())}get _isPermanentFailure(){return this._permanentFailure||M._permanentFailure}async _beginReconnecting(){if(!this._isReconnecting)try{this._isReconnecting=!0,await this._runReconnectingLoop()}finally{this._isReconnecting=!1}}async _runReconnectingLoop(){if(this._isPermanentFailure)return;const q=U(this._connectionType,this.reconnectionToken,!0);this._options.logService.info(`${q} starting reconnecting loop. You can get more information with the trace log level.`),this._onDidStateChange.fire(new R(this.reconnectionToken,this.protocol.getMillisSinceLastIncomingData()));const Z=[0,5,5,10,10,10,10,10,30];let j=-1;do{j++;const X=j<Z.length?Z[j]:Z[Z.length-1];try{if(X>0){const $=y(X);this._onDidStateChange.fire(new O(this.reconnectionToken,this.protocol.getMillisSinceLastIncomingData(),X,$)),this._options.logService.info(`${q} waiting for ${X} seconds before reconnecting...`);try{await $}catch{}}if(this._isPermanentFailure){this._options.logService.error(`${q} permanent failure occurred while running the reconnecting loop.`);break}this._onDidStateChange.fire(new x(this.reconnectionToken,this.protocol.getMillisSinceLastIncomingData(),j+1)),this._options.logService.info(`${q} resolving connection...`);const Y=await d(this._options,this.reconnectionToken,this.protocol);this._options.logService.info(`${q} connecting to ${Y.host}:${Y.port}...`),await this._reconnect(Y,i(C)),this._options.logService.info(`${q} reconnected!`),this._onDidStateChange.fire(new F(this.reconnectionToken,this.protocol.getMillisSinceLastIncomingData(),j+1));break}catch(Y){if(Y.code==="VSCODE_CONNECTION_ERROR"){this._options.logService.error(`${q} A permanent error occurred in the reconnecting loop! Will give up now! Error:`),this._options.logService.error(Y),this._onReconnectionPermanentFailure(this.protocol.getMillisSinceLastIncomingData(),j+1,!1);break}if(j>360){this._options.logService.error(`${q} An error occurred while reconnecting, but it will be treated as a permanent error because the reconnection grace time has expired! Will give up now! Error:`),this._options.logService.error(Y),this._onReconnectionPermanentFailure(this.protocol.getMillisSinceLastIncomingData(),j+1,!1);break}if(v.RemoteAuthorityResolverError.isTemporarilyNotAvailable(Y)){this._options.logService.info(`${q} A temporarily not available error occurred while trying to reconnect, will try again...`),this._options.logService.trace(Y);continue}if((Y.code==="ETIMEDOUT"||Y.code==="ENETUNREACH"||Y.code==="ECONNREFUSED"||Y.code==="ECONNRESET")&&Y.syscall==="connect"){this._options.logService.info(`${q} A network error occurred while trying to reconnect, will try again...`),this._options.logService.trace(Y);continue}if((0,A.isCancellationError)(Y)){this._options.logService.info(`${q} A promise cancelation error occurred while trying to reconnect, will try again...`),this._options.logService.trace(Y);continue}if(Y instanceof v.RemoteAuthorityResolverError){this._options.logService.error(`${q} A RemoteAuthorityResolverError occurred while trying to reconnect. Will give up now! Error:`),this._options.logService.error(Y),this._onReconnectionPermanentFailure(this.protocol.getMillisSinceLastIncomingData(),j+1,v.RemoteAuthorityResolverError.isHandled(Y));break}this._options.logService.error(`${q} An unknown error occurred while trying to reconnect, since this is an unknown case, it will be treated as a permanent error! Will give up now! Error:`),this._options.logService.error(Y),this._onReconnectionPermanentFailure(this.protocol.getMillisSinceLastIncomingData(),j+1,!1);break}}while(!this._isPermanentFailure)}_onReconnectionPermanentFailure(q,Z,j){this._reconnectionFailureIsFatal?M.triggerPermanentFailure(q,Z,j):this._gotoPermanentFailure(q,Z,j)}_gotoPermanentFailure(q,Z,j){this._onDidStateChange.fire(new L(this.reconnectionToken,q,Z,j)),P(this.protocol)}_pauseSocketWriting(){this.protocol.pauseSocketWriting()}}e.PersistentConnection=M,M._permanentFailure=!1,M._permanentFailureMillisSinceLastIncomingData=0,M._permanentFailureAttempt=0,M._permanentFailureHandled=!1,M._instances=[];class N extends M{constructor(q,Z,j,X,Y){super(1,q,X,Y,!0);this.client=this._register(new w.Client(Y,{remoteAuthority:Z,clientId:j},q.ipcLogger))}async _reconnect(q,Z){await n(q,Z)}}e.ManagementPersistentConnection=N;class B extends M{constructor(q,Z,j,X,Y){super(2,q,j,X,!1);this._startArguments=Z,this.debugPort=Y}async _reconnect(q,Z){await h(q,this._startArguments,Z)}}e.ExtensionHostPersistentConnection=B;function P(G){try{G.acceptDisconnect();const q=G.getSocket();G.dispose(),q.dispose()}catch(q){(0,A.onUnexpectedError)(q)}}function V(G){if(G&&G.type==="error"){const q=new Error(`Connection error: ${G.reason}`);return q.code="VSCODE_CONNECTION_ERROR",q}return null}function z(G,q){for(;G.length<q;)G+=" ";return G}function U(G,q,Z){return`[remote-connection][${z(c(G),13)}][${q.substr(0,5)}\u2026][${Z?"reconnect":"initial"}]`}function H(G,q){return`${U(q,G.reconnectionToken,!!G.reconnectionProtocol)}[${G.host}:${G.port}]`}function K(G){return`${Date.now()-G} ms`}}),define(ne[246],re([1,0,18]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getRemoteName=e.getRemoteAuthority=void 0;function f(A){return A.scheme===t.Schemas.vscodeRemote?A.authority:void 0}e.getRemoteAuthority=f;function _(A){if(!A)return;const k=A.indexOf("+");return k<0?A:A.substr(0,k)}e.getRemoteName=_}),define(ne[107],re([1,0,29,5,246]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IBuiltinExtensionsScannerService=e.isResolverExtension=e.isAuthenticationProviderExtension=e.isLanguagePackExtension=e.ExtensionIdentifier=e.TargetPlatform=e.ExtensionType=e.EXTENSION_CATEGORIES=e.isIExtensionIdentifier=e.getWorkspaceSupportTypeMessage=e.ALL_EXTENSION_KINDS=e.UNDEFINED_PUBLISHER=e.BUILTIN_MANIFEST_CACHE_FILE=e.USER_MANIFEST_CACHE_FILE=e.MANIFEST_CACHE_FOLDER=void 0,e.MANIFEST_CACHE_FOLDER="CachedExtensions",e.USER_MANIFEST_CACHE_FILE="user",e.BUILTIN_MANIFEST_CACHE_FILE="builtin",e.UNDEFINED_PUBLISHER="undefined_publisher",e.ALL_EXTENSION_KINDS=["ui","workspace","web"];function A(c){if(typeof c=="object"&&c!==null&&c.supported!==!0)return c.description}e.getWorkspaceSupportTypeMessage=A;function k(c){return c&&typeof c=="object"&&typeof c.id=="string"&&(!c.uuid||typeof c.uuid=="string")}e.isIExtensionIdentifier=k,e.EXTENSION_CATEGORIES=["Azure","Data Science","Debuggers","Extension Packs","Education","Formatters","Keymaps","Language Packs","Linters","Machine Learning","Notebooks","Programming Languages","SCM Providers","Snippets","Testing","Themes","Visualization","Other"];var D;(function(c){c[c.System=0]="System",c[c.User=1]="User"})(D=e.ExtensionType||(e.ExtensionType={}));var I;(function(c){c.WIN32_X64="win32-x64",c.WIN32_IA32="win32-ia32",c.WIN32_ARM64="win32-arm64",c.LINUX_X64="linux-x64",c.LINUX_ARM64="linux-arm64",c.LINUX_ARMHF="linux-armhf",c.ALPINE_X64="alpine-x64",c.ALPINE_ARM64="alpine-arm64",c.DARWIN_X64="darwin-x64",c.DARWIN_ARM64="darwin-arm64",c.WEB="web",c.UNIVERSAL="universal",c.UNKNOWN="unknown",c.UNDEFINED="undefined"})(I=e.TargetPlatform||(e.TargetPlatform={}));class w{constructor(i){this.value=i,this._lower=i.toLowerCase()}static equals(i,S){if(typeof i=="undefined"||i===null)return typeof S=="undefined"||S===null;if(typeof S=="undefined"||S===null)return!1;if(typeof i=="string"||typeof S=="string"){let s=typeof i=="string"?i:i.value,l=typeof S=="string"?S:S.value;return t.equalsIgnoreCase(s,l)}return i._lower===S._lower}static toKey(i){return typeof i=="string"?i.toLowerCase():i._lower}}e.ExtensionIdentifier=w;function v(c){return c.contributes&&c.contributes.localizations?c.contributes.localizations.length>0:!1}e.isLanguagePackExtension=v;function C(c){return c.contributes&&c.contributes.authentication?c.contributes.authentication.length>0:!1}e.isAuthenticationProviderExtension=C;function o(c,i){if(i){const S=`onResolveRemoteAuthority:${(0,_.getRemoteName)(i)}`;return c.activationEvents?.indexOf(S)!==-1}return!1}e.isResolverExtension=o,e.IBuiltinExtensionsScannerService=(0,f.createDecorator)("IBuiltinExtensionsScannerService")}),define(ne[100],re([1,0,29,79,107,14,9,22,196]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeTargetPlatform=e.isAlpineLinux=e.getExtensionDependencies=e.getMaliciousExtensionsSet=e.BetterMergeId=e.getGalleryExtensionTelemetryData=e.getLocalExtensionTelemetryData=e.groupByExtension=e.getGalleryExtensionId=e.adoptToGalleryExtensionId=e.getExtensionId=e.getIdAndVersion=e.ExtensionKey=e.areSameExtensions=void 0;function w(g,d){return g.uuid&&d.uuid?g.uuid===d.uuid:g.id===d.id?!0:(0,t.compareIgnoreCase)(g.id,d.id)===0}e.areSameExtensions=w;const v=/^([^.]+\..+)-(\d+\.\d+\.\d+)(-(.+))?$/;class C{constructor(d,m,b="undefined"){this.version=m,this.targetPlatform=b,this.id=d.id}static create(d){const m=d.manifest?d.manifest.version:d.version,b=d.manifest?d.targetPlatform:d.properties.targetPlatform;return new C(d.identifier,m,b)}static parse(d){const m=v.exec(d);return m&&m[1]&&m[2]?new C({id:m[1]},m[2],m[4]||void 0):null}toString(){return`${this.id}-${this.version}${this.targetPlatform!=="undefined"?`-${this.targetPlatform}`:""}`}equals(d){return d instanceof C?w(this,d)&&this.version===d.version&&this.targetPlatform===d.targetPlatform:!1}}e.ExtensionKey=C;const o=/^([^.]+\..+)@((prerelease)|(\d+\.\d+\.\d+(-.*)?))$/;function c(g){const d=o.exec(g);return d&&d[1]?[S(d[1]),d[2]]:[S(g),void 0]}e.getIdAndVersion=c;function i(g,d){return`${g}.${d}`}e.getExtensionId=i;function S(g){return g.toLocaleLowerCase()}e.adoptToGalleryExtensionId=S;function s(g,d){return S(i(g,d))}e.getGalleryExtensionId=s;function l(g,d){const m=[],b=E=>{for(const y of m)if(y.some(T=>w(d(T),d(E))))return y;return null};for(const E of g){const y=b(E);y?y.push(E):m.push([E])}return m}e.groupByExtension=l;function r(g){return{id:g.identifier.id,name:g.manifest.name,galleryId:null,publisherId:g.publisherId,publisherName:g.manifest.publisher,publisherDisplayName:g.publisherDisplayName,dependencies:g.manifest.extensionDependencies&&g.manifest.extensionDependencies.length>0}}e.getLocalExtensionTelemetryData=r;function p(g){return{id:g.identifier.id,name:g.name,galleryId:g.identifier.uuid,publisherId:g.publisherId,publisherName:g.publisher,publisherDisplayName:g.publisherDisplayName,isPreReleaseVersion:g.properties.isPreReleaseVersion,dependencies:!!(g.properties.dependencies&&g.properties.dependencies.length>0),...g.telemetryData}}e.getGalleryExtensionTelemetryData=p,e.BetterMergeId=new _.ExtensionIdentifier("pprice.better-merge");function u(g){const d=new Set;if(g.malicious)for(const m of g.malicious)d.add(m.id);return d}e.getMaliciousExtensionsSet=u;function a(g,d){const m=[],b=d.manifest.extensionDependencies?.slice(0)??[];for(;b.length;){const E=b.shift();if(E&&m.every(y=>!w(y.identifier,{id:E}))){const y=g.filter(T=>w(T.identifier,{id:E}));y.length===1&&(m.push(y[0]),b.push(...y[0].manifest.extensionDependencies?.slice(0)??[]))}}return m}e.getExtensionDependencies=a;async function n(g,d){if(!A.isLinux)return!1;let m;try{m=(await g.readFile(k.URI.file("/etc/os-release"))).value.toString()}catch{try{m=(await g.readFile(k.URI.file("/usr/lib/os-release"))).value.toString()}catch(E){d.debug("Error while getting the os-release file.",(0,D.getErrorMessage)(E))}}return!!m&&(m.match(/^ID=([^\u001b\r\n]*)/m)||[])[1]==="alpine"}e.isAlpineLinux=n;async function h(g,d){const m=await n(g,d),b=(0,f.getTargetPlatform)(m?"alpine":A.platform,I.arch);return d.debug("ComputeTargetPlatform:",b),b}e.computeTargetPlatform=h}),define(ne[1977],re([1,0,30,22,111,18,401,9,1324,79,100,107]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionManagementCLIService=void 0;const o=s=>(0,I.localize)(0,null,s),c=(0,I.localize)(1,null,"ms-dotnettools.csharp");function i(s,l){return l?`${s.publisher}.${s.name}@${s.version}`:`${s.publisher}.${s.name}`}let S=class{constructor(l,r){this.extensionManagementService=l,this.extensionGalleryService=r}get location(){}async listExtensions(l,r,p=console){let u=await this.extensionManagementService.getInstalled(1);const a=C.EXTENSION_CATEGORIES.map(h=>h.toLowerCase());if(r&&r!==""){if(a.indexOf(r.toLowerCase())<0){p.log("Invalid category please enter a valid category. To list valid categories run --category without a category specified");return}u=u.filter(h=>h.manifest.categories?h.manifest.categories.map(d=>d.toLowerCase()).indexOf(r.toLowerCase())>-1:!1)}else if(r===""){p.log("Possible Categories: "),a.forEach(h=>{p.log(h)});return}this.location&&p.log((0,I.localize)(2,null,this.location)),u=u.sort((h,g)=>h.identifier.id.localeCompare(g.identifier.id));let n;for(let h of u)n!==h.identifier.id&&(n=h.identifier.id,p.log(i(h.manifest,l)))}async installExtensions(l,r,p,u,a=console){const n=[],h=[];l.length&&a.log(this.location?(0,I.localize)(3,null,this.location):(0,I.localize)(4,null));const g=await this.extensionManagementService.getInstalled(1),d=(y,T)=>{const R=g.find(O=>(0,v.areSameExtensions)(O.identifier,{id:y}));if(R){if(!u&&(!T||T==="prerelease"&&R.preRelease))return a.log((0,I.localize)(5,null,y,R.manifest.version,y)),!1;if(T&&R.manifest.version===T)return a.log((0,I.localize)(6,null,`${y}@${T}`)),!1}return!0},m=(y,T,R)=>{E.push({id:y,version:T!=="prerelease"?T:void 0,installOptions:{...p,isBuiltin:R,installPreReleaseVersion:T==="prerelease"||p.installPreReleaseVersion}})},b=[],E=[];for(const y of l)if(y instanceof D.URI)b.push(y);else{const[T,R]=(0,v.getIdAndVersion)(y);d(T,R)&&m(T,R,!1)}for(const y of r){const[T,R]=(0,v.getIdAndVersion)(y);d(T,R)&&m(T,R,!0)}if(b.length&&await Promise.all(b.map(async y=>{try{const T=await this.installVSIX(y,{...p,isBuiltin:!1},u,a);T&&h.push(T)}catch(T){a.error(T.message||T.stack||T),n.push(y.toString())}})),E.length){const y=await this.getGalleryExtensions(E);await Promise.all(E.map(async T=>{const R=y.get(T.id.toLowerCase());if(R)try{const O=await this.installFromGallery(T,R,g,u,a);O&&h.push(O)}catch(O){a.error(O.message||O.stack||O),n.push(T.id)}else a.error(`${o(T.version?`${T.id}@${T.version}`:T.id)} ${c}`),n.push(T.id)}))}if(n.length)throw new Error((0,I.localize)(7,null,n.join(", ")))}async installVSIX(l,r,p,u){const a=await this.extensionManagementService.getManifest(l);if(!a)throw new Error("Invalid vsix");if(await this.validateVSIX(a,p,u))try{return await this.extensionManagementService.install(l,r),u.log((0,I.localize)(8,null,(0,_.getBaseLabel)(l))),a}catch(h){if((0,f.isCancellationError)(h))return u.log((0,I.localize)(9,null,(0,_.getBaseLabel)(l))),null;throw h}return null}async getGalleryExtensions(l){const r=new Map,p=l.some(a=>a.installOptions.installPreReleaseVersion),u=await this.extensionGalleryService.getExtensions(l.map(a=>({...a,preRelease:p})),t.CancellationToken.None);for(const a of u)r.set(a.identifier.id.toLowerCase(),a);return r}async installFromGallery({id:l,version:r,installOptions:p},u,a,n,h){const g=await this.extensionGalleryService.getManifest(u,t.CancellationToken.None);if(g&&!this.validateExtensionKind(g,h))return null;const d=a.find(m=>(0,v.areSameExtensions)(m.identifier,u.identifier));if(d){if(u.version===d.manifest.version)return h.log((0,I.localize)(10,null,r?`${l}@${r}`:l)),null;h.log((0,I.localize)(11,null,l,u.version))}try{return p.isBuiltin?h.log(r?(0,I.localize)(12,null,l,r):(0,I.localize)(13,null,l)):h.log(r?(0,I.localize)(14,null,l,r):(0,I.localize)(15,null,l)),await this.extensionManagementService.installFromGallery(u,{...p,installGivenVersion:!!r}),h.log((0,I.localize)(16,null,l,u.version)),g}catch(m){if((0,f.isCancellationError)(m))return h.log((0,I.localize)(17,null,l)),null;throw m}}validateExtensionKind(l,r){return!0}async validateVSIX(l,r,p){const u={id:(0,v.getGalleryExtensionId)(l.publisher,l.name)},n=(await this.extensionManagementService.getInstalled(1)).find(h=>(0,v.areSameExtensions)(u,h.identifier)&&(0,k.gt)(h.manifest.version,l.version));return n&&!r?(p.log((0,I.localize)(18,null,n.identifier.id,n.manifest.version,l.version)),!1):this.validateExtensionKind(l,p)}async uninstallExtensions(l,r,p=console){const u=async n=>{if(n instanceof D.URI){const h=await this.extensionManagementService.getManifest(n);return i(h)}return n},a=[];for(const n of l){const h=await u(n),d=(await this.extensionManagementService.getInstalled()).filter(m=>(0,v.areSameExtensions)(m.identifier,{id:h}));if(!d.length)throw new Error(`${this.notInstalled(h)} ${c}`);if(d.some(m=>m.type===0)){p.log((0,I.localize)(19,null,h));return}if(!r&&d.some(m=>m.isBuiltin)){p.log((0,I.localize)(20,null,h));return}p.log((0,I.localize)(21,null,h));for(const m of d)await this.extensionManagementService.uninstall(m),a.push(m);this.location?p.log((0,I.localize)(22,null,h,this.location)):p.log((0,I.localize)(23,null,h))}}async locateExtension(l,r=console){const p=await this.extensionManagementService.getInstalled();l.forEach(u=>{p.forEach(a=>{if(a.identifier.id===u&&a.location.scheme===A.Schemas.file){r.log(a.location.fsPath);return}})})}notInstalled(l){return this.location?(0,I.localize)(24,null,l,this.location):(0,I.localize)(25,null,l)}};S=Ee([W(0,w.IExtensionManagementService),W(1,w.IExtensionGalleryService)],S),e.ExtensionManagementCLIService=S}),define(ne[1978],re([1,0,30,100]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.migrateUnsupportedExtensions=void 0;async function _(A,k,D,I,w){try{const v=await A.getExtensionsControlManifest();if(!v.unsupportedPreReleaseExtensions)return;const C=await A.getInstalled(1);for(const[o,{id:c,migrateStorage:i}]of Object.entries(v.unsupportedPreReleaseExtensions)){const S=C.find(l=>(0,f.areSameExtensions)(l.identifier,{id:o}));if(!S)continue;const s=(await k.getExtensions([{id:c,preRelease:!0}],{targetPlatform:await A.getTargetPlatform(),compatible:!0},t.CancellationToken.None))[0];if(!s){w.info(`Skipping migrating '${S.identifier.id}' extension because, the comaptible target '${c}' extension is not found`);continue}try{w.info(`Migrating '${S.identifier.id}' extension to '${c}' extension...`);const l=!I.getDisabledExtensions().some(p=>(0,f.areSameExtensions)(p,S.identifier));await A.uninstall(S),w.info(`Uninstalled the unsupported extension '${S.identifier.id}'`);let r=C.find(p=>(0,f.areSameExtensions)(p.identifier,{id:c}));(!r||!r.isPreReleaseVersion&&l)&&(r=await A.installFromGallery(s,{installPreReleaseVersion:!0,isMachineScoped:S.isMachineScoped,operation:4}),w.info(`Installed the pre-release extension '${r.identifier.id}'`),l||(await I.disableExtension(r.identifier),w.info(`Disabled the pre-release extension '${r.identifier.id}' because the unsupported extension '${S.identifier.id}' is disabled`)),i&&(D.addToMigrationList((0,f.getExtensionId)(S.manifest.publisher,S.manifest.name),(0,f.getExtensionId)(r.manifest.publisher,r.manifest.name)),w.info("Added pre-release extension to the storage migration list"))),w.info(`Migrated '${S.identifier.id}' extension to '${c}' extension.`)}catch(l){w.error(l)}}}catch(v){w.error(v)}}e.migrateUnsupportedExtensions=_}),define(ne[741],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ipcSharedProcessTunnelChannelName=e.ISharedProcessTunnelService=void 0,e.ISharedProcessTunnelService=(0,t.createDecorator)("sharedProcessTunnelService"),e.ipcSharedProcessTunnelChannelName="sharedProcessTunnel"}),define(ne[1979],re([1,0,22,6,2,18]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteAuthorityResolverService=void 0;class k{constructor(w){this.input=w,this.promise=new Promise((v,C)=>{this._resolve=v,this._reject=C}),this.result=null}resolve(w){this.result=w,this._resolve(this.result)}reject(w){this._reject(w)}}class D extends _.Disposable{constructor(){super();this._onDidChangeConnectionData=this._register(new f.Emitter),this.onDidChangeConnectionData=this._onDidChangeConnectionData.event,this._resolveAuthorityRequests=new Map,this._connectionTokens=new Map,this._canonicalURIRequests=new Map,this._canonicalURIProvider=null}resolveAuthority(w){return this._resolveAuthorityRequests.has(w)||this._resolveAuthorityRequests.set(w,new k(w)),this._resolveAuthorityRequests.get(w).promise}async getCanonicalURI(w){const v=w.toString();if(!this._canonicalURIRequests.has(v)){const C=new k(w);this._canonicalURIProvider&&this._canonicalURIProvider(C.input).then(o=>C.resolve(o),o=>C.reject(o)),this._canonicalURIRequests.set(v,C)}return this._canonicalURIRequests.get(v).promise}getConnectionData(w){if(!this._resolveAuthorityRequests.has(w))return null;const v=this._resolveAuthorityRequests.get(w);if(!v.result)return null;const C=this._connectionTokens.get(w);return{host:v.result.authority.host,port:v.result.authority.port,connectionToken:C}}_clearResolvedAuthority(w){this._resolveAuthorityRequests.has(w)&&(this._resolveAuthorityRequests.get(w).reject(t.canceled()),this._resolveAuthorityRequests.delete(w))}_setResolvedAuthority(w,v){if(this._resolveAuthorityRequests.has(w.authority)){const C=this._resolveAuthorityRequests.get(w.authority);A.RemoteAuthorities.set(w.authority,w.host,w.port),w.connectionToken&&A.RemoteAuthorities.setConnectionToken(w.authority,w.connectionToken),C.resolve({authority:w,options:v}),this._onDidChangeConnectionData.fire()}}_setResolvedAuthorityError(w,v){this._resolveAuthorityRequests.has(w)&&this._resolveAuthorityRequests.get(w).reject(t.ErrorNoTelemetry.fromError(v))}_setAuthorityConnectionToken(w,v){this._connectionTokens.set(w,v),A.RemoteAuthorities.setConnectionToken(w,v),this._onDidChangeConnectionData.fire()}_setCanonicalURIProvider(w){this._canonicalURIProvider=w,this._canonicalURIRequests.forEach(v=>{this._canonicalURIProvider(v.input).then(C=>v.resolve(C),C=>v.reject(C))})}}e.RemoteAuthorityResolverService=D}),define(ne[1980],re([1,0,103,741]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerSharedProcessRemoteService)(f.ISharedProcessTunnelService,f.ipcSharedProcessTunnelChannelName,{supportsDelayedInstantiation:!0})}),define(ne[1981],re([1,0,974,8,31]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RequestService=void 0;let A=class{constructor(D,I){this.configurationService=D,this.logService=I}request(D,I){return this.logService.trace("RequestService#request",D.url),D.proxyAuthorization||(D.proxyAuthorization=this.configurationService.getValue("http.proxyAuthorization")),(0,t.request)(D,I)}async resolveProxy(D){}};A=Ee([W(0,f.IConfigurationService),W(1,_.ILogService)],A),e.RequestService=A}),define(ne[187],re([1,0,60,1337,57,5,17]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.updateProxyConfigurationsScope=e.asJson=e.asText=e.isSuccess=e.IRequestService=void 0,e.IRequestService=(0,A.createDecorator)("requestService");function D(i){return i.res.statusCode&&i.res.statusCode>=200&&i.res.statusCode<300||i.res.statusCode===1223}e.isSuccess=D;function I(i){return i.res.statusCode===204}async function w(i){if(!D(i))throw new Error("Server returned "+i.res.statusCode);return I(i)?null:(await(0,t.streamToBuffer)(i.stream)).toString()}e.asText=w;async function v(i){if(!D(i))throw new Error("Server returned "+i.res.statusCode);if(I(i))return null;const s=(await(0,t.streamToBuffer)(i.stream)).toString();try{return JSON.parse(s)}catch(l){throw l.message+=`: `+s,l}}e.asJson=v;function C(i){c(i)}e.updateProxyConfigurationsScope=C;let o;function c(i){const S=k.Registry.as(_.Extensions.Configuration),s=o;o={id:"http",order:15,title:(0,f.localize)(0,null),type:"object",scope:i,properties:{"http.proxy":{type:"string",pattern:"^https?://([^:]*(:[^@]*)?@)?([^:]+|\\[[:0-9a-fA-F]+\\])(:\\d+)?/?$|^$",markdownDescription:(0,f.localize)(1,null),restricted:!0},"http.proxyStrictSSL":{type:"boolean",default:!0,description:(0,f.localize)(2,null),restricted:!0},"http.proxyAuthorization":{type:["null","string"],default:null,markdownDescription:(0,f.localize)(3,null),restricted:!0},"http.proxySupport":{type:"string",enum:["off","on","fallback","override"],enumDescriptions:[(0,f.localize)(4,null),(0,f.localize)(5,null),(0,f.localize)(6,null),(0,f.localize)(7,null)],default:"override",description:(0,f.localize)(8,null),restricted:!0},"http.systemCertificates":{type:"boolean",default:!0,description:(0,f.localize)(9,null),restricted:!0}}},S.updateConfigurations({add:[o],remove:s?[s]:[]})}c(2)}),define(ne[1982],re([1,0,30,18,23,187]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DownloadService=void 0;let k=class{constructor(I,w){this.requestService=I,this.fileService=w}async download(I,w,v=t.CancellationToken.None){if(I.scheme===f.Schemas.file||I.scheme===f.Schemas.vscodeRemote){await this.fileService.copy(I,w);return}const C={type:"GET",url:I.toString()},o=await this.requestService.request(C,v);if(o.res.statusCode===200)await this.fileService.writeFile(w,o.stream);else{const c=await(0,A.asText)(o);throw new Error(`Expected 200, got back ${o.res.statusCode} instead. ${c}`)}}};k=Ee([W(0,A.IRequestService),W(1,_.IFileService)],k),e.DownloadService=k}),define(ne[1983],re([1,0,15,30,143,2,19,721,23,31,46,187]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionTipsService=void 0;let o=class extends A.Disposable{constructor(i,S,s,l){super();this.fileService=i,this.productService=S,this.requestService=s,this.logService=l,this.allConfigBasedTips=new Map,this.productService.configBasedExtensionTips&&(0,_.forEach)(this.productService.configBasedExtensionTips,({value:r})=>this.allConfigBasedTips.set(r.configPath,r))}getConfigBasedTips(i){return this.getValidConfigBasedTips(i)}getAllWorkspacesTips(){return this.fetchWorkspacesTips()}async getImportantExecutableBasedTips(){return[]}async getOtherExecutableBasedTips(){return[]}async getValidConfigBasedTips(i){const S=[];for(const[s,l]of this.allConfigBasedTips)if(!(l.configScheme&&l.configScheme!==i.scheme))try{const r=await this.fileService.readFile((0,k.joinPath)(i,s)),p=new Map;(0,_.forEach)(l.recommendations,({key:a,value:n})=>{if((0,t.isNonEmptyArray)(n.remotes))for(const h of n.remotes)p.set(h,{extensionId:a,extensionName:n.name,configName:l.configName,important:!!n.important,isExtensionPack:!!n.isExtensionPack,whenNotInstalled:n.whenNotInstalled});else S.push({extensionId:a,extensionName:n.name,configName:l.configName,important:!!n.important,isExtensionPack:!!n.isExtensionPack,whenNotInstalled:n.whenNotInstalled})});const u=(0,D.getDomainsOfRemotes)(r.value.toString(),[...p.keys()]);for(const a of u){const n=p.get(a);n&&S.push(n)}}catch{}return S}async fetchWorkspacesTips(){if(!this.productService.extensionsGallery?.recommendationsUrl)return[];try{const i=await this.requestService.request({type:"GET",url:this.productService.extensionsGallery?.recommendationsUrl},f.CancellationToken.None);if(i.res.statusCode!==200)return[];const S=await(0,C.asJson)(i);return S?S.workspaceRecommendations||[]:[]}catch(i){return this.logService.error(i),[]}}};o=Ee([W(0,I.IFileService),W(1,v.IProductService),W(2,C.IRequestService),W(3,w.ILogService)],o),e.ExtensionTipsService=o}),define(ne[1984],re([1,0,116,5]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ipcSharedProcessWorkerChannelName=e.ISharedProcessWorkerService=e.hash=void 0;function _(A){return(0,t.hash)({moduleId:A.process.moduleId,windowId:A.reply.windowId})}e.hash=_,e.ISharedProcessWorkerService=(0,f.createDecorator)("sharedProcessWorkerService"),e.ipcSharedProcessWorkerChannelName="sharedProcessWorker"}),define(ne[469],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISignService=e.SIGN_SERVICE_ID=void 0,e.SIGN_SERVICE_ID="signService",e.ISignService=(0,t.createDecorator)(e.SIGN_SERVICE_ID)}),define(ne[24],re([1,0,11,6,2,235,13,661,5]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.logStorage=e.InMemoryStorageService=e.AbstractStorageService=e.StorageTarget=e.StorageScope=e.WillSaveStateReason=e.IStorageService=e.IS_NEW_KEY=void 0,e.IS_NEW_KEY="__$__isNewStorageMarker";const w="__$__targetStorageMarker";e.IStorageService=(0,I.createDecorator)("storageService");var v;(function(s){s[s.NONE=0]="NONE",s[s.SHUTDOWN=1]="SHUTDOWN"})(v=e.WillSaveStateReason||(e.WillSaveStateReason={}));var C;(function(s){s[s.GLOBAL=0]="GLOBAL",s[s.WORKSPACE=1]="WORKSPACE"})(C=e.StorageScope||(e.StorageScope={}));var o;(function(s){s[s.USER=0]="USER",s[s.MACHINE=1]="MACHINE"})(o=e.StorageTarget||(e.StorageTarget={}));class c extends _.Disposable{constructor(l={flushInterval:c.DEFAULT_FLUSH_INTERVAL}){super();this.options=l,this._onDidChangeValue=this._register(new f.PauseableEmitter),this.onDidChangeValue=this._onDidChangeValue.event,this._onDidChangeTarget=this._register(new f.PauseableEmitter),this.onDidChangeTarget=this._onDidChangeTarget.event,this._onWillSaveState=this._register(new f.Emitter),this.onWillSaveState=this._onWillSaveState.event,this.flushWhenIdleScheduler=this._register(new t.RunOnceScheduler(()=>this.doFlushWhenIdle(),this.options.flushInterval)),this.runFlushWhenIdle=this._register(new _.MutableDisposable),this._workspaceKeyTargets=void 0,this._globalKeyTargets=void 0}doFlushWhenIdle(){this.runFlushWhenIdle.value=(0,t.runWhenIdle)(()=>{this.shouldFlushWhenIdle()&&this.flush(),this.flushWhenIdleScheduler.schedule()})}shouldFlushWhenIdle(){return!0}stopFlushWhenIdle(){(0,_.dispose)([this.runFlushWhenIdle,this.flushWhenIdleScheduler])}initialize(){return this.initializationPromise||(this.initializationPromise=(async()=>{(0,A.mark)("code/willInitStorage");try{await this.doInitialize()}finally{(0,A.mark)("code/didInitStorage")}this.flushWhenIdleScheduler.schedule()})()),this.initializationPromise}emitDidChangeValue(l,r){r===w?(l===0?this._globalKeyTargets=void 0:l===1&&(this._workspaceKeyTargets=void 0),this._onDidChangeTarget.fire({scope:l})):this._onDidChangeValue.fire({scope:l,key:r,target:this.getKeyTargets(l)[r]})}emitWillSaveState(l){this._onWillSaveState.fire({reason:l})}get(l,r,p){return this.getStorage(r)?.get(l,p)}getBoolean(l,r,p){return this.getStorage(r)?.getBoolean(l,p)}getNumber(l,r,p){return this.getStorage(r)?.getNumber(l,p)}store(l,r,p,u){if((0,k.isUndefinedOrNull)(r)){this.remove(l,p);return}this.withPausedEmitters(()=>{this.updateKeyTarget(l,p,u),this.getStorage(p)?.set(l,r)})}remove(l,r){this.withPausedEmitters(()=>{this.updateKeyTarget(l,r,void 0),this.getStorage(r)?.delete(l)})}withPausedEmitters(l){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{l()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}keys(l,r){const p=[],u=this.getKeyTargets(l);for(const a of Object.keys(u))u[a]===r&&p.push(a);return p}updateKeyTarget(l,r,p){const u=this.getKeyTargets(r);typeof p=="number"?u[l]!==p&&(u[l]=p,this.getStorage(r)?.set(w,JSON.stringify(u))):typeof u[l]=="number"&&(delete u[l],this.getStorage(r)?.set(w,JSON.stringify(u)))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get globalKeyTargets(){return this._globalKeyTargets||(this._globalKeyTargets=this.loadKeyTargets(0)),this._globalKeyTargets}getKeyTargets(l){return l===0?this.globalKeyTargets:this.workspaceKeyTargets}loadKeyTargets(l){const r=this.get(w,l);if(r)try{return JSON.parse(r)}catch{}return Object.create(null)}isNew(l){return this.getBoolean(e.IS_NEW_KEY,l)===!0}async flush(l=v.NONE){this._onWillSaveState.fire({reason:l});const r=this.getStorage(0),p=this.getStorage(1);switch(l){case v.NONE:await t.Promises.settled([r?.whenFlushed()??Promise.resolve(),p?.whenFlushed()??Promise.resolve()]);break;case v.SHUTDOWN:await t.Promises.settled([r?.flush(0)??Promise.resolve(),p?.flush(0)??Promise.resolve()]);break}}async logStorage(){const l=this.getStorage(0)?.items??new Map,r=this.getStorage(1)?.items??new Map;return S(l,r,this.getLogDetails(0)??"",this.getLogDetails(1)??"")}}e.AbstractStorageService=c,c.DEFAULT_FLUSH_INTERVAL=60*1e3;class i extends c{constructor(){super();this.globalStorage=this._register(new D.Storage(new D.InMemoryStorageDatabase)),this.workspaceStorage=this._register(new D.Storage(new D.InMemoryStorageDatabase)),this._register(this.workspaceStorage.onDidChangeStorage(l=>this.emitDidChangeValue(1,l))),this._register(this.globalStorage.onDidChangeStorage(l=>this.emitDidChangeValue(0,l)))}getStorage(l){return l===0?this.globalStorage:this.workspaceStorage}getLogDetails(l){return l===0?"inMemory (global)":"inMemory (workspace)"}async doInitialize(){}async migrate(l){}}e.InMemoryStorageService=i;async function S(s,l,r,p){const u=b=>{try{return JSON.parse(b)}catch{return b}},a=new Map,n=new Map;s.forEach((b,E)=>{a.set(E,b),n.set(E,u(b))});const h=new Map,g=new Map;l.forEach((b,E)=>{h.set(E,b),g.set(E,u(b))}),console.group(`Storage: Global (path: ${r})`);let d=[];a.forEach((b,E)=>{d.push({key:E,value:b})}),console.table(d),console.groupEnd(),console.log(n),console.group(`Storage: Workspace (path: ${p})`);let m=[];h.forEach((b,E)=>{m.push({key:E,value:b})}),console.table(m),console.groupEnd(),console.log(g)}e.logStorage=S}),define(ne[1985],re([1,0,11,150,55,20,726,35,5,24]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensCache=e.ICodeLensCache=void 0,e.ICodeLensCache=(0,I.createDecorator)("ICodeLensCache");class v{constructor(c,i){this.lineCount=c,this.data=i}}let C=class{constructor(c){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new _.LRUCache(20,.75);const i="codelens/cache";(0,t.runWhenIdle)(()=>c.remove(i,1));const S="codelens/cache2",s=c.get(S,1,"{}");this._deserialize(s),(0,f.once)(c.onWillSaveState)(l=>{l.reason===w.WillSaveStateReason.SHUTDOWN&&c.store(S,this._serialize(),1,1)})}put(c,i){const S=i.lenses.map(r=>({range:r.symbol.range,command:r.symbol.command&&{id:"",title:r.symbol.command?.title}})),s=new k.CodeLensModel;s.add({lenses:S,dispose:()=>{}},this._fakeProvider);const l=new v(c.getLineCount(),s);this._cache.set(c.uri.toString(),l)}get(c){const i=this._cache.get(c.uri.toString());return i&&i.lineCount===c.getLineCount()?i.data:void 0}delete(c){this._cache.delete(c.uri.toString())}_serialize(){const c=Object.create(null);for(const[i,S]of this._cache){const s=new Set;for(const l of S.data.lenses)s.add(l.symbol.range.startLineNumber);c[i]={lineCount:S.lineCount,lines:[...s.values()]}}return JSON.stringify(c)}_deserialize(c){try{const i=JSON.parse(c);for(const S in i){const s=i[S],l=[];for(const p of s.lines)l.push({range:new A.Range(p,1,p,11)});const r=new k.CodeLensModel;r.add({lenses:l,dispose(){}},this._fakeProvider),this._cache.set(S,new v(s.lineCount,r))}}catch{}}};C=Ee([W(0,w.IStorageService)],C),e.CodeLensCache=C,(0,D.registerSingleton)(e.ICodeLensCache,C)}),define(ne[1986],re([1,0,11,2,55,86,8,35,5,24]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISuggestMemoryService=e.SuggestMemoryService=e.PrefixMemory=e.LRUMemory=e.NoMemory=e.Memory=void 0;class v{constructor(s){this.name=s}select(s,l,r){if(r.length===0)return 0;let p=r[0].score[0];for(let u=0;u<r.length;u++){const{score:a,completion:n}=r[u];if(a[0]!==p)break;if(n.preselect)return u}return 0}}e.Memory=v;class C extends v{constructor(){super("first")}memorize(s,l,r){}toJSON(){}fromJSON(){}}e.NoMemory=C;class o extends v{constructor(){super("recentlyUsed");this._cache=new _.LRUCache(300,.66),this._seq=0}memorize(s,l,r){const p=`${s.getLanguageId()}/${r.textLabel}`;this._cache.set(p,{touch:this._seq++,type:r.completion.kind,insertText:r.completion.insertText})}select(s,l,r){if(r.length===0)return 0;const p=s.getLineContent(l.lineNumber).substr(l.column-10,l.column-1);if(/\s$/.test(p))return super.select(s,l,r);let u=r[0].score[0],a=-1,n=-1,h=-1;for(let g=0;g<r.length&&r[g].score[0]===u;g++){const d=`${s.getLanguageId()}/${r[g].textLabel}`,m=this._cache.peek(d);if(m&&m.touch>h&&m.type===r[g].completion.kind&&m.insertText===r[g].completion.insertText&&(h=m.touch,n=g),r[g].completion.preselect&&a===-1)return a=g}return n!==-1?n:a!==-1?a:0}toJSON(){return this._cache.toJSON()}fromJSON(s){this._cache.clear();let l=0;for(const[r,p]of s)p.touch=l,p.type=typeof p.type=="number"?p.type:A.CompletionItemKinds.fromString(p.type),this._cache.set(r,p);this._seq=this._cache.size}}e.LRUMemory=o;class c extends v{constructor(){super("recentlyUsedByPrefix");this._trie=_.TernarySearchTree.forStrings(),this._seq=0}memorize(s,l,r){const{word:p}=s.getWordUntilPosition(l),u=`${s.getLanguageId()}/${p}`;this._trie.set(u,{type:r.completion.kind,insertText:r.completion.insertText,touch:this._seq++})}select(s,l,r){let{word:p}=s.getWordUntilPosition(l);if(!p)return super.select(s,l,r);let u=`${s.getLanguageId()}/${p}`,a=this._trie.get(u);if(a||(a=this._trie.findSubstr(u)),a)for(let n=0;n<r.length;n++){let{kind:h,insertText:g}=r[n].completion;if(h===a.type&&g===a.insertText)return n}return super.select(s,l,r)}toJSON(){let s=[];return this._trie.forEach((l,r)=>s.push([r,l])),s.sort((l,r)=>-(l[1].touch-r[1].touch)).forEach((l,r)=>l[1].touch=r),s.slice(0,200)}fromJSON(s){if(this._trie.clear(),s.length>0){this._seq=s[0][1].touch+1;for(const[l,r]of s)r.type=typeof r.type=="number"?r.type:A.CompletionItemKinds.fromString(r.type),this._trie.set(l,r)}}}e.PrefixMemory=c;let i=class An{constructor(s,l){this._storageService=s,this._configService=l,this._disposables=new f.DisposableStore,this._persistSoon=new t.RunOnceScheduler(()=>this._saveState(),500),this._disposables.add(s.onWillSaveState(r=>{r.reason===w.WillSaveStateReason.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(s,l,r){this._withStrategy(s,l).memorize(s,l,r),this._persistSoon.schedule()}select(s,l,r){return this._withStrategy(s,l).select(s,l,r)}_withStrategy(s,l){const r=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:s.getLanguageIdAtPosition(l.lineNumber,l.column),resource:s.uri});if(this._strategy?.name!==r){this._saveState();const p=An._strategyCtors.get(r)||C;this._strategy=new p;try{const a=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,n=this._storageService.get(`${An._storagePrefix}/${r}`,a);n&&this._strategy.fromJSON(JSON.parse(n))}catch{}}return this._strategy}_saveState(){if(this._strategy){const l=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,r=JSON.stringify(this._strategy);this._storageService.store(`${An._storagePrefix}/${this._strategy.name}`,r,l,1)}}};i._strategyCtors=new Map([["recentlyUsedByPrefix",c],["recentlyUsed",o],["first",C]]),i._storagePrefix="suggest/memories",i=Ee([W(0,w.IStorageService),W(1,k.IConfigurationService)],i),e.SuggestMemoryService=i,e.ISuggestMemoryService=(0,I.createDecorator)("ISuggestMemories"),(0,D.registerSingleton)(e.ISuggestMemoryService,i,!0)}),define(ne[742],re([1,0,6,2,13,79,100,24]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StorageManager=e.GlobalExtensionEnablementService=void 0;let I=class extends f.Disposable{constructor(C,o){super();this._onDidChangeEnablement=new t.Emitter,this.onDidChangeEnablement=this._onDidChangeEnablement.event,this.storageManger=this._register(new w(C)),this._register(this.storageManger.onDidChange(c=>this._onDidChangeEnablement.fire({extensions:c,source:"storage"}))),this._register(o.onDidInstallExtensions(c=>c.forEach(({local:i,operation:S})=>{i&&S===4&&this._removeFromDisabledExtensions(i.identifier)})))}async enableExtension(C,o){return this._removeFromDisabledExtensions(C)?(this._onDidChangeEnablement.fire({extensions:[C],source:o}),!0):!1}async disableExtension(C,o){return this._addToDisabledExtensions(C)?(this._onDidChangeEnablement.fire({extensions:[C],source:o}),!0):!1}getDisabledExtensions(){return this._getExtensions(A.DISABLED_EXTENSIONS_STORAGE_PATH)}async getDisabledExtensionsAsync(){return this.getDisabledExtensions()}_addToDisabledExtensions(C){let o=this.getDisabledExtensions();return o.every(c=>!(0,k.areSameExtensions)(c,C))?(o.push(C),this._setDisabledExtensions(o),!0):!1}_removeFromDisabledExtensions(C){let o=this.getDisabledExtensions();for(let c=0;c<o.length;c++){const i=o[c];if((0,k.areSameExtensions)(i,C))return o.splice(c,1),this._setDisabledExtensions(o),!0}return!1}_setDisabledExtensions(C){this._setExtensions(A.DISABLED_EXTENSIONS_STORAGE_PATH,C)}_getExtensions(C){return this.storageManger.get(C,0)}_setExtensions(C,o){this.storageManger.set(C,o,0)}};I=Ee([W(0,D.IStorageService),W(1,A.IExtensionManagementService)],I),e.GlobalExtensionEnablementService=I;class w extends f.Disposable{constructor(C){super();this.storageService=C,this.storage=Object.create(null),this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this._register(C.onDidChangeValue(o=>this.onDidStorageChange(o)))}get(C,o){let c;return o===0?((0,_.isUndefinedOrNull)(this.storage[C])&&(this.storage[C]=this._get(C,o)),c=this.storage[C]):c=this._get(C,o),JSON.parse(c)}set(C,o,c){let i=JSON.stringify(o.map(({id:s,uuid:l})=>({id:s,uuid:l})));this._get(C,c)!==i&&(c===0&&(o.length?this.storage[C]=i:delete this.storage[C]),this._set(C,o.length?i:void 0,c))}onDidStorageChange(C){if(C.scope===0&&!(0,_.isUndefinedOrNull)(this.storage[C.key])&&this._get(C.key,C.scope)!==this.storage[C.key]){const c=this.get(C.key,C.scope);delete this.storage[C.key];const i=this.get(C.key,C.scope),S=c.filter(l=>!i.some(r=>(0,k.areSameExtensions)(l,r))),s=i.filter(l=>!c.some(r=>(0,k.areSameExtensions)(r,l)));(S.length||s.length)&&this._onDidChange.fire([...S,...s])}}_get(C,o){return this.storageService.get(C,o,"[]")}_set(C,o,c){o?this.storageService.store(C,o,c,1):this.storageService.remove(C,c)}}e.StorageManager=w}),define(ne[311],re([1,0,5,6,2,24,100,46,15,31,13]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionStorageService=e.IExtensionStorageService=void 0,e.IExtensionStorageService=(0,t.createDecorator)("IExtensionStorageService");const C=/^extensionKeys\/([^.]+\..+)@(\d+\.\d+\.\d+(-.*)?)$/;let o=class nn extends _.Disposable{constructor(i,S,s){super();this.storageService=i,this.productService=S,this.logService=s,this._onDidChangeExtensionStorageToSync=this._register(new f.Emitter),this.onDidChangeExtensionStorageToSync=this._onDidChangeExtensionStorageToSync.event,this.extensionsWithKeysForSync=new Set,this.initialize(),this._register(this.storageService.onDidChangeValue(l=>this.onDidChangeStorageValue(l)))}static toKey(i){return`extensionKeys/${(0,k.adoptToGalleryExtensionId)(i.id)}@${i.version}`}static fromKey(i){const S=C.exec(i);if(S&&S[1])return{id:S[1],version:S[2]}}initialize(){const i=this.storageService.keys(0,1);for(const S of i){const s=nn.fromKey(S);s&&this.extensionsWithKeysForSync.add(s.id.toLowerCase())}}onDidChangeStorageValue(i){if(i.scope!==0)return;if(this.extensionsWithKeysForSync.has(i.key.toLowerCase())){this._onDidChangeExtensionStorageToSync.fire();return}const S=nn.fromKey(i.key);if(S){this.extensionsWithKeysForSync.add(S.id.toLowerCase()),this._onDidChangeExtensionStorageToSync.fire();return}}getExtensionId(i){if((0,v.isString)(i))return i;const S=i.manifest?i.manifest.publisher:i.publisher,s=i.manifest?i.manifest.name:i.name;return(0,k.getExtensionId)(S,s)}getExtensionState(i,S){const s=this.getExtensionId(i),l=this.storageService.get(s,S?0:1);if(l)try{return JSON.parse(l)}catch(r){this.logService.error(`[mainThreadStorage] unexpected error parsing storage contents (extensionId: ${s}, global: ${S}): ${r}`)}}setExtensionState(i,S,s){const l=this.getExtensionId(i);S===void 0?this.storageService.remove(l,s?0:1):this.storageService.store(l,JSON.stringify(S),s?0:1,1)}setKeysForSync(i,S){this.storageService.store(nn.toKey(i),JSON.stringify(S),0,1)}getKeysForSync(i){const S=this.productService.extensionSyncedKeys?.[i.id.toLowerCase()],s=this.storageService.get(nn.toKey(i),0),l=s?JSON.parse(s):void 0;return l&&S?(0,I.distinct)([...l,...S]):l||S}addToMigrationList(i,S){if(i!==S){const s=this.migrationList.filter(l=>!l.includes(i)&&!l.includes(S));s.push([i,S]),this.migrationList=s}}getSourceExtensionToMigrate(i){const S=this.migrationList.find(([,s])=>i===s);return S?S[0]:void 0}get migrationList(){const i=this.storageService.get("extensionStorage.migrationList",0,"[]");try{const S=JSON.parse(i);if((0,v.isArray)(S))return S}catch{}return[]}set migrationList(i){i.length?this.storageService.store("extensionStorage.migrationList",JSON.stringify(i),0,1):this.storageService.remove("extensionStorage.migrationList",0)}};o=Ee([W(0,A.IStorageService),W(1,D.IProductService),W(2,w.ILogService)],o),e.ExtensionStorageService=o}),define(ne[1987],re([1,0,6,2]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StorageDatabaseChannelClient=void 0;class _ extends f.Disposable{constructor(w,v){super();this.channel=w,this.workspace=v}async getItems(){const w={workspace:this.workspace},v=await this.channel.call("getItems",w);return new Map(v)}updateItems(w){const v={workspace:this.workspace};return w.insert&&(v.insert=Array.from(w.insert.entries())),w.delete&&(v.delete=Array.from(w.delete.values())),this.channel.call("updateItems",v)}}class A extends _{constructor(w){super(w,void 0);this._onDidChangeItemsExternal=this._register(new t.Emitter),this.onDidChangeItemsExternal=this._onDidChangeItemsExternal.event,this.registerListeners()}registerListeners(){this._register(this.channel.listen("onDidChangeGlobalStorage")(w=>this.onDidChangeGlobalStorage(w)))}onDidChangeGlobalStorage(w){(Array.isArray(w.changed)||Array.isArray(w.deleted))&&this._onDidChangeItemsExternal.fire({changed:w.changed?new Map(w.changed):void 0,deleted:w.deleted?new Set(w.deleted):void 0})}async close(){this.dispose()}}class k extends _{constructor(w,v){super(w,v);this.onDidChangeItemsExternal=t.Event.None}async close(){const w={workspace:this.workspace};return this.channel.call("close",w)}}class D extends f.Disposable{constructor(w,v){super();this.channel=w,this.workspace=v,this._globalStorage=void 0,this._workspaceStorage=void 0}get globalStorage(){return this._globalStorage||(this._globalStorage=new A(this.channel)),this._globalStorage}get workspaceStorage(){return!this._workspaceStorage&&this.workspace&&(this._workspaceStorage=new k(this.channel,this.workspace)),this._workspaceStorage}}e.StorageDatabaseChannelClient=D}),define(ne[1988],re([1,0,11,2,19,661,24,1987]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeStorageService=void 0;class I extends k.AbstractStorageService{constructor(v,C,o){super();this.mainProcessService=C,this.environmentService=o,this.workspaceStorage=void 0,this.workspaceStorageId=void 0,this.workspaceStorageDisposable=this._register(new f.MutableDisposable),this.globalStorage=this.createGlobalStorage(),this.workspaceStorage=this.createWorkspaceStorage(v)}createGlobalStorage(){const v=new D.StorageDatabaseChannelClient(this.mainProcessService.getChannel("storage"),void 0),C=new A.Storage(v.globalStorage);return this._register(C.onDidChangeStorage(o=>this.emitDidChangeValue(0,o))),C}createWorkspaceStorage(v){const C=new D.StorageDatabaseChannelClient(this.mainProcessService.getChannel("storage"),v);if(C.workspaceStorage){const o=new A.Storage(C.workspaceStorage);return this.workspaceStorageDisposable.value=o.onDidChangeStorage(c=>this.emitDidChangeValue(1,c)),this.workspaceStorageId=v?.id,o}else{this.workspaceStorageDisposable.clear(),this.workspaceStorageId=void 0;return}}async doInitialize(){await t.Promises.settled([this.globalStorage.init(),this.workspaceStorage?.init()??Promise.resolve()])}getStorage(v){return v===0?this.globalStorage:this.workspaceStorage}getLogDetails(v){return v===0?this.environmentService.globalStorageHome.fsPath:this.workspaceStorageId?`${(0,_.joinPath)(this.environmentService.workspaceStorageHome,this.workspaceStorageId,"state.vscdb").fsPath}`:void 0}async close(){this.stopFlushWhenIdle(),this.emitWillSaveState(k.WillSaveStateReason.SHUTDOWN),await t.Promises.settled([this.globalStorage.close(),this.workspaceStorage?.close()??Promise.resolve()])}async migrate(v){const C=this.workspaceStorage,o=C?.items??new Map;C&&(await C.close(),C.dispose()),this.workspaceStorage=this.createWorkspaceStorage(v),await this.workspaceStorage.init();for(const[c,i]of o)this.workspaceStorage.set(c,i)}}e.NativeStorageService=I}),define(ne[1989],re([1,0,14,196,9,89]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyMicrosoftInternalDomain=e.resolveCommonProperties=void 0;function k(w){if(t.platform===2&&/^penguin(\.|$)/i.test(w))return"chromebook"}async function D(w,v,C,o,c,i,S,s,l,r){const p=Object.create(null);p["common.machineId"]=S,p.sessionID=(0,A.generateUuid)()+Date.now(),p.commitHash=c,p.version=i,p["common.platformVersion"]=(v||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),p["common.platform"]=(0,t.PlatformToString)(t.platform),p["common.nodePlatform"]=f.platform,p["common.nodeArch"]=o,p["common.product"]=r||"desktop";const u=I(s||[]);u&&(p["common.msftInternal"]=u);let a=0;const n=Date.now();Object.defineProperties(p,{timestamp:{get:()=>new Date,enumerable:!0},"common.timesincesessionstart":{get:()=>Date.now()-n,enumerable:!0},"common.sequence":{get:()=>a++,enumerable:!0}}),t.isLinuxSnap&&(p["common.snap"]="true");const h=k(C);h&&(p["common.platformDetail"]=h);try{const g=await w.readFile(_.URI.file(l));p["common.source"]=g.value.toString().slice(0,30)}catch{}return p}e.resolveCommonProperties=D;function I(w){const v=f.env.USERDNSDOMAIN;if(!v)return!1;const C=v.toLowerCase();return w.some(o=>C===o)}e.verifyMicrosoftInternalDomain=I}),define(ne[1990],re([1,0,15,22,2,51]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorEvent=void 0;var k;(function(I){function w(v,C){return v.callstack<C.callstack?-1:v.callstack>C.callstack?1:0}I.compare=w})(k=e.ErrorEvent||(e.ErrorEvent={}));class D{constructor(w,v=D.ERROR_FLUSH_TIMEOUT){this._flushHandle=-1,this._buffer=[],this._disposables=new _.DisposableStore,this._telemetryService=w,this._flushDelay=v;const C=f.errorHandler.addListener(o=>this._onErrorEvent(o));this._disposables.add((0,_.toDisposable)(C)),this.installErrorListeners()}dispose(){clearTimeout(this._flushHandle),this._flushBuffer(),this._disposables.dispose()}installErrorListeners(){}_onErrorEvent(w){if(!w||(w.detail&&w.detail.stack&&(w=w.detail),w instanceof f.ErrorNoTelemetry))return;let v=Array.isArray(w.stack)?w.stack.join(` `):w.stack,C=w.message?w.message:(0,A.safeStringify)(w);!v||this._enqueue({msg:C,callstack:v})}_enqueue(w){const v=(0,t.binarySearch)(this._buffer,w,k.compare);v<0?(w.count=1,this._buffer.splice(~v,0,w)):(this._buffer[v].count||(this._buffer[v].count=0),this._buffer[v].count+=1),this._flushHandle===-1&&(this._flushHandle=setTimeout(()=>{this._flushBuffer(),this._flushHandle=-1},this._flushDelay))}_flushBuffer(){for(let w of this._buffer)this._telemetryService.publicLogError2("UnhandledError",w);this._buffer.length=0}}e.default=D,D.ERROR_FLUSH_TIMEOUT=5*1e3}),define(ne[1991],re([1,0,2,14,1990]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class A extends _.default{installErrorListeners(){let D,I=this;typeof f.globals.onerror=="function"&&(D=f.globals.onerror),f.globals.onerror=function(w,v,C,o,c){I._onUncaughtError(w,v,C,o,c),D&&D.apply(this,arguments)},this._disposables.add((0,t.toDisposable)(()=>{D&&(f.globals.onerror=D)}))}_onUncaughtError(D,I,w,v,C){let o={callstack:D,msg:D,file:I,line:w,column:v};if(C){let{name:c,message:i,stack:S}=C;o.uncaught_error_name=c,i&&(o.uncaught_error_msg=i),S&&(o.callstack=Array.isArray(C.stack)?C.stack=C.stack.join(` `):C.stack)}this._enqueue(o)}}e.default=A}),define(ne[27],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryConfiguration=e.TelemetryLevel=e.TELEMETRY_OLD_SETTING_ID=e.TELEMETRY_SETTING_ID=e.TELEMETRY_SECTION_ID=e.machineIdKey=e.lastSessionDateStorageKey=e.firstSessionDateStorageKey=e.currentSessionDateStorageKey=e.ICustomEndpointTelemetryService=e.ITelemetryService=void 0,e.ITelemetryService=(0,t.createDecorator)("telemetryService"),e.ICustomEndpointTelemetryService=(0,t.createDecorator)("customEndpointTelemetryService"),e.currentSessionDateStorageKey="telemetry.currentSessionDate",e.firstSessionDateStorageKey="telemetry.firstSessionDate",e.lastSessionDateStorageKey="telemetry.lastSessionDate",e.machineIdKey="telemetry.machineId",e.TELEMETRY_SECTION_ID="telemetry",e.TELEMETRY_SETTING_ID="telemetry.telemetryLevel",e.TELEMETRY_OLD_SETTING_ID="telemetry.enableTelemetry";var f;(function(A){A[A.NONE=0]="NONE",A[A.CRASH=1]="CRASH",A[A.ERROR=2]="ERROR",A[A.USAGE=3]="USAGE"})(f=e.TelemetryLevel||(e.TelemetryLevel={}));var _;(function(A){A.OFF="off",A.CRASH="crash",A.ERROR="error",A.ON="all"})(_=e.TelemetryConfiguration||(e.TelemetryConfiguration={}))}),define(ne[743],re([1,0,130,22,102,2,55,81,13,1335,28,8,54,5,38,245,24,27]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommandsHistory=e.AbstractCommandsQuickAccessProvider=void 0;let r=class Ln extends S.PickerQuickAccessProvider{constructor(a,n,h,g,d,m){super(Ln.PREFIX,a);this.instantiationService=n,this.keybindingService=h,this.commandService=g,this.telemetryService=d,this.dialogService=m,this.commandsHistory=this._register(this.instantiationService.createInstance(p)),this.options=a}async _getPicks(a,n,h){const g=await this.getCommandPicks(n,h);if(h.isCancellationRequested)return[];const d=[];for(const y of g){const T=(0,I.withNullAsUndefined)(Ln.WORD_FILTER(a,y.label)),R=y.commandAlias?(0,I.withNullAsUndefined)(Ln.WORD_FILTER(a,y.commandAlias)):void 0;T||R?(y.highlights={label:T,detail:this.options.showAlias?R:void 0},d.push(y)):a===y.commandId&&d.push(y)}const m=new Map;for(const y of d){const T=m.get(y.label);T?(y.description=y.commandId,T.description=T.commandId):m.set(y.label,y)}d.sort((y,T)=>{const R=this.commandsHistory.peek(y.commandId),O=this.commandsHistory.peek(T.commandId);return R&&O?R>O?-1:1:R?-1:O?1:y.label.localeCompare(T.label)});const b=[];let E=!1;for(let y=0;y<d.length;y++){const T=d[y],R=this.keybindingService.lookupKeybinding(T.commandId),O=R?(0,w.localize)(0,null,T.label,R.getAriaLabel()):T.label;y===0&&this.commandsHistory.peek(T.commandId)&&(b.push({type:"separator",label:(0,w.localize)(1,null)}),E=!0),y!==0&&E&&!this.commandsHistory.peek(T.commandId)&&(b.push({type:"separator",label:(0,w.localize)(2,null)}),E=!1),b.push({...T,ariaLabel:O,detail:this.options.showAlias&&T.commandAlias!==T.label?T.commandAlias:void 0,keybinding:R,accept:async()=>{this.commandsHistory.push(T.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:T.commandId,from:"quick open"});try{await this.commandService.executeCommand(T.commandId)}catch(x){(0,f.isCancellationError)(x)||this.dialogService.show(D.default.Error,(0,w.localize)(3,null,T.label,(0,t.toErrorMessage)(x)))}}})}return b}};r.PREFIX=">",r.WORD_FILTER=(0,_.or)(_.matchesPrefix,_.matchesWords,_.matchesContiguousSubString),r=Ee([W(1,c.IInstantiationService),W(2,i.IKeybindingService),W(3,v.ICommandService),W(4,l.ITelemetryService),W(5,o.IDialogService)],r),e.AbstractCommandsQuickAccessProvider=r;let p=class Wt extends A.Disposable{constructor(a,n){super();this.storageService=a,this.configurationService=n,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(()=>this.updateConfiguration()))}updateConfiguration(){this.configuredCommandsHistoryLength=Wt.getConfiguredCommandHistoryLength(this.configurationService),Wt.cache&&Wt.cache.limit!==this.configuredCommandsHistoryLength&&(Wt.cache.limit=this.configuredCommandsHistoryLength,Wt.saveState(this.storageService))}load(){const a=this.storageService.get(Wt.PREF_KEY_CACHE,0);let n;if(a)try{n=JSON.parse(a)}catch{}const h=Wt.cache=new k.LRUCache(this.configuredCommandsHistoryLength,1);if(n){let g;n.usesLRU?g=n.entries:g=n.entries.sort((d,m)=>d.value-m.value),g.forEach(d=>h.set(d.key,d.value))}Wt.counter=this.storageService.getNumber(Wt.PREF_KEY_COUNTER,0,Wt.counter)}push(a){!Wt.cache||(Wt.cache.set(a,Wt.counter++),Wt.saveState(this.storageService))}peek(a){return Wt.cache?.peek(a)}static saveState(a){if(!Wt.cache)return;const n={usesLRU:!0,entries:[]};Wt.cache.forEach((h,g)=>n.entries.push({key:g,value:h})),a.store(Wt.PREF_KEY_CACHE,JSON.stringify(n),0,0),a.store(Wt.PREF_KEY_COUNTER,Wt.counter,0,0)}static getConfiguredCommandHistoryLength(a){const h=a.getValue().workbench?.commandPalette?.history;return typeof h=="number"?h:Wt.DEFAULT_COMMANDS_HISTORY_LENGTH}static clearHistory(a,n){const h=Wt.getConfiguredCommandHistoryLength(a);Wt.cache=new k.LRUCache(h),Wt.counter=1,Wt.saveState(n)}};p.DEFAULT_COMMANDS_HISTORY_LENGTH=50,p.PREF_KEY_CACHE="commandPalette.mru.cache",p.PREF_KEY_COUNTER="commandPalette.mru.counter",p.counter=1,p=Ee([W(0,s.IStorageService),W(1,C.IConfigurationService)],p),e.CommandsHistory=p}),define(ne[1992],re([1,0,225,743]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEditorCommandsQuickAccessProvider=void 0;class _ extends f.AbstractCommandsQuickAccessProvider{constructor(k,D,I,w,v,C){super(k,D,I,w,v,C)}getCodeEditorCommandPicks(){const k=this.activeTextEditorControl;if(!k)return[];const D=[];for(const I of k.getSupportedActions())D.push({commandId:I.id,commandAlias:I.alias,label:(0,t.stripIcons)(I.label)||I.id});return D}}e.AbstractEditorCommandsQuickAccessProvider=_}),define(ne[1993],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryAppenderClient=e.TelemetryAppenderChannel=void 0;class t{constructor(A){this.appenders=A}listen(A,k){throw new Error(`Event not found: ${k}`)}call(A,k,{eventName:D,data:I}){return this.appenders.forEach(w=>w.log(D,I)),Promise.resolve(null)}}e.TelemetryAppenderChannel=t;class f{constructor(A){this.channel=A}log(A,k){return this.channel.call("log",{eventName:A,data:k}).then(void 0,D=>`Failed to log telemetry: ${console.warn(D)}`),Promise.resolve(null)}flush(){return Promise.resolve()}}e.TelemetryAppenderClient=f}),define(ne[199],re([1,0,51,13,8,27]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getPiiPathsFromEnvironment=e.cleanRemoteAuthority=e.validateTelemetryData=e.getTelemetryLevel=e.supportsTelemetry=e.configurationTelemetry=e.NullAppender=e.NullEndpointTelemetryService=e.NullTelemetryService=e.NullTelemetryServiceShape=void 0;class k{constructor(){this.sendErrorTelemetry=!1,this.telemetryLevel=0}publicLog(r,p){return Promise.resolve(void 0)}publicLog2(r,p){return this.publicLog(r,p)}publicLogError(r,p){return Promise.resolve(void 0)}publicLogError2(r,p){return this.publicLogError(r,p)}setExperimentProperty(){}getTelemetryInfo(){return Promise.resolve({instanceId:"someValue.instanceId",sessionId:"someValue.sessionId",machineId:"someValue.machineId",firstSessionDate:"someValue.firstSessionDate"})}}e.NullTelemetryServiceShape=k,e.NullTelemetryService=new k;class D{async publicLog(r,p,u){}async publicLogError(r,p,u){}}e.NullEndpointTelemetryService=D,e.NullAppender={log:()=>null,flush:()=>Promise.resolve(null)};function I(l,r){return r.onDidChangeConfiguration(p=>{p.source!==6&&l.publicLog2("updateConfiguration",{configurationSource:(0,_.ConfigurationTargetToString)(p.source),configurationKeys:i(p.sourceConfig)})})}e.configurationTelemetry=I;function w(l,r){return!(r.disableTelemetry||!l.enableTelemetry||r.extensionTestsLocationURI)}e.supportsTelemetry=w;function v(l){const r=l.getValue(A.TELEMETRY_SETTING_ID),p=l.getValue("telemetry.enableCrashReporter");if(l.getValue(A.TELEMETRY_OLD_SETTING_ID)===!1||p===!1)return 0;switch(r??"all"){case"all":return 3;case"error":return 2;case"crash":return 1;case"off":return 0}}e.getTelemetryLevel=v;function C(l){const r=Object.create(null),p=Object.create(null),u=Object.create(null);c(l,u);for(let a in u){a=a.length>150?a.substr(a.length-149):a;const n=u[a];typeof n=="number"?p[a]=n:typeof n=="boolean"?p[a]=n?1:0:typeof n=="string"?(n.length>8192&&console.warn(`Telemetry property: ${a} has been trimmed to 8192, the original length is ${n.length}`),r[a]=n.substring(0,8191)):typeof n!="undefined"&&n!==null&&(r[a]=n)}return{properties:r,measurements:p}}e.validateTelemetryData=C;function o(l){if(!l)return"none";let r="other";return["ssh-remote","dev-container","attached-container","wsl"].forEach(u=>{l.indexOf(`${u}+`)===0&&(r=u)}),r}e.cleanRemoteAuthority=o;function c(l,r,p=0,u){if(!!l)for(let a of Object.getOwnPropertyNames(l)){const n=l[a],h=u?u+a:a;Array.isArray(n)?r[h]=(0,t.safeStringify)(n):n instanceof Date?r[h]=n.toISOString():(0,f.isObject)(n)?p<2?c(n,r,p+1,h+"."):r[h]=(0,t.safeStringify)(n):r[h]=n}}function i(l){if(!l)return[];const r=[];return S(r,"",l),r}function S(l,r,p){p&&typeof p=="object"&&!Array.isArray(p)?Object.keys(p).forEach(u=>S(l,r?`${r}.${u}`:u,p[u])):l.push(r)}function s(l){return[l.appRoot,l.extensionsPath,l.userHome.fsPath,l.tmpDir.fsPath,l.userDataPath]}e.getPiiPathsFromEnvironment=s}),define(ne[1994],re([1,0,199,1928]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AssignmentService=e.BaseAssignmentService=void 0;class _{constructor(){}setSharedProperty(I,w){}postEvent(I,w){}}class A{constructor(I,w,v,C,o){this.getMachineId=I,this.configurationService=w,this.productService=v,this.telemetry=C,this.keyValueStorage=o,this.networkInitialized=!1,v.tasConfig&&this.experimentsEnabled&&(0,t.getTelemetryLevel)(this.configurationService)===3&&(this.tasClient=this.setupTASClient());const c=this.configurationService.getValue("experiments.overrideDelay"),i=typeof c=="number"?c:0;this.overrideInitDelay=new Promise(S=>setTimeout(S,i))}get experimentsEnabled(){return!0}async getTreatment(I){await this.overrideInitDelay;const w=this.configurationService.getValue("experiments.override."+I);if(w!==void 0)return w;if(!this.tasClient||!this.experimentsEnabled)return;let v;const C=await this.tasClient;return this.networkInitialized?v=C.getTreatmentVariable("vscode",I):v=await C.getTreatmentVariableAsync("vscode",I,!0),v=C.getTreatmentVariable("vscode",I),v}async setupTASClient(){const I=this.productService.quality==="stable"?f.TargetPopulation.Public:f.TargetPopulation.Insiders,w=await this.getMachineId(),v=new f.AssignmentFilterProvider(this.productService.version,this.productService.nameLong,w,I),C=this.productService.tasConfig,o=new(await new Promise((c,i)=>{Q(["tas-client-umd"],c,i)})).ExperimentationService({filterProviders:[v],telemetry:this.telemetry,storageKey:f.ASSIGNMENT_STORAGE_KEY,keyValueStorage:this.keyValueStorage,featuresTelemetryPropertyName:C.featuresTelemetryPropertyName,assignmentContextTelemetryPropertyName:C.assignmentContextTelemetryPropertyName,telemetryEventName:C.telemetryEventName,endpoint:C.endpoint,refetchInterval:f.ASSIGNMENT_REFETCH_INTERVAL});return await o.initializePromise,o.initialFetch.then(()=>this.networkInitialized=!0),o}}e.BaseAssignmentService=A;class k extends A{constructor(I,w,v){super(()=>Promise.resolve(I),w,v,new _)}}e.AssignmentService=k}),define(ne[1995],re([1,0,347,199]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolveMarketplaceHeaders=void 0;async function _(A,k,D,I,w,v){const C={"X-Market-Client-Id":`VSCode ${A}`,"User-Agent":`VSCode ${A} (${k.nameShort})`},o=await(0,t.getServiceMachineId)(D,w,v);return(0,f.supportsTelemetry)(k,D)&&(0,f.getTelemetryLevel)(I)===3&&(C["X-Market-User-Id"]=o),C}e.resolveMarketplaceHeaders=_}),define(ne[1996],re([1,0,15,30,22,51,14,196,13,9,8,85,79,100,723,23,31,46,187,1995,24,27]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionGalleryServiceWithNoStorageService=e.ExtensionGalleryService=e.sortExtensionVersions=void 0;const n=k.isWeb?"web":(0,o.getTargetPlatform)(k.platform,D.arch);var h;(function(X){X[X.None=0]="None",X[X.IncludeVersions=1]="IncludeVersions",X[X.IncludeFiles=2]="IncludeFiles",X[X.IncludeCategoryAndTags=4]="IncludeCategoryAndTags",X[X.IncludeSharedAccounts=8]="IncludeSharedAccounts",X[X.IncludeVersionProperties=16]="IncludeVersionProperties",X[X.ExcludeNonValidated=32]="ExcludeNonValidated",X[X.IncludeInstallationTargets=64]="IncludeInstallationTargets",X[X.IncludeAssetUri=128]="IncludeAssetUri",X[X.IncludeStatistics=256]="IncludeStatistics",X[X.IncludeLatestVersionOnly=512]="IncludeLatestVersionOnly",X[X.Unpublished=4096]="Unpublished",X[X.IncludeNameConflictInfo=32768]="IncludeNameConflictInfo"})(h||(h={}));function g(...X){return String(X.reduce((Y,$)=>Y|$,0))}var d;(function(X){X[X.Tag=1]="Tag",X[X.ExtensionId=4]="ExtensionId",X[X.Category=5]="Category",X[X.ExtensionName=7]="ExtensionName",X[X.Target=8]="Target",X[X.Featured=9]="Featured",X[X.SearchText=10]="SearchText",X[X.ExcludeWithFlags=12]="ExcludeWithFlags"})(d||(d={}));const m={Icon:"Microsoft.VisualStudio.Services.Icons.Default",Details:"Microsoft.VisualStudio.Services.Content.Details",Changelog:"Microsoft.VisualStudio.Services.Content.Changelog",Manifest:"Microsoft.VisualStudio.Code.Manifest",VSIX:"Microsoft.VisualStudio.Services.VSIXPackage",License:"Microsoft.VisualStudio.Services.Content.License",Repository:"Microsoft.VisualStudio.Services.Links.Source"},b={Dependency:"Microsoft.VisualStudio.Code.ExtensionDependencies",ExtensionPack:"Microsoft.VisualStudio.Code.ExtensionPack",Engine:"Microsoft.VisualStudio.Code.Engine",PreRelease:"Microsoft.VisualStudio.Code.PreRelease",LocalizedLanguages:"Microsoft.VisualStudio.Code.LocalizedLanguages",WebExtension:"Microsoft.VisualStudio.Code.WebExtension"},y={pageNumber:1,pageSize:10,sortBy:0,sortOrder:0,flags:h.None,criteria:[],assetTypes:[]};class T{constructor(Y=y){this.state=Y}get pageNumber(){return this.state.pageNumber}get pageSize(){return this.state.pageSize}get sortBy(){return this.state.sortBy}get sortOrder(){return this.state.sortOrder}get flags(){return this.state.flags}withPage(Y,$=this.state.pageSize){return new T({...this.state,pageNumber:Y,pageSize:$})}withFilter(Y,...$){const J=[...this.state.criteria,...$.length?$.map(ee=>({filterType:Y,value:ee})):[{filterType:Y}]];return new T({...this.state,criteria:J})}withSortBy(Y){return new T({...this.state,sortBy:Y})}withSortOrder(Y){return new T({...this.state,sortOrder:Y})}withFlags(...Y){return new T({...this.state,flags:Y.reduce(($,J)=>$|J,0)})}withAssetTypes(...Y){return new T({...this.state,assetTypes:Y})}get raw(){const{criteria:Y,pageNumber:$,pageSize:J,sortBy:ee,sortOrder:te,flags:se,assetTypes:ie}=this.state;return{filters:[{criteria:Y,pageNumber:$,pageSize:J,sortBy:ee,sortOrder:te}],assetTypes:ie,flags:se}}get searchText(){const Y=this.state.criteria.filter($=>$.filterType===d.SearchText)[0];return Y&&Y.value?Y.value:""}get telemetryData(){return{filterTypes:this.state.criteria.map(Y=>String(Y.filterType)),flags:this.state.flags,sortBy:String(this.sortBy),sortOrder:String(this.sortOrder),pageNumber:String(this.pageNumber)}}}function R(X,Y){const $=(X||[]).filter(J=>J.statisticName===Y)[0];return $?$.value:0}function O(X){const Y="Microsoft.VisualStudio.Code.Translation.";return X.files.filter(J=>J.assetType.indexOf(Y)===0).reduce((J,ee)=>{const te=L(X,ee.assetType);return te&&J.push([ee.assetType.substring(Y.length),te]),J},[])}function x(X){if(X.properties){const Y=X.properties.filter(ee=>ee.key===m.Repository),$=new RegExp("((git|ssh|http(s)?)|(git@[\\w.]+))(:(//)?)([\\w.@:/\\-~]+)(.git)(/)?"),J=Y.filter(ee=>$.test(ee.value))[0];return J?{uri:J.value,fallbackUri:J.value}:null}return L(X,m.Repository)}function F(X){return{uri:`${X.fallbackAssetUri}/${m.VSIX}?redirect=true${X.targetPlatform?`&targetPlatform=${X.targetPlatform}`:""}`,fallbackUri:`${X.fallbackAssetUri}/${m.VSIX}${X.targetPlatform?`?targetPlatform=${X.targetPlatform}`:""}`}}function L(X,Y){return X.files.filter(J=>J.assetType===Y)[0]?{uri:`${X.assetUri}/${Y}${X.targetPlatform?`?targetPlatform=${X.targetPlatform}`:""}`,fallbackUri:`${X.fallbackAssetUri}/${Y}${X.targetPlatform?`?targetPlatform=${X.targetPlatform}`:""}`}:null}function M(X,Y){const $=X.properties?X.properties.filter(ee=>ee.key===Y):[],J=$.length>0&&$[0].value;return J?J.split(",").map(ee=>(0,c.adoptToGalleryExtensionId)(ee)):[]}function N(X){const Y=X.properties?X.properties.filter($=>$.key===b.Engine):[];return Y.length>0&&Y[0].value||""}function B(X){const Y=X.properties?X.properties.filter($=>$.key===b.PreRelease):[];return Y.length>0&&Y[0].value==="true"}function P(X){const Y=X.properties?X.properties.filter(J=>J.key===b.LocalizedLanguages):[],$=Y.length>0&&Y[0].value||"";return $?$.split(","):[]}function V(X){return X.indexOf("preview")!==-1}function z(X){return X.targetPlatform?(0,o.toTargetPlatform)(X.targetPlatform):"undefined"}function U(X){const Y=(0,t.distinct)(X.versions.map(z)),$=!!X.tags?.includes(o.WEB_EXTENSION_TAG),J=Y.indexOf("web");return $?J===-1&&Y.push("web"):J!==-1&&Y.splice(J,1),Y}function H(X,Y){const $=(0,o.getFallbackTargetPlarforms)(Y);for(let J=0;J<X.length;J++){const ee=X[J];if(ee.version===X[J-1]?.version){let te=J;const se=z(ee);if(se===Y)for(;te>0&&X[te-1].version===ee.version;)te--;else if($.includes(se))for(;te>0&&X[te-1].version===ee.version&&z(X[te-1])!==Y;)te--;te!==J&&(X.splice(J,1),X.splice(te,0,ee))}}return X}e.sortExtensionVersions=H;function K(X,Y,$){X.telemetryData={index:Y,querySource:$}}function G(X,Y,$){const J=X.versions[0],ee={manifest:L(Y,m.Manifest),readme:L(Y,m.Details),changelog:L(Y,m.Changelog),license:L(Y,m.License),repository:x(Y),download:F(Y),icon:L(Y,m.Icon),coreTranslations:O(Y)};return{identifier:{id:(0,c.getGalleryExtensionId)(X.publisher.publisherName,X.extensionName),uuid:X.extensionId},name:X.extensionName,version:Y.version,displayName:X.displayName,publisherId:X.publisher.publisherId,publisher:X.publisher.publisherName,publisherDisplayName:X.publisher.displayName,publisherDomain:X.publisher.domain?{link:X.publisher.domain,verified:!!X.publisher.isDomainVerified}:void 0,description:X.shortDescription||"",installCount:R(X.statistics,"install"),rating:R(X.statistics,"averagerating"),ratingCount:R(X.statistics,"ratingcount"),categories:X.categories||[],tags:X.tags||[],releaseDate:Date.parse(X.releaseDate),lastUpdated:Date.parse(X.lastUpdated),allTargetPlatforms:$,assets:ee,properties:{dependencies:M(Y,b.Dependency),extensionPack:M(Y,b.ExtensionPack),engine:N(Y),localizedLanguages:P(Y),targetPlatform:z(Y),isPreReleaseVersion:B(Y)},hasPreReleaseVersion:B(J),hasReleaseVersion:!0,preview:V(X.flags)}}let q=class{constructor(Y,$,J,ee,te,se,ie,ce){this.requestService=$,this.logService=J,this.environmentService=ee,this.telemetryService=te,this.fileService=se,this.productService=ie,this.configurationService=ce;const le=ie.extensionsGallery;this.extensionsGalleryUrl=le&&le.serviceUrl,this.extensionsControlUrl=le&&le.controlUrl,this.commonHeadersPromise=(0,p.resolveMarketplaceHeaders)(ie.version,ie,this.environmentService,this.configurationService,this.fileService,Y)}api(Y=""){return`${this.extensionsGalleryUrl}${Y}`}isEnabled(){return!!this.extensionsGalleryUrl}async getExtensions(Y,$,J){const ee=f.CancellationToken.isCancellationToken($)?{}:$,te=f.CancellationToken.isCancellationToken($)?$:J,se=[],ie=[],ce=[],le=[];let ae=!0;for(const fe of Y){fe.uuid?ie.push(fe.uuid):se.push(fe.id);const pe=!!(fe.version||fe.preRelease);ce.push({id:fe.id,uuid:fe.uuid,includePreRelease:pe}),fe.version&&le.push({id:fe.id,uuid:fe.uuid,version:fe.version}),ae=ae&&!!fe.hasPreRelease&&!pe}if(!ie.length&&!se.length)return[];let ue=new T().withPage(1,Y.length);ie.length&&(ue=ue.withFilter(d.ExtensionId,...ie)),se.length&&(ue=ue.withFilter(d.ExtensionName,...se)),(ee.queryAllVersions||ae)&&(ue=ue.withFlags(ue.flags,h.IncludeVersions));const{extensions:oe}=await this.queryGalleryExtensions(ue,{targetPlatform:ee.targetPlatform??n,includePreRelease:ce,versions:le,compatible:!!ee.compatible},te);return ee.source&&oe.forEach((fe,pe)=>K(fe,pe,ee.source)),oe}async getCompatibleExtension(Y,$,J){if((0,o.isNotWebExtensionInWebTargetPlatform)(Y.allTargetPlatforms,J))return null;if(await this.isExtensionCompatible(Y,$,J))return Y;const ee=new T().withFlags(h.IncludeVersions).withPage(1,1).withFilter(d.ExtensionId,Y.identifier.uuid),{extensions:te}=await this.queryGalleryExtensions(ee,{targetPlatform:J,compatible:!0,includePreRelease:$},f.CancellationToken.None);return te[0]||null}async isExtensionCompatible(Y,$,J){if(!(0,o.isTargetPlatformCompatible)(Y.properties.targetPlatform,Y.allTargetPlatforms,J)||!$&&Y.properties.isPreReleaseVersion)return!1;let ee=Y.properties.engine;if(!ee){const te=await this.getManifest(Y,f.CancellationToken.None);if(!te)throw new Error("Manifest was not found");ee=te.engines.vscode}return(0,i.isEngineValid)(ee,this.productService.version,this.productService.date)}async isValidVersion(Y,$,J,ee,te){if(!(0,o.isTargetPlatformCompatible)(z(Y),ee,te)||$!=="any"&&B(Y)!==($==="prerelease"))return!1;if(J){const se=await this.getEngine(Y);if(!(0,i.isEngineValid)(se,this.productService.version,this.productService.date))return!1}return!0}async query(Y,$){if(!this.isEnabled())throw new Error("No extension gallery service configured.");let J=Y.text||"";const ee=(0,A.getOrDefault)(Y,ae=>ae.pageSize,50);let te=new T().withPage(1,ee);J?(J=J.replace(/\bcategory:("([^"]*)"|([^"]\S*))(\s+|\b|$)/g,(ae,ue,oe)=>(te=te.withFilter(d.Category,oe||ue),"")),J=J.replace(/\btag:("([^"]*)"|([^"]\S*))(\s+|\b|$)/g,(ae,ue,oe)=>(te=te.withFilter(d.Tag,oe||ue),"")),J=J.replace(/\bfeatured(\s+|\b|$)/g,()=>(te=te.withFilter(d.Featured),"")),J=J.trim(),J&&(J=J.length<200?J:J.substring(0,200),te=te.withFilter(d.SearchText,J)),te=te.withSortBy(0)):Y.ids?te=te.withFilter(d.ExtensionId,...Y.ids):Y.names?te=te.withFilter(d.ExtensionName,...Y.names):te=te.withSortBy(4),typeof Y.sortBy=="number"&&(te=te.withSortBy(Y.sortBy)),typeof Y.sortOrder=="number"&&(te=te.withSortOrder(Y.sortOrder));const se=async(ae,ue)=>{const{extensions:oe,total:fe}=await this.queryGalleryExtensions(ae,{targetPlatform:n,compatible:!1,includePreRelease:!!Y.includePreRelease},ue);return oe.forEach((pe,me)=>K(pe,(ae.pageNumber-1)*ae.pageSize+me,Y.source)),{extensions:oe,total:fe}},{extensions:ie,total:ce}=await se(te,$),le=async(ae,ue)=>{if(ue.isCancellationRequested)throw new _.CancellationError;const{extensions:oe}=await se(te.withPage(ae+1),ue);return oe};return{firstPage:ie,total:ce,pageSize:te.pageSize,getPage:le}}async queryGalleryExtensions(Y,$,J){const ee=Y.flags;!!(Y.flags&h.IncludeLatestVersionOnly)&&!!(Y.flags&h.IncludeVersions)&&(Y=Y.withFlags(Y.flags&~h.IncludeVersions,h.IncludeLatestVersionOnly)),!(Y.flags&h.IncludeLatestVersionOnly)&&!(Y.flags&h.IncludeVersions)&&(Y=Y.withFlags(Y.flags,h.IncludeLatestVersionOnly)),$.versions?.length&&(Y=Y.withFlags(Y.flags&~h.IncludeLatestVersionOnly,h.IncludeVersions)),Y=Y.withFlags(Y.flags,h.IncludeAssetUri,h.IncludeCategoryAndTags,h.IncludeFiles,h.IncludeStatistics,h.IncludeVersionProperties);const{galleryExtensions:te,total:se}=await this.queryRawGalleryExtensions(Y,J);if(!(Y.flags&h.IncludeLatestVersionOnly)){const ae=[];for(const ue of te){const oe=await this.toGalleryExtensionWithCriteria(ue,$);oe&&ae.push(oe)}return{extensions:ae,total:se}}const ce=[],le=new Map;for(let ae=0;ae<te.length;ae++){const ue=te[ae],oe={id:(0,c.getGalleryExtensionId)(ue.publisher.publisherName,ue.extensionName),uuid:ue.extensionId},fe=(0,I.isBoolean)($.includePreRelease)?$.includePreRelease:!!$.includePreRelease.find(me=>(0,c.areSameExtensions)(me,oe))?.includePreRelease;if($.compatible&&(0,o.isNotWebExtensionInWebTargetPlatform)(U(ue),$.targetPlatform))continue;const pe=await this.toGalleryExtensionWithCriteria(ue,$);!pe||pe.properties.isPreReleaseVersion&&(!fe||!pe.hasReleaseVersion)||!pe.properties.isPreReleaseVersion&&pe.properties.targetPlatform!==$.targetPlatform&&pe.hasPreReleaseVersion?le.set(ue.extensionId,ae):ce.push([ae,pe])}if(le.size){const ae=new Date().getTime(),ue=new T().withFlags(ee&~h.IncludeLatestVersionOnly,h.IncludeVersions).withPage(1,le.size).withFilter(d.ExtensionId,...le.keys()),{extensions:oe}=await this.queryGalleryExtensions(ue,$,J);this.telemetryService.publicLog2("galleryService:additionalQuery",{duration:new Date().getTime()-ae,count:le.size});for(const fe of oe){const pe=le.get(fe.identifier.uuid);ce.push([pe,fe])}}return{extensions:ce.sort((ae,ue)=>ae[0]-ue[0]).map(([,ae])=>ae),total:se}}async toGalleryExtensionWithCriteria(Y,$){const J={id:(0,c.getGalleryExtensionId)(Y.publisher.publisherName,Y.extensionName),uuid:Y.extensionId},ee=$.versions?.find(ce=>(0,c.areSameExtensions)(ce,J))?.version,te=(0,I.isBoolean)($.includePreRelease)?$.includePreRelease:!!$.includePreRelease.find(ce=>(0,c.areSameExtensions)(ce,J))?.includePreRelease,se=U(Y),ie=H(Y.versions,$.targetPlatform);if($.compatible&&(0,o.isNotWebExtensionInWebTargetPlatform)(se,$.targetPlatform))return null;for(let ce=0;ce<ie.length;ce++){const le=ie[ce];if(!(ee&&le.version!==ee)){if(await this.isValidVersion(le,te?"any":"release",$.compatible,se,$.targetPlatform))return G(Y,le,se);if(ee&&le.version===ee)return null}}return ee||$.compatible?null:G(Y,Y.versions[0],se)}async queryRawGalleryExtensions(Y,$){if(!this.isEnabled())throw new Error("No extension gallery service configured.");Y=Y.withFlags(Y.flags,h.ExcludeNonValidated).withFilter(d.Target,"Microsoft.VisualStudio.Code").withFilter(d.ExcludeWithFlags,g(h.Unpublished));const J=await this.commonHeadersPromise,ee=JSON.stringify(Y.raw),te={...J,"Content-Type":"application/json",Accept:"application/json;api-version=3.0-preview.1","Accept-Encoding":"gzip","Content-Length":String(ee.length)},se=new Date().getTime();let ie,ce,le=0;try{if(ie=await this.requestService.request({type:"POST",url:this.api("/extensionquery"),data:ee,headers:te},$),ie.res.statusCode&&ie.res.statusCode>=400&&ie.res.statusCode<500)return{galleryExtensions:[],total:le};const ae=await(0,r.asJson)(ie);if(ae){const ue=ae.results[0],oe=ue.extensions,fe=ue.resultMetadata&&ue.resultMetadata.filter(pe=>pe.metadataType==="ResultCount")[0];return le=fe&&fe.metadataItems.filter(pe=>pe.name==="TotalCount")[0].count||0,{galleryExtensions:oe,total:le}}return{galleryExtensions:[],total:le}}catch(ae){throw ce=ae,ae}finally{this.telemetryService.publicLog2("galleryService:query",{...Y.telemetryData,requestBodySize:String(ee.length),duration:new Date().getTime()-se,success:!!ie&&(0,r.isSuccess)(ie),responseBodySize:ie?.res.headers["Content-Length"],statusCode:ie?String(ie.res.statusCode):void 0,errorCode:ce?(0,_.isCancellationError)(ce)?"canceled":(0,_.getErrorMessage)(ce).startsWith("XHR timeout")?"timeout":"failed":void 0,count:String(le)})}}async reportStatistic(Y,$,J,ee){if(!this.isEnabled())return;const te=k.isWeb?this.api(`/itemName/${Y}.${$}/version/${J}/statType/${ee==="install"?"1":"3"}/vscodewebextension`):this.api(`/publishers/${Y}/extensions/${$}/${J}/stats?statType=${ee}`),se=k.isWeb?"api-version=6.1-preview.1":"*/*;api-version=4.0-preview.1",ce={...await this.commonHeadersPromise,Accept:se};try{await this.requestService.request({type:"POST",url:te,headers:ce},f.CancellationToken.None)}catch{}}async download(Y,$,J){this.logService.trace("ExtensionGalleryService#download",Y.identifier.id);const ee=(0,c.getGalleryExtensionTelemetryData)(Y),te=new Date().getTime(),se=ae=>this.telemetryService.publicLog("galleryService:downloadVSIX",{...ee,duration:ae}),ie=J===2?"install":J===3?"update":"",ce=ie?{uri:`${Y.assets.download.uri}${w.URI.parse(Y.assets.download.uri).query?"&":"?"}${ie}=true`,fallbackUri:`${Y.assets.download.fallbackUri}${w.URI.parse(Y.assets.download.fallbackUri).query?"&":"?"}${ie}=true`}:Y.assets.download,le=await this.getAsset(ce);await this.fileService.writeFile($,le.stream),se(new Date().getTime()-te)}async getReadme(Y,$){if(Y.assets.readme){const J=await this.getAsset(Y.assets.readme,{},$);return await(0,r.asText)(J)||""}return""}async getManifest(Y,$){if(Y.assets.manifest){const J=await this.getAsset(Y.assets.manifest,{},$),ee=await(0,r.asText)(J);return ee?JSON.parse(ee):null}return null}async getManifestFromRawExtensionVersion(Y,$){const J=L(Y,m.Manifest);if(!J)throw new Error("Manifest was not found");const ee={"Accept-Encoding":"gzip"},te=await this.getAsset(J,{headers:ee});return await(0,r.asJson)(te)}async getCoreTranslation(Y,$){const J=Y.assets.coreTranslations.filter(ee=>ee[0]===$.toUpperCase())[0];if(J){const ee=await this.getAsset(J[1]),te=await(0,r.asText)(ee);return te?JSON.parse(te):null}return null}async getChangelog(Y,$){if(Y.assets.changelog){const J=await this.getAsset(Y.assets.changelog,{},$);return await(0,r.asText)(J)||""}return""}async getAllCompatibleVersions(Y,$,J){let ee=new T().withFlags(h.IncludeVersions,h.IncludeCategoryAndTags,h.IncludeFiles,h.IncludeVersionProperties).withPage(1,1);Y.identifier.uuid?ee=ee.withFilter(d.ExtensionId,Y.identifier.uuid):ee=ee.withFilter(d.ExtensionName,Y.identifier.id);const{galleryExtensions:te}=await this.queryRawGalleryExtensions(ee,f.CancellationToken.None);if(!te.length)return[];const se=U(te[0]);if((0,o.isNotWebExtensionInWebTargetPlatform)(se,J))return[];const ie=[];await Promise.all(te[0].versions.map(async ae=>{try{await this.isValidVersion(ae,$?"any":"release",!0,se,J)&&ie.push(ae)}catch{}}));const ce=[],le=new Set;for(const ae of H(ie,J))le.has(ae.version)||(le.add(ae.version),ce.push({version:ae.version,date:ae.lastUpdated,isPreReleaseVersion:B(ae)}));return ce}async getAsset(Y,$={},J=f.CancellationToken.None){const ee=await this.commonHeadersPromise,te={type:"GET"},se={...ee,...$.headers||{}};$={...$,...te,headers:se};const ie=Y.uri,ce=Y.fallbackUri,le={...$,url:ie};try{const ae=await this.requestService.request(le,J);if(ae.res.statusCode===200)return ae;const ue=await(0,r.asText)(ae);throw new Error(`Expected 200, got back ${ae.res.statusCode} instead. ${ue}`)}catch(ae){if((0,_.isCancellationError)(ae))throw ae;const ue=(0,_.getErrorMessage)(ae);this.telemetryService.publicLog2("galleryService:cdnFallback",{url:ie,message:ue});const oe={...$,url:ce};return this.requestService.request(oe,J)}}async getEngine(Y){let $=N(Y);if(!$){const J=await this.getManifestFromRawExtensionVersion(Y,f.CancellationToken.None);if(!J)throw new Error("Manifest was not found");$=J.engines.vscode}return $}async getExtensionsControlManifest(){if(!this.isEnabled())throw new Error("No extension gallery service configured.");if(!this.extensionsControlUrl)return{malicious:[]};const Y=await this.requestService.request({type:"GET",url:this.extensionsControlUrl},f.CancellationToken.None);if(Y.res.statusCode!==200)throw new Error("Could not get extensions report.");const $=await(0,r.asJson)(Y),J=[],ee={};if($){for(const te of $.malicious)J.push({id:te});if($.unsupported)for(const te of Object.keys($.unsupported)){const se=$.unsupported[te];(0,I.isBoolean)(se)||(ee[te.toLowerCase()]=se.preReleaseExtension)}if($.migrateToPreRelease)for(const[te,se]of Object.entries($.migrateToPreRelease))(!se.engine||(0,i.isEngineValid)(se.engine,this.productService.version,this.productService.date))&&(ee[te.toLowerCase()]=se)}return{malicious:J,unsupportedPreReleaseExtensions:ee}}};q=Ee([W(1,r.IRequestService),W(2,s.ILogService),W(3,C.IEnvironmentService),W(4,a.ITelemetryService),W(5,S.IFileService),W(6,l.IProductService),W(7,v.IConfigurationService)],q);let Z=class extends q{constructor(Y,$,J,ee,te,se,ie,ce){super(Y,$,J,ee,te,se,ie,ce)}};Z=Ee([W(0,u.IStorageService),W(1,r.IRequestService),W(2,s.ILogService),W(3,C.IEnvironmentService),W(4,a.ITelemetryService),W(5,S.IFileService),W(6,l.IProductService),W(7,v.IConfigurationService)],Z),e.ExtensionGalleryService=Z;let j=class extends q{constructor(Y,$,J,ee,te,se,ie){super(void 0,Y,$,J,ee,te,se,ie)}};j=Ee([W(0,r.IRequestService),W(1,s.ILogService),W(2,C.IEnvironmentService),W(3,a.ITelemetryService),W(4,S.IFileService),W(5,l.IProductService),W(6,v.IConfigurationService)],j),e.ExtensionGalleryServiceWithNoStorageService=j}),define(ne[1997],re([1,0,2,51,14,29,1338,8,57,310,46,17,27,199]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryService=void 0;let i=class{constructor(l,r,p){this._configurationService=r,this._productService=p,this._experimentProperties={},this._disposables=new t.DisposableStore,this._cleanupPatterns=[],this._appenders=l.appenders,this._commonProperties=l.commonProperties||Promise.resolve({}),this._piiPaths=l.piiPaths||[],this._telemetryLevel=3,this._sendErrorTelemetry=!!l.sendErrorTelemetry,this._cleanupPatterns=[/file:\/\/\/.*?\/resources\/app\//gi];for(let u of this._piiPaths)this._cleanupPatterns.push(new RegExp((0,A.escapeRegExpCharacters)(u),"gi"));this._updateTelemetryLevel(),this._configurationService.onDidChangeConfiguration(this._updateTelemetryLevel,this,this._disposables)}setExperimentProperty(l,r){this._experimentProperties[l]=r}_updateTelemetryLevel(){this._telemetryLevel=(0,c.getTelemetryLevel)(this._configurationService);const l=this._productService.enabledTelemetryLevels;if(l){this._sendErrorTelemetry=this.sendErrorTelemetry?l.error:!1;const r=l.usage?3:l.error?2:0;this._telemetryLevel=Math.min(this._telemetryLevel,r)}}get telemetryLevel(){return this._telemetryLevel}get sendErrorTelemetry(){return this._sendErrorTelemetry}async getTelemetryInfo(){const l=await this._commonProperties;let r=l.sessionID,p=l["common.machineId"],u=l["common.firstSessionDate"],a=l["common.msftInternal"];return{sessionId:r,machineId:p,firstSessionDate:u,msftInternal:a}}dispose(){this._disposables.dispose()}_log(l,r,p,u){return this.telemetryLevel<r?Promise.resolve(void 0):this._commonProperties.then(a=>{p=(0,f.mixin)(p,a),p=(0,f.mixin)(p,this._experimentProperties),p=(0,f.cloneAndChange)(p,n=>{if(typeof n=="string")return this._cleanupInfo(n,u)}),this._appenders.forEach(n=>n.log(l,p))},a=>{console.error(a)})}publicLog(l,r,p){return this._log(l,3,r,p)}publicLog2(l,r,p){return this.publicLog(l,r,p)}publicLogError(l,r){return this._sendErrorTelemetry?this._log(l,2,r,!0):Promise.resolve(void 0)}publicLogError2(l,r){return this.publicLogError(l,r)}_anonymizeFilePaths(l){let r=l;const p=[];for(let h of this._cleanupPatterns)for(;;){const g=h.exec(l);if(!g)break;p.push([g.index,h.lastIndex])}const u=/^[\\\/]?(node_modules|node_modules\.asar)[\\\/]/,a=/(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-\._]+(\\\\|\\|\/))+[\w-\._]*/g;let n=0;for(r="";;){const h=a.exec(l);if(!h)break;!u.test(h[0])&&p.every(([g,d])=>h.index<g||h.index>=d)&&(r+=l.substring(n,h.index)+"<REDACTED: user-file-path>",n=a.lastIndex)}return n<l.length&&(r+=l.substr(n)),r}_removePropertiesWithPossibleUserInfo(l){if(!l)return l;const r=l.toLowerCase(),p=/@[a-zA-Z0-9-.]+/,u=/(key|token|sig|signature|password|passwd|pwd|android:value)[^a-zA-Z0-9]/,a=/xox[pbaors]\-[a-zA-Z0-9]+\-[a-zA-Z0-9\-]+?/;return u.test(r)?"<REDACTED: secret>":p.test(r)?"<REDACTED: email>":a.test(r)?"<REDACTED: token>":l}_cleanupInfo(l,r){let p=l;r&&(p=this._anonymizeFilePaths(p));for(let u of this._cleanupPatterns)p=p.replace(u,"");return p=this._removePropertiesWithPossibleUserInfo(p),p}};i.IDLE_START_EVENT_NAME="UserIdleStart",i.IDLE_STOP_EVENT_NAME="UserIdleStop",i=Ee([W(1,D.IConfigurationService),W(2,v.IProductService)],i),e.TelemetryService=i;function S(){const s=(0,k.localize)(0,null,w.default.nameLong),l=w.default.privacyStatementUrl?(0,k.localize)(2,null,"https://aka.ms/vscode-telemetry",w.default.privacyStatementUrl):(0,k.localize)(1,null,"https://aka.ms/vscode-telemetry"),r=_.isWeb?"":(0,k.localize)(3,null),p=(0,k.localize)(4,null),u=(0,k.localize)(5,null),a=(0,k.localize)(6,null),n=(0,k.localize)(7,null),h=` | | ${p} | ${u} | ${a} | |:------|:---------------------:|:---------------:|:--------------:| | all | \u2713 | \u2713 | \u2713 | | error | \u2713 | \u2713 | - | | crash | \u2713 | - | - | | off | - | - | - | `,g=(0,k.localize)(8,null);return` ${s} ${l} ${r} ${n} ${h} ${g} `}C.Registry.as(I.Extensions.Configuration).registerConfiguration({id:o.TELEMETRY_SECTION_ID,order:110,type:"object",title:(0,k.localize)(9,null),properties:{[o.TELEMETRY_SETTING_ID]:{type:"string",enum:["all","error","crash","off"],enumDescriptions:[(0,k.localize)(10,null),(0,k.localize)(11,null),(0,k.localize)(12,null),(0,k.localize)(13,null)],markdownDescription:S(),default:"all",restricted:!0,scope:1,tags:["usesOnlineServices","telemetry"]}}}),C.Registry.as(I.Extensions.Configuration).registerConfiguration({id:o.TELEMETRY_SECTION_ID,order:110,type:"object",title:(0,k.localize)(14,null),properties:{[o.TELEMETRY_OLD_SETTING_ID]:{type:"boolean",markdownDescription:w.default.privacyStatementUrl?(0,k.localize)(16,null,w.default.nameLong,w.default.privacyStatementUrl):(0,k.localize)(15,null,w.default.nameLong),default:!0,restricted:!0,markdownDeprecationMessage:(0,k.localize)(17,null,`\`#${o.TELEMETRY_SETTING_ID}#\``),scope:1,tags:["usesOnlineServices","telemetry"]}}})}),define(ne[1998],re([1,0,103,27]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerSharedProcessRemoteService)(f.ICustomEndpointTelemetryService,"customEndpointTelemetry",{supportsDelayedInstantiation:!0})}),define(ne[1999],re([1,0,11,6,31]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommandDetectionCapability=void 0;let A=class{constructor(I,w){this._terminal=I,this._logService=w,this.type=2,this._commands=[],this._currentCommand={},this._isWindowsPty=!1,this._commandMarkers=[],this._onCommandStarted=new f.Emitter,this.onCommandStarted=this._onCommandStarted.event,this._onCommandFinished=new f.Emitter,this.onCommandFinished=this._onCommandFinished.event,this._dimensions={cols:this._terminal.cols,rows:this._terminal.rows},this._terminal.onResize(v=>this._handleResize(v))}get commands(){return this._commands}get executingCommand(){return this._currentCommand.command}get executingCommandObject(){if(this._currentCommand.commandStartMarker)return{marker:this._currentCommand.commandStartMarker}}get cwd(){return this._cwd}_handleResize(I){this._isWindowsPty&&this._preHandleResizeWindows(I),this._dimensions.cols=I.cols,this._dimensions.rows=I.rows}_preHandleResizeWindows(I){const w=this._terminal.buffer.active.baseY,v=I.rows-this._dimensions.rows;v>0&&this._waitForCursorMove().then(()=>{const C=Math.min(v,w);for(let o=this.commands.length-1;o>=0;o--){const c=this.commands[o];if(!c.marker||c.marker.line<w||c.commandStartLineContent===void 0)break;const i=this._terminal.buffer.active.getLine(c.marker.line);if(!i||i.translateToString(!0)===c.commandStartLineContent)continue;const S=c.marker.line-C;this._terminal.buffer.active.getLine(S)?.translateToString(!0)===c.commandStartLineContent&&this._terminal._core._bufferService.buffer.lines.onDeleteEmitter.fire({index:this._terminal.buffer.active.baseY,amount:C})}})}_waitForCursorMove(){const I=this._terminal.buffer.active.cursorX,w=this._terminal.buffer.active.cursorY;let v=0;return new Promise((C,o)=>{const c=setInterval(()=>{if(I!==this._terminal.buffer.active.cursorX||w!==this._terminal.buffer.active.cursorY){C(),clearInterval(c);return}v+=10,v>1e3&&(clearInterval(c),C())},10)})}setCwd(I){this._cwd=I}setIsWindowsPty(I){this._isWindowsPty=I}getCwdForLine(I){return this._currentCommand.promptStartMarker&&I>=this._currentCommand.promptStartMarker?.line?this._cwd:[...this._commands].reverse().find(v=>v.marker.line<=I-1)?.cwd}handlePromptStart(){this._currentCommand.promptStartMarker=this._terminal.registerMarker(0),this._logService.debug("CommandDetectionCapability#handlePromptStart",this._terminal.buffer.active.cursorX,this._currentCommand.promptStartMarker?.line)}handleContinuationStart(){this._currentCommand.currentContinuationMarker=this._terminal.registerMarker(0),this._logService.debug("CommandDetectionCapability#handleContinuationStart",this._currentCommand.currentContinuationMarker)}handleContinuationEnd(){if(!this._currentCommand.currentContinuationMarker){this._logService.warn("CommandDetectionCapability#handleContinuationEnd Received continuation end without start");return}this._currentCommand.continuations||(this._currentCommand.continuations=[]),this._currentCommand.continuations.push({marker:this._currentCommand.currentContinuationMarker,end:this._terminal.buffer.active.cursorX}),this._currentCommand.currentContinuationMarker=void 0,this._logService.debug("CommandDetectionCapability#handleContinuationEnd",this._currentCommand.continuations[this._currentCommand.continuations.length-1])}handleRightPromptStart(){this._currentCommand.commandRightPromptStartX=this._terminal.buffer.active.cursorX,this._logService.debug("CommandDetectionCapability#handleRightPromptStart",this._currentCommand.commandRightPromptStartX)}handleRightPromptEnd(){this._currentCommand.commandRightPromptEndX=this._terminal.buffer.active.cursorX,this._logService.debug("CommandDetectionCapability#handleRightPromptEnd",this._currentCommand.commandRightPromptEndX)}handleCommandStart(){if(this._isWindowsPty){this._handleCommandStartWindows();return}this._currentCommand.commandStartX=this._terminal.buffer.active.cursorX,this._currentCommand.commandStartMarker=this._terminal.registerMarker(0),this._onCommandStarted.fire({marker:this._currentCommand.commandStartMarker}),this._logService.debug("CommandDetectionCapability#handleCommandStart",this._currentCommand.commandStartX,this._currentCommand.commandStartMarker?.line)}_handleCommandStartWindows(){this._currentCommand.commandStartX=this._terminal.buffer.active.cursorX,this._commandMarkers.length=0,(0,t.timeout)(0).then(()=>{if(this._currentCommand.commandExecutedMarker||(this._onCursorMoveListener=this._terminal.onCursorMove(()=>{if(this._commandMarkers.length===0||this._commandMarkers[this._commandMarkers.length-1].line!==this._terminal.buffer.active.cursorY){const I=this._terminal.registerMarker(0);I&&this._commandMarkers.push(I)}})),this._currentCommand.commandStartMarker=this._terminal.registerMarker(0),this._currentCommand.commandStartMarker){const I=this._terminal.buffer.active.getLine(this._currentCommand.commandStartMarker.line);I&&(this._currentCommand.commandStartLineContent=I.translateToString(!0))}this._onCommandStarted.fire({marker:this._currentCommand.commandStartMarker}),this._logService.debug("CommandDetectionCapability#_handleCommandStartWindows",this._currentCommand.commandStartX,this._currentCommand.commandStartMarker?.line)})}handleCommandExecuted(){if(this._isWindowsPty){this._handleCommandExecutedWindows();return}if(this._currentCommand.commandExecutedMarker=this._terminal.registerMarker(0),this._currentCommand.commandExecutedX=this._terminal.buffer.active.cursorX,this._logService.debug("CommandDetectionCapability#handleCommandExecuted",this._currentCommand.commandExecutedX,this._currentCommand.commandExecutedMarker?.line),!this._currentCommand.commandStartMarker||!this._currentCommand.commandExecutedMarker||this._currentCommand.commandStartX===void 0)return;this._currentCommand.command=this._terminal.buffer.active.getLine(this._currentCommand.commandStartMarker.line)?.translateToString(!0,this._currentCommand.commandStartX,this._currentCommand.commandRightPromptStartX).trim();let I=this._currentCommand.commandStartMarker.line+1;const w=this._currentCommand.commandExecutedMarker.line;for(;I<w;I++){const v=this._terminal.buffer.active.getLine(I);if(v){const C=this._currentCommand.continuations?.find(c=>c.marker.line===I);C&&(this._currentCommand.command+=` `);const o=C?.end??0;this._currentCommand.command+=v.translateToString(!0,o)}}I===w&&(this._currentCommand.command+=this._terminal.buffer.active.getLine(w)?.translateToString(!0,void 0,this._currentCommand.commandExecutedX)||"")}_handleCommandExecutedWindows(){this._onCursorMoveListener?.dispose(),this._onCursorMoveListener=void 0,this._evaluateCommandMarkersWindows(),this._currentCommand.commandExecutedX=this._terminal.buffer.active.cursorX,this._logService.debug("CommandDetectionCapability#handleCommandExecuted",this._currentCommand.commandExecutedX,this._currentCommand.commandExecutedMarker?.line)}handleCommandFinished(I){this._isWindowsPty&&this._preHandleCommandFinishedWindows(),this._currentCommand.commandFinishedMarker=this._terminal.registerMarker(0);const w=this._currentCommand.command;if(this._logService.debug("CommandDetectionCapability#handleCommandFinished",this._terminal.buffer.active.cursorX,this._currentCommand.commandFinishedMarker?.line,this._currentCommand.command,this._currentCommand),this._exitCode=I,this._exitCode===void 0){const v=this.commands.length>0?this.commands[this.commands.length-1]:void 0;w&&w.length>0&&v?.command===w&&(this._exitCode=v.exitCode)}if(!(this._currentCommand.commandStartMarker===void 0||!this._terminal.buffer.active)){if(w!==void 0&&!w.startsWith("\\")){const v=this._terminal.buffer.active,C=Date.now(),o=this._currentCommand.commandExecutedMarker,c=this._currentCommand.commandFinishedMarker,i={command:w,marker:this._currentCommand.commandStartMarker,endMarker:c,executedMarker:o,timestamp:C,cwd:this._cwd,exitCode:this._exitCode,commandStartLineContent:this._currentCommand.commandStartLineContent,hasOutput:!!(o&&c&&o?.line<c.line),getOutput:()=>k(o,c,v)};this._commands.push(i),this._logService.debug("CommandDetectionCapability#onCommandFinished",i),this._onCommandFinished.fire(i)}this._currentCommand.previousCommandMarker=this._currentCommand.commandStartMarker,this._currentCommand={}}}_preHandleCommandFinishedWindows(){this._currentCommand.commandExecutedMarker||(this._commandMarkers.length===0&&(this._currentCommand.commandStartMarker||(this._currentCommand.commandStartMarker=this._terminal.registerMarker(0)),this._currentCommand.commandStartMarker&&this._commandMarkers.push(this._currentCommand.commandStartMarker)),this._evaluateCommandMarkersWindows())}_evaluateCommandMarkersWindows(){if(this._commandMarkers.length!==0){if(this._commandMarkers=this._commandMarkers.sort((I,w)=>I.line-w.line),this._currentCommand.commandStartMarker=this._commandMarkers[0],this._currentCommand.commandStartMarker){const I=this._terminal.buffer.active.getLine(this._currentCommand.commandStartMarker.line);I&&(this._currentCommand.commandStartLineContent=I.translateToString(!0))}this._currentCommand.commandExecutedMarker=this._commandMarkers[this._commandMarkers.length-1]}}setCommandLine(I){this._logService.debug("CommandDetectionCapability#setCommandLine",I),this._currentCommand.command=I}serialize(){const I=this.commands.map(w=>({startLine:w.marker?.line,startX:void 0,endLine:w.endMarker?.line,executedLine:w.executedMarker?.line,command:w.command,cwd:w.cwd,exitCode:w.exitCode,commandStartLineContent:w.commandStartLineContent,timestamp:w.timestamp}));return this._currentCommand.commandStartMarker&&I.push({startLine:this._currentCommand.commandStartMarker.line,startX:this._currentCommand.commandStartX,endLine:void 0,executedLine:void 0,command:"",cwd:this._cwd,exitCode:void 0,commandStartLineContent:void 0,timestamp:0}),{isWindowsPty:this._isWindowsPty,commands:I}}deserialize(I){I.isWindowsPty&&this.setIsWindowsPty(I.isWindowsPty);const w=this._terminal.buffer.normal;for(const v of I.commands){const C=v.startLine!==void 0?this._terminal.registerMarker(v.startLine-(w.baseY+w.cursorY)):void 0;if(!C)continue;if(!v.endLine){this._currentCommand.commandStartMarker=C,this._currentCommand.commandStartX=v.startX,this._cwd=v.cwd,this._onCommandStarted.fire({marker:C});continue}const o=v.endLine!==void 0?this._terminal.registerMarker(v.endLine-(w.baseY+w.cursorY)):void 0,c=v.executedLine!==void 0?this._terminal.registerMarker(v.executedLine-(w.baseY+w.cursorY)):void 0,i={command:v.command,marker:C,endMarker:o,executedMarker:c,timestamp:v.timestamp,cwd:v.cwd,commandStartLineContent:v.commandStartLineContent,exitCode:v.exitCode,hasOutput:!!(c&&o&&c.line<o.line),getOutput:()=>k(c,o,w)};this._commands.push(i),this._logService.debug("CommandDetectionCapability#onCommandFinished",i),this._onCommandFinished.fire(i)}}};A=Ee([W(1,_.ILogService)],A),e.CommandDetectionCapability=A;function k(D,I,w){if(!D||!I)return;const v=D.line,C=I.line;if(v===C)return;let o="";for(let c=v;c<C;c++)o+=w.getLine(c)?.translateToString()+` `;return o===""?void 0:o}}),define(ne[2e3],re([1,0,6]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CwdDetectionCapability=void 0;class f{constructor(){this.type=0,this._cwd="",this._cwds=new Map,this._onDidChangeCwd=new t.Emitter,this.onDidChangeCwd=this._onDidChangeCwd.event}get cwds(){return Array.from(this._cwds.keys())}getCwd(){return this._cwd}updateCwd(A){const k=this._cwd!==A;this._cwd=A;const D=this._cwds.get(this._cwd)||0;this._cwds.delete(this._cwd),this._cwds.set(this._cwd,D+1),k&&this._onDidChangeCwd.fire(A)}}e.CwdDetectionCapability=f}),define(ne[2001],re([1,0,6]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NaiveCwdDetectionCapability=void 0;class f{constructor(A){this._process=A,this.type=1,this._cwd="",this._onDidChangeCwd=new t.Emitter,this.onDidChangeCwd=this._onDidChangeCwd.event}async getCwd(){if(!this._process)return Promise.resolve("");const A=await this._process.getCwd();return A!==this._cwd&&this._onDidChangeCwd.fire(A),this._cwd=A,this._cwd}}e.NaiveCwdDetectionCapability=f}),define(ne[2002],re([1,0,6]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PartialCommandDetectionCapability=void 0;var f;(function(A){A[A.MinimumPromptLength=2]="MinimumPromptLength"})(f||(f={}));class _{constructor(k){this._terminal=k,this.type=3,this._commands=[],this._onCommandFinished=new t.Emitter,this.onCommandFinished=this._onCommandFinished.event,this._terminal.onData(D=>this._onData(D)),this._terminal.parser.registerCsiHandler({final:"J"},D=>(D.length>=1&&(D[0]===2||D[0]===3)&&this._clearCommandsInViewport(),!1))}get commands(){return this._commands}_onData(k){k==="\r"&&this._onEnter()}_onEnter(){if(!!this._terminal&&this._terminal.buffer.active.cursorX>=2){const k=this._terminal.registerMarker(0);k&&(this._commands.push(k),this._onCommandFinished.fire(k))}}_clearCommandsInViewport(){let k=0;for(let D=this._commands.length-1;D>=0&&!(this._commands[D].line<this._terminal.buffer.active.baseY);D--)k++;this._commands.splice(this._commands.length-k,k)}}e.PartialCommandDetectionCapability=_}),define(ne[555],re([1,0,6,2]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalCapabilityStoreMultiplexer=e.TerminalCapabilityStore=void 0;class _ extends f.Disposable{constructor(){super(...arguments);this._map=new Map,this._onDidRemoveCapability=this._register(new t.Emitter),this.onDidRemoveCapability=this._onDidRemoveCapability.event,this._onDidAddCapability=this._register(new t.Emitter),this.onDidAddCapability=this._onDidAddCapability.event}get items(){return this._map.keys()}add(D,I){this._map.set(D,I),this._onDidAddCapability.fire(D)}get(D){return this._map.get(D)}remove(D){!this._map.has(D)||(this._map.delete(D),this._onDidRemoveCapability.fire(D))}has(D){return this._map.has(D)}}e.TerminalCapabilityStore=_;class A extends f.Disposable{constructor(){super(...arguments);this._stores=[],this._onDidRemoveCapability=this._register(new t.Emitter),this.onDidRemoveCapability=this._onDidRemoveCapability.event,this._onDidAddCapability=this._register(new t.Emitter),this.onDidAddCapability=this._onDidAddCapability.event}get items(){return this._items()}*_items(){for(const D of this._stores)for(const I of D.items)yield I}has(D){for(const I of this._stores)for(const w of I.items)if(w===D)return!0;return!1}get(D){for(const I of this._stores){const w=I.get(D);if(w)return w}}add(D){this._stores.push(D);for(const I of D.items)this._onDidAddCapability.fire(I);D.onDidAddCapability(I=>this._onDidAddCapability.fire(I)),D.onDidRemoveCapability(I=>this._onDidRemoveCapability.fire(I))}}e.TerminalCapabilityStoreMultiplexer=A}),define(ne[188],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProfileSource=e.FlowControlConstants=e.LocalReconnectConstants=e.TerminalLocationString=e.TerminalLocation=e.HeartbeatConstants=e.ProcessPropertyType=e.IPtyService=e.TerminalIpcChannels=e.TitleEventSource=e.WindowsShellType=e.PosixShellType=e.TerminalSettingId=e.TerminalSettingPrefix=void 0;var f;(function(s){s.Shell="terminal.integrated.shell.",s.ShellArgs="terminal.integrated.shellArgs.",s.DefaultProfile="terminal.integrated.defaultProfile.",s.Profiles="terminal.integrated.profiles."})(f=e.TerminalSettingPrefix||(e.TerminalSettingPrefix={}));var _;(function(s){s.ShellLinux="terminal.integrated.shell.linux",s.ShellMacOs="terminal.integrated.shell.osx",s.ShellWindows="terminal.integrated.shell.windows",s.SendKeybindingsToShell="terminal.integrated.sendKeybindingsToShell",s.AutomationShellLinux="terminal.integrated.automationShell.linux",s.AutomationShellMacOs="terminal.integrated.automationShell.osx",s.AutomationShellWindows="terminal.integrated.automationShell.windows",s.AutomationProfileLinux="terminal.integrated.automationProfile.linux",s.AutomationProfileMacOs="terminal.integrated.automationProfile.osx",s.AutomationProfileWindows="terminal.integrated.automationProfile.windows",s.ShellArgsLinux="terminal.integrated.shellArgs.linux",s.ShellArgsMacOs="terminal.integrated.shellArgs.osx",s.ShellArgsWindows="terminal.integrated.shellArgs.windows",s.ProfilesWindows="terminal.integrated.profiles.windows",s.ProfilesMacOs="terminal.integrated.profiles.osx",s.ProfilesLinux="terminal.integrated.profiles.linux",s.DefaultProfileLinux="terminal.integrated.defaultProfile.linux",s.DefaultProfileMacOs="terminal.integrated.defaultProfile.osx",s.DefaultProfileWindows="terminal.integrated.defaultProfile.windows",s.UseWslProfiles="terminal.integrated.useWslProfiles",s.TabsEnabled="terminal.integrated.tabs.enabled",s.TabsEnableAnimation="terminal.integrated.tabs.enableAnimation",s.TabsHideCondition="terminal.integrated.tabs.hideCondition",s.TabsShowActiveTerminal="terminal.integrated.tabs.showActiveTerminal",s.TabsShowActions="terminal.integrated.tabs.showActions",s.TabsLocation="terminal.integrated.tabs.location",s.TabsFocusMode="terminal.integrated.tabs.focusMode",s.MacOptionIsMeta="terminal.integrated.macOptionIsMeta",s.MacOptionClickForcesSelection="terminal.integrated.macOptionClickForcesSelection",s.AltClickMovesCursor="terminal.integrated.altClickMovesCursor",s.CopyOnSelection="terminal.integrated.copyOnSelection",s.EnableMultiLinePasteWarning="terminal.integrated.enableMultiLinePasteWarning",s.DrawBoldTextInBrightColors="terminal.integrated.drawBoldTextInBrightColors",s.FontFamily="terminal.integrated.fontFamily",s.FontSize="terminal.integrated.fontSize",s.LetterSpacing="terminal.integrated.letterSpacing",s.LineHeight="terminal.integrated.lineHeight",s.MinimumContrastRatio="terminal.integrated.minimumContrastRatio",s.FastScrollSensitivity="terminal.integrated.fastScrollSensitivity",s.MouseWheelScrollSensitivity="terminal.integrated.mouseWheelScrollSensitivity",s.BellDuration="terminal.integrated.bellDuration",s.FontWeight="terminal.integrated.fontWeight",s.FontWeightBold="terminal.integrated.fontWeightBold",s.CursorBlinking="terminal.integrated.cursorBlinking",s.CursorStyle="terminal.integrated.cursorStyle",s.CursorWidth="terminal.integrated.cursorWidth",s.Scrollback="terminal.integrated.scrollback",s.DetectLocale="terminal.integrated.detectLocale",s.DefaultLocation="terminal.integrated.defaultLocation",s.GpuAcceleration="terminal.integrated.gpuAcceleration",s.TerminalTitleSeparator="terminal.integrated.tabs.separator",s.TerminalTitle="terminal.integrated.tabs.title",s.TerminalDescription="terminal.integrated.tabs.description",s.RightClickBehavior="terminal.integrated.rightClickBehavior",s.Cwd="terminal.integrated.cwd",s.ConfirmOnExit="terminal.integrated.confirmOnExit",s.ConfirmOnKill="terminal.integrated.confirmOnKill",s.EnableBell="terminal.integrated.enableBell",s.CommandsToSkipShell="terminal.integrated.commandsToSkipShell",s.AllowChords="terminal.integrated.allowChords",s.AllowMnemonics="terminal.integrated.allowMnemonics",s.EnvMacOs="terminal.integrated.env.osx",s.EnvLinux="terminal.integrated.env.linux",s.EnvWindows="terminal.integrated.env.windows",s.EnvironmentChangesIndicator="terminal.integrated.environmentChangesIndicator",s.EnvironmentChangesRelaunch="terminal.integrated.environmentChangesRelaunch",s.ShowExitAlert="terminal.integrated.showExitAlert",s.SplitCwd="terminal.integrated.splitCwd",s.WindowsEnableConpty="terminal.integrated.windowsEnableConpty",s.WordSeparators="terminal.integrated.wordSeparators",s.EnableFileLinks="terminal.integrated.enableFileLinks",s.UnicodeVersion="terminal.integrated.unicodeVersion",s.LocalEchoLatencyThreshold="terminal.integrated.localEchoLatencyThreshold",s.LocalEchoEnabled="terminal.integrated.localEchoEnabled",s.LocalEchoExcludePrograms="terminal.integrated.localEchoExcludePrograms",s.LocalEchoStyle="terminal.integrated.localEchoStyle",s.EnablePersistentSessions="terminal.integrated.enablePersistentSessions",s.PersistentSessionReviveProcess="terminal.integrated.persistentSessionReviveProcess",s.CustomGlyphs="terminal.integrated.customGlyphs",s.PersistentSessionScrollback="terminal.integrated.persistentSessionScrollback",s.InheritEnv="terminal.integrated.inheritEnv",s.ShowLinkHover="terminal.integrated.showLinkHover",s.IgnoreProcessNames="terminal.integrated.ignoreProcessNames",s.AutoReplies="terminal.integrated.autoReplies",s.ShellIntegrationEnabled="terminal.integrated.shellIntegration.enabled",s.ShellIntegrationShowWelcome="terminal.integrated.shellIntegration.showWelcome",s.ShellIntegrationDecorationsEnabled="terminal.integrated.shellIntegration.decorationsEnabled",s.ShellIntegrationDecorationIcon="terminal.integrated.shellIntegration.decorationIcon",s.ShellIntegrationDecorationIconError="terminal.integrated.shellIntegration.decorationIconError",s.ShellIntegrationDecorationIconSuccess="terminal.integrated.shellIntegration.decorationIconSuccess",s.ShellIntegrationCommandHistory="terminal.integrated.shellIntegration.history"})(_=e.TerminalSettingId||(e.TerminalSettingId={}));var A;(function(s){s.PowerShell="pwsh",s.Bash="bash",s.Fish="fish",s.Sh="sh",s.Csh="csh",s.Ksh="ksh",s.Zsh="zsh"})(A=e.PosixShellType||(e.PosixShellType={}));var k;(function(s){s.CommandPrompt="cmd",s.PowerShell="pwsh",s.Wsl="wsl",s.GitBash="gitbash"})(k=e.WindowsShellType||(e.WindowsShellType={}));var D;(function(s){s[s.Api=0]="Api",s[s.Process=1]="Process",s[s.Sequence=2]="Sequence",s[s.Config=3]="Config"})(D=e.TitleEventSource||(e.TitleEventSource={}));var I;(function(s){s.LocalPty="localPty",s.PtyHost="ptyHost",s.Log="log",s.Heartbeat="heartbeat"})(I=e.TerminalIpcChannels||(e.TerminalIpcChannels={})),e.IPtyService=(0,t.createDecorator)("ptyService");var w;(function(s){s.Cwd="cwd",s.InitialCwd="initialCwd",s.FixedDimensions="fixedDimensions",s.Title="title",s.ShellType="shellType",s.HasChildProcesses="hasChildProcesses",s.ResolvedShellLaunchConfig="resolvedShellLaunchConfig",s.OverrideDimensions="overrideDimensions"})(w=e.ProcessPropertyType||(e.ProcessPropertyType={}));var v;(function(s){s[s.BeatInterval=5e3]="BeatInterval",s[s.FirstWaitMultiplier=1.2]="FirstWaitMultiplier",s[s.SecondWaitMultiplier=1]="SecondWaitMultiplier",s[s.CreateProcessTimeout=5e3]="CreateProcessTimeout"})(v=e.HeartbeatConstants||(e.HeartbeatConstants={}));var C;(function(s){s[s.Panel=1]="Panel",s[s.Editor=2]="Editor"})(C=e.TerminalLocation||(e.TerminalLocation={}));var o;(function(s){s.TerminalView="view",s.Editor="editor"})(o=e.TerminalLocationString||(e.TerminalLocationString={}));var c;(function(s){s[s.GraceTime=6e4]="GraceTime",s[s.ShortGraceTime=6e3]="ShortGraceTime"})(c=e.LocalReconnectConstants||(e.LocalReconnectConstants={}));var i;(function(s){s[s.HighWatermarkChars=1e5]="HighWatermarkChars",s[s.LowWatermarkChars=5e3]="LowWatermarkChars",s[s.CharCountAckSize=5e3]="CharCountAckSize"})(i=e.FlowControlConstants||(e.FlowControlConstants={}));var S;(function(s){s.GitBash="Git Bash",s.Pwsh="PowerShell"})(S=e.ProfileSource||(e.ProfileSource={}))}),define(ne[2003],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalDataBufferer=void 0;class t{constructor(_){this._callback=_,this._terminalBufferMap=new Map}dispose(){for(const _ of this._terminalBufferMap.values())_.dispose()}startBuffering(_,A,k=5){let D;return D=A(I=>{const w=typeof I=="string"?I:I.data;let v=this._terminalBufferMap.get(_);if(v){v.data.push(w);return}const C=setTimeout(()=>this.flushBuffer(_),k);v={data:[w],timeoutId:C,dispose:()=>{clearTimeout(C),this.flushBuffer(_),D.dispose()}},this._terminalBufferMap.set(_,v)}),D}stopBuffering(_){const A=this._terminalBufferMap.get(_);A&&A.dispose()}flushBuffer(_){const A=this._terminalBufferMap.get(_);A&&(this._terminalBufferMap.delete(_),this._callback(_,A.data.join("")))}}e.TerminalDataBufferer=t}),define(ne[2004],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.escapeNonWindowsPath=void 0;function t(f){let _=f;_.indexOf("\\")!==0&&(_=_.replace(/\\/g,"\\\\"));const A=/[\`\$\|\&\>\~\#\!\^\*\;\<\"\']/g;return _=_.replace(A,""),`'${_}'`}e.escapeNonWindowsPath=t}),define(ne[2005],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalRecorder=void 0;const t=1024*1024;class f{constructor(A,k){this._totalDataLength=0,this._entries=[{cols:A,rows:k,data:[]}]}handleResize(A,k){if(this._entries.length>0&&this._entries[this._entries.length-1].data.length===0&&this._entries.pop(),this._entries.length>0){const D=this._entries[this._entries.length-1];if(D.cols===A&&D.rows===k)return;if(D.cols===0&&D.rows===0){D.cols=A,D.rows=k;return}}this._entries.push({cols:A,rows:k,data:[]})}handleData(A){for(this._entries[this._entries.length-1].data.push(A),this._totalDataLength+=A.length;this._totalDataLength>t;){const D=this._entries[0],I=this._totalDataLength-t;I>=D.data[0].length?(this._totalDataLength-=D.data[0].length,D.data.shift(),D.data.length===0&&this._entries.shift()):(D.data[0]=D.data[0].substr(I),this._totalDataLength-=I)}}generateReplayEventSync(){return this._entries.forEach(A=>{A.data.length>0&&(A.data=[A.data.join("")])}),{events:this._entries.map(A=>({cols:A.cols,rows:A.rows,data:A.data[0]??""})),commands:{isWindowsPty:!1,commands:[]}}}async generateReplayEvent(){return this.generateReplayEventSync()}}e.TerminalRecorder=f}),define(ne[2006],re([1,0,2,555,1999,2e3,2002,31]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShellIntegrationAddon=void 0;var I;(function(C){C[C.FinalTerm=133]="FinalTerm",C[C.VSCode=633]="VSCode",C[C.ITerm=1337]="ITerm"})(I||(I={}));var w;(function(C){C.PromptStart="A",C.CommandStart="B",C.CommandExecuted="C",C.CommandFinished="D",C.CommandLine="E",C.ContinuationStart="F",C.ContinuationEnd="G",C.RightPromptStart="H",C.RightPromptEnd="I",C.Property="P"})(w||(w={}));let v=class extends t.Disposable{constructor(o){super();this._logService=o,this.capabilities=new f.TerminalCapabilityStore}activate(o){this._terminal=o,this.capabilities.add(3,new k.PartialCommandDetectionCapability(this._terminal)),this._register(o.parser.registerOscHandler(633,c=>this._handleVSCodeSequence(c)))}_handleVSCodeSequence(o){if(!this._terminal)return!1;const[c,...i]=o.split(";");switch(c){case"A":return this._createOrGetCommandDetection(this._terminal).handlePromptStart(),!0;case"B":return this._createOrGetCommandDetection(this._terminal).handleCommandStart(),!0;case"C":return this._createOrGetCommandDetection(this._terminal).handleCommandExecuted(),!0;case"D":{const S=i.length===1?parseInt(i[0]):void 0;return this._createOrGetCommandDetection(this._terminal).handleCommandFinished(S),!0}case"E":{let S;return i.length===1?S=this._deserializeMessage(i[0]):S="",this._createOrGetCommandDetection(this._terminal).setCommandLine(S),!0}case"F":return this._createOrGetCommandDetection(this._terminal).handleContinuationStart(),!0;case"G":return this._createOrGetCommandDetection(this._terminal).handleContinuationEnd(),!0;case"H":return this._createOrGetCommandDetection(this._terminal).handleRightPromptStart(),!0;case"I":return this._createOrGetCommandDetection(this._terminal).handleRightPromptEnd(),!0;case"P":{const[S,s]=i[0].split("=");if(s===void 0)return!0;const l=this._deserializeMessage(s);switch(S){case"Cwd":{this._createOrGetCwdDetection().updateCwd(l);const r=this.capabilities.get(2);return r&&r.setCwd(l),!0}case"IsWindows":return this._createOrGetCommandDetection(this._terminal).setIsWindowsPty(l==="True"),!0}}}return!1}serialize(){return!this._terminal||!this.capabilities.has(2)?{isWindowsPty:!1,commands:[]}:this._createOrGetCommandDetection(this._terminal).serialize()}deserialize(o){if(!this._terminal)throw new Error("Cannot restore commands before addon is activated");this._createOrGetCommandDetection(this._terminal).deserialize(o)}_createOrGetCwdDetection(){let o=this.capabilities.get(0);return o||(o=new A.CwdDetectionCapability,this.capabilities.add(0,o)),o}_createOrGetCommandDetection(o){let c=this.capabilities.get(2);return c||(c=new _.CommandDetectionCapability(o,this._logService),this.capabilities.add(2,c)),c}_deserializeMessage(o){return o.replace(/<LF>/g,` `).replace(/<CL>/g,";").replace(/<ST>/g,"\x07")}};v=Ee([W(0,D.ILogService)],v),e.ShellIntegrationAddon=v}),define(ne[556],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILocalPtyService=void 0,e.ILocalPtyService=(0,t.createDecorator)("localPtyService")}),define(ne[32],re([1,0,11,66,6,13,1340,146,17]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.workbenchColorsSchemaId=e.resolveColorValue=e.ifDefinedThenElse=e.oneOf=e.transparent=e.lighten=e.darken=e.executeTransform=e.chartsPurple=e.chartsGreen=e.chartsOrange=e.chartsYellow=e.chartsBlue=e.chartsRed=e.chartsLines=e.chartsForeground=e.problemsInfoIconForeground=e.problemsWarningIconForeground=e.problemsErrorIconForeground=e.minimapSliderActiveBackground=e.minimapSliderHoverBackground=e.minimapSliderBackground=e.minimapForegroundOpacity=e.minimapBackground=e.minimapWarning=e.minimapError=e.minimapSelection=e.minimapSelectionOccurrenceHighlight=e.minimapFindMatch=e.overviewRulerSelectionHighlightForeground=e.overviewRulerFindMatchForeground=e.overviewRulerCommonContentForeground=e.overviewRulerIncomingContentForeground=e.overviewRulerCurrentContentForeground=e.mergeBorder=e.mergeCommonContentBackground=e.mergeCommonHeaderBackground=e.mergeIncomingContentBackground=e.mergeIncomingHeaderBackground=e.mergeCurrentContentBackground=e.mergeCurrentHeaderBackground=e.breadcrumbsPickerBackground=e.breadcrumbsActiveSelectionForeground=e.breadcrumbsFocusForeground=e.breadcrumbsBackground=e.breadcrumbsForeground=e.snippetFinalTabstopHighlightBorder=e.snippetFinalTabstopHighlightBackground=e.snippetTabstopHighlightBorder=e.snippetTabstopHighlightBackground=e.toolbarActiveBackground=e.toolbarHoverOutline=e.toolbarHoverBackground=e.menuSeparatorBackground=e.menuSelectionBorder=e.menuSelectionBackground=e.menuSelectionForeground=e.menuBackground=e.menuForeground=e.menuBorder=e.quickInputListFocusBackground=e.quickInputListFocusIconForeground=e.quickInputListFocusForeground=e._deprecatedQuickInputListFocusBackground=e.listDeemphasizedForeground=e.tableOddRowsBackgroundColor=e.tableColumnsBorder=e.treeIndentGuidesStroke=e.listFilterMatchHighlightBorder=e.listFilterMatchHighlight=e.listFilterWidgetNoMatchesOutline=e.listFilterWidgetOutline=e.listFilterWidgetBackground=e.listWarningForeground=e.listErrorForeground=e.listInvalidItemForeground=e.listFocusHighlightForeground=e.listHighlightForeground=e.listDropBackground=e.listHoverForeground=e.listHoverBackground=e.listInactiveFocusOutline=e.listInactiveFocusBackground=e.listInactiveSelectionIconForeground=e.listInactiveSelectionForeground=e.listInactiveSelectionBackground=e.listActiveSelectionIconForeground=e.listActiveSelectionForeground=e.listActiveSelectionBackground=e.listFocusOutline=e.listFocusForeground=e.listFocusBackground=e.diffDiagonalFill=e.diffBorder=e.diffRemovedOutline=e.diffInsertedOutline=e.diffOverviewRulerRemoved=e.diffOverviewRulerInserted=e.diffRemovedLineGutter=e.diffInsertedLineGutter=e.diffRemovedLine=e.diffInsertedLine=e.diffRemoved=e.diffInserted=e.defaultRemoveColor=e.defaultInsertColor=e.editorLightBulbAutoFixForeground=e.editorLightBulbForeground=e.editorInlayHintParameterBackground=e.editorInlayHintParameterForeground=e.editorInlayHintTypeBackground=e.editorInlayHintTypeForeground=e.editorInlayHintBackground=e.editorInlayHintForeground=e.editorActiveLinkForeground=e.editorHoverStatusBarBackground=e.editorHoverBorder=e.editorHoverForeground=e.editorHoverBackground=e.editorHoverHighlight=e.searchEditorFindMatchBorder=e.searchEditorFindMatch=e.editorFindRangeHighlightBorder=e.editorFindMatchHighlightBorder=e.editorFindMatchBorder=e.editorFindRangeHighlight=e.editorFindMatchHighlight=e.editorFindMatch=e.editorSelectionHighlightBorder=e.editorSelectionHighlight=e.editorInactiveSelection=e.editorSelectionForeground=e.editorSelectionBackground=e.keybindingLabelBottomBorder=e.keybindingLabelBorder=e.keybindingLabelForeground=e.keybindingLabelBackground=e.pickerGroupBorder=e.pickerGroupForeground=e.quickInputTitleBackground=e.quickInputForeground=e.quickInputBackground=e.editorWidgetResizeBorder=e.editorWidgetBorder=e.editorWidgetForeground=e.editorWidgetBackground=e.editorForeground=e.editorBackground=e.sashHoverBorder=e.editorHintBorder=e.editorHintForeground=e.editorInfoBorder=e.editorInfoForeground=e.editorInfoBackground=e.editorWarningBorder=e.editorWarningForeground=e.editorWarningBackground=e.editorErrorBorder=e.editorErrorForeground=e.editorErrorBackground=e.progressBarBackground=e.scrollbarSliderActiveBackground=e.scrollbarSliderHoverBackground=e.scrollbarSliderBackground=e.scrollbarShadow=e.badgeForeground=e.badgeBackground=e.buttonSecondaryHoverBackground=e.buttonSecondaryBackground=e.buttonSecondaryForeground=e.buttonBorder=e.buttonHoverBackground=e.buttonBackground=e.buttonForeground=e.checkboxBorder=e.checkboxForeground=e.checkboxBackground=e.selectBorder=e.selectForeground=e.selectListBackground=e.selectBackground=e.inputValidationErrorBorder=e.inputValidationErrorForeground=e.inputValidationErrorBackground=e.inputValidationWarningBorder=e.inputValidationWarningForeground=e.inputValidationWarningBackground=e.inputValidationInfoBorder=e.inputValidationInfoForeground=e.inputValidationInfoBackground=e.inputPlaceholderForeground=e.inputActiveOptionForeground=e.inputActiveOptionBackground=e.inputActiveOptionHoverBackground=e.inputActiveOptionBorder=e.inputBorder=e.inputForeground=e.inputBackground=e.widgetShadow=e.textCodeBlockBackground=e.textBlockQuoteBorder=e.textBlockQuoteBackground=e.textPreformatForeground=e.textLinkActiveForeground=e.textLinkForeground=e.textSeparatorForeground=e.selectionBackground=e.activeContrastBorder=e.contrastBorder=e.focusBorder=e.iconForeground=e.descriptionForeground=e.errorForeground=e.foreground=e.getColorRegistry=e.registerColor=e.Extensions=e.ColorTransformType=e.asCssVariableName=void 0;function w(O){return`--vscode-${O.replace(/\./g,"-")}`}e.asCssVariableName=w;var v;(function(O){O[O.Darken=0]="Darken",O[O.Lighten=1]="Lighten",O[O.Transparent=2]="Transparent",O[O.OneOf=3]="OneOf",O[O.LessProminent=4]="LessProminent",O[O.IfDefinedThenElse=5]="IfDefinedThenElse"})(v=e.ColorTransformType||(e.ColorTransformType={})),e.Extensions={ColorContribution:"base.contributions.colors"};class C{constructor(){this._onDidChangeSchema=new _.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(x,F,L,M=!1,N){let B={id:x,description:L,defaults:F,needsTransparency:M,deprecationMessage:N};this.colorsById[x]=B;let P={type:"string",description:L,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return N&&(P.deprecationMessage=N),this.colorSchema.properties[x]=P,this.colorReferenceSchema.enum.push(x),this.colorReferenceSchema.enumDescriptions.push(L),this._onDidChangeSchema.fire(),x}deregisterColor(x){delete this.colorsById[x],delete this.colorSchema.properties[x];const F=this.colorReferenceSchema.enum.indexOf(x);F!==-1&&(this.colorReferenceSchema.enum.splice(F,1),this.colorReferenceSchema.enumDescriptions.splice(F,1)),this._onDidChangeSchema.fire()}getColors(){return Object.keys(this.colorsById).map(x=>this.colorsById[x])}resolveDefaultColor(x,F){const L=this.colorsById[x];if(L&&L.defaults){const M=L.defaults[F.type];return y(M,F)}}getColorSchema(){return this.colorSchema}getColorReferenceSchema(){return this.colorReferenceSchema}toString(){let x=(F,L)=>{let M=F.indexOf(".")===-1?0:1,N=L.indexOf(".")===-1?0:1;return M!==N?M-N:F.localeCompare(L)};return Object.keys(this.colorsById).sort(x).map(F=>`- \`${F}\`: ${this.colorsById[F].description}`).join(` `)}}const o=new C;I.Registry.add(e.Extensions.ColorContribution,o);function c(O){return O===null||typeof O.hcLight=="undefined"&&(O.hcDark===null||typeof O.hcDark=="string"?O.hcLight=O.hcDark:O.hcLight=O.light),O}function i(O,x,F,L,M){return o.registerColor(O,c(x),F,L,M)}e.registerColor=i;function S(){return o}e.getColorRegistry=S,e.foreground=i("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},k.localize(0,null)),e.errorForeground=i("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},k.localize(1,null)),e.descriptionForeground=i("descriptionForeground",{light:"#717171",dark:d(e.foreground,.7),hcDark:d(e.foreground,.7),hcLight:d(e.foreground,.7)},k.localize(2,null)),e.iconForeground=i("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},k.localize(3,null)),e.focusBorder=i("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#0F4A85"},k.localize(4,null)),e.contrastBorder=i("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},k.localize(5,null)),e.activeContrastBorder=i("contrastActiveBorder",{light:null,dark:null,hcDark:e.focusBorder,hcLight:e.focusBorder},k.localize(6,null)),e.selectionBackground=i("selection.background",{light:null,dark:null,hcDark:null,hcLight:null},k.localize(7,null)),e.textSeparatorForeground=i("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:f.Color.black,hcLight:"#292929"},k.localize(8,null)),e.textLinkForeground=i("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},k.localize(9,null)),e.textLinkActiveForeground=i("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},k.localize(10,null)),e.textPreformatForeground=i("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#D7BA7D",hcLight:"#292929"},k.localize(11,null)),e.textBlockQuoteBackground=i("textBlockQuote.background",{light:"#7f7f7f1a",dark:"#7f7f7f1a",hcDark:null,hcLight:"#F2F2F2"},k.localize(12,null)),e.textBlockQuoteBorder=i("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:f.Color.white,hcLight:"#292929"},k.localize(13,null)),e.textCodeBlockBackground=i("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:f.Color.black,hcLight:"#F2F2F2"},k.localize(14,null)),e.widgetShadow=i("widget.shadow",{dark:d(f.Color.black,.36),light:d(f.Color.black,.16),hcDark:null,hcLight:null},k.localize(15,null)),e.inputBackground=i("input.background",{dark:"#3C3C3C",light:f.Color.white,hcDark:f.Color.black,hcLight:f.Color.white},k.localize(16,null)),e.inputForeground=i("input.foreground",{dark:e.foreground,light:e.foreground,hcDark:e.foreground,hcLight:e.foreground},k.localize(17,null)),e.inputBorder=i("input.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},k.localize(18,null)),e.inputActiveOptionBorder=i("inputOption.activeBorder",{dark:"#007ACC00",light:"#007ACC00",hcDark:e.contrastBorder,hcLight:e.contrastBorder},k.localize(19,null)),e.inputActiveOptionHoverBackground=i("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},k.localize(20,null)),e.inputActiveOptionBackground=i("inputOption.activeBackground",{dark:d(e.focusBorder,.4),light:d(e.focusBorder,.2),hcDark:f.Color.transparent,hcLight:f.Color.transparent},k.localize(21,null)),e.inputActiveOptionForeground=i("inputOption.activeForeground",{dark:f.Color.white,light:f.Color.black,hcDark:null,hcLight:e.foreground},k.localize(22,null)),e.inputPlaceholderForeground=i("input.placeholderForeground",{light:d(e.foreground,.5),dark:d(e.foreground,.5),hcDark:d(e.foreground,.7),hcLight:d(e.foreground,.7)},k.localize(23,null)),e.inputValidationInfoBackground=i("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:f.Color.black,hcLight:f.Color.white},k.localize(24,null)),e.inputValidationInfoForeground=i("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:e.foreground},k.localize(25,null)),e.inputValidationInfoBorder=i("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:e.contrastBorder,hcLight:e.contrastBorder},k.localize(26,null)),e.inputValidationWarningBackground=i("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:f.Color.black,hcLight:f.Color.white},k.localize(27,null)),e.inputValidationWarningForeground=i("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:e.foreground},k.localize(28,null)),e.inputValidationWarningBorder=i("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:e.contrastBorder,hcLight:e.contrastBorder},k.localize(29,null)),e.inputValidationErrorBackground=i("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:f.Color.black,hcLight:f.Color.white},k.localize(30,null)),e.inputValidationErrorForeground=i("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:e.foreground},k.localize(31,null)),e.inputValidationErrorBorder=i("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:e.contrastBorder,hcLight:e.contrastBorder},k.localize(32,null)),e.selectBackground=i("dropdown.background",{dark:"#3C3C3C",light:f.Color.white,hcDark:f.Color.black,hcLight:f.Color.white},k.localize(33,null)),e.selectListBackground=i("dropdown.listBackground",{dark:null,light:null,hcDark:f.Color.black,hcLight:f.Color.white},k.localize(34,null)),e.selectForeground=i("dropdown.foreground",{dark:"#F0F0F0",light:null,hcDark:f.Color.white,hcLight:e.foreground},k.localize(35,null)),e.selectBorder=i("dropdown.border",{dark:e.selectBackground,light:"#CECECE",hcDark:e.contrastBorder,hcLight:e.contrastBorder},k.localize(36,null)),e.checkboxBackground=i("checkbox.background",{dark:e.selectBackground,light:e.selectBackground,hcDark:e.selectBackground,hcLight:e.selectBackground},k.localize(37,null)),e.checkboxForeground=i("checkbox.foreground",{dark:e.selectForeground,light:e.selectForeground,hcDark:e.selectForeground,hcLight:e.selectForeground},k.localize(38,null)),e.checkboxBorder=i("checkbox.border",{dark:e.selectBorder,light:e.selectBorder,hcDark:e.selectBorder,hcLight:e.selectBorder},k.localize(39,null)),e.buttonForeground=i("button.foreground",{dark:f.Color.white,light:f.Color.white,hcDark:f.Color.white,hcLight:f.Color.white},k.localize(40,null)),e.buttonBackground=i("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},k.localize(41,null)),e.buttonHoverBackground=i("button.hoverBackground",{dark:g(e.buttonBackground,.2),light:h(e.buttonBackground,.2),hcDark:null,hcLight:null},k.localize(42,null)),e.buttonBorder=i("button.border",{dark:e.contrastBorder,light:e.contrastBorder,hcDark:e.contrastBorder,hcLight:e.contrastBorder},k.localize(43,null)),e.buttonSecondaryForeground=i("button.secondaryForeground",{dark:f.Color.white,light:f.Color.white,hcDark:f.Color.white,hcLight:e.foreground},k.localize(44,null)),e.buttonSecondaryBackground=i("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:f.Color.white},k.localize(45,null)),e.buttonSecondaryHoverBackground=i("button.secondaryHoverBackground",{dark:g(e.buttonSecondaryBackground,.2),light:h(e.buttonSecondaryBackground,.2),hcDark:null,hcLight:null},k.localize(46,null)),e.badgeBackground=i("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:f.Color.black,hcLight:"#007ACC"},k.localize(47,null)),e.badgeForeground=i("badge.foreground",{dark:f.Color.white,light:"#333",hcDark:f.Color.white,hcLight:f.Color.white},k.localize(48,null)),e.scrollbarShadow=i("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},k.localize(49,null)),e.scrollbarSliderBackground=i("scrollbarSlider.background",{dark:f.Color.fromHex("#797979").transparent(.4),light:f.Color.fromHex("#646464").transparent(.4),hcDark:d(e.contrastBorder,.6),hcLight:d(e.contrastBorder,.6)},k.localize(50,null)),e.scrollbarSliderHoverBackground=i("scrollbarSlider.hoverBackground",{dark:f.Color.fromHex("#646464").transparent(.7),light:f.Color.fromHex("#646464").transparent(.7),hcDark:d(e.contrastBorder,.8),hcLight:d(e.contrastBorder,.8)},k.localize(51,null)),e.scrollbarSliderActiveBackground=i("scrollbarSlider.activeBackground",{dark:f.Color.fromHex("#BFBFBF").transparent(.4),light:f.Color.fromHex("#000000").transparent(.6),hcDark:e.contrastBorder,hcLight:e.contrastBorder},k.localize(52,null)),e.progressBarBackground=i("progressBar.background",{dark:f.Color.fromHex("#0E70C0"),light:f.Color.fromHex("#0E70C0"),hcDark:e.contrastBorder,hcLight:e.contrastBorder},k.localize(53,null)),e.editorErrorBackground=i("editorError.background",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(54,null),!0),e.editorErrorForeground=i("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:null,hcLight:"#B5200D"},k.localize(55,null)),e.editorErrorBorder=i("editorError.border",{dark:null,light:null,hcDark:f.Color.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},k.localize(56,null)),e.editorWarningBackground=i("editorWarning.background",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(57,null),!0),e.editorWarningForeground=i("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:null,hcLight:"#895503"},k.localize(58,null)),e.editorWarningBorder=i("editorWarning.border",{dark:null,light:null,hcDark:f.Color.fromHex("#FFCC00").transparent(.8),hcLight:"#"},k.localize(59,null)),e.editorInfoBackground=i("editorInfo.background",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(60,null),!0),e.editorInfoForeground=i("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},k.localize(61,null)),e.editorInfoBorder=i("editorInfo.border",{dark:null,light:null,hcDark:f.Color.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},k.localize(62,null)),e.editorHintForeground=i("editorHint.foreground",{dark:f.Color.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},k.localize(63,null)),e.editorHintBorder=i("editorHint.border",{dark:null,light:null,hcDark:f.Color.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},k.localize(64,null)),e.sashHoverBorder=i("sash.hoverBorder",{dark:e.focusBorder,light:e.focusBorder,hcDark:e.focusBorder,hcLight:e.focusBorder},k.localize(65,null)),e.editorBackground=i("editor.background",{light:"#fffffe",dark:"#1E1E1E",hcDark:f.Color.black,hcLight:f.Color.white},k.localize(66,null)),e.editorForeground=i("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:f.Color.white,hcLight:e.foreground},k.localize(67,null)),e.editorWidgetBackground=i("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:f.Color.white},k.localize(68,null)),e.editorWidgetForeground=i("editorWidget.foreground",{dark:e.foreground,light:e.foreground,hcDark:e.foreground,hcLight:e.foreground},k.localize(69,null)),e.editorWidgetBorder=i("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:e.contrastBorder,hcLight:e.contrastBorder},k.localize(70,null)),e.editorWidgetResizeBorder=i("editorWidget.resizeBorder",{light:null,dark:null,hcDark:null,hcLight:null},k.localize(71,null)),e.quickInputBackground=i("quickInput.background",{dark:e.editorWidgetBackground,light:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},k.localize(72,null)),e.quickInputForeground=i("quickInput.foreground",{dark:e.editorWidgetForeground,light:e.editorWidgetForeground,hcDark:e.editorWidgetForeground,hcLight:e.editorWidgetForeground},k.localize(73,null)),e.quickInputTitleBackground=i("quickInputTitle.background",{dark:new f.Color(new f.RGBA(255,255,255,.105)),light:new f.Color(new f.RGBA(0,0,0,.06)),hcDark:"#000000",hcLight:f.Color.white},k.localize(74,null)),e.pickerGroupForeground=i("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:f.Color.white,hcLight:"#0F4A85"},k.localize(75,null)),e.pickerGroupBorder=i("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:f.Color.white,hcLight:"#0F4A85"},k.localize(76,null)),e.keybindingLabelBackground=i("keybindingLabel.background",{dark:new f.Color(new f.RGBA(128,128,128,.17)),light:new f.Color(new f.RGBA(221,221,221,.4)),hcDark:f.Color.transparent,hcLight:f.Color.transparent},k.localize(77,null)),e.keybindingLabelForeground=i("keybindingLabel.foreground",{dark:f.Color.fromHex("#CCCCCC"),light:f.Color.fromHex("#555555"),hcDark:f.Color.white,hcLight:e.foreground},k.localize(78,null)),e.keybindingLabelBorder=i("keybindingLabel.border",{dark:new f.Color(new f.RGBA(51,51,51,.6)),light:new f.Color(new f.RGBA(204,204,204,.4)),hcDark:new f.Color(new f.RGBA(111,195,223)),hcLight:e.contrastBorder},k.localize(79,null)),e.keybindingLabelBottomBorder=i("keybindingLabel.bottomBorder",{dark:new f.Color(new f.RGBA(68,68,68,.6)),light:new f.Color(new f.RGBA(187,187,187,.4)),hcDark:new f.Color(new f.RGBA(111,195,223)),hcLight:e.foreground},k.localize(80,null)),e.editorSelectionBackground=i("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},k.localize(81,null)),e.editorSelectionForeground=i("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:f.Color.white},k.localize(82,null)),e.editorInactiveSelection=i("editor.inactiveSelectionBackground",{light:d(e.editorSelectionBackground,.5),dark:d(e.editorSelectionBackground,.5),hcDark:d(e.editorSelectionBackground,.7),hcLight:d(e.editorSelectionBackground,.5)},k.localize(83,null),!0),e.editorSelectionHighlight=i("editor.selectionHighlightBackground",{light:E(e.editorSelectionBackground,e.editorBackground,.3,.6),dark:E(e.editorSelectionBackground,e.editorBackground,.3,.6),hcDark:null,hcLight:null},k.localize(84,null),!0),e.editorSelectionHighlightBorder=i("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},k.localize(85,null)),e.editorFindMatch=i("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},k.localize(86,null)),e.editorFindMatchHighlight=i("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},k.localize(87,null),!0),e.editorFindRangeHighlight=i("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},k.localize(88,null),!0),e.editorFindMatchBorder=i("editor.findMatchBorder",{light:null,dark:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},k.localize(89,null)),e.editorFindMatchHighlightBorder=i("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},k.localize(90,null)),e.editorFindRangeHighlightBorder=i("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:d(e.activeContrastBorder,.4),hcLight:d(e.activeContrastBorder,.4)},k.localize(91,null),!0),e.searchEditorFindMatch=i("searchEditor.findMatchBackground",{light:d(e.editorFindMatchHighlight,.66),dark:d(e.editorFindMatchHighlight,.66),hcDark:e.editorFindMatchHighlight,hcLight:e.editorFindMatchHighlight},k.localize(92,null)),e.searchEditorFindMatchBorder=i("searchEditor.findMatchBorder",{light:d(e.editorFindMatchHighlightBorder,.66),dark:d(e.editorFindMatchHighlightBorder,.66),hcDark:e.editorFindMatchHighlightBorder,hcLight:e.editorFindMatchHighlightBorder},k.localize(93,null)),e.editorHoverHighlight=i("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},k.localize(94,null),!0),e.editorHoverBackground=i("editorHoverWidget.background",{light:e.editorWidgetBackground,dark:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},k.localize(95,null)),e.editorHoverForeground=i("editorHoverWidget.foreground",{light:e.editorWidgetForeground,dark:e.editorWidgetForeground,hcDark:e.editorWidgetForeground,hcLight:e.editorWidgetForeground},k.localize(96,null)),e.editorHoverBorder=i("editorHoverWidget.border",{light:e.editorWidgetBorder,dark:e.editorWidgetBorder,hcDark:e.editorWidgetBorder,hcLight:e.editorWidgetBorder},k.localize(97,null)),e.editorHoverStatusBarBackground=i("editorHoverWidget.statusBarBackground",{dark:g(e.editorHoverBackground,.2),light:h(e.editorHoverBackground,.05),hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},k.localize(98,null)),e.editorActiveLinkForeground=i("editorLink.activeForeground",{dark:"#4E94CE",light:f.Color.blue,hcDark:f.Color.cyan,hcLight:"#292929"},k.localize(99,null)),e.editorInlayHintForeground=i("editorInlayHint.foreground",{dark:d(e.badgeForeground,.8),light:d(e.badgeForeground,.8),hcDark:e.badgeForeground,hcLight:e.badgeForeground},k.localize(100,null)),e.editorInlayHintBackground=i("editorInlayHint.background",{dark:d(e.badgeBackground,.6),light:d(e.badgeBackground,.3),hcDark:e.badgeBackground,hcLight:e.badgeBackground},k.localize(101,null)),e.editorInlayHintTypeForeground=i("editorInlayHint.typeForeground",{dark:e.editorInlayHintForeground,light:e.editorInlayHintForeground,hcDark:e.editorInlayHintForeground,hcLight:e.editorInlayHintForeground},k.localize(102,null)),e.editorInlayHintTypeBackground=i("editorInlayHint.typeBackground",{dark:e.editorInlayHintBackground,light:e.editorInlayHintBackground,hcDark:e.editorInlayHintBackground,hcLight:e.editorInlayHintBackground},k.localize(103,null)),e.editorInlayHintParameterForeground=i("editorInlayHint.parameterForeground",{dark:e.editorInlayHintForeground,light:e.editorInlayHintForeground,hcDark:e.editorInlayHintForeground,hcLight:e.editorInlayHintForeground},k.localize(104,null)),e.editorInlayHintParameterBackground=i("editorInlayHint.parameterBackground",{dark:e.editorInlayHintBackground,light:e.editorInlayHintBackground,hcDark:e.editorInlayHintBackground,hcLight:e.editorInlayHintBackground},k.localize(105,null)),e.editorLightBulbForeground=i("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},k.localize(106,null)),e.editorLightBulbAutoFixForeground=i("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},k.localize(107,null)),e.defaultInsertColor=new f.Color(new f.RGBA(155,185,85,.2)),e.defaultRemoveColor=new f.Color(new f.RGBA(255,0,0,.2)),e.diffInserted=i("diffEditor.insertedTextBackground",{dark:e.defaultInsertColor,light:e.defaultInsertColor,hcDark:null,hcLight:null},k.localize(108,null),!0),e.diffRemoved=i("diffEditor.removedTextBackground",{dark:e.defaultRemoveColor,light:e.defaultRemoveColor,hcDark:null,hcLight:null},k.localize(109,null),!0),e.diffInsertedLine=i("diffEditor.insertedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(110,null),!0),e.diffRemovedLine=i("diffEditor.removedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(111,null),!0),e.diffInsertedLineGutter=i("diffEditorGutter.insertedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(112,null)),e.diffRemovedLineGutter=i("diffEditorGutter.removedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(113,null)),e.diffOverviewRulerInserted=i("diffEditorOverview.insertedForeground",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(114,null)),e.diffOverviewRulerRemoved=i("diffEditorOverview.removedForeground",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(115,null)),e.diffInsertedOutline=i("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},k.localize(116,null)),e.diffRemovedOutline=i("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},k.localize(117,null)),e.diffBorder=i("diffEditor.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},k.localize(118,null)),e.diffDiagonalFill=i("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},k.localize(119,null)),e.listFocusBackground=i("list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(120,null)),e.listFocusForeground=i("list.focusForeground",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(121,null)),e.listFocusOutline=i("list.focusOutline",{dark:e.focusBorder,light:e.focusBorder,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},k.localize(122,null)),e.listActiveSelectionBackground=i("list.activeSelectionBackground",{dark:"#094771",light:"#0060C0",hcDark:null,hcLight:null},k.localize(123,null)),e.listActiveSelectionForeground=i("list.activeSelectionForeground",{dark:f.Color.white,light:f.Color.white,hcDark:null,hcLight:null},k.localize(124,null)),e.listActiveSelectionIconForeground=i("list.activeSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(125,null)),e.listInactiveSelectionBackground=i("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:null},k.localize(126,null)),e.listInactiveSelectionForeground=i("list.inactiveSelectionForeground",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(127,null)),e.listInactiveSelectionIconForeground=i("list.inactiveSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(128,null)),e.listInactiveFocusBackground=i("list.inactiveFocusBackground",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(129,null)),e.listInactiveFocusOutline=i("list.inactiveFocusOutline",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(130,null)),e.listHoverBackground=i("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:null},k.localize(131,null)),e.listHoverForeground=i("list.hoverForeground",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(132,null)),e.listDropBackground=i("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},k.localize(133,null)),e.listHighlightForeground=i("list.highlightForeground",{dark:"#18A3FF",light:"#0066BF",hcDark:e.focusBorder,hcLight:e.focusBorder},k.localize(134,null)),e.listFocusHighlightForeground=i("list.focusHighlightForeground",{dark:e.listHighlightForeground,light:b(e.listActiveSelectionBackground,e.listHighlightForeground,"#9DDDFF"),hcDark:e.listHighlightForeground,hcLight:e.listHighlightForeground},k.localize(135,null)),e.listInvalidItemForeground=i("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},k.localize(136,null)),e.listErrorForeground=i("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},k.localize(137,null)),e.listWarningForeground=i("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},k.localize(138,null)),e.listFilterWidgetBackground=i("listFilterWidget.background",{light:"#efc1ad",dark:"#653723",hcDark:f.Color.black,hcLight:f.Color.white},k.localize(139,null)),e.listFilterWidgetOutline=i("listFilterWidget.outline",{dark:f.Color.transparent,light:f.Color.transparent,hcDark:"#f38518",hcLight:"#007ACC"},k.localize(140,null)),e.listFilterWidgetNoMatchesOutline=i("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:e.contrastBorder,hcLight:e.contrastBorder},k.localize(141,null)),e.listFilterMatchHighlight=i("list.filterMatchBackground",{dark:e.editorFindMatchHighlight,light:e.editorFindMatchHighlight,hcDark:null,hcLight:null},k.localize(142,null)),e.listFilterMatchHighlightBorder=i("list.filterMatchBorder",{dark:e.editorFindMatchHighlightBorder,light:e.editorFindMatchHighlightBorder,hcDark:e.contrastBorder,hcLight:e.contrastBorder},k.localize(143,null)),e.treeIndentGuidesStroke=i("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},k.localize(144,null)),e.tableColumnsBorder=i("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},k.localize(145,null)),e.tableOddRowsBackgroundColor=i("tree.tableOddRowsBackground",{dark:d(e.foreground,.04),light:d(e.foreground,.04),hcDark:null,hcLight:null},k.localize(146,null)),e.listDeemphasizedForeground=i("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},k.localize(147,null)),e._deprecatedQuickInputListFocusBackground=i("quickInput.list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},"",void 0,k.localize(148,null)),e.quickInputListFocusForeground=i("quickInputList.focusForeground",{dark:e.listActiveSelectionForeground,light:e.listActiveSelectionForeground,hcDark:e.listActiveSelectionForeground,hcLight:e.listActiveSelectionForeground},k.localize(149,null)),e.quickInputListFocusIconForeground=i("quickInputList.focusIconForeground",{dark:e.listActiveSelectionIconForeground,light:e.listActiveSelectionIconForeground,hcDark:e.listActiveSelectionIconForeground,hcLight:e.listActiveSelectionIconForeground},k.localize(150,null)),e.quickInputListFocusBackground=i("quickInputList.focusBackground",{dark:m(e._deprecatedQuickInputListFocusBackground,e.listActiveSelectionBackground),light:m(e._deprecatedQuickInputListFocusBackground,e.listActiveSelectionBackground),hcDark:null,hcLight:null},k.localize(151,null)),e.menuBorder=i("menu.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},k.localize(152,null)),e.menuForeground=i("menu.foreground",{dark:e.selectForeground,light:e.foreground,hcDark:e.selectForeground,hcLight:e.selectForeground},k.localize(153,null)),e.menuBackground=i("menu.background",{dark:e.selectBackground,light:e.selectBackground,hcDark:e.selectBackground,hcLight:e.selectBackground},k.localize(154,null)),e.menuSelectionForeground=i("menu.selectionForeground",{dark:e.listActiveSelectionForeground,light:e.listActiveSelectionForeground,hcDark:e.listActiveSelectionForeground,hcLight:e.listActiveSelectionForeground},k.localize(155,null)),e.menuSelectionBackground=i("menu.selectionBackground",{dark:e.listActiveSelectionBackground,light:e.listActiveSelectionBackground,hcDark:e.listActiveSelectionBackground,hcLight:e.listActiveSelectionBackground},k.localize(156,null)),e.menuSelectionBorder=i("menu.selectionBorder",{dark:null,light:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},k.localize(157,null)),e.menuSeparatorBackground=i("menu.separatorBackground",{dark:"#BBBBBB",light:"#888888",hcDark:e.contrastBorder,hcLight:e.contrastBorder},k.localize(158,null)),e.toolbarHoverBackground=i("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},k.localize(159,null)),e.toolbarHoverOutline=i("toolbar.hoverOutline",{dark:null,light:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},k.localize(160,null)),e.toolbarActiveBackground=i("toolbar.activeBackground",{dark:g(e.toolbarHoverBackground,.1),light:h(e.toolbarHoverBackground,.1),hcDark:null,hcLight:null},k.localize(161,null)),e.snippetTabstopHighlightBackground=i("editor.snippetTabstopHighlightBackground",{dark:new f.Color(new f.RGBA(124,124,124,.3)),light:new f.Color(new f.RGBA(10,50,100,.2)),hcDark:new f.Color(new f.RGBA(124,124,124,.3)),hcLight:new f.Color(new f.RGBA(10,50,100,.2))},k.localize(162,null)),e.snippetTabstopHighlightBorder=i("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(163,null)),e.snippetFinalTabstopHighlightBackground=i("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(164,null)),e.snippetFinalTabstopHighlightBorder=i("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new f.Color(new f.RGBA(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},k.localize(165,null)),e.breadcrumbsForeground=i("breadcrumb.foreground",{light:d(e.foreground,.8),dark:d(e.foreground,.8),hcDark:d(e.foreground,.8),hcLight:d(e.foreground,.8)},k.localize(166,null)),e.breadcrumbsBackground=i("breadcrumb.background",{light:e.editorBackground,dark:e.editorBackground,hcDark:e.editorBackground,hcLight:e.editorBackground},k.localize(167,null)),e.breadcrumbsFocusForeground=i("breadcrumb.focusForeground",{light:h(e.foreground,.2),dark:g(e.foreground,.1),hcDark:g(e.foreground,.1),hcLight:g(e.foreground,.1)},k.localize(168,null)),e.breadcrumbsActiveSelectionForeground=i("breadcrumb.activeSelectionForeground",{light:h(e.foreground,.2),dark:g(e.foreground,.1),hcDark:g(e.foreground,.1),hcLight:g(e.foreground,.1)},k.localize(169,null)),e.breadcrumbsPickerBackground=i("breadcrumbPicker.background",{light:e.editorWidgetBackground,dark:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},k.localize(170,null));const s=.5,l=f.Color.fromHex("#40C8AE").transparent(s),r=f.Color.fromHex("#40A6FF").transparent(s),p=f.Color.fromHex("#606060").transparent(.4),u=.4,a=1;e.mergeCurrentHeaderBackground=i("merge.currentHeaderBackground",{dark:l,light:l,hcDark:null,hcLight:null},k.localize(171,null),!0),e.mergeCurrentContentBackground=i("merge.currentContentBackground",{dark:d(e.mergeCurrentHeaderBackground,u),light:d(e.mergeCurrentHeaderBackground,u),hcDark:d(e.mergeCurrentHeaderBackground,u),hcLight:d(e.mergeCurrentHeaderBackground,u)},k.localize(172,null),!0),e.mergeIncomingHeaderBackground=i("merge.incomingHeaderBackground",{dark:r,light:r,hcDark:null,hcLight:null},k.localize(173,null),!0),e.mergeIncomingContentBackground=i("merge.incomingContentBackground",{dark:d(e.mergeIncomingHeaderBackground,u),light:d(e.mergeIncomingHeaderBackground,u),hcDark:d(e.mergeIncomingHeaderBackground,u),hcLight:d(e.mergeIncomingHeaderBackground,u)},k.localize(174,null),!0),e.mergeCommonHeaderBackground=i("merge.commonHeaderBackground",{dark:p,light:p,hcDark:null,hcLight:null},k.localize(175,null),!0),e.mergeCommonContentBackground=i("merge.commonContentBackground",{dark:d(e.mergeCommonHeaderBackground,u),light:d(e.mergeCommonHeaderBackground,u),hcDark:d(e.mergeCommonHeaderBackground,u),hcLight:d(e.mergeCommonHeaderBackground,u)},k.localize(176,null),!0),e.mergeBorder=i("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},k.localize(177,null)),e.overviewRulerCurrentContentForeground=i("editorOverviewRuler.currentContentForeground",{dark:d(e.mergeCurrentHeaderBackground,a),light:d(e.mergeCurrentHeaderBackground,a),hcDark:e.mergeBorder,hcLight:e.mergeBorder},k.localize(178,null)),e.overviewRulerIncomingContentForeground=i("editorOverviewRuler.incomingContentForeground",{dark:d(e.mergeIncomingHeaderBackground,a),light:d(e.mergeIncomingHeaderBackground,a),hcDark:e.mergeBorder,hcLight:e.mergeBorder},k.localize(179,null)),e.overviewRulerCommonContentForeground=i("editorOverviewRuler.commonContentForeground",{dark:d(e.mergeCommonHeaderBackground,a),light:d(e.mergeCommonHeaderBackground,a),hcDark:e.mergeBorder,hcLight:e.mergeBorder},k.localize(180,null)),e.overviewRulerFindMatchForeground=i("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:""},k.localize(181,null),!0),e.overviewRulerSelectionHighlightForeground=i("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},k.localize(182,null),!0),e.minimapFindMatch=i("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},k.localize(183,null),!0),e.minimapSelectionOccurrenceHighlight=i("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},k.localize(184,null),!0),e.minimapSelection=i("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},k.localize(185,null),!0),e.minimapError=i("minimap.errorHighlight",{dark:new f.Color(new f.RGBA(255,18,18,.7)),light:new f.Color(new f.RGBA(255,18,18,.7)),hcDark:new f.Color(new f.RGBA(255,50,50,1)),hcLight:"#B5200D"},k.localize(186,null)),e.minimapWarning=i("minimap.warningHighlight",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hcDark:e.editorWarningBorder,hcLight:e.editorWarningBorder},k.localize(187,null)),e.minimapBackground=i("minimap.background",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(188,null)),e.minimapForegroundOpacity=i("minimap.foregroundOpacity",{dark:f.Color.fromHex("#000f"),light:f.Color.fromHex("#000f"),hcDark:f.Color.fromHex("#000f"),hcLight:f.Color.fromHex("#000f")},k.localize(189,null)),e.minimapSliderBackground=i("minimapSlider.background",{light:d(e.scrollbarSliderBackground,.5),dark:d(e.scrollbarSliderBackground,.5),hcDark:d(e.scrollbarSliderBackground,.5),hcLight:d(e.scrollbarSliderBackground,.5)},k.localize(190,null)),e.minimapSliderHoverBackground=i("minimapSlider.hoverBackground",{light:d(e.scrollbarSliderHoverBackground,.5),dark:d(e.scrollbarSliderHoverBackground,.5),hcDark:d(e.scrollbarSliderHoverBackground,.5),hcLight:d(e.scrollbarSliderHoverBackground,.5)},k.localize(191,null)),e.minimapSliderActiveBackground=i("minimapSlider.activeBackground",{light:d(e.scrollbarSliderActiveBackground,.5),dark:d(e.scrollbarSliderActiveBackground,.5),hcDark:d(e.scrollbarSliderActiveBackground,.5),hcLight:d(e.scrollbarSliderActiveBackground,.5)},k.localize(192,null)),e.problemsErrorIconForeground=i("problemsErrorIcon.foreground",{dark:e.editorErrorForeground,light:e.editorErrorForeground,hcDark:e.editorErrorForeground,hcLight:e.editorErrorForeground},k.localize(193,null)),e.problemsWarningIconForeground=i("problemsWarningIcon.foreground",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hcDark:e.editorWarningForeground,hcLight:e.editorWarningForeground},k.localize(194,null)),e.problemsInfoIconForeground=i("problemsInfoIcon.foreground",{dark:e.editorInfoForeground,light:e.editorInfoForeground,hcDark:e.editorInfoForeground,hcLight:e.editorInfoForeground},k.localize(195,null)),e.chartsForeground=i("charts.foreground",{dark:e.foreground,light:e.foreground,hcDark:e.foreground,hcLight:e.foreground},k.localize(196,null)),e.chartsLines=i("charts.lines",{dark:d(e.foreground,.5),light:d(e.foreground,.5),hcDark:d(e.foreground,.5),hcLight:d(e.foreground,.5)},k.localize(197,null)),e.chartsRed=i("charts.red",{dark:e.editorErrorForeground,light:e.editorErrorForeground,hcDark:e.editorErrorForeground,hcLight:e.editorErrorForeground},k.localize(198,null)),e.chartsBlue=i("charts.blue",{dark:e.editorInfoForeground,light:e.editorInfoForeground,hcDark:e.editorInfoForeground,hcLight:e.editorInfoForeground},k.localize(199,null)),e.chartsYellow=i("charts.yellow",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hcDark:e.editorWarningForeground,hcLight:e.editorWarningForeground},k.localize(200,null)),e.chartsOrange=i("charts.orange",{dark:e.minimapFindMatch,light:e.minimapFindMatch,hcDark:e.minimapFindMatch,hcLight:e.minimapFindMatch},k.localize(201,null)),e.chartsGreen=i("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},k.localize(202,null)),e.chartsPurple=i("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},k.localize(203,null));function n(O,x){switch(O.op){case 0:return y(O.value,x)?.darken(O.factor);case 1:return y(O.value,x)?.lighten(O.factor);case 2:return y(O.value,x)?.transparent(O.factor);case 3:for(const F of O.values){const L=y(F,x);if(L)return L}return;case 5:return y(x.defines(O.if)?O.then:O.else,x);case 4:{const F=y(O.value,x);if(!F)return;const L=y(O.background,x);return L?F.isDarkerThan(L)?f.Color.getLighterColor(F,L,O.factor).transparent(O.transparency):f.Color.getDarkerColor(F,L,O.factor).transparent(O.transparency):F.transparent(O.factor*O.transparency)}default:throw(0,A.assertNever)(O)}}e.executeTransform=n;function h(O,x){return{op:0,value:O,factor:x}}e.darken=h;function g(O,x){return{op:1,value:O,factor:x}}e.lighten=g;function d(O,x){return{op:2,value:O,factor:x}}e.transparent=d;function m(...O){return{op:3,values:O}}e.oneOf=m;function b(O,x,F){return{op:5,if:O,then:x,else:F}}e.ifDefinedThenElse=b;function E(O,x,F,L){return{op:4,value:O,background:x,factor:F,transparency:L}}function y(O,x){if(O!==null){if(typeof O=="string")return O[0]==="#"?f.Color.fromHex(O):x.getColor(O);if(O instanceof f.Color)return O;if(typeof O=="object")return n(O,x)}}e.resolveColorValue=y,e.workbenchColorsSchemaId="vscode://schemas/workbench-colors";let T=I.Registry.as(D.Extensions.JSONContribution);T.registerSchema(e.workbenchColorsSchemaId,o.getColorSchema());const R=new t.RunOnceScheduler(()=>T.notifySchemaChanged(e.workbenchColorsSchemaId),200);o.onDidChangeSchema(()=>{R.isScheduled()||R.schedule()})}),define(ne[402],re([1,0,10,381,137,11,2,32]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicCssRules=e.GlobalEditorPointerMoveMonitor=e.EditorPointerEventFactory=e.EditorMouseEventFactory=e.EditorMouseEvent=e.createCoordinatesRelativeToEditor=e.createEditorPagePosition=e.CoordinatesRelativeToEditor=e.EditorPagePosition=e.ClientCoordinates=e.PageCoordinates=void 0;class I{constructor(n,h){this.x=n,this.y=h,this._pageCoordinatesBrand=void 0}toClientCoordinates(){return new w(this.x-t.StandardWindow.scrollX,this.y-t.StandardWindow.scrollY)}}e.PageCoordinates=I;class w{constructor(n,h){this.clientX=n,this.clientY=h,this._clientCoordinatesBrand=void 0}toPageCoordinates(){return new I(this.clientX+t.StandardWindow.scrollX,this.clientY+t.StandardWindow.scrollY)}}e.ClientCoordinates=w;class v{constructor(n,h,g,d){this.x=n,this.y=h,this.width=g,this.height=d,this._editorPagePositionBrand=void 0}}e.EditorPagePosition=v;class C{constructor(n,h){this.x=n,this.y=h,this._positionRelativeToEditorBrand=void 0}}e.CoordinatesRelativeToEditor=C;function o(a){const n=t.getDomNodePagePosition(a);return new v(n.left,n.top,n.width,n.height)}e.createEditorPagePosition=o;function c(a,n,h){const g=n.width/a.offsetWidth,d=n.height/a.offsetHeight,m=(h.x-n.x)/g,b=(h.y-n.y)/d;return new C(m,b)}e.createCoordinatesRelativeToEditor=c;class i extends _.StandardMouseEvent{constructor(n,h,g){super(n);this._editorMouseEventBrand=void 0,this.isFromPointerCapture=h,this.pos=new I(this.posx,this.posy),this.editorPos=o(g),this.relativePos=c(g,this.editorPos,this.pos)}}e.EditorMouseEvent=i;class S{constructor(n){this._editorViewDomNode=n}_create(n){return new i(n,!1,this._editorViewDomNode)}onContextMenu(n,h){return t.addDisposableListener(n,"contextmenu",g=>{h(this._create(g))})}onMouseUp(n,h){return t.addDisposableListener(n,"mouseup",g=>{h(this._create(g))})}onMouseDown(n,h){return t.addDisposableListener(n,t.EventType.MOUSE_DOWN,g=>{h(this._create(g))})}onPointerDown(n,h){return t.addDisposableListener(n,t.EventType.POINTER_DOWN,g=>{h(this._create(g),g.pointerType,g.pointerId)})}onMouseLeave(n,h){return t.addDisposableNonBubblingMouseOutListener(n,g=>{h(this._create(g))})}onMouseMoveThrottled(n,h,g,d){const m=(b,E)=>g(b,this._create(E));return t.addDisposableThrottledListener(n,"mousemove",h,m,d)}}e.EditorMouseEventFactory=S;class s{constructor(n){this._editorViewDomNode=n}_create(n){return new i(n,!1,this._editorViewDomNode)}onPointerUp(n,h){return t.addDisposableListener(n,"pointerup",g=>{h(this._create(g))})}onPointerDown(n,h){return t.addDisposableListener(n,t.EventType.POINTER_DOWN,g=>{h(this._create(g),g.pointerId)})}onPointerLeave(n,h){return t.addDisposableNonBubblingPointerOutListener(n,g=>{h(this._create(g))})}onPointerMoveThrottled(n,h,g,d){const m=(b,E)=>g(b,this._create(E));return t.addDisposableThrottledListener(n,"pointermove",h,m,d)}}e.EditorPointerEventFactory=s;class l extends k.Disposable{constructor(n){super();this._editorViewDomNode=n,this._globalPointerMoveMonitor=this._register(new f.GlobalPointerMoveMonitor),this._keydownListener=null}startMonitoring(n,h,g,d,m,b){this._keydownListener=t.addStandardDisposableListener(document,"keydown",y=>{y.toKeybinding().isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,y.browserEvent)},!0);const E=(y,T)=>d(y,new i(T,!0,this._editorViewDomNode));this._globalPointerMoveMonitor.startMonitoring(n,h,g,E,m,y=>{this._keydownListener.dispose(),b(y)})}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(!0)}}e.GlobalEditorPointerMoveMonitor=l;class r{constructor(n){this._editor=n,this._instanceId=++r._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new A.RunOnceScheduler(()=>this.garbageCollect(),1e3)}createClassNameRef(n){const h=this.getOrCreateRule(n);return h.increaseRefCount(),{className:h.className,dispose:()=>{h.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(n){const h=this.computeUniqueKey(n);let g=this._rules.get(h);if(!g){const d=this._counter++;g=new p(h,`dyn-rule-${this._instanceId}-${d}`,t.isInShadowDOM(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,n),this._rules.set(h,g)}return g}computeUniqueKey(n){return JSON.stringify(n)}garbageCollect(){for(const n of this._rules.values())n.hasReferences()||(this._rules.delete(n.key),n.dispose())}}e.DynamicCssRules=r,r._idPool=0;class p{constructor(n,h,g,d){this.key=n,this.className=h,this.properties=d,this._referenceCount=0,this._styleElement=t.createStyleSheet(g),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(n,h){let g=`.${n} {`;for(const d in h){const m=h[d];let b;typeof m=="object"?b=`var(${(0,D.asCssVariableName)(m.id)})`:b=m,g+=` ${u(d)}: ${b};`}return g+=` }`,g}dispose(){this._styleElement.remove()}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function u(a){return a.replace(/(^[A-Z])/,([n])=>n.toLowerCase()).replace(/([A-Z])/g,([n])=>`-${n.toLowerCase()}`)}}),define(ne[127],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isHighContrast=e.ColorScheme=void 0;var t;(function(_){_.DARK="dark",_.LIGHT="light",_.HIGH_CONTRAST_DARK="hcDark",_.HIGH_CONTRAST_LIGHT="hcLight"})(t=e.ColorScheme||(e.ColorScheme={}));function f(_){return _===t.HIGH_CONTRAST_DARK||_===t.HIGH_CONTRAST_LIGHT}e.isHighContrast=f}),define(ne[744],re([1,0,77,128,14,1138,384,459,460,127,123]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewLine=e.ViewLineOptions=e.DomReadingContext=void 0;const C=function(){return _.isNative?!0:!(_.isLinux||t.isFirefox||t.isSafari)}();let o=!0;class c{constructor(h,g){this._domNode=h,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1,this.endNode=g}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const h=this._domNode.getBoundingClientRect();this._clientRectDeltaLeft=h.left,this._clientRectScale=h.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}}e.DomReadingContext=c;class i{constructor(h,g){this.themeType=g;const d=h.options,m=d.get(44);this.renderWhitespace=d.get(88),this.renderControlCharacters=d.get(83),this.spaceWidth=m.spaceWidth,this.middotWidth=m.middotWidth,this.wsmiddotWidth=m.wsmiddotWidth,this.useMonospaceOptimizations=m.isMonospace&&!d.get(29),this.canUseHalfwidthRightwardsArrow=m.canUseHalfwidthRightwardsArrow,this.lineHeight=d.get(59),this.stopRenderingLineAfter=d.get(105),this.fontLigatures=d.get(45)}equals(h){return this.themeType===h.themeType&&this.renderWhitespace===h.renderWhitespace&&this.renderControlCharacters===h.renderControlCharacters&&this.spaceWidth===h.spaceWidth&&this.middotWidth===h.middotWidth&&this.wsmiddotWidth===h.wsmiddotWidth&&this.useMonospaceOptimizations===h.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===h.canUseHalfwidthRightwardsArrow&&this.lineHeight===h.lineHeight&&this.stopRenderingLineAfter===h.stopRenderingLineAfter&&this.fontLigatures===h.fontLigatures}}e.ViewLineOptions=i;class S{constructor(h){this._options=h,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(h){if(this._renderedViewLine)this._renderedViewLine.domNode=(0,f.createFastDomNode)(h);else throw new Error("I have no rendered view line to set the dom node to...")}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(h){this._isMaybeInvalid=!0,this._options=h}onSelectionChanged(){return(0,w.isHighContrast)(this._options.themeType)||this._options.renderWhitespace==="selection"?(this._isMaybeInvalid=!0,!0):!1}renderLine(h,g,d,m){if(this._isMaybeInvalid===!1)return!1;this._isMaybeInvalid=!1;const b=d.getViewLineRenderingData(h),E=this._options,y=D.LineDecoration.filter(b.inlineDecorations,h,b.minColumn,b.maxColumn);let T=null;if((0,w.isHighContrast)(E.themeType)||this._options.renderWhitespace==="selection"){const F=d.selections;for(const L of F){if(L.endLineNumber<h||L.startLineNumber>h)continue;const M=L.startLineNumber===h?L.startColumn:b.minColumn,N=L.endLineNumber===h?L.endColumn:b.maxColumn;M<N&&((0,w.isHighContrast)(E.themeType)||this._options.renderWhitespace!=="selection"?y.push(new D.LineDecoration(M,N,"inline-selected-text",0)):(T||(T=[]),T.push(new I.LineRange(M-1,N-1))))}}const R=new I.RenderLineInput(E.useMonospaceOptimizations,E.canUseHalfwidthRightwardsArrow,b.content,b.continuesWithWrappedLine,b.isBasicASCII,b.containsRTL,b.minColumn-1,b.tokens,y,b.tabSize,b.startVisibleColumn,E.spaceWidth,E.middotWidth,E.wsmiddotWidth,E.stopRenderingLineAfter,E.renderWhitespace,E.renderControlCharacters,E.fontLigatures!==v.EditorFontLigatures.OFF,T);if(this._renderedViewLine&&this._renderedViewLine.input.equals(R))return!1;m.appendASCIIString('<div style="top:'),m.appendASCIIString(String(g)),m.appendASCIIString("px;height:"),m.appendASCIIString(String(this._options.lineHeight)),m.appendASCIIString('px;" class="'),m.appendASCIIString(S.CLASS_NAME),m.appendASCIIString('">');const O=(0,I.renderViewLine)(R,m);m.appendASCIIString("</div>");let x=null;return o&&C&&b.isBasicASCII&&E.useMonospaceOptimizations&&O.containsForeignElements===0&&b.content.length<300&&R.lineTokens.getCount()<100&&(x=new s(this._renderedViewLine?this._renderedViewLine.domNode:null,R,O.characterMapping)),x||(x=p(this._renderedViewLine?this._renderedViewLine.domNode:null,R,O.characterMapping,O.containsRTL,O.containsForeignElements)),this._renderedViewLine=x,!0}layoutLine(h,g){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(g),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(){return this._renderedViewLine?this._renderedViewLine.getWidth():0}getWidthIsFast(){return this._renderedViewLine?this._renderedViewLine.getWidthIsFast():!0}needsMonospaceFontCheck(){return this._renderedViewLine?this._renderedViewLine instanceof s:!1}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof s?this._renderedViewLine.monospaceAssumptionsAreValid():o}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof s&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(h,g,d,m){if(!this._renderedViewLine)return null;g=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,g)),d=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,d));const b=this._renderedViewLine.input.stopRenderingLineAfter;let E=!1;b!==-1&&g>b+1&&d>b+1&&(E=!0),b!==-1&&g>b+1&&(g=b+1),b!==-1&&d>b+1&&(d=b+1);const y=this._renderedViewLine.getVisibleRangesForRange(h,g,d,m);return y&&y.length>0?new k.VisibleRanges(E,y):null}getColumnOfNodeOffset(h,g,d){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(h,g,d):1}}e.ViewLine=S,S.CLASS_NAME="view-line";class s{constructor(h,g,d){this.domNode=h,this.input=g,this._characterMapping=d,this._charWidth=g.spaceWidth}getWidth(){return Math.round(this._getCharPosition(this._characterMapping.length))}getWidthIsFast(){return!0}monospaceAssumptionsAreValid(){if(!this.domNode)return o;const h=this.getWidth(),g=this.domNode.domNode.firstChild.offsetWidth;return Math.abs(h-g)>=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),o=!1),o}toSlowRenderedLine(){return p(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(h,g,d,m){const b=this._getCharPosition(g),E=this._getCharPosition(d);return[new k.FloatHorizontalRange(b,E-b)]}_getCharPosition(h){const g=this._characterMapping.getAbsoluteOffset(h);return this._charWidth*g}getColumnOfNodeOffset(h,g,d){const m=g.textContent.length;let b=-1;for(;g;)g=g.previousSibling,b++;return this._characterMapping.getColumn(new I.DomPosition(b,d),m)}}class l{constructor(h,g,d,m,b){if(this.domNode=h,this.input=g,this._characterMapping=d,this._isWhitespaceOnly=/^\s*$/.test(g.lineContent),this._containsForeignElements=b,this._cachedWidth=-1,this._pixelOffsetCache=null,!m||this._characterMapping.length===0){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let E=0,y=this._characterMapping.length;E<=y;E++)this._pixelOffsetCache[E]=-1}}_getReadingTarget(h){return h.domNode.firstChild}getWidth(){return this.domNode?(this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth),this._cachedWidth):0}getWidthIsFast(){return this._cachedWidth!==-1}getVisibleRangesForRange(h,g,d,m){if(!this.domNode)return null;if(this._pixelOffsetCache!==null){const b=this._readPixelOffset(this.domNode,h,g,m);if(b===-1)return null;const E=this._readPixelOffset(this.domNode,h,d,m);return E===-1?null:[new k.FloatHorizontalRange(b,E-b)]}return this._readVisibleRangesForRange(this.domNode,h,g,d,m)}_readVisibleRangesForRange(h,g,d,m,b){if(d===m){const E=this._readPixelOffset(h,g,d,b);return E===-1?null:[new k.FloatHorizontalRange(E,0)]}else return this._readRawVisibleRangesForRange(h,d,m,b)}_readPixelOffset(h,g,d,m){if(this._characterMapping.length===0){if(this._containsForeignElements===0||this._containsForeignElements===2)return 0;if(this._containsForeignElements===1)return this.getWidth();const b=this._getReadingTarget(h);return b.firstChild?b.firstChild.offsetWidth:0}if(this._pixelOffsetCache!==null){const b=this._pixelOffsetCache[d];if(b!==-1)return b;const E=this._actualReadPixelOffset(h,g,d,m);return this._pixelOffsetCache[d]=E,E}return this._actualReadPixelOffset(h,g,d,m)}_actualReadPixelOffset(h,g,d,m){if(this._characterMapping.length===0){const T=A.RangeUtil.readHorizontalRanges(this._getReadingTarget(h),0,0,0,0,m.clientRectDeltaLeft,m.clientRectScale,m.endNode);return!T||T.length===0?-1:T[0].left}if(d===this._characterMapping.length&&this._isWhitespaceOnly&&this._containsForeignElements===0)return this.getWidth();const b=this._characterMapping.getDomPosition(d),E=A.RangeUtil.readHorizontalRanges(this._getReadingTarget(h),b.partIndex,b.charIndex,b.partIndex,b.charIndex,m.clientRectDeltaLeft,m.clientRectScale,m.endNode);if(!E||E.length===0)return-1;const y=E[0].left;if(this.input.isBasicASCII){const T=this._characterMapping.getAbsoluteOffset(d),R=Math.round(this.input.spaceWidth*T);if(Math.abs(R-y)<=1)return R}return y}_readRawVisibleRangesForRange(h,g,d,m){if(g===1&&d===this._characterMapping.length)return[new k.FloatHorizontalRange(0,this.getWidth())];const b=this._characterMapping.getDomPosition(g),E=this._characterMapping.getDomPosition(d);return A.RangeUtil.readHorizontalRanges(this._getReadingTarget(h),b.partIndex,b.charIndex,E.partIndex,E.charIndex,m.clientRectDeltaLeft,m.clientRectScale,m.endNode)}getColumnOfNodeOffset(h,g,d){const m=g.textContent.length;let b=-1;for(;g;)g=g.previousSibling,b++;return this._characterMapping.getColumn(new I.DomPosition(b,d),m)}}class r extends l{_readVisibleRangesForRange(h,g,d,m,b){const E=super._readVisibleRangesForRange(h,g,d,m,b);if(!E||E.length===0||d===m||d===1&&m===this._characterMapping.length)return E;if(!this.input.containsRTL){const y=this._readPixelOffset(h,g,m,b);if(y!==-1){const T=E[E.length-1];T.left<y&&(T.width=y-T.left)}}return E}}const p=function(){return t.isWebKit?u:a}();function u(n,h,g,d,m){return new r(n,h,g,d,m)}function a(n,h,g,d,m){return new l(n,h,g,d,m)}}),define(ne[745],re([1,0,402,182,744,49,20,243,10,688]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.shadowCaretRangeFromPoint=e.MouseTargetFactory=e.HitTestContext=e.MouseTarget=e.PointerHandlerLastRenderData=void 0;var v;(function(d){d[d.Unknown=0]="Unknown",d[d.Content=1]="Content"})(v||(v={}));class C{constructor(m=null){this.hitTarget=m,this.type=0}}class o{constructor(m,b,E){this.position=m,this.spanNode=b,this.injectedText=E,this.type=1}}var c;(function(d){function m(b,E,y){const T=b.getPositionFromDOMInfo(E,y);return T?new o(T,E,null):new C(E)}d.createFromDOMInfo=m})(c||(c={}));class i{constructor(m,b){this.lastViewCursorsRenderData=m,this.lastTextareaPosition=b}}e.PointerHandlerLastRenderData=i;class S{static _deduceRage(m,b=null){return!b&&m?new k.Range(m.lineNumber,m.column,m.lineNumber,m.column):b??null}static createUnknown(m,b,E){return{type:0,element:m,mouseColumn:b,position:E,range:this._deduceRage(E)}}static createTextarea(m,b){return{type:1,element:m,mouseColumn:b,position:null,range:null}}static createMargin(m,b,E,y,T,R){return{type:m,element:b,mouseColumn:E,position:y,range:T,detail:R}}static createViewZone(m,b,E,y,T){return{type:m,element:b,mouseColumn:E,position:y,range:this._deduceRage(y),detail:T}}static createContentText(m,b,E,y,T){return{type:6,element:m,mouseColumn:b,position:E,range:this._deduceRage(E,y),detail:T}}static createContentEmpty(m,b,E,y){return{type:7,element:m,mouseColumn:b,position:E,range:this._deduceRage(E),detail:y}}static createContentWidget(m,b,E){return{type:9,element:m,mouseColumn:b,position:null,range:null,detail:E}}static createScrollbar(m,b,E){return{type:11,element:m,mouseColumn:b,position:E,range:this._deduceRage(E)}}static createOverlayWidget(m,b,E){return{type:12,element:m,mouseColumn:b,position:null,range:null,detail:E}}static createOutsideEditor(m,b){return{type:13,element:null,mouseColumn:m,position:b,range:this._deduceRage(b)}}static _typeToString(m){return m===1?"TEXTAREA":m===2?"GUTTER_GLYPH_MARGIN":m===3?"GUTTER_LINE_NUMBERS":m===4?"GUTTER_LINE_DECORATIONS":m===5?"GUTTER_VIEW_ZONE":m===6?"CONTENT_TEXT":m===7?"CONTENT_EMPTY":m===8?"CONTENT_VIEW_ZONE":m===9?"CONTENT_WIDGET":m===10?"OVERVIEW_RULER":m===11?"SCROLLBAR":m===12?"OVERLAY_WIDGET":"UNKNOWN"}static toString(m){return this._typeToString(m.type)+": "+m.position+" - "+m.range+" - "+JSON.stringify(m.detail)}}e.MouseTarget=S;class s{static isTextArea(m){return m.length===2&&m[0]===3&&m[1]===6}static isChildOfViewLines(m){return m.length>=4&&m[0]===3&&m[3]===7}static isStrictChildOfViewLines(m){return m.length>4&&m[0]===3&&m[3]===7}static isChildOfScrollableElement(m){return m.length>=2&&m[0]===3&&m[1]===5}static isChildOfMinimap(m){return m.length>=2&&m[0]===3&&m[1]===8}static isChildOfContentWidgets(m){return m.length>=4&&m[0]===3&&m[3]===1}static isChildOfOverflowingContentWidgets(m){return m.length>=1&&m[0]===2}static isChildOfOverlayWidgets(m){return m.length>=2&&m[0]===3&&m[1]===4}}class l{constructor(m,b,E){this.viewModel=m.viewModel;const y=m.configuration.options;this.layoutInfo=y.get(131),this.viewDomNode=b.viewDomNode,this.lineHeight=y.get(59),this.stickyTabStops=y.get(104),this.typicalHalfwidthCharacterWidth=y.get(44).typicalHalfwidthCharacterWidth,this.lastRenderData=E,this._context=m,this._viewHelper=b}getZoneAtCoord(m){return l.getZoneAtCoord(this._context,m)}static getZoneAtCoord(m,b){const E=m.viewLayout.getWhitespaceAtVerticalOffset(b);if(E){const y=E.verticalOffset+E.height/2,T=m.viewModel.getLineCount();let R=null,O,x=null;return E.afterLineNumber!==T&&(x=new A.Position(E.afterLineNumber+1,1)),E.afterLineNumber>0&&(R=new A.Position(E.afterLineNumber,m.viewModel.getLineMaxColumn(E.afterLineNumber))),x===null?O=R:R===null?O=x:b<y?O=R:O=x,{viewZoneId:E.id,afterLineNumber:E.afterLineNumber,positionBefore:R,positionAfter:x,position:O}}return null}getFullLineRangeAtCoord(m){if(this._context.viewLayout.isAfterLines(m)){const y=this._context.viewModel.getLineCount(),T=this._context.viewModel.getLineMaxColumn(y);return{range:new k.Range(y,T,y,T),isAfterLines:!0}}const b=this._context.viewLayout.getLineNumberAtVerticalOffset(m),E=this._context.viewModel.getLineMaxColumn(b);return{range:new k.Range(b,1,b,E),isAfterLines:!1}}getLineNumberAtVerticalOffset(m){return this._context.viewLayout.getLineNumberAtVerticalOffset(m)}isAfterLines(m){return this._context.viewLayout.isAfterLines(m)}isInTopPadding(m){return this._context.viewLayout.isInTopPadding(m)}isInBottomPadding(m){return this._context.viewLayout.isInBottomPadding(m)}getVerticalOffsetForLineNumber(m){return this._context.viewLayout.getVerticalOffsetForLineNumber(m)}findAttribute(m,b){return l._findAttribute(m,b,this._viewHelper.viewDomNode)}static _findAttribute(m,b,E){for(;m&&m!==document.body;){if(m.hasAttribute&&m.hasAttribute(b))return m.getAttribute(b);if(m===E)return null;m=m.parentNode}return null}getLineWidth(m){return this._viewHelper.getLineWidth(m)}visibleRangeForPosition(m,b){return this._viewHelper.visibleRangeForPosition(m,b)}getPositionFromDOMInfo(m,b){return this._viewHelper.getPositionFromDOMInfo(m,b)}getCurrentScrollTop(){return this._context.viewLayout.getCurrentScrollTop()}getCurrentScrollLeft(){return this._context.viewLayout.getCurrentScrollLeft()}}e.HitTestContext=l;class r{constructor(m,b,E,y){this.editorPos=b,this.pos=E,this.relativePos=y,this.mouseVerticalOffset=Math.max(0,m.getCurrentScrollTop()+this.relativePos.y),this.mouseContentHorizontalOffset=m.getCurrentScrollLeft()+this.relativePos.x-m.layoutInfo.contentLeft,this.isInMarginArea=this.relativePos.x<m.layoutInfo.contentLeft&&this.relativePos.x>=m.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,n._getMouseColumn(this.mouseContentHorizontalOffset,m.typicalHalfwidthCharacterWidth))}}class p extends r{constructor(m,b,E,y,T){super(m,b,E,y);this._ctx=m,T?(this.target=T,this.targetPath=f.PartFingerprints.collect(T,m.viewDomNode)):(this.target=null,this.targetPath=new Uint8Array(0))}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset} target: ${this.target?this.target.outerHTML:null}`}_getMouseColumn(m=null){return m&&m.column<this._ctx.viewModel.getLineMaxColumn(m.lineNumber)?D.CursorColumns.visibleColumnFromColumn(this._ctx.viewModel.getLineContent(m.lineNumber),m.column,this._ctx.viewModel.model.getOptions().tabSize)+1:this.mouseColumn}fulfillUnknown(m=null){return S.createUnknown(this.target,this._getMouseColumn(m),m)}fulfillTextarea(){return S.createTextarea(this.target,this._getMouseColumn())}fulfillMargin(m,b,E,y){return S.createMargin(m,this.target,this._getMouseColumn(b),b,E,y)}fulfillViewZone(m,b,E){return S.createViewZone(m,this.target,this._getMouseColumn(b),b,E)}fulfillContentText(m,b,E){return S.createContentText(this.target,this._getMouseColumn(m),m,b,E)}fulfillContentEmpty(m,b){return S.createContentEmpty(this.target,this._getMouseColumn(m),m,b)}fulfillContentWidget(m){return S.createContentWidget(this.target,this._getMouseColumn(),m)}fulfillScrollbar(m){return S.createScrollbar(this.target,this._getMouseColumn(m),m)}fulfillOverlayWidget(m){return S.createOverlayWidget(this.target,this._getMouseColumn(),m)}withTarget(m){return new p(this._ctx,this.editorPos,this.pos,this.relativePos,m)}}const u={isAfterLines:!0};function a(d){return{isAfterLines:!1,horizontalDistanceToText:d}}class n{constructor(m,b){this._context=m,this._viewHelper=b}mouseTargetIsWidget(m){const b=m.target,E=f.PartFingerprints.collect(b,this._viewHelper.viewDomNode);return!!(s.isChildOfContentWidgets(E)||s.isChildOfOverflowingContentWidgets(E)||s.isChildOfOverlayWidgets(E))}createMouseTarget(m,b,E,y,T){const R=new l(this._context,this._viewHelper,m),O=new p(R,b,E,y,T);try{return n._createMouseTarget(R,O,!1)}catch{return O.fulfillUnknown()}}static _createMouseTarget(m,b,E){if(b.target===null){if(E)return b.fulfillUnknown();const R=n._doHitTest(m,b);return R.type===1?n.createMouseTargetFromHitTestPosition(m,b,R.spanNode,R.position,R.injectedText):this._createMouseTarget(m,b.withTarget(R.hitTarget),!0)}const y=b;let T=null;return T=T||n._hitTestContentWidget(m,y),T=T||n._hitTestOverlayWidget(m,y),T=T||n._hitTestMinimap(m,y),T=T||n._hitTestScrollbarSlider(m,y),T=T||n._hitTestViewZone(m,y),T=T||n._hitTestMargin(m,y),T=T||n._hitTestViewCursor(m,y),T=T||n._hitTestTextArea(m,y),T=T||n._hitTestViewLines(m,y,E),T=T||n._hitTestScrollbar(m,y),T||b.fulfillUnknown()}static _hitTestContentWidget(m,b){if(s.isChildOfContentWidgets(b.targetPath)||s.isChildOfOverflowingContentWidgets(b.targetPath)){const E=m.findAttribute(b.target,"widgetId");return E?b.fulfillContentWidget(E):b.fulfillUnknown()}return null}static _hitTestOverlayWidget(m,b){if(s.isChildOfOverlayWidgets(b.targetPath)){const E=m.findAttribute(b.target,"widgetId");return E?b.fulfillOverlayWidget(E):b.fulfillUnknown()}return null}static _hitTestViewCursor(m,b){if(b.target){const E=m.lastRenderData.lastViewCursorsRenderData;for(const y of E)if(b.target===y.domNode)return b.fulfillContentText(y.position,null,{mightBeForeignElement:!1,injectedText:null})}if(b.isInContentArea){const E=m.lastRenderData.lastViewCursorsRenderData,y=b.mouseContentHorizontalOffset,T=b.mouseVerticalOffset;for(const R of E){if(y<R.contentLeft||y>R.contentLeft+R.width)continue;const O=m.getVerticalOffsetForLineNumber(R.position.lineNumber);if(O<=T&&T<=O+R.height)return b.fulfillContentText(R.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(m,b){const E=m.getZoneAtCoord(b.mouseVerticalOffset);if(E){const y=b.isInContentArea?8:5;return b.fulfillViewZone(y,E.position,E)}return null}static _hitTestTextArea(m,b){return s.isTextArea(b.targetPath)?m.lastRenderData.lastTextareaPosition?b.fulfillContentText(m.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):b.fulfillTextarea():null}static _hitTestMargin(m,b){if(b.isInMarginArea){const E=m.getFullLineRangeAtCoord(b.mouseVerticalOffset),y=E.range.getStartPosition();let T=Math.abs(b.relativePos.x);const R={isAfterLines:E.isAfterLines,glyphMarginLeft:m.layoutInfo.glyphMarginLeft,glyphMarginWidth:m.layoutInfo.glyphMarginWidth,lineNumbersWidth:m.layoutInfo.lineNumbersWidth,offsetX:T};return T-=m.layoutInfo.glyphMarginLeft,T<=m.layoutInfo.glyphMarginWidth?b.fulfillMargin(2,y,E.range,R):(T-=m.layoutInfo.glyphMarginWidth,T<=m.layoutInfo.lineNumbersWidth?b.fulfillMargin(3,y,E.range,R):(T-=m.layoutInfo.lineNumbersWidth,b.fulfillMargin(4,y,E.range,R)))}return null}static _hitTestViewLines(m,b,E){if(!s.isChildOfViewLines(b.targetPath))return null;if(m.isInTopPadding(b.mouseVerticalOffset))return b.fulfillContentEmpty(new A.Position(1,1),u);if(m.isAfterLines(b.mouseVerticalOffset)||m.isInBottomPadding(b.mouseVerticalOffset)){const T=m.viewModel.getLineCount(),R=m.viewModel.getLineMaxColumn(T);return b.fulfillContentEmpty(new A.Position(T,R),u)}if(E){if(s.isStrictChildOfViewLines(b.targetPath)){const T=m.getLineNumberAtVerticalOffset(b.mouseVerticalOffset);if(m.viewModel.getLineLength(T)===0){const O=m.getLineWidth(T),x=a(b.mouseContentHorizontalOffset-O);return b.fulfillContentEmpty(new A.Position(T,1),x)}const R=m.getLineWidth(T);if(b.mouseContentHorizontalOffset>=R){const O=a(b.mouseContentHorizontalOffset-R),x=new A.Position(T,m.viewModel.getLineMaxColumn(T));return b.fulfillContentEmpty(x,O)}}return b.fulfillUnknown()}const y=n._doHitTest(m,b);return y.type===1?n.createMouseTargetFromHitTestPosition(m,b,y.spanNode,y.position,y.injectedText):this._createMouseTarget(m,b.withTarget(y.hitTarget),!0)}static _hitTestMinimap(m,b){if(s.isChildOfMinimap(b.targetPath)){const E=m.getLineNumberAtVerticalOffset(b.mouseVerticalOffset),y=m.viewModel.getLineMaxColumn(E);return b.fulfillScrollbar(new A.Position(E,y))}return null}static _hitTestScrollbarSlider(m,b){if(s.isChildOfScrollableElement(b.targetPath)&&b.target&&b.target.nodeType===1){const E=b.target.className;if(E&&/\b(slider|scrollbar)\b/.test(E)){const y=m.getLineNumberAtVerticalOffset(b.mouseVerticalOffset),T=m.viewModel.getLineMaxColumn(y);return b.fulfillScrollbar(new A.Position(y,T))}}return null}static _hitTestScrollbar(m,b){if(s.isChildOfScrollableElement(b.targetPath)){const E=m.getLineNumberAtVerticalOffset(b.mouseVerticalOffset),y=m.viewModel.getLineMaxColumn(E);return b.fulfillScrollbar(new A.Position(E,y))}return null}getMouseColumn(m){const b=this._context.configuration.options,E=b.get(131),y=this._context.viewLayout.getCurrentScrollLeft()+m.x-E.contentLeft;return n._getMouseColumn(y,b.get(44).typicalHalfwidthCharacterWidth)}static _getMouseColumn(m,b){return m<0?1:Math.round(m/b)+1}static createMouseTargetFromHitTestPosition(m,b,E,y,T){const R=y.lineNumber,O=y.column,x=m.getLineWidth(R);if(b.mouseContentHorizontalOffset>x){const z=a(b.mouseContentHorizontalOffset-x);return b.fulfillContentEmpty(y,z)}const F=m.visibleRangeForPosition(R,O);if(!F)return b.fulfillUnknown(y);const L=F.left;if(b.mouseContentHorizontalOffset===L)return b.fulfillContentText(y,null,{mightBeForeignElement:!!T,injectedText:T});const M=[];if(M.push({offset:F.left,column:O}),O>1){const z=m.visibleRangeForPosition(R,O-1);z&&M.push({offset:z.left,column:O-1})}const N=m.viewModel.getLineMaxColumn(R);if(O<N){const z=m.visibleRangeForPosition(R,O+1);z&&M.push({offset:z.left,column:O+1})}M.sort((z,U)=>z.offset-U.offset);const B=b.pos.toClientCoordinates(),P=E.getBoundingClientRect(),V=P.left<=B.clientX&&B.clientX<=P.right;for(let z=1;z<M.length;z++){const U=M[z-1],H=M[z];if(U.offset<=b.mouseContentHorizontalOffset&&b.mouseContentHorizontalOffset<=H.offset){const K=new k.Range(R,U.column,R,H.column);return b.fulfillContentText(y,K,{mightBeForeignElement:!V||!!T,injectedText:T})}}return b.fulfillContentText(y,null,{mightBeForeignElement:!V||!!T,injectedText:T})}static _doHitTestWithCaretRangeFromPoint(m,b){const E=m.getLineNumberAtVerticalOffset(b.mouseVerticalOffset),T=m.getVerticalOffsetForLineNumber(E)+Math.floor(m.lineHeight/2);let R=b.pos.y+(T-b.mouseVerticalOffset);R<=b.editorPos.y&&(R=b.editorPos.y+1),R>=b.editorPos.y+b.editorPos.height&&(R=b.editorPos.y+b.editorPos.height-1);const O=new t.PageCoordinates(b.pos.x,R),x=this._actualDoHitTestWithCaretRangeFromPoint(m,O.toClientCoordinates());return x.type===1?x:this._actualDoHitTestWithCaretRangeFromPoint(m,b.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(m,b){const E=I.getShadowRoot(m.viewDomNode);let y;if(E?typeof E.caretRangeFromPoint=="undefined"?y=h(E,b.clientX,b.clientY):y=E.caretRangeFromPoint(b.clientX,b.clientY):y=document.caretRangeFromPoint(b.clientX,b.clientY),!y||!y.startContainer)return new C;const T=y.startContainer;if(T.nodeType===T.TEXT_NODE){const R=T.parentNode,O=R?R.parentNode:null,x=O?O.parentNode:null;return(x&&x.nodeType===x.ELEMENT_NODE?x.className:null)===_.ViewLine.CLASS_NAME?c.createFromDOMInfo(m,R,y.startOffset):new C(T.parentNode)}else if(T.nodeType===T.ELEMENT_NODE){const R=T.parentNode,O=R?R.parentNode:null;return(O&&O.nodeType===O.ELEMENT_NODE?O.className:null)===_.ViewLine.CLASS_NAME?c.createFromDOMInfo(m,T,T.textContent.length):new C(T)}return new C}static _doHitTestWithCaretPositionFromPoint(m,b){const E=document.caretPositionFromPoint(b.clientX,b.clientY);if(E.offsetNode.nodeType===E.offsetNode.TEXT_NODE){const y=E.offsetNode.parentNode,T=y?y.parentNode:null,R=T?T.parentNode:null;return(R&&R.nodeType===R.ELEMENT_NODE?R.className:null)===_.ViewLine.CLASS_NAME?c.createFromDOMInfo(m,E.offsetNode.parentNode,E.offset):new C(E.offsetNode.parentNode)}if(E.offsetNode.nodeType===E.offsetNode.ELEMENT_NODE){const y=E.offsetNode.parentNode,T=y&&y.nodeType===y.ELEMENT_NODE?y.className:null,R=y?y.parentNode:null,O=R&&R.nodeType===R.ELEMENT_NODE?R.className:null;if(T===_.ViewLine.CLASS_NAME){const x=E.offsetNode.childNodes[Math.min(E.offset,E.offsetNode.childNodes.length-1)];if(x)return c.createFromDOMInfo(m,x,0)}else if(O===_.ViewLine.CLASS_NAME)return c.createFromDOMInfo(m,E.offsetNode,0)}return new C(E.offsetNode)}static _snapToSoftTabBoundary(m,b){const E=b.getLineContent(m.lineNumber),{tabSize:y}=b.model.getOptions(),T=w.AtomicTabMoveOperations.atomicPosition(E,m.column-1,y,2);return T!==-1?new A.Position(m.lineNumber,T+1):m}static _doHitTest(m,b){let E=new C;if(typeof document.caretRangeFromPoint=="function"?E=this._doHitTestWithCaretRangeFromPoint(m,b):document.caretPositionFromPoint&&(E=this._doHitTestWithCaretPositionFromPoint(m,b.pos.toClientCoordinates())),E.type===1){const y=m.viewModel.getInjectedTextAt(E.position),T=m.viewModel.normalizePosition(E.position,2);(y||!T.equals(E.position))&&(E=new o(T,E.spanNode,y))}return E.type===1&&m.stickyTabStops&&(E=new o(this._snapToSoftTabBoundary(E.position,m.viewModel),E.spanNode,E.injectedText)),E}}e.MouseTargetFactory=n;function h(d,m,b){const E=document.createRange();let y=d.elementFromPoint(m,b);if(y!==null){for(;y&&y.firstChild&&y.firstChild.nodeType!==y.firstChild.TEXT_NODE&&y.lastChild&&y.lastChild.firstChild;)y=y.lastChild;const T=y.getBoundingClientRect(),R=window.getComputedStyle(y,null).getPropertyValue("font"),O=y.innerText;let x=T.left,F=0,L;if(m>T.left+T.width)F=O.length;else{const M=g.getInstance();for(let N=0;N<O.length+1;N++){if(L=M.getCharWidth(O.charAt(N),R)/2,x+=L,m<x){F=N;break}x+=L}}E.setStart(y.firstChild,F),E.setEnd(y.firstChild,F)}return E}e.shadowCaretRangeFromPoint=h;class g{constructor(){this._cache={},this._canvas=document.createElement("canvas")}static getInstance(){return g._INSTANCE||(g._INSTANCE=new g),g._INSTANCE}getCharWidth(m,b){const E=m+b;if(this._cache[E])return this._cache[E];const y=this._canvas.getContext("2d");y.font=b;const R=y.measureText(m).width;return this._cache[E]=R,R}}g._INSTANCE=null}),define(ne[2007],re([1,0,10,137,11,2,14,745,402,454,49,84,388]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MouseHandler=e.createMouseMoveEventMerger=void 0;function c(l){return function(r,p){let u=!1;return l&&(u=l.mouseTargetIsWidget(p)),u||p.preventDefault(),p}}e.createMouseMoveEventMerger=c;class i extends o.ViewEventHandler{constructor(r,p,u){super();this._context=r,this.viewController=p,this.viewHelper=u,this.mouseTargetFactory=new D.MouseTargetFactory(this._context,u),this._mouseDownOperation=this._register(new S(this._context,this.viewController,this.viewHelper,(g,d)=>this._createMouseTarget(g,d),g=>this._getMouseColumn(g))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(131).height;const a=new I.EditorMouseEventFactory(this.viewHelper.viewDomNode);this._register(a.onContextMenu(this.viewHelper.viewDomNode,g=>this._onContextMenu(g,!0))),this._register(a.onMouseMoveThrottled(this.viewHelper.viewDomNode,g=>this._onMouseMove(g),c(this.mouseTargetFactory),i.MOUSE_MOVE_MINIMUM_TIME)),this._register(a.onMouseUp(this.viewHelper.viewDomNode,g=>this._onMouseUp(g))),this._register(a.onMouseLeave(this.viewHelper.viewDomNode,g=>this._onMouseLeave(g)));let n=0;this._register(a.onPointerDown(this.viewHelper.viewDomNode,(g,d,m)=>{d==="mouse"&&(n=m)})),this._register(t.addDisposableListener(this.viewHelper.viewDomNode,t.EventType.POINTER_UP,g=>{this._mouseDownOperation.onPointerUp()})),this._register(a.onMouseDown(this.viewHelper.viewDomNode,g=>this._onMouseDown(g,n)));const h=g=>{if(this.viewController.emitMouseWheel(g),!this._context.configuration.options.get(68))return;const d=new f.StandardWheelEvent(g);if(k.isMacintosh?(g.metaKey||g.ctrlKey)&&!g.shiftKey&&!g.altKey:g.ctrlKey&&!g.metaKey&&!g.shiftKey&&!g.altKey){const b=w.EditorZoom.getZoomLevel(),E=d.deltaY>0?1:-1;w.EditorZoom.setZoomLevel(b+E),d.preventDefault(),d.stopPropagation()}};this._register(t.addDisposableListener(this.viewHelper.viewDomNode,t.EventType.MOUSE_WHEEL,h,{capture:!0,passive:!1})),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(r){if(r.hasChanged(131)){const p=this._context.configuration.options.get(131).height;this._height!==p&&(this._height=p,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(r){return this._mouseDownOperation.onCursorStateChanged(r),!1}onFocusChanged(r){return!1}onScrollChanged(r){return this._mouseDownOperation.onScrollChanged(),!1}getTargetAtClientPoint(r,p){const a=new I.ClientCoordinates(r,p).toPageCoordinates(),n=(0,I.createEditorPagePosition)(this.viewHelper.viewDomNode);if(a.y<n.y||a.y>n.y+n.height||a.x<n.x||a.x>n.x+n.width)return null;const h=(0,I.createCoordinatesRelativeToEditor)(this.viewHelper.viewDomNode,n,a);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),n,a,h,null)}_createMouseTarget(r,p){let u=r.target;if(!this.viewHelper.viewDomNode.contains(u)){const a=t.getShadowRoot(this.viewHelper.viewDomNode);a&&(u=a.elementsFromPoint(r.posx,r.posy).find(n=>this.viewHelper.viewDomNode.contains(n)))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),r.editorPos,r.pos,r.relativePos,p?u:null)}_getMouseColumn(r){return this.mouseTargetFactory.getMouseColumn(r.relativePos)}_onContextMenu(r,p){this.viewController.emitContextMenu({event:r,target:this._createMouseTarget(r,p)})}_onMouseMove(r){this._mouseDownOperation.isActive()||r.timestamp<this.lastMouseLeaveTime||this.viewController.emitMouseMove({event:r,target:this._createMouseTarget(r,!0)})}_onMouseLeave(r){this.lastMouseLeaveTime=new Date().getTime(),this.viewController.emitMouseLeave({event:r,target:null})}_onMouseUp(r){this.viewController.emitMouseUp({event:r,target:this._createMouseTarget(r,!0)})}_onMouseDown(r,p){const u=this._createMouseTarget(r,!0),a=u.type===6||u.type===7,n=u.type===2||u.type===3||u.type===4,h=u.type===3,g=this._context.configuration.options.get(98),d=u.type===8||u.type===5,m=u.type===9;let b=r.leftButton||r.middleButton;k.isMacintosh&&r.leftButton&&r.ctrlKey&&(b=!1);const E=()=>{r.preventDefault(),this.viewHelper.focusTextArea()};if(b&&(a||h&&g))E(),this._mouseDownOperation.start(u.type,r,p);else if(n)r.preventDefault();else if(d){const y=u.detail;this.viewHelper.shouldSuppressMouseDownOnViewZone(y.viewZoneId)&&(E(),this._mouseDownOperation.start(u.type,r,p),r.preventDefault())}else m&&this.viewHelper.shouldSuppressMouseDownOnWidget(u.detail)&&(E(),r.preventDefault());this.viewController.emitMouseDown({event:r,target:u})}_onMouseWheel(r){this.viewController.emitMouseWheel(r)}}e.MouseHandler=i,i.MOUSE_MOVE_MINIMUM_TIME=100;class S extends A.Disposable{constructor(r,p,u,a,n){super();this._context=r,this._viewController=p,this._viewHelper=u,this._createMouseTarget=a,this._getMouseColumn=n,this._mouseMoveMonitor=this._register(new I.GlobalEditorPointerMoveMonitor(this._viewHelper.viewDomNode)),this._onScrollTimeout=this._register(new _.TimeoutTimer),this._mouseState=new s,this._currentSelection=new C.Selection(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(r){this._lastMouseEvent=r,this._mouseState.setModifiers(r);const p=this._findMousePosition(r,!1);!p||(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:r,target:p}):this._dispatchMouse(p,!0))}start(r,p,u){this._lastMouseEvent=p,this._mouseState.setStartedOnLineNumbers(r===3),this._mouseState.setStartButtons(p),this._mouseState.setModifiers(p);const a=this._findMousePosition(p,!0);if(!a||!a.position)return;this._mouseState.trySetCount(p.detail,a.position),p.detail=this._mouseState.count;const n=this._context.configuration.options;if(!n.get(81)&&n.get(31)&&!n.get(18)&&!this._mouseState.altKey&&p.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&a.type===6&&a.position&&this._currentSelection.containsPosition(a.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,u,p.buttons,c(null),h=>this._onMouseDownThenMove(h),h=>{const g=this._findMousePosition(this._lastMouseEvent,!1);h&&h instanceof KeyboardEvent?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:g?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(a,p.shiftKey),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,u,p.buttons,c(null),h=>this._onMouseDownThenMove(h),()=>this._stop()))}_stop(){this._isActive=!1,this._onScrollTimeout.cancel()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onScrollChanged(){!this._isActive||this._onScrollTimeout.setIfNotSet(()=>{if(!this._lastMouseEvent)return;const r=this._findMousePosition(this._lastMouseEvent,!1);!r||this._mouseState.isDragAndDrop||this._dispatchMouse(r,!0)},10)}onCursorStateChanged(r){this._currentSelection=r.selections[0]}_getPositionOutsideEditor(r){const p=r.editorPos,u=this._context.viewModel,a=this._context.viewLayout,n=this._getMouseColumn(r);if(r.posy<p.y){const g=Math.max(a.getCurrentScrollTop()-(p.y-r.posy),0),d=D.HitTestContext.getZoneAtCoord(this._context,g);if(d){const b=this._helpPositionJumpOverViewZone(d);if(b)return D.MouseTarget.createOutsideEditor(n,b)}const m=a.getLineNumberAtVerticalOffset(g);return D.MouseTarget.createOutsideEditor(n,new v.Position(m,1))}if(r.posy>p.y+p.height){const g=a.getCurrentScrollTop()+r.relativePos.y,d=D.HitTestContext.getZoneAtCoord(this._context,g);if(d){const b=this._helpPositionJumpOverViewZone(d);if(b)return D.MouseTarget.createOutsideEditor(n,b)}const m=a.getLineNumberAtVerticalOffset(g);return D.MouseTarget.createOutsideEditor(n,new v.Position(m,u.getLineMaxColumn(m)))}const h=a.getLineNumberAtVerticalOffset(a.getCurrentScrollTop()+r.relativePos.y);return r.posx<p.x?D.MouseTarget.createOutsideEditor(n,new v.Position(h,1)):r.posx>p.x+p.width?D.MouseTarget.createOutsideEditor(n,new v.Position(h,u.getLineMaxColumn(h))):null}_findMousePosition(r,p){const u=this._getPositionOutsideEditor(r);if(u)return u;const a=this._createMouseTarget(r,p);if(!a.position)return null;if(a.type===8||a.type===5){const h=this._helpPositionJumpOverViewZone(a.detail);if(h)return D.MouseTarget.createViewZone(a.type,a.element,a.mouseColumn,h,a.detail)}return a}_helpPositionJumpOverViewZone(r){const p=new v.Position(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),u=r.positionBefore,a=r.positionAfter;return u&&a?u.isBefore(p)?u:a:null}_dispatchMouse(r,p){!r.position||this._viewController.dispatchMouse({position:r.position,mouseColumn:r.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,inSelectionMode:p,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton,onInjectedText:r.type===6&&r.detail.injectedText!==null})}}class s{constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}get count(){return this._lastMouseDownCount}setModifiers(r){this._altKey=r.altKey,this._ctrlKey=r.ctrlKey,this._metaKey=r.metaKey,this._shiftKey=r.shiftKey}setStartButtons(r){this._leftButton=r.leftButton,this._middleButton=r.middleButton}setStartedOnLineNumbers(r){this._startedOnLineNumbers=r}trySetCount(r,p){const u=new Date().getTime();u-this._lastSetMouseDownCountTime>s.CLEAR_MOUSE_DOWN_COUNT_TIME&&(r=1),this._lastSetMouseDownCountTime=u,r>this._lastMouseDownCount+1&&(r=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(p)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=p,this._lastMouseDownCount=Math.min(r,this._lastMouseDownPositionEqualCount)}}s.CLEAR_MOUSE_DOWN_COUNT_TIME=400}),define(ne[2008],re([1,0,10,14,129,2,2007,402,223,523]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PointerHandler=e.PointerEventHandler=void 0;class v extends k.MouseHandler{constructor(i,S,s){super(i,S,s);this._register(_.Gesture.addTarget(this.viewHelper.linesContentDomNode)),this._register(t.addDisposableListener(this.viewHelper.linesContentDomNode,_.EventType.Tap,r=>this.onTap(r))),this._register(t.addDisposableListener(this.viewHelper.linesContentDomNode,_.EventType.Change,r=>this.onChange(r))),this._register(t.addDisposableListener(this.viewHelper.linesContentDomNode,_.EventType.Contextmenu,r=>this._onContextMenu(new D.EditorMouseEvent(r,!1,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(t.addDisposableListener(this.viewHelper.linesContentDomNode,"pointerdown",r=>{const p=r.pointerType;if(p==="mouse"){this._lastPointerType="mouse";return}else p==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));const l=new D.EditorPointerEventFactory(this.viewHelper.viewDomNode);this._register(l.onPointerMoveThrottled(this.viewHelper.viewDomNode,r=>this._onMouseMove(r),(0,k.createMouseMoveEventMerger)(this.mouseTargetFactory),k.MouseHandler.MOUSE_MOVE_MINIMUM_TIME)),this._register(l.onPointerUp(this.viewHelper.viewDomNode,r=>this._onMouseUp(r))),this._register(l.onPointerLeave(this.viewHelper.viewDomNode,r=>this._onMouseLeave(r))),this._register(l.onPointerDown(this.viewHelper.viewDomNode,(r,p)=>this._onMouseDown(r,p)))}onTap(i){if(!i.initialTarget||!this.viewHelper.linesContentDomNode.contains(i.initialTarget))return;i.preventDefault(),this.viewHelper.focusTextArea();const S=this._createMouseTarget(new D.EditorMouseEvent(i,!1,this.viewHelper.viewDomNode),!1);S.position&&this.viewController.dispatchMouse({position:S.position,mouseColumn:S.position.column,startedOnLineNumbers:!1,mouseDownCount:i.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:S.type===6&&S.detail.injectedText!==null})}onChange(i){this._lastPointerType==="touch"&&this._context.viewModel.viewLayout.deltaScrollNow(-i.translationX,-i.translationY)}_onMouseDown(i,S){i.browserEvent.pointerType!=="touch"&&super._onMouseDown(i,S)}}e.PointerEventHandler=v;class C extends k.MouseHandler{constructor(i,S,s){super(i,S,s);this._register(_.Gesture.addTarget(this.viewHelper.linesContentDomNode)),this._register(t.addDisposableListener(this.viewHelper.linesContentDomNode,_.EventType.Tap,l=>this.onTap(l))),this._register(t.addDisposableListener(this.viewHelper.linesContentDomNode,_.EventType.Change,l=>this.onChange(l))),this._register(t.addDisposableListener(this.viewHelper.linesContentDomNode,_.EventType.Contextmenu,l=>this._onContextMenu(new D.EditorMouseEvent(l,!1,this.viewHelper.viewDomNode),!1)))}onTap(i){i.preventDefault(),this.viewHelper.focusTextArea();const S=this._createMouseTarget(new D.EditorMouseEvent(i,!1,this.viewHelper.viewDomNode),!1);if(S.position){const s=document.createEvent("CustomEvent");s.initEvent(w.TextAreaSyntethicEvents.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(s),this.viewController.moveTo(S.position)}}onChange(i){this._context.viewModel.viewLayout.deltaScrollNow(-i.translationX,-i.translationY)}}class o extends A.Disposable{constructor(i,S,s){super();f.isIOS&&I.BrowserFeatures.pointerEvents?this.handler=this._register(new v(i,S,s)):window.TouchEvent?this.handler=this._register(new C(i,S,s)):this.handler=this._register(new k.MouseHandler(i,S,s))}getTargetAtClientPoint(i,S){return this.handler.getTargetAtClientPoint(i,S)}}e.PointerHandler=o}),define(ne[2009],re([1,0,14,11,227,524,182,744,49,20,384,304,1010]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewLines=void 0;class o{constructor(){this._currentVisibleRange=new w.Range(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(l){this._currentVisibleRange=l}}class c{constructor(l,r,p,u,a,n,h){this.minimalReveal=l,this.lineNumber=r,this.startColumn=p,this.endColumn=u,this.startScrollTop=a,this.stopScrollTop=n,this.scrollType=h,this.type="range",this.minLineNumber=r,this.maxLineNumber=r}}class i{constructor(l,r,p,u,a){this.minimalReveal=l,this.selections=r,this.startScrollTop=p,this.stopScrollTop=u,this.scrollType=a,this.type="selections";let n=r[0].startLineNumber,h=r[0].endLineNumber;for(let g=1,d=r.length;g<d;g++){const m=r[g];n=Math.min(n,m.startLineNumber),h=Math.max(h,m.endLineNumber)}this.minLineNumber=n,this.maxLineNumber=h}}class S extends k.ViewPart{constructor(l,r){super(l);this._linesContent=r,this._textRangeRestingSpot=document.createElement("div"),this._visibleLines=new A.VisibleLinesCollection(this),this.domNode=this._visibleLines.domNode;const p=this._context.configuration,u=this._context.configuration.options,a=u.get(44),n=u.get(132),h=u.get(131);this._lineHeight=u.get(59),this._typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=u.get(89),this._horizontalScrollbarHeight=h.horizontalScrollbarHeight,this._cursorSurroundingLines=u.get(25),this._cursorSurroundingLinesStyle=u.get(26),this._canUseLayerHinting=!u.get(28),this._viewLineOptions=new D.ViewLineOptions(p,this._context.theme.type),k.PartFingerprints.write(this.domNode,7),this.domNode.setClassName(`view-lines ${C.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),(0,_.applyFontInfo)(this.domNode,a),this._maxLineWidth=0,this._asyncUpdateLineWidths=new f.RunOnceScheduler(()=>{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new f.RunOnceScheduler(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new o,this._horizontalRevealRequest=null}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new D.ViewLine(this._viewLineOptions)}onConfigurationChanged(l){this._visibleLines.onConfigurationChanged(l),l.hasChanged(132)&&(this._maxLineWidth=0);const r=this._context.configuration.options,p=r.get(44),u=r.get(132),a=r.get(131);return this._lineHeight=r.get(59),this._typicalHalfwidthCharacterWidth=p.typicalHalfwidthCharacterWidth,this._isViewportWrapping=u.isViewportWrapping,this._revealHorizontalRightPadding=r.get(89),this._horizontalScrollbarHeight=a.horizontalScrollbarHeight,this._cursorSurroundingLines=r.get(25),this._cursorSurroundingLinesStyle=r.get(26),this._canUseLayerHinting=!r.get(28),(0,_.applyFontInfo)(this.domNode,p),this._onOptionsMaybeChanged(),l.hasChanged(131)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const l=this._context.configuration,r=new D.ViewLineOptions(l,this._context.theme.type);if(!this._viewLineOptions.equals(r)){this._viewLineOptions=r;const p=this._visibleLines.getStartLineNumber(),u=this._visibleLines.getEndLineNumber();for(let a=p;a<=u;a++)this._visibleLines.getVisibleLine(a).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(l){const r=this._visibleLines.getStartLineNumber(),p=this._visibleLines.getEndLineNumber();let u=!1;for(let a=r;a<=p;a++)u=this._visibleLines.getVisibleLine(a).onSelectionChanged()||u;return u}onDecorationsChanged(l){{const r=this._visibleLines.getStartLineNumber(),p=this._visibleLines.getEndLineNumber();for(let u=r;u<=p;u++)this._visibleLines.getVisibleLine(u).onDecorationsChanged()}return!0}onFlushed(l){const r=this._visibleLines.onFlushed(l);return this._maxLineWidth=0,r}onLinesChanged(l){return this._visibleLines.onLinesChanged(l)}onLinesDeleted(l){return this._visibleLines.onLinesDeleted(l)}onLinesInserted(l){return this._visibleLines.onLinesInserted(l)}onRevealRangeRequest(l){const r=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),l.source,l.minimalReveal,l.range,l.selections,l.verticalType);if(r===-1)return!1;let p=this._context.viewLayout.validateScrollPosition({scrollTop:r});l.revealHorizontal?l.range&&l.range.startLineNumber!==l.range.endLineNumber?p={scrollTop:p.scrollTop,scrollLeft:0}:l.range?this._horizontalRevealRequest=new c(l.minimalReveal,l.range.startLineNumber,l.range.startColumn,l.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),p.scrollTop,l.scrollType):l.selections&&l.selections.length>0&&(this._horizontalRevealRequest=new i(l.minimalReveal,l.selections,this._context.viewLayout.getCurrentScrollTop(),p.scrollTop,l.scrollType)):this._horizontalRevealRequest=null;const a=Math.abs(this._context.viewLayout.getCurrentScrollTop()-p.scrollTop)<=this._lineHeight?1:l.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(p,a),!0}onScrollChanged(l){if(this._horizontalRevealRequest&&l.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&l.scrollTopChanged){const r=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),p=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(l.scrollTop<r||l.scrollTop>p)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(l.scrollWidth),this._visibleLines.onScrollChanged(l)||!0}onTokensChanged(l){return this._visibleLines.onTokensChanged(l)}onZonesChanged(l){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(l)}onThemeChanged(l){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(l,r){const p=this._getViewLineDomNode(l);if(p===null)return null;const u=this._getLineNumberFor(p);if(u===-1||u<1||u>this._context.viewModel.getLineCount())return null;if(this._context.viewModel.getLineMaxColumn(u)===1)return new I.Position(u,1);const a=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();if(u<a||u>n)return null;let h=this._visibleLines.getVisibleLine(u).getColumnOfNodeOffset(u,l,r);const g=this._context.viewModel.getLineMinColumn(u);return h<g&&(h=g),new I.Position(u,h)}_getViewLineDomNode(l){for(;l&&l.nodeType===1;){if(l.className===D.ViewLine.CLASS_NAME)return l;l=l.parentElement}return null}_getLineNumberFor(l){const r=this._visibleLines.getStartLineNumber(),p=this._visibleLines.getEndLineNumber();for(let u=r;u<=p;u++){const a=this._visibleLines.getVisibleLine(u);if(l===a.getDomNode())return u}return-1}getLineWidth(l){const r=this._visibleLines.getStartLineNumber(),p=this._visibleLines.getEndLineNumber();return l<r||l>p?-1:this._visibleLines.getVisibleLine(l).getWidth()}linesVisibleRangesForRange(l,r){if(this.shouldRender())return null;const p=l.endLineNumber,u=w.Range.intersectRanges(l,this._lastRenderedData.getCurrentVisibleRange());if(!u)return null;let a=[],n=0;const h=new D.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot);let g=0;r&&(g=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new I.Position(u.startLineNumber,1)).lineNumber);const d=this._visibleLines.getStartLineNumber(),m=this._visibleLines.getEndLineNumber();for(let b=u.startLineNumber;b<=u.endLineNumber;b++){if(b<d||b>m)continue;const E=b===u.startLineNumber?u.startColumn:1,y=b===u.endLineNumber?u.endColumn:this._context.viewModel.getLineMaxColumn(b),T=this._visibleLines.getVisibleLine(b).getVisibleRangesForRange(b,E,y,h);if(!!T){if(r&&b<p){const R=g;g=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new I.Position(b+1,1)).lineNumber,R!==g&&(T.ranges[T.ranges.length-1].width+=this._typicalHalfwidthCharacterWidth)}a[n++]=new v.LineVisibleRanges(T.outsideRenderedLine,b,v.HorizontalRange.from(T.ranges))}}return n===0?null:a}_visibleRangesForLineRange(l,r,p){return this.shouldRender()||l<this._visibleLines.getStartLineNumber()||l>this._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(l).getVisibleRangesForRange(l,r,p,new D.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot))}visibleRangeForPosition(l){const r=this._visibleRangesForLineRange(l.lineNumber,l.column,l.column);return r?new v.HorizontalPosition(r.outsideRenderedLine,r.ranges[0].left):null}updateLineWidths(){this._updateLineWidths(!1)}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidths(l){const r=this._visibleLines.getStartLineNumber(),p=this._visibleLines.getEndLineNumber();let u=1,a=!0;for(let n=r;n<=p;n++){const h=this._visibleLines.getVisibleLine(n);if(l&&!h.getWidthIsFast()){a=!1;continue}u=Math.max(u,h.getWidth())}return a&&r===1&&p===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(u),a}_checkMonospaceFontAssumptions(){let l=-1,r=-1;const p=this._visibleLines.getStartLineNumber(),u=this._visibleLines.getEndLineNumber();for(let a=p;a<=u;a++){const n=this._visibleLines.getVisibleLine(a);if(n.needsMonospaceFontCheck()){const h=n.getWidth();h>r&&(r=h,l=a)}}if(l!==-1&&!this._visibleLines.getVisibleLine(l).monospaceAssumptionsAreValid())for(let a=p;a<=u;a++)this._visibleLines.getVisibleLine(a).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(l){if(this._visibleLines.renderLines(l),this._lastRenderedData.setCurrentVisibleRange(l.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const p=this._horizontalRevealRequest;if(l.startLineNumber<=p.minLineNumber&&p.maxLineNumber<=l.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const u=this._computeScrollLeftToReveal(p);u&&(this._isViewportWrapping||this._ensureMaxLineWidth(u.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:u.scrollLeft},p.scrollType))}}if(this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),t.isLinux&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const p=this._visibleLines.getStartLineNumber(),u=this._visibleLines.getEndLineNumber();for(let a=p;a<=u;a++)if(this._visibleLines.getVisibleLine(a).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const r=this._context.viewLayout.getCurrentScrollTop()-l.bigNumbersDelta;this._linesContent.setTop(-r),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(l){const r=Math.ceil(l);this._maxLineWidth<r&&(this._maxLineWidth=r,this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth))}_computeScrollTopToRevealRange(l,r,p,u,a,n){const h=l.top,g=l.height,d=h+g;let m,b,E;if(a&&a.length>0){let R=a[0].startLineNumber,O=a[0].endLineNumber;for(let x=1,F=a.length;x<F;x++){const L=a[x];R=Math.min(R,L.startLineNumber),O=Math.max(O,L.endLineNumber)}m=!1,b=this._context.viewLayout.getVerticalOffsetForLineNumber(R),E=this._context.viewLayout.getVerticalOffsetForLineNumber(O)+this._lineHeight}else if(u)m=!0,b=this._context.viewLayout.getVerticalOffsetForLineNumber(u.startLineNumber),E=this._context.viewLayout.getVerticalOffsetForLineNumber(u.endLineNumber)+this._lineHeight;else return-1;if((r==="mouse"||p)&&this._cursorSurroundingLinesStyle==="default")p||(b-=this._lineHeight);else{const R=Math.min(g/this._lineHeight/2,this._cursorSurroundingLines);b-=R*this._lineHeight,E+=Math.max(0,R-1)*this._lineHeight}(n===0||n===4)&&(E+=p?this._horizontalScrollbarHeight:this._lineHeight);let T;if(E-b>g){if(!m)return-1;T=b}else if(n===5||n===6)if(n===6&&h<=b&&E<=d)T=h;else{const R=Math.max(5*this._lineHeight,g*.2),O=b-R,x=E-g;T=Math.max(x,O)}else if(n===1||n===2)if(n===2&&h<=b&&E<=d)T=h;else{const R=(b+E)/2;T=Math.max(0,R-g/2)}else T=this._computeMinimumScrolling(h,d,b,E,n===3,n===4);return T}_computeScrollLeftToReveal(l){const r=this._context.viewLayout.getCurrentViewport(),p=r.left,u=p+r.width;let a=1073741824,n=0;if(l.type==="range"){const g=this._visibleRangesForLineRange(l.lineNumber,l.startColumn,l.endColumn);if(!g)return null;for(const d of g.ranges)a=Math.min(a,Math.round(d.left)),n=Math.max(n,Math.round(d.left+d.width))}else for(const g of l.selections){if(g.startLineNumber!==g.endLineNumber)return null;const d=this._visibleRangesForLineRange(g.startLineNumber,g.startColumn,g.endColumn);if(!d)return null;for(const m of d.ranges)a=Math.min(a,Math.round(m.left)),n=Math.max(n,Math.round(m.left+m.width))}return l.minimalReveal||(a=Math.max(0,a-S.HORIZONTAL_EXTRA_PX),n+=this._revealHorizontalRightPadding),l.type==="selections"&&n-a>r.width?null:{scrollLeft:this._computeMinimumScrolling(p,u,a,n),maxHorizontalOffset:n}}_computeMinimumScrolling(l,r,p,u,a,n){l=l|0,r=r|0,p=p|0,u=u|0,a=!!a,n=!!n;const h=r-l;if(u-p<h){if(a)return p;if(n)return Math.max(0,u-h);if(p<l)return p;if(u>r)return Math.max(0,u-h)}else return p;return l}}e.ViewLines=S,S.HORIZONTAL_EXTRA_PX=30}),define(ne[68],re([1,0,66,32,127]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.attachDialogStyler=e.defaultDialogStyles=e.attachMenuStyler=e.defaultMenuStyles=e.attachBreadcrumbsStyler=e.defaultBreadcrumbsStyles=e.attachStylerCallback=e.attachProgressBarStyler=e.attachKeybindingLabelStyler=e.attachButtonStyler=e.defaultListStyles=e.attachListStyler=e.attachFindReplaceInputBoxStyler=e.attachSelectBoxStyler=e.attachInputBoxStyler=e.attachBadgeStyler=e.attachToggleStyler=e.attachStyler=e.computeStyles=void 0;function A(u,a){const n=Object.create(null);for(let h in a){const g=a[h];g&&(n[h]=(0,f.resolveColorValue)(g,u))}return n}e.computeStyles=A;function k(u,a,n){function h(){const g=A(u.getColorTheme(),a);typeof n=="function"?n(g):n.style(g)}return h(),u.onDidColorThemeChange(h)}e.attachStyler=k;function D(u,a,n){return k(a,{inputActiveOptionBorder:n?.inputActiveOptionBorderColor||f.inputActiveOptionBorder,inputActiveOptionForeground:n?.inputActiveOptionForegroundColor||f.inputActiveOptionForeground,inputActiveOptionBackground:n?.inputActiveOptionBackgroundColor||f.inputActiveOptionBackground},u)}e.attachToggleStyler=D;function I(u,a,n){return k(a,{badgeBackground:n?.badgeBackground||f.badgeBackground,badgeForeground:n?.badgeForeground||f.badgeForeground,badgeBorder:f.contrastBorder},u)}e.attachBadgeStyler=I;function w(u,a,n){return k(a,{inputBackground:n?.inputBackground||f.inputBackground,inputForeground:n?.inputForeground||f.inputForeground,inputBorder:n?.inputBorder||f.inputBorder,inputValidationInfoBorder:n?.inputValidationInfoBorder||f.inputValidationInfoBorder,inputValidationInfoBackground:n?.inputValidationInfoBackground||f.inputValidationInfoBackground,inputValidationInfoForeground:n?.inputValidationInfoForeground||f.inputValidationInfoForeground,inputValidationWarningBorder:n?.inputValidationWarningBorder||f.inputValidationWarningBorder,inputValidationWarningBackground:n?.inputValidationWarningBackground||f.inputValidationWarningBackground,inputValidationWarningForeground:n?.inputValidationWarningForeground||f.inputValidationWarningForeground,inputValidationErrorBorder:n?.inputValidationErrorBorder||f.inputValidationErrorBorder,inputValidationErrorBackground:n?.inputValidationErrorBackground||f.inputValidationErrorBackground,inputValidationErrorForeground:n?.inputValidationErrorForeground||f.inputValidationErrorForeground},u)}e.attachInputBoxStyler=w;function v(u,a,n){return k(a,{selectBackground:n?.selectBackground||f.selectBackground,selectListBackground:n?.selectListBackground||f.selectListBackground,selectForeground:n?.selectForeground||f.selectForeground,decoratorRightForeground:n?.pickerGroupForeground||f.pickerGroupForeground,selectBorder:n?.selectBorder||f.selectBorder,focusBorder:n?.focusBorder||f.focusBorder,listFocusBackground:n?.listFocusBackground||f.quickInputListFocusBackground,listInactiveSelectionIconForeground:n?.listInactiveSelectionIconForeground||f.quickInputListFocusIconForeground,listFocusForeground:n?.listFocusForeground||f.quickInputListFocusForeground,listFocusOutline:n?.listFocusOutline||(h=>(0,_.isHighContrast)(h.type)?f.activeContrastBorder:t.Color.transparent),listHoverBackground:n?.listHoverBackground||f.listHoverBackground,listHoverForeground:n?.listHoverForeground||f.listHoverForeground,listHoverOutline:n?.listFocusOutline||f.activeContrastBorder,selectListBorder:n?.selectListBorder||f.editorWidgetBorder},u)}e.attachSelectBoxStyler=v;function C(u,a,n){return k(a,{inputBackground:n?.inputBackground||f.inputBackground,inputForeground:n?.inputForeground||f.inputForeground,inputBorder:n?.inputBorder||f.inputBorder,inputActiveOptionBorder:n?.inputActiveOptionBorder||f.inputActiveOptionBorder,inputActiveOptionForeground:n?.inputActiveOptionForeground||f.inputActiveOptionForeground,inputActiveOptionBackground:n?.inputActiveOptionBackground||f.inputActiveOptionBackground,inputValidationInfoBorder:n?.inputValidationInfoBorder||f.inputValidationInfoBorder,inputValidationInfoBackground:n?.inputValidationInfoBackground||f.inputValidationInfoBackground,inputValidationInfoForeground:n?.inputValidationInfoForeground||f.inputValidationInfoForeground,inputValidationWarningBorder:n?.inputValidationWarningBorder||f.inputValidationWarningBorder,inputValidationWarningBackground:n?.inputValidationWarningBackground||f.inputValidationWarningBackground,inputValidationWarningForeground:n?.inputValidationWarningForeground||f.inputValidationWarningForeground,inputValidationErrorBorder:n?.inputValidationErrorBorder||f.inputValidationErrorBorder,inputValidationErrorBackground:n?.inputValidationErrorBackground||f.inputValidationErrorBackground,inputValidationErrorForeground:n?.inputValidationErrorForeground||f.inputValidationErrorForeground},u)}e.attachFindReplaceInputBoxStyler=C;function o(u,a,n){return k(a,{...e.defaultListStyles,...n||{}},u)}e.attachListStyler=o,e.defaultListStyles={listFocusBackground:f.listFocusBackground,listFocusForeground:f.listFocusForeground,listFocusOutline:f.listFocusOutline,listActiveSelectionBackground:f.listActiveSelectionBackground,listActiveSelectionForeground:f.listActiveSelectionForeground,listActiveSelectionIconForeground:f.listActiveSelectionIconForeground,listFocusAndSelectionBackground:f.listActiveSelectionBackground,listFocusAndSelectionForeground:f.listActiveSelectionForeground,listInactiveSelectionBackground:f.listInactiveSelectionBackground,listInactiveSelectionIconForeground:f.listInactiveSelectionIconForeground,listInactiveSelectionForeground:f.listInactiveSelectionForeground,listInactiveFocusBackground:f.listInactiveFocusBackground,listInactiveFocusOutline:f.listInactiveFocusOutline,listHoverBackground:f.listHoverBackground,listHoverForeground:f.listHoverForeground,listDropBackground:f.listDropBackground,listSelectionOutline:f.activeContrastBorder,listHoverOutline:f.activeContrastBorder,listFilterWidgetBackground:f.listFilterWidgetBackground,listFilterWidgetOutline:f.listFilterWidgetOutline,listFilterWidgetNoMatchesOutline:f.listFilterWidgetNoMatchesOutline,listMatchesShadow:f.widgetShadow,treeIndentGuidesStroke:f.treeIndentGuidesStroke,tableColumnsBorder:f.tableColumnsBorder,tableOddRowsBackgroundColor:f.tableOddRowsBackgroundColor};function c(u,a,n){return k(a,{buttonForeground:n?.buttonForeground||f.buttonForeground,buttonBackground:n?.buttonBackground||f.buttonBackground,buttonHoverBackground:n?.buttonHoverBackground||f.buttonHoverBackground,buttonSecondaryForeground:n?.buttonSecondaryForeground||f.buttonSecondaryForeground,buttonSecondaryBackground:n?.buttonSecondaryBackground||f.buttonSecondaryBackground,buttonSecondaryHoverBackground:n?.buttonSecondaryHoverBackground||f.buttonSecondaryHoverBackground,buttonBorder:n?.buttonBorder||f.buttonBorder},u)}e.attachButtonStyler=c;function i(u,a,n){return k(a,{keybindingLabelBackground:n&&n.keybindingLabelBackground||f.keybindingLabelBackground,keybindingLabelForeground:n&&n.keybindingLabelForeground||f.keybindingLabelForeground,keybindingLabelBorder:n&&n.keybindingLabelBorder||f.keybindingLabelBorder,keybindingLabelBottomBorder:n&&n.keybindingLabelBottomBorder||f.keybindingLabelBottomBorder,keybindingLabelShadow:n&&n.keybindingLabelShadow||f.widgetShadow},u)}e.attachKeybindingLabelStyler=i;function S(u,a,n){return k(a,{progressBarBackground:n?.progressBarBackground||f.progressBarBackground},u)}e.attachProgressBarStyler=S;function s(u,a,n){return k(u,a,n)}e.attachStylerCallback=s,e.defaultBreadcrumbsStyles={breadcrumbsBackground:f.breadcrumbsBackground,breadcrumbsForeground:f.breadcrumbsForeground,breadcrumbsHoverForeground:f.breadcrumbsFocusForeground,breadcrumbsFocusForeground:f.breadcrumbsFocusForeground,breadcrumbsFocusAndSelectionForeground:f.breadcrumbsActiveSelectionForeground};function l(u,a,n){return k(a,{...e.defaultBreadcrumbsStyles,...n},u)}e.attachBreadcrumbsStyler=l,e.defaultMenuStyles={shadowColor:f.widgetShadow,borderColor:f.menuBorder,foregroundColor:f.menuForeground,backgroundColor:f.menuBackground,selectionForegroundColor:f.menuSelectionForeground,selectionBackgroundColor:f.menuSelectionBackground,selectionBorderColor:f.menuSelectionBorder,separatorColor:f.menuSeparatorBackground,scrollbarShadow:f.scrollbarShadow,scrollbarSliderBackground:f.scrollbarSliderBackground,scrollbarSliderHoverBackground:f.scrollbarSliderHoverBackground,scrollbarSliderActiveBackground:f.scrollbarSliderActiveBackground};function r(u,a,n){return k(a,{...e.defaultMenuStyles,...n},u)}e.attachMenuStyler=r,e.defaultDialogStyles={dialogBackground:f.editorWidgetBackground,dialogForeground:f.editorWidgetForeground,dialogShadow:f.widgetShadow,dialogBorder:f.contrastBorder,buttonForeground:f.buttonForeground,buttonBackground:f.buttonBackground,buttonSecondaryBackground:f.buttonSecondaryBackground,buttonSecondaryForeground:f.buttonSecondaryForeground,buttonSecondaryHoverBackground:f.buttonSecondaryHoverBackground,buttonHoverBackground:f.buttonHoverBackground,buttonBorder:f.buttonBorder,checkboxBorder:f.checkboxBorder,checkboxBackground:f.checkboxBackground,checkboxForeground:f.checkboxForeground,errorIconForeground:f.problemsErrorIconForeground,warningIconForeground:f.problemsWarningIconForeground,infoIconForeground:f.problemsInfoIconForeground,inputBackground:f.inputBackground,inputForeground:f.inputForeground,inputBorder:f.inputBorder,textLinkForeground:f.textLinkForeground};function p(u,a,n){return k(a,{...e.defaultDialogStyles,...n},u)}e.attachDialogStyler=p}),define(ne[2010],re([1,0,10,137,545,36,22,2,68,1045]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuHandler=void 0;class w{constructor(C,o,c,i,S){this.contextViewService=C,this.telemetryService=o,this.notificationService=c,this.keybindingService=i,this.themeService=S,this.focusToReturn=null,this.block=null,this.options={blockMouse:!0}}configure(C){this.options=C}showContextMenu(C){const o=C.getActions();if(!o.length)return;this.focusToReturn=document.activeElement;let c,i=(0,t.isHTMLElement)(C.domForShadowRoot)?C.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>C.getAnchor(),canRelayout:!1,anchorAlignment:C.anchorAlignment,anchorAxisAlignment:C.anchorAxisAlignment,render:S=>{let s=C.getMenuClassName?C.getMenuClassName():"";s&&(S.className+=" "+s),this.options.blockMouse&&(this.block=S.appendChild((0,t.$)(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",(0,t.addDisposableListener)(this.block,t.EventType.MOUSE_DOWN,p=>p.stopPropagation()));const l=new D.DisposableStore,r=C.actionRunner||new A.ActionRunner;return r.onBeforeRun(this.onActionRun,this,l),r.onDidRun(this.onDidActionRun,this,l),c=new _.Menu(S,o,{actionViewItemProvider:C.getActionViewItem,context:C.getActionsContext?C.getActionsContext():null,actionRunner:r,getKeyBinding:C.getKeyBinding?C.getKeyBinding:p=>this.keybindingService.lookupKeybinding(p.id)}),l.add((0,I.attachMenuStyler)(c,this.themeService)),c.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,l),c.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,l),l.add((0,t.addDisposableListener)(window,t.EventType.BLUR,()=>this.contextViewService.hideContextView(!0))),l.add((0,t.addDisposableListener)(window,t.EventType.MOUSE_DOWN,p=>{if(p.defaultPrevented)return;let u=new f.StandardMouseEvent(p),a=u.target;if(!u.rightButton){for(;a;){if(a===S)return;a=a.parentElement}this.contextViewService.hideContextView(!0)}})),(0,D.combinedDisposable)(l,c)},focus:()=>{c&&c.focus(!!C.autoSelectFirstItem)},onHide:S=>{C.onHide&&C.onHide(!!S),this.block&&(this.block.remove(),this.block=null),this.focusToReturn&&this.focusToReturn.focus()}},i,!!i)}onActionRun(C){this.telemetryService.publicLog2("workbenchActionExecuted",{id:C.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1),this.focusToReturn&&this.focusToReturn.focus()}onDidActionRun(C){C.error&&!(0,k.isCancellationError)(C.error)&&this.notificationService.error(C.error)}}e.ContextMenuHandler=w}),define(ne[12],re([1,0,33,6,2,5,17,127]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Themable=e.registerThemingParticipant=e.Extensions=e.getThemeTypeSelector=e.FolderThemeIcon=e.FileThemeIcon=e.ThemeIcon=e.themeColorFromId=e.ThemeColor=e.IThemeService=void 0,e.IThemeService=(0,A.createDecorator)("themeService");var I;(function(s){function l(r){return r&&typeof r=="object"&&typeof r.id=="string"}s.isThemeColor=l})(I=e.ThemeColor||(e.ThemeColor={}));function w(s){return{id:s}}e.themeColorFromId=w;var v;(function(s){function l(d){return d&&typeof d=="object"&&typeof d.id=="string"&&(typeof d.color=="undefined"||I.isThemeColor(d.color))}s.isThemeIcon=l;const r=new RegExp(`^\\$\\((${t.CSSIcon.iconNameExpression}(?:${t.CSSIcon.iconModifierExpression})?)\\)$`);function p(d){const m=r.exec(d);if(!m)return;let[,b]=m;return{id:b}}s.fromString=p;function u(d){return{id:d}}s.fromId=u;function a(d,m){let b=d.id;const E=b.lastIndexOf("~");return E!==-1&&(b=b.substring(0,E)),m&&(b=`${b}~${m}`),{id:b}}s.modify=a;function n(d){const m=d.id.lastIndexOf("~");if(m!==-1)return d.id.substring(m+1)}s.getModifier=n;function h(d,m){return d.id===m.id&&d.color?.id===m.color?.id}s.isEqual=h;function g(d,m){return{id:d.id,color:m?w(m):void 0}}s.asThemeIcon=g,s.asClassNameArray=t.CSSIcon.asClassNameArray,s.asClassName=t.CSSIcon.asClassName,s.asCSSSelector=t.CSSIcon.asCSSSelector})(v=e.ThemeIcon||(e.ThemeIcon={})),e.FileThemeIcon=t.Codicon.file,e.FolderThemeIcon=t.Codicon.folder;function C(s){switch(s){case D.ColorScheme.DARK:return"vs-dark";case D.ColorScheme.HIGH_CONTRAST_DARK:return"hc-black";case D.ColorScheme.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}e.getThemeTypeSelector=C,e.Extensions={ThemingContribution:"base.contributions.theming"};class o{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new f.Emitter}onColorThemeChange(l){return this.themingParticipants.push(l),this.onThemingParticipantAddedEmitter.fire(l),(0,_.toDisposable)(()=>{const r=this.themingParticipants.indexOf(l);this.themingParticipants.splice(r,1)})}get onThemingParticipantAdded(){return this.onThemingParticipantAddedEmitter.event}getThemingParticipants(){return this.themingParticipants}}let c=new o;k.Registry.add(e.Extensions.ThemingContribution,c);function i(s){return c.onColorThemeChange(s)}e.registerThemingParticipant=i;class S extends _.Disposable{constructor(l){super();this.themeService=l,this.theme=l.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(r=>this.onThemeChange(r)))}onThemeChange(l){this.theme=l,this.updateStyles()}updateStyles(){}getColor(l,r){let p=this.theme.getColor(l);return p&&r&&(p=r(p,this.theme)),p?p.toString():null}}e.Themable=S}),define(ne[746],re([1,0,10,6,2,29,9,306,122,12]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e._CSS_MAP=e.DecorationTypeOptionsProvider=e.DecorationSubTypeOptionsProvider=e.GlobalStyleSheet=e.RefCountedStyleSheet=e.ModelTransientSettingWatcher=e.AbstractCodeEditorService=void 0;let v=class extends _.Disposable{constructor(u){super();this._themeService=u,this._onCodeEditorAdd=this._register(new f.Emitter),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new f.Emitter),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onDiffEditorAdd=this._register(new f.Emitter),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new f.Emitter),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._onDidChangeTransientModelProperty=this._register(new f.Emitter),this.onDidChangeTransientModelProperty=this._onDidChangeTransientModelProperty.event,this._onDecorationTypeRegistered=this._register(new f.Emitter),this.onDecorationTypeRegistered=this._onDecorationTypeRegistered.event,this._decorationOptionProviders=new Map,this._editorStyleSheets=new Map,this._transientWatchers={},this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}addCodeEditor(u){this._codeEditors[u.getId()]=u,this._onCodeEditorAdd.fire(u)}removeCodeEditor(u){delete this._codeEditors[u.getId()]&&this._onCodeEditorRemove.fire(u)}listCodeEditors(){return Object.keys(this._codeEditors).map(u=>this._codeEditors[u])}addDiffEditor(u){this._diffEditors[u.getId()]=u,this._onDiffEditorAdd.fire(u)}removeDiffEditor(u){delete this._diffEditors[u.getId()]&&this._onDiffEditorRemove.fire(u)}listDiffEditors(){return Object.keys(this._diffEditors).map(u=>this._diffEditors[u])}getFocusedCodeEditor(){let u=null;const a=this.listCodeEditors();for(const n of a){if(n.hasTextFocus())return n;n.hasWidgetFocus()&&(u=n)}return u}_getOrCreateGlobalStyleSheet(){return this._globalStyleSheet||(this._globalStyleSheet=this._createGlobalStyleSheet()),this._globalStyleSheet}_createGlobalStyleSheet(){return new c(t.createStyleSheet())}_getOrCreateStyleSheet(u){if(!u)return this._getOrCreateGlobalStyleSheet();const a=u.getContainerDomNode();if(!t.isInShadowDOM(a))return this._getOrCreateGlobalStyleSheet();const n=u.getId();if(!this._editorStyleSheets.has(n)){const h=new o(this,n,t.createStyleSheet(a));this._editorStyleSheets.set(n,h)}return this._editorStyleSheets.get(n)}_removeEditorStyleSheets(u){this._editorStyleSheets.delete(u)}registerDecorationType(u,a,n,h,g){let d=this._decorationOptionProviders.get(a);if(!d){const m=this._getOrCreateStyleSheet(g),b={styleSheet:m,key:a,parentTypeKey:h,options:n||Object.create(null)};h?d=new i(this._themeService,m,b):d=new S(u,this._themeService,m,b),this._decorationOptionProviders.set(a,d),this._onDecorationTypeRegistered.fire(a)}d.refCount++}removeDecorationType(u){const a=this._decorationOptionProviders.get(u);a&&(a.refCount--,a.refCount<=0&&(this._decorationOptionProviders.delete(u),a.dispose(),this.listCodeEditors().forEach(n=>n.removeDecorations(u))))}resolveDecorationOptions(u,a){const n=this._decorationOptionProviders.get(u);if(!n)throw new Error("Unknown decoration type key: "+u);return n.getOptions(this,a)}resolveDecorationCSSRules(u){const a=this._decorationOptionProviders.get(u);return a?a.resolveDecorationCSSRules():null}setModelProperty(u,a,n){const h=u.toString();let g;this._modelProperties.has(h)?g=this._modelProperties.get(h):(g=new Map,this._modelProperties.set(h,g)),g.set(a,n)}getModelProperty(u,a){const n=u.toString();if(this._modelProperties.has(n))return this._modelProperties.get(n).get(a)}setTransientModelProperty(u,a,n){const h=u.uri.toString();let g;this._transientWatchers.hasOwnProperty(h)?g=this._transientWatchers[h]:(g=new C(h,u,this),this._transientWatchers[h]=g),g.set(a,n),this._onDidChangeTransientModelProperty.fire(u)}getTransientModelProperty(u,a){const n=u.uri.toString();if(!!this._transientWatchers.hasOwnProperty(n))return this._transientWatchers[n].get(a)}getTransientModelProperties(u){const a=u.uri.toString();if(!!this._transientWatchers.hasOwnProperty(a))return this._transientWatchers[a].keys().map(n=>[n,this._transientWatchers[a].get(n)])}_removeWatcher(u){delete this._transientWatchers[u.uri]}};v=Ee([W(0,w.IThemeService)],v),e.AbstractCodeEditorService=v;class C{constructor(u,a,n){this.uri=u,this._values={},a.onWillDispose(()=>n._removeWatcher(this))}set(u,a){this._values[u]=a}get(u){return this._values[u]}keys(){return Object.keys(this._values)}}e.ModelTransientSettingWatcher=C;class o{constructor(u,a,n){this._parent=u,this._editorId=a,this._styleSheet=n,this._refCount=0}get sheet(){return this._styleSheet.sheet}ref(){this._refCount++}unref(){this._refCount--,this._refCount===0&&(this._styleSheet.parentNode?.removeChild(this._styleSheet),this._parent._removeEditorStyleSheets(this._editorId))}insertRule(u,a){this._styleSheet.sheet.insertRule(u,a)}removeRulesContainingSelector(u){t.removeCSSRulesContainingSelector(u,this._styleSheet)}}e.RefCountedStyleSheet=o;class c{constructor(u){this._styleSheet=u}get sheet(){return this._styleSheet.sheet}ref(){}unref(){}insertRule(u,a){this._styleSheet.sheet.insertRule(u,a)}removeRulesContainingSelector(u){t.removeCSSRulesContainingSelector(u,this._styleSheet)}}e.GlobalStyleSheet=c;class i{constructor(u,a,n){this._styleSheet=a,this._styleSheet.ref(),this._parentTypeKey=n.parentTypeKey,this.refCount=0,this._beforeContentRules=new s(3,n,u),this._afterContentRules=new s(4,n,u)}getOptions(u,a){const n=u.resolveDecorationOptions(this._parentTypeKey,!0);return this._beforeContentRules&&(n.beforeContentClassName=this._beforeContentRules.className),this._afterContentRules&&(n.afterContentClassName=this._afterContentRules.className),n}resolveDecorationCSSRules(){return this._styleSheet.sheet.cssRules}dispose(){this._beforeContentRules&&(this._beforeContentRules.dispose(),this._beforeContentRules=null),this._afterContentRules&&(this._afterContentRules.dispose(),this._afterContentRules=null),this._styleSheet.unref()}}e.DecorationSubTypeOptionsProvider=i;class S{constructor(u,a,n,h){this._disposables=new _.DisposableStore,this.description=u,this._styleSheet=n,this._styleSheet.ref(),this.refCount=0;const g=T=>{const R=new s(T,h,a);if(this._disposables.add(R),R.hasContent)return R.className},d=T=>{const R=new s(T,h,a);return this._disposables.add(R),R.hasContent?{className:R.className,hasLetterSpacing:R.hasLetterSpacing}:null};this.className=g(0);const m=d(1);if(m&&(this.inlineClassName=m.className,this.inlineClassNameAffectsLetterSpacing=m.hasLetterSpacing),this.beforeContentClassName=g(3),this.afterContentClassName=g(4),h.options.beforeInjectedText&&h.options.beforeInjectedText.contentText){const T=d(5);this.beforeInjectedText={content:h.options.beforeInjectedText.contentText,inlineClassName:T?.className,inlineClassNameAffectsLetterSpacing:T?.hasLetterSpacing||h.options.beforeInjectedText.affectsLetterSpacing}}if(h.options.afterInjectedText&&h.options.afterInjectedText.contentText){const T=d(6);this.afterInjectedText={content:h.options.afterInjectedText.contentText,inlineClassName:T?.className,inlineClassNameAffectsLetterSpacing:T?.hasLetterSpacing||h.options.afterInjectedText.affectsLetterSpacing}}this.glyphMarginClassName=g(2);const b=h.options;this.isWholeLine=Boolean(b.isWholeLine),this.stickiness=b.rangeBehavior;const E=b.light&&b.light.overviewRulerColor||b.overviewRulerColor,y=b.dark&&b.dark.overviewRulerColor||b.overviewRulerColor;(typeof E!="undefined"||typeof y!="undefined")&&(this.overviewRuler={color:E||y,darkColor:y||E,position:b.overviewRulerLane||I.OverviewRulerLane.Center})}getOptions(u,a){return a?{description:this.description,inlineClassName:this.inlineClassName,beforeContentClassName:this.beforeContentClassName,afterContentClassName:this.afterContentClassName,className:this.className,glyphMarginClassName:this.glyphMarginClassName,isWholeLine:this.isWholeLine,overviewRuler:this.overviewRuler,stickiness:this.stickiness,before:this.beforeInjectedText,after:this.afterInjectedText}:this}resolveDecorationCSSRules(){return this._styleSheet.sheet.rules}dispose(){this._disposables.dispose(),this._styleSheet.unref()}}e.DecorationTypeOptionsProvider=S,e._CSS_MAP={color:"color:{0} !important;",opacity:"opacity:{0};",backgroundColor:"background-color:{0};",outline:"outline:{0};",outlineColor:"outline-color:{0};",outlineStyle:"outline-style:{0};",outlineWidth:"outline-width:{0};",border:"border:{0};",borderColor:"border-color:{0};",borderRadius:"border-radius:{0};",borderSpacing:"border-spacing:{0};",borderStyle:"border-style:{0};",borderWidth:"border-width:{0};",fontStyle:"font-style:{0};",fontWeight:"font-weight:{0};",fontSize:"font-size:{0};",fontFamily:"font-family:{0};",textDecoration:"text-decoration:{0};",cursor:"cursor:{0};",letterSpacing:"letter-spacing:{0};",gutterIconPath:"background:{0} center center no-repeat;",gutterIconSize:"background-size:{0};",contentText:"content:'{0}';",contentIconPath:"content:{0};",margin:"margin:{0};",padding:"padding:{0};",width:"width:{0};",height:"height:{0};",verticalAlign:"vertical-align:{0};"};class s{constructor(u,a,n){this._theme=n.getColorTheme(),this._ruleType=u,this._providerArgs=a,this._usesThemeColors=!1,this._hasContent=!1,this._hasLetterSpacing=!1;let h=r.getClassName(this._providerArgs.key,u);this._providerArgs.parentTypeKey&&(h=h+" "+r.getClassName(this._providerArgs.parentTypeKey,u)),this._className=h,this._unThemedSelector=r.getSelector(this._providerArgs.key,this._providerArgs.parentTypeKey,u),this._buildCSS(),this._usesThemeColors?this._themeListener=n.onDidColorThemeChange(g=>{this._theme=n.getColorTheme(),this._removeCSS(),this._buildCSS()}):this._themeListener=null}dispose(){this._hasContent&&(this._removeCSS(),this._hasContent=!1),this._themeListener&&(this._themeListener.dispose(),this._themeListener=null)}get hasContent(){return this._hasContent}get hasLetterSpacing(){return this._hasLetterSpacing}get className(){return this._className}_buildCSS(){const u=this._providerArgs.options;let a,n,h;switch(this._ruleType){case 0:a=this.getCSSTextForModelDecorationClassName(u),n=this.getCSSTextForModelDecorationClassName(u.light),h=this.getCSSTextForModelDecorationClassName(u.dark);break;case 1:a=this.getCSSTextForModelDecorationInlineClassName(u),n=this.getCSSTextForModelDecorationInlineClassName(u.light),h=this.getCSSTextForModelDecorationInlineClassName(u.dark);break;case 2:a=this.getCSSTextForModelDecorationGlyphMarginClassName(u),n=this.getCSSTextForModelDecorationGlyphMarginClassName(u.light),h=this.getCSSTextForModelDecorationGlyphMarginClassName(u.dark);break;case 3:a=this.getCSSTextForModelDecorationContentClassName(u.before),n=this.getCSSTextForModelDecorationContentClassName(u.light&&u.light.before),h=this.getCSSTextForModelDecorationContentClassName(u.dark&&u.dark.before);break;case 4:a=this.getCSSTextForModelDecorationContentClassName(u.after),n=this.getCSSTextForModelDecorationContentClassName(u.light&&u.light.after),h=this.getCSSTextForModelDecorationContentClassName(u.dark&&u.dark.after);break;case 5:a=this.getCSSTextForModelDecorationContentClassName(u.beforeInjectedText),n=this.getCSSTextForModelDecorationContentClassName(u.light&&u.light.beforeInjectedText),h=this.getCSSTextForModelDecorationContentClassName(u.dark&&u.dark.beforeInjectedText);break;case 6:a=this.getCSSTextForModelDecorationContentClassName(u.afterInjectedText),n=this.getCSSTextForModelDecorationContentClassName(u.light&&u.light.afterInjectedText),h=this.getCSSTextForModelDecorationContentClassName(u.dark&&u.dark.afterInjectedText);break;default:throw new Error("Unknown rule type: "+this._ruleType)}const g=this._providerArgs.styleSheet;let d=!1;a.length>0&&(g.insertRule(`${this._unThemedSelector} {${a}}`,0),d=!0),n.length>0&&(g.insertRule(`.vs${this._unThemedSelector}, .hc-light${this._unThemedSelector} {${n}}`,0),d=!0),h.length>0&&(g.insertRule(`.vs-dark${this._unThemedSelector}, .hc-black${this._unThemedSelector} {${h}}`,0),d=!0),this._hasContent=d}_removeCSS(){this._providerArgs.styleSheet.removeRulesContainingSelector(this._unThemedSelector)}getCSSTextForModelDecorationClassName(u){if(!u)return"";const a=[];return this.collectCSSText(u,["backgroundColor"],a),this.collectCSSText(u,["outline","outlineColor","outlineStyle","outlineWidth"],a),this.collectBorderSettingsCSSText(u,a),a.join("")}getCSSTextForModelDecorationInlineClassName(u){if(!u)return"";const a=[];return this.collectCSSText(u,["fontStyle","fontWeight","textDecoration","cursor","color","opacity","letterSpacing"],a),u.letterSpacing&&(this._hasLetterSpacing=!0),a.join("")}getCSSTextForModelDecorationContentClassName(u){if(!u)return"";const a=[];if(typeof u!="undefined"){if(this.collectBorderSettingsCSSText(u,a),typeof u.contentIconPath!="undefined"&&a.push(A.format(e._CSS_MAP.contentIconPath,t.asCSSUrl(k.URI.revive(u.contentIconPath)))),typeof u.contentText=="string"){const h=u.contentText.match(/^.*$/m)[0].replace(/['\\]/g,"\\$&");a.push(A.format(e._CSS_MAP.contentText,h))}this.collectCSSText(u,["verticalAlign","fontStyle","fontWeight","fontSize","fontFamily","textDecoration","color","opacity","backgroundColor","margin","padding"],a),this.collectCSSText(u,["width","height"],a)&&a.push("display:inline-block;")}return a.join("")}getCSSTextForModelDecorationGlyphMarginClassName(u){if(!u)return"";const a=[];return typeof u.gutterIconPath!="undefined"&&(a.push(A.format(e._CSS_MAP.gutterIconPath,t.asCSSUrl(k.URI.revive(u.gutterIconPath)))),typeof u.gutterIconSize!="undefined"&&a.push(A.format(e._CSS_MAP.gutterIconSize,u.gutterIconSize))),a.join("")}collectBorderSettingsCSSText(u,a){return this.collectCSSText(u,["border","borderColor","borderRadius","borderSpacing","borderStyle","borderWidth"],a)?(a.push(A.format("box-sizing: border-box;")),!0):!1}collectCSSText(u,a,n){const h=n.length;for(let g of a){const d=this.resolveValue(u[g]);typeof d=="string"&&n.push(A.format(e._CSS_MAP[g],d))}return n.length!==h}resolveValue(u){if((0,D.isThemeColor)(u)){this._usesThemeColors=!0;const a=this._theme.getColor(u.id);return a?a.toString():"transparent"}return u}}var l;(function(p){p[p.ClassName=0]="ClassName",p[p.InlineClassName=1]="InlineClassName",p[p.GlyphMarginClassName=2]="GlyphMarginClassName",p[p.BeforeContentClassName=3]="BeforeContentClassName",p[p.AfterContentClassName=4]="AfterContentClassName",p[p.BeforeInjectedTextClassName=5]="BeforeInjectedTextClassName",p[p.AfterInjectedTextClassName=6]="AfterInjectedTextClassName"})(l||(l={}));class r{static getClassName(u,a){return"ced-"+u+"-"+a}static getSelector(u,a,n){let h=".monaco-editor ."+this.getClassName(u,n);return a&&(h=h+"."+this.getClassName(a,n)),n===3?h+="::before":n===4&&(h+="::after"),h}}}),define(ne[2011],re([1,0,10,128,139,182,12,32]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorScrollbar=void 0;class I extends A.ViewPart{constructor(v,C,o,c){super(v);const i=this._context.configuration.options,S=i.get(92),s=i.get(67),l=i.get(34),r=i.get(95),p={listenOnDomNode:o.domNode,className:"editor-scrollable "+(0,k.getThemeTypeSelector)(v.theme.type),useShadows:!1,lazyRender:!0,vertical:S.vertical,horizontal:S.horizontal,verticalHasArrows:S.verticalHasArrows,horizontalHasArrows:S.horizontalHasArrows,verticalScrollbarSize:S.verticalScrollbarSize,verticalSliderSize:S.verticalSliderSize,horizontalScrollbarSize:S.horizontalScrollbarSize,horizontalSliderSize:S.horizontalSliderSize,handleMouseWheel:S.handleMouseWheel,alwaysConsumeMouseWheel:S.alwaysConsumeMouseWheel,arrowSize:S.arrowSize,mouseWheelScrollSensitivity:s,fastScrollSensitivity:l,scrollPredominantAxis:r,scrollByPage:S.scrollByPage};this.scrollbar=this._register(new _.SmoothScrollableElement(C.domNode,p,this._context.viewLayout.getScrollable())),A.PartFingerprints.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=(0,f.createFastDomNode)(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const u=(a,n,h)=>{const g={};if(n){const d=a.scrollTop;d&&(g.scrollTop=this._context.viewLayout.getCurrentScrollTop()+d,a.scrollTop=0)}if(h){const d=a.scrollLeft;d&&(g.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+d,a.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(g,1)};this._register(t.addDisposableListener(o.domNode,"scroll",a=>u(o.domNode,!0,!0))),this._register(t.addDisposableListener(C.domNode,"scroll",a=>u(C.domNode,!0,!1))),this._register(t.addDisposableListener(c.domNode,"scroll",a=>u(c.domNode,!0,!1))),this._register(t.addDisposableListener(this.scrollbarDomNode.domNode,"scroll",a=>u(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const v=this._context.configuration.options,C=v.get(131);this.scrollbarDomNode.setLeft(C.contentLeft),v.get(65).side==="right"?this.scrollbarDomNode.setWidth(C.contentWidth+C.minimap.minimapWidth):this.scrollbarDomNode.setWidth(C.contentWidth),this.scrollbarDomNode.setHeight(C.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(v){this.scrollbar.delegateVerticalScrollbarPointerDown(v)}onConfigurationChanged(v){if(v.hasChanged(92)||v.hasChanged(67)||v.hasChanged(34)){const C=this._context.configuration.options,o=C.get(92),c=C.get(67),i=C.get(34),S=C.get(95),s={vertical:o.vertical,horizontal:o.horizontal,verticalScrollbarSize:o.verticalScrollbarSize,horizontalScrollbarSize:o.horizontalScrollbarSize,scrollByPage:o.scrollByPage,handleMouseWheel:o.handleMouseWheel,mouseWheelScrollSensitivity:c,fastScrollSensitivity:i,scrollPredominantAxis:S};this.scrollbar.updateOptions(s)}return v.hasChanged(131)&&this._setLayout(),!0}onScrollChanged(v){return!0}onThemeChanged(v){return this.scrollbar.updateClassName("editor-scrollable "+(0,k.getThemeTypeSelector)(this._context.theme.type)),!0}prepareRender(v){}render(v){this.scrollbar.renderNow()}}e.EditorScrollbar=I,(0,k.registerThemingParticipant)((w,v)=>{const C=w.getColor(D.scrollbarShadow);C&&v.addRule(` .monaco-scrollable-element > .shadow.top { box-shadow: ${C} 0 6px 6px -6px inset; } .monaco-scrollable-element > .shadow.left { box-shadow: ${C} 6px 0 6px -6px inset; } .monaco-scrollable-element > .shadow.top.left { box-shadow: ${C} 6px 6px 6px -6px inset; } `);const o=w.getColor(D.scrollbarSliderBackground);o&&v.addRule(` .monaco-scrollable-element > .scrollbar > .slider { background: ${o}; } `);const c=w.getColor(D.scrollbarSliderHoverBackground);c&&v.addRule(` .monaco-scrollable-element > .scrollbar > .slider:hover { background: ${c}; } `);const i=w.getColor(D.scrollbarSliderActiveBackground);i&&v.addRule(` .monaco-scrollable-element > .scrollbar > .slider.active { background: ${i}; } `)})}),define(ne[2012],re([1,0,10,128,381,2,14,29,524,182,123,20,686,704,259,32,12,84,129,1141,122,150,1013]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Minimap=void 0;const n=140,h=2;class g{constructor(F,L,M){const N=F.options,B=N.get(129),P=N.get(131),V=P.minimap,z=N.get(44),U=N.get(65);this.renderMinimap=V.renderMinimap,this.size=U.size,this.minimapHeightIsEditorHeight=V.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=N.get(94),this.showSlider=U.showSlider,this.pixelRatio=B,this.typicalHalfwidthCharacterWidth=z.typicalHalfwidthCharacterWidth,this.lineHeight=N.get(59),this.minimapLeft=V.minimapLeft,this.minimapWidth=V.minimapWidth,this.minimapHeight=P.height,this.canvasInnerWidth=V.minimapCanvasInnerWidth,this.canvasInnerHeight=V.minimapCanvasInnerHeight,this.canvasOuterWidth=V.minimapCanvasOuterWidth,this.canvasOuterHeight=V.minimapCanvasOuterHeight,this.isSampling=V.minimapIsSampling,this.editorHeight=P.height,this.fontScale=V.minimapScale,this.minimapLineHeight=V.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.charRenderer=(0,a.once)(()=>p.MinimapCharRendererFactory.create(this.fontScale,z.fontFamily)),this.defaultBackgroundColor=M.getColor(2),this.backgroundColor=g._getMinimapBackground(L,this.defaultBackgroundColor),this.foregroundAlpha=g._getMinimapForegroundOpacity(L)}static _getMinimapBackground(F,L){const M=F.getColor(S.minimapBackground);return M?new o.RGBA8(M.rgba.r,M.rgba.g,M.rgba.b,Math.round(255*M.rgba.a)):L}static _getMinimapForegroundOpacity(F){const L=F.getColor(S.minimapForegroundOpacity);return L?o.RGBA8._clamp(Math.round(255*L.rgba.a)):255}equals(F){return this.renderMinimap===F.renderMinimap&&this.size===F.size&&this.minimapHeightIsEditorHeight===F.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===F.scrollBeyondLastLine&&this.showSlider===F.showSlider&&this.pixelRatio===F.pixelRatio&&this.typicalHalfwidthCharacterWidth===F.typicalHalfwidthCharacterWidth&&this.lineHeight===F.lineHeight&&this.minimapLeft===F.minimapLeft&&this.minimapWidth===F.minimapWidth&&this.minimapHeight===F.minimapHeight&&this.canvasInnerWidth===F.canvasInnerWidth&&this.canvasInnerHeight===F.canvasInnerHeight&&this.canvasOuterWidth===F.canvasOuterWidth&&this.canvasOuterHeight===F.canvasOuterHeight&&this.isSampling===F.isSampling&&this.editorHeight===F.editorHeight&&this.fontScale===F.fontScale&&this.minimapLineHeight===F.minimapLineHeight&&this.minimapCharWidth===F.minimapCharWidth&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(F.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(F.backgroundColor)&&this.foregroundAlpha===F.foregroundAlpha}}class d{constructor(F,L,M,N,B,P,V,z){this.scrollTop=F,this.scrollHeight=L,this.sliderNeeded=M,this._computedSliderRatio=N,this.sliderTop=B,this.sliderHeight=P,this.startLineNumber=V,this.endLineNumber=z}getDesiredScrollTopFromDelta(F){return Math.round(this.scrollTop+F/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(F){return Math.round((F-this.sliderHeight/2)/this._computedSliderRatio)}static create(F,L,M,N,B,P,V,z,U,H,K){const G=F.pixelRatio,q=F.minimapLineHeight,Z=Math.floor(F.canvasInnerHeight/q),j=F.lineHeight;if(F.minimapHeightIsEditorHeight){const te=z*F.lineHeight+(F.scrollBeyondLastLine?B-F.lineHeight:0),se=Math.max(1,Math.floor(B*B/te)),ie=Math.max(0,F.minimapHeight-se),ce=ie/(H-B),le=U*ce,ae=ie>0,ue=Math.floor(F.canvasInnerHeight/F.minimapLineHeight);return new d(U,H,ae,ce,le,se,1,Math.min(V,ue))}let X;if(P&&M!==V){const te=M-L+1;X=Math.floor(te*q/G)}else{const te=B/j;X=Math.floor(te*q/G)}let Y;F.scrollBeyondLastLine?Y=(V-1)*q/G:Y=Math.max(0,V*q/G-X),Y=Math.min(F.minimapHeight-X,Y);const $=Y/(H-B),J=U*$;let ee=0;if(F.scrollBeyondLastLine&&(ee=B/j-1),Z>=V+ee){const te=1,se=V,ie=Y>0;return new d(U,H,ie,$,J,X,te,se)}else{let te=Math.max(1,Math.floor(L-J*G/q));K&&K.scrollHeight===H&&(K.scrollTop>U&&(te=Math.min(te,K.startLineNumber)),K.scrollTop<U&&(te=Math.max(te,K.startLineNumber)));const se=Math.min(V,te+Z-1),ie=(U-N)/j,ce=(L-te+ie)*q/G;return new d(U,H,!0,$,ce,X,te,se)}}}class m{constructor(F){this.dy=F}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}m.INVALID=new m(-1);class b{constructor(F,L,M){this.renderedLayout=F,this._imageData=L,this._renderedLines=new I.RenderedLinesCollection(()=>m.INVALID),this._renderedLines._set(F.startLineNumber,M)}linesEquals(F){if(!this.scrollEquals(F))return!1;const M=this._renderedLines._get().lines;for(let N=0,B=M.length;N<B;N++)if(M[N].dy===-1)return!1;return!0}scrollEquals(F){return this.renderedLayout.startLineNumber===F.startLineNumber&&this.renderedLayout.endLineNumber===F.endLineNumber}_get(){const F=this._renderedLines._get();return{imageData:this._imageData,rendLineNumberStart:F.rendLineNumberStart,lines:F.lines}}onLinesChanged(F,L){return this._renderedLines.onLinesChanged(F,L)}onLinesDeleted(F,L){this._renderedLines.onLinesDeleted(F,L)}onLinesInserted(F,L){this._renderedLines.onLinesInserted(F,L)}onTokensChanged(F){return this._renderedLines.onTokensChanged(F)}}class E{constructor(F,L,M,N){this._backgroundFillData=E._createBackgroundFillData(L,M,N),this._buffers=[F.createImageData(L,M),F.createImageData(L,M)],this._lastUsedBuffer=0}getBuffer(){this._lastUsedBuffer=1-this._lastUsedBuffer;const F=this._buffers[this._lastUsedBuffer];return F.data.set(this._backgroundFillData),F}static _createBackgroundFillData(F,L,M){const N=M.r,B=M.g,P=M.b,V=M.a,z=new Uint8ClampedArray(F*L*4);let U=0;for(let H=0;H<L;H++)for(let K=0;K<F;K++)z[U]=N,z[U+1]=B,z[U+2]=P,z[U+3]=V,U+=4;return z}}class y{constructor(F,L){this.samplingRatio=F,this.minimapLines=L}static compute(F,L,M){if(F.renderMinimap===0||!F.isSampling)return[null,[]];const N=F.pixelRatio,B=F.lineHeight,P=F.scrollBeyondLastLine,{minimapLineCount:V}=v.EditorLayoutInfoComputer.computeContainedMinimapLineCount({viewLineCount:L,scrollBeyondLastLine:P,height:F.editorHeight,lineHeight:B,pixelRatio:N}),z=L/V,U=z/2;if(!M||M.minimapLines.length===0){const J=[];if(J[0]=1,V>1){for(let ee=0,te=V-1;ee<te;ee++)J[ee]=Math.round(ee*z+U);J[V-1]=L}return[new y(z,J),[]]}const H=M.minimapLines,K=H.length,G=[];let q=0,Z=0,j=1;const X=10;let Y=[],$=null;for(let J=0;J<V;J++){const ee=Math.max(j,Math.round(J*z)),te=Math.max(ee,Math.round((J+1)*z));for(;q<K&&H[q]<ee;){if(Y.length<X){const ie=q+1+Z;$&&$.type==="deleted"&&$._oldIndex===q-1?$.deleteToLineNumber++:($={type:"deleted",_oldIndex:q,deleteFromLineNumber:ie,deleteToLineNumber:ie},Y.push($)),Z--}q++}let se;if(q<K&&H[q]<=te)se=H[q],q++;else if(J===0?se=1:J+1===V?se=L:se=Math.round(J*z+U),Y.length<X){const ie=q+1+Z;$&&$.type==="inserted"&&$._i===J-1?$.insertToLineNumber++:($={type:"inserted",_i:J,insertFromLineNumber:ie,insertToLineNumber:ie},Y.push($)),Z++}G[J]=se,j=se}if(Y.length<X)for(;q<K;){const J=q+1+Z;$&&$.type==="deleted"&&$._oldIndex===q-1?$.deleteToLineNumber++:($={type:"deleted",_oldIndex:q,deleteFromLineNumber:J,deleteToLineNumber:J},Y.push($)),Z--,q++}else Y=[{type:"flush"}];return[new y(z,G),Y]}modelLineToMinimapLine(F){return Math.min(this.minimapLines.length,Math.max(1,Math.round(F/this.samplingRatio)))}modelLineRangeToMinimapLineRange(F,L){let M=this.modelLineToMinimapLine(F)-1;for(;M>0&&this.minimapLines[M-1]>=F;)M--;let N=this.modelLineToMinimapLine(L)-1;for(;N+1<this.minimapLines.length&&this.minimapLines[N+1]<=L;)N++;if(M===N){const B=this.minimapLines[M];if(B<F||B>L)return null}return[M+1,N+1]}decorationLineRangeToMinimapLineRange(F,L){let M=this.modelLineToMinimapLine(F),N=this.modelLineToMinimapLine(L);return F!==L&&N===M&&(N===this.minimapLines.length?M>1&&M--:N++),[M,N]}onLinesDeleted(F){const L=F.toLineNumber-F.fromLineNumber+1;let M=this.minimapLines.length,N=0;for(let B=this.minimapLines.length-1;B>=0&&!(this.minimapLines[B]<F.fromLineNumber);B--)this.minimapLines[B]<=F.toLineNumber?(this.minimapLines[B]=Math.max(1,F.fromLineNumber-1),M=Math.min(M,B),N=Math.max(N,B)):this.minimapLines[B]-=L;return[M,N]}onLinesInserted(F){const L=F.toLineNumber-F.fromLineNumber+1;for(let M=this.minimapLines.length-1;M>=0&&!(this.minimapLines[M]<F.fromLineNumber);M--)this.minimapLines[M]+=L}}class T extends w.ViewPart{constructor(F){super(F);this.tokensColorTracker=c.MinimapTokensColorTracker.getInstance(),this._selections=[],this._minimapSelections=null,this.options=new g(this._context.configuration,this._context.theme,this.tokensColorTracker);const[L]=y.compute(this.options,this._context.viewModel.getLineCount(),null);this._samplingState=L,this._shouldCheckSampling=!1,this._actual=new R(F.theme,this)}dispose(){this._actual.dispose(),super.dispose()}getDomNode(){return this._actual.getDomNode()}_onOptionsMaybeChanged(){const F=new g(this._context.configuration,this._context.theme,this.tokensColorTracker);return this.options.equals(F)?!1:(this.options=F,this._recreateLineSampling(),this._actual.onDidChangeOptions(),!0)}onConfigurationChanged(F){return this._onOptionsMaybeChanged()}onCursorStateChanged(F){return this._selections=F.selections,this._minimapSelections=null,this._actual.onSelectionChanged()}onDecorationsChanged(F){return F.affectsMinimap?this._actual.onDecorationsChanged():!1}onFlushed(F){return this._samplingState&&(this._shouldCheckSampling=!0),this._actual.onFlushed()}onLinesChanged(F){if(this._samplingState){const L=this._samplingState.modelLineRangeToMinimapLineRange(F.fromLineNumber,F.fromLineNumber+F.count-1);return L?this._actual.onLinesChanged(L[0],L[1]-L[0]+1):!1}else return this._actual.onLinesChanged(F.fromLineNumber,F.count)}onLinesDeleted(F){if(this._samplingState){const[L,M]=this._samplingState.onLinesDeleted(F);return L<=M&&this._actual.onLinesChanged(L+1,M-L+1),this._shouldCheckSampling=!0,!0}else return this._actual.onLinesDeleted(F.fromLineNumber,F.toLineNumber)}onLinesInserted(F){return this._samplingState?(this._samplingState.onLinesInserted(F),this._shouldCheckSampling=!0,!0):this._actual.onLinesInserted(F.fromLineNumber,F.toLineNumber)}onScrollChanged(F){return this._actual.onScrollChanged()}onThemeChanged(F){return this._actual.onThemeChanged(),this._onOptionsMaybeChanged(),!0}onTokensChanged(F){if(this._samplingState){const L=[];for(const M of F.ranges){const N=this._samplingState.modelLineRangeToMinimapLineRange(M.fromLineNumber,M.toLineNumber);N&&L.push({fromLineNumber:N[0],toLineNumber:N[1]})}return L.length?this._actual.onTokensChanged(L):!1}else return this._actual.onTokensChanged(F.ranges)}onTokensColorsChanged(F){return this._onOptionsMaybeChanged(),this._actual.onTokensColorsChanged()}onZonesChanged(F){return this._actual.onZonesChanged()}prepareRender(F){this._shouldCheckSampling&&(this._shouldCheckSampling=!1,this._recreateLineSampling())}render(F){let L=F.visibleRange.startLineNumber,M=F.visibleRange.endLineNumber;this._samplingState&&(L=this._samplingState.modelLineToMinimapLine(L),M=this._samplingState.modelLineToMinimapLine(M));const N={viewportContainsWhitespaceGaps:F.viewportData.whitespaceViewportData.length>0,scrollWidth:F.scrollWidth,scrollHeight:F.scrollHeight,viewportStartLineNumber:L,viewportEndLineNumber:M,viewportStartLineNumberVerticalOffset:F.getVerticalOffsetForLineNumber(L),scrollTop:F.scrollTop,scrollLeft:F.scrollLeft,viewportWidth:F.viewportWidth,viewportHeight:F.viewportHeight};this._actual.render(N)}_recreateLineSampling(){this._minimapSelections=null;const F=Boolean(this._samplingState),[L,M]=y.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=L,F&&this._samplingState)for(const N of M)switch(N.type){case"deleted":this._actual.onLinesDeleted(N.deleteFromLineNumber,N.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(N.insertFromLineNumber,N.insertToLineNumber);break;case"flush":this._actual.onFlushed();break}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(F){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[F-1]):this._context.viewModel.getLineContent(F)}getLineMaxColumn(F){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[F-1]):this._context.viewModel.getLineMaxColumn(F)}getMinimapLinesRenderingData(F,L,M){if(this._samplingState){const N=[];for(let B=0,P=L-F+1;B<P;B++)M[B]?N[B]=this._context.viewModel.getViewLineData(this._samplingState.minimapLines[F+B-1]):N[B]=null;return N}return this._context.viewModel.getMinimapLinesRenderingData(F,L,M).data}getSelections(){if(this._minimapSelections===null)if(this._samplingState){this._minimapSelections=[];for(const F of this._selections){const[L,M]=this._samplingState.decorationLineRangeToMinimapLineRange(F.startLineNumber,F.endLineNumber);this._minimapSelections.push(new l.Selection(L,F.startColumn,M,F.endColumn))}}else this._minimapSelections=this._selections;return this._minimapSelections}getMinimapDecorationsInViewport(F,L){let M;if(this._samplingState){const B=this._samplingState.minimapLines[F-1],P=this._samplingState.minimapLines[L-1];M=new C.Range(B,1,P,this._context.viewModel.getLineMaxColumn(P))}else M=new C.Range(F,1,L,this._context.viewModel.getLineMaxColumn(L));const N=this._context.viewModel.getDecorationsInViewport(M);if(this._samplingState){const B=[];for(const P of N){if(!P.options.minimap)continue;const V=P.range,z=this._samplingState.modelLineToMinimapLine(V.startLineNumber),U=this._samplingState.modelLineToMinimapLine(V.endLineNumber);B.push(new i.ViewModelDecoration(new C.Range(z,V.startColumn,U,V.endColumn),P.options))}return B}return N}getOptions(){return this._context.viewModel.model.getOptions()}revealLineNumber(F){this._samplingState&&(F=this._samplingState.minimapLines[F-1]),this._context.viewModel.revealRange("mouse",!1,new C.Range(F,1,F,1),1,0)}setScrollTop(F){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:F},1)}}e.Minimap=T;class R extends A.Disposable{constructor(F,L){super();this._renderDecorations=!1,this._gestureInProgress=!1,this._theme=F,this._model=L,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(S.minimapSelection),this._domNode=(0,f.createFastDomNode)(document.createElement("div")),w.PartFingerprints.write(this._domNode,8),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=(0,f.createFastDomNode)(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=(0,f.createFastDomNode)(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=(0,f.createFastDomNode)(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=(0,f.createFastDomNode)(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=(0,f.createFastDomNode)(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._pointerDownListener=t.addStandardDisposableListener(this._domNode.domNode,t.EventType.POINTER_DOWN,M=>{if(M.preventDefault(),this._model.options.renderMinimap===0||!this._lastRenderData)return;if(this._model.options.size!=="proportional"){if(M.button===0&&this._lastRenderData){const U=t.getDomNodePagePosition(this._slider.domNode),H=U.top+U.height/2;this._startSliderDragging(M,H,this._lastRenderData.renderedLayout)}return}const B=this._model.options.minimapLineHeight,P=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*M.offsetY;let z=Math.floor(P/B)+this._lastRenderData.renderedLayout.startLineNumber;z=Math.min(z,this._model.getLineCount()),this._model.revealLineNumber(z)}),this._sliderPointerMoveMonitor=new _.GlobalPointerMoveMonitor,this._sliderPointerDownListener=t.addStandardDisposableListener(this._slider.domNode,t.EventType.POINTER_DOWN,M=>{M.preventDefault(),M.stopPropagation(),M.button===0&&this._lastRenderData&&this._startSliderDragging(M,M.pageY,this._lastRenderData.renderedLayout)}),this._gestureDisposable=r.Gesture.addTarget(this._domNode.domNode),this._sliderTouchStartListener=t.addDisposableListener(this._domNode.domNode,r.EventType.Start,M=>{M.preventDefault(),M.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(M))},{passive:!1}),this._sliderTouchMoveListener=t.addDisposableListener(this._domNode.domNode,r.EventType.Change,M=>{M.preventDefault(),M.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(M)},{passive:!1}),this._sliderTouchEndListener=t.addStandardDisposableListener(this._domNode.domNode,r.EventType.End,M=>{M.preventDefault(),M.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(F,L,M){if(!F.target||!(F.target instanceof Element))return;const N=F.pageX;this._slider.toggleClassName("active",!0);const B=(P,V)=>{const z=Math.abs(V-N);if(k.isWindows&&z>n){this._model.setScrollTop(M.scrollTop);return}const U=P-L;this._model.setScrollTop(M.getDesiredScrollTopFromDelta(U))};F.pageY!==L&&B(F.pageY,N),this._sliderPointerMoveMonitor.startMonitoring(F.target,F.pointerId,F.buttons,_.standardPointerMoveMerger,P=>B(P.pageY,P.pageX),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(F){const L=this._domNode.domNode.getBoundingClientRect().top,M=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(F.pageY-L);this._model.setScrollTop(M)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){return this._model.options.showSlider==="always"?"minimap slider-always":"minimap slider-mouseover"}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new E(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(F,L){return this._lastRenderData?this._lastRenderData.onLinesChanged(F,L):!1}onLinesDeleted(F,L){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(F,L),!0}onLinesInserted(F,L){return this._lastRenderData&&this._lastRenderData.onLinesInserted(F,L),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(S.minimapSelection),this._renderDecorations=!0,!0}onTokensChanged(F){return this._lastRenderData?this._lastRenderData.onTokensChanged(F):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(F){if(this._model.options.renderMinimap===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}F.scrollLeft+F.viewportWidth>=F.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const M=d.create(this._model.options,F.viewportStartLineNumber,F.viewportEndLineNumber,F.viewportStartLineNumberVerticalOffset,F.viewportHeight,F.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),F.scrollTop,F.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(M.sliderNeeded?"block":"none"),this._slider.setTop(M.sliderTop),this._slider.setHeight(M.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(M.sliderHeight),this.renderDecorations(M),this._lastRenderData=this.renderLines(M)}renderDecorations(F){if(this._renderDecorations){this._renderDecorations=!1;const L=this._model.getSelections();L.sort(C.Range.compareRangesUsingStarts);const M=this._model.getMinimapDecorationsInViewport(F.startLineNumber,F.endLineNumber);M.sort((G,q)=>(G.options.zIndex||0)-(q.options.zIndex||0));const{canvasInnerWidth:N,canvasInnerHeight:B}=this._model.options,P=this._model.options.minimapLineHeight,V=this._model.options.minimapCharWidth,z=this._model.getOptions().tabSize,U=this._decorationsCanvas.domNode.getContext("2d");U.clearRect(0,0,N,B);const H=new O(F.startLineNumber,F.endLineNumber,!1);this._renderSelectionLineHighlights(U,L,H,F,P),this._renderDecorationsLineHighlights(U,M,H,F,P);const K=new O(F.startLineNumber,F.endLineNumber,null);this._renderSelectionsHighlights(U,L,K,F,P,z,V,N),this._renderDecorationsHighlights(U,M,K,F,P,z,V,N)}}_renderSelectionLineHighlights(F,L,M,N,B){if(!this._selectionColor||this._selectionColor.isTransparent())return;F.fillStyle=this._selectionColor.transparent(.5).toString();let P=0,V=0;for(const z of L){const U=Math.max(N.startLineNumber,z.startLineNumber),H=Math.min(N.endLineNumber,z.endLineNumber);if(U>H)continue;for(let q=U;q<=H;q++)M.set(q,!0);const K=(U-N.startLineNumber)*B,G=(H-N.startLineNumber)*B+B;V>=K||(V>P&&F.fillRect(v.MINIMAP_GUTTER_WIDTH,P,F.canvas.width,V-P),P=K),V=G}V>P&&F.fillRect(v.MINIMAP_GUTTER_WIDTH,P,F.canvas.width,V-P)}_renderDecorationsLineHighlights(F,L,M,N,B){const P=new Map;for(let V=L.length-1;V>=0;V--){const z=L[V],U=z.options.minimap;if(!U||U.position!==u.MinimapPosition.Inline)continue;const H=Math.max(N.startLineNumber,z.range.startLineNumber),K=Math.min(N.endLineNumber,z.range.endLineNumber);if(H>K)continue;const G=U.getColor(this._theme.value);if(!G||G.isTransparent())continue;let q=P.get(G.toString());q||(q=G.transparent(.5).toString(),P.set(G.toString(),q)),F.fillStyle=q;for(let Z=H;Z<=K;Z++){if(M.has(Z))continue;M.set(Z,!0);const j=(H-N.startLineNumber)*B;F.fillRect(v.MINIMAP_GUTTER_WIDTH,j,F.canvas.width,B)}}}_renderSelectionsHighlights(F,L,M,N,B,P,V,z){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(const U of L){const H=Math.max(N.startLineNumber,U.startLineNumber),K=Math.min(N.endLineNumber,U.endLineNumber);if(!(H>K))for(let G=H;G<=K;G++)this.renderDecorationOnLine(F,M,U,this._selectionColor,N,G,B,B,P,V,z)}}_renderDecorationsHighlights(F,L,M,N,B,P,V,z){for(const U of L){const H=U.options.minimap;if(!H)continue;const K=Math.max(N.startLineNumber,U.range.startLineNumber),G=Math.min(N.endLineNumber,U.range.endLineNumber);if(K>G)continue;const q=H.getColor(this._theme.value);if(!(!q||q.isTransparent()))for(let Z=K;Z<=G;Z++)switch(H.position){case u.MinimapPosition.Inline:this.renderDecorationOnLine(F,M,U.range,q,N,Z,B,B,P,V,z);continue;case u.MinimapPosition.Gutter:{const j=(Z-N.startLineNumber)*B,X=2;this.renderDecoration(F,q,X,j,h,B);continue}}}}renderDecorationOnLine(F,L,M,N,B,P,V,z,U,H,K){const G=(P-B.startLineNumber)*z;if(G+V<0||G>this._model.options.canvasInnerHeight)return;const{startLineNumber:q,endLineNumber:Z}=M,j=q===P?M.startColumn:1,X=Z===P?M.endColumn:this._model.getLineMaxColumn(P),Y=this.getXOffsetForPosition(L,P,j,U,H,K),$=this.getXOffsetForPosition(L,P,X,U,H,K);this.renderDecoration(F,N,Y,G,$-Y,V)}getXOffsetForPosition(F,L,M,N,B,P){if(M===1)return v.MINIMAP_GUTTER_WIDTH;if((M-1)*B>=P)return P;let z=F.get(L);if(!z){const U=this._model.getLineContent(L);z=[v.MINIMAP_GUTTER_WIDTH];let H=v.MINIMAP_GUTTER_WIDTH;for(let K=1;K<U.length+1;K++){const G=U.charCodeAt(K-1),q=G===9?N*B:D.isFullWidthCharacter(G)?2*B:B,Z=H+q;if(Z>=P){z[K]=P;break}z[K]=Z,H=Z}F.set(L,z)}return M-1<z.length?z[M-1]:P}renderDecoration(F,L,M,N,B,P){F.fillStyle=L&&L.toString()||"",F.fillRect(M,N,B,P)}renderLines(F){const L=F.startLineNumber,M=F.endLineNumber,N=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(F)){const me=this._lastRenderData._get();return new b(F,me.imageData,me.lines)}const B=this._getBuffer();if(!B)return null;const[P,V,z]=R._renderUntouchedLines(B,L,M,N,this._lastRenderData),U=this._model.getMinimapLinesRenderingData(L,M,z),H=this._model.getOptions().tabSize,K=this._model.options.defaultBackgroundColor,G=this._model.options.backgroundColor,q=this._model.options.foregroundAlpha,Z=this._model.tokensColorTracker,j=Z.backgroundIsLight(),X=this._model.options.renderMinimap,Y=this._model.options.charRenderer(),$=this._model.options.fontScale,J=this._model.options.minimapCharWidth,te=(X===1?2:2+1)*$,se=N>te?Math.floor((N-te)/2):0,ie=G.a/255,ce=new o.RGBA8(Math.round((G.r-K.r)*ie+K.r),Math.round((G.g-K.g)*ie+K.g),Math.round((G.b-K.b)*ie+K.b),255);let le=0;const ae=[];for(let me=0,be=M-L+1;me<be;me++)z[me]&&R._renderLine(B,ce,G.a,j,X,J,Z,q,Y,le,se,H,U[me],$,N),ae[me]=new m(le),le+=N;const ue=P===-1?0:P,fe=(V===-1?B.height:V)-ue;return this._canvas.domNode.getContext("2d").putImageData(B,0,0,0,ue,B.width,fe),new b(F,B,ae)}static _renderUntouchedLines(F,L,M,N,B){const P=[];if(!B){for(let ce=0,le=M-L+1;ce<le;ce++)P[ce]=!0;return[-1,-1,P]}const V=B._get(),z=V.imageData.data,U=V.rendLineNumberStart,H=V.lines,K=H.length,G=F.width,q=F.data,Z=(M-L+1)*N*G*4;let j=-1,X=-1,Y=-1,$=-1,J=-1,ee=-1,te=0;for(let ce=L;ce<=M;ce++){const le=ce-L,ae=ce-U,ue=ae>=0&&ae<K?H[ae].dy:-1;if(ue===-1){P[le]=!0,te+=N;continue}const oe=ue*G*4,fe=(ue+N)*G*4,pe=te*G*4,me=(te+N)*G*4;$===oe&&ee===pe?($=fe,ee=me):(Y!==-1&&(q.set(z.subarray(Y,$),J),j===-1&&Y===0&&Y===J&&(j=$),X===-1&&$===Z&&Y===J&&(X=Y)),Y=oe,$=fe,J=pe,ee=me),P[le]=!1,te+=N}Y!==-1&&(q.set(z.subarray(Y,$),J),j===-1&&Y===0&&Y===J&&(j=$),X===-1&&$===Z&&Y===J&&(X=Y));const se=j===-1?-1:j/(G*4),ie=X===-1?-1:X/(G*4);return[se,ie,P]}static _renderLine(F,L,M,N,B,P,V,z,U,H,K,G,q,Z,j){const X=q.content,Y=q.tokens,$=F.width-P,J=j===1;let ee=v.MINIMAP_GUTTER_WIDTH,te=0,se=0;for(let ie=0,ce=Y.getCount();ie<ce;ie++){const le=Y.getEndOffset(ie),ae=Y.getForeground(ie),ue=V.getColor(ae);for(;te<le;te++){if(ee>$)return;const oe=X.charCodeAt(te);if(oe===9){const fe=G-(te+se)%G;se+=fe-1,ee+=fe*P}else if(oe===32)ee+=P;else{const fe=D.isFullWidthCharacter(oe)?2:1;for(let pe=0;pe<fe;pe++)if(B===2?U.blockRenderChar(F,ee,H+K,ue,z,L,M,J):U.renderChar(F,ee,H+K,oe,ue,z,L,M,Z,N,J),ee+=P,ee>$)return}}}}}class O{constructor(F,L,M){this._startLineNumber=F,this._endLineNumber=L,this._defaultValue=M,this._values=[];for(let N=0,B=this._endLineNumber-this._startLineNumber+1;N<B;N++)this._values[N]=M}has(F){return this.get(F)!==this._defaultValue}set(F,L){F<this._startLineNumber||F>this._endLineNumber||(this._values[F-this._startLineNumber]=L)}get(F){return F<this._startLineNumber||F>this._endLineNumber?this._defaultValue:this._values[F-this._startLineNumber]}}(0,s.registerThemingParticipant)((x,F)=>{const L=x.getColor(S.minimapSliderBackground);L&&F.addRule(`.monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${L}; }`);const M=x.getColor(S.minimapSliderHoverBackground);M&&F.addRule(`.monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${M}; }`);const N=x.getColor(S.minimapSliderActiveBackground);N&&F.addRule(`.monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${N}; }`);const B=x.getColor(S.scrollbarShadow);B&&F.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${B} -6px 0 6px -6px inset; }`)})}),define(ne[2013],re([1,0,128,182,32,12,1016]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollDecorationViewPart=void 0;class k extends f.ViewPart{constructor(I){super(I);this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const v=this._context.configuration.options.get(92);this._useShadows=v.useShadows,this._domNode=(0,t.createFastDomNode)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const I=this._useShadows&&this._scrollTop>0;return this._shouldShow!==I?(this._shouldShow=I,!0):!1}getDomNode(){return this._domNode}_updateWidth(){const w=this._context.configuration.options.get(131);w.minimap.renderMinimap===0||w.minimap.minimapWidth>0&&w.minimap.minimapLeft===0?this._width=w.width:this._width=w.width-w.minimap.minimapWidth-w.verticalScrollbarWidth}onConfigurationChanged(I){const v=this._context.configuration.options.get(92);return this._useShadows=v.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(I){return this._scrollTop=I.scrollTop,this._updateShouldShow()}prepareRender(I){}render(I){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}e.ScrollDecorationViewPart=k,(0,A.registerThemingParticipant)((D,I)=>{const w=D.getColor(_.scrollbarShadow);w&&I.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${w} 0 6px 6px -6px inset; }`)})}),define(ne[2014],re([1,0,346,32,12,1017]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionsOverlay=void 0;var A;(function(o){o[o.EXTERN=0]="EXTERN",o[o.INTERN=1]="INTERN",o[o.FLAT=2]="FLAT"})(A||(A={}));class k{constructor(c){this.left=c.left,this.width=c.width,this.startStyle=null,this.endStyle=null}}class D{constructor(c,i){this.lineNumber=c,this.ranges=i}}function I(o){return new k(o)}function w(o){return new D(o.lineNumber,o.ranges.map(I))}class v extends t.DynamicViewOverlay{constructor(c){super();this._previousFrameVisibleRangesWithStyle=[],this._context=c;const i=this._context.configuration.options;this._lineHeight=i.get(59),this._roundedSelection=i.get(90),this._typicalHalfwidthCharacterWidth=i.get(44).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(c){const i=this._context.configuration.options;return this._lineHeight=i.get(59),this._roundedSelection=i.get(90),this._typicalHalfwidthCharacterWidth=i.get(44).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(c){return this._selections=c.selections.slice(0),!0}onDecorationsChanged(c){return!0}onFlushed(c){return!0}onLinesChanged(c){return!0}onLinesDeleted(c){return!0}onLinesInserted(c){return!0}onScrollChanged(c){return c.scrollTopChanged}onZonesChanged(c){return!0}_visibleRangesHaveGaps(c){for(let i=0,S=c.length;i<S;i++)if(c[i].ranges.length>1)return!0;return!1}_enrichVisibleRangesWithStyle(c,i,S){const s=this._typicalHalfwidthCharacterWidth/4;let l=null,r=null;if(S&&S.length>0&&i.length>0){const p=i[0].lineNumber;if(p===c.startLineNumber)for(let a=0;!l&&a<S.length;a++)S[a].lineNumber===p&&(l=S[a].ranges[0]);const u=i[i.length-1].lineNumber;if(u===c.endLineNumber)for(let a=S.length-1;!r&&a>=0;a--)S[a].lineNumber===u&&(r=S[a].ranges[0]);l&&!l.startStyle&&(l=null),r&&!r.startStyle&&(r=null)}for(let p=0,u=i.length;p<u;p++){const a=i[p].ranges[0],n=a.left,h=a.left+a.width,g={top:0,bottom:0},d={top:0,bottom:0};if(p>0){const m=i[p-1].ranges[0].left,b=i[p-1].ranges[0].left+i[p-1].ranges[0].width;C(n-m)<s?g.top=2:n>m&&(g.top=1),C(h-b)<s?d.top=2:m<h&&h<b&&(d.top=1)}else l&&(g.top=l.startStyle.top,d.top=l.endStyle.top);if(p+1<u){const m=i[p+1].ranges[0].left,b=i[p+1].ranges[0].left+i[p+1].ranges[0].width;C(n-m)<s?g.bottom=2:m<n&&n<b&&(g.bottom=1),C(h-b)<s?d.bottom=2:h<b&&(d.bottom=1)}else r&&(g.bottom=r.startStyle.bottom,d.bottom=r.endStyle.bottom);a.startStyle=g,a.endStyle=d}}_getVisibleRangesWithStyle(c,i,S){const l=(i.linesVisibleRangesForRange(c,!0)||[]).map(w);return!this._visibleRangesHaveGaps(l)&&this._roundedSelection&&this._enrichVisibleRangesWithStyle(i.visibleRange,l,S),l}_createSelectionPiece(c,i,S,s,l){return'<div class="cslr '+S+'" style="top:'+c.toString()+"px;left:"+s.toString()+"px;width:"+l.toString()+"px;height:"+i+'px;"></div>'}_actualRenderOneSelection(c,i,S,s){if(s.length===0)return;const l=!!s[0].ranges[0].startStyle,r=this._lineHeight.toString(),p=(this._lineHeight-1).toString(),u=s[0].lineNumber,a=s[s.length-1].lineNumber;for(let n=0,h=s.length;n<h;n++){const g=s[n],d=g.lineNumber,m=d-i,b=S&&(d===a||d===u)?p:r,E=S&&d===u?1:0;let y="",T="";for(let R=0,O=g.ranges.length;R<O;R++){const x=g.ranges[R];if(l){const L=x.startStyle,M=x.endStyle;if(L.top===1||L.bottom===1){y+=this._createSelectionPiece(E,b,v.SELECTION_CLASS_NAME,x.left-v.ROUNDED_PIECE_WIDTH,v.ROUNDED_PIECE_WIDTH);let N=v.EDITOR_BACKGROUND_CLASS_NAME;L.top===1&&(N+=" "+v.SELECTION_TOP_RIGHT),L.bottom===1&&(N+=" "+v.SELECTION_BOTTOM_RIGHT),y+=this._createSelectionPiece(E,b,N,x.left-v.ROUNDED_PIECE_WIDTH,v.ROUNDED_PIECE_WIDTH)}if(M.top===1||M.bottom===1){y+=this._createSelectionPiece(E,b,v.SELECTION_CLASS_NAME,x.left+x.width,v.ROUNDED_PIECE_WIDTH);let N=v.EDITOR_BACKGROUND_CLASS_NAME;M.top===1&&(N+=" "+v.SELECTION_TOP_LEFT),M.bottom===1&&(N+=" "+v.SELECTION_BOTTOM_LEFT),y+=this._createSelectionPiece(E,b,N,x.left+x.width,v.ROUNDED_PIECE_WIDTH)}}let F=v.SELECTION_CLASS_NAME;if(l){const L=x.startStyle,M=x.endStyle;L.top===0&&(F+=" "+v.SELECTION_TOP_LEFT),L.bottom===0&&(F+=" "+v.SELECTION_BOTTOM_LEFT),M.top===0&&(F+=" "+v.SELECTION_TOP_RIGHT),M.bottom===0&&(F+=" "+v.SELECTION_BOTTOM_RIGHT)}T+=this._createSelectionPiece(E,b,F,x.left,x.width)}c[m][0]+=y,c[m][1]+=T}}prepareRender(c){const i=[],S=c.visibleRange.startLineNumber,s=c.visibleRange.endLineNumber;for(let r=S;r<=s;r++){const p=r-S;i[p]=["",""]}const l=[];for(let r=0,p=this._selections.length;r<p;r++){const u=this._selections[r];if(u.isEmpty()){l[r]=null;continue}const a=this._getVisibleRangesWithStyle(u,c,this._previousFrameVisibleRangesWithStyle[r]);l[r]=a,this._actualRenderOneSelection(i,S,this._selections.length>1,a)}this._previousFrameVisibleRangesWithStyle=l,this._renderResult=i.map(([r,p])=>r+p)}render(c,i){if(!this._renderResult)return"";const S=i-c;return S<0||S>=this._renderResult.length?"":this._renderResult[S]}}e.SelectionsOverlay=v,v.SELECTION_CLASS_NAME="selected-text",v.SELECTION_TOP_LEFT="top-left-radius",v.SELECTION_BOTTOM_LEFT="bottom-left-radius",v.SELECTION_TOP_RIGHT="top-right-radius",v.SELECTION_BOTTOM_RIGHT="bottom-right-radius",v.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",v.ROUNDED_PIECE_WIDTH=10,(0,_.registerThemingParticipant)((o,c)=>{const i=o.getColor(f.editorSelectionBackground);i&&c.addRule(`.monaco-editor .focused .selected-text { background-color: ${i}; }`);const S=o.getColor(f.editorInactiveSelection);S&&c.addRule(`.monaco-editor .selected-text { background-color: ${S}; }`);const s=o.getColor(f.editorSelectionForeground);s&&!s.isTransparent()&&c.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${s}; }`)});function C(o){return o<0?-o:o}}),define(ne[164],re([1,0,1246,66,32,12,127]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.editorUnicodeHighlightBackground=e.editorUnicodeHighlightBorder=e.editorBracketPairGuideActiveBackground6=e.editorBracketPairGuideActiveBackground5=e.editorBracketPairGuideActiveBackground4=e.editorBracketPairGuideActiveBackground3=e.editorBracketPairGuideActiveBackground2=e.editorBracketPairGuideActiveBackground1=e.editorBracketPairGuideBackground6=e.editorBracketPairGuideBackground5=e.editorBracketPairGuideBackground4=e.editorBracketPairGuideBackground3=e.editorBracketPairGuideBackground2=e.editorBracketPairGuideBackground1=e.editorBracketHighlightingUnexpectedBracketForeground=e.editorBracketHighlightingForeground6=e.editorBracketHighlightingForeground5=e.editorBracketHighlightingForeground4=e.editorBracketHighlightingForeground3=e.editorBracketHighlightingForeground2=e.editorBracketHighlightingForeground1=e.overviewRulerInfo=e.overviewRulerWarning=e.overviewRulerError=e.overviewRulerRangeHighlight=e.ghostTextBackground=e.ghostTextForeground=e.ghostTextBorder=e.editorUnnecessaryCodeOpacity=e.editorUnnecessaryCodeBorder=e.editorGutter=e.editorOverviewRulerBackground=e.editorOverviewRulerBorder=e.editorBracketMatchBorder=e.editorBracketMatchBackground=e.editorCodeLensForeground=e.editorRuler=e.editorActiveLineNumber=e.editorLineNumbers=e.editorActiveIndentGuides=e.editorIndentGuides=e.editorWhitespaces=e.editorCursorBackground=e.editorCursorForeground=e.editorSymbolHighlightBorder=e.editorSymbolHighlight=e.editorRangeHighlightBorder=e.editorRangeHighlight=e.editorLineHighlightBorder=e.editorLineHighlight=void 0,e.editorLineHighlight=(0,_.registerColor)("editor.lineHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},t.localize(0,null)),e.editorLineHighlightBorder=(0,_.registerColor)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:_.contrastBorder},t.localize(1,null)),e.editorRangeHighlight=(0,_.registerColor)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},t.localize(2,null),!0),e.editorRangeHighlightBorder=(0,_.registerColor)("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:_.activeContrastBorder,hcLight:_.activeContrastBorder},t.localize(3,null),!0),e.editorSymbolHighlight=(0,_.registerColor)("editor.symbolHighlightBackground",{dark:_.editorFindMatchHighlight,light:_.editorFindMatchHighlight,hcDark:null,hcLight:null},t.localize(4,null),!0),e.editorSymbolHighlightBorder=(0,_.registerColor)("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:_.activeContrastBorder,hcLight:_.activeContrastBorder},t.localize(5,null),!0),e.editorCursorForeground=(0,_.registerColor)("editorCursor.foreground",{dark:"#AEAFAD",light:f.Color.black,hcDark:f.Color.white,hcLight:"#0F4A85"},t.localize(6,null)),e.editorCursorBackground=(0,_.registerColor)("editorCursor.background",null,t.localize(7,null)),e.editorWhitespaces=(0,_.registerColor)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},t.localize(8,null)),e.editorIndentGuides=(0,_.registerColor)("editorIndentGuide.background",{dark:e.editorWhitespaces,light:e.editorWhitespaces,hcDark:e.editorWhitespaces,hcLight:e.editorWhitespaces},t.localize(9,null)),e.editorActiveIndentGuides=(0,_.registerColor)("editorIndentGuide.activeBackground",{dark:e.editorWhitespaces,light:e.editorWhitespaces,hcDark:e.editorWhitespaces,hcLight:e.editorWhitespaces},t.localize(10,null)),e.editorLineNumbers=(0,_.registerColor)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:f.Color.white,hcLight:"#292929"},t.localize(11,null));const D=(0,_.registerColor)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:_.activeContrastBorder,hcLight:_.activeContrastBorder},t.localize(12,null),!1,t.localize(13,null));e.editorActiveLineNumber=(0,_.registerColor)("editorLineNumber.activeForeground",{dark:D,light:D,hcDark:D,hcLight:D},t.localize(14,null)),e.editorRuler=(0,_.registerColor)("editorRuler.foreground",{dark:"#5A5A5A",light:f.Color.lightgrey,hcDark:f.Color.white,hcLight:"#292929"},t.localize(15,null)),e.editorCodeLensForeground=(0,_.registerColor)("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},t.localize(16,null)),e.editorBracketMatchBackground=(0,_.registerColor)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},t.localize(17,null)),e.editorBracketMatchBorder=(0,_.registerColor)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:_.contrastBorder,hcLight:_.contrastBorder},t.localize(18,null)),e.editorOverviewRulerBorder=(0,_.registerColor)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},t.localize(19,null)),e.editorOverviewRulerBackground=(0,_.registerColor)("editorOverviewRuler.background",null,t.localize(20,null)),e.editorGutter=(0,_.registerColor)("editorGutter.background",{dark:_.editorBackground,light:_.editorBackground,hcDark:_.editorBackground,hcLight:_.editorBackground},t.localize(21,null)),e.editorUnnecessaryCodeBorder=(0,_.registerColor)("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:f.Color.fromHex("#fff").transparent(.8),hcLight:_.contrastBorder},t.localize(22,null)),e.editorUnnecessaryCodeOpacity=(0,_.registerColor)("editorUnnecessaryCode.opacity",{dark:f.Color.fromHex("#000a"),light:f.Color.fromHex("#0007"),hcDark:null,hcLight:null},t.localize(23,null)),e.ghostTextBorder=(0,_.registerColor)("editorGhostText.border",{dark:null,light:null,hcDark:f.Color.fromHex("#fff").transparent(.8),hcLight:f.Color.fromHex("#292929").transparent(.8)},t.localize(24,null)),e.ghostTextForeground=(0,_.registerColor)("editorGhostText.foreground",{dark:f.Color.fromHex("#ffffff56"),light:f.Color.fromHex("#0007"),hcDark:null,hcLight:null},t.localize(25,null)),e.ghostTextBackground=(0,_.registerColor)("editorGhostText.background",{dark:null,light:null,hcDark:null,hcLight:null},t.localize(26,null));const I=new f.Color(new f.RGBA(0,122,204,.6));e.overviewRulerRangeHighlight=(0,_.registerColor)("editorOverviewRuler.rangeHighlightForeground",{dark:I,light:I,hcDark:I,hcLight:I},t.localize(27,null),!0),e.overviewRulerError=(0,_.registerColor)("editorOverviewRuler.errorForeground",{dark:new f.Color(new f.RGBA(255,18,18,.7)),light:new f.Color(new f.RGBA(255,18,18,.7)),hcDark:new f.Color(new f.RGBA(255,50,50,1)),hcLight:"#B5200D"},t.localize(28,null)),e.overviewRulerWarning=(0,_.registerColor)("editorOverviewRuler.warningForeground",{dark:_.editorWarningForeground,light:_.editorWarningForeground,hcDark:_.editorWarningBorder,hcLight:_.editorWarningBorder},t.localize(29,null)),e.overviewRulerInfo=(0,_.registerColor)("editorOverviewRuler.infoForeground",{dark:_.editorInfoForeground,light:_.editorInfoForeground,hcDark:_.editorInfoBorder,hcLight:_.editorInfoBorder},t.localize(30,null)),e.editorBracketHighlightingForeground1=(0,_.registerColor)("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},t.localize(31,null)),e.editorBracketHighlightingForeground2=(0,_.registerColor)("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},t.localize(32,null)),e.editorBracketHighlightingForeground3=(0,_.registerColor)("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},t.localize(33,null)),e.editorBracketHighlightingForeground4=(0,_.registerColor)("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(34,null)),e.editorBracketHighlightingForeground5=(0,_.registerColor)("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(35,null)),e.editorBracketHighlightingForeground6=(0,_.registerColor)("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(36,null)),e.editorBracketHighlightingUnexpectedBracketForeground=(0,_.registerColor)("editorBracketHighlight.unexpectedBracket.foreground",{dark:new f.Color(new f.RGBA(255,18,18,.8)),light:new f.Color(new f.RGBA(255,18,18,.8)),hcDark:new f.Color(new f.RGBA(255,50,50,1)),hcLight:""},t.localize(37,null)),e.editorBracketPairGuideBackground1=(0,_.registerColor)("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(38,null)),e.editorBracketPairGuideBackground2=(0,_.registerColor)("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(39,null)),e.editorBracketPairGuideBackground3=(0,_.registerColor)("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(40,null)),e.editorBracketPairGuideBackground4=(0,_.registerColor)("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(41,null)),e.editorBracketPairGuideBackground5=(0,_.registerColor)("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(42,null)),e.editorBracketPairGuideBackground6=(0,_.registerColor)("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(43,null)),e.editorBracketPairGuideActiveBackground1=(0,_.registerColor)("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(44,null)),e.editorBracketPairGuideActiveBackground2=(0,_.registerColor)("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(45,null)),e.editorBracketPairGuideActiveBackground3=(0,_.registerColor)("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(46,null)),e.editorBracketPairGuideActiveBackground4=(0,_.registerColor)("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(47,null)),e.editorBracketPairGuideActiveBackground5=(0,_.registerColor)("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(48,null)),e.editorBracketPairGuideActiveBackground6=(0,_.registerColor)("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(49,null)),e.editorUnicodeHighlightBorder=(0,_.registerColor)("editorUnicodeHighlight.border",{dark:"#BD9B03",light:"#CEA33D",hcDark:"#ff0000",hcLight:""},t.localize(50,null)),e.editorUnicodeHighlightBackground=(0,_.registerColor)("editorUnicodeHighlight.background",{dark:"#bd9b0326",light:"#cea33d14",hcDark:"#00000000",hcLight:""},t.localize(51,null)),(0,A.registerThemingParticipant)((w,v)=>{const C=w.getColor(_.editorBackground);C&&v.addRule(`.monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ${C}; }`);const o=w.getColor(_.editorForeground);o&&v.addRule(`.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${o}; }`);const c=w.getColor(e.editorGutter);c&&v.addRule(`.monaco-editor .margin { background-color: ${c}; }`);const i=w.getColor(e.editorRangeHighlight);i&&v.addRule(`.monaco-editor .rangeHighlight { background-color: ${i}; }`);const S=w.getColor(e.editorRangeHighlightBorder);S&&v.addRule(`.monaco-editor .rangeHighlight { border: 1px ${(0,k.isHighContrast)(w.type)?"dotted":"solid"} ${S}; }`);const s=w.getColor(e.editorSymbolHighlight);s&&v.addRule(`.monaco-editor .symbolHighlight { background-color: ${s}; }`);const l=w.getColor(e.editorSymbolHighlightBorder);l&&v.addRule(`.monaco-editor .symbolHighlight { border: 1px ${(0,k.isHighContrast)(w.type)?"dotted":"solid"} ${l}; }`);const r=w.getColor(e.editorWhitespaces);r&&(v.addRule(`.monaco-editor .mtkw { color: ${r} !important; }`),v.addRule(`.monaco-editor .mtkz { color: ${r} !important; }`))})}),define(ne[2015],re([1,0,346,164,15,12,84,127,1005]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CurrentLineMarginHighlightOverlay=e.CurrentLineHighlightOverlay=e.AbstractLineHighlightOverlay=void 0;class I extends t.DynamicViewOverlay{constructor(o){super();this._context=o;const c=this._context.configuration.options,i=c.get(131);this._lineHeight=c.get(59),this._renderLineHighlight=c.get(85),this._renderLineHighlightOnlyWhenFocus=c.get(86),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new k.Selection(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let o=!1;const c=this._selections.map(S=>S.positionLineNumber);c.sort((S,s)=>S-s),_.equals(this._cursorLineNumbers,c)||(this._cursorLineNumbers=c,o=!0);const i=this._selections.every(S=>S.isEmpty());return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,o=!0),o}onThemeChanged(o){return this._readFromSelections()}onConfigurationChanged(o){const c=this._context.configuration.options,i=c.get(131);return this._lineHeight=c.get(59),this._renderLineHighlight=c.get(85),this._renderLineHighlightOnlyWhenFocus=c.get(86),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,!0}onCursorStateChanged(o){return this._selections=o.selections,this._readFromSelections()}onFlushed(o){return!0}onLinesDeleted(o){return!0}onLinesInserted(o){return!0}onScrollChanged(o){return o.scrollWidthChanged||o.scrollTopChanged}onZonesChanged(o){return!0}onFocusChanged(o){return this._renderLineHighlightOnlyWhenFocus?(this._focused=o.isFocused,!0):!1}prepareRender(o){if(!this._shouldRenderThis()){this._renderData=null;return}const c=this._renderOne(o),i=o.visibleRange.startLineNumber,S=o.visibleRange.endLineNumber,s=this._cursorLineNumbers.length;let l=0;const r=[];for(let p=i;p<=S;p++){const u=p-i;for(;l<s&&this._cursorLineNumbers[l]<p;)l++;l<s&&this._cursorLineNumbers[l]===p?r[u]=c:r[u]=""}this._renderData=r}render(o,c){if(!this._renderData)return"";const i=c-o;return i>=this._renderData.length?"":this._renderData[i]}_shouldRenderInMargin(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}e.AbstractLineHighlightOverlay=I;class w extends I{_renderOne(o){return`<div class="${"current-line"+(this._shouldRenderOther()?" current-line-both":"")}" style="width:${Math.max(o.scrollWidth,this._contentWidth)}px; height:${this._lineHeight}px;"></div>`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}e.CurrentLineHighlightOverlay=w;class v extends I{_renderOne(o){return`<div class="${"current-line"+(this._shouldRenderInMargin()?" current-line-margin":"")+(this._shouldRenderOther()?" current-line-margin-both":"")}" style="width:${this._contentLeft}px; height:${this._lineHeight}px;"></div>`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}e.CurrentLineMarginHighlightOverlay=v,(0,A.registerThemingParticipant)((C,o)=>{const c=C.getColor(f.editorLineHighlight);if(c&&(o.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${c}; }`),o.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${c}; border: none; }`)),!c||c.isTransparent()||C.defines(f.editorLineHighlightBorder)){const i=C.getColor(f.editorLineHighlightBorder);i&&(o.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${i}; }`),o.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${i}; }`),(0,D.isHighContrast)(C.type)&&(o.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),o.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}})}),define(ne[2016],re([1,0,346,164,12,49,15,13,699,531,1008]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentGuidesOverlay=void 0;class v extends t.DynamicViewOverlay{constructor(c){super();this._context=c,this._primaryPosition=null;const i=this._context.configuration.options,S=i.get(132),s=i.get(44);this._lineHeight=i.get(59),this._spaceWidth=s.spaceWidth,this._maxIndentLeft=S.wrappingColumn===-1?-1:S.wrappingColumn*s.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=i.get(13),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(c){const i=this._context.configuration.options,S=i.get(132),s=i.get(44);return this._lineHeight=i.get(59),this._spaceWidth=s.spaceWidth,this._maxIndentLeft=S.wrappingColumn===-1?-1:S.wrappingColumn*s.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=i.get(13),!0}onCursorStateChanged(c){const S=c.selections[0].getPosition();return this._primaryPosition?.equals(S)?!1:(this._primaryPosition=S,!0)}onDecorationsChanged(c){return!0}onFlushed(c){return!0}onLinesChanged(c){return!0}onLinesDeleted(c){return!0}onLinesInserted(c){return!0}onScrollChanged(c){return c.scrollTopChanged}onZonesChanged(c){return!0}onLanguageConfigurationChanged(c){return!0}prepareRender(c){if(!this._bracketPairGuideOptions.indentation&&this._bracketPairGuideOptions.bracketPairs===!1){this._renderResult=null;return}const i=c.visibleRange.startLineNumber,S=c.visibleRange.endLineNumber,s=c.scrollWidth,l=this._lineHeight,r=this._primaryPosition,p=this.getGuidesByLine(i,S,r),u=[];for(let a=i;a<=S;a++){const n=a-i,h=p[n];let g="";const d=c.visibleRangeForPosition(new A.Position(a,1))?.left??0;for(const m of h){const b=d+(m.visibleColumn-1)*this._spaceWidth;if(b>s||this._maxIndentLeft>0&&b>this._maxIndentLeft)break;const E=m.horizontalLine?m.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",y=m.horizontalLine?(c.visibleRangeForPosition(new A.Position(a,m.horizontalLine.endColumn))?.left??b+this._spaceWidth)-b:this._spaceWidth;g+=`<div class="core-guide ${m.className} ${E}" style="left:${b}px;height:${l}px;width:${y}px"></div>`}u[n]=g}this._renderResult=u}getGuidesByLine(c,i,S){const s=this._bracketPairGuideOptions.bracketPairs!==!1?this._context.viewModel.getBracketGuidesInRangeByLine(c,i,S,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:this._bracketPairGuideOptions.bracketPairsHorizontal===!0?w.HorizontalGuidesState.Enabled:this._bracketPairGuideOptions.bracketPairsHorizontal==="active"?w.HorizontalGuidesState.EnabledForActive:w.HorizontalGuidesState.Disabled,includeInactive:this._bracketPairGuideOptions.bracketPairs===!0}):null,l=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(c,i):null;let r=0,p=0,u=0;if(this._bracketPairGuideOptions.highlightActiveIndentation&&S){const h=this._context.viewModel.getActiveIndentGuide(S.lineNumber,c,i);r=h.startLineNumber,p=h.endLineNumber,u=h.indent}const{indentSize:a}=this._context.viewModel.model.getOptions(),n=[];for(let h=c;h<=i;h++){const g=new Array;n.push(g);const d=s?s[h-c]:[],m=new k.ArrayQueue(d),b=l?l[h-c]:[];for(let E=1;E<=b;E++){const y=(E-1)*a+1,T=d.length===0&&r<=h&&h<=p&&E===u;g.push(...m.takeWhile(O=>O.visibleColumn<y)||[]);const R=m.peek();(!R||R.visibleColumn!==y||R.horizontalLine)&&g.push(new w.IndentGuide(y,T?"core-guide-indent-active":"core-guide-indent",null))}g.push(...m.takeWhile(E=>!0)||[])}return n}render(c,i){if(!this._renderResult)return"";const S=i-c;return S<0||S>=this._renderResult.length?"":this._renderResult[S]}}e.IndentGuidesOverlay=v;function C(o){if(!(o&&o.isTransparent()))return o}(0,_.registerThemingParticipant)((o,c)=>{const i=o.getColor(f.editorIndentGuides);i&&c.addRule(`.monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 ${i} inset; }`);const S=o.getColor(f.editorActiveIndentGuides)||i;S&&c.addRule(`.monaco-editor .lines-content .core-guide-indent-active { box-shadow: 1px 0 0 0 ${S} inset; }`);const s=[{bracketColor:f.editorBracketHighlightingForeground1,guideColor:f.editorBracketPairGuideBackground1,guideColorActive:f.editorBracketPairGuideActiveBackground1},{bracketColor:f.editorBracketHighlightingForeground2,guideColor:f.editorBracketPairGuideBackground2,guideColorActive:f.editorBracketPairGuideActiveBackground2},{bracketColor:f.editorBracketHighlightingForeground3,guideColor:f.editorBracketPairGuideBackground3,guideColorActive:f.editorBracketPairGuideActiveBackground3},{bracketColor:f.editorBracketHighlightingForeground4,guideColor:f.editorBracketPairGuideBackground4,guideColorActive:f.editorBracketPairGuideActiveBackground4},{bracketColor:f.editorBracketHighlightingForeground5,guideColor:f.editorBracketPairGuideBackground5,guideColorActive:f.editorBracketPairGuideActiveBackground5},{bracketColor:f.editorBracketHighlightingForeground6,guideColor:f.editorBracketPairGuideBackground6,guideColorActive:f.editorBracketPairGuideActiveBackground6}],l=new I.BracketPairGuidesClassNames,r=s.map(p=>{const u=o.getColor(p.bracketColor),a=o.getColor(p.guideColor),n=o.getColor(p.guideColorActive),h=C(C(a)??u?.transparent(.3)),g=C(C(n)??u);if(!(!h||!g))return{guideColor:h,guideColorActive:g}}).filter(D.isDefined);if(r.length>0){for(let p=0;p<30;p++){const u=r[p%r.length];c.addRule(`.monaco-editor .${l.getInlineClassNameOfLevel(p).replace(/ /g,".")} { --guide-color: ${u.guideColor}; --guide-color-active: ${u.guideColorActive}; }`)}c.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),c.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),c.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),c.addRule(`.monaco-editor .vertical.${l.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),c.addRule(`.monaco-editor .horizontal-top.${l.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),c.addRule(`.monaco-editor .horizontal-bottom.${l.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}})}),define(ne[747],re([1,0,14,346,49,164,12,1009]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineNumbersOverlay=void 0;class D extends f.DynamicViewOverlay{constructor(w){super();this._context=w,this._readConfig(),this._lastCursorModelPosition=new _.Position(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const w=this._context.configuration.options;this._lineHeight=w.get(59);const v=w.get(60);this._renderLineNumbers=v.renderType,this._renderCustomLineNumbers=v.renderFn,this._renderFinalNewline=w.get(84);const C=w.get(131);this._lineNumbersLeft=C.lineNumbersLeft,this._lineNumbersWidth=C.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(w){return this._readConfig(),!0}onCursorStateChanged(w){const v=w.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(v);let C=!1;return this._activeLineNumber!==v.lineNumber&&(this._activeLineNumber=v.lineNumber,C=!0),(this._renderLineNumbers===2||this._renderLineNumbers===3)&&(C=!0),C}onFlushed(w){return!0}onLinesChanged(w){return!0}onLinesDeleted(w){return!0}onLinesInserted(w){return!0}onScrollChanged(w){return w.scrollTopChanged}onZonesChanged(w){return!0}_getLineRenderLineNumber(w){const v=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new _.Position(w,1));if(v.column!==1)return"";const C=v.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(C);if(this._renderLineNumbers===2){const o=Math.abs(this._lastCursorModelPosition.lineNumber-C);return o===0?'<span class="relative-current-line-number">'+C+"</span>":String(o)}return this._renderLineNumbers===3?this._lastCursorModelPosition.lineNumber===C||C%10==0?String(C):"":String(C)}prepareRender(w){if(this._renderLineNumbers===0){this._renderResult=null;return}const v=t.isLinux?this._lineHeight%2==0?" lh-even":" lh-odd":"",C=w.visibleRange.startLineNumber,o=w.visibleRange.endLineNumber,c='<div class="'+D.CLASS_NAME+v+'" style="left:'+this._lineNumbersLeft+"px;width:"+this._lineNumbersWidth+'px;">',i=this._context.viewModel.getLineCount(),S=[];for(let s=C;s<=o;s++){const l=s-C;if(!this._renderFinalNewline&&s===i&&this._context.viewModel.getLineLength(s)===0){S[l]="";continue}const r=this._getLineRenderLineNumber(s);r?s===this._activeLineNumber?S[l]='<div class="active-line-number '+D.CLASS_NAME+v+'" style="left:'+this._lineNumbersLeft+"px;width:"+this._lineNumbersWidth+'px;">'+r+"</div>":S[l]=c+r+"</div>":S[l]=""}this._renderResult=S}render(w,v){if(!this._renderResult)return"";const C=v-w;return C<0||C>=this._renderResult.length?"":this._renderResult[C]}}e.LineNumbersOverlay=D,D.CLASS_NAME="line-numbers",(0,k.registerThemingParticipant)((I,w)=>{const v=I.getColor(A.editorLineNumbers);v&&w.addRule(`.monaco-editor .line-numbers { color: ${v}; }`);const C=I.getColor(A.editorActiveLineNumber);C&&w.addRule(`.monaco-editor .line-numbers.active-line-number { color: ${C}; }`)})}),define(ne[2017],re([1,0,1232,77,128,14,29,227,523,683,182,747,703,123,385,49,20,84,304,86,66,1004]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextAreaHandler=void 0;class a{constructor(m,b,E,y,T){this._context=m,this.modelLineNumber=b,this.distanceToModelLineStart=E,this.widthOfHiddenLineTextBefore=y,this.distanceToModelLineEnd=T,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(m){const b=new S.Position(this.modelLineNumber,this.distanceToModelLineStart+1),E=new S.Position(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(b),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(E),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=m.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=m.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(m){return this._previousPresentation||(m?this._previousPresentation=m:this._previousPresentation={foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}}const n=f.isFirefox;class h extends v.ViewPart{constructor(m,b,E){super(m);this._primaryCursorPosition=new S.Position(1,1),this._primaryCursorVisibleRange=null,this._viewController=b,this._visibleRangeProvider=E,this._scrollLeft=0,this._scrollTop=0;const y=this._context.configuration.options,T=y.get(131);this._setAccessibilityOptions(y),this._contentLeft=T.contentLeft,this._contentWidth=T.contentWidth,this._contentHeight=T.height,this._fontInfo=y.get(44),this._lineHeight=y.get(59),this._emptySelectionClipboard=y.get(32),this._copyWithSyntaxHighlighting=y.get(21),this._visibleTextArea=null,this._selections=[new l.Selection(1,1,1,1)],this._modelSelections=[new l.Selection(1,1,1,1)],this._lastRenderPosition=null,this.textArea=(0,_.createFastDomNode)(document.createElement("textarea")),v.PartFingerprints.write(this.textArea,6),this.textArea.setClassName(`inputarea ${r.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),this.textArea.setAttribute("wrap","off"),this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(y)),this.textArea.setAttribute("tabindex",String(y.get(112))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",t.localize(0,null)),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),y.get(30)&&y.get(81)&&this.textArea.setAttribute("readonly","true"),this.textAreaCover=(0,_.createFastDomNode)(document.createElement("div")),this.textAreaCover.setPosition("absolute");const R={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:F=>this._context.viewModel.getLineMaxColumn(F),getValueInRange:(F,L)=>this._context.viewModel.getValueInRange(F,L)},O={getDataToCopy:()=>{const F=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,A.isWindows),L=this._context.viewModel.model.getEOL(),M=this._emptySelectionClipboard&&this._modelSelections.length===1&&this._modelSelections[0].isEmpty(),N=Array.isArray(F)?F:null,B=Array.isArray(F)?F.join(L):F;let P,V=null;if(I.CopyOptions.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&B.length<65536){const z=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);z&&(P=z.html,V=z.mode)}return{isFromEmptySelection:M,multicursorText:N,text:B,html:P,mode:V}},getScreenReaderContent:F=>{if(this._accessibilitySupport===1){if(A.isMacintosh){const L=this._selections[0];if(L.isEmpty()){const M=L.getStartPosition();let N=this._getWordBeforePosition(M);if(N.length===0&&(N=this._getCharacterBeforePosition(M)),N.length>0)return new w.TextAreaState(N,N.length,N.length,M,M)}}return w.TextAreaState.EMPTY}if(f.isAndroid){const L=this._selections[0];if(L.isEmpty()){const M=L.getStartPosition(),[N,B]=this._getAndroidWordAtPosition(M);if(N.length>0)return new w.TextAreaState(N,B,B,M,M)}return w.TextAreaState.EMPTY}return w.PagedScreenReaderStrategy.fromEditorSelection(F,R,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0)},deduceModelPosition:(F,L,M)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(F,L,M)},x=this._register(new I.TextAreaWrapper(this.textArea.domNode));this._textAreaInput=this._register(new I.TextAreaInput(O,x,A.OS,f)),this._register(this._textAreaInput.onKeyDown(F=>{this._viewController.emitKeyDown(F)})),this._register(this._textAreaInput.onKeyUp(F=>{this._viewController.emitKeyUp(F)})),this._register(this._textAreaInput.onPaste(F=>{let L=!1,M=null,N=null;F.metadata&&(L=this._emptySelectionClipboard&&!!F.metadata.isFromEmptySelection,M=typeof F.metadata.multicursorText!="undefined"?F.metadata.multicursorText:null,N=F.metadata.mode),this._viewController.paste(F.text,L,M,N)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(F=>{F.replacePrevCharCnt||F.replaceNextCharCnt||F.positionDelta?(w._debugComposition&&console.log(` => compositionType: <<${F.text}>>, ${F.replacePrevCharCnt}, ${F.replaceNextCharCnt}, ${F.positionDelta}`),this._viewController.compositionType(F.text,F.replacePrevCharCnt,F.replaceNextCharCnt,F.positionDelta)):(w._debugComposition&&console.log(` => type: <<${F.text}>>`),this._viewController.type(F.text))})),this._register(this._textAreaInput.onSelectionChangeRequest(F=>{this._viewController.setSelection(F)})),this._register(this._textAreaInput.onCompositionStart(F=>{const L=this.textArea.domNode,M=this._modelSelections[0],{distanceToModelLineStart:N,widthOfHiddenTextBefore:B}=(()=>{const V=L.value.substring(0,Math.min(L.selectionStart,L.selectionEnd)),z=V.lastIndexOf(` `),U=V.substring(z+1),H=U.lastIndexOf(" "),K=U.length-H-1,G=M.getStartPosition(),q=Math.min(G.column-1,K),Z=G.column-1-q,j=U.substring(0,U.length-q),X=g(j,this._fontInfo);return{distanceToModelLineStart:Z,widthOfHiddenTextBefore:X}})(),{distanceToModelLineEnd:P}=(()=>{const V=L.value.substring(Math.max(L.selectionStart,L.selectionEnd)),z=V.indexOf(` `),U=z===-1?V:V.substring(0,z),H=U.indexOf(" "),K=H===-1?U.length:U.length-H-1,G=M.getEndPosition(),q=Math.min(this._context.viewModel.model.getLineMaxColumn(G.lineNumber)-G.column,K);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(G.lineNumber)-G.column-q}})();this._context.viewModel.revealRange("keyboard",!0,s.Range.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new a(this._context,M.startLineNumber,N,B,P),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${r.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(F=>{!this._visibleTextArea||(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this._render(),this.textArea.setClassName(`inputarea ${r.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.viewModel.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.viewModel.setHasFocus(!1)}))}dispose(){super.dispose()}_getAndroidWordAtPosition(m){const b='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',E=this._context.viewModel.getLineContent(m.lineNumber),y=(0,i.getMapForWordSeparators)(b);let T=!0,R=m.column,O=!0,x=m.column,F=0;for(;F<50&&(T||O);){if(T&&R<=1&&(T=!1),T){const L=E.charCodeAt(R-2);y.get(L)!==0?T=!1:R--}if(O&&x>E.length&&(O=!1),O){const L=E.charCodeAt(x-1);y.get(L)!==0?O=!1:x++}F++}return[E.substring(R-1,x-1),m.column-R]}_getWordBeforePosition(m){const b=this._context.viewModel.getLineContent(m.lineNumber),E=(0,i.getMapForWordSeparators)(this._context.configuration.options.get(117));let y=m.column,T=0;for(;y>1;){const R=b.charCodeAt(y-2);if(E.get(R)!==0||T>50)return b.substring(y-1,m.column-1);T++,y--}return b.substring(0,m.column-1)}_getCharacterBeforePosition(m){if(m.column>1){const E=this._context.viewModel.getLineContent(m.lineNumber).charAt(m.column-2);if(!k.isHighSurrogate(E.charCodeAt(0)))return E}return""}_getAriaLabel(m){return m.get(2)===1?t.localize(1,null,A.isLinux?"Shift+Alt+F1":"Alt+F1"):m.get(4)}_setAccessibilityOptions(m){this._accessibilitySupport=m.get(2);const b=m.get(3);this._accessibilitySupport===2&&b===c.EditorOptions.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=b}onConfigurationChanged(m){const b=this._context.configuration.options,E=b.get(131);return this._setAccessibilityOptions(b),this._contentLeft=E.contentLeft,this._contentWidth=E.contentWidth,this._contentHeight=E.height,this._fontInfo=b.get(44),this._lineHeight=b.get(59),this._emptySelectionClipboard=b.get(32),this._copyWithSyntaxHighlighting=b.get(21),this.textArea.setAttribute("aria-label",this._getAriaLabel(b)),this.textArea.setAttribute("tabindex",String(b.get(112))),(m.hasChanged(30)||m.hasChanged(81))&&(b.get(30)&&b.get(81)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")),m.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(m){return this._selections=m.selections.slice(0),this._modelSelections=m.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(m){return!0}onFlushed(m){return!0}onLinesChanged(m){return!0}onLinesDeleted(m){return!0}onLinesInserted(m){return!0}onScrollChanged(m){return this._scrollLeft=m.scrollLeft,this._scrollTop=m.scrollTop,!0}onZonesChanged(m){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}refreshFocusState(){this._textAreaInput.refreshFocusState()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(m){m.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",m.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),m.role&&this.textArea.setAttribute("role",m.role)}prepareRender(m){this._primaryCursorPosition=new S.Position(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=m.visibleRangeForPosition(this._primaryCursorPosition),this._visibleTextArea&&this._visibleTextArea.prepareRender(m)}render(m){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){if(this._visibleTextArea){const E=this._visibleTextArea.visibleTextareaStart,y=this._visibleTextArea.visibleTextareaEnd,T=this._visibleTextArea.startPosition,R=this._visibleTextArea.endPosition;if(T&&R&&E&&y&&y.left>=this._scrollLeft&&E.left<=this._scrollLeft+this._contentWidth){const O=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,x=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));let F=this._visibleTextArea.widthOfHiddenLineTextBefore,L=this._contentLeft+E.left-this._scrollLeft,M=y.left-E.left+1;if(L<this._contentLeft){const U=this._contentLeft-L;L+=U,F+=U,M-=U}M>this._contentWidth&&(M=this._contentWidth);const N=this._context.viewModel.getViewLineData(T.lineNumber),B=N.tokens.findTokenIndexAtOffset(T.column-1),P=N.tokens.findTokenIndexAtOffset(R.column-1),V=B===P,z=this._visibleTextArea.definePresentation(V?N.tokens.getPresentation(B):null);this.textArea.domNode.scrollTop=x*this._lineHeight,this.textArea.domNode.scrollLeft=F,this._doRender({lastRenderPosition:null,top:O,left:L,width:M,height:this._lineHeight,useCover:!1,color:(p.TokenizationRegistry.getColorMap()||[])[z.foreground],italic:z.italic,bold:z.bold,underline:z.underline,strikethrough:z.strikethrough})}return}if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}const m=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(m<this._contentLeft||m>this._contentLeft+this._contentWidth){this._renderAtTopLeft();return}const b=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(b<0||b>this._contentHeight){this._renderAtTopLeft();return}if(A.isMacintosh){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:b,left:m,width:n?0:1,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const E=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=E*this._lineHeight;return}this._doRender({lastRenderPosition:this._primaryCursorPosition,top:b,left:m,width:n?0:1,height:n?0:1,useCover:!1})}_newlinecount(m){let b=0,E=-1;do{if(E=m.indexOf(` `,E+1),E===-1)break;b++}while(!0);return b}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:n?0:1,height:n?0:1,useCover:!0})}_doRender(m){this._lastRenderPosition=m.lastRenderPosition;const b=this.textArea,E=this.textAreaCover;(0,D.applyFontInfo)(b,this._fontInfo),b.setTop(m.top),b.setLeft(m.left),b.setWidth(m.width),b.setHeight(m.height),b.setColor(m.color?u.Color.Format.CSS.formatHex(m.color):""),b.setFontStyle(m.italic?"italic":""),m.bold&&b.setFontWeight("bold"),b.setTextDecoration(`${m.underline?" underline":""}${m.strikethrough?" line-through":""}`),E.setTop(m.useCover?m.top:0),E.setLeft(m.useCover?m.left:0),E.setWidth(m.useCover?m.width:0),E.setHeight(m.useCover?m.height:0);const y=this._context.configuration.options;y.get(50)?E.setClassName("monaco-editor-background textAreaCover "+o.Margin.OUTER_CLASS_NAME):y.get(60).renderType!==0?E.setClassName("monaco-editor-background textAreaCover "+C.LineNumbersOverlay.CLASS_NAME):E.setClassName("monaco-editor-background textAreaCover")}}e.TextAreaHandler=h;function g(d,m){if(d.length===0)return 0;const b=document.createElement("div");b.style.position="absolute",b.style.top="-50000px",b.style.width="50000px";const E=document.createElement("span");(0,D.applyFontInfo)(E,m),E.style.whiteSpace="pre",E.append(d),b.appendChild(E),document.body.appendChild(b);const y=E.offsetWidth;return document.body.removeChild(b),y}}),define(ne[2018],re([1,0,128,66,182,49,86,164,259]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationsOverviewRuler=void 0;class w{constructor(i,S){const s=i.options;this.lineHeight=s.get(59),this.pixelRatio=s.get(129),this.overviewRulerLanes=s.get(74),this.renderBorder=s.get(73);const l=S.getColor(D.editorOverviewRulerBorder);this.borderColor=l?l.toString():null,this.hideCursor=s.get(52);const r=S.getColor(D.editorCursorForeground);this.cursorColor=r?r.transparent(.7).toString():null,this.themeType=S.type;const p=s.get(65),u=p.enabled,a=p.side,n=u?S.getColor(D.editorOverviewRulerBackground)||k.TokenizationRegistry.getDefaultBackground():null;n===null||a==="left"?this.backgroundColor=null:this.backgroundColor=f.Color.Format.CSS.formatHex(n);const g=s.get(131).overviewRuler;this.top=g.top,this.right=g.right,this.domWidth=g.width,this.domHeight=g.height,this.overviewRulerLanes===0?(this.canvasWidth=0,this.canvasHeight=0):(this.canvasWidth=this.domWidth*this.pixelRatio|0,this.canvasHeight=this.domHeight*this.pixelRatio|0);const[d,m]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=d,this.w=m}_initLanes(i,S,s){const l=S-i;if(s>=3){const r=Math.floor(l/3),p=Math.floor(l/3),u=l-r-p,a=i,n=a+r,h=a+r+u;return[[0,a,n,a,h,a,n,a],[0,r,u,r+u,p,r+u+p,u+p,r+u+p]]}else if(s===2){const r=Math.floor(l/2),p=l-r,u=i,a=u+r;return[[0,u,u,u,a,u,u,u],[0,r,r,r,p,r+p,r+p,r+p]]}else{const r=i,p=l;return[[0,r,r,r,r,r,r,r],[0,p,p,p,p,p,p,p]]}}equals(i){return this.lineHeight===i.lineHeight&&this.pixelRatio===i.pixelRatio&&this.overviewRulerLanes===i.overviewRulerLanes&&this.renderBorder===i.renderBorder&&this.borderColor===i.borderColor&&this.hideCursor===i.hideCursor&&this.cursorColor===i.cursorColor&&this.themeType===i.themeType&&this.backgroundColor===i.backgroundColor&&this.top===i.top&&this.right===i.right&&this.domWidth===i.domWidth&&this.domHeight===i.domHeight&&this.canvasWidth===i.canvasWidth&&this.canvasHeight===i.canvasHeight}}var v;(function(c){c[c.MIN_DECORATION_HEIGHT=6]="MIN_DECORATION_HEIGHT"})(v||(v={}));var C;(function(c){c[c.Left=1]="Left",c[c.Center=2]="Center",c[c.Right=4]="Right",c[c.Full=7]="Full"})(C||(C={}));class o extends _.ViewPart{constructor(i){super(i);this._domNode=(0,t.createFastDomNode)(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=k.TokenizationRegistry.onDidChange(S=>{S.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(i){const S=new w(this._context.configuration,this._context.theme);return this._settings&&this._settings.equals(S)?!1:(this._settings=S,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,i&&this._render(),!0)}onConfigurationChanged(i){return this._updateSettings(!1)}onCursorStateChanged(i){this._cursorPositions=[];for(let S=0,s=i.selections.length;S<s;S++)this._cursorPositions[S]=i.selections[S].getPosition();return this._cursorPositions.sort(A.Position.compare),!0}onDecorationsChanged(i){return!!i.affectsOverviewRuler}onFlushed(i){return!0}onScrollChanged(i){return i.scrollHeightChanged}onZonesChanged(i){return!0}onThemeChanged(i){return this._updateSettings(!1)}getDomNode(){return this._domNode.domNode}prepareRender(i){}render(i){this._render()}_render(){if(this._settings.overviewRulerLanes===0){this._domNode.setBackgroundColor(this._settings.backgroundColor?this._settings.backgroundColor:""),this._domNode.setDisplay("none");return}this._domNode.setDisplay("block");const i=this._settings.canvasWidth,S=this._settings.canvasHeight,s=this._settings.lineHeight,l=this._context.viewLayout,r=this._context.viewLayout.getScrollHeight(),p=S/r,u=this._context.viewModel.getAllOverviewRulerDecorations(this._context.theme),a=6*this._settings.pixelRatio|0,n=a/2|0,h=this._domNode.domNode.getContext("2d");this._settings.backgroundColor===null?h.clearRect(0,0,i,S):(h.fillStyle=this._settings.backgroundColor,h.fillRect(0,0,i,S));const g=this._settings.x,d=this._settings.w;u.sort(I.OverviewRulerDecorationsGroup.cmp);for(const m of u){const b=m.color,E=m.data;h.fillStyle=b;let y=0,T=0,R=0;for(let O=0,x=E.length/3;O<x;O++){const F=E[3*O],L=E[3*O+1],M=E[3*O+2];let N=l.getVerticalOffsetForLineNumber(L)*p|0,B=(l.getVerticalOffsetForLineNumber(M)+s)*p|0;if(B-N<a){let V=(N+B)/2|0;V<n?V=n:V+n>S&&(V=S-n),N=V-n,B=V+n}N>R+1||F!==y?(O!==0&&h.fillRect(g[y],T,d[y],R-T),y=F,T=N,R=B):B>R&&(R=B)}h.fillRect(g[y],T,d[y],R-T)}if(!this._settings.hideCursor&&this._settings.cursorColor){const m=2*this._settings.pixelRatio|0,b=m/2|0,E=this._settings.x[7],y=this._settings.w[7];h.fillStyle=this._settings.cursorColor;let T=-100,R=-100;for(let O=0,x=this._cursorPositions.length;O<x;O++){const F=this._cursorPositions[O];let L=l.getVerticalOffsetForLineNumber(F.lineNumber)*p|0;L<b?L=b:L+b>S&&(L=S-b);const M=L-b,N=M+m;M>R+1?(O!==0&&h.fillRect(E,T,y,R-T),T=M,R=N):N>R&&(R=N)}h.fillRect(E,T,y,R-T)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(h.beginPath(),h.lineWidth=1,h.strokeStyle=this._settings.borderColor,h.moveTo(0,0),h.lineTo(0,S),h.stroke(),h.moveTo(0,0),h.lineTo(i,0),h.stroke())}}e.DecorationsOverviewRuler=o}),define(ne[2019],re([1,0,128,182,164,12,1015]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Rulers=void 0;class k extends f.ViewPart{constructor(I){super(I);this.domNode=(0,t.createFastDomNode)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const w=this._context.configuration.options;this._rulers=w.get(91),this._typicalHalfwidthCharacterWidth=w.get(44).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(I){const w=this._context.configuration.options;return this._rulers=w.get(91),this._typicalHalfwidthCharacterWidth=w.get(44).typicalHalfwidthCharacterWidth,!0}onScrollChanged(I){return I.scrollHeightChanged}prepareRender(I){}_ensureRulersCount(){const I=this._renderedRulers.length,w=this._rulers.length;if(I===w)return;if(I<w){const{tabSize:C}=this._context.viewModel.model.getOptions(),o=C;let c=w-I;for(;c>0;){const i=(0,t.createFastDomNode)(document.createElement("div"));i.setClassName("view-ruler"),i.setWidth(o),this.domNode.appendChild(i),this._renderedRulers.push(i),c--}return}let v=I-w;for(;v>0;){const C=this._renderedRulers.pop();this.domNode.removeChild(C),v--}}render(I){this._ensureRulersCount();for(let w=0,v=this._rulers.length;w<v;w++){const C=this._renderedRulers[w],o=this._rulers[w];C.setBoxShadow(o.color?`1px 0 0 0 ${o.color} inset`:""),C.setHeight(Math.min(I.scrollHeight,1e6)),C.setLeft(o.column*this._typicalHalfwidthCharacterWidth)}}}e.Rulers=k,(0,A.registerThemingParticipant)((D,I)=>{const w=D.getColor(_.editorRuler);w&&I.addRule(`.monaco-editor .view-ruler { box-shadow: 1px 0 0 0 ${w} inset; }`)})}),define(ne[2020],re([1,0,128,11,182,1245,123,164,12,127,1018]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewCursors=void 0;class v extends _.ViewPart{constructor(o){super(o);const c=this._context.configuration.options;this._readOnly=c.get(81),this._cursorBlinking=c.get(22),this._cursorStyle=c.get(24),this._cursorSmoothCaretAnimation=c.get(23),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new A.ViewCursor(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=(0,t.createFastDomNode)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new f.TimeoutTimer,this._cursorFlatBlinkInterval=new f.IntervalTimer,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(o){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(o){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(o){const c=this._context.configuration.options;this._readOnly=c.get(81),this._cursorBlinking=c.get(22),this._cursorStyle=c.get(24),this._cursorSmoothCaretAnimation=c.get(23),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(o);for(let i=0,S=this._secondaryCursors.length;i<S;i++)this._secondaryCursors[i].onConfigurationChanged(o);return!0}_onCursorPositionChanged(o,c){if(this._primaryCursor.onCursorPositionChanged(o),this._updateBlinking(),this._secondaryCursors.length<c.length){const i=c.length-this._secondaryCursors.length;for(let S=0;S<i;S++){const s=new A.ViewCursor(this._context);this._domNode.domNode.insertBefore(s.getDomNode().domNode,this._primaryCursor.getDomNode().domNode.nextSibling),this._secondaryCursors.push(s)}}else if(this._secondaryCursors.length>c.length){const i=this._secondaryCursors.length-c.length;for(let S=0;S<i;S++)this._domNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1)}for(let i=0;i<c.length;i++)this._secondaryCursors[i].onCursorPositionChanged(c[i])}onCursorStateChanged(o){const c=[];for(let S=0,s=o.selections.length;S<s;S++)c[S]=o.selections[S].getPosition();this._onCursorPositionChanged(c[0],c.slice(1));const i=o.selections[0].isEmpty();return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,this._updateDomClassName()),!0}onDecorationsChanged(o){return!0}onFlushed(o){return!0}onFocusChanged(o){return this._editorHasFocus=o.isFocused,this._updateBlinking(),!1}onLinesChanged(o){return!0}onLinesDeleted(o){return!0}onLinesInserted(o){return!0}onScrollChanged(o){return!0}onTokensChanged(o){const c=i=>{for(let S=0,s=o.ranges.length;S<s;S++)if(o.ranges[S].fromLineNumber<=i.lineNumber&&i.lineNumber<=o.ranges[S].toLineNumber)return!0;return!1};if(c(this._primaryCursor.getPosition()))return!0;for(const i of this._secondaryCursors)if(c(i.getPosition()))return!0;return!1}onZonesChanged(o){return!0}_getCursorBlinking(){return this._isComposingInput||!this._editorHasFocus?0:this._readOnly?5:this._cursorBlinking}_updateBlinking(){this._startCursorBlinkAnimation.cancel(),this._cursorFlatBlinkInterval.cancel();const o=this._getCursorBlinking(),c=o===0,i=o===5;c?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),!c&&!i&&(o===1?this._cursorFlatBlinkInterval.cancelAndSet(()=>{this._isVisible?this._hide():this._show()},v.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},v.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let o="cursors-layer";switch(this._selectionIsEmpty||(o+=" has-selection"),this._cursorStyle){case k.TextEditorCursorStyle.Line:o+=" cursor-line-style";break;case k.TextEditorCursorStyle.Block:o+=" cursor-block-style";break;case k.TextEditorCursorStyle.Underline:o+=" cursor-underline-style";break;case k.TextEditorCursorStyle.LineThin:o+=" cursor-line-thin-style";break;case k.TextEditorCursorStyle.BlockOutline:o+=" cursor-block-outline-style";break;case k.TextEditorCursorStyle.UnderlineThin:o+=" cursor-underline-thin-style";break;default:o+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:o+=" cursor-blink";break;case 2:o+=" cursor-smooth";break;case 3:o+=" cursor-phase";break;case 4:o+=" cursor-expand";break;case 5:o+=" cursor-solid";break;default:o+=" cursor-solid"}else o+=" cursor-solid";return this._cursorSmoothCaretAnimation&&(o+=" cursor-smooth-caret-animation"),o}_show(){this._primaryCursor.show();for(let o=0,c=this._secondaryCursors.length;o<c;o++)this._secondaryCursors[o].show();this._isVisible=!0}_hide(){this._primaryCursor.hide();for(let o=0,c=this._secondaryCursors.length;o<c;o++)this._secondaryCursors[o].hide();this._isVisible=!1}prepareRender(o){this._primaryCursor.prepareRender(o);for(let c=0,i=this._secondaryCursors.length;c<i;c++)this._secondaryCursors[c].prepareRender(o)}render(o){const c=[];let i=0;const S=this._primaryCursor.render(o);S&&(c[i++]=S);for(let s=0,l=this._secondaryCursors.length;s<l;s++){const r=this._secondaryCursors[s].render(o);r&&(c[i++]=r)}this._renderData=c}getLastRenderData(){return this._renderData}}e.ViewCursors=v,v.BLINK_INTERVAL=500,(0,I.registerThemingParticipant)((C,o)=>{const c=C.getColor(D.editorCursorForeground);if(c){let i=C.getColor(D.editorCursorBackground);i||(i=c.opposite()),o.addRule(`.monaco-editor .inputarea.ime-input { caret-color: ${c}; }`),o.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${c}; border-color: ${c}; color: ${i}; }`),(0,w.isHighContrast)(C.type)&&o.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${i}; border-right: 1px solid ${i}; }`)}})}),define(ne[2021],re([1,0,6,2,20,164,12]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorizedBracketPairsDecorationProvider=void 0;class D extends f.Disposable{constructor(v){super();this.textModel=v,this.colorProvider=new I,this.onDidChangeEmitter=new t.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=v.getOptions().bracketPairColorizationOptions,this._register(v.bracketPairs.onDidChange(C=>{this.onDidChangeEmitter.fire()}))}handleDidChangeOptions(v){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(v,C,o){if(C===void 0)return[];if(!this.colorizationOptions.enabled)return[];const c=new Array,i=this.textModel.bracketPairs.getBracketsInRange(v);for(const S of i)c.push({id:`bracket${S.range.toString()}-${S.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(S,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:S.range});return c}getAllDecorations(v,C){return v===void 0?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new _.Range(1,1,this.textModel.getLineCount(),1),v,C):[]}}e.ColorizedBracketPairsDecorationProvider=D;class I{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(v,C){return v.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(C?v.nestingLevelOfEqualBracketType:v.nestingLevel)}getInlineClassNameOfLevel(v){return`bracket-highlighting-${v%30}`}}(0,k.registerThemingParticipant)((w,v)=>{const C=[A.editorBracketHighlightingForeground1,A.editorBracketHighlightingForeground2,A.editorBracketHighlightingForeground3,A.editorBracketHighlightingForeground4,A.editorBracketHighlightingForeground5,A.editorBracketHighlightingForeground6],o=new I;v.addRule(`.monaco-editor .${o.unexpectedClosingBracketClassName} { color: ${w.getColor(A.editorBracketHighlightingUnexpectedBracketForeground)}; }`);const c=C.map(i=>w.getColor(i)).filter(i=>!!i).filter(i=>!i.isTransparent());for(let i=0;i<30;i++){const S=c[i%c.length];v.addRule(`.monaco-editor .${o.getInlineClassNameOfLevel(i)} { color: ${S}; }`)}})}),define(ne[2022],re([1,0,125,2,122,12,164,52,20,18,6,32,55]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerDecorationsService=void 0;class c extends f.Disposable{constructor(s){super();this.model=s,this._markersData=new Map,this._register((0,f.toDisposable)(()=>{this.model.deltaDecorations([...this._markersData.keys()],[]),this._markersData.clear()}))}update(s,l){const r=[...this._markersData.keys()];this._markersData.clear();const p=this.model.deltaDecorations(r,l);for(let u=0;u<p.length;u++)this._markersData.set(p[u],s[u]);return r.length!==0||p.length!==0}getMarker(s){return this._markersData.get(s.id)}getMarkers(){const s=[];return this._markersData.forEach((l,r)=>{const p=this.model.getDecorationRange(r);p&&s.push([p,l])}),s}}let i=class extends f.Disposable{constructor(s,l){super();this._markerService=l,this._onDidChangeMarker=this._register(new v.Emitter),this.onDidChangeMarker=this._onDidChangeMarker.event,this._markerDecorations=new o.ResourceMap,s.getModels().forEach(r=>this._onModelAdded(r)),this._register(s.onModelAdded(this._onModelAdded,this)),this._register(s.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(s=>s.dispose()),this._markerDecorations.clear()}getMarker(s,l){const r=this._markerDecorations.get(s);return r&&r.getMarker(l)||null}getLiveMarkers(s){const l=this._markerDecorations.get(s);return l?l.getMarkers():[]}_handleMarkerChange(s){s.forEach(l=>{const r=this._markerDecorations.get(l);r&&this._updateDecorations(r)})}_onModelAdded(s){const l=new c(s);this._markerDecorations.set(s.uri,l),this._updateDecorations(l)}_onModelRemoved(s){const l=this._markerDecorations.get(s.uri);l&&(l.dispose(),this._markerDecorations.delete(s.uri)),(s.uri.scheme===w.Schemas.inMemory||s.uri.scheme===w.Schemas.internal||s.uri.scheme===w.Schemas.vscode)&&this._markerService&&this._markerService.read({resource:s.uri}).map(r=>r.owner).forEach(r=>this._markerService.remove(r,[s.uri]))}_updateDecorations(s){const l=this._markerService.read({resource:s.model.uri,take:500}),r=l.map(p=>({range:this._createDecorationRange(s.model,p),options:this._createDecorationOption(p)}));s.update(l,r)&&this._onDidChangeMarker.fire(s.model)}_createDecorationRange(s,l){let r=I.Range.lift(l);if(l.severity===t.MarkerSeverity.Hint&&!this._hasMarkerTag(l,1)&&!this._hasMarkerTag(l,2)&&(r=r.setEndPosition(r.startLineNumber,r.startColumn+2)),r=s.validateRange(r),r.isEmpty()){const p=s.getLineLastNonWhitespaceColumn(r.startLineNumber)||s.getLineMaxColumn(r.startLineNumber);if(p===1||r.endColumn>=p)return r;const u=s.getWordAtPosition(r.getStartPosition());u&&(r=new I.Range(r.startLineNumber,u.startColumn,r.endLineNumber,u.endColumn))}else if(l.endColumn===Number.MAX_VALUE&&l.startColumn===1&&r.startLineNumber===r.endLineNumber){let p=s.getLineFirstNonWhitespaceColumn(l.startLineNumber);p<r.endColumn&&(r=new I.Range(r.startLineNumber,p,r.endLineNumber,r.endColumn),l.startColumn=p)}return r}_createDecorationOption(s){let l,r,p,u,a;switch(s.severity){case t.MarkerSeverity.Hint:this._hasMarkerTag(s,2)?l=void 0:this._hasMarkerTag(s,1)?l="squiggly-unnecessary":l="squiggly-hint",p=0;break;case t.MarkerSeverity.Warning:l="squiggly-warning",r=(0,A.themeColorFromId)(k.overviewRulerWarning),p=20,a={color:(0,A.themeColorFromId)(C.minimapWarning),position:_.MinimapPosition.Inline};break;case t.MarkerSeverity.Info:l="squiggly-info",r=(0,A.themeColorFromId)(k.overviewRulerInfo),p=10;break;case t.MarkerSeverity.Error:default:l="squiggly-error",r=(0,A.themeColorFromId)(k.overviewRulerError),p=30,a={color:(0,A.themeColorFromId)(C.minimapError),position:_.MinimapPosition.Inline};break}return s.tags&&(s.tags.indexOf(1)!==-1&&(u="squiggly-inline-unnecessary"),s.tags.indexOf(2)!==-1&&(u="squiggly-inline-deprecated")),{description:"marker-decoration",stickiness:1,className:l,showIfCollapsed:!0,overviewRuler:{color:r,position:_.OverviewRulerLane.Right},minimap:a,zIndex:p,inlineClassName:u}}_hasMarkerTag(s,l){return s.tags?s.tags.indexOf(l)>=0:!1}};i=Ee([W(0,D.IModelService),W(1,t.IMarkerService)],i),e.MarkerDecorationsService=i}),define(ne[748],re([1,0,86,12,31,1172,42]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toMultilineTokens2=e.SemanticTokensProviderStyling=e.SemanticTokensProviderStylingConstants=void 0;var D;(function(c){c[c.NO_STYLING=2147483647]="NO_STYLING"})(D=e.SemanticTokensProviderStylingConstants||(e.SemanticTokensProviderStylingConstants={}));let I=class{constructor(i,S,s,l){this._legend=i,this._themeService=S,this._languageService=s,this._logService=l,this._hashTable=new o,this._hasWarnedOverlappingTokens=!1}getMetadata(i,S,s){const l=this._languageService.languageIdCodec.encodeLanguageId(s),r=this._hashTable.get(i,S,l);let p;if(r)p=r.metadata,this._logService.getLevel()===_.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${i} / ${S}: foreground ${t.TokenMetadata.getForeground(p)}, fontStyle ${t.TokenMetadata.getFontStyle(p).toString(2)}`);else{let u=this._legend.tokenTypes[i];const a=[];if(u){let n=S;for(let g=0;n>0&&g<this._legend.tokenModifiers.length;g++)n&1&&a.push(this._legend.tokenModifiers[g]),n=n>>1;n>0&&this._logService.getLevel()===_.LogLevel.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${S.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),a.push("not-in-legend"));const h=this._themeService.getColorTheme().getTokenStyleMetadata(u,a,s);typeof h=="undefined"?p=2147483647:(p=0,typeof h.italic!="undefined"&&(p|=(h.italic?1:0)<<10|1),typeof h.bold!="undefined"&&(p|=(h.bold?2:0)<<10|2),typeof h.underline!="undefined"&&(p|=(h.underline?4:0)<<10|4),typeof h.strikethrough!="undefined"&&(p|=(h.strikethrough?8:0)<<10|8),h.foreground&&(p|=h.foreground<<14|16),p===0&&(p=2147483647))}else this._logService.getLevel()===_.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${i} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),p=2147483647,u="not-in-legend";this._hashTable.add(i,S,l,p),this._logService.getLevel()===_.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${i} (${u}) / ${S} (${a.join(" ")}): foreground ${t.TokenMetadata.getForeground(p)}, fontStyle ${t.TokenMetadata.getFontStyle(p).toString(2)}`)}return p}warnOverlappingSemanticTokens(i,S){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${i}, column ${S}`))}};I=Ee([W(1,f.IThemeService),W(2,k.ILanguageService),W(3,_.ILogService)],I),e.SemanticTokensProviderStyling=I;var w;(function(c){c[c.DesiredTokensPerArea=400]="DesiredTokensPerArea",c[c.DesiredMaxAreas=1024]="DesiredMaxAreas"})(w||(w={}));function v(c,i,S){const s=c.data,l=c.data.length/5|0,r=Math.max(Math.ceil(l/1024),400),p=[];let u=0,a=1,n=0;for(;u<l;){const h=u;let g=Math.min(h+r,l);if(g<l){let O=g;for(;O-1>h&&s[5*O]===0;)O--;if(O-1===h){let x=g;for(;x+1<l&&s[5*x]===0;)x++;g=x}else g=O}let d=new Uint32Array((g-h)*4),m=0,b=0,E=0,y=0,T=0;for(;u<g;){const O=5*u,x=s[O],F=s[O+1],L=a+x|0,M=x===0?n+F|0:F,N=s[O+2],B=s[O+3],P=s[O+4],V=i.getMetadata(B,P,S);V!==2147483647&&(b===0&&(b=L),E===L&&T>M&&(i.warnOverlappingSemanticTokens(L,M+1),y<M?d[m-4+2]=M:m-=4),d[m]=L-b,d[m+1]=M,d[m+2]=M+N,d[m+3]=V,m+=4,E=L,y=M,T=M+N),a=L,n=M,u++}m!==d.length&&(d=d.subarray(0,m));const R=A.SparseMultilineTokens.create(b,d);p.push(R)}return p}e.toMultilineTokens2=v;class C{constructor(i,S,s,l){this.tokenTypeIndex=i,this.tokenModifierSet=S,this.languageId=s,this.metadata=l,this.next=null}}class o{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=o._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<o._SIZES.length?2/3*this._currentLength:0),this._elements=[],o._nullOutEntries(this._elements,this._currentLength)}static _nullOutEntries(i,S){for(let s=0;s<S;s++)i[s]=null}_hash2(i,S){return(i<<5)-i+S|0}_hashFunc(i,S,s){return this._hash2(this._hash2(i,S),s)%this._currentLength}get(i,S,s){const l=this._hashFunc(i,S,s);let r=this._elements[l];for(;r;){if(r.tokenTypeIndex===i&&r.tokenModifierSet===S&&r.languageId===s)return r;r=r.next}return null}add(i,S,s,l){if(this._elementsCount++,this._growCount!==0&&this._elementsCount>=this._growCount){const r=this._elements;this._currentLengthIndex++,this._currentLength=o._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<o._SIZES.length?2/3*this._currentLength:0),this._elements=[],o._nullOutEntries(this._elements,this._currentLength);for(const p of r){let u=p;for(;u;){const a=u.next;u.next=null,this._add(u),u=a}}}this._add(new C(i,S,s,l))}_add(i){const S=this._hashFunc(i.tokenTypeIndex,i.tokenModifierSet,i.languageId);i.next=this._elements[S],this._elements[S]=i}}o._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143]}),define(ne[2023],re([1,0,10,129,33,6,2,530,1258,38,32,12,1024]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LightBulbWidget=void 0;var o;(function(i){let S;(function(l){l[l.Hidden=0]="Hidden",l[l.Showing=1]="Showing"})(S=i.Type||(i.Type={})),i.Hidden={type:0};class s{constructor(r,p,u,a){this.actions=r,this.trigger=p,this.editorPosition=u,this.widgetPosition=a,this.type=1}}i.Showing=s})(o||(o={}));let c=class Hs extends k.Disposable{constructor(S,s,l,r){super();this._editor=S,this._quickFixActionId=s,this._preferredFixActionId=l,this._keybindingService=r,this._onClick=this._register(new A.Emitter),this.onClick=this._onClick.event,this._state=o.Hidden,this._domNode=document.createElement("div"),this._domNode.className=_.Codicon.lightBulb.classNames,this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(p=>{const u=this._editor.getModel();(this.state.type!==1||!u||this.state.editorPosition.lineNumber>=u.getLineCount())&&this.hide()})),f.Gesture.ignoreTarget(this._domNode),this._register(t.addStandardDisposableGenericMouseDownListener(this._domNode,p=>{if(this.state.type!==1)return;this._editor.focus(),p.preventDefault();const{top:u,height:a}=t.getDomNodePagePosition(this._domNode),n=this._editor.getOption(59);let h=Math.floor(n/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber<this.state.editorPosition.lineNumber&&(h+=n),this._onClick.fire({x:p.posx,y:u+a+h,actions:this.state.actions,trigger:this.state.trigger})})),this._register(t.addDisposableListener(this._domNode,"mouseenter",p=>{(p.buttons&1)==1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(p=>{p.hasChanged(57)&&!this._editor.getOption(57).enabled&&this.hide()})),this._updateLightBulbTitleAndIcon(),this._register(this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitleAndIcon,this))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(S,s,l){if(S.validActions.length<=0)return this.hide();const r=this._editor.getOptions();if(!r.get(57).enabled)return this.hide();const p=this._editor.getModel();if(!p)return this.hide();const{lineNumber:u,column:a}=p.validatePosition(l),n=p.getOptions().tabSize,h=r.get(44),g=p.getLineContent(u),d=(0,D.computeIndentLevel)(g,n),m=h.spaceWidth*d>22,b=y=>y>2&&this._editor.getTopForLineNumber(y)===this._editor.getTopForLineNumber(y-1);let E=u;if(!m){if(u>1&&!b(u-1))E-=1;else if(!b(u+1))E+=1;else if(a*h.spaceWidth<22)return this.hide()}this.state=new o.Showing(S,s,l,{position:{lineNumber:E,column:1},preference:Hs._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state=o.Hidden,this._editor.layoutContentWidget(this)}get state(){return this._state}set state(S){this._state=S,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix){this._domNode.classList.remove(..._.Codicon.lightBulb.classNamesArray),this._domNode.classList.add(..._.Codicon.lightbulbAutofix.classNamesArray);const s=this._keybindingService.lookupKeybinding(this._preferredFixActionId);if(s){this.title=I.localize(0,null,s.getLabel());return}}this._domNode.classList.remove(..._.Codicon.lightbulbAutofix.classNamesArray),this._domNode.classList.add(..._.Codicon.lightBulb.classNamesArray);const S=this._keybindingService.lookupKeybinding(this._quickFixActionId);S?this.title=I.localize(1,null,S.getLabel()):this.title=I.localize(2,null)}set title(S){this._domNode.title=S}};c._posPref=[0],c=Ee([W(3,w.IKeybindingService)],c),e.LightBulbWidget=c,(0,C.registerThemingParticipant)((i,S)=>{const s=i.getColor(v.editorBackground)?.transparent(.7),l=i.getColor(v.editorLightBulbForeground);l&&S.addRule(` .monaco-editor .contentWidgets ${_.Codicon.lightBulb.cssSelector} { color: ${l}; background-color: ${s}; }`);const r=i.getColor(v.editorLightBulbAutoFixForeground);r&&S.addRule(` .monaco-editor .contentWidgets ${_.Codicon.lightbulbAutofix.cssSelector} { color: ${r}; background-color: ${s}; }`)})}),define(ne[2024],re([1,0,77,10,381,138,66,6,2,1260,32,12,1026]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPickerWidget=e.ColorPickerBody=e.ColorPickerHeader=void 0;const o=f.$;class c extends I.Disposable{constructor(a,n,h){super();this.model=n,this.domNode=o(".colorpicker-header"),f.append(a,this.domNode),this.pickedColorNode=f.append(this.domNode,o(".picked-color"));const g=(0,w.localize)(0,null);this.pickedColorNode.setAttribute("title",g);const d=f.append(this.domNode,o(".original-color"));d.style.backgroundColor=k.Color.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=h.getColorTheme().getColor(v.editorHoverBackground)||k.Color.white,this._register((0,C.registerThemingParticipant)((m,b)=>{this.backgroundColor=m.getColor(v.editorHoverBackground)||k.Color.white})),this._register(f.addDisposableListener(this.pickedColorNode,f.EventType.CLICK,()=>this.model.selectNextColorPresentation())),this._register(f.addDisposableListener(d,f.EventType.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(n.onDidChangeColor(this.onDidChangeColor,this)),this._register(n.onDidChangePresentation(this.onDidChangePresentation,this)),this.pickedColorNode.style.backgroundColor=k.Color.Format.CSS.format(n.color)||"",this.pickedColorNode.classList.toggle("light",n.color.rgba.a<.5?this.backgroundColor.isLighter():n.color.isLighter()),this.onDidChangeColor(this.model.color)}onDidChangeColor(a){this.pickedColorNode.style.backgroundColor=k.Color.Format.CSS.format(a)||"",this.pickedColorNode.classList.toggle("light",a.rgba.a<.5?this.backgroundColor.isLighter():a.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this.pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:"",this.pickedColorNode.prepend(o(".codicon.codicon-color-mode"))}}e.ColorPickerHeader=c;class i extends I.Disposable{constructor(a,n,h){super();this.model=n,this.pixelRatio=h,this.domNode=o(".colorpicker-body"),f.append(a,this.domNode),this.saturationBox=new S(this.domNode,this.model,this.pixelRatio),this._register(this.saturationBox),this._register(this.saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this.saturationBox.onColorFlushed(this.flushColor,this)),this.opacityStrip=new l(this.domNode,this.model),this._register(this.opacityStrip),this._register(this.opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this.opacityStrip.onColorFlushed(this.flushColor,this)),this.hueStrip=new r(this.domNode,this.model),this._register(this.hueStrip),this._register(this.hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this.hueStrip.onColorFlushed(this.flushColor,this))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:a,v:n}){const h=this.model.color.hsva;this.model.color=new k.Color(new k.HSVA(h.h,a,n,h.a))}onDidOpacityChange(a){const n=this.model.color.hsva;this.model.color=new k.Color(new k.HSVA(n.h,n.s,n.v,a))}onDidHueChange(a){const n=this.model.color.hsva,h=(1-a)*360;this.model.color=new k.Color(new k.HSVA(h===360?0:h,n.s,n.v,n.a))}layout(){this.saturationBox.layout(),this.opacityStrip.layout(),this.hueStrip.layout()}}e.ColorPickerBody=i;class S extends I.Disposable{constructor(a,n,h){super();this.model=n,this.pixelRatio=h,this._onDidChange=new D.Emitter,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new D.Emitter,this.onColorFlushed=this._onColorFlushed.event,this.domNode=o(".saturation-wrap"),f.append(a,this.domNode),this.canvas=document.createElement("canvas"),this.canvas.className="saturation-box",f.append(this.domNode,this.canvas),this.selection=o(".saturation-selection"),f.append(this.domNode,this.selection),this.layout(),this._register(f.addDisposableListener(this.domNode,f.EventType.POINTER_DOWN,g=>this.onPointerDown(g))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}onPointerDown(a){if(!a.target||!(a.target instanceof Element))return;this.monitor=this._register(new _.GlobalPointerMoveMonitor);const n=f.getDomNodePagePosition(this.domNode);a.target!==this.selection&&this.onDidChangePosition(a.offsetX,a.offsetY),this.monitor.startMonitoring(a.target,a.pointerId,a.buttons,_.standardPointerMoveMerger,g=>this.onDidChangePosition(g.pageX-n.left,g.pageY-n.top),()=>null);const h=f.addDisposableListener(document,f.EventType.POINTER_UP,()=>{this._onColorFlushed.fire(),h.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(a,n){const h=Math.max(0,Math.min(1,a/this.width)),g=Math.max(0,Math.min(1,1-n/this.height));this.paintSelection(h,g),this._onDidChange.fire({s:h,v:g})}layout(){this.width=this.domNode.offsetWidth,this.height=this.domNode.offsetHeight,this.canvas.width=this.width*this.pixelRatio,this.canvas.height=this.height*this.pixelRatio,this.paint();const a=this.model.color.hsva;this.paintSelection(a.s,a.v)}paint(){const a=this.model.color.hsva,n=new k.Color(new k.HSVA(a.h,1,1,1)),h=this.canvas.getContext("2d"),g=h.createLinearGradient(0,0,this.canvas.width,0);g.addColorStop(0,"rgba(255, 255, 255, 1)"),g.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),g.addColorStop(1,"rgba(255, 255, 255, 0)");const d=h.createLinearGradient(0,0,0,this.canvas.height);d.addColorStop(0,"rgba(0, 0, 0, 0)"),d.addColorStop(1,"rgba(0, 0, 0, 1)"),h.rect(0,0,this.canvas.width,this.canvas.height),h.fillStyle=k.Color.Format.CSS.format(n),h.fill(),h.fillStyle=g,h.fill(),h.fillStyle=d,h.fill()}paintSelection(a,n){this.selection.style.left=`${a*this.width}px`,this.selection.style.top=`${this.height-n*this.height}px`}onDidChangeColor(){this.monitor&&this.monitor.isMonitoring()||this.paint()}}class s extends I.Disposable{constructor(a,n){super();this.model=n,this._onDidChange=new D.Emitter,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new D.Emitter,this.onColorFlushed=this._onColorFlushed.event,this.domNode=f.append(a,o(".strip")),this.overlay=f.append(this.domNode,o(".overlay")),this.slider=f.append(this.domNode,o(".slider")),this.slider.style.top="0px",this._register(f.addDisposableListener(this.domNode,f.EventType.POINTER_DOWN,h=>this.onPointerDown(h))),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const a=this.getValue(this.model.color);this.updateSliderPosition(a)}onPointerDown(a){if(!a.target||!(a.target instanceof Element))return;const n=this._register(new _.GlobalPointerMoveMonitor),h=f.getDomNodePagePosition(this.domNode);this.domNode.classList.add("grabbing"),a.target!==this.slider&&this.onDidChangeTop(a.offsetY),n.startMonitoring(a.target,a.pointerId,a.buttons,_.standardPointerMoveMerger,d=>this.onDidChangeTop(d.pageY-h.top),()=>null);const g=f.addDisposableListener(document,f.EventType.POINTER_UP,()=>{this._onColorFlushed.fire(),g.dispose(),n.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(a){const n=Math.max(0,Math.min(1,1-a/this.height));this.updateSliderPosition(n),this._onDidChange.fire(n)}updateSliderPosition(a){this.slider.style.top=`${(1-a)*this.height}px`}}class l extends s{constructor(a,n){super(a,n);this.domNode.classList.add("opacity-strip"),this._register(n.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(a){const{r:n,g:h,b:g}=a.rgba,d=new k.Color(new k.RGBA(n,h,g,1)),m=new k.Color(new k.RGBA(n,h,g,0));this.overlay.style.background=`linear-gradient(to bottom, ${d} 0%, ${m} 100%)`}getValue(a){return a.hsva.a}}class r extends s{constructor(a,n){super(a,n);this.domNode.classList.add("hue-strip")}getValue(a){return 1-a.hsva.h/360}}class p extends A.Widget{constructor(a,n,h,g){super();this.model=n,this.pixelRatio=h,this._register(t.PixelRatio.onDidChange(()=>this.layout()));const d=o(".colorpicker-widget");a.appendChild(d);const m=new c(d,this.model,g);this.body=new i(d,this.model,this.pixelRatio),this._register(m),this._register(this.body)}getId(){return p.ID}layout(){this.body.layout()}}e.ColorPickerWidget=p,p.ID="editor.contrib.colorPickerWidget"}),define(ne[2025],re([1,0,10,258,241,234,102,111,2,19,61,1277,5,38,45,68,12,395]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccessibilityProvider=e.OneReferenceRenderer=e.FileReferencesRenderer=e.IdentityProvider=e.StringRepresentationProvider=e.Delegate=e.DataSource=void 0;let r=class{constructor(E){this._resolverService=E}hasChildren(E){return E instanceof l.ReferencesModel||E instanceof l.FileReferences}getChildren(E){if(E instanceof l.ReferencesModel)return E.groups;if(E instanceof l.FileReferences)return E.resolve(this._resolverService).then(y=>y.children);throw new Error("bad tree")}};r=Ee([W(0,v.ITextModelService)],r),e.DataSource=r;class p{getHeight(){return 23}getTemplateId(E){return E instanceof l.FileReferences?h.id:d.id}}e.Delegate=p;let u=class{constructor(E){this._keybindingService=E}getKeyboardNavigationLabel(E){if(E instanceof l.OneReference){const y=E.parent.getPreview(E)?.preview(E.range);if(y)return y.value}return(0,w.basename)(E.uri)}mightProducePrintableCharacter(E){return this._keybindingService.mightProducePrintableCharacter(E)}};u=Ee([W(0,c.IKeybindingService)],u),e.StringRepresentationProvider=u;class a{getId(E){return E instanceof l.OneReference?E.id:E.uri}}e.IdentityProvider=a;let n=class extends I.Disposable{constructor(E,y,T){super();this._uriLabel=y;const R=document.createElement("div");R.classList.add("reference-file"),this.file=this._register(new A.IconLabel(R,{supportHighlights:!0})),this.badge=new f.CountBadge(t.append(R,t.$(".count"))),this._register((0,S.attachBadgeStyler)(this.badge,T)),E.appendChild(R)}set(E,y){let T=(0,w.dirname)(E.uri);this.file.setLabel((0,D.getBaseLabel)(E.uri),this._uriLabel.getUriLabel(T,{relative:!0}),{title:this._uriLabel.getUriLabel(E.uri),matches:y});const R=E.children.length;this.badge.setCount(R),R>1?this.badge.setTitleFormat((0,C.localize)(0,null,R)):this.badge.setTitleFormat((0,C.localize)(1,null,R))}};n=Ee([W(1,i.ILabelService),W(2,s.IThemeService)],n);let h=class Ks{constructor(E){this._instantiationService=E,this.templateId=Ks.id}renderTemplate(E){return this._instantiationService.createInstance(n,E)}renderElement(E,y,T){T.set(E.element,(0,k.createMatches)(E.filterData))}disposeTemplate(E){E.dispose()}};h.id="FileReferencesRenderer",h=Ee([W(0,o.IInstantiationService)],h),e.FileReferencesRenderer=h;class g{constructor(E){this.label=new _.HighlightedLabel(E)}set(E,y){const T=E.parent.getPreview(E)?.preview(E.range);if(!T||!T.value)this.label.set(`${(0,w.basename)(E.uri)}:${E.range.startLineNumber+1}:${E.range.startColumn+1}`);else{const{value:R,highlight:O}=T;y&&!k.FuzzyScore.isDefault(y)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(R,(0,k.createMatches)(y))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(R,[O]))}}}class d{constructor(){this.templateId=d.id}renderTemplate(E){return new g(E)}renderElement(E,y,T){T.set(E.element,E.filterData)}disposeTemplate(){}}e.OneReferenceRenderer=d,d.id="OneReferenceRenderer";class m{getWidgetAriaLabel(){return(0,C.localize)(2,null)}getAriaLabel(E){return E.ariaMessage}}e.AccessibilityProvider=m}),define(ne[2026],re([1,0,10,2,29,227,123,285,49,20,282,122,42,164,459,460,462,5,12,1033]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GhostTextWidget=void 0;const p=window.trustedTypes?.createPolicy("editorGhostText",{createHTML:m=>m});let u=class extends f.Disposable{constructor(b,E,y,T){super();this.editor=b,this.model=E,this.instantiationService=y,this.languageService=T,this.disposed=!1,this.partsWidget=this._register(this.instantiationService.createInstance(n,this.editor)),this.additionalLinesWidget=this._register(new h(this.editor,this.languageService.languageIdCodec)),this.viewMoreContentWidget=void 0,this.replacementDecoration=this._register(new a(this.editor)),this._register(this.editor.onDidChangeConfiguration(R=>{(R.hasChanged(29)||R.hasChanged(105)||R.hasChanged(88)||R.hasChanged(83)||R.hasChanged(45)||R.hasChanged(44)||R.hasChanged(59))&&this.update()})),this._register((0,f.toDisposable)(()=>{this.disposed=!0,this.update(),this.viewMoreContentWidget?.dispose(),this.viewMoreContentWidget=void 0})),this._register(E.onDidChange(()=>{this.update()})),this.update()}shouldShowHoverAtViewZone(b){return this.additionalLinesWidget.viewZoneId===b}update(){const b=this.model.ghostText;if(!this.editor.hasModel()||!b||this.disposed){this.partsWidget.clear(),this.additionalLinesWidget.clear(),this.replacementDecoration.setDecorations([]);return}const E=new Array,y=new Array;function T(F,L){if(y.length>0){const M=y[y.length-1];L&&M.decorations.push(new i.LineDecoration(M.content.length+1,M.content.length+1+F[0].length,L,0)),M.content+=F[0],F=F.slice(1)}for(const M of F)y.push({content:M,decorations:L?[new i.LineDecoration(1,M.length+1,L,0)]:[]})}b instanceof s.GhostTextReplacement?this.replacementDecoration.setDecorations([{range:new w.Range(b.lineNumber,b.columnStart,b.lineNumber,b.columnStart+b.length),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}]):this.replacementDecoration.setDecorations([]);const R=this.editor.getModel().getLineContent(b.lineNumber);let O,x=0;for(const F of b.parts){let L=F.lines;O===void 0?(E.push({column:F.column,text:L[0],preview:F.preview}),L=L.slice(1)):T([R.substring(x,F.column-1)],void 0),L.length>0&&(T(L,"ghost-text"),O===void 0&&F.column<=R.length&&(O=F.column)),x=F.column-1}O!==void 0&&T([R.substring(x)],void 0),this.partsWidget.setParts(b.lineNumber,E,O!==void 0?{column:O,length:R.length+1-O}:void 0),this.additionalLinesWidget.updateLines(b.lineNumber,y,b.additionalReservedLineCount),0<0?this.viewMoreContentWidget=this.renderViewMoreLines(new I.Position(b.lineNumber,this.editor.getModel().getLineMaxColumn(b.lineNumber)),"",0):(this.viewMoreContentWidget?.dispose(),this.viewMoreContentWidget=void 0)}renderViewMoreLines(b,E,y){const T=this.editor.getOption(44),R=document.createElement("div");R.className="suggest-preview-additional-widget",(0,A.applyFontInfo)(R,T);const O=document.createElement("span");O.className="content-spacer",O.append(E),R.append(O);const x=document.createElement("span");x.className="content-newline suggest-preview-text",x.append("\u23CE "),R.append(x);const F=new f.DisposableStore,L=document.createElement("div");return L.className="button suggest-preview-text",L.append(`+${y} lines\u2026`),F.add(t.addStandardDisposableListener(L,"mousedown",M=>{this.model?.setExpanded(!0),M.preventDefault(),this.editor.focus()})),R.append(L),new d(this.editor,b,R,F)}};u=Ee([W(2,l.IInstantiationService),W(3,o.ILanguageService)],u),e.GhostTextWidget=u;class a{constructor(b){this.editor=b,this.decorationIds=[]}setDecorations(b){this.decorationIds=this.editor.deltaDecorations(this.decorationIds,b)}dispose(){this.editor.deltaDecorations(this.decorationIds,[])}}class n{constructor(b){this.editor=b,this.decorationIds=[],this.disposableStore=new f.DisposableStore}dispose(){this.clear(),this.disposableStore.dispose()}clear(){this.editor.deltaDecorations(this.decorationIds,[]),this.disposableStore.clear()}setParts(b,E,y){if(this.disposableStore.clear(),!this.editor.getModel())return;const R=new Array;y&&R.push({range:w.Range.fromPositions(new I.Position(b,y.column),new I.Position(b,y.column+y.length)),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}}),this.decorationIds=this.editor.deltaDecorations(this.decorationIds,E.map(O=>({range:w.Range.fromPositions(new I.Position(b,O.column)),options:{description:"ghost-text",after:{content:O.text,inlineClassName:O.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:C.InjectedTextCursorStops.Left},showIfCollapsed:!0}})).concat(R))}}class h{constructor(b,E){this.editor=b,this.languageIdCodec=E,this._viewZoneId=void 0}get viewZoneId(){return this._viewZoneId}dispose(){this.clear()}clear(){this.editor.changeViewZones(b=>{this._viewZoneId&&(b.removeZone(this._viewZoneId),this._viewZoneId=void 0)})}updateLines(b,E,y){const T=this.editor.getModel();if(!T)return;const{tabSize:R}=T.getOptions();this.editor.changeViewZones(O=>{this._viewZoneId&&(O.removeZone(this._viewZoneId),this._viewZoneId=void 0);const x=Math.max(E.length,y);if(x>0){const F=document.createElement("div");g(F,R,E,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=O.addZone({afterLineNumber:b,heightInLines:x,domNode:F,afterColumnAffinity:1})}})}}function g(m,b,E,y,T){const R=y.get(29),O=y.get(105),x="none",F=y.get(83),L=y.get(45),M=y.get(44),N=y.get(59),B=(0,v.createStringBuilder)(1e4);B.appendASCIIString('<div class="suggest-preview-text">');for(let z=0,U=E.length;z<U;z++){const H=E[z],K=H.content;B.appendASCIIString('<div class="view-line'),B.appendASCIIString('" style="top:'),B.appendASCIIString(String(z*N)),B.appendASCIIString('px;width:1000000px;">');const G=_.isBasicASCII(K),q=_.containsRTL(K),Z=D.LineTokens.createEmpty(K,T);(0,S.renderViewLine)(new S.RenderLineInput(M.isMonospace&&!R,M.canUseHalfwidthRightwardsArrow,K,!1,G,q,0,Z,H.decorations,b,0,M.spaceWidth,M.middotWidth,M.wsmiddotWidth,O,x,F,L!==k.EditorFontLigatures.OFF,null),B),B.appendASCIIString("</div>")}B.appendASCIIString("</div>"),(0,A.applyFontInfo)(m,M);const P=B.build(),V=p?p.createHTML(P):P;m.innerHTML=V}class d extends f.Disposable{constructor(b,E,y,T){super();this.editor=b,this.position=E,this.domNode=y,this.allowEditorOverflow=!1,this.suppressMouseDown=!1,this._register(T),this._register((0,f.toDisposable)(()=>{this.editor.removeContentWidget(this)})),this.editor.addContentWidget(this)}getId(){return"editor.widget.viewMoreLinesWidget"}getDomNode(){return this.domNode}getPosition(){return{position:this.position,preference:[0]}}}(0,r.registerThemingParticipant)((m,b)=>{const E=m.getColor(c.ghostTextForeground);E&&(b.addRule(`.monaco-editor .ghost-text-decoration { color: ${E.toString()} !important; }`),b.addRule(`.monaco-editor .ghost-text-decoration-preview { color: ${E.toString()} !important; }`),b.addRule(`.monaco-editor .suggest-preview-text .ghost-text { color: ${E.toString()} !important; }`));const y=m.getColor(c.ghostTextBackground);y&&(b.addRule(`.monaco-editor .ghost-text-decoration { background-color: ${y.toString()}; }`),b.addRule(`.monaco-editor .ghost-text-decoration-preview { background-color: ${y.toString()}; }`),b.addRule(`.monaco-editor .suggest-preview-text .ghost-text { background-color: ${y.toString()}; }`));const T=m.getColor(c.ghostTextBorder);T&&(b.addRule(`.monaco-editor .suggest-preview-text .ghost-text { border: 1px solid ${T}; }`),b.addRule(`.monaco-editor .ghost-text-decoration { border: 1px solid ${T}; }`),b.addRule(`.monaco-editor .ghost-text-decoration-preview { border: 1px solid ${T}; }`))})}),define(ne[749],re([1,0,150,2,13,106,122,164,12]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEditorNavigationQuickAccessProvider=void 0;class w{constructor(C){this.options=C,this.rangeHighlightDecorationId=void 0}provide(C,o){const c=new f.DisposableStore;C.canAcceptInBackground=!!this.options?.canAcceptInBackground,C.matchOnLabel=C.matchOnDescription=C.matchOnDetail=C.sortByLabel=!1;const i=c.add(new f.MutableDisposable);return i.value=this.doProvide(C,o),c.add(this.onDidActiveTextEditorControlChange(()=>{i.value=void 0,i.value=this.doProvide(C,o)})),c}doProvide(C,o){const c=new f.DisposableStore,i=this.activeTextEditorControl;if(i&&this.canProvideWithTextEditor(i)){const S={editor:i},s=(0,A.getCodeEditor)(i);if(s){let l=(0,_.withNullAsUndefined)(i.saveViewState());c.add(s.onDidChangeCursorPosition(()=>{l=(0,_.withNullAsUndefined)(i.saveViewState())})),S.restoreViewState=()=>{l&&i===this.activeTextEditorControl&&i.restoreViewState(l)},c.add((0,t.once)(o.onCancellationRequested)(()=>S.restoreViewState?.()))}c.add((0,f.toDisposable)(()=>this.clearDecorations(i))),c.add(this.provideWithTextEditor(S,C,o))}else c.add(this.provideWithoutTextEditor(C,o));return c}canProvideWithTextEditor(C){return!0}gotoLocation({editor:C},o){C.setSelection(o.range),C.revealRangeInCenter(o.range,0),o.preserveFocus||C.focus()}getModel(C){return(0,A.isDiffEditor)(C)?C.getModel()?.modified:C.getModel()}addDecorations(C,o){C.changeDecorations(c=>{const i=[];this.rangeHighlightDecorationId&&(i.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),i.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const S=[{range:o,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:o,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:(0,I.themeColorFromId)(D.overviewRulerRangeHighlight),position:k.OverviewRulerLane.Full}}}],[s,l]=c.deltaDecorations(i,S);this.rangeHighlightDecorationId={rangeHighlightId:s,overviewRulerDecorationId:l}})}clearDecorations(C){const o=this.rangeHighlightDecorationId;o&&(C.changeDecorations(c=>{c.deltaDecorations([o.overviewRulerDecorationId,o.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}e.AbstractEditorNavigationQuickAccessProvider=w}),define(ne[750],re([1,0,2,106,749,1298]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractGotoLineQuickAccessProvider=void 0;class k extends _.AbstractEditorNavigationQuickAccessProvider{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(I){const w=(0,A.localize)(0,null);return I.items=[{label:w}],I.ariaLabel=w,t.Disposable.None}provideWithTextEditor(I,w,v){const C=I.editor,o=new t.DisposableStore;o.add(w.onDidAccept(S=>{const[s]=w.selectedItems;if(s){if(!this.isValidLineNumber(C,s.lineNumber))return;this.gotoLocation(I,{range:this.toRange(s.lineNumber,s.column),keyMods:w.keyMods,preserveFocus:S.inBackground}),S.inBackground||w.hide()}}));const c=()=>{const S=this.parsePosition(C,w.value.trim().substr(k.PREFIX.length)),s=this.getPickLabel(C,S.lineNumber,S.column);if(w.items=[{lineNumber:S.lineNumber,column:S.column,label:s}],w.ariaLabel=s,!this.isValidLineNumber(C,S.lineNumber)){this.clearDecorations(C);return}const l=this.toRange(S.lineNumber,S.column);C.revealRangeInCenter(l,0),this.addDecorations(C,l)};c(),o.add(w.onDidChangeValue(()=>c()));const i=(0,f.getCodeEditor)(C);return i&&i.getOptions().get(60).renderType===2&&(i.updateOptions({lineNumbers:"on"}),o.add((0,t.toDisposable)(()=>i.updateOptions({lineNumbers:"relative"})))),o}toRange(I=1,w=1){return{startLineNumber:I,startColumn:w,endLineNumber:I,endColumn:w}}parsePosition(I,w){const v=w.split(/,|:|#/).map(o=>parseInt(o,10)).filter(o=>!isNaN(o)),C=this.lineCount(I)+1;return{lineNumber:v[0]>0?v[0]:C+v[0],column:v[1]}}getPickLabel(I,w,v){if(this.isValidLineNumber(I,w))return this.isValidColumn(I,w,v)?(0,A.localize)(1,null,w,v):(0,A.localize)(2,null,w);const C=I.getPosition()||{lineNumber:1,column:1},o=this.lineCount(I);return o>1?(0,A.localize)(3,null,C.lineNumber,C.column,o):(0,A.localize)(4,null,C.lineNumber,C.column)}isValidLineNumber(I,w){return!w||typeof w!="number"?!1:w>0&&w<=this.lineCount(I)}isValidColumn(I,w,v){if(!v||typeof v!="number")return!1;const C=this.getModel(I);if(!C)return!1;const o={lineNumber:w,column:v};return C.validatePosition(o).equals(o)}lineCount(I){return this.getModel(I)?.getLineCount()??0}}e.AbstractGotoLineQuickAccessProvider=k,k.PREFIX=":"}),define(ne[2027],re([1,0,11,30,33,382,2,29,20,86,400,749,1299,62]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractGotoSymbolQuickAccessProvider=void 0;let i=class fr extends C.AbstractEditorNavigationQuickAccessProvider{constructor(r,p,u=Object.create(null)){super(u);this._languageFeaturesService=r,this._outlineModelService=p,this.options=u,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(r){return this.provideLabelPick(r,(0,o.localize)(0,null)),k.Disposable.None}provideWithTextEditor(r,p,u){const a=r.editor,n=this.getModel(a);return n?this._languageFeaturesService.documentSymbolProvider.has(n)?this.doProvideWithEditorSymbols(r,n,p,u):this.doProvideWithoutEditorSymbols(r,n,p,u):k.Disposable.None}doProvideWithoutEditorSymbols(r,p,u,a){const n=new k.DisposableStore;return this.provideLabelPick(u,(0,o.localize)(1,null)),(async()=>{!await this.waitForLanguageSymbolRegistry(p,n)||a.isCancellationRequested||n.add(this.doProvideWithEditorSymbols(r,p,u,a))})(),n}provideLabelPick(r,p){r.items=[{label:p,index:0,kind:14}],r.ariaLabel=p}async waitForLanguageSymbolRegistry(r,p){if(this._languageFeaturesService.documentSymbolProvider.has(r))return!0;const u=new t.DeferredPromise,a=p.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(r)&&(a.dispose(),u.complete(!0))}));return p.add((0,k.toDisposable)(()=>u.complete(!1))),u.p}doProvideWithEditorSymbols(r,p,u,a){const n=r.editor,h=new k.DisposableStore;h.add(u.onDidAccept(E=>{const[y]=u.selectedItems;y&&y.range&&(this.gotoLocation(r,{range:y.range.selection,keyMods:u.keyMods,preserveFocus:E.inBackground}),E.inBackground||u.hide())})),h.add(u.onDidTriggerItemButton(({item:E})=>{E&&E.range&&(this.gotoLocation(r,{range:E.range.selection,keyMods:u.keyMods,forceSideBySide:!0}),u.hide())}));const g=this.getDocumentSymbols(p,a);let d;const m=async()=>{d?.dispose(!0),u.busy=!1,d=new f.CancellationTokenSource(a),u.busy=!0;try{const E=(0,A.prepareQuery)(u.value.substr(fr.PREFIX.length).trim()),y=await this.doGetSymbolPicks(g,E,void 0,d.token);if(a.isCancellationRequested)return;y.length>0?u.items=y:E.original.length>0?this.provideLabelPick(u,(0,o.localize)(2,null)):this.provideLabelPick(u,(0,o.localize)(3,null))}finally{a.isCancellationRequested||(u.busy=!1)}};h.add(u.onDidChangeValue(()=>m())),m();let b=!0;return h.add(u.onDidChangeActive(()=>{const[E]=u.activeItems;if(E&&E.range){if(b){b=!1;return}n.revealRangeInCenter(E.range.selection,0),this.addDecorations(n,E.range.decoration)}})),h}async doGetSymbolPicks(r,p,u,a){const n=await r;if(a.isCancellationRequested)return[];const h=p.original.indexOf(fr.SCOPE_PREFIX)===0,g=h?1:0;let d,m;p.values&&p.values.length>1?(d=(0,A.pieceToQuery)(p.values[0]),m=(0,A.pieceToQuery)(p.values.slice(1))):d=p;const b=[];for(let T=0;T<n.length;T++){const R=n[T],O=(0,D.trim)(R.name),x=`$(${w.SymbolKinds.toIcon(R.kind).id}) ${O}`,F=x.length-O.length;let L=R.containerName;u?.extraContainerLabel&&(L?L=`${u.extraContainerLabel} \u2022 ${L}`:L=u.extraContainerLabel);let M,N,B,P;if(p.original.length>g){let z=!1;if(d!==p&&([M,N]=(0,A.scoreFuzzy2)(x,{...p,values:void 0},g,F),typeof M=="number"&&(z=!0)),typeof M!="number"&&([M,N]=(0,A.scoreFuzzy2)(x,d,g,F),typeof M!="number"))continue;if(!z&&m){if(L&&m.original.length>0&&([B,P]=(0,A.scoreFuzzy2)(L,m)),typeof B!="number")continue;typeof M=="number"&&(M+=B)}}const V=R.tags&&R.tags.indexOf(1)>=0;b.push({index:T,kind:R.kind,score:M,label:x,ariaLabel:O,description:L,highlights:V?void 0:{label:N,description:P},range:{selection:I.Range.collapseToStart(R.selectionRange),decoration:R.range},strikethrough:V,buttons:(()=>{const z=this.options?.openSideBySideDirection?this.options?.openSideBySideDirection():void 0;if(!!z)return[{iconClass:z==="right"?_.Codicon.splitHorizontal.classNames:_.Codicon.splitVertical.classNames,tooltip:z==="right"?(0,o.localize)(4,null):(0,o.localize)(5,null)}]})()})}const E=b.sort((T,R)=>h?this.compareByKindAndScore(T,R):this.compareByScore(T,R));let y=[];if(h){let x=function(){R&&typeof T=="number"&&O>0&&(R.label=(0,D.format)(s[T]||S,O))},T,R,O=0;for(const F of E)T!==F.kind?(x(),T=F.kind,O=1,R={type:"separator"},y.push(R)):O++,y.push(F);x()}else E.length>0&&(y=[{label:(0,o.localize)(6,null,b.length),type:"separator"},...E]);return y}compareByScore(r,p){if(typeof r.score!="number"&&typeof p.score=="number")return 1;if(typeof r.score=="number"&&typeof p.score!="number")return-1;if(typeof r.score=="number"&&typeof p.score=="number"){if(r.score>p.score)return-1;if(r.score<p.score)return 1}return r.index<p.index?-1:r.index>p.index?1:0}compareByKindAndScore(r,p){const u=s[r.kind]||S,a=s[p.kind]||S,n=u.localeCompare(a);return n===0?this.compareByScore(r,p):n}async getDocumentSymbols(r,p){const u=await this._outlineModelService.getOrCreate(r,p);return p.isCancellationRequested?[]:u.asListOfDocumentSymbols()}};i.PREFIX="@",i.SCOPE_PREFIX=":",i.PREFIX_BY_CATEGORY=`${i.PREFIX}${i.SCOPE_PREFIX}`,i=Ee([W(0,c.ILanguageFeaturesService),W(1,v.IOutlineModelService)],i),e.AbstractGotoSymbolQuickAccessProvider=i;const S=(0,o.localize)(7,null),s={[5]:(0,o.localize)(8,null),[11]:(0,o.localize)(9,null),[8]:(0,o.localize)(10,null),[12]:(0,o.localize)(11,null),[4]:(0,o.localize)(12,null),[22]:(0,o.localize)(13,null),[23]:(0,o.localize)(14,null),[24]:(0,o.localize)(15,null),[10]:(0,o.localize)(16,null),[2]:(0,o.localize)(17,null),[3]:(0,o.localize)(18,null),[25]:(0,o.localize)(19,null),[1]:(0,o.localize)(20,null),[6]:(0,o.localize)(21,null),[9]:(0,o.localize)(22,null),[21]:(0,o.localize)(23,null),[14]:(0,o.localize)(24,null),[0]:(0,o.localize)(25,null),[17]:(0,o.localize)(26,null),[15]:(0,o.localize)(27,null),[16]:(0,o.localize)(28,null),[18]:(0,o.localize)(29,null),[19]:(0,o.localize)(30,null),[7]:(0,o.localize)(31,null),[13]:(0,o.localize)(32,null)}}),define(ne[2028],re([1,0,2,49,1301,7,38,32,12,1038]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RenameInputField=e.CONTEXT_RENAME_INPUT_VISIBLE=void 0,e.CONTEXT_RENAME_INPUT_VISIBLE=new A.RawContextKey("renameInputVisible",!1,(0,_.localize)(0,null));let w=class{constructor(C,o,c,i,S){this._editor=C,this._acceptKeybindings=o,this._themeService=c,this._keybindingService=i,this._disposables=new t.DisposableStore,this.allowEditorOverflow=!0,this._visibleContextKey=e.CONTEXT_RENAME_INPUT_VISIBLE.bindTo(S),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(44)&&this._updateFont()})),this._disposables.add(c.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){if(!this._domNode){this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._input=document.createElement("input"),this._input.className="rename-input",this._input.type="text",this._input.setAttribute("aria-label",(0,_.localize)(1,null)),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label);const C=()=>{const[o,c]=this._acceptKeybindings;this._keybindingService.lookupKeybinding(o),this._label.innerText=(0,_.localize)(2,null,this._keybindingService.lookupKeybinding(o)?.getLabel(),this._keybindingService.lookupKeybinding(c)?.getLabel())};C(),this._disposables.add(this._keybindingService.onDidUpdateKeybindings(C)),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())}return this._domNode}_updateStyles(C){if(!this._input||!this._domNode)return;const o=C.getColor(D.widgetShadow);this._domNode.style.backgroundColor=String(C.getColor(D.editorWidgetBackground)??""),this._domNode.style.boxShadow=o?` 0 0 8px 2px ${o}`:"",this._domNode.style.color=String(C.getColor(D.inputForeground)??""),this._input.style.backgroundColor=String(C.getColor(D.inputBackground)??"");const c=C.getColor(D.inputBorder);this._input.style.borderWidth=c?"1px":"0px",this._input.style.borderStyle=c?"solid":"none",this._input.style.borderColor=c?.toString()??"none"}_updateFont(){if(!this._input||!this._label)return;const C=this._editor.getOption(44);this._input.style.fontFamily=C.fontFamily,this._input.style.fontWeight=C.fontWeight,this._input.style.fontSize=`${C.fontSize}px`,this._label.style.fontSize=`${C.fontSize*.8}px`}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}afterRender(C){C||this.cancelInput(!0)}acceptInput(C){this._currentAcceptInput&&this._currentAcceptInput(C)}cancelInput(C){this._currentCancelInput&&this._currentCancelInput(C)}getInput(C,o,c,i,S,s){this._domNode.classList.toggle("preview",S),this._position=new f.Position(C.startLineNumber,C.startColumn),this._input.value=o,this._input.setAttribute("selectionStart",c.toString()),this._input.setAttribute("selectionEnd",i.toString()),this._input.size=Math.max((C.endColumn-C.startColumn)*1.1,20);const l=new t.DisposableStore;return new Promise(r=>{this._currentCancelInput=p=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,r(p),!0),this._currentAcceptInput=p=>{if(this._input.value.trim().length===0||this._input.value===o){this.cancelInput(!0);return}this._currentAcceptInput=void 0,this._currentCancelInput=void 0,r({newName:this._input.value,wantsPreview:S&&p})},l.add(s.onCancellationRequested(()=>this.cancelInput(!0))),l.add(this._editor.onDidBlurEditorWidget(()=>this.cancelInput(!1))),this._show()}).finally(()=>{l.dispose(),this._hide()})}_show(){this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout(()=>{this._input.focus(),this._input.setSelectionRange(parseInt(this._input.getAttribute("selectionStart")),parseInt(this._input.getAttribute("selectionEnd")))},100)}_hide(){this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}};w=Ee([W(2,I.IThemeService),W(3,k.IKeybindingService),W(4,A.IContextKeyService)],w),e.RenameInputField=w}),define(ne[751],re([1,0,33,1311,32,12]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SYMBOL_ICON_VARIABLE_FOREGROUND=e.SYMBOL_ICON_UNIT_FOREGROUND=e.SYMBOL_ICON_TYPEPARAMETER_FOREGROUND=e.SYMBOL_ICON_TEXT_FOREGROUND=e.SYMBOL_ICON_STRUCT_FOREGROUND=e.SYMBOL_ICON_STRING_FOREGROUND=e.SYMBOL_ICON_SNIPPET_FOREGROUND=e.SYMBOL_ICON_REFERENCE_FOREGROUND=e.SYMBOL_ICON_PROPERTY_FOREGROUND=e.SYMBOL_ICON_PACKAGE_FOREGROUND=e.SYMBOL_ICON_OPERATOR_FOREGROUND=e.SYMBOL_ICON_OBJECT_FOREGROUND=e.SYMBOL_ICON_NUMBER_FOREGROUND=e.SYMBOL_ICON_NULL_FOREGROUND=e.SYMBOL_ICON_NAMESPACE_FOREGROUND=e.SYMBOL_ICON_MODULE_FOREGROUND=e.SYMBOL_ICON_METHOD_FOREGROUND=e.SYMBOL_ICON_KEYWORD_FOREGROUND=e.SYMBOL_ICON_KEY_FOREGROUND=e.SYMBOL_ICON_INTERFACE_FOREGROUND=e.SYMBOL_ICON_FUNCTION_FOREGROUND=e.SYMBOL_ICON_FOLDER_FOREGROUND=e.SYMBOL_ICON_FILE_FOREGROUND=e.SYMBOL_ICON_FIELD_FOREGROUND=e.SYMBOL_ICON_EVENT_FOREGROUND=e.SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND=e.SYMBOL_ICON_ENUMERATOR_FOREGROUND=e.SYMBOL_ICON_CONSTRUCTOR_FOREGROUND=e.SYMBOL_ICON_CONSTANT_FOREGROUND=e.SYMBOL_ICON_COLOR_FOREGROUND=e.SYMBOL_ICON_CLASS_FOREGROUND=e.SYMBOL_ICON_BOOLEAN_FOREGROUND=e.SYMBOL_ICON_ARRAY_FOREGROUND=void 0,e.SYMBOL_ICON_ARRAY_FOREGROUND=(0,_.registerColor)("symbolIcon.arrayForeground",{dark:_.foreground,light:_.foreground,hcDark:_.foreground,hcLight:_.foreground},(0,f.localize)(0,null)),e.SYMBOL_ICON_BOOLEAN_FOREGROUND=(0,_.registerColor)("symbolIcon.booleanForeground",{dark:_.foreground,light:_.foreground,hcDark:_.foreground,hcLight:_.foreground},(0,f.localize)(1,null)),e.SYMBOL_ICON_CLASS_FOREGROUND=(0,_.registerColor)("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,f.localize)(2,null)),e.SYMBOL_ICON_COLOR_FOREGROUND=(0,_.registerColor)("symbolIcon.colorForeground",{dark:_.foreground,light:_.foreground,hcDark:_.foreground,hcLight:_.foreground},(0,f.localize)(3,null)),e.SYMBOL_ICON_CONSTANT_FOREGROUND=(0,_.registerColor)("symbolIcon.constantForeground",{dark:_.foreground,light:_.foreground,hcDark:_.foreground,hcLight:_.foreground},(0,f.localize)(4,null)),e.SYMBOL_ICON_CONSTRUCTOR_FOREGROUND=(0,_.registerColor)("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,f.localize)(5,null)),e.SYMBOL_ICON_ENUMERATOR_FOREGROUND=(0,_.registerColor)("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,f.localize)(6,null)),e.SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND=(0,_.registerColor)("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,f.localize)(7,null)),e.SYMBOL_ICON_EVENT_FOREGROUND=(0,_.registerColor)("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,f.localize)(8,null)),e.SYMBOL_ICON_FIELD_FOREGROUND=(0,_.registerColor)("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,f.localize)(9,null)),e.SYMBOL_ICON_FILE_FOREGROUND=(0,_.registerColor)("symbolIcon.fileForeground",{dark:_.foreground,light:_.foreground,hcDark:_.foreground,hcLight:_.foreground},(0,f.localize)(10,null)),e.SYMBOL_ICON_FOLDER_FOREGROUND=(0,_.registerColor)("symbolIcon.folderForeground",{dark:_.foreground,light:_.foreground,hcDark:_.foreground,hcLight:_.foreground},(0,f.localize)(11,null)),e.SYMBOL_ICON_FUNCTION_FOREGROUND=(0,_.registerColor)("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,f.localize)(12,null)),e.SYMBOL_ICON_INTERFACE_FOREGROUND=(0,_.registerColor)("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,f.localize)(13,null)),e.SYMBOL_ICON_KEY_FOREGROUND=(0,_.registerColor)("symbolIcon.keyForeground",{dark:_.foreground,light:_.foreground,hcDark:_.foreground,hcLight:_.foreground},(0,f.localize)(14,null)),e.SYMBOL_ICON_KEYWORD_FOREGROUND=(0,_.registerColor)("symbolIcon.keywordForeground",{dark:_.foreground,light:_.foreground,hcDark:_.foreground,hcLight:_.foreground},(0,f.localize)(15,null)),e.SYMBOL_ICON_METHOD_FOREGROUND=(0,_.registerColor)("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,f.localize)(16,null)),e.SYMBOL_ICON_MODULE_FOREGROUND=(0,_.registerColor)("symbolIcon.moduleForeground",{dark:_.foreground,light:_.foreground,hcDark:_.foreground,hcLight:_.foreground},(0,f.localize)(17,null)),e.SYMBOL_ICON_NAMESPACE_FOREGROUND=(0,_.registerColor)("symbolIcon.namespaceForeground",{dark:_.foreground,light:_.foreground,hcDark:_.foreground,hcLight:_.foreground},(0,f.localize)(18,null)),e.SYMBOL_ICON_NULL_FOREGROUND=(0,_.registerColor)("symbolIcon.nullForeground",{dark:_.foreground,light:_.foreground,hcDark:_.foreground,hcLight:_.foreground},(0,f.localize)(19,null)),e.SYMBOL_ICON_NUMBER_FOREGROUND=(0,_.registerColor)("symbolIcon.numberForeground",{dark:_.foreground,light:_.foreground,hcDark:_.foreground,hcLight:_.foreground},(0,f.localize)(20,null)),e.SYMBOL_ICON_OBJECT_FOREGROUND=(0,_.registerColor)("symbolIcon.objectForeground",{dark:_.foreground,light:_.foreground,hcDark:_.foreground,hcLight:_.foreground},(0,f.localize)(21,null)),e.SYMBOL_ICON_OPERATOR_FOREGROUND=(0,_.registerColor)("symbolIcon.operatorForeground",{dark:_.foreground,light:_.foreground,hcDark:_.foreground,hcLight:_.foreground},(0,f.localize)(22,null)),e.SYMBOL_ICON_PACKAGE_FOREGROUND=(0,_.registerColor)("symbolIcon.packageForeground",{dark:_.foreground,light:_.foreground,hcDark:_.foreground,hcLight:_.foreground},(0,f.localize)(23,null)),e.SYMBOL_ICON_PROPERTY_FOREGROUND=(0,_.registerColor)("symbolIcon.propertyForeground",{dark:_.foreground,light:_.foreground,hcDark:_.foreground,hcLight:_.foreground},(0,f.localize)(24,null)),e.SYMBOL_ICON_REFERENCE_FOREGROUND=(0,_.registerColor)("symbolIcon.referenceForeground",{dark:_.foreground,light:_.foreground,hcDark:_.foreground,hcLight:_.foreground},(0,f.localize)(25,null)),e.SYMBOL_ICON_SNIPPET_FOREGROUND=(0,_.registerColor)("symbolIcon.snippetForeground",{dark:_.foreground,light:_.foreground,hcDark:_.foreground,hcLight:_.foreground},(0,f.localize)(26,null)),e.SYMBOL_ICON_STRING_FOREGROUND=(0,_.registerColor)("symbolIcon.stringForeground",{dark:_.foreground,light:_.foreground,hcDark:_.foreground,hcLight:_.foreground},(0,f.localize)(27,null)),e.SYMBOL_ICON_STRUCT_FOREGROUND=(0,_.registerColor)("symbolIcon.structForeground",{dark:_.foreground,light:_.foreground,hcDark:_.foreground,hcLight:_.foreground},(0,f.localize)(28,null)),e.SYMBOL_ICON_TEXT_FOREGROUND=(0,_.registerColor)("symbolIcon.textForeground",{dark:_.foreground,light:_.foreground,hcDark:_.foreground,hcLight:_.foreground},(0,f.localize)(29,null)),e.SYMBOL_ICON_TYPEPARAMETER_FOREGROUND=(0,_.registerColor)("symbolIcon.typeParameterForeground",{dark:_.foreground,light:_.foreground,hcDark:_.foreground,hcLight:_.foreground},(0,f.localize)(30,null)),e.SYMBOL_ICON_UNIT_FOREGROUND=(0,_.registerColor)("symbolIcon.unitForeground",{dark:_.foreground,light:_.foreground,hcDark:_.foreground,hcLight:_.foreground},(0,f.localize)(31,null)),e.SYMBOL_ICON_VARIABLE_FOREGROUND=(0,_.registerColor)("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,f.localize)(32,null)),(0,A.registerThemingParticipant)((k,D)=>{const I=k.getColor(e.SYMBOL_ICON_ARRAY_FOREGROUND);I&&D.addRule(`${t.Codicon.symbolArray.cssSelector} { color: ${I}; }`);const w=k.getColor(e.SYMBOL_ICON_BOOLEAN_FOREGROUND);w&&D.addRule(`${t.Codicon.symbolBoolean.cssSelector} { color: ${w}; }`);const v=k.getColor(e.SYMBOL_ICON_CLASS_FOREGROUND);v&&D.addRule(`${t.Codicon.symbolClass.cssSelector} { color: ${v}; }`);const C=k.getColor(e.SYMBOL_ICON_METHOD_FOREGROUND);C&&D.addRule(`${t.Codicon.symbolMethod.cssSelector} { color: ${C}; }`);const o=k.getColor(e.SYMBOL_ICON_COLOR_FOREGROUND);o&&D.addRule(`${t.Codicon.symbolColor.cssSelector} { color: ${o}; }`);const c=k.getColor(e.SYMBOL_ICON_CONSTANT_FOREGROUND);c&&D.addRule(`${t.Codicon.symbolConstant.cssSelector} { color: ${c}; }`);const i=k.getColor(e.SYMBOL_ICON_CONSTRUCTOR_FOREGROUND);i&&D.addRule(`${t.Codicon.symbolConstructor.cssSelector} { color: ${i}; }`);const S=k.getColor(e.SYMBOL_ICON_ENUMERATOR_FOREGROUND);S&&D.addRule(` ${t.Codicon.symbolValue.cssSelector},${t.Codicon.symbolEnum.cssSelector} { color: ${S}; }`);const s=k.getColor(e.SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND);s&&D.addRule(`${t.Codicon.symbolEnumMember.cssSelector} { color: ${s}; }`);const l=k.getColor(e.SYMBOL_ICON_EVENT_FOREGROUND);l&&D.addRule(`${t.Codicon.symbolEvent.cssSelector} { color: ${l}; }`);const r=k.getColor(e.SYMBOL_ICON_FIELD_FOREGROUND);r&&D.addRule(`${t.Codicon.symbolField.cssSelector} { color: ${r}; }`);const p=k.getColor(e.SYMBOL_ICON_FILE_FOREGROUND);p&&D.addRule(`${t.Codicon.symbolFile.cssSelector} { color: ${p}; }`);const u=k.getColor(e.SYMBOL_ICON_FOLDER_FOREGROUND);u&&D.addRule(`${t.Codicon.symbolFolder.cssSelector} { color: ${u}; }`);const a=k.getColor(e.SYMBOL_ICON_FUNCTION_FOREGROUND);a&&D.addRule(`${t.Codicon.symbolFunction.cssSelector} { color: ${a}; }`);const n=k.getColor(e.SYMBOL_ICON_INTERFACE_FOREGROUND);n&&D.addRule(`${t.Codicon.symbolInterface.cssSelector} { color: ${n}; }`);const h=k.getColor(e.SYMBOL_ICON_KEY_FOREGROUND);h&&D.addRule(`${t.Codicon.symbolKey.cssSelector} { color: ${h}; }`);const g=k.getColor(e.SYMBOL_ICON_KEYWORD_FOREGROUND);g&&D.addRule(`${t.Codicon.symbolKeyword.cssSelector} { color: ${g}; }`);const d=k.getColor(e.SYMBOL_ICON_MODULE_FOREGROUND);d&&D.addRule(`${t.Codicon.symbolModule.cssSelector} { color: ${d}; }`);const m=k.getColor(e.SYMBOL_ICON_NAMESPACE_FOREGROUND);m&&D.addRule(`${t.Codicon.symbolNamespace.cssSelector} { color: ${m}; }`);const b=k.getColor(e.SYMBOL_ICON_NULL_FOREGROUND);b&&D.addRule(`${t.Codicon.symbolNull.cssSelector} { color: ${b}; }`);const E=k.getColor(e.SYMBOL_ICON_NUMBER_FOREGROUND);E&&D.addRule(`${t.Codicon.symbolNumber.cssSelector} { color: ${E}; }`);const y=k.getColor(e.SYMBOL_ICON_OBJECT_FOREGROUND);y&&D.addRule(`${t.Codicon.symbolObject.cssSelector} { color: ${y}; }`);const T=k.getColor(e.SYMBOL_ICON_OPERATOR_FOREGROUND);T&&D.addRule(`${t.Codicon.symbolOperator.cssSelector} { color: ${T}; }`);const R=k.getColor(e.SYMBOL_ICON_PACKAGE_FOREGROUND);R&&D.addRule(`${t.Codicon.symbolPackage.cssSelector} { color: ${R}; }`);const O=k.getColor(e.SYMBOL_ICON_PROPERTY_FOREGROUND);O&&D.addRule(`${t.Codicon.symbolProperty.cssSelector} { color: ${O}; }`);const x=k.getColor(e.SYMBOL_ICON_REFERENCE_FOREGROUND);x&&D.addRule(`${t.Codicon.symbolReference.cssSelector} { color: ${x}; }`);const F=k.getColor(e.SYMBOL_ICON_SNIPPET_FOREGROUND);F&&D.addRule(`${t.Codicon.symbolSnippet.cssSelector} { color: ${F}; }`);const L=k.getColor(e.SYMBOL_ICON_STRING_FOREGROUND);L&&D.addRule(`${t.Codicon.symbolString.cssSelector} { color: ${L}; }`);const M=k.getColor(e.SYMBOL_ICON_STRUCT_FOREGROUND);M&&D.addRule(`${t.Codicon.symbolStruct.cssSelector} { color: ${M}; }`);const N=k.getColor(e.SYMBOL_ICON_TEXT_FOREGROUND);N&&D.addRule(`${t.Codicon.symbolText.cssSelector} { color: ${N}; }`);const B=k.getColor(e.SYMBOL_ICON_TYPEPARAMETER_FOREGROUND);B&&D.addRule(`${t.Codicon.symbolTypeParameter.cssSelector} { color: ${B}; }`);const P=k.getColor(e.SYMBOL_ICON_UNIT_FOREGROUND);P&&D.addRule(`${t.Codicon.symbolUnit.cssSelector} { color: ${P}; }`);const V=k.getColor(e.SYMBOL_ICON_VARIABLE_FOREGROUND);V&&D.addRule(`${t.Codicon.symbolVariable.cssSelector} { color: ${V}; }`)})}),define(ne[16],re([1,0,36,33,6,92,2,194,28,7,99,5,94,12]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerAction2=e.Action2=e.SyncActionDescriptor=e.MenuItemAction=e.SubmenuItemAction=e.MenuRegistry=e.IMenuService=e.MenuId=e.isISubmenuItem=e.isIMenuItem=void 0;function i(n){return n.command!==void 0}e.isIMenuItem=i;function S(n){return n.submenu!==void 0}e.isISubmenuItem=S;class s{constructor(h){this.id=s._idPool++,this._debugName=h}}e.MenuId=s,s._idPool=0,s.CommandPalette=new s("CommandPalette"),s.DebugBreakpointsContext=new s("DebugBreakpointsContext"),s.DebugCallStackContext=new s("DebugCallStackContext"),s.DebugConsoleContext=new s("DebugConsoleContext"),s.DebugVariablesContext=new s("DebugVariablesContext"),s.DebugWatchContext=new s("DebugWatchContext"),s.DebugToolBar=new s("DebugToolBar"),s.EditorContext=new s("EditorContext"),s.SimpleEditorContext=new s("SimpleEditorContext"),s.EditorContextCopy=new s("EditorContextCopy"),s.EditorContextPeek=new s("EditorContextPeek"),s.EditorTitle=new s("EditorTitle"),s.EditorTitleRun=new s("EditorTitleRun"),s.EditorTitleContext=new s("EditorTitleContext"),s.EmptyEditorGroup=new s("EmptyEditorGroup"),s.EmptyEditorGroupContext=new s("EmptyEditorGroupContext"),s.ExplorerContext=new s("ExplorerContext"),s.ExtensionContext=new s("ExtensionContext"),s.GlobalActivity=new s("GlobalActivity"),s.LayoutControlMenuSubmenu=new s("LayoutControlMenuSubmenu"),s.LayoutControlMenu=new s("LayoutControlMenu"),s.MenubarMainMenu=new s("MenubarMainMenu"),s.MenubarAppearanceMenu=new s("MenubarAppearanceMenu"),s.MenubarDebugMenu=new s("MenubarDebugMenu"),s.MenubarEditMenu=new s("MenubarEditMenu"),s.MenubarCopy=new s("MenubarCopy"),s.MenubarFileMenu=new s("MenubarFileMenu"),s.MenubarGoMenu=new s("MenubarGoMenu"),s.MenubarHelpMenu=new s("MenubarHelpMenu"),s.MenubarLayoutMenu=new s("MenubarLayoutMenu"),s.MenubarNewBreakpointMenu=new s("MenubarNewBreakpointMenu"),s.MenubarPanelAlignmentMenu=new s("MenubarPanelAlignmentMenu"),s.MenubarPanelPositionMenu=new s("MenubarPanelPositionMenu"),s.MenubarPreferencesMenu=new s("MenubarPreferencesMenu"),s.MenubarRecentMenu=new s("MenubarRecentMenu"),s.MenubarSelectionMenu=new s("MenubarSelectionMenu"),s.MenubarSwitchEditorMenu=new s("MenubarSwitchEditorMenu"),s.MenubarSwitchGroupMenu=new s("MenubarSwitchGroupMenu"),s.MenubarTerminalMenu=new s("MenubarTerminalMenu"),s.MenubarViewMenu=new s("MenubarViewMenu"),s.MenubarHomeMenu=new s("MenubarHomeMenu"),s.OpenEditorsContext=new s("OpenEditorsContext"),s.ProblemsPanelContext=new s("ProblemsPanelContext"),s.SCMChangeContext=new s("SCMChangeContext"),s.SCMResourceContext=new s("SCMResourceContext"),s.SCMResourceFolderContext=new s("SCMResourceFolderContext"),s.SCMResourceGroupContext=new s("SCMResourceGroupContext"),s.SCMSourceControl=new s("SCMSourceControl"),s.SCMTitle=new s("SCMTitle"),s.SearchContext=new s("SearchContext"),s.StatusBarWindowIndicatorMenu=new s("StatusBarWindowIndicatorMenu"),s.StatusBarRemoteIndicatorMenu=new s("StatusBarRemoteIndicatorMenu"),s.TestItem=new s("TestItem"),s.TestItemGutter=new s("TestItemGutter"),s.TestPeekElement=new s("TestPeekElement"),s.TestPeekTitle=new s("TestPeekTitle"),s.TouchBarContext=new s("TouchBarContext"),s.TitleBarContext=new s("TitleBarContext"),s.TunnelContext=new s("TunnelContext"),s.TunnelPrivacy=new s("TunnelPrivacy"),s.TunnelProtocol=new s("TunnelProtocol"),s.TunnelPortInline=new s("TunnelInline"),s.TunnelTitle=new s("TunnelTitle"),s.TunnelLocalAddressInline=new s("TunnelLocalAddressInline"),s.TunnelOriginInline=new s("TunnelOriginInline"),s.ViewItemContext=new s("ViewItemContext"),s.ViewContainerTitle=new s("ViewContainerTitle"),s.ViewContainerTitleContext=new s("ViewContainerTitleContext"),s.ViewTitle=new s("ViewTitle"),s.ViewTitleContext=new s("ViewTitleContext"),s.CommentThreadTitle=new s("CommentThreadTitle"),s.CommentThreadActions=new s("CommentThreadActions"),s.CommentTitle=new s("CommentTitle"),s.CommentActions=new s("CommentActions"),s.InteractiveToolbar=new s("InteractiveToolbar"),s.InteractiveCellTitle=new s("InteractiveCellTitle"),s.InteractiveCellExecute=new s("InteractiveCellExecute"),s.InteractiveInputExecute=new s("InteractiveInputExecute"),s.NotebookToolbar=new s("NotebookToolbar"),s.NotebookCellTitle=new s("NotebookCellTitle"),s.NotebookCellInsert=new s("NotebookCellInsert"),s.NotebookCellBetween=new s("NotebookCellBetween"),s.NotebookCellListTop=new s("NotebookCellTop"),s.NotebookCellExecute=new s("NotebookCellExecute"),s.NotebookCellExecutePrimary=new s("NotebookCellExecutePrimary"),s.NotebookDiffCellInputTitle=new s("NotebookDiffCellInputTitle"),s.NotebookDiffCellMetadataTitle=new s("NotebookDiffCellMetadataTitle"),s.NotebookDiffCellOutputsTitle=new s("NotebookDiffCellOutputsTitle"),s.NotebookOutputToolbar=new s("NotebookOutputToolbar"),s.NotebookEditorLayoutConfigure=new s("NotebookEditorLayoutConfigure"),s.BulkEditTitle=new s("BulkEditTitle"),s.BulkEditContext=new s("BulkEditContext"),s.TimelineItemContext=new s("TimelineItemContext"),s.TimelineTitle=new s("TimelineTitle"),s.TimelineTitleContext=new s("TimelineTitleContext"),s.TimelineFilterSubMenu=new s("TimelineFilterSubMenu"),s.AccountsContext=new s("AccountsContext"),s.PanelTitle=new s("PanelTitle"),s.AuxiliaryBarTitle=new s("AuxiliaryBarTitle"),s.TerminalInstanceContext=new s("TerminalInstanceContext"),s.TerminalEditorInstanceContext=new s("TerminalEditorInstanceContext"),s.TerminalNewDropdownContext=new s("TerminalNewDropdownContext"),s.TerminalTabContext=new s("TerminalTabContext"),s.TerminalTabEmptyAreaContext=new s("TerminalTabEmptyAreaContext"),s.TerminalInlineTabContext=new s("TerminalInlineTabContext"),s.WebviewContext=new s("WebviewContext"),s.InlineCompletionsActions=new s("InlineCompletionsActions"),s.NewFile=new s("NewFile"),e.IMenuService=(0,C.createDecorator)("menuService"),e.MenuRegistry=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new _.Emitter,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:n=>n===s.CommandPalette}}addCommand(n){return this.addCommands(A.Iterable.single(n))}addCommands(n){for(const h of n)this._commands.set(h.id,h);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,k.toDisposable)(()=>{let h=!1;for(const g of n)h=this._commands.delete(g.id)||h;h&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(n){return this._commands.get(n)}getCommands(){const n=new Map;return this._commands.forEach((h,g)=>n.set(g,h)),n}appendMenuItem(n,h){return this.appendMenuItems(A.Iterable.single({id:n,item:h}))}appendMenuItems(n){const h=new Set,g=new D.LinkedList;for(const{id:d,item:m}of n){let b=this._menuItems.get(d);b||(b=new D.LinkedList,this._menuItems.set(d,b)),g.push(b.push(m)),h.add(d)}return this._onDidChangeMenu.fire(h),(0,k.toDisposable)(()=>{if(g.size>0){for(let d of g)d();this._onDidChangeMenu.fire(h),g.clear()}})}getMenuItems(n){let h;return this._menuItems.has(n)?h=[...this._menuItems.get(n)]:h=[],n===s.CommandPalette&&this._appendImplicitItems(h),h}_appendImplicitItems(n){const h=new Set;for(const g of n)i(g)&&(h.add(g.command.id),g.alt&&h.add(g.alt.id));this._commands.forEach((g,d)=>{h.has(d)||n.push({command:g})})}};class l extends t.SubmenuAction{constructor(h,g,d,m){super(`submenuitem.${h.submenu.id}`,typeof h.title=="string"?h.title:h.title.value,[],"submenu");this.item=h,this._menuService=g,this._contextKeyService=d,this._options=m}get actions(){const h=[],g=this._menuService.createMenu(this.item.submenu,this._contextKeyService),d=g.getActions(this._options);g.dispose();for(const[,m]of d)m.length>0&&(h.push(...m),h.push(new t.Separator));return h.length&&h.pop(),h}}e.SubmenuItemAction=l;let r=class Gs{constructor(h,g,d,m,b){if(this._commandService=b,this.id=h.id,this.label=d?.renderShortTitle&&h.shortTitle?typeof h.shortTitle=="string"?h.shortTitle:h.shortTitle.value:typeof h.title=="string"?h.title:h.title.value,this.tooltip=(typeof h.tooltip=="string"?h.tooltip:h.tooltip?.value)??"",this.enabled=!h.precondition||m.contextMatchesRules(h.precondition),this.checked=void 0,h.toggled){const E=h.toggled.condition?h.toggled:{condition:h.toggled};this.checked=m.contextMatchesRules(E.condition),this.checked&&E.tooltip&&(this.tooltip=typeof E.tooltip=="string"?E.tooltip:E.tooltip.value),E.title&&(this.label=typeof E.title=="string"?E.title:E.title.value)}this.item=h,this.alt=g?new Gs(g,void 0,d,m,b):void 0,this._options=d,c.ThemeIcon.isThemeIcon(h.icon)&&(this.class=f.CSSIcon.asClassName(h.icon))}dispose(){}run(...h){let g=[];return this._options?.arg&&(g=[...g,this._options.arg]),this._options?.shouldForwardArgs&&(g=[...g,...h]),this._commandService.executeCommand(this.id,...g)}};r=Ee([W(3,w.IContextKeyService),W(4,I.ICommandService)],r),e.MenuItemAction=r;class p{constructor(h,g,d,m,b,E){this._id=g,this._label=d,this._keybindings=m,this._keybindingContext=b,this._keybindingWeight=E,this._descriptor=new v.SyncDescriptor(h,[this._id,this._label])}static create(h,g,d,m,b,E){return new p(h,g,d,m,b,E)}static from(h,g,d,m){return p.create(h,h.ID,h.LABEL,g,d,m)}get syncDescriptor(){return this._descriptor}get id(){return this._id}get label(){return this._label}get keybindings(){return this._keybindings}get keybindingContext(){return this._keybindingContext}get keybindingWeight(){return this._keybindingWeight}}e.SyncActionDescriptor=p;class u{constructor(h){this.desc=h}}e.Action2=u;function a(n){const h=new k.DisposableStore,g=new n,{f1:d,menu:m,keybinding:b,description:E,...y}=g.desc;if(h.add(I.CommandsRegistry.registerCommand({id:y.id,handler:(T,...R)=>g.run(T,...R),description:E})),Array.isArray(m)?h.add(e.MenuRegistry.appendMenuItems(m.map(T=>({id:T.id,item:{command:y,...T}})))):m&&h.add(e.MenuRegistry.appendMenuItem(m.id,{command:y,...m})),d&&(h.add(e.MenuRegistry.appendMenuItem(s.CommandPalette,{command:y,when:y.precondition})),h.add(e.MenuRegistry.addCommand(y))),Array.isArray(b))for(let T of b)o.KeybindingsRegistry.registerKeybindingRule({...T,id:y.id,when:y.precondition?w.ContextKeyExpr.and(y.precondition,T.when):T.when});else b&&o.KeybindingsRegistry.registerKeybindingRule({...b,id:y.id,when:y.precondition?w.ContextKeyExpr.and(y.precondition,b.when):b.when});return h}e.registerAction2=a}),define(ne[39],re([1,0,1234,9,72,49,52,61,16,28,7,5,94,17,27,13,31]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectAllCommand=e.RedoCommand=e.UndoCommand=e.EditorExtensionsRegistry=e.registerDiffEditorContribution=e.registerEditorContribution=e.registerInstantiatedEditorAction=e.registerMultiEditorAction=e.registerEditorAction=e.registerEditorCommand=e.registerModelAndPositionCommand=e.EditorAction2=e.MultiEditorAction=e.EditorAction=e.EditorCommand=e.ProxyCommand=e.MultiCommand=e.Command=void 0;class l{constructor(M){this.id=M.id,this.precondition=M.precondition,this._kbOpts=M.kbOpts,this._menuOpts=M.menuOpts,this._description=M.description}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const M=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const N of M){let B=N.kbExpr;this.precondition&&(B?B=v.ContextKeyExpr.and(B,this.precondition):B=this.precondition);const P={id:this.id,weight:N.weight,args:N.args,when:B,primary:N.primary,secondary:N.secondary,win:N.win,linux:N.linux,mac:N.mac};o.KeybindingsRegistry.registerKeybindingRule(P)}}w.CommandsRegistry.registerCommand({id:this.id,handler:(M,N)=>this.runCommand(M,N),description:this._description})}_registerMenuItem(M){I.MenuRegistry.appendMenuItem(M.menuId,{group:M.group,command:{id:this.id,title:M.title,icon:M.icon,precondition:this.precondition},when:M.when,order:M.order})}}e.Command=l;class r extends l{constructor(){super(...arguments);this._implementations=[]}addImplementation(M,N,B){return this._implementations.push({priority:M,name:N,implementation:B}),this._implementations.sort((P,V)=>V.priority-P.priority),{dispose:()=>{for(let P=0;P<this._implementations.length;P++)if(this._implementations[P].implementation===B){this._implementations.splice(P,1);return}}}}runCommand(M,N){const B=M.get(s.ILogService);B.trace(`Executing Command '${this.id}' which has ${this._implementations.length} bound.`);for(const P of this._implementations){const V=P.implementation(M,N);if(V)return B.trace(`Command '${this.id}' was handled by '${P.name}'.`),typeof V=="boolean"?void 0:V}B.trace(`The Command '${this.id}' was not handled by any implementation.`)}}e.MultiCommand=r;class p extends l{constructor(M,N){super(N);this.command=M}runCommand(M,N){return this.command.runCommand(M,N)}}e.ProxyCommand=p;class u extends l{static bindToContribution(M){return class extends u{constructor(B){super(B);this._callback=B.handler}runEditorCommand(B,P,V){const z=M(P);z&&this._callback(z,V)}}}runCommand(M,N){const B=M.get(_.ICodeEditorService),P=B.getFocusedCodeEditor()||B.getActiveCodeEditor();if(!!P)return P.invokeWithinContext(V=>{if(!!V.get(v.IContextKeyService).contextMatchesRules((0,S.withNullAsUndefined)(this.precondition)))return this.runEditorCommand(V,P,N)})}}e.EditorCommand=u;class a extends u{constructor(M){super(a.convertOptions(M));this.label=M.label,this.alias=M.alias}static convertOptions(M){let N;Array.isArray(M.menuOpts)?N=M.menuOpts:M.menuOpts?N=[M.menuOpts]:N=[];function B(P){return P.menuId||(P.menuId=I.MenuId.EditorContext),P.title||(P.title=M.label),P.when=v.ContextKeyExpr.and(M.precondition,P.when),P}return Array.isArray(M.contextMenuOpts)?N.push(...M.contextMenuOpts.map(B)):M.contextMenuOpts&&N.push(B(M.contextMenuOpts)),M.menuOpts=N,M}runEditorCommand(M,N,B){return this.reportTelemetry(M,N),this.run(M,N,B||{})}reportTelemetry(M,N){M.get(i.ITelemetryService).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}e.EditorAction=a;class n extends a{constructor(){super(...arguments);this._implementations=[]}addImplementation(M,N){return this._implementations.push([M,N]),this._implementations.sort((B,P)=>P[0]-B[0]),{dispose:()=>{for(let B=0;B<this._implementations.length;B++)if(this._implementations[B][1]===N){this._implementations.splice(B,1);return}}}}run(M,N,B){for(const P of this._implementations){const V=P[1](M,N,B);if(V)return typeof V=="boolean"?void 0:V}}}e.MultiEditorAction=n;class h extends I.Action2{run(M,...N){const B=M.get(_.ICodeEditorService),P=B.getFocusedCodeEditor()||B.getActiveCodeEditor();if(!!P)return P.invokeWithinContext(V=>{if(V.get(v.IContextKeyService).contextMatchesRules((0,S.withNullAsUndefined)(this.desc.precondition)))return this.runEditorCommand(V,P,N)})}}e.EditorAction2=h;function g(L,M){w.CommandsRegistry.registerCommand(L,function(N,...B){const P=N.get(C.IInstantiationService),[V,z]=B;(0,S.assertType)(f.URI.isUri(V)),(0,S.assertType)(A.Position.isIPosition(z));const U=N.get(k.IModelService).getModel(V);if(U){const H=A.Position.lift(z);return P.invokeFunction(M,U,H,...B.slice(2))}return N.get(D.ITextModelService).createModelReference(V).then(H=>new Promise((K,G)=>{try{const q=P.invokeFunction(M,H.object.textEditorModel,A.Position.lift(z),B.slice(2));K(q)}catch(q){G(q)}}).finally(()=>{H.dispose()}))})}e.registerModelAndPositionCommand=g;function d(L){return x.INSTANCE.registerEditorCommand(L),L}e.registerEditorCommand=d;function m(L){const M=new L;return x.INSTANCE.registerEditorAction(M),M}e.registerEditorAction=m;function b(L){return x.INSTANCE.registerEditorAction(L),L}e.registerMultiEditorAction=b;function E(L){x.INSTANCE.registerEditorAction(L)}e.registerInstantiatedEditorAction=E;function y(L,M){x.INSTANCE.registerEditorContribution(L,M)}e.registerEditorContribution=y;function T(L,M){x.INSTANCE.registerDiffEditorContribution(L,M)}e.registerDiffEditorContribution=T;var R;(function(L){function M(z){return x.INSTANCE.getEditorCommand(z)}L.getEditorCommand=M;function N(){return x.INSTANCE.getEditorActions()}L.getEditorActions=N;function B(){return x.INSTANCE.getEditorContributions()}L.getEditorContributions=B;function P(z){return x.INSTANCE.getEditorContributions().filter(U=>z.indexOf(U.id)>=0)}L.getSomeEditorContributions=P;function V(){return x.INSTANCE.getDiffEditorContributions()}L.getDiffEditorContributions=V})(R=e.EditorExtensionsRegistry||(e.EditorExtensionsRegistry={}));const O={EditorCommonContributions:"editor.contributions"};class x{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(M,N){this.editorContributions.push({id:M,ctor:N})}getEditorContributions(){return this.editorContributions.slice(0)}registerDiffEditorContribution(M,N){this.diffEditorContributions.push({id:M,ctor:N})}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(M){M.register(),this.editorActions.push(M)}getEditorActions(){return this.editorActions.slice(0)}registerEditorCommand(M){M.register(),this.editorCommands[M.id]=M}getEditorCommand(M){return this.editorCommands[M]||null}}x.INSTANCE=new x,c.Registry.add(O.EditorCommonContributions,x.INSTANCE);function F(L){return L.register(),L}e.UndoCommand=F(new r({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2048|56},menuOpts:[{menuId:I.MenuId.MenubarEditMenu,group:"1_do",title:t.localize(0,null),order:1},{menuId:I.MenuId.CommandPalette,group:"",title:t.localize(1,null),order:1}]})),F(new p(e.UndoCommand,{id:"default:undo",precondition:void 0})),e.RedoCommand=F(new r({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2048|55,secondary:[2048|1024|56],mac:{primary:2048|1024|56}},menuOpts:[{menuId:I.MenuId.MenubarEditMenu,group:"1_do",title:t.localize(2,null),order:2},{menuId:I.MenuId.CommandPalette,group:"",title:t.localize(3,null),order:1}]})),F(new p(e.RedoCommand,{id:"default:redo",precondition:void 0})),e.SelectAllCommand=F(new r({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2048|31},menuOpts:[{menuId:I.MenuId.MenubarSelectionMenu,group:"1_basic",title:t.localize(4,null),order:1},{menuId:I.MenuId.CommandPalette,group:"",title:t.localize(5,null),order:1}]}))}),define(ne[312],re([1,0,1233,77,13,112,39,72,1148,226,526,527,547,49,20,58,7,94]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CoreEditingCommands=e.CoreNavigationCommands=e.RevealLine_=e.EditorScroll_=e.CoreEditorCommand=void 0;const r=0;class p extends k.EditorCommand{runEditorCommand(R,O,x){const F=O._getViewModel();!F||this.runCoreEditorCommand(F,x||{})}}e.CoreEditorCommand=p;var u;(function(T){const R=function(L){if(!_.isObject(L))return!1;const M=L;return!(!_.isString(M.to)||!_.isUndefined(M.by)&&!_.isString(M.by)||!_.isUndefined(M.value)&&!_.isNumber(M.value)||!_.isUndefined(M.revealCursor)&&!_.isBoolean(M.revealCursor))};T.description={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n * 'to': A mandatory direction value.\n ```\n 'up', 'down'\n ```\n * 'by': Unit to move. Default is computed based on 'to' value.\n ```\n 'line', 'wrappedLine', 'page', 'halfPage'\n ```\n * 'value': Number of units to move. Default is '1'.\n * 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n ",constraint:R,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["up","down"]},by:{type:"string",enum:["line","wrappedLine","page","halfPage"]},value:{type:"number",default:1},revealCursor:{type:"boolean"}}}}]},T.RawDirection={Up:"up",Down:"down"},T.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage"};function O(L){let M;switch(L.to){case T.RawDirection.Up:M=1;break;case T.RawDirection.Down:M=2;break;default:return null}let N;switch(L.by){case T.RawUnit.Line:N=1;break;case T.RawUnit.WrappedLine:N=2;break;case T.RawUnit.Page:N=3;break;case T.RawUnit.HalfPage:N=4;break;default:N=2}const B=Math.floor(L.value||1),P=!!L.revealCursor;return{direction:M,unit:N,value:B,revealCursor:P,select:!!L.select}}T.parse=O;let x;(function(L){L[L.Up=1]="Up",L[L.Down=2]="Down"})(x=T.Direction||(T.Direction={}));let F;(function(L){L[L.Line=1]="Line",L[L.WrappedLine=2]="WrappedLine",L[L.Page=3]="Page",L[L.HalfPage=4]="HalfPage"})(F=T.Unit||(T.Unit={}))})(u=e.EditorScroll_||(e.EditorScroll_={}));var a;(function(T){const R=function(O){if(!_.isObject(O))return!1;const x=O;return!(!_.isNumber(x.lineNumber)&&!_.isString(x.lineNumber)||!_.isUndefined(x.at)&&!_.isString(x.at))};T.description={description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object",description:"Property-value pairs that can be passed through this argument:\n * 'lineNumber': A mandatory line number value.\n * 'at': Logical position at which line has to be revealed.\n ```\n 'top', 'center', 'bottom'\n ```\n ",constraint:R,schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:["number","string"]},at:{type:"string",enum:["top","center","bottom"]}}}}]},T.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}})(a=e.RevealLine_||(e.RevealLine_={}));class n{constructor(R){R.addImplementation(1e4,"code-editor",(O,x)=>{const F=O.get(D.ICodeEditorService).getFocusedCodeEditor();return F&&F.hasTextFocus()?this._runEditorCommand(O,F,x):!1}),R.addImplementation(1e3,"generic-dom-input-textarea",(O,x)=>{const F=document.activeElement;return F&&["input","textarea"].indexOf(F.tagName.toLowerCase())>=0?(this.runDOMCommand(),!0):!1}),R.addImplementation(0,"generic-dom",(O,x)=>{const F=O.get(D.ICodeEditorService).getActiveCodeEditor();return F?(F.focus(),this._runEditorCommand(O,F,x)):!1})}_runEditorCommand(R,O,x){const F=this.runEditorCommand(R,O,x);return F||!0}}var h;(function(T){class R extends p{constructor(X){super(X);this._minimalReveal=X.minimalReveal,this._inSelectionMode=X.inSelectionMode}runCoreEditorCommand(X,Y){X.model.pushStackElement(),X.setCursorStates(Y.source,3,[C.CursorMoveCommands.moveTo(X,X.getPrimaryCursorState(),this._inSelectionMode,Y.position,Y.viewPosition)])&&X.revealPrimaryCursor(Y.source,!0,this._minimalReveal)}}T.MoveTo=(0,k.registerEditorCommand)(new R({id:"_moveTo",minimalReveal:!0,inSelectionMode:!1,precondition:void 0})),T.MoveToSelect=(0,k.registerEditorCommand)(new R({id:"_moveToSelect",minimalReveal:!1,inSelectionMode:!0,precondition:void 0}));class O extends p{runCoreEditorCommand(X,Y){X.model.pushStackElement();const $=this._getColumnSelectResult(X,X.getPrimaryCursorState(),X.getCursorColumnSelectData(),Y);X.setCursorStates(Y.source,3,$.viewStates.map(J=>w.CursorState.fromViewState(J))),X.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:$.fromLineNumber,fromViewVisualColumn:$.fromVisualColumn,toViewLineNumber:$.toLineNumber,toViewVisualColumn:$.toVisualColumn}),$.reversed?X.revealTopMostCursor(Y.source):X.revealBottomMostCursor(Y.source)}}T.ColumnSelect=(0,k.registerEditorCommand)(new class extends O{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(j,X,Y,$){const J=j.model.validatePosition($.position),ee=j.coordinatesConverter.validateViewPosition(new c.Position($.viewPosition.lineNumber,$.viewPosition.column),J),te=$.doColumnSelect?Y.fromViewLineNumber:ee.lineNumber,se=$.doColumnSelect?Y.fromViewVisualColumn:$.mouseColumn-1;return I.ColumnSelection.columnSelect(j.cursorConfig,j,te,se,ee.lineNumber,$.mouseColumn-1)}}),T.CursorColumnSelectLeft=(0,k.registerEditorCommand)(new class extends O{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:2048|1024|512|15,linux:{primary:0}}})}_getColumnSelectResult(j,X,Y,$){return I.ColumnSelection.columnSelectLeft(j.cursorConfig,j,Y)}}),T.CursorColumnSelectRight=(0,k.registerEditorCommand)(new class extends O{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:2048|1024|512|17,linux:{primary:0}}})}_getColumnSelectResult(j,X,Y,$){return I.ColumnSelection.columnSelectRight(j.cursorConfig,j,Y)}});class x extends O{constructor(X){super(X);this._isPaged=X.isPaged}_getColumnSelectResult(X,Y,$,J){return I.ColumnSelection.columnSelectUp(X.cursorConfig,X,$,this._isPaged)}}T.CursorColumnSelectUp=(0,k.registerEditorCommand)(new x({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:2048|1024|512|16,linux:{primary:0}}})),T.CursorColumnSelectPageUp=(0,k.registerEditorCommand)(new x({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:2048|1024|512|11,linux:{primary:0}}}));class F extends O{constructor(X){super(X);this._isPaged=X.isPaged}_getColumnSelectResult(X,Y,$,J){return I.ColumnSelection.columnSelectDown(X.cursorConfig,X,$,this._isPaged)}}T.CursorColumnSelectDown=(0,k.registerEditorCommand)(new F({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:2048|1024|512|18,linux:{primary:0}}})),T.CursorColumnSelectPageDown=(0,k.registerEditorCommand)(new F({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:2048|1024|512|12,linux:{primary:0}}}));class L extends p{constructor(){super({id:"cursorMove",precondition:void 0,description:C.CursorMove.description})}runCoreEditorCommand(X,Y){const $=C.CursorMove.parse(Y);!$||this._runCursorMove(X,Y.source,$)}_runCursorMove(X,Y,$){X.model.pushStackElement(),X.setCursorStates(Y,3,L._move(X,X.getCursorStates(),$)),X.revealPrimaryCursor(Y,!0)}static _move(X,Y,$){const J=$.select,ee=$.value;switch($.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return C.CursorMoveCommands.simpleMove(X,Y,$.direction,J,ee,$.unit);case 11:case 13:case 12:case 14:return C.CursorMoveCommands.viewportMove(X,Y,$.direction,J,ee);default:return null}}}T.CursorMoveImpl=L,T.CursorMove=(0,k.registerEditorCommand)(new L);let M;(function(j){j[j.PAGE_SIZE_MARKER=-1]="PAGE_SIZE_MARKER"})(M||(M={}));class N extends p{constructor(X){super(X);this._staticArgs=X.args}runCoreEditorCommand(X,Y){let $=this._staticArgs;this._staticArgs.value===-1&&($={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:Y.pageSize||X.cursorConfig.pageSize}),X.model.pushStackElement(),X.setCursorStates(Y.source,3,C.CursorMoveCommands.simpleMove(X,X.getCursorStates(),$.direction,$.select,$.value,$.unit)),X.revealPrimaryCursor(Y.source,!0)}}T.CursorLeft=(0,k.registerEditorCommand)(new N({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:15,mac:{primary:15,secondary:[256|32]}}})),T.CursorLeftSelect=(0,k.registerEditorCommand)(new N({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:1024|15}})),T.CursorRight=(0,k.registerEditorCommand)(new N({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:17,mac:{primary:17,secondary:[256|36]}}})),T.CursorRightSelect=(0,k.registerEditorCommand)(new N({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:1024|17}})),T.CursorUp=(0,k.registerEditorCommand)(new N({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:16,mac:{primary:16,secondary:[256|46]}}})),T.CursorUpSelect=(0,k.registerEditorCommand)(new N({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:1024|16,secondary:[2048|1024|16],mac:{primary:1024|16},linux:{primary:1024|16}}})),T.CursorPageUp=(0,k.registerEditorCommand)(new N({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:11}})),T.CursorPageUpSelect=(0,k.registerEditorCommand)(new N({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:1024|11}})),T.CursorDown=(0,k.registerEditorCommand)(new N({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:18,mac:{primary:18,secondary:[256|44]}}})),T.CursorDownSelect=(0,k.registerEditorCommand)(new N({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:1024|18,secondary:[2048|1024|18],mac:{primary:1024|18},linux:{primary:1024|18}}})),T.CursorPageDown=(0,k.registerEditorCommand)(new N({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:12}})),T.CursorPageDownSelect=(0,k.registerEditorCommand)(new N({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:1024|12}})),T.CreateCursor=(0,k.registerEditorCommand)(new class extends p{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(j,X){let Y;X.wholeLine?Y=C.CursorMoveCommands.line(j,j.getPrimaryCursorState(),!1,X.position,X.viewPosition):Y=C.CursorMoveCommands.moveTo(j,j.getPrimaryCursorState(),!1,X.position,X.viewPosition);const $=j.getCursorStates();if($.length>1){const J=Y.modelState?Y.modelState.position:null,ee=Y.viewState?Y.viewState.position:null;for(let te=0,se=$.length;te<se;te++){const ie=$[te];if(!(J&&!ie.modelState.selection.containsPosition(J))&&!(ee&&!ie.viewState.selection.containsPosition(ee))){$.splice(te,1),j.model.pushStackElement(),j.setCursorStates(X.source,3,$);return}}}$.push(Y),j.model.pushStackElement(),j.setCursorStates(X.source,3,$)}}),T.LastCursorMoveToSelect=(0,k.registerEditorCommand)(new class extends p{constructor(){super({id:"_lastCursorMoveToSelect",precondition:void 0})}runCoreEditorCommand(j,X){const Y=j.getLastAddedCursorIndex(),$=j.getCursorStates(),J=$.slice(0);J[Y]=C.CursorMoveCommands.moveTo(j,$[Y],!0,X.position,X.viewPosition),j.model.pushStackElement(),j.setCursorStates(X.source,3,J)}});class B extends p{constructor(X){super(X);this._inSelectionMode=X.inSelectionMode}runCoreEditorCommand(X,Y){X.model.pushStackElement(),X.setCursorStates(Y.source,3,C.CursorMoveCommands.moveToBeginningOfLine(X,X.getCursorStates(),this._inSelectionMode)),X.revealPrimaryCursor(Y.source,!0)}}T.CursorHome=(0,k.registerEditorCommand)(new B({inSelectionMode:!1,id:"cursorHome",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:14,mac:{primary:14,secondary:[2048|15]}}})),T.CursorHomeSelect=(0,k.registerEditorCommand)(new B({inSelectionMode:!0,id:"cursorHomeSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:1024|14,mac:{primary:1024|14,secondary:[2048|1024|15]}}}));class P extends p{constructor(X){super(X);this._inSelectionMode=X.inSelectionMode}runCoreEditorCommand(X,Y){X.model.pushStackElement(),X.setCursorStates(Y.source,3,this._exec(X.getCursorStates())),X.revealPrimaryCursor(Y.source,!0)}_exec(X){const Y=[];for(let $=0,J=X.length;$<J;$++){const ee=X[$],te=ee.modelState.position.lineNumber;Y[$]=w.CursorState.fromModelState(ee.modelState.move(this._inSelectionMode,te,1,0))}return Y}}T.CursorLineStart=(0,k.registerEditorCommand)(new P({inSelectionMode:!1,id:"cursorLineStart",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|31}}})),T.CursorLineStartSelect=(0,k.registerEditorCommand)(new P({inSelectionMode:!0,id:"cursorLineStartSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|1024|31}}}));class V extends p{constructor(X){super(X);this._inSelectionMode=X.inSelectionMode}runCoreEditorCommand(X,Y){X.model.pushStackElement(),X.setCursorStates(Y.source,3,C.CursorMoveCommands.moveToEndOfLine(X,X.getCursorStates(),this._inSelectionMode,Y.sticky||!1)),X.revealPrimaryCursor(Y.source,!0)}}T.CursorEnd=(0,k.registerEditorCommand)(new V({inSelectionMode:!1,id:"cursorEnd",precondition:void 0,kbOpts:{args:{sticky:!1},weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:13,mac:{primary:13,secondary:[2048|17]}},description:{description:"Go to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:t.localize(0,null),type:"boolean",default:!1}}}}]}})),T.CursorEndSelect=(0,k.registerEditorCommand)(new V({inSelectionMode:!0,id:"cursorEndSelect",precondition:void 0,kbOpts:{args:{sticky:!1},weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:1024|13,mac:{primary:1024|13,secondary:[2048|1024|17]}},description:{description:"Select to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:t.localize(1,null),type:"boolean",default:!1}}}}]}}));class z extends p{constructor(X){super(X);this._inSelectionMode=X.inSelectionMode}runCoreEditorCommand(X,Y){X.model.pushStackElement(),X.setCursorStates(Y.source,3,this._exec(X,X.getCursorStates())),X.revealPrimaryCursor(Y.source,!0)}_exec(X,Y){const $=[];for(let J=0,ee=Y.length;J<ee;J++){const te=Y[J],se=te.modelState.position.lineNumber,ie=X.model.getLineMaxColumn(se);$[J]=w.CursorState.fromModelState(te.modelState.move(this._inSelectionMode,se,ie,0))}return $}}T.CursorLineEnd=(0,k.registerEditorCommand)(new z({inSelectionMode:!1,id:"cursorLineEnd",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|35}}})),T.CursorLineEndSelect=(0,k.registerEditorCommand)(new z({inSelectionMode:!0,id:"cursorLineEndSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|1024|35}}}));class U extends p{constructor(X){super(X);this._inSelectionMode=X.inSelectionMode}runCoreEditorCommand(X,Y){X.model.pushStackElement(),X.setCursorStates(Y.source,3,C.CursorMoveCommands.moveToBeginningOfBuffer(X,X.getCursorStates(),this._inSelectionMode)),X.revealPrimaryCursor(Y.source,!0)}}T.CursorTop=(0,k.registerEditorCommand)(new U({inSelectionMode:!1,id:"cursorTop",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:2048|14,mac:{primary:2048|16}}})),T.CursorTopSelect=(0,k.registerEditorCommand)(new U({inSelectionMode:!0,id:"cursorTopSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:2048|1024|14,mac:{primary:2048|1024|16}}}));class H extends p{constructor(X){super(X);this._inSelectionMode=X.inSelectionMode}runCoreEditorCommand(X,Y){X.model.pushStackElement(),X.setCursorStates(Y.source,3,C.CursorMoveCommands.moveToEndOfBuffer(X,X.getCursorStates(),this._inSelectionMode)),X.revealPrimaryCursor(Y.source,!0)}}T.CursorBottom=(0,k.registerEditorCommand)(new H({inSelectionMode:!1,id:"cursorBottom",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:2048|13,mac:{primary:2048|18}}})),T.CursorBottomSelect=(0,k.registerEditorCommand)(new H({inSelectionMode:!0,id:"cursorBottomSelect",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:2048|1024|13,mac:{primary:2048|1024|18}}}));class K extends p{constructor(){super({id:"editorScroll",precondition:void 0,description:u.description})}runCoreEditorCommand(X,Y){const $=u.parse(Y);!$||this._runEditorScroll(X,Y.source,$)}_runEditorScroll(X,Y,$){const J=this._computeDesiredScrollTop(X,$);if($.revealCursor){const ee=X.getCompletelyVisibleViewRangeAtScrollTop(J);X.setCursorStates(Y,3,[C.CursorMoveCommands.findPositionInViewportIfOutside(X,X.getPrimaryCursorState(),ee,$.select)])}X.viewLayout.setScrollPosition({scrollTop:J},0)}_computeDesiredScrollTop(X,Y){if(Y.unit===1){const ee=X.getCompletelyVisibleViewRange(),te=X.coordinatesConverter.convertViewRangeToModelRange(ee);let se;Y.direction===1?se=Math.max(1,te.startLineNumber-Y.value):se=Math.min(X.model.getLineCount(),te.startLineNumber+Y.value);const ie=X.coordinatesConverter.convertModelPositionToViewPosition(new c.Position(se,1));return X.viewLayout.getVerticalOffsetForLineNumber(ie.lineNumber)}let $;Y.unit===3?$=X.cursorConfig.pageSize*Y.value:Y.unit===4?$=Math.round(X.cursorConfig.pageSize/2)*Y.value:$=Y.value;const J=(Y.direction===1?-1:1)*$;return X.viewLayout.getCurrentScrollTop()+J*X.cursorConfig.lineHeight}}T.EditorScrollImpl=K,T.EditorScroll=(0,k.registerEditorCommand)(new K),T.ScrollLineUp=(0,k.registerEditorCommand)(new class extends p{constructor(){super({id:"scrollLineUp",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:2048|16,mac:{primary:256|11}}})}runCoreEditorCommand(j,X){T.EditorScroll._runEditorScroll(j,X.source,{direction:1,unit:2,value:1,revealCursor:!1,select:!1})}}),T.ScrollPageUp=(0,k.registerEditorCommand)(new class extends p{constructor(){super({id:"scrollPageUp",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:2048|11,win:{primary:512|11},linux:{primary:512|11}}})}runCoreEditorCommand(j,X){T.EditorScroll._runEditorScroll(j,X.source,{direction:1,unit:3,value:1,revealCursor:!1,select:!1})}}),T.ScrollLineDown=(0,k.registerEditorCommand)(new class extends p{constructor(){super({id:"scrollLineDown",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:2048|18,mac:{primary:256|12}}})}runCoreEditorCommand(j,X){T.EditorScroll._runEditorScroll(j,X.source,{direction:2,unit:2,value:1,revealCursor:!1,select:!1})}}),T.ScrollPageDown=(0,k.registerEditorCommand)(new class extends p{constructor(){super({id:"scrollPageDown",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:2048|12,win:{primary:512|12},linux:{primary:512|12}}})}runCoreEditorCommand(j,X){T.EditorScroll._runEditorScroll(j,X.source,{direction:2,unit:3,value:1,revealCursor:!1,select:!1})}});class G extends p{constructor(X){super(X);this._inSelectionMode=X.inSelectionMode}runCoreEditorCommand(X,Y){X.model.pushStackElement(),X.setCursorStates(Y.source,3,[C.CursorMoveCommands.word(X,X.getPrimaryCursorState(),this._inSelectionMode,Y.position)]),X.revealPrimaryCursor(Y.source,!0)}}T.WordSelect=(0,k.registerEditorCommand)(new G({inSelectionMode:!1,id:"_wordSelect",precondition:void 0})),T.WordSelectDrag=(0,k.registerEditorCommand)(new G({inSelectionMode:!0,id:"_wordSelectDrag",precondition:void 0})),T.LastCursorWordSelect=(0,k.registerEditorCommand)(new class extends p{constructor(){super({id:"lastCursorWordSelect",precondition:void 0})}runCoreEditorCommand(j,X){const Y=j.getLastAddedCursorIndex(),$=j.getCursorStates(),J=$.slice(0),ee=$[Y];J[Y]=C.CursorMoveCommands.word(j,ee,ee.modelState.hasSelection(),X.position),j.model.pushStackElement(),j.setCursorStates(X.source,3,J)}});class q extends p{constructor(X){super(X);this._inSelectionMode=X.inSelectionMode}runCoreEditorCommand(X,Y){X.model.pushStackElement(),X.setCursorStates(Y.source,3,[C.CursorMoveCommands.line(X,X.getPrimaryCursorState(),this._inSelectionMode,Y.position,Y.viewPosition)]),X.revealPrimaryCursor(Y.source,!1)}}T.LineSelect=(0,k.registerEditorCommand)(new q({inSelectionMode:!1,id:"_lineSelect",precondition:void 0})),T.LineSelectDrag=(0,k.registerEditorCommand)(new q({inSelectionMode:!0,id:"_lineSelectDrag",precondition:void 0}));class Z extends p{constructor(X){super(X);this._inSelectionMode=X.inSelectionMode}runCoreEditorCommand(X,Y){const $=X.getLastAddedCursorIndex(),J=X.getCursorStates(),ee=J.slice(0);ee[$]=C.CursorMoveCommands.line(X,J[$],this._inSelectionMode,Y.position,Y.viewPosition),X.model.pushStackElement(),X.setCursorStates(Y.source,3,ee)}}T.LastCursorLineSelect=(0,k.registerEditorCommand)(new Z({inSelectionMode:!1,id:"lastCursorLineSelect",precondition:void 0})),T.LastCursorLineSelectDrag=(0,k.registerEditorCommand)(new Z({inSelectionMode:!0,id:"lastCursorLineSelectDrag",precondition:void 0})),T.CancelSelection=(0,k.registerEditorCommand)(new class extends p{constructor(){super({id:"cancelSelection",precondition:S.EditorContextKeys.hasNonEmptySelection,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:9,secondary:[1024|9]}})}runCoreEditorCommand(j,X){j.model.pushStackElement(),j.setCursorStates(X.source,3,[C.CursorMoveCommands.cancelSelection(j,j.getPrimaryCursorState())]),j.revealPrimaryCursor(X.source,!0)}}),T.RemoveSecondaryCursors=(0,k.registerEditorCommand)(new class extends p{constructor(){super({id:"removeSecondaryCursors",precondition:S.EditorContextKeys.hasMultipleSelections,kbOpts:{weight:r+1,kbExpr:S.EditorContextKeys.textInputFocus,primary:9,secondary:[1024|9]}})}runCoreEditorCommand(j,X){j.model.pushStackElement(),j.setCursorStates(X.source,3,[j.getPrimaryCursorState()]),j.revealPrimaryCursor(X.source,!0),(0,A.status)(t.localize(2,null))}}),T.RevealLine=(0,k.registerEditorCommand)(new class extends p{constructor(){super({id:"revealLine",precondition:void 0,description:a.description})}runCoreEditorCommand(j,X){const Y=X,$=Y.lineNumber||0;let J=typeof $=="number"?$+1:parseInt($)+1;J<1&&(J=1);const ee=j.model.getLineCount();J>ee&&(J=ee);const te=new i.Range(J,1,J,j.model.getLineMaxColumn(J));let se=0;if(Y.at)switch(Y.at){case a.RawAtArgument.Top:se=3;break;case a.RawAtArgument.Center:se=1;break;case a.RawAtArgument.Bottom:se=4;break;default:break}const ie=j.coordinatesConverter.convertModelRangeToViewRange(te);j.revealRange(X.source,!1,ie,se,0)}}),T.SelectAll=new class extends n{constructor(){super(k.SelectAllCommand)}runDOMCommand(){f.isFirefox&&(document.activeElement.focus(),document.activeElement.select()),document.execCommand("selectAll")}runEditorCommand(j,X,Y){const $=X._getViewModel();!$||this.runCoreEditorCommand($,Y)}runCoreEditorCommand(j,X){j.model.pushStackElement(),j.setCursorStates("keyboard",3,[C.CursorMoveCommands.selectAll(j,j.getPrimaryCursorState())])}},T.SetSelection=(0,k.registerEditorCommand)(new class extends p{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(j,X){j.model.pushStackElement(),j.setCursorStates(X.source,3,[w.CursorState.fromModelSelection(X.selection)])}})})(h=e.CoreNavigationCommands||(e.CoreNavigationCommands={}));const g=s.ContextKeyExpr.and(S.EditorContextKeys.textInputFocus,S.EditorContextKeys.columnSelection);function d(T,R){l.KeybindingsRegistry.registerKeybindingRule({id:T,primary:R,when:g,weight:r+1})}d(h.CursorColumnSelectLeft.id,1024|15),d(h.CursorColumnSelectRight.id,1024|17),d(h.CursorColumnSelectUp.id,1024|16),d(h.CursorColumnSelectPageUp.id,1024|11),d(h.CursorColumnSelectDown.id,1024|18),d(h.CursorColumnSelectPageDown.id,1024|12);function m(T){return T.register(),T}var b;(function(T){class R extends k.EditorCommand{runEditorCommand(x,F,L){const M=F._getViewModel();!M||this.runCoreEditingCommand(F,M,L||{})}}T.CoreEditingCommand=R,T.LineBreakInsert=(0,k.registerEditorCommand)(new class extends R{constructor(){super({id:"lineBreakInsert",precondition:S.EditorContextKeys.writable,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|45}}})}runCoreEditingCommand(O,x,F){O.pushUndoStop(),O.executeCommands(this.id,o.TypeOperations.lineBreakInsert(x.cursorConfig,x.model,x.getCursorStates().map(L=>L.modelState.selection)))}}),T.Outdent=(0,k.registerEditorCommand)(new class extends R{constructor(){super({id:"outdent",precondition:S.EditorContextKeys.writable,kbOpts:{weight:r,kbExpr:s.ContextKeyExpr.and(S.EditorContextKeys.editorTextFocus,S.EditorContextKeys.tabDoesNotMoveFocus),primary:1024|2}})}runCoreEditingCommand(O,x,F){O.pushUndoStop(),O.executeCommands(this.id,o.TypeOperations.outdent(x.cursorConfig,x.model,x.getCursorStates().map(L=>L.modelState.selection))),O.pushUndoStop()}}),T.Tab=(0,k.registerEditorCommand)(new class extends R{constructor(){super({id:"tab",precondition:S.EditorContextKeys.writable,kbOpts:{weight:r,kbExpr:s.ContextKeyExpr.and(S.EditorContextKeys.editorTextFocus,S.EditorContextKeys.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(O,x,F){O.pushUndoStop(),O.executeCommands(this.id,o.TypeOperations.tab(x.cursorConfig,x.model,x.getCursorStates().map(L=>L.modelState.selection))),O.pushUndoStop()}}),T.DeleteLeft=(0,k.registerEditorCommand)(new class extends R{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:1,secondary:[1024|1],mac:{primary:1,secondary:[1024|1,256|38,256|1]}}})}runCoreEditingCommand(O,x,F){const[L,M]=v.DeleteOperations.deleteLeft(x.getPrevEditOperationType(),x.cursorConfig,x.model,x.getCursorStates().map(N=>N.modelState.selection),x.getCursorAutoClosedCharacters());L&&O.pushUndoStop(),O.executeCommands(this.id,M),x.setPrevEditOperationType(2)}}),T.DeleteRight=(0,k.registerEditorCommand)(new class extends R{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:r,kbExpr:S.EditorContextKeys.textInputFocus,primary:20,mac:{primary:20,secondary:[256|34,256|20]}}})}runCoreEditingCommand(O,x,F){const[L,M]=v.DeleteOperations.deleteRight(x.getPrevEditOperationType(),x.cursorConfig,x.model,x.getCursorStates().map(N=>N.modelState.selection));L&&O.pushUndoStop(),O.executeCommands(this.id,M),x.setPrevEditOperationType(3)}}),T.Undo=new class extends n{constructor(){super(k.UndoCommand)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(O,x,F){if(!(!x.hasModel()||x.getOption(81)===!0))return x.getModel().undo()}},T.Redo=new class extends n{constructor(){super(k.RedoCommand)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(O,x,F){if(!(!x.hasModel()||x.getOption(81)===!0))return x.getModel().redo()}}})(b=e.CoreEditingCommands||(e.CoreEditingCommands={}));class E extends k.Command{constructor(R,O,x){super({id:R,precondition:void 0,description:x});this._handlerId=O}runCommand(R,O){const x=R.get(D.ICodeEditorService).getFocusedCodeEditor();!x||x.trigger("keyboard",this._handlerId,O)}}function y(T,R){m(new E("default:"+T,T)),m(new E(T,T,R))}y("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),y("replacePreviousChar"),y("compositionType"),y("compositionStart"),y("compositionEnd"),y("paste"),y("cut")}),define(ne[2029],re([1,0,464,39]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerDecorationsContribution=void 0;let _=class{constructor(k,D){}dispose(){}};_.ID="editor.contrib.markerDecorations",_=Ee([W(1,t.IMarkerDecorationsService)],_),e.MarkerDecorationsContribution=_,(0,f.registerEditorContribution)(_.ID,_)}),define(ne[2030],re([1,0,312,49,14]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewController=void 0;class A{constructor(D,I,w,v){this.configuration=D,this.viewModel=I,this.userInputEvents=w,this.commandDelegate=v}paste(D,I,w,v){this.commandDelegate.paste(D,I,w,v)}type(D){this.commandDelegate.type(D)}compositionType(D,I,w,v){this.commandDelegate.compositionType(D,I,w,v)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(D){t.CoreNavigationCommands.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:D})}_validateViewColumn(D){const I=this.viewModel.getLineMinColumn(D.lineNumber);return D.column<I?new f.Position(D.lineNumber,I):D}_hasMulticursorModifier(D){switch(this.configuration.options.get(70)){case"altKey":return D.altKey;case"ctrlKey":return D.ctrlKey;case"metaKey":return D.metaKey;default:return!1}}_hasNonMulticursorModifier(D){switch(this.configuration.options.get(70)){case"altKey":return D.ctrlKey||D.metaKey;case"ctrlKey":return D.altKey||D.metaKey;case"metaKey":return D.ctrlKey||D.altKey;default:return!1}}dispatchMouse(D){const I=this.configuration.options,w=_.isLinux&&I.get(96),v=I.get(18);D.middleButton&&!w?this._columnSelect(D.position,D.mouseColumn,D.inSelectionMode):D.startedOnLineNumbers?this._hasMulticursorModifier(D)?D.inSelectionMode?this._lastCursorLineSelect(D.position):this._createCursor(D.position,!0):D.inSelectionMode?this._lineSelectDrag(D.position):this._lineSelect(D.position):D.mouseDownCount>=4?this._selectAll():D.mouseDownCount===3?this._hasMulticursorModifier(D)?D.inSelectionMode?this._lastCursorLineSelectDrag(D.position):this._lastCursorLineSelect(D.position):D.inSelectionMode?this._lineSelectDrag(D.position):this._lineSelect(D.position):D.mouseDownCount===2?D.onInjectedText||(this._hasMulticursorModifier(D)?this._lastCursorWordSelect(D.position):D.inSelectionMode?this._wordSelectDrag(D.position):this._wordSelect(D.position)):this._hasMulticursorModifier(D)?this._hasNonMulticursorModifier(D)||(D.shiftKey?this._columnSelect(D.position,D.mouseColumn,!0):D.inSelectionMode?this._lastCursorMoveToSelect(D.position):this._createCursor(D.position,!1)):D.inSelectionMode?D.altKey?this._columnSelect(D.position,D.mouseColumn,!0):v?this._columnSelect(D.position,D.mouseColumn,!0):this._moveToSelect(D.position):this.moveTo(D.position)}_usualArgs(D){return D=this._validateViewColumn(D),{source:"mouse",position:this._convertViewToModelPosition(D),viewPosition:D}}moveTo(D){t.CoreNavigationCommands.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(D))}_moveToSelect(D){t.CoreNavigationCommands.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(D))}_columnSelect(D,I,w){D=this._validateViewColumn(D),t.CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(D),viewPosition:D,mouseColumn:I,doColumnSelect:w})}_createCursor(D,I){D=this._validateViewColumn(D),t.CoreNavigationCommands.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(D),viewPosition:D,wholeLine:I})}_lastCursorMoveToSelect(D){t.CoreNavigationCommands.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(D))}_wordSelect(D){t.CoreNavigationCommands.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(D))}_wordSelectDrag(D){t.CoreNavigationCommands.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(D))}_lastCursorWordSelect(D){t.CoreNavigationCommands.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(D))}_lineSelect(D){t.CoreNavigationCommands.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(D))}_lineSelectDrag(D){t.CoreNavigationCommands.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(D))}_lastCursorLineSelect(D){t.CoreNavigationCommands.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(D))}_lastCursorLineSelectDrag(D){t.CoreNavigationCommands.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(D))}_selectAll(){t.CoreNavigationCommands.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(D){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(D)}emitKeyDown(D){this.userInputEvents.emitKeyDown(D)}emitKeyUp(D){this.userInputEvents.emitKeyUp(D)}emitContextMenu(D){this.userInputEvents.emitContextMenu(D)}emitMouseMove(D){this.userInputEvents.emitMouseMove(D)}emitMouseLeave(D){this.userInputEvents.emitMouseLeave(D)}emitMouseUp(D){this.userInputEvents.emitMouseUp(D)}emitMouseDown(D){this.userInputEvents.emitMouseDown(D)}emitMouseDrag(D){this.userInputEvents.emitMouseDrag(D)}emitMouseDrop(D){this.userInputEvents.emitMouseDrop(D)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(D){this.userInputEvents.emitMouseWheel(D)}}e.ViewController=A}),define(ne[2031],re([1,0,10,84,128,22,2008,2017,2030,681,1244,182,1174,2015,1175,2011,534,2016,747,2009,1176,703,1177,2012,1178,2018,1184,2019,2013,2014,2020,1179,49,20,384,1185,1181,388,12,745]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.View=void 0;class V extends N.ViewEventHandler{constructor(H,K,G,q,Z,j){super();this._selections=[new f.Selection(1,1,1,1)],this._renderAnimationFrame=null;const X=new I.ViewController(K,q,Z,H);this._context=new L.ViewContext(K,G,q),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=new D.TextAreaHandler(this._context,X,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=(0,_.createFastDomNode)(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=(0,_.createFastDomNode)(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=(0,_.createFastDomNode)(document.createElement("div")),C.PartFingerprints.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new S.EditorScrollbar(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new p.ViewLines(this._context,this._linesContent),this._viewZones=new R.ViewZones(this._context),this._viewParts.push(this._viewZones);const Y=new d.DecorationsOverviewRuler(this._context);this._viewParts.push(Y);const $=new E.ScrollDecorationViewPart(this._context);this._viewParts.push($);const J=new v.ContentViewOverlays(this._context);this._viewParts.push(J),J.addDynamicOverlay(new c.CurrentLineHighlightOverlay(this._context)),J.addDynamicOverlay(new y.SelectionsOverlay(this._context)),J.addDynamicOverlay(new l.IndentGuidesOverlay(this._context)),J.addDynamicOverlay(new i.DecorationsOverlay(this._context));const ee=new v.MarginViewOverlays(this._context);this._viewParts.push(ee),ee.addDynamicOverlay(new c.CurrentLineMarginHighlightOverlay(this._context)),ee.addDynamicOverlay(new s.GlyphMarginOverlay(this._context)),ee.addDynamicOverlay(new n.MarginViewLineDecorationsOverlay(this._context)),ee.addDynamicOverlay(new u.LinesDecorationsOverlay(this._context)),ee.addDynamicOverlay(new r.LineNumbersOverlay(this._context));const te=new a.Margin(this._context);te.getDomNode().appendChild(this._viewZones.marginDomNode),te.getDomNode().appendChild(ee.getDomNode()),this._viewParts.push(te),this._contentWidgets=new o.ViewContentWidgets(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new T.ViewCursors(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new g.ViewOverlayWidgets(this._context),this._viewParts.push(this._overlayWidgets);const se=new b.Rulers(this._context);this._viewParts.push(se);const ie=new h.Minimap(this._context);if(this._viewParts.push(ie),Y){const ce=this._scrollbar.getOverviewRulerLayoutInfo();ce.parent.insertBefore(Y.getDomNode(),ce.insertBefore)}this._linesContent.appendChild(J.getDomNode()),this._linesContent.appendChild(se.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(te.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild($.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(ie.getDomNode()),this.domNode.appendChild(this._overflowGuardContainer),j?j.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new k.PointerHandler(this._context,X,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){this._renderNow()}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,viewLinesDomNode:this._viewLines.getDomNode().domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:H=>{this._textAreaHandler.textArea.domNode.dispatchEvent(H)},getLastRenderData:()=>{const H=this._viewCursors.getLastRenderData()||[],K=this._textAreaHandler.getLastRenderData();return new P.PointerHandlerLastRenderData(H,K)},shouldSuppressMouseDownOnViewZone:H=>this._viewZones.shouldSuppressMouseDownOnViewZone(H),shouldSuppressMouseDownOnWidget:H=>this._contentWidgets.shouldSuppressMouseDownOnWidget(H),getPositionFromDOMInfo:(H,K)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(H,K)),visibleRangeForPosition:(H,K)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new O.Position(H,K))),getLineWidth:H=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(H))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:H=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(H))}}_applyLayout(){const K=this._context.configuration.options.get(131);this.domNode.setWidth(K.width),this.domNode.setHeight(K.height),this._overflowGuardContainer.setWidth(K.width),this._overflowGuardContainer.setHeight(K.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const H=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(128)+" "+(0,B.getThemeTypeSelector)(this._context.theme.type)+H}handleEvents(H){super.handleEvents(H),this._scheduleRender()}onConfigurationChanged(H){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(H){return this._selections=H.selections,!1}onFocusChanged(H){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(H){return this._context.theme.update(H.theme),this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){this._renderAnimationFrame!==null&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const H of this._viewParts)H.dispose();super.dispose()}_scheduleRender(){this._renderAnimationFrame===null&&(this._renderAnimationFrame=t.runAtThisOrScheduleAtNextAnimationFrame(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){z(()=>this._actualRender())}_getViewPartsToRender(){const H=[];let K=0;for(const G of this._viewParts)G.shouldRender()&&(H[K++]=G);return H}_actualRender(){if(!t.isInDOM(this.domNode.domNode))return;let H=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&H.length===0)return;const K=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(K.startLineNumber,K.endLineNumber,K.centeredLineNumber);const G=new M.ViewportData(this._selections,K,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(G),this._viewLines.shouldRender()&&(this._viewLines.renderText(G),this._viewLines.onDidRender(),H=this._getViewPartsToRender());const q=new F.RenderingContext(this._context.viewLayout,G,this._viewLines);for(const Z of H)Z.prepareRender(q);for(const Z of H)Z.render(q),Z.onDidRender()}delegateVerticalScrollbarPointerDown(H){this._scrollbar.delegateVerticalScrollbarPointerDown(H)}restoreState(H){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:H.scrollTop},1),this._context.viewModel.tokenizeViewport(),this._renderNow(),this._viewLines.updateLineWidths(),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:H.scrollLeft},1)}getOffsetForColumn(H,K){const G=this._context.viewModel.model.validatePosition({lineNumber:H,column:K}),q=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(G);this._flushAccumulatedAndRenderNow();const Z=this._viewLines.visibleRangeForPosition(new O.Position(q.lineNumber,q.column));return Z?Z.left:-1}getTargetAtClientPoint(H,K){const G=this._pointerHandler.getTargetAtClientPoint(H,K);return G?w.ViewUserInputEvents.convertViewToModelMouseTarget(G,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(H){return new m.OverviewRuler(this._context,H)}change(H){this._viewZones.changeViewZones(H),this._scheduleRender()}render(H,K){if(K){this._viewLines.forceShouldRender();for(const G of this._viewParts)G.forceShouldRender()}H?this._flushAccumulatedAndRenderNow():this._scheduleRender()}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}refreshFocusState(){this._textAreaHandler.refreshFocusState()}setAriaOptions(H){this._textAreaHandler.setAriaOptions(H)}addContentWidget(H){this._contentWidgets.addWidget(H.widget),this.layoutContentWidget(H),this._scheduleRender()}layoutContentWidget(H){let K=H.position&&H.position.range||null;if(K===null){const q=H.position?H.position.position:null;q!==null&&(K=new x.Range(q.lineNumber,q.column,q.lineNumber,q.column))}const G=H.position?H.position.preference:null;this._contentWidgets.setWidgetPosition(H.widget,K,G,H.position?.positionAffinity??null),this._scheduleRender()}removeContentWidget(H){this._contentWidgets.removeWidget(H.widget),this._scheduleRender()}addOverlayWidget(H){this._overlayWidgets.addWidget(H.widget),this.layoutOverlayWidget(H),this._scheduleRender()}layoutOverlayWidget(H){const K=H.position?H.position.preference:null;this._overlayWidgets.setWidgetPosition(H.widget,K)&&this._scheduleRender()}removeOverlayWidget(H){this._overlayWidgets.removeWidget(H.widget),this._scheduleRender()}}e.View=V;function z(U){try{return U()}catch(H){(0,A.onUnexpectedError)(H)}}}),define(ne[2032],re([1,0,112,117,97,39,84,58,1252,7,1022]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionAnchorSet=void 0,e.SelectionAnchorSet=new w.RawContextKey("selectionAnchorSet",!1);let v=class $s{constructor(s,l){this.editor=s,this.selectionAnchorSetContextKey=e.SelectionAnchorSet.bindTo(l),this.modelChangeListener=s.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}static get(s){return s.getContribution($s.ID)}setSelectionAnchor(){if(this.editor.hasModel()){const s=this.editor.getPosition(),l=this.decorationId?[this.decorationId]:[],r=this.editor.deltaDecorations(l,[{range:k.Selection.fromPositions(s,s),options:{description:"selection-anchor",stickiness:1,hoverMessage:new f.MarkdownString().appendText((0,I.localize)(0,null)),className:"selection-anchor"}}]);this.decorationId=r[0],this.selectionAnchorSetContextKey.set(!!this.decorationId),(0,t.alert)((0,I.localize)(1,null,s.lineNumber,s.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const s=this.editor.getModel().getDecorationRange(this.decorationId);s&&this.editor.setPosition(s.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const s=this.editor.getModel().getDecorationRange(this.decorationId);if(s){const l=this.editor.getPosition();this.editor.setSelection(k.Selection.fromPositions(s.getStartPosition(),l)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){this.decorationId&&(this.editor.deltaDecorations([this.decorationId],[]),this.decorationId=void 0,this.selectionAnchorSetContextKey.set(!1))}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};v.ID="editor.contrib.selectionAnchorController",v=Ee([W(1,w.IContextKeyService)],v);class C extends A.EditorAction{constructor(){super({id:"editor.action.setSelectionAnchor",label:(0,I.localize)(2,null),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:D.EditorContextKeys.editorTextFocus,primary:(0,_.KeyChord)(2048|41,2048|32),weight:100}})}async run(s,l){v.get(l)?.setSelectionAnchor()}}class o extends A.EditorAction{constructor(){super({id:"editor.action.goToSelectionAnchor",label:(0,I.localize)(3,null),alias:"Go to Selection Anchor",precondition:e.SelectionAnchorSet})}async run(s,l){v.get(l)?.goToSelectionAnchor()}}class c extends A.EditorAction{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:(0,I.localize)(4,null),alias:"Select from Anchor to Cursor",precondition:e.SelectionAnchorSet,kbOpts:{kbExpr:D.EditorContextKeys.editorTextFocus,primary:(0,_.KeyChord)(2048|41,2048|41),weight:100}})}async run(s,l){v.get(l)?.selectFromAnchorToCursor()}}class i extends A.EditorAction{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:(0,I.localize)(5,null),alias:"Cancel Selection Anchor",precondition:e.SelectionAnchorSet,kbOpts:{kbExpr:D.EditorContextKeys.editorTextFocus,primary:9,weight:100}})}async run(s,l){v.get(l)?.cancelSelectionAnchor()}}(0,A.registerEditorContribution)(v.ID,v),(0,A.registerEditorAction)(C),(0,A.registerEditorAction)(o),(0,A.registerEditorAction)(c),(0,A.registerEditorAction)(i)}),define(ne[2033],re([1,0,39,58,1187,1254]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class k extends t.EditorAction{constructor(v,C){super(C);this.left=v}run(v,C){if(!C.hasModel())return;const o=[],c=C.getSelections();for(const i of c)o.push(new _.MoveCaretCommand(i,this.left));C.pushUndoStop(),C.executeCommands(this.id,o),C.pushUndoStop()}}class D extends k{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:A.localize(0,null),alias:"Move Selected Text Left",precondition:f.EditorContextKeys.writable})}}class I extends k{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:A.localize(1,null),alias:"Move Selected Text Right",precondition:f.EditorContextKeys.writable})}}(0,t.registerEditorAction)(D),(0,t.registerEditorAction)(I)}),define(ne[2034],re([1,0,39,341,525,20,58,1255]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class I extends t.EditorAction{constructor(){super({id:"editor.action.transposeLetters",label:D.localize(0,null),alias:"Transpose Letters",precondition:k.EditorContextKeys.writable,kbOpts:{kbExpr:k.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|50},weight:100}})}run(v,C){if(!C.hasModel())return;let o=C.getModel(),c=[],i=C.getSelections();for(let S of i){if(!S.isEmpty())continue;let s=S.startLineNumber,l=S.startColumn,r=o.getLineMaxColumn(s);if(s===1&&(l===1||l===2&&r===2))continue;let p=l===r?S.getPosition():_.MoveOperations.rightPosition(o,S.getPosition().lineNumber,S.getPosition().column),u=_.MoveOperations.leftPosition(o,p),a=_.MoveOperations.leftPosition(o,u),n=o.getValueInRange(A.Range.fromPositions(a,u)),h=o.getValueInRange(A.Range.fromPositions(u,p)),g=A.Range.fromPositions(a,p);c.push(new f.ReplaceCommand(g,h+n))}c.length>0&&(C.pushUndoStop(),C.executeCommands(this.id,c),C.pushUndoStop())}}(0,t.registerEditorAction)(I)}),define(ne[470],re([1,0,77,14,523,39,72,58,1256,16,95]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PasteAction=e.CopyAction=e.CutAction=void 0;const C="9_cutcopypaste",o=f.isNative||document.queryCommandSupported("cut"),c=f.isNative||document.queryCommandSupported("copy"),i=typeof navigator.clipboard=="undefined"||t.isFirefox?document.queryCommandSupported("paste"):!0;function S(r){return r.register(),r}e.CutAction=o?S(new A.MultiCommand({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:f.isNative||f.isSafari?{primary:2048|54,win:{primary:2048|54,secondary:[1024|20]},weight:100}:void 0,menuOpts:[{menuId:w.MenuId.MenubarEditMenu,group:"2_ccp",title:I.localize(0,null),order:1},{menuId:w.MenuId.EditorContext,group:C,title:I.localize(1,null),when:D.EditorContextKeys.writable,order:1},{menuId:w.MenuId.CommandPalette,group:"",title:I.localize(2,null),order:1},{menuId:w.MenuId.SimpleEditorContext,group:C,title:I.localize(3,null),when:D.EditorContextKeys.writable,order:1}]})):void 0,e.CopyAction=c?S(new A.MultiCommand({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:f.isNative?{primary:2048|33,win:{primary:2048|33,secondary:[2048|19]},weight:100}:void 0,menuOpts:[{menuId:w.MenuId.MenubarEditMenu,group:"2_ccp",title:I.localize(4,null),order:2},{menuId:w.MenuId.EditorContext,group:C,title:I.localize(5,null),order:2},{menuId:w.MenuId.CommandPalette,group:"",title:I.localize(6,null),order:1},{menuId:w.MenuId.SimpleEditorContext,group:C,title:I.localize(7,null),order:2}]})):void 0,w.MenuRegistry.appendMenuItem(w.MenuId.MenubarEditMenu,{submenu:w.MenuId.MenubarCopy,title:{value:I.localize(8,null),original:"Copy As"},group:"2_ccp",order:3}),w.MenuRegistry.appendMenuItem(w.MenuId.EditorContext,{submenu:w.MenuId.EditorContextCopy,title:{value:I.localize(9,null),original:"Copy As"},group:C,order:3}),e.PasteAction=i?S(new A.MultiCommand({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:f.isNative?{primary:2048|52,win:{primary:2048|52,secondary:[1024|19]},linux:{primary:2048|52,secondary:[1024|19]},weight:100}:void 0,menuOpts:[{menuId:w.MenuId.MenubarEditMenu,group:"2_ccp",title:I.localize(10,null),order:4},{menuId:w.MenuId.EditorContext,group:C,title:I.localize(11,null),when:D.EditorContextKeys.writable,order:4},{menuId:w.MenuId.CommandPalette,group:"",title:I.localize(12,null),order:1},{menuId:w.MenuId.SimpleEditorContext,group:C,title:I.localize(13,null),when:D.EditorContextKeys.writable,order:4}]})):void 0;class s extends A.EditorAction{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:I.localize(14,null),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:D.EditorContextKeys.textInputFocus,primary:0,weight:100}})}run(p,u){!u.hasModel()||!u.getOption(32)&&u.getSelection().isEmpty()||(_.CopyOptions.forceCopyWithSyntaxHighlighting=!0,u.focus(),document.execCommand("copy"),_.CopyOptions.forceCopyWithSyntaxHighlighting=!1)}}function l(r,p){!r||(r.addImplementation(1e4,"code-editor",(u,a)=>{const n=u.get(k.ICodeEditorService).getFocusedCodeEditor();if(n&&n.hasTextFocus()){const h=n.getOption(32),g=n.getSelection();return g&&g.isEmpty()&&!h||document.execCommand(p),!0}return!1}),r.addImplementation(0,"generic-dom",(u,a)=>(document.execCommand(p),!0)))}l(e.CutAction,"cut"),l(e.CopyAction,"copy"),e.PasteAction&&(e.PasteAction.addImplementation(1e4,"code-editor",(r,p)=>{const u=r.get(k.ICodeEditorService),a=r.get(v.IClipboardService),n=u.getFocusedCodeEditor();return n&&n.hasTextFocus()?!document.execCommand("paste")&&f.isWeb?(async()=>{const g=await a.readText();if(g!==""){const d=_.InMemoryClipboardMetadataManager.INSTANCE.get(g);let m=!1,b=null,E=null;d&&(m=n.getOption(32)&&!!d.isFromEmptySelection,b=typeof d.multicursorText!="undefined"?d.multicursorText:null,E=d.mode),n.trigger("keyboard","paste",{text:g,pasteOnNewLine:m,multicursorText:b,mode:E})}})():!0:!1}),e.PasteAction.addImplementation(0,"generic-dom",(r,p)=>(document.execCommand("paste"),!0))),c&&(0,A.registerEditorAction)(s)}),define(ne[2035],re([1,0,97,39,20,58,124,706,1939,1261,16]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class C extends f.EditorAction{constructor(l,r){super(r);this._type=l}run(l,r){const p=l.get(k.ILanguageConfigurationService);if(!r.hasModel())return;const u=r.getModel(),a=[],n=u.getOptions(),h=r.getOption(19),g=r.getSelections().map((m,b)=>({selection:m,index:b,ignoreFirstLine:!1}));g.sort((m,b)=>_.Range.compareRangesUsingStarts(m.selection,b.selection));let d=g[0];for(let m=1;m<g.length;m++){const b=g[m];d.selection.endLineNumber===b.selection.startLineNumber&&(d.index<b.index?b.ignoreFirstLine=!0:(d.ignoreFirstLine=!0,d=b))}for(const m of g)a.push(new I.LineCommentCommand(p,m.selection,n.tabSize,this._type,h.insertSpace,h.ignoreEmptyLines,m.ignoreFirstLine));r.pushUndoStop(),r.executeCommands(this.id,a),r.pushUndoStop()}}class o extends C{constructor(){super(0,{id:"editor.action.commentLine",label:w.localize(0,null),alias:"Toggle Line Comment",precondition:A.EditorContextKeys.writable,kbOpts:{kbExpr:A.EditorContextKeys.editorTextFocus,primary:2048|85,weight:100},menuOpts:{menuId:v.MenuId.MenubarEditMenu,group:"5_insert",title:w.localize(1,null),order:1}})}}class c extends C{constructor(){super(1,{id:"editor.action.addCommentLine",label:w.localize(2,null),alias:"Add Line Comment",precondition:A.EditorContextKeys.writable,kbOpts:{kbExpr:A.EditorContextKeys.editorTextFocus,primary:(0,t.KeyChord)(2048|41,2048|33),weight:100}})}}class i extends C{constructor(){super(2,{id:"editor.action.removeCommentLine",label:w.localize(3,null),alias:"Remove Line Comment",precondition:A.EditorContextKeys.writable,kbOpts:{kbExpr:A.EditorContextKeys.editorTextFocus,primary:(0,t.KeyChord)(2048|41,2048|51),weight:100}})}}class S extends f.EditorAction{constructor(){super({id:"editor.action.blockComment",label:w.localize(4,null),alias:"Toggle Block Comment",precondition:A.EditorContextKeys.writable,kbOpts:{kbExpr:A.EditorContextKeys.editorTextFocus,primary:1024|512|31,linux:{primary:2048|1024|31},weight:100},menuOpts:{menuId:v.MenuId.MenubarEditMenu,group:"5_insert",title:w.localize(5,null),order:2}})}run(l,r){const p=l.get(k.ILanguageConfigurationService);if(!r.hasModel())return;const u=r.getOption(19),a=[],n=r.getSelections();for(const h of n)a.push(new D.BlockCommentCommand(h,u.insertSpace,p));r.pushUndoStop(),r.executeCommands(this.id,a),r.pushUndoStop()}}(0,f.registerEditorAction)(o),(0,f.registerEditorAction)(c),(0,f.registerEditorAction)(i),(0,f.registerEditorAction)(S)}),define(ne[313],re([1,0,10,134,36,2,14,39,58,1262,16,7,37,38]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuController=void 0;let i=class qs{constructor(l,r,p,u,a,n){this._contextMenuService=r,this._contextViewService=p,this._contextKeyService=u,this._keybindingService=a,this._menuService=n,this._toDispose=new A.DisposableStore,this._contextMenuIsBeingShownCount=0,this._editor=l,this._toDispose.add(this._editor.onContextMenu(h=>this._onContextMenu(h))),this._toDispose.add(this._editor.onMouseWheel(h=>{if(this._contextMenuIsBeingShownCount>0){const g=this._contextViewService.getContextViewElement(),d=h.srcElement;d.shadowRoot&&t.getShadowRoot(g)===d.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(h=>{h.keyCode===58&&(h.preventDefault(),h.stopPropagation(),this.showContextMenu())}))}static get(l){return l.getContribution(qs.ID)}_onContextMenu(l){if(!this._editor.hasModel())return;if(!this._editor.getOption(20)){this._editor.focus(),l.target.position&&!this._editor.getSelection().containsPosition(l.target.position)&&this._editor.setPosition(l.target.position);return}if(l.target.type===12||l.target.type===6&&l.target.detail.injectedText||(l.event.preventDefault(),l.event.stopPropagation(),l.target.type!==6&&l.target.type!==7&&l.target.type!==1))return;if(this._editor.focus(),l.target.position){let p=!1;for(const u of this._editor.getSelections())if(u.containsPosition(l.target.position)){p=!0;break}p||this._editor.setPosition(l.target.position)}let r=null;l.target.type!==1&&(r={x:l.event.posx-1,width:2,y:l.event.posy-1,height:2}),this.showContextMenu(r)}showContextMenu(l){if(!this._editor.getOption(20)||!this._editor.hasModel())return;if(!this._contextMenuService){this._editor.focus();return}const r=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?v.MenuId.SimpleEditorContext:v.MenuId.EditorContext);r.length>0&&this._doShowContextMenu(r,l)}_getMenuActions(l,r){const p=[],u=this._menuService.createMenu(r,this._contextKeyService),a=u.getActions({arg:l.uri});u.dispose();for(let n of a){const[,h]=n;let g=0;for(const d of h)if(d instanceof v.SubmenuItemAction){const m=this._getMenuActions(l,d.item.submenu);m.length>0&&(p.push(new _.SubmenuAction(d.id,d.label,m)),g++)}else p.push(d),g++;g&&p.push(new _.Separator)}return p.length&&p.pop(),p}_doShowContextMenu(l,r=null){if(!this._editor.hasModel())return;const p=this._editor.getOption(53);if(this._editor.updateOptions({hover:{enabled:!1}}),!r){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const a=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),n=t.getDomNodePagePosition(this._editor.getDomNode()),h=n.left+a.left,g=n.top+a.top+a.height;r={x:h,y:g}}const u=this._editor.getOption(115)&&!k.isIOS;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:u?this._editor.getDomNode():void 0,getAnchor:()=>r,getActions:()=>l,getActionViewItem:a=>{const n=this._keybindingFor(a);if(n)return new f.ActionViewItem(a,a,{label:!0,keybinding:n.getLabel(),isMenu:!0});const h=a;return typeof h.getActionViewItem=="function"?h.getActionViewItem():new f.ActionViewItem(a,a,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:a=>this._keybindingFor(a),onHide:a=>{this._contextMenuIsBeingShownCount--,this._editor.focus(),this._editor.updateOptions({hover:p})}})}_keybindingFor(l){return this._keybindingService.lookupKeybinding(l.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};i.ID="editor.contrib.contextmenu",i=Ee([W(1,o.IContextMenuService),W(2,o.IContextViewService),W(3,C.IContextKeyService),W(4,c.IKeybindingService),W(5,v.IMenuService)],i),e.ContextMenuController=i;class S extends D.EditorAction{constructor(){super({id:"editor.action.showContextMenu",label:w.localize(0,null),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:I.EditorContextKeys.textInputFocus,primary:1024|68,weight:100}})}run(l,r){i.get(r)?.showContextMenu()}}(0,D.registerEditorContribution)(i.ID,i),(0,D.registerEditorAction)(S)}),define(ne[2036],re([1,0,2,39,58,1263]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorRedo=e.CursorUndo=e.CursorUndoRedoController=void 0;class k{constructor(o){this.selections=o}equals(o){const c=this.selections.length,i=o.selections.length;if(c!==i)return!1;for(let S=0;S<c;S++)if(!this.selections[S].equalsSelection(o.selections[S]))return!1;return!0}}class D{constructor(o,c,i){this.cursorState=o,this.scrollTop=c,this.scrollLeft=i}}class I extends t.Disposable{constructor(o){super();this._editor=o,this._isCursorUndoRedo=!1,this._undoStack=[],this._redoStack=[],this._register(o.onDidChangeModel(c=>{this._undoStack=[],this._redoStack=[]})),this._register(o.onDidChangeModelContent(c=>{this._undoStack=[],this._redoStack=[]})),this._register(o.onDidChangeCursorSelection(c=>{if(this._isCursorUndoRedo||!c.oldSelections||c.oldModelVersionId!==c.modelVersionId)return;const i=new k(c.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(i)||(this._undoStack.push(new D(i,o.getScrollTop(),o.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}static get(o){return o.getContribution(I.ID)}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new D(new k(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){!this._editor.hasModel()||this._redoStack.length===0||(this._undoStack.push(new D(new k(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(o){this._isCursorUndoRedo=!0,this._editor.setSelections(o.cursorState.selections),this._editor.setScrollPosition({scrollTop:o.scrollTop,scrollLeft:o.scrollLeft}),this._isCursorUndoRedo=!1}}e.CursorUndoRedoController=I,I.ID="editor.contrib.cursorUndoRedoController";class w extends f.EditorAction{constructor(){super({id:"cursorUndo",label:A.localize(0,null),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:_.EditorContextKeys.textInputFocus,primary:2048|51,weight:100}})}run(o,c,i){I.get(c)?.cursorUndo()}}e.CursorUndo=w;class v extends f.EditorAction{constructor(){super({id:"cursorRedo",label:A.localize(1,null),alias:"Cursor Redo",precondition:void 0})}run(o,c,i){I.get(c)?.cursorRedo()}}e.CursorRedo=v,(0,f.registerEditorContribution)(I.ID,I),(0,f.registerEditorAction)(w),(0,f.registerEditorAction)(v)}),define(ne[2037],re([1,0,39,7,30,194,5,35,1264]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorKeybindingCancellationTokenSource=void 0;const w=(0,k.createDecorator)("IEditorCancelService"),v=new f.RawContextKey("cancellableOperation",!1,(0,I.localize)(0,null));(0,D.registerSingleton)(w,class{constructor(){this._tokens=new WeakMap}add(o,c){let i=this._tokens.get(o);i||(i=o.invokeWithinContext(s=>{const l=v.bindTo(s.get(f.IContextKeyService)),r=new A.LinkedList;return{key:l,tokens:r}}),this._tokens.set(o,i));let S;return i.key.set(!0),S=i.tokens.push(c),()=>{S&&(S(),i.key.set(!i.tokens.isEmpty()),S=void 0)}}cancel(o){const c=this._tokens.get(o);if(!c)return;const i=c.tokens.pop();i&&(i.cancel(),c.key.set(!c.tokens.isEmpty()))}},!0);class C extends _.CancellationTokenSource{constructor(c,i){super(i);this.editor=c,this._unregister=c.invokeWithinContext(S=>S.get(w).add(c,this))}dispose(){this._unregister(),super.dispose()}}e.EditorKeybindingCancellationTokenSource=C,(0,t.registerEditorCommand)(new class extends t.EditorCommand{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:v})}runEditorCommand(o,c){o.get(w).cancel(c)}})}),define(ne[287],re([1,0,29,20,30,2,2037]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextModelCancellationTokenSource=e.EditorStateCancellationTokenSource=e.EditorState=e.CodeEditorStateFlag=void 0;var D;(function(C){C[C.Value=1]="Value",C[C.Selection=2]="Selection",C[C.Position=4]="Position",C[C.Scroll=8]="Scroll"})(D=e.CodeEditorStateFlag||(e.CodeEditorStateFlag={}));class I{constructor(o,c){if(this.flags=c,(this.flags&1)!=0){const i=o.getModel();this.modelVersionId=i?t.format("{0}#{1}",i.uri.toString(),i.getVersionId()):null}else this.modelVersionId=null;(this.flags&4)!=0?this.position=o.getPosition():this.position=null,(this.flags&2)!=0?this.selection=o.getSelection():this.selection=null,(this.flags&8)!=0?(this.scrollLeft=o.getScrollLeft(),this.scrollTop=o.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(o){if(!(o instanceof I))return!1;const c=o;return!(this.modelVersionId!==c.modelVersionId||this.scrollLeft!==c.scrollLeft||this.scrollTop!==c.scrollTop||!this.position&&c.position||this.position&&!c.position||this.position&&c.position&&!this.position.equals(c.position)||!this.selection&&c.selection||this.selection&&!c.selection||this.selection&&c.selection&&!this.selection.equalsRange(c.selection))}validate(o){return this._equals(new I(o,this.flags))}}e.EditorState=I;class w extends k.EditorKeybindingCancellationTokenSource{constructor(o,c,i,S){super(o,S);this._listener=new A.DisposableStore,c&4&&this._listener.add(o.onDidChangeCursorPosition(s=>{(!i||!f.Range.containsPosition(i,s.position))&&this.cancel()})),c&2&&this._listener.add(o.onDidChangeCursorSelection(s=>{(!i||!f.Range.containsRange(i,s.selection))&&this.cancel()})),c&8&&this._listener.add(o.onDidScrollChange(s=>this.cancel())),c&1&&(this._listener.add(o.onDidChangeModel(s=>this.cancel())),this._listener.add(o.onDidChangeModelContent(s=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}e.EditorStateCancellationTokenSource=w;class v extends _.CancellationTokenSource{constructor(o,c){super(c);this._listener=o.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}e.TextModelCancellationTokenSource=v}),define(ne[314],re([1,0,15,30,22,2,9,287,20,84,52,28,67,260,62]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCodeActions=e.CodeActionItem=e.fixAllCommandId=e.organizeImportsCommandId=e.sourceActionCommandId=e.refactorCommandId=e.codeActionCommandId=void 0,e.codeActionCommandId="editor.action.codeAction",e.refactorCommandId="editor.action.refactor",e.sourceActionCommandId="editor.action.sourceAction",e.organizeImportsCommandId="editor.action.organizeImports",e.fixAllCommandId="editor.action.fixAll";class S{constructor(n,h){this.action=n,this.provider=h}async resolve(n){if(this.provider?.resolveCodeAction&&!this.action.edit){let h;try{h=await this.provider.resolveCodeAction(this.action,n)}catch(g){(0,_.onUnexpectedExternalError)(g)}h&&(this.action.edit=h.edit)}return this}}e.CodeActionItem=S;class s extends A.Disposable{constructor(n,h,g){super();this.documentation=h,this._register(g),this.allActions=[...n].sort(s.codeActionsComparator),this.validActions=this.allActions.filter(({action:d})=>!d.disabled)}static codeActionsComparator({action:n},{action:h}){return n.isPreferred&&!h.isPreferred?-1:!n.isPreferred&&h.isPreferred?1:(0,t.isNonEmptyArray)(n.diagnostics)?(0,t.isNonEmptyArray)(h.diagnostics)?n.diagnostics[0].message.localeCompare(h.diagnostics[0].message):-1:(0,t.isNonEmptyArray)(h.diagnostics)?1:0}get hasAutoFix(){return this.validActions.some(({action:n})=>!!n.kind&&c.CodeActionKind.QuickFix.contains(new c.CodeActionKind(n.kind))&&!!n.isPreferred)}}const l={actions:[],documentation:void 0};function r(a,n,h,g,d,m){const b=g.filter||{},E={only:b.include?.value,trigger:g.type},y=new D.TextModelCancellationTokenSource(n,m),T=p(a,n,b),R=new A.DisposableStore,O=T.map(async F=>{try{d.report(F);const L=await F.provideCodeActions(n,h,E,y.token);if(L&&R.add(L),y.token.isCancellationRequested)return l;const M=(L?.actions||[]).filter(B=>B&&(0,c.filtersAction)(b,B)),N=u(F,M,b.include);return{actions:M.map(B=>new S(B,F)),documentation:N}}catch(L){if((0,_.isCancellationError)(L))throw L;return(0,_.onUnexpectedExternalError)(L),l}}),x=a.onDidChange(()=>{const F=a.all(n);(0,t.equals)(F,T)||y.cancel()});return Promise.all(O).then(F=>{const L=F.map(N=>N.actions).flat(),M=(0,t.coalesce)(F.map(N=>N.documentation));return new s(L,M,R)}).finally(()=>{x.dispose(),y.dispose()})}e.getCodeActions=r;function p(a,n,h){return a.all(n).filter(g=>g.providedCodeActionKinds?g.providedCodeActionKinds.some(d=>(0,c.mayIncludeActionsOfKind)(h,new c.CodeActionKind(d))):!0)}function u(a,n,h){if(!a.documentation)return;const g=a.documentation.map(d=>({kind:new c.CodeActionKind(d.kind),command:d.command}));if(h){let d;for(const m of g)m.kind.contains(h)&&(d?d.kind.contains(m.kind)&&(d=m):d=m);if(d)return d?.command}for(const d of n)if(!!d.kind){for(const m of g)if(m.kind.contains(new c.CodeActionKind(d.kind)))return m.command}}C.CommandsRegistry.registerCommand("_executeCodeActionProvider",async function(a,n,h,g,d){if(!(n instanceof k.URI))throw(0,_.illegalArgument)();const{codeActionProvider:m}=a.get(i.ILanguageFeaturesService),b=a.get(v.IModelService).getModel(n);if(!b)throw(0,_.illegalArgument)();const E=w.Selection.isISelection(h)?w.Selection.liftSelection(h):I.Range.isIRange(h)?b.validateRange(h):void 0;if(!E)throw(0,_.illegalArgument)();const y=typeof g=="string"?new c.CodeActionKind(g):void 0,T=await r(m,b,E,{type:1,filter:{includeSourceActions:!0,include:y}},o.Progress.None,f.CancellationToken.None),R=[],O=Math.min(T.validActions.length,typeof d=="number"?d:0);for(let x=0;x<O;x++)R.push(T.validActions[x].resolve(f.CancellationToken.None));try{return await Promise.all(R),T.validActions.map(x=>x.action)}finally{setTimeout(()=>T.dispose(),100)}})}),define(ne[2038],re([1,0,10,36,22,278,2,49,62,314,260,37,38]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionKeybindingResolver=e.CodeActionMenu=void 0;class c extends f.Action{constructor(r,p){super(r.command?r.command.id:r.title,i(r.title),void 0,!r.disabled,p);this.action=r}}function i(l){return l.replace(/\r\n|\r|\n/g," ")}let S=class extends k.Disposable{constructor(r,p,u,a,n){super();this._editor=r,this._delegate=p,this._contextMenuService=u,this._languageFeaturesService=n,this._visible=!1,this._showingActions=this._register(new k.MutableDisposable),this._keybindingResolver=new s({getKeybindings:()=>a.getKeybindings()})}get isVisible(){return this._visible}async show(r,p,u,a){const n=a.includeDisabledActions?p.allActions:p.validActions;if(!n.length){this._visible=!1;return}if(!this._editor.getDomNode())throw this._visible=!1,(0,_.canceled)();this._visible=!0,this._showingActions.value=p;const h=this.getMenuActions(r,n,p.documentation),g=D.Position.isIPosition(u)?this._toCoords(u):u||{x:0,y:0},d=this._keybindingResolver.getResolver(),m=this._editor.getOption(115);this._contextMenuService.showContextMenu({domForShadowRoot:m?this._editor.getDomNode():void 0,getAnchor:()=>g,getActions:()=>h,onHide:()=>{this._visible=!1,this._editor.focus()},autoSelectFirstItem:!0,getKeyBinding:b=>b instanceof c?d(b.action):void 0})}getMenuActions(r,p,u){const a=d=>new c(d.action,()=>this._delegate.onSelectCodeAction(d)),n=p.map(a),h=[...u],g=this._editor.getModel();if(g&&n.length)for(const d of this._languageFeaturesService.codeActionProvider.all(g))d._getAdditionalMenuItems&&h.push(...d._getAdditionalMenuItems({trigger:r.type,only:r.filter?.include?.value},p.map(m=>m.action)));return h.length&&n.push(new f.Separator,...h.map(d=>a(new w.CodeActionItem({title:d.title,command:d},void 0)))),n}_toCoords(r){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(r,1),this._editor.render();const p=this._editor.getScrolledVisiblePosition(r),u=(0,t.getDomNodePagePosition)(this._editor.getDomNode()),a=u.left+p.left,n=u.top+p.top+p.height;return{x:a,y:n}}};S=Ee([W(2,C.IContextMenuService),W(3,o.IKeybindingService),W(4,I.ILanguageFeaturesService)],S),e.CodeActionMenu=S;class s{constructor(r){this._keybindingProvider=r}getResolver(){const r=new A.Lazy(()=>this._keybindingProvider.getKeybindings().filter(p=>s.codeActionCommands.indexOf(p.command)>=0).filter(p=>p.resolvedKeybinding).map(p=>{let u=p.commandArgs;return p.command===w.organizeImportsCommandId?u={kind:v.CodeActionKind.SourceOrganizeImports.value}:p.command===w.fixAllCommandId&&(u={kind:v.CodeActionKind.SourceFixAll.value}),{resolvedKeybinding:p.resolvedKeybinding,...v.CodeActionCommandArgs.fromUser(u,{kind:v.CodeActionKind.None,apply:"never"})}}));return p=>{if(p.kind)return this.bestKeybindingForCodeAction(p,r.getValue())?.resolvedKeybinding}}bestKeybindingForCodeAction(r,p){if(!r.kind)return;const u=new v.CodeActionKind(r.kind);return p.filter(a=>a.kind.contains(u)).filter(a=>a.preferred?r.isPreferred:!0).reduceRight((a,n)=>a?a.kind.contains(n.kind)?n:a:n,void 0)}}e.CodeActionKeybindingResolver=s,s.codeActionCommands=[w.refactorCommandId,w.codeActionCommandId,w.sourceActionCommandId,w.organizeImportsCommandId,w.fixAllCommandId]});var dt=this&&this.__classPrivateFieldGet||function(Q,e,t,f){if(t==="a"&&!f)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?Q!==e||!f:!e.has(Q))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?f:t==="a"?f.call(Q):f?f.value:e.get(Q)},Ot=this&&this.__classPrivateFieldSet||function(Q,e,t,f,_){if(f==="m")throw new TypeError("Private method is not writable");if(f==="a"&&!_)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?Q!==e||!_:!e.has(Q))throw new TypeError("Cannot write private member to an object whose class did not declare it");return f==="a"?_.call(Q,t):_?_.value=t:e.set(Q,t),t};define(ne[2039],re([1,0,11,22,6,2,19,20,7,67,314]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";var C;Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionModel=e.CodeActionsState=e.SUPPORTED_CODE_ACTIONS=void 0,e.SUPPORTED_CODE_ACTIONS=new I.RawContextKey("supportedCodeAction","");class o extends A.Disposable{constructor(l,r,p,u=250){super();this._editor=l,this._markerService=r,this._signalChange=p,this._delay=u,this._autoTriggerTimer=this._register(new t.TimeoutTimer),this._register(this._markerService.onMarkerChanged(a=>this._onMarkerChanges(a))),this._register(this._editor.onDidChangeCursorPosition(()=>this._onCursorChange()))}trigger(l){const r=this._getRangeOfSelectionUnlessWhitespaceEnclosed(l);return this._createEventAndSignalChange(l,r)}_onMarkerChanges(l){const r=this._editor.getModel();!r||l.some(p=>(0,k.isEqual)(p,r.uri))&&this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2})},this._delay)}_onCursorChange(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2})},this._delay)}_getRangeOfMarker(l){const r=this._editor.getModel();if(!!r)for(const p of this._markerService.read({resource:r.uri})){const u=r.validateRange(p);if(D.Range.intersectRanges(u,l))return D.Range.lift(u)}}_getRangeOfSelectionUnlessWhitespaceEnclosed(l){if(!this._editor.hasModel())return;const r=this._editor.getModel(),p=this._editor.getSelection();if(p.isEmpty()&&l.type===2){const{lineNumber:u,column:a}=p.getPosition(),n=r.getLineContent(u);if(n.length===0)return;if(a===1){if(/\s/.test(n[0]))return}else if(a===r.getLineMaxColumn(u)){if(/\s/.test(n[n.length-1]))return}else if(/\s/.test(n[a-2])&&/\s/.test(n[a-1]))return}return p}_createEventAndSignalChange(l,r){const p=this._editor.getModel();if(!r||!p){this._signalChange(void 0);return}const u=this._getRangeOfMarker(r),a=u?u.getStartPosition():r.getStartPosition(),n={trigger:l,selection:r,position:a};return this._signalChange(n),n}}var c;(function(s){let l;(function(p){p[p.Empty=0]="Empty",p[p.Triggered=1]="Triggered"})(l=s.Type||(s.Type={})),s.Empty={type:0};class r{constructor(u,a,n,h){this.trigger=u,this.rangeOrSelection=a,this.position=n,this._cancellablePromise=h,this.type=1,this.actions=h.catch(g=>{if((0,f.isCancellationError)(g))return i;throw g})}cancel(){this._cancellablePromise.cancel()}}s.Triggered=r})(c=e.CodeActionsState||(e.CodeActionsState={}));const i={allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1};class S extends A.Disposable{constructor(l,r,p,u,a){super();this._editor=l,this._registry=r,this._markerService=p,this._progressService=a,this._codeActionOracle=this._register(new A.MutableDisposable),this._state=c.Empty,this._onDidChangeState=this._register(new _.Emitter),this.onDidChangeState=this._onDidChangeState.event,C.set(this,!1),this._supportedCodeActions=e.SUPPORTED_CODE_ACTIONS.bindTo(u),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._update()}dispose(){dt(this,C,"f")||(Ot(this,C,!0,"f"),super.dispose(),this.setState(c.Empty,!0))}_update(){if(dt(this,C,"f"))return;this._codeActionOracle.value=void 0,this.setState(c.Empty);const l=this._editor.getModel();if(l&&this._registry.has(l)&&!this._editor.getOption(81)){const r=[];for(const p of this._registry.all(l))Array.isArray(p.providedCodeActionKinds)&&r.push(...p.providedCodeActionKinds);this._supportedCodeActions.set(r.join(" ")),this._codeActionOracle.value=new o(this._editor,this._markerService,p=>{if(!p){this.setState(c.Empty);return}const u=(0,t.createCancelablePromise)(a=>(0,v.getCodeActions)(this._registry,l,p.selection,p.trigger,w.Progress.None,a));p.trigger.type===1&&this._progressService?.showWhile(u,250),this.setState(new c.Triggered(p.trigger,p.selection,p.position,u))},void 0),this._codeActionOracle.value.trigger({type:2})}else this._supportedCodeActions.reset()}trigger(l){this._codeActionOracle.value&&this._codeActionOracle.value.trigger(l)}setState(l,r){l!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=l,!r&&!dt(this,C,"f")&&this._onDidChangeState.fire(l))}}e.CodeActionModel=S,C=new WeakMap}),define(ne[2040],re([1,0,39,454,1269]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class A extends t.EditorAction{constructor(){super({id:"editor.action.fontZoomIn",label:_.localize(0,null),alias:"Editor Font Zoom In",precondition:void 0})}run(w,v){f.EditorZoom.setZoomLevel(f.EditorZoom.getZoomLevel()+1)}}class k extends t.EditorAction{constructor(){super({id:"editor.action.fontZoomOut",label:_.localize(1,null),alias:"Editor Font Zoom Out",precondition:void 0})}run(w,v){f.EditorZoom.setZoomLevel(f.EditorZoom.getZoomLevel()-1)}}class D extends t.EditorAction{constructor(){super({id:"editor.action.fontZoomReset",label:_.localize(2,null),alias:"Editor Font Zoom Reset",precondition:void 0})}run(w,v){f.EditorZoom.setZoomLevel(0)}}(0,t.registerEditorAction)(A),(0,t.registerEditorAction)(k),(0,t.registerEditorAction)(D)}),define(ne[403],re([1,0,112,15,30,22,92,194,13,9,287,106,49,20,84,184,61,708,1270,28,107,5,62]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getOnTypeFormattingEdits=e.getDocumentFormattingEditsUntilResult=e.getDocumentRangeFormattingEditsUntilResult=e.formatDocumentWithProvider=e.formatDocumentWithSelectedProvider=e.formatDocumentRangesWithProvider=e.formatDocumentRangesWithSelectedProvider=e.FormattingConflicts=e.FormattingMode=e.getRealAndSyntheticDocumentFormattersOrdered=e.alertFormattingEdits=void 0;function h(F){if(F=F.filter(B=>B.range),!F.length)return;let{range:L}=F[0];for(let B=1;B<F.length;B++)L=c.Range.plusRange(L,F[B].range);const{startLineNumber:M,endLineNumber:N}=L;M===N?F.length===1?(0,t.alert)(r.localize(0,null,M)):(0,t.alert)(r.localize(1,null,F.length,M)):F.length===1?(0,t.alert)(r.localize(2,null,M,N)):(0,t.alert)(r.localize(3,null,F.length,M,N))}e.alertFormattingEdits=h;function g(F,L,M){const N=[],B=new Set,P=F.ordered(M);for(const z of P)N.push(z),z.extensionId&&B.add(u.ExtensionIdentifier.toKey(z.extensionId));const V=L.ordered(M);for(const z of V){if(z.extensionId){if(B.has(u.ExtensionIdentifier.toKey(z.extensionId)))continue;B.add(u.ExtensionIdentifier.toKey(z.extensionId))}N.push({displayName:z.displayName,extensionId:z.extensionId,provideDocumentFormattingEdits(U,H,K){return z.provideDocumentRangeFormattingEdits(U,U.getFullModelRange(),H,K)}})}return N}e.getRealAndSyntheticDocumentFormattersOrdered=g;var d;(function(F){F[F.Explicit=1]="Explicit",F[F.Silent=2]="Silent"})(d=e.FormattingMode||(e.FormattingMode={}));class m{static setFormatterSelector(L){return{dispose:m._selectors.unshift(L)}}static async select(L,M,N){if(L.length===0)return;const B=k.Iterable.first(m._selectors);if(B)return await B(L,M,N)}}e.FormattingConflicts=m,m._selectors=new D.LinkedList;async function b(F,L,M,N,B,P){const V=F.get(a.IInstantiationService),{documentRangeFormattingEditProvider:z}=F.get(n.ILanguageFeaturesService),U=(0,C.isCodeEditor)(L)?L.getModel():L,H=z.ordered(U),K=await m.select(H,U,N);K&&(B.report(K),await V.invokeFunction(E,K,L,M,P))}e.formatDocumentRangesWithSelectedProvider=b;async function E(F,L,M,N,B){const P=F.get(S.IEditorWorkerService);let V,z;(0,C.isCodeEditor)(M)?(V=M.getModel(),z=new v.EditorStateCancellationTokenSource(M,1|4,void 0,B)):(V=M,z=new v.TextModelCancellationTokenSource(M,B));let U=[],H=0;for(let j of(0,f.asArray)(N).sort(c.Range.compareRangesUsingStarts))H>0&&c.Range.areIntersectingOrTouching(U[H-1],j)?U[H-1]=c.Range.fromPositions(U[H-1].getStartPosition(),j.getEndPosition()):H=U.push(j);const K=async j=>await L.provideDocumentRangeFormattingEdits(V,j,V.getFormattingOptions(),z.token)||[],G=(j,X)=>{if(!j.length||!X.length)return!1;const Y=j.reduce(($,J)=>c.Range.plusRange($,J.range),j[0].range);if(!X.some($=>c.Range.intersectRanges(Y,$.range)))return!1;for(let $ of j)for(let J of X)if(c.Range.intersectRanges($.range,J.range))return!0;return!1},q=[],Z=[];try{for(let j of U){if(z.token.isCancellationRequested)return!0;Z.push(await K(j))}for(let j=0;j<U.length;++j)for(let X=j+1;X<U.length;++X){if(z.token.isCancellationRequested)return!0;if(G(Z[j],Z[X])){const Y=c.Range.plusRange(U[j],U[X]),$=await K(Y);U.splice(X,1),U.splice(j,1),U.push(Y),Z.splice(X,1),Z.splice(j,1),Z.push($),j=0,X=0}}for(let j of Z){if(z.token.isCancellationRequested)return!0;const X=await P.computeMoreMinimalEdits(V.uri,j);X&&q.push(...X)}}finally{z.dispose()}if(q.length===0)return!1;if((0,C.isCodeEditor)(M))l.FormattingEdit.execute(M,q,!0),h(q),M.revealPositionInCenterIfOutsideViewport(M.getPosition(),1);else{const[{range:j}]=q,X=new i.Selection(j.startLineNumber,j.startColumn,j.endLineNumber,j.endColumn);V.pushEditOperations([X],q.map(Y=>({text:Y.text,range:c.Range.lift(Y.range),forceMoveMarkers:!0})),Y=>{for(const{range:$}of Y)if(c.Range.areIntersectingOrTouching($,X))return[new i.Selection($.startLineNumber,$.startColumn,$.endLineNumber,$.endColumn)];return null})}return!0}e.formatDocumentRangesWithProvider=E;async function y(F,L,M,N,B){const P=F.get(a.IInstantiationService),V=F.get(n.ILanguageFeaturesService),z=(0,C.isCodeEditor)(L)?L.getModel():L,U=g(V.documentFormattingEditProvider,V.documentRangeFormattingEditProvider,z),H=await m.select(U,z,M);H&&(N.report(H),await P.invokeFunction(T,H,L,M,B))}e.formatDocumentWithSelectedProvider=y;async function T(F,L,M,N,B){const P=F.get(S.IEditorWorkerService);let V,z;(0,C.isCodeEditor)(M)?(V=M.getModel(),z=new v.EditorStateCancellationTokenSource(M,1|4,void 0,B)):(V=M,z=new v.TextModelCancellationTokenSource(M,B));let U;try{const H=await L.provideDocumentFormattingEdits(V,V.getFormattingOptions(),z.token);if(U=await P.computeMoreMinimalEdits(V.uri,H),z.token.isCancellationRequested)return!0}finally{z.dispose()}if(!U||U.length===0)return!1;if((0,C.isCodeEditor)(M))l.FormattingEdit.execute(M,U,N!==2),N!==2&&(h(U),M.revealPositionInCenterIfOutsideViewport(M.getPosition(),1));else{const[{range:H}]=U,K=new i.Selection(H.startLineNumber,H.startColumn,H.endLineNumber,H.endColumn);V.pushEditOperations([K],U.map(G=>({text:G.text,range:c.Range.lift(G.range),forceMoveMarkers:!0})),G=>{for(const{range:q}of G)if(c.Range.areIntersectingOrTouching(q,K))return[new i.Selection(q.startLineNumber,q.startColumn,q.endLineNumber,q.endColumn)];return null})}return!0}e.formatDocumentWithProvider=T;async function R(F,L,M,N,B,P){const V=L.documentRangeFormattingEditProvider.ordered(M);for(const z of V){let U=await Promise.resolve(z.provideDocumentRangeFormattingEdits(M,N,B,P)).catch(A.onUnexpectedExternalError);if((0,f.isNonEmptyArray)(U))return await F.computeMoreMinimalEdits(M.uri,U)}}e.getDocumentRangeFormattingEditsUntilResult=R;async function O(F,L,M,N,B){const P=g(L.documentFormattingEditProvider,L.documentRangeFormattingEditProvider,M);for(const V of P){let z=await Promise.resolve(V.provideDocumentFormattingEdits(M,N,B)).catch(A.onUnexpectedExternalError);if((0,f.isNonEmptyArray)(z))return await F.computeMoreMinimalEdits(M.uri,z)}}e.getDocumentFormattingEditsUntilResult=O;function x(F,L,M,N,B,P,V){const z=L.onTypeFormattingEditProvider.ordered(M);return z.length===0||z[0].autoFormatTriggerCharacters.indexOf(B)<0?Promise.resolve(void 0):Promise.resolve(z[0].provideOnTypeFormattingEdits(M,N,B,P,V)).catch(A.onUnexpectedExternalError).then(U=>F.computeMoreMinimalEdits(M.uri,U))}e.getOnTypeFormattingEdits=x,p.CommandsRegistry.registerCommand("_executeFormatRangeProvider",async function(F,...L){const[M,N,B]=L;(0,I.assertType)(w.URI.isUri(M)),(0,I.assertType)(c.Range.isIRange(N));const P=F.get(s.ITextModelService),V=F.get(S.IEditorWorkerService),z=F.get(n.ILanguageFeaturesService),U=await P.createModelReference(M);try{return R(V,z,U.object.textEditorModel,c.Range.lift(N),B,_.CancellationToken.None)}finally{U.dispose()}}),p.CommandsRegistry.registerCommand("_executeFormatDocumentProvider",async function(F,...L){const[M,N]=L;(0,I.assertType)(w.URI.isUri(M));const B=F.get(s.ITextModelService),P=F.get(S.IEditorWorkerService),V=F.get(n.ILanguageFeaturesService),z=await B.createModelReference(M);try{return O(P,V,z.object.textEditorModel,N,_.CancellationToken.None)}finally{z.dispose()}}),p.CommandsRegistry.registerCommand("_executeFormatOnTypeProvider",async function(F,...L){const[M,N,B,P]=L;(0,I.assertType)(w.URI.isUri(M)),(0,I.assertType)(o.Position.isIPosition(N)),(0,I.assertType)(typeof B=="string");const V=F.get(s.ITextModelService),z=F.get(S.IEditorWorkerService),U=F.get(n.ILanguageFeaturesService),H=await V.createModelReference(M);try{return x(z,U,H.object.textEditorModel,o.Position.lift(N),B,P,_.CancellationToken.None)}finally{H.dispose()}})}),define(ne[2041],re([1,0,15,30,22,97,2,39,72,339,20,58,184,62,403,708,1271,28,7,5,67]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let a=class{constructor(m,b,E){this._editor=m,this._languageFeaturesService=b,this._workerService=E,this._disposables=new k.DisposableStore,this._sessionDisposables=new k.DisposableStore,this._disposables.add(b.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(m.onDidChangeModel(()=>this._update())),this._disposables.add(m.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(m.onDidChangeConfiguration(y=>{y.hasChanged(49)&&this._update()}))}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(49)||!this._editor.hasModel())return;const m=this._editor.getModel(),[b]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(m);if(!b||!b.autoFormatTriggerCharacters)return;let E=new w.CharacterSet;for(let y of b.autoFormatTriggerCharacters)E.add(y.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(y=>{let T=y.charCodeAt(y.length-1);E.has(T)&&this._trigger(String.fromCharCode(T))}))}_trigger(m){if(!this._editor.hasModel()||this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const b=this._editor.getModel(),E=this._editor.getPosition(),y=new f.CancellationTokenSource,T=this._editor.onDidChangeModelContent(R=>{if(R.isFlush){y.cancel(),T.dispose();return}for(let O=0,x=R.changes.length;O<x;O++)if(R.changes[O].range.endLineNumber<=E.lineNumber){y.cancel(),T.dispose();return}});(0,i.getOnTypeFormattingEdits)(this._workerService,this._languageFeaturesService,b,E,m,b.getFormattingOptions(),y.token).then(R=>{y.token.isCancellationRequested||(0,t.isNonEmptyArray)(R)&&(S.FormattingEdit.execute(this._editor,R,!0),(0,i.alertFormattingEdits)(R))}).finally(()=>{T.dispose()})}};a.ID="editor.contrib.autoFormat",a=Ee([W(1,c.ILanguageFeaturesService),W(2,o.IEditorWorkerService)],a);let n=class{constructor(m,b,E){this.editor=m,this._languageFeaturesService=b,this._instantiationService=E,this._callOnDispose=new k.DisposableStore,this._callOnModel=new k.DisposableStore,this._callOnDispose.add(m.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(m.onDidChangeModel(()=>this._update())),this._callOnDispose.add(m.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(b.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),!!this.editor.getOption(48)&&(!this.editor.hasModel()||!this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())||this._callOnModel.add(this.editor.onDidPaste(({range:m})=>this._trigger(m))))}_trigger(m){!this.editor.hasModel()||this.editor.getSelections().length>1||this._instantiationService.invokeFunction(i.formatDocumentRangesWithSelectedProvider,this.editor,m,2,u.Progress.None,f.CancellationToken.None).catch(_.onUnexpectedError)}};n.ID="editor.contrib.formatOnPaste",n=Ee([W(1,c.ILanguageFeaturesService),W(2,p.IInstantiationService)],n);class h extends D.EditorAction{constructor(){super({id:"editor.action.formatDocument",label:s.localize(0,null),alias:"Format Document",precondition:r.ContextKeyExpr.and(C.EditorContextKeys.notInCompositeEditor,C.EditorContextKeys.writable,C.EditorContextKeys.hasDocumentFormattingProvider),kbOpts:{kbExpr:C.EditorContextKeys.editorTextFocus,primary:1024|512|36,linux:{primary:2048|1024|39},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}async run(m,b){if(b.hasModel()){const E=m.get(p.IInstantiationService);await m.get(u.IEditorProgressService).showWhile(E.invokeFunction(i.formatDocumentWithSelectedProvider,b,1,u.Progress.None,f.CancellationToken.None),250)}}}class g extends D.EditorAction{constructor(){super({id:"editor.action.formatSelection",label:s.localize(1,null),alias:"Format Selection",precondition:r.ContextKeyExpr.and(C.EditorContextKeys.writable,C.EditorContextKeys.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:C.EditorContextKeys.editorTextFocus,primary:(0,A.KeyChord)(2048|41,2048|36),weight:100},contextMenuOpts:{when:C.EditorContextKeys.hasNonEmptySelection,group:"1_modification",order:1.31}})}async run(m,b){if(!b.hasModel())return;const E=m.get(p.IInstantiationService),y=b.getModel(),T=b.getSelections().map(O=>O.isEmpty()?new v.Range(O.startLineNumber,1,O.startLineNumber,y.getLineMaxColumn(O.startLineNumber)):O);await m.get(u.IEditorProgressService).showWhile(E.invokeFunction(i.formatDocumentRangesWithSelectedProvider,b,T,1,u.Progress.None,f.CancellationToken.None),250)}}(0,D.registerEditorContribution)(a.ID,a),(0,D.registerEditorContribution)(n.ID,n),(0,D.registerEditorAction)(h),(0,D.registerEditorAction)(g),l.CommandsRegistry.registerCommand("editor.action.format",async d=>{const m=d.get(I.ICodeEditorService).getFocusedCodeEditor();if(!m||!m.hasModel())return;const b=d.get(l.ICommandService);m.getSelection().isEmpty()?await b.executeCommand("editor.action.formatDocument"):await b.executeCommand("editor.action.formatSelection")})}),define(ne[752],re([1,0,30,22,39,395,62]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getReferencesAtPosition=e.getTypeDefinitionsAtPosition=e.getImplementationsAtPosition=e.getDeclarationsAtPosition=e.getDefinitionsAtPosition=void 0;function D(i,S,s,l){const p=s.ordered(i).map(u=>Promise.resolve(l(u,i,S)).then(void 0,a=>{(0,f.onUnexpectedExternalError)(a)}));return Promise.all(p).then(u=>{const a=[];for(let n of u)Array.isArray(n)?a.push(...n):n&&a.push(n);return a})}function I(i,S,s,l){return D(S,s,i,(r,p,u)=>r.provideDefinition(p,u,l))}e.getDefinitionsAtPosition=I;function w(i,S,s,l){return D(S,s,i,(r,p,u)=>r.provideDeclaration(p,u,l))}e.getDeclarationsAtPosition=w;function v(i,S,s,l){return D(S,s,i,(r,p,u)=>r.provideImplementation(p,u,l))}e.getImplementationsAtPosition=v;function C(i,S,s,l){return D(S,s,i,(r,p,u)=>r.provideTypeDefinition(p,u,l))}e.getTypeDefinitionsAtPosition=C;function o(i,S,s,l,r){return D(S,s,i,async(p,u,a)=>{const n=await p.provideReferences(u,a,{includeDeclaration:!0},r);if(!l||!n||n.length!==2)return n;const h=await p.provideReferences(u,a,{includeDeclaration:!1},r);return h&&h.length===1?h:n})}e.getReferencesAtPosition=o;async function c(i){const S=await i(),s=new A.ReferencesModel(S,""),l=s.references.map(r=>r.link);return s.dispose(),l}(0,_.registerModelAndPositionCommand)("_executeDefinitionProvider",(i,S,s)=>{const l=i.get(k.ILanguageFeaturesService),r=I(l.definitionProvider,S,s,t.CancellationToken.None);return c(()=>r)}),(0,_.registerModelAndPositionCommand)("_executeTypeDefinitionProvider",(i,S,s)=>{const l=i.get(k.ILanguageFeaturesService),r=C(l.typeDefinitionProvider,S,s,t.CancellationToken.None);return c(()=>r)}),(0,_.registerModelAndPositionCommand)("_executeDeclarationProvider",(i,S,s)=>{const l=i.get(k.ILanguageFeaturesService),r=w(l.declarationProvider,S,s,t.CancellationToken.None);return c(()=>r)}),(0,_.registerModelAndPositionCommand)("_executeReferenceProvider",(i,S,s)=>{const l=i.get(k.ILanguageFeaturesService),r=o(l.referenceProvider,S,s,!1,t.CancellationToken.None);return c(()=>r)}),(0,_.registerModelAndPositionCommand)("_executeImplementationProvider",(i,S,s)=>{const l=i.get(k.ILanguageFeaturesService),r=v(l.implementationProvider,S,s,t.CancellationToken.None);return c(()=>r)})}),define(ne[2042],re([1,0,6,2,19,39,72,20,1280,7,35,5,38,94,26]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISymbolNavigationService=e.ctxHasSymbols=void 0,e.ctxHasSymbols=new w.RawContextKey("hasSymbols",!1,(0,I.localize)(0,null)),e.ISymbolNavigationService=(0,C.createDecorator)("ISymbolNavigationService");let S=class{constructor(r,p,u,a){this._editorService=p,this._notificationService=u,this._keybindingService=a,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=e.ctxHasSymbols.bindTo(r)}reset(){this._ctxHasSymbols.reset(),this._currentState?.dispose(),this._currentMessage?.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(r){const p=r.parent.parent;if(p.references.length<=1){this.reset();return}this._currentModel=p,this._currentIdx=p.references.indexOf(r),this._ctxHasSymbols.set(!0),this._showMessage();const u=new s(this._editorService),a=u.onDidChange(n=>{if(this._ignoreEditorChange)return;const h=this._editorService.getActiveCodeEditor();if(!h)return;const g=h.getModel(),d=h.getPosition();if(!g||!d)return;let m=!1,b=!1;for(const E of p.references)if((0,_.isEqual)(E.uri,g.uri))m=!0,b=b||D.Range.containsPosition(E.range,d);else if(m)break;(!m||!b)&&this.reset()});this._currentState=(0,f.combinedDisposable)(u,a)}revealNext(r){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const p=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:p.uri,options:{selection:D.Range.collapseToStart(p.range),selectionRevealType:3}},r).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){this._currentMessage?.dispose();const r=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),p=r?(0,I.localize)(1,null,this._currentIdx+1,this._currentModel.references.length,r.getLabel()):(0,I.localize)(2,null,this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(p)}};S=Ee([W(0,w.IContextKeyService),W(1,k.ICodeEditorService),W(2,i.INotificationService),W(3,o.IKeybindingService)],S),(0,v.registerSingleton)(e.ISymbolNavigationService,S,!0),(0,A.registerEditorCommand)(new class extends A.EditorCommand{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:e.ctxHasSymbols,kbOpts:{weight:100,primary:70}})}runEditorCommand(l,r){return l.get(e.ISymbolNavigationService).revealNext(r)}}),c.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:e.ctxHasSymbols,primary:9,handler(l){l.get(e.ISymbolNavigationService).reset()}});let s=class{constructor(r){this._listener=new Map,this._disposables=new f.DisposableStore,this._onDidChange=new t.Emitter,this.onDidChange=this._onDidChange.event,this._disposables.add(r.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(r.onCodeEditorAdd(this._onDidAddEditor,this)),r.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),(0,f.dispose)(this._listener.values())}_onDidAddEditor(r){this._listener.set(r,(0,f.combinedDisposable)(r.onDidChangeCursorPosition(p=>this._onDidChange.fire({editor:r})),r.onDidChangeModelContent(p=>this._onDidChange.fire({editor:r}))))}_onDidRemoveEditor(r){this._listener.get(r)?.dispose(),this._listener.delete(r)}};s=Ee([W(0,k.ICodeEditorService)],s)}),define(ne[753],re([1,0,11,30,22,39,62]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getHoverPromise=e.getHover=e.HoverProviderResult=void 0;class D{constructor(c,i,S){this.provider=c,this.hover=i,this.ordinal=S}}e.HoverProviderResult=D;async function I(o,c,i,S,s){try{const l=await Promise.resolve(o.provideHover(i,S,s));if(l&&C(l))return new D(o,l,c)}catch(l){(0,_.onUnexpectedExternalError)(l)}}function w(o,c,i,S){const l=o.ordered(c).map((r,p)=>I(r,p,c,i,S));return t.AsyncIterableObject.fromPromises(l).coalesce()}e.getHover=w;function v(o,c,i,S){return w(o,c,i,S).map(s=>s.hover).toPromise()}e.getHoverPromise=v,(0,A.registerModelAndPositionCommand)("_executeHoverProvider",(o,c,i)=>{const S=o.get(k.ILanguageFeaturesService);return v(S.hoverProvider,c,i,f.CancellationToken.None)});function C(o){const c=typeof o.range!="undefined",i=typeof o.contents!="undefined"&&o.contents&&o.contents.length>0;return c&&i}}),define(ne[557],re([1,0,10,15,11,117,2,186,49,20,42,753,1282,8,41,62]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderMarkdownHovers=e.MarkdownHoverParticipant=e.MarkdownHover=void 0;const s=t.$;class l{constructor(a,n,h,g){this.owner=a,this.range=n,this.contents=h,this.ordinal=g}isValidForHoverAnchor(a){return a.type===1&&this.range.startColumn<=a.range.startColumn&&this.range.endColumn>=a.range.endColumn}}e.MarkdownHover=l;let r=class{constructor(a,n,h,g,d){this._editor=a,this._languageService=n,this._openerService=h,this._configurationService=g,this._languageFeaturesService=d,this.hoverOrdinal=2}createLoadingMessage(a){return new l(this,a.range,[new A.MarkdownString().appendText(o.localize(0,null))],2e3)}computeSync(a,n){if(!this._editor.hasModel()||a.type!==1)return[];const h=this._editor.getModel(),g=a.range.startLineNumber,d=h.getLineMaxColumn(g),m=[];let b=1e3;const E=h.getLineLength(g),y=h.getLanguageIdAtPosition(a.range.startLineNumber,a.range.startColumn),T=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:y});typeof T=="number"&&E>=T&&m.push(new l(this,a.range,[{value:o.localize(1,null)}],b++));for(const R of n){const O=R.range.startLineNumber===g?R.range.startColumn:1,x=R.range.endLineNumber===g?R.range.endColumn:d,F=R.options.hoverMessage;if(!F||(0,A.isEmptyMarkdownString)(F))continue;const L=new w.Range(a.range.startLineNumber,O,a.range.startLineNumber,x);m.push(new l(this,L,(0,f.asArray)(F),b++))}return m}computeAsync(a,n,h){if(!this._editor.hasModel()||a.type!==1)return _.AsyncIterableObject.EMPTY;const g=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(g))return _.AsyncIterableObject.EMPTY;const d=new I.Position(a.range.startLineNumber,a.range.startColumn);return(0,C.getHover)(this._languageFeaturesService.hoverProvider,g,d,h).filter(m=>!(0,A.isEmptyMarkdownString)(m.hover.contents)).map(m=>{const b=m.hover.range?w.Range.lift(m.hover.range):a.range;return new l(this,b,m.hover.contents,m.ordinal)})}renderHoverParts(a,n){return p(a,n,this._editor,this._languageService,this._openerService)}};r=Ee([W(1,v.ILanguageService),W(2,i.IOpenerService),W(3,c.IConfigurationService),W(4,S.ILanguageFeaturesService)],r),e.MarkdownHoverParticipant=r;function p(u,a,n,h,g){a.sort((m,b)=>m.ordinal-b.ordinal);const d=new k.DisposableStore;for(const m of a)for(const b of m.contents){if((0,A.isEmptyMarkdownString)(b))continue;const E=s("div.hover-row.markdown-hover"),y=t.append(E,s("div.hover-contents")),T=d.add(new D.MarkdownRenderer({editor:n},h,g));d.add(T.onDidRenderAsync(()=>{y.className="hover-contents code-hover-contents",u.onContentsChanged()}));const R=d.add(T.render(b));y.appendChild(R.element),u.fragment.appendChild(E)}return d}e.renderMarkdownHovers=p}),define(ne[754],re([1,0,2,29,39,546,136,20,84,58,124,52,710,1285,53,522]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentationToTabsCommand=e.IndentationToSpacesCommand=e.AutoIndentOnPaste=e.AutoIndentOnPasteCommand=e.ReindentSelectedLinesAction=e.ReindentLinesAction=e.DetectIndentation=e.IndentUsingSpaces=e.IndentUsingTabs=e.ChangeIndentationSizeAction=e.IndentationToTabsAction=e.IndentationToSpacesAction=e.getReindentEditOperations=void 0;function s(T,R,O,x,F){if(T.getLineCount()===1&&T.getLineMaxColumn(1)===1)return[];const L=R.getLanguageConfiguration(T.getLanguageId()).indentationRules;if(!L)return[];for(x=Math.min(x,T.getLineCount());O<=x&&L.unIndentedLinePattern;){let q=T.getLineContent(O);if(!L.unIndentedLinePattern.test(q))break;O++}if(O>x-1)return[];const{tabSize:M,indentSize:N,insertSpaces:B}=T.getOptions(),P=(q,Z)=>(Z=Z||1,A.ShiftCommand.shiftIndent(q,q.length+Z,M,N,B)),V=(q,Z)=>(Z=Z||1,A.ShiftCommand.unshiftIndent(q,q.length+Z,M,N,B));let z=[],U,H=T.getLineContent(O),K=H;if(F!=null){U=F;let q=f.getLeadingWhitespace(H);K=U+H.substring(q.length),L.decreaseIndentPattern&&L.decreaseIndentPattern.test(K)&&(U=V(U),K=U+H.substring(q.length)),H!==K&&z.push(k.EditOperation.replaceMove(new I.Selection(O,1,O,q.length+1),(0,S.normalizeIndentation)(U,N,B)))}else U=f.getLeadingWhitespace(H);let G=U;L.increaseIndentPattern&&L.increaseIndentPattern.test(K)?(G=P(G),U=P(U)):L.indentNextLinePattern&&L.indentNextLinePattern.test(K)&&(G=P(G)),O++;for(let q=O;q<=x;q++){let Z=T.getLineContent(q),j=f.getLeadingWhitespace(Z),X=G+Z.substring(j.length);L.decreaseIndentPattern&&L.decreaseIndentPattern.test(X)&&(G=V(G),U=V(U)),j!==G&&z.push(k.EditOperation.replaceMove(new I.Selection(q,1,q,j.length+1),(0,S.normalizeIndentation)(G,N,B))),!(L.unIndentedLinePattern&&L.unIndentedLinePattern.test(Z))&&(L.increaseIndentPattern&&L.increaseIndentPattern.test(X)?(U=P(U),G=U):L.indentNextLinePattern&&L.indentNextLinePattern.test(X)?G=P(G):G=U)}return z}e.getReindentEditOperations=s;class l extends _.EditorAction{constructor(){super({id:l.ID,label:c.localize(0,null),alias:"Convert Indentation to Spaces",precondition:w.EditorContextKeys.writable})}run(R,O){let x=O.getModel();if(!x)return;let F=x.getOptions(),L=O.getSelection();if(!L)return;const M=new E(L,F.tabSize);O.pushUndoStop(),O.executeCommands(this.id,[M]),O.pushUndoStop(),x.updateOptions({insertSpaces:!0})}}e.IndentationToSpacesAction=l,l.ID="editor.action.indentationToSpaces";class r extends _.EditorAction{constructor(){super({id:r.ID,label:c.localize(1,null),alias:"Convert Indentation to Tabs",precondition:w.EditorContextKeys.writable})}run(R,O){let x=O.getModel();if(!x)return;let F=x.getOptions(),L=O.getSelection();if(!L)return;const M=new y(L,F.tabSize);O.pushUndoStop(),O.executeCommands(this.id,[M]),O.pushUndoStop(),x.updateOptions({insertSpaces:!1})}}e.IndentationToTabsAction=r,r.ID="editor.action.indentationToTabs";class p extends _.EditorAction{constructor(R,O){super(O);this.insertSpaces=R}run(R,O){const x=R.get(i.IQuickInputService),F=R.get(C.IModelService);let L=O.getModel();if(!L)return;const M=F.getCreationOptions(L.getLanguageId(),L.uri,L.isForSimpleWidget),N=[1,2,3,4,5,6,7,8].map(P=>({id:P.toString(),label:P.toString(),description:P===M.tabSize?c.localize(2,null):void 0})),B=Math.min(L.getOptions().tabSize-1,7);setTimeout(()=>{x.pick(N,{placeHolder:c.localize(3,null),activeItem:N[B]}).then(P=>{P&&L&&!L.isDisposed()&&L.updateOptions({tabSize:parseInt(P.label,10),insertSpaces:this.insertSpaces})})},50)}}e.ChangeIndentationSizeAction=p;class u extends p{constructor(){super(!1,{id:u.ID,label:c.localize(4,null),alias:"Indent Using Tabs",precondition:void 0})}}e.IndentUsingTabs=u,u.ID="editor.action.indentUsingTabs";class a extends p{constructor(){super(!0,{id:a.ID,label:c.localize(5,null),alias:"Indent Using Spaces",precondition:void 0})}}e.IndentUsingSpaces=a,a.ID="editor.action.indentUsingSpaces";class n extends _.EditorAction{constructor(){super({id:n.ID,label:c.localize(6,null),alias:"Detect Indentation from Content",precondition:void 0})}run(R,O){const x=R.get(C.IModelService);let F=O.getModel();if(!F)return;const L=x.getCreationOptions(F.getLanguageId(),F.uri,F.isForSimpleWidget);F.detectIndentation(L.insertSpaces,L.tabSize)}}e.DetectIndentation=n,n.ID="editor.action.detectIndentation";class h extends _.EditorAction{constructor(){super({id:"editor.action.reindentlines",label:c.localize(7,null),alias:"Reindent Lines",precondition:w.EditorContextKeys.writable})}run(R,O){const x=R.get(v.ILanguageConfigurationService);let F=O.getModel();if(!F)return;let L=s(F,x,1,F.getLineCount());L.length>0&&(O.pushUndoStop(),O.executeEdits(this.id,L),O.pushUndoStop())}}e.ReindentLinesAction=h;class g extends _.EditorAction{constructor(){super({id:"editor.action.reindentselectedlines",label:c.localize(8,null),alias:"Reindent Selected Lines",precondition:w.EditorContextKeys.writable})}run(R,O){const x=R.get(v.ILanguageConfigurationService);let F=O.getModel();if(!F)return;let L=O.getSelections();if(L===null)return;let M=[];for(let N of L){let B=N.startLineNumber,P=N.endLineNumber;if(B!==P&&N.endColumn===1&&P--,B===1){if(B===P)continue}else B--;let V=s(F,x,B,P);M.push(...V)}M.length>0&&(O.pushUndoStop(),O.executeEdits(this.id,M),O.pushUndoStop())}}e.ReindentSelectedLinesAction=g;class d{constructor(R,O){this._initialSelection=O,this._edits=[],this._selectionId=null;for(let x of R)x.range&&typeof x.text=="string"&&this._edits.push(x)}getEditOperations(R,O){for(let F of this._edits)O.addEditOperation(D.Range.lift(F.range),F.text);let x=!1;Array.isArray(this._edits)&&this._edits.length===1&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(x=!0,this._selectionId=O.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(x=!0,this._selectionId=O.trackSelection(this._initialSelection,!1))),x||(this._selectionId=O.trackSelection(this._initialSelection))}computeCursorState(R,O){return O.getTrackedSelection(this._selectionId)}}e.AutoIndentOnPasteCommand=d;class m{constructor(R){this.callOnDispose=new t.DisposableStore,this.callOnModel=new t.DisposableStore,this.editor=R,this.callOnDispose.add(R.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(R.onDidChangeModel(()=>this.update())),this.callOnDispose.add(R.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),!(this.editor.getOption(9)<4||this.editor.getOption(48))&&(!this.editor.hasModel()||this.callOnModel.add(this.editor.onDidPaste(({range:R})=>{this.trigger(R)})))}trigger(R){let O=this.editor.getSelections();if(O===null||O.length>1)return;const x=this.editor.getModel();if(!x||!x.isCheapToTokenize(R.getStartPosition().lineNumber))return;const F=this.editor.getOption(9),{tabSize:L,indentSize:M,insertSpaces:N}=x.getOptions();let B=[],P={shiftIndent:H=>A.ShiftCommand.shiftIndent(H,H.length+1,L,M,N),unshiftIndent:H=>A.ShiftCommand.unshiftIndent(H,H.length+1,L,M,N)},V=R.startLineNumber;for(;V<=R.endLineNumber;){if(this.shouldIgnoreLine(x,V)){V++;continue}break}if(V>R.endLineNumber)return;let z=x.getLineContent(V);if(!/\S/.test(z.substring(0,R.startColumn-1))){const H=v.LanguageConfigurationRegistry.getGoodIndentForLine(F,x,x.getLanguageId(),V,P);if(H!==null){let K=f.getLeadingWhitespace(z),G=o.getSpaceCnt(H,L),q=o.getSpaceCnt(K,L);if(G!==q){let Z=o.generateIndent(G,L,N);B.push({range:new D.Range(V,1,V,K.length+1),text:Z}),z=Z+z.substr(K.length)}else{let Z=v.LanguageConfigurationRegistry.getIndentMetadata(x,V);if(Z===0||Z===8)return}}}const U=V;for(;V<R.endLineNumber;){if(!/\S/.test(x.getLineContent(V+1))){V++;continue}break}if(V!==R.endLineNumber){let H={getLineTokens:G=>x.getLineTokens(G),getLanguageId:()=>x.getLanguageId(),getLanguageIdAtPosition:(G,q)=>x.getLanguageIdAtPosition(G,q),getLineContent:G=>G===U?z:x.getLineContent(G)},K=v.LanguageConfigurationRegistry.getGoodIndentForLine(F,H,x.getLanguageId(),V+1,P);if(K!==null){let G=o.getSpaceCnt(K,L),q=o.getSpaceCnt(f.getLeadingWhitespace(x.getLineContent(V+1)),L);if(G!==q){let Z=G-q;for(let j=V+1;j<=R.endLineNumber;j++){let X=x.getLineContent(j),Y=f.getLeadingWhitespace(X),J=o.getSpaceCnt(Y,L)+Z,ee=o.generateIndent(J,L,N);ee!==Y&&B.push({range:new D.Range(j,1,j,Y.length+1),text:ee})}}}}if(B.length>0){this.editor.pushUndoStop();let H=new d(B,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",H),this.editor.pushUndoStop()}}shouldIgnoreLine(R,O){R.forceTokenization(O);let x=R.getLineFirstNonWhitespaceColumn(O);if(x===0)return!0;let F=R.getLineTokens(O);if(F.getCount()>0){let L=F.findTokenIndexAtOffset(x);if(L>=0&&F.getStandardTokenType(L)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}}e.AutoIndentOnPaste=m,m.ID="editor.contrib.autoIndentOnPaste";function b(T,R,O,x){if(T.getLineCount()===1&&T.getLineMaxColumn(1)===1)return;let F="";for(let M=0;M<O;M++)F+=" ";let L=new RegExp(F,"gi");for(let M=1,N=T.getLineCount();M<=N;M++){let B=T.getLineFirstNonWhitespaceColumn(M);if(B===0&&(B=T.getLineMaxColumn(M)),B===1)continue;const P=new D.Range(M,1,M,B),V=T.getValueInRange(P),z=x?V.replace(/\t/ig,F):V.replace(L," ");R.addEditOperation(P,z)}}class E{constructor(R,O){this.selection=R,this.tabSize=O,this.selectionId=null}getEditOperations(R,O){this.selectionId=O.trackSelection(this.selection),b(R,O,this.tabSize,!0)}computeCursorState(R,O){return O.getTrackedSelection(this.selectionId)}}e.IndentationToSpacesCommand=E;class y{constructor(R,O){this.selection=R,this.tabSize=O,this.selectionId=null}getEditOperations(R,O){this.selectionId=O.trackSelection(this.selection),b(R,O,this.tabSize,!1)}computeCursorState(R,O){return O.getTrackedSelection(this.selectionId)}}e.IndentationToTabsCommand=y,(0,_.registerEditorContribution)(m.ID,m),(0,_.registerEditorAction)(l),(0,_.registerEditorAction)(r),(0,_.registerEditorAction)(u),(0,_.registerEditorAction)(a),(0,_.registerEditorAction)(n),(0,_.registerEditorAction)(h),(0,_.registerEditorAction)(g)}),define(ne[2043],re([1,0,39,527,58,1289]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExpandLineSelectionAction=void 0;class k extends t.EditorAction{constructor(){super({id:"expandLineSelection",label:A.localize(0,null),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:_.EditorContextKeys.textInputFocus,primary:2048|42}})}run(I,w,v){if(v=v||{},!w.hasModel())return;const C=w._getViewModel();C.model.pushStackElement(),C.setCursorStates(v.source,3,f.CursorMoveCommands.expandLineSelection(C,C.getCursorStates())),C.revealPrimaryCursor(v.source,!0)}}e.ExpandLineSelectionAction=k,(0,t.registerEditorAction)(k)}),define(ne[755],re([1,0,97,312,39,341,685,547,136,49,20,84,58,1196,1940,1197,1290,16]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnakeCaseAction=e.TitleCaseAction=e.LowerCaseAction=e.UpperCaseAction=e.AbstractCaseAction=e.TransposeAction=e.JoinLinesAction=e.DeleteAllRightAction=e.DeleteAllLeftAction=e.AbstractDeleteAllToBoundaryAction=e.InsertLineAfterAction=e.InsertLineBeforeAction=e.IndentLinesAction=e.DeleteLinesAction=e.TrimTrailingWhitespaceAction=e.DeleteDuplicateLinesAction=e.SortLinesDescendingAction=e.SortLinesAscendingAction=e.AbstractSortLinesAction=e.DuplicateSelectionAction=void 0;class r extends _.EditorAction{constructor(Z,j){super(j);this.down=Z}run(Z,j){if(!j.hasModel())return;const X=j.getSelections().map((J,ee)=>({selection:J,index:ee,ignore:!1}));X.sort((J,ee)=>v.Range.compareRangesUsingStarts(J.selection,ee.selection));let Y=X[0];for(let J=1;J<X.length;J++){const ee=X[J];Y.selection.endLineNumber===ee.selection.startLineNumber&&(Y.index<ee.index?ee.ignore=!0:(Y.ignore=!0,Y=ee))}const $=[];for(const J of X)$.push(new c.CopyLinesCommand(J.selection,this.down,J.ignore));j.pushUndoStop(),j.executeCommands(this.id,$),j.pushUndoStop()}}class p extends r{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:s.localize(0,null),alias:"Copy Line Up",precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:512|1024|16,linux:{primary:2048|512|1024|16},weight:100},menuOpts:{menuId:l.MenuId.MenubarSelectionMenu,group:"2_line",title:s.localize(1,null),order:1}})}}class u extends r{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:s.localize(2,null),alias:"Copy Line Down",precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:512|1024|18,linux:{primary:2048|512|1024|18},weight:100},menuOpts:{menuId:l.MenuId.MenubarSelectionMenu,group:"2_line",title:s.localize(3,null),order:2}})}}class a extends _.EditorAction{constructor(){super({id:"editor.action.duplicateSelection",label:s.localize(4,null),alias:"Duplicate Selection",precondition:o.EditorContextKeys.writable,menuOpts:{menuId:l.MenuId.MenubarSelectionMenu,group:"2_line",title:s.localize(5,null),order:5}})}run(Z,j,X){if(!j.hasModel())return;const Y=[],$=j.getSelections(),J=j.getModel();for(const ee of $)if(ee.isEmpty())Y.push(new c.CopyLinesCommand(ee,!0));else{const te=new C.Selection(ee.endLineNumber,ee.endColumn,ee.endLineNumber,ee.endColumn);Y.push(new A.ReplaceCommandThatSelectsText(te,J.getValueInRange(ee)))}j.pushUndoStop(),j.executeCommands(this.id,Y),j.pushUndoStop()}}e.DuplicateSelectionAction=a;class n extends _.EditorAction{constructor(Z,j){super(j);this.down=Z}run(Z,j){let X=[],Y=j.getSelections()||[];const $=j.getOption(9);for(const J of Y)X.push(new i.MoveLinesCommand(J,this.down,$));j.pushUndoStop(),j.executeCommands(this.id,X),j.pushUndoStop()}}class h extends n{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:s.localize(6,null),alias:"Move Line Up",precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:512|16,linux:{primary:512|16},weight:100},menuOpts:{menuId:l.MenuId.MenubarSelectionMenu,group:"2_line",title:s.localize(7,null),order:3}})}}class g extends n{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:s.localize(8,null),alias:"Move Line Down",precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:512|18,linux:{primary:512|18},weight:100},menuOpts:{menuId:l.MenuId.MenubarSelectionMenu,group:"2_line",title:s.localize(9,null),order:4}})}}class d extends _.EditorAction{constructor(Z,j){super(j);this.descending=Z}run(Z,j){const X=j.getSelections()||[];for(const $ of X)if(!S.SortLinesCommand.canRun(j.getModel(),$,this.descending))return;let Y=[];for(let $=0,J=X.length;$<J;$++)Y[$]=new S.SortLinesCommand(X[$],this.descending);j.pushUndoStop(),j.executeCommands(this.id,Y),j.pushUndoStop()}}e.AbstractSortLinesAction=d;class m extends d{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:s.localize(10,null),alias:"Sort Lines Ascending",precondition:o.EditorContextKeys.writable})}}e.SortLinesAscendingAction=m;class b extends d{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:s.localize(11,null),alias:"Sort Lines Descending",precondition:o.EditorContextKeys.writable})}}e.SortLinesDescendingAction=b;class E extends _.EditorAction{constructor(){super({id:"editor.action.removeDuplicateLines",label:s.localize(12,null),alias:"Delete Duplicate Lines",precondition:o.EditorContextKeys.writable})}run(Z,j){if(!j.hasModel())return;let X=j.getModel();if(X.getLineCount()===1&&X.getLineMaxColumn(1)===1)return;let Y=[],$=[],J=0;for(let ee of j.getSelections()){let te=new Set,se=[];for(let ae=ee.startLineNumber;ae<=ee.endLineNumber;ae++){let ue=X.getLineContent(ae);te.has(ue)||(se.push(ue),te.add(ue))}let ie=new C.Selection(ee.startLineNumber,1,ee.endLineNumber,X.getLineMaxColumn(ee.endLineNumber)),ce=ee.startLineNumber-J,le=new C.Selection(ce,1,ce+se.length-1,se[se.length-1].length);Y.push(I.EditOperation.replace(ie,se.join(` `))),$.push(le),J+=ee.endLineNumber-ee.startLineNumber+1-se.length}j.pushUndoStop(),j.executeEdits(this.id,Y,$),j.pushUndoStop()}}e.DeleteDuplicateLinesAction=E;class y extends _.EditorAction{constructor(){super({id:y.ID,label:s.localize(13,null),alias:"Trim Trailing Whitespace",precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:(0,t.KeyChord)(2048|41,2048|54),weight:100}})}run(Z,j,X){let Y=[];X.reason==="auto-save"&&(Y=(j.getSelections()||[]).map(ee=>new w.Position(ee.positionLineNumber,ee.positionColumn)));let $=j.getSelection();if($===null)return;let J=new k.TrimTrailingWhitespaceCommand($,Y);j.pushUndoStop(),j.executeCommands(this.id,[J]),j.pushUndoStop()}}e.TrimTrailingWhitespaceAction=y,y.ID="editor.action.trimTrailingWhitespace";class T extends _.EditorAction{constructor(){super({id:"editor.action.deleteLines",label:s.localize(14,null),alias:"Delete Line",precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.textInputFocus,primary:2048|1024|41,weight:100}})}run(Z,j){if(!j.hasModel())return;let X=this._getLinesToRemove(j),Y=j.getModel();if(Y.getLineCount()===1&&Y.getLineMaxColumn(1)===1)return;let $=0,J=[],ee=[];for(let te=0,se=X.length;te<se;te++){const ie=X[te];let ce=ie.startLineNumber,le=ie.endLineNumber,ae=1,ue=Y.getLineMaxColumn(le);le<Y.getLineCount()?(le+=1,ue=1):ce>1&&(ce-=1,ae=Y.getLineMaxColumn(ce)),J.push(I.EditOperation.replace(new C.Selection(ce,ae,le,ue),"")),ee.push(new C.Selection(ce-$,ie.positionColumn,ce-$,ie.positionColumn)),$+=ie.endLineNumber-ie.startLineNumber+1}j.pushUndoStop(),j.executeEdits(this.id,J,ee),j.pushUndoStop()}_getLinesToRemove(Z){let j=Z.getSelections().map($=>{let J=$.endLineNumber;return $.startLineNumber<$.endLineNumber&&$.endColumn===1&&(J-=1),{startLineNumber:$.startLineNumber,selectionStartColumn:$.selectionStartColumn,endLineNumber:J,positionColumn:$.positionColumn}});j.sort(($,J)=>$.startLineNumber===J.startLineNumber?$.endLineNumber-J.endLineNumber:$.startLineNumber-J.startLineNumber);let X=[],Y=j[0];for(let $=1;$<j.length;$++)Y.endLineNumber+1>=j[$].startLineNumber?Y.endLineNumber=j[$].endLineNumber:(X.push(Y),Y=j[$]);return X.push(Y),X}}e.DeleteLinesAction=T;class R extends _.EditorAction{constructor(){super({id:"editor.action.indentLines",label:s.localize(15,null),alias:"Indent Line",precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:2048|89,weight:100}})}run(Z,j){const X=j._getViewModel();!X||(j.pushUndoStop(),j.executeCommands(this.id,D.TypeOperations.indent(X.cursorConfig,j.getModel(),j.getSelections())),j.pushUndoStop())}}e.IndentLinesAction=R;class O extends _.EditorAction{constructor(){super({id:"editor.action.outdentLines",label:s.localize(16,null),alias:"Outdent Line",precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:2048|87,weight:100}})}run(Z,j){f.CoreEditingCommands.Outdent.runEditorCommand(Z,j,null)}}class x extends _.EditorAction{constructor(){super({id:"editor.action.insertLineBefore",label:s.localize(17,null),alias:"Insert Line Above",precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:2048|1024|3,weight:100}})}run(Z,j){const X=j._getViewModel();!X||(j.pushUndoStop(),j.executeCommands(this.id,D.TypeOperations.lineInsertBefore(X.cursorConfig,j.getModel(),j.getSelections())))}}e.InsertLineBeforeAction=x;class F extends _.EditorAction{constructor(){super({id:"editor.action.insertLineAfter",label:s.localize(18,null),alias:"Insert Line Below",precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:2048|3,weight:100}})}run(Z,j){const X=j._getViewModel();!X||(j.pushUndoStop(),j.executeCommands(this.id,D.TypeOperations.lineInsertAfter(X.cursorConfig,j.getModel(),j.getSelections())))}}e.InsertLineAfterAction=F;class L extends _.EditorAction{run(Z,j){if(!j.hasModel())return;const X=j.getSelection();let Y=this._getRangesToDelete(j),$=[];for(let te=0,se=Y.length-1;te<se;te++){let ie=Y[te],ce=Y[te+1];v.Range.intersectRanges(ie,ce)===null?$.push(ie):Y[te+1]=v.Range.plusRange(ie,ce)}$.push(Y[Y.length-1]);let J=this._getEndCursorState(X,$),ee=$.map(te=>I.EditOperation.replace(te,""));j.pushUndoStop(),j.executeEdits(this.id,ee,J),j.pushUndoStop()}}e.AbstractDeleteAllToBoundaryAction=L;class M extends L{constructor(){super({id:"deleteAllLeft",label:s.localize(19,null),alias:"Delete All Left",precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.textInputFocus,primary:0,mac:{primary:2048|1},weight:100}})}_getEndCursorState(Z,j){let X=null,Y=[],$=0;return j.forEach(J=>{let ee;if(J.endColumn===1&&$>0){let te=J.startLineNumber-$;ee=new C.Selection(te,J.startColumn,te,J.startColumn)}else ee=new C.Selection(J.startLineNumber,J.startColumn,J.startLineNumber,J.startColumn);$+=J.endLineNumber-J.startLineNumber,J.intersectRanges(Z)?X=ee:Y.push(ee)}),X&&Y.unshift(X),Y}_getRangesToDelete(Z){let j=Z.getSelections();if(j===null)return[];let X=j,Y=Z.getModel();return Y===null?[]:(X.sort(v.Range.compareRangesUsingStarts),X=X.map($=>{if($.isEmpty())if($.startColumn===1){let J=Math.max(1,$.startLineNumber-1),ee=$.startLineNumber===1?1:Y.getLineContent(J).length+1;return new v.Range(J,ee,$.startLineNumber,1)}else return new v.Range($.startLineNumber,1,$.startLineNumber,$.startColumn);else return new v.Range($.startLineNumber,1,$.endLineNumber,$.endColumn)}),X)}}e.DeleteAllLeftAction=M;class N extends L{constructor(){super({id:"deleteAllRight",label:s.localize(20,null),alias:"Delete All Right",precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|41,secondary:[2048|20]},weight:100}})}_getEndCursorState(Z,j){let X=null,Y=[];for(let $=0,J=j.length,ee=0;$<J;$++){let te=j[$],se=new C.Selection(te.startLineNumber-ee,te.startColumn,te.startLineNumber-ee,te.startColumn);te.intersectRanges(Z)?X=se:Y.push(se)}return X&&Y.unshift(X),Y}_getRangesToDelete(Z){let j=Z.getModel();if(j===null)return[];let X=Z.getSelections();if(X===null)return[];let Y=X.map($=>{if($.isEmpty()){const J=j.getLineMaxColumn($.startLineNumber);return $.startColumn===J?new v.Range($.startLineNumber,$.startColumn,$.startLineNumber+1,1):new v.Range($.startLineNumber,$.startColumn,$.startLineNumber,J)}return $});return Y.sort(v.Range.compareRangesUsingStarts),Y}}e.DeleteAllRightAction=N;class B extends _.EditorAction{constructor(){super({id:"editor.action.joinLines",label:s.localize(21,null),alias:"Join Lines",precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:0,mac:{primary:256|40},weight:100}})}run(Z,j){let X=j.getSelections();if(X===null)return;let Y=j.getSelection();if(Y===null)return;X.sort(v.Range.compareRangesUsingStarts);let $=[],J=X.reduce((le,ae)=>le.isEmpty()?le.endLineNumber===ae.startLineNumber?(Y.equalsSelection(le)&&(Y=ae),ae):ae.startLineNumber>le.endLineNumber+1?($.push(le),ae):new C.Selection(le.startLineNumber,le.startColumn,ae.endLineNumber,ae.endColumn):ae.startLineNumber>le.endLineNumber?($.push(le),ae):new C.Selection(le.startLineNumber,le.startColumn,ae.endLineNumber,ae.endColumn));$.push(J);let ee=j.getModel();if(ee===null)return;let te=[],se=[],ie=Y,ce=0;for(let le=0,ae=$.length;le<ae;le++){let ue=$[le],oe=ue.startLineNumber,fe=1,pe=0,me,be,Ce=ee.getLineContent(ue.endLineNumber).length-ue.endColumn;if(ue.isEmpty()||ue.startLineNumber===ue.endLineNumber){let ge=ue.getStartPosition();ge.lineNumber<ee.getLineCount()?(me=oe+1,be=ee.getLineMaxColumn(me)):(me=ge.lineNumber,be=ee.getLineMaxColumn(ge.lineNumber))}else me=ue.endLineNumber,be=ee.getLineMaxColumn(me);let ve=ee.getLineContent(oe);for(let ge=oe+1;ge<=me;ge++){let de=ee.getLineContent(ge),Se=ee.getLineFirstNonWhitespaceColumn(ge);if(Se>=1){let we=!0;ve===""&&(we=!1),we&&(ve.charAt(ve.length-1)===" "||ve.charAt(ve.length-1)===" ")&&(we=!1,ve=ve.replace(/[\s\uFEFF\xA0]+$/g," "));let ye=de.substr(Se-1);ve+=(we?" ":"")+ye,we?pe=ye.length+1:pe=ye.length}else pe=0}let he=new v.Range(oe,fe,me,be);if(!he.isEmpty()){let ge;ue.isEmpty()?(te.push(I.EditOperation.replace(he,ve)),ge=new C.Selection(he.startLineNumber-ce,ve.length-pe+1,oe-ce,ve.length-pe+1)):ue.startLineNumber===ue.endLineNumber?(te.push(I.EditOperation.replace(he,ve)),ge=new C.Selection(ue.startLineNumber-ce,ue.startColumn,ue.endLineNumber-ce,ue.endColumn)):(te.push(I.EditOperation.replace(he,ve)),ge=new C.Selection(ue.startLineNumber-ce,ue.startColumn,ue.startLineNumber-ce,ve.length-Ce)),v.Range.intersectRanges(he,Y)!==null?ie=ge:se.push(ge)}ce+=he.endLineNumber-he.startLineNumber}se.unshift(ie),j.pushUndoStop(),j.executeEdits(this.id,te,se),j.pushUndoStop()}}e.JoinLinesAction=B;class P extends _.EditorAction{constructor(){super({id:"editor.action.transpose",label:s.localize(22,null),alias:"Transpose characters around the cursor",precondition:o.EditorContextKeys.writable})}run(Z,j){let X=j.getSelections();if(X===null)return;let Y=j.getModel();if(Y===null)return;let $=[];for(let J=0,ee=X.length;J<ee;J++){let te=X[J];if(!te.isEmpty())continue;let se=te.getStartPosition(),ie=Y.getLineMaxColumn(se.lineNumber);if(se.column>=ie){if(se.lineNumber===Y.getLineCount())continue;let ce=new v.Range(se.lineNumber,Math.max(1,se.column-1),se.lineNumber+1,1),le=Y.getValueInRange(ce).split("").reverse().join("");$.push(new A.ReplaceCommand(new C.Selection(se.lineNumber,Math.max(1,se.column-1),se.lineNumber+1,1),le))}else{let ce=new v.Range(se.lineNumber,Math.max(1,se.column-1),se.lineNumber,se.column+1),le=Y.getValueInRange(ce).split("").reverse().join("");$.push(new A.ReplaceCommandThatPreservesSelection(ce,le,new C.Selection(se.lineNumber,se.column+1,se.lineNumber,se.column+1)))}}j.pushUndoStop(),j.executeCommands(this.id,$),j.pushUndoStop()}}e.TransposeAction=P;class V extends _.EditorAction{run(Z,j){const X=j.getSelections();if(X===null)return;const Y=j.getModel();if(Y===null)return;const $=j.getOption(117),J=[];for(const ee of X)if(ee.isEmpty()){const te=ee.getStartPosition(),se=j.getConfiguredWordAtPosition(te);if(!se)continue;const ie=new v.Range(te.lineNumber,se.startColumn,te.lineNumber,se.endColumn),ce=Y.getValueInRange(ie);J.push(I.EditOperation.replace(ie,this._modifyText(ce,$)))}else{const te=Y.getValueInRange(ee);J.push(I.EditOperation.replace(ee,this._modifyText(te,$)))}j.pushUndoStop(),j.executeEdits(this.id,J),j.pushUndoStop()}}e.AbstractCaseAction=V;class z extends V{constructor(){super({id:"editor.action.transformToUppercase",label:s.localize(23,null),alias:"Transform to Uppercase",precondition:o.EditorContextKeys.writable})}_modifyText(Z,j){return Z.toLocaleUpperCase()}}e.UpperCaseAction=z;class U extends V{constructor(){super({id:"editor.action.transformToLowercase",label:s.localize(24,null),alias:"Transform to Lowercase",precondition:o.EditorContextKeys.writable})}_modifyText(Z,j){return Z.toLocaleLowerCase()}}e.LowerCaseAction=U;class H{constructor(Z,j){this._pattern=Z,this._flags=j,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch{}}return this._actual}isSupported(){return this.get()!==null}}class K extends V{constructor(){super({id:"editor.action.transformToTitlecase",label:s.localize(25,null),alias:"Transform to Title Case",precondition:o.EditorContextKeys.writable})}_modifyText(Z,j){const X=K.titleBoundary.get();return X?Z.toLocaleLowerCase().replace(X,Y=>Y.toLocaleUpperCase()):Z}}e.TitleCaseAction=K,K.titleBoundary=new H("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");class G extends V{constructor(){super({id:"editor.action.transformToSnakecase",label:s.localize(26,null),alias:"Transform to Snake Case",precondition:o.EditorContextKeys.writable})}_modifyText(Z,j){const X=G.caseBoundary.get(),Y=G.singleLetters.get();return!X||!Y?Z:Z.replace(X,"$1_$2").replace(Y,"$1_$2$3").toLocaleLowerCase()}}e.SnakeCaseAction=G,G.caseBoundary=new H("(\\p{Ll})(\\p{Lu})","gmu"),G.singleLetters=new H("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu"),(0,_.registerEditorAction)(p),(0,_.registerEditorAction)(u),(0,_.registerEditorAction)(a),(0,_.registerEditorAction)(h),(0,_.registerEditorAction)(g),(0,_.registerEditorAction)(m),(0,_.registerEditorAction)(b),(0,_.registerEditorAction)(E),(0,_.registerEditorAction)(y),(0,_.registerEditorAction)(T),(0,_.registerEditorAction)(R),(0,_.registerEditorAction)(O),(0,_.registerEditorAction)(x),(0,_.registerEditorAction)(F),(0,_.registerEditorAction)(M),(0,_.registerEditorAction)(N),(0,_.registerEditorAction)(B),(0,_.registerEditorAction)(P),(0,_.registerEditorAction)(z),(0,_.registerEditorAction)(U),G.caseBoundary.isSupported()&&G.singleLetters.isSupported()&&(0,_.registerEditorAction)(G),K.titleBoundary.isSupported()&&(0,_.registerEditorAction)(K)}),define(ne[471],re([1,0,112,11,2,39,20,1293,7,1035]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MessageController=void 0;let w=class pr{constructor(c,i){this._messageWidget=new _.MutableDisposable,this._messageListeners=new _.DisposableStore,this._editor=c,this._visible=pr.MESSAGE_VISIBLE.bindTo(i),this._editorListener=this._editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit())}static get(c){return c.getContribution(pr.ID)}dispose(){this._editorListener.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}isVisible(){return this._visible.get()}showMessage(c,i){(0,t.alert)(c),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new C(this._editor,i,c),this._messageListeners.add(this._editor.onDidBlurEditorText(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(new f.TimeoutTimer(()=>this.closeMessage(),3e3));let S;this._messageListeners.add(this._editor.onMouseMove(s=>{!s.target.position||(S?S.containsPosition(s.target.position)||this.closeMessage():S=new k.Range(i.lineNumber-3,1,s.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(C.fadeOut(this._messageWidget.value))}_onDidAttemptReadOnlyEdit(){this._editor.hasModel()&&this.showMessage(D.localize(1,null),this._editor.getPosition())}};w.ID="editor.contrib.messageController",w.MESSAGE_VISIBLE=new I.RawContextKey("messageVisible",!1,D.localize(0,null)),w=Ee([W(1,I.IContextKeyService)],w),e.MessageController=w;const v=A.EditorCommand.bindToContribution(w.get);(0,A.registerEditorCommand)(new v({id:"leaveEditorMessage",precondition:w.MESSAGE_VISIBLE,handler:o=>o.closeMessage(),kbOpts:{weight:100+30,primary:9}}));class C{constructor(c,{lineNumber:i,column:S},s){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=c,this._editor.revealLinesInCenterIfOutsideViewport(i,i,0),this._position={lineNumber:i,column:S},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const l=document.createElement("div");l.classList.add("anchor","top"),this._domNode.appendChild(l);const r=document.createElement("div");r.classList.add("message"),r.textContent=s,this._domNode.appendChild(r);const p=document.createElement("div");p.classList.add("anchor","below"),this._domNode.appendChild(p),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}static fadeOut(c){let i;const S=()=>{c.dispose(),clearTimeout(i),c.getDomNode().removeEventListener("animationend",S)};return i=setTimeout(S,110),c.getDomNode().addEventListener("animationend",S),c.getDomNode().classList.add("fadeOut"),{dispose:S}}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(c){this._domNode.classList.toggle("below",c===2)}}(0,A.registerEditorContribution)(w.ID,w)});var Ot=this&&this.__classPrivateFieldSet||function(Q,e,t,f,_){if(f==="m")throw new TypeError("Private method is not writable");if(f==="a"&&!_)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?Q!==e||!_:!e.has(Q))throw new TypeError("Cannot write private member to an object whose class did not declare it");return f==="a"?_.call(Q,t):_?_.value=t:e.set(Q,t),t},dt=this&&this.__classPrivateFieldGet||function(Q,e,t,f){if(t==="a"&&!f)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?Q!==e||!f:!e.has(Q))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?f:t==="a"?f.call(Q):f?f.value:e.get(Q)};define(ne[2044],re([1,0,22,278,2,471,5,2038,2023]),function(Q,e,t,f,_,A,k,D,I){"use strict";var w;Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionUi=void 0;let v=class extends _.Disposable{constructor(o,c,i,S,s){super();this._editor=o,this.delegate=S,this._activeCodeActions=this._register(new _.MutableDisposable),w.set(this,!1),this._codeActionWidget=new f.Lazy(()=>this._register(s.createInstance(D.CodeActionMenu,this._editor,{onSelectCodeAction:async l=>{this.delegate.applyCodeAction(l,!0)}}))),this._lightBulbWidget=new f.Lazy(()=>{const l=this._register(s.createInstance(I.LightBulbWidget,this._editor,c,i));return this._register(l.onClick(r=>this.showCodeActionList(r.trigger,r.actions,r,{includeDisabledActions:!1}))),l})}dispose(){Ot(this,w,!0,"f"),super.dispose()}async update(o){if(o.type!==1){this._lightBulbWidget.rawValue?.hide();return}let c;try{c=await o.actions}catch(i){(0,t.onUnexpectedError)(i);return}if(!dt(this,w,"f"))if(this._lightBulbWidget.getValue().update(c,o.trigger,o.position),o.trigger.type===1){if(o.trigger.filter?.include){const S=this.tryGetValidActionToApply(o.trigger,c);if(S){try{this._lightBulbWidget.getValue().hide(),await this.delegate.applyCodeAction(S,!1)}finally{c.dispose()}return}if(o.trigger.context){const s=this.getInvalidActionThatWouldHaveBeenApplied(o.trigger,c);if(s&&s.action.disabled){A.MessageController.get(this._editor)?.showMessage(s.action.disabled,o.trigger.context.position),c.dispose();return}}}const i=!!o.trigger.filter?.include;if(o.trigger.context&&(!c.allActions.length||!i&&!c.validActions.length)){A.MessageController.get(this._editor)?.showMessage(o.trigger.context.notAvailableMessage,o.trigger.context.position),this._activeCodeActions.value=c,c.dispose();return}this._activeCodeActions.value=c,this._codeActionWidget.getValue().show(o.trigger,c,o.position,{includeDisabledActions:i})}else this._codeActionWidget.getValue().isVisible?c.dispose():this._activeCodeActions.value=c}getInvalidActionThatWouldHaveBeenApplied(o,c){if(!!c.allActions.length&&(o.autoApply==="first"&&c.validActions.length===0||o.autoApply==="ifSingle"&&c.allActions.length===1))return c.allActions.find(({action:i})=>i.disabled)}tryGetValidActionToApply(o,c){if(!!c.validActions.length&&(o.autoApply==="first"&&c.validActions.length>0||o.autoApply==="ifSingle"&&c.validActions.length===1))return c.validActions[0]}async showCodeActionList(o,c,i,S){this._codeActionWidget.getValue().show(o,c,i,S)}};w=new WeakMap,v=Ee([W(4,k.IInstantiationService)],v),e.CodeActionUi=v}),define(ne[472],re([1,0,30,278,2,29,39,140,58,62,314,2044,471,1257,28,7,5,125,26,67,27,2039,260]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoFixAction=e.FixAllAction=e.OrganizeImportsAction=e.SourceAction=e.RefactorAction=e.CodeActionCommand=e.QuickFixAction=e.applyCodeAction=e.QuickFixController=void 0;function h(M){return S.ContextKeyExpr.regex(a.SUPPORTED_CODE_ACTIONS.keys()[0],new RegExp("(\\s|^)"+(0,A.escapeRegExpCharacters)(M.value)+"\\b"))}const g={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:c.localize(0,null)},apply:{type:"string",description:c.localize(1,null),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[c.localize(2,null),c.localize(3,null),c.localize(4,null)]},preferred:{type:"boolean",default:!1,description:c.localize(5,null)}}};let d=class js extends _.Disposable{constructor(N,B,P,V,z,U){super();this._instantiationService=z,this._editor=N,this._model=this._register(new a.CodeActionModel(this._editor,U.codeActionProvider,B,P,V)),this._register(this._model.onDidChangeState(H=>this.update(H))),this._ui=new f.Lazy(()=>this._register(new C.CodeActionUi(N,y.Id,L.Id,{applyCodeAction:async(H,K)=>{try{await this._applyCodeAction(H)}finally{K&&this._trigger({type:2,filter:{}})}}},this._instantiationService)))}static get(N){return N.getContribution(js.ID)}update(N){this._ui.getValue().update(N)}showCodeActions(N,B,P){return this._ui.getValue().showCodeActionList(N,B,P,{includeDisabledActions:!1})}manualTriggerAtCurrentPosition(N,B,P){if(!this._editor.hasModel())return;o.MessageController.get(this._editor)?.closeMessage();const V=this._editor.getPosition();this._trigger({type:1,filter:B,autoApply:P,context:{notAvailableMessage:N,position:V}})}_trigger(N){return this._model.trigger(N)}_applyCodeAction(N){return this._instantiationService.invokeFunction(m,N,this._editor)}};d.ID="editor.contrib.quickFixController",d=Ee([W(1,l.IMarkerService),W(2,S.IContextKeyService),W(3,p.IEditorProgressService),W(4,s.IInstantiationService),W(5,w.ILanguageFeaturesService)],d),e.QuickFixController=d;async function m(M,N,B){const P=M.get(D.IBulkEditService),V=M.get(i.ICommandService),z=M.get(u.ITelemetryService),U=M.get(r.INotificationService);if(z.publicLog2("codeAction.applyCodeAction",{codeActionTitle:N.action.title,codeActionKind:N.action.kind,codeActionIsPreferred:!!N.action.isPreferred}),await N.resolve(t.CancellationToken.None),N.action.edit&&await P.apply(D.ResourceEdit.convert(N.action.edit),{editor:B,label:N.action.title,code:"undoredo.codeAction"}),N.action.command)try{await V.executeCommand(N.action.command.id,...N.action.command.arguments||[])}catch(H){const K=b(H);U.error(typeof K=="string"?K:c.localize(6,null))}}e.applyCodeAction=m;function b(M){return typeof M=="string"?M:M instanceof Error&&typeof M.message=="string"?M.message:void 0}function E(M,N,B,P){if(M.hasModel()){const V=d.get(M);V&&V.manualTriggerAtCurrentPosition(N,B,P)}}class y extends k.EditorAction{constructor(){super({id:y.Id,label:c.localize(7,null),alias:"Quick Fix...",precondition:S.ContextKeyExpr.and(I.EditorContextKeys.writable,I.EditorContextKeys.hasCodeActionsProvider),kbOpts:{kbExpr:I.EditorContextKeys.editorTextFocus,primary:2048|84,weight:100}})}run(N,B){return E(B,c.localize(8,null),void 0,void 0)}}e.QuickFixAction=y,y.Id="editor.action.quickFix";class T extends k.EditorCommand{constructor(){super({id:v.codeActionCommandId,precondition:S.ContextKeyExpr.and(I.EditorContextKeys.writable,I.EditorContextKeys.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:g}]}})}runEditorCommand(N,B,P){const V=n.CodeActionCommandArgs.fromUser(P,{kind:n.CodeActionKind.Empty,apply:"ifSingle"});return E(B,typeof P?.kind=="string"?V.preferred?c.localize(9,null,P.kind):c.localize(10,null,P.kind):V.preferred?c.localize(11,null):c.localize(12,null),{include:V.kind,includeSourceActions:!0,onlyIncludePreferredActions:V.preferred},V.apply)}}e.CodeActionCommand=T;class R extends k.EditorAction{constructor(){super({id:v.refactorCommandId,label:c.localize(13,null),alias:"Refactor...",precondition:S.ContextKeyExpr.and(I.EditorContextKeys.writable,I.EditorContextKeys.hasCodeActionsProvider),kbOpts:{kbExpr:I.EditorContextKeys.editorTextFocus,primary:2048|1024|48,mac:{primary:256|1024|48},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:S.ContextKeyExpr.and(I.EditorContextKeys.writable,h(n.CodeActionKind.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:g}]}})}run(N,B,P){const V=n.CodeActionCommandArgs.fromUser(P,{kind:n.CodeActionKind.Refactor,apply:"never"});return E(B,typeof P?.kind=="string"?V.preferred?c.localize(14,null,P.kind):c.localize(15,null,P.kind):V.preferred?c.localize(16,null):c.localize(17,null),{include:n.CodeActionKind.Refactor.contains(V.kind)?V.kind:n.CodeActionKind.None,onlyIncludePreferredActions:V.preferred},V.apply)}}e.RefactorAction=R;class O extends k.EditorAction{constructor(){super({id:v.sourceActionCommandId,label:c.localize(18,null),alias:"Source Action...",precondition:S.ContextKeyExpr.and(I.EditorContextKeys.writable,I.EditorContextKeys.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:S.ContextKeyExpr.and(I.EditorContextKeys.writable,h(n.CodeActionKind.Source))},description:{description:"Source Action...",args:[{name:"args",schema:g}]}})}run(N,B,P){const V=n.CodeActionCommandArgs.fromUser(P,{kind:n.CodeActionKind.Source,apply:"never"});return E(B,typeof P?.kind=="string"?V.preferred?c.localize(19,null,P.kind):c.localize(20,null,P.kind):V.preferred?c.localize(21,null):c.localize(22,null),{include:n.CodeActionKind.Source.contains(V.kind)?V.kind:n.CodeActionKind.None,includeSourceActions:!0,onlyIncludePreferredActions:V.preferred},V.apply)}}e.SourceAction=O;class x extends k.EditorAction{constructor(){super({id:v.organizeImportsCommandId,label:c.localize(23,null),alias:"Organize Imports",precondition:S.ContextKeyExpr.and(I.EditorContextKeys.writable,h(n.CodeActionKind.SourceOrganizeImports)),kbOpts:{kbExpr:I.EditorContextKeys.editorTextFocus,primary:1024|512|45,weight:100}})}run(N,B){return E(B,c.localize(24,null),{include:n.CodeActionKind.SourceOrganizeImports,includeSourceActions:!0},"ifSingle")}}e.OrganizeImportsAction=x;class F extends k.EditorAction{constructor(){super({id:v.fixAllCommandId,label:c.localize(25,null),alias:"Fix All",precondition:S.ContextKeyExpr.and(I.EditorContextKeys.writable,h(n.CodeActionKind.SourceFixAll))})}run(N,B){return E(B,c.localize(26,null),{include:n.CodeActionKind.SourceFixAll,includeSourceActions:!0},"ifSingle")}}e.FixAllAction=F;class L extends k.EditorAction{constructor(){super({id:L.Id,label:c.localize(27,null),alias:"Auto Fix...",precondition:S.ContextKeyExpr.and(I.EditorContextKeys.writable,h(n.CodeActionKind.QuickFix)),kbOpts:{kbExpr:I.EditorContextKeys.editorTextFocus,primary:512|1024|84,mac:{primary:2048|512|84},weight:100}})}run(N,B){return E(B,c.localize(28,null),{include:n.CodeActionKind.QuickFix,onlyIncludePreferredActions:!0},"ifSingle")}}e.AutoFixAction=L,L.Id="editor.action.autoFix"}),define(ne[2045],re([1,0,39,472]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerEditorContribution)(f.QuickFixController.ID,f.QuickFixController),(0,t.registerEditorAction)(f.QuickFixAction),(0,t.registerEditorAction)(f.RefactorAction),(0,t.registerEditorAction)(f.SourceAction),(0,t.registerEditorAction)(f.OrganizeImportsAction),(0,t.registerEditorAction)(f.AutoFixAction),(0,t.registerEditorAction)(f.FixAllAction),(0,t.registerEditorCommand)(new f.CodeActionCommand)}),define(ne[2046],re([1,0,112,11,30,22,2,13,9,287,39,140,72,49,20,58,113,471,1300,57,7,5,31,26,67,17,2028,62]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RenameAction=e.rename=void 0;class E{constructor(F,L,M){this.model=F,this.position=L,this._providerRenameIdx=0,this._providers=M.ordered(F)}hasProvider(){return this._providers.length>0}async resolveRenameLocation(F){const L=[];for(this._providerRenameIdx=0;this._providerRenameIdx<this._providers.length;this._providerRenameIdx++){const N=this._providers[this._providerRenameIdx];if(!N.resolveRenameLocation)break;let B=await N.resolveRenameLocation(this.model,this.position,F);if(!!B){if(B.rejectReason){L.push(B.rejectReason);continue}return B}}const M=this.model.getWordAtPosition(this.position);return M?{range:new i.Range(this.position.lineNumber,M.startColumn,this.position.lineNumber,M.endColumn),text:M.word,rejectReason:L.length>0?L.join(` `):void 0}:{range:i.Range.fromPositions(this.position),text:"",rejectReason:L.length>0?L.join(` `):void 0}}async provideRenameEdits(F,L){return this._provideRenameEdits(F,this._providerRenameIdx,[],L)}async _provideRenameEdits(F,L,M,N){const B=this._providers[L];if(!B)return{edits:[],rejectReason:M.join(` `)};const P=await B.provideRenameEdits(this.model,this.position,F,N);if(P){if(P.rejectReason)return this._provideRenameEdits(F,L+1,M.concat(P.rejectReason),N)}else return this._provideRenameEdits(F,L+1,M.concat(r.localize(0,null)),N);return P}}async function y(x,F,L,M){const N=new E(F,L,x),B=await N.resolveRenameLocation(_.CancellationToken.None);return B?.rejectReason?{edits:[],rejectReason:B.rejectReason}:N.provideRenameEdits(M,_.CancellationToken.None)}e.rename=y;let T=class Ys{constructor(F,L,M,N,B,P,V,z){this.editor=F,this._instaService=L,this._notificationService=M,this._bulkEditService=N,this._progressService=B,this._logService=P,this._configService=V,this._languageFeaturesService=z,this._dispoableStore=new k.DisposableStore,this._cts=new _.CancellationTokenSource,this._renameInputField=this._dispoableStore.add(new f.IdleValue(()=>this._dispoableStore.add(this._instaService.createInstance(m.RenameInputField,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))))}static get(F){return F.getContribution(Ys.ID)}dispose(){this._dispoableStore.dispose(),this._cts.dispose(!0)}async run(){if(this._cts.dispose(!0),!this.editor.hasModel())return;const F=this.editor.getPosition(),L=new E(this.editor.getModel(),F,this._languageFeaturesService.renameProvider);if(!L.hasProvider())return;this._cts=new w.EditorStateCancellationTokenSource(this.editor,4|1);let M;try{const H=L.resolveRenameLocation(this._cts.token);this._progressService.showWhile(H,250),M=await H}catch(H){l.MessageController.get(this.editor)?.showMessage(H||r.localize(1,null),F);return}if(!M)return;if(M.rejectReason){l.MessageController.get(this.editor)?.showMessage(M.rejectReason,F);return}if(this._cts.token.isCancellationRequested)return;this._cts.dispose(),this._cts=new w.EditorStateCancellationTokenSource(this.editor,4|1,M.range);let N=this.editor.getSelection(),B=0,P=M.text.length;!i.Range.isEmpty(N)&&!i.Range.spansMultipleLines(N)&&i.Range.containsRange(M.range,N)&&(B=Math.max(0,N.startColumn-M.range.startColumn),P=Math.min(M.range.endColumn,N.endColumn)-M.range.startColumn);const V=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),z=await this._renameInputField.value.getInput(M.range,M.text,B,P,V,this._cts.token);if(typeof z=="boolean"){z&&this.editor.focus();return}this.editor.focus();const U=(0,f.raceCancellation)(L.provideRenameEdits(z.newName,this._cts.token),this._cts.token).then(async H=>{if(!(!H||!this.editor.hasModel())){if(H.rejectReason){this._notificationService.info(H.rejectReason);return}this.editor.setSelection(i.Range.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(C.ResourceEdit.convert(H),{editor:this.editor,showPreview:z.wantsPreview,label:r.localize(2,null,M?.text),code:"undoredo.rename",quotableLabel:r.localize(3,null,M?.text)}).then(K=>{K.ariaSummary&&(0,t.alert)(r.localize(4,null,M.text,z.newName,K.ariaSummary))}).catch(K=>{this._notificationService.error(r.localize(5,null)),this._logService.error(K)})}},H=>{this._notificationService.error(r.localize(6,null)),this._logService.error(H)});return this._progressService.showWhile(U,250),U}acceptRenameInput(F){this._renameInputField.value.acceptInput(F)}cancelRenameInput(){this._renameInputField.value.cancelInput(!0)}};T.ID="editor.contrib.renameController",T=Ee([W(1,a.IInstantiationService),W(2,h.INotificationService),W(3,C.IBulkEditService),W(4,g.IEditorProgressService),W(5,n.ILogService),W(6,s.ITextResourceConfigurationService),W(7,b.ILanguageFeaturesService)],T);class R extends v.EditorAction{constructor(){super({id:"editor.action.rename",label:r.localize(7,null),alias:"Rename Symbol",precondition:u.ContextKeyExpr.and(S.EditorContextKeys.writable,S.EditorContextKeys.hasRenameProvider),kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(F,L){const M=F.get(o.ICodeEditorService),[N,B]=Array.isArray(L)&&L||[void 0,void 0];return I.URI.isUri(N)&&c.Position.isIPosition(B)?M.openCodeEditor({resource:N},M.getActiveCodeEditor()).then(P=>{!P||(P.setPosition(B),P.invokeWithinContext(V=>(this.reportTelemetry(V,P),this.run(V,P))))},A.onUnexpectedError):super.runCommand(F,L)}run(F,L){const M=T.get(L);return M?M.run():Promise.resolve()}}e.RenameAction=R,(0,v.registerEditorContribution)(T.ID,T),(0,v.registerEditorAction)(R);const O=v.EditorCommand.bindToContribution(T.get);(0,v.registerEditorCommand)(new O({id:"acceptRenameInput",precondition:m.CONTEXT_RENAME_INPUT_VISIBLE,handler:x=>x.acceptRenameInput(!1),kbOpts:{weight:100+99,kbExpr:S.EditorContextKeys.focus,primary:3}})),(0,v.registerEditorCommand)(new O({id:"acceptRenameInputWithPreview",precondition:u.ContextKeyExpr.and(m.CONTEXT_RENAME_INPUT_VISIBLE,u.ContextKeyExpr.has("config.editor.rename.enablePreview")),handler:x=>x.acceptRenameInput(!0),kbOpts:{weight:100+99,kbExpr:S.EditorContextKeys.focus,primary:1024+3}})),(0,v.registerEditorCommand)(new O({id:"cancelRenameInput",precondition:m.CONTEXT_RENAME_INPUT_VISIBLE,handler:x=>x.cancelRenameInput(),kbOpts:{weight:100+99,kbExpr:S.EditorContextKeys.focus,primary:9,secondary:[1024|9]}})),(0,v.registerModelAndPositionCommand)("_executeDocumentRenameProvider",function(x,F,L,...M){const[N]=M;(0,D.assertType)(typeof N=="string");const{renameProvider:B}=x.get(b.ILanguageFeaturesService);return y(B,F,L,N)}),(0,v.registerModelAndPositionCommand)("_executePrepareRename",async function(x,F,L){const{renameProvider:M}=x.get(b.ILanguageFeaturesService),B=await new E(F,L,M).resolveRenameLocation(_.CancellationToken.None);if(B?.rejectReason)throw new Error(B.rejectReason);return B}),d.Registry.as(p.Extensions.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:r.localize(8,null),default:!0,type:"boolean"}}})}),define(ne[2047],re([1,0,15,30,22,39,49,20,84,58,711,1198,1302,16,28,62,61,13,9]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.provideSelectionRanges=void 0;class p{constructor(m,b){this.index=m,this.ranges=b}mov(m){let b=this.index+(m?1:-1);if(b<0||b>=this.ranges.length)return this;const E=new p(b,this.ranges);return E.ranges[b].equalsRange(this.ranges[this.index])?E.mov(m):E}}let u=class Xs{constructor(m,b){this._editor=m,this._languageFeaturesService=b,this._ignoreSelection=!1}static get(m){return m.getContribution(Xs.ID)}dispose(){this._selectionListener?.dispose()}async run(m){if(!this._editor.hasModel())return;const b=this._editor.getSelections(),E=this._editor.getModel();if(this._state||await g(this._languageFeaturesService.selectionRangeProvider,E,b.map(T=>T.getPosition()),this._editor.getOption(102),f.CancellationToken.None).then(T=>{if(!(!t.isNonEmptyArray(T)||T.length!==b.length)&&!(!this._editor.hasModel()||!t.equals(this._editor.getSelections(),b,(R,O)=>R.equalsSelection(O)))){for(let R=0;R<T.length;R++)T[R]=T[R].filter(O=>O.containsPosition(b[R].getStartPosition())&&O.containsPosition(b[R].getEndPosition())),T[R].unshift(b[R]);this._state=T.map(R=>new p(0,R)),this._selectionListener?.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{this._ignoreSelection||(this._selectionListener?.dispose(),this._state=void 0)})}}),!this._state)return;this._state=this._state.map(T=>T.mov(m));const y=this._state.map(T=>I.Selection.fromPositions(T.ranges[T.index].getStartPosition(),T.ranges[T.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(y)}finally{this._ignoreSelection=!1}}};u.ID="editor.contrib.smartSelectController",u=Ee([W(1,S.ILanguageFeaturesService)],u);class a extends A.EditorAction{constructor(m,b){super(b);this._forward=m}async run(m,b){let E=u.get(b);E&&await E.run(this._forward)}}class n extends a{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:o.localize(0,null),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:w.EditorContextKeys.editorTextFocus,primary:1024|512|17,mac:{primary:2048|256|1024|17,secondary:[256|1024|17]},weight:100},menuOpts:{menuId:c.MenuId.MenubarSelectionMenu,group:"1_basic",title:o.localize(1,null),order:2}})}}i.CommandsRegistry.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class h extends a{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:o.localize(2,null),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:w.EditorContextKeys.editorTextFocus,primary:1024|512|15,mac:{primary:2048|256|1024|15,secondary:[256|1024|15]},weight:100},menuOpts:{menuId:c.MenuId.MenubarSelectionMenu,group:"1_basic",title:o.localize(3,null),order:3}})}}(0,A.registerEditorContribution)(u.ID,u),(0,A.registerEditorAction)(n),(0,A.registerEditorAction)(h);async function g(d,m,b,E,y){const T=d.all(m).concat(new C.WordSelectionRangeProvider);T.length===1&&T.unshift(new v.BracketSelectionRangeProvider);let R=[],O=[];for(const x of T)R.push(Promise.resolve(x.provideSelectionRanges(m,b,y)).then(F=>{if(t.isNonEmptyArray(F)&&F.length===b.length)for(let L=0;L<b.length;L++){O[L]||(O[L]=[]);for(const M of F[L])D.Range.isIRange(M.range)&&D.Range.containsPosition(M.range,b[L])&&O[L].push(D.Range.lift(M.range))}},_.onUnexpectedExternalError));return await Promise.all(R),O.map(x=>{if(x.length===0)return[];x.sort((N,B)=>k.Position.isBefore(N.getStartPosition(),B.getStartPosition())?1:k.Position.isBefore(B.getStartPosition(),N.getStartPosition())||k.Position.isBefore(N.getEndPosition(),B.getEndPosition())?-1:k.Position.isBefore(B.getEndPosition(),N.getEndPosition())?1:0);let F=[],L;for(const N of x)(!L||D.Range.containsRange(N,L)&&!D.Range.equalsRange(N,L))&&(F.push(N),L=N);if(!E.selectLeadingAndTrailingWhitespace)return F;let M=[F[0]];for(let N=1;N<F.length;N++){const B=F[N-1],P=F[N];if(P.startLineNumber!==B.startLineNumber||P.endLineNumber!==B.endLineNumber){const V=new D.Range(B.startLineNumber,m.getLineFirstNonWhitespaceColumn(B.startLineNumber),B.endLineNumber,m.getLineLastNonWhitespaceColumn(B.endLineNumber));V.containsRange(B)&&!V.equalsRange(B)&&P.containsRange(V)&&!P.equalsRange(V)&&M.push(V);const z=new D.Range(B.startLineNumber,1,B.endLineNumber,m.getLineMaxColumn(B.endLineNumber));z.containsRange(B)&&!z.equalsRange(V)&&P.containsRange(z)&&!P.equalsRange(z)&&M.push(z)}M.push(P)}return M})}e.provideSelectionRanges=g,i.CommandsRegistry.registerCommand("_executeSelectionRangeProvider",async function(d,...m){const[b,E]=m;(0,l.assertType)(r.URI.isUri(b));const y=d.get(S.ILanguageFeaturesService).selectionRangeProvider,T=await d.get(s.ITextModelService).createModelReference(b);try{return g(y,T.object.textEditorModel,E,{selectLeadingAndTrailingWhitespace:!0},f.CancellationToken.None)}finally{T.dispose()}})}),define(ne[211],re([1,0,30,22,102,2,151,13,9,49,20,61,261,1305,16,28,7,62,236]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickSuggestionsOptions=e.showSimpleSuggestions=e.getSuggestionComparator=e.provideSuggestionItems=e.CompletionItemModel=e.setSnippetSuggestSupport=e.getSnippetSuggestSupport=e.CompletionOptions=e.SnippetSortOrder=e.CompletionItem=e.suggestWidgetStatusbarMenu=e.Context=void 0,e.Context={Visible:r.historyNavigationVisible,DetailsVisible:new s.RawContextKey("suggestWidgetDetailsVisible",!1,(0,c.localize)(0,null)),MultipleSuggestions:new s.RawContextKey("suggestWidgetMultipleSuggestions",!1,(0,c.localize)(1,null)),MakesTextEdit:new s.RawContextKey("suggestionMakesTextEdit",!0,(0,c.localize)(2,null)),AcceptSuggestionsOnEnter:new s.RawContextKey("acceptSuggestionOnEnter",!0,(0,c.localize)(3,null)),HasInsertAndReplaceRange:new s.RawContextKey("suggestionHasInsertAndReplaceRange",!1,(0,c.localize)(4,null)),InsertMode:new s.RawContextKey("suggestionInsertMode",void 0,{type:"string",description:(0,c.localize)(5,null)}),CanResolve:new s.RawContextKey("suggestionCanResolve",!1,(0,c.localize)(6,null))},e.suggestWidgetStatusbarMenu=new i.MenuId("suggestWidgetStatusBar");class p{constructor(N,B,P,V){this.position=N,this.completion=B,this.container=P,this.provider=V,this.isInvalid=!1,this.score=_.FuzzyScore.Default,this.distance=0,this.textLabel=typeof B.label=="string"?B.label:B.label.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=B.sortText&&B.sortText.toLowerCase(),this.filterTextLow=B.filterText&&B.filterText.toLowerCase(),v.Range.isIRange(B.range)?(this.editStart=new w.Position(B.range.startLineNumber,B.range.startColumn),this.editInsertEnd=new w.Position(B.range.endLineNumber,B.range.endColumn),this.editReplaceEnd=new w.Position(B.range.endLineNumber,B.range.endColumn),this.isInvalid=this.isInvalid||v.Range.spansMultipleLines(B.range)||B.range.startLineNumber!==N.lineNumber):(this.editStart=new w.Position(B.range.insert.startLineNumber,B.range.insert.startColumn),this.editInsertEnd=new w.Position(B.range.insert.endLineNumber,B.range.insert.endColumn),this.editReplaceEnd=new w.Position(B.range.replace.endLineNumber,B.range.replace.endColumn),this.isInvalid=this.isInvalid||v.Range.spansMultipleLines(B.range.insert)||v.Range.spansMultipleLines(B.range.replace)||B.range.insert.startLineNumber!==N.lineNumber||B.range.replace.startLineNumber!==N.lineNumber||B.range.insert.startColumn!==B.range.replace.startColumn),typeof V.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._isResolved=!0)}get isResolved(){return!!this._isResolved}async resolve(N){if(!this._resolveCache){const B=N.onCancellationRequested(()=>{this._resolveCache=void 0,this._isResolved=!1});this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,N)).then(P=>{Object.assign(this.completion,P),this._isResolved=!0,B.dispose()},P=>{(0,f.isCancellationError)(P)&&(this._resolveCache=void 0,this._isResolved=!1)})}return this._resolveCache}}e.CompletionItem=p;var u;(function(M){M[M.Top=0]="Top",M[M.Inline=1]="Inline",M[M.Bottom=2]="Bottom"})(u=e.SnippetSortOrder||(e.SnippetSortOrder={}));class a{constructor(N=2,B=new Set,P=new Set,V=!0){this.snippetSortOrder=N,this.kindFilter=B,this.providerFilter=P,this.showDeprecated=V}}e.CompletionOptions=a,a.default=new a;let n;function h(){return n}e.getSnippetSuggestSupport=h;function g(M){const N=n;return n=M,N}e.setSnippetSuggestSupport=g;class d{constructor(N,B,P,V){this.items=N,this.needsClipboard=B,this.durations=P,this.disposable=V}}e.CompletionItemModel=d;async function m(M,N,B,P=a.default,V={triggerKind:0},z=t.CancellationToken.None){const U=new k.StopWatch(!0);B=B.clone();const H=N.getWordAtPosition(B),K=H?new v.Range(B.lineNumber,H.startColumn,B.lineNumber,H.endColumn):v.Range.fromPositions(B),G={replace:K,insert:K.setEndPosition(B.lineNumber,B.column)},q=[],Z=new A.DisposableStore,j=[];let X=!1;const Y=(J,ee,te)=>{let se=!1;if(!ee)return se;for(let ie of ee.suggestions)if(!P.kindFilter.has(ie.kind)){if(!P.showDeprecated&&ie?.tags?.includes(1))continue;ie.range||(ie.range=G),ie.sortText||(ie.sortText=typeof ie.label=="string"?ie.label:ie.label.label),!X&&ie.insertTextRules&&ie.insertTextRules&4&&(X=o.SnippetParser.guessNeedsClipboard(ie.insertText)),q.push(new p(B,ie,ee,J)),se=!0}return(0,A.isDisposable)(ee)&&Z.add(ee),j.push({providerName:J._debugDisplayName??"unknown_provider",elapsedProvider:ee.duration??-1,elapsedOverall:te.elapsed()}),se},$=(async()=>{if(!n||P.kindFilter.has(27)||P.providerFilter.size>0&&!P.providerFilter.has(n))return;const J=new k.StopWatch(!0),ee=await n.provideCompletionItems(N,B,V,z);Y(n,ee,J)})();for(let J of M.orderedGroups(N)){let ee=!1;if(await Promise.all(J.map(async te=>{if(!(P.providerFilter.size>0&&!P.providerFilter.has(te)))try{const se=new k.StopWatch(!0),ie=await te.provideCompletionItems(N,B,V,z);ee=Y(te,ie,se)||ee}catch(se){(0,f.onUnexpectedExternalError)(se)}})),ee||z.isCancellationRequested)break}return await $,z.isCancellationRequested?(Z.dispose(),Promise.reject((0,f.canceled)())):new d(q.sort(R(P.snippetSortOrder)),X,{entries:j,elapsed:U.elapsed()},Z)}e.provideSuggestionItems=m;function b(M,N){if(M.sortTextLow&&N.sortTextLow){if(M.sortTextLow<N.sortTextLow)return-1;if(M.sortTextLow>N.sortTextLow)return 1}return M.completion.label<N.completion.label?-1:M.completion.label>N.completion.label?1:M.completion.kind-N.completion.kind}function E(M,N){if(M.completion.kind!==N.completion.kind){if(M.completion.kind===27)return-1;if(N.completion.kind===27)return 1}return b(M,N)}function y(M,N){if(M.completion.kind!==N.completion.kind){if(M.completion.kind===27)return 1;if(N.completion.kind===27)return-1}return b(M,N)}const T=new Map;T.set(0,E),T.set(2,y),T.set(1,b);function R(M){return T.get(M)}e.getSuggestionComparator=R,S.CommandsRegistry.registerCommand("_executeCompletionItemProvider",async(M,...N)=>{const[B,P,V,z]=N;(0,D.assertType)(I.URI.isUri(B)),(0,D.assertType)(w.Position.isIPosition(P)),(0,D.assertType)(typeof V=="string"||!V),(0,D.assertType)(typeof z=="number"||!z);const{completionProvider:U}=M.get(l.ILanguageFeaturesService),H=await M.get(C.ITextModelService).createModelReference(B);try{const K={incomplete:!1,suggestions:[]},G=[],q=await m(U,H.object.textEditorModel,w.Position.lift(P),void 0,{triggerCharacter:V,triggerKind:V?1:0});for(const Z of q.items)G.length<(z??0)&&G.push(Z.resolve(t.CancellationToken.None)),K.incomplete=K.incomplete||Z.container.incomplete,K.suggestions.push(Z.completion);try{return await Promise.all(G),K}finally{setTimeout(()=>q.disposable.dispose(),100)}}finally{H.dispose()}});let O,x=[];function F(M,N,B){const{completionProvider:P}=M.get(l.ILanguageFeaturesService);O||(O=new class{provideCompletionItems(){let z={suggestions:x.slice(0)};return x.length=0,z}},P.register("*",O)),setTimeout(()=>{x.push(...B),N.getContribution("editor.contrib.suggestController")?.triggerSuggest(new Set().add(O))},0)}e.showSimpleSuggestions=F;class L{static isAllOff(N){return N.other==="off"&&N.comments==="off"&&N.strings==="off"}static isAllOn(N){return N.other==="on"&&N.comments==="on"&&N.strings==="on"}static valueFor(N,B){switch(B){case 1:return N.comments;case 2:return N.strings;default:return N.other}}}e.QuickSuggestionsOptions=L}),define(ne[2048],re([1,0,102,2,39,72,20,62,698,712,211,714,95,5]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class i extends f.RefCountedDisposable{constructor(r,p,u,a,n){super(n.disposable);this.model=r,this.line=p,this.word=u,this.completionModel=a}canBeReused(r,p,u){return this.model===r&&this.line===p&&this.word.startColumn===u.startColumn&&this.word.endColumn<u.endColumn&&this.completionModel.incomplete.size===0}get items(){const r=[];for(const p of this.completionModel.items){if(p.score===t.FuzzyScore.Default)continue;const u=new k.Range(p.editStart.lineNumber,p.editStart.column,p.editInsertEnd.lineNumber,p.editInsertEnd.column+this.completionModel.lineContext.characterCountDelta),a=p.completion.insertTextRules&&p.completion.insertTextRules&I.CompletionItemInsertTextRule.InsertAsSnippet?{snippet:p.completion.insertText}:p.completion.insertText;r.push({range:u,filterText:p.filterTextLow??p.labelLow,insertText:a,command:p.completion.command,additionalTextEdits:p.completion.additionalTextEdits})}return r}}let S=class{constructor(r,p,u){this._getEditorOption=r,this._languageFeatureService=p,this._clipboardService=u}async provideInlineCompletions(r,p,u,a){if(u.selectedSuggestionInfo)return;const n=this._getEditorOption(79,r);if(v.QuickSuggestionsOptions.isAllOff(n))return;r.tokenizeIfCheap(p.lineNumber);const h=r.getLineTokens(p.lineNumber),g=h.getStandardTokenType(h.findTokenIndexAtOffset(Math.max(p.column-1-1,0)));if(v.QuickSuggestionsOptions.valueFor(n,g)!=="inline")return;const d=r.getWordAtPosition(p);if(!d||d.word.length===0||d.endColumn!==p.column)return;let m;const b=r.getValueInRange(new k.Range(p.lineNumber,1,p.lineNumber,p.column));if(this._lastResult?.canBeReused(r,p.lineNumber,d)){const E=new w.LineContext(b,p.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=E,this._lastResult.acquire(),m=this._lastResult}else{const E=await(0,v.provideSuggestionItems)(this._languageFeatureService.completionProvider,r,p,void 0,void 0,a);let y;E.needsClipboard&&(y=await this._clipboardService.readText());const T=new w.CompletionModel(E.items,p.column,new w.LineContext(b,0),C.WordDistance.None,this._getEditorOption(106,r),this._getEditorOption(101,r),y);m=new i(r,p.lineNumber,d,T,E)}return this._lastResult=m,m}freeInlineCompletions(r){r.release()}};S=Ee([W(1,D.ILanguageFeaturesService),W(2,o.IClipboardService)],S);let s=class Oi{constructor(r,p,u,a){if(++Oi._counter==1){const n=a.createInstance(S,(h,g)=>(u.listCodeEditors().find(m=>m.getModel()===g)??r).getOption(h));Oi._disposable=p.inlineCompletionsProvider.register("*",n)}}dispose(){--Oi._counter==0&&(Oi._disposable?.dispose(),Oi._disposable=void 0)}};s._counter=0,s=Ee([W(1,D.ILanguageFeaturesService),W(2,A.ICodeEditorService),W(3,c.IInstantiationService)],s),(0,_.registerEditorContribution)("suggest.inlineCompletionsProvider",s)}),define(ne[756],re([1,0,112,452,39,1312]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleTabFocusModeAction=void 0;class k extends _.EditorAction{constructor(){super({id:k.ID,label:A.localize(0,null),alias:"Toggle Tab Key Moves Focus",precondition:void 0,kbOpts:{kbExpr:null,primary:2048|43,mac:{primary:256|1024|43},weight:100}})}run(I,w){const C=!f.TabFocus.getTabFocusMode();f.TabFocus.setTabFocusMode(C),C?(0,t.alert)(A.localize(1,null)):(0,t.alert)(A.localize(2,null))}}e.ToggleTabFocusModeAction=k,k.ID="editor.action.toggleTabFocusMode",(0,_.registerEditorAction)(k)}),define(ne[2049],re([1,0,151,39,1313]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class A extends f.EditorAction{constructor(){super({id:"editor.action.forceRetokenize",label:_.localize(0,null),alias:"Developer: Force Retokenize",precondition:void 0})}run(D,I){if(!I.hasModel())return;const w=I.getModel();w.resetTokenization();const v=new t.StopWatch(!0);w.forceTokenization(w.getLineCount()),v.stop(),console.log(`tokenization took ${v.elapsed()}`)}}(0,f.registerEditorAction)(A)}),define(ne[757],re([1,0,2,19,39,72,1315,54]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnusualLineTerminatorsDetector=void 0;const I="ignoreUnusualLineTerminators";function w(o,c,i){o.setModelProperty(c.uri,I,i)}function v(o,c){return o.getModelProperty(c.uri,I)}let C=class extends t.Disposable{constructor(c,i,S){super();this._editor=c,this._dialogService=i,this._codeEditorService=S,this._config=this._editor.getOption(114),this._register(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(114)&&(this._config=this._editor.getOption(114),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(s=>{s.isUndoing||this._checkForUnusualLineTerminators()}))}async _checkForUnusualLineTerminators(){if(this._config==="off"||!this._editor.hasModel())return;const c=this._editor.getModel();if(!c.mightContainUnusualLineTerminators()||v(this._codeEditorService,c)===!0||this._editor.getOption(81))return;if(this._config==="auto"){c.removeUnusualLineTerminators(this._editor.getSelections());return}if(!(await this._dialogService.confirm({title:k.localize(0,null),message:k.localize(1,null),detail:k.localize(2,null,(0,f.basename)(c.uri)),primaryButton:k.localize(3,null),secondaryButton:k.localize(4,null)})).confirmed){w(this._codeEditorService,c,!0);return}c.removeUnusualLineTerminators(this._editor.getSelections())}};C.ID="editor.contrib.unusualLineTerminatorsDetector",C=Ee([W(1,D.IDialogService),W(2,A.ICodeEditorService)],C),e.UnusualLineTerminatorsDetector=C,(0,_.registerEditorContribution)(C.ID,C)}),define(ne[758],re([1,0,39,341,123,226,456,385,49,20,84,58,124,1317,98,7,141]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DeleteInsideWord=e.DeleteWordRight=e.DeleteWordEndRight=e.DeleteWordStartRight=e.DeleteWordLeft=e.DeleteWordEndLeft=e.DeleteWordStartLeft=e.DeleteWordRightCommand=e.DeleteWordLeftCommand=e.DeleteWordCommand=e.CursorWordAccessibilityRightSelect=e.CursorWordAccessibilityRight=e.CursorWordRightSelect=e.CursorWordEndRightSelect=e.CursorWordStartRightSelect=e.CursorWordRight=e.CursorWordEndRight=e.CursorWordStartRight=e.CursorWordAccessibilityLeftSelect=e.CursorWordAccessibilityLeft=e.CursorWordLeftSelect=e.CursorWordEndLeftSelect=e.CursorWordStartLeftSelect=e.CursorWordLeft=e.CursorWordEndLeft=e.CursorWordStartLeft=e.WordRightCommand=e.WordLeftCommand=e.MoveWordCommand=void 0;class l extends t.EditorCommand{constructor(Z){super(Z);this._inSelectionMode=Z.inSelectionMode,this._wordNavigationType=Z.wordNavigationType}runEditorCommand(Z,j,X){if(!j.hasModel())return;const Y=(0,D.getMapForWordSeparators)(j.getOption(117)),$=j.getModel(),ee=j.getSelections().map(te=>{const se=new I.Position(te.positionLineNumber,te.positionColumn),ie=this._move(Y,$,se,this._wordNavigationType);return this._moveTo(te,ie,this._inSelectionMode)});if($.pushStackElement(),j._getViewModel().setCursorStates("moveWordCommand",3,ee.map(te=>A.CursorState.fromModelSelection(te))),ee.length===1){const te=new I.Position(ee[0].positionLineNumber,ee[0].positionColumn);j.revealPosition(te,0)}}_moveTo(Z,j,X){return X?new v.Selection(Z.selectionStartLineNumber,Z.selectionStartColumn,j.lineNumber,j.column):new v.Selection(j.lineNumber,j.column,j.lineNumber,j.column)}}e.MoveWordCommand=l;class r extends l{_move(Z,j,X,Y){return k.WordOperations.moveWordLeft(Z,j,X,Y)}}e.WordLeftCommand=r;class p extends l{_move(Z,j,X,Y){return k.WordOperations.moveWordRight(Z,j,X,Y)}}e.WordRightCommand=p;class u extends r{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}e.CursorWordStartLeft=u;class a extends r{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}e.CursorWordEndLeft=a;class n extends r{constructor(){super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:S.ContextKeyExpr.and(C.EditorContextKeys.textInputFocus,S.ContextKeyExpr.and(i.CONTEXT_ACCESSIBILITY_MODE_ENABLED,s.IsWindowsContext)?.negate()),primary:2048|15,mac:{primary:512|15},weight:100}})}}e.CursorWordLeft=n;class h extends r{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}e.CursorWordStartLeftSelect=h;class g extends r{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}e.CursorWordEndLeftSelect=g;class d extends r{constructor(){super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:S.ContextKeyExpr.and(C.EditorContextKeys.textInputFocus,S.ContextKeyExpr.and(i.CONTEXT_ACCESSIBILITY_MODE_ENABLED,s.IsWindowsContext)?.negate()),primary:2048|1024|15,mac:{primary:512|1024|15},weight:100}})}}e.CursorWordLeftSelect=d;class m extends r{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(Z,j,X,Y){return super._move((0,D.getMapForWordSeparators)(_.EditorOptions.wordSeparators.defaultValue),j,X,Y)}}e.CursorWordAccessibilityLeft=m;class b extends r{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(Z,j,X,Y){return super._move((0,D.getMapForWordSeparators)(_.EditorOptions.wordSeparators.defaultValue),j,X,Y)}}e.CursorWordAccessibilityLeftSelect=b;class E extends p{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}e.CursorWordStartRight=E;class y extends p{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:S.ContextKeyExpr.and(C.EditorContextKeys.textInputFocus,S.ContextKeyExpr.and(i.CONTEXT_ACCESSIBILITY_MODE_ENABLED,s.IsWindowsContext)?.negate()),primary:2048|17,mac:{primary:512|17},weight:100}})}}e.CursorWordEndRight=y;class T extends p{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}e.CursorWordRight=T;class R extends p{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}e.CursorWordStartRightSelect=R;class O extends p{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:S.ContextKeyExpr.and(C.EditorContextKeys.textInputFocus,S.ContextKeyExpr.and(i.CONTEXT_ACCESSIBILITY_MODE_ENABLED,s.IsWindowsContext)?.negate()),primary:2048|1024|17,mac:{primary:512|1024|17},weight:100}})}}e.CursorWordEndRightSelect=O;class x extends p{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}e.CursorWordRightSelect=x;class F extends p{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(Z,j,X,Y){return super._move((0,D.getMapForWordSeparators)(_.EditorOptions.wordSeparators.defaultValue),j,X,Y)}}e.CursorWordAccessibilityRight=F;class L extends p{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(Z,j,X,Y){return super._move((0,D.getMapForWordSeparators)(_.EditorOptions.wordSeparators.defaultValue),j,X,Y)}}e.CursorWordAccessibilityRightSelect=L;class M extends t.EditorCommand{constructor(Z){super(Z);this._whitespaceHeuristics=Z.whitespaceHeuristics,this._wordNavigationType=Z.wordNavigationType}runEditorCommand(Z,j,X){const Y=Z.get(o.ILanguageConfigurationService);if(!j.hasModel())return;const $=(0,D.getMapForWordSeparators)(j.getOption(117)),J=j.getModel(),ee=j.getSelections(),te=j.getOption(5),se=j.getOption(8),ie=Y.getLanguageConfiguration(J.getLanguageId()).getAutoClosingPairs(),ce=j._getViewModel(),le=ee.map(ae=>{const ue=this._delete({wordSeparators:$,model:J,selection:ae,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:j.getOption(6),autoClosingBrackets:te,autoClosingQuotes:se,autoClosingPairs:ie,autoClosedCharacters:ce.getCursorAutoClosedCharacters()},this._wordNavigationType);return new f.ReplaceCommand(ue,"")});j.pushUndoStop(),j.executeCommands(this.id,le),j.pushUndoStop()}}e.DeleteWordCommand=M;class N extends M{_delete(Z,j){let X=k.WordOperations.deleteWordLeft(Z,j);return X||new w.Range(1,1,1,1)}}e.DeleteWordLeftCommand=N;class B extends M{_delete(Z,j){let X=k.WordOperations.deleteWordRight(Z,j);if(X)return X;const Y=Z.model.getLineCount(),$=Z.model.getLineMaxColumn(Y);return new w.Range(Y,$,Y,$)}}e.DeleteWordRightCommand=B;class P extends N{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:C.EditorContextKeys.writable})}}e.DeleteWordStartLeft=P;class V extends N{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:C.EditorContextKeys.writable})}}e.DeleteWordEndLeft=V;class z extends N{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:C.EditorContextKeys.writable,kbOpts:{kbExpr:C.EditorContextKeys.textInputFocus,primary:2048|1,mac:{primary:512|1},weight:100}})}}e.DeleteWordLeft=z;class U extends B{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:C.EditorContextKeys.writable})}}e.DeleteWordStartRight=U;class H extends B{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:C.EditorContextKeys.writable})}}e.DeleteWordEndRight=H;class K extends B{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:C.EditorContextKeys.writable,kbOpts:{kbExpr:C.EditorContextKeys.textInputFocus,primary:2048|20,mac:{primary:512|20},weight:100}})}}e.DeleteWordRight=K;class G extends t.EditorAction{constructor(){super({id:"deleteInsideWord",precondition:C.EditorContextKeys.writable,label:c.localize(0,null),alias:"Delete Word"})}run(Z,j,X){if(!j.hasModel())return;const Y=(0,D.getMapForWordSeparators)(j.getOption(117)),$=j.getModel(),ee=j.getSelections().map(te=>{const se=k.WordOperations.deleteInsideWord(Y,$,te);return new f.ReplaceCommand(se,"")});j.pushUndoStop(),j.executeCommands(this.id,ee),j.pushUndoStop()}}e.DeleteInsideWord=G,(0,t.registerEditorCommand)(new u),(0,t.registerEditorCommand)(new a),(0,t.registerEditorCommand)(new n),(0,t.registerEditorCommand)(new h),(0,t.registerEditorCommand)(new g),(0,t.registerEditorCommand)(new d),(0,t.registerEditorCommand)(new E),(0,t.registerEditorCommand)(new y),(0,t.registerEditorCommand)(new T),(0,t.registerEditorCommand)(new R),(0,t.registerEditorCommand)(new O),(0,t.registerEditorCommand)(new x),(0,t.registerEditorCommand)(new m),(0,t.registerEditorCommand)(new b),(0,t.registerEditorCommand)(new F),(0,t.registerEditorCommand)(new L),(0,t.registerEditorCommand)(new P),(0,t.registerEditorCommand)(new V),(0,t.registerEditorCommand)(new z),(0,t.registerEditorCommand)(new U),(0,t.registerEditorCommand)(new H),(0,t.registerEditorCommand)(new K),(0,t.registerEditorAction)(G)}),define(ne[2050],re([1,0,39,456,20,58,758,28]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorWordPartRightSelect=e.CursorWordPartRight=e.WordPartRightCommand=e.CursorWordPartLeftSelect=e.CursorWordPartLeft=e.WordPartLeftCommand=e.DeleteWordPartRight=e.DeleteWordPartLeft=void 0;class I extends k.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:A.EditorContextKeys.writable,kbOpts:{kbExpr:A.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|512|1},weight:100}})}_delete(l,r){let p=f.WordPartOperations.deleteWordPartLeft(l);return p||new _.Range(1,1,1,1)}}e.DeleteWordPartLeft=I;class w extends k.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:A.EditorContextKeys.writable,kbOpts:{kbExpr:A.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|512|20},weight:100}})}_delete(l,r){let p=f.WordPartOperations.deleteWordPartRight(l);if(p)return p;const u=l.model.getLineCount(),a=l.model.getLineMaxColumn(u);return new _.Range(u,a,u,a)}}e.DeleteWordPartRight=w;class v extends k.MoveWordCommand{_move(l,r,p,u){return f.WordPartOperations.moveWordPartLeft(l,r,p)}}e.WordPartLeftCommand=v;class C extends v{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:A.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|512|15},weight:100}})}}e.CursorWordPartLeft=C,D.CommandsRegistry.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class o extends v{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:A.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|512|1024|15},weight:100}})}}e.CursorWordPartLeftSelect=o,D.CommandsRegistry.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class c extends k.MoveWordCommand{_move(l,r,p,u){return f.WordPartOperations.moveWordPartRight(l,r,p)}}e.WordPartRightCommand=c;class i extends c{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:A.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|512|17},weight:100}})}}e.CursorWordPartRight=i;class S extends c{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:A.EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|512|1024|17},weight:100}})}}e.CursorWordPartRightSelect=S,(0,t.registerEditorCommand)(new I),(0,t.registerEditorCommand)(new w),(0,t.registerEditorCommand)(new C),(0,t.registerEditorCommand)(new o),(0,t.registerEditorCommand)(new i),(0,t.registerEditorCommand)(new S)}),define(ne[73],re([1,0,10,91,134,262,36,309,2,14,1318,16,7,37,5,38,26,24,12,1044]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createActionViewItem=e.SubmenuEntryActionViewItem=e.MenuEntryActionViewItem=e.createAndFillInActionBarActions=e.createAndFillInContextMenuActions=void 0;function p(b,E,y,T){const R=b.getActions(E),O=t.ModifierKeyEmitter.getInstance(),x=O.keyStatus.altKey||(w.isWindows||w.isLinux)&&O.keyStatus.shiftKey;return n(R,y,x,T?F=>F===T:F=>F==="navigation"),a(R)}e.createAndFillInContextMenuActions=p;function u(b,E,y,T,R,O,x){const F=b.getActions(E);return n(F,y,!1,typeof T=="string"?M=>M===T:T,R,O,x),a(F)}e.createAndFillInActionBarActions=u;function a(b){const E=new I.DisposableStore;for(const[,y]of b)for(const T of y)E.add(T);return E}function n(b,E,y,T=F=>F==="navigation",R=Number.MAX_SAFE_INTEGER,O=()=>!1,x=!1){let F,L;Array.isArray(E)?(F=E,L=E):(F=E.primary,L=E.secondary);const M=new Set;for(const[N,B]of b){let P;T(N)?(P=F,P.length>0&&x&&P.push(new k.Separator)):(P=L,P.length>0&&P.push(new k.Separator));for(let V of B){y&&(V=V instanceof C.MenuItemAction&&V.alt?V.alt:V);const z=P.push(V);V instanceof k.SubmenuAction&&M.add({group:N,action:V,index:z-1})}}for(const{group:N,action:B,index:P}of M){const V=T(N)?F:L,z=B.actions;(z.length<=1||V.length+z.length-2<=R)&&O(B,N,V.length)&&V.splice(P,1,...z)}if(F!==L&&F.length>R){const N=F.splice(R,F.length-R);L.unshift(...N,new k.Separator)}}let h=class extends _.ActionViewItem{constructor(E,y,T,R,O){super(void 0,E,{icon:!!(E.class||E.item.icon),label:!E.class&&!E.item.icon,draggable:y?.draggable});this._keybindingService=T,this._notificationService=R,this._contextKeyService=O,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new I.MutableDisposable),this._altKey=t.ModifierKeyEmitter.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}async onClick(E){E.preventDefault(),E.stopPropagation();try{await this.actionRunner.run(this._commandAction,this._context)}catch(y){this._notificationService.error(y)}}render(E){super.render(E),E.classList.add("menu-entry"),this._updateItemClass(this._menuItemAction.item);let y=!1,T=this._altKey.keyStatus.altKey||(w.isWindows||w.isLinux)&&this._altKey.keyStatus.shiftKey;const R=()=>{const O=y&&T;O!==this._wantsAltCommand&&(this._wantsAltCommand=O,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._menuItemAction.alt&&this._register(this._altKey.event(O=>{T=O.altKey||(w.isWindows||w.isLinux)&&O.shiftKey,R()})),this._register((0,t.addDisposableListener)(E,"mouseleave",O=>{y=!1,R()})),this._register((0,t.addDisposableListener)(E,"mouseenter",O=>{y=!0,R()}))}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}updateTooltip(){if(this.label){const E=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),y=E&&E.getLabel(),T=this._commandAction.tooltip||this._commandAction.label;let R=y?(0,v.localize)(0,null,T,y):T;if(!this._wantsAltCommand&&this._menuItemAction.alt){const O=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,x=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),F=x&&x.getLabel(),L=F?(0,v.localize)(1,null,O,F):O;R+=` [${D.UILabelProvider.modifierLabels[w.OS].altKey}] ${L}`}this.label.title=R}}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.item))}_updateItemClass(E){this._itemClassDispose.value=void 0;const{element:y,label:T}=this;if(!y||!T)return;const R=this._commandAction.checked&&E.toggled?.icon?E.toggled.icon:E.icon;if(!!R)if(r.ThemeIcon.isThemeIcon(R)){const O=r.ThemeIcon.asClassNameArray(R);T.classList.add(...O),this._itemClassDispose.value=(0,I.toDisposable)(()=>{T.classList.remove(...O)})}else R.light&&T.style.setProperty("--menu-entry-icon-light",(0,t.asCSSUrl)(R.light)),R.dark&&T.style.setProperty("--menu-entry-icon-dark",(0,t.asCSSUrl)(R.dark)),T.classList.add("icon"),this._itemClassDispose.value=(0,I.toDisposable)(()=>{T.classList.remove("icon"),T.style.removeProperty("--menu-entry-icon-light"),T.style.removeProperty("--menu-entry-icon-dark")})}};h=Ee([W(2,S.IKeybindingService),W(3,s.INotificationService),W(4,o.IContextKeyService)],h),e.MenuEntryActionViewItem=h;let g=class extends A.DropdownMenuActionViewItem{constructor(E,y,T){const R=Object.assign({},y??Object.create(null),{menuAsChild:y?.menuAsChild??!1,classNames:y?.classNames??(r.ThemeIcon.isThemeIcon(E.item.icon)?r.ThemeIcon.asClassName(E.item.icon):void 0)});super(E,{getActions:()=>E.actions},T,R)}render(E){if(super.render(E),this.element){E.classList.add("menu-entry");const{icon:y}=this._action.item;y&&!r.ThemeIcon.isThemeIcon(y)&&(this.element.classList.add("icon"),y.light&&this.element.style.setProperty("--menu-entry-icon-light",(0,t.asCSSUrl)(y.light)),y.dark&&this.element.style.setProperty("--menu-entry-icon-dark",(0,t.asCSSUrl)(y.dark)))}}};g=Ee([W(2,c.IContextMenuService)],g),e.SubmenuEntryActionViewItem=g;let d=class extends _.BaseActionViewItem{constructor(E,y,T,R,O,x,F,L){super(null,E);this._keybindingService=T,this._notificationService=R,this._contextMenuService=O,this._menuService=x,this._instaService=F,this._storageService=L,this._container=null,this._storageKey=`${E.item.submenu._debugName}_lastActionId`;let M,N=L.get(this._storageKey,1);N&&(M=E.actions.find(P=>N===P.id)),M||(M=E.actions[0]),this._defaultAction=this._instaService.createInstance(h,M,void 0);const B=Object.assign({},y??Object.create(null),{menuAsChild:y?.menuAsChild??!0,classNames:y?.classNames??["codicon","codicon-chevron-down"],actionRunner:y?.actionRunner??new k.ActionRunner});this._dropdown=new A.DropdownMenuActionViewItem(E,E.actions,this._contextMenuService,B),this._dropdown.actionRunner.onDidRun(P=>{P.action instanceof C.MenuItemAction&&this.update(P.action)})}get onDidChangeDropdownVisibility(){return this._dropdown.onDidChangeVisibility}update(E){this._storageService.store(this._storageKey,E.id,1,0),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(h,E,void 0),this._defaultAction.actionRunner=new class extends k.ActionRunner{async runAction(y,T){await y.run(void 0)}},this._container&&this._defaultAction.render((0,t.prepend)(this._container,(0,t.$)(".action-container")))}setActionContext(E){super.setActionContext(E),this._defaultAction.setActionContext(E),this._dropdown.setActionContext(E)}render(E){this._container=E,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const y=(0,t.$)(".action-container");this._defaultAction.render((0,t.append)(this._container,y)),this._register((0,t.addDisposableListener)(y,t.EventType.KEY_DOWN,R=>{const O=new f.StandardKeyboardEvent(R);O.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),O.stopPropagation())}));const T=(0,t.$)(".dropdown-action-container");this._dropdown.render((0,t.append)(this._container,T)),this._register((0,t.addDisposableListener)(T,t.EventType.KEY_DOWN,R=>{const O=new f.StandardKeyboardEvent(R);O.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),this._defaultAction.element?.focus(),O.stopPropagation())}))}focus(E){E?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(E){E?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};d=Ee([W(2,S.IKeybindingService),W(3,s.INotificationService),W(4,c.IContextMenuService),W(5,C.IMenuService),W(6,i.IInstantiationService),W(7,l.IStorageService)],d);function m(b,E,y){return E instanceof C.MenuItemAction?b.createInstance(h,E,void 0):E instanceof C.SubmenuItemAction?E.item.rememberDefaultAction?b.createInstance(d,E,y):b.createInstance(g,E,y):void 0}e.createActionViewItem=m}),define(ne[2051],re([1,0,10,78,2,211,1310,73,16,7,5]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestWidgetStatus=void 0;class C extends D.MenuEntryActionViewItem{updateLabel(){const i=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!i)return super.updateLabel();this.label&&(this.label.textContent=(0,k.localize)(0,null,this._action.label,C.symbolPrintEnter(i)))}static symbolPrintEnter(i){return i.getLabel()?.replace(/\benter\b/gi,"\u23CE")}}let o=class{constructor(i,S,s,l){this._menuService=s,this._contextKeyService=l,this._menuDisposables=new _.DisposableStore,this.element=t.append(i,t.$(".suggest-status-bar"));const r=p=>p instanceof I.MenuItemAction?S.createInstance(C,p,void 0):void 0;this._leftActions=new f.ActionBar(this.element,{actionViewItemProvider:r}),this._rightActions=new f.ActionBar(this.element,{actionViewItemProvider:r}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this.element.remove()}show(){const i=this._menuService.createMenu(A.suggestWidgetStatusbarMenu,this._contextKeyService),S=()=>{const s=[],l=[];for(let[r,p]of i.getActions())r==="left"?s.push(...p):l.push(...p);this._leftActions.clear(),this._leftActions.push(s),this._rightActions.clear(),this._rightActions.push(l)};this._menuDisposables.add(i.onDidChange(()=>S())),this._menuDisposables.add(i)}hide(){this._menuDisposables.clear()}};o=Ee([W(1,v.IInstantiationService),W(2,I.IMenuService),W(3,w.IContextKeyService)],o),e.SuggestWidgetStatus=o}),define(ne[473],re([1,0,10,91,134,262,73,7,38,26]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownWithPrimaryActionViewItem=void 0;let v=class extends _.BaseActionViewItem{constructor(o,c,i,S,s,l,r,p,u){super(null,o);this._contextMenuProvider=s,this._options=l,this._container=null,this._dropdownContainer=null,this._primaryAction=new k.MenuEntryActionViewItem(o,void 0,r,p,u),this._dropdown=new A.DropdownMenuActionViewItem(c,i,this._contextMenuProvider,{menuAsChild:!0,classNames:["codicon","codicon-chevron-down"],keybindingProvider:this._options?.getKeyBinding})}get onDidChangeDropdownVisibility(){return this._dropdown.onDidChangeVisibility}setActionContext(o){super.setActionContext(o),this._primaryAction.setActionContext(o),this._dropdown.setActionContext(o)}render(o){this._container=o,super.render(this._container),this._container.classList.add("monaco-dropdown-with-primary");const c=t.$(".action-container");this._primaryAction.render(t.append(this._container,c)),this._dropdownContainer=t.$(".dropdown-action-container"),this._dropdown.render(t.append(this._container,this._dropdownContainer)),this._register(t.addDisposableListener(c,t.EventType.KEY_DOWN,i=>{const S=new f.StandardKeyboardEvent(i);S.equals(17)&&(this._primaryAction.element.tabIndex=-1,this._dropdown.focus(),S.stopPropagation())})),this._register(t.addDisposableListener(this._dropdownContainer,t.EventType.KEY_DOWN,i=>{const S=new f.StandardKeyboardEvent(i);S.equals(15)&&(this._primaryAction.element.tabIndex=0,this._dropdown.setFocusable(!1),this._primaryAction.element?.focus(),S.stopPropagation())}))}focus(o){o?this._dropdown.focus():(this._primaryAction.element.tabIndex=0,this._primaryAction.element.focus())}blur(){this._primaryAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(o){o?this._primaryAction.element.tabIndex=0:(this._primaryAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}update(o,c,i){this._dropdown.dispose(),this._dropdown=new A.DropdownMenuActionViewItem(o,c,this._contextMenuProvider,{menuAsChild:!0,classNames:["codicon",i||"codicon-chevron-down"]}),this._dropdownContainer&&this._dropdown.render(this._dropdownContainer)}dispose(){this._primaryAction.dispose(),this._dropdown.dispose(),super.dispose()}};v=Ee([W(6,I.IKeybindingService),W(7,w.INotificationService),W(8,D.IContextKeyService)],v),e.DropdownWithPrimaryActionViewItem=v}),define(ne[2052],re([1,0,11,6,2,16,28,7]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenuService=void 0;let I=class{constructor(C){this._commandService=C}createMenu(C,o,c){return new w(C,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...c},this._commandService,o,this)}};I=Ee([W(0,k.ICommandService)],I),e.MenuService=I;let w=class Ni{constructor(C,o,c,i,S){this._id=C,this._options=o,this._commandService=c,this._contextKeyService=i,this._menuService=S,this._disposables=new _.DisposableStore,this._menuGroups=[],this._contextKeys=new Set,this._build();const s=new t.RunOnceScheduler(()=>{this._build(),this._onDidChange.fire(this)},o.eventDebounceDelay);this._disposables.add(s),this._disposables.add(A.MenuRegistry.onDidChangeMenu(p=>{p.has(C)&&s.schedule()}));const l=this._disposables.add(new _.DisposableStore),r=()=>{const p=new t.RunOnceScheduler(()=>this._onDidChange.fire(this),o.eventDebounceDelay);l.add(p),l.add(i.onDidChangeContext(u=>{u.affectsSome(this._contextKeys)&&p.schedule()}))};this._onDidChange=new f.Emitter({onFirstListenerAdd:r,onLastListenerRemove:l.clear.bind(l)}),this.onDidChange=this._onDidChange.event}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}_build(){this._menuGroups.length=0,this._contextKeys.clear();const C=A.MenuRegistry.getMenuItems(this._id);let o;C.sort(Ni._compareMenuItems);for(const c of C){const i=c.group||"";(!o||o[0]!==i)&&(o=[i,[]],this._menuGroups.push(o)),o[1].push(c),this._collectContextKeys(c)}}_collectContextKeys(C){if(Ni._fillInKbExprKeys(C.when,this._contextKeys),(0,A.isIMenuItem)(C)){if(C.command.precondition&&Ni._fillInKbExprKeys(C.command.precondition,this._contextKeys),C.command.toggled){const o=C.command.toggled.condition||C.command.toggled;Ni._fillInKbExprKeys(o,this._contextKeys)}}else this._options.emitEventsForSubmenuChanges&&A.MenuRegistry.getMenuItems(C.submenu).forEach(this._collectContextKeys,this)}getActions(C){const o=[];for(let c of this._menuGroups){const[i,S]=c,s=[];for(const l of S)if(this._contextKeyService.contextMatchesRules(l.when)){const r=(0,A.isIMenuItem)(l)?new A.MenuItemAction(l.command,l.alt,C,this._contextKeyService,this._commandService):new A.SubmenuItemAction(l,this._menuService,this._contextKeyService,C);s.push(r)}s.length>0&&o.push([i,s])}return o}static _fillInKbExprKeys(C,o){if(C)for(let c of C.keys())o.add(c)}static _compareMenuItems(C,o){let c=C.group,i=o.group;if(c!==i){if(c){if(!i)return-1}else return 1;if(c==="navigation")return-1;if(i==="navigation")return 1;let l=c.localeCompare(i);if(l!==0)return l}let S=C.order||0,s=o.order||0;return S<s?-1:S>s?1:Ni._compareTitles((0,A.isIMenuItem)(C)?C.command.title:C.title,(0,A.isIMenuItem)(o)?o.command.title:o.title)}static _compareTitles(C,o){const c=typeof C=="string"?C:C.original,i=typeof o=="string"?o:o.original;return c.localeCompare(i)}};w=Ee([W(2,k.ICommandService),W(3,D.IContextKeyService),W(4,A.IMenuService)],w)}),define(ne[2053],re([1,0,10,6,2,38,26,27,12,2010,37]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuService=void 0;let C=class extends _.Disposable{constructor(c,i,S,s,l){super();this._onDidShowContextMenu=new f.Emitter,this.onDidShowContextMenu=this._onDidShowContextMenu.event,this._onDidHideContextMenu=new f.Emitter,this.onDidHideContextMenu=this._onDidHideContextMenu.event,this.contextMenuHandler=new w.ContextMenuHandler(S,c,i,s,l)}configure(c){this.contextMenuHandler.configure(c)}showContextMenu(c){this.contextMenuHandler.showContextMenu({...c,onHide:i=>{c.onHide&&c.onHide(i),this._onDidHideContextMenu.fire()}}),t.ModifierKeyEmitter.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};C=Ee([W(0,D.ITelemetryService),W(1,k.INotificationService),W(2,v.IContextViewService),W(3,A.IKeybindingService),W(4,I.IThemeService)],C),e.ContextMenuService=C}),define(ne[71],re([1,0,10,668,208,671,463,716,544,6,2,1332,98,8,57,7,141,5,38,17,68,12]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkbenchCompressibleAsyncDataTree=e.WorkbenchAsyncDataTree=e.WorkbenchDataTree=e.WorkbenchCompressibleObjectTree=e.WorkbenchObjectTree=e.getSelectionKeyboardEvent=e.WorkbenchTable=e.WorkbenchPagedList=e.WorkbenchList=e.WorkbenchListAutomaticKeyboardNavigationKey=e.WorkbenchTreeElementHasChild=e.WorkbenchTreeElementCanExpand=e.WorkbenchTreeElementHasParent=e.WorkbenchTreeElementCanCollapse=e.WorkbenchListSelectionNavigation=e.WorkbenchListMultiSelection=e.WorkbenchListDoubleSelection=e.WorkbenchListHasSelectionOrFocus=e.WorkbenchListFocusContextKey=e.WorkbenchListSupportsMultiSelectContextKey=e.ListService=e.IListService=void 0,e.IListService=(0,l.createDecorator)("listService");let n=class{constructor(ce){this._themeService=ce,this.disposables=new v.DisposableStore,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}get lastFocusedList(){return this._lastFocusedWidget}setLastFocusedList(ce){ce!==this._lastFocusedWidget&&(this._lastFocusedWidget?.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=ce,this._lastFocusedWidget?.getHTMLElement().classList.add("last-focused"))}register(ce,le){if(!this._hasCreatedStyleController){this._hasCreatedStyleController=!0;const ue=new _.DefaultStyleController((0,t.createStyleSheet)(),"");this.disposables.add((0,u.attachListStyler)(ue,this._themeService))}if(this.lists.some(ue=>ue.widget===ce))throw new Error("Cannot register the same widget multiple times");const ae={widget:ce,extraContextKeys:le};return this.lists.push(ae),ce.getHTMLElement()===document.activeElement&&this.setLastFocusedList(ce),(0,v.combinedDisposable)(ce.onDidFocus(()=>this.setLastFocusedList(ce)),(0,v.toDisposable)(()=>this.lists.splice(this.lists.indexOf(ae),1)),ce.onDidDispose(()=>{this.lists=this.lists.filter(ue=>ue!==ae),this._lastFocusedWidget===ce&&this.setLastFocusedList(void 0)}))}dispose(){this.disposables.dispose()}};n=Ee([W(0,a.IThemeService)],n),e.ListService=n;const h=new S.RawContextKey("listFocus",!0);e.WorkbenchListSupportsMultiSelectContextKey=new S.RawContextKey("listSupportsMultiselect",!0),e.WorkbenchListFocusContextKey=S.ContextKeyExpr.and(h,S.ContextKeyExpr.not(s.InputFocusedContextKey)),e.WorkbenchListHasSelectionOrFocus=new S.RawContextKey("listHasSelectionOrFocus",!1),e.WorkbenchListDoubleSelection=new S.RawContextKey("listDoubleSelection",!1),e.WorkbenchListMultiSelection=new S.RawContextKey("listMultiSelection",!1),e.WorkbenchListSelectionNavigation=new S.RawContextKey("listSelectionNavigation",!1),e.WorkbenchTreeElementCanCollapse=new S.RawContextKey("treeElementCanCollapse",!1),e.WorkbenchTreeElementHasParent=new S.RawContextKey("treeElementHasParent",!1),e.WorkbenchTreeElementCanExpand=new S.RawContextKey("treeElementCanExpand",!1),e.WorkbenchTreeElementHasChild=new S.RawContextKey("treeElementHasChild",!1),e.WorkbenchListAutomaticKeyboardNavigationKey="listAutomaticKeyboardNavigation";function g(ie,ce){const le=ie.createScoped(ce.getHTMLElement());return h.bindTo(le),le}const d="workbench.list.multiSelectModifier",m="workbench.list.openMode",b="workbench.list.horizontalScrolling",E="workbench.list.keyboardNavigation",y="workbench.list.automaticKeyboardNavigation",T="workbench.tree.indent",R="workbench.tree.renderIndentGuides",O="workbench.list.smoothScrolling",x="workbench.list.mouseWheelScrollSensitivity",F="workbench.list.fastScrollSensitivity",L="workbench.tree.expandMode";function M(ie){return ie.getValue(d)==="alt"}class N extends v.Disposable{constructor(ce){super();this.configurationService=ce,this.useAltAsMultipleSelectionModifier=M(ce),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(ce=>{ce.affectsConfiguration(d)&&(this.useAltAsMultipleSelectionModifier=M(this.configurationService))}))}isSelectionSingleChangeEvent(ce){return this.useAltAsMultipleSelectionModifier?ce.browserEvent.altKey:(0,_.isSelectionSingleChangeEvent)(ce)}isSelectionRangeChangeEvent(ce){return(0,_.isSelectionRangeChangeEvent)(ce)}}function B(ie,ce,le){const ae=new v.DisposableStore;return[{...ie,keyboardNavigationDelegate:{mightProducePrintableCharacter(oe){return le.mightProducePrintableCharacter(oe)}},smoothScrolling:Boolean(ce.getValue(O)),mouseWheelScrollSensitivity:ce.getValue(x),fastScrollSensitivity:ce.getValue(F),multipleSelectionController:ie.multipleSelectionController??ae.add(new N(ce))},ae]}let P=class extends _.List{constructor(ce,le,ae,ue,oe,fe,pe,me,be,Ce){const ve=typeof oe.horizontalScrolling!="undefined"?oe.horizontalScrolling:Boolean(be.getValue(b)),[he,ge]=B(oe,be,Ce);super(ce,le,ae,ue,{keyboardSupport:!1,...(0,u.computeStyles)(me.getColorTheme(),u.defaultListStyles),...he,horizontalScrolling:ve});this.disposables.add(ge),this.contextKeyService=g(fe,this),this.themeService=me,this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(oe.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(Boolean(oe.selectionNavigation)),this.listHasSelectionOrFocus=e.WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService),this.listDoubleSelection=e.WorkbenchListDoubleSelection.bindTo(this.contextKeyService),this.listMultiSelection=e.WorkbenchListMultiSelection.bindTo(this.contextKeyService),this.horizontalScrolling=oe.horizontalScrolling,this._useAltAsMultipleSelectionModifier=M(be),this.disposables.add(this.contextKeyService),this.disposables.add(pe.register(this)),oe.overrideStyles&&this.updateStyles(oe.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const Se=this.getSelection(),we=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(Se.length>0||we.length>0),this.listMultiSelection.set(Se.length>1),this.listDoubleSelection.set(Se.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const Se=this.getSelection(),we=this.getFocus();this.listHasSelectionOrFocus.set(Se.length>0||we.length>0)})),this.disposables.add(be.onDidChangeConfiguration(Se=>{Se.affectsConfiguration(d)&&(this._useAltAsMultipleSelectionModifier=M(be));let we={};if(Se.affectsConfiguration(b)&&this.horizontalScrolling===void 0){const ye=Boolean(be.getValue(b));we={...we,horizontalScrolling:ye}}if(Se.affectsConfiguration(O)){const ye=Boolean(be.getValue(O));we={...we,smoothScrolling:ye}}if(Se.affectsConfiguration(x)){const ye=be.getValue(x);we={...we,mouseWheelScrollSensitivity:ye}}if(Se.affectsConfiguration(F)){const ye=be.getValue(F);we={...we,fastScrollSensitivity:ye}}Object.keys(we).length>0&&this.updateOptions(we)})),this.navigator=new K(this,{configurationService:be,...oe}),this.disposables.add(this.navigator)}get onDidOpen(){return this.navigator.onDidOpen}updateOptions(ce){super.updateOptions(ce),ce.overrideStyles&&this.updateStyles(ce.overrideStyles),ce.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!ce.multipleSelectionSupport)}updateStyles(ce){this._styler?.dispose(),this._styler=(0,u.attachListStyler)(this,this.themeService,ce)}get useAltAsMultipleSelectionModifier(){return this._useAltAsMultipleSelectionModifier}dispose(){this._styler?.dispose(),super.dispose()}};P=Ee([W(5,S.IContextKeyService),W(6,e.IListService),W(7,a.IThemeService),W(8,c.IConfigurationService),W(9,r.IKeybindingService)],P),e.WorkbenchList=P;let V=class extends f.PagedList{constructor(ce,le,ae,ue,oe,fe,pe,me,be,Ce){const ve=typeof oe.horizontalScrolling!="undefined"?oe.horizontalScrolling:Boolean(be.getValue(b)),[he,ge]=B(oe,be,Ce);super(ce,le,ae,ue,{keyboardSupport:!1,...(0,u.computeStyles)(me.getColorTheme(),u.defaultListStyles),...he,horizontalScrolling:ve});this.disposables=new v.DisposableStore,this.disposables.add(ge),this.contextKeyService=g(fe,this),this.themeService=me,this.horizontalScrolling=oe.horizontalScrolling,this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(oe.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(Boolean(oe.selectionNavigation)),this._useAltAsMultipleSelectionModifier=M(be),this.disposables.add(this.contextKeyService),this.disposables.add(pe.register(this)),oe.overrideStyles&&this.updateStyles(oe.overrideStyles),oe.overrideStyles&&this.disposables.add((0,u.attachListStyler)(this,me,oe.overrideStyles)),this.disposables.add(be.onDidChangeConfiguration(Se=>{Se.affectsConfiguration(d)&&(this._useAltAsMultipleSelectionModifier=M(be));let we={};if(Se.affectsConfiguration(b)&&this.horizontalScrolling===void 0){const ye=Boolean(be.getValue(b));we={...we,horizontalScrolling:ye}}if(Se.affectsConfiguration(O)){const ye=Boolean(be.getValue(O));we={...we,smoothScrolling:ye}}if(Se.affectsConfiguration(x)){const ye=be.getValue(x);we={...we,mouseWheelScrollSensitivity:ye}}if(Se.affectsConfiguration(F)){const ye=be.getValue(F);we={...we,fastScrollSensitivity:ye}}Object.keys(we).length>0&&this.updateOptions(we)})),this.navigator=new K(this,{configurationService:be,...oe}),this.disposables.add(this.navigator)}get onDidOpen(){return this.navigator.onDidOpen}updateOptions(ce){super.updateOptions(ce),ce.overrideStyles&&this.updateStyles(ce.overrideStyles),ce.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!ce.multipleSelectionSupport)}updateStyles(ce){this._styler?.dispose(),this._styler=(0,u.attachListStyler)(this,this.themeService,ce)}get useAltAsMultipleSelectionModifier(){return this._useAltAsMultipleSelectionModifier}dispose(){this._styler?.dispose(),this.disposables.dispose(),super.dispose()}};V=Ee([W(5,S.IContextKeyService),W(6,e.IListService),W(7,a.IThemeService),W(8,c.IConfigurationService),W(9,r.IKeybindingService)],V),e.WorkbenchPagedList=V;let z=class extends A.Table{constructor(ce,le,ae,ue,oe,fe,pe,me,be,Ce,ve){const he=typeof fe.horizontalScrolling!="undefined"?fe.horizontalScrolling:Boolean(Ce.getValue(b)),[ge,de]=B(fe,Ce,ve);super(ce,le,ae,ue,oe,{keyboardSupport:!1,...(0,u.computeStyles)(be.getColorTheme(),u.defaultListStyles),...ge,horizontalScrolling:he});this.disposables.add(de),this.contextKeyService=g(pe,this),this.themeService=be,this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(fe.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(Boolean(fe.selectionNavigation)),this.listHasSelectionOrFocus=e.WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService),this.listDoubleSelection=e.WorkbenchListDoubleSelection.bindTo(this.contextKeyService),this.listMultiSelection=e.WorkbenchListMultiSelection.bindTo(this.contextKeyService),this.horizontalScrolling=fe.horizontalScrolling,this._useAltAsMultipleSelectionModifier=M(Ce),this.disposables.add(this.contextKeyService),this.disposables.add(me.register(this)),fe.overrideStyles&&this.updateStyles(fe.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const we=this.getSelection(),ye=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(we.length>0||ye.length>0),this.listMultiSelection.set(we.length>1),this.listDoubleSelection.set(we.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const we=this.getSelection(),ye=this.getFocus();this.listHasSelectionOrFocus.set(we.length>0||ye.length>0)})),this.disposables.add(Ce.onDidChangeConfiguration(we=>{we.affectsConfiguration(d)&&(this._useAltAsMultipleSelectionModifier=M(Ce));let ye={};if(we.affectsConfiguration(b)&&this.horizontalScrolling===void 0){const ke=Boolean(Ce.getValue(b));ye={...ye,horizontalScrolling:ke}}if(we.affectsConfiguration(O)){const ke=Boolean(Ce.getValue(O));ye={...ye,smoothScrolling:ke}}if(we.affectsConfiguration(x)){const ke=Ce.getValue(x);ye={...ye,mouseWheelScrollSensitivity:ke}}if(we.affectsConfiguration(F)){const ke=Ce.getValue(F);ye={...ye,fastScrollSensitivity:ke}}Object.keys(ye).length>0&&this.updateOptions(ye)})),this.navigator=new G(this,{configurationService:Ce,...fe}),this.disposables.add(this.navigator)}get onDidOpen(){return this.navigator.onDidOpen}updateOptions(ce){super.updateOptions(ce),ce.overrideStyles&&this.updateStyles(ce.overrideStyles),ce.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!ce.multipleSelectionSupport)}updateStyles(ce){this._styler?.dispose(),this._styler=(0,u.attachListStyler)(this,this.themeService,ce)}get useAltAsMultipleSelectionModifier(){return this._useAltAsMultipleSelectionModifier}dispose(){this._styler?.dispose(),this.disposables.dispose(),super.dispose()}};z=Ee([W(6,S.IContextKeyService),W(7,e.IListService),W(8,a.IThemeService),W(9,c.IConfigurationService),W(10,r.IKeybindingService)],z),e.WorkbenchTable=z;function U(ie="keydown",ce,le){const ae=new KeyboardEvent(ie);return ae.preserveFocus=ce,ae.pinned=le,ae.__forceEvent=!0,ae}e.getSelectionKeyboardEvent=U;class H extends v.Disposable{constructor(ce,le){super();this.widget=ce,this._onDidOpen=this._register(new w.Emitter),this.onDidOpen=this._onDidOpen.event,this._register(w.Event.filter(this.widget.onDidChangeSelection,ae=>ae.browserEvent instanceof KeyboardEvent)(ae=>this.onSelectionFromKeyboard(ae))),this._register(this.widget.onPointer(ae=>this.onPointer(ae.element,ae.browserEvent))),this._register(this.widget.onMouseDblClick(ae=>this.onMouseDblClick(ae.element,ae.browserEvent))),typeof le?.openOnSingleClick!="boolean"&&le?.configurationService?(this.openOnSingleClick=le?.configurationService.getValue(m)!=="doubleClick",this._register(le?.configurationService.onDidChangeConfiguration(()=>{this.openOnSingleClick=le?.configurationService.getValue(m)!=="doubleClick"}))):this.openOnSingleClick=le?.openOnSingleClick??!0}onSelectionFromKeyboard(ce){if(ce.elements.length!==1)return;const le=ce.browserEvent,ae=typeof le.preserveFocus=="boolean"?le.preserveFocus:!0,ue=typeof le.pinned=="boolean"?le.pinned:!ae,oe=!1;this._open(this.getSelectedElement(),ae,ue,oe,ce.browserEvent)}onPointer(ce,le){if(!this.openOnSingleClick||le.detail===2)return;const ue=le.button===1,oe=!0,fe=ue,pe=le.ctrlKey||le.metaKey||le.altKey;this._open(ce,oe,fe,pe,le)}onMouseDblClick(ce,le){if(!le)return;const ae=le.target;if(ae.classList.contains("monaco-tl-twistie")||ae.classList.contains("monaco-icon-label")&&ae.classList.contains("folder-icon")&&le.offsetX<16)return;const oe=!1,fe=!0,pe=le.ctrlKey||le.metaKey||le.altKey;this._open(ce,oe,fe,pe,le)}_open(ce,le,ae,ue,oe){!ce||this._onDidOpen.fire({editorOptions:{preserveFocus:le,pinned:ae,revealIfVisible:!0},sideBySide:ue,element:ce,browserEvent:oe})}}class K extends H{constructor(ce,le){super(ce,le);this.widget=ce}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class G extends H{constructor(ce,le){super(ce,le)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class q extends H{constructor(ce,le){super(ce,le)}getSelectedElement(){return this.widget.getSelection()[0]??void 0}}function Z(ie,ce){let le=!1;return ae=>{if(ae.toKeybinding().isModifierKey())return!1;if(le)return le=!1,!1;const ue=ce.softDispatch(ae,ie);return ue&&ue.enterChord?(le=!0,!1):(le=!1,!0)}}let j=class extends I.ObjectTree{constructor(ce,le,ae,ue,oe,fe,pe,me,be,Ce,ve){const{options:he,getAutomaticKeyboardNavigation:ge,disposable:de}=ee(le,oe,fe,be,Ce,ve);super(ce,le,ae,ue,he);this.disposables.add(de),this.internals=new te(this,oe,ge,oe.overrideStyles,fe,pe,me,be,ve),this.disposables.add(this.internals)}get contextKeyService(){return this.internals.contextKeyService}get useAltAsMultipleSelectionModifier(){return this.internals.useAltAsMultipleSelectionModifier}get onDidOpen(){return this.internals.onDidOpen}updateOptions(ce){super.updateOptions(ce),this.internals.updateOptions(ce)}};j=Ee([W(5,S.IContextKeyService),W(6,e.IListService),W(7,a.IThemeService),W(8,c.IConfigurationService),W(9,r.IKeybindingService),W(10,o.IAccessibilityService)],j),e.WorkbenchObjectTree=j;let X=class extends I.CompressibleObjectTree{constructor(ce,le,ae,ue,oe,fe,pe,me,be,Ce,ve){const{options:he,getAutomaticKeyboardNavigation:ge,disposable:de}=ee(le,oe,fe,be,Ce,ve);super(ce,le,ae,ue,he);this.disposables.add(de),this.internals=new te(this,oe,ge,oe.overrideStyles,fe,pe,me,be,ve),this.disposables.add(this.internals)}get contextKeyService(){return this.internals.contextKeyService}get useAltAsMultipleSelectionModifier(){return this.internals.useAltAsMultipleSelectionModifier}get onDidOpen(){return this.internals.onDidOpen}updateOptions(ce={}){super.updateOptions(ce),ce.overrideStyles&&this.internals.updateStyleOverrides(ce.overrideStyles),this.internals.updateOptions(ce)}};X=Ee([W(5,S.IContextKeyService),W(6,e.IListService),W(7,a.IThemeService),W(8,c.IConfigurationService),W(9,r.IKeybindingService),W(10,o.IAccessibilityService)],X),e.WorkbenchCompressibleObjectTree=X;let Y=class extends D.DataTree{constructor(ce,le,ae,ue,oe,fe,pe,me,be,Ce,ve,he){const{options:ge,getAutomaticKeyboardNavigation:de,disposable:Se}=ee(le,fe,pe,Ce,ve,he);super(ce,le,ae,ue,oe,ge);this.disposables.add(Se),this.internals=new te(this,fe,de,fe.overrideStyles,pe,me,be,Ce,he),this.disposables.add(this.internals)}get contextKeyService(){return this.internals.contextKeyService}get useAltAsMultipleSelectionModifier(){return this.internals.useAltAsMultipleSelectionModifier}get onDidOpen(){return this.internals.onDidOpen}updateOptions(ce={}){super.updateOptions(ce),ce.overrideStyles&&this.internals.updateStyleOverrides(ce.overrideStyles),this.internals.updateOptions(ce)}};Y=Ee([W(6,S.IContextKeyService),W(7,e.IListService),W(8,a.IThemeService),W(9,c.IConfigurationService),W(10,r.IKeybindingService),W(11,o.IAccessibilityService)],Y),e.WorkbenchDataTree=Y;let $=class extends k.AsyncDataTree{constructor(ce,le,ae,ue,oe,fe,pe,me,be,Ce,ve,he){const{options:ge,getAutomaticKeyboardNavigation:de,disposable:Se}=ee(le,fe,pe,Ce,ve,he);super(ce,le,ae,ue,oe,ge);this.disposables.add(Se),this.internals=new te(this,fe,de,fe.overrideStyles,pe,me,be,Ce,he),this.disposables.add(this.internals)}get contextKeyService(){return this.internals.contextKeyService}get useAltAsMultipleSelectionModifier(){return this.internals.useAltAsMultipleSelectionModifier}get onDidOpen(){return this.internals.onDidOpen}updateOptions(ce={}){super.updateOptions(ce),ce.overrideStyles&&this.internals.updateStyleOverrides(ce.overrideStyles),this.internals.updateOptions(ce)}};$=Ee([W(6,S.IContextKeyService),W(7,e.IListService),W(8,a.IThemeService),W(9,c.IConfigurationService),W(10,r.IKeybindingService),W(11,o.IAccessibilityService)],$),e.WorkbenchAsyncDataTree=$;let J=class extends k.CompressibleAsyncDataTree{constructor(ce,le,ae,ue,oe,fe,pe,me,be,Ce,ve,he,ge){const{options:de,getAutomaticKeyboardNavigation:Se,disposable:we}=ee(le,pe,me,ve,he,ge);super(ce,le,ae,ue,oe,fe,de);this.disposables.add(we),this.internals=new te(this,pe,Se,pe.overrideStyles,me,be,Ce,ve,ge),this.disposables.add(this.internals)}get contextKeyService(){return this.internals.contextKeyService}get useAltAsMultipleSelectionModifier(){return this.internals.useAltAsMultipleSelectionModifier}get onDidOpen(){return this.internals.onDidOpen}updateOptions(ce){super.updateOptions(ce),this.internals.updateOptions(ce)}};J=Ee([W(7,S.IContextKeyService),W(8,e.IListService),W(9,a.IThemeService),W(10,c.IConfigurationService),W(11,r.IKeybindingService),W(12,o.IAccessibilityService)],J),e.WorkbenchCompressibleAsyncDataTree=J;function ee(ie,ce,le,ae,ue,oe){const fe=()=>{let ge=Boolean(le.getContextKeyValue(e.WorkbenchListAutomaticKeyboardNavigationKey));return ge&&(ge=Boolean(ae.getValue(y))),ge},pe=oe.isScreenReaderOptimized(),me=ce.simpleKeyboardNavigation||pe?"simple":ae.getValue(E),be=ce.horizontalScrolling!==void 0?ce.horizontalScrolling:Boolean(ae.getValue(b)),[Ce,ve]=B(ce,ae,ue),he=ce.additionalScrollHeight;return{getAutomaticKeyboardNavigation:fe,disposable:ve,options:{keyboardSupport:!1,...Ce,indent:typeof ae.getValue(T)=="number"?ae.getValue(T):void 0,renderIndentGuides:ae.getValue(R),smoothScrolling:Boolean(ae.getValue(O)),automaticKeyboardNavigation:fe(),simpleKeyboardNavigation:me==="simple",filterOnType:me==="filter",horizontalScrolling:be,keyboardNavigationEventFilter:Z(ie,ue),additionalScrollHeight:he,hideTwistiesOfChildlessElements:ce.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:ce.expandOnlyOnTwistieClick??ae.getValue(L)==="doubleClick"}}}let te=class{constructor(ce,le,ae,ue,oe,fe,pe,me,be){this.tree=ce,this.themeService=pe,this.disposables=[],this.contextKeyService=g(oe,ce),this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(le.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(Boolean(le.selectionNavigation)),this.hasSelectionOrFocus=e.WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService),this.hasDoubleSelection=e.WorkbenchListDoubleSelection.bindTo(this.contextKeyService),this.hasMultiSelection=e.WorkbenchListMultiSelection.bindTo(this.contextKeyService),this.treeElementCanCollapse=e.WorkbenchTreeElementCanCollapse.bindTo(this.contextKeyService),this.treeElementHasParent=e.WorkbenchTreeElementHasParent.bindTo(this.contextKeyService),this.treeElementCanExpand=e.WorkbenchTreeElementCanExpand.bindTo(this.contextKeyService),this.treeElementHasChild=e.WorkbenchTreeElementHasChild.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=M(me);const ve=new Set;ve.add(e.WorkbenchListAutomaticKeyboardNavigationKey);const he=()=>{const Se=be.isScreenReaderOptimized()?"simple":me.getValue(E);ce.updateOptions({simpleKeyboardNavigation:Se==="simple",filterOnType:Se==="filter"})};this.updateStyleOverrides(ue);const ge=()=>{const de=ce.getFocus()[0];if(!de)return;const Se=ce.getNode(de);this.treeElementCanCollapse.set(Se.collapsible&&!Se.collapsed),this.treeElementHasParent.set(!!ce.getParentElement(de)),this.treeElementCanExpand.set(Se.collapsible&&Se.collapsed),this.treeElementHasChild.set(!!ce.getFirstElementChild(de))};this.disposables.push(this.contextKeyService,fe.register(ce),ce.onDidChangeSelection(()=>{const de=ce.getSelection(),Se=ce.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(de.length>0||Se.length>0),this.hasMultiSelection.set(de.length>1),this.hasDoubleSelection.set(de.length===2)})}),ce.onDidChangeFocus(()=>{const de=ce.getSelection(),Se=ce.getFocus();this.hasSelectionOrFocus.set(de.length>0||Se.length>0),ge()}),ce.onDidChangeCollapseState(ge),ce.onDidChangeModel(ge),me.onDidChangeConfiguration(de=>{let Se={};if(de.affectsConfiguration(d)&&(this._useAltAsMultipleSelectionModifier=M(me)),de.affectsConfiguration(T)){const we=me.getValue(T);Se={...Se,indent:we}}if(de.affectsConfiguration(R)){const we=me.getValue(R);Se={...Se,renderIndentGuides:we}}if(de.affectsConfiguration(O)){const we=Boolean(me.getValue(O));Se={...Se,smoothScrolling:we}}if(de.affectsConfiguration(E)&&he(),de.affectsConfiguration(y)&&(Se={...Se,automaticKeyboardNavigation:ae()}),de.affectsConfiguration(b)&&le.horizontalScrolling===void 0){const we=Boolean(me.getValue(b));Se={...Se,horizontalScrolling:we}}if(de.affectsConfiguration(L)&&le.expandOnlyOnTwistieClick===void 0&&(Se={...Se,expandOnlyOnTwistieClick:me.getValue(L)==="doubleClick"}),de.affectsConfiguration(x)){const we=me.getValue(x);Se={...Se,mouseWheelScrollSensitivity:we}}if(de.affectsConfiguration(F)){const we=me.getValue(F);Se={...Se,fastScrollSensitivity:we}}Object.keys(Se).length>0&&ce.updateOptions(Se)}),this.contextKeyService.onDidChangeContext(de=>{de.affectsSome(ve)&&ce.updateOptions({automaticKeyboardNavigation:ae()})}),be.onDidChangeScreenReaderOptimized(()=>he())),this.navigator=new q(ce,{configurationService:me,...le}),this.disposables.push(this.navigator)}get onDidOpen(){return this.navigator.onDidOpen}get useAltAsMultipleSelectionModifier(){return this._useAltAsMultipleSelectionModifier}updateOptions(ce){ce.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!ce.multipleSelectionSupport)}updateStyleOverrides(ce){(0,v.dispose)(this.styler),this.styler=ce?(0,u.attachListStyler)(this.tree,this.themeService,ce):v.Disposable.None}dispose(){this.disposables=(0,v.dispose)(this.disposables),(0,v.dispose)(this.styler),this.styler=void 0}};te=Ee([W(4,S.IContextKeyService),W(5,e.IListService),W(6,a.IThemeService),W(7,c.IConfigurationService),W(8,o.IAccessibilityService)],te),p.Registry.as(i.Extensions.Configuration).registerConfiguration({id:"workbench",order:7,title:(0,C.localize)(0,null),type:"object",properties:{[d]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[(0,C.localize)(1,null),(0,C.localize)(2,null)],default:"ctrlCmd",description:(0,C.localize)(3,null)},[m]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,C.localize)(4,null)},[b]:{type:"boolean",default:!1,description:(0,C.localize)(5,null)},[T]:{type:"number",default:8,minimum:4,maximum:40,description:(0,C.localize)(6,null)},[R]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:(0,C.localize)(7,null)},[O]:{type:"boolean",default:!1,description:(0,C.localize)(8,null)},[x]:{type:"number",default:1,markdownDescription:(0,C.localize)(9,null)},[F]:{type:"number",default:5,description:(0,C.localize)(10,null)},[E]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[(0,C.localize)(11,null),(0,C.localize)(12,null),(0,C.localize)(13,null)],default:"highlight",description:(0,C.localize)(14,null)},[y]:{type:"boolean",default:!0,markdownDescription:(0,C.localize)(15,null)},[L]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,C.localize)(16,null)}}})}),define(ne[237],re([1,0,10,224,91,129,6,2,41,32,12]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Link=void 0;let C=class extends D.Disposable{constructor(c,i,S={},s){super();this._link=i,this._enabled=!0,this.el=(0,t.append)(c,(0,t.$)("a.monaco-link",{tabIndex:i.tabIndex??0,href:i.href,title:i.title},i.label)),this.el.setAttribute("role","button");const l=this._register(new f.DomEmitter(this.el,"click")),r=this._register(new f.DomEmitter(this.el,"keypress")),p=k.Event.chain(r.event).map(n=>new _.StandardKeyboardEvent(n)).filter(n=>n.keyCode===3).event,u=this._register(new f.DomEmitter(this.el,A.EventType.Tap)).event;this._register(A.Gesture.addTarget(this.el));const a=k.Event.any(l.event,p,u);this._register(a(n=>{!this.enabled||(t.EventHelper.stop(n,!0),S?.opener?S.opener(this._link.href):s.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}get enabled(){return this._enabled}set enabled(c){c?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=c}set link(c){typeof c.label=="string"?this.el.textContent=c.label:((0,t.clearNode)(this.el),this.el.appendChild(c.label)),this.el.href=c.href,typeof c.tabIndex!="undefined"&&(this.el.tabIndex=c.tabIndex),typeof c.title!="undefined"&&(this.el.title=c.title),this._link=c}};C=Ee([W(3,I.IOpenerService)],C),e.Link=C,(0,v.registerThemingParticipant)((o,c)=>{const i=o.getColor(w.textLinkForeground);i&&c.addRule(`.monaco-link { color: ${i}; }`);const S=o.getColor(w.textLinkActiveForeground);S&&c.addRule(`.monaco-link:hover { color: ${S}; }`)})}),define(ne[2054],re([1,0,30,1231,98,7,5,185,71,1975,32,68,12]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputService=void 0;let c=class extends o.Themable{constructor(S,s,l,r,p){super(l);this.instantiationService=S,this.contextKeyService=s,this.accessibilityService=r,this.layoutService=p,this.contexts=new Map}get backButton(){return this.controller.backButton}get onShow(){return this.controller.onShow}get onHide(){return this.controller.onHide}get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(w.QuickAccessController))),this._quickAccess}createController(S=this.layoutService,s){const l={idPrefix:"quickInput_",container:S.container,ignoreFocusOut:()=>!1,isScreenReaderOptimized:()=>this.accessibilityService.isScreenReaderOptimized(),backKeybindingLabel:()=>{},setContextKey:p=>this.setContextKey(p),returnFocus:()=>S.focus(),createList:(p,u,a,n,h)=>this.instantiationService.createInstance(I.WorkbenchList,p,u,a,n,h),styles:this.computeStyles()},r=this._register(new f.QuickInputController({...l,...s}));return r.layout(S.dimension,S.offset?.top??0),this._register(S.onDidLayout(p=>r.layout(p,S.offset?.top??0))),this._register(r.onShow(()=>this.resetContextKeys())),this._register(r.onHide(()=>this.resetContextKeys())),r}setContextKey(S){let s;S&&(s=this.contexts.get(S),s||(s=new A.RawContextKey(S,!1).bindTo(this.contextKeyService),this.contexts.set(S,s))),!(s&&s.get())&&(this.resetContextKeys(),s&&s.set(!0))}resetContextKeys(){this.contexts.forEach(S=>{S.get()&&S.reset()})}pick(S,s={},l=t.CancellationToken.None){return this.controller.pick(S,s,l)}input(S={},s=t.CancellationToken.None){return this.controller.input(S,s)}createQuickPick(){return this.controller.createQuickPick()}createInputBox(){return this.controller.createInputBox()}focus(){this.controller.focus()}toggle(){this.controller.toggle()}navigate(S,s){this.controller.navigate(S,s)}accept(S){return this.controller.accept(S)}back(){return this.controller.back()}cancel(){return this.controller.cancel()}updateStyles(){this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{...(0,C.computeStyles)(this.theme,{quickInputBackground:v.quickInputBackground,quickInputForeground:v.quickInputForeground,quickInputTitleBackground:v.quickInputTitleBackground,contrastBorder:v.contrastBorder,widgetShadow:v.widgetShadow})},inputBox:(0,C.computeStyles)(this.theme,{inputForeground:v.inputForeground,inputBackground:v.inputBackground,inputBorder:v.inputBorder,inputValidationInfoBackground:v.inputValidationInfoBackground,inputValidationInfoForeground:v.inputValidationInfoForeground,inputValidationInfoBorder:v.inputValidationInfoBorder,inputValidationWarningBackground:v.inputValidationWarningBackground,inputValidationWarningForeground:v.inputValidationWarningForeground,inputValidationWarningBorder:v.inputValidationWarningBorder,inputValidationErrorBackground:v.inputValidationErrorBackground,inputValidationErrorForeground:v.inputValidationErrorForeground,inputValidationErrorBorder:v.inputValidationErrorBorder}),countBadge:(0,C.computeStyles)(this.theme,{badgeBackground:v.badgeBackground,badgeForeground:v.badgeForeground,badgeBorder:v.contrastBorder}),button:(0,C.computeStyles)(this.theme,{buttonForeground:v.buttonForeground,buttonBackground:v.buttonBackground,buttonHoverBackground:v.buttonHoverBackground,buttonBorder:v.contrastBorder}),progressBar:(0,C.computeStyles)(this.theme,{progressBarBackground:v.progressBarBackground}),keybindingLabel:(0,C.computeStyles)(this.theme,{keybindingLabelBackground:v.keybindingLabelBackground,keybindingLabelForeground:v.keybindingLabelForeground,keybindingLabelBorder:v.keybindingLabelBorder,keybindingLabelBottomBorder:v.keybindingLabelBottomBorder,keybindingLabelShadow:v.widgetShadow}),list:(0,C.computeStyles)(this.theme,{listBackground:v.quickInputBackground,listInactiveFocusForeground:v.quickInputListFocusForeground,listInactiveSelectionIconForeground:v.quickInputListFocusIconForeground,listInactiveFocusBackground:v.quickInputListFocusBackground,listFocusOutline:v.activeContrastBorder,listInactiveFocusOutline:v.activeContrastBorder,pickerGroupBorder:v.pickerGroupBorder,pickerGroupForeground:v.pickerGroupForeground})}}};c=Ee([W(0,k.IInstantiationService),W(1,A.IContextKeyService),W(2,o.IThemeService),W(3,_.IAccessibilityService),W(4,D.ILayoutService)],c),e.QuickInputService=c}),define(ne[474],re([1,0,33,81,32,12]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SeverityIcon=void 0;var k;(function(D){function I(w){switch(w){case f.default.Ignore:return"severity-ignore "+t.Codicon.info.classNames;case f.default.Info:return t.Codicon.info.classNames;case f.default.Warning:return t.Codicon.warning.classNames;case f.default.Error:return t.Codicon.error.classNames;default:return""}}D.className=I})(k=e.SeverityIcon||(e.SeverityIcon={})),(0,A.registerThemingParticipant)((D,I)=>{const w=D.getColor(_.problemsErrorIconForeground);if(w){const o=t.Codicon.error.cssSelector;I.addRule(` .monaco-editor .zone-widget ${o}, .markers-panel .marker-icon${o}, .text-search-provider-messages .providerMessage ${o}, .extensions-viewlet > .extensions ${o} { color: ${w}; } `)}const v=D.getColor(_.problemsWarningIconForeground);if(v){const o=t.Codicon.warning.cssSelector;I.addRule(` .monaco-editor .zone-widget ${o}, .markers-panel .marker-icon${o}, .extensions-viewlet > .extensions ${o}, .extension-editor ${o}, .text-search-provider-messages .providerMessage ${o}, .preferences-editor ${o} { color: ${v}; } `)}const C=D.getColor(_.problemsInfoIconForeground);if(C){const o=t.Codicon.info.cssSelector;I.addRule(` .monaco-editor .zone-widget ${o}, .markers-panel .marker-icon${o}, .extensions-viewlet > .extensions ${o}, .text-search-provider-messages .providerMessage ${o}, .extension-editor ${o} { color: ${C}; } `)}})}),define(ne[475],re([1,0,33,9,12]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isUriComponents=e.terminalIconsEqual=e.terminalProfileArgsMatch=e.createProfileSchemaEnums=void 0;function A(C,o){const c=C.map(i=>({name:i.profileName,description:k(i)}));return o&&c.push(...o.map(i=>({name:i.title,description:D(i)}))),{values:c.map(i=>i.name),markdownDescriptions:c.map(i=>i.description)}}e.createProfileSchemaEnums=A;function k(C){let o=`$(${_.ThemeIcon.isThemeIcon(C.icon)?C.icon.id:C.icon?C.icon:t.Codicon.terminal.id}) ${C.profileName} - path: ${C.path}`;return C.args&&(typeof C.args=="string"?o+=` - args: "${C.args}"`:o+=` - args: [${C.args.length===0?"":`'${C.args.join("','")}'`}]`),C.overrideName!==void 0&&(o+=` - overrideName: ${C.overrideName}`),C.color&&(o+=` - color: ${C.color}`),C.env&&(o+=` - env: ${JSON.stringify(C.env)}`),o}function D(C){return`$(${_.ThemeIcon.isThemeIcon(C.icon)?C.icon.id:C.icon?C.icon:t.Codicon.terminal.id}) ${C.title} - extensionIdenfifier: ${C.extensionIdentifier}`}function I(C,o){if(!C&&!o)return!0;if(typeof C=="string"&&typeof o=="string")return C===o;if(Array.isArray(C)&&Array.isArray(o)){if(C.length!==o.length)return!1;for(let c=0;c<C.length;c++)if(C[c]!==o[c])return!1;return!0}return!1}e.terminalProfileArgsMatch=I;function w(C,o){if(!C&&!o)return!0;if(!C||!o)return!1;if(_.ThemeIcon.isThemeIcon(C)&&_.ThemeIcon.isThemeIcon(o))return C.id===o.id&&C.color===o.color;if(typeof C=="object"&&C&&"light"in C&&"dark"in C&&typeof o=="object"&&o&&"light"in o&&"dark"in o){const c=C,i=o;if((f.URI.isUri(c.light)||v(c.light))&&(f.URI.isUri(c.dark)||v(c.dark))&&(f.URI.isUri(i.light)||v(i.light))&&(f.URI.isUri(i.dark)||v(i.dark)))return c.light.path===i.light.path&&c.dark.path===i.dark.path}if(f.URI.isUri(C)&&f.URI.isUri(o)||v(C)||v(o)){const c=C,i=o;return c.path===i.path&&c.scheme===i.scheme}return!1}e.terminalIconsEqual=w;function v(C){return C?typeof C.path=="string"&&typeof C.scheme=="string":!1}e.isUriComponents=v}),define(ne[759],re([1,0,33,1339,57,17,475]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerTerminalDefaultProfileConfiguration=e.registerTerminalPlatformConfiguration=void 0;const D={args:{description:(0,f.localize)(0,null),type:"array",items:{type:"string"}},overrideName:{description:(0,f.localize)(1,null),type:"boolean"},icon:{description:(0,f.localize)(2,null),type:"string",enum:Array.from(t.Codicon.getAll(),u=>u.id),markdownEnumDescriptions:Array.from(t.Codicon.getAll(),u=>`$(${u.id})`)},color:{description:(0,f.localize)(3,null),type:["string","null"],enum:["terminal.ansiBlack","terminal.ansiRed","terminal.ansiGreen","terminal.ansiYellow","terminal.ansiBlue","terminal.ansiMagenta","terminal.ansiCyan","terminal.ansiWhite"],default:null},env:{markdownDescription:(0,f.localize)(4,null),type:"object",additionalProperties:{type:["string","null"]},default:{}}},I={type:"object",required:["path"],properties:{path:{description:(0,f.localize)(5,null),type:["string","array"],items:{type:"string"}},...D}},w={type:"object",required:["path"],properties:{path:{description:(0,f.localize)(6,null),type:["string"],items:{type:"string"}},...D}},v=(0,f.localize)(7,null,"`#terminal.integrated.profiles.linux#`","`#terminal.integrated.defaultProfile.linux#`"),C=(0,f.localize)(8,null,"`#terminal.integrated.profiles.osx#`","`#terminal.integrated.defaultProfile.osx#`"),o=(0,f.localize)(9,null,"`#terminal.integrated.profiles.windows#`","`#terminal.integrated.defaultProfile.windows#`"),c=(0,f.localize)(10,null,"`#terminal.integrated.automationProfile.linux#`"),i=(0,f.localize)(11,null,"`#terminal.integrated.automationProfile.osx#`"),S=(0,f.localize)(12,null,"`#terminal.integrated.automationProfile.windows#`"),s={id:"terminal",order:100,title:(0,f.localize)(13,null),type:"object",properties:{["terminal.integrated.automationShell.linux"]:{restricted:!0,markdownDescription:(0,f.localize)(14,null,"`terminal.integrated.shell.linux`","`shellArgs`"),type:["string","null"],default:null,markdownDeprecationMessage:c},["terminal.integrated.automationShell.osx"]:{restricted:!0,markdownDescription:(0,f.localize)(15,null,"`terminal.integrated.shell.osx`","`shellArgs`"),type:["string","null"],default:null,markdownDeprecationMessage:i},["terminal.integrated.automationShell.windows"]:{restricted:!0,markdownDescription:(0,f.localize)(16,null,"`terminal.integrated.shell.windows`","`shellArgs`"),type:["string","null"],default:null,markdownDeprecationMessage:S},["terminal.integrated.automationProfile.linux"]:{restricted:!0,markdownDescription:(0,f.localize)(17,null,"`#terminal.integrated.automationShell.linux#`"),type:["object","null"],default:null,anyOf:[{type:"null"},w],defaultSnippets:[{body:{path:"${1}",icon:"${2}"}}]},["terminal.integrated.automationProfile.osx"]:{restricted:!0,markdownDescription:(0,f.localize)(18,null,"`#terminal.integrated.automationShell.osx#`"),type:["object","null"],default:null,anyOf:[{type:"null"},w],defaultSnippets:[{body:{path:"${1}",icon:"${2}"}}]},["terminal.integrated.automationProfile.windows"]:{restricted:!0,markdownDescription:(0,f.localize)(19,null,"`#terminal.integrated.automationShell.windows#`"),type:["object","null"],default:null,anyOf:[{type:"null"},w],defaultSnippets:[{body:{path:"${1}",icon:"${2}"}}]},["terminal.integrated.shell.linux"]:{restricted:!0,markdownDescription:(0,f.localize)(20,null),type:["string","null"],default:null,markdownDeprecationMessage:v},["terminal.integrated.shell.osx"]:{restricted:!0,markdownDescription:(0,f.localize)(21,null),type:["string","null"],default:null,markdownDeprecationMessage:C},["terminal.integrated.shell.windows"]:{restricted:!0,markdownDescription:(0,f.localize)(22,null),type:["string","null"],default:null,markdownDeprecationMessage:o},["terminal.integrated.shellArgs.linux"]:{restricted:!0,markdownDescription:(0,f.localize)(23,null),type:"array",items:{type:"string"},default:[],markdownDeprecationMessage:v},["terminal.integrated.shellArgs.osx"]:{restricted:!0,markdownDescription:(0,f.localize)(24,null),type:"array",items:{type:"string"},default:["-l"],markdownDeprecationMessage:C},["terminal.integrated.shellArgs.windows"]:{restricted:!0,markdownDescription:(0,f.localize)(25,null),anyOf:[{type:"array",items:{type:"string",markdownDescription:(0,f.localize)(26,null)}},{type:"string",markdownDescription:(0,f.localize)(27,null)}],default:[],markdownDeprecationMessage:o},["terminal.integrated.profiles.windows"]:{restricted:!0,markdownDescription:(0,f.localize)(28,null,"`source`","`path`","`args`","`null`",'`"Ubuntu-20.04 (WSL)": null`'),type:"object",default:{PowerShell:{source:"PowerShell",icon:"terminal-powershell"},"Command Prompt":{path:["${env:windir}\\Sysnative\\cmd.exe","${env:windir}\\System32\\cmd.exe"],args:[],icon:"terminal-cmd"},"Git Bash":{source:"Git Bash"}},additionalProperties:{anyOf:[{type:"object",required:["source"],properties:{source:{description:(0,f.localize)(29,null),enum:["PowerShell","Git Bash"]},...D}},{type:"object",required:["extensionIdentifier","id","title"],properties:{extensionIdentifier:{description:(0,f.localize)(30,null),type:"string"},id:{description:(0,f.localize)(31,null),type:"string"},title:{description:(0,f.localize)(32,null),type:"string"},...D}},{type:"null"},I]}},["terminal.integrated.profiles.osx"]:{restricted:!0,markdownDescription:(0,f.localize)(33,null,"`path`","`args`","`null`",'`"bash": null`'),type:"object",default:{bash:{path:"bash",args:["-l"],icon:"terminal-bash"},zsh:{path:"zsh",args:["-l"]},fish:{path:"fish",args:["-l"]},tmux:{path:"tmux",icon:"terminal-tmux"},pwsh:{path:"pwsh",icon:"terminal-powershell"}},additionalProperties:{anyOf:[{type:"object",required:["extensionIdentifier","id","title"],properties:{extensionIdentifier:{description:(0,f.localize)(34,null),type:"string"},id:{description:(0,f.localize)(35,null),type:"string"},title:{description:(0,f.localize)(36,null),type:"string"},...D}},{type:"null"},I]}},["terminal.integrated.profiles.linux"]:{restricted:!0,markdownDescription:(0,f.localize)(37,null,"`path`","`args`","`null`",'`"bash": null`'),type:"object",default:{bash:{path:"bash",icon:"terminal-bash"},zsh:{path:"zsh"},fish:{path:"fish"},tmux:{path:"tmux",icon:"terminal-tmux"},pwsh:{path:"pwsh",icon:"terminal-powershell"}},additionalProperties:{anyOf:[{type:"object",required:["extensionIdentifier","id","title"],properties:{extensionIdentifier:{description:(0,f.localize)(38,null),type:"string"},id:{description:(0,f.localize)(39,null),type:"string"},title:{description:(0,f.localize)(40,null),type:"string"},...D}},{type:"null"},I]}},["terminal.integrated.useWslProfiles"]:{description:(0,f.localize)(41,null),type:"boolean",default:!0},["terminal.integrated.inheritEnv"]:{scope:1,description:(0,f.localize)(42,null),type:"boolean",default:!0},["terminal.integrated.persistentSessionScrollback"]:{scope:1,markdownDescription:(0,f.localize)(43,null),type:"number",default:100},["terminal.integrated.showLinkHover"]:{scope:1,description:(0,f.localize)(44,null),type:"boolean",default:!0},["terminal.integrated.ignoreProcessNames"]:{description:(0,f.localize)(45,null,"`terminal.integrated.confirmOnKill`"),type:"array",items:{type:"string",uniqueItems:!0},default:["starship","oh-my-posh","bash","zsh"]}}};function l(){A.Registry.as(_.Extensions.Configuration).registerConfiguration(s),p()}e.registerTerminalPlatformConfiguration=l;let r;function p(u,a){const n=A.Registry.as(_.Extensions.Configuration);let h;u&&(h=(0,k.createProfileSchemaEnums)(u?.profiles,a));const g=r;r={id:"terminal",order:100,title:(0,f.localize)(46,null),type:"object",properties:{["terminal.integrated.defaultProfile.linux"]:{restricted:!0,markdownDescription:(0,f.localize)(47,null,"`terminal.integrated.shell.linux`","`terminal.integrated.shellArgs.linux`"),type:["string","null"],default:null,enum:u?.os===3?h?.values:void 0,markdownEnumDescriptions:u?.os===3?h?.markdownDescriptions:void 0},["terminal.integrated.defaultProfile.osx"]:{restricted:!0,markdownDescription:(0,f.localize)(48,null,"`terminal.integrated.shell.osx`","`terminal.integrated.shellArgs.osx`"),type:["string","null"],default:null,enum:u?.os===2?h?.values:void 0,markdownEnumDescriptions:u?.os===2?h?.markdownDescriptions:void 0},["terminal.integrated.defaultProfile.windows"]:{restricted:!0,markdownDescription:(0,f.localize)(49,null,"`terminal.integrated.shell.windows`","`terminal.integrated.shellArgs.windows`"),type:["string","null"],default:null,enum:u?.os===1?h?.values:void 0,markdownEnumDescriptions:u?.os===1?h?.markdownDescriptions:void 0}}},n.updateConfigurations({add:[r],remove:g?[g]:[]})}e.registerTerminalDefaultProfileConfiguration=p}),define(ne[63],re([1,0,11,33,6,1341,146,17,12]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.spinningLoading=e.syncing=e.gotoNextLocation=e.gotoPreviousLocation=e.widgetClose=e.iconsSchemaId=e.getIconRegistry=e.registerIcon=e.IconContribution=e.Extensions=void 0,e.Extensions={IconContribution:"base.contributions.icons"};var w;(function(l){function r(p,u){let a=p.defaults;for(;I.ThemeIcon.isThemeIcon(a);){const n=C.getIcon(a.id);if(!n)return;a=n.defaults}return a}l.getDefinition=r})(w=e.IconContribution||(e.IconContribution={}));class v{constructor(){this._onDidChange=new _.Emitter,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:(0,A.localize)(0,null)},fontCharacter:{type:"string",description:(0,A.localize)(1,null)}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${f.CSSIcon.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(r,p,u,a){const n=this.iconsById[r];if(n){if(u&&!n.description){n.description=u,this.iconSchema.properties[r].markdownDescription=`${u} $(${r})`;const d=this.iconReferenceSchema.enum.indexOf(r);d!==-1&&(this.iconReferenceSchema.enumDescriptions[d]=u),this._onDidChange.fire()}return n}let h={id:r,description:u,defaults:p,deprecationMessage:a};this.iconsById[r]=h;let g={$ref:"#/definitions/icons"};return a&&(g.deprecationMessage=a),u&&(g.markdownDescription=`${u}: $(${r})`),this.iconSchema.properties[r]=g,this.iconReferenceSchema.enum.push(r),this.iconReferenceSchema.enumDescriptions.push(u||""),this._onDidChange.fire(),{id:r}}deregisterIcon(r){delete this.iconsById[r],delete this.iconSchema.properties[r];const p=this.iconReferenceSchema.enum.indexOf(r);p!==-1&&(this.iconReferenceSchema.enum.splice(p,1),this.iconReferenceSchema.enumDescriptions.splice(p,1)),this._onDidChange.fire()}getIcons(){return Object.keys(this.iconsById).map(r=>this.iconsById[r])}getIcon(r){return this.iconsById[r]}getIconSchema(){return this.iconSchema}getIconReferenceSchema(){return this.iconReferenceSchema}registerIconFont(r,p){const u=this.iconFontsById[r];return u||(this.iconFontsById[r]=p,this._onDidChange.fire(),p)}deregisterIconFont(r){delete this.iconFontsById[r]}getIconFont(r){return this.iconFontsById[r]}toString(){const r=(n,h)=>n.id.localeCompare(h.id),p=n=>{for(;I.ThemeIcon.isThemeIcon(n.defaults);)n=this.iconsById[n.defaults.id];return`codicon codicon-${n?n.id:""}`};let u=[];u.push("| preview | identifier | default codicon ID | description"),u.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const a=Object.keys(this.iconsById).map(n=>this.iconsById[n]);for(const n of a.filter(h=>!!h.description).sort(r))u.push(`|<i class="${p(n)}"></i>|${n.id}|${I.ThemeIcon.isThemeIcon(n.defaults)?n.defaults.id:n.id}|${n.description||""}|`);u.push("| preview | identifier "),u.push("| ----------- | --------------------------------- |");for(const n of a.filter(h=>!I.ThemeIcon.isThemeIcon(h.defaults)).sort(r))u.push(`|<i class="${p(n)}"></i>|${n.id}|`);return u.join(` `)}}const C=new v;D.Registry.add(e.Extensions.IconContribution,C);function o(l,r,p,u){return C.registerIcon(l,r,p,u)}e.registerIcon=o;function c(){return C}e.getIconRegistry=c;function i(){for(const l of f.Codicon.getAll())C.registerIcon(l.id,l.definition,l.description)}i(),e.iconsSchemaId="vscode://schemas/icons";let S=D.Registry.as(k.Extensions.JSONContribution);S.registerSchema(e.iconsSchemaId,C.getIconSchema());const s=new t.RunOnceScheduler(()=>S.notifySchemaChanged(e.iconsSchemaId),200);C.onDidChange(()=>{s.isScheduled()||s.schedule()}),e.widgetClose=o("widget-close",f.Codicon.close,(0,A.localize)(2,null)),e.gotoPreviousLocation=o("goto-previous-location",f.Codicon.arrowUp,(0,A.localize)(3,null)),e.gotoNextLocation=o("goto-next-location",f.Codicon.arrowDown,(0,A.localize)(4,null)),e.syncing=I.ThemeIcon.modify(f.Codicon.sync,"spin"),e.spinningLoading=I.ThemeIcon.modify(f.Codicon.loading,"spin")}),define(ne[2055],re([1,0,1237,10,128,78,139,36,2,227,39,72,123,285,49,164,460,259,7,32,12,33,63,42,1020]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffReview=void 0;const g=3;var d;(function(L){L[L.Equal=0]="Equal",L[L.Insert=1]="Insert",L[L.Delete=2]="Delete"})(d||(d={}));class m{constructor(M,N,B,P){this.originalLineStart=M,this.originalLineEnd=N,this.modifiedLineStart=B,this.modifiedLineEnd=P}getType(){return this.originalLineStart===0?1:this.modifiedLineStart===0?2:0}}class b{constructor(M){this.entries=M}}const E=(0,n.registerIcon)("diff-review-insert",a.Codicon.add,t.localize(0,null)),y=(0,n.registerIcon)("diff-review-remove",a.Codicon.remove,t.localize(1,null)),T=(0,n.registerIcon)("diff-review-close",a.Codicon.close,t.localize(2,null));let R=class yi extends I.Disposable{constructor(M,N){super();this._languageService=N,this._width=0,this._diffEditor=M,this._isVisible=!1,this.shadow=(0,_.createFastDomNode)(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=(0,_.createFastDomNode)(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new A.ActionBar(this.actionBarContainer.domNode)),this._actionBar.push(new D.Action("diffreview.close",t.localize(3,null),"close-diff-review "+u.ThemeIcon.asClassName(T),!0,async()=>this.hide()),{label:!1,icon:!0}),this.domNode=(0,_.createFastDomNode)(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=(0,_.createFastDomNode)(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new k.DomScrollableElement(this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(M.onDidUpdateDiff(()=>{!this._isVisible||(this._diffs=this._compute(),this._render())})),this._register(M.getModifiedEditor().onDidChangeCursorPosition(()=>{!this._isVisible||this._render()})),this._register(f.addStandardDisposableListener(this.domNode.domNode,"click",B=>{B.preventDefault();const P=f.findParentWithClass(B.target,"diff-review-row");P&&this._goToRow(P)})),this._register(f.addStandardDisposableListener(this.domNode.domNode,"keydown",B=>{(B.equals(18)||B.equals(2048|18)||B.equals(512|18))&&(B.preventDefault(),this._goToRow(this._getNextRow())),(B.equals(16)||B.equals(2048|16)||B.equals(512|16))&&(B.preventDefault(),this._goToRow(this._getPrevRow())),(B.equals(9)||B.equals(2048|9)||B.equals(512|9)||B.equals(1024|9))&&(B.preventDefault(),this.hide()),(B.equals(10)||B.equals(3))&&(B.preventDefault(),this.accept())})),this._diffs=[],this._currentDiff=null}prev(){let M=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let B=-1;for(let P=0,V=this._diffs.length;P<V;P++)if(this._diffs[P]===this._currentDiff){B=P;break}M=this._diffs.length+B-1}else M=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs.length===0)return;M=M%this._diffs.length;const N=this._diffs[M].entries;this._diffEditor.setPosition(new i.Position(N[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:N[0].modifiedLineStart,endColumn:1073741824,endLineNumber:N[N.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}next(){let M=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let B=-1;for(let P=0,V=this._diffs.length;P<V;P++)if(this._diffs[P]===this._currentDiff){B=P;break}M=B+1}else M=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs.length===0)return;M=M%this._diffs.length;const N=this._diffs[M].entries;this._diffEditor.setPosition(new i.Position(N[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:N[0].modifiedLineStart,endColumn:1073741824,endLineNumber:N[N.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}accept(){let M=-1;const N=this._getCurrentFocusedRow();if(N){const B=parseInt(N.getAttribute("data-line"),10);isNaN(B)||(M=B)}this.hide(),M!==-1&&(this._diffEditor.setPosition(new i.Position(M,1)),this._diffEditor.revealPosition(new i.Position(M,1),1))}hide(){this._isVisible=!1,this._diffEditor.updateOptions({readOnly:!1}),this._diffEditor.focus(),this._diffEditor.doLayout(),this._render()}_getPrevRow(){const M=this._getCurrentFocusedRow();return M?M.previousElementSibling?M.previousElementSibling:M:this._getFirstRow()}_getNextRow(){const M=this._getCurrentFocusedRow();return M?M.nextElementSibling?M.nextElementSibling:M:this._getFirstRow()}_getFirstRow(){return this.domNode.domNode.querySelector(".diff-review-row")}_getCurrentFocusedRow(){const M=document.activeElement;return M&&/diff-review-row/.test(M.className)?M:null}_goToRow(M){const N=this._getCurrentFocusedRow();M.tabIndex=0,M.focus(),N&&N!==M&&(N.tabIndex=-1),this.scrollbar.scanDomNode()}isVisible(){return this._isVisible}layout(M,N,B){this._width=N,this.shadow.setTop(M-6),this.shadow.setWidth(N),this.shadow.setHeight(this._isVisible?6:0),this.domNode.setTop(M),this.domNode.setWidth(N),this.domNode.setHeight(B),this._content.setHeight(B),this._content.setWidth(N),this._isVisible?(this.actionBarContainer.setAttribute("aria-hidden","false"),this.actionBarContainer.setDisplay("block")):(this.actionBarContainer.setAttribute("aria-hidden","true"),this.actionBarContainer.setDisplay("none"))}_compute(){const M=this._diffEditor.getLineChanges();if(!M||M.length===0)return[];const N=this._diffEditor.getOriginalEditor().getModel(),B=this._diffEditor.getModifiedEditor().getModel();return!N||!B?[]:yi._mergeAdjacent(M,N.getLineCount(),B.getLineCount())}static _mergeAdjacent(M,N,B){if(!M||M.length===0)return[];const P=[];let V=0;for(let K=0,G=M.length;K<G;K++){const q=M[K],Z=q.originalStartLineNumber,j=q.originalEndLineNumber,X=q.modifiedStartLineNumber,Y=q.modifiedEndLineNumber,$=[];let J=0;{const ee=j===0?Z:Z-1,te=Y===0?X:X-1;let se=1,ie=1;if(K>0){const ae=M[K-1];ae.originalEndLineNumber===0?se=ae.originalStartLineNumber+1:se=ae.originalEndLineNumber+1,ae.modifiedEndLineNumber===0?ie=ae.modifiedStartLineNumber+1:ie=ae.modifiedEndLineNumber+1}let ce=ee-g+1,le=te-g+1;if(ce<se){const ae=se-ce;ce=ce+ae,le=le+ae}if(le<ie){const ae=ie-le;ce=ce+ae,le=le+ae}$[J++]=new m(ce,ee,le,te)}j!==0&&($[J++]=new m(Z,j,0,0)),Y!==0&&($[J++]=new m(0,0,X,Y));{const ee=j===0?Z+1:j+1,te=Y===0?X+1:Y+1;let se=N,ie=B;if(K+1<G){const ae=M[K+1];ae.originalEndLineNumber===0?se=ae.originalStartLineNumber:se=ae.originalStartLineNumber-1,ae.modifiedEndLineNumber===0?ie=ae.modifiedStartLineNumber:ie=ae.modifiedStartLineNumber-1}let ce=ee+g-1,le=te+g-1;if(ce>se){const ae=se-ce;ce=ce+ae,le=le+ae}if(le>ie){const ae=ie-le;ce=ce+ae,le=le+ae}$[J++]=new m(ee,ce,te,le)}P[V++]=new b($)}let z=P[0].entries;const U=[];let H=0;for(let K=1,G=P.length;K<G;K++){const q=P[K].entries,Z=z[z.length-1],j=q[0];if(Z.getType()===0&&j.getType()===0&&j.originalLineStart<=Z.originalLineEnd){z[z.length-1]=new m(Z.originalLineStart,j.originalLineEnd,Z.modifiedLineStart,j.modifiedLineEnd),z=z.concat(q.slice(1));continue}U[H++]=new b(z),z=q}return U[H++]=new b(z),U}_findDiffIndex(M){const N=M.lineNumber;for(let B=0,P=this._diffs.length;B<P;B++){const V=this._diffs[B].entries,z=V[V.length-1].modifiedLineEnd;if(N<=z)return B}return 0}_render(){const M=this._diffEditor.getOriginalEditor().getOptions(),N=this._diffEditor.getModifiedEditor().getOptions(),B=this._diffEditor.getOriginalEditor().getModel(),P=this._diffEditor.getModifiedEditor().getModel(),V=B.getOptions(),z=P.getOptions();if(!this._isVisible||!B||!P){f.clearNode(this._content.domNode),this._currentDiff=null,this.scrollbar.scanDomNode();return}this._diffEditor.updateOptions({readOnly:!0});const U=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs[U]===this._currentDiff)return;this._currentDiff=this._diffs[U];const H=this._diffs[U].entries,K=document.createElement("div");K.className="diff-review-table",K.setAttribute("role","list"),K.setAttribute("aria-label",'Difference review. Use "Stage | Unstage | Revert Selected Ranges" commands'),(0,w.applyFontInfo)(K,N.get(44));let G=0,q=0,Z=0,j=0;for(let le=0,ae=H.length;le<ae;le++){const ue=H[le],oe=ue.originalLineStart,fe=ue.originalLineEnd,pe=ue.modifiedLineStart,me=ue.modifiedLineEnd;oe!==0&&(G===0||oe<G)&&(G=oe),fe!==0&&(q===0||fe>q)&&(q=fe),pe!==0&&(Z===0||pe<Z)&&(Z=pe),me!==0&&(j===0||me>j)&&(j=me)}const X=document.createElement("div");X.className="diff-review-row";const Y=document.createElement("div");Y.className="diff-review-cell diff-review-summary";const $=q-G+1,J=j-Z+1;Y.appendChild(document.createTextNode(`${U+1}/${this._diffs.length}: @@ -${G},${$} +${Z},${J} @@`)),X.setAttribute("data-line",String(Z));const ee=le=>le===0?t.localize(4,null):le===1?t.localize(5,null):t.localize(6,null,le),te=ee($),se=ee(J);X.setAttribute("aria-label",t.localize(7,null,U+1,this._diffs.length,G,te,Z,se)),X.appendChild(Y),X.setAttribute("role","listitem"),K.appendChild(X);const ie=N.get(59);let ce=Z;for(let le=0,ae=H.length;le<ae;le++){const ue=H[le];yi._renderSection(K,ue,ce,ie,this._width,M,B,V,N,P,z,this._languageService.languageIdCodec),ue.modifiedLineStart!==0&&(ce=ue.modifiedLineEnd)}f.clearNode(this._content.domNode),this._content.domNode.appendChild(K),this.scrollbar.scanDomNode()}static _renderSection(M,N,B,P,V,z,U,H,K,G,q,Z){const j=N.getType();let X="diff-review-row",Y="";const $="diff-review-spacer";let J=null;switch(j){case 1:X="diff-review-row line-insert",Y=" char-insert",J=E;break;case 2:X="diff-review-row line-delete",Y=" char-delete",J=y;break}const ee=N.originalLineStart,te=N.originalLineEnd,se=N.modifiedLineStart,ie=N.modifiedLineEnd,ce=Math.max(ie-se,te-ee),le=z.get(131),ae=le.glyphMarginWidth+le.lineNumbersWidth,ue=K.get(131),oe=10+ue.glyphMarginWidth+ue.lineNumbersWidth;for(let fe=0;fe<=ce;fe++){const pe=ee===0?0:ee+fe,me=se===0?0:se+fe,be=document.createElement("div");be.style.minWidth=V+"px",be.className=X,be.setAttribute("role","listitem"),me!==0&&(B=me),be.setAttribute("data-line",String(B));const Ce=document.createElement("div");Ce.className="diff-review-cell",Ce.style.height=`${P}px`,be.appendChild(Ce);const ve=document.createElement("span");ve.style.width=ae+"px",ve.style.minWidth=ae+"px",ve.className="diff-review-line-number"+Y,pe!==0?ve.appendChild(document.createTextNode(String(pe))):ve.innerText="\xA0",Ce.appendChild(ve);const he=document.createElement("span");he.style.width=oe+"px",he.style.minWidth=oe+"px",he.style.paddingRight="10px",he.className="diff-review-line-number"+Y,me!==0?he.appendChild(document.createTextNode(String(me))):he.innerText="\xA0",Ce.appendChild(he);const ge=document.createElement("span");if(ge.className=$,J){const we=document.createElement("span");we.className=u.ThemeIcon.asClassName(J),we.innerText="\xA0\xA0",ge.appendChild(we)}else ge.innerText="\xA0\xA0";Ce.appendChild(ge);let de;if(me!==0){let we=this._renderLine(G,K,q.tabSize,me,Z);yi._ttPolicy&&(we=yi._ttPolicy.createHTML(we)),Ce.insertAdjacentHTML("beforeend",we),de=G.getLineContent(me)}else{let we=this._renderLine(U,z,H.tabSize,pe,Z);yi._ttPolicy&&(we=yi._ttPolicy.createHTML(we)),Ce.insertAdjacentHTML("beforeend",we),de=U.getLineContent(pe)}de.length===0&&(de=t.localize(8,null));let Se="";switch(j){case 0:pe===me?Se=t.localize(9,null,de,pe):Se=t.localize(10,null,de,pe,me);break;case 1:Se=t.localize(11,null,de,me);break;case 2:Se=t.localize(12,null,de,pe);break}be.setAttribute("aria-label",Se),M.appendChild(be)}}static _renderLine(M,N,B,P,V){const z=M.getLineContent(P),U=N.get(44),H=c.LineTokens.createEmpty(z,V),K=l.ViewLineRenderingData.isBasicASCII(z,M.mightContainNonBasicASCII()),G=l.ViewLineRenderingData.containsRTL(z,K,M.mightContainRTL());return(0,s.renderViewLine2)(new s.RenderLineInput(U.isMonospace&&!N.get(29),U.canUseHalfwidthRightwardsArrow,z,!1,K,G,0,H,[],B,0,U.spaceWidth,U.middotWidth,U.wsmiddotWidth,N.get(105),N.get(88),N.get(83),N.get(45)!==o.EditorFontLigatures.OFF,null)).html}};R._ttPolicy=window.trustedTypes?.createPolicy("diffReview",{createHTML:L=>L}),R=Ee([W(1,h.ILanguageService)],R),e.DiffReview=R,(0,u.registerThemingParticipant)((L,M)=>{const N=L.getColor(S.editorLineNumbers);N&&M.addRule(`.monaco-diff-editor .diff-review-line-number { color: ${N}; }`);const B=L.getColor(p.scrollbarShadow);B&&M.addRule(`.monaco-diff-editor .diff-review-shadow { box-shadow: ${B} 0 -6px 6px -6px inset; }`)});class O extends v.EditorAction{constructor(){super({id:"editor.action.diffReview.next",label:t.localize(13,null),alias:"Go to Next Difference",precondition:r.ContextKeyExpr.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:65,weight:100}})}run(M,N){const B=F(M);B&&B.diffReviewNext()}}class x extends v.EditorAction{constructor(){super({id:"editor.action.diffReview.prev",label:t.localize(14,null),alias:"Go to Previous Difference",precondition:r.ContextKeyExpr.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:1024|65,weight:100}})}run(M,N){const B=F(M);B&&B.diffReviewPrev()}}function F(L){const M=L.get(C.ICodeEditorService),N=M.listDiffEditors(),B=M.getActiveCodeEditor();if(!B)return null;for(let P=0,V=N.length;P<V;P++){const z=N[P];if(z.getModifiedEditor().getId()===B.getId()||z.getOriginalEditor().getId()===B.getId())return z}return null}(0,v.registerEditorAction)(O),(0,v.registerEditorAction)(x)}),define(ne[2056],re([1,0,10,112,139,33,6,2,29,13,186,42,1941,548,1296,7,41,32,63,127,12,62,1036]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.editorHoverWidgetHighlightForeground=e.ParameterHintsWidget=void 0;const n=t.$,h=(0,r.registerIcon)("parameter-hints-next",A.Codicon.chevronDown,i.localize(0,null)),g=(0,r.registerIcon)("parameter-hints-previous",A.Codicon.chevronUp,i.localize(1,null));let d=class Qs extends D.Disposable{constructor(b,E,y,T,R){super();this.editor=b,this.renderDisposeables=this._register(new D.DisposableStore),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new v.MarkdownRenderer({editor:b},T,y)),this.model=this._register(new o.ParameterHintsModel(b,R.signatureHelpProvider)),this.keyVisible=c.Context.Visible.bindTo(E),this.keyMultipleSignatures=c.Context.MultipleSignatures.bindTo(E),this._register(this.model.onChangedHints(O=>{O?(this.show(),this.render(O)):this.hide()}))}createParameterHintDOMNodes(){const b=n(".editor-widget.parameter-hints-widget"),E=t.append(b,n(".phwrapper"));E.tabIndex=-1;const y=t.append(E,n(".controls")),T=t.append(y,n(".button"+u.ThemeIcon.asCSSSelector(g))),R=t.append(y,n(".overloads")),O=t.append(y,n(".button"+u.ThemeIcon.asCSSSelector(h)));this._register(t.addDisposableListener(T,"click",B=>{t.EventHelper.stop(B),this.previous()})),this._register(t.addDisposableListener(O,"click",B=>{t.EventHelper.stop(B),this.next()}));const x=n(".body"),F=new _.DomScrollableElement(x,{});this._register(F),E.appendChild(F.getDomNode());const L=t.append(x,n(".signature")),M=t.append(x,n(".docs"));b.style.userSelect="text",this.domNodes={element:b,signature:L,overloads:R,docs:M,scrollbar:F},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(B=>{this.visible&&this.editor.layoutContentWidget(this)}));const N=()=>{if(!this.domNodes)return;const B=this.editor.getOption(44);this.domNodes.element.style.fontSize=`${B.fontSize}px`,this.domNodes.element.style.lineHeight=`${B.lineHeight/B.fontSize}`};N(),this._register(k.Event.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(B=>B.hasChanged(44)).on(N,null)),this._register(this.editor.onDidLayoutChange(B=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{this.domNodes&&this.domNodes.element.classList.add("visible")},100),this.editor.layoutContentWidget(this))}hide(){this.renderDisposeables.clear(),!!this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,this.domNodes&&this.domNodes.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(b){if(this.renderDisposeables.clear(),!this.domNodes)return;const E=b.signatures.length>1;this.domNodes.element.classList.toggle("multiple",E),this.keyMultipleSignatures.set(E),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const y=b.signatures[b.activeSignature];if(!y)return;const T=t.append(this.domNodes.signature,n(".code")),R=this.editor.getOption(44);T.style.fontSize=`${R.fontSize}px`,T.style.fontFamily=R.fontFamily;const O=y.parameters.length>0,x=y.activeParameter??b.activeParameter;if(O)this.renderParameters(T,y,x);else{const M=t.append(T,n("span"));M.textContent=y.label}const F=y.parameters[x];if(F?.documentation){const M=n("span.documentation");if(typeof F.documentation=="string")M.textContent=F.documentation;else{const N=this.renderMarkdownDocs(F.documentation);M.appendChild(N.element)}t.append(this.domNodes.docs,n("p",{},M))}if(y.documentation!==void 0)if(typeof y.documentation=="string")t.append(this.domNodes.docs,n("p",{},y.documentation));else{const M=this.renderMarkdownDocs(y.documentation);t.append(this.domNodes.docs,M.element)}const L=this.hasDocs(y,F);if(this.domNodes.signature.classList.toggle("has-docs",L),this.domNodes.docs.classList.toggle("empty",!L),this.domNodes.overloads.textContent=String(b.activeSignature+1).padStart(b.signatures.length.toString().length,"0")+"/"+b.signatures.length,F){let M="";const N=y.parameters[x];Array.isArray(N.label)?M=y.label.substring(N.label[0],N.label[1]):M=N.label,N.documentation&&(M+=typeof N.documentation=="string"?`, ${N.documentation}`:`, ${N.documentation.value}`),y.documentation&&(M+=typeof y.documentation=="string"?`, ${y.documentation}`:`, ${y.documentation.value}`),this.announcedLabel!==M&&(f.alert(i.localize(2,null,M)),this.announcedLabel=M)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(b){const E=this.renderDisposeables.add(this.markdownRenderer.render(b,{asyncRenderCallback:()=>{this.domNodes?.scrollbar.scanDomNode()}}));return E.element.classList.add("markdown-docs"),E}hasDocs(b,E){return!!(E&&typeof E.documentation=="string"&&(0,w.assertIsDefined)(E.documentation).length>0||E&&typeof E.documentation=="object"&&(0,w.assertIsDefined)(E.documentation).value.length>0||b.documentation&&typeof b.documentation=="string"&&(0,w.assertIsDefined)(b.documentation).length>0||b.documentation&&typeof b.documentation=="object"&&(0,w.assertIsDefined)(b.documentation.value).length>0)}renderParameters(b,E,y){const[T,R]=this.getParameterLabelOffsets(E,y),O=document.createElement("span");O.textContent=E.label.substring(0,T);const x=document.createElement("span");x.textContent=E.label.substring(T,R),x.className="parameter active";const F=document.createElement("span");F.textContent=E.label.substring(R),t.append(b,O,x,F)}getParameterLabelOffsets(b,E){const y=b.parameters[E];if(y){if(Array.isArray(y.label))return y.label;if(y.label.length){const T=new RegExp(`(\\W|^)${(0,I.escapeRegExpCharacters)(y.label)}(?=\\W|$)`,"g");T.test(b.label);const R=T.lastIndex-y.label.length;return R>=0?[R,T.lastIndex]:[0,0]}else return[0,0]}else return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}cancel(){this.model.cancel()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return Qs.ID}trigger(b){this.model.trigger(b,0)}updateMaxHeight(){if(!this.domNodes)return;const E=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=E;const y=this.domNodes.element.getElementsByClassName("phwrapper");y.length&&(y[0].style.maxHeight=E)}};d.ID="editor.widget.parameterHintsWidget",d=Ee([W(1,S.IContextKeyService),W(2,s.IOpenerService),W(3,C.ILanguageService),W(4,a.ILanguageFeaturesService)],d),e.ParameterHintsWidget=d,e.editorHoverWidgetHighlightForeground=(0,l.registerColor)("editorHoverWidget.highlightForeground",{dark:l.listHighlightForeground,light:l.listHighlightForeground,hcDark:l.listHighlightForeground,hcLight:l.listHighlightForeground},i.localize(3,null)),(0,u.registerThemingParticipant)((m,b)=>{const E=m.getColor(l.editorHoverBorder);if(E){const L=(0,p.isHighContrast)(m.type)?2:1;b.addRule(`.monaco-editor .parameter-hints-widget { border: ${L}px solid ${E}; }`),b.addRule(`.monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid ${E.transparent(.5)}; }`),b.addRule(`.monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid ${E.transparent(.5)}; }`)}const y=m.getColor(l.editorHoverBackground);y&&b.addRule(`.monaco-editor .parameter-hints-widget { background-color: ${y}; }`);const T=m.getColor(l.textLinkForeground);T&&b.addRule(`.monaco-editor .parameter-hints-widget a { color: ${T}; }`);const R=m.getColor(l.textLinkActiveForeground);R&&b.addRule(`.monaco-editor .parameter-hints-widget a:hover { color: ${R}; }`);const O=m.getColor(l.editorHoverForeground);O&&b.addRule(`.monaco-editor .parameter-hints-widget { color: ${O}; }`);const x=m.getColor(l.textCodeBlockBackground);x&&b.addRule(`.monaco-editor .parameter-hints-widget code { background-color: ${x}; }`);const F=m.getColor(e.editorHoverWidgetHighlightForeground);F&&b.addRule(`.monaco-editor .parameter-hints-widget .parameter.active { color: ${F}}`)})}),define(ne[2057],re([1,0,2,39,58,86,548,1295,7,5,2056]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TriggerParameterHintsAction=void 0;let C=class Js extends t.Disposable{constructor(s,l){super();this.editor=s,this.widget=this._register(l.createInstance(v.ParameterHintsWidget,this.editor))}static get(s){return s.getContribution(Js.ID)}cancel(){this.widget.cancel()}previous(){this.widget.previous()}next(){this.widget.next()}trigger(s){this.widget.trigger(s)}};C.ID="editor.controller.parameterHints",C=Ee([W(1,w.IInstantiationService)],C);class o extends f.EditorAction{constructor(){super({id:"editor.action.triggerParameterHints",label:D.localize(0,null),alias:"Trigger Parameter Hints",precondition:_.EditorContextKeys.hasSignatureHelpProvider,kbOpts:{kbExpr:_.EditorContextKeys.editorTextFocus,primary:2048|1024|10,weight:100}})}run(s,l){const r=C.get(l);r&&r.trigger({triggerKind:A.SignatureHelpTriggerKind.Invoke})}}e.TriggerParameterHintsAction=o,(0,f.registerEditorContribution)(C.ID,C),(0,f.registerEditorAction)(o);const c=100+75,i=f.EditorCommand.bindToContribution(C.get);(0,f.registerEditorCommand)(new i({id:"closeParameterHints",precondition:k.Context.Visible,handler:S=>S.cancel(),kbOpts:{weight:c,kbExpr:_.EditorContextKeys.focus,primary:9,secondary:[1024|9]}})),(0,f.registerEditorCommand)(new i({id:"showPrevParameterHint",precondition:I.ContextKeyExpr.and(k.Context.Visible,k.Context.MultipleSignatures),handler:S=>S.previous(),kbOpts:{weight:c,kbExpr:_.EditorContextKeys.focus,primary:16,secondary:[512|16],mac:{primary:16,secondary:[512|16,256|46]}}})),(0,f.registerEditorCommand)(new i({id:"showNextParameterHint",precondition:I.ContextKeyExpr.and(k.Context.Visible,k.Context.MultipleSignatures),handler:S=>S.next(),kbOpts:{weight:c,kbExpr:_.EditorContextKeys.focus,primary:18,secondary:[512|18],mac:{primary:18,secondary:[512|18,256|44]}}}))}),define(ne[2058],re([1,0,77,10,234,15,33,6,102,2,9,123,86,198,52,42,1309,23,63,12,740]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u){"use strict";var a;Object.defineProperty(e,"__esModule",{value:!0}),e.ItemRenderer=e.suggestMoreInfoIcon=e.getAriaId=void 0;function n(m){return`suggest-aria-id:${m}`}e.getAriaId=n,e.suggestMoreInfoIcon=(0,r.registerIcon)("suggest-more-info",k.Codicon.chevronRight,s.localize(0,null));const h=new(a=class Mn{extract(b,E){if(b.textLabel.match(Mn._regexStrict))return E[0]=b.textLabel,!0;if(b.completion.detail&&b.completion.detail.match(Mn._regexStrict))return E[0]=b.completion.detail,!0;if(typeof b.completion.documentation=="string"){const y=Mn._regexRelaxed.exec(b.completion.documentation);if(y&&(y.index===0||y.index+y[0].length===b.completion.documentation.length))return E[0]=y[0],!0}return!1}},a._regexRelaxed=/(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/,a._regexStrict=new RegExp(`^${a._regexRelaxed.source}$`,"i"),a);let g=class{constructor(b,E,y,T){this._editor=b,this._modelService=E,this._languageService=y,this._themeService=T,this._onDidToggleDetails=new D.Emitter,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(b){const E=Object.create(null);E.disposables=new w.DisposableStore,E.root=b,E.root.classList.add("show-file-icons"),E.icon=(0,f.append)(b,(0,f.$)(".icon")),E.colorspan=(0,f.append)(E.icon,(0,f.$)("span.colorspan"));const y=(0,f.append)(b,(0,f.$)(".contents")),T=(0,f.append)(y,(0,f.$)(".main"));E.iconContainer=(0,f.append)(T,(0,f.$)(".icon-label.codicon")),E.left=(0,f.append)(T,(0,f.$)("span.left")),E.right=(0,f.append)(T,(0,f.$)("span.right")),E.iconLabel=new _.IconLabel(E.left,{supportHighlights:!0,supportIcons:!0}),E.disposables.add(E.iconLabel),E.parametersLabel=(0,f.append)(E.left,(0,f.$)("span.signature-label")),E.qualifierLabel=(0,f.append)(E.left,(0,f.$)("span.qualifier-label")),E.detailsLabel=(0,f.append)(E.right,(0,f.$)("span.details-label")),E.readMore=(0,f.append)(E.right,(0,f.$)("span.readMore"+p.ThemeIcon.asCSSSelector(e.suggestMoreInfoIcon))),E.readMore.title=s.localize(1,null);const R=()=>{const O=this._editor.getOptions(),x=O.get(44),F=x.getMassagedFontFamily(t.isSafari?C.EDITOR_FONT_DEFAULTS.fontFamily:null),L=x.fontFeatureSettings,M=O.get(107)||x.fontSize,N=O.get(108)||x.lineHeight,B=x.fontWeight,P=`${M}px`,V=`${N}px`;E.root.style.fontSize=P,E.root.style.fontWeight=B,T.style.fontFamily=F,T.style.fontFeatureSettings=L,T.style.lineHeight=V,E.icon.style.height=V,E.icon.style.width=V,E.readMore.style.height=V,E.readMore.style.width=V};return R(),E.disposables.add(this._editor.onDidChangeConfiguration(O=>{(O.hasChanged(44)||O.hasChanged(107)||O.hasChanged(108))&&R()})),E}renderElement(b,E,y){const{completion:T}=b;y.root.id=n(E),y.colorspan.style.backgroundColor="";const R={labelEscapeNewLines:!0,matches:(0,I.createMatches)(b.score)};let O=[];if(T.kind===19&&h.extract(b,O))y.icon.className="icon customcolor",y.iconContainer.className="icon hide",y.colorspan.style.backgroundColor=O[0];else if(T.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){y.icon.className="icon hide",y.iconContainer.className="icon hide";const x=(0,c.getIconClasses)(this._modelService,this._languageService,v.URI.from({scheme:"fake",path:b.textLabel}),l.FileKind.FILE),F=(0,c.getIconClasses)(this._modelService,this._languageService,v.URI.from({scheme:"fake",path:T.detail}),l.FileKind.FILE);R.extraClasses=x.length>F.length?x:F}else T.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(y.icon.className="icon hide",y.iconContainer.className="icon hide",R.extraClasses=(0,A.flatten)([(0,c.getIconClasses)(this._modelService,this._languageService,v.URI.from({scheme:"fake",path:b.textLabel}),l.FileKind.FOLDER),(0,c.getIconClasses)(this._modelService,this._languageService,v.URI.from({scheme:"fake",path:T.detail}),l.FileKind.FOLDER)])):(y.icon.className="icon hide",y.iconContainer.className="",y.iconContainer.classList.add("suggest-icon",...k.CSSIcon.asClassNameArray(o.CompletionItemKinds.toIcon(T.kind))));T.tags&&T.tags.indexOf(1)>=0&&(R.extraClasses=(R.extraClasses||[]).concat(["deprecated"]),R.matches=[]),y.iconLabel.setLabel(b.textLabel,void 0,R),typeof T.label=="string"?(y.parametersLabel.textContent="",y.detailsLabel.textContent=d(T.detail||""),y.root.classList.add("string-label")):(y.parametersLabel.textContent=d(T.label.detail||""),y.detailsLabel.textContent=d(T.label.description||""),y.root.classList.remove("string-label")),this._editor.getOption(106).showInlineDetails?(0,f.show)(y.detailsLabel):(0,f.hide)(y.detailsLabel),(0,u.canExpandCompletionItem)(b)?(y.right.classList.add("can-expand-details"),(0,f.show)(y.readMore),y.readMore.onmousedown=x=>{x.stopPropagation(),x.preventDefault()},y.readMore.onclick=x=>{x.stopPropagation(),x.preventDefault(),this._onDidToggleDetails.fire()}):(y.right.classList.remove("can-expand-details"),(0,f.hide)(y.readMore),y.readMore.onmousedown=null,y.readMore.onclick=null)}disposeTemplate(b){b.disposables.dispose()}};g=Ee([W(1,i.IModelService),W(2,S.ILanguageService),W(3,p.IThemeService)],g),e.ItemRenderer=g;function d(m){return m.replace(/\r\n|\r|\n/g,"")}}),define(ne[2059],re([1,0,10,78,36,2,186,5,237,63,12,1041]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BannerController=void 0;const C=26;let o=class extends A.Disposable{constructor(S,s){super();this._editor=S,this.instantiationService=s,this.banner=this._register(this.instantiationService.createInstance(c))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(S){this.banner.show({...S,onClose:()=>{this.hide(),S.onClose&&S.onClose()}}),this._editor.setBanner(this.banner.element,C)}};o=Ee([W(1,D.IInstantiationService)],o),e.BannerController=o;let c=class extends A.Disposable{constructor(S){super();this.instantiationService=S,this.markdownRenderer=this.instantiationService.createInstance(k.MarkdownRenderer,{}),this.element=(0,t.$)("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(S){if(S.ariaLabel)return S.ariaLabel;if(typeof S.message=="string")return S.message}getBannerMessage(S){if(typeof S=="string"){const s=(0,t.$)("span");return s.innerText=S,s}return this.markdownRenderer.render(S).element}clear(){(0,t.clearNode)(this.element)}show(S){(0,t.clearNode)(this.element);const s=this.getAriaLabel(S);s&&this.element.setAttribute("aria-label",s);const l=(0,t.append)(this.element,(0,t.$)("div.icon-container"));l.setAttribute("aria-hidden","true"),S.icon&&l.appendChild((0,t.$)(`div${v.ThemeIcon.asCSSSelector(S.icon)}`));const r=(0,t.append)(this.element,(0,t.$)("div.message-container"));if(r.setAttribute("aria-hidden","true"),r.appendChild(this.getBannerMessage(S.message)),this.messageActionsContainer=(0,t.append)(this.element,(0,t.$)("div.message-actions-container")),S.actions)for(const u of S.actions)this._register(this.instantiationService.createInstance(I.Link,this.messageActionsContainer,{...u,tabIndex:-1},{}));const p=(0,t.append)(this.element,(0,t.$)("div.action-container"));this.actionBar=this._register(new f.ActionBar(p)),this.actionBar.push(this._register(new _.Action("banner.close","Close Banner",v.ThemeIcon.asClassName(w.widgetClose),!0,()=>{typeof S.onClose=="function"&&S.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};c=Ee([W(0,D.IInstantiationService)],c)}),define(ne[2060],re([1,0,10,6,63,12]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnthemedProductIconTheme=e.getIconsStyleSheet=void 0;function k(I){const w=new f.Emitter,v=(0,_.getIconRegistry)();return v.onDidChange(()=>w.fire()),I?.onDidProductIconThemeChange(()=>w.fire()),{onDidChange:w.event,getCSS(){const C=I?I.getProductIconTheme():new D,o={},c=S=>{const s=C.getIcon(S);if(!s)return;const l=s.font;return l?(o[l.id]=l.definition,`.codicon-${S.id}:before { content: '${s.fontCharacter}'; font-family: ${(0,t.asCSSPropertyValue)(l.id)}; }`):`.codicon-${S.id}:before { content: '${s.fontCharacter}'; }`},i=[];for(let S of v.getIcons()){const s=c(S);s&&i.push(s)}for(let S in o){const s=o[S],l=s.weight?`font-weight: ${s.weight};`:"",r=s.style?`font-style: ${s.style};`:"",p=s.src.map(u=>`${(0,t.asCSSUrl)(u.location)} format('${u.format}')`).join(", ");i.push(`@font-face { src: ${p}; font-family: ${(0,t.asCSSPropertyValue)(S)};${l}${r} font-display: block; }`)}return i.join(` `)}}}e.getIconsStyleSheet=k;class D{getIcon(w){const v=(0,_.getIconRegistry)();let C=w.defaults;for(;A.ThemeIcon.isThemeIcon(C);){const o=v.getIcon(C.id);if(!o)return;C=o.defaults}return C}}e.UnthemedProductIconTheme=D}),define(ne[404],re([1,0,11,66,6,1342,146,17]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.tokenStylingSchemaId=e.getTokenClassificationRegistry=e.parseClassifierString=e.Extensions=e.SemanticTokenRule=e.TokenStyle=e.fontStylePattern=e.selectorPattern=e.typeAndModifierIdPattern=e.idPattern=e.CLASSIFIER_MODIFIER_SEPARATOR=e.TOKEN_CLASSIFIER_LANGUAGE_SEPARATOR=e.TOKEN_TYPE_WILDCARD=void 0,e.TOKEN_TYPE_WILDCARD="*",e.TOKEN_CLASSIFIER_LANGUAGE_SEPARATOR=":",e.CLASSIFIER_MODIFIER_SEPARATOR=".",e.idPattern="\\w+[-_\\w+]*",e.typeAndModifierIdPattern=`^${e.idPattern}$`,e.selectorPattern=`^(${e.idPattern}|\\*)(\\${e.CLASSIFIER_MODIFIER_SEPARATOR}${e.idPattern})*(${e.TOKEN_CLASSIFIER_LANGUAGE_SEPARATOR}${e.idPattern})?$`,e.fontStylePattern="^(\\s*(italic|bold|underline|strikethrough))*\\s*$";class I{constructor(a,n,h,g,d){this.foreground=a,this.bold=n,this.underline=h,this.strikethrough=g,this.italic=d}}e.TokenStyle=I,function(u){function a(b){return{_foreground:b.foreground===void 0?null:f.Color.Format.CSS.formatHexA(b.foreground,!0),_bold:b.bold===void 0?null:b.bold,_underline:b.underline===void 0?null:b.underline,_italic:b.italic===void 0?null:b.italic,_strikethrough:b.strikethrough===void 0?null:b.strikethrough}}u.toJSONObject=a;function n(b){if(b){const E=T=>typeof T=="boolean"?T:void 0,y=T=>typeof T=="string"?f.Color.fromHex(T):void 0;return new u(y(b._foreground),E(b._bold),E(b._underline),E(b._strikethrough),E(b._italic))}}u.fromJSONObject=n;function h(b,E){return b===E?!0:b!==void 0&&E!==void 0&&(b.foreground instanceof f.Color?b.foreground.equals(E.foreground):E.foreground===void 0)&&b.bold===E.bold&&b.underline===E.underline&&b.strikethrough===E.strikethrough&&b.italic===E.italic}u.equals=h;function g(b){return b instanceof u}u.is=g;function d(b){return new u(b.foreground,b.bold,b.underline,b.strikethrough,b.italic)}u.fromData=d;function m(b,E,y,T,R,O){let x;if(b!==void 0&&(x=f.Color.fromHex(b)),E!==void 0){y=O=T=R=!1;const F=/italic|bold|underline|strikethrough/g;let L;for(;L=F.exec(E);)switch(L[0]){case"bold":y=!0;break;case"italic":O=!0;break;case"underline":T=!0;break;case"strikethrough":R=!0;break}}return new u(x,y,T,R,O)}u.fromSettings=m}(I=e.TokenStyle||(e.TokenStyle={}));var w;(function(u){function a(d,m){if(m&&typeof m._selector=="string"&&m._style){const b=I.fromJSONObject(m._style);if(b)try{return{selector:d.parseTokenSelector(m._selector),style:b}}catch{}}}u.fromJSONObject=a;function n(d){return{_selector:d.selector.id,_style:I.toJSONObject(d.style)}}u.toJSONObject=n;function h(d,m){return d===m?!0:d!==void 0&&m!==void 0&&d.selector&&m.selector&&d.selector.id===m.selector.id&&I.equals(d.style,m.style)}u.equals=h;function g(d){return d&&d.selector&&typeof d.selector.id=="string"&&I.is(d.style)}u.is=g})(w=e.SemanticTokenRule||(e.SemanticTokenRule={})),e.Extensions={TokenClassificationContribution:"base.contributions.tokenClassification"};class v{constructor(){this._onDidChangeSchema=new _.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.currentTypeNumber=0,this.currentModifierBit=1,this.tokenStylingDefaultRules=[],this.tokenStylingSchema={type:"object",properties:{},patternProperties:{[e.selectorPattern]:l()},additionalProperties:!1,definitions:{style:{type:"object",description:A.localize(0,null),properties:{foreground:{type:"string",description:A.localize(1,null),format:"color-hex",default:"#ff0000"},background:{type:"string",deprecationMessage:A.localize(2,null)},fontStyle:{type:"string",description:A.localize(3,null),pattern:e.fontStylePattern,patternErrorMessage:A.localize(4,null),defaultSnippets:[{label:A.localize(5,null),bodyText:'""'},{body:"italic"},{body:"bold"},{body:"underline"},{body:"strikethrough"},{body:"italic bold"},{body:"italic underline"},{body:"italic strikethrough"},{body:"bold underline"},{body:"bold strikethrough"},{body:"underline strikethrough"},{body:"italic bold underline"},{body:"italic bold strikethrough"},{body:"italic underline strikethrough"},{body:"bold underline strikethrough"},{body:"italic bold underline strikethrough"}]},bold:{type:"boolean",description:A.localize(6,null)},italic:{type:"boolean",description:A.localize(7,null)},underline:{type:"boolean",description:A.localize(8,null)},strikethrough:{type:"boolean",description:A.localize(9,null)}},defaultSnippets:[{body:{foreground:"${1:#FF0000}",fontStyle:"${2:bold}"}}]}}},this.tokenTypeById=Object.create(null),this.tokenModifierById=Object.create(null),this.typeHierarchy=Object.create(null)}registerTokenType(a,n,h,g){if(!a.match(e.typeAndModifierIdPattern))throw new Error("Invalid token type id.");if(h&&!h.match(e.typeAndModifierIdPattern))throw new Error("Invalid token super type id.");let m={num:this.currentTypeNumber++,id:a,superType:h,description:n,deprecationMessage:g};this.tokenTypeById[a]=m;const b=l(n,g);this.tokenStylingSchema.properties[a]=b,this.typeHierarchy=Object.create(null)}registerTokenModifier(a,n,h){if(!a.match(e.typeAndModifierIdPattern))throw new Error("Invalid token modifier id.");const g=this.currentModifierBit;this.currentModifierBit=this.currentModifierBit*2;let d={num:g,id:a,description:n,deprecationMessage:h};this.tokenModifierById[a]=d,this.tokenStylingSchema.properties[`*.${a}`]=l(n,h)}parseTokenSelector(a,n){const h=c(a,n);return h.type?{match:(g,d,m)=>{let b=0;if(h.language!==void 0){if(h.language!==m)return-1;b+=10}if(h.type!==e.TOKEN_TYPE_WILDCARD){const y=this.getTypeHierarchy(g).indexOf(h.type);if(y===-1)return-1;b+=100-y}for(const E of h.modifiers)if(d.indexOf(E)===-1)return-1;return b+h.modifiers.length*100},id:`${[h.type,...h.modifiers.sort()].join(".")}${h.language!==void 0?":"+h.language:""}`}:{match:()=>-1,id:"$invalid"}}registerTokenStyleDefault(a,n){this.tokenStylingDefaultRules.push({selector:a,defaults:n})}deregisterTokenStyleDefault(a){const n=a.id;this.tokenStylingDefaultRules=this.tokenStylingDefaultRules.filter(h=>h.selector.id!==n)}deregisterTokenType(a){delete this.tokenTypeById[a],delete this.tokenStylingSchema.properties[a],this.typeHierarchy=Object.create(null)}deregisterTokenModifier(a){delete this.tokenModifierById[a],delete this.tokenStylingSchema.properties[`*.${a}`]}getTokenTypes(){return Object.keys(this.tokenTypeById).map(a=>this.tokenTypeById[a])}getTokenModifiers(){return Object.keys(this.tokenModifierById).map(a=>this.tokenModifierById[a])}getTokenStylingSchema(){return this.tokenStylingSchema}getTokenStylingDefaultRules(){return this.tokenStylingDefaultRules}getTypeHierarchy(a){let n=this.typeHierarchy[a];if(!n){this.typeHierarchy[a]=n=[a];let h=this.tokenTypeById[a];for(;h&&h.superType;)n.push(h.superType),h=this.tokenTypeById[h.superType]}return n}toString(){let a=(n,h)=>{let g=n.indexOf(".")===-1?0:1,d=h.indexOf(".")===-1?0:1;return g!==d?g-d:n.localeCompare(h)};return Object.keys(this.tokenTypeById).sort(a).map(n=>`- \`${n}\`: ${this.tokenTypeById[n].description}`).join(` `)}}const C=e.TOKEN_CLASSIFIER_LANGUAGE_SEPARATOR.charCodeAt(0),o=e.CLASSIFIER_MODIFIER_SEPARATOR.charCodeAt(0);function c(u,a){let n=u.length,h=a;const g=[];for(let m=n-1;m>=0;m--){const b=u.charCodeAt(m);if(b===C||b===o){const E=u.substring(m+1,n);n=m,b===C?h=E:g.push(E)}}return{type:u.substring(0,n),modifiers:g,language:h}}e.parseClassifierString=c;let i=S();D.Registry.add(e.Extensions.TokenClassificationContribution,i);function S(){const u=new v;function a(h,g,d=[],m,b){return u.registerTokenType(h,g,m,b),d&&n(h,d),h}function n(h,g){try{const d=u.parseTokenSelector(h);u.registerTokenStyleDefault(d,{scopesToProbe:g})}catch(d){console.log(d)}}return a("comment",A.localize(10,null),[["comment"]]),a("string",A.localize(11,null),[["string"]]),a("keyword",A.localize(12,null),[["keyword.control"]]),a("number",A.localize(13,null),[["constant.numeric"]]),a("regexp",A.localize(14,null),[["constant.regexp"]]),a("operator",A.localize(15,null),[["keyword.operator"]]),a("namespace",A.localize(16,null),[["entity.name.namespace"]]),a("type",A.localize(17,null),[["entity.name.type"],["support.type"]]),a("struct",A.localize(18,null),[["entity.name.type.struct"]]),a("class",A.localize(19,null),[["entity.name.type.class"],["support.class"]]),a("interface",A.localize(20,null),[["entity.name.type.interface"]]),a("enum",A.localize(21,null),[["entity.name.type.enum"]]),a("typeParameter",A.localize(22,null),[["entity.name.type.parameter"]]),a("function",A.localize(23,null),[["entity.name.function"],["support.function"]]),a("member",A.localize(24,null),[],"method","Deprecated use `method` instead"),a("method",A.localize(25,null),[["entity.name.function.member"],["support.function"]]),a("macro",A.localize(26,null),[["entity.name.function.preprocessor"]]),a("variable",A.localize(27,null),[["variable.other.readwrite"],["entity.name.variable"]]),a("parameter",A.localize(28,null),[["variable.parameter"]]),a("property",A.localize(29,null),[["variable.other.property"]]),a("enumMember",A.localize(30,null),[["variable.other.enummember"]]),a("event",A.localize(31,null),[["variable.other.event"]]),a("decorator",A.localize(32,null),[["entity.name.decorator"],["entity.name.function"]]),a("label",A.localize(33,null),void 0),u.registerTokenModifier("declaration",A.localize(34,null),void 0),u.registerTokenModifier("documentation",A.localize(35,null),void 0),u.registerTokenModifier("static",A.localize(36,null),void 0),u.registerTokenModifier("abstract",A.localize(37,null),void 0),u.registerTokenModifier("deprecated",A.localize(38,null),void 0),u.registerTokenModifier("modification",A.localize(39,null),void 0),u.registerTokenModifier("async",A.localize(40,null),void 0),u.registerTokenModifier("readonly",A.localize(41,null),void 0),n("variable.readonly",[["variable.other.constant"]]),n("property.readonly",[["variable.other.constant.property"]]),n("type.defaultLibrary",[["support.type"]]),n("class.defaultLibrary",[["support.class"]]),n("interface.defaultLibrary",[["support.class"]]),n("variable.defaultLibrary",[["support.variable"],["support.other.variable"]]),n("variable.defaultLibrary.readonly",[["support.constant"]]),n("property.defaultLibrary",[["support.variable.property"]]),n("property.defaultLibrary.readonly",[["support.constant.property"]]),n("function.defaultLibrary",[["support.function"]]),n("member.defaultLibrary",[["support.function"]]),u}function s(){return i}e.getTokenClassificationRegistry=s;function l(u,a){return{description:u,deprecationMessage:a,defaultSnippets:[{body:"${1:#ff0000}"}],anyOf:[{type:"string",format:"color-hex"},{$ref:"#/definitions/style"}]}}e.tokenStylingSchemaId="vscode://schemas/token-styling";let r=D.Registry.as(k.Extensions.JSONContribution);r.registerSchema(e.tokenStylingSchemaId,i.getTokenStylingSchema());const p=new t.RunOnceScheduler(()=>r.notifySchemaChanged(e.tokenStylingSchemaId),200);i.onDidChangeSchema(()=>{p.isScheduled()||p.schedule()})}),define(ne[212],re([1,0,6,14,5,31]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractTunnelService=e.isPortPrivileged=e.isAllInterfaces=e.ALL_INTERFACES_ADDRESSES=e.isLocalhost=e.LOCALHOST_ADDRESSES=e.extractLocalHostUriMetaDataForPortMapping=e.ProvidedOnAutoForward=e.TunnelPrivacyId=e.TunnelProtocol=e.ISharedTunnelsService=e.ITunnelService=void 0,e.ITunnelService=(0,_.createDecorator)("tunnelService"),e.ISharedTunnelsService=(0,_.createDecorator)("sharedTunnelsService");var k;(function(i){i.Http="http",i.Https="https"})(k=e.TunnelProtocol||(e.TunnelProtocol={}));var D;(function(i){i.ConstantPrivate="constantPrivate",i.Private="private",i.Public="public"})(D=e.TunnelPrivacyId||(e.TunnelPrivacyId={}));var I;(function(i){i[i.Notify=1]="Notify",i[i.OpenBrowser=2]="OpenBrowser",i[i.OpenPreview=3]="OpenPreview",i[i.Silent=4]="Silent",i[i.Ignore=5]="Ignore",i[i.OpenBrowserOnce=6]="OpenBrowserOnce"})(I=e.ProvidedOnAutoForward||(e.ProvidedOnAutoForward={}));function w(i){if(i.scheme!=="http"&&i.scheme!=="https")return;const S=/^(localhost|127\.0\.0\.1|0\.0\.0\.0):(\d+)$/.exec(i.authority);if(!!S)return{address:S[1],port:+S[2]}}e.extractLocalHostUriMetaDataForPortMapping=w,e.LOCALHOST_ADDRESSES=["localhost","127.0.0.1","0:0:0:0:0:0:0:1","::1"];function v(i){return e.LOCALHOST_ADDRESSES.indexOf(i)>=0}e.isLocalhost=v,e.ALL_INTERFACES_ADDRESSES=["0.0.0.0","0:0:0:0:0:0:0:0","::"];function C(i){return e.ALL_INTERFACES_ADDRESSES.indexOf(i)>=0}e.isAllInterfaces=C;function o(i,S){return S?S!==1&&i<1024:!f.isWindows&&i<1024}e.isPortPrivileged=o;let c=class{constructor(S){this.logService=S,this._onTunnelOpened=new t.Emitter,this.onTunnelOpened=this._onTunnelOpened.event,this._onTunnelClosed=new t.Emitter,this.onTunnelClosed=this._onTunnelClosed.event,this._onAddedTunnelProvider=new t.Emitter,this.onAddedTunnelProvider=this._onAddedTunnelProvider.event,this._tunnels=new Map,this._canElevate=!1,this._privacyOptions=[]}get hasTunnelProvider(){return!!this._tunnelProvider}setTunnelProvider(S){return this._tunnelProvider=S,S?(this._onAddedTunnelProvider.fire(),{dispose:()=>{this._tunnelProvider=void 0,this._canElevate=!1,this._privacyOptions=[]}}):(this._canElevate=!1,this._privacyOptions=[],this._onAddedTunnelProvider.fire(),{dispose:()=>{}})}setTunnelFeatures(S){this._canElevate=S.elevation,this._privacyOptions=S.privacyOptions}get canElevate(){return this._canElevate}get canChangePrivacy(){return this._privacyOptions.length>0}get privacyOptions(){return this._privacyOptions}get tunnels(){return this.getTunnels()}async getTunnels(){const S=[],s=Array.from(this._tunnels.values());for(let l of s){const r=Array.from(l.values());for(let p of r){const u=await p.value;u&&S.push(u)}}return S}async dispose(){for(const S of this._tunnels.values()){for(const{value:s}of S.values())await s.then(l=>l?.dispose());S.clear()}this._tunnels.clear()}openTunnel(S,s,l,r,p=!1,u=D.Private,a){if(this.logService.trace(`ForwardedPorts: (TunnelService) openTunnel request for ${s}:${l} on local port ${r}.`),!S)return;s||(s="localhost");const n=this.retainOrCreateTunnel(S,s,l,r,p,u,a);return n?n.then(h=>{if(!h){this.logService.trace("ForwardedPorts: (TunnelService) New tunnel is undefined."),this.removeEmptyTunnelFromMap(s,l);return}this.logService.trace("ForwardedPorts: (TunnelService) New tunnel established.");const g=this.makeTunnel(h);return(h.tunnelRemoteHost!==s||h.tunnelRemotePort!==l)&&this.logService.warn("ForwardedPorts: (TunnelService) Created tunnel does not match requirements of requested tunnel. Host or port mismatch."),this._onTunnelOpened.fire(g),g}):(this.logService.trace("ForwardedPorts: (TunnelService) Tunnel was not created."),n)}makeTunnel(S){return{tunnelRemotePort:S.tunnelRemotePort,tunnelRemoteHost:S.tunnelRemoteHost,tunnelLocalPort:S.tunnelLocalPort,localAddress:S.localAddress,privacy:S.privacy,protocol:S.protocol,dispose:async()=>{this.logService.trace(`ForwardedPorts: (TunnelService) dispose request for ${S.tunnelRemoteHost}:${S.tunnelRemotePort} `);const s=this._tunnels.get(S.tunnelRemoteHost);if(s){const l=s.get(S.tunnelRemotePort);l&&(l.refcount--,await this.tryDisposeTunnel(S.tunnelRemoteHost,S.tunnelRemotePort,l))}}}}async tryDisposeTunnel(S,s,l){if(l.refcount<=0){this.logService.trace(`ForwardedPorts: (TunnelService) Tunnel is being disposed ${S}:${s}.`);const r=l.value.then(async p=>{p&&(await p.dispose(!0),this._onTunnelClosed.fire({host:p.tunnelRemoteHost,port:p.tunnelRemotePort}))});return this._tunnels.has(S)&&this._tunnels.get(S).delete(s),r}}async closeTunnel(S,s){this.logService.trace(`ForwardedPorts: (TunnelService) close request for ${S}:${s} `);const l=this._tunnels.get(S);if(l&&l.has(s)){const r=l.get(s);r.refcount=0,await this.tryDisposeTunnel(S,s,r)}}addTunnelToMap(S,s,l){this._tunnels.has(S)||this._tunnels.set(S,new Map),this._tunnels.get(S).set(s,{refcount:1,value:l})}async removeEmptyTunnelFromMap(S,s){const l=this._tunnels.get(S);l&&(await l.get(s)||l.delete(s),l.size===0&&this._tunnels.delete(S))}getTunnelFromMap(S,s){let l=[S];v(S)?(l.push(...e.LOCALHOST_ADDRESSES),l.push(...e.ALL_INTERFACES_ADDRESSES)):C(S)&&l.push(...e.ALL_INTERFACES_ADDRESSES);const r=l.map(p=>this._tunnels.get(p));for(const p of r){const u=p?.get(s);if(u)return u}}canTunnel(S){return!!w(S)}createWithProvider(S,s,l,r,p,u,a){this.logService.trace(`ForwardedPorts: (TunnelService) Creating tunnel with provider ${s}:${l} on local port ${r}.`);const h={elevationRequired:p?o(r===void 0?l:r):!1},g={remoteAddress:{host:s,port:l},localAddressPort:r,privacy:u,public:u!==D.Private,protocol:a},d=S.forwardPort(g,h);return this.logService.trace("ForwardedPorts: (TunnelService) Tunnel created by provider."),d&&this.addTunnelToMap(s,l,d),d}};c=Ee([W(0,A.ILogService)],c),e.AbstractTunnelService=c}),define(ne[147],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UndoRedoSource=e.UndoRedoGroup=e.ResourceEditStackSnapshot=e.UndoRedoElementType=e.IUndoRedoService=void 0,e.IUndoRedoService=(0,t.createDecorator)("undoRedoService");var f;(function(D){D[D.Resource=0]="Resource",D[D.Workspace=1]="Workspace"})(f=e.UndoRedoElementType||(e.UndoRedoElementType={}));class _{constructor(I,w){this.resource=I,this.elements=w}}e.ResourceEditStackSnapshot=_;class A{constructor(){this.id=A._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}}e.UndoRedoGroup=A,A._ID=0,A.None=new A;class k{constructor(){this.id=k._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}}e.UndoRedoSource=k,k._ID=0,k.None=new k}),define(ne[93],re([1,0,15,66,22,6,2,206,29,9,49,20,84,122,1165,2021,394,699,1158,692,529,694,307,345,1170,340,1171,1173,283,124,42,147,455,522]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DidChangeContentEmitter=e.DidChangeDecorationsEmitter=e.ModelDecorationOptions=e.ModelDecorationInjectedTextOptions=e.ModelDecorationMinimapOptions=e.ModelDecorationOverviewRulerOptions=e.TextModel=e.BackgroundTokenizationState=e.LONG_LINE_BOUNDARY=e.createTextBuffer=e.createTextBufferFactoryFromSnapshot=e.createTextBufferFactoryFromStream=e.createTextBufferFactory=void 0;function F(){return new a.PieceTreeTextBufferBuilder}function L(ue){const oe=F();return oe.acceptChunk(ue),oe.finish()}e.createTextBufferFactory=L;function M(ue){return new Promise((oe,fe)=>{const pe=F();let me=!1;(0,D.listenStream)(ue,{onData:be=>{pe.acceptChunk(typeof be=="string"?be:be.toString())},onError:be=>{me||(me=!0,fe(be))},onEnd:()=>{me||(me=!0,oe(pe.finish()))}})})}e.createTextBufferFactoryFromStream=M;function N(ue){const oe=F();let fe;for(;typeof(fe=ue.read())=="string";)oe.acceptChunk(fe);return oe.finish()}e.createTextBufferFactoryFromSnapshot=N;function B(ue,oe){return(typeof ue=="string"?L(ue):ue).create(oe)}e.createTextBuffer=B;let P=0;const V=999;e.LONG_LINE_BOUNDARY=1e4;class z{constructor(oe){this._source=oe,this._eos=!1}read(){if(this._eos)return null;const oe=[];let fe=0,pe=0;do{const me=this._source.read();if(me===null)return this._eos=!0,fe===0?null:oe.join("");if(me.length>0&&(oe[fe++]=me,pe+=me.length),pe>=64*1024)return oe.join("")}while(!0)}}const U=()=>{throw new Error("Invalid change accessor")};var H;(function(ue){ue[ue.Relaxed=0]="Relaxed",ue[ue.SurrogatePairs=1]="SurrogatePairs"})(H||(H={}));var K;(function(ue){ue[ue.Uninitialized=0]="Uninitialized",ue[ue.InProgress=1]="InProgress",ue[ue.Completed=2]="Completed"})(K=e.BackgroundTokenizationState||(e.BackgroundTokenizationState={}));let G=class Ii extends k.Disposable{constructor(oe,fe,pe,me=null,be,Ce,ve){super();this._undoRedoService=be,this._languageService=Ce,this._languageConfigurationService=ve,this._onWillDispose=this._register(new A.Emitter),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new le(we=>this.handleBeforeFireDecorationsChangedEvent(we))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeLanguage=this._register(new A.Emitter),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new A.Emitter),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new A.Emitter),this.onDidChangeTokens=this._onDidChangeTokens.event,this._onDidChangeOptions=this._register(new A.Emitter),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new A.Emitter),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new A.Emitter),this._eventEmitter=this._register(new ae),this._backgroundTokenizationState=0,this._onBackgroundTokenizationStateChanged=this._register(new A.Emitter),this.onBackgroundTokenizationStateChanged=this._onBackgroundTokenizationStateChanged.event,P++,this.id="$model"+P,this.isForSimpleWidget=pe.isForSimpleWidget,typeof me=="undefined"||me===null?this._associatedResource=w.URI.parse("inmemory://model/"+P):this._associatedResource=me,this._attachedEditorCount=0;const{textBuffer:he,disposable:ge}=B(oe,pe.defaultEOL);this._buffer=he,this._bufferDisposable=ge,this._options=Ii.resolveOptions(this._buffer,pe);const de=this._buffer.getLineCount(),Se=this._buffer.getValueLengthInRange(new C.Range(1,1,de,this._buffer.getLineLength(de)+1),0);pe.largeFileOptimizations?this._isTooLargeForTokenization=Se>Ii.LARGE_FILE_SIZE_THRESHOLD||de>Ii.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=Se>Ii.MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this._isDisposing=!1,this._languageId=fe,this._languageRegistryListener=this._languageConfigurationService.onDidChange(we=>{we.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}),this._instanceId=I.singleLetterHash(P),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new X,this._commandManager=new s.EditStack(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._tokens=new m.ContiguousTokensStore(this._languageService.languageIdCodec),this._semanticTokens=new b.SparseTokensStore(this._languageService.languageIdCodec),this._tokenization=new g.TextModelTokenization(this,this._languageService.languageIdCodec),this._bracketPairColorizer=this._register(new i.BracketPairsTextModelPart(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new l.GuidesTextModelPart(this,this._languageConfigurationService)),this._decorationProvider=this._register(new S.ColorizedBracketPairsDecorationProvider(this)),this._register(this._decorationProvider.onDidChange(()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()}))}static resolveOptions(oe,fe){if(fe.detectIndentation){const pe=(0,r.guessIndentation)(oe,fe.tabSize,fe.insertSpaces);return new c.TextModelResolvedOptions({tabSize:pe.tabSize,indentSize:pe.tabSize,insertSpaces:pe.insertSpaces,trimAutoWhitespace:fe.trimAutoWhitespace,defaultEOL:fe.defaultEOL,bracketPairColorizationOptions:fe.bracketPairColorizationOptions})}return new c.TextModelResolvedOptions({tabSize:fe.tabSize,indentSize:fe.indentSize,insertSpaces:fe.insertSpaces,trimAutoWhitespace:fe.trimAutoWhitespace,defaultEOL:fe.defaultEOL,bracketPairColorizationOptions:fe.bracketPairColorizationOptions})}onDidChangeContent(oe){return this._eventEmitter.slowEvent(fe=>oe(fe.contentChangedEvent))}onDidChangeContentOrInjectedText(oe){return(0,k.combinedDisposable)(this._eventEmitter.fastEvent(fe=>oe(fe.rawContentChangedEvent)),this._onDidChangeInjectedText.event(fe=>oe(fe)))}get bracketPairs(){return this._bracketPairColorizer}get guides(){return this._guidesTextModelPart}get backgroundTokenizationState(){return this._backgroundTokenizationState}handleTokenizationProgress(oe){if(this._backgroundTokenizationState===2)return;const fe=oe?2:1;this._backgroundTokenizationState!==fe&&(this._backgroundTokenizationState=fe,this._bracketPairColorizer.handleDidChangeBackgroundTokenizationState(),this._onBackgroundTokenizationStateChanged.fire())}dispose(){this._isDisposing=!0,this._onWillDispose.fire(),this._languageRegistryListener.dispose(),this._tokenization.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this._isDisposing=!1;const oe=new u.PieceTreeTextBuffer([],"",` `,!1,!1,!0,!0);oe.dispose(),this._buffer=oe,this._bufferDisposable=k.Disposable.None}_hasListeners(){return this._onWillDispose.hasListeners()||this._onDidChangeDecorations.hasListeners()||this._onDidChangeLanguage.hasListeners()||this._onDidChangeLanguageConfiguration.hasListeners()||this._onDidChangeTokens.hasListeners()||this._onDidChangeOptions.hasListeners()||this._onDidChangeAttached.hasListeners()||this._onDidChangeInjectedText.hasListeners()||this._eventEmitter.hasListeners()||this._onBackgroundTokenizationStateChanged.hasListeners()}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}equalsTextBuffer(oe){return this._assertNotDisposed(),this._buffer.equals(oe)}getTextBuffer(){return this._assertNotDisposed(),this._buffer}_emitContentChangedEvent(oe,fe){this._isDisposing||(this._bracketPairColorizer.handleDidChangeContent(fe),this._tokenization.handleDidChangeContent(fe),this._eventEmitter.fire(new n.InternalModelContentChangeEvent(oe,fe)))}setValue(oe){if(this._assertNotDisposed(),oe===null)return;const{textBuffer:fe,disposable:pe}=B(oe,this._options.defaultEOL);this._setValueFromTextBuffer(fe,pe)}_createContentChanged2(oe,fe,pe,me,be,Ce,ve){return{changes:[{range:oe,rangeOffset:fe,rangeLength:pe,text:me}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:be,isRedoing:Ce,isFlush:ve}}_setValueFromTextBuffer(oe,fe){this._assertNotDisposed();const pe=this.getFullModelRange(),me=this.getValueLengthInRange(pe),be=this.getLineCount(),Ce=this.getLineMaxColumn(be);this._buffer=oe,this._bufferDisposable.dispose(),this._bufferDisposable=fe,this._increaseVersionId(),this._tokens.flush(),this._semanticTokens.flush(),this._decorations=Object.create(null),this._decorationsTree=new X,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new n.ModelRawContentChangedEvent([new n.ModelRawFlush],this._versionId,!1,!1),this._createContentChanged2(new C.Range(1,1,be,Ce),0,me,this.getValue(),!1,!1,!0))}setEOL(oe){this._assertNotDisposed();const fe=oe===1?`\r `:` `;if(this._buffer.getEOL()===fe)return;const pe=this.getFullModelRange(),me=this.getValueLengthInRange(pe),be=this.getLineCount(),Ce=this.getLineMaxColumn(be);this._onBeforeEOLChange(),this._buffer.setEOL(fe),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new n.ModelRawContentChangedEvent([new n.ModelRawEOLChanged],this._versionId,!1,!1),this._createContentChanged2(new C.Range(1,1,be,Ce),0,me,this.getValue(),!1,!1,!1))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const oe=this.getVersionId(),fe=this._decorationsTree.collectNodesPostOrder();for(let pe=0,me=fe.length;pe<me;pe++){const be=fe[pe],Ce=be.range,ve=be.cachedAbsoluteStart-be.start,he=this._buffer.getOffsetAt(Ce.startLineNumber,Ce.startColumn),ge=this._buffer.getOffsetAt(Ce.endLineNumber,Ce.endColumn);be.cachedAbsoluteStart=he,be.cachedAbsoluteEnd=ge,be.cachedVersionId=oe,be.start=he-ve,be.end=ge-ve,(0,p.recomputeMaxEnd)(be)}}onBeforeAttached(){this._attachedEditorCount++,this._attachedEditorCount===1&&(this._tokenization.handleDidChangeAttached(),this._onDidChangeAttached.fire(void 0))}onBeforeDetached(){this._attachedEditorCount--,this._attachedEditorCount===0&&(this._tokenization.handleDidChangeAttached(),this._onDidChangeAttached.fire(void 0))}isAttachedToEditor(){return this._attachedEditorCount>0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let oe=0,fe=0;const pe=this._buffer.getLineCount();for(let me=1;me<=pe;me++){const be=this._buffer.getLineLength(me);be>=e.LONG_LINE_BOUNDARY?fe+=be:oe+=be}return fe>oe}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(oe){this._assertNotDisposed();const fe=typeof oe.tabSize!="undefined"?oe.tabSize:this._options.tabSize,pe=typeof oe.indentSize!="undefined"?oe.indentSize:this._options.indentSize,me=typeof oe.insertSpaces!="undefined"?oe.insertSpaces:this._options.insertSpaces,be=typeof oe.trimAutoWhitespace!="undefined"?oe.trimAutoWhitespace:this._options.trimAutoWhitespace,Ce=typeof oe.bracketColorizationOptions!="undefined"?oe.bracketColorizationOptions:this._options.bracketPairColorizationOptions,ve=new c.TextModelResolvedOptions({tabSize:fe,indentSize:pe,insertSpaces:me,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:be,bracketPairColorizationOptions:Ce});if(this._options.equals(ve))return;const he=this._options.createChangeEvent(ve);this._options=ve,this._bracketPairColorizer.handleDidChangeOptions(he),this._decorationProvider.handleDidChangeOptions(he),this._onDidChangeOptions.fire(he)}detectIndentation(oe,fe){this._assertNotDisposed();const pe=(0,r.guessIndentation)(this._buffer,fe,oe);this.updateOptions({insertSpaces:pe.insertSpaces,tabSize:pe.tabSize,indentSize:pe.tabSize})}normalizeIndentation(oe){return this._assertNotDisposed(),(0,x.normalizeIndentation)(oe,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(oe=null){const fe=this.findMatches(I.UNUSUAL_LINE_TERMINATORS.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(oe,fe.map(pe=>({range:pe.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(oe){this._assertNotDisposed();const fe=this._validatePosition(oe.lineNumber,oe.column,0);return this._buffer.getOffsetAt(fe.lineNumber,fe.column)}getPositionAt(oe){this._assertNotDisposed();const fe=Math.min(this._buffer.getLength(),Math.max(0,oe));return this._buffer.getPositionAt(fe)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(oe){this._versionId=oe}_overwriteAlternativeVersionId(oe){this._alternativeVersionId=oe}_overwriteInitialUndoRedoSnapshot(oe){this._initialUndoRedoSnapshot=oe}getValue(oe,fe=!1){this._assertNotDisposed();const pe=this.getFullModelRange(),me=this.getValueInRange(pe,oe);return fe?this._buffer.getBOM()+me:me}createSnapshot(oe=!1){return new z(this._buffer.createSnapshot(oe))}getValueLength(oe,fe=!1){this._assertNotDisposed();const pe=this.getFullModelRange(),me=this.getValueLengthInRange(pe,oe);return fe?this._buffer.getBOM().length+me:me}getValueInRange(oe,fe=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(oe),fe)}getValueLengthInRange(oe,fe=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(oe),fe)}getCharacterCountInRange(oe,fe=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(oe),fe)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(oe){if(this._assertNotDisposed(),oe<1||oe>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(oe)}getLineLength(oe){if(this._assertNotDisposed(),oe<1||oe>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(oe)}getLinesContent(){return this._assertNotDisposed(),this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),this._buffer.getEOL()===` `?0:1}getLineMinColumn(oe){return this._assertNotDisposed(),1}getLineMaxColumn(oe){if(this._assertNotDisposed(),oe<1||oe>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(oe)+1}getLineFirstNonWhitespaceColumn(oe){if(this._assertNotDisposed(),oe<1||oe>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(oe)}getLineLastNonWhitespaceColumn(oe){if(this._assertNotDisposed(),oe<1||oe>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(oe)}_validateRangeRelaxedNoAllocations(oe){const fe=this._buffer.getLineCount(),pe=oe.startLineNumber,me=oe.startColumn;let be=Math.floor(typeof pe=="number"&&!isNaN(pe)?pe:1),Ce=Math.floor(typeof me=="number"&&!isNaN(me)?me:1);if(be<1)be=1,Ce=1;else if(be>fe)be=fe,Ce=this.getLineMaxColumn(be);else if(Ce<=1)Ce=1;else{const Se=this.getLineMaxColumn(be);Ce>=Se&&(Ce=Se)}const ve=oe.endLineNumber,he=oe.endColumn;let ge=Math.floor(typeof ve=="number"&&!isNaN(ve)?ve:1),de=Math.floor(typeof he=="number"&&!isNaN(he)?he:1);if(ge<1)ge=1,de=1;else if(ge>fe)ge=fe,de=this.getLineMaxColumn(ge);else if(de<=1)de=1;else{const Se=this.getLineMaxColumn(ge);de>=Se&&(de=Se)}return pe===be&&me===Ce&&ve===ge&&he===de&&oe instanceof C.Range&&!(oe instanceof o.Selection)?oe:new C.Range(be,Ce,ge,de)}_isValidPosition(oe,fe,pe){if(typeof oe!="number"||typeof fe!="number"||isNaN(oe)||isNaN(fe)||oe<1||fe<1||(oe|0)!==oe||(fe|0)!==fe)return!1;const me=this._buffer.getLineCount();if(oe>me)return!1;if(fe===1)return!0;const be=this.getLineMaxColumn(oe);if(fe>be)return!1;if(pe===1){const Ce=this._buffer.getLineCharCode(oe,fe-2);if(I.isHighSurrogate(Ce))return!1}return!0}_validatePosition(oe,fe,pe){const me=Math.floor(typeof oe=="number"&&!isNaN(oe)?oe:1),be=Math.floor(typeof fe=="number"&&!isNaN(fe)?fe:1),Ce=this._buffer.getLineCount();if(me<1)return new v.Position(1,1);if(me>Ce)return new v.Position(Ce,this.getLineMaxColumn(Ce));if(be<=1)return new v.Position(me,1);const ve=this.getLineMaxColumn(me);if(be>=ve)return new v.Position(me,ve);if(pe===1){const he=this._buffer.getLineCharCode(me,be-2);if(I.isHighSurrogate(he))return new v.Position(me,be-1)}return new v.Position(me,be)}validatePosition(oe){const fe=1;return this._assertNotDisposed(),oe instanceof v.Position&&this._isValidPosition(oe.lineNumber,oe.column,fe)?oe:this._validatePosition(oe.lineNumber,oe.column,fe)}_isValidRange(oe,fe){const pe=oe.startLineNumber,me=oe.startColumn,be=oe.endLineNumber,Ce=oe.endColumn;if(!this._isValidPosition(pe,me,0)||!this._isValidPosition(be,Ce,0))return!1;if(fe===1){const ve=me>1?this._buffer.getLineCharCode(pe,me-2):0,he=Ce>1&&Ce<=this._buffer.getLineLength(be)?this._buffer.getLineCharCode(be,Ce-2):0,ge=I.isHighSurrogate(ve),de=I.isHighSurrogate(he);return!ge&&!de}return!0}validateRange(oe){const fe=1;if(this._assertNotDisposed(),oe instanceof C.Range&&!(oe instanceof o.Selection)&&this._isValidRange(oe,fe))return oe;const pe=this._validatePosition(oe.startLineNumber,oe.startColumn,0),me=this._validatePosition(oe.endLineNumber,oe.endColumn,0),be=pe.lineNumber,Ce=pe.column,ve=me.lineNumber,he=me.column;if(fe===1){const ge=Ce>1?this._buffer.getLineCharCode(be,Ce-2):0,de=he>1&&he<=this._buffer.getLineLength(ve)?this._buffer.getLineCharCode(ve,he-2):0,Se=I.isHighSurrogate(ge),we=I.isHighSurrogate(de);return!Se&&!we?new C.Range(be,Ce,ve,he):be===ve&&Ce===he?new C.Range(be,Ce-1,ve,he-1):Se&&we?new C.Range(be,Ce-1,ve,he+1):Se?new C.Range(be,Ce-1,ve,he):new C.Range(be,Ce,ve,he+1)}return new C.Range(be,Ce,ve,he)}modifyPosition(oe,fe){this._assertNotDisposed();const pe=this.getOffsetAt(oe)+fe;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,pe)))}getFullModelRange(){this._assertNotDisposed();const oe=this.getLineCount();return new C.Range(1,1,oe,this.getLineMaxColumn(oe))}findMatchesLineByLine(oe,fe,pe,me){return this._buffer.findMatchesLineByLine(oe,fe,pe,me)}findMatches(oe,fe,pe,me,be,Ce,ve=V){this._assertNotDisposed();let he=null;fe!==null&&(Array.isArray(fe)||(fe=[fe]),fe.every(Se=>C.Range.isIRange(Se))&&(he=fe.map(Se=>this.validateRange(Se)))),he===null&&(he=[this.getFullModelRange()]),he=he.sort((Se,we)=>Se.startLineNumber-we.startLineNumber||Se.startColumn-we.startColumn);const ge=[];ge.push(he.reduce((Se,we)=>C.Range.areIntersecting(Se,we)?Se.plusRange(we):(ge.push(Se),we)));let de;if(!pe&&oe.indexOf(` `)<0){const we=new h.SearchParams(oe,pe,me,be).parseSearchRequest();if(!we)return[];de=ye=>this.findMatchesLineByLine(ye,we,Ce,ve)}else de=Se=>h.TextModelSearch.findMatches(this,new h.SearchParams(oe,pe,me,be),Se,Ce,ve);return ge.map(de).reduce((Se,we)=>Se.concat(we),[])}findNextMatch(oe,fe,pe,me,be,Ce){this._assertNotDisposed();const ve=this.validatePosition(fe);if(!pe&&oe.indexOf(` `)<0){const ge=new h.SearchParams(oe,pe,me,be).parseSearchRequest();if(!ge)return null;const de=this.getLineCount();let Se=new C.Range(ve.lineNumber,ve.column,de,this.getLineMaxColumn(de)),we=this.findMatchesLineByLine(Se,ge,Ce,1);return h.TextModelSearch.findNextMatch(this,new h.SearchParams(oe,pe,me,be),ve,Ce),we.length>0||(Se=new C.Range(1,1,ve.lineNumber,this.getLineMaxColumn(ve.lineNumber)),we=this.findMatchesLineByLine(Se,ge,Ce,1),we.length>0)?we[0]:null}return h.TextModelSearch.findNextMatch(this,new h.SearchParams(oe,pe,me,be),ve,Ce)}findPreviousMatch(oe,fe,pe,me,be,Ce){this._assertNotDisposed();const ve=this.validatePosition(fe);return h.TextModelSearch.findPreviousMatch(this,new h.SearchParams(oe,pe,me,be),ve,Ce)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(oe){if((this.getEOL()===` `?0:1)!==oe)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(oe)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(oe){return oe instanceof c.ValidAnnotatedEditOperation?oe:new c.ValidAnnotatedEditOperation(oe.identifier||null,this.validateRange(oe.range),oe.text,oe.forceMoveMarkers||!1,oe.isAutoWhitespaceEdit||!1,oe._isTracked||!1)}_validateEditOperations(oe){const fe=[];for(let pe=0,me=oe.length;pe<me;pe++)fe[pe]=this._validateEditOperation(oe[pe]);return fe}pushEditOperations(oe,fe,pe){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(oe,this._validateEditOperations(fe),pe)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(oe,fe,pe){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){const me=fe.map(Ce=>({range:this.validateRange(Ce.range),text:Ce.text}));let be=!0;if(oe)for(let Ce=0,ve=oe.length;Ce<ve;Ce++){const he=oe[Ce];let ge=!1;for(let de=0,Se=me.length;de<Se;de++){const we=me[de].range,ye=we.startLineNumber>he.endLineNumber,ke=he.startLineNumber>we.endLineNumber;if(!ye&&!ke){ge=!0;break}}if(!ge){be=!1;break}}if(be)for(let Ce=0,ve=this._trimAutoWhitespaceLines.length;Ce<ve;Ce++){const he=this._trimAutoWhitespaceLines[Ce],ge=this.getLineMaxColumn(he);let de=!0;for(let Se=0,we=me.length;Se<we;Se++){const ye=me[Se].range,ke=me[Se].text;if(!(he<ye.startLineNumber||he>ye.endLineNumber)&&!(he===ye.startLineNumber&&ye.startColumn===ge&&ye.isEmpty()&&ke&&ke.length>0&&ke.charAt(0)===` `)&&!(he===ye.startLineNumber&&ye.startColumn===1&&ye.isEmpty()&&ke&&ke.length>0&&ke.charAt(ke.length-1)===` `)){de=!1;break}}if(de){const Se=new C.Range(he,1,he,ge);fe.push(new c.ValidAnnotatedEditOperation(null,Se,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(oe,fe,pe)}_applyUndo(oe,fe,pe,me){const be=oe.map(Ce=>{const ve=this.getPositionAt(Ce.newPosition),he=this.getPositionAt(Ce.newEnd);return{range:new C.Range(ve.lineNumber,ve.column,he.lineNumber,he.column),text:Ce.oldText}});this._applyUndoRedoEdits(be,fe,!0,!1,pe,me)}_applyRedo(oe,fe,pe,me){const be=oe.map(Ce=>{const ve=this.getPositionAt(Ce.oldPosition),he=this.getPositionAt(Ce.oldEnd);return{range:new C.Range(ve.lineNumber,ve.column,he.lineNumber,he.column),text:Ce.newText}});this._applyUndoRedoEdits(be,fe,!1,!0,pe,me)}_applyUndoRedoEdits(oe,fe,pe,me,be,Ce){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=pe,this._isRedoing=me,this.applyEdits(oe,!1),this.setEOL(fe),this._overwriteAlternativeVersionId(be)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(Ce),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(oe,fe=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const pe=this._validateEditOperations(oe);return this._doApplyEdits(pe,fe)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(oe,fe){const pe=this._buffer.getLineCount(),me=this._buffer.applyEdits(oe,this._options.trimAutoWhitespace,fe),be=this._buffer.getLineCount(),Ce=me.changes;if(this._trimAutoWhitespaceLines=me.trimAutoWhitespaceLineNumbers,Ce.length!==0){for(let ge=0,de=Ce.length;ge<de;ge++){const Se=Ce[ge],[we,ye,ke]=(0,d.countEOL)(Se.text);this._tokens.acceptEdit(Se.range,we,ye),this._semanticTokens.acceptEdit(Se.range,we,ye,ke,Se.text.length>0?Se.text.charCodeAt(0):0),this._decorationsTree.acceptReplace(Se.rangeOffset,Se.rangeLength,Se.text.length,Se.forceMoveMarkers)}const ve=[];this._increaseVersionId();let he=pe;for(let ge=0,de=Ce.length;ge<de;ge++){const Se=Ce[ge],[we]=(0,d.countEOL)(Se.text);this._onDidChangeDecorations.fire();const ye=Se.range.startLineNumber,ke=Se.range.endLineNumber,Ie=ke-ye,Te=we,De=Math.min(Ie,Te),_e=Te-Ie,Re=be-he-_e+ye,Ne=Re,xe=Re+Te,Ae=this._decorationsTree.getInjectedTextInInterval(this,this.getOffsetAt(new v.Position(Ne,1)),this.getOffsetAt(new v.Position(xe,this.getLineMaxColumn(xe))),0),Le=n.LineInjectedText.fromDecorations(Ae),Me=new t.ArrayQueue(Le);for(let We=De;We>=0;We--){const Ve=ye+We,Ue=Re+We;Me.takeFromEndWhile(Ze=>Ze.lineNumber>Ue);const et=Me.takeFromEndWhile(Ze=>Ze.lineNumber===Ue);ve.push(new n.ModelRawLineChanged(Ve,this.getLineContent(Ue),et))}if(De<Ie){const We=ye+De;ve.push(new n.ModelRawLinesDeleted(We+1,ke))}if(De<Te){const We=new t.ArrayQueue(Le),Ve=ye+De,Ue=Te-De,et=be-he-Ue+Ve+1,Ze=[],Fe=[];for(let Qe=0;Qe<Ue;Qe++){const qe=et+Qe;Fe[Qe]=this.getLineContent(qe),We.takeWhile(Be=>Be.lineNumber<qe),Ze[Qe]=We.takeWhile(Be=>Be.lineNumber===qe)}ve.push(new n.ModelRawLinesInserted(Ve+1,ye+Te,Fe,Ze))}he+=_e}this._emitContentChangedEvent(new n.ModelRawContentChangedEvent(ve,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:Ce,eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return me.reverseEdits===null?void 0:me.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(oe){if(oe===null||oe.size===0)return;const pe=Array.from(oe).map(me=>new n.ModelRawLineChanged(me,this.getLineContent(me),this._getInjectedTextInLine(me)));this._onDidChangeInjectedText.fire(new n.ModelInjectedTextChangedEvent(pe))}changeDecorations(oe,fe=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(fe,oe)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(oe,fe){const pe={addDecoration:(be,Ce)=>this._deltaDecorationsImpl(oe,[],[{range:be,options:Ce}])[0],changeDecoration:(be,Ce)=>{this._changeDecorationImpl(be,Ce)},changeDecorationOptions:(be,Ce)=>{this._changeDecorationOptionsImpl(be,ce(Ce))},removeDecoration:be=>{this._deltaDecorationsImpl(oe,[be],[])},deltaDecorations:(be,Ce)=>be.length===0&&Ce.length===0?[]:this._deltaDecorationsImpl(oe,be,Ce)};let me=null;try{me=fe(pe)}catch(be){(0,_.onUnexpectedError)(be)}return pe.addDecoration=U,pe.changeDecoration=U,pe.changeDecorationOptions=U,pe.removeDecoration=U,pe.deltaDecorations=U,me}deltaDecorations(oe,fe,pe=0){if(this._assertNotDisposed(),oe||(oe=[]),oe.length===0&&fe.length===0)return[];try{return this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(pe,oe,fe)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_getTrackedRange(oe){return this.getDecorationRange(oe)}_setTrackedRange(oe,fe,pe){const me=oe?this._decorations[oe]:null;if(!me)return fe?this._deltaDecorationsImpl(0,[],[{range:fe,options:ie[pe]}])[0]:null;if(!fe)return this._decorationsTree.delete(me),delete this._decorations[me.id],null;const be=this._validateRangeRelaxedNoAllocations(fe),Ce=this._buffer.getOffsetAt(be.startLineNumber,be.startColumn),ve=this._buffer.getOffsetAt(be.endLineNumber,be.endColumn);return this._decorationsTree.delete(me),me.reset(this.getVersionId(),Ce,ve,be),me.setOptions(ie[pe]),this._decorationsTree.insert(me),me.id}removeAllDecorationsWithOwnerId(oe){if(this._isDisposed)return;const fe=this._decorationsTree.collectNodesFromOwner(oe);for(let pe=0,me=fe.length;pe<me;pe++){const be=fe[pe];this._decorationsTree.delete(be),delete this._decorations[be.id]}}getDecorationOptions(oe){const fe=this._decorations[oe];return fe?fe.options:null}getDecorationRange(oe){const fe=this._decorations[oe];return fe?this._decorationsTree.getNodeRange(this,fe):null}getLineDecorations(oe,fe=0,pe=!1){return oe<1||oe>this.getLineCount()?[]:this.getLinesDecorations(oe,oe,fe,pe)}getLinesDecorations(oe,fe,pe=0,me=!1){const be=this.getLineCount(),Ce=Math.min(be,Math.max(1,oe)),ve=Math.min(be,Math.max(1,fe)),he=this.getLineMaxColumn(ve),ge=new C.Range(Ce,1,ve,he),de=this._getDecorationsInRange(ge,pe,me);return(0,t.pushMany)(de,this._decorationProvider.getDecorationsInRange(ge,pe,me)),de}getDecorationsInRange(oe,fe=0,pe=!1){const me=this.validateRange(oe),be=this._getDecorationsInRange(me,fe,pe);return(0,t.pushMany)(be,this._decorationProvider.getDecorationsInRange(me,fe,pe)),be}getOverviewRulerDecorations(oe=0,fe=!1){return this._decorationsTree.getAll(this,oe,fe,!0)}getInjectedTextDecorations(oe=0){return this._decorationsTree.getAllInjectedText(this,oe)}_getInjectedTextInLine(oe){const fe=this._buffer.getOffsetAt(oe,1),pe=fe+this._buffer.getLineLength(oe),me=this._decorationsTree.getInjectedTextInInterval(this,fe,pe,0);return n.LineInjectedText.fromDecorations(me).filter(be=>be.lineNumber===oe)}getAllDecorations(oe=0,fe=!1){let pe=this._decorationsTree.getAll(this,oe,fe,!1);return pe=pe.concat(this._decorationProvider.getAllDecorations(oe,fe)),pe}_getDecorationsInRange(oe,fe,pe){const me=this._buffer.getOffsetAt(oe.startLineNumber,oe.startColumn),be=this._buffer.getOffsetAt(oe.endLineNumber,oe.endColumn);return this._decorationsTree.getAllInInterval(this,me,be,fe,pe)}getRangeAt(oe,fe){return this._buffer.getRangeAt(oe,fe-oe)}_changeDecorationImpl(oe,fe){const pe=this._decorations[oe];if(!pe)return;if(pe.options.after){const ve=this.getDecorationRange(oe);this._onDidChangeDecorations.recordLineAffectedByInjectedText(ve.endLineNumber)}if(pe.options.before){const ve=this.getDecorationRange(oe);this._onDidChangeDecorations.recordLineAffectedByInjectedText(ve.startLineNumber)}const me=this._validateRangeRelaxedNoAllocations(fe),be=this._buffer.getOffsetAt(me.startLineNumber,me.startColumn),Ce=this._buffer.getOffsetAt(me.endLineNumber,me.endColumn);this._decorationsTree.delete(pe),pe.reset(this.getVersionId(),be,Ce,me),this._decorationsTree.insert(pe),this._onDidChangeDecorations.checkAffectedAndFire(pe.options),pe.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(me.endLineNumber),pe.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(me.startLineNumber)}_changeDecorationOptionsImpl(oe,fe){const pe=this._decorations[oe];if(!pe)return;const me=!!(pe.options.overviewRuler&&pe.options.overviewRuler.color),be=!!(fe.overviewRuler&&fe.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(pe.options),this._onDidChangeDecorations.checkAffectedAndFire(fe),pe.options.after||fe.after){const Ce=this._decorationsTree.getNodeRange(this,pe);this._onDidChangeDecorations.recordLineAffectedByInjectedText(Ce.endLineNumber)}if(pe.options.before||fe.before){const Ce=this._decorationsTree.getNodeRange(this,pe);this._onDidChangeDecorations.recordLineAffectedByInjectedText(Ce.startLineNumber)}me!==be?(this._decorationsTree.delete(pe),pe.setOptions(fe),this._decorationsTree.insert(pe)):pe.setOptions(fe)}_deltaDecorationsImpl(oe,fe,pe){const me=this.getVersionId(),be=fe.length;let Ce=0;const ve=pe.length;let he=0;const ge=new Array(ve);for(;Ce<be||he<ve;){let de=null;if(Ce<be){do de=this._decorations[fe[Ce++]];while(!de&&Ce<be);if(de){if(de.options.after){const Se=this._decorationsTree.getNodeRange(this,de);this._onDidChangeDecorations.recordLineAffectedByInjectedText(Se.endLineNumber)}if(de.options.before){const Se=this._decorationsTree.getNodeRange(this,de);this._onDidChangeDecorations.recordLineAffectedByInjectedText(Se.startLineNumber)}this._decorationsTree.delete(de),this._onDidChangeDecorations.checkAffectedAndFire(de.options)}}if(he<ve){if(!de){const Te=++this._lastDecorationId,De=`${this._instanceId};${Te}`;de=new p.IntervalNode(De,0,0),this._decorations[De]=de}const Se=pe[he],we=this._validateRangeRelaxedNoAllocations(Se.range),ye=ce(Se.options),ke=this._buffer.getOffsetAt(we.startLineNumber,we.startColumn),Ie=this._buffer.getOffsetAt(we.endLineNumber,we.endColumn);de.ownerId=oe,de.reset(me,ke,Ie,we),de.setOptions(ye),de.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(we.endLineNumber),de.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(we.startLineNumber),this._onDidChangeDecorations.checkAffectedAndFire(ye),this._decorationsTree.insert(de),ge[he]=de.id,he++}else de&&delete this._decorations[de.id]}return ge}setLineTokens(oe,fe){if(oe<1||oe>this.getLineCount())throw new Error("Illegal value for lineNumber");this._tokens.setTokens(this._languageId,oe-1,this._buffer.getLineLength(oe),fe,!1)}setTokens(oe,fe=!1){if(oe.length!==0){const pe=[];for(let me=0,be=oe.length;me<be;me++){const Ce=oe[me];let ve=0,he=0,ge=!1;for(let de=Ce.startLineNumber;de<=Ce.endLineNumber;de++)ge?(this._tokens.setTokens(this._languageId,de-1,this._buffer.getLineLength(de),Ce.getLineTokens(de),!1),he=de):this._tokens.setTokens(this._languageId,de-1,this._buffer.getLineLength(de),Ce.getLineTokens(de),!0)&&(ge=!0,ve=de,he=de);ge&&pe.push({fromLineNumber:ve,toLineNumber:he})}pe.length>0&&this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:pe})}this.handleTokenizationProgress(fe)}setSemanticTokens(oe,fe){this._semanticTokens.set(oe,fe),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:oe!==null,ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(oe,fe){if(this.hasCompleteSemanticTokens())return;const pe=this.validateRange(this._semanticTokens.setPartial(oe,fe));this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!0,ranges:[{fromLineNumber:pe.startLineNumber,toLineNumber:pe.endLineNumber}]})}tokenizeViewport(oe,fe){oe=Math.max(1,oe),fe=Math.min(this._buffer.getLineCount(),fe),this._tokenization.tokenizeViewport(oe,fe)}clearTokens(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._buffer.getLineCount()}]})}clearSemanticTokens(){this._semanticTokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]})}_emitModelTokensChangedEvent(oe){this._isDisposing||(this._bracketPairColorizer.handleDidChangeTokens(oe),this._onDidChangeTokens.fire(oe))}resetTokenization(){this._tokenization.reset()}forceTokenization(oe){if(oe<1||oe>this.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(oe)}isCheapToTokenize(oe){return this._tokenization.isCheapToTokenize(oe)}tokenizeIfCheap(oe){this.isCheapToTokenize(oe)&&this.forceTokenization(oe)}getLineTokens(oe){if(oe<1||oe>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(oe)}_getLineTokens(oe){const fe=this.getLineContent(oe),pe=this._tokens.getTokens(this._languageId,oe-1,fe);return this._semanticTokens.addSparseTokens(oe,pe)}getLanguageId(){return this._languageId}setMode(oe){if(this._languageId===oe)return;const fe={oldLanguage:this._languageId,newLanguage:oe};this._languageId=oe,this._bracketPairColorizer.handleDidChangeLanguage(fe),this._tokenization.handleDidChangeLanguage(fe),this._onDidChangeLanguage.fire(fe),this._onDidChangeLanguageConfiguration.fire({})}getLanguageIdAtPosition(oe,fe){const pe=this.validatePosition(new v.Position(oe,fe)),me=this.getLineTokens(pe.lineNumber);return me.getLanguageId(me.findTokenIndexAtOffset(pe.column-1))}getTokenTypeIfInsertingCharacter(oe,fe,pe){const me=this.validatePosition(new v.Position(oe,fe));return this._tokenization.getTokenTypeIfInsertingCharacter(me,pe)}tokenizeLineWithEdit(oe,fe,pe){const me=this.validatePosition(oe);return this._tokenization.tokenizeLineWithEdit(me,fe,pe)}getLanguageConfiguration(oe){return this._languageConfigurationService.getLanguageConfiguration(oe)}getWordAtPosition(oe){this._assertNotDisposed();const fe=this.validatePosition(oe),pe=this.getLineContent(fe.lineNumber),me=this._getLineTokens(fe.lineNumber),be=me.findTokenIndexAtOffset(fe.column-1),[Ce,ve]=Ii._findLanguageBoundaries(me,be),he=(0,E.getWordAtText)(fe.column,this.getLanguageConfiguration(me.getLanguageId(be)).getWordDefinition(),pe.substring(Ce,ve),Ce);if(he&&he.startColumn<=oe.column&&oe.column<=he.endColumn)return he;if(be>0&&Ce===fe.column-1){const[ge,de]=Ii._findLanguageBoundaries(me,be-1),Se=(0,E.getWordAtText)(fe.column,this.getLanguageConfiguration(me.getLanguageId(be-1)).getWordDefinition(),pe.substring(ge,de),ge);if(Se&&Se.startColumn<=oe.column&&oe.column<=Se.endColumn)return Se}return null}static _findLanguageBoundaries(oe,fe){const pe=oe.getLanguageId(fe);let me=0;for(let Ce=fe;Ce>=0&&oe.getLanguageId(Ce)===pe;Ce--)me=oe.getStartOffset(Ce);let be=oe.getLineContent().length;for(let Ce=fe,ve=oe.getCount();Ce<ve&&oe.getLanguageId(Ce)===pe;Ce++)be=oe.getEndOffset(Ce);return[me,be]}getWordUntilPosition(oe){const fe=this.getWordAtPosition(oe);return fe?{word:fe.word.substr(0,oe.column-fe.startColumn),startColumn:fe.startColumn,endColumn:oe.column}:{word:"",startColumn:oe.column,endColumn:oe.column}}normalizePosition(oe,fe){return oe}getLineIndentColumn(oe){return q(this.getLineContent(oe))+1}};G.MODEL_SYNC_LIMIT=50*1024*1024,G.LARGE_FILE_SIZE_THRESHOLD=20*1024*1024,G.LARGE_FILE_LINE_COUNT_THRESHOLD=300*1e3,G.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:O.EDITOR_MODEL_DEFAULTS.tabSize,indentSize:O.EDITOR_MODEL_DEFAULTS.indentSize,insertSpaces:O.EDITOR_MODEL_DEFAULTS.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:O.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,largeFileOptimizations:O.EDITOR_MODEL_DEFAULTS.largeFileOptimizations,bracketPairColorizationOptions:O.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions},G=Ee([W(4,R.IUndoRedoService),W(5,T.ILanguageService),W(6,y.ILanguageConfigurationService)],G),e.TextModel=G;function q(ue){let oe=0;for(const fe of ue)if(fe===" "||fe===" ")oe++;else break;return oe}function Z(ue){return!!(ue.options.overviewRuler&&ue.options.overviewRuler.color)}function j(ue){return!!ue.options.after||!!ue.options.before}class X{constructor(){this._decorationsTree0=new p.IntervalTree,this._decorationsTree1=new p.IntervalTree,this._injectedTextDecorationsTree=new p.IntervalTree}ensureAllNodesHaveRanges(oe){this.getAll(oe,0,!1,!1)}_ensureNodesHaveRanges(oe,fe){for(const pe of fe)pe.range===null&&(pe.range=oe.getRangeAt(pe.cachedAbsoluteStart,pe.cachedAbsoluteEnd));return fe}getAllInInterval(oe,fe,pe,me,be){const Ce=oe.getVersionId(),ve=this._intervalSearch(fe,pe,me,be,Ce);return this._ensureNodesHaveRanges(oe,ve)}_intervalSearch(oe,fe,pe,me,be){const Ce=this._decorationsTree0.intervalSearch(oe,fe,pe,me,be),ve=this._decorationsTree1.intervalSearch(oe,fe,pe,me,be),he=this._injectedTextDecorationsTree.intervalSearch(oe,fe,pe,me,be);return Ce.concat(ve).concat(he)}getInjectedTextInInterval(oe,fe,pe,me){const be=oe.getVersionId(),Ce=this._injectedTextDecorationsTree.intervalSearch(fe,pe,me,!1,be);return this._ensureNodesHaveRanges(oe,Ce).filter(ve=>ve.options.showIfCollapsed||!ve.range.isEmpty())}getAllInjectedText(oe,fe){const pe=oe.getVersionId(),me=this._injectedTextDecorationsTree.search(fe,!1,pe);return this._ensureNodesHaveRanges(oe,me).filter(be=>be.options.showIfCollapsed||!be.range.isEmpty())}getAll(oe,fe,pe,me){const be=oe.getVersionId(),Ce=this._search(fe,pe,me,be);return this._ensureNodesHaveRanges(oe,Ce)}_search(oe,fe,pe,me){if(pe)return this._decorationsTree1.search(oe,fe,me);{const be=this._decorationsTree0.search(oe,fe,me),Ce=this._decorationsTree1.search(oe,fe,me),ve=this._injectedTextDecorationsTree.search(oe,fe,me);return be.concat(Ce).concat(ve)}}collectNodesFromOwner(oe){const fe=this._decorationsTree0.collectNodesFromOwner(oe),pe=this._decorationsTree1.collectNodesFromOwner(oe),me=this._injectedTextDecorationsTree.collectNodesFromOwner(oe);return fe.concat(pe).concat(me)}collectNodesPostOrder(){const oe=this._decorationsTree0.collectNodesPostOrder(),fe=this._decorationsTree1.collectNodesPostOrder(),pe=this._injectedTextDecorationsTree.collectNodesPostOrder();return oe.concat(fe).concat(pe)}insert(oe){j(oe)?this._injectedTextDecorationsTree.insert(oe):Z(oe)?this._decorationsTree1.insert(oe):this._decorationsTree0.insert(oe)}delete(oe){j(oe)?this._injectedTextDecorationsTree.delete(oe):Z(oe)?this._decorationsTree1.delete(oe):this._decorationsTree0.delete(oe)}getNodeRange(oe,fe){const pe=oe.getVersionId();return fe.cachedVersionId!==pe&&this._resolveNode(fe,pe),fe.range===null&&(fe.range=oe.getRangeAt(fe.cachedAbsoluteStart,fe.cachedAbsoluteEnd)),fe.range}_resolveNode(oe,fe){j(oe)?this._injectedTextDecorationsTree.resolveNode(oe,fe):Z(oe)?this._decorationsTree1.resolveNode(oe,fe):this._decorationsTree0.resolveNode(oe,fe)}acceptReplace(oe,fe,pe,me){this._decorationsTree0.acceptReplace(oe,fe,pe,me),this._decorationsTree1.acceptReplace(oe,fe,pe,me),this._injectedTextDecorationsTree.acceptReplace(oe,fe,pe,me)}}function Y(ue){return ue.replace(/[^a-z0-9\-_]/gi," ")}class ${constructor(oe){this.color=oe.color||"",this.darkColor=oe.darkColor||""}}class J extends ${constructor(oe){super(oe);this._resolvedColor=null,this.position=typeof oe.position=="number"?oe.position:c.OverviewRulerLane.Center}getColor(oe){return this._resolvedColor||(oe.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,oe):this._resolvedColor=this._resolveColor(this.color,oe)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(oe,fe){if(typeof oe=="string")return oe;const pe=oe?fe.getColor(oe.id):null;return pe?pe.toString():""}}e.ModelDecorationOverviewRulerOptions=J;class ee extends ${constructor(oe){super(oe);this.position=oe.position}getColor(oe){return this._resolvedColor||(oe.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,oe):this._resolvedColor=this._resolveColor(this.color,oe)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(oe,fe){return typeof oe=="string"?f.Color.fromHex(oe):fe.getColor(oe.id)}}e.ModelDecorationMinimapOptions=ee;class te{constructor(oe){this.content=oe.content||"",this.inlineClassName=oe.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=oe.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=oe.attachedData||null,this.cursorStops=oe.cursorStops||null}static from(oe){return oe instanceof te?oe:new te(oe)}}e.ModelDecorationInjectedTextOptions=te;class se{constructor(oe){this.description=oe.description,this.stickiness=oe.stickiness||0,this.zIndex=oe.zIndex||0,this.className=oe.className?Y(oe.className):null,this.hoverMessage=oe.hoverMessage||null,this.glyphMarginHoverMessage=oe.glyphMarginHoverMessage||null,this.isWholeLine=oe.isWholeLine||!1,this.showIfCollapsed=oe.showIfCollapsed||!1,this.collapseOnReplaceEdit=oe.collapseOnReplaceEdit||!1,this.overviewRuler=oe.overviewRuler?new J(oe.overviewRuler):null,this.minimap=oe.minimap?new ee(oe.minimap):null,this.glyphMarginClassName=oe.glyphMarginClassName?Y(oe.glyphMarginClassName):null,this.linesDecorationsClassName=oe.linesDecorationsClassName?Y(oe.linesDecorationsClassName):null,this.firstLineDecorationClassName=oe.firstLineDecorationClassName?Y(oe.firstLineDecorationClassName):null,this.marginClassName=oe.marginClassName?Y(oe.marginClassName):null,this.inlineClassName=oe.inlineClassName?Y(oe.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=oe.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=oe.beforeContentClassName?Y(oe.beforeContentClassName):null,this.afterContentClassName=oe.afterContentClassName?Y(oe.afterContentClassName):null,this.after=oe.after?te.from(oe.after):null,this.before=oe.before?te.from(oe.before):null,this.hideInCommentTokens=oe.hideInCommentTokens??!1,this.hideInStringTokens=oe.hideInStringTokens??!1}static register(oe){return new se(oe)}static createDynamic(oe){return new se(oe)}}e.ModelDecorationOptions=se,se.EMPTY=se.register({description:"empty"});const ie=[se.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),se.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),se.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),se.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function ce(ue){return ue instanceof se?ue:se.createDynamic(ue)}class le extends k.Disposable{constructor(oe){super();this.handleBeforeFire=oe,this._actual=this._register(new A.Emitter),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1}hasListeners(){return this._actual.hasListeners()}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){if(this._deferredCnt--,this._deferredCnt===0){if(this._shouldFire){this.handleBeforeFire(this._affectedInjectedTextLines);const oe={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler};this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._actual.fire(oe)}this._affectedInjectedTextLines?.clear(),this._affectedInjectedTextLines=null}}recordLineAffectedByInjectedText(oe){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(oe)}checkAffectedAndFire(oe){this._affectsMinimap||(this._affectsMinimap=!!(oe.minimap&&oe.minimap.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!!(oe.overviewRuler&&oe.overviewRuler.color)),this._shouldFire=!0}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._shouldFire=!0}}e.DidChangeDecorationsEmitter=le;class ae extends k.Disposable{constructor(){super();this._fastEmitter=this._register(new A.Emitter),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new A.Emitter),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}hasListeners(){return this._fastEmitter.hasListeners()||this._slowEmitter.hasListeners()}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(oe=null){if(this._deferredCnt--,this._deferredCnt===0&&this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=oe;const fe=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(fe),this._slowEmitter.fire(fe)}}fire(oe){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(oe):this._deferredEvent=oe;return}this._fastEmitter.fire(oe),this._slowEmitter.fire(oe)}}e.DidChangeContentEmitter=ae}),define(ne[558],re([1,0,6,2,14,22,136,20,93,455,126,42,52,113,8,11,30,12,31,147,116,394,18,748,725,51,124,228,151,62]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModelSemanticColoring=e.isSemanticColoringEnabled=e.SEMANTIC_HIGHLIGHTING_SETTING_ID=e.ModelService=void 0;function T(z){return z.toString()}function R(z){const U=new u.StringSHA1,H=z.createSnapshot();let K;for(;K=H.read();)U.update(K);return U.digest()}class O{constructor(U,H,K){this._modelEventListeners=new f.DisposableStore,this.model=U,this._languageSelection=null,this._languageSelectionListener=null,this._modelEventListeners.add(U.onWillDispose(()=>H(U))),this._modelEventListeners.add(U.onDidChangeLanguage(G=>K(U,G)))}_disposeLanguageSelection(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null)}dispose(){this._modelEventListeners.dispose(),this._disposeLanguageSelection()}setLanguage(U){this._disposeLanguageSelection(),this._languageSelection=U,this._languageSelectionListener=this._languageSelection.onDidChange(()=>this.model.setMode(U.languageId)),this.model.setMode(U.languageId)}}const x=_.isLinux||_.isMacintosh?1:2;class F{constructor(U,H,K,G,q,Z,j,X){this.uri=U,this.initialUndoRedoSnapshot=H,this.time=K,this.sharesUndoRedoStack=G,this.heapSize=q,this.sha1=Z,this.versionId=j,this.alternativeVersionId=X}}let L=class xi extends f.Disposable{constructor(U,H,K,G,q,Z,j,X,Y){super();this._configurationService=U,this._resourcePropertiesService=H,this._themeService=K,this._logService=G,this._undoRedoService=q,this._languageService=Z,this._languageConfigurationService=j,this._languageFeatureDebounceService=X,this._onModelAdded=this._register(new t.Emitter),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new t.Emitter),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new t.Emitter),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._semanticStyling=this._register(new B(this._themeService,this._languageService,this._logService)),this._register(this._configurationService.onDidChangeConfiguration(()=>this._updateModelOptions())),this._updateModelOptions(),this._register(new N(this._semanticStyling,this,this._themeService,this._configurationService,this._languageFeatureDebounceService,Y))}static _readModelOptions(U,H){let K=w.EDITOR_MODEL_DEFAULTS.tabSize;if(U.editor&&typeof U.editor.tabSize!="undefined"){const ee=parseInt(U.editor.tabSize,10);isNaN(ee)||(K=ee),K<1&&(K=1)}let G=K;if(U.editor&&typeof U.editor.indentSize!="undefined"&&U.editor.indentSize!=="tabSize"){const ee=parseInt(U.editor.indentSize,10);isNaN(ee)||(G=ee),G<1&&(G=1)}let q=w.EDITOR_MODEL_DEFAULTS.insertSpaces;U.editor&&typeof U.editor.insertSpaces!="undefined"&&(q=U.editor.insertSpaces==="false"?!1:Boolean(U.editor.insertSpaces));let Z=x;const j=U.eol;j===`\r `?Z=2:j===` `&&(Z=1);let X=w.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace;U.editor&&typeof U.editor.trimAutoWhitespace!="undefined"&&(X=U.editor.trimAutoWhitespace==="false"?!1:Boolean(U.editor.trimAutoWhitespace));let Y=w.EDITOR_MODEL_DEFAULTS.detectIndentation;U.editor&&typeof U.editor.detectIndentation!="undefined"&&(Y=U.editor.detectIndentation==="false"?!1:Boolean(U.editor.detectIndentation));let $=w.EDITOR_MODEL_DEFAULTS.largeFileOptimizations;U.editor&&typeof U.editor.largeFileOptimizations!="undefined"&&($=U.editor.largeFileOptimizations==="false"?!1:Boolean(U.editor.largeFileOptimizations));let J=w.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions;return U.editor?.bracketPairColorization&&typeof U.editor.bracketPairColorization=="object"&&(J={enabled:!!U.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!U.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:H,tabSize:K,indentSize:G,insertSpaces:q,detectIndentation:Y,defaultEOL:Z,trimAutoWhitespace:X,largeFileOptimizations:$,bracketPairColorizationOptions:J}}_getEOL(U,H){if(U)return this._resourcePropertiesService.getEOL(U,H);const K=this._configurationService.getValue("files.eol",{overrideIdentifier:H});return K&&typeof K=="string"&&K!=="auto"?K:_.OS===3||_.OS===2?` `:`\r `}_shouldRestoreUndoStack(){const U=this._configurationService.getValue("files.restoreUndoStack");return typeof U=="boolean"?U:!0}getCreationOptions(U,H,K){let G=this._modelCreationOptionsByLanguageAndResource[U+H];if(!G){const q=this._configurationService.getValue("editor",{overrideIdentifier:U,resource:H}),Z=this._getEOL(H,U);G=xi._readModelOptions({editor:q,eol:Z},K),this._modelCreationOptionsByLanguageAndResource[U+H]=G}return G}_updateModelOptions(){const U=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const H=Object.keys(this._models);for(let K=0,G=H.length;K<G;K++){const q=H[K],Z=this._models[q],j=Z.model.getLanguageId(),X=Z.model.uri,Y=U[j+X],$=this.getCreationOptions(j,X,Z.model.isForSimpleWidget);xi._setModelOptionsForModel(Z.model,$,Y)}}static _setModelOptionsForModel(U,H,K){K&&K.defaultEOL!==H.defaultEOL&&U.getLineCount()===1&&U.setEOL(H.defaultEOL===1?0:1),!(K&&K.detectIndentation===H.detectIndentation&&K.insertSpaces===H.insertSpaces&&K.tabSize===H.tabSize&&K.indentSize===H.indentSize&&K.trimAutoWhitespace===H.trimAutoWhitespace&&(0,d.equals)(K.bracketPairColorizationOptions,H.bracketPairColorizationOptions))&&(H.detectIndentation?(U.detectIndentation(H.insertSpaces,H.tabSize),U.updateOptions({trimAutoWhitespace:H.trimAutoWhitespace,bracketColorizationOptions:H.bracketPairColorizationOptions})):U.updateOptions({insertSpaces:H.insertSpaces,tabSize:H.tabSize,indentSize:H.indentSize,trimAutoWhitespace:H.trimAutoWhitespace,bracketColorizationOptions:H.bracketPairColorizationOptions}))}_insertDisposedModel(U){this._disposedModels.set(T(U.uri),U),this._disposedModelsHeapSize+=U.heapSize}_removeDisposedModel(U){const H=this._disposedModels.get(T(U));return H&&(this._disposedModelsHeapSize-=H.heapSize),this._disposedModels.delete(T(U)),H}_ensureDisposedModelsHeapSize(U){if(this._disposedModelsHeapSize>U){const H=[];for(this._disposedModels.forEach(K=>{K.sharesUndoRedoStack||H.push(K)}),H.sort((K,G)=>K.time-G.time);H.length>0&&this._disposedModelsHeapSize>U;){const K=H.shift();this._removeDisposedModel(K.uri),K.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(K.initialUndoRedoSnapshot)}}}_createModelData(U,H,K,G){const q=this.getCreationOptions(H,K,G),Z=new I.TextModel(U,H,q,K,this._undoRedoService,this._languageService,this._languageConfigurationService);if(K&&this._disposedModels.has(T(K))){const Y=this._removeDisposedModel(K),$=this._undoRedoService.getElements(K),J=R(Z)===Y.sha1;if(J||Y.sharesUndoRedoStack){for(const ee of $.past)(0,a.isEditStackElement)(ee)&&ee.matchesResource(K)&&ee.setModel(Z);for(const ee of $.future)(0,a.isEditStackElement)(ee)&&ee.matchesResource(K)&&ee.setModel(Z);this._undoRedoService.setElementsValidFlag(K,!0,ee=>(0,a.isEditStackElement)(ee)&&ee.matchesResource(K)),J&&(Z._overwriteVersionId(Y.versionId),Z._overwriteAlternativeVersionId(Y.alternativeVersionId),Z._overwriteInitialUndoRedoSnapshot(Y.initialUndoRedoSnapshot))}else Y.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(Y.initialUndoRedoSnapshot)}const j=T(Z.uri);if(this._models[j])throw new Error("ModelService: Cannot add model because it already exists!");const X=new O(Z,Y=>this._onWillDispose(Y),(Y,$)=>this._onDidChangeLanguage(Y,$));return this._models[j]=X,X}updateModel(U,H){const K=this.getCreationOptions(U.getLanguageId(),U.uri,U.isForSimpleWidget),{textBuffer:G,disposable:q}=(0,I.createTextBuffer)(H,K.defaultEOL);if(U.equalsTextBuffer(G)){q.dispose();return}U.pushStackElement(),U.pushEOL(G.getEOL()===`\r `?1:0),U.pushEditOperations([],xi._computeEdits(U,G),()=>[]),U.pushStackElement(),q.dispose()}static _commonPrefix(U,H,K,G,q,Z){const j=Math.min(H,q);let X=0;for(let Y=0;Y<j&&U.getLineContent(K+Y)===G.getLineContent(Z+Y);Y++)X++;return X}static _commonSuffix(U,H,K,G,q,Z){const j=Math.min(H,q);let X=0;for(let Y=0;Y<j&&U.getLineContent(K+H-Y)===G.getLineContent(Z+q-Y);Y++)X++;return X}static _computeEdits(U,H){const K=U.getLineCount(),G=H.getLineCount(),q=this._commonPrefix(U,K,1,H,G,1);if(K===G&&q===K)return[];const Z=this._commonSuffix(U,K-q,q,H,G-q,q);let j,X;return Z>0?(j=new D.Range(q+1,1,K-Z+1,1),X=new D.Range(q+1,1,G-Z+1,1)):q>0?(j=new D.Range(q,U.getLineMaxColumn(q),K,U.getLineMaxColumn(K)),X=new D.Range(q,1+H.getLineLength(q),G,1+H.getLineLength(G))):(j=new D.Range(1,1,K,U.getLineMaxColumn(K)),X=new D.Range(1,1,G,1+H.getLineLength(G))),[k.EditOperation.replaceMove(j,H.getValueInRange(X,0))]}createModel(U,H,K,G=!1){let q;return H?(q=this._createModelData(U,H.languageId,K,G),this.setMode(q.model,H)):q=this._createModelData(U,v.PLAINTEXT_LANGUAGE_ID,K,G),this._onModelAdded.fire(q.model),q.model}setMode(U,H){if(!H)return;const K=this._models[T(U.uri)];!K||K.setLanguage(H)}destroyModel(U){const H=this._models[T(U)];!H||H.model.dispose()}getModels(){const U=[],H=Object.keys(this._models);for(let K=0,G=H.length;K<G;K++){const q=H[K];U.push(this._models[q].model)}return U}getModel(U){const H=T(U),K=this._models[H];return K?K.model:null}getSemanticTokensProviderStyling(U){return this._semanticStyling.get(U)}_schemaShouldMaintainUndoRedoElements(U){return U.scheme===n.Schemas.file||U.scheme===n.Schemas.vscodeRemote||U.scheme===n.Schemas.vscodeUserData||U.scheme===n.Schemas.vscodeNotebookCell||U.scheme==="fake-fs"}_onWillDispose(U){const H=T(U.uri),K=this._models[H],G=this._undoRedoService.getUriComparisonKey(U.uri)!==U.uri.toString();let q=!1,Z=0;if(G||this._shouldRestoreUndoStack()&&this._schemaShouldMaintainUndoRedoElements(U.uri)){const X=this._undoRedoService.getElements(U.uri);if(X.past.length>0||X.future.length>0){for(const Y of X.past)(0,a.isEditStackElement)(Y)&&Y.matchesResource(U.uri)&&(q=!0,Z+=Y.heapSize(U.uri),Y.setModel(U.uri));for(const Y of X.future)(0,a.isEditStackElement)(Y)&&Y.matchesResource(U.uri)&&(q=!0,Z+=Y.heapSize(U.uri),Y.setModel(U.uri))}}const j=xi.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(q)if(!G&&Z>j){const X=K.model.getInitialUndoRedoSnapshot();X!==null&&this._undoRedoService.restoreSnapshot(X)}else this._ensureDisposedModelsHeapSize(j-Z),this._undoRedoService.setElementsValidFlag(U.uri,!1,X=>(0,a.isEditStackElement)(X)&&X.matchesResource(U.uri)),this._insertDisposedModel(new F(U.uri,K.model.getInitialUndoRedoSnapshot(),Date.now(),G,Z,R(U),U.getVersionId(),U.getAlternativeVersionId()));else if(!G){const X=K.model.getInitialUndoRedoSnapshot();X!==null&&this._undoRedoService.restoreSnapshot(X)}delete this._models[H],K.dispose(),delete this._modelCreationOptionsByLanguageAndResource[U.getLanguageId()+U.uri],this._onModelRemoved.fire(U)}_onDidChangeLanguage(U,H){const K=H.oldLanguage,G=U.getLanguageId(),q=this.getCreationOptions(K,U.uri,U.isForSimpleWidget),Z=this.getCreationOptions(G,U.uri,U.isForSimpleWidget);xi._setModelOptionsForModel(U,Z,q),this._onModelModeChanged.fire({model:U,oldLanguageId:K})}};L.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024,L=Ee([W(0,i.IConfigurationService),W(1,c.ITextResourcePropertiesService),W(2,l.IThemeService),W(3,r.ILogService),W(4,p.IUndoRedoService),W(5,C.ILanguageService),W(6,m.ILanguageConfigurationService),W(7,b.ILanguageFeatureDebounceService),W(8,y.ILanguageFeaturesService)],L),e.ModelService=L,e.SEMANTIC_HIGHLIGHTING_SETTING_ID="editor.semanticHighlighting";function M(z,U,H){const K=H.getValue(e.SEMANTIC_HIGHLIGHTING_SETTING_ID,{overrideIdentifier:z.getLanguageId(),resource:z.uri})?.enabled;return typeof K=="boolean"?K:U.getColorTheme().semanticHighlighting}e.isSemanticColoringEnabled=M;let N=class extends f.Disposable{constructor(U,H,K,G,q,Z){super();this._watchers=Object.create(null),this._semanticStyling=U;const j=$=>{this._watchers[$.uri.toString()]=new V($,this._semanticStyling,K,q,Z)},X=($,J)=>{J.dispose(),delete this._watchers[$.uri.toString()]},Y=()=>{for(let $ of H.getModels()){const J=this._watchers[$.uri.toString()];M($,K,G)?J||j($):J&&X($,J)}};this._register(H.onModelAdded($=>{M($,K,G)&&j($)})),this._register(H.onModelRemoved($=>{const J=this._watchers[$.uri.toString()];J&&X($,J)})),this._register(G.onDidChangeConfiguration($=>{$.affectsConfiguration(e.SEMANTIC_HIGHLIGHTING_SETTING_ID)&&Y()})),this._register(K.onDidColorThemeChange(Y))}};N=Ee([W(1,o.IModelService),W(2,l.IThemeService),W(3,i.IConfigurationService),W(4,b.ILanguageFeatureDebounceService),W(5,y.ILanguageFeaturesService)],N);class B extends f.Disposable{constructor(U,H,K){super();this._themeService=U,this._languageService=H,this._logService=K,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}get(U){return this._caches.has(U)||this._caches.set(U,new h.SemanticTokensProviderStyling(U.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(U)}}class P{constructor(U,H,K){this.provider=U,this.resultId=H,this.data=K}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}let V=class Di extends f.Disposable{constructor(U,H,K,G,q){super();this._isDisposed=!1,this._model=U,this._semanticStyling=H,this._provider=q.documentSemanticTokensProvider,this._debounceInformation=G.for(this._provider,"DocumentSemanticTokens",{min:Di.REQUEST_MIN_DELAY,max:Di.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new S.RunOnceScheduler(()=>this._fetchDocumentSemanticTokensNow(),Di.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));const Z=()=>{(0,f.dispose)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const j of this._provider.all(U))typeof j.onDidChange=="function"&&this._documentProvidersChangeListeners.push(j.onDidChange(()=>this._fetchDocumentSemanticTokens.schedule(0)))};Z(),this._register(this._provider.onDidChange(()=>{Z(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(K.onDidColorThemeChange(j=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!(0,g.hasDocumentSemanticTokensProvider)(this._provider,this._model)){this._currentDocumentResponse&&this._model.setSemanticTokens(null,!1);return}const U=new s.CancellationTokenSource,H=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,K=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,G=(0,g.getDocumentSemanticTokens)(this._provider,this._model,H,K,U.token);this._currentDocumentRequestCancellationTokenSource=U;const q=[],Z=this._model.onDidChangeContent(X=>{q.push(X)}),j=new E.StopWatch(!1);G.then(X=>{if(this._debounceInformation.update(this._model,j.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,Z.dispose(),!X)this._setDocumentSemanticTokens(null,null,null,q);else{const{provider:Y,tokens:$}=X,J=this._semanticStyling.get(Y);this._setDocumentSemanticTokens(Y,$||null,J,q)}},X=>{X&&(A.isCancellationError(X)||typeof X.message=="string"&&X.message.indexOf("busy")!==-1)||A.onUnexpectedError(X),this._currentDocumentRequestCancellationTokenSource=null,Z.dispose(),q.length>0&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(U,H,K,G,q){for(let Z=0;Z<q;Z++)K[G+Z]=U[H+Z]}_setDocumentSemanticTokens(U,H,K,G){const q=this._currentDocumentResponse,Z=()=>{G.length>0&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){U&&H&&U.releaseDocumentSemanticTokens(H.resultId);return}if(!U||!K){this._model.setSemanticTokens(null,!1);return}if(!H){this._model.setSemanticTokens(null,!0),Z();return}if((0,g.isSemanticTokensEdits)(H)){if(!q){this._model.setSemanticTokens(null,!0);return}if(H.edits.length===0)H={resultId:H.resultId,data:q.data};else{let j=0;for(const ee of H.edits)j+=(ee.data?ee.data.length:0)-ee.deleteCount;const X=q.data,Y=new Uint32Array(X.length+j);let $=X.length,J=Y.length;for(let ee=H.edits.length-1;ee>=0;ee--){const te=H.edits[ee],se=$-(te.start+te.deleteCount);se>0&&(Di._copy(X,$-se,Y,J-se,se),J-=se),te.data&&(Di._copy(te.data,0,Y,J-te.data.length,te.data.length),J-=te.data.length),$=te.start}$>0&&Di._copy(X,0,Y,0,$),H={resultId:H.resultId,data:Y}}}if((0,g.isSemanticTokens)(H)){this._currentDocumentResponse=new P(U,H.resultId,H.data);const j=(0,h.toMultilineTokens2)(H,K,this._model.getLanguageId());if(G.length>0)for(const X of G)for(const Y of j)for(const $ of X.changes)Y.applyEdit($.range,$.text);this._model.setSemanticTokens(j,!0)}else this._model.setSemanticTokens(null,!0);Z()}};V.REQUEST_MIN_DELAY=300,V.REQUEST_MAX_DELAY=2e3,V=Ee([W(2,l.IThemeService),W(3,b.ILanguageFeatureDebounceService),W(4,y.ILanguageFeaturesService)],V),e.ModelSemanticColoring=V}),define(ne[2061],re([1,0,52,61,2,147,394]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModelUndoRedoParticipant=void 0;let D=class extends _.Disposable{constructor(w,v,C){super();this._modelService=w,this._textModelService=v,this._undoRedoService=C,this._register(this._modelService.onModelRemoved(o=>{const c=this._undoRedoService.getElements(o.uri);if(!(c.past.length===0&&c.future.length===0)){for(const i of c.past)i instanceof k.MultiModelEditStackElement&&i.setDelegate(this);for(const i of c.future)i instanceof k.MultiModelEditStackElement&&i.setDelegate(this)}}))}prepareUndoRedo(w){const v=w.getMissingModels();if(v.length===0)return _.Disposable.None;const C=v.map(async o=>{try{return await this._textModelService.createModelReference(o)}catch{return _.Disposable.None}});return Promise.all(C).then(o=>({dispose:()=>(0,_.dispose)(o)}))}};D=Ee([W(0,t.IModelService),W(1,f.ITextModelService),W(2,A.IUndoRedoService)],D),e.ModelUndoRedoParticipant=D}),define(ne[2062],re([1,0,15,49,20,531,93,307,535,1182,344,259]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewModelLinesFromModelAsIs=e.ViewModelLinesFromProjectedModel=void 0;class o{constructor(a,n,h,g,d,m,b,E,y){this._editorId=a,this.model=n,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=h,this._monospaceLineBreaksComputerFactory=g,this.fontInfo=d,this.tabSize=m,this.wrappingStrategy=b,this.wrappingColumn=E,this.wrappingIndent=y,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new s(this)}_constructLines(a,n){this.modelLineProjections=[],a&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const h=this.model.getLinesContent(),g=this.model.getInjectedTextDecorations(this._editorId),d=h.length,m=this.createLineBreaksComputer(),b=new t.ArrayQueue(D.LineInjectedText.fromDecorations(g));for(let L=0;L<d;L++){const M=b.takeWhile(N=>N.lineNumber===L+1);m.addRequest(h[L],M,n?n[L]:null)}const E=m.finalize(),y=[],T=this.hiddenAreasDecorationIds.map(L=>this.model.getDecorationRange(L)).sort(_.Range.compareRangesUsingStarts);let R=1,O=0,x=-1,F=x+1<T.length?O+1:d+2;for(let L=0;L<d;L++){const M=L+1;M===F&&(x++,R=T[x].startLineNumber,O=T[x].endLineNumber,F=x+1<T.length?O+1:d+2);const N=M>=R&&M<=O,B=(0,w.createModelLineProjection)(E[L],!N);y[L]=B.getViewLineCount(),this.modelLineProjections[L]=B}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new v.ConstantTimePrefixSumComputer(y)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map(a=>this.model.getDecorationRange(a))}setHiddenAreas(a){const n=a.map(O=>this.model.validateRange(O)),h=c(n),g=this.hiddenAreasDecorationIds.map(O=>this.model.getDecorationRange(O)).sort(_.Range.compareRangesUsingStarts);if(h.length===g.length){let O=!1;for(let x=0;x<h.length;x++)if(!h[x].equalsRange(g[x])){O=!0;break}if(!O)return!1}const d=h.map(O=>({range:O,options:k.ModelDecorationOptions.EMPTY}));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,d);const m=h;let b=1,E=0,y=-1,T=y+1<m.length?E+1:this.modelLineProjections.length+2,R=!1;for(let O=0;O<this.modelLineProjections.length;O++){const x=O+1;x===T&&(y++,b=m[y].startLineNumber,E=m[y].endLineNumber,T=y+1<m.length?E+1:this.modelLineProjections.length+2);let F=!1;if(x>=b&&x<=E?this.modelLineProjections[O].isVisible()&&(this.modelLineProjections[O]=this.modelLineProjections[O].setVisible(!1),F=!0):(R=!0,this.modelLineProjections[O].isVisible()||(this.modelLineProjections[O]=this.modelLineProjections[O].setVisible(!0),F=!0)),F){const L=this.modelLineProjections[O].getViewLineCount();this.projectedModelLineLineCounts.setValue(O,L)}}return R||this.setHiddenAreas([]),!0}modelPositionIsVisible(a,n){return a<1||a>this.modelLineProjections.length?!1:this.modelLineProjections[a-1].isVisible()}getModelLineViewLineCount(a){return a<1||a>this.modelLineProjections.length?1:this.modelLineProjections[a-1].getViewLineCount()}setTabSize(a){return this.tabSize===a?!1:(this.tabSize=a,this._constructLines(!1,null),!0)}setWrappingSettings(a,n,h,g){const d=this.fontInfo.equals(a),m=this.wrappingStrategy===n,b=this.wrappingColumn===h,E=this.wrappingIndent===g;if(d&&m&&b&&E)return!1;const y=d&&m&&!b&&E;this.fontInfo=a,this.wrappingStrategy=n,this.wrappingColumn=h,this.wrappingIndent=g;let T=null;if(y){T=[];for(let R=0,O=this.modelLineProjections.length;R<O;R++)T[R]=this.modelLineProjections[R].getProjectionData()}return this._constructLines(!1,T),!0}createLineBreaksComputer(){return(this.wrappingStrategy==="advanced"?this._domLineBreaksComputerFactory:this._monospaceLineBreaksComputerFactory).createLineBreaksComputer(this.fontInfo,this.tabSize,this.wrappingColumn,this.wrappingIndent)}onModelFlushed(){this._constructLines(!0,null)}onModelLinesDeleted(a,n,h){if(!a||a<=this._validModelVersionId)return null;const g=n===1?1:this.projectedModelLineLineCounts.getPrefixSum(n-1)+1,d=this.projectedModelLineLineCounts.getPrefixSum(h);return this.modelLineProjections.splice(n-1,h-n+1),this.projectedModelLineLineCounts.removeValues(n-1,h-n+1),new I.ViewLinesDeletedEvent(g,d)}onModelLinesInserted(a,n,h,g){if(!a||a<=this._validModelVersionId)return null;const d=n>2&&!this.modelLineProjections[n-2].isVisible(),m=n===1?1:this.projectedModelLineLineCounts.getPrefixSum(n-1)+1;let b=0;const E=[],y=[];for(let T=0,R=g.length;T<R;T++){const O=(0,w.createModelLineProjection)(g[T],!d);E.push(O);const x=O.getViewLineCount();b+=x,y[T]=x}return this.modelLineProjections=this.modelLineProjections.slice(0,n-1).concat(E).concat(this.modelLineProjections.slice(n-1)),this.projectedModelLineLineCounts.insertValues(n-1,y),new I.ViewLinesInsertedEvent(m,m+b-1)}onModelLineChanged(a,n,h){if(a!==null&&a<=this._validModelVersionId)return[!1,null,null,null];const g=n-1,d=this.modelLineProjections[g].getViewLineCount(),m=this.modelLineProjections[g].isVisible(),b=(0,w.createModelLineProjection)(h,m);this.modelLineProjections[g]=b;const E=this.modelLineProjections[g].getViewLineCount();let y=!1,T=0,R=-1,O=0,x=-1,F=0,L=-1;d>E?(T=this.projectedModelLineLineCounts.getPrefixSum(n-1)+1,R=T+E-1,F=R+1,L=F+(d-E)-1,y=!0):d<E?(T=this.projectedModelLineLineCounts.getPrefixSum(n-1)+1,R=T+d-1,O=R+1,x=O+(E-d)-1,y=!0):(T=this.projectedModelLineLineCounts.getPrefixSum(n-1)+1,R=T+E-1),this.projectedModelLineLineCounts.setValue(g,E);const M=T<=R?new I.ViewLinesChangedEvent(T,R-T+1):null,N=O<=x?new I.ViewLinesInsertedEvent(O,x):null,B=F<=L?new I.ViewLinesDeletedEvent(F,L):null;return[y,M,N,B]}acceptVersionId(a){this._validModelVersionId=a,this.modelLineProjections.length===1&&!this.modelLineProjections[0].isVisible()&&this.setHiddenAreas([])}getViewLineCount(){return this.projectedModelLineLineCounts.getTotalSum()}_toValidViewLineNumber(a){if(a<1)return 1;const n=this.getViewLineCount();return a>n?n:a|0}getActiveIndentGuide(a,n,h){a=this._toValidViewLineNumber(a),n=this._toValidViewLineNumber(n),h=this._toValidViewLineNumber(h);const g=this.convertViewPositionToModelPosition(a,this.getViewLineMinColumn(a)),d=this.convertViewPositionToModelPosition(n,this.getViewLineMinColumn(n)),m=this.convertViewPositionToModelPosition(h,this.getViewLineMinColumn(h)),b=this.model.guides.getActiveIndentGuide(g.lineNumber,d.lineNumber,m.lineNumber),E=this.convertModelPositionToViewPosition(b.startLineNumber,1),y=this.convertModelPositionToViewPosition(b.endLineNumber,this.model.getLineMaxColumn(b.endLineNumber));return{startLineNumber:E.lineNumber,endLineNumber:y.lineNumber,indent:b.indent}}getViewLineInfo(a){a=this._toValidViewLineNumber(a);const n=this.projectedModelLineLineCounts.getIndexOf(a-1),h=n.index,g=n.remainder;return new i(h+1,g)}getMinColumnOfViewLine(a){return this.modelLineProjections[a.modelLineNumber-1].getViewLineMinColumn(this.model,a.modelLineNumber,a.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(a){const n=this.modelLineProjections[a.modelLineNumber-1],h=n.getViewLineMinColumn(this.model,a.modelLineNumber,a.modelLineWrappedLineIdx),g=n.getModelColumnOfViewPosition(a.modelLineWrappedLineIdx,h);return new f.Position(a.modelLineNumber,g)}getModelEndPositionOfViewLine(a){const n=this.modelLineProjections[a.modelLineNumber-1],h=n.getViewLineMaxColumn(this.model,a.modelLineNumber,a.modelLineWrappedLineIdx),g=n.getModelColumnOfViewPosition(a.modelLineWrappedLineIdx,h);return new f.Position(a.modelLineNumber,g)}getViewLineInfosGroupedByModelRanges(a,n){const h=this.getViewLineInfo(a),g=this.getViewLineInfo(n),d=new Array;let m=this.getModelStartPositionOfViewLine(h),b=new Array;for(let E=h.modelLineNumber;E<=g.modelLineNumber;E++){const y=this.modelLineProjections[E-1];if(y.isVisible()){const T=E===h.modelLineNumber?h.modelLineWrappedLineIdx:0,R=E===g.modelLineNumber?g.modelLineWrappedLineIdx+1:y.getViewLineCount();for(let O=T;O<R;O++)b.push(new i(E,O))}if(!y.isVisible()&&m){const T=new f.Position(E-1,this.model.getLineMaxColumn(E-1)+1),R=_.Range.fromPositions(m,T);d.push(new S(R,b)),b=[],m=null}else y.isVisible()&&!m&&(m=new f.Position(E,1))}if(m){const E=_.Range.fromPositions(m,this.getModelEndPositionOfViewLine(g));d.push(new S(E,b))}return d}getViewLinesBracketGuides(a,n,h,g){const d=h?this.convertViewPositionToModelPosition(h.lineNumber,h.column):null,m=[];for(const b of this.getViewLineInfosGroupedByModelRanges(a,n)){const E=b.modelRange.startLineNumber,y=this.model.guides.getLinesBracketGuides(E,b.modelRange.endLineNumber,d,g);for(const T of b.viewLines)if(T.isWrappedLineContinuation&&this.getMinColumnOfViewLine(T)===1)m.push([]);else{let R=y[T.modelLineNumber-E];R=R.map(O=>O.horizontalLine?new A.IndentGuide(O.visibleColumn,O.className,new A.IndentGuideHorizontalLine(O.horizontalLine.top,this.convertModelPositionToViewPosition(T.modelLineNumber,O.horizontalLine.endColumn).column)):O),m.push(R)}}return m}getViewLinesIndentGuides(a,n){a=this._toValidViewLineNumber(a),n=this._toValidViewLineNumber(n);const h=this.convertViewPositionToModelPosition(a,this.getViewLineMinColumn(a)),g=this.convertViewPositionToModelPosition(n,this.getViewLineMaxColumn(n));let d=[];const m=[],b=[],E=h.lineNumber-1,y=g.lineNumber-1;let T=null;for(let F=E;F<=y;F++){const L=this.modelLineProjections[F];if(L.isVisible()){const M=L.getViewLineNumberOfModelPosition(0,F===E?h.column:1),N=L.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(F+1)),B=N-M+1;let P=0;B>1&&L.getViewLineMinColumn(this.model,F+1,N)===1&&(P=M===0?1:2),m.push(B),b.push(P),T===null&&(T=new f.Position(F+1,0))}else T!==null&&(d=d.concat(this.model.guides.getLinesIndentGuides(T.lineNumber,F)),T=null)}T!==null&&(d=d.concat(this.model.guides.getLinesIndentGuides(T.lineNumber,g.lineNumber)),T=null);const R=n-a+1,O=new Array(R);let x=0;for(let F=0,L=d.length;F<L;F++){let M=d[F];const N=Math.min(R-x,m[F]),B=b[F];let P;B===2?P=0:B===1?P=1:P=N;for(let V=0;V<N;V++)V===P&&(M=0),O[x++]=M}return O}getViewLineContent(a){const n=this.getViewLineInfo(a);return this.modelLineProjections[n.modelLineNumber-1].getViewLineContent(this.model,n.modelLineNumber,n.modelLineWrappedLineIdx)}getViewLineLength(a){const n=this.getViewLineInfo(a);return this.modelLineProjections[n.modelLineNumber-1].getViewLineLength(this.model,n.modelLineNumber,n.modelLineWrappedLineIdx)}getViewLineMinColumn(a){const n=this.getViewLineInfo(a);return this.modelLineProjections[n.modelLineNumber-1].getViewLineMinColumn(this.model,n.modelLineNumber,n.modelLineWrappedLineIdx)}getViewLineMaxColumn(a){const n=this.getViewLineInfo(a);return this.modelLineProjections[n.modelLineNumber-1].getViewLineMaxColumn(this.model,n.modelLineNumber,n.modelLineWrappedLineIdx)}getViewLineData(a){const n=this.getViewLineInfo(a);return this.modelLineProjections[n.modelLineNumber-1].getViewLineData(this.model,n.modelLineNumber,n.modelLineWrappedLineIdx)}getViewLinesData(a,n,h){a=this._toValidViewLineNumber(a),n=this._toValidViewLineNumber(n);const g=this.projectedModelLineLineCounts.getIndexOf(a-1);let d=a;const m=g.index,b=g.remainder,E=[];for(let y=m,T=this.model.getLineCount();y<T;y++){const R=this.modelLineProjections[y];if(!R.isVisible())continue;const O=y===m?b:0;let x=R.getViewLineCount()-O,F=!1;if(d+x>n&&(F=!0,x=n-d+1),R.getViewLinesData(this.model,y+1,O,x,d-a,h,E),d+=x,F)break}return E}validateViewPosition(a,n,h){a=this._toValidViewLineNumber(a);const g=this.projectedModelLineLineCounts.getIndexOf(a-1),d=g.index,m=g.remainder,b=this.modelLineProjections[d],E=b.getViewLineMinColumn(this.model,d+1,m),y=b.getViewLineMaxColumn(this.model,d+1,m);n<E&&(n=E),n>y&&(n=y);const T=b.getModelColumnOfViewPosition(m,n);return this.model.validatePosition(new f.Position(d+1,T)).equals(h)?new f.Position(a,n):this.convertModelPositionToViewPosition(h.lineNumber,h.column)}validateViewRange(a,n){const h=this.validateViewPosition(a.startLineNumber,a.startColumn,n.getStartPosition()),g=this.validateViewPosition(a.endLineNumber,a.endColumn,n.getEndPosition());return new _.Range(h.lineNumber,h.column,g.lineNumber,g.column)}convertViewPositionToModelPosition(a,n){const h=this.getViewLineInfo(a),g=this.modelLineProjections[h.modelLineNumber-1].getModelColumnOfViewPosition(h.modelLineWrappedLineIdx,n);return this.model.validatePosition(new f.Position(h.modelLineNumber,g))}convertViewRangeToModelRange(a){const n=this.convertViewPositionToModelPosition(a.startLineNumber,a.startColumn),h=this.convertViewPositionToModelPosition(a.endLineNumber,a.endColumn);return new _.Range(n.lineNumber,n.column,h.lineNumber,h.column)}convertModelPositionToViewPosition(a,n,h=2){const g=this.model.validatePosition(new f.Position(a,n)),d=g.lineNumber,m=g.column;let b=d-1,E=!1;for(;b>0&&!this.modelLineProjections[b].isVisible();)b--,E=!0;if(b===0&&!this.modelLineProjections[b].isVisible())return new f.Position(1,1);const y=1+this.projectedModelLineLineCounts.getPrefixSum(b);let T;return E?T=this.modelLineProjections[b].getViewPositionOfModelPosition(y,this.model.getLineMaxColumn(b+1),h):T=this.modelLineProjections[d-1].getViewPositionOfModelPosition(y,m,h),T}convertModelRangeToViewRange(a,n=0){if(a.isEmpty()){const h=this.convertModelPositionToViewPosition(a.startLineNumber,a.startColumn,n);return _.Range.fromPositions(h)}else{const h=this.convertModelPositionToViewPosition(a.startLineNumber,a.startColumn,1),g=this.convertModelPositionToViewPosition(a.endLineNumber,a.endColumn,0);return new _.Range(h.lineNumber,h.column,g.lineNumber,g.column)}}getViewLineNumberOfModelPosition(a,n){let h=a-1;if(this.modelLineProjections[h].isVisible()){const d=1+this.projectedModelLineLineCounts.getPrefixSum(h);return this.modelLineProjections[h].getViewLineNumberOfModelPosition(d,n)}for(;h>0&&!this.modelLineProjections[h].isVisible();)h--;if(h===0&&!this.modelLineProjections[h].isVisible())return 1;const g=1+this.projectedModelLineLineCounts.getPrefixSum(h);return this.modelLineProjections[h].getViewLineNumberOfModelPosition(g,this.model.getLineMaxColumn(h+1))}getDecorationsInRange(a,n,h){const g=this.convertViewPositionToModelPosition(a.startLineNumber,a.startColumn),d=this.convertViewPositionToModelPosition(a.endLineNumber,a.endColumn);if(d.lineNumber-g.lineNumber<=a.endLineNumber-a.startLineNumber)return this.model.getDecorationsInRange(new _.Range(g.lineNumber,1,d.lineNumber,d.column),n,h);let m=[];const b=g.lineNumber-1,E=d.lineNumber-1;let y=null;for(let x=b;x<=E;x++)if(this.modelLineProjections[x].isVisible())y===null&&(y=new f.Position(x+1,x===b?g.column:1));else if(y!==null){const L=this.model.getLineMaxColumn(x);m=m.concat(this.model.getDecorationsInRange(new _.Range(y.lineNumber,y.column,x,L),n,h)),y=null}y!==null&&(m=m.concat(this.model.getDecorationsInRange(new _.Range(y.lineNumber,y.column,d.lineNumber,d.column),n,h)),y=null),m.sort((x,F)=>{const L=_.Range.compareRangesUsingStarts(x.range,F.range);return L===0?x.id<F.id?-1:x.id>F.id?1:0:L});let T=[],R=0,O=null;for(const x of m){const F=x.id;O!==F&&(O=F,T[R++]=x)}return T}getInjectedTextAt(a){const n=this.getViewLineInfo(a.lineNumber);return this.modelLineProjections[n.modelLineNumber-1].getInjectedTextAt(n.modelLineWrappedLineIdx,a.column)}normalizePosition(a,n){const h=this.getViewLineInfo(a.lineNumber);return this.modelLineProjections[h.modelLineNumber-1].normalizePosition(h.modelLineWrappedLineIdx,a,n)}getLineIndentColumn(a){const n=this.getViewLineInfo(a);return n.modelLineWrappedLineIdx===0?this.model.getLineIndentColumn(n.modelLineNumber):0}}e.ViewModelLinesFromProjectedModel=o;function c(u){if(u.length===0)return[];const a=u.slice();a.sort(_.Range.compareRangesUsingStarts);const n=[];let h=a[0].startLineNumber,g=a[0].endLineNumber;for(let d=1,m=a.length;d<m;d++){const b=a[d];b.startLineNumber>g+1?(n.push(new _.Range(h,1,g,1)),h=b.startLineNumber,g=b.endLineNumber):b.endLineNumber>g&&(g=b.endLineNumber)}return n.push(new _.Range(h,1,g,1)),n}class i{constructor(a,n){this.modelLineNumber=a,this.modelLineWrappedLineIdx=n}get isWrappedLineContinuation(){return this.modelLineWrappedLineIdx>0}}class S{constructor(a,n){this.modelRange=a,this.viewLines=n}}class s{constructor(a){this._lines=a}convertViewPositionToModelPosition(a){return this._lines.convertViewPositionToModelPosition(a.lineNumber,a.column)}convertViewRangeToModelRange(a){return this._lines.convertViewRangeToModelRange(a)}validateViewPosition(a,n){return this._lines.validateViewPosition(a.lineNumber,a.column,n)}validateViewRange(a,n){return this._lines.validateViewRange(a,n)}convertModelPositionToViewPosition(a,n){return this._lines.convertModelPositionToViewPosition(a.lineNumber,a.column,n)}convertModelRangeToViewRange(a,n){return this._lines.convertModelRangeToViewRange(a,n)}modelPositionIsVisible(a){return this._lines.modelPositionIsVisible(a.lineNumber,a.column)}getModelLineViewLineCount(a){return this._lines.getModelLineViewLineCount(a)}getViewLineNumberOfModelPosition(a,n){return this._lines.getViewLineNumberOfModelPosition(a,n)}}var l;(function(u){u[u.BlockNone=0]="BlockNone",u[u.BlockSubsequent=1]="BlockSubsequent",u[u.BlockAll=2]="BlockAll"})(l||(l={}));class r{constructor(a){this.model=a}dispose(){}createCoordinatesConverter(){return new p(this)}getHiddenAreas(){return[]}setHiddenAreas(a){return!1}setTabSize(a){return!1}setWrappingSettings(a,n,h,g){return!1}createLineBreaksComputer(){const a=[];return{addRequest:(n,h,g)=>{a.push(null)},finalize:()=>a}}onModelFlushed(){}onModelLinesDeleted(a,n,h){return new I.ViewLinesDeletedEvent(n,h)}onModelLinesInserted(a,n,h,g){return new I.ViewLinesInsertedEvent(n,h)}onModelLineChanged(a,n,h){return[!1,new I.ViewLinesChangedEvent(n,1),null,null]}acceptVersionId(a){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(a,n,h){return{startLineNumber:a,endLineNumber:a,indent:0}}getViewLinesBracketGuides(a,n,h){return new Array(n-a+1).fill([])}getViewLinesIndentGuides(a,n){const h=n-a+1,g=new Array(h);for(let d=0;d<h;d++)g[d]=0;return g}getViewLineContent(a){return this.model.getLineContent(a)}getViewLineLength(a){return this.model.getLineLength(a)}getViewLineMinColumn(a){return this.model.getLineMinColumn(a)}getViewLineMaxColumn(a){return this.model.getLineMaxColumn(a)}getViewLineData(a){const n=this.model.getLineTokens(a),h=n.getLineContent();return new C.ViewLineData(h,!1,1,h.length+1,0,n.inflate(),null)}getViewLinesData(a,n,h){const g=this.model.getLineCount();a=Math.min(Math.max(1,a),g),n=Math.min(Math.max(1,n),g);const d=[];for(let m=a;m<=n;m++){const b=m-a;d[b]=h[b]?this.getViewLineData(m):null}return d}getDecorationsInRange(a,n,h){return this.model.getDecorationsInRange(a,n,h)}normalizePosition(a,n){return this.model.normalizePosition(a,n)}getLineIndentColumn(a){return this.model.getLineIndentColumn(a)}getInjectedTextAt(a){return null}}e.ViewModelLinesFromModelAsIs=r;class p{constructor(a){this._lines=a}_validPosition(a){return this._lines.model.validatePosition(a)}_validRange(a){return this._lines.model.validateRange(a)}convertViewPositionToModelPosition(a){return this._validPosition(a)}convertViewRangeToModelRange(a){return this._validRange(a)}validateViewPosition(a,n){return this._validPosition(n)}validateViewRange(a,n){return this._validRange(n)}convertModelPositionToViewPosition(a){return this._validPosition(a)}convertModelRangeToViewRange(a){return this._validRange(a)}modelPositionIsVisible(a){const n=this._lines.model.getLineCount();return!(a.lineNumber<1||a.lineNumber>n)}getModelLineViewLineCount(a){return 1}getViewLineNumberOfModelPosition(a,n){return a}}}),define(ne[2063],re([1,0,15,11,66,2,14,29,123,728,226,49,20,307,86,126,308,535,1186,704,259,720,536,2062]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewModel=void 0;const g=!0;class d extends A.Disposable{constructor(E,y,T,R,O,x,F,L){super();if(this.languageConfigurationService=F,this._themeService=L,this._editorId=E,this._configuration=y,this.model=T,this._eventDispatcher=new n.ViewModelEventDispatcher,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new v.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._tokenizeViewportSoon=this._register(new f.RunOnceScheduler(()=>this.tokenizeViewport(),50)),this._updateConfigurationViewLineCount=this._register(new f.RunOnceScheduler(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStartLine=-1,this._viewportStartLineTrackedRange=null,this._viewportStartLineDelta=0,g&&this.model.isTooLargeForTokenization())this._lines=new h.ViewModelLinesFromModelAsIs(this.model);else{const M=this._configuration.options,N=M.get(44),B=M.get(125),P=M.get(132),V=M.get(124);this._lines=new h.ViewModelLinesFromProjectedModel(this._editorId,this.model,R,O,N,this.model.getOptions().tabSize,B,P.wrappingColumn,V)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new w.CursorsController(T,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new r.ViewLayout(this._configuration,this.getLineCount(),x)),this._register(this.viewLayout.onDidScroll(M=>{M.scrollTopChanged&&this._tokenizeViewportSoon.schedule(),this._eventDispatcher.emitSingleViewEvent(new l.ViewScrollChangedEvent(M)),this._eventDispatcher.emitOutgoingEvent(new n.ScrollChangedEvent(M.oldScrollWidth,M.oldScrollLeft,M.oldScrollHeight,M.oldScrollTop,M.scrollWidth,M.scrollLeft,M.scrollHeight,M.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(M=>{this._eventDispatcher.emitOutgoingEvent(M)})),this._decorations=new a.ViewModelDecorations(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(M=>{try{const N=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(N,M)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(p.MinimapTokensColorTracker.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new l.ViewTokensColorsChangedEvent)})),this._register(this._themeService.onDidColorThemeChange(M=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new l.ViewThemeChangedEvent(M))})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,null,1),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(E){this._eventDispatcher.addViewEventHandler(E)}removeViewEventHandler(E){this._eventDispatcher.removeViewEventHandler(E)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}tokenizeViewport(){const E=this.viewLayout.getLinesViewportData(),y=new o.Range(E.startLineNumber,this.getLineMinColumn(E.startLineNumber),E.endLineNumber,this.getLineMaxColumn(E.endLineNumber)),T=this._toModelVisibleRanges(y);for(const R of T)this.model.tokenizeViewport(R.startLineNumber,R.endLineNumber)}setHasFocus(E){this._hasFocus=E,this._cursor.setHasFocus(E),this._eventDispatcher.emitSingleViewEvent(new l.ViewFocusChangedEvent(E)),this._eventDispatcher.emitOutgoingEvent(new n.FocusChangedEvent(!E,E))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new l.ViewCompositionStartEvent)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new l.ViewCompositionEndEvent)}_onConfigurationChanged(E,y){let T=null;if(this._viewportStartLine!==-1){const N=new C.Position(this._viewportStartLine,this.getLineMinColumn(this._viewportStartLine));T=this.coordinatesConverter.convertViewPositionToModelPosition(N)}let R=!1;const O=this._configuration.options,x=O.get(44),F=O.get(125),L=O.get(132),M=O.get(124);if(this._lines.setWrappingSettings(x,F,L.wrappingColumn,M)&&(E.emitViewEvent(new l.ViewFlushedEvent),E.emitViewEvent(new l.ViewLineMappingChangedEvent),E.emitViewEvent(new l.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(E),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.getCurrentScrollTop()!==0&&(R=!0),this._updateConfigurationViewLineCount.schedule()),y.hasChanged(81)&&(this._decorations.reset(),E.emitViewEvent(new l.ViewDecorationsChangedEvent(null))),E.emitViewEvent(new l.ViewConfigurationChangedEvent(y)),this.viewLayout.onConfigurationChanged(y),R&&T){const N=this.coordinatesConverter.convertModelPositionToViewPosition(T),B=this.viewLayout.getVerticalOffsetForLineNumber(N.lineNumber);this.viewLayout.setScrollPosition({scrollTop:B+this._viewportStartLineDelta},1)}v.CursorConfiguration.shouldRecreate(y)&&(this.cursorConfig=new v.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText(E=>{try{const y=this._eventDispatcher.beginEmitViewEvents();let T=!1,R=!1;const O=E.changes,x=E instanceof c.ModelRawContentChangedEvent?E.versionId:null,F=this._lines.createLineBreaksComputer();for(const N of O)switch(N.changeType){case 4:{for(let B=0;B<N.detail.length;B++){const P=N.detail[B];let V=N.injectedTexts[B];V&&(V=V.filter(z=>!z.ownerId||z.ownerId===this._editorId)),F.addRequest(P,V,null)}break}case 2:{let B=null;N.injectedText&&(B=N.injectedText.filter(P=>!P.ownerId||P.ownerId===this._editorId)),F.addRequest(N.detail,B,null);break}}const L=F.finalize(),M=new t.ArrayQueue(L);for(const N of O)switch(N.changeType){case 1:{this._lines.onModelFlushed(),y.emitViewEvent(new l.ViewFlushedEvent),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),T=!0;break}case 3:{const B=this._lines.onModelLinesDeleted(x,N.fromLineNumber,N.toLineNumber);B!==null&&(y.emitViewEvent(B),this.viewLayout.onLinesDeleted(B.fromLineNumber,B.toLineNumber)),T=!0;break}case 4:{const B=M.takeCount(N.detail.length),P=this._lines.onModelLinesInserted(x,N.fromLineNumber,N.toLineNumber,B);P!==null&&(y.emitViewEvent(P),this.viewLayout.onLinesInserted(P.fromLineNumber,P.toLineNumber)),T=!0;break}case 2:{const B=M.dequeue(),[P,V,z,U]=this._lines.onModelLineChanged(x,N.lineNumber,B);R=P,V&&y.emitViewEvent(V),z&&(y.emitViewEvent(z),this.viewLayout.onLinesInserted(z.fromLineNumber,z.toLineNumber)),U&&(y.emitViewEvent(U),this.viewLayout.onLinesDeleted(U.fromLineNumber,U.toLineNumber));break}case 5:break}x!==null&&this._lines.acceptVersionId(x),this.viewLayout.onHeightMaybeChanged(),!T&&R&&(y.emitViewEvent(new l.ViewLineMappingChangedEvent),y.emitViewEvent(new l.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(y),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}if(this._viewportStartLine=-1,this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&this._viewportStartLineTrackedRange){const y=this.model._getTrackedRange(this._viewportStartLineTrackedRange);if(y){const T=this.coordinatesConverter.convertModelPositionToViewPosition(y.getStartPosition()),R=this.viewLayout.getVerticalOffsetForLineNumber(T.lineNumber);this.viewLayout.setScrollPosition({scrollTop:R+this._viewportStartLineDelta},1)}}try{const y=this._eventDispatcher.beginEmitViewEvents();this._cursor.onModelContentChanged(y,E)}finally{this._eventDispatcher.endEmitViewEvents()}this._tokenizeViewportSoon.schedule()})),this._register(this.model.onDidChangeTokens(E=>{const y=[];for(let T=0,R=E.ranges.length;T<R;T++){const O=E.ranges[T],x=this.coordinatesConverter.convertModelPositionToViewPosition(new C.Position(O.fromLineNumber,1)).lineNumber,F=this.coordinatesConverter.convertModelPositionToViewPosition(new C.Position(O.toLineNumber,this.model.getLineMaxColumn(O.toLineNumber))).lineNumber;y[T]={fromLineNumber:x,toLineNumber:F}}this._eventDispatcher.emitSingleViewEvent(new l.ViewTokensChangedEvent(y)),E.tokenizationSupportChanged&&this._tokenizeViewportSoon.schedule()})),this._register(this.model.onDidChangeLanguageConfiguration(E=>{this._eventDispatcher.emitSingleViewEvent(new l.ViewLanguageConfigurationEvent),this.cursorConfig=new v.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeLanguage(E=>{this.cursorConfig=new v.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeOptions(E=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const y=this._eventDispatcher.beginEmitViewEvents();y.emitViewEvent(new l.ViewFlushedEvent),y.emitViewEvent(new l.ViewLineMappingChangedEvent),y.emitViewEvent(new l.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(y),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new v.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeDecorations(E=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new l.ViewDecorationsChangedEvent(E))}))}setHiddenAreas(E){let y=!1;try{const T=this._eventDispatcher.beginEmitViewEvents();y=this._lines.setHiddenAreas(E),y&&(T.emitViewEvent(new l.ViewFlushedEvent),T.emitViewEvent(new l.ViewLineMappingChangedEvent),T.emitViewEvent(new l.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(T),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),y&&this._eventDispatcher.emitOutgoingEvent(new n.ViewZonesChangedEvent)}getVisibleRangesPlusViewportAboveBelow(){const E=this._configuration.options.get(131),y=this._configuration.options.get(59),T=Math.max(20,Math.round(E.height/y)),R=this.viewLayout.getLinesViewportData(),O=Math.max(1,R.completelyVisibleStartLineNumber-T),x=Math.min(this.getLineCount(),R.completelyVisibleEndLineNumber+T);return this._toModelVisibleRanges(new o.Range(O,this.getLineMinColumn(O),x,this.getLineMaxColumn(x)))}getVisibleRanges(){const E=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(E)}_toModelVisibleRanges(E){const y=this.coordinatesConverter.convertViewRangeToModelRange(E),T=this._lines.getHiddenAreas();if(T.length===0)return[y];const R=[];let O=0,x=y.startLineNumber,F=y.startColumn;const L=y.endLineNumber,M=y.endColumn;for(let N=0,B=T.length;N<B;N++){const P=T[N].startLineNumber,V=T[N].endLineNumber;V<x||P>L||(x<P&&(R[O++]=new o.Range(x,F,P-1,this.model.getLineMaxColumn(P-1))),x=V+1,F=1)}return(x<L||x===L&&F<M)&&(R[O++]=new o.Range(x,F,L,M)),R}getCompletelyVisibleViewRange(){const E=this.viewLayout.getLinesViewportData(),y=E.completelyVisibleStartLineNumber,T=E.completelyVisibleEndLineNumber;return new o.Range(y,this.getLineMinColumn(y),T,this.getLineMaxColumn(T))}getCompletelyVisibleViewRangeAtScrollTop(E){const y=this.viewLayout.getLinesViewportDataAtScrollTop(E),T=y.completelyVisibleStartLineNumber,R=y.completelyVisibleEndLineNumber;return new o.Range(T,this.getLineMinColumn(T),R,this.getLineMaxColumn(R))}saveState(){const E=this.viewLayout.saveState(),y=E.scrollTop,T=this.viewLayout.getLineNumberAtVerticalOffset(y),R=this.coordinatesConverter.convertViewPositionToModelPosition(new C.Position(T,this.getLineMinColumn(T))),O=this.viewLayout.getVerticalOffsetForLineNumber(T)-y;return{scrollLeft:E.scrollLeft,firstPosition:R,firstPositionDeltaTop:O}}reduceRestoreState(E){if(typeof E.firstPosition=="undefined")return this._reduceRestoreStateCompatibility(E);const y=this.model.validatePosition(E.firstPosition),T=this.coordinatesConverter.convertModelPositionToViewPosition(y),R=this.viewLayout.getVerticalOffsetForLineNumber(T.lineNumber)-E.firstPositionDeltaTop;return{scrollLeft:E.scrollLeft,scrollTop:R}}_reduceRestoreStateCompatibility(E){return{scrollLeft:E.scrollLeft,scrollTop:E.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getLineCount(){return this._lines.getViewLineCount()}setViewport(E,y,T){this._viewportStartLine=E;const R=this.coordinatesConverter.convertViewPositionToModelPosition(new C.Position(E,this.getLineMinColumn(E)));this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,new o.Range(R.lineNumber,R.column,R.lineNumber,R.column),1);const O=this.viewLayout.getVerticalOffsetForLineNumber(E),x=this.viewLayout.getCurrentScrollTop();this._viewportStartLineDelta=x-O}getActiveIndentGuide(E,y,T){return this._lines.getActiveIndentGuide(E,y,T)}getLinesIndentGuides(E,y){return this._lines.getViewLinesIndentGuides(E,y)}getBracketGuidesInRangeByLine(E,y,T,R){return this._lines.getViewLinesBracketGuides(E,y,T,R)}getLineContent(E){return this._lines.getViewLineContent(E)}getLineLength(E){return this._lines.getViewLineLength(E)}getLineMinColumn(E){return this._lines.getViewLineMinColumn(E)}getLineMaxColumn(E){return this._lines.getViewLineMaxColumn(E)}getLineFirstNonWhitespaceColumn(E){const y=D.firstNonWhitespaceIndex(this.getLineContent(E));return y===-1?0:y+1}getLineLastNonWhitespaceColumn(E){const y=D.lastNonWhitespaceIndex(this.getLineContent(E));return y===-1?0:y+2}getDecorationsInViewport(E){return this._decorations.getDecorationsViewportData(E).decorations}getInjectedTextAt(E){return this._lines.getInjectedTextAt(E)}getViewLineRenderingData(E,y){const T=this.model.mightContainRTL(),R=this.model.mightContainNonBasicASCII(),O=this.getTabSize(),x=this._lines.getViewLineData(y);let L=this._decorations.getDecorationsViewportData(E).inlineDecorations[y-E.startLineNumber];return x.inlineDecorations&&(L=[...L,...x.inlineDecorations.map(M=>M.toInlineDecoration(y))]),new u.ViewLineRenderingData(x.minColumn,x.maxColumn,x.content,x.continuesWithWrappedLine,T,R,x.tokens,L,O,x.startVisibleColumn)}getViewLineData(E){return this._lines.getViewLineData(E)}getMinimapLinesRenderingData(E,y,T){const R=this._lines.getViewLinesData(E,y,T);return new u.MinimapLinesRenderingData(this.getTabSize(),R)}getAllOverviewRulerDecorations(E){const y=this.model.getOverviewRulerDecorations(this._editorId,(0,I.filterValidationDecorations)(this._configuration.options)),T=new m;for(const R of y){const O=R.options,x=O.overviewRuler;if(!x)continue;const F=x.position;if(F===0)continue;const L=x.getColor(E.value),M=this.coordinatesConverter.getViewLineNumberOfModelPosition(R.range.startLineNumber,R.range.startColumn),N=this.coordinatesConverter.getViewLineNumberOfModelPosition(R.range.endLineNumber,R.range.endColumn);T.accept(L,O.zIndex,M,N,F)}return T.asArray}_invalidateDecorationsColorCache(){const E=this.model.getOverviewRulerDecorations();for(const y of E){const T=y.options.overviewRuler;T&&T.invalidateCachedColor();const R=y.options.minimap;R&&R.invalidateCachedColor()}}getValueInRange(E,y){const T=this.coordinatesConverter.convertViewRangeToModelRange(E);return this.model.getValueInRange(T,y)}deduceModelPositionRelativeToViewPosition(E,y,T){const R=this.coordinatesConverter.convertViewPositionToModelPosition(E);this.model.getEOL().length===2&&(y<0?y-=T:y+=T);const x=this.model.getOffsetAt(R)+y;return this.model.getPositionAt(x)}getPlainTextToCopy(E,y,T){const R=T?`\r `:this.model.getEOL();E=E.slice(0),E.sort(o.Range.compareRangesUsingStarts);let O=!1,x=!1;for(const L of E)L.isEmpty()?O=!0:x=!0;if(!x){if(!y)return"";const L=E.map(N=>N.startLineNumber);let M="";for(let N=0;N<L.length;N++)N>0&&L[N-1]===L[N]||(M+=this.model.getLineContent(L[N])+R);return M}if(O&&y){const L=[];let M=0;for(const N of E){const B=N.startLineNumber;N.isEmpty()?B!==M&&L.push(this.model.getLineContent(B)):L.push(this.model.getValueInRange(N,T?2:0)),M=B}return L.length===1?L[0]:L}const F=[];for(const L of E)L.isEmpty()||F.push(this.model.getValueInRange(L,T?2:0));return F.length===1?F[0]:F}getRichTextToCopy(E,y){const T=this.model.getLanguageId();if(T===S.PLAINTEXT_LANGUAGE_ID||E.length!==1)return null;let R=E[0];if(R.isEmpty()){if(!y)return null;const N=R.startLineNumber;R=new o.Range(N,this.model.getLineMinColumn(N),N,this.model.getLineMaxColumn(N))}const O=this._configuration.options.get(44),x=this._getColorMap(),L=/[:;\\\/<>]/.test(O.fontFamily)||O.fontFamily===I.EDITOR_FONT_DEFAULTS.fontFamily;let M;return L?M=I.EDITOR_FONT_DEFAULTS.fontFamily:(M=O.fontFamily,M=M.replace(/"/g,"'"),/[,']/.test(M)||/[+ ]/.test(M)&&(M=`'${M}'`),M=`${M}, ${I.EDITOR_FONT_DEFAULTS.fontFamily}`),{mode:T,html:`<div style="color: ${x[1]};background-color: ${x[2]};font-family: ${M};font-weight: ${O.fontWeight};font-size: ${O.fontSize}px;line-height: ${O.lineHeight}px;white-space: pre;">`+this._getHTMLToCopy(R,x)+"</div>"}}_getHTMLToCopy(E,y){const T=E.startLineNumber,R=E.startColumn,O=E.endLineNumber,x=E.endColumn,F=this.getTabSize();let L="";for(let M=T;M<=O;M++){const N=this.model.getLineTokens(M),B=N.getLineContent(),P=M===T?R-1:0,V=M===O?x-1:B.length;B===""?L+="<br>":L+=(0,s.tokenizeLineToHTML)(B,N.inflate(),y,P,V,F,k.isWindows)}return L}_getColorMap(){const E=i.TokenizationRegistry.getColorMap(),y=["#000000"];if(E)for(let T=1,R=E.length;T<R;T++)y[T]=_.Color.Format.CSS.formatHex(E[T]);return y}getPrimaryCursorState(){return this._cursor.getPrimaryCursorState()}getLastAddedCursorIndex(){return this._cursor.getLastAddedCursorIndex()}getCursorStates(){return this._cursor.getCursorStates()}setCursorStates(E,y,T){return this._withViewEventsCollector(R=>this._cursor.setStates(R,E,y,T))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(E){this._cursor.setCursorColumnSelectData(E)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(E){this._cursor.setPrevEditOperationType(E)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(E,y,T=0){this._withViewEventsCollector(R=>this._cursor.setSelections(R,E,y,T))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(E){this._withViewEventsCollector(y=>this._cursor.restoreState(y,E))}_executeCursorEdit(E){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new n.ReadOnlyEditAttemptEvent);return}this._withViewEventsCollector(E)}executeEdits(E,y,T){this._executeCursorEdit(R=>this._cursor.executeEdits(R,E,y,T))}startComposition(){this._executeCursorEdit(E=>this._cursor.startComposition(E))}endComposition(E){this._executeCursorEdit(y=>this._cursor.endComposition(y,E))}type(E,y){this._executeCursorEdit(T=>this._cursor.type(T,E,y))}compositionType(E,y,T,R,O){this._executeCursorEdit(x=>this._cursor.compositionType(x,E,y,T,R,O))}paste(E,y,T,R){this._executeCursorEdit(O=>this._cursor.paste(O,E,y,T,R))}cut(E){this._executeCursorEdit(y=>this._cursor.cut(y,E))}executeCommand(E,y){this._executeCursorEdit(T=>this._cursor.executeCommand(T,E,y))}executeCommands(E,y){this._executeCursorEdit(T=>this._cursor.executeCommands(T,E,y))}revealPrimaryCursor(E,y,T=!1){this._withViewEventsCollector(R=>this._cursor.revealPrimary(R,E,T,0,y,0))}revealTopMostCursor(E){const y=this._cursor.getTopMostViewPosition(),T=new o.Range(y.lineNumber,y.column,y.lineNumber,y.column);this._withViewEventsCollector(R=>R.emitViewEvent(new l.ViewRevealRangeRequestEvent(E,!1,T,null,0,!0,0)))}revealBottomMostCursor(E){const y=this._cursor.getBottomMostViewPosition(),T=new o.Range(y.lineNumber,y.column,y.lineNumber,y.column);this._withViewEventsCollector(R=>R.emitViewEvent(new l.ViewRevealRangeRequestEvent(E,!1,T,null,0,!0,0)))}revealRange(E,y,T,R,O){this._withViewEventsCollector(x=>x.emitViewEvent(new l.ViewRevealRangeRequestEvent(E,!1,T,null,R,y,O)))}changeWhitespace(E){this.viewLayout.changeWhitespace(E)&&(this._eventDispatcher.emitSingleViewEvent(new l.ViewZonesChangedEvent),this._eventDispatcher.emitOutgoingEvent(new n.ViewZonesChangedEvent))}_withViewEventsCollector(E){try{const y=this._eventDispatcher.beginEmitViewEvents();return E(y)}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(E,y){return this._lines.normalizePosition(E,y)}getLineIndentColumn(E){return this._lines.getLineIndentColumn(E)}}e.ViewModel=d;class m{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(E,y,T,R,O){const x=this._asMap[E];if(x){const F=x.data,L=F[F.length-3],M=F[F.length-1];if(L===O&&M+1>=T){R>M&&(F[F.length-1]=R);return}F.push(O,T,R)}else{const F=new u.OverviewRulerDecorationsGroup(E,y,[O,T,R]);this._asMap[E]=F,this.asArray.push(F)}}}}),define(ne[165],re([1,0,1235,10,22,6,116,2,18,1944,39,72,2031,681,123,728,243,49,20,84,1145,306,58,93,164,32,2063,28,7,5,155,26,12,98,13,1183,1243,456,124,227,62,2029,1021]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorModeContext=e.BooleanEventEmitter=e.CodeEditorWidget=void 0;let z=0;class U{constructor(ie,ce,le,ae,ue){this.model=ie,this.viewModel=ce,this.view=le,this.hasRealView=ae,this.listenersToRemove=ue}dispose(){(0,D.dispose)(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let H=class rn extends D.Disposable{constructor(ie,ce,le,ae,ue,oe,fe,pe,me,be,Ce,ve){super();this.languageConfigurationService=Ce,this._onDidDispose=this._register(new A.Emitter),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new A.Emitter),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new A.Emitter),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new A.Emitter),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new A.Emitter),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new A.Emitter),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeConfiguration=this._register(new A.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new A.Emitter),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new A.Emitter),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new A.Emitter),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new A.Emitter),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new A.Emitter),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new G),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new G),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new A.Emitter),this.onWillType=this._onWillType.event,this._onDidType=this._register(new A.Emitter),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new A.Emitter),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new A.Emitter),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new A.Emitter),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new A.Emitter),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new A.Emitter),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new A.Emitter),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new A.Emitter),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new A.Emitter),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onDropIntoEditor=this._register(new A.Emitter),this.onDropIntoEditor=this._onDropIntoEditor.event,this._onContextMenu=this._register(new A.Emitter),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new A.Emitter),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new A.Emitter),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new A.Emitter),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new A.Emitter),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new A.Emitter),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new A.Emitter),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new A.Emitter),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new A.Emitter),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new A.Emitter),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._bannerDomNode=null,this._dropIntoEditorDecorationIds=[];const he={...ce};this._domElement=ie,this._overflowWidgetsDomNode=he.overflowWidgetsDomNode,delete he.overflowWidgetsDomNode,this._id=++z,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=le.telemetryData,this._configuration=this._register(this._createConfiguration(le.isSimpleWidget||!1,he,be)),this._register(this._configuration.onDidChange(de=>{this._onDidChangeConfiguration.fire(de);const Se=this._configuration.options;if(de.hasChanged(131)){const we=Se.get(131);this._onDidLayoutChange.fire(we)}})),this._contextKeyService=this._register(fe.createScoped(this._domElement)),this._notificationService=me,this._codeEditorService=ue,this._commandService=oe,this._themeService=pe,this._register(new q(this,this._contextKeyService)),this._register(new Z(this,this._contextKeyService,ve)),this._instantiationService=ae.createChild(new T.ServiceCollection([E.IContextKeyService,this._contextKeyService])),this._modelData=null,this._contributions={},this._actions={},this._focusTracker=new j(ie),this._register(this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={};let ge;Array.isArray(le.contributions)?ge=le.contributions:ge=v.EditorExtensionsRegistry.getEditorContributions();for(const de of ge){if(this._contributions[de.id]){(0,_.onUnexpectedError)(new Error(`Cannot have two contributions with the same id ${de.id}`));continue}try{const Se=this._instantiationService.createInstance(de.ctor,this);this._contributions[de.id]=Se}catch(Se){(0,_.onUnexpectedError)(Se)}}v.EditorExtensionsRegistry.getEditorActions().forEach(de=>{if(this._actions[de.id]){(0,_.onUnexpectedError)(new Error(`Cannot have two actions with the same id ${de.id}`));return}const Se=new u.InternalEditorAction(de.id,de.label,de.alias,(0,F.withNullAsUndefined)(de.precondition),()=>this._instantiationService.invokeFunction(we=>Promise.resolve(de.runEditorCommand(we,this,null))),this._contextKeyService);this._actions[Se.id]=Se}),ce.enableDropIntoEditor&&this._register(new f.DragAndDropObserver(this._domElement,{onDragEnter:()=>{},onDragOver:de=>{const Se=this.getTargetAtClientPoint(de.clientX,de.clientY);Se?.position&&this.showDropIndicatorAt(Se.position)},onDrop:async de=>{if(this.removeDropIndicator(),!de.dataTransfer)return;const Se=this.getTargetAtClientPoint(de.clientX,de.clientY);Se?.position&&this._onDropIntoEditor.fire({position:Se.position,event:de})},onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}get isSimpleWidget(){return this._configuration.isSimpleWidget}_createConfiguration(ie,ce,le){return new w.EditorConfiguration(ie,ce,this._domElement,le)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return a.EditorType.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose();const ie=Object.keys(this._contributions);for(let ce=0,le=ie.length;ce<le;ce++){const ae=ie[ce];this._contributions[ae].dispose()}this._contributions={},this._actions={},this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(ie){return this._instantiationService.invokeFunction(ie)}updateOptions(ie){this._configuration.updateOptions(ie||{})}getOptions(){return this._configuration.options}getOption(ie){return this._configuration.options.get(ie)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(ie){return this._modelData?N.WordOperations.getWordAtPosition(this._modelData.model,this._configuration.options.get(117),ie):null}getValue(ie=null){if(!this._modelData)return"";const ce=!!(ie&&ie.preserveBOM);let le=0;return ie&&ie.lineEnding&&ie.lineEnding===` `?le=1:ie&&ie.lineEnding&&ie.lineEnding===`\r `&&(le=2),this._modelData.model.getValue(le,ce)}setValue(ie){!this._modelData||this._modelData.model.setValue(ie)}getModel(){return this._modelData?this._modelData.model:null}setModel(ie=null){const ce=ie;if(this._modelData===null&&ce===null||this._modelData&&this._modelData.model===ce)return;const le=this.hasTextFocus(),ae=this._detachModel();this._attachModel(ce),le&&this.hasModel()&&this.focus();const ue={oldModelUrl:ae?ae.uri:null,newModelUrl:ce?ce.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(ue),this._postDetachModelCleanup(ae)}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(let ie in this._decorationTypeSubtypes){const ce=this._decorationTypeSubtypes[ie];for(let le in ce)this._removeDecorationType(ie+"-"+le)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetForPosition(ie,ce,le){const ae=ie.model.validatePosition({lineNumber:ce,column:le}),ue=ie.viewModel.coordinatesConverter.convertModelPositionToViewPosition(ae);return ie.viewModel.viewLayout.getVerticalOffsetForLineNumber(ue.lineNumber)}getTopForLineNumber(ie){return this._modelData?rn._getVerticalOffsetForPosition(this._modelData,ie,1):-1}getTopForPosition(ie,ce){return this._modelData?rn._getVerticalOffsetForPosition(this._modelData,ie,ce):-1}setHiddenAreas(ie){this._modelData&&this._modelData.viewModel.setHiddenAreas(ie.map(ce=>r.Range.lift(ce)))}getVisibleColumnFromPosition(ie){if(!this._modelData)return ie.column;const ce=this._modelData.model.validatePosition(ie),le=this._modelData.model.getOptions().tabSize;return s.CursorColumns.visibleColumnFromColumn(this._modelData.model.getLineContent(ce.lineNumber),ce.column,le)+1}getStatusbarColumn(ie){if(!this._modelData)return ie.column;const ce=this._modelData.model.validatePosition(ie),le=this._modelData.model.getOptions().tabSize;return s.CursorColumns.toStatusbarColumn(this._modelData.model.getLineContent(ce.lineNumber),ce.column,le)}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(ie,ce="api"){if(!!this._modelData){if(!l.Position.isIPosition(ie))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(ce,[{selectionStartLineNumber:ie.lineNumber,selectionStartColumn:ie.column,positionLineNumber:ie.lineNumber,positionColumn:ie.column}])}}_sendRevealRange(ie,ce,le,ae){if(!this._modelData)return;if(!r.Range.isIRange(ie))throw new Error("Invalid arguments");const ue=this._modelData.model.validateRange(ie),oe=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(ue);this._modelData.viewModel.revealRange("api",le,oe,ce,ae)}revealLine(ie,ce=0){this._revealLine(ie,0,ce)}revealLineInCenter(ie,ce=0){this._revealLine(ie,1,ce)}revealLineInCenterIfOutsideViewport(ie,ce=0){this._revealLine(ie,2,ce)}revealLineNearTop(ie,ce=0){this._revealLine(ie,5,ce)}_revealLine(ie,ce,le){if(typeof ie!="number")throw new Error("Invalid arguments");this._sendRevealRange(new r.Range(ie,1,ie,1),ce,!1,le)}revealPosition(ie,ce=0){this._revealPosition(ie,0,!0,ce)}revealPositionInCenter(ie,ce=0){this._revealPosition(ie,1,!0,ce)}revealPositionInCenterIfOutsideViewport(ie,ce=0){this._revealPosition(ie,2,!0,ce)}revealPositionNearTop(ie,ce=0){this._revealPosition(ie,5,!0,ce)}_revealPosition(ie,ce,le,ae){if(!l.Position.isIPosition(ie))throw new Error("Invalid arguments");this._sendRevealRange(new r.Range(ie.lineNumber,ie.column,ie.lineNumber,ie.column),ce,le,ae)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(ie,ce="api"){const le=p.Selection.isISelection(ie),ae=r.Range.isIRange(ie);if(!le&&!ae)throw new Error("Invalid arguments");if(le)this._setSelectionImpl(ie,ce);else if(ae){const ue={selectionStartLineNumber:ie.startLineNumber,selectionStartColumn:ie.startColumn,positionLineNumber:ie.endLineNumber,positionColumn:ie.endColumn};this._setSelectionImpl(ue,ce)}}_setSelectionImpl(ie,ce){if(!this._modelData)return;const le=new p.Selection(ie.selectionStartLineNumber,ie.selectionStartColumn,ie.positionLineNumber,ie.positionColumn);this._modelData.viewModel.setSelections(ce,[le])}revealLines(ie,ce,le=0){this._revealLines(ie,ce,0,le)}revealLinesInCenter(ie,ce,le=0){this._revealLines(ie,ce,1,le)}revealLinesInCenterIfOutsideViewport(ie,ce,le=0){this._revealLines(ie,ce,2,le)}revealLinesNearTop(ie,ce,le=0){this._revealLines(ie,ce,5,le)}_revealLines(ie,ce,le,ae){if(typeof ie!="number"||typeof ce!="number")throw new Error("Invalid arguments");this._sendRevealRange(new r.Range(ie,1,ce,1),le,!1,ae)}revealRange(ie,ce=0,le=!1,ae=!0){this._revealRange(ie,le?1:0,ae,ce)}revealRangeInCenter(ie,ce=0){this._revealRange(ie,1,!0,ce)}revealRangeInCenterIfOutsideViewport(ie,ce=0){this._revealRange(ie,2,!0,ce)}revealRangeNearTop(ie,ce=0){this._revealRange(ie,5,!0,ce)}revealRangeNearTopIfOutsideViewport(ie,ce=0){this._revealRange(ie,6,!0,ce)}revealRangeAtTop(ie,ce=0){this._revealRange(ie,3,!0,ce)}_revealRange(ie,ce,le,ae){if(!r.Range.isIRange(ie))throw new Error("Invalid arguments");this._sendRevealRange(r.Range.lift(ie),ce,le,ae)}setSelections(ie,ce="api",le=0){if(!!this._modelData){if(!ie||ie.length===0)throw new Error("Invalid arguments");for(let ae=0,ue=ie.length;ae<ue;ae++)if(!p.Selection.isISelection(ie[ae]))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(ce,ie,le)}}getContentWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getContentWidth():-1}getScrollWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollWidth():-1}getScrollLeft(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollLeft():-1}getContentHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getContentHeight():-1}getScrollHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollHeight():-1}getScrollTop(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollTop():-1}setScrollLeft(ie,ce=1){if(!!this._modelData){if(typeof ie!="number")throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollLeft:ie},ce)}}setScrollTop(ie,ce=1){if(!!this._modelData){if(typeof ie!="number")throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollTop:ie},ce)}}setScrollPosition(ie,ce=1){!this._modelData||this._modelData.viewModel.viewLayout.setScrollPosition(ie,ce)}saveViewState(){if(!this._modelData)return null;const ie={},ce=Object.keys(this._contributions);for(const ue of ce){const oe=this._contributions[ue];typeof oe.saveViewState=="function"&&(ie[ue]=oe.saveViewState())}const le=this._modelData.viewModel.saveCursorState(),ae=this._modelData.viewModel.saveState();return{cursorState:le,viewState:ae,contributionsState:ie}}restoreViewState(ie){if(!this._modelData||!this._modelData.hasRealView)return;const ce=ie;if(ce&&ce.cursorState&&ce.viewState){const le=ce.cursorState;Array.isArray(le)?le.length>0&&this._modelData.viewModel.restoreCursorState(le):this._modelData.viewModel.restoreCursorState([le]);const ae=ce.contributionsState||{},ue=Object.keys(this._contributions);for(let fe=0,pe=ue.length;fe<pe;fe++){const me=ue[fe],be=this._contributions[me];typeof be.restoreViewState=="function"&&be.restoreViewState(ae[me])}const oe=this._modelData.viewModel.reduceRestoreState(ce.viewState);this._modelData.view.restoreState(oe)}}onVisible(){this._modelData?.view.refreshFocusState()}onHide(){this._modelData?.view.refreshFocusState(),this._focusTracker.refreshState()}getContribution(ie){return this._contributions[ie]||null}getActions(){const ie=[],ce=Object.keys(this._actions);for(let le=0,ae=ce.length;le<ae;le++){const ue=ce[le];ie.push(this._actions[ue])}return ie}getSupportedActions(){let ie=this.getActions();return ie=ie.filter(ce=>ce.isSupported()),ie}getAction(ie){return this._actions[ie]||null}trigger(ie,ce,le){switch(le=le||{},ce){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(ie);return;case"type":{const ue=le;this._type(ie,ue.text||"");return}case"replacePreviousChar":{const ue=le;this._compositionType(ie,ue.text||"",ue.replaceCharCnt||0,0,0);return}case"compositionType":{const ue=le;this._compositionType(ie,ue.text||"",ue.replacePrevCharCnt||0,ue.replaceNextCharCnt||0,ue.positionDelta||0);return}case"paste":{const ue=le;this._paste(ie,ue.text||"",ue.pasteOnNewLine||!1,ue.multicursorText||null,ue.mode||null);return}case"cut":this._cut(ie);return}const ae=this.getAction(ce);if(ae){Promise.resolve(ae.run()).then(void 0,_.onUnexpectedError);return}!this._modelData||this._triggerEditorCommand(ie,ce,le)||this._triggerCommand(ce,le)}_triggerCommand(ie,ce){this._commandService.executeCommand(ie,ce)}_startComposition(){!this._modelData||(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(ie){!this._modelData||(this._modelData.viewModel.endComposition(ie),this._onDidCompositionEnd.fire())}_type(ie,ce){!this._modelData||ce.length===0||(ie==="keyboard"&&this._onWillType.fire(ce),this._modelData.viewModel.type(ce,ie),ie==="keyboard"&&this._onDidType.fire(ce))}_compositionType(ie,ce,le,ae,ue){!this._modelData||this._modelData.viewModel.compositionType(ce,le,ae,ue,ie)}_paste(ie,ce,le,ae,ue){if(!this._modelData||ce.length===0)return;const oe=this._modelData.viewModel.getSelection().getStartPosition();this._modelData.viewModel.paste(ce,le,ae,ie);const fe=this._modelData.viewModel.getSelection().getStartPosition();ie==="keyboard"&&this._onDidPaste.fire({range:new r.Range(oe.lineNumber,oe.column,fe.lineNumber,fe.column),languageId:ue})}_cut(ie){!this._modelData||this._modelData.viewModel.cut(ie)}_triggerEditorCommand(ie,ce,le){const ae=v.EditorExtensionsRegistry.getEditorCommand(ce);return ae?(le=le||{},le.source=ie,this._instantiationService.invokeFunction(ue=>{Promise.resolve(ae.runEditorCommand(ue,this,le)).then(void 0,_.onUnexpectedError)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(81)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(81)?!1:(this._modelData.model.popStackElement(),!0)}executeEdits(ie,ce,le){if(!this._modelData||this._configuration.options.get(81))return!1;let ae;return le?Array.isArray(le)?ae=()=>le:ae=le:ae=()=>null,this._modelData.viewModel.executeEdits(ie,ce,ae),!0}executeCommand(ie,ce){!this._modelData||this._modelData.viewModel.executeCommand(ce,ie)}executeCommands(ie,ce){!this._modelData||this._modelData.viewModel.executeCommands(ce,ie)}changeDecorations(ie){return this._modelData?this._modelData.model.changeDecorations(ie,this._id):null}getLineDecorations(ie){return this._modelData?this._modelData.model.getLineDecorations(ie,this._id,(0,i.filterValidationDecorations)(this._configuration.options)):null}getDecorationsInRange(ie){return this._modelData?this._modelData.model.getDecorationsInRange(ie,this._id,(0,i.filterValidationDecorations)(this._configuration.options)):null}deltaDecorations(ie,ce){return this._modelData?ie.length===0&&ce.length===0?ie:this._modelData.model.deltaDecorations(ie,ce,this._id):[]}setDecorations(ie,ce,le){const ae={},ue=this._decorationTypeSubtypes[ce]||{};this._decorationTypeSubtypes[ce]=ae;const oe=[];for(let pe of le){let me=ce;if(pe.renderOptions){const Ce=(0,k.hash)(pe.renderOptions).toString(16);me=ce+"-"+Ce,!ue[Ce]&&!ae[Ce]&&this._registerDecorationType(ie,me,pe.renderOptions,ce),ae[Ce]=!0}const be=this._resolveDecorationOptions(me,!!pe.hoverMessage);pe.hoverMessage&&(be.hoverMessage=pe.hoverMessage),oe.push({range:pe.range,options:be})}for(let pe in ue)ae[pe]||this._removeDecorationType(ce+"-"+pe);const fe=this._decorationTypeKeysToIds[ce]||[];this._decorationTypeKeysToIds[ce]=this.deltaDecorations(fe,oe)}setDecorationsFast(ie,ce){const le=this._decorationTypeSubtypes[ie]||{};for(let fe in le)this._removeDecorationType(ie+"-"+fe);this._decorationTypeSubtypes[ie]={};const ae=h.ModelDecorationOptions.createDynamic(this._resolveDecorationOptions(ie,!1)),ue=new Array(ce.length);for(let fe=0,pe=ce.length;fe<pe;fe++)ue[fe]={range:ce[fe],options:ae};const oe=this._decorationTypeKeysToIds[ie]||[];this._decorationTypeKeysToIds[ie]=this.deltaDecorations(oe,ue)}removeDecorations(ie){const ce=this._decorationTypeKeysToIds[ie];ce&&this.deltaDecorations(ce,[]),this._decorationTypeKeysToIds.hasOwnProperty(ie)&&delete this._decorationTypeKeysToIds[ie],this._decorationTypeSubtypes.hasOwnProperty(ie)&&delete this._decorationTypeSubtypes[ie]}getLayoutInfo(){return this._configuration.options.get(131)}createOverviewRuler(ie){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(ie)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarPointerDown(ie){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarPointerDown(ie)}layout(ie){this._configuration.observeContainer(ie),this.render()}focus(){!this._modelData||!this._modelData.hasRealView||this._modelData.view.focus()}hasTextFocus(){return!this._modelData||!this._modelData.hasRealView?!1:this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(ie){const ce={widget:ie,position:ie.getPosition()};this._contentWidgets.hasOwnProperty(ie.getId())&&console.warn("Overwriting a content widget with the same id."),this._contentWidgets[ie.getId()]=ce,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(ce)}layoutContentWidget(ie){const ce=ie.getId();if(this._contentWidgets.hasOwnProperty(ce)){const le=this._contentWidgets[ce];le.position=ie.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(le)}}removeContentWidget(ie){const ce=ie.getId();if(this._contentWidgets.hasOwnProperty(ce)){const le=this._contentWidgets[ce];delete this._contentWidgets[ce],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(le)}}addOverlayWidget(ie){const ce={widget:ie,position:ie.getPosition()};this._overlayWidgets.hasOwnProperty(ie.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[ie.getId()]=ce,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(ce)}layoutOverlayWidget(ie){const ce=ie.getId();if(this._overlayWidgets.hasOwnProperty(ce)){const le=this._overlayWidgets[ce];le.position=ie.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(le)}}removeOverlayWidget(ie){const ce=ie.getId();if(this._overlayWidgets.hasOwnProperty(ce)){const le=this._overlayWidgets[ce];delete this._overlayWidgets[ce],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(le)}}changeViewZones(ie){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(ie)}getTargetAtClientPoint(ie,ce){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(ie,ce)}getScrolledVisiblePosition(ie){if(!this._modelData||!this._modelData.hasRealView)return null;const ce=this._modelData.model.validatePosition(ie),le=this._configuration.options,ae=le.get(131),ue=rn._getVerticalOffsetForPosition(this._modelData,ce.lineNumber,ce.column)-this.getScrollTop(),oe=this._modelData.view.getOffsetForColumn(ce.lineNumber,ce.column)+ae.glyphMarginWidth+ae.lineNumbersWidth+ae.decorationsWidth-this.getScrollLeft();return{top:ue,left:oe,height:le.get(59)}}getOffsetForColumn(ie,ce){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(ie,ce)}render(ie=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.view.render(!0,ie)}setAriaOptions(ie){!this._modelData||!this._modelData.hasRealView||this._modelData.view.setAriaOptions(ie)}applyFontInfo(ie){(0,P.applyFontInfo)(ie,this._configuration.options.get(44))}setBanner(ie,ce){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),this._bannerDomNode=ie,this._configuration.setReservedHeight(ie?ce:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(ie){if(!ie){this._modelData=null;return}const ce=[];this._domElement.setAttribute("data-mode-id",ie.getLanguageId()),this._configuration.setIsDominatedByLongLines(ie.isDominatedByLongLines()),this._configuration.setModelLineCount(ie.getLineCount()),ie.onBeforeAttached();const le=new m.ViewModel(this._id,this._configuration,ie,M.DOMLineBreaksComputerFactory.create(),L.MonospaceLineBreaksComputerFactory.create(this._configuration.options),oe=>f.scheduleAtNextAnimationFrame(oe),this.languageConfigurationService,this._themeService);ce.push(ie.onDidChangeDecorations(oe=>this._onDidChangeModelDecorations.fire(oe))),ce.push(ie.onDidChangeLanguage(oe=>{this._domElement.setAttribute("data-mode-id",ie.getLanguageId()),this._onDidChangeModelLanguage.fire(oe)})),ce.push(ie.onDidChangeLanguageConfiguration(oe=>this._onDidChangeModelLanguageConfiguration.fire(oe))),ce.push(ie.onDidChangeContent(oe=>this._onDidChangeModelContent.fire(oe))),ce.push(ie.onDidChangeOptions(oe=>this._onDidChangeModelOptions.fire(oe))),ce.push(ie.onWillDispose(()=>this.setModel(null))),ce.push(le.onEvent(oe=>{switch(oe.kind){case 0:this._onDidContentSizeChange.fire(oe);break;case 1:this._editorTextFocus.setValue(oe.hasFocus);break;case 2:this._onDidScrollChange.fire(oe);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{oe.reachedMaxCursorCount&&this._notificationService.warn(t.localize(0,null,S.CursorsController.MAX_CURSOR_COUNT));const fe=[];for(let be=0,Ce=oe.selections.length;be<Ce;be++)fe[be]=oe.selections[be].getPosition();const pe={position:fe[0],secondaryPositions:fe.slice(1),reason:oe.reason,source:oe.source};this._onDidChangeCursorPosition.fire(pe);const me={selection:oe.selections[0],secondarySelections:oe.selections.slice(1),modelVersionId:oe.modelVersionId,oldSelections:oe.oldSelections,oldModelVersionId:oe.oldModelVersionId,source:oe.source,reason:oe.reason};this._onDidChangeCursorSelection.fire(me);break}}}));const[ae,ue]=this._createView(le);if(ue){this._domElement.appendChild(ae.domNode.domNode);let oe=Object.keys(this._contentWidgets);for(let fe=0,pe=oe.length;fe<pe;fe++){const me=oe[fe];ae.addContentWidget(this._contentWidgets[me])}oe=Object.keys(this._overlayWidgets);for(let fe=0,pe=oe.length;fe<pe;fe++){const me=oe[fe];ae.addOverlayWidget(this._overlayWidgets[me])}ae.render(!1,!0),ae.domNode.domNode.setAttribute("data-uri",ie.uri.toString())}this._modelData=new U(ie,le,ae,ue,ce)}_createView(ie){let ce;this.isSimpleWidget?ce={paste:(ue,oe,fe,pe)=>{this._paste("keyboard",ue,oe,fe,pe)},type:ue=>{this._type("keyboard",ue)},compositionType:(ue,oe,fe,pe)=>{this._compositionType("keyboard",ue,oe,fe,pe)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:ce={paste:(ue,oe,fe,pe)=>{const me={text:ue,pasteOnNewLine:oe,multicursorText:fe,mode:pe};this._commandService.executeCommand("paste",me)},type:ue=>{const oe={text:ue};this._commandService.executeCommand("type",oe)},compositionType:(ue,oe,fe,pe)=>{if(fe||pe){const me={text:ue,replacePrevCharCnt:oe,replaceNextCharCnt:fe,positionDelta:pe};this._commandService.executeCommand("compositionType",me)}else{const me={text:ue,replaceCharCnt:oe};this._commandService.executeCommand("replacePreviousChar",me)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const le=new c.ViewUserInputEvents(ie.coordinatesConverter);return le.onKeyDown=ue=>this._onKeyDown.fire(ue),le.onKeyUp=ue=>this._onKeyUp.fire(ue),le.onContextMenu=ue=>this._onContextMenu.fire(ue),le.onMouseMove=ue=>this._onMouseMove.fire(ue),le.onMouseLeave=ue=>this._onMouseLeave.fire(ue),le.onMouseDown=ue=>this._onMouseDown.fire(ue),le.onMouseUp=ue=>this._onMouseUp.fire(ue),le.onMouseDrag=ue=>this._onMouseDrag.fire(ue),le.onMouseDrop=ue=>this._onMouseDrop.fire(ue),le.onMouseDropCanceled=ue=>this._onMouseDropCanceled.fire(ue),le.onMouseWheel=ue=>this._onMouseWheel.fire(ue),[new o.View(ce,this._configuration,this._themeService.getColorTheme(),ie,le,this._overflowWidgetsDomNode),!0]}_postDetachModelCleanup(ie){ie&&ie.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const ie=this._modelData.model,ce=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),ce&&this._domElement.contains(ce)&&this._domElement.removeChild(ce),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),ie}_registerDecorationType(ie,ce,le,ae){this._codeEditorService.registerDecorationType(ie,ce,le,ae,this)}_removeDecorationType(ie){this._codeEditorService.removeDecorationType(ie)}_resolveDecorationOptions(ie,ce){return this._codeEditorService.resolveDecorationOptions(ie,ce)}getTelemetryData(){return this._telemetryData}hasModel(){return this._modelData!==null}showDropIndicatorAt(ie){let ce=[{range:new r.Range(ie.lineNumber,ie.column,ie.lineNumber,ie.column),options:rn.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorationIds=this.deltaDecorations(this._dropIntoEditorDecorationIds,ce),this.revealPosition(ie,1)}removeDropIndicator(){this._dropIntoEditorDecorationIds=this.deltaDecorations(this._dropIntoEditorDecorationIds,[])}};H.dropIntoEditorDecorationOptions=h.ModelDecorationOptions.register({description:"workbench-dnd-target",className:"dnd-target"}),H=Ee([W(3,y.IInstantiationService),W(4,C.ICodeEditorService),W(5,b.ICommandService),W(6,E.IContextKeyService),W(7,O.IThemeService),W(8,R.INotificationService),W(9,x.IAccessibilityService),W(10,B.ILanguageConfigurationService),W(11,V.ILanguageFeaturesService)],H),e.CodeEditorWidget=H;var K;(function(se){se[se.NotSet=0]="NotSet",se[se.False=1]="False",se[se.True=2]="True"})(K||(K={}));class G extends D.Disposable{constructor(){super();this._onDidChangeToTrue=this._register(new A.Emitter),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new A.Emitter),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(ie){const ce=ie?2:1;this._value!==ce&&(this._value=ce,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}}e.BooleanEventEmitter=G;class q extends D.Disposable{constructor(ie,ce){super();this._editor=ie,ce.createKey("editorId",ie.getId()),this._editorSimpleInput=n.EditorContextKeys.editorSimpleInput.bindTo(ce),this._editorFocus=n.EditorContextKeys.focus.bindTo(ce),this._textInputFocus=n.EditorContextKeys.textInputFocus.bindTo(ce),this._editorTextFocus=n.EditorContextKeys.editorTextFocus.bindTo(ce),this._editorTabMovesFocus=n.EditorContextKeys.tabMovesFocus.bindTo(ce),this._editorReadonly=n.EditorContextKeys.readOnly.bindTo(ce),this._inDiffEditor=n.EditorContextKeys.inDiffEditor.bindTo(ce),this._editorColumnSelection=n.EditorContextKeys.columnSelection.bindTo(ce),this._hasMultipleSelections=n.EditorContextKeys.hasMultipleSelections.bindTo(ce),this._hasNonEmptySelection=n.EditorContextKeys.hasNonEmptySelection.bindTo(ce),this._canUndo=n.EditorContextKeys.canUndo.bindTo(ce),this._canRedo=n.EditorContextKeys.canRedo.bindTo(ce),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._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const ie=this._editor.getOptions();this._editorTabMovesFocus.set(ie.get(130)),this._editorReadonly.set(ie.get(81)),this._inDiffEditor.set(ie.get(54)),this._editorColumnSelection.set(ie.get(18))}_updateFromSelection(){const ie=this._editor.getSelections();ie?(this._hasMultipleSelections.set(ie.length>1),this._hasNonEmptySelection.set(ie.some(ce=>!ce.isEmpty()))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const ie=this._editor.getModel();this._canUndo.set(Boolean(ie&&ie.canUndo())),this._canRedo.set(Boolean(ie&&ie.canRedo()))}}class Z extends D.Disposable{constructor(ie,ce,le){super();this._editor=ie,this._contextKeyService=ce,this._languageFeaturesService=le,this._langId=n.EditorContextKeys.languageId.bindTo(ce),this._hasCompletionItemProvider=n.EditorContextKeys.hasCompletionItemProvider.bindTo(ce),this._hasCodeActionsProvider=n.EditorContextKeys.hasCodeActionsProvider.bindTo(ce),this._hasCodeLensProvider=n.EditorContextKeys.hasCodeLensProvider.bindTo(ce),this._hasDefinitionProvider=n.EditorContextKeys.hasDefinitionProvider.bindTo(ce),this._hasDeclarationProvider=n.EditorContextKeys.hasDeclarationProvider.bindTo(ce),this._hasImplementationProvider=n.EditorContextKeys.hasImplementationProvider.bindTo(ce),this._hasTypeDefinitionProvider=n.EditorContextKeys.hasTypeDefinitionProvider.bindTo(ce),this._hasHoverProvider=n.EditorContextKeys.hasHoverProvider.bindTo(ce),this._hasDocumentHighlightProvider=n.EditorContextKeys.hasDocumentHighlightProvider.bindTo(ce),this._hasDocumentSymbolProvider=n.EditorContextKeys.hasDocumentSymbolProvider.bindTo(ce),this._hasReferenceProvider=n.EditorContextKeys.hasReferenceProvider.bindTo(ce),this._hasRenameProvider=n.EditorContextKeys.hasRenameProvider.bindTo(ce),this._hasSignatureHelpProvider=n.EditorContextKeys.hasSignatureHelpProvider.bindTo(ce),this._hasInlayHintsProvider=n.EditorContextKeys.hasInlayHintsProvider.bindTo(ce),this._hasDocumentFormattingProvider=n.EditorContextKeys.hasDocumentFormattingProvider.bindTo(ce),this._hasDocumentSelectionFormattingProvider=n.EditorContextKeys.hasDocumentSelectionFormattingProvider.bindTo(ce),this._hasMultipleDocumentFormattingProvider=n.EditorContextKeys.hasMultipleDocumentFormattingProvider.bindTo(ce),this._hasMultipleDocumentSelectionFormattingProvider=n.EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider.bindTo(ce),this._isInWalkThrough=n.EditorContextKeys.isInWalkThroughSnippet.bindTo(ce);const ae=()=>this._update();this._register(ie.onDidChangeModel(ae)),this._register(ie.onDidChangeModelLanguage(ae)),this._register(le.completionProvider.onDidChange(ae)),this._register(le.codeActionProvider.onDidChange(ae)),this._register(le.codeLensProvider.onDidChange(ae)),this._register(le.definitionProvider.onDidChange(ae)),this._register(le.declarationProvider.onDidChange(ae)),this._register(le.implementationProvider.onDidChange(ae)),this._register(le.typeDefinitionProvider.onDidChange(ae)),this._register(le.hoverProvider.onDidChange(ae)),this._register(le.documentHighlightProvider.onDidChange(ae)),this._register(le.documentSymbolProvider.onDidChange(ae)),this._register(le.referenceProvider.onDidChange(ae)),this._register(le.renameProvider.onDidChange(ae)),this._register(le.documentFormattingEditProvider.onDidChange(ae)),this._register(le.documentRangeFormattingEditProvider.onDidChange(ae)),this._register(le.signatureHelpProvider.onDidChange(ae)),this._register(le.inlayHintsProvider.onDidChange(ae)),ae()}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._isInWalkThrough.reset()})}_update(){const ie=this._editor.getModel();if(!ie){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(ie.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(ie)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(ie)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(ie)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(ie)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(ie)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(ie)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(ie)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(ie)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(ie)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(ie)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(ie)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(ie)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(ie)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(ie)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(ie)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(ie)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(ie)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(ie).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(ie).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(ie).length>1),this._isInWalkThrough.set(ie.uri.scheme===I.Schemas.walkThroughSnippet)})}}e.EditorModeContext=Z;class j extends D.Disposable{constructor(ie){super();this._onChange=this._register(new A.Emitter),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(f.trackFocus(ie)),this._register(this._domFocusTracker.onDidFocus(()=>{this._hasFocus=!0,this._onChange.fire(void 0)})),this._register(this._domFocusTracker.onDidBlur(()=>{this._hasFocus=!1,this._onChange.fire(void 0)}))}hasFocus(){return this._hasFocus}refreshState(){this._domFocusTracker.refreshState&&this._domFocusTracker.refreshState()}}const X=encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 3' enable-background='new 0 0 6 3' height='3' width='6'><g fill='"),Y=encodeURIComponent("'><polygon points='5.5,0 2.5,3 1.1,3 4.1,0'/><polygon points='4,0 6,2 6,0.6 5.4,0'/><polygon points='0,2 1,3 2.4,3 0,0.6'/></g></svg>");function $(se){return X+encodeURIComponent(se.toString())+Y}const J=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" height="3" width="12"><g fill="'),ee=encodeURIComponent('"><circle cx="1" cy="1" r="1"/><circle cx="5" cy="1" r="1"/><circle cx="9" cy="1" r="1"/></g></svg>');function te(se){return J+encodeURIComponent(se.toString())+ee}(0,O.registerThemingParticipant)((se,ie)=>{const ce=se.getColor(d.editorErrorBorder);ce&&ie.addRule(`.monaco-editor .squiggly-error { border-bottom: 4px double ${ce}; }`);const le=se.getColor(d.editorErrorForeground);le&&ie.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${$(le)}") repeat-x bottom left; }`);const ae=se.getColor(d.editorErrorBackground);ae&&ie.addRule(`.monaco-editor .squiggly-error::before { display: block; content: ''; width: 100%; height: 100%; background: ${ae}; }`);const ue=se.getColor(d.editorWarningBorder);ue&&ie.addRule(`.monaco-editor .squiggly-warning { border-bottom: 4px double ${ue}; }`);const oe=se.getColor(d.editorWarningForeground);oe&&ie.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${$(oe)}") repeat-x bottom left; }`);const fe=se.getColor(d.editorWarningBackground);fe&&ie.addRule(`.monaco-editor .squiggly-warning::before { display: block; content: ''; width: 100%; height: 100%; background: ${fe}; }`);const pe=se.getColor(d.editorInfoBorder);pe&&ie.addRule(`.monaco-editor .squiggly-info { border-bottom: 4px double ${pe}; }`);const me=se.getColor(d.editorInfoForeground);me&&ie.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${$(me)}") repeat-x bottom left; }`);const be=se.getColor(d.editorInfoBackground);be&&ie.addRule(`.monaco-editor .squiggly-info::before { display: block; content: ''; width: 100%; height: 100%; background: ${be}; }`);const Ce=se.getColor(d.editorHintBorder);Ce&&ie.addRule(`.monaco-editor .squiggly-hint { border-bottom: 2px dotted ${Ce}; }`);const ve=se.getColor(d.editorHintForeground);ve&&ie.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${te(ve)}") no-repeat bottom left; }`);const he=se.getColor(g.editorUnnecessaryCodeOpacity);he&&ie.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${he.rgba.a}; }`);const ge=se.getColor(g.editorUnnecessaryCodeBorder);ge&&ie.addRule(`.monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed ${ge}; }`);const de=se.getColor(d.editorForeground)||"inherit";ie.addRule(`.monaco-editor.showDeprecated .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: ${de}}`)})}),define(ne[351],re([1,0,1236,10,128,281,11,6,2,227,453,72,165,2055,123,20,282,306,93,184,705,459,460,259,7,5,155,26,32,12,37,1239,95,39,22,67,680,33,304,63,127,1019]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorWidget=void 0;class z{constructor(me,be){this._contextMenuService=me,this._clipboardService=be,this._zones=[],this._inlineDiffMargins=[],this._zonesMap={},this._decorations=[]}getForeignViewZones(me){return me.filter(be=>!this._zonesMap[String(be.id)])}clean(me){this._zones.length>0&&me.changeViewZones(be=>{for(const Ce of this._zones)be.removeZone(Ce)}),this._zones=[],this._zonesMap={},this._decorations=me.deltaDecorations(this._decorations,[])}apply(me,be,Ce,ve){const he=ve?v.StableEditorScrollState.capture(me):null;me.changeViewZones(ge=>{for(const de of this._zones)ge.removeZone(de);for(const de of this._inlineDiffMargins)de.dispose();this._zones=[],this._zonesMap={},this._inlineDiffMargins=[];for(let de=0,Se=Ce.zones.length;de<Se;de++){const we=Ce.zones[de];we.suppressMouseDown=!0;const ye=ge.addZone(we);this._zones.push(ye),this._zonesMap[String(ye)]=!0,Ce.zones[de].diff&&we.marginDomNode&&(we.suppressMouseDown=!1,Ce.zones[de].diff?.originalModel.getValueLength()!==0&&this._inlineDiffMargins.push(new R.InlineDiffMargin(ye,we.marginDomNode,me,Ce.zones[de].diff,this._contextMenuService,this._clipboardService)))}}),he&&he.restore(me),this._decorations=me.deltaDecorations(this._decorations,Ce.decorations),be&&be.setZones(Ce.overviewZones)}}let U=0;const H=(0,P.registerIcon)("diff-insert",N.Codicon.add,t.localize(0,null)),K=(0,P.registerIcon)("diff-remove",N.Codicon.remove,t.localize(1,null)),G=window.trustedTypes?.createPolicy("diffEditorWidget",{createHTML:pe=>pe});let q=class Ut extends I.Disposable{constructor(me,be,Ce,ve,he,ge,de,Se,we,ye,ke,Ie){super();this._editorProgressService=Ie,this._onDidDispose=this._register(new D.Emitter),this.onDidDispose=this._onDidDispose.event,this._onDidUpdateDiff=this._register(new D.Emitter),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new D.Emitter),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._lastOriginalWarning=null,this._lastModifiedWarning=null,this._editorWorkerService=he,this._codeEditorService=Se,this._contextKeyService=this._register(ge.createScoped(me)),this._instantiationService=de.createChild(new m.ServiceCollection([g.IContextKeyService,this._contextKeyService])),this._contextKeyService.createKey("isInDiffEditor",!0),this._themeService=we,this._notificationService=ye,this._id=++U,this._state=0,this._updatingDiffProgress=null,this._domElement=me,be=be||{},this._options=oe(be,{enableSplitViewResizing:!0,renderSideBySide:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit"}),typeof be.isInEmbeddedEditor!="undefined"?this._contextKeyService.createKey("isInEmbeddedDiffEditor",be.isInEmbeddedEditor):this._contextKeyService.createKey("isInEmbeddedDiffEditor",!1),this._updateDecorationsRunner=this._register(new k.RunOnceScheduler(()=>this._updateDecorations(),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=Ut._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide),this._containerDomElement.style.position="relative",this._containerDomElement.style.height="100%",this._domElement.appendChild(this._containerDomElement),this._overviewViewportDomElement=(0,_.createFastDomNode)(document.createElement("div")),this._overviewViewportDomElement.setClassName("diffViewport"),this._overviewViewportDomElement.setPosition("absolute"),this._overviewDomElement=document.createElement("div"),this._overviewDomElement.className="diffOverview",this._overviewDomElement.style.position="absolute",this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode),this._register(f.addStandardDisposableListener(this._overviewDomElement,f.EventType.POINTER_DOWN,De=>{this._modifiedEditor.delegateVerticalScrollbarPointerDown(De)})),this._options.renderOverviewRuler&&this._containerDomElement.appendChild(this._overviewDomElement),this._originalDomNode=document.createElement("div"),this._originalDomNode.className="editor original",this._originalDomNode.style.position="absolute",this._originalDomNode.style.height="100%",this._containerDomElement.appendChild(this._originalDomNode),this._modifiedDomNode=document.createElement("div"),this._modifiedDomNode.className="editor modified",this._modifiedDomNode.style.position="absolute",this._modifiedDomNode.style.height="100%",this._containerDomElement.appendChild(this._modifiedDomNode),this._beginUpdateDecorationsTimeout=-1,this._currentlyChangingViewZones=!1,this._diffComputationToken=0,this._originalEditorState=new z(ke,ve),this._modifiedEditorState=new z(ke,ve),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new M.ElementSizeObserver(this._containerDomElement,be.dimension)),this._register(this._elementSizeObserver.onDidChange(()=>this._onDidContainerSizeChanged())),be.automaticLayout&&this._elementSizeObserver.startObserving(),this._diffComputationResult=null,this._originalEditor=this._createLeftHandSideEditor(be,Ce.originalEditor||{}),this._modifiedEditor=this._createRightHandSideEditor(be,Ce.modifiedEditor||{}),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=de.createInstance(c.DiffReview,this),this._containerDomElement.appendChild(this._reviewPane.domNode.domNode),this._containerDomElement.appendChild(this._reviewPane.shadow.domNode),this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode),this._options.renderSideBySide?this._setStrategy(new J(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new te(this._createDataSource(),this._options.enableSplitViewResizing)),this._register(we.onDidColorThemeChange(De=>{this._strategy&&this._strategy.applyColors(De)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=Ut._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)}));const Te=x.EditorExtensionsRegistry.getDiffEditorContributions();for(const De of Te)try{this._register(de.createInstance(De.ctor,this))}catch(_e){(0,F.onUnexpectedError)(_e)}this._codeEditorService.addDiffEditor(this)}get ignoreTrimWhitespace(){return this._options.ignoreTrimWhitespace}get maxComputationTime(){return this._options.maxComputationTime}get renderSideBySide(){return this._options.renderSideBySide}getContentHeight(){return this._modifiedEditor.getContentHeight()}getViewWidth(){return this._elementSizeObserver.getWidth()}_setState(me){this._state!==me&&(this._state=me,this._updatingDiffProgress&&(this._updatingDiffProgress.done(),this._updatingDiffProgress=null),this._state===1&&(this._updatingDiffProgress=this._editorProgressService.show(!0,1e3)))}hasWidgetFocus(){return f.isAncestor(document.activeElement,this._domElement)}diffReviewNext(){this._reviewPane.next()}diffReviewPrev(){this._reviewPane.prev()}static _getClassName(me,be){let Ce="monaco-diff-editor monaco-editor-background ";return be&&(Ce+="side-by-side "),Ce+=(0,y.getThemeTypeSelector)(me.type),Ce}_recreateOverviewRulers(){!this._options.renderOverviewRuler||(this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._originalEditor.hasModel()&&(this._originalOverviewRuler=this._originalEditor.createOverviewRuler("original diffOverviewRuler"),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._modifiedEditor.hasModel()&&(this._modifiedOverviewRuler=this._modifiedEditor.createOverviewRuler("modified diffOverviewRuler"),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),this._layoutOverviewRulers())}_createLeftHandSideEditor(me,be){const Ce=this._createInnerEditor(this._instantiationService,this._originalDomNode,this._adjustOptionsForLeftHandSide(me),be);this._register(Ce.onDidScrollChange(he=>{this._isHandlingScrollEvent||!he.scrollTopChanged&&!he.scrollLeftChanged&&!he.scrollHeightChanged||(this._isHandlingScrollEvent=!0,this._modifiedEditor.setScrollPosition({scrollLeft:he.scrollLeft,scrollTop:he.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(Ce.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(Ce.onDidChangeConfiguration(he=>{!Ce.getModel()||(he.hasChanged(44)&&this._updateDecorationsRunner.schedule(),he.hasChanged(132)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(Ce.onDidChangeHiddenAreas(()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()})),this._register(Ce.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}));const ve=this._contextKeyService.createKey("isInDiffLeftEditor",Ce.hasWidgetFocus());return this._register(Ce.onDidFocusEditorWidget(()=>ve.set(!0))),this._register(Ce.onDidBlurEditorWidget(()=>ve.set(!1))),this._register(Ce.onDidContentSizeChange(he=>{const ge=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+Ut.ONE_OVERVIEW_WIDTH,de=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:de,contentWidth:ge,contentHeightChanged:he.contentHeightChanged,contentWidthChanged:he.contentWidthChanged})})),Ce}_createRightHandSideEditor(me,be){const Ce=this._createInnerEditor(this._instantiationService,this._modifiedDomNode,this._adjustOptionsForRightHandSide(me),be);this._register(Ce.onDidScrollChange(he=>{this._isHandlingScrollEvent||!he.scrollTopChanged&&!he.scrollLeftChanged&&!he.scrollHeightChanged||(this._isHandlingScrollEvent=!0,this._originalEditor.setScrollPosition({scrollLeft:he.scrollLeft,scrollTop:he.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(Ce.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(Ce.onDidChangeConfiguration(he=>{!Ce.getModel()||(he.hasChanged(44)&&this._updateDecorationsRunner.schedule(),he.hasChanged(132)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(Ce.onDidChangeHiddenAreas(()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()})),this._register(Ce.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})),this._register(Ce.onDidChangeModelOptions(he=>{he.tabSize&&this._updateDecorationsRunner.schedule()}));const ve=this._contextKeyService.createKey("isInDiffRightEditor",Ce.hasWidgetFocus());return this._register(Ce.onDidFocusEditorWidget(()=>ve.set(!0))),this._register(Ce.onDidBlurEditorWidget(()=>ve.set(!1))),this._register(Ce.onDidContentSizeChange(he=>{const ge=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+Ut.ONE_OVERVIEW_WIDTH,de=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:de,contentWidth:ge,contentHeightChanged:he.contentHeightChanged,contentWidthChanged:he.contentWidthChanged})})),Ce}_createInnerEditor(me,be,Ce,ve){return me.createInstance(o.CodeEditorWidget,be,{enableDropIntoEditor:!0,...Ce},ve)}dispose(){this._codeEditorService.removeDiffEditor(this),this._beginUpdateDecorationsTimeout!==-1&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._cleanViewZonesAndDecorations(),this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._overviewDomElement.removeChild(this._overviewViewportDomElement.domNode),this._options.renderOverviewRuler&&this._containerDomElement.removeChild(this._overviewDomElement),this._containerDomElement.removeChild(this._originalDomNode),this._originalEditor.dispose(),this._containerDomElement.removeChild(this._modifiedDomNode),this._modifiedEditor.dispose(),this._strategy.dispose(),this._containerDomElement.removeChild(this._reviewPane.domNode.domNode),this._containerDomElement.removeChild(this._reviewPane.shadow.domNode),this._containerDomElement.removeChild(this._reviewPane.actionBarContainer.domNode),this._reviewPane.dispose(),this._domElement.removeChild(this._containerDomElement),this._onDidDispose.fire(),super.dispose()}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return l.EditorType.IDiffEditor}getLineChanges(){return this._diffComputationResult?this._diffComputationResult.changes:null}getDiffComputationResult(){return this._diffComputationResult}getOriginalEditor(){return this._originalEditor}getModifiedEditor(){return this._modifiedEditor}updateOptions(me){const be=oe(me,this._options),Ce=fe(this._options,be);this._options=be;const ve=Ce.ignoreTrimWhitespace||Ce.renderIndicators,he=this._isVisible&&(Ce.maxComputationTime||Ce.maxFileSize);ve?this._beginUpdateDecorations():he&&this._beginUpdateDecorationsSoon(),this._modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(me)),this._originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(me)),this._strategy.setEnableSplitViewResizing(this._options.enableSplitViewResizing),Ce.renderSideBySide&&(this._options.renderSideBySide?this._setStrategy(new J(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new te(this._createDataSource(),this._options.enableSplitViewResizing)),this._containerDomElement.className=Ut._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)),Ce.renderOverviewRuler&&(this._options.renderOverviewRuler?this._containerDomElement.appendChild(this._overviewDomElement):this._containerDomElement.removeChild(this._overviewDomElement))}getModel(){return{original:this._originalEditor.getModel(),modified:this._modifiedEditor.getModel()}}setModel(me){if(me&&(!me.original||!me.modified))throw new Error(me.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this._originalEditor.setModel(me?me.original:null),this._modifiedEditor.setModel(me?me.modified:null),this._updateDecorationsRunner.cancel(),me&&(this._originalEditor.setScrollTop(0),this._modifiedEditor.setScrollTop(0)),this._diffComputationResult=null,this._diffComputationToken++,this._setState(0),me&&(this._recreateOverviewRulers(),this._beginUpdateDecorations()),this._layoutOverviewViewport()}getContainerDomNode(){return this._domElement}getVisibleColumnFromPosition(me){return this._modifiedEditor.getVisibleColumnFromPosition(me)}getStatusbarColumn(me){return this._modifiedEditor.getStatusbarColumn(me)}getPosition(){return this._modifiedEditor.getPosition()}setPosition(me,be="api"){this._modifiedEditor.setPosition(me,be)}revealLine(me,be=0){this._modifiedEditor.revealLine(me,be)}revealLineInCenter(me,be=0){this._modifiedEditor.revealLineInCenter(me,be)}revealLineInCenterIfOutsideViewport(me,be=0){this._modifiedEditor.revealLineInCenterIfOutsideViewport(me,be)}revealLineNearTop(me,be=0){this._modifiedEditor.revealLineNearTop(me,be)}revealPosition(me,be=0){this._modifiedEditor.revealPosition(me,be)}revealPositionInCenter(me,be=0){this._modifiedEditor.revealPositionInCenter(me,be)}revealPositionInCenterIfOutsideViewport(me,be=0){this._modifiedEditor.revealPositionInCenterIfOutsideViewport(me,be)}revealPositionNearTop(me,be=0){this._modifiedEditor.revealPositionNearTop(me,be)}getSelection(){return this._modifiedEditor.getSelection()}getSelections(){return this._modifiedEditor.getSelections()}setSelection(me,be="api"){this._modifiedEditor.setSelection(me,be)}setSelections(me,be="api"){this._modifiedEditor.setSelections(me,be)}revealLines(me,be,Ce=0){this._modifiedEditor.revealLines(me,be,Ce)}revealLinesInCenter(me,be,Ce=0){this._modifiedEditor.revealLinesInCenter(me,be,Ce)}revealLinesInCenterIfOutsideViewport(me,be,Ce=0){this._modifiedEditor.revealLinesInCenterIfOutsideViewport(me,be,Ce)}revealLinesNearTop(me,be,Ce=0){this._modifiedEditor.revealLinesNearTop(me,be,Ce)}revealRange(me,be=0,Ce=!1,ve=!0){this._modifiedEditor.revealRange(me,be,Ce,ve)}revealRangeInCenter(me,be=0){this._modifiedEditor.revealRangeInCenter(me,be)}revealRangeInCenterIfOutsideViewport(me,be=0){this._modifiedEditor.revealRangeInCenterIfOutsideViewport(me,be)}revealRangeNearTop(me,be=0){this._modifiedEditor.revealRangeNearTop(me,be)}revealRangeNearTopIfOutsideViewport(me,be=0){this._modifiedEditor.revealRangeNearTopIfOutsideViewport(me,be)}revealRangeAtTop(me,be=0){this._modifiedEditor.revealRangeAtTop(me,be)}getSupportedActions(){return this._modifiedEditor.getSupportedActions()}saveViewState(){const me=this._originalEditor.saveViewState(),be=this._modifiedEditor.saveViewState();return{original:me,modified:be}}restoreViewState(me){if(me&&me.original&&me.modified){const be=me;this._originalEditor.restoreViewState(be.original),this._modifiedEditor.restoreViewState(be.modified)}}layout(me){this._elementSizeObserver.observe(me)}focus(){this._modifiedEditor.focus()}hasTextFocus(){return this._originalEditor.hasTextFocus()||this._modifiedEditor.hasTextFocus()}onVisible(){this._isVisible=!0,this._originalEditor.onVisible(),this._modifiedEditor.onVisible(),this._beginUpdateDecorations()}onHide(){this._isVisible=!1,this._originalEditor.onHide(),this._modifiedEditor.onHide(),this._cleanViewZonesAndDecorations()}trigger(me,be,Ce){this._modifiedEditor.trigger(me,be,Ce)}changeDecorations(me){return this._modifiedEditor.changeDecorations(me)}_onDidContainerSizeChanged(){this._doLayout()}_getReviewHeight(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0}_layoutOverviewRulers(){if(!this._options.renderOverviewRuler||!this._originalOverviewRuler||!this._modifiedOverviewRuler)return;const me=this._elementSizeObserver.getHeight(),be=this._getReviewHeight(),Ce=Ut.ENTIRE_DIFF_OVERVIEW_WIDTH-2*Ut.ONE_OVERVIEW_WIDTH;this._modifiedEditor.getLayoutInfo()&&(this._originalOverviewRuler.setLayout({top:0,width:Ut.ONE_OVERVIEW_WIDTH,right:Ce+Ut.ONE_OVERVIEW_WIDTH,height:me-be}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:Ut.ONE_OVERVIEW_WIDTH,height:me-be}))}_onViewZonesChanged(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()}_beginUpdateDecorationsSoon(){this._beginUpdateDecorationsTimeout!==-1&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout(()=>this._beginUpdateDecorations(),Ut.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(me,be){return!me&&!be?!0:!me||!be?!1:me.toString()===be.toString()}_beginUpdateDecorations(){this._beginUpdateDecorationsTimeout=-1;const me=this._originalEditor.getModel(),be=this._modifiedEditor.getModel();if(!me||!be)return;this._diffComputationToken++;const Ce=this._diffComputationToken,ve=this._options.maxFileSize*1024*1024,he=ge=>{const de=ge.getValueLength();return ve===0||de<=ve};if(!he(me)||!he(be)){(!Ut._equals(me.uri,this._lastOriginalWarning)||!Ut._equals(be.uri,this._lastModifiedWarning))&&(this._lastOriginalWarning=me.uri,this._lastModifiedWarning=be.uri,this._notificationService.warn(t.localize(2,null)));return}this._setState(1),this._editorWorkerService.computeDiff(me.uri,be.uri,this._options.ignoreTrimWhitespace,this._options.maxComputationTime).then(ge=>{Ce===this._diffComputationToken&&me===this._originalEditor.getModel()&&be===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=ge,this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())},ge=>{Ce===this._diffComputationToken&&me===this._originalEditor.getModel()&&be===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=null,this._updateDecorationsRunner.schedule())})}_cleanViewZonesAndDecorations(){this._originalEditorState.clean(this._originalEditor),this._modifiedEditorState.clean(this._modifiedEditor)}_updateDecorations(){if(!this._originalEditor.getModel()||!this._modifiedEditor.getModel())return;const me=this._diffComputationResult?this._diffComputationResult.changes:[],be=this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces()),Ce=this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces()),ve=this._strategy.getEditorsDiffDecorations(me,this._options.ignoreTrimWhitespace,this._options.renderIndicators,be,Ce);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this._originalEditor,this._originalOverviewRuler,ve.original,!1),this._modifiedEditorState.apply(this._modifiedEditor,this._modifiedOverviewRuler,ve.modified,!0)}finally{this._currentlyChangingViewZones=!1}}_adjustOptionsForSubEditor(me){const be={...me};return be.inDiffEditor=!0,be.automaticLayout=!1,be.scrollbar={...be.scrollbar||{}},be.scrollbar.vertical="visible",be.folding=!1,be.codeLens=this._options.diffCodeLens,be.fixedOverflowWidgets=!0,be.minimap={...be.minimap||{}},be.minimap.enabled=!1,be}_adjustOptionsForLeftHandSide(me){const be=this._adjustOptionsForSubEditor(me);return this._options.renderSideBySide?be.wordWrapOverride1=this._options.diffWordWrap:(be.wordWrapOverride1="off",be.wordWrapOverride2="off"),me.originalAriaLabel&&(be.ariaLabel=me.originalAriaLabel),be.readOnly=!this._options.originalEditable,be.extraEditorClassName="original-in-monaco-diff-editor",{...be,dimension:{height:0,width:0}}}_adjustOptionsForRightHandSide(me){const be=this._adjustOptionsForSubEditor(me);return me.modifiedAriaLabel&&(be.ariaLabel=me.modifiedAriaLabel),be.wordWrapOverride1=this._options.diffWordWrap,be.revealHorizontalRightPadding=i.EditorOptions.revealHorizontalRightPadding.defaultValue+Ut.ENTIRE_DIFF_OVERVIEW_WIDTH,be.scrollbar.verticalHasArrows=!1,be.extraEditorClassName="modified-in-monaco-diff-editor",{...be,dimension:{height:0,width:0}}}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const me=this._elementSizeObserver.getWidth(),be=this._elementSizeObserver.getHeight(),Ce=this._getReviewHeight(),ve=this._strategy.layout();this._originalDomNode.style.width=ve+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=me-ve+"px",this._modifiedDomNode.style.left=ve+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=be-Ce+"px",this._overviewDomElement.style.width=Ut.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=me-Ut.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(Ut.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this._originalEditor.layout({width:ve,height:be-Ce}),this._modifiedEditor.layout({width:me-ve-(this._options.renderOverviewRuler?Ut.ENTIRE_DIFF_OVERVIEW_WIDTH:0),height:be-Ce}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(be-Ce,me,Ce),this._layoutOverviewViewport()}_layoutOverviewViewport(){const me=this._computeOverviewViewport();me?(this._overviewViewportDomElement.setTop(me.top),this._overviewViewportDomElement.setHeight(me.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){const me=this._modifiedEditor.getLayoutInfo();if(!me)return null;const be=this._modifiedEditor.getScrollTop(),Ce=this._modifiedEditor.getScrollHeight(),ve=Math.max(0,me.height),he=Math.max(0,ve-2*0),ge=Ce>0?he/Ce:0,de=Math.max(0,Math.floor(me.height*ge)),Se=Math.floor(be*ge);return{height:de,top:Se}}_createDataSource(){return{getWidth:()=>this._elementSizeObserver.getWidth(),getHeight:()=>this._elementSizeObserver.getHeight()-this._getReviewHeight(),getOptions:()=>({renderOverviewRuler:this._options.renderOverviewRuler}),getContainerDomNode:()=>this._containerDomElement,relayoutEditors:()=>{this._doLayout()},getOriginalEditor:()=>this._originalEditor,getModifiedEditor:()=>this._modifiedEditor}}_setStrategy(me){this._strategy&&this._strategy.dispose(),this._strategy=me,me.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}_getLineChangeAtOrBeforeLineNumber(me,be){const Ce=this._diffComputationResult?this._diffComputationResult.changes:[];if(Ce.length===0||me<be(Ce[0]))return null;let ve=0,he=Ce.length-1;for(;ve<he;){const ge=Math.floor((ve+he)/2),de=be(Ce[ge]),Se=ge+1<=he?be(Ce[ge+1]):1073741824;me<de?he=ge-1:me>=Se?ve=ge+1:(ve=ge,he=ge)}return Ce[ve]}_getEquivalentLineForOriginalLineNumber(me){const be=this._getLineChangeAtOrBeforeLineNumber(me,Se=>Se.originalStartLineNumber);if(!be)return me;const Ce=be.originalStartLineNumber+(be.originalEndLineNumber>0?-1:0),ve=be.modifiedStartLineNumber+(be.modifiedEndLineNumber>0?-1:0),he=be.originalEndLineNumber>0?be.originalEndLineNumber-be.originalStartLineNumber+1:0,ge=be.modifiedEndLineNumber>0?be.modifiedEndLineNumber-be.modifiedStartLineNumber+1:0,de=me-Ce;return de<=he?ve+Math.min(de,ge):ve+ge-he+de}_getEquivalentLineForModifiedLineNumber(me){const be=this._getLineChangeAtOrBeforeLineNumber(me,Se=>Se.modifiedStartLineNumber);if(!be)return me;const Ce=be.originalStartLineNumber+(be.originalEndLineNumber>0?-1:0),ve=be.modifiedStartLineNumber+(be.modifiedEndLineNumber>0?-1:0),he=be.originalEndLineNumber>0?be.originalEndLineNumber-be.originalStartLineNumber+1:0,ge=be.modifiedEndLineNumber>0?be.modifiedEndLineNumber-be.modifiedStartLineNumber+1:0,de=me-ve;return de<=ge?Ce+Math.min(de,he):Ce+he-ge+de}getDiffLineInformationForOriginal(me){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(me)}:null}getDiffLineInformationForModified(me){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(me)}:null}};q.ONE_OVERVIEW_WIDTH=15,q.ENTIRE_DIFF_OVERVIEW_WIDTH=30,q.UPDATE_DIFF_DECORATIONS_DELAY=200,q=Ee([W(3,O.IClipboardService),W(4,p.IEditorWorkerService),W(5,g.IContextKeyService),W(6,d.IInstantiationService),W(7,C.ICodeEditorService),W(8,y.IThemeService),W(9,b.INotificationService),W(10,T.IContextMenuService),W(11,L.IEditorProgressService)],q),e.DiffEditorWidget=q;class Z extends I.Disposable{constructor(me){super();this._dataSource=me,this._insertColor=null,this._removeColor=null}applyColors(me){const be=me.getColor(E.diffOverviewRulerInserted)||(me.getColor(E.diffInserted)||E.defaultInsertColor).transparent(2),Ce=me.getColor(E.diffOverviewRulerRemoved)||(me.getColor(E.diffRemoved)||E.defaultRemoveColor).transparent(2),ve=!be.equals(this._insertColor)||!Ce.equals(this._removeColor);return this._insertColor=be,this._removeColor=Ce,ve}getEditorsDiffDecorations(me,be,Ce,ve,he){he=he.sort((we,ye)=>we.afterLineNumber-ye.afterLineNumber),ve=ve.sort((we,ye)=>we.afterLineNumber-ye.afterLineNumber);const ge=this._getViewZones(me,ve,he,Ce),de=this._getOriginalEditorDecorations(ge,me,be,Ce),Se=this._getModifiedEditorDecorations(ge,me,be,Ce);return{original:{decorations:de.decorations,overviewZones:de.overviewZones,zones:ge.original},modified:{decorations:Se.decorations,overviewZones:Se.overviewZones,zones:ge.modified}}}}class j{constructor(me){this._source=me,this._index=-1,this.current=null,this.advance()}advance(){this._index++,this._index<this._source.length?this.current=this._source[this._index]:this.current=null}}class X{constructor(me,be,Ce,ve,he){this._lineChanges=me,this._originalForeignVZ=be,this._modifiedForeignVZ=Ce,this._originalEditor=ve,this._modifiedEditor=he}static _getViewLineCount(me,be,Ce){const ve=me.getModel(),he=me._getViewModel();if(ve&&he){const ge=ue(ve,he,be,Ce);return ge.endLineNumber-ge.startLineNumber+1}return Ce-be+1}getViewZones(){const me=this._originalEditor.getOption(59),be=this._modifiedEditor.getOption(59),Ce=this._originalEditor.getOption(132).wrappingColumn!==-1,ve=this._modifiedEditor.getOption(132).wrappingColumn!==-1,he=Ce||ve,ge=this._originalEditor.getModel(),de=this._originalEditor._getViewModel().coordinatesConverter,Se=this._modifiedEditor._getViewModel().coordinatesConverter,we={original:[],modified:[]};let ye=0,ke=0,Ie=0,Te=0,De=0,_e=0;const Re=(We,Ve)=>We.afterLineNumber-Ve.afterLineNumber,Ne=(We,Ve)=>{if(Ve.domNode===null&&We.length>0){const Ue=We[We.length-1];if(Ue.afterLineNumber===Ve.afterLineNumber&&Ue.domNode===null){Ue.heightInLines+=Ve.heightInLines;return}}We.push(Ve)},xe=new j(this._modifiedForeignVZ),Ae=new j(this._originalForeignVZ);let Le=1,Me=1;for(let We=0,Ve=this._lineChanges.length;We<=Ve;We++){const Ue=We<Ve?this._lineChanges[We]:null;Ue!==null?(Ie=Ue.originalStartLineNumber+(Ue.originalEndLineNumber>0?-1:0),Te=Ue.modifiedStartLineNumber+(Ue.modifiedEndLineNumber>0?-1:0),ke=Ue.originalEndLineNumber>0?X._getViewLineCount(this._originalEditor,Ue.originalStartLineNumber,Ue.originalEndLineNumber):0,ye=Ue.modifiedEndLineNumber>0?X._getViewLineCount(this._modifiedEditor,Ue.modifiedStartLineNumber,Ue.modifiedEndLineNumber):0,De=Math.max(Ue.originalStartLineNumber,Ue.originalEndLineNumber),_e=Math.max(Ue.modifiedStartLineNumber,Ue.modifiedEndLineNumber)):(Ie+=1e7+ke,Te+=1e7+ye,De=Ie,_e=Te);let et=[],Ze=[];if(he){let qe;Ue?Ue.originalEndLineNumber>0?qe=Ue.originalStartLineNumber-Le:qe=Ue.modifiedStartLineNumber-Me:qe=ge.getLineCount()-Le+1;for(let Be=0;Be<qe;Be++){const Ke=Le+Be,Xe=Me+Be,rt=de.getModelLineViewLineCount(Ke),it=Se.getModelLineViewLineCount(Xe);rt<it?et.push({afterLineNumber:Ke,heightInLines:it-rt,domNode:null,marginDomNode:null}):rt>it&&Ze.push({afterLineNumber:Xe,heightInLines:rt-it,domNode:null,marginDomNode:null})}Ue&&(Le=(Ue.originalEndLineNumber>0?Ue.originalEndLineNumber:Ue.originalStartLineNumber)+1,Me=(Ue.modifiedEndLineNumber>0?Ue.modifiedEndLineNumber:Ue.modifiedStartLineNumber)+1)}for(;xe.current&&xe.current.afterLineNumber<=_e;){let qe;xe.current.afterLineNumber<=Te?qe=Ie-Te+xe.current.afterLineNumber:qe=De;let Be=null;Ue&&Ue.modifiedStartLineNumber<=xe.current.afterLineNumber&&xe.current.afterLineNumber<=Ue.modifiedEndLineNumber&&(Be=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),et.push({afterLineNumber:qe,heightInLines:xe.current.height/be,domNode:null,marginDomNode:Be}),xe.advance()}for(;Ae.current&&Ae.current.afterLineNumber<=De;){let qe;Ae.current.afterLineNumber<=Ie?qe=Te-Ie+Ae.current.afterLineNumber:qe=_e,Ze.push({afterLineNumber:qe,heightInLines:Ae.current.height/me,domNode:null}),Ae.advance()}if(Ue!==null&&ce(Ue)){const qe=this._produceOriginalFromDiff(Ue,ke,ye);qe&&et.push(qe)}if(Ue!==null&&le(Ue)){const qe=this._produceModifiedFromDiff(Ue,ke,ye);qe&&Ze.push(qe)}let Fe=0,Qe=0;for(et=et.sort(Re),Ze=Ze.sort(Re);Fe<et.length&&Qe<Ze.length;){const qe=et[Fe],Be=Ze[Qe],Ke=qe.afterLineNumber-Ie,Xe=Be.afterLineNumber-Te;Ke<Xe?(Ne(we.original,qe),Fe++):Xe<Ke?(Ne(we.modified,Be),Qe++):qe.shouldNotShrink?(Ne(we.original,qe),Fe++):Be.shouldNotShrink?(Ne(we.modified,Be),Qe++):qe.heightInLines>=Be.heightInLines?(qe.heightInLines-=Be.heightInLines,Qe++):(Be.heightInLines-=qe.heightInLines,Fe++)}for(;Fe<et.length;)Ne(we.original,et[Fe]),Fe++;for(;Qe<Ze.length;)Ne(we.modified,Ze[Qe]),Qe++}return{original:X._ensureDomNodes(we.original),modified:X._ensureDomNodes(we.modified)}}static _ensureDomNodes(me){return me.map(be=>(be.domNode||(be.domNode=ae()),be))}}function Y(pe,me,be,Ce,ve){return{range:new S.Range(pe,me,be,Ce),options:ve}}const $={charDelete:r.ModelDecorationOptions.register({description:"diff-editor-char-delete",className:"char-delete"}),charDeleteWholeLine:r.ModelDecorationOptions.register({description:"diff-editor-char-delete-whole-line",className:"char-delete",isWholeLine:!0}),charInsert:r.ModelDecorationOptions.register({description:"diff-editor-char-insert",className:"char-insert"}),charInsertWholeLine:r.ModelDecorationOptions.register({description:"diff-editor-char-insert-whole-line",className:"char-insert",isWholeLine:!0}),lineInsert:r.ModelDecorationOptions.register({description:"diff-editor-line-insert",className:"line-insert",marginClassName:"gutter-insert",isWholeLine:!0}),lineInsertWithSign:r.ModelDecorationOptions.register({description:"diff-editor-line-insert-with-sign",className:"line-insert",linesDecorationsClassName:"insert-sign "+y.ThemeIcon.asClassName(H),marginClassName:"gutter-insert",isWholeLine:!0}),lineDelete:r.ModelDecorationOptions.register({description:"diff-editor-line-delete",className:"line-delete",marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteWithSign:r.ModelDecorationOptions.register({description:"diff-editor-line-delete-with-sign",className:"line-delete",linesDecorationsClassName:"delete-sign "+y.ThemeIcon.asClassName(K),marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteMargin:r.ModelDecorationOptions.register({description:"diff-editor-line-delete-margin",marginClassName:"gutter-delete"})};class J extends Z{constructor(me,be){super(me);this._disableSash=be===!1,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new A.Sash(this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart(()=>this._onSashDragStart()),this._sash.onDidChange(Ce=>this._onSashDrag(Ce)),this._sash.onDidEnd(()=>this._onSashDragEnd()),this._sash.onDidReset(()=>this._onSashReset())}setEnableSplitViewResizing(me){const be=me===!1;this._disableSash!==be&&(this._disableSash=be,this._sash.state=this._disableSash?0:3)}layout(me=this._sashRatio){const Ce=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?q.ENTIRE_DIFF_OVERVIEW_WIDTH:0);let ve=Math.floor((me||.5)*Ce);const he=Math.floor(.5*Ce);return ve=this._disableSash?he:ve||he,Ce>J.MINIMUM_EDITOR_WIDTH*2?(ve<J.MINIMUM_EDITOR_WIDTH&&(ve=J.MINIMUM_EDITOR_WIDTH),ve>Ce-J.MINIMUM_EDITOR_WIDTH&&(ve=Ce-J.MINIMUM_EDITOR_WIDTH)):ve=he,this._sashPosition!==ve&&(this._sashPosition=ve),this._sash.layout(),this._sashPosition}_onSashDragStart(){this._startSashPosition=this._sashPosition}_onSashDrag(me){const Ce=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?q.ENTIRE_DIFF_OVERVIEW_WIDTH:0),ve=this.layout((this._startSashPosition+(me.currentX-me.startX))/Ce);this._sashRatio=ve/Ce,this._dataSource.relayoutEditors()}_onSashDragEnd(){this._sash.layout()}_onSashReset(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()}getVerticalSashTop(me){return 0}getVerticalSashLeft(me){return this._sashPosition}getVerticalSashHeight(me){return this._dataSource.getHeight()}_getViewZones(me,be,Ce){const ve=this._dataSource.getOriginalEditor(),he=this._dataSource.getModifiedEditor();return new ee(me,be,Ce,ve,he).getViewZones()}_getOriginalEditorDecorations(me,be,Ce,ve){const he=this._dataSource.getOriginalEditor(),ge=String(this._removeColor),de={decorations:[],overviewZones:[]},Se=he.getModel(),we=he._getViewModel();for(const ye of be)if(le(ye)){de.decorations.push({range:new S.Range(ye.originalStartLineNumber,1,ye.originalEndLineNumber,1073741824),options:ve?$.lineDeleteWithSign:$.lineDelete}),(!ce(ye)||!ye.charChanges)&&de.decorations.push(Y(ye.originalStartLineNumber,1,ye.originalEndLineNumber,1073741824,$.charDeleteWholeLine));const ke=ue(Se,we,ye.originalStartLineNumber,ye.originalEndLineNumber);if(de.overviewZones.push(new u.OverviewRulerZone(ke.startLineNumber,ke.endLineNumber,0,ge)),ye.charChanges){for(const Ie of ye.charChanges)if(le(Ie))if(Ce)for(let Te=Ie.originalStartLineNumber;Te<=Ie.originalEndLineNumber;Te++){let De,_e;Te===Ie.originalStartLineNumber?De=Ie.originalStartColumn:De=Se.getLineFirstNonWhitespaceColumn(Te),Te===Ie.originalEndLineNumber?_e=Ie.originalEndColumn:_e=Se.getLineLastNonWhitespaceColumn(Te),de.decorations.push(Y(Te,De,Te,_e,$.charDelete))}else de.decorations.push(Y(Ie.originalStartLineNumber,Ie.originalStartColumn,Ie.originalEndLineNumber,Ie.originalEndColumn,$.charDelete))}}return de}_getModifiedEditorDecorations(me,be,Ce,ve){const he=this._dataSource.getModifiedEditor(),ge=String(this._insertColor),de={decorations:[],overviewZones:[]},Se=he.getModel(),we=he._getViewModel();for(const ye of be)if(ce(ye)){de.decorations.push({range:new S.Range(ye.modifiedStartLineNumber,1,ye.modifiedEndLineNumber,1073741824),options:ve?$.lineInsertWithSign:$.lineInsert}),(!le(ye)||!ye.charChanges)&&de.decorations.push(Y(ye.modifiedStartLineNumber,1,ye.modifiedEndLineNumber,1073741824,$.charInsertWholeLine));const ke=ue(Se,we,ye.modifiedStartLineNumber,ye.modifiedEndLineNumber);if(de.overviewZones.push(new u.OverviewRulerZone(ke.startLineNumber,ke.endLineNumber,0,ge)),ye.charChanges){for(const Ie of ye.charChanges)if(ce(Ie))if(Ce)for(let Te=Ie.modifiedStartLineNumber;Te<=Ie.modifiedEndLineNumber;Te++){let De,_e;Te===Ie.modifiedStartLineNumber?De=Ie.modifiedStartColumn:De=Se.getLineFirstNonWhitespaceColumn(Te),Te===Ie.modifiedEndLineNumber?_e=Ie.modifiedEndColumn:_e=Se.getLineLastNonWhitespaceColumn(Te),de.decorations.push(Y(Te,De,Te,_e,$.charInsert))}else de.decorations.push(Y(Ie.modifiedStartLineNumber,Ie.modifiedStartColumn,Ie.modifiedEndLineNumber,Ie.modifiedEndColumn,$.charInsert))}}return de}}J.MINIMUM_EDITOR_WIDTH=100;class ee extends X{constructor(me,be,Ce,ve,he){super(me,be,Ce,ve,he)}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){return null}_produceOriginalFromDiff(me,be,Ce){return Ce>be?{afterLineNumber:Math.max(me.originalStartLineNumber,me.originalEndLineNumber),heightInLines:Ce-be,domNode:null}:null}_produceModifiedFromDiff(me,be,Ce){return be>Ce?{afterLineNumber:Math.max(me.modifiedStartLineNumber,me.modifiedEndLineNumber),heightInLines:be-Ce,domNode:null}:null}}class te extends Z{constructor(me,be){super(me);this._decorationsLeft=me.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(me.getOriginalEditor().onDidLayoutChange(Ce=>{this._decorationsLeft!==Ce.decorationsLeft&&(this._decorationsLeft=Ce.decorationsLeft,me.relayoutEditors())}))}setEnableSplitViewResizing(me){}_getViewZones(me,be,Ce,ve){const he=this._dataSource.getOriginalEditor(),ge=this._dataSource.getModifiedEditor();return new se(me,be,Ce,he,ge,ve).getViewZones()}_getOriginalEditorDecorations(me,be,Ce,ve){const he=String(this._removeColor),ge={decorations:[],overviewZones:[]},de=this._dataSource.getOriginalEditor(),Se=de.getModel(),we=de._getViewModel();let ye=0;for(const ke of be)if(le(ke)){for(ge.decorations.push({range:new S.Range(ke.originalStartLineNumber,1,ke.originalEndLineNumber,1073741824),options:$.lineDeleteMargin});ye<me.modified.length;){const De=me.modified[ye];if(De.diff&&De.diff.originalStartLineNumber>=ke.originalStartLineNumber)break;ye++}let Ie=0;if(ye<me.modified.length){const De=me.modified[ye];De.diff&&De.diff.originalStartLineNumber===ke.originalStartLineNumber&&De.diff.originalEndLineNumber===ke.originalEndLineNumber&&De.diff.modifiedStartLineNumber===ke.modifiedStartLineNumber&&De.diff.modifiedEndLineNumber===ke.modifiedEndLineNumber&&(Ie=De.heightInLines)}const Te=ue(Se,we,ke.originalStartLineNumber,ke.originalEndLineNumber);ge.overviewZones.push(new u.OverviewRulerZone(Te.startLineNumber,Te.endLineNumber,Ie,he))}return ge}_getModifiedEditorDecorations(me,be,Ce,ve){const he=this._dataSource.getModifiedEditor(),ge=String(this._insertColor),de={decorations:[],overviewZones:[]},Se=he.getModel(),we=he._getViewModel();for(const ye of be)if(ce(ye)){de.decorations.push({range:new S.Range(ye.modifiedStartLineNumber,1,ye.modifiedEndLineNumber,1073741824),options:ve?$.lineInsertWithSign:$.lineInsert});const ke=ue(Se,we,ye.modifiedStartLineNumber,ye.modifiedEndLineNumber);if(de.overviewZones.push(new u.OverviewRulerZone(ke.startLineNumber,ke.endLineNumber,0,ge)),ye.charChanges){for(const Ie of ye.charChanges)if(ce(Ie))if(Ce)for(let Te=Ie.modifiedStartLineNumber;Te<=Ie.modifiedEndLineNumber;Te++){let De,_e;Te===Ie.modifiedStartLineNumber?De=Ie.modifiedStartColumn:De=Se.getLineFirstNonWhitespaceColumn(Te),Te===Ie.modifiedEndLineNumber?_e=Ie.modifiedEndColumn:_e=Se.getLineLastNonWhitespaceColumn(Te),de.decorations.push(Y(Te,De,Te,_e,$.charInsert))}else de.decorations.push(Y(Ie.modifiedStartLineNumber,Ie.modifiedStartColumn,Ie.modifiedEndLineNumber,Ie.modifiedEndColumn,$.charInsert))}else de.decorations.push(Y(ye.modifiedStartLineNumber,1,ye.modifiedEndLineNumber,1073741824,$.charInsertWholeLine))}return de}layout(){return Math.max(5,this._decorationsLeft)}}class se extends X{constructor(me,be,Ce,ve,he,ge){super(me,be,Ce,ve,he);this._originalModel=ve.getModel(),this._renderIndicators=ge,this._pendingLineChange=[],this._pendingViewZones=[],this._lineBreaksComputer=this._modifiedEditor._getViewModel().createLineBreaksComputer()}getViewZones(){const me=super.getViewZones();return this._finalize(me),me}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){const me=document.createElement("div");return me.className="inline-added-margin-view-zone",me}_produceOriginalFromDiff(me,be,Ce){const ve=document.createElement("div");return ve.className="inline-added-margin-view-zone",{afterLineNumber:Math.max(me.originalStartLineNumber,me.originalEndLineNumber),heightInLines:Ce,domNode:document.createElement("div"),marginDomNode:ve}}_produceModifiedFromDiff(me,be,Ce){const ve=document.createElement("div");ve.className=`view-lines line-delete ${B.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`;const he=document.createElement("div");he.className="inline-deleted-margin-view-zone";const ge={shouldNotShrink:!0,afterLineNumber:me.modifiedEndLineNumber===0?me.modifiedStartLineNumber:me.modifiedStartLineNumber-1,heightInLines:be,minWidthInPx:0,domNode:ve,marginDomNode:he,diff:{originalStartLineNumber:me.originalStartLineNumber,originalEndLineNumber:me.originalEndLineNumber,modifiedStartLineNumber:me.modifiedStartLineNumber,modifiedEndLineNumber:me.modifiedEndLineNumber,originalModel:this._originalModel,viewLineCounts:null}};for(let de=me.originalStartLineNumber;de<=me.originalEndLineNumber;de++)this._lineBreaksComputer.addRequest(this._originalModel.getLineContent(de),null,null);return this._pendingLineChange.push(me),this._pendingViewZones.push(ge),ge}_finalize(me){const be=this._modifiedEditor.getOptions(),Ce=this._modifiedEditor.getModel().getOptions().tabSize,ve=be.get(44),he=be.get(29),ge=ve.typicalHalfwidthCharacterWidth,de=be.get(93),Se=this._originalModel.mightContainNonBasicASCII(),we=this._originalModel.mightContainRTL(),ye=be.get(59),Ie=be.get(131).decorationsWidth,Te=be.get(105),De=be.get(88),_e=be.get(83),Re=be.get(45),Ne=this._lineBreaksComputer.finalize();let xe=0;for(let Ae=0;Ae<this._pendingLineChange.length;Ae++){const Le=this._pendingLineChange[Ae],Me=this._pendingViewZones[Ae],We=Me.domNode;(0,w.applyFontInfo)(We,ve);const Ve=Me.marginDomNode;(0,w.applyFontInfo)(Ve,ve);const Ue=[];if(Le.charChanges)for(const Xe of Le.charChanges)le(Xe)&&Ue.push(new h.InlineDecoration(new S.Range(Xe.originalStartLineNumber,Xe.originalStartColumn,Xe.originalEndLineNumber,Xe.originalEndColumn),"char-delete",0));const et=Ue.length>0,Ze=(0,s.createStringBuilder)(1e4);let Fe=0,Qe=0,qe=null;for(let Xe=Le.originalStartLineNumber;Xe<=Le.originalEndLineNumber;Xe++){const rt=Xe-Le.originalStartLineNumber,it=this._originalModel.getLineTokens(Xe),at=it.getLineContent(),ft=Ne[xe++],vt=a.LineDecoration.filter(Ue,Xe,1,at.length+1);if(ft){let Dt=0;for(const At of ft.breakOffsets){const St=it.sliceAndInflate(Dt,At,0),He=at.substring(Dt,At);Fe=Math.max(Fe,this._renderOriginalLine(Qe++,He,St,a.LineDecoration.extractWrapped(vt,Dt,At),et,Se,we,ve,he,ye,Ie,Te,De,_e,Re,Ce,Ze,Ve)),Dt=At}for(qe||(qe=[]);qe.length<rt;)qe[qe.length]=1;qe[rt]=ft.breakOffsets.length,Me.heightInLines+=ft.breakOffsets.length-1;const kt=document.createElement("div");kt.className="gutter-delete",me.original.push({afterLineNumber:Xe,afterColumn:0,heightInLines:ft.breakOffsets.length-1,domNode:ae(),marginDomNode:kt})}else Fe=Math.max(Fe,this._renderOriginalLine(Qe++,at,it,vt,et,Se,we,ve,he,ye,Ie,Te,De,_e,Re,Ce,Ze,Ve))}Fe+=de;const Be=Ze.build(),Ke=G?G.createHTML(Be):Be;if(We.innerHTML=Ke,Me.minWidthInPx=Fe*ge,qe){const Xe=Le.originalEndLineNumber-Le.originalStartLineNumber;for(;qe.length<=Xe;)qe[qe.length]=1}Me.diff.viewLineCounts=qe}me.original.sort((Ae,Le)=>Ae.afterLineNumber-Le.afterLineNumber)}_renderOriginalLine(me,be,Ce,ve,he,ge,de,Se,we,ye,ke,Ie,Te,De,_e,Re,Ne,xe){Ne.appendASCIIString('<div class="view-line'),he||Ne.appendASCIIString(" char-delete"),Ne.appendASCIIString('" style="top:'),Ne.appendASCIIString(String(me*ye)),Ne.appendASCIIString('px;width:1000000px;">');const Ae=h.ViewLineRenderingData.isBasicASCII(be,ge),Le=h.ViewLineRenderingData.containsRTL(be,Ae,de),Me=(0,n.renderViewLine)(new n.RenderLineInput(Se.isMonospace&&!we,Se.canUseHalfwidthRightwardsArrow,be,!1,Ae,Le,0,Ce,ve,Re,0,Se.spaceWidth,Se.middotWidth,Se.wsmiddotWidth,Ie,Te,De,_e!==i.EditorFontLigatures.OFF,null),Ne);if(Ne.appendASCIIString("</div>"),this._renderIndicators){const We=document.createElement("div");We.className=`delete-sign ${y.ThemeIcon.asClassName(K)}`,We.setAttribute("style",`position:absolute;top:${me*ye}px;width:${ke}px;height:${ye}px;right:0;`),xe.appendChild(We)}return Me.characterMapping.getAbsoluteOffset(Me.characterMapping.length)}}function ie(pe,me){return(0,i.stringSet)(pe,me,["off","on","inherit"])}function ce(pe){return pe.modifiedEndLineNumber>0}function le(pe){return pe.originalEndLineNumber>0}function ae(){const pe=document.createElement("div");return pe.className="diagonal-fill",pe}function ue(pe,me,be,Ce){const ve=pe.getLineCount();return be=Math.min(ve,Math.max(1,be)),Ce=Math.min(ve,Math.max(1,Ce)),me.coordinatesConverter.convertModelRangeToViewRange(new S.Range(be,pe.getLineMinColumn(be),Ce,pe.getLineMaxColumn(Ce)))}function oe(pe,me){return{enableSplitViewResizing:(0,i.boolean)(pe.enableSplitViewResizing,me.enableSplitViewResizing),renderSideBySide:(0,i.boolean)(pe.renderSideBySide,me.renderSideBySide),maxComputationTime:(0,i.clampedInt)(pe.maxComputationTime,me.maxComputationTime,0,1073741824),maxFileSize:(0,i.clampedInt)(pe.maxFileSize,me.maxFileSize,0,1073741824),ignoreTrimWhitespace:(0,i.boolean)(pe.ignoreTrimWhitespace,me.ignoreTrimWhitespace),renderIndicators:(0,i.boolean)(pe.renderIndicators,me.renderIndicators),originalEditable:(0,i.boolean)(pe.originalEditable,me.originalEditable),diffCodeLens:(0,i.boolean)(pe.diffCodeLens,me.diffCodeLens),renderOverviewRuler:(0,i.boolean)(pe.renderOverviewRuler,me.renderOverviewRuler),diffWordWrap:ie(pe.diffWordWrap,me.diffWordWrap)}}function fe(pe,me){return{enableSplitViewResizing:pe.enableSplitViewResizing!==me.enableSplitViewResizing,renderSideBySide:pe.renderSideBySide!==me.renderSideBySide,maxComputationTime:pe.maxComputationTime!==me.maxComputationTime,maxFileSize:pe.maxFileSize!==me.maxFileSize,ignoreTrimWhitespace:pe.ignoreTrimWhitespace!==me.ignoreTrimWhitespace,renderIndicators:pe.renderIndicators!==me.renderIndicators,originalEditable:pe.originalEditable!==me.originalEditable,diffCodeLens:pe.diffCodeLens!==me.diffCodeLens,renderOverviewRuler:pe.renderOverviewRuler!==me.renderOverviewRuler,diffWordWrap:pe.diffWordWrap!==me.diffWordWrap}}(0,y.registerThemingParticipant)((pe,me)=>{const be=pe.getColor(E.diffInserted);be&&me.addRule(`.monaco-editor .char-insert, .monaco-diff-editor .char-insert { background-color: ${be}; }`);const Ce=pe.getColor(E.diffInsertedLine)||be;Ce&&me.addRule(`.monaco-editor .line-insert, .monaco-diff-editor .line-insert { background-color: ${Ce}; }`);const ve=pe.getColor(E.diffInsertedLineGutter)||Ce;ve&&(me.addRule(`.monaco-editor .inline-added-margin-view-zone { background-color: ${ve}; }`),me.addRule(`.monaco-editor .gutter-insert, .monaco-diff-editor .gutter-insert { background-color: ${ve}; }`));const he=pe.getColor(E.diffRemoved);he&&me.addRule(`.monaco-editor .char-delete, .monaco-diff-editor .char-delete { background-color: ${he}; }`);const ge=pe.getColor(E.diffRemovedLine)||he;ge&&me.addRule(`.monaco-editor .line-delete, .monaco-diff-editor .line-delete { background-color: ${ge}; }`);const de=pe.getColor(E.diffRemovedLineGutter)||ge;de&&(me.addRule(`.monaco-editor .inline-deleted-margin-view-zone { background-color: ${de}; }`),me.addRule(`.monaco-editor .gutter-delete, .monaco-diff-editor .gutter-delete { background-color: ${de}; }`));const Se=pe.getColor(E.diffInsertedOutline);Se&&me.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ${(0,V.isHighContrast)(pe.type)?"dashed":"solid"} ${Se}; }`);const we=pe.getColor(E.diffRemovedOutline);we&&me.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ${(0,V.isHighContrast)(pe.type)?"dashed":"solid"} ${we}; }`);const ye=pe.getColor(E.scrollbarShadow);ye&&me.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${ye}; }`);const ke=pe.getColor(E.diffBorder);ke&&me.addRule(`.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${ke}; }`);const Ie=pe.getColor(E.scrollbarSliderBackground);Ie&&me.addRule(` .monaco-diff-editor .diffViewport { background: ${Ie}; } `);const Te=pe.getColor(E.scrollbarSliderHoverBackground);Te&&me.addRule(` .monaco-diff-editor .diffViewport:hover { background: ${Te}; } `);const De=pe.getColor(E.scrollbarSliderActiveBackground);De&&me.addRule(` .monaco-diff-editor .diffViewport:active { background: ${De}; } `);const _e=pe.getColor(E.diffDiagonalFill);me.addRule(` .monaco-editor .diagonal-fill { background-image: linear-gradient( -45deg, ${_e} 12.5%, #0000 12.5%, #0000 50%, ${_e} 50%, ${_e} 62.5%, #0000 62.5%, #0000 100% ); background-size: 8px 8px; } `)})}),define(ne[229],re([1,0,51,72,165,351,184,28,7,5,26,12,98,37,95,67,124,62]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EmbeddedDiffEditorWidget=e.EmbeddedCodeEditorWidget=void 0;let r=class extends _.CodeEditorWidget{constructor(a,n,h,g,d,m,b,E,y,T,R,O){super(a,{...h.getRawOptions(),overflowWidgetsDomNode:h.getOverflowWidgetsDomNode()},{},g,d,m,b,E,y,T,R,O);this._parentEditor=h,this._overwriteOptions=n,super.updateOptions(this._overwriteOptions),this._register(h.onDidChangeConfiguration(x=>this._onParentConfigurationChanged(x)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(a){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(a){t.mixin(this._overwriteOptions,a,!0),super.updateOptions(this._overwriteOptions)}};r=Ee([W(3,w.IInstantiationService),W(4,f.ICodeEditorService),W(5,D.ICommandService),W(6,I.IContextKeyService),W(7,C.IThemeService),W(8,v.INotificationService),W(9,o.IAccessibilityService),W(10,s.ILanguageConfigurationService),W(11,l.ILanguageFeaturesService)],r),e.EmbeddedCodeEditorWidget=r;let p=class extends A.DiffEditorWidget{constructor(a,n,h,g,d,m,b,E,y,T,R,O){super(a,h.getRawOptions(),{},R,g,d,m,b,E,y,T,O);this._parentEditor=h,this._overwriteOptions=n,super.updateOptions(this._overwriteOptions),this._register(h.onDidChangeConfiguration(x=>this._onParentConfigurationChanged(x)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(a){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(a){t.mixin(this._overwriteOptions,a,!0),super.updateOptions(this._overwriteOptions)}};p=Ee([W(3,k.IEditorWorkerService),W(4,I.IContextKeyService),W(5,w.IInstantiationService),W(6,f.ICodeEditorService),W(7,C.IThemeService),W(8,v.INotificationService),W(9,c.IContextMenuService),W(10,i.IClipboardService),W(11,S.IEditorProgressService)],p),e.EmbeddedDiffEditorWidget=p}),define(ne[2064],re([1,0,11,2,39,49,20,84,58,122,93,164,1253,16,32,12,1023]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketMatchingController=void 0;const s=(0,i.registerColor)("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},o.localize(0,null));class l extends _.EditorAction{constructor(){super({id:"editor.action.jumpToBracket",label:o.localize(1,null),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:I.EditorContextKeys.editorTextFocus,primary:2048|1024|88,weight:100}})}run(n,h){u.get(h)?.jumpToBracket()}}class r extends _.EditorAction{constructor(){super({id:"editor.action.selectToBracket",label:o.localize(2,null),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(n,h,g){let d=!0;g&&g.selectBrackets===!1&&(d=!1),u.get(h)?.selectToBracket(d)}}class p{constructor(n,h,g){this.position=n,this.brackets=h,this.options=g}}class u extends f.Disposable{constructor(n){super();this._editor=n,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=[],this._updateBracketsSoon=this._register(new t.RunOnceScheduler(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(64),this._updateBracketsSoon.schedule(),this._register(n.onDidChangeCursorPosition(h=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(n.onDidChangeModelContent(h=>{this._updateBracketsSoon.schedule()})),this._register(n.onDidChangeModel(h=>{this._lastBracketsData=[],this._decorations=[],this._updateBracketsSoon.schedule()})),this._register(n.onDidChangeModelLanguageConfiguration(h=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(n.onDidChangeConfiguration(h=>{h.hasChanged(64)&&(this._matchBrackets=this._editor.getOption(64),this._decorations=this._editor.deltaDecorations(this._decorations,[]),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(n.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(n.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}static get(n){return n.getContribution(u.ID)}jumpToBracket(){if(!this._editor.hasModel())return;const n=this._editor.getModel(),h=this._editor.getSelections().map(g=>{const d=g.getStartPosition(),m=n.bracketPairs.matchBracket(d);let b=null;if(m)m[0].containsPosition(d)?b=m[1].getStartPosition():m[1].containsPosition(d)&&(b=m[0].getStartPosition());else{const E=n.bracketPairs.findEnclosingBrackets(d);if(E)b=E[0].getStartPosition();else{const y=n.bracketPairs.findNextBracket(d);y&&y.range&&(b=y.range.getStartPosition())}}return b?new D.Selection(b.lineNumber,b.column,b.lineNumber,b.column):new D.Selection(d.lineNumber,d.column,d.lineNumber,d.column)});this._editor.setSelections(h),this._editor.revealRange(h[0])}selectToBracket(n){if(!this._editor.hasModel())return;const h=this._editor.getModel(),g=[];this._editor.getSelections().forEach(d=>{const m=d.getStartPosition();let b=h.bracketPairs.matchBracket(m);if(!b&&(b=h.bracketPairs.findEnclosingBrackets(m),!b)){const T=h.bracketPairs.findNextBracket(m);T&&T.range&&(b=h.bracketPairs.matchBracket(T.range.getStartPosition()))}let E=null,y=null;if(b){b.sort(k.Range.compareRangesUsingStarts);const[T,R]=b;if(E=n?T.getStartPosition():T.getEndPosition(),y=n?R.getEndPosition():R.getStartPosition(),R.containsPosition(m)){const O=E;E=y,y=O}}E&&y&&g.push(new D.Selection(E.lineNumber,E.column,y.lineNumber,y.column))}),g.length>0&&(this._editor.setSelections(g),this._editor.revealRange(g[0]))}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();let n=[],h=0;for(const g of this._lastBracketsData){let d=g.brackets;d&&(n[h++]={range:d[0],options:g.options},n[h++]={range:d[1],options:g.options})}this._decorations=this._editor.deltaDecorations(this._decorations,n)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const n=this._editor.getSelections();if(n.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const h=this._editor.getModel(),g=h.getVersionId();let d=[];this._lastVersionId===g&&(d=this._lastBracketsData);let m=[],b=0;for(let O=0,x=n.length;O<x;O++){let F=n[O];F.isEmpty()&&(m[b++]=F.getStartPosition())}m.length>1&&m.sort(A.Position.compare);let E=[],y=0,T=0,R=d.length;for(let O=0,x=m.length;O<x;O++){let F=m[O];for(;T<R&&d[T].position.isBefore(F);)T++;if(T<R&&d[T].position.equals(F))E[y++]=d[T];else{let L=h.bracketPairs.matchBracket(F,20),M=u._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!L&&this._matchBrackets==="always"&&(L=h.bracketPairs.findEnclosingBrackets(F,20),M=u._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),E[y++]=new p(F,L,M)}}this._lastBracketsData=E,this._lastVersionId=g}}e.BracketMatchingController=u,u.ID="editor.contrib.bracketMatchingController",u._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=v.ModelDecorationOptions.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:(0,S.themeColorFromId)(s),position:w.OverviewRulerLane.Center}}),u._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=v.ModelDecorationOptions.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"}),(0,_.registerEditorContribution)(u.ID,u),(0,_.registerEditorAction)(r),(0,_.registerEditorAction)(l),(0,S.registerThemingParticipant)((a,n)=>{const h=a.getColor(C.editorBracketMatchBackground);h&&n.addRule(`.monaco-editor .bracket-match { background-color: ${h}; }`);const g=a.getColor(C.editorBracketMatchBorder);g&&n.addRule(`.monaco-editor .bracket-match { border: 1px solid ${g}; }`)}),c.MenuRegistry.appendMenuItem(c.MenuId.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:o.localize(3,null)},order:2})}),define(ne[2065],re([1,0,10,181,20,93,1025]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensWidget=e.CodeLensHelper=void 0;class k{constructor(C,o,c){this.afterColumn=1073741824,this.afterLineNumber=C,this.heightInPx=o,this._onHeight=c,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(C){this._lastHeight===void 0?this._lastHeight=C:this._lastHeight!==C&&(this._lastHeight=C,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class D{constructor(C,o,c){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=C,this._id=`codelens.widget-${D._idPool++}`,this.updatePosition(c),this._domNode=document.createElement("span"),this._domNode.className=`codelens-decoration ${o}`}withCommands(C,o){this._commands.clear();let c=[],i=!1;for(let S=0;S<C.length;S++){const s=C[S];if(!!s&&(i=!0,s.command)){const l=(0,f.renderLabelWithIcons)(s.command.title.trim());s.command.id?(c.push(t.$("a",{id:String(S),title:s.command.tooltip},...l)),this._commands.set(String(S),s.command)):c.push(t.$("span",{title:s.command.tooltip},...l)),S+1<C.length&&c.push(t.$("span",void 0,"\xA0|\xA0"))}}i?(t.reset(this._domNode,...c),this._isEmpty&&o&&this._domNode.classList.add("fadein"),this._isEmpty=!1):t.reset(this._domNode,t.$("span",void 0,"no commands"))}getCommand(C){return C.parentElement===this._domNode?this._commands.get(C.id):void 0}getId(){return this._id}getDomNode(){return this._domNode}updatePosition(C){const o=this._editor.getModel().getLineFirstNonWhitespaceColumn(C);this._widgetPosition={position:{lineNumber:C,column:o},preference:[1]}}getPosition(){return this._widgetPosition||null}}D._idPool=0;class I{constructor(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}addDecoration(C,o){this._addDecorations.push(C),this._addDecorationsCallbacks.push(o)}removeDecoration(C){this._removeDecorations.push(C)}commit(C){let o=C.deltaDecorations(this._removeDecorations,this._addDecorations);for(let c=0,i=o.length;c<i;c++)this._addDecorationsCallbacks[c](o[c])}}e.CodeLensHelper=I;class w{constructor(C,o,c,i,S,s,l){this._isDisposed=!1,this._editor=o,this._className=c,this._data=C,this._decorationIds=[];let r,p=[];this._data.forEach((u,a)=>{u.symbol.command&&p.push(u.symbol),i.addDecoration({range:u.symbol.range,options:A.ModelDecorationOptions.EMPTY},n=>this._decorationIds[a]=n),r?r=_.Range.plusRange(r,u.symbol.range):r=_.Range.lift(u.symbol.range)}),this._viewZone=new k(r.startLineNumber-1,s,l),this._viewZoneId=S.addZone(this._viewZone),p.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(p,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new D(this._editor,this._className,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(C,o){this._decorationIds.forEach(C.removeDecoration,C),this._decorationIds=[],o&&o.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some((C,o)=>{const c=this._editor.getModel().getDecorationRange(C),i=this._data[o].symbol;return!!(c&&_.Range.isEmpty(i.range)===c.isEmpty())})}updateCodeLensSymbols(C,o){this._decorationIds.forEach(o.removeDecoration,o),this._decorationIds=[],this._data=C,this._data.forEach((c,i)=>{o.addDecoration({range:c.symbol.range,options:A.ModelDecorationOptions.EMPTY},S=>this._decorationIds[i]=S)})}updateHeight(C,o){this._viewZone.heightInPx=C,o.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(C){if(!this._viewZone.isVisible())return null;for(let o=0;o<this._decorationIds.length;o++){const c=C.getDecorationRange(this._decorationIds[o]);c&&(this._data[o].symbol.range=c)}return this._data}updateCommands(C){this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(C,!0);for(let o=0;o<this._data.length;o++){const c=C[o];if(c){const{symbol:i}=this._data[o];i.command=c.command||i.command}}}getCommand(C){return this._contentWidget?.getCommand(C)}getLineNumber(){const C=this._editor.getModel().getDecorationRange(this._decorationIds[0]);return C?C.startLineNumber:-1}update(C){if(this.isValid()){const o=this._editor.getModel().getDecorationRange(this._decorationIds[0]);o&&(this._viewZone.afterLineNumber=o.startLineNumber-1,C.layoutZone(this._viewZoneId),this._contentWidget&&(this._contentWidget.updatePosition(o.startLineNumber),this._editor.layoutContentWidget(this._contentWidget)))}}getItems(){return this._data}}e.CodeLensWidget=w}),define(ne[2066],re([1,0,10,11,22,116,2,453,39,123,58,726,1985,2065,1259,28,26,53,228,62]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensContribution=void 0;let u=class{constructor(n,h,g,d,m,b){this._editor=n,this._languageFeaturesService=h,this._commandService=d,this._notificationService=m,this._codeLensCache=b,this._disposables=new k.DisposableStore,this._localToDispose=new k.DisposableStore,this._lenses=[],this._oldCodeLensModels=new k.DisposableStore,this._provideCodeLensDebounce=g.for(h.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=g.for(h.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new f.RunOnceScheduler(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(E=>{(E.hasChanged(44)||E.hasChanged(16)||E.hasChanged(15))&&this._updateLensStyle(),E.hasChanged(14)&&this._onModelChange()})),this._disposables.add(h.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._styleClassName="_"+(0,A.hash)(this._editor.getId()).toString(16),this._styleElement=t.createStyleSheet(t.isInShadowDOM(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0),this._updateLensStyle()}dispose(){this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),this._currentCodeLensModel?.dispose(),this._styleElement.remove()}_getLayoutInfo(){let n=this._editor.getOption(16),h;return!n||n<5?(n=this._editor.getOption(46)*.9|0,h=this._editor.getOption(59)):h=n*Math.max(1.3,this._editor.getOption(59)/this._editor.getOption(46))|0,{codeLensHeight:h,fontSize:n}}_updateLensStyle(){const{codeLensHeight:n,fontSize:h}=this._getLayoutInfo(),g=this._editor.getOption(15),d=this._editor.getOption(44),m=`--codelens-font-family${this._styleClassName}`,b=`--codelens-font-features${this._styleClassName}`;let E=` .monaco-editor .codelens-decoration.${this._styleClassName} { line-height: ${n}px; font-size: ${h}px; padding-right: ${Math.round(h*.5)}px; font-feature-settings: var(${b}) } .monaco-editor .codelens-decoration.${this._styleClassName} span.codicon { line-height: ${n}px; font-size: ${h}px; } `;g&&(E+=`.monaco-editor .codelens-decoration.${this._styleClassName} { font-family: var(${m}), ${w.EDITOR_FONT_DEFAULTS.fontFamily}}`),this._styleElement.textContent=E,this._editor.getContainerDomNode().style.setProperty(m,g??"inherit"),this._editor.getContainerDomNode().style.setProperty(b,d.fontFeatureSettings),this._editor.changeViewZones(y=>{for(let T of this._lenses)T.updateHeight(n,y)})}_localDispose(){this._getCodeLensModelPromise?.cancel(),this._getCodeLensModelPromise=void 0,this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),this._currentCodeLensModel?.dispose()}_onModelChange(){this._localDispose();const n=this._editor.getModel();if(!n||!this._editor.getOption(14))return;const h=this._codeLensCache.get(n);if(h&&this._renderCodeLensSymbols(h),!this._languageFeaturesService.codeLensProvider.has(n)){h&&this._localToDispose.add((0,f.disposableTimeout)(()=>{const d=this._codeLensCache.get(n);h===d&&(this._codeLensCache.delete(n),this._onModelChange())},30*1e3));return}for(const d of this._languageFeaturesService.codeLensProvider.all(n))if(typeof d.onDidChange=="function"){let m=d.onDidChange(()=>g.schedule());this._localToDispose.add(m)}const g=new f.RunOnceScheduler(()=>{const d=Date.now();this._getCodeLensModelPromise?.cancel(),this._getCodeLensModelPromise=(0,f.createCancelablePromise)(m=>(0,C.getCodeLensModel)(this._languageFeaturesService.codeLensProvider,n,m)),this._getCodeLensModelPromise.then(m=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=m,this._codeLensCache.put(n,m);const b=this._provideCodeLensDebounce.update(n,Date.now()-d);g.delay=b,this._renderCodeLensSymbols(m),this._resolveCodeLensesInViewportSoon()},_.onUnexpectedError)},this._provideCodeLensDebounce.get(n));this._localToDispose.add(g),this._localToDispose.add((0,k.toDisposable)(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._editor.changeDecorations(d=>{this._editor.changeViewZones(m=>{let b=[],E=-1;this._lenses.forEach(T=>{!T.isValid()||E===T.getLineNumber()?b.push(T):(T.update(m),E=T.getLineNumber())});let y=new c.CodeLensHelper;b.forEach(T=>{T.dispose(y,m),this._lenses.splice(this._lenses.indexOf(T),1)}),y.commit(d)})}),g.schedule()})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{g.schedule()})),this._localToDispose.add(this._editor.onDidScrollChange(d=>{d.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add((0,k.toDisposable)(()=>{if(this._editor.getModel()){const d=D.StableEditorScrollState.capture(this._editor);this._editor.changeDecorations(m=>{this._editor.changeViewZones(b=>{this._disposeAllLenses(m,b)})}),d.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(d=>{if(d.target.type!==9)return;let m=d.target.element;if(m?.tagName==="SPAN"&&(m=m.parentElement),m?.tagName==="A")for(const b of this._lenses){let E=b.getCommand(m);if(E){this._commandService.executeCommand(E.id,...E.arguments||[]).catch(y=>this._notificationService.error(y));break}}})),g.schedule()}_disposeAllLenses(n,h){const g=new c.CodeLensHelper;for(const d of this._lenses)d.dispose(g,h);n&&g.commit(n),this._lenses.length=0}_renderCodeLensSymbols(n){if(!this._editor.hasModel())return;let h=this._editor.getModel().getLineCount(),g=[],d;for(let E of n.lenses){let y=E.symbol.range.startLineNumber;y<1||y>h||(d&&d[d.length-1].symbol.range.startLineNumber===y?d.push(E):(d=[E],g.push(d)))}const m=D.StableEditorScrollState.capture(this._editor),b=this._getLayoutInfo();this._editor.changeDecorations(E=>{this._editor.changeViewZones(y=>{const T=new c.CodeLensHelper;let R=0,O=0;for(;O<g.length&&R<this._lenses.length;){let x=g[O][0].symbol.range.startLineNumber,F=this._lenses[R].getLineNumber();F<x?(this._lenses[R].dispose(T,y),this._lenses.splice(R,1)):F===x?(this._lenses[R].updateCodeLensSymbols(g[O],T),O++,R++):(this._lenses.splice(R,0,new c.CodeLensWidget(g[O],this._editor,this._styleClassName,T,y,b.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),R++,O++)}for(;R<this._lenses.length;)this._lenses[R].dispose(T,y),this._lenses.splice(R,1);for(;O<g.length;)this._lenses.push(new c.CodeLensWidget(g[O],this._editor,this._styleClassName,T,y,b.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),O++;T.commit(E)})}),m.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0;const n=this._editor.getModel();if(!n)return;const h=[],g=[];if(this._lenses.forEach(b=>{const E=b.computeIfNecessary(n);E&&(h.push(E),g.push(b))}),h.length===0)return;const d=Date.now(),m=(0,f.createCancelablePromise)(b=>{const E=h.map((y,T)=>{const R=new Array(y.length),O=y.map((x,F)=>!x.symbol.command&&typeof x.provider.resolveCodeLens=="function"?Promise.resolve(x.provider.resolveCodeLens(n,x.symbol,b)).then(L=>{R[F]=L},_.onUnexpectedExternalError):(R[F]=x.symbol,Promise.resolve(void 0)));return Promise.all(O).then(()=>{!b.isCancellationRequested&&!g[T].isDisposed()&&g[T].updateCommands(R)})});return Promise.all(E)});this._resolveCodeLensesPromise=m,this._resolveCodeLensesPromise.then(()=>{const b=this._resolveCodeLensesDebounce.update(n,Date.now()-d);this._resolveCodeLensesScheduler.delay=b,this._currentCodeLensModel&&this._codeLensCache.put(n,this._currentCodeLensModel),this._oldCodeLensModels.clear(),m===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},b=>{(0,_.onUnexpectedError)(b),m===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getModel(){return this._currentCodeLensModel}};u.ID="css.editor.codeLens",u=Ee([W(1,p.ILanguageFeaturesService),W(2,r.ILanguageFeatureDebounceService),W(3,S.ICommandService),W(4,s.INotificationService),W(5,o.ICodeLensCache)],u),e.CodeLensContribution=u,(0,I.registerEditorContribution)(u.ID,u),(0,I.registerEditorAction)(class extends I.EditorAction{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:v.EditorContextKeys.hasCodeLensProvider,label:(0,i.localize)(0,null),alias:"Show CodeLens Commands For Current Line"})}async run(n,h){if(!h.hasModel())return;const g=n.get(l.IQuickInputService),d=n.get(S.ICommandService),m=n.get(s.INotificationService),b=h.getSelection().positionLineNumber,E=h.getContribution(u.ID);if(!E)return;const y=E.getModel();if(!y)return;const T=[];for(const O of y.lenses)O.symbol.command&&O.symbol.range.startLineNumber===b&&T.push({label:O.symbol.command.title,command:O.symbol.command});if(T.length===0)return;const R=await g.pick(T,{canPickMany:!1});if(!!R){if(y.isDisposed)return await d.executeCommand(this.id);try{await d.executeCommand(R.command.id,...R.command.arguments||[])}catch(O){m.error(O)}}}})}),define(ne[559],re([1,0,11,66,22,2,151,29,402,39,20,93,228,62,727,8]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorDetector=e.ColorDecorationInjectedTextMarker=void 0,e.ColorDecorationInjectedTextMarker=Object.create({});const s=500;let l=class Zs extends A.Disposable{constructor(p,u,a,n){super();this._editor=p,this._configurationService=u,this._languageFeaturesService=a,this._localToDispose=this._register(new A.DisposableStore),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=new Set,this._ruleFactory=new I.DynamicCssRules(this._editor),this._colorDecorationClassRefs=this._register(new A.DisposableStore),this._debounceInformation=n.for(a.colorProvider,"Document Colors",{min:Zs.RECOMPUTE_TIME}),this._register(p.onDidChangeModel(()=>{this._isEnabled=this.isEnabled(),this.onModelChanged()})),this._register(p.onDidChangeModelLanguage(()=>this.onModelChanged())),this._register(a.colorProvider.onDidChange(()=>this.onModelChanged())),this._register(p.onDidChangeConfiguration(()=>{let h=this._isEnabled;this._isEnabled=this.isEnabled(),h!==this._isEnabled&&(this._isEnabled?this.onModelChanged():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isEnabled=this.isEnabled(),this.onModelChanged()}isEnabled(){const p=this._editor.getModel();if(!p)return!1;const u=p.getLanguageId(),a=this._configurationService.getValue(u);if(a&&typeof a=="object"){const n=a.colorDecorators;if(n&&n.enable!==void 0&&!n.enable)return n.enable}return this._editor.getOption(17)}static get(p){return p.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}onModelChanged(){if(this.stop(),!this._isEnabled)return;const p=this._editor.getModel();!p||!this._languageFeaturesService.colorProvider.has(p)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new t.TimeoutTimer,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(p)))})),this.beginCompute())}beginCompute(){this._computePromise=(0,t.createCancelablePromise)(async p=>{const u=this._editor.getModel();if(!u)return Promise.resolve([]);const a=new k.StopWatch(!1),n=await(0,i.getColors)(this._languageFeaturesService.colorProvider,u,p);return this._debounceInformation.update(u,a.elapsed()),n}),this._computePromise.then(p=>{this.updateDecorations(p),this.updateColorDecorators(p),this._computePromise=null},_.onUnexpectedError)}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(p){const u=p.map(a=>({range:{startLineNumber:a.colorInfo.range.startLineNumber,startColumn:a.colorInfo.range.startColumn,endLineNumber:a.colorInfo.range.endLineNumber,endColumn:a.colorInfo.range.endColumn},options:C.ModelDecorationOptions.EMPTY}));this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,u),this._colorDatas=new Map,this._decorationsIds.forEach((a,n)=>this._colorDatas.set(a,p[n]))}updateColorDecorators(p){this._colorDecorationClassRefs.clear();let u=[];for(let a=0;a<p.length&&u.length<s;a++){const{red:n,green:h,blue:g,alpha:d}=p[a].colorInfo.color,m=new f.RGBA(Math.round(n*255),Math.round(h*255),Math.round(g*255),d);let b=`rgba(${m.r}, ${m.g}, ${m.b}, ${m.a})`;const E=this._colorDecorationClassRefs.add(this._ruleFactory.createClassNameRef({backgroundColor:b}));u.push({range:{startLineNumber:p[a].colorInfo.range.startLineNumber,startColumn:p[a].colorInfo.range.startColumn,endLineNumber:p[a].colorInfo.range.endLineNumber,endColumn:p[a].colorInfo.range.endColumn},options:{description:"colorDetector",before:{content:D.noBreakWhitespace,inlineClassName:`${E.className} colorpicker-color-decoration`,inlineClassNameAffectsLetterSpacing:!0,attachedData:e.ColorDecorationInjectedTextMarker}}})}this._colorDecoratorIds=new Set(this._editor.deltaDecorations([...this._colorDecoratorIds],u))}removeAllDecorations(){this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,[]),this._colorDecoratorIds=new Set(this._editor.deltaDecorations([...this._colorDecoratorIds],[])),this._colorDecorationClassRefs.clear()}getColorData(p){const u=this._editor.getModel();if(!u)return null;const a=u.getDecorationsInRange(v.Range.fromPositions(p,p)).filter(n=>this._colorDatas.has(n.id));return a.length===0?null:this._colorDatas.get(a[0].id)}isColorDecorationId(p){return this._colorDecoratorIds.has(p)}};l.ID="editor.contrib.colorDetector",l.RECOMPUTE_TIME=1e3,l=Ee([W(1,S.IConfigurationService),W(2,c.ILanguageFeaturesService),W(3,o.ILanguageFeatureDebounceService)],l),e.ColorDetector=l,(0,w.registerEditorContribution)(l.ID,l)}),define(ne[2067],re([1,0,11,30,66,2,20,727,559,1188,2024,12]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorHoverParticipant=e.ColorHover=void 0;class o{constructor(S,s,l,r){this.owner=S,this.range=s,this.model=l,this.provider=r,this.forceShowAtRange=!0}isValidForHoverAnchor(S){return S.type===1&&this.range.startColumn<=S.range.startColumn&&this.range.endColumn>=S.range.endColumn}}e.ColorHover=o;let c=class{constructor(S,s){this._editor=S,this._themeService=s,this.hoverOrdinal=1}computeSync(S,s){return[]}computeAsync(S,s,l){return t.AsyncIterableObject.fromPromise(this._computeAsync(S,s,l))}async _computeAsync(S,s,l){if(!this._editor.hasModel())return[];const r=I.ColorDetector.get(this._editor);if(!r)return[];for(const p of s){if(!r.isColorDecorationId(p.id))continue;const u=r.getColorData(p.range.getStartPosition());if(u)return[await this._createColorHover(this._editor.getModel(),u.colorInfo,u.provider)]}return[]}async _createColorHover(S,s,l){const r=S.getValueInRange(s.range),{red:p,green:u,blue:a,alpha:n}=s.color,h=new _.RGBA(Math.round(p*255),Math.round(u*255),Math.round(a*255),n),g=new _.Color(h),d=await(0,D.getColorPresentations)(S,s,l,f.CancellationToken.None),m=new w.ColorPickerModel(g,[],0);return m.colorPresentations=d||[],m.guessColorPresentation(g,r),new o(this,k.Range.lift(s.range),m,l)}renderHoverParts(S,s){if(s.length===0||!this._editor.hasModel())return A.Disposable.None;const l=new A.DisposableStore,r=s[0],p=this._editor.getModel(),u=r.model,a=l.add(new v.ColorPickerWidget(S.fragment,u,this._editor.getOption(129),this._themeService));S.setColorPicker(a);let n=new k.Range(r.range.startLineNumber,r.range.startColumn,r.range.endLineNumber,r.range.endColumn);const h=()=>{let d,m;if(u.presentation.textEdit){d=[u.presentation.textEdit],m=new k.Range(u.presentation.textEdit.range.startLineNumber,u.presentation.textEdit.range.startColumn,u.presentation.textEdit.range.endLineNumber,u.presentation.textEdit.range.endColumn);const b=this._editor.getModel()._setTrackedRange(null,m,3);this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",d),m=this._editor.getModel()._getTrackedRange(b)||m}else d=[{range:n,text:u.presentation.label,forceMoveMarkers:!1}],m=n.setEndPosition(n.endLineNumber,n.startColumn+u.presentation.label.length),this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",d);u.presentation.additionalTextEdits&&(d=[...u.presentation.additionalTextEdits],this._editor.executeEdits("colorpicker",d),S.hide()),this._editor.pushUndoStop(),n=m},g=d=>(0,D.getColorPresentations)(p,{range:n,color:{red:d.rgba.r/255,green:d.rgba.g/255,blue:d.rgba.b/255,alpha:d.rgba.a}},r.provider,f.CancellationToken.None).then(m=>{u.colorPresentations=m||[]});return l.add(u.onColorFlushed(d=>{g(d).then(h)})),l.add(u.onDidChangeColor(g)),l}};c=Ee([W(1,C.IThemeService)],c),e.ColorHoverParticipant=c}),define(ne[2068],re([1,0,2,14,39,49,20,84,93,1189,1027]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DragAndDropController=void 0;function v(o){return f.isMacintosh?o.altKey:o.ctrlKey}class C extends t.Disposable{constructor(c){super();this._editor=c,this._register(this._editor.onMouseDown(i=>this._onEditorMouseDown(i))),this._register(this._editor.onMouseUp(i=>this._onEditorMouseUp(i))),this._register(this._editor.onMouseDrag(i=>this._onEditorMouseDrag(i))),this._register(this._editor.onMouseDrop(i=>this._onEditorMouseDrop(i))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(i=>this.onEditorKeyDown(i))),this._register(this._editor.onKeyUp(i=>this.onEditorKeyUp(i))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._dndDecorationIds=[],this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}static get(c){return c.getContribution(C.ID)}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(c){!this._editor.getOption(31)||this._editor.getOption(18)||(v(c)&&(this._modifierPressed=!0),this._mouseDown&&v(c)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(c){!this._editor.getOption(31)||this._editor.getOption(18)||(v(c)&&(this._modifierPressed=!1),this._mouseDown&&c.keyCode===C.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(c){this._mouseDown=!0}_onEditorMouseUp(c){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(c){let i=c.target;if(this._dragSelection===null){let s=(this._editor.getSelections()||[]).filter(l=>i.position&&l.containsPosition(i.position));if(s.length===1)this._dragSelection=s[0];else return}v(c.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),i.position&&(this._dragSelection.containsPosition(i.position)?this._removeDecoration():this.showAt(i.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(c){if(c.target&&(this._hitContent(c.target)||this._hitMargin(c.target))&&c.target.position){let i=new A.Position(c.target.position.lineNumber,c.target.position.column);if(this._dragSelection===null){let S=null;if(c.event.shiftKey){let s=this._editor.getSelection();if(s){const{selectionStartLineNumber:l,selectionStartColumn:r}=s;S=[new D.Selection(l,r,i.lineNumber,i.column)]}}else S=(this._editor.getSelections()||[]).map(s=>s.containsPosition(i)?new D.Selection(i.lineNumber,i.column,i.lineNumber,i.column):s);this._editor.setSelections(S||[],"mouse",3)}else(!this._dragSelection.containsPosition(i)||(v(c.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(i)||this._dragSelection.getStartPosition().equals(i)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(C.ID,new w.DragAndDropCommand(this._dragSelection,i,v(c.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(c){let i=[{range:new k.Range(c.lineNumber,c.column,c.lineNumber,c.column),options:C._DECORATION_OPTIONS}];this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,i),this._editor.revealPosition(c,1)}_removeDecoration(){this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,[])}_hitContent(c){return c.type===6||c.type===7}_hitMargin(c){return c.type===2||c.type===3||c.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}e.DragAndDropController=C,C.ID="editor.contrib.dragAndDrop",C.TRIGGER_KEY_VALUE=f.isMacintosh?6:5,C._DECORATION_OPTIONS=I.ModelDecorationOptions.register({description:"dnd-target",className:"dnd-target"}),(0,_.registerEditorContribution)(C.ID,C)}),define(ne[760],re([1,0,20,122,93,32,12]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindDecorations=void 0;class D{constructor(w){this._editor=w,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.deltaDecorations(this._allDecorations(),[]),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const w=this._findScopeDecorationIds.map(v=>this._editor.getModel().getDecorationRange(v)).filter(v=>!!v);if(w.length)return w}return null}getStartPosition(){return this._startPosition}setStartPosition(w){this._startPosition=w,this.setCurrentFindMatch(null)}_getDecorationIndex(w){const v=this._decorations.indexOf(w);return v>=0?v+1:1}getCurrentMatchesPosition(w){let v=this._editor.getModel().getDecorationsInRange(w);for(const C of v){const o=C.options;if(o===D._FIND_MATCH_DECORATION||o===D._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(C.id)}return 0}setCurrentFindMatch(w){let v=null,C=0;if(w)for(let o=0,c=this._decorations.length;o<c;o++){let i=this._editor.getModel().getDecorationRange(this._decorations[o]);if(w.equalsRange(i)){v=this._decorations[o],C=o+1;break}}return(this._highlightedDecorationId!==null||v!==null)&&this._editor.changeDecorations(o=>{if(this._highlightedDecorationId!==null&&(o.changeDecorationOptions(this._highlightedDecorationId,D._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),v!==null&&(this._highlightedDecorationId=v,o.changeDecorationOptions(this._highlightedDecorationId,D._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(o.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),v!==null){let c=this._editor.getModel().getDecorationRange(v);if(c.startLineNumber!==c.endLineNumber&&c.endColumn===1){let i=c.endLineNumber-1,S=this._editor.getModel().getLineMaxColumn(i);c=new t.Range(c.startLineNumber,c.startColumn,i,S)}this._rangeHighlightDecorationId=o.addDecoration(c,D._RANGE_HIGHLIGHT_DECORATION)}}),C}set(w,v){this._editor.changeDecorations(C=>{let o=D._FIND_MATCH_DECORATION,c=[];if(w.length>1e3){o=D._FIND_MATCH_NO_OVERVIEW_DECORATION;const S=this._editor.getModel().getLineCount(),l=this._editor.getLayoutInfo().height/S,r=Math.max(2,Math.ceil(3/l));let p=w[0].range.startLineNumber,u=w[0].range.endLineNumber;for(let a=1,n=w.length;a<n;a++){const h=w[a].range;u+r>=h.startLineNumber?h.endLineNumber>u&&(u=h.endLineNumber):(c.push({range:new t.Range(p,1,u,1),options:D._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),p=h.startLineNumber,u=h.endLineNumber)}c.push({range:new t.Range(p,1,u,1),options:D._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}let i=new Array(w.length);for(let S=0,s=w.length;S<s;S++)i[S]={range:w[S].range,options:o};this._decorations=C.deltaDecorations(this._decorations,i),this._overviewRulerApproximateDecorations=C.deltaDecorations(this._overviewRulerApproximateDecorations,c),this._rangeHighlightDecorationId&&(C.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach(S=>C.removeDecoration(S)),this._findScopeDecorationIds=[]),v?.length&&(this._findScopeDecorationIds=v.map(S=>C.addDecoration(S,D._FIND_SCOPE_DECORATION)))})}matchBeforePosition(w){if(this._decorations.length===0)return null;for(let v=this._decorations.length-1;v>=0;v--){let C=this._decorations[v],o=this._editor.getModel().getDecorationRange(C);if(!(!o||o.endLineNumber>w.lineNumber)){if(o.endLineNumber<w.lineNumber)return o;if(!(o.endColumn>w.column))return o}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(w){if(this._decorations.length===0)return null;for(let v=0,C=this._decorations.length;v<C;v++){let o=this._decorations[v],c=this._editor.getModel().getDecorationRange(o);if(!(!c||c.startLineNumber<w.lineNumber)){if(c.startLineNumber>w.lineNumber)return c;if(!(c.startColumn<w.column))return c}}return this._editor.getModel().getDecorationRange(this._decorations[0])}_allDecorations(){let w=[];return w=w.concat(this._decorations),w=w.concat(this._overviewRulerApproximateDecorations),this._findScopeDecorationIds.length&&w.push(...this._findScopeDecorationIds),this._rangeHighlightDecorationId&&w.push(this._rangeHighlightDecorationId),w}}e.FindDecorations=D,D._CURRENT_FIND_MATCH_DECORATION=_.ModelDecorationOptions.register({description:"current-find-match",stickiness:1,zIndex:13,className:"currentFindMatch",showIfCollapsed:!0,overviewRuler:{color:(0,k.themeColorFromId)(A.overviewRulerFindMatchForeground),position:f.OverviewRulerLane.Center},minimap:{color:(0,k.themeColorFromId)(A.minimapFindMatch),position:f.MinimapPosition.Inline}}),D._FIND_MATCH_DECORATION=_.ModelDecorationOptions.register({description:"find-match",stickiness:1,zIndex:10,className:"findMatch",showIfCollapsed:!0,overviewRuler:{color:(0,k.themeColorFromId)(A.overviewRulerFindMatchForeground),position:f.OverviewRulerLane.Center},minimap:{color:(0,k.themeColorFromId)(A.minimapFindMatch),position:f.MinimapPosition.Inline}}),D._FIND_MATCH_NO_OVERVIEW_DECORATION=_.ModelDecorationOptions.register({description:"find-match-no-overview",stickiness:1,className:"findMatch",showIfCollapsed:!0}),D._FIND_MATCH_ONLY_OVERVIEW_DECORATION=_.ModelDecorationOptions.register({description:"find-match-only-overview",stickiness:1,overviewRuler:{color:(0,k.themeColorFromId)(A.overviewRulerFindMatchForeground),position:f.OverviewRulerLane.Center}}),D._RANGE_HIGHLIGHT_DECORATION=_.ModelDecorationOptions.register({description:"find-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0}),D._FIND_SCOPE_DECORATION=_.ModelDecorationOptions.register({description:"find-scope",className:"findScope",isWholeLine:!0})}),define(ne[288],re([1,0,15,11,2,341,49,20,84,345,760,1190,707,7]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindModelBoundToEditorModel=e.MATCHES_LIMIT=e.FIND_IDS=e.TogglePreserveCaseKeybinding=e.ToggleSearchScopeKeybinding=e.ToggleRegexKeybinding=e.ToggleWholeWordKeybinding=e.ToggleCaseSensitiveKeybinding=e.CONTEXT_REPLACE_INPUT_FOCUSED=e.CONTEXT_FIND_INPUT_FOCUSED=e.CONTEXT_FIND_WIDGET_NOT_VISIBLE=e.CONTEXT_FIND_WIDGET_VISIBLE=void 0,e.CONTEXT_FIND_WIDGET_VISIBLE=new c.RawContextKey("findWidgetVisible",!1),e.CONTEXT_FIND_WIDGET_NOT_VISIBLE=e.CONTEXT_FIND_WIDGET_VISIBLE.toNegated(),e.CONTEXT_FIND_INPUT_FOCUSED=new c.RawContextKey("findInputFocussed",!1),e.CONTEXT_REPLACE_INPUT_FOCUSED=new c.RawContextKey("replaceInputFocussed",!1),e.ToggleCaseSensitiveKeybinding={primary:512|33,mac:{primary:2048|512|33}},e.ToggleWholeWordKeybinding={primary:512|53,mac:{primary:2048|512|53}},e.ToggleRegexKeybinding={primary:512|48,mac:{primary:2048|512|48}},e.ToggleSearchScopeKeybinding={primary:512|42,mac:{primary:2048|512|42}},e.TogglePreserveCaseKeybinding={primary:512|46,mac:{primary:2048|512|46}},e.FIND_IDS={StartFindAction:"actions.find",StartFindWithSelection:"actions.findWithSelection",StartFindWithArgs:"editor.actions.findWithArgs",NextMatchFindAction:"editor.action.nextMatchFindAction",PreviousMatchFindAction:"editor.action.previousMatchFindAction",NextSelectionMatchFindAction:"editor.action.nextSelectionMatchFindAction",PreviousSelectionMatchFindAction:"editor.action.previousSelectionMatchFindAction",StartFindReplaceAction:"editor.action.startFindReplaceAction",CloseFindWidgetCommand:"closeFindWidget",ToggleCaseSensitiveCommand:"toggleFindCaseSensitive",ToggleWholeWordCommand:"toggleFindWholeWord",ToggleRegexCommand:"toggleFindRegex",ToggleSearchScopeCommand:"toggleFindInSelection",TogglePreserveCaseCommand:"togglePreserveCase",ReplaceOneAction:"editor.action.replaceOne",ReplaceAllAction:"editor.action.replaceAll",SelectAllMatchesAction:"editor.action.selectAllMatches"},e.MATCHES_LIMIT=19999;const i=240;class S{constructor(l,r){this._toDispose=new _.DisposableStore,this._editor=l,this._state=r,this._isDisposed=!1,this._startSearchingTimer=new f.TimeoutTimer,this._decorations=new v.FindDecorations(l),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new f.RunOnceScheduler(()=>this.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(p=>{(p.reason===3||p.reason===5||p.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(p=>{this._ignoreModelContentChanged||(p.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(p=>this._onStateChanged(p))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,(0,_.dispose)(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(l){this._isDisposed||!this._editor.hasModel()||(l.searchString||l.isReplaceRevealed||l.isRegex||l.wholeWord||l.matchCase||l.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{l.searchScope?this.research(l.moveCursor,this._state.searchScope):this.research(l.moveCursor)},i)):l.searchScope?this.research(l.moveCursor,this._state.searchScope):this.research(l.moveCursor))}static _getSearchRange(l,r){return r||l.getFullModelRange()}research(l,r){let p=null;typeof r!="undefined"?r!==null&&(Array.isArray(r)?p=r:p=[r]):p=this._decorations.getFindScopes(),p!==null&&(p=p.map(h=>{if(h.startLineNumber!==h.endLineNumber){let g=h.endLineNumber;return h.endColumn===1&&(g=g-1),new D.Range(h.startLineNumber,1,g,this._editor.getModel().getLineMaxColumn(g))}return h}));let u=this._findMatches(p,!1,e.MATCHES_LIMIT);this._decorations.set(u,p);const a=this._editor.getSelection();let n=this._decorations.getCurrentMatchesPosition(a);if(n===0&&u.length>0){const h=(0,t.findFirstInSorted)(u.map(g=>g.range),g=>D.Range.compareRangesUsingStarts(g,a)>=0);n=h>0?h-1+1:n}this._state.changeMatchInfo(n,this._decorations.getCount(),void 0),l&&this._editor.getOption(35).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){let l=this._decorations.getFindScope();return l&&this._editor.revealRangeInCenterIfOutsideViewport(l,0),!0}return!1}_setCurrentFindMatch(l){let r=this._decorations.setCurrentFindMatch(l);this._state.changeMatchInfo(r,this._decorations.getCount(),l),this._editor.setSelection(l),this._editor.revealRangeInCenterIfOutsideViewport(l,0)}_prevSearchPosition(l){let r=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:p,column:u}=l,a=this._editor.getModel();return r||u===1?(p===1?p=a.getLineCount():p--,u=a.getLineMaxColumn(p)):u--,new k.Position(p,u)}_moveToPrevMatch(l,r=!1){if(!this._state.canNavigateBack()){const m=this._decorations.matchAfterPosition(l);m&&this._setCurrentFindMatch(m);return}if(this._decorations.getCount()<e.MATCHES_LIMIT){let m=this._decorations.matchBeforePosition(l);m&&m.isEmpty()&&m.getStartPosition().equals(l)&&(l=this._prevSearchPosition(l),m=this._decorations.matchBeforePosition(l)),m&&this._setCurrentFindMatch(m);return}if(this._cannotFind())return;let p=this._decorations.getFindScope(),u=S._getSearchRange(this._editor.getModel(),p);u.getEndPosition().isBefore(l)&&(l=u.getEndPosition()),l.isBefore(u.getStartPosition())&&(l=u.getEndPosition());let{lineNumber:a,column:n}=l,h=this._editor.getModel(),g=new k.Position(a,n),d=h.findPreviousMatch(this._state.searchString,g,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(117):null,!1);if(d&&d.range.isEmpty()&&d.range.getStartPosition().equals(g)&&(g=this._prevSearchPosition(g),d=h.findPreviousMatch(this._state.searchString,g,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(117):null,!1)),!!d){if(!r&&!u.containsRange(d.range))return this._moveToPrevMatch(d.range.getStartPosition(),!0);this._setCurrentFindMatch(d.range)}}moveToPrevMatch(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())}_nextSearchPosition(l){let r=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:p,column:u}=l,a=this._editor.getModel();return r||u===a.getLineMaxColumn(p)?(p===a.getLineCount()?p=1:p++,u=1):u++,new k.Position(p,u)}_moveToNextMatch(l){if(!this._state.canNavigateForward()){const p=this._decorations.matchBeforePosition(l);p&&this._setCurrentFindMatch(p);return}if(this._decorations.getCount()<e.MATCHES_LIMIT){let p=this._decorations.matchAfterPosition(l);p&&p.isEmpty()&&p.getStartPosition().equals(l)&&(l=this._nextSearchPosition(l),p=this._decorations.matchAfterPosition(l)),p&&this._setCurrentFindMatch(p);return}let r=this._getNextMatch(l,!1,!0);r&&this._setCurrentFindMatch(r.range)}_getNextMatch(l,r,p,u=!1){if(this._cannotFind())return null;let a=this._decorations.getFindScope(),n=S._getSearchRange(this._editor.getModel(),a);n.getEndPosition().isBefore(l)&&(l=n.getStartPosition()),l.isBefore(n.getStartPosition())&&(l=n.getStartPosition());let{lineNumber:h,column:g}=l,d=this._editor.getModel(),m=new k.Position(h,g),b=d.findNextMatch(this._state.searchString,m,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(117):null,r);return p&&b&&b.range.isEmpty()&&b.range.getStartPosition().equals(m)&&(m=this._nextSearchPosition(m),b=d.findNextMatch(this._state.searchString,m,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(117):null,r)),b?!u&&!n.containsRange(b.range)?this._getNextMatch(b.range.getEndPosition(),r,p,!0):b:null}moveToNextMatch(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())}_getReplacePattern(){return this._state.isRegex?(0,o.parseReplaceString)(this._state.replaceString):o.ReplacePattern.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;let l=this._getReplacePattern(),r=this._editor.getSelection(),p=this._getNextMatch(r.getStartPosition(),!0,!1);if(p)if(r.equalsRange(p.range)){let u=l.buildReplaceString(p.matches,this._state.preserveCase),a=new A.ReplaceCommand(r,u);this._executeEditorCommand("replace",a),this._decorations.setStartPosition(new k.Position(r.startLineNumber,r.startColumn+u.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(p.range)}_findMatches(l,r,p){const u=(l||[null]).map(a=>S._getSearchRange(this._editor.getModel(),a));return this._editor.getModel().findMatches(this._state.searchString,u,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(117):null,r,p)}replaceAll(){if(!this._hasMatches())return;const l=this._decorations.getFindScopes();l===null&&this._state.matchesCount>=e.MATCHES_LIMIT?this._largeReplaceAll():this._regularReplaceAll(l),this.research(!1)}_largeReplaceAll(){const r=new w.SearchParams(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(117):null).parseSearchRequest();if(!r)return;let p=r.regex;if(!p.multiline){let b="mu";p.ignoreCase&&(b+="i"),p.global&&(b+="g"),p=new RegExp(p.source,b)}const u=this._editor.getModel(),a=u.getValue(1),n=u.getFullModelRange(),h=this._getReplacePattern();let g;const d=this._state.preserveCase;h.hasReplacementPatterns||d?g=a.replace(p,function(){return h.buildReplaceString(arguments,d)}):g=a.replace(p,h.buildReplaceString(null,d));let m=new A.ReplaceCommandThatPreservesSelection(n,g,this._editor.getSelection());this._executeEditorCommand("replaceAll",m)}_regularReplaceAll(l){const r=this._getReplacePattern();let p=this._findMatches(l,r.hasReplacementPatterns||this._state.preserveCase,1073741824),u=[];for(let n=0,h=p.length;n<h;n++)u[n]=r.buildReplaceString(p[n].matches,this._state.preserveCase);let a=new C.ReplaceAllCommand(this._editor.getSelection(),p.map(n=>n.range),u);this._executeEditorCommand("replaceAll",a)}selectAllMatches(){if(!this._hasMatches())return;let l=this._decorations.getFindScopes(),p=this._findMatches(l,!1,1073741824).map(a=>new I.Selection(a.range.startLineNumber,a.range.startColumn,a.range.endLineNumber,a.range.endColumn)),u=this._editor.getSelection();for(let a=0,n=p.length;a<n;a++)if(p[a].equalsRange(u)){p=[u].concat(p.slice(0,a)).concat(p.slice(a+1));break}this._editor.setSelections(p)}_executeEditorCommand(l,r){try{this._ignoreModelContentChanged=!0,this._editor.pushUndoStop(),this._editor.executeCommand(l,r),this._editor.pushUndoStop()}finally{this._ignoreModelContentChanged=!1}}}e.FindModelBoundToEditorModel=S}),define(ne[2069],re([1,0,10,718,138,11,288,32,12]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindOptionsWidget=void 0;class w extends _.Widget{constructor(C,o,c,i){super();this._hideSoon=this._register(new A.RunOnceScheduler(()=>this._hide(),2e3)),this._isVisible=!1,this._editor=C,this._state=o,this._keybindingService=c,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const S=i.getColorTheme().getColor(D.inputActiveOptionBorder),s=i.getColorTheme().getColor(D.inputActiveOptionForeground),l=i.getColorTheme().getColor(D.inputActiveOptionBackground);this.caseSensitive=this._register(new f.CaseSensitiveToggle({appendTitle:this._keybindingLabelFor(k.FIND_IDS.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase,inputActiveOptionBorder:S,inputActiveOptionForeground:s,inputActiveOptionBackground:l})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new f.WholeWordsToggle({appendTitle:this._keybindingLabelFor(k.FIND_IDS.ToggleWholeWordCommand),isChecked:this._state.wholeWord,inputActiveOptionBorder:S,inputActiveOptionForeground:s,inputActiveOptionBackground:l})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new f.RegexToggle({appendTitle:this._keybindingLabelFor(k.FIND_IDS.ToggleRegexCommand),isChecked:this._state.isRegex,inputActiveOptionBorder:S,inputActiveOptionForeground:s,inputActiveOptionBackground:l})),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange(()=>{this._state.change({isRegex:this.regex.checked},!1)})),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange(r=>{let p=!1;r.isRegex&&(this.regex.checked=this._state.isRegex,p=!0),r.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,p=!0),r.matchCase&&(this.caseSensitive.checked=this._state.matchCase,p=!0),!this._state.isRevealed&&p&&this._revealTemporarily()})),this._register(t.addDisposableNonBubblingMouseOutListener(this._domNode,r=>this._onMouseOut())),this._register(t.addDisposableListener(this._domNode,"mouseover",r=>this._onMouseOver())),this._applyTheme(i.getColorTheme()),this._register(i.onDidColorThemeChange(this._applyTheme.bind(this)))}_keybindingLabelFor(C){let o=this._keybindingService.lookupKeybinding(C);return o?` (${o.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return w.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseOut(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){!this._isVisible||(this._isVisible=!1,this._domNode.style.display="none")}_applyTheme(C){let o={inputActiveOptionBorder:C.getColor(D.inputActiveOptionBorder),inputActiveOptionForeground:C.getColor(D.inputActiveOptionForeground),inputActiveOptionBackground:C.getColor(D.inputActiveOptionBackground)};this.caseSensitive.style(o),this.wholeWords.style(o),this.regex.style(o)}}e.FindOptionsWidget=w,w.ID="editor.contrib.findOptionsWidget",(0,I.registerThemingParticipant)((v,C)=>{const o=v.getColor(D.editorWidgetBackground);o&&C.addRule(`.monaco-editor .findOptionsWidget { background-color: ${o}; }`);const c=v.getColor(D.editorWidgetForeground);c&&C.addRule(`.monaco-editor .findOptionsWidget { color: ${c}; }`);const i=v.getColor(D.widgetShadow);i&&C.addRule(`.monaco-editor .findOptionsWidget { box-shadow: 0 0 8px 2px ${i}; }`);const S=v.getColor(D.contrastBorder);S&&C.addRule(`.monaco-editor .findOptionsWidget { border: 2px solid ${S}; }`)})}),define(ne[315],re([1,0,6,2,20,288]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindReplaceState=e.FindOptionOverride=void 0;var k;(function(w){w[w.NotSet=0]="NotSet",w[w.True=1]="True",w[w.False=2]="False"})(k=e.FindOptionOverride||(e.FindOptionOverride={}));function D(w,v){return w===1?!0:w===2?!1:v}class I extends f.Disposable{constructor(){super();this._onFindReplaceStateChange=this._register(new t.Emitter),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return D(this._isRegexOverride,this._isRegex)}get wholeWord(){return D(this._wholeWordOverride,this._wholeWord)}get matchCase(){return D(this._matchCaseOverride,this._matchCase)}get preserveCase(){return D(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}get isSearching(){return this._isSearching}get filters(){return this._filters}changeMatchInfo(v,C,o){let c={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1},i=!1;C===0&&(v=0),v>C&&(v=C),this._matchesPosition!==v&&(this._matchesPosition=v,c.matchesPosition=!0,i=!0),this._matchesCount!==C&&(this._matchesCount=C,c.matchesCount=!0,i=!0),typeof o!="undefined"&&(_.Range.equalsRange(this._currentMatch,o)||(this._currentMatch=o,c.currentMatch=!0,i=!0)),i&&this._onFindReplaceStateChange.fire(c)}change(v,C,o=!0){let c={moveCursor:C,updateHistory:o,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1},i=!1;const S=this.isRegex,s=this.wholeWord,l=this.matchCase,r=this.preserveCase;typeof v.searchString!="undefined"&&this._searchString!==v.searchString&&(this._searchString=v.searchString,c.searchString=!0,i=!0),typeof v.replaceString!="undefined"&&this._replaceString!==v.replaceString&&(this._replaceString=v.replaceString,c.replaceString=!0,i=!0),typeof v.isRevealed!="undefined"&&this._isRevealed!==v.isRevealed&&(this._isRevealed=v.isRevealed,c.isRevealed=!0,i=!0),typeof v.isReplaceRevealed!="undefined"&&this._isReplaceRevealed!==v.isReplaceRevealed&&(this._isReplaceRevealed=v.isReplaceRevealed,c.isReplaceRevealed=!0,i=!0),typeof v.isRegex!="undefined"&&(this._isRegex=v.isRegex),typeof v.wholeWord!="undefined"&&(this._wholeWord=v.wholeWord),typeof v.matchCase!="undefined"&&(this._matchCase=v.matchCase),typeof v.preserveCase!="undefined"&&(this._preserveCase=v.preserveCase),typeof v.searchScope!="undefined"&&(v.searchScope?.every(p=>this._searchScope?.some(u=>!_.Range.equalsRange(u,p)))||(this._searchScope=v.searchScope,c.searchScope=!0,i=!0)),typeof v.loop!="undefined"&&this._loop!==v.loop&&(this._loop=v.loop,c.loop=!0,i=!0),typeof v.isSearching!="undefined"&&this._isSearching!==v.isSearching&&(this._isSearching=v.isSearching,c.isSearching=!0,i=!0),typeof v.filters!="undefined"&&(this._filters?this._filters.update(v.filters):this._filters=v.filters,c.filters=!0,i=!0),this._isRegexOverride=typeof v.isRegexOverride!="undefined"?v.isRegexOverride:0,this._wholeWordOverride=typeof v.wholeWordOverride!="undefined"?v.wholeWordOverride:0,this._matchCaseOverride=typeof v.matchCaseOverride!="undefined"?v.matchCaseOverride:0,this._preserveCaseOverride=typeof v.preserveCaseOverride!="undefined"?v.preserveCaseOverride:0,S!==this.isRegex&&(i=!0,c.isRegex=!0),s!==this.wholeWord&&(i=!0,c.wholeWord=!0),l!==this.matchCase&&(i=!0,c.matchCase=!0),r!==this.preserveCase&&(i=!0,c.preserveCase=!0),i&&this._onFindReplaceStateChange.fire(c)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition<this.matchesCount}canNavigateInLoop(){return this._loop||this.matchesCount>=A.MATCHES_LIMIT}}e.FindReplaceState=I}),define(ne[476],re([1,0,10,112,244,281,138,11,33,22,2,14,29,20,288,1266,236,348,32,63,12,127,1028]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleButton=e.FindWidget=e.FindWidgetViewZone=e.NLS_NO_RESULTS=e.NLS_MATCHES_LOCATION=e.findNextMatchIcon=e.findPreviousMatchIcon=e.findReplaceAllIcon=e.findReplaceIcon=void 0;const n=(0,p.registerIcon)("find-selection",I.Codicon.selection,S.localize(0,null)),h=(0,p.registerIcon)("find-collapsed",I.Codicon.chevronRight,S.localize(1,null)),g=(0,p.registerIcon)("find-expanded",I.Codicon.chevronDown,S.localize(2,null));e.findReplaceIcon=(0,p.registerIcon)("find-replace",I.Codicon.replace,S.localize(3,null)),e.findReplaceAllIcon=(0,p.registerIcon)("find-replace-all",I.Codicon.replaceAll,S.localize(4,null)),e.findPreviousMatchIcon=(0,p.registerIcon)("find-previous-match",I.Codicon.arrowUp,S.localize(5,null)),e.findNextMatchIcon=(0,p.registerIcon)("find-next-match",I.Codicon.arrowDown,S.localize(6,null));const d=S.localize(7,null),m=S.localize(8,null),b=S.localize(9,null),E=S.localize(10,null),y=S.localize(11,null),T=S.localize(12,null),R=S.localize(13,null),O=S.localize(14,null),x=S.localize(15,null),F=S.localize(16,null),L=S.localize(17,null),M=S.localize(18,null,i.MATCHES_LIMIT);e.NLS_MATCHES_LOCATION=S.localize(19,null),e.NLS_NO_RESULTS=S.localize(20,null);const N=419,P=275-54;let V=69;const z=33,U="ctrlEnterReplaceAll.windows.donotask",H=C.isMacintosh?256:2048;class K{constructor(Y){this.afterLineNumber=Y,this.heightInPx=z,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}e.FindWidgetViewZone=K;function G(X,Y,$){const J=!!Y.match(/\n/);if($&&J&&$.selectionStart>0){X.stopPropagation();return}}function q(X,Y,$){const J=!!Y.match(/\n/);if($&&J&&$.selectionEnd<$.value.length){X.stopPropagation();return}}class Z extends k.Widget{constructor(Y,$,J,ee,te,se,ie,ce,le){super();this._cachedHeight=null,this._revealTimeouts=[],this._codeEditor=Y,this._controller=$,this._state=J,this._contextViewProvider=ee,this._keybindingService=te,this._contextKeyService=se,this._storageService=ce,this._notificationService=le,this._ctrlEnterReplaceAllWarningPrompted=!!ce.getBoolean(U,0),this._isVisible=!1,this._isReplaceVisible=!1,this._ignoreChangeEvent=!1,this._updateHistoryDelayer=new D.Delayer(500),this._register((0,v.toDisposable)(()=>this._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(ae=>this._onStateChanged(ae))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(ae=>{if(ae.hasChanged(81)&&(this._codeEditor.getOption(81)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),ae.hasChanged(131)&&this._tryUpdateWidgetWidth(),ae.hasChanged(2)&&this.updateAccessibilitySupport(),ae.hasChanged(35)){const ue=this._codeEditor.getOption(35).addExtraSpaceOnTop;ue&&!this._viewZone&&(this._viewZone=new K(0),this._showViewZone()),!ue&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(async()=>{if(this._isVisible){let ae=await this._controller.getGlobalBufferTerm();ae&&ae!==this._state.searchString&&(this._state.change({searchString:ae},!1),this._findInput.select())}})),this._findInputFocused=i.CONTEXT_FIND_INPUT_FOCUSED.bindTo(se),this._findFocusTracker=this._register(t.trackFocus(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus(()=>{this._findInputFocused.set(!0),this._updateSearchScope()})),this._register(this._findFocusTracker.onDidBlur(()=>{this._findInputFocused.set(!1)})),this._replaceInputFocused=i.CONTEXT_REPLACE_INPUT_FOCUSED.bindTo(se),this._replaceFocusTracker=this._register(t.trackFocus(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus(()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()})),this._register(this._replaceFocusTracker.onDidBlur(()=>{this._replaceInputFocused.set(!1)})),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(35).addExtraSpaceOnTop&&(this._viewZone=new K(0)),this._applyTheme(ie.getColorTheme()),this._register(ie.onDidColorThemeChange(this._applyTheme.bind(this))),this._register(this._codeEditor.onDidChangeModel(()=>{!this._isVisible||(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(ae=>{if(ae.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return Z.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(Y){if(Y.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(Y.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),Y.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),Y.isReplaceRevealed&&(this._state.isReplaceRevealed?!this._codeEditor.getOption(81)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=t.getTotalWidth(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(Y.isRevealed||Y.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),Y.isRegex&&this._findInput.setRegex(this._state.isRegex),Y.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),Y.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),Y.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),Y.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),Y.searchString||Y.matchesCount||Y.matchesPosition){let $=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",$),this._updateMatchesCount(),this._updateButtons()}(Y.searchString||Y.currentMatch)&&this._layoutViewZone(),Y.updateHistory&&this._delayedUpdateHistory(),Y.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,w.onUnexpectedError)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=V+"px",this._state.matchesCount>=i.MATCHES_LIMIT?this._matchesCount.title=M:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let Y;if(this._state.matchesCount>0){let $=String(this._state.matchesCount);this._state.matchesCount>=i.MATCHES_LIMIT&&($+="+");let J=String(this._state.matchesPosition);J==="0"&&(J="?"),Y=o.format(e.NLS_MATCHES_LOCATION,J,$)}else Y=e.NLS_NO_RESULTS;this._matchesCount.appendChild(document.createTextNode(Y)),(0,f.alert)(this._getAriaLabel(Y,this._state.currentMatch,this._state.searchString)),V=Math.max(V,this._matchesCount.clientWidth)}_getAriaLabel(Y,$,J){if(Y===e.NLS_NO_RESULTS)return J===""?S.localize(21,null,Y):S.localize(22,null,Y,J);if($){const ee=S.localize(23,null,Y,J,$.startLineNumber+":"+$.startColumn),te=this._codeEditor.getModel();return te&&$.startLineNumber<=te.getLineCount()&&$.startLineNumber>=1?`${te.getLineContent($.startLineNumber)}, ${ee}`:ee}return S.localize(24,null,Y,J)}_updateToggleSelectionFindButton(){let Y=this._codeEditor.getSelection(),$=Y?Y.startLineNumber!==Y.endLineNumber||Y.startColumn!==Y.endColumn:!1,J=this._toggleSelectionFind.checked;this._isVisible&&(J||$)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);let Y=this._state.searchString.length>0,$=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&Y&&$&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&Y&&$&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&Y),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&Y),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);let J=!this._codeEditor.getOption(81);this._toggleReplaceBtn.setEnabled(this._isVisible&&J)}_reveal(){if(this._revealTimeouts.forEach(Y=>{clearTimeout(Y)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const Y=this._codeEditor.getSelection();switch(this._codeEditor.getOption(35).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{const J=!!Y&&Y.startLineNumber!==Y.endLineNumber;this._toggleSelectionFind.checked=J;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._findInput.validate()},200)),this._codeEditor.layoutOverlayWidget(this);let $=!0;if(this._codeEditor.getOption(35).seedSearchStringFromSelection&&Y){const J=this._codeEditor.getDomNode();if(J){const ee=t.getDomNodePagePosition(J),te=this._codeEditor.getScrolledVisiblePosition(Y.getStartPosition()),se=ee.left+(te?te.left:0),ie=te?te.top:0;if(this._viewZone&&ie<this._viewZone.heightInPx){Y.endLineNumber>Y.startLineNumber&&($=!1);const ce=t.getTopLeftOffset(this._domNode).left;se>ce&&($=!1);const le=this._codeEditor.getScrolledVisiblePosition(Y.getEndPosition());ee.left+(le?le.left:0)>ce&&($=!1)}}}this._showViewZone($)}}_hide(Y){this._revealTimeouts.forEach($=>{clearTimeout($)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),Y&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(Y){if(!this._codeEditor.getOption(35).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;const J=this._viewZone;this._viewZoneId!==void 0||!J||this._codeEditor.changeViewZones(ee=>{J.heightInPx=this._getHeight(),this._viewZoneId=ee.addZone(J),this._codeEditor.setScrollTop(Y||this._codeEditor.getScrollTop()+J.heightInPx)})}_showViewZone(Y=!0){if(!this._isVisible||!this._codeEditor.getOption(35).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new K(0));const J=this._viewZone;this._codeEditor.changeViewZones(ee=>{if(this._viewZoneId!==void 0){const te=this._getHeight();if(te===J.heightInPx)return;let se=te-J.heightInPx;J.heightInPx=te,ee.layoutZone(this._viewZoneId),Y&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+se);return}else{let te=this._getHeight();if(te-=this._codeEditor.getOption(75).top,te<=0)return;J.heightInPx=te,this._viewZoneId=ee.addZone(J),Y&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+te)}})}_removeViewZone(){this._codeEditor.changeViewZones(Y=>{this._viewZoneId!==void 0&&(Y.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_applyTheme(Y){let $={inputActiveOptionBorder:Y.getColor(r.inputActiveOptionBorder),inputActiveOptionBackground:Y.getColor(r.inputActiveOptionBackground),inputActiveOptionForeground:Y.getColor(r.inputActiveOptionForeground),inputBackground:Y.getColor(r.inputBackground),inputForeground:Y.getColor(r.inputForeground),inputBorder:Y.getColor(r.inputBorder),inputValidationInfoBackground:Y.getColor(r.inputValidationInfoBackground),inputValidationInfoForeground:Y.getColor(r.inputValidationInfoForeground),inputValidationInfoBorder:Y.getColor(r.inputValidationInfoBorder),inputValidationWarningBackground:Y.getColor(r.inputValidationWarningBackground),inputValidationWarningForeground:Y.getColor(r.inputValidationWarningForeground),inputValidationWarningBorder:Y.getColor(r.inputValidationWarningBorder),inputValidationErrorBackground:Y.getColor(r.inputValidationErrorBackground),inputValidationErrorForeground:Y.getColor(r.inputValidationErrorForeground),inputValidationErrorBorder:Y.getColor(r.inputValidationErrorBorder)};this._findInput.style($),this._replaceInput.style($),this._toggleSelectionFind.style($)}_tryUpdateWidgetWidth(){if(!this._isVisible||!t.isInDOM(this._domNode))return;const Y=this._codeEditor.getLayoutInfo();if(Y.contentWidth<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const J=Y.width,ee=Y.minimap.minimapWidth;let te=!1,se=!1,ie=!1;if(this._resized&&t.getTotalWidth(this._domNode)>N){this._domNode.style.maxWidth=`${J-28-ee-15}px`,this._replaceInput.width=t.getTotalWidth(this._findInput.domNode);return}if(N+28+ee>=J&&(se=!0),N+28+ee-V>=J&&(ie=!0),N+28+ee-V>=J+50&&(te=!0),this._domNode.classList.toggle("collapsed-find-widget",te),this._domNode.classList.toggle("narrow-find-widget",ie),this._domNode.classList.toggle("reduced-find-widget",se),!ie&&!te&&(this._domNode.style.maxWidth=`${J-28-ee-15}px`),this._resized){this._findInput.inputBox.layout();let ce=this._findInput.inputBox.element.clientWidth;ce>0&&(this._replaceInput.width=ce)}else this._isReplaceVisible&&(this._replaceInput.width=t.getTotalWidth(this._findInput.domNode))}_getHeight(){let Y=0;return Y+=4,Y+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(Y+=4,Y+=this._replaceInput.inputBox.height+2),Y+=4,Y}_tryUpdateHeight(){const Y=this._getHeight();return this._cachedHeight!==null&&this._cachedHeight===Y?!1:(this._cachedHeight=Y,this._domNode.style.height=`${Y}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(!!this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){let Y=this._codeEditor.getSelections();Y.map($=>{$.endColumn===1&&$.endLineNumber>$.startLineNumber&&($=$.setEndPosition($.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn($.endLineNumber-1)));const J=this._state.currentMatch;return $.startLineNumber!==$.endLineNumber&&!c.Range.equalsRange($,J)?$:null}).filter($=>!!$),Y.length&&this._state.change({searchScope:Y},!0)}}_onFindInputMouseDown(Y){Y.middleButton&&Y.stopPropagation()}_onFindInputKeyDown(Y){if(Y.equals(H|3))if(this._keybindingService.dispatchEvent(Y,Y.target)){Y.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(` `),Y.preventDefault();return}if(Y.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),Y.preventDefault();return}if(Y.equals(2048|18)){this._codeEditor.focus(),Y.preventDefault();return}if(Y.equals(16))return G(Y,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(Y.equals(18))return q(Y,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(Y){if(Y.equals(H|3))if(this._keybindingService.dispatchEvent(Y,Y.target)){Y.preventDefault();return}else{C.isWindows&&C.isNative&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(S.localize(25,null)),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(U,!0,0,0)),this._replaceInput.inputBox.insertAtCursor(` `),Y.preventDefault();return}if(Y.equals(2)){this._findInput.focusOnCaseSensitive(),Y.preventDefault();return}if(Y.equals(1024|2)){this._findInput.focus(),Y.preventDefault();return}if(Y.equals(2048|18)){this._codeEditor.focus(),Y.preventDefault();return}if(Y.equals(16))return G(Y,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(Y.equals(18))return q(Y,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(Y){return 0}_keybindingLabelFor(Y){let $=this._keybindingService.lookupKeybinding(Y);return $?` (${$.getLabel()})`:""}_buildDomNode(){const Y=!0,$=!0;this._findInput=this._register(new s.ContextScopedFindInput(null,this._contextViewProvider,{width:P,label:d,placeholder:m,appendCaseSensitiveLabel:this._keybindingLabelFor(i.FIND_IDS.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(i.FIND_IDS.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(i.FIND_IDS.ToggleRegexCommand),validation:ce=>{if(ce.length===0||!this._findInput.getRegex())return null;try{return new RegExp(ce,"gu"),null}catch(le){return{content:le.message}}},flexibleHeight:Y,flexibleWidth:$,flexibleMaxHeight:118,showHistoryHint:()=>(0,l.showHistoryKeybindingHint)(this._keybindingService)},this._contextKeyService,!0)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(ce=>this._onFindInputKeyDown(ce))),this._register(this._findInput.inputBox.onDidChange(()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(ce=>{ce.equals(1024|2)&&this._isReplaceVisible&&(this._replaceInput.focus(),ce.preventDefault())})),this._register(this._findInput.onRegexKeyDown(ce=>{ce.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),ce.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(ce=>{this._tryUpdateHeight()&&this._showViewZone()})),C.isLinux&&this._register(this._findInput.onMouseDown(ce=>this._onFindInputMouseDown(ce))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new j({label:b+this._keybindingLabelFor(i.FIND_IDS.PreviousMatchFindAction),icon:e.findPreviousMatchIcon,onTrigger:()=>{this._codeEditor.getAction(i.FIND_IDS.PreviousMatchFindAction).run().then(void 0,w.onUnexpectedError)}})),this._nextBtn=this._register(new j({label:E+this._keybindingLabelFor(i.FIND_IDS.NextMatchFindAction),icon:e.findNextMatchIcon,onTrigger:()=>{this._codeEditor.getAction(i.FIND_IDS.NextMatchFindAction).run().then(void 0,w.onUnexpectedError)}}));let J=document.createElement("div");J.className="find-part",J.appendChild(this._findInput.domNode);const ee=document.createElement("div");ee.className="find-actions",J.appendChild(ee),ee.appendChild(this._matchesCount),ee.appendChild(this._prevBtn.domNode),ee.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new _.Toggle({icon:n,title:y+this._keybindingLabelFor(i.FIND_IDS.ToggleSearchScopeCommand),isChecked:!1})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let ce=this._codeEditor.getSelections();ce.map(le=>(le.endColumn===1&&le.endLineNumber>le.startLineNumber&&(le=le.setEndPosition(le.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(le.endLineNumber-1))),le.isEmpty()?null:le)).filter(le=>!!le),ce.length&&this._state.change({searchScope:ce},!0)}}else this._state.change({searchScope:null},!0)})),ee.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new j({label:T+this._keybindingLabelFor(i.FIND_IDS.CloseFindWidgetCommand),icon:p.widgetClose,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:ce=>{ce.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),ce.preventDefault())}})),ee.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new s.ContextScopedReplaceInput(null,void 0,{label:R,placeholder:O,appendPreserveCaseLabel:this._keybindingLabelFor(i.FIND_IDS.TogglePreserveCaseCommand),history:[],flexibleHeight:Y,flexibleWidth:$,flexibleMaxHeight:118,showHistoryHint:()=>(0,l.showHistoryKeybindingHint)(this._keybindingService)},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(ce=>this._onReplaceInputKeyDown(ce))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(ce=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(ce=>{ce.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),ce.preventDefault())})),this._replaceBtn=this._register(new j({label:x+this._keybindingLabelFor(i.FIND_IDS.ReplaceOneAction),icon:e.findReplaceIcon,onTrigger:()=>{this._controller.replace()},onKeyDown:ce=>{ce.equals(1024|2)&&(this._closeBtn.focus(),ce.preventDefault())}})),this._replaceAllBtn=this._register(new j({label:F+this._keybindingLabelFor(i.FIND_IDS.ReplaceAllAction),icon:e.findReplaceAllIcon,onTrigger:()=>{this._controller.replaceAll()}}));let te=document.createElement("div");te.className="replace-part",te.appendChild(this._replaceInput.domNode);const se=document.createElement("div");se.className="replace-actions",te.appendChild(se),se.appendChild(this._replaceBtn.domNode),se.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new j({label:L,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=t.getTotalWidth(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}})),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.style.width=`${N}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(J),this._domNode.appendChild(te),this._resizeSash=new A.Sash(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let ie=N;this._register(this._resizeSash.onDidStart(()=>{ie=t.getTotalWidth(this._domNode)})),this._register(this._resizeSash.onDidChange(ce=>{this._resized=!0;let le=ie+ce.startX-ce.currentX;if(le<N)return;const ae=parseFloat(t.getComputedStyle(this._domNode).maxWidth)||0;le>ae||(this._domNode.style.width=`${le}px`,this._isReplaceVisible&&(this._replaceInput.width=t.getTotalWidth(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{const ce=t.getTotalWidth(this._domNode);if(ce<N)return;let le=N;if(!this._resized||ce===N){const ae=this._codeEditor.getLayoutInfo();le=ae.width-28-ae.minimap.minimapWidth-15,this._resized=!0}this._domNode.style.width=`${le}px`,this._isReplaceVisible&&(this._replaceInput.width=t.getTotalWidth(this._findInput.domNode)),this._findInput.inputBox.layout()}))}updateAccessibilitySupport(){const Y=this._codeEditor.getOption(2);this._findInput.setFocusInputOnOptionClick(Y!==2)}getViewState(){let Y=!1;return this._viewZone&&this._viewZoneId&&(Y=this._viewZone.heightInPx>this._codeEditor.getScrollTop()),{widgetViewZoneVisible:Y,scrollTop:this._codeEditor.getScrollTop()}}setViewState(Y){!Y||Y.widgetViewZoneVisible&&this._layoutViewZone(Y.scrollTop)}}e.FindWidget=Z,Z.ID="editor.contrib.findWidget";class j extends k.Widget{constructor(Y){super();this._opts=Y;let $="button";this._opts.className&&($=$+" "+this._opts.className),this._opts.icon&&($=$+" "+u.ThemeIcon.asClassName(this._opts.icon)),this._domNode=document.createElement("div"),this._domNode.title=this._opts.label,this._domNode.tabIndex=0,this._domNode.className=$,this._domNode.setAttribute("role","button"),this._domNode.setAttribute("aria-label",this._opts.label),this.onclick(this._domNode,J=>{this._opts.onTrigger(),J.preventDefault()}),this.onkeydown(this._domNode,J=>{if(J.equals(10)||J.equals(3)){this._opts.onTrigger(),J.preventDefault();return}this._opts.onKeyDown&&this._opts.onKeyDown(J)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(Y){this._domNode.classList.toggle("disabled",!Y),this._domNode.setAttribute("aria-disabled",String(!Y)),this._domNode.tabIndex=Y?0:-1}setExpanded(Y){this._domNode.setAttribute("aria-expanded",String(!!Y)),Y?(this._domNode.classList.remove(...u.ThemeIcon.asClassNameArray(h)),this._domNode.classList.add(...u.ThemeIcon.asClassNameArray(g))):(this._domNode.classList.remove(...u.ThemeIcon.asClassNameArray(g)),this._domNode.classList.add(...u.ThemeIcon.asClassNameArray(h)))}}e.SimpleButton=j,(0,u.registerThemingParticipant)((X,Y)=>{const $=(pe,me)=>{me&&Y.addRule(`.monaco-editor ${pe} { background-color: ${me}; }`)};$(".findMatch",X.getColor(r.editorFindMatchHighlight)),$(".currentFindMatch",X.getColor(r.editorFindMatch)),$(".findScope",X.getColor(r.editorFindRangeHighlight));const J=X.getColor(r.editorWidgetBackground);$(".find-widget",J);const ee=X.getColor(r.widgetShadow);ee&&Y.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${ee}; }`);const te=X.getColor(r.editorFindMatchHighlightBorder);te&&Y.addRule(`.monaco-editor .findMatch { border: 1px ${(0,a.isHighContrast)(X.type)?"dotted":"solid"} ${te}; box-sizing: border-box; }`);const se=X.getColor(r.editorFindMatchBorder);se&&Y.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${se}; padding: 1px; box-sizing: border-box; }`);const ie=X.getColor(r.editorFindRangeHighlightBorder);ie&&Y.addRule(`.monaco-editor .findScope { border: 1px ${(0,a.isHighContrast)(X.type)?"dashed":"solid"} ${ie}; }`);const ce=X.getColor(r.contrastBorder);ce&&Y.addRule(`.monaco-editor .find-widget { border: 1px solid ${ce}; }`);const le=X.getColor(r.editorWidgetForeground);le&&Y.addRule(`.monaco-editor .find-widget { color: ${le}; }`);const ae=X.getColor(r.errorForeground);ae&&Y.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${ae}; }`);const ue=X.getColor(r.editorWidgetResizeBorder);if(ue)Y.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${ue}; }`);else{const pe=X.getColor(r.editorWidgetBorder);pe&&Y.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${pe}; }`)}const oe=X.getColor(r.toolbarHoverBackground);oe&&Y.addRule(` .monaco-editor .find-widget .button:not(.disabled):hover, .monaco-editor .find-widget .codicon-find-selection:hover { background-color: ${oe} !important; } `);const fe=X.getColor(r.focusBorder);fe&&Y.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${fe}; }`)})}),define(ne[405],re([1,0,11,2,29,39,58,288,2069,315,476,1265,16,95,7,37,38,26,24,12]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StartFindReplaceAction=e.PreviousSelectionMatchFindAction=e.NextSelectionMatchFindAction=e.SelectionMatchFindAction=e.PreviousMatchFindAction=e.NextMatchFindAction=e.MatchFindAction=e.StartFindWithSelectionAction=e.StartFindWithArgsAction=e.StartFindAction=e.FindController=e.CommonFindController=e.FindStartFocusAction=e.getSelectionSearchString=void 0;const u=524288;function a(L,M="single",N=!1){if(!L.hasModel())return null;const B=L.getSelection();if(M==="single"&&B.startLineNumber===B.endLineNumber||M==="multiple"){if(B.isEmpty()){const P=L.getConfiguredWordAtPosition(B.getStartPosition());if(P&&N===!1)return P.word}else if(L.getModel().getValueLengthInRange(B)<u)return L.getModel().getValueInRange(B)}return null}e.getSelectionSearchString=a;var n;(function(L){L[L.NoFocusChange=0]="NoFocusChange",L[L.FocusFindInput=1]="FocusFindInput",L[L.FocusReplaceInput=2]="FocusReplaceInput"})(n=e.FindStartFocusAction||(e.FindStartFocusAction={}));let h=class eo extends f.Disposable{constructor(M,N,B,P){super();this._editor=M,this._findWidgetVisible=D.CONTEXT_FIND_WIDGET_VISIBLE.bindTo(N),this._contextKeyService=N,this._storageService=B,this._clipboardService=P,this._updateHistoryDelayer=new t.Delayer(500),this._state=this._register(new w.FindReplaceState),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange(V=>this._onStateChanged(V))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{let V=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),V&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(35).loop})}))}get editor(){return this._editor}static get(M){return M.getContribution(eo.ID)}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(M){this.saveQueryState(M),M.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),M.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(M){M.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,0),M.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,0),M.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,0),M.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,0)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!D.CONTEXT_FIND_INPUT_FOCUSED.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){let M=this._editor.getSelections();M.map(N=>(N.endColumn===1&&N.endLineNumber>N.startLineNumber&&(N=N.setEndPosition(N.endLineNumber-1,this._editor.getModel().getLineMaxColumn(N.endLineNumber-1))),N.isEmpty()?null:N)).filter(N=>!!N),M.length&&this._state.change({searchScope:M},!0)}}setSearchString(M){this._state.isRegex&&(M=_.escapeRegExpCharacters(M)),this._state.change({searchString:M},!1)}highlightFindOptions(M=!1){}async _start(M,N){if(this.disposeModel(),!this._editor.hasModel())return;let B={...N,isRevealed:!0};if(M.seedSearchStringFromSelection==="single"){let P=a(this._editor,M.seedSearchStringFromSelection,M.seedSearchStringFromNonEmptySelection);P&&(this._state.isRegex?B.searchString=_.escapeRegExpCharacters(P):B.searchString=P)}else if(M.seedSearchStringFromSelection==="multiple"&&!M.updateSearchScope){let P=a(this._editor,M.seedSearchStringFromSelection);P&&(B.searchString=P)}if(!B.searchString&&M.seedSearchStringFromGlobalClipboard){let P=await this.getGlobalBufferTerm();if(!this._editor.hasModel())return;P&&(B.searchString=P)}if(M.forceRevealReplace||B.isReplaceRevealed?B.isReplaceRevealed=!0:this._findWidgetVisible.get()||(B.isReplaceRevealed=!1),M.updateSearchScope){let P=this._editor.getSelections();P.some(V=>!V.isEmpty())&&(B.searchScope=P)}B.loop=M.loop,this._state.change(B,!1),this._model||(this._model=new D.FindModelBoundToEditorModel(this._editor,this._state))}start(M,N){return this._start(M,N)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}replace(){return this._model?(this._model.replace(),!0):!1}replaceAll(){return this._model?(this._model.replaceAll(),!0):!1}selectAllMatches(){return this._model?(this._model.selectAllMatches(),this._editor.focus(),!0):!1}async getGlobalBufferTerm(){return this._editor.getOption(35).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""}setGlobalBufferTerm(M){this._editor.getOption(35).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(M)}};h.ID="editor.contrib.findController",h=Ee([W(1,i.IContextKeyService),W(2,r.IStorageService),W(3,c.IClipboardService)],h),e.CommonFindController=h;let g=class extends h{constructor(M,N,B,P,V,z,U,H){super(M,B,U,H);this._contextViewService=N,this._keybindingService=P,this._themeService=V,this._notificationService=z,this._widget=null,this._findOptionsWidget=null}async _start(M,N){this._widget||this._createFindWidget();const B=this._editor.getSelection();let P=!1;switch(this._editor.getOption(35).autoFindInSelection){case"always":P=!0;break;case"never":P=!1;break;case"multiline":{P=!!B&&B.startLineNumber!==B.endLineNumber;break}default:break}M.updateSearchScope=M.updateSearchScope||P,await super._start(M,N),this._widget&&(M.shouldFocus===2?this._widget.focusReplaceInput():M.shouldFocus===1&&this._widget.focusFindInput())}highlightFindOptions(M=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!M?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new v.FindWidget(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new I.FindOptionsWidget(this._editor,this._state,this._keybindingService,this._themeService))}saveViewState(){return this._widget?.getViewState()}restoreViewState(M){this._widget?.setViewState(M)}};g=Ee([W(1,S.IContextViewService),W(2,i.IContextKeyService),W(3,s.IKeybindingService),W(4,p.IThemeService),W(5,l.INotificationService),W(6,r.IStorageService),W(7,c.IClipboardService)],g),e.FindController=g,e.StartFindAction=(0,A.registerMultiEditorAction)(new A.MultiEditorAction({id:D.FIND_IDS.StartFindAction,label:C.localize(0,null),alias:"Find",precondition:i.ContextKeyExpr.or(k.EditorContextKeys.focus,i.ContextKeyExpr.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2048|36,weight:100},menuOpts:{menuId:o.MenuId.MenubarEditMenu,group:"3_find",title:C.localize(1,null),order:1}})),e.StartFindAction.addImplementation(0,(L,M,N)=>{const B=h.get(M);return B?B.start({forceRevealReplace:!1,seedSearchStringFromSelection:M.getOption(35).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:M.getOption(35).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:M.getOption(35).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:M.getOption(35).loop}):!1});const d={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"},regex:{type:"boolean"},regexOverride:{type:"number",description:C.localize(2,null)},wholeWord:{type:"boolean"},wholeWordOverride:{type:"number",description:C.localize(3,null)},matchCase:{type:"boolean"},matchCaseOverride:{type:"number",description:C.localize(4,null)},preserveCase:{type:"boolean"},preserveCaseOverride:{type:"number",description:C.localize(5,null)},findInSelection:{type:"boolean"}}}}]};class m extends A.EditorAction{constructor(){super({id:D.FIND_IDS.StartFindWithArgs,label:C.localize(6,null),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},description:d})}async run(M,N,B){const P=h.get(N);if(P){const V=B?{searchString:B.searchString,replaceString:B.replaceString,isReplaceRevealed:B.replaceString!==void 0,isRegex:B.isRegex,wholeWord:B.matchWholeWord,matchCase:B.isCaseSensitive,preserveCase:B.preserveCase}:{};await P.start({forceRevealReplace:!1,seedSearchStringFromSelection:P.getState().searchString.length===0&&N.getOption(35).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:N.getOption(35).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:B?.findInSelection||!1,loop:N.getOption(35).loop},V),P.setGlobalBufferTerm(P.getState().searchString)}}}e.StartFindWithArgsAction=m;class b extends A.EditorAction{constructor(){super({id:D.FIND_IDS.StartFindWithSelection,label:C.localize(7,null),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2048|35},weight:100}})}async run(M,N){const B=h.get(N);B&&(await B.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:N.getOption(35).loop}),B.setGlobalBufferTerm(B.getState().searchString))}}e.StartFindWithSelectionAction=b;class E extends A.EditorAction{async run(M,N){const B=h.get(N);B&&!this._run(B)&&(await B.start({forceRevealReplace:!1,seedSearchStringFromSelection:B.getState().searchString.length===0&&N.getOption(35).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:N.getOption(35).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:N.getOption(35).loop}),this._run(B))}}e.MatchFindAction=E;class y extends E{constructor(){super({id:D.FIND_IDS.NextMatchFindAction,label:C.localize(8,null),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:k.EditorContextKeys.focus,primary:61,mac:{primary:2048|37,secondary:[61]},weight:100},{kbExpr:i.ContextKeyExpr.and(k.EditorContextKeys.focus,D.CONTEXT_FIND_INPUT_FOCUSED),primary:3,weight:100}]})}_run(M){return M.moveToNextMatch()?(M.editor.pushUndoStop(),!0):!1}}e.NextMatchFindAction=y;class T extends E{constructor(){super({id:D.FIND_IDS.PreviousMatchFindAction,label:C.localize(9,null),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:k.EditorContextKeys.focus,primary:1024|61,mac:{primary:2048|1024|37,secondary:[1024|61]},weight:100},{kbExpr:i.ContextKeyExpr.and(k.EditorContextKeys.focus,D.CONTEXT_FIND_INPUT_FOCUSED),primary:1024|3,weight:100}]})}_run(M){return M.moveToPrevMatch()}}e.PreviousMatchFindAction=T;class R extends A.EditorAction{async run(M,N){const B=h.get(N);if(!B)return;const P=N.getOption(35).seedSearchStringFromSelection==="selection";let V=null;N.getOption(35).seedSearchStringFromSelection!=="never"&&(V=a(N,"single",P)),V&&B.setSearchString(V),this._run(B)||(await B.start({forceRevealReplace:!1,seedSearchStringFromSelection:N.getOption(35).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:P,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:N.getOption(35).loop}),this._run(B))}}e.SelectionMatchFindAction=R;class O extends R{constructor(){super({id:D.FIND_IDS.NextSelectionMatchFindAction,label:C.localize(10,null),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:k.EditorContextKeys.focus,primary:2048|61,weight:100}})}_run(M){return M.moveToNextMatch()}}e.NextSelectionMatchFindAction=O;class x extends R{constructor(){super({id:D.FIND_IDS.PreviousSelectionMatchFindAction,label:C.localize(11,null),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:k.EditorContextKeys.focus,primary:2048|1024|61,weight:100}})}_run(M){return M.moveToPrevMatch()}}e.PreviousSelectionMatchFindAction=x,e.StartFindReplaceAction=(0,A.registerMultiEditorAction)(new A.MultiEditorAction({id:D.FIND_IDS.StartFindReplaceAction,label:C.localize(12,null),alias:"Replace",precondition:i.ContextKeyExpr.or(k.EditorContextKeys.focus,i.ContextKeyExpr.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2048|38,mac:{primary:2048|512|36},weight:100},menuOpts:{menuId:o.MenuId.MenubarEditMenu,group:"3_find",title:C.localize(13,null),order:2}})),e.StartFindReplaceAction.addImplementation(0,(L,M,N)=>{if(!M.hasModel()||M.getOption(81))return!1;const B=h.get(M);if(!B)return!1;const P=M.getSelection(),V=B.isFindInputFocused(),z=!P.isEmpty()&&P.startLineNumber===P.endLineNumber&&M.getOption(35).seedSearchStringFromSelection!=="never"&&!V,U=V||z?2:1;return B.start({forceRevealReplace:!0,seedSearchStringFromSelection:z?"single":"none",seedSearchStringFromNonEmptySelection:M.getOption(35).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:M.getOption(35).seedSearchStringFromSelection!=="never",shouldFocus:U,shouldAnimate:!0,updateSearchScope:!1,loop:M.getOption(35).loop})}),(0,A.registerEditorContribution)(h.ID,g),(0,A.registerEditorAction)(m),(0,A.registerEditorAction)(b),(0,A.registerEditorAction)(y),(0,A.registerEditorAction)(T),(0,A.registerEditorAction)(O),(0,A.registerEditorAction)(x);const F=A.EditorCommand.bindToContribution(h.get);(0,A.registerEditorCommand)(new F({id:D.FIND_IDS.CloseFindWidgetCommand,precondition:D.CONTEXT_FIND_WIDGET_VISIBLE,handler:L=>L.closeFindWidget(),kbOpts:{weight:100+5,kbExpr:i.ContextKeyExpr.and(k.EditorContextKeys.focus,i.ContextKeyExpr.not("isComposing")),primary:9,secondary:[1024|9]}})),(0,A.registerEditorCommand)(new F({id:D.FIND_IDS.ToggleCaseSensitiveCommand,precondition:void 0,handler:L=>L.toggleCaseSensitive(),kbOpts:{weight:100+5,kbExpr:k.EditorContextKeys.focus,primary:D.ToggleCaseSensitiveKeybinding.primary,mac:D.ToggleCaseSensitiveKeybinding.mac,win:D.ToggleCaseSensitiveKeybinding.win,linux:D.ToggleCaseSensitiveKeybinding.linux}})),(0,A.registerEditorCommand)(new F({id:D.FIND_IDS.ToggleWholeWordCommand,precondition:void 0,handler:L=>L.toggleWholeWords(),kbOpts:{weight:100+5,kbExpr:k.EditorContextKeys.focus,primary:D.ToggleWholeWordKeybinding.primary,mac:D.ToggleWholeWordKeybinding.mac,win:D.ToggleWholeWordKeybinding.win,linux:D.ToggleWholeWordKeybinding.linux}})),(0,A.registerEditorCommand)(new F({id:D.FIND_IDS.ToggleRegexCommand,precondition:void 0,handler:L=>L.toggleRegex(),kbOpts:{weight:100+5,kbExpr:k.EditorContextKeys.focus,primary:D.ToggleRegexKeybinding.primary,mac:D.ToggleRegexKeybinding.mac,win:D.ToggleRegexKeybinding.win,linux:D.ToggleRegexKeybinding.linux}})),(0,A.registerEditorCommand)(new F({id:D.FIND_IDS.ToggleSearchScopeCommand,precondition:void 0,handler:L=>L.toggleSearchScope(),kbOpts:{weight:100+5,kbExpr:k.EditorContextKeys.focus,primary:D.ToggleSearchScopeKeybinding.primary,mac:D.ToggleSearchScopeKeybinding.mac,win:D.ToggleSearchScopeKeybinding.win,linux:D.ToggleSearchScopeKeybinding.linux}})),(0,A.registerEditorCommand)(new F({id:D.FIND_IDS.TogglePreserveCaseCommand,precondition:void 0,handler:L=>L.togglePreserveCase(),kbOpts:{weight:100+5,kbExpr:k.EditorContextKeys.focus,primary:D.TogglePreserveCaseKeybinding.primary,mac:D.TogglePreserveCaseKeybinding.mac,win:D.TogglePreserveCaseKeybinding.win,linux:D.TogglePreserveCaseKeybinding.linux}})),(0,A.registerEditorCommand)(new F({id:D.FIND_IDS.ReplaceOneAction,precondition:D.CONTEXT_FIND_WIDGET_VISIBLE,handler:L=>L.replace(),kbOpts:{weight:100+5,kbExpr:k.EditorContextKeys.focus,primary:2048|1024|22}})),(0,A.registerEditorCommand)(new F({id:D.FIND_IDS.ReplaceOneAction,precondition:D.CONTEXT_FIND_WIDGET_VISIBLE,handler:L=>L.replace(),kbOpts:{weight:100+5,kbExpr:i.ContextKeyExpr.and(k.EditorContextKeys.focus,D.CONTEXT_REPLACE_INPUT_FOCUSED),primary:3}})),(0,A.registerEditorCommand)(new F({id:D.FIND_IDS.ReplaceAllAction,precondition:D.CONTEXT_FIND_WIDGET_VISIBLE,handler:L=>L.replaceAll(),kbOpts:{weight:100+5,kbExpr:k.EditorContextKeys.focus,primary:2048|512|3}})),(0,A.registerEditorCommand)(new F({id:D.FIND_IDS.ReplaceAllAction,precondition:D.CONTEXT_FIND_WIDGET_VISIBLE,handler:L=>L.replaceAll(),kbOpts:{weight:100+5,kbExpr:i.ContextKeyExpr.and(k.EditorContextKeys.focus,D.CONTEXT_REPLACE_INPUT_FOCUSED),primary:void 0,mac:{primary:2048|3}}})),(0,A.registerEditorCommand)(new F({id:D.FIND_IDS.SelectAllMatchesAction,precondition:D.CONTEXT_FIND_WIDGET_VISIBLE,handler:L=>L.selectAllMatches(),kbOpts:{weight:100+5,kbExpr:k.EditorContextKeys.focus,primary:512|3}}))}),define(ne[2070],re([1,0,33,93,1268,63,12]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingDecorationProvider=e.foldingCollapsedIcon=e.foldingExpandedIcon=void 0,e.foldingExpandedIcon=(0,A.registerIcon)("folding-expanded",t.Codicon.chevronDown,(0,_.localize)(0,null)),e.foldingCollapsedIcon=(0,A.registerIcon)("folding-collapsed",t.Codicon.chevronRight,(0,_.localize)(1,null));class D{constructor(w){this.editor=w,this.autoHideFoldingControls=!0,this.showFoldingHighlights=!0}getDecorationOption(w,v){return v?D.HIDDEN_RANGE_DECORATION:w?this.showFoldingHighlights?D.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:D.COLLAPSED_VISUAL_DECORATION:this.autoHideFoldingControls?D.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:D.EXPANDED_VISUAL_DECORATION}deltaDecorations(w,v){return this.editor.deltaDecorations(w,v)}changeDecorations(w){return this.editor.changeDecorations(w)}}e.FoldingDecorationProvider=D,D.COLLAPSED_VISUAL_DECORATION=f.ModelDecorationOptions.register({description:"folding-collapsed-visual-decoration",stickiness:1,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:k.ThemeIcon.asClassName(e.foldingCollapsedIcon)}),D.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=f.ModelDecorationOptions.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:1,afterContentClassName:"inline-folded",className:"folded-background",isWholeLine:!0,firstLineDecorationClassName:k.ThemeIcon.asClassName(e.foldingCollapsedIcon)}),D.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=f.ModelDecorationOptions.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:k.ThemeIcon.asClassName(e.foldingExpandedIcon)}),D.EXPANDED_VISUAL_DECORATION=f.ModelDecorationOptions.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+k.ThemeIcon.asClassName(e.foldingExpandedIcon)}),D.HIDDEN_RANGE_DECORATION=f.ModelDecorationOptions.register({description:"folding-hidden-range-decoration",stickiness:1})}),define(ne[761],re([1,0,11,22,97,2,29,13,453,39,58,86,124,1191,1192,1193,1194,1267,7,32,12,2070,537,26,81,228,151,62,1029]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.editorFoldForeground=e.foldBackgroundBackground=e.FoldingController=void 0;const E=new r.RawContextKey("foldingEnabled",!1);let y=class to extends A.Disposable{constructor(X,Y,$,J,ee,te){super();this.contextKeyService=Y,this.languageConfigurationService=$,this.languageFeaturesService=te,this._tooManyRegionsNotified=!1,this.localToDispose=this._register(new A.DisposableStore),this.editor=X;const se=this.editor.getOptions();this._isEnabled=se.get(37),this._useFoldingProviders=se.get(38)!=="indentation",this._unfoldOnClickAfterEndOfLine=se.get(42),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=se.get(40),this._maxFoldingRegions=se.get(41),this.updateDebounceInfo=ee.for(te.foldingRangeProvider,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingStateMemento=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new a.FoldingDecorationProvider(X),this.foldingDecorationProvider.autoHideFoldingControls=se.get(99)==="mouseover",this.foldingDecorationProvider.showFoldingHighlights=se.get(39),this.foldingEnabled=E.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._notifyTooManyRegions=ie=>{this._tooManyRegionsNotified||(J.notify({severity:g.default.Warning,sticky:!0,message:l.localize(0,null,ie)}),this._tooManyRegionsNotified=!0)},this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(ie=>{if(ie.hasChanged(37)&&(this._isEnabled=this.editor.getOptions().get(37),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),ie.hasChanged(41)&&(this._maxFoldingRegions=this.editor.getOptions().get(41),this._tooManyRegionsNotified=!1,this.onModelChanged()),ie.hasChanged(99)||ie.hasChanged(39)){const ce=this.editor.getOptions();this.foldingDecorationProvider.autoHideFoldingControls=ce.get(99)==="mouseover",this.foldingDecorationProvider.showFoldingHighlights=ce.get(39),this.triggerFoldingModelChanged()}ie.hasChanged(38)&&(this._useFoldingProviders=this.editor.getOptions().get(38)!=="indentation",this.onFoldingStrategyChanged()),ie.hasChanged(42)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(42)),ie.hasChanged(40)&&(this._foldingImportsByDefault=this.editor.getOptions().get(40))})),this.onModelChanged()}static get(X){return X.getContribution(to.ID)}saveViewState(){let X=this.editor.getModel();if(!X||!this._isEnabled||X.isTooLargeForTokenization())return{};if(this.foldingModel){let Y=this.foldingModel.isInitialized?this.foldingModel.getMemento():this.hiddenRangeModel.getMemento(),$=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:Y,lineCount:X.getLineCount(),provider:$,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(X){let Y=this.editor.getModel();if(!Y||!this._isEnabled||Y.isTooLargeForTokenization()||!this.hiddenRangeModel||!X||X.lineCount!==Y.getLineCount()||(this._currentModelHasFoldedImports=!!X.foldedImports,!X.collapsedRegions))return;(X.provider===n.ID_SYNTAX_PROVIDER||X.provider===s.ID_INIT_PROVIDER)&&(this.foldingStateMemento=X);const $=X.collapsedRegions;if(this.hiddenRangeModel.applyMemento($)){const J=this.getFoldingModel();J&&J.then(ee=>{if(ee){this._restoringViewState=!0;try{ee.applyMemento($)}finally{this._restoringViewState=!1}}}).then(void 0,f.onUnexpectedError)}}onModelChanged(){this.localToDispose.clear();let X=this.editor.getModel();!this._isEnabled||!X||X.isTooLargeForTokenization()||(this._currentModelHasFoldedImports=!1,this.foldingModel=new c.FoldingModel(X,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new i.HiddenRangeModel(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(Y=>this.onHiddenRangesChanges(Y))),this.updateScheduler=new t.Delayer(this.updateDebounceInfo.get(X)),this.cursorChangedScheduler=new t.RunOnceScheduler(()=>this.revealCursor(),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelContent(Y=>this.onDidChangeModelContent(Y))),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(Y=>this.onEditorMouseDown(Y))),this.localToDispose.add(this.editor.onMouseUp(Y=>this.onEditorMouseUp(Y))),this.localToDispose.add({dispose:()=>{this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.updateScheduler&&this.updateScheduler.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,this.foldingStateMemento=null,this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(X){if(this.rangeProvider)return this.rangeProvider;if(this.rangeProvider=new S.IndentRangeProvider(X,this.languageConfigurationService,this._maxFoldingRegions),this._useFoldingProviders&&this.foldingModel){let Y=this.languageFeaturesService.foldingRangeProvider.ordered(this.foldingModel.textModel);if(Y.length===0&&this.foldingStateMemento&&this.foldingStateMemento.collapsedRegions)return this.rangeProvider=new s.InitializingRangeProvider(X,this.foldingStateMemento.collapsedRegions,()=>{this.foldingStateMemento=null,this.onFoldingStrategyChanged()},3e4);Y.length>0&&(this.rangeProvider=new n.SyntaxRangeProvider(X,Y,()=>this.triggerFoldingModelChanged(),this._maxFoldingRegions))}return this.foldingStateMemento=null,this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(X){this.hiddenRangeModel?.notifyChangeModelContent(X),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{const X=this.foldingModel;if(!X)return null;const Y=new m.StopWatch(!0),$=this.getRangeProvider(X.textModel);let J=this.foldingRegionPromise=(0,t.createCancelablePromise)(ee=>$.compute(ee,this._notifyTooManyRegions));return J.then(ee=>{if(ee&&J===this.foldingRegionPromise){let te;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const le=ee.setCollapsedAllOfType(C.FoldingRangeKind.Imports.value,!0);le&&(te=I.StableEditorScrollState.capture(this.editor),this._currentModelHasFoldedImports=le)}let se=this.editor.getSelections(),ie=se?se.map(le=>le.startLineNumber):[];X.update(ee,ie),te&&te.restore(this.editor);const ce=this.updateDebounceInfo.update(X.textModel,Y.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=ce)}return X})}).then(void 0,X=>((0,f.onUnexpectedError)(X),null)))}onHiddenRangesChanges(X){if(this.hiddenRangeModel&&X.length&&!this._restoringViewState){let Y=this.editor.getSelections();Y&&this.hiddenRangeModel.adjustSelections(Y)&&this.editor.setSelections(Y)}this.editor.setHiddenAreas(X)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const X=this.getFoldingModel();!X||X.then(Y=>{if(Y){let $=this.editor.getSelections();if($&&$.length>0){let J=[];for(let ee of $){let te=ee.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(te)&&J.push(...Y.getAllRegionsAtLine(te,se=>se.isCollapsed&&te>se.startLineNumber))}J.length&&(Y.toggleCollapseState(J),this.reveal($[0].getPosition()))}}}).then(void 0,f.onUnexpectedError)}onEditorMouseDown(X){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!X.target||!X.target.range||!X.event.leftButton&&!X.event.middleButton)return;const Y=X.target.range;let $=!1;switch(X.target.type){case 4:{const J=X.target.detail,ee=X.target.element.offsetLeft;if(J.offsetX-ee<5)return;$=!0;break}case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!X.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){let J=this.editor.getModel();if(J&&Y.startColumn===J.getLineMaxColumn(Y.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:Y.startLineNumber,iconClicked:$}}onEditorMouseUp(X){const Y=this.getFoldingModel();if(!Y||!this.mouseDownInfo||!X.target)return;let $=this.mouseDownInfo.lineNumber,J=this.mouseDownInfo.iconClicked,ee=X.target.range;if(!(!ee||ee.startLineNumber!==$)){if(J){if(X.target.type!==4)return}else{let te=this.editor.getModel();if(!te||ee.startColumn!==te.getLineMaxColumn($))return}Y.then(te=>{if(te){let se=te.getRegionAtLine($);if(se&&se.startLineNumber===$){let ie=se.isCollapsed;if(J||ie){let ce=X.event.altKey,le=[];if(ce){let ae=oe=>!oe.containedBy(se)&&!se.containedBy(oe),ue=te.getRegionsInside(null,ae);for(const oe of ue)oe.isCollapsed&&le.push(oe);le.length===0&&(le=ue)}else{let ae=X.event.middleButton||X.event.shiftKey;if(ae)for(const ue of te.getRegionsInside(se))ue.isCollapsed===ie&&le.push(ue);(ie||!ae||le.length===0)&&le.push(se)}te.toggleCollapseState(le),this.reveal({lineNumber:$,column:1})}}}}).then(void 0,f.onUnexpectedError)}}reveal(X){this.editor.revealPositionInCenterIfOutsideViewport(X,0)}};y.ID="editor.contrib.folding",y=Ee([W(1,r.IContextKeyService),W(2,o.ILanguageConfigurationService),W(3,h.INotificationService),W(4,d.ILanguageFeatureDebounceService),W(5,b.ILanguageFeaturesService)],y),e.FoldingController=y;class T extends w.EditorAction{runEditorCommand(X,Y,$){const J=X.get(o.ILanguageConfigurationService),ee=y.get(Y);if(!ee)return;const te=ee.getFoldingModel();if(te)return this.reportTelemetry(X,Y),te.then(se=>{if(se){this.invoke(ee,se,Y,$,J);const ie=Y.getSelection();ie&&ee.reveal(ie.getStartPosition())}})}getSelectedLines(X){let Y=X.getSelections();return Y?Y.map($=>$.startLineNumber):[]}getLineNumbers(X,Y){return X&&X.selectionLines?X.selectionLines.map($=>$+1):this.getSelectedLines(Y)}run(X,Y){}}function R(j){if(!D.isUndefined(j)){if(!D.isObject(j))return!1;const X=j;if(!D.isUndefined(X.levels)&&!D.isNumber(X.levels)||!D.isUndefined(X.direction)&&!D.isString(X.direction)||!D.isUndefined(X.selectionLines)&&(!D.isArray(X.selectionLines)||!X.selectionLines.every(D.isNumber)))return!1}return!0}class O extends T{constructor(){super({id:"editor.unfold",label:l.localize(1,null),alias:"Unfold",precondition:E,kbOpts:{kbExpr:v.EditorContextKeys.editorTextFocus,primary:2048|1024|89,mac:{primary:2048|512|89},weight:100},description:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:`Property-value pairs that can be passed through this argument: * 'levels': Number of levels to unfold. If not set, defaults to 1. * 'direction': If 'up', unfold given number of levels up otherwise unfolds down. * 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used. `,constraint:R,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(X,Y,$,J){let ee=J&&J.levels||1,te=this.getLineNumbers(J,$);J&&J.direction==="up"?(0,c.setCollapseStateLevelsUp)(Y,!1,ee,te):(0,c.setCollapseStateLevelsDown)(Y,!1,ee,te)}}class x extends T{constructor(){super({id:"editor.unfoldRecursively",label:l.localize(2,null),alias:"Unfold Recursively",precondition:E,kbOpts:{kbExpr:v.EditorContextKeys.editorTextFocus,primary:(0,_.KeyChord)(2048|41,2048|89),weight:100}})}invoke(X,Y,$,J){(0,c.setCollapseStateLevelsDown)(Y,!1,Number.MAX_VALUE,this.getSelectedLines($))}}class F extends T{constructor(){super({id:"editor.fold",label:l.localize(3,null),alias:"Fold",precondition:E,kbOpts:{kbExpr:v.EditorContextKeys.editorTextFocus,primary:2048|1024|87,mac:{primary:2048|512|87},weight:100},description:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:`Property-value pairs that can be passed through this argument: * 'levels': Number of levels to fold. * 'direction': If 'up', folds given number of levels up otherwise folds down. * 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used. If no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead. `,constraint:R,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(X,Y,$,J){let ee=this.getLineNumbers(J,$);const te=J&&J.levels,se=J&&J.direction;typeof te!="number"&&typeof se!="string"?(0,c.setCollapseStateUp)(Y,!0,ee):se==="up"?(0,c.setCollapseStateLevelsUp)(Y,!0,te||1,ee):(0,c.setCollapseStateLevelsDown)(Y,!0,te||1,ee)}}class L extends T{constructor(){super({id:"editor.toggleFold",label:l.localize(4,null),alias:"Toggle Fold",precondition:E,kbOpts:{kbExpr:v.EditorContextKeys.editorTextFocus,primary:(0,_.KeyChord)(2048|41,2048|42),weight:100}})}invoke(X,Y,$){let J=this.getSelectedLines($);(0,c.toggleCollapseState)(Y,1,J)}}class M extends T{constructor(){super({id:"editor.foldRecursively",label:l.localize(5,null),alias:"Fold Recursively",precondition:E,kbOpts:{kbExpr:v.EditorContextKeys.editorTextFocus,primary:(0,_.KeyChord)(2048|41,2048|87),weight:100}})}invoke(X,Y,$){let J=this.getSelectedLines($);(0,c.setCollapseStateLevelsDown)(Y,!0,Number.MAX_VALUE,J)}}class N extends T{constructor(){super({id:"editor.foldAllBlockComments",label:l.localize(6,null),alias:"Fold All Block Comments",precondition:E,kbOpts:{kbExpr:v.EditorContextKeys.editorTextFocus,primary:(0,_.KeyChord)(2048|41,2048|85),weight:100}})}invoke(X,Y,$,J,ee){if(Y.regions.hasTypes())(0,c.setCollapseStateForType)(Y,C.FoldingRangeKind.Comment.value,!0);else{const te=$.getModel();if(!te)return;const se=ee.getLanguageConfiguration(te.getLanguageId()).comments;if(se&&se.blockCommentStartToken){let ie=new RegExp("^\\s*"+(0,k.escapeRegExpCharacters)(se.blockCommentStartToken));(0,c.setCollapseStateForMatchingLines)(Y,ie,!0)}}}}class B extends T{constructor(){super({id:"editor.foldAllMarkerRegions",label:l.localize(7,null),alias:"Fold All Regions",precondition:E,kbOpts:{kbExpr:v.EditorContextKeys.editorTextFocus,primary:(0,_.KeyChord)(2048|41,2048|29),weight:100}})}invoke(X,Y,$,J,ee){if(Y.regions.hasTypes())(0,c.setCollapseStateForType)(Y,C.FoldingRangeKind.Region.value,!0);else{const te=$.getModel();if(!te)return;const se=ee.getLanguageConfiguration(te.getLanguageId()).foldingRules;if(se&&se.markers&&se.markers.start){let ie=new RegExp(se.markers.start);(0,c.setCollapseStateForMatchingLines)(Y,ie,!0)}}}}class P extends T{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:l.localize(8,null),alias:"Unfold All Regions",precondition:E,kbOpts:{kbExpr:v.EditorContextKeys.editorTextFocus,primary:(0,_.KeyChord)(2048|41,2048|30),weight:100}})}invoke(X,Y,$,J,ee){if(Y.regions.hasTypes())(0,c.setCollapseStateForType)(Y,C.FoldingRangeKind.Region.value,!1);else{const te=$.getModel();if(!te)return;const se=ee.getLanguageConfiguration(te.getLanguageId()).foldingRules;if(se&&se.markers&&se.markers.start){let ie=new RegExp(se.markers.start);(0,c.setCollapseStateForMatchingLines)(Y,ie,!1)}}}}class V extends T{constructor(){super({id:"editor.foldAllExcept",label:l.localize(9,null),alias:"Fold All Regions Except Selected",precondition:E,kbOpts:{kbExpr:v.EditorContextKeys.editorTextFocus,primary:(0,_.KeyChord)(2048|41,2048|83),weight:100}})}invoke(X,Y,$){let J=this.getSelectedLines($);(0,c.setCollapseStateForRest)(Y,!0,J)}}class z extends T{constructor(){super({id:"editor.unfoldAllExcept",label:l.localize(10,null),alias:"Unfold All Regions Except Selected",precondition:E,kbOpts:{kbExpr:v.EditorContextKeys.editorTextFocus,primary:(0,_.KeyChord)(2048|41,2048|81),weight:100}})}invoke(X,Y,$){let J=this.getSelectedLines($);(0,c.setCollapseStateForRest)(Y,!1,J)}}class U extends T{constructor(){super({id:"editor.foldAll",label:l.localize(11,null),alias:"Fold All",precondition:E,kbOpts:{kbExpr:v.EditorContextKeys.editorTextFocus,primary:(0,_.KeyChord)(2048|41,2048|21),weight:100}})}invoke(X,Y,$){(0,c.setCollapseStateLevelsDown)(Y,!0)}}class H extends T{constructor(){super({id:"editor.unfoldAll",label:l.localize(12,null),alias:"Unfold All",precondition:E,kbOpts:{kbExpr:v.EditorContextKeys.editorTextFocus,primary:(0,_.KeyChord)(2048|41,2048|40),weight:100}})}invoke(X,Y,$){(0,c.setCollapseStateLevelsDown)(Y,!1)}}class K extends T{getFoldingLevel(){return parseInt(this.id.substr(K.ID_PREFIX.length))}invoke(X,Y,$){(0,c.setCollapseStateAtLevel)(Y,this.getFoldingLevel(),!0,this.getSelectedLines($))}}K.ID_PREFIX="editor.foldLevel",K.ID=j=>K.ID_PREFIX+j;class G extends T{constructor(){super({id:"editor.gotoParentFold",label:l.localize(13,null),alias:"Go to Parent Fold",precondition:E,kbOpts:{kbExpr:v.EditorContextKeys.editorTextFocus,weight:100}})}invoke(X,Y,$){let J=this.getSelectedLines($);if(J.length>0){let ee=(0,c.getParentFoldLine)(J[0],Y);ee!==null&&$.setSelection({startLineNumber:ee,startColumn:1,endLineNumber:ee,endColumn:1})}}}class q extends T{constructor(){super({id:"editor.gotoPreviousFold",label:l.localize(14,null),alias:"Go to Previous Folding Range",precondition:E,kbOpts:{kbExpr:v.EditorContextKeys.editorTextFocus,weight:100}})}invoke(X,Y,$){let J=this.getSelectedLines($);if(J.length>0){let ee=(0,c.getPreviousFoldLine)(J[0],Y);ee!==null&&$.setSelection({startLineNumber:ee,startColumn:1,endLineNumber:ee,endColumn:1})}}}class Z extends T{constructor(){super({id:"editor.gotoNextFold",label:l.localize(15,null),alias:"Go to Next Folding Range",precondition:E,kbOpts:{kbExpr:v.EditorContextKeys.editorTextFocus,weight:100}})}invoke(X,Y,$){let J=this.getSelectedLines($);if(J.length>0){let ee=(0,c.getNextFoldLine)(J[0],Y);ee!==null&&$.setSelection({startLineNumber:ee,startColumn:1,endLineNumber:ee,endColumn:1})}}}(0,w.registerEditorContribution)(y.ID,y),(0,w.registerEditorAction)(O),(0,w.registerEditorAction)(x),(0,w.registerEditorAction)(F),(0,w.registerEditorAction)(M),(0,w.registerEditorAction)(U),(0,w.registerEditorAction)(H),(0,w.registerEditorAction)(N),(0,w.registerEditorAction)(B),(0,w.registerEditorAction)(P),(0,w.registerEditorAction)(V),(0,w.registerEditorAction)(z),(0,w.registerEditorAction)(L),(0,w.registerEditorAction)(G),(0,w.registerEditorAction)(q),(0,w.registerEditorAction)(Z);for(let j=1;j<=7;j++)(0,w.registerInstantiatedEditorAction)(new K({id:K.ID(j),label:l.localize(16,null,j),alias:`Fold Level ${j}`,precondition:E,kbOpts:{kbExpr:v.EditorContextKeys.editorTextFocus,primary:(0,_.KeyChord)(2048|41,2048|21+j),weight:100}}));e.foldBackgroundBackground=(0,p.registerColor)("editor.foldBackground",{light:(0,p.transparent)(p.editorSelectionBackground,.3),dark:(0,p.transparent)(p.editorSelectionBackground,.3),hcDark:null,hcLight:null},l.localize(17,null),!0),e.editorFoldForeground=(0,p.registerColor)("editorGutter.foldingControlForeground",{dark:p.iconForeground,light:p.iconForeground,hcDark:p.iconForeground,hcLight:p.iconForeground},l.localize(18,null)),(0,u.registerThemingParticipant)((j,X)=>{const Y=j.getColor(e.foldBackgroundBackground);Y&&X.addRule(`.monaco-editor .folded-background { background-color: ${Y}; }`);const $=j.getColor(e.editorFoldForeground);$&&X.addRule(` .monaco-editor .cldr${u.ThemeIcon.asCSSSelector(a.foldingExpandedIcon)}, .monaco-editor .cldr${u.ThemeIcon.asCSSSelector(a.foldingCollapsedIcon)} { color: ${$} !important; } `)})}),define(ne[2071],re([1,0,10,521,15,2,49,20,93,86,709,286,7,5,38,211,11,58,6]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContentHoverWidget=e.ContentHoverController=void 0;const p=t.$;let u=class io extends A.Disposable{constructor(b,E,y){super();this._editor=b,this._instantiationService=E,this._keybindingService=y,this._widget=this._register(this._instantiationService.createInstance(h,this._editor)),this._decorationsChangerListener=this._register(new a(this._editor)),this._messages=[],this._messagesAreComplete=!1,this._participants=[];for(const T of C.HoverParticipantRegistry.getAll())this._participants.push(this._instantiationService.createInstance(T,this._editor));this._participants.sort((T,R)=>T.hoverOrdinal-R.hoverOrdinal),this._computer=new d(this._editor,this._participants),this._hoverOperation=this._register(new v.HoverOperation(this._editor,this._computer)),this._register(this._hoverOperation.onResult(T=>{this._withResult(T.value,T.isComplete,T.hasLoadingMessage)})),this._register(this._decorationsChangerListener.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(t.addStandardDisposableListener(this._widget.getDomNode(),"keydown",T=>{T.equals(9)&&this.hide()})),this._register(w.TokenizationRegistry.onDidChange(()=>{this._widget.position&&this._computer.anchor&&this._messages.length>0&&(this._widget.clear(),this._renderMessages(this._computer.anchor,this._messages))}))}_onModelDecorationsChanged(){this._widget.position&&(this._hoverOperation.cancel(),this._widget.isColorPickerVisible||this._hoverOperation.start(0))}maybeShowAt(b){const E=[];for(const T of this._participants)if(T.suggestHoverAnchor){const R=T.suggestHoverAnchor(b);R&&E.push(R)}const y=b.target;if(y.type===6&&E.push(new C.HoverRangeAnchor(0,y.range)),y.type===7){const T=this._editor.getOption(44).typicalHalfwidthCharacterWidth/2;!y.detail.isAfterLines&&typeof y.detail.horizontalDistanceToText=="number"&&y.detail.horizontalDistanceToText<T&&E.push(new C.HoverRangeAnchor(0,y.range))}return E.length===0?!1:(E.sort((T,R)=>R.priority-T.priority),this._startShowingAt(E[0],0,!1),!0)}startShowingAtRange(b,E,y){this._startShowingAt(new C.HoverRangeAnchor(0,b),E,y)}_startShowingAt(b,E,y){if(!(this._computer.anchor&&this._computer.anchor.equals(b))){if(this._hoverOperation.cancel(),this._widget.position)if(!this._computer.anchor||!b.canAdoptVisibleHover(this._computer.anchor,this._widget.position))this.hide();else{const T=this._messages.filter(R=>R.isValidForHoverAnchor(b));if(T.length===0)this.hide();else{if(T.length===this._messages.length&&this._messagesAreComplete)return;this._renderMessages(b,T)}}this._computer.anchor=b,this._computer.shouldFocus=y,this._hoverOperation.start(E)}}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._widget.hide()}isColorPickerVisible(){return this._widget.isColorPickerVisible}containsNode(b){return this._widget.getDomNode().contains(b)}_addLoadingMessage(b){if(this._computer.anchor){for(const E of this._participants)if(E.createLoadingMessage){const y=E.createLoadingMessage(this._computer.anchor);if(y)return b.slice(0).concat([y])}}return b}_withResult(b,E,y){this._messages=y?this._addLoadingMessage(b):b,this._messagesAreComplete=E,this._computer.anchor&&this._messages.length>0?this._renderMessages(this._computer.anchor,this._messages):E&&this.hide()}_renderMessages(b,E){let y=1073741824,T=E[0].range,R=null;for(const N of E)y=Math.min(y,N.range.startColumn),T=D.Range.plusRange(T,N.range),N.forceShowAtRange&&(R=N.range);const O=new A.DisposableStore,x=O.add(new g(this._keybindingService)),F=document.createDocumentFragment();let L=null;const M={fragment:F,statusBar:x,setColorPicker:N=>L=N,onContentsChanged:()=>this._widget.onContentsChanged(),hide:()=>this.hide()};for(const N of this._participants){const B=E.filter(P=>P.owner===N);B.length>0&&O.add(N.renderHoverParts(M,B))}if(x.hasContent&&F.appendChild(x.hoverElement),F.hasChildNodes()){if(T){const N=this._decorationsChangerListener.deltaDecorations([],[{range:T,options:io._DECORATION_OPTIONS}]);O.add((0,A.toDisposable)(()=>{this._decorationsChangerListener.deltaDecorations(N,[])}))}this._widget.showAt(F,new n(L,R?R.getStartPosition():new k.Position(b.range.startLineNumber,y),R||T,this._editor.getOption(53).above,this._computer.shouldFocus,O))}else O.dispose()}};u._DECORATION_OPTIONS=I.ModelDecorationOptions.register({description:"content-hover-highlight",className:"hoverHighlight"}),u=Ee([W(1,c.IInstantiationService),W(2,i.IKeybindingService)],u),e.ContentHoverController=u;class a extends A.Disposable{constructor(b){super();this._editor=b,this._onDidChangeModelDecorations=this._register(new r.Emitter),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._isChangingDecorations=!1,this._register(this._editor.onDidChangeModelDecorations(E=>{this._isChangingDecorations||this._onDidChangeModelDecorations.fire(E)}))}deltaDecorations(b,E){try{return this._isChangingDecorations=!0,this._editor.deltaDecorations(b,E)}finally{this._isChangingDecorations=!1}}}class n{constructor(b,E,y,T,R,O){this.colorPicker=b,this.showAtPosition=E,this.showAtRange=y,this.preferAbove=T,this.stoleFocus=R,this.disposables=O}}let h=class no extends A.Disposable{constructor(b,E){super();this._editor=b,this._contextKeyService=E,this.allowEditorOverflow=!0,this._hoverVisibleKey=l.EditorContextKeys.hoverVisible.bindTo(this._contextKeyService),this._hover=this._register(new f.HoverWidget),this._visibleData=null,this._register(this._editor.onDidLayoutChange(()=>this._layout())),this._register(this._editor.onDidChangeConfiguration(y=>{y.hasChanged(44)&&this._updateFont()})),this._setVisibleData(null),this._layout(),this._editor.addContentWidget(this)}get position(){return this._visibleData?.showAtPosition??null}get isColorPickerVisible(){return Boolean(this._visibleData?.colorPicker)}dispose(){this._editor.removeContentWidget(this),this._visibleData&&this._visibleData.disposables.dispose(),super.dispose()}getId(){return no.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){if(!this._visibleData)return null;let b=this._visibleData.preferAbove;return!b&&this._contextKeyService.getContextKeyValue(S.Context.Visible.key)&&(b=!0),{position:this._visibleData.showAtPosition,range:this._visibleData.showAtRange,preference:b?[1,2]:[2,1]}}_setVisibleData(b){this._visibleData&&this._visibleData.disposables.dispose(),this._visibleData=b,this._hoverVisibleKey.set(!!this._visibleData),this._hover.containerDomNode.classList.toggle("hidden",!this._visibleData)}_layout(){const b=Math.max(this._editor.getLayoutInfo().height/4,250),{fontSize:E,lineHeight:y}=this._editor.getOption(44);this._hover.contentsDomNode.style.fontSize=`${E}px`,this._hover.contentsDomNode.style.lineHeight=`${y/E}`,this._hover.contentsDomNode.style.maxHeight=`${b}px`,this._hover.contentsDomNode.style.maxWidth=`${Math.max(this._editor.getLayoutInfo().width*.66,500)}px`}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(E=>this._editor.applyFontInfo(E))}showAt(b,E){this._setVisibleData(E),this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(b),this._hover.contentsDomNode.style.paddingBottom="",this._updateFont(),this._editor.layoutContentWidget(this),this.onContentsChanged(),this._editor.render(),this._editor.layoutContentWidget(this),this.onContentsChanged(),E.stoleFocus&&this._hover.containerDomNode.focus(),E.colorPicker&&E.colorPicker.layout()}hide(){if(this._visibleData){const b=this._visibleData.stoleFocus;this._setVisibleData(null),this._editor.layoutContentWidget(this),b&&this._editor.focus()}}onContentsChanged(){this._hover.onContentsChanged();const b=this._hover.scrollbar.getScrollDimensions();if(b.scrollWidth>b.width){const y=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;this._hover.contentsDomNode.style.paddingBottom!==y&&(this._hover.contentsDomNode.style.paddingBottom=y,this._editor.layoutContentWidget(this),this._hover.onContentsChanged())}}clear(){this._hover.contentsDomNode.textContent=""}};h.ID="editor.contrib.contentHoverWidget",h=Ee([W(1,o.IContextKeyService)],h),e.ContentHoverWidget=h;let g=class extends A.Disposable{constructor(b){super();this._keybindingService=b,this._hasContent=!1,this.hoverElement=p("div.hover-row.status-bar"),this.actionsElement=t.append(this.hoverElement,p("div.actions"))}get hasContent(){return this._hasContent}addAction(b){const E=this._keybindingService.lookupKeybinding(b.commandId),y=E?E.getLabel():null;return this._hasContent=!0,this._register(f.HoverAction.render(this.actionsElement,b,y))}append(b){const E=t.append(this.actionsElement,b);return this._hasContent=!0,E}};g=Ee([W(0,i.IKeybindingService)],g);class d{constructor(b,E){this._editor=b,this._participants=E,this._anchor=null,this._shouldFocus=!1}get anchor(){return this._anchor}set anchor(b){this._anchor=b}get shouldFocus(){return this._shouldFocus}set shouldFocus(b){this._shouldFocus=b}static _getLineDecorations(b,E){if(E.type!==1)return[];const y=b.getModel(),T=E.range.startLineNumber;if(T>y.getLineCount())return[];const R=y.getLineMaxColumn(T);return b.getLineDecorations(T).filter(O=>{if(O.options.isWholeLine)return!0;const x=O.range.startLineNumber===T?O.range.startColumn:1,F=O.range.endLineNumber===T?O.range.endColumn:R;if(O.options.showIfCollapsed){if(x>E.range.startColumn+1||E.range.endColumn-1>F)return!1}else if(x>E.range.startColumn||E.range.endColumn>F)return!1;return!0})}computeAsync(b){const E=this._anchor;if(!this._editor.hasModel()||!E)return s.AsyncIterableObject.EMPTY;const y=d._getLineDecorations(this._editor,E);return s.AsyncIterableObject.merge(this._participants.map(T=>T.computeAsync?T.computeAsync(E,y,b):s.AsyncIterableObject.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const b=d._getLineDecorations(this._editor,this._anchor);let E=[];for(const y of this._participants)E=E.concat(y.computeSync(this._anchor,b));return(0,_.coalesce)(E)}}}),define(ne[2072],re([1,0,11,22,287,39,20,84,58,93,184,164,1284,12,1195]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let S=class mr{constructor(p,u){this.decorationIds=[],this.editor=p,this.editorWorkerService=u}static get(p){return p.getContribution(mr.ID)}dispose(){}run(p,u){this.currentRequest&&this.currentRequest.cancel();const a=this.editor.getSelection(),n=this.editor.getModel();if(!n||!a)return;let h=a;if(h.startLineNumber!==h.endLineNumber)return;const g=new _.EditorState(this.editor,1|4),d=n.uri;return this.editorWorkerService.canNavigateValueSet(d)?(this.currentRequest=(0,t.createCancelablePromise)(m=>this.editorWorkerService.navigateValueSet(d,h,u)),this.currentRequest.then(m=>{if(!m||!m.range||!m.value||!g.validate(this.editor))return;let b=k.Range.lift(m.range),E=m.range,y=m.value.length-(h.endColumn-h.startColumn);E={startLineNumber:E.startLineNumber,startColumn:E.startColumn,endLineNumber:E.endLineNumber,endColumn:E.startColumn+m.value.length},y>1&&(h=new D.Selection(h.startLineNumber,h.startColumn,h.endLineNumber,h.endColumn+y-1));const T=new i.InPlaceReplaceCommand(b,h,m.value);this.editor.pushUndoStop(),this.editor.executeCommand(p,T),this.editor.pushUndoStop(),this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[{range:E,options:mr.DECORATION}]),this.decorationRemover&&this.decorationRemover.cancel(),this.decorationRemover=(0,t.timeout)(350),this.decorationRemover.then(()=>this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[])).catch(f.onUnexpectedError)}).catch(f.onUnexpectedError)):Promise.resolve(void 0)}};S.ID="editor.contrib.inPlaceReplaceController",S.DECORATION=w.ModelDecorationOptions.register({description:"in-place-replace",className:"valueSetReplacement"}),S=Ee([W(1,v.IEditorWorkerService)],S);class s extends A.EditorAction{constructor(){super({id:"editor.action.inPlaceReplace.up",label:o.localize(0,null),alias:"Replace with Previous Value",precondition:I.EditorContextKeys.writable,kbOpts:{kbExpr:I.EditorContextKeys.editorTextFocus,primary:2048|1024|82,weight:100}})}run(p,u){const a=S.get(u);return a?a.run(this.id,!0):Promise.resolve(void 0)}}class l extends A.EditorAction{constructor(){super({id:"editor.action.inPlaceReplace.down",label:o.localize(1,null),alias:"Replace with Next Value",precondition:I.EditorContextKeys.writable,kbOpts:{kbExpr:I.EditorContextKeys.editorTextFocus,primary:2048|1024|84,weight:100}})}run(p,u){const a=S.get(u);return a?a.run(this.id,!1):Promise.resolve(void 0)}}(0,A.registerEditorContribution)(S.ID,S),(0,A.registerEditorAction)(s),(0,A.registerEditorAction)(l),(0,c.registerThemingParticipant)((r,p)=>{const u=r.getColor(C.editorBracketMatchBorder);u&&p.addRule(`.monaco-editor.vs .valueSetReplacement { outline: solid 2px ${u}; }`)})}),define(ne[2073],re([1,0,15,11,30,66,22,6,2,29,9,39,72,49,20,58,93,124,1291,7,32,12,62,228,151]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.editorLinkedEditingBackground=e.LinkedEditingAction=e.LinkedEditingContribution=e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE=void 0,e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE=new p.RawContextKey("LinkedEditingInputVisible",!1);const d="linked-editing-decoration";let m=class vr extends I.Disposable{constructor(R,O,x,F,L){super();this.languageConfigurationService=F,this._localToDispose=this._register(new I.DisposableStore),this._editor=R,this._providers=x.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE.bindTo(O),this._debounceInformation=L.for(this._providers,"Linked Editing",{min:200}),this._currentDecorations=[],this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new I.DisposableStore),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequest=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel(()=>this.reinitialize(!0))),this._register(this._editor.onDidChangeConfiguration(M=>{(M.hasChanged(62)||M.hasChanged(82))&&this.reinitialize(!1)})),this._register(this._providers.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}static get(R){return R.getContribution(vr.ID)}reinitialize(R){const O=this._editor.getModel(),x=O!==null&&(this._editor.getOption(62)||this._editor.getOption(82))&&this._providers.has(O);if(x===this._enabled&&!R||(this._enabled=x,this.clearRanges(),this._localToDispose.clear(),!x||O===null))return;this._localToDispose.add(D.Event.runAndSubscribe(O.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(O.getLanguageId()).getWordDefinition()}));const F=new f.Delayer(this._debounceInformation.get(O)),L=()=>{this._rangeUpdateTriggerPromise=F.trigger(()=>this.updateRanges(),this._debounceDuration??this._debounceInformation.get(O))},M=new f.Delayer(0),N=B=>{this._rangeSyncTriggerPromise=M.trigger(()=>this._syncRanges(B))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{L()})),this._localToDispose.add(this._editor.onDidChangeModelContent(B=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const P=O.getDecorationRange(this._currentDecorations[0]);if(P&&B.changes.every(V=>P.intersectRanges(V.range))){N(this._currentDecorations);return}}L()})),this._localToDispose.add({dispose:()=>{F.dispose(),M.dispose()}}),this.updateRanges()}_syncRanges(R){if(!this._editor.hasModel()||R!==this._currentDecorations||R.length===0)return;const O=this._editor.getModel(),x=O.getDecorationRange(R[0]);if(!x||x.startLineNumber!==x.endLineNumber)return this.clearRanges();const F=O.getValueInRange(x);if(this._currentWordPattern){const M=F.match(this._currentWordPattern);if((M?M[0].length:0)!==F.length)return this.clearRanges()}let L=[];for(let M=1,N=R.length;M<N;M++){const B=O.getDecorationRange(R[M]);if(!!B)if(B.startLineNumber!==B.endLineNumber)L.push({range:B,text:F});else{let P=O.getValueInRange(B),V=F,z=B.startColumn,U=B.endColumn;const H=w.commonPrefixLength(P,V);z+=H,P=P.substr(H),V=V.substr(H);const K=w.commonSuffixLength(P,V);U-=K,P=P.substr(0,P.length-K),V=V.substr(0,V.length-K),(z!==U||V.length!==0)&&L.push({range:new i.Range(B.startLineNumber,z,B.endLineNumber,U),text:V})}}if(L.length!==0)try{this._editor.popUndoStop(),this._ignoreChangeEvent=!0;const M=this._editor._getViewModel().getPrevEditOperationType();this._editor.executeEdits("linkedEditing",L),this._editor._getViewModel().setPrevEditOperationType(M)}finally{this._ignoreChangeEvent=!1}}dispose(){this.clearRanges(),super.dispose()}clearRanges(){this._visibleContextKey.set(!1),this._currentDecorations=this._editor.deltaDecorations(this._currentDecorations,[]),this._currentRequest&&(this._currentRequest.cancel(),this._currentRequest=null,this._currentRequestPosition=null)}get currentUpdateTriggerPromise(){return this._rangeUpdateTriggerPromise||Promise.resolve()}get currentSyncTriggerPromise(){return this._rangeSyncTriggerPromise||Promise.resolve()}async updateRanges(R=!1){if(!this._editor.hasModel()){this.clearRanges();return}const O=this._editor.getPosition();if(!this._enabled&&!R||this._editor.getSelections().length>1){this.clearRanges();return}const x=this._editor.getModel(),F=x.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===F){if(O.equals(this._currentRequestPosition))return;if(this._currentDecorations&&this._currentDecorations.length>0){const M=x.getDecorationRange(this._currentDecorations[0]);if(M&&M.containsPosition(O))return}}this._currentRequestPosition=O,this._currentRequestModelVersion=F;const L=(0,f.createCancelablePromise)(async M=>{try{const N=new g.StopWatch(!1),B=await y(this._providers,x,O,M);if(this._debounceInformation.update(x,N.elapsed()),L!==this._currentRequest||(this._currentRequest=null,F!==x.getVersionId()))return;let P=[];B?.ranges&&(P=B.ranges),this._currentWordPattern=B?.wordPattern||this._languageWordPattern;let V=!1;for(let U=0,H=P.length;U<H;U++)if(i.Range.containsPosition(P[U],O)){if(V=!0,U!==0){const K=P[U];P.splice(U,1),P.unshift(K)}break}if(!V){this.clearRanges();return}const z=P.map(U=>({range:U,options:vr.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations=this._editor.deltaDecorations(this._currentDecorations,z)}catch(N){(0,k.isCancellationError)(N)||(0,k.onUnexpectedError)(N),(this._currentRequest===L||!this._currentRequest)&&this.clearRanges()}});return this._currentRequest=L,L}setDebounceDuration(R){this._debounceDuration=R}};m.ID="editor.contrib.linkedEditing",m.DECORATION=s.ModelDecorationOptions.register({description:"linked-editing",stickiness:0,className:d}),m=Ee([W(1,p.IContextKeyService),W(2,n.ILanguageFeaturesService),W(3,l.ILanguageConfigurationService),W(4,h.ILanguageFeatureDebounceService)],m),e.LinkedEditingContribution=m;class b extends C.EditorAction{constructor(){super({id:"editor.action.linkedEditing",label:r.localize(0,null),alias:"Start Linked Editing",precondition:p.ContextKeyExpr.and(S.EditorContextKeys.writable,S.EditorContextKeys.hasRenameProvider),kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:2048|1024|60,weight:100}})}runCommand(R,O){const x=R.get(o.ICodeEditorService),[F,L]=Array.isArray(O)&&O||[void 0,void 0];return v.URI.isUri(F)&&c.Position.isIPosition(L)?x.openCodeEditor({resource:F},x.getActiveCodeEditor()).then(M=>{!M||(M.setPosition(L),M.invokeWithinContext(N=>(this.reportTelemetry(N,M),this.run(N,M))))},k.onUnexpectedError):super.runCommand(R,O)}run(R,O){const x=m.get(O);return x?Promise.resolve(x.updateRanges(!0)):Promise.resolve()}}e.LinkedEditingAction=b;const E=C.EditorCommand.bindToContribution(m.get);(0,C.registerEditorCommand)(new E({id:"cancelLinkedEditingInput",precondition:e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE,handler:T=>T.clearRanges(),kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,weight:100+99,primary:9,secondary:[1024|9]}}));function y(T,R,O,x){const F=T.ordered(R);return(0,f.first)(F.map(L=>async()=>{try{return await L.provideLinkedEditingRanges(R,O,x)}catch(M){(0,k.onUnexpectedExternalError)(M);return}}),L=>!!L&&t.isNonEmptyArray(L?.ranges))}e.editorLinkedEditingBackground=(0,u.registerColor)("editor.linkedEditingBackground",{dark:A.Color.fromHex("#f00").transparent(.3),light:A.Color.fromHex("#f00").transparent(.3),hcDark:A.Color.fromHex("#f00").transparent(.3),hcLight:A.Color.white},r.localize(1,null)),(0,a.registerThemingParticipant)((T,R)=>{const O=T.getColor(e.editorLinkedEditingBackground);O&&R.addRule(`.monaco-editor .${d} { background: ${O}; border-left-color: ${O}; }`)}),(0,C.registerModelAndPositionCommand)("_executeLinkedEditingProvider",(T,R,O)=>{const{linkedEditingRangeProvider:x}=T.get(n.ILanguageFeaturesService);return y(x,R,O,_.CancellationToken.None)}),(0,C.registerEditorContribution)(m.ID,m),(0,C.registerEditorAction)(b)}),define(ne[762],re([1,0,11,30,22,117,2,18,14,19,151,9,39,93,228,62,538,1937,1292,26,41,32,12,1034]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkDetector=void 0;let h=class ro extends k.Disposable{constructor(y,T,R,O,x){super();this.editor=y,this.openerService=T,this.notificationService=R,this.languageFeaturesService=O,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=x.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new t.RunOnceScheduler(()=>this.computeLinksNow(),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;const F=this._register(new s.ClickLinkGesture(y));this._register(F.onMouseMoveOrRelevantKeyDown(([L,M])=>{this._onEditorMouseMove(L,M)})),this._register(F.onExecute(L=>{this.onEditorMouseUp(L)})),this._register(F.onCancel(L=>{this.cleanUpActiveLinkDecoration()})),this._register(y.onDidChangeConfiguration(L=>{!L.hasChanged(63)||(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))})),this._register(y.onDidChangeModelContent(L=>{!this.editor.hasModel()||this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))})),this._register(y.onDidChangeModel(L=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)})),this._register(y.onDidChangeModelLanguage(L=>{this.stop(),this.computeLinks.schedule(0)})),this._register(this.providers.onDidChange(L=>{this.stop(),this.computeLinks.schedule(0)})),this.computeLinks.schedule(0)}static get(y){return y.getContribution(ro.ID)}async computeLinksNow(){if(!this.editor.hasModel()||!this.editor.getOption(63))return;const y=this.editor.getModel();if(!!this.providers.has(y)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=(0,t.createCancelablePromise)(T=>(0,l.getLinks)(this.providers,y,T));try{const T=new v.StopWatch(!1);if(this.activeLinksList=await this.computePromise,this.debounceInformation.update(y,T.elapsed()),y.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(T){(0,_.onUnexpectedError)(T)}finally{this.computePromise=null}}}updateDecorations(y){const T=this.editor.getOption(70)==="altKey",R=[],O=Object.keys(this.currentOccurrences);for(const L of O){const M=this.currentOccurrences[L];R.push(M.decorationId)}const x=[];if(y)for(const L of y)x.push(d.decoration(L,T));const F=this.editor.deltaDecorations(R,x);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let L=0,M=F.length;L<M;L++){const N=new d(y[L],F[L]);this.currentOccurrences[N.decorationId]=N}}_onEditorMouseMove(y,T){const R=this.editor.getOption(70)==="altKey";if(this.isEnabled(y,T)){this.cleanUpActiveLinkDecoration();const O=this.getLinkOccurrence(y.target.position);O&&this.editor.changeDecorations(x=>{O.activate(x,R),this.activeLinkDecorationId=O.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const y=this.editor.getOption(70)==="altKey";if(this.activeLinkDecorationId){const T=this.currentOccurrences[this.activeLinkDecorationId];T&&this.editor.changeDecorations(R=>{T.deactivate(R,y)}),this.activeLinkDecorationId=null}}onEditorMouseUp(y){if(!this.isEnabled(y))return;const T=this.getLinkOccurrence(y.target.position);!T||this.openLinkOccurrence(T,y.hasSideBySideModifier,!0)}openLinkOccurrence(y,T,R=!1){if(!this.openerService)return;const{link:O}=y;O.resolve(f.CancellationToken.None).then(x=>{if(typeof x=="string"&&this.editor.hasModel()){const F=this.editor.getModel().uri;if(F.scheme===D.Schemas.file&&x.startsWith(`${D.Schemas.file}:`)){const L=C.URI.parse(x);if(L.scheme===D.Schemas.file){const M=w.originalFSPath(L);let N=null;M.startsWith("/./")?N=`.${M.substr(1)}`:M.startsWith("//./")&&(N=`.${M.substr(2)}`),N&&(x=w.joinPath(F,N))}}}return this.openerService.open(x,{openToSide:T,fromUserGesture:R,allowContributedOpeners:!0,allowCommands:!0})},x=>{const F=x instanceof Error?x.message:x;F==="invalid"?this.notificationService.warn(r.localize(0,null,O.url.toString())):F==="missing"?this.notificationService.warn(r.localize(1,null)):(0,_.onUnexpectedError)(x)})}getLinkOccurrence(y){if(!this.editor.hasModel()||!y)return null;const T=this.editor.getModel().getDecorationsInRange({startLineNumber:y.lineNumber,startColumn:y.column,endLineNumber:y.lineNumber,endColumn:y.column},0,!0);for(const R of T){const O=this.currentOccurrences[R.id];if(O)return O}return null}isEnabled(y,T){return Boolean(y.target.type===6&&(y.hasTriggerModifier||T&&T.keyCodeIsTriggerKey))}stop(){this.computeLinks.cancel(),this.activeLinksList&&(this.activeLinksList?.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};h.ID="editor.linkDetector",h=Ee([W(1,u.IOpenerService),W(2,p.INotificationService),W(3,S.ILanguageFeaturesService),W(4,i.ILanguageFeatureDebounceService)],h),e.LinkDetector=h;const g={general:c.ModelDecorationOptions.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:c.ModelDecorationOptions.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class d{constructor(y,T){this.link=y,this.decorationId=T}static decoration(y,T){return{range:y.range,options:d._getOptions(y,T,!1)}}static _getOptions(y,T,R){const O={...R?g.active:g.general};return O.hoverMessage=m(y,T),O}activate(y,T){y.changeDecorationOptions(this.decorationId,d._getOptions(this.link,T,!0))}deactivate(y,T){y.changeDecorationOptions(this.decorationId,d._getOptions(this.link,T,!1))}}function m(E,y){const T=E.url&&/^command:/i.test(E.url.toString()),R=E.tooltip?E.tooltip:T?r.localize(2,null):r.localize(3,null),O=y?I.isMacintosh?r.localize(4,null):r.localize(5,null):I.isMacintosh?r.localize(6,null):r.localize(7,null);if(E.url){let x="";if(/^command:/i.test(E.url.toString())){const L=E.url.toString().match(/^command:([^?#]+)/);if(L){const M=L[1];x=r.localize(8,null,M)}}return new A.MarkdownString("",!0).appendLink(E.url.toString(!0).replace(/ /g,"%20"),R,x).appendMarkdown(` (${O})`)}else return new A.MarkdownString().appendText(`${R} (${O})`)}class b extends o.EditorAction{constructor(){super({id:"editor.action.openLink",label:r.localize(9,null),alias:"Open Link",precondition:void 0})}run(y,T){const R=h.get(T);if(!R||!T.hasModel())return;const O=T.getSelections();for(const x of O){const F=R.getLinkOccurrence(x.getEndPosition());F&&R.openLinkOccurrence(F,!1)}}}(0,o.registerEditorContribution)(h.ID,h),(0,o.registerEditorAction)(b),(0,n.registerThemingParticipant)((E,y)=>{const T=E.getColor(a.editorActiveLinkForeground);T&&y.addRule(`.monaco-editor .detected-link-active { color: ${T} !important; }`)})}),define(ne[763],re([1,0,112,11,97,2,39,527,20,84,58,122,93,405,1294,16,7,32,12,62]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionHighlighter=e.CompatChangeAll=e.SelectHighlightsAction=e.MoveSelectionToPreviousFindMatchAction=e.MoveSelectionToNextFindMatchAction=e.AddSelectionToPreviousFindMatchAction=e.AddSelectionToNextFindMatchAction=e.MultiCursorSelectionControllerAction=e.MultiCursorSelectionController=e.MultiCursorSession=e.MultiCursorSessionResult=e.InsertCursorBelow=e.InsertCursorAbove=void 0;function u(V,z){const U=z.filter(H=>!V.find(K=>K.equals(H)));if(U.length>=1){const H=U.map(G=>`line ${G.viewState.position.lineNumber} column ${G.viewState.position.column}`).join(", "),K=U.length===1?i.localize(0,null,H):i.localize(1,null,H);(0,t.status)(K)}}class a extends k.EditorAction{constructor(){super({id:"editor.action.insertCursorAbove",label:i.localize(2,null),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:v.EditorContextKeys.editorTextFocus,primary:2048|512|16,linux:{primary:1024|512|16,secondary:[2048|1024|16]},weight:100},menuOpts:{menuId:S.MenuId.MenubarSelectionMenu,group:"3_multi",title:i.localize(3,null),order:2}})}run(z,U,H){if(!U.hasModel())return;let K=!0;H&&H.logicalLine===!1&&(K=!1);const G=U._getViewModel();if(G.cursorConfig.readOnly)return;G.model.pushStackElement();const q=G.getCursorStates();G.setCursorStates(H.source,3,D.CursorMoveCommands.addCursorUp(G,q,K)),G.revealTopMostCursor(H.source),u(q,G.getCursorStates())}}e.InsertCursorAbove=a;class n extends k.EditorAction{constructor(){super({id:"editor.action.insertCursorBelow",label:i.localize(4,null),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:v.EditorContextKeys.editorTextFocus,primary:2048|512|18,linux:{primary:1024|512|18,secondary:[2048|1024|18]},weight:100},menuOpts:{menuId:S.MenuId.MenubarSelectionMenu,group:"3_multi",title:i.localize(5,null),order:3}})}run(z,U,H){if(!U.hasModel())return;let K=!0;H&&H.logicalLine===!1&&(K=!1);const G=U._getViewModel();if(G.cursorConfig.readOnly)return;G.model.pushStackElement();const q=G.getCursorStates();G.setCursorStates(H.source,3,D.CursorMoveCommands.addCursorDown(G,q,K)),G.revealBottomMostCursor(H.source),u(q,G.getCursorStates())}}e.InsertCursorBelow=n;class h extends k.EditorAction{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:i.localize(6,null),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:v.EditorContextKeys.editorTextFocus,primary:1024|512|39,weight:100},menuOpts:{menuId:S.MenuId.MenubarSelectionMenu,group:"3_multi",title:i.localize(7,null),order:4}})}getCursorsForSelection(z,U,H){if(!z.isEmpty()){for(let K=z.startLineNumber;K<z.endLineNumber;K++){let G=U.getLineMaxColumn(K);H.push(new w.Selection(K,G,K,G))}z.endColumn>1&&H.push(new w.Selection(z.endLineNumber,z.endColumn,z.endLineNumber,z.endColumn))}}run(z,U){if(!U.hasModel())return;const H=U.getModel(),K=U.getSelections(),G=U._getViewModel(),q=G.getCursorStates();let Z=[];K.forEach(j=>this.getCursorsForSelection(j,H,Z)),Z.length>0&&U.setSelections(Z),u(q,G.getCursorStates())}}class g extends k.EditorAction{constructor(){super({id:"editor.action.addCursorsToBottom",label:i.localize(8,null),alias:"Add Cursors To Bottom",precondition:void 0})}run(z,U){if(!U.hasModel())return;const H=U.getSelections(),K=U.getModel().getLineCount();let G=[];for(let j=H[0].startLineNumber;j<=K;j++)G.push(new w.Selection(j,H[0].startColumn,j,H[0].endColumn));const q=U._getViewModel(),Z=q.getCursorStates();G.length>0&&U.setSelections(G),u(Z,q.getCursorStates())}}class d extends k.EditorAction{constructor(){super({id:"editor.action.addCursorsToTop",label:i.localize(9,null),alias:"Add Cursors To Top",precondition:void 0})}run(z,U){if(!U.hasModel())return;const H=U.getSelections();let K=[];for(let Z=H[0].startLineNumber;Z>=1;Z--)K.push(new w.Selection(Z,H[0].startColumn,Z,H[0].endColumn));const G=U._getViewModel(),q=G.getCursorStates();K.length>0&&U.setSelections(K),u(q,G.getCursorStates())}}class m{constructor(z,U,H){this.selections=z,this.revealRange=U,this.revealScrollType=H}}e.MultiCursorSessionResult=m;class b{constructor(z,U,H,K,G,q,Z){this._editor=z,this.findController=U,this.isDisconnectedFromFindController=H,this.searchText=K,this.wholeWord=G,this.matchCase=q,this.currentMatch=Z}static create(z,U){if(!z.hasModel())return null;const H=U.getState();if(!z.hasTextFocus()&&H.isRevealed&&H.searchString.length>0)return new b(z,U,!1,H.searchString,H.wholeWord,H.matchCase,null);let K=!1,G,q;const Z=z.getSelections();Z.length===1&&Z[0].isEmpty()?(K=!0,G=!0,q=!0):(G=H.wholeWord,q=H.matchCase);const j=z.getSelection();let X,Y=null;if(j.isEmpty()){const $=z.getConfiguredWordAtPosition(j.getStartPosition());if(!$)return null;X=$.word,Y=new w.Selection(j.startLineNumber,$.startColumn,j.startLineNumber,$.endColumn)}else X=z.getModel().getValueInRange(j).replace(/\r\n/g,` `);return new b(z,U,K,X,G,q,Y)}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const z=this._getNextMatch();if(!z)return null;const U=this._editor.getSelections();return new m(U.concat(z),z,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const z=this._getNextMatch();if(!z)return null;const U=this._editor.getSelections();return new m(U.slice(0,U.length-1).concat(z),z,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const K=this.currentMatch;return this.currentMatch=null,K}this.findController.highlightFindOptions();const z=this._editor.getSelections(),U=z[z.length-1],H=this._editor.getModel().findNextMatch(this.searchText,U.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(117):null,!1);return H?new w.Selection(H.range.startLineNumber,H.range.startColumn,H.range.endLineNumber,H.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const z=this._getPreviousMatch();if(!z)return null;const U=this._editor.getSelections();return new m(U.concat(z),z,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const z=this._getPreviousMatch();if(!z)return null;const U=this._editor.getSelections();return new m(U.slice(0,U.length-1).concat(z),z,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const K=this.currentMatch;return this.currentMatch=null,K}this.findController.highlightFindOptions();const z=this._editor.getSelections(),U=z[z.length-1],H=this._editor.getModel().findPreviousMatch(this.searchText,U.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(117):null,!1);return H?new w.Selection(H.range.startLineNumber,H.range.startColumn,H.range.endLineNumber,H.range.endColumn):null}selectAll(z){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();const U=this._editor.getModel();return z?U.findMatches(this.searchText,z,!1,this.matchCase,this.wholeWord?this._editor.getOption(117):null,!1,1073741824):U.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(117):null,!1,1073741824)}}e.MultiCursorSession=b;class E extends A.Disposable{constructor(z){super();this._sessionDispose=this._register(new A.DisposableStore),this._editor=z,this._ignoreSelectionChange=!1,this._session=null}static get(z){return z.getContribution(E.ID)}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(z){if(!this._session){const U=b.create(this._editor,z);if(!U)return;this._session=U;const H={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(H.wholeWordOverride=1,H.matchCaseOverride=1,H.isRegexOverride=2),z.getState().change(H,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(K=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(z.getState().onFindReplaceStateChange(K=>{(K.matchCase||K.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const z={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(z,!1)}this._session=null}_setSelections(z){this._ignoreSelectionChange=!0,this._editor.setSelections(z),this._ignoreSelectionChange=!1}_expandEmptyToWord(z,U){if(!U.isEmpty())return U;const H=this._editor.getConfiguredWordAtPosition(U.getStartPosition());return H?new w.Selection(U.startLineNumber,H.startColumn,U.startLineNumber,H.endColumn):U}_applySessionResult(z){!z||(this._setSelections(z.selections),z.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(z.revealRange,z.revealScrollType))}getSession(z){return this._session}addSelectionToNextFindMatch(z){if(!!this._editor.hasModel()){if(!this._session){const U=this._editor.getSelections();if(U.length>1){const K=z.getState().matchCase;if(!B(this._editor.getModel(),U,K)){const q=this._editor.getModel();let Z=[];for(let j=0,X=U.length;j<X;j++)Z[j]=this._expandEmptyToWord(q,U[j]);this._editor.setSelections(Z);return}}}this._beginSessionIfNeeded(z),this._session&&this._applySessionResult(this._session.addSelectionToNextFindMatch())}}addSelectionToPreviousFindMatch(z){this._beginSessionIfNeeded(z),this._session&&this._applySessionResult(this._session.addSelectionToPreviousFindMatch())}moveSelectionToNextFindMatch(z){this._beginSessionIfNeeded(z),this._session&&this._applySessionResult(this._session.moveSelectionToNextFindMatch())}moveSelectionToPreviousFindMatch(z){this._beginSessionIfNeeded(z),this._session&&this._applySessionResult(this._session.moveSelectionToPreviousFindMatch())}selectAll(z){if(!this._editor.hasModel())return;let U=null;const H=z.getState();if(H.isRevealed&&H.searchString.length>0&&H.isRegex){const K=this._editor.getModel();H.searchScope?U=K.findMatches(H.searchString,H.searchScope,H.isRegex,H.matchCase,H.wholeWord?this._editor.getOption(117):null,!1,1073741824):U=K.findMatches(H.searchString,!0,H.isRegex,H.matchCase,H.wholeWord?this._editor.getOption(117):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(z),!this._session)return;U=this._session.selectAll(H.searchScope)}if(U.length>0){const K=this._editor.getSelection();for(let G=0,q=U.length;G<q;G++){const Z=U[G];if(Z.range.intersectRanges(K)){U[G]=U[0],U[0]=Z;break}}this._setSelections(U.map(G=>new w.Selection(G.range.startLineNumber,G.range.startColumn,G.range.endLineNumber,G.range.endColumn)))}}selectAllUsingSelections(z){z.length>0&&this._setSelections(z)}}e.MultiCursorSelectionController=E,E.ID="editor.contrib.multiCursorController";class y extends k.EditorAction{run(z,U){const H=E.get(U);if(!H)return;const K=c.CommonFindController.get(U);if(!K)return;const G=U._getViewModel();if(G){const q=G.getCursorStates();this._run(H,K),u(q,G.getCursorStates())}}}e.MultiCursorSelectionControllerAction=y;class T extends y{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:i.localize(10,null),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:v.EditorContextKeys.focus,primary:2048|34,weight:100},menuOpts:{menuId:S.MenuId.MenubarSelectionMenu,group:"3_multi",title:i.localize(11,null),order:5}})}_run(z,U){z.addSelectionToNextFindMatch(U)}}e.AddSelectionToNextFindMatchAction=T;class R extends y{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:i.localize(12,null),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:S.MenuId.MenubarSelectionMenu,group:"3_multi",title:i.localize(13,null),order:6}})}_run(z,U){z.addSelectionToPreviousFindMatch(U)}}e.AddSelectionToPreviousFindMatchAction=R;class O extends y{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:i.localize(14,null),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:v.EditorContextKeys.focus,primary:(0,_.KeyChord)(2048|41,2048|34),weight:100}})}_run(z,U){z.moveSelectionToNextFindMatch(U)}}e.MoveSelectionToNextFindMatchAction=O;class x extends y{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:i.localize(15,null),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(z,U){z.moveSelectionToPreviousFindMatch(U)}}e.MoveSelectionToPreviousFindMatchAction=x;class F extends y{constructor(){super({id:"editor.action.selectHighlights",label:i.localize(16,null),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:v.EditorContextKeys.focus,primary:2048|1024|42,weight:100},menuOpts:{menuId:S.MenuId.MenubarSelectionMenu,group:"3_multi",title:i.localize(17,null),order:7}})}_run(z,U){z.selectAll(U)}}e.SelectHighlightsAction=F;class L extends y{constructor(){super({id:"editor.action.changeAll",label:i.localize(18,null),alias:"Change All Occurrences",precondition:s.ContextKeyExpr.and(v.EditorContextKeys.writable,v.EditorContextKeys.editorTextFocus),kbOpts:{kbExpr:v.EditorContextKeys.editorTextFocus,primary:2048|60,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(z,U){z.selectAll(U)}}e.CompatChangeAll=L;class M{constructor(z,U,H,K,G){this._model=z,this._searchText=U,this._matchCase=H,this._wordSeparators=K,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,G&&this._model===G._model&&this._searchText===G._searchText&&this._matchCase===G._matchCase&&this._wordSeparators===G._wordSeparators&&this._modelVersionId===G._modelVersionId&&(this._cachedFindMatches=G._cachedFindMatches)}findMatches(){return this._cachedFindMatches===null&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map(z=>z.range),this._cachedFindMatches.sort(I.Range.compareRangesUsingStarts)),this._cachedFindMatches}}let N=class Pn extends A.Disposable{constructor(z,U){super();this._languageFeaturesService=U,this.editor=z,this._isEnabled=z.getOption(97),this.decorations=[],this.updateSoon=this._register(new f.RunOnceScheduler(()=>this._update(),300)),this.state=null,this._register(z.onDidChangeConfiguration(K=>{this._isEnabled=z.getOption(97)})),this._register(z.onDidChangeCursorSelection(K=>{!this._isEnabled||(K.selection.isEmpty()?K.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(z.onDidChangeModel(K=>{this._setState(null)})),this._register(z.onDidChangeModelContent(K=>{this._isEnabled&&this.updateSoon.schedule()}));const H=c.CommonFindController.get(z);H&&this._register(H.getState().onFindReplaceStateChange(K=>{this._update()}))}_update(){this._setState(Pn._createState(this.state,this._isEnabled,this.editor))}static _createState(z,U,H){if(!U||!H.hasModel())return null;const K=H.getSelection();if(K.startLineNumber!==K.endLineNumber)return null;const G=E.get(H);if(!G)return null;const q=c.CommonFindController.get(H);if(!q)return null;let Z=G.getSession(q);if(!Z){const Y=H.getSelections();if(Y.length>1){const J=q.getState().matchCase;if(!B(H.getModel(),Y,J))return null}Z=b.create(H,q)}if(!Z||Z.currentMatch||/^[ \t]+$/.test(Z.searchText)||Z.searchText.length>200)return null;const j=q.getState(),X=j.matchCase;if(j.isRevealed){let Y=j.searchString;X||(Y=Y.toLowerCase());let $=Z.searchText;if(X||($=$.toLowerCase()),Y===$&&Z.matchCase===j.matchCase&&Z.wholeWord===j.wholeWord&&!j.isRegex)return null}return new M(H.getModel(),Z.searchText,Z.matchCase,Z.wholeWord?H.getOption(117):null,z)}_setState(z){if(this.state=z,!this.state){this.decorations=this.editor.deltaDecorations(this.decorations,[]);return}if(!this.editor.hasModel())return;const U=this.editor.getModel();if(U.isTooLargeForTokenization())return;const H=this.state.findMatches(),K=this.editor.getSelections();K.sort(I.Range.compareRangesUsingStarts);const G=[];for(let j=0,X=0,Y=H.length,$=K.length;j<Y;){const J=H[j];if(X>=$)G.push(J),j++;else{const ee=I.Range.compareRangesUsingStarts(J,K[X]);ee<0?((K[X].isEmpty()||!I.Range.areIntersecting(J,K[X]))&&G.push(J),j++):(ee>0||j++,X++)}}const q=this._languageFeaturesService.documentHighlightProvider.has(U)&&this.editor.getOption(72),Z=G.map(j=>({range:j,options:q?Pn._SELECTION_HIGHLIGHT:Pn._SELECTION_HIGHLIGHT_OVERVIEW}));this.decorations=this.editor.deltaDecorations(this.decorations,Z)}dispose(){this._setState(null),super.dispose()}};N.ID="editor.contrib.selectionHighlighter",N._SELECTION_HIGHLIGHT_OVERVIEW=o.ModelDecorationOptions.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",minimap:{color:(0,r.themeColorFromId)(l.minimapSelectionOccurrenceHighlight),position:C.MinimapPosition.Inline},overviewRuler:{color:(0,r.themeColorFromId)(l.overviewRulerSelectionHighlightForeground),position:C.OverviewRulerLane.Center}}),N._SELECTION_HIGHLIGHT=o.ModelDecorationOptions.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),N=Ee([W(1,p.ILanguageFeaturesService)],N),e.SelectionHighlighter=N;function B(V,z,U){const H=P(V,z[0],!U);for(let K=1,G=z.length;K<G;K++){const q=z[K];if(q.isEmpty())return!1;const Z=P(V,q,!U);if(H!==Z)return!1}return!0}function P(V,z,U){const H=V.getValueInRange(z);return U?H.toLowerCase():H}(0,k.registerEditorContribution)(E.ID,E),(0,k.registerEditorContribution)(N.ID,N),(0,k.registerEditorAction)(a),(0,k.registerEditorAction)(n),(0,k.registerEditorAction)(h),(0,k.registerEditorAction)(T),(0,k.registerEditorAction)(R),(0,k.registerEditorAction)(O),(0,k.registerEditorAction)(x),(0,k.registerEditorAction)(F),(0,k.registerEditorAction)(L),(0,k.registerEditorAction)(g),(0,k.registerEditorAction)(d)}),define(ne[2074],re([1,0,10,208,11,22,6,2,195,29,229,2051,1307,7,5,24,32,68,127,12,713,211,740,2058,520,1040,751]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestContentWidget=e.SuggestWidget=e.editorSuggestWidgetStatusForeground=e.editorSuggestWidgetHighlightFocusForeground=e.editorSuggestWidgetHighlightForeground=e.editorSuggestWidgetSelectedBackground=e.editorSuggestWidgetSelectedIconForeground=e.editorSuggestWidgetSelectedForeground=e.editorSuggestWidgetForeground=e.editorSuggestWidgetBorder=e.editorSuggestWidgetBackground=void 0,e.editorSuggestWidgetBackground=(0,s.registerColor)("editorSuggestWidget.background",{dark:s.editorWidgetBackground,light:s.editorWidgetBackground,hcDark:s.editorWidgetBackground,hcLight:s.editorWidgetBackground},o.localize(0,null)),e.editorSuggestWidgetBorder=(0,s.registerColor)("editorSuggestWidget.border",{dark:s.editorWidgetBorder,light:s.editorWidgetBorder,hcDark:s.editorWidgetBorder,hcLight:s.editorWidgetBorder},o.localize(1,null)),e.editorSuggestWidgetForeground=(0,s.registerColor)("editorSuggestWidget.foreground",{dark:s.editorForeground,light:s.editorForeground,hcDark:s.editorForeground,hcLight:s.editorForeground},o.localize(2,null)),e.editorSuggestWidgetSelectedForeground=(0,s.registerColor)("editorSuggestWidget.selectedForeground",{dark:s.quickInputListFocusForeground,light:s.quickInputListFocusForeground,hcDark:s.quickInputListFocusForeground,hcLight:s.quickInputListFocusForeground},o.localize(3,null)),e.editorSuggestWidgetSelectedIconForeground=(0,s.registerColor)("editorSuggestWidget.selectedIconForeground",{dark:s.quickInputListFocusIconForeground,light:s.quickInputListFocusIconForeground,hcDark:s.quickInputListFocusIconForeground,hcLight:s.quickInputListFocusIconForeground},o.localize(4,null)),e.editorSuggestWidgetSelectedBackground=(0,s.registerColor)("editorSuggestWidget.selectedBackground",{dark:s.quickInputListFocusBackground,light:s.quickInputListFocusBackground,hcDark:s.quickInputListFocusBackground,hcLight:s.quickInputListFocusBackground},o.localize(5,null)),e.editorSuggestWidgetHighlightForeground=(0,s.registerColor)("editorSuggestWidget.highlightForeground",{dark:s.listHighlightForeground,light:s.listHighlightForeground,hcDark:s.listHighlightForeground,hcLight:s.listHighlightForeground},o.localize(6,null)),e.editorSuggestWidgetHighlightFocusForeground=(0,s.registerColor)("editorSuggestWidget.focusHighlightForeground",{dark:s.listFocusHighlightForeground,light:s.listFocusHighlightForeground,hcDark:s.listFocusHighlightForeground,hcLight:s.listFocusHighlightForeground},o.localize(7,null)),e.editorSuggestWidgetStatusForeground=(0,s.registerColor)("editorSuggestWidgetStatus.foreground",{dark:(0,s.transparent)(e.editorSuggestWidgetForeground,.5),light:(0,s.transparent)(e.editorSuggestWidgetForeground,.5),hcDark:(0,s.transparent)(e.editorSuggestWidgetForeground,.5),hcLight:(0,s.transparent)(e.editorSuggestWidgetForeground,.5)},o.localize(8,null));var g;(function(E){E[E.Hidden=0]="Hidden",E[E.Loading=1]="Loading",E[E.Empty=2]="Empty",E[E.Open=3]="Open",E[E.Frozen=4]="Frozen",E[E.Details=5]="Details"})(g||(g={}));class d{constructor(y,T){this._service=y,this._key=`suggestWidget.size/${T.getEditorType()}/${T instanceof v.EmbeddedCodeEditorWidget}`}restore(){const y=this._service.get(this._key,0)??"";try{const T=JSON.parse(y);if(t.Dimension.is(T))return t.Dimension.lift(T)}catch{}}store(y){this._service.store(this._key,JSON.stringify(y),0,1)}reset(){this._service.remove(this._key,0)}}let m=class Sr{constructor(y,T,R,O,x){this.editor=y,this._storageService=T,this._state=0,this._isAuto=!1,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new _.TimeoutTimer,this._disposables=new D.DisposableStore,this._onDidSelect=new k.Emitter,this._onDidFocus=new k.Emitter,this._onDidHide=new k.Emitter,this._onDidShow=new k.Emitter,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new k.Emitter,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new u.ResizableHTMLElement,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new b(this,y),this._persistedSize=new d(T,y);class F{constructor(z,U,H=!1,K=!1){this.persistedSize=z,this.currentSize=U,this.persistHeight=H,this.persistWidth=K}}let L;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),L=new F(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(V=>{if(this._resize(V.dimension.width,V.dimension.height),L&&(L.persistHeight=L.persistHeight||!!V.north||!!V.south,L.persistWidth=L.persistWidth||!!V.east||!!V.west),!!V.done){if(L){const{itemHeight:z,defaultSize:U}=this.getLayoutInfo(),H=Math.round(z/2);let{width:K,height:G}=this.element.size;(!L.persistHeight||Math.abs(L.currentSize.height-G)<=H)&&(G=L.persistedSize?.height??U.height),(!L.persistWidth||Math.abs(L.currentSize.width-K)<=H)&&(K=L.persistedSize?.width??U.width),this._persistedSize.store(new t.Dimension(K,G))}this._contentWidget.unlockPreference(),L=void 0}})),this._messageElement=t.append(this.element.domNode,t.$(".message")),this._listElement=t.append(this.element.domNode,t.$(".tree"));const M=x.createInstance(n.SuggestDetailsWidget,this.editor);M.onDidClose(this.toggleDetails,this,this._disposables),this._details=new n.SuggestDetailsOverlay(M,this.editor);const N=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(106).showIcons);N();const B=x.createInstance(h.ItemRenderer,this.editor);this._disposables.add(B),this._disposables.add(B.onDidToggleDetails(()=>this.toggleDetails())),this._list=new f.List("SuggestWidget",this._listElement,{getHeight:V=>this.getLayoutInfo().itemHeight,getTemplateId:V=>"suggestion"},[B],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>o.localize(11,null),getWidgetRole:()=>"listbox",getAriaLabel:V=>{let z=V.textLabel;if(typeof V.completion.label!="string"){const{detail:G,description:q}=V.completion.label;G&&q?z=o.localize(12,null,z,G,q):G?z=o.localize(13,null,z,G):q&&(z=o.localize(14,null,z,q))}if(!V.isResolved||!this._isDetailsVisible())return z;const{documentation:U,detail:H}=V.completion,K=w.format("{0}{1}",H||"",U?typeof U=="string"?U:U.value:"");return o.localize(15,null,z,K)}}}),this._status=x.createInstance(C.SuggestWidgetStatus,this.element.domNode);const P=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(106).showStatusBar);P(),this._disposables.add((0,l.attachListStyler)(this._list,O,{listInactiveFocusBackground:e.editorSuggestWidgetSelectedBackground,listInactiveFocusOutline:s.activeContrastBorder})),this._disposables.add(O.onDidColorThemeChange(V=>this._onThemeChange(V))),this._onThemeChange(O.getColorTheme()),this._disposables.add(this._list.onMouseDown(V=>this._onListMouseDownOrTap(V))),this._disposables.add(this._list.onTap(V=>this._onListMouseDownOrTap(V))),this._disposables.add(this._list.onDidChangeSelection(V=>this._onListSelection(V))),this._disposables.add(this._list.onDidChangeFocus(V=>this._onListFocus(V))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(V=>{V.hasChanged(106)&&(P(),N())})),this._ctxSuggestWidgetVisible=a.Context.Visible.bindTo(R),this._ctxSuggestWidgetDetailsVisible=a.Context.DetailsVisible.bindTo(R),this._ctxSuggestWidgetMultipleSuggestions=a.Context.MultipleSuggestions.bindTo(R),this._disposables.add(t.addStandardDisposableListener(this._details.widget.domNode,"keydown",V=>{this._onDetailsKeydown.fire(V)})),this._disposables.add(this.editor.onMouseDown(V=>this._onEditorMouseDown(V)))}dispose(){this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),this._loadingTimeout?.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(y){this._details.widget.domNode.contains(y.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(y.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){this._state!==0&&this._contentWidget.layout()}_onListMouseDownOrTap(y){typeof y.element=="undefined"||typeof y.index=="undefined"||(y.browserEvent.preventDefault(),y.browserEvent.stopPropagation(),this._select(y.element,y.index))}_onListSelection(y){y.elements.length&&this._select(y.elements[0],y.indexes[0])}_select(y,T){const R=this._completionModel;R&&(this._onDidSelect.fire({item:y,index:T,model:R}),this.editor.focus())}_onThemeChange(y){this._details.widget.borderWidth=(0,r.isHighContrast)(y.type)?2:1}_onListFocus(y){if(this._ignoreFocusEvents)return;if(!y.elements.length){this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0});return}if(!this._completionModel)return;const T=y.elements[0],R=y.indexes[0];T!==this._focusedItem&&(this._currentSuggestionDetails?.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=T,this._list.reveal(R),this._currentSuggestionDetails=(0,_.createCancelablePromise)(async O=>{const x=(0,_.disposableTimeout)(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250),F=O.onCancellationRequested(()=>x.dispose()),L=await T.resolve(O);return x.dispose(),F.dispose(),L}),this._currentSuggestionDetails.then(()=>{R>=this._list.length||T!==this._list.element(R)||(this._ignoreFocusEvents=!0,this._list.splice(R,1,[T]),this._list.setFocus([R]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:(0,h.getAriaId)(R)}))}).catch(A.onUnexpectedError)),this._onDidFocus.fire({item:T,index:R,model:this._completionModel})}_setState(y){if(this._state!==y)switch(this._state=y,this.element.domNode.classList.toggle("frozen",y===4),this.element.domNode.classList.remove("message"),y){case 0:t.hide(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=Sr.LOADING_MESSAGE,t.hide(this._listElement,this._status.element),t.show(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=Sr.NO_SUGGESTIONS_MESSAGE,t.hide(this._listElement,this._status.element),t.show(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 3:t.hide(this._messageElement),t.show(this._listElement,this._status.element),this._show();break;case 4:t.hide(this._messageElement),t.show(this._listElement,this._status.element),this._show();break;case 5:t.hide(this._messageElement),t.show(this._listElement,this._status.element),this._details.show(),this._show();break}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet(()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)},100)}showTriggered(y,T){this._state===0&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!y,this._isAuto||(this._loadingTimeout=(0,_.disposableTimeout)(()=>this._setState(1),T)))}showSuggestions(y,T,R,O){if(this._contentWidget.setPosition(this.editor.getPosition()),this._loadingTimeout?.dispose(),this._currentSuggestionDetails?.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==y&&(this._completionModel=y),R&&this._state!==2&&this._state!==0){this._setState(4);return}const x=this._completionModel.items.length,F=x===0;if(this._ctxSuggestWidgetMultipleSuggestions.set(x>1),F){this._setState(O?0:2),this._completionModel=void 0;return}this._focusedItem=void 0,this._list.splice(0,this._list.length,this._completionModel.items),this._setState(R?4:3),this._list.reveal(T,0),this._list.setFocus([T]),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(this._state!==0&&this._state!==2&&this._state!==1&&this._completionModel)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){this._state===5?(this._setState(3),this._details.widget.domNode.classList.remove("focused")):this._state===3&&this._isDetailsVisible()&&(this._setState(5),this._details.widget.domNode.classList.add("focused"))}toggleDetails(){this._isDetailsVisible()?(this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):((0,n.canExpandCompletionItem)(this._list.getFocusedElements()[0])||this._explainMode)&&(this._state===3||this._state===5||this._state===4)&&(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(y){this._details.show(),y?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._positionDetails(),this.editor.focus(),this.element.domNode.classList.add("shows-details")}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){this._loadingTimeout?.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const y=this._persistedSize.restore(),T=Math.ceil(this.getLayoutInfo().itemHeight*4.3);y&&y.height<T&&this._persistedSize.store(y.with(void 0,T))}isFrozen(){return this._state===4}_afterRender(y){if(y===null){this._isDetailsVisible()&&this._details.hide();return}this._state===2||this._state===1||(this._isDetailsVisible()&&this._details.show(),this._positionDetails())}_layout(y){if(!this.editor.hasModel()||!this.editor.getDomNode())return;const T=t.getClientArea(document.body),R=this.getLayoutInfo();y||(y=R.defaultSize);let O=y.height,x=y.width;if(this._status.element.style.lineHeight=`${R.itemHeight}px`,this._state===2||this._state===1)O=R.itemHeight+R.borderHeight,x=R.defaultSize.width/2,this.element.enableSashes(!1,!1,!1,!1),this.element.minSize=this.element.maxSize=new t.Dimension(x,O),this._contentWidget.setPreference(2);else{const F=T.width-R.borderHeight-2*R.horizontalPadding;x>F&&(x=F);const L=this._completionModel?this._completionModel.stats.pLabelLen*R.typicalHalfwidthCharacterWidth:x,M=R.statusBarHeight+this._list.contentHeight+R.borderHeight,N=R.itemHeight+R.statusBarHeight,B=t.getDomNodePagePosition(this.editor.getDomNode()),P=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),V=B.top+P.top+P.height,z=Math.min(T.height-V-R.verticalPadding,M),U=B.top+P.top-R.verticalPadding,H=Math.min(U,M);let K=Math.min(Math.max(H,z)+R.borderHeight,M);O===this._cappedHeight?.capped&&(O=this._cappedHeight.wanted),O<N&&(O=N),O>K&&(O=K);const G=150;O>z||this._forceRenderingAbove&&U>G?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),K=H):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),K=z),this.element.preferredSize=new t.Dimension(L,R.defaultSize.height),this.element.maxSize=new t.Dimension(F,K),this.element.minSize=new t.Dimension(220,N),this._cappedHeight=O===M?{wanted:this._cappedHeight?.wanted??y.height,capped:O}:void 0}this._resize(x,O)}_resize(y,T){const{width:R,height:O}=this.element.maxSize;y=Math.min(R,y),T=Math.min(O,T);const{statusBarHeight:x}=this.getLayoutInfo();this._list.layout(T-x,y),this._listElement.style.height=`${T-x}px`,this.element.layout(T,y),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,this._contentWidget.getPosition()?.preference[0]===2)}getLayoutInfo(){const y=this.editor.getOption(44),T=(0,I.clamp)(this.editor.getOption(108)||y.lineHeight,8,1e3),R=!this.editor.getOption(106).showStatusBar||this._state===2||this._state===1?0:T,O=this._details.widget.borderWidth,x=2*O;return{itemHeight:T,statusBarHeight:R,borderWidth:O,borderHeight:x,typicalHalfwidthCharacterWidth:y.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new t.Dimension(430,R+12*T+x)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(y){this._storageService.store("expandSuggestionDocs",y,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};m.LOADING_MESSAGE=o.localize(9,null),m.NO_SUGGESTIONS_MESSAGE=o.localize(10,null),m=Ee([W(1,S.IStorageService),W(2,c.IContextKeyService),W(3,p.IThemeService),W(4,i.IInstantiationService)],m),e.SuggestWidget=m;class b{constructor(y,T){this._widget=y,this._editor=T,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return this._hidden||!this._position||!this._preference?null:{position:this._position,preference:[this._preference]}}beforeRender(){const{height:y,width:T}=this._widget.element.size,{borderWidth:R,horizontalPadding:O}=this._widget.getLayoutInfo();return new t.Dimension(T+2*R+O,y+2*R)}afterRender(y){this._widget._afterRender(y)}setPreference(y){this._preferenceLocked||(this._preference=y)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(y){this._position=y}}e.SuggestContentWidget=b}),define(ne[2075],re([1,0,11,2,39,725,52,558,748,8,12,228,151,62]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let i=class so extends f.Disposable{constructor(s,l,r,p,u,a){super();this._modelService=l,this._themeService=r,this._configurationService=p,this._editor=s,this._provider=a.documentRangeSemanticTokensProvider,this._debounceInformation=u.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new t.RunOnceScheduler(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[];const n=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange(()=>{n()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),n()})),this._register(this._editor.onDidChangeModelContent(h=>{this._cancelAll(),n()})),this._register(this._provider.onDidChange(()=>{this._cancelAll(),n()})),this._register(this._configurationService.onDidChangeConfiguration(h=>{h.affectsConfiguration(D.SEMANTIC_HIGHLIGHTING_SETTING_ID)&&(this._cancelAll(),n())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),n()}))}static get(s){return s.getContribution(so.ID)}_cancelAll(){for(const s of this._outstandingRequests)s.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(s){for(let l=0,r=this._outstandingRequests.length;l<r;l++)if(this._outstandingRequests[l]===s){this._outstandingRequests.splice(l,1);return}}_tokenizeViewportNow(){if(!this._editor.hasModel())return;const s=this._editor.getModel();if(s.hasCompleteSemanticTokens())return;if(!(0,D.isSemanticColoringEnabled)(s,this._themeService,this._configurationService)){s.hasSomeSemanticTokens()&&s.setSemanticTokens(null,!1);return}if(!(0,A.hasDocumentRangeSemanticTokensProvider)(this._provider,s)){s.hasSomeSemanticTokens()&&s.setSemanticTokens(null,!1);return}const l=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(l.map(r=>this._requestRange(s,r)))}_requestRange(s,l){const r=s.getVersionId(),p=(0,t.createCancelablePromise)(a=>Promise.resolve((0,A.getDocumentRangeSemanticTokens)(this._provider,s,l,a))),u=new o.StopWatch(!1);return p.then(a=>{if(this._debounceInformation.update(s,u.elapsed()),!a||!a.tokens||s.isDisposed()||s.getVersionId()!==r)return;const{provider:n,tokens:h}=a,g=this._modelService.getSemanticTokensProviderStyling(n);s.setPartialSemanticTokens(l,(0,I.toMultilineTokens2)(h,g,s.getLanguageId()))}).then(()=>this._removeOutstandingRequest(p),()=>this._removeOutstandingRequest(p)),p}};i.ID="editor.contrib.viewportSemanticTokens",i=Ee([W(1,k.IModelService),W(2,v.IThemeService),W(3,w.IConfigurationService),W(4,C.ILanguageFeatureDebounceService),W(5,c.ILanguageFeaturesService)],i),(0,_.registerEditorContribution)(i.ID,i)}),define(ne[2076],re([1,0,112,15,11,30,22,2,39,20,58,122,93,86,1316,7,32,12,62,127]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getOccurrencesAtPosition=void 0;const u=(0,s.registerColor)("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},i.localize(0,null),!0),a=(0,s.registerColor)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},i.localize(1,null),!0),n=(0,s.registerColor)("editor.wordHighlightBorder",{light:null,dark:null,hcDark:s.activeContrastBorder,hcLight:s.activeContrastBorder},i.localize(2,null)),h=(0,s.registerColor)("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:s.activeContrastBorder,hcLight:s.activeContrastBorder},i.localize(3,null)),g=(0,s.registerColor)("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},i.localize(4,null),!0),d=(0,s.registerColor)("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hcDark:"#C0A0C0CC",hcLight:"#C0A0C0CC"},i.localize(5,null),!0),m=new S.RawContextKey("hasWordHighlights",!1);function b(B,P,V,z){const U=B.ordered(P);return(0,_.first)(U.map(H=>()=>Promise.resolve(H.provideDocumentHighlights(P,V,z)).then(void 0,k.onUnexpectedExternalError)),f.isNonEmptyArray)}e.getOccurrencesAtPosition=b;class E{constructor(P,V,z){this._model=P,this._selection=V,this._wordSeparators=z,this._wordRange=this._getCurrentWordRange(P,V),this._result=null}get result(){return this._result||(this._result=(0,_.createCancelablePromise)(P=>this._compute(this._model,this._selection,this._wordSeparators,P))),this._result}_getCurrentWordRange(P,V){const z=P.getWordAtPosition(V.getPosition());return z?new w.Range(V.startLineNumber,z.startColumn,V.startLineNumber,z.endColumn):null}isValid(P,V,z){const U=V.startLineNumber,H=V.startColumn,K=V.endColumn,G=this._getCurrentWordRange(P,V);let q=Boolean(this._wordRange&&this._wordRange.equalsRange(G));for(let Z=0,j=z.length;!q&&Z<j;Z++){let X=P.getDecorationRange(z[Z]);X&&X.startLineNumber===U&&X.startColumn<=H&&X.endColumn>=K&&(q=!0)}return q}cancel(){this.result.cancel()}}class y extends E{constructor(P,V,z,U){super(P,V,z);this._providers=U}_compute(P,V,z,U){return b(this._providers,P,V.getPosition(),U).then(H=>H||[])}}class T extends E{constructor(P,V,z){super(P,V,z);this._selectionIsEmpty=V.isEmpty()}_compute(P,V,z,U){return(0,_.timeout)(250,U).then(()=>{if(!V.isEmpty())return[];const H=P.getWordAtPosition(V.getPosition());return!H||H.word.length>1e3?[]:P.findMatches(H.word,!0,!1,!0,z,!1).map(G=>({range:G.range,kind:c.DocumentHighlightKind.Text}))})}isValid(P,V,z){const U=V.isEmpty();return this._selectionIsEmpty!==U?!1:super.isValid(P,V,z)}}function R(B,P,V,z){return B.has(P)?new y(P,V,z,B):new T(P,V,z)}(0,I.registerModelAndPositionCommand)("_executeDocumentHighlights",(B,P,V)=>{const z=B.get(r.ILanguageFeaturesService);return b(z.documentHighlightProvider,P,V,A.CancellationToken.None)});class O{constructor(P,V,z){this.toUnhook=new D.DisposableStore,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=P,this.providers=V,this._hasWordHighlights=m.bindTo(z),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(72),this.model=this.editor.getModel(),this.toUnhook.add(P.onDidChangeCursorPosition(U=>{this._ignorePositionChangeEvent||!this.occurrencesHighlight||this._onPositionChanged(U)})),this.toUnhook.add(P.onDidChangeModelContent(U=>{this._stopAll()})),this.toUnhook.add(P.onDidChangeConfiguration(U=>{let H=this.editor.getOption(72);this.occurrencesHighlight!==H&&(this.occurrencesHighlight=H,this._stopAll())})),this._decorationIds=[],this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this._decorationIds.length>0}restore(){!this.occurrencesHighlight||this._run()}_getSortedHighlights(){return f.coalesce(this._decorationIds.map(P=>this.model.getDecorationRange(P)).sort(w.Range.compareRangesUsingStarts))}moveNext(){let P=this._getSortedHighlights(),z=(P.findIndex(H=>H.containsPosition(this.editor.getPosition()))+1)%P.length,U=P[z];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(U.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(U);const H=this._getWord();if(H){const K=this.editor.getModel().getLineContent(U.startLineNumber);(0,t.alert)(`${K}, ${z+1} of ${P.length} for '${H.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){let P=this._getSortedHighlights(),z=(P.findIndex(H=>H.containsPosition(this.editor.getPosition()))-1+P.length)%P.length,U=P[z];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(U.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(U);const H=this._getWord();if(H){const K=this.editor.getModel().getLineContent(U.startLineNumber);(0,t.alert)(`${K}, ${z+1} of ${P.length} for '${H.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this._decorationIds.length>0&&(this._decorationIds=this.editor.deltaDecorations(this._decorationIds,[]),this._hasWordHighlights.set(!1))}_stopAll(){this._removeDecorations(),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(P){if(!this.occurrencesHighlight){this._stopAll();return}if(P.reason!==3){this._stopAll();return}this._run()}_getWord(){let P=this.editor.getSelection(),V=P.startLineNumber,z=P.startColumn;return this.model.getWordAtPosition({lineNumber:V,column:z})}_run(){let P=this.editor.getSelection();if(P.startLineNumber!==P.endLineNumber){this._stopAll();return}let V=P.startColumn,z=P.endColumn;const U=this._getWord();if(!U||U.startColumn>V||U.endColumn<z){this._stopAll();return}const H=this.workerRequest&&this.workerRequest.isValid(this.model,P,this._decorationIds);if(this.lastCursorPositionChangeTime=new Date().getTime(),H)this.workerRequestCompleted&&this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();let K=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=R(this.providers,this.model,this.editor.getSelection(),this.editor.getOption(117)),this.workerRequest.result.then(G=>{K===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=G||[],this._beginRenderDecorations())},k.onUnexpectedError)}}_beginRenderDecorations(){let P=new Date().getTime(),V=this.lastCursorPositionChangeTime+250;P>=V?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},V-P)}renderDecorations(){this.renderDecorationsTimer=-1;let P=[];for(const V of this.workerRequestValue)V.range&&P.push({range:V.range,options:O._getDecorationOptions(V.kind)});this._decorationIds=this.editor.deltaDecorations(this._decorationIds,P),this._hasWordHighlights.set(this.hasDecorations())}static _getDecorationOptions(P){return P===c.DocumentHighlightKind.Write?this._WRITE_OPTIONS:P===c.DocumentHighlightKind.Text?this._TEXT_OPTIONS:this._REGULAR_OPTIONS}dispose(){this._stopAll(),this.toUnhook.dispose()}}O._WRITE_OPTIONS=o.ModelDecorationOptions.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:(0,l.themeColorFromId)(d),position:C.OverviewRulerLane.Center},minimap:{color:(0,l.themeColorFromId)(s.minimapSelectionOccurrenceHighlight),position:C.MinimapPosition.Inline}}),O._TEXT_OPTIONS=o.ModelDecorationOptions.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight",overviewRuler:{color:(0,l.themeColorFromId)(s.overviewRulerSelectionHighlightForeground),position:C.OverviewRulerLane.Center},minimap:{color:(0,l.themeColorFromId)(s.minimapSelectionOccurrenceHighlight),position:C.MinimapPosition.Inline}}),O._REGULAR_OPTIONS=o.ModelDecorationOptions.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:(0,l.themeColorFromId)(g),position:C.OverviewRulerLane.Center},minimap:{color:(0,l.themeColorFromId)(s.minimapSelectionOccurrenceHighlight),position:C.MinimapPosition.Inline}});let x=class oo extends D.Disposable{constructor(P,V,z){super();this.wordHighlighter=null;const U=()=>{P.hasModel()&&(this.wordHighlighter=new O(P,z.documentHighlightProvider,V))};this._register(P.onDidChangeModel(H=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),U()})),U()}static get(P){return P.getContribution(oo.ID)}saveViewState(){return!!(this.wordHighlighter&&this.wordHighlighter.hasDecorations())}moveNext(){this.wordHighlighter&&this.wordHighlighter.moveNext()}moveBack(){this.wordHighlighter&&this.wordHighlighter.moveBack()}restoreViewState(P){this.wordHighlighter&&P&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};x.ID="editor.contrib.wordHighlighter",x=Ee([W(1,S.IContextKeyService),W(2,r.ILanguageFeaturesService)],x);class F extends I.EditorAction{constructor(P,V){super(V);this._isNext=P}run(P,V){const z=x.get(V);!z||(this._isNext?z.moveNext():z.moveBack())}}class L extends F{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:i.localize(6,null),alias:"Go to Next Symbol Highlight",precondition:m,kbOpts:{kbExpr:v.EditorContextKeys.editorTextFocus,primary:65,weight:100}})}}class M extends F{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:i.localize(7,null),alias:"Go to Previous Symbol Highlight",precondition:m,kbOpts:{kbExpr:v.EditorContextKeys.editorTextFocus,primary:1024|65,weight:100}})}}class N extends I.EditorAction{constructor(){super({id:"editor.action.wordHighlight.trigger",label:i.localize(8,null),alias:"Trigger Symbol Highlight",precondition:m.toNegated(),kbOpts:{kbExpr:v.EditorContextKeys.editorTextFocus,primary:0,weight:100}})}run(P,V,z){const U=x.get(V);!U||U.restoreViewState(!0)}}(0,I.registerEditorContribution)(x.ID,x),(0,I.registerEditorAction)(L),(0,I.registerEditorAction)(M),(0,I.registerEditorAction)(N),(0,l.registerThemingParticipant)((B,P)=>{const V=B.getColor(s.editorSelectionHighlight);V&&(P.addRule(`.monaco-editor .focused .selectionHighlight { background-color: ${V}; }`),P.addRule(`.monaco-editor .selectionHighlight { background-color: ${V.transparent(.5)}; }`));const z=B.getColor(u);z&&P.addRule(`.monaco-editor .wordHighlight { background-color: ${z}; }`);const U=B.getColor(a);U&&P.addRule(`.monaco-editor .wordHighlightStrong { background-color: ${U}; }`);const H=B.getColor(s.editorSelectionHighlightBorder);H&&P.addRule(`.monaco-editor .selectionHighlight { border: 1px ${(0,p.isHighContrast)(B.type)?"dotted":"solid"} ${H}; box-sizing: border-box; }`);const K=B.getColor(n);K&&P.addRule(`.monaco-editor .wordHighlight { border: 1px ${(0,p.isHighContrast)(B.type)?"dashed":"solid"} ${K}; box-sizing: border-box; }`);const G=B.getColor(h);G&&P.addRule(`.monaco-editor .wordHighlightStrong { border: 1px ${(0,p.isHighContrast)(B.type)?"dashed":"solid"} ${G}; box-sizing: border-box; }`)})}),define(ne[477],re([1,0,10,281,66,338,2,51,20,93,1043]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ZoneWidget=e.OverlayWidgetDelegate=e.ViewZoneDelegate=void 0;const v=new _.Color(new _.RGBA(0,122,204)),C={showArrow:!0,showFrame:!0,className:"",frameColor:v,arrowColor:v,keepEditorSelection:!1},o="vs.editor.contrib.zoneWidget";class c{constructor(r,p,u,a,n,h){this.id="",this.domNode=r,this.afterLineNumber=p,this.afterColumn=u,this.heightInLines=a,this._onDomNodeTop=n,this._onComputedHeight=h}onDomNodeTop(r){this._onDomNodeTop(r)}onComputedHeight(r){this._onComputedHeight(r)}}e.ViewZoneDelegate=c;class i{constructor(r,p){this._id=r,this._domNode=p}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}e.OverlayWidgetDelegate=i;class S{constructor(r){this._editor=r,this._ruleName=S._IdGenerator.nextId(),this._decorations=[],this._color=null,this._height=-1}dispose(){this.hide(),t.removeCSSRulesContainingSelector(this._ruleName)}set color(r){this._color!==r&&(this._color=r,this._updateStyle())}set height(r){this._height!==r&&(this._height=r,this._updateStyle())}_updateStyle(){t.removeCSSRulesContainingSelector(this._ruleName),t.createCSSRule(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(r){r.column===1&&(r={lineNumber:r.lineNumber,column:2}),this._decorations=this._editor.deltaDecorations(this._decorations,[{range:I.Range.fromPositions(r),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._editor.deltaDecorations(this._decorations,[])}}S._IdGenerator=new A.IdGenerator(".arrow-decoration-");class s{constructor(r,p={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._positionMarkerId=[],this._viewZone=null,this._disposables=new k.DisposableStore,this.container=null,this._isShowing=!1,this.editor=r,this.options=D.deepClone(p),D.mixin(this.options,C,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange(u=>{const a=this._getWidth(u);this.domNode.style.width=a+"px",this.domNode.style.left=this._getLeft(u)+"px",this._onWidth(a)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(r=>{this._viewZone&&r.removeZone(this._viewZone.id),this._viewZone=null}),this.editor.deltaDecorations(this._positionMarkerId,[]),this._positionMarkerId=[],this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new S(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(r){r.frameColor&&(this.options.frameColor=r.frameColor),r.arrowColor&&(this.options.arrowColor=r.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){let r=this.options.frameColor.toString();this.container.style.borderTopColor=r,this.container.style.borderBottomColor=r}if(this._arrow&&this.options.arrowColor){let r=this.options.arrowColor.toString();this._arrow.color=r}}_getWidth(r){return r.width-r.minimap.minimapWidth-r.verticalScrollbarWidth}_getLeft(r){return r.minimap.minimapWidth>0&&r.minimap.minimapLeft===0?r.minimap.minimapWidth:0}_onViewZoneTop(r){this.domNode.style.top=r+"px"}_onViewZoneHeight(r){if(this.domNode.style.height=`${r}px`,this.container){let p=r-this._decoratingElementsHeight();this.container.style.height=`${p}px`;const u=this.editor.getLayoutInfo();this._doLayout(p,this._getWidth(u))}this._resizeSash&&this._resizeSash.layout()}get position(){const[r]=this._positionMarkerId;if(!r)return;const p=this.editor.getModel();if(!p)return;const u=p.getDecorationRange(r);if(!!u)return u.getStartPosition()}show(r,p){const u=I.Range.isIRange(r)?I.Range.lift(r):I.Range.fromPositions(r);this._isShowing=!0,this._showImpl(u,p),this._isShowing=!1,this._positionMarkerId=this.editor.deltaDecorations(this._positionMarkerId,[{range:u,options:w.ModelDecorationOptions.EMPTY}])}hide(){this._viewZone&&(this.editor.changeViewZones(r=>{this._viewZone&&r.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow&&this._arrow.hide()}_decoratingElementsHeight(){let r=this.editor.getOption(59),p=0;if(this.options.showArrow){let u=Math.round(r/3);p+=2*u}if(this.options.showFrame){let u=Math.round(r/9);p+=2*u}return p}_showImpl(r,p){const u=r.getStartPosition(),a=this.editor.getLayoutInfo(),n=this._getWidth(a);this.domNode.style.width=`${n}px`,this.domNode.style.left=this._getLeft(a)+"px";const h=document.createElement("div");h.style.overflow="hidden";const g=this.editor.getOption(59),d=Math.max(12,this.editor.getLayoutInfo().height/g*.8);p=Math.min(p,d);let m=0,b=0;if(this._arrow&&this.options.showArrow&&(m=Math.round(g/3),this._arrow.height=m,this._arrow.show(u)),this.options.showFrame&&(b=Math.round(g/9)),this.editor.changeViewZones(T=>{this._viewZone&&T.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new c(h,u.lineNumber,u.column,p,R=>this._onViewZoneTop(R),R=>this._onViewZoneHeight(R)),this._viewZone.id=T.addZone(this._viewZone),this._overlayWidget=new i(o+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const T=this.options.frameWidth?this.options.frameWidth:b;this.container.style.borderTopWidth=T+"px",this.container.style.borderBottomWidth=T+"px"}let E=p*g-this._decoratingElementsHeight();this.container&&(this.container.style.top=m+"px",this.container.style.height=E+"px",this.container.style.overflow="hidden"),this._doLayout(E,n),this.options.keepEditorSelection||this.editor.setSelection(r);const y=this.editor.getModel();if(y){const T=r.endLineNumber+1;T<=y.getLineCount()?this.revealLine(T,!1):this.revealLine(y.getLineCount(),!0)}}revealLine(r,p){p?this.editor.revealLineInCenter(r,0):this.editor.revealLine(r,0)}setCssClass(r,p){!this.container||(p&&this.container.classList.remove(p),this.container.classList.add(r))}_onWidth(r){}_doLayout(r,p){}_relayout(r){this._viewZone&&this._viewZone.heightInLines!==r&&this.editor.changeViewZones(p=>{this._viewZone&&(this._viewZone.heightInLines=r,p.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new f.Sash(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let r;this._disposables.add(this._resizeSash.onDidStart(p=>{this._viewZone&&(r={startY:p.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{r=void 0})),this._disposables.add(this._resizeSash.onDidChange(p=>{if(r){let u=(p.currentY-r.startY)/this.editor.getOption(59),a=u<0?Math.ceil(u):Math.floor(u),n=r.heightInLines+a;n>5&&n<35&&this._relayout(n)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const r=this.editor.getLayoutInfo();return r.width-r.minimap.minimapWidth}}e.ZoneWidget=s}),define(ne[172],re([1,0,10,78,36,33,66,6,51,39,72,229,477,1297,73,7,35,5,32,1037]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.peekViewEditorMatchHighlightBorder=e.peekViewEditorMatchHighlight=e.peekViewResultsMatchHighlight=e.peekViewEditorGutterBackground=e.peekViewEditorBackground=e.peekViewResultsSelectionForeground=e.peekViewResultsSelectionBackground=e.peekViewResultsFileForeground=e.peekViewResultsMatchForeground=e.peekViewResultsBackground=e.peekViewBorder=e.peekViewTitleInfoForeground=e.peekViewTitleForeground=e.peekViewTitleBackground=e.PeekViewWidget=e.getOuterEditor=e.PeekContext=e.IPeekViewService=void 0,e.IPeekViewService=(0,l.createDecorator)("IPeekViewService"),(0,s.registerSingleton)(e.IPeekViewService,class{constructor(){this._widgets=new Map}addExclusiveWidget(g,d){const m=this._widgets.get(g);m&&(m.listener.dispose(),m.widget.dispose());const b=()=>{const E=this._widgets.get(g);E&&E.widget===d&&(E.listener.dispose(),this._widgets.delete(g))};this._widgets.set(g,{widget:d,listener:d.onDidClose(b)})}});var p;(function(g){g.inPeekEditor=new S.RawContextKey("inReferenceSearchEditor",!0,c.localize(0,null)),g.notInPeekEditor=g.inPeekEditor.toNegated()})(p=e.PeekContext||(e.PeekContext={}));let u=class{constructor(d,m){d instanceof C.EmbeddedCodeEditorWidget&&p.inPeekEditor.bindTo(m)}dispose(){}};u.ID="editor.contrib.referenceController",u=Ee([W(1,S.IContextKeyService)],u),(0,w.registerEditorContribution)(u.ID,u);function a(g){let d=g.get(v.ICodeEditorService).getFocusedCodeEditor();return d instanceof C.EmbeddedCodeEditorWidget?d.getParentEditor():d}e.getOuterEditor=a;const n={headerBackgroundColor:k.Color.white,primaryHeadingColor:k.Color.fromHex("#333333"),secondaryHeadingColor:k.Color.fromHex("#6c6c6cb3")};let h=class extends o.ZoneWidget{constructor(d,m,b){super(d,m);this.instantiationService=b,this._onDidClose=new D.Emitter,this.onDidClose=this._onDidClose.event,I.mixin(this.options,n,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(d){let m=this.options;d.headerBackgroundColor&&(m.headerBackgroundColor=d.headerBackgroundColor),d.primaryHeadingColor&&(m.primaryHeadingColor=d.primaryHeadingColor),d.secondaryHeadingColor&&(m.secondaryHeadingColor=d.secondaryHeadingColor),super.style(d)}_applyStyles(){super._applyStyles();let d=this.options;this._headElement&&d.headerBackgroundColor&&(this._headElement.style.backgroundColor=d.headerBackgroundColor.toString()),this._primaryHeading&&d.primaryHeadingColor&&(this._primaryHeading.style.color=d.primaryHeadingColor.toString()),this._secondaryHeading&&d.secondaryHeadingColor&&(this._secondaryHeading.style.color=d.secondaryHeadingColor.toString()),this._bodyElement&&d.frameColor&&(this._bodyElement.style.borderColor=d.frameColor.toString())}_fillContainer(d){this.setCssClass("peekview-widget"),this._headElement=t.$(".head"),this._bodyElement=t.$(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),d.appendChild(this._headElement),d.appendChild(this._bodyElement)}_fillHead(d,m){const b=t.$(".peekview-title");this.options.supportOnTitleClick&&(b.classList.add("clickable"),t.addStandardDisposableListener(b,"click",T=>this._onTitleClick(T))),t.append(this._headElement,b),this._fillTitleIcon(b),this._primaryHeading=t.$("span.filename"),this._secondaryHeading=t.$("span.dirname"),this._metaHeading=t.$("span.meta"),t.append(b,this._primaryHeading,this._secondaryHeading,this._metaHeading);const E=t.$(".peekview-actions");t.append(this._headElement,E);const y=this._getActionBarOptions();this._actionbarWidget=new f.ActionBar(E,y),this._disposables.add(this._actionbarWidget),m||this._actionbarWidget.push(new _.Action("peekview.close",c.localize(1,null),A.Codicon.close.classNames,!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(d){}_getActionBarOptions(){return{actionViewItemProvider:i.createActionViewItem.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(d){}setTitle(d,m){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=d,this._primaryHeading.setAttribute("title",d),m?this._secondaryHeading.innerText=m:t.clearNode(this._secondaryHeading))}setMetaTitle(d){this._metaHeading&&(d?(this._metaHeading.innerText=d,t.show(this._metaHeading)):t.hide(this._metaHeading))}_doLayout(d,m){if(!this._isShowing&&d<0){this.dispose();return}const b=Math.ceil(this.editor.getOption(59)*1.2),E=Math.round(d-(b+2));this._doLayoutHead(b,m),this._doLayoutBody(E,m)}_doLayoutHead(d,m){this._headElement&&(this._headElement.style.height=`${d}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(d,m){this._bodyElement&&(this._bodyElement.style.height=`${d}px`)}};h=Ee([W(2,l.IInstantiationService)],h),e.PeekViewWidget=h,e.peekViewTitleBackground=(0,r.registerColor)("peekViewTitle.background",{dark:(0,r.transparent)(r.editorInfoForeground,.1),light:(0,r.transparent)(r.editorInfoForeground,.1),hcDark:null,hcLight:null},c.localize(2,null)),e.peekViewTitleForeground=(0,r.registerColor)("peekViewTitleLabel.foreground",{dark:k.Color.white,light:k.Color.black,hcDark:k.Color.white,hcLight:r.editorForeground},c.localize(3,null)),e.peekViewTitleInfoForeground=(0,r.registerColor)("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},c.localize(4,null)),e.peekViewBorder=(0,r.registerColor)("peekView.border",{dark:r.editorInfoForeground,light:r.editorInfoForeground,hcDark:r.contrastBorder,hcLight:r.contrastBorder},c.localize(5,null)),e.peekViewResultsBackground=(0,r.registerColor)("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:k.Color.black,hcLight:k.Color.white},c.localize(6,null)),e.peekViewResultsMatchForeground=(0,r.registerColor)("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:k.Color.white,hcLight:r.editorForeground},c.localize(7,null)),e.peekViewResultsFileForeground=(0,r.registerColor)("peekViewResult.fileForeground",{dark:k.Color.white,light:"#1E1E1E",hcDark:k.Color.white,hcLight:r.editorForeground},c.localize(8,null)),e.peekViewResultsSelectionBackground=(0,r.registerColor)("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},c.localize(9,null)),e.peekViewResultsSelectionForeground=(0,r.registerColor)("peekViewResult.selectionForeground",{dark:k.Color.white,light:"#6C6C6C",hcDark:k.Color.white,hcLight:r.editorForeground},c.localize(10,null)),e.peekViewEditorBackground=(0,r.registerColor)("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:k.Color.black,hcLight:k.Color.white},c.localize(11,null)),e.peekViewEditorGutterBackground=(0,r.registerColor)("peekViewEditorGutter.background",{dark:e.peekViewEditorBackground,light:e.peekViewEditorBackground,hcDark:e.peekViewEditorBackground,hcLight:e.peekViewEditorBackground},c.localize(12,null)),e.peekViewResultsMatchHighlight=(0,r.registerColor)("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},c.localize(13,null)),e.peekViewEditorMatchHighlight=(0,r.registerColor)("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},c.localize(14,null)),e.peekViewEditorMatchHighlightBorder=(0,r.registerColor)("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:r.activeContrastBorder,hcLight:r.activeContrastBorder},c.localize(15,null))}),define(ne[2077],re([1,0,10,139,15,66,6,111,2,19,29,20,172,1273,73,16,7,5,45,125,41,474,32,12,1030]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.editorMarkerNavigationBackground=e.editorMarkerNavigationInfoHeader=e.editorMarkerNavigationInfo=e.editorMarkerNavigationWarningHeader=e.editorMarkerNavigationWarning=e.editorMarkerNavigationErrorHeader=e.editorMarkerNavigationError=e.MarkerNavigationWidget=void 0;class g{constructor(T,R,O,x,F){this._openerService=x,this._labelService=F,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new I.DisposableStore,this._editor=R;const L=document.createElement("div");L.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),L.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),L.appendChild(this._relatedBlock),this._disposables.add(t.addStandardDisposableListener(this._relatedBlock,"click",M=>{M.preventDefault();const N=this._relatedDiagnostics.get(M.target);N&&O(N)})),this._scrollable=new f.ScrollableElement(L,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),T.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(M=>{L.style.left=`-${M.scrollLeft}px`,L.style.top=`-${M.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){(0,I.dispose)(this._disposables)}update(T){const{source:R,message:O,relatedInformation:x,code:F}=T;let L=(R?.length||0)+"()".length;F&&(typeof F=="string"?L+=F.length:L+=F.value.length);const M=(0,v.splitLines)(O);this._lines=M.length,this._longestLineLength=0;for(const z of M)this._longestLineLength=Math.max(z.length+L,this._longestLineLength);t.clearNode(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(T)),this._editor.applyFontInfo(this._messageBlock);let N=this._messageBlock;for(const z of M)N=document.createElement("div"),N.innerText=z,z===""&&(N.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(N);if(R||F){const z=document.createElement("span");if(z.classList.add("details"),N.appendChild(z),R){const U=document.createElement("span");U.innerText=R,U.classList.add("source"),z.appendChild(U)}if(F)if(typeof F=="string"){const U=document.createElement("span");U.innerText=`(${F})`,U.classList.add("code"),z.appendChild(U)}else{this._codeLink=t.$("a.code-link"),this._codeLink.setAttribute("href",`${F.target.toString()}`),this._codeLink.onclick=H=>{this._openerService.open(F.target,{allowCommands:!0}),H.preventDefault(),H.stopPropagation()};const U=t.append(this._codeLink,t.$("span"));U.innerText=F.value,z.appendChild(this._codeLink)}}if(t.clearNode(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),(0,_.isNonEmptyArray)(x)){const z=this._relatedBlock.appendChild(document.createElement("div"));z.style.paddingTop=`${Math.floor(this._editor.getOption(59)*.66)}px`,this._lines+=1;for(const U of x){let H=document.createElement("div"),K=document.createElement("a");K.classList.add("filename"),K.innerText=`${(0,D.getBaseLabel)(U.resource)}(${U.startLineNumber}, ${U.startColumn}): `,K.title=this._labelService.getUriLabel(U.resource),this._relatedDiagnostics.set(K,U);let G=document.createElement("span");G.innerText=U.message,H.appendChild(K),H.appendChild(G),this._lines+=1,z.appendChild(H)}}const B=this._editor.getOption(44),P=Math.ceil(B.typicalFullwidthCharacterWidth*this._longestLineLength*.75),V=B.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:P,scrollHeight:V})}layout(T,R){this._scrollable.getDomNode().style.height=`${T}px`,this._scrollable.getDomNode().style.width=`${R}px`,this._scrollable.setScrollDimensions({width:R,height:T})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(T){let R="";switch(T.severity){case p.MarkerSeverity.Error:R=c.localize(0,null);break;case p.MarkerSeverity.Warning:R=c.localize(1,null);break;case p.MarkerSeverity.Info:R=c.localize(2,null);break;case p.MarkerSeverity.Hint:R=c.localize(3,null);break}let O=c.localize(4,null,R,T.startLineNumber+":"+T.startColumn);const x=this._editor.getModel();return x&&T.startLineNumber<=x.getLineCount()&&T.startLineNumber>=1&&(O=`${x.getLineContent(T.startLineNumber)}, ${O}`),O}}let d=class ao extends o.PeekViewWidget{constructor(T,R,O,x,F,L,M){super(T,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},F);this._themeService=R,this._openerService=O,this._menuService=x,this._contextKeyService=L,this._labelService=M,this._callOnDispose=new I.DisposableStore,this._onDidSelectRelatedInformation=new k.Emitter,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=p.MarkerSeverity.Warning,this._backgroundColor=A.Color.white,this._applyTheme(R.getColorTheme()),this._callOnDispose.add(R.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(T){this._backgroundColor=T.getColor(e.editorMarkerNavigationBackground);let R=e.editorMarkerNavigationError,O=e.editorMarkerNavigationErrorHeader;this._severity===p.MarkerSeverity.Warning?(R=e.editorMarkerNavigationWarning,O=e.editorMarkerNavigationWarningHeader):this._severity===p.MarkerSeverity.Info&&(R=e.editorMarkerNavigationInfo,O=e.editorMarkerNavigationInfoHeader);const x=T.getColor(R),F=T.getColor(O);this.style({arrowColor:x,frameColor:x,headerBackgroundColor:F,primaryHeadingColor:T.getColor(o.peekViewTitleForeground),secondaryHeadingColor:T.getColor(o.peekViewTitleInfoForeground)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}focus(){this._parentContainer.focus()}_fillHead(T){super._fillHead(T),this._disposables.add(this._actionbarWidget.actionRunner.onBeforeRun(x=>this.editor.focus()));const R=[],O=this._menuService.createMenu(ao.TitleMenu,this._contextKeyService);(0,i.createAndFillInActionBarActions)(O,void 0,R),this._actionbarWidget.push(R,{label:!1,icon:!0,index:0}),O.dispose()}_fillTitleIcon(T){this._icon=t.append(T,t.$(""))}_fillBody(T){this._parentContainer=T,T.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),T.appendChild(this._container),this._message=new g(this._container,this.editor,R=>this._onDidSelectRelatedInformation.fire(R),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(T,R,O){this._container.classList.remove("stale"),this._message.update(T),this._severity=T.severity,this._applyTheme(this._themeService.getColorTheme());let x=C.Range.lift(T);const F=this.editor.getPosition();let L=F&&x.containsPosition(F)?F:x.getStartPosition();super.show(L,this.computeRequiredHeight());const M=this.editor.getModel();if(M){const N=O>1?c.localize(5,null,R,O):c.localize(6,null,R,O);this.setTitle((0,w.basename)(M.uri),N)}this._icon.className=`codicon ${a.SeverityIcon.className(p.MarkerSeverity.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(L,0),this.editor.focus()}updateMarker(T){this._container.classList.remove("stale"),this._message.update(T)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(T,R){super._doLayoutBody(T,R),this._heightInPixel=T,this._message.layout(T,R),this._container.style.height=`${T}px`}_onWidth(T){this._message.layout(this._heightInPixel,T)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};d.TitleMenu=new S.MenuId("gotoErrorTitleMenu"),d=Ee([W(1,h.IThemeService),W(2,u.IOpenerService),W(3,S.IMenuService),W(4,l.IInstantiationService),W(5,s.IContextKeyService),W(6,r.ILabelService)],d),e.MarkerNavigationWidget=d;let m=(0,n.oneOf)(n.editorErrorForeground,n.editorErrorBorder),b=(0,n.oneOf)(n.editorWarningForeground,n.editorWarningBorder),E=(0,n.oneOf)(n.editorInfoForeground,n.editorInfoBorder);e.editorMarkerNavigationError=(0,n.registerColor)("editorMarkerNavigationError.background",{dark:m,light:m,hcDark:n.contrastBorder,hcLight:n.contrastBorder},c.localize(7,null)),e.editorMarkerNavigationErrorHeader=(0,n.registerColor)("editorMarkerNavigationError.headerBackground",{dark:(0,n.transparent)(e.editorMarkerNavigationError,.1),light:(0,n.transparent)(e.editorMarkerNavigationError,.1),hcDark:null,hcLight:null},c.localize(8,null)),e.editorMarkerNavigationWarning=(0,n.registerColor)("editorMarkerNavigationWarning.background",{dark:b,light:b,hcDark:n.contrastBorder,hcLight:n.contrastBorder},c.localize(9,null)),e.editorMarkerNavigationWarningHeader=(0,n.registerColor)("editorMarkerNavigationWarning.headerBackground",{dark:(0,n.transparent)(e.editorMarkerNavigationWarning,.1),light:(0,n.transparent)(e.editorMarkerNavigationWarning,.1),hcDark:"#0C141F",hcLight:(0,n.transparent)(e.editorMarkerNavigationWarning,.2)},c.localize(10,null)),e.editorMarkerNavigationInfo=(0,n.registerColor)("editorMarkerNavigationInfo.background",{dark:E,light:E,hcDark:n.contrastBorder,hcLight:n.contrastBorder},c.localize(11,null)),e.editorMarkerNavigationInfoHeader=(0,n.registerColor)("editorMarkerNavigationInfo.headerBackground",{dark:(0,n.transparent)(e.editorMarkerNavigationInfo,.1),light:(0,n.transparent)(e.editorMarkerNavigationInfo,.1),hcDark:null,hcLight:null},c.localize(12,null)),e.editorMarkerNavigationBackground=(0,n.registerColor)("editorMarkerNavigation.background",{dark:n.editorBackground,light:n.editorBackground,hcDark:n.editorBackground,hcLight:n.editorBackground},c.localize(13,null))}),define(ne[560],re([1,0,33,2,39,72,49,20,58,738,1272,16,7,5,63,2077]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NextMarkerAction=e.MarkerController=void 0;let s=class On{constructor(d,m,b,E,y){this._markerNavigationService=m,this._contextKeyService=b,this._editorService=E,this._instantiationService=y,this._sessionDispoables=new f.DisposableStore,this._editor=d,this._widgetVisible=n.bindTo(this._contextKeyService)}static get(d){return d.getContribution(On.ID)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(d){if(this._model&&this._model.matches(d))return this._model;let m=!1;return this._model&&(m=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(d),m&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(S.MarkerNavigationWidget,this._editor),this._widget.onDidClose(()=>this.close(),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(b=>{(!this._model?.selected||!D.Range.containsPosition(this._model?.selected.marker,b.position))&&this._model?.resetIndex()})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const b=this._model.find(this._editor.getModel().uri,this._widget.position);b?this._widget.updateMarker(b.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(b=>{this._editorService.openCodeEditor({resource:b.resource,options:{pinned:!0,revealIfOpened:!0,selection:D.Range.lift(b).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(d=!0){this._cleanUp(),d&&this._editor.focus()}showAtMarker(d){if(this._editor.hasModel()){const m=this._getOrCreateModel(this._editor.getModel().uri);m.resetIndex(),m.move(!0,this._editor.getModel(),new k.Position(d.startLineNumber,d.startColumn)),m.selected&&this._widget.showAtMarker(m.selected.marker,m.selected.index,m.selected.total)}}async nagivate(d,m){if(this._editor.hasModel()){const b=this._getOrCreateModel(m?void 0:this._editor.getModel().uri);if(b.move(d,this._editor.getModel(),this._editor.getPosition()),!b.selected)return;if(b.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const E=await this._editorService.openCodeEditor({resource:b.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:b.selected.marker}},this._editor);E&&(On.get(E)?.close(),On.get(E)?.nagivate(d,m))}else this._widget.showAtMarker(b.selected.marker,b.selected.index,b.selected.total)}}};s.ID="editor.contrib.markerController",s=Ee([W(1,w.IMarkerNavigationService),W(2,o.IContextKeyService),W(3,A.ICodeEditorService),W(4,c.IInstantiationService)],s),e.MarkerController=s;class l extends _.EditorAction{constructor(d,m,b){super(b);this._next=d,this._multiFile=m}async run(d,m){m.hasModel()&&s.get(m)?.nagivate(this._next,this._multiFile)}}class r extends l{constructor(){super(!0,!1,{id:r.ID,label:r.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:I.EditorContextKeys.focus,primary:512|66,weight:100},menuOpts:{menuId:S.MarkerNavigationWidget.TitleMenu,title:r.LABEL,icon:(0,i.registerIcon)("marker-navigation-next",t.Codicon.arrowDown,v.localize(1,null)),group:"navigation",order:1}})}}e.NextMarkerAction=r,r.ID="editor.action.marker.next",r.LABEL=v.localize(0,null);class p extends l{constructor(){super(!1,!1,{id:p.ID,label:p.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:I.EditorContextKeys.focus,primary:1024|512|66,weight:100},menuOpts:{menuId:S.MarkerNavigationWidget.TitleMenu,title:p.LABEL,icon:(0,i.registerIcon)("marker-navigation-previous",t.Codicon.arrowUp,v.localize(3,null)),group:"navigation",order:2}})}}p.ID="editor.action.marker.prev",p.LABEL=v.localize(2,null);class u extends l{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:v.localize(4,null),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:I.EditorContextKeys.focus,primary:66,weight:100},menuOpts:{menuId:C.MenuId.MenubarGoMenu,title:v.localize(5,null),group:"6_problem_nav",order:1}})}}class a extends l{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:v.localize(6,null),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:I.EditorContextKeys.focus,primary:1024|66,weight:100},menuOpts:{menuId:C.MenuId.MenubarGoMenu,title:v.localize(7,null),group:"6_problem_nav",order:2}})}}(0,_.registerEditorContribution)(s.ID,s),(0,_.registerEditorAction)(r),(0,_.registerEditorAction)(p),(0,_.registerEditorAction)(u),(0,_.registerEditorAction)(a);const n=new o.RawContextKey("markersNavigationVisible",!1),h=_.EditorCommand.bindToContribution(s.get);(0,_.registerEditorCommand)(new h({id:"closeMarkersNavigation",precondition:n,handler:g=>g.close(),kbOpts:{weight:100+50,kbExpr:I.EditorContextKeys.focus,primary:9,secondary:[1024|9]}}))}),define(ne[2078],re([1,0,10,209,66,6,2,18,19,229,20,93,124,126,42,61,2025,172,1278,5,38,45,71,12,147,395,1032]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReferenceWidget=e.LayoutData=void 0;class m{constructor(R,O){this._editor=R,this._model=O,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new k.DisposableStore,this._callOnModelChange=new k.DisposableStore,this._callOnDispose.add(this._editor.onDidChangeModel(()=>this._onModelChanged())),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const R=this._editor.getModel();if(!!R){for(let O of this._model.references)if(O.uri.toString()===R.uri.toString()){this._addDecorations(O.parent);return}}}_addDecorations(R){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const O=[],x=[];for(let L=0,M=R.children.length;L<M;L++){let N=R.children[L];this._decorationIgnoreSet.has(N.id)||N.uri.toString()===this._editor.getModel().uri.toString()&&(O.push({range:N.range,options:m.DecorationOptions}),x.push(L))}const F=this._editor.deltaDecorations([],O);for(let L=0;L<F.length;L++)this._decorations.set(F[L],R.children[x[L]])}_onDecorationChanged(){const R=[],O=this._editor.getModel();if(!!O){for(let[x,F]of this._decorations){const L=O.getDecorationRange(x);if(!L)continue;let M=!1;if(!v.Range.equalsRange(L,F.range)){if(v.Range.spansMultipleLines(L))M=!0;else{const N=F.range.endColumn-F.range.startColumn,B=L.endColumn-L.startColumn;N!==B&&(M=!0)}M?(this._decorationIgnoreSet.add(F.id),R.push(x)):F.range=L}}for(let x=0,F=R.length;x<F;x++)this._decorations.delete(R[x]);this._editor.deltaDecorations(R,[])}}removeDecorations(){this._editor.deltaDecorations([...this._decorations.keys()],[]),this._decorations.clear()}}m.DecorationOptions=C.ModelDecorationOptions.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"});class b{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(R){let O,x;try{const F=JSON.parse(R);O=F.ratio,x=F.heightInLines}catch{}return{ratio:O||.7,heightInLines:x||18}}}e.LayoutData=b;class E extends n.WorkbenchAsyncDataTree{}let y=class extends l.PeekViewWidget{constructor(R,O,x,F,L,M,N,B,P,V,z,U){super(R,{showFrame:!1,showArrow:!0,isResizeable:!0,isAccessible:!0,supportOnTitleClick:!0},M);this._defaultTreeKeyboardSupport=O,this.layoutData=x,this._textModelResolverService=L,this._instantiationService=M,this._peekViewService=N,this._uriLabel=B,this._undoRedoService=P,this._keybindingService=V,this._languageService=z,this._languageConfigurationService=U,this._disposeOnNewModel=new k.DisposableStore,this._callOnDispose=new k.DisposableStore,this._onDidSelectReference=new A.Emitter,this.onDidSelectReference=this._onDidSelectReference.event,this._dim=new t.Dimension(0,0),this._applyTheme(F.getColorTheme()),this._callOnDispose.add(F.onDidColorThemeChange(this._applyTheme.bind(this))),this._peekViewService.addExclusiveWidget(R,this),this.create()}dispose(){this.setModel(void 0),this._callOnDispose.dispose(),this._disposeOnNewModel.dispose(),(0,k.dispose)(this._preview),(0,k.dispose)(this._previewNotAvailableMessage),(0,k.dispose)(this._tree),(0,k.dispose)(this._previewModelReference),this._splitView.dispose(),super.dispose()}_applyTheme(R){const O=R.getColor(l.peekViewBorder)||_.Color.transparent;this.style({arrowColor:O,frameColor:O,headerBackgroundColor:R.getColor(l.peekViewTitleBackground)||_.Color.transparent,primaryHeadingColor:R.getColor(l.peekViewTitleForeground),secondaryHeadingColor:R.getColor(l.peekViewTitleInfoForeground)})}show(R){this.editor.revealRangeInCenterIfOutsideViewport(R,0),super.show(R,this.layoutData.heightInLines||18)}focusOnReferenceTree(){this._tree.domFocus()}focusOnPreviewEditor(){this._preview.focus()}isPreviewEditorFocused(){return this._preview.hasTextFocus()}_onTitleClick(R){this._preview&&this._preview.getModel()&&this._onDidSelectReference.fire({element:this._getFocusedReference(),kind:R.ctrlKey||R.metaKey||R.altKey?"side":"open",source:"title"})}_fillBody(R){this.setCssClass("reference-zone-widget"),this._messageContainer=t.append(R,t.$("div.messages")),t.hide(this._messageContainer),this._splitView=new f.SplitView(R,{orientation:1}),this._previewContainer=t.append(R,t.$("div.preview.inline"));let O={scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!1},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1}};this._preview=this._instantiationService.createInstance(w.EmbeddedCodeEditorWidget,this._previewContainer,O,this.editor),t.hide(this._previewContainer),this._previewNotAvailableMessage=new C.TextModel(r.localize(0,null),c.PLAINTEXT_LANGUAGE_ID,C.TextModel.DEFAULT_CREATION_OPTIONS,null,this._undoRedoService,this._languageService,this._languageConfigurationService),this._treeContainer=t.append(R,t.$("div.ref-tree.inline"));const x={keyboardSupport:this._defaultTreeKeyboardSupport,accessibilityProvider:new s.AccessibilityProvider,keyboardNavigationLabelProvider:this._instantiationService.createInstance(s.StringRepresentationProvider),identityProvider:new s.IdentityProvider,openOnSingleClick:!0,selectionNavigation:!0,overrideStyles:{listBackground:l.peekViewResultsBackground}};this._defaultTreeKeyboardSupport&&this._callOnDispose.add(t.addStandardDisposableListener(this._treeContainer,"keydown",L=>{L.equals(9)&&(this._keybindingService.dispatchEvent(L,L.target),L.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(E,"ReferencesWidget",this._treeContainer,new s.Delegate,[this._instantiationService.createInstance(s.FileReferencesRenderer),this._instantiationService.createInstance(s.OneReferenceRenderer)],this._instantiationService.createInstance(s.DataSource),x),this._splitView.addView({onDidChange:A.Event.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:L=>{this._preview.layout({height:this._dim.height,width:L})}},f.Sizing.Distribute),this._splitView.addView({onDidChange:A.Event.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:L=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${L}px`,this._tree.layout(this._dim.height,L)}},f.Sizing.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));let F=(L,M)=>{L instanceof d.OneReference&&(M==="show"&&this._revealReference(L,!1),this._onDidSelectReference.fire({element:L,kind:M,source:"tree"}))};this._tree.onDidOpen(L=>{L.sideBySide?F(L.element,"side"):L.editorOptions.pinned?F(L.element,"goto"):F(L.element,"show")}),t.hide(this._treeContainer)}_onWidth(R){this._dim&&this._doLayoutBody(this._dim.height,R)}_doLayoutBody(R,O){super._doLayoutBody(R,O),this._dim=new t.Dimension(O,R),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(O),this._splitView.resizeView(0,O*this.layoutData.ratio)}setSelection(R){return this._revealReference(R,!0).then(()=>{!this._model||(this._tree.setSelection([R]),this._tree.setFocus([R]))})}setModel(R){return this._disposeOnNewModel.clear(),this._model=R,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=r.localize(1,null),t.show(this._messageContainer),Promise.resolve(void 0)):(t.hide(this._messageContainer),this._decorationsManager=new m(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(R=>this._tree.rerender(R))),this._disposeOnNewModel.add(this._preview.onMouseDown(R=>{const{event:O,target:x}=R;if(O.detail!==2)return;const F=this._getFocusedReference();!F||this._onDidSelectReference.fire({element:{uri:F.uri,range:x.range},kind:O.ctrlKey||O.metaKey||O.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),t.show(this._treeContainer),t.show(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[R]=this._tree.getFocus();if(R instanceof d.OneReference)return R;if(R instanceof d.FileReferences&&R.children.length>0)return R.children[0]}async revealReference(R){await this._revealReference(R,!1),this._onDidSelectReference.fire({element:R,kind:"goto",source:"tree"})}async _revealReference(R,O){if(this._revealedReference===R)return;this._revealedReference=R,R.uri.scheme!==D.Schemas.inMemory?this.setTitle((0,I.basenameOrAuthority)(R.uri),this._uriLabel.getUriLabel((0,I.dirname)(R.uri))):this.setTitle(r.localize(2,null));const x=this._textModelResolverService.createModelReference(R.uri);this._tree.getInput()===R.parent?this._tree.reveal(R):(O&&this._tree.reveal(R.parent),await this._tree.expand(R.parent),this._tree.reveal(R));const F=await x;if(!this._model){F.dispose();return}(0,k.dispose)(this._previewModelReference);const L=F.object;if(L){const M=this._preview.getModel()===L.textEditorModel?0:1,N=v.Range.lift(R.range).collapseToStart();this._previewModelReference=F,this._preview.setModel(L.textEditorModel),this._preview.setSelection(N),this._preview.revealRangeInCenter(N,M)}else this._preview.setModel(this._previewNotAvailableMessage),F.dispose()}};y=Ee([W(3,h.IThemeService),W(4,S.ITextModelService),W(5,p.IInstantiationService),W(6,l.IPeekViewService),W(7,a.ILabelService),W(8,g.IUndoRedoService),W(9,u.IKeybindingService),W(10,i.ILanguageService),W(11,o.ILanguageConfigurationService)],y),e.ReferenceWidget=y}),define(ne[561],re([1,0,11,22,97,2,72,49,20,172,1276,28,8,7,5,94,71,26,24,395,2078]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReferencesController=e.ctxReferenceSearchVisible=void 0,e.ctxReferenceSearchVisible=new c.RawContextKey("referenceSearchVisible",!1,v.localize(0,null));let a=class br{constructor(g,d,m,b,E,y,T,R){this._defaultTreeKeyboardSupport=g,this._editor=d,this._editorService=b,this._notificationService=E,this._instantiationService=y,this._storageService=T,this._configurationService=R,this._disposables=new A.DisposableStore,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=e.ctxReferenceSearchVisible.bindTo(m)}static get(g){return g.getContribution(br.ID)}dispose(){this._referenceSearchVisible.reset(),this._disposables.dispose(),this._widget?.dispose(),this._model?.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(g,d,m){let b;if(this._widget&&(b=this._widget.position),this.closeWidget(),!!b&&g.containsPosition(b))return;this._peekMode=m,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));const E="peekViewLayout",y=u.LayoutData.fromJSON(this._storageService.get(E,0,"{}"));this._widget=this._instantiationService.createInstance(u.ReferenceWidget,this._editor,this._defaultTreeKeyboardSupport,y),this._widget.setTitle(v.localize(1,null)),this._widget.show(g),this._disposables.add(this._widget.onDidClose(()=>{d.cancel(),this._widget&&(this._storageService.store(E,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(R=>{let{element:O,kind:x}=R;if(!!O)switch(x){case"open":(R.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(O,!1,!1);break;case"side":this.openReference(O,!0,!1);break;case"goto":m?this._gotoReference(O):this.openReference(O,!1,!0);break}}));const T=++this._requestIdPool;d.then(R=>{if(T!==this._requestIdPool||!this._widget){R.dispose();return}return this._model?.dispose(),this._model=R,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(v.localize(2,null,this._model.title,this._model.references.length));let O=this._editor.getModel().uri,x=new D.Position(g.startLineNumber,g.startColumn),F=this._model.nearestReference(O,x);if(F)return this._widget.setSelection(F).then(()=>{this._widget&&this._editor.getOption(77)==="editor"&&this._widget.focusOnPreviewEditor()})}})},R=>{this._notificationService.error(R)})}changeFocusBetweenPreviewAndReferences(){!this._widget||(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}async goToNextOrPreviousReference(g){if(!this._editor.hasModel()||!this._model||!this._widget)return;const d=this._widget.position;if(!d)return;const m=this._model.nearestReference(this._editor.getModel().uri,d);if(!m)return;const b=this._model.nextOrPreviousReference(m,g),E=this._editor.hasTextFocus(),y=this._widget.isPreviewEditorFocused();await this._widget.setSelection(b),await this._gotoReference(b),E?this._editor.focus():this._widget&&y&&this._widget.focusOnPreviewEditor()}async revealReference(g){!this._editor.hasModel()||!this._model||!this._widget||await this._widget.revealReference(g)}closeWidget(g=!0){this._widget?.dispose(),this._model?.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,g&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(g){this._widget&&this._widget.hide(),this._ignoreModelChangeEvent=!0;const d=I.Range.lift(g.range).collapseToStart();return this._editorService.openCodeEditor({resource:g.uri,options:{selection:d,selectionSource:"code.jump"}},this._editor).then(m=>{if(this._ignoreModelChangeEvent=!1,!m||!this._widget){this.closeWidget();return}if(this._editor===m)this._widget.show(d),this._widget.focusOnReferenceTree();else{const b=br.get(m),E=this._model.clone();this.closeWidget(),m.focus(),b?.toggleWidget(d,(0,t.createCancelablePromise)(y=>Promise.resolve(E)),this._peekMode??!1)}},m=>{this._ignoreModelChangeEvent=!1,(0,f.onUnexpectedError)(m)})}openReference(g,d,m){d||this.closeWidget();const{uri:b,range:E}=g;this._editorService.openCodeEditor({resource:b,options:{selection:E,selectionSource:"code.jump",pinned:m}},this._editor,d)}};a.ID="editor.contrib.referencesController",a=Ee([W(2,c.IContextKeyService),W(3,k.ICodeEditorService),W(4,l.INotificationService),W(5,i.IInstantiationService),W(6,r.IStorageService),W(7,o.IConfigurationService)],a),e.ReferencesController=a;function n(h,g){const d=(0,w.getOuterEditor)(h);if(!d)return;const m=a.get(d);m&&g(m)}S.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:(0,_.KeyChord)(2048|41,60),when:c.ContextKeyExpr.or(e.ctxReferenceSearchVisible,w.PeekContext.inPeekEditor),handler(h){n(h,g=>{g.changeFocusBetweenPreviewAndReferences()})}}),S.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:c.ContextKeyExpr.or(e.ctxReferenceSearchVisible,w.PeekContext.inPeekEditor),handler(h){n(h,g=>{g.goToNextOrPreviousReference(!0)})}}),S.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1024|62,secondary:[1024|70],when:c.ContextKeyExpr.or(e.ctxReferenceSearchVisible,w.PeekContext.inPeekEditor),handler(h){n(h,g=>{g.goToNextOrPreviousReference(!1)})}}),C.CommandsRegistry.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),C.CommandsRegistry.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),C.CommandsRegistry.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),C.CommandsRegistry.registerCommand("closeReferenceSearch",h=>n(h,g=>g.closeWidget())),S.KeybindingsRegistry.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1024|9],when:c.ContextKeyExpr.and(w.PeekContext.inPeekEditor,c.ContextKeyExpr.not("config.editor.stablePeek"))}),S.KeybindingsRegistry.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1024|9],when:c.ContextKeyExpr.and(e.ctxReferenceSearchVisible,c.ContextKeyExpr.not("config.editor.stablePeek"))}),S.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2048|18]},when:c.ContextKeyExpr.and(e.ctxReferenceSearchVisible,s.WorkbenchListFocusContextKey,s.WorkbenchTreeElementCanCollapse.negate(),s.WorkbenchTreeElementCanExpand.negate()),handler(h){const d=h.get(s.IListService).lastFocusedList?.getFocus();Array.isArray(d)&&d[0]instanceof p.OneReference&&n(h,m=>m.revealReference(d[0]))}}),S.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2048|3,mac:{primary:256|3},when:c.ContextKeyExpr.and(e.ctxReferenceSearchVisible,s.WorkbenchListFocusContextKey,s.WorkbenchTreeElementCanCollapse.negate(),s.WorkbenchTreeElementCanExpand.negate()),handler(h){const d=h.get(s.IListService).lastFocusedList?.getFocus();Array.isArray(d)&&d[0]instanceof p.OneReference&&n(h,m=>m.openReference(d[0],!0,!0))}}),C.CommandsRegistry.registerCommand("openReference",h=>{const d=h.get(s.IListService).lastFocusedList?.getFocus();Array.isArray(d)&&d[0]instanceof p.OneReference&&n(h,m=>m.openReference(d[0],!1,!0))})}),define(ne[562],re([1,0,77,112,11,97,14,13,9,287,106,39,72,229,49,20,58,86,561,395,2042,471,172,1274,16,28,7,5,26,67,752,62]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R){"use strict";var O,x,F,L,M,N,B,P;Object.defineProperty(e,"__esModule",{value:!0}),e.DefinitionAction=e.SymbolNavigationAction=e.SymbolNavigationAnchor=void 0,g.MenuRegistry.appendMenuItem(g.MenuId.EditorContext,{submenu:g.MenuId.EditorContextPeek,title:h.localize(0,null),group:"navigation",order:100});const V=new Set;function z($){const J=new $;return(0,C.registerInstantiatedEditorAction)(J),V.add(J.id),J}class U{constructor(J,ee){this.model=J,this.position=ee}static is(J){return!J||typeof J!="object"?!1:!!(J instanceof U||i.Position.isIPosition(J.position)&&J.model)}}e.SymbolNavigationAnchor=U;class H extends C.EditorAction{constructor(J,ee){super(ee);this.configuration=J}run(J,ee,te){if(!ee.hasModel())return Promise.resolve(void 0);const se=J.get(E.INotificationService),ie=J.get(o.ICodeEditorService),ce=J.get(y.IEditorProgressService),le=J.get(u.ISymbolNavigationService),ae=J.get(R.ILanguageFeaturesService),ue=ee.getModel(),oe=ee.getPosition(),fe=U.is(te)?te:new U(ue,oe),pe=new w.EditorStateCancellationTokenSource(ee,1|4),me=(0,_.raceCancellation)(this._getLocationModel(ae,fe.model,fe.position,pe.token),pe.token).then(async be=>{if(!be||pe.token.isCancellationRequested)return;(0,f.alert)(be.ariaMessage);let Ce;if(be.referenceAt(ue.uri,oe)){const he=this._getAlternativeCommand(ee);he!==this.id&&V.has(he)&&(Ce=ee.getAction(he))}const ve=be.references.length;if(ve===0){if(!this.configuration.muteMessage){const he=ue.getWordAtPosition(oe);a.MessageController.get(ee)?.showMessage(this._getNoResultFoundMessage(he),oe)}}else if(ve===1&&Ce)Ce.run();else return this._onResult(ie,le,ee,be)},be=>{se.error(be)}).finally(()=>{pe.dispose()});return ce.showWhile(me,250),me}async _onResult(J,ee,te,se){const ie=this._getGoToPreference(te);if(!(te instanceof c.EmbeddedCodeEditorWidget)&&(this.configuration.openInPeek||ie==="peek"&&se.references.length>1))this._openInPeek(te,se);else{const ce=se.firstReference(),le=se.references.length>1&&ie==="gotoAndPeek",ae=await this._openReference(te,J,ce,this.configuration.openToSide,!le);le&&ae?this._openInPeek(ae,se):se.dispose(),ie==="goto"&&ee.put(ce)}}async _openReference(J,ee,te,se,ie){let ce;if((0,l.isLocationLink)(te)&&(ce=te.targetSelectionRange),ce||(ce=te.range),!ce)return;const le=await ee.openCodeEditor({resource:te.uri,options:{selection:S.Range.collapseToStart(ce),selectionRevealType:3,selectionSource:"code.jump"}},J,se);if(!!le){if(ie){const ae=le.getModel(),ue=le.deltaDecorations([],[{range:ce,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{le.getModel()===ae&&le.deltaDecorations(ue,[])},350)}return le}}_openInPeek(J,ee){const te=r.ReferencesController.get(J);te&&J.hasModel()?te.toggleWidget(J.getSelection(),(0,_.createCancelablePromise)(se=>Promise.resolve(ee)),this.configuration.openInPeek):ee.dispose()}}e.SymbolNavigationAction=H;class K extends H{async _getLocationModel(J,ee,te,se){return new p.ReferencesModel(await(0,T.getDefinitionsAtPosition)(J.definitionProvider,ee,te,se),h.localize(1,null))}_getNoResultFoundMessage(J){return J&&J.word?h.localize(2,null,J.word):h.localize(3,null)}_getAlternativeCommand(J){return J.getOption(51).alternativeDefinitionCommand}_getGoToPreference(J){return J.getOption(51).multipleDefinitions}}e.DefinitionAction=K;const G=k.isWeb&&!(0,t.isStandalone)()?2048|70:70;z((O=class Cr extends K{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Cr.id,label:h.localize(4,null),alias:"Go to Definition",precondition:m.ContextKeyExpr.and(s.EditorContextKeys.hasDefinitionProvider,s.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:G,weight:100},contextMenuOpts:{group:"navigation",order:1.1}});d.CommandsRegistry.registerCommandAlias("editor.action.goToDeclaration",Cr.id)}},O.id="editor.action.revealDefinition",O)),z((x=class wr extends K{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:wr.id,label:h.localize(5,null),alias:"Open Definition to the Side",precondition:m.ContextKeyExpr.and(s.EditorContextKeys.hasDefinitionProvider,s.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:(0,A.KeyChord)(2048|41,G),weight:100}});d.CommandsRegistry.registerCommandAlias("editor.action.openDeclarationToTheSide",wr.id)}},x.id="editor.action.revealDefinitionAside",x)),z((F=class Er extends K{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:Er.id,label:h.localize(6,null),alias:"Peek Definition",precondition:m.ContextKeyExpr.and(s.EditorContextKeys.hasDefinitionProvider,n.PeekContext.notInPeekEditor,s.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:512|70,linux:{primary:2048|1024|68},weight:100},contextMenuOpts:{menuId:g.MenuId.EditorContextPeek,group:"peek",order:2}});d.CommandsRegistry.registerCommandAlias("editor.action.previewDeclaration",Er.id)}},F.id="editor.action.peekDefinition",F));class q extends H{async _getLocationModel(J,ee,te,se){return new p.ReferencesModel(await(0,T.getDeclarationsAtPosition)(J.declarationProvider,ee,te,se),h.localize(7,null))}_getNoResultFoundMessage(J){return J&&J.word?h.localize(8,null,J.word):h.localize(9,null)}_getAlternativeCommand(J){return J.getOption(51).alternativeDeclarationCommand}_getGoToPreference(J){return J.getOption(51).multipleDeclarations}}z((L=class lo extends q{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:lo.id,label:h.localize(10,null),alias:"Go to Declaration",precondition:m.ContextKeyExpr.and(s.EditorContextKeys.hasDeclarationProvider,s.EditorContextKeys.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{group:"navigation",order:1.3}})}_getNoResultFoundMessage(J){return J&&J.word?h.localize(11,null,J.word):h.localize(12,null)}},L.id="editor.action.revealDeclaration",L)),z(class extends q{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",label:h.localize(13,null),alias:"Peek Declaration",precondition:m.ContextKeyExpr.and(s.EditorContextKeys.hasDeclarationProvider,n.PeekContext.notInPeekEditor,s.EditorContextKeys.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:g.MenuId.EditorContextPeek,group:"peek",order:3}})}});class Z extends H{async _getLocationModel(J,ee,te,se){return new p.ReferencesModel(await(0,T.getTypeDefinitionsAtPosition)(J.typeDefinitionProvider,ee,te,se),h.localize(14,null))}_getNoResultFoundMessage(J){return J&&J.word?h.localize(15,null,J.word):h.localize(16,null)}_getAlternativeCommand(J){return J.getOption(51).alternativeTypeDefinitionCommand}_getGoToPreference(J){return J.getOption(51).multipleTypeDefinitions}}z((M=class co extends Z{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:co.ID,label:h.localize(17,null),alias:"Go to Type Definition",precondition:m.ContextKeyExpr.and(s.EditorContextKeys.hasTypeDefinitionProvider,s.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:0,weight:100},contextMenuOpts:{group:"navigation",order:1.4}})}},M.ID="editor.action.goToTypeDefinition",M)),z((N=class uo extends Z{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:uo.ID,label:h.localize(18,null),alias:"Peek Type Definition",precondition:m.ContextKeyExpr.and(s.EditorContextKeys.hasTypeDefinitionProvider,n.PeekContext.notInPeekEditor,s.EditorContextKeys.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:g.MenuId.EditorContextPeek,group:"peek",order:4}})}},N.ID="editor.action.peekTypeDefinition",N));class j extends H{async _getLocationModel(J,ee,te,se){return new p.ReferencesModel(await(0,T.getImplementationsAtPosition)(J.implementationProvider,ee,te,se),h.localize(19,null))}_getNoResultFoundMessage(J){return J&&J.word?h.localize(20,null,J.word):h.localize(21,null)}_getAlternativeCommand(J){return J.getOption(51).alternativeImplementationCommand}_getGoToPreference(J){return J.getOption(51).multipleImplementations}}z((B=class ho extends j{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:ho.ID,label:h.localize(22,null),alias:"Go to Implementations",precondition:m.ContextKeyExpr.and(s.EditorContextKeys.hasImplementationProvider,s.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:2048|70,weight:100},contextMenuOpts:{group:"navigation",order:1.45}})}},B.ID="editor.action.goToImplementation",B)),z((P=class go extends j{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:go.ID,label:h.localize(23,null),alias:"Peek Implementations",precondition:m.ContextKeyExpr.and(s.EditorContextKeys.hasImplementationProvider,n.PeekContext.notInPeekEditor,s.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:2048|1024|70,weight:100},contextMenuOpts:{menuId:g.MenuId.EditorContextPeek,group:"peek",order:5}})}},P.ID="editor.action.peekImplementation",P));class X extends H{_getNoResultFoundMessage(J){return J?h.localize(24,null,J.word):h.localize(25,null)}_getAlternativeCommand(J){return J.getOption(51).alternativeReferenceCommand}_getGoToPreference(J){return J.getOption(51).multipleReferences}}z(class extends X{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",label:h.localize(26,null),alias:"Go to References",precondition:m.ContextKeyExpr.and(s.EditorContextKeys.hasReferenceProvider,n.PeekContext.notInPeekEditor,s.EditorContextKeys.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:1024|70,weight:100},contextMenuOpts:{group:"navigation",order:1.45}})}async _getLocationModel(J,ee,te,se){return new p.ReferencesModel(await(0,T.getReferencesAtPosition)(J.referenceProvider,ee,te,!0,se),h.localize(27,null))}}),z(class extends X{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",label:h.localize(28,null),alias:"Peek References",precondition:m.ContextKeyExpr.and(s.EditorContextKeys.hasReferenceProvider,n.PeekContext.notInPeekEditor,s.EditorContextKeys.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:g.MenuId.EditorContextPeek,group:"peek",order:6}})}async _getLocationModel(J,ee,te,se){return new p.ReferencesModel(await(0,T.getReferencesAtPosition)(J.referenceProvider,ee,te,!1,se),h.localize(29,null))}});class Y extends H{constructor(J,ee,te){super(J,{id:"editor.action.goToLocation",label:h.localize(30,null),alias:"Go to Any Symbol",precondition:m.ContextKeyExpr.and(n.PeekContext.notInPeekEditor,s.EditorContextKeys.isInWalkThroughSnippet.toNegated())});this._references=ee,this._gotoMultipleBehaviour=te}async _getLocationModel(J,ee,te,se){return new p.ReferencesModel(this._references,h.localize(31,null))}_getNoResultFoundMessage(J){return J&&h.localize(32,null,J.word)||""}_getGoToPreference(J){return this._gotoMultipleBehaviour??J.getOption(51).multipleReferences}_getAlternativeCommand(){return""}}d.CommandsRegistry.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:I.URI},{name:"position",description:"The position at which to start",constraint:i.Position.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:async($,J,ee,te,se,ie,ce)=>{(0,D.assertType)(I.URI.isUri(J)),(0,D.assertType)(i.Position.isIPosition(ee)),(0,D.assertType)(Array.isArray(te)),(0,D.assertType)(typeof se=="undefined"||typeof se=="string"),(0,D.assertType)(typeof ce=="undefined"||typeof ce=="boolean");const le=$.get(o.ICodeEditorService),ae=await le.openCodeEditor({resource:J},le.getFocusedCodeEditor());if((0,v.isCodeEditor)(ae))return ae.setPosition(ee),ae.revealPositionInCenterIfOutsideViewport(ee,0),ae.invokeWithinContext(ue=>{const oe=new class extends Y{_getNoResultFoundMessage(fe){return ie||super._getNoResultFoundMessage(fe)}}({muteMessage:!Boolean(ie),openInPeek:Boolean(ce),openToSide:!1},te,se);ue.get(b.IInstantiationService).invokeFunction(oe.run.bind(oe),ae)})}}),d.CommandsRegistry.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:I.URI},{name:"position",description:"The position at which to start",constraint:i.Position.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:async($,J,ee,te,se)=>{$.get(d.ICommandService).executeCommand("editor.action.goToLocations",J,ee,te,se,void 0,!0)}}),d.CommandsRegistry.registerCommand({id:"editor.action.findReferences",handler:($,J,ee)=>{(0,D.assertType)(I.URI.isUri(J)),(0,D.assertType)(i.Position.isIPosition(ee));const te=$.get(R.ILanguageFeaturesService),se=$.get(o.ICodeEditorService);return se.openCodeEditor({resource:J},se.getFocusedCodeEditor()).then(ie=>{if(!(0,v.isCodeEditor)(ie)||!ie.hasModel())return;const ce=r.ReferencesController.get(ie);if(!ce)return;const le=(0,_.createCancelablePromise)(ue=>(0,T.getReferencesAtPosition)(te.referenceProvider,ie.getModel(),i.Position.lift(ee),!1,ue).then(oe=>new p.ReferencesModel(oe,h.localize(33,null)))),ae=new S.Range(ee.lineNumber,ee.column,ee.lineNumber,ee.column);return Promise.resolve(ce.toggleWidget(ae,le,!1))})}}),d.CommandsRegistry.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations"),g.MenuRegistry.appendMenuItems([{id:g.MenuId.MenubarGoMenu,item:{command:{id:"editor.action.revealDefinition",title:h.localize(34,null)},group:"4_symbol_nav",order:2}},{id:g.MenuId.MenubarGoMenu,item:{command:{id:"editor.action.revealDeclaration",title:h.localize(35,null)},group:"4_symbol_nav",order:3}},{id:g.MenuId.MenubarGoMenu,item:{command:{id:"editor.action.goToTypeDefinition",title:h.localize(36,null)},group:"4_symbol_nav",order:3}},{id:g.MenuId.MenubarGoMenu,item:{command:{id:"editor.action.goToImplementation",title:h.localize(37,null)},group:"4_symbol_nav",order:4}},{id:g.MenuId.MenubarGoMenu,item:{command:{id:"editor.action.goToReferences",title:h.localize(38,null)},group:"4_symbol_nav",order:5}}])}),define(ne[764],re([1,0,11,22,117,2,13,287,39,49,20,42,61,538,172,1275,7,32,12,562,752,62,1031]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoDefinitionAtPositionEditorContribution=void 0;let n=class sn{constructor(g,d,m,b){this.textModelResolverService=d,this.languageService=m,this.languageFeaturesService=b,this.toUnhook=new A.DisposableStore,this.toUnhookForKeyboard=new A.DisposableStore,this.linkDecorations=[],this.currentWordAtPosition=null,this.previousPromise=null,this.editor=g;let E=new c.ClickLinkGesture(g);this.toUnhook.add(E),this.toUnhook.add(E.onMouseMoveOrRelevantKeyDown(([y,T])=>{this.startFindDefinitionFromMouse(y,(0,k.withNullAsUndefined)(T))})),this.toUnhook.add(E.onExecute(y=>{this.isEnabled(y)&&this.gotoDefinition(y.target.position,y.hasSideBySideModifier).then(()=>{this.removeLinkDecorations()},T=>{this.removeLinkDecorations(),(0,f.onUnexpectedError)(T)})})),this.toUnhook.add(E.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(g){return g.getContribution(sn.ID)}startFindDefinitionFromCursor(g){return this.startFindDefinition(g).then(()=>{this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(d=>{d&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(g,d){if(g.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(g,d)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const m=g.target.position;this.startFindDefinition(m)}startFindDefinition(g){this.toUnhookForKeyboard.clear();const d=g?this.editor.getModel()?.getWordAtPosition(g):null;if(!d)return this.currentWordAtPosition=null,this.removeLinkDecorations(),Promise.resolve(0);if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===d.startColumn&&this.currentWordAtPosition.endColumn===d.endColumn&&this.currentWordAtPosition.word===d.word)return Promise.resolve(0);this.currentWordAtPosition=d;let m=new D.EditorState(this.editor,4|1|2|8);return this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=(0,t.createCancelablePromise)(b=>this.findDefinition(g,b)),this.previousPromise.then(b=>{if(!b||!b.length||!m.validate(this.editor)){this.removeLinkDecorations();return}if(b.length>1)this.addDecoration(new v.Range(g.lineNumber,d.startColumn,g.lineNumber,d.endColumn),new _.MarkdownString().appendText(S.localize(0,null,b.length)));else{let E=b[0];if(!E.uri)return;this.textModelResolverService.createModelReference(E.uri).then(y=>{if(!y.object||!y.object.textEditorModel){y.dispose();return}const{object:{textEditorModel:T}}=y,{startLineNumber:R}=E.range;if(R<1||R>T.getLineCount()){y.dispose();return}const O=this.getPreviewValue(T,R,E);let x;E.originSelectionRange?x=v.Range.lift(E.originSelectionRange):x=new v.Range(g.lineNumber,d.startColumn,g.lineNumber,d.endColumn);const F=this.languageService.guessLanguageIdByFilepathOrFirstLine(T.uri);this.addDecoration(x,new _.MarkdownString().appendCodeblock(F||"",O)),y.dispose()})}}).then(void 0,f.onUnexpectedError)}getPreviewValue(g,d,m){let b=m.targetSelectionRange?m.range:this.getPreviewRangeBasedOnBrackets(g,d);return b.endLineNumber-b.startLineNumber>=sn.MAX_SOURCE_PREVIEW_LINES&&(b=this.getPreviewRangeBasedOnIndentation(g,d)),this.stripIndentationFromPreviewRange(g,d,b)}stripIndentationFromPreviewRange(g,d,m){let E=g.getLineFirstNonWhitespaceColumn(d);for(let T=d+1;T<m.endLineNumber;T++){const R=g.getLineFirstNonWhitespaceColumn(T);E=Math.min(E,R)}return g.getValueInRange(m).replace(new RegExp(`^\\s{${E-1}}`,"gm"),"").trim()}getPreviewRangeBasedOnIndentation(g,d){const m=g.getLineFirstNonWhitespaceColumn(d),b=Math.min(g.getLineCount(),d+sn.MAX_SOURCE_PREVIEW_LINES);let E=d+1;for(;E<b;E++){let y=g.getLineFirstNonWhitespaceColumn(E);if(m===y)break}return new v.Range(d,1,E+1,1)}getPreviewRangeBasedOnBrackets(g,d){const m=Math.min(g.getLineCount(),d+sn.MAX_SOURCE_PREVIEW_LINES),b=[];let E=!0,y=g.bracketPairs.findNextBracket(new w.Position(d,1));for(;y!==null;){if(b.length===0)b.push(y);else{const x=b[b.length-1];if(x.open[0]===y.open[0]&&x.isOpen&&!y.isOpen?b.pop():b.push(y),b.length===0)if(E)E=!1;else return new v.Range(d,1,y.range.endLineNumber+1,1)}const T=g.getLineMaxColumn(d);let R=y.range.endLineNumber,O=y.range.endColumn;if(T===y.range.endColumn&&(R++,O=1),R>m)return new v.Range(d,1,m+1,1);y=g.bracketPairs.findNextBracket(new w.Position(R,O))}return new v.Range(d,1,m+1,1)}addDecoration(g,d){const m={range:g,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:d}};this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[m])}removeLinkDecorations(){this.linkDecorations.length>0&&(this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[]))}isEnabled(g,d){return this.editor.hasModel()&&g.isNoneOrSingleMouseDown&&g.target.type===6&&(g.hasTriggerModifier||(d?d.keyCodeIsTriggerKey:!1))&&this.languageFeaturesService.definitionProvider.has(this.editor.getModel())}findDefinition(g,d){const m=this.editor.getModel();return m?(0,u.getDefinitionsAtPosition)(this.languageFeaturesService.definitionProvider,m,g,d):Promise.resolve(null)}gotoDefinition(g,d){return this.editor.setPosition(g),this.editor.invokeWithinContext(m=>{const b=!d&&this.editor.getOption(78)&&!this.isInPeekEditor(m);return new p.DefinitionAction({openToSide:d,openInPeek:b,muteMessage:!0},{alias:"",label:"",id:"",precondition:void 0}).run(m,this.editor)})}isInPeekEditor(g){const d=g.get(s.IContextKeyService);return i.PeekContext.inPeekEditor.getValue(d)}dispose(){this.toUnhook.dispose()}};n.ID="editor.contrib.gotodefinitionatposition",n.MAX_SOURCE_PREVIEW_LINES=8,n=Ee([W(1,o.ITextModelService),W(2,C.ILanguageService),W(3,a.ILanguageFeaturesService)],n),e.GotoDefinitionAtPositionEditorContribution=n,(0,I.registerEditorContribution)(n.ID,n),(0,r.registerThemingParticipant)((h,g)=>{const d=h.getColor(l.editorActiveLinkForeground);d&&g.addRule(`.monaco-editor .goto-definition-link { color: ${d} !important; }`)})}),define(ne[2079],re([1,0,10,15,11,22,2,19,20,464,314,472,260,560,1283,125,41,67,32,12,62]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerHoverParticipant=e.MarkerHover=void 0;const a=t.$;class n{constructor(m,b,E){this.owner=m,this.range=b,this.marker=E}isValidForHoverAnchor(m){return m.type===1&&this.range.startColumn<=m.range.startColumn&&this.range.endColumn>=m.range.endColumn}}e.MarkerHover=n;const h={type:1,filter:{include:o.CodeActionKind.QuickFix}};let g=class{constructor(m,b,E,y){this._editor=m,this._markerDecorationsService=b,this._openerService=E,this._languageFeaturesService=y,this.hoverOrdinal=5,this.recentMarkerCodeActionsInfo=void 0}computeSync(m,b){if(!this._editor.hasModel()||m.type!==1)return[];const E=this._editor.getModel(),y=m.range.startLineNumber,T=E.getLineMaxColumn(y),R=[];for(const O of b){const x=O.range.startLineNumber===y?O.range.startColumn:1,F=O.range.endLineNumber===y?O.range.endColumn:T,L=this._markerDecorationsService.getMarker(E.uri,O);if(!L)continue;const M=new I.Range(m.range.startLineNumber,x,m.range.startLineNumber,F);R.push(new n(this,M,L))}return R}renderHoverParts(m,b){if(!b.length)return k.Disposable.None;const E=new k.DisposableStore;b.forEach(T=>m.fragment.appendChild(this.renderMarkerHover(T,E)));const y=b.length===1?b[0]:b.sort((T,R)=>S.MarkerSeverity.compare(T.marker.severity,R.marker.severity))[0];return this.renderMarkerStatusbar(m,y,E),E}renderMarkerHover(m,b){const E=a("div.hover-row"),y=t.append(E,a("div.marker.hover-contents")),{source:T,message:R,code:O,relatedInformation:x}=m.marker;this._editor.applyFontInfo(y);const F=t.append(y,a("span"));if(F.style.whiteSpace="pre-wrap",F.innerText=R,T||O)if(O&&typeof O!="string"){const L=a("span");if(T){const P=t.append(L,a("span"));P.innerText=T}const M=t.append(L,a("a.code-link"));M.setAttribute("href",O.target.toString()),b.add(t.addDisposableListener(M,"click",P=>{this._openerService.open(O.target,{allowCommands:!0}),P.preventDefault(),P.stopPropagation()}));const N=t.append(M,a("span"));N.innerText=O.value;const B=t.append(y,L);B.style.opacity="0.6",B.style.paddingLeft="6px"}else{const L=t.append(y,a("span"));L.style.opacity="0.6",L.style.paddingLeft="6px",L.innerText=T&&O?`${T}(${O})`:T||`(${O})`}if((0,f.isNonEmptyArray)(x))for(const{message:L,resource:M,startLineNumber:N,startColumn:B}of x){const P=t.append(y,a("div"));P.style.marginTop="8px";const V=t.append(P,a("a"));V.innerText=`${(0,D.basename)(M)}(${N}, ${B}): `,V.style.cursor="pointer",b.add(t.addDisposableListener(V,"click",U=>{U.stopPropagation(),U.preventDefault(),this._openerService&&this._openerService.open(M,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:N,startColumn:B}}}).catch(A.onUnexpectedError)}));const z=t.append(P,a("span"));z.innerText=L,this._editor.applyFontInfo(z)}return E}renderMarkerStatusbar(m,b,E){if((b.marker.severity===S.MarkerSeverity.Error||b.marker.severity===S.MarkerSeverity.Warning||b.marker.severity===S.MarkerSeverity.Info)&&m.statusBar.addAction({label:i.localize(0,null),commandId:c.NextMarkerAction.ID,run:()=>{m.hide(),c.MarkerController.get(this._editor)?.showAtMarker(b.marker),this._editor.focus()}}),!this._editor.getOption(81)){const y=m.statusBar.append(a("div"));this.recentMarkerCodeActionsInfo&&(S.IMarkerData.makeKey(this.recentMarkerCodeActionsInfo.marker)===S.IMarkerData.makeKey(b.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(y.textContent=i.localize(1,null)):this.recentMarkerCodeActionsInfo=void 0);const T=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?k.Disposable.None:E.add((0,_.disposableTimeout)(()=>y.textContent=i.localize(2,null),200));y.textContent||(y.textContent=String.fromCharCode(160));const R=this.getCodeActions(b.marker);E.add((0,k.toDisposable)(()=>R.cancel())),R.then(O=>{if(T.dispose(),this.recentMarkerCodeActionsInfo={marker:b.marker,hasCodeActions:O.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){O.dispose(),y.textContent=i.localize(3,null);return}y.style.display="none";let x=!1;E.add((0,k.toDisposable)(()=>{x||O.dispose()})),m.statusBar.addAction({label:i.localize(4,null),commandId:C.QuickFixAction.Id,run:F=>{x=!0;const L=C.QuickFixController.get(this._editor),M=t.getDomNodePagePosition(F);m.hide(),L?.showCodeActions(h,O,{x:M.left+6,y:M.top+M.height+6})}})},A.onUnexpectedError)}}getCodeActions(m){return(0,_.createCancelablePromise)(b=>(0,v.getCodeActions)(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new I.Range(m.startLineNumber,m.startColumn,m.endLineNumber,m.endColumn),h,l.Progress.None,b))}};g=Ee([W(1,w.IMarkerDecorationsService),W(2,s.IOpenerService),W(3,u.ILanguageFeaturesService)],g),e.MarkerHoverParticipant=g,(0,p.registerThemingParticipant)((d,m)=>{const b=d.getColor(r.textLinkForeground);b&&m.addRule(`.monaco-hover .hover-contents a.code-link span { color: ${b}; }`);const E=d.getColor(r.textLinkActiveForeground);E&&m.addRule(`.monaco-hover .hover-contents a.code-link span:hover { color: ${E}; }`)})}),define(ne[406],re([1,0,97,2,39,20,58,42,764,2071,1973,1281,7,5,41,32,12,286,557,2079]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModesHoverController=void 0;let u=class fo{constructor(g,d,m,b,E){this._editor=g,this._instantiationService=d,this._openerService=m,this._languageService=b,this._toUnhook=new f.DisposableStore,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration(y=>{y.hasChanged(53)&&(this._unhookEvents(),this._hookEvents())})}static get(g){return g.getContribution(fo.ID)}_hookEvents(){const g=()=>this._hideWidgets(),d=this._editor.getOption(53);this._isHoverEnabled=d.enabled,this._isHoverSticky=d.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(m=>this._onEditorMouseDown(m))),this._toUnhook.add(this._editor.onMouseUp(m=>this._onEditorMouseUp(m))),this._toUnhook.add(this._editor.onMouseMove(m=>this._onEditorMouseMove(m))),this._toUnhook.add(this._editor.onKeyDown(m=>this._onKeyDown(m)))):(this._toUnhook.add(this._editor.onMouseMove(m=>this._onEditorMouseMove(m))),this._toUnhook.add(this._editor.onKeyDown(m=>this._onKeyDown(m)))),this._toUnhook.add(this._editor.onMouseLeave(m=>this._onEditorMouseLeave(m))),this._toUnhook.add(this._editor.onDidChangeModel(g)),this._toUnhook.add(this._editor.onDidScrollChange(m=>this._onEditorScrollChanged(m)))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(g){(g.scrollTopChanged||g.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(g){this._isMouseDown=!0;const d=g.target;if(d.type===9&&d.detail===w.ContentHoverWidget.ID){this._hoverClicked=!0;return}d.type===12&&d.detail===v.MarginHoverWidget.ID||(d.type!==12&&(this._hoverClicked=!1),this._hideWidgets())}_onEditorMouseUp(g){this._isMouseDown=!1}_onEditorMouseLeave(g){const d=g.event.browserEvent.relatedTarget;this._contentWidget?.containsNode(d)||this._hideWidgets()}_onEditorMouseMove(g){const d=g.target;if(this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&d.type===9&&d.detail===w.ContentHoverWidget.ID||this._isHoverSticky&&!g.event.browserEvent.view?.getSelection()?.isCollapsed||!this._isHoverSticky&&d.type===9&&d.detail===w.ContentHoverWidget.ID&&this._contentWidget?.isColorPickerVisible()||this._isHoverSticky&&d.type===12&&d.detail===v.MarginHoverWidget.ID)return;if(!this._isHoverEnabled){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(g)){this._glyphWidget?.hide();return}if(d.type===2&&d.position){this._contentWidget?.hide(),this._glyphWidget||(this._glyphWidget=new v.MarginHoverWidget(this._editor,this._languageService,this._openerService)),this._glyphWidget.startShowingAt(d.position.lineNumber);return}this._hideWidgets()}_onKeyDown(g){g.keyCode!==5&&g.keyCode!==6&&g.keyCode!==57&&g.keyCode!==4&&this._hideWidgets()}_hideWidgets(){this._isMouseDown&&this._hoverClicked&&this._contentWidget?.isColorPickerVisible()||(this._hoverClicked=!1,this._glyphWidget?.hide(),this._contentWidget?.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(w.ContentHoverController,this._editor)),this._contentWidget}isColorPickerVisible(){return this._contentWidget?.isColorPickerVisible()||!1}showContentHover(g,d,m){this._getOrCreateContentWidget().startShowingAtRange(g,d,m)}dispose(){this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),this._glyphWidget?.dispose(),this._contentWidget?.dispose()}};u.ID="editor.contrib.hover",u=Ee([W(1,c.IInstantiationService),W(2,i.IOpenerService),W(3,D.ILanguageService),W(4,o.IContextKeyService)],u),e.ModesHoverController=u;class a extends _.EditorAction{constructor(){super({id:"editor.action.showHover",label:C.localize(0,null),alias:"Show Hover",precondition:void 0,kbOpts:{kbExpr:k.EditorContextKeys.editorTextFocus,primary:(0,t.KeyChord)(2048|41,2048|39),weight:100}})}run(g,d){if(!d.hasModel())return;let m=u.get(d);if(!m)return;const b=d.getPosition(),E=new A.Range(b.lineNumber,b.column,b.lineNumber,b.column),y=d.getOption(2)===2;m.showContentHover(E,1,y)}}class n extends _.EditorAction{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:C.localize(1,null),alias:"Show Definition Preview Hover",precondition:void 0})}run(g,d){const m=u.get(d);if(!m)return;const b=d.getPosition();if(!b)return;const E=new A.Range(b.lineNumber,b.column,b.lineNumber,b.column),y=I.GotoDefinitionAtPositionEditorContribution.get(d);if(!y)return;y.startFindDefinitionFromCursor(b).then(()=>{m.showContentHover(E,1,!0)})}}(0,_.registerEditorContribution)(u.ID,u),(0,_.registerEditorAction)(a),(0,_.registerEditorAction)(n),l.HoverParticipantRegistry.register(r.MarkdownHoverParticipant),l.HoverParticipantRegistry.register(p.MarkerHoverParticipant),(0,s.registerThemingParticipant)((h,g)=>{const d=h.getColor(S.editorHoverHighlight);d&&g.addRule(`.monaco-editor .hoverHighlight { background-color: ${d}; }`);const m=h.getColor(S.editorHoverBackground);m&&g.addRule(`.monaco-editor .monaco-hover { background-color: ${m}; }`);const b=h.getColor(S.editorHoverBorder);b&&(g.addRule(`.monaco-editor .monaco-hover { border: 1px solid ${b}; }`),g.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${b.transparent(.5)}; }`),g.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${b.transparent(.5)}; }`),g.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${b.transparent(.5)}; }`));const E=h.getColor(S.textLinkForeground);E&&g.addRule(`.monaco-editor .monaco-hover a { color: ${E}; }`);const y=h.getColor(S.textLinkActiveForeground);y&&g.addRule(`.monaco-editor .monaco-hover a:hover { color: ${y}; }`);const T=h.getColor(S.editorHoverForeground);T&&g.addRule(`.monaco-editor .monaco-hover { color: ${T}; }`);const R=h.getColor(S.editorHoverStatusBarBackground);R&&g.addRule(`.monaco-editor .monaco-hover .hover-row .actions { background-color: ${R}; }`);const O=h.getColor(S.textCodeBlockBackground);O&&g.addRule(`.monaco-editor .monaco-hover code { background-color: ${O}; }`)})}),define(ne[2080],re([1,0,2,39,20,559,2067,406,286]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorContribution=void 0;class w extends t.Disposable{constructor(C){super();this._editor=C,this._register(C.onMouseDown(o=>this.onMouseDown(o)))}dispose(){super.dispose()}onMouseDown(C){const o=C.target;if(o.type!==6||!o.detail.injectedText||o.detail.injectedText.options.attachedData!==A.ColorDecorationInjectedTextMarker||!o.range)return;const c=this._editor.getContribution(D.ModesHoverController.ID);if(!!c&&!c.isColorPickerVisible()){const i=new _.Range(o.range.startLineNumber,o.range.startColumn+1,o.range.endLineNumber,o.range.endColumn+1);c.showContentHover(i,1,!1)}}}e.ColorContribution=w,w.ID="editor.contrib.colorContribution",w.RECOMPUTE_TIME=1e3,(0,f.registerEditorContribution)(w.ID,w),I.HoverParticipantRegistry.register(k.ColorHoverParticipant)}),define(ne[2081],re([1,0,10,36,30,39,20,61,562,172,16,28,7,37,5,26]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.goToDefinitionWithLocation=e.showGoToContextMenu=void 0;async function s(r,p,u,a){const n=r.get(D.ITextModelService),h=r.get(c.IContextMenuService),g=r.get(C.ICommandService),d=r.get(i.IInstantiationService),m=r.get(S.INotificationService);if(await a.item.resolve(_.CancellationToken.None),!a.part.location)return;const b=a.part.location,E=[],y=new Set(v.MenuRegistry.getMenuItems(v.MenuId.EditorContext).map(R=>(0,v.isIMenuItem)(R)?R.command.id:""));for(const R of A.EditorExtensionsRegistry.getEditorActions())R instanceof I.SymbolNavigationAction&&y.has(R.id)&&E.push(new f.Action(R.id,R.label,void 0,!0,async()=>{const O=await n.createModelReference(b.uri);try{await d.invokeFunction(R.run.bind(R),p,new I.SymbolNavigationAnchor(O.object.textEditorModel,k.Range.getStartPosition(b.range)))}finally{O.dispose()}}));if(a.part.command){const{command:R}=a.part;E.push(new f.Separator),E.push(new f.Action(R.id,R.title,void 0,!0,async()=>{try{await g.executeCommand(R.id,...R.arguments??[])}catch(O){m.notify({severity:S.Severity.Error,source:a.item.provider.displayName,message:O})}}))}const T=p.getOption(115);h.showContextMenu({domForShadowRoot:T?p.getDomNode()??void 0:void 0,getAnchor:()=>{const R=t.getDomNodePagePosition(u);return{x:R.left,y:R.top+R.height+8}},getActions:()=>E,onHide:()=>{p.focus()},autoSelectFirstItem:!0})}e.showGoToContextMenu=s;async function l(r,p,u,a){const h=await r.get(D.ITextModelService).createModelReference(a.uri);await u.invokeWithinContext(async g=>{const d=p.hasSideBySideModifier,m=g.get(o.IContextKeyService),b=w.PeekContext.inPeekEditor.getValue(m),E=!d&&u.getOption(78)&&!b;return new I.DefinitionAction({openToSide:d,openInPeek:E,muteMessage:!0},{alias:"",label:"",id:"",precondition:void 0}).run(g,u,{model:h.object.textEditorModel,position:k.Range.getStartPosition(a.range)})}),h.dispose()}e.goToDefinitionWithLocation=l}),define(ne[563],re([1,0,15,11,30,22,2,55,13,9,402,123,136,20,86,122,93,228,62,61,538,539,2081,28,35,5,26,32,12]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintsController=e.RenderedInlayHintLabelPart=void 0;class y{constructor(){this._entries=new D.LRUCache(50)}get(M){const N=y._key(M);return this._entries.get(N)}set(M,N){const B=y._key(M);this._entries.set(B,N)}static _key(M){return`${M.uri.toString()}/${M.getVersionId()}`}}const T=(0,d.createDecorator)("IInlayHintsCache");(0,g.registerSingleton)(T,y,!0);class R{constructor(M,N){this.item=M,this.index=N}get part(){const M=this.item.hint.label;return typeof M=="string"?{label:M}:M[this.index]}}e.RenderedInlayHintLabelPart=R;class O{constructor(M,N){this.part=M,this.hasTriggerModifier=N}}let x=class yr{constructor(M,N,B,P,V,z,U){this._editor=M,this._languageFeaturesService=N,this._inlayHintsCache=P,this._commandService=V,this._notificationService=z,this._instaService=U,this._disposables=new k.DisposableStore,this._sessionDisposables=new k.DisposableStore,this._decorationsMetadata=new Map,this._ruleFactory=new v.DynamicCssRules(this._editor),this._debounceInfo=B.for(N.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(N.inlayHintsProvider.onDidChange(()=>this._update())),this._disposables.add(M.onDidChangeModel(()=>this._update())),this._disposables.add(M.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(M.onDidChangeConfiguration(H=>{H.hasChanged(127)&&this._update()})),this._update()}static get(M){return M.getContribution(yr.ID)??void 0}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){if(this._sessionDisposables.clear(),this._removeAllDecorations(),!this._editor.getOption(127).enabled)return;const M=this._editor.getModel();if(!M||!this._languageFeaturesService.inlayHintsProvider.has(M))return;const N=this._inlayHintsCache.get(M);N&&this._updateHintsDecorators([M.getFullModelRange()],N),this._sessionDisposables.add((0,k.toDisposable)(()=>{M.isDisposed()||this._cacheHintsForFastRestore(M)}));let B,P=new Set;const V=new f.RunOnceScheduler(async()=>{const z=Date.now();B?.dispose(!0),B=new _.CancellationTokenSource;const U=M.onWillDispose(()=>B?.cancel());try{const H=B.token,K=await a.InlayHintsFragments.create(this._languageFeaturesService.inlayHintsProvider,M,this._getHintsRanges(),H);if(V.delay=this._debounceInfo.update(M,Date.now()-z),H.isCancellationRequested){K.dispose();return}for(const G of K.provider)typeof G.onDidChangeInlayHints=="function"&&!P.has(G)&&(P.add(G),this._sessionDisposables.add(G.onDidChangeInlayHints(()=>{V.isScheduled()||V.schedule()})));this._sessionDisposables.add(K),this._updateHintsDecorators(K.ranges,K.items),this._cacheHintsForFastRestore(M)}catch(H){(0,A.onUnexpectedError)(H)}finally{B.dispose(),U.dispose()}},this._debounceInfo.get(M));this._sessionDisposables.add(V),this._sessionDisposables.add((0,k.toDisposable)(()=>B?.dispose(!0))),V.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange(z=>{(z.scrollTopChanged||!V.isScheduled())&&V.schedule()})),this._sessionDisposables.add(this._editor.onDidChangeModelContent(z=>{const U=Math.max(V.delay,1250);V.schedule(U)})),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installDblClickGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){const M=new k.DisposableStore,N=M.add(new u.ClickLinkGesture(this._editor)),B=new k.DisposableStore;return M.add(B),M.add(N.onMouseMoveOrRelevantKeyDown(P=>{const[V]=P,z=this._getInlayHintLabelPart(V),U=this._editor.getModel();if(!z||!U){B.clear();return}const H=new _.CancellationTokenSource;B.add((0,k.toDisposable)(()=>H.dispose(!0))),z.item.resolve(H.token),this._activeInlayHintPart=z.part.command||z.part.location?new O(z,V.hasTriggerModifier):void 0;const K=z.item.hint.position.lineNumber,G=new c.Range(K,1,K,U.getLineMaxColumn(K)),q=new Set;for(const Z of this._decorationsMetadata.values())G.containsRange(Z.item.anchor.range)&&q.add(Z.item);this._updateHintsDecorators([G],Array.from(q)),B.add((0,k.toDisposable)(()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([G],Array.from(q))}))})),M.add(N.onCancel(()=>B.clear())),M.add(N.onExecute(async P=>{const V=this._getInlayHintLabelPart(P);if(V){const z=V.part;z.location?this._instaService.invokeFunction(n.goToDefinitionWithLocation,P,this._editor,z.location):i.Command.is(z.command)&&await this._invokeCommand(z.command,V.item)}})),M}_installDblClickGesture(){return this._editor.onMouseUp(async M=>{if(M.event.detail!==2)return;const N=this._getInlayHintLabelPart(M);if(!!N&&(M.event.preventDefault(),await N.item.resolve(_.CancellationToken.None),(0,t.isNonEmptyArray)(N.item.hint.textEdits))){const B=N.item.hint.textEdits.map(P=>o.EditOperation.replace(c.Range.lift(P.range),P.text));this._editor.executeEdits("inlayHint.default",B)}})}_installContextMenu(){return this._editor.onContextMenu(async M=>{if(!(M.event.target instanceof HTMLElement))return;const N=this._getInlayHintLabelPart(M);N&&await this._instaService.invokeFunction(n.showGoToContextMenu,this._editor,M.event.target,N)})}_getInlayHintLabelPart(M){if(M.target.type!==6)return;const N=M.target.detail.injectedText?.options;if(N instanceof s.ModelDecorationInjectedTextOptions&&N?.attachedData instanceof R)return N.attachedData}async _invokeCommand(M,N){try{await this._commandService.executeCommand(M.id,...M.arguments??[])}catch(B){this._notificationService.notify({severity:m.Severity.Error,source:N.provider.displayName,message:B})}}_cacheHintsForFastRestore(M){const N=new Map;for(const[B,P]of this._decorationsMetadata){if(N.has(P.item))continue;let V=P.item;const z=M.getDecorationRange(B);if(z){const U=new a.InlayHintAnchor(z,P.item.anchor.direction);V=P.item.with({anchor:U})}N.set(P.item,V)}this._inlayHintsCache.set(M,Array.from(N.values()))}_getHintsRanges(){const M=30,N=this._editor.getModel(),B=this._editor.getVisibleRangesPlusViewportAboveBelow(),P=[];for(const V of B.sort(c.Range.compareRangesUsingStarts)){const z=N.validateRange(new c.Range(V.startLineNumber-M,V.startColumn,V.endLineNumber+M,V.endColumn));P.length===0||!c.Range.areIntersectingOrTouching(P[P.length-1],z)?P.push(z):P[P.length-1]=c.Range.plusRange(P[P.length-1],z)}return P}_updateHintsDecorators(M,N){const B=[],P=(q,Z,j,X,Y)=>{B.push({item:q,classNameRef:Z,decoration:{range:q.anchor.range,options:{description:"InlayHint",showIfCollapsed:q.anchor.range.isEmpty(),collapseOnReplaceEdit:!q.anchor.range.isEmpty(),stickiness:0,[q.anchor.direction]:{content:j,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:Z.className,cursorStops:X,attachedData:Y}}}})},V=(q,Z)=>{const j=this._ruleFactory.createClassNameRef({width:`${z/3|0}px`,display:"inline-block"});P(q,j,"\u200A",Z?S.InjectedTextCursorStops.Right:S.InjectedTextCursorStops.None)},{fontSize:z,fontFamily:U}=this._getLayoutInfo(),H="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(H,U);for(const q of N){q.hint.paddingLeft&&V(q,!1);const Z=typeof q.hint.label=="string"?[{label:q.hint.label}]:q.hint.label;for(let j=0;j<Z.length;j++){const X=Z[j],Y=j===0,$=j===Z.length-1,J={fontSize:`${z}px`,fontFamily:`var(${H}), ${C.EDITOR_FONT_DEFAULTS.fontFamily}`,verticalAlign:"middle"};(0,t.isNonEmptyArray)(q.hint.textEdits)&&(J.cursor="default"),this._fillInColors(J,q.hint),(X.command||X.location)&&this._activeInlayHintPart?.part.item===q&&this._activeInlayHintPart.part.index===j&&(J.textDecoration="underline",this._activeInlayHintPart.hasTriggerModifier&&(J.color=(0,E.themeColorFromId)(b.editorActiveLinkForeground),J.cursor="pointer")),Y&&$?(J.padding=`1px ${Math.max(1,z/4)|0}px`,J.borderRadius=`${z/4|0}px`):Y?(J.padding=`1px 0 1px ${Math.max(1,z/4)|0}px`,J.borderRadius=`${z/4|0}px 0 0 ${z/4|0}px`):$?(J.padding=`1px ${Math.max(1,z/4)|0}px 1px 0`,J.borderRadius=`0 ${z/4|0}px ${z/4|0}px 0`):J.padding="1px 0 1px 0",P(q,this._ruleFactory.createClassNameRef(J),F(X.label),$&&!q.hint.paddingRight?S.InjectedTextCursorStops.Right:S.InjectedTextCursorStops.None,new R(q,j))}if(q.hint.paddingRight&&V(q,!0),B.length>yr._MAX_DECORATORS)break}const K=[];for(const q of M)for(const{id:Z}of this._editor.getDecorationsInRange(q)??[]){const j=this._decorationsMetadata.get(Z);j&&(K.push(Z),j.classNameRef.dispose(),this._decorationsMetadata.delete(Z))}const G=this._editor.deltaDecorations(K,B.map(q=>q.decoration));for(let q=0;q<G.length;q++){const Z=B[q];this._decorationsMetadata.set(G[q],{item:Z.item,classNameRef:Z.classNameRef})}}_fillInColors(M,N){N.kind===i.InlayHintKind.Parameter?(M.backgroundColor=(0,E.themeColorFromId)(b.editorInlayHintParameterBackground),M.color=(0,E.themeColorFromId)(b.editorInlayHintParameterForeground)):N.kind===i.InlayHintKind.Type?(M.backgroundColor=(0,E.themeColorFromId)(b.editorInlayHintTypeBackground),M.color=(0,E.themeColorFromId)(b.editorInlayHintTypeForeground)):(M.backgroundColor=(0,E.themeColorFromId)(b.editorInlayHintBackground),M.color=(0,E.themeColorFromId)(b.editorInlayHintForeground))}_getLayoutInfo(){const M=this._editor.getOption(127),N=this._editor.getOption(46);let B=M.fontSize;(!B||B<5||B>N)&&(B=N*.9|0);const P=M.fontFamily||this._editor.getOption(43);return{fontSize:B,fontFamily:P}}_removeAllDecorations(){this._editor.deltaDecorations(Array.from(this._decorationsMetadata.keys()),[]);for(let M of this._decorationsMetadata.values())M.classNameRef.dispose();this._decorationsMetadata.clear()}getInlayHintsForLine(M){if(!this._editor.hasModel())return[];const N=new Set,B=[];for(let P of this._editor.getLineDecorations(M)){const V=this._decorationsMetadata.get(P.id);V&&!N.has(V.item.hint)&&(N.add(V.item.hint),B.push(V.item))}return B}};x.ID="editor.contrib.InlayHints",x._MAX_DECORATORS=1500,x=Ee([W(1,r.ILanguageFeaturesService),W(2,l.ILanguageFeatureDebounceService),W(3,T),W(4,h.ICommandService),W(5,m.INotificationService),W(6,d.IInstantiationService)],x),e.InlayHintsController=x;function F(L){const M="\xA0";return L.replace(/[ \t]/g,M)}h.CommandsRegistry.registerCommand("_executeInlayHintProvider",async(L,...M)=>{const[N,B]=M;(0,I.assertType)(w.URI.isUri(N)),(0,I.assertType)(c.Range.isIRange(B));const{inlayHintsProvider:P}=L.get(r.ILanguageFeaturesService),V=await L.get(p.ITextModelService).createModelReference(N);try{const z=await a.InlayHintsFragments.create(P,V.object.textEditorModel,[c.Range.lift(B)],_.CancellationToken.None),U=z.items.map(H=>H.hint);return setTimeout(()=>z.dispose(),0),U}finally{V.dispose()}})}),define(ne[2082],re([1,0,11,117,49,93,286,42,61,753,557,563,8,41,62,1286,14,539,15]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintsHover=void 0;class p extends k.HoverForeignElementAnchor{constructor(n,h){super(10,h,n.item.anchor.range);this.part=n}}let u=class extends v.MarkdownHoverParticipant{constructor(n,h,g,d,m,b){super(n,h,g,d,b);this._resolverService=m,this.hoverOrdinal=6}suggestHoverAnchor(n){if(!C.InlayHintsController.get(this._editor)||n.target.type!==6)return null;const g=n.target.detail.injectedText?.options;return g instanceof A.ModelDecorationInjectedTextOptions&&g.attachedData instanceof C.RenderedInlayHintLabelPart?new p(g.attachedData,this):null}computeSync(){return[]}computeAsync(n,h,g){return n instanceof p?new t.AsyncIterableObject(async d=>{const{part:m}=n;if(await m.item.resolve(g),g.isCancellationRequested)return;let b;typeof m.item.hint.tooltip=="string"?b=new f.MarkdownString().appendText(m.item.hint.tooltip):m.item.hint.tooltip&&(b=m.item.hint.tooltip),b&&d.emitOne(new v.MarkdownHover(this,n.range,[b],0)),(0,r.isNonEmptyArray)(m.item.hint.textEdits)&&d.emitOne(new v.MarkdownHover(this,n.range,[new f.MarkdownString().appendText((0,S.localize)(0,null))],10001));let E;if(typeof m.part.tooltip=="string"?E=new f.MarkdownString().appendText(m.part.tooltip):m.part.tooltip&&(E=m.part.tooltip),E&&d.emitOne(new v.MarkdownHover(this,n.range,[E],1)),m.part.location||m.part.command){let T;const O=this._editor.getOption(70)==="altKey"?s.isMacintosh?(0,S.localize)(1,null):(0,S.localize)(2,null):s.isMacintosh?(0,S.localize)(3,null):(0,S.localize)(4,null);m.part.location&&m.part.command?T=new f.MarkdownString().appendText((0,S.localize)(5,null,O)):m.part.location?T=new f.MarkdownString().appendText((0,S.localize)(6,null,O)):m.part.command&&(T=new f.MarkdownString(`[${(0,S.localize)(7,null)}](${(0,l.asCommandLink)(m.part.command)} "${m.part.command.title}") (${O})`,{isTrusted:!0})),T&&d.emitOne(new v.MarkdownHover(this,n.range,[T],1e4))}const y=await this._resolveInlayHintLabelPartHover(m,g);for await(let T of y)d.emitOne(T)}):t.AsyncIterableObject.EMPTY}async _resolveInlayHintLabelPartHover(n,h){if(!n.part.location)return t.AsyncIterableObject.EMPTY;const{uri:g,range:d}=n.part.location,m=await this._resolverService.createModelReference(g);try{const b=m.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(b)?(0,w.getHover)(this._languageFeaturesService.hoverProvider,b,new _.Position(d.startLineNumber,d.startColumn),h).filter(E=>!(0,f.isEmptyMarkdownString)(E.hover.contents)).map(E=>new v.MarkdownHover(this,n.item.anchor.range,E.hover.contents,2+E.ordinal)):t.AsyncIterableObject.EMPTY}finally{m.dispose()}}};u=Ee([W(1,D.ILanguageService),W(2,c.IOpenerService),W(3,o.IConfigurationService),W(4,I.ITextModelService),W(5,i.ILanguageFeaturesService)],u),e.InlayHintsHover=u}),define(ne[2083],re([1,0,39,286,563,2082]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerEditorContribution)(_.InlayHintsController.ID,_.InlayHintsController),f.HoverParticipantRegistry.register(A.InlayHintsHover)}),define(ne[2084],re([1,0,22,2,18,81,1343,54,35,26,147]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UndoRedoService=void 0;const C=!1;function o(g){return g.scheme===_.Schemas.file?g.fsPath:g.path}let c=0;class i{constructor(d,m,b,E,y,T,R){this.id=++c,this.type=0,this.actual=d,this.label=d.label,this.confirmBeforeUndo=d.confirmBeforeUndo||!1,this.resourceLabel=m,this.strResource=b,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=E,this.groupOrder=y,this.sourceId=T,this.sourceOrder=R,this.isValid=!0}setValid(d){this.isValid=d}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}var S;(function(g){g[g.ExternalRemoval=0]="ExternalRemoval",g[g.NoParallelUniverses=1]="NoParallelUniverses"})(S||(S={}));class s{constructor(d,m){this.resourceLabel=d,this.reason=m}}class l{constructor(){this.elements=new Map}createMessage(){const d=[],m=[];for(const[,E]of this.elements)(E.reason===0?d:m).push(E.resourceLabel);let b=[];return d.length>0&&b.push(k.localize(0,null,d.join(", "))),m.length>0&&b.push(k.localize(1,null,m.join(", "))),b.join(` `)}get size(){return this.elements.size}has(d){return this.elements.has(d)}set(d,m){this.elements.set(d,m)}delete(d){return this.elements.delete(d)}}class r{constructor(d,m,b,E,y,T,R){this.id=++c,this.type=1,this.actual=d,this.label=d.label,this.confirmBeforeUndo=d.confirmBeforeUndo||!1,this.resourceLabels=m,this.strResources=b,this.groupId=E,this.groupOrder=y,this.sourceId=T,this.sourceOrder=R,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(d,m,b){this.removedResources||(this.removedResources=new l),this.removedResources.has(m)||this.removedResources.set(m,new s(d,b))}setValid(d,m,b){b?this.invalidatedResources&&(this.invalidatedResources.delete(m),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new l),this.invalidatedResources.has(m)||this.invalidatedResources.set(m,new s(d,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class p{constructor(d,m){this.resourceLabel=d,this.strResource=m,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const d of this._past)d.type===1&&d.removeResource(this.resourceLabel,this.strResource,0);for(const d of this._future)d.type===1&&d.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){let d=[];d.push(`* ${this.strResource}:`);for(let m=0;m<this._past.length;m++)d.push(` * [UNDO] ${this._past[m]}`);for(let m=this._future.length-1;m>=0;m--)d.push(` * [REDO] ${this._future[m]}`);return d.join(` `)}flushAllElements(){this._past=[],this._future=[],this.versionId++}setElementsIsValid(d){for(const m of this._past)m.type===1?m.setValid(this.resourceLabel,this.strResource,d):m.setValid(d);for(const m of this._future)m.type===1?m.setValid(this.resourceLabel,this.strResource,d):m.setValid(d)}_setElementValidFlag(d,m){d.type===1?d.setValid(this.resourceLabel,this.strResource,m):d.setValid(m)}setElementsValidFlag(d,m){for(const b of this._past)m(b.actual)&&this._setElementValidFlag(b,d);for(const b of this._future)m(b.actual)&&this._setElementValidFlag(b,d)}pushElement(d){for(const m of this._future)m.type===1&&m.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(d),this.versionId++}createSnapshot(d){const m=[];for(let b=0,E=this._past.length;b<E;b++)m.push(this._past[b].id);for(let b=this._future.length-1;b>=0;b--)m.push(this._future[b].id);return new v.ResourceEditStackSnapshot(d,m)}restoreSnapshot(d){const m=d.elements.length;let b=!0,E=0,y=-1;for(let R=0,O=this._past.length;R<O;R++,E++){const x=this._past[R];b&&(E>=m||x.id!==d.elements[E])&&(b=!1,y=0),!b&&x.type===1&&x.removeResource(this.resourceLabel,this.strResource,0)}let T=-1;for(let R=this._future.length-1;R>=0;R--,E++){const O=this._future[R];b&&(E>=m||O.id!==d.elements[E])&&(b=!1,T=R),!b&&O.type===1&&O.removeResource(this.resourceLabel,this.strResource,0)}y!==-1&&(this._past=this._past.slice(0,y)),T!==-1&&(this._future=this._future.slice(T+1)),this.versionId++}getElements(){const d=[],m=[];for(const b of this._past)d.push(b.actual);for(const b of this._future)m.push(b.actual);return{past:d,future:m}}getClosestPastElement(){return this._past.length===0?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return this._future.length===0?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(d,m){for(let b=this._past.length-1;b>=0;b--)if(this._past[b]===d){m.has(this.strResource)?this._past[b]=m.get(this.strResource):this._past.splice(b,1);break}this.versionId++}splitFutureWorkspaceElement(d,m){for(let b=this._future.length-1;b>=0;b--)if(this._future[b]===d){m.has(this.strResource)?this._future[b]=m.get(this.strResource):this._future.splice(b,1);break}this.versionId++}moveBackward(d){this._past.pop(),this._future.push(d),this.versionId++}moveForward(d){this._future.pop(),this._past.push(d),this.versionId++}}class u{constructor(d){this.editStacks=d,this._versionIds=[];for(let m=0,b=this.editStacks.length;m<b;m++)this._versionIds[m]=this.editStacks[m].versionId}isValid(){for(let d=0,m=this.editStacks.length;d<m;d++)if(this._versionIds[d]!==this.editStacks[d].versionId)return!1;return!0}}const a=new p("","");a.locked=!0;let n=class{constructor(d,m){this._dialogService=d,this._notificationService=m,this._editStacks=new Map,this._uriComparisonKeyComputers=[]}registerUriComparisonKeyComputer(d,m){return this._uriComparisonKeyComputers.push([d,m]),{dispose:()=>{for(let b=0,E=this._uriComparisonKeyComputers.length;b<E;b++)if(this._uriComparisonKeyComputers[b][1]===m){this._uriComparisonKeyComputers.splice(b,1);return}}}}getUriComparisonKey(d){for(const m of this._uriComparisonKeyComputers)if(m[0]===d.scheme)return m[1].getComparisonKey(d);return d.toString()}_print(d){console.log("------------------------------------"),console.log(`AFTER ${d}: `);let m=[];for(const b of this._editStacks)m.push(b[1].toString());console.log(m.join(` `))}pushElement(d,m=v.UndoRedoGroup.None,b=v.UndoRedoSource.None){if(d.type===0){const E=o(d.resource),y=this.getUriComparisonKey(d.resource);this._pushElement(new i(d,E,y,m.id,m.nextOrder(),b.id,b.nextOrder()))}else{const E=new Set,y=[],T=[];for(const R of d.resources){const O=o(R),x=this.getUriComparisonKey(R);E.has(x)||(E.add(x),y.push(O),T.push(x))}y.length===1?this._pushElement(new i(d,y[0],T[0],m.id,m.nextOrder(),b.id,b.nextOrder())):this._pushElement(new r(d,y,T,m.id,m.nextOrder(),b.id,b.nextOrder()))}C&&this._print("pushElement")}_pushElement(d){for(let m=0,b=d.strResources.length;m<b;m++){const E=d.resourceLabels[m],y=d.strResources[m];let T;this._editStacks.has(y)?T=this._editStacks.get(y):(T=new p(E,y),this._editStacks.set(y,T)),T.pushElement(d)}}getLastElement(d){const m=this.getUriComparisonKey(d);if(this._editStacks.has(m)){const b=this._editStacks.get(m);if(b.hasFutureElements())return null;const E=b.getClosestPastElement();return E?E.actual:null}return null}_splitPastWorkspaceElement(d,m){const b=d.actual.split(),E=new Map;for(const y of b){const T=o(y.resource),R=this.getUriComparisonKey(y.resource),O=new i(y,T,R,0,0,0,0);E.set(O.strResource,O)}for(const y of d.strResources){if(m&&m.has(y))continue;this._editStacks.get(y).splitPastWorkspaceElement(d,E)}}_splitFutureWorkspaceElement(d,m){const b=d.actual.split(),E=new Map;for(const y of b){const T=o(y.resource),R=this.getUriComparisonKey(y.resource),O=new i(y,T,R,0,0,0,0);E.set(O.strResource,O)}for(const y of d.strResources){if(m&&m.has(y))continue;this._editStacks.get(y).splitFutureWorkspaceElement(d,E)}}removeElements(d){const m=typeof d=="string"?d:this.getUriComparisonKey(d);this._editStacks.has(m)&&(this._editStacks.get(m).dispose(),this._editStacks.delete(m)),C&&this._print("removeElements")}setElementsValidFlag(d,m,b){const E=this.getUriComparisonKey(d);this._editStacks.has(E)&&this._editStacks.get(E).setElementsValidFlag(m,b),C&&this._print("setElementsValidFlag")}hasElements(d){const m=this.getUriComparisonKey(d);if(this._editStacks.has(m)){const b=this._editStacks.get(m);return b.hasPastElements()||b.hasFutureElements()}return!1}createSnapshot(d){const m=this.getUriComparisonKey(d);return this._editStacks.has(m)?this._editStacks.get(m).createSnapshot(d):new v.ResourceEditStackSnapshot(d,[])}restoreSnapshot(d){const m=this.getUriComparisonKey(d.resource);if(this._editStacks.has(m)){const b=this._editStacks.get(m);b.restoreSnapshot(d),!b.hasPastElements()&&!b.hasFutureElements()&&(b.dispose(),this._editStacks.delete(m))}C&&this._print("restoreSnapshot")}getElements(d){const m=this.getUriComparisonKey(d);return this._editStacks.has(m)?this._editStacks.get(m).getElements():{past:[],future:[]}}_findClosestUndoElementWithSource(d){if(!d)return[null,null];let m=null,b=null;for(const[E,y]of this._editStacks){const T=y.getClosestPastElement();!T||T.sourceId===d&&(!m||T.sourceOrder>m.sourceOrder)&&(m=T,b=E)}return[m,b]}canUndo(d){if(d instanceof v.UndoRedoSource){const[,b]=this._findClosestUndoElementWithSource(d.id);return!!b}const m=this.getUriComparisonKey(d);return this._editStacks.has(m)?this._editStacks.get(m).hasPastElements():!1}_onError(d,m){(0,t.onUnexpectedError)(d);for(const b of m.strResources)this.removeElements(b);this._notificationService.error(d)}_acquireLocks(d){for(const m of d.editStacks)if(m.locked)throw new Error("Cannot acquire edit stack lock");for(const m of d.editStacks)m.locked=!0;return()=>{for(const m of d.editStacks)m.locked=!1}}_safeInvokeWithLocks(d,m,b,E,y){const T=this._acquireLocks(b);let R;try{R=m()}catch(O){return T(),E.dispose(),this._onError(O,d)}return R?R.then(()=>(T(),E.dispose(),y()),O=>(T(),E.dispose(),this._onError(O,d))):(T(),E.dispose(),y())}async _invokeWorkspacePrepare(d){if(typeof d.actual.prepareUndoRedo=="undefined")return f.Disposable.None;const m=d.actual.prepareUndoRedo();return typeof m=="undefined"?f.Disposable.None:m}_invokeResourcePrepare(d,m){if(d.actual.type!==1||typeof d.actual.prepareUndoRedo=="undefined")return m(f.Disposable.None);const b=d.actual.prepareUndoRedo();return b?(0,f.isDisposable)(b)?m(b):b.then(E=>m(E)):m(f.Disposable.None)}_getAffectedEditStacks(d){const m=[];for(const b of d.strResources)m.push(this._editStacks.get(b)||a);return new u(m)}_tryToSplitAndUndo(d,m,b,E){if(m.canSplit())return this._splitPastWorkspaceElement(m,b),this._notificationService.warn(E),new h(this._undo(d,0,!0));for(const y of m.strResources)this.removeElements(y);return this._notificationService.warn(E),new h}_checkWorkspaceUndo(d,m,b,E){if(m.removedResources)return this._tryToSplitAndUndo(d,m,m.removedResources,k.localize(2,null,m.label,m.removedResources.createMessage()));if(E&&m.invalidatedResources)return this._tryToSplitAndUndo(d,m,m.invalidatedResources,k.localize(3,null,m.label,m.invalidatedResources.createMessage()));const y=[];for(const R of b.editStacks)R.getClosestPastElement()!==m&&y.push(R.resourceLabel);if(y.length>0)return this._tryToSplitAndUndo(d,m,null,k.localize(4,null,m.label,y.join(", ")));const T=[];for(const R of b.editStacks)R.locked&&T.push(R.resourceLabel);return T.length>0?this._tryToSplitAndUndo(d,m,null,k.localize(5,null,m.label,T.join(", "))):b.isValid()?null:this._tryToSplitAndUndo(d,m,null,k.localize(6,null,m.label))}_workspaceUndo(d,m,b){const E=this._getAffectedEditStacks(m),y=this._checkWorkspaceUndo(d,m,E,!1);return y?y.returnValue:this._confirmAndExecuteWorkspaceUndo(d,m,E,b)}_isPartOfUndoGroup(d){if(!d.groupId)return!1;for(const[,m]of this._editStacks){const b=m.getClosestPastElement();if(!!b){if(b===d){const E=m.getSecondClosestPastElement();if(E&&E.groupId===d.groupId)return!0}if(b.groupId===d.groupId)return!0}}return!1}async _confirmAndExecuteWorkspaceUndo(d,m,b,E){if(m.canSplit()&&!this._isPartOfUndoGroup(m)){const R=await this._dialogService.show(A.default.Info,k.localize(7,null,m.label),[k.localize(8,null,b.editStacks.length),k.localize(9,null),k.localize(10,null)],{cancelId:2});if(R.choice===2)return;if(R.choice===1)return this._splitPastWorkspaceElement(m,null),this._undo(d,0,!0);const O=this._checkWorkspaceUndo(d,m,b,!1);if(O)return O.returnValue;E=!0}let y;try{y=await this._invokeWorkspacePrepare(m)}catch(R){return this._onError(R,m)}const T=this._checkWorkspaceUndo(d,m,b,!0);if(T)return y.dispose(),T.returnValue;for(const R of b.editStacks)R.moveBackward(m);return this._safeInvokeWithLocks(m,()=>m.actual.undo(),b,y,()=>this._continueUndoInGroup(m.groupId,E))}_resourceUndo(d,m,b){if(!m.isValid){d.flushAllElements();return}if(d.locked){const E=k.localize(11,null,m.label);this._notificationService.warn(E);return}return this._invokeResourcePrepare(m,E=>(d.moveBackward(m),this._safeInvokeWithLocks(m,()=>m.actual.undo(),new u([d]),E,()=>this._continueUndoInGroup(m.groupId,b))))}_findClosestUndoElementInGroup(d){if(!d)return[null,null];let m=null,b=null;for(const[E,y]of this._editStacks){const T=y.getClosestPastElement();!T||T.groupId===d&&(!m||T.groupOrder>m.groupOrder)&&(m=T,b=E)}return[m,b]}_continueUndoInGroup(d,m){if(!d)return;const[,b]=this._findClosestUndoElementInGroup(d);if(b)return this._undo(b,0,m)}undo(d){if(d instanceof v.UndoRedoSource){const[,m]=this._findClosestUndoElementWithSource(d.id);return m?this._undo(m,d.id,!1):void 0}return typeof d=="string"?this._undo(d,0,!1):this._undo(this.getUriComparisonKey(d),0,!1)}_undo(d,m=0,b){if(!this._editStacks.has(d))return;const E=this._editStacks.get(d),y=E.getClosestPastElement();if(!y)return;if(y.groupId){const[R,O]=this._findClosestUndoElementInGroup(y.groupId);if(y!==R&&O)return this._undo(O,m,b)}if((y.sourceId!==m||y.confirmBeforeUndo)&&!b)return this._confirmAndContinueUndo(d,m,y);try{return y.type===1?this._workspaceUndo(d,y,b):this._resourceUndo(E,y,b)}finally{C&&this._print("undo")}}async _confirmAndContinueUndo(d,m,b){if((await this._dialogService.show(A.default.Info,k.localize(12,null,b.label),[k.localize(13,null),k.localize(14,null)],{cancelId:1})).choice!==1)return this._undo(d,m,!0)}_findClosestRedoElementWithSource(d){if(!d)return[null,null];let m=null,b=null;for(const[E,y]of this._editStacks){const T=y.getClosestFutureElement();!T||T.sourceId===d&&(!m||T.sourceOrder<m.sourceOrder)&&(m=T,b=E)}return[m,b]}canRedo(d){if(d instanceof v.UndoRedoSource){const[,b]=this._findClosestRedoElementWithSource(d.id);return!!b}const m=this.getUriComparisonKey(d);return this._editStacks.has(m)?this._editStacks.get(m).hasFutureElements():!1}_tryToSplitAndRedo(d,m,b,E){if(m.canSplit())return this._splitFutureWorkspaceElement(m,b),this._notificationService.warn(E),new h(this._redo(d));for(const y of m.strResources)this.removeElements(y);return this._notificationService.warn(E),new h}_checkWorkspaceRedo(d,m,b,E){if(m.removedResources)return this._tryToSplitAndRedo(d,m,m.removedResources,k.localize(15,null,m.label,m.removedResources.createMessage()));if(E&&m.invalidatedResources)return this._tryToSplitAndRedo(d,m,m.invalidatedResources,k.localize(16,null,m.label,m.invalidatedResources.createMessage()));const y=[];for(const R of b.editStacks)R.getClosestFutureElement()!==m&&y.push(R.resourceLabel);if(y.length>0)return this._tryToSplitAndRedo(d,m,null,k.localize(17,null,m.label,y.join(", ")));const T=[];for(const R of b.editStacks)R.locked&&T.push(R.resourceLabel);return T.length>0?this._tryToSplitAndRedo(d,m,null,k.localize(18,null,m.label,T.join(", "))):b.isValid()?null:this._tryToSplitAndRedo(d,m,null,k.localize(19,null,m.label))}_workspaceRedo(d,m){const b=this._getAffectedEditStacks(m),E=this._checkWorkspaceRedo(d,m,b,!1);return E?E.returnValue:this._executeWorkspaceRedo(d,m,b)}async _executeWorkspaceRedo(d,m,b){let E;try{E=await this._invokeWorkspacePrepare(m)}catch(T){return this._onError(T,m)}const y=this._checkWorkspaceRedo(d,m,b,!0);if(y)return E.dispose(),y.returnValue;for(const T of b.editStacks)T.moveForward(m);return this._safeInvokeWithLocks(m,()=>m.actual.redo(),b,E,()=>this._continueRedoInGroup(m.groupId))}_resourceRedo(d,m){if(!m.isValid){d.flushAllElements();return}if(d.locked){const b=k.localize(20,null,m.label);this._notificationService.warn(b);return}return this._invokeResourcePrepare(m,b=>(d.moveForward(m),this._safeInvokeWithLocks(m,()=>m.actual.redo(),new u([d]),b,()=>this._continueRedoInGroup(m.groupId))))}_findClosestRedoElementInGroup(d){if(!d)return[null,null];let m=null,b=null;for(const[E,y]of this._editStacks){const T=y.getClosestFutureElement();!T||T.groupId===d&&(!m||T.groupOrder<m.groupOrder)&&(m=T,b=E)}return[m,b]}_continueRedoInGroup(d){if(!d)return;const[,m]=this._findClosestRedoElementInGroup(d);if(m)return this._redo(m)}redo(d){if(d instanceof v.UndoRedoSource){const[,m]=this._findClosestRedoElementWithSource(d.id);return m?this._redo(m):void 0}return typeof d=="string"?this._redo(d):this._redo(this.getUriComparisonKey(d))}_redo(d){if(!this._editStacks.has(d))return;const m=this._editStacks.get(d),b=m.getClosestFutureElement();if(!!b){if(b.groupId){const[E,y]=this._findClosestRedoElementInGroup(b.groupId);if(b!==E&&y)return this._redo(y)}try{return b.type===1?this._workspaceRedo(d,b):this._resourceRedo(m,b)}finally{C&&this._print("redo")}}}};n=Ee([W(0,D.IDialogService),W(1,w.INotificationService)],n),e.UndoRedoService=n;class h{constructor(d){this.returnValue=d}}(0,I.registerSingleton)(v.IUndoRedoService,n)}),define(ne[264],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IUpdateService=e.State=e.UpdateType=e.StateType=void 0;var f;(function(A){A.Uninitialized="uninitialized",A.Idle="idle",A.CheckingForUpdates="checking for updates",A.AvailableForDownload="available for download",A.Downloading="downloading",A.Downloaded="downloaded",A.Updating="updating",A.Ready="ready"})(f=e.StateType||(e.StateType={}));var _;(function(A){A[A.Setup=0]="Setup",A[A.Archive=1]="Archive",A[A.Snap=2]="Snap"})(_=e.UpdateType||(e.UpdateType={})),e.State={Uninitialized:{type:"uninitialized"},Idle:(A,k)=>({type:"idle",updateType:A,error:k}),CheckingForUpdates:A=>({type:"checking for updates",explicit:A}),AvailableForDownload:A=>({type:"available for download",update:A}),Downloading:A=>({type:"downloading",update:A}),Downloaded:A=>({type:"downloaded",update:A}),Updating:A=>({type:"updating",update:A}),Ready:A=>({type:"ready",update:A})},e.IUpdateService=(0,t.createDecorator)("updateService")}),define(ne[2085],re([1,0,14,1344,57,17]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),A.Registry.as(_.Extensions.Configuration).registerConfiguration({id:"update",order:15,title:(0,f.localize)(0,null),type:"object",properties:{"update.mode":{type:"string",enum:["none","manual","start","default"],default:"default",scope:1,description:(0,f.localize)(1,null),tags:["usesOnlineServices"],enumDescriptions:[(0,f.localize)(2,null),(0,f.localize)(3,null),(0,f.localize)(4,null),(0,f.localize)(5,null)]},"update.channel":{type:"string",default:"default",scope:1,description:(0,f.localize)(6,null),deprecationMessage:(0,f.localize)(7,null,"update.mode")},"update.enableWindowsBackgroundUpdates":{type:"boolean",default:!0,scope:1,title:(0,f.localize)(8,null),description:(0,f.localize)(9,null),included:t.isWindows&&!t.isWeb},"update.showReleaseNotes":{type:"boolean",default:!0,scope:1,description:(0,f.localize)(10,null),tags:["usesOnlineServices"]}}})}),define(ne[2086],re([1,0,6,264]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UpdateChannelClient=e.UpdateChannel=void 0;class _{constructor(D){this.service=D}listen(D,I){switch(I){case"onStateChange":return this.service.onStateChange}throw new Error(`Event not found: ${I}`)}call(D,I,w){switch(I){case"checkForUpdates":return this.service.checkForUpdates(w);case"downloadUpdate":return this.service.downloadUpdate();case"applyUpdate":return this.service.applyUpdate();case"quitAndInstall":return this.service.quitAndInstall();case"_getInitialState":return Promise.resolve(this.service.state);case"isLatestVersion":return this.service.isLatestVersion()}throw new Error(`Call not found: ${I}`)}}e.UpdateChannel=_;class A{constructor(D){this.channel=D,this._onStateChange=new t.Emitter,this.onStateChange=this._onStateChange.event,this._state=f.State.Uninitialized,this.channel.listen("onStateChange")(I=>this.state=I),this.channel.call("_getInitialState").then(I=>this.state=I)}get state(){return this._state}set state(D){this._state=D,this._onStateChange.fire(D)}checkForUpdates(D){return this.channel.call("checkForUpdates",D)}downloadUpdate(){return this.channel.call("downloadUpdate")}applyUpdate(){return this.channel.call("applyUpdate")}quitAndInstall(){return this.channel.call("quitAndInstall")}isLatestVersion(){return this.channel.call("isLatestVersion")}}e.UpdateChannelClient=A}),define(ne[56],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IUriIdentityService=void 0,e.IUriIdentityService=(0,t.createDecorator)("IUriIdentityService")}),define(ne[2087],re([1,0,56,35,23,19,958,6,2]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UriIdentityService=void 0;class w{constructor(o){this.uri=o,this.time=w._clock++}touch(){return this.time=w._clock++,this}}w._clock=0;let v=class{constructor(o){this._fileService=o,this._dispooables=new I.DisposableStore,this._limit=2**16;const c=new Map,i=S=>{let s=c.get(S.scheme);return s===void 0&&(s=o.hasProvider(S)&&!this._fileService.hasCapability(S,1024),c.set(S.scheme,s)),s};this._dispooables.add(D.Event.any(o.onDidChangeFileSystemProviderRegistrations,o.onDidChangeFileSystemProviderCapabilities)(S=>{c.delete(S.scheme)})),this.extUri=new A.ExtUri(i),this._canonicalUris=new k.SkipList((S,s)=>this.extUri.compare(S,s,!0),this._limit)}dispose(){this._dispooables.dispose(),this._canonicalUris.clear()}asCanonicalUri(o){this._fileService.hasProvider(o)&&(o=(0,A.normalizePath)(o));let c=this._canonicalUris.get(o);return c?c.touch().uri.with({fragment:o.fragment}):(this._canonicalUris.set(o,new w(o)),this._checkTrim(),o)}_checkTrim(){if(this._canonicalUris.size<this._limit)return;const o=[...this._canonicalUris.entries()].sort((i,S)=>i[1].touch<S[1].touch?1:i[1].touch>S[1].touch?-1:0);w._clock=0,this._canonicalUris.clear();const c=this._limit*.5;for(let i=0;i<c;i++)this._canonicalUris.set(o[i][0],o[i][1].touch())}};v=Ee([W(0,_.IFileService)],v),e.UriIdentityService=v,(0,f.registerSingleton)(t.IUriIdentityService,v,!0)}),define(ne[407],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IURLService=void 0,e.IURLService=(0,t.createDecorator)("urlService")}),define(ne[2088],re([1,0,9]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.URLHandlerRouter=e.URLHandlerChannelClient=e.URLHandlerChannel=void 0;class f{constructor(D){this.handler=D}listen(D,I){throw new Error(`Event not found: ${I}`)}call(D,I,w){switch(I){case"handleURL":return this.handler.handleURL(t.URI.revive(w[0]),w[1])}throw new Error(`Call not found: ${I}`)}}e.URLHandlerChannel=f;class _{constructor(D){this.channel=D}handleURL(D,I){return this.channel.call("handleURL",[D.toJSON(),I])}}e.URLHandlerChannelClient=_;class A{constructor(D){this.next=D}async routeCall(D,I,w,v){if(I!=="handleURL")throw new Error(`Call not found: ${I}`);if(w){const C=t.URI.revive(w);if(C&&C.query){const o=/\bwindowId=(\d+)/.exec(C.query);if(o){const c=o[1],i=new RegExp(`window:${c}`),S=D.connections.find(s=>i.test(s.ctx));if(S)return S}}}return this.next.routeCall(D,I,w,v)}routeEvent(D,I){throw new Error(`Event not found: ${I}`)}}e.URLHandlerRouter=A}),define(ne[2089],re([1,0,11,2,9,46]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeURLService=e.AbstractURLService=void 0;class k extends f.Disposable{constructor(){super(...arguments);this.handlers=new Set}open(w,v){const C=[...this.handlers.values()];return(0,t.first)(C.map(o=>()=>o.handleURL(w,v)),void 0,!1).then(o=>o||!1)}registerHandler(w){return this.handlers.add(w),(0,f.toDisposable)(()=>this.handlers.delete(w))}}e.AbstractURLService=k;let D=class extends k{constructor(w){super();this.productService=w}create(w){let{authority:v,path:C,query:o,fragment:c}=w||{authority:void 0,path:void 0,query:void 0,fragment:void 0};return v&&C&&C.indexOf("/")!==0&&(C=`/${C}`),_.URI.from({scheme:this.productService.urlProtocol,authority:v,path:C,query:o,fragment:c})}};D=Ee([W(0,A.IProductService)],D),e.NativeURLService=D}),define(ne[2090],re([1,0,6,2,206,55,60]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileUserDataProvider=void 0;class D extends f.Disposable{constructor(w,v,C,o){super();this.fileSystemScheme=w,this.fileSystemProvider=v,this.userDataScheme=C,this.logService=o,this.onDidChangeCapabilities=this.fileSystemProvider.onDidChangeCapabilities,this._onDidChangeFile=this._register(new t.Emitter),this.onDidChangeFile=this._onDidChangeFile.event,this.watchResources=A.TernarySearchTree.forUris(()=>!(this.capabilities&1024)),this._register(this.fileSystemProvider.onDidChangeFile(c=>this.handleFileChanges(c)))}get capabilities(){return this.fileSystemProvider.capabilities&~4}watch(w,v){this.watchResources.set(w,w);const C=this.fileSystemProvider.watch(this.toFileSystemResource(w),v);return(0,f.toDisposable)(()=>{this.watchResources.delete(w),C.dispose()})}stat(w){return this.fileSystemProvider.stat(this.toFileSystemResource(w))}mkdir(w){return this.fileSystemProvider.mkdir(this.toFileSystemResource(w))}rename(w,v,C){return this.fileSystemProvider.rename(this.toFileSystemResource(w),this.toFileSystemResource(v),C)}readFile(w){return this.fileSystemProvider.readFile(this.toFileSystemResource(w),{atomic:!0})}readFileStream(w,v,C){const o=(0,_.newWriteableStream)(c=>k.VSBuffer.concat(c.map(i=>k.VSBuffer.wrap(i))).buffer);return(async()=>{try{const c=await this.readFile(w);o.end(c)}catch(c){o.error(c),o.end()}})(),o}readdir(w){return this.fileSystemProvider.readdir(this.toFileSystemResource(w))}writeFile(w,v,C){return this.fileSystemProvider.writeFile(this.toFileSystemResource(w),v,C)}delete(w,v){return this.fileSystemProvider.delete(this.toFileSystemResource(w),v)}handleFileChanges(w){const v=[];for(const C of w){if(C.resource.scheme!==this.fileSystemScheme)continue;const o=this.toUserDataResource(C.resource);this.watchResources.findSubstr(o)&&v.push({resource:o,type:C.type})}v.length&&(this.logService.debug("User data changed"),this._onDidChangeFile.fire(v))}toFileSystemResource(w){return w.with({scheme:this.fileSystemScheme})}toUserDataResource(w){return w.with({scheme:this.userDataScheme})}}e.FileUserDataProvider=D}),define(ne[478],re([1,0,302]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLineEndOffset=e.getLineStartOffset=e.edit=void 0;function f(k,D,I,w){const v=(0,t.setProperty)(k,D,I,w)[0];return v&&(k=k.substring(0,v.offset)+v.content+k.substring(v.offset+v.length)),k}e.edit=f;function _(k,D,I){let w=I;for(;w>=0;){if(k.charAt(w)===D.charAt(D.length-1)&&D.length===1)return w+1;if(w--,D.length===2&&w>=0&&k.charAt(w)===D.charAt(0))return w+2}return 0}e.getLineStartOffset=_;function A(k,D,I){let w=I;for(;w>=0;)if(k.charAt(w)===D.charAt(D.length-1)&&D.length===1||(w++,D.length===2&&w>=0&&k.charAt(w)===D.charAt(1)))return w;return k.length-1}e.getLineEndOffset=A}),define(ne[2091],re([1,0,51,401,13]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.merge=void 0;function A(o,c,i,S,s){const l=[],r=[],p=[];if(!c){const x=o.filter(({identifier:F})=>s.every(L=>L.toLowerCase()!==F.id.toLowerCase()));return{local:{added:l,removed:r,updated:p},remote:x.length>0?{added:x,updated:[],removed:[],all:x}:null}}o=o.map(v),c=c.map(v),i=i?i.map(v):null;const u=new Map,a=x=>{x.uuid&&u.set(x.id.toLowerCase(),x.uuid)};o.forEach(({identifier:x})=>a(x)),c.forEach(({identifier:x})=>a(x)),i&&i.forEach(({identifier:x})=>a(x));const n=x=>{const F=x.identifier.uuid||u.get(x.identifier.id.toLowerCase());return F?`uuid:${F}`:`id:${x.identifier.id.toLowerCase()}`},h=(x,F)=>(x.set(n(F),F),x),g=o.reduce(h,new Map),d=c.reduce(h,new Map),m=c.reduce((x,F)=>{const L=n(F);F=(0,t.deepClone)(F);const M=g.get(L);return M&&(M.installed&&(F.installed=!0),F.version||(F.version=M.version)),h(x,F)},new Map),b=i?i.reduce(h,new Map):null,E=S.reduce(h,new Map),y=s.reduce((x,F)=>{const L=u.get(F.toLowerCase());return x.add(L?`uuid:${L}`:`id:${F.toLowerCase()}`)},new Set),T=k(g,d,y);if(T.added.size>0||T.removed.size>0||T.updated.size>0){const x=k(b,g,y),F=k(b,d,y),L=(M,N)=>{const B=g.get(M);if(B){const P=d.get(M),V=N?P:B;return{...V,version:P.version&&(!B.installed||f.gt(P.version,B.version))?P.version:B.version,state:D(B,P,b?.get(M)),preRelease:(0,_.isUndefined)(V.preRelease)?B.preRelease:B.installed?V.preRelease:P.preRelease}}};for(const M of F.removed.values()){const N=g.get(M);N&&r.push(N.identifier)}for(const M of F.added.values())if(x.added.has(M)){if(T.updated.has(M)){const N=L(M,!0);N&&(p.push(C(N,M)),m.set(M,N))}}else{const N=d.get(M);N.installed&&l.push(C(N,M))}for(const M of F.updated.values()){const N=L(M,!0);N&&(p.push(C(N,M)),m.set(M,N))}for(const M of x.added.values())F.added.has(M)||m.set(M,g.get(M));for(const M of x.updated.values())if(!F.removed.has(M)&&!F.updated.has(M)){const N=L(M,!1);N&&(m.get(M)?.installed&&(N.installed=!0),m.set(M,N))}for(const M of x.removed.values())!E.has(M)&&!F.updated.has(M)&&b?.get(M)?.installed&&m.delete(M)}const R=[],O=k(d,m,new Set,{checkInstalledProperty:!0,checkVersionProperty:!0});return(O.added.size>0||O.updated.size>0||O.removed.size>0)&&m.forEach((x,F)=>R.push(C(x,F))),{local:{added:l,removed:r,updated:p},remote:R.length?{added:[...O.added].map(x=>m.get(x)),updated:[...O.updated].map(x=>m.get(x)),removed:[...O.removed].map(x=>d.get(x)),all:R}:null}}e.merge=A;function k(o,c,i,{checkInstalledProperty:S,checkVersionProperty:s}={checkInstalledProperty:!1,checkVersionProperty:!1}){const l=o?[...o.keys()].filter(n=>!i.has(n)):[],r=[...c.keys()].filter(n=>!i.has(n)),p=r.filter(n=>l.indexOf(n)===-1).reduce((n,h)=>(n.add(h),n),new Set),u=l.filter(n=>r.indexOf(n)===-1).reduce((n,h)=>(n.add(h),n),new Set),a=new Set;for(const n of l){if(u.has(n))continue;const h=o.get(n),g=c.get(n);(!g||h.disabled!==g.disabled||h.installed&&g.installed&&h.preRelease!==g.preRelease||!w(h.state,g.state)||s&&h.version!==g.version||S&&h.installed!==g.installed)&&a.add(n)}return{added:p,removed:u,updated:a}}function D(o,c,i){const S=o.state,s=c.state,l=i?.state;if(!c.version||S&&f.gt(o.version,c.version))return S;if(s&&f.gt(c.version,o.version)||!S)return s;if(!s)return S;const r=(0,t.deepClone)(S),p=l?I(l,s):{added:Object.keys(s).reduce((a,n)=>(a.add(n),a),new Set),removed:new Set,updated:new Set},u=l?I(l,S):{added:Object.keys(S).reduce((a,n)=>(a.add(n),a),new Set),removed:new Set,updated:new Set};for(const a of[...p.added.values(),...p.updated.values()])r[a]=s[a];for(const a of p.removed.values())u.updated.has(a)||delete r[a];return r}function I(o,c){const i=Object.keys(o),S=Object.keys(c),s=S.filter(p=>i.indexOf(p)===-1).reduce((p,u)=>(p.add(u),p),new Set),l=i.filter(p=>S.indexOf(p)===-1).reduce((p,u)=>(p.add(u),p),new Set),r=new Set;for(const p of i){if(l.has(p))continue;const u=o[p],a=c[p];(0,t.equals)(u,a)||r.add(p)}return{added:s,removed:l,updated:r}}function w(o={},c={}){const{added:i,removed:S,updated:s}=I(o,c);return i.size===0&&S.size===0&&s.size===0}function v(o){return{...o,disabled:!!o.disabled,installed:!!o.installed}}function C(o,c){const i={identifier:{id:o.identifier.id,uuid:c.startsWith("uuid:")?c.substring("uuid:".length):void 0},preRelease:!!o.preRelease};return o.version&&(i.version=o.version),o.disabled&&(i.disabled=!0),o.installed&&(i.installed=!0),o.state&&(i.state=o.state),i}}),define(ne[408],re([1,0,15,8,5]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IgnoredExtensionsManagementService=e.IIgnoredExtensionsManagementService=void 0,e.IIgnoredExtensionsManagementService=(0,_.createDecorator)("IIgnoredExtensionsManagementService");let A=class{constructor(D){this.configurationService=D}hasToNeverSyncExtension(D){return this.getConfiguredIgnoredExtensions().includes(D.toLowerCase())}hasToAlwaysSyncExtension(D){return this.getConfiguredIgnoredExtensions().includes(`-${D.toLowerCase()}`)}updateIgnoredExtensions(D,I){let w=[...this.configurationService.getValue("settingsSync.ignoredExtensions")].map(v=>v.toLowerCase());return w=w.filter(v=>v!==D&&v!==`-${D}`),I&&w.push(D.toLowerCase()),this.configurationService.updateValue("settingsSync.ignoredExtensions",w.length?w:void 0,1)}updateSynchronizedExtensions(D,I){let w=[...this.configurationService.getValue("settingsSync.ignoredExtensions")].map(v=>v.toLowerCase());return w=w.filter(v=>v!==D&&v!==`-${D}`),I&&w.push(`-${D.toLowerCase()}`),this.configurationService.updateValue("settingsSync.ignoredExtensions",w.length?w:void 0,1)}getIgnoredExtensions(D){const I=D.filter(o=>o.isMachineScoped).map(o=>o.identifier.id.toLowerCase()),w=this.getConfiguredIgnoredExtensions().map(o=>o.toLowerCase()),v=[],C=[];if(Array.isArray(w))for(const o of w)o.startsWith("-")?C.push(o.substring(1)):v.push(o);return(0,t.distinct)([...I,...v].filter(o=>C.indexOf(o)===-1))}getConfiguredIgnoredExtensions(){let D=this.configurationService.inspect("settingsSync.ignoredExtensions").userValue;return D!==void 0||(D=this.configurationService.inspect("sync.ignoredExtensions").userValue,D!==void 0)?D:(this.configurationService.getValue("settingsSync.ignoredExtensions")||[]).map(I=>I.toLowerCase())}};A=Ee([W(0,f.IConfigurationService)],A),e.IgnoredExtensionsManagementService=A}),define(ne[2092],re([1,0,15,118,51,7,478]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.merge=e.parseKeybindings=void 0;function D(u){return(0,f.parse)(u)||[]}e.parseKeybindings=D;async function I(u,a,n,h,g){const d=D(u),m=D(a),b=n?D(n):null,E=[...d,...m,...b||[]].map(P=>P.key),y=await g.resolveUserBindings(E);let T=v(d,m,b,y);if(!T.hasLocalForwarded&&!T.hasRemoteForwarded)return{mergeContent:u,hasChanges:!1,hasConflicts:!1};if(!T.hasLocalForwarded&&T.hasRemoteForwarded)return{mergeContent:a,hasChanges:!0,hasConflicts:!1};if(T.hasLocalForwarded&&!T.hasRemoteForwarded)return{mergeContent:u,hasChanges:!0,hasConflicts:!1};const R=o(d),O=o(m),x=b?o(b):null,F=i(R,O,y),L=x?i(x,R,y):{added:[...R.keys()].reduce((P,V)=>(P.add(V),P),new Set),removed:new Set,updated:new Set},M=x?i(x,O,y):{added:[...O.keys()].reduce((P,V)=>(P.add(V),P),new Set),removed:new Set,updated:new Set},N=w(F,L,M);let B=u;for(const P of N.removed.values())N.conflicts.has(P)||(B=r(B,P,h));for(const P of N.added.values()){if(N.conflicts.has(P))continue;const V=O.get(P);if(V.some(z=>z.command!==`-${P}`&&T.conflicts.has(y[z.key]))){N.conflicts.add(P);continue}B=l(B,V,h)}for(const P of N.updated.values()){if(N.conflicts.has(P))continue;const V=O.get(P);if(V.some(z=>z.command!==`-${P}`&&T.conflicts.has(y[z.key]))){N.conflicts.add(P);continue}B=p(B,P,V,h)}return{mergeContent:B,hasChanges:!0,hasConflicts:N.conflicts.size>0}}e.merge=I;function w(u,a,n){const h=new Set,g=new Set,d=new Set,m=new Set;for(const b of a.removed.values())n.updated.has(b)&&m.add(b);for(const b of n.removed.values())m.has(b)||(a.updated.has(b)?m.add(b):g.add(b));for(const b of a.added.values())m.has(b)||n.added.has(b)&&u.updated.has(b)&&m.add(b);for(const b of n.added.values())m.has(b)||(a.added.has(b)?u.updated.has(b)&&m.add(b):h.add(b));for(const b of a.updated.values())m.has(b)||n.updated.has(b)&&u.updated.has(b)&&m.add(b);for(const b of n.updated.values())m.has(b)||(a.updated.has(b)?u.updated.has(b)&&m.add(b):d.add(b));return{added:h,removed:g,updated:d,conflicts:m}}function v(u,a,n,h){const g=new Set,d=C(u,h),m=C(a,h),b=n?C(n,h):null,E=c(d,m);if(E.added.size===0&&E.removed.size===0&&E.updated.size===0)return{hasLocalForwarded:!1,hasRemoteForwarded:!1,added:g,removed:g,updated:g,conflicts:g};const y=b?c(b,d):{added:[...d.keys()].reduce((L,M)=>(L.add(M),L),new Set),removed:new Set,updated:new Set};if(y.added.size===0&&y.removed.size===0&&y.updated.size===0)return{hasLocalForwarded:!1,hasRemoteForwarded:!0,added:g,removed:g,updated:g,conflicts:g};const T=b?c(b,m):{added:[...m.keys()].reduce((L,M)=>(L.add(M),L),new Set),removed:new Set,updated:new Set};if(T.added.size===0&&T.removed.size===0&&T.updated.size===0)return{hasLocalForwarded:!0,hasRemoteForwarded:!1,added:g,removed:g,updated:g,conflicts:g};const{added:R,removed:O,updated:x,conflicts:F}=w(E,y,T);return{hasLocalForwarded:!0,hasRemoteForwarded:!0,added:R,removed:O,updated:x,conflicts:F}}function C(u,a){const n=new Map;for(const h of u){const g=a[h.key];let d=n.get(g);d||(d=[],n.set(g,d)),d.push(h)}return n}function o(u){const a=new Map;for(const n of u){const h=n.command[0]==="-"?n.command.substring(1):n.command;let g=a.get(h);g||(g=[],a.set(h,g)),g.push(n)}return a}function c(u,a){const n=[...u.keys()],h=[...a.keys()],g=h.filter(b=>n.indexOf(b)===-1).reduce((b,E)=>(b.add(E),b),new Set),d=n.filter(b=>h.indexOf(b)===-1).reduce((b,E)=>(b.add(E),b),new Set),m=new Set;for(const b of n){if(d.has(b))continue;const E=u.get(b).map(T=>({...T,key:b})),y=a.get(b).map(T=>({...T,key:b}));(0,t.equals)(E,y,(T,R)=>s(T,R))||m.add(b)}return{added:g,removed:d,updated:m}}function i(u,a,n){const h=[...u.keys()],g=[...a.keys()],d=g.filter(E=>h.indexOf(E)===-1).reduce((E,y)=>(E.add(y),E),new Set),m=h.filter(E=>g.indexOf(E)===-1).reduce((E,y)=>(E.add(y),E),new Set),b=new Set;for(const E of h){if(m.has(E))continue;const y=u.get(E).map(R=>({...R,key:n[R.key]})),T=a.get(E).map(R=>({...R,key:n[R.key]}));S(y,T)||b.add(E)}return{added:d,removed:m,updated:b}}function S(u,a){return!(!(0,t.equals)(u.filter(({command:n})=>n[0]!=="-"),a.filter(({command:n})=>n[0]!=="-"),(n,h)=>s(n,h))||!(0,t.equals)(u.filter(({command:n})=>n[0]==="-"),a.filter(({command:n})=>n[0]==="-"),(n,h)=>s(n,h)))}function s(u,a){if(u.command!==a.command||u.key!==a.key)return!1;const n=A.ContextKeyExpr.deserialize(u.when),h=A.ContextKeyExpr.deserialize(a.when);return!(n&&!h||!n&&h||n&&h&&!n.equals(h)||!_.equals(u.args,a.args))}function l(u,a,n){for(const h of a)u=k.edit(u,[-1],h,n);return u}function r(u,a,n){const h=D(u);for(let g=h.length-1;g>=0;g--)(h[g].command===a||h[g].command===`-${a}`)&&(u=k.edit(u,[g],void 0,n));return u}function p(u,a,n,h){const g=D(u),d=g.findIndex(m=>m.command===a||m.command===`-${a}`);for(let m=g.length-1;m>=0;m--)(g[m].command===a||g[m].command===`-${a}`)&&(u=k.edit(u,[m],void 0,h));for(let m=n.length-1;m>=0;m--)u=k.edit(u,[d],n[m],h);return u}}),define(ne[2093],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.areSame=e.merge=void 0;function t(A,k,D){const I={},w={},v=new Set;if(!k)return{local:{added:I,updated:w,removed:[...v.values()]},remote:{added:A,updated:{},removed:[]},conflicts:[]};const C=f(A,k);if(C.added.size===0&&C.removed.size===0&&C.updated.size===0)return{local:{added:I,updated:w,removed:[...v.values()]},remote:{added:{},updated:{},removed:[]},conflicts:[]};const o=f(D,A),c=f(D,k),i={},S={},s=new Set,l=new Set;for(const r of o.removed.values())c.updated.has(r)?I[r]=k[r]:s.add(r);for(const r of c.removed.values())l.has(r)||(o.updated.has(r)?l.add(r):v.add(r));for(const r of o.updated.values())l.has(r)||(c.updated.has(r)?C.updated.has(r)&&l.add(r):S[r]=A[r]);for(const r of c.updated.values())l.has(r)||(o.updated.has(r)?C.updated.has(r)&&l.add(r):A[r]!==void 0&&(w[r]=k[r]));for(const r of o.added.values())l.has(r)||(c.added.has(r)?C.updated.has(r)&&l.add(r):i[r]=A[r]);for(const r of c.added.values())l.has(r)||(o.added.has(r)?C.updated.has(r)&&l.add(r):I[r]=k[r]);return{local:{added:I,removed:[...v.values()],updated:w},remote:{added:i,removed:[...s.values()],updated:S},conflicts:[...l.values()]}}e.merge=t;function f(A,k){const D=A?Object.keys(A):[],I=k?Object.keys(k):[],w=I.filter(o=>D.indexOf(o)===-1).reduce((o,c)=>(o.add(c),o),new Set),v=D.filter(o=>I.indexOf(o)===-1).reduce((o,c)=>(o.add(c),o),new Set),C=new Set;for(const o of D){if(v.has(o))continue;const c=A[o],i=k[o];c!==i&&C.add(o)}return{added:w,removed:v,updated:C}}function _(A,k){const{added:D,removed:I,updated:w}=f(A,k);return D.size===0&&I.size===0&&w.size===0}e.areSame=_}),define(ne[96],re([1,0,15,19,13,1348,57,79,5,146,17]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSyncResourceFromLocalPreview=e.PREVIEW_DIR_NAME=e.USER_DATA_SYNC_SCHEME=e.IUserDataSyncLogService=e.IUserDataSyncUtilService=e.IUserDataAutoSyncService=e.IUserDataSyncService=e.IUserDataSyncEnablementService=e.getEnablementKey=e.SYNC_SERVICE_URL_TYPE=e.MergeState=e.Change=e.SyncStatus=e.UserDataAutoSyncError=e.UserDataSyncStoreError=e.UserDataSyncError=e.UserDataSyncErrorCode=e.createSyncHeaders=e.HEADER_EXECUTION_ID=e.HEADER_OPERATION_ID=e.IUserDataSyncBackupStoreService=e.IUserDataSyncStoreService=e.IUserDataSyncStoreManagementService=e.getLastSyncResourceUri=e.ALL_SYNC_RESOURCES=e.SyncResource=e.isAuthenticationProvider=e.registerConfiguration=e.USER_DATA_SYNC_CONFIGURATION_SCOPE=e.getDefaultIgnoredSettings=e.getDisallowedIgnoredSettings=e.CONFIGURATION_SYNC_STORE_KEY=void 0,e.CONFIGURATION_SYNC_STORE_KEY="configurationSync.store";function C(){const b=v.Registry.as(k.Extensions.Configuration).getConfigurationProperties();return Object.keys(b).filter(E=>!!b[E].disallowSyncIgnore)}e.getDisallowedIgnoredSettings=C;function o(){const b=v.Registry.as(k.Extensions.Configuration).getConfigurationProperties(),E=Object.keys(b).filter(R=>!!b[R].ignoreSync),y=Object.keys(b).filter(R=>b[R].scope===2||b[R].scope===6),T=C();return(0,t.distinct)([e.CONFIGURATION_SYNC_STORE_KEY,...E,...y,...T])}e.getDefaultIgnoredSettings=o,e.USER_DATA_SYNC_CONFIGURATION_SCOPE="settingsSync";function c(){const b="vscode://schemas/ignoredSettings",E=v.Registry.as(k.Extensions.Configuration);E.registerConfiguration({id:"settingsSync",order:30,title:(0,A.localize)(0,null),type:"object",properties:{"settingsSync.keybindingsPerPlatform":{type:"boolean",description:(0,A.localize)(1,null),default:!0,scope:1,tags:["sync","usesOnlineServices"]},"settingsSync.ignoredExtensions":{type:"array",markdownDescription:(0,A.localize)(2,null),items:[{type:"string",pattern:D.EXTENSION_IDENTIFIER_PATTERN,errorMessage:(0,A.localize)(3,null)}],default:[],scope:1,uniqueItems:!0,disallowSyncIgnore:!0,tags:["sync","usesOnlineServices"]},"settingsSync.ignoredSettings":{type:"array",description:(0,A.localize)(4,null),default:[],scope:1,$ref:b,additionalProperties:!0,uniqueItems:!0,disallowSyncIgnore:!0,tags:["sync","usesOnlineServices"]}}});const y=v.Registry.as(w.Extensions.JSONContribution),T=()=>{const R=C(),O=o().filter(M=>M!==e.CONFIGURATION_SYNC_STORE_KEY),x=Object.keys(k.allSettings.properties).filter(M=>O.indexOf(M)===-1),F=O.filter(M=>R.indexOf(M)===-1),L={items:{type:"string",enum:[...x,...F.map(M=>`-${M}`)]}};y.registerSchema(b,L)};return E.onDidUpdateConfiguration(()=>T())}e.registerConfiguration=c;function i(b){return b&&(0,_.isObject)(b)&&(0,_.isString)(b.id)&&(0,_.isArray)(b.scopes)}e.isAuthenticationProvider=i;var S;(function(b){b.Settings="settings",b.Keybindings="keybindings",b.Snippets="snippets",b.Tasks="tasks",b.Extensions="extensions",b.GlobalState="globalState"})(S=e.SyncResource||(e.SyncResource={})),e.ALL_SYNC_RESOURCES=["settings","keybindings","snippets","tasks","extensions","globalState"];function s(b,E,y){return y.joinPath(E.userDataSyncHome,b,`lastSync${b}.json`)}e.getLastSyncResourceUri=s,e.IUserDataSyncStoreManagementService=(0,I.createDecorator)("IUserDataSyncStoreManagementService"),e.IUserDataSyncStoreService=(0,I.createDecorator)("IUserDataSyncStoreService"),e.IUserDataSyncBackupStoreService=(0,I.createDecorator)("IUserDataSyncBackupStoreService"),e.HEADER_OPERATION_ID="x-operation-id",e.HEADER_EXECUTION_ID="X-Execution-Id";function l(b){const E={};return E[e.HEADER_EXECUTION_ID]=b,E}e.createSyncHeaders=l;var r;(function(b){b.Unauthorized="Unauthorized",b.Conflict="Conflict",b.Gone="Gone",b.PreconditionFailed="PreconditionFailed",b.TooLarge="TooLarge",b.UpgradeRequired="UpgradeRequired",b.PreconditionRequired="PreconditionRequired",b.TooManyRequests="RemoteTooManyRequests",b.TooManyRequestsAndRetryAfter="TooManyRequestsAndRetryAfter",b.RequestFailed="RequestFailed",b.RequestCanceled="RequestCanceled",b.RequestTimeout="RequestTimeout",b.RequestProtocolNotSupported="RequestProtocolNotSupported",b.RequestPathNotEscaped="RequestPathNotEscaped",b.RequestHeadersNotObject="RequestHeadersNotObject",b.NoRef="NoRef",b.EmptyResponse="EmptyResponse",b.TurnedOff="TurnedOff",b.SessionExpired="SessionExpired",b.ServiceChanged="ServiceChanged",b.DefaultServiceChanged="DefaultServiceChanged",b.LocalTooManyRequests="LocalTooManyRequests",b.LocalPreconditionFailed="LocalPreconditionFailed",b.LocalInvalidContent="LocalInvalidContent",b.LocalError="LocalError",b.IncompatibleLocalContent="IncompatibleLocalContent",b.IncompatibleRemoteContent="IncompatibleRemoteContent",b.UnresolvedConflicts="UnresolvedConflicts",b.Unknown="Unknown"})(r=e.UserDataSyncErrorCode||(e.UserDataSyncErrorCode={}));class p extends Error{constructor(E,y,T,R){super(E);this.code=y,this.resource=T,this.operationId=R,this.name=`${this.code} (UserDataSyncError) syncResource:${this.resource||"unknown"} operationId:${this.operationId||"unknown"}`}}e.UserDataSyncError=p;class u extends p{constructor(E,y,T,R,O){super(E,T,void 0,O);this.url=y,this.serverCode=R}}e.UserDataSyncStoreError=u;class a extends p{constructor(E,y){super(E,y)}}e.UserDataAutoSyncError=a,function(b){function E(y){if(y instanceof b)return y;const T=/^(.+) \(UserDataSyncError\) syncResource:(.+) operationId:(.+)$/.exec(y.name);if(T&&T[1]){const R=T[2]==="unknown"?void 0:T[2],O=T[3]==="unknown"?void 0:T[3];return new b(y.message,T[1],R,O)}return new b(y.message,"Unknown")}b.toUserDataSyncError=E}(p=e.UserDataSyncError||(e.UserDataSyncError={}));var n;(function(b){b.Uninitialized="uninitialized",b.Idle="idle",b.Syncing="syncing",b.HasConflicts="hasConflicts"})(n=e.SyncStatus||(e.SyncStatus={}));var h;(function(b){b[b.None=0]="None",b[b.Added=1]="Added",b[b.Modified=2]="Modified",b[b.Deleted=3]="Deleted"})(h=e.Change||(e.Change={}));var g;(function(b){b.Preview="preview",b.Conflict="conflict",b.Accepted="accepted"})(g=e.MergeState||(e.MergeState={})),e.SYNC_SERVICE_URL_TYPE="sync.store.url.type";function d(b){return`sync.enable.${b}`}e.getEnablementKey=d,e.IUserDataSyncEnablementService=(0,I.createDecorator)("IUserDataSyncEnablementService"),e.IUserDataSyncService=(0,I.createDecorator)("IUserDataSyncService"),e.IUserDataAutoSyncService=(0,I.createDecorator)("IUserDataAutoSyncService"),e.IUserDataSyncUtilService=(0,I.createDecorator)("IUserDataSyncUtilService"),e.IUserDataSyncLogService=(0,I.createDecorator)("IUserDataSyncLogService"),e.USER_DATA_SYNC_SCHEME="vscode-userdata-sync",e.PREVIEW_DIR_NAME="preview";function m(b,E){if(b.scheme!==e.USER_DATA_SYNC_SCHEME)return b=b.with({scheme:E.userDataSyncHome.scheme}),e.ALL_SYNC_RESOURCES.filter(y=>(0,f.isEqualOrParent)(b,(0,f.joinPath)(E.userDataSyncHome,y,e.PREVIEW_DIR_NAME)))[0]}e.getSyncResourceFromLocalPreview=m}),define(ne[352],re([1,0,15,11,60,30,6,118,2,29,13,9,1345,8,85,23,31,347,24,27,56,96]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractInitializer=e.AbstractJsonFileSynchroniser=e.AbstractFileSynchroniser=e.AbstractSynchroniser=e.isSyncData=void 0;function n(b){return!!(b&&b.version!==void 0&&typeof b.version=="number"&&b.content!==void 0&&typeof b.content=="string"&&(Object.keys(b).length===2||Object.keys(b).length===3&&b.machineId!==void 0&&typeof b.machineId=="string"))}e.isSyncData=n;let h=class extends I.Disposable{constructor(E,y,T,R,O,x,F,L,M,N,B){super();this.resource=E,this.fileService=y,this.environmentService=T,this.userDataSyncStoreService=O,this.userDataSyncBackupStoreService=x,this.userDataSyncEnablementService=F,this.telemetryService=L,this.logService=M,this.configurationService=N,this.syncPreviewPromise=null,this._status="idle",this._onDidChangStatus=this._register(new k.Emitter),this.onDidChangeStatus=this._onDidChangStatus.event,this._conflicts=[],this._onDidChangeConflicts=this._register(new k.Emitter),this.onDidChangeConflicts=this._onDidChangeConflicts.event,this.localChangeTriggerThrottler=new f.ThrottledDelayer(50),this._onDidChangeLocal=this._register(new k.Emitter),this.onDidChangeLocal=this._onDidChangeLocal.event,this.hasSyncResourceStateVersionChanged=!1,this.syncHeaders={},this.syncResourceLogLabel=(0,w.uppercaseFirstLetter)(this.resource),this.extUri=B.extUri,this.syncFolder=this.extUri.joinPath(T.userDataSyncHome,E),this.syncPreviewFolder=this.extUri.joinPath(this.syncFolder,a.PREVIEW_DIR_NAME),this.lastSyncResource=(0,a.getLastSyncResourceUri)(E,T,this.extUri),this.currentMachineIdPromise=(0,l.getServiceMachineId)(T,y,R)}get status(){return this._status}get conflicts(){return this._conflicts}triggerLocalChange(){this.localChangeTriggerThrottler.trigger(()=>this.doTriggerLocalChange())}async doTriggerLocalChange(){if(this.status==="hasConflicts"){this.logService.info(`${this.syncResourceLogLabel}: In conflicts state and local change detected. Syncing again...`);const E=await this.syncPreviewPromise;this.syncPreviewPromise=null;const y=await this.performSync(E.remoteUserData,E.lastSyncUserData,!0,this.getUserDataSyncConfiguration());this.setStatus(y)}else{this.logService.trace(`${this.syncResourceLogLabel}: Checking for local changes...`);const E=await this.getLastSyncUserData();(E?await this.hasRemoteChanged(E):!0)&&this._onDidChangeLocal.fire()}}setStatus(E){if(this._status!==E){const y=this._status;E==="hasConflicts"&&this.telemetryService.publicLog2("sync/conflictsDetected",{source:this.resource}),y==="hasConflicts"&&E==="idle"&&this.telemetryService.publicLog2("sync/conflictsResolved",{source:this.resource}),this._status=E,this._onDidChangStatus.fire(E)}}async sync(E,y={}){await this._sync(E,!0,this.getUserDataSyncConfiguration(),y)}async preview(E,y,T={}){return this._sync(E,!1,y,T)}async apply(E,y={}){try{this.syncHeaders={...y};const T=await this.doApply(E);return this.setStatus(T),this.syncPreviewPromise}finally{this.syncHeaders={}}}async _sync(E,y,T,R){try{if(this.syncHeaders={...R},this.status==="hasConflicts")return this.logService.info(`${this.syncResourceLogLabel}: Skipped synchronizing ${this.resource.toLowerCase()} as there are conflicts.`),this.syncPreviewPromise;if(this.status==="syncing")return this.logService.info(`${this.syncResourceLogLabel}: Skipped synchronizing ${this.resource.toLowerCase()} as it is running already.`),this.syncPreviewPromise;this.logService.trace(`${this.syncResourceLogLabel}: Started synchronizing ${this.resource.toLowerCase()}...`),this.setStatus("syncing");let O="idle";try{const x=await this.getLastSyncUserData(),F=await this.getLatestRemoteUserData(E,x);return O=await this.performSync(F,x,y,T),O==="hasConflicts"?this.logService.info(`${this.syncResourceLogLabel}: Detected conflicts while synchronizing ${this.resource.toLowerCase()}.`):O==="idle"&&this.logService.trace(`${this.syncResourceLogLabel}: Finished synchronizing ${this.resource.toLowerCase()}.`),this.syncPreviewPromise||null}finally{this.setStatus(O)}}finally{this.syncHeaders={}}}async replace(E){const y=await this.resolveContent(E);if(!y)return!1;const T=this.parseSyncData(y);if(!T)return!1;await this.stop();try{this.logService.trace(`${this.syncResourceLogLabel}: Started resetting ${this.resource.toLowerCase()}...`),this.setStatus("syncing");const R=await this.getLastSyncUserData(),O=await this.getLatestRemoteUserData(null,R),x=await this.isRemoteDataFromCurrentMachine(O),F=await this.generateSyncPreview({ref:O.ref,syncData:T},R,x,this.getUserDataSyncConfiguration(),A.CancellationToken.None),L=[];for(const M of F){const N=await this.getAcceptResult(M,M.remoteResource,void 0,A.CancellationToken.None),{remoteChange:B}=await this.getAcceptResult(M,M.previewResource,M.remoteContent,A.CancellationToken.None);L.push([M,{...N,remoteChange:B!==0?B:2}])}await this.applyResult(O,R,L,!1),this.logService.info(`${this.syncResourceLogLabel}: Finished resetting ${this.resource.toLowerCase()}.`)}finally{this.setStatus("idle")}return!0}async isRemoteDataFromCurrentMachine(E){const y=await this.currentMachineIdPromise;return!!E.syncData?.machineId&&E.syncData.machineId===y}async getLatestRemoteUserData(E,y){if(y){const T=E&&E.latest?E.latest[this.resource]:void 0;if(y.ref===T||T===void 0&&y.syncData===null)return y}return this.getRemoteUserData(y)}async performSync(E,y,T,R){if(E.syncData&&E.syncData.version>this.version)throw this.telemetryService.publicLog2("sync/incompatible",{source:this.resource}),new a.UserDataSyncError((0,o.localize)(0,null,this.resource,this.version,E.syncData.version),"IncompatibleLocalContent",this.resource);try{return await this.doSync(E,y,T,R)}catch(O){if(O instanceof a.UserDataSyncError)switch(O.code){case"LocalPreconditionFailed":return this.logService.info(`${this.syncResourceLogLabel}: Failed to synchronize ${this.syncResourceLogLabel} as there is a new local version available. Synchronizing again...`),this.performSync(E,y,T,R);case"Conflict":case"PreconditionFailed":return this.logService.info(`${this.syncResourceLogLabel}: Failed to synchronize as there is a new remote version available. Synchronizing again...`),E=await this.getRemoteUserData(null),y=await this.getLastSyncUserData(),this.performSync(E,y,T,R)}throw O}}async doSync(E,y,T,R){try{this.syncPreviewPromise||(this.syncPreviewPromise=(0,f.createCancelablePromise)(x=>this.doGenerateSyncResourcePreview(E,y,T,R,x)));const O=await this.syncPreviewPromise;return this.updateConflicts(O.resourcePreviews),O.resourcePreviews.some(({mergeState:x})=>x==="conflict")?"hasConflicts":T?await this.doApply(!1):"syncing"}catch(O){throw this.syncPreviewPromise=null,O}}async merge(E){return await this.updateSyncResourcePreview(E,async y=>{const T=await this.getMergeResult(y,A.CancellationToken.None);await this.fileService.writeFile(y.previewResource,_.VSBuffer.fromString(T?.content||""));const R=T&&!T.hasConflicts?await this.getAcceptResult(y,y.previewResource,void 0,A.CancellationToken.None):void 0;return y.acceptResult=R,y.mergeState=T.hasConflicts?"conflict":R?"accepted":"preview",y.localChange=R?R.localChange:T.localChange,y.remoteChange=R?R.remoteChange:T.remoteChange,y}),this.syncPreviewPromise}async accept(E,y){return await this.updateSyncResourcePreview(E,async T=>{const R=await this.getAcceptResult(T,E,y,A.CancellationToken.None);return T.acceptResult=R,T.mergeState="accepted",T.localChange=R.localChange,T.remoteChange=R.remoteChange,T}),this.syncPreviewPromise}async discard(E){return await this.updateSyncResourcePreview(E,async y=>{const T=await this.getMergeResult(y,A.CancellationToken.None);return await this.fileService.writeFile(y.previewResource,_.VSBuffer.fromString(T.content||"")),y.acceptResult=void 0,y.mergeState="preview",y.localChange=T.localChange,y.remoteChange=T.remoteChange,y}),this.syncPreviewPromise}async updateSyncResourcePreview(E,y){if(!this.syncPreviewPromise)return;let T=await this.syncPreviewPromise;const R=T.resourcePreviews.findIndex(({localResource:O,remoteResource:x,previewResource:F})=>this.extUri.isEqual(O,E)||this.extUri.isEqual(x,E)||this.extUri.isEqual(F,E));R!==-1&&(this.syncPreviewPromise=(0,f.createCancelablePromise)(async O=>{const x=[...T.resourcePreviews];return x[R]=await y(x[R]),{...T,resourcePreviews:x}}),T=await this.syncPreviewPromise,this.updateConflicts(T.resourcePreviews),T.resourcePreviews.some(({mergeState:O})=>O==="conflict")?this.setStatus("hasConflicts"):this.setStatus("syncing"))}async doApply(E){if(!this.syncPreviewPromise)return"idle";const y=await this.syncPreviewPromise;return y.resourcePreviews.some(({mergeState:T})=>T==="conflict")?"hasConflicts":y.resourcePreviews.some(({mergeState:T})=>T!=="accepted")?"syncing":(await this.applyResult(y.remoteUserData,y.lastSyncUserData,y.resourcePreviews.map(T=>[T,T.acceptResult]),E),this.syncPreviewPromise=null,await this.clearPreviewFolder(),"idle")}async clearPreviewFolder(){try{await this.fileService.del(this.syncPreviewFolder,{recursive:!0})}catch{}}updateConflicts(E){const y=E.filter(({mergeState:T})=>T==="conflict");(0,t.equals)(this._conflicts,y,(T,R)=>this.extUri.isEqual(T.previewResource,R.previewResource))||(this._conflicts=y,this._onDidChangeConflicts.fire(y))}async hasPreviouslySynced(){const E=await this.getLastSyncUserData();return!!E&&E.syncData!==null}async getRemoteSyncResourceHandles(){return(await this.userDataSyncStoreService.getAllRefs(this.resource)).map(({created:y,ref:T})=>({created:y,uri:this.toRemoteBackupResource(T)}))}async getLocalSyncResourceHandles(){return(await this.userDataSyncBackupStoreService.getAllRefs(this.resource)).map(({created:y,ref:T})=>({created:y,uri:this.toLocalBackupResource(T)}))}toRemoteBackupResource(E){return C.URI.from({scheme:a.USER_DATA_SYNC_SCHEME,authority:"remote-backup",path:`/${this.resource}/${E}`})}toLocalBackupResource(E){return C.URI.from({scheme:a.USER_DATA_SYNC_SCHEME,authority:"local-backup",path:`/${this.resource}/${E}`})}async getMachineId({uri:E}){const y=this.extUri.basename(E);if(this.extUri.isEqual(E,this.toRemoteBackupResource(y))){const{content:T}=await this.getUserData(y);if(T)return this.parseSyncData(T)?.machineId}}async resolveContent(E){const y=this.extUri.basename(E);if(this.extUri.isEqual(E,this.toRemoteBackupResource(y))){const{content:T}=await this.getUserData(y);return T}return this.extUri.isEqual(E,this.toLocalBackupResource(y))?this.userDataSyncBackupStoreService.resolveContent(this.resource,y):null}async resolvePreviewContent(E){const y=this.syncPreviewPromise?await this.syncPreviewPromise:null;if(y)for(const T of y.resourcePreviews){if(this.extUri.isEqual(T.acceptedResource,E))return T.acceptResult?T.acceptResult.content:null;if(this.extUri.isEqual(T.remoteResource,E))return T.remoteContent;if(this.extUri.isEqual(T.localResource,E))return T.localContent}return null}async resetLocal(){try{await this.fileService.del(this.lastSyncResource)}catch{}}async doGenerateSyncResourcePreview(E,y,T,R,O){const x=await this.isRemoteDataFromCurrentMachine(E),F=await this.generateSyncPreview(E,y,x,R,O),L=[];for(const M of F){const N=M.previewResource.with({scheme:a.USER_DATA_SYNC_SCHEME,authority:"accepted"});if(M.localChange===0&&M.remoteChange===0)L.push({...M,acceptedResource:N,acceptResult:{content:null,localChange:0,remoteChange:0},mergeState:"accepted"});else{const B=T?await this.getMergeResult(M,O):void 0;if(O.isCancellationRequested)break;await this.fileService.writeFile(M.previewResource,_.VSBuffer.fromString(B?.content||""));const P=B&&!B.hasConflicts?await this.getAcceptResult(M,M.previewResource,void 0,O):void 0;L.push({...M,acceptResult:P,mergeState:B?.hasConflicts?"conflict":P?"accepted":"preview",localChange:P?P.localChange:B?B.localChange:M.localChange,remoteChange:P?P.remoteChange:B?B.remoteChange:M.remoteChange})}}return{remoteUserData:E,lastSyncUserData:y,resourcePreviews:L,isLastSyncFromCurrentMachine:x}}async getLastSyncUserData(){try{const E=await this.fileService.readFile(this.lastSyncResource),y=JSON.parse(E.value.toString()),T=this.userDataSyncEnablementService.getResourceSyncStateVersion(this.resource);if(this.hasSyncResourceStateVersionChanged=y.version&&T&&y.version!==T,this.hasSyncResourceStateVersionChanged)return this.logService.info(`${this.syncResourceLogLabel}: Reset last sync state because last sync state version ${y.version} is not compatible with current sync state version ${T}.`),await this.resetLocal(),null;const R=y;if(R.content===null)return{ref:y.ref,syncData:null};const O=JSON.parse(R.content);if(n(O))return{...y,syncData:O,content:void 0}}catch(E){E instanceof S.FileOperationError&&E.fileOperationResult===1||this.logService.error(E)}return null}async updateLastSyncUserData(E,y={}){if(y.ref||y.content||y.version)throw new Error("Cannot have core properties as additional");const T=this.userDataSyncEnablementService.getResourceSyncStateVersion(this.resource),R={ref:E.ref,content:E.syncData?JSON.stringify(E.syncData):null,version:T,...y};await this.fileService.writeFile(this.lastSyncResource,_.VSBuffer.fromString(JSON.stringify(R)))}async getRemoteUserData(E){const{ref:y,content:T}=await this.getUserData(E);let R=null;return T!==null&&(R=this.parseSyncData(T)),{ref:y,syncData:R}}parseSyncData(E){try{const y=JSON.parse(E);if(n(y))return y}catch(y){this.logService.error(y)}throw new a.UserDataSyncError((0,o.localize)(1,null),"IncompatibleRemoteContent",this.resource)}async getUserData(E){if((0,v.isString)(E)){const y=await this.userDataSyncStoreService.resolveContent(this.resource,E);return{ref:E,content:y}}else{const y=E?{ref:E.ref,content:E.syncData?JSON.stringify(E.syncData):null}:null;return this.userDataSyncStoreService.read(this.resource,y,this.syncHeaders)}}async updateRemoteUserData(E,y){const T=await this.currentMachineIdPromise,R={version:this.version,machineId:T,content:E};return y=await this.userDataSyncStoreService.write(this.resource,JSON.stringify(R),y,this.syncHeaders),{ref:y,syncData:R}}async backupLocal(E){const y={version:this.version,content:E};return this.userDataSyncBackupStoreService.backup(this.resource,JSON.stringify(y))}async stop(){this.status!=="idle"&&(this.logService.trace(`${this.syncResourceLogLabel}: Stopping synchronizing ${this.resource.toLowerCase()}.`),this.syncPreviewPromise&&(this.syncPreviewPromise.cancel(),this.syncPreviewPromise=null),this.updateConflicts([]),await this.clearPreviewFolder(),this.setStatus("idle"),this.logService.info(`${this.syncResourceLogLabel}: Stopped synchronizing ${this.resource.toLowerCase()}.`))}getUserDataSyncConfiguration(){return this.configurationService.getValue(a.USER_DATA_SYNC_CONFIGURATION_SCOPE)}};h=Ee([W(1,S.IFileService),W(2,i.IEnvironmentService),W(3,r.IStorageService),W(4,a.IUserDataSyncStoreService),W(5,a.IUserDataSyncBackupStoreService),W(6,a.IUserDataSyncEnablementService),W(7,p.ITelemetryService),W(8,a.IUserDataSyncLogService),W(9,c.IConfigurationService),W(10,u.IUriIdentityService)],h),e.AbstractSynchroniser=h;let g=class extends h{constructor(E,y,T,R,O,x,F,L,M,N,B,P){super(y,T,R,O,x,F,L,M,N,B,P);this.file=E,this._register(this.fileService.watch(this.extUri.dirname(E))),this._register(this.fileService.onDidFilesChange(V=>this.onFileChanges(V)))}async getLocalFileContent(){try{return await this.fileService.readFile(this.file)}catch{return null}}async updateLocalFileContent(E,y,T){try{y?await this.fileService.writeFile(this.file,_.VSBuffer.fromString(E),T?void 0:y):await this.fileService.createFile(this.file,_.VSBuffer.fromString(E),{overwrite:T})}catch(R){throw R instanceof S.FileOperationError&&R.fileOperationResult===1||R instanceof S.FileOperationError&&R.fileOperationResult===3?new a.UserDataSyncError(R.message,"LocalPreconditionFailed"):R}}onFileChanges(E){!E.contains(this.file)||this.triggerLocalChange()}};g=Ee([W(2,S.IFileService),W(3,i.IEnvironmentService),W(4,r.IStorageService),W(5,a.IUserDataSyncStoreService),W(6,a.IUserDataSyncBackupStoreService),W(7,a.IUserDataSyncEnablementService),W(8,p.ITelemetryService),W(9,a.IUserDataSyncLogService),W(10,c.IConfigurationService),W(11,u.IUriIdentityService)],g),e.AbstractFileSynchroniser=g;let d=class extends g{constructor(E,y,T,R,O,x,F,L,M,N,B,P,V){super(E,y,T,R,O,x,F,L,M,N,P,V);this.userDataSyncUtilService=B,this._formattingOptions=void 0}hasErrors(E){const y=[];return(0,D.parse)(E,y,{allowEmptyContent:!0,allowTrailingComma:!0}),y.length>0}getFormattingOptions(){return this._formattingOptions||(this._formattingOptions=this.userDataSyncUtilService.resolveFormattingOptions(this.file)),this._formattingOptions}};d=Ee([W(2,S.IFileService),W(3,i.IEnvironmentService),W(4,r.IStorageService),W(5,a.IUserDataSyncStoreService),W(6,a.IUserDataSyncBackupStoreService),W(7,a.IUserDataSyncEnablementService),W(8,p.ITelemetryService),W(9,a.IUserDataSyncLogService),W(10,a.IUserDataSyncUtilService),W(11,c.IConfigurationService),W(12,u.IUriIdentityService)],d),e.AbstractJsonFileSynchroniser=d;let m=class{constructor(E,y,T,R,O){this.resource=E,this.environmentService=y,this.logService=T,this.fileService=R,this.extUri=O.extUri,this.lastSyncResource=(0,a.getLastSyncResourceUri)(this.resource,y,this.extUri)}async initialize({ref:E,content:y}){if(!y){this.logService.info("Remote content does not exist.",this.resource);return}const T=this.parseSyncData(y);if(!!T)try{await this.doInitialize({ref:E,syncData:T})}catch(R){this.logService.error(R)}}parseSyncData(E){try{const y=JSON.parse(E);if(n(y))return y}catch(y){this.logService.error(y)}this.logService.info("Cannot parse sync data as it is not compatible with the current version.",this.resource)}async updateLastSyncUserData(E,y={}){const T={ref:E.ref,content:E.syncData?JSON.stringify(E.syncData):null,...y};await this.fileService.writeFile(this.lastSyncResource,_.VSBuffer.fromString(JSON.stringify(T)))}};m=Ee([W(1,i.IEnvironmentService),W(2,s.ILogService),W(3,S.IFileService),W(4,u.IUriIdentityService)],m),e.AbstractInitializer=m}),define(ne[765],re([1,0,11,30,22,6,301,29,9,8,85,79,100,311,23,31,24,27,56,352,2091,408,96]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractExtensionsInitializer=e.ExtensionsSynchroniser=void 0;async function h(m,b){const E=JSON.parse(m.content);if(m.version===1||m.version===2){const y=(await b.getInstalled(0)).filter(T=>T.isBuiltin);for(const T of E)m.version===1&&(T.enabled===!1&&(T.disabled=!0),delete T.enabled),m.version===2&&y.every(R=>!(0,o.areSameExtensions)(R.identifier,T.identifier))&&(T.installed=!0)}return E}let g=class Ir extends p.AbstractSynchroniser{constructor(b,E,y,T,R,O,x,F,L,M,N,B,P,V,z){super("extensions",E,b,y,T,R,B,P,L,N,z);this.extensionManagementService=O,this.extensionEnablementService=x,this.ignoredExtensionsManagementService=F,this.extensionGalleryService=M,this.extensionStorageService=V,this.version=5,this.previewResource=this.extUri.joinPath(this.syncPreviewFolder,"extensions.json"),this.localResource=this.previewResource.with({scheme:n.USER_DATA_SYNC_SCHEME,authority:"local"}),this.remoteResource=this.previewResource.with({scheme:n.USER_DATA_SYNC_SCHEME,authority:"remote"}),this.acceptedResource=this.previewResource.with({scheme:n.USER_DATA_SYNC_SCHEME,authority:"accepted"}),this._register(A.Event.any(A.Event.filter(this.extensionManagementService.onDidInstallExtensions,U=>U.some(({local:H})=>!!H)),A.Event.filter(this.extensionManagementService.onDidUninstallExtension,U=>!U.error),this.extensionEnablementService.onDidChangeEnablement,this.extensionStorageService.onDidChangeExtensionStorageToSync)(()=>this.triggerLocalChange()))}async generateSyncPreview(b,E){const y=b.syncData?await h(b.syncData,this.extensionManagementService):null,T=E?.skippedExtensions||[],R=E?.syncData?await h(E.syncData,this.extensionManagementService):null,O=await this.extensionManagementService.getInstalled(void 0,!0),x=this.getLocalExtensions(O),F=this.ignoredExtensionsManagementService.getIgnoredExtensions(O);y?this.logService.trace(`${this.syncResourceLogLabel}: Merging remote extensions with local extensions...`):this.logService.trace(`${this.syncResourceLogLabel}: Remote extensions does not exist. Synchronizing extensions for the first time.`);const{local:L,remote:M}=(0,u.merge)(x,y,R,T,F),N={local:L,remote:M,content:this.getPreviewContent(x,L.added,L.updated,L.removed),localChange:L.added.length>0||L.removed.length>0||L.updated.length>0?2:0,remoteChange:M!==null?2:0};return[{skippedExtensions:T,localResource:this.localResource,localContent:this.stringify(x,!1),localExtensions:x,remoteResource:this.remoteResource,remoteContent:y?this.stringify(y,!1):null,previewResource:this.previewResource,previewResult:N,localChange:N.localChange,remoteChange:N.remoteChange,acceptedResource:this.acceptedResource}]}async hasRemoteChanged(b){const E=b.syncData?await h(b.syncData,this.extensionManagementService):null,y=await this.extensionManagementService.getInstalled(void 0,!0),T=this.getLocalExtensions(y),R=this.ignoredExtensionsManagementService.getIgnoredExtensions(y),{remote:O}=(0,u.merge)(T,E,E,b.skippedExtensions||[],R);return O!==null}getPreviewContent(b,E,y,T){const R=[...E,...y],O=new Set,x=F=>{O.add(F.id.toLowerCase()),F.uuid&&O.add(F.uuid)};R.forEach(({identifier:F})=>x(F)),T.forEach(x);for(const F of b)O.has(F.identifier.id.toLowerCase())||F.identifier.uuid&&O.has(F.identifier.uuid)||R.push(F);return this.stringify(R,!1)}async getMergeResult(b,E){return{...b.previewResult,hasConflicts:!1}}async getAcceptResult(b,E,y,T){if(this.extUri.isEqual(E,this.localResource))return this.acceptLocal(b);if(this.extUri.isEqual(E,this.remoteResource))return this.acceptRemote(b);if(this.extUri.isEqual(E,this.previewResource))return b.previewResult;throw new Error(`Invalid Resource: ${E.toString()}`)}async acceptLocal(b){const E=await this.extensionManagementService.getInstalled(),y=this.ignoredExtensionsManagementService.getIgnoredExtensions(E),T=(0,u.merge)(b.localExtensions,null,null,b.skippedExtensions,y),{local:R,remote:O}=T;return{content:b.localContent,local:R,remote:O,localChange:R.added.length>0||R.removed.length>0||R.updated.length>0?2:0,remoteChange:O!==null?2:0}}async acceptRemote(b){const E=await this.extensionManagementService.getInstalled(),y=this.ignoredExtensionsManagementService.getIgnoredExtensions(E),T=b.remoteContent?JSON.parse(b.remoteContent):null;if(T!==null){const R=(0,u.merge)(b.localExtensions,T,b.localExtensions,[],y),{local:O,remote:x}=R;return{content:b.remoteContent,local:O,remote:x,localChange:O.added.length>0||O.removed.length>0||O.updated.length>0?2:0,remoteChange:x!==null?2:0}}else return{content:b.remoteContent,local:{added:[],removed:[],updated:[]},remote:null,localChange:0,remoteChange:0}}async applyResult(b,E,y,T){let{skippedExtensions:R,localExtensions:O}=y[0][0],{local:x,remote:F,localChange:L,remoteChange:M}=y[0][1];if(L===0&&M===0&&this.logService.info(`${this.syncResourceLogLabel}: No changes found during synchronizing extensions.`),L!==0&&(await this.backupLocal(JSON.stringify(O)),R=await this.updateLocalExtensions(x.added,x.removed,x.updated,R)),F){this.logService.trace(`${this.syncResourceLogLabel}: Updating remote extensions...`);const N=JSON.stringify(F.all);b=await this.updateRemoteUserData(N,T?null:b.ref),this.logService.info(`${this.syncResourceLogLabel}: Updated remote extensions.${F.added.length?` Added: ${JSON.stringify(F.added.map(B=>B.identifier.id))}.`:""}${F.updated.length?` Updated: ${JSON.stringify(F.updated.map(B=>B.identifier.id))}.`:""}${F.removed.length?` Removed: ${JSON.stringify(F.removed.map(B=>B.identifier.id))}.`:""}`)}E?.ref!==b.ref&&(this.logService.trace(`${this.syncResourceLogLabel}: Updating last synchronized extensions...`),await this.updateLastSyncUserData(b,{skippedExtensions:R}),this.logService.info(`${this.syncResourceLogLabel}: Updated last synchronized extensions.${R.length?` Skipped: ${JSON.stringify(R.map(N=>N.identifier.id))}.`:""}`))}async getAssociatedResources({uri:b}){return[{resource:this.extUri.joinPath(b,"extensions.json"),comparableResource:Ir.EXTENSIONS_DATA_URI}]}async resolveContent(b){if(this.extUri.isEqual(b,Ir.EXTENSIONS_DATA_URI)){const y=await this.extensionManagementService.getInstalled(),T=this.ignoredExtensionsManagementService.getIgnoredExtensions(y),R=this.getLocalExtensions(y).filter(O=>!T.some(x=>(0,o.areSameExtensions)({id:x},O.identifier)));return this.stringify(R,!0)}if(this.extUri.isEqual(this.remoteResource,b)||this.extUri.isEqual(this.localResource,b)||this.extUri.isEqual(this.acceptedResource,b)){const y=await this.resolvePreviewContent(b);return y&&this.stringify(JSON.parse(y),!0)}let E=await super.resolveContent(b);if(E)return E;if(E=await super.resolveContent(this.extUri.dirname(b)),E){const y=this.parseSyncData(E);if(y)switch(this.extUri.basename(b)){case"extensions.json":return this.stringify(this.parseExtensions(y),!0)}}return null}stringify(b,E){return b.sort((y,T)=>!y.identifier.uuid&&T.identifier.uuid?-1:y.identifier.uuid&&!T.identifier.uuid?1:(0,D.compare)(y.identifier.id,T.identifier.id)),E?(0,k.toFormattedString)(b,{}):JSON.stringify(b)}async hasLocalData(){try{const b=await this.extensionManagementService.getInstalled();if(this.getLocalExtensions(b).some(y=>y.installed||y.disabled))return!0}catch{}return!1}async updateLocalExtensions(b,E,y,T){const R=[],O=[],x=await this.extensionManagementService.getInstalled();if(E.length){const L=x.filter(({identifier:M,isBuiltin:N})=>!N&&E.some(B=>(0,o.areSameExtensions)(M,B)));await t.Promises.settled(L.map(async M=>{this.logService.trace(`${this.syncResourceLogLabel}: Uninstalling local extension...`,M.identifier.id),await this.extensionManagementService.uninstall(M,{donotIncludePack:!0,donotCheckDependents:!0}),this.logService.info(`${this.syncResourceLogLabel}: Uninstalled local extension.`,M.identifier.id),R.push(M.identifier)}))}(b.length||y.length)&&await t.Promises.settled([...b,...y].map(async L=>{const M=x.find(B=>(0,o.areSameExtensions)(B.identifier,L.identifier));if(M&&M.isBuiltin){L.state&&M.manifest.version===L.version&&this.updateExtensionState(L.state,M,M.manifest.version),this.extensionEnablementService.getDisabledExtensions().some(P=>(0,o.areSameExtensions)(P,L.identifier))!==!!L.disabled&&(L.disabled?(this.logService.trace(`${this.syncResourceLogLabel}: Disabling extension...`,L.identifier.id),await this.extensionEnablementService.disableExtension(L.identifier),this.logService.info(`${this.syncResourceLogLabel}: Disabled extension`,L.identifier.id)):(this.logService.trace(`${this.syncResourceLogLabel}: Enabling extension...`,L.identifier.id),await this.extensionEnablementService.enableExtension(L.identifier),this.logService.info(`${this.syncResourceLogLabel}: Enabled extension`,L.identifier.id))),R.push(L.identifier);return}const N=(await this.extensionGalleryService.getExtensions([{...L.identifier,preRelease:L.preRelease}],f.CancellationToken.None))[0];if(L.state&&(M?M.manifest.version===L.version:!!N)&&this.updateExtensionState(L.state,M||N,M?.manifest.version),N)try{this.extensionEnablementService.getDisabledExtensions().some(P=>(0,o.areSameExtensions)(P,L.identifier))!==!!L.disabled&&(L.disabled?(this.logService.trace(`${this.syncResourceLogLabel}: Disabling extension...`,L.identifier.id,N.version),await this.extensionEnablementService.disableExtension(N.identifier),this.logService.info(`${this.syncResourceLogLabel}: Disabled extension`,L.identifier.id,N.version)):(this.logService.trace(`${this.syncResourceLogLabel}: Enabling extension...`,L.identifier.id,N.version),await this.extensionEnablementService.enableExtension(N.identifier),this.logService.info(`${this.syncResourceLogLabel}: Enabled extension`,L.identifier.id,N.version))),(!M||M.preRelease!==L.preRelease)&&(await this.extensionManagementService.canInstall(N)?(this.logService.trace(`${this.syncResourceLogLabel}: Installing extension...`,L.identifier.id,N.version),await this.extensionManagementService.installFromGallery(N,{isMachineScoped:!1,donotIncludePackAndDependencies:!0,installPreReleaseVersion:L.preRelease}),this.logService.info(`${this.syncResourceLogLabel}: Installed extension.`,L.identifier.id,N.version),R.push(N.identifier)):(this.logService.info(`${this.syncResourceLogLabel}: Skipped synchronizing extension because it cannot be installed.`,N.displayName||N.identifier.id),O.push(L)))}catch(B){O.push(L),B instanceof C.ExtensionManagementError&&[C.ExtensionManagementErrorCode.Incompatible,C.ExtensionManagementErrorCode.IncompatiblePreRelease,C.ExtensionManagementErrorCode.IncompatibleTargetPlatform].includes(B.code)?this.logService.info(`${this.syncResourceLogLabel}: Skipped synchronizing extension because the compatible extension is not found.`,N.displayName||N.identifier.id):(this.logService.error(B),this.logService.info(`${this.syncResourceLogLabel}: Skipped synchronizing extension`,N.displayName||N.identifier.id))}else O.push(L),this.logService.info(`${this.syncResourceLogLabel}: Skipped synchronizing extension because the extension is not found.`,L.identifier.id)}));const F=[];for(const L of T)R.some(M=>(0,o.areSameExtensions)(M,L.identifier))||F.push(L);for(const L of O)F.some(M=>(0,o.areSameExtensions)(M.identifier,L.identifier))||F.push(L);return F}updateExtensionState(b,E,y){const T=this.extensionStorageService.getExtensionState(E,!0)||{},R=y?this.extensionStorageService.getKeysForSync({id:E.identifier.id,version:y}):void 0;R?R.forEach(O=>{T[O]=b[O]}):Object.keys(b).forEach(O=>T[O]=b[O]),this.extensionStorageService.setExtensionState(E,T,!0)}parseExtensions(b){return JSON.parse(b.content)}getLocalExtensions(b){const E=this.extensionEnablementService.getDisabledExtensions();return b.map(y=>{const{identifier:T,isBuiltin:R,manifest:O,preRelease:x}=y,F={identifier:T,preRelease:x,version:O.version};E.some(L=>(0,o.areSameExtensions)(L,T))&&(F.disabled=!0),R||(F.installed=!0);try{const L=this.extensionStorageService.getKeysForSync({id:T.id,version:O.version});if(L){const M=this.extensionStorageService.getExtensionState(y,!0)||{};F.state=Object.keys(M).reduce((N,B)=>(L.includes(B)&&(N[B]=M[B]),N),{})}}catch(L){this.logService.info(`${this.syncResourceLogLabel}: Error while parsing extension state`,(0,_.getErrorMessage)(L))}return F})}};g.EXTENSIONS_DATA_URI=I.URI.from({scheme:n.USER_DATA_SYNC_SCHEME,authority:"extensions",path:"/extensions.json"}),g=Ee([W(0,v.IEnvironmentService),W(1,i.IFileService),W(2,s.IStorageService),W(3,n.IUserDataSyncStoreService),W(4,n.IUserDataSyncBackupStoreService),W(5,C.IExtensionManagementService),W(6,C.IGlobalExtensionEnablementService),W(7,a.IIgnoredExtensionsManagementService),W(8,n.IUserDataSyncLogService),W(9,C.IExtensionGalleryService),W(10,w.IConfigurationService),W(11,n.IUserDataSyncEnablementService),W(12,l.ITelemetryService),W(13,c.IExtensionStorageService),W(14,r.IUriIdentityService)],g),e.ExtensionsSynchroniser=g;let d=class extends p.AbstractInitializer{constructor(b,E,y,T,R,O){super("extensions",T,R,y,O);this.extensionManagementService=b,this.ignoredExtensionsManagementService=E}async parseExtensions(b){return b.syncData?await h(b.syncData,this.extensionManagementService):null}generatePreview(b,E){const y=[],T=[],R=[];for(const O of b){if(this.ignoredExtensionsManagementService.hasToNeverSyncExtension(O.identifier.id))continue;const x=E.find(F=>(0,o.areSameExtensions)(F.identifier,O.identifier));x?(y.push(x),O.disabled&&R.push(O.identifier)):O.installed&&(T.push({...O.identifier,preRelease:!!O.preRelease}),O.disabled&&R.push(O.identifier))}return{installedExtensions:y,newExtensions:T,disabledExtensions:R,remoteExtensions:b}}};d=Ee([W(0,C.IExtensionManagementService),W(1,a.IIgnoredExtensionsManagementService),W(2,i.IFileService),W(3,v.IEnvironmentService),W(4,S.ILogService),W(5,r.IUriIdentityService)],d),e.AbstractExtensionsInitializer=d}),define(ne[2094],re([1,0,51,96]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.merge=void 0;function _(D,I,w,v,C){if(!I)return{remote:Object.keys(D).length>0?D:null,local:{added:{},removed:[],updated:{}}};const o=A(D,I);if(o.added.size===0&&o.removed.size===0&&o.updated.size===0)return{remote:null,local:{added:{},removed:[],updated:{}}};const c=w?A(w,I):{added:Object.keys(I).reduce((r,p)=>(r.add(p),r),new Set),removed:new Set,updated:new Set},i=w?A(w,D):{added:Object.keys(D).reduce((r,p)=>(r.add(p),r),new Set),removed:new Set,updated:new Set},S={added:{},removed:[],updated:{}},s=t.deepClone(I),l=!w;for(const r of i.added.values())r!==f.SYNC_SERVICE_URL_TYPE&&l&&c.added.has(r)||(s[r]=D[r]);for(const r of i.updated.values())s[r]=D[r];for(const r of i.removed.values())v.unregistered.includes(r)||delete s[r];for(const r of c.added.values()){const p=I[r];if(v.machine.includes(r)){C.info(`GlobalState: Skipped adding ${r} in local storage because it is declared as machine scoped.`);continue}if(w&&i.added.has(r))continue;const u=D[r];u&&u.value===p.value||r===f.SYNC_SERVICE_URL_TYPE&&l&&i.added.has(r)||(u?S.updated[r]=p:S.added[r]=p)}for(const r of c.updated.values()){const p=I[r];if(v.machine.includes(r)){C.info(`GlobalState: Skipped updating ${r} in local storage because it is declared as machine scoped.`);continue}if(i.updated.has(r)||i.removed.has(r))continue;const u=D[r];u&&u.value===p.value||(S.updated[r]=p)}for(const r of c.removed.values()){if(v.machine.includes(r)){C.trace(`GlobalState: Skipped removing ${r} in local storage because it is declared as machine scoped.`);continue}i.updated.has(r)||i.removed.has(r)||S.removed.push(r)}return{local:S,remote:k(s,I)?null:s}}e.merge=_;function A(D,I){const w=Object.keys(D),v=Object.keys(I),C=v.filter(i=>w.indexOf(i)===-1).reduce((i,S)=>(i.add(S),i),new Set),o=w.filter(i=>v.indexOf(i)===-1).reduce((i,S)=>(i.add(S),i),new Set),c=new Set;for(const i of w){if(o.has(i))continue;const S=D[i],s=I[i];t.equals(S,s)||c.add(i)}return{added:C,removed:o,updated:c}}function k(D,I){const{added:w,removed:v,updated:C}=A(D,I);return w.size===0&&v.size===0&&C.size===0}}),define(ne[766],re([1,0,60,22,6,118,301,14,9,89,8,85,23,31,347,24,27,56,352,478,2094,96]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataSyncStoreTypeSynchronizer=e.GlobalStateInitializer=e.GlobalStateSynchroniser=void 0;const n="globalState.argv.",h=["locale"];function g(y,T){const R=y.storage?Object.keys(y.storage).sort():[],O={};return R.forEach(x=>O[x]=y.storage[x]),y.storage=O,T?(0,k.toFormattedString)(y,{}):JSON.stringify(y)}const d=1;let m=class Dr extends r.AbstractSynchroniser{constructor(T,R,O,x,F,L,M,N,B,P){super("globalState",T,F,B,R,O,L,M,x,N,P);this.storageService=B,this.version=d,this.previewResource=this.extUri.joinPath(this.syncPreviewFolder,"globalState.json"),this.localResource=this.previewResource.with({scheme:a.USER_DATA_SYNC_SCHEME,authority:"local"}),this.remoteResource=this.previewResource.with({scheme:a.USER_DATA_SYNC_SCHEME,authority:"remote"}),this.acceptedResource=this.previewResource.with({scheme:a.USER_DATA_SYNC_SCHEME,authority:"accepted"}),this._register(T.watch(this.extUri.dirname(this.environmentService.argvResource))),this._register(_.Event.any(_.Event.filter(T.onDidFilesChange,V=>V.contains(this.environmentService.argvResource)),_.Event.filter(B.onDidChangeValue,V=>V.scope===0&&V.target!==void 0?V.target===0:B.keys(0,0).includes(V.key)),this.storageService.onDidChangeTarget)(()=>this.triggerLocalChange()))}async generateSyncPreview(T,R,O){const x=T.syncData?JSON.parse(T.syncData.content):null;R=R===null&&O?T:R;const F=R&&R.syncData?JSON.parse(R.syncData.content):null,L=await this.getLocalGlobalState();x?this.logService.trace(`${this.syncResourceLogLabel}: Merging remote ui state with local ui state...`):this.logService.trace(`${this.syncResourceLogLabel}: Remote ui state does not exist. Synchronizing ui state for the first time.`);const M=this.getStorageKeys(F),{local:N,remote:B}=(0,u.merge)(L.storage,x?x.storage:null,F?F.storage:null,M,this.logService),P={content:null,local:N,remote:B,localChange:Object.keys(N.added).length>0||Object.keys(N.updated).length>0||N.removed.length>0?2:0,remoteChange:B!==null?2:0};return[{localResource:this.localResource,localContent:g(L,!1),localUserData:L,remoteResource:this.remoteResource,remoteContent:x?g(x,!1):null,previewResource:this.previewResource,previewResult:P,localChange:P.localChange,remoteChange:P.remoteChange,acceptedResource:this.acceptedResource,storageKeys:M}]}async hasRemoteChanged(T){const R=T.syncData?JSON.parse(T.syncData.content):null;if(R===null)return!0;const O=await this.getLocalGlobalState(),x=this.getStorageKeys(R),{remote:F}=(0,u.merge)(O.storage,R.storage,R.storage,x,this.logService);return F!==null}async getMergeResult(T,R){return{...T.previewResult,hasConflicts:!1}}async getAcceptResult(T,R,O,x){if(this.extUri.isEqual(R,this.localResource))return this.acceptLocal(T);if(this.extUri.isEqual(R,this.remoteResource))return this.acceptRemote(T);if(this.extUri.isEqual(R,this.previewResource))return T.previewResult;throw new Error(`Invalid Resource: ${R.toString()}`)}async acceptLocal(T){return{content:T.localContent,local:{added:{},removed:[],updated:{}},remote:T.localUserData.storage,localChange:0,remoteChange:2}}async acceptRemote(T){if(T.remoteContent!==null){const R=JSON.parse(T.remoteContent),{local:O,remote:x}=(0,u.merge)(T.localUserData.storage,R.storage,null,T.storageKeys,this.logService);return{content:T.remoteContent,local:O,remote:x,localChange:Object.keys(O.added).length>0||Object.keys(O.updated).length>0||O.removed.length>0?2:0,remoteChange:x!==null?2:0}}else return{content:T.remoteContent,local:{added:{},removed:[],updated:{}},remote:null,localChange:0,remoteChange:0}}async applyResult(T,R,O,x){let{localUserData:F}=O[0][0],{local:L,remote:M,localChange:N,remoteChange:B}=O[0][1];if(N===0&&B===0&&this.logService.info(`${this.syncResourceLogLabel}: No changes found during synchronizing ui state.`),N!==0&&(this.logService.trace(`${this.syncResourceLogLabel}: Updating local ui state...`),await this.backupLocal(JSON.stringify(F)),await this.writeLocalGlobalState(L),this.logService.info(`${this.syncResourceLogLabel}: Updated local ui state`)),B!==0){this.logService.trace(`${this.syncResourceLogLabel}: Updating remote ui state...`);const P=JSON.stringify({storage:M});T=await this.updateRemoteUserData(P,x?null:T.ref),this.logService.info(`${this.syncResourceLogLabel}: Updated remote ui state`)}R?.ref!==T.ref&&(this.logService.trace(`${this.syncResourceLogLabel}: Updating last synchronized ui state...`),await this.updateLastSyncUserData(T),this.logService.info(`${this.syncResourceLogLabel}: Updated last synchronized ui state`))}async getAssociatedResources({uri:T}){return[{resource:this.extUri.joinPath(T,"globalState.json"),comparableResource:Dr.GLOBAL_STATE_DATA_URI}]}async resolveContent(T){if(this.extUri.isEqual(T,Dr.GLOBAL_STATE_DATA_URI)){const O=await this.getLocalGlobalState();return g(O,!0)}if(this.extUri.isEqual(this.remoteResource,T)||this.extUri.isEqual(this.localResource,T)||this.extUri.isEqual(this.acceptedResource,T)){const O=await this.resolvePreviewContent(T);return O&&g(JSON.parse(O),!0)}let R=await super.resolveContent(T);if(R)return R;if(R=await super.resolveContent(this.extUri.dirname(T)),R){const O=this.parseSyncData(R);if(O)switch(this.extUri.basename(T)){case"globalState.json":return g(JSON.parse(O.content),!0)}}return null}async hasLocalData(){try{const{storage:T}=await this.getLocalGlobalState();if(Object.keys(T).length>1||T[`${n}.locale`]?.value!=="en")return!0}catch{}return!1}async getLocalGlobalState(){const T={},R=await this.getLocalArgvContent(),O=(0,A.parse)(R);for(const x of h)O[x]!==void 0&&(T[`${n}${x}`]={version:1,value:O[x]});for(const x of this.storageService.keys(0,0)){const F=this.storageService.get(x,0);F&&(T[x]={version:1,value:F})}return{storage:T}}async getLocalArgvContent(){try{this.logService.debug("GlobalStateSync#getLocalArgvContent",this.environmentService.argvResource);const T=await this.fileService.readFile(this.environmentService.argvResource);return this.logService.debug("GlobalStateSync#getLocalArgvContent - Resolved",this.environmentService.argvResource),T.value.toString()}catch(T){this.logService.debug((0,f.getErrorMessage)(T))}return"{}"}async writeLocalGlobalState({added:T,removed:R,updated:O}){const x={},F={},L=(N,B)=>{for(const P of N){if(P.startsWith(n)){x[P.substring(n.length)]=B?B[P].value:void 0;continue}if(B){const V=B[P];V.value!==String(this.storageService.get(P,0))&&(F[P]=V.value)}else this.storageService.get(P,0)!==void 0&&(F[P]=void 0)}};if(L(Object.keys(T),T),L(Object.keys(O),O),L(R),Object.keys(x).length&&(this.logService.trace(`${this.syncResourceLogLabel}: Updating locale...`),await this.updateArgv(x),this.logService.info(`${this.syncResourceLogLabel}: Updated locale`)),Object.keys(F).length){this.logService.trace(`${this.syncResourceLogLabel}: Updating global state...`);for(const N of Object.keys(F))this.storageService.store(N,F[N],0,0);this.logService.info(`${this.syncResourceLogLabel}: Updated global state`,Object.keys(F))}}async updateArgv(T){const R=await this.getLocalArgvContent();let O=R;for(const x of Object.keys(T))O=(0,p.edit)(O,[x],T[x],{});R!==O&&(this.logService.trace(`${this.syncResourceLogLabel}: Updating locale...`),await this.fileService.writeFile(this.environmentService.argvResource,t.VSBuffer.fromString(O)),this.logService.info(`${this.syncResourceLogLabel}: Updated locale.`))}getStorageKeys(T){const R=this.storageService.keys(0,0),O=this.storageService.keys(0,1),x=[...R,...O],F=T?.storage?Object.keys(T.storage).filter(L=>!L.startsWith(n)&&!x.includes(L)&&this.storageService.get(L,0)!==void 0):[];if(!D.isWeb){const L=[...a.ALL_SYNC_RESOURCES.map(M=>(0,a.getEnablementKey)(M)),a.SYNC_SERVICE_URL_TYPE];F.push(...L),O.push(...L)}return{user:R,machine:O,unregistered:F}}};m.GLOBAL_STATE_DATA_URI=I.URI.from({scheme:a.USER_DATA_SYNC_SCHEME,authority:"globalState",path:"/globalState.json"}),m=Ee([W(0,o.IFileService),W(1,a.IUserDataSyncStoreService),W(2,a.IUserDataSyncBackupStoreService),W(3,a.IUserDataSyncLogService),W(4,C.IEnvironmentService),W(5,a.IUserDataSyncEnablementService),W(6,s.ITelemetryService),W(7,v.IConfigurationService),W(8,S.IStorageService),W(9,l.IUriIdentityService)],m),e.GlobalStateSynchroniser=m;let b=class extends r.AbstractInitializer{constructor(T,R,O,x,F){super("globalState",O,x,R,F);this.storageService=T}async doInitialize(T){const R=T.syncData?JSON.parse(T.syncData.content):null;if(!R){this.logService.info("Skipping initializing global state because remote global state does not exist.");return}const O={},x={};for(const F of Object.keys(R.storage))F.startsWith(n)?O[F.substring(n.length)]=R.storage[F].value:this.storageService.get(F,0)===void 0&&(x[F]=R.storage[F].value);if(Object.keys(O).length){let F="{}";try{F=(await this.fileService.readFile(this.environmentService.argvResource)).value.toString()}catch{}for(const L of Object.keys(O))F=(0,p.edit)(F,[L],O[L],{});await this.fileService.writeFile(this.environmentService.argvResource,t.VSBuffer.fromString(F))}if(Object.keys(x).length)for(const F of Object.keys(x))this.storageService.store(F,x[F],0,0)}};b=Ee([W(0,S.IStorageService),W(1,o.IFileService),W(2,C.IEnvironmentService),W(3,a.IUserDataSyncLogService),W(4,l.IUriIdentityService)],b),e.GlobalStateInitializer=b;let E=class{constructor(T,R,O,x,F){this.userDataSyncStoreClient=T,this.storageService=R,this.environmentService=O,this.fileService=x,this.logService=F}getSyncStoreType(T){return this.parseGlobalState(T)?.storage[a.SYNC_SERVICE_URL_TYPE]?.value}async sync(T){const R=(0,a.createSyncHeaders)((0,w.generateUuid)());try{return await this.doSync(T,R)}catch(O){if(O instanceof a.UserDataSyncError)switch(O.code){case"PreconditionFailed":return this.logService.info("Failed to synchronize UserDataSyncStoreType as there is a new remote version available. Synchronizing again..."),this.doSync(T,R)}throw O}}async doSync(T,R){const O=await this.userDataSyncStoreClient.read("globalState",null,R),x=this.parseGlobalState(O)||{storage:{}};x.storage[a.SYNC_SERVICE_URL_TYPE]={value:T,version:d};const F=await(0,i.getServiceMachineId)(this.environmentService,this.fileService,this.storageService),L={version:d,machineId:F,content:g(x,!1)};await this.userDataSyncStoreClient.write("globalState",JSON.stringify(L),O.ref,R)}parseGlobalState({content:T}){if(!T)return null;const R=JSON.parse(T);if((0,r.isSyncData)(R))return R?JSON.parse(R.content):null;throw new Error("Invalid remote data")}};E=Ee([W(1,S.IStorageService),W(2,C.IEnvironmentService),W(3,o.IFileService),W(4,c.ILogService)],E),e.UserDataSyncStoreTypeSynchronizer=E}),define(ne[2095],re([1,0,15,60,6,118,14,13,1346,8,85,23,24,27,56,352,2092,96]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingsInitializer=e.KeybindingsSynchroniser=e.getKeybindingsContentFromSyncContent=void 0;function r(a,n,h){try{const g=JSON.parse(a);if(!n)return(0,D.isUndefined)(g.all)?null:g.all;switch(k.OS){case 2:return(0,D.isUndefined)(g.mac)?null:g.mac;case 3:return(0,D.isUndefined)(g.linux)?null:g.linux;case 1:return(0,D.isUndefined)(g.windows)?null:g.windows}}catch(g){return h.error(g),null}}e.getKeybindingsContentFromSyncContent=r;let p=class extends S.AbstractJsonFileSynchroniser{constructor(n,h,g,d,m,b,E,y,T,R,O){super(E.keybindingsResource,"keybindings",b,E,y,n,h,m,R,g,T,d,O);this.version=2,this.previewResource=this.extUri.joinPath(this.syncPreviewFolder,"keybindings.json"),this.localResource=this.previewResource.with({scheme:l.USER_DATA_SYNC_SCHEME,authority:"local"}),this.remoteResource=this.previewResource.with({scheme:l.USER_DATA_SYNC_SCHEME,authority:"remote"}),this.acceptedResource=this.previewResource.with({scheme:l.USER_DATA_SYNC_SCHEME,authority:"accepted"}),this._register(_.Event.filter(d.onDidChangeConfiguration,x=>x.affectsConfiguration("settingsSync.keybindingsPerPlatform"))(()=>this.triggerLocalChange()))}async generateSyncPreview(n,h,g,d){const m=n.syncData?r(n.syncData.content,d.keybindingsPerPlatform??this.syncKeybindingsPerPlatform(),this.logService):null;h=h===null&&g?n:h;const b=h?this.getKeybindingsContentFromLastSyncUserData(h):null,E=await this.getLocalFileContent(),y=await this.getFormattingOptions();let T=null,R=!1,O=!1,x=!1;if(m){let L=E?E.value.toString():"[]";if(L=L||"[]",this.hasErrors(L))throw new l.UserDataSyncError((0,I.localize)(0,null),"LocalInvalidContent",this.resource);if(!b||b!==L||b!==m){this.logService.trace(`${this.syncResourceLogLabel}: Merging remote keybindings with local keybindings...`);const M=await(0,s.merge)(L,m,b,y,this.userDataSyncUtilService);M.hasChanges&&(T=M.mergeContent,x=M.hasConflicts,R=x||M.mergeContent!==L,O=x||M.mergeContent!==m)}}else E&&(this.logService.trace(`${this.syncResourceLogLabel}: Remote keybindings does not exist. Synchronizing keybindings for the first time.`),T=E.value.toString(),O=!0);const F={content:T,localChange:R?E?2:1:0,remoteChange:O?2:0,hasConflicts:x};return[{fileContent:E,localResource:this.localResource,localContent:E?E.value.toString():null,localChange:F.localChange,remoteResource:this.remoteResource,remoteContent:m,remoteChange:F.remoteChange,previewResource:this.previewResource,previewResult:F,acceptedResource:this.acceptedResource}]}async hasRemoteChanged(n){const h=this.getKeybindingsContentFromLastSyncUserData(n);if(h===null)return!0;const g=await this.getLocalFileContent(),d=g?g.value.toString():"",m=await this.getFormattingOptions(),b=await(0,s.merge)(d||"[]",h,h,m,this.userDataSyncUtilService);return b.hasConflicts||b.mergeContent!==h}async getMergeResult(n,h){return n.previewResult}async getAcceptResult(n,h,g,d){if(this.extUri.isEqual(h,this.localResource))return{content:n.fileContent?n.fileContent.value.toString():null,localChange:0,remoteChange:2};if(this.extUri.isEqual(h,this.remoteResource))return{content:n.remoteContent,localChange:2,remoteChange:0};if(this.extUri.isEqual(h,this.previewResource))return g===void 0?{content:n.previewResult.content,localChange:n.previewResult.localChange,remoteChange:n.previewResult.remoteChange}:{content:g,localChange:2,remoteChange:2};throw new Error(`Invalid Resource: ${h.toString()}`)}async applyResult(n,h,g,d){const{fileContent:m}=g[0][0];let{content:b,localChange:E,remoteChange:y}=g[0][1];if(E===0&&y===0&&this.logService.info(`${this.syncResourceLogLabel}: No changes found during synchronizing keybindings.`),b!==null&&(b=b.trim(),b=b||"[]",this.hasErrors(b)))throw new l.UserDataSyncError((0,I.localize)(1,null),"LocalInvalidContent",this.resource);if(E!==0&&(this.logService.trace(`${this.syncResourceLogLabel}: Updating local keybindings...`),m&&await this.backupLocal(this.toSyncContent(m.value.toString())),await this.updateLocalFileContent(b||"[]",m,d),this.logService.info(`${this.syncResourceLogLabel}: Updated local keybindings`)),y!==0){this.logService.trace(`${this.syncResourceLogLabel}: Updating remote keybindings...`);const T=this.toSyncContent(b||"[]",n.syncData?.content);n=await this.updateRemoteUserData(T,d?null:n.ref),this.logService.info(`${this.syncResourceLogLabel}: Updated remote keybindings`)}try{await this.fileService.del(this.previewResource)}catch{}h?.ref!==n.ref&&(this.logService.trace(`${this.syncResourceLogLabel}: Updating last synchronized keybindings...`),await this.updateLastSyncUserData(n,{platformSpecific:this.syncKeybindingsPerPlatform()}),this.logService.info(`${this.syncResourceLogLabel}: Updated last synchronized keybindings`))}async hasLocalData(){try{const n=await this.getLocalFileContent();if(n){const h=(0,A.parse)(n.value.toString());if((0,t.isNonEmptyArray)(h))return!0}}catch(n){if(n.fileOperationResult!==1)return!0}return!1}async getAssociatedResources({uri:n}){const h=await this.fileService.exists(this.file)?this.file:this.localResource;return[{resource:this.extUri.joinPath(n,"keybindings.json"),comparableResource:h}]}async resolveContent(n){if(this.extUri.isEqual(this.remoteResource,n)||this.extUri.isEqual(this.localResource,n)||this.extUri.isEqual(this.acceptedResource,n))return this.resolvePreviewContent(n);let h=await super.resolveContent(n);if(h)return h;if(h=await super.resolveContent(this.extUri.dirname(n)),h){const g=this.parseSyncData(h);if(g)switch(this.extUri.basename(n)){case"keybindings.json":return r(g.content,this.syncKeybindingsPerPlatform(),this.logService)}}return null}getKeybindingsContentFromLastSyncUserData(n){return!n.syncData||n.platformSpecific!==void 0&&n.platformSpecific!==this.syncKeybindingsPerPlatform()?null:r(n.syncData.content,this.syncKeybindingsPerPlatform(),this.logService)}toSyncContent(n,h){let g={};try{g=JSON.parse(h||"{}")}catch(d){this.logService.error(d)}switch(this.syncKeybindingsPerPlatform()?delete g.all:g.all=n,k.OS){case 2:g.mac=n;break;case 3:g.linux=n;break;case 1:g.windows=n;break}return JSON.stringify(g)}syncKeybindingsPerPlatform(){return!!this.configurationService.getValue("settingsSync.keybindingsPerPlatform")}};p=Ee([W(0,l.IUserDataSyncStoreService),W(1,l.IUserDataSyncBackupStoreService),W(2,l.IUserDataSyncLogService),W(3,w.IConfigurationService),W(4,l.IUserDataSyncEnablementService),W(5,C.IFileService),W(6,v.IEnvironmentService),W(7,o.IStorageService),W(8,l.IUserDataSyncUtilService),W(9,c.ITelemetryService),W(10,i.IUriIdentityService)],p),e.KeybindingsSynchroniser=p;let u=class extends S.AbstractInitializer{constructor(n,h,g,d){super("keybindings",h,g,n,d)}async doInitialize(n){const h=n.syncData?this.getKeybindingsContentFromSyncContent(n.syncData.content):null;if(!h){this.logService.info("Skipping initializing keybindings because remote keybindings does not exist.");return}if(!await this.isEmpty()){this.logService.info("Skipping initializing keybindings because local keybindings exist.");return}await this.fileService.writeFile(this.environmentService.keybindingsResource,f.VSBuffer.fromString(h)),await this.updateLastSyncUserData(n)}async isEmpty(){try{const n=await this.fileService.readFile(this.environmentService.settingsResource),h=(0,A.parse)(n.value.toString());return!(0,t.isNonEmptyArray)(h)}catch(n){return n.fileOperationResult===1}}getKeybindingsContentFromSyncContent(n){try{return r(n,!0,this.logService)}catch(h){return this.logService.error(h),null}}};u=Ee([W(0,C.IFileService),W(1,v.IEnvironmentService),W(2,l.IUserDataSyncLogService),W(3,i.IUriIdentityService)],u),e.KeybindingsInitializer=u}),define(ne[767],re([1,0,15,118,302,301,51,478,96]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addSetting=e.isEmpty=e.areSame=e.merge=e.updateIgnoredSettings=e.getIgnoredSettings=void 0;function w(b,E,y){let T=[];y?T=C(y):T=v(E);const R=[],O=[...(0,I.getDisallowedIgnoredSettings)()];if(Array.isArray(T))for(const x of T)x.startsWith("-")?O.push(x.substring(1)):R.push(x);return(0,t.distinct)([...b,...R].filter(x=>O.indexOf(x)===-1))}e.getIgnoredSettings=w;function v(b){let E=b.inspect("settingsSync.ignoredSettings").userValue;return E!==void 0||(E=b.inspect("sync.ignoredSettings").userValue,E!==void 0)?E:b.getValue("settingsSync.ignoredSettings")||[]}function C(b){const E=(0,f.parse)(b);return E?E["settingsSync.ignoredSettings"]||E["sync.ignoredSettings"]||[]:[]}function o(b,E,y,T){if(y.length){const R=m(E),O=(0,f.parse)(E)||{},x=(0,f.parse)(b);if(!x)return b;const F=[];for(const L of y){const M=O[L],N=x[L];M===void 0?b=D.edit(b,[L],void 0,T):N!==void 0?b=D.edit(b,[L],M,T):F.push(a(L,R))}F.sort((L,M)=>L.startOffset-M.startOffset),F.forEach(L=>b=l(L.setting.key,E,b,T))}return b}e.updateIgnoredSettings=o;function c(b,E,y,T,R,O){const x=o(b,E,T,O),F=y!==x,L=y!==E;if(!F&&!L)return{conflictsSettings:[],localContent:null,remoteContent:null,hasConflicts:!1};if(F&&!L)return{conflictsSettings:[],localContent:null,remoteContent:x,hasConflicts:!1};if(L&&!F)return{conflictsSettings:[],localContent:o(E,b,T,O),remoteContent:null,hasConflicts:!1};if(y===null&&S(b)){const $=i(b,E,T)?null:o(E,b,T,O);return{conflictsSettings:[],localContent:$,remoteContent:null,hasConflicts:!1}}let M=b,N=E;const B=(0,f.parse)(b),P=(0,f.parse)(E),V=y?(0,f.parse)(y):null,z=T.reduce(($,J)=>($.add(J),$),new Set),U=s(B,P,z),H=s(V,B,z),K=s(V,P,z),G=new Map,q=new Set,Z=$=>{q.add($);const J=R.filter(({key:ee})=>ee===$)[0];J?(M=D.edit(M,[$],J.value,O),N=D.edit(N,[$],J.value,O)):G.set($,{key:$,localValue:B[$],remoteValue:P[$]})};for(const $ of H.removed.values())K.updated.has($)?Z($):N=D.edit(N,[$],void 0,O);for(const $ of K.removed.values())q.has($)||(H.updated.has($)?Z($):M=D.edit(M,[$],void 0,O));for(const $ of H.updated.values())q.has($)||(K.updated.has($)?U.updated.has($)&&Z($):N=D.edit(N,[$],B[$],O));for(const $ of K.updated.values())q.has($)||(H.updated.has($)?U.updated.has($)&&Z($):M=D.edit(M,[$],P[$],O));for(const $ of H.added.values())q.has($)||(K.added.has($)?U.updated.has($)&&Z($):N=l($,M,N,O));for(const $ of K.added.values())q.has($)||(H.added.has($)?U.updated.has($)&&Z($):M=l($,N,M,O));const j=G.size>0||!i(M,N,T),X=j||!i(M,b,[]),Y=j||!i(N,E,[]);return{localContent:X?M:null,remoteContent:Y?N:null,conflictsSettings:[...G.values()],hasConflicts:j}}e.merge=c;function i(b,E,y){if(b===E)return!0;const T=(0,f.parse)(b),R=(0,f.parse)(E),O=y.reduce((L,M)=>(L.add(M),L),new Set),x=m(b).filter(L=>!(L.setting&&O.has(L.setting.key))),F=m(E).filter(L=>!(L.setting&&O.has(L.setting.key)));if(x.length!==F.length)return!1;for(let L=0;L<x.length;L++){const M=x[L],N=F[L];if(M.setting&&N.setting){if(M.setting.key!==N.setting.key||!k.equals(T[M.setting.key],R[M.setting.key]))return!1}else if(!M.setting&&!N.setting){if(M.value!==N.value)return!1}else return!1}return!0}e.areSame=i;function S(b){return b?m(b).length===0:!0}e.isEmpty=S;function s(b,E,y){const T=b?Object.keys(b).filter(L=>!y.has(L)):[],R=Object.keys(E).filter(L=>!y.has(L)),O=R.filter(L=>T.indexOf(L)===-1).reduce((L,M)=>(L.add(M),L),new Set),x=T.filter(L=>R.indexOf(L)===-1).reduce((L,M)=>(L.add(M),L),new Set),F=new Set;if(b)for(const L of T){if(x.has(L))continue;const M=b[L],N=E[L];k.equals(M,N)||F.add(L)}return{added:O,removed:x,updated:F}}function l(b,E,y,T){const R=(0,f.parse)(E),O=m(E),x=m(y),F=r(b,O,x);return p(y,b,R[b],F,x,T)}e.addSetting=l;function r(b,E,y){const T=E.findIndex(O=>O.setting?.key===b),R=E[T-1];if(R){if(R.setting){const x=a(R.setting.key,y);if(x)return{index:y.indexOf(x),insertAfter:!0}}else{const x=n(T,E);if(x){const F=a(x.setting.key,y);if(F){const L=h(y.indexOf(F),y),M=g(E,x,E[T]);if(L){const N=g(y,F,L),B=d(M,N);return B?{index:y.indexOf(B),insertAfter:!0}:{index:y.indexOf(L),insertAfter:!1}}else{const N=g(y,F,y[y.length-1]),B=d(M,N);return B?{index:y.indexOf(B),insertAfter:!0}:{index:y.length-1,insertAfter:!0}}}}}const O=E[T+1];if(O)if(O.setting){const x=a(O.setting.key,y);if(x)return{index:y.indexOf(x),insertAfter:!1}}else{const x=h(T,E);if(x){const F=a(x.setting.key,y);if(F){const L=n(y.indexOf(F),y),M=g(E,E[T],x);if(L){const N=g(y,L,F),B=d(M.reverse(),N.reverse());return B?{index:y.indexOf(B),insertAfter:!1}:{index:y.indexOf(L),insertAfter:!0}}else{const N=g(y,y[0],F),B=d(M.reverse(),N.reverse());return B?{index:y.indexOf(B),insertAfter:!1}:{index:0,insertAfter:!1}}}}}}return{index:y.length-1,insertAfter:!0}}function p(b,E,y,T,R,O){let x;return T.index===-1?x=(0,_.setProperty)(b,[E],y,O):x=u(b,E,y,T,R,O).map(F=>(0,_.withFormatting)(b,F,O)[0]),(0,_.applyEdits)(b,x)}function u(b,E,y,T,R,O){const x=`${JSON.stringify(E)}: ${JSON.stringify(y)}`,F=(0,A.getEOL)(O,b),L=R[T.index];if(T.insertAfter){const M=[];if(L.setting)M.push({offset:L.endOffset,length:0,content:","+x});else{const N=h(T.index,R),B=n(T.index,R),P=B?.setting?.commaOffset;B&&P===void 0&&M.push({offset:B.endOffset,length:0,content:","});const V=P!==void 0&&P>L.endOffset;M.push({offset:V?P+1:L.endOffset,length:0,content:N?F+x+",":F+x})}return M}else{if(L.setting)return[{offset:L.startOffset,length:0,content:x+","}];const M=(R[T.index-1]&&!R[T.index-1].setting?F:"")+x+(h(T.index,R)?",":"")+F;return[{offset:L.startOffset,length:0,content:M}]}}function a(b,E){return E.filter(y=>y.setting?.key===b)[0]}function n(b,E){for(let y=b-1;y>=0;y--)if(E[y].setting)return E[y]}function h(b,E){for(let y=b+1;y<E.length;y++)if(E[y].setting)return E[y]}function g(b,E,y){const T=b.indexOf(E),R=b.indexOf(y);return b.filter((O,x)=>T<x&&x<R)}function d(b,E){if(b.length&&E.length){let y=0;for(;y<E.length&&y<b.length;y++)if(b[y].value!==E[y].value)return E[y-1];return E[y-1]}}function m(b){const E=[];let y=-1,T,R;const O={onObjectBegin:x=>{y++},onObjectProperty:(x,F,L)=>{y===0&&(T=F,R=x)},onObjectEnd:(x,F)=>{y--,y===0&&E.push({startOffset:T,endOffset:x+F,value:b.substring(T,x+F),setting:{key:R,commaOffset:void 0}})},onArrayBegin:(x,F)=>{y++},onArrayEnd:(x,F)=>{y--,y===0&&E.push({startOffset:T,endOffset:x+F,value:b.substring(T,x+F),setting:{key:R,commaOffset:void 0}})},onLiteralValue:(x,F,L)=>{y===0&&E.push({startOffset:T,endOffset:F+L,value:b.substring(T,F+L),setting:{key:R,commaOffset:void 0}})},onSeparator:(x,F,L)=>{if(y===0&&x===","){let M=E.length-1;for(;M>=0&&!E[M].setting;M--);const N=E[M];N&&E.splice(M,1,{startOffset:N.startOffset,endOffset:N.endOffset,value:N.value,setting:{key:N.setting.key,commaOffset:F}})}},onComment:(x,F)=>{y===0&&E.push({startOffset:x,endOffset:x+F,value:b.substring(x,x+F)})}};return(0,f.visit)(b,O),E}}),define(ne[2096],re([1,0,60,6,1347,8,468,85,79,23,24,27,56,352,478,767,96]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SettingsInitializer=e.SettingsSynchroniser=e.parseSettingsSyncContent=void 0;function l(a){return a&&a.settings&&typeof a.settings=="string"&&Object.keys(a).length===1}function r(a){const n=JSON.parse(a);return l(n)?n:{settings:a}}e.parseSettingsSyncContent=r;let p=class extends c.AbstractJsonFileSynchroniser{constructor(n,h,g,d,m,b,E,y,T,R,O,x){super(h.settingsResource,"settings",n,h,g,d,m,T,R,b,E,y,x);this.extensionManagementService=O,this.version=2,this.previewResource=this.extUri.joinPath(this.syncPreviewFolder,"settings.json"),this.localResource=this.previewResource.with({scheme:s.USER_DATA_SYNC_SCHEME,authority:"local"}),this.remoteResource=this.previewResource.with({scheme:s.USER_DATA_SYNC_SCHEME,authority:"remote"}),this.acceptedResource=this.previewResource.with({scheme:s.USER_DATA_SYNC_SCHEME,authority:"accepted"}),this._defaultIgnoredSettings=void 0}async getRemoteUserDataSyncConfiguration(n){const h=await this.getLastSyncUserData(),g=await this.getLatestRemoteUserData(n,h),d=this.getSettingsSyncContent(g),m=new k.ConfigurationModelParser(s.USER_DATA_SYNC_CONFIGURATION_SCOPE);return d?.settings&&m.parse(d.settings),m.configurationModel.getValue(s.USER_DATA_SYNC_CONFIGURATION_SCOPE)||{}}async generateSyncPreview(n,h,g){const d=await this.getLocalFileContent(),m=await this.getFormattingOptions(),b=this.getSettingsSyncContent(n);h=h===null&&g?n:h;const E=h?this.getSettingsSyncContent(h):null,y=await this.getIgnoredSettings();let T=null,R=!1,O=!1,x=!1;if(b){let L=d?d.value.toString().trim():"{}";L=L||"{}",this.validateContent(L),this.logService.trace(`${this.syncResourceLogLabel}: Merging remote settings with local settings...`);const M=(0,S.merge)(L,b.settings,E?E.settings:null,y,[],m);T=M.localContent||M.remoteContent,R=M.localContent!==null,O=M.remoteContent!==null,x=M.hasConflicts}else d&&(this.logService.trace(`${this.syncResourceLogLabel}: Remote settings does not exist. Synchronizing settings for the first time.`),T=d.value.toString(),O=!0);const F={content:T,localChange:R?2:0,remoteChange:O?2:0,hasConflicts:x};return[{fileContent:d,localResource:this.localResource,localContent:d?d.value.toString():null,localChange:F.localChange,remoteResource:this.remoteResource,remoteContent:b?b.settings:null,remoteChange:F.remoteChange,previewResource:this.previewResource,previewResult:F,acceptedResource:this.acceptedResource}]}async hasRemoteChanged(n){const h=this.getSettingsSyncContent(n);if(h===null)return!0;const g=await this.getLocalFileContent(),d=g?g.value.toString().trim():"",m=await this.getIgnoredSettings(),b=await this.getFormattingOptions();return(0,S.merge)(d||"{}",h.settings,h.settings,m,[],b).remoteContent!==null}async getMergeResult(n,h){const g=await this.getFormattingOptions(),d=await this.getIgnoredSettings();return{...n.previewResult,content:n.previewResult.content?(0,S.updateIgnoredSettings)(n.previewResult.content,"{}",d,g):null}}async getAcceptResult(n,h,g,d){const m=await this.getFormattingOptions(),b=await this.getIgnoredSettings();if(this.extUri.isEqual(h,this.localResource))return{content:n.fileContent?(0,S.updateIgnoredSettings)(n.fileContent.value.toString(),"{}",b,m):null,localChange:0,remoteChange:2};if(this.extUri.isEqual(h,this.remoteResource))return{content:n.remoteContent!==null?(0,S.updateIgnoredSettings)(n.remoteContent,n.fileContent?n.fileContent.value.toString():"{}",b,m):null,localChange:2,remoteChange:0};if(this.extUri.isEqual(h,this.previewResource))return g===void 0?{content:n.previewResult.content,localChange:n.previewResult.localChange,remoteChange:n.previewResult.remoteChange}:{content:g!==null?(0,S.updateIgnoredSettings)(g,n.fileContent?n.fileContent.value.toString():"{}",b,m):null,localChange:2,remoteChange:2};throw new Error(`Invalid Resource: ${h.toString()}`)}async applyResult(n,h,g,d){const{fileContent:m}=g[0][0];let{content:b,localChange:E,remoteChange:y}=g[0][1];if(E===0&&y===0&&this.logService.info(`${this.syncResourceLogLabel}: No changes found during synchronizing settings.`),b=b?b.trim():"{}",b=b||"{}",this.validateContent(b),E!==0&&(this.logService.trace(`${this.syncResourceLogLabel}: Updating local settings...`),m&&await this.backupLocal(JSON.stringify(this.toSettingsSyncContent(m.value.toString()))),await this.updateLocalFileContent(b,m,d),await this.configurationService.reloadConfiguration(2),this.logService.info(`${this.syncResourceLogLabel}: Updated local settings`)),y!==0){const T=await this.getFormattingOptions(),R=this.getSettingsSyncContent(n),O=await this.getIgnoredSettings(b);b=(0,S.updateIgnoredSettings)(b,R?R.settings:"{}",O,T),this.logService.trace(`${this.syncResourceLogLabel}: Updating remote settings...`),n=await this.updateRemoteUserData(JSON.stringify(this.toSettingsSyncContent(b)),d?null:n.ref),this.logService.info(`${this.syncResourceLogLabel}: Updated remote settings`)}try{await this.fileService.del(this.previewResource)}catch{}h?.ref!==n.ref&&(this.logService.trace(`${this.syncResourceLogLabel}: Updating last synchronized settings...`),await this.updateLastSyncUserData(n),this.logService.info(`${this.syncResourceLogLabel}: Updated last synchronized settings`))}async hasLocalData(){try{const n=await this.getLocalFileContent();if(n){const h=await this.getFormattingOptions(),g=(0,i.edit)(n.value.toString(),[s.CONFIGURATION_SYNC_STORE_KEY],void 0,h);return!(0,S.isEmpty)(g)}}catch(n){if(n.fileOperationResult!==1)return!0}return!1}async getAssociatedResources({uri:n}){const h=await this.fileService.exists(this.file)?this.file:this.localResource;return[{resource:this.extUri.joinPath(n,"settings.json"),comparableResource:h}]}async resolveContent(n){if(this.extUri.isEqual(this.remoteResource,n)||this.extUri.isEqual(this.localResource,n)||this.extUri.isEqual(this.acceptedResource,n))return this.resolvePreviewContent(n);let h=await super.resolveContent(n);if(h)return h;if(h=await super.resolveContent(this.extUri.dirname(n)),h){const g=this.parseSyncData(h);if(g){const d=this.parseSettingsSyncContent(g.content);if(d)switch(this.extUri.basename(n)){case"settings.json":return d.settings}}}return null}async resolvePreviewContent(n){let h=await super.resolvePreviewContent(n);if(h){const g=await this.getFormattingOptions(),d=await this.getIgnoredSettings();h=(0,S.updateIgnoredSettings)(h,"{}",d,g)}return h}getSettingsSyncContent(n){return n.syncData?this.parseSettingsSyncContent(n.syncData.content):null}parseSettingsSyncContent(n){try{return r(n)}catch(h){this.logService.error(h)}return null}toSettingsSyncContent(n){return{settings:n}}async getIgnoredSettings(n){if(!this._defaultIgnoredSettings){this._defaultIgnoredSettings=this.userDataSyncUtilService.resolveDefaultIgnoredSettings();const g=f.Event.any(f.Event.filter(this.extensionManagementService.onDidInstallExtensions,d=>d.some(({local:m})=>!!m)),f.Event.filter(this.extensionManagementService.onDidUninstallExtension,d=>!d.error))(()=>{g.dispose(),this._defaultIgnoredSettings=void 0})}const h=await this._defaultIgnoredSettings;return(0,S.getIgnoredSettings)(h,this.configurationService,n)}validateContent(n){if(this.hasErrors(n))throw new s.UserDataSyncError((0,_.localize)(0,null),"LocalInvalidContent",this.resource)}};p=Ee([W(0,w.IFileService),W(1,D.IEnvironmentService),W(2,v.IStorageService),W(3,s.IUserDataSyncStoreService),W(4,s.IUserDataSyncBackupStoreService),W(5,s.IUserDataSyncLogService),W(6,s.IUserDataSyncUtilService),W(7,A.IConfigurationService),W(8,s.IUserDataSyncEnablementService),W(9,C.ITelemetryService),W(10,I.IExtensionManagementService),W(11,o.IUriIdentityService)],p),e.SettingsSynchroniser=p;let u=class extends c.AbstractInitializer{constructor(n,h,g,d){super("settings",h,g,n,d)}async doInitialize(n){const h=n.syncData?this.parseSettingsSyncContent(n.syncData.content):null;if(!h){this.logService.info("Skipping initializing settings because remote settings does not exist.");return}if(!await this.isEmpty()){this.logService.info("Skipping initializing settings because local settings exist.");return}await this.fileService.writeFile(this.environmentService.settingsResource,t.VSBuffer.fromString(h.settings)),await this.updateLastSyncUserData(n)}async isEmpty(){try{const n=await this.fileService.readFile(this.environmentService.settingsResource);return(0,S.isEmpty)(n.value.toString().trim())}catch(n){return n.fileOperationResult===1}}parseSettingsSyncContent(n){try{return r(n)}catch(h){this.logService.error(h)}return null}};u=Ee([W(0,w.IFileService),W(1,D.IEnvironmentService),W(2,s.IUserDataSyncLogService),W(3,o.IUriIdentityService)],u),e.SettingsInitializer=u}),define(ne[2097],re([1,0,60,6,51,8,85,23,24,27,56,352,2093,96]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetsInitializer=e.SnippetsSynchroniser=void 0;let i=class extends C.AbstractSynchroniser{constructor(l,r,p,u,a,n,h,g,d,m){super("snippets",r,l,p,u,a,g,d,n,h,m);this.version=1,this.snippetsFolder=l.snippetsHome,this._register(this.fileService.watch(l.userRoamingDataHome)),this._register(this.fileService.watch(this.snippetsFolder)),this._register(f.Event.filter(this.fileService.onDidFilesChange,b=>b.affects(this.snippetsFolder))(()=>this.triggerLocalChange()))}async generateSyncPreview(l,r,p){const u=await this.getSnippetsFileContents(),a=this.toSnippetsContents(u),n=l.syncData?this.parseSnippets(l.syncData):null;r=r===null&&p?l:r;const h=r&&r.syncData?this.parseSnippets(r.syncData):null;n?this.logService.trace(`${this.syncResourceLogLabel}: Merging remote snippets with local snippets...`):this.logService.trace(`${this.syncResourceLogLabel}: Remote snippets does not exist. Synchronizing snippets for the first time.`);const g=(0,o.merge)(a,n,h);return this.getResourcePreviews(g,u,n||{})}async hasRemoteChanged(l){const r=l.syncData?this.parseSnippets(l.syncData):null;if(r===null)return!0;const p=await this.getSnippetsFileContents(),u=this.toSnippetsContents(p),a=(0,o.merge)(u,r,r);return Object.keys(a.remote.added).length>0||Object.keys(a.remote.updated).length>0||a.remote.removed.length>0||a.conflicts.length>0}async getMergeResult(l,r){return l.previewResult}async getAcceptResult(l,r,p,u){if(this.extUri.isEqualOrParent(r,this.syncPreviewFolder.with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"local"})))return{content:l.fileContent?l.fileContent.value.toString():null,localChange:0,remoteChange:l.fileContent?l.remoteContent!==null?2:1:3};if(this.extUri.isEqualOrParent(r,this.syncPreviewFolder.with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"remote"})))return{content:l.remoteContent,localChange:l.remoteContent!==null?l.fileContent?2:1:3,remoteChange:0};if(this.extUri.isEqualOrParent(r,this.syncPreviewFolder))return p===void 0?{content:l.previewResult.content,localChange:l.previewResult.localChange,remoteChange:l.previewResult.remoteChange}:{content:p,localChange:p===null?l.fileContent!==null?3:0:2,remoteChange:p===null?l.remoteContent!==null?3:0:2};throw new Error(`Invalid Resource: ${r.toString()}`)}async applyResult(l,r,p,u){const a=p.map(([n,h])=>({...n,acceptResult:h}));a.every(({localChange:n,remoteChange:h})=>n===0&&h===0)&&this.logService.info(`${this.syncResourceLogLabel}: No changes found during synchronizing snippets.`),a.some(({localChange:n})=>n!==0)&&(await this.updateLocalBackup(a),await this.updateLocalSnippets(a,u)),a.some(({remoteChange:n})=>n!==0)&&(l=await this.updateRemoteSnippets(a,l,u)),r?.ref!==l.ref&&(this.logService.trace(`${this.syncResourceLogLabel}: Updating last synchronized snippets...`),await this.updateLastSyncUserData(l),this.logService.info(`${this.syncResourceLogLabel}: Updated last synchronized snippets`));for(const{previewResource:n}of a)try{await this.fileService.del(n)}catch{}}getResourcePreviews(l,r,p){const u=new Map;for(const a of Object.keys(l.local.added)){const n={content:l.local.added[a],hasConflicts:!1,localChange:1,remoteChange:0};u.set(a,{fileContent:null,localResource:this.extUri.joinPath(this.syncPreviewFolder,a).with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"local"}),localContent:null,remoteResource:this.extUri.joinPath(this.syncPreviewFolder,a).with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"remote"}),remoteContent:p[a],previewResource:this.extUri.joinPath(this.syncPreviewFolder,a),previewResult:n,localChange:n.localChange,remoteChange:n.remoteChange,acceptedResource:this.extUri.joinPath(this.syncPreviewFolder,a).with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"accepted"})})}for(const a of Object.keys(l.local.updated)){const n={content:l.local.updated[a],hasConflicts:!1,localChange:2,remoteChange:0};u.set(a,{localResource:this.extUri.joinPath(this.syncPreviewFolder,a).with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"local"}),fileContent:r[a],localContent:r[a].value.toString(),remoteResource:this.extUri.joinPath(this.syncPreviewFolder,a).with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"remote"}),remoteContent:p[a],previewResource:this.extUri.joinPath(this.syncPreviewFolder,a),previewResult:n,localChange:n.localChange,remoteChange:n.remoteChange,acceptedResource:this.extUri.joinPath(this.syncPreviewFolder,a).with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"accepted"})})}for(const a of l.local.removed){const n={content:null,hasConflicts:!1,localChange:3,remoteChange:0};u.set(a,{localResource:this.extUri.joinPath(this.syncPreviewFolder,a).with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"local"}),fileContent:r[a],localContent:r[a].value.toString(),remoteResource:this.extUri.joinPath(this.syncPreviewFolder,a).with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"remote"}),remoteContent:null,previewResource:this.extUri.joinPath(this.syncPreviewFolder,a),previewResult:n,localChange:n.localChange,remoteChange:n.remoteChange,acceptedResource:this.extUri.joinPath(this.syncPreviewFolder,a).with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"accepted"})})}for(const a of Object.keys(l.remote.added)){const n={content:l.remote.added[a],hasConflicts:!1,localChange:0,remoteChange:1};u.set(a,{localResource:this.extUri.joinPath(this.syncPreviewFolder,a).with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"local"}),fileContent:r[a],localContent:r[a].value.toString(),remoteResource:this.extUri.joinPath(this.syncPreviewFolder,a).with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"remote"}),remoteContent:null,previewResource:this.extUri.joinPath(this.syncPreviewFolder,a),previewResult:n,localChange:n.localChange,remoteChange:n.remoteChange,acceptedResource:this.extUri.joinPath(this.syncPreviewFolder,a).with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"accepted"})})}for(const a of Object.keys(l.remote.updated)){const n={content:l.remote.updated[a],hasConflicts:!1,localChange:0,remoteChange:2};u.set(a,{localResource:this.extUri.joinPath(this.syncPreviewFolder,a).with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"local"}),fileContent:r[a],localContent:r[a].value.toString(),remoteResource:this.extUri.joinPath(this.syncPreviewFolder,a).with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"remote"}),remoteContent:p[a],previewResource:this.extUri.joinPath(this.syncPreviewFolder,a),previewResult:n,localChange:n.localChange,remoteChange:n.remoteChange,acceptedResource:this.extUri.joinPath(this.syncPreviewFolder,a).with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"accepted"})})}for(const a of l.remote.removed){const n={content:null,hasConflicts:!1,localChange:0,remoteChange:3};u.set(a,{localResource:this.extUri.joinPath(this.syncPreviewFolder,a).with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"local"}),fileContent:null,localContent:null,remoteResource:this.extUri.joinPath(this.syncPreviewFolder,a).with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"remote"}),remoteContent:p[a],previewResource:this.extUri.joinPath(this.syncPreviewFolder,a),previewResult:n,localChange:n.localChange,remoteChange:n.remoteChange,acceptedResource:this.extUri.joinPath(this.syncPreviewFolder,a).with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"accepted"})})}for(const a of l.conflicts){const n={content:r[a]?r[a].value.toString():null,hasConflicts:!0,localChange:r[a]?2:1,remoteChange:p[a]?2:1};u.set(a,{localResource:this.extUri.joinPath(this.syncPreviewFolder,a).with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"local"}),fileContent:r[a]||null,localContent:r[a]?r[a].value.toString():null,remoteResource:this.extUri.joinPath(this.syncPreviewFolder,a).with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"remote"}),remoteContent:p[a]||null,previewResource:this.extUri.joinPath(this.syncPreviewFolder,a),previewResult:n,localChange:n.localChange,remoteChange:n.remoteChange,acceptedResource:this.extUri.joinPath(this.syncPreviewFolder,a).with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"accepted"})})}for(const a of Object.keys(r))if(!u.has(a)){const n={content:r[a]?r[a].value.toString():null,hasConflicts:!1,localChange:0,remoteChange:0};u.set(a,{localResource:this.extUri.joinPath(this.syncPreviewFolder,a).with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"local"}),fileContent:r[a]||null,localContent:r[a]?r[a].value.toString():null,remoteResource:this.extUri.joinPath(this.syncPreviewFolder,a).with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"remote"}),remoteContent:p[a]||null,previewResource:this.extUri.joinPath(this.syncPreviewFolder,a),previewResult:n,localChange:n.localChange,remoteChange:n.remoteChange,acceptedResource:this.extUri.joinPath(this.syncPreviewFolder,a).with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"accepted"})})}return[...u.values()]}async getAssociatedResources({uri:l}){let r=await super.resolveContent(l);if(r){const p=this.parseSyncData(r);if(p){const u=this.parseSnippets(p),a=[];for(const n of Object.keys(u)){const h=this.extUri.joinPath(l,n),g=this.extUri.joinPath(this.snippetsFolder,n),d=await this.fileService.exists(g);a.push({resource:h,comparableResource:d?g:this.extUri.joinPath(this.syncPreviewFolder,n).with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"local"})})}return a}}return[]}async resolveContent(l){if(this.extUri.isEqualOrParent(l,this.syncPreviewFolder.with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"remote"}))||this.extUri.isEqualOrParent(l,this.syncPreviewFolder.with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"local"}))||this.extUri.isEqualOrParent(l,this.syncPreviewFolder.with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"accepted"})))return this.resolvePreviewContent(l);let r=await super.resolveContent(l);if(r)return r;if(r=await super.resolveContent(this.extUri.dirname(l)),r){const p=this.parseSyncData(r);if(p)return this.parseSnippets(p)[this.extUri.basename(l)]||null}return null}async hasLocalData(){try{const l=await this.getSnippetsFileContents();if(Object.keys(l).length)return!0}catch{}return!1}async updateLocalBackup(l){const r={};for(const p of l)p.fileContent&&(r[this.extUri.basename(p.localResource)]=p.fileContent);await this.backupLocal(JSON.stringify(this.toSnippetsContents(r)))}async updateLocalSnippets(l,r){for(const{fileContent:p,acceptResult:u,localResource:a,remoteResource:n,localChange:h}of l)if(h!==0){const g=n?this.extUri.basename(n):this.extUri.basename(a),d=this.extUri.joinPath(this.snippetsFolder,g);h===3?(this.logService.trace(`${this.syncResourceLogLabel}: Deleting snippet...`,this.extUri.basename(d)),await this.fileService.del(d),this.logService.info(`${this.syncResourceLogLabel}: Deleted snippet`,this.extUri.basename(d))):h===1?(this.logService.trace(`${this.syncResourceLogLabel}: Creating snippet...`,this.extUri.basename(d)),await this.fileService.createFile(d,t.VSBuffer.fromString(u.content),{overwrite:r}),this.logService.info(`${this.syncResourceLogLabel}: Created snippet`,this.extUri.basename(d))):(this.logService.trace(`${this.syncResourceLogLabel}: Updating snippet...`,this.extUri.basename(d)),await this.fileService.writeFile(d,t.VSBuffer.fromString(u.content),r?void 0:p),this.logService.info(`${this.syncResourceLogLabel}: Updated snippet`,this.extUri.basename(d)))}}async updateRemoteSnippets(l,r,p){const u=r.syncData?this.parseSnippets(r.syncData):{},a=(0,_.deepClone)(u);for(const{acceptResult:n,localResource:h,remoteResource:g,remoteChange:d}of l)if(d!==0){const m=h?this.extUri.basename(h):this.extUri.basename(g);d===3?delete a[m]:a[m]=n.content}return(0,o.areSame)(u,a)||(this.logService.trace(`${this.syncResourceLogLabel}: Updating remote snippets...`),r=await this.updateRemoteUserData(JSON.stringify(a),p?null:r.ref),this.logService.info(`${this.syncResourceLogLabel}: Updated remote snippets`)),r}parseSnippets(l){return JSON.parse(l.content)}toSnippetsContents(l){const r={};for(const p of Object.keys(l))r[p]=l[p].value.toString();return r}async getSnippetsFileContents(){const l={};let r;try{r=await this.fileService.resolve(this.snippetsFolder)}catch(p){if(p instanceof D.FileOperationError&&p.fileOperationResult===1)return l;throw p}for(const p of r.children||[]){const u=p.resource,a=this.extUri.extname(u);if(a===".json"||a===".code-snippets"){const n=this.extUri.relativePath(this.snippetsFolder,u),h=await this.fileService.readFile(u);l[n]=h}}return l}};i=Ee([W(0,k.IEnvironmentService),W(1,D.IFileService),W(2,I.IStorageService),W(3,c.IUserDataSyncStoreService),W(4,c.IUserDataSyncBackupStoreService),W(5,c.IUserDataSyncLogService),W(6,A.IConfigurationService),W(7,c.IUserDataSyncEnablementService),W(8,w.ITelemetryService),W(9,v.IUriIdentityService)],i),e.SnippetsSynchroniser=i;let S=class extends C.AbstractInitializer{constructor(l,r,p,u){super("snippets",r,p,l,u)}async doInitialize(l){const r=l.syncData?JSON.parse(l.syncData.content):null;if(!r){this.logService.info("Skipping initializing snippets because remote snippets does not exist.");return}if(!await this.isEmpty()){this.logService.info("Skipping initializing snippets because local snippets exist.");return}for(const u of Object.keys(r)){const a=r[u];if(a){const n=this.extUri.joinPath(this.environmentService.snippetsHome,u);await this.fileService.createFile(n,t.VSBuffer.fromString(a)),this.logService.info("Created snippet",this.extUri.basename(n))}}await this.updateLastSyncUserData(l)}async isEmpty(){try{return!(await this.fileService.resolve(this.environmentService.snippetsHome)).children?.length}catch(l){return l.fileOperationResult===1}}};S=Ee([W(0,D.IFileService),W(1,k.IEnvironmentService),W(2,c.IUserDataSyncLogService),W(3,v.IUriIdentityService)],S),e.SnippetsInitializer=S}),define(ne[2098],re([1,0,60,8,85,23,24,27,56,352,96]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TasksInitializer=e.TasksSynchroniser=e.getTasksContentFromSyncContent=void 0;function C(S,s){try{return JSON.parse(S).tasks}catch(l){return s.error(l),null}}e.getTasksContentFromSyncContent=C;let o=class extends w.AbstractFileSynchroniser{constructor(s,l,r,p,u,a,n,h,g,d){super(d.extUri.joinPath(d.extUri.dirname(n.settingsResource),"tasks.json"),"tasks",a,n,h,s,l,u,g,r,p,d);this.version=1,this.previewResource=this.extUri.joinPath(this.syncPreviewFolder,"tasks.json"),this.localResource=this.previewResource.with({scheme:v.USER_DATA_SYNC_SCHEME,authority:"local"}),this.remoteResource=this.previewResource.with({scheme:v.USER_DATA_SYNC_SCHEME,authority:"remote"}),this.acceptedResource=this.previewResource.with({scheme:v.USER_DATA_SYNC_SCHEME,authority:"accepted"})}async generateSyncPreview(s,l,r,p){const u=s.syncData?C(s.syncData.content,this.logService):null;l=l===null&&r?s:l;const a=l?.syncData?C(l.syncData.content,this.logService):null,n=await this.getLocalFileContent();let h=null,g=!1,d=!1,m=!1;if(u){const E=n?n.value.toString():null;if(!a||a!==E||a!==u){this.logService.trace(`${this.syncResourceLogLabel}: Merging remote tasks with local tasks...`);const y=i(E,u,a);h=y.content,m=y.hasConflicts,g=y.hasLocalChanged,d=y.hasRemoteChanged}}else n&&(this.logService.trace(`${this.syncResourceLogLabel}: Remote tasks does not exist. Synchronizing tasks for the first time.`),h=n.value.toString(),d=!0);const b={content:h,localChange:g?n?2:1:0,remoteChange:d?2:0,hasConflicts:m};return[{fileContent:n,localResource:this.localResource,localContent:n?n.value.toString():null,localChange:b.localChange,remoteResource:this.remoteResource,remoteContent:u,remoteChange:b.remoteChange,previewResource:this.previewResource,previewResult:b,acceptedResource:this.acceptedResource}]}async hasRemoteChanged(s){const l=s?.syncData?C(s.syncData.content,this.logService):null;if(l===null)return!0;const r=await this.getLocalFileContent(),p=r?r.value.toString():null,u=i(p,l,l);return u.hasLocalChanged||u.hasRemoteChanged}async getMergeResult(s,l){return s.previewResult}async getAcceptResult(s,l,r,p){if(this.extUri.isEqual(l,this.localResource))return{content:s.fileContent?s.fileContent.value.toString():null,localChange:0,remoteChange:2};if(this.extUri.isEqual(l,this.remoteResource))return{content:s.remoteContent,localChange:2,remoteChange:0};if(this.extUri.isEqual(l,this.previewResource))return r===void 0?{content:s.previewResult.content,localChange:s.previewResult.localChange,remoteChange:s.previewResult.remoteChange}:{content:r,localChange:2,remoteChange:2};throw new Error(`Invalid Resource: ${l.toString()}`)}async applyResult(s,l,r,p){const{fileContent:u}=r[0][0];let{content:a,localChange:n,remoteChange:h}=r[0][1];if(n===0&&h===0&&this.logService.info(`${this.syncResourceLogLabel}: No changes found during synchronizing tasks.`),n!==0&&(this.logService.trace(`${this.syncResourceLogLabel}: Updating local tasks...`),u&&await this.backupLocal(JSON.stringify(this.toTasksSyncContent(u.value.toString()))),await this.updateLocalFileContent(a||"{}",u,p),this.logService.info(`${this.syncResourceLogLabel}: Updated local tasks`)),h!==0){this.logService.trace(`${this.syncResourceLogLabel}: Updating remote tasks...`);const g=JSON.stringify(this.toTasksSyncContent(a||"{}"));s=await this.updateRemoteUserData(g,p?null:s.ref),this.logService.info(`${this.syncResourceLogLabel}: Updated remote tasks`)}try{await this.fileService.del(this.previewResource)}catch{}l?.ref!==s.ref&&(this.logService.trace(`${this.syncResourceLogLabel}: Updating last synchronized tasks...`),await this.updateLastSyncUserData(s),this.logService.info(`${this.syncResourceLogLabel}: Updated last synchronized tasks`))}async hasLocalData(){return this.fileService.exists(this.file)}async getAssociatedResources({uri:s}){const l=await this.fileService.exists(this.file)?this.file:this.localResource;return[{resource:this.extUri.joinPath(s,"tasks.json"),comparableResource:l}]}async resolveContent(s){if(this.extUri.isEqual(this.remoteResource,s)||this.extUri.isEqual(this.localResource,s)||this.extUri.isEqual(this.acceptedResource,s))return this.resolvePreviewContent(s);let l=await super.resolveContent(s);if(l)return l;if(l=await super.resolveContent(this.extUri.dirname(s)),l){const r=this.parseSyncData(l);if(r)switch(this.extUri.basename(s)){case"tasks.json":return C(r.content,this.logService)}}return null}toTasksSyncContent(s){return{tasks:s}}};o=Ee([W(0,v.IUserDataSyncStoreService),W(1,v.IUserDataSyncBackupStoreService),W(2,v.IUserDataSyncLogService),W(3,f.IConfigurationService),W(4,v.IUserDataSyncEnablementService),W(5,A.IFileService),W(6,_.IEnvironmentService),W(7,k.IStorageService),W(8,D.ITelemetryService),W(9,I.IUriIdentityService)],o),e.TasksSynchroniser=o;let c=class extends w.AbstractInitializer{constructor(s,l,r,p){super("tasks",l,r,s,p);this.uriIdentityService=p,this.tasksResource=this.uriIdentityService.extUri.joinPath(this.uriIdentityService.extUri.dirname(this.environmentService.settingsResource),"tasks.json")}async doInitialize(s){const l=s.syncData?C(s.syncData.content,this.logService):null;if(!l){this.logService.info("Skipping initializing tasks because remote tasks does not exist.");return}if(!await this.isEmpty()){this.logService.info("Skipping initializing tasks because local tasks exist.");return}await this.fileService.writeFile(this.tasksResource,t.VSBuffer.fromString(l)),await this.updateLastSyncUserData(s)}async isEmpty(){return this.fileService.exists(this.tasksResource)}};c=Ee([W(0,A.IFileService),W(1,_.IEnvironmentService),W(2,v.IUserDataSyncLogService),W(3,I.IUriIdentityService)],c),e.TasksInitializer=c;function i(S,s,l){if(S===null&&s===null&&l===null)return{content:null,hasLocalChanged:!1,hasRemoteChanged:!1,hasConflicts:!1};if(S===s)return{content:null,hasLocalChanged:!1,hasRemoteChanged:!1,hasConflicts:!1};const r=l!==S,p=l!==s;return!r&&!p?{content:null,hasLocalChanged:!1,hasRemoteChanged:!1,hasConflicts:!1}:r&&!p?{content:S,hasRemoteChanged:!0,hasLocalChanged:!1,hasConflicts:!1}:p&&!r?{content:s,hasLocalChanged:!0,hasRemoteChanged:!1,hasConflicts:!1}:{content:S,hasLocalChanged:!0,hasRemoteChanged:!0,hasConflicts:!0}}}),define(ne[479],re([1,0,6,2,5,96]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataSyncAccountService=e.IUserDataSyncAccountService=void 0,e.IUserDataSyncAccountService=(0,_.createDecorator)("IUserDataSyncAccountService");let k=class extends f.Disposable{constructor(I,w){super();this.userDataSyncStoreService=I,this.logService=w,this._onDidChangeAccount=this._register(new t.Emitter),this.onDidChangeAccount=this._onDidChangeAccount.event,this._onTokenFailed=this._register(new t.Emitter),this.onTokenFailed=this._onTokenFailed.event,this.wasTokenFailed=!1,this._register(I.onTokenFailed(()=>{this.logService.info("Settings Sync auth token failed",this.account?.authenticationProviderId,this.wasTokenFailed),this.updateAccount(void 0),this._onTokenFailed.fire(this.wasTokenFailed),this.wasTokenFailed=!0})),this._register(I.onTokenSucceed(()=>this.wasTokenFailed=!1))}get account(){return this._account}async updateAccount(I){(I&&this._account?I.token!==this._account.token||I.authenticationProviderId!==this._account.authenticationProviderId:I!==this._account)&&(this._account=I,this._account&&this.userDataSyncStoreService.setAuthToken(this._account.token,this._account.authenticationProviderId),this._onDidChangeAccount.fire(I))}};k=Ee([W(0,A.IUserDataSyncStoreService),W(1,A.IUserDataSyncLogService)],k),e.UserDataSyncAccountService=k}),define(ne[2099],re([1,0,6,2,14,85,24,27,96]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataSyncEnablementService=void 0;const w="sync.enable";let v=class extends f.Disposable{constructor(o,c,i,S){super();this.storageService=o,this.telemetryService=c,this.environmentService=i,this.userDataSyncStoreManagementService=S,this._onDidChangeEnablement=new t.Emitter,this.onDidChangeEnablement=this._onDidChangeEnablement.event,this._onDidChangeResourceEnablement=new t.Emitter,this.onDidChangeResourceEnablement=this._onDidChangeResourceEnablement.event,this._register(o.onDidChangeValue(s=>this.onDidStorageChange(s)))}isEnabled(){switch(this.environmentService.sync){case"on":return!0;case"off":return!1}return this.storageService.getBoolean(w,0,!1)}canToggleEnablement(){return this.userDataSyncStoreManagementService.userDataSyncStore!==void 0&&this.environmentService.sync===void 0}setEnablement(o){o&&!this.canToggleEnablement()||(this.telemetryService.publicLog2(w,{enabled:o}),this.storageService.store(w,o,0,1))}isResourceEnabled(o){return this.storageService.getBoolean((0,I.getEnablementKey)(o),0,!0)}setResourceEnablement(o,c){if(this.isResourceEnabled(o)!==c){const i=(0,I.getEnablementKey)(o);this.storeResourceEnablement(i,c)}}getResourceSyncStateVersion(o){}storeResourceEnablement(o,c){this.storageService.store(o,c,0,_.isWeb?0:1)}onDidStorageChange(o){if(o.scope!==0)return;if(w===o.key){this._onDidChangeEnablement.fire(this.isEnabled());return}const c=I.ALL_SYNC_RESOURCES.filter(i=>(0,I.getEnablementKey)(i)===o.key)[0];if(c){this._onDidChangeResourceEnablement.fire([c,this.isResourceEnabled(c)]);return}}};v=Ee([W(0,k.IStorageService),W(1,D.ITelemetryService),W(2,A.IEnvironmentService),W(3,I.IUserDataSyncStoreManagementService)],v),e.UserDataSyncEnablementService=v}),define(ne[768],re([1,0,2,9]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataSyncStoreManagementServiceChannelClient=e.UserDataSyncStoreManagementServiceChannel=e.UserDataSyncAccountServiceChannel=e.UserDataSyncMachinesServiceChannel=e.UserDataSyncUtilServiceClient=e.UserDataSycnUtilServiceChannel=e.UserDataAutoSyncChannel=void 0;class _{constructor(o){this.service=o}listen(o,c){switch(c){case"onError":return this.service.onError}throw new Error(`Event not found: ${c}`)}call(o,c,i){switch(c){case"triggerSync":return this.service.triggerSync(i[0],i[1],i[2]);case"turnOn":return this.service.turnOn();case"turnOff":return this.service.turnOff(i[0])}throw new Error("Invalid call")}}e.UserDataAutoSyncChannel=_;class A{constructor(o){this.service=o}listen(o,c){throw new Error(`Event not found: ${c}`)}call(o,c,i){switch(c){case"resolveDefaultIgnoredSettings":return this.service.resolveDefaultIgnoredSettings();case"resolveUserKeybindings":return this.service.resolveUserBindings(i[0]);case"resolveFormattingOptions":return this.service.resolveFormattingOptions(f.URI.revive(i[0]))}throw new Error("Invalid call")}}e.UserDataSycnUtilServiceChannel=A;class k{constructor(o){this.channel=o}async resolveDefaultIgnoredSettings(){return this.channel.call("resolveDefaultIgnoredSettings")}async resolveUserBindings(o){return this.channel.call("resolveUserKeybindings",[o])}async resolveFormattingOptions(o){return this.channel.call("resolveFormattingOptions",[o])}}e.UserDataSyncUtilServiceClient=k;class D{constructor(o){this.service=o}listen(o,c){switch(c){case"onDidChange":return this.service.onDidChange}throw new Error(`Event not found: ${c}`)}async call(o,c,i){switch(c){case"getMachines":return this.service.getMachines();case"addCurrentMachine":return this.service.addCurrentMachine();case"removeCurrentMachine":return this.service.removeCurrentMachine();case"renameMachine":return this.service.renameMachine(i[0],i[1]);case"setEnablements":return this.service.setEnablements(i)}throw new Error("Invalid call")}}e.UserDataSyncMachinesServiceChannel=D;class I{constructor(o){this.service=o}listen(o,c){switch(c){case"onDidChangeAccount":return this.service.onDidChangeAccount;case"onTokenFailed":return this.service.onTokenFailed}throw new Error(`Event not found: ${c}`)}call(o,c,i){switch(c){case"_getInitialData":return Promise.resolve(this.service.account);case"updateAccount":return this.service.updateAccount(i)}throw new Error("Invalid call")}}e.UserDataSyncAccountServiceChannel=I;class w{constructor(o){this.service=o}listen(o,c){switch(c){case"onDidChangeUserDataSyncStore":return this.service.onDidChangeUserDataSyncStore}throw new Error(`Event not found: ${c}`)}call(o,c,i){switch(c){case"switch":return this.service.switch(i[0]);case"getPreviousUserDataSyncStore":return this.service.getPreviousUserDataSyncStore()}throw new Error("Invalid call")}}e.UserDataSyncStoreManagementServiceChannel=w;class v extends t.Disposable{constructor(o){super();this.channel=o,this.onDidChangeUserDataSyncStore=this.channel.listen("onDidChangeUserDataSyncStore")}async switch(o){return this.channel.call("switch",[o])}async getPreviousUserDataSyncStore(){const o=await this.channel.call("getPreviousUserDataSyncStore");return this.revive(o)}revive(o){return{url:f.URI.revive(o.url),type:o.type,defaultUrl:f.URI.revive(o.defaultUrl),insidersUrl:f.URI.revive(o.insidersUrl),stableUrl:f.URI.revive(o.stableUrl),canSwitch:o.canSwitch,authenticationProviders:o.authenticationProviders}}}e.UserDataSyncStoreManagementServiceChannelClient=v}),define(ne[2100],re([1,0,85,31]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataSyncLogService=void 0;let _=class extends f.AbstractLogger{constructor(k,D){super();this.logger=this._register(k.createLogger(D.userDataSyncLogResource,{name:"settingssync"}))}trace(k,...D){this.logger.trace(k,...D)}debug(k,...D){this.logger.debug(k,...D)}info(k,...D){this.logger.info(k,...D)}warn(k,...D){this.logger.warn(k,...D)}error(k,...D){this.logger.error(k,...D)}critical(k,...D){this.logger.critical(k,...D)}flush(){this.logger.flush()}};_=Ee([W(0,f.ILoggerService),W(1,t.IEnvironmentService)],_),e.UserDataSyncLogService=_}),define(ne[769],re([1,0,6,2,14,29,1349,85,23,5,46,347,24,96]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataSyncMachinesService=e.isWebPlatform=e.IUserDataSyncMachinesService=void 0,e.IUserDataSyncMachinesService=(0,w.createDecorator)("IUserDataSyncMachinesService");const i="sync.currentMachineName",S="Safari",s="Chrome",l="Edge",r="Firefox",p="Android";function u(h){switch(h){case S:case s:case l:case r:case p:case(0,_.PlatformToString)(0):return!0}return!1}e.isWebPlatform=u;function a(){return _.isSafari?S:_.isChrome?s:_.isEdge?l:_.isFirefox?r:_.isAndroid?p:(0,_.PlatformToString)(_.isWeb?0:_.platform)}let n=class Fi extends f.Disposable{constructor(g,d,m,b,E,y){super();this.storageService=m,this.userDataSyncStoreService=b,this.logService=E,this.productService=y,this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this.userData=null,this.currentMachineIdPromise=(0,C.getServiceMachineId)(g,d,m)}async getMachines(g){const d=await this.currentMachineIdPromise;return(await this.readMachinesData(g)).machines.map(b=>({...b,isCurrent:b.id===d}))}async addCurrentMachine(g){const d=await this.currentMachineIdPromise,m=await this.readMachinesData(g);m.machines.some(({id:b})=>b===d)||(m.machines.push({id:d,name:this.computeCurrentMachineName(m.machines),platform:a()}),await this.writeMachinesData(m))}async removeCurrentMachine(g){const d=await this.currentMachineIdPromise,m=await this.readMachinesData(g),b=m.machines.filter(({id:E})=>E!==d);b.length!==m.machines.length&&(m.machines=b,await this.writeMachinesData(m))}async renameMachine(g,d,m){const b=await this.readMachinesData(m),E=b.machines.find(({id:y})=>y===g);if(E){E.name=d,await this.writeMachinesData(b);const y=await this.currentMachineIdPromise;g===y&&this.storageService.store(i,d,0,1)}}async setEnablements(g){const d=await this.readMachinesData();for(const[m,b]of g){const E=d.machines.find(y=>y.id===m);E&&(E.disabled=b?void 0:!0)}await this.writeMachinesData(d)}computeCurrentMachineName(g){const d=this.storageService.get(i,0);if(d)return d;const m=`${this.productService.embedderIdentifier?`${this.productService.embedderIdentifier} - `:""}${a()} (${this.productService.nameShort})`,b=new RegExp(`${(0,A.escapeRegExpCharacters)(m)}\\s#(\\d+)`);let E=0;for(const y of g){const T=b.exec(y.name),R=T?parseInt(T[1]):0;E=R>E?R:E}return`${m} #${E+1}`}async readMachinesData(g){this.userData=await this.readUserData(g);const d=this.parse(this.userData);if(d.version!==Fi.VERSION)throw new Error((0,k.localize)(0,null,this.productService.nameLong));return d}async writeMachinesData(g){const d=JSON.stringify(g),m=await this.userDataSyncStoreService.write(Fi.RESOURCE,d,this.userData?.ref||null);this.userData={ref:m,content:d},this._onDidChange.fire()}async readUserData(g){if(this.userData){const d=g&&g.latest?g.latest[Fi.RESOURCE]:void 0;if(this.userData.ref===d)return this.userData;if(d===void 0&&this.userData.content===null)return this.userData}return this.userDataSyncStoreService.read(Fi.RESOURCE,this.userData)}parse(g){if(g.content!==null)try{return JSON.parse(g.content)}catch(d){this.logService.error(d)}return{version:Fi.VERSION,machines:[]}}};n.VERSION=1,n.RESOURCE="machines",n=Ee([W(0,D.IEnvironmentService),W(1,I.IFileService),W(2,o.IStorageService),W(3,c.IUserDataSyncStoreService),W(4,c.IUserDataSyncLogService),W(5,v.IProductService)],n),e.UserDataSyncMachinesService=n}),define(ne[2101],re([1,0,6,2,13,9,96]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataSyncChannelClient=e.UserDataSyncChannel=void 0;class D{constructor(C,o){this.service=C,this.logService=o,this.manualSyncTasks=new Map,this.onManualSynchronizeResources=new t.Emitter}listen(C,o){switch(o){case"onDidChangeStatus":return this.service.onDidChangeStatus;case"onDidChangeConflicts":return this.service.onDidChangeConflicts;case"onDidChangeLocal":return this.service.onDidChangeLocal;case"onDidChangeLastSyncTime":return this.service.onDidChangeLastSyncTime;case"onSyncErrors":return this.service.onSyncErrors;case"onDidResetLocal":return this.service.onDidResetLocal;case"onDidResetRemote":return this.service.onDidResetRemote;case"manualSync/onSynchronizeResources":return this.onManualSynchronizeResources.event}throw new Error(`Event not found: ${o}`)}async call(C,o,c){try{return await this._call(C,o,c)}catch(i){throw this.logService.error(i),i}}async _call(C,o,c){switch(o){case"_getInitialData":return Promise.resolve([this.service.status,this.service.conflicts,this.service.lastSyncTime]);case"replace":return this.service.replace(A.URI.revive(c[0]));case"reset":return this.service.reset();case"resetRemote":return this.service.resetRemote();case"resetLocal":return this.service.resetLocal();case"hasPreviouslySynced":return this.service.hasPreviouslySynced();case"hasLocalData":return this.service.hasLocalData();case"accept":return this.service.accept(c[0],A.URI.revive(c[1]),c[2],c[3]);case"resolveContent":return this.service.resolveContent(A.URI.revive(c[0]));case"getLocalSyncResourceHandles":return this.service.getLocalSyncResourceHandles(c[0]);case"getRemoteSyncResourceHandles":return this.service.getRemoteSyncResourceHandles(c[0]);case"getAssociatedResources":return this.service.getAssociatedResources(c[0],{created:c[1].created,uri:A.URI.revive(c[1].uri)});case"getMachineId":return this.service.getMachineId(c[0],{created:c[1].created,uri:A.URI.revive(c[1].uri)});case"createManualSyncTask":return this.createManualSyncTask()}if(o.startsWith("manualSync/")){const i=o.substring("manualSync/".length),S=c[0],s=this.getManualSyncTask(S);switch(c=c.slice(1),i){case"preview":return s.preview();case"accept":return s.accept(A.URI.revive(c[0]),c[1]);case"merge":return s.merge(A.URI.revive(c[0]));case"discard":return s.discard(A.URI.revive(c[0]));case"discardConflicts":return s.discardConflicts();case"apply":return s.apply();case"pull":return s.pull();case"push":return s.push();case"stop":return s.stop();case"_getStatus":return s.status;case"dispose":return this.disposeManualSyncTask(s)}}throw new Error("Invalid call")}getManualSyncTask(C){const o=this.manualSyncTasks.get(this.createKey(C));if(!o)throw new Error(`Manual sync taks not found: ${C}`);return o.manualSyncTask}async createManualSyncTask(){const C=new f.DisposableStore,o=C.add(await this.service.createManualSyncTask());return C.add(o.onSynchronizeResources(c=>this.onManualSynchronizeResources.fire({manualSyncTaskId:o.id,data:c}))),this.manualSyncTasks.set(this.createKey(o.id),{manualSyncTask:o,disposables:C}),{id:o.id,manifest:o.manifest,status:o.status}}disposeManualSyncTask(C){C.dispose();const o=this.createKey(C.id);this.manualSyncTasks.get(o)?.disposables.dispose(),this.manualSyncTasks.delete(o)}createKey(C){return`manualSyncTask-${C}`}}e.UserDataSyncChannel=D;class I extends f.Disposable{constructor(C){super();this._status="uninitialized",this._onDidChangeStatus=this._register(new t.Emitter),this.onDidChangeStatus=this._onDidChangeStatus.event,this._conflicts=[],this._onDidChangeConflicts=this._register(new t.Emitter),this.onDidChangeConflicts=this._onDidChangeConflicts.event,this._lastSyncTime=void 0,this._onDidChangeLastSyncTime=this._register(new t.Emitter),this.onDidChangeLastSyncTime=this._onDidChangeLastSyncTime.event,this._onSyncErrors=this._register(new t.Emitter),this.onSyncErrors=this._onSyncErrors.event,this.channel={call(o,c,i){return C.call(o,c,i).then(null,S=>{throw k.UserDataSyncError.toUserDataSyncError(S)})},listen(o,c){return C.listen(o,c)}},this.channel.call("_getInitialData").then(([o,c,i])=>{this.updateStatus(o),this.updateConflicts(c),i&&this.updateLastSyncTime(i),this._register(this.channel.listen("onDidChangeStatus")(S=>this.updateStatus(S))),this._register(this.channel.listen("onDidChangeLastSyncTime")(S=>this.updateLastSyncTime(S)))}),this._register(this.channel.listen("onDidChangeConflicts")(o=>this.updateConflicts(o))),this._register(this.channel.listen("onSyncErrors")(o=>this._onSyncErrors.fire(o.map(([c,i])=>[c,k.UserDataSyncError.toUserDataSyncError(i)]))))}get status(){return this._status}get onDidChangeLocal(){return this.channel.listen("onDidChangeLocal")}get conflicts(){return this._conflicts}get lastSyncTime(){return this._lastSyncTime}get onDidResetLocal(){return this.channel.listen("onDidResetLocal")}get onDidResetRemote(){return this.channel.listen("onDidResetRemote")}createSyncTask(){throw new Error("not supported")}async createManualSyncTask(){const{id:C,manifest:o,status:c}=await this.channel.call("createManualSyncTask"),i=this,S=new w(C,o,c,{async call(s,l,r){return i.channel.call(`manualSync/${s}`,[C,...(0,_.isArray)(l)?l:[l]],r)},listen(s,l){return t.Event.map(t.Event.filter(i.channel.listen(`manualSync/${s}`,l),r=>!S.isDiposed()&&r.manualSyncTaskId===C),r=>r.data)}});return S}replace(C){return this.channel.call("replace",[C])}reset(){return this.channel.call("reset")}resetRemote(){return this.channel.call("resetRemote")}resetLocal(){return this.channel.call("resetLocal")}hasPreviouslySynced(){return this.channel.call("hasPreviouslySynced")}hasLocalData(){return this.channel.call("hasLocalData")}accept(C,o,c,i){return this.channel.call("accept",[C,o,c,i])}resolveContent(C){return this.channel.call("resolveContent",[C])}async getLocalSyncResourceHandles(C){return(await this.channel.call("getLocalSyncResourceHandles",[C])).map(({created:c,uri:i})=>({created:c,uri:A.URI.revive(i)}))}async getRemoteSyncResourceHandles(C){return(await this.channel.call("getRemoteSyncResourceHandles",[C])).map(({created:c,uri:i})=>({created:c,uri:A.URI.revive(i)}))}async getAssociatedResources(C,o){return(await this.channel.call("getAssociatedResources",[C,o])).map(({resource:i,comparableResource:S})=>({resource:A.URI.revive(i),comparableResource:A.URI.revive(S)}))}async getMachineId(C,o){return this.channel.call("getMachineId",[C,o])}async updateStatus(C){this._status=C,this._onDidChangeStatus.fire(C)}async updateConflicts(C){this._conflicts=C.map(([o,c])=>[o,c.map(i=>({...i,localResource:A.URI.revive(i.localResource),remoteResource:A.URI.revive(i.remoteResource),previewResource:A.URI.revive(i.previewResource)}))]),this._onDidChangeConflicts.fire(this._conflicts)}updateLastSyncTime(C){this._lastSyncTime!==C&&(this._lastSyncTime=C,this._onDidChangeLastSyncTime.fire(C))}}e.UserDataSyncChannelClient=I;class w extends f.Disposable{constructor(C,o,c,i){super();this.id=C,this.manifest=o,this._disposed=!1,this._status=c;const S=this;this.channel={async call(s,l,r){try{const p=await i.call(s,l,r);return S.isDiposed()||(S._status=await i.call("_getStatus")),p}catch(p){throw k.UserDataSyncError.toUserDataSyncError(p)}},listen(s,l){return i.listen(s,l)}}}get onSynchronizeResources(){return this.channel.listen("onSynchronizeResources")}get status(){return this._status}async preview(){const C=await this.channel.call("preview");return this.deserializePreviews(C)}async accept(C,o){const c=await this.channel.call("accept",[C,o]);return this.deserializePreviews(c)}async merge(C){const o=await this.channel.call("merge",[C]);return this.deserializePreviews(o)}async discard(C){const o=await this.channel.call("discard",[C]);return this.deserializePreviews(o)}async discardConflicts(){const C=await this.channel.call("discardConflicts");return this.deserializePreviews(C)}async apply(){const C=await this.channel.call("apply");return this.deserializePreviews(C)}pull(){return this.channel.call("pull")}push(){return this.channel.call("push")}stop(){return this.channel.call("stop")}isDiposed(){return this._disposed}dispose(){this._disposed=!0,this.channel.call("dispose")}deserializePreviews(C){return C.map(([o,c])=>[o,{isLastSyncFromCurrentMachine:c.isLastSyncFromCurrentMachine,resourcePreviews:c.resourcePreviews.map(i=>({...i,localResource:A.URI.revive(i.localResource),remoteResource:A.URI.revive(i.remoteResource),previewResource:A.URI.revive(i.previewResource),acceptedResource:A.URI.revive(i.acceptedResource)}))}])}}}),define(ne[480],re([1,0,11,30,22,6,2,169,14,19,13,9,89,8,85,23,46,187,347,24,96]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RequestsSession=e.UserDataSyncStoreService=e.UserDataSyncStoreClient=e.UserDataSyncStoreManagementService=e.AbstractUserDataSyncStoreManagementService=void 0;const a="sync.previous.store",n="sync.donot-make-requests-until",h="sync.user-session-id",g="sync.machine-session-id",d=100,m=1e3*60*5;let b=class extends k.Disposable{constructor(x,F,L){super();this.productService=x,this.configurationService=F,this.storageService=L,this._onDidChangeUserDataSyncStore=this._register(new A.Emitter),this.onDidChangeUserDataSyncStore=this._onDidChangeUserDataSyncStore.event,this.updateUserDataSyncStore(),this._register(A.Event.filter(L.onDidChangeValue,M=>M.key===u.SYNC_SERVICE_URL_TYPE&&M.scope===0&&this.userDataSyncStoreType!==this.userDataSyncStore?.type)(()=>this.updateUserDataSyncStore()))}get userDataSyncStore(){return this._userDataSyncStore}get userDataSyncStoreType(){return this.storageService.get(u.SYNC_SERVICE_URL_TYPE,0)}set userDataSyncStoreType(x){this.storageService.store(u.SYNC_SERVICE_URL_TYPE,x,0,I.isWeb?0:1)}updateUserDataSyncStore(){this._userDataSyncStore=this.toUserDataSyncStore(this.productService[u.CONFIGURATION_SYNC_STORE_KEY],this.configurationService.getValue(u.CONFIGURATION_SYNC_STORE_KEY)),this._onDidChangeUserDataSyncStore.fire()}toUserDataSyncStore(x,F){x=I.isWeb&&x?.web?{...x,...x.web}:x;const L={...x||{},...F||{}};if(L&&(0,v.isString)(L.url)&&(0,v.isObject)(L.authenticationProviders)&&Object.keys(L.authenticationProviders).every(M=>(0,v.isArray)(L.authenticationProviders[M].scopes))){const M=L,N=!!M.canSwitch&&!F?.url,B=M.url===M.insidersUrl?"insiders":"stable",P=(N?this.userDataSyncStoreType:void 0)||B,V=F?.url||(P==="insiders"?M.insidersUrl:P==="stable"?M.stableUrl:M.url);return{url:C.URI.parse(V),type:P,defaultType:B,defaultUrl:C.URI.parse(M.url),stableUrl:C.URI.parse(M.stableUrl),insidersUrl:C.URI.parse(M.insidersUrl),canSwitch:N,authenticationProviders:Object.keys(M.authenticationProviders).reduce((z,U)=>(z.push({id:U,scopes:M.authenticationProviders[U].scopes}),z),[])}}}};b=Ee([W(0,s.IProductService),W(1,c.IConfigurationService),W(2,p.IStorageService)],b),e.AbstractUserDataSyncStoreManagementService=b;let E=class extends b{constructor(x,F,L){super(x,F,L);const M=this.storageService.get(a,0);M&&(this.previousConfigurationSyncStore=JSON.parse(M));const N=this.productService[u.CONFIGURATION_SYNC_STORE_KEY];N?this.storageService.store(a,JSON.stringify(N),0,1):this.storageService.remove(a,0)}async switch(x){x!==this.userDataSyncStoreType&&(this.userDataSyncStoreType=x,this.updateUserDataSyncStore())}async getPreviousUserDataSyncStore(){return this.toUserDataSyncStore(this.previousConfigurationSyncStore)}};E=Ee([W(0,s.IProductService),W(1,c.IConfigurationService),W(2,p.IStorageService)],E),e.UserDataSyncStoreManagementService=E;let y=class extends k.Disposable{constructor(x,F,L,M,N,B,P){super();this.requestService=L,this.logService=M,this.storageService=P,this._onTokenFailed=this._register(new A.Emitter),this.onTokenFailed=this._onTokenFailed.event,this._onTokenSucceed=this._register(new A.Emitter),this.onTokenSucceed=this._onTokenSucceed.event,this._donotMakeRequestsUntil=void 0,this._onDidChangeDonotMakeRequestsUntil=this._register(new A.Emitter),this.onDidChangeDonotMakeRequestsUntil=this._onDidChangeDonotMakeRequestsUntil.event,this.resetDonotMakeRequestsUntilPromise=void 0,this.updateUserDataSyncStoreUrl(x),this.commonHeadersPromise=(0,r.getServiceMachineId)(N,B,P).then(V=>{const z={"X-Client-Name":`${F.applicationName}${I.isWeb?"-web":""}`,"X-Client-Version":F.version};return F.commit&&(z["X-Client-Commit"]=F.commit),z}),this.session=new R(d,m,this.requestService,this.logService),this.initDonotMakeRequestsUntil(),this._register((0,k.toDisposable)(()=>{this.resetDonotMakeRequestsUntilPromise&&(this.resetDonotMakeRequestsUntilPromise.cancel(),this.resetDonotMakeRequestsUntilPromise=void 0)}))}get donotMakeRequestsUntil(){return this._donotMakeRequestsUntil}setAuthToken(x,F){this.authToken={token:x,type:F}}updateUserDataSyncStoreUrl(x){this.userDataSyncStoreUrl=x?(0,w.joinPath)(x,"v1"):void 0}initDonotMakeRequestsUntil(){const x=this.storageService.getNumber(n,0);x&&Date.now()<x&&this.setDonotMakeRequestsUntil(new Date(x))}setDonotMakeRequestsUntil(x){this._donotMakeRequestsUntil?.getTime()!==x?.getTime()&&(this._donotMakeRequestsUntil=x,this.resetDonotMakeRequestsUntilPromise&&(this.resetDonotMakeRequestsUntilPromise.cancel(),this.resetDonotMakeRequestsUntilPromise=void 0),this._donotMakeRequestsUntil?(this.storageService.store(n,this._donotMakeRequestsUntil.getTime(),0,1),this.resetDonotMakeRequestsUntilPromise=(0,t.createCancelablePromise)(F=>(0,t.timeout)(this._donotMakeRequestsUntil.getTime()-Date.now(),F).then(()=>this.setDonotMakeRequestsUntil(void 0))),this.resetDonotMakeRequestsUntilPromise.then(null,F=>null)):this.storageService.remove(n,0),this._onDidChangeDonotMakeRequestsUntil.fire())}async getAllRefs(x){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const F=(0,w.joinPath)(this.userDataSyncStoreUrl,"resource",x),L={},M=await this.request(F.toString(),{type:"GET",headers:L},[],f.CancellationToken.None);return(await(0,l.asJson)(M)||[]).map(({url:B,created:P})=>({ref:(0,w.relativePath)(F,F.with({path:B})),created:P*1e3}))}async resolveContent(x,F){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const L=(0,w.joinPath)(this.userDataSyncStoreUrl,"resource",x,F).toString(),M={};M["Cache-Control"]="no-cache";const N=await this.request(L,{type:"GET",headers:M},[],f.CancellationToken.None);return await(0,l.asText)(N)}async delete(x){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const F=(0,w.joinPath)(this.userDataSyncStoreUrl,"resource",x).toString(),L={};await this.request(F,{type:"DELETE",headers:L},[],f.CancellationToken.None)}async read(x,F,L={}){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const M=(0,w.joinPath)(this.userDataSyncStoreUrl,"resource",x,"latest").toString();L={...L},L["Cache-Control"]="no-cache",F&&(L["If-None-Match"]=F.ref);const N=await this.request(M,{type:"GET",headers:L},[304],f.CancellationToken.None);let B=null;if(N.res.statusCode===304&&(B=F),B===null){const P=N.res.headers.etag;if(!P)throw new u.UserDataSyncStoreError("Server did not return the ref",M,"NoRef",N.res.statusCode,N.res.headers[u.HEADER_OPERATION_ID]);const V=await(0,l.asText)(N);if(!V&&N.res.statusCode===304)throw new u.UserDataSyncStoreError("Empty response",M,"EmptyResponse",N.res.statusCode,N.res.headers[u.HEADER_OPERATION_ID]);B={ref:P,content:V}}return B}async write(x,F,L,M={}){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const N=(0,w.joinPath)(this.userDataSyncStoreUrl,"resource",x).toString();M={...M},M["Content-Type"]=D.Mimes.text,L&&(M["If-Match"]=L);const B=await this.request(N,{type:"POST",data:F,headers:M},[],f.CancellationToken.None),P=B.res.headers.etag;if(!P)throw new u.UserDataSyncStoreError("Server did not return the ref",N,"NoRef",B.res.statusCode,B.res.headers[u.HEADER_OPERATION_ID]);return P}async manifest(x,F={}){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const L=(0,w.joinPath)(this.userDataSyncStoreUrl,"manifest").toString();F={...F},F["Content-Type"]="application/json",x&&(F["If-None-Match"]=x.ref);const M=await this.request(L,{type:"GET",headers:F},[304],f.CancellationToken.None);let N=null;if(M.res.statusCode===304&&(N=x),!N){const P=M.res.headers.etag;if(!P)throw new u.UserDataSyncStoreError("Server did not return the ref",L,"NoRef",M.res.statusCode,M.res.headers[u.HEADER_OPERATION_ID]);const V=await(0,l.asText)(M);if(!V&&M.res.statusCode===304)throw new u.UserDataSyncStoreError("Empty response",L,"EmptyResponse",M.res.statusCode,M.res.headers[u.HEADER_OPERATION_ID]);V&&(N={...JSON.parse(V),ref:P})}const B=this.storageService.get(h,0);return B&&N&&B!==N.session&&this.clearSession(),N===null&&B&&this.clearSession(),N&&this.storageService.store(h,N.session,0,1),N}async clear(){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const x=(0,w.joinPath)(this.userDataSyncStoreUrl,"resource").toString(),F={"Content-Type":D.Mimes.text};await this.request(x,{type:"DELETE",headers:F},[],f.CancellationToken.None),this.clearSession()}clearSession(){this.storageService.remove(h,0),this.storageService.remove(g,0)}async request(x,F,L,M){if(!this.authToken)throw new u.UserDataSyncStoreError("No Auth Token Available",x,"Unauthorized",void 0,void 0);if(this._donotMakeRequestsUntil&&Date.now()<this._donotMakeRequestsUntil.getTime())throw new u.UserDataSyncStoreError(`${F.type} request '${x}' failed because of too many requests (429).`,x,"TooManyRequestsAndRetryAfter",void 0,void 0);this.setDonotMakeRequestsUntil(void 0);const N=await this.commonHeadersPromise;F.headers={...F.headers||{},...N,"X-Account-Type":this.authToken.type,authorization:`Bearer ${this.authToken.token}`},this.addSessionHeaders(F.headers),this.logService.trace("Sending request to server",{url:x,type:F.type,headers:{...F.headers,authorization:void 0}});let B;try{B=await this.session.request(x,F,M)}catch(U){if(!(U instanceof u.UserDataSyncStoreError)){let H="RequestFailed";const K=(0,_.getErrorMessage)(U).toLowerCase();K.includes("xhr timeout")?H="RequestTimeout":K.includes("protocol")&&K.includes("not supported")?H="RequestProtocolNotSupported":K.includes("request path contains unescaped characters")?H="RequestPathNotEscaped":K.includes("headers must be an object")?H="RequestHeadersNotObject":(0,_.isCancellationError)(U)&&(H="RequestCanceled"),U=new u.UserDataSyncStoreError(`Connection refused for the request '${x}'.`,x,H,void 0,void 0)}throw this.logService.info("Request failed",x),U}const P=B.res.headers[u.HEADER_OPERATION_ID],V={url:x,status:B.res.statusCode,"execution-id":F.headers[u.HEADER_EXECUTION_ID],"operation-id":P},z=(0,l.isSuccess)(B)||B.res.statusCode&&L.indexOf(B.res.statusCode)!==-1;if(z?this.logService.trace("Request succeeded",V):this.logService.info("Request failed",V),B.res.statusCode===401)throw this.authToken=void 0,this._onTokenFailed.fire(),new u.UserDataSyncStoreError(`Request '${x}' failed because of Unauthorized (401).`,x,"Unauthorized",B.res.statusCode,P);if(this._onTokenSucceed.fire(),B.res.statusCode===409)throw new u.UserDataSyncStoreError(`${F.type} request '${x}' failed because of Conflict (409). There is new data for this resource. Make the request again with latest data.`,x,"Conflict",B.res.statusCode,P);if(B.res.statusCode===410)throw new u.UserDataSyncStoreError(`${F.type} request '${x}' failed because the requested resource is not longer available (410).`,x,"Gone",B.res.statusCode,P);if(B.res.statusCode===412)throw new u.UserDataSyncStoreError(`${F.type} request '${x}' failed because of Precondition Failed (412). There is new data for this resource. Make the request again with latest data.`,x,"PreconditionFailed",B.res.statusCode,P);if(B.res.statusCode===413)throw new u.UserDataSyncStoreError(`${F.type} request '${x}' failed because of too large payload (413).`,x,"TooLarge",B.res.statusCode,P);if(B.res.statusCode===426)throw new u.UserDataSyncStoreError(`${F.type} request '${x}' failed with status Upgrade Required (426). Please upgrade the client and try again.`,x,"UpgradeRequired",B.res.statusCode,P);if(B.res.statusCode===429){const U=B.res.headers["retry-after"];throw U?(this.setDonotMakeRequestsUntil(new Date(Date.now()+parseInt(U)*1e3)),new u.UserDataSyncStoreError(`${F.type} request '${x}' failed because of too many requests (429).`,x,"TooManyRequestsAndRetryAfter",B.res.statusCode,P)):new u.UserDataSyncStoreError(`${F.type} request '${x}' failed because of too many requests (429).`,x,"RemoteTooManyRequests",B.res.statusCode,P)}if(!z)throw new u.UserDataSyncStoreError("Server returned "+B.res.statusCode,x,"Unknown",B.res.statusCode,P);return B}addSessionHeaders(x){let F=this.storageService.get(g,0);F===void 0&&(F=(0,o.generateUuid)(),this.storageService.store(g,F,0,1)),x["X-Machine-Session-Id"]=F;const L=this.storageService.get(h,0);L!==void 0&&(x["X-User-Session-Id"]=L)}};y=Ee([W(1,s.IProductService),W(2,l.IRequestService),W(3,u.IUserDataSyncLogService),W(4,i.IEnvironmentService),W(5,S.IFileService),W(6,p.IStorageService)],y),e.UserDataSyncStoreClient=y;let T=class extends y{constructor(x,F,L,M,N,B,P){super(x.userDataSyncStore?.url,F,L,M,N,B,P);this._register(x.onDidChangeUserDataSyncStore(()=>this.updateUserDataSyncStoreUrl(x.userDataSyncStore?.url)))}};T=Ee([W(0,u.IUserDataSyncStoreManagementService),W(1,s.IProductService),W(2,l.IRequestService),W(3,u.IUserDataSyncLogService),W(4,i.IEnvironmentService),W(5,S.IFileService),W(6,p.IStorageService)],T),e.UserDataSyncStoreService=T;class R{constructor(x,F,L,M){this.limit=x,this.interval=F,this.requestService=L,this.logService=M,this.requests=[],this.startTime=void 0}request(x,F,L){if(this.isExpired()&&this.reset(),F.url=x,this.requests.length>=this.limit)throw this.logService.info("Too many requests",...this.requests),new u.UserDataSyncStoreError(`Too many requests. Only ${this.limit} requests allowed in ${this.interval/(1e3*60)} minutes.`,x,"LocalTooManyRequests",void 0,void 0);return this.startTime=this.startTime||new Date,this.requests.push(x),this.requestService.request(F,L)}isExpired(){return this.startTime!==void 0&&new Date().getTime()-this.startTime.getTime()>this.interval}reset(){this.requests=[],this.startTime=void 0}}e.RequestsSession=R}),define(ne[2102],re([1,0,169,48]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getWebviewContentMimeType=void 0;const _=new Map([[".svg","image/svg+xml"],[".txt",t.Mimes.text],[".css","text/css"],[".js","application/javascript"],[".json","application/json"],[".html","text/html"],[".htm","text/html"],[".xhtml","application/xhtml+xml"],[".oft","font/otf"],[".xml","application/xml"],[".wasm","application/wasm"]]);function A(k){const D=(0,f.extname)(k.fsPath).toLowerCase();return _.get(D)||(0,t.getMediaMime)(k.fsPath)||t.Mimes.unknown}e.getWebviewContentMimeType=A}),define(ne[2103],re([1,0,18,9,212]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewPortMappingManager=void 0;class A{constructor(D,I,w){this._getExtensionLocation=D,this._getMappings=I,this.tunnelService=w,this._tunnels=new Map}async getRedirect(D,I){const w=f.URI.parse(I),v=(0,_.extractLocalHostUriMetaDataForPortMapping)(w);if(!!v){for(const C of this._getMappings())if(C.webviewPort===v.port){const o=this._getExtensionLocation();if(o&&o.scheme===t.Schemas.vscodeRemote){const c=D&&await this.getOrCreateTunnel(D,C.extensionHostPort);if(c)return c.tunnelLocalPort===C.webviewPort?void 0:encodeURI(w.with({authority:`127.0.0.1:${c.tunnelLocalPort}`}).toString(!0))}if(C.webviewPort!==C.extensionHostPort)return encodeURI(w.with({authority:`${v.address}:${C.extensionHostPort}`}).toString(!0))}}}async dispose(){for(const D of this._tunnels.values())await D.dispose();this._tunnels.clear()}async getOrCreateTunnel(D,I){const w=this._tunnels.get(I);if(w)return w;const v=await this.tunnelService.openTunnel({getAddress:async()=>D},void 0,I);return v&&this._tunnels.set(I,v),v}}e.WebviewPortMappingManager=A}),define(ne[213],re([1,0,14]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.zoomLevelToZoomFactor=e.getTitleBarStyle=e.getMenuBarVisibility=e.isFileToOpen=e.isFolderToOpen=e.isWorkspaceToOpen=e.WindowMinimumSize=void 0,e.WindowMinimumSize={WIDTH:400,WIDTH_WITH_VERTICAL_PANEL:600,HEIGHT:270};function f(w){return!!w.workspaceUri}e.isWorkspaceToOpen=f;function _(w){return!!w.folderUri}e.isFolderToOpen=_;function A(w){return!!w.fileUri}e.isFileToOpen=A;function k(w){const v=D(w),C=w.getValue("window.menuBarVisibility");return C==="default"||v==="native"&&C==="compact"||t.isMacintosh&&t.isNative?"classic":C}e.getMenuBarVisibility=k;function D(w){if(t.isWeb)return"custom";const v=w.getValue("window");if(v){if(t.isMacintosh&&v.nativeTabs===!0||t.isMacintosh&&v.nativeFullScreen===!1)return"native";const c=w.getValue("workbench.colorCustomizations");if(c?.["window.activeBorder"]||c?.["window.inactiveBorder"])return"custom";const i=v.titleBarStyle;if(i==="native"||i==="custom")return i}return t.isLinux?"native":"custom"}e.getTitleBarStyle=D;function I(w=0){return Math.pow(1.2,w)}e.zoomLevelToZoomFactor=I}),define(ne[770],re([1,0,77,207,213]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.zoomOut=e.zoomIn=e.applyZoom=void 0;function A(I){f.webFrame.setZoomLevel(I),(0,t.setZoomFactor)((0,_.zoomLevelToZoomFactor)(I)),(0,t.setZoomLevel)(I,!1)}e.applyZoom=A;function k(){A((0,t.getZoomLevel)()+1)}e.zoomIn=k;function D(){A((0,t.getZoomLevel)()-1)}e.zoomOut=D}),define(ne[230],re([1,0,18]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isVirtualWorkspace=e.getVirtualWorkspaceAuthority=e.getVirtualWorkspaceScheme=e.getVirtualWorkspaceLocation=e.isVirtualResource=void 0;function f(I){return I.scheme!==t.Schemas.file&&I.scheme!==t.Schemas.vscodeRemote}e.isVirtualResource=f;function _(I){if(I.folders.length)return I.folders.every(w=>f(w.uri))?I.folders[0].uri:void 0;if(I.configuration&&f(I.configuration))return I.configuration}e.getVirtualWorkspaceLocation=_;function A(I){return _(I)?.scheme}e.getVirtualWorkspaceScheme=A;function k(I){return _(I)?.authority}e.getVirtualWorkspaceAuthority=k;function D(I){return _(I)!==void 0}e.isVirtualWorkspace=D}),define(ne[34],re([1,0,1350,48,55,19,9,5,18]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasWorkspaceFileExtension=e.isSavedWorkspace=e.isTemporaryWorkspace=e.isUntitledWorkspace=e.UNTITLED_WORKSPACE_NAME=e.WORKSPACE_FILTER=e.WORKSPACE_EXTENSION=e.toWorkspaceFolder=e.WorkspaceFolder=e.Workspace=e.isWorkspaceFolder=e.isWorkspace=e.WorkbenchState=e.reviveIdentifier=e.isWorkspaceIdentifier=e.toWorkspaceIdentifier=e.isSingleFolderWorkspaceIdentifier=e.IWorkspaceContextService=void 0,e.IWorkspaceContextService=(0,D.createDecorator)("contextService");function w(g){const d=g;return typeof d?.id=="string"&&k.URI.isUri(d.uri)}e.isSingleFolderWorkspaceIdentifier=w;function v(g){if(g.configuration)return{id:g.id,configPath:g.configuration};if(g.folders.length===1)return{id:g.id,uri:g.folders[0].uri}}e.toWorkspaceIdentifier=v;function C(g){const d=g;return typeof d?.id=="string"&&k.URI.isUri(d.configPath)}e.isWorkspaceIdentifier=C;function o(g){const d=g;if(d?.uri)return{id:d.id,uri:k.URI.revive(d.uri)};const m=g;if(m?.configPath)return{id:m.id,configPath:k.URI.revive(m.configPath)};if(g?.id)return{id:g.id}}e.reviveIdentifier=o;var c;(function(g){g[g.EMPTY=1]="EMPTY",g[g.FOLDER=2]="FOLDER",g[g.WORKSPACE=3]="WORKSPACE"})(c=e.WorkbenchState||(e.WorkbenchState={}));function i(g){const d=g;return!!(d&&typeof d=="object"&&typeof d.id=="string"&&Array.isArray(d.folders))}e.isWorkspace=i;function S(g){const d=g;return!!(d&&typeof d=="object"&&k.URI.isUri(d.uri)&&typeof d.name=="string"&&typeof d.toResource=="function")}e.isWorkspaceFolder=S;class s{constructor(d,m,b,E,y){this._id=d,this._transient=b,this._configuration=E,this._ignorePathCasing=y,this._foldersMap=_.TernarySearchTree.forUris(this._ignorePathCasing),this.folders=m}update(d){this._id=d.id,this._configuration=d.configuration,this._transient=d.transient,this._ignorePathCasing=d._ignorePathCasing,this.folders=d.folders}get folders(){return this._folders}set folders(d){this._folders=d,this.updateFoldersMap()}get id(){return this._id}get transient(){return this._transient}get configuration(){return this._configuration}set configuration(d){this._configuration=d}getFolder(d){return d&&this._foldersMap.findSubstr(d.with({scheme:d.scheme,authority:d.authority,path:d.path}))||null}updateFoldersMap(){this._foldersMap=_.TernarySearchTree.forUris(this._ignorePathCasing);for(const d of this.folders)this._foldersMap.set(d.uri,d)}toJSON(){return{id:this.id,folders:this.folders,transient:this.transient,configuration:this.configuration}}}e.Workspace=s;class l{constructor(d,m){this.raw=m,this.uri=d.uri,this.index=d.index,this.name=d.name}toResource(d){return(0,A.joinPath)(this.uri,d)}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}e.WorkspaceFolder=l;function r(g){return new l({uri:g,index:0,name:(0,A.basenameOrAuthority)(g)},{uri:g.toString()})}e.toWorkspaceFolder=r,e.WORKSPACE_EXTENSION="code-workspace";const p=`.${e.WORKSPACE_EXTENSION}`;e.WORKSPACE_FILTER=[{name:(0,t.localize)(0,null),extensions:[e.WORKSPACE_EXTENSION]}],e.UNTITLED_WORKSPACE_NAME="workspace.json";function u(g,d){return A.extUriBiasedIgnorePathCase.isEqualOrParent(g,d.untitledWorkspacesHome)}e.isUntitledWorkspace=u;function a(g){let d;return k.URI.isUri(g)?d=g:d=g.configuration,d?.scheme===I.Schemas.tmp}e.isTemporaryWorkspace=a;function n(g,d){return!u(g,d)&&!a(g)}e.isSavedWorkspace=n;function h(g){return(typeof g=="string"?(0,f.extname)(g):(0,A.extname)(g))===p}e.hasWorkspaceFileExtension=h}),define(ne[771],re([1,0,111,48,19,29,89,124,261,1304,34]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RandomBasedVariableResolver=e.WorkspaceBasedVariableResolver=e.TimeBasedVariableResolver=e.CommentBasedVariableResolver=e.ClipboardBasedVariableResolver=e.ModelBasedVariableResolver=e.SelectionBasedVariableResolver=e.CompositeSnippetVariableResolver=e.KnownSnippetVariableNames=void 0,e.KnownSnippetVariableNames=Object.freeze({CURRENT_YEAR:!0,CURRENT_YEAR_SHORT:!0,CURRENT_MONTH:!0,CURRENT_DATE:!0,CURRENT_HOUR:!0,CURRENT_MINUTE:!0,CURRENT_SECOND:!0,CURRENT_DAY_NAME:!0,CURRENT_DAY_NAME_SHORT:!0,CURRENT_MONTH_NAME:!0,CURRENT_MONTH_NAME_SHORT:!0,CURRENT_SECONDS_UNIX:!0,SELECTION:!0,CLIPBOARD:!0,TM_SELECTED_TEXT:!0,TM_CURRENT_LINE:!0,TM_CURRENT_WORD:!0,TM_LINE_INDEX:!0,TM_LINE_NUMBER:!0,TM_FILENAME:!0,TM_FILENAME_BASE:!0,TM_DIRECTORY:!0,TM_FILEPATH:!0,CURSOR_INDEX:!0,CURSOR_NUMBER:!0,RELATIVE_FILEPATH:!0,BLOCK_COMMENT_START:!0,BLOCK_COMMENT_END:!0,LINE_COMMENT:!0,WORKSPACE_NAME:!0,WORKSPACE_FOLDER:!0,RANDOM:!0,RANDOM_HEX:!0,UUID:!0});class C{constructor(u){this._delegates=u}resolve(u){for(const a of this._delegates){let n=a.resolve(u);if(n!==void 0)return n}}}e.CompositeSnippetVariableResolver=C;class o{constructor(u,a,n,h){this._model=u,this._selection=a,this._selectionIdx=n,this._overtypingCapturer=h}resolve(u){const{name:a}=u;if(a==="SELECTION"||a==="TM_SELECTED_TEXT"){let n=this._model.getValueInRange(this._selection)||void 0,h=this._selection.startLineNumber!==this._selection.endLineNumber;if(!n&&this._overtypingCapturer){const g=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);g&&(n=g.value,h=g.multiline)}if(n&&h&&u.snippet){const g=this._model.getLineContent(this._selection.startLineNumber),d=(0,A.getLeadingWhitespace)(g,0,this._selection.startColumn-1);let m=d;u.snippet.walk(E=>E===u?!1:(E instanceof I.Text&&(m=(0,A.getLeadingWhitespace)((0,A.splitLines)(E.value).pop())),!0));const b=(0,A.commonPrefixLength)(m,d);n=n.replace(/(\r\n|\r|\n)(.*)/g,(E,y,T)=>`${y}${m.substr(b)}${T}`)}return n}else{if(a==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(a==="TM_CURRENT_WORD"){const n=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return n&&n.word||void 0}else{if(a==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(a==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber);if(a==="CURSOR_INDEX")return String(this._selectionIdx);if(a==="CURSOR_NUMBER")return String(this._selectionIdx+1)}}}}e.SelectionBasedVariableResolver=o;class c{constructor(u,a){this._labelService=u,this._model=a}resolve(u){const{name:a}=u;if(a==="TM_FILENAME")return f.basename(this._model.uri.fsPath);if(a==="TM_FILENAME_BASE"){const n=f.basename(this._model.uri.fsPath),h=n.lastIndexOf(".");return h<=0?n:n.slice(0,h)}else{if(a==="TM_DIRECTORY")return f.dirname(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel((0,_.dirname)(this._model.uri));if(a==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(a==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}}e.ModelBasedVariableResolver=c;class i{constructor(u,a,n,h){this._readClipboardText=u,this._selectionIdx=a,this._selectionCount=n,this._spread=h}resolve(u){if(u.name!=="CLIPBOARD")return;const a=this._readClipboardText();if(!!a){if(this._spread){const n=a.split(/\r\n|\n|\r/).filter(h=>!(0,A.isFalsyOrWhitespace)(h));if(n.length===this._selectionCount)return n[this._selectionIdx]}return a}}}e.ClipboardBasedVariableResolver=i;class S{constructor(u,a){this._model=u,this._selection=a}resolve(u){const{name:a}=u,n=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),h=D.LanguageConfigurationRegistry.getComments(n);if(!!h){if(a==="LINE_COMMENT")return h.lineCommentToken||void 0;if(a==="BLOCK_COMMENT_START")return h.blockCommentStartToken||void 0;if(a==="BLOCK_COMMENT_END")return h.blockCommentEndToken||void 0}}}e.CommentBasedVariableResolver=S;class s{constructor(){this._date=new Date}resolve(u){const{name:a}=u;if(a==="CURRENT_YEAR")return String(this._date.getFullYear());if(a==="CURRENT_YEAR_SHORT")return String(this._date.getFullYear()).slice(-2);if(a==="CURRENT_MONTH")return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if(a==="CURRENT_DATE")return String(this._date.getDate().valueOf()).padStart(2,"0");if(a==="CURRENT_HOUR")return String(this._date.getHours().valueOf()).padStart(2,"0");if(a==="CURRENT_MINUTE")return String(this._date.getMinutes().valueOf()).padStart(2,"0");if(a==="CURRENT_SECOND")return String(this._date.getSeconds().valueOf()).padStart(2,"0");if(a==="CURRENT_DAY_NAME")return s.dayNames[this._date.getDay()];if(a==="CURRENT_DAY_NAME_SHORT")return s.dayNamesShort[this._date.getDay()];if(a==="CURRENT_MONTH_NAME")return s.monthNames[this._date.getMonth()];if(a==="CURRENT_MONTH_NAME_SHORT")return s.monthNamesShort[this._date.getMonth()];if(a==="CURRENT_SECONDS_UNIX")return String(Math.floor(this._date.getTime()/1e3))}}e.TimeBasedVariableResolver=s,s.dayNames=[w.localize(0,null),w.localize(1,null),w.localize(2,null),w.localize(3,null),w.localize(4,null),w.localize(5,null),w.localize(6,null)],s.dayNamesShort=[w.localize(7,null),w.localize(8,null),w.localize(9,null),w.localize(10,null),w.localize(11,null),w.localize(12,null),w.localize(13,null)],s.monthNames=[w.localize(14,null),w.localize(15,null),w.localize(16,null),w.localize(17,null),w.localize(18,null),w.localize(19,null),w.localize(20,null),w.localize(21,null),w.localize(22,null),w.localize(23,null),w.localize(24,null),w.localize(25,null)],s.monthNamesShort=[w.localize(26,null),w.localize(27,null),w.localize(28,null),w.localize(29,null),w.localize(30,null),w.localize(31,null),w.localize(32,null),w.localize(33,null),w.localize(34,null),w.localize(35,null),w.localize(36,null),w.localize(37,null)];class l{constructor(u){this._workspaceService=u}resolve(u){if(!this._workspaceService)return;const a=(0,v.toWorkspaceIdentifier)(this._workspaceService.getWorkspace());if(!!a){if(u.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(a);if(u.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(a)}}_resolveWorkspaceName(u){if((0,v.isSingleFolderWorkspaceIdentifier)(u))return f.basename(u.uri.path);let a=f.basename(u.configPath.path);return a.endsWith(v.WORKSPACE_EXTENSION)&&(a=a.substr(0,a.length-v.WORKSPACE_EXTENSION.length-1)),a}_resoveWorkspacePath(u){if((0,v.isSingleFolderWorkspaceIdentifier)(u))return(0,t.normalizeDriveLetter)(u.uri.fsPath);let a=f.basename(u.configPath.path),n=u.configPath.fsPath;return n.endsWith(a)&&(n=n.substr(0,n.length-a.length-1)),n?(0,t.normalizeDriveLetter)(n):"/"}}e.WorkspaceBasedVariableResolver=l;class r{resolve(u){const{name:a}=u;if(a==="RANDOM")return Math.random().toString().slice(-6);if(a==="RANDOM_HEX")return Math.random().toString(16).slice(-6);if(a==="UUID")return(0,k.generateUuid)()}}e.RandomBasedVariableResolver=r}),define(ne[772],re([1,0,15,2,29,13,136,20,84,93,45,34,261,771,1039]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetSession=e.OneSnippet=void 0;class i{constructor(r,p,u,a){this._editor=r,this._snippet=p,this._offset=u,this._snippetLineLeadingWhitespace=a,this._nestingLevel=1,this._placeholderGroups=(0,t.groupBy)(p.placeholders,o.Placeholder.compareByIndex),this._placeholderGroupsIdx=-1}dispose(){this._placeholderDecorations&&this._editor.deltaDecorations([...this._placeholderDecorations.values()],[]),this._placeholderGroups.length=0}_initDecorations(){if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const r=this._editor.getModel();this._editor.changeDecorations(p=>{for(const u of this._snippet.placeholders){const a=this._snippet.offset(u),n=this._snippet.fullLen(u),h=D.Range.fromPositions(r.getPositionAt(this._offset+a),r.getPositionAt(this._offset+a+n)),g=u.isFinalTabstop?i._decor.inactiveFinal:i._decor.inactive,d=p.addDecoration(h,g);this._placeholderDecorations.set(u,d)}})}move(r){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){let a=[];for(const n of this._placeholderGroups[this._placeholderGroupsIdx])if(n.transform){const h=this._placeholderDecorations.get(n),g=this._editor.getModel().getDecorationRange(h),d=this._editor.getModel().getValueInRange(g),m=n.transform.resolve(d).split(/\r\n|\r|\n/);for(let b=1;b<m.length;b++)m[b]=this._editor.getModel().normalizeIndentation(this._snippetLineLeadingWhitespace+m[b]);a.push(k.EditOperation.replace(g,m.join(this._editor.getModel().getEOL())))}a.length>0&&this._editor.executeEdits("snippet.placeholderTransform",a)}let p=!1;r===!0&&this._placeholderGroupsIdx<this._placeholderGroups.length-1?(this._placeholderGroupsIdx+=1,p=!0):r===!1&&this._placeholderGroupsIdx>0&&(this._placeholderGroupsIdx-=1,p=!0);const u=this._editor.getModel().changeDecorations(a=>{const n=new Set,h=[];for(const g of this._placeholderGroups[this._placeholderGroupsIdx]){const d=this._placeholderDecorations.get(g),m=this._editor.getModel().getDecorationRange(d);h.push(new I.Selection(m.startLineNumber,m.startColumn,m.endLineNumber,m.endColumn)),p=p&&this._hasPlaceholderBeenCollapsed(g),a.changeDecorationOptions(d,g.isFinalTabstop?i._decor.activeFinal:i._decor.active),n.add(g);for(const b of this._snippet.enclosingPlaceholders(g)){const E=this._placeholderDecorations.get(b);a.changeDecorationOptions(E,b.isFinalTabstop?i._decor.activeFinal:i._decor.active),n.add(b)}}for(const[g,d]of this._placeholderDecorations)n.has(g)||a.changeDecorationOptions(d,g.isFinalTabstop?i._decor.inactiveFinal:i._decor.inactive);return h});return p?this.move(r):u??[]}_hasPlaceholderBeenCollapsed(r){let p=r;for(;p;){if(p instanceof o.Placeholder){const u=this._placeholderDecorations.get(p);if(this._editor.getModel().getDecorationRange(u).isEmpty()&&p.toString().length>0)return!0}p=p.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||this._placeholderGroups.length===0}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}computePossibleSelections(){const r=new Map;for(const p of this._placeholderGroups){let u;for(const a of p){if(a.isFinalTabstop)break;u||(u=[],r.set(a.index,u));const n=this._placeholderDecorations.get(a),h=this._editor.getModel().getDecorationRange(n);if(!h){r.delete(a.index);break}u.push(h)}}return r}get choice(){return this._placeholderGroups[this._placeholderGroupsIdx][0].choice}merge(r){const p=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(u=>{for(const a of this._placeholderGroups[this._placeholderGroupsIdx]){const n=r.shift();console.assert(!n._placeholderDecorations);const h=n._snippet.placeholderInfo.last.index;for(const d of n._snippet.placeholderInfo.all)d.isFinalTabstop?d.index=a.index+(h+1)/this._nestingLevel:d.index=a.index+d.index/this._nestingLevel;this._snippet.replace(a,n._snippet.children);const g=this._placeholderDecorations.get(a);u.removeDecoration(g),this._placeholderDecorations.delete(a);for(const d of n._snippet.placeholders){const m=n._snippet.offset(d),b=n._snippet.fullLen(d),E=D.Range.fromPositions(p.getPositionAt(n._offset+m),p.getPositionAt(n._offset+m+b)),y=u.addDecoration(E,i._decor.inactive);this._placeholderDecorations.set(d,y)}}this._placeholderGroups=(0,t.groupBy)(this._snippet.placeholders,o.Placeholder.compareByIndex)})}getEnclosingRange(){let r;const p=this._editor.getModel();for(const u of this._placeholderDecorations.values()){const a=(0,A.withNullAsUndefined)(p.getDecorationRange(u));r?r=r.plusRange(a):r=a}return r}}e.OneSnippet=i,i._decor={active:w.ModelDecorationOptions.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:w.ModelDecorationOptions.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:w.ModelDecorationOptions.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:w.ModelDecorationOptions.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};const S={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};class s{constructor(r,p,u=S){this._templateMerges=[],this._snippets=[],this._editor=r,this._template=p,this._options=u}static adjustWhitespace(r,p,u,a,n){const h=r.getLineContent(p.lineNumber),g=(0,_.getLeadingWhitespace)(h,0,p.column-1);let d;return u.walk(m=>{if(!(m instanceof o.Text)||m.parent instanceof o.Choice)return!0;const b=m.value.split(/\r\n|\r|\n/);if(a){const y=u.offset(m);if(y===0)b[0]=r.normalizeIndentation(b[0]);else{d=d??u.toString();let T=d.charCodeAt(y-1);(T===10||T===13)&&(b[0]=r.normalizeIndentation(g+b[0]))}for(let T=1;T<b.length;T++)b[T]=r.normalizeIndentation(g+b[T])}const E=b.join(r.getEOL());return E!==m.value&&(m.parent.replace(m,[new o.Text(E)]),d=void 0),!0}),g}static adjustSelection(r,p,u,a){if(u!==0||a!==0){const{positionLineNumber:n,positionColumn:h}=p,g=h-u,d=h+a,m=r.validateRange({startLineNumber:n,startColumn:g,endLineNumber:n,endColumn:d});p=I.Selection.createWithDirection(m.startLineNumber,m.startColumn,m.endLineNumber,m.endColumn,p.getDirection())}return p}static createEditsAndSnippets(r,p,u,a,n,h,g,d){const m=[],b=[];if(!r.hasModel())return{edits:m,snippets:b};const E=r.getModel(),y=r.invokeWithinContext(N=>N.get(C.IWorkspaceContextService)),T=r.invokeWithinContext(N=>new c.ModelBasedVariableResolver(N.get(v.ILabelService),E)),R=()=>g;let O=0,x=E.getValueInRange(s.adjustSelection(E,r.getSelection(),u,0)),F=E.getValueInRange(s.adjustSelection(E,r.getSelection(),0,a)),L=E.getLineFirstNonWhitespaceColumn(r.getSelection().positionLineNumber);const M=r.getSelections().map((N,B)=>({selection:N,idx:B})).sort((N,B)=>D.Range.compareRangesUsingStarts(N.selection,B.selection));for(const{selection:N,idx:B}of M){let P=s.adjustSelection(E,N,u,0),V=s.adjustSelection(E,N,0,a);x!==E.getValueInRange(P)&&(P=N),F!==E.getValueInRange(V)&&(V=N);const z=N.setStartPosition(P.startLineNumber,P.startColumn).setEndPosition(V.endLineNumber,V.endColumn),U=new o.SnippetParser().parse(p,!0,n),H=z.getStartPosition(),K=s.adjustWhitespace(E,H,U,h||B>0&&L!==E.getLineFirstNonWhitespaceColumn(N.positionLineNumber),!0);U.resolveVariables(new c.CompositeSnippetVariableResolver([T,new c.ClipboardBasedVariableResolver(R,B,M.length,r.getOption(71)==="spread"),new c.SelectionBasedVariableResolver(E,N,B,d),new c.CommentBasedVariableResolver(E,N),new c.TimeBasedVariableResolver,new c.WorkspaceBasedVariableResolver(y),new c.RandomBasedVariableResolver]));const G=E.getOffsetAt(H)+O;O+=U.toString().length-E.getValueLengthInRange(z),m[B]=k.EditOperation.replace(z,U.toString()),m[B].identifier={major:B,minor:0},b[B]=new i(r,U,G,K)}return{edits:m,snippets:b}}dispose(){(0,f.dispose)(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:r,snippets:p}=s.createEditsAndSnippets(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer);this._snippets=p,this._editor.executeEdits("snippet",r,u=>this._snippets[0].hasPlaceholder?this._move(!0):u.filter(a=>!!a.identifier).map(a=>I.Selection.fromPositions(a.range.getEndPosition()))),this._editor.revealRange(this._editor.getSelections()[0])}merge(r,p=S){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,r]);const{edits:u,snippets:a}=s.createEditsAndSnippets(this._editor,r,p.overwriteBefore,p.overwriteAfter,!0,p.adjustWhitespace,p.clipboardText,p.overtypingCapturer);this._editor.executeEdits("snippet",u,n=>{for(const h of this._snippets)h.merge(a);return console.assert(a.length===0),this._snippets[0].hasPlaceholder?this._move(void 0):n.filter(h=>!!h.identifier).map(h=>I.Selection.fromPositions(h.range.getEndPosition()))})}next(){const r=this._move(!0);this._editor.setSelections(r),this._editor.revealPositionInCenterIfOutsideViewport(r[0].getPosition())}prev(){const r=this._move(!1);this._editor.setSelections(r),this._editor.revealPositionInCenterIfOutsideViewport(r[0].getPosition())}_move(r){const p=[];for(const u of this._snippets){const a=u.move(r);p.push(...a)}return p}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get choice(){return this._snippets[0].choice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const r=this._editor.getSelections();if(r.length<this._snippets.length)return!1;let p=new Map;for(const u of this._snippets){const a=u.computePossibleSelections();if(p.size===0)for(const[n,h]of a){h.sort(D.Range.compareRangesUsingStarts);for(const g of r)if(h[0].containsRange(g)){p.set(n,[]);break}}if(p.size===0)return!1;p.forEach((n,h)=>{n.push(...a.get(h))})}r.sort(D.Range.compareRangesUsingStarts);for(let[u,a]of p){if(a.length!==r.length){p.delete(u);continue}a.sort(D.Range.compareRangesUsingStarts);for(let n=0;n<a.length;n++)if(!a[n].containsRange(r[n])){p.delete(u);continue}}return p.size>0}getEnclosingRange(){let r;for(const p of this._snippets){const u=p.getEnclosingRange();r?r=r.plusRange(u):r=u}return r}}e.SnippetSession=s}),define(ne[173],re([1,0,2,39,20,84,58,211,1303,7,5,31,772]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetController2=void 0;const c={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let i=class on{constructor(l,r,p,u){this._editor=l,this._instantiationService=r,this._logService=p,this._snippetListener=new t.DisposableStore,this._modelVersionId=-1,this._inSnippet=on.InSnippetMode.bindTo(u),this._hasNextTabstop=on.HasNextTabstop.bindTo(u),this._hasPrevTabstop=on.HasPrevTabstop.bindTo(u)}static get(l){return l.getContribution(on.ID)}dispose(){this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._session?.dispose(),this._snippetListener.dispose()}insert(l,r){try{this._doInsert(l,typeof r=="undefined"?c:{...c,...r})}catch(p){this.cancel(),this._logService.error(p),this._logService.error("snippet_error"),this._logService.error("insert_template=",l),this._logService.error("existing_template=",this._session?this._session._logInfo():"<no_session>")}}_doInsert(l,r){!this._editor.hasModel()||(this._snippetListener.clear(),r.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session?this._session.merge(l,r):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new o.SnippetSession(this._editor,l,r),this._session.insert()),r.undoStopAfter&&this._editor.getModel().pushStackElement(),this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(p=>p.isFlush&&this.cancel())),this._snippetListener.add(this._editor.onDidChangeModel(()=>this.cancel())),this._snippetListener.add(this._editor.onDidChangeCursorSelection(()=>this._updateState())))}_updateState(){if(!(!this._session||!this._editor.hasModel())){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this._editor.getModel().pushStackElement(),this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){if(!this._session||!this._editor.hasModel()){this._currentChoice=void 0;return}const{choice:l}=this._session;if(!l){this._currentChoice=void 0;return}if(this._currentChoice!==l){this._currentChoice=l,this._editor.setSelections(this._editor.getSelections().map(p=>A.Selection.fromPositions(p.getStartPosition())));const[r]=l.options;this._instantiationService.invokeFunction(D.showSimpleSuggestions,this._editor,l.options.map((p,u)=>({kind:13,label:p.value,insertText:p.value,sortText:"a".repeat(u+1),range:_.Range.fromPositions(this._editor.getPosition(),this._editor.getPosition().delta(0,r.value.length))})))}}finish(){for(;this._inSnippet.get();)this.next()}cancel(l=!1){this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._session?.dispose(),this._session=void 0,this._modelVersionId=-1,l&&this._editor.setSelections([this._editor.getSelection()])}prev(){this._session&&this._session.prev(),this._updateState()}next(){this._session&&this._session.next(),this._updateState()}isInSnippet(){return Boolean(this._inSnippet.get())}getSessionEnclosingRange(){if(this._session)return this._session.getEnclosingRange()}};i.ID="snippetController2",i.InSnippetMode=new w.RawContextKey("inSnippetMode",!1,(0,I.localize)(0,null)),i.HasNextTabstop=new w.RawContextKey("hasNextTabstop",!1,(0,I.localize)(1,null)),i.HasPrevTabstop=new w.RawContextKey("hasPrevTabstop",!1,(0,I.localize)(2,null)),i=Ee([W(1,v.IInstantiationService),W(2,C.ILogService),W(3,w.IContextKeyService)],i),e.SnippetController2=i,(0,f.registerEditorContribution)(i.ID,i);const S=f.EditorCommand.bindToContribution(i.get);(0,f.registerEditorCommand)(new S({id:"jumpToNextSnippetPlaceholder",precondition:w.ContextKeyExpr.and(i.InSnippetMode,i.HasNextTabstop),handler:s=>s.next(),kbOpts:{weight:100+30,kbExpr:k.EditorContextKeys.editorTextFocus,primary:2}})),(0,f.registerEditorCommand)(new S({id:"jumpToPrevSnippetPlaceholder",precondition:w.ContextKeyExpr.and(i.InSnippetMode,i.HasPrevTabstop),handler:s=>s.prev(),kbOpts:{weight:100+30,kbExpr:k.EditorContextKeys.editorTextFocus,primary:1024|2}})),(0,f.registerEditorCommand)(new S({id:"leaveSnippet",precondition:i.InSnippetMode,handler:s=>s.cancel(!0),kbOpts:{weight:100+30,kbExpr:k.EditorContextKeys.editorTextFocus,primary:9,secondary:[1024|9]}})),(0,f.registerEditorCommand)(new S({id:"acceptSnippet",precondition:i.InSnippetMode,handler:s=>s.finish()}))}),define(ne[773],re([1,0,11,30,22,6,2,312,136,20,86,462,28,540,542,124,1166,62,228,261,173,13,102,541,8]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.provideInlineCompletions=e.SynchronizedInlineCompletionsCache=e.UpdateOperation=e.InlineCompletionsSession=e.InlineCompletionsModel=void 0;let d=class extends k.Disposable{constructor(F,L,M,N,B,P,V){super();this.editor=F,this.cache=L,this.commandService=M,this.languageConfigurationService=N,this.languageFeaturesService=B,this.debounceService=P,this.onDidChangeEmitter=new A.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.completionSession=this._register(new k.MutableDisposable),this.active=!1,this.disposed=!1,this.debounceValue=this.debounceService.for(this.languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:200}),this._register(M.onDidExecuteCommand(z=>{new Set([D.CoreEditingCommands.Tab.id,D.CoreEditingCommands.DeleteLeft.id,D.CoreEditingCommands.DeleteRight.id,c.inlineSuggestCommitId,"acceptSelectedSuggestion"]).has(z.commandId)&&F.hasTextFocus()&&this.handleUserInput()})),this._register(this.editor.onDidType(z=>{this.handleUserInput()})),this._register(this.editor.onDidChangeCursorPosition(z=>{this.session&&!this.session.isValid&&this.hide()})),this._register((0,k.toDisposable)(()=>{this.disposed=!0})),this._register(this.editor.onDidBlurEditorWidget(()=>{V.getValue("editor.inlineSuggest.hideOnBlur")||this.hide()}))}handleUserInput(){this.session&&!this.session.isValid&&this.hide(),setTimeout(()=>{this.disposed||this.startSessionIfTriggered()},0)}get session(){return this.completionSession.value}get ghostText(){return this.session?.ghostText}get minReservedLineCount(){return this.session?this.session.minReservedLineCount:0}get expanded(){return this.session?this.session.expanded:!1}setExpanded(F){this.session?.setExpanded(F)}setActive(F){this.active=F,F&&this.session?.scheduleAutomaticUpdate()}startSessionIfTriggered(){!this.editor.getOption(55).enabled||this.session&&this.session.isValid||this.trigger(v.InlineCompletionTriggerKind.Automatic)}trigger(F){if(this.completionSession.value){F===v.InlineCompletionTriggerKind.Explicit&&this.completionSession.value.ensureUpdateWithExplicitContext();return}this.completionSession.value=new m(this.editor,this.editor.getPosition(),()=>this.active,this.commandService,this.cache,F,this.languageConfigurationService,this.languageFeaturesService.inlineCompletionsProvider,this.debounceValue),this.completionSession.value.takeOwnership(this.completionSession.value.onDidChange(()=>{this.onDidChangeEmitter.fire()}))}hide(){this.completionSession.clear(),this.onDidChangeEmitter.fire()}commitCurrentSuggestion(){this.session?.commitCurrentCompletion()}showNext(){this.session?.showNextInlineCompletion()}showPrevious(){this.session?.showPreviousInlineCompletion()}async hasMultipleInlineCompletions(){const F=await this.session?.hasMultipleInlineCompletions();return F!==void 0?F:!1}};d=Ee([W(2,o.ICommandService),W(3,S.ILanguageConfigurationService),W(4,l.ILanguageFeaturesService),W(5,r.ILanguageFeatureDebounceService),W(6,g.IConfigurationService)],d),e.InlineCompletionsModel=d;class m extends C.BaseGhostTextWidgetModel{constructor(F,L,M,N,B,P,V,z,U){super(F);this.triggerPosition=L,this.shouldUpdate=M,this.commandService=N,this.cache=B,this.initialTriggerKind=P,this.languageConfigurationService=V,this.registry=z,this.debounce=U,this.minReservedLineCount=0,this.updateOperation=this._register(new k.MutableDisposable),this.updateSoon=this._register(new t.RunOnceScheduler(()=>{let K=this.initialTriggerKind;return this.initialTriggerKind=v.InlineCompletionTriggerKind.Automatic,this.update(K)},50)),this.filteredCompletions=[],this.currentlySelectedCompletionId=void 0;let H;this._register(this.onDidChange(()=>{const K=this.currentCompletion;if(K&&K.sourceInlineCompletion!==H){H=K.sourceInlineCompletion;const G=K.sourceProvider;G.handleItemDidShow&&G.handleItemDidShow(K.sourceInlineCompletions,H)}})),this._register((0,k.toDisposable)(()=>{this.cache.clear()})),this._register(this.editor.onDidChangeCursorPosition(K=>{this.cache.value&&(this.updateFilteredInlineCompletions(),this.onDidChangeEmitter.fire())})),this._register(this.editor.onDidChangeModelContent(K=>{this.cache.value?.updateRanges(),this.updateFilteredInlineCompletions(),this.scheduleAutomaticUpdate()})),this._register(this.registry.onDidChange(()=>{this.updateSoon.schedule(this.debounce.get(this.editor.getModel()))})),this.scheduleAutomaticUpdate()}updateFilteredInlineCompletions(){if(!this.cache.value){this.filteredCompletions=[];return}const F=this.editor.getModel(),L=F.validatePosition(this.editor.getPosition());this.filteredCompletions=this.cache.value.completions.filter(M=>{const N=F.getValueInRange(M.synchronizedRange).toLowerCase(),B=M.inlineCompletion.filterText.toLowerCase(),P=F.getLineIndentColumn(M.synchronizedRange.startLineNumber),V=Math.max(0,L.column-M.synchronizedRange.startColumn);let z=B.substring(0,V),U=B.substring(V),H=N.substring(0,V),K=N.substring(V);return M.synchronizedRange.startColumn<=P&&(H=H.trimStart(),H.length===0&&(K=K.trimStart()),z=z.trimStart(),z.length===0&&(U=U.trimStart())),z.startsWith(H)&&(0,n.matchesSubString)(K,U)})}fixAndGetIndexOfCurrentSelection(){if(!this.currentlySelectedCompletionId||!this.cache.value||this.cache.value.completions.length===0)return 0;const F=this.filteredCompletions.findIndex(L=>L.semanticId===this.currentlySelectedCompletionId);return F===-1?(this.currentlySelectedCompletionId=void 0,0):F}get currentCachedCompletion(){if(!!this.cache.value)return this.filteredCompletions[this.fixAndGetIndexOfCurrentSelection()]}async showNextInlineCompletion(){await this.ensureUpdateWithExplicitContext();const F=this.filteredCompletions||[];if(F.length>0){const L=(this.fixAndGetIndexOfCurrentSelection()+1)%F.length;this.currentlySelectedCompletionId=F[L].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()}async showPreviousInlineCompletion(){await this.ensureUpdateWithExplicitContext();const F=this.filteredCompletions||[];if(F.length>0){const L=(this.fixAndGetIndexOfCurrentSelection()+F.length-1)%F.length;this.currentlySelectedCompletionId=F[L].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()}async ensureUpdateWithExplicitContext(){this.updateOperation.value?this.updateOperation.value.triggerKind===v.InlineCompletionTriggerKind.Explicit?await this.updateOperation.value.promise:await this.update(v.InlineCompletionTriggerKind.Explicit):this.cache.value?.triggerKind!==v.InlineCompletionTriggerKind.Explicit&&await this.update(v.InlineCompletionTriggerKind.Explicit)}async hasMultipleInlineCompletions(){return await this.ensureUpdateWithExplicitContext(),(this.cache.value?.completions.length||0)>1}get ghostText(){const F=this.currentCompletion;if(!F)return;const L=this.editor.getOptions().get(55).mode,M=(0,i.inlineCompletionToGhostText)(F,this.editor.getModel(),L,this.editor.getPosition());return M?M.isEmpty()?void 0:M:new C.GhostTextReplacement(F.range.startLineNumber,F.range.startColumn,F.range.endColumn-F.range.startColumn,F.insertText.split(` `),0)}get currentCompletion(){const F=this.currentCachedCompletion;if(!!F)return F.toLiveInlineCompletion()}get isValid(){return this.editor.getPosition().lineNumber===this.triggerPosition.lineNumber}scheduleAutomaticUpdate(){this.updateOperation.clear(),this.updateSoon.schedule(this.debounce.get(this.editor.getModel()))}async update(F){if(!this.shouldUpdate())return;const L=this.editor.getPosition(),M=new Date,N=(0,t.createCancelablePromise)(async P=>{let V;try{V=await T(this.registry,L,this.editor.getModel(),{triggerKind:F,selectedSuggestionInfo:void 0},P,this.languageConfigurationService);const z=new Date;this.debounce.update(this.editor.getModel(),z.getTime()-M.getTime())}catch(z){(0,_.onUnexpectedError)(z);return}P.isCancellationRequested||(this.cache.setValue(this.editor,V,F),this.updateFilteredInlineCompletions(),this.onDidChangeEmitter.fire())}),B=new b(N,F);this.updateOperation.value=B,await N,this.updateOperation.value===B&&this.updateOperation.clear()}takeOwnership(F){this._register(F)}commitCurrentCompletion(){if(!this.ghostText)return;const L=this.currentCompletion;L&&this.commit(L)}commit(F){const L=this.cache.clearAndLeak();F.snippetInfo?(this.editor.executeEdits("inlineSuggestion.accept",[I.EditOperation.replaceMove(F.range,""),...F.additionalTextEdits]),this.editor.setPosition(F.snippetInfo.range.getStartPosition()),u.SnippetController2.get(this.editor)?.insert(F.snippetInfo.snippet)):this.editor.executeEdits("inlineSuggestion.accept",[I.EditOperation.replaceMove(F.range,F.insertText),...F.additionalTextEdits]),F.command?this.commandService.executeCommand(F.command.id,...F.command.arguments||[]).finally(()=>{L?.dispose()}).then(void 0,_.onUnexpectedExternalError):L?.dispose(),this.onDidChangeEmitter.fire()}}e.InlineCompletionsSession=m;class b{constructor(F,L){this.promise=F,this.triggerKind=L}dispose(){this.promise.cancel()}}e.UpdateOperation=b;class E extends k.Disposable{constructor(F,L,M,N){super();this.editor=L,this.onChange=M,this.triggerKind=N;const B=L.deltaDecorations([],F.items.map(P=>({range:P.range,options:{description:"inline-completion-tracking-range"}})));this._register((0,k.toDisposable)(()=>{L.deltaDecorations(B,[])})),this.completions=F.items.map((P,V)=>new y(P,B[V])),this._register(L.onDidChangeModelContent(()=>{this.updateRanges()})),this._register(F)}updateRanges(){let F=!1;const L=this.editor.getModel();for(const M of this.completions){const N=L.getDecorationRange(M.decorationId);if(!N){(0,_.onUnexpectedError)(new Error("Decoration has no range"));continue}M.synchronizedRange.equalsRange(N)||(F=!0,M.synchronizedRange=N)}F&&this.onChange()}}e.SynchronizedInlineCompletionsCache=E;class y{constructor(F,L){this.inlineCompletion=F,this.decorationId=L,this.semanticId=JSON.stringify({text:this.inlineCompletion.insertText,abbreviation:this.inlineCompletion.filterText,startLine:this.inlineCompletion.range.startLineNumber,startColumn:this.inlineCompletion.range.startColumn,command:this.inlineCompletion.command}),this.synchronizedRange=F.range}toLiveInlineCompletion(){return{insertText:this.inlineCompletion.insertText,range:this.synchronizedRange,command:this.inlineCompletion.command,sourceProvider:this.inlineCompletion.sourceProvider,sourceInlineCompletions:this.inlineCompletion.sourceInlineCompletions,sourceInlineCompletion:this.inlineCompletion.sourceInlineCompletion,snippetInfo:this.inlineCompletion.snippetInfo,filterText:this.inlineCompletion.filterText,additionalTextEdits:this.inlineCompletion.additionalTextEdits}}}async function T(x,F,L,M,N=f.CancellationToken.None,B){const P=R(F,L),V=x.all(L),z=await Promise.all(V.map(async H=>{const K=await Promise.resolve(H.provideInlineCompletions(L,F,M,N)).catch(_.onUnexpectedExternalError);return{completions:K,provider:H,dispose:()=>{K&&H.freeInlineCompletions(K)}}})),U=new Map;for(const H of z){const K=H.completions;if(!!K)for(const G of K.items){const q=G.range?w.Range.lift(G.range):P;if(q.startLineNumber!==q.endLineNumber)continue;let Z,j;typeof G.insertText=="string"?(Z=G.insertText,B&&G.completeBracketPairs&&(Z=O(Z,q.getStartPosition(),L,B)),j=void 0):"snippet"in G.insertText?(Z=new p.SnippetParser().parse(G.insertText.snippet).toString(),j={snippet:G.insertText.snippet,range:q}):(0,a.assertNever)(G.insertText);const X={insertText:Z,snippetInfo:j,range:q,command:G.command,sourceProvider:H.provider,sourceInlineCompletions:K,sourceInlineCompletion:G,filterText:G.filterText||Z,additionalTextEdits:G.additionalTextEdits||(0,h.getReadonlyEmptyArray)()};U.set(JSON.stringify({insertText:Z,range:G.range}),X)}}return{items:[...U.values()],dispose:()=>{for(const H of z)H.dispose()}}}e.provideInlineCompletions=T;function R(x,F){const L=F.getWordAtPosition(x),M=F.getLineMaxColumn(x.lineNumber);return L?new w.Range(x.lineNumber,L.startColumn,x.lineNumber,M):w.Range.fromPositions(x,x.with(void 0,M))}function O(x,F,L,M){const B=L.getLineContent(F.lineNumber).substring(0,F.column-1)+x,V=L.tokenizeLineWithEdit(F,B.length-(F.column-1),x)?.sliceAndInflate(F.column-1,B.length,0);return V?(0,s.fixBracketsInLine)(V,M):x}}),define(ne[2104],re([1,0,11,30,22,6,2,29,84,184,173,714,95,8,7,31,27,712,211,62]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestModel=e.State=e.LineContext=void 0;class u{constructor(b,E,y,T){this.leadingLineContent=b.getLineContent(E.lineNumber).substr(0,E.column-1),this.leadingWord=b.getWordUntilPosition(E),this.lineNumber=E.lineNumber,this.column=E.column,this.auto=y,this.shy=T}static shouldAutoTrigger(b){if(!b.hasModel())return!1;const E=b.getModel(),y=b.getPosition();E.tokenizeIfCheap(y.lineNumber);const T=E.getWordAtPosition(y);return!(!T||T.endColumn!==y.column||!isNaN(Number(T.word)))}}e.LineContext=u;var a;(function(m){m[m.Idle=0]="Idle",m[m.Manual=1]="Manual",m[m.Auto=2]="Auto"})(a=e.State||(e.State={}));function n(m){return m.getOption(106).preview}function h(m,b,E){if(!Boolean(b.getContextKeyValue("inlineSuggestionVisible")))return!0;const y=E.getValue("editor.inlineSuggest.allowQuickSuggestions");return y!==void 0?Boolean(y):!1}function g(m,b,E){if(!Boolean(b.getContextKeyValue("inlineSuggestionVisible")))return!0;const y=E.getValue("editor.inlineSuggest.allowSuggestOnTriggerCharacters");return y!==void 0?Boolean(y):!1}let d=class po{constructor(b,E,y,T,R,O,x,F){this._editor=b,this._editorWorkerService=E,this._clipboardService=y,this._telemetryService=T,this._logService=R,this._contextKeyService=O,this._configurationService=x,this._languageFeaturesService=F,this._toDispose=new k.DisposableStore,this._quickSuggestDelay=10,this._triggerCharacterListener=new k.DisposableStore,this._triggerQuickSuggest=new t.TimeoutTimer,this._state=0,this._completionDisposables=new k.DisposableStore,this._onDidCancel=new A.Emitter,this._onDidTrigger=new A.Emitter,this._onDidSuggest=new A.Emitter,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new I.Selection(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeModelLanguage(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeConfiguration(()=>{this._updateTriggerCharacters(),this._updateQuickSuggest()})),this._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()}));let L=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{L=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{L=!1,this._onCompositionEnd()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(M=>{L||this._onCursorChange(M)})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{L||this._refilterCompletionItems()})),this._updateTriggerCharacters(),this._updateQuickSuggest()}dispose(){(0,k.dispose)(this._triggerCharacterListener),(0,k.dispose)([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateQuickSuggest(){this._quickSuggestDelay=this._editor.getOption(80),(isNaN(this._quickSuggestDelay)||!this._quickSuggestDelay&&this._quickSuggestDelay!==0||this._quickSuggestDelay<0)&&(this._quickSuggestDelay=10)}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(81)||!this._editor.hasModel()||!this._editor.getOption(109))return;const b=new Map;for(const y of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(const T of y.triggerCharacters||[]){let R=b.get(T);R||(R=new Set,R.add((0,r.getSnippetSuggestSupport)()),b.set(T,R)),R.add(y)}const E=y=>{if(!g(this._editor,this._contextKeyService,this._configurationService)||u.shouldAutoTrigger(this._editor))return;if(!y){const O=this._editor.getPosition();y=this._editor.getModel().getLineContent(O.lineNumber).substr(0,O.column-1)}let T="";(0,D.isLowSurrogate)(y.charCodeAt(y.length-1))?(0,D.isHighSurrogate)(y.charCodeAt(y.length-2))&&(T=y.substr(y.length-2)):T=y.charAt(y.length-1);const R=b.get(T);if(R){const O=this._completionModel?{items:this._completionModel.adopt(R),clipboardText:this._completionModel.clipboardText}:void 0;this.trigger({auto:!0,shy:!1,triggerCharacter:T},Boolean(this._completionModel),R,O)}};this._triggerCharacterListener.add(this._editor.onDidType(E)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(()=>E()))}get state(){return this._state}cancel(b=!1){this._state!==0&&(this._triggerQuickSuggest.cancel(),this._requestToken?.cancel(),this._requestToken=void 0,this._state=0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:b}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){this._state!==0&&(!this._editor.hasModel()||!this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.cancel():this.trigger({auto:this._state===2,shy:!1},!0))}_onCursorChange(b){if(!this._editor.hasModel())return;const E=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!b.selection.isEmpty()||b.reason!==0&&b.reason!==3||b.source!=="keyboard"&&b.source!=="deleteLeft"){this.cancel();return}this._state===0&&b.reason===0?(E.containsRange(this._currentSelection)||E.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():this._state!==0&&b.reason===3&&this._refilterCompletionItems()}_onCompositionEnd(){this._state===0?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){r.QuickSuggestionsOptions.isAllOff(this._editor.getOption(79))||this._editor.getOption(106).snippetsPreventQuickSuggestions&&v.SnippetController2.get(this._editor)?.isInSnippet()||(this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._state!==0||!u.shouldAutoTrigger(this._editor)||!this._editor.hasModel())return;const b=this._editor.getModel(),E=this._editor.getPosition(),y=this._editor.getOption(79);if(!r.QuickSuggestionsOptions.isAllOff(y)){if(!r.QuickSuggestionsOptions.isAllOn(y)){b.tokenizeIfCheap(E.lineNumber);const T=b.getLineTokens(E.lineNumber),R=T.getStandardTokenType(T.findTokenIndexAtOffset(Math.max(E.column-1-1,0)));if(r.QuickSuggestionsOptions.valueFor(y,R)!=="on")return}!h(this._editor,this._contextKeyService,this._configurationService)||!this._languageFeaturesService.completionProvider.has(b)||this.trigger({auto:!0,shy:!1})}},this._quickSuggestDelay))}_refilterCompletionItems(){Promise.resolve().then(()=>{if(this._state===0||!this._editor.hasModel())return;const b=this._editor.getModel(),E=this._editor.getPosition(),y=new u(b,E,this._state===2,!1);this._onNewContext(y)})}trigger(b,E=!1,y,T){if(!this._editor.hasModel())return;const R=this._editor.getModel(),O=b.auto,x=new u(R,this._editor.getPosition(),O,b.shy);this.cancel(E),this._state=O?2:1,this._onDidTrigger.fire({auto:O,shy:b.shy,position:this._editor.getPosition()}),this._context=x;let F={triggerKind:b.triggerKind??0};b.triggerCharacter&&(F={triggerKind:1,triggerCharacter:b.triggerCharacter}),this._requestToken=new f.CancellationTokenSource;const L=this._editor.getOption(101);let M=1;switch(L){case"top":M=0;break;case"bottom":M=2;break}const{itemKind:N,showDeprecated:B}=po._createSuggestFilter(this._editor),P=C.WordDistance.create(this._editorWorkerService,this._editor),V=(0,r.provideSuggestionItems)(this._languageFeaturesService.completionProvider,R,this._editor.getPosition(),new r.CompletionOptions(M,N,y,B),F,this._requestToken.token);Promise.all([V,P]).then(async([z,U])=>{if(this._requestToken?.dispose(),!this._editor.hasModel())return;let H=T?.clipboardText;if(!H&&z.needsClipboard&&(H=await this._clipboardService.readText()),this._state===0)return;const K=this._editor.getModel();let G=z.items;if(T){const Z=(0,r.getSuggestionComparator)(M);G=G.concat(T.items).sort(Z)}const q=new u(K,this._editor.getPosition(),O,b.shy);this._completionModel=new l.CompletionModel(G,this._context.column,{leadingLineContent:q.leadingLineContent,characterCountDelta:q.column-this._context.column},U,this._editor.getOption(106),this._editor.getOption(101),H),this._completionDisposables.add(z.disposable),this._onNewContext(q),this._reportDurationsTelemetry(z.durations)}).catch(_.onUnexpectedError)}_reportDurationsTelemetry(b){this._telemetryGate++%230==0&&setTimeout(()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(b)}),this._logService.debug("suggest.durations.json",b)})}static _createSuggestFilter(b){const E=new Set;b.getOption(101)==="none"&&E.add(27);const T=b.getOption(106);return T.showMethods||E.add(0),T.showFunctions||E.add(1),T.showConstructors||E.add(2),T.showFields||E.add(3),T.showVariables||E.add(4),T.showClasses||E.add(5),T.showStructs||E.add(6),T.showInterfaces||E.add(7),T.showModules||E.add(8),T.showProperties||E.add(9),T.showEvents||E.add(10),T.showOperators||E.add(11),T.showUnits||E.add(12),T.showValues||E.add(13),T.showConstants||E.add(14),T.showEnums||E.add(15),T.showEnumMembers||E.add(16),T.showKeywords||E.add(17),T.showWords||E.add(18),T.showColors||E.add(19),T.showFiles||E.add(20),T.showReferences||E.add(21),T.showColors||E.add(22),T.showFolders||E.add(23),T.showTypeParameters||E.add(24),T.showSnippets||E.add(27),T.showUsers||E.add(25),T.showIssues||E.add(26),{itemKind:E,showDeprecated:T.showDeprecated}}_onNewContext(b){if(!!this._context){if(b.lineNumber!==this._context.lineNumber){this.cancel();return}if((0,D.getLeadingWhitespace)(b.leadingLineContent)!==(0,D.getLeadingWhitespace)(this._context.leadingLineContent)){this.cancel();return}if(b.column<this._context.column){b.leadingWord.word?this.trigger({auto:this._context.auto,shy:!1},!0):this.cancel();return}if(!!this._completionModel){if(b.leadingWord.word.length!==0&&b.leadingWord.startColumn>this._context.leadingWord.startColumn){const E=new Set(this._languageFeaturesService.completionProvider.all(this._editor.getModel()));for(let T of this._completionModel.allProvider)E.delete(T);const y=this._completionModel.adopt(new Set);this.trigger({auto:this._context.auto,shy:!1},!0,E,{items:y,clipboardText:this._completionModel.clipboardText});return}if(b.column>this._context.column&&this._completionModel.incomplete.size>0&&b.leadingWord.word.length!==0){const{incomplete:E}=this._completionModel,y=this._completionModel.adopt(E);this.trigger({auto:this._state===2,shy:!1,triggerKind:2},!0,E,{items:y,clipboardText:this._completionModel.clipboardText})}else{let E=this._completionModel.lineContext,y=!1;if(this._completionModel.lineContext={leadingLineContent:b.leadingLineContent,characterCountDelta:b.column-this._context.column},this._completionModel.items.length===0){if(u.shouldAutoTrigger(this._editor)&&this._context.leadingWord.endColumn<b.leadingWord.startColumn){this.trigger({auto:this._context.auto,shy:!1},!0);return}if(this._context.auto){this.cancel();return}else if(this._completionModel.lineContext=E,y=this._completionModel.items.length>0,y&&b.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,auto:this._context.auto,shy:this._context.shy,isFrozen:y})}}}}};d=Ee([W(1,w.IEditorWorkerService),W(2,o.IClipboardService),W(3,s.ITelemetryService),W(4,S.ILogService),W(5,i.IContextKeyService),W(6,c.IConfigurationService),W(7,p.ILanguageFeaturesService)],d),e.SuggestModel=d}),define(ne[247],re([1,0,112,15,11,30,22,6,222,2,14,151,13,453,39,136,49,20,58,173,261,1986,1943,1306,28,7,5,31,211,1942,1199,2104,1200,2074,27,19,116]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TriggerSuggestAction=e.SuggestController=void 0;let N=!1;class B{constructor(q,Z){if(this._model=q,this._position=Z,q.getLineMaxColumn(Z.lineNumber)!==Z.column){const X=q.getOffsetAt(Z),Y=q.getPositionAt(X+1);this._marker=q.deltaDecorations([],[{range:l.Range.fromPositions(Z,Y),options:{description:"suggest-line-suffix",stickiness:1}}])}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}delta(q){if(this._model.isDisposed()||this._position.lineNumber!==q.lineNumber)return 0;if(this._marker){const Z=this._model.getDecorationRange(this._marker[0]);return this._model.getOffsetAt(Z.getStartPosition())-this._model.getOffsetAt(q)}else return this._model.getLineMaxColumn(q.lineNumber)-q.column}}var P;(function(G){G[G.NoBeforeUndoStop=1]="NoBeforeUndoStop",G[G.NoAfterUndoStop=2]="NoAfterUndoStop",G[G.KeepAlternativeSuggestions=4]="KeepAlternativeSuggestions",G[G.AlternativeOverwriteConfig=8]="AlternativeOverwriteConfig"})(P||(P={}));let V=class mo{constructor(q,Z,j,X,Y,$,J){this._memoryService=Z,this._commandService=j,this._contextKeyService=X,this._instantiationService=Y,this._logService=$,this._telemetryService=J,this._lineSuffix=new w.MutableDisposable,this._toDispose=new w.DisposableStore,this._selectors=new z(ie=>ie.priority),this._telemetryGate=0,this.editor=q,this.model=Y.createInstance(R.SuggestModel,this.editor);const ee=E.Context.InsertMode.bindTo(X);ee.set(q.getOption(106).insertMode),this.model.onDidTrigger(()=>ee.set(q.getOption(106).insertMode)),this.widget=this._toDispose.add(new _.IdleValue(()=>{const ie=this._instantiationService.createInstance(x.SuggestWidget,this.editor);this._toDispose.add(ie),this._toDispose.add(ie.onDidSelect(oe=>this._insertSuggestion(oe,0),this));const ce=new T.CommitCharacterController(this.editor,ie,oe=>this._insertSuggestion(oe,2));this._toDispose.add(ce),this._toDispose.add(this.model.onDidSuggest(oe=>{oe.completionModel.items.length===0&&ce.reset()}));const le=E.Context.MakesTextEdit.bindTo(this._contextKeyService),ae=E.Context.HasInsertAndReplaceRange.bindTo(this._contextKeyService),ue=E.Context.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add((0,w.toDisposable)(()=>{le.reset(),ae.reset(),ue.reset()})),this._toDispose.add(ie.onDidFocus(({item:oe})=>{const fe=this.editor.getPosition(),pe=oe.editStart.column,me=fe.column;let be=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!oe.completion.additionalTextEdits&&!(oe.completion.insertTextRules&4)&&me-pe===oe.completion.insertText.length&&(be=this.editor.getModel().getValueInRange({startLineNumber:fe.lineNumber,startColumn:pe,endLineNumber:fe.lineNumber,endColumn:me})!==oe.completion.insertText),le.set(be),ae.set(!s.Position.equals(oe.editInsertEnd,oe.editReplaceEnd)),ue.set(Boolean(oe.provider.resolveCompletionItem)||Boolean(oe.completion.documentation)||oe.completion.detail!==oe.completion.label)})),this._toDispose.add(ie.onDetailsKeyDown(oe=>{if(oe.toKeybinding().equals(new I.SimpleKeybinding(!0,!1,!1,!1,33))||v.isMacintosh&&oe.toKeybinding().equals(new I.SimpleKeybinding(!1,!1,!1,!0,33))){oe.stopPropagation();return}oe.toKeybinding().isModifierKey()||this.editor.focus()})),ie})),this._overtypingCapturer=this._toDispose.add(new _.IdleValue(()=>this._toDispose.add(new O.OvertypingCapturer(this.editor,this.model)))),this._alternatives=this._toDispose.add(new _.IdleValue(()=>this._toDispose.add(new y.SuggestAlternatives(this.editor,this._contextKeyService)))),this._toDispose.add(Y.createInstance(n.WordContextKey,q)),this._toDispose.add(this.model.onDidTrigger(ie=>{this.widget.value.showTriggered(ie.auto,ie.shy?250:50),this._lineSuffix.value=new B(this.editor.getModel(),ie.position)})),this._toDispose.add(this.model.onDidSuggest(ie=>{if(!ie.shy){let ce=-1;for(const le of this._selectors.itemsOrderedByPriorityDesc)if(ce=le.select(this.editor.getModel(),this.editor.getPosition(),ie.completionModel.items),ce!==-1)break;ce===-1&&(ce=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),ie.completionModel.items)),this.widget.value.showSuggestions(ie.completionModel,ce,ie.isFrozen,ie.auto)}})),this._toDispose.add(this.model.onDidCancel(ie=>{ie.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{N||(this.model.cancel(),this.model.clear())}));let te=E.Context.AcceptSuggestionsOnEnter.bindTo(X),se=()=>{const ie=this.editor.getOption(1);te.set(ie==="on"||ie==="smart")};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>se())),se()}static get(q){return q.getContribution(mo.ID)}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose()}_insertSuggestion(q,Z){if(!q||!q.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!this.editor.hasModel())return;const j=p.SnippetController2.get(this.editor);if(!j)return;const X=this.editor.getModel(),Y=X.getAlternativeVersionId(),{item:$}=q,J=[],ee=new A.CancellationTokenSource;Z&1||this.editor.pushUndoStop();const te=this.getOverwriteInfo($,Boolean(Z&8));if(this._memoryService.memorize(X,this.editor.getPosition(),$),Array.isArray($.completion.additionalTextEdits)){const ie=c.StableEditorScrollState.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",$.completion.additionalTextEdits.map(ce=>S.EditOperation.replaceMove(l.Range.lift(ce.range),ce.text))),ie.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!$.isResolved){const ie=new C.StopWatch(!0);let ce;const le=X.onDidChangeContent(fe=>{if(fe.isFlush){ee.cancel(),le.dispose();return}for(let pe of fe.changes){const me=l.Range.getEndPosition(pe.range);(!ce||s.Position.isBefore(me,ce))&&(ce=me)}});let ae=Z;Z|=2;let ue=!1,oe=this.editor.onWillType(()=>{oe.dispose(),ue=!0,ae&2||this.editor.pushUndoStop()});J.push($.resolve(ee.token).then(()=>{if(!$.completion.additionalTextEdits||ee.token.isCancellationRequested||ce&&$.completion.additionalTextEdits.some(pe=>s.Position.isBefore(ce,l.Range.getStartPosition(pe.range))))return!1;ue&&this.editor.pushUndoStop();const fe=c.StableEditorScrollState.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",$.completion.additionalTextEdits.map(pe=>S.EditOperation.replaceMove(l.Range.lift(pe.range),pe.text))),fe.restoreRelativeVerticalPositionOfCursor(this.editor),(ue||!(ae&2))&&this.editor.pushUndoStop(),!0}).then(fe=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",ie.elapsed(),fe),le.dispose(),oe.dispose()}))}let{insertText:se}=$.completion;$.completion.insertTextRules&4||(se=u.SnippetParser.escape(se)),j.insert(se,{overwriteBefore:te.overwriteBefore,overwriteAfter:te.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!($.completion.insertTextRules&1),clipboardText:q.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),Z&2||this.editor.pushUndoStop(),$.completion.command?$.completion.command.id===U.id?this.model.trigger({auto:!0,shy:!1},!0):(J.push(this._commandService.executeCommand($.completion.command.id,...$.completion.command.arguments?[...$.completion.command.arguments]:[]).catch(k.onUnexpectedError)),this.model.cancel()):this.model.cancel(),Z&4&&this._alternatives.value.set(q,ie=>{for(ee.cancel();X.canUndo();){Y!==X.getAlternativeVersionId()&&X.undo(),this._insertSuggestion(ie,1|2|(Z&8?8:0));break}}),this._alertCompletionItem($),Promise.all(J).finally(()=>{this._reportSuggestionAcceptedTelemetry(X,q),this.model.clear(),ee.dispose()})}_reportSuggestionAcceptedTelemetry(q,Z){if(this._telemetryGate++%100!=0)return;const j=(Z.item.provider._debugDisplayName??"unknown").split("(",1)[0].toLowerCase();this._telemetryService.publicLog2("suggest.acceptedSuggestion",{providerId:j,basenameHash:(0,M.hash)((0,L.basename)(q.uri)).toString(16),languageId:q.getLanguageId(),fileExtension:(0,L.extname)(q.uri)})}getOverwriteInfo(q,Z){(0,o.assertType)(this.editor.hasModel());let j=this.editor.getOption(106).insertMode==="replace";Z&&(j=!j);const X=q.position.column-q.editStart.column,Y=(j?q.editReplaceEnd.column:q.editInsertEnd.column)-q.position.column,$=this.editor.getPosition().column-q.position.column,J=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:X+$,overwriteAfter:Y+J}}_alertCompletionItem(q){if((0,f.isNonEmptyArray)(q.completion.additionalTextEdits)){let Z=h.localize(0,null,q.textLabel,q.completion.additionalTextEdits.length);(0,t.alert)(Z)}}triggerSuggest(q,Z){this.editor.hasModel()&&(this.model.trigger({auto:Z??!1,shy:!1},!1,q),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(q){if(!this.editor.hasModel())return;const Z=this.editor.getPosition(),j=()=>{Z.equals(this.editor.getPosition())&&this._commandService.executeCommand(q.fallback)},X=Y=>{if(Y.completion.insertTextRules&4||Y.completion.additionalTextEdits)return!0;const $=this.editor.getPosition(),J=Y.editStart.column,ee=$.column;return ee-J!==Y.completion.insertText.length?!0:this.editor.getModel().getValueInRange({startLineNumber:$.lineNumber,startColumn:J,endLineNumber:$.lineNumber,endColumn:ee})!==Y.completion.insertText};D.Event.once(this.model.onDidTrigger)(Y=>{let $=[];D.Event.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{(0,w.dispose)($),j()},void 0,$),this.model.onDidSuggest(({completionModel:J})=>{if((0,w.dispose)($),J.items.length===0){j();return}const ee=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),J.items),te=J.items[ee];if(!X(te)){j();return}this.editor.pushUndoStop(),this._insertSuggestion({index:ee,item:te,model:J},4|1|2)},void 0,$)}),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(Z,0),this.editor.focus()}acceptSelectedSuggestion(q,Z){const j=this.widget.value.getFocusedItem();let X=0;q&&(X|=4),Z&&(X|=8),this._insertSuggestion(j,X)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){!this.widget.isInitialized||this.widget.value.stopForceRenderingAbove()}registerSelector(q){return this._selectors.register(q)}};V.ID="editor.contrib.suggestController",V=Ee([W(1,a.ISuggestMemoryService),W(2,g.ICommandService),W(3,d.IContextKeyService),W(4,m.IInstantiationService),W(5,b.ILogService),W(6,F.ITelemetryService)],V),e.SuggestController=V;class z{constructor(q){this.prioritySelector=q,this._items=new Array}register(q){if(this._items.indexOf(q)!==-1)throw new Error("Value is already registered");return this._items.push(q),this._items.sort((Z,j)=>this.prioritySelector(j)-this.prioritySelector(Z)),{dispose:()=>{const Z=this._items.indexOf(q);Z>=0&&this._items.splice(Z,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class U extends i.EditorAction{constructor(){super({id:U.id,label:h.localize(1,null),alias:"Trigger Suggest",precondition:d.ContextKeyExpr.and(r.EditorContextKeys.writable,r.EditorContextKeys.hasCompletionItemProvider),kbOpts:{kbExpr:r.EditorContextKeys.textInputFocus,primary:2048|10,secondary:[2048|39],mac:{primary:256|10,secondary:[512|9,2048|39]},weight:100}})}run(q,Z,j){const X=V.get(Z);if(!X)return;let Y;j&&typeof j=="object"&&j.auto===!0&&(Y=!0),X.triggerSuggest(void 0,Y)}}e.TriggerSuggestAction=U,U.id="editor.action.triggerSuggest",(0,i.registerEditorContribution)(V.ID,V),(0,i.registerEditorAction)(U);const H=100+90,K=i.EditorCommand.bindToContribution(V.get);(0,i.registerEditorCommand)(new K({id:"acceptSelectedSuggestion",precondition:E.Context.Visible,handler(G){G.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:d.ContextKeyExpr.and(E.Context.Visible,r.EditorContextKeys.textInputFocus),weight:H},{primary:3,kbExpr:d.ContextKeyExpr.and(E.Context.Visible,r.EditorContextKeys.textInputFocus,E.Context.AcceptSuggestionsOnEnter,E.Context.MakesTextEdit),weight:H}],menuOpts:[{menuId:E.suggestWidgetStatusbarMenu,title:h.localize(2,null),group:"left",order:1,when:E.Context.HasInsertAndReplaceRange.toNegated()},{menuId:E.suggestWidgetStatusbarMenu,title:h.localize(3,null),group:"left",order:1,when:d.ContextKeyExpr.and(E.Context.HasInsertAndReplaceRange,E.Context.InsertMode.isEqualTo("insert"))},{menuId:E.suggestWidgetStatusbarMenu,title:h.localize(4,null),group:"left",order:1,when:d.ContextKeyExpr.and(E.Context.HasInsertAndReplaceRange,E.Context.InsertMode.isEqualTo("replace"))}]})),(0,i.registerEditorCommand)(new K({id:"acceptAlternativeSelectedSuggestion",precondition:d.ContextKeyExpr.and(E.Context.Visible,r.EditorContextKeys.textInputFocus),kbOpts:{weight:H,kbExpr:r.EditorContextKeys.textInputFocus,primary:1024|3,secondary:[1024|2]},handler(G){G.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:E.suggestWidgetStatusbarMenu,group:"left",order:2,when:d.ContextKeyExpr.and(E.Context.HasInsertAndReplaceRange,E.Context.InsertMode.isEqualTo("insert")),title:h.localize(5,null)},{menuId:E.suggestWidgetStatusbarMenu,group:"left",order:2,when:d.ContextKeyExpr.and(E.Context.HasInsertAndReplaceRange,E.Context.InsertMode.isEqualTo("replace")),title:h.localize(6,null)}]})),g.CommandsRegistry.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),(0,i.registerEditorCommand)(new K({id:"hideSuggestWidget",precondition:E.Context.Visible,handler:G=>G.cancelSuggestWidget(),kbOpts:{weight:H,kbExpr:r.EditorContextKeys.textInputFocus,primary:9,secondary:[1024|9]}})),(0,i.registerEditorCommand)(new K({id:"selectNextSuggestion",precondition:d.ContextKeyExpr.and(E.Context.Visible,E.Context.MultipleSuggestions),handler:G=>G.selectNextSuggestion(),kbOpts:{weight:H,kbExpr:r.EditorContextKeys.textInputFocus,primary:18,secondary:[2048|18],mac:{primary:18,secondary:[2048|18,256|44]}}})),(0,i.registerEditorCommand)(new K({id:"selectNextPageSuggestion",precondition:d.ContextKeyExpr.and(E.Context.Visible,E.Context.MultipleSuggestions),handler:G=>G.selectNextPageSuggestion(),kbOpts:{weight:H,kbExpr:r.EditorContextKeys.textInputFocus,primary:12,secondary:[2048|12]}})),(0,i.registerEditorCommand)(new K({id:"selectLastSuggestion",precondition:d.ContextKeyExpr.and(E.Context.Visible,E.Context.MultipleSuggestions),handler:G=>G.selectLastSuggestion()})),(0,i.registerEditorCommand)(new K({id:"selectPrevSuggestion",precondition:d.ContextKeyExpr.and(E.Context.Visible,E.Context.MultipleSuggestions),handler:G=>G.selectPrevSuggestion(),kbOpts:{weight:H,kbExpr:r.EditorContextKeys.textInputFocus,primary:16,secondary:[2048|16],mac:{primary:16,secondary:[2048|16,256|46]}}})),(0,i.registerEditorCommand)(new K({id:"selectPrevPageSuggestion",precondition:d.ContextKeyExpr.and(E.Context.Visible,E.Context.MultipleSuggestions),handler:G=>G.selectPrevPageSuggestion(),kbOpts:{weight:H,kbExpr:r.EditorContextKeys.textInputFocus,primary:11,secondary:[2048|11]}})),(0,i.registerEditorCommand)(new K({id:"selectFirstSuggestion",precondition:d.ContextKeyExpr.and(E.Context.Visible,E.Context.MultipleSuggestions),handler:G=>G.selectFirstSuggestion()})),(0,i.registerEditorCommand)(new K({id:"toggleSuggestionDetails",precondition:E.Context.Visible,handler:G=>G.toggleSuggestionDetails(),kbOpts:{weight:H,kbExpr:r.EditorContextKeys.textInputFocus,primary:2048|10,secondary:[2048|39],mac:{primary:256|10,secondary:[2048|39]}},menuOpts:[{menuId:E.suggestWidgetStatusbarMenu,group:"right",order:1,when:d.ContextKeyExpr.and(E.Context.DetailsVisible,E.Context.CanResolve),title:h.localize(7,null)},{menuId:E.suggestWidgetStatusbarMenu,group:"right",order:1,when:d.ContextKeyExpr.and(E.Context.DetailsVisible.toNegated(),E.Context.CanResolve),title:h.localize(8,null)}]})),(0,i.registerEditorCommand)(new K({id:"toggleExplainMode",precondition:E.Context.Visible,handler:G=>G.toggleExplainMode(),kbOpts:{weight:100,primary:2048|85}})),(0,i.registerEditorCommand)(new K({id:"toggleSuggestionFocus",precondition:E.Context.Visible,handler:G=>G.toggleSuggestionFocus(),kbOpts:{weight:H,kbExpr:r.EditorContextKeys.textInputFocus,primary:2048|512|10,mac:{primary:256|512|10}}})),(0,i.registerEditorCommand)(new K({id:"insertBestCompletion",precondition:d.ContextKeyExpr.and(r.EditorContextKeys.textInputFocus,d.ContextKeyExpr.equals("config.editor.tabCompletion","on"),n.WordContextKey.AtEnd,E.Context.Visible.toNegated(),y.SuggestAlternatives.OtherSuggestions.toNegated(),p.SnippetController2.InSnippetMode.toNegated()),handler:(G,q)=>{G.triggerSuggestAndAcceptBest((0,o.isObject)(q)?{fallback:"tab",...q}:{fallback:"tab"})},kbOpts:{weight:H,primary:2}})),(0,i.registerEditorCommand)(new K({id:"insertNextSuggestion",precondition:d.ContextKeyExpr.and(r.EditorContextKeys.textInputFocus,d.ContextKeyExpr.equals("config.editor.tabCompletion","on"),y.SuggestAlternatives.OtherSuggestions,E.Context.Visible.toNegated(),p.SnippetController2.InSnippetMode.toNegated()),handler:G=>G.acceptNextSuggestion(),kbOpts:{weight:H,kbExpr:r.EditorContextKeys.textInputFocus,primary:2}})),(0,i.registerEditorCommand)(new K({id:"insertPrevSuggestion",precondition:d.ContextKeyExpr.and(r.EditorContextKeys.textInputFocus,d.ContextKeyExpr.equals("config.editor.tabCompletion","on"),y.SuggestAlternatives.OtherSuggestions,E.Context.Visible.toNegated(),p.SnippetController2.InSnippetMode.toNegated()),handler:G=>G.acceptPrevSuggestion(),kbOpts:{weight:H,kbExpr:r.EditorContextKeys.textInputFocus,primary:1024|2}})),(0,i.registerEditorAction)(class extends i.EditorAction{constructor(){super({id:"editor.action.resetSuggestSize",label:h.localize(9,null),alias:"Reset Suggest Widget Size",precondition:void 0})}run(G,q){V.get(q)?.resetWidgetSize()}})}),define(ne[2105],re([1,0,15,11,6,2,49,20,261,772,247,542]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.rangeStartsWith=e.SuggestWidgetInlineCompletionProvider=void 0;class o extends A.Disposable{constructor(l,r){super();this.editor=l,this.suggestControllerPreselector=r,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this.onDidChangeEmitter=new _.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.setInactiveDelayed=this._register(new f.RunOnceScheduler(()=>{this.isSuggestWidgetVisible||this._isActive&&(this._isActive=!1,this.onDidChangeEmitter.fire())},100)),this._register(l.onKeyDown(u=>{u.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(l.onKeyUp(u=>{u.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));const p=v.SuggestController.get(this.editor);if(p){this._register(p.registerSelector({priority:100,select:(n,h,g)=>{const d=this.editor.getModel(),m=(0,C.minimizeInlineCompletion)(d,this.suggestControllerPreselector());if(!m)return-1;const b=k.Position.lift(h),E=g.map((T,R)=>{const O=S(p,b,T,this.isShiftKeyPressed),x=(0,C.minimizeInlineCompletion)(d,O?.normalizedInlineCompletion);if(!x)return;const F=c(m.range,x.range)&&m.insertText.startsWith(x.insertText);return{index:R,valid:F,prefixLength:x.insertText.length,suggestItem:T}}).filter(T=>T&&T.valid),y=(0,t.findMaxBy)(E,(0,t.compareBy)(T=>T.prefixLength,t.numberComparator));return y?y.index:-1}}));let u=!1;const a=()=>{u||(u=!0,this._register(p.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(p.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.setInactiveDelayed.schedule(),this.update(this._isActive)})),this._register(p.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(_.Event.once(p.model.onDidTrigger)(n=>{a()}))}this.update(this._isActive)}get state(){if(!!this._isActive)return{selectedItem:this._currentSuggestItemInfo}}update(l){const r=this.getSuggestItemInfo();let p=!1;i(this._currentSuggestItemInfo,r)||(this._currentSuggestItemInfo=r,p=!0),this._isActive!==l&&(this._isActive=l,p=!0),p&&this.onDidChangeEmitter.fire()}getSuggestItemInfo(){const l=v.SuggestController.get(this.editor);if(!l||!this.isSuggestWidgetVisible)return;const r=l.widget.value.getFocusedItem();if(!!r)return S(l,this.editor.getPosition(),r.item,this.isShiftKeyPressed)}stopForceRenderingAbove(){const l=v.SuggestController.get(this.editor);l&&l.stopForceRenderingAbove()}forceRenderingAbove(){const l=v.SuggestController.get(this.editor);l&&l.forceRenderingAbove()}}e.SuggestWidgetInlineCompletionProvider=o;function c(s,l){return l.startLineNumber===s.startLineNumber&&l.startColumn===s.startColumn&&(l.endLineNumber<s.endLineNumber||l.endLineNumber===s.endLineNumber&&l.endColumn<=s.endColumn)}e.rangeStartsWith=c;function i(s,l){return s===l?!0:!s||!l?!1:s.completionItemKind===l.completionItemKind&&s.isSnippetText===l.isSnippetText&&(0,C.normalizedInlineCompletionsEquals)(s.normalizedInlineCompletion,l.normalizedInlineCompletion)}function S(s,l,r,p){if(Array.isArray(r.completion.additionalTextEdits)&&r.completion.additionalTextEdits.length>0)return{completionItemKind:r.completion.kind,isSnippetText:!1,normalizedInlineCompletion:{range:D.Range.fromPositions(l,l),insertText:"",filterText:"",snippetInfo:void 0,additionalTextEdits:[]}};let{insertText:u}=r.completion,a=!1;if(r.completion.insertTextRules&4){const h=new I.SnippetParser().parse(u),g=s.editor.getModel();if(h.children.length>100)return;w.SnippetSession.adjustWhitespace(g,l,h,!0,!0),u=h.toString(),a=!0}const n=s.getOverwriteInfo(r,p);return{isSnippetText:a,completionItemKind:r.completion.kind,normalizedInlineCompletion:{insertText:u,filterText:u,range:D.Range.fromPositions(l.delta(0,-n.overwriteBefore),l.delta(0,Math.max(n.overwriteAfter,0))),snippetInfo:void 0,additionalTextEdits:[]}}}}),define(ne[2106],re([1,0,11,22,2,86,62,462,773,542,2105]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestWidgetPreviewModel=void 0;let C=class extends D.BaseGhostTextWidgetModel{constructor(i,S,s){super(i);this.cache=S,this.languageFeaturesService=s,this.suggestionInlineCompletionSource=this._register(new v.SuggestWidgetInlineCompletionProvider(this.editor,()=>this.cache.value?.completions[0]?.toLiveInlineCompletion())),this.updateOperation=this._register(new _.MutableDisposable),this.updateCacheSoon=this._register(new t.RunOnceScheduler(()=>this.updateCache(),50)),this.minReservedLineCount=0,this._register(this.suggestionInlineCompletionSource.onDidChange(()=>{if(!this.editor.hasModel())return;this.updateCacheSoon.schedule(),this.suggestionInlineCompletionSource.state||(this.minReservedLineCount=0);const r=this.ghostText;r&&(this.minReservedLineCount=Math.max(this.minReservedLineCount,o(r.parts.map(p=>p.lines.length-1)))),this.minReservedLineCount>=1?this.suggestionInlineCompletionSource.forceRenderingAbove():this.suggestionInlineCompletionSource.stopForceRenderingAbove(),this.onDidChangeEmitter.fire()})),this._register(this.cache.onDidChange(()=>{this.onDidChangeEmitter.fire()})),this._register(this.editor.onDidChangeCursorPosition(l=>{this.minReservedLineCount=0,this.updateCacheSoon.schedule(),this.onDidChangeEmitter.fire()})),this._register((0,_.toDisposable)(()=>this.suggestionInlineCompletionSource.stopForceRenderingAbove()))}get isActive(){return this.suggestionInlineCompletionSource.state!==void 0}isSuggestionPreviewEnabled(){return this.editor.getOption(106).preview}async updateCache(){const i=this.suggestionInlineCompletionSource.state;if(!i||!i.selectedItem)return;const S={text:i.selectedItem.normalizedInlineCompletion.insertText,range:i.selectedItem.normalizedInlineCompletion.range,isSnippetText:i.selectedItem.isSnippetText,completionKind:i.selectedItem.completionItemKind},s=this.editor.getPosition(),l=(0,t.createCancelablePromise)(async p=>{let u;try{u=await(0,I.provideInlineCompletions)(this.languageFeaturesService.inlineCompletionsProvider,s,this.editor.getModel(),{triggerKind:A.InlineCompletionTriggerKind.Automatic,selectedSuggestionInfo:S},p)}catch(a){(0,f.onUnexpectedError)(a);return}if(p.isCancellationRequested){u.dispose();return}this.cache.setValue(this.editor,u,A.InlineCompletionTriggerKind.Automatic),this.onDidChangeEmitter.fire()}),r=new I.UpdateOperation(l,A.InlineCompletionTriggerKind.Automatic);this.updateOperation.value=r,await l,this.updateOperation.value===r&&this.updateOperation.clear()}get ghostText(){const i=this.isSuggestionPreviewEnabled(),S=this.editor.getModel(),s=(0,w.minimizeInlineCompletion)(S,this.cache.value?.completions[0]?.toLiveInlineCompletion()),l=this.suggestionInlineCompletionSource.state,r=(0,w.minimizeInlineCompletion)(S,l?.selectedItem?.normalizedInlineCompletion),p=s&&r&&s.insertText.startsWith(r.insertText)&&s.range.equalsRange(r.range);if(!i&&!p)return;const u=p?s:r||s,a=p?u.insertText.length-r.insertText.length:0;return this.toGhostText(u,a)}toGhostText(i,S){const s=this.editor.getOptions().get(106).previewMode;return i?(0,w.inlineCompletionToGhostText)(i,this.editor.getModel(),s,this.editor.getPosition(),S)||new D.GhostText(i.range.endLineNumber,[],this.minReservedLineCount):void 0}};C=Ee([W(2,k.ILanguageFeaturesService)],C),e.SuggestWidgetPreviewModel=C;function o(c){return c.reduce((i,S)=>i+S,0)}}),define(ne[2107],re([1,0,6,2,49,86,773,2106,541,5]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SharedInlineCompletionCache=e.GhostTextModel=e.DelegatingModel=void 0;class v extends f.Disposable{constructor(){super(...arguments);this.onDidChangeEmitter=new t.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.hasCachedGhostText=!1,this.currentModelRef=this._register(new f.MutableDisposable)}get targetModel(){return this.currentModelRef.value?.object}setTargetModel(i){this.currentModelRef.value?.object!==i&&(this.currentModelRef.clear(),this.currentModelRef.value=i?(0,I.createDisposableRef)(i,i.onDidChange(()=>{this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire()})):void 0,this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire())}get ghostText(){return this.hasCachedGhostText||(this.cachedGhostText=this.currentModelRef.value?.object?.ghostText,this.hasCachedGhostText=!0),this.cachedGhostText}setExpanded(i){this.targetModel?.setExpanded(i)}get expanded(){return this.targetModel?this.targetModel.expanded:!1}get minReservedLineCount(){return this.targetModel?this.targetModel.minReservedLineCount:0}}e.DelegatingModel=v;let C=class extends v{constructor(i,S){super();this.editor=i,this.instantiationService=S,this.sharedCache=this._register(new o),this.suggestWidgetAdapterModel=this._register(this.instantiationService.createInstance(D.SuggestWidgetPreviewModel,this.editor,this.sharedCache)),this.inlineCompletionsModel=this._register(this.instantiationService.createInstance(k.InlineCompletionsModel,this.editor,this.sharedCache)),this._register(this.suggestWidgetAdapterModel.onDidChange(()=>{this.updateModel()})),this.updateModel()}get activeInlineCompletionsModel(){if(this.targetModel===this.inlineCompletionsModel)return this.inlineCompletionsModel}updateModel(){this.setTargetModel(this.suggestWidgetAdapterModel.isActive?this.suggestWidgetAdapterModel:this.inlineCompletionsModel),this.inlineCompletionsModel.setActive(this.targetModel===this.inlineCompletionsModel)}shouldShowHoverAt(i){const S=this.activeInlineCompletionsModel?.ghostText;return S?S.parts.some(s=>i.containsPosition(new _.Position(S.lineNumber,s.column))):!1}triggerInlineCompletion(){this.activeInlineCompletionsModel?.trigger(A.InlineCompletionTriggerKind.Explicit)}commitInlineCompletion(){this.activeInlineCompletionsModel?.commitCurrentSuggestion()}hideInlineCompletion(){this.activeInlineCompletionsModel?.hide()}showNextInlineCompletion(){this.activeInlineCompletionsModel?.showNext()}showPreviousInlineCompletion(){this.activeInlineCompletionsModel?.showPrevious()}async hasMultipleInlineCompletions(){const i=await this.activeInlineCompletionsModel?.hasMultipleInlineCompletions();return i!==void 0?i:!1}};C=Ee([W(1,w.IInstantiationService)],C),e.GhostTextModel=C;class o extends f.Disposable{constructor(){super(...arguments);this.onDidChangeEmitter=new t.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.cache=this._register(new f.MutableDisposable)}get value(){return this.cache.value}setValue(i,S,s){this.cache.value=new k.SynchronizedInlineCompletionsCache(S,i,()=>this.onDidChangeEmitter.fire(),s)}clearAndLeak(){return this.cache.clearAndLeak()}clear(){this.cache.clear()}}e.SharedInlineCompletionCache=o}),define(ne[564],re([1,0,6,2,29,39,243,58,2107,2026,1287,7,5]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TriggerInlineSuggestionAction=e.ShowPreviousInlineSuggestionAction=e.ShowNextInlineSuggestionAction=e.ActiveGhostTextController=e.GhostTextController=void 0;let c=class vo extends f.Disposable{constructor(u,a){super();this.editor=u,this.instantiationService=a,this.triggeredExplicitly=!1,this.activeController=this._register(new f.MutableDisposable),this.activeModelDidChangeEmitter=this._register(new t.Emitter),this.onActiveModelDidChange=this.activeModelDidChangeEmitter.event,this._register(this.editor.onDidChangeModel(()=>{this.updateModelController()})),this._register(this.editor.onDidChangeConfiguration(n=>{n.hasChanged(106)&&this.updateModelController(),n.hasChanged(55)&&this.updateModelController()})),this.updateModelController()}static get(u){return u.getContribution(vo.ID)}get activeModel(){return this.activeController.value?.model}updateModelController(){const u=this.editor.getOption(106),a=this.editor.getOption(55);this.activeController.value=void 0,this.activeController.value=this.editor.hasModel()&&(u.preview||a.enabled||this.triggeredExplicitly)?this.instantiationService.createInstance(S,this.editor):void 0,this.activeModelDidChangeEmitter.fire()}shouldShowHoverAt(u){return this.activeModel?.shouldShowHoverAt(u)||!1}shouldShowHoverAtViewZone(u){return this.activeController.value?.widget?.shouldShowHoverAtViewZone(u)||!1}trigger(){this.triggeredExplicitly=!0,this.activeController.value||this.updateModelController(),this.activeModel?.triggerInlineCompletion()}commit(){this.activeModel?.commitInlineCompletion()}hide(){this.activeModel?.hideInlineCompletion()}showNextInlineCompletion(){this.activeModel?.showNextInlineCompletion()}showPreviousInlineCompletion(){this.activeModel?.showPreviousInlineCompletion()}async hasMultipleInlineCompletions(){const u=await this.activeModel?.hasMultipleInlineCompletions();return u!==void 0?u:!1}};c.inlineSuggestionVisible=new C.RawContextKey("inlineSuggestionVisible",!1,v.localize(0,null)),c.inlineSuggestionHasIndentation=new C.RawContextKey("inlineSuggestionHasIndentation",!1,v.localize(1,null)),c.inlineSuggestionHasIndentationLessThanTabSize=new C.RawContextKey("inlineSuggestionHasIndentationLessThanTabSize",!0,v.localize(2,null)),c.ID="editor.contrib.ghostTextController",c=Ee([W(1,o.IInstantiationService)],c),e.GhostTextController=c;class i{constructor(u){this.contextKeyService=u,this.inlineCompletionVisible=c.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=c.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=c.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService)}}let S=class extends f.Disposable{constructor(u,a,n){super();this.editor=u,this.instantiationService=a,this.contextKeyService=n,this.contextKeys=new i(this.contextKeyService),this.model=this._register(this.instantiationService.createInstance(I.GhostTextModel,this.editor)),this.widget=this._register(this.instantiationService.createInstance(w.GhostTextWidget,this.editor,this.model)),this._register((0,f.toDisposable)(()=>{this.contextKeys.inlineCompletionVisible.set(!1),this.contextKeys.inlineCompletionSuggestsIndentation.set(!1),this.contextKeys.inlineCompletionSuggestsIndentationLessThanTabSize.set(!0)})),this._register(this.model.onDidChange(()=>{this.updateContextKeys()})),this.updateContextKeys()}updateContextKeys(){this.contextKeys.inlineCompletionVisible.set(this.model.activeInlineCompletionsModel?.ghostText!==void 0);let u=!1,a=!0;const n=this.model.inlineCompletionsModel.ghostText;if(!!this.model.activeInlineCompletionsModel&&n&&n.parts.length>0){const{column:h,lines:g}=n.parts[0],d=g[0],m=this.editor.getModel().getLineIndentColumn(n.lineNumber);if(h<=m){let E=(0,_.firstNonWhitespaceIndex)(d);E===-1&&(E=d.length-1),u=E>0;const y=this.editor.getModel().getOptions().tabSize;a=k.CursorColumns.visibleColumnFromColumn(d,E+1,y)<y}}this.contextKeys.inlineCompletionSuggestsIndentation.set(u),this.contextKeys.inlineCompletionSuggestsIndentationLessThanTabSize.set(a)}};S=Ee([W(1,o.IInstantiationService),W(2,C.IContextKeyService)],S),e.ActiveGhostTextController=S;class s extends A.EditorAction{constructor(){super({id:s.ID,label:v.localize(3,null),alias:"Show Next Inline Suggestion",precondition:C.ContextKeyExpr.and(D.EditorContextKeys.writable,c.inlineSuggestionVisible),kbOpts:{weight:100,primary:512|89}})}async run(u,a){const n=c.get(a);n&&(n.showNextInlineCompletion(),a.focus())}}e.ShowNextInlineSuggestionAction=s,s.ID="editor.action.inlineSuggest.showNext";class l extends A.EditorAction{constructor(){super({id:l.ID,label:v.localize(4,null),alias:"Show Previous Inline Suggestion",precondition:C.ContextKeyExpr.and(D.EditorContextKeys.writable,c.inlineSuggestionVisible),kbOpts:{weight:100,primary:512|87}})}async run(u,a){const n=c.get(a);n&&(n.showPreviousInlineCompletion(),a.focus())}}e.ShowPreviousInlineSuggestionAction=l,l.ID="editor.action.inlineSuggest.showPrevious";class r extends A.EditorAction{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:v.localize(5,null),alias:"Trigger Inline Suggestion",precondition:D.EditorContextKeys.writable})}async run(u,a){const n=c.get(a);n&&n.trigger()}}e.TriggerInlineSuggestionAction=r}),define(ne[2108],re([1,0,10,117,2,186,20,42,286,564,1288,98,16,28,7,41,540]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionsHoverParticipant=e.InlineCompletionsHover=void 0;class l{constructor(u,a,n){this.owner=u,this.range=a,this.controller=n}isValidForHoverAnchor(u){return u.type===1&&this.range.startColumn<=u.range.startColumn&&this.range.endColumn>=u.range.endColumn}hasMultipleSuggestions(){return this.controller.hasMultipleInlineCompletions()}}e.InlineCompletionsHover=l;let r=class{constructor(u,a,n,h,g,d,m){this._editor=u,this._commandService=a,this._menuService=n,this._contextKeyService=h,this._languageService=g,this._openerService=d,this.accessibilityService=m,this.hoverOrdinal=3}suggestHoverAnchor(u){const a=w.GhostTextController.get(this._editor);if(!a)return null;const n=u.target;if(n.type===8){const h=n.detail;if(a.shouldShowHoverAtViewZone(h.viewZoneId))return new I.HoverForeignElementAnchor(1e3,this,k.Range.fromPositions(h.positionBefore||h.position,h.positionBefore||h.position))}return n.type===7&&a.shouldShowHoverAt(n.range)?new I.HoverForeignElementAnchor(1e3,this,n.range):n.type===6&&n.detail.mightBeForeignElement&&a.shouldShowHoverAt(n.range)?new I.HoverForeignElementAnchor(1e3,this,n.range):null}computeSync(u,a){const n=w.GhostTextController.get(this._editor);return n&&n.shouldShowHoverAt(u.range)?[new l(this,u.range,n)]:[]}renderHoverParts(u,a){const n=new _.DisposableStore,h=a[0];this.accessibilityService.isScreenReaderOptimized()&&this.renderScreenReaderText(u,h,n);const g=n.add(this._menuService.createMenu(o.MenuId.InlineCompletionsActions,this._contextKeyService)),d=u.statusBar.addAction({label:v.localize(0,null),commandId:w.ShowNextInlineSuggestionAction.ID,run:()=>this._commandService.executeCommand(w.ShowNextInlineSuggestionAction.ID)}),m=u.statusBar.addAction({label:v.localize(1,null),commandId:w.ShowPreviousInlineSuggestionAction.ID,run:()=>this._commandService.executeCommand(w.ShowPreviousInlineSuggestionAction.ID)});u.statusBar.addAction({label:v.localize(2,null),commandId:s.inlineSuggestCommitId,run:()=>this._commandService.executeCommand(s.inlineSuggestCommitId)});const b=[d,m];for(const E of b)E.setEnabled(!1);h.hasMultipleSuggestions().then(E=>{for(const y of b)y.setEnabled(E)});for(const[E,y]of g.getActions())for(const T of y)T instanceof o.MenuItemAction&&u.statusBar.addAction({label:T.label,commandId:T.item.id,run:()=>this._commandService.executeCommand(T.item.id)});return n}renderScreenReaderText(u,a,n){const h=t.$,g=h("div.hover-row.markdown-hover"),d=t.append(g,h("div.hover-contents")),m=n.add(new A.MarkdownRenderer({editor:this._editor},this._languageService,this._openerService)),b=y=>{n.add(m.onDidRenderAsync(()=>{d.className="hover-contents code-hover-contents",u.onContentsChanged()}));const T=v.localize(3,null),R=n.add(m.render(new f.MarkdownString().appendText(T).appendCodeblock("text",y)));d.replaceChildren(R.element)},E=a.controller.activeModel?.inlineCompletionsModel?.ghostText;if(E){const y=this._editor.getModel().getLineContent(E.lineNumber);b(E.renderForScreenReader(y))}u.fragment.appendChild(g)}};r=Ee([W(1,c.ICommandService),W(2,o.IMenuService),W(3,i.IContextKeyService),W(4,D.ILanguageService),W(5,S.IOpenerService),W(6,C.IAccessibilityService)],r),e.InlineCompletionsHoverParticipant=r}),define(ne[2109],re([1,0,39,58,286,540,564,2108,7,94]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.commitInlineSuggestionAction=void 0,(0,t.registerEditorContribution)(k.GhostTextController.ID,k.GhostTextController),(0,t.registerEditorAction)(k.TriggerInlineSuggestionAction),(0,t.registerEditorAction)(k.ShowNextInlineSuggestionAction),(0,t.registerEditorAction)(k.ShowPreviousInlineSuggestionAction),_.HoverParticipantRegistry.register(D.InlineCompletionsHoverParticipant);const v=t.EditorCommand.bindToContribution(k.GhostTextController.get);e.commitInlineSuggestionAction=new v({id:A.inlineSuggestCommitId,precondition:k.GhostTextController.inlineSuggestionVisible,handler(C){C.commit(),C.editor.focus()}}),(0,t.registerEditorCommand)(e.commitInlineSuggestionAction),w.KeybindingsRegistry.registerKeybindingRule({primary:2,weight:200,id:e.commitInlineSuggestionAction.id,when:I.ContextKeyExpr.and(e.commitInlineSuggestionAction.precondition,f.EditorContextKeys.tabMovesFocus.toNegated(),k.GhostTextController.inlineSuggestionHasIndentationLessThanTabSize)}),(0,t.registerEditorCommand)(new v({id:"editor.action.inlineSuggest.hide",precondition:k.GhostTextController.inlineSuggestionVisible,kbOpts:{weight:100,primary:9},handler(C){C.hide()}}))}),define(ne[114],re([1,0,1351,5]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWorkspaceTrustRequestService=e.WorkspaceTrustUriResponse=e.IWorkspaceTrustManagementService=e.IWorkspaceTrustEnablementService=e.workspaceTrustToString=e.WorkspaceTrustScope=void 0;var _;(function(D){D[D.Local=0]="Local",D[D.Remote=1]="Remote"})(_=e.WorkspaceTrustScope||(e.WorkspaceTrustScope={}));function A(D){return D?(0,t.localize)(0,null):(0,t.localize)(1,null)}e.workspaceTrustToString=A,e.IWorkspaceTrustEnablementService=(0,f.createDecorator)("workspaceTrustEnablementService"),e.IWorkspaceTrustManagementService=(0,f.createDecorator)("workspaceTrustManagementService");var k;(function(D){D[D.Open=1]="Open",D[D.OpenInNewWindow=2]="OpenInNewWindow",D[D.Cancel=3]="Cancel"})(k=e.WorkspaceTrustUriResponse||(e.WorkspaceTrustUriResponse={})),e.IWorkspaceTrustRequestService=(0,f.createDecorator)("workspaceTrustRequestService")}),define(ne[2110],re([1,0,11,33,2,14,29,39,123,93,697,184,42,720,286,557,2059,1314,8,5,41,53,63,114,1042]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowExcludeOptions=e.DisableHighlightingOfNonBasicAsciiCharactersAction=e.DisableHighlightingOfInvisibleCharactersAction=e.DisableHighlightingOfAmbiguousCharactersAction=e.DisableHighlightingInStringsAction=e.DisableHighlightingInCommentsAction=e.UnicodeHighlighterHoverParticipant=e.UnicodeHighlighterHover=e.UnicodeHighlighter=e.warningIcon=void 0,e.warningIcon=(0,n.registerIcon)("extensions-warning-message",f.Codicon.warning,l.localize(0,null));let g=class extends _.Disposable{constructor(G,q,Z,j){super();this._editor=G,this._editorWorkerService=q,this._workspaceTrustService=Z,this._highlighter=null,this._bannerClosed=!1,this._updateState=X=>{if(X&&X.hasMore){if(this._bannerClosed)return;const Y=Math.max(X.ambiguousCharacterCount,X.nonBasicAsciiCharacterCount,X.invisibleCharacterCount);let $;if(X.nonBasicAsciiCharacterCount>=Y)$={message:l.localize(1,null),command:new P};else if(X.ambiguousCharacterCount>=Y)$={message:l.localize(2,null),command:new N};else if(X.invisibleCharacterCount>=Y)$={message:l.localize(3,null),command:new B};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:$.message,icon:e.warningIcon,actions:[{label:$.command.shortLabel,href:`command:${$.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(j.createInstance(s.BannerController,G)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=G.getOption(113),this._register(Z.onDidChangeTrust(X=>{this._updateHighlighter()})),this._register(G.onDidChangeConfiguration(X=>{X.hasChanged(113)&&(this._options=G.getOption(113),this._updateHighlighter())})),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;const G=d(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([G.nonBasicASCII,G.ambiguousCharacters,G.invisibleCharacters].every(Z=>Z===!1))return;const q={nonBasicASCII:G.nonBasicASCII,ambiguousCharacters:G.ambiguousCharacters,invisibleCharacters:G.invisibleCharacters,includeComments:G.includeComments,includeStrings:G.includeStrings,allowedCodePoints:Object.keys(G.allowedCharacters).map(Z=>Z.codePointAt(0)),allowedLocales:Object.keys(G.allowedLocales).map(Z=>Z==="_os"?new Intl.NumberFormat().resolvedOptions().locale:Z==="_vscode"?A.language:Z)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new m(this._editor,q,this._updateState,this._editorWorkerService):this._highlighter=new b(this._editor,q,this._updateState)}getDecorationInfo(G){return this._highlighter?this._highlighter.getDecorationInfo(G):null}};g.ID="editor.contrib.unicodeHighlighter",g=Ee([W(1,C.IEditorWorkerService),W(2,h.IWorkspaceTrustManagementService),W(3,p.IInstantiationService)],g),e.UnicodeHighlighter=g;function d(K,G){return{nonBasicASCII:G.nonBasicASCII===I.inUntrustedWorkspace?!K:G.nonBasicASCII,ambiguousCharacters:G.ambiguousCharacters,invisibleCharacters:G.invisibleCharacters,includeComments:G.includeComments===I.inUntrustedWorkspace?!K:G.includeComments,includeStrings:G.includeStrings===I.inUntrustedWorkspace?!K:G.includeStrings,allowedCharacters:G.allowedCharacters,allowedLocales:G.allowedLocales}}let m=class extends _.Disposable{constructor(G,q,Z,j){super();this._editor=G,this._options=q,this._updateState=Z,this._editorWorkerService=j,this._model=this._editor.getModel(),this._decorationIds=new Set,this._updateSoon=this._register(new t.RunOnceScheduler(()=>this._update(),250)),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorationIds=new Set(this._model.deltaDecorations(Array.from(this._decorationIds),[])),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorationIds=new Set(this._editor.deltaDecorations(Array.from(this._decorationIds),[]));return}const G=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(q=>{if(this._model.isDisposed()||this._model.getVersionId()!==G)return;this._updateState(q);const Z=[];if(!q.hasMore)for(const j of q.ranges)Z.push({range:j,options:F.instance.getDecorationFromOptions(this._options)});this._decorationIds=new Set(this._editor.deltaDecorations(Array.from(this._decorationIds),Z))})}getDecorationInfo(G){if(!this._decorationIds.has(G))return null;const q=this._editor.getModel(),Z=q.getDecorationRange(G),j={range:Z,options:F.instance.getDecorationFromOptions(this._options),id:G,ownerId:0};if(!(0,c.isModelDecorationVisible)(q,j))return null;const X=q.getValueInRange(Z);return{reason:x(X,this._options),inComment:(0,c.isModelDecorationInComment)(q,j),inString:(0,c.isModelDecorationInString)(q,j)}}};m=Ee([W(3,C.IEditorWorkerService)],m);class b extends _.Disposable{constructor(G,q,Z){super();this._editor=G,this._options=q,this._updateState=Z,this._model=this._editor.getModel(),this._decorationIds=new Set,this._updateSoon=this._register(new t.RunOnceScheduler(()=>this._update(),250)),this._register(this._editor.onDidLayoutChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidScrollChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeHiddenAreas(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorationIds=new Set(this._model.deltaDecorations(Array.from(this._decorationIds),[])),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorationIds=new Set(this._editor.deltaDecorations(Array.from(this._decorationIds),[]));return}const G=this._editor.getVisibleRanges(),q=[],Z={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const j of G){const X=v.UnicodeTextModelHighlighter.computeUnicodeHighlights(this._model,this._options,j);for(const Y of X.ranges)Z.ranges.push(Y);Z.ambiguousCharacterCount+=Z.ambiguousCharacterCount,Z.invisibleCharacterCount+=Z.invisibleCharacterCount,Z.nonBasicAsciiCharacterCount+=Z.nonBasicAsciiCharacterCount,Z.hasMore=Z.hasMore||X.hasMore}if(!Z.hasMore)for(const j of Z.ranges)q.push({range:j,options:F.instance.getDecorationFromOptions(this._options)});this._updateState(Z),this._decorationIds=new Set(this._editor.deltaDecorations(Array.from(this._decorationIds),q))}getDecorationInfo(G){if(!this._decorationIds.has(G))return null;const q=this._editor.getModel(),Z=q.getDecorationRange(G),j=q.getValueInRange(Z),X={range:Z,options:F.instance.getDecorationFromOptions(this._options),id:G,ownerId:0};return(0,c.isModelDecorationVisible)(q,X)?{reason:x(j,this._options),inComment:(0,c.isModelDecorationInComment)(q,X),inString:(0,c.isModelDecorationInString)(q,X)}:null}}class E{constructor(G,q,Z){this.owner=G,this.range=q,this.decoration=Z}isValidForHoverAnchor(G){return G.type===1&&this.range.startColumn<=G.range.startColumn&&this.range.endColumn>=G.range.endColumn}}e.UnicodeHighlighterHover=E;let y=class{constructor(G,q,Z){this._editor=G,this._languageService=q,this._openerService=Z,this.hoverOrdinal=4}computeSync(G,q){if(!this._editor.hasModel()||G.type!==1)return[];const Z=this._editor.getModel(),j=this._editor.getContribution(g.ID);if(!j)return[];const X=[];let Y=300;for(const $ of q){const J=j.getDecorationInfo($.id);if(!J)continue;const te=Z.getValueInRange($.range).codePointAt(0),se=R(te);let ie;switch(J.reason.kind){case 0:ie=l.localize(4,null,se,R(J.reason.confusableWith.codePointAt(0)));break;case 1:ie=l.localize(5,null,se);break;case 2:ie=l.localize(6,null,se);break}const ce={codePoint:te,reason:J.reason,inComment:J.inComment,inString:J.inString},le=l.localize(7,null),ae=[{value:`${ie} [${le}](command:${V.ID}?${encodeURIComponent(JSON.stringify(ce))})`,isTrusted:!0}];X.push(new S.MarkdownHover(this,$.range,ae,Y++))}return X}renderHoverParts(G,q){return(0,S.renderMarkdownHovers)(G,q,this._editor,this._languageService,this._openerService)}};y=Ee([W(1,o.ILanguageService),W(2,u.IOpenerService)],y),e.UnicodeHighlighterHoverParticipant=y;function T(K){return`U+${K.toString(16).padStart(4,"0")}`}function R(K){let G=`\`${T(K)}\``;return k.InvisibleCharacters.isInvisibleCharacter(K)||(G+=` "${`${O(K)}`}"`),G}function O(K){return K===96?"`` ` ``":"`"+String.fromCodePoint(K)+"`"}function x(K,G){return v.UnicodeTextModelHighlighter.computeUnicodeHighlightReason(K,G)}class F{constructor(){this.map=new Map}getDecorationFromOptions(G){return this.getDecoration(!G.includeComments,!G.includeStrings)}getDecoration(G,q){const Z=`${G}${q}`;let j=this.map.get(Z);return j||(j=w.ModelDecorationOptions.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:G,hideInStringTokens:q}),this.map.set(Z,j)),j}}F.instance=new F;class L extends D.EditorAction{constructor(){super({id:N.ID,label:l.localize(9,null),alias:"Disable highlighting of characters in comments",precondition:void 0});this.shortLabel=l.localize(8,null)}async run(G,q,Z){let j=G?.get(r.IConfigurationService);j&&this.runAction(j)}async runAction(G){await G.updateValue(I.unicodeHighlightConfigKeys.includeComments,!1,1)}}e.DisableHighlightingInCommentsAction=L,L.ID="editor.action.unicodeHighlight.disableHighlightingInComments";class M extends D.EditorAction{constructor(){super({id:N.ID,label:l.localize(11,null),alias:"Disable highlighting of characters in strings",precondition:void 0});this.shortLabel=l.localize(10,null)}async run(G,q,Z){let j=G?.get(r.IConfigurationService);j&&this.runAction(j)}async runAction(G){await G.updateValue(I.unicodeHighlightConfigKeys.includeStrings,!1,1)}}e.DisableHighlightingInStringsAction=M,M.ID="editor.action.unicodeHighlight.disableHighlightingInStrings";class N extends D.EditorAction{constructor(){super({id:N.ID,label:l.localize(13,null),alias:"Disable highlighting of ambiguous characters",precondition:void 0});this.shortLabel=l.localize(12,null)}async run(G,q,Z){let j=G?.get(r.IConfigurationService);j&&this.runAction(j)}async runAction(G){await G.updateValue(I.unicodeHighlightConfigKeys.ambiguousCharacters,!1,1)}}e.DisableHighlightingOfAmbiguousCharactersAction=N,N.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";class B extends D.EditorAction{constructor(){super({id:B.ID,label:l.localize(15,null),alias:"Disable highlighting of invisible characters",precondition:void 0});this.shortLabel=l.localize(14,null)}async run(G,q,Z){let j=G?.get(r.IConfigurationService);j&&this.runAction(j)}async runAction(G){await G.updateValue(I.unicodeHighlightConfigKeys.invisibleCharacters,!1,1)}}e.DisableHighlightingOfInvisibleCharactersAction=B,B.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";class P extends D.EditorAction{constructor(){super({id:P.ID,label:l.localize(17,null),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0});this.shortLabel=l.localize(16,null)}async run(G,q,Z){let j=G?.get(r.IConfigurationService);j&&this.runAction(j)}async runAction(G){await G.updateValue(I.unicodeHighlightConfigKeys.nonBasicASCII,!1,1)}}e.DisableHighlightingOfNonBasicAsciiCharactersAction=P,P.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";class V extends D.EditorAction{constructor(){super({id:V.ID,label:l.localize(18,null),alias:"Show Exclude Options",precondition:void 0})}async run(G,q,Z){const{codePoint:j,reason:X,inString:Y,inComment:$}=Z,J=String.fromCodePoint(j),ee=G.get(a.IQuickInputService),te=G.get(r.IConfigurationService);function se(le){return k.InvisibleCharacters.isInvisibleCharacter(le)?l.localize(19,null,T(le)):l.localize(20,null,`${T(le)} "${J}"`)}const ie=[];if(X.kind===0)for(const le of X.notAmbiguousInLocales)ie.push({label:l.localize(21,null,le),run:async()=>{U(te,[le])}});if(ie.push({label:se(j),run:()=>z(te,[j])}),$){const le=new L;ie.push({label:le.label,run:async()=>le.runAction(te)})}else if(Y){const le=new M;ie.push({label:le.label,run:async()=>le.runAction(te)})}if(X.kind===0){const le=new N;ie.push({label:le.label,run:async()=>le.runAction(te)})}else if(X.kind===1){const le=new B;ie.push({label:le.label,run:async()=>le.runAction(te)})}else if(X.kind===2){const le=new P;ie.push({label:le.label,run:async()=>le.runAction(te)})}else H(X);const ce=await ee.pick(ie,{title:l.localize(22,null)});ce&&await ce.run()}}e.ShowExcludeOptions=V,V.ID="editor.action.unicodeHighlight.showExcludeOptions";async function z(K,G){const q=K.getValue(I.unicodeHighlightConfigKeys.allowedCharacters);let Z;typeof q=="object"&&q?Z=q:Z={};for(const j of G)Z[String.fromCodePoint(j)]=!0;await K.updateValue(I.unicodeHighlightConfigKeys.allowedCharacters,Z,1)}async function U(K,G){const q=K.inspect(I.unicodeHighlightConfigKeys.allowedLocales).user?.value;let Z;typeof q=="object"&&q?Z=Object.assign({},q):Z={};for(const j of G)Z[j]=!0;await K.updateValue(I.unicodeHighlightConfigKeys.allowedLocales,Z,1)}function H(K){throw new Error(`Unexpected value: ${K}`)}(0,D.registerEditorAction)(N),(0,D.registerEditorAction)(B),(0,D.registerEditorAction)(P),(0,D.registerEditorAction)(V),(0,D.registerEditorContribution)(g.ID,g),i.HoverParticipantRegistry.register(y)}),define(ne[2111],re([1,0,312,165,351,684,2032,2064,2033,2034,470,2045,2066,2080,2035,313,2036,2068,405,761,2040,2041,1969,2109,562,764,560,406,754,2083,2072,2043,755,2073,762,763,2057,2046,2047,173,247,2048,2049,756,2110,757,2075,2076,758,2050,1251,520]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),define(ne[189],re([1,0,157,118,302,111,18,48,14,19,9,5,246,34]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toStoreData=e.restoreRecentlyOpened=e.useSlashForPath=e.rewriteWorkspaceFileForNewLocation=e.toWorkspaceFolders=e.getStoredWorkspaceFolder=e.isStoredWorkspaceFolder=e.isRecentFile=e.isRecentFolder=e.isRecentWorkspace=e.IWorkspacesService=void 0,e.IWorkspacesService=(0,C.createDecorator)("workspacesService");function i(T){return T.hasOwnProperty("workspace")}e.isRecentWorkspace=i;function S(T){return T.hasOwnProperty("folderUri")}e.isRecentFolder=S;function s(T){return T.hasOwnProperty("fileUri")}e.isRecentFile=s;function l(T){return r(T)||p(T)}e.isStoredWorkspaceFolder=l;function r(T){const R=T;return typeof R?.path=="string"&&(!R.name||typeof R.name=="string")}function p(T){const R=T;return typeof R?.uri=="string"&&(!R.name||typeof R.name=="string")}function u(T,R,O,x,F=!I.isWindows,L){if(T.scheme!==x.scheme)return{name:O,uri:T.toString(!0)};let M=R?void 0:L.relativePath(x,T);if(M!==void 0)M.length===0?M=".":I.isWindows&&T.scheme===k.Schemas.file&&!F&&(M=M.replace(/\//g,"\\"));else if(T.scheme===k.Schemas.file)M=T.fsPath,I.isWindows&&(M=(0,A.normalizeDriveLetter)(M),F&&(M=(0,t.toSlashes)(M)));else{if(!L.isEqualAuthority(T.authority,x.authority))return{name:O,uri:T.toString(!0)};M=T.path}return{name:O,path:M}}e.getStoredWorkspaceFolder=u;function a(T,R,O){let x=[],F=new Set;const L=O.dirname(R);for(let M of T){let N;if(r(M))M.path&&(N=O.resolvePath(L,M.path));else if(p(M))try{N=v.URI.parse(M.uri),N.path[0]!=="/"&&(N=N.with({path:"/"+N.path}))}catch(B){console.warn(B)}if(N){let B=O.getComparisonKey(N);if(!F.has(B)){F.add(B);const P=M.name||O.basenameOrAuthority(N);x.push(new c.WorkspaceFolder({uri:N,name:P,index:x.length},M))}}}return x}e.toWorkspaceFolders=a;function n(T,R,O,x,F){let L=h(R,T);const M=F.dirname(R),N=F.dirname(x),B=[],P=g(L.folders);for(const H of L.folders){const K=r(H)?F.resolvePath(M,H.path):v.URI.parse(H.uri);let G;O?G=!1:G=!r(H)||(0,D.isAbsolute)(H.path),B.push(u(K,G,H.name,N,P,F))}const V={insertSpaces:!1,tabSize:4,eol:I.isLinux||I.isMacintosh?` `:`\r `},z=_.setProperty(T,["folders"],B,V);let U=_.applyEdits(T,z);return(0,w.isEqualAuthority)(L.remoteAuthority,(0,o.getRemoteAuthority)(x))&&(U=_.applyEdits(U,_.removeProperty(U,["remoteAuthority"],V))),U}e.rewriteWorkspaceFileForNewLocation=n;function h(T,R){let O=f.parse(R);if(O&&Array.isArray(O.folders))O.folders=O.folders.filter(x=>l(x));else throw new Error(`${T} looks like an invalid workspace file.`);return O}function g(T){return I.isWindows?T.some(R=>r(R)&&R.path.indexOf("/")>=0):!0}e.useSlashForPath=g;function d(T){return T.workspace&&typeof T.workspace=="object"&&typeof T.workspace.id=="string"&&typeof T.workspace.configPath=="string"}function m(T){return typeof T.folderUri=="string"}function b(T){return typeof T.fileUri=="string"}function E(T,R){const O={workspaces:[],files:[]};if(T){const x=function(L,M){for(let N=0;N<L.length;N++)try{M(L[N],N)}catch(B){R.warn(`Error restoring recent entry ${JSON.stringify(L[N])}: ${B.toString()}. Skip entry.`)}},F=T;if(Array.isArray(F.entries))x(F.entries,L=>{const M=L.label,N=L.remoteAuthority;d(L)?O.workspaces.push({label:M,remoteAuthority:N,workspace:{id:L.workspace.id,configPath:v.URI.parse(L.workspace.configPath)}}):m(L)?O.workspaces.push({label:M,remoteAuthority:N,folderUri:v.URI.parse(L.folderUri)}):b(L)&&O.files.push({label:M,remoteAuthority:N,fileUri:v.URI.parse(L.fileUri)})});else{const L=T;Array.isArray(L.workspaces3)&&x(L.workspaces3,(M,N)=>{const B=Array.isArray(L.workspaceLabels)&&L.workspaceLabels[N]||void 0;typeof M=="object"&&typeof M.id=="string"&&typeof M.configURIPath=="string"?O.workspaces.push({label:B,workspace:{id:M.id,configPath:v.URI.parse(M.configURIPath)}}):typeof M=="string"&&O.workspaces.push({label:B,folderUri:v.URI.parse(M)})}),Array.isArray(L.files2)&&x(L.files2,(M,N)=>{const B=Array.isArray(L.fileLabels)&&L.fileLabels[N]||void 0;typeof M=="string"&&O.files.push({label:B,fileUri:v.URI.parse(M)})})}}return O}e.restoreRecentlyOpened=E;function y(T){const R={entries:[]};for(const O of T.workspaces)S(O)?R.entries.push({folderUri:O.folderUri.toString(),label:O.label,remoteAuthority:O.remoteAuthority}):R.entries.push({workspace:{id:O.workspace.id,configPath:O.workspace.configPath.toString()},label:O.label,remoteAuthority:O.remoteAuthority});for(const O of T.files)R.entries.push({fileUri:O.fileUri.toString(),label:O.label,remoteAuthority:O.remoteAuthority});return R}e.toStoreData=y}),define(ne[2112],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostRpcService=e.IExtHostRpcService=void 0,e.IExtHostRpcService=(0,t.createDecorator)("IExtHostRpcService");class f{constructor(A){this.getProxy=A.getProxy.bind(A),this.set=A.set.bind(A),this.assertRegistered=A.assertRegistered.bind(A),this.drain=A.drain.bind(A)}}e.ExtHostRpcService=f}),define(ne[2113],re([1,0,5,212,6,2112]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostTunnelService=e.IExtHostTunnelService=e.TunnelDtoConverter=void 0;var k;(function(I){function w(C){return{remoteAddress:C.remoteAddress,localAddress:C.localAddress,public:!!C.public,privacy:C.privacy??(C.public?f.TunnelPrivacyId.Public:f.TunnelPrivacyId.Private),protocol:C.protocol}}I.fromApiTunnel=w;function v(C){return{remoteAddress:{host:C.tunnelRemoteHost,port:C.tunnelRemotePort},localAddress:C.localAddress,public:C.privacy!==f.TunnelPrivacyId.ConstantPrivate&&C.privacy!==f.TunnelPrivacyId.ConstantPrivate,privacy:C.privacy,protocol:C.protocol}}I.fromServiceTunnel=v})(k=e.TunnelDtoConverter||(e.TunnelDtoConverter={})),e.IExtHostTunnelService=(0,t.createDecorator)("IExtHostTunnelService");let D=class{constructor(w){this.onDidChangeTunnels=new _.Emitter().event}async $applyCandidateFilter(w){return w}async openTunnel(w,v){}async getTunnels(){return[]}async setTunnelFactory(w){return{dispose:()=>{}}}registerPortsAttributesProvider(w,v){return{dispose:()=>{}}}async $providePortAttributes(w,v,C,o,c){return[]}async $forwardPort(w,v){}async $closeTunnel(w){}async $onDidTunnelsChange(){}async $registerCandidateFinder(){}};D=Ee([W(0,A.IExtHostRpcService)],D),e.ExtHostTunnelService=D}),define(ne[2114],re([1,0,60]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.deserializeWebviewMessage=e.serializeWebviewMessage=void 0;class f{constructor(){this.buffers=[]}add(I){let w=this.buffers.indexOf(I);return w<0&&(w=this.buffers.length,this.buffers.push(I)),w}}function _(D,I){if(I.serializeBuffersForPostMessage){const w=new f,v=(c,i)=>{if(i instanceof ArrayBuffer){const S=w.add(i);return{$$vscode_array_buffer_reference$$:!0,index:S}}else if(ArrayBuffer.isView(i)){const S=A(i);if(S){const s=w.add(i.buffer);return{$$vscode_array_buffer_reference$$:!0,index:s,view:{type:S,byteLength:i.byteLength,byteOffset:i.byteOffset}}}}return i},C=JSON.stringify(D,v),o=w.buffers.map(c=>{const i=new Uint8Array(c);return t.VSBuffer.wrap(i)});return{message:C,buffers:o}}else return{message:JSON.stringify(D),buffers:[]}}e.serializeWebviewMessage=_;function A(D){switch(D.constructor.name){case"Int8Array":return 1;case"Uint8Array":return 2;case"Uint8ClampedArray":return 3;case"Int16Array":return 4;case"Uint16Array":return 5;case"Int32Array":return 6;case"Uint32Array":return 7;case"Float32Array":return 8;case"Float64Array":return 9;case"BigInt64Array":return 10;case"BigUint64Array":return 11}}function k(D,I){const w=I.map(o=>{const c=new ArrayBuffer(o.byteLength);return new Uint8Array(c).set(o.buffer),c}),v=I.length?(o,c)=>{if(c&&typeof c=="object"&&c.$$vscode_array_buffer_reference$$){const i=c,{index:S}=i,s=w[S];if(i.view)switch(i.view.type){case 1:return new Int8Array(s,i.view.byteOffset,i.view.byteLength/Int8Array.BYTES_PER_ELEMENT);case 2:return new Uint8Array(s,i.view.byteOffset,i.view.byteLength/Uint8Array.BYTES_PER_ELEMENT);case 3:return new Uint8ClampedArray(s,i.view.byteOffset,i.view.byteLength/Uint8ClampedArray.BYTES_PER_ELEMENT);case 4:return new Int16Array(s,i.view.byteOffset,i.view.byteLength/Int16Array.BYTES_PER_ELEMENT);case 5:return new Uint16Array(s,i.view.byteOffset,i.view.byteLength/Uint16Array.BYTES_PER_ELEMENT);case 6:return new Int32Array(s,i.view.byteOffset,i.view.byteLength/Int32Array.BYTES_PER_ELEMENT);case 7:return new Uint32Array(s,i.view.byteOffset,i.view.byteLength/Uint32Array.BYTES_PER_ELEMENT);case 8:return new Float32Array(s,i.view.byteOffset,i.view.byteLength/Float32Array.BYTES_PER_ELEMENT);case 9:return new Float64Array(s,i.view.byteOffset,i.view.byteLength/Float64Array.BYTES_PER_ELEMENT);case 10:return new BigInt64Array(s,i.view.byteOffset,i.view.byteLength/BigInt64Array.BYTES_PER_ELEMENT);case 11:return new BigUint64Array(s,i.view.byteOffset,i.view.byteLength/BigUint64Array.BYTES_PER_ELEMENT);default:throw new Error("Unknown array buffer view type")}return s}return c}:void 0;return{message:JSON.parse(D,v),arrayBuffers:w}}e.deserializeWebviewMessage=k}),define(ne[774],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataTransferConverter=void 0;var t;(function(f){function _(k){const D=new Map;return k.types.forEach((I,w)=>{D.set(I,{asString:async()=>k.items[w].asString,value:void 0})}),D}f.toDataTransfer=_;async function A(k){const D={types:[],items:[]},I=Array.from(k.entries());for(const w of I)D.types.push(w[0]),D.items.push({asString:await w[1].asString()});return D}f.toDataTransferDTO=A})(t=e.DataTransferConverter||(e.DataTransferConverter={}))}),define(ne[565],re([1,0,2,6,16,7,73]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositeMenuActions=void 0;class D extends t.Disposable{constructor(v,C,o,c){super();this.options=C,this.menuService=o,this.contextKeyService=c,this._primaryActions=[],this._secondaryActions=[],this._onDidChange=this._register(new f.Emitter),this.onDidChange=this._onDidChange.event,this.disposables=this._register(new t.DisposableStore),this.menu=this._register(o.createMenu(v,c)),this._register(this.menu.onDidChange(()=>this.updateActions())),this.updateActions()}get primaryActions(){return this._primaryActions}get secondaryActions(){return this._secondaryActions}updateActions(){this.disposables.clear(),this._primaryActions=[],this._secondaryActions=[],this.disposables.add((0,k.createAndFillInActionBarActions)(this.menu,this.options,{primary:this._primaryActions,secondary:this._secondaryActions})),this.disposables.add(this.updateSubmenus([...this._primaryActions,...this._secondaryActions],{})),this._onDidChange.fire()}updateSubmenus(v,C){const o=new t.DisposableStore;for(const c of v)if(c instanceof _.SubmenuItemAction&&!C[c.item.submenu.id]){const i=C[c.item.submenu.id]=o.add(this.menuService.createMenu(c.item.submenu,this.contextKeyService));o.add(i.onDidChange(()=>this.updateActions())),o.add(this.updateSubmenus(c.actions,C))}return o}}let I=class extends t.Disposable{constructor(v,C,o,c,i){super();this.contextMenuId=C,this.options=o,this.contextKeyService=c,this.menuService=i,this.contextMenuActionsDisposable=this._register(new t.MutableDisposable),this._onDidChange=this._register(new f.Emitter),this.onDidChange=this._onDidChange.event,this.menuActions=this._register(new D(v,this.options,i,c)),this._register(this.menuActions.onDidChange(()=>this._onDidChange.fire()))}getPrimaryActions(){return this.menuActions.primaryActions}getSecondaryActions(){return this.menuActions.secondaryActions}getContextMenuActions(){const v=[];if(this.contextMenuId){const C=this.menuService.createMenu(this.contextMenuId,this.contextKeyService);this.contextMenuActionsDisposable.value=(0,k.createAndFillInActionBarActions)(C,this.options,{primary:[],secondary:v}),C.dispose()}return v}};I=Ee([W(3,A.IContextKeyService),W(4,_.IMenuService)],I),e.CompositeMenuActions=I}),define(ne[2115],re([1,0,94,208,71,668,15,7,544,463,716,28,671]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});function c(r){r&&r.getHTMLElement()!==document.activeElement&&r.domFocus()}async function i(r,p){if(!_.WorkbenchListSelectionNavigation.getValue(r.contextKeyService))return p(r);const u=r.getFocus(),a=r.getSelection();await p(r);const n=r.getFocus();if(a.length>1||!(0,k.equals)(u,a)||(0,k.equals)(u,n))return;const h=new KeyboardEvent("keydown");r.setSelection(n,h)}async function S(r,p){if(!r)return;await i(r,p);const u=r.getFocus();u.length&&r.reveal(u[0]),r.setAnchor(u[0]),c(r)}t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusDown",weight:200,when:_.WorkbenchListFocusContextKey,primary:18,mac:{primary:18,secondary:[256|44]},handler:(r,p)=>{S(r.get(_.IListService).lastFocusedList,async u=>{const a=new KeyboardEvent("keydown");await u.focusNext(typeof p=="number"?p:1,!1,a)})}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusUp",weight:200,when:_.WorkbenchListFocusContextKey,primary:16,mac:{primary:16,secondary:[256|46]},handler:(r,p)=>{S(r.get(_.IListService).lastFocusedList,async u=>{const a=new KeyboardEvent("keydown");await u.focusPrevious(typeof p=="number"?p:1,!1,a)})}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusPageDown",weight:200,when:_.WorkbenchListFocusContextKey,primary:12,handler:r=>{S(r.get(_.IListService).lastFocusedList,async p=>{const u=new KeyboardEvent("keydown");await p.focusNextPage(u)})}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusPageUp",weight:200,when:_.WorkbenchListFocusContextKey,primary:11,handler:r=>{S(r.get(_.IListService).lastFocusedList,async p=>{const u=new KeyboardEvent("keydown");await p.focusPreviousPage(u)})}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusFirst",weight:200,when:_.WorkbenchListFocusContextKey,primary:14,handler:r=>{S(r.get(_.IListService).lastFocusedList,async p=>{const u=new KeyboardEvent("keydown");await p.focusFirst(u)})}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusLast",weight:200,when:_.WorkbenchListFocusContextKey,primary:13,handler:r=>{S(r.get(_.IListService).lastFocusedList,async p=>{const u=new KeyboardEvent("keydown");await p.focusLast(u)})}});function s(r,p){if(r instanceof f.List||r instanceof A.PagedList||r instanceof o.Table){const u=r,a=u.getFocus()?u.getFocus()[0]:void 0,n=u.getSelection();n&&typeof a=="number"&&n.indexOf(a)>=0?u.setSelection(n.filter(h=>h!==p)):typeof a=="number"&&u.setSelection(n.concat(a))}else if(r instanceof I.ObjectTree||r instanceof v.DataTree||r instanceof w.AsyncDataTree){const u=r,a=u.getFocus()?u.getFocus()[0]:void 0;if(p===a)return;const n=u.getSelection(),h=new KeyboardEvent("keydown",{shiftKey:!0});n&&n.indexOf(a)>=0?u.setSelection(n.filter(g=>g!==p),h):u.setSelection(n.concat(a),h)}}t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.expandSelectionDown",weight:200,when:D.ContextKeyExpr.and(_.WorkbenchListFocusContextKey,_.WorkbenchListSupportsMultiSelectContextKey),primary:1024|18,handler:(r,p)=>{const u=r.get(_.IListService).lastFocusedList;if(!u)return;const a=u.getFocus()?u.getFocus()[0]:void 0,n=new KeyboardEvent("keydown");u.focusNext(typeof p=="number"?p:1,!1,n),s(u,a);const h=u.getFocus();h.length&&u.reveal(h[0]),c(u)}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.expandSelectionUp",weight:200,when:D.ContextKeyExpr.and(_.WorkbenchListFocusContextKey,_.WorkbenchListSupportsMultiSelectContextKey),primary:1024|16,handler:(r,p)=>{const u=r.get(_.IListService).lastFocusedList;if(!u)return;const a=u.getFocus()?u.getFocus()[0]:void 0,n=new KeyboardEvent("keydown");u.focusPrevious(typeof p=="number"?p:1,!1,n),s(u,a);const h=u.getFocus();h.length&&u.reveal(h[0]),c(u)}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.collapse",weight:200,when:D.ContextKeyExpr.and(_.WorkbenchListFocusContextKey,D.ContextKeyExpr.or(_.WorkbenchTreeElementCanCollapse,_.WorkbenchTreeElementHasParent)),primary:15,mac:{primary:15,secondary:[2048|16]},handler:r=>{const p=r.get(_.IListService).lastFocusedList;if(!p||!(p instanceof I.ObjectTree||p instanceof v.DataTree||p instanceof w.AsyncDataTree))return;const u=p,a=u.getFocus();if(a.length===0)return;const n=a[0];if(!u.collapse(n)){const h=u.getParentElement(n);h&&S(p,g=>{const d=new KeyboardEvent("keydown");g.setFocus([h],d)})}}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.collapseAll",weight:200,when:_.WorkbenchListFocusContextKey,primary:2048|15,mac:{primary:2048|15,secondary:[2048|1024|16]},handler:r=>{const p=r.get(_.IListService).lastFocusedList;p&&!(p instanceof f.List||p instanceof A.PagedList||p instanceof o.Table)&&p.collapseAll()}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusParent",weight:200,when:_.WorkbenchListFocusContextKey,handler:r=>{const p=r.get(_.IListService).lastFocusedList;if(!p||!(p instanceof I.ObjectTree||p instanceof v.DataTree||p instanceof w.AsyncDataTree))return;const u=p,a=u.getFocus();if(a.length===0)return;const n=a[0],h=u.getParentElement(n);h&&S(p,g=>{const d=new KeyboardEvent("keydown");g.setFocus([h],d)})}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.expand",weight:200,when:D.ContextKeyExpr.and(_.WorkbenchListFocusContextKey,D.ContextKeyExpr.or(_.WorkbenchTreeElementCanExpand,_.WorkbenchTreeElementHasChild)),primary:17,handler:r=>{const p=r.get(_.IListService).lastFocusedList;if(!!p){if(p instanceof I.ObjectTree||p instanceof v.DataTree){const u=p.getFocus();if(u.length===0)return;const a=u[0];if(!p.expand(a)){const n=p.getFirstElementChild(a);n&&p.getNode(n).visible&&S(p,g=>{const d=new KeyboardEvent("keydown");g.setFocus([n],d)})}}else if(p instanceof w.AsyncDataTree){const u=p.getFocus();if(u.length===0)return;const a=u[0];p.expand(a).then(n=>{if(a&&!n){const h=p.getFirstElementChild(a);h&&p.getNode(h).visible&&S(p,d=>{const m=new KeyboardEvent("keydown");d.setFocus([h],m)})}})}}}});function l(r,p){const u=r.get(_.IListService).lastFocusedList,a=(0,_.getSelectionKeyboardEvent)("keydown",p);if(u instanceof f.List||u instanceof A.PagedList||u instanceof o.Table){const n=u;n.setSelection(n.getFocus(),a),n.setAnchor(n.getFocus()[0])}else if(u instanceof I.ObjectTree||u instanceof v.DataTree||u instanceof w.AsyncDataTree){const n=u,h=n.getFocus();if(h.length>0){let g=!0;(n.expandOnlyOnTwistieClick===!0||typeof n.expandOnlyOnTwistieClick!="boolean"&&n.expandOnlyOnTwistieClick(h[0]))&&(g=!1),g&&n.toggleCollapsed(h[0])}n.setSelection(h,a),n.setAnchor(h[0])}}t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.select",weight:200,when:_.WorkbenchListFocusContextKey,primary:3,mac:{primary:3,secondary:[2048|18]},handler:r=>{l(r,!1)}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.selectAndPreserveFocus",weight:200,when:_.WorkbenchListFocusContextKey,handler:r=>{l(r,!0)}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.selectAll",weight:200,when:D.ContextKeyExpr.and(_.WorkbenchListFocusContextKey,_.WorkbenchListSupportsMultiSelectContextKey),primary:2048|31,handler:r=>{const p=r.get(_.IListService).lastFocusedList;if(p instanceof f.List||p instanceof A.PagedList||p instanceof o.Table){const u=p,a=new KeyboardEvent("keydown");u.setSelection((0,k.range)(u.length),a)}else if(p instanceof I.ObjectTree||p instanceof v.DataTree||p instanceof w.AsyncDataTree){const u=p,a=u.getFocus(),n=u.getSelection();let h;a.length>0&&(n.length===0||!n.includes(a[0]))&&(h=a[0]),!h&&n.length>0&&(h=n[0]);let g;h?g=u.getParentElement(h):g=void 0;const d=[],m=E=>{for(const y of E.children)y.visible&&(d.push(y.element),y.collapsed||m(y))};m(u.getNode(g)),g&&n.length===d.length&&d.unshift(g);const b=new KeyboardEvent("keydown");u.setSelection(d,b)}}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.toggleSelection",weight:200,when:_.WorkbenchListFocusContextKey,primary:2048|1024|3,handler:r=>{const p=r.get(_.IListService).lastFocusedList;if(!p)return;const u=p.getFocus();if(u.length===0)return;const a=p.getSelection(),n=a.indexOf(u[0]);n>-1?p.setSelection([...a.slice(0,n),...a.slice(n+1)]):p.setSelection([...a,u[0]])}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.toggleExpand",weight:200,when:_.WorkbenchListFocusContextKey,primary:10,handler:r=>{const p=r.get(_.IListService).lastFocusedList;if(p instanceof I.ObjectTree||p instanceof v.DataTree||p instanceof w.AsyncDataTree){const u=p,a=u.getFocus();if(a.length>0&&u.isCollapsible(a[0])){u.toggleCollapsed(a[0]);return}}l(r,!0)}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.clear",weight:200,when:D.ContextKeyExpr.and(_.WorkbenchListFocusContextKey,_.WorkbenchListHasSelectionOrFocus),primary:9,handler:r=>{const p=r.get(_.IListService).lastFocusedList;if(!p)return;const u=p.getSelection(),a=new KeyboardEvent("keydown");if(u.length>1)if(_.WorkbenchListSelectionNavigation.getValue(p.contextKeyService)){const h=p.getFocus();p.setSelection([h[0]],a)}else p.setSelection([],a);else p.setSelection([],a),p.setFocus([],a);p.setAnchor(void 0)}}),C.CommandsRegistry.registerCommand({id:"list.toggleKeyboardNavigation",handler:r=>{r.get(_.IListService).lastFocusedList?.toggleKeyboardNavigation()}}),C.CommandsRegistry.registerCommand({id:"list.toggleFilterOnType",handler:r=>{const p=r.get(_.IListService).lastFocusedList;if(!(p instanceof f.List||p instanceof A.PagedList||p instanceof o.Table)){if(p instanceof I.ObjectTree||p instanceof v.DataTree||p instanceof w.AsyncDataTree){const u=p;u.updateOptions({filterOnType:!u.filterOnType})}}}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.scrollUp",weight:200,when:_.WorkbenchListFocusContextKey,primary:2048|16,handler:r=>{const p=r.get(_.IListService).lastFocusedList;!p||(p.scrollTop-=10)}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.scrollDown",weight:200,when:_.WorkbenchListFocusContextKey,primary:2048|18,handler:r=>{const p=r.get(_.IListService).lastFocusedList;!p||(p.scrollTop+=10)}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.scrollLeft",weight:200,when:_.WorkbenchListFocusContextKey,handler:r=>{const p=r.get(_.IListService).lastFocusedList;!p||(p.scrollLeft-=10)}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.scrollRight",weight:200,when:_.WorkbenchListFocusContextKey,handler:r=>{const p=r.get(_.IListService).lastFocusedList;!p||(p.scrollLeft+=10)}})}),define(ne[2116],re([1,0,1389,185,31,81,717,12,68,2,10,38,46,95,197,5,186]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserDialogHandler=void 0;let l=class So{constructor(p,u,a,n,h,g,d){this.logService=p,this.layoutService=u,this.themeService=a,this.keybindingService=n,this.instantiationService=h,this.productService=g,this.clipboardService=d,this.markdownRenderer=this.instantiationService.createInstance(s.MarkdownRenderer,{})}async confirm(p){this.logService.trace("DialogService#confirm",p.message);const u=[];p.primaryButton?u.push(p.primaryButton):u.push((0,t.localize)(0,null)),p.secondaryButton?u.push(p.secondaryButton):typeof p.secondaryButton=="undefined"&&u.push((0,t.localize)(1,null));const a=await this.doShow(p.type,p.message,u,p.detail,1,p.checkbox);return{confirmed:a.button===0,checkboxChecked:a.checkboxChecked}}getDialogType(p){return p===A.default.Info?"question":p===A.default.Error?"error":p===A.default.Warning?"warning":"none"}async show(p,u,a,n){this.logService.trace("DialogService#show",u);const h=await this.doShow(this.getDialogType(p),u,a,n?.detail,n?.cancelId,n?.checkbox,void 0,typeof n?.custom=="object"?n.custom:void 0);return{choice:h.button,checkboxChecked:h.checkboxChecked}}async doShow(p,u,a,n,h,g,d,m){const b=new w.DisposableStore,E=m?R=>{R.classList.add(...m.classes||[]),m.markdownDetails?.forEach(O=>{const x=this.markdownRenderer.render(O.markdown);R.appendChild(x.element),x.element.classList.add(...O.classes||[]),b.add(x)})}:void 0,y=new k.Dialog(this.layoutService.container,u,a,{detail:n,cancelId:h,type:p,keyEventProcessor:R=>{const O=this.keybindingService.softDispatch(R,this.layoutService.container);O?.commandId&&So.ALLOWABLE_COMMANDS.indexOf(O.commandId)===-1&&v.EventHelper.stop(R,!0)},renderBody:E,icon:m?.icon,disableCloseAction:m?.disableCloseAction,buttonDetails:m?.buttonDetails,checkboxLabel:g?.label,checkboxChecked:g?.checked,inputs:d});b.add(y),b.add((0,I.attachDialogStyler)(y,this.themeService));const T=await y.show();return b.dispose(),T}async input(p,u,a,n,h){this.logService.trace("DialogService#input",u);const g=await this.doShow(this.getDialogType(p),u,a,h?.detail,h?.cancelId,h?.checkbox,n);return{choice:g.button,checkboxChecked:g.checkboxChecked,values:g.values}}async about(){const p=h=>(0,t.localize)(2,null,this.productService.version||"Unknown",this.productService.commit||"Unknown",this.productService.date?`${this.productService.date}${h?" ("+(0,i.fromNow)(new Date(this.productService.date),!0)+")":""}`:"Unknown",navigator.userAgent),u=p(!0),a=p(!1),{choice:n}=await this.show(A.default.Info,this.productService.nameLong,[(0,t.localize)(3,null),(0,t.localize)(4,null)],{detail:u,cancelId:1});n===0&&this.clipboardService.writeText(a)}};l.ALLOWABLE_COMMANDS=["copy","cut","editor.action.selectAll","editor.action.clipboardCopyAction","editor.action.clipboardCutAction","editor.action.clipboardPasteAction"],l=Ee([W(0,_.ILogService),W(1,f.ILayoutService),W(2,D.IThemeService),W(3,C.IKeybindingService),W(4,S.IInstantiationService),W(5,o.IProductService),W(6,c.IClipboardService)],l),e.BrowserDialogHandler=l}),define(ne[481],re([1,0,6,1392,57,35,5,17]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BreadcrumbsConfig=e.BreadcrumbsService=e.IBreadcrumbsService=void 0,e.IBreadcrumbsService=(0,k.createDecorator)("IEditorBreadcrumbsService");class I{constructor(){this._map=new Map}register(C,o){if(this._map.has(C))throw new Error(`group (${C}) has already a widget`);return this._map.set(C,o),{dispose:()=>this._map.delete(C)}}getWidget(C){return this._map.get(C)}}e.BreadcrumbsService=I,(0,A.registerSingleton)(e.IBreadcrumbsService,I,!0);class w{constructor(){}static _stub(C){return{bindTo(o){let c=new t.Emitter,i=o.onDidChangeConfiguration(S=>{S.affectsConfiguration(C)&&c.fire(void 0)});return new class{constructor(){this.name=C,this.onDidChange=c.event}getValue(S){return S?o.getValue(C,S):o.getValue(C)}updateValue(S,s){return s?o.updateValue(C,S,s):o.updateValue(C,S)}dispose(){i.dispose(),c.dispose()}}}}}}e.BreadcrumbsConfig=w,w.IsEnabled=w._stub("breadcrumbs.enabled"),w.UseQuickPick=w._stub("breadcrumbs.useQuickPick"),w.FilePath=w._stub("breadcrumbs.filePath"),w.SymbolPath=w._stub("breadcrumbs.symbolPath"),w.SymbolSortOrder=w._stub("breadcrumbs.symbolSortOrder"),w.Icons=w._stub("breadcrumbs.icons"),w.TitleScrollbarSizing=w._stub("workbench.editor.titleScrollbarSizing"),w.FileExcludes=w._stub("files.exclude"),D.Registry.as(_.Extensions.Configuration).registerConfiguration({id:"breadcrumbs",title:(0,f.localize)(0,null),order:101,type:"object",properties:{"breadcrumbs.enabled":{description:(0,f.localize)(1,null),type:"boolean",default:!0},"breadcrumbs.filePath":{description:(0,f.localize)(2,null),type:"string",default:"on",enum:["on","off","last"],enumDescriptions:[(0,f.localize)(3,null),(0,f.localize)(4,null),(0,f.localize)(5,null)]},"breadcrumbs.symbolPath":{description:(0,f.localize)(6,null),type:"string",default:"on",enum:["on","off","last"],enumDescriptions:[(0,f.localize)(7,null),(0,f.localize)(8,null),(0,f.localize)(9,null)]},"breadcrumbs.symbolSortOrder":{description:(0,f.localize)(10,null),type:"string",default:"position",scope:5,enum:["position","name","type"],enumDescriptions:[(0,f.localize)(11,null),(0,f.localize)(12,null),(0,f.localize)(13,null)]},"breadcrumbs.icons":{description:(0,f.localize)(14,null),type:"boolean",default:!0},"breadcrumbs.showFiles":{type:"boolean",default:!0,scope:5,markdownDescription:(0,f.localize)(15,null)},"breadcrumbs.showModules":{type:"boolean",default:!0,scope:5,markdownDescription:(0,f.localize)(16,null)},"breadcrumbs.showNamespaces":{type:"boolean",default:!0,scope:5,markdownDescription:(0,f.localize)(17,null)},"breadcrumbs.showPackages":{type:"boolean",default:!0,scope:5,markdownDescription:(0,f.localize)(18,null)},"breadcrumbs.showClasses":{type:"boolean",default:!0,scope:5,markdownDescription:(0,f.localize)(19,null)},"breadcrumbs.showMethods":{type:"boolean",default:!0,scope:5,markdownDescription:(0,f.localize)(20,null)},"breadcrumbs.showProperties":{type:"boolean",default:!0,scope:5,markdownDescription:(0,f.localize)(21,null)},"breadcrumbs.showFields":{type:"boolean",default:!0,scope:5,markdownDescription:(0,f.localize)(22,null)},"breadcrumbs.showConstructors":{type:"boolean",default:!0,scope:5,markdownDescription:(0,f.localize)(23,null)},"breadcrumbs.showEnums":{type:"boolean",default:!0,scope:5,markdownDescription:(0,f.localize)(24,null)},"breadcrumbs.showInterfaces":{type:"boolean",default:!0,scope:5,markdownDescription:(0,f.localize)(25,null)},"breadcrumbs.showFunctions":{type:"boolean",default:!0,scope:5,markdownDescription:(0,f.localize)(26,null)},"breadcrumbs.showVariables":{type:"boolean",default:!0,scope:5,markdownDescription:(0,f.localize)(27,null)},"breadcrumbs.showConstants":{type:"boolean",default:!0,scope:5,markdownDescription:(0,f.localize)(28,null)},"breadcrumbs.showStrings":{type:"boolean",default:!0,scope:5,markdownDescription:(0,f.localize)(29,null)},"breadcrumbs.showNumbers":{type:"boolean",default:!0,scope:5,markdownDescription:(0,f.localize)(30,null)},"breadcrumbs.showBooleans":{type:"boolean",default:!0,scope:5,markdownDescription:(0,f.localize)(31,null)},"breadcrumbs.showArrays":{type:"boolean",default:!0,scope:5,markdownDescription:(0,f.localize)(32,null)},"breadcrumbs.showObjects":{type:"boolean",default:!0,scope:5,markdownDescription:(0,f.localize)(33,null)},"breadcrumbs.showKeys":{type:"boolean",default:!0,scope:5,markdownDescription:(0,f.localize)(34,null)},"breadcrumbs.showNull":{type:"boolean",default:!0,scope:5,markdownDescription:(0,f.localize)(35,null)},"breadcrumbs.showEnumMembers":{type:"boolean",default:!0,scope:5,markdownDescription:(0,f.localize)(36,null)},"breadcrumbs.showStructs":{type:"boolean",default:!0,scope:5,markdownDescription:(0,f.localize)(37,null)},"breadcrumbs.showEvents":{type:"boolean",default:!0,scope:5,markdownDescription:(0,f.localize)(38,null)},"breadcrumbs.showOperators":{type:"boolean",default:!0,scope:5,markdownDescription:(0,f.localize)(39,null)},"breadcrumbs.showTypeParameters":{type:"boolean",default:!0,scope:5,markdownDescription:(0,f.localize)(40,null)}}})}),define(ne[316],re([1,0,10,13]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fillActiveEditorViewState=e.getEditorPartOptions=e.impactsEditorPartOptions=e.DEFAULT_EDITOR_PART_OPTIONS=e.DEFAULT_EDITOR_MAX_DIMENSIONS=e.DEFAULT_EDITOR_MIN_DIMENSIONS=void 0,e.DEFAULT_EDITOR_MIN_DIMENSIONS=new t.Dimension(220,70),e.DEFAULT_EDITOR_MAX_DIMENSIONS=new t.Dimension(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),e.DEFAULT_EDITOR_PART_OPTIONS={showTabs:!0,highlightModifiedTabs:!1,tabCloseButton:"right",tabSizing:"fit",pinnedTabSizing:"normal",titleScrollbarSizing:"default",focusRecentEditorAfterClose:!0,showIcons:!0,hasIcons:!0,enablePreview:!0,openPositioning:"right",openSideBySideDirection:"right",closeEmptyGroups:!0,labelFormat:"default",splitSizing:"distribute",splitOnDragAndDrop:!0};function _(D){return D.affectsConfiguration("workbench.editor")||D.affectsConfiguration("workbench.iconTheme")}e.impactsEditorPartOptions=_;function A(D,I){const w={...e.DEFAULT_EDITOR_PART_OPTIONS,hasIcons:I.getFileIconTheme().hasFileIcons},v=D.getValue();if(v?.workbench?.editor)if(Object.assign(w,v.workbench.editor),(0,f.isObject)(v.workbench.editor.autoLockGroups)){w.autoLockGroups=new Set;for(const[C,o]of Object.entries(v.workbench.editor.autoLockGroups))o===!0&&w.autoLockGroups.add(C)}else w.autoLockGroups=void 0;return w}e.getEditorPartOptions=A;function k(D,I,w){return!I||!D.activeEditor||I.matches(D.activeEditor)?{...w,viewState:D.activeEditorPane?.getViewState()}:w||Object.create(null)}e.fillActiveEditorViewState=k}),define(ne[2117],re([1,0,112,1410,2,130,26,6]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationsAlerts=void 0;class I extends _.Disposable{constructor(v){super();this.model=v;for(const C of v.notifications)this.triggerAriaAlert(C);this.registerListeners()}registerListeners(){this._register(this.model.onDidChangeNotification(v=>this.onDidChangeNotification(v)))}onDidChangeNotification(v){v.kind===0&&(this.triggerAriaAlert(v.item),v.item.severity===k.Severity.Error&&(v.item.message.original instanceof Error?console.error(v.item.message.original):console.error((0,A.toErrorMessage)(v.item.message.linkedText.toString(),!0))))}triggerAriaAlert(v){if(v.silent)return;const C=v.onDidChangeContent(o=>{o.kind===1&&this.doTriggerAriaAlert(v)});D.Event.once(v.onDidClose)(()=>C.dispose()),this.doTriggerAriaAlert(v)}doTriggerAriaAlert(v){let C;v.severity===k.Severity.Error?C=(0,f.localize)(0,null,v.message.linkedText.toString()):v.severity===k.Severity.Warning?C=(0,f.localize)(1,null,v.message.linkedText.toString()):C=(0,f.localize)(2,null,v.message.linkedText.toString()),(0,t.alert)(C)}}e.NotificationsAlerts=I}),define(ne[775],re([1,0,2,26,27,116]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationsTelemetry=e.notificationToMetrics=void 0;function k(I,w,v){return{id:(0,A.hash)(I.toString()).toString(),silent:v,source:w||"core"}}e.notificationToMetrics=k;let D=class extends t.Disposable{constructor(w,v){super();this.telemetryService=w,this.notificationService=v,this.registerListeners()}registerListeners(){this._register(this.notificationService.onDidAddNotification(w=>{const v=w.source&&typeof w.source!="string"?w.source.id:w.source;this.telemetryService.publicLog2("notification:show",k(w.message,v,!!w.silent))})),this._register(this.notificationService.onDidRemoveNotification(w=>{const v=w.source&&typeof w.source!="string"?w.source.id:w.source;this.telemetryService.publicLog2("notification:close",k(w.message,v,!!w.silent))}))}};D=Ee([W(0,_.ITelemetryService),W(1,f.INotificationService)],D),e.NotificationsTelemetry=D}),define(ne[317],re([1,0,1428,7,38,53]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getQuickNavigateHandler=e.defaultQuickAccessContext=e.defaultQuickAccessContextKeyValue=e.inQuickPickContext=e.InQuickPickContextKey=e.inQuickPickContextKeyValue=void 0,e.inQuickPickContextKeyValue="inQuickOpen",e.InQuickPickContextKey=new f.RawContextKey(e.inQuickPickContextKeyValue,!1,(0,t.localize)(0,null)),e.inQuickPickContext=f.ContextKeyExpr.has(e.inQuickPickContextKeyValue),e.defaultQuickAccessContextKeyValue="inFilesPicker",e.defaultQuickAccessContext=f.ContextKeyExpr.and(e.inQuickPickContext,f.ContextKeyExpr.has(e.defaultQuickAccessContextKeyValue));function k(D,I){return w=>{const v=w.get(_.IKeybindingService),C=w.get(A.IQuickInputService),c={keybindings:v.lookupKeybindings(D)};C.navigate(!!I,c)}}e.getQuickNavigateHandler=k}),define(ne[2118],re([1,0,1373,16,94,53,38,28,317]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const w={primary:2048|46,secondary:[2048|35],mac:{primary:2048|46,secondary:void 0}},v="workbench.action.quickOpen";f.MenuRegistry.appendMenuItem(f.MenuId.CommandPalette,{command:{id:v,title:{value:(0,t.localize)(0,null),original:"Go to File..."}}}),_.KeybindingsRegistry.registerKeybindingRule({id:v,weight:200,when:void 0,primary:w.primary,secondary:w.secondary,mac:w.mac}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.closeQuickOpen",weight:200,when:I.inQuickPickContext,primary:9,secondary:[1024|9],handler:r=>r.get(A.IQuickInputService).cancel()}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.acceptSelectedQuickOpenItem",weight:200,when:I.inQuickPickContext,primary:0,handler:r=>r.get(A.IQuickInputService).accept()}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.alternativeAcceptSelectedQuickOpenItem",weight:200,when:I.inQuickPickContext,primary:0,handler:r=>r.get(A.IQuickInputService).accept({ctrlCmd:!0,alt:!1})}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.focusQuickOpen",weight:200,when:I.inQuickPickContext,primary:0,handler:r=>{r.get(A.IQuickInputService).focus()}});const C="workbench.action.quickOpenNavigateNextInFilePicker";_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:C,weight:200+50,handler:(0,I.getQuickNavigateHandler)(C,!0),when:I.defaultQuickAccessContext,primary:w.primary,secondary:w.secondary,mac:w.mac});const o="workbench.action.quickOpenNavigatePreviousInFilePicker";_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:o,weight:200+50,handler:(0,I.getQuickNavigateHandler)(o,!1),when:I.defaultQuickAccessContext,primary:w.primary|1024,secondary:[w.secondary[0]|1024],mac:{primary:w.mac.primary|1024,secondary:void 0}}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.quickPickManyToggle",weight:200,when:I.inQuickPickContext,primary:0,handler:r=>{r.get(A.IQuickInputService).toggle()}}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.quickInputBack",weight:200+50,when:I.inQuickPickContext,primary:0,win:{primary:512|15},mac:{primary:256|83},linux:{primary:2048|512|83},handler:r=>{r.get(A.IQuickInputService).back()}}),D.CommandsRegistry.registerCommand({id:v,handler:async function(r,p){r.get(A.IQuickInputService).quickAccess.show(typeof p=="string"?p:void 0,{preserveValue:typeof p=="string"})},description:{description:"Quick access",args:[{name:"prefix",schema:{type:"string"}}]}}),D.CommandsRegistry.registerCommand("workbench.action.quickOpenPreviousEditor",async r=>{r.get(A.IQuickInputService).quickAccess.show("",{itemActivation:A.ItemActivation.SECOND})});class c extends f.Action2{constructor(p,u,a,n,h){super({id:p,title:u,f1:!0,keybinding:h});this.id=p,this.next=a,this.quickNavigate=n}async run(p){const u=p.get(k.IKeybindingService),a=p.get(A.IQuickInputService),n=u.lookupKeybindings(this.id),h=this.quickNavigate?{keybindings:n}:void 0;a.navigate(this.next,h)}}class i extends c{constructor(){super("workbench.action.quickOpenNavigateNext",{value:(0,t.localize)(1,null),original:"Navigate Next in Quick Open"},!0,!0)}}class S extends c{constructor(){super("workbench.action.quickOpenNavigatePrevious",{value:(0,t.localize)(2,null),original:"Navigate Previous in Quick Open"},!1,!0)}}class s extends c{constructor(){super("workbench.action.quickOpenSelectNext",{value:(0,t.localize)(3,null),original:"Select Next in Quick Open"},!0,!1,{weight:200+50,when:I.inQuickPickContext,primary:0,mac:{primary:256|44}})}}class l extends c{constructor(){super("workbench.action.quickOpenSelectPrevious",{value:(0,t.localize)(4,null),original:"Select Previous in Quick Open"},!1,!1,{weight:200+50,when:I.inQuickPickContext,primary:0,mac:{primary:256|46}})}}(0,f.registerAction2)(s),(0,f.registerAction2)(l),(0,f.registerAction2)(i),(0,f.registerAction2)(S)}),define(ne[776],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parentOriginHash=void 0;async function t(_,A){if(!crypto.subtle)throw new Error("Can't compute sha-256");const k=JSON.stringify({parentOrigin:_,salt:A}),I=new TextEncoder().encode(k),w=await crypto.subtle.digest("sha-256",I);return f(w)}e.parentOriginHash=t;function f(_){const k=Array.from(new Uint8Array(_)).map(D=>D.toString(16).padStart(2,"0")).join("");return BigInt(`0x${k}`).toString(32).padStart(52,"0")}}),define(ne[777],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ACCOUNTS_ACTIVITY_ID=e.GLOBAL_ACTIVITY_ID=void 0,e.GLOBAL_ACTIVITY_ID="workbench.action.globalActivity",e.ACCOUNTS_ACTIVITY_ID="workbench.action.accountsActivity"}),define(ne[248],re([1,0,1432]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.workbenchConfigurationNodeBase=void 0,e.workbenchConfigurationNodeBase=Object.freeze({id:"workbench",order:7,title:(0,t.localize)(0,null),type:"object"})}),define(ne[2119],re([1,0,17,1430,57,14,248,77]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const I=t.Registry.as(_.Extensions.Configuration);(function(){I.registerConfiguration({...k.workbenchConfigurationNodeBase,properties:{"workbench.editor.titleScrollbarSizing":{type:"string",enum:["default","large"],enumDescriptions:[(0,f.localize)(0,null),(0,f.localize)(1,null)],description:(0,f.localize)(2,null),default:"default"},"workbench.editor.showTabs":{type:"boolean",description:(0,f.localize)(3,null),default:!0},"workbench.editor.wrapTabs":{type:"boolean",markdownDescription:(0,f.localize)(4,null),default:!1},"workbench.editor.scrollToSwitchTabs":{type:"boolean",markdownDescription:(0,f.localize)(5,null),default:!1},"workbench.editor.highlightModifiedTabs":{type:"boolean",markdownDescription:(0,f.localize)(6,null),default:!1},"workbench.editor.decorations.badges":{type:"boolean",markdownDescription:(0,f.localize)(7,null),default:!0},"workbench.editor.decorations.colors":{type:"boolean",markdownDescription:(0,f.localize)(8,null),default:!0},"workbench.editor.labelFormat":{type:"string",enum:["default","short","medium","long"],enumDescriptions:[(0,f.localize)(9,null),(0,f.localize)(10,null),(0,f.localize)(11,null),(0,f.localize)(12,null)],default:"default",description:(0,f.localize)(13,null)},"workbench.editor.untitled.labelFormat":{type:"string",enum:["content","name"],enumDescriptions:[(0,f.localize)(14,null),(0,f.localize)(15,null)],default:"content",description:(0,f.localize)(16,null)},"workbench.editor.untitled.hint":{type:"string",enum:["text","hidden"],default:"text",markdownDescription:(0,f.localize)(17,null)},"workbench.editor.languageDetection":{type:"boolean",default:!0,description:(0,f.localize)(18,null),scope:5},"workbench.editor.historyBasedLanguageDetection":{type:"boolean",default:!0,tags:["experimental"],description:(0,f.localize)(19,null)},"workbench.editor.preferHistoryBasedLanguageDetection":{type:"boolean",default:!1,tags:["experimental"],description:(0,f.localize)(20,null)},"workbench.editor.tabCloseButton":{type:"string",enum:["left","right","off"],default:"right",markdownDescription:(0,f.localize)(21,null)},"workbench.editor.tabSizing":{type:"string",enum:["fit","shrink"],default:"fit",enumDescriptions:[(0,f.localize)(22,null),(0,f.localize)(23,null)],markdownDescription:(0,f.localize)(24,null)},"workbench.editor.pinnedTabSizing":{type:"string",enum:["normal","compact","shrink"],default:"normal",enumDescriptions:[(0,f.localize)(25,null),(0,f.localize)(26,null),(0,f.localize)(27,null)],markdownDescription:(0,f.localize)(28,null)},"workbench.editor.splitSizing":{type:"string",enum:["distribute","split"],default:"distribute",enumDescriptions:[(0,f.localize)(29,null),(0,f.localize)(30,null)],description:(0,f.localize)(31,null)},"workbench.editor.splitOnDragAndDrop":{type:"boolean",default:!0,description:(0,f.localize)(32,null)},"workbench.editor.focusRecentEditorAfterClose":{type:"boolean",description:(0,f.localize)(33,null),default:!0},"workbench.editor.showIcons":{type:"boolean",description:(0,f.localize)(34,null),default:!0},"workbench.editor.enablePreview":{type:"boolean",description:(0,f.localize)(35,null),default:!0},"workbench.editor.enablePreviewFromQuickOpen":{type:"boolean",markdownDescription:(0,f.localize)(36,null),default:!1},"workbench.editor.enablePreviewFromCodeNavigation":{type:"boolean",markdownDescription:(0,f.localize)(37,null),default:!1},"workbench.editor.closeOnFileDelete":{type:"boolean",description:(0,f.localize)(38,null),default:!1},"workbench.editor.openPositioning":{type:"string",enum:["left","right","first","last"],default:"right",markdownDescription:(0,f.localize)(39,null)},"workbench.editor.openSideBySideDirection":{type:"string",enum:["right","down"],default:"right",markdownDescription:(0,f.localize)(40,null)},"workbench.editor.closeEmptyGroups":{type:"boolean",description:(0,f.localize)(41,null),default:!0},"workbench.editor.revealIfOpen":{type:"boolean",description:(0,f.localize)(42,null),default:!1},"workbench.editor.mouseBackForwardToNavigate":{type:"boolean",description:(0,f.localize)(43,null),default:!0},"workbench.editor.navigationScope":{type:"string",enum:["default","editorGroup","editor"],default:"default",markdownDescription:(0,f.localize)(44,null),enumDescriptions:[(0,f.localize)(45,null),(0,f.localize)(46,null),(0,f.localize)(47,null)]},"workbench.editor.restoreViewState":{type:"boolean",markdownDescription:(0,f.localize)(48,null),default:!0,scope:5},"workbench.editor.sharedViewState":{type:"boolean",description:(0,f.localize)(49,null),default:!1},"workbench.editor.splitInGroupLayout":{type:"string",enum:["vertical","horizontal"],default:"horizontal",markdownDescription:(0,f.localize)(50,null),enumDescriptions:[(0,f.localize)(51,null),(0,f.localize)(52,null)]},"workbench.editor.centeredLayoutAutoResize":{type:"boolean",default:!0,description:(0,f.localize)(53,null)},"workbench.editor.limit.enabled":{type:"boolean",default:!1,description:(0,f.localize)(54,null)},"workbench.editor.limit.value":{type:"number",default:10,exclusiveMinimum:0,markdownDescription:(0,f.localize)(55,null)},"workbench.editor.limit.perEditorGroup":{type:"boolean",default:!1,description:(0,f.localize)(56,null)},"workbench.localHistory.enabled":{type:"boolean",default:!0,description:(0,f.localize)(57,null),scope:4},"workbench.localHistory.maxFileSize":{type:"number",default:256,minimum:1,description:(0,f.localize)(58,null),scope:4},"workbench.localHistory.maxFileEntries":{type:"number",default:50,minimum:0,description:(0,f.localize)(59,null),scope:4},"workbench.localHistory.exclude":{type:"object",markdownDescription:(0,f.localize)(60,null),scope:4},"workbench.localHistory.mergeWindow":{type:"number",default:10,minimum:1,markdownDescription:(0,f.localize)(61,null),scope:4},"workbench.commandPalette.history":{type:"number",description:(0,f.localize)(62,null),default:50,minimum:0},"workbench.commandPalette.preserveInput":{type:"boolean",description:(0,f.localize)(63,null),default:!1},"workbench.quickOpen.closeOnFocusLost":{type:"boolean",description:(0,f.localize)(64,null),default:!0},"workbench.quickOpen.preserveInput":{type:"boolean",description:(0,f.localize)(65,null),default:!1},"workbench.settings.openDefaultSettings":{type:"boolean",description:(0,f.localize)(66,null),default:!1},"workbench.settings.useSplitJSON":{type:"boolean",markdownDescription:(0,f.localize)(67,null),default:!1},"workbench.settings.openDefaultKeybindings":{type:"boolean",description:(0,f.localize)(68,null),default:!1},"workbench.sideBar.location":{type:"string",enum:["left","right"],default:"left",description:(0,f.localize)(69,null)},"workbench.panel.defaultLocation":{type:"string",enum:["left","bottom","right"],default:"bottom",description:(0,f.localize)(70,null)},"workbench.panel.opensMaximized":{type:"string",enum:["always","never","preserve"],default:"preserve",description:(0,f.localize)(71,null),enumDescriptions:[(0,f.localize)(72,null),(0,f.localize)(73,null),(0,f.localize)(74,null)]},"workbench.statusBar.visible":{type:"boolean",default:!0,description:(0,f.localize)(75,null)},"workbench.activityBar.visible":{type:"boolean",default:!0,description:(0,f.localize)(76,null)},"workbench.activityBar.iconClickBehavior":{type:"string",enum:["toggle","focus"],default:"toggle",description:(0,f.localize)(77,null),enumDescriptions:[(0,f.localize)(78,null),(0,f.localize)(79,null)]},"workbench.view.alwaysShowHeaderActions":{type:"boolean",default:!1,description:(0,f.localize)(80,null)},"workbench.fontAliasing":{type:"string",enum:["default","antialiased","none","auto"],default:"default",description:(0,f.localize)(81,null),enumDescriptions:[(0,f.localize)(82,null),(0,f.localize)(83,null),(0,f.localize)(84,null),(0,f.localize)(85,null)],included:A.isMacintosh},"workbench.settings.editor":{type:"string",enum:["ui","json"],enumDescriptions:[(0,f.localize)(86,null),(0,f.localize)(87,null)],description:(0,f.localize)(88,null),default:"ui",scope:3},"workbench.hover.delay":{type:"number",description:(0,f.localize)(89,null),default:A.isMacintosh?1500:500,minimum:0},"workbench.reduceMotion":{type:"string",description:(0,f.localize)(90,null),enumDescriptions:[(0,f.localize)(91,null),(0,f.localize)(92,null),(0,f.localize)(93,null)],default:"auto",enum:["on","off","auto"]},"workbench.layoutControl.enabled":{type:"boolean",default:!0,markdownDescription:(0,f.localize)(94,null,"`#window.titleBarStyle#`")},"workbench.layoutControl.type":{type:"string",enum:["menu","toggles","both"],enumDescriptions:[(0,f.localize)(95,null),(0,f.localize)(96,null),(0,f.localize)(97,null)],default:"both",description:(0,f.localize)(98,null)},"workbench.experimental.layoutControl.enabled":{type:"boolean",tags:["experimental"],default:!1,markdownDescription:(0,f.localize)(99,null,"`#window.titleBarStyle#`"),markdownDeprecationMessage:(0,f.localize)(100,null,"`#workbench.layoutControl.enabled#`")},"workbench.experimental.layoutControl.type":{type:"string",enum:["menu","toggles","both"],enumDescriptions:[(0,f.localize)(101,null),(0,f.localize)(102,null),(0,f.localize)(103,null)],tags:["experimental"],default:"both",description:(0,f.localize)(104,null),markdownDeprecationMessage:(0,f.localize)(105,null,"`#workbench.layoutControl.type#`")},"workbench.experimental.editor.dragAndDropIntoEditor.enabled":{type:"boolean",tags:["experimental"],default:!1,description:(0,f.localize)(106,null)}}});let v=(0,f.localize)(107,null);v+=` - `+[(0,f.localize)(108,null),(0,f.localize)(109,null),(0,f.localize)(110,null),(0,f.localize)(111,null),(0,f.localize)(112,null),(0,f.localize)(113,null),(0,f.localize)(114,null),(0,f.localize)(115,null),(0,f.localize)(116,null),(0,f.localize)(117,null),(0,f.localize)(118,null),(0,f.localize)(119,null),(0,f.localize)(120,null),(0,f.localize)(121,null)].join(` - `),I.registerConfiguration({id:"window",order:8,title:(0,f.localize)(122,null),type:"object",properties:{"window.title":{type:"string",default:(()=>{if(A.isMacintosh&&A.isNative)return"${activeEditorShort}${separator}${rootName}";const C="${dirty}${activeEditorShort}${separator}${rootName}${separator}${appName}";return A.isWeb?C+"${separator}${remoteName}":C})(),markdownDescription:v},"window.titleSeparator":{type:"string",default:A.isMacintosh?" \u2014 ":" - ",markdownDescription:(0,f.localize)(123,null)},"window.menuBarVisibility":{type:"string",enum:["classic","visible","toggle","hidden","compact"],markdownEnumDescriptions:[(0,f.localize)(124,null),(0,f.localize)(125,null),A.isMacintosh?(0,f.localize)(126,null):(0,f.localize)(127,null),(0,f.localize)(128,null),(0,f.localize)(129,null)],default:A.isWeb?"compact":"classic",scope:1,markdownDescription:A.isMacintosh?(0,f.localize)(130,null):(0,f.localize)(131,null),included:A.isWindows||A.isLinux||A.isWeb},"window.enableMenuBarMnemonics":{type:"boolean",default:!0,scope:1,description:(0,f.localize)(132,null),included:A.isWindows||A.isLinux},"window.customMenuBarAltFocus":{type:"boolean",default:!0,scope:1,markdownDescription:(0,f.localize)(133,null),included:A.isWindows||A.isLinux},"window.openFilesInNewWindow":{type:"string",enum:["on","off","default"],enumDescriptions:[(0,f.localize)(134,null),(0,f.localize)(135,null),A.isMacintosh?(0,f.localize)(136,null):(0,f.localize)(137,null)],default:"off",scope:1,markdownDescription:A.isMacintosh?(0,f.localize)(138,null):(0,f.localize)(139,null)},"window.openFoldersInNewWindow":{type:"string",enum:["on","off","default"],enumDescriptions:[(0,f.localize)(140,null),(0,f.localize)(141,null),(0,f.localize)(142,null)],default:"default",scope:1,markdownDescription:(0,f.localize)(143,null)},"window.confirmBeforeClose":{type:"string",enum:["always","keyboardOnly","never"],enumDescriptions:[(0,f.localize)(144,null),(0,f.localize)(145,null),(0,f.localize)(146,null)],default:A.isWeb&&!(0,D.isStandalone)()?"keyboardOnly":"never",description:(0,f.localize)(147,null),scope:1,included:A.isWeb}}}),I.registerConfiguration({id:"zenMode",order:9,title:(0,f.localize)(148,null),type:"object",properties:{"zenMode.fullScreen":{type:"boolean",default:!0,description:(0,f.localize)(149,null)},"zenMode.centerLayout":{type:"boolean",default:!0,description:(0,f.localize)(150,null)},"zenMode.hideTabs":{type:"boolean",default:!0,description:(0,f.localize)(151,null)},"zenMode.hideStatusBar":{type:"boolean",default:!0,description:(0,f.localize)(152,null)},"zenMode.hideActivityBar":{type:"boolean",default:!0,description:(0,f.localize)(153,null)},"zenMode.hideLineNumbers":{type:"boolean",default:!0,description:(0,f.localize)(154,null)},"zenMode.restore":{type:"boolean",default:!0,description:(0,f.localize)(155,null)},"zenMode.silentNotifications":{type:"boolean",default:!0,description:(0,f.localize)(156,null)}}})})()}),define(ne[74],re([1,0,2,1433,7,19,42,23,52]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceContextKey=e.getEnabledViewContainerContextKey=e.getVisbileViewContextKey=e.FocusedViewContext=e.PanelMaximizedContext=e.PanelVisibleContext=e.PanelAlignmentContext=e.PanelPositionContext=e.PanelFocusContext=e.ActivePanelContext=e.AuxiliaryBarVisibleContext=e.AuxiliaryBarFocusContext=e.ActiveAuxiliaryContext=e.NotificationsToastsVisibleContext=e.NotificationsCenterVisibleContext=e.NotificationFocusedContext=e.BannerFocused=e.StatusBarFocused=e.ActiveViewletContext=e.SidebarFocusContext=e.SideBarVisibleContext=e.EditorTabsVisibleContext=e.EditorAreaVisibleContext=e.SplitEditorsVertically=e.IsCenteredLayoutContext=e.InEditorZenModeContext=e.EditorsVisibleContext=e.SingleEditorGroupsContext=e.MultipleEditorGroupsContext=e.ActiveEditorGroupLockedContext=e.ActiveEditorGroupLastContext=e.ActiveEditorGroupIndexContext=e.ActiveEditorGroupEmptyContext=e.EditorGroupEditorsCountContext=e.SideBySideEditorActiveContext=e.TextCompareEditorActiveContext=e.TextCompareEditorVisibleContext=e.ActiveEditorAvailableEditorIdsContext=e.ActiveEditorContext=e.ActiveEditorCanSplitInGroupContext=e.ActiveEditorCanRevertContext=e.ActiveEditorReadonlyContext=e.ActiveEditorStickyContext=e.ActiveEditorLastInGroupContext=e.ActiveEditorFirstInGroupContext=e.ActiveEditorPinnedContext=e.ActiveEditorDirtyContext=e.HasWebFileSystemAccess=e.IsFullscreenContext=e.VirtualWorkspaceContext=e.RemoteNameContext=e.DirtyWorkingCopiesContext=e.EmptyWorkspaceSupportContext=e.EnterMultiRootWorkspaceSupportContext=e.OpenFolderWorkspaceSupportContext=e.WorkspaceFolderCountContext=e.WorkbenchStateContext=void 0,e.WorkbenchStateContext=new _.RawContextKey("workbenchState",void 0,{type:"string",description:(0,f.localize)(0,null)}),e.WorkspaceFolderCountContext=new _.RawContextKey("workspaceFolderCount",0,(0,f.localize)(1,null)),e.OpenFolderWorkspaceSupportContext=new _.RawContextKey("openFolderWorkspaceSupport",!0,!0),e.EnterMultiRootWorkspaceSupportContext=new _.RawContextKey("enterMultiRootWorkspaceSupport",!0,!0),e.EmptyWorkspaceSupportContext=new _.RawContextKey("emptyWorkspaceSupport",!0,!0),e.DirtyWorkingCopiesContext=new _.RawContextKey("dirtyWorkingCopies",!1,(0,f.localize)(2,null)),e.RemoteNameContext=new _.RawContextKey("remoteName","",(0,f.localize)(3,null)),e.VirtualWorkspaceContext=new _.RawContextKey("virtualWorkspace","",(0,f.localize)(4,null)),e.IsFullscreenContext=new _.RawContextKey("isFullscreen",!1,(0,f.localize)(5,null)),e.HasWebFileSystemAccess=new _.RawContextKey("hasWebFileSystemAccess",!1,!0),e.ActiveEditorDirtyContext=new _.RawContextKey("activeEditorIsDirty",!1,(0,f.localize)(6,null)),e.ActiveEditorPinnedContext=new _.RawContextKey("activeEditorIsNotPreview",!1,(0,f.localize)(7,null)),e.ActiveEditorFirstInGroupContext=new _.RawContextKey("activeEditorIsFirstInGroup",!1,(0,f.localize)(8,null)),e.ActiveEditorLastInGroupContext=new _.RawContextKey("activeEditorIsLastInGroup",!1,(0,f.localize)(9,null)),e.ActiveEditorStickyContext=new _.RawContextKey("activeEditorIsPinned",!1,(0,f.localize)(10,null)),e.ActiveEditorReadonlyContext=new _.RawContextKey("activeEditorIsReadonly",!1,(0,f.localize)(11,null)),e.ActiveEditorCanRevertContext=new _.RawContextKey("activeEditorCanRevert",!1,(0,f.localize)(12,null)),e.ActiveEditorCanSplitInGroupContext=new _.RawContextKey("activeEditorCanSplitInGroup",!0),e.ActiveEditorContext=new _.RawContextKey("activeEditor",null,{type:"string",description:(0,f.localize)(13,null)}),e.ActiveEditorAvailableEditorIdsContext=new _.RawContextKey("activeEditorAvailableEditorIds","",(0,f.localize)(14,null)),e.TextCompareEditorVisibleContext=new _.RawContextKey("textCompareEditorVisible",!1,(0,f.localize)(15,null)),e.TextCompareEditorActiveContext=new _.RawContextKey("textCompareEditorActive",!1,(0,f.localize)(16,null)),e.SideBySideEditorActiveContext=new _.RawContextKey("sideBySideEditorActive",!1,(0,f.localize)(17,null)),e.EditorGroupEditorsCountContext=new _.RawContextKey("groupEditorsCount",0,(0,f.localize)(18,null)),e.ActiveEditorGroupEmptyContext=new _.RawContextKey("activeEditorGroupEmpty",!1,(0,f.localize)(19,null)),e.ActiveEditorGroupIndexContext=new _.RawContextKey("activeEditorGroupIndex",0,(0,f.localize)(20,null)),e.ActiveEditorGroupLastContext=new _.RawContextKey("activeEditorGroupLast",!1,(0,f.localize)(21,null)),e.ActiveEditorGroupLockedContext=new _.RawContextKey("activeEditorGroupLocked",!1,(0,f.localize)(22,null)),e.MultipleEditorGroupsContext=new _.RawContextKey("multipleEditorGroups",!1,(0,f.localize)(23,null)),e.SingleEditorGroupsContext=e.MultipleEditorGroupsContext.toNegated(),e.EditorsVisibleContext=new _.RawContextKey("editorIsOpen",!1,(0,f.localize)(24,null)),e.InEditorZenModeContext=new _.RawContextKey("inZenMode",!1,(0,f.localize)(25,null)),e.IsCenteredLayoutContext=new _.RawContextKey("isCenteredLayout",!1,(0,f.localize)(26,null)),e.SplitEditorsVertically=new _.RawContextKey("splitEditorsVertically",!1,(0,f.localize)(27,null)),e.EditorAreaVisibleContext=new _.RawContextKey("editorAreaVisible",!0,(0,f.localize)(28,null)),e.EditorTabsVisibleContext=new _.RawContextKey("editorTabsVisible",!0,(0,f.localize)(29,null)),e.SideBarVisibleContext=new _.RawContextKey("sideBarVisible",!1,(0,f.localize)(30,null)),e.SidebarFocusContext=new _.RawContextKey("sideBarFocus",!1,(0,f.localize)(31,null)),e.ActiveViewletContext=new _.RawContextKey("activeViewlet","",(0,f.localize)(32,null)),e.StatusBarFocused=new _.RawContextKey("statusBarFocused",!1,(0,f.localize)(33,null)),e.BannerFocused=new _.RawContextKey("bannerFocused",!1,(0,f.localize)(34,null)),e.NotificationFocusedContext=new _.RawContextKey("notificationFocus",!0,(0,f.localize)(35,null)),e.NotificationsCenterVisibleContext=new _.RawContextKey("notificationCenterVisible",!1,(0,f.localize)(36,null)),e.NotificationsToastsVisibleContext=new _.RawContextKey("notificationToastsVisible",!1,(0,f.localize)(37,null)),e.ActiveAuxiliaryContext=new _.RawContextKey("activeAuxiliary","",(0,f.localize)(38,null)),e.AuxiliaryBarFocusContext=new _.RawContextKey("auxiliaryBarFocus",!1,(0,f.localize)(39,null)),e.AuxiliaryBarVisibleContext=new _.RawContextKey("auxiliaryBarVisible",!1,(0,f.localize)(40,null)),e.ActivePanelContext=new _.RawContextKey("activePanel","",(0,f.localize)(41,null)),e.PanelFocusContext=new _.RawContextKey("panelFocus",!1,(0,f.localize)(42,null)),e.PanelPositionContext=new _.RawContextKey("panelPosition","bottom",(0,f.localize)(43,null)),e.PanelAlignmentContext=new _.RawContextKey("panelAlignment","center",(0,f.localize)(44,null)),e.PanelVisibleContext=new _.RawContextKey("panelVisible",!1,(0,f.localize)(45,null)),e.PanelMaximizedContext=new _.RawContextKey("panelMaximized",!1,(0,f.localize)(46,null)),e.FocusedViewContext=new _.RawContextKey("focusedView","",(0,f.localize)(47,null));function w(o){return`view.${o}.visible`}e.getVisbileViewContextKey=w;function v(o){return`viewContainer.${o}.enabled`}e.getEnabledViewContainerContextKey=v;let C=class ti{constructor(c,i,S,s){this._contextKeyService=c,this._fileService=i,this._languageService=S,this._modelService=s,this._disposables=new t.DisposableStore,this._schemeKey=ti.Scheme.bindTo(this._contextKeyService),this._filenameKey=ti.Filename.bindTo(this._contextKeyService),this._dirnameKey=ti.Dirname.bindTo(this._contextKeyService),this._pathKey=ti.Path.bindTo(this._contextKeyService),this._langIdKey=ti.LangId.bindTo(this._contextKeyService),this._resourceKey=ti.Resource.bindTo(this._contextKeyService),this._extensionKey=ti.Extension.bindTo(this._contextKeyService),this._hasResource=ti.HasResource.bindTo(this._contextKeyService),this._isFileSystemResource=ti.IsFileSystemResource.bindTo(this._contextKeyService),this._disposables.add(i.onDidChangeFileSystemProviderRegistrations(()=>{const l=this.get();this._isFileSystemResource.set(Boolean(l&&i.hasProvider(l)))})),this._disposables.add(s.onModelAdded(l=>{(0,A.isEqual)(l.uri,this.get())&&this._setLangId()})),this._disposables.add(s.onModelLanguageChanged(l=>{(0,A.isEqual)(l.model.uri,this.get())&&this._setLangId()}))}dispose(){this._disposables.dispose()}_setLangId(){const c=this.get();if(!c){this._langIdKey.set(null);return}const i=this._modelService.getModel(c)?.getLanguageId()??this._languageService.guessLanguageIdByFilepathOrFirstLine(c);this._langIdKey.set(i)}set(c){(0,A.isEqual)(this.get(),c??void 0)||this._contextKeyService.bufferChangeEvents(()=>{this._resourceKey.set(c),this._schemeKey.set(c?c.scheme:null),this._filenameKey.set(c?(0,A.basename)(c):null),this._dirnameKey.set(c?(0,A.dirname)(c).fsPath:null),this._pathKey.set(c?c.fsPath:null),this._setLangId(),this._extensionKey.set(c?(0,A.extname)(c):null),this._hasResource.set(Boolean(c)),this._isFileSystemResource.set(c?this._fileService.hasProvider(c):!1)})}reset(){this._contextKeyService.bufferChangeEvents(()=>{this._resourceKey.reset(),this._schemeKey.reset(),this._filenameKey.reset(),this._dirnameKey.reset(),this._pathKey.reset(),this._langIdKey.reset(),this._extensionKey.reset(),this._hasResource.reset(),this._isFileSystemResource.reset()})}get(){return this._resourceKey.get()??void 0}};C.Scheme=new _.RawContextKey("resourceScheme",void 0,{type:"string",description:(0,f.localize)(48,null)}),C.Filename=new _.RawContextKey("resourceFilename",void 0,{type:"string",description:(0,f.localize)(49,null)}),C.Dirname=new _.RawContextKey("resourceDirname",void 0,{type:"string",description:(0,f.localize)(50,null)}),C.Path=new _.RawContextKey("resourcePath",void 0,{type:"string",description:(0,f.localize)(51,null)}),C.LangId=new _.RawContextKey("resourceLangId",void 0,{type:"string",description:(0,f.localize)(52,null)}),C.Resource=new _.RawContextKey("resource",void 0,{type:"URI",description:(0,f.localize)(53,null)}),C.Extension=new _.RawContextKey("resourceExtname",void 0,{type:"string",description:(0,f.localize)(54,null)}),C.HasResource=new _.RawContextKey("resourceSet",void 0,{type:"boolean",description:(0,f.localize)(55,null)}),C.IsFileSystemResource=new _.RawContextKey("isFileSystemResource",void 0,{type:"boolean",description:(0,f.localize)(56,null)}),C=Ee([W(0,_.IContextKeyService),W(1,D.IFileService),W(2,k.ILanguageService),W(3,I.IModelService)],C),e.ResourceContextKey=C}),define(ne[2120],re([1,0,11,6,2]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DialogsModel=void 0;class A extends _.Disposable{constructor(){super(...arguments);this.dialogs=[],this._onWillShowDialog=this._register(new f.Emitter),this.onWillShowDialog=this._onWillShowDialog.event,this._onDidShowDialog=this._register(new f.Emitter),this.onDidShowDialog=this._onDidShowDialog.event}show(D){const I=new t.DeferredPromise,w={args:D,close:v=>{this.dialogs.splice(0,1),I.complete(v),this._onDidShowDialog.fire()}};return this.dialogs.push(w),this._onWillShowDialog.fire(),{item:w,result:I.p}}}e.DialogsModel=A}),define(ne[44],re([1,0,1434,13,9,2,5,17,23,15,18]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isTextEditorViewState=e.EditorsOrder=e.pathsToEditors=e.CloseDirection=e.EditorResourceAccessor=e.SideBySideEditor=e.GroupModelChangeKind=e.EditorCloseContext=e.isEditorIdentifier=e.isEditorInputWithOptionsAndGroup=e.isEditorInputWithOptions=e.isDiffEditorInput=e.isSideBySideEditorInput=e.isEditorInput=e.AbstractEditorInput=e.EditorInputCapabilities=e.SaveSourceRegistry=e.SaveReason=e.Verbosity=e.isUntitledResourceEditorInput=e.isResourceSideBySideEditorInput=e.isResourceDiffEditorInput=e.isResourceEditorInput=e.findViewStateForEditor=e.isEditorPaneWithSelection=e.EditorPaneSelectionCompareResult=e.EditorPaneSelectionChangeReason=e.BINARY_DIFF_EDITOR_ID=e.TEXT_DIFF_EDITOR_ID=e.SIDE_BY_SIDE_EDITOR_ID=e.DEFAULT_EDITOR_ASSOCIATION=e.EditorExtensions=void 0,e.EditorExtensions={EditorPane:"workbench.contributions.editors",EditorFactory:"workbench.contributions.editor.inputFactories"},e.DEFAULT_EDITOR_ASSOCIATION={id:"default",displayName:(0,t.localize)(0,null),providerDisplayName:(0,t.localize)(1,null)},e.SIDE_BY_SIDE_EDITOR_ID="workbench.editor.sidebysideEditor",e.TEXT_DIFF_EDITOR_ID="workbench.editors.textDiffEditor",e.BINARY_DIFF_EDITOR_ID="workbench.editors.binaryResourceDiffEditor";var C;(function(V){V[V.PROGRAMMATIC=1]="PROGRAMMATIC",V[V.USER=2]="USER",V[V.EDIT=3]="EDIT",V[V.NAVIGATION=4]="NAVIGATION",V[V.JUMP=5]="JUMP"})(C=e.EditorPaneSelectionChangeReason||(e.EditorPaneSelectionChangeReason={}));var o;(function(V){V[V.IDENTICAL=1]="IDENTICAL",V[V.SIMILAR=2]="SIMILAR",V[V.DIFFERENT=3]="DIFFERENT"})(o=e.EditorPaneSelectionCompareResult||(e.EditorPaneSelectionCompareResult={}));function c(V){const z=V;return!!z&&typeof z.getSelection=="function"&&!!z.onDidChangeSelection}e.isEditorPaneWithSelection=c;function i(V,z,U){for(const H of U.visibleEditorPanes)if(H.group.id===z&&V.matches(H.input))return H.getViewState()}e.findViewStateForEditor=i;function S(V){if(g(V))return!1;const z=V;return _.URI.isUri(z?.resource)}e.isResourceEditorInput=S;function s(V){if(g(V))return!1;const z=V;return z?.original!==void 0&&z.modified!==void 0}e.isResourceDiffEditorInput=s;function l(V){if(g(V)||s(V))return!1;const z=V;return z?.primary!==void 0&&z.secondary!==void 0}e.isResourceSideBySideEditorInput=l;function r(V){if(g(V))return!1;const z=V;return z?z.resource===void 0||z.resource.scheme===v.Schemas.untitled||z.forceUntitled===!0:!1}e.isUntitledResourceEditorInput=r;var p;(function(V){V[V.SHORT=0]="SHORT",V[V.MEDIUM=1]="MEDIUM",V[V.LONG=2]="LONG"})(p=e.Verbosity||(e.Verbosity={}));var u;(function(V){V[V.EXPLICIT=1]="EXPLICIT",V[V.AUTO=2]="AUTO",V[V.FOCUS_CHANGE=3]="FOCUS_CHANGE",V[V.WINDOW_CHANGE=4]="WINDOW_CHANGE"})(u=e.SaveReason||(e.SaveReason={}));class a{constructor(){this.mapIdToSaveSource=new Map}registerSource(z,U){let H=this.mapIdToSaveSource.get(z);return H||(H={source:z,label:U},this.mapIdToSaveSource.set(z,H)),H.source}getSourceLabel(z){return this.mapIdToSaveSource.get(z)?.label??z}}e.SaveSourceRegistry=new a;var n;(function(V){V[V.None=0]="None",V[V.Readonly=2]="Readonly",V[V.Untitled=4]="Untitled",V[V.Singleton=8]="Singleton",V[V.RequiresTrust=16]="RequiresTrust",V[V.CanSplitInGroup=32]="CanSplitInGroup",V[V.ForceDescription=64]="ForceDescription"})(n=e.EditorInputCapabilities||(e.EditorInputCapabilities={}));class h extends A.Disposable{}e.AbstractEditorInput=h;function g(V){return V instanceof h}e.isEditorInput=g;function d(V){const z=V;return _.URI.isUri(z?.preferredResource)}function m(V){const z=V;return g(z?.primary)&&g(z?.secondary)}e.isSideBySideEditorInput=m;function b(V){const z=V;return g(z?.modified)&&g(z?.original)}e.isDiffEditorInput=b;function E(V){return g(V?.editor)}e.isEditorInputWithOptions=E;function y(V){const z=V;return E(V)&&z?.group!==void 0}e.isEditorInputWithOptionsAndGroup=y;function T(V){const z=V;return typeof z?.groupId=="number"&&g(z.editor)}e.isEditorIdentifier=T;var R;(function(V){V[V.UNKNOWN=0]="UNKNOWN",V[V.REPLACE=1]="REPLACE",V[V.MOVE=2]="MOVE",V[V.UNPIN=3]="UNPIN"})(R=e.EditorCloseContext||(e.EditorCloseContext={}));var O;(function(V){V[V.GROUP_ACTIVE=0]="GROUP_ACTIVE",V[V.GROUP_INDEX=1]="GROUP_INDEX",V[V.GROUP_LOCKED=2]="GROUP_LOCKED",V[V.EDITOR_OPEN=3]="EDITOR_OPEN",V[V.EDITOR_CLOSE=4]="EDITOR_CLOSE",V[V.EDITOR_MOVE=5]="EDITOR_MOVE",V[V.EDITOR_ACTIVE=6]="EDITOR_ACTIVE",V[V.EDITOR_LABEL=7]="EDITOR_LABEL",V[V.EDITOR_CAPABILITIES=8]="EDITOR_CAPABILITIES",V[V.EDITOR_PIN=9]="EDITOR_PIN",V[V.EDITOR_STICKY=10]="EDITOR_STICKY",V[V.EDITOR_DIRTY=11]="EDITOR_DIRTY",V[V.EDITOR_WILL_DISPOSE=12]="EDITOR_WILL_DISPOSE"})(O=e.GroupModelChangeKind||(e.GroupModelChangeKind={}));var x;(function(V){V[V.PRIMARY=1]="PRIMARY",V[V.SECONDARY=2]="SECONDARY",V[V.BOTH=3]="BOTH",V[V.ANY=4]="ANY"})(x=e.SideBySideEditor||(e.SideBySideEditor={}));class F{getOriginalUri(z,U){if(!z)return;if(U?.supportSideBySide){const{primary:K,secondary:G}=this.getSideEditors(z);if(K&&G){if(U?.supportSideBySide===x.BOTH)return{primary:this.getOriginalUri(K,{filterByScheme:U.filterByScheme}),secondary:this.getOriginalUri(G,{filterByScheme:U.filterByScheme})};if(U?.supportSideBySide===x.ANY)return this.getOriginalUri(K,{filterByScheme:U.filterByScheme})??this.getOriginalUri(G,{filterByScheme:U.filterByScheme});z=U.supportSideBySide===x.PRIMARY?K:G}}if(s(z)||l(z))return;const H=d(z)?z.preferredResource:z.resource;return!H||!U||!U.filterByScheme?H:this.filterUri(H,U.filterByScheme)}getSideEditors(z){return m(z)||l(z)?{primary:z.primary,secondary:z.secondary}:b(z)||s(z)?{primary:z.modified,secondary:z.original}:{primary:void 0,secondary:void 0}}getCanonicalUri(z,U){if(!z)return;if(U?.supportSideBySide){const{primary:K,secondary:G}=this.getSideEditors(z);if(K&&G){if(U?.supportSideBySide===x.BOTH)return{primary:this.getCanonicalUri(K,{filterByScheme:U.filterByScheme}),secondary:this.getCanonicalUri(G,{filterByScheme:U.filterByScheme})};if(U?.supportSideBySide===x.ANY)return this.getCanonicalUri(K,{filterByScheme:U.filterByScheme})??this.getCanonicalUri(G,{filterByScheme:U.filterByScheme});z=U.supportSideBySide===x.PRIMARY?K:G}}if(s(z)||l(z))return;const H=z.resource;return!H||!U||!U.filterByScheme?H:this.filterUri(H,U.filterByScheme)}filterUri(z,U){if(Array.isArray(U)){if(U.some(H=>z.scheme===H))return z}else if(U===z.scheme)return z}}e.EditorResourceAccessor=new F;var L;(function(V){V[V.LEFT=0]="LEFT",V[V.RIGHT=1]="RIGHT"})(L=e.CloseDirection||(e.CloseDirection={}));class M{constructor(){this.editorSerializerConstructors=new Map,this.editorSerializerInstances=new Map}start(z){const U=this.instantiationService=z.get(k.IInstantiationService);for(const[H,K]of this.editorSerializerConstructors)this.createEditorSerializer(H,K,U);this.editorSerializerConstructors.clear()}createEditorSerializer(z,U,H){const K=H.createInstance(U);this.editorSerializerInstances.set(z,K)}registerFileEditorFactory(z){if(this.fileEditorFactory)throw new Error("Can only register one file editor factory.");this.fileEditorFactory=z}getFileEditorFactory(){return(0,f.assertIsDefined)(this.fileEditorFactory)}registerEditorSerializer(z,U){if(this.editorSerializerConstructors.has(z)||this.editorSerializerInstances.has(z))throw new Error(`A editor serializer with type ID '${z}' was already registered.`);return this.instantiationService?this.createEditorSerializer(z,U,this.instantiationService):this.editorSerializerConstructors.set(z,U),(0,A.toDisposable)(()=>{this.editorSerializerConstructors.delete(z),this.editorSerializerInstances.delete(z)})}getEditorSerializer(z){return this.editorSerializerInstances.get(typeof z=="string"?z:z.typeId)}}D.Registry.add(e.EditorExtensions.EditorFactory,new M);async function N(V,z){if(!V||!V.length)return[];const U=await Promise.all(V.map(async H=>{const K=_.URI.revive(H.fileUri);if(!K||!await z.canHandleResource(K))return;let q=H.exists,Z=H.type;if(typeof q!="boolean"||typeof Z!="number")try{Z=(await z.stat(K)).isDirectory?I.FileType.Directory:I.FileType.Unknown,q=!0}catch{q=!1}if(!q&&H.openOnlyIfExists||Z===I.FileType.Directory)return;const j={selection:q?H.selection:void 0,pinned:!0,override:H.editorOverrideId};let X;return q?X={resource:K,options:j}:X={resource:K,options:j,forceUntitled:!0},X}));return(0,w.coalesce)(U)}e.pathsToEditors=N;var B;(function(V){V[V.MOST_RECENTLY_ACTIVE=0]="MOST_RECENTLY_ACTIVE",V[V.SEQUENTIAL=1]="SEQUENTIAL"})(B=e.EditorsOrder||(e.EditorsOrder={}));function P(V){const z=V;if(!z)return!1;const U=z;if(U.modified)return P(U.modified);const H=z;return!!(H.contributionsState&&H.viewState&&Array.isArray(H.cursorState))}e.isTextEditorViewState=P}),define(ne[174],re([1,0,6,15,44,19]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorInput=void 0;class k extends _.AbstractEditorInput{constructor(){super(...arguments);this._onDidChangeDirty=this._register(new t.Emitter),this._onDidChangeLabel=this._register(new t.Emitter),this._onDidChangeCapabilities=this._register(new t.Emitter),this._onWillDispose=this._register(new t.Emitter),this.onDidChangeDirty=this._onDidChangeDirty.event,this.onDidChangeLabel=this._onDidChangeLabel.event,this.onDidChangeCapabilities=this._onDidChangeCapabilities.event,this.onWillDispose=this._onWillDispose.event,this.disposed=!1}get editorId(){}get capabilities(){return 2}hasCapability(I){return I===0?this.capabilities===0:(this.capabilities&I)!=0}getName(){return`Editor ${this.typeId}`}getDescription(I){}getTitle(I){return this.getName()}getLabelExtraClasses(){return[]}getAriaLabel(){return this.getTitle(0)}getTelemetryDescriptor(){return{typeId:this.typeId}}isDirty(){return!1}isSaving(){return!1}async resolve(){return null}async save(I,w){return this}async saveAs(I,w){return this}async revert(I,w){}async rename(I,w){}copy(){return this}matches(I){if((0,_.isEditorInput)(I))return this===I;const w=I.options?.override;return this.editorId===void 0||this.editorId!==w?!1:(0,A.isEqual)(this.resource,_.EditorResourceAccessor.getCanonicalUri(I))}prefersEditorPane(I){return(0,f.firstOrDefault)(I)}toUntyped(I){}isDisposed(){return this.disposed}dispose(){this.disposed||(this.disposed=!0,this._onWillDispose.fire()),super.dispose()}}e.EditorInput=k}),define(ne[265],re([1,0,6,2]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorModel=void 0;class _ extends f.Disposable{constructor(){super(...arguments);this._onWillDispose=this._register(new t.Emitter),this.onWillDispose=this._onWillDispose.event,this.disposed=!1,this.resolved=!1}async resolve(){this.resolved=!0}isResolved(){return this.resolved}isDisposed(){return this.disposed}dispose(){this.disposed=!0,this._onWillDispose.fire(),super.dispose()}}e.EditorModel=_}),define(ne[566],re([1,0,265,23,169]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BinaryEditorModel=void 0;let A=class extends t.EditorModel{constructor(D,I,w){super();this.resource=D,this.name=I,this.fileService=w,this.mime=_.Mimes.binary}getName(){return this.name}getSize(){return this.size}getMime(){return this.mime}getETag(){return this.etag}async resolve(){if(this.fileService.hasProvider(this.resource)){const D=await this.fileService.stat(this.resource);this.etag=D.etag,typeof D.size=="number"&&(this.size=D.size)}return super.resolve()}};A=Ee([W(2,f.IFileService)],A),e.BinaryEditorModel=A}),define(ne[778],re([1,0,265]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorModel=void 0;class f extends t.EditorModel{constructor(A,k){super();this._originalModel=A,this._modifiedModel=k}get originalModel(){return this._originalModel}get modifiedModel(){return this._modifiedModel}async resolve(){await Promise.all([this._originalModel?.resolve(),this._modifiedModel?.resolve()])}isResolved(){return!!(this.originalModel?.isResolved()&&this.modifiedModel?.isResolved())}dispose(){super.dispose()}}e.DiffEditorModel=f}),define(ne[409],re([1,0,44]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.applyTextEditorOptions=void 0;function f(A,k,D){let I=!1;const w=_(A);if((0,t.isTextEditorViewState)(w)&&(k.restoreViewState(w),I=!0),A.selection){const v={startLineNumber:A.selection.startLineNumber,startColumn:A.selection.startColumn,endLineNumber:A.selection.endLineNumber??A.selection.startLineNumber,endColumn:A.selection.endColumn??A.selection.startColumn};k.setSelection(v,A.selectionSource??"code.navigation"),A.selectionRevealType===2?k.revealRangeNearTop(v,D):A.selectionRevealType===3?k.revealRangeNearTopIfOutsideViewport(v,D):A.selectionRevealType===1?k.revealRangeInCenterIfOutsideViewport(v,D):k.revealRangeInCenter(v,D),I=!0}return I}e.applyTextEditorOptions=f;function _(A){if(!A.selection||!A.viewState)return A.viewState;const k=A.viewState;if(k.modified)return k.modified.cursorState=[],k;const D=A.viewState;return D.cursorState&&(D.cursorState=[]),D}}),define(ne[779],re([1,0,174,23,45,19]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractResourceEditorInput=void 0;let k=class extends t.EditorInput{constructor(I,w,v,C){super();this.resource=I,this.labelService=v,this.fileService=C,this._name=void 0,this._shortDescription=void 0,this._mediumDescription=void 0,this._longDescription=void 0,this._shortTitle=void 0,this._mediumTitle=void 0,this._longTitle=void 0,this._preferredResource=w||I,this.registerListeners()}get capabilities(){let I=32;return this.fileService.hasProvider(this.resource)?this.fileService.hasCapability(this.resource,2048)&&(I|=2):I|=4,I}get preferredResource(){return this._preferredResource}registerListeners(){this._register(this.labelService.onDidChangeFormatters(I=>this.onLabelEvent(I.scheme))),this._register(this.fileService.onDidChangeFileSystemProviderRegistrations(I=>this.onLabelEvent(I.scheme))),this._register(this.fileService.onDidChangeFileSystemProviderCapabilities(I=>this.onLabelEvent(I.scheme)))}onLabelEvent(I){I===this._preferredResource.scheme&&this.updateLabel()}updateLabel(){this._name=void 0,this._shortDescription=void 0,this._mediumDescription=void 0,this._longDescription=void 0,this._shortTitle=void 0,this._mediumTitle=void 0,this._longTitle=void 0,this._onDidChangeLabel.fire()}setPreferredResource(I){(0,A.isEqual)(I,this._preferredResource)||(this._preferredResource=I,this.updateLabel())}getName(){return typeof this._name!="string"&&(this._name=this.labelService.getUriBasenameLabel(this._preferredResource)),this._name}getDescription(I=1){switch(I){case 0:return this.shortDescription;case 2:return this.longDescription;case 1:default:return this.mediumDescription}}get shortDescription(){return typeof this._shortDescription!="string"&&(this._shortDescription=this.labelService.getUriBasenameLabel((0,A.dirname)(this._preferredResource))),this._shortDescription}get mediumDescription(){return typeof this._mediumDescription!="string"&&(this._mediumDescription=this.labelService.getUriLabel((0,A.dirname)(this._preferredResource),{relative:!0})),this._mediumDescription}get longDescription(){return typeof this._longDescription!="string"&&(this._longDescription=this.labelService.getUriLabel((0,A.dirname)(this._preferredResource))),this._longDescription}get shortTitle(){return typeof this._shortTitle!="string"&&(this._shortTitle=this.getName()),this._shortTitle}get mediumTitle(){return typeof this._mediumTitle!="string"&&(this._mediumTitle=this.labelService.getUriLabel(this._preferredResource,{relative:!0})),this._mediumTitle}get longTitle(){return typeof this._longTitle!="string"&&(this._longTitle=this.labelService.getUriLabel(this._preferredResource)),this._longTitle}getTitle(I){switch(I){case 0:return this.shortTitle;case 2:return this.longTitle;default:case 1:return this.mediumTitle}}};k=Ee([W(2,_.ILabelService),W(3,f.IFileService)],k),e.AbstractResourceEditorInput=k}),define(ne[780],re([1,0,778]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextDiffEditorModel=void 0;class f extends t.DiffEditorModel{constructor(A,k){super(A,k);this._textDiffEditorModel=void 0,this._originalModel=A,this._modifiedModel=k,this.updateTextDiffEditorModel()}get originalModel(){return this._originalModel}get modifiedModel(){return this._modifiedModel}get textDiffEditorModel(){return this._textDiffEditorModel}async resolve(){await super.resolve(),this.updateTextDiffEditorModel()}updateTextDiffEditorModel(){this.originalModel?.isResolved()&&this.modifiedModel?.isResolved()&&(this._textDiffEditorModel?(this._textDiffEditorModel.original=this.originalModel.textEditorModel,this._textDiffEditorModel.modified=this.modifiedModel.textEditorModel):this._textDiffEditorModel={original:this.originalModel.textEditorModel,modified:this.modifiedModel.textEditorModel})}isResolved(){return!!this._textDiffEditorModel}isReadonly(){return!!this.modifiedModel&&this.modifiedModel.isReadonly()}dispose(){this._textDiffEditorModel=void 0,super.dispose()}}e.TextDiffEditorModel=f}),define(ne[214],re([1,0,13,22]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Memento=void 0;class _{constructor(D,I){this.storageService=I,this.id=_.COMMON_PREFIX+D}getMemento(D,I){if(D===1){let v=_.workspaceMementos.get(this.id);return v||(v=new A(this.id,D,I,this.storageService),_.workspaceMementos.set(this.id,v)),v.getMemento()}let w=_.globalMementos.get(this.id);return w||(w=new A(this.id,D,I,this.storageService),_.globalMementos.set(this.id,w)),w.getMemento()}saveMemento(){const D=_.workspaceMementos.get(this.id);D&&D.save();const I=_.globalMementos.get(this.id);I&&I.save()}static clear(D){D===1&&_.workspaceMementos.clear(),D===0&&_.globalMementos.clear()}}e.Memento=_,_.globalMementos=new Map,_.workspaceMementos=new Map,_.COMMON_PREFIX="memento/";class A{constructor(D,I,w,v){this.id=D,this.scope=I,this.target=w,this.storageService=v,this.mementoObj=this.load()}getMemento(){return this.mementoObj}load(){const D=this.storageService.get(this.id,this.scope);if(D)try{return JSON.parse(D)}catch(I){(0,f.onUnexpectedError)(`[memento]: failed to parse contents: ${I} (id: ${this.id}, scope: ${this.scope}, contents: ${D})`)}return{}}save(){(0,t.isEmptyObject)(this.mementoObj)?this.storageService.remove(this.id,this.scope):this.storageService.store(this.id,JSON.stringify(this.mementoObj),this.scope,this.target)}}}),define(ne[567],re([1,0,214,12]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;class _ extends f.Themable{constructor(k,D,I){super(D);this.id=k,this.id=k,this.memento=new t.Memento(this.id,I),this._register(I.onWillSaveState(()=>{this.saveState(),this.memento.saveMemento()}))}getId(){return this.id}getMemento(k,D){return this.memento.getMemento(k,D)}saveState(){}}e.Component=_}),define(ne[781],re([1,0,36,567,6,10,2,13]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositeRegistry=e.CompositeDescriptor=e.Composite=void 0;class I extends f.Component{constructor(o,c,i,S){super(o,i,S);this._onTitleAreaUpdate=this._register(new _.Emitter),this.onTitleAreaUpdate=this._onTitleAreaUpdate.event,this._hasFocus=!1,this._telemetryService=c,this.visible=!1}get onDidFocus(){return this._onDidFocus||(this._onDidFocus=this.registerFocusTrackEvents().onDidFocus),this._onDidFocus.event}fireOnDidFocus(){this._onDidFocus?.fire()}get onDidBlur(){return this._onDidBlur||(this._onDidBlur=this.registerFocusTrackEvents().onDidBlur),this._onDidBlur.event}hasFocus(){return this._hasFocus}registerFocusTrackEvents(){const o=(0,D.assertIsDefined)(this.getContainer()),c=this._register((0,A.trackFocus)(o)),i=this._onDidFocus=this._register(new _.Emitter);this._register(c.onDidFocus(()=>{this._hasFocus=!0,i.fire()}));const S=this._onDidBlur=this._register(new _.Emitter);return this._register(c.onDidBlur(()=>{this._hasFocus=!1,S.fire()})),{onDidFocus:i,onDidBlur:S}}get telemetryService(){return this._telemetryService}getTitle(){}create(o){this.parent=o}getContainer(){return this.parent}setVisible(o){this.visible!==!!o&&(this.visible=o)}focus(){}updateStyles(){super.updateStyles()}getActions(){return[]}getSecondaryActions(){return[]}getContextMenuActions(){return[]}getActionViewItem(o){}getActionsContext(){return null}getActionRunner(){return this.actionRunner||(this.actionRunner=this._register(new t.ActionRunner)),this.actionRunner}updateTitleArea(){this._onTitleAreaUpdate.fire()}isVisible(){return this.visible}getControl(){}}e.Composite=I;class w{constructor(o,c,i,S,s,l){this.ctor=o,this.id=c,this.name=i,this.cssClass=S,this.order=s,this.requestedIndex=l}instantiate(o){return o.createInstance(this.ctor)}}e.CompositeDescriptor=w;class v extends k.Disposable{constructor(){super(...arguments);this._onDidRegister=this._register(new _.Emitter),this.onDidRegister=this._onDidRegister.event,this._onDidDeregister=this._register(new _.Emitter),this.onDidDeregister=this._onDidDeregister.event,this.composites=[]}registerComposite(o){this.compositeById(o.id)||(this.composites.push(o),this._onDidRegister.fire(o))}deregisterComposite(o){const c=this.compositeById(o);!c||(this.composites.splice(this.composites.indexOf(c),1),this._onDidDeregister.fire(c))}getComposite(o){return this.compositeById(o)}getComposites(){return this.composites.slice(0)}compositeById(o){return this.composites.find(c=>c.id===o)}}e.CompositeRegistry=v}),define(ne[353],re([1,0,567,10,6,13,1047]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Part=void 0;class k extends t.Component{constructor(w,v,C,o,c){super(w,C,o);this.options=v,this.layoutService=c,this._onDidVisibilityChange=this._register(new _.Emitter),this.onDidVisibilityChange=this._onDidVisibilityChange.event,this._onDidChange=this._register(new _.Emitter),c.registerPart(this)}get dimension(){return this._dimension}onThemeChange(w){this.parent&&super.onThemeChange(w)}updateStyles(){super.updateStyles()}create(w,v){this.parent=w,this.titleArea=this.createTitleArea(w,v),this.contentArea=this.createContentArea(w,v),this.partLayout=new D(this.options,this.contentArea),this.updateStyles()}getContainer(){return this.parent}createTitleArea(w,v){}getTitleArea(){return this.titleArea}createContentArea(w,v){}getContentArea(){return this.contentArea}layoutContents(w,v){return(0,A.assertIsDefined)(this.partLayout).layout(w,v)}get onDidChange(){return this._onDidChange.event}layout(w,v,C,o){this._dimension=new f.Dimension(w,v)}setVisible(w){this._onDidVisibilityChange.fire(w)}}e.Part=k;class D{constructor(w,v){this.options=w,this.contentArea=v}layout(w,v){let C;this.options.hasTitle?C=new f.Dimension(w,Math.min(v,D.TITLE_HEIGHT)):C=f.Dimension.None;let o=w;this.options&&typeof this.options.borderWidth=="function"&&(o-=this.options.borderWidth());const c=new f.Dimension(o,v-C.height);return this.contentArea&&(0,f.size)(this.contentArea,c.width,c.height),{titleSize:C,contentSize:c}}}D.TITLE_HEIGHT=35}),define(ne[166],re([1,0,781,44,55,9,6,13,316,19,157,2]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorMemento=e.EditorPane=void 0;class o extends t.Composite{constructor(S,s,l,r){super(S,s,l,r);this.onDidChangeSizeConstraints=k.Event.None,this._onDidChangeControl=this._register(new k.Emitter),this.onDidChangeControl=this._onDidChangeControl.event}get minimumWidth(){return I.DEFAULT_EDITOR_MIN_DIMENSIONS.width}get maximumWidth(){return I.DEFAULT_EDITOR_MAX_DIMENSIONS.width}get minimumHeight(){return I.DEFAULT_EDITOR_MIN_DIMENSIONS.height}get maximumHeight(){return I.DEFAULT_EDITOR_MAX_DIMENSIONS.height}get input(){return this._input}get options(){return this._options}get group(){return this._group}get scopedContextKeyService(){}create(S){super.create(S),this.createEditor(S)}async setInput(S,s,l,r){this._input=S,this._options=s}clearInput(){this._input=void 0,this._options=void 0}setOptions(S){this._options=S}setVisible(S,s){super.setVisible(S),this.setEditorVisible(S,s)}setEditorVisible(S,s){this._group=s}getEditorMemento(S,s,l,r=10){const p=`${this.getId()}${l}`;let u=o.EDITOR_MEMENTOS.get(p);return u||(u=this._register(new c(this.getId(),l,this.getMemento(1,1),r,S,s)),o.EDITOR_MEMENTOS.set(p,u)),u}getViewState(){}saveState(){for(const[,S]of o.EDITOR_MEMENTOS)S.id===this.getId()&&S.saveState();super.saveState()}dispose(){this._input=void 0,this._options=void 0,super.dispose()}}e.EditorPane=o,o.EDITOR_MEMENTOS=new Map;class c extends C.Disposable{constructor(S,s,l,r,p,u){super();this.id=S,this.key=s,this.memento=l,this.limit=r,this.editorGroupService=p,this.configurationService=u,this.cleanedUp=!1,this.shareEditorState=!1,this.updateConfiguration(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(()=>this.updateConfiguration()))}updateConfiguration(){this.shareEditorState=this.configurationService.getValue(void 0,"workbench.editor.sharedViewState")===!0}saveEditorState(S,s,l){const r=this.doGetResource(s);if(!r||!S)return;const p=this.doLoad();let u=p.get(r.toString());u||(u=Object.create(null),p.set(r.toString(),u)),u[S.id]=l,this.shareEditorState&&(u[c.SHARED_EDITOR_STATE]=l),(0,f.isEditorInput)(s)&&this.clearEditorStateOnDispose(r,s)}loadEditorState(S,s){const l=this.doGetResource(s);if(!l||!S)return;const p=this.doLoad().get(l.toString());if(p){let u=p[S.id];if(u)return u;if(this.shareEditorState)return p[c.SHARED_EDITOR_STATE]}}clearEditorState(S,s){(0,f.isEditorInput)(S)&&this.editorDisposables?.delete(S);const l=this.doGetResource(S);if(l){const r=this.doLoad();if(s){const p=r.get(l.toString());p&&(delete p[s.id],(0,D.isEmptyObject)(p)&&r.delete(l.toString()))}else r.delete(l.toString())}}clearEditorStateOnDispose(S,s){this.editorDisposables||(this.editorDisposables=new Map),this.editorDisposables.has(s)||this.editorDisposables.set(s,k.Event.once(s.onWillDispose)(()=>{this.clearEditorState(S),this.editorDisposables?.delete(s)}))}moveEditorState(S,s,l){const r=this.doLoad(),p=[...r.keys()];for(const u of p){const a=A.URI.parse(u);if(!l.isEqualOrParent(a,S))continue;let n;if((0,w.isEqual)(S,a))n=s;else{const g=(0,v.indexOfPath)(a.path,S.path);n=(0,w.joinPath)(s,a.path.substr(g+S.path.length+1))}const h=r.get(u,0);h&&(r.delete(u),r.set(n.toString(),h))}}doGetResource(S){return(0,f.isEditorInput)(S)?S.resource:S}doLoad(){if(!this.cache){this.cache=new _.LRUCache(this.limit);const S=this.memento[this.key];Array.isArray(S)&&this.cache.fromJSON(S)}return this.cache}saveState(){const S=this.doLoad();this.cleanedUp||(this.cleanUp(),this.cleanedUp=!0),this.memento[this.key]=S.toJSON()}cleanUp(){const S=this.doLoad(),s=[...S.entries()];for(const[l,r]of s)for(const p of Object.keys(r)){const u=Number(p);u===c.SHARED_EDITOR_STATE&&this.shareEditorState||this.editorGroupService.getGroup(u)||(delete r[u],(0,D.isEmptyObject)(r)&&S.delete(l))}}}e.EditorMemento=c,c.SHARED_EDITOR_STATE=-1}),define(ne[568],re([1,0,1391,6,166,566,139,10,2,24,13,23,5,237,1053]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseBinaryResourceEditor=void 0;let i=class extends _.EditorPane{constructor(s,l,r,p,u,a){super(s,r,p,u);this.callbacks=l,this.instantiationService=a,this._onDidChangeMetadata=this._register(new f.Emitter),this.onDidChangeMetadata=this._onDidChangeMetadata.event,this._onDidOpenInPlace=this._register(new f.Emitter),this.onDidOpenInPlace=this._onDidOpenInPlace.event,this.inputDisposable=this._register(new I.MutableDisposable)}getTitle(){return this.input?this.input.getName():(0,t.localize)(0,null)}createEditor(s){this.binaryContainer=document.createElement("div"),this.binaryContainer.className="monaco-binary-resource-editor",this.binaryContainer.style.outline="none",this.binaryContainer.tabIndex=0,this.scrollbar=this._register(new k.DomScrollableElement(this.binaryContainer,{horizontal:1,vertical:1})),s.appendChild(this.scrollbar.getDomNode())}async setInput(s,l,r,p){await super.setInput(s,l,r,p);const u=await s.resolve();if(!p.isCancellationRequested){if(!(u instanceof A.BinaryEditorModel))throw new Error("Unable to open file as binary");this.inputDisposable.value=this.renderInput(s,l,u)}}renderInput(s,l,r){const[p,u]=(0,v.assertAllDefined)(this.binaryContainer,this.scrollbar);(0,D.clearNode)(p);const a=new I.DisposableStore,n=document.createElement("p");n.textContent=(0,t.localize)(1,null),p.appendChild(n),this._register(this.instantiationService.createInstance(c.Link,n,{label:(0,t.localize)(2,null),href:""},{opener:async()=>{await this.callbacks.openInternal(s,l),this._onDidOpenInPlace.fire()}})),u.scanDomNode();const h=r.getSize();return this.handleMetadataChanged(typeof h=="number"?C.ByteSize.formatSize(h):""),a}handleMetadataChanged(s){this.metadata=s,this._onDidChangeMetadata.fire()}getMetadata(){return this.metadata}clearInput(){this.handleMetadataChanged(void 0),this.binaryContainer&&(0,D.clearNode)(this.binaryContainer),this.inputDisposable.clear(),super.clearInput()}layout(s){const[l,r]=(0,v.assertAllDefined)(this.binaryContainer,this.scrollbar);(0,D.size)(l,s.width,s.height),r.scanDomNode()}focus(){(0,v.assertIsDefined)(this.binaryContainer).focus()}dispose(){this.binaryContainer?.remove(),super.dispose()}};i=Ee([W(4,w.IStorageService),W(5,o.IInstantiationService)],i),e.BaseBinaryResourceEditor=i}),define(ne[410],re([1,0,26,130,6,2,22,36,15,303]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ChoiceAction=e.NotificationViewItem=e.NotificationViewItemProgress=e.NotificationViewItemContentChangeKind=e.isNotificationViewItem=e.NotificationsModel=e.NotificationHandle=e.StatusMessageChangeType=e.NotificationChangeType=void 0;var v;(function(u){u[u.ADD=0]="ADD",u[u.CHANGE=1]="CHANGE",u[u.EXPAND_COLLAPSE=2]="EXPAND_COLLAPSE",u[u.REMOVE=3]="REMOVE"})(v=e.NotificationChangeType||(e.NotificationChangeType={}));var C;(function(u){u[u.ADD=0]="ADD",u[u.REMOVE=1]="REMOVE"})(C=e.StatusMessageChangeType||(e.StatusMessageChangeType={}));class o extends A.Disposable{constructor(a,n){super();this.item=a,this.onClose=n,this._onDidClose=this._register(new _.Emitter),this.onDidClose=this._onDidClose.event,this._onDidChangeVisibility=this._register(new _.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.registerListeners()}registerListeners(){this._register(this.item.onDidChangeVisibility(a=>this._onDidChangeVisibility.fire(a))),_.Event.once(this.item.onDidClose)(()=>{this._onDidClose.fire(),this.dispose()})}get progress(){return this.item.progress}updateSeverity(a){this.item.updateSeverity(a)}updateMessage(a){this.item.updateMessage(a)}updateActions(a){this.item.updateActions(a)}close(){this.onClose(this.item),this.dispose()}}e.NotificationHandle=o;class c extends A.Disposable{constructor(){super(...arguments);this._onDidChangeNotification=this._register(new _.Emitter),this.onDidChangeNotification=this._onDidChangeNotification.event,this._onDidChangeStatusMessage=this._register(new _.Emitter),this.onDidChangeStatusMessage=this._onDidChangeStatusMessage.event,this._onDidChangeFilter=this._register(new _.Emitter),this.onDidChangeFilter=this._onDidChangeFilter.event,this._notifications=[],this.filter=t.NotificationsFilter.OFF}get notifications(){return this._notifications}get statusMessage(){return this._statusMessage}setFilter(a){this.filter=a,this._onDidChangeFilter.fire(a)}addNotification(a){const n=this.createViewItem(a);if(!n)return c.NO_OP_NOTIFICATION;const h=this.findNotification(n);return h&&h.close(),this._notifications.splice(0,0,n),this._onDidChangeNotification.fire({item:n,index:0,kind:0}),new o(n,g=>this.onClose(g))}onClose(a){const n=this.findNotification(a);n&&n!==a?n.close():a.close()}findNotification(a){return this._notifications.find(n=>n.equals(a))}createViewItem(a){const n=l.create(a,this.filter);if(!n)return;const h=(m,b)=>{const E=this._notifications.indexOf(n);E>=0&&this._onDidChangeNotification.fire({item:n,index:E,kind:m,detail:b})},g=n.onDidChangeExpansion(()=>h(2)),d=n.onDidChangeContent(m=>h(1,m.kind));return _.Event.once(n.onDidClose)(()=>{g.dispose(),d.dispose();const m=this._notifications.indexOf(n);m>=0&&(this._notifications.splice(m,1),this._onDidChangeNotification.fire({item:n,index:m,kind:3}))}),n}showStatusMessage(a,n){const h=p.create(a,n);return h?(this._statusMessage=h,this._onDidChangeStatusMessage.fire({kind:0,item:h}),(0,A.toDisposable)(()=>{this._statusMessage===h&&(this._statusMessage=void 0,this._onDidChangeStatusMessage.fire({kind:1,item:h}))})):A.Disposable.None}}e.NotificationsModel=c,c.NO_OP_NOTIFICATION=new t.NoOpNotification;function i(u){return u instanceof l}e.isNotificationViewItem=i;var S;(function(u){u[u.SEVERITY=0]="SEVERITY",u[u.MESSAGE=1]="MESSAGE",u[u.ACTIONS=2]="ACTIONS",u[u.PROGRESS=3]="PROGRESS"})(S=e.NotificationViewItemContentChangeKind||(e.NotificationViewItemContentChangeKind={}));class s extends A.Disposable{constructor(){super();this._onDidChange=this._register(new _.Emitter),this.onDidChange=this._onDidChange.event,this._state=Object.create(null)}get state(){return this._state}infinite(){this._state.infinite||(this._state.infinite=!0,this._state.total=void 0,this._state.worked=void 0,this._state.done=void 0,this._onDidChange.fire())}done(){this._state.done||(this._state.done=!0,this._state.infinite=void 0,this._state.total=void 0,this._state.worked=void 0,this._onDidChange.fire())}total(a){this._state.total!==a&&(this._state.total=a,this._state.infinite=void 0,this._state.done=void 0,this._onDidChange.fire())}worked(a){typeof this._state.worked=="number"?this._state.worked+=a:this._state.worked=a,this._state.infinite=void 0,this._state.done=void 0,this._onDidChange.fire()}}e.NotificationViewItemProgress=s;class l extends A.Disposable{constructor(a,n,h,g,d,m,b,E){super();this.id=a,this._severity=n,this._sticky=h,this._silent=g,this._message=d,this._source=m,this._visible=!1,this._onDidChangeExpansion=this._register(new _.Emitter),this.onDidChangeExpansion=this._onDidChangeExpansion.event,this._onDidClose=this._register(new _.Emitter),this.onDidClose=this._onDidClose.event,this._onDidChangeContent=this._register(new _.Emitter),this.onDidChangeContent=this._onDidChangeContent.event,this._onDidChangeVisibility=this._register(new _.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,b&&this.setProgress(b),this.setActions(E)}static create(a,n=t.NotificationsFilter.OFF){if(!a||!a.message||(0,k.isCancellationError)(a.message))return;let h;typeof a.severity=="number"?h=a.severity:h=t.Severity.Info;const g=l.parseNotificationMessage(a.message);if(!g)return;let d;return a.actions?d=a.actions:(0,f.isErrorWithActions)(a.message)&&(d={primary:a.message.actions}),new l(a.id,h,a.sticky,a.silent||n===t.NotificationsFilter.SILENT||n===t.NotificationsFilter.ERROR&&a.severity!==t.Severity.Error,g,a.source,a.progress,d)}static parseNotificationMessage(a){let n;if(a instanceof Error?n=(0,f.toErrorMessage)(a,!1):typeof a=="string"&&(n=a),!n)return;const h=n;n.length>l.MAX_MESSAGE_LENGTH&&(n=`${n.substr(0,l.MAX_MESSAGE_LENGTH)}...`),n=n.replace(/(\r\n|\n|\r)/gm," ").trim();const g=(0,w.parseLinkedText)(n);return{raw:h,linkedText:g,original:a}}setProgress(a){a.infinite?this.progress.infinite():a.total&&(this.progress.total(a.total),a.worked&&this.progress.worked(a.worked))}setActions(a={primary:[],secondary:[]}){this._actions={primary:Array.isArray(a.primary)?a.primary:[],secondary:Array.isArray(a.secondary)?a.secondary:[]},this._expanded=a.primary&&a.primary.length>0}get canCollapse(){return!this.hasActions}get expanded(){return!!this._expanded}get severity(){return this._severity}get sticky(){if(this._sticky)return!0;const a=this.hasActions;return!!(a&&this._severity===t.Severity.Error||!a&&this._expanded||this._progress&&!this._progress.state.done)}get silent(){return!!this._silent}get hasActions(){return!this._actions||!this._actions.primary?!1:this._actions.primary.length>0}get hasProgress(){return!!this._progress}get progress(){return this._progress||(this._progress=this._register(new s),this._register(this._progress.onDidChange(()=>this._onDidChangeContent.fire({kind:3})))),this._progress}get message(){return this._message}get source(){return typeof this._source=="string"?this._source:this._source?this._source.label:void 0}get sourceId(){return this._source&&typeof this._source!="string"&&"id"in this._source?this._source.id:void 0}get actions(){return this._actions}get visible(){return this._visible}updateSeverity(a){a!==this._severity&&(this._severity=a,this._onDidChangeContent.fire({kind:0}))}updateMessage(a){const n=l.parseNotificationMessage(a);!n||n.raw===this._message.raw||(this._message=n,this._onDidChangeContent.fire({kind:1}))}updateActions(a){this.setActions(a),this._onDidChangeContent.fire({kind:2})}updateVisibility(a){this._visible!==a&&(this._visible=a,this._onDidChangeVisibility.fire(a))}expand(){this._expanded||!this.canCollapse||(this._expanded=!0,this._onDidChangeExpansion.fire())}collapse(a){!this._expanded||!this.canCollapse||(this._expanded=!1,a||this._onDidChangeExpansion.fire())}toggle(){this._expanded?this.collapse():this.expand()}close(){this._onDidClose.fire(),this.dispose()}equals(a){if(this.hasProgress||a.hasProgress)return!1;if(typeof this.id=="string"||typeof a.id=="string")return this.id===a.id;if(typeof this._source=="object"){if(this._source.label!==a.source||this._source.id!==a.sourceId)return!1}else if(this._source!==a.source)return!1;if(this._message.raw!==a.message.raw)return!1;const n=this._actions&&this._actions.primary||[],h=a.actions&&a.actions.primary||[];return(0,I.equals)(n,h,(g,d)=>g.id+g.label===d.id+d.label)}}e.NotificationViewItem=l,l.MAX_MESSAGE_LENGTH=1e3;class r extends D.Action{constructor(a,n){super(a,n.label,void 0,!0,async()=>{n.run(),this._onDidRun.fire()});this._onDidRun=this._register(new _.Emitter),this.onDidRun=this._onDidRun.event,this._keepOpen=!!n.keepOpen,this._menu=!n.isSecondary&&n.menu?n.menu.map((h,g)=>new r(`${a}.${g}`,h)):void 0}get menu(){return this._menu}get keepOpen(){return this._keepOpen}}e.ChoiceAction=r;class p{static create(a,n){if(!a||(0,k.isCancellationError)(a))return;let h;if(a instanceof Error?h=(0,f.toErrorMessage)(a,!1):typeof a=="string"&&(h=a),!!h)return{message:h,options:n}}}}),define(ne[482],re([1,0,28,7,94,410,16,1412,71,27,775,74]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerNotificationCommands=e.CLEAR_ALL_NOTIFICATIONS=e.CLEAR_NOTIFICATION=e.EXPAND_NOTIFICATION=e.COLLAPSE_NOTIFICATION=e.HIDE_NOTIFICATION_TOAST=e.HIDE_NOTIFICATIONS_CENTER=e.SHOW_NOTIFICATIONS_CENTER=void 0,e.SHOW_NOTIFICATIONS_CENTER="notifications.showList",e.HIDE_NOTIFICATIONS_CENTER="notifications.hideList";const o="notifications.toggleList";e.HIDE_NOTIFICATION_TOAST="notifications.hideToasts";const c="notifications.focusToasts",i="notifications.focusNextToast",S="notifications.focusPreviousToast",s="notifications.focusFirstToast",l="notifications.focusLastToast";e.COLLAPSE_NOTIFICATION="notification.collapse",e.EXPAND_NOTIFICATION="notification.expand";const r="notification.toggle";e.CLEAR_NOTIFICATION="notification.clear",e.CLEAR_ALL_NOTIFICATIONS="notifications.clearAll";function p(u,a,n){function h(d,m){if((0,A.isNotificationViewItem)(m))return m;const b=d.lastFocusedList;if(b instanceof I.WorkbenchList){const E=b.getFocusedElements()[0];if((0,A.isNotificationViewItem)(E))return E}}t.CommandsRegistry.registerCommand(e.SHOW_NOTIFICATIONS_CENTER,()=>{a.hide(),u.show()}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.HIDE_NOTIFICATIONS_CENTER,weight:200+50,when:C.NotificationsCenterVisibleContext,primary:9,handler:d=>{const m=d.get(w.ITelemetryService);for(const b of n.notifications)b.visible&&m.publicLog2("notification:hide",(0,v.notificationToMetrics)(b.message.original,b.sourceId,b.silent));u.hide()}}),t.CommandsRegistry.registerCommand(o,d=>{u.isVisible?u.hide():(a.hide(),u.show())}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.CLEAR_NOTIFICATION,weight:200,when:C.NotificationFocusedContext,primary:20,mac:{primary:2048|1},handler:(d,m)=>{const b=h(d.get(I.IListService),m);b&&!b.hasProgress&&b.close()}}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.EXPAND_NOTIFICATION,weight:200,when:C.NotificationFocusedContext,primary:17,handler:(d,m)=>{const b=h(d.get(I.IListService),m);b&&b.expand()}}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.COLLAPSE_NOTIFICATION,weight:200,when:C.NotificationFocusedContext,primary:15,handler:(d,m)=>{const b=h(d.get(I.IListService),m);b&&b.collapse()}}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:r,weight:200,when:C.NotificationFocusedContext,primary:10,secondary:[3],handler:d=>{const m=h(d.get(I.IListService));m&&m.toggle()}}),t.CommandsRegistry.registerCommand(e.HIDE_NOTIFICATION_TOAST,d=>{const m=d.get(w.ITelemetryService);for(const b of n.notifications)b.visible&&m.publicLog2("notification:hide",(0,v.notificationToMetrics)(b.message.original,b.sourceId,b.silent));a.hide()}),_.KeybindingsRegistry.registerKeybindingRule({id:e.HIDE_NOTIFICATION_TOAST,weight:200-50,when:C.NotificationsToastsVisibleContext,primary:9}),_.KeybindingsRegistry.registerKeybindingRule({id:e.HIDE_NOTIFICATION_TOAST,weight:200+100,when:f.ContextKeyExpr.and(C.NotificationsToastsVisibleContext,C.NotificationFocusedContext),primary:9}),t.CommandsRegistry.registerCommand(c,()=>a.focus()),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:i,weight:200,when:f.ContextKeyExpr.and(C.NotificationFocusedContext,C.NotificationsToastsVisibleContext),primary:18,handler:d=>{a.focusNext()}}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:S,weight:200,when:f.ContextKeyExpr.and(C.NotificationFocusedContext,C.NotificationsToastsVisibleContext),primary:16,handler:d=>{a.focusPrevious()}}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:s,weight:200,when:f.ContextKeyExpr.and(C.NotificationFocusedContext,C.NotificationsToastsVisibleContext),primary:11,secondary:[14],handler:d=>{a.focusFirst()}}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:l,weight:200,when:f.ContextKeyExpr.and(C.NotificationFocusedContext,C.NotificationsToastsVisibleContext),primary:12,secondary:[13],handler:d=>{a.focusLast()}}),t.CommandsRegistry.registerCommand(e.CLEAR_ALL_NOTIFICATIONS,()=>u.clearAll());const g={value:(0,D.localize)(0,null),original:"Notifications"};k.MenuRegistry.appendMenuItem(k.MenuId.CommandPalette,{command:{id:e.SHOW_NOTIFICATIONS_CENTER,title:{value:(0,D.localize)(1,null),original:"Show Notifications"},category:g}}),k.MenuRegistry.appendMenuItem(k.MenuId.CommandPalette,{command:{id:e.HIDE_NOTIFICATIONS_CENTER,title:{value:(0,D.localize)(2,null),original:"Hide Notifications"},category:g},when:C.NotificationsCenterVisibleContext}),k.MenuRegistry.appendMenuItem(k.MenuId.CommandPalette,{command:{id:e.CLEAR_ALL_NOTIFICATIONS,title:{value:(0,D.localize)(3,null),original:"Clear All Notifications"},category:g}}),k.MenuRegistry.appendMenuItem(k.MenuId.CommandPalette,{command:{id:c,title:{value:(0,D.localize)(4,null),original:"Focus Notification Toast"},category:g},when:C.NotificationsToastsVisibleContext})}e.registerNotificationCommands=p}),define(ne[569],re([1,0,410,1409,36,27,26,482,28,95,33,63,12,116,674]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationActionRunner=e.CopyNotificationMessageAction=e.ConfigureNotificationAction=e.CollapseNotificationAction=e.ExpandNotificationAction=e.HideNotificationsCenterAction=e.ClearAllNotificationsAction=e.ClearNotificationAction=void 0;const i=(0,C.registerIcon)("notifications-clear",v.Codicon.close,(0,f.localize)(0,null)),S=(0,C.registerIcon)("notifications-clear-all",v.Codicon.clearAll,(0,f.localize)(1,null)),s=(0,C.registerIcon)("notifications-hide",v.Codicon.chevronDown,(0,f.localize)(2,null)),l=(0,C.registerIcon)("notifications-expand",v.Codicon.chevronUp,(0,f.localize)(3,null)),r=(0,C.registerIcon)("notifications-collapse",v.Codicon.chevronDown,(0,f.localize)(4,null)),p=(0,C.registerIcon)("notifications-configure",v.Codicon.gear,(0,f.localize)(5,null));let u=class extends _.Action{constructor(y,T,R){super(y,T,o.ThemeIcon.asClassName(i));this.commandService=R}async run(y){this.commandService.executeCommand(D.CLEAR_NOTIFICATION,y)}};u.ID=D.CLEAR_NOTIFICATION,u.LABEL=(0,f.localize)(6,null),u=Ee([W(2,I.ICommandService)],u),e.ClearNotificationAction=u;let a=class extends _.Action{constructor(y,T,R){super(y,T,o.ThemeIcon.asClassName(S));this.commandService=R}async run(){this.commandService.executeCommand(D.CLEAR_ALL_NOTIFICATIONS)}};a.ID=D.CLEAR_ALL_NOTIFICATIONS,a.LABEL=(0,f.localize)(7,null),a=Ee([W(2,I.ICommandService)],a),e.ClearAllNotificationsAction=a;let n=class extends _.Action{constructor(y,T,R){super(y,T,o.ThemeIcon.asClassName(s));this.commandService=R}async run(){this.commandService.executeCommand(D.HIDE_NOTIFICATIONS_CENTER)}};n.ID=D.HIDE_NOTIFICATIONS_CENTER,n.LABEL=(0,f.localize)(8,null),n=Ee([W(2,I.ICommandService)],n),e.HideNotificationsCenterAction=n;let h=class extends _.Action{constructor(y,T,R){super(y,T,o.ThemeIcon.asClassName(l));this.commandService=R}async run(y){this.commandService.executeCommand(D.EXPAND_NOTIFICATION,y)}};h.ID=D.EXPAND_NOTIFICATION,h.LABEL=(0,f.localize)(9,null),h=Ee([W(2,I.ICommandService)],h),e.ExpandNotificationAction=h;let g=class extends _.Action{constructor(y,T,R){super(y,T,o.ThemeIcon.asClassName(r));this.commandService=R}async run(y){this.commandService.executeCommand(D.COLLAPSE_NOTIFICATION,y)}};g.ID=D.COLLAPSE_NOTIFICATION,g.LABEL=(0,f.localize)(10,null),g=Ee([W(2,I.ICommandService)],g),e.CollapseNotificationAction=g;class d extends _.Action{constructor(y,T,R){super(y,T,o.ThemeIcon.asClassName(p));this.configurationActions=R}}e.ConfigureNotificationAction=d,d.ID="workbench.action.configureNotification",d.LABEL=(0,f.localize)(11,null);let m=class extends _.Action{constructor(y,T,R){super(y,T);this.clipboardService=R}run(y){return this.clipboardService.writeText(y.message.raw)}};m.ID="workbench.action.copyNotificationMessage",m.LABEL=(0,f.localize)(12,null),m=Ee([W(2,w.IClipboardService)],m),e.CopyNotificationMessageAction=m;let b=class extends _.ActionRunner{constructor(y,T){super();this.telemetryService=y,this.notificationService=T}async runAction(y,T){this.telemetryService.publicLog2("workbenchActionExecuted",{id:y.id,from:"message"}),(0,t.isNotificationViewItem)(T)&&this.telemetryService.publicLog2("notification:actionExecuted",{id:(0,c.hash)(T.message.original.toString()).toString(),actionLabel:y.label,source:T.sourceId||"core",silent:T.silent});try{await super.runAction(y,T)}catch(R){this.notificationService.error(R)}}};b=Ee([W(0,A.ITelemetryService),W(1,k.INotificationService)],b),e.NotificationActionRunner=b}),define(ne[2121],re([1,0,10,41,9,1416,162,68,12,78,36,5,2,37,410,569,38,280,26,15,33,262,224,129,6]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationTemplateRenderer=e.NotificationRenderer=e.NotificationsListDelegate=void 0;class d{constructor(T){this.offsetHelper=this.createOffsetHelper(T)}createOffsetHelper(T){const R=document.createElement("div");return R.classList.add("notification-offset-helper"),T.appendChild(R),R}getHeight(T){if(!T.expanded)return d.ROW_HEIGHT;let R=d.ROW_HEIGHT;const O=this.computePreferredHeight(T);return d.LINE_HEIGHT<O&&(R+=O-d.LINE_HEIGHT),(T.source||(0,p.isNonEmptyArray)(T.actions&&T.actions.primary))&&(R+=d.ROW_HEIGHT),R===d.ROW_HEIGHT&&T.collapse(!0),R}computePreferredHeight(T){let R=1;T.canCollapse&&R++,(0,p.isNonEmptyArray)(T.actions&&T.actions.secondary)&&R++,this.offsetHelper.style.width=`${450-(10+26+R*(24+8)-4)}px`;const O=m.render(T.message);this.offsetHelper.appendChild(O);const x=Math.max(this.offsetHelper.offsetHeight,this.offsetHelper.scrollHeight);return(0,t.clearNode)(this.offsetHelper),x}getTemplateId(T){if(T instanceof i.NotificationViewItem)return b.TEMPLATE_ID;throw new Error("unknown element type: "+T)}}e.NotificationsListDelegate=d,d.ROW_HEIGHT=42,d.LINE_HEIGHT=22;class m{static render(T,R){const O=document.createElement("span");for(const x of T.linkedText.nodes)if(typeof x=="string")O.appendChild(document.createTextNode(x));else{let F=x.title;!F&&x.href.startsWith("command:")?F=(0,A.localize)(0,null,x.href.substr("command:".length)):F||(F=x.href);const L=(0,t.$)("a",{href:x.href,title:F},x.label);if(R){const M=P=>{t.EventHelper.stop(P,!0),R.callback(x.href)},N=R.toDispose.add(new n.DomEmitter(L,"click")).event;R.toDispose.add(h.Gesture.addTarget(L));const B=R.toDispose.add(new n.DomEmitter(L,h.EventType.Tap)).event;g.Event.any(N,B)(M,null,R.toDispose)}O.appendChild(L)}return O}}let b=class bo{constructor(T,R,O,x){this.actionRunner=T,this.themeService=R,this.contextMenuService=O,this.instantiationService=x}get templateId(){return bo.TEMPLATE_ID}renderTemplate(T){const R=Object.create(null);R.toDispose=new o.DisposableStore,R.container=document.createElement("div"),R.container.classList.add("notification-list-item"),R.mainRow=document.createElement("div"),R.mainRow.classList.add("notification-list-item-main-row"),R.icon=document.createElement("div"),R.icon.classList.add("notification-list-item-icon","codicon"),R.message=document.createElement("div"),R.message.classList.add("notification-list-item-message");const O=document.createElement("div");return O.classList.add("notification-list-item-toolbar-container"),R.toolbar=new w.ActionBar(O,{ariaLabel:(0,A.localize)(1,null),actionViewItemProvider:x=>{if(x&&x instanceof S.ConfigureNotificationAction){const F=new a.DropdownMenuActionViewItem(x,x.configurationActions,this.contextMenuService,{actionRunner:this.actionRunner,classNames:x.class});return R.toDispose.add(F),F}},actionRunner:this.actionRunner}),R.toDispose.add(R.toolbar),R.detailsRow=document.createElement("div"),R.detailsRow.classList.add("notification-list-item-details-row"),R.source=document.createElement("div"),R.source.classList.add("notification-list-item-source"),R.buttonsContainer=document.createElement("div"),R.buttonsContainer.classList.add("notification-list-item-buttons-container"),T.appendChild(R.container),R.container.appendChild(R.detailsRow),R.detailsRow.appendChild(R.source),R.detailsRow.appendChild(R.buttonsContainer),R.container.appendChild(R.mainRow),R.mainRow.appendChild(R.icon),R.mainRow.appendChild(R.message),R.mainRow.appendChild(O),R.progress=new l.ProgressBar(T),R.toDispose.add((0,D.attachProgressBarStyler)(R.progress,this.themeService)),R.toDispose.add(R.progress),R.renderer=this.instantiationService.createInstance(E,R,this.actionRunner),R.toDispose.add(R.renderer),R}renderElement(T,R,O){O.renderer.setInput(T)}disposeTemplate(T){(0,o.dispose)(T.toDispose)}};b.TEMPLATE_ID="notification",b=Ee([W(1,I.IThemeService),W(2,c.IContextMenuService),W(3,C.IInstantiationService)],b),e.NotificationRenderer=b;let E=class li extends o.Disposable{constructor(T,R,O,x,F,L,M){super();this.template=T,this.actionRunner=R,this.openerService=O,this.instantiationService=x,this.themeService=F,this.keybindingService=L,this.contextMenuService=M,this.inputDisposables=this._register(new o.DisposableStore),li.closeNotificationAction||(li.closeNotificationAction=x.createInstance(S.ClearNotificationAction,S.ClearNotificationAction.ID,S.ClearNotificationAction.LABEL),li.expandNotificationAction=x.createInstance(S.ExpandNotificationAction,S.ExpandNotificationAction.ID,S.ExpandNotificationAction.LABEL),li.collapseNotificationAction=x.createInstance(S.CollapseNotificationAction,S.CollapseNotificationAction.ID,S.CollapseNotificationAction.LABEL))}setInput(T){this.inputDisposables.clear(),this.render(T)}render(T){this.template.container.classList.toggle("expanded",T.expanded),this.inputDisposables.add((0,t.addDisposableListener)(this.template.container,t.EventType.MOUSE_UP,O=>{O.button===1&&t.EventHelper.stop(O,!0)})),this.inputDisposables.add((0,t.addDisposableListener)(this.template.container,t.EventType.AUXCLICK,O=>{!T.hasProgress&&O.button===1&&(t.EventHelper.stop(O,!0),T.close())})),this.renderSeverity(T);const R=this.renderMessage(T);this.renderSecondaryActions(T,R),this.renderSource(T),this.renderButtons(T),this.renderProgress(T),this.inputDisposables.add(T.onDidChangeContent(O=>{switch(O.kind){case 0:this.renderSeverity(T);break;case 3:this.renderProgress(T);break;case 1:this.renderMessage(T);break}}))}renderSeverity(T){li.SEVERITIES.forEach(R=>{T.severity!==R&&this.template.icon.classList.remove(...this.toSeverityIcon(R).classNamesArray)}),this.template.icon.classList.add(...this.toSeverityIcon(T.severity).classNamesArray)}renderMessage(T){(0,t.clearNode)(this.template.message),this.template.message.appendChild(m.render(T.message,{callback:x=>this.openerService.open(_.URI.parse(x),{allowCommands:!0}),toDispose:this.inputDisposables}));const R=T.canCollapse&&!T.expanded&&this.template.message.scrollWidth>this.template.message.clientWidth;R?this.template.message.title=this.template.message.textContent+"":this.template.message.removeAttribute("title");const O=this.template.message.querySelectorAll("a");for(let x=0;x<O.length;x++)O.item(x).tabIndex=-1;return R}renderSecondaryActions(T,R){const O=[],x=T.actions?T.actions.secondary:void 0;if((0,p.isNonEmptyArray)(x)){const L=this.instantiationService.createInstance(S.ConfigureNotificationAction,S.ConfigureNotificationAction.ID,S.ConfigureNotificationAction.LABEL,x);O.push(L),this.inputDisposables.add(L)}let F=!1;T.canCollapse&&(T.expanded||T.source||R)&&(F=!0),F&&O.push(T.expanded?li.collapseNotificationAction:li.expandNotificationAction),T.hasProgress||O.push(li.closeNotificationAction),this.template.toolbar.clear(),this.template.toolbar.context=T,O.forEach(L=>this.template.toolbar.push(L,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(L)}))}renderSource(T){T.expanded&&T.source?(this.template.source.textContent=(0,A.localize)(2,null,T.source),this.template.source.title=T.source):(this.template.source.textContent="",this.template.source.removeAttribute("title"))}renderButtons(T){(0,t.clearNode)(this.template.buttonsContainer);const R=T.actions?T.actions.primary:void 0;if(T.expanded&&(0,p.isNonEmptyArray)(R)){const O=this,x=new class extends v.ActionRunner{async runAction(L){O.actionRunner.run(L,T),(!(L instanceof i.ChoiceAction)||!L.keepOpen)&&T.close()}},F=this.inputDisposables.add(new k.ButtonBar(this.template.buttonsContainer));for(let L=0;L<R.length;L++){const M=R[L],N={title:!0,secondary:L>0},B=M instanceof i.ChoiceAction?M.menu:void 0,P=this.inputDisposables.add(B?F.addButtonWithDropdown({...N,contextMenuProvider:this.contextMenuService,actions:B,actionRunner:x}):F.addButton(N));P.label=M.label,this.inputDisposables.add(P.onDidClick(V=>{V&&t.EventHelper.stop(V,!0),x.run(M)})),this.inputDisposables.add((0,D.attachButtonStyler)(P,this.themeService))}}}renderProgress(T){if(!T.hasProgress){this.template.progress.stop().hide();return}const R=T.progress.state;R.infinite?this.template.progress.infinite().show():typeof R.total=="number"||typeof R.worked=="number"?(typeof R.total=="number"&&!this.template.progress.hasTotal()&&this.template.progress.total(R.total),typeof R.worked=="number"&&this.template.progress.setWorked(R.worked).show()):this.template.progress.done().hide()}toSeverityIcon(T){switch(T){case r.Severity.Warning:return u.Codicon.warning;case r.Severity.Error:return u.Codicon.error}return u.Codicon.info}getKeybindingLabel(T){const R=this.keybindingService.lookupKeybinding(T.id);return R?R.getLabel():null}};E.SEVERITIES=[r.Severity.Info,r.Severity.Warning,r.Severity.Error],E=Ee([W(2,f.IOpenerService),W(3,C.IInstantiationService),W(4,I.IThemeService),W(5,s.IKeybindingService),W(6,c.IContextMenuService)],E),e.NotificationTemplateRenderer=E}),define(ne[782],re([1,0,9,51,6,19,2,152,34,8]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceGlobMatcher=void 0;let v=class Ti extends k.Disposable{constructor(o,c,i,S){super();this.globFn=o,this.shouldUpdate=c,this.contextService=i,this.configurationService=S,this._onExpressionChange=this._register(new _.Emitter),this.onExpressionChange=this._onExpressionChange.event,this.mapRootToParsedExpression=new Map,this.mapRootToExpressionConfig=new Map,this.updateExcludes(!1),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(o=>{this.shouldUpdate(o)&&this.updateExcludes(!0)})),this._register(this.contextService.onDidChangeWorkspaceFolders(()=>this.updateExcludes(!0)))}updateExcludes(o){let c=!1;this.contextService.getWorkspace().folders.forEach(S=>{const s=this.globFn(S.uri);(!this.mapRootToExpressionConfig.has(S.uri.toString())||!(0,f.equals)(this.mapRootToExpressionConfig.get(S.uri.toString()),s))&&(c=!0,this.mapRootToParsedExpression.set(S.uri.toString(),(0,D.parse)(s)),this.mapRootToExpressionConfig.set(S.uri.toString(),(0,f.deepClone)(s)))}),this.mapRootToExpressionConfig.forEach((S,s)=>{s!==Ti.NO_ROOT&&s&&!this.contextService.getWorkspaceFolder(t.URI.parse(s))&&(this.mapRootToParsedExpression.delete(s),this.mapRootToExpressionConfig.delete(s),c=!0)});const i=this.globFn();(!this.mapRootToExpressionConfig.has(Ti.NO_ROOT)||!(0,f.equals)(this.mapRootToExpressionConfig.get(Ti.NO_ROOT),i))&&(c=!0,this.mapRootToParsedExpression.set(Ti.NO_ROOT,(0,D.parse)(i)),this.mapRootToExpressionConfig.set(Ti.NO_ROOT,(0,f.deepClone)(i))),o&&c&&this._onExpressionChange.fire()}matches(o){const c=this.contextService.getWorkspaceFolder(o);let i;c&&this.mapRootToParsedExpression.has(c.uri.toString())?i=this.mapRootToParsedExpression.get(c.uri.toString()):i=this.mapRootToParsedExpression.get(Ti.NO_ROOT);let S;return c?S=(0,A.relativePath)(c.uri,o):S=o.fsPath,!!i&&typeof S=="string"&&!!i(S)}};v.NO_ROOT=null,v=Ee([W(2,I.IWorkspaceContextService),W(3,w.IConfigurationService)],v),e.ResourceGlobMatcher=v}),define(ne[82],re([1,0,1438,32,66,127]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WINDOW_INACTIVE_BORDER=e.WINDOW_ACTIVE_BORDER=e.NOTIFICATIONS_INFO_ICON_FOREGROUND=e.NOTIFICATIONS_WARNING_ICON_FOREGROUND=e.NOTIFICATIONS_ERROR_ICON_FOREGROUND=e.NOTIFICATIONS_BORDER=e.NOTIFICATIONS_CENTER_HEADER_BACKGROUND=e.NOTIFICATIONS_CENTER_HEADER_FOREGROUND=e.NOTIFICATIONS_LINKS=e.NOTIFICATIONS_BACKGROUND=e.NOTIFICATIONS_FOREGROUND=e.NOTIFICATIONS_TOAST_BORDER=e.NOTIFICATIONS_CENTER_BORDER=e.MENUBAR_SELECTION_BORDER=e.MENUBAR_SELECTION_BACKGROUND=e.MENUBAR_SELECTION_FOREGROUND=e.TITLE_BAR_BORDER=e.TITLE_BAR_INACTIVE_BACKGROUND=e.TITLE_BAR_ACTIVE_BACKGROUND=e.TITLE_BAR_INACTIVE_FOREGROUND=e.TITLE_BAR_ACTIVE_FOREGROUND=e.SIDE_BAR_SECTION_HEADER_BORDER=e.SIDE_BAR_SECTION_HEADER_FOREGROUND=e.SIDE_BAR_SECTION_HEADER_BACKGROUND=e.SIDE_BAR_DRAG_AND_DROP_BACKGROUND=e.SIDE_BAR_TITLE_FOREGROUND=e.SIDE_BAR_BORDER=e.SIDE_BAR_FOREGROUND=e.SIDE_BAR_BACKGROUND=e.EXTENSION_BADGE_REMOTE_FOREGROUND=e.EXTENSION_BADGE_REMOTE_BACKGROUND=e.STATUS_BAR_HOST_NAME_FOREGROUND=e.STATUS_BAR_HOST_NAME_BACKGROUND=e.ACTIVITY_BAR_BADGE_FOREGROUND=e.ACTIVITY_BAR_BADGE_BACKGROUND=e.ACTIVITY_BAR_DRAG_AND_DROP_BORDER=e.ACTIVITY_BAR_ACTIVE_BACKGROUND=e.ACTIVITY_BAR_ACTIVE_FOCUS_BORDER=e.ACTIVITY_BAR_ACTIVE_BORDER=e.ACTIVITY_BAR_BORDER=e.ACTIVITY_BAR_INACTIVE_FOREGROUND=e.ACTIVITY_BAR_FOREGROUND=e.ACTIVITY_BAR_BACKGROUND=e.STATUS_BAR_WARNING_ITEM_FOREGROUND=e.STATUS_BAR_WARNING_ITEM_BACKGROUND=e.STATUS_BAR_ERROR_ITEM_FOREGROUND=e.STATUS_BAR_ERROR_ITEM_BACKGROUND=e.STATUS_BAR_PROMINENT_ITEM_HOVER_BACKGROUND=e.STATUS_BAR_PROMINENT_ITEM_BACKGROUND=e.STATUS_BAR_PROMINENT_ITEM_FOREGROUND=e.STATUS_BAR_ITEM_COMPACT_HOVER_BACKGROUND=e.STATUS_BAR_ITEM_HOVER_BACKGROUND=e.STATUS_BAR_ITEM_FOCUS_BORDER=e.STATUS_BAR_ITEM_ACTIVE_BACKGROUND=e.STATUS_BAR_NO_FOLDER_BORDER=e.STATUS_BAR_FOCUS_BORDER=e.STATUS_BAR_BORDER=e.STATUS_BAR_NO_FOLDER_BACKGROUND=e.STATUS_BAR_BACKGROUND=e.STATUS_BAR_NO_FOLDER_FOREGROUND=e.STATUS_BAR_FOREGROUND=e.BANNER_ICON_FOREGROUND=e.BANNER_FOREGROUND=e.BANNER_BACKGROUND=e.PANEL_SECTION_BORDER=e.PANEL_SECTION_HEADER_BORDER=e.PANEL_SECTION_HEADER_FOREGROUND=e.PANEL_SECTION_HEADER_BACKGROUND=e.PANEL_SECTION_DRAG_AND_DROP_BACKGROUND=e.PANEL_DRAG_AND_DROP_BORDER=e.PANEL_INPUT_BORDER=e.PANEL_ACTIVE_TITLE_BORDER=e.PANEL_INACTIVE_TITLE_FOREGROUND=e.PANEL_ACTIVE_TITLE_FOREGROUND=e.PANEL_BORDER=e.PANEL_BACKGROUND=e.SIDE_BY_SIDE_EDITOR_VERTICAL_BORDER=e.SIDE_BY_SIDE_EDITOR_HORIZONTAL_BORDER=e.EDITOR_DRAG_AND_DROP_BACKGROUND=e.EDITOR_GROUP_BORDER=e.EDITOR_GROUP_HEADER_BORDER=e.EDITOR_GROUP_HEADER_NO_TABS_BACKGROUND=e.EDITOR_GROUP_HEADER_TABS_BORDER=e.EDITOR_GROUP_HEADER_TABS_BACKGROUND=e.EDITOR_GROUP_FOCUSED_EMPTY_BORDER=e.EDITOR_GROUP_EMPTY_BACKGROUND=e.EDITOR_PANE_BACKGROUND=e.TAB_UNFOCUSED_INACTIVE_MODIFIED_BORDER=e.TAB_UNFOCUSED_ACTIVE_MODIFIED_BORDER=e.TAB_INACTIVE_MODIFIED_BORDER=e.TAB_ACTIVE_MODIFIED_BORDER=e.TAB_UNFOCUSED_HOVER_BORDER=e.TAB_HOVER_BORDER=e.TAB_UNFOCUSED_ACTIVE_BORDER_TOP=e.TAB_ACTIVE_BORDER_TOP=e.TAB_UNFOCUSED_ACTIVE_BORDER=e.TAB_ACTIVE_BORDER=e.TAB_LAST_PINNED_BORDER=e.TAB_BORDER=e.TAB_UNFOCUSED_HOVER_FOREGROUND=e.TAB_HOVER_FOREGROUND=e.TAB_UNFOCUSED_HOVER_BACKGROUND=e.TAB_HOVER_BACKGROUND=e.TAB_UNFOCUSED_INACTIVE_FOREGROUND=e.TAB_UNFOCUSED_ACTIVE_FOREGROUND=e.TAB_INACTIVE_FOREGROUND=e.TAB_ACTIVE_FOREGROUND=e.TAB_UNFOCUSED_INACTIVE_BACKGROUND=e.TAB_INACTIVE_BACKGROUND=e.TAB_UNFOCUSED_ACTIVE_BACKGROUND=e.TAB_ACTIVE_BACKGROUND=e.WORKBENCH_BACKGROUND=void 0;function k(D){switch(D.type){case A.ColorScheme.LIGHT:return _.Color.fromHex("#F3F3F3");case A.ColorScheme.HIGH_CONTRAST_LIGHT:return _.Color.fromHex("#FFFFFF");case A.ColorScheme.HIGH_CONTRAST_DARK:return _.Color.fromHex("#000000");default:return _.Color.fromHex("#252526")}}e.WORKBENCH_BACKGROUND=k,e.TAB_ACTIVE_BACKGROUND=(0,f.registerColor)("tab.activeBackground",{dark:f.editorBackground,light:f.editorBackground,hcDark:f.editorBackground,hcLight:f.editorBackground},(0,t.localize)(0,null)),e.TAB_UNFOCUSED_ACTIVE_BACKGROUND=(0,f.registerColor)("tab.unfocusedActiveBackground",{dark:e.TAB_ACTIVE_BACKGROUND,light:e.TAB_ACTIVE_BACKGROUND,hcDark:e.TAB_ACTIVE_BACKGROUND,hcLight:e.TAB_ACTIVE_BACKGROUND},(0,t.localize)(1,null)),e.TAB_INACTIVE_BACKGROUND=(0,f.registerColor)("tab.inactiveBackground",{dark:"#2D2D2D",light:"#ECECEC",hcDark:null,hcLight:null},(0,t.localize)(2,null)),e.TAB_UNFOCUSED_INACTIVE_BACKGROUND=(0,f.registerColor)("tab.unfocusedInactiveBackground",{dark:e.TAB_INACTIVE_BACKGROUND,light:e.TAB_INACTIVE_BACKGROUND,hcDark:e.TAB_INACTIVE_BACKGROUND,hcLight:e.TAB_INACTIVE_BACKGROUND},(0,t.localize)(3,null)),e.TAB_ACTIVE_FOREGROUND=(0,f.registerColor)("tab.activeForeground",{dark:_.Color.white,light:"#333333",hcDark:_.Color.white,hcLight:"#292929"},(0,t.localize)(4,null)),e.TAB_INACTIVE_FOREGROUND=(0,f.registerColor)("tab.inactiveForeground",{dark:(0,f.transparent)(e.TAB_ACTIVE_FOREGROUND,.5),light:(0,f.transparent)(e.TAB_ACTIVE_FOREGROUND,.7),hcDark:_.Color.white,hcLight:"#292929"},(0,t.localize)(5,null)),e.TAB_UNFOCUSED_ACTIVE_FOREGROUND=(0,f.registerColor)("tab.unfocusedActiveForeground",{dark:(0,f.transparent)(e.TAB_ACTIVE_FOREGROUND,.5),light:(0,f.transparent)(e.TAB_ACTIVE_FOREGROUND,.7),hcDark:_.Color.white,hcLight:"#292929"},(0,t.localize)(6,null)),e.TAB_UNFOCUSED_INACTIVE_FOREGROUND=(0,f.registerColor)("tab.unfocusedInactiveForeground",{dark:(0,f.transparent)(e.TAB_INACTIVE_FOREGROUND,.5),light:(0,f.transparent)(e.TAB_INACTIVE_FOREGROUND,.5),hcDark:_.Color.white,hcLight:"#292929"},(0,t.localize)(7,null)),e.TAB_HOVER_BACKGROUND=(0,f.registerColor)("tab.hoverBackground",{dark:null,light:null,hcDark:null,hcLight:null},(0,t.localize)(8,null)),e.TAB_UNFOCUSED_HOVER_BACKGROUND=(0,f.registerColor)("tab.unfocusedHoverBackground",{dark:(0,f.transparent)(e.TAB_HOVER_BACKGROUND,.5),light:(0,f.transparent)(e.TAB_HOVER_BACKGROUND,.7),hcDark:null,hcLight:null},(0,t.localize)(9,null)),e.TAB_HOVER_FOREGROUND=(0,f.registerColor)("tab.hoverForeground",{dark:null,light:null,hcDark:null,hcLight:null},(0,t.localize)(10,null)),e.TAB_UNFOCUSED_HOVER_FOREGROUND=(0,f.registerColor)("tab.unfocusedHoverForeground",{dark:(0,f.transparent)(e.TAB_HOVER_FOREGROUND,.5),light:(0,f.transparent)(e.TAB_HOVER_FOREGROUND,.5),hcDark:null,hcLight:null},(0,t.localize)(11,null)),e.TAB_BORDER=(0,f.registerColor)("tab.border",{dark:"#252526",light:"#F3F3F3",hcDark:f.contrastBorder,hcLight:f.contrastBorder},(0,t.localize)(12,null)),e.TAB_LAST_PINNED_BORDER=(0,f.registerColor)("tab.lastPinnedBorder",{dark:f.treeIndentGuidesStroke,light:f.treeIndentGuidesStroke,hcDark:f.contrastBorder,hcLight:f.contrastBorder},(0,t.localize)(13,null)),e.TAB_ACTIVE_BORDER=(0,f.registerColor)("tab.activeBorder",{dark:null,light:null,hcDark:null,hcLight:null},(0,t.localize)(14,null)),e.TAB_UNFOCUSED_ACTIVE_BORDER=(0,f.registerColor)("tab.unfocusedActiveBorder",{dark:(0,f.transparent)(e.TAB_ACTIVE_BORDER,.5),light:(0,f.transparent)(e.TAB_ACTIVE_BORDER,.7),hcDark:null,hcLight:null},(0,t.localize)(15,null)),e.TAB_ACTIVE_BORDER_TOP=(0,f.registerColor)("tab.activeBorderTop",{dark:null,light:null,hcDark:null,hcLight:"#B5200D"},(0,t.localize)(16,null)),e.TAB_UNFOCUSED_ACTIVE_BORDER_TOP=(0,f.registerColor)("tab.unfocusedActiveBorderTop",{dark:(0,f.transparent)(e.TAB_ACTIVE_BORDER_TOP,.5),light:(0,f.transparent)(e.TAB_ACTIVE_BORDER_TOP,.7),hcDark:null,hcLight:"#B5200D"},(0,t.localize)(17,null)),e.TAB_HOVER_BORDER=(0,f.registerColor)("tab.hoverBorder",{dark:null,light:null,hcDark:null,hcLight:null},(0,t.localize)(18,null)),e.TAB_UNFOCUSED_HOVER_BORDER=(0,f.registerColor)("tab.unfocusedHoverBorder",{dark:(0,f.transparent)(e.TAB_HOVER_BORDER,.5),light:(0,f.transparent)(e.TAB_HOVER_BORDER,.7),hcDark:null,hcLight:f.contrastBorder},(0,t.localize)(19,null)),e.TAB_ACTIVE_MODIFIED_BORDER=(0,f.registerColor)("tab.activeModifiedBorder",{dark:"#3399CC",light:"#33AAEE",hcDark:null,hcLight:f.contrastBorder},(0,t.localize)(20,null)),e.TAB_INACTIVE_MODIFIED_BORDER=(0,f.registerColor)("tab.inactiveModifiedBorder",{dark:(0,f.transparent)(e.TAB_ACTIVE_MODIFIED_BORDER,.5),light:(0,f.transparent)(e.TAB_ACTIVE_MODIFIED_BORDER,.5),hcDark:_.Color.white,hcLight:f.contrastBorder},(0,t.localize)(21,null)),e.TAB_UNFOCUSED_ACTIVE_MODIFIED_BORDER=(0,f.registerColor)("tab.unfocusedActiveModifiedBorder",{dark:(0,f.transparent)(e.TAB_ACTIVE_MODIFIED_BORDER,.5),light:(0,f.transparent)(e.TAB_ACTIVE_MODIFIED_BORDER,.7),hcDark:_.Color.white,hcLight:f.contrastBorder},(0,t.localize)(22,null)),e.TAB_UNFOCUSED_INACTIVE_MODIFIED_BORDER=(0,f.registerColor)("tab.unfocusedInactiveModifiedBorder",{dark:(0,f.transparent)(e.TAB_INACTIVE_MODIFIED_BORDER,.5),light:(0,f.transparent)(e.TAB_INACTIVE_MODIFIED_BORDER,.5),hcDark:_.Color.white,hcLight:f.contrastBorder},(0,t.localize)(23,null)),e.EDITOR_PANE_BACKGROUND=(0,f.registerColor)("editorPane.background",{dark:f.editorBackground,light:f.editorBackground,hcDark:f.editorBackground,hcLight:f.editorBackground},(0,t.localize)(24,null)),e.EDITOR_GROUP_EMPTY_BACKGROUND=(0,f.registerColor)("editorGroup.emptyBackground",{dark:null,light:null,hcDark:null,hcLight:null},(0,t.localize)(25,null)),e.EDITOR_GROUP_FOCUSED_EMPTY_BORDER=(0,f.registerColor)("editorGroup.focusedEmptyBorder",{dark:null,light:null,hcDark:f.focusBorder,hcLight:f.focusBorder},(0,t.localize)(26,null)),e.EDITOR_GROUP_HEADER_TABS_BACKGROUND=(0,f.registerColor)("editorGroupHeader.tabsBackground",{dark:"#252526",light:"#F3F3F3",hcDark:null,hcLight:null},(0,t.localize)(27,null)),e.EDITOR_GROUP_HEADER_TABS_BORDER=(0,f.registerColor)("editorGroupHeader.tabsBorder",{dark:null,light:null,hcDark:null,hcLight:null},(0,t.localize)(28,null)),e.EDITOR_GROUP_HEADER_NO_TABS_BACKGROUND=(0,f.registerColor)("editorGroupHeader.noTabsBackground",{dark:f.editorBackground,light:f.editorBackground,hcDark:f.editorBackground,hcLight:f.editorBackground},(0,t.localize)(29,null)),e.EDITOR_GROUP_HEADER_BORDER=(0,f.registerColor)("editorGroupHeader.border",{dark:null,light:null,hcDark:f.contrastBorder,hcLight:f.contrastBorder},(0,t.localize)(30,null)),e.EDITOR_GROUP_BORDER=(0,f.registerColor)("editorGroup.border",{dark:"#444444",light:"#E7E7E7",hcDark:f.contrastBorder,hcLight:f.contrastBorder},(0,t.localize)(31,null)),e.EDITOR_DRAG_AND_DROP_BACKGROUND=(0,f.registerColor)("editorGroup.dropBackground",{dark:_.Color.fromHex("#53595D").transparent(.5),light:_.Color.fromHex("#2677CB").transparent(.18),hcDark:null,hcLight:_.Color.fromHex("#0F4A85").transparent(.5)},(0,t.localize)(32,null)),e.SIDE_BY_SIDE_EDITOR_HORIZONTAL_BORDER=(0,f.registerColor)("sideBySideEditor.horizontalBorder",{dark:e.EDITOR_GROUP_BORDER,light:e.EDITOR_GROUP_BORDER,hcDark:e.EDITOR_GROUP_BORDER,hcLight:e.EDITOR_GROUP_BORDER},(0,t.localize)(33,null)),e.SIDE_BY_SIDE_EDITOR_VERTICAL_BORDER=(0,f.registerColor)("sideBySideEditor.verticalBorder",{dark:e.EDITOR_GROUP_BORDER,light:e.EDITOR_GROUP_BORDER,hcDark:e.EDITOR_GROUP_BORDER,hcLight:e.EDITOR_GROUP_BORDER},(0,t.localize)(34,null)),e.PANEL_BACKGROUND=(0,f.registerColor)("panel.background",{dark:f.editorBackground,light:f.editorBackground,hcDark:f.editorBackground,hcLight:f.editorBackground},(0,t.localize)(35,null)),e.PANEL_BORDER=(0,f.registerColor)("panel.border",{dark:_.Color.fromHex("#808080").transparent(.35),light:_.Color.fromHex("#808080").transparent(.35),hcDark:f.contrastBorder,hcLight:f.contrastBorder},(0,t.localize)(36,null)),e.PANEL_ACTIVE_TITLE_FOREGROUND=(0,f.registerColor)("panelTitle.activeForeground",{dark:"#E7E7E7",light:"#424242",hcDark:_.Color.white,hcLight:f.editorForeground},(0,t.localize)(37,null)),e.PANEL_INACTIVE_TITLE_FOREGROUND=(0,f.registerColor)("panelTitle.inactiveForeground",{dark:(0,f.transparent)(e.PANEL_ACTIVE_TITLE_FOREGROUND,.6),light:(0,f.transparent)(e.PANEL_ACTIVE_TITLE_FOREGROUND,.75),hcDark:_.Color.white,hcLight:f.editorForeground},(0,t.localize)(38,null)),e.PANEL_ACTIVE_TITLE_BORDER=(0,f.registerColor)("panelTitle.activeBorder",{dark:e.PANEL_ACTIVE_TITLE_FOREGROUND,light:e.PANEL_ACTIVE_TITLE_FOREGROUND,hcDark:f.contrastBorder,hcLight:"#B5200D"},(0,t.localize)(39,null)),e.PANEL_INPUT_BORDER=(0,f.registerColor)("panelInput.border",{dark:null,light:_.Color.fromHex("#ddd"),hcDark:null,hcLight:null},(0,t.localize)(40,null)),e.PANEL_DRAG_AND_DROP_BORDER=(0,f.registerColor)("panel.dropBorder",{dark:e.PANEL_ACTIVE_TITLE_FOREGROUND,light:e.PANEL_ACTIVE_TITLE_FOREGROUND,hcDark:e.PANEL_ACTIVE_TITLE_FOREGROUND,hcLight:e.PANEL_ACTIVE_TITLE_FOREGROUND},(0,t.localize)(41,null)),e.PANEL_SECTION_DRAG_AND_DROP_BACKGROUND=(0,f.registerColor)("panelSection.dropBackground",{dark:e.EDITOR_DRAG_AND_DROP_BACKGROUND,light:e.EDITOR_DRAG_AND_DROP_BACKGROUND,hcDark:e.EDITOR_DRAG_AND_DROP_BACKGROUND,hcLight:e.EDITOR_DRAG_AND_DROP_BACKGROUND},(0,t.localize)(42,null)),e.PANEL_SECTION_HEADER_BACKGROUND=(0,f.registerColor)("panelSectionHeader.background",{dark:_.Color.fromHex("#808080").transparent(.2),light:_.Color.fromHex("#808080").transparent(.2),hcDark:null,hcLight:null},(0,t.localize)(43,null)),e.PANEL_SECTION_HEADER_FOREGROUND=(0,f.registerColor)("panelSectionHeader.foreground",{dark:null,light:null,hcDark:null,hcLight:null},(0,t.localize)(44,null)),e.PANEL_SECTION_HEADER_BORDER=(0,f.registerColor)("panelSectionHeader.border",{dark:f.contrastBorder,light:f.contrastBorder,hcDark:f.contrastBorder,hcLight:f.contrastBorder},(0,t.localize)(45,null)),e.PANEL_SECTION_BORDER=(0,f.registerColor)("panelSection.border",{dark:e.PANEL_BORDER,light:e.PANEL_BORDER,hcDark:e.PANEL_BORDER,hcLight:e.PANEL_BORDER},(0,t.localize)(46,null)),e.BANNER_BACKGROUND=(0,f.registerColor)("banner.background",{dark:f.listActiveSelectionBackground,light:(0,f.darken)(f.listActiveSelectionBackground,.3),hcDark:f.listActiveSelectionBackground,hcLight:f.listActiveSelectionBackground},(0,t.localize)(47,null)),e.BANNER_FOREGROUND=(0,f.registerColor)("banner.foreground",{dark:f.listActiveSelectionForeground,light:f.listActiveSelectionForeground,hcDark:f.listActiveSelectionForeground,hcLight:f.listActiveSelectionForeground},(0,t.localize)(48,null)),e.BANNER_ICON_FOREGROUND=(0,f.registerColor)("banner.iconForeground",{dark:f.editorInfoForeground,light:f.editorInfoForeground,hcDark:f.editorInfoForeground,hcLight:f.editorInfoForeground},(0,t.localize)(49,null)),e.STATUS_BAR_FOREGROUND=(0,f.registerColor)("statusBar.foreground",{dark:"#FFFFFF",light:"#FFFFFF",hcDark:"#FFFFFF",hcLight:f.editorForeground},(0,t.localize)(50,null)),e.STATUS_BAR_NO_FOLDER_FOREGROUND=(0,f.registerColor)("statusBar.noFolderForeground",{dark:e.STATUS_BAR_FOREGROUND,light:e.STATUS_BAR_FOREGROUND,hcDark:e.STATUS_BAR_FOREGROUND,hcLight:e.STATUS_BAR_FOREGROUND},(0,t.localize)(51,null)),e.STATUS_BAR_BACKGROUND=(0,f.registerColor)("statusBar.background",{dark:"#007ACC",light:"#007ACC",hcDark:null,hcLight:null},(0,t.localize)(52,null)),e.STATUS_BAR_NO_FOLDER_BACKGROUND=(0,f.registerColor)("statusBar.noFolderBackground",{dark:"#68217A",light:"#68217A",hcDark:null,hcLight:null},(0,t.localize)(53,null)),e.STATUS_BAR_BORDER=(0,f.registerColor)("statusBar.border",{dark:null,light:null,hcDark:f.contrastBorder,hcLight:f.contrastBorder},(0,t.localize)(54,null)),e.STATUS_BAR_FOCUS_BORDER=(0,f.registerColor)("statusBar.focusBorder",{dark:e.STATUS_BAR_FOREGROUND,light:e.STATUS_BAR_FOREGROUND,hcDark:null,hcLight:e.STATUS_BAR_FOREGROUND},(0,t.localize)(55,null)),e.STATUS_BAR_NO_FOLDER_BORDER=(0,f.registerColor)("statusBar.noFolderBorder",{dark:e.STATUS_BAR_BORDER,light:e.STATUS_BAR_BORDER,hcDark:e.STATUS_BAR_BORDER,hcLight:e.STATUS_BAR_BORDER},(0,t.localize)(56,null)),e.STATUS_BAR_ITEM_ACTIVE_BACKGROUND=(0,f.registerColor)("statusBarItem.activeBackground",{dark:_.Color.white.transparent(.18),light:_.Color.white.transparent(.18),hcDark:_.Color.white.transparent(.18),hcLight:_.Color.black.transparent(.18)},(0,t.localize)(57,null)),e.STATUS_BAR_ITEM_FOCUS_BORDER=(0,f.registerColor)("statusBarItem.focusBorder",{dark:e.STATUS_BAR_FOREGROUND,light:e.STATUS_BAR_FOREGROUND,hcDark:null,hcLight:f.activeContrastBorder},(0,t.localize)(58,null)),e.STATUS_BAR_ITEM_HOVER_BACKGROUND=(0,f.registerColor)("statusBarItem.hoverBackground",{dark:_.Color.white.transparent(.12),light:_.Color.white.transparent(.12),hcDark:_.Color.white.transparent(.12),hcLight:_.Color.black.transparent(.12)},(0,t.localize)(59,null)),e.STATUS_BAR_ITEM_COMPACT_HOVER_BACKGROUND=(0,f.registerColor)("statusBarItem.compactHoverBackground",{dark:_.Color.white.transparent(.2),light:_.Color.white.transparent(.2),hcDark:_.Color.white.transparent(.2),hcLight:_.Color.black.transparent(.2)},(0,t.localize)(60,null)),e.STATUS_BAR_PROMINENT_ITEM_FOREGROUND=(0,f.registerColor)("statusBarItem.prominentForeground",{dark:e.STATUS_BAR_FOREGROUND,light:e.STATUS_BAR_FOREGROUND,hcDark:e.STATUS_BAR_FOREGROUND,hcLight:e.STATUS_BAR_FOREGROUND},(0,t.localize)(61,null)),e.STATUS_BAR_PROMINENT_ITEM_BACKGROUND=(0,f.registerColor)("statusBarItem.prominentBackground",{dark:_.Color.black.transparent(.5),light:_.Color.black.transparent(.5),hcDark:_.Color.black.transparent(.5),hcLight:_.Color.black.transparent(.5)},(0,t.localize)(62,null)),e.STATUS_BAR_PROMINENT_ITEM_HOVER_BACKGROUND=(0,f.registerColor)("statusBarItem.prominentHoverBackground",{dark:_.Color.black.transparent(.3),light:_.Color.black.transparent(.3),hcDark:_.Color.black.transparent(.3),hcLight:null},(0,t.localize)(63,null)),e.STATUS_BAR_ERROR_ITEM_BACKGROUND=(0,f.registerColor)("statusBarItem.errorBackground",{dark:(0,f.darken)(f.errorForeground,.4),light:(0,f.darken)(f.errorForeground,.4),hcDark:null,hcLight:"#B5200D"},(0,t.localize)(64,null)),e.STATUS_BAR_ERROR_ITEM_FOREGROUND=(0,f.registerColor)("statusBarItem.errorForeground",{dark:_.Color.white,light:_.Color.white,hcDark:_.Color.white,hcLight:_.Color.white},(0,t.localize)(65,null)),e.STATUS_BAR_WARNING_ITEM_BACKGROUND=(0,f.registerColor)("statusBarItem.warningBackground",{dark:(0,f.darken)(f.editorWarningForeground,.4),light:(0,f.darken)(f.editorWarningForeground,.4),hcDark:null,hcLight:"#895503"},(0,t.localize)(66,null)),e.STATUS_BAR_WARNING_ITEM_FOREGROUND=(0,f.registerColor)("statusBarItem.warningForeground",{dark:_.Color.white,light:_.Color.white,hcDark:_.Color.white,hcLight:_.Color.white},(0,t.localize)(67,null)),e.ACTIVITY_BAR_BACKGROUND=(0,f.registerColor)("activityBar.background",{dark:"#333333",light:"#2C2C2C",hcDark:"#000000",hcLight:"#FFFFFF"},(0,t.localize)(68,null)),e.ACTIVITY_BAR_FOREGROUND=(0,f.registerColor)("activityBar.foreground",{dark:_.Color.white,light:_.Color.white,hcDark:_.Color.white,hcLight:f.editorForeground},(0,t.localize)(69,null)),e.ACTIVITY_BAR_INACTIVE_FOREGROUND=(0,f.registerColor)("activityBar.inactiveForeground",{dark:(0,f.transparent)(e.ACTIVITY_BAR_FOREGROUND,.4),light:(0,f.transparent)(e.ACTIVITY_BAR_FOREGROUND,.4),hcDark:_.Color.white,hcLight:f.editorForeground},(0,t.localize)(70,null)),e.ACTIVITY_BAR_BORDER=(0,f.registerColor)("activityBar.border",{dark:null,light:null,hcDark:f.contrastBorder,hcLight:f.contrastBorder},(0,t.localize)(71,null)),e.ACTIVITY_BAR_ACTIVE_BORDER=(0,f.registerColor)("activityBar.activeBorder",{dark:e.ACTIVITY_BAR_FOREGROUND,light:e.ACTIVITY_BAR_FOREGROUND,hcDark:null,hcLight:f.contrastBorder},(0,t.localize)(72,null)),e.ACTIVITY_BAR_ACTIVE_FOCUS_BORDER=(0,f.registerColor)("activityBar.activeFocusBorder",{dark:null,light:null,hcDark:null,hcLight:"#B5200D"},(0,t.localize)(73,null)),e.ACTIVITY_BAR_ACTIVE_BACKGROUND=(0,f.registerColor)("activityBar.activeBackground",{dark:null,light:null,hcDark:null,hcLight:null},(0,t.localize)(74,null)),e.ACTIVITY_BAR_DRAG_AND_DROP_BORDER=(0,f.registerColor)("activityBar.dropBorder",{dark:e.ACTIVITY_BAR_FOREGROUND,light:e.ACTIVITY_BAR_FOREGROUND,hcDark:e.ACTIVITY_BAR_FOREGROUND,hcLight:e.ACTIVITY_BAR_FOREGROUND},(0,t.localize)(75,null)),e.ACTIVITY_BAR_BADGE_BACKGROUND=(0,f.registerColor)("activityBarBadge.background",{dark:"#007ACC",light:"#007ACC",hcDark:"#000000",hcLight:"#007ACC"},(0,t.localize)(76,null)),e.ACTIVITY_BAR_BADGE_FOREGROUND=(0,f.registerColor)("activityBarBadge.foreground",{dark:_.Color.white,light:_.Color.white,hcDark:_.Color.white,hcLight:_.Color.white},(0,t.localize)(77,null)),e.STATUS_BAR_HOST_NAME_BACKGROUND=(0,f.registerColor)("statusBarItem.remoteBackground",{dark:e.ACTIVITY_BAR_BADGE_BACKGROUND,light:e.ACTIVITY_BAR_BADGE_BACKGROUND,hcDark:e.ACTIVITY_BAR_BADGE_BACKGROUND,hcLight:e.ACTIVITY_BAR_BADGE_BACKGROUND},(0,t.localize)(78,null)),e.STATUS_BAR_HOST_NAME_FOREGROUND=(0,f.registerColor)("statusBarItem.remoteForeground",{dark:e.ACTIVITY_BAR_BADGE_FOREGROUND,light:e.ACTIVITY_BAR_BADGE_FOREGROUND,hcDark:e.ACTIVITY_BAR_BADGE_FOREGROUND,hcLight:e.ACTIVITY_BAR_BADGE_FOREGROUND},(0,t.localize)(79,null)),e.EXTENSION_BADGE_REMOTE_BACKGROUND=(0,f.registerColor)("extensionBadge.remoteBackground",{dark:e.ACTIVITY_BAR_BADGE_BACKGROUND,light:e.ACTIVITY_BAR_BADGE_BACKGROUND,hcDark:e.ACTIVITY_BAR_BADGE_BACKGROUND,hcLight:e.ACTIVITY_BAR_BADGE_BACKGROUND},(0,t.localize)(80,null)),e.EXTENSION_BADGE_REMOTE_FOREGROUND=(0,f.registerColor)("extensionBadge.remoteForeground",{dark:e.ACTIVITY_BAR_BADGE_FOREGROUND,light:e.ACTIVITY_BAR_BADGE_FOREGROUND,hcDark:e.ACTIVITY_BAR_BADGE_FOREGROUND,hcLight:e.ACTIVITY_BAR_BADGE_FOREGROUND},(0,t.localize)(81,null)),e.SIDE_BAR_BACKGROUND=(0,f.registerColor)("sideBar.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#000000",hcLight:"#FFFFFF"},(0,t.localize)(82,null)),e.SIDE_BAR_FOREGROUND=(0,f.registerColor)("sideBar.foreground",{dark:null,light:null,hcDark:null,hcLight:null},(0,t.localize)(83,null)),e.SIDE_BAR_BORDER=(0,f.registerColor)("sideBar.border",{dark:null,light:null,hcDark:f.contrastBorder,hcLight:f.contrastBorder},(0,t.localize)(84,null)),e.SIDE_BAR_TITLE_FOREGROUND=(0,f.registerColor)("sideBarTitle.foreground",{dark:e.SIDE_BAR_FOREGROUND,light:e.SIDE_BAR_FOREGROUND,hcDark:e.SIDE_BAR_FOREGROUND,hcLight:e.SIDE_BAR_FOREGROUND},(0,t.localize)(85,null)),e.SIDE_BAR_DRAG_AND_DROP_BACKGROUND=(0,f.registerColor)("sideBar.dropBackground",{dark:e.EDITOR_DRAG_AND_DROP_BACKGROUND,light:e.EDITOR_DRAG_AND_DROP_BACKGROUND,hcDark:e.EDITOR_DRAG_AND_DROP_BACKGROUND,hcLight:e.EDITOR_DRAG_AND_DROP_BACKGROUND},(0,t.localize)(86,null)),e.SIDE_BAR_SECTION_HEADER_BACKGROUND=(0,f.registerColor)("sideBarSectionHeader.background",{dark:_.Color.fromHex("#808080").transparent(.2),light:_.Color.fromHex("#808080").transparent(.2),hcDark:null,hcLight:null},(0,t.localize)(87,null)),e.SIDE_BAR_SECTION_HEADER_FOREGROUND=(0,f.registerColor)("sideBarSectionHeader.foreground",{dark:e.SIDE_BAR_FOREGROUND,light:e.SIDE_BAR_FOREGROUND,hcDark:e.SIDE_BAR_FOREGROUND,hcLight:e.SIDE_BAR_FOREGROUND},(0,t.localize)(88,null)),e.SIDE_BAR_SECTION_HEADER_BORDER=(0,f.registerColor)("sideBarSectionHeader.border",{dark:f.contrastBorder,light:f.contrastBorder,hcDark:f.contrastBorder,hcLight:f.contrastBorder},(0,t.localize)(89,null)),e.TITLE_BAR_ACTIVE_FOREGROUND=(0,f.registerColor)("titleBar.activeForeground",{dark:"#CCCCCC",light:"#333333",hcDark:"#FFFFFF",hcLight:"#292929"},(0,t.localize)(90,null)),e.TITLE_BAR_INACTIVE_FOREGROUND=(0,f.registerColor)("titleBar.inactiveForeground",{dark:(0,f.transparent)(e.TITLE_BAR_ACTIVE_FOREGROUND,.6),light:(0,f.transparent)(e.TITLE_BAR_ACTIVE_FOREGROUND,.6),hcDark:null,hcLight:"#292929"},(0,t.localize)(91,null)),e.TITLE_BAR_ACTIVE_BACKGROUND=(0,f.registerColor)("titleBar.activeBackground",{dark:"#3C3C3C",light:"#DDDDDD",hcDark:"#000000",hcLight:"#FFFFFF"},(0,t.localize)(92,null)),e.TITLE_BAR_INACTIVE_BACKGROUND=(0,f.registerColor)("titleBar.inactiveBackground",{dark:(0,f.transparent)(e.TITLE_BAR_ACTIVE_BACKGROUND,.6),light:(0,f.transparent)(e.TITLE_BAR_ACTIVE_BACKGROUND,.6),hcDark:null,hcLight:null},(0,t.localize)(93,null)),e.TITLE_BAR_BORDER=(0,f.registerColor)("titleBar.border",{dark:null,light:null,hcDark:f.contrastBorder,hcLight:f.contrastBorder},(0,t.localize)(94,null)),e.MENUBAR_SELECTION_FOREGROUND=(0,f.registerColor)("menubar.selectionForeground",{dark:e.TITLE_BAR_ACTIVE_FOREGROUND,light:e.TITLE_BAR_ACTIVE_FOREGROUND,hcDark:e.TITLE_BAR_ACTIVE_FOREGROUND,hcLight:e.TITLE_BAR_ACTIVE_FOREGROUND},(0,t.localize)(95,null)),e.MENUBAR_SELECTION_BACKGROUND=(0,f.registerColor)("menubar.selectionBackground",{dark:(0,f.transparent)(_.Color.white,.1),light:(0,f.transparent)(_.Color.black,.1),hcDark:null,hcLight:null},(0,t.localize)(96,null)),e.MENUBAR_SELECTION_BORDER=(0,f.registerColor)("menubar.selectionBorder",{dark:null,light:null,hcDark:f.activeContrastBorder,hcLight:f.activeContrastBorder},(0,t.localize)(97,null)),e.NOTIFICATIONS_CENTER_BORDER=(0,f.registerColor)("notificationCenter.border",{dark:null,light:null,hcDark:f.contrastBorder,hcLight:f.contrastBorder},(0,t.localize)(98,null)),e.NOTIFICATIONS_TOAST_BORDER=(0,f.registerColor)("notificationToast.border",{dark:null,light:null,hcDark:f.contrastBorder,hcLight:f.contrastBorder},(0,t.localize)(99,null)),e.NOTIFICATIONS_FOREGROUND=(0,f.registerColor)("notifications.foreground",{dark:f.editorWidgetForeground,light:f.editorWidgetForeground,hcDark:f.editorWidgetForeground,hcLight:f.editorWidgetForeground},(0,t.localize)(100,null)),e.NOTIFICATIONS_BACKGROUND=(0,f.registerColor)("notifications.background",{dark:f.editorWidgetBackground,light:f.editorWidgetBackground,hcDark:f.editorWidgetBackground,hcLight:f.editorWidgetBackground},(0,t.localize)(101,null)),e.NOTIFICATIONS_LINKS=(0,f.registerColor)("notificationLink.foreground",{dark:f.textLinkForeground,light:f.textLinkForeground,hcDark:f.textLinkForeground,hcLight:f.textLinkForeground},(0,t.localize)(102,null)),e.NOTIFICATIONS_CENTER_HEADER_FOREGROUND=(0,f.registerColor)("notificationCenterHeader.foreground",{dark:null,light:null,hcDark:null,hcLight:null},(0,t.localize)(103,null)),e.NOTIFICATIONS_CENTER_HEADER_BACKGROUND=(0,f.registerColor)("notificationCenterHeader.background",{dark:(0,f.lighten)(e.NOTIFICATIONS_BACKGROUND,.3),light:(0,f.darken)(e.NOTIFICATIONS_BACKGROUND,.05),hcDark:e.NOTIFICATIONS_BACKGROUND,hcLight:e.NOTIFICATIONS_BACKGROUND},(0,t.localize)(104,null)),e.NOTIFICATIONS_BORDER=(0,f.registerColor)("notifications.border",{dark:e.NOTIFICATIONS_CENTER_HEADER_BACKGROUND,light:e.NOTIFICATIONS_CENTER_HEADER_BACKGROUND,hcDark:e.NOTIFICATIONS_CENTER_HEADER_BACKGROUND,hcLight:e.NOTIFICATIONS_CENTER_HEADER_BACKGROUND},(0,t.localize)(105,null)),e.NOTIFICATIONS_ERROR_ICON_FOREGROUND=(0,f.registerColor)("notificationsErrorIcon.foreground",{dark:f.editorErrorForeground,light:f.editorErrorForeground,hcDark:f.editorErrorForeground,hcLight:f.editorErrorForeground},(0,t.localize)(106,null)),e.NOTIFICATIONS_WARNING_ICON_FOREGROUND=(0,f.registerColor)("notificationsWarningIcon.foreground",{dark:f.editorWarningForeground,light:f.editorWarningForeground,hcDark:f.editorWarningForeground,hcLight:f.editorWarningForeground},(0,t.localize)(107,null)),e.NOTIFICATIONS_INFO_ICON_FOREGROUND=(0,f.registerColor)("notificationsInfoIcon.foreground",{dark:f.editorInfoForeground,light:f.editorInfoForeground,hcDark:f.editorInfoForeground,hcLight:f.editorInfoForeground},(0,t.localize)(108,null)),e.WINDOW_ACTIVE_BORDER=(0,f.registerColor)("window.activeBorder",{dark:null,light:null,hcDark:f.contrastBorder,hcLight:f.contrastBorder},(0,t.localize)(109,null)),e.WINDOW_INACTIVE_BORDER=(0,f.registerColor)("window.inactiveBorder",{dark:null,light:null,hcDark:f.contrastBorder,hcLight:f.contrastBorder},(0,t.localize)(110,null))}),define(ne[783],re([1,0,1413,10,71,5,82,12,32,2121,569,37,13,33,74,1065]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationsList=void 0;let S=class extends D.Themable{constructor(l,r,p,u,a){super(u);this.container=l,this.options=r,this.instantiationService=p,this.contextMenuService=a,this.viewModel=[]}show(l){if(this.isVisible){l&&(0,o.assertIsDefined)(this.list).domFocus();return}this.list||this.createNotificationsList(),this.isVisible=!0,l&&(0,o.assertIsDefined)(this.list).domFocus()}createNotificationsList(){this.listContainer=document.createElement("div"),this.listContainer.classList.add("notifications-list-container");const l=this._register(this.instantiationService.createInstance(v.NotificationActionRunner)),r=this.instantiationService.createInstance(w.NotificationRenderer,l),p=this.listDelegate=new w.NotificationsListDelegate(this.listContainer),u=this.options,a=this.list=this._register(this.instantiationService.createInstance(_.WorkbenchList,"NotificationsList",this.listContainer,p,[r],{...u,setRowLineHeight:!1,horizontalScrolling:!1,overrideStyles:{listBackground:k.NOTIFICATIONS_BACKGROUND},accessibilityProvider:{getAriaLabel(g){return g.source?(0,t.localize)(1,null,g.message.raw,g.source):(0,t.localize)(0,null,g.message.raw)},getWidgetAriaLabel(){return u.widgetAriaLabel??(0,t.localize)(2,null)},getRole(){return"dialog"}}})),n=this._register(this.instantiationService.createInstance(v.CopyNotificationMessageAction,v.CopyNotificationMessageAction.ID,v.CopyNotificationMessageAction.LABEL));this._register(a.onContextMenu(g=>{!g.element||this.contextMenuService.showContextMenu({getAnchor:()=>g.anchor,getActions:()=>[n],getActionsContext:()=>g.element,actionRunner:l})})),this._register(a.onMouseDblClick(g=>g.element.toggle()));const h=this._register((0,f.trackFocus)(a.getHTMLElement()));this._register(h.onDidBlur(()=>{document.hasFocus()&&a.setFocus([])})),i.NotificationFocusedContext.bindTo(a.contextKeyService),this._register(a.onDidChangeSelection(g=>{g.indexes.length>0&&a.setSelection([])})),this.container.appendChild(this.listContainer),this.updateStyles()}updateNotificationsList(l,r,p=[]){const[u,a]=(0,o.assertAllDefined)(this.list,this.listContainer),n=(0,f.isAncestor)(document.activeElement,a),h=u.getFocus()[0],g=this.viewModel[h];let d=null;if(typeof h=="number"&&(d=u.getRelativeTop(h)),this.viewModel.splice(l,r,...p),u.splice(l,r,p),u.layout(),this.viewModel.length===0)this.hide();else if(typeof h=="number"){let m=0;if(g){let b=this.viewModel.indexOf(g);b===-1&&(b=h-1),b<this.viewModel.length&&b>=0&&(m=b)}typeof d=="number"&&u.reveal(m,d),u.setFocus([m])}this.isVisible&&n&&u.domFocus()}updateNotificationHeight(l){const r=this.viewModel.indexOf(l);if(r===-1)return;const[p,u]=(0,o.assertAllDefined)(this.list,this.listDelegate);p.updateElementHeight(r,u.getHeight(l)),p.layout()}hide(){!this.isVisible||!this.list||(this.isVisible=!1,this.list.splice(0,this.viewModel.length),this.viewModel=[])}focusFirst(){!this.isVisible||!this.list||(this.list.focusFirst(),this.list.domFocus())}hasFocus(){return!this.isVisible||!this.listContainer?!1:(0,f.isAncestor)(document.activeElement,this.listContainer)}updateStyles(){if(this.listContainer){const l=this.getColor(k.NOTIFICATIONS_FOREGROUND);this.listContainer.style.color=l||"";const r=this.getColor(k.NOTIFICATIONS_BACKGROUND);this.listContainer.style.background=r||"";const p=this.getColor(I.contrastBorder);this.listContainer.style.outlineColor=p||""}}layout(l,r){this.listContainer&&this.list&&(this.listContainer.style.width=`${l}px`,typeof r=="number"&&(this.list.getHTMLElement().style.maxHeight=`${r}px`),this.list.layout())}dispose(){this.hide(),super.dispose()}};S=Ee([W(2,A.IInstantiationService),W(3,D.IThemeService),W(4,C.IContextMenuService)],S),e.NotificationsList=S,(0,D.registerThemingParticipant)((s,l)=>{const r=s.getColor(k.NOTIFICATIONS_LINKS);r&&l.addRule(`.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-message a { color: ${r}; }`);const p=s.getColor(I.focusBorder);p&&l.addRule(` .monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-message a:focus { outline-color: ${p}; }`);const u=s.getColor(k.NOTIFICATIONS_ERROR_ICON_FOREGROUND);if(u){const h=c.Codicon.error.cssSelector;l.addRule(` .monaco-workbench .notifications-center ${h}, .monaco-workbench .notifications-toasts ${h} { color: ${u}; }`)}const a=s.getColor(k.NOTIFICATIONS_WARNING_ICON_FOREGROUND);if(a){const h=c.Codicon.warning.cssSelector;l.addRule(` .monaco-workbench .notifications-center ${h}, .monaco-workbench .notifications-toasts ${h} { color: ${a}; }`)}const n=s.getColor(k.NOTIFICATIONS_INFO_ICON_FOREGROUND);if(n){const h=c.Codicon.info.cssSelector;l.addRule(` .monaco-workbench .notifications-center ${h}, .monaco-workbench .notifications-toasts ${h} { color: ${n}; }`)}})}),define(ne[483],re([1,0,12,32,82,14,10,77,127,1048]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_FONT_FAMILY=void 0,(0,t.registerThemingParticipant)((w,v)=>{const C=w.getColor(f.foreground);C&&v.addRule(`.monaco-workbench { color: ${C}; }`);const o=(0,_.WORKBENCH_BACKGROUND)(w);v.addRule(`.monaco-workbench { background-color: ${o}; }`);const c=w.getColor(f.iconForeground);c&&v.addRule(`.codicon { color: ${c}; }`);const i=w.getColor(f.selectionBackground);i&&v.addRule(`.monaco-workbench ::selection { background-color: ${i}; }`);const S=w.getColor(f.inputPlaceholderForeground);S&&(v.addRule(` .monaco-workbench input::placeholder { color: ${S}; } .monaco-workbench input::-webkit-input-placeholder { color: ${S}; } .monaco-workbench input::-moz-placeholder { color: ${S}; } `),v.addRule(` .monaco-workbench textarea::placeholder { color: ${S}; } .monaco-workbench textarea::-webkit-input-placeholder { color: ${S}; } .monaco-workbench textarea::-moz-placeholder { color: ${S}; } `));const s=w.getColor(f.listHighlightForeground);s&&v.addRule(` .monaco-workbench .monaco-list .monaco-list-row .monaco-highlighted-label .highlight { color: ${s}; } `);const l=w.getColor(f.listFocusHighlightForeground);l&&v.addRule(` .monaco-workbench .monaco-list .monaco-list-row.focused .monaco-highlighted-label .highlight { color: ${l}; } `);const r=w.getColor(f.focusBorder);if(r&&v.addRule(` .monaco-workbench [tabindex="0"]:focus, .monaco-workbench [tabindex="-1"]:focus, .monaco-workbench .synthetic-focus, .monaco-workbench select:focus, .monaco-workbench .monaco-list:not(.element-focused):focus:before, .monaco-workbench input[type="button"]:focus, .monaco-workbench input[type="text"]:focus, .monaco-workbench button:focus, .monaco-workbench textarea:focus, .monaco-workbench input[type="search"]:focus, .monaco-workbench input[type="checkbox"]:focus { outline-color: ${r}; } `),(0,I.isHighContrast)(w.type)&&v.addRule(` .hc-black [tabindex="0"]:focus, .hc-black [tabindex="-1"]:focus, .hc-black .synthetic-focus, .hc-black select:focus, .hc-black input[type="button"]:focus, .hc-black input[type="text"]:focus, .hc-black textarea:focus, .hc-black input[type="checkbox"]:focus, .hc-light [tabindex="0"]:focus, .hc-light [tabindex="-1"]:focus, .hc-light .synthetic-focus, .hc-light select:focus, .hc-light input[type="button"]:focus, .hc-light input[type="text"]:focus, .hc-light textarea:focus, .hc-light input[type="checkbox"]:focus { outline-style: solid; outline-width: 1px; } .hc-black .synthetic-focus input {, .hc-light .synthetic-focus input background: transparent; /* Search input focus fix when in high contrast */ } `),A.isWeb){const n=w.getColor(_.TITLE_BAR_ACTIVE_BACKGROUND);if(n){const h="monaco-workbench-meta-theme-color";let g=document.getElementById(h);g||(g=(0,k.createMetaElement)(),g.name="theme-color",g.id=h),g.content=n.toString()}}D.isSafari&&v.addRule(` body.web { touch-action: none; } .monaco-workbench .monaco-editor .view-lines { user-select: text; -webkit-user-select: text; } `),A.isIOS&&(0,D.isStandalone)()&&v.addRule(`body { background-color: ${o}; }`);const p=w.getColor(f.toolbarHoverBackground);p&&v.addRule(` .monaco-action-bar:not(.vertical) .action-label:not(.disabled):hover { background-color: ${p}; } .monaco-action-bar:not(.vertical) .monaco-dropdown-with-primary:not(.disabled):hover { background-color: ${p}; } `);const u=w.getColor(f.toolbarActiveBackground);u&&v.addRule(` .monaco-action-bar:not(.vertical) .action-item.active .action-label:not(.disabled), .monaco-action-bar:not(.vertical) .monaco-dropdown.active .action-label:not(.disabled) { background-color: ${u}; } `);const a=w.getColor(f.toolbarHoverOutline);a&&v.addRule(` .monaco-action-bar:not(.vertical) .action-item .action-label:hover:not(.disabled) { outline: 1px dashed ${a}; outline-offset: -1px; } `)}),e.DEFAULT_FONT_FAMILY=A.isWindows?'"Segoe WPC", "Segoe UI", sans-serif':A.isMacintosh?"-apple-system, BlinkMacSystemFont, sans-serif":'system-ui, "Ubuntu", "Droid Sans", sans-serif'}),define(ne[43],re([1,0,6,1439,5,2,55,17,15,143,51,33,63]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResolvableTreeItem=e.TreeItemCollapsibleState=e.ViewVisibilityState=e.IViewDescriptorService=e.IViewsService=e.ViewContentGroups=e.ViewContainerLocationToString=e.ViewContainerLocations=e.ViewContainerLocation=e.Extensions=e.defaultViewIcon=void 0,e.defaultViewIcon=(0,o.registerIcon)("default-view-icon",C.Codicon.window,(0,f.localize)(0,null));var c;(function(h){h.ViewContainersRegistry="workbench.registry.view.containers",h.ViewsRegistry="workbench.registry.view"})(c=e.Extensions||(e.Extensions={}));var i;(function(h){h[h.Sidebar=0]="Sidebar",h[h.Panel=1]="Panel",h[h.AuxiliaryBar=2]="AuxiliaryBar"})(i=e.ViewContainerLocation||(e.ViewContainerLocation={})),e.ViewContainerLocations=[0,1,2];function S(h){switch(h){case 0:return"sidebar";case 1:return"panel";case 2:return"auxiliarybar"}}e.ViewContainerLocationToString=S;class s extends A.Disposable{constructor(){super(...arguments);this._onDidRegister=this._register(new t.Emitter),this.onDidRegister=this._onDidRegister.event,this._onDidDeregister=this._register(new t.Emitter),this.onDidDeregister=this._onDidDeregister.event,this.viewContainers=new Map,this.defaultViewContainers=[]}get all(){return(0,I.flatten)([...this.viewContainers.values()])}registerViewContainer(g,d,m){const b=this.get(g.id);if(b)return b;const E=g;return E.openCommandActionDescriptor=m?.donotRegisterOpenCommand?void 0:E.openCommandActionDescriptor??{id:E.id},(0,k.getOrSet)(this.viewContainers,d,[]).push(E),m?.isDefault&&this.defaultViewContainers.push(E),this._onDidRegister.fire({viewContainer:E,viewContainerLocation:d}),E}deregisterViewContainer(g){for(const d of this.viewContainers.keys()){const m=this.viewContainers.get(d),b=m?.indexOf(g);if(b!==-1){m?.splice(b,1),m.length===0&&this.viewContainers.delete(d),this._onDidDeregister.fire({viewContainer:g,viewContainerLocation:d});return}}}get(g){return this.all.filter(d=>d.id===g)[0]}getViewContainers(g){return[...this.viewContainers.get(g)||[]]}getViewContainerLocation(g){return[...this.viewContainers.keys()].filter(d=>this.getViewContainers(d).filter(m=>m?.id===g.id).length>0)[0]}getDefaultViewContainer(g){return this.defaultViewContainers.find(d=>this.getViewContainerLocation(d)===g)}}D.Registry.add(c.ViewContainersRegistry,new s);var l;(function(h){h.Open="2_open",h.Debug="4_debug",h.SCM="5_scm",h.More="9_more"})(l=e.ViewContentGroups||(e.ViewContentGroups={}));function r(h,g){const d=h.group??l.More,m=g.group??l.More;return d!==m?d.localeCompare(m):(h.order??5)-(g.order??5)}class p extends A.Disposable{constructor(){super(...arguments);this._onViewsRegistered=this._register(new t.Emitter),this.onViewsRegistered=this._onViewsRegistered.event,this._onViewsDeregistered=this._register(new t.Emitter),this.onViewsDeregistered=this._onViewsDeregistered.event,this._onDidChangeContainer=this._register(new t.Emitter),this.onDidChangeContainer=this._onDidChangeContainer.event,this._onDidChangeViewWelcomeContent=this._register(new t.Emitter),this.onDidChangeViewWelcomeContent=this._onDidChangeViewWelcomeContent.event,this._viewContainers=[],this._views=new Map,this._viewWelcomeContents=new w.SetMap}registerViews(g,d){this.registerViews2([{views:g,viewContainer:d}])}registerViews2(g){g.forEach(({views:d,viewContainer:m})=>this.addViews(d,m)),this._onViewsRegistered.fire(g)}deregisterViews(g,d){const m=this.removeViews(g,d);m.length&&this._onViewsDeregistered.fire({views:m,viewContainer:d})}moveViews(g,d){for(const m of this._views.keys())if(m!==d){const b=this.removeViews(g,m);b.length&&(this.addViews(b,d),this._onDidChangeContainer.fire({views:b,from:m,to:d}))}}getViews(g){return this._views.get(g)||[]}getView(g){for(const d of this._viewContainers){const m=(this._views.get(d)||[]).filter(b=>b.id===g)[0];if(m)return m}return null}getViewContainer(g){for(const d of this._viewContainers)if((this._views.get(d)||[]).filter(b=>b.id===g)[0])return d;return null}registerViewWelcomeContent(g,d){return this._viewWelcomeContents.add(g,d),this._onDidChangeViewWelcomeContent.fire(g),(0,A.toDisposable)(()=>{this._viewWelcomeContents.delete(g,d),this._onDidChangeViewWelcomeContent.fire(g)})}registerViewWelcomeContent2(g,d){const m=new Map;for(const[b,E]of d)this._viewWelcomeContents.add(g,E),m.set(b,(0,A.toDisposable)(()=>{this._viewWelcomeContents.delete(g,E),this._onDidChangeViewWelcomeContent.fire(g)}));return this._onDidChangeViewWelcomeContent.fire(g),m}getViewWelcomeContent(g){const d=[];return this._viewWelcomeContents.forEach(g,m=>d.push(m)),d.sort(r)}addViews(g,d){let m=this._views.get(d);m||(m=[],this._views.set(d,m),this._viewContainers.push(d));for(const b of g){if(this.getView(b.id)!==null)throw new Error((0,f.localize)(1,null,b.id));m.push(b)}}removeViews(g,d){const m=this._views.get(d);if(!m)return[];const b=[],E=[];for(const y of m)g.includes(y)?b.push(y):E.push(y);return b.length&&(E.length?this._views.set(d,E):(this._views.delete(d),this._viewContainers.splice(this._viewContainers.indexOf(d),1))),b}}D.Registry.add(c.ViewsRegistry,new p),e.IViewsService=(0,_.createDecorator)("viewsService"),e.IViewDescriptorService=(0,_.createDecorator)("viewDescriptorService");var u;(function(h){h[h.Default=0]="Default",h[h.Expand=1]="Expand"})(u=e.ViewVisibilityState||(e.ViewVisibilityState={}));var a;(function(h){h[h.None=0]="None",h[h.Collapsed=1]="Collapsed",h[h.Expanded=2]="Expanded"})(a=e.TreeItemCollapsibleState||(e.TreeItemCollapsibleState={}));class n{constructor(g,d){this.resolved=!1,this._hasResolve=!1,(0,v.mixin)(this,g),this._hasResolve=!!d,this.resolve=async m=>{if(d&&!this.resolved){const b=await d(m);b&&(this.tooltip=this.tooltip??b.tooltip,this.command=this.command??b.command)}m.isCancellationRequested||(this.resolved=!0)}}get hasResolve(){return this._hasResolve}resetResolve(){this.resolved=!1}asTreeItem(){return{handle:this.handle,parentHandle:this.parentHandle,collapsibleState:this.collapsibleState,label:this.label,description:this.description,icon:this.icon,iconDark:this.iconDark,themeIcon:this.themeIcon,resourceUri:this.resourceUri,tooltip:this.tooltip,contextValue:this.contextValue,command:this.command,children:this.children,accessibilityInformation:this.accessibilityInformation}}}e.ResolvableTreeItem=n}),define(ne[570],re([1,0,18,9]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodeAuthority=e.asWebviewUri=e.webviewGenericCspSource=e.webviewRootResourceAuthority=e.webviewResourceBaseHost=void 0,e.webviewResourceBaseHost="vscode-webview.net",e.webviewRootResourceAuthority=`vscode-resource.${e.webviewResourceBaseHost}`,e.webviewGenericCspSource=`https://*.${e.webviewResourceBaseHost}`;function _(D,I){return D.scheme===t.Schemas.http||D.scheme===t.Schemas.https?D:(I&&I.authority&&I.isRemote&&D.scheme===t.Schemas.file&&(D=f.URI.from({scheme:t.Schemas.vscodeRemote,authority:I.authority,path:D.path})),f.URI.from({scheme:t.Schemas.https,authority:`${D.scheme}+${A(D.authority)}.${e.webviewRootResourceAuthority}`,path:D.path,fragment:D.fragment,query:D.query}))}e.asWebviewUri=_;function A(D){return D.replace(/./g,I=>{const w=I.charCodeAt(0);return w>=97&&w<=122||w>=65&&w<=90||w>=48&&w<=57?I:"-"+w.toString(16).padStart(4,"0")})}function k(D){return D.replace(/-([0-9a-f]{4})/g,(I,w)=>String.fromCharCode(parseInt(w,16)))}e.decodeAuthority=k}),define(ne[571],re([1,0,2]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.wasEventTriggeredRecently=e.debouncedObservable=e.observableFromEvent=e.observableFromPromise=e.LazyDerived=e.derivedObservable=e.autorunDelta=e.AutorunObserver=e.autorunWithStore=e.autorun=e.constObservable=e.ObservableValue=e.transaction=e.BaseObservable=e.ConvenientObservable=void 0;class f{read(h){return h.handleBeforeReadObservable(this),this.get()}map(h){return new S(g=>h(this.read(g)),"(mapped)")}}e.ConvenientObservable=f;class _ extends f{constructor(){super(...arguments);this.observers=new Set}subscribe(h){const g=this.observers.size;this.observers.add(h),g===0&&this.onFirstObserverSubscribed()}unsubscribe(h){this.observers.delete(h)&&this.observers.size===0&&this.onLastObserverUnsubscribed()}onFirstObserverSubscribed(){}onLastObserverUnsubscribed(){}}e.BaseObservable=_;function A(n){const h=new k;try{n(h)}finally{h.finish()}}e.transaction=A;class k{constructor(){this.finishActions=new Array}updateObserver(h,g){this.finishActions.push(function(){h.endUpdate(g)}),h.beginUpdate(g)}finish(){for(const h of this.finishActions)h()}}class D extends _{constructor(h,g){super();this.name=g,this.value=h}get(){return this.value}set(h,g){if(this.value!==h){if(!g){A(d=>{this.set(h,d)});return}this.value=h;for(const d of this.observers)g.updateObserver(d,this),d.handleChange(this)}}}e.ObservableValue=D;function I(n){return new w(n)}e.constObservable=I;class w extends f{constructor(h){super();this.value=h}get(){return this.value}subscribe(h){}unsubscribe(h){}}function v(n,h){return new o(n,h)}e.autorun=v;function C(n,h){let g=new t.DisposableStore;const d=v(m=>{g.clear(),n(m,g)},h);return(0,t.toDisposable)(()=>{d.dispose(),g.dispose()})}e.autorunWithStore=C;class o{constructor(h,g){this.runFn=h,this.name=g,this.needsToRun=!0,this.updateCount=0,this._dependencies=new Set,this.staleDependencies=new Set,this.runIfNeeded()}get dependencies(){return this._dependencies}handleBeforeReadObservable(h){this._dependencies.add(h),this.staleDependencies.delete(h)||h.subscribe(this)}handleChange(){this.needsToRun=!0,this.updateCount===0&&this.runIfNeeded()}beginUpdate(){this.updateCount++}endUpdate(){this.updateCount--,this.updateCount===0&&this.runIfNeeded()}runIfNeeded(){if(!this.needsToRun)return;const h=this.staleDependencies;this.staleDependencies=this._dependencies,this._dependencies=h,this.needsToRun=!1;try{this.runFn(this)}finally{for(const g of this.staleDependencies)g.unsubscribe(this);this.staleDependencies.clear()}}dispose(){for(const h of this._dependencies)h.unsubscribe(this);this._dependencies.clear()}}e.AutorunObserver=o,function(n){n.Observer=o}(v=e.autorun||(e.autorun={}));function c(n,h,g){let d;return v(m=>{const b=h.read(m),E=d;d=b,g({lastValue:E,newValue:b})},n)}e.autorunDelta=c;function i(n,h){return new S(h,n)}e.derivedObservable=i;class S extends f{constructor(h,g){super();this.observer=new s(h,g)}subscribe(h){this.observer.subscribe(h)}unsubscribe(h){this.observer.unsubscribe(h)}read(h){return this.observer.read(h)}get(){return this.observer.get()}}e.LazyDerived=S;class s extends _{constructor(h,g){super();this.computeFn=h,this.name=g,this.hadValue=!1,this.hasValue=!1,this.value=void 0,this.updateCount=0,this._dependencies=new Set,this.staleDependencies=new Set}get dependencies(){return this._dependencies}onLastObserverUnsubscribed(){this.hasValue=!1,this.hadValue=!1,this.value=void 0;for(const h of this._dependencies)h.unsubscribe(this);this._dependencies.clear()}handleBeforeReadObservable(h){this._dependencies.add(h),this.staleDependencies.delete(h)||h.subscribe(this)}handleChange(){this.hasValue&&(this.hadValue=!0,this.hasValue=!1),this.updateCount===0&&this.observers.size>0&&this.get()}beginUpdate(){if(this.updateCount===0)for(const h of this.observers)h.beginUpdate(this);this.updateCount++}endUpdate(){if(this.updateCount--,this.updateCount===0){this.observers.size>0&&this.get();for(const h of this.observers)h.endUpdate(this)}}get(){if(this.observers.size===0)return this.computeFn(this);if(this.updateCount>0&&this.hasValue){for(const h of this._dependencies)if(h.get(),!this.hasValue)break}if(!this.hasValue){const h=this.staleDependencies;this.staleDependencies=this._dependencies,this._dependencies=h;const g=this.value;try{this.value=this.computeFn(this)}finally{for(const d of this.staleDependencies)d.unsubscribe(this);this.staleDependencies.clear()}if(this.hasValue=!0,this.hadValue&&g!==this.value)for(const d of this.observers)d.handleChange(this)}return this.value}}(function(n){n.Observer=s})(S=e.LazyDerived||(e.LazyDerived={}));function l(n){const h=new D({},"promiseValue");return n.then(g=>{h.set({value:g},void 0)}),h}e.observableFromPromise=l;function r(n,h){return new p(n,h)}e.observableFromEvent=r;class p extends _{constructor(h,g){super();this.event=h,this.getValue=g,this.hasValue=!1,this.handleEvent=d=>{const m=this.getValue(d);this.value!==m&&(this.value=m,this.hasValue&&A(b=>{for(const E of this.observers)b.updateObserver(E,this),E.handleChange(this)}),this.hasValue=!0)}}onFirstObserverSubscribed(){this.subscription=this.event(this.handleEvent)}onLastObserverUnsubscribed(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){return this.subscription?(this.hasValue||this.handleEvent(void 0),this.value):this.getValue(void 0)}}(function(n){n.Observer=p})(r=e.observableFromEvent||(e.observableFromEvent={}));function u(n,h,g){const d=new D(void 0,"debounced");let m;return g.add(v(b=>{const E=n.read(b);m&&clearTimeout(m),m=setTimeout(()=>{A(y=>{d.set(E,y)})},h)},"debounce")),d}e.debouncedObservable=u;function a(n,h,g){const d=new D(!1,"triggeredRecently");let m;return g.add(n(()=>{d.set(!0,void 0),m&&clearTimeout(m),m=setTimeout(()=>{d.set(!1,void 0)},h)})),d}e.wasEventTriggeredRecently=a}),define(ne[411],re([1,0,11,2,18,98,8,5,571,6,1440]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AudioCue=e.Sound=e.AudioCueService=e.IAudioCueService=void 0,e.IAudioCueService=(0,D.createDecorator)("audioCue");let C=class extends f.Disposable{constructor(s,l){super();this.configurationService=s,this.accessibilityService=l,this.screenReaderAttached=(0,I.observableFromEvent)(this.accessibilityService.onDidChangeScreenReaderOptimized,()=>this.accessibilityService.isScreenReaderOptimized()),this.obsoleteAudioCuesEnabled=(0,I.observableFromEvent)(w.Event.filter(this.configurationService.onDidChangeConfiguration,r=>r.affectsConfiguration("audioCues.enabled")),()=>this.configurationService.getValue("audioCues.enabled")),this.isEnabledCache=new o(r=>{const p=(0,I.observableFromEvent)(w.Event.filter(this.configurationService.onDidChangeConfiguration,u=>u.affectsConfiguration(r.settingsKey)),()=>this.configurationService.getValue(r.settingsKey));return new I.LazyDerived(u=>{const a=p.read(u);if(a==="on"||a==="auto"&&this.screenReaderAttached.read(u))return!0;const n=this.obsoleteAudioCuesEnabled.read(u);return!!(n==="on"||n==="auto"&&this.screenReaderAttached.read(u))},"audio cue enabled")})}async playAudioCue(s){this.isEnabled(s).get()&&await this.playSound(s.sound)}async playAudioCues(s){const l=new Set(s.filter(r=>this.isEnabled(r).get()).map(r=>r.sound));await Promise.all(Array.from(l).map(r=>this.playSound(r)))}getVolumeInPercent(){let s=this.configurationService.getValue("audioCues.volume");return typeof s!="number"?50:Math.max(Math.min(s,100),0)}async playSound(s){const l=_.FileAccess.asBrowserUri(`vs/workbench/contrib/audioCues/browser/media/${s.fileName}`,Q).toString(),r=new Audio(l);r.volume=this.getVolumeInPercent()/100;try{try{await(0,t.raceTimeout)(r.play(),1e3)}catch(p){console.error("Error while playing sound",p)}}finally{r.remove()}}isEnabled(s){return this.isEnabledCache.get(s)}};C=Ee([W(0,k.IConfigurationService),W(1,A.IAccessibilityService)],C),e.AudioCueService=C;class o{constructor(s){this.getValue=s,this.map=new Map}get(s){if(this.map.has(s))return this.map.get(s);const l=this.getValue(s);return this.map.set(s,l),l}}class c{constructor(s){this.fileName=s}static register(s){return new c(s.fileName)}}e.Sound=c,c.error=c.register({fileName:"error.opus"}),c.warning=c.register({fileName:"warning.opus"}),c.foldedArea=c.register({fileName:"foldedAreas.opus"}),c.break=c.register({fileName:"break.opus"}),c.quickFixes=c.register({fileName:"quickFixes.opus"});class i{constructor(s,l,r){this.sound=s,this.name=l,this.settingsKey=r}static register(s){const l=new i(s.sound,s.name,s.settingsKey);return i._audioCues.add(l),l}static get allAudioCues(){return[...this._audioCues]}}e.AudioCue=i,i._audioCues=new Set,i.error=i.register({name:(0,v.localize)(0,null),sound:c.error,settingsKey:"audioCues.lineHasError"}),i.warning=i.register({name:(0,v.localize)(1,null),sound:c.warning,settingsKey:"audioCues.lineHasWarning"}),i.foldedArea=i.register({name:(0,v.localize)(2,null),sound:c.foldedArea,settingsKey:"audioCues.lineHasFoldedArea"}),i.break=i.register({name:(0,v.localize)(3,null),sound:c.break,settingsKey:"audioCues.lineHasBreakpoint"}),i.inlineSuggestion=i.register({name:(0,v.localize)(4,null),sound:c.quickFixes,settingsKey:"audioCues.lineHasInlineSuggestion"}),i.onDebugBreak=i.register({name:(0,v.localize)(5,null),sound:c.break,settingsKey:"audioCues.onDebugBreak"}),i.noInlayHints=i.register({name:(0,v.localize)(6,null),sound:c.error,settingsKey:"audioCues.noInlayHints"})}),define(ne[2122],re([1,0,2,136,20,61,184,147,394,55,52,140]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BulkTextEdits=void 0;class o{constructor(s){this._modelReference=s,this.model=this._modelReference.object.textEditorModel,this._edits=[]}dispose(){this._modelReference.dispose()}isNoOp(){return!(this._edits.length>0||this._newEol!==void 0&&this._newEol!==this.model.getEndOfLineSequence())}addEdit(s){this._expectedModelVersionId=s.versionId;const{textEdit:l}=s;if(typeof l.eol=="number"&&(this._newEol=l.eol),!l.range&&!l.text||_.Range.isEmpty(l.range)&&!l.text)return;let r;l.range?r=_.Range.lift(l.range):r=this.model.getFullModelRange(),this._edits.push(f.EditOperation.replaceMove(r,l.text))}validate(){return typeof this._expectedModelVersionId=="undefined"||this.model.getVersionId()===this._expectedModelVersionId?{canApply:!0}:{canApply:!1,reason:this.model.uri}}getBeforeCursorState(){return null}apply(){this._edits.length>0&&(this._edits=this._edits.sort((s,l)=>_.Range.compareRangesUsingStarts(s.range,l.range)),this.model.pushEditOperations(null,this._edits,()=>null)),this._newEol!==void 0&&this.model.pushEOL(this._newEol)}}class c extends o{constructor(s,l){super(s);this._editor=l}getBeforeCursorState(){return this._canUseEditor()?this._editor.getSelections():null}apply(){if(!this._canUseEditor()){super.apply();return}this._edits.length>0&&(this._edits=this._edits.sort((s,l)=>_.Range.compareRangesUsingStarts(s.range,l.range)),this._editor.executeEdits("",this._edits)),this._newEol!==void 0&&this._editor.hasModel()&&this._editor.getModel().pushEOL(this._newEol)}_canUseEditor(){return this._editor?.getModel()?.uri.toString()===this.model.uri.toString()}}let i=class{constructor(s,l,r,p,u,a,n,h,g,d,m,b){this._label=s,this._code=l,this._editor=r,this._undoRedoGroup=p,this._undoRedoSource=u,this._progress=a,this._token=n,this._editorWorker=g,this._modelService=d,this._textModelResolverService=m,this._undoRedoService=b,this._edits=new w.ResourceMap;for(const E of h){let y=this._edits.get(E.resource);y||(y=[],this._edits.set(E.resource,y)),y.push(E)}}_validateBeforePrepare(){for(const s of this._edits.values())for(let l of s)if(typeof l.versionId=="number"){let r=this._modelService.getModel(l.resource);if(r&&r.getVersionId()!==l.versionId)throw new Error(`${r.uri.toString()} has changed in the meantime`)}}async _createEditsTasks(){const s=[],l=[];for(let[r,p]of this._edits){const u=this._textModelResolverService.createModelReference(r).then(async a=>{let n,h=!1;this._editor?.getModel()?.uri.toString()===a.object.textEditorModel.uri.toString()?(n=new c(a,this._editor),h=!0):n=new o(a);for(const g of p)if(h){const d=await this._editorWorker.computeMoreMinimalEdits(g.resource,[g.textEdit]);if(!d)n.addEdit(g);else for(let m of d)n.addEdit(new C.ResourceTextEdit(g.resource,m,g.versionId,g.metadata))}else n.addEdit(g);s.push(n)});l.push(u)}return await Promise.all(l),s}_validateTasks(s){for(const l of s){const r=l.validate();if(!r.canApply)return r}return{canApply:!0}}async apply(){this._validateBeforePrepare();const s=await this._createEditsTasks();if(!this._token.isCancellationRequested)try{const l=this._validateTasks(s);if(!l.canApply)throw new Error(`${l.reason.toString()} has changed in the meantime`);if(s.length===1){const r=s[0];if(!r.isNoOp()){const p=new I.SingleModelEditStackElement(this._label,this._code,r.model,r.getBeforeCursorState());this._undoRedoService.pushElement(p,this._undoRedoGroup,this._undoRedoSource),r.apply(),p.close()}this._progress.report(void 0)}else{const r=new I.MultiModelEditStackElement(this._label,this._code,s.map(p=>new I.SingleModelEditStackElement(this._label,this._code,p.model,p.getBeforeCursorState())));this._undoRedoService.pushElement(r,this._undoRedoGroup,this._undoRedoSource);for(const p of s)p.apply(),this._progress.report(void 0);r.close()}}finally{(0,t.dispose)(s)}}};i=Ee([W(8,k.IEditorWorkerService),W(9,v.IModelService),W(10,A.ITextModelService),W(11,D.IUndoRedoService)],i),e.BulkTextEdits=i}),define(ne[572],re([1,0,30,457,9,49,15,22,2,28,13,52,61]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyModel=e.CallHierarchyProviderRegistry=e.CallHierarchyDirection=void 0;var c;(function(l){l.CallsTo="incomingCalls",l.CallsFrom="outgoingCalls"})(c=e.CallHierarchyDirection||(e.CallHierarchyDirection={})),e.CallHierarchyProviderRegistry=new f.LanguageFeatureRegistry;class i{constructor(r,p,u,a){this.id=r,this.provider=p,this.roots=u,this.ref=a,this.root=u[0]}static async create(r,p,u){const[a]=e.CallHierarchyProviderRegistry.ordered(r);if(!a)return;const n=await a.prepareCallHierarchy(r,p,u);if(!!n)return new i(n.roots.reduce((h,g)=>h+g._sessionId,""),a,n.roots,new I.RefCountedDisposable(n))}dispose(){this.ref.release()}fork(r){const p=this;return new class extends i{constructor(){super(p.id,p.provider,[r],p.ref.acquire())}}}async resolveIncomingCalls(r,p){try{const u=await this.provider.provideIncomingCalls(r,p);if((0,k.isNonEmptyArray)(u))return u}catch(u){(0,D.onUnexpectedExternalError)(u)}return[]}async resolveOutgoingCalls(r,p){try{const u=await this.provider.provideOutgoingCalls(r,p);if((0,k.isNonEmptyArray)(u))return u}catch(u){(0,D.onUnexpectedExternalError)(u)}return[]}}e.CallHierarchyModel=i;const S=new Map;w.CommandsRegistry.registerCommand("_executePrepareCallHierarchy",async(l,...r)=>{const[p,u]=r;(0,v.assertType)(_.URI.isUri(p)),(0,v.assertType)(A.Position.isIPosition(u));let n=l.get(C.IModelService).getModel(p),h;if(!n){const d=await l.get(o.ITextModelService).createModelReference(p);n=d.object.textEditorModel,h=d}try{const g=await i.create(n,u,t.CancellationToken.None);return g?(S.set(g.id,g),S.forEach((d,m,b)=>{b.size>10&&(d.dispose(),S.delete(m))}),[g.root]):[]}finally{h?.dispose()}});function s(l){return!0}w.CommandsRegistry.registerCommand("_executeProvideIncomingCalls",async(l,...r)=>{const[p]=r;(0,v.assertType)(s(p));const u=S.get(p._sessionId);if(!!u)return u.resolveIncomingCalls(p,t.CancellationToken.None)}),w.CommandsRegistry.registerCommand("_executeProvideOutgoingCalls",async(l,...r)=>{const[p]=r;(0,v.assertType)(s(p));const u=S.get(p._sessionId);if(!!u)return u.resolveOutgoingCalls(p,t.CancellationToken.None)})}),define(ne[2123],re([1,0,572,30,102,234,86,29,20,1450,33]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccessibilityProvider=e.VirtualDelegate=e.CallRenderer=e.IdentityProvider=e.Sorter=e.DataSource=e.Call=void 0;class C{constructor(u,a,n,h){this.item=u,this.locations=a,this.model=n,this.parent=h}static compare(u,a){let n=(0,D.compare)(u.item.uri.toString(),a.item.uri.toString());return n===0&&(n=I.Range.compareRangesUsingStarts(u.item.range,a.item.range)),n}}e.Call=C;class o{constructor(u){this.getDirection=u}hasChildren(){return!0}async getChildren(u){if(u instanceof t.CallHierarchyModel)return u.roots.map(h=>new C(h,void 0,u,void 0));const{model:a,item:n}=u;return this.getDirection()==="outgoingCalls"?(await a.resolveOutgoingCalls(n,f.CancellationToken.None)).map(h=>new C(h.to,h.fromRanges.map(g=>({range:g,uri:n.uri})),a,u)):(await a.resolveIncomingCalls(n,f.CancellationToken.None)).map(h=>new C(h.from,h.fromRanges.map(g=>({range:g,uri:h.from.uri})),a,u))}}e.DataSource=o;class c{compare(u,a){return C.compare(u,a)}}e.Sorter=c;class i{constructor(u){this.getDirection=u}getId(u){let a=this.getDirection()+JSON.stringify(u.item.uri)+JSON.stringify(u.item.range);return u.parent&&(a+=this.getId(u.parent)),a}}e.IdentityProvider=i;class S{constructor(u,a){this.icon=u,this.label=a}}class s{constructor(){this.templateId=s.id}renderTemplate(u){u.classList.add("callhierarchy-element");let a=document.createElement("div");u.appendChild(a);const n=new A.IconLabel(u,{supportHighlights:!0});return new S(a,n)}renderElement(u,a,n){const{element:h,filterData:g}=u,d=h.item.tags?.includes(1);n.icon.classList.add("inline",...v.CSSIcon.asClassNameArray(k.SymbolKinds.toIcon(h.item.kind))),n.label.setLabel(h.item.name,h.item.detail,{labelEscapeNewLines:!0,matches:(0,_.createMatches)(g),strikethrough:d})}disposeTemplate(u){u.label.dispose()}}e.CallRenderer=s,s.id="CallRenderer";class l{getHeight(u){return 22}getTemplateId(u){return s.id}}e.VirtualDelegate=l;class r{constructor(u){this.getDirection=u}getWidgetAriaLabel(){return(0,w.localize)(0,null)}getAriaLabel(u){return this.getDirection()==="outgoingCalls"?(0,w.localize)(1,null,u.item.name):(0,w.localize)(2,null,u.item.name)}}e.AccessibilityProvider=r}),define(ne[2124],re([1,0,6,2,553,314,260,1451,57,38,17]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionsContribution=e.editorConfiguration=void 0;const C=Object.freeze({"source.fixAll":{type:"boolean",description:D.localize(0,null)}}),o={oneOf:[{type:"object",properties:C,additionalProperties:{type:"boolean"}},{type:"array",items:{type:"string"}}],default:{},description:D.localize(1,null),scope:5};e.editorConfiguration=Object.freeze({..._.editorConfigurationBaseNode,properties:{"editor.codeActionsOnSave":o}});let c=class extends f.Disposable{constructor(S,s){super();this._contributedCodeActions=[],this._onDidChangeContributions=this._register(new t.Emitter),S.setHandler(l=>{this._contributedCodeActions=l.map(r=>r.value).flat(),this.updateConfigurationSchema(this._contributedCodeActions),this._onDidChangeContributions.fire()}),s.registerSchemaContribution({getSchemaAdditions:()=>this.getSchemaAdditions(),onDidChange:this._onDidChangeContributions.event})}updateConfigurationSchema(S){const s={...C};for(const[l,r]of this.getSourceActions(S))s[l]={type:"boolean",description:D.localize(2,null,r.title)};o.properties=s,v.Registry.as(I.Extensions.Configuration).notifyConfigurationSchemaUpdated(e.editorConfiguration)}getSourceActions(S){const s=Object.keys(C).map(r=>new k.CodeActionKind(r)),l=new Map;for(const r of S)for(const p of r.actions){const u=new k.CodeActionKind(p.kind);k.CodeActionKind.Source.contains(u)&&!s.some(a=>a.contains(u))&&l.set(u.value,p)}return l}getSchemaAdditions(){const S=(l,r)=>({if:{properties:{command:{const:l}}},then:{properties:{args:{required:["kind"],properties:{kind:{anyOf:[{enum:r.map(p=>p.kind),enumDescriptions:r.map(p=>p.description??p.title)},{type:"string"}]}}}}}}),s=l=>{const r=this._contributedCodeActions.map(u=>u.actions).flat(),p=new Map;for(const u of r)!p.has(u.kind)&&l.contains(new k.CodeActionKind(u.kind))&&p.set(u.kind,u);return Array.from(p.values())};return[S(A.codeActionCommandId,s(k.CodeActionKind.Empty)),S(A.refactorCommandId,s(k.CodeActionKind.Refactor)),S(A.sourceActionCommandId,s(k.CodeActionKind.Source))]}};c=Ee([W(1,w.IKeybindingService)],c),e.CodeActionsContribution=c}),define(ne[2125],re([1,0,2,62,260,7]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionDocumentationContribution=void 0;let k=class extends t.Disposable{constructor(I,w,v){super();this.contextKeyService=w,this.contributions=[],this.emptyCodeActionsList={actions:[],dispose:()=>{}},this._register(v.codeActionProvider.register("*",this)),I.setHandler(C=>{this.contributions=[];for(const o of C)if(!!o.value.refactoring)for(const c of o.value.refactoring){const i=A.ContextKeyExpr.deserialize(c.when);!i||this.contributions.push({title:c.title,when:i,command:c.command})}})}async provideCodeActions(I,w,v,C){return this.emptyCodeActionsList}_getAdditionalMenuItems(I,w){return I.only!==_.CodeActionKind.Refactor.value&&!w.some(v=>v.kind&&_.CodeActionKind.Refactor.contains(new _.CodeActionKind(v.kind)))?[]:this.contributions.filter(v=>this.contextKeyService.contextMatchesRules(v.when)).map(v=>({id:v.command,title:v.title}))}};k=Ee([W(1,A.IContextKeyService),W(2,f.ILanguageFeaturesService)],k),e.CodeActionDocumentationContribution=k}),define(ne[784],re([1,0,1456,10,138,11,315,476,7,37,32,12,236,63,1074]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleFindWidget=void 0;const i=t.localize(0,null),S=t.localize(1,null),s=t.localize(2,null),l=t.localize(3,null),r=t.localize(4,null);let p=class extends _.Widget{constructor(a,n,h=new k.FindReplaceState,g,d){super();this._contextViewService=a,this._state=h,this._isVisible=!1,this.foundMatch=!1,this._findInput=this._register(new o.ContextScopedFindInput(null,this._contextViewService,{label:i,placeholder:S,validation:b=>{if(b.length===0||!this._findInput.getRegex())return null;try{return new RegExp(b),null}catch(E){return this.foundMatch=!1,this.updateButtons(this.foundMatch),{content:E.message}}}},n,g)),this._updateHistoryDelayer=new A.Delayer(500),this._register(this._findInput.onInput(b=>{(!d||!this._findInput.isImeSessionInProgress)&&(this.foundMatch=this._onInputChanged(),this.updateButtons(this.foundMatch),this.focusFindBox(),this._delayedUpdateHistory())})),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._state.onFindReplaceStateChange(()=>{this._findInput.setRegex(this._state.isRegex),this._findInput.setWholeWords(this._state.wholeWord),this._findInput.setCaseSensitive(this._state.matchCase),this.findFirst()})),this.prevBtn=this._register(new D.SimpleButton({label:s,icon:D.findPreviousMatchIcon,onTrigger:()=>{this.find(!0)}})),this.nextBtn=this._register(new D.SimpleButton({label:l,icon:D.findNextMatchIcon,onTrigger:()=>{this.find(!1)}}));const m=this._register(new D.SimpleButton({label:r,icon:c.widgetClose,onTrigger:()=>{this.hide()}}));this._innerDomNode=document.createElement("div"),this._innerDomNode.classList.add("simple-find-part"),this._innerDomNode.appendChild(this._findInput.domNode),this._innerDomNode.appendChild(this.prevBtn.domNode),this._innerDomNode.appendChild(this.nextBtn.domNode),this._innerDomNode.appendChild(m.domNode),this._domNode=document.createElement("div"),this._domNode.classList.add("simple-find-part-wrapper"),this._domNode.appendChild(this._innerDomNode),this.onkeyup(this._innerDomNode,b=>{if(b.equals(9)){this.hide(),b.preventDefault();return}}),this._focusTracker=this._register(f.trackFocus(this._innerDomNode)),this._register(this._focusTracker.onDidFocus(this._onFocusTrackerFocus.bind(this))),this._register(this._focusTracker.onDidBlur(this._onFocusTrackerBlur.bind(this))),this._findInputFocusTracker=this._register(f.trackFocus(this._findInput.domNode)),this._register(this._findInputFocusTracker.onDidFocus(this._onFindInputFocusTrackerFocus.bind(this))),this._register(this._findInputFocusTracker.onDidBlur(this._onFindInputFocusTrackerBlur.bind(this))),this._register(f.addDisposableListener(this._innerDomNode,"click",b=>{b.stopPropagation()}))}get inputValue(){return this._findInput.getValue()}get focusTracker(){return this._focusTracker}updateTheme(a){const n={inputActiveOptionBorder:a.getColor(v.inputActiveOptionBorder),inputActiveOptionForeground:a.getColor(v.inputActiveOptionForeground),inputActiveOptionBackground:a.getColor(v.inputActiveOptionBackground),inputBackground:a.getColor(v.inputBackground),inputForeground:a.getColor(v.inputForeground),inputBorder:a.getColor(v.inputBorder),inputValidationInfoBackground:a.getColor(v.inputValidationInfoBackground),inputValidationInfoForeground:a.getColor(v.inputValidationInfoForeground),inputValidationInfoBorder:a.getColor(v.inputValidationInfoBorder),inputValidationWarningBackground:a.getColor(v.inputValidationWarningBackground),inputValidationWarningForeground:a.getColor(v.inputValidationWarningForeground),inputValidationWarningBorder:a.getColor(v.inputValidationWarningBorder),inputValidationErrorBackground:a.getColor(v.inputValidationErrorBackground),inputValidationErrorForeground:a.getColor(v.inputValidationErrorForeground),inputValidationErrorBorder:a.getColor(v.inputValidationErrorBorder)};this._findInput.style(n)}dispose(){super.dispose(),this._domNode&&this._domNode.parentElement&&this._domNode.parentElement.removeChild(this._domNode)}getDomNode(){return this._domNode}reveal(a){if(a&&this._findInput.setValue(a),this._isVisible){this._findInput.select();return}this._isVisible=!0,this.updateButtons(this.foundMatch),setTimeout(()=>{this._innerDomNode.classList.add("visible","visible-transition"),this._innerDomNode.setAttribute("aria-hidden","false"),this._findInput.select()},0)}show(a){a&&!this._isVisible&&this._findInput.setValue(a),this._isVisible=!0,setTimeout(()=>{this._innerDomNode.classList.add("visible","visible-transition"),this._innerDomNode.setAttribute("aria-hidden","false")},0)}hide(){this._isVisible&&(this._innerDomNode.classList.remove("visible-transition"),this._innerDomNode.setAttribute("aria-hidden","true"),setTimeout(()=>{this._isVisible=!1,this.updateButtons(this.foundMatch),this._innerDomNode.classList.remove("visible")},200))}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this))}_updateHistory(){this._findInput.inputBox.addToHistory()}_getRegexValue(){return this._findInput.getRegex()}_getWholeWordValue(){return this._findInput.getWholeWords()}_getCaseSensitiveValue(){return this._findInput.getCaseSensitive()}updateButtons(a){const n=this.inputValue.length>0;this.prevBtn.setEnabled(this._isVisible&&n&&a),this.nextBtn.setEnabled(this._isVisible&&n&&a)}focusFindBox(){this.nextBtn.focus(),this._findInput.inputBox.focus()}};p=Ee([W(0,w.IContextViewService),W(1,I.IContextKeyService)],p),e.SimpleFindWidget=p,(0,C.registerThemingParticipant)((u,a)=>{const n=u.getColor(v.editorWidgetBackground);n&&a.addRule(`.monaco-workbench .simple-find-part { background-color: ${n} !important; }`);const h=u.getColor(v.editorWidgetForeground);h&&a.addRule(`.monaco-workbench .simple-find-part { color: ${h}; }`);const g=u.getColor(v.widgetShadow);g&&a.addRule(`.monaco-workbench .simple-find-part { box-shadow: 0 0 8px 2px ${g}; }`)})}),define(ne[2126],re([1,0,1460,48,2,39,8,26]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LargeFileOptimizationsWarner=void 0;let I=class extends _.Disposable{constructor(v,C,o){super();this._editor=v,this._notificationService=C,this._configurationService=o,this._register(this._editor.onDidChangeModel(c=>{const i=this._editor.getModel();if(!!i&&i.isTooLargeForTokenization()){const S=t.localize(0,null,f.basename(i.uri.path));this._notificationService.prompt(D.Severity.Info,S,[{label:t.localize(1,null),run:()=>{this._configurationService.updateValue("editor.largeFileOptimizations",!1).then(()=>{this._notificationService.info(t.localize(2,null))},s=>{this._notificationService.error(s)})}}],{neverShowAgain:{id:"editor.contrib.largeFileOptimizationsWarner"}})}}))}};I.ID="editor.contrib.largeFileOptimizationsWarner",I=Ee([W(1,D.INotificationService),W(2,k.IConfigurationService)],I),e.LargeFileOptimizationsWarner=I,(0,A.registerEditorContribution)(I.ID,I)}),define(ne[318],re([1,0,2,39]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenuPreventer=void 0;class _ extends t.Disposable{constructor(k){super();this._editor=k,this._altListeningMouse=!1,this._altMouseTriggered=!1,this._register(this._editor.onMouseDown(D=>{this._altListeningMouse&&(this._altMouseTriggered=!0)})),this._register(this._editor.onKeyDown(D=>{D.equals(512)&&(this._altListeningMouse||(this._altMouseTriggered=!1),this._altListeningMouse=!0)})),this._register(this._editor.onKeyUp(D=>{D.equals(512)&&(this._altMouseTriggered&&D.preventDefault(),this._altListeningMouse=!1,this._altMouseTriggered=!1)}))}}e.MenuPreventer=_,_.ID="editor.contrib.menuPreventer",(0,f.registerEditorContribution)(_.ID,_)}),define(ne[2127],re([1,0,10,241,102,20,86,400,1462,234,8,125,12,32,11,113,33,1076,751]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DocumentSymbolComparator=e.DocumentSymbolFilter=e.DocumentSymbolRenderer=e.DocumentSymbolGroupRenderer=e.DocumentSymbolVirtualDelegate=e.DocumentSymbolIdentityProvider=e.DocumentSymbolAccessibilityProvider=e.DocumentSymbolNavigationLabelProvider=void 0;class l{getKeyboardNavigationLabel(E){return E instanceof D.OutlineGroup?E.label:E.symbol.name}}e.DocumentSymbolNavigationLabelProvider=l;class r{constructor(E){this._ariaLabel=E}getWidgetAriaLabel(){return this._ariaLabel}getAriaLabel(E){return E instanceof D.OutlineGroup?E.label:E.symbol.name}}e.DocumentSymbolAccessibilityProvider=r;class p{getId(E){return E.id}}e.DocumentSymbolIdentityProvider=p;class u{constructor(E,y){this.labelContainer=E,this.label=y}}u.id="DocumentSymbolGroupTemplate";class a{constructor(E,y,T,R){this.container=E,this.iconLabel=y,this.iconClass=T,this.decoration=R}}a.id="DocumentSymbolTemplate";class n{getHeight(E){return 22}getTemplateId(E){return E instanceof D.OutlineGroup?u.id:a.id}}e.DocumentSymbolVirtualDelegate=n;class h{constructor(){this.templateId=u.id}renderTemplate(E){const y=t.$(".outline-element-label");return E.classList.add("outline-element"),t.append(E,y),new u(y,new f.HighlightedLabel(y))}renderElement(E,y,T){T.label.set(E.element.label,(0,_.createMatches)(E.filterData))}disposeTemplate(E){}}e.DocumentSymbolGroupRenderer=h;let g=class Co{constructor(E,y,T){this._renderMarker=E,this._configurationService=y,this._themeService=T,this.templateId=a.id}renderTemplate(E){E.classList.add("outline-element");const y=new w.IconLabel(E,{supportHighlights:!0}),T=t.$(".outline-element-icon"),R=t.$(".outline-element-decoration");return E.prepend(T),E.appendChild(R),new a(E,y,T,R)}renderElement(E,y,T){const{element:R}=E,O={matches:(0,_.createMatches)(E.filterData),labelEscapeNewLines:!0,extraClasses:["nowrap"],title:(0,I.localize)(0,null,R.symbol.name,Co._symbolKindNames[R.symbol.kind])};this._configurationService.getValue("outline.icons")&&(T.iconClass.className="",T.iconClass.classList.add("outline-element-icon","inline",...s.CSSIcon.asClassNameArray(k.SymbolKinds.toIcon(R.symbol.kind)))),R.symbol.tags.indexOf(1)>=0&&(O.extraClasses.push("deprecated"),O.matches=[]),T.iconLabel.setLabel(R.symbol.name,R.symbol.detail,O),this._renderMarker&&this._renderMarkerInfo(R,T)}_renderMarkerInfo(E,y){if(!E.marker){t.hide(y.decoration),y.container.style.removeProperty("--outline-element-color");return}const{count:T,topSev:R}=E.marker,O=this._themeService.getColorTheme().getColor(R===C.MarkerSeverity.Error?c.listErrorForeground:c.listWarningForeground),x=O?O.toString():"inherit";this._configurationService.getValue("outline.problems.colors")?y.container.style.setProperty("--outline-element-color",x):y.container.style.removeProperty("--outline-element-color"),this._configurationService.getValue("outline.problems.badges")?T>0?(t.show(y.decoration),y.decoration.classList.remove("bubble"),y.decoration.innerText=T<10?T.toString():"+9",y.decoration.title=T===1?(0,I.localize)(1,null):(0,I.localize)(2,null,T),y.decoration.style.setProperty("--outline-element-color",x)):(t.show(y.decoration),y.decoration.classList.add("bubble"),y.decoration.innerText="\uEA71",y.decoration.title=(0,I.localize)(3,null),y.decoration.style.setProperty("--outline-element-color",x)):t.hide(y.decoration)}disposeTemplate(E){E.iconLabel.dispose()}};g._symbolKindNames={[17]:(0,I.localize)(4,null),[16]:(0,I.localize)(5,null),[4]:(0,I.localize)(6,null),[13]:(0,I.localize)(7,null),[8]:(0,I.localize)(8,null),[9]:(0,I.localize)(9,null),[21]:(0,I.localize)(10,null),[23]:(0,I.localize)(11,null),[7]:(0,I.localize)(12,null),[0]:(0,I.localize)(13,null),[11]:(0,I.localize)(14,null),[10]:(0,I.localize)(15,null),[19]:(0,I.localize)(16,null),[5]:(0,I.localize)(17,null),[1]:(0,I.localize)(18,null),[2]:(0,I.localize)(19,null),[20]:(0,I.localize)(20,null),[15]:(0,I.localize)(21,null),[18]:(0,I.localize)(22,null),[24]:(0,I.localize)(23,null),[3]:(0,I.localize)(24,null),[6]:(0,I.localize)(25,null),[14]:(0,I.localize)(26,null),[22]:(0,I.localize)(27,null),[25]:(0,I.localize)(28,null),[12]:(0,I.localize)(29,null)},g=Ee([W(1,v.IConfigurationService),W(2,o.IThemeService)],g),e.DocumentSymbolRenderer=g;let d=class wo{constructor(E,y){this._prefix=E,this._textResourceConfigService=y}filter(E){const y=D.OutlineModel.get(E);if(!(E instanceof D.OutlineElement))return!0;const T=wo.kindToConfigName[E.symbol.kind],R=`${this._prefix}.${T}`;return this._textResourceConfigService.getValue(y?.uri,R)}};d.kindToConfigName=Object.freeze({[0]:"showFiles",[1]:"showModules",[2]:"showNamespaces",[3]:"showPackages",[4]:"showClasses",[5]:"showMethods",[6]:"showProperties",[7]:"showFields",[8]:"showConstructors",[9]:"showEnums",[10]:"showInterfaces",[11]:"showFunctions",[12]:"showVariables",[13]:"showConstants",[14]:"showStrings",[15]:"showNumbers",[16]:"showBooleans",[17]:"showArrays",[18]:"showObjects",[19]:"showKeys",[20]:"showNull",[21]:"showEnumMembers",[22]:"showStructs",[23]:"showEvents",[24]:"showOperators",[25]:"showTypeParameters"}),d=Ee([W(1,S.ITextResourceConfigurationService)],d),e.DocumentSymbolFilter=d;class m{constructor(){this._collator=new i.IdleValue(()=>new Intl.Collator(void 0,{numeric:!0}))}compareByPosition(E,y){return E instanceof D.OutlineGroup&&y instanceof D.OutlineGroup?E.order-y.order:E instanceof D.OutlineElement&&y instanceof D.OutlineElement?A.Range.compareRangesUsingStarts(E.symbol.range,y.symbol.range)||this._collator.value.compare(E.symbol.name,y.symbol.name):0}compareByType(E,y){return E instanceof D.OutlineGroup&&y instanceof D.OutlineGroup?E.order-y.order:E instanceof D.OutlineElement&&y instanceof D.OutlineElement?E.symbol.kind-y.symbol.kind||this._collator.value.compare(E.symbol.name,y.symbol.name):0}compareByName(E,y){return E instanceof D.OutlineGroup&&y instanceof D.OutlineGroup?E.order-y.order:E instanceof D.OutlineElement&&y instanceof D.OutlineElement?this._collator.value.compare(E.symbol.name,y.symbol.name)||A.Range.compareRangesUsingStarts(E.symbol.range,y.symbol.range):0}}e.DocumentSymbolComparator=m}),define(ne[354],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionClipboardContributionID=void 0,e.SelectionClipboardContributionID="editor.contrib.selectionClipboard"}),define(ne[2128],re([1,0,1466,16,8,7,72,312,49,84]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleColumnSelectionAction=void 0;class v extends f.Action2{constructor(){super({id:v.ID,title:{value:(0,t.localize)(0,null),mnemonicTitle:(0,t.localize)(1,null),original:"Toggle Column Selection Mode"},f1:!0,toggled:A.ContextKeyExpr.equals("config.editor.columnSelection",!0),menu:{id:f.MenuId.MenubarSelectionMenu,group:"4_config",order:2}})}async run(o){const c=o.get(_.IConfigurationService),i=o.get(k.ICodeEditorService),S=c.getValue("editor.columnSelection"),s=this._getCodeEditor(i);await c.updateValue("editor.columnSelection",!S);const l=c.getValue("editor.columnSelection");if(!s||s!==this._getCodeEditor(i)||S===l||!s.hasModel()||typeof S!="boolean"||typeof l!="boolean")return;const r=s._getViewModel();if(s.getOption(18)){const p=s.getSelection(),u=new I.Position(p.selectionStartLineNumber,p.selectionStartColumn),a=r.coordinatesConverter.convertModelPositionToViewPosition(u),n=new I.Position(p.positionLineNumber,p.positionColumn),h=r.coordinatesConverter.convertModelPositionToViewPosition(n);D.CoreNavigationCommands.MoveTo.runCoreEditorCommand(r,{position:u,viewPosition:a});const g=r.cursorConfig.visibleColumnFromColumn(r,h);D.CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(r,{position:n,viewPosition:h,doColumnSelect:!0,mouseColumn:g+1})}else{const p=r.getCursorColumnSelectData(),u=r.cursorConfig.columnFromVisibleColumn(r,p.fromViewLineNumber,p.fromViewVisualColumn),a=r.coordinatesConverter.convertViewPositionToModelPosition(new I.Position(p.fromViewLineNumber,u)),n=r.cursorConfig.columnFromVisibleColumn(r,p.toViewLineNumber,p.toViewVisualColumn),h=r.coordinatesConverter.convertViewPositionToModelPosition(new I.Position(p.toViewLineNumber,n));s.setSelection(new w.Selection(a.lineNumber,a.column,h.lineNumber,h.column))}}_getCodeEditor(o){const c=o.getFocusedCodeEditor();return c||o.getActiveCodeEditor()}}e.ToggleColumnSelectionAction=v,v.ID="editor.action.toggleColumnSelection",(0,f.registerAction2)(v)}),define(ne[2129],re([1,0,39,72,561,8,7,5,26,24]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkbenchReferencesController=void 0;let v=class extends _.ReferencesController{constructor(o,c,i,S,s,l,r){super(!1,o,c,i,S,s,l,r)}};v=Ee([W(1,k.IContextKeyService),W(2,f.ICodeEditorService),W(3,I.INotificationService),W(4,D.IInstantiationService),W(5,w.IStorageService),W(6,A.IConfigurationService)],v),e.WorkbenchReferencesController=v,(0,t.registerEditorContribution)(_.ReferencesController.ID,v)}),define(ne[2130],re([1,0,94,14]),function(Q,e,t,f){"use strict";if(Object.defineProperty(e,"__esModule",{value:!0}),f.isMacintosh){let _=function(A){return()=>{document.execCommand(A)}};t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"execCut",primary:2048|54,handler:_("cut"),weight:0,when:void 0}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"execCopy",primary:2048|33,handler:_("copy"),weight:0,when:void 0}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"execPaste",primary:2048|52,handler:_("paste"),weight:0,when:void 0})}}),define(ne[785],re([1,0,86,1475,32]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCommentThreadStateColor=e.commentThreadStateColorVar=e.unresolvedCommentBorder=e.resolvedCommentBorder=void 0,e.resolvedCommentBorder=(0,_.registerColor)("comments.resolved.border",{dark:_.editorWidgetForeground,light:_.editorWidgetForeground,hcDark:_.contrastBorder,hcLight:_.contrastBorder},f.localize(0,null)),e.unresolvedCommentBorder=(0,_.registerColor)("comments.unresolved.border",{dark:_.editorWarningForeground,light:_.editorWarningForeground,hcDark:_.contrastBorder,hcLight:_.contrastBorder},f.localize(1,null));const A=new Map([[t.CommentThreadState.Unresolved,e.unresolvedCommentBorder],[t.CommentThreadState.Resolved,e.resolvedCommentBorder]]);e.commentThreadStateColorVar="--comment-thread-state-color";function k(D,I){const w=D.state!==void 0?A.get(D.state):void 0;return w!==void 0?I.getColor(w):void 0}e.getCommentThreadStateColor=k}),define(ne[786],re([1,0,162,2,68]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentFormActions=void 0;class A{constructor(D,I,w){this.container=D,this.actionHandler=I,this.themeService=w,this._buttonElements=[],this._toDispose=new f.DisposableStore,this._actions=[]}setActions(D){this._toDispose.clear(),this._buttonElements.forEach(w=>w.remove());const I=D.getActions({shouldForwardArgs:!0});for(const w of I){const[,v]=w;this._actions=v,v.forEach(C=>{const o=new t.Button(this.container);this._buttonElements.push(o.element),this._toDispose.add(o),this._toDispose.add((0,_.attachButtonStyler)(o,this.themeService)),this._toDispose.add(o.onDidClick(()=>this.actionHandler(C))),o.enabled=C.enabled,o.label=C.label})}}triggerDefaultAction(){if(this._actions.length){let D=this._actions[0];D.enabled&&this.actionHandler(D)}}dispose(){this._toDispose.dispose()}}e.CommentFormActions=A}),define(ne[787],re([1,0,1476,66,122,93,32,12]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentGlyphWidget=e.overviewRulerCommentingRangeForeground=void 0;const I=new f.Color(new f.RGBA(197,197,197,1));e.overviewRulerCommentingRangeForeground=(0,k.registerColor)("editorGutter.commentRangeForeground",{dark:I,light:I,hcDark:I,hcLight:I},t.localize(0,null));class w{constructor(C,o){this.commentsDecorations=[],this._commentsOptions=this.createDecorationOptions(),this._editor=C,this.setLineNumber(o)}createDecorationOptions(){const C={description:w.description,isWholeLine:!0,overviewRuler:{color:(0,D.themeColorFromId)(e.overviewRulerCommentingRangeForeground),position:_.OverviewRulerLane.Center},linesDecorationsClassName:"comment-range-glyph comment-thread"};return A.ModelDecorationOptions.createDynamic(C)}setLineNumber(C){this._lineNumber=C;let o=[{range:{startLineNumber:C,startColumn:1,endLineNumber:C,endColumn:1},options:this._commentsOptions}];this.commentsDecorations=this._editor.deltaDecorations(this.commentsDecorations,o)}getPosition(){const C=this._editor.hasModel()&&this.commentsDecorations&&this.commentsDecorations.length?this._editor.getModel().getDecorationRange(this.commentsDecorations[0]):null;return{position:{lineNumber:C?C.startLineNumber:this._lineNumber,column:1},preference:[0]}}dispose(){this.commentsDecorations&&this._editor.deltaDecorations(this.commentsDecorations,[])}}e.CommentGlyphWidget=w,w.description="comment-glyph-widget"}),define(ne[2131],re([1,0,16,73]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentMenus=void 0;let _=class{constructor(k){this.menuService=k}getCommentThreadTitleActions(k){return this.getMenu(t.MenuId.CommentThreadTitle,k)}getCommentThreadActions(k){return this.getMenu(t.MenuId.CommentThreadActions,k)}getCommentTitleActions(k,D){return this.getMenu(t.MenuId.CommentTitle,D)}getCommentActions(k,D){return this.getMenu(t.MenuId.CommentActions,D)}getMenu(k,D){const I=this.menuService.createMenu(k,D),C={primary:[],secondary:[]};return(0,f.createAndFillInContextMenuActions)(I,{shouldForwardArgs:!0},C,"inline"),I}dispose(){}};_=Ee([W(0,t.IMenuService)],_),e.CommentMenus=_}),define(ne[249],re([1,0,5,6,2,30,2131]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentService=e.ICommentService=void 0,e.ICommentService=(0,t.createDecorator)("commentService");let D=class extends _.Disposable{constructor(w){super();this.instantiationService=w,this._onDidSetDataProvider=this._register(new f.Emitter),this.onDidSetDataProvider=this._onDidSetDataProvider.event,this._onDidDeleteDataProvider=this._register(new f.Emitter),this.onDidDeleteDataProvider=this._onDidDeleteDataProvider.event,this._onDidSetResourceCommentInfos=this._register(new f.Emitter),this.onDidSetResourceCommentInfos=this._onDidSetResourceCommentInfos.event,this._onDidSetAllCommentThreads=this._register(new f.Emitter),this.onDidSetAllCommentThreads=this._onDidSetAllCommentThreads.event,this._onDidUpdateCommentThreads=this._register(new f.Emitter),this.onDidUpdateCommentThreads=this._onDidUpdateCommentThreads.event,this._onDidUpdateNotebookCommentThreads=this._register(new f.Emitter),this.onDidUpdateNotebookCommentThreads=this._onDidUpdateNotebookCommentThreads.event,this._onDidUpdateCommentingRanges=this._register(new f.Emitter),this.onDidUpdateCommentingRanges=this._onDidUpdateCommentingRanges.event,this._onDidChangeActiveCommentThread=this._register(new f.Emitter),this.onDidChangeActiveCommentThread=this._onDidChangeActiveCommentThread.event,this._onDidChangeActiveCommentingRange=this._register(new f.Emitter),this.onDidChangeActiveCommentingRange=this._onDidChangeActiveCommentingRange.event,this._commentControls=new Map,this._commentMenus=new Map}setActiveCommentThread(w){this._onDidChangeActiveCommentThread.fire(w)}setDocumentComments(w,v){this._onDidSetResourceCommentInfos.fire({resource:w,commentInfos:v})}setWorkspaceComments(w,v){this._onDidSetAllCommentThreads.fire({ownerId:w,commentThreads:v})}removeWorkspaceComments(w){this._onDidSetAllCommentThreads.fire({ownerId:w,commentThreads:[]})}registerCommentController(w,v){this._commentControls.set(w,v),this._onDidSetDataProvider.fire()}unregisterCommentController(w){this._commentControls.delete(w),this._onDidDeleteDataProvider.fire(w)}getCommentController(w){return this._commentControls.get(w)}createCommentThreadTemplate(w,v,C){const o=this._commentControls.get(w);!o||o.createCommentThreadTemplate(v,C)}async updateCommentThreadTemplate(w,v,C){const o=this._commentControls.get(w);!o||await o.updateCommentThreadTemplate(v,C)}disposeCommentThread(w,v){let C=this.getCommentController(w);C&&C.deleteCommentThreadMain(v)}getCommentMenus(w){if(this._commentMenus.get(w))return this._commentMenus.get(w);let v=this.instantiationService.createInstance(k.CommentMenus);return this._commentMenus.set(w,v),v}updateComments(w,v){const C=Object.assign({},v,{owner:w});this._onDidUpdateCommentThreads.fire(C)}updateNotebookComments(w,v){const C=Object.assign({},v,{owner:w});this._onDidUpdateNotebookCommentThreads.fire(C)}updateCommentingRanges(w){this._onDidUpdateCommentingRanges.fire({owner:w})}async toggleReaction(w,v,C,o,c){const i=this._commentControls.get(w);if(i)return i.toggleReaction(v,C,o,c,A.CancellationToken.None);throw new Error("Not supported")}hasReactionHandler(w){const v=this._commentControls.get(w);return v?!!v.features.reactionHandler:!1}async getDocumentComments(w){let v=[];return this._commentControls.forEach(C=>{v.push(C.getDocumentComments(w,A.CancellationToken.None).catch(o=>null))}),Promise.all(v)}async getNotebookComments(w){let v=[];return this._commentControls.forEach(C=>{v.push(C.getNotebookComments(w,A.CancellationToken.None).catch(o=>null))}),Promise.all(v)}async getCommentingRanges(w){let v=[];return this._commentControls.forEach(o=>{v.push(o.getCommentingRanges(w,A.CancellationToken.None))}),(await Promise.all(v)).reduce((o,c)=>(o.push(...c),o),[])}};D=Ee([W(0,t.IInstantiationService)],D),e.CommentService=D}),define(ne[2132],re([1,0,10,78,36,33,2,29,1480,73,63,12]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentThreadHeader=void 0;const o=(0,v.registerIcon)("review-comment-collapse",A.Codicon.chevronUp,I.localize(0,null)),c="expand-review-action "+C.ThemeIcon.asClassName(o);class i extends k.Disposable{constructor(s,l,r,p,u,a){super();this._delegate=l,this._commentMenus=r,this._commentThread=p,this._contextKeyService=u,this.instantiationService=a,this._headElement=t.$(".head"),s.appendChild(this._headElement),this._fillHead()}_fillHead(){let s=t.append(this._headElement,t.$(".review-title"));this._headingLabel=t.append(s,t.$("span.filename")),this.createThreadLabel();const l=t.append(this._headElement,t.$(".review-actions"));this._actionbarWidget=new f.ActionBar(l,{actionViewItemProvider:w.createActionViewItem.bind(void 0,this.instantiationService)}),this._register(this._actionbarWidget),this._collapseAction=new _.Action("review.expand",I.localize(1,null),c,!0,()=>this._delegate.collapse());const r=this._commentMenus.getCommentThreadTitleActions(this._contextKeyService);this.setActionBarActions(r),this._register(r),this._register(r.onDidChange(p=>{this.setActionBarActions(r)})),this._actionbarWidget.context=this._commentThread}setActionBarActions(s){const l=s.getActions({shouldForwardArgs:!0}).reduce((r,[,p])=>[...r,...p],[]);this._actionbarWidget.clear(),this._actionbarWidget.push([...l,this._collapseAction],{label:!1,icon:!0})}updateCommentThread(s){this._commentThread=s,this._actionbarWidget.context=this._commentThread,this.createThreadLabel()}createThreadLabel(){let s;s=this._commentThread.label,s===void 0&&(this._commentThread.comments&&this._commentThread.comments.length||(s=I.localize(2,null))),s&&(this._headingLabel.textContent=D.escape(s),this._headingLabel.setAttribute("aria-label",s))}updateHeight(s){this._headElement.style.height=`${s}px`,this._headElement.style.lineHeight=this._headElement.style.height}}e.CommentThreadHeader=i}),define(ne[2133],re([1,0,1485,10,36,9,134]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReactionAction=e.ReactionActionViewItem=e.ToggleReactionsAction=void 0;class D extends _.Action{constructor(C,o){super(D.ID,o||t.localize(0,null),"toggle-reactions",!0);this._menuActions=[],this.toggleDropdownMenu=C}run(){return this.toggleDropdownMenu(),Promise.resolve(!0)}get menuActions(){return this._menuActions}set menuActions(C){this._menuActions=C}}e.ToggleReactionsAction=D,D.ID="toolbar.toggle.pickReactions";class I extends k.ActionViewItem{constructor(C){super(null,C,{})}updateLabel(){if(!this.label)return;let C=this.getAction();if(C.class&&this.label.classList.add(C.class),C.icon){let o=f.append(this.label,f.$(".reaction-icon"));o.style.display="";let c=A.URI.revive(C.icon);o.style.backgroundImage=f.asCSSUrl(c),o.title=C.label}else{let o=f.append(this.label,f.$("span.reaction-label"));o.innerText=C.label}if(C.count){let o=f.append(this.label,f.$("span.reaction-count"));o.innerText=`${C.count}`}}}e.ReactionActionViewItem=I;class w extends _.Action{constructor(C,o="",c="",i=!0,S,s,l){super(w.ID,o,c,i,S);this.icon=s,this.count=l}}e.ReactionAction=w,w.ID="toolbar.toggle.reaction"}),define(ne[573],re([1,0,7]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentContextKeys=void 0;var f;(function(_){_.commentThreadIsEmpty=new t.RawContextKey("commentThreadIsEmpty",!1),_.commentIsEmpty=new t.RawContextKey("commentIsEmpty",!1)})(f=e.CommentContextKeys||(e.CommentContextKeys={}))}),define(ne[574],re([1,0,9,15,1486]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentsModel=e.ResourceWithCommentThreads=e.CommentNode=void 0;class A{constructor(w,v,C,o,c){this.replies=[],this.owner=w,this.threadId=v,this.comment=o,this.resource=C,this.range=c,this.isRoot=!1}hasReply(){return this.replies&&this.replies.length!==0}}e.CommentNode=A;class k{constructor(w,v,C){this.owner=w,this.id=v.toString(),this.resource=v,this.commentThreads=C.filter(o=>o.comments&&o.comments.length).map(o=>k.createCommentNode(w,v,o))}static createCommentNode(w,v,C){const{threadId:o,comments:c,range:i}=C,S=c.map(s=>new A(w,o,v,s,i));return S.length>1&&(S[0].replies=S.slice(1,S.length)),S[0].isRoot=!0,S[0]}}e.ResourceWithCommentThreads=k;class D{constructor(){this.resourceCommentThreads=[],this.commentThreadsMap=new Map}updateResourceCommentThreads(){this.resourceCommentThreads=[...this.commentThreadsMap.values()].flat(),this.resourceCommentThreads.sort((w,v)=>w.resource.toString()>v.resource.toString()?1:-1)}setCommentThreads(w,v){this.commentThreadsMap.set(w,this.groupByResource(w,v)),this.updateResourceCommentThreads()}updateCommentThreads(w){const{owner:v,removed:C,changed:o,added:c}=w;let i=this.commentThreadsMap.get(v)||[];return C.forEach(S=>{const s=i.findIndex(p=>p.id===S.resource),l=i[s],r=l.commentThreads.findIndex(p=>p.threadId===S.threadId);l.commentThreads.splice(r,1),l.commentThreads.length===0&&i.splice(s,1)}),o.forEach(S=>{const s=i.findIndex(p=>p.id===S.resource),l=i[s],r=l.commentThreads.findIndex(p=>p.threadId===S.threadId);r>=0?l.commentThreads[r]=k.createCommentNode(v,t.URI.parse(l.id),S):S.comments&&S.comments.length&&l.commentThreads.push(k.createCommentNode(v,t.URI.parse(l.id),S))}),c.forEach(S=>{const s=i.filter(l=>l.resource.toString()===S.resource);if(s.length){const l=s[0];S.comments&&S.comments.length&&l.commentThreads.push(k.createCommentNode(v,l.resource,S))}else i.push(new k(v,t.URI.parse(S.resource),[S]))}),this.commentThreadsMap.set(v,i),this.updateResourceCommentThreads(),C.length>0||o.length>0||c.length>0}hasCommentThreads(){return!!this.resourceCommentThreads.length}getMessage(){return this.resourceCommentThreads.length?"":(0,_.localize)(0,null)}groupByResource(w,v){const C=[],o=new Map;for(const c of(0,f.groupBy)(v,D._compareURIs))o.set(c[0].resource,new k(w,t.URI.parse(c[0].resource),c));return o.forEach((c,i,S)=>{C.push(c)}),C}static _compareURIs(w,v){const C=w.resource.toString(),o=v.resource.toString();return C<o?-1:C>o?1:0}}e.CommentsModel=D}),define(ne[788],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.COMMENTS_SECTION=void 0,e.COMMENTS_SECTION="comments"}),define(ne[789],re([1,0,10,197,2,788]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TimestampWidget=void 0;class k extends _.Disposable{constructor(I,w,v){super();this.configurationService=I,this._date=t.append(w,t.$("span.timestamp")),this._date.style.display="none",this._useRelativeTime=this.useRelativeTimeSetting,this.setTimestamp(v)}get useRelativeTimeSetting(){return this.configurationService.getValue(A.COMMENTS_SECTION).useRelativeTime}async setTimestamp(I){(I!==this._timestamp||this.useRelativeTimeSetting!==this._useRelativeTime)&&this.updateDate(I),this._timestamp=I,this._useRelativeTime=this.useRelativeTimeSetting}updateDate(I){if(!I)this._date.textContent="",this._date.style.display="none";else if(I!==this._timestamp||this.useRelativeTimeSetting!==this._useRelativeTime){this._date.style.display="";let w,v;this.useRelativeTimeSetting?(w=this.getRelative(I),v=this.getDateString(I)):w=this.getDateString(I),this._date.textContent=w,v&&(this._date.title=v)}}getRelative(I){return(0,f.fromNow)(I,!0,!0)}getDateString(I){return I.toLocaleString()}}e.TimestampWidget=k}),define(ne[575],re([1,0,10,1483,242,22,2,41,574,98,38,8,7,71,12,5,789,33]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentsList=e.CommentNodeRenderer=e.ResourceWithCommentsRenderer=e.CommentsModelVirualDelegate=e.CommentsAsyncDataSource=e.COMMENTS_VIEW_TITLE=e.COMMENTS_VIEW_ID=void 0,e.COMMENTS_VIEW_ID="workbench.panel.comments",e.COMMENTS_VIEW_TITLE="Comments";class r{hasChildren(g){return(g instanceof I.CommentsModel||g instanceof I.ResourceWithCommentThreads)&&!(g instanceof I.CommentNode)}getChildren(g){return g instanceof I.CommentsModel?Promise.resolve(g.resourceCommentThreads):g instanceof I.ResourceWithCommentThreads?Promise.resolve(g.commentThreads):Promise.resolve([])}}e.CommentsAsyncDataSource=r;class p{getHeight(g){return g instanceof I.CommentNode&&g.hasReply()?44:22}getTemplateId(g){return g instanceof I.ResourceWithCommentThreads?p.RESOURCE_ID:g instanceof I.CommentNode?p.COMMENT_ID:""}}e.CommentsModelVirualDelegate=p,p.RESOURCE_ID="resource-with-comments",p.COMMENT_ID="comment-node";class u{constructor(g){this.labels=g,this.templateId="resource-with-comments"}renderTemplate(g){const d=Object.create(null),m=t.append(g,t.$(".resource-container"));return d.resourceLabel=this.labels.create(m),d}renderElement(g,d,m,b){m.resourceLabel.setFile(g.element.resource)}disposeTemplate(g){g.resourceLabel.dispose()}}e.ResourceWithCommentsRenderer=u;let a=class{constructor(g,d){this.openerService=g,this.configurationService=d,this.templateId="comment-node"}renderTemplate(g){const d=Object.create(null),m=t.append(g,t.$(".comment-thread-container")),b=t.append(m,t.$(".comment-metadata-container"));d.threadMetadata={icon:t.append(b,t.$(".icon")),userNames:t.append(b,t.$(".user")),timestamp:new s.TimestampWidget(this.configurationService,t.append(b,t.$(".timestamp-container"))),separator:t.append(b,t.$(".separator")),commentPreview:t.append(b,t.$(".text"))},d.threadMetadata.separator.innerText="\xB7";const E=t.append(m,t.$(".comment-snippet-container"));return d.repliesMetadata={container:E,icon:t.append(E,t.$(".icon")),count:t.append(E,t.$(".count")),lastReplyDetail:t.append(E,t.$(".reply-detail")),separator:t.append(E,t.$(".separator")),timestamp:new s.TimestampWidget(this.configurationService,t.append(E,t.$(".timestamp-container")))},d.repliesMetadata.separator.innerText="\xB7",d.repliesMetadata.icon.classList.add(...i.ThemeIcon.asClassNameArray(l.Codicon.indent)),d.disposables=[d.threadMetadata.timestamp,d.repliesMetadata.timestamp],d}getCountString(g){return g>1?f.localize(0,null,g):f.localize(1,null)}getRenderedComment(g,d){const m=(0,_.renderMarkdown)(g,{inline:!0,actionHandler:{callback:E=>{this.openerService.open(E,{allowCommands:g.isTrusted}).catch(A.onUnexpectedError)},disposables:d}}),b=m.element.getElementsByTagName("img");for(let E=0;E<b.length;E++){const y=b[E],T=t.$("");T.textContent=y.alt?f.localize(2,null,y.alt):f.localize(3,null),y.parentNode.replaceChild(T,y)}return m}renderElement(g,d,m,b){const E=g.element.replies.length+1;m.threadMetadata.icon?.classList.add(...i.ThemeIcon.asClassNameArray(E===1?l.Codicon.comment:l.Codicon.commentDiscussion)),m.threadMetadata.userNames.textContent=g.element.comment.userName,m.threadMetadata.timestamp.setTimestamp(g.element.comment.timestamp?new Date(g.element.comment.timestamp):void 0);const y=g.element;if(m.threadMetadata.commentPreview.innerText="",typeof y.comment.body=="string")m.threadMetadata.commentPreview.innerText=y.comment.body;else{const T=new k.DisposableStore;m.disposables.push(T);const R=this.getRenderedComment(y.comment.body,T);m.disposables.push(R),m.threadMetadata.commentPreview.appendChild(R.element),m.threadMetadata.commentPreview.title=R.element.textContent??""}if(!g.element.hasReply()){m.repliesMetadata.container.style.display="none";return}m.repliesMetadata.container.style.display="",m.repliesMetadata.count.textContent=this.getCountString(E),m.repliesMetadata.lastReplyDetail.textContent=f.localize(4,null,g.element.replies[g.element.replies.length-1].comment.userName),m.repliesMetadata.timestamp.setTimestamp(y.comment.timestamp?new Date(y.comment.timestamp):void 0)}disposeTemplate(g){g.disposables.forEach(d=>d.dispose())}};a=Ee([W(0,D.IOpenerService),W(1,C.IConfigurationService)],a),e.CommentNodeRenderer=a;let n=class extends c.WorkbenchAsyncDataTree{constructor(g,d,m,b,E,y,T,R,O,x){const F=new p,L=new r,M=[T.createInstance(u,g),T.createInstance(a)];super("CommentsTree",d,F,M,L,{accessibilityProvider:m.accessibilityProvider,identityProvider:{getId:N=>N instanceof I.CommentsModel?"root":N instanceof I.ResourceWithCommentThreads?`${N.owner}-${N.id}`:N instanceof I.CommentNode?`${N.owner}-${N.resource.toString()}-${N.threadId}-${N.comment.uniqueIdInThread}`+(N.isRoot?"-root":""):""},expandOnlyOnTwistieClick:N=>!(N instanceof I.CommentsModel||N instanceof I.ResourceWithCommentThreads),collapseByDefault:()=>!1,overrideStyles:m.overrideStyles},b,E,y,R,O,x)}};n=Ee([W(3,o.IContextKeyService),W(4,c.IListService),W(5,i.IThemeService),W(6,S.IInstantiationService),W(7,C.IConfigurationService),W(8,v.IKeybindingService),W(9,w.IAccessibilityService)],n),e.CommentsList=n}),define(ne[2134],re([1,0,150]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomEditorModelManager=void 0;class f{constructor(){this._references=new Map}async getAllModels(A){const k=`${A.toString()}@@@`,D=[];for(const[I,w]of this._references)I.startsWith(k)&&w.model&&D.push(await w.model);return D}async get(A,k){const D=this.key(A,k);return this._references.get(D)?.model}tryRetain(A,k){const D=this.key(A,k),I=this._references.get(D);if(!!I)return I.counter++,I.model.then(w=>({object:w,dispose:(0,t.once)(()=>{--I.counter<=0&&(I.model.then(v=>v.dispose()),this._references.delete(D))})}))}add(A,k,D){const I=this.key(A,k);if(this._references.get(I))throw new Error("Model already exists");return this._references.set(I,{viewType:k,model:D,counter:0}),this.tryRetain(A,k)}disposeAllModelsForView(A){for(const[k,D]of this._references)D.viewType===A&&(D.model.then(I=>I.dispose()),this._references.delete(k))}key(A,k){return`${A.toString()}@@@${k}`}}e.CustomEditorModelManager=f}),define(ne[190],re([1,0,33,1504,63]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.debugInspectMemory=e.debugConsoleEvaluationPrompt=e.debugConsoleEvaluationInput=e.breakpointsActivate=e.breakpointsRemoveAll=e.watchExpressionsAddFuncBreakpoint=e.watchExpressionsAdd=e.watchExpressionsRemoveAll=e.debugConsoleClearAll=e.callstackViewSession=e.debugCollapseAll=e.debugRemoveConfig=e.debugConsole=e.debugConfigure=e.debugStart=e.debugRun=e.debugReverseContinue=e.debugContinue=e.debugPause=e.debugStepBack=e.debugStepOut=e.debugStepInto=e.debugStepOver=e.debugRestart=e.debugDisconnect=e.debugStop=e.debugRestartFrame=e.debugGripper=e.debugStackframeFocused=e.debugStackframe=e.allBreakpoints=e.debugBreakpointUnsupported=e.debugBreakpointHint=e.logBreakpoint=e.dataBreakpoint=e.conditionalBreakpoint=e.functionBreakpoint=e.breakpoint=e.loadedScriptsViewIcon=e.breakpointsViewIcon=e.callStackViewIcon=e.watchViewIcon=e.variablesViewIcon=e.runViewIcon=e.debugConsoleViewIcon=void 0,e.debugConsoleViewIcon=(0,_.registerIcon)("debug-console-view-icon",t.Codicon.debugConsole,(0,f.localize)(0,null)),e.runViewIcon=(0,_.registerIcon)("run-view-icon",t.Codicon.debugAlt,(0,f.localize)(1,null)),e.variablesViewIcon=(0,_.registerIcon)("variables-view-icon",t.Codicon.debugAlt,(0,f.localize)(2,null)),e.watchViewIcon=(0,_.registerIcon)("watch-view-icon",t.Codicon.debugAlt,(0,f.localize)(3,null)),e.callStackViewIcon=(0,_.registerIcon)("callstack-view-icon",t.Codicon.debugAlt,(0,f.localize)(4,null)),e.breakpointsViewIcon=(0,_.registerIcon)("breakpoints-view-icon",t.Codicon.debugAlt,(0,f.localize)(5,null)),e.loadedScriptsViewIcon=(0,_.registerIcon)("loaded-scripts-view-icon",t.Codicon.debugAlt,(0,f.localize)(6,null)),e.breakpoint={regular:(0,_.registerIcon)("debug-breakpoint",t.Codicon.debugBreakpoint,(0,f.localize)(7,null)),disabled:(0,_.registerIcon)("debug-breakpoint-disabled",t.Codicon.debugBreakpointDisabled,(0,f.localize)(8,null)),unverified:(0,_.registerIcon)("debug-breakpoint-unverified",t.Codicon.debugBreakpointUnverified,(0,f.localize)(9,null))},e.functionBreakpoint={regular:(0,_.registerIcon)("debug-breakpoint-function",t.Codicon.debugBreakpointFunction,(0,f.localize)(10,null)),disabled:(0,_.registerIcon)("debug-breakpoint-function-disabled",t.Codicon.debugBreakpointFunctionDisabled,(0,f.localize)(11,null)),unverified:(0,_.registerIcon)("debug-breakpoint-function-unverified",t.Codicon.debugBreakpointFunctionUnverified,(0,f.localize)(12,null))},e.conditionalBreakpoint={regular:(0,_.registerIcon)("debug-breakpoint-conditional",t.Codicon.debugBreakpointConditional,(0,f.localize)(13,null)),disabled:(0,_.registerIcon)("debug-breakpoint-conditional-disabled",t.Codicon.debugBreakpointConditionalDisabled,(0,f.localize)(14,null)),unverified:(0,_.registerIcon)("debug-breakpoint-conditional-unverified",t.Codicon.debugBreakpointConditionalUnverified,(0,f.localize)(15,null))},e.dataBreakpoint={regular:(0,_.registerIcon)("debug-breakpoint-data",t.Codicon.debugBreakpointData,(0,f.localize)(16,null)),disabled:(0,_.registerIcon)("debug-breakpoint-data-disabled",t.Codicon.debugBreakpointDataDisabled,(0,f.localize)(17,null)),unverified:(0,_.registerIcon)("debug-breakpoint-data-unverified",t.Codicon.debugBreakpointDataUnverified,(0,f.localize)(18,null))},e.logBreakpoint={regular:(0,_.registerIcon)("debug-breakpoint-log",t.Codicon.debugBreakpointLog,(0,f.localize)(19,null)),disabled:(0,_.registerIcon)("debug-breakpoint-log-disabled",t.Codicon.debugBreakpointLogDisabled,(0,f.localize)(20,null)),unverified:(0,_.registerIcon)("debug-breakpoint-log-unverified",t.Codicon.debugBreakpointLogUnverified,(0,f.localize)(21,null))},e.debugBreakpointHint=(0,_.registerIcon)("debug-hint",t.Codicon.debugHint,(0,f.localize)(22,null)),e.debugBreakpointUnsupported=(0,_.registerIcon)("debug-breakpoint-unsupported",t.Codicon.debugBreakpointUnsupported,(0,f.localize)(23,null)),e.allBreakpoints=[e.breakpoint,e.functionBreakpoint,e.conditionalBreakpoint,e.dataBreakpoint,e.logBreakpoint],e.debugStackframe=(0,_.registerIcon)("debug-stackframe",t.Codicon.debugStackframe,(0,f.localize)(24,null)),e.debugStackframeFocused=(0,_.registerIcon)("debug-stackframe-focused",t.Codicon.debugStackframeFocused,(0,f.localize)(25,null)),e.debugGripper=(0,_.registerIcon)("debug-gripper",t.Codicon.gripper,(0,f.localize)(26,null)),e.debugRestartFrame=(0,_.registerIcon)("debug-restart-frame",t.Codicon.debugRestartFrame,(0,f.localize)(27,null)),e.debugStop=(0,_.registerIcon)("debug-stop",t.Codicon.debugStop,(0,f.localize)(28,null)),e.debugDisconnect=(0,_.registerIcon)("debug-disconnect",t.Codicon.debugDisconnect,(0,f.localize)(29,null)),e.debugRestart=(0,_.registerIcon)("debug-restart",t.Codicon.debugRestart,(0,f.localize)(30,null)),e.debugStepOver=(0,_.registerIcon)("debug-step-over",t.Codicon.debugStepOver,(0,f.localize)(31,null)),e.debugStepInto=(0,_.registerIcon)("debug-step-into",t.Codicon.debugStepInto,(0,f.localize)(32,null)),e.debugStepOut=(0,_.registerIcon)("debug-step-out",t.Codicon.debugStepOut,(0,f.localize)(33,null)),e.debugStepBack=(0,_.registerIcon)("debug-step-back",t.Codicon.debugStepBack,(0,f.localize)(34,null)),e.debugPause=(0,_.registerIcon)("debug-pause",t.Codicon.debugPause,(0,f.localize)(35,null)),e.debugContinue=(0,_.registerIcon)("debug-continue",t.Codicon.debugContinue,(0,f.localize)(36,null)),e.debugReverseContinue=(0,_.registerIcon)("debug-reverse-continue",t.Codicon.debugReverseContinue,(0,f.localize)(37,null)),e.debugRun=(0,_.registerIcon)("debug-run",t.Codicon.run,(0,f.localize)(38,null)),e.debugStart=(0,_.registerIcon)("debug-start",t.Codicon.debugStart,(0,f.localize)(39,null)),e.debugConfigure=(0,_.registerIcon)("debug-configure",t.Codicon.gear,(0,f.localize)(40,null)),e.debugConsole=(0,_.registerIcon)("debug-console",t.Codicon.gear,(0,f.localize)(41,null)),e.debugRemoveConfig=(0,_.registerIcon)("debug-remove-config",t.Codicon.trash,(0,f.localize)(42,null)),e.debugCollapseAll=(0,_.registerIcon)("debug-collapse-all",t.Codicon.collapseAll,(0,f.localize)(43,null)),e.callstackViewSession=(0,_.registerIcon)("callstack-view-session",t.Codicon.bug,(0,f.localize)(44,null)),e.debugConsoleClearAll=(0,_.registerIcon)("debug-console-clear-all",t.Codicon.clearAll,(0,f.localize)(45,null)),e.watchExpressionsRemoveAll=(0,_.registerIcon)("watch-expressions-remove-all",t.Codicon.closeAll,(0,f.localize)(46,null)),e.watchExpressionsAdd=(0,_.registerIcon)("watch-expressions-add",t.Codicon.add,(0,f.localize)(47,null)),e.watchExpressionsAddFuncBreakpoint=(0,_.registerIcon)("watch-expressions-add-function-breakpoint",t.Codicon.add,(0,f.localize)(48,null)),e.breakpointsRemoveAll=(0,_.registerIcon)("breakpoints-remove-all",t.Codicon.closeAll,(0,f.localize)(49,null)),e.breakpointsActivate=(0,_.registerIcon)("breakpoints-activate",t.Codicon.activateBreakpoints,(0,f.localize)(50,null)),e.debugConsoleEvaluationInput=(0,_.registerIcon)("debug-console-evaluation-input",t.Codicon.arrowSmallRight,(0,f.localize)(51,null)),e.debugConsoleEvaluationPrompt=(0,_.registerIcon)("debug-console-evaluation-prompt",t.Codicon.chevronRight,(0,f.localize)(52,null)),e.debugInspectMemory=(0,_.registerIcon)("debug-inspect-memory",t.Codicon.fileBinary,(0,f.localize)(53,null))}),define(ne[484],re([1,0,32,12,66,1498,190,127]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerColors=e.debugIconStartForeground=e.debugToolBarBorder=e.debugToolBarBackground=void 0,e.debugToolBarBackground=(0,t.registerColor)("debugToolBar.background",{dark:"#333333",light:"#F3F3F3",hcDark:"#000000",hcLight:"#FFFFFF"},(0,A.localize)(0,null)),e.debugToolBarBorder=(0,t.registerColor)("debugToolBar.border",{dark:null,light:null,hcDark:null,hcLight:null},(0,A.localize)(1,null)),e.debugIconStartForeground=(0,t.registerColor)("debugIcon.startForeground",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#388A34"},(0,A.localize)(2,null));function I(){const w=(0,t.registerColor)("debugTokenExpression.name",{dark:"#c586c0",light:"#9b46b0",hcDark:t.foreground,hcLight:t.foreground},"Foreground color for the token names shown in the debug views (ie. the Variables or Watch view)."),v=(0,t.registerColor)("debugTokenExpression.value",{dark:"#cccccc99",light:"#6c6c6ccc",hcDark:t.foreground,hcLight:t.foreground},"Foreground color for the token values shown in the debug views (ie. the Variables or Watch view)."),C=(0,t.registerColor)("debugTokenExpression.string",{dark:"#ce9178",light:"#a31515",hcDark:"#f48771",hcLight:"#a31515"},"Foreground color for strings in the debug views (ie. the Variables or Watch view)."),o=(0,t.registerColor)("debugTokenExpression.boolean",{dark:"#4e94ce",light:"#0000ff",hcDark:"#75bdfe",hcLight:"#0000ff"},"Foreground color for booleans in the debug views (ie. the Variables or Watch view)."),c=(0,t.registerColor)("debugTokenExpression.number",{dark:"#b5cea8",light:"#098658",hcDark:"#89d185",hcLight:"#098658"},"Foreground color for numbers in the debug views (ie. the Variables or Watch view)."),i=(0,t.registerColor)("debugTokenExpression.error",{dark:"#f48771",light:"#e51400",hcDark:"#f48771",hcLight:"#e51400"},"Foreground color for expression errors in the debug views (ie. the Variables or Watch view) and for error logs shown in the debug console."),S=(0,t.registerColor)("debugView.exceptionLabelForeground",{dark:t.foreground,light:"#FFF",hcDark:t.foreground,hcLight:t.foreground},"Foreground color for a label shown in the CALL STACK view when the debugger breaks on an exception."),s=(0,t.registerColor)("debugView.exceptionLabelBackground",{dark:"#6C2022",light:"#A31515",hcDark:"#6C2022",hcLight:"#A31515"},"Background color for a label shown in the CALL STACK view when the debugger breaks on an exception."),l=(0,t.registerColor)("debugView.stateLabelForeground",{dark:t.foreground,light:t.foreground,hcDark:t.foreground,hcLight:t.foreground},"Foreground color for a label in the CALL STACK view showing the current session's or thread's state."),r=(0,t.registerColor)("debugView.stateLabelBackground",{dark:"#88888844",light:"#88888844",hcDark:"#88888844",hcLight:"#88888844"},"Background color for a label in the CALL STACK view showing the current session's or thread's state."),p=(0,t.registerColor)("debugView.valueChangedHighlight",{dark:"#569CD6",light:"#569CD6",hcDark:"#569CD6",hcLight:"#569CD6"},"Color used to highlight value changes in the debug views (ie. in the Variables view)."),u=(0,t.registerColor)("debugConsole.infoForeground",{dark:t.editorInfoForeground,light:t.editorInfoForeground,hcDark:t.foreground,hcLight:t.foreground},"Foreground color for info messages in debug REPL console."),a=(0,t.registerColor)("debugConsole.warningForeground",{dark:t.editorWarningForeground,light:t.editorWarningForeground,hcDark:"#008000",hcLight:t.editorWarningForeground},"Foreground color for warning messages in debug REPL console."),n=(0,t.registerColor)("debugConsole.errorForeground",{dark:t.errorForeground,light:t.errorForeground,hcDark:t.errorForeground,hcLight:t.errorForeground},"Foreground color for error messages in debug REPL console."),h=(0,t.registerColor)("debugConsole.sourceForeground",{dark:t.foreground,light:t.foreground,hcDark:t.foreground,hcLight:t.foreground},"Foreground color for source filenames in debug REPL console."),g=(0,t.registerColor)("debugConsoleInputIcon.foreground",{dark:t.foreground,light:t.foreground,hcDark:t.foreground,hcLight:t.foreground},"Foreground color for debug console input marker icon."),d=(0,t.registerColor)("debugIcon.pauseForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,A.localize)(3,null)),m=(0,t.registerColor)("debugIcon.stopForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#A1260D"},(0,A.localize)(4,null)),b=(0,t.registerColor)("debugIcon.disconnectForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#A1260D"},(0,A.localize)(5,null)),E=(0,t.registerColor)("debugIcon.restartForeground",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#388A34"},(0,A.localize)(6,null)),y=(0,t.registerColor)("debugIcon.stepOverForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,A.localize)(7,null)),T=(0,t.registerColor)("debugIcon.stepIntoForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,A.localize)(8,null)),R=(0,t.registerColor)("debugIcon.stepOutForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,A.localize)(9,null)),O=(0,t.registerColor)("debugIcon.continueForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,A.localize)(10,null)),x=(0,t.registerColor)("debugIcon.stepBackForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,A.localize)(11,null));(0,f.registerThemingParticipant)((F,L)=>{const M=F.getColor(t.badgeBackground),N=F.getColor(t.badgeForeground),B=F.getColor(t.listDeemphasizedForeground),P=F.getColor(S),V=F.getColor(s),z=F.getColor(l),U=F.getColor(r),H=F.getColor(p);L.addRule(` /* Text colour of the call stack row's filename */ .debug-pane .debug-call-stack .monaco-list-row:not(.selected) .stack-frame > .file .file-name { color: ${B} } /* Line & column number "badge" for selected call stack row */ .debug-pane .monaco-list-row.selected .line-number { background-color: ${M}; color: ${N}; } /* Line & column number "badge" for unselected call stack row (basically all other rows) */ .debug-pane .line-number { background-color: ${M.transparent(.6)}; color: ${N.transparent(.6)}; } /* State "badge" displaying the active session's current state. * Only visible when there are more active debug sessions/threads running. */ .debug-pane .debug-call-stack .thread > .state.label, .debug-pane .debug-call-stack .session > .state.label { background-color: ${U}; color: ${z}; } /* State "badge" displaying the active session's current state. * Only visible when there are more active debug sessions/threads running * and thread paused due to a thrown exception. */ .debug-pane .debug-call-stack .thread > .state.label.exception, .debug-pane .debug-call-stack .session > .state.label.exception { background-color: ${V}; color: ${P}; } /* Info "badge" shown when the debugger pauses due to a thrown exception. */ .debug-pane .call-stack-state-message > .label.exception { background-color: ${V}; color: ${P}; } /* Animation of changed values in Debug viewlet */ @keyframes debugViewletValueChanged { 0% { background-color: ${H.transparent(0)} } 5% { background-color: ${H.transparent(.9)} } 100% { background-color: ${H.transparent(.3)} } } .debug-pane .monaco-list-row .expression .value.changed { background-color: ${H.transparent(.3)}; animation-name: debugViewletValueChanged; animation-duration: 1s; animation-fill-mode: forwards; } `);const K=F.getColor(t.contrastBorder);K&&L.addRule(` .debug-pane .line-number { border: 1px solid ${K}; } `),(0,D.isHighContrast)(F.type)&&L.addRule(` .debug-pane .line-number { background-color: ${M}; color: ${N}; }`);const G=F.getColor(w),q=F.getColor(v),Z=F.getColor(C),j=F.getColor(o),X=F.getColor(i),Y=F.getColor(c);L.addRule(` .monaco-workbench .monaco-list-row .expression .name { color: ${G}; } .monaco-workbench .monaco-list-row .expression .value, .monaco-workbench .debug-hover-widget .value { color: ${q}; } .monaco-workbench .monaco-list-row .expression .value.string, .monaco-workbench .debug-hover-widget .value.string { color: ${Z}; } .monaco-workbench .monaco-list-row .expression .value.boolean, .monaco-workbench .debug-hover-widget .value.boolean { color: ${j}; } .monaco-workbench .monaco-list-row .expression .error, .monaco-workbench .debug-hover-widget .error, .monaco-workbench .debug-pane .debug-variables .scope .error { color: ${X}; } .monaco-workbench .monaco-list-row .expression .value.number, .monaco-workbench .debug-hover-widget .value.number { color: ${Y}; } `);const $=F.getColor(t.inputBorder)||_.Color.fromHex("#80808060"),J=F.getColor(u),ee=F.getColor(a),te=F.getColor(n),se=F.getColor(h),ie=F.getColor(g);L.addRule(` .repl .repl-input-wrapper { border-top: 1px solid ${$}; } .monaco-workbench .repl .repl-tree .output .expression .value.info { color: ${J}; } .monaco-workbench .repl .repl-tree .output .expression .value.warn { color: ${ee}; } .monaco-workbench .repl .repl-tree .output .expression .value.error { color: ${te}; } .monaco-workbench .repl .repl-tree .output .expression .source { color: ${se}; } .monaco-workbench .repl .repl-tree .monaco-tl-contents .arrow { color: ${ie}; } `),F.defines(g)||L.addRule(` .monaco-workbench.vs .repl .repl-tree .monaco-tl-contents .arrow { opacity: 0.25; } .monaco-workbench.vs-dark .repl .repl-tree .monaco-tl-contents .arrow { opacity: 0.4; } .monaco-workbench.hc-black .repl .repl-tree .monaco-tl-contents .arrow, .monaco-workbench.hc-light .repl .repl-tree .monaco-tl-contents .arrow { opacity: 1; } `);const ce=F.getColor(e.debugIconStartForeground);ce&&L.addRule(`.monaco-workbench ${f.ThemeIcon.asCSSSelector(k.debugStart)} { color: ${ce}; }`);const le=F.getColor(d);le&&L.addRule(`.monaco-workbench .part > .title > .title-actions .action-label${f.ThemeIcon.asCSSSelector(k.debugPause)}, .monaco-workbench ${f.ThemeIcon.asCSSSelector(k.debugPause)} { color: ${le}; }`);const ae=F.getColor(m);ae&&L.addRule(`.monaco-workbench .part > .title > .title-actions .action-label${f.ThemeIcon.asCSSSelector(k.debugStop)},.monaco-workbench ${f.ThemeIcon.asCSSSelector(k.debugStop)} { color: ${ae}; }`);const ue=F.getColor(b);ue&&L.addRule(`.monaco-workbench .part > .title > .title-actions .action-label${f.ThemeIcon.asCSSSelector(k.debugDisconnect)},.monaco-workbench .debug-view-content ${f.ThemeIcon.asCSSSelector(k.debugDisconnect)}, .monaco-workbench .debug-toolbar ${f.ThemeIcon.asCSSSelector(k.debugDisconnect)} { color: ${ue}; }`);const oe=F.getColor(E);oe&&L.addRule(`.monaco-workbench ${f.ThemeIcon.asCSSSelector(k.debugRestart)}, .monaco-workbench ${f.ThemeIcon.asCSSSelector(k.debugRestartFrame)}, .monaco-workbench .part > .title > .title-actions .action-label${f.ThemeIcon.asCSSSelector(k.debugRestart)}, .monaco-workbench .part > .title > .title-actions .action-label${f.ThemeIcon.asCSSSelector(k.debugRestartFrame)} { color: ${oe}; }`);const fe=F.getColor(y);fe&&L.addRule(`.monaco-workbench .part > .title > .title-actions .action-label${f.ThemeIcon.asCSSSelector(k.debugStepOver)}, .monaco-workbench ${f.ThemeIcon.asCSSSelector(k.debugStepOver)} { color: ${fe}; }`);const pe=F.getColor(T);pe&&L.addRule(`.monaco-workbench .part > .title > .title-actions .action-label${f.ThemeIcon.asCSSSelector(k.debugStepInto)}, .monaco-workbench .part > .title > .title-actions .action-label${f.ThemeIcon.asCSSSelector(k.debugStepInto)}, .monaco-workbench ${f.ThemeIcon.asCSSSelector(k.debugStepInto)} { color: ${pe}; }`);const me=F.getColor(R);me&&L.addRule(`.monaco-workbench .part > .title > .title-actions .action-label${f.ThemeIcon.asCSSSelector(k.debugStepOut)}, .monaco-workbench .part > .title > .title-actions .action-label${f.ThemeIcon.asCSSSelector(k.debugStepOut)}, .monaco-workbench ${f.ThemeIcon.asCSSSelector(k.debugStepOut)} { color: ${me}; }`);const be=F.getColor(O);be&&L.addRule(`.monaco-workbench .part > .title > .title-actions .action-label${f.ThemeIcon.asCSSSelector(k.debugContinue)}, .monaco-workbench ${f.ThemeIcon.asCSSSelector(k.debugContinue)}, .monaco-workbench .part > .title > .title-actions .action-label${f.ThemeIcon.asCSSSelector(k.debugReverseContinue)}, .monaco-workbench ${f.ThemeIcon.asCSSSelector(k.debugReverseContinue)} { color: ${be}; }`);const Ce=F.getColor(x);Ce&&L.addRule(`.monaco-workbench .part > .title > .title-actions .action-label${f.ThemeIcon.asCSSSelector(k.debugStepBack)}, .monaco-workbench ${f.ThemeIcon.asCSSSelector(k.debugStepBack)} { color: ${Ce}; }`)})}e.registerColors=I}),define(ne[2135],re([1,0,6,11,1524]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractDebugAdapter=void 0;class A{constructor(){this.pendingRequests=new Map,this.queue=[],this._onError=new t.Emitter,this._onExit=new t.Emitter,this.sequence=1}get onError(){return this._onError.event}get onExit(){return this._onExit.event}onMessage(D){this.messageCallback&&this._onError.fire(new Error("attempt to set more than one 'Message' callback")),this.messageCallback=D}onEvent(D){this.eventCallback&&this._onError.fire(new Error("attempt to set more than one 'Event' callback")),this.eventCallback=D}onRequest(D){this.requestCallback&&this._onError.fire(new Error("attempt to set more than one 'Request' callback")),this.requestCallback=D}sendResponse(D){D.seq>0?this._onError.fire(new Error(`attempt to send more than one response for command ${D.command}`)):this.internalSend("response",D)}sendRequest(D,I,w,v){const C={command:D};if(I&&Object.keys(I).length>0&&(C.arguments=I),this.internalSend("request",C),typeof v=="number"){const o=setTimeout(()=>{clearTimeout(o);const c=this.pendingRequests.get(C.seq);if(c){this.pendingRequests.delete(C.seq);const i={type:"response",seq:0,request_seq:C.seq,success:!1,command:D,message:(0,_.localize)(0,null,v,D)};c(i)}},v)}return w&&this.pendingRequests.set(C.seq,w),C.seq}acceptMessage(D){this.messageCallback?this.messageCallback(D):(this.queue.push(D),this.queue.length===1&&this.processQueue())}needsTaskBoundaryBetween(D,I){return D.type!=="event"||I.type!=="event"}async processQueue(){let D;for(;this.queue.length;){if((!D||this.needsTaskBoundaryBetween(this.queue[0],D))&&await(0,f.timeout)(0),D=this.queue.shift(),!D)return;switch(D.type){case"event":this.eventCallback&&this.eventCallback(D);break;case"request":this.requestCallback&&this.requestCallback(D);break;case"response":{const I=D,w=this.pendingRequests.get(I.request_seq);w&&(this.pendingRequests.delete(I.request_seq),w(I));break}}}}internalSend(D,I){I.type=D,I.seq=this.sequence++,this.sendMessage(I)}async cancelPendingRequests(){if(this.pendingRequests.size===0)return Promise.resolve();const D=new Map;this.pendingRequests.forEach((I,w)=>D.set(w,I)),await(0,f.timeout)(500),D.forEach((I,w)=>{I({type:"response",seq:0,request_seq:w,success:!1,command:"canceled",message:"canceled"}),this.pendingRequests.delete(w)})}getPendingRequestIds(){return Array.from(this.pendingRequests.keys())}dispose(){this.queue=[]}}e.AbstractDebugAdapter=A}),define(ne[90],re([1,0,1525,7,5]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BreakpointWidgetContext=e.IDebugService=e.DebugConfigurationProviderTriggerKind=e.DEBUG_MEMORY_SCHEME=e.MemoryRangeType=e.getStateLabel=e.State=e.INTERNAL_CONSOLE_OPTIONS_SCHEMA=e.DEBUG_SCHEME=e.BREAKPOINT_EDITOR_CONTRIBUTION_ID=e.EDITOR_CONTRIBUTION_ID=e.debuggerDisabledMessage=e.CONTEXT_FOCUSED_STACK_FRAME_HAS_INSTRUCTION_POINTER_REFERENCE=e.CONTEXT_LANGUAGE_SUPPORTS_DISASSEMBLE_REQUEST=e.CONTEXT_DISASSEMBLY_VIEW_FOCUS=e.CONTEXT_DISASSEMBLE_REQUEST_SUPPORTED=e.CONTEXT_MULTI_SESSION_DEBUG=e.CONTEXT_MULTI_SESSION_REPL=e.CONTEXT_EXCEPTION_WIDGET_VISIBLE=e.CONTEXT_VARIABLE_IS_READONLY=e.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT=e.CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED=e.CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED=e.CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED=e.CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED=e.CONTEXT_SET_EXPRESSION_SUPPORTED=e.CONTEXT_SET_VARIABLE_SUPPORTED=e.CONTEXT_DEBUG_PROTOCOL_VARIABLE_MENU_CONTEXT=e.CONTEXT_DEBUG_EXTENSION_AVAILABLE=e.CONTEXT_DEBUGGERS_AVAILABLE=e.CONTEXT_BREAKPOINTS_EXIST=e.CONTEXT_STEP_INTO_TARGETS_SUPPORTED=e.CONTEXT_JUMP_TO_CURSOR_SUPPORTED=e.CONTEXT_STACK_FRAME_SUPPORTS_RESTART=e.CONTEXT_RESTART_FRAME_SUPPORTED=e.CONTEXT_STEP_BACK_SUPPORTED=e.CONTEXT_FOCUSED_SESSION_IS_ATTACH=e.CONTEXT_LOADED_SCRIPTS_ITEM_TYPE=e.CONTEXT_LOADED_SCRIPTS_SUPPORTED=e.CONTEXT_BREAKPOINT_SUPPORTS_CONDITION=e.CONTEXT_BREAKPOINT_ACCESS_TYPE=e.CONTEXT_BREAKPOINT_ITEM_TYPE=e.CONTEXT_CAN_VIEW_MEMORY=e.CONTEXT_WATCH_ITEM_TYPE=e.CONTEXT_CALLSTACK_SESSION_HAS_ONE_THREAD=e.CONTEXT_CALLSTACK_ITEM_STOPPED=e.CONTEXT_CALLSTACK_SESSION_IS_ATTACH=e.CONTEXT_CALLSTACK_ITEM_TYPE=e.CONTEXT_BREAKPOINT_INPUT_FOCUSED=e.CONTEXT_EXPRESSION_SELECTED=e.CONTEXT_VARIABLES_FOCUSED=e.CONTEXT_WATCH_EXPRESSIONS_EXIST=e.CONTEXT_WATCH_EXPRESSIONS_FOCUSED=e.CONTEXT_BREAKPOINTS_FOCUSED=e.CONTEXT_IN_BREAKPOINT_WIDGET=e.CONTEXT_BREAKPOINT_WIDGET_VISIBLE=e.CONTEXT_IN_DEBUG_REPL=e.CONTEXT_IN_DEBUG_MODE=e.CONTEXT_DEBUG_UX=e.CONTEXT_DEBUG_UX_KEY=e.CONTEXT_DEBUG_STATE=e.CONTEXT_DEBUG_CONFIGURATION_TYPE=e.CONTEXT_DEBUG_TYPE=e.DEBUG_SERVICE_ID=e.REPL_VIEW_ID=e.DEBUG_PANEL_ID=e.DISASSEMBLY_VIEW_ID=e.BREAKPOINTS_VIEW_ID=e.LOADED_SCRIPTS_VIEW_ID=e.CALLSTACK_VIEW_ID=e.WATCH_VIEW_ID=e.VARIABLES_VIEW_ID=e.VIEWLET_ID=void 0,e.VIEWLET_ID="workbench.view.debug",e.VARIABLES_VIEW_ID="workbench.debug.variablesView",e.WATCH_VIEW_ID="workbench.debug.watchExpressionsView",e.CALLSTACK_VIEW_ID="workbench.debug.callStackView",e.LOADED_SCRIPTS_VIEW_ID="workbench.debug.loadedScriptsView",e.BREAKPOINTS_VIEW_ID="workbench.debug.breakPointsView",e.DISASSEMBLY_VIEW_ID="workbench.debug.disassemblyView",e.DEBUG_PANEL_ID="workbench.panel.repl",e.REPL_VIEW_ID="workbench.panel.repl.view",e.DEBUG_SERVICE_ID="debugService",e.CONTEXT_DEBUG_TYPE=new f.RawContextKey("debugType",void 0,{type:"string",description:t.localize(0,null)}),e.CONTEXT_DEBUG_CONFIGURATION_TYPE=new f.RawContextKey("debugConfigurationType",void 0,{type:"string",description:t.localize(1,null)}),e.CONTEXT_DEBUG_STATE=new f.RawContextKey("debugState","inactive",{type:"string",description:t.localize(2,null)}),e.CONTEXT_DEBUG_UX_KEY="debugUx",e.CONTEXT_DEBUG_UX=new f.RawContextKey(e.CONTEXT_DEBUG_UX_KEY,"default",{type:"string",description:t.localize(3,null)}),e.CONTEXT_IN_DEBUG_MODE=new f.RawContextKey("inDebugMode",!1,{type:"boolean",description:t.localize(4,null)}),e.CONTEXT_IN_DEBUG_REPL=new f.RawContextKey("inDebugRepl",!1,{type:"boolean",description:t.localize(5,null)}),e.CONTEXT_BREAKPOINT_WIDGET_VISIBLE=new f.RawContextKey("breakpointWidgetVisible",!1,{type:"boolean",description:t.localize(6,null)}),e.CONTEXT_IN_BREAKPOINT_WIDGET=new f.RawContextKey("inBreakpointWidget",!1,{type:"boolean",description:t.localize(7,null)}),e.CONTEXT_BREAKPOINTS_FOCUSED=new f.RawContextKey("breakpointsFocused",!0,{type:"boolean",description:t.localize(8,null)}),e.CONTEXT_WATCH_EXPRESSIONS_FOCUSED=new f.RawContextKey("watchExpressionsFocused",!0,{type:"boolean",description:t.localize(9,null)}),e.CONTEXT_WATCH_EXPRESSIONS_EXIST=new f.RawContextKey("watchExpressionsExist",!1,{type:"boolean",description:t.localize(10,null)}),e.CONTEXT_VARIABLES_FOCUSED=new f.RawContextKey("variablesFocused",!0,{type:"boolean",description:t.localize(11,null)}),e.CONTEXT_EXPRESSION_SELECTED=new f.RawContextKey("expressionSelected",!1,{type:"boolean",description:t.localize(12,null)}),e.CONTEXT_BREAKPOINT_INPUT_FOCUSED=new f.RawContextKey("breakpointInputFocused",!1,{type:"boolean",description:t.localize(13,null)}),e.CONTEXT_CALLSTACK_ITEM_TYPE=new f.RawContextKey("callStackItemType",void 0,{type:"string",description:t.localize(14,null)}),e.CONTEXT_CALLSTACK_SESSION_IS_ATTACH=new f.RawContextKey("callStackSessionIsAttach",!1,{type:"boolean",description:t.localize(15,null)}),e.CONTEXT_CALLSTACK_ITEM_STOPPED=new f.RawContextKey("callStackItemStopped",!1,{type:"boolean",description:t.localize(16,null)}),e.CONTEXT_CALLSTACK_SESSION_HAS_ONE_THREAD=new f.RawContextKey("callStackSessionHasOneThread",!1,{type:"boolean",description:t.localize(17,null)}),e.CONTEXT_WATCH_ITEM_TYPE=new f.RawContextKey("watchItemType",void 0,{type:"string",description:t.localize(18,null)}),e.CONTEXT_CAN_VIEW_MEMORY=new f.RawContextKey("canViewMemory",void 0,{type:"boolean",description:t.localize(19,null)}),e.CONTEXT_BREAKPOINT_ITEM_TYPE=new f.RawContextKey("breakpointItemType",void 0,{type:"string",description:t.localize(20,null)}),e.CONTEXT_BREAKPOINT_ACCESS_TYPE=new f.RawContextKey("breakpointAccessType",void 0,{type:"string",description:t.localize(21,null)}),e.CONTEXT_BREAKPOINT_SUPPORTS_CONDITION=new f.RawContextKey("breakpointSupportsCondition",!1,{type:"boolean",description:t.localize(22,null)}),e.CONTEXT_LOADED_SCRIPTS_SUPPORTED=new f.RawContextKey("loadedScriptsSupported",!1,{type:"boolean",description:t.localize(23,null)}),e.CONTEXT_LOADED_SCRIPTS_ITEM_TYPE=new f.RawContextKey("loadedScriptsItemType",void 0,{type:"string",description:t.localize(24,null)}),e.CONTEXT_FOCUSED_SESSION_IS_ATTACH=new f.RawContextKey("focusedSessionIsAttach",!1,{type:"boolean",description:t.localize(25,null)}),e.CONTEXT_STEP_BACK_SUPPORTED=new f.RawContextKey("stepBackSupported",!1,{type:"boolean",description:t.localize(26,null)}),e.CONTEXT_RESTART_FRAME_SUPPORTED=new f.RawContextKey("restartFrameSupported",!1,{type:"boolean",description:t.localize(27,null)}),e.CONTEXT_STACK_FRAME_SUPPORTS_RESTART=new f.RawContextKey("stackFrameSupportsRestart",!1,{type:"boolean",description:t.localize(28,null)}),e.CONTEXT_JUMP_TO_CURSOR_SUPPORTED=new f.RawContextKey("jumpToCursorSupported",!1,{type:"boolean",description:t.localize(29,null)}),e.CONTEXT_STEP_INTO_TARGETS_SUPPORTED=new f.RawContextKey("stepIntoTargetsSupported",!1,{type:"boolean",description:t.localize(30,null)}),e.CONTEXT_BREAKPOINTS_EXIST=new f.RawContextKey("breakpointsExist",!1,{type:"boolean",description:t.localize(31,null)}),e.CONTEXT_DEBUGGERS_AVAILABLE=new f.RawContextKey("debuggersAvailable",!1,{type:"boolean",description:t.localize(32,null)}),e.CONTEXT_DEBUG_EXTENSION_AVAILABLE=new f.RawContextKey("debugExtensionAvailable",!1,{type:"boolean",description:t.localize(33,null)}),e.CONTEXT_DEBUG_PROTOCOL_VARIABLE_MENU_CONTEXT=new f.RawContextKey("debugProtocolVariableMenuContext",void 0,{type:"string",description:t.localize(34,null)}),e.CONTEXT_SET_VARIABLE_SUPPORTED=new f.RawContextKey("debugSetVariableSupported",!1,{type:"boolean",description:t.localize(35,null)}),e.CONTEXT_SET_EXPRESSION_SUPPORTED=new f.RawContextKey("debugSetExpressionSupported",!1,{type:"boolean",description:t.localize(36,null)}),e.CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED=new f.RawContextKey("breakWhenValueChangesSupported",!1,{type:"boolean",description:t.localize(37,null)}),e.CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED=new f.RawContextKey("breakWhenValueIsAccessedSupported",!1,{type:"boolean",description:t.localize(38,null)}),e.CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED=new f.RawContextKey("breakWhenValueIsReadSupported",!1,{type:"boolean",description:t.localize(39,null)}),e.CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED=new f.RawContextKey("terminateDebuggeeSupported",!1,{type:"boolean",description:t.localize(40,null)}),e.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT=new f.RawContextKey("variableEvaluateNamePresent",!1,{type:"boolean",description:t.localize(41,null)}),e.CONTEXT_VARIABLE_IS_READONLY=new f.RawContextKey("variableIsReadonly",!1,{type:"boolean",description:t.localize(42,null)}),e.CONTEXT_EXCEPTION_WIDGET_VISIBLE=new f.RawContextKey("exceptionWidgetVisible",!1,{type:"boolean",description:t.localize(43,null)}),e.CONTEXT_MULTI_SESSION_REPL=new f.RawContextKey("multiSessionRepl",!1,{type:"boolean",description:t.localize(44,null)}),e.CONTEXT_MULTI_SESSION_DEBUG=new f.RawContextKey("multiSessionDebug",!1,{type:"boolean",description:t.localize(45,null)}),e.CONTEXT_DISASSEMBLE_REQUEST_SUPPORTED=new f.RawContextKey("disassembleRequestSupported",!1,{type:"boolean",description:t.localize(46,null)}),e.CONTEXT_DISASSEMBLY_VIEW_FOCUS=new f.RawContextKey("disassemblyViewFocus",!1,{type:"boolean",description:t.localize(47,null)}),e.CONTEXT_LANGUAGE_SUPPORTS_DISASSEMBLE_REQUEST=new f.RawContextKey("languageSupportsDisassembleRequest",!1,{type:"boolean",description:t.localize(48,null)}),e.CONTEXT_FOCUSED_STACK_FRAME_HAS_INSTRUCTION_POINTER_REFERENCE=new f.RawContextKey("focusedStackFrameHasInstructionReference",!1,{type:"boolean",description:t.localize(49,null)});const A=C=>t.localize(50,null,C);e.debuggerDisabledMessage=A,e.EDITOR_CONTRIBUTION_ID="editor.contrib.debug",e.BREAKPOINT_EDITOR_CONTRIBUTION_ID="editor.contrib.breakpoint",e.DEBUG_SCHEME="debug",e.INTERNAL_CONSOLE_OPTIONS_SCHEMA={enum:["neverOpen","openOnSessionStart","openOnFirstSessionStart"],default:"openOnFirstSessionStart",description:t.localize(51,null)};var k;(function(C){C[C.Inactive=0]="Inactive",C[C.Initializing=1]="Initializing",C[C.Stopped=2]="Stopped",C[C.Running=3]="Running"})(k=e.State||(e.State={}));function D(C){switch(C){case 1:return"initializing";case 2:return"stopped";case 3:return"running";default:return"inactive"}}e.getStateLabel=D;var I;(function(C){C[C.Valid=0]="Valid",C[C.Unreadable=1]="Unreadable",C[C.Error=2]="Error"})(I=e.MemoryRangeType||(e.MemoryRangeType={})),e.DEBUG_MEMORY_SCHEME="vscode-debug-memory";var w;(function(C){C[C.Initial=1]="Initial",C[C.Dynamic=2]="Dynamic"})(w=e.DebugConfigurationProviderTriggerKind||(e.DebugConfigurationProviderTriggerKind={})),e.IDebugService=(0,_.createDecorator)(e.DEBUG_SERVICE_ID);var v;(function(C){C[C.CONDITION=0]="CONDITION",C[C.HIT_COUNT=1]="HIT_COUNT",C[C.LOG_MESSAGE=2]="LOG_MESSAGE"})(v=e.BreakpointWidgetContext||(e.BreakpointWidgetContext={}))}),define(ne[2136],re([1,0,2,411,571,90]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AudioCueLineDebuggerContribution=void 0;let k=class extends t.Disposable{constructor(I,w){super();this.audioCueService=w,this._register((0,_.autorunWithStore)((v,C)=>{if(!w.isEnabled(f.AudioCue.onDebugBreak).read(v))return;const o=new Map;C.add((0,t.toDisposable)(()=>{o.forEach(c=>c.dispose()),o.clear()})),C.add(I.onDidNewSession(c=>o.set(c,this.handleSession(c)))),C.add(I.onDidEndSession(c=>{o.get(c)?.dispose(),o.delete(c)})),I.getModel().getSessions().forEach(c=>o.set(c,this.handleSession(c)))},"subscribe to debug sessions"))}handleSession(I){return I.onDidChangeState(w=>{const v=I.getStoppedDetails(),C="breakpoint";v&&v.reason===C&&this.audioCueService.playAudioCue(f.AudioCue.onDebugBreak)})}};k=Ee([W(0,A.IDebugService),W(1,f.IAudioCueService)],k),e.AudioCueLineDebuggerContribution=k}),define(ne[576],re([1,0,20,122,90,12,32,1493,6,2,15,56,190,31]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CallStackEditorContribution=e.createDecorationsForStackFrame=e.focusedStackFrameColor=e.topStackFrameColor=void 0,e.topStackFrameColor=(0,k.registerColor)("editor.stackFrameHighlightBackground",{dark:"#ffff0033",light:"#ffff6673",hcDark:"#ffff0033",hcLight:"#ffff6673"},(0,D.localize)(0,null)),e.focusedStackFrameColor=(0,k.registerColor)("editor.focusedStackFrameHighlightBackground",{dark:"#7abd7a4d",light:"#cee7ce73",hcDark:"#7abd7a4d",hcLight:"#cee7ce73"},(0,D.localize)(1,null));const i=1,S={description:"top-stack-frame-margin",glyphMarginClassName:A.ThemeIcon.asClassName(o.debugStackframe),stickiness:i,overviewRuler:{position:f.OverviewRulerLane.Full,color:(0,A.themeColorFromId)(e.topStackFrameColor)}},s={description:"focused-stack-frame-margin",glyphMarginClassName:A.ThemeIcon.asClassName(o.debugStackframeFocused),stickiness:i,overviewRuler:{position:f.OverviewRulerLane.Full,color:(0,A.themeColorFromId)(e.focusedStackFrameColor)}},l={description:"top-stack-frame-decoration",isWholeLine:!0,className:"debug-top-stack-frame-line",stickiness:i},r={description:"focused-stack-frame-decoration",isWholeLine:!0,className:"debug-focused-stack-frame-line",stickiness:i};function p(a,n,h){const g=[],d=new t.Range(a.range.startLineNumber,a.range.startColumn,a.range.startLineNumber,1073741824),m=new t.Range(a.range.startLineNumber,a.range.startColumn,a.range.startLineNumber,a.range.startColumn+1),b=a.thread.getTopStackFrame();return a.getId()===b?.getId()?(n&&g.push({options:S,range:m}),g.push({options:l,range:d}),a.range.startColumn>1&&g.push({options:{description:"top-stack-frame-inline-decoration",before:{content:"\uEB8B",inlineClassName:h?"debug-top-stack-frame-column start-of-line":"debug-top-stack-frame-column",inlineClassNameAffectsLetterSpacing:!0}},range:d})):(n&&g.push({options:s,range:m}),g.push({options:r,range:d})),g}e.createDecorationsForStackFrame=p;let u=class{constructor(n,h,g,d){this.editor=n,this.debugService=h,this.uriIdentityService=g,this.logService=d,this.toDispose=[],this.decorationIds=[];const m=()=>this.decorationIds=this.editor.deltaDecorations(this.decorationIds,this.createCallStackDecorations());this.toDispose.push(I.Event.any(this.debugService.getViewModel().onDidFocusStackFrame,this.debugService.getModel().onDidChangeCallStack)(()=>{m()})),this.toDispose.push(this.editor.onDidChangeModel(b=>{b.newModelUrl&&m()}))}createCallStackDecorations(){const n=this.editor;if(!n.hasModel())return[];const h=this.debugService.getViewModel().focusedStackFrame,g=[];return this.debugService.getModel().getSessions().forEach(d=>{const m=d===h?.thread.session;d.getAllThreads().forEach(b=>{if(b.stopped){const E=b.getCallStack(),y=[];E.length>0&&(h&&!h.equals(E[0])&&y.push(h),y.push(E[0])),y.forEach(T=>{if(T&&this.uriIdentityService.extUri.isEqual(T.source.uri,n.getModel()?.uri)){if(T.range.startLineNumber>n.getModel()?.getLineCount()||T.range.startLineNumber<1){this.logService.warn(`CallStackEditorContribution: invalid stack frame line number: ${T.range.startLineNumber}`);return}const R=n.getModel().getLineFirstNonWhitespaceColumn(T.range.startLineNumber)>=T.range.startColumn;g.push(...p(T,m,R))}})}})}),(0,v.distinct)(g,d=>`${d.options.className} ${d.options.glyphMarginClassName} ${d.range.startLineNumber} ${d.range.startColumn}`)}dispose(){this.editor.deltaDecorations(this.decorationIds,[]),this.toDispose=(0,w.dispose)(this.toDispose)}};u=Ee([W(1,_.IDebugService),W(2,C.IUriIdentityService),W(3,c.ILogService)],u),e.CallStackEditorContribution=u,(0,A.registerThemingParticipant)((a,n)=>{const h=a.getColor(e.topStackFrameColor);h&&n.addRule(`.monaco-editor .view-overlays .debug-top-stack-frame-line { background: ${h}; }`);const g=a.getColor(e.focusedStackFrameColor);g&&n.addRule(`.monaco-editor .view-overlays .debug-focused-stack-frame-line { background: ${g}; }`)})}),define(ne[2137],re([1,0,60,6,2,195,13,23,90]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugMemoryFileSystemProvider=void 0;const w=/range=([0-9]+):([0-9]+)/;class v{constructor(c){this.debugService=c,this.memoryFdCounter=0,this.fdMemory=new Map,this.changeEmitter=new f.Emitter,this.onDidChangeCapabilities=f.Event.None,this.onDidChangeFile=this.changeEmitter.event,this.capabilities=0|1024|4,c.onDidEndSession(i=>{for(const[S,s]of this.fdMemory)s.session===i&&this.close(S)})}watch(c,i){if(i.recursive)return(0,_.toDisposable)(()=>{});const{session:S,memoryReference:s,offset:l}=this.parseUri(c),r=new _.DisposableStore;return r.add(S.onDidChangeState(()=>{(S.state===3||S.state===0)&&this.changeEmitter.fire([{type:2,resource:c}])})),r.add(S.onDidInvalidateMemory(p=>{p.body.memoryReference===s&&(l&&(p.body.offset>=l.toOffset||p.body.offset+p.body.count<l.fromOffset)||this.changeEmitter.fire([{resource:c,type:0}]))})),r}stat(c){const{readOnly:i}=this.parseUri(c);return Promise.resolve({type:D.FileType.File,mtime:0,ctime:0,size:0,permissions:i?D.FilePermission.Readonly:void 0})}mkdir(){throw new D.FileSystemProviderError("Not allowed",D.FileSystemProviderErrorCode.NoPermissions)}readdir(){throw new D.FileSystemProviderError("Not allowed",D.FileSystemProviderErrorCode.NoPermissions)}delete(){throw new D.FileSystemProviderError("Not allowed",D.FileSystemProviderErrorCode.NoPermissions)}rename(){throw new D.FileSystemProviderError("Not allowed",D.FileSystemProviderErrorCode.NoPermissions)}open(c,i){const{session:S,memoryReference:s,offset:l}=this.parseUri(c),r=this.memoryFdCounter++;let p=S.getMemory(s);return l&&(p=new C(p,l)),this.fdMemory.set(r,{session:S,region:p}),Promise.resolve(r)}close(c){return this.fdMemory.get(c)?.region.dispose(),this.fdMemory.delete(c),Promise.resolve()}async writeFile(c,i){const{offset:S}=this.parseUri(c);if(!S)throw new D.FileSystemProviderError("Range must be present to read a file",D.FileSystemProviderErrorCode.FileNotFound);const s=await this.open(c,{create:!1});try{await this.write(s,S.fromOffset,i,0,i.length)}finally{this.close(s)}}async readFile(c){const{offset:i}=this.parseUri(c);if(!i)throw new D.FileSystemProviderError("Range must be present to read a file",D.FileSystemProviderErrorCode.FileNotFound);const S=new Uint8Array(i.toOffset-i.fromOffset),s=await this.open(c,{create:!1});try{return await this.read(s,i.fromOffset,S,0,S.length),S}finally{this.close(s)}}async read(c,i,S,s,l){const r=this.fdMemory.get(c);if(!r)throw new D.FileSystemProviderError("No file with that descriptor open",D.FileSystemProviderErrorCode.Unavailable);const p=await r.region.read(i,l);let u=0;for(const a of p)switch(a.type){case 1:return u;case 2:if(u>0)return u;throw new D.FileSystemProviderError(a.error,D.FileSystemProviderErrorCode.Unknown);case 0:{const n=Math.max(0,i-a.offset),h=a.data.slice(n,Math.min(a.data.byteLength,n+(l-u)));S.set(h.buffer,s+u),u+=h.byteLength;break}default:(0,k.assertNever)(a)}return u}write(c,i,S,s,l){const r=this.fdMemory.get(c);if(!r)throw new D.FileSystemProviderError("No file with that descriptor open",D.FileSystemProviderErrorCode.Unavailable);return r.region.write(i,t.VSBuffer.wrap(S).slice(s,s+l))}parseUri(c){if(c.scheme!==I.DEBUG_MEMORY_SCHEME)throw new D.FileSystemProviderError(`Cannot open file with scheme ${c.scheme}`,D.FileSystemProviderErrorCode.FileNotFound);const i=this.debugService.getModel().getSession(c.authority);if(!i)throw new D.FileSystemProviderError("Debug session not found",D.FileSystemProviderErrorCode.FileNotFound);let S;const s=w.exec(c.query);s&&(S={fromOffset:Number(s[1]),toOffset:Number(s[2])});const[,l]=c.path.split("/");return{session:i,offset:S,readOnly:!i.capabilities.supportsWriteMemoryRequest,sessionId:c.authority,memoryReference:decodeURIComponent(l)}}}e.DebugMemoryFileSystemProvider=v;class C extends _.Disposable{constructor(c,i){super();this.parent=c,this.range=i,this.invalidateEmitter=new f.Emitter,this.onDidInvalidate=this.invalidateEmitter.event,this.width=this.range.toOffset-this.range.fromOffset,this.writable=c.writable,this._register(c),this._register(c.onDidInvalidate(S=>{const s=(0,A.clamp)(S.fromOffset-i.fromOffset,0,this.width),l=(0,A.clamp)(S.toOffset-i.fromOffset,0,this.width);l>s&&this.invalidateEmitter.fire({fromOffset:s,toOffset:l})}))}read(c,i){if(c<0)throw new RangeError(`Invalid fromOffset: ${c}`);return this.parent.read(this.range.fromOffset+c,this.range.fromOffset+Math.min(i,this.width))}write(c,i){return this.parent.write(this.range.fromOffset+c,i)}}}),define(ne[2138],re([1,0,6,90,67,2,43]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugProgressContribution=void 0;let D=class{constructor(w,v,C){this.toDispose=[];let o;const c=i=>{o&&(o.dispose(),o=void 0),i&&(o=i.onDidProgressStart(async S=>{const s=new Promise(r=>{const p=t.Event.any(t.Event.filter(i.onDidProgressEnd,u=>u.body.progressId===S.body.progressId),i.onDidEndAdapter)(()=>{p.dispose(),r()})});C.isViewContainerVisible(f.VIEWLET_ID)&&v.withProgress({location:f.VIEWLET_ID},()=>s);const l=w.getAdapterManager().getDebuggerLabel(i.configuration.type);v.withProgress({location:15,title:S.body.title,cancellable:S.body.cancellable,silent:!0,source:l,delay:500},r=>{let p=0;const u=n=>{let h;typeof n.percentage=="number"&&(h=n.percentage-p,p+=h),r.report({message:n.message,increment:h,total:typeof h=="number"?100:void 0})};S.body.message&&u(S.body);const a=i.onDidProgressUpdate(n=>{n.body.progressId===S.body.progressId&&u(n.body)});return s.then(()=>a.dispose())},()=>i.cancel(S.body.progressId))}))};this.toDispose.push(w.getViewModel().onDidFocusSession(c)),c(w.getViewModel().focusedSession),this.toDispose.push(w.onWillNewSession(i=>{o||c(i)}))}dispose(){(0,A.dispose)(this.toDispose)}};D=Ee([W(0,f.IDebugService),W(1,_.IProgressService),W(2,k.IViewsService)],D),e.DebugProgressContribution=D}),define(ne[2139],re([1,0,6]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugCompoundRoot=void 0;class f{constructor(){this.stopped=!1,this.stopEmitter=new t.Emitter,this.onDidSessionStop=this.stopEmitter.event}sessionStopped(){this.stopped||(this.stopped=!0,this.stopEmitter.fire())}}e.DebugCompoundRoot=f}),define(ne[2140],re([1,0,27]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugTelemetry=void 0;let f=class{constructor(A,k){this.model=A,this.telemetryService=k}logDebugSessionStart(A,k){const D=A.getMainExtensionDescriptor();return this.telemetryService.publicLog("debugSessionStart",{type:A.type,breakpointCount:this.model.getBreakpoints().length,exceptionBreakpoints:this.model.getExceptionBreakpoints(),watchExpressionsCount:this.model.getWatchExpressions().length,extensionName:D.identifier.value,isBuiltin:D.isBuiltin,launchJsonExists:k})}logDebugSessionStop(A,k){const D=this.model.getBreakpoints();return this.telemetryService.publicLog("debugSessionStop",{type:A&&A.configuration.type,success:k.emittedStopped||D.length===0,sessionLengthInSeconds:k.sessionLengthInSeconds,breakpointCount:D.length,watchExpressionsCount:this.model.getWatchExpressions().length})}};f=Ee([W(1,t.ITelemetryService)],f),e.DebugTelemetry=f}),define(ne[231],re([1,0,29,9,48,51,18]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.saveAllBeforeDebugStart=e.getVisibleAndSorted=e.convertToVSCPaths=e.convertToDAPaths=e.isUri=e.getExactExpressionStartAndEnd=e.isDebuggerMainContribution=e.getExtensionHostDebugSession=e.isSessionAttach=e.filterExceptionsFromTelemetry=e.formatPII=void 0;const D=/{([^}]+)}/g;function I(g,d,m){return g.replace(D,function(b,E){return d&&E.length>0&&E[0]!=="_"?b:m&&m.hasOwnProperty(E)?m[E]:b})}e.formatPII=I;function w(g){const d={};for(const m of Object.keys(g))m.startsWith("!")||(d[m]=g[m]);return d}e.filterExceptionsFromTelemetry=w;function v(g){return g.configuration.request==="attach"&&!C(g)&&(!g.parentSession||v(g.parentSession))}e.isSessionAttach=v;function C(g){let d=g.configuration.type;if(!!d)return d==="vslsShare"&&(d=g.configuration.adapterProxy.configuration.type),(0,t.equalsIgnoreCase)(d,"extensionhost")||(0,t.equalsIgnoreCase)(d,"pwa-extensionhost")?g:g.parentSession?C(g.parentSession):void 0}e.getExtensionHostDebugSession=C;function o(g){return g.type&&(g.label||g.program||g.runtime)}e.isDebuggerMainContribution=o;function c(g,d,m){let b,E=0;const y=/([^()\[\]{}<>\s+\-/%~#^;=|,`!]|\->)+/g;let T=null;for(;T=y.exec(g);){const R=T.index+1,O=R+T[0].length;if(R<=d&&O>=m){b=T[0],E=R;break}}if(b){const R=/\w+/g;let O=null;for(;(O=R.exec(b))&&!(O.index+1+E+O[0].length>=m););O&&(b=b.substring(0,R.lastIndex))}return b?{start:E,end:E+b.length-1}:{start:0,end:0}}e.getExactExpressionStartAndEnd=c;const i=/^[a-zA-Z][a-zA-Z0-9\+\-\.]+:/;function S(g){return!!(g&&g.match(i))}e.isUri=S;function s(g){if(typeof g.path=="string"&&!(typeof g.sourceReference=="number"&&g.sourceReference>0)){if(S(g.path))return f.URI.parse(g.path);if((0,_.isAbsolute)(g.path))return f.URI.file(g.path)}return g.path}function l(g){if(typeof g.path=="object"){const d=f.URI.revive(g.path);if(d)return d.scheme===k.Schemas.file?d.fsPath:d.toString()}return g.path}function r(g,d){const m=d?s:l,b=(0,A.deepClone)(g);return u(b,(E,y)=>{E&&y&&(y.path=m(y))}),b}e.convertToDAPaths=r;function p(g,d){const m=d?s:l,b=(0,A.deepClone)(g);return u(b,(E,y)=>{!E&&y&&(y.path=m(y))}),b}e.convertToVSCPaths=p;function u(g,d){switch(g.type){case"event":{const m=g;switch(m.event){case"output":d(!1,m.body.source);break;case"loadedSource":d(!1,m.body.source);break;case"breakpoint":d(!1,m.body.breakpoint.source);break;default:break}break}case"request":{const m=g;switch(m.command){case"setBreakpoints":d(!0,m.arguments.source);break;case"breakpointLocations":d(!0,m.arguments.source);break;case"source":d(!0,m.arguments.source);break;case"gotoTargets":d(!0,m.arguments.source);break;case"launchVSCode":m.arguments.args.forEach(b=>d(!1,b));break;default:break}break}case"response":{const m=g;if(m.success&&m.body)switch(m.command){case"stackTrace":m.body.stackFrames.forEach(b=>d(!1,b.source));break;case"loadedSources":m.body.sources.forEach(b=>d(!1,b));break;case"scopes":m.body.scopes.forEach(b=>d(!1,b.source));break;case"setFunctionBreakpoints":m.body.breakpoints.forEach(b=>d(!1,b.source));break;case"setBreakpoints":m.body.breakpoints.forEach(b=>d(!1,b.source));break;case"disassemble":{const b=m;b.body&&b.body.instructions.forEach(E=>d(!1,E.location))}break;default:break}break}}}function a(g){return g.filter(d=>!d.presentation?.hidden).sort((d,m)=>d.presentation?m.presentation?d.presentation.group?m.presentation.group?d.presentation.group!==m.presentation.group?d.presentation.group.localeCompare(m.presentation.group):n(d.presentation.order,m.presentation.order):-1:m.presentation.group?1:n(d.presentation.order,m.presentation.order):-1:m.presentation?1:0)}e.getVisibleAndSorted=a;function n(g,d){return typeof g!="number"?typeof d!="number"?0:1:typeof d!="number"?-1:g-d}async function h(g,d){const m=g.getValue("debug.saveBeforeStart",{overrideIdentifier:d.activeTextEditorLanguageId});if(m!=="none"&&(await d.saveAll(),m==="allEditorsInActiveGroup")){const b=d.activeEditorPane;b&&b.input.resource?.scheme===k.Schemas.untitled&&await d.save({editor:b.input,groupId:b.group.id})}await g.reloadConfiguration()}e.saveAllBeforeDebugStart=h}),define(ne[2141],re([1,0,1516,6,51,36,22,130,231,397,9,41,2,26,54,18]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RawDebugSession=void 0;let s=class{constructor(r,p,u,a,n,h,g){this.dbgr=p,this.sessionId=u,this.extensionHostDebugService=a,this.openerService=n,this.notificationService=h,this.dialogSerivce=g,this.allThreadsContinued=!0,this._readyForBreakpoints=!1,this.debugAdapterStopped=!1,this.inShutdown=!1,this.terminated=!1,this.firedAdapterExitEvent=!1,this.startTime=0,this.didReceiveStoppedEvent=!1,this._onDidInitialize=new f.Emitter,this._onDidStop=new f.Emitter,this._onDidContinued=new f.Emitter,this._onDidTerminateDebugee=new f.Emitter,this._onDidExitDebugee=new f.Emitter,this._onDidThread=new f.Emitter,this._onDidOutput=new f.Emitter,this._onDidBreakpoint=new f.Emitter,this._onDidLoadedSource=new f.Emitter,this._onDidProgressStart=new f.Emitter,this._onDidProgressUpdate=new f.Emitter,this._onDidProgressEnd=new f.Emitter,this._onDidInvalidated=new f.Emitter,this._onDidInvalidateMemory=new f.Emitter,this._onDidCustomEvent=new f.Emitter,this._onDidEvent=new f.Emitter,this._onDidExitAdapter=new f.Emitter,this.toDispose=[],this.debugAdapter=r,this._capabilities=Object.create(null),this.toDispose.push(this.debugAdapter.onError(d=>{this.shutdown(d)})),this.toDispose.push(this.debugAdapter.onExit(d=>{d!==0?this.shutdown(new Error(`exit code: ${d}`)):this.shutdown()})),this.debugAdapter.onEvent(d=>{switch(d.event){case"initialized":this._readyForBreakpoints=!0,this._onDidInitialize.fire(d);break;case"loadedSource":this._onDidLoadedSource.fire(d);break;case"capabilities":if(d.body){const m=d.body.capabilities;this.mergeCapabilities(m)}break;case"stopped":this.didReceiveStoppedEvent=!0,this._onDidStop.fire(d);break;case"continued":this.allThreadsContinued=d.body.allThreadsContinued!==!1,this._onDidContinued.fire(d);break;case"thread":this._onDidThread.fire(d);break;case"output":this._onDidOutput.fire(d);break;case"breakpoint":this._onDidBreakpoint.fire(d);break;case"terminated":this._onDidTerminateDebugee.fire(d);break;case"exit":this._onDidExitDebugee.fire(d);break;case"progressStart":this._onDidProgressStart.fire(d);break;case"progressUpdate":this._onDidProgressUpdate.fire(d);break;case"progressEnd":this._onDidProgressEnd.fire(d);break;case"invalidated":this._onDidInvalidated.fire(d);break;case"memory":this._onDidInvalidateMemory.fire(d);break;case"process":break;case"module":break;default:this._onDidCustomEvent.fire(d);break}this._onDidEvent.fire(d)}),this.debugAdapter.onRequest(d=>this.dispatchRequest(d,p))}get onDidExitAdapter(){return this._onDidExitAdapter.event}get capabilities(){return this._capabilities}get readyForBreakpoints(){return this._readyForBreakpoints}get onDidInitialize(){return this._onDidInitialize.event}get onDidStop(){return this._onDidStop.event}get onDidContinued(){return this._onDidContinued.event}get onDidTerminateDebugee(){return this._onDidTerminateDebugee.event}get onDidExitDebugee(){return this._onDidExitDebugee.event}get onDidThread(){return this._onDidThread.event}get onDidOutput(){return this._onDidOutput.event}get onDidBreakpoint(){return this._onDidBreakpoint.event}get onDidLoadedSource(){return this._onDidLoadedSource.event}get onDidCustomEvent(){return this._onDidCustomEvent.event}get onDidProgressStart(){return this._onDidProgressStart.event}get onDidProgressUpdate(){return this._onDidProgressUpdate.event}get onDidProgressEnd(){return this._onDidProgressEnd.event}get onDidInvalidated(){return this._onDidInvalidated.event}get onDidInvalidateMemory(){return this._onDidInvalidateMemory.event}get onDidEvent(){return this._onDidEvent.event}async start(){if(!this.debugAdapter)return Promise.reject(new Error(t.localize(0,null)));await this.debugAdapter.startSession(),this.startTime=new Date().getTime()}async initialize(r){const p=await this.send("initialize",r,void 0,void 0,!1);return p&&this.mergeCapabilities(p.body),p}disconnect(r){const p=this.capabilities.supportTerminateDebuggee?r.terminateDebuggee:void 0;return this.shutdown(void 0,r.restart,p)}async launchOrAttach(r){const p=await this.send(r.request,r,void 0,void 0,!1);return p&&this.mergeCapabilities(p.body),p}terminate(r=!1){return this.capabilities.supportsTerminateRequest?this.terminated?this.disconnect({terminateDebuggee:!0,restart:r}):(this.terminated=!0,this.send("terminate",{restart:r},void 0,2e3)):Promise.reject(new Error("terminated not supported"))}restart(r){return this.capabilities.supportsRestartRequest?this.send("restart",r):Promise.reject(new Error("restart not supported"))}async next(r){const p=await this.send("next",r);return this.fireSimulatedContinuedEvent(r.threadId),p}async stepIn(r){const p=await this.send("stepIn",r);return this.fireSimulatedContinuedEvent(r.threadId),p}async stepOut(r){const p=await this.send("stepOut",r);return this.fireSimulatedContinuedEvent(r.threadId),p}async continue(r){const p=await this.send("continue",r);return p&&p.body&&p.body.allThreadsContinued!==void 0&&(this.allThreadsContinued=p.body.allThreadsContinued),this.fireSimulatedContinuedEvent(r.threadId,this.allThreadsContinued),p}pause(r){return this.send("pause",r)}terminateThreads(r){return this.capabilities.supportsTerminateThreadsRequest?this.send("terminateThreads",r):Promise.reject(new Error("terminateThreads not supported"))}setVariable(r){return this.capabilities.supportsSetVariable?this.send("setVariable",r):Promise.reject(new Error("setVariable not supported"))}setExpression(r){return this.capabilities.supportsSetExpression?this.send("setExpression",r):Promise.reject(new Error("setExpression not supported"))}async restartFrame(r,p){if(this.capabilities.supportsRestartFrame){const u=await this.send("restartFrame",r);return this.fireSimulatedContinuedEvent(p),u}return Promise.reject(new Error("restartFrame not supported"))}stepInTargets(r){return this.capabilities.supportsStepInTargetsRequest?this.send("stepInTargets",r):Promise.reject(new Error("stepInTargets not supported"))}completions(r,p){return this.capabilities.supportsCompletionsRequest?this.send("completions",r,p):Promise.reject(new Error("completions not supported"))}setBreakpoints(r){return this.send("setBreakpoints",r)}setFunctionBreakpoints(r){return this.capabilities.supportsFunctionBreakpoints?this.send("setFunctionBreakpoints",r):Promise.reject(new Error("setFunctionBreakpoints not supported"))}dataBreakpointInfo(r){return this.capabilities.supportsDataBreakpoints?this.send("dataBreakpointInfo",r):Promise.reject(new Error("dataBreakpointInfo not supported"))}setDataBreakpoints(r){return this.capabilities.supportsDataBreakpoints?this.send("setDataBreakpoints",r):Promise.reject(new Error("setDataBreakpoints not supported"))}setExceptionBreakpoints(r){return this.send("setExceptionBreakpoints",r)}breakpointLocations(r){return this.capabilities.supportsBreakpointLocationsRequest?this.send("breakpointLocations",r):Promise.reject(new Error("breakpointLocations is not supported"))}configurationDone(){return this.capabilities.supportsConfigurationDoneRequest?this.send("configurationDone",null):Promise.reject(new Error("configurationDone not supported"))}stackTrace(r,p){return this.send("stackTrace",r,p)}exceptionInfo(r){return this.capabilities.supportsExceptionInfoRequest?this.send("exceptionInfo",r):Promise.reject(new Error("exceptionInfo not supported"))}scopes(r,p){return this.send("scopes",r,p)}variables(r,p){return this.send("variables",r,p)}source(r){return this.send("source",r)}loadedSources(r){return this.capabilities.supportsLoadedSourcesRequest?this.send("loadedSources",r):Promise.reject(new Error("loadedSources not supported"))}threads(){return this.send("threads",null)}evaluate(r){return this.send("evaluate",r)}async stepBack(r){if(this.capabilities.supportsStepBack){const p=await this.send("stepBack",r);return this.fireSimulatedContinuedEvent(r.threadId),p}return Promise.reject(new Error("stepBack not supported"))}async reverseContinue(r){if(this.capabilities.supportsStepBack){const p=await this.send("reverseContinue",r);return this.fireSimulatedContinuedEvent(r.threadId),p}return Promise.reject(new Error("reverseContinue not supported"))}gotoTargets(r){return this.capabilities.supportsGotoTargetsRequest?this.send("gotoTargets",r):Promise.reject(new Error("gotoTargets is not supported"))}async goto(r){if(this.capabilities.supportsGotoTargetsRequest){const p=await this.send("goto",r);return this.fireSimulatedContinuedEvent(r.threadId),p}return Promise.reject(new Error("goto is not supported"))}async setInstructionBreakpoints(r){return this.capabilities.supportsInstructionBreakpoints?await this.send("setInstructionBreakpoints",r):Promise.reject(new Error("setInstructionBreakpoints is not supported"))}async disassemble(r){return this.capabilities.supportsDisassembleRequest?await this.send("disassemble",r):Promise.reject(new Error("disassemble is not supported"))}async readMemory(r){return this.capabilities.supportsReadMemoryRequest?await this.send("readMemory",r):Promise.reject(new Error("readMemory is not supported"))}async writeMemory(r){return this.capabilities.supportsWriteMemoryRequest?await this.send("writeMemory",r):Promise.reject(new Error("writeMemory is not supported"))}cancel(r){return this.send("cancel",r)}custom(r,p){return this.send(r,p)}async shutdown(r,p=!1,u=void 0){if(!this.inShutdown)if(this.inShutdown=!0,this.debugAdapter)try{const a=typeof u=="boolean"?{restart:p,terminateDebuggee:u}:{restart:p};this.send("disconnect",a,void 0,2e3)}catch{}finally{this.stopAdapter(r)}else return this.stopAdapter(r)}async stopAdapter(r){try{if(this.debugAdapter){const p=this.debugAdapter;this.debugAdapter=null,await p.stopSession(),this.debugAdapterStopped=!0}}finally{this.fireAdapterExitEvent(r)}}fireAdapterExitEvent(r){if(!this.firedAdapterExitEvent){this.firedAdapterExitEvent=!0;const p={emittedStopped:this.didReceiveStoppedEvent,sessionLengthInSeconds:(new Date().getTime()-this.startTime)/1e3};r&&!this.debugAdapterStopped&&(p.error=r),this._onDidExitAdapter.fire(p)}}async dispatchRequest(r,p){const u={type:"response",seq:0,command:r.command,request_seq:r.seq,success:!0},a=n=>this.debugAdapter&&this.debugAdapter.sendResponse(n);switch(r.command){case"launchVSCode":try{let n=await this.launchVsCode(r.arguments);n.success||((await this.dialogSerivce.show(c.Severity.Warning,t.localize(1,null),[t.localize(2,null),t.localize(3,null)],{cancelId:1})).choice===0?n=await this.launchVsCode(r.arguments):(u.success=!1,a(u),await this.shutdown())),u.body={rendererDebugPort:n.rendererDebugPort},a(u)}catch(n){u.success=!1,u.message=n.message,a(u)}break;case"runInTerminal":try{const n=await p.runInTerminal(r.arguments,this.sessionId),h=u;h.body={},typeof n=="number"&&(h.body.shellProcessId=n),a(h)}catch(n){u.success=!1,u.message=n.message,a(u)}break;default:u.success=!1,u.message=`unknown request '${r.command}'`,a(u);break}}launchVsCode(r){const p=[];for(const u of r.args){const a=(u.prefix||"")+(u.path||""),n=/^--(.+)=(.+)$/.exec(a);if(n&&n.length===3){const h=n[1];let g=n[2];(h==="file-uri"||h==="folder-uri")&&!(0,I.isUri)(u.path)&&(g=(0,I.isUri)(g)?g:v.URI.file(g).toString()),p.push(`--${h}=${g}`)}else p.push(a)}return r.env&&p.push(`--extensionEnvironment=${JSON.stringify(r.env)}`),this.extensionHostDebugService.openExtensionDevelopmentHostWindow(p,!!r.debugRenderer)}send(r,p,u,a,n=!0){return new Promise((h,g)=>{if(!this.debugAdapter){this.inShutdown?h(void 0):g(new Error(t.localize(4,null,r)));return}let d;const m=this.debugAdapter.sendRequest(r,p,b=>{d&&d.dispose(),b.success?h(b):g(b)},a);u&&(d=u.onCancellationRequested(()=>{d.dispose(),this.capabilities.supportsCancelRequest&&this.cancel({requestId:m})}))}).then(void 0,h=>Promise.reject(this.handleErrorResponse(h,n)))}handleErrorResponse(r,p){if(r.command==="canceled"&&r.message==="canceled")return k.canceled();const u=r?.body?.error,a=r?.message||"",n=u?(0,I.formatPII)(u.format,!1,u.variables):a,h=u?.url;if(u&&h){const d=u.urlLabel?u.urlLabel:t.localize(5,null),m=v.URI.parse(h),b=m.scheme===S.Schemas.command?"debug.moreInfo.command":"debug.moreInfo";return(0,D.createErrorWithActions)(n,{actions:[new A.Action(b,d,void 0,!0,async()=>{this.openerService.open(m,{allowCommands:!0})})]})}p&&u&&u.format&&u.showUser&&this.notificationService.error(n);const g=new Error(n);return g.showUser=u?.showUser,g}mergeCapabilities(r){r&&(this._capabilities=_.mixin(this._capabilities,r))}fireSimulatedContinuedEvent(r,p=!1){this._onDidContinued.fire({type:"event",event:"continued",body:{threadId:r,allThreadsContinued:p},seq:void 0})}dispose(){(0,o.dispose)(this.toDispose)}};s=Ee([W(3,w.IExtensionHostDebugService),W(4,C.IOpenerService),W(5,c.INotificationService),W(6,i.IDialogService)],s),e.RawDebugSession=s}),define(ne[2142],re([1,0,6,90,231]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewModel=void 0;class A{constructor(D){this.contextKeyService=D,this.firstSessionStart=!0,this._onDidFocusSession=new t.Emitter,this._onDidFocusStackFrame=new t.Emitter,this._onDidSelectExpression=new t.Emitter,this._onDidEvaluateLazyExpression=new t.Emitter,this._onWillUpdateViews=new t.Emitter,D.bufferChangeEvents(()=>{this.expressionSelectedContextKey=f.CONTEXT_EXPRESSION_SELECTED.bindTo(D),this.loadedScriptsSupportedContextKey=f.CONTEXT_LOADED_SCRIPTS_SUPPORTED.bindTo(D),this.stepBackSupportedContextKey=f.CONTEXT_STEP_BACK_SUPPORTED.bindTo(D),this.focusedSessionIsAttach=f.CONTEXT_FOCUSED_SESSION_IS_ATTACH.bindTo(D),this.restartFrameSupportedContextKey=f.CONTEXT_RESTART_FRAME_SUPPORTED.bindTo(D),this.stepIntoTargetsSupported=f.CONTEXT_STEP_INTO_TARGETS_SUPPORTED.bindTo(D),this.jumpToCursorSupported=f.CONTEXT_JUMP_TO_CURSOR_SUPPORTED.bindTo(D),this.setVariableSupported=f.CONTEXT_SET_VARIABLE_SUPPORTED.bindTo(D),this.setExpressionSupported=f.CONTEXT_SET_EXPRESSION_SUPPORTED.bindTo(D),this.multiSessionDebug=f.CONTEXT_MULTI_SESSION_DEBUG.bindTo(D),this.terminateDebuggeeSuported=f.CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED.bindTo(D),this.disassembleRequestSupported=f.CONTEXT_DISASSEMBLE_REQUEST_SUPPORTED.bindTo(D),this.focusedStackFrameHasInstructionPointerReference=f.CONTEXT_FOCUSED_STACK_FRAME_HAS_INSTRUCTION_POINTER_REFERENCE.bindTo(D)})}getId(){return"root"}get focusedSession(){return this._focusedSession}get focusedThread(){return this._focusedThread}get focusedStackFrame(){return this._focusedStackFrame}setFocus(D,I,w,v){const C=this._focusedStackFrame!==D,o=this._focusedSession!==w;this._focusedStackFrame=D,this._focusedThread=I,this._focusedSession=w,this.contextKeyService.bufferChangeEvents(()=>{this.loadedScriptsSupportedContextKey.set(w?!!w.capabilities.supportsLoadedSourcesRequest:!1),this.stepBackSupportedContextKey.set(w?!!w.capabilities.supportsStepBack:!1),this.restartFrameSupportedContextKey.set(w?!!w.capabilities.supportsRestartFrame:!1),this.stepIntoTargetsSupported.set(w?!!w.capabilities.supportsStepInTargetsRequest:!1),this.jumpToCursorSupported.set(w?!!w.capabilities.supportsGotoTargetsRequest:!1),this.setVariableSupported.set(w?!!w.capabilities.supportsSetVariable:!1),this.setExpressionSupported.set(w?!!w.capabilities.supportsSetExpression:!1),this.terminateDebuggeeSuported.set(w?!!w.capabilities.supportTerminateDebuggee:!1),this.disassembleRequestSupported.set(!!w?.capabilities.supportsDisassembleRequest),this.focusedStackFrameHasInstructionPointerReference.set(!!D?.instructionPointerReference);const c=!!w&&(0,_.isSessionAttach)(w);this.focusedSessionIsAttach.set(c)}),o&&this._onDidFocusSession.fire(w),C&&this._onDidFocusStackFrame.fire({stackFrame:D,explicit:v})}get onDidFocusSession(){return this._onDidFocusSession.event}get onDidFocusStackFrame(){return this._onDidFocusStackFrame.event}getSelectedExpression(){return this.selectedExpression}setSelectedExpression(D,I){this.selectedExpression=D?{expression:D,settingWatch:I}:void 0,this.expressionSelectedContextKey.set(!!D),this._onDidSelectExpression.fire(this.selectedExpression)}get onDidSelectExpression(){return this._onDidSelectExpression.event}get onDidEvaluateLazyExpression(){return this._onDidEvaluateLazyExpression.event}updateViews(){this._onWillUpdateViews.fire()}get onWillUpdateViews(){return this._onWillUpdateViews.event}isMultiSessionView(){return!!this.multiSessionDebug.get()}setMultiSessionView(D){this.multiSessionDebug.set(D)}async evaluateLazyExpression(D){await D.evaluateLazy(),this._onDidEvaluateLazyExpression.fire(D)}}e.ViewModel=A}),define(ne[412],re([1,0,174,1532]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DisassemblyViewInput=void 0;class _ extends t.EditorInput{constructor(){super(...arguments);this.resource=void 0}get typeId(){return _.ID}static get instance(){return(!_._instance||_._instance.isDisposed())&&(_._instance=new _),_._instance}getName(){return(0,f.localize)(0,null)}matches(k){return k instanceof _}}e.DisassemblyViewInput=_,_.ID="debug.disassemblyView.input"}),define(ne[2143],re([1,0,397,103,1930]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,f.registerMainProcessRemoteService)(t.IExtensionHostDebugService,_.ExtensionHostDebugBroadcastChannel.ChannelName,{supportsDelayedInstantiation:!0,channelClientCtor:_.ExtensionHostDebugChannelClient})}),define(ne[266],re([1,0,2]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionRecommendations=void 0;class f extends t.Disposable{constructor(){super(...arguments);this._activationPromise=null}get activated(){return this._activationPromise!==null}activate(){return this._activationPromise||(this._activationPromise=this.doActivate()),this._activationPromise}}e.ExtensionRecommendations=f}),define(ne[2144],re([1,0,79,266,1537,34,6]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigBasedRecommendations=void 0;let D=class extends f.ExtensionRecommendations{constructor(w,v){super();this.extensionTipsService=w,this.workspaceContextService=v,this.importantTips=[],this.otherTips=[],this._onDidChangeRecommendations=this._register(new k.Emitter),this.onDidChangeRecommendations=this._onDidChangeRecommendations.event,this._otherRecommendations=[],this._importantRecommendations=[]}get otherRecommendations(){return this._otherRecommendations}get importantRecommendations(){return this._importantRecommendations}get recommendations(){return[...this.importantRecommendations,...this.otherRecommendations]}async doActivate(){await this.fetch(),this._register(this.workspaceContextService.onDidChangeWorkspaceFolders(w=>this.onWorkspaceFoldersChanged(w)))}async fetch(){const w=this.workspaceContextService.getWorkspace(),v=new Map,C=new Map;for(const o of w.folders){const c=await this.extensionTipsService.getConfigBasedTips(o.uri);for(const i of c)i.important?v.set(i.extensionId,i):C.set(i.extensionId,i)}this.importantTips=[...v.values()],this.otherTips=[...C.values()].filter(o=>!v.has(o.extensionId)),this._otherRecommendations=this.otherTips.map(o=>this.toExtensionRecommendation(o)),this._importantRecommendations=this.importantTips.map(o=>this.toExtensionRecommendation(o))}async onWorkspaceFoldersChanged(w){if(w.added.length){const v=this.importantTips;await this.fetch(),this.importantTips.some(C=>v.every(o=>C.extensionId!==o.extensionId))&&this._onDidChangeRecommendations.fire()}}toExtensionRecommendation(w){return{extensionId:w.extensionId,reason:{reasonId:3,reasonText:(0,_.localize)(0,null)},whenNotInstalled:w.whenNotInstalled}}};D=Ee([W(0,t.IExtensionTipsService),W(1,A.IWorkspaceContextService)],D),e.ConfigBasedRecommendations=D}),define(ne[2145],re([1,0,79,266,1539]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExeBasedRecommendations=void 0;let A=class extends f.ExtensionRecommendations{constructor(D){super();this.extensionTipsService=D,this._otherTips=[],this._importantTips=[]}get otherRecommendations(){return this._otherTips.map(D=>this.toExtensionRecommendation(D))}get importantRecommendations(){return this._importantTips.map(D=>this.toExtensionRecommendation(D))}get recommendations(){return[...this.importantRecommendations,...this.otherRecommendations]}getRecommendations(D){const I=this._importantTips.filter(v=>v.exeName.toLowerCase()===D.toLowerCase()).map(v=>this.toExtensionRecommendation(v)),w=this._otherTips.filter(v=>v.exeName.toLowerCase()===D.toLowerCase()).map(v=>this.toExtensionRecommendation(v));return{important:I,others:w}}async doActivate(){this._otherTips=await this.extensionTipsService.getOtherExecutableBasedTips(),await this.fetchImportantExeBasedRecommendations()}async fetchImportantExeBasedRecommendations(){return this._importantExeBasedRecommendations||(this._importantExeBasedRecommendations=this.doFetchImportantExeBasedRecommendations()),this._importantExeBasedRecommendations}async doFetchImportantExeBasedRecommendations(){const D=new Map;return this._importantTips=await this.extensionTipsService.getImportantExecutableBasedTips(),this._importantTips.forEach(I=>D.set(I.extensionId.toLowerCase(),I)),D}toExtensionRecommendation(D){return{extensionId:D.extensionId.toLowerCase(),reason:{reasonId:2,reasonText:(0,_.localize)(0,null,D.exeFriendlyName)}}}};A=Ee([W(0,t.IExtensionTipsService)],A),e.ExeBasedRecommendations=A}),define(ne[2146],re([1,0,1545,118,2,79,20,62]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsCompletionItemsProvider=void 0;let I=class extends _.Disposable{constructor(v,C){super();this.extensionManagementService=v,this._register(C.completionProvider.register({language:"jsonc",pattern:"**/settings.json"},{provideCompletionItems:async(o,c,i,S)=>{const s=(p,u)=>{const a=p.getWordAtPosition(u);return a?new k.Range(u.lineNumber,a.startColumn,u.lineNumber,a.endColumn):null},l=(0,f.getLocation)(o.getValue(),o.getOffsetAt(c)),r=s(o,c)??k.Range.fromPositions(c,c);if(l.path[0]==="extensions.supportUntrustedWorkspaces"&&l.path.length===2&&l.isAtPropertyKey){let p=[];try{p=Object.keys((0,f.parse)(o.getValue())["extensions.supportUntrustedWorkspaces"])}catch{}return{suggestions:await this.provideSupportUntrustedWorkspacesExtensionProposals(p,r)}}return{suggestions:[]}}}))}async provideSupportUntrustedWorkspacesExtensionProposals(v,C){const o=[],i=(await this.extensionManagementService.getInstalled()).filter(S=>S.manifest.main).filter(S=>v.indexOf(S.identifier.id)===-1);if(i.length)o.push(...i.map(S=>{const s=`"${S.identifier.id}": { "supported": true, "version": "${S.manifest.version}" },`;return{label:S.identifier.id,kind:13,insertText:s,filterText:s,range:C}}));else{const S=`"vscode.csharp": { "supported": true, "version": "0.0.0" },`;o.push({label:(0,t.localize)(0,null),kind:13,insertText:S,filterText:S,range:C})}return o}};I=Ee([W(0,A.IExtensionManagementService),W(1,D.ILanguageFeaturesService)],I),e.ExtensionsCompletionItemsProvider=I}),define(ne[319],re([1,0,33,1547,63]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.activationTimeIcon=e.trustIcon=e.infoIcon=e.warningIcon=e.errorIcon=e.starEmptyIcon=e.starHalfIcon=e.starFullIcon=e.preReleaseIcon=e.verifiedPublisherIcon=e.ratingIcon=e.installCountIcon=e.remoteIcon=e.syncIgnoredIcon=e.syncEnabledIcon=e.configureRecommendedIcon=e.installWorkspaceRecommendedIcon=e.installLocalInRemoteIcon=e.filterIcon=e.refreshIcon=e.clearSearchResultsIcon=e.manageExtensionIcon=e.extensionsViewIcon=void 0,e.extensionsViewIcon=(0,_.registerIcon)("extensions-view-icon",t.Codicon.extensions,(0,f.localize)(0,null)),e.manageExtensionIcon=(0,_.registerIcon)("extensions-manage",t.Codicon.gear,(0,f.localize)(1,null)),e.clearSearchResultsIcon=(0,_.registerIcon)("extensions-clear-search-results",t.Codicon.clearAll,(0,f.localize)(2,null)),e.refreshIcon=(0,_.registerIcon)("extensions-refresh",t.Codicon.refresh,(0,f.localize)(3,null)),e.filterIcon=(0,_.registerIcon)("extensions-filter",t.Codicon.filter,(0,f.localize)(4,null)),e.installLocalInRemoteIcon=(0,_.registerIcon)("extensions-install-local-in-remote",t.Codicon.cloudDownload,(0,f.localize)(5,null)),e.installWorkspaceRecommendedIcon=(0,_.registerIcon)("extensions-install-workspace-recommended",t.Codicon.cloudDownload,(0,f.localize)(6,null)),e.configureRecommendedIcon=(0,_.registerIcon)("extensions-configure-recommended",t.Codicon.pencil,(0,f.localize)(7,null)),e.syncEnabledIcon=(0,_.registerIcon)("extensions-sync-enabled",t.Codicon.sync,(0,f.localize)(8,null)),e.syncIgnoredIcon=(0,_.registerIcon)("extensions-sync-ignored",t.Codicon.syncIgnored,(0,f.localize)(9,null)),e.remoteIcon=(0,_.registerIcon)("extensions-remote",t.Codicon.remote,(0,f.localize)(10,null)),e.installCountIcon=(0,_.registerIcon)("extensions-install-count",t.Codicon.cloudDownload,(0,f.localize)(11,null)),e.ratingIcon=(0,_.registerIcon)("extensions-rating",t.Codicon.star,(0,f.localize)(12,null)),e.verifiedPublisherIcon=(0,_.registerIcon)("extensions-verified-publisher",t.Codicon.verifiedFilled,(0,f.localize)(13,null)),e.preReleaseIcon=(0,_.registerIcon)("extensions-pre-release",t.Codicon.versions,(0,f.localize)(14,null)),e.starFullIcon=(0,_.registerIcon)("extensions-star-full",t.Codicon.starFull,(0,f.localize)(15,null)),e.starHalfIcon=(0,_.registerIcon)("extensions-star-half",t.Codicon.starHalf,(0,f.localize)(16,null)),e.starEmptyIcon=(0,_.registerIcon)("extensions-star-empty",t.Codicon.starEmpty,(0,f.localize)(17,null)),e.errorIcon=(0,_.registerIcon)("extensions-error-message",t.Codicon.error,(0,f.localize)(18,null)),e.warningIcon=(0,_.registerIcon)("extensions-warning-message",t.Codicon.warning,(0,f.localize)(19,null)),e.infoIcon=(0,_.registerIcon)("extensions-info-message",t.Codicon.info,(0,f.localize)(20,null)),e.trustIcon=(0,_.registerIcon)("extension-workspace-trust",t.Codicon.shield,(0,f.localize)(21,null)),e.activationTimeIcon=(0,_.registerIcon)("extension-activation-time",t.Codicon.history,(0,f.localize)(22,null))}),define(ne[2147],re([1,0,266,46]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeymapRecommendations=void 0;let _=class extends t.ExtensionRecommendations{constructor(k){super();this.productService=k,this._recommendations=[]}get recommendations(){return this._recommendations}async doActivate(){this.productService.keymapExtensionTips&&(this._recommendations=this.productService.keymapExtensionTips.map(k=>({extensionId:k.toLowerCase(),reason:{reasonId:6,reasonText:""}})))}};_=Ee([W(0,f.IProductService)],_),e.KeymapRecommendations=_}),define(ne[2148],re([1,0,266,46]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageRecommendations=void 0;let _=class extends t.ExtensionRecommendations{constructor(k){super();this.productService=k,this._recommendations=[]}get recommendations(){return this._recommendations}async doActivate(){this.productService.languageExtensionTips&&(this._recommendations=this.productService.languageExtensionTips.map(k=>({extensionId:k.toLowerCase(),reason:{reasonId:6,reasonText:""}})))}};_=Ee([W(0,f.IProductService)],_),e.LanguageRecommendations=_}),define(ne[577],re([1,0,15,107]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Query=void 0;class _{constructor(k,D,I){this.value=k,this.sortBy=D,this.groupBy=I,this.value=k.trim()}static suggestions(k){const D=["installed","outdated","enabled","disabled","builtin","featured","popular","recommended","workspaceUnsupported","sort","category","tag","ext","id"],I={sort:["installs","rating","name","publishedDate"],category:f.EXTENSION_CATEGORIES.map(o=>`"${o.toLowerCase()}"`),tag:[""],ext:[""],id:[""]},w=o=>k.indexOf(o)>-1,v=I.sort.some(o=>w(`@sort:${o}`)),C=I.category.some(o=>w(`@category:${o}`));return(0,t.flatten)(D.map(o=>v&&o==="sort"||C&&o==="category"?[]:o in I?I[o].map(c=>`@${o}:${c}${c===""?"":" "}`):w(`@${o}`)?[]:[`@${o} `]))}static parse(k){let D="";k=k.replace(/@sort:(\w+)(-\w*)?/g,(w,v,C)=>(D=v,""));let I="";return k=k.replace(/@group:(\w+)(-\w*)?/g,(w,v,C)=>(I=v,"")),new _(k,D,I)}toString(){let k=this.value;return this.sortBy&&(k=`${k}${k?" ":""}@sort:${this.sortBy}`),this.groupBy&&(k=`${k}${k?" ":""}@group:${this.groupBy}`),k}isValid(){return!/@outdated/.test(this.value)}equals(k){return this.value===k.value&&this.sortBy===k.sortBy}}e.Query=_}),define(ne[119],re([1,0,5,2,100,7]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INSTALL_ACTIONS_GROUP=e.THEME_ACTIONS_GROUP=e.HasOutdatedExtensionsContext=e.ExtensionsSortByContext=e.DefaultViewsContext=e.LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID=e.INSTALL_EXTENSION_FROM_VSIX_COMMAND_ID=e.SELECT_INSTALL_VSIX_EXTENSION_COMMAND_ID=e.TOGGLE_IGNORE_EXTENSION_ACTION_ID=e.WORKSPACE_RECOMMENDATIONS_VIEW_ID=e.ExtensionContainers=e.CloseExtensionDetailsOnViewChangeKey=e.AutoCheckUpdatesConfigurationKey=e.AutoUpdateConfigurationKey=e.ConfigurationKey=e.ExtensionEditorTab=e.IExtensionsWorkbenchService=e.SERVICE_ID=e.ExtensionState=e.VIEWLET_ID=void 0,e.VIEWLET_ID="workbench.view.extensions";var k;(function(w){w[w.Installing=0]="Installing",w[w.Installed=1]="Installed",w[w.Uninstalling=2]="Uninstalling",w[w.Uninstalled=3]="Uninstalled"})(k=e.ExtensionState||(e.ExtensionState={})),e.SERVICE_ID="extensionsWorkbenchService",e.IExtensionsWorkbenchService=(0,t.createDecorator)(e.SERVICE_ID);var D;(function(w){w.Readme="readme",w.Contributions="contributions",w.Changelog="changelog",w.Dependencies="dependencies",w.ExtensionPack="extensionPack",w.RuntimeStatus="runtimeStatus"})(D=e.ExtensionEditorTab||(e.ExtensionEditorTab={})),e.ConfigurationKey="extensions",e.AutoUpdateConfigurationKey="extensions.autoUpdate",e.AutoCheckUpdatesConfigurationKey="extensions.autoCheckUpdates",e.CloseExtensionDetailsOnViewChangeKey="extensions.closeExtensionDetailsOnViewChange";let I=class extends f.Disposable{constructor(v,C){super();this.containers=v,this._register(C.onChange(this.update,this))}set extension(v){this.containers.forEach(C=>C.extension=v)}update(v){for(const C of this.containers)v&&C.extension?(0,_.areSameExtensions)(C.extension.identifier,v.identifier)&&(C.extension.server&&v.server&&C.extension.server!==v.server?C.updateWhenCounterExtensionChanges&&C.update():C.extension=v):C.update()}};I=Ee([W(1,e.IExtensionsWorkbenchService)],I),e.ExtensionContainers=I,e.WORKSPACE_RECOMMENDATIONS_VIEW_ID="workbench.views.extensions.workspaceRecommendations",e.TOGGLE_IGNORE_EXTENSION_ACTION_ID="workbench.extensions.action.toggleIgnoreExtension",e.SELECT_INSTALL_VSIX_EXTENSION_COMMAND_ID="workbench.extensions.action.installVSIX",e.INSTALL_EXTENSION_FROM_VSIX_COMMAND_ID="workbench.extensions.command.installFromVSIX",e.LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID="workbench.extensions.action.listWorkspaceUnsupportedExtensions",e.DefaultViewsContext=new A.RawContextKey("defaultExtensionViews",!0),e.ExtensionsSortByContext=new A.RawContextKey("extensionsSortByValue",""),e.HasOutdatedExtensionsContext=new A.RawContextKey("hasOutdatedExtensions",!1),e.THEME_ACTIONS_GROUP="_theme_",e.INSTALL_ACTIONS_GROUP="0_install"}),define(ne[790],re([1,0,1557,79]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsConfigurationInitialContent=e.ExtensionsConfigurationSchema=e.ExtensionsConfigurationSchemaId=void 0,e.ExtensionsConfigurationSchemaId="vscode://schemas/extensions",e.ExtensionsConfigurationSchema={id:e.ExtensionsConfigurationSchemaId,allowComments:!0,allowTrailingCommas:!0,type:"object",title:(0,t.localize)(0,null),additionalProperties:!1,properties:{recommendations:{type:"array",description:(0,t.localize)(1,null),items:{type:"string",pattern:f.EXTENSION_IDENTIFIER_PATTERN,errorMessage:(0,t.localize)(2,null)}},unwantedRecommendations:{type:"array",description:(0,t.localize)(3,null),items:{type:"string",pattern:f.EXTENSION_IDENTIFIER_PATTERN,errorMessage:(0,t.localize)(4,null)}}}},e.ExtensionsConfigurationInitialContent=["{"," // See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations."," // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp",""," // List of extensions which should be recommended for users of this workspace.",' "recommendations": ['," "," ],"," // List of extensions recommended by VS Code that should not be recommended for users of this workspace.",' "unwantedRecommendations": ['," "," ]","}"].join(` `)}),define(ne[578],re([1,0,18,9,1558,174,100,48]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsInput=void 0;class I extends A.EditorInput{constructor(v){super();this._extension=v}get typeId(){return I.ID}get capabilities(){return 2|8}get resource(){return f.URI.from({scheme:t.Schemas.extension,path:(0,D.join)(this._extension.identifier.id,"extension")})}get extension(){return this._extension}getName(){return(0,_.localize)(0,null,this._extension.displayName)}matches(v){return super.matches(v)?!0:v instanceof I&&(0,k.areSameExtensions)(this._extension.identifier,v._extension.identifier)}}e.ExtensionsInput=I,I.ID="workbench.extensions.input2"}),define(ne[485],re([1,0,1560,9,174]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RuntimeExtensionsInput=void 0;class A extends _.EditorInput{constructor(){super(...arguments);this.resource=f.URI.from({scheme:"runtime-extensions",path:"default"})}get typeId(){return A.ID}get capabilities(){return 2|8}static get instance(){return(!A._instance||A._instance.isDisposed())&&(A._instance=new A),A._instance}getName(){return t.localize(0,null)}matches(D){return super.matches(D)?!0:D instanceof A}}e.RuntimeExtensionsInput=A,A.ID="workbench.runtimeExtensions.input"}),define(ne[2149],re([1,0,1567,46,36,95,87,41,9]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReportExtensionIssueAction=void 0;const w="https://github.com/microsoft/vscode";let v=class Tr extends _.Action{constructor(o,c,i,S,s){super(Tr._id,Tr._label,"extension-action report-issue");this.extension=o,this.openerService=c,this.clipboardService=i,this.productService=S,this.nativeHostService=s,this.enabled=o.description.isBuiltin||!!o.description.repository&&!!o.description.repository.url}async run(){this._url||(this._url=await this._generateNewIssueUrl(this.extension)),this.openerService.open(I.URI.parse(this._url))}async _generateNewIssueUrl(o){let c=o.marketplaceInfo&&o.marketplaceInfo.type===1&&o.description.repository?o.description.repository.url:void 0;!c&&o.description.isBuiltin&&(c=w),c?c=`${c.indexOf(".git")!==-1?c.substr(0,c.length-4):c}/issues/new/`:c=this.productService.reportIssueUrl;let i="Bug",S="Extension issue",s=":warning: We have written the needed data into your clipboard. Please paste! :warning:";this.clipboardService.writeText("```json \n"+JSON.stringify(o.status,null," ")+"\n```");const l=await this.nativeHostService.getOSProperties(),r=`${l.type} ${l.arch} ${l.release}`,p=c.indexOf("?")===-1?"?":"&",u=encodeURIComponent(`- Issue Type: \`${i}\` - Extension Name: \`${o.description.name}\` - Extension Version: \`${o.description.version}\` - OS Version: \`${r}\` - VS Code version: \`${this.productService.version}\` ${s}`);return`${c}${p}body=${u}&title=${encodeURIComponent(S)}`}};v._id="workbench.extensions.action.reportExtensionIssue",v._label=t.localize(0,null),v=Ee([W(1,D.IOpenerService),W(2,A.IClipboardService),W(3,f.IProductService),W(4,k.INativeHostService)],v),e.ReportExtensionIssueAction=v}),define(ne[486],re([1,0,57,248,1571,17]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.updateContributedOpeners=e.externalUriOpenersConfigurationNode=e.externalUriOpenersSettingId=e.defaultExternalUriOpenerId=void 0,e.defaultExternalUriOpenerId="default",e.externalUriOpenersSettingId="workbench.externalUriOpeners";const k={type:"string",enum:[]},D="\n- `https://microsoft.com`: Matches this specific domain using https\n- `https://microsoft.com:8080`: Matches this specific domain on this port using https\n- `https://microsoft.com:*`: Matches this specific domain on any port using https\n- `https://microsoft.com/foo`: Matches `https://microsoft.com/foo` and `https://microsoft.com/foo/bar`, but not `https://microsoft.com/foobar` or `https://microsoft.com/bar`\n- `https://*.microsoft.com`: Match all domains ending in `microsoft.com` using https\n- `microsoft.com`: Match this specific domain using either http or https\n- `*.microsoft.com`: Match all domains ending in `microsoft.com` using either http or https\n- `http://192.168.0.1`: Matches this specific IP using http\n- `http://192.168.0.*`: Matches all IP's with this prefix using http\n- `*`: Match all domains using either http or https";e.externalUriOpenersConfigurationNode={...f.workbenchConfigurationNodeBase,properties:{[e.externalUriOpenersSettingId]:{type:"object",markdownDescription:_.localize(0,null),defaultSnippets:[{body:{"example.com":"$1"}}],additionalProperties:{anyOf:[{type:"string",markdownDescription:_.localize(1,null,D)},{type:"string",markdownDescription:_.localize(2,null,D),enum:[e.defaultExternalUriOpenerId],enumDescriptions:[_.localize(3,null)]},k]}}}};function I(w,v){k.enum=w,k.enumDescriptions=v,A.Registry.as(t.Extensions.Configuration).notifyConfigurationSchemaUpdated(e.externalUriOpenersConfigurationNode)}e.updateContributedOpeners=I}),define(ne[289],re([1,0,1582,7]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NEW_UNTITLED_FILE_LABEL=e.NEW_UNTITLED_FILE_COMMAND_ID=e.LAST_COMPRESSED_FOLDER=e.FIRST_COMPRESSED_FOLDER=e.NEXT_COMPRESSED_FOLDER=e.PREVIOUS_COMPRESSED_FOLDER=e.REMOVE_ROOT_FOLDER_LABEL=e.REMOVE_ROOT_FOLDER_COMMAND_ID=e.ResourceSelectedForCompareContext=e.OpenEditorsReadonlyEditorContext=e.OpenEditorsDirtyEditorContext=e.OpenEditorsGroupContext=e.SAVE_FILES_COMMAND_ID=e.SAVE_ALL_IN_GROUP_COMMAND_ID=e.SAVE_ALL_LABEL=e.SAVE_ALL_COMMAND_ID=e.SAVE_FILE_WITHOUT_FORMATTING_LABEL=e.SAVE_FILE_WITHOUT_FORMATTING_COMMAND_ID=e.SAVE_FILE_LABEL=e.SAVE_FILE_COMMAND_ID=e.SAVE_FILE_AS_LABEL=e.SAVE_FILE_AS_COMMAND_ID=e.COPY_RELATIVE_PATH_COMMAND_ID=e.COPY_PATH_COMMAND_ID=e.COMPARE_WITH_SAVED_COMMAND_ID=e.COMPARE_RESOURCE_COMMAND_ID=e.COMPARE_SELECTED_COMMAND_ID=e.SELECT_FOR_COMPARE_COMMAND_ID=e.OPEN_WITH_EXPLORER_COMMAND_ID=e.OPEN_TO_SIDE_COMMAND_ID=e.REVERT_FILE_COMMAND_ID=e.REVEAL_IN_EXPLORER_COMMAND_ID=void 0,e.REVEAL_IN_EXPLORER_COMMAND_ID="revealInExplorer",e.REVERT_FILE_COMMAND_ID="workbench.action.files.revert",e.OPEN_TO_SIDE_COMMAND_ID="explorer.openToSide",e.OPEN_WITH_EXPLORER_COMMAND_ID="explorer.openWith",e.SELECT_FOR_COMPARE_COMMAND_ID="selectForCompare",e.COMPARE_SELECTED_COMMAND_ID="compareSelected",e.COMPARE_RESOURCE_COMMAND_ID="compareFiles",e.COMPARE_WITH_SAVED_COMMAND_ID="workbench.files.action.compareWithSaved",e.COPY_PATH_COMMAND_ID="copyFilePath",e.COPY_RELATIVE_PATH_COMMAND_ID="copyRelativeFilePath",e.SAVE_FILE_AS_COMMAND_ID="workbench.action.files.saveAs",e.SAVE_FILE_AS_LABEL=t.localize(0,null),e.SAVE_FILE_COMMAND_ID="workbench.action.files.save",e.SAVE_FILE_LABEL=t.localize(1,null),e.SAVE_FILE_WITHOUT_FORMATTING_COMMAND_ID="workbench.action.files.saveWithoutFormatting",e.SAVE_FILE_WITHOUT_FORMATTING_LABEL=t.localize(2,null),e.SAVE_ALL_COMMAND_ID="saveAll",e.SAVE_ALL_LABEL=t.localize(3,null),e.SAVE_ALL_IN_GROUP_COMMAND_ID="workbench.files.action.saveAllInGroup",e.SAVE_FILES_COMMAND_ID="workbench.action.files.saveFiles",e.OpenEditorsGroupContext=new f.RawContextKey("groupFocusedInOpenEditors",!1),e.OpenEditorsDirtyEditorContext=new f.RawContextKey("dirtyEditorFocusedInOpenEditors",!1),e.OpenEditorsReadonlyEditorContext=new f.RawContextKey("readonlyEditorFocusedInOpenEditors",!1),e.ResourceSelectedForCompareContext=new f.RawContextKey("resourceSelectedForCompare",!1),e.REMOVE_ROOT_FOLDER_COMMAND_ID="removeRootFolder",e.REMOVE_ROOT_FOLDER_LABEL=t.localize(4,null),e.PREVIOUS_COMPRESSED_FOLDER="previousCompressedFolder",e.NEXT_COMPRESSED_FOLDER="nextCompressedFolder",e.FIRST_COMPRESSED_FOLDER="firstCompressedFolder",e.LAST_COMPRESSED_FOLDER="lastCompressedFolder",e.NEW_UNTITLED_FILE_COMMAND_ID="workbench.action.files.newUntitledFile",e.NEW_UNTITLED_FILE_LABEL=t.localize(5,null)}),define(ne[791],re([1,0,1454,10,128,446,112,138,2,14,29,9,39,58,756,8,7,5,38,41,32,12,16,28,289,72,1073]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccessibilityHelpController=void 0;const m=new s.RawContextKey("accessibilityHelpWidgetVisible",!1);let b=class Eo extends I.Disposable{constructor(O,x){super();this._editor=O,this._widget=this._register(x.createInstance(E,this._editor))}static get(O){return O.getContribution(Eo.ID)}show(){this._widget.show()}hide(){this._widget.hide()}};b.ID="editor.contrib.accessibilityHelpController",b=Ee([W(1,l.IInstantiationService)],b),e.AccessibilityHelpController=b;let E=class Bi extends D.Widget{constructor(O,x,F,L,M){super();this._contextKeyService=x,this._keybindingService=F,this._configurationService=L,this._openerService=M,this._editor=O,this._isVisibleKey=m.bindTo(this._contextKeyService),this._domNode=(0,_.createFastDomNode)(document.createElement("div")),this._domNode.setClassName("accessibilityHelpWidget"),this._domNode.setWidth(Bi.WIDTH),this._domNode.setHeight(Bi.HEIGHT),this._domNode.setDisplay("none"),this._domNode.setAttribute("role","dialog"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode=(0,_.createFastDomNode)(document.createElement("div")),this._contentDomNode.setAttribute("role","document"),this._domNode.appendChild(this._contentDomNode),this._isVisible=!1,this._register(this._editor.onDidLayoutChange(()=>{this._isVisible&&this._layout()})),this._register(f.addStandardDisposableListener(this._contentDomNode.domNode,"keydown",N=>{!this._isVisible||(N.equals(2048|35)&&((0,k.alert)(t.localize(0,null)),this._configurationService.updateValue("editor.accessibilitySupport","on"),N.preventDefault(),N.stopPropagation()),N.equals(2048|38)&&((0,k.alert)(t.localize(1,null)),this._openerService.open(C.URI.parse("https://go.microsoft.com/fwlink/?linkid=851010")),N.preventDefault(),N.stopPropagation()))})),this.onblur(this._contentDomNode.domNode,()=>{this.hide()}),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return Bi.ID}getDomNode(){return this._domNode.domNode}getPosition(){return{preference:null}}show(){this._isVisible||(this._isVisible=!0,this._isVisibleKey.set(!0),this._layout(),this._domNode.setDisplay("block"),this._domNode.setAttribute("aria-hidden","false"),this._contentDomNode.domNode.tabIndex=0,this._buildContent(),this._contentDomNode.domNode.focus())}_descriptionForCommand(O,x,F){let L=this._keybindingService.lookupKeybinding(O);return L?v.format(x,L.getAriaLabel()):v.format(F,O)}_buildContent(){const O=this._editor.getOptions();let x=t.localize(2,null);x+=` `+t.localize(3,null);const F=this._configurationService.getValue("editor").accessibilitySupport,L=O.get(2),M=w.isMacintosh?t.localize(4,null):t.localize(5,null);switch(F){case"auto":switch(L){case 0:x+=` - `+t.localize(6,null);break;case 2:x+=` - `+t.localize(7,null);break;case 1:x+=` - `+t.localize(8,null),x+=" "+M;break}break;case"on":x+=` - `+t.localize(9,null);break;case"off":x+=` - `+t.localize(10,null),x+=" "+M;break}const N=t.localize(11,null),B=t.localize(12,null),P=t.localize(13,null),V=t.localize(14,null);O.get(130)?x+=` - `+this._descriptionForCommand(i.ToggleTabFocusModeAction.ID,N,B):x+=` - `+this._descriptionForCommand(i.ToggleTabFocusModeAction.ID,P,V);const z=w.isMacintosh?t.localize(15,null):t.localize(16,null);x+=` `+z,x+=` `+t.localize(17,null),this._contentDomNode.domNode.appendChild((0,A.renderFormattedText)(x)),this._contentDomNode.domNode.setAttribute("aria-label",x)}hide(){!this._isVisible||(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,f.clearNode(this._contentDomNode.domNode),this._editor.focus())}_layout(){let O=this._editor.getLayoutInfo();const x=Math.min(O.width-40,Bi.WIDTH),F=Math.min(O.height-40,Bi.HEIGHT);this._domNode.setTop(Math.round((O.height-F)/2)),this._domNode.setLeft(Math.round((O.width-x)/2)),this._domNode.setWidth(x),this._domNode.setHeight(F)}};E.ID="editor.contrib.accessibilityHelpWidget",E.WIDTH=500,E.HEIGHT=300,E=Ee([W(1,s.IContextKeyService),W(2,r.IKeybindingService),W(3,S.IConfigurationService),W(4,p.IOpenerService)],E);class y extends n.Action2{constructor(){super({id:"editor.action.showAccessibilityHelp",title:{value:t.localize(18,null),original:"Show Accessibility Help"},f1:!0,keybinding:{primary:512|59,weight:100,linux:{primary:512|1024|59,secondary:[512|59]}}})}async run(O){const x=O.get(h.ICommandService),F=O.get(d.ICodeEditorService);let L=F.getActiveCodeEditor();if(L||await x.executeCommand(g.NEW_UNTITLED_FILE_COMMAND_ID),L=F.getActiveCodeEditor(),L){const M=b.get(L);M&&M.show()}}}(0,o.registerEditorContribution)(b.ID,b),(0,n.registerAction2)(y);const T=o.EditorCommand.bindToContribution(b.get);(0,o.registerEditorCommand)(new T({id:"closeAccessibilityHelp",precondition:m,handler:R=>R.hide(),kbOpts:{weight:100+100,kbExpr:c.EditorContextKeys.focus,primary:9,secondary:[1024|9]}})),(0,a.registerThemingParticipant)((R,O)=>{const x=R.getColor(u.editorWidgetBackground);x&&O.addRule(`.monaco-editor .accessibilityHelpWidget { background-color: ${x}; }`);const F=R.getColor(u.editorWidgetForeground);x&&O.addRule(`.monaco-editor .accessibilityHelpWidget { color: ${F}; }`);const L=R.getColor(u.widgetShadow);L&&O.addRule(`.monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px ${L}; }`);const M=R.getColor(u.contrastBorder);M&&O.addRule(`.monaco-editor .accessibilityHelpWidget { border: 2px solid ${M}; }`)})}),define(ne[2150],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SufTrie=e.PreTrie=e.ExplorerFileNestingTrie=void 0;class t{constructor(w){this.root=new f;for(const[v,C]of w)for(const o of C)this.root.add(v,o)}toString(){return this.root.toString()}getAttributes(w,v){const C=w.lastIndexOf(".");return C<1?{dirname:v,basename:w,extname:""}:{dirname:v,basename:w.substring(0,C),extname:w.substring(C+1)}}nest(w,v){const C=new f;for(const i of w){const S=this.getAttributes(i,v),s=this.root.get(i,S);for(const l of s)C.add(l,i)}const o=(i,S=new Set)=>{if(S.has(i))return[];S.add(i);const s=this.getAttributes(i,v),l=C.get(i,s);return l.length===0?[i]:l.length===1&&l[0]===i?[i]:l.flatMap(r=>o(r,S))},c=new Map;for(const i of w){let S=o(i);S.length===0&&(S=[i]);for(const s of S){let l=c.get(s);l||c.set(s,l=new Set),i!==s&&l.add(i)}}return c}}e.ExplorerFileNestingTrie=t;class f{constructor(){this.value=new _,this.map=new Map}add(w,v){if(w==="")this.value.add(w,v);else if(w[0]==="*")this.value.add(w,v);else{const C=w[0],o=w.slice(1);let c=this.map.get(C);c||this.map.set(C,c=new f),c.add(o,v)}}get(w,v){const C=[];C.push(...this.value.get(w,v));const o=w[0],c=w.slice(1),i=this.map.get(o);return i&&C.push(...i.get(c,v)),C}toString(w=""){const v=[];return this.value.hasItems&&v.push(`* => `+this.value.toString(w+" ")),[...this.map.entries()].map(([C,o])=>v.push("^"+C+` => `+o.toString(w+" "))),v.map(C=>w+C).join(` `)}}e.PreTrie=f;class _{constructor(){this.star=[],this.epsilon=[],this.map=new Map,this.hasItems=!1}add(w,v){if(this.hasItems=!0,w==="*")this.star.push(new D(v));else if(w==="")this.epsilon.push(new D(v));else{const C=w[w.length-1],o=w.slice(0,w.length-1);if(C==="*")throw Error("Unexpected star in SufTrie key: "+w);{let c=this.map.get(C);c||this.map.set(C,c=new _),c.add(o,v)}}}get(w,v){const C=[];w===""&&C.push(...this.epsilon.map(S=>S.substitute(v))),this.star.length&&C.push(...this.star.map(S=>S.substitute(v,w)));const o=w[w.length-1],c=w.slice(0,w.length-1),i=this.map.get(o);return i&&C.push(...i.get(c,v)),C}toString(w=""){const v=[];return this.star.length&&v.push("* => "+this.star.join("; ")),this.epsilon.length&&v.push("\u03B5 => "+this.epsilon.join("; ")),[...this.map.entries()].map(([C,o])=>v.push(C+`$ => `+o.toString(w+" "))),v.map(C=>w+C).join(` `)}}e.SufTrie=_;var A;(function(I){I.capture="capture",I.basename="basename",I.dirname="dirname",I.extname="extname"})(A||(A={}));const k=/\$[({](capture|basename|dirname|extname)[)}]/g;class D{constructor(w){this.tokens=[],k.lastIndex=0;let v,C=0;for(;v=k.exec(w);){const o=w.slice(C,v.index);this.tokens.push(o);const c=v[1];switch(c){case"basename":case"dirname":case"extname":case"capture":this.tokens.push({capture:c});break;default:throw Error("unknown substitution type: "+c)}C=v.index+v[0].length}if(C!==w.length){const o=w.slice(C,w.length);this.tokens.push(o)}}substitute(w,v){return this.tokens.map(C=>{if(typeof C=="string")return C;switch(C.capture){case"basename":return w.basename;case"dirname":return w.dirname;case"extname":return w.extname;case"capture":return v||""}}).join("")}}}),define(ne[355],re([1,0,9,157,48,55,29,15,2,110,6,19,2150,13]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NewExplorerItem=e.ExplorerItem=e.ExplorerModel=void 0;class i{constructor(r,p,u,a){this.contextService=r,this.uriIdentityService=p,this._onDidChangeRoots=new v.Emitter;const n=()=>this._roots=this.contextService.getWorkspace().folders.map(h=>new S(h.uri,u,a,void 0,!0,!1,!1,h.name));n(),this._listener=this.contextService.onDidChangeWorkspaceFolders(()=>{n(),this._onDidChangeRoots.fire()})}get roots(){return this._roots}get onDidChangeRoots(){return this._onDidChangeRoots.event}findAll(r){return(0,D.coalesce)(this.roots.map(p=>p.find(r)))}findClosest(r){const p=this.contextService.getWorkspaceFolder(r);if(p){const u=this.roots.find(a=>this.uriIdentityService.extUri.isEqual(a.resource,p.uri));if(u)return u.find(r)}return null}dispose(){(0,I.dispose)(this._listener)}}e.ExplorerModel=i;class S{constructor(r,p,u,a,n,h,g,d=(0,C.basenameOrAuthority)(r),m,b=!1){this.resource=r,this.fileService=p,this.configService=u,this._parent=a,this._isDirectory=n,this._isSymbolicLink=h,this._readonly=g,this._name=d,this._mtime=m,this._unknown=b,this.isError=!1,this._isExcluded=!1,this._isDirectoryResolved=!1}get isExcluded(){return this._isExcluded?!0:this._parent?this._parent.isExcluded:!1}set isExcluded(r){this._isExcluded=r}get hasChildren(){return this.isDirectory||this.hasNests}get hasNests(){return!!this.nestedChildren?.length}get isDirectoryResolved(){return this._isDirectoryResolved}get isSymbolicLink(){return!!this._isSymbolicLink}get isDirectory(){return!!this._isDirectory}get isReadonly(){return this._readonly||this.fileService.hasCapability(this.resource,2048)}get mtime(){return this._mtime}get name(){return this._name}get isUnknown(){return this._unknown}get parent(){return this._parent}get root(){return this._parent?this._parent.root:this}get children(){return new Map}updateName(r){this._parent&&this._parent.removeChild(this),this._name=r,this._parent&&this._parent.addChild(this)}getId(){return this.resource.toString()}toString(){return`ExplorerItem: ${this.name}`}get isRoot(){return this===this.root}static create(r,p,u,a,n){const h=new S(u.resource,r,p,a,u.isDirectory,u.isSymbolicLink,u.readonly,u.name,u.mtime,!u.isFile&&!u.isDirectory);if(h.isDirectory&&(h._isDirectoryResolved=!!u.children||!!n&&n.some(g=>(0,C.isEqualOrParent)(g,h.resource)),u.children))for(let g=0,d=u.children.length;g<d;g++){const m=S.create(r,p,u.children[g],h,n);h.addChild(m)}return h}static mergeLocalWithDisk(r,p){if(r.resource.toString()!==p.resource.toString())return;const u=r.isDirectory||p.isDirectory;if(!(u&&p._isDirectoryResolved&&!r._isDirectoryResolved)&&(p.resource=r.resource,p.isRoot||p.updateName(r.name),p._isDirectory=r.isDirectory,p._mtime=r.mtime,p._isDirectoryResolved=r._isDirectoryResolved,p._isSymbolicLink=r.isSymbolicLink,p.isError=r.isError,u&&r._isDirectoryResolved)){const a=new A.ResourceMap;p.children.forEach(n=>{a.set(n.resource,n)}),p.children.clear(),r.children.forEach(n=>{const h=a.get(n.resource);h?(S.mergeLocalWithDisk(n,h),p.addChild(h),a.delete(n.resource)):p.addChild(n)}),a.forEach(n=>{n instanceof s&&p.addChild(n)})}}addChild(r){r._parent=this,r.updateResource(!1),this.children.set(this.getPlatformAwareName(r.name),r)}getChild(r){return this.children.get(this.getPlatformAwareName(r))}fetchChildren(r){const p=this.configService.getValue({resource:this.root.resource}).explorer.experimental.fileNesting;return p.enabled&&this.nestedChildren?this.nestedChildren:(async()=>{if(!this._isDirectoryResolved){const a=r==="modified";this.isError=!1;try{const n=await this.fileService.resolve(this.resource,{resolveSingleChildDescendants:!0,resolveMetadata:a}),h=S.create(this.fileService,this.configService,n,this);S.mergeLocalWithDisk(h,this)}catch(n){throw this.isError=!0,n}this._isDirectoryResolved=!0}const u=[];if(p.enabled){const a=[],n=[];for(const g of this.children.entries())g[1].nestedParent=void 0,g[1].isDirectory?n.push(g):a.push(g);const h=this.fileNester.nest(a.map(([g])=>g),this.getPlatformAwareName(this.name));for(const[g,d]of a){const m=h.get(g);if(m!==void 0){d.nestedChildren=[];for(const b of m.keys()){const E=(0,c.assertIsDefined)(this.children.get(b));d.nestedChildren.push(E),E.nestedParent=d}u.push(d)}else d.nestedChildren=void 0}for(const[g,d]of n.values())u.push(d)}else this.children.forEach(a=>{u.push(a)});return u})()}get fileNester(){if(!this.root._fileNester){const r=this.configService.getValue({resource:this.root.resource}).explorer.experimental.fileNesting,p=Object.entries(r.patterns).filter(u=>typeof u[0]=="string"&&typeof u[1]=="string"&&u[0]&&u[1]).map(([u,a])=>[u.trim(),a.split(",").map(n=>this.getPlatformAwareName(n.trim().replace(/\u200b/g,"")))]);this.root._fileNester=new o.ExplorerFileNestingTrie(p)}return this.root._fileNester}removeChild(r){this.nestedChildren=void 0,this.children.delete(this.getPlatformAwareName(r.name))}forgetChildren(){this.children.clear(),this.nestedChildren=void 0,this._isDirectoryResolved=!1,this._fileNester=void 0}getPlatformAwareName(r){return this.fileService.hasCapability(this.resource,1024)?r:r.toLowerCase()}move(r){this.nestedParent&&this.nestedParent.removeChild(this),this._parent&&this._parent.removeChild(this),r.removeChild(this),r.addChild(this),this.updateResource(!0)}updateResource(r){this._parent&&(this.resource=(0,C.joinPath)(this._parent.resource,this.name)),r&&this.isDirectory&&this.children.forEach(p=>{p.updateResource(!0)})}rename(r){this.updateName(r.name),this._mtime=r.mtime,this.updateResource(!0)}find(r){const p=!this.fileService.hasCapability(r,1024);return r&&this.resource.scheme===r.scheme&&(0,k.equalsIgnoreCase)(this.resource.authority,r.authority)&&(p?(0,k.startsWithIgnoreCase)(r.path,this.resource.path):r.path.startsWith(this.resource.path))?this.findByPath((0,k.rtrim)(r.path,_.posix.sep),this.resource.path.length,p):null}findByPath(r,p,u){if((0,f.isEqual)((0,k.rtrim)(this.resource.path,_.posix.sep),r,u))return this;if(this.isDirectory){for(;p<r.length&&r[p]===_.posix.sep;)p++;let a=r.indexOf(_.posix.sep,p);a===-1&&(a=r.length);const n=r.substring(p,a),h=this.children.get(this.getPlatformAwareName(n));if(h)return h.findByPath(r,a,u)}return null}}Ee([w.memoize],S.prototype,"children",null),e.ExplorerItem=S;class s extends S{constructor(r,p,u,a){super(t.URI.file(""),r,p,u,a);this._isDirectoryResolved=!0}}e.NewExplorerItem=s}),define(ne[2151],re([1,0,11,18]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.revealResourcesInOS=void 0;function _(A,k,D){if(A.length)(0,t.sequence)(A.map(I=>async()=>{(I.scheme===f.Schemas.file||I.scheme===f.Schemas.vscodeUserData)&&k.showItemInFolder(I.fsPath)}));else if(D.getWorkspace().folders.length){const I=D.getWorkspace().folders[0].uri;I.scheme===f.Schemas.file&&k.showItemInFolder(I.fsPath)}}e.revealResourcesInOS=_}),define(ne[2152],re([1,0,10,30,2,39,58,539,563,1599,16,7,5,237,411]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintsAccessibility=void 0;let S=class kr{constructor(l,r,p,u){this._editor=l,this._audioCueService=p,this._instaService=u,this._sessionDispoosables=new _.DisposableStore,this._ariaElement=document.createElement("span"),this._ariaElement.style.position="fixed",this._ariaElement.className="inlayhint-accessibility-element",this._ariaElement.tabIndex=0,this._ariaElement.setAttribute("aria-description",(0,w.localize)(1,null)),this._ctxIsReading=kr.IsReading.bindTo(r)}static get(l){return l.getContribution(kr.ID)??void 0}dispose(){this._sessionDispoosables.dispose(),this._ctxIsReading.reset(),this._ariaElement.remove()}_reset(){t.clearNode(this._ariaElement),this._sessionDispoosables.clear(),this._ctxIsReading.reset()}async _read(l,r){if(this._sessionDispoosables.clear(),this._ariaElement.isConnected||this._editor.getDomNode()?.appendChild(this._ariaElement),!this._editor.hasModel()||!this._ariaElement.isConnected){this._ctxIsReading.set(!1);return}const p=new f.CancellationTokenSource;this._sessionDispoosables.add(p);for(let g of r)await g.resolve(p.token);if(p.token.isCancellationRequested)return;const u=this._editor.getModel(),a=[];let n=0,h=!1;for(const g of r){const d=u.getValueInRange({startLineNumber:l,startColumn:n+1,endLineNumber:l,endColumn:g.hint.position.column});if(d.length>0&&(a.push(d),n=g.hint.position.column-1),n>750){a.push("\u2026"),h=!0;break}const m=document.createElement("em"),{label:b}=g.hint;if(typeof b=="string")m.innerText=b;else for(let E of b)if(E.command){const y=this._instaService.createInstance(c.Link,m,{href:(0,D.asCommandLink)(E.command),label:E.label,title:E.command.title},void 0);this._sessionDispoosables.add(y)}else m.innerText+=E.label;a.push(m)}h||a.push(u.getValueInRange({startLineNumber:l,startColumn:n+1,endLineNumber:l,endColumn:Number.MAX_SAFE_INTEGER})),t.reset(this._ariaElement,...a),this._ariaElement.focus(),this._ctxIsReading.set(!0),this._sessionDispoosables.add(t.addDisposableListener(this._ariaElement,"focusout",()=>{this._reset()}))}startInlayHintsReading(){if(!this._editor.hasModel())return;const l=this._editor.getPosition().lineNumber,r=I.InlayHintsController.get(this._editor)?.getInlayHintsForLine(l);!r||r.length===0?this._audioCueService.playAudioCue(i.AudioCue.noInlayHints):this._read(l,r)}stopInlayHintsReading(){this._reset(),this._editor.focus()}};S.IsReading=new C.RawContextKey("isReadingLineWithInlayHints",!1,{type:"boolean",description:(0,w.localize)(0,null)}),S.ID="editor.contrib.InlayHintsAccessibility",S=Ee([W(1,C.IContextKeyService),W(2,i.IAudioCueService),W(3,o.IInstantiationService)],S),e.InlayHintsAccessibility=S,(0,v.registerAction2)(class extends A.EditorAction2{constructor(){super({id:"inlayHints.startReadingLineWithHint",title:(0,w.localize)(2,null),precondition:k.EditorContextKeys.hasInlayHintsProvider,f1:!0})}runEditorCommand(l,r){const p=S.get(r);p&&p.startInlayHintsReading()}}),(0,v.registerAction2)(class extends A.EditorAction2{constructor(){super({id:"inlayHints.stopReadingLineWithHint",title:(0,w.localize)(3,null),precondition:S.IsReading,f1:!0,keybinding:{weight:100,primary:9}})}runEditorCommand(l,r){const p=S.get(r);p&&p.stopInlayHintsReading()}}),(0,A.registerEditorContribution)(S.ID,S)}),define(ne[792],re([1,0,7]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INTERACTIVE_INPUT_CURSOR_BOUNDARY=void 0,e.INTERACTIVE_INPUT_CURSOR_BOUNDARY=new t.RawContextKey("interactiveInputCursorAtBoundary","none")}),define(ne[579],re([1,0,6,2,5]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InteractiveDocumentService=e.IInteractiveDocumentService=void 0,e.IInteractiveDocumentService=(0,_.createDecorator)("IInteractiveDocumentService");class A extends f.Disposable{constructor(){super();this._onWillAddInteractiveDocument=this._register(new t.Emitter),this.onWillAddInteractiveDocument=this._onWillAddInteractiveDocument.event,this._onWillRemoveInteractiveDocument=this._register(new t.Emitter),this.onWillRemoveInteractiveDocument=this._onWillRemoveInteractiveDocument.event}willCreateInteractiveDocument(D,I,w){this._onWillAddInteractiveDocument.fire({notebookUri:D,inputUri:I,languageId:w})}willRemoveInteractiveDocument(D,I){this._onWillRemoveInteractiveDocument.fire({notebookUri:D,inputUri:I})}}e.InteractiveDocumentService=A});var Ot=this&&this.__classPrivateFieldSet||function(Q,e,t,f,_){if(f==="m")throw new TypeError("Private method is not writable");if(f==="a"&&!_)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?Q!==e||!_:!e.has(Q))throw new TypeError("Cannot write private member to an object whose class did not declare it");return f==="a"?_.call(Q,t):_?_.value=t:e.set(Q,t),t},dt=this&&this.__classPrivateFieldGet||function(Q,e,t,f){if(t==="a"&&!f)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?Q!==e||!f:!e.has(Q))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?f:t==="a"?f.call(Q):f?f.value:e.get(Q)};define(ne[793],re([1,0,379,2,55,5]),function(Q,e,t,f,_,A){"use strict";var k;Object.defineProperty(e,"__esModule",{value:!0}),e.InteractiveHistoryService=e.IInteractiveHistoryService=void 0,e.IInteractiveHistoryService=(0,A.createDecorator)("IInteractiveHistoryService");class D extends f.Disposable{constructor(){super();k.set(this,void 0),Ot(this,k,new _.ResourceMap,"f")}addToHistory(w,v){if(!dt(this,k,"f").has(w)){dt(this,k,"f").set(w,new t.HistoryNavigator2([v],50));return}const C=dt(this,k,"f").get(w);C.resetCursor(),C?.current()!==v&&C?.add(v)}getPreviousValue(w){return dt(this,k,"f").get(w)?.previous()??null}getNextValue(w){return dt(this,k,"f").get(w)?.next()??null}replaceLast(w,v){if(dt(this,k,"f").has(w)){const C=dt(this,k,"f").get(w);C?.current()!==v&&C?.replaceLast(v)}else{dt(this,k,"f").set(w,new t.HistoryNavigator2([v],50));return}}clearHistory(w){dt(this,k,"f").delete(w)}has(w){return!!dt(this,k,"f").has(w)}}e.InteractiveHistoryService=D,k=new WeakMap}),define(ne[2153],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenIssueReporterApiCommandId=e.OpenIssueReporterActionId=void 0,e.OpenIssueReporterActionId="workbench.action.openIssueReporter",e.OpenIssueReporterApiCommandId="vscode.openIssueReporter"}),define(ne[580],re([1,0,1606,33,14,7,63]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LOCAL_HISTORY_ICON_RESTORE=e.LOCAL_HISTORY_ICON_ENTRY=e.LOCAL_HISTORY_MENU_CONTEXT_KEY=e.LOCAL_HISTORY_MENU_CONTEXT_VALUE=e.LOCAL_HISTORY_DATE_FORMATTER=void 0,e.LOCAL_HISTORY_DATE_FORMATTER=new Intl.DateTimeFormat(_.language,{year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric"}),e.LOCAL_HISTORY_MENU_CONTEXT_VALUE="localHistory:item",e.LOCAL_HISTORY_MENU_CONTEXT_KEY=A.ContextKeyExpr.equals("timelineItem",e.LOCAL_HISTORY_MENU_CONTEXT_VALUE),e.LOCAL_HISTORY_ICON_ENTRY=(0,k.registerIcon)("localHistory-icon",f.Codicon.circleOutline,(0,t.localize)(0,null)),e.LOCAL_HISTORY_ICON_RESTORE=(0,k.registerIcon)("localHistory-restore",f.Codicon.check,(0,t.localize)(1,null))}),define(ne[794],re([1,0,6,2,9,23,19,60]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LocalHistoryFileSystemProvider=void 0;class I{constructor(v){this.fileService=v,this.mapSchemeToProvider=new Map,this.onDidChangeCapabilities=t.Event.None,this.onDidChangeFile=t.Event.None}static toLocalHistoryFileSystem(v){const C={location:v.location.toString(!0),associatedResource:v.associatedResource.toString(!0)};return v.associatedResource.with({scheme:I.SCHEMA,query:JSON.stringify(C)})}static fromLocalHistoryFileSystem(v){const C=JSON.parse(v.query);return{location:_.URI.parse(C.location),associatedResource:_.URI.parse(C.associatedResource)}}get capabilities(){return 2|2048}async withProvider(v){const C=v.scheme;let o=this.mapSchemeToProvider.get(C);if(!o){const c=this.fileService.getProvider(C);c?o=Promise.resolve(c):o=new Promise(i=>{const S=this.fileService.onDidChangeFileSystemProviderRegistrations(s=>{s.added&&s.provider&&s.scheme===C&&(S.dispose(),i(s.provider))})}),this.mapSchemeToProvider.set(C,o)}return o}async stat(v){const C=I.fromLocalHistoryFileSystem(v).location;return(0,k.isEqual)(I.EMPTY_RESOURCE,C)?{type:A.FileType.File,ctime:0,mtime:0,size:0}:(await this.withProvider(C)).stat(C)}async readFile(v){const C=I.fromLocalHistoryFileSystem(v).location;if((0,k.isEqual)(I.EMPTY_RESOURCE,C))return D.VSBuffer.fromString("").buffer;const o=await this.withProvider(C);if((0,A.hasReadWriteCapability)(o))return o.readFile(C);throw new Error("Unsupported")}async writeFile(v,C,o){}async mkdir(v){}async readdir(v){return[]}async rename(v,C,o){}async delete(v,C){}watch(v,C){return f.Disposable.None}}e.LocalHistoryFileSystemProvider=I,I.SCHEMA="vscode-local-history",I.EMPTY_RESOURCE=_.URI.from({scheme:I.SCHEMA,path:"/empty"}),I.EMPTY={location:I.EMPTY_RESOURCE,associatedResource:I.EMPTY_RESOURCE}}),define(ne[2154],re([1,0,1612]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.minimumTranslatedStrings=void 0,e.minimumTranslatedStrings={showLanguagePackExtensions:(0,t.localize)(0,null),searchMarketplace:(0,t.localize)(1,null),installAndRestartMessage:(0,t.localize)(2,null),installAndRestart:(0,t.localize)(3,null)}}),define(ne[413],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.showWindowLogActionId=e.userDataSyncLogChannelId=e.telemetryLogChannelId=e.extHostLogChannelId=e.rendererLogChannelId=e.sharedLogChannelId=e.mainLogChannelId=void 0,e.mainLogChannelId="mainLog",e.sharedLogChannelId="sharedLog",e.rendererLogChannelId="rendererLog",e.extHostLogChannelId="extHostLog",e.telemetryLogChannelId="telemetryLog",e.userDataSyncLogChannelId="userDataSyncLog",e.showWindowLogActionId="workbench.action.showWindowLog"}),define(ne[581],re([1,0,10,652,378,18,308]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderMarkdownDocument=e.DEFAULT_MARKDOWN_STYLES=void 0,e.DEFAULT_MARKDOWN_STYLES=` body { padding: 10px 20px; line-height: 22px; max-width: 882px; margin: 0 auto; } body *:last-child { margin-bottom: 0; } img { max-width: 100%; max-height: 100%; } a { text-decoration: none; } a:hover { text-decoration: underline; } a:focus, input:focus, select:focus, textarea:focus { outline: 1px solid -webkit-focus-ring-color; outline-offset: -1px; } hr { border: 0; height: 2px; border-bottom: 2px solid; } h1 { padding-bottom: 0.3em; line-height: 1.2; border-bottom-width: 1px; border-bottom-style: solid; } h1, h2, h3 { font-weight: normal; } table { border-collapse: collapse; } table > thead > tr > th { text-align: left; border-bottom: 1px solid; } table > thead > tr > th, table > thead > tr > td, table > tbody > tr > th, table > tbody > tr > td { padding: 5px 10px; } table > tbody > tr + tr > td { border-top-width: 1px; border-top-style: solid; } blockquote { margin: 0 7px 0 5px; padding: 0 16px 0 10px; border-left-width: 5px; border-left-style: solid; } code { font-family: "SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace; } pre code { font-family: var(--vscode-editor-font-family); font-weight: var(--vscode-editor-font-weight); font-size: var(--vscode-editor-font-size); line-height: 1.5; } code > div { padding: 16px; border-radius: 3px; overflow: auto; } .monaco-tokenized-source { white-space: pre; } /** Theming */ .vscode-light code > div { background-color: rgba(220, 220, 220, 0.4); } .vscode-dark code > div { background-color: rgba(10, 10, 10, 0.4); } .vscode-high-contrast code > div { background-color: rgb(0, 0, 0); } .vscode-high-contrast h1 { border-color: rgb(0, 0, 0); } .vscode-light table > thead > tr > th { border-color: rgba(0, 0, 0, 0.69); } .vscode-dark table > thead > tr > th { border-color: rgba(255, 255, 255, 0.69); } .vscode-light h1, .vscode-light hr, .vscode-light table > tbody > tr + tr > td { border-color: rgba(0, 0, 0, 0.18); } .vscode-dark h1, .vscode-dark hr, .vscode-dark table > tbody > tr + tr > td { border-color: rgba(255, 255, 255, 0.18); } `;const D=[A.Schemas.http,A.Schemas.https,A.Schemas.command];function I(v,C){const o=(0,t.hookDomPurifyHrefAndSrcSanitizer)(D,!0);try{return f.sanitize(v,{ALLOWED_TAGS:["h1","h2","h3","h4","h5","h6","h7","h8","br","b","i","strong","em","a","pre","code","img","tt","div","ins","del","sup","sub","p","ol","ul","table","thead","tbody","tfoot","blockquote","dl","dt","dd","kbd","q","samp","var","hr","ruby","rt","rp","li","tr","td","th","s","strike","summary","details","caption","figure","figcaption","abbr","bdo","cite","dfn","mark","small","span","time","wbr","checkbox","checklist","vertically-centered"],ALLOWED_ATTR:["href","data-href","data-command","target","title","name","src","alt","class","id","role","tabindex","style","data-code","width","height","align","x-dispatch","required","checked","placeholder","when-checked","checked-on"],...C?{ALLOW_UNKNOWN_PROTOCOLS:!0}:{}})}finally{o.dispose()}}async function w(v,C,o,c=!0,i=!1){const S=(s,l,r)=>r?typeof l!="string"?(r(null,`<code>${s}</code>`),""):(C.whenInstalledExtensionsRegistered().then(async()=>{const p=o.getLanguageIdByLanguageName(l),u=await(0,k.tokenizeToString)(o,s,p);r(null,`<code>${u}</code>`)}),""):s;return new Promise((s,l)=>{(0,_.marked)(v,{highlight:S},(r,p)=>r?l(r):s(p))}).then(s=>c?I(s,i):s)}e.renderMarkdownDocument=w}),define(ne[320],re([1,0,7]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={MARKERS_CONTAINER_ID:"workbench.panel.markers",MARKERS_VIEW_ID:"workbench.panel.markers.view",MARKERS_VIEW_STORAGE_ID:"workbench.panel.markers",MARKER_COPY_ACTION_ID:"problems.action.copy",MARKER_COPY_MESSAGE_ACTION_ID:"problems.action.copyMessage",RELATED_INFORMATION_COPY_MESSAGE_ACTION_ID:"problems.action.copyRelatedInformationMessage",FOCUS_PROBLEMS_FROM_FILTER:"problems.action.focusProblemsFromFilter",MARKERS_VIEW_FOCUS_FILTER:"problems.action.focusFilter",MARKERS_VIEW_CLEAR_FILTER_TEXT:"problems.action.clearFilterText",MARKERS_VIEW_SHOW_MULTILINE_MESSAGE:"problems.action.showMultilineMessage",MARKERS_VIEW_SHOW_SINGLELINE_MESSAGE:"problems.action.showSinglelineMessage",MARKER_OPEN_ACTION_ID:"problems.action.open",MARKER_OPEN_SIDE_ACTION_ID:"problems.action.openToSide",MARKER_SHOW_PANEL_ID:"workbench.action.showErrorsWarnings",MARKER_SHOW_QUICK_FIX:"problems.action.showQuickFixes",TOGGLE_MARKERS_VIEW_ACTION_ID:"workbench.actions.view.toggleProblems",MarkersViewSmallLayoutContextKey:new t.RawContextKey("problemsView.smallLayout",!1),MarkersTreeVisibilityContextKey:new t.RawContextKey("problemsVisibility",!1),MarkerFocusContextKey:new t.RawContextKey("problemFocus",!1),MarkerViewFilterFocusContextKey:new t.RawContextKey("problemsFilterFocus",!1),RelatedInformationFocusContextKey:new t.RawContextKey("relatedInformationFocus",!1)}}),define(ne[795],re([1,0,102,152,29,19,55]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FilterOptions=e.ResourceGlobMatcher=void 0;class D{constructor(v,C,o){this.globalExpression=(0,f.parse)(v),this.expressionsByRoot=k.TernarySearchTree.forUris(c=>o.extUri.ignorePathCasing(c));for(const c of C)this.expressionsByRoot.set(c.root,{root:c.root,expression:(0,f.parse)(c.expression)})}matches(v){const C=this.expressionsByRoot.findSubstr(v);if(C){const o=(0,A.relativePath)(C.root,v);if(o&&!!C.expression(o))return!0}return!!this.globalExpression(v.path)}}e.ResourceGlobMatcher=D;class I{constructor(v,C,o,c,i,S){this.filter=v,this.showWarnings=!1,this.showErrors=!1,this.showInfos=!1,v=v.trim(),this.showWarnings=o,this.showErrors=c,this.showInfos=i;const s=Array.isArray(C)?C:[],l=Array.isArray(C)?(0,f.getEmptyExpression)():C;for(const{expression:u}of s)for(const a of Object.keys(u))a.endsWith("/**")||(u[`${_.rtrim(a,"/")}/**`]=u[a]);const r=v.startsWith("!");this.textFilter={text:(r?_.ltrim(v,"!"):v).trim(),negate:r};const p=(0,f.getEmptyExpression)();if(v){const u=(0,f.splitGlobAware)(v,",").map(a=>a.trim()).filter(a=>!!a.length);for(const a of u)if(a.startsWith("!")){const n=_.ltrim(a,"!");n&&this.setPattern(l,n)}else this.setPattern(p,a)}this.excludesMatcher=new D(l,s,S),this.includesMatcher=new D(p,[],S)}static EMPTY(v){return new I("",[],!1,!1,!1,v)}setPattern(v,C){C[0]==="."&&(C="*"+C),v[`**/${C}/**`]=!0,v[`**/${C}`]=!0}}e.FilterOptions=I,I._filter=t.matchesFuzzy2,I._messageFilter=t.matchesFuzzy}),define(ne[582],re([1,0,19,20,125,15,55,6,116,13,29]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkersModel=e.RelatedInformation=e.Marker=e.ResourceMarkers=e.compareMarkersByUri=void 0;function C(l,r){return t.extUri.compare(l.resource,r.resource)}e.compareMarkersByUri=C;function o(l,r){let[p]=l.markers,[u]=r.markers,a=0;return p&&u&&(a=_.MarkerSeverity.compare(p.marker.severity,u.marker.severity)),a===0&&(a=l.path.localeCompare(r.path)||l.name.localeCompare(r.name)),a}class c{constructor(r,p){this.id=r,this.resource=p,this._markersMap=new k.ResourceMap,this._total=0,this.path=this.resource.fsPath,this.name=(0,t.basename)(this.resource)}get markers(){return this._cachedMarkers||(this._cachedMarkers=(0,A.flatten)([...this._markersMap.values()]).sort(c._compareMarkers)),this._cachedMarkers}has(r){return this._markersMap.has(r)}set(r,p){this.delete(r),(0,A.isNonEmptyArray)(p)&&(this._markersMap.set(r,p),this._total+=p.length,this._cachedMarkers=void 0)}delete(r){let p=this._markersMap.get(r);p&&(this._total-=p.length,this._cachedMarkers=void 0,this._markersMap.delete(r))}get total(){return this._total}static _compareMarkers(r,p){return _.MarkerSeverity.compare(r.marker.severity,p.marker.severity)||t.extUri.compare(r.resource,p.resource)||f.Range.compareRangesUsingStarts(r.marker,p.marker)}}e.ResourceMarkers=c;class i{constructor(r,p,u=[]){this.id=r,this.marker=p,this.relatedInformation=u}get resource(){return this.marker.resource}get range(){return this.marker}get lines(){return this._lines||(this._lines=(0,v.splitLines)(this.marker.message)),this._lines}toString(){return JSON.stringify({...this.marker,resource:this.marker.resource.path,relatedInformation:this.relatedInformation.length?this.relatedInformation.map(r=>({...r.raw,resource:r.raw.resource.path})):void 0},null," ")}}e.Marker=i;class S{constructor(r,p,u){this.id=r,this.marker=p,this.raw=u}}e.RelatedInformation=S;class s{constructor(){this.cachedSortedResources=void 0,this._onDidChange=new D.Emitter,this.onDidChange=this._onDidChange.event,this._total=0,this.resourcesByUri=new Map}get resourceMarkers(){return this.cachedSortedResources||(this.cachedSortedResources=[...this.resourcesByUri.values()].sort(o)),this.cachedSortedResources}reset(){const r=new Set;for(const p of this.resourcesByUri.values())r.add(p);this.resourcesByUri.clear(),this._total=0,this._onDidChange.fire({removed:r,added:new Set,updated:new Set})}get total(){return this._total}getResourceMarkers(r){return(0,w.withUndefinedAsNull)(this.resourcesByUri.get(t.extUri.getComparisonKey(r,!0)))}setResourceMarkers(r){const p={added:new Set,removed:new Set,updated:new Set};for(const[u,a]of r){const n=t.extUri.getComparisonKey(u,!0);let h=this.resourcesByUri.get(n);if((0,A.isNonEmptyArray)(a)){if(h)p.updated.add(h);else{const m=this.id(u.toString());h=new c(m,u.with({fragment:null})),this.resourcesByUri.set(n,h),p.added.add(h)}const g=new Map,d=a.map(m=>{const b=_.IMarkerData.makeKey(m),E=g.get(b)||0;g.set(b,E+1);const y=this.id(h.id,b,E,m.resource.toString());let T;return m.relatedInformation&&(T=m.relatedInformation.map((R,O)=>new S(this.id(y,R.resource.toString(),R.startLineNumber,R.startColumn,R.endLineNumber,R.endColumn,O),m,R))),new i(y,m,T)});this._total-=h.total,h.set(u,d),this._total+=h.total}else h&&(this._total-=h.total,h.delete(u),this._total+=h.total,h.total===0?(this.resourcesByUri.delete(n),p.removed.add(h)):p.updated.add(h))}this.cachedSortedResources=void 0,(p.added.size||p.removed.size||p.updated.size)&&this._onDidChange.fire(p)}id(...r){const p=new I.Hasher;for(const u of r)p.hash(u);return`${p.value}`}dispose(){this._onDidChange.dispose(),this.resourcesByUri.clear()}}e.MarkersModel=s}),define(ne[487],re([1,0,1622,19,125]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class A{}e.default=A,A.MARKERS_PANEL_TOGGLE_LABEL=t.localize(0,null),A.MARKERS_PANEL_SHOW_LABEL=t.localize(1,null),A.PROBLEMS_PANEL_CONFIGURATION_TITLE=t.localize(2,null),A.PROBLEMS_PANEL_CONFIGURATION_AUTO_REVEAL=t.localize(3,null),A.PROBLEMS_PANEL_CONFIGURATION_SHOW_CURRENT_STATUS=t.localize(4,null),A.PROBLEMS_PANEL_CONFIGURATION_COMPARE_ORDER=t.localize(5,null),A.PROBLEMS_PANEL_CONFIGURATION_COMPARE_ORDER_SEVERITY=t.localize(6,null),A.PROBLEMS_PANEL_CONFIGURATION_COMPARE_ORDER_POSITION=t.localize(7,null),A.MARKERS_PANEL_TITLE_PROBLEMS=t.localize(8,null),A.MARKERS_PANEL_NO_PROBLEMS_BUILT=t.localize(9,null),A.MARKERS_PANEL_NO_PROBLEMS_ACTIVE_FILE_BUILT=t.localize(10,null),A.MARKERS_PANEL_NO_PROBLEMS_FILTERS=t.localize(11,null),A.MARKERS_PANEL_ACTION_TOOLTIP_MORE_FILTERS=t.localize(12,null),A.MARKERS_PANEL_FILTER_LABEL_SHOW_ERRORS=t.localize(13,null),A.MARKERS_PANEL_FILTER_LABEL_SHOW_WARNINGS=t.localize(14,null),A.MARKERS_PANEL_FILTER_LABEL_SHOW_INFOS=t.localize(15,null),A.MARKERS_PANEL_FILTER_LABEL_EXCLUDED_FILES=t.localize(16,null),A.MARKERS_PANEL_FILTER_LABEL_ACTIVE_FILE=t.localize(17,null),A.MARKERS_PANEL_ACTION_TOOLTIP_FILTER=t.localize(18,null),A.MARKERS_PANEL_ACTION_TOOLTIP_QUICKFIX=t.localize(19,null),A.MARKERS_PANEL_FILTER_ARIA_LABEL=t.localize(20,null),A.MARKERS_PANEL_FILTER_PLACEHOLDER=t.localize(21,null),A.MARKERS_PANEL_FILTER_ERRORS=t.localize(22,null),A.MARKERS_PANEL_FILTER_WARNINGS=t.localize(23,null),A.MARKERS_PANEL_FILTER_INFOS=t.localize(24,null),A.MARKERS_PANEL_SINGLE_ERROR_LABEL=t.localize(25,null),A.MARKERS_PANEL_MULTIPLE_ERRORS_LABEL=k=>t.localize(26,null,""+k),A.MARKERS_PANEL_SINGLE_WARNING_LABEL=t.localize(27,null),A.MARKERS_PANEL_MULTIPLE_WARNINGS_LABEL=k=>t.localize(28,null,""+k),A.MARKERS_PANEL_SINGLE_INFO_LABEL=t.localize(29,null),A.MARKERS_PANEL_MULTIPLE_INFOS_LABEL=k=>t.localize(30,null,""+k),A.MARKERS_PANEL_SINGLE_UNKNOWN_LABEL=t.localize(31,null),A.MARKERS_PANEL_MULTIPLE_UNKNOWNS_LABEL=k=>t.localize(32,null,""+k),A.MARKERS_PANEL_AT_LINE_COL_NUMBER=(k,D)=>t.localize(33,null,""+k,""+D),A.MARKERS_TREE_ARIA_LABEL_RESOURCE=(k,D,I)=>t.localize(34,null,k,D,I),A.MARKERS_TREE_ARIA_LABEL_MARKER=k=>{const D=k.relatedInformation.length?t.localize(35,null,k.relatedInformation.length):"";switch(k.marker.severity){case _.MarkerSeverity.Error:return k.marker.source?t.localize(36,null,k.marker.source,k.marker.message,k.marker.startLineNumber,k.marker.startColumn,D):t.localize(37,null,k.marker.message,k.marker.startLineNumber,k.marker.startColumn,D);case _.MarkerSeverity.Warning:return k.marker.source?t.localize(38,null,k.marker.source,k.marker.message,k.marker.startLineNumber,k.marker.startColumn,D):t.localize(39,null,k.marker.message,k.marker.startLineNumber,k.marker.startColumn,D,D);case _.MarkerSeverity.Info:return k.marker.source?t.localize(40,null,k.marker.source,k.marker.message,k.marker.startLineNumber,k.marker.startColumn,D):t.localize(41,null,k.marker.message,k.marker.startLineNumber,k.marker.startColumn,D);default:return k.marker.source?t.localize(42,null,k.marker.source,k.marker.message,k.marker.startLineNumber,k.marker.startColumn,D):t.localize(43,null,k.marker.message,k.marker.startLineNumber,k.marker.startColumn,D)}},A.MARKERS_TREE_ARIA_LABEL_RELATED_INFORMATION=k=>t.localize(44,null,k.message,k.startLineNumber,k.startColumn,(0,f.basename)(k.resource)),A.SHOW_ERRORS_WARNINGS_ACTION_LABEL=t.localize(45,null)}),define(ne[796],re([1,0,11,10,36,37,487,320,12,68,2,78,32,1621,5,236,7,6,33,134,262,63,38,348]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickFixActionViewItem=e.QuickFixAction=e.MarkersFilterActionViewItem=e.MarkersFilters=void 0;class g extends v.Disposable{constructor(R){super();this._onDidChange=this._register(new l.Emitter),this.onDidChange=this._onDidChange.event,this._showWarnings=!0,this._showErrors=!0,this._showInfos=!0,this._layout=new f.Dimension(0,0),this._filterText=R.filterText,this._showErrors=R.showErrors,this._showWarnings=R.showWarnings,this._showInfos=R.showInfos,this._excludedFiles=R.excludedFiles,this._activeFile=R.activeFile,this.filterHistory=R.filterHistory,this._layout=R.layout}get filterText(){return this._filterText}set filterText(R){this._filterText!==R&&(this._filterText=R,this._onDidChange.fire({filterText:!0}))}get excludedFiles(){return this._excludedFiles}set excludedFiles(R){this._excludedFiles!==R&&(this._excludedFiles=R,this._onDidChange.fire({excludedFiles:!0}))}get activeFile(){return this._activeFile}set activeFile(R){this._activeFile!==R&&(this._activeFile=R,this._onDidChange.fire({activeFile:!0}))}get showWarnings(){return this._showWarnings}set showWarnings(R){this._showWarnings!==R&&(this._showWarnings=R,this._onDidChange.fire({showWarnings:!0}))}get showErrors(){return this._showErrors}set showErrors(R){this._showErrors!==R&&(this._showErrors=R,this._onDidChange.fire({showErrors:!0}))}get showInfos(){return this._showInfos}set showInfos(R){this._showInfos!==R&&(this._showInfos=R,this._onDidChange.fire({showInfos:!0}))}get layout(){return this._layout}set layout(R){(this._layout.width!==R.width||this._layout.height!==R.height)&&(this._layout=R,this._onDidChange.fire({layout:!0}))}}e.MarkersFilters=g;let d=class extends u.DropdownMenuActionViewItem{constructor(R,O,x,F){super(R,{getActions:()=>this.getActions()},F,{actionRunner:x,classNames:R.class,anchorAlignmentProvider:()=>1,menuAsChild:!0});this.filters=O}render(R){super.render(R),this.updateChecked()}getActions(){return[{checked:this.filters.showErrors,class:void 0,enabled:!0,id:"showErrors",label:k.default.MARKERS_PANEL_FILTER_LABEL_SHOW_ERRORS,run:async()=>this.filters.showErrors=!this.filters.showErrors,tooltip:"",dispose:()=>null},{checked:this.filters.showWarnings,class:void 0,enabled:!0,id:"showWarnings",label:k.default.MARKERS_PANEL_FILTER_LABEL_SHOW_WARNINGS,run:async()=>this.filters.showWarnings=!this.filters.showWarnings,tooltip:"",dispose:()=>null},{checked:this.filters.showInfos,class:void 0,enabled:!0,id:"showInfos",label:k.default.MARKERS_PANEL_FILTER_LABEL_SHOW_INFOS,run:async()=>this.filters.showInfos=!this.filters.showInfos,tooltip:"",dispose:()=>null},new _.Separator,{checked:this.filters.activeFile,class:void 0,enabled:!0,id:"activeFile",label:k.default.MARKERS_PANEL_FILTER_LABEL_ACTIVE_FILE,run:async()=>this.filters.activeFile=!this.filters.activeFile,tooltip:"",dispose:()=>null},{checked:this.filters.excludedFiles,class:void 0,enabled:!0,id:"useFilesExclude",label:k.default.MARKERS_PANEL_FILTER_LABEL_EXCLUDED_FILES,run:async()=>this.filters.excludedFiles=!this.filters.excludedFiles,tooltip:"",dispose:()=>null}]}updateChecked(){this.element.classList.toggle("checked",this._action.checked)}};d=Ee([W(3,A.IContextMenuService)],d);const m=(0,a.registerIcon)("markers-view-filter",r.Codicon.filter,(0,c.localize)(0,null));let b=class extends p.BaseActionViewItem{constructor(R,O,x,F,L,M,N){super(null,R);this.markersView=O,this.instantiationService=x,this.contextViewService=F,this.themeService=L,this.container=null,this.filterInputBox=null,this.filterBadge=null,this.actionbar=null,this.keybindingService=N,this.focusContextKey=D.default.MarkerViewFilterFocusContextKey.bindTo(M),this.delayedFilterUpdate=new t.Delayer(400),this._register((0,v.toDisposable)(()=>this.delayedFilterUpdate.cancel())),this._register(O.onDidFocusFilter(()=>this.focus())),this._register(O.onDidClearFilterText(()=>this.clearFilterText())),this.filtersAction=new _.Action("markersFiltersAction",k.default.MARKERS_PANEL_ACTION_TOOLTIP_MORE_FILTERS,"markers-filters "+I.ThemeIcon.asClassName(m)),this.filtersAction.checked=this.hasFiltersChanged(),this._register(O.filters.onDidChange(B=>this.onDidFiltersChange(B)))}render(R){this.container=R,this.container.classList.add("markers-panel-action-filter-container"),this.element=f.append(this.container,f.$("")),this.element.className=this.class,this.createInput(this.element),this.createControls(this.element),this.updateClass(),this.adjustInputBox()}focus(){this.filterInputBox&&this.filterInputBox.focus()}blur(){this.filterInputBox&&this.filterInputBox.blur()}setFocusable(){}get trapsArrowNavigation(){return!0}clearFilterText(){this.filterInputBox&&(this.filterInputBox.value="")}onDidFiltersChange(R){this.filtersAction.checked=this.hasFiltersChanged(),R.layout&&this.updateClass()}hasFiltersChanged(){return!this.markersView.filters.showErrors||!this.markersView.filters.showWarnings||!this.markersView.filters.showInfos||this.markersView.filters.excludedFiles||this.markersView.filters.activeFile}createInput(R){this.filterInputBox=this._register(this.instantiationService.createInstance(S.ContextScopedHistoryInputBox,R,this.contextViewService,{placeholder:k.default.MARKERS_PANEL_FILTER_PLACEHOLDER,ariaLabel:k.default.MARKERS_PANEL_FILTER_ARIA_LABEL,history:this.markersView.filters.filterHistory,showHistoryHint:()=>(0,h.showHistoryKeybindingHint)(this.keybindingService)})),this._register((0,w.attachInputBoxStyler)(this.filterInputBox,this.themeService)),this.filterInputBox.value=this.markersView.filters.filterText,this._register(this.filterInputBox.onDidChange(x=>this.delayedFilterUpdate.trigger(()=>this.onDidInputChange(this.filterInputBox)))),this._register(this.markersView.filters.onDidChange(x=>{x.filterText&&(this.filterInputBox.value=this.markersView.filters.filterText)})),this._register(f.addStandardDisposableListener(this.filterInputBox.inputElement,f.EventType.KEY_DOWN,x=>this.onInputKeyDown(x,this.filterInputBox))),this._register(f.addStandardDisposableListener(R,f.EventType.KEY_DOWN,this.handleKeyboardEvent)),this._register(f.addStandardDisposableListener(R,f.EventType.KEY_UP,this.handleKeyboardEvent)),this._register(f.addStandardDisposableListener(this.filterInputBox.inputElement,f.EventType.CLICK,x=>{x.stopPropagation(),x.preventDefault()}));const O=this._register(f.trackFocus(this.filterInputBox.inputElement));this._register(O.onDidFocus(()=>this.focusContextKey.set(!0))),this._register(O.onDidBlur(()=>this.focusContextKey.set(!1))),this._register((0,v.toDisposable)(()=>this.focusContextKey.reset()))}createControls(R){const O=f.append(R,f.$(".markers-panel-filter-controls"));this.createBadge(O),this.createFilters(O)}createBadge(R){const O=this.filterBadge=f.append(R,f.$(".markers-panel-filter-badge"));this._register((0,w.attachStylerCallback)(this.themeService,{badgeBackground:o.badgeBackground,badgeForeground:o.badgeForeground,contrastBorder:o.contrastBorder},x=>{const F=x.badgeBackground?x.badgeBackground.toString():"",L=x.badgeForeground?x.badgeForeground.toString():"",M=x.contrastBorder?x.contrastBorder.toString():"";O.style.backgroundColor=F,O.style.borderWidth=M?"1px":"",O.style.borderStyle=M?"solid":"",O.style.borderColor=M,O.style.color=L})),this.updateBadge(),this._register(this.markersView.onDidChangeFilterStats(()=>this.updateBadge()))}createFilters(R){this.actionbar=this._register(new C.ActionBar(R,{actionViewItemProvider:O=>{if(O.id===this.filtersAction.id)return this.instantiationService.createInstance(d,O,this.markersView.filters,this.actionRunner)}})),this.actionbar.push(this.filtersAction,{icon:!0,label:!1})}onDidInputChange(R){R.addToHistory(),this.markersView.filters.filterText=R.value,this.markersView.filters.filterHistory=R.getHistory()}updateBadge(){if(this.filterBadge){const{total:R,filtered:O}=this.markersView.getFilterStats();this.filterBadge.classList.toggle("hidden",R===O||R===0),this.filterBadge.textContent=(0,c.localize)(1,null,O,R),this.adjustInputBox()}}adjustInputBox(){this.element&&this.filterInputBox&&this.filterBadge&&(this.filterInputBox.inputElement.style.paddingRight=this.element.classList.contains("small")||this.filterBadge.classList.contains("hidden")?"25px":"150px")}handleKeyboardEvent(R){(R.equals(10)||R.equals(15)||R.equals(17))&&R.stopPropagation()}onInputKeyDown(R,O){let x=!1;R.equals(2)&&(this.actionbar?.focus(),x=!0),x&&(R.stopPropagation(),R.preventDefault())}updateClass(){this.element&&this.container&&(this.element.className=this.class,this.container.classList.toggle("grow",this.element.classList.contains("grow")),this.adjustInputBox())}get class(){return this.markersView.filters.layout.width>600?"markers-panel-action-filter grow":this.markersView.filters.layout.width<400?"markers-panel-action-filter small":"markers-panel-action-filter"}};b=Ee([W(2,i.IInstantiationService),W(3,A.IContextViewService),W(4,I.IThemeService),W(5,s.IContextKeyService),W(6,n.IKeybindingService)],b),e.MarkersFilterActionViewItem=b;class E extends _.Action{constructor(R){super(E.ID,k.default.MARKERS_PANEL_ACTION_TOOLTIP_QUICKFIX,E.CLASS,!1);this.marker=R,this._onShowQuickFixes=this._register(new l.Emitter),this.onShowQuickFixes=this._onShowQuickFixes.event,this._quickFixes=[]}get quickFixes(){return this._quickFixes}set quickFixes(R){this._quickFixes=R,this.enabled=this._quickFixes.length>0}autoFixable(R){this.class=R?E.AUTO_FIX_CLASS:E.CLASS}run(){return this._onShowQuickFixes.fire(),Promise.resolve()}}e.QuickFixAction=E,E.ID="workbench.actions.problems.quickfix",E.CLASS="markers-panel-action-quickfix "+r.Codicon.lightBulb.classNames,E.AUTO_FIX_CLASS=E.CLASS+" autofixable";let y=class extends p.ActionViewItem{constructor(R,O){super(null,R,{icon:!0,label:!1});this.contextMenuService=O}onClick(R){f.EventHelper.stop(R,!0),this.showQuickFixes()}showQuickFixes(){if(!this.element||!this.isEnabled())return;const R=f.getDomNodePagePosition(this.element),O=this.getAction().quickFixes;O.length&&this.contextMenuService.showContextMenu({getAnchor:()=>({x:R.left+10,y:R.top+R.height+4}),getActions:()=>O})}};y=Ee([W(1,A.IContextMenuService)],y),e.QuickFixActionViewItem=y,(0,I.registerThemingParticipant)((T,R)=>{const O=T.getColor(o.inputActiveOptionBorder);O&&R.addRule(`.markers-panel-action-filter > .markers-panel-filter-controls > .monaco-action-bar .action-label.markers-filters.checked { border-color: ${O}; }`);const x=T.getColor(o.inputActiveOptionForeground);x&&R.addRule(`.markers-panel-action-filter > .markers-panel-filter-controls > .monaco-action-bar .action-label.markers-filters.checked { color: ${x}; }`);const F=T.getColor(o.inputActiveOptionBackground);F&&R.addRule(`.markers-panel-action-filter > .markers-panel-filter-controls > .monaco-action-bar .action-label.markers-filters.checked { background-color: ${F}; }`)})}),define(ne[2155],re([1,0,2,6]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookFindFilters=void 0;class _ extends t.Disposable{constructor(k,D,I,w){super();this._onDidChange=this._register(new f.Emitter),this.onDidChange=this._onDidChange.event,this._markupInput=!0,this._markupPreview=!0,this._codeInput=!0,this._codeOutput=!0,this._markupInput=k,this._markupPreview=D,this._codeInput=I,this._codeOutput=w}get markupInput(){return this._markupInput}set markupInput(k){this._markupInput!==k&&(this._markupInput=k,this._onDidChange.fire({markupInput:k}))}get markupPreview(){return this._markupPreview}set markupPreview(k){this._markupPreview!==k&&(this._markupPreview=k,this._onDidChange.fire({markupPreview:k}))}get codeInput(){return this._codeInput}set codeInput(k){this._codeInput!==k&&(this._codeInput=k,this._onDidChange.fire({codeInput:k}))}get codeOutput(){return this._codeOutput}set codeOutput(k){this._codeOutput!==k&&(this._codeOutput=k,this._onDidChange.fire({codeOutput:k}))}update(k){this._markupInput=k.markupInput,this._markupPreview=k.markupPreview,this._codeInput=k.codeInput,this._codeOutput=k.codeOutput}}e.NotebookFindFilters=_}),define(ne[2156],re([1,0,10,719,280,138,11,315,476,1629,236,7,37,32,63,68,12,707,33,8,36,5,16,73,262,78,319,2155,1099]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleFindReplaceWidget=e.findFilterButton=void 0;const E=w.localize(0,null),y=w.localize(1,null),T=w.localize(2,null),R=w.localize(3,null),O=w.localize(4,null),x=w.localize(5,null),F=w.localize(6,null),L=w.localize(7,null),M=w.localize(8,null),N=w.localize(9,null);e.findFilterButton=(0,i.registerIcon)("find-filter",r.Codicon.filter,w.localize(10,null));const B=w.localize(11,null),P=w.localize(12,null),V=w.localize(13,null),z=w.localize(14,null),U=w.localize(15,null);let H=class extends g.DropdownMenuActionViewItem{constructor(Z,j,X,Y){super(j,{getActions:()=>this.getActions()},Y,{actionRunner:X,classNames:j.class,anchorAlignmentProvider:()=>1});this.filters=Z}render(Z){super.render(Z),this.updateChecked()}getActions(){return[{checked:this.filters.markupInput,class:void 0,enabled:!this.filters.markupPreview,id:"findInMarkdownInput",label:P,run:async()=>{this.filters.markupInput=!this.filters.markupInput},tooltip:"",dispose:()=>null},{checked:this.filters.markupPreview,class:void 0,enabled:!0,id:"findInMarkdownInput",label:V,run:async()=>{this.filters.markupPreview=!this.filters.markupPreview},tooltip:"",dispose:()=>null},new u.Separator,{checked:this.filters.codeInput,class:void 0,enabled:!0,id:"findInCodeInput",label:z,run:async()=>{this.filters.codeInput=!this.filters.codeInput},tooltip:"",dispose:()=>null},{checked:this.filters.codeOutput,class:void 0,enabled:!0,id:"findInCodeOutput",label:U,run:async()=>{this.filters.codeOutput=!this.filters.codeOutput},tooltip:"",dispose:()=>null}]}updateChecked(){this.element.classList.toggle("checked",this._action.checked)}};H=Ee([W(3,o.IContextMenuService)],H);class K extends f.FindInput{constructor(Z,j,X,Y,$,J,ee,te){super($,J,ee,te);this.filters=Z,this.contextMenuService=X,this.instantiationService=Y,this._actionbar=null,this._filterChecked=!1,this._register((0,v.createAndBindHistoryNavigationWidgetScopedContextKeyService)(j,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService),this._filtersAction=new u.Action("notebookFindFilterAction",B,"notebook-filters "+s.ThemeIcon.asClassName(m.filterIcon)),this._filtersAction.checked=!1,this._filterButtonContainer=t.$(".find-filter-button"),this.controls.appendChild(this._filterButtonContainer),this.createFilters(this._filterButtonContainer),this._register(this.filters.onDidChange(()=>{this.filters.codeInput!==!0||this.filters.codeOutput!==!1||this.filters.markupInput!==!0||this.filters.markupPreview!==!1?this._filtersAction.checked=!0:this._filtersAction.checked=!1})),this.inputBox.paddingRight=this.caseSensitive.width()+this.wholeWords.width()+this.regex.width()+this.getFilterWidth()}getFilterWidth(){return 2+2+2+16}createFilters(Z){this._actionbar=this._register(new d.ActionBar(Z,{actionViewItemProvider:j=>{if(j.id===this._filtersAction.id)return this.instantiationService.createInstance(H,this.filters,j,new u.ActionRunner)}})),this._actionbar.push(this._filtersAction,{icon:!0,label:!1})}setEnabled(Z){super.setEnabled(Z),Z&&!this._filterChecked?this.regex.enable():this.regex.disable()}updateFilterState(Z){this._filterChecked=Z,this._filterChecked?(this.regex.disable(),this.regex.domNode.tabIndex=-1,this.regex.domNode.classList.toggle("disabled",!0)):(this.regex.enable(),this.regex.domNode.tabIndex=0,this.regex.domNode.classList.toggle("disabled",!1)),this.applyStyles()}applyStyles(){super.applyStyles(),this._filterButtonContainer.style.borderColor=this._filterChecked&&this.inputActiveOptionBorder?this.inputActiveOptionBorder.toString():"",this._filterButtonContainer.style.color=this._filterChecked&&this.inputActiveOptionForeground?this.inputActiveOptionForeground.toString():"inherit",this._filterButtonContainer.style.backgroundColor=this._filterChecked&&this.inputActiveOptionBackground?this.inputActiveOptionBackground.toString():""}getCellToolbarActions(Z){const Y={primary:[],secondary:[]};return(0,h.createAndFillInActionBarActions)(Z,{shouldForwardArgs:!0},Y,$=>/^inline/.test($)),Y}}let G=class extends A.Widget{constructor(Z,j,X,Y,$,J,ee,te=new D.FindReplaceState){super();this._contextViewService=Z,this._themeService=X,this._configurationService=Y,this.menuService=$,this.contextMenuService=J,this.instantiationService=ee,this._state=te,this._isVisible=!1,this._isReplaceVisible=!1,this.foundMatch=!1,this._filters=new b.NotebookFindFilters(!0,!1,!0,!1),this._state.change({filters:this._filters},!1),this._filters.onDidChange(()=>{this._state.change({filters:this._filters},!1)}),this._domNode=document.createElement("div"),this._domNode.classList.add("simple-fr-find-part-wrapper"),this._register(this._state.onFindReplaceStateChange(ce=>this._onStateChanged(ce))),this._scopedContextKeyService=j.createScoped(this._domNode);let se=t.$(".find-replace-progress");this._progressBar=new _.ProgressBar(se),this._register((0,S.attachProgressBarStyler)(this._progressBar,this._themeService)),this._domNode.appendChild(se),this._toggleReplaceBtn=this._register(new I.SimpleButton({label:x,className:"codicon toggle left",onTrigger:()=>{this._isReplaceVisible=!this._isReplaceVisible,this._state.change({isReplaceRevealed:this._isReplaceVisible},!1),this._isReplaceVisible?this._innerReplaceDomNode.style.display="flex":this._innerReplaceDomNode.style.display="none"}})),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._innerFindDomNode=document.createElement("div"),this._innerFindDomNode.classList.add("simple-fr-find-part"),this._findInput=this._register(new K(this._filters,this._scopedContextKeyService,this.contextMenuService,this.instantiationService,null,this._contextViewService,!0,{label:E,placeholder:y,validation:ce=>{if(ce.length===0||!this._findInput.getRegex())return null;try{return new RegExp(ce),null}catch(le){return this.foundMatch=!1,this.updateButtons(this.foundMatch),{content:le.message}}}})),this._updateHistoryDelayer=new k.Delayer(500),this.oninput(this._findInput.domNode,ce=>{this.foundMatch=this.onInputChanged(),this.updateButtons(this.foundMatch),this._delayedUpdateHistory()}),this._register(this._findInput.inputBox.onDidChange(()=>{this._state.change({searchString:this._findInput.getValue()},!0)})),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._state.onFindReplaceStateChange(()=>{this._findInput.setRegex(this._state.isRegex),this._findInput.setWholeWords(this._state.wholeWord),this._findInput.setCaseSensitive(this._state.matchCase),this._replaceInput.setPreserveCase(this._state.preserveCase),this.findFirst()})),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this.prevBtn=this._register(new I.SimpleButton({label:T,icon:I.findPreviousMatchIcon,onTrigger:()=>{this.find(!0)}})),this.nextBtn=this._register(new I.SimpleButton({label:R,icon:I.findNextMatchIcon,onTrigger:()=>{this.find(!1)}}));const ie=this._register(new I.SimpleButton({label:O,icon:i.widgetClose,onTrigger:()=>{this.hide()}}));this._innerFindDomNode.appendChild(this._findInput.domNode),this._innerFindDomNode.appendChild(this._matchesCount),this._innerFindDomNode.appendChild(this.prevBtn.domNode),this._innerFindDomNode.appendChild(this.nextBtn.domNode),this._innerFindDomNode.appendChild(ie.domNode),this._domNode.appendChild(this._innerFindDomNode),this.onkeyup(this._innerFindDomNode,ce=>{if(ce.equals(9)){this.hide(),ce.preventDefault();return}}),this._focusTracker=this._register(t.trackFocus(this._innerFindDomNode)),this._register(this._focusTracker.onDidFocus(this.onFocusTrackerFocus.bind(this))),this._register(this._focusTracker.onDidBlur(this.onFocusTrackerBlur.bind(this))),this._findInputFocusTracker=this._register(t.trackFocus(this._findInput.domNode)),this._register(this._findInputFocusTracker.onDidFocus(this.onFindInputFocusTrackerFocus.bind(this))),this._register(this._findInputFocusTracker.onDidBlur(this.onFindInputFocusTrackerBlur.bind(this))),this._register(t.addDisposableListener(this._innerFindDomNode,"click",ce=>{ce.stopPropagation()})),this._innerReplaceDomNode=document.createElement("div"),this._innerReplaceDomNode.classList.add("simple-fr-replace-part"),this._replaceInput=this._register(new v.ContextScopedReplaceInput(null,void 0,{label:F,placeholder:L,history:[]},j,!1)),this._innerReplaceDomNode.appendChild(this._replaceInput.domNode),this._replaceInputFocusTracker=this._register(t.trackFocus(this._replaceInput.domNode)),this._register(this._replaceInputFocusTracker.onDidFocus(this.onReplaceInputFocusTrackerFocus.bind(this))),this._register(this._replaceInputFocusTracker.onDidBlur(this.onReplaceInputFocusTrackerBlur.bind(this))),this._domNode.appendChild(this._innerReplaceDomNode),this._isReplaceVisible?this._innerReplaceDomNode.style.display="flex":this._innerReplaceDomNode.style.display="none",this._replaceBtn=this._register(new I.SimpleButton({label:M,icon:I.findReplaceIcon,onTrigger:()=>{this.replaceOne()}})),this._replaceAllBtn=this._register(new I.SimpleButton({label:N,icon:I.findReplaceAllIcon,onTrigger:()=>{this.replaceAll()}})),this._innerReplaceDomNode.appendChild(this._replaceBtn.domNode),this._innerReplaceDomNode.appendChild(this._replaceAllBtn.domNode)}getCellToolbarActions(Z){const Y={primary:[],secondary:[]};return(0,h.createAndFillInActionBarActions)(Z,{shouldForwardArgs:!0},Y,$=>/^inline/.test($)),Y}get inputValue(){return this._findInput.getValue()}get replaceValue(){return this._replaceInput.getValue()}get replacePattern(){return this._state.isRegex?(0,l.parseReplaceString)(this.replaceValue):l.ReplacePattern.fromStaticValue(this.replaceValue)}get focusTracker(){return this._focusTracker}updateTheme(Z){const j={inputActiveOptionBorder:Z.getColor(c.inputActiveOptionBorder),inputActiveOptionForeground:Z.getColor(c.inputActiveOptionForeground),inputActiveOptionBackground:Z.getColor(c.inputActiveOptionBackground),inputBackground:Z.getColor(c.inputBackground),inputForeground:Z.getColor(c.inputForeground),inputBorder:Z.getColor(c.inputBorder),inputValidationInfoBackground:Z.getColor(c.inputValidationInfoBackground),inputValidationInfoForeground:Z.getColor(c.inputValidationInfoForeground),inputValidationInfoBorder:Z.getColor(c.inputValidationInfoBorder),inputValidationWarningBackground:Z.getColor(c.inputValidationWarningBackground),inputValidationWarningForeground:Z.getColor(c.inputValidationWarningForeground),inputValidationWarningBorder:Z.getColor(c.inputValidationWarningBorder),inputValidationErrorBackground:Z.getColor(c.inputValidationErrorBackground),inputValidationErrorForeground:Z.getColor(c.inputValidationErrorForeground),inputValidationErrorBorder:Z.getColor(c.inputValidationErrorBorder)};this._findInput.style(j);const X={inputActiveOptionBorder:Z.getColor(c.inputActiveOptionBorder),inputActiveOptionForeground:Z.getColor(c.inputActiveOptionForeground),inputActiveOptionBackground:Z.getColor(c.inputActiveOptionBackground),inputBackground:Z.getColor(c.inputBackground),inputForeground:Z.getColor(c.inputForeground),inputBorder:Z.getColor(c.inputBorder),inputValidationInfoBackground:Z.getColor(c.inputValidationInfoBackground),inputValidationInfoForeground:Z.getColor(c.inputValidationInfoForeground),inputValidationInfoBorder:Z.getColor(c.inputValidationInfoBorder),inputValidationWarningBackground:Z.getColor(c.inputValidationWarningBackground),inputValidationWarningForeground:Z.getColor(c.inputValidationWarningForeground),inputValidationWarningBorder:Z.getColor(c.inputValidationWarningBorder),inputValidationErrorBackground:Z.getColor(c.inputValidationErrorBackground),inputValidationErrorForeground:Z.getColor(c.inputValidationErrorForeground),inputValidationErrorBorder:Z.getColor(c.inputValidationErrorBorder)};this._replaceInput.style(X)}_onStateChanged(Z){this._updateButtons(),this._updateMatchesCount()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible);let Z=this._state.searchString.length>0;this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&Z),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&Z),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this.foundMatch=this._state.matchesCount>0,this.updateButtons(this.foundMatch)}_updateMatchesCount(){}dispose(){super.dispose(),this._domNode&&this._domNode.parentElement&&this._domNode.parentElement.removeChild(this._domNode)}getDomNode(){return this._domNode}reveal(Z){if(Z&&this._findInput.setValue(Z),this._isVisible){this._findInput.select();return}this._isVisible=!0,this.updateButtons(this.foundMatch),setTimeout(()=>{this._domNode.classList.add("visible","visible-transition"),this._domNode.setAttribute("aria-hidden","false"),this._findInput.select()},0)}focus(){this._findInput.focus()}show(Z){Z&&!this._isVisible&&this._findInput.setValue(Z),this._isVisible=!0,setTimeout(()=>{this._domNode.classList.add("visible","visible-transition"),this._domNode.setAttribute("aria-hidden","false"),this.focus()},0)}showWithReplace(Z,j){Z&&!this._isVisible&&this._findInput.setValue(Z),j&&!this._isVisible&&this._replaceInput.setValue(j),this._isVisible=!0,this._isReplaceVisible=!0,this._state.change({isReplaceRevealed:this._isReplaceVisible},!1),this._isReplaceVisible?this._innerReplaceDomNode.style.display="flex":this._innerReplaceDomNode.style.display="none",setTimeout(()=>{this._domNode.classList.add("visible","visible-transition"),this._domNode.setAttribute("aria-hidden","false"),this._updateButtons(),this._replaceInput.focus()},0)}hide(){this._isVisible&&(this._domNode.classList.remove("visible-transition"),this._domNode.setAttribute("aria-hidden","true"),setTimeout(()=>{this._isVisible=!1,this.updateButtons(this.foundMatch),this._domNode.classList.remove("visible")},200))}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this))}_updateHistory(){this._findInput.inputBox.addToHistory()}_getRegexValue(){return this._findInput.getRegex()}_getWholeWordValue(){return this._findInput.getWholeWords()}_getCaseSensitiveValue(){return this._findInput.getCaseSensitive()}updateButtons(Z){const j=this.inputValue.length>0;this.prevBtn.setEnabled(this._isVisible&&j&&Z),this.nextBtn.setEnabled(this._isVisible&&j&&Z)}};G=Ee([W(0,o.IContextViewService),W(1,C.IContextKeyService),W(2,s.IThemeService),W(3,p.IConfigurationService),W(4,n.IMenuService),W(5,o.IContextMenuService),W(6,a.IInstantiationService)],G),e.SimpleFindReplaceWidget=G,(0,s.registerThemingParticipant)((q,Z)=>{const j=q.getColor(c.editorWidgetBackground);j&&Z.addRule(`.monaco-workbench .simple-fr-find-part-wrapper { background-color: ${j} !important; }`);const X=q.getColor(c.editorWidgetForeground);X&&Z.addRule(`.monaco-workbench .simple-fr-find-part-wrapper { color: ${X}; }`);const Y=q.getColor(c.widgetShadow);Y&&Z.addRule(`.monaco-workbench .simple-fr-find-part-wrapper { box-shadow: 0 0 8px 2px ${Y}; }`);const $=q.getColor(c.inputActiveOptionBorder);$&&Z.addRule(`.simple-fr-find-part .find-filter-button > .monaco-action-bar .action-label.notebook-filters.checked { border-color: ${$}; }`);const J=q.getColor(c.inputActiveOptionForeground);J&&Z.addRule(`.simple-fr-find-part .find-filter-button > .monaco-action-bar .action-label.notebook-filters.checked { color: ${J}; }`);const ee=q.getColor(c.inputActiveOptionBackground);ee&&Z.addRule(`.simple-fr-find-part .find-filter-button > .monaco-action-bar .action-label.notebook-filters.checked { background-color: ${ee}; }`)})}),define(ne[797],re([1,0,6,2]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookDiffEditorEventDispatcher=e.NotebookCellLayoutChangedEvent=e.NotebookDiffLayoutChangedEvent=e.NotebookDiffViewEventType=void 0;var _;(function(I){I[I.LayoutChanged=1]="LayoutChanged",I[I.CellLayoutChanged=2]="CellLayoutChanged"})(_=e.NotebookDiffViewEventType||(e.NotebookDiffViewEventType={}));class A{constructor(w,v){this.source=w,this.value=v,this.type=_.LayoutChanged}}e.NotebookDiffLayoutChangedEvent=A;class k{constructor(w){this.source=w,this.type=_.CellLayoutChanged}}e.NotebookCellLayoutChangedEvent=k;class D extends f.Disposable{constructor(){super(...arguments);this._onDidChangeLayout=this._register(new t.Emitter),this.onDidChangeLayout=this._onDidChangeLayout.event,this._onDidChangeCellLayout=this._register(new t.Emitter),this.onDidChangeCellLayout=this._onDidChangeCellLayout.event}emit(w){for(let v=0,C=w.length;v<C;v++){const o=w[v];switch(o.type){case _.LayoutChanged:this._onDidChangeLayout.fire(o);break;case _.CellLayoutChanged:this._onDidChangeCellLayout.fire(o);break}}}}e.NotebookDiffEditorEventDispatcher=D}),define(ne[356],re([1,0,7]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NOTEBOOK_DIFF_CELL_PROPERTY_EXPANDED=e.NOTEBOOK_DIFF_CELL_PROPERTY=e.NOTEBOOK_DIFF_CELL_INPUT=e.DIFF_CELL_MARGIN=e.DiffSide=void 0;var f;(function(_){_[_.Original=0]="Original",_[_.Modified=1]="Modified"})(f=e.DiffSide||(e.DiffSide={})),e.DIFF_CELL_MARGIN=16,e.NOTEBOOK_DIFF_CELL_INPUT=new t.RawContextKey("notebookDiffCellInputChanged",!1),e.NOTEBOOK_DIFF_CELL_PROPERTY=new t.RawContextKey("notebookDiffCellPropertyChanged",!1),e.NOTEBOOK_DIFF_CELL_PROPERTY_EXPANDED=new t.RawContextKey("notebookDiffCellPropertyExpanded",!1)}),define(ne[2157],re([1,0,22,6,2]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookCellStatusBarService=void 0;class A extends _.Disposable{constructor(){super(...arguments);this._onDidChangeProviders=this._register(new f.Emitter),this.onDidChangeProviders=this._onDidChangeProviders.event,this._onDidChangeItems=this._register(new f.Emitter),this.onDidChangeItems=this._onDidChangeItems.event,this._providers=[]}registerCellStatusBarItemProvider(D){this._providers.push(D);let I;return D.onDidChangeStatusBarItems&&(I=D.onDidChangeStatusBarItems(()=>this._onDidChangeItems.fire())),this._onDidChangeProviders.fire(),(0,_.toDisposable)(()=>{I?.dispose();const w=this._providers.findIndex(v=>v===D);this._providers.splice(w,1)})}async getStatusBarItemsForCell(D,I,w,v){const C=this._providers.filter(o=>o.viewType===w||o.viewType==="*");return await Promise.all(C.map(async o=>{try{return await o.provideCellStatusBarItems(D,I,v)??{items:[]}}catch(c){return(0,t.onUnexpectedExternalError)(c),{items:[]}}}))}}e.NotebookCellStatusBarService=A}),define(ne[267],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookEditorExtensionsRegistry=e.registerNotebookContribution=void 0;class t{constructor(){this.editorContributions=[]}registerEditorContribution(k,D){this.editorContributions.push({id:k,ctor:D})}getEditorContributions(){return this.editorContributions.slice(0)}}t.INSTANCE=new t;function f(A,k){t.INSTANCE.registerEditorContribution(A,k)}e.registerNotebookContribution=f;var _;(function(A){function k(){return t.INSTANCE.getEditorContributions()}A.getEditorContributions=k;function D(I){return t.INSTANCE.getEditorContributions().filter(w=>I.indexOf(w.id)>=0)}A.getSomeEditorContributions=D})(_=e.NotebookEditorExtensionsRegistry||(e.NotebookEditorExtensionsRegistry={}))}),define(ne[290],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INotebookEditorService=void 0,e.INotebookEditorService=(0,t.createDecorator)("INotebookEditorWidgetService")}),define(ne[200],re([1,0,33,1650,63]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mimetypeIcon=e.renderOutputIcon=e.revertIcon=e.openAsTextIcon=e.expandedIcon=e.collapsedIcon=e.executingStateIcon=e.pendingStateIcon=e.errorStateIcon=e.successStateIcon=e.unfoldIcon=e.splitCellIcon=e.clearIcon=e.moveDownIcon=e.moveUpIcon=e.stopEditIcon=e.editIcon=e.executeAllIcon=e.deleteCellIcon=e.stopIcon=e.executeBelowIcon=e.executeAboveIcon=e.executeIcon=e.selectKernelIcon=e.configureKernelIcon=void 0,e.configureKernelIcon=(0,_.registerIcon)("notebook-kernel-configure",t.Codicon.gear,(0,f.localize)(0,null)),e.selectKernelIcon=(0,_.registerIcon)("notebook-kernel-select",t.Codicon.serverEnvironment,(0,f.localize)(1,null)),e.executeIcon=(0,_.registerIcon)("notebook-execute",t.Codicon.play,(0,f.localize)(2,null)),e.executeAboveIcon=(0,_.registerIcon)("notebook-execute-above",t.Codicon.runAbove,(0,f.localize)(3,null)),e.executeBelowIcon=(0,_.registerIcon)("notebook-execute-below",t.Codicon.runBelow,(0,f.localize)(4,null)),e.stopIcon=(0,_.registerIcon)("notebook-stop",t.Codicon.primitiveSquare,(0,f.localize)(5,null)),e.deleteCellIcon=(0,_.registerIcon)("notebook-delete-cell",t.Codicon.trash,(0,f.localize)(6,null)),e.executeAllIcon=(0,_.registerIcon)("notebook-execute-all",t.Codicon.runAll,(0,f.localize)(7,null)),e.editIcon=(0,_.registerIcon)("notebook-edit",t.Codicon.pencil,(0,f.localize)(8,null)),e.stopEditIcon=(0,_.registerIcon)("notebook-stop-edit",t.Codicon.check,(0,f.localize)(9,null)),e.moveUpIcon=(0,_.registerIcon)("notebook-move-up",t.Codicon.arrowUp,(0,f.localize)(10,null)),e.moveDownIcon=(0,_.registerIcon)("notebook-move-down",t.Codicon.arrowDown,(0,f.localize)(11,null)),e.clearIcon=(0,_.registerIcon)("notebook-clear",t.Codicon.clearAll,(0,f.localize)(12,null)),e.splitCellIcon=(0,_.registerIcon)("notebook-split-cell",t.Codicon.splitVertical,(0,f.localize)(13,null)),e.unfoldIcon=(0,_.registerIcon)("notebook-unfold",t.Codicon.unfold,(0,f.localize)(14,null)),e.successStateIcon=(0,_.registerIcon)("notebook-state-success",t.Codicon.check,(0,f.localize)(15,null)),e.errorStateIcon=(0,_.registerIcon)("notebook-state-error",t.Codicon.error,(0,f.localize)(16,null)),e.pendingStateIcon=(0,_.registerIcon)("notebook-state-pending",t.Codicon.clock,(0,f.localize)(17,null)),e.executingStateIcon=(0,_.registerIcon)("notebook-state-executing",t.Codicon.sync,(0,f.localize)(18,null)),e.collapsedIcon=(0,_.registerIcon)("notebook-collapsed",t.Codicon.chevronRight,(0,f.localize)(19,null)),e.expandedIcon=(0,_.registerIcon)("notebook-expanded",t.Codicon.chevronDown,(0,f.localize)(20,null)),e.openAsTextIcon=(0,_.registerIcon)("notebook-open-as-text",t.Codicon.fileCode,(0,f.localize)(21,null)),e.revertIcon=(0,_.registerIcon)("notebook-revert",t.Codicon.discard,(0,f.localize)(22,null)),e.renderOutputIcon=(0,_.registerIcon)("notebook-render-output",t.Codicon.preview,(0,f.localize)(23,null)),e.mimetypeIcon=(0,_.registerIcon)("notebook-mimetype",t.Codicon.code,(0,f.localize)(24,null))}),define(ne[2158],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.notebookDebug=void 0;class t{constructor(){this._frameId=0,this._domFrameLog()}_domFrameLog(){}debug(...k){const D=new Date;console.log(`${D.getSeconds()}:${D.getMilliseconds().toString().padStart(3,"0")}`,`frame #${this._frameId}: `,...k)}}const f=new t;function _(...A){f.debug(...A)}e.notebookDebug=_}),define(ne[488],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookCellStateChangedEvent=e.NotebookMetadataChangedEvent=e.NotebookLayoutChangedEvent=e.NotebookViewEventType=void 0;var t;(function(k){k[k.LayoutChanged=1]="LayoutChanged",k[k.MetadataChanged=2]="MetadataChanged",k[k.CellStateChanged=3]="CellStateChanged"})(t=e.NotebookViewEventType||(e.NotebookViewEventType={}));class f{constructor(D,I){this.source=D,this.value=I,this.type=t.LayoutChanged}}e.NotebookLayoutChangedEvent=f;class _{constructor(D){this.source=D,this.type=t.MetadataChanged}}e.NotebookMetadataChangedEvent=_;class A{constructor(D,I){this.source=D,this.cell=I,this.type=t.CellStateChanged}}e.NotebookCellStateChangedEvent=A}),define(ne[175],re([1,0,2]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellPart=void 0;class f extends t.Disposable{constructor(){super();this.cellDisposables=new t.DisposableStore}renderCell(A){this.currentCell=A,this.didRenderCell(A)}didRenderCell(A){}unrenderCell(A){this.currentCell=void 0,this.cellDisposables.clear()}prepareLayout(){}updateInternalLayoutNow(A){}updateState(A,k){}updateForExecutionState(A,k){}}e.CellPart=f}),define(ne[414],re([1,0,181,10,73,38,26,7]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionViewWithLabel=e.CodiconActionViewItem=void 0;let I=class extends _.MenuEntryActionViewItem{constructor(C,o,c,i){super(C,void 0,o,c,i)}updateLabel(){this.options.label&&this.label&&f.reset(this.label,...(0,t.renderLabelWithIcons)(this._commandAction.label??""))}};I=Ee([W(1,A.IKeybindingService),W(2,k.INotificationService),W(3,D.IContextKeyService)],I),e.CodiconActionViewItem=I;let w=class extends _.MenuEntryActionViewItem{constructor(C,o,c,i){super(C,void 0,o,c,i)}render(C){super.render(C),C.classList.add("notebook-action-view-item"),this._actionLabel=document.createElement("a"),C.appendChild(this._actionLabel),this.updateLabel()}updateLabel(){this._actionLabel&&(this._actionLabel.classList.add("notebook-label"),this._actionLabel.innerText=this._action.label,this._actionLabel.title=this._action.tooltip.length?this._action.tooltip:this._action.label)}};w=Ee([W(1,A.IKeybindingService),W(2,k.INotificationService),W(3,D.IContextKeyService)],w),e.ActionViewWithLabel=w}),define(ne[2159],re([1,0,10,175]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellDecorations=void 0;class _ extends f.CellPart{constructor(k,D){super();this.rootContainer=k,this.decorationContainer=D}didRenderCell(k){const D=[];this.rootContainer.classList.forEach(w=>{/^nb\-.*$/.test(w)&&D.push(w)}),D.forEach(w=>{this.rootContainer.classList.remove(w)}),this.decorationContainer.innerText="";const I=()=>{this.decorationContainer.innerText="",k.getCellDecorations().filter(w=>w.topClassName!==void 0).forEach(w=>{this.decorationContainer.append(t.$(`.${w.topClassName}`))})};this.cellDisposables.add(k.onCellDecorationsChanged(w=>{(w.added.find(C=>C.topClassName)||w.removed.find(C=>C.topClassName))&&I()})),I()}}e.CellDecorations=_}),define(ne[2160],re([1,0,10,66,14,20,86,308]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeCellDragImageRenderer=void 0;class I{getRichText(C,o){const c=C.getModel();if(!c)return null;const i=this.getDefaultColorMap(),S=C.getOptions().get(44),s="--notebook-editor-font-family",l="--notebook-editor-font-size",r="--notebook-editor-font-weight",p=`color: ${i[1]};background-color: ${i[2]};font-family: var(${s});font-weight: var(${r});font-size: var(${l});line-height: ${S.lineHeight}px;white-space: pre;`,u=t.$("div",{style:p}),a=S.fontSize,n=S.fontWeight;u.style.setProperty(s,S.fontFamily),u.style.setProperty(l,`${a}px`),u.style.setProperty(r,n);const h=this.getRichTextLinesAsHtml(c,o,i);return u.innerHTML=h,u}getRichTextLinesAsHtml(C,o,c){const i=o.startLineNumber,S=o.startColumn,s=o.endLineNumber,l=o.endColumn,r=C.getOptions().tabSize;let p="";for(let u=i;u<=s;u++){const a=C.getLineTokens(u),n=a.getLineContent(),h=u===i?S-1:0,g=u===s?l-1:n.length;n===""?p+="<br>":p+=(0,D.tokenizeLineToHTML)(n,a.inflate(),c,h,g,r,_.isWindows)}return I._ttPolicy?.createHTML(p)??p}getDefaultColorMap(){const C=k.TokenizationRegistry.getColorMap(),o=["#000000"];if(C)for(let c=1,i=C.length;c<i;c++)o[c]=f.Color.Format.CSS.formatHex(C[c]);return o}}I._ttPolicy=window.trustedTypes?.createPolicy("cellRendererEditorText",{createHTML(v){return v}});class w{getDragImage(C,o,c){let i=this.getDragImageImpl(C,o,c);return i||(i=document.createElement("div"),i.textContent="1 cell"),i}getDragImageImpl(C,o,c){const i=C.container.cloneNode(!0);i.classList.forEach(l=>i.classList.remove(l)),i.classList.add("cell-drag-image","monaco-list-row","focused",`${c}-cell-row`);const S=i.querySelector(".cell-editor-container");if(!S)return null;const s=new I().getRichText(o,new A.Range(1,1,1,1e3));return s?(t.reset(S,s),i):null}}e.CodeCellDragImageRenderer=w}),define(ne[2161],re([1,0,10,2,175]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellExecutionPart=void 0;class A extends _.CellPart{constructor(D,I){super();this._notebookEditor=D,this._executionOrderLabel=I,this.kernelDisposables=this._register(new f.DisposableStore),this._register(this._notebookEditor.onDidChangeActiveKernel(()=>{this.currentCell&&(this.kernelDisposables.clear(),this._notebookEditor.activeKernel&&this.kernelDisposables.add(this._notebookEditor.activeKernel.onDidChange(()=>{this.currentCell&&this.updateExecutionOrder(this.currentCell.internalMetadata)})),this.updateExecutionOrder(this.currentCell.internalMetadata))}))}didRenderCell(D){this.updateExecutionOrder(D.internalMetadata)}updateExecutionOrder(D){if(this._notebookEditor.activeKernel?.implementsExecutionOrder){const I=typeof D.executionOrder=="number"?`[${D.executionOrder}]`:"[ ]";this._executionOrderLabel.innerText=I}else this._executionOrderLabel.innerText=""}updateState(D,I){I.internalMetadataChanged&&this.updateExecutionOrder(D.internalMetadata)}updateInternalLayoutNow(D){D.isInputCollapsed?t.hide(this._executionOrderLabel):(t.show(this._executionOrderLabel),this._executionOrderLabel.style.top=`${D.layoutInfo.editorHeight}px`)}}e.CellExecutionPart=A}),define(ne[2162],re([1,0,10,175]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellFocusPart=void 0;class _ extends f.CellPart{constructor(k,D,I){super();this._register(t.addDisposableListener(k,t.EventType.FOCUS,()=>{this.currentCell&&I.focusElement(this.currentCell)},!0)),D&&this._register(t.addDisposableListener(D,t.EventType.FOCUS,()=>{this.currentCell&&this.currentCell.outputsViewModels.length&&I.focusNotebookCell(this.currentCell,"output")}))}}e.CellFocusPart=_}),define(ne[2163],re([1,0,10,175]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CollapsedCellInput=void 0;class _ extends f.CellPart{constructor(k,D){super();this.notebookEditor=k,this._register(t.addDisposableListener(D,t.EventType.DBLCLICK,I=>{!this.currentCell||!this.notebookEditor.hasModel()||(this.currentCell.isInputCollapsed?this.currentCell.isInputCollapsed=!1:this.currentCell.isOutputCollapsed=!1)})),this._register(t.addDisposableListener(D,t.EventType.CLICK,I=>{if(!this.currentCell||!this.notebookEditor.hasModel())return;const w=I.target;w&&w.classList&&w.classList.contains("expandInputIcon")&&(this.currentCell.isInputCollapsed=!1)}))}}e.CollapsedCellInput=_}),define(ne[798],re([1,0,195]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerStickyScroll=void 0;function f(_,A,k,D){const I=D?.extraOffset??0,w=D?.min??0,v=()=>{if(A.isInputCollapsed)k.style.top="";else{const C=_.notebookOptions.computeTopInsertToolbarHeight(_.textModel?.viewType),o=_.scrollTop-C,c=_.getAbsoluteTopOfElement(A),i=o-c+I,S=A.layoutInfo.editorHeight+A.layoutInfo.statusBarHeight-45,s=S>20?(0,t.clamp)(w,i,S):w;k.style.top=`${s}px`}};return v(),_.onDidScroll(()=>v())}e.registerStickyScroll=f}),define(ne[2164],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.preloadsScriptStr=void 0;async function t(_){const A=new TextEncoder,k=new TextDecoder;let D=_.options,I=_.isWorkspaceTrusted,w=_.lineLimit;const v=globalThis.acquireVsCodeApi,C=v();delete globalThis.acquireVsCodeApi;const o=document.querySelector("style#vscode-tokenization-styles"),c=ue=>{if(!(!ue||!ue.view||!ue.view.document)){for(const oe of ue.composedPath())if(oe instanceof HTMLAnchorElement&&oe.href){if(oe.href.startsWith("blob:"))S(oe.href,oe.download);else if(oe.href.startsWith("data:"))i(oe.href,oe.download);else if(oe.hash&&oe.getAttribute("href")===oe.hash){const fe=oe.hash.substring(1);let pe=ue.view.document.getElementById(fe);if(!pe){for(const me of ue.view.document.querySelectorAll(".preview"))if(pe=me.shadowRoot?.getElementById(fe),pe)break}if(pe){const me=pe.getBoundingClientRect().top+ue.view.scrollY;ce("scroll-to-reveal",{scrollTop:me});return}}else{const fe=oe.getAttribute("href");fe&&ce("clicked-link",{href:fe})}ue.preventDefault(),ue.stopPropagation();return}}},i=async(ue,oe)=>{ce("clicked-data-url",{data:ue,downloadName:oe})},S=async(ue,oe)=>{try{const pe=await(await fetch(ue)).blob(),me=new FileReader;me.addEventListener("load",()=>{i(me.result,oe)}),me.readAsDataURL(pe)}catch(fe){console.error(fe.message)}};document.body.addEventListener("click",c);const s=["type","src","nonce","noModule","async"],l=ue=>{const oe=Array.from(ue.getElementsByTagName("script"));for(let fe=0;fe<oe.length;fe++){const pe=oe[fe],me=document.createElement("script"),be=z?.createScript(pe.innerText)??pe.innerText;me.text=be;for(const Ce of s){const ve=pe[Ce]||pe.getAttribute&&pe.getAttribute(Ce);ve&&me.setAttribute(Ce,ve)}ue.appendChild(me).parentNode.removeChild(me)}};async function r(ue,oe=ue){const fe=await fetch(ue),pe=await fe.text();if(!fe.ok)throw new Error(`Unexpected ${fe.status} requesting ${oe}: ${pe||fe.statusText}`);return pe}function p(){return{onDidReceiveKernelMessage:P.event,postKernelMessage:ue=>ce("customKernelMessage",{message:ue})}}const u=(ue,oe)=>{const fe=Object.entries(oe);return new Function(...fe.map(([pe])=>pe),ue)(...fe.map(([,pe])=>pe))},a=async(ue,oe)=>{const fe=await r(ue,oe),pe=/\bexport\b.*\bactivate\b/.test(fe);try{if(pe){const me=await __import(ue);if(!me.activate){console.error(`Notebook preload (${ue}) looks like a module but does not export an activate function`);return}return me.activate(p())}else return u(fe,{...V,scriptUrl:ue})}catch(me){throw console.error(me),me}},n=new class{constructor(){this.pending=new Map}updateHeight(ue,oe,fe){this.pending.size||setTimeout(()=>{this.updateImmediately()},0);const pe=this.pending.get(ue);pe&&pe.isOutput?this.pending.set(ue,{id:ue,height:oe,init:pe.init,isOutput:pe.isOutput}):this.pending.set(ue,{id:ue,height:oe,...fe})}updateImmediately(){!this.pending.size||(ce("dimension",{updates:Array.from(this.pending.values())}),this.pending.clear())}},h=new class{constructor(){this._observedElements=new WeakMap,this._observer=new ResizeObserver(ue=>{for(const oe of ue){if(!document.body.contains(oe.target))continue;const fe=this._observedElements.get(oe.target);if(!!fe&&oe.target.id===fe.id&&oe.contentRect){fe.output&&(oe.contentRect.height!==0?oe.target.style.padding=`${_.style.outputNodePadding}px ${_.style.outputNodePadding}px ${_.style.outputNodePadding}px ${_.style.outputNodeLeftPadding}px`:oe.target.style.padding="0px");const pe=oe.target.offsetHeight;fe.lastKnownHeight!==pe&&(fe.lastKnownHeight=pe,n.updateHeight(fe.id,pe,{isOutput:fe.output}))}}})}observe(ue,oe,fe){this._observedElements.has(ue)||(this._observedElements.set(ue,{id:oe,output:fe,lastKnownHeight:-1}),this._observer.observe(ue))}};function g(ue){for(let oe=ue.target;oe;oe=oe.parentNode){if(!(oe instanceof Element)||oe.id==="container"||oe.classList.contains("cell_container")||oe.classList.contains("markup")||oe.classList.contains("output_container"))return!1;if(ue.deltaY<0&&oe.scrollTop>0||ue.deltaY>0&&oe.scrollTop+oe.clientHeight<oe.scrollHeight)return!0}return!1}const d=ue=>{ue.defaultPrevented||g(ue)||ce("did-scroll-wheel",{payload:{deltaMode:ue.deltaMode,deltaX:ue.deltaX,deltaY:ue.deltaY,deltaZ:ue.deltaZ,wheelDelta:ue.wheelDelta,wheelDeltaX:ue.wheelDeltaX,wheelDeltaY:ue.wheelDeltaY,detail:ue.detail,shiftKey:ue.shiftKey,type:ue.type}})};function m(ue){const oe=document.getElementById(ue);oe&&oe.querySelector('[tabindex="0"], [href], button, input, option, select, textarea')?.focus()}function b(ue,oe){const fe=document.createElement("div");return fe.tabIndex=0,fe.addEventListener("focus",()=>{ce("focus-editor",{cellId:ue,focusNext:oe})}),fe}function E(ue,oe){ue.addEventListener("mouseenter",()=>{ce("mouseenter",{id:oe})}),ue.addEventListener("mouseleave",()=>{ce("mouseleave",{id:oe})})}function y(ue,oe){for(;ue;){if(ue===oe)return!0;ue=ue.parentNode}return!1}function T(ue,oe="mark",fe={}){function pe(Se){if(!Se.startContainer.ownerDocument)return[];if(Se.startContainer.nodeType===Node.TEXT_NODE&&Se.startOffset>0){const ke=Se.startContainer,Ie=Se.endOffset,Te=ke.splitText(Se.startOffset);Se.endContainer===ke&&Se.setEnd(Te,Ie-Se.startOffset),Se.setStart(Te,0)}Se.endContainer.nodeType===Node.TEXT_NODE&&Se.endOffset<Se.endContainer.length&&Se.endContainer.splitText(Se.endOffset);const we=Se.startContainer.ownerDocument.createTreeWalker(Se.commonAncestorContainer,NodeFilter.SHOW_TEXT,ke=>Se.intersectsNode(ke)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT);we.currentNode=Se.startContainer;const ye=[];for(we.currentNode.nodeType===Node.TEXT_NODE&&ye.push(we.currentNode);we.nextNode()&&Se.comparePoint(we.currentNode,0)!==1;)we.currentNode.nodeType===Node.TEXT_NODE&&ye.push(we.currentNode);return ye}function me(Se,we,ye){const ke=Se.ownerDocument.createElement(we);Object.keys(ye).forEach(Te=>{ke.setAttribute(Te,ye[Te])});const Ie=Se.ownerDocument.createRange();return Ie.selectNode(Se),Ie.surroundContents(ke),ke}if(ue.collapsed)return{remove:()=>{},update:()=>{}};const be=pe(ue),Ce=[];for(const Se in be){const we=me(be[Se],oe,fe);Ce.push(we)}function ve(Se){if(Se.childNodes.length===1)Se.parentNode?.replaceChild(Se.firstChild,Se);else{for(;Se.firstChild;)Se.parentNode?.insertBefore(Se.firstChild,Se);Se.remove()}}function he(){for(const Se in Ce)ve(Ce[Se])}function ge(Se,we={}){Object.keys(we).forEach(ye=>{Se.setAttribute(ye,we[ye])})}function de(Se){for(const we in Ce)ge(Ce[we],Se)}return{remove:he,update:de}}function R(ue){const oe=window.getSelection();if(oe)try{oe.removeAllRanges();const fe=document.createRange();fe.setStart(ue.startContainer,ue.startOffset),fe.setEnd(ue.endContainer,ue.endOffset),oe.addRange(fe)}catch(fe){console.log(fe)}}function O(ue,oe,fe="mark",pe={}){if(oe){const me=T(ue,fe,pe);return{range:ue,dispose:me.remove,update:(be,Ce)=>{Ce===void 0?me.update({style:`background-color: ${be}`}):me.update({class:Ce})}}}else{window.document.execCommand("hiliteColor",!1,H);const me=window.getSelection().getRangeAt(0).cloneRange(),be={collapsed:me.collapsed,commonAncestorContainer:me.commonAncestorContainer,endContainer:me.endContainer,endOffset:me.endOffset,startContainer:me.startContainer,startOffset:me.startOffset};return{range:be,dispose:()=>{R(be);try{document.designMode="On",document.execCommand("removeFormat",!1,void 0),document.designMode="Off",window.getSelection()?.removeAllRanges()}catch(Ce){console.log(Ce)}},update:(Ce,ve)=>{R(be);try{document.designMode="On",document.execCommand("removeFormat",!1,void 0),window.document.execCommand("hiliteColor",!1,Ce),document.designMode="Off",window.getSelection()?.removeAllRanges()}catch(he){console.log(he)}}}}}class x{constructor(oe,fe){this._hasFocus=!1,this._loosingFocus=!1,this._element=oe,this._outputId=fe,this._hasFocus=y(document.activeElement,oe),this._loosingFocus=!1,oe.addEventListener("focus",this._onFocus.bind(this),!0),oe.addEventListener("blur",this._onBlur.bind(this),!0)}_onFocus(){this._loosingFocus=!1,this._hasFocus||(this._hasFocus=!0,ce("outputFocus",{id:this._outputId}))}_onBlur(){this._hasFocus&&(this._loosingFocus=!0,window.setTimeout(()=>{this._loosingFocus&&(this._loosingFocus=!1,this._hasFocus=!1,ce("outputBlur",{id:this._outputId}))},0))}dispose(){this._element&&(this._element.removeEventListener("focus",this._onFocus,!0),this._element.removeEventListener("blur",this._onBlur,!0))}}const F=new Map;function L(ue,oe){F.has(oe)&&F.get(oe)?.dispose(),F.set(oe,new x(ue,oe))}function M(ue=()=>{}){const oe=new Set;return{fire(fe){for(const pe of[...oe])pe.fn.call(pe.thisArg,fe)},event(fe,pe,me){const be={fn:fe,thisArg:pe},Ce={dispose:()=>{oe.delete(be),ue(oe)}};return oe.add(be),ue(oe),me instanceof Array?me.push(Ce):me&&me.add(Ce),Ce}}}function N(ue,...oe){ue.innerText="Error loading preloads:";const fe=document.createElement("ul");for(const pe of oe){console.error(pe);const me=document.createElement("li");me.innerText=pe.message,fe.appendChild(me)}ue.appendChild(fe)}function B(ue,oe,fe,pe){return Object.freeze({id:ue,mime:oe,metadata:fe,data(){return pe},text(){return k.decode(pe)},json(){return JSON.parse(this.text())},blob(){return new Blob([pe],{type:this.mime})}})}const P=M(),V={acquireVsCodeApi:v,onDidReceiveKernelMessage:P.event,postKernelMessage:ue=>ce("customKernelMessage",{message:ue})},z=window.trustedTypes?.createPolicy("notebookRenderer",{createHTML:ue=>ue,createScript:ue=>ue});window.addEventListener("wheel",d);let U=null,H=window.getComputedStyle(document.getElementById("_defaultColorPalatte")).color,K=window.getComputedStyle(document.getElementById("_defaultColorPalatte")).backgroundColor;class G{constructor(oe){this.matches=oe,this._findMatchIndex=-1;for(let fe=oe.length-1;fe>=0;fe--){const pe=oe[fe],me=O(pe.originalRange,!0,"mark",pe.isShadow?{style:"background-color: "+H+";"}:{class:"find-match"});pe.highlightResult=me}}highlightCurrentMatch(oe){const fe=this.matches[this._findMatchIndex];fe&&fe.highlightResult?.update(H,fe.isShadow?void 0:"find-match");const pe=this.matches[oe];this._findMatchIndex=oe;const me=window.getSelection();if(!!pe&&!!me&&pe.highlightResult){let be=0;try{const Ce=document.getElementById(pe.id).getBoundingClientRect().top,ve=document.createRange();ve.selectNode(pe.highlightResult.range.startContainer);const he=ve.getBoundingClientRect().top;ve.detach(),be=he-Ce}catch{}pe.highlightResult?.update(K,pe.isShadow?void 0:"current-find-match"),document.getSelection()?.removeAllRanges(),ce("didFindHighlight",{offset:be})}}unHighlightCurrentMatch(oe){const fe=this.matches[oe];fe&&fe.highlightResult&&fe.highlightResult.update(H,fe.isShadow?void 0:"find-match")}dispose(){document.getSelection()?.removeAllRanges(),this.matches.forEach(oe=>{oe.highlightResult?.dispose()})}}class q{constructor(oe){this.matches=oe,this._findMatchIndex=-1,this._matchesHighlight=new Highlight,this._matchesHighlight.priority=1,this._currentMatchesHighlight=new Highlight,this._currentMatchesHighlight.priority=2;for(let fe=0;fe<oe.length;fe++)this._matchesHighlight.add(oe[fe].originalRange);CSS.highlights?.set("find-highlight",this._matchesHighlight),CSS.highlights?.set("current-find-highlight",this._currentMatchesHighlight)}highlightCurrentMatch(oe){this._findMatchIndex=oe;const fe=this.matches[this._findMatchIndex],pe=fe.originalRange;if(fe){let me=0;try{const be=document.getElementById(fe.id).getBoundingClientRect().top;me=fe.originalRange.getBoundingClientRect().top-be,ce("didFindHighlight",{offset:me})}catch{}}this._currentMatchesHighlight.clear(),this._currentMatchesHighlight.add(pe)}unHighlightCurrentMatch(oe){this._currentMatchesHighlight.clear()}dispose(){document.getSelection()?.removeAllRanges(),this._currentMatchesHighlight.clear(),this._matchesHighlight.clear()}}const Z=(ue,oe)=>{let fe=!0,pe=[],me=document.createRange();me.selectNodeContents(document.getElementById("findStart"));let be=window.getSelection();be?.removeAllRanges(),be?.addRange(me),J.toggleDragDropEnabled(!1);try{for(document.designMode="On";fe&&pe.length<500;)if(fe=window.find(ue,!!oe.caseSensitive,!1,!1,!!oe.wholeWord,!0,!1),fe){const Ce=window.getSelection();if(!Ce){console.log("no selection");break}if(oe.includeMarkup&&Ce.rangeCount>0&&Ce.getRangeAt(0).startContainer.nodeType===1&&Ce.getRangeAt(0).startContainer.classList.contains("markup")){const he=Ce.anchorNode?.firstChild,ge=he.shadowRoot,de=ge?.getSelection?ge?.getSelection():null;de&&de.anchorNode&&pe.push({type:"preview",id:he.id,cellId:he.id,container:he,isShadow:!0,originalRange:de.getRangeAt(0)})}if(oe.includeOutput&&Ce.rangeCount>0&&Ce.getRangeAt(0).startContainer.nodeType===1&&Ce.getRangeAt(0).startContainer.classList.contains("output_container")){const he=Ce.getRangeAt(0).startContainer.parentElement.id,ge=Ce.anchorNode?.firstChild,de=ge.shadowRoot,Se=de?.getSelection?de?.getSelection():null;Se&&Se.anchorNode&&pe.push({type:"output",id:ge.id,cellId:he,container:ge,isShadow:!0,originalRange:Se.getRangeAt(0)})}const ve=Ce?.anchorNode?.parentElement;if(ve){const he=pe.length?pe[pe.length-1]:null;if(he&&he.container.contains(ve)&&oe.includeOutput)pe.push({type:he.type,id:he.id,cellId:he.cellId,container:he.container,isShadow:!1,originalRange:window.getSelection().getRangeAt(0)});else for(let ge=ve;ge&&ge instanceof Element;ge=ge.parentElement){if(ge.classList.contains("output")&&oe.includeOutput){const de=ge.parentElement?.parentElement?.id;de&&pe.push({type:"output",id:ge.id,cellId:de,container:ge,isShadow:!1,originalRange:window.getSelection().getRangeAt(0)});break}if(ge.id==="container"||ge===document.body)break}}else break}}catch(Ce){console.log(Ce)}pe.length&&CSS.highlights?U=new q(pe):U=new G(pe),document.getSelection()?.removeAllRanges(),J.toggleDragDropEnabled(D.dragAndDropEnabled),ce("didFind",{matches:pe.map((Ce,ve)=>({type:Ce.type,id:Ce.id,cellId:Ce.cellId,index:ve}))})};window.addEventListener("message",async ue=>{const oe=ue;switch(oe.data.type){case"initializeMarkup":await Promise.all(oe.data.cells.map(fe=>J.ensureMarkupCell(fe))),n.updateImmediately(),ce("initializedMarkup",{});break;case"createMarkupCell":J.ensureMarkupCell(oe.data.cell);break;case"showMarkupCell":J.showMarkupCell(oe.data.id,oe.data.top,oe.data.content);break;case"hideMarkupCells":for(const fe of oe.data.ids)J.hideMarkupCell(fe);break;case"unhideMarkupCells":for(const fe of oe.data.ids)J.unhideMarkupCell(fe);break;case"deleteMarkupCell":for(const fe of oe.data.ids)J.deleteMarkupCell(fe);break;case"updateSelectedMarkupCells":J.updateSelectedCells(oe.data.selectedCellIds);break;case"html":{const fe=oe.data;Y.enqueue(fe.outputId,pe=>J.renderOutputCell(fe,pe));break}case"view-scroll":{oe.data.widgets.forEach(fe=>{Y.enqueue(fe.outputId,()=>{J.updateOutputsScroll([fe])})}),J.updateMarkupScrolls(oe.data.markupCells);break}case"clear":$.clearAll(),J.clearAll(),document.getElementById("container").innerText="",F.forEach(fe=>{fe.dispose()}),F.clear();break;case"clearOutput":{const{cellId:fe,rendererId:pe,outputId:me}=oe.data;Y.cancelOutput(me),J.clearOutput(fe,me,pe);break}case"hideOutput":{const{cellId:fe,outputId:pe}=oe.data;Y.enqueue(pe,()=>{J.hideOutput(fe)});break}case"showOutput":{const{outputId:fe,cellTop:pe,cellId:me,content:be}=oe.data;Y.enqueue(fe,()=>{J.showOutput(me,fe,pe),be&&J.updateAndRerender(me,fe,be)});break}case"ack-dimension":{for(const{cellId:fe,outputId:pe,height:me}of oe.data.updates)J.updateOutputHeight(fe,pe,me);break}case"preload":{const fe=oe.data.resources;for(const{uri:pe,originalUri:me}of fe)X.load(pe,me);break}case"focus-output":m(oe.data.cellId);break;case"decorations":{let fe=document.getElementById(oe.data.cellId);fe||(J.ensureOutputCell(oe.data.cellId,-1e5,!0),fe=document.getElementById(oe.data.cellId)),fe?.classList.add(...oe.data.addedClassNames),fe?.classList.remove(...oe.data.removedClassNames);break}case"customKernelMessage":P.fire(oe.data.message);break;case"customRendererMessage":$.getRenderer(oe.data.rendererId)?.receiveMessage(oe.data.message);break;case"notebookStyles":{const fe=document.documentElement.style;for(let pe=fe.length-1;pe>=0;pe--){const me=fe[pe];me&&me.startsWith("--notebook-")&&fe.removeProperty(me)}for(const[pe,me]of Object.entries(oe.data.styles))fe.setProperty(`--${pe}`,me);break}case"notebookOptions":D=oe.data.options,J.toggleDragDropEnabled(D.dragAndDropEnabled);break;case"updateWorkspaceTrust":{I=oe.data.isTrusted,J.rerender();break}case"tokenizedCodeBlock":{const{codeBlockId:fe,html:pe}=oe.data;ee.highlightCodeBlock(fe,pe);break}case"tokenizedStylesChanged":{o&&(o.textContent=oe.data.css);break}case"find":{U?.dispose(),Z(oe.data.query,oe.data.options);break}case"findHighlight":{U?.highlightCurrentMatch(oe.data.index);break}case"findUnHighlight":{U?.unHighlightCurrentMatch(oe.data.index);break}case"findStop":{U?.dispose();break}}});class j{constructor(oe,fe){this.data=oe,this.loadExtension=fe,this._onMessageEvent=M()}get api(){return this._api}load(){return this._loadPromise||(this._loadPromise=this._load()),this._loadPromise}receiveMessage(oe){this._onMessageEvent.fire(oe)}createRendererContext(){const{id:oe,messaging:fe}=this.data,pe={setState:me=>C.setState({...C.getState(),[oe]:me}),getState:()=>{const me=C.getState();return typeof me=="object"&&me?me[oe]:void 0},getRenderer:async me=>$.getRenderer(me)?.api,workspace:{get isTrusted(){return I}},settings:{get lineLimit(){return w}}};return fe&&(pe.onDidReceiveMessage=this._onMessageEvent.event,pe.postMessage=me=>ce("customRendererMessage",{rendererId:oe,message:me})),pe}async _load(){const oe=await __import(this.data.entrypoint);if(!oe)return;const fe=await oe.activate(this.createRendererContext());return this._api=fe,await Promise.all(_.rendererData.filter(pe=>pe.extends===this.data.id).map(pe=>this.loadExtension(pe.id).catch(console.error))),fe}}const X=new class{constructor(){this.preloads=new Map}waitFor(ue){return this.preloads.get(ue)||Promise.resolve(new Error(`Preload not ready: ${ue}`))}load(ue,oe){const fe=Promise.all([a(ue,oe),this.waitForAllCurrent()]);return this.preloads.set(ue,fe),fe}waitForAllCurrent(){return Promise.all([...this.preloads.values()].map(ue=>ue.catch(oe=>oe)))}},Y=new class{constructor(){this.outputs=new Map}enqueue(ue,oe){const fe=this.outputs.get(ue);fe?fe.queue=fe.queue.then(pe=>!fe.cancelled&&oe(fe)):this.outputs.set(ue,{cancelled:!1,queue:new Promise(pe=>pe(oe({cancelled:!1})))})}cancelAll(){for(const ue of this.outputs.values())ue.cancelled=!0;this.outputs.clear()}cancelOutput(ue){const oe=this.outputs.get(ue);oe&&(oe.cancelled=!0,this.outputs.delete(ue))}},$=new class{constructor(){this._renderers=new Map;for(const ue of _.rendererData)this._renderers.set(ue.id,new j(ue,async oe=>{const fe=this._renderers.get(oe);if(!fe)throw new Error(`Could not find extending renderer: ${oe}`);await fe.load()}))}getRenderer(ue){return this._renderers.get(ue)}async load(ue){const oe=this._renderers.get(ue);if(!oe)throw new Error("Could not find renderer");return oe.load()}clearAll(){Y.cancelAll();for(const ue of this._renderers.values())ue.api?.disposeOutputItem?.()}clearOutput(ue,oe){Y.cancelOutput(oe),this._renderers.get(ue)?.api?.disposeOutputItem?.(oe)}async render(ue,oe){const fe=Array.from(this._renderers.values()).filter(pe=>pe.data.mimeTypes.includes(ue.mime)&&!pe.data.extends);if(!fe.length){const pe=document.createElement("div"),me=document.createElement("div");me.className="no-renderer-error";const be=(document.documentElement.style.getPropertyValue("--notebook-cell-renderer-not-found-error")||"").replace("$0",ue.mime);me.innerText=be;const Ce=document.createElement("div");Ce.innerText=ue.text(),pe.appendChild(me),pe.appendChild(Ce),oe.innerText="",oe.appendChild(pe);return}fe.sort((pe,me)=>+pe.data.isBuiltin-+me.data.isBuiltin),(await fe[0].load())?.renderOutputItem(ue,oe)}},J=new class{constructor(){this._markupCells=new Map,this._outputCells=new Map}clearAll(){this._markupCells.clear(),this._outputCells.clear()}rerender(){this.rerenderMarkupCells(),this.renderOutputCells()}async createMarkupCell(oe,fe,pe){const me=this._markupCells.get(oe.cellId);if(me)return console.error(`Trying to create markup that already exists: ${oe.cellId}`),me;const be=new te(oe.cellId,oe.mime,oe.content,fe);return be.element.style.visibility=pe?"visible":"hidden",this._markupCells.set(oe.cellId,be),await be.ready,be}async ensureMarkupCell(oe){let fe=this._markupCells.get(oe.cellId);fe?(fe.element.style.visibility=oe.visible?"visible":"hidden",await fe.updateContentAndRender(oe.content)):fe=await this.createMarkupCell(oe,oe.offset,oe.visible)}deleteMarkupCell(oe){const fe=this.getExpectedMarkupCell(oe);fe&&(fe.remove(),this._markupCells.delete(oe))}async updateMarkupContent(oe,fe){await this.getExpectedMarkupCell(oe)?.updateContentAndRender(fe)}showMarkupCell(oe,fe,pe){this.getExpectedMarkupCell(oe)?.show(fe,pe)}hideMarkupCell(oe){this.getExpectedMarkupCell(oe)?.hide()}unhideMarkupCell(oe){this.getExpectedMarkupCell(oe)?.unhide()}rerenderMarkupCells(){for(const oe of this._markupCells.values())oe.rerender()}getExpectedMarkupCell(oe){const fe=this._markupCells.get(oe);if(!fe){console.log(`Could not find markup cell '${oe}'`);return}return fe}updateSelectedCells(oe){const fe=new Set(oe);for(const pe of this._markupCells.values())pe.setSelected(fe.has(pe.id))}toggleDragDropEnabled(oe){for(const fe of this._markupCells.values())fe.toggleDragDropEnabled(oe)}updateMarkupScrolls(oe){for(const{id:fe,top:pe}of oe){const me=this._markupCells.get(fe);me&&(me.element.style.top=`${pe}px`)}}renderOutputCells(){for(const oe of this._outputCells.values())oe.rerender()}async renderOutputCell(oe,fe){const pe=await Promise.all([oe.rendererId?$.load(oe.rendererId):void 0,...oe.requiredPreloads.map(Ce=>X.waitFor(Ce.uri))].map(Ce=>Ce?.catch(ve=>ve)));if(fe.cancelled)return;const me=this.ensureOutputCell(oe.cellId,oe.cellTop,!1);me.createOutputElement(oe.outputId,oe.outputOffset,oe.left).render(oe.content,pe),me.element.style.visibility=oe.initiallyHidden?"hidden":"visible"}ensureOutputCell(oe,fe,pe){let me=this._outputCells.get(oe);const be=!!me;return me||(me=new se(oe),this._outputCells.set(oe,me)),be&&pe||(me.element.style.top=fe+"px"),me}clearOutput(oe,fe,pe){this._outputCells.get(oe)?.clearOutput(fe,pe)}showOutput(oe,fe,pe){this._outputCells.get(oe)?.show(fe,pe)}updateAndRerender(oe,fe,pe){this._outputCells.get(oe)?.updateContentAndRerender(fe,pe)}hideOutput(oe){this._outputCells.get(oe)?.hide()}updateOutputHeight(oe,fe,pe){this._outputCells.get(oe)?.updateOutputHeight(fe,pe)}updateOutputsScroll(oe){for(const fe of oe)this._outputCells.get(fe.cellId)?.updateScroll(fe)}};class ee{static highlightCodeBlock(oe,fe){const pe=ee.pendingCodeBlocksToHighlight.get(oe);if(!pe)return;const me=z?.createHTML(fe)??fe;pe.innerHTML=me,o&&pe.insertAdjacentElement("beforebegin",o.cloneNode(!0))}static requestHighlightCodeBlock(oe){const fe=[];let pe=0;for(const me of oe.querySelectorAll(".vscode-code-block")){const be=me.getAttribute("data-vscode-code-block-lang");if(me.textContent&&be){const Ce=`${Date.now()}-${pe++}`;fe.push({value:me.textContent,lang:be,id:Ce}),ee.pendingCodeBlocksToHighlight.set(Ce,me)}}return fe}}ee.pendingCodeBlocksToHighlight=new Map;class te{constructor(oe,fe,pe,me){this.id=oe,this._content={value:pe,version:0};let be;this.ready=new Promise(ge=>be=ge);let Ce;this.outputItem=Object.freeze({id:oe,mime:fe,metadata:void 0,text:()=>this._content.value,json:()=>{},data:()=>{if(Ce?.version===this._content.version)return Ce.value;const ge=A.encode(this._content.value);return Ce={version:this._content.version,value:ge},ge},blob(){return new Blob([this.data()],{type:this.mime})}});const ve=document.getElementById("container"),he=document.createElement("div");he.className="markup",he.style.position="absolute",he.style.width="100%",this.element=document.createElement("div"),this.element.id=this.id,this.element.classList.add("preview"),this.element.style.position="absolute",this.element.style.top=me+"px",this.toggleDragDropEnabled(D.dragAndDropEnabled),he.appendChild(this.element),ve.appendChild(he),this.addEventListeners(),this.updateContentAndRender(this._content.value).then(()=>{h.observe(this.element,this.id,!1),be()})}addEventListeners(){this.element.addEventListener("dblclick",()=>{ce("toggleMarkupPreview",{cellId:this.id})}),this.element.addEventListener("click",oe=>{ce("clickMarkupCell",{cellId:this.id,altKey:oe.altKey,ctrlKey:oe.ctrlKey,metaKey:oe.metaKey,shiftKey:oe.shiftKey})}),this.element.addEventListener("contextmenu",oe=>{ce("contextMenuMarkupCell",{cellId:this.id,clientX:oe.clientX,clientY:oe.clientY})}),this.element.addEventListener("mouseenter",()=>{ce("mouseEnterMarkupCell",{cellId:this.id})}),this.element.addEventListener("mouseleave",()=>{ce("mouseLeaveMarkupCell",{cellId:this.id})}),this.element.addEventListener("dragstart",oe=>{ae.startDrag(oe,this.id)}),this.element.addEventListener("drag",oe=>{ae.updateDrag(oe,this.id)}),this.element.addEventListener("dragend",oe=>{ae.endDrag(oe,this.id)})}async updateContentAndRender(oe){this._content={value:oe,version:this._content.version+1},await $.render(this.outputItem,this.element);const fe=this.element.shadowRoot??this.element,pe=[];for(const be of fe.children)switch(be.tagName){case"LINK":case"SCRIPT":case"STYLE":break;default:pe.push(be.outerHTML);break}const me=ee.requestHighlightCodeBlock(fe);ce("renderedMarkup",{cellId:this.id,html:pe.join(""),codeBlocks:me}),n.updateHeight(this.id,this.element.offsetHeight,{isOutput:!1})}show(oe,fe){this.element.style.visibility="visible",this.element.style.top=`${oe}px`,typeof fe=="string"?this.updateContentAndRender(fe):this.updateMarkupDimensions()}hide(){this.element.style.visibility="hidden"}unhide(){this.element.style.visibility="visible",this.updateMarkupDimensions()}rerender(){this.updateContentAndRender(this._content.value)}remove(){this.element.remove()}async updateMarkupDimensions(){n.updateHeight(this.id,this.element.offsetHeight,{isOutput:!1})}setSelected(oe){this.element.classList.toggle("selected",oe)}toggleDragDropEnabled(oe){oe?(this.element.classList.add("draggable"),this.element.setAttribute("draggable","true")):(this.element.classList.remove("draggable"),this.element.removeAttribute("draggable"))}}class se{constructor(oe){this.outputElements=new Map;const fe=document.getElementById("container"),pe=b(oe);fe.appendChild(pe),this.element=document.createElement("div"),this.element.style.position="absolute",this.element.id=oe,this.element.classList.add("cell_container"),fe.appendChild(this.element),this.element=this.element;const me=b(oe,!0);fe.appendChild(me)}createOutputElement(oe,fe,pe){let me=this.outputElements.get(oe);return me||(me=new ie(oe),this.element.appendChild(me.element),this.outputElements.set(oe,me)),me.createOutputElement(oe,fe,pe)}clearOutput(oe,fe){this.outputElements.get(oe)?.clear(fe),this.outputElements.delete(oe)}show(oe,fe){const pe=this.outputElements.get(oe);!pe||(this.element.style.visibility="visible",this.element.style.top=`${fe}px`,n.updateHeight(oe,pe.element.offsetHeight,{isOutput:!0}))}hide(){this.element.style.visibility="hidden"}updateContentAndRerender(oe,fe){this.outputElements.get(oe)?.updateContentAndRender(fe)}rerender(){for(const oe of this.outputElements.values())oe.rerender()}updateOutputHeight(oe,fe){this.outputElements.get(oe)?.updateHeight(fe)}updateScroll(oe){this.element.style.top=`${oe.cellTop}px`,this.outputElements.get(oe.outputId)?.updateScroll(oe.outputOffset),oe.forceDisplay&&(this.element.style.visibility="visible")}}class ie{constructor(oe){this.outputId=oe,this.element=document.createElement("div"),this.element.classList.add("output_container"),this.element.style.position="absolute",this.element.style.overflow="hidden"}clear(oe){oe&&$.clearOutput(oe,this.outputId),this.element.remove()}updateHeight(oe){this.element.style.maxHeight=`${oe}px`,this.element.style.height=`${oe}px`}updateScroll(oe){this.element.style.top=`${oe}px`}createOutputElement(oe,fe,pe){return this.element.innerText="",this.element.style.maxHeight="0px",this.element.style.top=`${fe}px`,this._outputNode=new le(oe,pe),this.element.appendChild(this._outputNode.element),this._outputNode}rerender(){this._outputNode?.rerender()}updateContentAndRender(oe){this._outputNode?.updateAndRerender(oe)}}C.postMessage({__vscode_notebook_message:!0,type:"initialized"});function ce(ue,oe){C.postMessage({__vscode_notebook_message:!0,type:ue,...oe})}class le{constructor(oe,fe){this.outputId=oe,this.hasResizeObserver=!1,this.element=document.createElement("div"),this.element.id=oe,this.element.classList.add("output"),this.element.style.position="absolute",this.element.style.top="0px",this.element.style.left=fe+"px",this.element.style.padding="0px",E(this.element,oe),L(this.element,oe)}render(oe,fe){if(this._content={content:oe,preloadsAndErrors:fe},oe.type===0){const ve=z?.createHTML(oe.htmlContent)??oe.htmlContent;this.element.innerHTML=ve,l(this.element)}else if(fe.some(ve=>ve instanceof Error)){const ve=fe.filter(he=>he instanceof Error);N(this.element,...ve)}else{const ve=fe[0];try{ve.renderOutputItem(B(this.outputId,oe.mimeType,oe.metadata,oe.valueBytes),this.element)}catch(he){N(this.element,he)}}this.hasResizeObserver||(this.hasResizeObserver=!0,h.observe(this.element,this.outputId,!0));const pe=this.element.offsetHeight,me=document.defaultView.getComputedStyle(this.element);pe!==0&&me.padding==="0px"?(n.updateHeight(this.outputId,pe+_.style.outputNodePadding*2,{isOutput:!0,init:!0}),this.element.style.padding=`${_.style.outputNodePadding}px ${_.style.outputNodePadding}px ${_.style.outputNodePadding}px ${_.style.outputNodeLeftPadding}`):n.updateHeight(this.outputId,this.element.offsetHeight,{isOutput:!0,init:!0});const be=this.element.shadowRoot??this.element,Ce=ee.requestHighlightCodeBlock(be);Ce.length>0&&ce("renderedCellOutput",{codeBlocks:Ce})}rerender(){this._content&&this.render(this._content.content,this._content.preloadsAndErrors)}updateAndRerender(oe){this._content&&(this._content.content=oe,this.render(this._content.content,this._content.preloadsAndErrors))}}const ae=new class{constructor(){document.addEventListener("dragover",oe=>{oe.preventDefault()}),document.addEventListener("drop",oe=>{oe.preventDefault();const fe=this.currentDrag;!fe||(this.currentDrag=void 0,ce("cell-drop",{cellId:fe.cellId,ctrlKey:oe.ctrlKey,altKey:oe.altKey,dragOffsetY:oe.clientY}))})}startDrag(oe,fe){if(!oe.dataTransfer||!D.dragAndDropEnabled)return;this.currentDrag={cellId:fe,clientY:oe.clientY};const pe=9999;this.dragOverlay||(this.dragOverlay=document.createElement("div"),this.dragOverlay.style.position="absolute",this.dragOverlay.style.top="0",this.dragOverlay.style.left="0",this.dragOverlay.style.zIndex=`${pe}`,this.dragOverlay.style.width="100%",this.dragOverlay.style.height="100%",this.dragOverlay.style.background="transparent",document.body.appendChild(this.dragOverlay)),oe.target.style.zIndex=`${pe+1}`,oe.target.classList.add("dragging"),ce("cell-drag-start",{cellId:fe,dragOffsetY:oe.clientY});const me=()=>{this.currentDrag?.cellId===fe&&(ce("cell-drag",{cellId:fe,dragOffsetY:this.currentDrag.clientY}),requestAnimationFrame(me))};requestAnimationFrame(me)}updateDrag(oe,fe){fe!==this.currentDrag?.cellId?this.currentDrag=void 0:this.currentDrag={cellId:fe,clientY:oe.clientY}}endDrag(oe,fe){this.currentDrag=void 0,oe.target.classList.remove("dragging"),ce("cell-drag-end",{cellId:fe}),this.dragOverlay&&(document.body.removeChild(this.dragOverlay),this.dragOverlay=void 0),oe.target.style.zIndex=""}}}function f(_,A,k,D,I,w){const v={style:_,options:A,rendererData:k,isWorkspaceTrusted:D,lineLimit:I,nonce:w};return` const __import = (x) => import(x); (${t})( JSON.parse(decodeURIComponent("${encodeURIComponent(JSON.stringify(v))}")) ) //# sourceURL=notebookWebviewPreloads.js `}e.preloadsScriptStr=f}),define(ne[2165],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.transformWebviewThemeVars=void 0;const t=new Map([["theme-font-family","vscode-font-family"],["theme-font-weight","vscode-font-weight"],["theme-font-size","vscode-font-size"],["theme-code-font-family","vscode-editor-font-family"],["theme-code-font-weight","vscode-editor-font-weight"],["theme-code-font-size","vscode-editor-font-size"],["theme-scrollbar-background","vscode-scrollbarSlider-background"],["theme-scrollbar-hover-background","vscode-scrollbarSlider-hoverBackground"],["theme-scrollbar-active-background","vscode-scrollbarSlider-activeBackground"],["theme-quote-background","vscode-textBlockQuote-background"],["theme-quote-border","vscode-textBlockQuote-border"],["theme-code-foreground","vscode-textPreformat-foreground"],["theme-background","vscode-editor-background"],["theme-foreground","vscode-editor-foreground"],["theme-ui-foreground","vscode-foreground"],["theme-link","vscode-textLink-foreground"],["theme-link-active","vscode-textLink-activeForeground"],["theme-button-background","vscode-button-background"],["theme-button-hover-background","vscode-button-hoverBackground"],["theme-button-foreground","vscode-button-foreground"],["theme-button-secondary-background","vscode-button-secondaryBackground"],["theme-button-secondary-hover-background","vscode-button-secondaryHoverBackground"],["theme-button-secondary-foreground","vscode-button-secondaryForeground"],["theme-button-hover-foreground","vscode-button-foreground"],["theme-button-focus-foreground","vscode-button-foreground"],["theme-button-secondary-hover-foreground","vscode-button-secondaryForeground"],["theme-button-secondary-focus-foreground","vscode-button-secondaryForeground"],["theme-input-background","vscode-input-background"],["theme-input-foreground","vscode-input-foreground"],["theme-input-placeholder-foreground","vscode-input-placeholderForeground"],["theme-input-focus-border-color","vscode-focusBorder"],["theme-menu-background","vscode-menu-background"],["theme-menu-foreground","vscode-menu-foreground"],["theme-menu-hover-background","vscode-menu-selectionBackground"],["theme-menu-focus-background","vscode-menu-selectionBackground"],["theme-menu-hover-foreground","vscode-menu-selectionForeground"],["theme-menu-focus-foreground","vscode-menu-selectionForeground"],["theme-error-background","vscode-inputValidation-errorBackground"],["theme-error-foreground","vscode-foreground"],["theme-warning-background","vscode-inputValidation-warningBackground"],["theme-warning-foreground","vscode-foreground"],["theme-info-background","vscode-inputValidation-infoBackground"],["theme-info-foreground","vscode-foreground"],["theme-notebook-output-background","vscode-notebook-outputContainerBackgroundColor"],["theme-notebook-output-border","vscode-notebook-outputContainerBorderColor"],["theme-notebook-cell-selected-background","vscode-notebook-selectedCellBackground"],["theme-notebook-symbol-highlight-background","vscode-notebook-symbolHighlightBackground"],["theme-notebook-diff-removed-background","vscode-diffEditor-removedTextBackground"],["theme-notebook-diff-inserted-background","vscode-diffEditor-insertedTextBackground"]]),f={"theme-input-border-width":"1px","theme-button-primary-hover-shadow":"none","theme-button-secondary-hover-shadow":"none","theme-input-border-color":"transparent"},_=A=>{const k={...A,...f};for(const[D,I]of t)k[D]=A[I];return k};e.transformWebviewThemeVars=_}),define(ne[2166],re([1,0,6,2]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookCellSelectionCollection=void 0;function _(k,D){if(k.length!==D.length)return!1;for(let I=0;I<k.length;I++)if(k[I].start!==D[I].start||k[I].end!==D[I].end)return!1;return!0}class A extends f.Disposable{constructor(){super(...arguments);this._onDidChangeSelection=this._register(new t.Emitter),this._primary=null,this._selections=[]}get onDidChangeSelection(){return this._onDidChangeSelection.event}get selections(){return this._selections}get selection(){return this._selections[0]}get focus(){return this._primary??{start:0,end:0}}setState(D,I,w,v){const C=D!==this._primary||!_(this._selections,I);this._primary=D,this._selections=I,(C||w)&&this._onDidChangeSelection.fire(v)}setFocus(D,I,w){this.setState(D,this._selections,I,w)}setSelections(D,I,w){this.setState(this._primary,D,I,w)}}e.NotebookCellSelectionCollection=A}),define(ne[2167],re([1,0,6,2,488]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookEventDispatcher=void 0;class A extends f.Disposable{constructor(){super(...arguments);this._onDidChangeLayout=this._register(new t.Emitter),this.onDidChangeLayout=this._onDidChangeLayout.event,this._onDidChangeMetadata=this._register(new t.Emitter),this.onDidChangeMetadata=this._onDidChangeMetadata.event,this._onDidChangeCellState=this._register(new t.Emitter),this.onDidChangeCellState=this._onDidChangeCellState.event}emit(D){for(let I=0,w=D.length;I<w;I++){const v=D[I];switch(v.type){case _.NotebookViewEventType.LayoutChanged:this._onDidChangeLayout.fire(v);break;case _.NotebookViewEventType.MetadataChanged:this._onDidChangeMetadata.fire(v);break;case _.NotebookViewEventType.CellStateChanged:this._onDidChangeCellState.fire(v);break}}}}e.NotebookEventDispatcher=A}),define(ne[2168],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewContext=void 0;class t{constructor(_,A){this.notebookOptions=_,this.eventDispatcher=A}}e.ViewContext=t}),define(ne[2169],re([1,0,10,9,29,306,746]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookDecorationCSSRules=e.NotebookRefCountedStyleSheet=void 0;class D{constructor(o,c,i){this.widget=o,this._key=c,this._styleSheet=i,this._refCount=0}ref(){this._refCount++}unref(){this._refCount--,this._refCount===0&&(this._styleSheet.parentNode?.removeChild(this._styleSheet),this.widget.removeEditorStyleSheets(this._key))}insertRule(o,c){this._styleSheet.sheet.insertRule(o,c)}}e.NotebookRefCountedStyleSheet=D;class I{constructor(o,c,i){this._themeService=o,this._styleSheet=c,this._providerArgs=i,this._styleSheet.ref(),this._theme=this._themeService.getColorTheme(),this._className=v.getClassName(this._providerArgs.key,0),this._topClassName=v.getClassName(this._providerArgs.key,0),this._buildCSS()}get className(){return this._className}get topClassName(){return this._topClassName}_buildCSS(){if(this._providerArgs.options.backgroundColor){const o=this._resolveValue(this._providerArgs.options.backgroundColor);this._styleSheet.insertRule(`.monaco-workbench .notebookOverlay .monaco-list .monaco-list-row.code-cell-row.${this.className} .cell-focus-indicator, .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row.markdown-cell-row.${this.className} { background-color: ${o} !important; }`)}if(this._providerArgs.options.borderColor){const o=this._resolveValue(this._providerArgs.options.borderColor);this._styleSheet.insertRule(`.monaco-workbench .notebookOverlay .monaco-list .monaco-list-row.${this.className} .cell-focus-indicator-top:before, .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row.${this.className} .cell-focus-indicator-bottom:before { border-color: ${o} !important; }`),this._styleSheet.insertRule(` .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row.${this.className} .cell-focus-indicator-bottom:before { content: ""; position: absolute; width: 100%; height: 1px; border-bottom: 1px solid ${o}; bottom: 0px; `),this._styleSheet.insertRule(` .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row.${this.className} .cell-focus-indicator-top:before { content: ""; position: absolute; width: 100%; height: 1px; border-top: 1px solid ${o}; `),this._styleSheet.insertRule(`.monaco-workbench .notebookOverlay .monaco-list:focus-within .monaco-list-row.focused.${this.className} .cell-focus-indicator-top:before, .monaco-workbench .notebookOverlay .monaco-list:focus-within .monaco-list-row.focused.${this.className} .cell-focus-indicator-bottom:before { border-color: ${o} !important; }`)}if(this._providerArgs.options.top){const o=this._getCSSTextForModelDecorationContentClassName(this._providerArgs.options.top);this._styleSheet.insertRule(`.monaco-workbench .notebookOverlay .monaco-list .monaco-list-row.${this.className} .cell-decoration .${this.topClassName} { height: 1rem; display: block; }`),this._styleSheet.insertRule(`.monaco-workbench .notebookOverlay .monaco-list .monaco-list-row.${this.className} .cell-decoration .${this.topClassName}::before { display: block; ${o} }`)}}_getCSSTextForModelDecorationContentClassName(o){if(!o)return"";const c=[];if(typeof o!="undefined"){if(this._collectBorderSettingsCSSText(o,c),typeof o.contentIconPath!="undefined"&&c.push(_.format(k._CSS_MAP.contentIconPath,t.asCSSUrl(f.URI.revive(o.contentIconPath)))),typeof o.contentText=="string"){const S=o.contentText.match(/^.*$/m)[0].replace(/['\\]/g,"\\$&");c.push(_.format(k._CSS_MAP.contentText,S))}this._collectCSSText(o,["fontStyle","fontWeight","textDecoration","color","opacity","backgroundColor","margin"],c),this._collectCSSText(o,["width","height"],c)&&c.push("display:inline-block;")}return c.join("")}_collectBorderSettingsCSSText(o,c){return this._collectCSSText(o,["border","borderColor","borderRadius","borderSpacing","borderStyle","borderWidth"],c)?(c.push(_.format("box-sizing: border-box;")),!0):!1}_collectCSSText(o,c,i){const S=i.length;for(const s of c){const l=this._resolveValue(o[s]);typeof l=="string"&&i.push(_.format(k._CSS_MAP[s],l))}return i.length!==S}_resolveValue(o){if((0,A.isThemeColor)(o)){const c=this._theme.getColor(o.id);return c?c.toString():"transparent"}return o}dispose(){this._styleSheet.unref()}}e.NotebookDecorationCSSRules=I;var w;(function(C){C[C.ClassName=0]="ClassName",C[C.TopClassName=0]="TopClassName"})(w||(w={}));class v{static getClassName(o,c){return"nb-"+o+"-"+c}}}),define(ne[2170],re([1,0,77,128,12]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookOverviewRuler=void 0;let A=class extends _.Themable{constructor(D,I,w){super(w);this.notebookEditor=D,this._lanes=3,this._domNode=(0,f.createFastDomNode)(document.createElement("canvas")),this._domNode.setPosition("relative"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),I.appendChild(this._domNode.domNode),this._register(D.onDidChangeDecorations(()=>{this.layout()})),this._register(t.PixelRatio.onDidChange(()=>{this.layout()}))}layout(){const D=10,I=this.notebookEditor.getLayoutInfo(),w=I.scrollHeight,v=I.height,C=t.PixelRatio.value;this._domNode.setWidth(D),this._domNode.setHeight(v),this._domNode.domNode.width=D*C,this._domNode.domNode.height=v*C;const o=this._domNode.domNode.getContext("2d");o.clearRect(0,0,D*C,v*C),this._render(o,D*C,v*C,w*C,C)}_render(D,I,w,v,C){const o=this.notebookEditor._getViewModel(),c=this.notebookEditor.getLayoutInfo().fontInfo,i=I/this._lanes;let S=0;if(o)for(let s=0;s<o.viewCells.length;s++){const l=o.viewCells[s],r=l.textBuffer,p=l.getCellDecorations(),u=l.layoutInfo.totalHeight/v*C*w;p.filter(a=>a.overviewRuler).forEach(a=>{const n=a.overviewRuler,h=this.getColor(n.color)?.toString()||"#000000",g=Math.min(c.lineHeight,l.layoutInfo.editorHeight/v/r.getLineCount()*C*w),d=n.modelRanges.map(m=>m.startLineNumber).reduce((m,b)=>((m.length===0||m[m.length-1]!==b)&&m.push(b),m),[]);for(let m=0;m<d.length;m++){D.fillStyle=h;const E=(d[m]-1)*g;D.fillRect(i,S+E,i,g)}if(n.includeOutput){D.fillStyle=h;const m=l.layoutInfo.editorHeight/v*C*w,b=c.lineHeight/v*C*w;D.fillRect(i,S+m,i,b)}}),S+=u}}};A=Ee([W(2,_.IThemeService)],A),e.NotebookOverviewRuler=A}),define(ne[2171],re([1,0,10,163,2,73,16,37,5,414]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListTopCellToolbar=void 0;let v=class extends _.Disposable{constructor(o,c,i,S,s,l){super();this.notebookEditor=o,this.instantiationService=S,this.contextMenuService=s,this.menuService=l,this._modelDisposables=this._register(new _.DisposableStore),this.topCellToolbar=t.append(i,t.$(".cell-list-top-cell-toolbar-container")),this.toolbar=this._register(new f.ToolBar(this.topCellToolbar,this.contextMenuService,{actionViewItemProvider:r=>{if(r instanceof k.MenuItemAction)return this.instantiationService.createInstance(w.CodiconActionViewItem,r)}})),this.toolbar.context={notebookEditor:o},this.menu=this._register(this.menuService.createMenu(this.notebookEditor.creationOptions.menuIds.cellTopInsertToolbar,c)),this._register(this.menu.onDidChange(()=>{this.updateActions()})),this.updateActions(),this._register(this.notebookEditor.onDidChangeModel(()=>{this._modelDisposables.clear(),this.notebookEditor.hasModel()&&(this._modelDisposables.add(this.notebookEditor.onDidChangeViewCells(()=>{this.updateClass()})),this.updateClass())})),this.updateClass()}updateActions(){const o=this.getCellToolbarActions(this.menu,!1);this.toolbar.setActions(o.primary,o.secondary)}updateClass(){this.notebookEditor.hasModel()&&this.notebookEditor.getLength()===0?this.topCellToolbar.classList.add("emptyNotebook"):this.topCellToolbar.classList.remove("emptyNotebook")}getCellToolbarActions(o,c){const s={primary:[],secondary:[]};return(0,A.createAndFillInActionBarActions)(o,{shouldForwardArgs:!0},s,l=>/^inline/.test(l)),s}};v=Ee([W(3,I.IInstantiationService),W(4,D.IContextMenuService),W(5,k.IMenuService)],v),e.ListTopCellToolbar=v}),define(ne[2172],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellMetadataEdit=e.SpliceCellsEdit=e.MoveCellEdit=void 0;class t{constructor(k,D,I,w,v,C,o){this.resource=k,this.fromIndex=D,this.length=I,this.toIndex=w,this.editingDelegate=v,this.beforedSelections=C,this.endSelections=o,this.type=0,this.label="Move Cell",this.code="undoredo.notebooks.moveCell"}undo(){if(!this.editingDelegate.moveCell)throw new Error("Notebook Move Cell not implemented for Undo/Redo");this.editingDelegate.moveCell(this.toIndex,this.length,this.fromIndex,this.endSelections,this.beforedSelections)}redo(){if(!this.editingDelegate.moveCell)throw new Error("Notebook Move Cell not implemented for Undo/Redo");this.editingDelegate.moveCell(this.fromIndex,this.length,this.toIndex,this.beforedSelections,this.endSelections)}}e.MoveCellEdit=t;class f{constructor(k,D,I,w,v){this.resource=k,this.diffs=D,this.editingDelegate=I,this.beforeHandles=w,this.endHandles=v,this.type=0,this.label="Insert Cell",this.code="undoredo.notebooks.insertCell"}undo(){if(!this.editingDelegate.replaceCell)throw new Error("Notebook Replace Cell not implemented for Undo/Redo");this.diffs.forEach(k=>{this.editingDelegate.replaceCell(k[0],k[2].length,k[1],this.beforeHandles)})}redo(){if(!this.editingDelegate.replaceCell)throw new Error("Notebook Replace Cell not implemented for Undo/Redo");this.diffs.reverse().forEach(k=>{this.editingDelegate.replaceCell(k[0],k[1].length,k[2],this.endHandles)})}}e.SpliceCellsEdit=f;class _{constructor(k,D,I,w,v){this.resource=k,this.index=D,this.oldMetadata=I,this.newMetadata=w,this.editingDelegate=v,this.type=0,this.label="Update Cell Metadata",this.code="undoredo.notebooks.updateCellMetadata"}undo(){!this.editingDelegate.updateCellMetadata||this.editingDelegate.updateCellMetadata(this.index,this.oldMetadata)}redo(){!this.editingDelegate.updateCellMetadata||this.editingDelegate.updateCellMetadata(this.index,this.newMetadata)}}e.CellMetadataEdit=_}),define(ne[799],re([1,0,6,2]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookCellOutputTextModel=void 0;class _ extends f.Disposable{constructor(k){super();this._rawOutput=k,this._onDidChangeData=this._register(new t.Emitter),this.onDidChangeData=this._onDidChangeData.event}get outputs(){return this._rawOutput.outputs||[]}get metadata(){return this._rawOutput.metadata}get outputId(){return this._rawOutput.outputId}replaceData(k){this._rawOutput.outputs=k,this._onDidChangeData.fire()}appendData(k){this._rawOutput.outputs.push(...k),this._onDidChangeData.fire()}toJSON(){return{metadata:this._rawOutput.metadata,outputs:this._rawOutput.outputs,outputId:this._rawOutput.outputId}}}e.NotebookCellOutputTextModel=_}),define(ne[489],re([1,0,6,116,2,89,20,529,694,126,799]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cloneNotebookCellTextModel=e.NotebookCellTextModel=void 0;class C extends _.Disposable{constructor(S,s,l,r,p,u,a,n,h,g,d,m){super();this.uri=S,this.handle=s,this._source=l,this._language=r,this._mime=p,this.cellKind=u,this.collapseState=g,this.transientOptions=d,this._languageService=m,this._onDidChangeOutputs=this._register(new t.Emitter),this.onDidChangeOutputs=this._onDidChangeOutputs.event,this._onDidChangeOutputItems=this._register(new t.Emitter),this.onDidChangeOutputItems=this._onDidChangeOutputItems.event,this._onDidChangeContent=this._register(new t.Emitter),this.onDidChangeContent=this._onDidChangeContent.event,this._onDidChangeMetadata=this._register(new t.Emitter),this.onDidChangeMetadata=this._onDidChangeMetadata.event,this._onDidChangeInternalMetadata=this._register(new t.Emitter),this.onDidChangeInternalMetadata=this._onDidChangeInternalMetadata.event,this._onDidChangeLanguage=this._register(new t.Emitter),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._hash=null,this._versionId=1,this._alternativeId=1,this._textModelDisposables=this._register(new _.DisposableStore),this._textModel=void 0,this._outputs=a.map(b=>new v.NotebookCellOutputTextModel(b)),this._metadata=n??{},this._internalMetadata=h??{}}get outputs(){return this._outputs}get metadata(){return this._metadata}set metadata(S){this._metadata=S,this._hash=null,this._onDidChangeMetadata.fire()}get internalMetadata(){return this._internalMetadata}set internalMetadata(S){const s=this._internalMetadata.lastRunSuccess!==S.lastRunSuccess;S={...S,runStartTimeAdjustment:c(this._internalMetadata,S)},this._internalMetadata=S,this._hash=null,this._onDidChangeInternalMetadata.fire({lastRunSuccessChanged:s})}get language(){return this._language}set language(S){if(this._textModel&&this._textModel.getLanguageId()===this._languageService.getLanguageIdByLanguageName(S)&&this._textModel.getLanguageId()===this._languageService.getLanguageIdByLanguageName(this.language))return;const s=this._languageService.getLanguageIdByLanguageName(S);if(s!==null){if(this._textModel){const l=this._languageService.createById(s);this._textModel.setMode(l.languageId)}this._language!==S&&(this._language=S,this._hash=null,this._onDidChangeLanguage.fire(S),this._onDidChangeContent.fire("language"))}}get mime(){return this._mime}set mime(S){this._mime!==S&&(this._mime=S,this._hash=null,this._onDidChangeContent.fire("mime"))}get textBuffer(){if(this._textBuffer)return this._textBuffer;const S=new I.PieceTreeTextBufferBuilder;S.acceptChunk(this._source);const s=S.finish(!0),{textBuffer:l,disposable:r}=s.create(1);return this._textBuffer=l,this._register(r),this._register(this._textBuffer.onDidChangeContent(()=>{this._hash=null,this._textModel||this._onDidChangeContent.fire("content")})),this._textBuffer}get alternativeId(){return this._alternativeId}get textModel(){return this._textModel}set textModel(S){this._textModel!==S&&(this._textModelDisposables.clear(),this._textModel=S,this._textModel&&(this._languageService.isRegisteredLanguageId(this.language)===!1&&(this._textModel.getLanguageId()===w.PLAINTEXT_LANGUAGE_ID||this._textModel.getLanguageId()==="jupyter")||(this.language=this._textModel.getLanguageId()),this._textModelDisposables.add(this._textModel.onDidChangeLanguage(s=>{this.language=s.newLanguage})),this._textModelDisposables.add(this._textModel.onWillDispose(()=>this.textModel=void 0)),this._textModelDisposables.add(this._textModel.onDidChangeContent(()=>{this._textModel&&(this._versionId=this._textModel.getVersionId(),this._alternativeId=this._textModel.getAlternativeVersionId()),this._onDidChangeContent.fire("content")})),this._textModel._overwriteVersionId(this._versionId),this._textModel._overwriteAlternativeVersionId(this._versionId)))}resetTextBuffer(S){this._textBuffer=S}getValue(){const S=this.getFullModelRange();return this.textBuffer.getEOL()===` `?this.textBuffer.getValueInRange(S,1):this.textBuffer.getValueInRange(S,2)}getHashValue(){return this._hash!==null?this._hash:(this._hash=(0,f.hash)([(0,f.hash)(this.language),(0,f.hash)(this.getValue()),this._getPersisentMetadata(),this.transientOptions.transientOutputs?[]:this._outputs.map(S=>({outputs:S.outputs.map(s=>({mime:s.mime,data:Array.from(s.data.buffer)})),metadata:S.metadata}))]),this._hash)}_getPersisentMetadata(){const S={},s=this.transientOptions.transientCellMetadata,l=new Set([...Object.keys(this.metadata)]);for(const r of l)s[r]||(S[r]=this.metadata[r]);return S}getTextLength(){return this.textBuffer.getLength()}getFullModelRange(){const S=this.textBuffer.getLineCount();return new k.Range(1,1,S,this.textBuffer.getLineLength(S)+1)}spliceNotebookCellOutputs(S){this.outputs.splice(S.start,S.deleteCount,...S.newOutputs),this._onDidChangeOutputs.fire(S)}changeOutputItems(S,s,l){const r=this.outputs.findIndex(u=>u.outputId===S);if(r<0)return!1;const p=this.outputs[r];return s?p.appendData(l):p.replaceData(l),this._onDidChangeOutputItems.fire(),!0}_outputNotEqualFastCheck(S,s){if(S.length!==s.length)return!1;for(let l=0;l<this.outputs.length;l++){const r=S[l],p=s[l];if(r.outputs.length!==p.outputs.length)return!1;for(let u=0;u<r.outputs.length;u++)if(r.outputs[u].mime!==p.outputs[u].mime||r.outputs[u].data.byteLength!==p.outputs[u].data.byteLength)return!1}return!0}equal(S){return this.language!==S.language||this.getTextLength()!==S.getTextLength()||!this.transientOptions.transientOutputs&&!this._outputNotEqualFastCheck(this.outputs,S.outputs)?!1:this.getHashValue()===S.getHashValue()}dispose(){(0,_.dispose)(this._outputs);const S=new D.PieceTreeTextBuffer([],"",` `,!1,!1,!0,!0);S.dispose(),this._textBuffer=S,super.dispose()}}e.NotebookCellTextModel=C;function o(i){return{source:i.getValue(),language:i.language,mime:i.mime,cellKind:i.cellKind,outputs:i.outputs.map(S=>({outputs:S.outputs,outputId:A.generateUuid()})),metadata:{...i.metadata}}}e.cloneNotebookCellTextModel=o;function c(i,S){if(i.runStartTime!==S.runStartTime&&typeof S.runStartTime=="number"){const s=Date.now()-S.runStartTime;return s<0?Math.abs(s):0}else return S.runStartTimeAdjustment}}),define(ne[357],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INotebookCellStatusBarService=void 0,e.INotebookCellStatusBarService=(0,t.createDecorator)("notebookCellStatusBarService")}),define(ne[64],re([1,0,152,92,169,18,48,14,7]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookWorkingCopyTypeIdentifier=e.CellStatusbarAlignment=e.NotebookSetting=e.CellSequence=e.notebookDocumentFilterMatch=e.isDocumentExcludePattern=e.NotebookEditorPriority=e.NOTEBOOK_EDITOR_CURSOR_BOUNDARY=e.diff=e.MimeTypeDisplayOrder=e.CellUri=e.CellEditType=e.SelectionStateType=e.NotebookCellsChangeType=e.RendererMessagingSpec=e.NotebookRendererMatch=e.NotebookCellExecutionState=e.NotebookRunState=e.RENDERER_NOT_AVAILABLE=e.RENDERER_EQUIVALENT_EXTENSIONS=e.ACCESSIBLE_NOTEBOOK_DISPLAY_ORDER=e.NOTEBOOK_DISPLAY_ORDER=e.CellKind=e.NOTEBOOK_DIFF_EDITOR_ID=e.NOTEBOOK_EDITOR_ID=void 0,e.NOTEBOOK_EDITOR_ID="workbench.editor.notebook",e.NOTEBOOK_DIFF_EDITOR_ID="workbench.editor.notebookTextDiffEditor";var w;(function(b){b[b.Markup=1]="Markup",b[b.Code=2]="Code"})(w=e.CellKind||(e.CellKind={})),e.NOTEBOOK_DISPLAY_ORDER=["application/json","application/javascript","text/html","image/svg+xml",_.Mimes.latex,_.Mimes.markdown,"image/png","image/jpeg",_.Mimes.text],e.ACCESSIBLE_NOTEBOOK_DISPLAY_ORDER=[_.Mimes.latex,_.Mimes.markdown,"application/json",_.Mimes.text,"text/html","image/svg+xml","image/png","image/jpeg"],e.RENDERER_EQUIVALENT_EXTENSIONS=new Map([["ms-toolsai.jupyter",new Set(["jupyter-notebook","interactive"])],["ms-toolsai.jupyter-renderers",new Set(["jupyter-notebook","interactive"])]]),e.RENDERER_NOT_AVAILABLE="_notAvailable";var v;(function(b){b[b.Running=1]="Running",b[b.Idle=2]="Idle"})(v=e.NotebookRunState||(e.NotebookRunState={}));var C;(function(b){b[b.Unconfirmed=1]="Unconfirmed",b[b.Pending=2]="Pending",b[b.Executing=3]="Executing"})(C=e.NotebookCellExecutionState||(e.NotebookCellExecutionState={}));var o;(function(b){b[b.WithHardKernelDependency=0]="WithHardKernelDependency",b[b.WithOptionalKernelDependency=1]="WithOptionalKernelDependency",b[b.Pure=2]="Pure",b[b.Never=3]="Never"})(o=e.NotebookRendererMatch||(e.NotebookRendererMatch={}));var c;(function(b){b.Always="always",b.Never="never",b.Optional="optional"})(c=e.RendererMessagingSpec||(e.RendererMessagingSpec={}));var i;(function(b){b[b.ModelChange=1]="ModelChange",b[b.Move=2]="Move",b[b.ChangeLanguage=5]="ChangeLanguage",b[b.Initialize=6]="Initialize",b[b.ChangeCellMetadata=7]="ChangeCellMetadata",b[b.Output=8]="Output",b[b.OutputItem=9]="OutputItem",b[b.ChangeCellContent=10]="ChangeCellContent",b[b.ChangeDocumentMetadata=11]="ChangeDocumentMetadata",b[b.ChangeCellInternalMetadata=12]="ChangeCellInternalMetadata",b[b.ChangeCellMime=13]="ChangeCellMime",b[b.Unknown=100]="Unknown"})(i=e.NotebookCellsChangeType||(e.NotebookCellsChangeType={}));var S;(function(b){b[b.Handle=0]="Handle",b[b.Index=1]="Index"})(S=e.SelectionStateType||(e.SelectionStateType={}));var s;(function(b){b[b.Replace=1]="Replace",b[b.Output=2]="Output",b[b.Metadata=3]="Metadata",b[b.CellLanguage=4]="CellLanguage",b[b.DocumentMetadata=5]="DocumentMetadata",b[b.Move=6]="Move",b[b.OutputItems=7]="OutputItems",b[b.PartialMetadata=8]="PartialMetadata",b[b.PartialInternalMetadata=9]="PartialInternalMetadata"})(s=e.CellEditType||(e.CellEditType={}));var l;(function(b){b.scheme=A.Schemas.vscodeNotebookCell;const E=/^ch(\d{7,})/;function y(L,M){return L.with({scheme:b.scheme,fragment:`ch${M.toString().padStart(7,"0")}${L.scheme!==A.Schemas.file?L.scheme:""}`})}b.generate=y;function T(L){if(L.scheme!==b.scheme)return;const M=E.exec(L.fragment);return M?{handle:Number(M[1]),notebook:L.with({scheme:L.fragment.substring(M[0].length)||A.Schemas.file,fragment:null})}:void 0}b.parse=T;function R(L,M){return L.with({scheme:A.Schemas.vscodeNotebookCellOutput,fragment:`op${M??""},${L.scheme!==A.Schemas.file?L.scheme:""}`})}b.generateCellOutputUri=R;function O(L){if(L.scheme!==A.Schemas.vscodeNotebookCellOutput)return;const M=/^op([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})?\,(.*)$/i.exec(L.fragment);if(!M)return;const N=M[1]&&M[1]!==""?M[1]:void 0,B=M[2];return{outputId:N,notebook:L.with({scheme:B||A.Schemas.file,fragment:null})}}b.parseCellOutputUri=O;function x(L,M,N){return L.with({scheme:N,fragment:`ch${M.toString().padStart(7,"0")}${L.scheme!==A.Schemas.file?L.scheme:""}`})}b.generateCellUri=x;function F(L,M){if(L.scheme!==M)return;const N=E.exec(L.fragment);return N?{handle:Number(N[1]),notebook:L.with({scheme:L.fragment.substring(N[0].length)||A.Schemas.file,fragment:null})}:void 0}b.parseCellUri=F})(l=e.CellUri||(e.CellUri={}));const r=b=>D.isWindows?b.replace(/\//g,"\\"):b;class p{constructor(E=[],y=e.NOTEBOOK_DISPLAY_ORDER){this.defaultOrder=y,this.order=[...new Set(E)].map(T=>({pattern:T,matches:t.parse(r(T))}))}sort(E){const y=new Map(f.Iterable.map(E,R=>[R,r(R)]));let T=[];for(const{matches:R}of this.order)for(const[O,x]of y)if(R(x)){T.push(O),y.delete(O);break}return y.size&&(T=T.concat([...y.keys()].sort((R,O)=>this.defaultOrder.indexOf(R)-this.defaultOrder.indexOf(O)))),T}prioritize(E,y){const T=this.findIndex(E);if(T===-1){this.order.unshift({pattern:E,matches:t.parse(r(E))});return}const R=new Set(y.map(x=>this.findIndex(x,T)));R.delete(-1);const O=Array.from(R).sort();this.order.splice(T+1,0,...O.map(x=>this.order[x]));for(let x=O.length-1;x>=0;x--)this.order.splice(O[x],1)}toArray(){return this.order.map(E=>E.pattern)}findIndex(E,y=this.order.length){const T=r(E);for(let R=0;R<y;R++)if(this.order[R].matches(T))return R;return-1}}e.MimeTypeDisplayOrder=p;function u(b,E,y,T=(R,O)=>R===O){const R=[];function O(L,M,N){if(M===0&&N.length===0)return;const B=R[R.length-1];B&&B.start+B.deleteCount===L?(B.deleteCount+=M,B.toInsert.push(...N)):R.push({start:L,deleteCount:M,toInsert:N})}let x=0,F=0;for(;;){if(x===b.length){O(x,0,E.slice(F));break}if(F===E.length){O(x,b.length-x,[]);break}const L=b[x],M=E[F];if(T(L,M)){x+=1,F+=1;continue}y(M)?(O(x,1,[]),x+=1):(O(x,0,[M]),F+=1)}return R}e.diff=u,e.NOTEBOOK_EDITOR_CURSOR_BOUNDARY=new I.RawContextKey("notebookEditorCursorAtBoundary","none");var a;(function(b){b.default="default",b.option="option"})(a=e.NotebookEditorPriority||(e.NotebookEditorPriority={}));function n(b){const E=b;return!!((typeof E.include=="string"||t.isRelativePattern(E.include))&&(typeof E.exclude=="string"||t.isRelativePattern(E.exclude)))}e.isDocumentExcludePattern=n;function h(b,E,y){if(Array.isArray(b.viewType)&&b.viewType.indexOf(E)>=0||b.viewType===E)return!0;if(b.filenamePattern){const T=n(b.filenamePattern)?b.filenamePattern.include:b.filenamePattern,R=n(b.filenamePattern)?b.filenamePattern.exclude:void 0;if(t.match(T,(0,k.basename)(y.fsPath).toLowerCase()))return!(R&&t.match(R,(0,k.basename)(y.fsPath).toLowerCase()))}return!1}e.notebookDocumentFilterMatch=h;class g{constructor(E){this.textModel=E}getElements(){const E=new Int32Array(this.textModel.cells.length);for(let y=0;y<this.textModel.cells.length;y++)E[y]=this.textModel.cells[y].getHashValue();return E}}e.CellSequence=g,e.NotebookSetting={displayOrder:"notebook.displayOrder",cellToolbarLocation:"notebook.cellToolbarLocation",cellToolbarVisibility:"notebook.cellToolbarVisibility",showCellStatusBar:"notebook.showCellStatusBar",textDiffEditorPreview:"notebook.diff.enablePreview",experimentalInsertToolbarAlignment:"notebook.experimental.insertToolbarAlignment",compactView:"notebook.compactView",focusIndicator:"notebook.cellFocusIndicator",insertToolbarLocation:"notebook.insertToolbarLocation",globalToolbar:"notebook.globalToolbar",undoRedoPerCell:"notebook.undoRedoPerCell",consolidatedOutputButton:"notebook.consolidatedOutputButton",showFoldingControls:"notebook.showFoldingControls",dragAndDropEnabled:"notebook.dragAndDropEnabled",cellEditorOptionsCustomizations:"notebook.editorOptionsCustomizations",consolidatedRunButton:"notebook.consolidatedRunButton",openGettingStarted:"notebook.experimental.openGettingStarted",textOutputLineLimit:"notebook.output.textLineLimit",globalToolbarShowLabel:"notebook.globalToolbarShowLabel",markupFontSize:"notebook.markup.fontSize",interactiveWindowCollapseCodeCells:"interactiveWindow.collapseCellInputCode"};var d;(function(b){b[b.Left=1]="Left",b[b.Right=2]="Right"})(d=e.CellStatusbarAlignment||(e.CellStatusbarAlignment={}));class m{static create(E){return`${m._prefix}${E}`}static parse(E){if(E.startsWith(m._prefix))return E.substring(m._prefix.length)}}e.NotebookWorkingCopyTypeIdentifier=m,m._prefix="notebook/"}),define(ne[2173],re([1,0,10,128,175,64]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellFocusIndicator=void 0;class k extends _.CellPart{constructor(I,w,v,C,o,c){super();this.notebookEditor=I,this.titleToolbar=w,this.top=v,this.left=C,this.right=o,this.bottom=c,this.codeFocusIndicator=new f.FastDomNode(t.append(this.left.domNode,t.$(".codeOutput-focus-indicator-container",void 0,t.$(".codeOutput-focus-indicator.code-focus-indicator")))),this.outputFocusIndicator=new f.FastDomNode(t.append(this.left.domNode,t.$(".codeOutput-focus-indicator-container",void 0,t.$(".codeOutput-focus-indicator.output-focus-indicator")))),this._register(t.addDisposableListener(this.codeFocusIndicator.domNode,t.EventType.CLICK,()=>{this.currentCell&&(this.currentCell.isInputCollapsed=!this.currentCell.isInputCollapsed)})),this._register(t.addDisposableListener(this.outputFocusIndicator.domNode,t.EventType.CLICK,()=>{this.currentCell&&(this.currentCell.isOutputCollapsed=!this.currentCell.isOutputCollapsed)})),this._register(t.addDisposableListener(this.left.domNode,t.EventType.DBLCLICK,i=>{if(!this.currentCell||!this.notebookEditor.hasModel()||i.target!==this.left.domNode)return;i.offsetY<this.currentCell.layoutInfo.outputContainerOffset?this.currentCell.isInputCollapsed=!this.currentCell.isInputCollapsed:this.currentCell.isOutputCollapsed=!this.currentCell.isOutputCollapsed})),this._register(this.titleToolbar.onDidUpdateActions(()=>{this.updateFocusIndicatorsForTitleMenu()}))}updateInternalLayoutNow(I){if(I.cellKind===A.CellKind.Markup){const w=this.notebookEditor.notebookOptions.computeIndicatorPosition(I.layoutInfo.totalHeight,I.layoutInfo.foldHintHeight,this.notebookEditor.textModel?.viewType);this.bottom.domNode.style.transform=`translateY(${w.bottomIndicatorTop}px)`,this.left.setHeight(w.verticalIndicatorHeight),this.right.setHeight(w.verticalIndicatorHeight),this.codeFocusIndicator.setHeight(w.verticalIndicatorHeight)}else{const w=I,v=this.notebookEditor.notebookOptions.getLayoutConfiguration(),C=this.notebookEditor.notebookOptions.computeBottomToolbarDimensions(this.notebookEditor.textModel?.viewType),o=w.layoutInfo.codeIndicatorHeight+w.layoutInfo.outputIndicatorHeight+w.layoutInfo.commentHeight;this.left.setHeight(o),this.right.setHeight(o),this.codeFocusIndicator.setHeight(w.layoutInfo.codeIndicatorHeight),this.outputFocusIndicator.setHeight(Math.max(w.layoutInfo.outputIndicatorHeight-w.viewContext.notebookOptions.getLayoutConfiguration().focusIndicatorGap,0)),this.bottom.domNode.style.transform=`translateY(${w.layoutInfo.totalHeight-C.bottomToolbarGap-v.cellBottomMargin}px)`}this.updateFocusIndicatorsForTitleMenu()}updateFocusIndicatorsForTitleMenu(){const I=this.notebookEditor.notebookOptions.getLayoutConfiguration();this.titleToolbar.hasActions?(this.left.domNode.style.transform=`translateY(${I.editorToolbarHeight+I.cellTopMargin}px)`,this.right.domNode.style.transform=`translateY(${I.editorToolbarHeight+I.cellTopMargin}px)`):(this.left.domNode.style.transform=`translateY(${I.cellTopMargin}px)`,this.right.domNode.style.transform=`translateY(${I.cellTopMargin}px)`)}}e.CellFocusIndicator=k}),define(ne[800],re([1,0,2,64]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellOutputViewModel=void 0;let _=0;class A extends t.Disposable{constructor(D,I,w){super();this.cellViewModel=D,this._outputRawData=I,this._notebookService=w,this.outputHandle=_++}get model(){return this._outputRawData}get pickedMimeType(){return this._pickedMimeType}set pickedMimeType(D){this._pickedMimeType=D}hasMultiMimeType(){if(this._outputRawData.outputs.length<2)return!1;const D=this._outputRawData.outputs[0].mime;return this._outputRawData.outputs.some(I=>I.mime!==D)}resolveMimeTypes(D,I){const w=this._notebookService.getOutputMimeTypeInfo(D,I,this.model);let v=-1;return this._pickedMimeType&&(v=w.findIndex(C=>C.rendererId===this._pickedMimeType.rendererId&&C.mimeType===this._pickedMimeType.mimeType&&C.isTrusted)),v===-1&&(v=w.findIndex(C=>C.rendererId!==f.RENDERER_NOT_AVAILABLE&&C.isTrusted)),[w,Math.max(v,0)]}toRawJSON(){return{outputs:this._outputRawData.outputs}}}e.CellOutputViewModel=A}),define(ne[2174],re([1,0,15,6,2,489,64,147,2172,380,116,799,52,18,19,42,93,13]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookTextModel=e.NotebookEventEmitter=e.NotebookOperationManager=void 0;class r{constructor(g,d,m,b,E,y,T){this.textModel=g,this.label=d,this.undoRedoGroup=m,this._pauseableEmitter=b,this._postUndoRedo=E,this.code="undoredo.notebooks.stackOperation",this._operations=[],this._beginSelectionState=void 0,this._resultSelectionState=void 0,this.type=1,this._beginSelectionState=y,this._beginAlternativeVersionId=T,this._resultAlternativeVersionId=T}get resources(){return[this.textModel.uri]}get isEmpty(){return this._operations.length===0}pushEndState(g,d){this._resultAlternativeVersionId=g,this._resultSelectionState=d}pushEditOperation(g,d,m){this._operations.length===0&&(this._beginSelectionState=this._beginSelectionState??d),this._operations.push(g),this._resultSelectionState=m}async undo(){this._pauseableEmitter.pause();for(let g=this._operations.length-1;g>=0;g--)await this._operations[g].undo();this._postUndoRedo(this._beginAlternativeVersionId),this._pauseableEmitter.fire({rawEvents:[],synchronous:void 0,versionId:this.textModel.versionId,endSelectionState:this._beginSelectionState}),this._pauseableEmitter.resume()}async redo(){this._pauseableEmitter.pause();for(let g=0;g<this._operations.length;g++)await this._operations[g].redo();this._postUndoRedo(this._resultAlternativeVersionId),this._pauseableEmitter.fire({rawEvents:[],synchronous:void 0,versionId:this.textModel.versionId,endSelectionState:this._resultSelectionState}),this._pauseableEmitter.resume()}}class p{constructor(g,d,m,b){this._textModel=g,this._undoService=d,this._pauseableEmitter=m,this._postUndoRedo=b,this._pendingStackOperation=null}isUndoStackEmpty(){return this._pendingStackOperation===null||this._pendingStackOperation.isEmpty}pushStackElement(g,d,m,b){if(this._pendingStackOperation){this._pendingStackOperation.pushEndState(b,d),this._pendingStackOperation.isEmpty||this._undoService.pushElement(this._pendingStackOperation,this._pendingStackOperation.undoRedoGroup),this._pendingStackOperation=null;return}this._pendingStackOperation=new r(this._textModel,g,m,this._pauseableEmitter,this._postUndoRedo,d,b)}pushEditOperation(g,d,m){if(this._pendingStackOperation){this._pendingStackOperation.pushEditOperation(g,d,m);return}this._undoService.pushElement(g)}}e.NotebookOperationManager=p;class u extends f.PauseableEmitter{isDirtyEvent(){for(const g of this._eventQueue)for(let d=0;d<g.rawEvents.length;d++)if(!g.rawEvents[d].transient)return!0;return!1}}e.NotebookEventEmitter=u;let a=class extends _.Disposable{constructor(g,d,m,b,E,y,T,R){super();this.viewType=g,this.uri=d,this._undoService=y,this._modelService=T,this._languageService=R,this._isDisposed=!1,this._onWillDispose=this._register(new f.Emitter),this._onWillAddRemoveCells=this._register(new f.Emitter),this._onDidChangeContent=this._register(new f.Emitter),this.onWillDispose=this._onWillDispose.event,this.onWillAddRemoveCells=this._onWillAddRemoveCells.event,this.onDidChangeContent=this._onDidChangeContent.event,this._cellhandlePool=0,this._cellListeners=new Map,this._cells=[],this.metadata={},this.transientOptions={transientCellMetadata:{},transientDocumentMetadata:{},transientOutputs:!1},this._versionId=0,this._notebookSpecificAlternativeId=0,this._alternativeVersionId="1",this.transientOptions=E,this.metadata=b,this._initialize(m);const O=x=>{if(x.uri.scheme===c.Schemas.vscodeNotebookCell&&x instanceof s.TextModel){const F=k.CellUri.parse(x.uri);if(F&&(0,i.isEqual)(F.notebook,this.uri)){const L=this._getCellIndexByHandle(F.handle);if(L>=0){const M=this.cells[L];M&&(M.textModel=x)}}}};this._register(T.onModelAdded(x=>O(x))),this._pauseableEmitter=new u({merge:x=>{const F=x[0],L=F.rawEvents;let M=F.versionId,N=F.endSelectionState,B=F.synchronous;for(let P=1;P<x.length;P++)L.push(...x[P].rawEvents),M=x[P].versionId,N=x[P].endSelectionState!==void 0?x[P].endSelectionState:N,B=x[P].synchronous!==void 0?x[P].synchronous:B;return{rawEvents:L,versionId:M,endSelectionState:N,synchronous:B}}}),this._register(this._pauseableEmitter.event(x=>{x.rawEvents.length&&this._onDidChangeContent.fire(x)})),this._operationManager=new p(this,this._undoService,this._pauseableEmitter,x=>{this._increaseVersionId(!0),this._overwriteAlternativeVersionId(x)})}get length(){return this._cells.length}get cells(){return this._cells}get versionId(){return this._versionId}get alternativeVersionId(){return this._alternativeVersionId}setCellCollapseDefault(g){this._defaultCollapseConfig=g}_initialize(g,d){this._cells=[],this._versionId=0,this._notebookSpecificAlternativeId=0;const m=g.map(b=>{const E=this._cellhandlePool++,y=k.CellUri.generate(this.uri,E),T=this._getDefaultCollapseState(b);return new A.NotebookCellTextModel(y,E,b.source,b.language,b.mime,b.cellKind,b.outputs,b.metadata,b.internalMetadata,T,this.transientOptions,this._languageService)});for(let b=0;b<m.length;b++){const E=m[b].onDidChangeContent(y=>{this._bindCellContentHandler(m[b],y)});this._cellListeners.set(m[b].handle,E)}this._cells.splice(0,0,...m),this._alternativeVersionId=this._generateAlternativeId(),d&&this._pauseableEmitter.fire({rawEvents:[{kind:k.NotebookCellsChangeType.Unknown,transient:!1}],versionId:this.versionId,synchronous:!0,endSelectionState:void 0})}_bindCellContentHandler(g,d){switch(this._increaseVersionId(d==="content"),d){case"content":this._pauseableEmitter.fire({rawEvents:[{kind:k.NotebookCellsChangeType.ChangeCellContent,index:this._getCellIndexByHandle(g.handle),transient:!1}],versionId:this.versionId,synchronous:!0,endSelectionState:void 0});break;case"language":this._pauseableEmitter.fire({rawEvents:[{kind:k.NotebookCellsChangeType.ChangeLanguage,index:this._getCellIndexByHandle(g.handle),language:g.language,transient:!1}],versionId:this.versionId,synchronous:!0,endSelectionState:void 0});break;case"mime":this._pauseableEmitter.fire({rawEvents:[{kind:k.NotebookCellsChangeType.ChangeCellMime,index:this._getCellIndexByHandle(g.handle),mime:g.mime,transient:!1}],versionId:this.versionId,synchronous:!0,endSelectionState:void 0});break}}_generateAlternativeId(){return`${this._notebookSpecificAlternativeId}_`+this.cells.map(g=>g.handle+","+g.alternativeId).join(";")}dispose(){this._isDisposed||(this._isDisposed=!0,this._onWillDispose.fire(),this._undoService.removeElements(this.uri),(0,_.dispose)(this._cellListeners.values()),this._cellListeners.clear(),(0,_.dispose)(this._cells),super.dispose())}pushStackElement(g,d,m){this._operationManager.pushStackElement(g,d,m,this.alternativeVersionId)}_getCellIndexByHandle(g){return this.cells.findIndex(d=>d.handle===g)}_getCellIndexWithOutputIdHandleFromEdits(g,d){const m=d.find(b=>"outputs"in b&&b.outputs.some(E=>E.outputId===g));if(m){if("index"in m)return m.index;if("handle"in m){const b=this._getCellIndexByHandle(m.handle);return this._assertIndex(b),b}}return-1}_getCellIndexWithOutputIdHandle(g){return this.cells.findIndex(d=>!!d.outputs.find(m=>m.outputId===g))}reset(g,d,m){this.transientOptions=m,this._cellhandlePool=0,this.applyEdits([{editType:1,index:0,count:this.cells.length,cells:g},{editType:5,metadata:d}],!0,void 0,()=>{},void 0)}applyEdits(g,d,m,b,E,y=!0){this._pauseableEmitter.pause(),this.pushStackElement("edit",m,E);try{return this._doApplyEdits(g,d,y),!0}finally{const T=b();this._increaseVersionId(this._operationManager.isUndoStackEmpty()&&!this._pauseableEmitter.isDirtyEvent()),this.pushStackElement("edit",T,void 0),this._pauseableEmitter.fire({rawEvents:[],versionId:this.versionId,synchronous:d,endSelectionState:T}),this._pauseableEmitter.resume()}}_doApplyEdits(g,d,m){const b=g.map((T,R)=>{let O=-1;if("index"in T)O=T.index;else if("handle"in T)O=this._getCellIndexByHandle(T.handle),this._assertIndex(O);else if("outputId"in T){if(O=this._getCellIndexWithOutputIdHandle(T.outputId),this._indexIsInvalid(O)&&(O=this._getCellIndexWithOutputIdHandleFromEdits(T.outputId,g.slice(0,R))),this._indexIsInvalid(O))return null}else if(T.editType!==5)throw new Error("Invalid cell edit");return{edit:T,cellIndex:O,end:T.editType===5?void 0:T.editType===1?T.index+T.count:O,originalIndex:R}}).filter(l.isDefined),E=this._mergeCellEdits(b).sort((T,R)=>T.end===void 0||R.end===void 0?-1:R.end-T.end||R.originalIndex-T.originalIndex).reduce((T,R)=>{if(!T.length)T.push([R]);else{const O=T[T.length-1],x=O[0].cellIndex;R.cellIndex===x?O.push(R):T.push([R])}return T},[]).map(T=>{const R=[],O=[];return T.forEach(x=>{x.edit.editType===1?R.push(x):O.push(x)}),[...O.reverse(),...R]}),y=(0,t.flatten)(E);for(const{edit:T,cellIndex:R}of y)switch(T.editType){case 1:this._replaceCells(T.index,T.count,T.cells,d,m);break;case 2:{this._assertIndex(R);const O=this._cells[R];T.append?this._spliceNotebookCellOutputs(O,{start:O.outputs.length,deleteCount:0,newOutputs:T.outputs.map(x=>new C.NotebookCellOutputTextModel(x))},!0,m):this._spliceNotebookCellOutputs2(O,T.outputs.map(x=>new C.NotebookCellOutputTextModel(x)),m);break}case 7:{this._assertIndex(R);const O=this._cells[R];T.append?this._appendNotebookCellOutputItems(O,T.outputId,T.items):this._replaceNotebookCellOutputItems(O,T.outputId,T.items)}break;case 3:this._assertIndex(T.index),this._changeCellMetadata(this._cells[T.index],T.metadata,m);break;case 8:this._assertIndex(R),this._changeCellMetadataPartial(this._cells[R],T.metadata,m);break;case 9:this._assertIndex(R),this._changeCellInternalMetadataPartial(this._cells[R],T.internalMetadata);break;case 4:this._assertIndex(T.index),this._changeCellLanguage(this._cells[T.index],T.language,m);break;case 5:this._updateNotebookMetadata(T.metadata,m);break;case 6:this._moveCellToIdx(T.index,T.length,T.newIdx,d,m,void 0,void 0);break}}_mergeCellEdits(g){const d=[];return g.forEach(m=>{if(d.length){const b=d[d.length-1];b.edit.editType===2&&b.edit.append&&m.edit.editType===2&&m.edit.append&&b.cellIndex===m.cellIndex?b.edit.outputs=[...b.edit.outputs,...m.edit.outputs]:b.edit.editType===2&&!b.edit.append&&b.edit.outputs.length===0&&m.edit.editType===2&&m.edit.append&&b.cellIndex===m.cellIndex?(b.edit.append=!1,b.edit.outputs=m.edit.outputs):d.push(m)}else d.push(m)}),d}_getDefaultCollapseState(g){const d=g.cellKind===k.CellKind.Code?this._defaultCollapseConfig?.codeCell:this._defaultCollapseConfig?.markupCell;return g.collapseState??d??void 0}_replaceCells(g,d,m,b,E){if(d===0&&m.length===0)return;const y=this._cells.slice(0),T=new Set;y.forEach(L=>{T.add(L.handle)});for(let L=g;L<Math.min(g+d,this._cells.length);L++){const M=this._cells[L];this._cellListeners.get(M.handle)?.dispose(),this._cellListeners.delete(M.handle)}const R=m.map(L=>{const M=this._cellhandlePool++,N=k.CellUri.generate(this.uri,M),B=this._getDefaultCollapseState(L),P=new A.NotebookCellTextModel(N,M,L.source,L.language,L.mime,L.cellKind,L.outputs||[],L.metadata,L.internalMetadata,B,this.transientOptions,this._languageService),V=this._modelService.getModel(N);V&&V instanceof s.TextModel&&(P.textModel=V,P.language=L.language,P.textModel.setValue(L.source),P.resetTextBuffer(P.textModel.getTextBuffer()));const z=P.onDidChangeContent(U=>{this._bindCellContentHandler(P,U)});return this._cellListeners.set(P.handle,z),P}),O=this._cells.slice(0);O.splice(g,d,...R);const x=(0,k.diff)(this._cells,O,L=>T.has(L.handle)).map(L=>[L.start,L.deleteCount,L.toInsert]);this._onWillAddRemoveCells.fire({rawEvent:{kind:k.NotebookCellsChangeType.ModelChange,changes:x}}),this._cells=O;const F=x.map(L=>{const M=y.slice(L[0],L[0]+L[1]);return[L[0],M,L[2]]});E&&this._operationManager.pushEditOperation(new I.SpliceCellsEdit(this.uri,F,{insertCell:(L,M,N)=>{this._insertNewCell(L,[M],!0,N)},deleteCell:(L,M)=>{this._removeCell(L,1,!0,M)},replaceCell:(L,M,N,B)=>{this._replaceNewCells(L,M,N,!0,B)}},void 0,void 0),void 0,void 0),this._pauseableEmitter.fire({rawEvents:[{kind:k.NotebookCellsChangeType.ModelChange,changes:x,transient:!1}],versionId:this.versionId,synchronous:b,endSelectionState:void 0})}_increaseVersionId(g){this._versionId=this._versionId+1,g||(this._notebookSpecificAlternativeId=this._versionId),this._alternativeVersionId=this._generateAlternativeId()}_overwriteAlternativeVersionId(g){this._alternativeVersionId=g,this._notebookSpecificAlternativeId=Number(g.substring(0,g.indexOf("_")))}_updateNotebookMetadata(g,d){const m=this.metadata,b=this._isDocumentMetadataChanged(this.metadata,g);if(b&&d){const E=this;this._operationManager.pushEditOperation(new class{constructor(){this.type=0,this.label="Update Notebook Metadata",this.code="undoredo.notebooks.updateCellMetadata"}get resource(){return E.uri}undo(){E._updateNotebookMetadata(m,!1)}redo(){E._updateNotebookMetadata(g,!1)}},void 0,void 0)}this.metadata=g,this._pauseableEmitter.fire({rawEvents:[{kind:k.NotebookCellsChangeType.ChangeDocumentMetadata,metadata:this.metadata,transient:!b}],versionId:this.versionId,synchronous:!0,endSelectionState:void 0})}_insertNewCell(g,d,m,b){for(let y=0;y<d.length;y++){const T=d[y].onDidChangeContent(R=>{this._bindCellContentHandler(d[y],R)});this._cellListeners.set(d[y].handle,T)}const E=[[g,0,d]];this._onWillAddRemoveCells.fire({rawEvent:{kind:k.NotebookCellsChangeType.ModelChange,changes:E}}),this._cells.splice(g,0,...d),this._pauseableEmitter.fire({rawEvents:[{kind:k.NotebookCellsChangeType.ModelChange,changes:E,transient:!1}],versionId:this.versionId,synchronous:m,endSelectionState:b})}_removeCell(g,d,m,b){for(let y=g;y<g+d;y++){const T=this._cells[y];this._cellListeners.get(T.handle)?.dispose(),this._cellListeners.delete(T.handle)}const E=[[g,d,[]]];this._onWillAddRemoveCells.fire({rawEvent:{kind:k.NotebookCellsChangeType.ModelChange,changes:E}}),this._cells.splice(g,d),this._pauseableEmitter.fire({rawEvents:[{kind:k.NotebookCellsChangeType.ModelChange,changes:E,transient:!1}],versionId:this.versionId,synchronous:m,endSelectionState:b})}_replaceNewCells(g,d,m,b,E){for(let T=g;T<g+d;T++){const R=this._cells[T];this._cellListeners.get(R.handle)?.dispose(),this._cellListeners.delete(R.handle)}for(let T=0;T<m.length;T++){const R=m[T].onDidChangeContent(O=>{this._bindCellContentHandler(m[T],O)});this._cellListeners.set(m[T].handle,R)}const y=[[g,d,m]];this._onWillAddRemoveCells.fire({rawEvent:{kind:k.NotebookCellsChangeType.ModelChange,changes:y}}),this._cells.splice(g,d,...m),this._pauseableEmitter.fire({rawEvents:[{kind:k.NotebookCellsChangeType.ModelChange,changes:y,transient:!1}],versionId:this.versionId,synchronous:b,endSelectionState:E})}_isDocumentMetadataChanged(g,d){const m=new Set([...Object.keys(g||{}),...Object.keys(d||{})]);for(const b of m)if(b==="custom"){if(!this._customMetadataEqual(g[b],d[b])&&!this.transientOptions.transientDocumentMetadata[b])return!0}else if(g[b]!==d[b]&&!this.transientOptions.transientDocumentMetadata[b])return!0;return!1}_isCellMetadataChanged(g,d){const m=new Set([...Object.keys(g||{}),...Object.keys(d||{})]);for(const b of m)if(g[b]!==d[b]&&!this.transientOptions.transientCellMetadata[b])return!0;return!1}_customMetadataEqual(g,d){if(!g&&!d)return!0;if(!g||!d)return!1;const m=Object.getOwnPropertyNames(g),b=Object.getOwnPropertyNames(d);if(m.length!==b.length)return!1;for(let E=0;E<m.length;E++){const y=m[E];if(g[y]!==d[y])return!1}return!0}_changeCellMetadataPartial(g,d,m){const b={...g.metadata};let E;for(E in d){const y=d[E]??void 0;b[E]=y}return this._changeCellMetadata(g,b,m)}_changeCellMetadata(g,d,m){const b=this._isCellMetadataChanged(g.metadata,d);if(b&&m){const E=this._cells.indexOf(g);this._operationManager.pushEditOperation(new I.CellMetadataEdit(this.uri,E,Object.freeze(g.metadata),Object.freeze(d),{updateCellMetadata:(y,T)=>{const R=this._cells[y];!R||this._changeCellMetadata(R,T,!1)}}),void 0,void 0)}g.metadata=d,this._pauseableEmitter.fire({rawEvents:[{kind:k.NotebookCellsChangeType.ChangeCellMetadata,index:this._cells.indexOf(g),metadata:g.metadata,transient:!b}],versionId:this.versionId,synchronous:!0,endSelectionState:void 0})}_changeCellInternalMetadataPartial(g,d){const m={...g.internalMetadata};let b;for(b in d){const E=d[b]??void 0;m[b]=E}g.internalMetadata=m,this._pauseableEmitter.fire({rawEvents:[{kind:k.NotebookCellsChangeType.ChangeCellInternalMetadata,index:this._cells.indexOf(g),internalMetadata:g.internalMetadata,transient:!0}],versionId:this.versionId,synchronous:!0,endSelectionState:void 0})}_changeCellLanguage(g,d,m){if(g.language===d)return;const b=g.language;if(g.language=d,m){const E=this;this._operationManager.pushEditOperation(new class{constructor(){this.type=0,this.label="Update Cell Language",this.code="undoredo.notebooks.updateCellLanguage"}get resource(){return E.uri}undo(){E._changeCellLanguage(g,b,!1)}redo(){E._changeCellLanguage(g,d,!1)}},void 0,void 0)}this._pauseableEmitter.fire({rawEvents:[{kind:k.NotebookCellsChangeType.ChangeLanguage,index:this._cells.indexOf(g),language:d,transient:!1}],versionId:this.versionId,synchronous:!0,endSelectionState:void 0})}_spliceNotebookCellOutputs2(g,d,m){if(d.length===0&&g.outputs.length===0)return;if(d.length<=1){this._spliceNotebookCellOutputs(g,{start:0,deleteCount:g.outputs.length,newOutputs:d},!1,m);return}new w.LcsDiff(new n(g.outputs),new n(d)).ComputeDiff(!1).changes.map(T=>({start:T.originalStart,deleteCount:T.originalLength,newOutputs:d.slice(T.modifiedStart,T.modifiedStart+T.modifiedLength)})).reverse().forEach(T=>{this._spliceNotebookCellOutputs(g,T,!1,m)})}_spliceNotebookCellOutputs(g,d,m,b){g.spliceNotebookCellOutputs(d),this._pauseableEmitter.fire({rawEvents:[{kind:k.NotebookCellsChangeType.Output,index:this._cells.indexOf(g),outputs:g.outputs??[],append:m,transient:this.transientOptions.transientOutputs}],versionId:this.versionId,synchronous:!0,endSelectionState:void 0})}_appendNotebookCellOutputItems(g,d,m){g.changeOutputItems(d,!0,m)&&this._pauseableEmitter.fire({rawEvents:[{kind:k.NotebookCellsChangeType.OutputItem,index:this._cells.indexOf(g),outputId:d,outputItems:m,append:!0,transient:this.transientOptions.transientOutputs}],versionId:this.versionId,synchronous:!0,endSelectionState:void 0})}_replaceNotebookCellOutputItems(g,d,m){g.changeOutputItems(d,!1,m)&&this._pauseableEmitter.fire({rawEvents:[{kind:k.NotebookCellsChangeType.OutputItem,index:this._cells.indexOf(g),outputId:d,outputItems:m,append:!1,transient:this.transientOptions.transientOutputs}],versionId:this.versionId,synchronous:!0,endSelectionState:void 0})}_moveCellToIdx(g,d,m,b,E,y,T){E&&this._operationManager.pushEditOperation(new I.MoveCellEdit(this.uri,g,d,m,{moveCell:(O,x,F,L,M)=>{this._moveCellToIdx(O,x,F,!0,!1,L,M)}},y,T),y,T),this._assertIndex(g),this._assertIndex(m);const R=this._cells.splice(g,d);return this._cells.splice(m,0,...R),this._pauseableEmitter.fire({rawEvents:[{kind:k.NotebookCellsChangeType.Move,index:g,length:d,newIdx:m,cells:R,transient:!1}],versionId:this.versionId,synchronous:b,endSelectionState:T}),!0}_assertIndex(g){if(this._indexIsInvalid(g))throw new Error(`model index out of range ${g}`)}_indexIsInvalid(g){return g<0||g>=this._cells.length}};a=Ee([W(5,D.IUndoRedoService),W(6,o.IModelService),W(7,S.ILanguageService)],a),e.NotebookTextModel=a;class n{constructor(g){this.outputs=g}getElements(){return this.outputs.map(g=>(0,v.hash)(g.outputs.map(d=>({mime:d.mime,data:d.data}))))}}}),define(ne[153],re([1,0,7,64]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NOTEBOOK_HAS_OUTPUTS=e.NOTEBOOK_MISSING_KERNEL_EXTENSION=e.NOTEBOOK_INTERRUPTIBLE_KERNEL=e.NOTEBOOK_KERNEL_SELECTED=e.NOTEBOOK_KERNEL_COUNT=e.NOTEBOOK_KERNEL=e.NOTEBOOK_CELL_OUTPUT_COLLAPSED=e.NOTEBOOK_CELL_INPUT_COLLAPSED=e.NOTEBOOK_CELL_HAS_OUTPUTS=e.NOTEBOOK_CELL_EXECUTING=e.NOTEBOOK_CELL_EXECUTION_STATE=e.NOTEBOOK_CELL_LINE_NUMBERS=e.NOTEBOOK_CELL_MARKDOWN_EDIT_MODE=e.NOTEBOOK_CELL_EDITOR_FOCUSED=e.NOTEBOOK_CELL_FOCUSED=e.NOTEBOOK_CELL_EDITABLE=e.NOTEBOOK_CELL_TYPE=e.NOTEBOOK_VIEW_TYPE=e.NOTEBOOK_CELL_TOOLBAR_LOCATION=e.NOTEBOOK_BREAKPOINT_MARGIN_ACTIVE=e.NOTEBOOK_USE_CONSOLIDATED_OUTPUT_BUTTON=e.NOTEBOOK_HAS_RUNNING_CELL=e.NOTEBOOK_EDITOR_EDITABLE=e.NOTEBOOK_OUTPUT_FOCUSED=e.NOTEBOOK_CELL_LIST_FOCUSED=e.NOTEBOOK_EDITOR_FOCUSED=e.NOTEBOOK_IS_ACTIVE_EDITOR=e.KEYBINDING_CONTEXT_NOTEBOOK_FIND_WIDGET_FOCUSED=e.HAS_OPENED_NOTEBOOK=void 0,e.HAS_OPENED_NOTEBOOK=new t.RawContextKey("userHasOpenedNotebook",!1),e.KEYBINDING_CONTEXT_NOTEBOOK_FIND_WIDGET_FOCUSED=new t.RawContextKey("notebookFindWidgetFocused",!1),e.NOTEBOOK_IS_ACTIVE_EDITOR=t.ContextKeyExpr.equals("activeEditor",f.NOTEBOOK_EDITOR_ID),e.NOTEBOOK_EDITOR_FOCUSED=new t.RawContextKey("notebookEditorFocused",!1),e.NOTEBOOK_CELL_LIST_FOCUSED=new t.RawContextKey("notebookCellListFocused",!1),e.NOTEBOOK_OUTPUT_FOCUSED=new t.RawContextKey("notebookOutputFocused",!1),e.NOTEBOOK_EDITOR_EDITABLE=new t.RawContextKey("notebookEditable",!0),e.NOTEBOOK_HAS_RUNNING_CELL=new t.RawContextKey("notebookHasRunningCell",!1),e.NOTEBOOK_USE_CONSOLIDATED_OUTPUT_BUTTON=new t.RawContextKey("notebookUseConsolidatedOutputButton",!1),e.NOTEBOOK_BREAKPOINT_MARGIN_ACTIVE=new t.RawContextKey("notebookBreakpointMargin",!1),e.NOTEBOOK_CELL_TOOLBAR_LOCATION=new t.RawContextKey("notebookCellToolbarLocation","left"),e.NOTEBOOK_VIEW_TYPE=new t.RawContextKey("notebookType",void 0),e.NOTEBOOK_CELL_TYPE=new t.RawContextKey("notebookCellType",void 0),e.NOTEBOOK_CELL_EDITABLE=new t.RawContextKey("notebookCellEditable",!1),e.NOTEBOOK_CELL_FOCUSED=new t.RawContextKey("notebookCellFocused",!1),e.NOTEBOOK_CELL_EDITOR_FOCUSED=new t.RawContextKey("notebookCellEditorFocused",!1),e.NOTEBOOK_CELL_MARKDOWN_EDIT_MODE=new t.RawContextKey("notebookCellMarkdownEditMode",!1),e.NOTEBOOK_CELL_LINE_NUMBERS=new t.RawContextKey("notebookCellLineNumbers","inherit"),e.NOTEBOOK_CELL_EXECUTION_STATE=new t.RawContextKey("notebookCellExecutionState",void 0),e.NOTEBOOK_CELL_EXECUTING=new t.RawContextKey("notebookCellExecuting",!1),e.NOTEBOOK_CELL_HAS_OUTPUTS=new t.RawContextKey("notebookCellHasOutputs",!1),e.NOTEBOOK_CELL_INPUT_COLLAPSED=new t.RawContextKey("notebookCellInputIsCollapsed",!1),e.NOTEBOOK_CELL_OUTPUT_COLLAPSED=new t.RawContextKey("notebookCellOutputIsCollapsed",!1),e.NOTEBOOK_KERNEL=new t.RawContextKey("notebookKernel",void 0),e.NOTEBOOK_KERNEL_COUNT=new t.RawContextKey("notebookKernelCount",0),e.NOTEBOOK_KERNEL_SELECTED=new t.RawContextKey("notebookKernelSelected",!1),e.NOTEBOOK_INTERRUPTIBLE_KERNEL=new t.RawContextKey("notebookInterruptibleKernel",!1),e.NOTEBOOK_MISSING_KERNEL_EXTENSION=new t.RawContextKey("notebookMissingKernelExtension",!1),e.NOTEBOOK_HAS_OUTPUTS=new t.RawContextKey("notebookHasOutputs",!1)}),define(ne[2175],re([1,0,163,36,2,58,1656,473,73,16,141,37,5,38,175,798,153]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCodeCellExecutionContextKeyService=e.RunToolbar=void 0;let l=class extends i.CellPart{constructor(u,a,n,h,g,d,m,b){super();this.notebookEditor=u,this.contextKeyService=a,this.cellContainer=n,this.runButtonContainer=h,this.menuService=g,this.keybindingService=d,this.contextMenuService=m,this.instantiationService=b;const E=this._register(g.createMenu(this.notebookEditor.creationOptions.menuIds.cellExecutePrimary,a));this.createRunCellToolbar(h,n,a);const y=()=>{const R=this.getCellToolbarActions(E).primary[0];this.toolbar.setActions(R?[R]:[])};y(),this._register(E.onDidChange(y)),this._register(this.notebookEditor.notebookOptions.onDidChangeOptions(y))}didRenderCell(u){this.cellDisposables.add((0,S.registerStickyScroll)(this.notebookEditor,u,this.runButtonContainer)),this.toolbar.context={ui:!0,cell:u,notebookEditor:this.notebookEditor,$mid:12}}getCellToolbarActions(u){const h={primary:[],secondary:[]};return(0,I.createAndFillInActionBarActions)(u,{shouldForwardArgs:!0},h,g=>/^inline/.test(g)),h}createRunCellToolbar(u,a,n){const h=this._register(new _.DisposableStore),g=this._register(new f.Action("notebook.moreRunActions",(0,k.localize)(0,null),"codicon-chevron-down",!0)),d=b=>this.keybindingService.lookupKeybinding(b.id,m),m=this._register(r(n));this.toolbar=this._register(new t.ToolBar(u,this.contextMenuService,{getKeyBinding:d,actionViewItemProvider:b=>{h.clear();const E=h.add(this.menuService.createMenu(this.notebookEditor.creationOptions.menuIds.cellExecutePrimary,n)),y=this.getCellToolbarActions(E).primary[0];if(!(y instanceof w.MenuItemAction))return;const T=h.add(this.menuService.createMenu(this.notebookEditor.creationOptions.menuIds.cellExecuteToolbar,n)),R=this.getCellToolbarActions(T).secondary;if(!R.length)return;const O=this.instantiationService.createInstance(D.DropdownWithPrimaryActionViewItem,y,g,R,"notebook-cell-run-toolbar",this.contextMenuService,{getKeyBinding:d});return h.add(O.onDidChangeDropdownVisibility(x=>{a.classList.toggle("cell-run-toolbar-dropdown-active",x)})),O},renderDropdownAsChildElement:!0}))}};l=Ee([W(4,w.IMenuService),W(5,c.IKeybindingService),W(6,C.IContextMenuService),W(7,o.IInstantiationService)],l),e.RunToolbar=l;function r(p){const u=p.createScoped(document.createElement("div"));return v.InputFocusedContext.bindTo(u).set(!0),A.EditorContextKeys.editorTextFocus.bindTo(u).set(!0),A.EditorContextKeys.focus.bindTo(u).set(!0),A.EditorContextKeys.textInputFocus.bindTo(u).set(!0),s.NOTEBOOK_CELL_EXECUTION_STATE.bindTo(u).set("idle"),s.NOTEBOOK_CELL_LIST_FOCUSED.bindTo(u).set(!0),s.NOTEBOOK_EDITOR_FOCUSED.bindTo(u).set(!0),s.NOTEBOOK_CELL_TYPE.bindTo(u).set("code"),u}e.getCodeCellExecutionContextKeyService=r}),define(ne[415],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INotebookEditorModelResolverService=void 0,e.INotebookEditorModelResolverService=(0,t.createDecorator)("INotebookModelResolverService")}),define(ne[358],re([1,0,15,29,140,415]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BulkCellEdits=e.ResourceNotebookCellEdit=void 0;class k extends _.ResourceEdit{constructor(w,v,C,o){super(o);this.resource=w,this.cellEdit=v,this.versionId=C}}e.ResourceNotebookCellEdit=k;let D=class{constructor(w,v,C,o,c,i){this._undoRedoGroup=w,this._progress=C,this._token=o,this._edits=c,this._notebookModelService=i}async apply(){const w=(0,t.groupBy)(this._edits,(v,C)=>(0,f.compare)(v.resource.toString(),C.resource.toString()));for(let v of w){if(this._token.isCancellationRequested)break;const[C]=v,o=await this._notebookModelService.resolve(C.resource);if(typeof C.versionId=="number"&&o.object.notebook.versionId!==C.versionId)throw o.dispose(),new Error(`Notebook '${C.resource}' has changed in the meantime`);const c=v.map(i=>i.cellEdit);o.object.notebook.applyEdits(c,!0,void 0,()=>{},this._undoRedoGroup),o.dispose(),this._progress.report(void 0)}}};D=Ee([W(5,A.INotebookEditorModelResolverService)],D),e.BulkCellEdits=D}),define(ne[2176],re([1,0,23,52,55,2,6,140,358,31]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConflictDetector=void 0;let v=class{constructor(o,c,i,S){this._conflicts=new _.ResourceMap,this._disposables=new A.DisposableStore,this._onDidConflict=new k.Emitter,this.onDidConflict=this._onDidConflict.event;const s=new _.ResourceMap;for(let r of o)if(r instanceof D.ResourceTextEdit){if(s.set(r.resource,!0),typeof r.versionId=="number"){const p=i.getModel(r.resource);p&&p.getVersionId()!==r.versionId&&(this._conflicts.set(r.resource,!0),this._onDidConflict.fire(this))}}else r instanceof D.ResourceFileEdit?r.newResource?s.set(r.newResource,!0):r.oldResource&&s.set(r.oldResource,!0):r instanceof I.ResourceNotebookCellEdit?s.set(r.resource,!0):S.warn("UNKNOWN edit type",r);this._disposables.add(c.onDidFilesChange(r=>{for(const p of s.keys())if(!i.getModel(p)&&r.contains(p)){this._conflicts.set(p,!0),this._onDidConflict.fire(this);break}}));const l=r=>{s.has(r.uri)&&(this._conflicts.set(r.uri,!0),this._onDidConflict.fire(this))};for(let r of i.getModels())this._disposables.add(r.onDidChangeContent(()=>l(r)))}dispose(){this._disposables.dispose(),this._onDidConflict.dispose()}list(){return[...this._conflicts.keys()]}hasConflicts(){return this._conflicts.size>0}};v=Ee([W(1,t.IFileService),W(2,f.IModelService),W(3,w.ILogService)],v),e.ConflictDetector=v}),define(ne[583],re([1,0,61,9,42,52,93,2,15,20,136,5,23,6,2176,55,1446,19,140,33,89]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BulkEditPreviewProvider=e.BulkFileOperations=e.BulkCategory=e.BulkFileOperation=e.BulkFileOperationType=e.BulkTextEdit=e.CheckedStates=void 0;class a{constructor(){this._states=new WeakMap,this._checkedCount=0,this._onDidChange=new c.Emitter,this.onDidChange=this._onDidChange.event}dispose(){this._onDidChange.dispose()}get checkedCount(){return this._checkedCount}isChecked(y){return this._states.get(y)??!1}updateChecked(y,T){const R=this._states.get(y);R!==T&&(R===void 0?T&&(this._checkedCount+=1):T?this._checkedCount+=1:this._checkedCount-=1,this._states.set(y,T),this._onDidChange.fire(y))}}e.CheckedStates=a;class n{constructor(y,T){this.parent=y,this.textEdit=T}}e.BulkTextEdit=n;var h;(function(E){E[E.TextEdit=1]="TextEdit",E[E.Create=2]="Create",E[E.Delete=4]="Delete",E[E.Rename=8]="Rename"})(h=e.BulkFileOperationType||(e.BulkFileOperationType={}));class g{constructor(y,T){this.uri=y,this.parent=T,this.type=0,this.textEdits=[],this.originalEdits=new Map}addEdit(y,T,R){this.type|=T,this.originalEdits.set(y,R),R instanceof r.ResourceTextEdit?this.textEdits.push(new n(this,R)):T===8&&(this.newUri=R.newResource)}needsConfirmation(){for(let[,y]of this.originalEdits)if(!this.parent.checked.isChecked(y))return!0;return!1}}e.BulkFileOperation=g;class d{constructor(y=d._defaultMetadata){this.metadata=y,this.operationByResource=new Map}static keyOf(y){return y?.label||"<default>"}get fileOperations(){return this.operationByResource.values()}}e.BulkCategory=d,d._defaultMetadata=Object.freeze({label:(0,s.localize)(0,null),icon:p.Codicon.symbolFile,needsConfirmation:!1});let m=class yo{constructor(y,T,R){this._bulkEdit=y,this._fileService=T,this.checked=new a,this.fileOperations=[],this.categories=[],this.conflicts=R.createInstance(i.ConflictDetector,y)}static async create(y,T){return await y.get(C.IInstantiationService).createInstance(yo,T)._init()}dispose(){this.checked.dispose(),this.conflicts.dispose()}async _init(){const y=new Map,T=new Map,R=new S.ResourceMap;for(let O=0;O<this._bulkEdit.length;O++){const x=this._bulkEdit[O];let F,L;if(this.checked.updateChecked(x,!x.metadata?.needsConfirmation),x instanceof r.ResourceTextEdit)L=1,F=x.resource;else if(x instanceof r.ResourceFileEdit)if(x.newResource&&x.oldResource){if(L=8,F=x.oldResource,x.options?.overwrite===void 0&&x.options?.ignoreIfExists&&await this._fileService.exists(F))continue;R.set(x.newResource,F)}else if(x.oldResource){if(L=4,F=x.oldResource,x.options?.ignoreIfNotExists&&!await this._fileService.exists(F))continue}else if(x.newResource){if(L=2,F=x.newResource,x.options?.overwrite===void 0&&x.options?.ignoreIfExists&&await this._fileService.exists(F))continue}else continue;else continue;const M=(P,V)=>{let z=l.extUri.getComparisonKey(P,!0),U=V.get(z);!U&&R.has(P)&&(P=R.get(P),z=l.extUri.getComparisonKey(P,!0),U=V.get(z)),U||(U=new g(P,this),V.set(z,U)),U.addEdit(O,L,x)};M(F,y);let N=d.keyOf(x.metadata),B=T.get(N);B||(B=new d(x.metadata),T.set(N,B)),M(F,B.operationByResource)}y.forEach(O=>this.fileOperations.push(O)),T.forEach(O=>this.categories.push(O));for(let O of this.fileOperations)if(O.type!==1){let x=!0;for(const F of O.originalEdits.values())F instanceof r.ResourceFileEdit&&(x=x&&this.checked.isChecked(F));if(!x)for(const F of O.originalEdits.values())this.checked.updateChecked(F,x)}return this.categories.sort((O,x)=>O.metadata.needsConfirmation===x.metadata.needsConfirmation?O.metadata.label.localeCompare(x.metadata.label):O.metadata.needsConfirmation?-1:1),this}getWorkspaceEdit(){const y=[];let T=!0;for(let R=0;R<this._bulkEdit.length;R++){const O=this._bulkEdit[R];if(this.checked.isChecked(O)){y[R]=O;continue}T=!1}return T?this._bulkEdit:((0,I.coalesceInPlace)(y),y)}getFileEdits(y){for(let T of this.fileOperations)if(T.uri.toString()===y.toString()){const R=[];let O=!1;for(const x of T.originalEdits.values())x instanceof r.ResourceTextEdit?this.checked.isChecked(x)&&R.push(v.EditOperation.replaceMove(w.Range.lift(x.textEdit.range),x.textEdit.text)):this.checked.isChecked(x)||(O=!0);return O?[]:R.sort((x,F)=>w.Range.compareRangesUsingStarts(x.range,F.range))}return[]}getUriOfEdit(y){for(let T of this.fileOperations)for(const R of T.originalEdits.values())if(R===y)return T.uri;throw new Error("invalid edit")}};m=Ee([W(1,o.IFileService),W(2,C.IInstantiationService)],m),e.BulkFileOperations=m;let b=class Nn{constructor(y,T,R,O){this._operations=y,this._languageService=T,this._modelService=R,this._textModelResolverService=O,this._disposables=new D.DisposableStore,this._modelPreviewEdits=new Map,this._instanceId=(0,u.generateUuid)(),this._disposables.add(this._textModelResolverService.registerTextModelContentProvider(Nn.Schema,this)),this._ready=this._init()}static fromPreviewUri(y){return f.URI.parse(y.query)}dispose(){this._disposables.dispose()}asPreviewUri(y){return f.URI.from({scheme:Nn.Schema,authority:this._instanceId,path:y.path,query:y.toString()})}async _init(){for(let y of this._operations.fileOperations)await this._applyTextEditsToPreviewModel(y.uri);this._disposables.add(this._operations.checked.onDidChange(y=>{const T=this._operations.getUriOfEdit(y);this._applyTextEditsToPreviewModel(T)}))}async _applyTextEditsToPreviewModel(y){const T=await this._getOrCreatePreviewModel(y);let R=this._modelPreviewEdits.get(T.id);R&&T.applyEdits(R);const O=this._operations.getFileEdits(y),x=T.applyEdits(O,!0);this._modelPreviewEdits.set(T.id,x)}async _getOrCreatePreviewModel(y){const T=this.asPreviewUri(y);let R=this._modelService.getModel(T);if(!R){try{const O=await this._textModelResolverService.createModelReference(y),x=O.object.textEditorModel;R=this._modelService.createModel((0,k.createTextBufferFactoryFromSnapshot)(x.createSnapshot()),this._languageService.createById(x.getLanguageId()),T),O.dispose()}catch{R=this._modelService.createModel("",this._languageService.createByFilepathOrFirstLine(T),T)}queueMicrotask(async()=>{this._disposables.add(await this._textModelResolverService.createModelReference(R.uri))})}return R}async provideTextContent(y){return y.toString()===Nn.emptyPreview.toString()?this._modelService.createModel("",null,y):(await this._ready,this._modelService.getModel(y))}};b.Schema="vscode-bulkeditpreview",b.emptyPreview=f.URI.from({scheme:b.Schema,fragment:"empty"}),b=Ee([W(1,_.ILanguageService),W(2,A.IModelService),W(3,t.ITextModelService)],b),e.BulkEditPreviewProvider=b}),define(ne[2177],re([1,0,61,102,241,20,10,2,93,583,23,1447,45,234,19,12,29,9,147,92,140,124,42,126]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BulkEditNaviLabelProvider=e.BulkEditDelegate=e.TextEditElementRenderer=e.FileElementRenderer=e.CategoryElementRenderer=e.BulkEditIdentityProvider=e.BulkEditAccessibilityProvider=e.BulkEditSorter=e.BulkEditDataSource=e.TextEditElement=e.FileElement=e.CategoryElement=void 0;class g{constructor(V,z){this.parent=V,this.category=z}}e.CategoryElement=g;class d{constructor(V,z){this.parent=V,this.edit=z}isChecked(){let V=this.parent instanceof g?this.parent.parent:this.parent,z=!0;this.edit.type===1&&(z=!this.edit.textEdits.every(U=>!V.checked.isChecked(U.textEdit)));for(let U of this.edit.originalEdits.values())U instanceof u.ResourceFileEdit&&(z=z&&V.checked.isChecked(U));if(this.parent instanceof g&&this.edit.type===1){for(let U of V.categories)for(let H of U.fileOperations)if(H.uri.toString()===this.edit.uri.toString())for(const K of H.originalEdits.values())K instanceof u.ResourceFileEdit&&(z=z&&V.checked.isChecked(K))}return z}setChecked(V){let z=this.parent instanceof g?this.parent.parent:this.parent;for(const U of this.edit.originalEdits.values())z.checked.updateChecked(U,V);if(this.parent instanceof g&&this.edit.type!==1){for(let U of z.categories)for(let H of U.fileOperations)if(H.uri.toString()===this.edit.uri.toString())for(const K of H.originalEdits.values())z.checked.updateChecked(K,V)}}isDisabled(){if(this.parent instanceof g&&this.edit.type===1){let V=this.parent.parent,z=!0;for(let U of V.categories)for(let H of U.fileOperations)if(H.uri.toString()===this.edit.uri.toString())for(const K of H.originalEdits.values())K instanceof u.ResourceFileEdit&&(z=z&&V.checked.isChecked(K));return!z}return!1}}e.FileElement=d;class m{constructor(V,z,U,H,K,G,q){this.parent=V,this.idx=z,this.edit=U,this.prefix=H,this.selecting=K,this.inserting=G,this.suffix=q}isChecked(){let V=this.parent.parent;return V instanceof g&&(V=V.parent),V.checked.isChecked(this.edit.textEdit)}setChecked(V){let z=this.parent.parent;if(z instanceof g&&(z=z.parent),z.checked.updateChecked(this.edit.textEdit,V),V)for(const U of this.parent.edit.originalEdits.values())U instanceof u.ResourceFileEdit&&z.checked.updateChecked(U,V)}isDisabled(){return this.parent.isDisabled()}}e.TextEditElement=m;let b=class{constructor(V,z,U,H){this._textModelService=V,this._undoRedoService=z,this._languageService=U,this._languageConfigurationService=H,this.groupByFile=!0}hasChildren(V){return V instanceof d?V.edit.textEdits.length>0:!(V instanceof m)}async getChildren(V){if(V instanceof w.BulkFileOperations)return this.groupByFile?V.fileOperations.map(z=>new d(V,z)):V.categories.map(z=>new g(V,z));if(V instanceof g)return[...p.Iterable.map(V.category.fileOperations,z=>new d(V,z))];if(V instanceof d&&V.edit.textEdits.length>0){let z,U;try{const K=await this._textModelService.createModelReference(V.edit.uri);z=K.object.textEditorModel,U=K}catch{z=new I.TextModel("",h.PLAINTEXT_LANGUAGE_ID,I.TextModel.DEFAULT_CREATION_OPTIONS,null,this._undoRedoService,this._languageService,this._languageConfigurationService),U=z}const H=V.edit.textEdits.map((K,G)=>{const q=A.Range.lift(K.textEdit.textEdit.range);let Z=z.getLineTokens(q.startLineNumber),j=23;for(let $=Z.findTokenIndexAtOffset(q.startColumn)-1;j<50&&$>=0;$--)j=q.startColumn-Z.getStartOffset($);let X=z.getLineTokens(q.endLineNumber),Y=0;for(let $=X.findTokenIndexAtOffset(q.endColumn);Y<50&&$<X.getCount();$++)Y+=X.getEndOffset($)-X.getStartOffset($);return new m(V,G,K,z.getValueInRange(new A.Range(q.startLineNumber,q.startColumn-j,q.startLineNumber,q.startColumn)),z.getValueInRange(q),K.textEdit.textEdit.text,z.getValueInRange(new A.Range(q.endLineNumber,q.endColumn,q.endLineNumber,q.endColumn+Y)))});return U.dispose(),H}return[]}};b=Ee([W(0,t.ITextModelService),W(1,r.IUndoRedoService),W(2,n.ILanguageService),W(3,a.ILanguageConfigurationService)],b),e.BulkEditDataSource=b;class E{compare(V,z){return V instanceof d&&z instanceof d?(0,s.compare)(V.edit.uri.toString(),z.edit.uri.toString()):V instanceof m&&z instanceof m?A.Range.compareRangesUsingStarts(V.edit.textEdit.textEdit.range,z.edit.textEdit.textEdit.range):0}}e.BulkEditSorter=E;let y=class{constructor(V){this._labelService=V}getWidgetAriaLabel(){return(0,C.localize)(0,null)}getRole(V){return"checkbox"}getAriaLabel(V){if(V instanceof d){if(V.edit.textEdits.length>0)return V.edit.type&8&&V.edit.newUri?(0,C.localize)(1,null,this._labelService.getUriLabel(V.edit.uri,{relative:!0}),this._labelService.getUriLabel(V.edit.newUri,{relative:!0})):V.edit.type&2?(0,C.localize)(2,null,this._labelService.getUriLabel(V.edit.uri,{relative:!0})):V.edit.type&4?(0,C.localize)(3,null,this._labelService.getUriLabel(V.edit.uri,{relative:!0})):(0,C.localize)(4,null,this._labelService.getUriLabel(V.edit.uri,{relative:!0}));if(V.edit.type&8&&V.edit.newUri)return(0,C.localize)(5,null,this._labelService.getUriLabel(V.edit.uri,{relative:!0}),this._labelService.getUriLabel(V.edit.newUri,{relative:!0}));if(V.edit.type&2)return(0,C.localize)(6,null,this._labelService.getUriLabel(V.edit.uri,{relative:!0}));if(V.edit.type&4)return(0,C.localize)(7,null,this._labelService.getUriLabel(V.edit.uri,{relative:!0}))}if(V instanceof m){if(V.selecting.length>0&&V.inserting.length>0)return(0,C.localize)(8,null,V.edit.textEdit.textEdit.range.startLineNumber,V.selecting,V.inserting);if(V.selecting.length>0&&V.inserting.length===0)return(0,C.localize)(9,null,V.edit.textEdit.textEdit.range.startLineNumber,V.selecting);if(V.selecting.length===0&&V.inserting.length>0)return(0,C.localize)(10,null,V.edit.textEdit.textEdit.range.startLineNumber,V.selecting)}return null}};y=Ee([W(0,o.ILabelService)],y),e.BulkEditAccessibilityProvider=y;class T{getId(V){return V instanceof d?V.edit.uri+(V.parent instanceof g?JSON.stringify(V.parent.category.metadata):""):V instanceof m?V.parent.edit.uri.toString()+V.idx:JSON.stringify(V.category.metadata)}}e.BulkEditIdentityProvider=T;class R{constructor(V){V.classList.add("category"),this.icon=document.createElement("div"),V.appendChild(this.icon),this.label=new c.IconLabel(V)}}let O=class Io{constructor(V){this._themeService=V,this.templateId=Io.id}renderTemplate(V){return new R(V)}renderElement(V,z,U){U.icon.style.setProperty("--background-dark",null),U.icon.style.setProperty("--background-light",null),U.icon.style.color="";const{metadata:H}=V.element.category;if(S.ThemeIcon.isThemeIcon(H.iconPath)){const K=S.ThemeIcon.asClassName(H.iconPath);U.icon.className=K?`theme-icon ${K}`:"",U.icon.style.color=H.iconPath.color?this._themeService.getColorTheme().getColor(H.iconPath.color.id)?.toString()??"":""}else l.URI.isUri(H.iconPath)?(U.icon.className="uri-icon",U.icon.style.setProperty("--background-dark",k.asCSSUrl(H.iconPath)),U.icon.style.setProperty("--background-light",k.asCSSUrl(H.iconPath))):H.iconPath&&(U.icon.className="uri-icon",U.icon.style.setProperty("--background-dark",k.asCSSUrl(H.iconPath.dark)),U.icon.style.setProperty("--background-light",k.asCSSUrl(H.iconPath.light)));U.label.setLabel(H.label,H.description,{descriptionMatches:(0,f.createMatches)(V.filterData)})}disposeTemplate(V){V.label.dispose()}};O.id="CategoryElementRenderer",O=Ee([W(0,S.IThemeService)],O),e.CategoryElementRenderer=O;let x=class{constructor(V,z,U){this._labelService=U,this._disposables=new D.DisposableStore,this._localDisposables=new D.DisposableStore,this._checkbox=document.createElement("input"),this._checkbox.className="edit-checkbox",this._checkbox.type="checkbox",this._checkbox.setAttribute("role","checkbox"),V.appendChild(this._checkbox),this._label=z.create(V,{supportHighlights:!0}),this._details=document.createElement("span"),this._details.className="details",V.appendChild(this._details)}dispose(){this._localDisposables.dispose(),this._disposables.dispose(),this._label.dispose()}set(V,z){if(this._localDisposables.clear(),this._checkbox.checked=V.isChecked(),this._checkbox.disabled=V.isDisabled(),this._localDisposables.add(k.addDisposableListener(this._checkbox,"change",()=>{V.setChecked(this._checkbox.checked)})),V.edit.type&8&&V.edit.newUri)this._label.setResource({resource:V.edit.uri,name:(0,C.localize)(11,null,this._labelService.getUriLabel(V.edit.uri,{relative:!0}),this._labelService.getUriLabel(V.edit.newUri,{relative:!0}))},{fileDecorations:{colors:!0,badges:!1}}),this._details.innerText=(0,C.localize)(12,null);else{const U={matches:(0,f.createMatches)(z),fileKind:v.FileKind.FILE,fileDecorations:{colors:!0,badges:!1},extraClasses:[]};V.edit.type&2?this._details.innerText=(0,C.localize)(13,null):V.edit.type&4?(this._details.innerText=(0,C.localize)(14,null),U.extraClasses.push("delete")):this._details.innerText="",this._label.setFile(V.edit.uri,U)}}};x=Ee([W(2,o.ILabelService)],x);let F=class Do{constructor(V,z){this._resourceLabels=V,this._labelService=z,this.templateId=Do.id}renderTemplate(V){return new x(V,this._resourceLabels,this._labelService)}renderElement(V,z,U){U.set(V.element,V.filterData)}disposeTemplate(V){V.dispose()}};F.id="FileElementRenderer",F=Ee([W(1,o.ILabelService)],F),e.FileElementRenderer=F;let L=class{constructor(V,z){this._themeService=z,this._disposables=new D.DisposableStore,this._localDisposables=new D.DisposableStore,V.classList.add("textedit"),this._checkbox=document.createElement("input"),this._checkbox.className="edit-checkbox",this._checkbox.type="checkbox",this._checkbox.setAttribute("role","checkbox"),V.appendChild(this._checkbox),this._icon=document.createElement("div"),V.appendChild(this._icon),this._label=new _.HighlightedLabel(V)}dispose(){this._localDisposables.dispose(),this._disposables.dispose()}set(V){this._localDisposables.clear(),this._localDisposables.add(k.addDisposableListener(this._checkbox,"change",Z=>{V.setChecked(this._checkbox.checked),Z.preventDefault()})),V.parent.isChecked()?(this._checkbox.checked=V.isChecked(),this._checkbox.disabled=V.isDisabled()):(this._checkbox.checked=V.isChecked(),this._checkbox.disabled=V.isDisabled());let z="";z+=V.prefix,z+=V.selecting,z+=V.inserting,z+=V.suffix;let U={start:V.prefix.length,end:V.prefix.length+V.selecting.length,extraClasses:["remove"]},H={start:U.end,end:U.end+V.inserting.length,extraClasses:["insert"]},K,{metadata:G}=V.edit.textEdit;G&&G.description?K=(0,C.localize)(15,null,G.label,G.description):G&&(K=G.label);const q=G?.iconPath;if(!q)this._icon.style.display="none";else if(this._icon.style.display="block",this._icon.style.setProperty("--background-dark",null),this._icon.style.setProperty("--background-light",null),S.ThemeIcon.isThemeIcon(q)){const Z=S.ThemeIcon.asClassName(q);this._icon.className=Z?`theme-icon ${Z}`:"",this._icon.style.color=q.color?this._themeService.getColorTheme().getColor(q.color.id)?.toString()??"":""}else l.URI.isUri(q)?(this._icon.className="uri-icon",this._icon.style.setProperty("--background-dark",k.asCSSUrl(q)),this._icon.style.setProperty("--background-light",k.asCSSUrl(q))):(this._icon.className="uri-icon",this._icon.style.setProperty("--background-dark",k.asCSSUrl(q.dark)),this._icon.style.setProperty("--background-light",k.asCSSUrl(q.light)));this._label.set(z,[U,H],K,!0),this._icon.title=K||""}};L=Ee([W(1,S.IThemeService)],L);let M=class To{constructor(V){this._themeService=V,this.templateId=To.id}renderTemplate(V){return new L(V,this._themeService)}renderElement({element:V},z,U){U.set(V)}disposeTemplate(V){}};M.id="TextEditElementRenderer",M=Ee([W(0,S.IThemeService)],M),e.TextEditElementRenderer=M;class N{getHeight(){return 23}getTemplateId(V){return V instanceof d?F.id:V instanceof m?M.id:O.id}}e.BulkEditDelegate=N;class B{getKeyboardNavigationLabel(V){if(V instanceof d)return(0,i.basename)(V.edit.uri);if(V instanceof g)return V.category.metadata.label}}e.BulkEditNaviLabelProvider=B}),define(ne[416],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INotebookExecutionService=e.CellExecutionUpdateType=void 0;var f;(function(_){_[_.Output=1]="Output",_[_.OutputItems=2]="OutputItems",_[_.ExecutionState=3]="ExecutionState"})(f=e.CellExecutionUpdateType||(e.CellExecutionUpdateType={})),e.INotebookExecutionService=(0,t.createDecorator)("INotebookExecutionService")}),define(ne[359],re([1,0,416]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookDto=void 0;var f;(function(_){function A(l){return{mime:l.mime,valueBytes:l.data}}_.toNotebookOutputItemDto=A;function k(l){return{outputId:l.outputId,metadata:l.metadata,items:l.outputs.map(A)}}_.toNotebookOutputDto=k;function D(l){return{cellKind:l.cellKind,language:l.language,mime:l.mime,source:l.source,internalMetadata:l.internalMetadata,metadata:l.metadata,outputs:l.outputs.map(k)}}_.toNotebookCellDataDto=D;function I(l){return{metadata:l.metadata,cells:l.cells.map(D)}}_.toNotebookDataDto=I;function w(l){return{mime:l.mime,data:l.valueBytes}}_.fromNotebookOutputItemDto=w;function v(l){return{outputId:l.outputId,metadata:l.metadata,outputs:l.items.map(w)}}_.fromNotebookOutputDto=v;function C(l){return{cellKind:l.cellKind,language:l.language,mime:l.mime,source:l.source,outputs:l.outputs.map(v),metadata:l.metadata,internalMetadata:l.internalMetadata}}_.fromNotebookCellDataDto=C;function o(l){return{metadata:l.metadata,cells:l.cells.map(C)}}_.fromNotebookDataDto=o;function c(l){return{handle:l.handle,uri:l.uri,source:l.textBuffer.getLinesContent(),eol:l.textBuffer.getEOL(),language:l.language,cellKind:l.cellKind,outputs:l.outputs.map(k),metadata:l.metadata,internalMetadata:l.internalMetadata}}_.toNotebookCellDto=c;function i(l){return l.editType===t.CellExecutionUpdateType.Output?{editType:l.editType,append:l.append,outputs:l.outputs.map(v)}:l.editType===t.CellExecutionUpdateType.OutputItems?{editType:l.editType,append:l.append,outputId:l.outputId,items:l.items.map(w)}:l}_.fromCellExecuteUpdateDto=i;function S(l){return l}_.fromCellExecuteCompleteDto=S;function s(l){return l.editType===1?{editType:l.editType,index:l.index,count:l.count,cells:l.cells.map(C)}:l}_.fromCellEditOperationDto=s})(f=e.NotebookDto||(e.NotebookDto={}))}),define(ne[158],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INotebookExecutionStateService=void 0,e.INotebookExecutionStateService=(0,t.createDecorator)("INotebookExecutionStateService")}),define(ne[2178],re([1,0,110,2,267,64,158]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExecutionEditorProgressController=void 0;let D=class extends f.Disposable{constructor(w,v){super();this._notebookEditor=w,this._notebookExecutionStateService=v,this._register(w.onDidScroll(()=>this._update())),this._register(v.onDidChangeCellExecution(C=>{C.notebook.toString()===this._notebookEditor.textModel?.uri.toString()&&this._update()})),this._register(w.onDidChangeModel(()=>this._update()))}_update(){if(!this._notebookEditor.hasModel())return;const w=this._notebookExecutionStateService.getCellExecutionStatesForNotebook(this._notebookEditor.textModel?.uri).filter(C=>C.state===A.NotebookCellExecutionState.Executing),v=C=>{for(const o of this._notebookEditor.visibleRanges)for(const c of this._notebookEditor.getCellsInRange(o))if(c.handle===C.cellHandle){const i=this._notebookEditor.getAbsoluteTopOfElement(c);if(this._notebookEditor.scrollTop<i+30)return!0}return!1};!w.length||w.some(v)||w.some(C=>C.isPaused)?this._notebookEditor.hideProgress():this._notebookEditor.showProgress()}};D.id="workbench.notebook.executionEditorProgress",Ee([(0,t.throttle)(100)],D.prototype,"_update",null),D=Ee([W(1,k.INotebookExecutionStateService)],D),e.ExecutionEditorProgressController=D,(0,_.registerNotebookContribution)(D.id,D)}),define(ne[2179],re([1,0,280,175,64,158]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellProgressBar=void 0;let k=class extends f.CellPart{constructor(w,v,C){super();this._notebookExecutionStateService=C,this._progressBar=this._register(new t.ProgressBar(w)),this._progressBar.hide(),this._collapsedProgressBar=this._register(new t.ProgressBar(v)),this._collapsedProgressBar.hide()}didRenderCell(w){this._updateForExecutionState(w)}updateForExecutionState(w,v){this._updateForExecutionState(w,v)}updateState(w,v){if((v.metadataChanged||v.internalMetadataChanged)&&this._updateForExecutionState(w),v.inputCollapsedChanged){const C=this._notebookExecutionStateService.getCellExecution(w.uri);w.isInputCollapsed?(this._progressBar.hide(),C?.state===_.NotebookCellExecutionState.Executing&&this._updateForExecutionState(w)):(this._collapsedProgressBar.hide(),C?.state===_.NotebookCellExecutionState.Executing&&this._updateForExecutionState(w))}}_updateForExecutionState(w,v){const C=v?.changed??this._notebookExecutionStateService.getCellExecution(w.uri),o=w.isInputCollapsed?this._collapsedProgressBar:this._progressBar;C?.state===_.NotebookCellExecutionState.Executing&&(!C.didPause||w.isInputCollapsed)?D(o):o.hide()}};k=Ee([W(2,A.INotebookExecutionStateService)],k),e.CellProgressBar=k;function D(I){I.infinite().show(500)}}),define(ne[2180],re([1,0,10,181,2,1655,12,200,64,158]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CollapsedCodeCellExecutionIcon=void 0;let v=class extends _.Disposable{constructor(o,c,i,S){super();this._cell=c,this._element=i,this._executionStateService=S,this._visible=!1,this._update(),this._register(this._executionStateService.onDidChangeCellExecution(s=>{s.affectsCell(this._cell.uri)&&this._update()})),this._register(this._cell.model.onDidChangeInternalMetadata(()=>this._update()))}setVisibility(o){this._visible=o,this._update()}_update(){if(!this._visible)return;const o=this._executionStateService.getCellExecution(this._cell.uri),c=this._getItemForState(o,this._cell.model.internalMetadata);c?(this._element.style.display="",t.reset(this._element,...(0,f.renderLabelWithIcons)(c.text)),this._element.title=c.tooltip??""):(this._element.style.display="none",t.reset(this._element))}_getItemForState(o,c){const i=o?.state,{lastRunSuccess:S}=c;if(!i&&S)return{text:`$(${D.successStateIcon.id})`,tooltip:(0,A.localize)(0,null)};if(!i&&S===!1)return{text:`$(${D.errorStateIcon.id})`,tooltip:(0,A.localize)(1,null)};if(i===I.NotebookCellExecutionState.Pending||i===I.NotebookCellExecutionState.Unconfirmed)return{text:`$(${D.pendingStateIcon.id})`,tooltip:(0,A.localize)(2,null)};if(i===I.NotebookCellExecutionState.Executing)return{text:`$(${k.ThemeIcon.modify(D.executingStateIcon,"spin").id})`,tooltip:(0,A.localize)(3,null)}}};v=Ee([W(3,w.INotebookExecutionStateService)],v),e.CollapsedCodeCellExecutionIcon=v}),define(ne[238],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INotebookKernelService=void 0,e.INotebookKernelService=(0,t.createDecorator)("INotebookKernelService")}),define(ne[801],re([1,0,134,36,1662,12,200,238,1108]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebooKernelActionViewItem=void 0;let I=class extends t.ActionViewItem{constructor(v,C,o){super(void 0,new f.Action("fakeAction",void 0,A.ThemeIcon.asClassName(k.selectKernelIcon),!0,c=>v.run(c)),{label:!1,icon:!0});this._editor=C,this._notebookKernelService=o,this._register(C.onDidChangeModel(this._update,this)),this._register(o.onDidChangeNotebookAffinity(this._update,this)),this._register(o.onDidChangeSelectedNotebooks(this._update,this))}render(v){this._update(),super.render(v),v.classList.add("kernel-action-view-item"),this._kernelLabel=document.createElement("a"),v.appendChild(this._kernelLabel),this.updateLabel()}updateLabel(){this._kernelLabel&&(this._kernelLabel.classList.add("kernel-label"),this._kernelLabel.innerText=this._action.label,this._kernelLabel.title=this._action.tooltip)}_update(){const v=this._editor.textModel;if(!v){this._resetAction();return}const C=this._notebookKernelService.getMatchingKernel(v);this._updateActionFromKernelInfo(C)}_updateActionFromKernelInfo(v){this._action.enabled=!0;const C=v.selected??(v.all.length===1&&v.suggestions.length===1?v.suggestions[0]:void 0);C?(this._action.label=C.label,this._action.tooltip=C.description??C.detail??"",!v.selected):(this._action.label=(0,_.localize)(0,null),this._action.tooltip="")}_resetAction(){this._action.enabled=!1,this._action.label="",this._action.class=""}};I=Ee([W(2,D.INotebookKernelService)],I),e.NotebooKernelActionViewItem=I}),define(ne[802],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INotebookKeymapService=void 0,e.INotebookKeymapService=(0,t.createDecorator)("notebookKeymapService")}),define(ne[490],re([1,0,6,2,64]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookOptions=e.OutputInnerContainerTopPadding=e.getEditorTopPadding=e.updateEditorTopPadding=e.EditorTopPaddingChangeEvent=void 0;const A=18;let k=12;const D=new t.Emitter;e.EditorTopPaddingChangeEvent=D.event;function I(c){k=c,D.fire()}e.updateEditorTopPadding=I;function w(){return k}e.getEditorTopPadding=w,e.OutputInnerContainerTopPadding=4;const v=Object.freeze({codeCellLeftMargin:28,cellRunGutter:32,markdownCellTopMargin:8,markdownCellBottomMargin:8,markdownCellLeftMargin:0,markdownCellGutter:32,focusIndicatorLeftMargin:4}),C=Object.freeze({codeCellLeftMargin:8,cellRunGutter:36,markdownCellTopMargin:6,markdownCellBottomMargin:6,markdownCellLeftMargin:8,markdownCellGutter:36,focusIndicatorLeftMargin:4});class o extends f.Disposable{constructor(i,S,s){super();this.configurationService=i,this.notebookExecutionStateService=S,this.overrides=s,this._onDidChangeOptions=this._register(new t.Emitter),this.onDidChangeOptions=this._onDidChangeOptions.event;const l=this.configurationService.getValue(_.NotebookSetting.showCellStatusBar),r=s?.globalToolbar??this.configurationService.getValue(_.NotebookSetting.globalToolbar)??!0,p=this.configurationService.getValue(_.NotebookSetting.consolidatedOutputButton)??!0,u=this.configurationService.getValue(_.NotebookSetting.consolidatedRunButton)??!1,a=this.configurationService.getValue(_.NotebookSetting.dragAndDropEnabled)??!0,n=this.configurationService.getValue(_.NotebookSetting.cellToolbarLocation)??{default:"right"},h=s?.cellToolbarInteraction??this.configurationService.getValue(_.NotebookSetting.cellToolbarVisibility),g=this.configurationService.getValue(_.NotebookSetting.compactView)??!0,d=this._computeFocusIndicatorOption(),m=this._computeInsertToolbarPositionOption(),b=this._computeInsertToolbarAlignmentOption(),E=this._computeShowFoldingControlsOption(),y=this.configurationService.getValue("editor.fontSize"),T=this.configurationService.getValue(_.NotebookSetting.markupFontSize),R=this.configurationService.getValue(_.NotebookSetting.cellEditorOptionsCustomizations),O=this.configurationService.getValue(_.NotebookSetting.interactiveWindowCollapseCodeCells);this._layoutConfiguration={...g?C:v,cellTopMargin:6,cellBottomMargin:6,cellRightMargin:16,cellStatusBarHeight:22,cellOutputPadding:8,markdownPreviewPadding:8,editorToolbarHeight:0,editorTopPadding:k,editorBottomPadding:4,editorBottomPaddingWithoutStatusBar:12,collapsedIndicatorHeight:28,showCellStatusBar:l,globalToolbar:r,consolidatedOutputButton:p,consolidatedRunButton:u,dragAndDropEnabled:a,cellToolbarLocation:n,cellToolbarInteraction:h,compactView:g,focusIndicator:d,insertToolbarPosition:m,insertToolbarAlignment:b,showFoldingControls:E,fontSize:y,markupFontSize:T,editorOptionsCustomizations:R,focusIndicatorGap:3,interactiveWindowCollapseCodeCells:O,markdownFoldHintHeight:22},this._register(this.configurationService.onDidChangeConfiguration(x=>{this._updateConfiguration(x)})),this._register((0,e.EditorTopPaddingChangeEvent)(()=>{const x=Object.assign({},this._layoutConfiguration);x.editorTopPadding=w(),this._layoutConfiguration=x,this._onDidChangeOptions.fire({editorTopPadding:!0})}))}_updateConfiguration(i){const S=i.affectsConfiguration(_.NotebookSetting.showCellStatusBar),s=i.affectsConfiguration(_.NotebookSetting.cellToolbarLocation),l=i.affectsConfiguration(_.NotebookSetting.cellToolbarVisibility),r=i.affectsConfiguration(_.NotebookSetting.compactView),p=i.affectsConfiguration(_.NotebookSetting.focusIndicator),u=i.affectsConfiguration(_.NotebookSetting.insertToolbarLocation),a=i.affectsConfiguration(_.NotebookSetting.experimentalInsertToolbarAlignment),n=i.affectsConfiguration(_.NotebookSetting.globalToolbar),h=i.affectsConfiguration(_.NotebookSetting.consolidatedOutputButton),g=i.affectsConfiguration(_.NotebookSetting.consolidatedRunButton),d=i.affectsConfiguration(_.NotebookSetting.showFoldingControls),m=i.affectsConfiguration(_.NotebookSetting.dragAndDropEnabled),b=i.affectsConfiguration("editor.fontSize"),E=i.affectsConfiguration(_.NotebookSetting.markupFontSize),y=i.affectsConfiguration(_.NotebookSetting.cellEditorOptionsCustomizations),T=i.affectsConfiguration(_.NotebookSetting.interactiveWindowCollapseCodeCells);if(!S&&!s&&!l&&!r&&!p&&!u&&!a&&!n&&!h&&!g&&!d&&!m&&!b&&!E&&!y&&!T)return;let R=Object.assign({},this._layoutConfiguration);if(S&&(R.showCellStatusBar=this.configurationService.getValue(_.NotebookSetting.showCellStatusBar)),s&&(R.cellToolbarLocation=this.configurationService.getValue(_.NotebookSetting.cellToolbarLocation)??{default:"right"}),l&&!this.overrides?.cellToolbarInteraction&&(R.cellToolbarInteraction=this.configurationService.getValue(_.NotebookSetting.cellToolbarVisibility)),p&&(R.focusIndicator=this._computeFocusIndicatorOption()),r){const O=this.configurationService.getValue(_.NotebookSetting.compactView)??!0;R=Object.assign(R,{...O?C:v}),R.compactView=O}a&&(R.insertToolbarAlignment=this._computeInsertToolbarAlignmentOption()),u&&(R.insertToolbarPosition=this._computeInsertToolbarPositionOption()),n&&this.overrides?.globalToolbar===void 0&&(R.globalToolbar=this.configurationService.getValue(_.NotebookSetting.globalToolbar)??!0),h&&(R.consolidatedOutputButton=this.configurationService.getValue(_.NotebookSetting.consolidatedOutputButton)??!0),g&&(R.consolidatedRunButton=this.configurationService.getValue(_.NotebookSetting.consolidatedRunButton)??!0),d&&(R.showFoldingControls=this._computeShowFoldingControlsOption()),m&&(R.dragAndDropEnabled=this.configurationService.getValue(_.NotebookSetting.dragAndDropEnabled)??!0),b&&(R.fontSize=this.configurationService.getValue("editor.fontSize")),E&&(R.markupFontSize=this.configurationService.getValue(_.NotebookSetting.markupFontSize)),y&&(R.editorOptionsCustomizations=this.configurationService.getValue(_.NotebookSetting.cellEditorOptionsCustomizations)),T&&(R.interactiveWindowCollapseCodeCells=this.configurationService.getValue(_.NotebookSetting.interactiveWindowCollapseCodeCells)),this._layoutConfiguration=Object.freeze(R),this._onDidChangeOptions.fire({cellStatusBarVisibility:S,cellToolbarLocation:s,cellToolbarInteraction:l,compactView:r,focusIndicator:p,insertToolbarPosition:u,insertToolbarAlignment:a,globalToolbar:n,showFoldingControls:d,consolidatedOutputButton:h,consolidatedRunButton:g,dragAndDropEnabled:m,fontSize:b,markupFontSize:E,editorOptionsCustomizations:y,interactiveWindowCollapseCodeCells:T})}_computeInsertToolbarPositionOption(){return this.configurationService.getValue(_.NotebookSetting.insertToolbarLocation)??"both"}_computeInsertToolbarAlignmentOption(){return this.configurationService.getValue(_.NotebookSetting.experimentalInsertToolbarAlignment)??"center"}_computeShowFoldingControlsOption(){return this.configurationService.getValue(_.NotebookSetting.showFoldingControls)??"mouseover"}_computeFocusIndicatorOption(){return this.configurationService.getValue(_.NotebookSetting.focusIndicator)??"gutter"}getCellCollapseDefault(){return this._layoutConfiguration.interactiveWindowCollapseCodeCells==="never"?{codeCell:{inputCollapsed:!1}}:{codeCell:{inputCollapsed:!0}}}getLayoutConfiguration(){return this._layoutConfiguration}computeCollapsedMarkdownCellHeight(i){const{bottomToolbarGap:S}=this.computeBottomToolbarDimensions(i);return this._layoutConfiguration.markdownCellTopMargin+this._layoutConfiguration.collapsedIndicatorHeight+S+this._layoutConfiguration.markdownCellBottomMargin}computeBottomToolbarOffset(i,S){const{bottomToolbarGap:s,bottomToolbarHeight:l}=this.computeBottomToolbarDimensions(S);return i-s-l/2}computeCodeCellEditorWidth(i){return i-(this._layoutConfiguration.codeCellLeftMargin+this._layoutConfiguration.cellRunGutter+this._layoutConfiguration.cellRightMargin)}computeMarkdownCellEditorWidth(i){return i-this._layoutConfiguration.markdownCellGutter-this._layoutConfiguration.markdownCellLeftMargin-this._layoutConfiguration.cellRightMargin}computeStatusBarHeight(){return this._layoutConfiguration.cellStatusBarHeight}_computeBottomToolbarDimensions(i,S,s,l){return s==="left"||l!=="hidden"?{bottomToolbarGap:18,bottomToolbarHeight:18}:S==="betweenCells"||S==="both"?i?{bottomToolbarGap:12,bottomToolbarHeight:20}:{bottomToolbarGap:20,bottomToolbarHeight:20}:{bottomToolbarGap:0,bottomToolbarHeight:0}}computeBottomToolbarDimensions(i){const S=this._layoutConfiguration,s=this.computeCellToolbarLocation(i),{bottomToolbarGap:l,bottomToolbarHeight:r}=this._computeBottomToolbarDimensions(S.compactView,S.insertToolbarPosition,S.insertToolbarAlignment,s);return{bottomToolbarGap:l,bottomToolbarHeight:r}}computeCellToolbarLocation(i){const S=this._layoutConfiguration.cellToolbarLocation;if(typeof S=="string"){if(S==="left"||S==="right"||S==="hidden")return S}else if(i){const s=S[i]??S.default;let l="right";switch(s){case"left":l="left";break;case"right":l="right";break;case"hidden":l="hidden";break;default:l="right";break}return l}return"right"}computeTopInsertToolbarHeight(i){if(this._layoutConfiguration.insertToolbarPosition==="betweenCells"||this._layoutConfiguration.insertToolbarPosition==="both")return A;const S=this.computeCellToolbarLocation(i);return S==="left"||S==="right"?A:0}computeEditorPadding(i,S){return{top:w(),bottom:this.statusBarIsVisible(i,S)?this._layoutConfiguration.editorBottomPadding:this._layoutConfiguration.editorBottomPaddingWithoutStatusBar}}computeEditorStatusbarHeight(i,S){return this.statusBarIsVisible(i,S)?this.computeStatusBarHeight():0}statusBarIsVisible(i,S){const s=this.notebookExecutionStateService.getCellExecution(S);return this._layoutConfiguration.showCellStatusBar==="visible"?!0:this._layoutConfiguration.showCellStatusBar==="visibleAfterExecute"?typeof i.lastRunSuccess=="boolean"||s!==void 0:!1}computeWebviewOptions(){return{outputNodePadding:this._layoutConfiguration.cellOutputPadding,outputNodeLeftPadding:this._layoutConfiguration.cellOutputPadding,previewNodePadding:this._layoutConfiguration.markdownPreviewPadding,markdownLeftMargin:this._layoutConfiguration.markdownCellGutter+this._layoutConfiguration.markdownCellLeftMargin,leftMargin:this._layoutConfiguration.codeCellLeftMargin,rightMargin:this._layoutConfiguration.cellRightMargin,runGutter:this._layoutConfiguration.cellRunGutter,dragAndDropEnabled:this._layoutConfiguration.dragAndDropEnabled,fontSize:this._layoutConfiguration.fontSize,markupFontSize:this._layoutConfiguration.markupFontSize}}computeDiffWebviewOptions(){return{outputNodePadding:this._layoutConfiguration.cellOutputPadding,outputNodeLeftPadding:0,previewNodePadding:this._layoutConfiguration.markdownPreviewPadding,markdownLeftMargin:0,leftMargin:32,rightMargin:0,runGutter:0,dragAndDropEnabled:!1,fontSize:this._layoutConfiguration.fontSize,markupFontSize:this._layoutConfiguration.markupFontSize}}computeIndicatorPosition(i,S,s){const{bottomToolbarGap:l}=this.computeBottomToolbarDimensions(s);return{bottomIndicatorTop:i-l-this._layoutConfiguration.cellBottomMargin-S,verticalIndicatorHeight:i-l-S}}}e.NotebookOptions=o}),define(ne[2181],re([1,0,152,92,19]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookOutputRendererInfo=void 0;class A{constructor(I){this.value=new Set(I),this.defined=this.value.size>0}values(){return Array.from(this.value)}matches(I){return I.some(w=>this.value.has(w))}}class k{constructor(I){this.preloads=[],this.id=I.id,this.extensionId=I.extension.identifier,this.extensionLocation=I.extension.extensionLocation,this.isBuiltin=I.extension.isBuiltin,typeof I.entrypoint=="string"?this.entrypoint=(0,_.joinPath)(this.extensionLocation,I.entrypoint):(this.extends=I.entrypoint.extends,this.entrypoint=(0,_.joinPath)(this.extensionLocation,I.entrypoint.path)),this.displayName=I.displayName,this.mimeTypes=I.mimeTypes,this.mimeTypeGlobs=this.mimeTypes.map(w=>t.parse(w)),this.hardDependencies=new A(I.dependencies??f.Iterable.empty()),this.optionalDependencies=new A(I.optionalDependencies??f.Iterable.empty()),this.messaging=I.requiresMessaging??"never"}get dependencies(){return this.hardDependencies.values()}matchesWithoutKernel(I){return this.matchesMimeTypeOnly(I)?this.hardDependencies.defined?0:this.optionalDependencies.defined?1:2:3}matches(I,w){return this.matchesMimeTypeOnly(I)?this.hardDependencies.defined?this.hardDependencies.matches(w)?0:3:this.optionalDependencies.matches(w)?1:2:3}matchesMimeTypeOnly(I){return this.extends!==void 0?!1:this.mimeTypeGlobs.some(w=>w(I))||this.mimeTypes.some(w=>w===I)}}e.NotebookOutputRendererInfo=k}),define(ne[584],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getAndClearMarks=e.clearMarks=e.mark=void 0;const t=new Map;function f(k,D){const I=k.toString();if(t.has(I)){if(t.get(I)[D]){console.error(`Skipping overwrite of notebook perf value: ${D}`);return}t.get(I)[D]=Date.now()}else{const w={};w[D]=Date.now(),t.set(I,w)}}e.mark=f;function _(k){const D=k.toString();t.delete(D)}e.clearMarks=_;function A(k){const D=k.toString(),I=t.get(D)||null;return t.delete(D),I}e.getAndClearMarks=A}),define(ne[803],re([1,0,152,48,64]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookProviderInfo=void 0;class A{constructor(D){this.extension=D.extension,this.id=D.id,this.displayName=D.displayName,this._selectors=D.selectors?.map(I=>({include:I.filenamePattern,exclude:I.excludeFileNamePattern||""}))||[],this.priority=D.priority,this.providerDisplayName=D.providerDisplayName,this.exclusive=D.exclusive,this._options={transientCellMetadata:{},transientDocumentMetadata:{},transientOutputs:!1}}get selectors(){return this._selectors}get options(){return this._options}update(D){D.selectors&&(this._selectors=D.selectors),D.options&&(this._options=D.options)}matches(D){return this.selectors?.some(I=>A.selectorMatches(I,D))}static selectorMatches(D,I){if(typeof D=="string"&&t.match(D.toLowerCase(),(0,f.basename)(I.fsPath).toLowerCase())||t.isRelativePattern(D)&&t.match(D,(0,f.basename)(I.fsPath).toLowerCase()))return!0;if(!(0,_.isDocumentExcludePattern)(D))return!1;const w=D.include,v=D.exclude;return t.match(w,(0,f.basename)(I.fsPath).toLowerCase())?!(v&&t.match(v,(0,f.basename)(I.fsPath).toLowerCase())):!1}static possibleFileEnding(D){for(const I of D){const w=A._possibleFileEnding(I);if(w)return w}}static _possibleFileEnding(D){const I=/^.*(\.[a-zA-Z0-9_-]+)$/;let w;if(typeof D=="string")w=D;else if(t.isRelativePattern(D))w=D.pattern;else if(D.include)return A._possibleFileEnding(D.include);if(w){const v=I.exec(w);if(v)return v[1]}}}e.NotebookProviderInfo=A}),define(ne[268],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cellRangeContains=e.cellRangesEqual=e.reduceCellRanges=e.cellRangesToIndexes=e.cellIndexesToRanges=e.isICellRange=void 0;function t(I){return!I||typeof I!="object"?!1:typeof I.start=="number"&&typeof I.end=="number"}e.isICellRange=t;function f(I){I.sort((v,C)=>v-C);const w=I.shift();return w===void 0?[]:I.reduce(function(v,C){return C<=v[0][1]?v[0][1]=C+1:v.unshift([C,C+1]),v},[[w,w+1]]).reverse().map(v=>({start:v[0],end:v[1]}))}e.cellIndexesToRanges=f;function _(I){return I.reduce((v,C)=>{for(let o=C.start;o<C.end;o++)v.push(o);return v},[])}e.cellRangesToIndexes=_;function A(I){const w=I.sort((C,o)=>C.start-o.start),v=w[0];return v?w.reduce((C,o)=>{const c=C[C.length-1];return c.end>=o.start?c.end=Math.max(c.end,o.end):C.push(o),C},[v]):[]}e.reduceCellRanges=A;function k(I,w){if(I=A(I),w=A(w),I.length!==w.length)return!1;for(let v=0;v<I.length;v++)if(I[v].start!==w[v].start||I[v].end!==w[v].end)return!1;return!0}e.cellRangesEqual=k;function D(I,w){return w.start>=I.start&&w.end<=I.end}e.cellRangeContains=D}),define(ne[804],re([1,0,143,6,2,13,268]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookVisibleCellObserver=void 0;class D extends _.Disposable{constructor(w){super();this._notebookEditor=w,this._onDidChangeVisibleCells=this._register(new f.Emitter),this.onDidChangeVisibleCells=this._onDidChangeVisibleCells.event,this._viewModelDisposables=this._register(new _.DisposableStore),this._visibleCells=[],this._register(this._notebookEditor.onDidChangeVisibleRanges(this._updateVisibleCells,this)),this._register(this._notebookEditor.onDidChangeModel(this._onModelChange,this)),this._updateVisibleCells()}get visibleCells(){return this._visibleCells}_onModelChange(){this._viewModelDisposables.clear(),this._notebookEditor.hasModel()&&this._viewModelDisposables.add(this._notebookEditor.onDidChangeViewCells(()=>this.updateEverything())),this.updateEverything()}updateEverything(){this._onDidChangeVisibleCells.fire({added:[],removed:Array.from(this._visibleCells)}),this._visibleCells=[],this._updateVisibleCells()}_updateVisibleCells(){if(!this._notebookEditor.hasModel())return;const w=(0,k.cellRangesToIndexes)(this._notebookEditor.visibleRanges).map(S=>this._notebookEditor.cellAt(S)).filter(A.isDefined),v=new Set(w.map(S=>S.handle)),C=new Set(this._visibleCells.map(S=>S.handle)),o=(0,t.diffSets)(C,v),c=o.added.map(S=>this._notebookEditor.getCellByHandle(S)).filter(A.isDefined),i=o.removed.map(S=>this._notebookEditor.getCellByHandle(S)).filter(A.isDefined);this._visibleCells=w,this._onDidChangeVisibleCells.fire({added:c,removed:i})}}e.NotebookVisibleCellObserver=D}),define(ne[2182],re([1,0,15,11,30,2,804,267,357]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContributedStatusBarItemController=void 0;let w=class extends A.Disposable{constructor(o,c){super();this._notebookEditor=o,this._notebookCellStatusBarService=c,this._visibleCells=new Map,this._observer=this._register(new k.NotebookVisibleCellObserver(this._notebookEditor)),this._register(this._observer.onDidChangeVisibleCells(this._updateVisibleCells,this)),this._updateEverything(),this._register(this._notebookCellStatusBarService.onDidChangeProviders(this._updateEverything,this)),this._register(this._notebookCellStatusBarService.onDidChangeItems(this._updateEverything,this))}_updateEverything(){const o=this._observer.visibleCells.filter(l=>!this._visibleCells.has(l.handle)),c=new Set(this._observer.visibleCells.map(l=>l.handle)),i=Array.from(this._visibleCells.keys()),S=i.filter(l=>!c.has(l)),s=i.filter(l=>c.has(l));this._updateVisibleCells({added:o,removed:S.map(l=>({handle:l}))}),s.forEach(l=>this._visibleCells.get(l)?.update())}_updateVisibleCells(o){const c=this._notebookEditor._getViewModel();if(!!c){for(const i of o.added){const S=new v(c,i,this._notebookCellStatusBarService);this._visibleCells.set(i.handle,S)}for(const i of o.removed)this._visibleCells.get(i.handle)?.dispose(),this._visibleCells.delete(i.handle)}}dispose(){super.dispose(),this._visibleCells.forEach(o=>o.dispose()),this._visibleCells.clear()}};w.id="workbench.notebook.statusBar.contributed",w=Ee([W(1,I.INotebookCellStatusBarService)],w),e.ContributedStatusBarItemController=w;class v extends A.Disposable{constructor(o,c,i){super();this._notebookViewModel=o,this._cell=c,this._notebookCellStatusBarService=i,this._currentItemIds=[],this._currentItemLists=[],this._updateThrottler=new f.Throttler,this._register((0,A.toDisposable)(()=>this._activeToken?.dispose(!0))),this._updateSoon(),this._register(this._cell.model.onDidChangeContent(()=>this._updateSoon())),this._register(this._cell.model.onDidChangeLanguage(()=>this._updateSoon())),this._register(this._cell.model.onDidChangeMetadata(()=>this._updateSoon())),this._register(this._cell.model.onDidChangeInternalMetadata(()=>this._updateSoon())),this._register(this._cell.model.onDidChangeOutputs(()=>this._updateSoon()))}update(){this._updateSoon()}_updateSoon(){this._register((0,f.disposableTimeout)(()=>{this._updateThrottler.queue(()=>this._update())},0))}async _update(){const o=this._notebookViewModel.getCellIndex(this._cell),c=this._notebookViewModel.notebookDocument.uri,i=this._notebookViewModel.notebookDocument.viewType;this._activeToken?.dispose(!0);const S=this._activeToken=new _.CancellationTokenSource,s=await this._notebookCellStatusBarService.getStatusBarItemsForCell(c,o,i,S.token);if(S.token.isCancellationRequested){s.forEach(p=>p.dispose&&p.dispose());return}const l=(0,t.flatten)(s.map(p=>p.items)),r=this._notebookViewModel.deltaCellStatusBarItems(this._currentItemIds,[{handle:this._cell.handle,items:l}]);this._currentItemLists.forEach(p=>p.dispose&&p.dispose()),this._currentItemLists=s,this._currentItemIds=r}dispose(){super.dispose(),this._activeToken?.dispose(!0),this._notebookViewModel.deltaCellStatusBarItems(this._currentItemIds,[{handle:this._cell.handle,items:[]}]),this._currentItemLists.forEach(o=>o.dispose&&o.dispose())}}(0,D.registerNotebookContribution)(w.id,w)}),define(ne[2183],re([1,0,6,2,461,537,64,268]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.updateFoldingStateAtIndex=e.FoldingModel=void 0;class I{constructor(){this._viewModel=null,this._viewModelStore=new f.DisposableStore,this._onDidFoldingRegionChanges=new t.Emitter,this.onDidFoldingRegionChanged=this._onDidFoldingRegionChanges.event,this._foldingRangeDecorationIds=[],this._regions=new _.FoldingRegions(new Uint32Array(0),new Uint32Array(0))}get regions(){return this._regions}dispose(){this._onDidFoldingRegionChanges.dispose(),this._viewModelStore.dispose()}detachViewModel(){this._viewModelStore.clear(),this._viewModel=null}attachViewModel(C){this._viewModel=C,this._viewModelStore.add(this._viewModel.onDidChangeViewCells(()=>{this.recompute()})),this._viewModelStore.add(this._viewModel.onDidChangeSelection(()=>{if(!this._viewModel)return;const o=(0,D.cellRangesToIndexes)(this._viewModel.getSelections());let c=!1;o.forEach(i=>{let S=this.regions.findRange(i+1);for(;S!==-1;)this._regions.isCollapsed(S)&&i>this._regions.getStartLineNumber(S)-1&&(this._regions.setCollapsed(S,!1),c=!0),S=this._regions.getParentIndex(S)}),c&&this._onDidFoldingRegionChanges.fire()})),this.recompute()}getRegionAtLine(C){if(this._regions){const o=this._regions.findRange(C);if(o>=0)return this._regions.toRegion(o)}return null}getRegionsInside(C,o){const c=[],i=C?C.regionIndex+1:0,S=C?C.endLineNumber:Number.MAX_VALUE;if(o&&o.length===2){const s=[];for(let l=i,r=this._regions.length;l<r;l++){const p=this._regions.toRegion(l);if(this._regions.getStartLineNumber(l)<S){for(;s.length>0&&!p.containedBy(s[s.length-1]);)s.pop();s.push(p),o(p,s.length)&&c.push(p)}else break}}else for(let s=i,l=this._regions.length;s<l;s++){const r=this._regions.toRegion(s);if(this._regions.getStartLineNumber(s)<S)(!o||o(r))&&c.push(r);else break}return c}getAllRegionsAtLine(C,o){const c=[];if(this._regions){let i=this._regions.findRange(C),S=1;for(;i>=0;){const s=this._regions.toRegion(i);(!o||o(s,S))&&c.push(s),S++,i=s.parentIndex}}return c}setCollapsed(C,o){this._regions.setCollapsed(C,o)}recompute(){if(!this._viewModel)return;const C=this._viewModel,o=C.viewCells,c=[];for(let a=0;a<o.length;a++){const n=o[a];if(n.cellKind===k.CellKind.Code)continue;const g=n.getText().match(/^[ \t]*(\#+) /gm);let d=7;if(g&&g.length)for(let m=0;m<g.length;m++)d=Math.min(d,g[m].length);d<7&&c.push({index:a,level:d,endIndex:0})}const i=c.map((a,n)=>{let h;for(let d=n+1;d<c.length;++d)if(c[d].level<=a.level){h=c[d].index-1;break}const g=h!==void 0?h:o.length-1;return{start:a.index+1,end:g+1,rank:1}}).filter(a=>a.start!==a.end),S=(0,A.sanitizeRanges)(i,5e3);let s=0;const l=()=>{for(;s<this._regions.length;){const a=this._regions.isCollapsed(s);if(s++,a)return s-1}return-1};let r=0,p=l();for(;p!==-1&&r<S.length;){const a=C.getTrackedRange(this._foldingRangeDecorationIds[p]);if(a){const n=a.start;for(;r<S.length;){const h=S.getStartLineNumber(r)-1;if(n>=h)S.setCollapsed(r,n===h),r++;else break}}p=l()}for(;r<S.length;)S.setCollapsed(r,!1),r++;const u=[];for(let a=0;a<S.length;a++){const n=S.toRegion(a);u.push({start:n.startLineNumber-1,end:n.endLineNumber-1})}this._foldingRangeDecorationIds.forEach(a=>C.setTrackedRange(a,null,3)),this._foldingRangeDecorationIds=u.map(a=>C.setTrackedRange(null,a,3)).filter(a=>a!==null),this._regions=S,this._onDidFoldingRegionChanges.fire()}getMemento(){const C=[];let o=0;for(;o<this._regions.length;){if(this._regions.isCollapsed(o)){const i=this._regions.toRegion(o);C.push({start:i.startLineNumber-1,end:i.endLineNumber-1})}o++}return C}applyMemento(C){if(!this._viewModel)return!1;let o=0,c=0;for(;c<C.length&&o<this._regions.length;){if(this._viewModel.getTrackedRange(this._foldingRangeDecorationIds[o])){const S=C[c].start;for(;o<this._regions.length;){const s=this._regions.getStartLineNumber(o)-1;if(S>=s)this._regions.setCollapsed(o,S===s),o++;else break}}c++}for(;o<this._regions.length;)this._regions.setCollapsed(o,!1),o++;return!0}}e.FoldingModel=I;function w(v,C,o){const c=v.regions.findRange(C+1);v.setCollapsed(c,o)}e.updateFoldingStateAtIndex=w}),define(ne[585],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INotebookRendererMessagingService=void 0,e.INotebookRendererMessagingService=(0,t.createDecorator)("INotebookRendererMessagingService")}),define(ne[142],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleNotebookProviderInfo=e.ComplexNotebookProviderInfo=e.INotebookService=void 0,e.INotebookService=(0,t.createDecorator)("notebookService");class f{constructor(k,D,I){this.viewType=k,this.controller=D,this.extensionData=I}}e.ComplexNotebookProviderInfo=f;class _{constructor(k,D,I){this.viewType=k,this.serializer=D,this.extensionData=I}}e.SimpleNotebookProviderInfo=_}),define(ne[2184],re([1,0,152,9,28,64,238,142]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),_.CommandsRegistry.registerCommand("_resolveNotebookContentProvider",(I,w)=>I.get(D.INotebookService).getContributedNotebookTypes().map(o=>{const c=o.selectors.map(i=>typeof i=="string"||t.isRelativePattern(i)?i:(0,A.isDocumentExcludePattern)(i)?{include:i.include,exclude:i.exclude}:null).filter(i=>i!==null);return{viewType:o.id,displayName:o.displayName,filenamePattern:c,options:{transientCellMetadata:o.options.transientCellMetadata,transientDocumentMetadata:o.options.transientDocumentMetadata,transientOutputs:o.options.transientOutputs}}})),_.CommandsRegistry.registerCommand("_resolveNotebookKernels",async(I,w)=>{const v=I.get(k.INotebookKernelService),C=f.URI.revive(w.uri);return v.getMatchingKernel({uri:C,viewType:w.viewType}).all.map(c=>({id:c.id,label:c.label,kind:c.kind,description:c.description,detail:c.detail,isPreferred:!1,preloads:c.preloadUris}))})}),define(ne[2185],re([1,0,6,2,89,344,800,142]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffNestedCellViewModel=void 0;let I=class extends f.Disposable{constructor(v,C){super();this.textModel=v,this._notebookService=C,this._onDidChangeState=this._register(new t.Emitter),this._hoveringOutput=!1,this._focusOnOutput=!1,this._outputCollection=[],this._outputsTop=null,this._onDidChangeOutputLayout=this._register(new t.Emitter),this.onDidChangeOutputLayout=this._onDidChangeOutputLayout.event,this._id=(0,_.generateUuid)(),this._outputViewModels=this.textModel.outputs.map(o=>new k.CellOutputViewModel(this,o,this._notebookService)),this._register(this.textModel.onDidChangeOutputs(o=>{this._outputCollection.splice(o.start,o.deleteCount,...o.newOutputs.map(()=>0)),this._outputViewModels.splice(o.start,o.deleteCount,...o.newOutputs.map(c=>new k.CellOutputViewModel(this,c,this._notebookService))),this._outputsTop=null,this._onDidChangeOutputLayout.fire()})),this._outputCollection=new Array(this.textModel.outputs.length)}get id(){return this._id}get outputs(){return this.textModel.outputs}get language(){return this.textModel.language}get metadata(){return this.textModel.metadata}get uri(){return this.textModel.uri}get handle(){return this.textModel.handle}get outputIsHovered(){return this._hoveringOutput}set outputIsHovered(v){this._hoveringOutput=v,this._onDidChangeState.fire({outputIsHoveredChanged:!0})}get outputIsFocused(){return this._focusOnOutput}set outputIsFocused(v){this._focusOnOutput=v,this._onDidChangeState.fire({outputIsFocusedChanged:!0})}get outputsViewModels(){return this._outputViewModels}_ensureOutputsTop(){if(!this._outputsTop){const v=new Uint32Array(this._outputCollection.length);for(let C=0;C<this._outputCollection.length;C++)v[C]=this._outputCollection[C];this._outputsTop=new A.PrefixSumComputer(v)}}getOutputOffset(v){if(this._ensureOutputsTop(),v>=this._outputCollection.length)throw new Error("Output index out of range!");return this._outputsTop.getPrefixSum(v-1)}updateOutputHeight(v,C){if(v>=this._outputCollection.length)throw new Error("Output index out of range!");this._ensureOutputsTop(),this._outputCollection[v]=C,this._outputsTop.setValue(v,C)&&this._onDidChangeOutputLayout.fire()}getOutputTotalHeight(){return this._ensureOutputsTop(),this._outputsTop?.getTotalSum()??0}};I=Ee([W(1,D.INotebookService)],I),e.DiffNestedCellViewModel=I}),define(ne[2186],re([1,0,6,2,55,19,5,31,64,416,158,238,142]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookExecutionStateService=void 0;let c=class extends f.Disposable{constructor(p,u,a,n){super();this._notebookKernelService=p,this._instantiationService=u,this._logService=a,this._notebookService=n,this._executions=new _.ResourceMap,this._notebookListeners=new _.ResourceMap,this._cellListeners=new _.ResourceMap,this._onDidChangeCellExecution=this._register(new t.Emitter),this.onDidChangeCellExecution=this._onDidChangeCellExecution.event}forceCancelNotebookExecutions(p){const u=this._executions.get(p);if(!!u)for(const a of u.values())this._onCellExecutionDidComplete(p,a.cellHandle,a)}getCellExecution(p){const u=I.CellUri.parse(p);if(!u)throw new Error(`Not a cell URI: ${p}`);const a=this._executions.get(u.notebook);if(a)return a.get(u.handle)}getCellExecutionStatesForNotebook(p){const u=this._executions.get(p);return u?Array.from(u.values()):[]}_onCellExecutionDidChange(p,u,a){this._onDidChangeCellExecution.fire(new i(p,u,a))}_onCellExecutionDidComplete(p,u,a){const n=this._executions.get(p);if(!n){this._logService.debug(`NotebookExecutionStateService#_onCellExecutionDidComplete - unknown notebook ${p.toString()}`);return}a.dispose();const h=I.CellUri.generate(p,u);this._cellListeners.get(h)?.dispose(),this._cellListeners.delete(h),n.delete(u),n.size===0&&(this._executions.delete(p),this._notebookListeners.get(p)?.dispose(),this._notebookListeners.delete(p)),this._onDidChangeCellExecution.fire(new i(p,u))}createCellExecution(p,u,a){const n=this._notebookService.getNotebookTextModel(u);if(!n)throw new Error(`Notebook not found: ${u.toString()}`);const h=this._notebookKernelService.getMatchingKernel(n);if(!h.selected||h.selected.id!==p)throw new Error(`Kernel is not selected: ${h.selected?.id} !== ${p}`);let g=this._executions.get(u);if(!g){const m=this._instantiationService.createInstance(S,u);this._notebookListeners.set(u,m),g=new Map,this._executions.set(u,g)}let d=g.get(a);return d||(d=this._createNotebookCellExecution(n,a),g.set(a,d),this._onDidChangeCellExecution.fire(new i(u,a,d))),d}_createNotebookCellExecution(p,u){const a=p.uri,n=this._instantiationService.createInstance(l,u,p),h=(0,f.combinedDisposable)(n.onDidUpdate(()=>this._onCellExecutionDidChange(a,u,n)),n.onDidComplete(()=>this._onCellExecutionDidComplete(a,u,n)));return this._cellListeners.set(I.CellUri.generate(a,u),h),n}dispose(){super.dispose(),this._executions.forEach(p=>{p.forEach(u=>u.dispose()),p.clear()}),this._executions.clear(),this._cellListeners.forEach(p=>p.dispose()),this._notebookListeners.forEach(p=>p.dispose())}};c=Ee([W(0,C.INotebookKernelService),W(1,k.IInstantiationService),W(2,D.ILogService),W(3,o.INotebookService)],c),e.NotebookExecutionStateService=c;class i{constructor(p,u,a){this.notebook=p,this.cellHandle=u,this.changed=a}affectsCell(p){const u=I.CellUri.parse(p);return!!u&&(0,A.isEqual)(this.notebook,u.notebook)&&this.cellHandle===u.handle}affectsNotebook(p){return(0,A.isEqual)(this.notebook,p)}}let S=class extends f.Disposable{constructor(p,u,a,n,h){super();this._notebookService=u,this._notebookExecutionService=a,this._notebookExecutionStateService=n,this._logService=h,this._logService.debug(`NotebookExecution#ctor ${p.toString()}`);const g=this._notebookService.getNotebookTextModel(p);if(!g)throw new Error("Notebook not found: "+p);this._notebookModel=g,this._register(this._notebookModel.onWillAddRemoveCells(d=>this.onWillAddRemoveCells(d))),this._register(this._notebookModel.onWillDispose(()=>this.onWillDisposeDocument()))}cancelAll(){this._logService.debug("NotebookExecutionListeners#cancelAll");const p=this._notebookExecutionStateService.getCellExecutionStatesForNotebook(this._notebookModel.uri);this._notebookExecutionService.cancelNotebookCellHandles(this._notebookModel,p.map(u=>u.cellHandle))}onWillDisposeDocument(){this._logService.debug("NotebookExecution#onWillDisposeDocument"),this.cancelAll()}onWillAddRemoveCells(p){const u=this._notebookExecutionStateService.getCellExecutionStatesForNotebook(this._notebookModel.uri),a=new Set(u.map(h=>h.cellHandle)),n=new Set;p.rawEvent.changes.forEach(([h,g])=>(g&&this._notebookModel.cells.slice(h,h+g).map(m=>m.handle).forEach(m=>{a.has(m)&&n.add(m)}),!1)),n.size&&(this._logService.debug(`NotebookExecution#onWillAddRemoveCells, ${JSON.stringify([...n])}`),this._notebookExecutionService.cancelNotebookCellHandles(this._notebookModel,n))}};S=Ee([W(1,o.INotebookService),W(2,w.INotebookExecutionService),W(3,v.INotebookExecutionStateService),W(4,D.ILogService)],S);function s(r,p){if(r.editType===w.CellExecutionUpdateType.Output)return{editType:2,handle:p,append:r.append,outputs:r.outputs};if(r.editType===w.CellExecutionUpdateType.OutputItems)return{editType:7,items:r.items,append:r.append,outputId:r.outputId};if(r.editType===w.CellExecutionUpdateType.ExecutionState){const u={};return typeof r.executionOrder!="undefined"&&(u.executionOrder=r.executionOrder),typeof r.runStartTime!="undefined"&&(u.runStartTime=r.runStartTime),{editType:9,handle:p,internalMetadata:u}}throw new Error("Unknown cell update type")}let l=class extends f.Disposable{constructor(p,u,a){super();this.cellHandle=p,this._notebookModel=u,this._logService=a,this._onDidUpdate=this._register(new t.Emitter),this.onDidUpdate=this._onDidUpdate.event,this._onDidComplete=this._register(new t.Emitter),this.onDidComplete=this._onDidComplete.event,this._state=I.NotebookCellExecutionState.Unconfirmed,this._didPause=!1,this._isPaused=!1,this._logService.debug(`CellExecution#ctor ${this.getCellLog()}`);const n={editType:9,handle:this.cellHandle,internalMetadata:{runStartTime:null,runEndTime:null,lastRunSuccess:null,executionOrder:null}};this._applyExecutionEdits([n])}get state(){return this._state}get notebook(){return this._notebookModel.uri}get didPause(){return this._didPause}get isPaused(){return this._isPaused}getCellLog(){return`${this._notebookModel.uri.toString()}, ${this.cellHandle}`}logUpdates(p){const u=p.map(a=>w.CellExecutionUpdateType[a.editType]).join(", ");this._logService.debug(`CellExecution#updateExecution ${this.getCellLog()}, [${u}]`)}confirm(){this._logService.debug(`CellExecution#confirm ${this.getCellLog()}`),this._state=I.NotebookCellExecutionState.Pending,this._onDidUpdate.fire()}update(p){this.logUpdates(p),p.some(n=>n.editType===w.CellExecutionUpdateType.ExecutionState)&&(this._state=I.NotebookCellExecutionState.Executing),!this._didPause&&p.some(n=>n.editType===w.CellExecutionUpdateType.ExecutionState&&n.didPause)&&(this._didPause=!0);const u=[...p].reverse().find(n=>n.editType===w.CellExecutionUpdateType.ExecutionState&&typeof n.isPaused=="boolean");if(u&&(this._isPaused=u.isPaused),!this._notebookModel.cells.find(n=>n.handle===this.cellHandle))this._logService.debug(`CellExecution#update, updating cell not in notebook: ${this._notebookModel.uri.toString()}, ${this.cellHandle}`);else{const n=p.map(h=>s(h,this.cellHandle));this._applyExecutionEdits(n)}this._onDidUpdate.fire()}complete(p){const u=this._notebookModel.cells.find(a=>a.handle===this.cellHandle);if(!u)this._logService.debug(`CellExecution#complete, completing cell not in notebook: ${this._notebookModel.uri.toString()}, ${this.cellHandle}`);else{const a={editType:9,handle:this.cellHandle,internalMetadata:{lastRunSuccess:p.lastRunSuccess,runStartTime:this._didPause?null:u.internalMetadata.runStartTime,runEndTime:this._didPause?null:p.runEndTime}};this._applyExecutionEdits([a])}this._onDidComplete.fire()}_applyExecutionEdits(p){this._notebookModel.applyEdits(p,!0,void 0,()=>{},void 0,!1)}};l=Ee([W(2,D.ILogService)],l)}),define(ne[2187],re([1,0,6,2,55,24,9,142,11]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookKernelService=void 0;class w{constructor(c){this.notebookPriorities=new _.ResourceMap,this.kernel=c,this.score=-1,this.time=w._logicClock++}}w._logicClock=0;class v{static str(c){return`${c.viewType}/${c.uri.toString()}`}static obj(c){const i=c.indexOf("/");return{viewType:c.substring(0,i),uri:k.URI.parse(c.substring(i+1))}}}let C=class ki extends f.Disposable{constructor(c,i){super();this._notebookService=c,this._storageService=i,this._kernels=new Map,this._typeBindings=new _.LRUCache(100,.7),this._notebookBindings=new _.LRUCache(1e3,.7),this._onDidChangeNotebookKernelBinding=this._register(new t.Emitter),this._onDidAddKernel=this._register(new t.Emitter),this._onDidRemoveKernel=this._register(new t.Emitter),this._onDidChangeNotebookAffinity=this._register(new t.Emitter),this.onDidChangeSelectedNotebooks=this._onDidChangeNotebookKernelBinding.event,this.onDidAddKernel=this._onDidAddKernel.event,this.onDidRemoveKernel=this._onDidRemoveKernel.event,this.onDidChangeNotebookAffinity=this._onDidChangeNotebookAffinity.event,this._register(c.onDidAddNotebookDocument(this._tryAutoBindNotebook,this)),this._register(c.onWillRemoveNotebookDocument(S=>{const s=this._notebookBindings.get(v.str(S));s&&this._onDidChangeNotebookKernelBinding.fire({notebook:S.uri,oldKernel:s,newKernel:void 0})}));try{const S=JSON.parse(this._storageService.get(ki._storageNotebookBinding,1,"[]"));this._notebookBindings.fromJSON(S)}catch{}try{const S=JSON.parse(this._storageService.get(ki._storageTypeBinding,0,"[]"));this._typeBindings.fromJSON(S)}catch{}}dispose(){this._kernels.clear(),super.dispose()}_persistMementos(){this._persistSoonHandle?.dispose(),this._persistSoonHandle=(0,I.runWhenIdle)(()=>{this._storageService.store(ki._storageNotebookBinding,JSON.stringify(this._notebookBindings),1,1),this._storageService.store(ki._storageTypeBinding,JSON.stringify(this._typeBindings),0,0)},100)}static _score(c,i){return c.viewType==="*"?5:c.viewType===i.viewType?10:0}_tryAutoBindNotebook(c,i){const S=this._notebookBindings.get(v.str(c));if(!S)return;const s=this._kernels.get(S);!s||!ki._score(s.kernel,c)||(!i||s.kernel===i)&&this._onDidChangeNotebookKernelBinding.fire({notebook:c.uri,oldKernel:void 0,newKernel:s.kernel.id})}registerKernel(c){if(this._kernels.has(c.id))throw new Error(`NOTEBOOK CONTROLLER with id '${c.id}' already exists`);this._kernels.set(c.id,new w(c)),this._onDidAddKernel.fire(c);for(const i of this._notebookService.getNotebookTextModels())this._tryAutoBindNotebook(i,c);return(0,f.toDisposable)(()=>{this._kernels.delete(c.id)&&this._onDidRemoveKernel.fire(c);for(const[i,S]of Array.from(this._notebookBindings))S===c.id&&this._onDidChangeNotebookKernelBinding.fire({notebook:v.obj(i).uri,oldKernel:c.id,newKernel:void 0})})}getMatchingKernel(c){const i=[];for(const p of this._kernels.values()){const u=ki._score(p.kernel,c);u&&i.push({score:u,kernel:p.kernel,instanceAffinity:p.notebookPriorities.get(c.uri)??1,typeAffinity:this._typeBindings.get(p.kernel.viewType)===p.kernel.id?1:0})}i.sort((p,u)=>u.instanceAffinity-p.instanceAffinity||u.typeAffinity-p.typeAffinity||p.score-u.score||p.kernel.label.localeCompare(u.kernel.label));const S=i.map(p=>p.kernel),s=this._notebookBindings.get(v.str(c)),l=s?this._kernels.get(s)?.kernel:void 0,r=i.filter(p=>p.instanceAffinity>1&&p.kernel!==l).map(p=>p.kernel);return!r.length&&S.length&&r.push(S[0]),{all:S,selected:l,suggestions:r}}getSelectedOrSuggestedKernel(c){const i=this.getMatchingKernel(c);return i.selected??(i.all.length===1?i.all[0]:void 0)}selectKernelForNotebookType(c,i){this._typeBindings.get(i)!==c.id&&(this._typeBindings.set(i,c.id),this._persistMementos(),this._onDidChangeNotebookAffinity.fire())}selectKernelForNotebook(c,i){const S=v.str(i),s=this._notebookBindings.get(S);s!==c?.id&&(c?this._notebookBindings.set(S,c.id):this._notebookBindings.delete(S),this._onDidChangeNotebookKernelBinding.fire({notebook:i.uri,oldKernel:s,newKernel:c.id}),this._persistMementos())}preselectKernelForNotebook(c,i){const S=v.str(i);this._notebookBindings.get(S)!==c?.id&&(this._notebookBindings.set(S,c.id),this._persistMementos())}updateKernelNotebookAffinity(c,i,S){const s=this._kernels.get(c.id);if(!s)throw new Error(`UNKNOWN kernel '${c.id}'`);S===void 0?s.notebookPriorities.delete(i):s.notebookPriorities.set(i,S),this._onDidChangeNotebookAffinity.fire()}};C._storageNotebookBinding="notebook.controller2NotebookBindings",C._storageTypeBinding="notebook.controller2TypeBindings",C=Ee([W(0,D.INotebookService),W(1,A.IStorageService)],C),e.NotebookKernelService=C}),define(ne[2188],re([1,0,2,448,655,64,142]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookWorkerClient=e.NotebookEditorModelManager=e.WorkerManager=e.NotebookEditorWorkerServiceImpl=void 0;let D=class extends t.Disposable{constructor(c){super();this._workerManager=this._register(new I(c))}canComputeDiff(c,i){throw new Error("Method not implemented.")}computeDiff(c,i){return this._workerManager.withWorker().then(S=>S.computeDiff(c,i))}};D=Ee([W(0,k.INotebookService)],D),e.NotebookEditorWorkerServiceImpl=D;class I extends t.Disposable{constructor(c){super();this._notebookService=c,this._editorWorkerClient=null}withWorker(){return this._editorWorkerClient||(this._editorWorkerClient=new C(this._notebookService,"notebookEditorWorkerService")),Promise.resolve(this._editorWorkerClient)}}e.WorkerManager=I;class w extends t.Disposable{constructor(c,i){super();this._proxy=c,this._notebookService=i,this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null)}ensureSyncedResources(c){for(const i of c){const S=i.toString();this._syncedModels[S]||this._beginModelSync(i),this._syncedModels[S]&&(this._syncedModelsLastUsedTime[S]=new Date().getTime())}}_beginModelSync(c){const i=this._notebookService.listNotebookDocuments().find(r=>r.uri.toString()===c.toString());if(!i)return;const S=c.toString();this._proxy.acceptNewModel(i.uri.toString(),{cells:i.cells.map(r=>({handle:r.handle,uri:r.uri,source:r.getValue(),eol:r.textBuffer.getEOL(),language:r.language,mime:r.mime,cellKind:r.cellKind,outputs:r.outputs.map(p=>({outputId:p.outputId,outputs:p.outputs})),metadata:r.metadata,internalMetadata:r.internalMetadata})),metadata:i.metadata});const s=new t.DisposableStore,l=r=>({handle:r.handle,uri:r.uri,source:r.textBuffer.getLinesContent(),eol:r.textBuffer.getEOL(),language:r.language,cellKind:r.cellKind,outputs:r.outputs,metadata:r.metadata,internalMetadata:r.internalMetadata});s.add(i.onDidChangeContent(r=>{const p=r.rawEvents.map(u=>u.kind===A.NotebookCellsChangeType.ModelChange||u.kind===A.NotebookCellsChangeType.Initialize?{kind:u.kind,versionId:r.versionId,changes:u.changes.map(n=>[n[0],n[1],n[2].map(h=>l(h))])}:u.kind===A.NotebookCellsChangeType.Move?{kind:u.kind,index:u.index,length:u.length,newIdx:u.newIdx,versionId:r.versionId,cells:u.cells.map(n=>l(n))}:u);this._proxy.acceptModelChanged(S.toString(),{rawEvents:p,versionId:r.versionId})})),s.add(i.onWillDispose(()=>{this._stopModelSync(S)})),s.add((0,t.toDisposable)(()=>{this._proxy.acceptRemovedModel(S)})),this._syncedModels[S]=s}_stopModelSync(c){const i=this._syncedModels[c];delete this._syncedModels[c],delete this._syncedModelsLastUsedTime[c],(0,t.dispose)(i)}}e.NotebookEditorModelManager=w;class v{constructor(c){this._workerClient=c}fhr(c,i){return this._workerClient.fhr(c,i)}}class C extends t.Disposable{constructor(c,i){super();this._notebookService=c,this._workerFactory=new _.DefaultWorkerFactory(i),this._worker=null,this._modelManager=null}fhr(c,i){throw new Error("Not implemented!")}computeDiff(c,i){return this._withSyncedResources([c,i]).then(S=>S.computeDiff(c.toString(),i.toString()))}_getOrCreateModelManager(c){return this._modelManager||(this._modelManager=this._register(new w(c,this._notebookService))),this._modelManager}_withSyncedResources(c){return this._getProxy().then(i=>(this._getOrCreateModelManager(i).ensureSyncedResources(c),i))}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new f.SimpleWorkerClient(this._workerFactory,"vs/workbench/contrib/notebook/common/services/notebookSimpleWorker",new v(this)))}catch(c){throw c}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,c=>{throw c})}}e.NotebookWorkerClient=C}),define(ne[232],re([1,0,152,142,19,5,54,415,45,18,584,23,779,22,60]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isCompositeNotebookEditorInput=e.NotebookEditorInput=void 0;let S=class an extends o.AbstractResourceEditorInput{constructor(r,p,u,a,n,h,g,d,m){super(r,void 0,d,m);this.viewType=p,this.options=u,this._notebookService=a,this._notebookModelResolverService=n,this._fileDialogService=h,this._instantiationService=g,this._editorModelReference=null,this._defaultDirtyState=!1,this._defaultDirtyState=!!u.startDirty,this._sideLoadedListener=a.onDidAddNotebookDocument(b=>{b.viewType===this.viewType&&b.uri.toString()===this.resource.toString()&&this.resolve().catch(c.onUnexpectedError)})}static create(r,p,u,a={}){return r.createInstance(an,p,u,a)}dispose(){this._sideLoadedListener.dispose(),this._editorModelReference?.dispose(),this._editorModelReference=null,super.dispose()}get typeId(){return an.ID}get editorId(){return this.viewType}get capabilities(){let r=0;return this.resource.scheme===w.Schemas.untitled&&(r|=4),this._editorModelReference?this._editorModelReference.object.isReadonly()&&(r|=2):this.fileService.hasCapability(this.resource,2048)&&(r|=2),r}getDescription(r=1){if(!this.hasCapability(4)||this._editorModelReference?.object.hasAssociatedFilePath())return super.getDescription(r)}isDirty(){return this._editorModelReference?this._editorModelReference.object.isDirty():this._defaultDirtyState}async save(r,p){if(this._editorModelReference)return this.hasCapability(4)?this.saveAs(r,p):(await this._editorModelReference.object.save(p),this)}async saveAs(r,p){if(!this._editorModelReference)return;const u=this._notebookService.getContributedNotebookType(this.viewType);if(!u)return;const a=this.hasCapability(4)?await this._suggestName(u,this.labelService.getUriBasenameLabel(this.resource)):this._editorModelReference.object.resource;let n;if(this._editorModelReference.object.hasAssociatedFilePath())n=a;else if(n=await this._fileDialogService.pickFileToSave(a,p?.availableFileSystems),!n)return;if(!u.matches(n)){const h=u.selectors.map(g=>typeof g=="string"?g:t.isRelativePattern(g)?`${g} (base ${g.base})`:g.exclude?`${g.include} (exclude: ${g.exclude})`:`${g.include}`).join(", ");throw new Error(`File name ${n} is not supported by ${u.providerDisplayName}. Please make sure the file name matches following patterns: ${h}`)}return await this._editorModelReference.object.saveAs(n)}async _suggestName(r,p){const u=r.selectors[0];let a=u&&typeof u=="string"?u:void 0;if(!a&&u){const n=u.include;typeof n=="string"&&(a=n)}if(a){const n=/^\*\.([A-Za-z_-]*)$/.exec(a);if(n&&n.length>1){const h=n[1];if(!p.endsWith(h))return(0,_.joinPath)(await this._fileDialogService.defaultFilePath(),p+"."+h)}}return(0,_.joinPath)(await this._fileDialogService.defaultFilePath(),p)}async rename(r,p){if(this._editorModelReference&&this._notebookService.getContributedNotebookTypes(p).find(a=>a.id===this._editorModelReference.object.viewType))return this._move(r,p)}_move(r,p){return{editor:an.create(this._instantiationService,p,this.viewType)}}async revert(r,p){this._editorModelReference&&this._editorModelReference.object.isDirty()&&await this._editorModelReference.object.revert(p)}async resolve(){if(!await this._notebookService.canResolve(this.viewType))return null;if((0,v.mark)(this.resource,"extensionActivated"),this._sideLoadedListener.dispose(),this._editorModelReference)this._editorModelReference.object.load();else{const r=await this._notebookModelResolverService.resolve(this.resource,this.viewType);if(this._editorModelReference)return r.dispose(),this._editorModelReference.object;if(this._editorModelReference=r,this.isDisposed())return this._editorModelReference.dispose(),this._editorModelReference=null,null;this._register(this._editorModelReference.object.onDidChangeDirty(()=>this._onDidChangeDirty.fire())),this._register(this._editorModelReference.object.onDidChangeReadonly(()=>this._onDidChangeCapabilities.fire())),this._editorModelReference.object.isDirty()&&this._onDidChangeDirty.fire()}if(this.options._backupId){const r=await this._notebookService.withNotebookDataProvider(this._editorModelReference.object.notebook.uri,this._editorModelReference.object.notebook.viewType);if(!(r instanceof f.SimpleNotebookProviderInfo))throw new Error("CANNOT open file notebook with this provider");const p=await r.serializer.dataToNotebook(i.VSBuffer.fromString(JSON.stringify({__webview_backup:this.options._backupId})));this._editorModelReference.object.notebook.applyEdits([{editType:1,index:0,count:this._editorModelReference.object.notebook.length,cells:p.cells}],!0,void 0,()=>{},void 0,!1),this.options._workingCopy&&(this.options._backupId=void 0,this.options._workingCopy=void 0,this.options.startDirty=void 0)}return this._editorModelReference.object}toUntyped(){return{resource:this.preferredResource,options:{override:this.viewType}}}matches(r){return super.matches(r)?!0:r instanceof an?this.viewType===r.viewType&&(0,_.isEqual)(this.resource,r.resource):!1}};S.ID="workbench.input.notebook",S=Ee([W(3,f.INotebookService),W(4,D.INotebookEditorModelResolverService),W(5,k.IFileDialogService),W(6,A.IInstantiationService),W(7,I.ILabelService),W(8,C.IFileService)],S),e.NotebookEditorInput=S;function s(l){return!!l&&typeof l=="object"&&Array.isArray(l.editorInputs)&&l.editorInputs.every(r=>r instanceof S)}e.isCompositeNotebookEditorInput=s}),define(ne[805],re([1,0,6,48,19,52,61,5,174,579,793,232]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InteractiveEditorInput=void 0;let o=class ln extends I.EditorInput{constructor(i,S,s,l,r,p,u,a){const n=C.NotebookEditorInput.create(l,i,"interactive",{});super();this._notebookEditorInput=n,this._register(this._notebookEditorInput),this._initTitle=s,this._inputResource=S,this._inputResolver=null,this._editorModelReference=null,this._inputModelRef=null,this._textModelService=p,this._interactiveDocumentService=u,this._historyService=a,this._registerListeners()}static create(i,S,s,l){return i.createInstance(ln,S,s,l)}get editorId(){return ln.ID}get typeId(){return ln.ID}get notebookEditorInput(){return this._notebookEditorInput}get editorInputs(){return[this._notebookEditorInput]}get resource(){return this.primary.resource}get inputResource(){return this._inputResource}get primary(){return this._notebookEditorInput}_registerListeners(){const i=t.Event.once(this.primary.onWillDispose);this._register(i(()=>{this.isDisposed()||this.dispose()})),this._register(this.primary.onDidChangeDirty(()=>this._onDidChangeDirty.fire())),this._register(this.primary.onDidChangeLabel(()=>this._onDidChangeLabel.fire())),this._register(this.primary.onDidChangeCapabilities(()=>this._onDidChangeCapabilities.fire()))}isDirty(){return!1}async _resolveEditorModel(){return this._editorModelReference||(this._editorModelReference=await this._notebookEditorInput.resolve()),this._editorModelReference}async resolve(){return this._editorModelReference?this._editorModelReference:this._inputResolver?this._inputResolver:(this._inputResolver=this._resolveEditorModel(),this._inputResolver)}async resolveInput(i){return this._inputModelRef?this._inputModelRef.object.textEditorModel:(this._interactiveDocumentService.willCreateInteractiveDocument(this.resource,this.inputResource,i),this._inputModelRef=await this._textModelService.createModelReference(this.inputResource),this._inputModelRef.object.textEditorModel)}matches(i){return super.matches(i)?!0:i instanceof ln?(0,_.isEqual)(this.resource,i.resource)&&(0,_.isEqual)(this.inputResource,i.inputResource):!1}getName(){if(this._initTitle)return this._initTitle;const i=this.primary.resource.path,S=f.basename(i);return S.substr(0,S.length-f.extname(i).length)}dispose(){this._editorModelReference?.revert({soft:!0}),this._notebookEditorInput?.dispose(),this._editorModelReference?.dispose(),this._editorModelReference=null,this._interactiveDocumentService.willRemoveInteractiveDocument(this.resource,this.inputResource),this._inputModelRef?.dispose(),this._inputModelRef=null,super.dispose()}get historyService(){return this._historyService}};o.ID="workbench.input.interactive",o=Ee([W(3,D.IInstantiationService),W(4,A.IModelService),W(5,k.ITextModelService),W(6,w.IInteractiveDocumentService),W(7,v.IInteractiveHistoryService)],o),e.InteractiveEditorInput=o}),define(ne[104],re([1,0,64,232,268]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellFoldingState=e.cellRangeToViewCells=e.expandCellRangesWithHiddenCells=e.getNotebookEditorFromEditorPane=e.CursorAtBoundary=e.CellFocusMode=e.CellEditState=e.CellLayoutContext=e.CellLayoutState=e.RenderOutputType=e.KERNEL_EXTENSIONS=e.JUPYTER_EXTENSION_ID=e.IPYNB_VIEW_TYPE=e.EXPAND_CELL_OUTPUT_COMMAND_ID=e.QUIT_EDIT_CELL_COMMAND_ID=e.CHANGE_CELL_LANGUAGE=e.EXECUTE_CELL_COMMAND_ID=e.EXPAND_CELL_INPUT_COMMAND_ID=void 0,e.EXPAND_CELL_INPUT_COMMAND_ID="notebook.cell.expandCellInput",e.EXECUTE_CELL_COMMAND_ID="notebook.cell.execute",e.CHANGE_CELL_LANGUAGE="notebook.cell.changeLanguage",e.QUIT_EDIT_CELL_COMMAND_ID="notebook.cell.quitEdit",e.EXPAND_CELL_OUTPUT_COMMAND_ID="notebook.cell.expandCellOutput",e.IPYNB_VIEW_TYPE="jupyter-notebook",e.JUPYTER_EXTENSION_ID="ms-toolsai.jupyter",e.KERNEL_EXTENSIONS=new Map([[e.IPYNB_VIEW_TYPE,e.JUPYTER_EXTENSION_ID]]);var A;(function(S){S[S.Html=0]="Html",S[S.Extension=1]="Extension"})(A=e.RenderOutputType||(e.RenderOutputType={}));var k;(function(S){S[S.Uninitialized=0]="Uninitialized",S[S.Estimated=1]="Estimated",S[S.FromCache=2]="FromCache",S[S.Measured=3]="Measured"})(k=e.CellLayoutState||(e.CellLayoutState={}));var D;(function(S){S[S.Fold=0]="Fold"})(D=e.CellLayoutContext||(e.CellLayoutContext={}));var I;(function(S){S[S.Preview=0]="Preview",S[S.Editing=1]="Editing"})(I=e.CellEditState||(e.CellEditState={}));var w;(function(S){S[S.Container=0]="Container",S[S.Editor=1]="Editor"})(w=e.CellFocusMode||(e.CellFocusMode={}));var v;(function(S){S[S.None=0]="None",S[S.Top=1]="Top",S[S.Bottom=2]="Bottom",S[S.Both=3]="Both"})(v=e.CursorAtBoundary||(e.CursorAtBoundary={}));function C(S){if(!S)return;if(S.getId()===t.NOTEBOOK_EDITOR_ID)return S.getControl();const s=S.input;if(s&&(0,f.isCompositeNotebookEditorInput)(s))return S.getControl().notebookEditor}e.getNotebookEditorFromEditorPane=C;function o(S,s){const l=(0,_.cellRangesToIndexes)(s),r=[];return l.forEach(p=>{if(!S.cellAt(p))return;const a=S.getViewIndexByModelIndex(p);if(a<0)return;const n=a+1,h=S.getCellRangeFromViewRange(a,n);h&&r.push(h)}),(0,_.reduceCellRanges)(r)}e.expandCellRangesWithHiddenCells=o;function c(S,s){const l=[];return(0,_.reduceCellRanges)(s).forEach(r=>{l.push(...S.getCellsInRange(r))}),l}e.cellRangeToViewCells=c;var i;(function(S){S[S.None=0]="None",S[S.Expanded=1]="Expanded",S[S.Collapsed=2]="Collapsed"})(i=e.CellFoldingState||(e.CellFoldingState={}))}),define(ne[2189],re([1,0,11,104,20,760,344,64,8,2,15,32]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindModel=void 0;let o=class extends w.Disposable{constructor(i,S,s){super();this._notebookEditor=i,this._state=S,this._configurationService=s,this._findMatches=[],this._findMatchesStarts=null,this._currentMatch=-1,this._allMatchesDecorations=[],this._currentMatchCellDecorations=[],this._allMatchesCellDecorations=[],this._currentMatchDecorations=null,this._computePromise=null,this._modelDisposable=this._register(new w.DisposableStore),this._throttledDelayer=new t.Delayer(20),this._computePromise=null,this._register(S.onFindReplaceStateChange(l=>{(l.searchString||l.isRegex||l.matchCase||l.searchScope||l.wholeWord||l.isRevealed&&this._state.isRevealed||l.filters)&&this.research(),l.isRevealed&&!this._state.isRevealed&&this.clear()})),this._register(this._notebookEditor.onDidChangeModel(l=>{this._registerModelListener(l)})),this._notebookEditor.hasModel()&&this._registerModelListener(this._notebookEditor.textModel)}get findMatches(){return this._findMatches}get currentMatch(){return this._currentMatch}ensureFindMatches(){this._findMatchesStarts||this.set(this._findMatches,!0)}getCurrentMatch(){const i=this._findMatchesStarts.getIndexOf(this._currentMatch),S=this._findMatches[i.index].cell,s=this._findMatches[i.index].matches[i.remainder];return{cell:S,match:s,isModelMatch:i.remainder<this._findMatches[i.index].modelMatchCount}}find(i){if(!this.findMatches.length)return;if(!this._findMatchesStarts)this.set(this._findMatches,!0);else{const s=this._findMatchesStarts.getTotalSum();if(this._currentMatch===-1)this._currentMatch=i?s-1:0;else{const l=(this._currentMatch+(i?-1:1)+s)%s;this._currentMatch=l}}const S=this._findMatchesStarts.getIndexOf(this._currentMatch);this.highlightCurrentFindMatchDecoration(S.index,S.remainder).then(s=>{this.revealCellRange(S.index,S.remainder,s),this._state.changeMatchInfo(this._currentMatch,this._findMatches.reduce((l,r)=>l+r.matches.length,0),void 0)})}revealCellRange(i,S,s){const l=this._findMatches[i];if(S>=l.modelMatchCount)this._notebookEditor.focusElement(l.cell),this._notebookEditor.getCellIndex(l.cell)!==void 0&&this._notebookEditor.revealCellOffsetInCenterAsync(l.cell,s??0);else{const r=l.matches[S];l.cell.updateEditState(f.CellEditState.Editing,"find"),this._notebookEditor.focusElement(l.cell),this._notebookEditor.setCellEditorSelection(l.cell,r.range),this._notebookEditor.revealRangeInCenterIfOutsideViewportAsync(l.cell,r.range)}}_registerModelListener(i){this._modelDisposable.clear(),i&&this._modelDisposable.add(i.onDidChangeContent(S=>{!S.rawEvents.some(s=>s.kind===D.NotebookCellsChangeType.ChangeCellContent||s.kind===D.NotebookCellsChangeType.ModelChange)||this.research()})),this.research()}async research(){this._throttledDelayer.trigger(()=>{this._research()})}async _research(){if(this._computePromise?.cancel(),!this._state.isRevealed||!this._notebookEditor.hasModel()){this.set([],!1);return}this._computePromise=(0,t.createCancelablePromise)(u=>this._compute(u));const i=await this._computePromise;if(!i){this.set([],!1);return}if(i.length===0){this.set([],!1);return}if(this._currentMatch===-1){this.set(i,!1);return}const S=this._findMatchesStarts.getIndexOf(this._currentMatch),s=this._findMatches[S.index].cell,l=this._notebookEditor.getCellIndex(s),r=u=>{const a=(0,v.findFirstInSorted)(i.map(n=>n.index),n=>n>=u);this._updateCurrentMatch(i,this._matchesCountBeforeIndex(i,a))};if(l<0){if(this._notebookEditor.getLength()===0){this.set(i,!1);return}r(l);return}const p=this._notebookEditor.cellAt(l);if(p.cellKind===D.CellKind.Markup&&p.getEditState()===f.CellEditState.Preview){r(l);return}if(!this._currentMatchDecorations){r(l);return}if(this._currentMatchDecorations.kind==="input"){const u=this._currentMatchDecorations.decorations.find(n=>n.ownerId===p.handle);if(!u){r(l);return}const a=(0,v.findFirstInSorted)(i,n=>n.index>=l)%i.length;if(i[a].index>l){this._updateCurrentMatch(i,this._matchesCountBeforeIndex(i,a));return}else{let n=p.editorAttached&&u.decorations[0]?p.getCellDecorationRange(u.decorations[0]):null;if(n===null&&S.remainder<this._findMatches[S.index].modelMatchCount&&(n=this._findMatches[S.index].matches[S.remainder].range),n!==null){const h=i[a],g=(0,v.findFirstInSorted)(h.matches.slice(0,h.modelMatchCount),d=>_.Range.compareRangesUsingStarts(d.range,n)>=0);this._updateCurrentMatch(i,this._matchesCountBeforeIndex(i,a)+g)}else{this._updateCurrentMatch(i,this._matchesCountBeforeIndex(i,a));return}}}else{const u=(0,v.findFirstInSorted)(i.map(a=>a.index),a=>a>=l)%i.length;this._updateCurrentMatch(i,this._matchesCountBeforeIndex(i,u))}}set(i,S){if(!i||!i.length){this._findMatches=[],this.setAllFindMatchesDecorations([]),this.constructFindMatchesStarts(),this._currentMatch=-1,this.clearCurrentFindMatchDecoration(),this._state.changeMatchInfo(this._currentMatch,this._findMatches.reduce((s,l)=>s+l.matches.length,0),void 0);return}this._findMatches=i,this.setAllFindMatchesDecorations(i||[]),this.constructFindMatchesStarts(),S&&(this._currentMatch=0,this.highlightCurrentFindMatchDecoration(0,0)),this._state.changeMatchInfo(this._currentMatch,this._findMatches.reduce((s,l)=>s+l.matches.length,0),void 0)}async _compute(i){this._state.change({isSearching:!0},!1);let S=null;const s=this._state.searchString,l=this._configurationService.inspect("editor.wordSeparators").value,r={regex:this._state.isRegex,wholeWord:this._state.wholeWord,caseSensitive:this._state.matchCase,wordSeparators:l,includeMarkupInput:this._state.filters?.markupInput??!0,includeCodeInput:this._state.filters?.codeInput??!0,includeMarkupPreview:!!this._state.filters?.markupPreview,includeOutput:!!this._state.filters?.codeOutput};return s&&this._notebookEditor.hasModel()?S=await this._notebookEditor.find(s,r,i):S=null,this._state.change({isSearching:!1},!1),S}_updateCurrentMatch(i,S){this.set(i,!1),this._currentMatch=S%i.length;const s=this._findMatchesStarts.getIndexOf(this._currentMatch);this.highlightCurrentFindMatchDecoration(s.index,s.remainder),this._state.changeMatchInfo(this._currentMatch,this._findMatches.reduce((l,r)=>l+r.matches.length,0),void 0)}_matchesCountBeforeIndex(i,S){let s=0;for(let l=0;l<S;l++)s+=i[l].matches.length;return s}constructFindMatchesStarts(){if(this._findMatches&&this._findMatches.length){const i=new Uint32Array(this._findMatches.length);for(let S=0;S<this._findMatches.length;S++)i[S]=this._findMatches[S].matches.length;this._findMatchesStarts=new k.PrefixSumComputer(i)}else this._findMatchesStarts=null}async highlightCurrentFindMatchDecoration(i,S){const s=this._findMatches[i].cell;if(S<this._findMatches[i].modelMatchCount){this.clearCurrentFindMatchDecoration();const l=this._findMatches[i].matches[S];return this._notebookEditor.changeModelDecorations(r=>{const p=A.FindDecorations._CURRENT_FIND_MATCH_DECORATION,u=[{range:l.range,options:p}],a={ownerId:s.handle,decorations:u};this._currentMatchDecorations={kind:"input",decorations:r.deltaDecorations(this._currentMatchDecorations?.kind==="input"?this._currentMatchDecorations.decorations:[],[a])}}),this._currentMatchCellDecorations=this._notebookEditor.deltaCellDecorations(this._currentMatchCellDecorations,[{ownerId:s.handle,handle:s.handle,options:{overviewRuler:{color:C.overviewRulerSelectionHighlightForeground,modelRanges:[l.range],includeOutput:!1}}}]),null}else{this.clearCurrentFindMatchDecoration();const l=this._findMatches[i].matches[S],r=await this._notebookEditor.highlightFind(s,l.index);return this._currentMatchDecorations={kind:"output",index:l.index},this._currentMatchCellDecorations=this._notebookEditor.deltaCellDecorations(this._currentMatchCellDecorations,[{ownerId:s.handle,handle:s.handle,options:{overviewRuler:{color:C.overviewRulerSelectionHighlightForeground,modelRanges:[],includeOutput:!0}}}]),r}}clearCurrentFindMatchDecoration(){this._currentMatchDecorations?.kind==="input"?this._notebookEditor.changeModelDecorations(i=>{i.deltaDecorations(this._currentMatchDecorations?.kind==="input"?this._currentMatchDecorations.decorations:[],[]),this._currentMatchDecorations=null}):this._currentMatchDecorations?.kind==="output"&&this._notebookEditor.unHighlightFind(this._currentMatchDecorations.index),this._currentMatchCellDecorations=this._notebookEditor.deltaCellDecorations(this._currentMatchCellDecorations,[])}setAllFindMatchesDecorations(i){this._notebookEditor.changeModelDecorations(S=>{const s=A.FindDecorations._FIND_MATCH_DECORATION,l=i.map(r=>{const p=r.matches,u=new Array(p.length);for(let a=0,n=Math.min(p.length,r.modelMatchCount);a<n;a++)u[a]={range:p[a].range,options:s};return{ownerId:r.cell.handle,decorations:u}});this._allMatchesDecorations=S.deltaDecorations(this._allMatchesDecorations,l)}),this._allMatchesCellDecorations=this._notebookEditor.deltaCellDecorations(this._allMatchesCellDecorations,i.map(S=>({ownerId:S.cell.handle,handle:S.cell.handle,options:{overviewRuler:{color:C.overviewRulerFindMatchForeground,modelRanges:S.matches.slice(0,S.modelMatchCount).map(s=>s.range),includeOutput:S.modelMatchCount<S.matches.length}}})))}clear(){this._computePromise?.cancel(),this._throttledDelayer.cancel(),this.set([],!1)}};o=Ee([W(2,I.IConfigurationService)],o),e.FindModel=o}),define(ne[2190],re([1,0,11,2,98,104,267,64,268,142]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let v=class extends f.Disposable{constructor(o,c,i){super();this._notebookEditor=o,this._notebookService=c,this._warmupDocument=null,this._warmupViewport=new t.RunOnceScheduler(()=>this._warmupViewportNow(),200),this._register(this._warmupViewport),this._register(this._notebookEditor.onDidScroll(()=>{this._warmupViewport.schedule()})),i.isScreenReaderOptimized()&&(this._warmupDocument=new t.RunOnceScheduler(()=>this._warmupDocumentNow(),200),this._register(this._warmupDocument),this._register(this._notebookEditor.onDidChangeModel(()=>{this._notebookEditor.hasModel()&&this._warmupDocument?.schedule()})),this._notebookEditor.hasModel()&&this._warmupDocument?.schedule())}_warmupDocumentNow(){if(this._notebookEditor.hasModel())for(let o=0;o<this._notebookEditor.getLength();o++){const c=this._notebookEditor.cellAt(o);c?.cellKind===D.CellKind.Markup&&c?.getEditState()===A.CellEditState.Preview&&!c.isInputCollapsed||c?.cellKind===D.CellKind.Code&&this._renderCell(c)}}_warmupViewportNow(){if(this._notebookEditor.isDisposed||!this._notebookEditor.hasModel())return;const o=this._notebookEditor.getVisibleRangesPlusViewportBelow();(0,I.cellRangesToIndexes)(o).forEach(c=>{const i=this._notebookEditor.cellAt(c);i?.cellKind===D.CellKind.Markup&&i?.getEditState()===A.CellEditState.Preview&&!i.isInputCollapsed?this._notebookEditor.createMarkupPreview(i):i?.cellKind===D.CellKind.Code&&this._renderCell(i)})}_renderCell(o){if(o.isOutputCollapsed)return;const c=o.outputsViewModels;for(const i of c){const[S,s]=i.resolveMimeTypes(this._notebookEditor.textModel,void 0);if(!S.find(u=>u.isTrusted)||S.length===0)continue;const l=S[s];if(!l||!this._notebookEditor.hasModel())return;const r=this._notebookService.getRendererInfo(l.rendererId);if(!r)return;const p={type:1,renderer:r,source:i,mimeType:l.mimeType};this._notebookEditor.createOutput(o,p,0)}}};v.id="workbench.notebook.viewportCustomMarkdown",v=Ee([W(1,w.INotebookService),W(2,_.IAccessibilityService)],v),(0,k.registerNotebookContribution)(v.id,v)}),define(ne[491],re([1,0,140,49,20,126,358,104,489,64,268]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.moveCellToIdx=e.insertCellAtIndex=e.insertCell=e.computeCellLinesContents=e.joinCellsWithSurrounds=e.joinNotebookCells=e.copyCellRange=e.moveCellRange=e.runDeleteAction=e.changeCellToKind=void 0;async function C(h,g,d,m){const{notebookEditor:b}=g;if(!!b.hasModel()&&!b.isReadOnly){if(g.ui&&g.cell){const{cell:E}=g;if(E.cellKind===h)return;const y=E.getText(),T=b.getCellIndex(E);d===void 0&&(d=(b.activeKernel?.supportedLanguages??[])[0]??A.PLAINTEXT_LANGUAGE_ID),b.textModel.applyEdits([{editType:1,index:T,count:1,cells:[{cellKind:h,source:y,language:d,mime:m??E.mime,outputs:E.model.outputs,metadata:E.metadata}]}],!0,{kind:w.SelectionStateType.Index,focus:b.getFocus(),selections:b.getSelections()},()=>({kind:w.SelectionStateType.Index,focus:b.getFocus(),selections:b.getSelections()}),void 0,!0);const R=b.cellAt(T);b.focusNotebookCell(R,E.getEditState()===D.CellEditState.Editing?"editor":"container")}else if(g.selectedCells){const E=g.selectedCells,y=[];E.forEach(T=>{if(T.cellKind===h)return;const R=T.getText(),O=b.getCellIndex(T);d===void 0&&(d=(b.activeKernel?.supportedLanguages??[])[0]??A.PLAINTEXT_LANGUAGE_ID),y.push({editType:1,index:O,count:1,cells:[{cellKind:h,source:R,language:d,mime:m??T.mime,outputs:T.model.outputs,metadata:T.metadata}]})}),b.textModel.applyEdits(y,!0,{kind:w.SelectionStateType.Index,focus:b.getFocus(),selections:b.getSelections()},()=>({kind:w.SelectionStateType.Index,focus:b.getFocus(),selections:b.getSelections()}),void 0,!0)}}}e.changeCellToKind=C;function o(h,g){const d=h.textModel,m=h.getSelections(),b=h.getCellIndex(g),E=m.find(y=>y.start<=b&&b<y.end);if(E){const y=m.reverse().map(R=>({editType:1,index:R.start,count:R.end-R.start,cells:[]})),T=E.end>=h.getLength()?void 0:h.cellAt(E.end);d.applyEdits(y,!0,{kind:w.SelectionStateType.Index,focus:h.getFocus(),selections:h.getSelections()},()=>{if(T){const R=d.cells.findIndex(O=>O.handle===T.handle);return{kind:w.SelectionStateType.Index,focus:{start:R,end:R+1},selections:[{start:R,end:R+1}]}}else if(d.length){const R=d.length-1;return{kind:w.SelectionStateType.Index,focus:{start:R,end:R+1},selections:[{start:R,end:R+1}]}}else return{kind:w.SelectionStateType.Index,focus:{start:0,end:0},selections:[{start:0,end:0}]}},void 0)}else{const y=h.getFocus(),T=[{editType:1,index:b,count:1,cells:[]}],R=[];for(let O=0;O<m.length;O++){const x=m[O];x.end<=b?R.push(x):x.start>b?R.push({start:x.start-1,end:x.end-1}):R.push({start:b,end:b+1})}if(h.cellAt(y.start)===g){const O=y.end===d.length?{start:y.start-1,end:y.end-1}:y;d.applyEdits(T,!0,{kind:w.SelectionStateType.Index,focus:h.getFocus(),selections:h.getSelections()},()=>({kind:w.SelectionStateType.Index,focus:O,selections:R}),void 0)}else{const O=y.start>b?{start:y.start-1,end:y.end-1}:y;d.applyEdits(T,!0,{kind:w.SelectionStateType.Index,focus:h.getFocus(),selections:h.getSelections()},()=>({kind:w.SelectionStateType.Index,focus:O,selections:R}),void 0)}}}e.runDeleteAction=o;async function c(h,g){if(!h.notebookEditor.hasModel())return;const d=h.notebookEditor,m=d.textModel;if(d.isReadOnly)return;const b=d.getSelections(),y=(0,D.expandCellRangesWithHiddenCells)(d,b)[0];if(!(!y||y.start===y.end))if(g==="up"){if(y.start===0)return;const T=y.start-1,R={start:y.start-1,end:y.end-1},O=h.notebookEditor.getFocus(),x=(0,v.cellRangeContains)(y,O)?{start:O.start-1,end:O.end-1}:{start:y.start-1,end:y.start};m.applyEdits([{editType:6,index:T,length:1,newIdx:y.end-1}],!0,{kind:w.SelectionStateType.Index,focus:d.getFocus(),selections:d.getSelections()},()=>({kind:w.SelectionStateType.Index,focus:x,selections:[R]}),void 0);const F=d.getSelections()[0]??d.getFocus();d.revealCellRangeInView(F)}else{if(y.end>=m.length)return;const T=y.end,R={start:y.start+1,end:y.end+1},O=d.getFocus(),x=(0,v.cellRangeContains)(y,O)?{start:O.start+1,end:O.end+1}:{start:y.start+1,end:y.start+2};m.applyEdits([{editType:6,index:T,length:1,newIdx:y.start}],!0,{kind:w.SelectionStateType.Index,focus:d.getFocus(),selections:d.getSelections()},()=>({kind:w.SelectionStateType.Index,focus:x,selections:[R]}),void 0);const F=d.getSelections()[0]??d.getFocus();d.revealCellRangeInView(F)}}e.moveCellRange=c;async function i(h,g){const d=h.notebookEditor;if(!d.hasModel())return;const m=d.textModel;if(d.isReadOnly)return;let b;if(h.ui){const E=h.cell,y=d.getCellIndex(E);b={start:y,end:y+1}}else{const E=d.getSelections();b=(0,D.expandCellRangesWithHiddenCells)(d,E)[0]}if(!(!b||b.start===b.end))if(g==="up"){const E=d.getFocus(),y=d.getSelections();m.applyEdits([{editType:1,index:b.end,count:0,cells:(0,v.cellRangesToIndexes)([b]).map(T=>(0,I.cloneNotebookCellTextModel)(d.cellAt(T).model))}],!0,{kind:w.SelectionStateType.Index,focus:E,selections:y},()=>({kind:w.SelectionStateType.Index,focus:E,selections:y}),void 0)}else{const E=d.getFocus(),y=d.getSelections(),R=(0,v.cellRangesToIndexes)([b]).map(L=>(0,I.cloneNotebookCellTextModel)(d.cellAt(L).model)).length,O=h.ui?E:{start:E.start+R,end:E.end+R},x=h.ui?y:[{start:b.start+R,end:b.end+R}];m.applyEdits([{editType:1,index:b.end,count:0,cells:(0,v.cellRangesToIndexes)([b]).map(L=>(0,I.cloneNotebookCellTextModel)(d.cellAt(L).model))}],!0,{kind:w.SelectionStateType.Index,focus:E,selections:y},()=>({kind:w.SelectionStateType.Index,focus:O,selections:x}),void 0);const F=d.getSelections()[0]??d.getFocus();d.revealCellRangeInView(F)}}e.copyCellRange=i;async function S(h,g,d,m){if(h.isReadOnly)return null;const b=h.textModel,E=h.getCellsInRange(g);if(!E.length||g.start===0&&d==="above"||g.end===b.length&&d==="below")return null;for(let y=0;y<E.length;y++){const T=E[y];if(m&&T.cellKind!==m)return null}if(d==="above"){const y=h.cellAt(g.start-1);if(m&&y.cellKind!==m)return null;const T=E.map(x=>(x.textBuffer.getEOL()??"")+x.getText()).join(""),R=y.textBuffer.getLineCount(),O=y.textBuffer.getLineLength(R);return{edits:[new t.ResourceTextEdit(y.uri,{range:new _.Range(R,O+1,R,O+1),text:T}),new k.ResourceNotebookCellEdit(b.uri,{editType:1,index:g.start,count:g.end-g.start,cells:[]})],cell:y,endFocus:{start:g.start-1,end:g.start},endSelections:[{start:g.start-1,end:g.start}]}}else{const y=h.cellAt(g.end);if(m&&y.cellKind!==m)return null;const T=E[0],O=[...E.slice(1),y].map(L=>(L.textBuffer.getEOL()??"")+L.getText()).join(""),x=T.textBuffer.getLineCount(),F=T.textBuffer.getLineLength(x);return{edits:[new t.ResourceTextEdit(T.uri,{range:new _.Range(x,F+1,x,F+1),text:O}),new k.ResourceNotebookCellEdit(b.uri,{editType:1,index:g.start+1,count:g.end-g.start,cells:[]})],cell:T,endFocus:{start:g.start,end:g.start+1},endSelections:[{start:g.start,end:g.start+1}]}}}e.joinNotebookCells=S;async function s(h,g,d){const m=g.notebookEditor,b=m.textModel,E=m._getViewModel();let y=null;if(g.ui){const T=g.cell.focusMode,R=m.getCellIndex(g.cell);if(y=await S(m,{start:R,end:R+1},d),!y)return;await h.apply(y?.edits,{quotableLabel:"Join Notebook Cells"}),E.updateSelectionsState({kind:w.SelectionStateType.Index,focus:y.endFocus,selections:y.endSelections}),y.cell.updateEditState(D.CellEditState.Editing,"joinCellsWithSurrounds"),m.revealCellRangeInView(m.getFocus()),T===D.CellFocusMode.Editor&&(y.cell.focusMode=D.CellFocusMode.Editor)}else{const T=m.getSelections();if(!T.length)return;const R=m.getFocus(),O=m.cellAt(R.start)?.focusMode,x=[];let F=null;const L=[];for(let N=T.length-1;N>=0;N--){const B=T[N],P=(0,v.cellRangeContains)(B,R);if(B.end>=b.length&&d==="below"||B.start===0&&d==="above"){P&&(F=m.cellAt(R.start)),L.push(...m.getCellsInRange(B));continue}const V=await S(m,B,d);if(!V)return;x.push(...V.edits),L.push(V.cell),P&&(F=V.cell)}if(!x.length||!F||!L.length)return;await h.apply(x,{quotableLabel:"Join Notebook Cells"}),L.forEach(N=>{N.updateEditState(D.CellEditState.Editing,"joinCellsWithSurrounds")}),E.updateSelectionsState({kind:w.SelectionStateType.Handle,primary:F.handle,selections:L.map(N=>N.handle)}),m.revealCellRangeInView(m.getFocus());const M=m.cellAt(m.getFocus().start);O===D.CellFocusMode.Editor&&M&&(M.focusMode=D.CellFocusMode.Editor)}}e.joinCellsWithSurrounds=s;function l(h,g){const d=[],m=g.getLineCount(),b=T=>g.getLineLength(T);h=h.sort((T,R)=>{const O=T.lineNumber-R.lineNumber,x=T.column-R.column;return O!==0?O:x});for(let T of h)b(T.lineNumber)+1===T.column&&T.column!==1&&T.lineNumber<m&&(T=new f.Position(T.lineNumber+1,1)),r(d,T);if(d.length===0)return null;const E=new f.Position(1,1),y=new f.Position(m,b(m)+1);return[E,...d,y]}function r(h,g){const d=h.length>0?h[h.length-1]:void 0;(!d||d.lineNumber!==g.lineNumber||d.column!==g.column)&&h.push(g)}function p(h,g){const d=l(g,h.textBuffer);if(!d)return null;const m=[];for(let b=1;b<d.length;b++){const E=d[b-1],y=d[b];m.push(h.textBuffer.getValueInRange(new _.Range(E.lineNumber,E.column,y.lineNumber,y.column),0))}return m}e.computeCellLinesContents=p;function u(h,g,d,m,b="above",E="",y=!1){const T=g._getViewModel(),R=g.activeKernel;if(T.options.isReadOnly)return null;const O=g.cellAt(d),x=y?T.getNextVisibleCellIndex(d):d+1;let F;if(m===w.CellKind.Code){const M=R?.supportedLanguages??h.getRegisteredLanguageIds(),N=M[0]||A.PLAINTEXT_LANGUAGE_ID;if(O?.cellKind===w.CellKind.Code)F=O.language;else if(O?.cellKind===w.CellKind.Markup){const B=T.nearestCodeCellIndex(d);B>-1?F=T.cellAt(B).language:F=N}else O===void 0&&b==="above"?F=T.viewCells.find(B=>B.cellKind===w.CellKind.Code)?.language||N:F=N;M.includes(F)||(F=N)}else F="markdown";return a(T,O?b==="above"?d:x:d,E,F,m,void 0,[],!0)}e.insertCell=u;function a(h,g,d,m,b,E,y,T,R=!0){const O={kind:w.SelectionStateType.Index,focus:{start:g,end:g+1},selections:[{start:g,end:g+1}]};return h.notebookDocument.applyEdits([{editType:1,index:g,count:0,cells:[{cellKind:b,language:m,mime:void 0,outputs:y,metadata:E,source:d}]}],T,{kind:w.SelectionStateType.Index,focus:h.getFocus(),selections:h.getSelections()},()=>O,void 0,R),h.cellAt(g)}e.insertCellAtIndex=a;function n(h,g,d,m,b,E=!0){return h.cellAt(g)?(h.textModel.applyEdits([{editType:6,index:g,length:d,newIdx:m}],b,{kind:w.SelectionStateType.Index,focus:h.getFocus(),selections:h.getSelections()},()=>({kind:w.SelectionStateType.Index,focus:{start:m,end:m+1},selections:[{start:m,end:m+1}]}),void 0),!0):!1}e.moveCellToIdx=n}),define(ne[492],re([1,0,6,2,356,104,351,116,301,797]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getFormattedOutputJSON=e.getStreamOutputData=e.getFormattedMetadataJSON=e.outputEqual=e.OutputComparison=e.SingleSideDiffElementViewModel=e.SideBySideDiffElementViewModel=e.DiffElementViewModelBase=e.OUTPUT_EDITOR_HEIGHT_MAGIC=e.PropertyFoldingState=void 0;var v;(function(u){u[u.Expanded=0]="Expanded",u[u.Collapsed=1]="Collapsed"})(v=e.PropertyFoldingState||(e.PropertyFoldingState={})),e.OUTPUT_EDITOR_HEIGHT_MAGIC=1440;class C extends f.Disposable{constructor(a,n,h,g,d,m){super();this.mainDocumentTextModel=a,this.original=n,this.modified=h,this.type=g,this.editorEventDispatcher=d,this.initData=m,this._layoutInfoEmitter=this._register(new t.Emitter),this.onDidLayoutChange=this._layoutInfoEmitter.event,this._stateChangeEmitter=this._register(new t.Emitter),this.onDidStateChange=this._stateChangeEmitter.event,this._renderOutput=!0,this._sourceEditorViewState=null,this._outputEditorViewState=null,this._metadataEditorViewState=null,this._layoutInfo={width:0,editorHeight:0,editorMargin:0,metadataHeight:0,metadataStatusHeight:25,rawOutputHeight:0,outputTotalHeight:0,outputStatusHeight:25,outputMetadataHeight:0,bodyMargin:32,totalHeight:82,layoutState:A.CellLayoutState.Uninitialized},this.metadataFoldingState=v.Collapsed,this.outputFoldingState=v.Collapsed,this._register(this.editorEventDispatcher.onDidChangeLayout(b=>{this._layoutInfoEmitter.fire({outerWidth:!0})}))}set rawOutputHeight(a){this._layout({rawOutputHeight:Math.min(e.OUTPUT_EDITOR_HEIGHT_MAGIC,a)})}get rawOutputHeight(){throw new Error("Use Cell.layoutInfo.rawOutputHeight")}set outputStatusHeight(a){this._layout({outputStatusHeight:a})}get outputStatusHeight(){throw new Error("Use Cell.layoutInfo.outputStatusHeight")}set outputMetadataHeight(a){this._layout({outputMetadataHeight:a})}get outputMetadataHeight(){throw new Error("Use Cell.layoutInfo.outputStatusHeight")}set editorHeight(a){this._layout({editorHeight:a})}get editorHeight(){throw new Error("Use Cell.layoutInfo.editorHeight")}set editorMargin(a){this._layout({editorMargin:a})}get editorMargin(){throw new Error("Use Cell.layoutInfo.editorMargin")}set metadataStatusHeight(a){this._layout({metadataStatusHeight:a})}get metadataStatusHeight(){throw new Error("Use Cell.layoutInfo.outputStatusHeight")}set metadataHeight(a){this._layout({metadataHeight:a})}get metadataHeight(){throw new Error("Use Cell.layoutInfo.metadataHeight")}set renderOutput(a){this._renderOutput=a,this._layout({recomputeOutput:!0}),this._stateChangeEmitter.fire({renderOutput:this._renderOutput})}get renderOutput(){return this._renderOutput}get layoutInfo(){return this._layoutInfo}layoutChange(){this._layout({recomputeOutput:!0})}_layout(a){const n=a.width!==void 0?a.width:this._layoutInfo.width,h=a.editorHeight!==void 0?a.editorHeight:this._layoutInfo.editorHeight,g=a.editorMargin!==void 0?a.editorMargin:this._layoutInfo.editorMargin,d=a.metadataHeight!==void 0?a.metadataHeight:this._layoutInfo.metadataHeight,m=a.metadataStatusHeight!==void 0?a.metadataStatusHeight:this._layoutInfo.metadataStatusHeight,b=a.rawOutputHeight!==void 0?a.rawOutputHeight:this._layoutInfo.rawOutputHeight,E=a.outputStatusHeight!==void 0?a.outputStatusHeight:this._layoutInfo.outputStatusHeight,y=a.bodyMargin!==void 0?a.bodyMargin:this._layoutInfo.bodyMargin,T=a.outputMetadataHeight!==void 0?a.outputMetadataHeight:this._layoutInfo.outputMetadataHeight,R=a.recomputeOutput||a.rawOutputHeight!==void 0||a.outputMetadataHeight!==void 0?this._getOutputTotalHeight(b,T):this._layoutInfo.outputTotalHeight,O=h+g+d+m+R+E+y,x={width:n,editorHeight:h,editorMargin:g,metadataHeight:d,metadataStatusHeight:m,outputTotalHeight:R,outputStatusHeight:E,bodyMargin:y,rawOutputHeight:b,outputMetadataHeight:T,totalHeight:O,layoutState:A.CellLayoutState.Measured},F={};x.width!==this._layoutInfo.width&&(F.width=!0),x.editorHeight!==this._layoutInfo.editorHeight&&(F.editorHeight=!0),x.editorMargin!==this._layoutInfo.editorMargin&&(F.editorMargin=!0),x.metadataHeight!==this._layoutInfo.metadataHeight&&(F.metadataHeight=!0),x.metadataStatusHeight!==this._layoutInfo.metadataStatusHeight&&(F.metadataStatusHeight=!0),x.outputTotalHeight!==this._layoutInfo.outputTotalHeight&&(F.outputTotalHeight=!0),x.outputStatusHeight!==this._layoutInfo.outputStatusHeight&&(F.outputStatusHeight=!0),x.bodyMargin!==this._layoutInfo.bodyMargin&&(F.bodyMargin=!0),x.outputMetadataHeight!==this._layoutInfo.outputMetadataHeight&&(F.outputMetadataHeight=!0),x.totalHeight!==this._layoutInfo.totalHeight&&(F.totalHeight=!0),this._layoutInfo=x,this._fireLayoutChangeEvent(F)}getHeight(a){if(this._layoutInfo.layoutState===A.CellLayoutState.Uninitialized){const n=this.estimateEditorHeight(a);return this._computeTotalHeight(n)}else return this._layoutInfo.totalHeight}_computeTotalHeight(a){return a+this._layoutInfo.editorMargin+this._layoutInfo.metadataHeight+this._layoutInfo.metadataStatusHeight+this._layoutInfo.outputTotalHeight+this._layoutInfo.outputStatusHeight+this._layoutInfo.outputMetadataHeight+this._layoutInfo.bodyMargin}estimateEditorHeight(a=20){const h=!1?12:0;return Math.max(this.original?.textModel.textBuffer.getLineCount()??1,this.modified?.textModel.textBuffer.getLineCount()??1)*a+24+12+h}_getOutputTotalHeight(a,n){return this.outputFoldingState===v.Collapsed?0:this.renderOutput?this.isOutputEmpty()?24:this.getRichOutputTotalHeight()+n:a}_fireLayoutChangeEvent(a){this._layoutInfoEmitter.fire(a),this.editorEventDispatcher.emit([{type:w.NotebookDiffViewEventType.CellLayoutChanged,source:this._layoutInfo}])}getComputedCellContainerWidth(a,n,h){return h?a.width-2*_.DIFF_CELL_MARGIN+(n?k.DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH:0)-2:(a.width-2*_.DIFF_CELL_MARGIN+(n?k.DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH:0))/2-18-2}getOutputEditorViewState(){return this._outputEditorViewState}saveOutputEditorViewState(a){this._outputEditorViewState=a}getMetadataEditorViewState(){return this._metadataEditorViewState}saveMetadataEditorViewState(a){this._metadataEditorViewState=a}getSourceEditorViewState(){return this._sourceEditorViewState}saveSpirceEditorViewState(a){this._sourceEditorViewState=a}}e.DiffElementViewModelBase=C;class o extends C{constructor(a,n,h,g,d,m,b){super(a,h,g,d,m,b);this.otherDocumentTextModel=n,this.original=h,this.modified=g,this.type=d,this.metadataFoldingState=v.Collapsed,this.outputFoldingState=v.Collapsed,this.checkMetadataIfModified()&&(this.metadataFoldingState=v.Expanded),this.checkIfOutputsModified()&&(this.outputFoldingState=v.Expanded),this._register(this.original.onDidChangeOutputLayout(()=>{this._layout({recomputeOutput:!0})})),this._register(this.modified.onDidChangeOutputLayout(()=>{this._layout({recomputeOutput:!0})}))}get originalDocument(){return this.otherDocumentTextModel}get modifiedDocument(){return this.mainDocumentTextModel}checkIfOutputsModified(){if(this.mainDocumentTextModel.transientOptions.transientOutputs)return!1;const a=s(this.original?.outputs??[],this.modified?.outputs??[]);return a===0?!1:{reason:a===1?"Output metadata is changed":void 0,kind:a}}checkMetadataIfModified(){return(0,D.hash)(l(this.mainDocumentTextModel,this.original?.metadata||{},this.original?.language))!==(0,D.hash)(l(this.mainDocumentTextModel,this.modified?.metadata??{},this.modified?.language))?{reason:void 0}:!1}updateOutputHeight(a,n,h){a===_.DiffSide.Original?this.original.updateOutputHeight(n,h):this.modified.updateOutputHeight(n,h)}getOutputOffsetInContainer(a,n){return a===_.DiffSide.Original?this.original.getOutputOffset(n):this.modified.getOutputOffset(n)}getOutputOffsetInCell(a,n){const h=this.getOutputOffsetInContainer(a,n);return this._layoutInfo.editorHeight+this._layoutInfo.editorMargin+this._layoutInfo.metadataHeight+this._layoutInfo.metadataStatusHeight+this._layoutInfo.outputStatusHeight+this._layoutInfo.bodyMargin/2+h}isOutputEmpty(){return this.mainDocumentTextModel.transientOptions.transientOutputs?!0:this.checkIfOutputsModified()?!1:(this.original?.outputs||[]).length===0}getRichOutputTotalHeight(){return Math.max(this.original.getOutputTotalHeight(),this.modified.getOutputTotalHeight())}getNestedCellViewModel(a){return a===_.DiffSide.Original?this.original:this.modified}getCellByUri(a){return a.toString()===this.original.uri.toString()?this.original:this.modified}}e.SideBySideDiffElementViewModel=o;class c extends C{constructor(a,n,h,g,d,m,b){super(a,h,g,d,m,b);this.otherDocumentTextModel=n,this.type=d,this._register(this.cellViewModel.onDidChangeOutputLayout(()=>{this._layout({recomputeOutput:!0})}))}get cellViewModel(){return this.type==="insert"?this.modified:this.original}get originalDocument(){return this.type==="insert"?this.otherDocumentTextModel:this.mainDocumentTextModel}get modifiedDocument(){return this.type==="insert"?this.mainDocumentTextModel:this.otherDocumentTextModel}getNestedCellViewModel(a){return this.type==="insert"?this.modified:this.original}checkIfOutputsModified(){return!1}checkMetadataIfModified(){return!1}updateOutputHeight(a,n,h){this.cellViewModel?.updateOutputHeight(n,h)}getOutputOffsetInContainer(a,n){return this.cellViewModel.getOutputOffset(n)}getOutputOffsetInCell(a,n){const h=this.cellViewModel.getOutputOffset(n);return this._layoutInfo.editorHeight+this._layoutInfo.editorMargin+this._layoutInfo.metadataHeight+this._layoutInfo.metadataStatusHeight+this._layoutInfo.outputStatusHeight+this._layoutInfo.bodyMargin/2+h}isOutputEmpty(){return this.mainDocumentTextModel.transientOptions.transientOutputs?!0:(this.original?.outputs||this.modified?.outputs||[]).length===0}getRichOutputTotalHeight(){return this.cellViewModel?.getOutputTotalHeight()??0}getCellByUri(a){return this.cellViewModel}}e.SingleSideDiffElementViewModel=c;var i;(function(u){u[u.Unchanged=0]="Unchanged",u[u.Metadata=1]="Metadata",u[u.Other=2]="Other"})(i=e.OutputComparison||(e.OutputComparison={}));function S(u,a){if((0,D.hash)(u.metadata)===(0,D.hash)(a.metadata))return 2;for(let n=0;n<u.outputs.length;n++){const h=u.outputs[n],g=a.outputs[n];if(h.mime!==g.mime||h.data.buffer.length!==g.data.buffer.length)return 2;for(let d=0;d<h.data.buffer.length;d++)if(h.data.buffer[d]!==g.data.buffer[d])return 2}return 1}e.outputEqual=S;function s(u,a){if(u.length!==a.length)return 2;const n=u.length;for(let h=0;h<n;h++){const g=u[h],d=a[h];if((0,D.hash)(g.metadata)!==(0,D.hash)(d.metadata))return 1;if(g.outputs.length!==d.outputs.length)return 2;for(let m=0;m<g.outputs.length;m++){const b=g.outputs[m],E=d.outputs[m];if(b.mime!==E.mime||b.data.buffer.length!==E.data.buffer.length)return 2;for(let y=0;y<b.data.buffer.length;y++)if(b.data.buffer[y]!==E.data.buffer[y])return 2}}return 0}function l(u,a,n){let h={};if(u){const m=u.transientOptions.transientCellMetadata,b=new Set([...Object.keys(a)]);for(const E of b)m[E]||(h[E]=a[E])}else h=a;const g={language:n,...h};return(0,I.toFormattedString)(g,{})}e.getFormattedMetadataJSON=l;function r(u){if(!u.length)return null;const n=u[0].mime;return u.find(g=>g.mime!==n)?null:u.map(g=>g.data.toString()).join("")}e.getStreamOutputData=r;function p(u){if(u.length===1){const a=r(u[0].outputs);if(a)return a}return JSON.stringify(u.map(a=>({metadata:a.metadata,outputItems:a.outputs.map(n=>({mimeType:n.mime,data:n.data.toString()}))})),void 0," ")}e.getFormattedOutputJSON=p}),define(ne[2191],re([1,0,10,1642,2,41,492,356,142,12,200,91,53]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutputContainer=e.OutputElement=void 0;class c extends _.Disposable{constructor(s,l,r,p,u,a,n,h,g){super();this._notebookEditor=s,this._notebookTextModel=l,this._notebookService=r,this._quickInputService=p,this._diffElementViewModel=u,this._diffSide=a,this._nestedCell=n,this._outputContainer=h,this.output=g,this.resizeListener=this._register(new _.DisposableStore)}render(s,l){const r=document.createElement("div");let p;const[u,a]=this.output.resolveMimeTypes(this._notebookTextModel,void 0),n=u[a];if(u.length>1){r.style.position="relative";const g=t.$(".multi-mimetype-output");g.classList.add(...w.ThemeIcon.asClassNameArray(v.mimetypeIcon)),g.tabIndex=0,g.title=f.localize(0,null,u.map(d=>d.mimeType).join(", ")),r.appendChild(g),this.resizeListener.add(t.addStandardDisposableListener(g,"mousedown",async d=>{d.leftButton&&(d.preventDefault(),d.stopPropagation(),await this.pickActiveMimeTypeRenderer(this._notebookTextModel,this.output))})),this.resizeListener.add(t.addDisposableListener(g,t.EventType.KEY_DOWN,async d=>{const m=new C.StandardKeyboardEvent(d);(m.equals(3)||m.equals(10))&&(d.preventDefault(),d.stopPropagation(),await this.pickActiveMimeTypeRenderer(this._notebookTextModel,this.output))}))}const h=t.$(".output-inner-container");if(t.append(r,h),u.length!==0){const g=this._notebookService.getRendererInfo(n.rendererId);p=g?{type:1,renderer:g,source:this.output,mimeType:n.mimeType}:this._renderMissingRenderer(this.output,n.mimeType),this.output.pickedMimeType=n}this.domNode=r,this.renderResult=p,!!p&&(l?this._outputContainer.insertBefore(r,l):this._outputContainer.appendChild(r),this._notebookEditor.createOutput(this._diffElementViewModel,this._nestedCell,p,()=>this.getOutputOffsetInCell(s),this._diffElementViewModel instanceof k.SideBySideDiffElementViewModel?this._diffSide:this._diffElementViewModel.type==="insert"?D.DiffSide.Modified:D.DiffSide.Original))}_renderMissingRenderer(s,l){if(!s.model.outputs.length)return this._renderMessage(s,f.localize(1,null));if(!l){const p=s.model.outputs.map(u=>u.mime).join(", ");return this._renderMessage(s,f.localize(2,null,p))}return this._renderSearchForMimetype(s,l)}_renderSearchForMimetype(s,l){const r=`@tag:notebookRenderer ${l}`;return{type:0,source:s,htmlContent:`<p>No renderer could be found for mimetype "${l}", but one might be available on the Marketplace.</p> <a href="command:workbench.extensions.search?%22${r}%22" class="monaco-button monaco-text-button" tabindex="0" role="button" style="padding: 8px; text-decoration: none; color: rgb(255, 255, 255); background-color: rgb(14, 99, 156); max-width: 200px;">Search Marketplace</a>`}}_renderMessage(s,l){return{type:0,source:s,htmlContent:`<p>${l}</p>`}}async pickActiveMimeTypeRenderer(s,l){const[r,p]=l.resolveMimeTypes(s,void 0),u=r.filter(h=>h.isTrusted).map((h,g)=>({label:h.mimeType,id:h.mimeType,index:g,picked:g===p,detail:this.generateRendererInfo(h.rendererId),description:g===p?f.localize(3,null):void 0})),a=this._quickInputService.createQuickPick();a.items=u,a.activeItems=u.filter(h=>!!h.picked),a.placeholder=u.length!==r.length?f.localize(4,null):f.localize(5,null);const n=await new Promise(h=>{a.onDidAccept(()=>{h(a.selectedItems.length===1?a.selectedItems[0].index:void 0),a.dispose()}),a.show()});if(n!==void 0&&n!==p){const h=this._nestedCell.outputsViewModels.indexOf(l),g=this.domNode.nextElementSibling;this.resizeListener.clear();const d=this.domNode;d&&(d.parentElement?.removeChild(d),this._notebookEditor.removeInset(this._diffElementViewModel,this._nestedCell,l,this._diffSide)),l.pickedMimeType=r[n],this.render(h,g)}}generateRendererInfo(s){const l=this._notebookService.getRendererInfo(s);return l?`${l.displayName!==""?l.displayName:l.id} (${l.extensionId.value})`:f.localize(6,null)}getCellOutputCurrentIndex(){return this._diffElementViewModel.getNestedCellViewModel(this._diffSide).outputs.indexOf(this.output.model)}updateHeight(s,l){this._diffElementViewModel.updateOutputHeight(this._diffSide,s,l)}getOutputOffsetInContainer(s){return this._diffElementViewModel.getOutputOffsetInContainer(this._diffSide,s)}getOutputOffsetInCell(s){return this._diffElementViewModel.getOutputOffsetInCell(this._diffSide,s)}}e.OutputElement=c;let i=class extends _.Disposable{constructor(s,l,r,p,u,a,n,h,g){super();this._editor=s,this._notebookTextModel=l,this._diffElementViewModel=r,this._nestedCellViewModel=p,this._diffSide=u,this._outputContainer=a,this._notebookService=n,this._quickInputService=h,this._openerService=g,this._outputEntries=new Map,this._register(this._diffElementViewModel.onDidLayoutChange(()=>{this._outputEntries.forEach((d,m)=>{const b=p.outputs.indexOf(m.model);if(b>=0){const E=this._diffElementViewModel.getOutputOffsetInContainer(this._diffSide,b);d.domNode.style.top=`${E}px`}})})),this._register(this._nestedCellViewModel.textModel.onDidChangeOutputs(d=>{this._updateOutputs(d)}))}_updateOutputs(s){const l=[];this._outputEntries.forEach((u,a)=>{this._nestedCellViewModel.outputsViewModels.indexOf(a)<0&&(l.push(a),this._outputContainer.removeChild(u.domNode),this._editor.removeInset(this._diffElementViewModel,this._nestedCellViewModel,a,this._diffSide))}),l.forEach(u=>{this._outputEntries.get(u)?.dispose(),this._outputEntries.delete(u)});let r;this._nestedCellViewModel.outputsViewModels.reverse().forEach(u=>{if(this._outputEntries.has(u)){r=this._outputEntries.get(u).domNode;return}const a=this._nestedCellViewModel.outputsViewModels.indexOf(u);this._renderOutput(u,a,r),r=this._outputEntries.get(u)?.domNode})}render(){for(let s=0;s<this._nestedCellViewModel.outputsViewModels.length;s++){const l=this._nestedCellViewModel.outputsViewModels[s];this._renderOutput(l,s,void 0)}}showOutputs(){for(let s=0;s<this._nestedCellViewModel.outputsViewModels.length;s++){const l=this._nestedCellViewModel.outputsViewModels[s];this._editor.showInset(this._diffElementViewModel,l.cellViewModel,l,this._diffSide)}}hideOutputs(){this._outputEntries.forEach((s,l)=>{this._editor.hideInset(this._diffElementViewModel,this._nestedCellViewModel,l)})}_renderOutput(s,l,r){this._outputEntries.has(s)||this._outputEntries.set(s,new c(this._editor,this._notebookTextModel,this._notebookService,this._quickInputService,this._diffElementViewModel,this._diffSide,this._nestedCellViewModel,this._outputContainer,s)),this._outputEntries.get(s).render(l,r)}};i=Ee([W(6,I.INotebookService),W(7,o.IQuickInputService),W(8,A.IOpenerService)],i),e.OutputContainer=i}),define(ne[806],re([1,0,10,11,2,14,104,175,489,64,268]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.performCellDropEdits=e.CellDragAndDropController=e.CellDragAndDropPart=void 0;const C=t.$,o="cell-dragging",c="global-drag-active";class i extends D.CellPart{constructor(r){super();this.container=r}didRenderCell(r){this.update(r)}updateState(r,p){p.dragStateChanged&&this.update(r)}update(r){this.container.classList.toggle(o,r.dragging)}}e.CellDragAndDropPart=i;class S extends _.Disposable{constructor(r,p){super();this.notebookEditor=r,this.notebookListContainer=p,this.draggedCells=[],this.isScrolling=!1,this.listOnWillScrollListener=this._register(new _.MutableDisposable),this.listInsertionIndicator=t.append(p,C(".cell-list-insertion-indicator")),this._register(t.addDisposableListener(document.body,t.EventType.DRAG_START,this.onGlobalDragStart.bind(this),!0)),this._register(t.addDisposableListener(document.body,t.EventType.DRAG_END,this.onGlobalDragEnd.bind(this),!0));const u=(a,n)=>{this._register(t.addDisposableListener(r.getDomNode(),a,h=>{const g=this.toCellDragEvent(h);g&&n(g)}))};u(t.EventType.DRAG_OVER,a=>{a.browserEvent.preventDefault(),this.onCellDragover(a)}),u(t.EventType.DROP,a=>{a.browserEvent.preventDefault(),this.onCellDrop(a)}),u(t.EventType.DRAG_LEAVE,a=>{a.browserEvent.preventDefault(),this.onCellDragLeave(a)}),this.scrollingDelayer=this._register(new f.Delayer(200))}setList(r){this.list=r,this.listOnWillScrollListener.value=this.list.onWillScroll(p=>{!p.scrollTopChanged||(this.setInsertIndicatorVisibility(!1),this.isScrolling=!0,this.scrollingDelayer.trigger(()=>{this.isScrolling=!1}))})}setInsertIndicatorVisibility(r){this.listInsertionIndicator.style.opacity=r?"1":"0"}toCellDragEvent(r){const p=this.notebookListContainer.getBoundingClientRect().top,u=this.list.scrollTop+r.clientY-p,a=this.list.elementAt(u);if(!a)return;const n=this.list.getAbsoluteTopOfElement(a),h=this.list.elementHeight(a),d=(u-n)/h;return{browserEvent:r,draggedOverCell:a,cellTop:n,cellHeight:h,dragPosRatio:d}}clearGlobalDragState(){this.notebookEditor.getDomNode().classList.remove(c)}onGlobalDragStart(){this.notebookEditor.getDomNode().classList.add(c)}onGlobalDragEnd(){this.notebookEditor.getDomNode().classList.remove(c)}onCellDragover(r){if(!r.browserEvent.dataTransfer)return;if(!this.currentDraggedCell){r.browserEvent.dataTransfer.dropEffect="none";return}if(this.isScrolling||this.currentDraggedCell===r.draggedOverCell){this.setInsertIndicatorVisibility(!1);return}const p=this.getDropInsertDirection(r.dragPosRatio),u=p==="above"?r.cellTop:r.cellTop+r.cellHeight;this.updateInsertIndicator(p,u)}updateInsertIndicator(r,p){const{bottomToolbarGap:u}=this.notebookEditor.notebookOptions.computeBottomToolbarDimensions(this.notebookEditor.textModel?.viewType),a=p-this.list.scrollTop+u/2;a>=0?(this.listInsertionIndicator.style.top=`${a}px`,this.setInsertIndicatorVisibility(!0)):this.setInsertIndicatorVisibility(!1)}getDropInsertDirection(r){return r<.5?"above":"below"}onCellDrop(r){const p=this.currentDraggedCell;if(this.isScrolling||this.currentDraggedCell===r.draggedOverCell)return;this.dragCleanup();const u=this.getDropInsertDirection(r.dragPosRatio);this._dropImpl(p,u,r.browserEvent,r.draggedOverCell)}getCellRangeAroundDragTarget(r){const p=this.notebookEditor.getSelections(),a=(0,k.expandCellRangesWithHiddenCells)(this.notebookEditor,p).find(n=>n.start<=r&&r<n.end);return a||{start:r,end:r+1}}_dropImpl(r,p,u,a){const n=this.list.getAbsoluteTopOfElement(a),h=this.list.elementHeight(a),g=p==="above"?n:n+h,{bottomToolbarGap:d}=this.notebookEditor.notebookOptions.computeBottomToolbarDimensions(this.notebookEditor.textModel?.viewType),m=g-this.list.scrollTop+d/2,b=this.notebookEditor.getDomNode().getBoundingClientRect().height;if(m<0||m>b)return;const E=u.ctrlKey&&!A.isMacintosh||u.altKey&&A.isMacintosh;if(!this.notebookEditor.hasModel())return;const y=this.notebookEditor.textModel;if(E){const T=this.notebookEditor.getCellIndex(r),R=this.getCellRangeAroundDragTarget(T);let O=this.notebookEditor.getCellIndex(a);if(p==="below"){const L=this.notebookEditor.getCellIndex(a);O=this.notebookEditor.getNextVisibleCellIndex(L)}let x,F;if(O<=R.start)x={start:O,end:O+R.end-R.start},F={start:O+T-R.start,end:O+T-R.start+1};else{const L=O-R.start;x={start:R.start+L,end:R.end+L},F={start:T+L,end:T+L+1}}y.applyEdits([{editType:1,index:O,count:0,cells:(0,v.cellRangesToIndexes)([R]).map(L=>(0,I.cloneNotebookCellTextModel)(this.notebookEditor.cellAt(L).model))}],!0,{kind:w.SelectionStateType.Index,focus:this.notebookEditor.getFocus(),selections:this.notebookEditor.getSelections()},()=>({kind:w.SelectionStateType.Index,focus:F,selections:[x]}),void 0,!0),this.notebookEditor.revealCellRangeInView(x)}else s(this.notebookEditor,r,p,a)}onCellDragLeave(r){(!r.browserEvent.relatedTarget||!t.isAncestor(r.browserEvent.relatedTarget,this.notebookEditor.getDomNode()))&&this.setInsertIndicatorVisibility(!1)}dragCleanup(){this.currentDraggedCell&&(this.draggedCells.forEach(r=>r.dragging=!1),this.currentDraggedCell=void 0,this.draggedCells=[]),this.setInsertIndicatorVisibility(!1)}registerDragHandle(r,p,u,a){const n=r.container;for(const d of u)d.setAttribute("draggable","true");const h=()=>{!this.notebookEditor.notebookOptions.getLayoutConfiguration().dragAndDropEnabled||!!this.notebookEditor.isReadOnly||(n.classList.remove(o),this.dragCleanup())};for(const d of u)r.templateDisposables.add(t.addDisposableListener(d,t.EventType.DRAG_END,h));const g=d=>{if(!d.dataTransfer||!this.notebookEditor.notebookOptions.getLayoutConfiguration().dragAndDropEnabled||!!this.notebookEditor.isReadOnly)return;this.currentDraggedCell=r.currentRenderedCell,this.draggedCells=this.notebookEditor.getSelections().map(b=>this.notebookEditor.getCellsInRange(b)).flat(),this.draggedCells.forEach(b=>b.dragging=!0);const m=a();p.parentElement.appendChild(m),d.dataTransfer.setDragImage(m,0,0),setTimeout(()=>p.parentElement.removeChild(m),0)};for(const d of u)r.templateDisposables.add(t.addDisposableListener(d,t.EventType.DRAG_START,g))}startExplicitDrag(r,p){!this.notebookEditor.notebookOptions.getLayoutConfiguration().dragAndDropEnabled||!!this.notebookEditor.isReadOnly||(this.currentDraggedCell=r,this.setInsertIndicatorVisibility(!0))}explicitDrag(r,p){if(!this.notebookEditor.notebookOptions.getLayoutConfiguration().dragAndDropEnabled||!!this.notebookEditor.isReadOnly)return;const u=this.list.elementAt(p);if(u&&u!==r){const m=this.list.getAbsoluteTopOfElement(u),b=this.list.elementHeight(u),E=this.getExplicitDragDropDirection(p,m,b),y=E==="above"?m:m+b;this.updateInsertIndicator(E,y)}if(this.currentDraggedCell!==r)return;const a=this.notebookEditor.getDomNode().getBoundingClientRect(),n=p-this.list.scrollTop,h=.2,g=20,d=n/a.height;d<h?this.list.scrollTop-=g*(1-d/h):d>1-h&&(this.list.scrollTop+=g*(1-(1-d)/h))}endExplicitDrag(r){this.setInsertIndicatorVisibility(!1)}explicitDrop(r,p){this.currentDraggedCell=void 0,this.setInsertIndicatorVisibility(!1);const u=this.list.elementAt(p.dragOffsetY);if(!u||u===r)return;const a=this.list.getAbsoluteTopOfElement(u),n=this.list.elementHeight(u),h=this.getExplicitDragDropDirection(p.dragOffsetY,a,n);this._dropImpl(r,h,p,u)}getExplicitDragDropDirection(r,p,u){const n=(r-p)/u;return this.getDropInsertDirection(n)}}e.CellDragAndDropController=S;function s(l,r,p,u){const a=l.getCellIndex(r);let n=l.getCellIndex(u);if(typeof a!="number"||typeof n!="number")return;p==="below"&&(n=l.getNextVisibleCellIndex(n)??n);let h=l.getSelections();h.length||(h=[l.getFocus()]);let g=l.getFocus().start;h.some(x=>x.start<=a&&x.end>a)||(h=[{start:a,end:a+1}],g=a);const d=h.find(x=>x.start<=n&&x.end>n);d&&(n=d.start);let m=0,b=n,E=n;h.sort((x,F)=>F.start-x.start);const y=h.map(x=>{const F=x.end-x.start;let L=0;x.end<=E&&(L=-F);const M=E+L;if(g>=x.start&&g<=x.end){const P=g-x.start;b=M+P}const N=x.start>=n?m:0,B={editType:6,index:x.start+N,length:F,newIdx:M};return m+=F,x.end<E&&(E-=F),B}),T=y[y.length-1],R={start:T.newIdx,end:T.newIdx+m},O={start:b,end:b+1};l.textModel.applyEdits(y,!0,{kind:w.SelectionStateType.Index,focus:l.getFocus(),selections:l.getSelections()},()=>({kind:w.SelectionStateType.Index,focus:O,selections:[R]}),void 0),l.revealCellRangeInView(R)}e.performCellDropEdits=s}),define(ne[2192],re([1,0,10,33,1657,38,104,175]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CollapsedCellOutput=void 0;const I=t.$;let w=class extends D.CellPart{constructor(C,o,c){super();this.notebookEditor=C;const i=t.append(o,I("span.expandOutputPlaceholder"));i.textContent=(0,_.localize)(0,null);const S=t.append(o,I("span.expandOutputIcon"));S.classList.add(...f.CSSIcon.asClassNameArray(f.Codicon.more));const s=c.lookupKeybinding(k.EXPAND_CELL_OUTPUT_COMMAND_ID);s&&(i.title=(0,_.localize)(1,null,s.getLabel()),o.title=(0,_.localize)(2,null,s.getLabel())),t.hide(o),this._register(t.addDisposableListener(S,t.EventType.CLICK,()=>this.expand())),this._register(t.addDisposableListener(o,t.EventType.DBLCLICK,()=>this.expand()))}expand(){!this.currentCell||!this.currentCell||this.notebookEditor.textModel.cells.indexOf(this.currentCell.model)<0||(this.currentCell.isOutputCollapsed=!this.currentCell.isOutputCollapsed)}};w=Ee([W(2,A.IKeybindingService)],w),e.CollapsedCellOutput=w}),define(ne[807],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INotebookEditorWorkerService=e.ID_NOTEBOOK_EDITOR_WORKER_SERVICE=void 0,e.ID_NOTEBOOK_EDITOR_WORKER_SERVICE="notebookEditorWorkerService",e.INotebookEditorWorkerService=(0,t.createDecorator)(e.ID_NOTEBOOK_EDITOR_WORKER_SERVICE)}),define(ne[2193],re([1,0,6]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlineViewState=e.OutlineSortOrder=void 0;var f;(function(A){A[A.ByPosition=0]="ByPosition",A[A.ByName=1]="ByName",A[A.ByKind=2]="ByKind"})(f=e.OutlineSortOrder||(e.OutlineSortOrder={}));class _{constructor(){this._followCursor=!1,this._filterOnType=!0,this._sortBy=0,this._onDidChange=new t.Emitter,this.onDidChange=this._onDidChange.event}dispose(){this._onDidChange.dispose()}set followCursor(k){k!==this._followCursor&&(this._followCursor=k,this._onDidChange.fire({followCursor:!0}))}get followCursor(){return this._followCursor}get filterOnType(){return this._filterOnType}set filterOnType(k){k!==this._filterOnType&&(this._filterOnType=k,this._onDidChange.fire({filterOnType:!0}))}set sortBy(k){k!==this._sortBy&&(this._sortBy=k,this._onDidChange.fire({sortBy:!0}))}get sortBy(){return this._sortBy}persist(k){k.store("outline/state",JSON.stringify({followCursor:this.followCursor,sortBy:this.sortBy,filterOnType:this.filterOnType}),1,0)}restore(k){let D=k.get("outline/state",1);if(!D)return;let I;try{I=JSON.parse(D)}catch{return}this.followCursor=I.followCursor,this.sortBy=I.sortBy??0,typeof I.filterOnType=="boolean"&&(this.filterOnType=I.filterOnType)}}e.OutlineViewState=_}),define(ne[201],re([1,0,5,7]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutputChannelUpdateMode=e.IOutputService=e.CONTEXT_OUTPUT_SCROLL_LOCK=e.CONTEXT_ACTIVE_LOG_OUTPUT=e.CONTEXT_IN_OUTPUT=e.MAX_OUTPUT_LENGTH=e.OUTPUT_SERVICE_ID=e.OUTPUT_VIEW_ID=e.LOG_MODE_ID=e.LOG_SCHEME=e.LOG_MIME=e.OUTPUT_MODE_ID=e.OUTPUT_SCHEME=e.OUTPUT_MIME=void 0,e.OUTPUT_MIME="text/x-code-output",e.OUTPUT_SCHEME="output",e.OUTPUT_MODE_ID="Log",e.LOG_MIME="text/x-code-log-output",e.LOG_SCHEME="log",e.LOG_MODE_ID="log",e.OUTPUT_VIEW_ID="workbench.panel.output",e.OUTPUT_SERVICE_ID="outputService",e.MAX_OUTPUT_LENGTH=1e4*100,e.CONTEXT_IN_OUTPUT=new f.RawContextKey("inOutput",!1),e.CONTEXT_ACTIVE_LOG_OUTPUT=new f.RawContextKey("activeLogOutput",!1),e.CONTEXT_OUTPUT_SCROLL_LOCK=new f.RawContextKey("outputView.scrollLock",!1),e.IOutputService=(0,t.createDecorator)(e.OUTPUT_SERVICE_ID);var _;(function(A){A[A.Append=1]="Append",A[A.Replace=2]="Replace",A[A.Clear=3]="Clear"})(_=e.OutputChannelUpdateMode||(e.OutputChannelUpdateMode={}))}),define(ne[2194],re([1,0,11,52,34,201,737,2,124,62]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutputLinkProvider=void 0;let v=class ko{constructor(o,c,i,S){this.contextService=o,this.modelService=c,this.languageConfigurationService=i,this.languageFeaturesService=S,this.disposeWorkerScheduler=new t.RunOnceScheduler(()=>this.disposeWorker(),ko.DISPOSE_WORKER_TIME),this.registerListeners(),this.updateLinkProviderWorker()}registerListeners(){this.contextService.onDidChangeWorkspaceFolders(()=>this.updateLinkProviderWorker())}updateLinkProviderWorker(){this.contextService.getWorkspace().folders.length>0?this.linkProviderRegistration||(this.linkProviderRegistration=this.languageFeaturesService.linkProvider.register([{language:A.OUTPUT_MODE_ID,scheme:"*"},{language:A.LOG_MODE_ID,scheme:"*"}],{provideLinks:async c=>{const i=await this.provideLinks(c.uri);return i&&{links:i}}})):((0,D.dispose)(this.linkProviderRegistration),this.linkProviderRegistration=void 0),this.disposeWorker(),this.disposeWorkerScheduler.cancel()}getOrCreateWorker(){if(this.disposeWorkerScheduler.schedule(),!this.worker){const o={workspaceFolders:this.contextService.getWorkspace().folders.map(c=>c.uri.toString())};this.worker=(0,k.createWebWorker)(this.modelService,this.languageConfigurationService,{moduleId:"vs/workbench/contrib/output/common/outputLinkComputer",createData:o,label:"outputLinkComputer"})}return this.worker}async provideLinks(o){return(await this.getOrCreateWorker().withSyncedResources([o])).computeLinks(o.toString())}disposeWorker(){this.worker&&(this.worker.dispose(),this.worker=void 0)}};v.DISPOSE_WORKER_TIME=3*60*1e3,v=Ee([W(0,_.IWorkspaceContextService),W(1,f.IModelService),W(2,I.ILanguageConfigurationService),W(3,w.ILanguageFeaturesService)],v),e.OutputLinkProvider=v}),define(ne[2195],re([1,0,5,19,184,6,11,23,52,2,13,136,49,20,60,31,30,201]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DelegatedOutputChannelModel=e.FileOutputChannelModel=void 0;class r extends w.Disposable{constructor(h,g,d){super();this.file=h,this.fileService=g,this.logService=d,this._onDidContentChange=new A.Emitter,this.onDidContentChange=this._onDidContentChange.event,this.watching=!1,this.syncDelayer=new k.ThrottledDelayer(500)}watch(h){this.watching||(this.etag=h,this.poll(),this.logService.trace("Started polling",this.file.toString()),this.watching=!0)}poll(){const h=()=>this.doWatch().then(()=>this.poll());this.syncDelayer.trigger(h)}async doWatch(){const h=await this.fileService.stat(this.file);h.etag!==this.etag&&(this.etag=h.etag,this._onDidContentChange.fire(h.size))}unwatch(){this.watching&&(this.syncDelayer.cancel(),this.watching=!1,this.logService.trace("Stopped polling",this.file.toString()))}dispose(){this.unwatch(),super.dispose()}}let p=class extends w.Disposable{constructor(h,g,d,m,b,E,y){super();this.modelUri=h,this.language=g,this.file=d,this.fileService=m,this.modelService=b,this.editorWorkerService=y,this._onDispose=this._register(new A.Emitter),this.onDispose=this._onDispose.event,this.etag="",this.loadModelPromise=null,this.model=null,this.modelUpdateInProgress=!1,this.modelUpdateCancellationSource=this._register(new w.MutableDisposable),this.appendThrottler=this._register(new k.ThrottledDelayer(300)),this.startOffset=0,this.endOffset=0,this.fileHandler=this._register(new r(this.file,this.fileService,E)),this._register(this.fileHandler.onDidContentChange(T=>this.onDidContentChange(T))),this._register((0,w.toDisposable)(()=>this.fileHandler.unwatch()))}append(h){throw new Error("Not supported")}replace(h){throw new Error("Not supported")}clear(){this.update(l.OutputChannelUpdateMode.Clear,this.endOffset)}update(h,g){(this.loadModelPromise?this.loadModelPromise:Promise.resolve()).then(()=>this.doUpdate(h,g))}loadModel(){return this.loadModelPromise=k.Promises.withAsyncBody(async(h,g)=>{try{let d="";if(await this.fileService.exists(this.file)){const m=await this.fileService.readFile(this.file,{position:this.startOffset});this.endOffset=this.startOffset+m.value.byteLength,this.etag=m.etag,d=m.value.toString()}else this.startOffset=0,this.endOffset=0;h(this.createModel(d))}catch(d){g(d)}}),this.loadModelPromise}createModel(h){if(this.model)this.model.setValue(h);else{this.model=this.modelService.createModel(h,this.language,this.modelUri),this.fileHandler.watch(this.etag);const g=this.model.onWillDispose(()=>{this.cancelModelUpdate(),this.fileHandler.unwatch(),this.model=null,(0,w.dispose)(g)})}return this.model}doUpdate(h,g){if((h===l.OutputChannelUpdateMode.Clear||h===l.OutputChannelUpdateMode.Replace)&&(this.startOffset=this.endOffset=(0,v.isNumber)(g)?g:this.endOffset,this.cancelModelUpdate()),!this.model)return;this.modelUpdateInProgress=!0,this.modelUpdateCancellationSource.value||(this.modelUpdateCancellationSource.value=new s.CancellationTokenSource);const d=this.modelUpdateCancellationSource.value.token;h===l.OutputChannelUpdateMode.Clear?this.clearContent(this.model):h===l.OutputChannelUpdateMode.Replace?this.replacePromise=this.replaceContent(this.model,d).finally(()=>this.replacePromise=void 0):this.appendContent(this.model,d)}clearContent(h){this.doUpdateModel(h,[C.EditOperation.delete(h.getFullModelRange())],i.VSBuffer.fromString(""))}async appendContent(h,g){this.appendThrottler.trigger(async()=>{if(g.isCancellationRequested)return;if(this.replacePromise){try{await this.replacePromise}catch{}if(g.isCancellationRequested)return}const d=await this.getContentToUpdate();if(g.isCancellationRequested)return;const m=h.getLineCount(),b=h.getLineMaxColumn(m),E=[C.EditOperation.insert(new o.Position(m,b),d.toString())];this.doUpdateModel(h,E,d)})}async replaceContent(h,g){const d=await this.getContentToUpdate();if(g.isCancellationRequested)return;const m=await this.getReplaceEdits(h,d.toString());g.isCancellationRequested||this.doUpdateModel(h,m,d)}async getReplaceEdits(h,g){if(!g)return[C.EditOperation.delete(h.getFullModelRange())];if(g!==h.getValue()){const d=await this.editorWorkerService.computeMoreMinimalEdits(h.uri,[{text:g.toString(),range:h.getFullModelRange()}]);if(d?.length)return d.map(m=>C.EditOperation.replace(c.Range.lift(m.range),m.text))}return[]}doUpdateModel(h,g,d){g.length&&h.applyEdits(g),this.endOffset=this.endOffset+d.byteLength,this.modelUpdateInProgress=!1}cancelModelUpdate(){this.modelUpdateCancellationSource.value&&this.modelUpdateCancellationSource.value.cancel(),this.modelUpdateCancellationSource.value=void 0,this.appendThrottler.cancel(),this.replacePromise=void 0,this.modelUpdateInProgress=!1}async getContentToUpdate(){const h=await this.fileService.readFile(this.file,{position:this.endOffset});return this.etag=h.etag,h.value}onDidContentChange(h){this.model&&(this.modelUpdateInProgress||(0,v.isNumber)(h)&&this.endOffset>h&&this.update(l.OutputChannelUpdateMode.Clear,0),this.update(l.OutputChannelUpdateMode.Append))}isVisible(){return!!this.model}dispose(){this._onDispose.fire(),super.dispose()}};p=Ee([W(3,D.IFileService),W(4,I.IModelService),W(5,S.ILogService),W(6,_.IEditorWorkerService)],p),e.FileOutputChannelModel=p;let u=class extends p{constructor(h,g,d,m,b,E,y,T,R){super(g,d,m,b,E,T,R);this.logger=y.createLogger(m,{always:!0,donotRotate:!0,donotUseFormatters:!0}),this._offset=0}append(h){this.write(h),this.update(l.OutputChannelUpdateMode.Append)}replace(h){const g=this._offset;this.write(h),this.update(l.OutputChannelUpdateMode.Replace,g)}write(h){this._offset+=i.VSBuffer.fromString(h).byteLength,this.logger.info(h),this.isVisible()&&this.logger.flush()}};u=Ee([W(4,D.IFileService),W(5,I.IModelService),W(6,S.ILoggerService),W(7,S.ILogService),W(8,_.IEditorWorkerService)],u);let a=class extends w.Disposable{constructor(h,g,d,m,b,E){super();this.instantiationService=b,this.fileService=E,this._onDispose=this._register(new A.Emitter),this.onDispose=this._onDispose.event,this.outputChannelModel=this.createOutputChannelModel(h,g,d,m)}async createOutputChannelModel(h,g,d,m){const b=await m,E=f.joinPath(b,`${h.replace(/[\\/:\*\?"<>\|]/g,"")}.log`);await this.fileService.createFile(E);const y=this._register(this.instantiationService.createInstance(u,h,g,d,E));return this._register(y.onDispose(()=>this._onDispose.fire())),y}append(h){this.outputChannelModel.then(g=>g.append(h))}update(h,g){this.outputChannelModel.then(d=>d.update(h,g))}loadModel(){return this.outputChannelModel.then(h=>h.loadModel())}clear(){this.outputChannelModel.then(h=>h.clear())}replace(h){this.outputChannelModel.then(g=>g.replace(h))}};a=Ee([W(4,t.IInstantiationService),W(5,D.IFileService)],a),e.DelegatedOutputChannelModel=a}),define(ne[321],re([1,0,33,1677,63]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.preferencesOpenSettingsIcon=e.preferencesClearInputIcon=e.settingsDiscardIcon=e.settingsRemoveIcon=e.settingsAddIcon=e.settingsEditIcon=e.keybindingsAddIcon=e.keybindingsEditIcon=e.keybindingsSortIcon=e.keybindingsRecordKeysIcon=e.settingsMoreActionIcon=e.settingsScopeDropDownIcon=e.settingsGroupCollapsedIcon=e.settingsGroupExpandedIcon=void 0,e.settingsGroupExpandedIcon=(0,_.registerIcon)("settings-group-expanded",t.Codicon.chevronDown,(0,f.localize)(0,null)),e.settingsGroupCollapsedIcon=(0,_.registerIcon)("settings-group-collapsed",t.Codicon.chevronRight,(0,f.localize)(1,null)),e.settingsScopeDropDownIcon=(0,_.registerIcon)("settings-folder-dropdown",t.Codicon.triangleDown,(0,f.localize)(2,null)),e.settingsMoreActionIcon=(0,_.registerIcon)("settings-more-action",t.Codicon.gear,(0,f.localize)(3,null)),e.keybindingsRecordKeysIcon=(0,_.registerIcon)("keybindings-record-keys",t.Codicon.recordKeys,(0,f.localize)(4,null)),e.keybindingsSortIcon=(0,_.registerIcon)("keybindings-sort",t.Codicon.sortPrecedence,(0,f.localize)(5,null)),e.keybindingsEditIcon=(0,_.registerIcon)("keybindings-edit",t.Codicon.edit,(0,f.localize)(6,null)),e.keybindingsAddIcon=(0,_.registerIcon)("keybindings-add",t.Codicon.add,(0,f.localize)(7,null)),e.settingsEditIcon=(0,_.registerIcon)("settings-edit",t.Codicon.edit,(0,f.localize)(8,null)),e.settingsAddIcon=(0,_.registerIcon)("settings-add",t.Codicon.add,(0,f.localize)(9,null)),e.settingsRemoveIcon=(0,_.registerIcon)("settings-remove",t.Codicon.close,(0,f.localize)(10,null)),e.settingsDiscardIcon=(0,_.registerIcon)("settings-discard",t.Codicon.discard,(0,f.localize)(11,null)),e.preferencesClearInputIcon=(0,_.registerIcon)("preferences-clear-input",t.Codicon.clearAll,(0,f.localize)(12,null)),e.preferencesOpenSettingsIcon=(0,_.registerIcon)("preferences-open-settings",t.Codicon.goToFile,(0,f.localize)(13,null))}),define(ne[808],re([1,0,1681]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.knownTermMappings=e.knownAcronyms=e.tocData=e.commonlyUsedData=void 0,e.commonlyUsedData={id:"commonlyUsed",label:(0,t.localize)(0,null),settings:["files.autoSave","editor.fontSize","editor.fontFamily","editor.tabSize","editor.renderWhitespace","editor.cursorStyle","editor.multiCursorModifier","editor.insertSpaces","editor.wordWrap","files.exclude","files.associations","workbench.editor.enablePreview"]},e.tocData={id:"root",label:"root",children:[{id:"editor",label:(0,t.localize)(1,null),settings:["editor.*"],children:[{id:"editor/cursor",label:(0,t.localize)(2,null),settings:["editor.cursor*"]},{id:"editor/find",label:(0,t.localize)(3,null),settings:["editor.find.*"]},{id:"editor/font",label:(0,t.localize)(4,null),settings:["editor.font*"]},{id:"editor/format",label:(0,t.localize)(5,null),settings:["editor.format*"]},{id:"editor/diffEditor",label:(0,t.localize)(6,null),settings:["diffEditor.*"]},{id:"editor/minimap",label:(0,t.localize)(7,null),settings:["editor.minimap.*"]},{id:"editor/suggestions",label:(0,t.localize)(8,null),settings:["editor.*suggest*"]},{id:"editor/files",label:(0,t.localize)(9,null),settings:["files.*"]}]},{id:"workbench",label:(0,t.localize)(10,null),settings:["workbench.*"],children:[{id:"workbench/appearance",label:(0,t.localize)(11,null),settings:["workbench.activityBar.*","workbench.*color*","workbench.fontAliasing","workbench.iconTheme","workbench.sidebar.location","workbench.*.visible","workbench.tips.enabled","workbench.tree.*","workbench.view.*"]},{id:"workbench/breadcrumbs",label:(0,t.localize)(12,null),settings:["breadcrumbs.*"]},{id:"workbench/editor",label:(0,t.localize)(13,null),settings:["workbench.editor.*"]},{id:"workbench/settings",label:(0,t.localize)(14,null),settings:["workbench.settings.*"]},{id:"workbench/zenmode",label:(0,t.localize)(15,null),settings:["zenmode.*"]},{id:"workbench/screencastmode",label:(0,t.localize)(16,null),settings:["screencastMode.*"]}]},{id:"window",label:(0,t.localize)(17,null),settings:["window.*"],children:[{id:"window/newWindow",label:(0,t.localize)(18,null),settings:["window.*newwindow*"]}]},{id:"features",label:(0,t.localize)(19,null),children:[{id:"features/explorer",label:(0,t.localize)(20,null),settings:["explorer.*","outline.*"]},{id:"features/search",label:(0,t.localize)(21,null),settings:["search.*"]},{id:"features/debug",label:(0,t.localize)(22,null),settings:["debug.*","launch"]},{id:"features/testing",label:(0,t.localize)(23,null),settings:["testing.*"]},{id:"features/scm",label:(0,t.localize)(24,null),settings:["scm.*"]},{id:"features/extensions",label:(0,t.localize)(25,null),settings:["extensions.*"]},{id:"features/terminal",label:(0,t.localize)(26,null),settings:["terminal.*"]},{id:"features/task",label:(0,t.localize)(27,null),settings:["task.*"]},{id:"features/problems",label:(0,t.localize)(28,null),settings:["problems.*"]},{id:"features/output",label:(0,t.localize)(29,null),settings:["output.*"]},{id:"features/comments",label:(0,t.localize)(30,null),settings:["comments.*"]},{id:"features/remote",label:(0,t.localize)(31,null),settings:["remote.*"]},{id:"features/timeline",label:(0,t.localize)(32,null),settings:["timeline.*"]},{id:"features/notebook",label:(0,t.localize)(33,null),settings:["notebook.*","interactiveWindow.*"]},{id:"features/audioCues",label:(0,t.localize)(34,null),settings:["audioCues.*"]}]},{id:"application",label:(0,t.localize)(35,null),children:[{id:"application/http",label:(0,t.localize)(36,null),settings:["http.*"]},{id:"application/keyboard",label:(0,t.localize)(37,null),settings:["keyboard.*"]},{id:"application/update",label:(0,t.localize)(38,null),settings:["update.*"]},{id:"application/telemetry",label:(0,t.localize)(39,null),settings:["telemetry.*"]},{id:"application/settingsSync",label:(0,t.localize)(40,null),settings:["settingsSync.*"]}]},{id:"security",label:(0,t.localize)(41,null),children:[{id:"security/workspace",label:(0,t.localize)(42,null),settings:["security.workspace.*"]}]}]},e.knownAcronyms=new Set,["css","html","scss","less","json","js","ts","ie","id","php","scm"].forEach(f=>e.knownAcronyms.add(f)),e.knownTermMappings=new Map,e.knownTermMappings.set("power shell","PowerShell"),e.knownTermMappings.set("powershell","PowerShell"),e.knownTermMappings.set("javascript","JavaScript"),e.knownTermMappings.set("typescript","TypeScript")}),define(ne[322],re([1,0,5,7]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ENABLE_LANGUAGE_FILTER=e.KEYBOARD_LAYOUT_OPEN_PICKER=e.REQUIRE_TRUSTED_WORKSPACE_SETTING_TAG=e.WORKSPACE_TRUST_SETTING_TAG=e.LANGUAGE_SETTING_TAG=e.ID_SETTING_TAG=e.FEATURE_SETTING_TAG=e.EXTENSION_SETTING_TAG=e.MODIFIED_SETTING_TAG=e.KEYBINDINGS_EDITOR_SHOW_EXTENSION_KEYBINDINGS=e.KEYBINDINGS_EDITOR_SHOW_USER_KEYBINDINGS=e.KEYBINDINGS_EDITOR_SHOW_DEFAULT_KEYBINDINGS=e.KEYBINDINGS_EDITOR_COMMAND_FOCUS_KEYBINDINGS=e.KEYBINDINGS_EDITOR_COMMAND_SHOW_SIMILAR=e.KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND_TITLE=e.KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND=e.KEYBINDINGS_EDITOR_COMMAND_COPY=e.KEYBINDINGS_EDITOR_COMMAND_RESET=e.KEYBINDINGS_EDITOR_COMMAND_REMOVE=e.KEYBINDINGS_EDITOR_COMMAND_DEFINE_WHEN=e.KEYBINDINGS_EDITOR_COMMAND_ADD=e.KEYBINDINGS_EDITOR_COMMAND_DEFINE=e.KEYBINDINGS_EDITOR_COMMAND_SORTBY_PRECEDENCE=e.KEYBINDINGS_EDITOR_COMMAND_RECORD_SEARCH_KEYS=e.KEYBINDINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS=e.KEYBINDINGS_EDITOR_COMMAND_SEARCH=e.CONTEXT_WHEN_FOCUS=e.CONTEXT_KEYBINDING_FOCUS=e.CONTEXT_KEYBINDINGS_SEARCH_FOCUS=e.CONTEXT_KEYBINDINGS_EDITOR=e.CONTEXT_SETTINGS_ROW_FOCUS=e.CONTEXT_TOC_ROW_FOCUS=e.CONTEXT_SETTINGS_SEARCH_FOCUS=e.CONTEXT_SETTINGS_JSON_EDITOR=e.CONTEXT_SETTINGS_EDITOR=e.SETTINGS_EDITOR_COMMAND_SHOW_CONTEXT_MENU=e.SETTINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS=e.IPreferencesSearchService=void 0,e.IPreferencesSearchService=(0,t.createDecorator)("preferencesSearchService"),e.SETTINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS="settings.action.clearSearchResults",e.SETTINGS_EDITOR_COMMAND_SHOW_CONTEXT_MENU="settings.action.showContextMenu",e.CONTEXT_SETTINGS_EDITOR=new f.RawContextKey("inSettingsEditor",!1),e.CONTEXT_SETTINGS_JSON_EDITOR=new f.RawContextKey("inSettingsJSONEditor",!1),e.CONTEXT_SETTINGS_SEARCH_FOCUS=new f.RawContextKey("inSettingsSearch",!1),e.CONTEXT_TOC_ROW_FOCUS=new f.RawContextKey("settingsTocRowFocus",!1),e.CONTEXT_SETTINGS_ROW_FOCUS=new f.RawContextKey("settingRowFocus",!1),e.CONTEXT_KEYBINDINGS_EDITOR=new f.RawContextKey("inKeybindings",!1),e.CONTEXT_KEYBINDINGS_SEARCH_FOCUS=new f.RawContextKey("inKeybindingsSearch",!1),e.CONTEXT_KEYBINDING_FOCUS=new f.RawContextKey("keybindingFocus",!1),e.CONTEXT_WHEN_FOCUS=new f.RawContextKey("whenFocus",!1),e.KEYBINDINGS_EDITOR_COMMAND_SEARCH="keybindings.editor.searchKeybindings",e.KEYBINDINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS="keybindings.editor.clearSearchResults",e.KEYBINDINGS_EDITOR_COMMAND_RECORD_SEARCH_KEYS="keybindings.editor.recordSearchKeys",e.KEYBINDINGS_EDITOR_COMMAND_SORTBY_PRECEDENCE="keybindings.editor.toggleSortByPrecedence",e.KEYBINDINGS_EDITOR_COMMAND_DEFINE="keybindings.editor.defineKeybinding",e.KEYBINDINGS_EDITOR_COMMAND_ADD="keybindings.editor.addKeybinding",e.KEYBINDINGS_EDITOR_COMMAND_DEFINE_WHEN="keybindings.editor.defineWhenExpression",e.KEYBINDINGS_EDITOR_COMMAND_REMOVE="keybindings.editor.removeKeybinding",e.KEYBINDINGS_EDITOR_COMMAND_RESET="keybindings.editor.resetKeybinding",e.KEYBINDINGS_EDITOR_COMMAND_COPY="keybindings.editor.copyKeybindingEntry",e.KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND="keybindings.editor.copyCommandKeybindingEntry",e.KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND_TITLE="keybindings.editor.copyCommandTitle",e.KEYBINDINGS_EDITOR_COMMAND_SHOW_SIMILAR="keybindings.editor.showConflicts",e.KEYBINDINGS_EDITOR_COMMAND_FOCUS_KEYBINDINGS="keybindings.editor.focusKeybindings",e.KEYBINDINGS_EDITOR_SHOW_DEFAULT_KEYBINDINGS="keybindings.editor.showDefaultKeybindings",e.KEYBINDINGS_EDITOR_SHOW_USER_KEYBINDINGS="keybindings.editor.showUserKeybindings",e.KEYBINDINGS_EDITOR_SHOW_EXTENSION_KEYBINDINGS="keybindings.editor.showExtensionKeybindings",e.MODIFIED_SETTING_TAG="modified",e.EXTENSION_SETTING_TAG="ext:",e.FEATURE_SETTING_TAG="feature:",e.ID_SETTING_TAG="id:",e.LANGUAGE_SETTING_TAG="lang:",e.WORKSPACE_TRUST_SETTING_TAG="workspaceTrust",e.REQUIRE_TRUSTED_WORKSPACE_SETTING_TAG="requireTrustedWorkspace",e.KEYBOARD_LAYOUT_OPEN_PICKER="workbench.action.openKeyboardLayoutPicker",e.ENABLE_LANGUAGE_FILTER=!0}),define(ne[493],re([1,0,66,1687,32,82]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.focusedRowBorder=e.rowHoverBackground=e.focusedRowBackground=e.settingsNumberInputBorder=e.settingsNumberInputForeground=e.settingsNumberInputBackground=e.settingsTextInputBorder=e.settingsTextInputForeground=e.settingsTextInputBackground=e.settingsCheckboxBorder=e.settingsCheckboxForeground=e.settingsCheckboxBackground=e.settingsSelectListBorder=e.settingsSelectBorder=e.settingsSelectForeground=e.settingsSelectBackground=e.settingsSashBorder=e.settingsHeaderBorder=e.modifiedItemIndicator=e.settingsHeaderForeground=void 0,e.settingsHeaderForeground=(0,_.registerColor)("settings.headerForeground",{light:"#444444",dark:"#e7e7e7",hcDark:"#ffffff",hcLight:"#292929"},(0,f.localize)(0,null)),e.modifiedItemIndicator=(0,_.registerColor)("settings.modifiedItemIndicator",{light:new t.Color(new t.RGBA(102,175,224)),dark:new t.Color(new t.RGBA(12,125,157)),hcDark:new t.Color(new t.RGBA(0,73,122)),hcLight:new t.Color(new t.RGBA(102,175,224))},(0,f.localize)(1,null)),e.settingsHeaderBorder=(0,_.registerColor)("settings.headerBorder",{dark:A.PANEL_BORDER,light:A.PANEL_BORDER,hcDark:A.PANEL_BORDER,hcLight:A.PANEL_BORDER},(0,f.localize)(2,null)),e.settingsSashBorder=(0,_.registerColor)("settings.sashBorder",{dark:A.PANEL_BORDER,light:A.PANEL_BORDER,hcDark:A.PANEL_BORDER,hcLight:A.PANEL_BORDER},(0,f.localize)(3,null)),e.settingsSelectBackground=(0,_.registerColor)("settings.dropdownBackground",{dark:_.selectBackground,light:_.selectBackground,hcDark:_.selectBackground,hcLight:_.selectBackground},(0,f.localize)(4,null)),e.settingsSelectForeground=(0,_.registerColor)("settings.dropdownForeground",{dark:_.selectForeground,light:_.selectForeground,hcDark:_.selectForeground,hcLight:_.selectForeground},(0,f.localize)(5,null)),e.settingsSelectBorder=(0,_.registerColor)("settings.dropdownBorder",{dark:_.selectBorder,light:_.selectBorder,hcDark:_.selectBorder,hcLight:_.selectBorder},(0,f.localize)(6,null)),e.settingsSelectListBorder=(0,_.registerColor)("settings.dropdownListBorder",{dark:_.editorWidgetBorder,light:_.editorWidgetBorder,hcDark:_.editorWidgetBorder,hcLight:_.editorWidgetBorder},(0,f.localize)(7,null)),e.settingsCheckboxBackground=(0,_.registerColor)("settings.checkboxBackground",{dark:_.checkboxBackground,light:_.checkboxBackground,hcDark:_.checkboxBackground,hcLight:_.checkboxBackground},(0,f.localize)(8,null)),e.settingsCheckboxForeground=(0,_.registerColor)("settings.checkboxForeground",{dark:_.checkboxForeground,light:_.checkboxForeground,hcDark:_.checkboxForeground,hcLight:_.checkboxForeground},(0,f.localize)(9,null)),e.settingsCheckboxBorder=(0,_.registerColor)("settings.checkboxBorder",{dark:_.checkboxBorder,light:_.checkboxBorder,hcDark:_.checkboxBorder,hcLight:_.checkboxBorder},(0,f.localize)(10,null)),e.settingsTextInputBackground=(0,_.registerColor)("settings.textInputBackground",{dark:_.inputBackground,light:_.inputBackground,hcDark:_.inputBackground,hcLight:_.inputBackground},(0,f.localize)(11,null)),e.settingsTextInputForeground=(0,_.registerColor)("settings.textInputForeground",{dark:_.inputForeground,light:_.inputForeground,hcDark:_.inputForeground,hcLight:_.inputForeground},(0,f.localize)(12,null)),e.settingsTextInputBorder=(0,_.registerColor)("settings.textInputBorder",{dark:_.inputBorder,light:_.inputBorder,hcDark:_.inputBorder,hcLight:_.inputBorder},(0,f.localize)(13,null)),e.settingsNumberInputBackground=(0,_.registerColor)("settings.numberInputBackground",{dark:_.inputBackground,light:_.inputBackground,hcDark:_.inputBackground,hcLight:_.inputBackground},(0,f.localize)(14,null)),e.settingsNumberInputForeground=(0,_.registerColor)("settings.numberInputForeground",{dark:_.inputForeground,light:_.inputForeground,hcDark:_.inputForeground,hcLight:_.inputForeground},(0,f.localize)(15,null)),e.settingsNumberInputBorder=(0,_.registerColor)("settings.numberInputBorder",{dark:_.inputBorder,light:_.inputBorder,hcDark:_.inputBorder,hcLight:_.inputBorder},(0,f.localize)(16,null)),e.focusedRowBackground=(0,_.registerColor)("settings.focusedRowBackground",{dark:(0,_.transparent)(_.listHoverBackground,.6),light:(0,_.transparent)(_.listHoverBackground,.6),hcDark:null,hcLight:null},(0,f.localize)(17,null)),e.rowHoverBackground=(0,_.registerColor)("settings.rowHoverBackground",{dark:(0,_.transparent)(_.listHoverBackground,.3),light:(0,_.transparent)(_.listHoverBackground,.3),hcDark:null,hcLight:null},(0,f.localize)(18,null)),e.focusedRowBorder=(0,_.registerColor)("settings.focusedRowBorder",{dark:t.Color.white.transparent(.12),light:t.Color.black.transparent(.12),hcDark:_.focusBorder,hcLight:_.focusBorder},(0,f.localize)(19,null))}),define(ne[2196],re([1,0,223,10,78,162,244,183,389,11,33,66,6,2,14,13,1684,37,32,68,12,321,493,1115]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectSettingCheckboxWidget=e.ObjectSettingDropdownWidget=e.ExcludeSettingWidget=e.ListSettingWidget=e.AbstractListSettingWidget=e.ListSettingListModel=void 0;const h=f.$;(0,u.registerThemingParticipant)((T,R)=>{const O=T.getColor(n.settingsCheckboxBackground);O&&R.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-bool .setting-value-checkbox { background-color: ${O} !important; }`);const x=T.getColor(n.settingsCheckboxForeground);x&&R.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-bool .setting-value-checkbox { color: ${x} !important; }`);const F=T.getColor(n.settingsCheckboxBorder);F&&R.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-bool .setting-value-checkbox { border-color: ${F} !important; }`);const L=T.getColor(r.textLinkForeground);if(L){R.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-trust-description a { color: ${L}; }`),R.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-trust-description a > code { color: ${L}; }`),R.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-markdown a { color: ${L}; }`),R.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-markdown a > code { color: ${L}; }`),R.addRule(`.monaco-select-box-dropdown-container > .select-box-details-pane > .select-box-description-markdown a { color: ${L}; }`),R.addRule(`.monaco-select-box-dropdown-container > .select-box-details-pane > .select-box-description-markdown a > code { color: ${L}; }`);const j=new C.Color(new C.RGBA(L.rgba.r,L.rgba.g,L.rgba.b,.8));R.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-untrusted > .setting-item-contents .setting-item-markdown a { color: ${j}; }`)}const M=T.getColor(r.textLinkActiveForeground);M&&(R.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-trust-description a:hover, .settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-trust-description a:active { color: ${M}; }`),R.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-trust-description a:hover > code, .settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-trust-description a:active > code { color: ${M}; }`),R.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-markdown a:hover, .settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-markdown a:active { color: ${M}; }`),R.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-markdown a:hover > code, .settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-markdown a:active > code { color: ${M}; }`),R.addRule(`.monaco-select-box-dropdown-container > .select-box-details-pane > .select-box-description-markdown a:hover, .monaco-select-box-dropdown-container > .select-box-details-pane > .select-box-description-markdown a:active { color: ${M}; }`),R.addRule(`.monaco-select-box-dropdown-container > .select-box-details-pane > .select-box-description-markdown a:hover > code, .monaco-select-box-dropdown-container > .select-box-details-pane > .select-box-description-markdown a:active > code { color: ${M}; }`));const N=T.getColor(n.settingsHeaderForeground);N&&R.addRule(`.settings-editor > .settings-header > .settings-header-controls .settings-tabs-widget .action-label.checked { color: ${N}; border-bottom-color: ${N}; }`);const B=T.getColor(r.foreground);B&&R.addRule(`.settings-editor > .settings-header > .settings-header-controls .settings-tabs-widget .action-label { color: ${B}; }`);const P=T.getColor(r.listHoverBackground);P&&R.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-list .setting-list-row:hover { background-color: ${P}; }`);const V=T.getColor(r.listHoverForeground);V&&R.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-list .setting-list-row:hover { color: ${V}; }`);const z=T.getColor(r.listDropBackground);z&&R.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-list .setting-list-row.drag-hover { background-color: ${z}; }`);const U=T.getColor(r.listActiveSelectionBackground);U&&R.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-list .setting-list-row.selected:focus { background-color: ${U}; }`);const H=T.getColor(r.listInactiveSelectionBackground);H&&R.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-list .setting-list-row.selected:not(:focus) { background-color: ${H}; }`);const K=T.getColor(r.listInactiveSelectionForeground);K&&R.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-list .setting-list-row.selected:not(:focus) { color: ${K}; }`);const G=T.getColor(r.listActiveSelectionForeground);G&&R.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-list .setting-list-row.selected:focus { color: ${G}; }`);const q=T.getColor(r.textPreformatForeground);if(q){R.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item .setting-item-markdown code { color: ${q} }`),R.addRule(`.monaco-select-box-dropdown-container > .select-box-details-pane > .select-box-description-markdown code { color: ${q} }`);const j=new C.Color(new C.RGBA(q.rgba.r,q.rgba.g,q.rgba.b,.8));R.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-untrusted > .setting-item-contents .setting-item-description .setting-item-markdown code { color: ${j} }`)}const Z=T.getColor(n.modifiedItemIndicator);Z&&R.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-contents > .setting-item-modified-indicator { border-color: ${Z}; }`)});class g{constructor(R){this._dataItems=[],this._editKey=null,this._selectedIdx=null,this._newDataItem=R}get items(){const R=this._dataItems.map((O,x)=>{const F=typeof this._editKey=="number"&&this._editKey===x;return{...O,editing:F,selected:x===this._selectedIdx||F}});return this._editKey==="create"&&R.push({editing:!0,selected:!0,...this._newDataItem}),R}setEditKey(R){this._editKey=R}setValue(R){this._dataItems=R}select(R){this._selectedIdx=R}getSelected(){return this._selectedIdx}selectNext(){typeof this._selectedIdx=="number"?this._selectedIdx=Math.min(this._selectedIdx+1,this._dataItems.length-1):this._selectedIdx=0}selectPrevious(){typeof this._selectedIdx=="number"?this._selectedIdx=Math.max(this._selectedIdx-1,0):this._selectedIdx=0}}e.ListSettingListModel=g;let d=class extends c.Disposable{constructor(R,O,x){super();this.container=R,this.themeService=O,this.contextViewService=x,this.rowElements=[],this._onDidChangeList=this._register(new o.Emitter),this.model=new g(this.getEmptyItem()),this.listDisposables=this._register(new c.DisposableStore),this.onDidChangeList=this._onDidChangeList.event,this.listElement=f.append(R,h("div")),this.listElement.setAttribute("role","list"),this.getContainerClasses().forEach(F=>this.listElement.classList.add(F)),this.listElement.setAttribute("tabindex","0"),f.append(R,this.renderAddButton()),this.renderList(),this._register(f.addDisposableListener(this.listElement,f.EventType.POINTER_DOWN,F=>this.onListClick(F))),this._register(f.addDisposableListener(this.listElement,f.EventType.DBLCLICK,F=>this.onListDoubleClick(F))),this._register(f.addStandardDisposableListener(this.listElement,"keydown",F=>{if(F.equals(16))this.selectPreviousRow();else if(F.equals(18))this.selectNextRow();else return;F.preventDefault(),F.stopPropagation()}))}get domNode(){return this.listElement}get items(){return this.model.items}get inReadMode(){return this.model.items.every(R=>!R.editing)}setValue(R){this.model.setValue(R),this.renderList()}renderHeader(){}isAddButtonVisible(){return!0}renderList(){const R=f.isAncestor(document.activeElement,this.listElement);f.clearNode(this.listElement),this.listDisposables.clear();const O=this.model.items.some(M=>!!(M.editing&&this.isItemNew(M)));this.container.classList.toggle("setting-list-hide-add-button",!this.isAddButtonVisible()||O);const x=this.renderHeader(),F=24;let L=F*this.model.items.length;x&&(L+=F,this.listElement.appendChild(x)),this.rowElements=this.model.items.map((M,N)=>this.renderDataOrEditItem(M,N,R)),this.rowElements.forEach(M=>this.listElement.appendChild(M)),this.listElement.style.height=L+"px"}createBasicSelectBox(R){const O=R.options.map(({value:L,description:M})=>({text:L,description:M})),x=R.options.findIndex(L=>R.data===L.value),F=new I.SelectBox(O,x,this.contextViewService,void 0,{useCustomDrawn:!(i.isIOS&&t.BrowserFeatures.pointerEvents)});return this.listDisposables.add((0,p.attachSelectBoxStyler)(F,this.themeService,{selectBackground:n.settingsSelectBackground,selectForeground:n.settingsSelectForeground,selectBorder:n.settingsSelectBorder,selectListBorder:n.settingsSelectListBorder})),F}editSetting(R){this.model.setEditKey(R),this.renderList()}cancelEdit(){this.model.setEditKey("none"),this.renderList()}handleItemChange(R,O,x){this.model.setEditKey("none"),this._onDidChangeList.fire({originalItem:R,item:O,targetIndex:x}),this.renderList()}renderDataOrEditItem(R,O,x){const F=R.editing?this.renderEdit(R,O):this.renderDataItem(R,O,x);return F.setAttribute("role","listitem"),F}renderDataItem(R,O,x){const F=this.renderItem(R,O),L=F.rowElement;L.setAttribute("data-index",O+""),L.setAttribute("tabindex",R.selected?"0":"-1"),L.classList.toggle("selected",R.selected);const M=new _.ActionBar(L);return this.listDisposables.add(M),M.push(this.getActionsForItem(R,O),{icon:!0,label:!0}),this.addTooltipsToRow(F,R),R.selected&&x&&this.listDisposables.add((0,w.disposableTimeout)(()=>L.focus())),L}renderAddButton(){const R=h(".setting-list-new-row"),O=this._register(new A.Button(R));return O.label=this.getLocalizedStrings().addButtonLabel,O.element.classList.add("setting-list-addButton"),this._register((0,p.attachButtonStyler)(O,this.themeService)),this._register(O.onDidClick(()=>{this.model.setEditKey("create"),this.renderList()})),R}onListClick(R){const O=this.getClickedItemIndex(R);O<0||(R.preventDefault(),R.stopImmediatePropagation(),this.model.getSelected()!==O&&this.selectRow(O))}onListDoubleClick(R){const O=this.getClickedItemIndex(R);if(O<0)return;this.model.items[O]&&(this.editSetting(O),R.preventDefault(),R.stopPropagation())}getClickedItemIndex(R){if(!R.target||f.findParentWithClass(R.target,"monaco-action-bar"))return-1;const x=f.findParentWithClass(R.target,"setting-list-row");if(!x)return-1;const F=x.getAttribute("data-index");return F?parseInt(F):-1}selectRow(R){this.model.select(R),this.rowElements.forEach(x=>x.classList.remove("selected"));const O=this.rowElements[this.model.getSelected()];O.classList.add("selected"),O.focus()}selectNextRow(){this.model.selectNext(),this.selectRow(this.model.getSelected())}selectPreviousRow(){this.model.selectPrevious(),this.selectRow(this.model.getSelected())}};d=Ee([W(1,u.IThemeService),W(2,l.IContextViewService)],d),e.AbstractListSettingWidget=d;class m extends d{constructor(){super(...arguments);this.showAddButton=!0}setValue(R,O){this.keyValueSuggester=O?.keySuggester,this.showAddButton=O?.showAddButton??!0,super.setValue(R)}getEmptyItem(){return{value:{type:"string",data:""}}}isAddButtonVisible(){return this.showAddButton}getContainerClasses(){return["setting-list-widget"]}getActionsForItem(R,O){return[{class:u.ThemeIcon.asClassName(a.settingsEditIcon),enabled:!0,id:"workbench.action.editListItem",tooltip:this.getLocalizedStrings().editActionTooltip,run:()=>this.editSetting(O)},{class:u.ThemeIcon.asClassName(a.settingsRemoveIcon),enabled:!0,id:"workbench.action.removeListItem",tooltip:this.getLocalizedStrings().deleteActionTooltip,run:()=>this._onDidChangeList.fire({originalItem:R,item:void 0,targetIndex:O})}]}getDragImage(R){const O=h(".monaco-drag-image");return O.textContent=R.value.data,O}renderItem(R,O){const x=h(".setting-list-row"),F=f.append(x,h(".setting-list-value")),L=f.append(x,h(".setting-list-sibling"));return F.textContent=R.value.data.toString(),L.textContent=R.sibling?`when: ${R.sibling}`:null,this.addDragAndDrop(x,R,O),{rowElement:x,keyElement:F,valueElement:L}}addDragAndDrop(R,O,x){this.inReadMode?(R.draggable=!0,R.classList.add("draggable")):(R.draggable=!1,R.classList.remove("draggable")),this.listDisposables.add(f.addDisposableListener(R,f.EventType.DRAG_START,L=>{if(this.dragDetails={element:R,item:O,itemIndex:x},L.dataTransfer){L.dataTransfer.dropEffect="move";const M=this.getDragImage(O);document.body.appendChild(M),L.dataTransfer.setDragImage(M,-10,-10),setTimeout(()=>document.body.removeChild(M),0)}})),this.listDisposables.add(f.addDisposableListener(R,f.EventType.DRAG_OVER,L=>this.dragDetails?(L.preventDefault(),L.dataTransfer&&(L.dataTransfer.dropEffect="move"),!0):!1));let F=0;this.listDisposables.add(f.addDisposableListener(R,f.EventType.DRAG_ENTER,L=>{F++,R.classList.add("drag-hover")})),this.listDisposables.add(f.addDisposableListener(R,f.EventType.DRAG_LEAVE,L=>{F--,F||R.classList.remove("drag-hover")})),this.listDisposables.add(f.addDisposableListener(R,f.EventType.DROP,L=>this.dragDetails?(L.preventDefault(),F=0,this.dragDetails.element!==R&&this._onDidChangeList.fire({originalItem:this.dragDetails.item,sourceIndex:this.dragDetails.itemIndex,item:O,targetIndex:x}),!0):!1)),this.listDisposables.add(f.addDisposableListener(R,f.EventType.DRAG_END,L=>{F=0,R.classList.remove("drag-hover"),L.dataTransfer&&L.dataTransfer.clearData(),this.dragDetails&&(this.dragDetails=void 0)}))}renderEdit(R,O){const x=h(".setting-list-edit-row");let F,L,M;if(this.keyValueSuggester){const H=this.keyValueSuggester(this.model.items.map(({value:{data:K}})=>K),O);R={...R,value:{type:"enum",data:R.value.data,options:H?H.options:[]}}}switch(R.value.type){case"string":F=this.renderInputBox(R.value,x);break;case"enum":F=this.renderDropdown(R.value,x),M=R.value.options,R.value.options.length&&(L=this.isItemNew(R)?M[0].value:R.value.data);break}const N=()=>({value:{type:"string",data:F.value},sibling:V?.value}),B=H=>({value:{type:"enum",data:H,options:M??[]}}),P=H=>{H.equals(3)?this.handleItemChange(R,N(),O):H.equals(9)&&(this.cancelEdit(),H.preventDefault()),x?.focus()};if(R.value.type!=="string"){const H=F;this.listDisposables.add(H.onDidSelect(({selected:K})=>{L=K}))}else{const H=F;this.listDisposables.add(f.addStandardDisposableListener(H.inputElement,f.EventType.KEY_DOWN,P))}let V;(0,S.isUndefinedOrNull)(R.sibling)?F instanceof D.InputBox&&F.element.classList.add("no-sibling"):(V=new D.InputBox(x,this.contextViewService,{placeholder:this.getLocalizedStrings().siblingInputPlaceholder}),V.element.classList.add("setting-list-siblingInput"),this.listDisposables.add(V),this.listDisposables.add((0,p.attachInputBoxStyler)(V,this.themeService,{inputBackground:n.settingsTextInputBackground,inputForeground:n.settingsTextInputForeground,inputBorder:n.settingsTextInputBorder})),V.value=R.sibling,this.listDisposables.add(f.addStandardDisposableListener(V.inputElement,f.EventType.KEY_DOWN,P)));const z=this._register(new A.Button(x));z.label=(0,s.localize)(0,null),z.element.classList.add("setting-list-ok-button"),this.listDisposables.add((0,p.attachButtonStyler)(z,this.themeService)),this.listDisposables.add(z.onDidClick(()=>{R.value.type==="string"?this.handleItemChange(R,N(),O):this.handleItemChange(R,B(L),O)}));const U=this._register(new A.Button(x,{secondary:!0}));return U.label=(0,s.localize)(1,null),U.element.classList.add("setting-list-cancel-button"),this.listDisposables.add((0,p.attachButtonStyler)(U,this.themeService)),this.listDisposables.add(U.onDidClick(()=>this.cancelEdit())),this.listDisposables.add((0,w.disposableTimeout)(()=>{F.focus(),F instanceof D.InputBox&&F.select()})),x}isItemNew(R){return R.value.data===""}addTooltipsToRow(R,{value:O,sibling:x}){const F=(0,S.isUndefinedOrNull)(x)?(0,s.localize)(2,null,O.data):(0,s.localize)(3,null,O.data,x),{rowElement:L}=R;L.title=F,L.setAttribute("aria-label",L.title)}getLocalizedStrings(){return{deleteActionTooltip:(0,s.localize)(4,null),editActionTooltip:(0,s.localize)(5,null),addButtonLabel:(0,s.localize)(6,null),inputPlaceholder:(0,s.localize)(7,null),siblingInputPlaceholder:(0,s.localize)(8,null)}}renderInputBox(R,O){const x=new D.InputBox(O,this.contextViewService,{placeholder:this.getLocalizedStrings().inputPlaceholder});return x.element.classList.add("setting-list-valueInput"),this.listDisposables.add((0,p.attachInputBoxStyler)(x,this.themeService,{inputBackground:n.settingsTextInputBackground,inputForeground:n.settingsTextInputForeground,inputBorder:n.settingsTextInputBorder})),this.listDisposables.add(x),x.value=R.data.toString(),x}renderDropdown(R,O){if(R.type!=="enum")throw new Error("Valuetype must be enum.");const x=this.createBasicSelectBox(R),F=h(".setting-list-object-list-row");return x.render(F),O.appendChild(F),x}}e.ListSettingWidget=m;class b extends m{getContainerClasses(){return["setting-list-exclude-widget"]}addDragAndDrop(R,O,x){}addTooltipsToRow(R,{value:O,sibling:x}){const F=(0,S.isUndefinedOrNull)(x)?(0,s.localize)(9,null,O.data):(0,s.localize)(10,null,O.data,x),{rowElement:L}=R;L.title=F,L.setAttribute("aria-label",L.title)}getLocalizedStrings(){return{deleteActionTooltip:(0,s.localize)(11,null),editActionTooltip:(0,s.localize)(12,null),addButtonLabel:(0,s.localize)(13,null),inputPlaceholder:(0,s.localize)(14,null),siblingInputPlaceholder:(0,s.localize)(15,null)}}}e.ExcludeSettingWidget=b;class E extends d{constructor(){super(...arguments);this.currentSettingKey="",this.showAddButton=!0,this.keySuggester=()=>{},this.valueSuggester=()=>{}}setValue(R,O){this.showAddButton=O?.showAddButton??this.showAddButton,this.keySuggester=O?.keySuggester??this.keySuggester,this.valueSuggester=O?.valueSuggester??this.valueSuggester,(0,S.isDefined)(O)&&O.settingKey!==this.currentSettingKey&&(this.model.setEditKey("none"),this.model.select(null),this.currentSettingKey=O.settingKey),super.setValue(R)}isItemNew(R){return R.key.data===""&&R.value.data===""}isAddButtonVisible(){return this.showAddButton}getEmptyItem(){return{key:{type:"string",data:""},value:{type:"string",data:""},removable:!0}}getContainerClasses(){return["setting-list-object-widget"]}getActionsForItem(R,O){const x=[{class:u.ThemeIcon.asClassName(a.settingsEditIcon),enabled:!0,id:"workbench.action.editListItem",tooltip:this.getLocalizedStrings().editActionTooltip,run:()=>this.editSetting(O)}];return R.removable?x.push({class:u.ThemeIcon.asClassName(a.settingsRemoveIcon),enabled:!0,id:"workbench.action.removeListItem",tooltip:this.getLocalizedStrings().deleteActionTooltip,run:()=>this._onDidChangeList.fire({originalItem:R,item:void 0,targetIndex:O})}):x.push({class:u.ThemeIcon.asClassName(a.settingsDiscardIcon),enabled:!0,id:"workbench.action.resetListItem",tooltip:this.getLocalizedStrings().resetActionTooltip,run:()=>this._onDidChangeList.fire({originalItem:R,item:void 0,targetIndex:O})}),x}renderHeader(){const R=h(".setting-list-row-header"),O=f.append(R,h(".setting-list-object-key")),x=f.append(R,h(".setting-list-object-value")),{keyHeaderText:F,valueHeaderText:L}=this.getLocalizedStrings();return O.textContent=F,x.textContent=L,R}renderItem(R,O){const x=h(".setting-list-row");x.classList.add("setting-list-object-row");const F=f.append(x,h(".setting-list-object-key")),L=f.append(x,h(".setting-list-object-value"));return F.textContent=R.key.data,L.textContent=R.value.data.toString(),{rowElement:x,keyElement:F,valueElement:L}}renderEdit(R,O){const x=h(".setting-list-edit-row.setting-list-object-row"),F={...R},L=K=>{F.key=K,U.enabled=K.data!=="";const G=this.valueSuggester(K.data)??R.value;this.shouldUseSuggestion(R.value,F.value,G)&&(M(G),z())},M=K=>{F.value=K};let N,B;if(this.showAddButton){if(this.isItemNew(R)){const q=this.keySuggester(this.model.items.map(({key:{data:Z}})=>Z));if((0,S.isDefined)(q)){F.key=q;const Z=this.valueSuggester(F.key.data);M(Z??F.value)}}const{widget:K,element:G}=this.renderEditWidget(F.key,{idx:O,isKey:!0,originalItem:R,changedItem:F,update:L});N=K,B=G}else B=h(".setting-list-object-key"),B.textContent=R.key.data;let P;const V=h(".setting-list-object-value-container"),z=()=>{const{widget:K,element:G}=this.renderEditWidget(F.value,{idx:O,isKey:!1,originalItem:R,changedItem:F,update:M});P=K,f.clearNode(V),V.append(G)};z(),x.append(B,V);const U=this._register(new A.Button(x));U.enabled=F.key.data!=="",U.label=(0,s.localize)(16,null),U.element.classList.add("setting-list-ok-button"),this.listDisposables.add((0,p.attachButtonStyler)(U,this.themeService)),this.listDisposables.add(U.onDidClick(()=>this.handleItemChange(R,F,O)));const H=this._register(new A.Button(x,{secondary:!0}));return H.label=(0,s.localize)(17,null),H.element.classList.add("setting-list-cancel-button"),this.listDisposables.add((0,p.attachButtonStyler)(H,this.themeService)),this.listDisposables.add(H.onDidClick(()=>this.cancelEdit())),this.listDisposables.add((0,w.disposableTimeout)(()=>{const K=N??P;K.focus(),K instanceof D.InputBox&&K.select()})),x}renderEditWidget(R,O){switch(R.type){case"string":return this.renderStringEditWidget(R,O);case"enum":return this.renderEnumEditWidget(R,O);case"boolean":return this.renderEnumEditWidget({type:"enum",data:R.data.toString(),options:[{value:"true"},{value:"false"}]},O)}}renderStringEditWidget(R,{idx:O,isKey:x,originalItem:F,changedItem:L,update:M}){const N=h(x?".setting-list-object-input-key":".setting-list-object-input-value"),B=new D.InputBox(N,this.contextViewService,{placeholder:x?(0,s.localize)(18,null):(0,s.localize)(19,null)});B.element.classList.add("setting-list-object-input"),this.listDisposables.add((0,p.attachInputBoxStyler)(B,this.themeService,{inputBackground:n.settingsTextInputBackground,inputForeground:n.settingsTextInputForeground,inputBorder:n.settingsTextInputBorder})),this.listDisposables.add(B),B.value=R.data,this.listDisposables.add(B.onDidChange(V=>M({...R,data:V})));const P=V=>{V.equals(3)?this.handleItemChange(F,L,O):V.equals(9)&&(this.cancelEdit(),V.preventDefault())};return this.listDisposables.add(f.addStandardDisposableListener(B.inputElement,f.EventType.KEY_DOWN,P)),{widget:B,element:N}}renderEnumEditWidget(R,{isKey:O,changedItem:x,update:F}){const L=this.createBasicSelectBox(R),M=O?x.key:x.value;this.listDisposables.add(L.onDidSelect(({selected:P})=>F(M.type==="boolean"?{...M,data:P==="true"}:{...M,data:P})));const N=h(".setting-list-object-input");return N.classList.add(O?"setting-list-object-input-key":"setting-list-object-input-value"),L.render(N),R.options.findIndex(P=>R.data===P.value)===-1&&R.options.length?F(M.type==="boolean"?{...M,data:!0}:{...M,data:R.options[0].value}):M.type==="boolean"&&F({...M,data:R.data==="true"}),{widget:L,element:N}}shouldUseSuggestion(R,O,x){if(x.type!=="enum"&&x.type===O.type&&x.data===O.data)return!1;if(R.data==="")return!0;if(O.type===x.type&&x.type!=="enum")return!1;if(O.type==="enum"&&x.type==="enum"){const F=new Set(O.options.map(({value:L})=>L));if(x.options.forEach(({value:L})=>F.delete(L)),F.size===0)return!1}return!0}addTooltipsToRow(R,O){const{keyElement:x,valueElement:F,rowElement:L}=R,M=(0,s.localize)(20,null,O.key.data,O.value.data),N=this.getEnumDescription(O.key)??O.keyDescription??M;x.title=N;const B=this.getEnumDescription(O.value)??M;F.title=B,L.setAttribute("aria-label",M)}getEnumDescription(R){return R.type==="enum"?R.options.find(({value:x})=>R.data===x)?.description:void 0}getLocalizedStrings(){return{deleteActionTooltip:(0,s.localize)(21,null),resetActionTooltip:(0,s.localize)(22,null),editActionTooltip:(0,s.localize)(23,null),addButtonLabel:(0,s.localize)(24,null),keyHeaderText:(0,s.localize)(25,null),valueHeaderText:(0,s.localize)(26,null)}}}e.ObjectSettingDropdownWidget=E;class y extends d{constructor(){super(...arguments);this.currentSettingKey=""}setValue(R,O){(0,S.isDefined)(O)&&O.settingKey!==this.currentSettingKey&&(this.model.setEditKey("none"),this.model.select(null),this.currentSettingKey=O.settingKey),super.setValue(R)}isItemNew(R){return!R.key.data&&!R.value.data}getEmptyItem(){return{key:{type:"string",data:""},value:{type:"boolean",data:!1},removable:!1}}getContainerClasses(){return["setting-list-object-widget"]}getActionsForItem(R,O){return[]}isAddButtonVisible(){return!1}renderHeader(){}renderDataOrEditItem(R,O,x){const F=this.renderEdit(R,O);return F.setAttribute("role","listitem"),F}renderItem(R,O){const x=h(".blank-row"),F=h(".blank-row-key");return{rowElement:x,keyElement:F}}renderEdit(R,O){const x=h(".setting-list-edit-row.setting-list-object-row.setting-item-bool"),F={...R},L=z=>{F.value.data=z,this.handleItemChange(R,F,O)},M=R.keyDescription?`${R.keyDescription} (${R.key.data})`:R.key.data,{element:N,widget:B}=this.renderEditWidget(F.value.data,M,L);x.appendChild(N);const P=f.append(x,h(".setting-list-object-value"));P.textContent=M;const V={rowElement:x,keyElement:P,valueElement:B.domNode};return this.addTooltipsToRow(V,R),this._register(f.addDisposableListener(P,f.EventType.MOUSE_DOWN,z=>{z.target.tagName.toLowerCase()!=="a"&&(B.checked=!B.checked,L(B.checked)),f.EventHelper.stop(z)})),x}renderEditWidget(R,O,x){const F=new k.Toggle({icon:v.Codicon.check,actionClassName:"setting-value-checkbox",isChecked:R,title:O});this.listDisposables.add(F);const L=h(".setting-list-object-input");return L.classList.add("setting-list-object-input-key-checkbox"),F.domNode.classList.add("setting-value-checkbox"),L.appendChild(F.domNode),this._register(f.addDisposableListener(L,f.EventType.MOUSE_DOWN,M=>{F.checked=!F.checked,x(F.checked),M.stopImmediatePropagation()})),{widget:F,element:L}}addTooltipsToRow(R,O){const x=(0,s.localize)(27,null,O.key.data,O.value.data),F=O.keyDescription??x,{rowElement:L,keyElement:M,valueElement:N}=R;M.title=F,N.setAttribute("aria-label",x),L.setAttribute("aria-label",x)}getLocalizedStrings(){return{deleteActionTooltip:(0,s.localize)(28,null),resetActionTooltip:(0,s.localize)(29,null),editActionTooltip:(0,s.localize)(30,null),addButtonLabel:(0,s.localize)(31,null),keyHeaderText:(0,s.localize)(32,null),valueHeaderText:(0,s.localize)(33,null)}}}e.ObjectSettingCheckboxWidget=y}),define(ne[2197],re([1,0,118,49,20]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SmartSnippetInserter=void 0;class A{static hasOpenBrace(D){for(;D.scan()!==17;)if(D.getToken()===1)return!0;return!1}static offsetToPosition(D,I){let w=0;const v=D.getEOL().length,C=D.getLineCount();for(let o=1;o<=C;o++){const c=D.getLineContent(o).length+v,i=w+c;if(i>I)return new f.Position(o,I-w+1);w=i}return new f.Position(C,D.getLineMaxColumn(C))}static insertSnippet(D,I){const w=D.getValueLengthInRange(new _.Range(1,1,I.lineNumber,I.column));let v;(function(p){p[p.INVALID=0]="INVALID",p[p.AFTER_OBJECT=1]="AFTER_OBJECT",p[p.BEFORE_OBJECT=2]="BEFORE_OBJECT"})(v||(v={}));let C=v.INVALID,o=-1,c=v.INVALID;const i=(0,t.createScanner)(D.getValue());let S=0,s=0;const l=(p,u)=>{u!==v.INVALID&&S===1&&s===0?(C=u,o=p,c=u):C!==v.INVALID&&(C=v.INVALID,o=i.getTokenOffset())};for(;i.scan()!==17;){const p=i.getPosition(),u=i.getToken();let a=!1;switch(u){case 3:a=!0,S++,l(p,v.BEFORE_OBJECT);break;case 4:a=!0,S--,l(p,v.INVALID);break;case 5:a=!0,l(p,v.BEFORE_OBJECT);break;case 1:a=!0,s++,l(p,v.INVALID);break;case 2:a=!0,s--,l(p,v.AFTER_OBJECT);break;case 15:case 14:a=!0}if(p>=w&&(C!==v.INVALID||o!==-1)){let n,h;return C!==v.INVALID?(n=a?p:i.getTokenOffset(),h=C):(n=o,h=c),h===v.AFTER_OBJECT?{position:this.offsetToPosition(D,n),prepend:",",append:""}:(i.setPosition(n),{position:this.offsetToPosition(D,n),prepend:"",append:this.hasOpenBrace(i)?",":""})}}const r=D.getLineCount();return{position:new f.Position(r,D.getLineMaxColumn(r)),prepend:` [`,append:"]"}}}e.SmartSnippetInserter=A}),define(ne[586],re([1,0,1695,33,63]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.forwardedPortWithProcessIcon=e.forwardedPortWithoutProcessIcon=e.labelPortIcon=e.copyAddressIcon=e.openPreviewIcon=e.openBrowserIcon=e.stopForwardIcon=e.forwardPortIcon=e.privatePortIcon=e.portIcon=e.portsViewIcon=e.remoteExplorerViewIcon=e.reportIssuesIcon=e.reviewIssuesIcon=e.feedbackIcon=e.documentationIcon=e.getStartedIcon=void 0,e.getStartedIcon=(0,_.registerIcon)("remote-explorer-get-started",f.Codicon.star,t.localize(0,null)),e.documentationIcon=(0,_.registerIcon)("remote-explorer-documentation",f.Codicon.book,t.localize(1,null)),e.feedbackIcon=(0,_.registerIcon)("remote-explorer-feedback",f.Codicon.twitter,t.localize(2,null)),e.reviewIssuesIcon=(0,_.registerIcon)("remote-explorer-review-issues",f.Codicon.issues,t.localize(3,null)),e.reportIssuesIcon=(0,_.registerIcon)("remote-explorer-report-issues",f.Codicon.comment,t.localize(4,null)),e.remoteExplorerViewIcon=(0,_.registerIcon)("remote-explorer-view-icon",f.Codicon.remoteExplorer,t.localize(5,null)),e.portsViewIcon=(0,_.registerIcon)("ports-view-icon",f.Codicon.plug,t.localize(6,null)),e.portIcon=(0,_.registerIcon)("ports-view-icon",f.Codicon.plug,t.localize(7,null)),e.privatePortIcon=(0,_.registerIcon)("private-ports-view-icon",f.Codicon.lock,t.localize(8,null)),e.forwardPortIcon=(0,_.registerIcon)("ports-forward-icon",f.Codicon.plus,t.localize(9,null)),e.stopForwardIcon=(0,_.registerIcon)("ports-stop-forward-icon",f.Codicon.x,t.localize(10,null)),e.openBrowserIcon=(0,_.registerIcon)("ports-open-browser-icon",f.Codicon.globe,t.localize(11,null)),e.openPreviewIcon=(0,_.registerIcon)("ports-open-preview-icon",f.Codicon.openPreview,t.localize(12,null)),e.copyAddressIcon=(0,_.registerIcon)("ports-copy-address-icon",f.Codicon.clippy,t.localize(13,null)),e.labelPortIcon=(0,_.registerIcon)("ports-label-icon",f.Codicon.tag,t.localize(14,null)),e.forwardedPortWithoutProcessIcon=(0,_.registerIcon)("ports-forwarded-without-process-icon",f.Codicon.circleOutline,t.localize(15,null)),e.forwardedPortWithProcessIcon=(0,_.registerIcon)("ports-forwarded-with-process-icon",f.Codicon.circleFilled,t.localize(16,null))}),define(ne[2198],re([1,0,6,2]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UrlFinder=void 0;class _ extends f.Disposable{constructor(k,D){super();this._onDidMatchLocalUrl=new t.Emitter,this.onDidMatchLocalUrl=this._onDidMatchLocalUrl.event,this.listeners=new Map,this.replPositions=new Map,k.instances.forEach(I=>{this.registerTerminalInstance(I)}),this._register(k.onDidCreateInstance(I=>{this.registerTerminalInstance(I)})),this._register(k.onDidDisposeInstance(I=>{this.listeners.get(I)?.dispose(),this.listeners.delete(I)})),this._register(D.onDidNewSession(I=>{(!I.parentSession||I.parentSession&&I.hasSeparateRepl())&&this.listeners.set(I.getId(),I.onDidChangeReplElements(()=>{this.processNewReplElements(I)}))})),this._register(D.onDidEndSession(I=>{this.listeners.has(I.getId())&&(this.listeners.get(I.getId())?.dispose(),this.listeners.delete(I.getId()))}))}registerTerminalInstance(k){_.excludeTerminals.includes(k.title)||this.listeners.set(k,k.onData(D=>{this.processData(D)}))}processNewReplElements(k){const D=this.replPositions.get(k.getId()),I=k.getReplElements();if(this.replPositions.set(k.getId(),{position:I.length-1,tail:I[I.length-1]}),!D&&I.length>0)I.forEach(w=>this.processData(w.toString()));else if(D&&I.length-1!==D.position)for(let w=I.length-1;w>=0;w--){const v=I[w];if(v===D.tail)break;this.processData(v.toString())}}dispose(){super.dispose();const k=this.listeners.values();for(const D of k)D.dispose()}processData(k){k=k.replace(_.terminalCodesRegex,"");const D=k.match(_.localUrlRegex)||[];if(D&&D.length>0)D.forEach(I=>{let w;try{w=new URL(I)}catch{}if(w){const v=I.match(_.extractPortRegex),C=parseFloat(w.port?w.port:v?v[2]:"NaN");if(!isNaN(C)&&Number.isInteger(C)&&C>0&&C<=65535){let o=w.hostname;if(o!=="0.0.0.0"&&o!=="127.0.0.1"&&(o="localhost"),C!==9229&&k.startsWith("Debugger listening on"))return;this._onDidMatchLocalUrl.fire({port:C,host:o})}}});else{const I=k.match(_.localPythonServerRegex);I&&I.length===3&&this._onDidMatchLocalUrl.fire({host:I[1],port:Number(I[2])})}}}e.UrlFinder=_,_.terminalCodesRegex=/(?:\u001B|\u009B)[\[\]()#;?]*(?:(?:(?:[a-zA-Z0-9]*(?:;[a-zA-Z0-9]*)*)?\u0007)|(?:(?:\d{1,4}(?:;\d{0,4})*)?[0-9A-PR-TZcf-ntqry=><~]))/g,_.localUrlRegex=/\b\w{2,20}:\/\/(?:localhost|127\.0\.0\.1|0\.0\.0\.0|:\d{2,5})[\w\-\.\~:\/\?\#[\]\@!\$&\(\)\*\+\,\;\=]*/gim,_.extractPortRegex=/(localhost|127\.0\.0\.1|0\.0\.0\.0):(\d{1,5})/,_.localPythonServerRegex=/HTTP\son\s(127\.0\.0\.1|0\.0\.0\.0)\sport\s(\d+)/,_.excludeTerminals=["Dev Containers"]}),define(ne[2199],re([1,0,195,281,6,2,8]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SashSettingsController=e.maxSize=e.minSize=void 0,e.minSize=1,e.maxSize=20;let D=class{constructor(w){this.configurationService=w,this.disposables=new A.DisposableStore,_.Event.filter(w.onDidChangeConfiguration,o=>o.affectsConfiguration("workbench.sash.size"))(this.onDidChangeSize,this,this.disposables),this.onDidChangeSize(),_.Event.filter(w.onDidChangeConfiguration,o=>o.affectsConfiguration("workbench.sash.hoverDelay"))(this.onDidChangeHoverDelay,this,this.disposables),this.onDidChangeHoverDelay()}onDidChangeSize(){const w=this.configurationService.getValue("workbench.sash.size"),v=(0,t.clamp)(w,4,20),C=(0,t.clamp)(w,1,8);document.documentElement.style.setProperty("--sash-size",v+"px"),document.documentElement.style.setProperty("--sash-hover-size",C+"px"),(0,f.setGlobalSashSize)(v)}onDidChangeHoverDelay(){(0,f.setGlobalHoverDelay)(this.configurationService.getValue("workbench.sash.hoverDelay"))}dispose(){this.disposables.dispose()}};D=Ee([W(0,k.IConfigurationService)],D),e.SashSettingsController=D}),define(ne[587],re([1,0,2,36,73,15,134,181,10]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getActionViewItemProvider=e.StatusBarAction=e.collectContextMenuActions=e.connectPrimaryMenuToInlineActionBar=e.connectPrimaryMenu=e.isSCMResource=e.isSCMResourceGroup=e.isSCMActionButton=e.isSCMInput=e.isSCMRepository=void 0;function w(a){return!!a.provider&&!!a.input}e.isSCMRepository=w;function v(a){return!!a.validateInput&&typeof a.value=="string"}e.isSCMInput=v;function C(a){return a.type==="actionButton"}e.isSCMActionButton=C;function o(a){return!!a.provider&&!!a.elements}e.isSCMResourceGroup=o;function c(a){return!!a.sourceUri&&o(a.resourceGroup)}e.isSCMResource=c;const i=(a,n)=>a.id===n.id;function S(a,n,h){let g=t.Disposable.None,d=[],m=[];const b=()=>{const E=[],y=[],T=(0,_.createAndFillInActionBarActions)(a,{shouldForwardArgs:!0},{primary:E,secondary:y},h);if((0,A.equals)(d,E,i)&&(0,A.equals)(m,y,i)){T.dispose();return}g=T,d=E,m=y,n(E,y)};return b(),(0,t.combinedDisposable)(a.onDidChange(b),(0,t.toDisposable)(()=>g.dispose()))}e.connectPrimaryMenu=S;function s(a,n){return S(a,h=>{n.clear(),n.push(h,{icon:!0,label:!1})},"inline")}e.connectPrimaryMenuToInlineActionBar=s;function l(a){const n=[],h=[],g=(0,_.createAndFillInContextMenuActions)(a,{shouldForwardArgs:!0},{primary:n,secondary:h},"inline");return[h,g]}e.collectContextMenuActions=l;class r extends f.Action{constructor(n,h){super(`statusbaraction{${n.id}}`,n.title,"",!0);this.command=n,this.commandService=h,this.tooltip=n.tooltip||""}run(){return this.commandService.executeCommand(this.command.id,...this.command.arguments||[])}}e.StatusBarAction=r;class p extends k.ActionViewItem{constructor(n){super(null,n,{})}updateLabel(){this.options.label&&this.label&&(0,I.reset)(this.label,...(0,D.renderLabelWithIcons)(this.getAction().label))}}function u(a){return n=>n instanceof r?new p(n):(0,_.createActionViewItem)(a,n)}e.getActionViewItemProvider=u}),define(ne[215],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISCMViewService=e.SCMInputChangeReason=e.InputValidationType=e.ISCMService=e.REPOSITORIES_VIEW_PANE_ID=e.VIEW_PANE_ID=e.VIEWLET_ID=void 0,e.VIEWLET_ID="workbench.view.scm",e.VIEW_PANE_ID="workbench.scm",e.REPOSITORIES_VIEW_PANE_ID="workbench.scm.repositories",e.ISCMService=(0,t.createDecorator)("scm");var f;(function(A){A[A.Error=0]="Error",A[A.Warning=1]="Warning",A[A.Information=2]="Information"})(f=e.InputValidationType||(e.InputValidationType={}));var _;(function(A){A[A.HistoryPrevious=0]="HistoryPrevious",A[A.HistoryNext=1]="HistoryNext"})(_=e.SCMInputChangeReason||(e.SCMInputChangeReason={})),e.ISCMViewService=(0,t.createDecorator)("scmView")}),define(ne[2200],re([1,0,6,2,7,16,73,215,15,5,155,383]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SCMMenus=e.SCMRepositoryMenus=e.SCMTitleMenu=void 0;function C(s,l){return s.id===l.id}let o=class{constructor(l,r){this._actions=[],this._secondaryActions=[],this._onDidChangeTitle=new t.Emitter,this.onDidChangeTitle=this._onDidChangeTitle.event,this.listener=f.Disposable.None,this.disposables=new f.DisposableStore,this.menu=l.createMenu(A.MenuId.SCMTitle,r),this.disposables.add(this.menu),this.menu.onDidChange(this.updateTitleActions,this,this.disposables),this.updateTitleActions()}get actions(){return this._actions}get secondaryActions(){return this._secondaryActions}updateTitleActions(){const l=[],r=[],p=(0,k.createAndFillInActionBarActions)(this.menu,{shouldForwardArgs:!0},{primary:l,secondary:r});if((0,I.equals)(l,this._actions,C)&&(0,I.equals)(r,this._secondaryActions,C)){p.dispose();return}this.listener.dispose(),this.listener=p,this._actions=l,this._secondaryActions=r,this._onDidChangeTitle.fire()}dispose(){this.menu.dispose(),this.listener.dispose()}};o=Ee([W(0,A.IMenuService),W(1,_.IContextKeyService)],o),e.SCMTitleMenu=o;class c{constructor(l,r){this.contextKeyService=l,this.menuService=r}get resourceGroupMenu(){return this._resourceGroupMenu||(this._resourceGroupMenu=this.menuService.createMenu(A.MenuId.SCMResourceGroupContext,this.contextKeyService)),this._resourceGroupMenu}get resourceFolderMenu(){return this._resourceFolderMenu||(this._resourceFolderMenu=this.menuService.createMenu(A.MenuId.SCMResourceFolderContext,this.contextKeyService)),this._resourceFolderMenu}getResourceMenu(l){if(typeof l.contextValue=="undefined")return this.genericResourceMenu||(this.genericResourceMenu=this.menuService.createMenu(A.MenuId.SCMResourceContext,this.contextKeyService)),this.genericResourceMenu;this.contextualResourceMenus||(this.contextualResourceMenus=new Map);let r=this.contextualResourceMenus.get(l.contextValue);if(!r){const p=this.contextKeyService.createOverlay([["scmResourceState",l.contextValue]]),u=this.menuService.createMenu(A.MenuId.SCMResourceContext,p);r={menu:u,dispose(){u.dispose()}},this.contextualResourceMenus.set(l.contextValue,r)}return r.menu}dispose(){this._resourceGroupMenu?.dispose(),this._resourceFolderMenu?.dispose(),this.genericResourceMenu?.dispose(),this.contextualResourceMenus&&((0,f.dispose)(this.contextualResourceMenus.values()),this.contextualResourceMenus.clear(),this.contextualResourceMenus=void 0)}}let i=class{constructor(l,r,p,u){this.menuService=u,this.resourceGroups=[],this.resourceGroupMenusItems=new Map,this.disposables=new f.DisposableStore,this.contextKeyService=r.createOverlay([["scmProvider",l.contextValue],["scmProviderRootUri",l.rootUri?.toString()],["scmProviderHasRootUri",!!l.rootUri]]);const a=new v.ServiceCollection([_.IContextKeyService,this.contextKeyService]);p=p.createChild(a),this.titleMenu=p.createInstance(o),l.groups.onDidSplice(this.onDidSpliceGroups,this,this.disposables),this.onDidSpliceGroups({start:0,deleteCount:0,toInsert:l.groups.elements})}get repositoryMenu(){return this._repositoryMenu||(this._repositoryMenu=this.menuService.createMenu(A.MenuId.SCMSourceControl,this.contextKeyService),this.disposables.add(this._repositoryMenu)),this._repositoryMenu}getResourceGroupMenu(l){return this.getOrCreateResourceGroupMenusItem(l).resourceGroupMenu}getResourceMenu(l){return this.getOrCreateResourceGroupMenusItem(l.resourceGroup).getResourceMenu(l)}getResourceFolderMenu(l){return this.getOrCreateResourceGroupMenusItem(l).resourceFolderMenu}getOrCreateResourceGroupMenusItem(l){let r=this.resourceGroupMenusItems.get(l);if(!r){const p=this.contextKeyService.createOverlay([["scmResourceGroup",l.id]]);r=new c(p,this.menuService),this.resourceGroupMenusItems.set(l,r)}return r}onDidSpliceGroups({start:l,deleteCount:r,toInsert:p}){const u=this.resourceGroups.splice(l,r,...p);for(const a of u)this.resourceGroupMenusItems.get(a)?.dispose(),this.resourceGroupMenusItems.delete(a)}dispose(){this.disposables.dispose(),this.resourceGroupMenusItems.forEach(l=>l.dispose())}};i=Ee([W(1,_.IContextKeyService),W(2,w.IInstantiationService),W(3,A.IMenuService)],i),e.SCMRepositoryMenus=i;let S=class{constructor(l,r){this.instantiationService=r,this.disposables=new f.DisposableStore,this.menus=new Map,this.titleMenu=r.createInstance(o),l.onDidRemoveRepository(this.onDidRemoveRepository,this,this.disposables)}onDidRemoveRepository(l){this.menus.get(l.provider)?.dispose(),this.menus.delete(l.provider)}getRepositoryMenus(l){let r=this.menus.get(l);if(!r){const p=this.instantiationService.createInstance(i,l);r={menus:p,dispose:()=>{p.dispose(),this.menus.delete(l)}},this.menus.set(l,r)}return r.menus}dispose(){this.disposables.dispose()}};S=Ee([W(0,D.ISCMService),W(1,w.IInstantiationService)],S),e.SCMMenus=S}),define(ne[809],re([1,0,2,10,215,258,37,28,12,587,68,163,34,19,383]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RepositoryRenderer=void 0;let i=class _o{constructor(s,l,r,p,u,a){this.actionViewItemProvider=s,this.scmViewService=l,this.commandService=r,this.contextMenuService=p,this.themeService=u,this.workspaceContextService=a}get templateId(){return _o.TEMPLATE_ID}renderTemplate(s){s.classList.contains("monaco-tl-contents")&&s.parentElement.parentElement.querySelector(".monaco-tl-twistie").classList.add("force-twistie");const l=(0,f.append)(s,(0,f.$)(".scm-provider")),r=(0,f.append)(l,(0,f.$)(".label")),p=(0,f.append)(r,(0,f.$)("span.name")),u=(0,f.append)(r,(0,f.$)("span.description")),a=(0,f.append)(l,(0,f.$)(".actions")),n=new C.ToolBar(a,this.contextMenuService,{actionViewItemProvider:this.actionViewItemProvider}),h=(0,f.append)(l,(0,f.$)(".count")),g=new A.CountBadge(h),d=(0,v.attachBadgeStyler)(g,this.themeService),m=n.onDidChangeDropdownVisibility(y=>l.classList.toggle("active",y)),b=t.Disposable.None,E=(0,t.combinedDisposable)(m,n,d);return{label:r,name:p,description:u,countContainer:h,count:g,toolBar:n,disposable:b,templateDisposable:E}}renderElement(s,l,r,p){r.disposable.dispose();const u=new t.DisposableStore,a=(0,w.isSCMRepository)(s)?s:s.element;if(a.provider.rootUri){const y=this.workspaceContextService.getWorkspaceFolder(a.provider.rootUri);y?.uri.toString()===a.provider.rootUri.toString()?r.name.textContent=y.name:r.name.textContent=(0,c.basename)(a.provider.rootUri),r.label.title=`${a.provider.label}: ${a.provider.rootUri.fsPath}`,r.description.textContent=a.provider.label}else r.label.title=a.provider.label,r.name.textContent=a.provider.label,r.description.textContent="";let n=[],h=[],g=[];const d=()=>{r.toolBar.setActions([...n,...h],g)},m=()=>{n=(a.provider.statusBarCommands||[]).map(R=>new w.StatusBarAction(R,this.commandService)),d();const T=a.provider.count||0;r.countContainer.setAttribute("data-count",String(T)),r.count.setCount(T)};let b=!1;u.add((0,t.toDisposable)(()=>b=!0)),u.add(a.provider.onDidChange(()=>{b||m()})),m();const E=this.scmViewService.menus.getRepositoryMenus(a.provider);u.add((0,w.connectPrimaryMenu)(E.titleMenu.menu,(y,T)=>{h=y,g=T,d()})),r.toolBar.context=a.provider,r.disposable=u}renderCompressedElements(){throw new Error("Should never happen since node is incompressible")}disposeElement(s,l,r){r.disposable.dispose()}disposeTemplate(s){s.disposable.dispose(),s.templateDisposable.dispose()}};i.TEMPLATE_ID="repository",i=Ee([W(1,_.ISCMViewService),W(2,D.ICommandService),W(3,k.IContextMenuService),W(4,I.IThemeService),W(5,o.IWorkspaceContextService)],i),e.RepositoryRenderer=i}),define(ne[2201],re([1,0,2,6,215,92,5,2200,24,110,34,279,19,15]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SCMViewService=void 0;function i(l){return`${l.contextValue}:${l.label}${l.rootUri?`:${l.rootUri.toString()}`:""}`}function S(l,r){if(!r.provider.rootUri)return r.provider.label;const p=l.getWorkspaceFolder(r.provider.rootUri);return p?.uri.toString()===r.provider.rootUri.toString()?p.name:(0,o.basename)(r.provider.rootUri)}let s=class{constructor(r,p,u,a){this.scmService=r,this.storageService=u,this.didFinishLoading=!1,this.didSelectRepository=!1,this.disposables=new t.DisposableStore,this._repositories=[],this._onDidChangeRepositories=new f.Emitter,this.onDidChangeRepositories=this._onDidChangeRepositories.event,this._visibleRepositoriesSet=new Set,this._visibleRepositories=[],this._onDidSetVisibleRepositories=new f.Emitter,this.onDidChangeVisibleRepositories=f.Event.any(this._onDidSetVisibleRepositories.event,f.Event.debounce(this._onDidChangeRepositories.event,(n,h)=>n?{added:A.Iterable.concat(n.added,h.added),removed:A.Iterable.concat(n.removed,h.removed)}:h,0)),this._onDidFocusRepository=new f.Emitter,this.onDidFocusRepository=this._onDidFocusRepository.event,this.menus=p.createInstance(D.SCMMenus),this._compareRepositories=(n,h)=>{const g=S(a,n),d=S(a,h),m=(0,C.compareFileNames)(g,d);return m===0&&n.provider.rootUri&&h.provider.rootUri?(0,C.comparePaths)(n.provider.rootUri.fsPath,h.provider.rootUri.fsPath):m},r.onDidAddRepository(this.onDidAddRepository,this,this.disposables),r.onDidRemoveRepository(this.onDidRemoveRepository,this,this.disposables);try{this.previousState=JSON.parse(u.get("scm:view:visibleRepositories",1,""))}catch{}for(const n of r.repositories)this.onDidAddRepository(n);u.onWillSaveState(this.onWillSaveState,this,this.disposables)}get repositories(){return this._repositories}get visibleRepositories(){return this._visibleRepositories}set visibleRepositories(r){const p=new Set(r),u=new Set,a=new Set;for(const n of r)this._visibleRepositoriesSet.has(n)||u.add(n);for(const n of this._visibleRepositories)p.has(n)||a.add(n);u.size===0&&a.size===0||(this._visibleRepositories=r.sort(this._compareRepositories),this._visibleRepositoriesSet=p,this._onDidSetVisibleRepositories.fire({added:u,removed:a}),this._focusedRepository&&a.has(this._focusedRepository)&&this.focus(this._visibleRepositories[0]))}get focusedRepository(){return this._focusedRepository}onDidAddRepository(r){this.didFinishLoading||this.eventuallyFinishLoading(),this.insertRepository(this._repositories,r);let p=A.Iterable.empty();if(this.previousState){const u=this.previousState.all.indexOf(i(r.provider));if(u===-1){const a=[];for(const n of this.scmService.repositories)this._visibleRepositoriesSet.has(n)||a.push(r);this._visibleRepositoriesSet=new Set(this.scmService.repositories),this._visibleRepositories=[...this.scmService.repositories.sort(this._compareRepositories)],this._onDidChangeRepositories.fire({added:a,removed:A.Iterable.empty()}),this.finishLoading();return}if(this.previousState.visible.indexOf(u)>-1)this.didSelectRepository||(p=this._visibleRepositories,this._visibleRepositories=[],this._visibleRepositoriesSet=new Set,this.didSelectRepository=!0);else if(this.didSelectRepository){this._onDidChangeRepositories.fire({added:A.Iterable.empty(),removed:A.Iterable.empty()});return}}this._visibleRepositoriesSet.add(r),this.insertRepository(this._visibleRepositories,r),this._onDidChangeRepositories.fire({added:[r],removed:p}),this._focusedRepository||this.focus(r)}onDidRemoveRepository(r){this.didFinishLoading||this.eventuallyFinishLoading();let p=A.Iterable.empty();const u=this._repositories.indexOf(r),a=this._visibleRepositories.indexOf(r);if(u>-1&&this._repositories.splice(u,1),a>-1&&(this._visibleRepositories.splice(a,1),this._visibleRepositoriesSet.delete(r),this._repositories.length>0&&this._visibleRepositories.length===0)){const n=this._repositories[0];this._visibleRepositories.push(n),this._visibleRepositoriesSet.add(n),p=[n]}(u>-1||a>-1)&&this._onDidChangeRepositories.fire({added:p,removed:[r]}),this._focusedRepository===r&&this.focus(this._visibleRepositories[0])}isVisible(r){return this._visibleRepositoriesSet.has(r)}toggleVisibility(r,p){if(typeof p=="undefined")p=!this.isVisible(r);else if(this.isVisible(r)===p)return;if(p)this.visibleRepositories=[...this.visibleRepositories,r];else{const u=this.visibleRepositories.indexOf(r);u>-1&&(this.visibleRepositories=[...this.visibleRepositories.slice(0,u),...this.visibleRepositories.slice(u+1)])}}focus(r){r&&!this.visibleRepositories.includes(r)||(this._focusedRepository=r,this._onDidFocusRepository.fire(r))}insertRepository(r,p){const u=(0,c.binarySearch)(r,p,this._compareRepositories);r.splice(u<0?~u:u,0,p)}onWillSaveState(){if(!this.didFinishLoading)return;const r=this.repositories.map(a=>i(a.provider)),p=this.visibleRepositories.map(a=>r.indexOf(i(a.provider))),u=JSON.stringify({all:r,visible:p});this.storageService.store("scm:view:visibleRepositories",u,1,1)}eventuallyFinishLoading(){this.finishLoading()}finishLoading(){this.didFinishLoading||(this.didFinishLoading=!0,this.previousState=void 0)}dispose(){this.disposables.dispose(),this._onDidChangeRepositories.dispose(),this._onDidSetVisibleRepositories.dispose()}};Ee([(0,w.debounce)(5e3)],s.prototype,"eventuallyFinishLoading",null),s=Ee([W(0,_.ISCMService),W(1,k.IInstantiationService),W(2,I.IStorageService),W(3,v.IWorkspaceContextService)],s),e.SCMViewService=s}),define(ne[2202],re([1,0,2,6,215,31,7,24,379,92]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SCMService=void 0;let v=class xn{constructor(i,S){this.repository=i,this.storageService=S,this._value="",this._onDidChange=new f.Emitter,this.onDidChange=this._onDidChange.event,this._placeholder="",this._onDidChangePlaceholder=new f.Emitter,this.onDidChangePlaceholder=this._onDidChangePlaceholder.event,this._visible=!0,this._onDidChangeVisibility=new f.Emitter,this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._onDidChangeFocus=new f.Emitter,this.onDidChangeFocus=this._onDidChangeFocus.event,this._onDidChangeValidationMessage=new f.Emitter,this.onDidChangeValidationMessage=this._onDidChangeValidationMessage.event,this._validateInput=()=>Promise.resolve(void 0),this._onDidChangeValidateInput=new f.Emitter,this.onDidChangeValidateInput=this._onDidChangeValidateInput.event,xn.migrateAndGarbageCollectStorage(S);const s=this.repository.provider.rootUri?`scm/input:${this.repository.provider.label}:${this.repository.provider.rootUri?.path}`:void 0;let l;if(s)try{l=JSON.parse(this.storageService.get(s,0,"")).history,l=l?.map(r=>r??"")}catch{}!Array.isArray(l)||l.length===0?l=[this._value]:this._value=l[l.length-1],this.historyNavigator=new I.HistoryNavigator2(l,50),this.didChangeHistory=!1,s&&this.storageService.onWillSaveState(r=>{if(this.historyNavigator.isAtEnd()&&this.saveValue(),!this.didChangeHistory)return;const p=[...this.historyNavigator].map(u=>u??"");p.length===0||p.length===1&&p[0]===""||(S.store(s,JSON.stringify({timestamp:new Date().getTime(),history:p}),0,1),this.didChangeHistory=!1)})}get value(){return this._value}get placeholder(){return this._placeholder}set placeholder(i){this._placeholder=i,this._onDidChangePlaceholder.fire(i)}get visible(){return this._visible}set visible(i){this._visible=i,this._onDidChangeVisibility.fire(i)}setFocus(){this._onDidChangeFocus.fire()}showValidationMessage(i,S){this._onDidChangeValidationMessage.fire({message:i,type:S})}get validateInput(){return this._validateInput}set validateInput(i){this._validateInput=i,this._onDidChangeValidateInput.fire()}static migrateAndGarbageCollectStorage(i){if(xn.didGarbageCollect)return;const S=w.Iterable.filter(w.Iterable.from(i.keys(0,0)),l=>l.startsWith("scm/input:"));for(const l of S)try{const r=i.get(l,0,""),p=JSON.parse(r);Array.isArray(p)?p.length===0||p.length===1&&p[0]===""?i.remove(l,0):i.store(l,JSON.stringify({timestamp:new Date().getTime(),history:p}),0,1):i.store(l,r,0,1)}catch{i.remove(l,0)}const s=w.Iterable.filter(w.Iterable.from(i.keys(0,1)),l=>l.startsWith("scm/input:"));for(const l of s)try{const r=JSON.parse(i.get(l,0,""));Array.isArray(r?.history)&&Number.isInteger(r?.timestamp)&&new Date().getTime()-r?.timestamp>2592e6&&i.remove(l,0)}catch{i.remove(l,0)}xn.didGarbageCollect=!0}setValue(i,S,s){i!==this._value&&(S||(this.saveValue(),this.historyNavigator.add(i),this.didChangeHistory=!0),this._value=i,this._onDidChange.fire({value:i,reason:s}))}showNextHistoryValue(){if(this.historyNavigator.isAtEnd())return;this.historyNavigator.has(this.value)||(this.saveValue(),this.historyNavigator.resetCursor());const i=this.historyNavigator.next();this.setValue(i,!0,_.SCMInputChangeReason.HistoryNext)}showPreviousHistoryValue(){this.historyNavigator.isAtEnd()?this.saveValue():this.historyNavigator.has(this._value)||(this.saveValue(),this.historyNavigator.resetCursor());const i=this.historyNavigator.previous();this.setValue(i,!0,_.SCMInputChangeReason.HistoryPrevious)}saveValue(){const i=this.historyNavigator.replaceLast(this._value);this.didChangeHistory=this.didChangeHistory||i!==this._value}};v.didGarbageCollect=!1,v=Ee([W(1,D.IStorageService)],v);let C=class{constructor(i,S,s){this.provider=i,this.disposable=S,this.storageService=s,this._selected=!1,this._onDidChangeSelection=new f.Emitter,this.onDidChangeSelection=this._onDidChangeSelection.event,this.input=new v(this,this.storageService)}get selected(){return this._selected}setSelected(i){this._selected!==i&&(this._selected=i,this._onDidChangeSelection.fire(i))}dispose(){this.disposable.dispose(),this.provider.dispose()}};C=Ee([W(2,D.IStorageService)],C);let o=class{constructor(i,S,s){this.logService=i,this.storageService=s,this._providerIds=new Set,this._repositories=[],this._onDidAddProvider=new f.Emitter,this.onDidAddRepository=this._onDidAddProvider.event,this._onDidRemoveProvider=new f.Emitter,this.onDidRemoveRepository=this._onDidRemoveProvider.event,this.providerCount=S.createKey("scm.providerCount",0)}get repositories(){return[...this._repositories]}registerSCMProvider(i){if(this.logService.trace("SCMService#registerSCMProvider"),this._providerIds.has(i.id))throw new Error(`SCM Provider ${i.id} already exists.`);this._providerIds.add(i.id);const S=(0,t.toDisposable)(()=>{const l=this._repositories.indexOf(s);l<0||(this._providerIds.delete(i.id),this._repositories.splice(l,1),this._onDidRemoveProvider.fire(s),this.providerCount.set(this._repositories.length))}),s=new C(i,S,this.storageService);return this._repositories.push(s),this._onDidAddProvider.fire(s),this.providerCount.set(this._repositories.length),s}};o=Ee([W(0,A.ILogService),W(1,k.IContextKeyService),W(2,D.IStorageService)],o),e.SCMService=o}),define(ne[810],re([1,0,10,244,138,33,6,1709,236,348,8,7,38,68,12]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExcludePatternInputWidget=e.IncludePatternInputWidget=e.PatternInputWidget=void 0;let S=class extends _.Widget{constructor(p,u,a=Object.create(null),n,h,g,d){super();this.contextViewProvider=u,this.themeService=n,this.contextKeyService=h,this.configurationService=g,this.keybindingService=d,this._onSubmit=this._register(new k.Emitter),this.onSubmit=this._onSubmit.event,this._onCancel=this._register(new k.Emitter),this.onCancel=this._onCancel.event,a={ariaLabel:D.localize(0,null),...a},this.width=a.width??100,this.render(a),p.appendChild(this.domNode)}dispose(){super.dispose(),this.inputFocusTracker&&this.inputFocusTracker.dispose()}setWidth(p){this.width=p,this.domNode.style.width=this.width+"px",this.contextViewProvider.layout(),this.setInputWidth()}getValue(){return this.inputBox.value}setValue(p){this.inputBox.value!==p&&(this.inputBox.value=p)}select(){this.inputBox.select()}focus(){this.inputBox.focus()}inputHasFocus(){return this.inputBox.hasFocus()}setInputWidth(){this.inputBox.width=this.width-this.getSubcontrolsWidth()-2}getSubcontrolsWidth(){return 0}getHistory(){return this.inputBox.getHistory()}clearHistory(){this.inputBox.clearHistory()}clear(){this.setValue("")}onSearchSubmit(){this.inputBox.addToHistory()}showNextTerm(){this.inputBox.showNextValue()}showPreviousTerm(){this.inputBox.showPreviousValue()}style(p){this.inputBox.style(p)}render(p){this.domNode=document.createElement("div"),this.domNode.style.width=this.width+"px",this.domNode.classList.add("monaco-findInput"),this.inputBox=new I.ContextScopedHistoryInputBox(this.domNode,this.contextViewProvider,{placeholder:p.placeholder,showPlaceholderOnFocus:p.showPlaceholderOnFocus,tooltip:p.tooltip,ariaLabel:p.ariaLabel,validationOptions:{validation:void 0},history:p.history||[],showHistoryHint:()=>(0,w.showHistoryKeybindingHint)(this.keybindingService)},this.contextKeyService),this._register((0,c.attachInputBoxStyler)(this.inputBox,this.themeService)),this._register(this.inputBox.onDidChange(()=>this._onSubmit.fire(!0))),this.inputFocusTracker=t.trackFocus(this.inputBox.inputElement),this.onkeyup(this.inputBox.inputElement,a=>this.onInputKeyUp(a));const u=document.createElement("div");u.className="controls",this.renderSubcontrols(u),this.domNode.appendChild(u),this.setInputWidth()}renderSubcontrols(p){}onInputKeyUp(p){switch(p.keyCode){case 3:this.onSearchSubmit(),this._onSubmit.fire(!1);return;case 9:this._onCancel.fire();return}}};S.OPTION_CHANGE="optionChange",S=Ee([W(3,i.IThemeService),W(4,C.IContextKeyService),W(5,v.IConfigurationService),W(6,o.IKeybindingService)],S),e.PatternInputWidget=S;let s=class extends S{constructor(p,u,a=Object.create(null),n,h,g,d){super(p,u,a,n,h,g,d);this._onChangeSearchInEditorsBoxEmitter=this._register(new k.Emitter),this.onChangeSearchInEditorsBox=this._onChangeSearchInEditorsBoxEmitter.event}dispose(){super.dispose(),this.useSearchInEditorsBox.dispose()}onlySearchInOpenEditors(){return this.useSearchInEditorsBox.checked}setOnlySearchInOpenEditors(p){this.useSearchInEditorsBox.checked=p,this._onChangeSearchInEditorsBoxEmitter.fire()}getSubcontrolsWidth(){return super.getSubcontrolsWidth()+this.useSearchInEditorsBox.width()}renderSubcontrols(p){this.useSearchInEditorsBox=this._register(new f.Toggle({icon:A.Codicon.book,title:D.localize(1,null),isChecked:!1})),this._register(this.useSearchInEditorsBox.onChange(u=>{this._onChangeSearchInEditorsBoxEmitter.fire(),u||this.inputBox.focus()})),this._register((0,c.attachToggleStyler)(this.useSearchInEditorsBox,this.themeService)),p.appendChild(this.useSearchInEditorsBox.domNode),super.renderSubcontrols(p)}};s=Ee([W(3,i.IThemeService),W(4,C.IContextKeyService),W(5,v.IConfigurationService),W(6,o.IKeybindingService)],s),e.IncludePatternInputWidget=s;let l=class extends S{constructor(p,u,a=Object.create(null),n,h,g,d){super(p,u,a,n,h,g,d);this._onChangeIgnoreBoxEmitter=this._register(new k.Emitter),this.onChangeIgnoreBox=this._onChangeIgnoreBoxEmitter.event}dispose(){super.dispose(),this.useExcludesAndIgnoreFilesBox.dispose()}useExcludesAndIgnoreFiles(){return this.useExcludesAndIgnoreFilesBox.checked}setUseExcludesAndIgnoreFiles(p){this.useExcludesAndIgnoreFilesBox.checked=p,this._onChangeIgnoreBoxEmitter.fire()}getSubcontrolsWidth(){return super.getSubcontrolsWidth()+this.useExcludesAndIgnoreFilesBox.width()}renderSubcontrols(p){this.useExcludesAndIgnoreFilesBox=this._register(new f.Toggle({icon:A.Codicon.exclude,actionClassName:"useExcludesAndIgnoreFiles",title:D.localize(2,null),isChecked:!0})),this._register(this.useExcludesAndIgnoreFilesBox.onChange(u=>{this._onChangeIgnoreBoxEmitter.fire(),u||this.inputBox.focus()})),this._register((0,c.attachToggleStyler)(this.useExcludesAndIgnoreFilesBox,this.themeService)),p.appendChild(this.useExcludesAndIgnoreFilesBox.domNode),super.renderSubcontrols(p)}};l=Ee([W(3,i.IThemeService),W(4,C.IContextKeyService),W(5,v.IConfigurationService),W(6,o.IKeybindingService)],l),e.ExcludePatternInputWidget=l}),define(ne[360],re([1,0,33,1713,63]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.searchNewEditorIcon=e.searchViewIcon=e.searchStopIcon=e.searchClearIcon=e.searchExpandAllIcon=e.searchCollapseAllIcon=e.searchRefreshIcon=e.searchRemoveIcon=e.searchReplaceIcon=e.searchReplaceAllIcon=e.searchShowReplaceIcon=e.searchHideReplaceIcon=e.searchShowContextIcon=e.searchDetailsIcon=void 0,e.searchDetailsIcon=(0,_.registerIcon)("search-details",t.Codicon.ellipsis,(0,f.localize)(0,null)),e.searchShowContextIcon=(0,_.registerIcon)("search-show-context",t.Codicon.listSelection,(0,f.localize)(1,null)),e.searchHideReplaceIcon=(0,_.registerIcon)("search-hide-replace",t.Codicon.chevronRight,(0,f.localize)(2,null)),e.searchShowReplaceIcon=(0,_.registerIcon)("search-show-replace",t.Codicon.chevronDown,(0,f.localize)(3,null)),e.searchReplaceAllIcon=(0,_.registerIcon)("search-replace-all",t.Codicon.replaceAll,(0,f.localize)(4,null)),e.searchReplaceIcon=(0,_.registerIcon)("search-replace",t.Codicon.replace,(0,f.localize)(5,null)),e.searchRemoveIcon=(0,_.registerIcon)("search-remove",t.Codicon.close,(0,f.localize)(6,null)),e.searchRefreshIcon=(0,_.registerIcon)("search-refresh",t.Codicon.refresh,(0,f.localize)(7,null)),e.searchCollapseAllIcon=(0,_.registerIcon)("search-collapse-results",t.Codicon.collapseAll,(0,f.localize)(8,null)),e.searchExpandAllIcon=(0,_.registerIcon)("search-expand-results",t.Codicon.expandAll,(0,f.localize)(9,null)),e.searchClearIcon=(0,_.registerIcon)("search-clear-results",t.Codicon.clearAll,(0,f.localize)(10,null)),e.searchStopIcon=(0,_.registerIcon)("search-stop",t.Codicon.searchStop,(0,f.localize)(11,null)),e.searchViewIcon=(0,_.registerIcon)("search-view-icon",t.Codicon.search,(0,f.localize)(12,null)),e.searchNewEditorIcon=(0,_.registerIcon)("search-new-editor",t.Codicon.newFile,(0,f.localize)(13,null))}),define(ne[2203],re([1,0,338,51]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileQueryCacheState=void 0;var _;(function(k){k[k.Created=1]="Created",k[k.Loading=2]="Loading",k[k.Loaded=3]="Loaded",k[k.Errored=4]="Errored",k[k.Disposed=5]="Disposed"})(_||(_={}));class A{constructor(D,I,w,v){if(this.cacheQuery=D,this.loadFn=I,this.disposeFn=w,this.previousCacheState=v,this._cacheKey=t.defaultGenerator.nextId(),this.query=this.cacheQuery(this._cacheKey),this.loadingPhase=_.Created,this.previousCacheState){const C=Object.assign({},this.query,{cacheKey:null}),o=Object.assign({},this.previousCacheState.query,{cacheKey:null});(0,f.equals)(C,o)||(this.previousCacheState.dispose(),this.previousCacheState=void 0)}}get cacheKey(){return this.loadingPhase===_.Loaded||!this.previousCacheState?this._cacheKey:this.previousCacheState.cacheKey}get isLoaded(){const D=this.loadingPhase===_.Loaded;return D||!this.previousCacheState?D:this.previousCacheState.isLoaded}get isUpdating(){const D=this.loadingPhase===_.Loading;return D||!this.previousCacheState?D:this.previousCacheState.isUpdating}load(){return this.isUpdating?this:(this.loadingPhase=_.Loading,this.loadPromise=(async()=>{try{await this.loadFn(this.query),this.loadingPhase=_.Loaded,this.previousCacheState&&(this.previousCacheState.dispose(),this.previousCacheState=void 0)}catch(D){throw this.loadingPhase=_.Errored,D}})(),this)}dispose(){this.loadPromise?(async()=>{try{await this.loadPromise}catch{}this.loadingPhase=_.Disposed,this.disposeFn(this._cacheKey)})():this.loadingPhase=_.Disposed,this.previousCacheState&&(this.previousCacheState.dispose(),this.previousCacheState=void 0)}}e.FileQueryCacheState=A}),define(ne[323],re([1,0,7]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewHasSomeCollapsibleKey=e.ViewHasFilePatternKey=e.ViewHasReplacePatternKey=e.ViewHasSearchPatternKey=e.MatchFocusKey=e.FolderFocusKey=e.FileFocusKey=e.FileMatchOrFolderMatchWithResourceFocusKey=e.FileMatchOrFolderMatchFocusKey=e.FileMatchOrMatchFocusKey=e.FirstMatchFocusKey=e.HasSearchResults=e.ReplaceActiveKey=e.PatternExcludesFocusedKey=e.PatternIncludesFocusedKey=e.ReplaceInputBoxFocusedKey=e.SearchInputBoxFocusedKey=e.InputBoxFocusedKey=e.SearchViewFocusedKey=e.SearchViewVisibleKey=e.RevealInSideBarForSearchResults=e.AddCursorsAtSearchResults=e.TogglePreserveCaseId=e.ToggleRegexCommandId=e.ToggleWholeWordCommandId=e.ToggleCaseSensitiveCommandId=e.CloseReplaceWidgetActionId=e.ReplaceAllInFolderActionId=e.ReplaceAllInFileActionId=e.ReplaceActionId=e.FocusSearchListCommandID=e.ClearSearchHistoryCommandId=e.OpenInEditorCommandId=e.CopyAllCommandId=e.CopyMatchCommandId=e.CopyPathCommandId=e.RemoveActionId=e.OpenMatchToSide=e.OpenMatch=e.FocusSearchFromResults=e.FocusActiveEditorCommandId=e.FindInFilesActionId=void 0,e.FindInFilesActionId="workbench.action.findInFiles",e.FocusActiveEditorCommandId="search.action.focusActiveEditor",e.FocusSearchFromResults="search.action.focusSearchFromResults",e.OpenMatch="search.action.openResult",e.OpenMatchToSide="search.action.openResultToSide",e.RemoveActionId="search.action.remove",e.CopyPathCommandId="search.action.copyPath",e.CopyMatchCommandId="search.action.copyMatch",e.CopyAllCommandId="search.action.copyAll",e.OpenInEditorCommandId="search.action.openInEditor",e.ClearSearchHistoryCommandId="search.action.clearHistory",e.FocusSearchListCommandID="search.action.focusSearchList",e.ReplaceActionId="search.action.replace",e.ReplaceAllInFileActionId="search.action.replaceAllInFile",e.ReplaceAllInFolderActionId="search.action.replaceAllInFolder",e.CloseReplaceWidgetActionId="closeReplaceInFilesWidget",e.ToggleCaseSensitiveCommandId="toggleSearchCaseSensitive",e.ToggleWholeWordCommandId="toggleSearchWholeWord",e.ToggleRegexCommandId="toggleSearchRegex",e.TogglePreserveCaseId="toggleSearchPreserveCase",e.AddCursorsAtSearchResults="addCursorsAtSearchResults",e.RevealInSideBarForSearchResults="search.action.revealInSideBar",e.SearchViewVisibleKey=new t.RawContextKey("searchViewletVisible",!0),e.SearchViewFocusedKey=new t.RawContextKey("searchViewletFocus",!1),e.InputBoxFocusedKey=new t.RawContextKey("inputBoxFocus",!1),e.SearchInputBoxFocusedKey=new t.RawContextKey("searchInputBoxFocus",!1),e.ReplaceInputBoxFocusedKey=new t.RawContextKey("replaceInputBoxFocus",!1),e.PatternIncludesFocusedKey=new t.RawContextKey("patternIncludesInputBoxFocus",!1),e.PatternExcludesFocusedKey=new t.RawContextKey("patternExcludesInputBoxFocus",!1),e.ReplaceActiveKey=new t.RawContextKey("replaceActive",!1),e.HasSearchResults=new t.RawContextKey("hasSearchResult",!1),e.FirstMatchFocusKey=new t.RawContextKey("firstMatchFocus",!1),e.FileMatchOrMatchFocusKey=new t.RawContextKey("fileMatchOrMatchFocus",!1),e.FileMatchOrFolderMatchFocusKey=new t.RawContextKey("fileMatchOrFolderMatchFocus",!1),e.FileMatchOrFolderMatchWithResourceFocusKey=new t.RawContextKey("fileMatchOrFolderMatchWithResourceFocus",!1),e.FileFocusKey=new t.RawContextKey("fileMatchFocus",!1),e.FolderFocusKey=new t.RawContextKey("folderMatchFocus",!1),e.MatchFocusKey=new t.RawContextKey("matchFocus",!1),e.ViewHasSearchPatternKey=new t.RawContextKey("viewHasSearchPattern",!1),e.ViewHasReplacePatternKey=new t.RawContextKey("viewHasReplacePattern",!1),e.ViewHasFilePatternKey=new t.RawContextKey("viewHasFilePattern",!1),e.ViewHasSomeCollapsibleKey=new t.RawContextKey("viewHasSomeCollapsibleResult",!1)}),define(ne[417],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IReplaceService=void 0,e.IReplaceService=(0,t.createDecorator)("replaceService")}),define(ne[588],re([1,0,6,24,13,5]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SearchHistoryService=e.ISearchHistoryService=void 0,e.ISearchHistoryService=(0,A.createDecorator)("searchHistoryService");let k=class cn{constructor(I){this.storageService=I,this._onDidClearHistory=new t.Emitter,this.onDidClearHistory=this._onDidClearHistory.event}clearHistory(){this.storageService.remove(cn.SEARCH_HISTORY_KEY,1),this._onDidClearHistory.fire()}load(){let I;const w=this.storageService.get(cn.SEARCH_HISTORY_KEY,1);if(w)try{I=JSON.parse(w)}catch{}return I||{}}save(I){(0,_.isEmptyObject)(I)?this.storageService.remove(cn.SEARCH_HISTORY_KEY,1):this.storageService.store(cn.SEARCH_HISTORY_KEY,JSON.stringify(I),1,0)}};k.SEARCH_HISTORY_KEY="workbench.search.history",k=Ee([W(0,f.IStorageService)],k),e.SearchHistoryService=k}),define(ne[324],re([1,0,7]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SearchEditorInputTypeId=e.ToggleSearchEditorContextLinesCommandId=e.OpenEditorCommandId=e.OpenNewEditorCommandId=e.SearchEditorID=e.SearchEditorFindMatchClass=e.SearchEditorWorkingCopyTypeId=e.SearchEditorScheme=e.InSearchEditor=void 0,e.InSearchEditor=new t.RawContextKey("inSearchEditor",!1),e.SearchEditorScheme="search-editor",e.SearchEditorWorkingCopyTypeId="search/editor",e.SearchEditorFindMatchClass="searchEditorFindMatch",e.SearchEditorID="workbench.editor.searchEditor",e.OpenNewEditorCommandId="search.action.openNewEditor",e.OpenEditorCommandId="search.action.openEditor",e.ToggleSearchEditorContextLinesCommandId="toggleSearchEditorContextLines",e.SearchEditorInputTypeId="workbench.editorinputs.searchEditorInput"}),define(ne[291],re([1,0,17,146,1727,5]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISnippetsService=void 0,e.ISnippetsService=(0,A.createDecorator)("snippetService");const k="vscode://schemas/snippets",D={prefix:{description:_.localize(0,null),type:["string","array"]},body:{markdownDescription:_.localize(1,null),type:["string","array"],items:{type:"string"}},description:{description:_.localize(2,null),type:["string","array"]}},I={id:k,allowComments:!0,allowTrailingCommas:!0,defaultSnippets:[{label:_.localize(3,null),body:{"${1:snippetName}":{prefix:"${2:prefix}",body:"${3:snippet}",description:"${4:description}"}}}],type:"object",description:_.localize(4,null),additionalProperties:{type:"object",required:["body"],properties:D,additionalProperties:!1}},w="vscode://schemas/global-snippets",v={id:w,allowComments:!0,allowTrailingCommas:!0,defaultSnippets:[{label:_.localize(5,null),body:{"${1:snippetName}":{scope:"${2:scope}",prefix:"${3:prefix}",body:"${4:snippet}",description:"${5:description}"}}}],type:"object",description:_.localize(6,null),additionalProperties:{type:"object",required:["body"],properties:{...D,scope:{description:_.localize(7,null),type:"string"}},additionalProperties:!1}},C=t.Registry.as(f.Extensions.JSONContribution);C.registerSchema(k,I),C.registerSchema(w,v)}),define(ne[811],re([1,0,117,29,20,42,261,1725,291,102,151,124,283]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetCompletionProvider=e.SnippetCompletion=void 0;class c{constructor(s,l){this.snippet=s,this.label={label:s.prefix,description:s.name},this.detail=(0,D.localize)(0,null,s.description||s.name,s.source),this.insertText=s.codeSnippet,this.range=l,this.sortText=`${s.snippetSource===3?"z":"a"}-${s.prefix}`,this.kind=27,this.insertTextRules=4}resolve(){return this.documentation=new t.MarkdownString().appendCodeblock("",new k.SnippetParser().text(this.snippet.codeSnippet)),this}static compareByLabel(s,l){return(0,f.compare)(s.label.label,l.label.label)}}e.SnippetCompletion=c;let i=class{constructor(s,l,r){this._languageService=s,this._snippets=l,this._languageConfigurationService=r,this._debugDisplayName="snippetCompletions"}async provideCompletionItems(s,l,r){const p=new v.StopWatch(!0),u=this._getLanguageIdAtPosition(s,l),a=this._languageConfigurationService.getLanguageConfiguration(u),n=new Set(await this._snippets.getSnippets(u)),h=s.getLineContent(l.lineNumber).toLowerCase(),g=s.getWordUntilPosition(l).word.toLowerCase(),d=[],m=l.column-1,b=r.triggerCharacter?.toLowerCase()??"";e:for(const E of n){if(r.triggerKind===1&&!E.prefixLow.startsWith(b))continue e;const y=(0,o.getWordAtText)(1,a.getWordDefinition(),E.prefixLow,0);if(g&&y&&!(0,w.isPatternInWord)(g,0,g.length,E.prefixLow,0,E.prefixLow.length))continue e;t:for(let T=Math.max(0,m-E.prefixLow.length);T<h.length;T++){if(!(0,w.isPatternInWord)(h,T,m,E.prefixLow,0,E.prefixLow.length))continue t;const R=E.prefixLow.length-(m-T),O=(0,f.compareSubstring)(h,E.prefixLow,m,m+R,m-T),x=l.with(void 0,T+1);if(g&&l.equals(x))continue e;let F=O===0?l.column+R:l.column;m<h.length&&a.getAutoClosingPairs().autoClosingPairsCloseSingleChar.get(h[m])?.some(P=>P.open===h[x.column-1]&&E.prefix.startsWith(P.open)&&E.prefix[E.prefix.length-1]===P.close)&&F++;const L=_.Range.fromPositions(x,{lineNumber:l.lineNumber,column:F}),M=L.setEndPosition(l.lineNumber,l.column);d.push(new c(E,{replace:L,insert:M})),n.delete(E);break}}if(!b&&(/\s/.test(h[l.column-2])||!h))for(let y of n){const T=_.Range.fromPositions(l),R=h.indexOf(y.prefixLow,m)===m?T.setEndPosition(l.lineNumber,l.column+y.prefixLow.length):T;d.push(new c(y,{replace:R,insert:T}))}d.sort(c.compareByLabel);for(let E=0;E<d.length;E++){let y=d[E],T=E+1;for(;T<d.length&&y.label===d[T].label;T++)d[T].label.label=(0,D.localize)(1,null,d[T].label.label,d[T].snippet.name);T>E+1&&(d[E].label.label=(0,D.localize)(2,null,d[E].label.label,d[E].snippet.name),E=T)}return{suggestions:d,duration:p.elapsed()}}resolveCompletionItem(s){return s instanceof c?s.resolve():s}_getLanguageIdAtPosition(s,l){s.tokenizeIfCheap(l.lineNumber);let r=s.getLanguageIdAtPosition(l.lineNumber,l.column);return this._languageService.getLanguageName(r)||(r=s.getLanguageId()),r}};i=Ee([W(0,A.ILanguageService),W(1,I.ISnippetsService),W(2,C.ILanguageConfigurationService)],i),e.SnippetCompletionProvider=i}),define(ne[589],re([1,0,118,143,1728,48,261,771,29,11,19,13,92,15]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetFile=e.SnippetSource=e.Snippet=void 0;class i{constructor(u){this.isBogous=!1,this.isTrivial=!1,this.usesClipboardVariable=!1,this.usesSelectionVariable=!1,this.codeSnippet=u;const a=new k.SnippetParser().parse(u,!1);let n=new Map,h=0;for(const d of a.placeholders)h=Math.max(h,d.index);if(a.placeholders.length===0)this.isTrivial=!0;else if(h===0){const d=(0,c.tail)(a.children);this.isTrivial=d instanceof k.Placeholder&&d.isFinalTabstop}let g=[...a.children];for(;g.length>0;){const d=g.shift();if(d instanceof k.Variable){if(d.children.length===0&&!D.KnownSnippetVariableNames[d.name]){const m=n.has(d.name)?n.get(d.name):++h;n.set(d.name,m);const b=new k.Placeholder(m).appendChild(new k.Text(d.name));a.replace(d,[b]),this.isBogous=!0}switch(d.name){case"CLIPBOARD":this.usesClipboardVariable=!0;break;case"SELECTION":case"TM_SELECTED_TEXT":this.usesSelectionVariable=!0;break}}else g.push(...d.children)}this.isBogous&&(this.codeSnippet=a.toTextmateString())}}class S{constructor(u,a,n,h,g,d,m,b){this.scopes=u,this.name=a,this.prefix=n,this.description=h,this.body=g,this.source=d,this.snippetSource=m,this.snippetIdentifier=b,this.prefixLow=n.toLowerCase(),this._bodyInsights=new w.IdleValue(()=>new i(this.body))}get codeSnippet(){return this._bodyInsights.value.codeSnippet}get isBogous(){return this._bodyInsights.value.isBogous}get isTrivial(){return this._bodyInsights.value.isTrivial}get needsClipboard(){return this._bodyInsights.value.usesClipboardVariable}get usesSelection(){return this._bodyInsights.value.usesSelectionVariable}static compare(u,a){return u.snippetSource<a.snippetSource?-1:u.snippetSource>a.snippetSource?1:u.source<a.source?-1:u.source>a.source||u.name>a.name?1:u.name<a.name?-1:0}}e.Snippet=S;function s(p){return(0,C.isObject)(p)&&Boolean(p.body)}var l;(function(p){p[p.User=1]="User",p[p.Workspace=2]="Workspace",p[p.Extension=3]="Extension"})(l=e.SnippetSource||(e.SnippetSource={}));class r{constructor(u,a,n,h,g,d){this.source=u,this.location=a,this.defaultScopes=n,this._extension=h,this._fileService=g,this._extensionResourceLoaderService=d,this.data=[],this.isGlobalSnippets=(0,A.extname)(a.path)===".code-snippets",this.isUserSnippets=!this._extension}select(u,a){this.isGlobalSnippets||!this.isUserSnippets?this._scopeSelect(u,a):this._filepathSelect(u,a)}_filepathSelect(u,a){u+".json"===(0,A.basename)(this.location.path)&&a.push(...this.data)}_scopeSelect(u,a){for(const h of this.data){const g=h.scopes.length;if(g===0)a.push(h);else for(let d=0;d<g;d++)if(h.scopes[d]===u){a.push(h);break}}let n=u.lastIndexOf(".");n>=0&&this._scopeSelect(u.substring(0,n),a)}async _load(){return this._extension?this._extensionResourceLoaderService.readExtensionResource(this.location):(await this._fileService.readFile(this.location)).value.toString()}load(){return this._loadPromise||(this._loadPromise=Promise.resolve(this._load()).then(u=>{const a=(0,t.parse)(u);return(0,t.getNodeType)(a)==="object"&&(0,f.forEach)(a,n=>{const{key:h,value:g}=n;s(g)?this._parseSnippet(h,g,this.data):(0,f.forEach)(g,d=>{const{key:m,value:b}=d;this._parseSnippet(m,b,this.data)})}),this})),this._loadPromise}reset(){this._loadPromise=void 0,this.data.length=0}_parseSnippet(u,a,n){let{prefix:h,body:g,description:d}=a;if(h||(h=""),Array.isArray(g)&&(g=g.join(` `)),typeof g!="string")return;Array.isArray(d)&&(d=d.join(` `));let m;this.defaultScopes?m=this.defaultScopes:typeof a.scope=="string"?m=a.scope.split(",").map(E=>E.trim()).filter(E=>!(0,I.isFalsyOrWhitespace)(E)):m=[];let b;this._extension?b=this._extension.displayName||this._extension.name:this.source===2?b=(0,_.localize)(0,null):this.isGlobalSnippets?b=(0,_.localize)(1,null):b=(0,_.localize)(2,null);for(const E of Array.isArray(h)?h:o.Iterable.single(h))n.push(new S(m,u,E,d,g,b,this.source,this._extension&&`${(0,v.relativePath)(this._extension.extensionLocation,this.location)}/${u}`))}}e.SnippetFile=r}),define(ne[812],re([1,0,1726,291,589,53,33,6]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pickSnippet=void 0;async function I(w,v){const C=w.get(f.ISnippetsService),o=w.get(A.IQuickInputService);let c;Array.isArray(v)?c=v:c=await C.getSnippets(v,{includeDisabledSnippets:!0,includeNoPrefixSnippets:!0}),c.sort(_.Snippet.compare);const i=()=>{const l=[];let r;for(const p of c){const u={label:p.prefix||p.name,detail:p.description,snippet:p};if(!r||r.snippetSource!==p.snippetSource||r.source!==p.source){let a="";switch(p.snippetSource){case 1:a=t.localize(0,null);break;case 3:a=p.source;break;case 2:a=t.localize(1,null);break}l.push({type:"separator",label:a})}p.snippetSource===3&&(C.isEnabled(p)?u.buttons=[{iconClass:k.Codicon.eyeClosed.classNames,tooltip:t.localize(2,null)}]:(u.description=t.localize(3,null),u.buttons=[{iconClass:k.Codicon.eye.classNames,tooltip:t.localize(4,null)}])),l.push(u),r=p}return l},S=o.createQuickPick();S.placeholder=t.localize(5,null),S.matchOnDetail=!0,S.ignoreFocusOut=!1,S.keepScrollPosition=!0,S.onDidTriggerItemButton(l=>{const r=C.isEnabled(l.item.snippet);C.updateEnablement(l.item.snippet,!r),S.items=i()}),S.items=i(),S.show(),await Promise.race([D.Event.toPromise(S.onDidAccept),D.Event.toPromise(S.onDidHide)]);const s=S.selectedItems[0]?.snippet;return S.dispose(),s}e.pickSnippet=I}),define(ne[2204],re([1,0,1724,39,42,28,291,173,58,589,95,5,812]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class c{constructor(s,l,r){this.snippet=s,this.name=l,this.langId=r}static fromUser(s){if(!s||typeof s!="object")return c._empty;let{snippet:l,name:r,langId:p}=s;return typeof l!="string"&&(l=void 0),typeof r!="string"&&(r=void 0),typeof p!="string"&&(p=void 0),new c(l,r,p)}}c._empty=new c(void 0,void 0,void 0);class i extends f.EditorAction{constructor(){super({id:"editor.action.insertSnippet",label:t.localize(0,null),alias:"Insert Snippet",precondition:I.EditorContextKeys.writable,description:{description:"Insert Snippet",args:[{name:"args",schema:{type:"object",properties:{snippet:{type:"string"},langId:{type:"string"},name:{type:"string"}}}}]}})}async run(s,l,r){const p=s.get(_.ILanguageService),u=s.get(k.ISnippetsService);if(!l.hasModel())return;const a=s.get(v.IClipboardService),n=s.get(C.IInstantiationService),h=await new Promise((d,m)=>{const{lineNumber:b,column:E}=l.getPosition(),{snippet:y,name:T,langId:R}=c.fromUser(r);if(y)return d(new w.Snippet([],"","","",y,"",1));let O;if(R){if(!p.isRegisteredLanguageId(R))return d(void 0);O=R}else l.getModel().tokenizeIfCheap(b),O=l.getModel().getLanguageIdAtPosition(b,E),p.getLanguageName(O)||(O=l.getModel().getLanguageId());T?u.getSnippets(O,{includeNoPrefixSnippets:!0}).then(x=>x.find(F=>F.name===T)).then(d,m):d(n.invokeFunction(o.pickSnippet,O))});if(!h)return;let g;h.needsClipboard&&(g=await a.readText()),D.SnippetController2.get(l)?.insert(h.codeSnippet,{clipboardText:g})}}(0,f.registerEditorAction)(i),A.CommandsRegistry.registerCommand("editor.action.showSnippets",S=>S.get(A.ICommandService).executeCommand("editor.action.insertSnippet"))}),define(ne[2205],re([1,0,39,58,173,1730,16,95,7,5,812,291]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,k.registerAction2)(class extends t.EditorAction2{constructor(){super({id:"editor.action.surroundWithSnippet",title:{value:(0,A.localize)(0,null),original:"Surround With Snippet..."},precondition:I.ContextKeyExpr.and(f.EditorContextKeys.writable,f.EditorContextKeys.hasNonEmptySelection),f1:!0})}async runEditorCommand(c,i,...S){const s=c.get(C.ISnippetsService),l=c.get(D.IClipboardService),r=c.get(w.IInstantiationService);if(!i.hasModel())return;const{lineNumber:p,column:u}=i.getPosition();i.getModel().tokenizeIfCheap(p);const a=i.getModel().getLanguageIdAtPosition(p,u),h=(await s.getSnippets(a,{includeNoPrefixSnippets:!0,includeDisabledSnippets:!0})).filter(m=>m.usesSelection),g=await r.invokeFunction(v.pickSnippet,h);if(!g)return;let d;g.needsClipboard&&(d=await l.readText()),_.SnippetController2.get(i)?.insert(g.codeSnippet,{clipboardText:d})}})}),define(ne[813],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISplashStorageService=void 0,e.ISplashStorageService=(0,t.createDecorator)("ISplashStorageService")}),define(ne[2206],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JavaLibrariesToLookFor=e.MavenArtifactIdRegex=e.MavenGroupIdRegex=e.MavenDependencyRegex=e.MavenDependenciesRegex=e.GradleDependencyCompactRegex=e.GradleDependencyLooseRegex=void 0,e.GradleDependencyLooseRegex=/group\s*:\s*[\'\"](.*?)[\'\"]\s*,\s*name\s*:\s*[\'\"](.*?)[\'\"]\s*,\s*version\s*:\s*[\'\"](.*?)[\'\"]/g,e.GradleDependencyCompactRegex=/[\'\"]([^\'\"\s]*?)\:([^\'\"\s]*?)\:([^\'\"\s]*?)[\'\"]/g,e.MavenDependenciesRegex=/<dependencies>([\s\S]*?)<\/dependencies>/g,e.MavenDependencyRegex=/<dependency>([\s\S]*?)<\/dependency>/g,e.MavenGroupIdRegex=/<groupId>([\s\S]*?)<\/groupId>/,e.MavenArtifactIdRegex=/<artifactId>([\s\S]*?)<\/artifactId>/,e.JavaLibrariesToLookFor=[{groupId:"com.microsoft.azure",artifactId:"azure",tag:"azure"},{groupId:"com.microsoft.azure",artifactId:"azure-mgmt-.*",tag:"azure"},{groupId:"com\\.microsoft\\.azure\\..*",artifactId:"azure-mgmt-.*",tag:"azure"},{groupId:"javax",artifactId:"javaee-api",tag:"javaee"},{groupId:"javax.xml.bind",artifactId:"jaxb-api",tag:"javaee"},{groupId:"mysql",artifactId:"mysql-connector-java",tag:"jdbc"},{groupId:"com.microsoft.sqlserver",artifactId:"mssql-jdbc",tag:"jdbc"},{groupId:"com.oracle.database.jdbc",artifactId:"ojdbc10",tag:"jdbc"},{groupId:"org.hibernate",artifactId:"hibernate-core",tag:"jpa"},{groupId:"org.eclipse.persistence",artifactId:"eclipselink",tag:"jpa"},{groupId:"org.projectlombok",artifactId:"lombok",tag:"lombok"},{groupId:"org.mockito",artifactId:"mockito-core",tag:"mockito"},{groupId:"org.powermock",artifactId:"powermock-core",tag:"mockito"},{groupId:"org.springframework.data",artifactId:"spring-data-redis",tag:"redis"},{groupId:"redis.clients",artifactId:"jedis",tag:"redis"},{groupId:"org.redisson",artifactId:"redisson",tag:"redis"},{groupId:"io.lettuce",artifactId:"lettuce-core",tag:"redis"},{groupId:"org.springframework.boot",artifactId:".*",tag:"springboot"},{groupId:"org.jooq",artifactId:"jooq",tag:"sql"},{groupId:"org.mybatis",artifactId:"mybatis",tag:"sql"},{groupId:"org.junit.jupiter",artifactId:"junit-jupiter-api",tag:"unitTest"},{groupId:"junit",artifactId:"junit",tag:"unitTest"},{groupId:"org.testng",artifactId:"testng",tag:"unitTest"}]}),define(ne[494],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWorkspaceTagsService=void 0,e.IWorkspaceTagsService=(0,t.createDecorator)("workspaceTagsService")}),define(ne[2207],re([1,0,79,24,34,23,27,15,494,13,266,1538]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicWorkspaceRecommendations=void 0;const o="extensionsAssistant/dynamicWorkspaceRecommendations",c=1e3*60*60*24;let i=class extends v.ExtensionRecommendations{constructor(s,l,r,p,u,a){super();this.extensionTipsService=s,this.workspaceTagsService=l,this.contextService=r,this.fileService=p,this.telemetryService=u,this.storageService=a,this._recommendations=[]}get recommendations(){return this._recommendations}async doActivate(){await this.fetch(),this._register(this.contextService.onDidChangeWorkbenchState(()=>this._recommendations=[]))}async fetch(){if(this._register(this.contextService.onDidChangeWorkbenchState(()=>this._recommendations=[])),this._recommendations.length||this.contextService.getWorkbenchState()!==2||!this.fileService.hasProvider(this.contextService.getWorkspace().folders[0].uri))return;const s=this.contextService.getWorkspace().folders[0],l=this.getCachedDynamicWorkspaceRecommendations();if(l){this._recommendations=l.map(n=>this.toExtensionRecommendation(n,s)),this.telemetryService.publicLog2("dynamicWorkspaceRecommendations",{count:this._recommendations.length,cache:1});return}const[r,p]=await Promise.all([this.workspaceTagsService.getHashedRemotesFromUri(s.uri,!1),this.workspaceTagsService.getHashedRemotesFromUri(s.uri,!0)]),u=(r||[]).concat(p||[]);if(!u.length)return;const a=await this.extensionTipsService.getAllWorkspacesTips();if(!!a.length)for(const n of u){const h=a.filter(g=>(0,D.isNonEmptyArray)(g.remoteSet)&&g.remoteSet.indexOf(n)>-1)[0];if(h){this._recommendations=h.recommendations.map(g=>this.toExtensionRecommendation(g,s)),this.storageService.store(o,JSON.stringify({recommendations:h.recommendations,timestamp:Date.now()}),1,1),this.telemetryService.publicLog2("dynamicWorkspaceRecommendations",{count:this._recommendations.length,cache:0});return}}}getCachedDynamicWorkspaceRecommendations(){try{const s=JSON.parse(this.storageService.get(o,1,"{}"));if((0,D.isNonEmptyArray)(s.recommendations)&&(0,w.isNumber)(s.timestamp)&&s.timestamp>0&&(Date.now()-s.timestamp)/c<14)return s.recommendations}catch{this.storageService.remove(o,1)}}toExtensionRecommendation(s,l){return{extensionId:s.toLowerCase(),reason:{reasonId:4,reasonText:(0,C.localize)(0,null,l.name)}}}};i=Ee([W(0,t.IExtensionTipsService),W(1,I.IWorkspaceTagsService),W(2,_.IWorkspaceContextService),W(3,A.IFileService),W(4,k.ITelemetryService),W(5,f.IStorageService)],i),e.DynamicWorkspaceRecommendations=i}),define(ne[269],re([1,0,1747,5,7]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.USER_TASKS_GROUP_KEY=e.ITaskService=e.ProcessExecutionSupportedContext=e.ShellExecutionSupportedContext=e.CustomExecutionSupportedContext=void 0,e.CustomExecutionSupportedContext=new _.RawContextKey("customExecutionSupported",!0,t.localize(0,null)),e.ShellExecutionSupportedContext=new _.RawContextKey("shellExecutionSupported",!1,t.localize(1,null)),e.ProcessExecutionSupportedContext=new _.RawContextKey("processExecutionSupported",!1,t.localize(2,null)),e.ITaskService=(0,f.createDecorator)("taskService"),e.USER_TASKS_GROUP_KEY="settings"}),define(ne[2208],re([1,0,1509,81,320,269,8,54,13,125,130,43,24]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugTaskRunner=e.TaskRunResult=void 0;function c(l,r){return(p,u=null,a)=>{const n=r(h=>{if(l(h))return n.dispose(),p.call(u,h)},null,a);return n}}var i;(function(l){l[l.Failure=0]="Failure",l[l.Success=1]="Success"})(i=e.TaskRunResult||(e.TaskRunResult={}));const S="debug.taskerrorchoice";let s=class{constructor(r,p,u,a,n,h){this.taskService=r,this.markerService=p,this.configurationService=u,this.viewsService=a,this.dialogService=n,this.storageService=h,this.canceled=!1}cancel(){this.canceled=!0}async runTaskAndCheckErrors(r,p){try{this.canceled=!1;const u=await this.runTask(r,p);if(this.canceled||u&&u.exitCode===void 0)return 0;const a=p?this.markerService.read({severities:w.MarkerSeverity.Error,take:2}).length:0,n=u&&u.exitCode===0,h=u&&u.exitCode!==0,g=this.configurationService.getValue("debug").onTaskErrors;if(n||g==="debugAnyway"||a===0&&!h)return 1;if(g==="showErrors")return await this.viewsService.openView(_.default.MARKERS_VIEW_ID,!0),Promise.resolve(0);if(g==="abort")return Promise.resolve(0);const d=typeof p=="string"?p:p?p.name:"",m=a>1?t.localize(0,null,d):a===1?t.localize(1,null,d):u&&typeof u.exitCode=="number"?t.localize(2,null,d,u.exitCode):t.localize(3,null,d),b=await this.dialogService.show(f.default.Warning,m,[t.localize(4,null),t.localize(5,null),t.localize(6,null)],{checkbox:{label:t.localize(7,null)},cancelId:2}),E=b.choice===0,y=b.choice===2;return b.checkboxChecked&&this.configurationService.updateValue("debug.onTaskErrors",b.choice===0?"debugAnyway":y?"abort":"showErrors"),y?Promise.resolve(0):E?1:(await this.viewsService.openView(_.default.MARKERS_VIEW_ID,!0),Promise.resolve(0))}catch(u){const a=this.taskService.configureAction(),n=JSON.parse(this.storageService.get(S,1,"{}"));let h=-1;if(n[u.message]!==void 0)h=n[u.message];else{const g=await this.dialogService.show(f.default.Error,u.message,[t.localize(8,null),a.label,t.localize(9,null)],{cancelId:2,checkbox:{label:t.localize(10,null)}});h=g.choice,g.checkboxChecked&&(n[u.message]=h,this.storageService.store(S,JSON.stringify(n),1,0))}return h===1&&await a.run(),h===0?1:0}}async runTask(r,p){if(!p)return Promise.resolve(null);if(!r)return Promise.reject(new Error(t.localize(11,null,typeof p=="string"?p:p.type)));const u=await this.taskService.getTask(r,p);if(!u){const g=typeof p=="string"?t.localize(12,null,p):t.localize(13,null);return Promise.reject((0,v.createErrorWithActions)(g))}let a=!1;const n=new Promise((g,d)=>c(m=>(m.kind==="inactive"||m.kind==="processEnded"&&m.exitCode===void 0)&&m.taskId===u._id,this.taskService.onDidStateChange)(m=>{a=!0,g(m.kind==="processEnded"?{exitCode:m.exitCode}:null)})),h=this.taskService.getActiveTasks().then(async g=>{if(g.find(m=>m._id===u._id))return(await this.taskService.getBusyTasks()).find(b=>b._id===u._id)?(a=!0,n):Promise.resolve(null);c(m=>(m.kind==="active"||m.kind==="dependsOnStarted")&&m.taskId===u._id,this.taskService.onDidStateChange)(()=>{a=!0});const d=this.taskService.run(u);return u.configurationProperties.isBackground?n:d.then(I.withUndefinedAsNull)});return new Promise((g,d)=>{const m=new Promise(b=>c(E=>E.kind==="acquiredInput"&&E.taskId===u._id,this.taskService.onDidStateChange)(()=>{b()}));h.then(b=>{a=!0,g(b)},b=>d(b)),m.then(()=>{const b=u.configurationProperties.isBackground?5e3:1e4;setTimeout(()=>{if(!a){const E=typeof p=="string"?t.localize(14,null,p):t.localize(15,null,JSON.stringify(p));d({severity:f.default.Error,message:E})}},b)})})}};s=Ee([W(0,A.ITaskService),W(1,w.IMarkerService),W(2,k.IConfigurationService),W(3,C.IViewsService),W(4,D.IDialogService),W(5,o.IStorageService)],s),e.DebugTaskRunner=s}),define(ne[814],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TaskExecuteKind=e.Triggers=e.TaskError=e.TaskErrors=void 0;var t;(function(k){k[k.NotConfigured=0]="NotConfigured",k[k.RunningTask=1]="RunningTask",k[k.NoBuildTask=2]="NoBuildTask",k[k.NoTestTask=3]="NoTestTask",k[k.ConfigValidationError=4]="ConfigValidationError",k[k.TaskNotFound=5]="TaskNotFound",k[k.NoValidTaskRunner=6]="NoValidTaskRunner",k[k.UnknownError=7]="UnknownError"})(t=e.TaskErrors||(e.TaskErrors={}));class f{constructor(D,I,w){this.severity=D,this.message=I,this.code=w}}e.TaskError=f;var _;(function(k){k.shortcut="shortcut",k.command="command"})(_=e.Triggers||(e.Triggers={}));var A;(function(k){k[k.Started=1]="Started",k[k.Active=2]="Active"})(A=e.TaskExecuteKind||(e.TaskExecuteKind={}))}),define(ne[2209],re([1,0,1748]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTemplates=void 0;const f={id:"dotnetCore",label:".NET Core",sort:"NET Core",autoDetect:!1,description:t.localize(0,null),content:["{"," // See https://go.microsoft.com/fwlink/?LinkId=733558"," // for the documentation about the tasks.json format",' "version": "2.0.0",',' "tasks": ['," {",' "label": "build",',' "command": "dotnet",',' "type": "shell",',' "args": [',' "build",'," // Ask dotnet build to generate full paths for file names.",' "/property:GenerateFullPaths=true",'," // Do not generate summary otherwise it leads to duplicate errors in Problems panel",' "/consoleloggerparameters:NoSummary"'," ],",' "group": "build",',' "presentation": {',' "reveal": "silent"'," },",' "problemMatcher": "$msCompile"'," }"," ]","}"].join(` `)},_={id:"msbuild",label:"MSBuild",autoDetect:!1,description:t.localize(1,null),content:["{"," // See https://go.microsoft.com/fwlink/?LinkId=733558"," // for the documentation about the tasks.json format",' "version": "2.0.0",',' "tasks": ['," {",' "label": "build",',' "type": "shell",',' "command": "msbuild",',' "args": ['," // Ask msbuild to generate full paths for file names.",' "/property:GenerateFullPaths=true",',' "/t:build",'," // Do not generate summary otherwise it leads to duplicate errors in Problems panel",' "/consoleloggerparameters:NoSummary"'," ],",' "group": "build",',' "presentation": {'," // Reveal the output only if unrecognized errors occur.",' "reveal": "silent"'," },"," // Use the standard MS compiler pattern to detect errors, warnings and infos",' "problemMatcher": "$msCompile"'," }"," ]","}"].join(` `)},A={id:"externalCommand",label:"Others",autoDetect:!1,description:t.localize(2,null),content:["{"," // See https://go.microsoft.com/fwlink/?LinkId=733558"," // for the documentation about the tasks.json format",' "version": "2.0.0",',' "tasks": ['," {",' "label": "echo",',' "type": "shell",',' "command": "echo Hello"'," }"," ]","}"].join(` `)},k={id:"maven",label:"maven",sort:"MVN",autoDetect:!1,description:t.localize(3,null),content:["{"," // See https://go.microsoft.com/fwlink/?LinkId=733558"," // for the documentation about the tasks.json format",' "version": "2.0.0",',' "tasks": ['," {",' "label": "verify",',' "type": "shell",',' "command": "mvn -B verify",',' "group": "build"'," },"," {",' "label": "test",',' "type": "shell",',' "command": "mvn -B test",',' "group": "test"'," }"," ]","}"].join(` `)};let D=null;function I(){return D||(D=[f,_,k].sort((w,v)=>(w.sort||w.label).localeCompare(v.sort||v.label)),D.push(A)),D}e.getTemplates=I}),define(ne[815],re([1,0,6,2,18,13,1751,26]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseTerminalBackend=void 0;class I extends f.Disposable{constructor(v,C,o,c,i,S){super();this._logService=C,this._workspaceContextService=S,this._isPtyHostUnresponsive=!1,this._onPtyHostRestart=this._register(new t.Emitter),this.onPtyHostRestart=this._onPtyHostRestart.event,this._onPtyHostUnresponsive=this._register(new t.Emitter),this.onPtyHostUnresponsive=this._onPtyHostUnresponsive.event,this._onPtyHostResponsive=this._register(new t.Emitter),this.onPtyHostResponsive=this._onPtyHostResponsive.event,v.onPtyHostExit&&this._register(v.onPtyHostExit(()=>{this._logService.error("The terminal's pty host process exited, the connection to all terminal processes was lost")}));let s;v.onPtyHostStart&&this._register(v.onPtyHostStart(()=>{this._logService.info("ptyHost restarted"),this._onPtyHostRestart.fire(),s?.close(),s=void 0,this._isPtyHostUnresponsive=!1})),v.onPtyHostUnresponsive&&this._register(v.onPtyHostUnresponsive(()=>{const l=[{label:(0,k.localize)(0,null),run:()=>v.restartPtyHost()}];s=o.prompt(D.Severity.Error,(0,k.localize)(1,null),l),this._isPtyHostUnresponsive=!0,this._onPtyHostUnresponsive.fire()})),v.onPtyHostResponsive&&this._register(v.onPtyHostResponsive(()=>{!this._isPtyHostUnresponsive||(this._logService.info("The pty host became responsive again"),s?.close(),s=void 0,this._isPtyHostUnresponsive=!1,this._onPtyHostResponsive.fire())})),v.onPtyHostRequestResolveVariables&&this._register(v.onPtyHostRequestResolveVariables(async l=>{if(l.workspaceId!==this._workspaceContextService.getWorkspace().id)return;const r=c.getLastActiveWorkspaceRoot(_.Schemas.file),p=r?(0,A.withNullAsUndefined)(this._workspaceContextService.getWorkspaceFolder(r)):void 0,u=l.originalText.map(n=>i.resolveAsync(p,n)),a=await Promise.all(u);v.acceptPtyHostResolvedVariables?.(l.requestId,a)}))}_deserializeTerminalState(v){if(v===void 0)return;const C=JSON.parse(v);if(!("version"in C)||!("state"in C)||!Array.isArray(C.state)){this._logService.warn("Could not revive serialized processes, wrong format",C);return}const o=C;if(o.version!==1){this._logService.warn(`Could not revive serialized processes, wrong version "${o.version}"`,o);return}return o.state}}e.BaseTerminalBackend=I}),define(ne[361],re([1,0,48]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.osPathModule=e.updateLinkWithRelativeCwd=e.positionIsInRange=e.getXtermLineContent=e.convertBufferRangeToViewport=e.convertLinkRangeToBuffer=void 0;function f(w,v,C,o){const c={start:{x:C.startColumn,y:C.startLineNumber+o},end:{x:C.endColumn-1,y:C.endLineNumber+o}};let i=0;const S=Math.ceil(C.startColumn/v);for(let r=0;r<Math.min(S);r++){const p=Math.min(v,C.startColumn-r*v);let u=0;const a=w[r];if(!a)break;for(let n=0;n<Math.min(v,p+u);n++){const h=a.getCell(n);h.getWidth()===2&&u++;const d=h.getChars();d.length>1&&(u-=d.length-1)}i+=u}let s=0;const l=Math.ceil(C.endColumn/v);for(let r=Math.max(0,S-1);r<l;r++){const p=r===S-1?(C.startColumn+i)%v:0,u=Math.min(v,C.endColumn+i-r*v),a=r===S-1?i:0;let n=0;const h=w[r];if(!h)break;for(let g=p;g<Math.min(v,u+n+a);g++){const d=h.getCell(g);d.getWidth()===2&&n++,g===v-1&&d.getChars()===""&&n++}s+=n}for(c.start.x+=i,c.end.x+=i+s;c.start.x>v;)c.start.x-=v,c.start.y++;for(;c.end.x>v;)c.end.x-=v,c.end.y++;return c}e.convertLinkRangeToBuffer=f;function _(w,v){return{start:{x:w.start.x-1,y:w.start.y-v-1},end:{x:w.end.x-1,y:w.end.y-v-1}}}e.convertBufferRangeToViewport=_;function A(w,v,C,o){let c="";for(let i=v;i<=C;i++){const S=w.getLine(i);S&&(c+=S.translateToString(!0,0,o))}return c}e.getXtermLineContent=A;function k(w,v){return!(w.y<v.start.y||w.y>v.end.y||w.y===v.start.y&&w.x<v.start.x||w.y===v.end.y&&w.x>v.end.x)}e.positionIsInRange=k;function D(w,v,C,o){const c=w.get(2)?.getCwdForLine(v);if(!!c){if(!C.includes(o))C=c+o+C;else{let i=0,S=0;const s=c.split(o).reverse(),l=C.split(o);for(;S<s.length;)s[S]===l[S]&&i++,S++;C=c+o+l.slice(i).join(o)}return C}}e.updateLinkWithRelativeCwd=D;function I(w){return w===1?t.win32:t.posix}e.osPathModule=I}),define(ne[2210],re([1,0,361]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalExternalLinkDetector=void 0;var f;(function(A){A[A.MaxLineLength=2e3]="MaxLineLength"})(f||(f={}));class _{constructor(k,D,I){this.id=k,this.xterm=D,this._provideLinks=I}async detect(k,D,I){const w=(0,t.getXtermLineContent)(this.xterm.buffer.active,D,I,this.xterm.cols);if(w===""||w.length>2e3)return[];const v=await this._provideLinks(w);return v?v.map(o=>{const c=(0,t.convertLinkRangeToBuffer)(k,this.xterm.cols,{startColumn:o.startIndex+1,startLineNumber:1,endColumn:o.startIndex+o.length+1,endLineNumber:1},D);return{text:w.substring(o.startIndex,o.startIndex+o.length)||"",label:o.label,bufferRange:c,type:{id:this.id},activate:o.activate}}):[]}}e.TerminalExternalLinkDetector=_}),define(ne[2211],re([1,0,2,10,11,361,14,1753,6,8]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalLink=e.FOLDER_NOT_IN_WORKSPACE_LABEL=e.FOLDER_IN_WORKSPACE_LABEL=e.OPEN_FILE_LABEL=void 0,e.OPEN_FILE_LABEL=(0,D.localize)(0,null),e.FOLDER_IN_WORKSPACE_LABEL=(0,D.localize)(1,null),e.FOLDER_NOT_IN_WORKSPACE_LABEL=(0,D.localize)(2,null);let v=class extends t.DisposableStore{constructor(o,c,i,S,s,l,r,p,u,a,n){super();this._xterm=o,this.range=c,this.text=i,this.actions=S,this._viewportY=s,this._activateCallback=l,this._tooltipCallback=r,this._isHighConfidenceLink=p,this.label=u,this._type=a,this._configurationService=n,this._onInvalidated=new I.Emitter,this.decorations={pointerCursor:!1,underline:this._isHighConfidenceLink}}get onInvalidated(){return this._onInvalidated.event}get type(){return this._type}dispose(){super.dispose(),this._hoverListeners?.dispose(),this._hoverListeners=void 0,this._tooltipScheduler?.dispose(),this._tooltipScheduler=void 0}activate(o,c){this.asyncActivate=this._activateCallback(o,c)}hover(o,c){this._hoverListeners=new t.DisposableStore,this._hoverListeners.add(f.addDisposableListener(document,"keydown",S=>{!S.repeat&&this._isModifierDown(S)&&this._enableDecorations()})),this._hoverListeners.add(f.addDisposableListener(document,"keyup",S=>{!S.repeat&&!this._isModifierDown(S)&&this._disableDecorations()})),this._hoverListeners.add(this._xterm.onRender(S=>{const s=this.range.start.y-this._viewportY;s>=S.start&&s<=S.end&&this._onInvalidated.fire()})),this._isHighConfidenceLink&&(this._tooltipScheduler=new _.RunOnceScheduler(()=>{this._tooltipCallback(this,(0,A.convertBufferRangeToViewport)(this.range,this._viewportY),this._isHighConfidenceLink?()=>this._enableDecorations():void 0,this._isHighConfidenceLink?()=>this._disableDecorations():void 0),this._tooltipScheduler?.dispose(),this._tooltipScheduler=void 0},this._configurationService.getValue("workbench.hover.delay")),this.add(this._tooltipScheduler),this._tooltipScheduler.schedule());const i={x:o.pageX,y:o.pageY};this._hoverListeners.add(f.addDisposableListener(document,f.EventType.MOUSE_MOVE,S=>{this._isModifierDown(S)?this._enableDecorations():this._disableDecorations(),(Math.abs(S.pageX-i.x)>window.devicePixelRatio*2||Math.abs(S.pageY-i.y)>window.devicePixelRatio*2)&&(i.x=S.pageX,i.y=S.pageY,this._tooltipScheduler?.schedule())}))}leave(){this._hoverListeners?.dispose(),this._hoverListeners=void 0,this._tooltipScheduler?.dispose(),this._tooltipScheduler=void 0}_enableDecorations(){this.decorations.pointerCursor||(this.decorations.pointerCursor=!0),this.decorations.underline||(this.decorations.underline=!0)}_disableDecorations(){this.decorations.pointerCursor&&(this.decorations.pointerCursor=!1),this.decorations.underline!==this._isHighConfidenceLink&&(this.decorations.underline=this._isHighConfidenceLink)}_isModifierDown(o){return this._configurationService.getValue("editor.multiCursorModifier")==="ctrlCmd"?!!o.altKey:k.isMacintosh?o.metaKey:o.ctrlKey}};v=Ee([W(10,w.IConfigurationService)],v),e.TerminalLink=v}),define(ne[2212],re([1,0,6,2,1754,5,2211]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalLinkDetectorAdapter=void 0;let D=class extends f.Disposable{constructor(w,v){super();this._detector=w,this._instantiationService=v,this._onDidActivateLink=this._register(new t.Emitter),this.onDidActivateLink=this._onDidActivateLink.event,this._onDidShowHover=this._register(new t.Emitter),this.onDidShowHover=this._onDidShowHover.event}async provideLinks(w,v){this._activeLinks?.forEach(C=>C.dispose()),this._activeLinks=await this._provideLinks(w),v(this._activeLinks)}async _provideLinks(w){const v=[];let C=w-1,o=C;const c=[this._detector.xterm.buffer.active.getLine(C)];for(;C>=0&&this._detector.xterm.buffer.active.getLine(C)?.isWrapped;)c.unshift(this._detector.xterm.buffer.active.getLine(C-1)),C--;for(;o<this._detector.xterm.buffer.active.length&&this._detector.xterm.buffer.active.getLine(o+1)?.isWrapped;)c.push(this._detector.xterm.buffer.active.getLine(o+1)),o++;const i=await this._detector.detect(c,C,o);for(const S of i)v.push(this._createTerminalLink(S,async s=>{this._onDidActivateLink.fire({link:S,event:s})}));return v}_createTerminalLink(w,v){return w.text.length>0&&w.text.charAt(w.text.length-1)===":"&&(w.text=w.text.slice(0,-1),w.bufferRange.end.x--),this._instantiationService.createInstance(k.TerminalLink,this._detector.xterm,w.bufferRange,w.text,w.actions,this._detector.xterm.buffer.active.viewportY,v,(C,o,c,i)=>this._onDidShowHover.fire({link:C,viewportRange:o,modifierDownCallback:c,modifierUpCallback:i}),w.type!==3,w.label||this._getLabel(w.type),w.type)}_getLabel(w){switch(w){case 3:return(0,_.localize)(0,null);case 0:return(0,_.localize)(1,null);case 2:return(0,_.localize)(2,null);case 1:return(0,_.localize)(3,null);case 4:default:return(0,_.localize)(4,null)}}};D=Ee([W(1,A.IInstantiationService)],D),e.TerminalLinkDetectorAdapter=D}),define(ne[816],re([1,0,56,34,361]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLocalLinkRegex=e.TerminalLocalLinkDetector=e.lineAndColumnClauseGroupCount=e.unixLineAndColumnMatchIndex=e.winLineAndColumnMatchIndex=e.lineAndColumnClause=e.winLocalLinkClause=e.winDrivePrefix=e.unixLocalLinkClause=void 0;var A;(function(i){i[i.MaxLineLength=2e3]="MaxLineLength",i[i.MaxResolvedLinksInLine=10]="MaxResolvedLinksInLine",i[i.MaxResolvedLinkLength=1024]="MaxResolvedLinkLength"})(A||(A={}));const k="(\\.\\.?|\\~)",D="\\/",I="[^\\0\\s!`&*()\\[\\]'\":;\\\\]";e.unixLocalLinkClause="(("+k+"|("+I+")+)?("+D+"("+I+")+)+)",e.winDrivePrefix="(?:\\\\\\\\\\?\\\\)?[a-zA-Z]:";const w="("+e.winDrivePrefix+"|\\.\\.?|\\~)",v="(\\\\|\\/)",C="[^\\0<>\\?\\|\\/\\s!`&*()\\[\\]'\":;]";e.winLocalLinkClause="(("+w+"|("+C+")+)?("+v+"("+C+")+)+)",e.lineAndColumnClause=[`((\\S*)['"], line ((\\d+)( column (\\d+))?))`,`((\\S*)['"],((\\d+)(:(\\d+))?))`,"((\\S*) on line ((\\d+)(, column (\\d+))?))","((\\S*):line ((\\d+)(, column (\\d+))?))","(([^\\s\\(\\)]*)(\\s?[\\(\\[](\\d+)(,\\s?(\\d+))?)[\\)\\]])",`(([^:\\s\\(\\)<>'"\\[\\]]*)(:(\\d+))?(:(\\d+))?)`].join("|").replace(/ /g,"[\xA0 ]"),e.winLineAndColumnMatchIndex=12,e.unixLineAndColumnMatchIndex=11,e.lineAndColumnClauseGroupCount=6;let o=class{constructor(S,s,l,r,p,u){this.xterm=S,this._capabilities=s,this._os=l,this._resolvePath=r,this._uriIdentityService=p,this._workspaceContextService=u}async detect(S,s,l){const r=[],p=(0,_.getXtermLineContent)(this.xterm.buffer.active,s,l,this.xterm.cols);if(p===""||p.length>2e3)return[];const u=new RegExp(c(this._os),"g");let a,n=-1,h=0;for(;(a=u.exec(p))!==null;){let g=a[0];if(!g||(n=p.indexOf(g,n+1),u.lastIndex=n+g.length,n<0))break;((p.startsWith("--- a/")||p.startsWith("+++ b/"))&&n===4||p.startsWith("diff --git")&&(g.startsWith("a/")||g.startsWith("b/")))&&(g=g.substring(2),n+=2);const d=(0,_.convertLinkRangeToBuffer)(S,this.xterm.cols,{startColumn:n+1,startLineNumber:1,endColumn:n+g.length+1,endLineNumber:1},s);if(g.length>1024)continue;const m=[];if((0,_.osPathModule)(this._os).isAbsolute(g))m.push(g);else if(this._capabilities.has(2)){const E=(0,_.updateLinkWithRelativeCwd)(this._capabilities,d.start.y,g,(0,_.osPathModule)(this._os).sep);E&&m.push(E)}else m.push(g),g.match(/^(\.\.[\/\\])+/)&&m.push(g.replace(/^(\.\.[\/\\])+/,""));const b=await this._validateLinkCandidates(m);if(b){let E;if(b.isDirectory?this._isDirectoryInsideWorkspace(b.uri)?E=2:E=1:E=0,r.push({text:b.link,uri:b.uri,bufferRange:d,type:E}),++h>=10)break}}return r}_isDirectoryInsideWorkspace(S){const s=this._workspaceContextService.getWorkspace().folders;for(let l=0;l<s.length;l++)if(this._uriIdentityService.extUri.isEqualOrParent(S,s[l].uri))return!0;return!1}async _validateLinkCandidates(S){for(const s of S){const l=await this._resolvePath(s);if(l)return l}}};o.id="local",o=Ee([W(4,t.IUriIdentityService),W(5,f.IWorkspaceContextService)],o),e.TerminalLocalLinkDetector=o;function c(i){const S=i===1?e.winLocalLinkClause:e.unixLocalLinkClause;return new RegExp(`${S}(${e.lineAndColumnClause})`)}e.getLocalLinkRegex=c}),define(ne[2213],re([1,0,18,9,689,56,34,361]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalUriLinkDetector=void 0;var I;(function(C){C[C.MaxResolvedLinksInLine=10]="MaxResolvedLinksInLine",C[C.MaxResolvedLinkLength=1024]="MaxResolvedLinkLength"})(I||(I={}));let w=class{constructor(o,c,i,S){this.xterm=o,this._resolvePath=c,this._uriIdentityService=i,this._workspaceContextService=S}async detect(o,c,i){const S=[],s=new v(this.xterm,c,i),l=_.LinkComputer.computeLinks(s);let r=0;for(const p of l){const u=(0,D.convertLinkRangeToBuffer)(o,this.xterm.cols,p.range,c),a=p.url?typeof p.url=="string"?f.URI.parse(p.url):p.url:void 0;if(!a)continue;const n=p.url?.toString()||"";if(a.scheme!==t.Schemas.file){S.push({text:n,uri:a,bufferRange:u,type:4});continue}if(n.length>1024||a.authority.length!==2&&a.authority.endsWith(":"))continue;const h=await this._resolvePath(n,a);if(h){let g;if(h.isDirectory?this._isDirectoryInsideWorkspace(h.uri)?g=2:g=1:g=0,S.push({text:h.link,uri:h.uri,bufferRange:u,type:g}),++r>=10)break}}return S}_isDirectoryInsideWorkspace(o){const c=this._workspaceContextService.getWorkspace().folders;for(let i=0;i<c.length;i++)if(this._uriIdentityService.extUri.isEqualOrParent(o,c[i].uri))return!0;return!1}};w.id="uri",w=Ee([W(2,A.IUriIdentityService),W(3,k.IWorkspaceContextService)],w),e.TerminalUriLinkDetector=w;class v{constructor(o,c,i){this._xterm=o,this._lineStart=c,this._lineEnd=i}getLineCount(){return 1}getLineContent(){return(0,D.getXtermLineContent)(this._xterm.buffer.active,this._lineStart,this._lineEnd,this._xterm.cols)}}}),define(ne[2214],re([1,0,11,6,2,9]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemotePty=void 0;class k extends _.Disposable{constructor(I,w,v,C,o){super();this._id=I,this.shouldPersist=w,this._remoteTerminalChannel=v,this._remoteAgentService=C,this._logService=o,this._onProcessData=this._register(new f.Emitter),this.onProcessData=this._onProcessData.event,this._onProcessReady=this._register(new f.Emitter),this.onProcessReady=this._onProcessReady.event,this._onDidChangeProperty=this._register(new f.Emitter),this.onDidChangeProperty=this._onDidChangeProperty.event,this._onProcessExit=this._register(new f.Emitter),this.onProcessExit=this._onProcessExit.event,this._onRestoreCommands=this._register(new f.Emitter),this.onRestoreCommands=this._onRestoreCommands.event,this._inReplay=!1,this._properties={cwd:"",initialCwd:"",fixedDimensions:{cols:void 0,rows:void 0},title:"",shellType:void 0,hasChildProcesses:!0,resolvedShellLaunchConfig:{},overrideDimensions:void 0},this._startBarrier=new t.Barrier}get id(){return this._id}async start(){if(!await this._remoteAgentService.getEnvironment())throw new Error("Could not fetch remote environment");this._logService.trace("Spawning remote agent process",{terminalId:this._id});const w=await this._remoteTerminalChannel.start(this._id);if(typeof w!="undefined")return w;this._startBarrier.open()}async detach(){return await this._startBarrier.wait(),this._remoteTerminalChannel.detachFromProcess(this.id)}shutdown(I){this._startBarrier.wait().then(w=>{this._remoteTerminalChannel.shutdown(this._id,I)})}input(I){this._inReplay||this._startBarrier.wait().then(w=>{this._remoteTerminalChannel.input(this._id,I)})}resize(I,w){this._inReplay||this._startBarrier.wait().then(v=>{this._remoteTerminalChannel.resize(this._id,I,w)})}acknowledgeDataEvent(I){this._inReplay||this._startBarrier.wait().then(w=>{this._remoteTerminalChannel.acknowledgeDataEvent(this._id,I)})}async setUnicodeVersion(I){return this._remoteTerminalChannel.setUnicodeVersion(this._id,I)}async getInitialCwd(){return this._properties.initialCwd}async getCwd(){return this._properties.cwd||this._properties.initialCwd}async refreshProperty(I){return this._remoteTerminalChannel.refreshProperty(this._id,I)}async updateProperty(I,w){return this._remoteTerminalChannel.updateProperty(this._id,I,w)}handleData(I){this._onProcessData.fire(I)}handleExit(I){this._onProcessExit.fire(I)}processBinary(I){return this._remoteTerminalChannel.processBinary(this._id,I)}handleReady(I){this._onProcessReady.fire(I)}handleDidChangeProperty({type:I,value:w}){switch(I){case"cwd":this._properties.cwd=w;break;case"initialCwd":this._properties.initialCwd=w;break;case"resolvedShellLaunchConfig":w.cwd&&typeof w.cwd!="string"&&(w.cwd=A.URI.revive(w.cwd))}this._onDidChangeProperty.fire({type:I,value:w})}async handleReplay(I){try{this._inReplay=!0;for(const w of I.events){(w.cols!==0||w.rows!==0)&&this._onDidChangeProperty.fire({type:"overrideDimensions",value:{cols:w.cols,rows:w.rows,forceExactSize:!0}});const v={data:w.data,trackCommit:!0};this._onProcessData.fire(v),await v.writePromise}}finally{this._inReplay=!1}I.commands&&this._onRestoreCommands.fire(I.commands),this._onDidChangeProperty.fire({type:"overrideDimensions",value:void 0})}handleOrphanQuestion(){this._remoteTerminalChannel.orphanQuestionReply(this._id)}async getLatency(){return 0}}e.RemotePty=k}),define(ne[105],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinuxDistro=e.terminalEditorId=e.TerminalLinkQuickPickEvent=e.TerminalConnectionState=e.Direction=e.ITerminalInstanceService=e.ITerminalGroupService=e.ITerminalEditorService=e.ITerminalService=void 0,e.ITerminalService=(0,t.createDecorator)("terminalService"),e.ITerminalEditorService=(0,t.createDecorator)("terminalEditorService"),e.ITerminalGroupService=(0,t.createDecorator)("terminalGroupService"),e.ITerminalInstanceService=(0,t.createDecorator)("terminalInstanceService");var f;(function(D){D[D.Left=0]="Left",D[D.Right=1]="Right",D[D.Up=2]="Up",D[D.Down=3]="Down"})(f=e.Direction||(e.Direction={}));var _;(function(D){D[D.Connecting=0]="Connecting",D[D.Connected=1]="Connected"})(_=e.TerminalConnectionState||(e.TerminalConnectionState={}));class A extends MouseEvent{}e.TerminalLinkQuickPickEvent=A,e.terminalEditorId="terminalEditor";var k;(function(D){D[D.Unknown=1]="Unknown",D[D.Fedora=2]="Fedora",D[D.Ubuntu=3]="Ubuntu"})(k=e.LinuxDistro||(e.LinuxDistro={}))}),define(ne[2215],re([1,0,10,1756,53,105]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalLinkQuickpick=void 0;let k=class{constructor(I){this._quickInputService=I}async show(I){const w=I.wordLinks?await this._generatePicks(I.wordLinks):void 0,v=I.fileLinks?await this._generatePicks(I.fileLinks):void 0,C=I.webLinks?await this._generatePicks(I.webLinks):void 0,o={placeHolder:(0,f.localize)(0,null),canPickMany:!1},c=[];C&&(c.push({type:"separator",label:(0,f.localize)(1,null)}),c.push(...C)),v&&(c.push({type:"separator",label:(0,f.localize)(2,null)}),c.push(...v)),w&&(c.push({type:"separator",label:(0,f.localize)(3,null)}),c.push(...w));const i=await this._quickInputService.pick(c,o);if(!i)return;const S=new A.TerminalLinkQuickPickEvent(t.EventType.CLICK);i.link.activate(S,i.label)}async _generatePicks(I){if(!I)return;const w=new Set,v=[];for(const C of I){const o=C.text;w.has(o)||(w.add(o),v.push({label:o,link:C}))}return v.length>0?v:void 0}};k=Ee([W(0,_.IQuickInputService)],k),e.TerminalLinkQuickpick=k}),define(ne[2216],re([1,0,94,105]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setupTerminalCommands=void 0;function _(){A()}e.setupTerminalCommands=_;function A(){for(let k=0;k<9;k++){const D=k,I=k+1;t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:`workbench.action.terminal.focusAtIndex${I}`,weight:200,when:void 0,primary:0,handler:w=>(w.get(f.ITerminalGroupService).setActiveInstanceByIndex(D),w.get(f.ITerminalGroupService).showPanel(!0))})}}}),define(ne[817],re([1,0,137,73]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.openContextMenu=void 0;function _(A,k,D,I,w){const v=new t.StandardMouseEvent(A),C={x:v.posx,y:v.posy},o=[],c=(0,f.createAndFillInContextMenuActions)(D,void 0,o);w&&o.push(...w),I.showContextMenu({getAnchor:()=>C,getActions:()=>o,getActionsContext:()=>k,onHide:()=>c.dispose()})}e.openContextMenu=_}),define(ne[2217],re([1,0,9,105]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalInputSerializer=void 0;let _=class{constructor(k){this._terminalEditorService=k}canSerialize(k){return!!k.terminalInstance?.persistentProcessId}serialize(k){return!k.terminalInstance?.persistentProcessId||!k.terminalInstance.shouldPersist?void 0:JSON.stringify(this._toJson(k.terminalInstance))}deserialize(k,D){const I=JSON.parse(D);return I.resource=t.URI.parse(I.resource),this._terminalEditorService.reviveInput(I)}_toJson(k){return{id:k.persistentProcessId,pid:k.processId||0,title:k.title,titleSource:k.titleSource,cwd:"",icon:k.icon,color:k.color,resource:k.resource.toString(),hasChildProcesses:k.hasChildProcesses}}};_=Ee([W(0,f.ITerminalEditorService)],_),e.TerminalInputSerializer=_}),define(ne[590],re([1,0,33,1763,63]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.configureTerminalProfileIcon=e.newTerminalIcon=e.killTerminalIcon=e.renameTerminalIcon=e.terminalViewIcon=void 0,e.terminalViewIcon=(0,_.registerIcon)("terminal-view-icon",t.Codicon.terminal,(0,f.localize)(0,null)),e.renameTerminalIcon=(0,_.registerIcon)("terminal-rename",t.Codicon.gear,(0,f.localize)(1,null)),e.killTerminalIcon=(0,_.registerIcon)("terminal-kill",t.Codicon.trash,(0,f.localize)(2,null)),e.newTerminalIcon=(0,_.registerIcon)("terminal-new",t.Codicon.add,(0,f.localize)(3,null)),e.configureTerminalProfileIcon=(0,_.registerIcon)("terminal-configure-profile",t.Codicon.gear,(0,f.localize)(4,null))}),define(ne[818],re([1,0,6,2,105]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalProcessExtHostProxy=void 0;let A=class extends f.Disposable{constructor(D,I,w,v){super();this.instanceId=D,this._cols=I,this._rows=w,this._terminalService=v,this.id=0,this.shouldPersist=!1,this._onProcessData=this._register(new t.Emitter),this.onProcessData=this._onProcessData.event,this._onProcessReady=this._register(new t.Emitter),this._onStart=this._register(new t.Emitter),this.onStart=this._onStart.event,this._onInput=this._register(new t.Emitter),this.onInput=this._onInput.event,this._onBinary=this._register(new t.Emitter),this.onBinary=this._onBinary.event,this._onResize=this._register(new t.Emitter),this.onResize=this._onResize.event,this._onAcknowledgeDataEvent=this._register(new t.Emitter),this.onAcknowledgeDataEvent=this._onAcknowledgeDataEvent.event,this._onShutdown=this._register(new t.Emitter),this.onShutdown=this._onShutdown.event,this._onRequestInitialCwd=this._register(new t.Emitter),this.onRequestInitialCwd=this._onRequestInitialCwd.event,this._onRequestCwd=this._register(new t.Emitter),this.onRequestCwd=this._onRequestCwd.event,this._onRequestLatency=this._register(new t.Emitter),this.onRequestLatency=this._onRequestLatency.event,this._onDidChangeProperty=this._register(new t.Emitter),this.onDidChangeProperty=this._onDidChangeProperty.event,this._onProcessExit=this._register(new t.Emitter),this.onProcessExit=this._onProcessExit.event,this._pendingInitialCwdRequests=[],this._pendingCwdRequests=[],this._pendingLatencyRequests=[]}get onProcessReady(){return this._onProcessReady.event}emitData(D){this._onProcessData.fire(D)}emitTitle(D){this._onDidChangeProperty.fire({type:"title",value:D})}emitReady(D,I){this._onProcessReady.fire({pid:D,cwd:I})}emitProcessProperty({type:D,value:I}){switch(D){case"cwd":this.emitCwd(I);break;case"initialCwd":this.emitInitialCwd(I);break;case"title":this.emitTitle(I);break;case"overrideDimensions":this.emitOverrideDimensions(I);break;case"resolvedShellLaunchConfig":this.emitResolvedShellLaunchConfig(I);break}}emitExit(D){this._onProcessExit.fire(D),this.dispose()}emitOverrideDimensions(D){this._onDidChangeProperty.fire({type:"overrideDimensions",value:D})}emitResolvedShellLaunchConfig(D){this._onDidChangeProperty.fire({type:"resolvedShellLaunchConfig",value:D})}emitInitialCwd(D){for(;this._pendingInitialCwdRequests.length>0;)this._pendingInitialCwdRequests.pop()(D)}emitCwd(D){for(;this._pendingCwdRequests.length>0;)this._pendingCwdRequests.pop()(D)}emitLatency(D){for(;this._pendingLatencyRequests.length>0;)this._pendingLatencyRequests.pop()(D)}async start(){return this._terminalService.requestStartExtensionTerminal(this,this._cols,this._rows)}shutdown(D){this._onShutdown.fire(D)}input(D){this._onInput.fire(D)}resize(D,I){this._onResize.fire({cols:D,rows:I})}acknowledgeDataEvent(){}async setUnicodeVersion(D){}async processBinary(D){this._onBinary.fire(D)}getInitialCwd(){return new Promise(D=>{this._onRequestInitialCwd.fire(),this._pendingInitialCwdRequests.push(D)})}getCwd(){return new Promise(D=>{this._onRequestCwd.fire(),this._pendingCwdRequests.push(D)})}getLatency(){return new Promise(D=>{this._onRequestLatency.fire(),this._pendingLatencyRequests.push(D)})}async refreshProperty(D){}async updateProperty(D,I){}};A=Ee([W(3,_.ITerminalService)],A),e.TerminalProcessExtHostProxy=A}),define(ne[591],re([1,0,33,6,2,81,8,32,63,12]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getColorForSeverity=e.TerminalStatusList=e.TerminalStatus=void 0;var v;(function(c){c.Bell="bell",c.Disconnected="disconnected",c.RelaunchNeeded="relaunch-needed"})(v=e.TerminalStatus||(e.TerminalStatus={}));let C=class extends _.Disposable{constructor(i){super();this._configurationService=i,this._statuses=new Map,this._statusTimeouts=new Map,this._onDidAddStatus=this._register(new f.Emitter),this._onDidRemoveStatus=this._register(new f.Emitter),this._onDidChangePrimaryStatus=this._register(new f.Emitter)}get onDidAddStatus(){return this._onDidAddStatus.event}get onDidRemoveStatus(){return this._onDidRemoveStatus.event}get onDidChangePrimaryStatus(){return this._onDidChangePrimaryStatus.event}get primary(){let i;for(const S of this._statuses.values())(!i||S.severity>=i.severity)&&(i=S);return i}get statuses(){return Array.from(this._statuses.values())}add(i,S){i=this._applyAnimationSetting(i);const s=this._statusTimeouts.get(i.id);if(s&&(window.clearTimeout(s),this._statusTimeouts.delete(i.id)),S&&S>0){const l=window.setTimeout(()=>this.remove(i),S);this._statusTimeouts.set(i.id,l)}if(!this._statuses.has(i.id)){const l=this.primary;this._statuses.set(i.id,i),this._onDidAddStatus.fire(i);const r=this.primary;l!==r&&this._onDidChangePrimaryStatus.fire(r)}}remove(i){const S=typeof i=="string"?this._statuses.get(i):i;if(S&&this._statuses.get(S.id)){const s=this.primary?.id===S.id;this._statuses.delete(S.id),this._onDidRemoveStatus.fire(S),s&&this._onDidChangePrimaryStatus.fire(this.primary)}}toggle(i,S){S?this.add(i):this.remove(i)}_applyAnimationSetting(i){if(!i.icon||w.ThemeIcon.getModifier(i.icon)!=="spin"||this._configurationService.getValue("terminal.integrated.tabs.enableAnimation"))return i;let S;return i.icon.id===I.spinningLoading.id?S=t.Codicon.play:S=w.ThemeIcon.modify(i.icon,void 0),{...i,icon:S}}};C=Ee([W(0,k.IConfigurationService)],C),e.TerminalStatusList=C;function o(c){switch(c){case A.default.Error:return D.listErrorForeground;case A.default.Warning:return D.listWarningForeground;default:return""}}e.getColorForSeverity=o}),define(ne[2218],re([1,0,1761,105,6,18,591]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalDecorationsProvider=void 0;let D=class{constructor(w){this._terminalService=w,this.label=(0,t.localize)(0,null),this._onDidChange=new _.Emitter,this._terminalService.onDidChangeInstancePrimaryStatus(v=>this._onDidChange.fire([v.resource]))}get onDidChange(){return this._onDidChange.event}provideDecorations(w){if(w.scheme!==A.Schemas.vscodeTerminal)return;const v=this._terminalService.getInstanceFromResource(w);if(!v)return;const C=v?.statusList?.primary;if(!!C?.icon)return{color:(0,k.getColorForSeverity)(C.severity),letter:C.icon,tooltip:C.tooltip}}dispose(){this.dispose()}};D=Ee([W(0,f.ITerminalService)],D),e.TerminalDecorationsProvider=D}),define(ne[819],re([1,0,1773]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getShellIntegrationTooltip=void 0;function f(A){switch(A){case 0:case 1:return(0,t.localize)(0,null);case 2:return(0,t.localize)(1,null);case 3:return(0,t.localize)(2,null)}}function _(A,k){let D="";const I=[];if(A.capabilities.has(2)&&I.push(2),A.capabilities.has(0)&&I.push(0),I.length>0){D+=`${k?` --- `:` `} ${(0,t.localize)(3,null)}`;for(const w of I)D+=` - ${f(w)}`}return D}e.getShellIntegrationTooltip=_}),define(ne[418],re([1,0,170,18,9]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getInstanceFromResource=e.getTerminalResourcesFromDragEvent=e.getTerminalUri=e.parseTerminalUri=void 0;function A(w){const[,v,C]=w.path.split("/");if(!v||!Number.parseInt(C))throw new Error(`Could not parse terminal uri for resource ${w}`);return{workspaceId:v,instanceId:Number.parseInt(C)}}e.parseTerminalUri=A;function k(w,v,C){return _.URI.from({scheme:f.Schemas.vscodeTerminal,path:`/${w}/${v}`,fragment:C||void 0})}e.getTerminalUri=k;function D(w){const v=w.dataTransfer?.getData(t.DataTransfers.TERMINALS);if(v){const C=JSON.parse(v),o=[];for(const c of C)o.push(_.URI.parse(c));return o.length===0?void 0:o}}e.getTerminalResourcesFromDragEvent=D;function I(w,v){if(v){for(const C of w)if(C.resource.path===v.path)return C}}e.getInstanceFromResource=I}),define(ne[2219],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalWidgetManager=void 0;class t{constructor(){this._attached=new Map}attachToElement(_){this._container||(this._container=document.createElement("div"),this._container.classList.add("terminal-widget-container"),_.appendChild(this._container))}dispose(){this._container&&this._container.parentElement&&(this._container.parentElement.removeChild(this._container),this._container=void 0)}attachWidget(_){if(!!this._container)return this._attached.get(_.id)?.dispose(),_.attach(this._container),this._attached.set(_.id,_),{dispose:()=>{this._attached.get(_.id)===_&&(this._attached.delete(_.id),_.dispose())}}}}e.TerminalWidgetManager=t}),define(ne[2220],re([1,0,6,2]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineDataEventAddon=void 0;class _ extends f.Disposable{constructor(){super(...arguments);this._isOsSet=!1,this._onLineData=this._register(new t.Emitter),this.onLineData=this._onLineData.event}activate(k){this._xterm=k,this._register(k.onLineFeed(()=>{const D=k.buffer,I=D.active.getLine(D.active.baseY+D.active.cursorY);I&&!I.isWrapped&&this._sendLineData(D.active,D.active.baseY+D.active.cursorY-1)})),this._register((0,f.toDisposable)(()=>{const D=k.buffer;this._sendLineData(D.active,D.active.baseY+D.active.cursorY)}))}setOperatingSystem(k){if(!(this._isOsSet||!this._xterm)&&(this._isOsSet=!0,k===1)){const D=this._xterm;this._register(D.parser.registerCsiHandler({final:"H"},()=>{const I=D.buffer;return this._sendLineData(I.active,I.active.baseY+I.active.cursorY),!1}))}}_sendLineData(k,D){let I=k.getLine(D);if(!I)return;let w=I.translateToString(!0);for(;D>0&&I.isWrapped&&(I=k.getLine(--D),!!I);)w=I.translateToString(!1)+w;this._onLineData.fire(w)}}e.LineDataEventAddon=_}),define(ne[2221],re([1,0,10]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NavigationModeAddon=void 0;class f{constructor(A){this._navigationModeContextKey=A}activate(A){this._terminal=A}dispose(){}exitNavigationMode(){!this._terminal||(this._terminal.scrollToBottom(),this._terminal.focus())}focusPreviousLine(){if(!this._terminal||!this._terminal.element)return;if(document.activeElement&&document.activeElement.parentElement&&document.activeElement.parentElement.classList.contains("xterm-accessibility-tree")){const w=document.activeElement.previousElementSibling;if(w){w.focus();const v=(0,t.addDisposableListener)(w,"blur",()=>{this._navigationModeContextKey.set(!1),v.dispose()});this._navigationModeContextKey.set(!0)}return}const A=this._terminal.element.querySelector(".xterm-accessibility-tree");if(!A)return;const k=Math.max(this._terminal.buffer.active.cursorY-1,0);if(A.childElementCount<k)return;const D=A.childNodes.item(k);D.focus();const I=(0,t.addDisposableListener)(D,"blur",()=>{this._navigationModeContextKey.set(!1),I.dispose()});this._navigationModeContextKey.set(!0)}focusNextLine(){if(!this._terminal||!this._terminal.element)return;if(document.activeElement&&document.activeElement.parentElement&&document.activeElement.parentElement.classList.contains("xterm-accessibility-tree")){const w=document.activeElement.nextElementSibling;if(w){w.focus();const v=(0,t.addDisposableListener)(w,"blur",()=>{this._navigationModeContextKey.set(!1),v.dispose()});this._navigationModeContextKey.set(!0)}return}const A=this._terminal.element.querySelector(".xterm-accessibility-tree");if(!A)return;const k=this._terminal.buffer.active.cursorY;if(A.childElementCount<k)return;const D=A.childNodes.item(k);D.focus();const I=(0,t.addDisposableListener)(D,"blur",()=>{this._navigationModeContextKey.set(!1),I.dispose()});this._navigationModeContextKey.set(!0)}}e.NavigationModeAddon=f}),define(ne[325],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EnvironmentVariableMutatorType=e.IEnvironmentVariableService=void 0,e.IEnvironmentVariableService=(0,t.createDecorator)("environmentVariableService");var f;(function(_){_[_.Replace=1]="Replace",_[_.Append=2]="Append",_[_.Prepend=3]="Prepend"})(f=e.EnvironmentVariableMutatorType||(e.EnvironmentVariableMutatorType={}))}),define(ne[2222],re([1,0,325,105,1752,33]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EnvironmentVariableInfoChangesActive=e.EnvironmentVariableInfoStale=void 0;let k=class{constructor(v,C,o){this._diff=v,this._terminalId=C,this._terminalService=o,this.requiresAction=!0}getInfo(){const v=[],C=[];this._diff.added.forEach((c,i)=>{c.forEach(S=>v.push(I(S.type,S.value,i)))}),this._diff.changed.forEach((c,i)=>{c.forEach(S=>v.push(I(S.type,S.value,i)))}),this._diff.removed.forEach((c,i)=>{c.forEach(S=>C.push(I(S.type,S.value,i)))});let o="";return v.length>0&&(o=(0,_.localize)(0,null),o+=` `,o+="```\n",o+=v.join(` `),o+="\n```"),C.length>0&&(o+=o.length>0?` `:"",o+=(0,_.localize)(1,null),o+=` `,o+="```\n",o+=C.join(` `),o+="\n```"),o}getIcon(){return A.Codicon.warning}getActions(){return[{label:(0,_.localize)(2,null),run:()=>this._terminalService.getInstanceFromId(this._terminalId)?.relaunch(),commandId:"workbench.action.terminal.relaunch"}]}};k=Ee([W(2,f.ITerminalService)],k),e.EnvironmentVariableInfoStale=k;class D{constructor(v){this._collection=v,this.requiresAction=!1}getInfo(){const v=[];return this._collection.map.forEach((o,c)=>{o.forEach(i=>v.push(I(i.type,i.value,c)))}),(0,_.localize)(3,null)+"\n\n```\n"+v.join(` `)+"\n```"}getIcon(){return A.Codicon.info}}e.EnvironmentVariableInfoChangesActive=D;function I(w,v,C){switch(w){case t.EnvironmentVariableMutatorType.Prepend:return`${C}=${v}\${env:${C}}`;case t.EnvironmentVariableMutatorType.Append:return`${C}=\${env:${C}}${v}`;default:return`${C}=${v}`}}}),define(ne[2223],re([1,0,14,325]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergedEnvironmentVariableCollection=void 0;class _{constructor(I){this.map=new Map,I.forEach((w,v)=>{const C=w.map.entries();let o=C.next();for(;!o.done;){const c=o.value[0];let i=this.map.get(c);if(i||(i=[],this.map.set(c,i)),i.length>0&&i[0].type===f.EnvironmentVariableMutatorType.Replace){o=C.next();continue}const S=o.value[1];i.unshift({extensionIdentifier:v,value:S.value,type:S.type}),o=C.next()}})}applyToProcessEnvironment(I,w){let v;t.isWindows&&(v={},Object.keys(I).forEach(C=>v[C.toLowerCase()]=C)),this.map.forEach((C,o)=>{const c=t.isWindows&&v[o.toLowerCase()]||o;C.forEach(i=>{const S=w?w(i.value):i.value;switch(i.type){case f.EnvironmentVariableMutatorType.Append:I[c]=(I[c]||"")+S;break;case f.EnvironmentVariableMutatorType.Prepend:I[c]=S+(I[c]||"");break;case f.EnvironmentVariableMutatorType.Replace:I[c]=S;break}})})}diff(I){const w=new Map,v=new Map,C=new Map;if(I.map.forEach((o,c)=>{const i=this.map.get(c),S=A(o,i);S&&w.set(c,S)}),this.map.forEach((o,c)=>{const i=I.map.get(c),S=A(o,i);S&&C.set(c,S)}),this.map.forEach((o,c)=>{const i=I.map.get(c),S=k(o,i);S&&v.set(c,S)}),!(w.size===0&&v.size===0&&C.size===0))return{added:w,changed:v,removed:C}}}e.MergedEnvironmentVariableCollection=_;function A(D,I){if(!I)return D;const w=new Set;I.forEach(C=>w.add(C.extensionIdentifier));const v=[];return D.forEach(C=>{w.has(C.extensionIdentifier)||v.push(C)}),v.length===0?void 0:v}function k(D,I){if(!I)return;const w=new Map;I.forEach(C=>w.set(C.extensionIdentifier,C));const v=[];return D.forEach(C=>{const o=w.get(C.extensionIdentifier);o&&(C.type!==o.type||C.value!==o.value)&&v.push(o)}),v.length===0?void 0:v}}),define(ne[592],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.deserializeEnvironmentVariableCollection=e.serializeEnvironmentVariableCollection=void 0;function t(_){return[..._.entries()]}e.serializeEnvironmentVariableCollection=t;function f(_){return new Map(_)}e.deserializeEnvironmentVariableCollection=f}),define(ne[820],re([1,0,2,55,8,5,24]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalPersistedHistory=e.getDirectoryHistory=e.getCommandHistory=void 0;var D;(function(i){i[i.DefaultHistoryLimit=100]="DefaultHistoryLimit"})(D||(D={}));var I;(function(i){i.Entries="terminal.history.entries",i.Timestamp="terminal.history.timestamp"})(I||(I={}));let w;function v(i){return w||(w=i.get(A.IInstantiationService).createInstance(c,"commands")),w}e.getCommandHistory=v;let C;function o(i){return C||(C=i.get(A.IInstantiationService).createInstance(c,"dirs")),C}e.getDirectoryHistory=o;let c=class extends t.Disposable{constructor(S,s,l){super();this._storageDataKey=S,this._configurationService=s,this._storageService=l,this._timestamp=0,this._isReady=!1,this._isStale=!0,this._entries=new f.LRUCache(this._getHistoryLimit()),this._configurationService.onDidChangeConfiguration(r=>{r.affectsConfiguration("terminal.integrated.shellIntegration.history")&&(this._entries.limit=this._getHistoryLimit())}),this._storageService.onDidChangeValue(r=>{r.key===this._getTimestampStorageKey()&&!this._isStale&&(this._isStale=this._storageService.getNumber(this._getTimestampStorageKey(),0,0)!==this._timestamp)})}get entries(){return this._ensureUpToDate(),this._entries.entries()}add(S,s){this._ensureUpToDate(),this._entries.set(S,s),this._saveState()}remove(S){this._ensureUpToDate(),this._entries.delete(S),this._saveState()}clear(){this._ensureUpToDate(),this._entries.clear(),this._saveState()}_ensureUpToDate(){this._isReady||(this._loadState(),this._isReady=!0),this._isStale&&(this._entries.clear(),this._loadState(),this._isStale=!1)}_loadState(){this._timestamp=this._storageService.getNumber(this._getTimestampStorageKey(),0,0);const S=this._loadPersistedState();if(S)for(const s of S.entries)this._entries.set(s.key,s.value)}_loadPersistedState(){const S=this._storageService.get(this._getEntriesStorageKey(),0);if(S===void 0||S.length===0)return;let s;try{s=JSON.parse(S)}catch{return}return s}_saveState(){const S={entries:[]};this._entries.forEach((s,l)=>S.entries.push({key:l,value:s})),this._storageService.store(this._getEntriesStorageKey(),JSON.stringify(S),0,1),this._timestamp=Date.now(),this._storageService.store(this._getTimestampStorageKey(),this._timestamp,0,1)}_getHistoryLimit(){const S=this._configurationService.getValue("terminal.integrated.shellIntegration.history");return typeof S=="number"?S:100}_getTimestampStorageKey(){return`terminal.history.timestamp.${this._storageDataKey}`}_getEntriesStorageKey(){return`terminal.history.entries.${this._storageDataKey}`}};c=Ee([W(1,_.IConfigurationService),W(2,k.IStorageService)],c),e.TerminalPersistedHistory=c}),define(ne[120],re([1,0,1777,5,17]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.terminalContributionsDescriptor=e.DEFAULT_COMMANDS_TO_SKIP_SHELL=e.TerminalCommandId=e.QUICK_LAUNCH_PROFILE_CHOICE=e.ProcessState=e.DEFAULT_LOCAL_ECHO_EXCLUDE=e.TerminalExtensions=e.ITerminalProfileService=e.ShellIntegrationExitCode=e.ITerminalProfileResolverService=e.SUGGESTIONS_FONT_WEIGHT=e.DEFAULT_BOLD_FONT_WEIGHT=e.DEFAULT_FONT_WEIGHT=e.MAXIMUM_FONT_WEIGHT=e.MINIMUM_FONT_WEIGHT=e.DEFAULT_LINE_HEIGHT=e.MINIMUM_LETTER_SPACING=e.DEFAULT_LETTER_SPACING=e.TERMINAL_ACTION_CATEGORY=e.TERMINAL_CONFIG_SECTION=e.TerminalCursorStyle=e.TERMINAL_CREATION_COMMANDS=e.TERMINAL_VIEW_ID=void 0,e.TERMINAL_VIEW_ID="terminal",e.TERMINAL_CREATION_COMMANDS=["workbench.action.terminal.toggleTerminal","workbench.action.terminal.new","workbench.action.togglePanel","workbench.action.terminal.focus"],e.TerminalCursorStyle={BLOCK:"block",LINE:"line",UNDERLINE:"underline"},e.TERMINAL_CONFIG_SECTION="terminal.integrated",e.TERMINAL_ACTION_CATEGORY=t.localize(0,null),e.DEFAULT_LETTER_SPACING=0,e.MINIMUM_LETTER_SPACING=-5,e.DEFAULT_LINE_HEIGHT=1,e.MINIMUM_FONT_WEIGHT=1,e.MAXIMUM_FONT_WEIGHT=1e3,e.DEFAULT_FONT_WEIGHT="normal",e.DEFAULT_BOLD_FONT_WEIGHT="bold",e.SUGGESTIONS_FONT_WEIGHT=["normal","bold","100","200","300","400","500","600","700","800","900"],e.ITerminalProfileResolverService=(0,f.createDecorator)("terminalProfileResolverService"),e.ShellIntegrationExitCode=633,e.ITerminalProfileService=(0,f.createDecorator)("terminalProfileService"),e.TerminalExtensions={Backend:"workbench.contributions.terminal.processBackend"};class A{constructor(){this._backends=new Map}registerTerminalBackend(w){const v=w.remoteAuthority??"";if(this._backends.has(v))throw new Error(`A terminal backend with remote authority '${v}' was already registered.`);this._backends.set(v,w)}getTerminalBackend(w){return this._backends.get(w??"")}}_.Registry.add(e.TerminalExtensions.Backend,new A),e.DEFAULT_LOCAL_ECHO_EXCLUDE=["vim","vi","nano","tmux"];var k;(function(I){I[I.Uninitialized=1]="Uninitialized",I[I.Launching=2]="Launching",I[I.Running=3]="Running",I[I.KilledDuringLaunch=4]="KilledDuringLaunch",I[I.KilledByUser=5]="KilledByUser",I[I.KilledByProcess=6]="KilledByProcess"})(k=e.ProcessState||(e.ProcessState={})),e.QUICK_LAUNCH_PROFILE_CHOICE="workbench.action.terminal.profile.choice";var D;(function(I){I.FindNext="workbench.action.terminal.findNext",I.FindPrevious="workbench.action.terminal.findPrevious",I.Toggle="workbench.action.terminal.toggleTerminal",I.Kill="workbench.action.terminal.kill",I.KillEditor="workbench.action.terminal.killEditor",I.KillInstance="workbench.action.terminal.killInstance",I.KillAll="workbench.action.terminal.killAll",I.QuickKill="workbench.action.terminal.quickKill",I.ConfigureTerminalSettings="workbench.action.terminal.openSettings",I.OpenDetectedLink="workbench.action.terminal.openDetectedLink",I.OpenWordLink="workbench.action.terminal.openWordLink",I.OpenFileLink="workbench.action.terminal.openFileLink",I.OpenWebLink="workbench.action.terminal.openUrlLink",I.RunRecentCommand="workbench.action.terminal.runRecentCommand",I.GoToRecentDirectory="workbench.action.terminal.goToRecentDirectory",I.CopySelection="workbench.action.terminal.copySelection",I.CopySelectionAsHtml="workbench.action.terminal.copySelectionAsHtml",I.SelectAll="workbench.action.terminal.selectAll",I.DeleteWordLeft="workbench.action.terminal.deleteWordLeft",I.DeleteWordRight="workbench.action.terminal.deleteWordRight",I.DeleteToLineStart="workbench.action.terminal.deleteToLineStart",I.MoveToLineStart="workbench.action.terminal.moveToLineStart",I.MoveToLineEnd="workbench.action.terminal.moveToLineEnd",I.New="workbench.action.terminal.new",I.NewWithCwd="workbench.action.terminal.newWithCwd",I.NewLocal="workbench.action.terminal.newLocal",I.NewInActiveWorkspace="workbench.action.terminal.newInActiveWorkspace",I.NewWithProfile="workbench.action.terminal.newWithProfile",I.Split="workbench.action.terminal.split",I.SplitInstance="workbench.action.terminal.splitInstance",I.SplitInActiveWorkspace="workbench.action.terminal.splitInActiveWorkspace",I.Unsplit="workbench.action.terminal.unsplit",I.UnsplitInstance="workbench.action.terminal.unsplitInstance",I.JoinInstance="workbench.action.terminal.joinInstance",I.Join="workbench.action.terminal.join",I.Relaunch="workbench.action.terminal.relaunch",I.FocusPreviousPane="workbench.action.terminal.focusPreviousPane",I.ShowTabs="workbench.action.terminal.showTabs",I.CreateTerminalEditor="workbench.action.createTerminalEditor",I.CreateTerminalEditorSide="workbench.action.createTerminalEditorSide",I.FocusTabs="workbench.action.terminal.focusTabs",I.FocusNextPane="workbench.action.terminal.focusNextPane",I.ResizePaneLeft="workbench.action.terminal.resizePaneLeft",I.ResizePaneRight="workbench.action.terminal.resizePaneRight",I.ResizePaneUp="workbench.action.terminal.resizePaneUp",I.CreateWithProfileButton="workbench.action.terminal.createProfileButton",I.SizeToContentWidth="workbench.action.terminal.sizeToContentWidth",I.SizeToContentWidthInstance="workbench.action.terminal.sizeToContentWidthInstance",I.ResizePaneDown="workbench.action.terminal.resizePaneDown",I.Focus="workbench.action.terminal.focus",I.FocusNext="workbench.action.terminal.focusNext",I.FocusPrevious="workbench.action.terminal.focusPrevious",I.Paste="workbench.action.terminal.paste",I.PasteSelection="workbench.action.terminal.pasteSelection",I.SelectDefaultProfile="workbench.action.terminal.selectDefaultShell",I.RunSelectedText="workbench.action.terminal.runSelectedText",I.RunActiveFile="workbench.action.terminal.runActiveFile",I.SwitchTerminal="workbench.action.terminal.switchTerminal",I.ScrollDownLine="workbench.action.terminal.scrollDown",I.ScrollDownPage="workbench.action.terminal.scrollDownPage",I.ScrollToBottom="workbench.action.terminal.scrollToBottom",I.ScrollUpLine="workbench.action.terminal.scrollUp",I.ScrollUpPage="workbench.action.terminal.scrollUpPage",I.ScrollToTop="workbench.action.terminal.scrollToTop",I.Clear="workbench.action.terminal.clear",I.ClearSelection="workbench.action.terminal.clearSelection",I.ChangeIcon="workbench.action.terminal.changeIcon",I.ChangeIconPanel="workbench.action.terminal.changeIconPanel",I.ChangeIconInstance="workbench.action.terminal.changeIconInstance",I.ChangeColor="workbench.action.terminal.changeColor",I.ChangeColorPanel="workbench.action.terminal.changeColorPanel",I.ChangeColorInstance="workbench.action.terminal.changeColorInstance",I.Rename="workbench.action.terminal.rename",I.RenamePanel="workbench.action.terminal.renamePanel",I.RenameInstance="workbench.action.terminal.renameInstance",I.RenameWithArgs="workbench.action.terminal.renameWithArg",I.FindFocus="workbench.action.terminal.focusFind",I.FindHide="workbench.action.terminal.hideFind",I.QuickOpenTerm="workbench.action.quickOpenTerm",I.ScrollToPreviousCommand="workbench.action.terminal.scrollToPreviousCommand",I.ScrollToNextCommand="workbench.action.terminal.scrollToNextCommand",I.SelectToPreviousCommand="workbench.action.terminal.selectToPreviousCommand",I.SelectToNextCommand="workbench.action.terminal.selectToNextCommand",I.SelectToPreviousLine="workbench.action.terminal.selectToPreviousLine",I.SelectToNextLine="workbench.action.terminal.selectToNextLine",I.ToggleEscapeSequenceLogging="toggleEscapeSequenceLogging",I.SendSequence="workbench.action.terminal.sendSequence",I.ToggleFindRegex="workbench.action.terminal.toggleFindRegex",I.ToggleFindWholeWord="workbench.action.terminal.toggleFindWholeWord",I.ToggleFindCaseSensitive="workbench.action.terminal.toggleFindCaseSensitive",I.NavigationModeExit="workbench.action.terminal.navigationModeExit",I.NavigationModeFocusNext="workbench.action.terminal.navigationModeFocusNext",I.NavigationModeFocusPrevious="workbench.action.terminal.navigationModeFocusPrevious",I.ShowEnvironmentInformation="workbench.action.terminal.showEnvironmentInformation",I.SearchWorkspace="workbench.action.terminal.searchWorkspace",I.AttachToSession="workbench.action.terminal.attachToSession",I.DetachSession="workbench.action.terminal.detachSession",I.MoveToEditor="workbench.action.terminal.moveToEditor",I.MoveToEditorInstance="workbench.action.terminal.moveToEditorInstance",I.MoveToTerminalPanel="workbench.action.terminal.moveToTerminalPanel",I.SetDimensions="workbench.action.terminal.setDimensions",I.ClearCommandHistory="workbench.action.terminal.clearCommandHistory"})(D=e.TerminalCommandId||(e.TerminalCommandId={})),e.DEFAULT_COMMANDS_TO_SKIP_SHELL=["workbench.action.terminal.clearSelection","workbench.action.terminal.clear","workbench.action.terminal.copySelection","workbench.action.terminal.copySelectionAsHtml","workbench.action.terminal.deleteToLineStart","workbench.action.terminal.deleteWordLeft","workbench.action.terminal.deleteWordRight","workbench.action.terminal.focusFind","workbench.action.terminal.hideFind","workbench.action.terminal.findNext","workbench.action.terminal.findPrevious","workbench.action.terminal.goToRecentDirectory","workbench.action.terminal.toggleFindRegex","workbench.action.terminal.toggleFindWholeWord","workbench.action.terminal.toggleFindCaseSensitive","workbench.action.terminal.focusNextPane","workbench.action.terminal.focusNext","workbench.action.terminal.focusPreviousPane","workbench.action.terminal.focusPrevious","workbench.action.terminal.focus","workbench.action.terminal.sizeToContentWidth","workbench.action.terminal.kill","workbench.action.terminal.killEditor","workbench.action.terminal.moveToEditor","workbench.action.terminal.moveToLineEnd","workbench.action.terminal.moveToLineStart","workbench.action.terminal.moveToTerminalPanel","workbench.action.terminal.newInActiveWorkspace","workbench.action.terminal.new","workbench.action.terminal.paste","workbench.action.terminal.pasteSelection","workbench.action.terminal.resizePaneDown","workbench.action.terminal.resizePaneLeft","workbench.action.terminal.resizePaneRight","workbench.action.terminal.resizePaneUp","workbench.action.terminal.runActiveFile","workbench.action.terminal.runSelectedText","workbench.action.terminal.runRecentCommand","workbench.action.terminal.scrollDown","workbench.action.terminal.scrollDownPage","workbench.action.terminal.scrollToBottom","workbench.action.terminal.scrollToNextCommand","workbench.action.terminal.scrollToPreviousCommand","workbench.action.terminal.scrollToTop","workbench.action.terminal.scrollUp","workbench.action.terminal.scrollUpPage","workbench.action.terminal.sendSequence","workbench.action.terminal.selectAll","workbench.action.terminal.selectToNextCommand","workbench.action.terminal.selectToNextLine","workbench.action.terminal.selectToPreviousCommand","workbench.action.terminal.selectToPreviousLine","workbench.action.terminal.splitInActiveWorkspace","workbench.action.terminal.split","workbench.action.terminal.toggleTerminal","workbench.action.terminal.navigationModeExit","workbench.action.terminal.navigationModeFocusNext","workbench.action.terminal.navigationModeFocusPrevious","editor.action.toggleTabFocusMode","notifications.hideList","notifications.hideToasts","workbench.action.quickOpen","workbench.action.quickOpenPreviousEditor","workbench.action.showCommands","workbench.action.tasks.build","workbench.action.tasks.restartTask","workbench.action.tasks.runTask","workbench.action.tasks.reRunTask","workbench.action.tasks.showLog","workbench.action.tasks.showTasks","workbench.action.tasks.terminate","workbench.action.tasks.test","workbench.action.toggleFullScreen","workbench.action.terminal.focusAtIndex1","workbench.action.terminal.focusAtIndex2","workbench.action.terminal.focusAtIndex3","workbench.action.terminal.focusAtIndex4","workbench.action.terminal.focusAtIndex5","workbench.action.terminal.focusAtIndex6","workbench.action.terminal.focusAtIndex7","workbench.action.terminal.focusAtIndex8","workbench.action.terminal.focusAtIndex9","workbench.action.focusSecondEditorGroup","workbench.action.focusThirdEditorGroup","workbench.action.focusFourthEditorGroup","workbench.action.focusFifthEditorGroup","workbench.action.focusSixthEditorGroup","workbench.action.focusSeventhEditorGroup","workbench.action.focusEighthEditorGroup","workbench.action.focusNextPart","workbench.action.focusPreviousPart","workbench.action.nextPanelView","workbench.action.previousPanelView","workbench.action.nextSideBarView","workbench.action.previousSideBarView","workbench.action.debug.start","workbench.action.debug.stop","workbench.action.debug.run","workbench.action.debug.restart","workbench.action.debug.continue","workbench.action.debug.pause","workbench.action.debug.stepInto","workbench.action.debug.stepOut","workbench.action.debug.stepOver","workbench.action.nextEditor","workbench.action.previousEditor","workbench.action.nextEditorInGroup","workbench.action.previousEditorInGroup","workbench.action.openNextRecentlyUsedEditor","workbench.action.openPreviousRecentlyUsedEditor","workbench.action.openNextRecentlyUsedEditorInGroup","workbench.action.openPreviousRecentlyUsedEditorInGroup","workbench.action.quickOpenPreviousRecentlyUsedEditor","workbench.action.quickOpenLeastRecentlyUsedEditor","workbench.action.quickOpenPreviousRecentlyUsedEditorInGroup","workbench.action.quickOpenLeastRecentlyUsedEditorInGroup","workbench.action.focusActiveEditorGroup","workbench.action.focusFirstEditorGroup","workbench.action.focusLastEditorGroup","workbench.action.firstEditorInGroup","workbench.action.lastEditorInGroup","workbench.action.navigateUp","workbench.action.navigateDown","workbench.action.navigateRight","workbench.action.navigateLeft","workbench.action.togglePanel","workbench.action.quickOpenView","workbench.action.toggleMaximizedPanel"],e.terminalContributionsDescriptor={extensionPoint:"terminal",defaultExtensionKind:["workspace"],jsonSchema:{description:t.localize(1,null),type:"object",properties:{types:{type:"array",description:t.localize(2,null),items:{type:"object",required:["command","title"],properties:{command:{description:t.localize(3,null),type:"string"},title:{description:t.localize(4,null),type:"string"},icon:{description:t.localize(5,null),anyOf:[{type:"string"},{type:"object",properties:{light:{description:t.localize(6,null),type:"string"},dark:{description:t.localize(7,null),type:"string"}}}]}}}},profiles:{type:"array",description:t.localize(8,null),items:{type:"object",required:["id","title"],defaultSnippets:[{body:{id:"$1",title:"$2"}}],properties:{id:{description:t.localize(9,null),type:"string"},title:{description:t.localize(10,null),type:"string"},icon:{description:t.localize(11,null),anyOf:[{type:"string"},{type:"object",properties:{light:{description:t.localize(12,null),type:"string"},dark:{description:t.localize(13,null),type:"string"}}}]}}}}}}}}),define(ne[2224],re([1,0,8,361,120]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalWordLinkDetector=void 0;var A;(function(D){D[D.MaxLineLength=2e3]="MaxLineLength"})(A||(A={}));let k=class{constructor(I,w){this.xterm=I,this._configurationService=w}detect(I,w,v){const C=[],o=this._configurationService.getValue(_.TERMINAL_CONFIG_SECTION).wordSeparators,c=(0,f.getXtermLineContent)(this.xterm.buffer.active,w,v,this.xterm.cols);if(c===""||c.length>2e3)return[];const i=this._parseWords(c,o);for(const S of i){if(S.text==="")continue;S.text.length>0&&S.text.charAt(S.text.length-1)===":"&&(S.text=S.text.slice(0,-1),S.endIndex--);const s=(0,f.convertLinkRangeToBuffer)(I,this.xterm.cols,{startColumn:S.startIndex+1,startLineNumber:1,endColumn:S.endIndex+1,endLineNumber:1},w);C.push({text:S.text,bufferRange:s,type:3})}return C}_parseWords(I,w){const v=[],C=w.split(""),o=I.split("");let c=0;for(let i=0;i<I.length;i++)C.includes(o[i])&&(v.push({startIndex:c,endIndex:i,text:I.substring(c,i)}),c=i+1);return c<I.length&&v.push({startIndex:c,endIndex:I.length,text:I.substring(c)}),v}};k.id="word",k=Ee([W(1,t.IConfigurationService)],k),e.TerminalWordLinkDetector=k}),define(ne[2225],re([1,0,11,66,110,6,2,29,27,120]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypeAheadAddon=e.CharPredictState=e.PredictionTimeline=e.PredictionStats=e.isTenativeCharacterPrediction=void 0;const v="",C=`${v}[`,o=`${C}?25h`,c=`${C}?25l`,i=`${C}X`,S=`${C}K`,s=/^\x1b\[[0-9;]*m/,l=/^\x1b\[?([0-9]*)(;[35])?O?([DC])/,r=/[^a-z0-9]/i,p=24,u=1e3*60*5,a=5,n=.3,h=.5,g=/^(\x1b\[(\??25[hl]|\??[0-9;]+n))+/,d=Y=>Y._core,m=Y=>{};var b;(function(Y){Y.Back="D",Y.Forwards="C"})(b||(b={}));class E{constructor($,J,ee){this.rows=$,this.cols=J,this._buffer=ee,this._x=0,this._y=1,this._baseY=1,this._x=ee.cursorX,this._y=ee.cursorY,this._baseY=ee.baseY}get x(){return this._x}get y(){return this._y}get baseY(){return this._baseY}get coordinate(){return{x:this._x,y:this._y,baseY:this._baseY}}getLine(){return this._buffer.getLine(this._y+this._baseY)}getCell($){return this.getLine()?.getCell(this._x,$)}moveTo($){return this._x=$.x,this._y=$.y+$.baseY-this._baseY,this.moveInstruction()}clone(){const $=new E(this.rows,this.cols,this._buffer);return $.moveTo(this),$}move($,J){return this._x=$,this._y=J,this.moveInstruction()}shift($=0,J=0){return this._x+=$,this._y+=J,this.moveInstruction()}moveInstruction(){return this._y>=this.rows?(this._baseY+=this._y-(this.rows-1),this._y=this.rows-1):this._y<0&&(this._baseY-=this._y,this._y=0),`${C}${this._y+1};${this._x+1}H`}}const y=(Y,$,J)=>{let ee=!1;J<0&&$.shift(-1);let te;for(;$.x>=0;){if(te=$.getCell(te),!te?.getCode())return;const se=te.getChars();if(r.test(se)){if(ee)break}else ee=!0;$.shift(J)}J<0&&$.shift(1)};var T;(function(Y){Y[Y.Success=0]="Success",Y[Y.Failure=1]="Failure",Y[Y.Buffer=2]="Buffer"})(T||(T={}));class R{constructor($){this._input=$,this.index=0}get remaining(){return this._input.length-this.index}get eof(){return this.index===this._input.length}get rest(){return this._input.slice(this.index)}eatChar($){if(this._input[this.index]===$)return this.index++,$}eatStr($){if(this._input.slice(this.index,$.length)===$)return this.index+=$.length,$}eatGradually($){const J=this.index;for(let ee=0;ee<$.length;ee++){if(ee>0&&this.eof)return 2;if(!this.eatChar($[ee]))return this.index=J,1}return 0}eatRe($){const J=$.exec(this._input.slice(this.index));if(!!J)return this.index+=J[0].length,J}eatCharCode($=0,J=$+1){const ee=this._input.charCodeAt(this.index);if(!(ee<$||ee>=J))return this.index++,ee}}class O{constructor(){this.clearAfterTimeout=!1}apply(){return""}rollback(){return""}rollForwards(){return""}matches(){return 1}}class x{constructor($){this.inner=$}apply($,J){return this._appliedCursor=J.clone(),this.inner.apply($,this._appliedCursor),""}rollback($){return this.inner.rollback($.clone()),""}rollForwards($,J){return this._appliedCursor&&$.moveTo(this._appliedCursor),J}matches($){return this.inner.matches($)}}const F=Y=>Y instanceof x&&Y.inner instanceof L;e.isTenativeCharacterPrediction=F;class L{constructor($,J){this._style=$,this._char=J,this.affectsStyle=!0}apply($,J){const ee=J.getCell();return this.appliedAt=ee?{pos:J.coordinate,oldAttributes:H(ee),oldChar:ee.getChars()}:{pos:J.coordinate,oldAttributes:"",oldChar:""},J.shift(1),this._style.apply+this._char+this._style.undo}rollback($){if(!this.appliedAt)return"";const{oldAttributes:J,oldChar:ee,pos:te}=this.appliedAt;return $.moveTo(te)+(ee?`${J}${ee}${$.moveTo(te)}`:i)}rollForwards($,J){return this.appliedAt?$.clone().moveTo(this.appliedAt.pos)+J:""}matches($,J){const ee=$.index;for(;$.eatRe(s););if($.eof)return 2;if($.eatChar(this._char))return 0;if(J instanceof L){const te=$.eatGradually(`\b${J._char}${this._char}`);if(te!==1)return te}return $.index=ee,1}}class M{constructor($){this._terminal=$}apply($,J){const ee=!J.getLine()?.translateToString(void 0,J.x).trim(),te=J.coordinate,se=J.shift(-1),ie=J.getCell();return this._appliedAt=ie?{isLastChar:ee,pos:te,oldAttributes:H(ie),oldChar:ie.getChars()}:{isLastChar:ee,pos:te,oldAttributes:"",oldChar:""},se+i}rollback($){if(!this._appliedAt)return"";const{oldAttributes:J,oldChar:ee,pos:te}=this._appliedAt;return ee?J+ee+$.moveTo(te)+H(d(this._terminal)._inputHandler._curAttrData):$.moveTo(te)+i}rollForwards(){return""}matches($){if(this._appliedAt?.isLastChar){const J=$.eatGradually(`\b${C}K`);if(J!==1)return J;const ee=$.eatGradually("\b \b");if(ee!==1)return ee}return 1}}class N{apply($,J){return this._prevPosition=J.coordinate,J.move(0,J.y+1),`\r `}rollback($){return this._prevPosition?$.moveTo(this._prevPosition):""}rollForwards(){return""}matches($){return $.eatGradually(`\r `)}}class B extends N{apply($,J){return this._prevPosition=J.coordinate,J.move(0,J.y+1)," \r"}matches($){const J=$.eatGradually(" \r");return J!==1?$.eatGradually(S)===2?2:J:$.eatGradually(`\r `)}}class P{constructor($,J,ee){this._direction=$,this._moveByWords=J,this._amount=ee}apply($,J){const ee=J.x,te=J.getCell(),se=te?H(te):"",{_amount:ie,_direction:ce,_moveByWords:le}=this,ae=ce==="D"?-1:1,ue=J.clone();if(le)for(let oe=0;oe<ie;oe++)y($,ue,ae);else ue.shift(ae*ie);return this._applied={amount:Math.abs(J.x-ue.x),prevPosition:ee,prevAttrs:se,rollForward:J.moveTo(ue)},this._applied.rollForward}rollback($){return this._applied?$.move(this._applied.prevPosition,$.y)+this._applied.prevAttrs:""}rollForwards(){return""}matches($){if(!this._applied)return 1;const J=this._direction,{amount:ee,rollForward:te}=this._applied;if($.eatStr(`${C}${J}`.repeat(ee))||J==="D"&&$.eatStr("\b".repeat(ee)))return 0;if(te){const se=$.eatGradually(te);if(se!==1)return se}return $.eatGradually(`${C}${ee}${J}`)}}class V extends k.Disposable{constructor($){super();this._stats=[],this._index=0,this._addedAtTime=new WeakMap,this._changeEmitter=new A.Emitter,this.onChange=this._changeEmitter.event,this._register($.onPredictionAdded(J=>this._addedAtTime.set(J,Date.now()))),this._register($.onPredictionSucceeded(this._pushStat.bind(this,!0))),this._register($.onPredictionFailed(this._pushStat.bind(this,!1)))}get accuracy(){let $=0;for(const[,J]of this._stats)J&&$++;return $/(this._stats.length||1)}get sampleSize(){return this._stats.length}get latency(){const $=this._stats.filter(([,J])=>J).map(([J])=>J).sort();return{count:$.length,min:$[0],median:$[Math.floor($.length/2)],max:$[$.length-1]}}get maxLatency(){let $=-1/0;for(const[J,ee]of this._stats)ee&&($=Math.max(J,$));return $}_pushStat($,J){const ee=this._addedAtTime.get(J);this._stats[this._index]=[Date.now()-ee,$],this._index=(this._index+1)%p,this._changeEmitter.fire()}}e.PredictionStats=V;class z{constructor($,J){this.terminal=$,this._style=J,this._expected=[],this._currentGen=0,this._showPredictions=!1,this._addedEmitter=new A.Emitter,this.onPredictionAdded=this._addedEmitter.event,this._failedEmitter=new A.Emitter,this.onPredictionFailed=this._failedEmitter.event,this._succeededEmitter=new A.Emitter,this.onPredictionSucceeded=this._succeededEmitter.event}get _currentGenerationPredictions(){return this._expected.filter(({gen:$})=>$===this._expected[0].gen).map(({p:$})=>$)}get isShowingPredictions(){return this._showPredictions}get length(){return this._expected.length}setShowPredictions($){if($===this._showPredictions)return;this._showPredictions=$;const J=this._getActiveBuffer();if(!J)return;const ee=this._currentGenerationPredictions;$?(this.clearCursor(),this._style.expectIncomingStyle(ee.reduce((te,se)=>se.affectsStyle?te+1:te,0)),this.terminal.write(ee.map(te=>te.apply(J,this.physicalCursor(J))).join(""))):this.terminal.write(ee.reverse().map(te=>te.rollback(this.physicalCursor(J))).join(""))}undoAllPredictions(){const $=this._getActiveBuffer();this._showPredictions&&$&&this.terminal.write(this._currentGenerationPredictions.reverse().map(J=>J.rollback(this.physicalCursor($))).join("")),this._expected=[]}beforeServerInput($){const J=$;if(this._inputBuffer&&($=this._inputBuffer+$,this._inputBuffer=void 0),!this._expected.length)return this._clearPredictionState(),$;const ee=this._getActiveBuffer();if(!ee)return this._clearPredictionState(),$;let te="";const se=new R($),ie=this._expected[0].gen,ce=()=>{const le=se.eatRe(g);le&&(te+=le[0])};e:for(;this._expected.length&&se.remaining>0;){ce();const{p:le,gen:ae}=this._expected[0],ue=this.physicalCursor(ee),oe=se.index;switch(le.matches(se,this._lookBehind)){case 0:{const fe=$.slice(oe,se.index);ae===ie?te+=le.rollForwards?.(ue,fe):(le.apply(ee,this.physicalCursor(ee)),te+=fe),this._succeededEmitter.fire(le),this._lookBehind=le,this._expected.shift();break}case 2:this._inputBuffer=$.slice(oe),se.index=$.length;break e;case 1:{const fe=this._expected.filter(pe=>pe.gen===ie).reverse();te+=fe.map(({p:pe})=>pe.rollback(this.physicalCursor(ee))).join(""),fe.some(pe=>pe.p.affectsStyle)&&(te+=H(d(this.terminal)._inputHandler._curAttrData)),this._clearPredictionState(),this._failedEmitter.fire(le);break e}}}if(ce(),se.eof||(te+=se.rest,this._clearPredictionState()),this._expected.length&&ie!==this._expected[0].gen)for(const{p:le,gen:ae}of this._expected){if(ae!==this._expected[0].gen)break;le.affectsStyle&&this._style.expectIncomingStyle(),te+=le.apply(ee,this.physicalCursor(ee))}return this._showPredictions?(te.length===0||te===$||(this._physicalCursor&&(te+=this._physicalCursor.moveInstruction()),te=c+te+o),te):J}_clearPredictionState(){this._expected=[],this.clearCursor(),this._lookBehind=void 0}addPrediction($,J){if(this._expected.push({gen:this._currentGen,p:J}),this._addedEmitter.fire(J),this._currentGen!==this._expected[0].gen)return J.apply($,this.tentativeCursor($)),!1;const ee=J.apply($,this.physicalCursor($));return this._tenativeCursor=void 0,this._showPredictions&&ee&&(J.affectsStyle&&this._style.expectIncomingStyle(),this.terminal.write(ee)),!0}addBoundary($,J){let ee=!1;return $&&J&&(ee=this.addPrediction($,new x(J)),J.apply($,this.tentativeCursor($))),this._currentGen++,ee}peekEnd(){return this._expected[this._expected.length-1]?.p}peekStart(){return this._expected[0]?.p}physicalCursor($){return this._physicalCursor||(this._showPredictions&&m(this.terminal),this._physicalCursor=new E(this.terminal.rows,this.terminal.cols,$)),this._physicalCursor}tentativeCursor($){return this._tenativeCursor||(this._tenativeCursor=this.physicalCursor($).clone()),this._tenativeCursor}clearCursor(){this._physicalCursor=void 0,this._tenativeCursor=void 0}_getActiveBuffer(){const $=this.terminal.buffer.active;return $.type==="normal"?$:void 0}}e.PredictionTimeline=z;const U=Y=>{if(Y.isAttributeDefault())return[0];const $=[];return Y.isBold()&&$.push(1),Y.isDim()&&$.push(2),Y.isItalic()&&$.push(3),Y.isUnderline()&&$.push(4),Y.isBlink()&&$.push(5),Y.isInverse()&&$.push(7),Y.isInvisible()&&$.push(8),Y.isFgRGB()&&$.push(38,2,Y.getFgColor()>>>24,Y.getFgColor()>>>16&255,Y.getFgColor()&255),Y.isFgPalette()&&$.push(38,5,Y.getFgColor()),Y.isFgDefault()&&$.push(39),Y.isBgRGB()&&$.push(48,2,Y.getBgColor()>>>24,Y.getBgColor()>>>16&255,Y.getBgColor()&255),Y.isBgPalette()&&$.push(48,5,Y.getBgColor()),Y.isBgDefault()&&$.push(49),$},H=Y=>`${C}${U(Y).join(";")}m`,K=(Y,$,J)=>{if(Y.length-$>J.length)return!1;for(let ee=0;ee<J.length;ee++,$++)if(J[$]!==Y[$])return!1;return!0},G=(Y,$)=>{const J=[0,0,-1,0,0,0];let ee=0,te=0;do{const se=Y[$+te];if(J[te+ee]=typeof se=="number"?se:se[0],typeof se!="number"){let ie=0;do J[1]===5&&(ee=1),J[te+ie+1+ee]=se[ie];while(++ie<se.length&&ie+te+1+ee<J.length);break}if(J[1]===5&&te+ee>=2||J[1]===2&&te+ee>=5)break;J[1]&&(ee=1)}while(++te+$<Y.length&&te+ee<J.length);return te};class q{constructor($,J){this._terminal=J,this._expectedIncomingStyles=0,this.onUpdate($)}static _compileArgs($){return`${C}${$.join(";")}m`}expectIncomingStyle($=1){this._expectedIncomingStyles+=$*2}startTracking(){this._expectedIncomingStyles=0,this._onDidWriteSGR(U(d(this._terminal)._inputHandler._curAttrData)),this._csiHandler=this._terminal.parser.registerCsiHandler({final:"m"},$=>(this._onDidWriteSGR($),!1))}debounceStopTracking(){this._stopTracking()}dispose(){this._stopTracking()}_stopTracking(){this._csiHandler?.dispose(),this._csiHandler=void 0}_onDidWriteSGR($){const J=this._undoArgs;for(let ee=0;ee<$.length;){const te=$[ee],se=typeof te=="number"?te:te[0];if(this._expectedIncomingStyles){if(K($,ee,this._undoArgs)){this._expectedIncomingStyles--,ee+=this._undoArgs.length;continue}if(K($,ee,this._applyArgs)){this._expectedIncomingStyles--,ee+=this._applyArgs.length;continue}}const ie=se===38||se===48||se===58?G($,ee):1;switch(this._applyArgs[0]){case 1:se===2?this._undoArgs=[22,2]:(se===22||se===0)&&(this._undoArgs=[22]);break;case 2:se===1?this._undoArgs=[22,1]:(se===22||se===0)&&(this._undoArgs=[22]);break;case 38:se===0||se===39||se===100?this._undoArgs=[39]:(se>=30&&se<=38||se>=90&&se<=97)&&(this._undoArgs=$.slice(ee,ee+ie));break;default:se===this._applyArgs[0]?this._undoArgs=this._applyArgs:se===0&&(this._undoArgs=this._originalUndoArgs)}ee+=ie}J!==this._undoArgs&&(this.undo=q._compileArgs(this._undoArgs))}onUpdate($){const{applyArgs:J,undoArgs:ee}=this._getArgs($);this._applyArgs=J,this._undoArgs=this._originalUndoArgs=ee,this.apply=q._compileArgs(this._applyArgs),this.undo=q._compileArgs(this._undoArgs)}_getArgs($){switch($){case"bold":return{applyArgs:[1],undoArgs:[22]};case"dim":return{applyArgs:[2],undoArgs:[22]};case"italic":return{applyArgs:[3],undoArgs:[23]};case"underlined":return{applyArgs:[4],undoArgs:[24]};case"inverted":return{applyArgs:[7],undoArgs:[27]};default:{let J;try{J=f.Color.fromHex($)}catch{J=new f.Color(new f.RGBA(255,0,0,1))}const{r:ee,g:te,b:se}=J.rgba;return{applyArgs:[38,2,ee,te,se],undoArgs:[39]}}}}}Ee([(0,_.debounce)(2e3)],q.prototype,"debounceStopTracking",null);const Z=(Y=w.DEFAULT_LOCAL_ECHO_EXCLUDE)=>new RegExp(`\\b(${Y.map(D.escapeRegExpCharacters).join("|")})\\b`,"i");var j;(function(Y){Y[Y.Unknown=0]="Unknown",Y[Y.HasPendingChar=1]="HasPendingChar",Y[Y.Validated=2]="Validated"})(j=e.CharPredictState||(e.CharPredictState={}));let X=class extends k.Disposable{constructor($,J,ee){super();this._processManager=$,this._config=J,this._telemetryService=ee,this._typeaheadThreshold=this._config.config.localEchoLatencyThreshold,this._excludeProgramRe=Z(this._config.config.localEchoExcludePrograms),this._terminalTitle="",this._register((0,k.toDisposable)(()=>this._clearPredictionDebounce?.dispose()))}activate($){const J=this._typeaheadStyle=this._register(new q(this._config.config.localEchoStyle,$)),ee=this._timeline=new z($,this._typeaheadStyle),te=this.stats=this._register(new V(this._timeline));ee.setShowPredictions(this._typeaheadThreshold===0),this._register($.onData(ie=>this._onUserData(ie))),this._register($.onTitleChange(ie=>{this._terminalTitle=ie,this._reevaluatePredictorState(te,ee)})),this._register($.onResize(()=>{ee.setShowPredictions(!1),ee.clearCursor(),this._reevaluatePredictorState(te,ee)})),this._register(this._config.onConfigChanged(()=>{J.onUpdate(this._config.config.localEchoStyle),this._typeaheadThreshold=this._config.config.localEchoLatencyThreshold,this._excludeProgramRe=Z(this._config.config.localEchoExcludePrograms),this._reevaluatePredictorState(te,ee)})),this._register(this._timeline.onPredictionSucceeded(ie=>{this._lastRow?.charState===1&&(0,e.isTenativeCharacterPrediction)(ie)&&ie.inner.appliedAt&&ie.inner.appliedAt.pos.y+ie.inner.appliedAt.pos.baseY===this._lastRow.y&&(this._lastRow.charState=2)})),this._register(this._processManager.onBeforeProcessData(ie=>this._onBeforeProcessData(ie)));let se;this._register(te.onChange(()=>{se||(se=setTimeout(()=>{this._sendLatencyStats(te),se=void 0},u)),ee.length===0&&J.debounceStopTracking(),this._reevaluatePredictorState(te,ee)}))}reset(){this._lastRow=void 0}_deferClearingPredictions(){if(!(!this.stats||!this._timeline)){if(this._clearPredictionDebounce?.dispose(),this._timeline.length===0||this._timeline.peekStart()?.clearAfterTimeout===!1){this._clearPredictionDebounce=void 0;return}this._clearPredictionDebounce=(0,t.disposableTimeout)(()=>{this._timeline?.undoAllPredictions(),this._lastRow?.charState===1&&(this._lastRow.charState=0)},Math.max(500,this.stats.maxLatency*3/2))}}_reevaluatePredictorState($,J){this._reevaluatePredictorStateNow($,J)}_reevaluatePredictorStateNow($,J){if(this._excludeProgramRe.test(this._terminalTitle))J.setShowPredictions(!1);else if(this._typeaheadThreshold<0)J.setShowPredictions(!1);else if(this._typeaheadThreshold===0)J.setShowPredictions(!0);else if($.sampleSize>a&&$.accuracy>n){const ee=$.latency.median;ee>=this._typeaheadThreshold?J.setShowPredictions(!0):ee<this._typeaheadThreshold/h&&J.setShowPredictions(!1)}}_sendLatencyStats($){this._telemetryService.publicLog("terminalLatencyStats",{...$.latency,predictionAccuracy:$.accuracy})}_onUserData($){if(this._timeline?.terminal.buffer.active.type!=="normal")return;const J=this._timeline.terminal,ee=J.buffer.active;if(ee.cursorX===1&&ee.cursorY===J.rows-1&&ee.getLine(ee.cursorY+ee.baseY)?.getCell(0)?.getChars()===":")return;const te=ee.baseY+ee.cursorY;te!==this._lastRow?.y?this._lastRow={y:te,startingX:ee.cursorX,endingX:ee.cursorX,charState:0}:(this._lastRow.startingX=Math.min(this._lastRow.startingX,ee.cursorX),this._lastRow.endingX=Math.max(this._lastRow.endingX,this._timeline.physicalCursor(ee).x));const se=le=>this._timeline.tentativeCursor(ee).x<=this._lastRow.startingX?this._timeline.addBoundary(ee,le):this._timeline.addPrediction(ee,le),ie=le=>this._timeline.tentativeCursor(ee).x>=this._lastRow.endingX-1?this._timeline.addBoundary(ee,le):this._timeline.addPrediction(ee,le),ce=new R($);for(;ce.remaining>0;){if(ce.eatCharCode(127)){const ae=this._timeline.peekEnd();ae&&ae instanceof L&&this._timeline.addBoundary(),this._timeline.isShowingPredictions&&m(this._timeline.terminal),this._timeline.tentativeCursor(ee).x<=this._lastRow.startingX?this._timeline.addBoundary(ee,new M(this._timeline.terminal)):(this._lastRow.endingX--,this._timeline.addPrediction(ee,new M(this._timeline.terminal)));continue}if(ce.eatCharCode(32,126)){const ae=$[ce.index-1],ue=new L(this._typeaheadStyle,ae);this._lastRow.charState===0?(this._timeline.addBoundary(ee,ue),this._lastRow.charState=1):this._timeline.addPrediction(ee,ue),this._timeline.tentativeCursor(ee).x>=J.cols&&this._timeline.addBoundary(ee,new B);continue}const le=ce.eatRe(l);if(le){const ae=le[3],ue=new P(ae,!!le[2],Number(le[1])||1);ae==="D"?se(ue):ie(ue);continue}if(ce.eatStr(`${v}f`)){ie(new P("C",!0,1));continue}if(ce.eatStr(`${v}b`)){se(new P("D",!0,1));continue}if(ce.eatChar("\r")&&ee.cursorY<J.rows-1){this._timeline.addPrediction(ee,new N);continue}this._timeline.addBoundary(ee,new O);break}this._timeline.length===1&&(this._deferClearingPredictions(),this._typeaheadStyle.startTracking())}_onBeforeProcessData($){!this._timeline||($.data=this._timeline.beforeServerInput($.data),this._deferClearingPredictions())}};Ee([(0,_.debounce)(100)],X.prototype,"_reevaluatePredictorState",null),X=Ee([W(2,I.ITelemetryService)],X),e.TypeAheadAddon=X}),define(ne[326],re([1,0,1778,32,82]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerColors=e.ansiColorMap=e.TERMINAL_TAB_ACTIVE_BORDER=e.TERMINAL_DRAG_AND_DROP_BACKGROUND=e.TERMINAL_OVERVIEW_RULER_FIND_MATCH_FOREGROUND_COLOR=e.TERMINAL_FIND_MATCH_HIGHLIGHT_BORDER_COLOR=e.TERMINAL_FIND_MATCH_HIGHLIGHT_BACKGROUND_COLOR=e.TERMINAL_FIND_MATCH_BORDER_COLOR=e.TERMINAL_FIND_MATCH_BACKGROUND_COLOR=e.TERMINAL_BORDER_COLOR=e.TERMINAL_OVERVIEW_RULER_CURSOR_FOREGROUND_COLOR=e.TERMINAL_COMMAND_DECORATION_ERROR_BACKGROUND_COLOR=e.TERMINAL_COMMAND_DECORATION_SUCCESS_BACKGROUND_COLOR=e.TERMINAL_COMMAND_DECORATION_DEFAULT_BACKGROUND_COLOR=e.TERMINAL_SELECTION_BACKGROUND_COLOR=e.TERMINAL_CURSOR_BACKGROUND_COLOR=e.TERMINAL_CURSOR_FOREGROUND_COLOR=e.TERMINAL_FOREGROUND_COLOR=e.TERMINAL_BACKGROUND_COLOR=e.ansiColorIdentifiers=void 0,e.ansiColorIdentifiers=[],e.TERMINAL_BACKGROUND_COLOR=(0,f.registerColor)("terminal.background",null,t.localize(0,null)),e.TERMINAL_FOREGROUND_COLOR=(0,f.registerColor)("terminal.foreground",{light:"#333333",dark:"#CCCCCC",hcDark:"#FFFFFF",hcLight:"#292929"},t.localize(1,null)),e.TERMINAL_CURSOR_FOREGROUND_COLOR=(0,f.registerColor)("terminalCursor.foreground",null,t.localize(2,null)),e.TERMINAL_CURSOR_BACKGROUND_COLOR=(0,f.registerColor)("terminalCursor.background",null,t.localize(3,null)),e.TERMINAL_SELECTION_BACKGROUND_COLOR=(0,f.registerColor)("terminal.selectionBackground",{light:"#00000040",dark:"#FFFFFF40",hcDark:"#FFFFFF80",hcLight:"#F2F2F2"},t.localize(4,null)),e.TERMINAL_COMMAND_DECORATION_DEFAULT_BACKGROUND_COLOR=(0,f.registerColor)("terminalCommandDecoration.defaultBackground",{light:"#00000040",dark:"#ffffff40",hcDark:"#ffffff80",hcLight:"#00000040"},t.localize(5,null)),e.TERMINAL_COMMAND_DECORATION_SUCCESS_BACKGROUND_COLOR=(0,f.registerColor)("terminalCommandDecoration.successBackground",{dark:"#1B81A8",light:"#2090D3",hcDark:"#1B81A8",hcLight:"#007100"},t.localize(6,null)),e.TERMINAL_COMMAND_DECORATION_ERROR_BACKGROUND_COLOR=(0,f.registerColor)("terminalCommandDecoration.errorBackground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F14C4C",hcLight:"#B5200D"},t.localize(7,null)),e.TERMINAL_OVERVIEW_RULER_CURSOR_FOREGROUND_COLOR=(0,f.registerColor)("terminalOverviewRuler.cursorForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},t.localize(8,null)),e.TERMINAL_BORDER_COLOR=(0,f.registerColor)("terminal.border",{dark:_.PANEL_BORDER,light:_.PANEL_BORDER,hcDark:_.PANEL_BORDER,hcLight:_.PANEL_BORDER},t.localize(9,null)),e.TERMINAL_FIND_MATCH_BACKGROUND_COLOR=(0,f.registerColor)("terminal.findMatchBackground",{dark:null,light:null,hcDark:null,hcLight:null},t.localize(10,null)),e.TERMINAL_FIND_MATCH_BORDER_COLOR=(0,f.registerColor)("terminal.findMatchBorder",{dark:f.editorFindMatch,light:f.editorFindMatch,hcDark:"#f38518",hcLight:"#0F4A85"},t.localize(11,null)),e.TERMINAL_FIND_MATCH_HIGHLIGHT_BACKGROUND_COLOR=(0,f.registerColor)("terminal.findMatchHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},t.localize(12,null)),e.TERMINAL_FIND_MATCH_HIGHLIGHT_BORDER_COLOR=(0,f.registerColor)("terminal.findMatchHighlightBorder",{dark:f.editorFindMatchHighlight,light:f.editorFindMatchHighlight,hcDark:"#f38518",hcLight:"#0F4A85"},t.localize(13,null)),e.TERMINAL_OVERVIEW_RULER_FIND_MATCH_FOREGROUND_COLOR=(0,f.registerColor)("terminalOverviewRuler.findMatchForeground",{dark:f.overviewRulerFindMatchForeground,light:f.overviewRulerFindMatchForeground,hcDark:"#f38518",hcLight:"#0F4A85"},t.localize(14,null)),e.TERMINAL_DRAG_AND_DROP_BACKGROUND=(0,f.registerColor)("terminal.dropBackground",{dark:_.EDITOR_DRAG_AND_DROP_BACKGROUND,light:_.EDITOR_DRAG_AND_DROP_BACKGROUND,hcDark:_.EDITOR_DRAG_AND_DROP_BACKGROUND,hcLight:_.EDITOR_DRAG_AND_DROP_BACKGROUND},t.localize(15,null)),e.TERMINAL_TAB_ACTIVE_BORDER=(0,f.registerColor)("terminal.tab.activeBorder",{dark:_.TAB_ACTIVE_BORDER,light:_.TAB_ACTIVE_BORDER,hcDark:_.TAB_ACTIVE_BORDER,hcLight:_.TAB_ACTIVE_BORDER},t.localize(16,null)),e.ansiColorMap={"terminal.ansiBlack":{index:0,defaults:{light:"#000000",dark:"#000000",hcDark:"#000000",hcLight:"#292929"}},"terminal.ansiRed":{index:1,defaults:{light:"#cd3131",dark:"#cd3131",hcDark:"#cd0000",hcLight:"#cd3131"}},"terminal.ansiGreen":{index:2,defaults:{light:"#00BC00",dark:"#0DBC79",hcDark:"#00cd00",hcLight:"#00bc00"}},"terminal.ansiYellow":{index:3,defaults:{light:"#949800",dark:"#e5e510",hcDark:"#cdcd00",hcLight:"#949800"}},"terminal.ansiBlue":{index:4,defaults:{light:"#0451a5",dark:"#2472c8",hcDark:"#0000ee",hcLight:"#0451a5"}},"terminal.ansiMagenta":{index:5,defaults:{light:"#bc05bc",dark:"#bc3fbc",hcDark:"#cd00cd",hcLight:"#bc05bc"}},"terminal.ansiCyan":{index:6,defaults:{light:"#0598bc",dark:"#11a8cd",hcDark:"#00cdcd",hcLight:"#0598b"}},"terminal.ansiWhite":{index:7,defaults:{light:"#555555",dark:"#e5e5e5",hcDark:"#e5e5e5",hcLight:"#555555"}},"terminal.ansiBrightBlack":{index:8,defaults:{light:"#666666",dark:"#666666",hcDark:"#7f7f7f",hcLight:"#666666"}},"terminal.ansiBrightRed":{index:9,defaults:{light:"#cd3131",dark:"#f14c4c",hcDark:"#ff0000",hcLight:"#cd3131"}},"terminal.ansiBrightGreen":{index:10,defaults:{light:"#14CE14",dark:"#23d18b",hcDark:"#00ff00",hcLight:"#00bc00"}},"terminal.ansiBrightYellow":{index:11,defaults:{light:"#b5ba00",dark:"#f5f543",hcDark:"#ffff00",hcLight:"#b5ba00"}},"terminal.ansiBrightBlue":{index:12,defaults:{light:"#0451a5",dark:"#3b8eea",hcDark:"#5c5cff",hcLight:"#0451a5"}},"terminal.ansiBrightMagenta":{index:13,defaults:{light:"#bc05bc",dark:"#d670d6",hcDark:"#ff00ff",hcLight:"#bc05bc"}},"terminal.ansiBrightCyan":{index:14,defaults:{light:"#0598bc",dark:"#29b8db",hcDark:"#00ffff",hcLight:"#0598bc"}},"terminal.ansiBrightWhite":{index:15,defaults:{light:"#a5a5a5",dark:"#e5e5e5",hcDark:"#ffffff",hcLight:"#a5a5a5"}}};function A(){for(const k in e.ansiColorMap){const D=e.ansiColorMap[k],I=k.substring(13);e.ansiColorIdentifiers[D.index]=(0,f.registerColor)(k,D.defaults,t.localize(17,null,I))}}e.registerColors=A}),define(ne[2226],re([1,0,66,326]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.calcANSI8bitColor=e.appendStylizedStringToContainer=e.handleANSIOutput=void 0;function _(D,I,w,v){const C=document.createElement("span"),o=D.length;let c=[],i,S,s,l=!1,r=0,p="";for(;r<o;){let m=!1;if(D.charCodeAt(r)===27&&D.charAt(r+1)==="["){const b=r;r+=2;let E="";for(;r<o;){const y=D.charAt(r);if(E+=y,r++,y.match(/^[ABCDHIJKfhmpsu]$/)){m=!0;break}}if(m){if(A(C,p,c,I,v,i,S,s),p="",E.match(/^(?:[34][0-8]|9[0-7]|10[0-7]|[0-9]|2[1-5,7-9]|[34]9|5[8,9]|1[0-9])(?:;[349][0-7]|10[0-7]|[013]|[245]|[34]9)?(?:;[012]?[0-9]?[0-9])*;?m$/)){const y=E.slice(0,-1).split(";").filter(T=>T!=="").map(T=>parseInt(T,10));if(y[0]===38||y[0]===48||y[0]===58){const T=y[0]===38?"foreground":y[0]===48?"background":"underline";y[1]===5?g(y,T):y[1]===2&&h(y,T)}else n(y)}}else r=b}m===!1&&(p+=D.charAt(r),r++)}return p&&A(C,p,c,I,v,i,S,s),C;function u(m,b){m==="foreground"?i=b:m==="background"?S=b:m==="underline"&&(s=b),c=c.filter(E=>E!==`code-${m}-colored`),b!==void 0&&c.push(`code-${m}-colored`)}function a(){const m=i;u("foreground",S),u("background",m)}function n(m){for(const b of m)switch(b){case 0:{c=[],i=void 0,S=void 0;break}case 1:{c=c.filter(E=>E!=="code-bold"),c.push("code-bold");break}case 2:{c=c.filter(E=>E!=="code-dim"),c.push("code-dim");break}case 3:{c=c.filter(E=>E!=="code-italic"),c.push("code-italic");break}case 4:{c=c.filter(E=>E!=="code-underline"&&E!=="code-double-underline"),c.push("code-underline");break}case 5:{c=c.filter(E=>E!=="code-blink"),c.push("code-blink");break}case 6:{c=c.filter(E=>E!=="code-rapid-blink"),c.push("code-rapid-blink");break}case 7:{l||(l=!0,a());break}case 8:{c=c.filter(E=>E!=="code-hidden"),c.push("code-hidden");break}case 9:{c=c.filter(E=>E!=="code-strike-through"),c.push("code-strike-through");break}case 10:{c=c.filter(E=>!E.startsWith("code-font"));break}case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:{c=c.filter(E=>!E.startsWith("code-font")),c.push(`code-font-${b-10}`);break}case 21:{c=c.filter(E=>E!=="code-underline"&&E!=="code-double-underline"),c.push("code-double-underline");break}case 22:{c=c.filter(E=>E!=="code-bold"&&E!=="code-dim");break}case 23:{c=c.filter(E=>E!=="code-italic"&&E!=="code-font-10");break}case 24:{c=c.filter(E=>E!=="code-underline"&&E!=="code-double-underline");break}case 25:{c=c.filter(E=>E!=="code-blink"&&E!=="code-rapid-blink");break}case 27:{l&&(l=!1,a());break}case 28:{c=c.filter(E=>E!=="code-hidden");break}case 29:{c=c.filter(E=>E!=="code-strike-through");break}case 53:{c=c.filter(E=>E!=="code-overline"),c.push("code-overline");break}case 55:{c=c.filter(E=>E!=="code-overline");break}case 39:{u("foreground",void 0);break}case 49:{u("background",void 0);break}case 59:{u("underline",void 0);break}case 73:{c=c.filter(E=>E!=="code-superscript"&&E!=="code-subscript"),c.push("code-superscript");break}case 74:{c=c.filter(E=>E!=="code-superscript"&&E!=="code-subscript"),c.push("code-subscript");break}case 75:{c=c.filter(E=>E!=="code-superscript"&&E!=="code-subscript");break}default:{d(b);break}}}function h(m,b){if(m.length>=5&&m[2]>=0&&m[2]<=255&&m[3]>=0&&m[3]<=255&&m[4]>=0&&m[4]<=255){const E=new t.RGBA(m[2],m[3],m[4]);u(b,E)}}function g(m,b){let E=m[2];const y=k(E);if(y)u(b,y);else if(E>=0&&E<=15){if(b==="underline"){const T=w.getColorTheme(),R=f.ansiColorIdentifiers[E],O=T.getColor(R);O&&u(b,O.rgba);return}E+=30,E>=38&&(E+=52),b==="background"&&(E+=10),d(E)}}function d(m){const b=w.getColorTheme();let E,y;if(m>=30&&m<=37?(y=m-30,E="foreground"):m>=90&&m<=97?(y=m-90+8,E="foreground"):m>=40&&m<=47?(y=m-40,E="background"):m>=100&&m<=107&&(y=m-100+8,E="background"),y!==void 0&&E){const T=f.ansiColorIdentifiers[y],R=b.getColor(T);R&&u(E,R.rgba)}}}e.handleANSIOutput=_;function A(D,I,w,v,C,o,c,i){if(!D||!I)return;const S=v.linkify(I,!0,C);S.className=w.join(" "),o&&(S.style.color=t.Color.Format.CSS.formatRGB(new t.Color(o))),c&&(S.style.backgroundColor=t.Color.Format.CSS.formatRGB(new t.Color(c))),i&&(S.style.textDecorationColor=t.Color.Format.CSS.formatRGB(new t.Color(i))),D.appendChild(S)}e.appendStylizedStringToContainer=A;function k(D){if(D%1==0)if(D>=16&&D<=231){D-=16;let I=D%6;D=(D-I)/6;let w=D%6;D=(D-w)/6;let v=D;const C=255/5;return I=Math.round(I*C),w=Math.round(w*C),v=Math.round(v*C),new t.RGBA(v,w,I)}else if(D>=232&&D<=255){D-=232;const I=Math.round(D/23*255);return new t.RGBA(I,I,I)}else return}e.calcANSI8bitColor=k}),define(ne[292],re([1,0,33,116,9,63,127,12,326]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIconId=e.getUriClasses=e.getColorStyleContent=e.getColorStyleElement=e.getStandardColors=e.getColorClass=void 0;function w(S){let s;if(typeof S=="string"?s=S:S.color?s=S.color.replace(/\./g,"_"):D.ThemeIcon.isThemeIcon(S.icon)&&S.icon.color&&(s=S.icon.color.id.replace(/\./g,"_")),s)return`terminal-icon-${s.replace(/\./g,"_")}`}e.getColorClass=w;function v(S){const s=[];for(const l in I.ansiColorMap)S.getColor(l)&&!l.toLowerCase().includes("bright")&&s.push(l);return s}e.getStandardColors=v;function C(S){const s=v(S),l=document.createElement("style");let r="";for(const p of s){const u=w(p),a=S.getColor(p);a&&(r+=`.monaco-workbench .${u} .codicon:first-child:not(.codicon-split-horizontal):not(.codicon-trashcan):not(.file-icon){ color: ${a} !important; }`)}return l.textContent=r,l}e.getColorStyleElement=C;function o(S,s){const l=v(S);let r="";for(const p of l){const u=w(p),a=S.getColor(p);a&&(s?r+=`.monaco-workbench .show-file-icons .file-icon.terminal-tab.${u}::before{ color: ${a} !important; }`:r+=`.monaco-workbench .${u} .codicon:first-child:not(.codicon-split-horizontal):not(.codicon-trashcan):not(.file-icon){ color: ${a} !important; }`)}return r}e.getColorStyleContent=o;function c(S,s,l){const r=S.icon;if(!r)return;const p=[];let u;if(l){if(typeof r=="string"&&(r.startsWith("$(")||(0,A.getIconRegistry)().getIcon(r)))return p;typeof r=="string"&&(u=_.URI.parse(r))}if(r instanceof _.URI?u=r:r instanceof Object&&"light"in r&&"dark"in r&&(u=s===k.ColorScheme.LIGHT?r.light:r.dark),u instanceof _.URI){const n=`terminal-uri-icon-${(0,f.hash)(u.path).toString(36)}`;p.push(n),p.push("terminal-uri-icon")}return p}e.getUriClasses=c;function i(S){return!S.icon||S.icon instanceof Object&&!("id"in S.icon)?t.Codicon.terminal.id:typeof S.icon=="string"?S.icon:S.icon.id}e.getIconId=i}),define(ne[2227],re([1,0,33,8,53,292,590,1767,12,120,63,48]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalProfileQuickpick=void 0;let o=class{constructor(i,S,s,l){this._terminalProfileService=i,this._configurationService=S,this._quickInputService=s,this._themeService=l}async showAndGetResult(i){const S=await this._terminalProfileService.getPlatformKey(),s="terminal.integrated.profiles."+S,l=await this._createAndShow(i),r=`terminal.integrated.defaultProfile.${S}`;if(!!l){if(i==="setDefault"){if("command"in l.profile)return;if("id"in l.profile)return await this._configurationService.updateValue(r,l.profile.title,1),{config:{extensionIdentifier:l.profile.extensionIdentifier,id:l.profile.id,title:l.profile.title,options:{color:l.profile.color,icon:l.profile.icon}},keyMods:l.keyMods};if("isAutoDetected"in l.profile){const p=await this._configurationService.getValue(s);if(typeof p=="object"){const u={path:l.profile.path};l.profile.args&&(u.args=l.profile.args),p[l.profile.profileName]=u}await this._configurationService.updateValue(s,p,1)}await this._configurationService.updateValue(r,l.profileName,1)}else if(i==="createInstance")return"id"in l.profile?{config:{extensionIdentifier:l.profile.extensionIdentifier,id:l.profile.id,title:l.profile.title,options:{icon:l.profile.icon,color:l.profile.color}},keyMods:l.keyMods}:{config:l.profile,keyMods:l.keyMods};return"profileName"in l.profile?l.profile.profileName:l.profile.title}}async _createAndShow(i){const S=await this._terminalProfileService.getPlatformKey(),s=this._terminalProfileService.availableProfiles,l="terminal.integrated.profiles."+S,r=this._terminalProfileService.getDefaultProfileName();let p;const u={placeHolder:i==="createInstance"?D.localize(0,null):D.localize(1,null),onDidTriggerItemButton:async b=>{if("command"in b.item.profile||"id"in b.item.profile)return;const E=this._configurationService.getValue("terminal.integrated.profiles."+S),y=E?Object.keys(E):[],T=await this._quickInputService.input({prompt:D.localize(2,null),value:b.item.profile.profileName,validateInput:async O=>{if(y.includes(O))return D.localize(3,null)}});if(!T)return;const R={...E};R[T]={path:b.item.profile.path,args:b.item.profile.args},await this._configurationService.updateValue(l,R,1)},onKeyMods:b=>p=b},a=[],n=s.filter(b=>!b.isAutoDetected),h=s.filter(b=>b.isAutoDetected);n.length>0&&(a.push({type:"separator",label:D.localize(4,null)}),a.push(...this._sortProfileQuickPickItems(n.map(b=>this._createProfileQuickPickItem(b)),r))),a.push({type:"separator",label:D.localize(5,null)});const g=[];for(const b of this._terminalProfileService.contributedProfiles){let E;typeof b.icon=="string"&&(b.icon.startsWith("$(")?E=I.ThemeIcon.fromString(b.icon):E=I.ThemeIcon.fromId(b.icon)),(!E||!(0,v.getIconRegistry)().getIcon(E.id))&&(E=t.Codicon.terminal);const y=(0,A.getUriClasses)(b,this._themeService.getColorTheme().type,!0),T=(0,A.getColorClass)(b),R=[];y&&R.push(...y),T&&R.push(T),g.push({label:`$(${E.id}) ${b.title}`,profile:{extensionIdentifier:b.extensionIdentifier,title:b.title,icon:b.icon,id:b.id,color:b.color},profileName:b.title,iconClasses:R})}g.length>0&&a.push(...this._sortProfileQuickPickItems(g,r)),h.length>0&&(a.push({type:"separator",label:D.localize(6,null)}),a.push(...this._sortProfileQuickPickItems(h.map(b=>this._createProfileQuickPickItem(b)),r)));const d=(0,A.getColorStyleElement)(this._themeService.getColorTheme());document.body.appendChild(d);const m=await this._quickInputService.pick(a,u);if(document.body.removeChild(d),!!m)return p&&(m.keyMods=p),m}_createProfileQuickPickItem(i){const S=[{iconClass:I.ThemeIcon.asClassName(k.configureTerminalProfileIcon),tooltip:D.localize(7,null)}],l=`$(${(i.icon&&I.ThemeIcon.isThemeIcon(i.icon)?i.icon:t.Codicon.terminal).id}) ${i.profileName}`,r=i.isFromPath?(0,C.basename)(i.path):i.path,p=(0,A.getColorClass)(i),u=[];if(p&&u.push(p),i.args){if(typeof i.args=="string")return{label:l,description:`${i.path} ${i.args}`,profile:i,profileName:i.profileName,buttons:S,iconClasses:u};const a=i.args.map(n=>n.includes(" ")?`"${n.replace('/"/g','\\"')}"`:n).join(" ");return{label:l,description:`${r} ${a}`,profile:i,profileName:i.profileName,buttons:S,iconClasses:u}}return{label:l,description:r,profile:i,profileName:i.profileName,buttons:S,iconClasses:u}}_sortProfileQuickPickItems(i,S){return i.sort((s,l)=>l.profileName===S?1:s.profileName===S?-1:s.profileName.localeCompare(l.profileName))}};o=Ee([W(0,w.ITerminalProfileService),W(1,f.IConfigurationService),W(2,_.IQuickInputService),W(3,I.IThemeService)],o),e.TerminalProfileQuickpick=o}),define(ne[2228],re([1,0,15,2,11,12,32,326]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommandNavigationAddon=e.ScrollPosition=void 0;var I;(function(C){C[C.Top=0]="Top",C[C.Bottom=1]="Bottom"})(I||(I={}));var w;(function(C){C[C.Top=0]="Top",C[C.Middle=1]="Middle"})(w=e.ScrollPosition||(e.ScrollPosition={}));let v=class extends f.Disposable{constructor(o,c){super();this._themeService=c,this._currentMarker=I.Bottom,this._selectionStart=null,this._isDisposable=!1,this._refreshActiveCapability(o),this._register(o.onDidAddCapability(()=>this._refreshActiveCapability(o))),this._register(o.onDidRemoveCapability(()=>this._refreshActiveCapability(o)))}activate(o){this._terminal=o}_refreshActiveCapability(o){const c=o.get(2)||o.get(3);c!==this._commandDetection&&(this._commandDetection=c)}_getCommandMarkers(){if(!this._commandDetection)return[];let o;return this._commandDetection.type===3?o=this._commandDetection.commands:o=(0,t.coalesce)(this._commandDetection.commands.map(c=>c.marker)),o}clearMarker(){this._currentMarker=I.Bottom,this._selectionStart=null}scrollToPreviousCommand(o=1,c=!1){if(!this._terminal)return;c||(this._selectionStart=null);let i;const S=typeof this._currentMarker=="object"?this._getTargetScrollLine(this._terminal,this._currentMarker,o):Math.min(this._getLine(this._terminal,this._currentMarker),this._terminal.buffer.active.baseY),s=this._terminal.buffer.active.viewportY;if(typeof this._currentMarker=="object"?!this._isMarkerInViewport(this._terminal,this._currentMarker):S!==s){const l=this._getCommandMarkers().filter(r=>r.line>=s).length;i=this._getCommandMarkers().length-l-1}else this._currentMarker===I.Bottom?i=this._getCommandMarkers().length-1:this._currentMarker===I.Top?i=-1:this._isDisposable?(i=this._findPreviousCommand(this._terminal),this._currentMarker.dispose(),this._isDisposable=!1):i=this._getCommandMarkers().indexOf(this._currentMarker)-1;if(i<0){this._currentMarker=I.Top,this._terminal.scrollToTop();return}this._currentMarker=this._getCommandMarkers()[i],this._scrollToMarker(this._currentMarker,o)}scrollToNextCommand(o=1,c=!1){if(!this._terminal)return;c||(this._selectionStart=null);let i;const S=typeof this._currentMarker=="object"?this._getTargetScrollLine(this._terminal,this._currentMarker,o):Math.min(this._getLine(this._terminal,this._currentMarker),this._terminal.buffer.active.baseY),s=this._terminal.buffer.active.viewportY;if((typeof this._currentMarker=="object"?!this._isMarkerInViewport(this._terminal,this._currentMarker):S!==s)?i=this._getCommandMarkers().filter(r=>r.line<=s).length:this._currentMarker===I.Bottom?i=this._getCommandMarkers().length:this._currentMarker===I.Top?i=0:this._isDisposable?(i=this._findNextCommand(this._terminal),this._currentMarker.dispose(),this._isDisposable=!1):i=this._getCommandMarkers().indexOf(this._currentMarker)+1,i>=this._getCommandMarkers().length){this._currentMarker=I.Bottom,this._terminal.scrollToBottom();return}this._currentMarker=this._getCommandMarkers()[i],this._scrollToMarker(this._currentMarker,o)}_scrollToMarker(o,c){if(!this._terminal)return;if(!this._isMarkerInViewport(this._terminal,o)){const s=this._getTargetScrollLine(this._terminal,o,c);this._terminal.scrollToLine(s)}this._navigationDecoration?.dispose();const i=this._themeService.getColorTheme().getColor(D.TERMINAL_OVERVIEW_RULER_CURSOR_FOREGROUND_COLOR),S=this._terminal.registerDecoration({marker:o,width:this._terminal.cols,overviewRulerOptions:{color:i?.toString()||"#a0a0a0cc"}});if(this._navigationDecoration=S,S){let s=!1;S.onRender(l=>{s||l.classList.contains("xterm-decoration-overview-ruler")||l.classList.add("terminal-scroll-highlight")}),S.onDispose(()=>{S===this._navigationDecoration&&(this._navigationDecoration=void 0)}),(0,_.timeout)(350).then(()=>{S.dispose()})}}_getTargetScrollLine(o,c,i){return i===1?Math.max(c.line-Math.floor(o.rows/4),0):c.line}_isMarkerInViewport(o,c){const i=o.buffer.active.viewportY;return c.line>=i&&c.line<i+o.rows}selectToPreviousCommand(){!this._terminal||(this._selectionStart===null&&(this._selectionStart=this._currentMarker),this.scrollToPreviousCommand(1,!0),this._selectLines(this._terminal,this._currentMarker,this._selectionStart))}selectToNextCommand(){!this._terminal||(this._selectionStart===null&&(this._selectionStart=this._currentMarker),this.scrollToNextCommand(1,!0),this._selectLines(this._terminal,this._currentMarker,this._selectionStart))}selectToPreviousLine(){!this._terminal||(this._selectionStart===null&&(this._selectionStart=this._currentMarker),this.scrollToPreviousLine(this._terminal,1,!0),this._selectLines(this._terminal,this._currentMarker,this._selectionStart))}selectToNextLine(){!this._terminal||(this._selectionStart===null&&(this._selectionStart=this._currentMarker),this.scrollToNextLine(this._terminal,1,!0),this._selectLines(this._terminal,this._currentMarker,this._selectionStart))}_selectLines(o,c,i){i===null&&(i=I.Bottom);let S=this._getLine(o,c),s=this._getLine(o,i);if(S>s){const l=S;S=s,s=l}s-=1,o.selectLines(S,s)}_getLine(o,c){return c===I.Bottom?o.buffer.active.baseY+o.rows-1:c===I.Top?0:c.line}scrollToPreviousLine(o,c=1,i=!1){if(i||(this._selectionStart=null),this._currentMarker===I.Top){o.scrollToTop();return}if(this._currentMarker===I.Bottom)this._currentMarker=this._registerMarkerOrThrow(o,this._getOffset(o)-1);else{const S=this._getOffset(o);this._isDisposable&&this._currentMarker.dispose(),this._currentMarker=this._registerMarkerOrThrow(o,S-1)}this._isDisposable=!0,this._scrollToMarker(this._currentMarker,c)}scrollToNextLine(o,c=1,i=!1){if(i||(this._selectionStart=null),this._currentMarker===I.Bottom){o.scrollToBottom();return}if(this._currentMarker===I.Top)this._currentMarker=this._registerMarkerOrThrow(o,this._getOffset(o)+1);else{const S=this._getOffset(o);this._isDisposable&&this._currentMarker.dispose(),this._currentMarker=this._registerMarkerOrThrow(o,S+1)}this._isDisposable=!0,this._scrollToMarker(this._currentMarker,c)}_registerMarkerOrThrow(o,c){const i=o.registerMarker(c);if(!i)throw new Error(`Could not create marker for ${c}`);return i}_getOffset(o){if(this._currentMarker===I.Bottom)return 0;if(this._currentMarker===I.Top)return 0-(o.buffer.active.baseY+o.buffer.active.cursorY);{let c=this._getLine(o,this._currentMarker);return c-=o.buffer.active.baseY+o.buffer.active.cursorY,c}}_findPreviousCommand(o){if(this._currentMarker===I.Top)return 0;if(this._currentMarker===I.Bottom)return this._getCommandMarkers().length-1;let c;for(c=this._getCommandMarkers().length-1;c>=0;c--)if(this._getCommandMarkers()[c].line<this._currentMarker.line)return c;return-1}_findNextCommand(o){if(this._currentMarker===I.Top)return 0;if(this._currentMarker===I.Bottom)return this._getCommandMarkers().length-1;let c;for(c=0;c<this._getCommandMarkers().length;c++)if(this._getCommandMarkers()[c].line>this._currentMarker.line)return c;return this._getCommandMarkers().length}};v=Ee([W(1,A.IThemeService)],v),e.CommandNavigationAddon=v,(0,A.registerThemingParticipant)((C,o)=>{const c=C.getColor(k.focusBorder);c&&o.addRule(`.terminal-scroll-highlight { border-color: ${c.toString()}; } `)})}),define(ne[2229],re([1,0,57,1779,120,14,17]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerTerminalConfiguration=void 0;const D=` - `+["`${cwd}`: "+(0,f.localize)(0,null),"`${cwdFolder}`: "+(0,f.localize)(1,null),"`${workspaceFolder}`: "+(0,f.localize)(2,null),"`${local}`: "+(0,f.localize)(3,null),"`${process}`: "+(0,f.localize)(4,null),"`${separator}`: "+(0,f.localize)(5,null),"`${sequence}`: "+(0,f.localize)(6,null),"`${task}`: "+(0,f.localize)(7,null)].join(` - `);let I=(0,f.localize)(8,null);I+=D;let w=(0,f.localize)(9,null);w+=D;const v={id:"terminal",order:100,title:(0,f.localize)(10,null),type:"object",properties:{["terminal.integrated.sendKeybindingsToShell"]:{markdownDescription:(0,f.localize)(11,null),type:"boolean",default:!1},["terminal.integrated.tabs.enabled"]:{description:(0,f.localize)(12,null),type:"boolean",default:!0},["terminal.integrated.tabs.enableAnimation"]:{description:(0,f.localize)(13,null),type:"boolean",default:!0},["terminal.integrated.tabs.hideCondition"]:{description:(0,f.localize)(14,null),type:"string",enum:["never","singleTerminal","singleGroup"],enumDescriptions:[(0,f.localize)(15,null),(0,f.localize)(16,null),(0,f.localize)(17,null)],default:"singleTerminal"},["terminal.integrated.tabs.showActiveTerminal"]:{description:(0,f.localize)(18,null),type:"string",enum:["always","singleTerminal","singleTerminalOrNarrow","never"],enumDescriptions:[(0,f.localize)(19,null),(0,f.localize)(20,null),(0,f.localize)(21,null),(0,f.localize)(22,null)],default:"singleTerminalOrNarrow"},["terminal.integrated.tabs.showActions"]:{description:(0,f.localize)(23,null),type:"string",enum:["always","singleTerminal","singleTerminalOrNarrow","never"],enumDescriptions:[(0,f.localize)(24,null),(0,f.localize)(25,null),(0,f.localize)(26,null),(0,f.localize)(27,null)],default:"singleTerminalOrNarrow"},["terminal.integrated.tabs.location"]:{type:"string",enum:["left","right"],enumDescriptions:[(0,f.localize)(28,null),(0,f.localize)(29,null)],default:"right",description:(0,f.localize)(30,null)},["terminal.integrated.defaultLocation"]:{type:"string",enum:["editor","view"],enumDescriptions:[(0,f.localize)(31,null),(0,f.localize)(32,null)],default:"view",description:(0,f.localize)(33,null)},["terminal.integrated.shellIntegration.decorationIconSuccess"]:{type:"string",default:"primitive-dot",markdownDescription:(0,f.localize)(34,null)},["terminal.integrated.shellIntegration.decorationIconError"]:{type:"string",default:"error-small",markdownDescription:(0,f.localize)(35,null)},["terminal.integrated.shellIntegration.decorationIcon"]:{type:"string",default:"circle-outline",markdownDescription:(0,f.localize)(36,null)},["terminal.integrated.tabs.focusMode"]:{type:"string",enum:["singleClick","doubleClick"],enumDescriptions:[(0,f.localize)(37,null),(0,f.localize)(38,null)],default:"doubleClick",description:(0,f.localize)(39,null)},["terminal.integrated.macOptionIsMeta"]:{description:(0,f.localize)(40,null),type:"boolean",default:!1},["terminal.integrated.macOptionClickForcesSelection"]:{description:(0,f.localize)(41,null),type:"boolean",default:!1},["terminal.integrated.altClickMovesCursor"]:{markdownDescription:(0,f.localize)(42,null),type:"boolean",default:!0},["terminal.integrated.copyOnSelection"]:{description:(0,f.localize)(43,null),type:"boolean",default:!1},["terminal.integrated.enableMultiLinePasteWarning"]:{markdownDescription:(0,f.localize)(44,null),type:"boolean",default:!0},["terminal.integrated.drawBoldTextInBrightColors"]:{description:(0,f.localize)(45,null),type:"boolean",default:!0},["terminal.integrated.fontFamily"]:{markdownDescription:(0,f.localize)(46,null),type:"string"},["terminal.integrated.fontSize"]:{description:(0,f.localize)(47,null),type:"number",default:A.isMacintosh?12:14,minimum:6,maximum:100},["terminal.integrated.letterSpacing"]:{description:(0,f.localize)(48,null),type:"number",default:_.DEFAULT_LETTER_SPACING},["terminal.integrated.lineHeight"]:{description:(0,f.localize)(49,null),type:"number",default:_.DEFAULT_LINE_HEIGHT},["terminal.integrated.minimumContrastRatio"]:{markdownDescription:(0,f.localize)(50,null),type:"number",default:4.5},["terminal.integrated.fastScrollSensitivity"]:{markdownDescription:(0,f.localize)(51,null),type:"number",default:5},["terminal.integrated.mouseWheelScrollSensitivity"]:{markdownDescription:(0,f.localize)(52,null),type:"number",default:1},["terminal.integrated.bellDuration"]:{markdownDescription:(0,f.localize)(53,null),type:"number",default:1e3},["terminal.integrated.fontWeight"]:{anyOf:[{type:"number",minimum:_.MINIMUM_FONT_WEIGHT,maximum:_.MAXIMUM_FONT_WEIGHT,errorMessage:(0,f.localize)(54,null)},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:_.SUGGESTIONS_FONT_WEIGHT}],description:(0,f.localize)(55,null),default:"normal"},["terminal.integrated.fontWeightBold"]:{anyOf:[{type:"number",minimum:_.MINIMUM_FONT_WEIGHT,maximum:_.MAXIMUM_FONT_WEIGHT,errorMessage:(0,f.localize)(56,null)},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:_.SUGGESTIONS_FONT_WEIGHT}],description:(0,f.localize)(57,null),default:"bold"},["terminal.integrated.cursorBlinking"]:{description:(0,f.localize)(58,null),type:"boolean",default:!1},["terminal.integrated.cursorStyle"]:{description:(0,f.localize)(59,null),enum:[_.TerminalCursorStyle.BLOCK,_.TerminalCursorStyle.LINE,_.TerminalCursorStyle.UNDERLINE],default:_.TerminalCursorStyle.BLOCK},["terminal.integrated.cursorWidth"]:{markdownDescription:(0,f.localize)(60,null),type:"number",default:1},["terminal.integrated.scrollback"]:{description:(0,f.localize)(61,null),type:"number",default:1e3},["terminal.integrated.detectLocale"]:{markdownDescription:(0,f.localize)(62,null),type:"string",enum:["auto","off","on"],markdownEnumDescriptions:[(0,f.localize)(63,null),(0,f.localize)(64,null),(0,f.localize)(65,null)],default:"auto"},["terminal.integrated.gpuAcceleration"]:{type:"string",enum:["auto","on","off","canvas"],markdownEnumDescriptions:[(0,f.localize)(66,null),(0,f.localize)(67,null),(0,f.localize)(68,null),(0,f.localize)(69,null)],default:"auto",description:(0,f.localize)(70,null)},["terminal.integrated.tabs.separator"]:{type:"string",default:" - ",markdownDescription:(0,f.localize)(71,null,"`terminal.integrated.tabs.title`","`terminal.integrated.tabs.description`")},["terminal.integrated.tabs.title"]:{type:"string",default:"${process}",markdownDescription:I},["terminal.integrated.tabs.description"]:{type:"string",default:"${task}${separator}${local}${separator}${cwdFolder}",markdownDescription:w},["terminal.integrated.rightClickBehavior"]:{type:"string",enum:["default","copyPaste","paste","selectWord","nothing"],enumDescriptions:[(0,f.localize)(72,null),(0,f.localize)(73,null),(0,f.localize)(74,null),(0,f.localize)(75,null),(0,f.localize)(76,null)],default:A.isMacintosh?"selectWord":A.isWindows?"copyPaste":"default",description:(0,f.localize)(77,null)},["terminal.integrated.cwd"]:{restricted:!0,description:(0,f.localize)(78,null),type:"string",default:void 0,scope:4},["terminal.integrated.confirmOnExit"]:{description:(0,f.localize)(79,null),type:"string",enum:["never","always","hasChildProcesses"],enumDescriptions:[(0,f.localize)(80,null),(0,f.localize)(81,null),(0,f.localize)(82,null)],default:"never"},["terminal.integrated.confirmOnKill"]:{description:(0,f.localize)(83,null),type:"string",enum:["never","editor","panel","always"],enumDescriptions:[(0,f.localize)(84,null),(0,f.localize)(85,null),(0,f.localize)(86,null),(0,f.localize)(87,null)],default:"editor"},["terminal.integrated.enableBell"]:{description:(0,f.localize)(88,null),type:"boolean",default:!1},["terminal.integrated.commandsToSkipShell"]:{markdownDescription:(0,f.localize)(89,null,_.DEFAULT_COMMANDS_TO_SKIP_SHELL.sort().map(o=>`- ${o}`).join(` `),`[${(0,f.localize)(90,null)}](command:workbench.action.openRawDefaultSettings '${(0,f.localize)(91,null)}')`),type:"array",items:{type:"string"},default:[]},["terminal.integrated.allowChords"]:{markdownDescription:(0,f.localize)(92,null),type:"boolean",default:!0},["terminal.integrated.allowMnemonics"]:{markdownDescription:(0,f.localize)(93,null),type:"boolean",default:!1},["terminal.integrated.env.osx"]:{restricted:!0,markdownDescription:(0,f.localize)(94,null),type:"object",additionalProperties:{type:["string","null"]},default:{}},["terminal.integrated.env.linux"]:{restricted:!0,markdownDescription:(0,f.localize)(95,null),type:"object",additionalProperties:{type:["string","null"]},default:{}},["terminal.integrated.env.windows"]:{restricted:!0,markdownDescription:(0,f.localize)(96,null),type:"object",additionalProperties:{type:["string","null"]},default:{}},["terminal.integrated.environmentChangesIndicator"]:{markdownDescription:(0,f.localize)(97,null),type:"string",enum:["off","on","warnonly"],enumDescriptions:[(0,f.localize)(98,null),(0,f.localize)(99,null),(0,f.localize)(100,null)],default:"warnonly"},["terminal.integrated.environmentChangesRelaunch"]:{markdownDescription:(0,f.localize)(101,null),type:"boolean",default:!0},["terminal.integrated.showExitAlert"]:{description:(0,f.localize)(102,null),type:"boolean",default:!0},["terminal.integrated.splitCwd"]:{description:(0,f.localize)(103,null),type:"string",enum:["workspaceRoot","initial","inherited"],enumDescriptions:[(0,f.localize)(104,null),(0,f.localize)(105,null),(0,f.localize)(106,null)],default:"inherited"},["terminal.integrated.windowsEnableConpty"]:{description:(0,f.localize)(107,null),type:"boolean",default:!0},["terminal.integrated.wordSeparators"]:{description:(0,f.localize)(108,null),type:"string",default:" ()[]{}',\"`\u2500\u2018\u2019"},["terminal.integrated.enableFileLinks"]:{description:(0,f.localize)(109,null),type:"boolean",default:!0},["terminal.integrated.unicodeVersion"]:{type:"string",enum:["6","11"],enumDescriptions:[(0,f.localize)(110,null),(0,f.localize)(111,null)],default:"11",description:(0,f.localize)(112,null)},["terminal.integrated.localEchoLatencyThreshold"]:{description:(0,f.localize)(113,null),type:"integer",minimum:-1,default:30},["terminal.integrated.localEchoEnabled"]:{markdownDescription:(0,f.localize)(114,null),type:"string",enum:["on","off","auto"],enumDescriptions:[(0,f.localize)(115,null),(0,f.localize)(116,null),(0,f.localize)(117,null)],default:"auto"},["terminal.integrated.localEchoExcludePrograms"]:{description:(0,f.localize)(118,null),type:"array",items:{type:"string",uniqueItems:!0},default:_.DEFAULT_LOCAL_ECHO_EXCLUDE},["terminal.integrated.localEchoStyle"]:{description:(0,f.localize)(119,null),default:"dim",oneOf:[{type:"string",default:"dim",enum:["bold","dim","italic","underlined","inverted"]},{type:"string",format:"color-hex",default:"#ff0000"}]},["terminal.integrated.enablePersistentSessions"]:{description:(0,f.localize)(120,null),type:"boolean",default:!0},["terminal.integrated.persistentSessionReviveProcess"]:{markdownDescription:(0,f.localize)(121,null),type:"string",enum:["onExit","onExitAndWindowClose","never"],markdownEnumDescriptions:[(0,f.localize)(122,null),(0,f.localize)(123,null),(0,f.localize)(124,null)],default:"onExit"},["terminal.integrated.customGlyphs"]:{description:(0,f.localize)(125,null),type:"boolean",default:!0},["terminal.integrated.autoReplies"]:{markdownDescription:(0,f.localize)(126,null,'`"Terminate batch job (Y/N)": "\\r"`','`"\\r"`'),type:"object",additionalProperties:{oneOf:[{type:"string",description:(0,f.localize)(127,null)},{type:"null"}]},default:{}},["terminal.integrated.shellIntegration.enabled"]:{restricted:!0,markdownDescription:(0,f.localize)(128,null),type:"boolean",default:!1},["terminal.integrated.shellIntegration.decorationsEnabled"]:{restricted:!0,markdownDescription:(0,f.localize)(129,null),type:"boolean",default:!0},["terminal.integrated.shellIntegration.showWelcome"]:{restricted:!0,markdownDescription:(0,f.localize)(130,null),type:"boolean",default:!0},["terminal.integrated.shellIntegration.history"]:{restricted:!0,markdownDescription:(0,f.localize)(131,null),type:"number",default:100}}};function C(){k.Registry.as(t.Extensions.Configuration).registerConfiguration(v)}e.registerTerminalConfiguration=C}),define(ne[176],re([1,0,1780,7]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalContextKeys=e.TerminalContextKeyStrings=void 0;var _;(function(k){k.IsOpen="terminalIsOpen",k.Count="terminalCount",k.GroupCount="terminalGroupCount",k.TabsNarrow="isTerminalTabsNarrow",k.HasFixedWidth="terminalHasFixedWidth",k.ProcessSupported="terminalProcessSupported",k.Focus="terminalFocus",k.EditorFocus="terminalEditorFocus",k.TabsFocus="terminalTabsFocus",k.WebExtensionContributedProfile="terminalWebExtensionContributedProfile",k.TerminalHasBeenCreated="terminalHasBeenCreated",k.TerminalEditorActive="terminalEditorActive",k.TabsMouse="terminalTabsMouse",k.AltBufferActive="terminalAltBufferActive",k.A11yTreeFocus="terminalA11yTreeFocus",k.ViewShowing="terminalViewShowing",k.TextSelected="terminalTextSelected",k.FindVisible="terminalFindVisible",k.FindInputFocused="terminalFindInputFocused",k.FindFocused="terminalFindFocused",k.TabsSingularSelection="terminalTabsSingularSelection",k.SplitTerminal="terminalSplitTerminal",k.ShellType="terminalShellType"})(_=e.TerminalContextKeyStrings||(e.TerminalContextKeyStrings={}));var A;(function(k){k.isOpen=new f.RawContextKey("terminalIsOpen",!1,!0),k.focus=new f.RawContextKey("terminalFocus",!1,(0,t.localize)(0,null)),k.editorFocus=new f.RawContextKey("terminalEditorFocus",!1,(0,t.localize)(1,null)),k.count=new f.RawContextKey("terminalCount",0,(0,t.localize)(2,null)),k.groupCount=new f.RawContextKey("terminalGroupCount",0,!0),k.tabsNarrow=new f.RawContextKey("isTerminalTabsNarrow",!1,!0),k.terminalHasFixedWidth=new f.RawContextKey("terminalHasFixedWidth",!1,!0),k.tabsFocus=new f.RawContextKey("terminalTabsFocus",!1,(0,t.localize)(3,null)),k.webExtensionContributedProfile=new f.RawContextKey("terminalWebExtensionContributedProfile",!1,!0),k.terminalHasBeenCreated=new f.RawContextKey("terminalHasBeenCreated",!1,!0),k.terminalEditorActive=new f.RawContextKey("terminalEditorActive",!1,!0),k.tabsMouse=new f.RawContextKey("terminalTabsMouse",!1,!0),k.shellType=new f.RawContextKey("terminalShellType",void 0,{type:"string",description:(0,t.localize)(4,null)}),k.altBufferActive=new f.RawContextKey("terminalAltBufferActive",!1,(0,t.localize)(5,null)),k.notFocus=k.focus.toNegated(),k.viewShowing=new f.RawContextKey("terminalViewShowing",!1,(0,t.localize)(6,null)),k.a11yTreeFocus=new f.RawContextKey("terminalA11yTreeFocus",!1,!0),k.textSelected=new f.RawContextKey("terminalTextSelected",!1,(0,t.localize)(7,null)),k.notTextSelected=k.textSelected.toNegated(),k.findVisible=new f.RawContextKey("terminalFindVisible",!1,!0),k.notFindVisible=k.findVisible.toNegated(),k.findInputFocus=new f.RawContextKey("terminalFindInputFocused",!1,!0),k.findFocus=new f.RawContextKey("terminalFindFocused",!1,!0),k.notFindFocus=k.findInputFocus.toNegated(),k.processSupported=new f.RawContextKey("terminalProcessSupported",!1,(0,t.localize)(8,null)),k.tabsSingularSelection=new f.RawContextKey("terminalTabsSingularSelection",!1,(0,t.localize)(9,null)),k.splitTerminal=new f.RawContextKey("terminalSplitTerminal",!1,(0,t.localize)(10,null))})(A=e.TerminalContextKeys||(e.TerminalContextKeys={}))}),define(ne[821],re([1,0,784,37,7,105,176]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalFindWidget=void 0;let D=class extends t.SimpleFindWidget{constructor(w,v,C,o){super(v,C,w,!0);this._contextKeyService=C,this._terminalService=o,this._register(w.onFindReplaceStateChange(()=>{this.show()})),this._findInputFocused=k.TerminalContextKeys.findInputFocus.bindTo(this._contextKeyService),this._findWidgetFocused=k.TerminalContextKeys.findFocus.bindTo(this._contextKeyService),this._findWidgetVisible=k.TerminalContextKeys.findVisible.bindTo(C)}find(w){const v=this._terminalService.activeInstance;!v||(w?v.xterm?.findPrevious(this.inputValue,{regex:this._getRegexValue(),wholeWord:this._getWholeWordValue(),caseSensitive:this._getCaseSensitiveValue()}):v.xterm?.findNext(this.inputValue,{regex:this._getRegexValue(),wholeWord:this._getWholeWordValue(),caseSensitive:this._getCaseSensitiveValue()}))}reveal(w){const v=this._terminalService.activeInstance;v&&this.inputValue&&this.inputValue!==""&&v.xterm?.findPrevious(this.inputValue,{incremental:!0,regex:this._getRegexValue(),wholeWord:this._getWholeWordValue(),caseSensitive:this._getCaseSensitiveValue()}).then(C=>{this.updateButtons(C)}),this.updateButtons(!1),super.reveal(w),this._findWidgetVisible.set(!0)}show(w){super.show(w),this._findWidgetVisible.set(!0)}hide(){super.hide(),this._findWidgetVisible.reset();const w=this._terminalService.activeInstance;w&&w.focus(),w?.xterm?.clearSearchDecorations()}_onInputChanged(){const w=this._terminalService.activeInstance;return w?.xterm&&w.xterm.findPrevious(this.inputValue,{regex:this._getRegexValue(),wholeWord:this._getWholeWordValue(),caseSensitive:this._getCaseSensitiveValue(),incremental:!0}).then(v=>{this.updateButtons(v)}),!1}_onFocusTrackerFocus(){const w=this._terminalService.activeInstance;w&&w.notifyFindWidgetFocusChanged(!0),this._findWidgetFocused.set(!0)}_onFocusTrackerBlur(){const w=this._terminalService.activeInstance;w&&w.notifyFindWidgetFocusChanged(!1),this._findWidgetFocused.reset()}_onFindInputFocusTrackerFocus(){this._findInputFocused.set(!0)}_onFindInputFocusTrackerBlur(){this._findInputFocused.reset()}findFirst(){const w=this._terminalService.activeInstance;w&&(w.hasSelection()&&w.clearSelection(),w.xterm?.findPrevious(this.inputValue,{regex:this._getRegexValue(),wholeWord:this._getWholeWordValue(),caseSensitive:this._getCaseSensitiveValue()}))}};D=Ee([W(1,f.IContextViewService),W(2,_.IContextKeyService),W(3,A.ITerminalService)],D),e.TerminalFindWidget=D}),define(ne[822],re([1,0,48,647,14]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createTerminalEnvironment=e.getDefaultShellArgs=e.getDefaultShell=e.createVariableResolver=e.getCwd=e.getLangEnvVariable=e.shouldSetLangEnvVariable=e.addTerminalEnvironmentKeys=e.mergeEnvironments=void 0;function A(u,a){if(!!a)if(_.isWindows)for(const n in a){let h=n;for(const d in u)if(n.toLowerCase()===d.toLowerCase()){h=d;break}const g=a[n];g!==void 0&&k(u,h,g)}else Object.keys(a).forEach(n=>{const h=a[n];h!==void 0&&k(u,n,h)})}e.mergeEnvironments=A;function k(u,a,n){typeof n=="string"?u[a]=n:delete u[a]}function D(u,a,n,h){u.TERM_PROGRAM="vscode",a&&(u.TERM_PROGRAM_VERSION=a),v(u,h)&&(u.LANG=C(n)),u.COLORTERM="truecolor"}e.addTerminalEnvironmentKeys=D;function I(u,a){if(!!a)for(const n of Object.keys(a)){const h=a[n];h&&(u[n]=h)}}function w(u,a){return Object.keys(a).forEach(n=>{const h=a[n];if(typeof h=="string")try{a[n]=u(h)}catch{a[n]=h}}),a}function v(u,a){if(a==="on")return!0;if(a==="auto"){const n=u.LANG;return!n||n.search(/\.UTF\-8$/)===-1&&n.search(/\.utf8$/)===-1&&n.search(/\.euc.+/)===-1}return!1}e.shouldSetLangEnvVariable=v;function C(u){const a=u?u.split("-"):[],n=a.length;if(n===0)return"en_US.UTF-8";if(n===1){const h={af:"ZA",am:"ET",be:"BY",bg:"BG",ca:"ES",cs:"CZ",da:"DK",de:"DE",el:"GR",en:"US",es:"ES",et:"EE",eu:"ES",fi:"FI",fr:"FR",he:"IL",hr:"HR",hu:"HU",hy:"AM",is:"IS",it:"IT",ja:"JP",kk:"KZ",ko:"KR",lt:"LT",nl:"NL",no:"NO",pl:"PL",pt:"BR",ro:"RO",ru:"RU",sk:"SK",sl:"SI",sr:"YU",sv:"SE",tr:"TR",uk:"UA",zh:"CN"};a[0]in h&&a.push(h[a[0]])}else a[1]=a[1].toUpperCase();return a.join("_")+".UTF-8"}e.getLangEnvVariable=C;function o(u,a,n,h,g,d){if(u.cwd){const b=typeof u.cwd=="object"?u.cwd.fsPath:u.cwd,E=c(b,n);return i(E||b)}let m;return!u.ignoreConfigurationCwd&&g&&(n&&(g=c(g,n,d)),g&&(t.isAbsolute(g)?m=g:h&&(m=t.join(h.fsPath,g)))),m||(m=h?h.fsPath:a||""),i(m)}e.getCwd=o;function c(u,a,n){if(a)try{return a(u)}catch(h){n?.error("Could not resolve terminal cwd",h);return}return u}function i(u){return _.OS===1&&u&&u[1]===":"?u[0].toUpperCase()+u.substr(1):u}function S(u,a,n){if(!!n)return h=>n.resolveWithEnvironment(a,u,h)}e.createVariableResolver=S;function s(u,a,n,h,g,d,m,b=_.platform){let E;m&&(E=r(u,"automationShell",b)),E||(E=r(u,"shell",b));let y=E||a;if(b===3&&!n&&h){const T=t.join(h,"Sysnative").replace(/\//g,"\\").toLowerCase();y&&y.toLowerCase().indexOf(T)===0&&(y=t.join(h,"System32",y.substr(T.length+1)))}if(y&&b===3&&(y=y.replace(/\//g,"\\")),g)try{y=g(y)}catch(T){d.error("Could not resolve shell",T)}return y}e.getDefaultShell=s;function l(u,a,n,h,g=_.platform){if(a&&r(u,"automationShell",g))return[];const d=g===3?"windows":g===1?"osx":"linux";let m=u(`terminal.integrated.shellArgs.${d}`);if(!m)return[];if(typeof m=="string"&&g===3)return n?n(m):m;if(n){const b=[];for(const E of m)try{b.push(n(E))}catch(y){h.error(`Could not resolve terminal.integrated.shellArgs.${d}`,y),b.push(E)}m=b}return m}e.getDefaultShellArgs=l;function r(u,a,n=_.platform){return u(`terminal.integrated.${a}.${n===3?"windows":n===1?"osx":"linux"}`)}function p(u,a,n,h,g,d){const m={};if(u.strictEnv)I(m,u.env);else{I(m,d);const b={...a};n&&(b&&w(n,b),u.env&&w(n,u.env)),(0,f.sanitizeProcessEnvironment)(m,"VSCODE_IPC_HOOK_CLI"),A(m,b),A(m,u.env),D(m,h,_.locale,g)}return m}e.createTerminalEnvironment=p}),define(ne[239],re([1,0,1781]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.terminalStrings=e.formatMessageForTerminal=void 0;function f(_,A=!1){return`${A?"":`\r `}[1m${_}[0m \r`}e.formatMessageForTerminal=f,e.terminalStrings={terminal:(0,t.localize)(0,null),doNotShowAgain:(0,t.localize)(1,null),currentSessionCategory:(0,t.localize)(2,null),previousSessionCategory:(0,t.localize)(3,null),focus:{value:(0,t.localize)(4,null),original:"Focus Terminal"},kill:{value:(0,t.localize)(5,null),original:"Kill Terminal",short:(0,t.localize)(6,null)},moveToEditor:{value:(0,t.localize)(7,null),original:"Move Terminal into Editor Area"},moveToTerminalPanel:{value:(0,t.localize)(8,null),original:"Move Terminal into Panel"},changeIcon:{value:(0,t.localize)(9,null),original:"Change Icon..."},changeColor:{value:(0,t.localize)(10,null),original:"Change Color..."},split:{value:(0,t.localize)(11,null),original:"Split Terminal",short:(0,t.localize)(12,null)},unsplit:{value:(0,t.localize)(13,null),original:"Unsplit Terminal"},rename:{value:(0,t.localize)(14,null),original:"Rename..."},toggleSizeToContentWidth:{value:(0,t.localize)(15,null),original:"Toggle Size to Content Width"}}}),define(ne[2230],re([1,0,18,9,1757,8,239]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalShellIntegrationLinkDetector=void 0;const D="Shell integration activated",I=new Uint8Array(D.split("").map(v=>v.charCodeAt(0)));let w=class{constructor(C,o){this.xterm=C,this._configurationService=o}detect(C,o,c){return this._matches(C)?[{text:D,type:4,label:(0,_.localize)(0,null),uri:f.URI.from({scheme:t.Schemas.https,path:"aka.ms/vscode-shell-integration"}),bufferRange:{start:{x:1,y:o+1},end:{x:D.length%this.xterm.cols,y:o+Math.floor(D.length/this.xterm.cols)+1}},actions:[{label:k.terminalStrings.doNotShowAgain,commandId:"",run:()=>this._hideMessage()}]}]:[]}_matches(C){let o;for(let c=0;c<I.length;c++)if(o=C[Math.floor(c/this.xterm.cols)].getCell(c%this.xterm.cols,o),o?.getCode()!==I[c])return!1;return!0}async _hideMessage(){await this._configurationService.updateValue("terminal.integrated.shellIntegration.showWelcome",!1)}};w.id="shellintegration",w=Ee([W(1,A.IConfigurationService)],w),e.TerminalShellIntegrationLinkDetector=w}),define(ne[2231],re([1,0,6,2,556,9]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LocalPty=void 0;let k=class extends f.Disposable{constructor(I,w,v){super();this.id=I,this.shouldPersist=w,this._localPtyService=v,this._inReplay=!1,this._properties={cwd:"",initialCwd:"",fixedDimensions:{cols:void 0,rows:void 0},title:"",shellType:void 0,hasChildProcesses:!0,resolvedShellLaunchConfig:{},overrideDimensions:void 0},this._onProcessData=this._register(new t.Emitter),this.onProcessData=this._onProcessData.event,this._onProcessReplay=this._register(new t.Emitter),this.onProcessReplay=this._onProcessReplay.event,this._onProcessReady=this._register(new t.Emitter),this.onProcessReady=this._onProcessReady.event,this._onDidChangeProperty=this._register(new t.Emitter),this.onDidChangeProperty=this._onDidChangeProperty.event,this._onProcessExit=this._register(new t.Emitter),this.onProcessExit=this._onProcessExit.event,this._onRestoreCommands=this._register(new t.Emitter),this.onRestoreCommands=this._onRestoreCommands.event}start(){return this._localPtyService.start(this.id)}detach(){return this._localPtyService.detachFromProcess(this.id)}shutdown(I){this._localPtyService.shutdown(this.id,I)}async processBinary(I){if(!this._inReplay)return this._localPtyService.processBinary(this.id,I)}input(I){this._inReplay||this._localPtyService.input(this.id,I)}resize(I,w){this._inReplay||this._localPtyService.resize(this.id,I,w)}async getInitialCwd(){return this._properties.initialCwd}async getCwd(){return this._properties.cwd||this._properties.initialCwd}async refreshProperty(I){return this._localPtyService.refreshProperty(this.id,I)}async updateProperty(I,w){return this._localPtyService.updateProperty(this.id,I,w)}getLatency(){return this._localPtyService.getLatency(this.id)}acknowledgeDataEvent(I){this._inReplay||this._localPtyService.acknowledgeDataEvent(this.id,I)}setUnicodeVersion(I){return this._localPtyService.setUnicodeVersion(this.id,I)}handleData(I){this._onProcessData.fire(I)}handleExit(I){this._onProcessExit.fire(I)}handleReady(I){this._onProcessReady.fire(I)}handleDidChangeProperty({type:I,value:w}){switch(I){case"cwd":this._properties.cwd=w;break;case"initialCwd":this._properties.initialCwd=w;break;case"resolvedShellLaunchConfig":w.cwd&&typeof w.cwd!="string"&&(w.cwd=A.URI.revive(w.cwd))}this._onDidChangeProperty.fire({type:I,value:w})}async handleReplay(I){try{this._inReplay=!0;for(const w of I.events){(w.cols!==0||w.rows!==0)&&this._onDidChangeProperty.fire({type:"overrideDimensions",value:{cols:w.cols,rows:w.rows,forceExactSize:!0}});const v={data:w.data,trackCommit:!0};this._onProcessData.fire(v),await v.writePromise}}finally{this._inReplay=!1}I.commands&&this._onRestoreCommands.fire(I.commands),this._onDidChangeProperty.fire({type:"overrideDimensions",value:void 0})}handleOrphanQuestion(){this._localPtyService.orphanQuestionReply(this.id)}};k=Ee([W(2,_.ILocalPtyService)],k),e.LocalPty=k}),define(ne[823],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.flatTestItemDelimiter=void 0,e.flatTestItemDelimiter=" \u203A "}),define(ne[495],re([1,0,92]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestTreeErrorMessage=e.TestItemTreeElement=void 0;let f=0;const _=()=>String(f++);class A{constructor(I,w=null){this.test=I,this.parent=w,this.children=new Set,this.treeId=_(),this.depth=this.parent?this.parent.depth+1:0,this.retired=!1,this.state=0,this.ownState=0}get tests(){return t.Iterable.single(this.test)}get description(){return this.test.item.description}get sortText(){return this.test.item.sortText}get label(){return this.test.item.label}toJSON(){if(this.depth===0)return{controllerId:this.test.controllerId};const I={$mid:13,tests:[this.test]};for(let w=this.parent;w&&w.depth>0;w=w.parent)I.tests.unshift(w.test);return I}}e.TestItemTreeElement=A;class k{constructor(I,w){this.message=I,this.parent=w,this.treeId=_(),this.children=new Set}get description(){return typeof this.message=="string"?this.message:this.message.value}}e.TestTreeErrorMessage=k}),define(ne[2232],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeChangeList=e.NodeRenderDirective=e.peersHaveChildren=e.pruneNodesWithParentsNotInTree=e.testIdentityProvider=void 0,e.testIdentityProvider={getId(D){return D.treeId+"\0"+D.test.expand}};const t=(D,I)=>{for(const w of D)w&&w.parent&&!I.hasElement(w.parent)&&D.delete(w)};e.pruneNodesWithParentsNotInTree=t;const f=(D,I)=>{for(const w of D.parent?D.parent.children:I())if(w!==D&&w.children.size)return!0;return!1};e.peersHaveChildren=f;var _;(function(D){D[D.Omit=0]="Omit",D[D.Concat=1]="Concat"})(_=e.NodeRenderDirective||(e.NodeRenderDirective={}));const A=(D,I)=>{for(const w of D)w&&!I.hasElement(w)&&D.delete(w)};class k{constructor(){this.changedParents=new Set,this.updatedNodes=new Set,this.omittedNodes=new WeakSet,this.isFirstApply=!0}updated(I){this.updatedNodes.add(I)}addedOrRemoved(I){this.changedParents.add(this.getNearestNotOmittedParent(I))}applyTo(I,w,v){A(this.changedParents,I),A(this.updatedNodes,I);const C=this.isFirstApply?1/0:0;this.isFirstApply=!1;for(let o of this.changedParents){for(;o&&typeof w(o,()=>[])!="object";)o=o.parent;(o===null||I.hasElement(o))&&I.setChildren(o,this.renderNodeList(w,o===null?v():o.children),{diffIdentityProvider:e.testIdentityProvider,diffDepth:C})}for(const o of this.updatedNodes)I.hasElement(o)&&I.rerender(o);this.changedParents.clear(),this.updatedNodes.clear()}getNearestNotOmittedParent(I){let w=I&&I.parent;for(;w&&this.omittedNodes.has(w);)w=w.parent;return w}*renderNodeList(I,w){for(const v of w){const C=I(v,this.renderNodeList.bind(this,I));if(C===0)this.omittedNodes.add(v);else if(C===1){if(this.omittedNodes.add(v),"children"in v)for(const o of this.renderNodeList(I,v.children))yield o}else this.omittedNodes.delete(v),yield C}}}e.NodeChangeList=k}),define(ne[593],re([1,0,66,1794,32,12,82]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.testStatesToIconColors=e.testMessageSeverityColors=e.testingPeekHeaderBackground=e.testingPeekBorder=e.testingColorIconSkipped=e.testingColorIconUnset=e.testingColorIconQueued=e.testingColorRunAction=e.testingColorIconPassed=e.testingColorIconErrored=e.testingColorIconFailed=void 0,e.testingColorIconFailed=(0,_.registerColor)("testing.iconFailed",{dark:"#f14c4c",light:"#f14c4c",hcDark:"#f14c4c",hcLight:"#B5200D"},(0,f.localize)(0,null)),e.testingColorIconErrored=(0,_.registerColor)("testing.iconErrored",{dark:"#f14c4c",light:"#f14c4c",hcDark:"#f14c4c",hcLight:"#B5200D"},(0,f.localize)(1,null)),e.testingColorIconPassed=(0,_.registerColor)("testing.iconPassed",{dark:"#73c991",light:"#73c991",hcDark:"#73c991",hcLight:"#007100"},(0,f.localize)(2,null)),e.testingColorRunAction=(0,_.registerColor)("testing.runAction",{dark:e.testingColorIconPassed,light:e.testingColorIconPassed,hcDark:e.testingColorIconPassed,hcLight:e.testingColorIconPassed},(0,f.localize)(3,null)),e.testingColorIconQueued=(0,_.registerColor)("testing.iconQueued",{dark:"#cca700",light:"#cca700",hcDark:"#cca700",hcLight:"#cca700"},(0,f.localize)(4,null)),e.testingColorIconUnset=(0,_.registerColor)("testing.iconUnset",{dark:"#848484",light:"#848484",hcDark:"#848484",hcLight:"#848484"},(0,f.localize)(5,null)),e.testingColorIconSkipped=(0,_.registerColor)("testing.iconSkipped",{dark:"#848484",light:"#848484",hcDark:"#848484",hcLight:"#848484"},(0,f.localize)(6,null)),e.testingPeekBorder=(0,_.registerColor)("testing.peekBorder",{dark:_.editorErrorForeground,light:_.editorErrorForeground,hcDark:_.contrastBorder,hcLight:_.contrastBorder},(0,f.localize)(7,null)),e.testingPeekHeaderBackground=(0,_.registerColor)("testing.peekHeaderBackground",{dark:(0,_.transparent)(_.editorErrorForeground,.1),light:(0,_.transparent)(_.editorErrorForeground,.1),hcDark:null,hcLight:null},(0,f.localize)(8,null)),e.testMessageSeverityColors={[0]:{decorationForeground:(0,_.registerColor)("testing.message.error.decorationForeground",{dark:_.editorErrorForeground,light:_.editorErrorForeground,hcDark:_.editorForeground,hcLight:_.editorForeground},(0,f.localize)(9,null)),marginBackground:(0,_.registerColor)("testing.message.error.lineBackground",{dark:new t.Color(new t.RGBA(255,0,0,.2)),light:new t.Color(new t.RGBA(255,0,0,.2)),hcDark:null,hcLight:null},(0,f.localize)(10,null))},[1]:{decorationForeground:(0,_.registerColor)("testing.message.info.decorationForeground",{dark:(0,_.transparent)(_.editorForeground,.5),light:(0,_.transparent)(_.editorForeground,.5),hcDark:(0,_.transparent)(_.editorForeground,.5),hcLight:(0,_.transparent)(_.editorForeground,.5)},(0,f.localize)(11,null)),marginBackground:(0,_.registerColor)("testing.message.info.lineBackground",{dark:null,light:null,hcDark:null,hcLight:null},(0,f.localize)(12,null))}},e.testStatesToIconColors={[6]:e.testingColorIconErrored,[4]:e.testingColorIconFailed,[3]:e.testingColorIconPassed,[1]:e.testingColorIconQueued,[0]:e.testingColorIconUnset,[5]:e.testingColorIconSkipped},(0,A.registerThemingParticipant)((D,I)=>{for(const[c,{marginBackground:i}]of Object.entries(e.testMessageSeverityColors))I.addRule(`.monaco-editor .testing-inline-message-severity-${c} { background: ${D.getColor(i)}; }`);const w=D.getColor(_.inputActiveOptionBorder);w&&I.addRule(`.testing-filter-action-item > .monaco-action-bar .testing-filter-button.checked { border-color: ${w}; }`);const v=D.getColor(_.inputActiveOptionForeground);v&&I.addRule(`.testing-filter-action-item > .monaco-action-bar .testing-filter-button.checked { color: ${v}; }`);const C=D.getColor(_.inputActiveOptionBackground);C&&I.addRule(`.testing-filter-action-item > .monaco-action-bar .testing-filter-button.checked { background-color: ${C}; }`);const o=D.getColor(k.ACTIVITY_BAR_BADGE_BACKGROUND);I.addRule(`.monaco-workbench .part > .title > .title-actions .action-label.codicon-testing-autorun::after { background-color: ${o}; }`)})}),define(ne[293],re([1,0,33,1783,63,12,593]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.testingStatesToIcons=e.testingCancelRefreshTests=e.testingRefreshTests=e.testingUpdateProfiles=e.testingShowAsTree=e.testingShowAsList=e.testingHiddenIcon=e.testingAutorunIcon=e.testingFilterIcon=e.testingCancelIcon=e.testingDebugIcon=e.testingDebugAllIcon=e.testingRunAllIcon=e.testingRunIcon=e.testingViewIcon=void 0,e.testingViewIcon=(0,_.registerIcon)("test-view-icon",t.Codicon.beaker,(0,f.localize)(0,null)),e.testingRunIcon=(0,_.registerIcon)("testing-run-icon",t.Codicon.run,(0,f.localize)(1,null)),e.testingRunAllIcon=(0,_.registerIcon)("testing-run-all-icon",t.Codicon.runAll,(0,f.localize)(2,null)),e.testingDebugAllIcon=(0,_.registerIcon)("testing-debug-all-icon",t.Codicon.debugAltSmall,(0,f.localize)(3,null)),e.testingDebugIcon=(0,_.registerIcon)("testing-debug-icon",t.Codicon.debugAltSmall,(0,f.localize)(4,null)),e.testingCancelIcon=(0,_.registerIcon)("testing-cancel-icon",t.Codicon.debugStop,(0,f.localize)(5,null)),e.testingFilterIcon=(0,_.registerIcon)("testing-filter",t.Codicon.filter,(0,f.localize)(6,null)),e.testingAutorunIcon=(0,_.registerIcon)("testing-autorun",t.Codicon.debugRerun,(0,f.localize)(7,null)),e.testingHiddenIcon=(0,_.registerIcon)("testing-hidden",t.Codicon.eyeClosed,(0,f.localize)(8,null)),e.testingShowAsList=(0,_.registerIcon)("testing-show-as-list-icon",t.Codicon.listTree,(0,f.localize)(9,null)),e.testingShowAsTree=(0,_.registerIcon)("testing-show-as-list-icon",t.Codicon.listFlat,(0,f.localize)(10,null)),e.testingUpdateProfiles=(0,_.registerIcon)("testing-update-profiles",t.Codicon.gear,(0,f.localize)(11,null)),e.testingRefreshTests=(0,_.registerIcon)("testing-refresh-tests",t.Codicon.refresh,(0,f.localize)(12,null)),e.testingCancelRefreshTests=(0,_.registerIcon)("testing-cancel-refresh-tests",t.Codicon.stop,(0,f.localize)(13,null)),e.testingStatesToIcons=new Map([[6,(0,_.registerIcon)("testing-error-icon",t.Codicon.issues,(0,f.localize)(14,null))],[4,(0,_.registerIcon)("testing-failed-icon",t.Codicon.error,(0,f.localize)(15,null))],[3,(0,_.registerIcon)("testing-passed-icon",t.Codicon.pass,(0,f.localize)(16,null))],[1,(0,_.registerIcon)("testing-queued-icon",t.Codicon.history,(0,f.localize)(17,null))],[2,_.spinningLoading],[5,(0,_.registerIcon)("testing-skipped-icon",t.Codicon.debugStepOver,(0,f.localize)(18,null))],[0,(0,_.registerIcon)("testing-unset-icon",t.Codicon.circleOutline,(0,f.localize)(19,null))]]),(0,A.registerThemingParticipant)((D,I)=>{for(const[w,v]of e.testingStatesToIcons.entries()){const C=k.testStatesToIconColors[w];!C||I.addRule(`.monaco-workbench ${A.ThemeIcon.asCSSSelector(v)} { color: ${D.getColor(C)} !important; }`)}I.addRule(` .monaco-editor ${A.ThemeIcon.asCSSSelector(e.testingRunIcon)}, .monaco-editor ${A.ThemeIcon.asCSSSelector(e.testingRunAllIcon)} { color: ${D.getColor(k.testingColorRunAction)}; } `)})}),define(ne[327],re([1,0,1795]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTestingConfiguration=e.testingConfiguation=e.DefaultGutterClickAction=e.AutoRunMode=e.AutoOpenPeekViewWhen=e.AutoOpenTesting=e.TestingConfigKeys=void 0;var f;(function(w){w.AutoRunDelay="testing.autoRun.delay",w.AutoRunMode="testing.autoRun.mode",w.AutoOpenPeekView="testing.automaticallyOpenPeekView",w.AutoOpenPeekViewDuringAutoRun="testing.automaticallyOpenPeekViewDuringAutoRun",w.OpenTesting="testing.openTesting",w.FollowRunningTest="testing.followRunningTest",w.DefaultGutterClickAction="testing.defaultGutterClickAction",w.GutterEnabled="testing.gutterEnabled",w.SaveBeforeTest="testing.saveBeforeTest"})(f=e.TestingConfigKeys||(e.TestingConfigKeys={}));var _;(function(w){w.NeverOpen="neverOpen",w.OpenOnTestStart="openOnTestStart",w.OpenOnTestFailure="openOnTestFailure"})(_=e.AutoOpenTesting||(e.AutoOpenTesting={}));var A;(function(w){w.FailureVisible="failureInVisibleDocument",w.FailureAnywhere="failureAnywhere",w.Never="never"})(A=e.AutoOpenPeekViewWhen||(e.AutoOpenPeekViewWhen={}));var k;(function(w){w.AllInWorkspace="all",w.OnlyPreviouslyRun="rerun"})(k=e.AutoRunMode||(e.AutoRunMode={}));var D;(function(w){w.Run="run",w.Debug="debug",w.ContextMenu="contextMenu"})(D=e.DefaultGutterClickAction||(e.DefaultGutterClickAction={})),e.testingConfiguation={id:"testing",order:21,title:(0,t.localize)(0,null),type:"object",properties:{["testing.autoRun.mode"]:{description:(0,t.localize)(1,null),enum:["all","rerun"],default:"all",enumDescriptions:[(0,t.localize)(2,null),(0,t.localize)(3,null)]},["testing.autoRun.delay"]:{type:"integer",minimum:0,description:(0,t.localize)(4,null),default:1e3},["testing.automaticallyOpenPeekView"]:{description:(0,t.localize)(5,null),enum:["failureAnywhere","failureInVisibleDocument","never"],default:"failureInVisibleDocument",enumDescriptions:[(0,t.localize)(6,null),(0,t.localize)(7,null),(0,t.localize)(8,null)]},["testing.automaticallyOpenPeekViewDuringAutoRun"]:{description:(0,t.localize)(9,null),type:"boolean",default:!1},["testing.followRunningTest"]:{description:(0,t.localize)(10,null),type:"boolean",default:!0},["testing.defaultGutterClickAction"]:{description:(0,t.localize)(11,null),enum:["run","debug","contextMenu"],enumDescriptions:[(0,t.localize)(12,null),(0,t.localize)(13,null),(0,t.localize)(14,null)],default:"run"},["testing.gutterEnabled"]:{description:(0,t.localize)(15,null),type:"boolean",default:!0},["testing.saveBeforeTest"]:{description:(0,t.localize)(16,null),type:"boolean",default:!0},["testing.openTesting"]:{enum:["neverOpen","openOnTestStart","openOnTestFailure"],enumDescriptions:[(0,t.localize)(17,null),(0,t.localize)(18,null),(0,t.localize)(19,null)],default:"openOnTestStart",description:(0,t.localize)(20,null)}}};const I=(w,v)=>w.getValue(v);e.getTestingConfiguration=I}),define(ne[594],re([1,0,1796]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestCommandId=e.testConfigurationGroupNames=e.labelForTestInState=e.testStateNames=e.TestExplorerStateFilter=e.TestExplorerViewSorting=e.TestExplorerViewMode=e.Testing=void 0;var f;(function(w){w.ViewletId="workbench.view.extension.test",w.ExplorerViewId="workbench.view.testing",w.OutputPeekContributionId="editor.contrib.testingOutputPeek",w.DecorationsContributionId="editor.contrib.testingDecorations"})(f=e.Testing||(e.Testing={}));var _;(function(w){w.List="list",w.Tree="true"})(_=e.TestExplorerViewMode||(e.TestExplorerViewMode={}));var A;(function(w){w.ByLocation="location",w.ByStatus="status",w.ByDuration="duration"})(A=e.TestExplorerViewSorting||(e.TestExplorerViewSorting={}));var k;(function(w){w.OnlyFailed="failed",w.OnlyExecuted="excuted",w.All="all"})(k=e.TestExplorerStateFilter||(e.TestExplorerStateFilter={})),e.testStateNames={[6]:(0,t.localize)(0,null),[4]:(0,t.localize)(1,null),[3]:(0,t.localize)(2,null),[1]:(0,t.localize)(3,null),[2]:(0,t.localize)(4,null),[5]:(0,t.localize)(5,null),[0]:(0,t.localize)(6,null)};const D=(w,v)=>(0,t.localize)(7,null,w,e.testStateNames[v]);e.labelForTestInState=D,e.testConfigurationGroupNames={[4]:(0,t.localize)(8,null),[2]:(0,t.localize)(9,null),[8]:(0,t.localize)(10,null)};var I;(function(w){w.CancelTestRefreshAction="testing.cancelTestRefresh",w.CancelTestRunAction="testing.cancelRun",w.ClearTestResultsAction="testing.clearTestResults",w.CollapseAllAction="testing.collapseAll",w.ConfigureTestProfilesAction="testing.configureProfile",w.DebugAction="testing.debug",w.DebugAllAction="testing.debugAll",w.DebugAtCursor="testing.debugAtCursor",w.DebugCurrentFile="testing.debugCurrentFile",w.DebugFailedTests="testing.debugFailTests",w.DebugLastRun="testing.debugLastRun",w.DebugSelectedAction="testing.debugSelected",w.FilterAction="workbench.actions.treeView.testExplorer.filter",w.GoToTest="testing.editFocusedTest",w.HideTestAction="testing.hideTest",w.OpenOutputPeek="testing.openOutputPeek",w.RefreshTestsAction="testing.refreshTests",w.ReRunFailedTests="testing.reRunFailTests",w.ReRunLastRun="testing.reRunLastRun",w.RunAction="testing.run",w.RunAllAction="testing.runAll",w.RunAtCursor="testing.runAtCursor",w.RunCurrentFile="testing.runCurrentFile",w.RunSelectedAction="testing.runSelected",w.RunUsingProfileAction="testing.runUsing",w.SearchForTestExtension="testing.searchForTestExtension",w.SelectDefaultTestProfiles="testing.selectDefaultTestProfiles",w.ShowMostRecentOutputAction="testing.showMostRecentOutput",w.TestingSortByDurationAction="testing.sortByDuration",w.TestingSortByLocationAction="testing.sortByLocation",w.TestingSortByStatusAction="testing.sortByStatus",w.TestingViewAsListAction="testing.viewAsList",w.TestingViewAsTreeAction="testing.viewAsTree",w.ToggleAutoRun="testing.toggleautoRun",w.ToggleInlineTestOutput="testing.toggleInlineTestOutput",w.UnhideTestAction="testing.unhideTest"})(I=e.TestCommandId||(e.TestCommandId={}))}),define(ne[362],re([1,0,6,2]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MutableObservableValue=e.staticObservableValue=void 0;const _=k=>({onDidChange:t.Event.None,value:k});e.staticObservableValue=_;class A extends f.Disposable{constructor(D){super();this._value=D,this.changeEmitter=this._register(new t.Emitter),this.onDidChange=this.changeEmitter.event}get value(){return this._value}set value(D){D!==this._value&&(this._value=D,this.changeEmitter.fire(D))}static stored(D,I){const w=new A(D.get(I));return w.onDidChange(v=>D.store(v)),w}}e.MutableObservableValue=A}),define(ne[328],re([1,0,6,24]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StoredValue=void 0;const _={deserialize:k=>JSON.parse(k),serialize:k=>JSON.stringify(k)};let A=class{constructor(D,I){this.storage=I,this.onDidChange=t.Event.filter(this.storage.onDidChangeValue,w=>w.key===this.key),this.key=D.key,this.scope=D.scope,this.target=D.target,this.serialization=D.serialization??_}get(D){const I=this.storage.get(this.key,this.scope);return I===void 0?D:this.serialization.deserialize(I)}store(D){this.storage.store(this.key,this.serialization.serialize(D),this.scope,this.target)}delete(){this.storage.remove(this.key,this.scope)}};A=Ee([W(1,f.IStorageService)],A),e.StoredValue=A}),define(ne[329],re([1,0,9,20]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractIncrementalTestCollection=e.IncrementalChangeCollector=e.TestsDiffOp=e.TestDiffOpType=e.DetailType=e.TestResultItem=e.applyTestItemUpdate=e.ITestItemUpdate=e.InternalTestItem=e.TestItemExpandState=e.ITestItem=e.denamespaceTestTag=e.namespaceTestTag=e.ITestTaskState=e.ITestMessage=e.ITestOutputMessage=e.ITestErrorMessage=e.TestMessageType=e.IRichLocation=e.testRunProfileBitsetList=e.TestRunProfileBitset=e.TestResultState=void 0;var _;(function(m){m[m.Unset=0]="Unset",m[m.Queued=1]="Queued",m[m.Running=2]="Running",m[m.Passed=3]="Passed",m[m.Failed=4]="Failed",m[m.Skipped=5]="Skipped",m[m.Errored=6]="Errored"})(_=e.TestResultState||(e.TestResultState={}));var A;(function(m){m[m.Run=2]="Run",m[m.Debug=4]="Debug",m[m.Coverage=8]="Coverage",m[m.HasNonDefaultProfile=16]="HasNonDefaultProfile",m[m.HasConfigurable=32]="HasConfigurable"})(A=e.TestRunProfileBitset||(e.TestRunProfileBitset={})),e.testRunProfileBitsetList=[2,4,8,16];var k;(function(m){m.serialize=b=>({range:b.range.toJSON(),uri:b.uri.toJSON()}),m.deserialize=b=>({range:f.Range.lift(b.range),uri:t.URI.revive(b.uri)})})(k=e.IRichLocation||(e.IRichLocation={}));var D;(function(m){m[m.Error=0]="Error",m[m.Info=1]="Info"})(D=e.TestMessageType||(e.TestMessageType={}));var I;(function(m){m.serialize=b=>({message:b.message,type:0,expected:b.expected,actual:b.actual,location:b.location&&k.serialize(b.location)}),m.deserialize=b=>({message:b.message,type:0,expected:b.expected,actual:b.actual,location:b.location&&k.deserialize(b.location)})})(I=e.ITestErrorMessage||(e.ITestErrorMessage={}));var w;(function(m){m.serialize=b=>({message:b.message,type:1,offset:b.offset,location:b.location&&k.serialize(b.location)}),m.deserialize=b=>({message:b.message,type:1,offset:b.offset,location:b.location&&k.deserialize(b.location)})})(w=e.ITestOutputMessage||(e.ITestOutputMessage={}));var v;(function(m){m.serialize=b=>b.type===0?I.serialize(b):w.serialize(b),m.deserialize=b=>b.type===0?I.deserialize(b):w.deserialize(b)})(v=e.ITestMessage||(e.ITestMessage={}));var C;(function(m){m.serialize=b=>({state:b.state,duration:b.duration,messages:b.messages.map(v.serialize)}),m.deserialize=b=>({state:b.state,duration:b.duration,messages:b.messages.map(v.deserialize)})})(C=e.ITestTaskState||(e.ITestTaskState={}));const o="\0",c=(m,b)=>m+o+b;e.namespaceTestTag=c;const i=m=>{const b=m.indexOf(o);return{ctrlId:m.slice(0,b),tagId:m.slice(b+1)}};e.denamespaceTestTag=i;var S;(function(m){m.serialize=b=>({extId:b.extId,label:b.label,tags:b.tags,busy:b.busy,children:void 0,uri:b.uri?.toJSON(),range:b.range?.toJSON()||null,description:b.description,error:b.error,sortText:b.sortText}),m.deserialize=b=>({extId:b.extId,label:b.label,tags:b.tags,busy:b.busy,children:void 0,uri:b.uri?t.URI.revive(b.uri):void 0,range:b.range?f.Range.lift(b.range):null,description:b.description,error:b.error,sortText:b.sortText})})(S=e.ITestItem||(e.ITestItem={}));var s;(function(m){m[m.NotExpandable=0]="NotExpandable",m[m.Expandable=1]="Expandable",m[m.BusyExpanding=2]="BusyExpanding",m[m.Expanded=3]="Expanded"})(s=e.TestItemExpandState||(e.TestItemExpandState={}));var l;(function(m){m.serialize=b=>({controllerId:b.controllerId,expand:b.expand,parent:b.parent,item:S.serialize(b.item)}),m.deserialize=b=>({controllerId:b.controllerId,expand:b.expand,parent:b.parent,item:S.deserialize(b.item)})})(l=e.InternalTestItem||(e.InternalTestItem={}));var r;(function(m){m.serialize=b=>{let E;return b.item&&(E={},b.item.label!==void 0&&(E.label=b.item.label),b.item.tags!==void 0&&(E.tags=b.item.tags),b.item.busy!==void 0&&(E.busy=b.item.busy),b.item.uri!==void 0&&(E.uri=b.item.uri?.toJSON()),b.item.range!==void 0&&(E.range=b.item.range?.toJSON()),b.item.description!==void 0&&(E.description=b.item.description),b.item.error!==void 0&&(E.error=b.item.error),b.item.sortText!==void 0&&(E.sortText=b.item.sortText)),{extId:b.extId,expand:b.expand,item:E}},m.deserialize=b=>{let E;return b.item&&(E={},b.item.label!==void 0&&(E.label=b.item.label),b.item.tags!==void 0&&(E.tags=b.item.tags),b.item.busy!==void 0&&(E.busy=b.item.busy),b.item.range!==void 0&&(E.range=b.item.range?f.Range.lift(b.item.range):null),b.item.description!==void 0&&(E.description=b.item.description),b.item.error!==void 0&&(E.error=b.item.error),b.item.sortText!==void 0&&(E.sortText=b.item.sortText)),{extId:b.extId,expand:b.expand,item:E}}})(r=e.ITestItemUpdate||(e.ITestItemUpdate={}));const p=(m,b)=>{b.expand!==void 0&&(m.expand=b.expand),b.item!==void 0&&(m.item=m.item?Object.assign(m.item,b.item):b.item)};e.applyTestItemUpdate=p;var u;(function(m){m.serialize=(b,E)=>({...l.serialize(b),children:E,ownComputedState:b.ownComputedState,computedState:b.computedState,tasks:b.tasks.map(C.serialize)})})(u=e.TestResultItem||(e.TestResultItem={}));var a;(function(m){m[m.Function=0]="Function",m[m.Statement=1]="Statement"})(a=e.DetailType||(e.DetailType={}));var n;(function(m){m[m.Add=0]="Add",m[m.Update=1]="Update",m[m.Remove=2]="Remove",m[m.IncrementPendingExtHosts=3]="IncrementPendingExtHosts",m[m.Retire=4]="Retire",m[m.AddTag=5]="AddTag",m[m.RemoveTag=6]="RemoveTag"})(n=e.TestDiffOpType||(e.TestDiffOpType={}));var h;(function(m){m.deserialize=b=>b.op===0?{op:b.op,item:l.deserialize(b.item)}:b.op===1?{op:b.op,item:r.deserialize(b.item)}:b,m.serialize=b=>b.op===0?{op:b.op,item:l.serialize(b.item)}:b.op===1?{op:b.op,item:r.serialize(b.item)}:b})(h=e.TestsDiffOp||(e.TestsDiffOp={}));class g{add(b){}update(b){}remove(b,E){}complete(){}}e.IncrementalChangeCollector=g;class d{constructor(){this._tags=new Map,this.items=new Map,this.roots=new Set,this.busyControllerCount=0,this.pendingRootCount=0,this.tags=this._tags}apply(b){const E=this.createChangeCollector();for(const y of b)switch(y.op){case 0:{const T=l.deserialize(y.item);if(T.parent){if(this.items.has(T.parent)){const R=this.items.get(T.parent);R.children.add(T.item.extId);const O=this.createItem(T,R);this.items.set(T.item.extId,O),E.add(O)}}else{const R=this.createItem(T);this.roots.add(R),this.items.set(T.item.extId,R),E.add(R)}T.expand===2&&this.busyControllerCount++;break}case 1:{const T=r.deserialize(y.item),R=this.items.get(T.extId);if(!R)break;T.expand!==void 0&&(R.expand===2&&this.busyControllerCount--,T.expand===2&&this.busyControllerCount++),(0,e.applyTestItemUpdate)(R,T),E.update(R);break}case 2:{const T=this.items.get(y.itemId);if(!T)break;T.parent?this.items.get(T.parent).children.delete(T.item.extId):this.roots.delete(T);const R=[[y.itemId]];for(;R.length;)for(const O of R.pop()){const x=this.items.get(O);x&&(R.push(x.children),this.items.delete(O),E.remove(x,x!==T),x.expand===2&&this.busyControllerCount--)}break}case 4:this.retireTest(y.itemId);break;case 3:this.updatePendingRoots(y.amount);break;case 5:this._tags.set(y.tag.id,y.tag);break;case 6:this._tags.delete(y.id);break}E.complete()}retireTest(b){}updatePendingRoots(b){this.pendingRootCount+=b}createChangeCollector(){return new g}}e.AbstractIncrementalTestCollection=d}),define(ne[824],re([1,0,495,329]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ByLocationTestItemElement=void 0;class _ extends t.TestItemTreeElement{constructor(k,D,I){super({...k,item:{...k.item}},D);this.addedOrRemoved=I,this.updateErrorVisiblity()}update(k){(0,f.applyTestItemUpdate)(this.test,k),this.updateErrorVisiblity()}updateErrorVisiblity(){this.errorChild&&!this.test.item.error?(this.addedOrRemoved(this.errorChild),this.children.delete(this.errorChild),this.errorChild=void 0):this.test.item.error&&!this.errorChild&&(this.errorChild=new t.TestTreeErrorMessage(this.test.item.error,this),this.children.add(this.errorChild),this.addedOrRemoved(this.errorChild))}}e.ByLocationTestItemElement=_}),define(ne[2233],re([1,0,6,92,329]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadTestCollection=void 0;class A extends _.AbstractIncrementalTestCollection{constructor(D){super();this.expandActual=D,this.busyProvidersChangeEmitter=new t.Emitter,this.retireTestEmitter=new t.Emitter,this.expandPromises=new WeakMap,this.onBusyProvidersChange=this.busyProvidersChangeEmitter.event,this.onDidRetireTest=this.retireTestEmitter.event}get busyProviders(){return this.busyControllerCount}get rootItems(){return this.roots}get all(){return this.getIterator()}get rootIds(){return f.Iterable.map(this.roots.values(),D=>D.item.extId)}expand(D,I){const w=this.items.get(D);if(!w)return Promise.resolve();const v=this.expandPromises.get(w);if(v&&v.pendingLvl>=I)return v.prom;const C=this.expandActual(w.item.extId,I),o={doneLvl:v?v.doneLvl:-1,pendingLvl:I,prom:C};return this.expandPromises.set(w,o),C.then(()=>{o.doneLvl=I})}getNodeById(D){return this.items.get(D)}getReviverDiff(){const D=[{op:3,amount:this.pendingRootCount}],I=[this.rootIds];for(;I.length;)for(const w of I.pop()){const v=this.items.get(w);D.push({op:0,item:{controllerId:v.controllerId,expand:v.expand,item:v.item,parent:v.parent}}),I.push(v.children)}return D}apply(D){let I=this.busyControllerCount;super.apply(D),I!==this.busyControllerCount&&this.busyProvidersChangeEmitter.fire(this.busyControllerCount)}clear(){const D=[];for(const I of this.roots)D.push({op:2,itemId:I.item.extId});return this.roots.clear(),this.items.clear(),D}createItem(D){return{...D,children:new Set}}retireTest(D){this.retireTestEmitter.fire(D)}*getIterator(){const D=[this.rootIds];for(;D.length;)for(const I of D.pop()){const w=this.getNodeById(I);yield w,D.push(w.children)}}}e.MainThreadTestCollection=A}),define(ne[2234],re([1,0,30,9]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileCoverage=e.TestCoverage=void 0;class _{constructor(D){this.accessor=D}async getAllFiles(D=t.CancellationToken.None){this.fileCoverage||(this.fileCoverage=this.accessor.provideFileCoverage(D));try{return await this.fileCoverage}catch(I){throw this.fileCoverage=void 0,I}}async getUri(D,I=t.CancellationToken.None){return(await this.getAllFiles(I)).find(v=>v.uri.toString()===D.toString())}}e.TestCoverage=_;class A{constructor(D,I,w){this.index=I,this.accessor=w,this.uri=f.URI.revive(D.uri),this.statement=D.statement,this.branch=D.branch,this.function=D.branch,this._details=D.details}get tpc(){let D=this.statement.covered,I=this.statement.total;return this.branch&&(D+=this.branch.covered,I+=this.branch.total),this.function&&(D+=this.function.covered,I+=this.function.total),I===0?1:D/I}async details(D=t.CancellationToken.None){this._details||(this._details=this.accessor.resolveFileCoverage(this.index,D));try{return await this._details}catch(I){throw this._details=void 0,I}}}e.FileCoverage=A}),define(ne[2235],re([1,0,92,2,24,362,328]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestExclusions=void 0;let D=class extends f.Disposable{constructor(w){super();this.storageService=w,this.excluded=this._register(A.MutableObservableValue.stored(new k.StoredValue({key:"excludedTestItems",scope:1,target:0,serialization:{deserialize:v=>new Set(JSON.parse(v)),serialize:v=>JSON.stringify([...v])}},this.storageService),new Set)),this.onTestExclusionsChanged=this.excluded.onDidChange}get hasAny(){return this.excluded.value.size>0}get all(){return this.excluded.value}toggle(w,v){v!==!0&&this.excluded.value.has(w.item.extId)?this.excluded.value=new Set(t.Iterable.filter(this.excluded.value,C=>C!==w.item.extId)):v!==!1&&!this.excluded.value.has(w.item.extId)&&(this.excluded.value=new Set([...this.excluded.value,w.item.extId]))}contains(w){return this.excluded.value.has(w.item.extId)}clear(){this.excluded.value=new Set}};D=Ee([W(0,_.IStorageService)],D),e.TestExclusions=D}),define(ne[496],re([1,0,6,152,5,362,329]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.allTestFilterTerms=e.TestFilterTerm=e.TestExplorerFilterState=e.ITestExplorerFilterState=void 0,e.ITestExplorerFilterState=(0,_.createDecorator)("testingFilterState");const D=/!?@([^ ,:]+)/g,I=C=>C.replace(/\s\s+/g," ").trim();class w{constructor(){this.focusEmitter=new t.Emitter,this.termFilterState={},this.globList=[],this.includeTags=new Set,this.excludeTags=new Set,this.text=new A.MutableObservableValue(""),this.reveal=new A.MutableObservableValue(void 0),this.onDidRequestInputFocus=this.focusEmitter.event}focusInput(){this.focusEmitter.fire()}setText(o){if(o===this.text.value)return;this.termFilterState={},this.globList=[],this.includeTags.clear(),this.excludeTags.clear();let c="",i=0;for(const S of o.matchAll(D)){let s=S.index+S[0].length;const l=S[0];if(e.allTestFilterTerms.includes(l)&&(this.termFilterState[l]=!0),o[s]===":"){s++;let r=o[s];r!=='"'&&r!=="'"?r=" ":s++;let p="";for(;s<o.length&&o[s]!==r;)o[s]==="\\"?(p+=o[s+1],s+=2):(p+=o[s],s++);S[0].startsWith("!")?this.excludeTags.add((0,k.namespaceTestTag)(S[1],p)):this.includeTags.add((0,k.namespaceTestTag)(S[1],p)),s++}c+=o.slice(i,S.index),i=s}if(c+=o.slice(i).trim(),c.length)for(const S of(0,f.splitGlobAware)(c,",").map(s=>s.trim()).filter(s=>!!s.length))S.startsWith("!")?this.globList.push({include:!1,text:S.slice(1).toLowerCase()}):this.globList.push({include:!0,text:S.toLowerCase()});this.text.value=o}isFilteringFor(o){return!!this.termFilterState[o]}toggleFilteringFor(o,c){const i=this.text.value.trim();c!==!1&&!this.termFilterState[o]?this.setText(i?`${i} ${o}`:o):c!==!0&&this.termFilterState[o]&&this.setText(I(i.replace(o,"")))}}e.TestExplorerFilterState=w;var v;(function(C){C.Failed="@failed",C.Executed="@executed",C.CurrentDoc="@doc",C.Hidden="@hidden"})(v=e.TestFilterTerm||(e.TestFilterTerm={})),e.allTestFilterTerms=["@failed","@executed","@doc","@hidden"]}),define(ne[363],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestId=e.TestPosition=e.TestIdPathParts=void 0;var t;(function(A){A.Delimiter="\0"})(t=e.TestIdPathParts||(e.TestIdPathParts={}));var f;(function(A){A[A.IsSame=0]="IsSame",A[A.Disconnected=1]="Disconnected",A[A.IsChild=2]="IsChild",A[A.IsParent=3]="IsParent"})(f=e.TestPosition||(e.TestPosition={}));class _{constructor(k,D=k.length){if(this.path=k,this.viewEnd=D,k.length===0||D<1)throw new Error("cannot create test with empty path")}static fromExtHostTestItem(k,D,I=k.parent){if(k.id===D)return new _([D]);let w=[k.id];for(let v=I;v&&v.id!==D;v=v.parent)w.push(v.id);return w.push(D),new _(w.reverse())}static isRoot(k){return!k.includes("\0")}static root(k){const D=k.indexOf("\0");return D===-1?k:k.slice(0,D)}static fromString(k){return new _(k.split("\0"))}static join(k,D){return new _([...k.path,D])}static joinToString(k,D){return k.toString()+"\0"+D}static compare(k,D){return k===D?0:D.startsWith(k+"\0")?2:k.startsWith(D+"\0")?3:1}get parentId(){return this.viewEnd>1?new _(this.path,this.viewEnd-1):this}get localId(){return this.path[this.viewEnd-1]}get controllerId(){return this.path[0]}get isRoot(){return this.viewEnd===1}*idsFromRoot(){for(let k=1;k<=this.viewEnd;k++)yield new _(this.path,k)}compare(k){if(typeof k=="string")return _.compare(this.toString(),k);for(let D=0;D<k.viewEnd&&D<this.viewEnd;D++)if(k.path[D]!==this.path[D])return 1;return k.viewEnd>this.viewEnd?2:k.viewEnd<this.viewEnd?3:0}toJSON(){return this.toString()}toString(){if(!this.stringifed){this.stringifed=this.path[0];for(let k=1;k<this.viewEnd;k++)this.stringifed+="\0",this.stringifed+=this.path[k]}return this.stringifed}}e.TestId=_}),define(ne[250],re([1,0,30,92,5,363]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.testsInFile=e.getAllTestsInHierarchy=e.expandAndGetTestById=e.getContextForTestItem=e.testCollectionIsEmpty=e.getCollectionItemParents=e.ITestService=void 0,e.ITestService=(0,_.createDecorator)("testService");const k=function*(o,c){let i=c;for(;i;)yield i,i=i.parent?o.getNodeById(i.parent):void 0};e.getCollectionItemParents=k;const D=o=>!f.Iterable.some(o.rootItems,c=>c.children.size>0);e.testCollectionIsEmpty=D;const I=(o,c)=>{if(typeof c=="string"&&(c=A.TestId.fromString(c)),c.isRoot)return{controller:c.toString()};const i={$mid:13,tests:[]};for(const S of c.idsFromRoot())if(!S.isRoot){const s=o.getNodeById(S.toString());s&&i.tests.push(s)}return i};e.getContextForTestItem=I;const w=async(o,c,i=t.CancellationToken.None)=>{const S=[...A.TestId.fromString(c).idsFromRoot()];let s=0;for(let l=S.length-1;!i.isCancellationRequested&&l>=s;){const r=S[l].toString(),p=o.getNodeById(r);if(!p){l--;continue}if(l===S.length-1)return p;p.children.has(S[l+1].toString())||await o.expand(r,0),s=l+1,l=S.length-1}};e.expandAndGetTestById=w;const v=async(o,c=t.CancellationToken.None)=>{if(c.isCancellationRequested)return;let i;await Promise.race([Promise.all([...o.rootItems].map(S=>o.expand(S.item.extId,1/0))),new Promise(S=>{i=c.onCancellationRequested(S)})]).finally(()=>i?.dispose())};e.getAllTestsInHierarchy=v;const C=async function*(o,c,i){for(const S of o.all)!S.item.uri||(c.extUri.isEqual(i,S.item.uri)&&(yield S),c.extUri.isEqualOrParent(i,S.item.uri)&&S.expand===1&&await o.expand(S.item.extId,1))};e.testsInFile=C}),define(ne[270],re([1,0,1799,7]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestingContextKeys=void 0;var _;(function(A){A.providerCount=new f.RawContextKey("testing.providerCount",0),A.canRefreshTests=new f.RawContextKey("testing.canRefresh",!1,{type:"boolean",description:(0,t.localize)(0,null)}),A.isRefreshingTests=new f.RawContextKey("testing.isRefreshing",!1,{type:"boolean",description:(0,t.localize)(1,null)}),A.hasDebuggableTests=new f.RawContextKey("testing.hasDebuggableTests",!1,{type:"boolean",description:(0,t.localize)(2,null)}),A.hasRunnableTests=new f.RawContextKey("testing.hasRunnableTests",!1,{type:"boolean",description:(0,t.localize)(3,null)}),A.hasCoverableTests=new f.RawContextKey("testing.hasCoverableTests",!1,{type:"boolean",description:(0,t.localize)(4,null)}),A.hasNonDefaultProfile=new f.RawContextKey("testing.hasNonDefaultProfile",!1,{type:"boolean",description:(0,t.localize)(5,null)}),A.hasConfigurableProfile=new f.RawContextKey("testing.hasConfigurableProfile",!1,{type:"boolean",description:(0,t.localize)(6,null)}),A.capabilityToContextKey={[2]:A.hasRunnableTests,[8]:A.hasCoverableTests,[4]:A.hasDebuggableTests,[16]:A.hasNonDefaultProfile,[32]:A.hasConfigurableProfile},A.hasAnyResults=new f.RawContextKey("testing.hasAnyResults",!1),A.viewMode=new f.RawContextKey("testing.explorerViewMode","list"),A.viewSorting=new f.RawContextKey("testing.explorerViewSorting","location"),A.isRunning=new f.RawContextKey("testing.isRunning",!1),A.isInPeek=new f.RawContextKey("testing.isInPeek",!0),A.isPeekVisible=new f.RawContextKey("testing.isPeekVisible",!1),A.autoRun=new f.RawContextKey("testing.autoRun",!1),A.peekItemType=new f.RawContextKey("peekItemType",void 0,{type:"string",description:(0,t.localize)(7,null)}),A.controllerId=new f.RawContextKey("controllerId",void 0,{type:"string",description:(0,t.localize)(8,null)}),A.testItemExtId=new f.RawContextKey("testId",void 0,{type:"string",description:(0,t.localize)(9,null)}),A.testItemHasUri=new f.RawContextKey("testing.testItemHasUri",!1,{type:"boolean",description:(0,t.localize)(10,null)}),A.testItemIsHidden=new f.RawContextKey("testing.testItemIsHidden",!1,{type:"boolean",description:(0,t.localize)(11,null)})})(_=e.TestingContextKeys||(e.TestingContextKeys={}))}),define(ne[251],re([1,0,6,13,7,5,24,328,329,363,270]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestProfileService=e.capabilityContextKeys=e.canUseProfileWithTest=e.ITestProfileService=void 0,e.ITestProfileService=(0,A.createDecorator)("testProfileService");const C=(S,s)=>S.controllerId===s.controllerId&&(w.TestId.isRoot(s.item.extId)||!S.tag||s.item.tags.includes(S.tag));e.canUseProfileWithTest=C;const o=(S,s)=>S.isDefault!==s.isDefault?S.isDefault?-1:1:S.label.localeCompare(s.label),c=S=>[[v.TestingContextKeys.hasRunnableTests.key,(S&2)!=0],[v.TestingContextKeys.hasDebuggableTests.key,(S&4)!=0],[v.TestingContextKeys.hasCoverableTests.key,(S&8)!=0]];e.capabilityContextKeys=c;let i=class{constructor(s,l){this.changeEmitter=new t.Emitter,this.controllerProfiles=new Map,this.onDidChange=this.changeEmitter.event,this.preferredDefaults=new D.StoredValue({key:"testingPreferredProfiles",scope:1,target:0},l),this.capabilitiesContexts={[2]:v.TestingContextKeys.hasRunnableTests.bindTo(s),[4]:v.TestingContextKeys.hasDebuggableTests.bindTo(s),[8]:v.TestingContextKeys.hasCoverableTests.bindTo(s),[16]:v.TestingContextKeys.hasNonDefaultProfile.bindTo(s),[32]:v.TestingContextKeys.hasConfigurableProfile.bindTo(s)},this.refreshContextKeys()}addProfile(s,l){let r=this.controllerProfiles.get(l.controllerId);r?(r.profiles.push(l),r.profiles.sort(o)):(r={profiles:[l],controller:s},this.controllerProfiles.set(l.controllerId,r)),this.refreshContextKeys(),this.changeEmitter.fire()}updateProfile(s,l,r){const p=this.controllerProfiles.get(s);if(!p)return;const u=p.profiles.find(a=>a.controllerId===s&&a.profileId===l);!u||(Object.assign(u,r),p.profiles.sort(o),this.changeEmitter.fire())}configure(s,l){this.controllerProfiles.get(s)?.controller.configureRunProfile(l)}removeProfile(s,l){const r=this.controllerProfiles.get(s);if(!r)return;if(!l){this.controllerProfiles.delete(s),this.changeEmitter.fire();return}const p=r.profiles.findIndex(u=>u.profileId===l);p!==-1&&(r.profiles.splice(p,1),this.refreshContextKeys(),this.changeEmitter.fire())}capabilitiesForTest(s){const l=this.controllerProfiles.get(s.controllerId);if(!l)return 0;let r=0;for(const p of l.profiles)(!p.tag||s.item.tags.includes(p.tag))&&(r|=r&p.group?16:p.group);return r}all(){return this.controllerProfiles.values()}getControllerProfiles(s){return this.controllerProfiles.get(s)?.profiles??[]}getGroupDefaultProfiles(s){const l=this.preferredDefaults.get();if(!l)return this.getBaseDefaults(s);const r=l[s]?.map(p=>this.controllerProfiles.get(p.controllerId)?.profiles.find(u=>u.profileId===p.profileId&&u.group===s)).filter(f.isDefined);return r?.length?r:this.getBaseDefaults(s)}setGroupDefaultProfiles(s,l){this.preferredDefaults.store({...this.preferredDefaults.get(),[s]:l.map(r=>({profileId:r.profileId,controllerId:r.controllerId}))}),this.changeEmitter.fire()}getBaseDefaults(s){const l=[];for(const{profiles:r}of this.controllerProfiles.values()){const p=r.find(u=>u.group===s);p&&l.push(p)}return l}refreshContextKeys(){let s=0;for(const{profiles:l}of this.controllerProfiles.values())for(const r of l)s|=s&r.group?16:r.group;for(const l of I.testRunProfileBitsetList)this.capabilitiesContexts[l].set((s&l)!=0)}};i=Ee([W(0,_.IContextKeyService),W(1,k.IStorageService)],i),e.TestProfileService=i}),define(ne[595],re([1,0,251,363,270]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTestItemContextOverlay=void 0;const A=(k,D)=>{if(!k)return[];const I=f.TestId.fromString(k.item.extId);return[[_.TestingContextKeys.testItemExtId.key,I.localId],[_.TestingContextKeys.controllerId.key,k.controllerId],[_.TestingContextKeys.testItemHasUri.key,!!k.item.uri],...(0,t.capabilityContextKeys)(D)]};e.getTestItemContextOverlay=A}),define(ne[2236],re([1,0,15,13,1786,28,53,12,293,594,251]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0});function C(c,{onlyGroup:i,showConfigureButtons:S=!0,onlyForTest:s,onlyConfigurable:l,placeholder:r=(0,_.localize)(0,null)}){const p=c.get(v.ITestProfileService),u=[],a=(h,g)=>{for(const d of(0,t.groupBy)(h,(m,b)=>m.group-b.group)){let m=!1;if(i){if(d[0].group!==i)continue;m=!0}for(const b of d)l&&!b.hasConfigurationHandler||(m||(u.push({type:"separator",label:w.testConfigurationGroupNames[d[0].group]}),m=!0),u.push({type:"item",profile:b,label:b.label,description:g,alwaysShow:!0,buttons:b.hasConfigurationHandler&&S?[{iconClass:D.ThemeIcon.asClassName(I.testingUpdateProfiles),tooltip:(0,_.localize)(1,null)}]:[]}))}};if(s!==void 0)a(p.getControllerProfiles(s.controllerId).filter(h=>(0,v.canUseProfileWithTest)(h,s)));else for(const{profiles:h,controller:g}of p.all())a(h,g.label.value);const n=c.get(k.IQuickInputService).createQuickPick();return n.items=u,n.placeholder=r,n}const o=(c,i)=>S=>{const s=S.item.profile;s&&(c.configure(s.controllerId,s.profileId),i(void 0))};A.CommandsRegistry.registerCommand({id:"vscode.pickMultipleTestProfiles",handler:async(c,i)=>{const S=c.get(v.ITestProfileService),s=C(c,i);if(!s)return;s.canSelectMany=!0,i.selected&&(s.selectedItems=s.items.filter(r=>r.type==="item").filter(r=>i.selected.some(p=>p.controllerId===r.profile.controllerId&&p.profileId===r.profile.profileId)));const l=await new Promise(r=>{s.onDidAccept(()=>{const p=s.selectedItems;r(p.map(u=>u.profile).filter(f.isDefined))}),s.onDidHide(()=>r(void 0)),s.onDidTriggerItemButton(o(S,r)),s.show()});return s.dispose(),l}}),A.CommandsRegistry.registerCommand({id:"vscode.pickTestProfile",handler:async(c,i)=>{const S=c.get(v.ITestProfileService),s=C(c,i);if(!s)return;const l=await new Promise(r=>{s.onDidAccept(()=>r(s.selectedItems[0]?.profile)),s.onDidHide(()=>r(void 0)),s.onDidTriggerItemButton(o(S,r)),s.show()});return s.dispose(),l}})}),define(ne[825],re([1,0,15,5]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITestingDecorationsService=e.TestDecorations=void 0;class _{constructor(){this.value=[]}get(k){if(this._idMap)return this._idMap.get(k);if(this.value.length>16){this._idMap=new Map;for(const D of this.value)this._idMap.set(D.id,D);return this._idMap.get(k)}else return this.value.find(D=>D.id===k)}push(k){const D=(0,t.binarySearch)(this.value,k,(I,w)=>I.line-w.line);this.value.splice(D<0?~D:D,0,k),this._idMap=void 0}findOnLine(k,D){const I=(0,t.binarySearch)(this.value,{line:k},(w,v)=>w.line-v.line);if(!(I<0)){for(let w=I;w<this.value.length&&this.value[w].line===k;w++)if(D(this.value[w]))return this.value[w]}}*lines(){if(!this.value.length)return;let k=0,D=this.value[0].line;for(let I=1;I<this.value.length;I++){const w=this.value[I];w.line!==D&&(yield[D,this.value.slice(k,I)],D=w.line,k=I)}yield[D,this.value.slice(k)]}}e.TestDecorations=_,e.ITestingDecorationsService=(0,f.createDecorator)("testingDecorationService")}),define(ne[497],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITestingPeekOpener=void 0,e.ITestingPeekOpener=(0,t.createDecorator)("testingPeekOpener")}),define(ne[330],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.terminalStatePriorities=e.isRunningState=e.statesInOrder=e.maxPriority=e.cmpPriority=e.stateNodes=e.isStateWithResult=e.isFailedState=e.statePriority=void 0,e.statePriority={[2]:6,[6]:5,[4]:4,[3]:3,[1]:2,[0]:1,[5]:0};const t=D=>D===6||D===4;e.isFailedState=t;const f=D=>D===6||D===4||D===3;e.isStateWithResult=f,e.stateNodes=Object.entries(e.statePriority).reduce((D,[I,w])=>{const v=Number(I);return D[v]={statusNode:!0,state:v,priority:w},D},{});const _=(D,I)=>e.statePriority[I]-e.statePriority[D];e.cmpPriority=_;const A=(...D)=>{switch(D.length){case 0:return 0;case 1:return D[0];case 2:return e.statePriority[D[0]]>e.statePriority[D[1]]?D[0]:D[1];default:{let I=D[0];for(let w=1;w<D.length;w++)e.statePriority[I]<e.statePriority[D[w]]&&(I=D[w]);return I}}};e.maxPriority=A,e.statesInOrder=Object.keys(e.statePriority).map(D=>Number(D)).sort(e.cmpPriority);const k=D=>D===1||D===2;e.isRunningState=k,e.terminalStatePriorities={[3]:0,[5]:1,[4]:2,[6]:3}}),define(ne[826],re([1,0,92,330]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.refreshComputedState=e.getComputedDuration=e.getComputedState=e.isDurationAccessor=void 0;const _=I=>"getOwnDuration"in I;e.isDurationAccessor=_;const A=(I,w,v=!1)=>{let C=I.getCurrentComputedState(w);if(C===void 0||v){C=I.getOwnState(w)??0;for(const o of I.getChildren(w)){const c=(0,e.getComputedState)(I,o);C=c===5&&C===0?5:(0,f.maxPriority)(C,c)}I.setComputedState(w,C)}return C};e.getComputedState=A;const k=(I,w,v=!1)=>{let C=I.getCurrentComputedDuration(w);if(C===void 0||v){const o=I.getOwnDuration(w);if(o!==void 0)C=o;else{C=void 0;for(const c of I.getChildren(w)){const i=(0,e.getComputedDuration)(I,c);i!==void 0&&(C=(C||0)+i)}}I.setComputedDuration(w,C)}return C};e.getComputedDuration=k;const D=(I,w,v,C=!0)=>{const o=I.getCurrentComputedState(w),c=f.statePriority[o],i=v??(0,e.getComputedState)(I,w,!0),S=f.statePriority[i],s=new Set;if(S!==c){if(I.setComputedState(w,i),s.add(w),S>c)for(const l of I.getParents(w)){const r=I.getCurrentComputedState(l);if(r!==void 0&&f.statePriority[r]>=S)break;I.setComputedState(l,i),s.add(l)}else if(S<c)for(const l of I.getParents(w)){const r=I.getCurrentComputedState(l);if(r===void 0||f.statePriority[r]>c)break;I.setComputedState(l,(0,e.getComputedState)(I,l,!0)),s.add(l)}}if((0,e.isDurationAccessor)(I)&&C)for(const l of t.Iterable.concat(t.Iterable.single(w),I.getParents(w))){const r=I.getCurrentComputedDuration(l),p=(0,e.getComputedDuration)(I,l,!0);if(r===p)break;I.setComputedDuration(l,p),s.add(l)}return s};e.refreshComputedState=D}),define(ne[419],re([1,0,60,6,278,2,9,20,1797,826,362,329,330]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HydratedTestResult=e.LiveTestResult=e.TestResultItemChangeReason=e.LiveOutputController=e.maxCountPriority=e.sumCounts=e.makeEmptyCounts=e.resultItemParents=void 0;const c=function*(n,h){let g=h;for(;g;)yield g,g=g.parent?n.getStateById(g.parent):void 0};e.resultItemParents=c;const i=()=>{const n={};for(const h of o.statesInOrder)n[h]=0;return n};e.makeEmptyCounts=i;const S=n=>{const h=(0,e.makeEmptyCounts)();for(const g of n)for(const d of o.statesInOrder)h[d]+=g[d];return h};e.sumCounts=S;const s=n=>{for(const h of o.statesInOrder)if(n[h]>0)return h;return 0};e.maxCountPriority=s;class l{constructor(h,g){this.writer=h,this.reader=g,this.previouslyWritten=[],this.dataEmitter=new f.Emitter,this.endEmitter=new f.Emitter,this._offset=0}get offset(){return this._offset}append(h){return this.closed?this.closed:(this.previouslyWritten?.push(h),this.dataEmitter.fire(h),this._offset+=h.byteLength,this.writer.getValue()[0].write(h))}read(){if(!this.previouslyWritten)return this.reader();const h=(0,t.newWriteableBufferStream)();for(const d of this.previouslyWritten)h.write(d);const g=new A.DisposableStore;return g.add(this.dataEmitter.event(d=>h.write(d))),g.add(this.endEmitter.event(()=>h.end())),h.on("end",()=>g.dispose()),Promise.resolve(h)}close(){if(this.closed)return this.closed;if(!this.writer.hasValue())this.closed=Promise.resolve();else{const[h,g]=this.writer.getValue();h.end(),this.closed=g}return this.endEmitter.fire(),this.closed.then(()=>{this.previouslyWritten=void 0,this.dataEmitter.dispose(),this.endEmitter.dispose()}),this.closed}}e.LiveOutputController=l;const r=(n,h,g)=>({parent:g,controllerId:n,expand:0,item:{...h},children:[],tasks:[],ownComputedState:0,computedState:0,retired:!1});var p;(function(n){n[n.Retired=0]="Retired",n[n.ParentRetired=1]="ParentRetired",n[n.ComputedStateChange=2]="ComputedStateChange",n[n.OwnStateChange=3]="OwnStateChange"})(p=e.TestResultItemChangeReason||(e.TestResultItemChangeReason={}));class u{constructor(h,g,d,m){this.id=h,this.output=g,this.persist=d,this.request=m,this.completeEmitter=new f.Emitter,this.changeEmitter=new f.Emitter,this.testById=new Map,this.onChange=this.changeEmitter.event,this.onComplete=this.completeEmitter.event,this.tasks=[],this.name=(0,I.localize)(0,null,new Date().toLocaleString()),this.counts=(0,e.makeEmptyCounts)(),this.computedStateAccessor={getOwnState:b=>b.ownComputedState,getCurrentComputedState:b=>b.computedState,setComputedState:(b,E)=>b.computedState=E,getChildren:b=>b.children,getParents:b=>{const{testById:E}=this;return function*(){for(let y=b.parent;y;){const T=E.get(y);if(!T)break;yield T,y=T.parent}}()}},this.doSerialize=new _.Lazy(()=>({id:this.id,completedAt:this.completedAt,tasks:this.tasks.map(b=>({id:b.id,name:b.name,messages:b.otherMessages})),name:this.name,request:this.request,items:[...this.testById.values()].map(b=>C.TestResultItem.serialize(b,[...b.children.map(E=>E.item.extId)]))}))}get completedAt(){return this._completedAt}get tests(){return this.testById.values()}getStateById(h){return this.testById.get(h)}appendOutput(h,g,d,m){this.output.append(h);const b={location:d,message:h.toString(),offset:this.output.offset,type:1},E=this.mustGetTaskIndex(g);m?this.testById.get(m)?.tasks[E].messages.push(b):this.tasks[E].otherMessages.push(b)}addTask(h){const g=this.tasks.length;this.tasks.push({...h,coverage:new v.MutableObservableValue(void 0),otherMessages:[]});for(const d of this.tests)d.tasks.push({duration:void 0,messages:[],state:0}),this.fireUpdateAndRefresh(d,g,1)}addTestChainToRun(h,g){let d=this.testById.get(g[0].extId);d||(d=this.addTestToRun(h,g[0],null));for(let m=1;m<g.length;m++)d=this.addTestToRun(h,g[m],d.item.extId);for(let m=0;m<this.tasks.length;m++)this.fireUpdateAndRefresh(d,m,1)}updateState(h,g,d,m){const b=this.testById.get(h);if(!b)return;const E=this.mustGetTaskIndex(g),y=o.terminalStatePriorities[b.tasks[E].state],T=o.terminalStatePriorities[d];y!==void 0&&(T===void 0||T<y)||this.fireUpdateAndRefresh(b,E,d,m)}appendMessage(h,g,d){const m=this.testById.get(h);!m||(m.tasks[this.mustGetTaskIndex(g)].messages.push(d),this.changeEmitter.fire({item:m,result:this,reason:3,previousState:m.ownComputedState,previousOwnDuration:m.ownDuration}))}getOutput(){return this.output.read()}retire(h){const g=this.testById.get(h);if(!g||g.retired)return;const d=[[g]];for(;d.length;)for(const m of d.pop())m.retired||(m.retired=!0,d.push(m.children),this.changeEmitter.fire({result:this,item:m,reason:m===g?0:1}))}markTaskComplete(h){this.tasks[this.mustGetTaskIndex(h)].running=!1,this.setAllToState(0,h,g=>g.state===1||g.state===2)}markComplete(){if(this._completedAt!==void 0)throw new Error("cannot complete a test result multiple times");for(const h of this.tasks)h.running&&this.markTaskComplete(h.id);this._completedAt=Date.now(),this.completeEmitter.fire()}toJSON(){return this.completedAt&&this.persist?this.doSerialize.getValue():void 0}setAllToState(h,g,d){const m=this.mustGetTaskIndex(g);for(const b of this.testById.values())d(b.tasks[m],b)&&this.fireUpdateAndRefresh(b,m,h)}fireUpdateAndRefresh(h,g,d,m){const b=h.ownComputedState,E=h.ownDuration,y={item:h,result:this,reason:3,previousState:b,previousOwnDuration:E};h.tasks[g].state=d,m!==void 0&&(h.tasks[g].duration=m,h.ownDuration=Math.max(h.ownDuration||0,m));const T=(0,o.maxPriority)(...h.tasks.map(R=>R.state));if(T===b){m!==E&&this.changeEmitter.fire(y);return}h.ownComputedState=T,this.counts[b]--,this.counts[T]++,(0,w.refreshComputedState)(this.computedStateAccessor,h).forEach(R=>this.changeEmitter.fire(R===h?y:{item:R,result:this,reason:2}))}addTestToRun(h,g,d){const m=r(h,g,d);if(this.testById.set(g.extId,m),this.counts[0]++,d&&this.testById.get(d)?.children.push(m),this.tasks.length)for(let b=0;b<this.tasks.length;b++)m.tasks.push({duration:void 0,messages:[],state:1});return m}mustGetTaskIndex(h){const g=this.tasks.findIndex(d=>d.id===h);if(g===-1)throw new Error(`Unknown task ${h} in updateState`);return g}}e.LiveTestResult=u;class a{constructor(h,g,d=!0){this.serialized=h,this.outputLoader=g,this.persist=d,this.counts=(0,e.makeEmptyCounts)(),this.testById=new Map,this.id=h.id,this.completedAt=h.completedAt,this.tasks=h.tasks.map((m,b)=>({id:m.id,name:m.name,running:!1,coverage:(0,v.staticObservableValue)(void 0),otherMessages:m.messages.map(E=>({message:E.message,type:E.type,offset:E.offset,location:E.location&&{uri:k.URI.revive(E.location.uri),range:D.Range.lift(E.location.range)}}))})),this.name=h.name,this.request=h.request;for(const m of h.items){const b={...m,retired:!0};b.item.uri=k.URI.revive(b.item.uri);for(const E of b.tasks)for(const y of E.messages)y.location&&(y.location.uri=k.URI.revive(y.location.uri),y.location.range=D.Range.lift(y.location.range));this.counts[m.ownComputedState]++,this.testById.set(m.item.extId,b)}}get tests(){return this.testById.values()}getStateById(h){return this.testById.get(h)}getOutput(){return this.outputLoader()}toJSON(){return this.persist?this.serialized:void 0}}e.HydratedTestResult=a}),define(ne[827],re([1,0,60,278,13,9,85,23,5,31,24,34,328,419]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestResultStorage=e.InMemoryResultStorage=e.BaseTestResultStorage=e.ITestResultStorage=e.RETAIN_MAX_RESULTS=void 0,e.RETAIN_MAX_RESULTS=128;const i=16,S=1024*128,s=.2;e.ITestResultStorage=(0,I.createDecorator)("ITestResultStorage");const l=1;let r=class{constructor(n,h){this.storageService=n,this.logService=h,this.stored=new o.StoredValue({key:"storedTestResults",scope:1,target:1},this.storageService)}async read(){return(await Promise.all(this.stored.get([]).map(async({id:h,rev:g})=>{if(g===l)try{const d=await this.readForResultId(h);return d?new c.HydratedTestResult(d,()=>this.readOutputForResultId(h)):void 0}catch(d){this.logService.warn(`Error deserializing stored test result ${h}`,d);return}}))).filter(_.isDefined)}getOutputController(n){return new c.LiveOutputController(new f.Lazy(()=>{const h=(0,t.newWriteableBufferStream)(),g=this.storeOutputForResultId(n,h);return[h,g]}),()=>this.readOutputForResultId(n))}getResultOutputWriter(n){const h=(0,t.newWriteableBufferStream)();return this.storeOutputForResultId(n,h),h}async persist(n){const h=new Map(this.stored.get([]).map(({id:b,bytes:E})=>[b,E])),g=[],d=[];let m=S;for(let b=0;b<n.length&&b<e.RETAIN_MAX_RESULTS&&(m>0||g.length<i);b++){const E=n[b],y=h.get(E.id);if(y!==void 0){h.delete(E.id),g.push({id:E.id,rev:l,bytes:y}),m-=y;continue}const T=E.toJSON();if(!T)continue;const R=t.VSBuffer.fromString(JSON.stringify(T));d.push(this.storeForResultId(E.id,T)),g.push({id:E.id,rev:l,bytes:R.byteLength}),m-=R.byteLength,E instanceof c.LiveTestResult&&E.completedAt!==void 0&&d.push(E.output.close())}for(const b of h.keys())d.push(this.deleteForResultId(b).catch(()=>{}));this.stored.store(g),await Promise.all(d)}};r=Ee([W(0,v.IStorageService),W(1,w.ILogService)],r),e.BaseTestResultStorage=r;class p extends r{constructor(){super(...arguments);this.cache=new Map}async readForResultId(n){return Promise.resolve(this.cache.get(n))}storeForResultId(n,h){return this.cache.set(n,h),Promise.resolve()}deleteForResultId(n){return this.cache.delete(n),Promise.resolve()}readOutputForResultId(n){throw new Error("Method not implemented.")}storeOutputForResultId(n,h){throw new Error("Method not implemented.")}}e.InMemoryResultStorage=p;let u=class extends r{constructor(n,h,g,d,m){super(n,h);this.fileService=d,this.directory=A.URI.joinPath(m.workspaceStorageHome,g.getWorkspace().id,"testResults")}async readForResultId(n){const h=await this.fileService.readFile(this.getResultJsonPath(n));return JSON.parse(h.value.toString())}storeForResultId(n,h){return this.fileService.writeFile(this.getResultJsonPath(n),t.VSBuffer.fromString(JSON.stringify(h)))}deleteForResultId(n){return this.fileService.del(this.getResultJsonPath(n)).catch(()=>{})}async readOutputForResultId(n){try{const{value:h}=await this.fileService.readFileStream(this.getResultOutputPath(n));return h}catch{return(0,t.bufferToStream)(t.VSBuffer.alloc(0))}}async storeOutputForResultId(n,h){await this.fileService.createFile(this.getResultOutputPath(n),h)}async persist(n){await super.persist(n),Math.random()<s&&await this.cleanupDereferenced()}async cleanupDereferenced(){const{children:n}=await this.fileService.resolve(this.directory);if(!n)return;const h=new Set(this.stored.get([]).filter(g=>g.rev===l).map(g=>g.id));await Promise.all(n.filter(g=>!h.has(g.name.replace(/\.[a-z]+$/,""))).map(g=>this.fileService.del(g.resource).catch(()=>{})))}getResultJsonPath(n){return A.URI.joinPath(this.directory,`${n}.json`)}getResultOutputPath(n){return A.URI.joinPath(this.directory,`${n}.output`)}};u=Ee([W(0,v.IStorageService),W(1,w.ILogService),W(2,C.IWorkspaceContextService),W(3,D.IFileService),W(4,k.IEnvironmentService)],u),e.TestResultStorage=u}),define(ne[216],re([1,0,15,11,6,150,92,89,7,5,270,251,419,827]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestResultService=e.ITestResultService=e.isRunningTests=e.allChangedResults=void 0;const i=l=>"completed"in l?k.Iterable.single(l.completed):"started"in l?k.Iterable.single(l.started):"inserted"in l?k.Iterable.single(l.inserted):l.removed;e.allChangedResults=i;const S=l=>l.results.length>0&&l.results[0].completedAt===void 0;e.isRunningTests=S,e.ITestResultService=(0,w.createDecorator)("testResultService");let s=class{constructor(r,p,u){this.storage=p,this.testProfiles=u,this.changeResultEmitter=new _.Emitter,this._results=[],this.testChangeEmitter=new _.Emitter,this.onResultsChanged=this.changeResultEmitter.event,this.onTestChanged=this.testChangeEmitter.event,this.loadResults=(0,A.once)(()=>this.storage.read().then(a=>{for(let n=a.length-1;n>=0;n--)this.push(a[n])})),this.persistScheduler=new f.RunOnceScheduler(()=>this.persistImmediately(),500),this.isRunning=v.TestingContextKeys.isRunning.bindTo(r),this.hasAnyResults=v.TestingContextKeys.hasAnyResults.bindTo(r)}get results(){return this.loadResults(),this._results}getStateById(r){for(const p of this.results){const u=p.getStateById(r);if(u&&u.computedState!==0)return[p,u]}}createLiveResult(r){if("targets"in r){const a=(0,D.generateUuid)();return this.push(new o.LiveTestResult(a,this.storage.getOutputController(a),!0,r))}let p;r.profile&&(p=this.testProfiles.getControllerProfiles(r.controllerId).find(n=>n.profileId===r.profile.id));const u={isUiTriggered:!1,targets:[],exclude:r.exclude,isAutoRun:!1};return p&&u.targets.push({profileGroup:p.group,profileId:p.profileId,controllerId:r.controllerId,testIds:r.include}),this.push(new o.LiveTestResult(r.id,this.storage.getOutputController(r.id),r.persist,u))}push(r){if(r.completedAt===void 0)this.results.unshift(r);else{const p=(0,t.findFirstInSorted)(this.results,u=>u.completedAt!==void 0&&u.completedAt<=r.completedAt);this.results.splice(p,0,r),this.persistScheduler.schedule()}if(this.hasAnyResults.set(!0),this.results.length>c.RETAIN_MAX_RESULTS&&this.results.pop(),r instanceof o.LiveTestResult)r.onComplete(()=>this.onComplete(r)),r.onChange(this.testChangeEmitter.fire,this.testChangeEmitter),this.isRunning.set(!0),this.changeResultEmitter.fire({started:r});else{this.changeResultEmitter.fire({inserted:r});for(const p of r.tests)for(const u of this.results)if(u===r){this.testChangeEmitter.fire({item:p,result:r,reason:2});break}else if(u.getStateById(p.item.extId)!==void 0)break}return r}getResult(r){return this.results.find(p=>p.id===r)}clear(){const r=[],p=[];for(const u of this.results)u.completedAt!==void 0?p.push(u):r.push(u);this._results=r,this.persistScheduler.schedule(),r.length===0&&this.hasAnyResults.set(!1),this.changeResultEmitter.fire({removed:p})}onComplete(r){this.resort(),this.updateIsRunning(),this.persistScheduler.schedule(),this.changeResultEmitter.fire({completed:r})}resort(){this.results.sort((r,p)=>(p.completedAt??Number.MAX_SAFE_INTEGER)-(r.completedAt??Number.MAX_SAFE_INTEGER))}updateIsRunning(){this.isRunning.set((0,e.isRunningTests)(this))}async persistImmediately(){await this.loadResults(),this.storage.persist(this.results)}};s=Ee([W(0,I.IContextKeyService),W(1,c.ITestResultStorage),W(2,C.ITestProfileService)],s),e.TestResultService=s}),define(ne[828],re([1,0,6,92,2,13,824,495,2232,826,216,250]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HierarchicalByLocationProjection=void 0;const o={getOwnState:i=>i instanceof D.TestItemTreeElement?i.ownState:0,getCurrentComputedState:i=>i.state,setComputedState:(i,S)=>i.state=S,getCurrentComputedDuration:i=>i.duration,getOwnDuration:i=>i instanceof D.TestItemTreeElement?i.ownDuration:void 0,setComputedDuration:(i,S)=>i.duration=S,getChildren:i=>f.Iterable.filter(i.children.values(),S=>S instanceof D.TestItemTreeElement),*getParents(i){for(let S=i.parent;S;S=S.parent)yield S}};let c=class extends _.Disposable{constructor(S,s,l){super();this.lastState=S,this.testService=s,this.results=l,this.updateEmitter=new t.Emitter,this.changes=new I.NodeChangeList,this.items=new Map,this.onUpdate=this.updateEmitter.event,this.addUpdated=r=>{const p=r;this.changes.updated(p)},this.renderNode=(r,p)=>{if(r instanceof D.TestTreeErrorMessage)return{element:r};if(r.depth===0){if(!(0,I.peersHaveChildren)(r,()=>this.roots))return 1;if(r.children.size===0)return 0}return{element:r,collapsible:r.test.expand!==0,collapsed:this.lastState.expanded[r.test.item.extId]!==void 0?!this.lastState.expanded[r.test.item.extId]:r.depth>0,children:p(r.children)}},this._register(s.onDidProcessDiff(r=>this.applyDiff(r))),this._register(l.onResultsChanged(r=>{if("removed"in r){for(const p of[...this.items.values()].sort((u,a)=>a.depth-u.depth)){const u=this.results.getStateById(p.test.item.extId)?.[1];p.ownDuration=u?.ownDuration,(0,w.refreshComputedState)(o,p,u?.ownComputedState??0).forEach(this.addUpdated)}this.updateEmitter.fire()}})),this._register(l.onTestChanged(r=>{let p=r.item;if(p.ownComputedState===0){const h=l.getStateById(p.item.extId);h&&(p=h[1])}const u=this.items.get(p.item.extId);if(!u)return;const a=r.reason===3&&r.previousOwnDuration!==p.ownDuration,n=u.children.size?void 0:p.computedState;u.retired=p.retired,u.ownState=p.ownComputedState,u.ownDuration=p.ownDuration,(0,w.refreshComputedState)(o,u,n,a).forEach(this.addUpdated),this.addUpdated(u),this.updateEmitter.fire()}));for(const r of s.collection.all)this.storeItem(this.createItem(r))}get roots(){const S=f.Iterable.map(this.testService.collection.rootItems,s=>this.items.get(s.item.extId));return f.Iterable.filter(S,A.isDefined)}getRevealDepth(S){return S.depth===0?0:void 0}getElementByTestId(S){return this.items.get(S)}applyDiff(S){for(const s of S)switch(s.op){case 0:{const l=this.createItem(s.item);this.storeItem(l);break}case 1:{const l=s.item,r=this.items.get(l.extId);if(!r)break;const p=r.test.expand===0&&l.expand;r.update(l),p?this.changes.addedOrRemoved(r):this.changes.updated(r);break}case 2:{const l=this.items.get(s.itemId);if(!l)break;this.changes.addedOrRemoved(l);const r=[[l]];for(;r.length;)for(const p of r.pop())p instanceof k.ByLocationTestItemElement&&r.push(this.unstoreItem(this.items,p))}}S.length!==0&&this.updateEmitter.fire()}applyTo(S){this.changes.applyTo(S,this.renderNode,()=>this.roots)}expandElement(S,s){S instanceof k.ByLocationTestItemElement&&S.test.expand!==0&&this.testService.collection.expand(S.test.item.extId,s)}createItem(S){const s=S.parent?this.items.get(S.parent):null;return new k.ByLocationTestItemElement(S,s,l=>this.changes.addedOrRemoved(l))}unstoreItem(S,s){const l=s.parent;return l?.children.delete(s),S.delete(s.test.item.extId),l instanceof k.ByLocationTestItemElement&&(0,w.refreshComputedState)(o,l,void 0,!!s.duration).forEach(this.addUpdated),s.children}storeItem(S){S.parent?.children.add(S),this.items.set(S.test.item.extId,S),this.changes.addedOrRemoved(S);const s=this.getRevealDepth(S);(s!==void 0||this.lastState.expanded[S.test.item.extId])&&this.expandElement(S,s||0);const l=this.results.getStateById(S.test.item.extId)?.[1];l&&(S.retired=l.retired,S.ownState=l.computedState,S.ownDuration=l.ownDuration,(0,w.refreshComputedState)(o,S,void 0,!!S.ownDuration).forEach(this.addUpdated))}};c=Ee([W(1,C.ITestService),W(2,v.ITestResultService)],c),e.HierarchicalByLocationProjection=c}),define(ne[2237],re([1,0,823,828,824,216,250]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HierarchicalByNameProjection=e.ByNameTestItemElement=e.ListElementType=void 0;var D;(function(v){v[v.Leaf=0]="Leaf",v[v.Branch=1]="Branch"})(D=e.ListElementType||(e.ListElementType={}));class I extends _.ByLocationTestItemElement{constructor(C,o,c,i){super(C,o,c);this.actualParent=i,this.elementType=0,this.isTestRoot=!this.actualParent,this.actualChildren=new Set,i?.addChild(this)}get description(){let C=null;for(let o=this.actualParent;o&&!o.isTestRoot;o=o.actualParent)C=C?o.label+t.flatTestItemDelimiter+C:o.label;return C}remove(){this.actualParent?.removeChild(this)}removeChild(C){this.actualChildren.delete(C)}addChild(C){this.actualChildren.add(C)}}e.ByNameTestItemElement=I;let w=class extends f.HierarchicalByLocationProjection{constructor(C,o,c){super(C,o,c);const i=this.renderNode.bind(this);this.renderNode=(S,s)=>{if(S instanceof I&&S.elementType!==0&&!S.isTestRoot)return 1;const l=i(S,s);return typeof l!="number"&&(l.collapsible=!1),l}}createItem(C){const o=C.parent?this.items.get(C.parent):void 0;return o?(o.elementType===0&&(o.elementType=1,this.changes.addedOrRemoved(o)),new I(C,o.parent||o,c=>this.changes.addedOrRemoved(c),o)):new I(C,null,c=>this.changes.addedOrRemoved(c))}unstoreItem(C,o){const c=super.unstoreItem(C,o);return o instanceof I?(o.actualParent&&o.actualParent.actualChildren.size===1&&(o.actualParent.elementType=0,this.changes.addedOrRemoved(o.actualParent)),o.remove(),o.actualChildren):c}getRevealDepth(C){return C.depth===0?1/0:void 0}};w=Ee([W(1,k.ITestService),W(2,A.ITestResultService)],w),e.HierarchicalByNameProjection=w}),define(ne[596],re([1,0,11,6,2,206,13,1791,5,188,43,105,120,293,216]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestingOutputTerminalService=e.ITestingOutputTerminalService=void 0;const S=u=>{const a=new Date(u);return a.getHours()+":"+String(a.getMinutes()).padStart(2,"0")+":"+String(a.getSeconds()).padStart(2,"0")},s=u=>u?(0,D.localize)(0,null,S(u.completedAt??Date.now())):l,l=(0,D.localize)(1,null);e.ITestingOutputTerminalService=(0,I.createDecorator)("ITestingOutputTerminalService");let r=class{constructor(a,n,h,g,d){this.terminalService=a,this.terminalGroupService=n,this.terminalEditorService=h,this.viewsService=d,this.outputTerminals=new WeakMap,g.onResultsChanged(m=>{const b=this.terminalService.activeInstance;if(!("started"in m)||!b||!this.viewsService.getActiveViewWithId(o.TERMINAL_VIEW_ID))return;const y=this.outputTerminals.get(b);y&&y.ended&&this.showResultsInTerminal(b,y,m.started)})}async open(a){const n=this.terminalService.instances.map(m=>{const b=this.outputTerminals.get(m);return b?[m,b]:void 0}).filter(k.isDefined),h=n.find(([,m])=>m.resultId===a?.id);if(h){this.terminalService.setActiveInstance(h[0]),h[0].target===w.TerminalLocation.Editor?this.terminalEditorService.revealActiveEditor():this.terminalGroupService.showPanel();return}const g=n.find(([,m])=>m.ended);if(g){g[1].clear(),this.showResultsInTerminal(g[0],g[1],a);return}const d=new p;this.showResultsInTerminal(await this.terminalService.createTerminal({config:{isFeatureTerminal:!0,icon:c.testingViewIcon,customPtyImplementation:()=>d,name:s(a)}}),d,a)}async showResultsInTerminal(a,n,h){if(this.outputTerminals.set(a,n),n.resetFor(h?.id,s(h)),this.terminalService.setActiveInstance(a),a.target===w.TerminalLocation.Editor?this.terminalEditorService.revealActiveEditor():this.terminalGroupService.showPanel(),!h){n.ended=!0,setTimeout(()=>n.pushData((0,D.localize)(2,null)));return}const[g]=await Promise.all([h.getOutput(),n.started]);let d=!1;(0,A.listenStream)(g,{onData:m=>{d=!0,n.pushData(m.toString())},onError:m=>n.pushData(`\r \r ${m.stack||m.message}`),onEnd:()=>{d||n.pushData(`[2m${(0,D.localize)(3,null)}[0m`);const m=h.completedAt?new Date(h.completedAt):new Date,b=(0,D.localize)(4,null,m.toLocaleString());n.pushData(`\r \r [1m> ${b} <[0m\r \r `),n.ended=!0}})}};r=Ee([W(0,C.ITerminalService),W(1,C.ITerminalGroupService),W(2,C.ITerminalEditorService),W(3,i.ITestResultService),W(4,v.IViewsService)],r),e.TestingOutputTerminalService=r;class p extends _.Disposable{constructor(){super(...arguments);this.onDidChangeProperty=f.Event.None,this.processDataEmitter=this._register(new f.Emitter),this.titleEmitter=this._register(new f.Emitter),this.startedDeferred=new t.DeferredPromise,this.ended=!0,this.started=this.startedDeferred.p,this.id=0,this.shouldPersist=!1,this.onProcessData=this.processDataEmitter.event,this.onProcessExit=this._register(new f.Emitter).event,this._onProcessReady=this._register(new f.Emitter),this.onProcessReady=this._onProcessReady.event,this.onProcessTitleChanged=this.titleEmitter.event,this.onProcessShellTypeChanged=this._register(new f.Emitter).event}pushData(a){this.processDataEmitter.fire(a)}clear(){this.processDataEmitter.fire("c")}resetFor(a,n){this.ended=!1,this.resultId=a,this.titleEmitter.fire(n)}start(){return this.startedDeferred.complete(),this._onProcessReady.fire({pid:-1,cwd:""}),Promise.resolve(void 0)}shutdown(){}input(){}processBinary(){return Promise.resolve()}resize(){}acknowledgeDataEvent(){}setUnicodeVersion(){return Promise.resolve()}getInitialCwd(){return Promise.resolve("")}getCwd(){return Promise.resolve("")}getLatency(){return Promise.resolve(0)}refreshProperty(a){throw new Error(`refreshProperty is not suppported in TestOutputProcesses. property: ${a}`)}updateProperty(a,n){throw new Error(`updateProperty is not suppported in TestOutputProcesses. property: ${a}, value: ${n}`)}}}),define(ne[829],re([1,0,11,30,92,2,8,7,5,327,270,216,250]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestingAutoRun=e.ITestingAutoRun=void 0,e.ITestingAutoRun=(0,I.createDecorator)("testingAutoRun");let c=class extends A.Disposable{constructor(S,s,l,r){super();this.testService=s,this.results=l,this.configuration=r,this.runner=this._register(new A.MutableDisposable),this.enabled=v.TestingContextKeys.autoRun.bindTo(S),this._register(r.onDidChangeConfiguration(p=>{p.affectsConfiguration("testing.autoRun.mode")&&this.enabled.get()&&(this.runner.value=this.makeRunner())}))}toggle(){const S=this.enabled.get();S?this.runner.value=void 0:this.runner.value=this.makeRunner(),this.enabled.set(!S)}makeRunner(){const S=new Map,s=new A.DisposableStore,l=new f.CancellationTokenSource;s.add((0,A.toDisposable)(()=>l.dispose(!0)));let r=(0,w.getTestingConfiguration)(this.configuration,"testing.autoRun.delay");s.add(this.configuration.onDidChangeConfiguration(()=>{r=(0,w.getTestingConfiguration)(this.configuration,"testing.autoRun.delay")}));const p=s.add(new t.RunOnceScheduler(async()=>{if(S.size===0)return;const n=[...S.values()];S.clear(),await this.testService.runTests({group:2,tests:n,isAutoRun:!0}),S.size>0&&p.schedule(r)},r)),u=n=>{S.set(n.item.extId,n),(0,C.isRunningTests)(this.results)||p.schedule(r)},a=n=>{S.delete(n.item.extId),S.size===0&&p.cancel()};if(s.add(this.results.onTestChanged(n=>{n.reason===0?u(n.item):(n.reason===3||n.reason===2)&&a(n.item)})),s.add(this.results.onResultsChanged(n=>{"completed"in n&&!(0,C.isRunningTests)(this.results)&&S.size&&p.schedule(0)})),(0,w.getTestingConfiguration)(this.configuration,"testing.autoRun.mode")==="all"){s.add(this.testService.onDidProcessDiff(n=>{for(const h of n)if(h.op===0){const g=h.item,d=_.Iterable.some((0,o.getCollectionItemParents)(this.testService.collection,g),b=>S.has(g.item.extId)),m=this.results.getStateById(g.item.extId);!d&&(!m||m[1].retired)&&u(g)}}));for(const n of this.testService.collection.rootItems)u(n)}return s}};c=Ee([W(0,D.IContextKeyService),W(1,o.ITestService),W(2,C.ITestResultService),W(3,k.IConfigurationService)],c),e.TestingAutoRun=c}),define(ne[597],re([1,0,9]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.buildTestUri=e.parseTestUri=e.TestUriType=e.TEST_DATA_SCHEME=void 0,e.TEST_DATA_SCHEME="vscode-test-data";var f;(function(D){D[D.ResultMessage=0]="ResultMessage",D[D.ResultActualOutput=1]="ResultActualOutput",D[D.ResultExpectedOutput=2]="ResultExpectedOutput"})(f=e.TestUriType||(e.TestUriType={}));var _;(function(D){D.Results="results",D.Messages="message",D.Text="TestFailureMessage",D.ActualOutput="ActualOutput",D.ExpectedOutput="ExpectedOutput"})(_||(_={}));const A=D=>{const I=D.authority,[w,...v]=D.path.slice(1).split("/");if(v[0]==="message"){const C=Number(v[1]),o=Number(v[2]),c=v[3],i=D.query;if(I==="results")switch(c){case"TestFailureMessage":return{resultId:w,taskIndex:C,testExtId:i,messageIndex:o,type:0};case"ActualOutput":return{resultId:w,taskIndex:C,testExtId:i,messageIndex:o,type:1};case"ExpectedOutput":return{resultId:w,taskIndex:C,testExtId:i,messageIndex:o,type:2}}}};e.parseTestUri=A;const k=D=>{const I={scheme:e.TEST_DATA_SCHEME,authority:"results"},w=(v,...C)=>t.URI.from({...I,query:D.testExtId,path:["",v,"message",...C].join("/")});switch(D.type){case 1:return w(D.resultId,D.taskIndex,D.messageIndex,"ActualOutput");case 2:return w(D.resultId,D.taskIndex,D.messageIndex,"ExpectedOutput");case 0:return w(D.resultId,D.taskIndex,D.messageIndex,"TestFailureMessage");default:throw new Error("Invalid test uri")}};e.buildTestUri=k}),define(ne[2238],re([1,0,10,242,36,15,11,6,117,2,55,29,89,72,164,20,122,52,1787,73,16,28,8,7,37,5,12,56,90,595,293,593,327,594,825,497,330,597,251,419,216,250]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestingDecorations=e.TestingDecorationService=void 0;const U=128;function H(ce,le){const ae=ce.listDiffEditors();for(const ue of ae)if(ue.getOriginalEditor()===le)return!0;return!1}let K=class extends w.Disposable{constructor(le,ae,ue,oe,fe,pe){super();this.configurationService=ae,this.testService=ue,this.results=oe,this.instantiationService=fe,this.modelService=pe,this.generation=0,this.changeEmitter=new D.Emitter,this.decorationCache=new v.ResourceMap,this.invalidatedMessages=new WeakSet,this.onDidChange=this.changeEmitter.event,le.registerDecorationType("test-message-decoration",ie.decorationId,{},void 0),pe.onModelRemoved(be=>this.decorationCache.delete(be.uri));const me=this._register(new k.RunOnceScheduler(()=>this.invalidate(),100));this._register(this.testService.onWillProcessDiff(be=>{for(const Ce of be){let ve;Ce.op===0||Ce.op===1?ve=Ce.item.item?.uri:Ce.op===2&&(ve=this.testService.collection.getNodeById(Ce.itemId)?.item.uri);const he=ve&&this.decorationCache.get(ve);he&&(he.testRangesUpdated=!0)}me.isScheduled()||me.schedule()})),this._register(D.Event.any(this.results.onResultsChanged,this.results.onTestChanged,this.testService.excluded.onTestExclusionsChanged,this.testService.showInlineOutput.onDidChange,D.Event.filter(ae.onDidChangeConfiguration,be=>be.affectsConfiguration("testing.gutterEnabled")))(()=>{me.isScheduled()||me.schedule()}))}invalidateResultMessage(le){this.invalidatedMessages.add(le),this.invalidate()}syncDecorations(le){const ae=this.modelService.getModel(le);if(!ae)return new F.TestDecorations;const ue=this.decorationCache.get(le);return ue&&ue.generation===this.generation&&!ue.testRangesUpdated?ue.value:this.applyDecorations(ae)}getDecoratedRangeForTest(le,ae){const ue=this.modelService.getModel(le);if(!ue)return;const oe=this.syncDecorations(le).value.find(fe=>fe instanceof J&&fe.isForTest(ae));if(!!oe)return ue.getDecorationRange(oe.id)||void 0}invalidate(){this.generation++,this.changeEmitter.fire()}applyDecorations(le){const ae=(0,O.getTestingConfiguration)(this.configurationService,"testing.gutterEnabled"),ue=le.uri.toString(),oe=this.decorationCache.get(le.uri),fe=oe?.testRangesUpdated,pe=oe?.value??new F.TestDecorations,me=new F.TestDecorations;return le.changeDecorations(be=>{const Ce=new F.TestDecorations;for(const ge of this.testService.collection.all){if(!ge.item.range||ge.item.uri?.toString()!==ue)continue;const de=this.results.getStateById(ge.item.extId),Se=ge.item.range.startLineNumber;Ce.push({line:Se,id:"",test:ge,resultItem:de?.[1]})}for(const[ge,de]of Ce.lines()){const Se=de.length>1;let we=pe.findOnLine(ge,ye=>Se?ye instanceof ee:ye instanceof te);we&&fe&&le.getDecorationRange(we.id)?.startLineNumber!==ge&&(we=void 0),we?(we.replaceOptions(de,ae)&&be.changeDecorationOptions(we.id,we.editorDecoration.options),me.push(we)):me.push(Se?this.instantiationService.createInstance(ee,de,ae,le):this.instantiationService.createInstance(te,de[0].test,de[0].resultItem,le,ae))}const ve=this.results.results[0];if(this.testService.showInlineOutput.value&&ve instanceof P.LiveTestResult){for(const de of ve.tasks)for(const Se of de.otherMessages)if(!this.invalidatedMessages.has(Se)&&Se.location?.uri.toString()===ue){const we=pe.findOnLine(Se.location.range.startLineNumber,ye=>ye instanceof ie&&ye.testMessage===Se)||this.instantiationService.createInstance(ie,Se,void 0,le);me.push(we)}const ge=new Set;for(const de of ve.tests)for(let Se=0;Se<de.tasks.length;Se++){const we=de.tasks[Se];for(let ye=0;ye<we.messages.length;ye++){const ke=we.messages[ye];if(this.invalidatedMessages.has(ke)||ke.location?.uri.toString()!==ue)continue;const Ie=ke.location.range.startLineNumber;if(ge.has(Ie))continue;ge.add(Ie);const Te=pe.findOnLine(Ie,_e=>_e instanceof ie&&_e.testMessage===ke);if(Te){me.push(Te);continue}const De=(0,N.buildTestUri)({type:1,messageIndex:ye,taskIndex:Se,resultId:ve.id,testExtId:de.item.extId});me.push(this.instantiationService.createInstance(ie,ke,De,le))}}}const he=new Set;for(const ge of me.value)ge.id===""?ge.id=be.addDecoration(ge.editorDecoration.range,ge.editorDecoration.options):he.add(ge.id);for(const ge of pe.value)he.has(ge.id)||be.removeDecoration(ge.id);this.decorationCache.set(le.uri,{generation:this.generation,testRangesUpdated:!1,value:me})}),me}};K=Ee([W(0,c.ICodeEditorService),W(1,n.IConfigurationService),W(2,z.ITestService),W(3,V.ITestResultService),W(4,d.IInstantiationService),W(5,l.IModelService)],K),e.TestingDecorationService=K;let G=class extends w.Disposable{constructor(le,ae,ue,oe,fe){super();this.editor=le,this.codeEditorService=ae,this.testService=ue,this.decorations=oe,this.uriIdentityService=fe,this.expectedWidget=new w.MutableDisposable,this.actualWidget=new w.MutableDisposable,ae.registerDecorationType("test-message-decoration",ie.decorationId,{},void 0,le),this.attachModel(le.getModel()?.uri),this._register(oe.onDidChange(()=>{this.currentUri&&oe.syncDecorations(this.currentUri)})),this._register(this.editor.onDidChangeModel(me=>this.attachModel(me.newModelUrl||void 0))),this._register(this.editor.onMouseDown(me=>{if(me.target.position&&this.currentUri){const be=le.getModel()?.getDecorationsInRange(S.Range.fromPositions(me.target.position))??[];for(const{id:Ce}of be)if(oe.syncDecorations(this.currentUri).get(Ce)?.click(me)){me.event.stopPropagation();return}}})),this._register(this.editor.onDidChangeModelContent(me=>{const be=le.getModel();if(!this.currentUri||!be)return;const Ce=oe.syncDecorations(this.currentUri);for(const ve of me.changes){const he=be.getLinesDecorations(ve.range.startLineNumber,ve.range.endLineNumber);for(const{id:ge}of he){const de=Ce.get(ge);de instanceof ie&&oe.invalidateResultMessage(de.testMessage)}}}));const pe=()=>{this.editor.getContainerDomNode().style.setProperty("--testMessageDecorationFontFamily",le.getOption(43)),this.editor.getContainerDomNode().style.setProperty("--testMessageDecorationFontSize",`${le.getOption(46)}px`)};this._register(this.editor.onDidChangeConfiguration(me=>{me.hasChanged(43)&&pe()})),pe()}static get(le){return le.getContribution("editor.contrib.testingDecorations")}attachModel(le){switch(le&&(0,N.parseTestUri)(le)?.type){case 2:this.expectedWidget.value=new Y(this.editor),this.actualWidget.clear();break;case 1:this.expectedWidget.clear(),this.actualWidget.value=new $(this.editor);break;default:this.expectedWidget.clear(),this.actualWidget.clear()}H(this.codeEditorService,this.editor)&&(le=void 0),this.currentUri=le,!!le&&(this.decorations.syncDecorations(le),(async()=>{for await(const ae of(0,z.testsInFile)(this.testService.collection,this.uriIdentityService,le))if(this.currentUri!==le)break})())}};G=Ee([W(1,c.ICodeEditorService),W(2,z.ITestService),W(3,F.ITestingDecorationsService),W(4,b.IUriIdentityService)],G),e.TestingDecorations=G;const q=ce=>({startLineNumber:ce.startLineNumber,endLineNumber:ce.startLineNumber,startColumn:0,endColumn:1}),Z=(ce,le,ae)=>{const ue=ce[0]?.item.range;if(!ue)throw new Error("Test decorations can only be created for tests with a range");if(!ae)return{range:q(ue),options:{isWholeLine:!0,description:"run-test-decoration"}};let oe=0,fe=[],pe,me=!1;for(let ge=0;ge<ce.length;ge++){const de=ce[ge],Se=le[ge],we=Se?.computedState??0;fe.length<10&&fe.push((0,x.labelForTestInState)(de.item.label,we)),oe=(0,M.maxPriority)(oe,we),me=me||!!Se?.retired,!pe&&Se?.tasks.some(ye=>ye.messages.length)&&(pe=de.item.extId)}const be=ce.length>1||ce[0].children.size>0,Ce=oe===0?be?T.testingRunAllIcon:T.testingRunIcon:T.testingStatesToIcons.get(oe);let ve,he=m.ThemeIcon.asClassName(Ce)+" testing-run-glyph";return me&&(he+=" retired"),{range:q(ue),options:{description:"run-test-decoration",isWholeLine:!0,get hoverMessage(){if(!ve){const ge=ve=new I.MarkdownString("",!0).appendText(fe.join(", ")+".");if(pe){const de=encodeURIComponent(JSON.stringify([pe]));ge.appendMarkdown(`[${(0,r.localize)(0,null)}](command:vscode.peekTestError?${de})`)}}return ve},glyphMarginClassName:he,stickiness:1}}};var j;(function(ce){ce.FontFamily="testingDiffLensFontFamily",ce.FontFeatures="testingDiffLensFontFeatures"})(j||(j={}));class X{constructor(le){this.editor=le,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._domNode=t.$("span"),queueMicrotask(()=>{this.applyStyling(),this.editor.addContentWidget(this)})}applyStyling(){let le=this.editor.getOption(16),ae;!le||le<5?(le=this.editor.getOption(46)*.9|0,ae=this.editor.getOption(59)):ae=le*Math.max(1.3,this.editor.getOption(59)/this.editor.getOption(46))|0;const ue=this.editor.getOption(44),oe=this._domNode;oe.classList.add("testing-diff-lens-widget"),oe.textContent=this.getText(),oe.style.lineHeight=`${ae}px`,oe.style.fontSize=`${le}px`,oe.style.fontFamily="var(--testingDiffLensFontFamily)",oe.style.fontFeatureSettings="var(--testingDiffLensFontFeatures)";const fe=this.editor.getContainerDomNode().style;fe.setProperty("testingDiffLensFontFamily",this.editor.getOption(15)??"inherit"),fe.setProperty("testingDiffLensFontFeatures",ue.fontFeatureSettings),this.editor.changeViewZones(pe=>{this.viewZoneId&&pe.removeZone(this.viewZoneId),this.viewZoneId=pe.addZone({afterLineNumber:0,afterColumn:1073741824,domNode:document.createElement("div"),heightInPx:20})})}getDomNode(){return this._domNode}dispose(){this.editor.changeViewZones(le=>{this.viewZoneId&&le.removeZone(this.viewZoneId)}),this.editor.removeContentWidget(this)}getPosition(){return{position:{column:0,lineNumber:0},preference:[1]}}}class Y extends X{getId(){return"expectedTestingLens"}getText(){return(0,r.localize)(1,null)}}class $ extends X{getId(){return"actualTestingLens"}getText(){return(0,r.localize)(2,null)}}let J=class{constructor(le,ae,ue,oe,fe,pe,me,be,Ce,ve,he){this.tests=le,this.visible=ae,this.model=ue,this.codeEditorService=oe,this.testService=fe,this.contextMenuService=pe,this.commandService=me,this.configurationService=be,this.testProfileService=Ce,this.contextKeyService=ve,this.menuService=he,this.id="",this.editorDecoration=Z(le.map(ge=>ge.test),le.map(ge=>ge.resultItem),ae),this.editorDecoration.options.glyphMarginHoverMessage=new I.MarkdownString().appendText(this.getGutterLabel())}get line(){return this.editorDecoration.range.startLineNumber}click(le){if(le.target.type!==2)return!1;if(le.event.rightButton)return this.showContextMenu(le),!0;switch((0,O.getTestingConfiguration)(this.configurationService,"testing.defaultGutterClickAction")){case"contextMenu":this.showContextMenu(le);break;case"debug":this.defaultDebug();break;case"run":default:this.defaultRun();break}return!0}replaceOptions(le,ae){return ae===this.visible&&(0,A.equals)(this.tests.map(ue=>ue.test.item.extId),le.map(ue=>ue.test.item.extId))&&this.tests.map(ue=>ue.resultItem?.computedState)===le.map(ue=>ue.resultItem?.computedState)?!1:(this.tests=le,this.visible=ae,this.editorDecoration.options=Z(le.map(ue=>ue.test),le.map(ue=>ue.resultItem),ae).options,!0)}isForTest(le){return this.tests.some(ae=>ae.test.item.extId===le)}defaultRun(){return this.testService.runTests({tests:this.tests.map(({test:le})=>le),group:2})}defaultDebug(){return this.testService.runTests({tests:this.tests.map(({test:le})=>le),group:4})}showContextMenu(le){let ae=this.getContextMenuActions();const ue=this.codeEditorService.listCodeEditors().find(oe=>oe.getModel()===this.model);if(ue){const oe=ue.getContribution(E.BREAKPOINT_EDITOR_CONTRIBUTION_ID);oe&&(ae={dispose:ae.dispose,object:_.Separator.join(ae.object,oe.getContextMenuActionsAtPosition(this.line,this.model))})}this.contextMenuService.showContextMenu({getAnchor:()=>({x:le.event.posx,y:le.event.posy}),getActions:()=>ae.object,onHide:()=>ae.dispose})}getGutterLabel(){switch((0,O.getTestingConfiguration)(this.configurationService,"testing.defaultGutterClickAction")){case"contextMenu":return(0,r.localize)(3,null);case"debug":return(0,r.localize)(4,null);case"run":default:return(0,r.localize)(5,null)}}getTestContextMenuActions(le,ae){const ue=[],oe=this.testProfileService.capabilitiesForTest(le);oe&2&&ue.push(new _.Action("testing.gutter.run",(0,r.localize)(6,null),void 0,void 0,()=>this.testService.runTests({group:2,tests:[le]}))),oe&4&&ue.push(new _.Action("testing.gutter.debug",(0,r.localize)(7,null),void 0,void 0,()=>this.testService.runTests({group:4,tests:[le]}))),oe&16&&ue.push(new _.Action("testing.runUsing",(0,r.localize)(8,null),void 0,void 0,async()=>{const pe=await this.commandService.executeCommand("vscode.pickTestProfile",{onlyForTest:le});!pe||this.testService.runResolvedTests({targets:[{profileGroup:pe.group,profileId:pe.profileId,controllerId:pe.controllerId,testIds:[le.item.extId]}]})})),ae&&(0,M.isFailedState)(ae.computedState)&&ue.push(new _.Action("testing.gutter.peekFailure",(0,r.localize)(9,null),void 0,void 0,()=>this.commandService.executeCommand("vscode.peekTestError",le.item.extId))),ue.push(new _.Action("testing.gutter.reveal",(0,r.localize)(10,null),void 0,void 0,()=>this.commandService.executeCommand("_revealTestInExplorer",le.item.extId)));const fe=this.getContributedTestActions(le,oe);return{object:_.Separator.join(ue,fe.object),dispose:fe.dispose}}getContributedTestActions(le,ae){const ue=this.contextKeyService.createOverlay((0,y.getTestItemContextOverlay)(le,ae)),oe=this.menuService.createMenu(u.MenuId.TestItemGutter,ue);try{const fe=[],pe=(0,z.getContextForTestItem)(this.testService.collection,le.item.extId),me=(0,p.createAndFillInContextMenuActions)(oe,{shouldForwardArgs:!0,arg:pe},fe);return{object:fe,dispose:()=>me.dispose}}finally{oe.dispose()}}};J=Ee([W(3,c.ICodeEditorService),W(4,z.ITestService),W(5,g.IContextMenuService),W(6,a.ICommandService),W(7,n.IConfigurationService),W(8,B.ITestProfileService),W(9,h.IContextKeyService),W(10,u.IMenuService)],J);class ee extends J{get testIds(){return this.tests.map(le=>le.test.item.extId)}get displayedStates(){return this.tests.map(le=>le.resultItem?.computedState)}getContextMenuActions(){const le=[];this.tests.some(({test:oe})=>this.testProfileService.capabilitiesForTest(oe)&2)&&le.push(new _.Action("testing.gutter.runAll",(0,r.localize)(11,null),void 0,void 0,()=>this.defaultRun())),this.tests.some(({test:oe})=>this.testProfileService.capabilitiesForTest(oe)&4)&&le.push(new _.Action("testing.gutter.debugAll",(0,r.localize)(12,null),void 0,void 0,()=>this.defaultDebug()));const ae=new w.DisposableStore,ue=this.tests.map(({test:oe,resultItem:fe})=>{const pe=this.getTestContextMenuActions(oe,fe);return ae.add(pe),new _.SubmenuAction(oe.item.extId,oe.item.label,pe.object)});return{object:_.Separator.join(le,ue),dispose:()=>ae.dispose()}}}let te=class extends J{constructor(le,ae,ue,oe,fe,pe,me,be,Ce,ve,he,ge){super([{test:le,resultItem:ae}],oe,ue,fe,pe,be,me,Ce,ve,he,ge)}getContextMenuActions(){return this.getTestContextMenuActions(this.tests[0].test,this.tests[0].resultItem)}};te=Ee([W(4,c.ICodeEditorService),W(5,z.ITestService),W(6,a.ICommandService),W(7,g.IContextMenuService),W(8,n.IConfigurationService),W(9,B.ITestProfileService),W(10,h.IContextKeyService),W(11,u.IMenuService)],te);const se=/\r?\n\s*/g;let ie=class Ro{constructor(le,ae,ue,oe,fe){this.testMessage=le,this.messageUri=ae,this.peekOpener=oe,this.id="",this.contentIdClass=`test-message-inline-content-id${(0,o.generateUuid)()}`,this.location=le.location,this.line=this.location.range.startLineNumber;const pe=le.type,me=typeof le.message=="string"?(0,C.removeAnsiEscapeCodes)(le.message):le.message,be=fe.resolveDecorationOptions(Ro.decorationId,!0);be.hoverMessage=typeof me=="string"?new I.MarkdownString().appendText(me):me,be.zIndex=10,be.className=`testing-inline-message-severity-${pe}`,be.isWholeLine=!0,be.stickiness=1,be.collapseOnReplaceEdit=!0;let Ce=(0,f.renderStringAsPlaintext)(me).replace(se," ");Ce.length>U&&(Ce=Ce.slice(0,U-1)+"\u2026"),be.after={content:" ".repeat(4)+Ce,inlineClassName:`test-message-inline-content test-message-inline-content-s${pe} ${this.contentIdClass} ${ae?"test-message-inline-content-clickable":""}`},be.showIfCollapsed=!0;const ve=pe===0?i.overviewRulerError:i.overviewRulerInfo;ve&&(be.overviewRuler={color:(0,m.themeColorFromId)(ve),position:s.OverviewRulerLane.Right});const he=ue.getLineLength(this.location.range.startLineNumber),ge=he?he+1:this.location.range.endColumn;this.editorDecoration={options:be,range:{startLineNumber:this.location.range.startLineNumber,startColumn:ge,endColumn:ge,endLineNumber:this.location.range.startLineNumber}}}click(le){return le.event.rightButton||!this.messageUri||le.target.element?.className.includes(this.contentIdClass)&&this.peekOpener.peekUri(this.messageUri),!1}};ie.inlineClassName="test-message-inline-content",ie.decorationId=`testmessage-${(0,o.generateUuid)()}`,ie=Ee([W(3,L.ITestingPeekOpener),W(4,c.ICodeEditorService)],ie),(0,m.registerThemingParticipant)((ce,le)=>{const ae=ce.getColor(i.editorCodeLensForeground);ae&&le.addRule(`.testing-diff-lens-widget { color: ${ae}; }`);for(const[ue,{decorationForeground:oe}]of Object.entries(R.testMessageSeverityColors))le.addRule(`.test-message-inline-content-s${ue} { color: ${ce.getColor(oe)} !important }`)})}),define(ne[2239],re([1,0,52,42,61,597,216]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestingContentProvider=void 0;let D=class{constructor(w,v,C,o){this.languageService=v,this.modelService=C,this.resultService=o,w.registerTextModelContentProvider(A.TEST_DATA_SCHEME,this)}async provideTextContent(w){const v=this.modelService.getModel(w);if(v&&!v.isDisposed())return v;const C=(0,A.parseTestUri)(w);if(!C)return null;const o=this.resultService.getResult(C.resultId)?.getStateById(C.testExtId);if(!o)return null;let c,i=null;switch(C.type){case 1:{const S=o.tasks[C.taskIndex].messages[C.messageIndex];S?.type===0&&(c=S.actual);break}case 2:{const S=o.tasks[C.taskIndex].messages[C.messageIndex];S?.type===0&&(c=S.expected);break}case 0:{const S=o.tasks[C.taskIndex].messages[C.messageIndex]?.message;typeof S=="string"?c=S:S&&(c=S.value,i=this.languageService.createById("markdown"));break}}return c===void 0?null:this.modelService.createModel(c,i,w,!1)}};D=Ee([W(0,_.ITextModelService),W(1,f.ILanguageService),W(2,t.IModelService),W(3,k.ITestResultService)],D),e.TestingContentProvider=D}),define(ne[420],re([1,0,107,5]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITimelineService=e.TimelinePaneId=e.toKey=void 0;function _(k,D){return`${typeof k=="string"?k:t.ExtensionIdentifier.toKey(k)}|${D}`}e.toKey=_,e.TimelinePaneId="timeline";const A="timeline";e.ITimelineService=(0,f.createDecorator)(A)}),define(ne[2240],re([1,0,6,31,420,43,8,7]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TimelineService=e.TimelineHasProviderContext=void 0,e.TimelineHasProviderContext=new D.RawContextKey("timelineHasProvider",!1);let I=class{constructor(v,C,o,c){this.logService=v,this.viewsService=C,this.configurationService=o,this.contextKeyService=c,this._onDidChangeProviders=new t.Emitter,this.onDidChangeProviders=this._onDidChangeProviders.event,this._onDidChangeTimeline=new t.Emitter,this.onDidChangeTimeline=this._onDidChangeTimeline.event,this._onDidChangeUri=new t.Emitter,this.onDidChangeUri=this._onDidChangeUri.event,this.providers=new Map,this.providerSubscriptions=new Map,this.hasProviderContext=e.TimelineHasProviderContext.bindTo(this.contextKeyService),this.updateHasProviderContext()}getSources(){return[...this.providers.values()].map(v=>({id:v.id,label:v.label}))}getTimeline(v,C,o,c,i){this.logService.trace(`TimelineService#getTimeline(${v}): uri=${C.toString()}`);const S=this.providers.get(v);if(S!==void 0){if(typeof S.scheme=="string"){if(S.scheme!=="*"&&S.scheme!==C.scheme)return}else if(!S.scheme.includes(C.scheme))return;return{result:S.provideTimeline(C,o,c.token,i).then(s=>{if(s!==void 0)return s.items=s.items.map(l=>({...l,source:S.id})),s.items.sort((l,r)=>r.timestamp-l.timestamp||r.source.localeCompare(l.source,void 0,{numeric:!0,sensitivity:"base"})),s}),options:o,source:S.id,tokenSource:c,uri:C}}}registerTimelineProvider(v){this.logService.trace(`TimelineService#registerTimelineProvider: id=${v.id}`);const C=v.id,o=this.providers.get(C);if(o)try{o?.dispose()}catch{}return this.providers.set(C,v),this.updateHasProviderContext(),v.onDidChange&&this.providerSubscriptions.set(C,v.onDidChange(c=>this._onDidChangeTimeline.fire(c))),this._onDidChangeProviders.fire({added:[C]}),{dispose:()=>{this.providers.delete(C),this._onDidChangeProviders.fire({removed:[C]})}}}unregisterTimelineProvider(v){this.logService.trace(`TimelineService#unregisterTimelineProvider: id=${v}`),!!this.providers.has(v)&&(this.providers.delete(v),this.providerSubscriptions.delete(v),this.updateHasProviderContext(),this._onDidChangeProviders.fire({removed:[v]}))}setUri(v){this.viewsService.openView(_.TimelinePaneId,!0),this._onDidChangeUri.fire(v)}updateHasProviderContext(){this.hasProviderContext.set(this.providers.size!==0)}};I=Ee([W(0,f.ILogService),W(1,A.IViewsService),W(2,k.IConfigurationService),W(3,D.IContextKeyService)],I),e.TimelineService=I}),define(ne[598],re([1,0,20,30,457,9,49,15,22,2,28,13,52,61]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchyModel=e.TypeHierarchyProviderRegistry=e.TypeHierarchyDirection=void 0;var i;(function(r){r.Subtypes="subtypes",r.Supertypes="supertypes"})(i=e.TypeHierarchyDirection||(e.TypeHierarchyDirection={})),e.TypeHierarchyProviderRegistry=new _.LanguageFeatureRegistry;class S{constructor(p,u,a,n){this.id=p,this.provider=u,this.roots=a,this.ref=n,this.root=a[0]}static async create(p,u,a){const[n]=e.TypeHierarchyProviderRegistry.ordered(p);if(!n)return;const h=await n.prepareTypeHierarchy(p,u,a);if(!!h)return new S(h.roots.reduce((g,d)=>g+d._sessionId,""),n,h.roots,new w.RefCountedDisposable(h))}dispose(){this.ref.release()}fork(p){const u=this;return new class extends S{constructor(){super(u.id,u.provider,[p],u.ref.acquire())}}}async provideSupertypes(p,u){try{const a=await this.provider.provideSupertypes(p,u);if((0,D.isNonEmptyArray)(a))return a}catch(a){(0,I.onUnexpectedExternalError)(a)}return[]}async provideSubtypes(p,u){try{const a=await this.provider.provideSubtypes(p,u);if((0,D.isNonEmptyArray)(a))return a}catch(a){(0,I.onUnexpectedExternalError)(a)}return[]}}e.TypeHierarchyModel=S;const s=new Map;v.CommandsRegistry.registerCommand("_executePrepareTypeHierarchy",async(r,...p)=>{const[u,a]=p;(0,C.assertType)(A.URI.isUri(u)),(0,C.assertType)(k.Position.isIPosition(a));let h=r.get(o.IModelService).getModel(u),g;if(!h){const m=await r.get(c.ITextModelService).createModelReference(u);h=m.object.textEditorModel,g=m}try{const d=await S.create(h,a,f.CancellationToken.None);return d?(s.set(d.id,d),s.forEach((m,b,E)=>{E.size>10&&(m.dispose(),s.delete(b))}),[d.root]):[]}finally{g?.dispose()}});function l(r){const p=r;return typeof r=="object"&&typeof p.name=="string"&&typeof p.kind=="number"&&A.URI.isUri(p.uri)&&t.Range.isIRange(p.range)&&t.Range.isIRange(p.selectionRange)}v.CommandsRegistry.registerCommand("_executeProvideSupertypes",async(r,...p)=>{const[u]=p;(0,C.assertType)(l(u));const a=s.get(u._sessionId);if(!!a)return a.provideSupertypes(u,f.CancellationToken.None)}),v.CommandsRegistry.registerCommand("_executeProvideSubtypes",async(r,...p)=>{const[u]=p;(0,C.assertType)(l(u));const a=s.get(u._sessionId);if(!!a)return a.provideSubtypes(u,f.CancellationToken.None)})}),define(ne[2241],re([1,0,598,30,102,234,86,29,20,1805,33]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccessibilityProvider=e.VirtualDelegate=e.TypeRenderer=e.IdentityProvider=e.Sorter=e.DataSource=e.Type=void 0;class C{constructor(u,a,n){this.item=u,this.model=a,this.parent=n}static compare(u,a){let n=(0,D.compare)(u.item.uri.toString(),a.item.uri.toString());return n===0&&(n=I.Range.compareRangesUsingStarts(u.item.range,a.item.range)),n}}e.Type=C;class o{constructor(u){this.getDirection=u}hasChildren(){return!0}async getChildren(u){if(u instanceof t.TypeHierarchyModel)return u.roots.map(h=>new C(h,u,void 0));const{model:a,item:n}=u;return this.getDirection()==="supertypes"?(await a.provideSupertypes(n,f.CancellationToken.None)).map(h=>new C(h,a,u)):(await a.provideSubtypes(n,f.CancellationToken.None)).map(h=>new C(h,a,u))}}e.DataSource=o;class c{compare(u,a){return C.compare(u,a)}}e.Sorter=c;class i{constructor(u){this.getDirection=u}getId(u){let a=this.getDirection()+JSON.stringify(u.item.uri)+JSON.stringify(u.item.range);return u.parent&&(a+=this.getId(u.parent)),a}}e.IdentityProvider=i;class S{constructor(u,a){this.icon=u,this.label=a}}class s{constructor(){this.templateId=s.id}renderTemplate(u){u.classList.add("typehierarchy-element");let a=document.createElement("div");u.appendChild(a);const n=new A.IconLabel(u,{supportHighlights:!0});return new S(a,n)}renderElement(u,a,n){const{element:h,filterData:g}=u,d=h.item.tags?.includes(1);n.icon.classList.add("inline",...v.CSSIcon.asClassNameArray(k.SymbolKinds.toIcon(h.item.kind))),n.label.setLabel(h.item.name,h.item.detail,{labelEscapeNewLines:!0,matches:(0,_.createMatches)(g),strikethrough:d})}disposeTemplate(u){u.label.dispose()}}e.TypeRenderer=s,s.id="TypeRenderer";class l{getHeight(u){return 22}getTemplateId(u){return s.id}}e.VirtualDelegate=l;class r{constructor(u){this.getDirection=u}getWidgetAriaLabel(){return(0,w.localize)(0,null)}getAriaLabel(u){return this.getDirection()==="supertypes"?(0,w.localize)(1,null,u.item.name):(0,w.localize)(2,null,u.item.name)}}e.AccessibilityProvider=r}),define(ne[830],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CheckForVSCodeUpdateActionId=e.ShowCurrentReleaseNotesActionId=void 0,e.ShowCurrentReleaseNotesActionId="update.showCurrentReleaseNotes",e.CheckForVSCodeUpdateActionId="update.checkForVSCodeUpdate"}),define(ne[831],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.testUrlMatchesGlob=void 0;const t=(_,A)=>{const k=w=>w.replace(/\/+$/,"");A=k(A),_=k(_);const D=Array.from({length:_.length+1}).map(()=>Array.from({length:A.length+1}).map(()=>{}));if(/^[^./:]*:\/\//.test(A))return f(D,_,A,0,0);const I=/^(https?):\/\//.exec(_)?.[1];return I?f(D,_,`${I}://${A}`,0,0):!1};e.testUrlMatchesGlob=t;const f=(_,A,k,D,I)=>{if(_[D]?.[I]!==void 0)return _[D][I];const w=[];if(D===A.length)return I===k.length;if(I===k.length)return A.slice(D)[0]==="/";if(A[D]===k[I]&&w.push(f(_,A,k,D+1,I+1)),k[I]+k[I+1]==="*."&&(["/",":"].includes(A[D])||w.push(f(_,A,k,D+1,I)),w.push(f(_,A,k,D,I+2))),k[I]==="*"&&(D+1===A.length?w.push(f(_,A,k,D+1,I+1)):w.push(f(_,A,k,D+1,I)),w.push(f(_,A,k,D,I+1))),k[I]+k[I+1]===":*")if(A[D]===":"){let v=D+1;do v++;while(/[0-9]/.test(A[v]));w.push(f(_,A,k,v,I+2))}else w.push(f(_,A,k,D,I+2));return _[D][I]=w.some(v=>v===!0)}}),define(ne[2242],re([1,0,157,18,48,9,23,2102]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.loadLocalResource=e.WebviewResourceResponse=void 0;var I;(function(c){let i;(function(l){l[l.Success=0]="Success",l[l.Failed=1]="Failed",l[l.AccessDenied=2]="AccessDenied",l[l.NotModified=3]="NotModified"})(i=c.Type||(c.Type={}));class S{constructor(r,p,u,a){this.stream=r,this.etag=p,this.mtime=u,this.mimeType=a,this.type=i.Success}}c.StreamSuccess=S,c.Failed={type:i.Failed},c.AccessDenied={type:i.AccessDenied};class s{constructor(r,p){this.mimeType=r,this.mtime=p,this.type=i.NotModified}}c.NotModified=s})(I=e.WebviewResourceResponse||(e.WebviewResourceResponse={}));async function w(c,i,S,s,l){s.debug(`loadLocalResource - begin. requestUri=${c}`);const r=v(c,i.roots);if(s.debug(`loadLocalResource - found resource to load. requestUri=${c}, resourceToLoad=${r}`),!r)return I.AccessDenied;const p=(0,D.getWebviewContentMimeType)(c);try{const u=await S.readFileStream(r,{etag:i.ifNoneMatch});return new I.StreamSuccess(u.value,u.etag,u.mtime,p)}catch(u){return u instanceof k.FileOperationError&&u.fileOperationResult===2?new I.NotModified(p,u.options?.mtime):(s.debug(`loadLocalResource - Error using fileReader. requestUri=${c}`),console.log(u),I.Failed)}}e.loadLocalResource=w;function v(c,i){for(const S of i)if(C(S,c))return o(c)}function C(c,i){if(c.scheme!==i.scheme)return!1;let S=c.fsPath+(c.fsPath.endsWith(_.sep)?"":_.sep),s=i.fsPath;return(0,t.isUNC)(c.fsPath)&&(0,t.isUNC)(i.fsPath)&&(S=S.toLowerCase(),s=s.toLowerCase()),s.startsWith(S)}function o(c){return c.scheme===f.Schemas.vscodeRemote?A.URI.from({scheme:f.Schemas.vscodeRemote,authority:c.authority,path:"/vscode-resource",query:JSON.stringify({requestResourcePath:c.path})}):c}}),define(ne[2243],re([1,0,6,2,123,8,32,127,12,483]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewThemeDataProvider=void 0;let v=class extends f.Disposable{constructor(c,i){super();this._themeService=c,this._configurationService=i,this._cachedWebViewThemeData=void 0,this._onThemeDataChanged=this._register(new t.Emitter),this.onThemeDataChanged=this._onThemeDataChanged.event,this._register(this._themeService.onDidColorThemeChange(()=>{this.reset()}));const S=["editor.fontFamily","editor.fontWeight","editor.fontSize"];this._register(this._configurationService.onDidChangeConfiguration(s=>{S.some(l=>s.affectsConfiguration(l))&&this.reset()}))}getTheme(){return this._themeService.getColorTheme()}getWebviewThemeData(){if(!this._cachedWebViewThemeData){const c=this._configurationService.getValue("editor"),i=c.fontFamily||_.EDITOR_FONT_DEFAULTS.fontFamily,S=c.fontWeight||_.EDITOR_FONT_DEFAULTS.fontWeight,s=c.fontSize||_.EDITOR_FONT_DEFAULTS.fontSize,l=this._themeService.getColorTheme(),r=k.getColorRegistry().getColors().reduce((a,n)=>{const h=l.getColor(n.id);return h&&(a["vscode-"+n.id.replace(".","-")]=h.toString()),a},{}),p={"vscode-font-family":w.DEFAULT_FONT_FAMILY,"vscode-font-weight":"normal","vscode-font-size":"13px","vscode-editor-font-family":i,"vscode-editor-font-weight":S,"vscode-editor-font-size":s+"px",...r},u=C.fromTheme(l);this._cachedWebViewThemeData={styles:p,activeTheme:u,themeLabel:l.label}}return this._cachedWebViewThemeData}reset(){this._cachedWebViewThemeData=void 0,this._onThemeDataChanged.fire()}};v=Ee([W(0,I.IThemeService),W(1,A.IConfigurationService)],v),e.WebviewThemeDataProvider=v;var C;(function(o){o.light="vscode-light",o.dark="vscode-dark",o.highContrast="vscode-high-contrast"})(C||(C={})),function(o){function c(i){switch(i.type){case D.ColorScheme.LIGHT:return o.light;case D.ColorScheme.DARK:return o.dark;default:return o.highContrast}}o.fromTheme=c}(C||(C={}))}),define(ne[202],re([1,0,15,19,7,5]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.areWebviewContentOptionsEqual=e.WebviewContentPurpose=e.IWebviewService=e.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_ENABLED=e.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_FOCUSED=e.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE=void 0,e.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE=new _.RawContextKey("webviewFindWidgetVisible",!1),e.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_FOCUSED=new _.RawContextKey("webviewFindWidgetFocused",!1),e.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_ENABLED=new _.RawContextKey("webviewFindWidgetEnabled",!1),e.IWebviewService=(0,A.createDecorator)("webviewService");var k;(function(I){I.NotebookRenderer="notebookRenderer",I.CustomEditor="customEditor",I.WebviewView="webviewView"})(k=e.WebviewContentPurpose||(e.WebviewContentPurpose={}));function D(I,w){return I.allowMultipleAPIAcquire===w.allowMultipleAPIAcquire&&I.allowScripts===w.allowScripts&&I.allowForms===w.allowForms&&(0,t.equals)(I.localResourceRoots,w.localResourceRoots,f.isEqual)&&(0,t.equals)(I.portMapping,w.portMapping,(v,C)=>v.extensionHostPort===C.extensionHostPort&&v.webviewPort===C.webviewPort)&&I.enableCommandUris===w.enableCommandUris}e.areWebviewContentOptionsEqual=D}),define(ne[2244],re([1,0,6,2,7,185,202]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverlayWebview=void 0;let D=class extends f.Disposable{constructor(w,v,C,o,c,i,S){super();this.id=w,this._layoutService=c,this._webviewService=i,this._baseContextKeyService=S,this._onDidWheel=this._register(new t.Emitter),this.onDidWheel=this._onDidWheel.event,this._pendingMessages=new Set,this._webview=this._register(new f.MutableDisposable),this._webviewEvents=this._register(new f.DisposableStore),this._html="",this._initialScrollProgress=0,this._state=void 0,this._owner=void 0,this._scopedContextKeyService=this._register(new f.MutableDisposable),this._isDisposed=!1,this._onDidDispose=this._register(new t.Emitter),this.onDidDispose=this._onDidDispose.event,this._onDidFocus=this._register(new t.Emitter),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new t.Emitter),this.onDidBlur=this._onDidBlur.event,this._onDidClickLink=this._register(new t.Emitter),this.onDidClickLink=this._onDidClickLink.event,this._onDidReload=this._register(new t.Emitter),this.onDidReload=this._onDidReload.event,this._onDidScroll=this._register(new t.Emitter),this.onDidScroll=this._onDidScroll.event,this._onDidUpdateState=this._register(new t.Emitter),this.onDidUpdateState=this._onDidUpdateState.event,this._onMessage=this._register(new t.Emitter),this.onMessage=this._onMessage.event,this._onMissingCsp=this._register(new t.Emitter),this.onMissingCsp=this._onMissingCsp.event,this._extension=o,this._options=v,this._contentOptions=C}get isFocused(){return!!this._webview.value?.isFocused}dispose(){this._isDisposed=!0,this._container?.remove(),this._container=void 0,this._onDidDispose.fire(),super.dispose()}get container(){if(this._isDisposed)throw new Error("DynamicWebviewEditorOverlay has been disposed");return this._container||(this._container=document.createElement("div"),this._container.id=`webview-${this.id}`,this._container.style.visibility="hidden",this._layoutService.container.appendChild(this._container)),this._container}claim(w,v){const C=this._owner;if(this._owner=w,this.show(),C!==w){const o=v||this._baseContextKeyService;this._scopedContextKeyService.clear(),this._scopedContextKeyService.value=o.createScoped(this.container),this._findWidgetVisible?.reset(),this._findWidgetVisible=k.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE.bindTo(o),this._findWidgetEnabled?.reset(),this._findWidgetEnabled=k.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_ENABLED.bindTo(o),this._findWidgetEnabled.set(!!this.options.enableFindWidget),this._webview.value?.setContextKeyService(this._scopedContextKeyService.value)}}release(w){this._owner===w&&(this._scopedContextKeyService.clear(),this._owner=void 0,this._container&&(this._container.style.visibility="hidden"),this._options.retainContextWhenHidden||(this._webview.clear(),this._webviewEvents.clear()))}layoutWebviewOverElement(w,v){if(!this._container||!this._container.parentElement)return;const C=w.getBoundingClientRect(),o=this._container.parentElement.getBoundingClientRect(),c=(o.height-this._container.parentElement.clientHeight)/2,i=(o.width-this._container.parentElement.clientWidth)/2;this._container.style.position="absolute",this._container.style.overflow="hidden",this._container.style.top=`${C.top-o.top-c}px`,this._container.style.left=`${C.left-o.left-i}px`,this._container.style.width=`${v?v.width:C.width}px`,this._container.style.height=`${v?v.height:C.height}px`}show(){if(this._isDisposed)throw new Error("Webview overlay is disposed");if(!this._webview.value){const w=this._webviewService.createWebviewElement(this.id,this._options,this._contentOptions,this.extension);this._webview.value=w,w.state=this._state,this._scopedContextKeyService.value&&this._webview.value.setContextKeyService(this._scopedContextKeyService.value),this._html&&(w.html=this._html),this._options.tryRestoreScrollPosition&&(w.initialScrollProgress=this._initialScrollProgress),this._findWidgetEnabled?.set(!!this.options.enableFindWidget),w.mountTo(this.container),this._webviewEvents.clear(),this._webviewEvents.add(w.onDidFocus(()=>{this._onDidFocus.fire()})),this._webviewEvents.add(w.onDidBlur(()=>{this._onDidBlur.fire()})),this._webviewEvents.add(w.onDidClickLink(v=>{this._onDidClickLink.fire(v)})),this._webviewEvents.add(w.onMessage(v=>{this._onMessage.fire(v)})),this._webviewEvents.add(w.onMissingCsp(v=>{this._onMissingCsp.fire(v)})),this._webviewEvents.add(w.onDidWheel(v=>{this._onDidWheel.fire(v)})),this._webviewEvents.add(w.onDidReload(()=>{this._onDidReload.fire()})),this._webviewEvents.add(w.onDidScroll(v=>{this._initialScrollProgress=v.scrollYPercentage,this._onDidScroll.fire(v)})),this._webviewEvents.add(w.onDidUpdateState(v=>{this._state=v,this._onDidUpdateState.fire(v)})),this._pendingMessages.forEach(v=>w.postMessage(v.message,v.transfer)),this._pendingMessages.clear()}this.container.style.visibility="visible"}get html(){return this._html}set html(w){this._html=w,this.withWebview(v=>v.html=w)}get initialScrollProgress(){return this._initialScrollProgress}set initialScrollProgress(w){this._initialScrollProgress=w,this.withWebview(v=>v.initialScrollProgress=w)}get state(){return this._state}set state(w){this._state=w,this.withWebview(v=>v.state=w)}get extension(){return this._extension}set extension(w){this._extension=w,this.withWebview(v=>v.extension=w)}get options(){return this._options}set options(w){this._options={customClasses:this._options.customClasses,...w}}get contentOptions(){return this._contentOptions}set contentOptions(w){this._contentOptions=w,this.withWebview(v=>v.contentOptions=w)}set localResourcesRoot(w){this.withWebview(v=>v.localResourcesRoot=w)}postMessage(w,v){this._webview.value?this._webview.value.postMessage(w,v):this._pendingMessages.add({message:w,transfer:v})}focus(){this._webview.value?.focus()}reload(){this._webview.value?.reload()}selectAll(){this._webview.value?.selectAll()}copy(){this._webview.value?.copy()}paste(){this._webview.value?.paste()}cut(){this._webview.value?.cut()}undo(){this._webview.value?.undo()}redo(){this._webview.value?.redo()}showFind(){this._webview.value&&(this._webview.value.showFind(),this._findWidgetVisible?.set(!0))}hideFind(){this._findWidgetVisible?.reset(),this._webview.value?.hideFind()}runFindAction(w){this._webview.value?.runFindAction(w)}withWebview(w){this._webview.value&&w(this._webview.value)}windowDidDragStart(){this._webview.value?.windowDidDragStart()}windowDidDragEnd(){this._webview.value?.windowDidDragEnd()}setContextKeyService(w){this._webview.value?.setContextKeyService(w)}};D=Ee([W(4,A.ILayoutService),W(5,k.IWebviewService),W(6,_.IContextKeyService)],D),e.OverlayWebview=D}),define(ne[2245],re([1,0,7,37,784,202]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewFindWidget=void 0;let k=class extends _.SimpleFindWidget{constructor(I,w,v){super(w,v,void 0,!1,I.checkImeCompletionState);this._delegate=I,this._findWidgetFocused=A.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_FOCUSED.bindTo(v),this._register(I.hasFindResult(C=>{this.updateButtons(C),this.focusFindBox()})),this._register(I.onDidStopFind(()=>{this.updateButtons(!1)}))}find(I){const w=this.inputValue;w&&this._delegate.find(w,I)}hide(){super.hide(),this._delegate.stopFind(!0),this._delegate.focus()}_onInputChanged(){const I=this.inputValue;return I?this._delegate.updateFind(I):this._delegate.stopFind(!1),!1}_onFocusTrackerFocus(){this._findWidgetFocused.set(!0)}_onFocusTrackerBlur(){this._findWidgetFocused.reset()}_onFindInputFocusTrackerFocus(){}_onFindInputFocusTrackerBlur(){}findFirst(){}};k=Ee([W(1,f.IContextViewService),W(2,t.IContextKeyService)],k),e.WebviewFindWidget=k}),define(ne[832],re([1,0,10,2]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewWindowDragMonitor=void 0;class _ extends f.Disposable{constructor(k){super();this._register(t.addDisposableListener(window,t.EventType.DRAG_START,()=>{k()?.windowDidDragStart()}));const D=()=>{k()?.windowDidDragEnd()};this._register(t.addDisposableListener(window,t.EventType.DRAG_END,D)),this._register(t.addDisposableListener(window,t.EventType.MOUSE_MOVE,I=>{I.buttons===0&&D()}))}}e.WebviewWindowDragMonitor=_}),define(ne[2246],re([1,0,14,171]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WindowIgnoreMenuShortcutsManager=void 0;class _{constructor(k,D,I){this.nativeHostService=I,this._isUsingNativeTitleBars=k.getValue("window.titleBarStyle")==="native",this.webviewMainService=f.ProxyChannel.toService(D.getChannel("webview"))}didFocus(){this.setIgnoreMenuShortcuts(!0)}didBlur(){this.setIgnoreMenuShortcuts(!1)}get shouldToggleMenuShortcutsEnablement(){return t.isMacintosh||this._isUsingNativeTitleBars}setIgnoreMenuShortcuts(k){this.shouldToggleMenuShortcutsEnablement&&this.webviewMainService.setIgnoreMenuShortcuts({windowId:this.nativeHostService.windowId},k)}}e.WindowIgnoreMenuShortcutsManager=_}),define(ne[294],re([1,0,18,9,174]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewInput=void 0;class A extends _.EditorInput{constructor(D,I,w,v,C){super();this.id=D,this.viewType=I,this._iconManager=C,this._hasTransfered=!1,this._name=w,this._webview=v}get typeId(){return A.typeId}get editorId(){return this.viewType}get capabilities(){return 2|8}get resource(){return f.URI.from({scheme:t.Schemas.webviewPanel,path:`webview-panel/webview-${this.id}`})}dispose(){this.isDisposed()||this._hasTransfered||this._webview?.dispose(),super.dispose()}getName(){return this._name}getTitle(D){return this.getName()}getDescription(){}setName(D){this._name=D,this._onDidChangeLabel.fire()}get webview(){return this._webview}get extension(){return this.webview.extension}get iconPath(){return this._iconPath}set iconPath(D){this._iconPath=D,this._iconManager.setIcons(this.id,D)}matches(D){return super.matches(D)||D===this}get group(){return this._group}updateGroup(D){this._group=D}transfer(D){if(!this._hasTransfered)return this._hasTransfered=!0,D._webview=this._webview,D}}e.WebviewInput=A,A.typeId="workbench.editors.webviewInput"}),define(ne[599],re([1,0,30,6,2,5]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewViewService=e.IWebviewViewService=void 0,e.IWebviewViewService=(0,A.createDecorator)("webviewViewService");class k extends _.Disposable{constructor(){super(...arguments);this._resolvers=new Map,this._awaitingRevival=new Map,this._onNewResolverRegistered=this._register(new f.Emitter),this.onNewResolverRegistered=this._onNewResolverRegistered.event}register(I,w){if(this._resolvers.has(I))throw new Error(`View resolver already registered for ${I}`);this._resolvers.set(I,w),this._onNewResolverRegistered.fire({viewType:I});const v=this._awaitingRevival.get(I);return v&&w.resolve(v.webview,t.CancellationToken.None).then(()=>{this._awaitingRevival.delete(I),v.resolve()}),(0,_.toDisposable)(()=>{this._resolvers.delete(I)})}resolve(I,w,v){const C=this._resolvers.get(I);if(!C){if(this._awaitingRevival.has(I))throw new Error("View already awaiting revival");let o;const c=new Promise(i=>o=i);return this._awaitingRevival.set(I,{webview:w,resolve:o}),c}return C.resolve(w,v)}}e.WebviewViewService=k}),define(ne[2247],re([1,0,35,599]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerSingleton)(f.IWebviewViewService,f.WebviewViewService,!0)}),define(ne[2248],re([1,0,32,1825]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.welcomePageProgressForeground=e.welcomePageProgressBackground=e.welcomePageTileShadow=e.welcomePageTileHoverBackground=e.welcomePageTileBackground=e.welcomePageBackground=void 0,e.welcomePageBackground=(0,t.registerColor)("welcomePage.background",{light:null,dark:null,hcDark:null,hcLight:null},(0,f.localize)(0,null)),e.welcomePageTileBackground=(0,t.registerColor)("welcomePage.tileBackground",{dark:t.editorWidgetBackground,light:t.editorWidgetBackground,hcDark:"#000",hcLight:t.editorWidgetBackground},(0,f.localize)(1,null)),e.welcomePageTileHoverBackground=(0,t.registerColor)("welcomePage.tileHoverBackground",{dark:(0,t.lighten)(t.editorWidgetBackground,.2),light:(0,t.darken)(t.editorWidgetBackground,.1),hcDark:null,hcLight:null},(0,f.localize)(2,null)),e.welcomePageTileShadow=(0,t.registerColor)("welcomePage.tileShadow",{light:t.widgetShadow,dark:t.widgetShadow,hcDark:null,hcLight:null},(0,f.localize)(3,null)),e.welcomePageProgressBackground=(0,t.registerColor)("welcomePage.progress.background",{light:t.inputBackground,dark:t.inputBackground,hcDark:t.inputBackground,hcLight:t.inputBackground},(0,f.localize)(4,null)),e.welcomePageProgressForeground=(0,t.registerColor)("welcomePage.progress.foreground",{light:t.textLinkForeground,dark:t.textLinkForeground,hcDark:t.textLinkForeground,hcLight:t.textLinkForeground},(0,f.localize)(5,null))}),define(ne[833],re([1,0,1827,33,63]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.gettingStartedCheckedCodicon=e.gettingStartedUncheckedCodicon=void 0,e.gettingStartedUncheckedCodicon=(0,_.registerIcon)("getting-started-step-unchecked",f.Codicon.circleLargeOutline,(0,t.localize)(0,null)),e.gettingStartedCheckedCodicon=(0,_.registerIcon)("getting-started-step-checked",f.Codicon.passFilled,(0,t.localize)(1,null))}),define(ne[600],re([1,0,1828,174,9,18,679]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GettingStartedInput=e.gettingStartedInputTypeId=void 0,e.gettingStartedInputTypeId="workbench.editors.gettingStartedInput";class k extends f.EditorInput{constructor(I){super();this.selectedCategory=I.selectedCategory,this.selectedStep=I.selectedStep,this.showTelemetryNotice=!!I.showTelemetryNotice}get typeId(){return k.ID}get resource(){return k.RESOURCE}matches(I){return super.matches(I)?!0:I instanceof k?I.selectedCategory===this.selectedCategory:!1}getName(){return(0,t.localize)(0,null)}}e.GettingStartedInput=k,k.ID=e.gettingStartedInputTypeId,k.RESOURCE=_.URI.from({scheme:A.Schemas.walkThrough,authority:"vscode_getting_started_page"})}),define(ne[2249],re([1,0,2,10,139,6,15]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GettingStartedIndexList=void 0;class D extends t.Disposable{constructor(w){super();this.options=w,this._onDidChangeEntries=new A.Emitter,this.onDidChangeEntries=this._onDidChangeEntries.event,this.isDisposed=!1,this.contextKeysToWatch=new Set,this.contextService=w.contextService,this.entries=void 0,this.itemCount=0,this.list=(0,f.$)("ul"),this.scrollbar=this._register(new _.DomScrollableElement(this.list,{})),this._register(this.onDidChangeEntries(()=>this.scrollbar.scanDomNode())),this.domElement=(0,f.$)(".index-list."+w.klass,{},(0,f.$)("h2",{},w.title),this.scrollbar.getDomNode()),this._register(this.contextService.onDidChangeContext(v=>{v.affectsSome(this.contextKeysToWatch)&&this.rerender()}))}getDomElement(){return this.domElement}layout(w){this.scrollbar.scanDomNode()}onDidChange(w){this._register(this.onDidChangeEntries(w))}register(w){this.isDisposed?w.dispose():this._register(w)}dispose(){this.isDisposed=!0,super.dispose()}setLimit(w){this.options.limit=w,this.setEntries(this.entries)}rerender(){this.setEntries(this.entries)}setEntries(w){let v=w??[];this.itemCount=0;const C=this.options.rankElement;C&&(v=v.filter(S=>C(S)!==null),v.sort((S,s)=>C(s)-C(S)));const o=v.filter(S=>!S.when||this.contextService.contextMatchesRules(S.when)),c=o.slice(0,this.options.limit),i=c.map(S=>S.id);if(!(this.entries===w&&(0,k.equals)(i,this.lastRendered))){for(this.entries=w,this.contextKeysToWatch.clear(),v.forEach(S=>{const s=S.when?.keys();s&&s.forEach(l=>this.contextKeysToWatch.add(l))}),this.lastRendered=i,this.itemCount=c.length;this.list.firstChild;)this.list.removeChild(this.list.firstChild);this.itemCount=c.length;for(const S of c){const s=this.options.renderElement(S);this.list.appendChild(s)}o.length>c.length&&this.options.more?this.list.appendChild(this.options.more):w!==void 0&&this.itemCount===0&&this.options.empty?this.list.appendChild(this.options.empty):this.options.footer&&this.list.appendChild(this.options.footer),this._onDidChangeEntries.fire()}}}e.GettingStartedIndexList=D}),define(ne[2250],re([1,0,29,1831]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const _=k=>encodeURIComponent(JSON.stringify({profile:k})),A=400;e.default=()=>` <vertically-centered> <checklist> <checkbox on-checked="command:notebook.setProfile?${_("default")}" checked-on="config.notebook.cellFocusIndicator == 'border' && config.notebook.insertToolbarLocation == 'both' && config.notebook.globalToolbar == false && config.notebook.compactView == true && config.notebook.showCellStatusBar == 'visible'"> <img width="${A}" src="./notebookThemes/default.png"/> ${(0,t.escape)((0,f.localize)(0,null))} </checkbox> <checkbox on-checked="command:notebook.setProfile?${_("jupyter")}" checked-on="config.notebook.cellFocusIndicator == 'gutter' && config.notebook.insertToolbarLocation == 'notebookToolbar' && config.notebook.globalToolbar == true && config.notebook.compactView == true && config.notebook.showCellStatusBar == 'visible'"> <img width="${A}" src="./notebookThemes/jupyter.png"/> ${(0,t.escape)((0,f.localize)(1,null))} </checkbox> <checkbox on-checked="command:notebook.setProfile?${_("colab")}" checked-on="config.notebook.cellFocusIndicator == 'border' && config.notebook.insertToolbarLocation == 'betweenCells' && config.notebook.globalToolbar == false && config.notebook.compactView == false && config.notebook.showCellStatusBar == 'hidden'"> <img width="${A}" src="./notebookThemes/colab.png"/> ${(0,t.escape)((0,f.localize)(2,null))} </checkbox> </checklist> </vertically-centered> `}),define(ne[2251],re([1,0,29,1832]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=()=>` <checklist> <checkbox when-checked="setTheme:Default Light+" checked-on="config.workbench.colorTheme == 'Default Light+'"> <img width="150" src="./light.png"/> ${(0,t.escape)((0,f.localize)(0,null))} </checkbox> <checkbox when-checked="setTheme:Default Dark+" checked-on="config.workbench.colorTheme == 'Default Dark+'"> <img width="150" src="./dark.png"/> ${(0,t.escape)((0,f.localize)(1,null))} </checkbox> <checkbox when-checked="setTheme:Default High Contrast" checked-on="config.workbench.colorTheme == 'Default High Contrast'"> <img width="150" src="./dark-hc.png"/> ${(0,t.escape)((0,f.localize)(2,null))} </checkbox> <checkbox when-checked="setTheme:Default High Contrast Light" checked-on="config.workbench.colorTheme == 'Default High Contrast Light'"> <img width="150" src="./light-hc.png"/> ${(0,t.escape)((0,f.localize)(3,null))} </checkbox> </checklist> <checkbox when-checked="command:workbench.action.selectTheme" checked-on="false"> ${(0,t.escape)((0,f.localize)(4,null))} </checkbox> `}),define(ne[834],re([1,0,1830,33,63,64,2251,2250]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.walkthroughs=e.startEntries=void 0;const k=(0,_.registerIcon)("getting-started-setup",f.Codicon.zap,(0,t.localize)(0,null)),D=(0,_.registerIcon)("getting-started-beginner",f.Codicon.lightbulb,(0,t.localize)(1,null)),I=(0,_.registerIcon)("getting-started-intermediate",f.Codicon.mortarBoard,(0,t.localize)(2,null));e.startEntries=[{id:"welcome.showNewFileEntries",title:(0,t.localize)(3,null),description:(0,t.localize)(4,null),icon:f.Codicon.newFile,content:{type:"startEntry",command:"command:welcome.showNewFileEntries"}},{id:"topLevelOpenMac",title:(0,t.localize)(5,null),description:(0,t.localize)(6,null),icon:f.Codicon.folderOpened,when:"!isWeb && isMac",content:{type:"startEntry",command:"command:workbench.action.files.openFileFolder"}},{id:"topLevelOpenFile",title:(0,t.localize)(7,null),description:(0,t.localize)(8,null),icon:f.Codicon.goToFile,when:"isWeb || !isMac",content:{type:"startEntry",command:"command:workbench.action.files.openFile"}},{id:"topLevelOpenFolder",title:(0,t.localize)(9,null),description:(0,t.localize)(10,null),icon:f.Codicon.folderOpened,when:"!isWeb && !isMac",content:{type:"startEntry",command:"command:workbench.action.files.openFolder"}},{id:"topLevelOpenFolderWeb",title:(0,t.localize)(11,null),description:(0,t.localize)(12,null),icon:f.Codicon.folderOpened,when:"!openFolderWorkspaceSupport && workbenchState == 'workspace'",content:{type:"startEntry",command:"command:workbench.action.files.openFolderViaWorkspace"}},{id:"topLevelGitClone",title:(0,t.localize)(13,null),description:(0,t.localize)(14,null),when:"config.git.enabled && !git.missing",icon:f.Codicon.sourceControl,content:{type:"startEntry",command:"command:git.clone"}},{id:"topLevelGitOpen",title:(0,t.localize)(15,null),description:(0,t.localize)(16,null),when:"workspacePlatform == 'webworker'",icon:f.Codicon.sourceControl,content:{type:"startEntry",command:"command:remoteHub.openRepository"}},{id:"topLevelShowWalkthroughs",title:(0,t.localize)(17,null),description:(0,t.localize)(18,null),icon:f.Codicon.checklist,when:"allWalkthroughsHidden",content:{type:"startEntry",command:"command:welcome.showAllWalkthroughs"}},{id:"topLevelVideoTutorials",title:(0,t.localize)(19,null),description:(0,t.localize)(20,null),icon:f.Codicon.playCircle,when:"config.workbench.welcomePage.experimental.videoTutorials == on",content:{type:"startEntry",command:"https://aka.ms/vscode-getting-started-video"}},{id:"topLevelVideoTutorialsExperimental",title:(0,t.localize)(21,null),description:(0,t.localize)(22,null),when:"config.workbench.welcomePage.experimental.videoTutorials == experimental",icon:f.Codicon.playCircle,content:{type:"startEntry",command:"https://aka.ms/vscode-videos"}}];const w=(v,C)=>`[${v}](${C})`;e.walkthroughs=[{id:"Setup",title:(0,t.localize)(23,null),description:(0,t.localize)(24,null),isFeatured:!0,icon:k,when:"!isWeb",next:"Beginner",content:{type:"steps",steps:[{id:"pickColorTheme",title:(0,t.localize)(25,null),description:(0,t.localize)(26,null,w((0,t.localize)(27,null),"command:workbench.action.selectTheme")),completionEvents:["onSettingChanged:workbench.colorTheme","onCommand:workbench.action.selectTheme"],media:{type:"markdown",path:"theme_picker"}},{id:"settingsSync",title:(0,t.localize)(28,null),description:(0,t.localize)(29,null,w((0,t.localize)(30,null),"command:workbench.userDataSync.actions.turnOn")),when:"syncStatus != uninitialized",completionEvents:["onEvent:sync-enabled"],media:{type:"svg",altText:'The "Turn on Sync" entry in the settings gear menu.',path:"settingsSync.svg"}},{id:"commandPaletteTask",title:(0,t.localize)(31,null),description:(0,t.localize)(32,null,w((0,t.localize)(33,null),"command:workbench.action.showCommands")),media:{type:"svg",altText:"Command Palette overlay for searching and executing commands.",path:"commandPalette.svg"}},{id:"extensionsWeb",title:(0,t.localize)(34,null),description:(0,t.localize)(35,null,w((0,t.localize)(36,null),"command:workbench.extensions.action.showPopularExtensions")),when:"workspacePlatform == 'webworker'",media:{type:"svg",altText:"VS Code extension marketplace with featured language extensions",path:"extensions-web.svg"}},{id:"findLanguageExtensions",title:(0,t.localize)(37,null),description:(0,t.localize)(38,null,w((0,t.localize)(39,null),"command:workbench.extensions.action.showLanguageExtensions")),when:"workspacePlatform != 'webworker'",media:{type:"svg",altText:"Language extensions",path:"languages.svg"}},{id:"pickAFolderTask-Mac",title:(0,t.localize)(40,null),description:(0,t.localize)(41,null,w((0,t.localize)(42,null),"command:workbench.action.files.openFileFolder")),when:"isMac && workspaceFolderCount == 0",media:{type:"svg",altText:"Explorer view showing buttons for opening folder and cloning repository.",path:"openFolder.svg"}},{id:"pickAFolderTask-Other",title:(0,t.localize)(43,null),description:(0,t.localize)(44,null,w((0,t.localize)(45,null),"command:workbench.action.files.openFolder")),when:"!isMac && workspaceFolderCount == 0",media:{type:"svg",altText:"Explorer view showing buttons for opening folder and cloning repository.",path:"openFolder.svg"}},{id:"quickOpen",title:(0,t.localize)(46,null),description:(0,t.localize)(47,null,w((0,t.localize)(48,null),"command:toSide:workbench.action.quickOpen")),when:"workspaceFolderCount != 0",media:{type:"svg",altText:"Go to file in quick search.",path:"search.svg"}}]}},{id:"SetupWeb",title:(0,t.localize)(49,null),description:(0,t.localize)(50,null),isFeatured:!0,icon:k,when:"isWeb",next:"Beginner",content:{type:"steps",steps:[{id:"pickColorThemeWeb",title:(0,t.localize)(51,null),description:(0,t.localize)(52,null,w((0,t.localize)(53,null),"command:workbench.action.selectTheme")),completionEvents:["onSettingChanged:workbench.colorTheme","onCommand:workbench.action.selectTheme"],media:{type:"markdown",path:"theme_picker"}},{id:"settingsSyncWeb",title:(0,t.localize)(54,null),description:(0,t.localize)(55,null,w((0,t.localize)(56,null),"command:workbench.userDataSync.actions.turnOn")),when:"syncStatus != uninitialized",completionEvents:["onEvent:sync-enabled"],media:{type:"svg",altText:'The "Turn on Sync" entry in the settings gear menu.',path:"settingsSync.svg"}},{id:"commandPaletteTaskWeb",title:(0,t.localize)(57,null),description:(0,t.localize)(58,null,w((0,t.localize)(59,null),"command:workbench.action.showCommands")),media:{type:"svg",altText:"Command Palette overlay for searching and executing commands.",path:"commandPalette.svg"}},{id:"menuBarWeb",title:(0,t.localize)(60,null),description:(0,t.localize)(61,null,w((0,t.localize)(62,null),"command:workbench.action.toggleMenuBar")),when:"isWeb",media:{type:"svg",altText:"Comparing menu dropdown with the visible menu bar.",path:"menuBar.svg"}},{id:"extensionsWebWeb",title:(0,t.localize)(63,null),description:(0,t.localize)(64,null,w((0,t.localize)(65,null),"command:workbench.extensions.action.showPopularExtensions")),when:"workspacePlatform == 'webworker'",media:{type:"svg",altText:"VS Code extension marketplace with featured language extensions",path:"extensions-web.svg"}},{id:"findLanguageExtensionsWeb",title:(0,t.localize)(66,null),description:(0,t.localize)(67,null,w((0,t.localize)(68,null),"command:workbench.extensions.action.showLanguageExtensions")),when:"workspacePlatform != 'webworker'",media:{type:"svg",altText:"Language extensions",path:"languages.svg"}},{id:"pickAFolderTask-WebWeb",title:(0,t.localize)(69,null),description:(0,t.localize)(70,null,w((0,t.localize)(71,null),"command:workbench.action.addRootFolder"),w((0,t.localize)(72,null),"command:remoteHub.openRepository")),when:"workspaceFolderCount == 0",media:{type:"svg",altText:"Explorer view showing buttons for opening folder and cloning repository.",path:"openFolder.svg"}},{id:"quickOpenWeb",title:(0,t.localize)(73,null),description:(0,t.localize)(74,null,w((0,t.localize)(75,null),"command:toSide:workbench.action.quickOpen")),when:"workspaceFolderCount != 0",media:{type:"svg",altText:"Go to file in quick search.",path:"search.svg"}}]}},{id:"Beginner",title:(0,t.localize)(76,null),icon:D,isFeatured:!0,next:"Intermediate",description:(0,t.localize)(77,null),content:{type:"steps",steps:[{id:"playground",title:(0,t.localize)(78,null),description:(0,t.localize)(79,null,w((0,t.localize)(80,null),"command:toSide:workbench.action.showInteractivePlayground")),media:{type:"svg",altText:"Editor Playground.",path:"interactivePlayground.svg"}},{id:"terminal",title:(0,t.localize)(81,null),description:(0,t.localize)(82,null,w((0,t.localize)(83,null),"command:workbench.action.terminal.toggleTerminal")),when:"workspacePlatform != 'webworker' && remoteName != codespaces && !terminalIsOpen",media:{type:"svg",altText:"Integrated terminal running a few npm commands",path:"terminal.svg"}},{id:"extensions",title:(0,t.localize)(84,null),description:(0,t.localize)(85,null,w((0,t.localize)(86,null),"command:workbench.extensions.action.showRecommendedExtensions")),when:"workspacePlatform != 'webworker'",media:{type:"svg",altText:"VS Code extension marketplace with featured language extensions",path:"extensions.svg"}},{id:"settings",title:(0,t.localize)(87,null),description:(0,t.localize)(88,null,w((0,t.localize)(89,null),"command:toSide:workbench.action.openSettings")),media:{type:"svg",altText:"VS Code Settings",path:"settings.svg"}},{id:"workspaceTrust",title:(0,t.localize)(90,null),description:(0,t.localize)(91,null,w((0,t.localize)(92,null),"https://github.com/microsoft/vscode-docs/blob/workspaceTrust/docs/editor/workspace-trust.md"),w((0,t.localize)(93,null),"command:toSide:workbench.action.manageTrustedDomain")),when:"workspacePlatform != 'webworker' && !isWorkspaceTrusted && workspaceFolderCount == 0",media:{type:"svg",altText:"Workspace Trust editor in Restricted mode and a primary button for switching to Trusted mode.",path:"workspaceTrust.svg"}},{id:"videoTutorial",title:(0,t.localize)(94,null),description:(0,t.localize)(95,null,w((0,t.localize)(96,null),"https://aka.ms/vscode-getting-started-video")),media:{type:"svg",altText:"VS Code Settings",path:"learn.svg"}}]}},{id:"Intermediate",isFeatured:!1,title:(0,t.localize)(97,null),icon:I,description:(0,t.localize)(98,null),content:{type:"steps",steps:[{id:"splitview",title:(0,t.localize)(99,null),description:(0,t.localize)(100,null,w((0,t.localize)(101,null),"command:workbench.action.splitEditor")),media:{type:"svg",altText:"Multiple editors in split view.",path:"sideBySide.svg"}},{id:"debugging",title:(0,t.localize)(102,null),description:(0,t.localize)(103,null,w((0,t.localize)(104,null),"command:workbench.action.debug.selectandstart")),when:"workspacePlatform != 'webworker' && workspaceFolderCount != 0",media:{type:"svg",altText:"Run and debug view.",path:"debug.svg"}},{id:"scmClone",title:(0,t.localize)(105,null),description:(0,t.localize)(106,null,w((0,t.localize)(107,null),"command:git.clone")),when:"config.git.enabled && !git.missing && workspaceFolderCount == 0",media:{type:"svg",altText:"Source Control view.",path:"git.svg"}},{id:"scmSetup",title:(0,t.localize)(108,null),description:(0,t.localize)(109,null,w((0,t.localize)(110,null),"command:git.init")),when:"config.git.enabled && !git.missing && workspaceFolderCount != 0 && gitOpenRepositoryCount == 0",media:{type:"svg",altText:"Source Control view.",path:"git.svg"}},{id:"scm",title:(0,t.localize)(111,null),description:(0,t.localize)(112,null,w((0,t.localize)(113,null),"command:workbench.view.scm")),when:"config.git.enabled && !git.missing && workspaceFolderCount != 0 && gitOpenRepositoryCount != 0 && activeViewlet != 'workbench.view.scm'",media:{type:"svg",altText:"Source Control view.",path:"git.svg"}},{id:"installGit",title:(0,t.localize)(114,null),description:(0,t.localize)(115,null,w((0,t.localize)(116,null),"https://aka.ms/vscode-install-git")),when:"git.missing",media:{type:"svg",altText:"Install Git.",path:"git.svg"},completionEvents:["onContext:git.state == initialized"]},{id:"tasks",title:(0,t.localize)(117,null),when:"workspaceFolderCount != 0 && workspacePlatform != 'webworker'",description:(0,t.localize)(118,null,w((0,t.localize)(119,null),"command:workbench.action.tasks.runTask")),media:{type:"svg",altText:"Task runner.",path:"runTask.svg"}},{id:"shortcuts",title:(0,t.localize)(120,null),description:(0,t.localize)(121,null,w((0,t.localize)(122,null),"command:toSide:workbench.action.openGlobalKeybindings")),media:{type:"svg",altText:"Interactive shortcuts.",path:"shortcuts.svg"}}]}},{id:"notebooks",title:(0,t.localize)(123,null),description:"",icon:k,isFeatured:!1,when:`config.${A.NotebookSetting.openGettingStarted} && userHasOpenedNotebook`,content:{type:"steps",steps:[{completionEvents:["onCommand:notebook.setProfile"],id:"notebookProfile",title:(0,t.localize)(124,null),description:(0,t.localize)(125,null),when:"userHasOpenedNotebook",media:{type:"markdown",path:"notebookProfile"}}]}}]}),define(ne[835],re([1,0,1836]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.viewsWelcomeExtensionPointDescriptor=e.ViewIdentifierMap=e.ViewsWelcomeExtensionPointFields=void 0;var f;(function(A){A.view="view",A.contents="contents",A.when="when",A.group="group",A.enablement="enablement"})(f=e.ViewsWelcomeExtensionPointFields||(e.ViewsWelcomeExtensionPointFields={})),e.ViewIdentifierMap={explorer:"workbench.explorer.emptyView",debug:"workbench.debug.welcome",scm:"workbench.scm",testing:"workbench.view.testing"};const _=Object.freeze({type:"array",description:t.localize(0,null),items:{type:"object",description:t.localize(1,null),required:[f.view,f.contents],properties:{[f.view]:{anyOf:[{type:"string",description:t.localize(2,null)},{type:"string",description:t.localize(3,null),enum:Object.keys(e.ViewIdentifierMap)}]},[f.contents]:{type:"string",description:t.localize(4,null)},[f.when]:{type:"string",description:t.localize(5,null)},[f.group]:{type:"string",description:t.localize(6,null)},[f.enablement]:{type:"string",description:t.localize(7,null)}}}});e.viewsWelcomeExtensionPointDescriptor={extensionPoint:"viewsWelcome",jsonSchema:_}}),define(ne[836],re([1,0,61,52,42,378,18,20,93,13,5]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalkThroughSnippetContentProvider=e.requireToContent=void 0;function C(c,i){if(!i.query)throw new Error("Welcome: invalid resource");const S=JSON.parse(i.query);if(!S.moduleId)throw new Error("Welcome: invalid resource");return new Promise((l,r)=>{Q([S.moduleId],p=>{try{l(c.invokeFunction(p.default))}catch(u){r(u)}})})}e.requireToContent=C;let o=class{constructor(i,S,s,l){this.textModelResolverService=i,this.languageService=S,this.modelService=s,this.instantiationService=l,this.loads=new Map,this.textModelResolverService.registerTextModelContentProvider(k.Schemas.walkThroughSnippet,this)}async textBufferFactoryFromResource(i){let S=this.loads.get(i.toString());return S||(S=C(this.instantiationService,i).then(s=>(0,I.createTextBufferFactory)(s)).finally(()=>this.loads.delete(i.toString())),this.loads.set(i.toString(),S)),S}async provideTextContent(i){const S=await this.textBufferFactoryFromResource(i.with({fragment:""}));let s=this.modelService.getModel(i);if(!s){const l=parseInt(i.fragment);let r=0;const p=new A.marked.Renderer;p.code=(g,d)=>{r++;const m=typeof d=="string"&&this.languageService.getLanguageIdByLanguageName(d)||"",b=this.languageService.createById(m),E=this.modelService.createModel(g,b,i.with({fragment:`${r}.${d}`}));return r===l&&(s=E),""};const u=S.create(1).textBuffer,a=u.getLineCount(),n=new D.Range(1,1,a,u.getLineLength(a)+1),h=u.getValueInRange(n,0);(0,A.marked)(h,{renderer:p})}return(0,w.assertIsDefined)(s)}};o=Ee([W(0,t.ITextModelService),W(1,_.ILanguageService),W(2,f.IModelService),W(3,v.IInstantiationService)],o),e.WalkThroughSnippetContentProvider=o}),define(ne[601],re([1,0,174,265,61,378,18,19,836,5]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalkThroughInput=e.WalkThroughModel=void 0;class v extends f.EditorModel{constructor(c,i){super();this.mainRef=c,this.snippetRefs=i}get main(){return this.mainRef}get snippets(){return this.snippetRefs.map(c=>c.object)}dispose(){this.snippetRefs.forEach(c=>c.dispose()),super.dispose()}}e.WalkThroughModel=v;let C=class Ao extends t.EditorInput{constructor(c,i,S){super();this.options=c,this.instantiationService=i,this.textModelResolverService=S,this.promise=null,this.maxTopScroll=0,this.maxBottomScroll=0}get capabilities(){return 8|super.capabilities}get resource(){return this.options.resource}get typeId(){return this.options.typeId}getName(){return this.options.name}getDescription(){return this.options.description||""}getTelemetryFrom(){return this.options.telemetryFrom}getTelemetryDescriptor(){const c=super.getTelemetryDescriptor();return c.target=this.getTelemetryFrom(),c}get onReady(){return this.options.onReady}get layout(){return this.options.layout}resolve(){return this.promise||(this.promise=(0,I.requireToContent)(this.instantiationService,this.options.resource).then(c=>{if(this.resource.path.endsWith(".html"))return new v(c,[]);const i=[];let S=0;const s=new A.marked.Renderer;return s.code=(l,r)=>{S++;const p=this.options.resource.with({scheme:k.Schemas.walkThroughSnippet,fragment:`${S}.${r}`});return i.push(this.textModelResolverService.createModelReference(p)),`<div id="snippet-${p.fragment}" class="walkThroughEditorContainer" ></div>`},c=(0,A.marked)(c,{renderer:s}),Promise.all(i).then(l=>new v(c,l))})),this.promise}matches(c){return super.matches(c)?!0:c instanceof Ao?(0,D.isEqual)(c.options.resource,this.options.resource):!1}dispose(){this.promise&&(this.promise.then(c=>c.dispose()),this.promise=null),super.dispose()}relativeScrollPosition(c,i){this.maxTopScroll=Math.max(this.maxTopScroll,c),this.maxBottomScroll=Math.max(this.maxBottomScroll,i)}};C=Ee([W(1,w.IInstantiationService),W(2,_.ITextModelService)],C),e.WalkThroughInput=C}),define(ne[2252],re([1,0,32]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getExtraColor=void 0;function f(_,A,k){const D=_.getColor(A);if(D)return D;if(_.type==="dark"){const I=_.getColor(t.editorBackground);if(I&&I.getRelativeLuminance()<.004)return k.extra_dark}return k[_.type]}e.getExtraColor=f}),define(ne[837],re([1,0,1842,7]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MANAGE_TRUST_COMMAND_ID=e.WorkspaceTrustContext=void 0,e.WorkspaceTrustContext={IsEnabled:new f.RawContextKey("isWorkspaceTrustEnabled",!1,(0,t.localize)(0,null)),IsTrusted:new f.RawContextKey("isWorkspaceTrusted",!1,(0,t.localize)(1,null))},e.MANAGE_TRUST_COMMAND_ID="workbench.trust.manage"}),define(ne[2253],re([1,0,1845,81,16,310,54,87,130,46]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UninstallShellScriptAction=e.InstallShellScriptAction=void 0;const v={value:(0,t.localize)(0,null),original:"Shell Command"};class C extends _.Action2{constructor(){super({id:"workbench.action.installCommandLine",title:{value:(0,t.localize)(1,null,A.default.applicationName),original:`Install '${A.default.applicationName}' command in PATH`},category:v,f1:!0})}async run(i){const S=i.get(D.INativeHostService),s=i.get(k.IDialogService),l=i.get(w.IProductService);try{await S.installShellCommand(),s.show(f.default.Info,(0,t.localize)(2,null,l.applicationName))}catch(r){s.show(f.default.Error,(0,I.toErrorMessage)(r))}}}e.InstallShellScriptAction=C;class o extends _.Action2{constructor(){super({id:"workbench.action.uninstallCommandLine",title:{value:(0,t.localize)(3,null,A.default.applicationName),original:`Uninstall '${A.default.applicationName}' command from PATH`},category:v,f1:!0})}async run(i){const S=i.get(D.INativeHostService),s=i.get(k.IDialogService),l=i.get(w.IProductService);try{await S.uninstallShellCommand(),s.show(f.default.Info,(0,t.localize)(4,null,l.applicationName))}catch(r){s.show(f.default.Error,(0,I.toErrorMessage)(r))}}}e.UninstallShellScriptAction=o}),define(ne[2254],re([1,0,1848,197,111,14,81,95,31,87,46,207]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeDialogHandler=void 0;let o=class{constructor(i,S,s,l){this.logService=i,this.nativeHostService=S,this.productService=s,this.clipboardService=l}async confirm(i){this.logService.trace("DialogService#confirm",i.message);const{options:S,buttonIndexMap:s}=this.massageMessageBoxOptions(this.getConfirmOptions(i)),l=await this.nativeHostService.showMessageBox(S);return{confirmed:s[l.response]===0,checkboxChecked:l.checkboxChecked}}getConfirmOptions(i){const S=[];i.primaryButton?S.push(i.primaryButton):S.push((0,t.localize)(0,null)),i.secondaryButton?S.push(i.secondaryButton):typeof i.secondaryButton=="undefined"&&S.push((0,t.localize)(1,null));const s={title:i.title,message:i.message,buttons:S,cancelId:1};return i.detail&&(s.detail=i.detail),i.type&&(s.type=i.type),i.checkbox&&(s.checkboxLabel=i.checkbox.label,s.checkboxChecked=i.checkbox.checked),s}async show(i,S,s,l){this.logService.trace("DialogService#show",S);const{options:r,buttonIndexMap:p}=this.massageMessageBoxOptions({message:S,buttons:s,type:i===k.default.Info?"question":i===k.default.Error?"error":i===k.default.Warning?"warning":"none",cancelId:l?l.cancelId:void 0,detail:l?l.detail:void 0,checkboxLabel:l?.checkbox?.label??void 0,checkboxChecked:l?.checkbox?.checked??void 0}),u=await this.nativeHostService.showMessageBox(r);return{choice:p[u.response],checkboxChecked:u.checkboxChecked}}massageMessageBoxOptions(i){let S=(i.buttons||[]).map((r,p)=>p),s=(i.buttons||[]).map(r=>(0,_.mnemonicButtonLabel)(r)),l=i.cancelId;if(A.isLinux&&(s=s.reverse(),S=S.reverse()),i.defaultId=S[0],typeof l=="number"&&(l=S[l],!A.isWindows&&s.length>2&&l!==1)){const r=s[l];s.splice(l,1),s.splice(1,0,r);const p=S[l];S.splice(l,1),S.splice(1,0,p),l=1}return i.buttons=s,i.cancelId=l,i.noLink=!0,i.title=i.title||this.productService.nameLong,{options:i,buttonIndexMap:S}}input(){throw new Error("Unsupported")}async about(){let i=this.productService.version;this.productService.target?i=`${i} (${this.productService.target} setup)`:this.productService.darwinUniversalAssetId&&(i=`${i} (Universal)`);const S=await this.nativeHostService.getOSProperties(),s=h=>(0,t.localize)(2,null,i,this.productService.commit||"Unknown",this.productService.date?`${this.productService.date}${h?" ("+(0,f.fromNow)(new Date(this.productService.date),!0)+")":""}`:"Unknown",C.process.versions.electron,C.process.versions.chrome,C.process.versions.node,C.process.versions.v8,`${S.type} ${S.arch} ${S.release}${A.isLinuxSnap?" snap":""}`),l=s(!0),r=s(!1),p=(0,t.localize)(3,null),u=(0,_.mnemonicButtonLabel)((0,t.localize)(4,null));let a;A.isLinux?a=[u,p]:a=[p,u];const n=await this.nativeHostService.showMessageBox({title:this.productService.nameLong,type:"info",message:this.productService.nameLong,detail:` ${l}`,buttons:a,noLink:!0,defaultId:a.indexOf(p),cancelId:a.indexOf(p)});a[n.response]===u&&this.clipboardService.writeText(r)}};o=Ee([W(0,I.ILogService),W(1,w.INativeHostService),W(2,v.IProductService),W(3,D.IClipboardService)],o),e.NativeDialogHandler=o}),define(ne[217],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressBadge=e.IconBadge=e.TextBadge=e.NumberBadge=e.IActivityService=void 0,e.IActivityService=(0,t.createDecorator)("activityService");class f{constructor(w){this.descriptorFn=w,this.descriptorFn=w}getDescription(){return this.descriptorFn(null)}}class _ extends f{constructor(w,v){super(v);this.number=w,this.number=w}getDescription(){return this.descriptorFn(this.number)}}e.NumberBadge=_;class A extends f{constructor(w,v){super(v);this.text=w}}e.TextBadge=A;class k extends f{constructor(w,v){super(v);this.icon=w}}e.IconBadge=k;class D extends f{}e.ProgressBadge=D}),define(ne[2255],re([1,0,2,125,217,1616,320]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActivityUpdater=void 0;let D=class extends t.Disposable{constructor(w,v){super();this.activityService=w,this.markerService=v,this.activity=this._register(new t.MutableDisposable),this._register(this.markerService.onMarkerChanged(()=>this.updateBadge())),this.updateBadge()}updateBadge(){const{errors:w,warnings:v,infos:C}=this.markerService.getStatistics(),o=w+v+C,c=(0,A.localize)(0,null,o);this.activity.value=this.activityService.showViewActivity(k.default.MARKERS_VIEW_ID,{badge:new _.NumberBadge(o,()=>c)})}};D=Ee([W(0,_.IActivityService),W(1,f.IMarkerService)],D),e.ActivityUpdater=D}),define(ne[295],re([1,0,5,214,27,24,35,8,46,1994]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkbenchAssignmentService=e.IWorkbenchAssignmentService=void 0,e.IWorkbenchAssignmentService=(0,t.createDecorator)("WorkbenchAssignmentService");class v{constructor(i){this.memento=i,this.mementoObj=i.getMemento(0,1)}async getValue(i,S){return await this.mementoObj[i]||S}setValue(i,S){this.mementoObj[i]=S,this.memento.saveMemento()}}class C{constructor(i,S){this.telemetryService=i,this.productService=S}get assignmentContext(){return this._lastAssignmentContext?.split(";")}setSharedProperty(i,S){i===this.productService.tasConfig?.assignmentContextTelemetryPropertyName&&(this._lastAssignmentContext=S),this.telemetryService.setExperimentProperty(i,S)}postEvent(i,S){const s={};for(const[l,r]of S.entries())s[l]=r;this.telemetryService.publicLog(i,s)}}let o=class extends w.BaseAssignmentService{constructor(i,S,s,l){super(()=>i.getTelemetryInfo().then(r=>r.machineId),s,l,new C(i,l),new v(new f.Memento("experiment.service.memento",S)));this.telemetryService=i}get experimentsEnabled(){return this.configurationService.getValue("workbench.enableExperiments")===!0}async getTreatment(i){const S=await super.getTreatment(i);return this.telemetryService.publicLog2("tasClientReadTreatmentComplete",{treatmentName:i,treatmentValue:JSON.stringify(S)}),S}async getCurrentExperiments(){if(!!this.tasClient&&!!this.experimentsEnabled)return await this.tasClient,this.telemetry?.assignmentContext}};o=Ee([W(0,_.ITelemetryService),W(1,A.IStorageService),W(2,D.IConfigurationService),W(3,I.IProductService)],o),e.WorkbenchAssignmentService=o,(0,k.registerSingleton)(e.IWorkbenchAssignmentService,o,!1)}),define(ne[271],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IAuthenticationService=void 0,e.IAuthenticationService=(0,t.createDecorator)("IAuthenticationService")}),define(ne[602],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IBannerService=void 0,e.IBannerService=(0,t.createDecorator)("bannerService")}),define(ne[2256],re([1,0,724,103]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,f.registerSharedProcessRemoteService)(t.IChecksumService,"checksum",{supportsDelayedInstantiation:!0})}),define(ne[2257],re([1,0,95,9,14,35,87,60]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeClipboardService=void 0;let I=class Fn{constructor(v){this.nativeHostService=v}async writeText(v,C){return this.nativeHostService.writeClipboardText(v,C)}async readText(v){return this.nativeHostService.readClipboardText(v)}async readFindText(){return _.isMacintosh?this.nativeHostService.readClipboardFindText():""}async writeFindText(v){if(_.isMacintosh)return this.nativeHostService.writeClipboardFindText(v)}async writeResources(v){if(v.length)return this.nativeHostService.writeClipboardBuffer(Fn.FILE_FORMAT,this.resourcesToBuffer(v))}async readResources(){return this.bufferToResources(await this.nativeHostService.readClipboardBuffer(Fn.FILE_FORMAT))}async hasResources(){return this.nativeHostService.hasClipboard(Fn.FILE_FORMAT)}resourcesToBuffer(v){return D.VSBuffer.fromString(v.map(C=>C.toString()).join(` `)).buffer}bufferToResources(v){if(!v)return[];const C=v.toString();if(!C)return[];try{return C.split(` `).map(o=>f.URI.parse(o))}catch{return[]}}};I.FILE_FORMAT="code/file-list",I=Ee([W(0,k.INativeHostService)],I),e.NativeClipboardService=I,(0,A.registerSingleton)(t.IClipboardService,I,!0)}),define(ne[191],re([1,0,8,5]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TASKS_DEFAULT=e.IWorkbenchConfigurationService=e.USER_STANDALONE_CONFIGURATIONS=e.WORKSPACE_STANDALONE_CONFIGURATIONS=e.LAUNCH_CONFIGURATION_KEY=e.TASKS_CONFIGURATION_KEY=e.FOLDER_SCOPES=e.WORKSPACE_SCOPES=e.REMOTE_MACHINE_SCOPES=e.LOCAL_MACHINE_SCOPES=e.tasksSchemaId=e.launchSchemaId=e.folderSettingsSchemaId=e.workspaceSettingsSchemaId=e.machineSettingsSchemaId=e.userSettingsSchemaId=e.defaultSettingsSchemaId=e.FOLDER_SETTINGS_PATH=e.FOLDER_SETTINGS_NAME=e.FOLDER_CONFIG_FOLDER_NAME=void 0,e.FOLDER_CONFIG_FOLDER_NAME=".vscode",e.FOLDER_SETTINGS_NAME="settings",e.FOLDER_SETTINGS_PATH=`${e.FOLDER_CONFIG_FOLDER_NAME}/${e.FOLDER_SETTINGS_NAME}.json`,e.defaultSettingsSchemaId="vscode://schemas/settings/default",e.userSettingsSchemaId="vscode://schemas/settings/user",e.machineSettingsSchemaId="vscode://schemas/settings/machine",e.workspaceSettingsSchemaId="vscode://schemas/settings/workspace",e.folderSettingsSchemaId="vscode://schemas/settings/folder",e.launchSchemaId="vscode://schemas/launch",e.tasksSchemaId="vscode://schemas/tasks",e.LOCAL_MACHINE_SCOPES=[1,3,4,5],e.REMOTE_MACHINE_SCOPES=[2,3,4,5,6],e.WORKSPACE_SCOPES=[3,4,5,6],e.FOLDER_SCOPES=[4,5,6],e.TASKS_CONFIGURATION_KEY="tasks",e.LAUNCH_CONFIGURATION_KEY="launch",e.WORKSPACE_STANDALONE_CONFIGURATIONS=Object.create(null),e.WORKSPACE_STANDALONE_CONFIGURATIONS[e.TASKS_CONFIGURATION_KEY]=`${e.FOLDER_CONFIG_FOLDER_NAME}/${e.TASKS_CONFIGURATION_KEY}.json`,e.WORKSPACE_STANDALONE_CONFIGURATIONS[e.LAUNCH_CONFIGURATION_KEY]=`${e.FOLDER_CONFIG_FOLDER_NAME}/${e.LAUNCH_CONFIGURATION_KEY}.json`,e.USER_STANDALONE_CONFIGURATIONS=Object.create(null),e.USER_STANDALONE_CONFIGURATIONS[e.TASKS_CONFIGURATION_KEY]=`${e.TASKS_CONFIGURATION_KEY}.json`,e.IWorkbenchConfigurationService=(0,f.refineServiceDecorator)(t.IConfigurationService),e.TASKS_DEFAULT=`{ "version": "2.0.0", "tasks": [] }`}),define(ne[2258],re([1,0,19,60,11]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationCache=void 0;class A{constructor(I,w,v){this.donotCacheResourcesWithSchemes=I,this.fileService=v,this.cachedConfigurations=new Map,this.cacheHome=w.cacheHome}needsCaching(I){return!this.donotCacheResourcesWithSchemes.includes(I.scheme)}read(I){return this.getCachedConfiguration(I).read()}write(I,w){return this.getCachedConfiguration(I).save(w)}remove(I){return this.getCachedConfiguration(I).remove()}getCachedConfiguration({type:I,key:w}){const v=`${I}:${w}`;let C=this.cachedConfigurations.get(v);return C||(C=new k({type:I,key:w},this.cacheHome,this.fileService),this.cachedConfigurations.set(v,C)),C}}e.ConfigurationCache=A;class k{constructor({type:I,key:w},v,C){this.fileService=C,this.cachedConfigurationFolderResource=(0,t.joinPath)(v,"CachedConfigurations",I,w),this.cachedConfigurationFileResource=(0,t.joinPath)(this.cachedConfigurationFolderResource,I==="workspaces"?"workspace.json":"configuration.json"),this.queue=new _.Queue}async read(){try{return(await this.fileService.readFile(this.cachedConfigurationFileResource)).value.toString()}catch{return""}}async save(I){await this.createCachedFolder()&&await this.queue.queue(async()=>{await this.fileService.writeFile(this.cachedConfigurationFileResource,f.VSBuffer.fromString(I))})}async remove(){try{await this.queue.queue(()=>this.fileService.del(this.cachedConfigurationFolderResource,{recursive:!0,useTrash:!1}))}catch(I){if(I.fileOperationResult!==1)throw I}}async createCachedFolder(){if(await this.fileService.exists(this.cachedConfigurationFolderResource))return!0;try{return await this.fileService.createFolder(this.cachedConfigurationFolderResource),!0}catch{return!1}}}}),define(ne[838],re([1,0,51,8,468,13,15]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Configuration=e.StandaloneConfigurationModelParser=e.WorkspaceConfigurationModelParser=void 0;class D extends _.ConfigurationModelParser{constructor(C){super(C);this._folders=[],this._transient=!1,this._settingsModelParser=new _.ConfigurationModelParser(C),this._launchModel=new _.ConfigurationModel,this._tasksModel=new _.ConfigurationModel}get folders(){return this._folders}get transient(){return this._transient}get settingsModel(){return this._settingsModelParser.configurationModel}get launchModel(){return this._launchModel}get tasksModel(){return this._tasksModel}reparseWorkspaceSettings(C){this._settingsModelParser.reparse(C)}getRestrictedWorkspaceSettings(){return this._settingsModelParser.restrictedConfigurations}doParseRaw(C,o){return this._folders=C.folders||[],this._transient=(0,A.isBoolean)(C.transient)&&C.transient,this._settingsModelParser.parseRaw(C.settings,o),this._launchModel=this.createConfigurationModelFrom(C,"launch"),this._tasksModel=this.createConfigurationModelFrom(C,"tasks"),super.doParseRaw(C,o)}createConfigurationModelFrom(C,o){const c=C[o];if(c){const i=(0,f.toValuesTree)(c,l=>console.error(`Conflict in settings file ${this._name}: ${l}`)),S=Object.create(null);S[o]=i;const s=Object.keys(c).map(l=>`${o}.${l}`);return new _.ConfigurationModel(S,s,[])}return new _.ConfigurationModel}}e.WorkspaceConfigurationModelParser=D;class I extends _.ConfigurationModelParser{constructor(C,o){super(C);this.scope=o}doParseRaw(C,o){const c=(0,f.toValuesTree)(C,s=>console.error(`Conflict in settings file ${this._name}: ${s}`)),i=Object.create(null);i[this.scope]=c;const S=Object.keys(C).map(s=>`${this.scope}.${s}`);return{contents:i,keys:S,overrides:[]}}}e.StandaloneConfigurationModelParser=I;class w extends _.Configuration{constructor(C,o,c,i,S,s,l,r){super(C,o,c,i,S,s,l);this._workspace=r}getValue(C,o={}){return super.getValue(C,o,this._workspace)}inspect(C,o={}){return super.inspect(C,o,this._workspace)}keys(){return super.keys(this._workspace)}compareAndDeleteFolderConfiguration(C){return this._workspace&&this._workspace.folders.length>0&&this._workspace.folders[0].uri.toString()===C.toString()?{keys:[],overrides:[]}:super.compareAndDeleteFolderConfiguration(C)}compare(C){const o=(s,l,r)=>{const p=[];return p.push(...l.filter(u=>s.indexOf(u)===-1)),p.push(...s.filter(u=>l.indexOf(u)===-1)),p.push(...s.filter(u=>l.indexOf(u)===-1?!1:(0,t.equals)(this.getValue(u,{overrideIdentifier:r}),C.getValue(u,{overrideIdentifier:r}))?this._workspace&&this._workspace.folders.some(a=>!(0,t.equals)(this.getValue(u,{resource:a.uri,overrideIdentifier:r}),C.getValue(u,{resource:a.uri,overrideIdentifier:r}))):!0)),p},c=o(this.allKeys(),C.allKeys()),i=[],S=(0,k.distinct)([...this.allOverrideIdentifiers(),...C.allOverrideIdentifiers()]);for(const s of S){const l=o(this.getAllKeysForOverrideIdentifier(s),C.getAllKeysForOverrideIdentifier(s),s);l.length&&i.push([s,l])}return{keys:c,overrides:i}}}e.Configuration=w}),define(ne[2259],re([1,0,6,22,2,11,23,468,838,191,57,51,116,19,17,13]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FolderConfiguration=e.WorkspaceConfiguration=e.RemoteUserConfiguration=e.UserConfiguration=e.DefaultConfiguration=void 0;class s extends _.Disposable{constructor(E,y){super();this.configurationCache=E,this.configurationRegistry=i.Registry.as(v.Extensions.Configuration),this.cachedConfigurationDefaultsOverrides={},this.cacheKey={type:"defaults",key:"configurationDefaultsOverrides"},this._onDidChangeConfiguration=this._register(new t.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this.updateCache=!1,y.options?.configurationDefaults&&this.configurationRegistry.registerDefaultConfigurations([{overrides:y.options.configurationDefaults}])}get configurationModel(){return this._configurationModel||(this._configurationModel=new D.DefaultConfigurationModel(this.cachedConfigurationDefaultsOverrides)),this._configurationModel}async initialize(){return await this.initializeCachedConfigurationDefaultsOverrides(),this._configurationModel=void 0,this._register(this.configurationRegistry.onDidUpdateConfiguration(({properties:E,defaultsOverrides:y})=>this.onDidUpdateConfiguration(E,y))),this.configurationModel}reload(){return this.updateCache=!0,this.cachedConfigurationDefaultsOverrides={},this._configurationModel=void 0,this.updateCachedConfigurationDefaultsOverrides(),this.configurationModel}initializeCachedConfigurationDefaultsOverrides(){return this.initiaizeCachedConfigurationDefaultsOverridesPromise||(this.initiaizeCachedConfigurationDefaultsOverridesPromise=(async()=>{try{if(window.localStorage.getItem(s.DEFAULT_OVERRIDES_CACHE_EXISTS_KEY)){const E=await this.configurationCache.read(this.cacheKey);E&&(this.cachedConfigurationDefaultsOverrides=JSON.parse(E))}}catch{}this.cachedConfigurationDefaultsOverrides=(0,S.isObject)(this.cachedConfigurationDefaultsOverrides)?this.cachedConfigurationDefaultsOverrides:{}})()),this.initiaizeCachedConfigurationDefaultsOverridesPromise}onDidUpdateConfiguration(E,y){this._configurationModel=void 0,this._onDidChangeConfiguration.fire({defaults:this.configurationModel,properties:E}),y&&this.updateCachedConfigurationDefaultsOverrides()}async updateCachedConfigurationDefaultsOverrides(){if(!this.updateCache)return;const E={},y=this.configurationRegistry.getConfigurationDefaultsOverrides();for(const[T,R]of y)!v.OVERRIDE_PROPERTY_REGEX.test(T)&&R.value!==void 0&&(E[T]=R.value);try{Object.keys(E).length?(window.localStorage.setItem(s.DEFAULT_OVERRIDES_CACHE_EXISTS_KEY,"yes"),await this.configurationCache.write(this.cacheKey,JSON.stringify(E))):(window.localStorage.removeItem(s.DEFAULT_OVERRIDES_CACHE_EXISTS_KEY),await this.configurationCache.remove(this.cacheKey))}catch{}}}e.DefaultConfiguration=s,s.DEFAULT_OVERRIDES_CACHE_EXISTS_KEY="DefaultOverridesCacheExists";class l extends _.Disposable{constructor(E,y,T,R,O){super();this.userSettingsResource=E,this.fileService=T,this.uriIdentityService=R,this.logService=O,this._onDidChangeConfiguration=this._register(new t.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this.userConfiguration=this._register(new _.MutableDisposable),this.configurationParseOptions={scopes:y,skipRestricted:!1},this.userConfiguration.value=new D.UserSettings(this.userSettingsResource,y,R.extUri,this.fileService),this._register(this.userConfiguration.value.onDidChange(()=>this.reloadConfigurationScheduler.schedule())),this.reloadConfigurationScheduler=this._register(new A.RunOnceScheduler(()=>this.reload().then(x=>this._onDidChangeConfiguration.fire(x)),50))}get hasTasksLoaded(){return this.userConfiguration.value instanceof r}async initialize(){return this.userConfiguration.value.loadConfiguration()}async reload(){if(this.hasTasksLoaded)return this.userConfiguration.value.loadConfiguration();const E=this.uriIdentityService.extUri.dirname(this.userSettingsResource),y=[w.TASKS_CONFIGURATION_KEY].map(O=>[O,this.uriIdentityService.extUri.joinPath(E,`${O}.json`)]),T=new r(E.toString(),this.userSettingsResource,y,this.configurationParseOptions,this.fileService,this.uriIdentityService,this.logService),R=await T.loadConfiguration();return this.userConfiguration.value=T,this.userConfiguration.value&&this._register(this.userConfiguration.value.onDidChange(()=>this.reloadConfigurationScheduler.schedule())),R}reparse(){return this.userConfiguration.value.reparse(this.configurationParseOptions)}getRestrictedSettings(){return this.userConfiguration.value.getRestrictedSettings()}}e.UserConfiguration=l;class r extends _.Disposable{constructor(E,y,T,R,O,x,F){super();this.settingsResource=y,this.standAloneConfigurationResources=T,this.fileService=O,this.uriIdentityService=x,this.logService=F,this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this.allResources=[this.settingsResource,...this.standAloneConfigurationResources.map(([,L])=>L)],this._register((0,_.combinedDisposable)(...this.allResources.map(L=>(0,_.combinedDisposable)(this.fileService.watch(x.extUri.dirname(L)),this.fileService.watch(L))))),this._folderSettingsModelParser=new D.ConfigurationModelParser(E),this._folderSettingsParseOptions=R,this._standAloneConfigurations=[],this._cache=new D.ConfigurationModel,this._register(t.Event.debounce(t.Event.any(t.Event.filter(this.fileService.onDidFilesChange,L=>this.handleFileChangesEvent(L)),t.Event.filter(this.fileService.onDidRunOperation,L=>this.handleFileOperationEvent(L))),()=>{},100)(()=>this._onDidChange.fire()))}async resolveContents(){const E=async R=>Promise.all(R.map(async O=>{try{return(await this.fileService.readFile(O)).value.toString()}catch(x){this.logService.trace(`Error while resolving configuration file '${O.toString()}': ${f.getErrorMessage(x)}`),x.fileOperationResult!==1&&x.fileOperationResult!==10&&this.logService.error(x)}return"{}"})),[[y],T]=await Promise.all([E([this.settingsResource]),E(this.standAloneConfigurationResources.map(([,R])=>R))]);return[y,T.map((R,O)=>[this.standAloneConfigurationResources[O][0],R])]}async loadConfiguration(){const[E,y]=await this.resolveContents();this._standAloneConfigurations=[],this._folderSettingsModelParser.parse("",this._folderSettingsParseOptions),E!==void 0&&this._folderSettingsModelParser.parse(E,this._folderSettingsParseOptions);for(let T=0;T<y.length;T++){const R=y[T][1];if(R!==void 0){const O=new I.StandaloneConfigurationModelParser(this.standAloneConfigurationResources[T][1].toString(),this.standAloneConfigurationResources[T][0]);O.parse(R),this._standAloneConfigurations.push(O.configurationModel)}}return this.consolidate(),this._cache}getRestrictedSettings(){return this._folderSettingsModelParser.restrictedConfigurations}reparse(E){const y=this._folderSettingsModelParser.configurationModel.contents;return this._folderSettingsParseOptions=E,this._folderSettingsModelParser.reparse(this._folderSettingsParseOptions),(0,C.equals)(y,this._folderSettingsModelParser.configurationModel.contents)||this.consolidate(),this._cache}consolidate(){this._cache=this._folderSettingsModelParser.configurationModel.merge(...this._standAloneConfigurations)}handleFileChangesEvent(E){return!!(this.allResources.some(y=>E.contains(y))||this.allResources.some(y=>E.contains(this.uriIdentityService.extUri.dirname(y),2)))}handleFileOperationEvent(E){return!!((E.isOperation(0)||E.isOperation(3)||E.isOperation(1)||E.isOperation(4))&&this.allResources.some(y=>this.uriIdentityService.extUri.isEqual(E.resource,y))||E.isOperation(1)&&this.allResources.some(y=>this.uriIdentityService.extUri.isEqual(E.resource,this.uriIdentityService.extUri.dirname(y))))}}class p extends _.Disposable{constructor(E,y,T,R,O){super();this._userConfigurationInitializationPromise=null,this._onDidChangeConfiguration=this._register(new t.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidInitialize=this._register(new t.Emitter),this.onDidInitialize=this._onDidInitialize.event,this._fileService=T,this._userConfiguration=this._cachedConfiguration=new a(E,y,{scopes:w.REMOTE_MACHINE_SCOPES}),O.getEnvironment().then(async x=>{if(x){const F=this._register(new u(x.settingsPath,{scopes:w.REMOTE_MACHINE_SCOPES},this._fileService,R));this._register(F.onDidChangeConfiguration(M=>this.onDidUserConfigurationChange(M))),this._userConfigurationInitializationPromise=F.initialize();const L=await this._userConfigurationInitializationPromise;this._userConfiguration.dispose(),this._userConfiguration=F,this.onDidUserConfigurationChange(L),this._onDidInitialize.fire(L)}})}async initialize(){if(this._userConfiguration instanceof u)return this._userConfiguration.initialize();let E=await this._userConfiguration.initialize();return this._userConfigurationInitializationPromise&&(E=await this._userConfigurationInitializationPromise,this._userConfigurationInitializationPromise=null),E}reload(){return this._userConfiguration.reload()}reparse(){return this._userConfiguration.reparse({scopes:w.REMOTE_MACHINE_SCOPES})}getRestrictedSettings(){return this._userConfiguration.getRestrictedSettings()}onDidUserConfigurationChange(E){this.updateCache(),this._onDidChangeConfiguration.fire(E)}async updateCache(){if(this._userConfiguration instanceof u){let E;try{E=await this._userConfiguration.resolveContent()}catch(y){if(y.fileOperationResult!==1)return}await this._cachedConfiguration.updateConfiguration(E)}}}e.RemoteUserConfiguration=p;class u extends _.Disposable{constructor(E,y,T,R){super();this.configurationResource=E,this.fileService=T,this.uriIdentityService=R,this._onDidChangeConfiguration=this._register(new t.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this.fileWatcherDisposable=_.Disposable.None,this.directoryWatcherDisposable=_.Disposable.None,this.parser=new D.ConfigurationModelParser(this.configurationResource.toString()),this.parseOptions=y,this._register(T.onDidFilesChange(O=>this.handleFileChangesEvent(O))),this._register(T.onDidRunOperation(O=>this.handleFileOperationEvent(O))),this.reloadConfigurationScheduler=this._register(new A.RunOnceScheduler(()=>this.reload().then(O=>this._onDidChangeConfiguration.fire(O)),50)),this._register((0,_.toDisposable)(()=>{this.stopWatchingResource(),this.stopWatchingDirectory()}))}watchResource(){this.fileWatcherDisposable=this.fileService.watch(this.configurationResource)}stopWatchingResource(){this.fileWatcherDisposable.dispose(),this.fileWatcherDisposable=_.Disposable.None}watchDirectory(){const E=this.uriIdentityService.extUri.dirname(this.configurationResource);this.directoryWatcherDisposable=this.fileService.watch(E)}stopWatchingDirectory(){this.directoryWatcherDisposable.dispose(),this.directoryWatcherDisposable=_.Disposable.None}async initialize(){const E=await this.fileService.exists(this.configurationResource);return this.onResourceExists(E),this.reload()}async resolveContent(){return(await this.fileService.readFile(this.configurationResource)).value.toString()}async reload(){try{const E=await this.resolveContent();return this.parser.parse(E,this.parseOptions),this.parser.configurationModel}catch{return new D.ConfigurationModel}}reparse(E){return this.parseOptions=E,this.parser.reparse(this.parseOptions),this.parser.configurationModel}getRestrictedSettings(){return this.parser.restrictedConfigurations}handleFileChangesEvent(E){let y=E.contains(this.configurationResource,0);E.contains(this.configurationResource,1)?(y=!0,this.onResourceExists(!0)):E.contains(this.configurationResource,2)&&(y=!0,this.onResourceExists(!1)),y&&this.reloadConfigurationScheduler.schedule()}handleFileOperationEvent(E){(E.isOperation(0)||E.isOperation(3)||E.isOperation(1)||E.isOperation(4))&&this.uriIdentityService.extUri.isEqual(E.resource,this.configurationResource)&&this.reloadConfigurationScheduler.schedule()}onResourceExists(E){E?(this.stopWatchingDirectory(),this.watchResource()):(this.stopWatchingResource(),this.watchDirectory())}}class a extends _.Disposable{constructor(E,y,T){super();this.configurationCache=y,this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this.key={type:"user",key:E},this.parser=new D.ConfigurationModelParser("CachedRemoteUserConfiguration"),this.parseOptions=T,this.configurationModel=new D.ConfigurationModel}getConfigurationModel(){return this.configurationModel}initialize(){return this.reload()}reparse(E){return this.parseOptions=E,this.parser.reparse(this.parseOptions),this.configurationModel=this.parser.configurationModel,this.configurationModel}getRestrictedSettings(){return this.parser.restrictedConfigurations}async reload(){try{const E=await this.configurationCache.read(this.key),y=JSON.parse(E);y.content&&(this.parser.parse(y.content,this.parseOptions),this.configurationModel=this.parser.configurationModel)}catch{}return this.configurationModel}async updateConfiguration(E){return E?this.configurationCache.write(this.key,JSON.stringify({content:E})):this.configurationCache.remove(this.key)}}class n extends _.Disposable{constructor(E,y,T,R){super();this.configurationCache=E,this.fileService=y,this.uriIdentityService=T,this.logService=R,this._workspaceConfigurationDisposables=this._register(new _.DisposableStore),this._workspaceIdentifier=null,this._isWorkspaceTrusted=!1,this._onDidUpdateConfiguration=this._register(new t.Emitter),this.onDidUpdateConfiguration=this._onDidUpdateConfiguration.event,this._initialized=!1,this.fileService=y,this._workspaceConfiguration=this._cachedConfiguration=new g(E)}get initialized(){return this._initialized}async initialize(E,y){this._workspaceIdentifier=E,this._isWorkspaceTrusted=y,this._initialized||(this.configurationCache.needsCaching(this._workspaceIdentifier.configPath)?(this._workspaceConfiguration=this._cachedConfiguration,this.waitAndInitialize(this._workspaceIdentifier)):this.doInitialize(new h(this.fileService,this.uriIdentityService,this.logService))),await this.reload()}async reload(){this._workspaceIdentifier&&await this._workspaceConfiguration.load(this._workspaceIdentifier,{scopes:w.WORKSPACE_SCOPES,skipRestricted:this.isUntrusted()})}getFolders(){return this._workspaceConfiguration.getFolders()}setFolders(E,y){return this._workspaceIdentifier?y.write(this._workspaceIdentifier.configPath,[{path:["folders"],value:E}],!0).then(()=>this.reload()):Promise.resolve()}isTransient(){return this._workspaceConfiguration.isTransient()}getConfiguration(){return this._workspaceConfiguration.getWorkspaceSettings()}updateWorkspaceTrust(E){return this._isWorkspaceTrusted=E,this.reparseWorkspaceSettings()}reparseWorkspaceSettings(){return this._workspaceConfiguration.reparseWorkspaceSettings({scopes:w.WORKSPACE_SCOPES,skipRestricted:this.isUntrusted()}),this.getConfiguration()}getRestrictedSettings(){return this._workspaceConfiguration.getRestrictedSettings()}async waitAndInitialize(E){if(await(0,k.whenProviderRegistered)(E.configPath,this.fileService),!(this._workspaceConfiguration instanceof h)){const y=this._register(new h(this.fileService,this.uriIdentityService,this.logService));await y.load(E,{scopes:w.WORKSPACE_SCOPES,skipRestricted:this.isUntrusted()}),this.doInitialize(y),this.onDidWorkspaceConfigurationChange(!1,!0)}}doInitialize(E){this._workspaceConfigurationDisposables.clear(),this._workspaceConfiguration=this._workspaceConfigurationDisposables.add(E),this._workspaceConfigurationDisposables.add(this._workspaceConfiguration.onDidChange(y=>this.onDidWorkspaceConfigurationChange(!0,!1))),this._initialized=!0}isUntrusted(){return!this._isWorkspaceTrusted}async onDidWorkspaceConfigurationChange(E,y){E&&await this.reload(),this.updateCache(),this._onDidUpdateConfiguration.fire(y)}async updateCache(){if(this._workspaceIdentifier&&this.configurationCache.needsCaching(this._workspaceIdentifier.configPath)&&this._workspaceConfiguration instanceof h){const E=await this._workspaceConfiguration.resolveContent(this._workspaceIdentifier);await this._cachedConfiguration.updateWorkspace(this._workspaceIdentifier,E)}}}e.WorkspaceConfiguration=n;class h extends _.Disposable{constructor(E,y,T){super();this.fileService=E,this.logService=T,this._workspaceIdentifier=null,this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this.workspaceConfigurationModelParser=new I.WorkspaceConfigurationModelParser(""),this.workspaceSettings=new D.ConfigurationModel,this._register(t.Event.any(t.Event.filter(this.fileService.onDidFilesChange,R=>!!this._workspaceIdentifier&&R.contains(this._workspaceIdentifier.configPath)),t.Event.filter(this.fileService.onDidRunOperation,R=>!!this._workspaceIdentifier&&(R.isOperation(0)||R.isOperation(3)||R.isOperation(1)||R.isOperation(4))&&y.extUri.isEqual(R.resource,this._workspaceIdentifier.configPath)))(()=>this.reloadConfigurationScheduler.schedule())),this.reloadConfigurationScheduler=this._register(new A.RunOnceScheduler(()=>this._onDidChange.fire(),50)),this.workspaceConfigWatcher=this._register(this.watchWorkspaceConfigurationFile())}get workspaceIdentifier(){return this._workspaceIdentifier}async resolveContent(E){return(await this.fileService.readFile(E.configPath)).value.toString()}async load(E,y){(!this._workspaceIdentifier||this._workspaceIdentifier.id!==E.id)&&(this._workspaceIdentifier=E,this.workspaceConfigurationModelParser=new I.WorkspaceConfigurationModelParser(this._workspaceIdentifier.id),(0,_.dispose)(this.workspaceConfigWatcher),this.workspaceConfigWatcher=this._register(this.watchWorkspaceConfigurationFile()));let T="";try{T=await this.resolveContent(this._workspaceIdentifier)}catch(R){await this.fileService.exists(this._workspaceIdentifier.configPath)&&this.logService.error(R)}this.workspaceConfigurationModelParser.parse(T,y),this.consolidate()}getConfigurationModel(){return this.workspaceConfigurationModelParser.configurationModel}getFolders(){return this.workspaceConfigurationModelParser.folders}isTransient(){return this.workspaceConfigurationModelParser.transient}getWorkspaceSettings(){return this.workspaceSettings}reparseWorkspaceSettings(E){return this.workspaceConfigurationModelParser.reparseWorkspaceSettings(E),this.consolidate(),this.getWorkspaceSettings()}getRestrictedSettings(){return this.workspaceConfigurationModelParser.getRestrictedWorkspaceSettings()}consolidate(){this.workspaceSettings=this.workspaceConfigurationModelParser.settingsModel.merge(this.workspaceConfigurationModelParser.launchModel,this.workspaceConfigurationModelParser.tasksModel)}watchWorkspaceConfigurationFile(){return this._workspaceIdentifier?this.fileService.watch(this._workspaceIdentifier.configPath):_.Disposable.None}}class g{constructor(E){this.configurationCache=E,this.onDidChange=t.Event.None,this.workspaceConfigurationModelParser=new I.WorkspaceConfigurationModelParser(""),this.workspaceSettings=new D.ConfigurationModel}async load(E,y){try{const T=this.getKey(E),R=await this.configurationCache.read(T),O=JSON.parse(R);O.content&&(this.workspaceConfigurationModelParser=new I.WorkspaceConfigurationModelParser(T.key),this.workspaceConfigurationModelParser.parse(O.content,y),this.consolidate())}catch{}}get workspaceIdentifier(){return null}getConfigurationModel(){return this.workspaceConfigurationModelParser.configurationModel}getFolders(){return this.workspaceConfigurationModelParser.folders}isTransient(){return this.workspaceConfigurationModelParser.transient}getWorkspaceSettings(){return this.workspaceSettings}reparseWorkspaceSettings(E){return this.workspaceConfigurationModelParser.reparseWorkspaceSettings(E),this.consolidate(),this.getWorkspaceSettings()}getRestrictedSettings(){return this.workspaceConfigurationModelParser.getRestrictedWorkspaceSettings()}consolidate(){this.workspaceSettings=this.workspaceConfigurationModelParser.settingsModel.merge(this.workspaceConfigurationModelParser.launchModel,this.workspaceConfigurationModelParser.tasksModel)}async updateWorkspace(E,y){try{const T=this.getKey(E);y?await this.configurationCache.write(T,JSON.stringify({content:y})):await this.configurationCache.remove(T)}catch{}}getKey(E){return{type:"workspaces",key:E.id}}}class d{constructor(E,y,T,R){this.configurationCache=R,this.onDidChange=t.Event.None,this.key={type:"folder",key:(0,o.hash)((0,c.joinPath)(E,y).toString()).toString(16)},this._folderSettingsModelParser=new D.ConfigurationModelParser("CachedFolderConfiguration"),this._folderSettingsParseOptions=T,this._standAloneConfigurations=[],this.configurationModel=new D.ConfigurationModel}async loadConfiguration(){try{const E=await this.configurationCache.read(this.key),{content:y}=JSON.parse(E.toString());if(y)for(const T of Object.keys(y))if(T===w.FOLDER_SETTINGS_NAME)this._folderSettingsModelParser.parse(y[T],this._folderSettingsParseOptions);else{const R=new I.StandaloneConfigurationModelParser(T,T);R.parse(y[T]),this._standAloneConfigurations.push(R.configurationModel)}this.consolidate()}catch{}return this.configurationModel}async updateConfiguration(E,y){const T={};E&&(T[w.FOLDER_SETTINGS_NAME]=E),y.forEach(([R,O])=>{O&&(T[R]=O)}),Object.keys(T).length?await this.configurationCache.write(this.key,JSON.stringify({content:T})):await this.configurationCache.remove(this.key)}getRestrictedSettings(){return this._folderSettingsModelParser.restrictedConfigurations}reparse(E){return this._folderSettingsParseOptions=E,this._folderSettingsModelParser.reparse(this._folderSettingsParseOptions),this.consolidate(),this.configurationModel}consolidate(){this.configurationModel=this._folderSettingsModelParser.configurationModel.merge(...this._standAloneConfigurations)}getUnsupportedKeys(){return[]}}class m extends _.Disposable{constructor(E,y,T,R,O,x,F,L,M){super();this.workspaceFolder=y,this.workbenchState=R,this.workspaceTrusted=O,this.configurationCache=M,this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this.scopes=this.workbenchState===3?w.FOLDER_SCOPES:w.WORKSPACE_SCOPES,this.configurationFolder=F.extUri.joinPath(y.uri,T),this.cachedFolderConfiguration=new d(y.uri,T,{scopes:this.scopes,skipRestricted:this.isUntrusted()},M),E&&this.configurationCache.needsCaching(y.uri)?(this.folderConfiguration=this.cachedFolderConfiguration,(0,k.whenProviderRegistered)(y.uri,x).then(()=>{this.folderConfiguration=this._register(this.createFileServiceBasedConfiguration(x,F,L)),this._register(this.folderConfiguration.onDidChange(N=>this.onDidFolderConfigurationChange())),this.onDidFolderConfigurationChange()})):(this.folderConfiguration=this._register(this.createFileServiceBasedConfiguration(x,F,L)),this._register(this.folderConfiguration.onDidChange(N=>this.onDidFolderConfigurationChange())))}loadConfiguration(){return this.folderConfiguration.loadConfiguration()}updateWorkspaceTrust(E){return this.workspaceTrusted=E,this.reparse()}reparse(){const E=this.folderConfiguration.reparse({scopes:this.scopes,skipRestricted:this.isUntrusted()});return this.updateCache(),E}getRestrictedSettings(){return this.folderConfiguration.getRestrictedSettings()}isUntrusted(){return!this.workspaceTrusted}onDidFolderConfigurationChange(){this.updateCache(),this._onDidChange.fire()}createFileServiceBasedConfiguration(E,y,T){const R=y.extUri.joinPath(this.configurationFolder,`${w.FOLDER_SETTINGS_NAME}.json`),O=[w.TASKS_CONFIGURATION_KEY,w.LAUNCH_CONFIGURATION_KEY].map(x=>[x,y.extUri.joinPath(this.configurationFolder,`${x}.json`)]);return new r(this.configurationFolder.toString(),R,O,{scopes:this.scopes,skipRestricted:this.isUntrusted()},E,y,T)}async updateCache(){if(this.configurationCache.needsCaching(this.configurationFolder)&&this.folderConfiguration instanceof r){const[E,y]=await this.folderConfiguration.resolveContents();this.cachedFolderConfiguration.updateConfiguration(E,y)}}}e.FolderConfiguration=m}),define(ne[272],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JSONEditingError=e.JSONEditingErrorCode=e.IJSONEditingService=void 0,e.IJSONEditingService=(0,t.createDecorator)("jsonEditingService");var f;(function(A){A[A.ERROR_FILE_DIRTY=0]="ERROR_FILE_DIRTY",A[A.ERROR_INVALID_FILE=1]="ERROR_INVALID_FILE"})(f=e.JSONEditingErrorCode||(e.JSONEditingErrorCode={}));class _ extends Error{constructor(k,D){super(k);this.code=D}}e.JSONEditingError=_}),define(ne[218],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IConfigurationResolverService=void 0,e.IConfigurationResolverService=(0,t.createDecorator)("configurationResolverService")}),define(ne[839],re([1,0,1856]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.inputsSchema=void 0;const f=t.localize(0,null),_=t.localize(1,null),A=t.localize(2,null),k=t.localize(3,null);e.inputsSchema={definitions:{inputs:{type:"array",description:t.localize(4,null),items:{oneOf:[{type:"object",required:["id","type","description"],additionalProperties:!1,properties:{id:{type:"string",description:f},type:{type:"string",description:_,enum:["promptString"],enumDescriptions:[t.localize(5,null)]},description:{type:"string",description:A},default:{type:"string",description:k},password:{type:"boolean",description:t.localize(6,null)}}},{type:"object",required:["id","type","description","options"],additionalProperties:!1,properties:{id:{type:"string",description:f},type:{type:"string",description:_,enum:["pickString"],enumDescriptions:[t.localize(7,null)]},description:{type:"string",description:A},default:{type:"string",description:k},options:{type:"array",description:t.localize(8,null),items:{oneOf:[{type:"string"},{type:"object",required:["value"],additionalProperties:!1,properties:{label:{type:"string",description:t.localize(9,null)},value:{type:"string",description:t.localize(10,null)}}}]}}}},{type:"object",required:["id","type","command"],additionalProperties:!1,properties:{id:{type:"string",description:f},type:{type:"string",description:_,enum:["command"],enumDescriptions:[t.localize(11,null)]},command:{type:"string",description:t.localize(12,null)},args:{oneOf:[{type:"object",description:t.localize(13,null)},{type:"array",description:t.localize(14,null)},{type:"string",description:t.localize(15,null)}]}}}]}}}}}),define(ne[840],re([1,0,1857]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.applyDeprecatedVariableMessage=void 0;function f(_){_.pattern=_.pattern||"^(?!.*\\$\\{(env|config|command)\\.)",_.patternErrorMessage=_.patternErrorMessage||t.localize(0,null)}e.applyDeprecatedVariableMessage=f}),define(ne[841],re([1,0,48,196,13,51,14,111,1858]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractVariableResolverService=void 0;class w{constructor(C,o,c,i){this._contributedVariables=new Map,this._context=C,this._labelService=o,this._userHomePromise=c,i&&(this._envVariablesPromise=i.then(S=>this.prepareEnv(S)))}prepareEnv(C){if(k.isWindows){const o=Object.create(null);return Object.keys(C).forEach(c=>{o[c.toLowerCase()]=C[c]}),o}return C}resolveWithEnvironment(C,o,c){return this.recursiveResolve({env:this.prepareEnv(C),userHome:void 0},o?o.uri:void 0,c)}async resolveAsync(C,o){const c={env:await this._envVariablesPromise,userHome:await this._userHomePromise};return this.recursiveResolve(c,C?C.uri:void 0,o)}async resolveAnyBase(C,o,c,i){const S=A.deepClone(o);k.isWindows&&S.windows?Object.keys(S.windows).forEach(l=>S[l]=S.windows[l]):k.isMacintosh&&S.osx?Object.keys(S.osx).forEach(l=>S[l]=S.osx[l]):k.isLinux&&S.linux&&Object.keys(S.linux).forEach(l=>S[l]=S.linux[l]),delete S.windows,delete S.osx,delete S.linux;const s={env:await this._envVariablesPromise,userHome:await this._userHomePromise};return this.recursiveResolve(s,C?C.uri:void 0,S,c,i)}async resolveAnyAsync(C,o,c){return this.resolveAnyBase(C,o,c)}async resolveAnyMap(C,o,c){const i=new Map;return{newConfig:await this.resolveAnyBase(C,o,c,i),resolvedVariables:i}}resolveWithInteractionReplace(C,o,c,i){throw new Error("resolveWithInteractionReplace not implemented.")}resolveWithInteraction(C,o,c,i){throw new Error("resolveWithInteraction not implemented.")}contributeVariable(C,o){if(this._contributedVariables.has(C))throw new Error("Variable "+C+" is contributed twice.");this._contributedVariables.set(C,o)}recursiveResolve(C,o,c,i,S){if(_.isString(c))return this.resolveString(C,o,c,i,S);if(_.isArray(c))return c.map(s=>this.recursiveResolve(C,o,s,i,S));if(_.isObject(c)){let s=Object.create(null);return Object.keys(c).forEach(l=>{const r=this.resolveString(C,o,l,i,S);s[r]=this.recursiveResolve(C,o,c[l],i,S)}),s}return c}resolveString(C,o,c,i,S){return c.replace(w.VARIABLE_REGEXP,(l,r)=>{if(r.includes(w.VARIABLE_LHS))return l;let p=this.evaluateSingleVariable(C,l,r,o,i);return S&&S.set(r,p),p!==l&&_.isString(p)&&p.match(w.VARIABLE_REGEXP)&&(p=this.resolveString(C,o,p,i,S)),p})}fsPath(C){return this._labelService?this._labelService.getUriLabel(C,{noPrefix:!0}):C.fsPath}evaluateSingleVariable(C,o,c,i,S){let s;const l=c.split(":");l.length>1&&(c=l[0],s=l[1]);const r=()=>{const a=this._context.getFilePath();if(a)return a;throw new Error((0,I.localize)(0,null,o))},p=()=>{const a=r();if(this._context.getWorkspaceFolderPathForFile){const n=this._context.getWorkspaceFolderPathForFile();if(n)return n}throw new Error((0,I.localize)(1,null,o,t.basename(a)))},u=()=>{if(s){const a=this._context.getFolderUri(s);if(a)return a;throw new Error((0,I.localize)(2,null,o,s))}if(i)return i;throw this._context.getWorkspaceFolderCount()>1?new Error((0,I.localize)(3,null,o)):new Error((0,I.localize)(4,null,o))};switch(c){case"env":if(s){if(C.env){const a=C.env[k.isWindows?s.toLowerCase():s];if(_.isString(a))return a}return""}throw new Error((0,I.localize)(5,null,o));case"config":if(s){const a=this._context.getConfigurationValue(i,s);if(_.isUndefinedOrNull(a))throw new Error((0,I.localize)(6,null,o,s));if(_.isObject(a))throw new Error((0,I.localize)(7,null,o,s));return a}throw new Error((0,I.localize)(8,null,o));case"command":return this.resolveFromMap(o,s,S,"command");case"input":return this.resolveFromMap(o,s,S,"input");default:switch(c){case"workspaceRoot":case"workspaceFolder":return(0,D.normalizeDriveLetter)(this.fsPath(u()));case"cwd":return i||s?(0,D.normalizeDriveLetter)(this.fsPath(u())):f.cwd();case"workspaceRootFolderName":case"workspaceFolderBasename":return t.basename(this.fsPath(u()));case"userHome":{if(C.userHome)return C.userHome;throw new Error((0,I.localize)(9,null,o))}case"lineNumber":{const a=this._context.getLineNumber();if(a)return a;throw new Error((0,I.localize)(10,null,o))}case"selectedText":{const a=this._context.getSelectedText();if(a)return a;throw new Error((0,I.localize)(11,null,o))}case"file":return r();case"fileWorkspaceFolder":return p();case"relativeFile":return i||s?t.relative(this.fsPath(u()),r()):r();case"relativeFileDirname":{const a=t.dirname(r());if(i||s){const n=t.relative(this.fsPath(u()),a);return n.length===0?".":n}return a}case"fileDirname":return t.dirname(r());case"fileExtname":return t.extname(r());case"fileBasename":return t.basename(r());case"fileBasenameNoExtension":{const a=t.basename(r());return a.slice(0,a.length-t.extname(a).length)}case"fileDirnameBasename":return t.basename(t.dirname(r()));case"execPath":{const a=this._context.getExecPath();return a||o}case"execInstallFolder":{const a=this._context.getAppRoot();return a||o}case"pathSeparator":return t.sep;default:try{const a=s?`${c}:${s}`:c;return this.resolveFromMap(o,a,S,void 0)}catch{return o}}}}resolveFromMap(C,o,c,i){if(o&&c){const S=i===void 0?c[o]:c[i+":"+o];if(typeof S=="string")return S;throw new Error((0,I.localize)(12,null,C))}return C}}e.AbstractVariableResolverService=w,w.VARIABLE_LHS="${",w.VARIABLE_REGEXP=/\$\{(.*?)\}/g}),define(ne[2260],re([1,0,36,10,37,27,38,77,111,26,150,2,975,213,14,8,2053,12,35,225,15,6]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuService=void 0;let n=class extends C.Disposable{constructor(d,m,b,E,y,T){super();!i.isMacintosh&&(0,c.getTitleBarStyle)(E)==="custom"?this.impl=new s.ContextMenuService(m,d,y,b,T):this.impl=new h(d,m,b)}get onDidShowContextMenu(){return this.impl.onDidShowContextMenu}get onDidHideContextMenu(){return this.impl.onDidHideContextMenu}showContextMenu(d){this.impl.showContextMenu(d)}};n=Ee([W(0,w.INotificationService),W(1,A.ITelemetryService),W(2,k.IKeybindingService),W(3,S.IConfigurationService),W(4,_.IContextViewService),W(5,l.IThemeService)],n),e.ContextMenuService=n;let h=class extends C.Disposable{constructor(d,m,b){super();this.notificationService=d,this.telemetryService=m,this.keybindingService=b,this._onDidShowContextMenu=new a.Emitter,this.onDidShowContextMenu=this._onDidShowContextMenu.event,this._onDidHideContextMenu=new a.Emitter,this.onDidHideContextMenu=this._onDidHideContextMenu.event}showContextMenu(d){const m=d.getActions();if(m.length){const b=(0,v.once)(()=>{d.onHide&&d.onHide(!1),f.ModifierKeyEmitter.getInstance().resetKeyStatus(),this._onDidHideContextMenu.fire()}),E=this.createMenu(d,m,b),y=d.getAnchor();let T,R;const O=(0,D.getZoomFactor)();if(f.isHTMLElement(y)){const x=f.getDomNodePagePosition(y);T=x.left,R=x.top+x.height,i.isMacintosh&&(R+=4/O)}else{const x=y;T=x.x+1,R=x.y}T*=O,R*=O,(0,o.popup)(E,{x:Math.floor(T),y:Math.floor(R),positioningItem:d.autoSelectFirstItem?0:void 0},()=>b()),this._onDidShowContextMenu.fire()}}createMenu(d,m,b,E=new Set){const y=d.actionRunner||new t.ActionRunner;return(0,u.coalesce)(m.map(T=>this.createMenuItem(d,T,y,b,E)))}createMenuItem(d,m,b,E,y){if(m instanceof t.Separator)return{type:"separator"};if(m instanceof t.SubmenuAction){if(y.has(m.id)){console.warn(`Found submenu cycle: ${m.id}`);return}return{label:(0,I.unmnemonicLabel)((0,p.stripIcons)(m.label)).trim(),submenu:this.createMenu(d,m.actions,E,new Set([...y,m.id]))}}else{let T;m.checked&&(typeof d.getCheckedActionsRepresentation=="function"?T=d.getCheckedActionsRepresentation(m):T="checkbox");const R={label:(0,I.unmnemonicLabel)((0,p.stripIcons)(m.label)).trim(),checked:!!m.checked,type:T,enabled:!!m.enabled,click:x=>{E(),this.runAction(b,m,d,x)}},O=d.getKeyBinding?d.getKeyBinding(m):this.keybindingService.lookupKeybinding(m.id);if(O){const x=O.getElectronAccelerator();if(x)R.accelerator=x;else{const F=O.getLabel();F&&(R.label=`${R.label} [${F}]`)}}return R}}async runAction(d,m,b,E){this.telemetryService.publicLog2("workbenchActionExecuted",{id:m.id,from:"contextMenu"});const y=b.getActionsContext?b.getActionsContext(E):void 0,T=d.run(m,y);try{await T}catch(R){this.notificationService.error(R)}}};h=Ee([W(0,w.INotificationService),W(1,A.ITelemetryService),W(2,k.IKeybindingService)],h),(0,r.registerSingleton)(_.IContextMenuService,n,!0)}),define(ne[2261],re([1,0,349,103]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,f.registerMainProcessRemoteService)(t.ICredentialsService,"credentials",{supportsDelayedInstantiation:!0})}),define(ne[252],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDecorationsService=void 0,e.IDecorationsService=(0,t.createDecorator)("IFileDecorationsService")}),define(ne[2262],re([1,0,6,252,55,2,11,194,10,12,29,1859,22,30,35,116,56,15,32,63]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationsService=void 0;class u{constructor(b,E,y){this.themeService=b,this._refCounter=0,this.data=E;const T=(0,S.hash)(y).toString(36);this.itemColorClassName=`${u._classNamesPrefix}-itemColor-${T}`,this.itemBadgeClassName=`${u._classNamesPrefix}-itemBadge-${T}`,this.bubbleBadgeClassName=`${u._classNamesPrefix}-bubbleBadge-${T}`,this.iconBadgeClassName=`${u._classNamesPrefix}-iconBadge-${T}`}static keyOf(b){if(Array.isArray(b))return b.map(u.keyOf).join(",");{const{color:E,letter:y}=b;return w.ThemeIcon.isThemeIcon(y)?`${E}+${y.id}`:`${E}/${y}`}}acquire(){this._refCounter+=1}release(){return--this._refCounter==0}appendCSSRules(b){Array.isArray(this.data)?this._appendForMany(this.data,b):this._appendForOne(this.data,b)}_appendForOne(b,E){const{color:y,letter:T}=b;(0,I.createCSSRule)(`.${this.itemColorClassName}`,`color: ${g(y)};`,E),w.ThemeIcon.isThemeIcon(T)?this._createIconCSSRule(T,y,E):T&&(0,I.createCSSRule)(`.${this.itemBadgeClassName}::after`,`content: "${T}"; color: ${g(y)};`,E)}_appendForMany(b,E){const{color:y}=b[0];(0,I.createCSSRule)(`.${this.itemColorClassName}`,`color: ${g(y)};`,E);let T=[],R;for(let O of b)if(w.ThemeIcon.isThemeIcon(O.letter)){R=O.letter;break}else O.letter&&T.push(O.letter);R?this._createIconCSSRule(R,y,E):(T.length&&(0,I.createCSSRule)(`.${this.itemBadgeClassName}::after`,`content: "${T.join(", ")}"; color: ${g(y)};`,E),(0,I.createCSSRule)(`.${this.bubbleBadgeClassName}::after`,`content: "\uEA71"; color: ${g(y)}; font-family: codicon; font-size: 14px; margin-right: 14px; opacity: 0.4;`,E))}_createIconCSSRule(b,E,y){const T=w.ThemeIcon.getModifier(b);T&&(b=w.ThemeIcon.modify(b,void 0));const R=(0,p.getIconRegistry)().getIcon(b.id);if(!R)return;const O=this.themeService.getProductIconTheme().getIcon(R);!O||(0,I.createCSSRule)(`.${this.iconBadgeClassName}::after`,`content: '${O.fontCharacter}'; color: ${g(E)}; font-family: ${(0,I.asCSSPropertyValue)(O.font?.id??"codicon")}; font-size: 16px; margin-right: 14px; font-weight: normal; ${T==="spin"?"animation: codicon-spin 1.5s steps(30) infinite":""}; `,y)}removeCSSRules(b){(0,I.removeCSSRulesContainingSelector)(this.itemColorClassName,b),(0,I.removeCSSRulesContainingSelector)(this.itemBadgeClassName,b),(0,I.removeCSSRulesContainingSelector)(this.bubbleBadgeClassName,b),(0,I.removeCSSRulesContainingSelector)(this.iconBadgeClassName,b)}}u._classNamesPrefix="monaco-decoration";class a{constructor(b){this._themeService=b,this._styleElement=(0,I.createStyleSheet)(),this._decorationRules=new Map,this._dispoables=new A.DisposableStore}dispose(){this._dispoables.dispose(),this._styleElement.remove()}asDecoration(b,E){b.sort((M,N)=>(N.weight||0)-(M.weight||0));let y=u.keyOf(b),T=this._decorationRules.get(y);T||(T=new u(this._themeService,b,y),this._decorationRules.set(y,T),T.appendCSSRules(this._styleElement)),T.acquire();let R=T.itemColorClassName,O=T.itemBadgeClassName,x=T.iconBadgeClassName,F=(0,l.distinct)(b.filter(M=>!(0,v.isFalsyOrWhitespace)(M.tooltip)).map(M=>M.tooltip)).join(" \u2022 "),L=b.some(M=>M.strikethrough);return E&&(O=T.bubbleBadgeClassName,F=(0,C.localize)(0,null)),{labelClassName:R,badgeClassName:O,iconClassName:x,strikethrough:L,tooltip:F,dispose:()=>{T?.release()&&(this._decorationRules.delete(y),T.removeCSSRules(this._styleElement),T=void 0)}}}}class n{constructor(b){this._data=_.TernarySearchTree.forUris(E=>!0),this._data.fill(!0,(0,l.asArray)(b))}affectsResource(b){return this._data.get(b)??this._data.findSuperstr(b)!==void 0}}class h{constructor(b,E){this.source=b,this.thenable=E}}function g(m){return m?`var(${(0,r.asCssVariableName)(m)})`:"inherit"}let d=class{constructor(b,E){this._onDidChangeDecorationsDelayed=new t.DebounceEmitter({merge:y=>y.flat()}),this._onDidChangeDecorations=new t.Emitter,this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._provider=new D.LinkedList,this._decorationStyles=new a(E),this._data=_.TernarySearchTree.forUris(y=>b.extUri.ignorePathCasing(y)),this._onDidChangeDecorationsDelayed.event(y=>{this._onDidChangeDecorations.fire(new n(y))})}dispose(){this._onDidChangeDecorations.dispose(),this._onDidChangeDecorationsDelayed.dispose()}registerDecorationsProvider(b){const E=this._provider.unshift(b);this._onDidChangeDecorations.fire({affectsResource(){return!0}});const y=()=>{const R=[];for(let[O,x]of this._data)x.delete(b)&&R.push(O);R.length>0&&this._onDidChangeDecorationsDelayed.fire(R)},T=b.onDidChange(R=>{if(!R)y();else for(const O of R){const x=this._ensureEntry(O);this._fetchData(x,O,b)}});return(0,A.toDisposable)(()=>{E(),T.dispose(),y()})}_ensureEntry(b){let E=this._data.get(b);return E||(E=new Map,this._data.set(b,E)),E}getDecoration(b,E){let y=[],T=!1;const R=this._ensureEntry(b);for(const O of this._provider){let x=R.get(O);x===void 0&&(x=this._fetchData(R,b,O)),x&&!(x instanceof h)&&y.push(x)}if(E){const O=this._data.findSuperstr(b);if(O)for(const x of O)for(const F of x[1].values())F&&!(F instanceof h)&&F.bubble&&(y.push(F),T=!0)}return y.length===0?void 0:this._decorationStyles.asDecoration(y,T)}_fetchData(b,E,y){const T=b.get(y);T instanceof h&&(T.source.cancel(),b.delete(y));const R=new c.CancellationTokenSource,O=y.provideDecorations(E,R.token);if((0,k.isThenable)(O)){const x=new h(R,Promise.resolve(O).then(F=>{b.get(y)===x&&this._keepItem(b,y,E,F)}).catch(F=>{!(0,o.isCancellationError)(F)&&b.get(y)===x&&b.delete(y)}));return b.set(y,x),null}else return this._keepItem(b,y,E,O)}_keepItem(b,E,y,T){const R=T||null,O=b.set(E,R);return(R||O)&&this._onDidChangeDecorationsDelayed.fire(y),R}};d=Ee([W(0,s.IUriIdentityService),W(1,w.IThemeService)],d),e.DecorationsService=d,(0,i.registerSingleton)(f.IDecorationsService,d,!0)}),define(ne[2263],re([1,0,2,54,2120,35]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DialogService=void 0;class k extends t.Disposable{constructor(){super(...arguments);this.model=this._register(new _.DialogsModel),this.onWillShowDialog=this.model.onWillShowDialog,this.onDidShowDialog=this.model.onDidShowDialog}async confirm(I){return await this.model.show({confirmArgs:{confirmation:I}}).result}async show(I,w,v,C){return await this.model.show({showArgs:{severity:I,message:w,buttons:v,options:C}}).result}async input(I,w,v,C,o){return await this.model.show({inputArgs:{severity:I,message:w,buttons:v,inputs:C,options:o}}).result}async about(){await this.model.show({}).result}}e.DialogService=k,(0,A.registerSingleton)(f.IDialogService,k,!0)}),define(ne[603],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEditorDropService=void 0,e.IEditorDropService=(0,t.createDecorator)("editorDropService")}),define(ne[59],re([1,0,5,44]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.preferredSideBySideGroupDirection=e.isEditorGroup=e.OpenEditorContext=e.GroupsOrder=e.isEditorReplacement=e.MergeGroupMode=e.GroupsArrangement=e.GroupLocation=e.GroupOrientation=e.GroupDirection=e.IEditorGroupsService=void 0,e.IEditorGroupsService=(0,t.createDecorator)("editorGroupsService");var _;(function(i){i[i.UP=0]="UP",i[i.DOWN=1]="DOWN",i[i.LEFT=2]="LEFT",i[i.RIGHT=3]="RIGHT"})(_=e.GroupDirection||(e.GroupDirection={}));var A;(function(i){i[i.HORIZONTAL=0]="HORIZONTAL",i[i.VERTICAL=1]="VERTICAL"})(A=e.GroupOrientation||(e.GroupOrientation={}));var k;(function(i){i[i.FIRST=0]="FIRST",i[i.LAST=1]="LAST",i[i.NEXT=2]="NEXT",i[i.PREVIOUS=3]="PREVIOUS"})(k=e.GroupLocation||(e.GroupLocation={}));var D;(function(i){i[i.MINIMIZE_OTHERS=0]="MINIMIZE_OTHERS",i[i.EVEN=1]="EVEN",i[i.TOGGLE=2]="TOGGLE"})(D=e.GroupsArrangement||(e.GroupsArrangement={}));var I;(function(i){i[i.COPY_EDITORS=0]="COPY_EDITORS",i[i.MOVE_EDITORS=1]="MOVE_EDITORS"})(I=e.MergeGroupMode||(e.MergeGroupMode={}));function w(i){const S=i;return(0,f.isEditorInput)(S?.editor)&&(0,f.isEditorInput)(S?.replacement)}e.isEditorReplacement=w;var v;(function(i){i[i.CREATION_TIME=0]="CREATION_TIME",i[i.MOST_RECENTLY_ACTIVE=1]="MOST_RECENTLY_ACTIVE",i[i.GRID_APPEARANCE=2]="GRID_APPEARANCE"})(v=e.GroupsOrder||(e.GroupsOrder={}));var C;(function(i){i[i.NEW_EDITOR=1]="NEW_EDITOR",i[i.MOVE_EDITOR=2]="MOVE_EDITOR",i[i.COPY_EDITOR=3]="COPY_EDITOR"})(C=e.OpenEditorContext||(e.OpenEditorContext={}));function o(i){const S=i;return!!S&&typeof S.id=="number"&&Array.isArray(S.editors)}e.isEditorGroup=o;function c(i){return i.getValue("workbench.editor.openSideBySideDirection")==="down"?1:3}e.preferredSideBySideGroupDirection=c}),define(ne[159],re([1,0,152,18,48,19,1863,248,57,5,17]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.globMatchesResource=e.priorityToRank=e.ResolvedStatus=e.RegisteredEditorPriority=e.editorsAssociationsSettingId=e.IEditorResolverService=void 0,e.IEditorResolverService=(0,w.createDecorator)("editorResolverService"),e.editorsAssociationsSettingId="workbench.editorAssociations";const C=v.Registry.as(I.Extensions.Configuration),o={...D.workbenchConfigurationNodeBase,properties:{"workbench.editorAssociations":{type:"object",markdownDescription:(0,k.localize)(0,null),additionalProperties:{type:"string"}}}};C.registerConfiguration(o);var c;(function(l){l.builtin="builtin",l.option="option",l.exclusive="exclusive",l.default="default"})(c=e.RegisteredEditorPriority||(e.RegisteredEditorPriority={}));var i;(function(l){l[l.ABORT=1]="ABORT",l[l.NONE=2]="NONE"})(i=e.ResolvedStatus||(e.ResolvedStatus={}));function S(l){switch(l){case c.exclusive:return 5;case c.default:return 4;case c.builtin:return 3;case c.option:default:return 1}}e.priorityToRank=S;function s(l,r){if(new Set([f.Schemas.extension,f.Schemas.webviewPanel,f.Schemas.vscodeWorkspaceTrust,f.Schemas.walkThrough,f.Schemas.vscodeSettings]).has(r.scheme))return!1;const a=typeof l=="string"&&l.indexOf(_.posix.sep)>=0?`${r.scheme}:${r.path}`:(0,A.basename)(r);return t.match(typeof l=="string"?l.toLowerCase():l,a.toLowerCase())}e.globMatchesResource=s}),define(ne[364],re([1,0,15,1488,7,5,159]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomEditorInfoCollection=e.CustomEditorInfo=e.CustomEditorPriority=e.CONTEXT_FOCUSED_CUSTOM_EDITOR_IS_EDITABLE=e.CONTEXT_ACTIVE_CUSTOM_EDITOR_ID=e.ICustomEditorService=void 0,e.ICustomEditorService=(0,A.createDecorator)("customEditorService"),e.CONTEXT_ACTIVE_CUSTOM_EDITOR_ID=new _.RawContextKey("activeCustomEditorId","",{type:"string",description:f.localize(0,null)}),e.CONTEXT_FOCUSED_CUSTOM_EDITOR_IS_EDITABLE=new _.RawContextKey("focusedCustomEditorIsEditable",!1);var D;(function(C){C.default="default",C.builtin="builtin",C.option="option"})(D=e.CustomEditorPriority||(e.CustomEditorPriority={}));class I{constructor(o){this.id=o.id,this.displayName=o.displayName,this.providerDisplayName=o.providerDisplayName,this.priority=o.priority,this.selector=o.selector}matches(o){return this.selector.some(c=>c.filenamePattern&&(0,k.globMatchesResource)(c.filenamePattern,o))}}e.CustomEditorInfo=I;class w{constructor(o){this.allEditors=(0,t.distinct)(o,c=>c.id)}get length(){return this.allEditors.length}get defaultEditor(){return this.allEditors.find(o=>{switch(o.priority){case k.RegisteredEditorPriority.default:case k.RegisteredEditorPriority.builtin:return this.allEditors.every(c=>c===o||v(c,o));default:return!1}})}get bestAvailableEditor(){return Array.from(this.allEditors).sort((c,i)=>(0,k.priorityToRank)(c.priority)-(0,k.priorityToRank)(i.priority))[0]}}e.CustomEditorInfoCollection=w;function v(C,o){return(0,k.priorityToRank)(C.priority)<(0,k.priorityToRank)(o.priority)}}),define(ne[2264],re([1,0,18,45,105,239,159]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalMainContribution=void 0;let D=class{constructor(w,v,C,o,c){w.registerEditor(`${t.Schemas.vscodeTerminal}:/**`,{id:_.terminalEditorId,label:A.terminalStrings.terminal,priority:k.RegisteredEditorPriority.exclusive},{canHandleDiff:!1,canSupportResource:i=>i.scheme===t.Schemas.vscodeTerminal,singlePerResource:!0},({resource:i,options:S})=>{let s=C.getInstanceFromResource(i);if(s){const p=c.getGroupForInstance(s);p&&p.removeInstance(s)}const l=o.resolveResource(s||i);return{editor:o.getInputFromResource(l)||{editor:l},options:{...S,pinned:!0,forceReload:!0,override:_.terminalEditorId}}}),v.registerFormatter({scheme:t.Schemas.vscodeTerminal,formatting:{label:"${path}",separator:""}})}};D=Ee([W(0,k.IEditorResolverService),W(1,f.ILabelService),W(2,_.ITerminalService),W(3,_.ITerminalEditorService),W(4,_.ITerminalGroupService)],D),e.TerminalMainContribution=D}),define(ne[21],re([1,0,5,59]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isPreferredGroup=e.SIDE_GROUP=e.ACTIVE_GROUP=e.IEditorService=void 0,e.IEditorService=(0,t.createDecorator)("editorService"),e.ACTIVE_GROUP=-1,e.SIDE_GROUP=-2;function _(A){const k=A;return typeof A=="number"||(0,f.isEditorGroup)(k)}e.isPreferredGroup=_}),define(ne[604],re([1,0,1401,53,245,59,44,21,52,42,198,382,33,1057]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AllEditorsByMostRecentlyUsedQuickAccess=e.AllEditorsByAppearanceQuickAccess=e.ActiveGroupEditorsByMostRecentlyUsedQuickAccess=e.BaseEditorQuickAccessProvider=void 0;let c=class extends _.PickerQuickAccessProvider{constructor(r,p,u,a,n){super(r,{canAcceptInBackground:!0,noResultsPick:{label:(0,t.localize)(0,null),groupId:-1}});this.editorGroupService=p,this.editorService=u,this.modelService=a,this.languageService=n,this.pickState=new class{constructor(){this.scorerCache=Object.create(null),this.isQuickNavigating=void 0}reset(h){h||(this.scorerCache=Object.create(null)),this.isQuickNavigating=h}}}provide(r,p){return this.pickState.reset(!!r.quickNavigate),super.provide(r,p)}_getPicks(r){const p=(0,C.prepareQuery)(r),u=this.doGetEditorPickItems().filter(n=>{if(!p.normalized)return!0;const h=(0,C.scoreItemFuzzy)(n,p,!0,f.quickPickItemScorerAccessor,this.pickState.scorerCache);return h.score?(n.highlights={label:h.labelMatch,description:h.descriptionMatch},!0):!1});if(p.normalized){const n=this.editorGroupService.getGroups(2).map(h=>h.id);u.sort((h,g)=>h.groupId!==g.groupId?n.indexOf(h.groupId)-n.indexOf(g.groupId):(0,C.compareItemsByFuzzyScore)(h,g,p,!0,f.quickPickItemScorerAccessor,this.pickState.scorerCache))}const a=[];if(this.editorGroupService.count>1){let n;for(const h of u){if(typeof n!="number"||n!==h.groupId){const g=this.editorGroupService.getGroup(h.groupId);g&&a.push({type:"separator",label:g.label}),n=h.groupId}a.push(h)}}else a.push(...u);return a}doGetEditorPickItems(){const r=this.doGetEditors(),p=new Map;for(const{groupId:u}of r)if(!p.has(u)){const a=this.editorGroupService.getGroup(u);a&&p.set(u,a.ariaLabel)}return this.doGetEditors().map(({editor:u,groupId:a})=>{const n=k.EditorResourceAccessor.getOriginalUri(u,{supportSideBySide:k.SideBySideEditor.PRIMARY}),h=u.isDirty()&&!u.isSaving(),g=u.getDescription(),d=g?`${u.getName()} ${g}`:u.getName();return{groupId:a,resource:n,label:u.getName(),ariaLabel:(()=>p.size>1?h?(0,t.localize)(1,null,d,p.get(a)):(0,t.localize)(2,null,d,p.get(a)):h?(0,t.localize)(3,null,d):d)(),description:g,iconClasses:(0,v.getIconClasses)(this.modelService,this.languageService,n).concat(u.getLabelExtraClasses()),italic:!this.editorGroupService.getGroup(a)?.isPinned(u),buttons:(()=>[{iconClass:h?"dirty-editor "+o.Codicon.closeDirty.classNames:o.Codicon.close.classNames,tooltip:(0,t.localize)(4,null),alwaysVisible:h}])(),trigger:async()=>{const m=this.editorGroupService.getGroup(a);return m&&(await m.closeEditor(u,{preserveFocus:!0}),!m.contains(u))?_.TriggerAction.REMOVE_ITEM:_.TriggerAction.NO_ACTION},accept:(m,b)=>this.editorGroupService.getGroup(a)?.openEditor(u,{preserveFocus:b.inBackground})}})}};c=Ee([W(1,A.IEditorGroupsService),W(2,D.IEditorService),W(3,I.IModelService),W(4,w.ILanguageService)],c),e.BaseEditorQuickAccessProvider=c;let i=class Lo extends c{constructor(r,p,u,a){super(Lo.PREFIX,r,p,u,a)}doGetEditors(){const r=this.editorGroupService.activeGroup;return r.getEditors(0).map(p=>({editor:p,groupId:r.id}))}};i.PREFIX="edt active ",i=Ee([W(0,A.IEditorGroupsService),W(1,D.IEditorService),W(2,I.IModelService),W(3,w.ILanguageService)],i),e.ActiveGroupEditorsByMostRecentlyUsedQuickAccess=i;let S=class Mo extends c{constructor(r,p,u,a){super(Mo.PREFIX,r,p,u,a)}doGetEditors(){const r=[];for(const p of this.editorGroupService.getGroups(2))for(const u of p.getEditors(1))r.push({editor:u,groupId:p.id});return r}};S.PREFIX="edt ",S=Ee([W(0,A.IEditorGroupsService),W(1,D.IEditorService),W(2,I.IModelService),W(3,w.ILanguageService)],S),e.AllEditorsByAppearanceQuickAccess=S;let s=class Po extends c{constructor(r,p,u,a){super(Po.PREFIX,r,p,u,a)}doGetEditors(){const r=[];for(const p of this.editorService.getEditors(0))r.push(p);return r}};s.PREFIX="edt mru ",s=Ee([W(0,A.IEditorGroupsService),W(1,D.IEditorService),W(2,I.IModelService),W(3,w.ILanguageService)],s),e.AllEditorsByMostRecentlyUsedQuickAccess=s}),define(ne[842],re([1,0,6,44,166,24,5,27,12,113,59,21,2]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEditorWithViewState=void 0;let c=class extends _.EditorPane{constructor(S,s,l,r,p,u,a,n,h){super(S,l,a,p);this.instantiationService=r,this.textResourceConfigurationService=u,this.editorService=n,this.editorGroupService=h,this.groupListener=this._register(new o.MutableDisposable),this.viewState=this.getEditorMemento(h,u,s,100)}setEditorVisible(S,s){this.groupListener.value=s?.onWillCloseEditor(l=>this.onWillCloseEditor(l)),super.setEditorVisible(S,s)}onWillCloseEditor(S){const s=S.editor;s===this.input&&this.updateEditorViewState(s)}clearInput(){this.updateEditorViewState(this.input),super.clearInput()}saveState(){this.updateEditorViewState(this.input),super.saveState()}updateEditorViewState(S){if(!S||!this.tracksEditorViewState(S))return;const s=this.toEditorViewStateResource(S);!s||(this.tracksDisposedEditorViewState()||(this.editorViewStateDisposables||(this.editorViewStateDisposables=new Map),this.editorViewStateDisposables.has(S)||this.editorViewStateDisposables.set(S,t.Event.once(S.onWillDispose)(()=>{this.clearEditorViewState(s,this.group),this.editorViewStateDisposables?.delete(S)}))),S.isDisposed()&&!this.tracksDisposedEditorViewState()||!this.shouldRestoreEditorViewState(S)&&(!this.group||!this.group.contains(S))?this.clearEditorViewState(s,this.group):S.isDisposed()||this.saveEditorViewState(s))}shouldRestoreEditorViewState(S,s){return s?.newInGroup?this.textResourceConfigurationService.getValue(f.EditorResourceAccessor.getOriginalUri(S,{supportSideBySide:f.SideBySideEditor.PRIMARY}),"workbench.editor.restoreViewState")!==!1:!0}getViewState(){const S=this.input;if(!S||!this.tracksEditorViewState(S))return;const s=this.toEditorViewStateResource(S);if(!!s)return this.computeEditorViewState(s)}saveEditorViewState(S){if(!this.group)return;const s=this.computeEditorViewState(S);!s||this.viewState.saveEditorState(this.group,S,s)}loadEditorViewState(S,s){if(!S||!this.group||!this.tracksEditorViewState(S)||!this.shouldRestoreEditorViewState(S,s))return;const l=this.toEditorViewStateResource(S);if(!!l)return this.viewState.loadEditorState(this.group,l)}moveEditorViewState(S,s,l){return this.viewState.moveEditorState(S,s,l)}clearEditorViewState(S,s){this.viewState.clearEditorState(S,s)}dispose(){if(super.dispose(),this.editorViewStateDisposables){for(const[,S]of this.editorViewStateDisposables)S.dispose();this.editorViewStateDisposables=void 0}}tracksDisposedEditorViewState(){return!1}};c=Ee([W(2,D.ITelemetryService),W(3,k.IInstantiationService),W(4,A.IStorageService),W(5,w.ITextResourceConfigurationService),W(6,I.IThemeService),W(7,C.IEditorService),W(8,v.IEditorGroupsService)],c),e.AbstractEditorWithViewState=c}),define(ne[167],re([1,0,6,1436,17,44,174,21]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SideBySideEditorInputSerializer=e.AbstractSideBySideEditorInputSerializer=e.SideBySideEditorInput=void 0;let I=class dn extends k.EditorInput{constructor(o,c,i,S,s){super();this.preferredName=o,this.preferredDescription=c,this.secondary=i,this.primary=S,this.editorService=s,this.hasIdenticalSides=this.primary.matches(this.secondary),this.registerListeners()}get typeId(){return dn.ID}get capabilities(){let o=this.primary.capabilities;return o&=~32,this.secondary.hasCapability(16)&&(o|=16),this.secondary.hasCapability(8)&&(o|=8),o}get resource(){if(this.hasIdenticalSides)return this.primary.resource}registerListeners(){this._register(t.Event.once(t.Event.any(this.primary.onWillDispose,this.secondary.onWillDispose))(()=>{this.isDisposed()||this.dispose()})),this._register(this.primary.onDidChangeDirty(()=>this._onDidChangeDirty.fire())),this._register(this.primary.onDidChangeCapabilities(()=>this._onDidChangeCapabilities.fire())),this._register(this.secondary.onDidChangeCapabilities(()=>this._onDidChangeCapabilities.fire())),this._register(this.primary.onDidChangeLabel(()=>this._onDidChangeLabel.fire())),this._register(this.secondary.onDidChangeLabel(()=>this._onDidChangeLabel.fire()))}getName(){const o=this.getPreferredName();return o||(this.hasIdenticalSides?this.primary.getName():(0,f.localize)(0,null,this.secondary.getName(),this.primary.getName()))}getPreferredName(){return this.preferredName}getDescription(o){const c=this.getPreferredDescription();return c||(this.hasIdenticalSides?this.primary.getDescription(o):super.getDescription(o))}getPreferredDescription(){return this.preferredDescription}getTitle(o){return this.hasIdenticalSides?this.primary.getTitle(o)??this.getName():super.getTitle(o)}getLabelExtraClasses(){return this.hasIdenticalSides?this.primary.getLabelExtraClasses():super.getLabelExtraClasses()}getAriaLabel(){return this.hasIdenticalSides?this.primary.getAriaLabel():super.getAriaLabel()}getTelemetryDescriptor(){return{...this.primary.getTelemetryDescriptor(),...super.getTelemetryDescriptor()}}isDirty(){return this.primary.isDirty()}isSaving(){return this.primary.isSaving()}async save(o,c){const i=await this.primary.save(o,c);return this.saveResultToEditor(i)}async saveAs(o,c){const i=await this.primary.saveAs(o,c);return this.saveResultToEditor(i)}saveResultToEditor(o){if(!o||!this.hasIdenticalSides)return o;if(this.primary.matches(o))return this;if(o instanceof k.EditorInput)return new dn(this.preferredName,this.preferredDescription,o,o,this.editorService);if(!(0,A.isResourceDiffEditorInput)(o)&&!(0,A.isResourceSideBySideEditorInput)(o))return{primary:o,secondary:o,label:this.preferredName,description:this.preferredDescription}}revert(o,c){return this.primary.revert(o,c)}async rename(o,c){if(!this.hasIdenticalSides)return;const i=await this.primary.rename(o,c);if(!!i){if((0,A.isEditorInput)(i.editor))return{editor:new dn(this.preferredName,this.preferredDescription,i.editor,i.editor,this.editorService),options:{...i.options,viewState:(0,A.findViewStateForEditor)(this,o,this.editorService)}};if((0,A.isResourceEditorInput)(i.editor))return{editor:{label:this.preferredName,description:this.preferredDescription,primary:i.editor,secondary:i.editor,options:{...i.options,viewState:(0,A.findViewStateForEditor)(this,o,this.editorService)}}}}}toUntyped(o){const c=this.primary.toUntyped(o),i=this.secondary.toUntyped(o);if(c&&i&&!(0,A.isResourceDiffEditorInput)(c)&&!(0,A.isResourceDiffEditorInput)(i)&&!(0,A.isResourceSideBySideEditorInput)(c)&&!(0,A.isResourceSideBySideEditorInput)(i)){const S={label:this.preferredName,description:this.preferredDescription,primary:c,secondary:i};return typeof o?.preserveViewState=="number"&&(S.options={viewState:(0,A.findViewStateForEditor)(this,o.preserveViewState,this.editorService)}),S}}matches(o){return this===o?!0:(0,A.isDiffEditorInput)(o)||(0,A.isResourceDiffEditorInput)(o)?!1:o instanceof dn?this.primary.matches(o.primary)&&this.secondary.matches(o.secondary):(0,A.isResourceSideBySideEditorInput)(o)?this.primary.matches(o.primary)&&this.secondary.matches(o.secondary):!1}};I.ID="workbench.editorinputs.sidebysideEditorInput",I=Ee([W(4,D.IEditorService)],I),e.SideBySideEditorInput=I;class w{canSerialize(o){const c=o;if(c.primary&&c.secondary){const[i,S]=this.getSerializers(c.secondary.typeId,c.primary.typeId);return!!(i?.canSerialize(c.secondary)&&S?.canSerialize(c.primary))}return!1}serialize(o){const c=o;if(c.primary&&c.secondary){const[i,S]=this.getSerializers(c.secondary.typeId,c.primary.typeId);if(S&&i){const s=S.serialize(c.primary),l=i.serialize(c.secondary);if(s&&l){const r={name:c.getPreferredName(),description:c.getPreferredDescription(),primarySerialized:s,secondarySerialized:l,primaryTypeId:c.primary.typeId,secondaryTypeId:c.secondary.typeId};return JSON.stringify(r)}}}}deserialize(o,c){const i=JSON.parse(c),[S,s]=this.getSerializers(i.secondaryTypeId,i.primaryTypeId);if(s&&S){const l=s.deserialize(o,i.primarySerialized),r=S.deserialize(o,i.secondarySerialized);if(l instanceof k.EditorInput&&r instanceof k.EditorInput)return this.createEditorInput(o,i.name,i.description,r,l)}}getSerializers(o,c){const i=_.Registry.as(A.EditorExtensions.EditorFactory);return[i.getEditorSerializer(o),i.getEditorSerializer(c)]}}e.AbstractSideBySideEditorInputSerializer=w;class v extends w{createEditorInput(o,c,i,S,s){return o.createInstance(I,c,i,S,s)}}e.SideBySideEditorInputSerializer=v}),define(ne[2265],re([1,0,44,167,2,24,17,6,59,15,55,51]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorsObserver=void 0;let o=class Bn extends _.Disposable{constructor(i,S){super();this.editorGroupsService=i,this.storageService=S,this.keyMap=new Map,this.mostRecentEditorsMap=new v.LinkedMap,this.editorsPerResourceCounter=new v.ResourceMap,this._onDidMostRecentlyActiveEditorsChange=this._register(new D.Emitter),this.onDidMostRecentlyActiveEditorsChange=this._onDidMostRecentlyActiveEditorsChange.event,this.registerListeners()}get count(){return this.mostRecentEditorsMap.size}get editors(){return[...this.mostRecentEditorsMap.values()]}hasEditor(i){return this.editorsPerResourceCounter.get(i.resource)?.has(this.toIdentifier(i))??!1}hasEditors(i){return this.editorsPerResourceCounter.has(i)}toIdentifier(i,S){return typeof i!="string"?this.toIdentifier(i.typeId,i.editorId):S?`${i}/${S}`:i}registerListeners(){this._register(this.storageService.onWillSaveState(()=>this.saveState())),this._register(this.editorGroupsService.onDidAddGroup(i=>this.onGroupAdded(i))),this._register(this.editorGroupsService.onDidChangeEditorPartOptions(i=>this.onDidChangeEditorPartOptions(i))),this.editorGroupsService.whenReady.then(()=>this.loadState())}onGroupAdded(i){const S=i.getEditors(0);for(let s=S.length-1;s>=0;s--)this.addMostRecentEditor(i,S[s],!1,!0);this.editorGroupsService.activeGroup===i&&i.activeEditor&&this.addMostRecentEditor(i,i.activeEditor,!0,!1),this.registerGroupListeners(i)}registerGroupListeners(i){const S=new _.DisposableStore;S.add(i.onDidModelChange(s=>{switch(s.kind){case 0:{this.editorGroupsService.activeGroup===i&&i.activeEditor&&this.addMostRecentEditor(i,i.activeEditor,!0,!1);break}case 3:{s.editor&&(this.addMostRecentEditor(i,s.editor,!1,!0),this.ensureOpenedEditorsLimit({groupId:i.id,editor:s.editor},i.id));break}}})),S.add(i.onDidCloseEditor(s=>{this.removeMostRecentEditor(i,s.editor)})),S.add(i.onDidActiveEditorChange(s=>{s.editor&&this.addMostRecentEditor(i,s.editor,this.editorGroupsService.activeGroup===i,!1)})),D.Event.once(i.onWillDispose)(()=>(0,_.dispose)(S))}onDidChangeEditorPartOptions(i){if(!(0,C.equals)(i.newPartOptions.limit,i.oldPartOptions.limit)){const S=this.editorGroupsService.activeGroup;let s;S.activeEditor&&(s={editor:S.activeEditor,groupId:S.id}),this.ensureOpenedEditorsLimit(s)}}addMostRecentEditor(i,S,s,l){const r=this.ensureKey(i,S),p=this.mostRecentEditorsMap.first;s||!p?this.mostRecentEditorsMap.set(r,r,p?1:void 0):(this.mostRecentEditorsMap.set(r,r,1),this.mostRecentEditorsMap.set(p,p,1)),l&&this.updateEditorResourcesMap(S,!0),this._onDidMostRecentlyActiveEditorsChange.fire()}updateEditorResourcesMap(i,S){let s,l,r;if(i instanceof f.SideBySideEditorInput?(s=i.primary.resource,l=i.primary.typeId,r=i.primary.editorId):(s=i.resource,l=i.typeId,r=i.editorId),!s)return;const p=this.toIdentifier(l,r);if(S){let u=this.editorsPerResourceCounter.get(s);u||(u=new Map,this.editorsPerResourceCounter.set(s,u)),u.set(p,(u.get(p)??0)+1)}else{const u=this.editorsPerResourceCounter.get(s);if(u){const a=u.get(p)??0;a>1?u.set(p,a-1):(u.delete(p),u.size===0&&this.editorsPerResourceCounter.delete(s))}}}removeMostRecentEditor(i,S){this.updateEditorResourcesMap(S,!1);const s=this.findKey(i,S);if(s){this.mostRecentEditorsMap.delete(s);const l=this.keyMap.get(i.id);l&&l.delete(s.editor)&&l.size===0&&this.keyMap.delete(i.id),this._onDidMostRecentlyActiveEditorsChange.fire()}}findKey(i,S){const s=this.keyMap.get(i.id);if(!!s)return s.get(S)}ensureKey(i,S){let s=this.keyMap.get(i.id);s||(s=new Map,this.keyMap.set(i.id,s));let l=s.get(S);return l||(l={groupId:i.id,editor:S},s.set(S,l)),l}async ensureOpenedEditorsLimit(i,S){if(!this.editorGroupsService.partOptions.limit?.enabled||typeof this.editorGroupsService.partOptions.limit.value!="number"||this.editorGroupsService.partOptions.limit.value<=0)return;const s=this.editorGroupsService.partOptions.limit.value;if(this.editorGroupsService.partOptions.limit?.perEditorGroup)if(typeof S=="number"){const l=this.editorGroupsService.getGroup(S);l&&await this.doEnsureOpenedEditorsLimit(s,l.getEditors(0).map(r=>({editor:r,groupId:S})),i)}else for(const l of this.editorGroupsService.groups)await this.ensureOpenedEditorsLimit(i,l.id);else await this.doEnsureOpenedEditorsLimit(s,[...this.mostRecentEditorsMap.values()],i)}async doEnsureOpenedEditorsLimit(i,S,s){if(i>=S.length)return;const l=S.reverse().filter(({editor:u,groupId:a})=>!(u.isDirty()&&!u.isSaving()||s&&u===s.editor&&a===s.groupId||this.editorGroupsService.getGroup(a)?.isSticky(u)));let r=S.length-i;const p=new Map;for(const{groupId:u,editor:a}of l){let n=p.get(u);if(n||(n=[],p.set(u,n)),n.push(a),r--,r===0)break}for(const[u,a]of p){const n=this.editorGroupsService.getGroup(u);n&&await n.closeEditors(a,{preserveFocus:!0})}}saveState(){this.mostRecentEditorsMap.isEmpty()?this.storageService.remove(Bn.STORAGE_KEY,1):this.storageService.store(Bn.STORAGE_KEY,JSON.stringify(this.serialize()),1,1)}serialize(){const i=k.Registry.as(t.EditorExtensions.EditorFactory),S=[...this.mostRecentEditorsMap.values()],s=new Map;return{entries:(0,w.coalesce)(S.map(({editor:l,groupId:r})=>{const p=this.editorGroupsService.getGroup(r);if(!p)return;let u=s.get(p);u||(u=p.getEditors(1).filter(n=>i.getEditorSerializer(n)?.canSerialize(n)),s.set(p,u));const a=u.indexOf(l);if(a!==-1)return{groupId:r,index:a}}))}}loadState(){const i=this.storageService.get(Bn.STORAGE_KEY,1);if(i)this.deserialize(JSON.parse(i));else{const S=this.editorGroupsService.getGroups(1);for(let s=S.length-1;s>=0;s--){const l=S[s],r=l.getEditors(0);for(let p=r.length-1;p>=0;p--)this.addMostRecentEditor(l,r[p],!0,!0)}}for(const S of this.editorGroupsService.groups)this.registerGroupListeners(S)}deserialize(i){const S=[];for(const{groupId:s,index:l}of i.entries){const r=this.editorGroupsService.getGroup(s);if(!r)continue;const p=r.getEditorByIndex(l);if(!p)continue;const u=this.ensureKey(r,p);S.push([u,u]),this.updateEditorResourcesMap(p,!0)}this.mostRecentEditorsMap.fromJSON(S)}};o.STORAGE_KEY="editors.mru",o=Ee([W(0,I.IEditorGroupsService),W(1,A.IStorageService)],o),e.EditorsObserver=o}),define(ne[605],re([1,0,1403,10,17,44,167,27,5,12,59,209,6,24,13,8,316,2,82,842,113,21,19,9,1060]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SideBySideEditor=void 0;function g(b){const E=b;return typeof E?.primary=="object"&&typeof E.secondary=="object"}let d=class Wi extends p.AbstractEditorWithViewState{constructor(E,y,T,R,O,x,F,L){super(Wi.ID,Wi.VIEW_STATE_PREFERENCE_KEY,E,y,R,x,T,F,L);this.configurationService=O,this.onDidCreateEditors=this._register(new o.Emitter),this._onDidChangeSizeConstraints=this._register(new o.Relay),this.onDidChangeSizeConstraints=o.Event.any(this.onDidCreateEditors.event,this._onDidChangeSizeConstraints.event),this._onDidChangeSelection=this._register(new o.Emitter),this.onDidChangeSelection=this._onDidChangeSelection.event,this.primaryEditorPane=void 0,this.secondaryEditorPane=void 0,this.splitviewDisposables=this._register(new l.DisposableStore),this.editorDisposables=this._register(new l.DisposableStore),this.orientation=this.configurationService.getValue(Wi.SIDE_BY_SIDE_LAYOUT_SETTING)==="vertical"?0:1,this.dimension=new f.Dimension(0,0),this.lastFocusedSide=void 0,this.registerListeners()}get minimumPrimaryWidth(){return this.primaryEditorPane?this.primaryEditorPane.minimumWidth:0}get maximumPrimaryWidth(){return this.primaryEditorPane?this.primaryEditorPane.maximumWidth:Number.POSITIVE_INFINITY}get minimumPrimaryHeight(){return this.primaryEditorPane?this.primaryEditorPane.minimumHeight:0}get maximumPrimaryHeight(){return this.primaryEditorPane?this.primaryEditorPane.maximumHeight:Number.POSITIVE_INFINITY}get minimumSecondaryWidth(){return this.secondaryEditorPane?this.secondaryEditorPane.minimumWidth:0}get maximumSecondaryWidth(){return this.secondaryEditorPane?this.secondaryEditorPane.maximumWidth:Number.POSITIVE_INFINITY}get minimumSecondaryHeight(){return this.secondaryEditorPane?this.secondaryEditorPane.minimumHeight:0}get maximumSecondaryHeight(){return this.secondaryEditorPane?this.secondaryEditorPane.maximumHeight:Number.POSITIVE_INFINITY}set minimumWidth(E){}set maximumWidth(E){}set minimumHeight(E){}set maximumHeight(E){}get minimumWidth(){return this.minimumPrimaryWidth+this.minimumSecondaryWidth}get maximumWidth(){return this.maximumPrimaryWidth+this.maximumSecondaryWidth}get minimumHeight(){return this.minimumPrimaryHeight+this.minimumSecondaryHeight}get maximumHeight(){return this.maximumPrimaryHeight+this.maximumSecondaryHeight}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(E=>this.onConfigurationUpdated(E)))}onConfigurationUpdated(E){E.affectsConfiguration(Wi.SIDE_BY_SIDE_LAYOUT_SETTING)&&(this.orientation=this.configurationService.getValue(Wi.SIDE_BY_SIDE_LAYOUT_SETTING)==="vertical"?0:1,this.splitview&&this.recreateSplitview())}recreateSplitview(){const E=(0,i.assertIsDefined)(this.getContainer()),y=this.getSplitViewRatio();this.splitview&&(E.removeChild(this.splitview.el),this.splitviewDisposables.clear()),this.createSplitView(E,y),this.layout(this.dimension)}getSplitViewRatio(){let E;if(this.splitview){const y=this.splitview.getViewSize(0),T=this.splitview.getViewSize(1);if(Math.abs(y-T)>1){const R=this.splitview.orientation===1?this.dimension.width:this.dimension.height;E=y/R}}return E}createEditor(E){E.classList.add("side-by-side-editor"),this.secondaryEditorContainer=(0,f.$)(".side-by-side-editor-container.editor-instance"),this.primaryEditorContainer=(0,f.$)(".side-by-side-editor-container.editor-instance"),this.createSplitView(E)}createSplitView(E,y){this.splitview=this.splitviewDisposables.add(new C.SplitView(E,{orientation:this.orientation})),this.splitviewDisposables.add(this.splitview.onDidSashReset(()=>this.splitview?.distributeViewSizes()));let T=C.Sizing.Distribute,R=C.Sizing.Distribute;if(y){const F=this.splitview.orientation===1?this.dimension.width:this.dimension.height;T=Math.round(F*y),R=F-T,this.splitview.layout(this.orientation===1?this.dimension.width:this.dimension.height)}const O=(0,i.assertIsDefined)(this.secondaryEditorContainer);this.splitview.addView({element:O,layout:F=>this.layoutPane(this.secondaryEditorPane,F),minimumSize:this.orientation===1?s.DEFAULT_EDITOR_MIN_DIMENSIONS.width:s.DEFAULT_EDITOR_MIN_DIMENSIONS.height,maximumSize:Number.POSITIVE_INFINITY,onDidChange:o.Event.None},T);const x=(0,i.assertIsDefined)(this.primaryEditorContainer);this.splitview.addView({element:x,layout:F=>this.layoutPane(this.primaryEditorPane,F),minimumSize:this.orientation===1?s.DEFAULT_EDITOR_MIN_DIMENSIONS.width:s.DEFAULT_EDITOR_MIN_DIMENSIONS.height,maximumSize:Number.POSITIVE_INFINITY,onDidChange:o.Event.None},R),this.updateStyles()}getTitle(){return this.input?this.input.getName():(0,t.localize)(0,null)}async setInput(E,y,T,R){const O=this.input;await super.setInput(E,y,T,R),(!O||!E.matches(O))&&(O&&this.disposeEditors(),this.createEditors(E));const{primary:x,secondary:F,viewState:L}=this.loadViewState(E,y,T);if(this.lastFocusedSide=L?.focus,typeof L?.ratio=="number"&&this.splitview){const M=this.splitview.orientation===1?this.dimension.width:this.dimension.height;this.splitview.resizeView(0,Math.round(M*L.ratio))}else this.splitview?.distributeViewSizes();await Promise.all([this.secondaryEditorPane?.setInput(E.secondary,F,T,R),this.primaryEditorPane?.setInput(E.primary,x,T,R)]),typeof y?.target=="number"&&(this.lastFocusedSide=y.target)}loadViewState(E,y,T){const R=g(y?.viewState)?y?.viewState:this.loadEditorViewState(E,T);let O=Object.create(null),x;return y?.target===A.SideBySideEditor.SECONDARY?x={...y}:O={...y},O.viewState=R?.primary,R?.secondary&&(x?x.viewState=R?.secondary:x={viewState:R.secondary}),{primary:O,secondary:x,viewState:R}}createEditors(E){this.secondaryEditorPane=this.doCreateEditor(E.secondary,(0,i.assertIsDefined)(this.secondaryEditorContainer)),this.primaryEditorPane=this.doCreateEditor(E.primary,(0,i.assertIsDefined)(this.primaryEditorContainer)),this.layout(this.dimension),this._onDidChangeSizeConstraints.input=o.Event.any(o.Event.map(this.secondaryEditorPane.onDidChangeSizeConstraints,()=>{}),o.Event.map(this.primaryEditorPane.onDidChangeSizeConstraints,()=>{})),this.onDidCreateEditors.fire(void 0),this.editorDisposables.add(this.primaryEditorPane.onDidFocus(()=>this.onDidFocusChange(A.SideBySideEditor.PRIMARY))),this.editorDisposables.add(this.secondaryEditorPane.onDidFocus(()=>this.onDidFocusChange(A.SideBySideEditor.SECONDARY)))}doCreateEditor(E,y){const T=_.Registry.as(A.EditorExtensions.EditorPane).getEditorPane(E);if(!T)throw new Error("No editor pane descriptor for editor found");const R=T.instantiate(this.instantiationService);return R.create(y),R.setVisible(this.isVisible(),this.group),(0,A.isEditorPaneWithSelection)(R)&&this.editorDisposables.add(R.onDidChangeSelection(O=>this._onDidChangeSelection.fire(O))),this.editorDisposables.add(R),R}onDidFocusChange(E){this.lastFocusedSide=E,this._onDidChangeControl.fire()}getSelection(){const E=this.getLastFocusedEditorPane();if((0,A.isEditorPaneWithSelection)(E)){const y=E.getSelection();if(y)return new m(y,E===this.primaryEditorPane?A.SideBySideEditor.PRIMARY:A.SideBySideEditor.SECONDARY)}}setOptions(E){super.setOptions(E),typeof E?.target=="number"&&(this.lastFocusedSide=E.target),this.getLastFocusedEditorPane()?.setOptions(E)}setEditorVisible(E,y){this.primaryEditorPane?.setVisible(E,y),this.secondaryEditorPane?.setVisible(E,y),super.setEditorVisible(E,y)}clearInput(){super.clearInput(),this.primaryEditorPane?.clearInput(),this.secondaryEditorPane?.clearInput(),this.disposeEditors()}focus(){this.getLastFocusedEditorPane()?.focus()}getLastFocusedEditorPane(){return this.lastFocusedSide===A.SideBySideEditor.SECONDARY?this.secondaryEditorPane:this.primaryEditorPane}layout(E){this.dimension=E,(0,i.assertIsDefined)(this.splitview).layout(this.orientation===1?E.width:E.height)}layoutPane(E,y){E?.layout(this.orientation===1?new f.Dimension(y,this.dimension.height):new f.Dimension(this.dimension.width,y))}getControl(){return this.getLastFocusedEditorPane()?.getControl()}getPrimaryEditorPane(){return this.primaryEditorPane}getSecondaryEditorPane(){return this.secondaryEditorPane}tracksEditorViewState(E){return E instanceof k.SideBySideEditorInput}computeEditorViewState(E){if(!this.input||!(0,n.isEqual)(E,this.toEditorViewStateResource(this.input)))return;const y=this.primaryEditorPane?.getViewState(),T=this.secondaryEditorPane?.getViewState();if(!(!y||!T))return{primary:y,secondary:T,focus:this.lastFocusedSide,ratio:this.getSplitViewRatio()}}toEditorViewStateResource(E){let y,T;if(E instanceof k.SideBySideEditorInput&&(y=E.primary.resource,T=E.secondary.resource),!(!T||!y))return h.URI.from({scheme:"sideBySide",path:`${(0,f.multibyteAwareBtoa)(T.toString())}${(0,f.multibyteAwareBtoa)(y.toString())}`})}updateStyles(){super.updateStyles(),this.primaryEditorContainer&&(this.orientation===1?(this.primaryEditorContainer.style.borderLeftWidth="1px",this.primaryEditorContainer.style.borderLeftStyle="solid",this.primaryEditorContainer.style.borderLeftColor=this.getColor(r.SIDE_BY_SIDE_EDITOR_VERTICAL_BORDER)?.toString()??"",this.primaryEditorContainer.style.borderTopWidth="0"):(this.primaryEditorContainer.style.borderTopWidth="1px",this.primaryEditorContainer.style.borderTopStyle="solid",this.primaryEditorContainer.style.borderTopColor=this.getColor(r.SIDE_BY_SIDE_EDITOR_HORIZONTAL_BORDER)?.toString()??"",this.primaryEditorContainer.style.borderLeftWidth="0"))}dispose(){this.disposeEditors(),super.dispose()}disposeEditors(){this.editorDisposables.clear(),this.secondaryEditorPane=void 0,this.primaryEditorPane=void 0,this.lastFocusedSide=void 0,this.secondaryEditorContainer&&(0,f.clearNode)(this.secondaryEditorContainer),this.primaryEditorContainer&&(0,f.clearNode)(this.primaryEditorContainer)}};d.ID=A.SIDE_BY_SIDE_EDITOR_ID,d.SIDE_BY_SIDE_LAYOUT_SETTING="workbench.editor.splitInGroupLayout",d.VIEW_STATE_PREFERENCE_KEY="sideBySideEditorViewState",d=Ee([W(0,D.ITelemetryService),W(1,I.IInstantiationService),W(2,w.IThemeService),W(3,c.IStorageService),W(4,S.IConfigurationService),W(5,u.ITextResourceConfigurationService),W(6,a.IEditorService),W(7,v.IEditorGroupsService)],d),e.SideBySideEditor=d;class m{constructor(E,y){this.selection=E,this.side=y}compare(E){return!(E instanceof m)||this.side!==E.side?3:this.selection.compare(E.selection)}restore(E){const y={...E,target:this.side};return this.selection.restore(y)}}}),define(ne[843],re([1,0,1390,44,27,12,605,5,568,24,8,113,59,21]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BinaryResourceDiffEditor=void 0;let i=class extends k.SideBySideEditor{constructor(s,l,r,p,u,a,n,h){super(s,l,r,p,u,a,n,h)}getMetadata(){const s=this.getPrimaryEditorPane(),l=this.getSecondaryEditorPane();if(s instanceof I.BaseBinaryResourceEditor&&l instanceof I.BaseBinaryResourceEditor)return(0,t.localize)(0,null,l.getMetadata(),s.getMetadata())}};i.ID=f.BINARY_DIFF_EDITOR_ID,i=Ee([W(0,_.ITelemetryService),W(1,D.IInstantiationService),W(2,A.IThemeService),W(3,w.IStorageService),W(4,v.IConfigurationService),W(5,C.ITextResourceConfigurationService),W(6,c.IEditorService),W(7,o.IEditorGroupsService)],i),e.BinaryResourceDiffEditor=i}),define(ne[844],re([1,0,6,44,174,167,5,8,2,17,15]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorGroupModel=e.isGroupEditorCloseEvent=e.isGroupEditorMoveEvent=e.isGroupEditorOpenEvent=e.isGroupEditorChangeEvent=e.isSerializedEditorGroupModel=void 0;const C={LEFT:"left",RIGHT:"right",FIRST:"first",LAST:"last"};function o(r){const p=r;return!!(p&&typeof p=="object"&&Array.isArray(p.editors)&&Array.isArray(p.mru))}e.isSerializedEditorGroupModel=o;function c(r){const p=r;return p.editor&&p.editorIndex!==void 0}e.isGroupEditorChangeEvent=c;function i(r){const p=r;return p.kind===3&&p.editorIndex!==void 0}e.isGroupEditorOpenEvent=i;function S(r){const p=r;return p.kind===5&&p.editorIndex!==void 0&&p.oldEditorIndex!==void 0}e.isGroupEditorMoveEvent=S;function s(r){const p=r;return p.kind===4&&p.editorIndex!==void 0&&p.context!==void 0&&p.sticky!==void 0}e.isGroupEditorCloseEvent=s;let l=class Vi extends I.Disposable{constructor(p,u,a){super();this.instantiationService=u,this.configurationService=a,this._onDidModelChange=this._register(new t.Emitter),this.onDidModelChange=this._onDidModelChange.event,this.editors=[],this.mru=[],this.locked=!1,this.preview=null,this.active=null,this.sticky=-1,o(p)?this._id=this.deserialize(p):this._id=Vi.IDS++,this.onConfigurationUpdated(),this.registerListeners()}get id(){return this._id}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(()=>this.onConfigurationUpdated()))}onConfigurationUpdated(){this.editorOpenPositioning=this.configurationService.getValue("workbench.editor.openPositioning"),this.focusRecentEditorAfterClose=this.configurationService.getValue("workbench.editor.focusRecentEditorAfterClose")}get count(){return this.editors.length}get stickyCount(){return this.sticky+1}getEditors(p,u){const a=p===0?this.mru.slice(0):this.editors.slice(0);return u?.excludeSticky?p===0?a.filter(n=>!this.isSticky(n)):a.slice(this.sticky+1):a}getEditorByIndex(p){return this.editors[p]}get activeEditor(){return this.active}isActive(p){return this.matches(this.active,p)}get previewEditor(){return this.preview}openEditor(p,u){const a=u?.sticky||typeof u?.index=="number"&&this.isSticky(u.index),n=u?.pinned||u?.sticky,h=u?.active||!this.activeEditor||!n&&this.matches(this.preview,this.activeEditor),g=this.findEditor(p,u);if(g){const[d,m]=g;return n&&this.doPin(d,m),h&&this.doSetActive(d,m),u&&typeof u.index=="number"&&this.moveEditor(d,u.index),a&&this.doStick(d,this.indexOf(d)),{editor:d,isNew:!1}}else{const d=p,m=this.indexOf(this.active);let b;if(u&&typeof u.index=="number"?b=u.index:this.editorOpenPositioning===C.FIRST?(b=0,!a&&this.isSticky(b)&&(b=this.sticky+1)):this.editorOpenPositioning===C.LAST?b=this.editors.length:(this.editorOpenPositioning===C.LEFT?m===0||!this.editors.length?b=0:b=m:b=m+1,!a&&this.isSticky(b)&&(b=this.sticky+1)),a&&(this.sticky++,this.isSticky(b)||(b=this.sticky)),(n||!this.preview)&&this.splice(b,!1,d),!n){if(this.preview){const y=this.indexOf(this.preview);b>y&&b--,this.replaceEditor(this.preview,d,b,!h)}this.preview=d}this.registerEditorListeners(d);const E={kind:3,editor:d,editorIndex:b};return this._onDidModelChange.fire(E),h&&this.doSetActive(d,b),{editor:d,isNew:!0}}}registerEditorListeners(p){const u=new I.DisposableStore;u.add(t.Event.once(p.onWillDispose)(()=>{const a=this.editors.indexOf(p);if(a>=0){const n={kind:12,editor:p,editorIndex:a};this._onDidModelChange.fire(n)}})),u.add(p.onDidChangeDirty(()=>{const a={kind:11,editor:p,editorIndex:this.editors.indexOf(p)};this._onDidModelChange.fire(a)})),u.add(p.onDidChangeLabel(()=>{const a={kind:7,editor:p,editorIndex:this.editors.indexOf(p)};this._onDidModelChange.fire(a)})),u.add(p.onDidChangeCapabilities(()=>{const a={kind:8,editor:p,editorIndex:this.editors.indexOf(p)};this._onDidModelChange.fire(a)})),u.add(this.onDidModelChange(a=>{a.kind===4&&a.editor?.matches(p)&&(0,I.dispose)(u)}))}replaceEditor(p,u,a,n=!0){const h=this.doCloseEditor(p,f.EditorCloseContext.REPLACE,n);if(this.splice(a,!1,u),h){const g={kind:4,...h};this._onDidModelChange.fire(g)}}closeEditor(p,u=f.EditorCloseContext.UNKNOWN,a=!0){const n=this.doCloseEditor(p,u,a);if(n){const h={kind:4,...n};return this._onDidModelChange.fire(h),n}}doCloseEditor(p,u,a){const n=this.indexOf(p);if(n===-1)return;const h=this.editors[n],g=this.isSticky(n);if(a&&this.matches(this.active,h))if(this.mru.length>1){let d;this.focusRecentEditorAfterClose?d=this.mru[1]:n===this.editors.length-1?d=this.editors[n-1]:d=this.editors[n+1],this.doSetActive(d,this.editors.indexOf(d))}else this.active=null;return this.matches(this.preview,h)&&(this.preview=null),this.splice(n,!0),{editor:h,sticky:g,editorIndex:n,context:u}}moveEditor(p,u){u>=this.editors.length?u=this.editors.length-1:u<0&&(u=0);const a=this.indexOf(p);if(a<0||u===a)return;const n=this.editors[a];this.isSticky(a)&&u>this.sticky?this.sticky--:!this.isSticky(a)&&u<=this.sticky&&this.sticky++,this.editors.splice(a,1),this.editors.splice(u,0,n);const h={kind:5,editor:n,oldEditorIndex:a,editorIndex:u};return this._onDidModelChange.fire(h),n}setActive(p){let u;return p?u=this.setEditorActive(p):this.setGroupActive(),u}setGroupActive(){this._onDidModelChange.fire({kind:0})}setEditorActive(p){const u=this.findEditor(p);if(!u)return;const[a,n]=u;return this.doSetActive(a,n),a}doSetActive(p,u){if(this.matches(this.active,p))return;this.active=p;const a=this.indexOf(p,this.mru);this.mru.splice(a,1),this.mru.unshift(p);const n={kind:6,editor:p,editorIndex:u};this._onDidModelChange.fire(n)}setIndex(p){this._onDidModelChange.fire({kind:1})}pin(p){const u=this.findEditor(p);if(!u)return;const[a,n]=u;return this.doPin(a,n),a}doPin(p,u){if(this.isPinned(p))return;this.preview=null;const a={kind:9,editor:p,editorIndex:u};this._onDidModelChange.fire(a)}unpin(p){const u=this.findEditor(p);if(!u)return;const[a,n]=u;return this.doUnpin(a,n),a}doUnpin(p,u){if(!this.isPinned(p))return;const a=this.preview;this.preview=p;const n={kind:9,editor:p,editorIndex:u};this._onDidModelChange.fire(n),a&&this.closeEditor(a,f.EditorCloseContext.UNPIN)}isPinned(p){let u;return typeof p=="number"?u=this.editors[p]:u=p,!this.matches(this.preview,u)}stick(p){const u=this.findEditor(p);if(!u)return;const[a,n]=u;return this.doStick(a,n),a}doStick(p,u){if(this.isSticky(u))return;this.pin(p),this.moveEditor(p,this.sticky+1),this.sticky++;const a={kind:10,editor:p,editorIndex:u};this._onDidModelChange.fire(a)}unstick(p){const u=this.findEditor(p);if(!u)return;const[a,n]=u;return this.doUnstick(a,n),a}doUnstick(p,u){if(!this.isSticky(u))return;this.moveEditor(p,this.sticky),this.sticky--;const a={kind:10,editor:p,editorIndex:u};this._onDidModelChange.fire(a)}isSticky(p){if(this.sticky<0)return!1;let u;return typeof p=="number"?u=p:u=this.indexOf(p),u<0?!1:u<=this.sticky}splice(p,u,a){const n=this.editors[p];if(u&&this.isSticky(p)&&this.sticky--,a?this.editors.splice(p,u?1:0,a):this.editors.splice(p,u?1:0),!u&&a)this.mru.length===0?this.mru.push(a):this.mru.splice(1,0,a);else{const h=this.indexOf(n,this.mru);u&&!a?this.mru.splice(h,1):u&&a&&this.mru.splice(h,1,a)}}indexOf(p,u=this.editors,a){let n=-1;if(!p)return n;for(let h=0;h<u.length;h++){const g=u[h];if(this.matches(g,p,a))if(a?.supportSideBySide&&g instanceof A.SideBySideEditorInput&&!(p instanceof A.SideBySideEditorInput))n=h;else{n=h;break}}return n}findEditor(p,u){const a=this.indexOf(p,this.editors,u);if(a!==-1)return[this.editors[a],a]}isFirst(p){return this.matches(this.editors[0],p)}isLast(p){return this.matches(this.editors[this.editors.length-1],p)}contains(p,u){for(const a of this.editors)if(this.matches(a,p,u))return!0;return!1}matches(p,u,a){if(!p||!u)return!1;if(a?.supportSideBySide&&p instanceof A.SideBySideEditorInput&&!(u instanceof A.SideBySideEditorInput))switch(a.supportSideBySide){case f.SideBySideEditor.ANY:if(this.matches(p.primary,u,a)||this.matches(p.secondary,u,a))return!0;break;case f.SideBySideEditor.BOTH:if(this.matches(p.primary,u,a)&&this.matches(p.secondary,u,a))return!0;break}const n=p===u;return a?.strictEquals?n:n||p.matches(u)}get isLocked(){return this.locked}lock(p){this.isLocked!==p&&(this.locked=p,this._onDidModelChange.fire({kind:2}))}clone(){const p=this.instantiationService.createInstance(Vi,void 0);p.editors=this.editors.slice(0),p.mru=this.mru.slice(0),p.preview=this.preview,p.active=this.active,p.sticky=this.sticky;for(const u of p.editors)p.registerEditorListeners(u);return p}serialize(){const p=w.Registry.as(f.EditorExtensions.EditorFactory);let u=[],a=[],n,h=this.sticky;for(let d=0;d<this.editors.length;d++){const m=this.editors[d];let b=!1;const E=p.getEditorSerializer(m);if(E){const y=E.serialize(m);typeof y=="string"?(b=!0,a.push({id:m.typeId,value:y}),u.push(m),this.preview===m&&(n=u.length-1)):b=!1}!b&&this.isSticky(d)&&h--}const g=this.mru.map(d=>this.indexOf(d,u)).filter(d=>d>=0);return{id:this.id,locked:this.locked?!0:void 0,editors:a,mru:g,preview:n,sticky:h>=0?h:void 0}}deserialize(p){const u=w.Registry.as(f.EditorExtensions.EditorFactory);return typeof p.id=="number"?(this._id=p.id,Vi.IDS=Math.max(p.id+1,Vi.IDS)):this._id=Vi.IDS++,p.locked&&(this.locked=!0),this.editors=(0,v.coalesce)(p.editors.map((a,n)=>{let h;const g=u.getEditorSerializer(a.id);if(g){const d=g.deserialize(this.instantiationService,a.value);d instanceof _.EditorInput&&(h=d,this.registerEditorListeners(h))}return!h&&typeof p.sticky=="number"&&n<=p.sticky&&p.sticky--,h})),this.mru=(0,v.coalesce)(p.mru.map(a=>this.editors[a])),this.active=this.mru[0],typeof p.preview=="number"&&(this.preview=this.editors[p.preview]),typeof p.sticky=="number"&&(this.sticky=p.sticky),this._id}};l.IDS=0,l=Ee([W(1,k.IInstantiationService),W(2,D.IConfigurationService)],l),e.EditorGroupModel=l}),define(ne[2266],re([1,0,90,2,21,6,106,125,761,5,571,564,411]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AudioCueLineFeatureContribution=void 0;let c=class extends f.Disposable{constructor(p,u,a){super();this.editorService=p,this.instantiationService=u,this.audioCueService=a,this.store=this._register(new f.DisposableStore),this.features=[this.instantiationService.createInstance(i,o.AudioCue.error,D.MarkerSeverity.Error),this.instantiationService.createInstance(i,o.AudioCue.warning,D.MarkerSeverity.Warning),this.instantiationService.createInstance(S),this.instantiationService.createInstance(s),this.instantiationService.createInstance(l)];const n=(0,v.derivedObservable)("someAudioCueFeatureIsEnabled",g=>this.features.some(d=>this.audioCueService.isEnabled(d.audioCue).read(g))),h=(0,v.observableFromEvent)(this.editorService.onDidActiveEditorChange,g=>{const d=this.editorService.activeTextEditorControl,m=(0,k.isDiffEditor)(d)?d.getOriginalEditor():(0,k.isCodeEditor)(d)?d:void 0;return m&&m.hasModel()?{editor:m,model:m.getModel()}:void 0});this._register((0,v.autorun)(g=>{if(this.store.clear(),!n.read(g))return;const d=h.read(g);d&&this.registerAudioCuesForEditor(d.editor,d.model,this.store)},"updateAudioCuesEnabled"))}registerAudioCuesForEditor(p,u,a){const n=(0,v.observableFromEvent)(p.onDidChangeCursorPosition,b=>{if(!(b&&b.reason!==3&&b.reason!==0))return p.getPosition()?.lineNumber}),h=(0,v.debouncedObservable)(n,300,a),g=(0,v.wasEventTriggeredRecently)(u.onDidChangeContent.bind(u),1e3,a),d=this.features.map(b=>{const E=b.getObservableState(p,u),y=(0,v.derivedObservable)(`isPresentInLine:${b.audioCue.name}`,T=>{if(!this.audioCueService.isEnabled(b.audioCue).read(T))return!1;const R=h.read(T);return R===void 0?!1:E.read(T).isPresent(R)});return(0,v.derivedObservable)(`typingDebouncedFeatureState: ${b.audioCue.name}`,T=>b.debounceWhileTyping&&g.read(T)?(h.read(T),y.get()):y.read(T))}),m=(0,v.derivedObservable)("states",b=>({lineNumber:h.read(b),featureStates:new Map(this.features.map((E,y)=>[E,d[y].read(b)]))}));a.add((0,v.autorunDelta)("Play Audio Cue",m,({lastValue:b,newValue:E})=>{const y=this.features.filter(T=>E?.featureStates.get(T)&&(!b?.featureStates?.get(T)||E.lineNumber!==b.lineNumber));this.audioCueService.playAudioCues(y.map(T=>T.audioCue))}))}};c=Ee([W(0,_.IEditorService),W(1,w.IInstantiationService),W(2,o.IAudioCueService)],c),e.AudioCueLineFeatureContribution=c;let i=class{constructor(p,u,a){this.audioCue=p,this.severity=u,this.markerService=a,this.debounceWhileTyping=!0}getObservableState(p,u){return(0,v.observableFromEvent)(A.Event.filter(this.markerService.onMarkerChanged,a=>a.some(n=>n.toString()===u.uri.toString())),()=>({isPresent:a=>this.markerService.read({resource:u.uri}).some(h=>h.severity===this.severity&&h.startLineNumber<=a&&a<=h.endLineNumber)}))}};i=Ee([W(2,D.IMarkerService)],i);class S{constructor(){this.audioCue=o.AudioCue.foldedArea}getObservableState(p,u){const a=I.FoldingController.get(p);return a?(0,v.observableFromPromise)(a.getFoldingModel()??Promise.resolve(void 0)).map(h=>({isPresent:g=>{const d=h.value?.getRegionAtLine(g);return d?d.isCollapsed&&d.startLineNumber===g:!1}})):(0,v.constObservable)({isPresent:()=>!1})}}let s=class{constructor(p){this.debugService=p,this.audioCue=o.AudioCue.break}getObservableState(p,u){return(0,v.observableFromEvent)(this.debugService.getModel().onDidChangeBreakpoints,()=>({isPresent:a=>this.debugService.getModel().getBreakpoints({uri:u.uri,lineNumber:a}).length>0}))}};s=Ee([W(0,t.IDebugService)],s);class l{constructor(){this.audioCue=o.AudioCue.inlineSuggestion}getObservableState(p,u){const a=C.GhostTextController.get(p);if(!a)return(0,v.constObservable)({isPresent:()=>!1});const n=(0,v.observableFromEvent)(a.onActiveModelDidChange,()=>a.activeModel).map(h=>h?(0,v.observableFromEvent)(h.inlineCompletionsModel.onDidChange,()=>h.inlineCompletionsModel.ghostText):void 0);return(0,v.derivedObservable)("ghostText",h=>{const g=n.read(h)?.read(h);return{isPresent(d){return g?.lineNumber===d}}})}}}),define(ne[2267],re([1,0,172,5,71,2123,1449,20,209,10,6,21,229,61,2,122,12,24,66,277,16,7,73,1072]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyTreePeekWidget=void 0;var h;(function(b){b.Loading="loading",b.Message="message",b.Data="data"})(h||(h={}));class g{constructor(E,y){this.ratio=E,this.height=y}static store(E,y){y.store("callHierarchyPeekLayout",JSON.stringify(E),0,1)}static retrieve(E){const y=E.get("callHierarchyPeekLayout",0,"{}"),T={ratio:.7,height:17};try{return{...T,...JSON.parse(y)}}catch{return T}}}class d extends _.WorkbenchAsyncDataTree{}let m=class Oo extends t.PeekViewWidget{constructor(E,y,T,R,O,x,F,L,M,N,B){super(E,{showFrame:!0,showArrow:!0,isResizeable:!0,isAccessible:!0},B);this._where=y,this._direction=T,this._peekViewService=O,this._editorService=x,this._textModelService=F,this._storageService=L,this._menuService=M,this._contextKeyService=N,this._instantiationService=B,this._treeViewStates=new Map,this._previewDisposable=new i.DisposableStore,this.create(),this._peekViewService.addExclusiveWidget(E,this),this._applyTheme(R.getColorTheme()),this._disposables.add(R.onDidColorThemeChange(this._applyTheme,this)),this._disposables.add(this._previewDisposable)}dispose(){g.store(this._layoutInfo,this._storageService),this._splitView.dispose(),this._tree.dispose(),this._editor.dispose(),super.dispose()}get direction(){return this._direction}_applyTheme(E){const y=E.getColor(t.peekViewBorder)||r.Color.transparent;this.style({arrowColor:y,frameColor:y,headerBackgroundColor:E.getColor(t.peekViewTitleBackground)||r.Color.transparent,primaryHeadingColor:E.getColor(t.peekViewTitleForeground),secondaryHeadingColor:E.getColor(t.peekViewTitleInfoForeground)})}_fillHead(E){super._fillHead(E,!0);const y=this._menuService.createMenu(Oo.TitleMenu,this._contextKeyService),T=()=>{const R=[];(0,n.createAndFillInActionBarActions)(y,void 0,R),this._actionbarWidget.clear(),this._actionbarWidget.push(R,{label:!1,icon:!0})};this._disposables.add(y),this._disposables.add(y.onDidChange(T)),T()}_fillBody(E){this._layoutInfo=g.retrieve(this._storageService),this._dim=new w.Dimension(0,0),this._parent=E,E.classList.add("call-hierarchy");const y=document.createElement("div");y.classList.add("message"),E.appendChild(y),this._message=y,this._message.tabIndex=0;const T=document.createElement("div");T.classList.add("results"),E.appendChild(T),this._splitView=new I.SplitView(T,{orientation:1});const R=document.createElement("div");R.classList.add("editor"),T.appendChild(R);let O={scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!1},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1}};this._editor=this._instantiationService.createInstance(o.EmbeddedCodeEditorWidget,R,O,this.editor);const x=document.createElement("div");x.classList.add("tree"),T.appendChild(x);const F={sorter:new A.Sorter,accessibilityProvider:new A.AccessibilityProvider(()=>this._direction),identityProvider:new A.IdentityProvider(()=>this._direction),expandOnlyOnTwistieClick:!0,overrideStyles:{listBackground:t.peekViewResultsBackground}};this._tree=this._instantiationService.createInstance(d,"CallHierarchyPeek",x,new A.VirtualDelegate,[this._instantiationService.createInstance(A.CallRenderer)],this._instantiationService.createInstance(A.DataSource,()=>this._direction),F),this._splitView.addView({onDidChange:v.Event.None,element:R,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:L=>{this._dim.height&&this._editor.layout({height:this._dim.height,width:L})}},I.Sizing.Distribute),this._splitView.addView({onDidChange:v.Event.None,element:x,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:L=>{this._dim.height&&this._tree.layout(this._dim.height,L)}},I.Sizing.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this._layoutInfo.ratio=this._splitView.getViewSize(0)/this._dim.width)})),this._disposables.add(this._tree.onDidChangeFocus(this._updatePreview,this)),this._disposables.add(this._editor.onMouseDown(L=>{const{event:M,target:N}=L;if(M.detail!==2)return;const[B]=this._tree.getFocus();!B||(this.dispose(),this._editorService.openEditor({resource:B.item.uri,options:{selection:N.range}}))})),this._disposables.add(this._tree.onMouseDblClick(L=>{L.target!==p.TreeMouseEventTarget.Twistie&&L.element&&(this.dispose(),this._editorService.openEditor({resource:L.element.item.uri,options:{selection:L.element.item.selectionRange,pinned:!0}}))})),this._disposables.add(this._tree.onDidChangeSelection(L=>{const[M]=L.elements;M&&L.browserEvent instanceof KeyboardEvent&&(this.dispose(),this._editorService.openEditor({resource:M.item.uri,options:{selection:M.item.selectionRange,pinned:!0}}))}))}async _updatePreview(){const[E]=this._tree.getFocus();if(!E)return;this._previewDisposable.clear();const y={description:"call-hierarchy-decoration",stickiness:1,className:"call-decoration",overviewRuler:{color:(0,s.themeColorFromId)(t.peekViewEditorMatchHighlight),position:S.OverviewRulerLane.Center}};let T;this._direction==="outgoingCalls"?T=E.parent?E.parent.item.uri:E.model.root.uri:T=E.item.uri;const R=await this._textModelService.createModelReference(T);this._editor.setModel(R.object.textEditorModel);let O=[],x,F=E.locations;F||(F=[{uri:E.item.uri,range:E.item.selectionRange}]);for(const M of F)M.uri.toString()===T.toString()&&(O.push({range:M.range,options:y}),x=x?D.Range.plusRange(M.range,x):M.range);if(x){this._editor.revealRangeInCenter(x,1);const M=this._editor.deltaDecorations([],O);this._previewDisposable.add((0,i.toDisposable)(()=>this._editor.deltaDecorations(M,[])))}this._previewDisposable.add(R);const L=this._direction==="outgoingCalls"?(0,k.localize)(0,null,E.model.root.name):(0,k.localize)(1,null,E.model.root.name);this.setTitle(L)}showLoading(){this._parent.dataset.state="loading",this.setTitle((0,k.localize)(2,null)),this._show()}showMessage(E){this._parent.dataset.state="message",this.setTitle(""),this.setMetaTitle(""),this._message.innerText=E,this._show(),this._message.focus()}async showModel(E){this._show();const y=this._treeViewStates.get(this._direction);await this._tree.setInput(E,y);const T=this._tree.getNode(E).children[0];await this._tree.expand(T.element),T.children.length===0?this.showMessage(this._direction==="outgoingCalls"?(0,k.localize)(3,null,E.root.name):(0,k.localize)(4,null,E.root.name)):(this._parent.dataset.state="data",(!y||this._tree.getFocus().length===0)&&this._tree.setFocus([T.children[0].element]),this._tree.domFocus(),this._updatePreview())}getModel(){return this._tree.getInput()}getFocused(){return this._tree.getFocus()[0]}async updateDirection(E){const y=this._tree.getInput();y&&E!==this._direction&&(this._treeViewStates.set(this._direction,this._tree.getViewState()),this._direction=E,await this.showModel(y))}_show(){this._isShowing||(this.editor.revealLineInCenterIfOutsideViewport(this._where.lineNumber,0),super.show(D.Range.fromPositions(this._where),this._layoutInfo.height))}_onWidth(E){this._dim&&this._doLayoutBody(this._dim.height,E)}_doLayoutBody(E,y){(this._dim.height!==E||this._dim.width!==y)&&(super._doLayoutBody(E,y),this._dim=new w.Dimension(y,E),this._layoutInfo.height=this._viewZone?this._viewZone.heightInLines:this._layoutInfo.height,this._splitView.layout(y),this._splitView.resizeView(0,y*this._layoutInfo.ratio))}};m.TitleMenu=new u.MenuId("callhierarchy/title"),m=Ee([W(3,s.IThemeService),W(4,t.IPeekViewService),W(5,C.IEditorService),W(6,c.ITextModelService),W(7,l.IStorageService),W(8,u.IMenuService),W(9,a.IContextKeyService),W(10,f.IInstantiationService)],m),e.CallHierarchyTreePeekWidget=m}),define(ne[2268],re([1,0,1448,572,30,5,2267,6,39,7,2,58,172,24,72,20,16,33,63,22]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const u=new w.RawContextKey("editorHasCallHierarchyProvider",!1,(0,t.localize)(0,null)),a=new w.RawContextKey("callHierarchyVisible",!1,(0,t.localize)(1,null)),n=new w.RawContextKey("callHierarchyDirection",void 0,{type:"string",description:(0,t.localize)(2,null)});function h(d){return d==="outgoingCalls"||d==="incomingCalls"?d:"incomingCalls"}let g=class un{constructor(m,b,E,y,T){this._editor=m,this._contextKeyService=b,this._storageService=E,this._editorService=y,this._instantiationService=T,this._dispoables=new v.DisposableStore,this._sessionDisposables=new v.DisposableStore,this._ctxIsVisible=a.bindTo(this._contextKeyService),this._ctxHasProvider=u.bindTo(this._contextKeyService),this._ctxDirection=n.bindTo(this._contextKeyService),this._dispoables.add(D.Event.any(m.onDidChangeModel,m.onDidChangeModelLanguage,f.CallHierarchyProviderRegistry.onDidChange)(()=>{this._ctxHasProvider.set(m.hasModel()&&f.CallHierarchyProviderRegistry.has(m.getModel()))})),this._dispoables.add(this._sessionDisposables)}static get(m){return m.getContribution(un.Id)}dispose(){this._ctxHasProvider.reset(),this._ctxIsVisible.reset(),this._dispoables.dispose()}async startCallHierarchyFromEditor(){if(this._sessionDisposables.clear(),!this._editor.hasModel())return;const m=this._editor.getModel(),b=this._editor.getPosition();if(!f.CallHierarchyProviderRegistry.has(m))return;const E=new _.CancellationTokenSource,y=f.CallHierarchyModel.create(m,b,E.token),T=h(this._storageService.get(un._StorageDirection,0,"incomingCalls"));this._showCallHierarchyWidget(b,T,y,E)}async startCallHierarchyFromCallHierarchy(){if(!this._widget)return;const m=this._widget.getModel(),b=this._widget.getFocused();if(!b||!m)return;const E=await this._editorService.openCodeEditor({resource:b.item.uri},this._editor);if(!E)return;const y=m.fork(b.item);this._sessionDisposables.clear(),un.get(E)?._showCallHierarchyWidget(S.Range.lift(y.root.selectionRange).getStartPosition(),this._widget.direction,Promise.resolve(y),new _.CancellationTokenSource)}_showCallHierarchyWidget(m,b,E,y){this._ctxIsVisible.set(!0),this._ctxDirection.set(b),D.Event.any(this._editor.onDidChangeModel,this._editor.onDidChangeModelLanguage)(this.endCallHierarchy,this,this._sessionDisposables),this._widget=this._instantiationService.createInstance(k.CallHierarchyTreePeekWidget,this._editor,m,b),this._widget.showLoading(),this._sessionDisposables.add(this._widget.onDidClose(()=>{this.endCallHierarchy(),this._storageService.store(un._StorageDirection,this._widget.direction,0,0)})),this._sessionDisposables.add({dispose(){y.dispose(!0)}}),this._sessionDisposables.add(this._widget),E.then(T=>{y.token.isCancellationRequested||(T?(this._sessionDisposables.add(T),this._widget.showModel(T)):this._widget.showMessage((0,t.localize)(3,null)))}).catch(T=>{if((0,p.isCancellationError)(T)){this.endCallHierarchy();return}this._widget.showMessage((0,t.localize)(4,null))})}showOutgoingCalls(){this._widget?.updateDirection("outgoingCalls"),this._ctxDirection.set("outgoingCalls")}showIncomingCalls(){this._widget?.updateDirection("incomingCalls"),this._ctxDirection.set("incomingCalls")}endCallHierarchy(){this._sessionDisposables.clear(),this._ctxIsVisible.set(!1),this._editor.focus()}};g.Id="callHierarchy",g._StorageDirection="callHierarchy/defaultDirection",g=Ee([W(1,w.IContextKeyService),W(2,c.IStorageService),W(3,i.ICodeEditorService),W(4,A.IInstantiationService)],g),(0,I.registerEditorContribution)(g.Id,g),(0,s.registerAction2)(class extends I.EditorAction2{constructor(){super({id:"editor.showCallHierarchy",title:{value:(0,t.localize)(5,null),original:"Peek Call Hierarchy"},menu:{id:s.MenuId.EditorContextPeek,group:"navigation",order:1e3,when:w.ContextKeyExpr.and(u,o.PeekContext.notInPeekEditor)},keybinding:{when:C.EditorContextKeys.editorTextFocus,weight:200,primary:1024+512+38},precondition:w.ContextKeyExpr.and(u,o.PeekContext.notInPeekEditor)})}async runEditorCommand(d,m){return g.get(m)?.startCallHierarchyFromEditor()}}),(0,s.registerAction2)(class extends I.EditorAction2{constructor(){super({id:"editor.showIncomingCalls",title:{value:(0,t.localize)(6,null),original:"Show Incoming Calls"},icon:(0,r.registerIcon)("callhierarchy-incoming",l.Codicon.callIncoming,(0,t.localize)(7,null)),precondition:w.ContextKeyExpr.and(a,n.isEqualTo("outgoingCalls")),keybinding:{weight:200,primary:1024+512+38},menu:{id:k.CallHierarchyTreePeekWidget.TitleMenu,when:n.isEqualTo("outgoingCalls"),order:1}})}runEditorCommand(d,m){return g.get(m)?.showIncomingCalls()}}),(0,s.registerAction2)(class extends I.EditorAction2{constructor(){super({id:"editor.showOutgoingCalls",title:{value:(0,t.localize)(8,null),original:"Show Outgoing Calls"},icon:(0,r.registerIcon)("callhierarchy-outgoing",l.Codicon.callOutgoing,(0,t.localize)(9,null)),precondition:w.ContextKeyExpr.and(a,n.isEqualTo("incomingCalls")),keybinding:{weight:200,primary:1024+512+38},menu:{id:k.CallHierarchyTreePeekWidget.TitleMenu,when:n.isEqualTo("incomingCalls"),order:1}})}runEditorCommand(d,m){return g.get(m)?.showOutgoingCalls()}}),(0,s.registerAction2)(class extends I.EditorAction2{constructor(){super({id:"editor.refocusCallHierarchy",title:{value:(0,t.localize)(10,null),original:"Refocus Call Hierarchy"},precondition:a,keybinding:{weight:200,primary:1024+3}})}async runEditorCommand(d,m){return g.get(m)?.startCallHierarchyFromCallHierarchy()}}),(0,s.registerAction2)(class extends I.EditorAction2{constructor(){super({id:"editor.closeCallHierarchy",title:(0,t.localize)(11,null),icon:l.Codicon.close,precondition:w.ContextKeyExpr.and(a,w.ContextKeyExpr.not("config.editor.stablePeek")),keybinding:{weight:200+10,primary:9},menu:{id:k.CallHierarchyTreePeekWidget.TitleMenu,order:1e3}})}runEditorCommand(d,m){return g.get(m)?.endCallHierarchy()}})}),define(ne[2269],re([1,0,1463,53,21,750,17,210,8,16,59]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoLineQuickAccessProvider=void 0;let C=class extends A.AbstractGotoLineQuickAccessProvider{constructor(i,S,s){super();this.editorService=i,this.editorGroupService=S,this.configurationService=s,this.onDidActiveTextEditorControlChange=this.editorService.onDidActiveEditorChange}get configuration(){const i=this.configurationService.getValue().workbench?.editor;return{openEditorPinned:!i?.enablePreviewFromQuickOpen||!i?.enablePreview}}get activeTextEditorControl(){return this.editorService.activeTextEditorControl}gotoLocation(i,S){if((S.keyMods.alt||this.configuration.openEditorPinned&&S.keyMods.ctrlCmd||S.forceSideBySide)&&this.editorService.activeEditor){i.restoreViewState?.();const s={selection:S.range,pinned:S.keyMods.ctrlCmd||this.configuration.openEditorPinned,preserveFocus:S.preserveFocus};this.editorGroupService.sideGroup.openEditor(this.editorService.activeEditor,s)}else super.gotoLocation(i,S)}};C=Ee([W(0,_.IEditorService),W(1,v.IEditorGroupsService),W(2,I.IConfigurationService)],C),e.GotoLineQuickAccessProvider=C,k.Registry.as(D.Extensions.Quickaccess).registerQuickAccessProvider({ctor:C,prefix:A.AbstractGotoLineQuickAccessProvider.PREFIX,placeholder:(0,t.localize)(0,null),helpEntries:[{description:(0,t.localize)(1,null),needsEditor:!0}]});class o extends w.Action2{constructor(){super({id:"workbench.action.gotoLine",title:{value:(0,t.localize)(2,null),original:"Go to Line/Column..."},f1:!0,keybinding:{weight:200,when:null,primary:2048|37,mac:{primary:256|37}}})}async run(i){i.get(f.IQuickInputService).quickAccess.show(C.PREFIX)}}(0,w.registerAction2)(o)}),define(ne[498],re([1,0,1530,9,48,19,90,21,18,231]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getUriFromSource=e.Source=e.UNKNOWN_SOURCE_LABEL=void 0,e.UNKNOWN_SOURCE_LABEL=t.localize(0,null);class v{constructor(c,i,S){let s;c?(this.raw=c,s=this.raw.path||this.raw.name||"",this.available=!0):(this.raw={name:e.UNKNOWN_SOURCE_LABEL},this.available=!1,s=`${k.DEBUG_SCHEME}:${e.UNKNOWN_SOURCE_LABEL}`),this.uri=C(this.raw,s,i,S)}get name(){return this.raw.name||A.basenameOrAuthority(this.uri)}get origin(){return this.raw.origin}get presentationHint(){return this.raw.presentationHint}get reference(){return this.raw.sourceReference}get inMemory(){return this.uri.scheme===k.DEBUG_SCHEME}openInEditor(c,i,S,s,l){return this.available?c.openEditor({resource:this.uri,description:this.origin,options:{preserveFocus:S,selection:i,revealIfOpened:!0,selectionRevealType:1,pinned:l||!S&&!this.inMemory}},s?D.SIDE_GROUP:D.ACTIVE_GROUP):Promise.resolve(void 0)}static getEncodedDebugData(c){let i,S,s;switch(c.scheme){case I.Schemas.file:i=(0,_.normalize)(c.fsPath);break;case k.DEBUG_SCHEME:if(i=c.path,c.query){const l=c.query.split("&");for(const r of l){const p=r.split("=");if(p.length===2)switch(p[0]){case"session":s=p[1];break;case"ref":S=parseInt(p[1]);break}}}break;default:i=c.toString();break}return{name:A.basenameOrAuthority(c),path:i,sourceReference:S,sessionId:s}}}e.Source=v;function C(o,c,i,S){return typeof o.sourceReference=="number"&&o.sourceReference>0?f.URI.from({scheme:k.DEBUG_SCHEME,path:c,query:`session=${i}&ref=${o.sourceReference}`}):c&&(0,w.isUri)(c)?S.asCanonicalUri(f.URI.parse(c)):c&&(0,_.isAbsolute)(c)?S.asCanonicalUri(f.URI.file(c)):S.asCanonicalUri(f.URI.from({scheme:k.DEBUG_SCHEME,path:c,query:`session=${i}`}))}e.getUriFromSource=C}),define(ne[845],re([1,0,1526,350,52,42,61,90,498,184,136,20,30,126]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugContentProvider=void 0;let i=class Wn{constructor(s,l,r,p,u){this.debugService=l,this.modelService=r,this.languageService=p,this.editorWorkerService=u,this.pendingUpdates=new Map,s.registerTextModelContentProvider(D.DEBUG_SCHEME,this),Wn.INSTANCE=this}dispose(){this.pendingUpdates.forEach(s=>s.dispose())}provideTextContent(s){return this.createOrUpdateContentModel(s,!0)}static refreshDebugContent(s){Wn.INSTANCE&&Wn.INSTANCE.createOrUpdateContentModel(s,!1)}createOrUpdateContentModel(s,l){const r=this.modelService.getModel(s);if(!r&&!l)return null;let p;if(s.query){const a=I.Source.getEncodedDebugData(s);p=this.debugService.getModel().getSession(a.sessionId)}if(p||(p=this.debugService.getViewModel().focusedSession),!p)return Promise.reject(new Error((0,t.localize)(0,null)));const u=a=>{this.debugService.sourceIsNotAvailable(s);const n=this.languageService.createById(c.PLAINTEXT_LANGUAGE_ID),h=a?(0,t.localize)(1,null,s.path,a):(0,t.localize)(2,null,s.path);return this.modelService.createModel(h,n,s)};return p.loadSource(s).then(a=>{if(a&&a.body)if(r){const n=a.body.content,h=this.pendingUpdates.get(r.id);h&&h.cancel();const g=new o.CancellationTokenSource;return this.pendingUpdates.set(r.id,g),this.editorWorkerService.computeMoreMinimalEdits(r.uri,[{text:n,range:r.getFullModelRange()}]).then(d=>(this.pendingUpdates.delete(r.id),!g.token.isCancellationRequested&&d&&d.length>0&&r.applyEdits(d.map(m=>v.EditOperation.replace(C.Range.lift(m.range),m.text))),r))}else{const n=a.body.mimeType||(0,f.getMimeTypes)(s)[0],h=this.languageService.createByMimeType(n);return this.modelService.createModel(a.body.content,h,s)}return u()},a=>u(a.message))}};i=Ee([W(0,k.ITextModelService),W(1,D.IDebugService),W(2,_.IModelService),W(3,A.ILanguageService),W(4,w.IEditorWorkerService)],i),e.DebugContentProvider=i}),define(ne[2270],re([1,0,10,18,48,258,241,125,582,487,5,68,12,2,78,796,45,19,795,6,13,36,1619,11,52,20,314,260,21,472,474,41,23,67,134,33,63,237,62]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkersViewModel=e.MarkerViewModel=e.Filter=e.RelatedInformationRenderer=e.MarkerRenderer=e.FileResourceMarkersRenderer=e.ResourceMarkersRenderer=e.VirtualDelegate=e.MarkersTreeAccessibilityProvider=void 0;let P=class{constructor(ie){this.labelService=ie}getWidgetAriaLabel(){return(0,n.localize)(0,null)}getAriaLabel(ie){if(ie instanceof I.ResourceMarkers){const ce=this.labelService.getUriLabel(ie.resource,{relative:!0})||ie.resource.fsPath;return w.default.MARKERS_TREE_ARIA_LABEL_RESOURCE(ie.markers.length,ie.name,_.dirname(ce))}return ie instanceof I.Marker?w.default.MARKERS_TREE_ARIA_LABEL_MARKER(ie):ie instanceof I.RelatedInformation?w.default.MARKERS_TREE_ARIA_LABEL_RELATED_INFORMATION(ie.raw):null}};P=Ee([W(0,s.ILabelService)],P),e.MarkersTreeAccessibilityProvider=P;var V;(function(se){se.ResourceMarkers="rm",se.Marker="m",se.RelatedInformation="ri"})(V||(V={}));class z{constructor(ie){this.markersViewState=ie}getHeight(ie){if(ie instanceof I.Marker){const ce=this.markersViewState.getViewModel(ie);return(!ce||ce.multiline?ie.lines.length:1)*z.LINE_HEIGHT}return z.LINE_HEIGHT}getTemplateId(ie){return ie instanceof I.ResourceMarkers?"rm":ie instanceof I.Marker?"m":"ri"}}e.VirtualDelegate=z,z.LINE_HEIGHT=22;var U;(function(se){se[se.ResourceMarkers=0]="ResourceMarkers",se[se.Marker=1]="Marker",se[se.RelatedInformation=2]="RelatedInformation"})(U||(U={}));let H=class{constructor(ie,ce,le,ae,ue){this.labels=ie,this.themeService=le,this.labelService=ae,this.fileService=ue,this.renderedNodes=new Map,this.disposables=new c.DisposableStore,this.templateId="rm",ce(this.onDidChangeRenderNodeCount,this,this.disposables)}renderTemplate(ie){const ce=Object.create(null),le=t.append(ie,t.$(".resource-label-container"));ce.resourceLabel=this.labels.create(le,{supportHighlights:!0});const ae=t.append(ie,t.$(".count-badge-wrapper"));return ce.count=new A.CountBadge(ae),ce.styler=(0,C.attachBadgeStyler)(ce.count,this.themeService),ce}renderElement(ie,ce,le){const ae=ie.element,ue=ie.filterData&&ie.filterData.uriMatches||[];this.fileService.hasProvider(ae.resource)||ae.resource.scheme===f.Schemas.untitled?le.resourceLabel.setFile(ae.resource,{matches:ue}):le.resourceLabel.setResource({name:ae.name,description:this.labelService.getUriLabel((0,l.dirname)(ae.resource),{relative:!0}),resource:ae.resource},{matches:ue}),this.updateCount(ie,le),this.renderedNodes.set(ie,le)}disposeElement(ie){this.renderedNodes.delete(ie)}disposeTemplate(ie){ie.resourceLabel.dispose(),ie.styler.dispose()}onDidChangeRenderNodeCount(ie){const ce=this.renderedNodes.get(ie);!ce||this.updateCount(ie,ce)}updateCount(ie,ce){ce.count.setCount(ie.children.reduce((le,ae)=>le+(ae.visible?1:0),0))}dispose(){this.disposables.dispose()}};H=Ee([W(2,o.IThemeService),W(3,s.ILabelService),W(4,O.IFileService)],H),e.ResourceMarkersRenderer=H;class K extends H{}e.FileResourceMarkersRenderer=K;let G=class{constructor(ie,ce,le){this.markersViewState=ie,this.instantiationService=ce,this.openerService=le,this.templateId="m"}renderTemplate(ie){const ce=Object.create(null);return ce.markerWidget=new Y(ie,this.markersViewState,this.openerService,this.instantiationService),ce}renderElement(ie,ce,le){le.markerWidget.render(ie.element,ie.filterData)}disposeTemplate(ie){ie.markerWidget.dispose()}};G=Ee([W(1,v.IInstantiationService),W(2,R.IOpenerService)],G),e.MarkerRenderer=G;const q=(0,M.registerIcon)("markers-view-multi-line-expanded",L.Codicon.chevronUp,(0,n.localize)(1,null)),Z=(0,M.registerIcon)("markers-view-multi-line-collapsed",L.Codicon.chevronDown,(0,n.localize)(2,null)),j="problems.action.toggleMultiline";class X extends F.ActionViewItem{render(ie){super.render(ie),this.updateExpandedAttribute()}updateClass(){super.updateClass(),this.updateExpandedAttribute()}updateExpandedAttribute(){this.element&&this.element.setAttribute("aria-expanded",`${this._action.class===o.ThemeIcon.asClassName(q)}`)}}class Y extends c.Disposable{constructor(ie,ce,le,ae){super();this.parent=ie,this.markersViewModel=ce,this._openerService=le,this.disposables=this._register(new c.DisposableStore),this.actionBar=this._register(new i.ActionBar(t.append(ie,t.$(".actions")),{actionViewItemProvider:ue=>ue.id===S.QuickFixAction.ID?ae.createInstance(S.QuickFixActionViewItem,ue):void 0})),this.icon=t.append(ie,t.$("")),this.messageAndDetailsContainer=t.append(ie,t.$(".marker-message-details-container"))}render(ie,ce){this.actionBar.clear(),this.disposables.clear(),t.clearNode(this.messageAndDetailsContainer),this.icon.className=`marker-icon codicon ${T.SeverityIcon.className(D.MarkerSeverity.toSeverity(ie.marker.severity))}`,this.renderQuickfixActionbar(ie),this.renderMessageAndDetails(ie,ce),this.disposables.add(t.addDisposableListener(this.parent,t.EventType.MOUSE_OVER,()=>this.markersViewModel.onMarkerMouseHover(ie))),this.disposables.add(t.addDisposableListener(this.parent,t.EventType.MOUSE_LEAVE,()=>this.markersViewModel.onMarkerMouseLeave(ie)))}renderQuickfixActionbar(ie){const ce=this.markersViewModel.getViewModel(ie);if(ce){const le=ce.quickFixAction;this.actionBar.push([le],{icon:!0,label:!1}),this.icon.classList.toggle("quickFix",le.enabled),le.onDidChange(({enabled:ae})=>{(0,u.isUndefinedOrNull)(ae)||this.icon.classList.toggle("quickFix",ae)},this,this.disposables),le.onShowQuickFixes(()=>{const ae=this.actionBar.viewItems[0];ae&&ae.showQuickFixes()},this,this.disposables)}}renderMultilineActionbar(ie,ce){const le=this.disposables.add(new i.ActionBar(t.append(ce,t.$(".multiline-actions")),{actionViewItemProvider:fe=>{if(fe.id===j)return new X(void 0,fe,{icon:!0})}}));this.disposables.add((0,c.toDisposable)(()=>le.dispose()));const ae=this.markersViewModel.getViewModel(ie),ue=ae&&ae.multiline,oe=new a.Action(j);oe.enabled=!!ae&&ie.lines.length>1,oe.tooltip=ue?(0,n.localize)(3,null):(0,n.localize)(4,null),oe.class=o.ThemeIcon.asClassName(ue?q:Z),oe.run=()=>(ae&&(ae.multiline=!ae.multiline),Promise.resolve()),le.push([oe],{icon:!0,label:!1})}renderMessageAndDetails(ie,ce){const{marker:le,lines:ae}=ie,ue=this.markersViewModel.getViewModel(ie),oe=!ue||ue.multiline,fe=ce&&ce.lineMatches||[];this.messageAndDetailsContainer.title=ie.marker.message;const pe=[];for(let me=0;me<(oe?ae.length:1);me++){const be=t.append(this.messageAndDetailsContainer,t.$(".marker-message-line")),Ce=t.append(be,t.$(".marker-message"));new k.HighlightedLabel(Ce).set(ae[me].length>1e3?`${ae[me].substring(0,1e3)}...`:ae[me],fe[me]),ae[me]===""&&(be.style.height=`${z.LINE_HEIGHT}px`),pe.push(be)}this.renderDetails(le,ce,pe[0]),this.renderMultilineActionbar(ie,pe[0])}renderDetails(ie,ce,le){if(le.classList.add("details-container"),ie.source||ie.code){const ue=new k.HighlightedLabel(t.append(le,t.$(".marker-source"))),oe=ce&&ce.sourceMatches||[];if(ue.set(ie.source,oe),ie.code)if(typeof ie.code=="string"){const fe=new k.HighlightedLabel(t.append(le,t.$(".marker-code"))),pe=ce&&ce.codeMatches||[];fe.set(ie.code,pe)}else{const fe=t.$(".marker-code"),pe=new k.HighlightedLabel(fe);new N.Link(le,{href:ie.code.target.toString(),label:fe,title:ie.code.target.toString()},void 0,this._openerService);const me=ce&&ce.codeMatches||[];pe.set(ie.code.value,me)}}const ae=t.append(le,t.$("span.marker-line"));ae.textContent=w.default.MARKERS_PANEL_AT_LINE_COL_NUMBER(ie.startLineNumber,ie.startColumn)}}let $=class{constructor(ie){this.labelService=ie,this.templateId="ri"}renderTemplate(ie){const ce=Object.create(null);t.append(ie,t.$(".actions")),t.append(ie,t.$(".icon")),ce.resourceLabel=new k.HighlightedLabel(t.append(ie,t.$(".related-info-resource"))),ce.lnCol=t.append(ie,t.$("span.marker-line"));const le=t.append(ie,t.$("span.related-info-resource-separator"));return le.textContent=":",le.style.paddingRight="4px",ce.description=new k.HighlightedLabel(t.append(ie,t.$(".marker-description"))),ce}renderElement(ie,ce,le){const ae=ie.element.raw,ue=ie.filterData&&ie.filterData.uriMatches||[],oe=ie.filterData&&ie.filterData.messageMatches||[];le.resourceLabel.set((0,l.basename)(ae.resource),ue),le.resourceLabel.element.title=this.labelService.getUriLabel(ae.resource,{relative:!0}),le.lnCol.textContent=w.default.MARKERS_PANEL_AT_LINE_COL_NUMBER(ae.startLineNumber,ae.startColumn),le.description.set(ae.message,oe),le.description.element.title=ae.message}disposeTemplate(ie){}};$=Ee([W(0,s.ILabelService)],$),e.RelatedInformationRenderer=$;class J{constructor(ie){this.options=ie}filter(ie,ce){return ie instanceof I.ResourceMarkers?this.filterResourceMarkers(ie):ie instanceof I.Marker?this.filterMarker(ie,ce):this.filterRelatedInformation(ie,ce)}filterResourceMarkers(ie){if(ie.resource.scheme===f.Schemas.walkThrough||ie.resource.scheme===f.Schemas.walkThroughSnippet||this.options.excludesMatcher.matches(ie.resource))return!1;if(this.options.includesMatcher.matches(ie.resource))return!0;if(this.options.textFilter.text&&!this.options.textFilter.negate){const ce=r.FilterOptions._filter(this.options.textFilter.text,(0,l.basename)(ie.resource));if(ce)return{visibility:!0,data:{type:0,uriMatches:ce||[]}}}return 2}filterMarker(ie,ce){if(!(this.options.showErrors&&D.MarkerSeverity.Error===ie.marker.severity||this.options.showWarnings&&D.MarkerSeverity.Warning===ie.marker.severity||this.options.showInfos&&D.MarkerSeverity.Info===ie.marker.severity))return!1;if(!this.options.textFilter.text)return!0;const ae=[];for(const pe of ie.lines){const me=r.FilterOptions._messageFilter(this.options.textFilter.text,pe);ae.push(me||[])}const ue=ie.marker.source?r.FilterOptions._filter(this.options.textFilter.text,ie.marker.source):void 0,oe=ie.marker.code?r.FilterOptions._filter(this.options.textFilter.text,typeof ie.marker.code=="string"?ie.marker.code:ie.marker.code.value):void 0,fe=ue||oe||ae.some(pe=>pe.length>0);return fe&&!this.options.textFilter.negate?{visibility:!0,data:{type:1,lineMatches:ae,sourceMatches:ue||[],codeMatches:oe||[]}}:fe&&this.options.textFilter.negate&&ce===2?!1:!fe&&this.options.textFilter.negate&&ce===2?!0:ce}filterRelatedInformation(ie,ce){if(!this.options.textFilter.text)return!0;const le=r.FilterOptions._filter(this.options.textFilter.text,(0,l.basename)(ie.raw.resource)),ae=r.FilterOptions._messageFilter(this.options.textFilter.text,_.basename(ie.raw.message)),ue=le||ae;return ue&&!this.options.textFilter.negate?{visibility:!0,data:{type:2,uriMatches:le||[],messageMatches:ae||[]}}:ue&&this.options.textFilter.negate&&ce===2?!1:!ue&&this.options.textFilter.negate&&ce===2?!0:ce}}e.Filter=J;let ee=class extends c.Disposable{constructor(ie,ce,le,ae,ue){super();this.marker=ie,this.modelService=ce,this.instantiationService=le,this.editorService=ae,this.languageFeaturesService=ue,this._onDidChange=this._register(new p.Emitter),this.onDidChange=this._onDidChange.event,this.modelPromise=null,this.codeActionsPromise=null,this._multiline=!0,this._quickFixAction=null,this._register((0,c.toDisposable)(()=>{this.modelPromise&&this.modelPromise.cancel(),this.codeActionsPromise&&this.codeActionsPromise.cancel()}))}get multiline(){return this._multiline}set multiline(ie){this._multiline!==ie&&(this._multiline=ie,this._onDidChange.fire())}get quickFixAction(){return this._quickFixAction||(this._quickFixAction=this._register(this.instantiationService.createInstance(S.QuickFixAction,this.marker))),this._quickFixAction}showLightBulb(){this.setQuickFixes(!0)}showQuickfixes(){this.setQuickFixes(!1).then(()=>this.quickFixAction.run())}async getQuickFixes(ie){const ce=await this.getCodeActions(ie);return ce?this.toActions(ce):[]}async setQuickFixes(ie){const ce=await this.getCodeActions(ie);this.quickFixAction.quickFixes=ce?this.toActions(ce):[],this.quickFixAction.autoFixable(!!ce&&ce.hasAutoFix)}getCodeActions(ie){return this.codeActionsPromise!==null?this.codeActionsPromise:this.getModel(ie).then(ce=>ce?(this.codeActionsPromise||(this.codeActionsPromise=(0,h.createCancelablePromise)(le=>(0,m.getCodeActions)(this.languageFeaturesService.codeActionProvider,ce,new d.Range(this.marker.range.startLineNumber,this.marker.range.startColumn,this.marker.range.endLineNumber,this.marker.range.endColumn),{type:1,filter:{include:b.CodeActionKind.QuickFix}},x.Progress.None,le).then(ae=>this._register(ae)))),this.codeActionsPromise):null)}toActions(ie){return ie.validActions.map(ce=>new a.Action(ce.action.command?ce.action.command.id:ce.action.title,ce.action.title,void 0,!0,()=>this.openFileAtMarker(this.marker).then(()=>this.instantiationService.invokeFunction(y.applyCodeAction,ce))))}openFileAtMarker(ie){const{resource:ce,selection:le}={resource:ie.resource,selection:ie.range};return this.editorService.openEditor({resource:ce,options:{selection:le,preserveFocus:!0,pinned:!1,revealIfVisible:!0}},E.ACTIVE_GROUP).then(()=>{})}getModel(ie){const ce=this.modelService.getModel(this.marker.resource);return ce?Promise.resolve(ce):ie?(this.modelPromise||(this.modelPromise=(0,h.createCancelablePromise)(le=>new Promise(ae=>{this._register(this.modelService.onModelAdded(ue=>{(0,l.isEqual)(ue.uri,this.marker.resource)&&ae(ue)}))}))),this.modelPromise):Promise.resolve(null)}};ee=Ee([W(1,g.IModelService),W(2,v.IInstantiationService),W(3,E.IEditorService),W(4,B.ILanguageFeaturesService)],ee),e.MarkerViewModel=ee;let te=class extends c.Disposable{constructor(ie=!0,ce){super();this.instantiationService=ce,this._onDidChange=this._register(new p.Emitter),this.onDidChange=this._onDidChange.event,this.markersViewStates=new Map,this.markersPerResource=new Map,this.bulkUpdate=!1,this.hoveredMarker=null,this.hoverDelayer=new h.Delayer(300),this._multiline=!0,this._multiline=ie}add(ie){if(!this.markersViewStates.has(ie.id)){const ce=this.instantiationService.createInstance(ee,ie),le=[ce];ce.multiline=this.multiline,ce.onDidChange(()=>{this.bulkUpdate||this._onDidChange.fire(ie)},this,le),this.markersViewStates.set(ie.id,{viewModel:ce,disposables:le});const ae=this.markersPerResource.get(ie.resource.toString())||[];ae.push(ie),this.markersPerResource.set(ie.resource.toString(),ae)}}remove(ie){const ce=this.markersPerResource.get(ie.toString())||[];for(const le of ce){const ae=this.markersViewStates.get(le.id);ae&&(0,c.dispose)(ae.disposables),this.markersViewStates.delete(le.id),this.hoveredMarker===le&&(this.hoveredMarker=null)}this.markersPerResource.delete(ie.toString())}getViewModel(ie){const ce=this.markersViewStates.get(ie.id);return ce?ce.viewModel:null}onMarkerMouseHover(ie){this.hoveredMarker=ie,this.hoverDelayer.trigger(()=>{if(this.hoveredMarker){const ce=this.getViewModel(this.hoveredMarker);ce&&ce.showLightBulb()}})}onMarkerMouseLeave(ie){this.hoveredMarker===ie&&(this.hoveredMarker=null)}get multiline(){return this._multiline}set multiline(ie){let ce=!1;this._multiline!==ie&&(this._multiline=ie,ce=!0),this.bulkUpdate=!0,this.markersViewStates.forEach(({viewModel:le})=>{le.multiline!==ie&&(le.multiline=ie,ce=!0)}),this.bulkUpdate=!1,ce&&this._onDidChange.fire(void 0)}dispose(){this.markersViewStates.forEach(({disposables:ie})=>(0,c.dispose)(ie)),this.markersViewStates.clear(),this.markersPerResource.clear(),super.dispose()}};te=Ee([W(1,v.IInstantiationService)],te),e.MarkersViewModel=te}),define(ne[2271],re([1,0,112,29,37,7,153,104,288,12,10,267,16,1628,5,21,315,8,405,58,476,2189,2156,72,18,64,19,1098]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookFindWidget=void 0;const b="find-hide-transition",E="find-show-transition";let y=69,T=class extends n.SimpleFindReplaceWidget{constructor(x,F,L,M,N,B,P,V){super(F,L,M,N,P,B,V,new s.FindReplaceState);this._notebookEditor=x,this._showTimeout=null,this._hideTimeout=null,this._findModel=new a.FindModel(this._notebookEditor,this._state,this._configurationService),v.append(this._notebookEditor.getDomNode(),this.getDomNode()),this._findWidgetFocused=k.KEYBINDING_CONTEXT_NOTEBOOK_FIND_WIDGET_FOCUSED.bindTo(L),this._register(this._findInput.onKeyDown(z=>this._onFindInputKeyDown(z))),this.updateTheme(M.getColorTheme()),this._register(M.onDidColorThemeChange(()=>{this.updateTheme(M.getColorTheme())})),this._register(this._state.onFindReplaceStateChange(z=>{if(this.onInputChanged(),z.isSearching&&(this._state.isSearching?this._progressBar.infinite().show():this._progressBar.stop()),this._findModel.currentMatch>=0){const H=this._findModel.getCurrentMatch();this._replaceBtn.setEnabled(H.isModelMatch)}const U=this._findModel.findMatches;this._replaceAllBtn.setEnabled(U.length>0&&U.find(H=>H.modelMatchCount<H.matches.length)===void 0),z.filters&&this._findInput.updateFilterState((this._state.filters?.markupPreview??!1)||(this._state.filters?.codeOutput??!1))})),this._register(v.addDisposableListener(this.getDomNode(),v.EventType.FOCUS,z=>{this._previousFocusElement=z.relatedTarget instanceof HTMLElement?z.relatedTarget:void 0},!0))}_onFindInputKeyDown(x){if(x.equals(3)){this._findModel.find(!1),x.preventDefault();return}else if(x.equals(1024|3)){this.find(!0),x.preventDefault();return}}onInputChanged(){this._state.change({searchString:this.inputValue},!1);const x=this._findModel.findMatches;return!!(x&&x.length)}find(x){this._findModel.find(x)}replaceOne(){if(!this._notebookEditor.hasModel()||!this._findModel.findMatches.length)return;this._findModel.ensureFindMatches(),this._findModel.currentMatch<0&&this._findModel.find(!1);const x=this._findModel.getCurrentMatch(),F=x.cell;if(x.isModelMatch){const L=x.match;this._progressBar.infinite().show();const N=this.replacePattern.buildReplaceString(L.matches,this._state.preserveCase);this._notebookEditor._getViewModel().replaceOne(F,L.range,N).then(()=>{this._progressBar.stop()})}else console.error("Replace does not work for output match")}replaceAll(){if(!this._notebookEditor.hasModel())return;this._progressBar.infinite().show();const x=this.replacePattern,F=this._findModel.findMatches,L=[];F.forEach(N=>{N.matches.forEach((P,V)=>{if(V<N.modelMatchCount){const U=P.matches;L.push(x.buildReplaceString(U,this._state.preserveCase))}})}),this._notebookEditor._getViewModel().replaceAll(this._findModel.findMatches,L).then(()=>{this._progressBar.stop()})}findFirst(){}onFocusTrackerFocus(){this._findWidgetFocused.set(!0)}onFocusTrackerBlur(){this._previousFocusElement=void 0,this._findWidgetFocused.reset()}onReplaceInputFocusTrackerFocus(){}onReplaceInputFocusTrackerBlur(){}onFindInputFocusTrackerFocus(){}onFindInputFocusTrackerBlur(){}show(x){super.show(x),this._state.change({searchString:x??"",isRevealed:!0},!1),this._findInput.select(),this._showTimeout===null&&(this._hideTimeout!==null&&(window.clearTimeout(this._hideTimeout),this._hideTimeout=null,this._notebookEditor.removeClassName(b)),this._notebookEditor.addClassName(E),this._showTimeout=window.setTimeout(()=>{this._notebookEditor.removeClassName(E),this._showTimeout=null},200))}replace(x,F){super.showWithReplace(x,F),this._state.change({searchString:x??"",replaceString:F??"",isRevealed:!0},!1),this._replaceInput.select(),this._showTimeout===null&&(this._hideTimeout!==null&&(window.clearTimeout(this._hideTimeout),this._hideTimeout=null,this._notebookEditor.removeClassName(b)),this._notebookEditor.addClassName(E),this._showTimeout=window.setTimeout(()=>{this._notebookEditor.removeClassName(E),this._showTimeout=null},200))}hide(){if(super.hide(),this._state.change({isRevealed:!1},!1),this._findModel.clear(),this._notebookEditor.findStop(),this._progressBar.stop(),this._hideTimeout===null&&(this._showTimeout!==null&&(window.clearTimeout(this._showTimeout),this._showTimeout=null,this._notebookEditor.removeClassName(E)),this._notebookEditor.addClassName(b),this._hideTimeout=window.setTimeout(()=>{this._notebookEditor.removeClassName(b)},200)),this._previousFocusElement&&this._previousFocusElement.offsetParent&&(this._previousFocusElement.focus(),this._previousFocusElement=void 0),this._notebookEditor.hasModel())for(let x=0;x<this._notebookEditor.getLength();x++){const F=this._notebookEditor.cellAt(x);F.getEditState()===D.CellEditState.Editing&&F.editStateSource==="find"&&F.updateEditState(D.CellEditState.Preview,"find")}}_updateMatchesCount(){if(!this._findModel||!this._findModel.findMatches)return;this._matchesCount.style.minWidth=y+"px",this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let x;if(this._state.matchesCount>0){let F=String(this._state.matchesCount);this._state.matchesCount>=I.MATCHES_LIMIT&&(F+="+");const L=this._findModel.currentMatch<0?"?":String(this._findModel.currentMatch+1);x=f.format(u.NLS_MATCHES_LOCATION,L,F)}else x=u.NLS_NO_RESULTS;this._matchesCount.appendChild(document.createTextNode(x)),(0,t.alert)(this._getAriaLabel(x,this._state.currentMatch,this._state.searchString)),y=Math.max(y,this._matchesCount.clientWidth)}_getAriaLabel(x,F,L){return x===u.NLS_NO_RESULTS?L===""?(0,c.localize)(0,null,x):(0,c.localize)(1,null,x,L):(0,c.localize)(2,null,x,L)}dispose(){this._notebookEditor?.removeClassName(E),this._notebookEditor?.removeClassName(b),this._findModel.dispose(),super.dispose()}};T.id="workbench.notebook.find",T=Ee([W(1,_.IContextViewService),W(2,A.IContextKeyService),W(3,w.IThemeService),W(4,l.IConfigurationService),W(5,_.IContextMenuService),W(6,o.IMenuService),W(7,i.IInstantiationService)],T),e.NotebookFindWidget=T,(0,C.registerNotebookContribution)(T.id,T),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"notebook.hideFind",title:{value:(0,c.localize)(3,null),original:"Hide Find in Notebook"},keybinding:{when:A.ContextKeyExpr.and(k.NOTEBOOK_EDITOR_FOCUSED,k.KEYBINDING_CONTEXT_NOTEBOOK_FIND_WIDGET_FOCUSED),primary:9,weight:200}})}async run(O){const x=O.get(S.IEditorService),F=(0,D.getNotebookEditorFromEditorPane)(x.activeEditorPane);if(!F)return;F.getContribution(T.id).hide(),F.focus()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"notebook.find",title:{value:(0,c.localize)(4,null),original:"Find in Notebook"},keybinding:{when:A.ContextKeyExpr.and(k.NOTEBOOK_EDITOR_FOCUSED,k.NOTEBOOK_IS_ACTIVE_EDITOR,p.EditorContextKeys.focus.toNegated()),primary:36|2048,weight:200}})}async run(O){const x=O.get(S.IEditorService),F=(0,D.getNotebookEditorFromEditorPane)(x.activeEditorPane);if(!F)return;F.getContribution(T.id).show()}});function R(O,x){if(x.uri.scheme===g.Schemas.vscodeNotebookCell){const F=d.CellUri.parse(x.uri);if(F&&(0,m.isEqual)(F.notebook,O))return!0}return!1}r.StartFindAction.addImplementation(100,(O,x,F)=>{const L=O.get(S.IEditorService),M=(0,D.getNotebookEditorFromEditorPane)(L.activeEditorPane);if(!M)return!1;if(!M.hasEditorFocus()&&!M.hasWebviewFocus()){const B=O.get(h.ICodeEditorService),P=B.getFocusedCodeEditor()||B.getActiveCodeEditor();if(!(M.hasModel()&&P&&P.hasModel()&&R(M.textModel.uri,P.getModel())))return!1}return M.getContribution(T.id).show(),!0}),r.StartFindReplaceAction.addImplementation(100,(O,x,F)=>{const L=O.get(S.IEditorService),M=(0,D.getNotebookEditorFromEditorPane)(L.activeEditorPane);if(!M)return!1;const N=M.getContribution(T.id);return N?(N.replace(),!0):!1})}),define(ne[168],re([1,0,9,1636,16,7,104,153,268,21,290,27]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cellExecutionArgs=e.parseMultiCellExecutionArgs=e.getEditorFromArgsOrActivePane=e.executeNotebookCondition=e.NotebookCellAction=e.NotebookMultiCellAction=e.NotebookAction=e.getContextFromUri=e.getContextFromActiveEditor=e.CellOverflowToolbarGroups=e.CellToolbarOrder=e.NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT=e.CELL_TITLE_OUTPUT_GROUP_ID=e.CELL_TITLE_CELL_GROUP_ID=e.NOTEBOOK_ACTIONS_CATEGORY=e.SELECT_KERNEL_ID=void 0,e.SELECT_KERNEL_ID="_notebook.selectKernel",e.NOTEBOOK_ACTIONS_CATEGORY={value:(0,f.localize)(0,null),original:"Notebook"},e.CELL_TITLE_CELL_GROUP_ID="inline/cell",e.CELL_TITLE_OUTPUT_GROUP_ID="inline/output",e.NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT=100;var o;(function(h){h[h.EditCell=0]="EditCell",h[h.ExecuteAboveCells=1]="ExecuteAboveCells",h[h.ExecuteCellAndBelow=2]="ExecuteCellAndBelow",h[h.SaveCell=3]="SaveCell",h[h.SplitCell=4]="SplitCell",h[h.ClearCellOutput=5]="ClearCellOutput"})(o=e.CellToolbarOrder||(e.CellToolbarOrder={}));var c;(function(h){h.Copy="1_copy",h.Insert="2_insert",h.Edit="3_edit"})(c=e.CellOverflowToolbarGroups||(e.CellOverflowToolbarGroups={}));function i(h){const g=(0,k.getNotebookEditorFromEditorPane)(h.activeEditorPane);if(!g||!g.hasModel())return;const d=g.getActiveCell(),m=g.getSelectionViewModels();return{cell:d,selectedCells:m,notebookEditor:g}}e.getContextFromActiveEditor=i;function S(h,g){const m=h.get(v.INotebookEditorService).listNotebookEditors().find(b=>b.hasModel()&&b.textModel.uri.toString()===g.toString());if(m&&m.hasModel())return m}function s(h,g){const d=t.URI.revive(g);if(d){const m=S(h,d);if(m)return{notebookEditor:m}}}e.getContextFromUri=s;class l extends _.Action2{constructor(g){if(g.f1!==!1){g.f1=!1;const d={id:_.MenuId.CommandPalette,when:D.NOTEBOOK_IS_ACTIVE_EDITOR};g.menu?Array.isArray(g.menu)||(g.menu=[g.menu]):g.menu=[],g.menu=[...g.menu,d]}g.category=e.NOTEBOOK_ACTIONS_CATEGORY;super(g)}async run(g,d,...m){const E=!!d?this.isNotebookActionContext(d)?"notebookToolbar":"editorToolbar":void 0;if(!(!this.isNotebookActionContext(d)&&(d=this.getEditorContextFromArgsOrActive(g,d,...m),!d)))return E!==void 0&&g.get(C.ITelemetryService).publicLog2("workbenchActionExecuted",{id:this.desc.id,from:E}),this.runWithContext(g,d)}isNotebookActionContext(g){return!!g&&!!g.notebookEditor}getEditorContextFromArgsOrActive(g,d,...m){return i(g.get(w.IEditorService))}}e.NotebookAction=l;class r extends _.Action2{constructor(g){if(g.f1!==!1){g.f1=!1;const d={id:_.MenuId.CommandPalette,when:D.NOTEBOOK_IS_ACTIVE_EDITOR};g.menu?Array.isArray(g.menu)||(g.menu=[g.menu]):g.menu=[],g.menu=[...g.menu,d]}g.category=e.NOTEBOOK_ACTIONS_CATEGORY;super(g)}parseArgs(g,...d){}isCellToolbarContext(g){return!!g&&!!g.notebookEditor&&g.$mid===12}isEditorContext(g){return!!g&&g.groupId!==void 0}async run(g,...d){const m=d[0],b=this.isCellToolbarContext(m),E=this.isEditorContext(m),y=b?"cellToolbar":E?"editorToolbar":"other",T=g.get(C.ITelemetryService);if(b)return T.publicLog2("workbenchActionExecuted",{id:this.desc.id,from:y}),this.runWithContext(g,m);const R=this.parseArgs(g,...d);if(R)return T.publicLog2("workbenchActionExecuted",{id:this.desc.id,from:y}),this.runWithContext(g,R);const O=a(g);if(O)return T.publicLog2("workbenchActionExecuted",{id:this.desc.id,from:y}),this.runWithContext(g,{ui:!1,notebookEditor:O,selectedCells:(0,k.cellRangeToViewCells)(O,O.getSelections())})}}e.NotebookMultiCellAction=r;class p extends l{isCellActionContext(g){return!!g&&!!g.notebookEditor&&!!g.cell}getCellContextFromArgs(g,d,...m){}async run(g,d,...m){if(this.isCellActionContext(d))return g.get(C.ITelemetryService).publicLog2("workbenchActionExecuted",{id:this.desc.id,from:"cellToolbar"}),this.runWithContext(g,d);const b=this.getCellContextFromArgs(g,d,...m);if(b)return this.runWithContext(g,b);const E=this.getEditorContextFromArgsOrActive(g);if(this.isCellActionContext(E))return this.runWithContext(g,E)}}e.NotebookCellAction=p,e.executeNotebookCondition=A.ContextKeyExpr.greater(D.NOTEBOOK_KERNEL_COUNT.key,0);function u(h){if(h===void 0)return!1;const g=h.ranges;return!(!g||!Array.isArray(g)||g.some(d=>!(0,I.isICellRange)(d))||h.document&&!t.URI.revive(h.document))}function a(h,g){const d=s(h,g)?.notebookEditor;if(d)return d;const m=(0,k.getNotebookEditorFromEditorPane)(h.get(w.IEditorService).activeEditorPane);if(!(!m||!m.hasModel()))return m}e.getEditorFromArgsOrActivePane=a;function n(h,...g){const d=g[0];if(u(d)){const b=a(h,d.document);if(!b)return;const y=d.ranges.map(R=>b.getCellsInRange(R).slice(0)).flat(),T=d.autoReveal;return{ui:!1,notebookEditor:b,selectedCells:y,autoReveal:T}}if((0,I.isICellRange)(d)){const b=g[1],E=a(h,b);return E?{ui:!1,notebookEditor:E,selectedCells:E.getCellsInRange(d)}:void 0}const m=i(h.get(w.IEditorService));return m?{ui:!1,notebookEditor:m.notebookEditor,selectedCells:m.selectedCells??[]}:void 0}e.parseMultiCellExecutionArgs=n,e.cellExecutionArgs=[{isOptional:!0,name:"options",description:"The cell range options",schema:{type:"object",required:["ranges"],properties:{ranges:{type:"array",items:[{type:"object",required:["start","end"],properties:{start:{type:"number"},end:{type:"number"}}}]},document:{type:"object",description:"The document uri"},autoReveal:{type:"boolean",description:"Whether the cell should be revealed into view automatically"}}}}],_.MenuRegistry.appendMenuItem(_.MenuId.NotebookCellTitle,{submenu:_.MenuId.NotebookCellInsert,title:(0,f.localize)(1,null),group:"2_insert",when:D.NOTEBOOK_EDITOR_EDITABLE.isEqualTo(!0)}),_.MenuRegistry.appendMenuItem(_.MenuId.EditorContext,{submenu:_.MenuId.NotebookCellTitle,title:(0,f.localize)(2,null),group:"2_insert",when:D.NOTEBOOK_EDITOR_FOCUSED})}),define(ne[2272],re([1,0,97,169,140,1623,16,7,141,358,491,168,104,153,200,64]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const s="notebook.cell.moveUp",l="notebook.cell.moveDown",r="notebook.cell.copyUp",p="notebook.cell.copyDown";(0,k.registerAction2)(class extends C.NotebookCellAction{constructor(){super({id:s,title:(0,A.localize)(0,null),icon:i.moveUpIcon,keybinding:{primary:512|16,when:D.ContextKeyExpr.and(c.NOTEBOOK_EDITOR_FOCUSED,I.InputFocusedContext.toNegated()),weight:200},menu:{id:k.MenuId.NotebookCellTitle,when:D.ContextKeyExpr.equals("config.notebook.dragAndDropEnabled",!1),group:"3_edit",order:13}})}async runWithContext(x,F){return(0,v.moveCellRange)(F,"up")}}),(0,k.registerAction2)(class extends C.NotebookCellAction{constructor(){super({id:l,title:(0,A.localize)(1,null),icon:i.moveDownIcon,keybinding:{primary:512|18,when:D.ContextKeyExpr.and(c.NOTEBOOK_EDITOR_FOCUSED,I.InputFocusedContext.toNegated()),weight:200},menu:{id:k.MenuId.NotebookCellTitle,when:D.ContextKeyExpr.equals("config.notebook.dragAndDropEnabled",!1),group:"3_edit",order:14}})}async runWithContext(x,F){return(0,v.moveCellRange)(F,"down")}}),(0,k.registerAction2)(class extends C.NotebookCellAction{constructor(){super({id:r,title:(0,A.localize)(2,null),keybinding:{primary:512|1024|16,when:D.ContextKeyExpr.and(c.NOTEBOOK_EDITOR_FOCUSED,I.InputFocusedContext.toNegated()),weight:200}})}async runWithContext(x,F){return(0,v.copyCellRange)(F,"up")}}),(0,k.registerAction2)(class extends C.NotebookCellAction{constructor(){super({id:p,title:(0,A.localize)(3,null),keybinding:{primary:512|1024|18,when:D.ContextKeyExpr.and(c.NOTEBOOK_EDITOR_FOCUSED,I.InputFocusedContext.toNegated()),weight:200},menu:{id:k.MenuId.NotebookCellTitle,when:D.ContextKeyExpr.and(c.NOTEBOOK_EDITOR_FOCUSED,c.NOTEBOOK_EDITOR_EDITABLE,c.NOTEBOOK_CELL_EDITABLE),group:"3_edit",order:12}})}async runWithContext(x,F){return(0,v.copyCellRange)(F,"down")}});const u="notebook.cell.split",a="notebook.cell.joinAbove",n="notebook.cell.joinBelow";(0,k.registerAction2)(class extends C.NotebookCellAction{constructor(){super({id:u,title:(0,A.localize)(4,null),menu:{id:k.MenuId.NotebookCellTitle,when:D.ContextKeyExpr.and(c.NOTEBOOK_EDITOR_EDITABLE,c.NOTEBOOK_CELL_EDITABLE,c.NOTEBOOK_CELL_INPUT_COLLAPSED.toNegated()),order:4,group:C.CELL_TITLE_CELL_GROUP_ID},icon:i.splitCellIcon,keybinding:{when:D.ContextKeyExpr.and(c.NOTEBOOK_EDITOR_FOCUSED,c.NOTEBOOK_EDITOR_EDITABLE,c.NOTEBOOK_CELL_EDITABLE),primary:(0,t.KeyChord)(2048|41,2048|1024|88),weight:200}})}async runWithContext(x,F){if(F.notebookEditor.isReadOnly)return;const L=x.get(_.IBulkEditService),M=F.cell,N=F.notebookEditor.getCellIndex(M),B=M.focusMode===o.CellFocusMode.Container?[{lineNumber:1,column:1}]:M.getSelectionsStartPosition();if(B&&B.length>0){if(await M.resolveTextModel(),!M.hasModel())return;const P=(0,v.computeCellLinesContents)(M,B);if(P){const V=M.language,z=M.cellKind,U=M.mime,H=await M.resolveTextModel();await L.apply([new _.ResourceTextEdit(M.uri,{range:H.getFullModelRange(),text:P[0]}),new w.ResourceNotebookCellEdit(F.notebookEditor.textModel.uri,{editType:1,index:N+1,count:0,cells:P.slice(1).map(K=>({cellKind:z,language:V,mime:U,source:K,outputs:[],metadata:{}}))})],{quotableLabel:"Split Notebook Cell"})}}}}),(0,k.registerAction2)(class extends C.NotebookCellAction{constructor(){super({id:a,title:(0,A.localize)(5,null),keybinding:{when:c.NOTEBOOK_EDITOR_FOCUSED,primary:256|512|1024|40,weight:200},menu:{id:k.MenuId.NotebookCellTitle,when:D.ContextKeyExpr.and(c.NOTEBOOK_EDITOR_FOCUSED,c.NOTEBOOK_EDITOR_EDITABLE),group:"3_edit",order:10}})}async runWithContext(x,F){const L=x.get(_.IBulkEditService);return(0,v.joinCellsWithSurrounds)(L,F,"above")}}),(0,k.registerAction2)(class extends C.NotebookCellAction{constructor(){super({id:n,title:(0,A.localize)(6,null),keybinding:{when:c.NOTEBOOK_EDITOR_FOCUSED,primary:256|512|40,weight:200},menu:{id:k.MenuId.NotebookCellTitle,when:D.ContextKeyExpr.and(c.NOTEBOOK_EDITOR_FOCUSED,c.NOTEBOOK_EDITOR_EDITABLE),group:"3_edit",order:11}})}async runWithContext(x,F){const L=x.get(_.IBulkEditService);return(0,v.joinCellsWithSurrounds)(L,F,"below")}});const h="notebook.cell.changeToCode",g="notebook.cell.changeToMarkdown";(0,k.registerAction2)(class extends C.NotebookMultiCellAction{constructor(){super({id:h,title:(0,A.localize)(7,null),keybinding:{when:D.ContextKeyExpr.and(c.NOTEBOOK_EDITOR_FOCUSED,D.ContextKeyExpr.not(I.InputFocusedContextKey)),primary:55,weight:200},precondition:D.ContextKeyExpr.and(c.NOTEBOOK_IS_ACTIVE_EDITOR,c.NOTEBOOK_CELL_TYPE.isEqualTo("markup")),menu:{id:k.MenuId.NotebookCellTitle,when:D.ContextKeyExpr.and(c.NOTEBOOK_EDITOR_FOCUSED,c.NOTEBOOK_EDITOR_EDITABLE,c.NOTEBOOK_CELL_EDITABLE,c.NOTEBOOK_CELL_TYPE.isEqualTo("markup")),group:"3_edit"}})}async runWithContext(F,L){await(0,v.changeCellToKind)(S.CellKind.Code,L)}}),(0,k.registerAction2)(class extends C.NotebookMultiCellAction{constructor(){super({id:g,title:(0,A.localize)(8,null),keybinding:{when:D.ContextKeyExpr.and(c.NOTEBOOK_EDITOR_FOCUSED,D.ContextKeyExpr.not(I.InputFocusedContextKey)),primary:43,weight:200},precondition:D.ContextKeyExpr.and(c.NOTEBOOK_IS_ACTIVE_EDITOR,c.NOTEBOOK_CELL_TYPE.isEqualTo("code")),menu:{id:k.MenuId.NotebookCellTitle,when:D.ContextKeyExpr.and(c.NOTEBOOK_EDITOR_FOCUSED,c.NOTEBOOK_EDITOR_EDITABLE,c.NOTEBOOK_CELL_EDITABLE,c.NOTEBOOK_CELL_TYPE.isEqualTo("code")),group:"3_edit"}})}async runWithContext(F,L){await(0,v.changeCellToKind)(S.CellKind.Markup,L,"markdown",f.Mimes.markdown)}});const d="notebook.cell.collapseCellInput",m="notebook.cell.collapseCellOutput",b="notebook.cell.collapseAllCellInputs",E="notebook.cell.expandAllCellInputs",y="notebook.cell.collapseAllCellOutputs",T="notebook.cell.expandAllCellOutputs",R="notebook.cell.toggleOutputs";(0,k.registerAction2)(class extends C.NotebookMultiCellAction{constructor(){super({id:d,title:(0,A.localize)(9,null),keybinding:{when:D.ContextKeyExpr.and(c.NOTEBOOK_CELL_LIST_FOCUSED,c.NOTEBOOK_CELL_INPUT_COLLAPSED.toNegated(),I.InputFocusedContext.toNegated()),primary:(0,t.KeyChord)(2048|41,2048|33),weight:200}})}parseArgs(F,...L){return(0,C.parseMultiCellExecutionArgs)(F,...L)}async runWithContext(F,L){L.ui?L.cell.isInputCollapsed=!0:L.selectedCells.forEach(M=>M.isInputCollapsed=!0)}}),(0,k.registerAction2)(class extends C.NotebookMultiCellAction{constructor(){super({id:o.EXPAND_CELL_INPUT_COMMAND_ID,title:(0,A.localize)(10,null),keybinding:{when:D.ContextKeyExpr.and(c.NOTEBOOK_CELL_LIST_FOCUSED,c.NOTEBOOK_CELL_INPUT_COLLAPSED),primary:(0,t.KeyChord)(2048|41,2048|33),weight:200}})}parseArgs(F,...L){return(0,C.parseMultiCellExecutionArgs)(F,...L)}async runWithContext(F,L){L.ui?L.cell.isInputCollapsed=!1:L.selectedCells.forEach(M=>M.isInputCollapsed=!1)}}),(0,k.registerAction2)(class extends C.NotebookMultiCellAction{constructor(){super({id:m,title:(0,A.localize)(11,null),keybinding:{when:D.ContextKeyExpr.and(c.NOTEBOOK_CELL_LIST_FOCUSED,c.NOTEBOOK_CELL_OUTPUT_COLLAPSED.toNegated(),I.InputFocusedContext.toNegated(),c.NOTEBOOK_CELL_HAS_OUTPUTS),primary:(0,t.KeyChord)(2048|41,50),weight:200}})}async runWithContext(F,L){L.ui?L.cell.isOutputCollapsed=!0:L.selectedCells.forEach(M=>M.isOutputCollapsed=!0)}}),(0,k.registerAction2)(class extends C.NotebookMultiCellAction{constructor(){super({id:o.EXPAND_CELL_OUTPUT_COMMAND_ID,title:(0,A.localize)(12,null),keybinding:{when:D.ContextKeyExpr.and(c.NOTEBOOK_CELL_LIST_FOCUSED,c.NOTEBOOK_CELL_OUTPUT_COLLAPSED),primary:(0,t.KeyChord)(2048|41,50),weight:200}})}async runWithContext(F,L){L.ui?L.cell.isOutputCollapsed=!1:L.selectedCells.forEach(M=>M.isOutputCollapsed=!1)}}),(0,k.registerAction2)(class extends C.NotebookMultiCellAction{constructor(){super({id:R,precondition:c.NOTEBOOK_CELL_LIST_FOCUSED,title:(0,A.localize)(13,null),description:{description:(0,A.localize)(14,null),args:C.cellExecutionArgs}})}parseArgs(x,...F){return(0,C.parseMultiCellExecutionArgs)(x,...F)}async runWithContext(x,F){let L=[];F.ui?L=[F.cell]:F.selectedCells&&(L=F.selectedCells);for(const M of L)M.isOutputCollapsed=!M.isOutputCollapsed}}),(0,k.registerAction2)(class extends C.NotebookMultiCellAction{constructor(){super({id:b,title:(0,A.localize)(15,null),f1:!0})}async runWithContext(F,L){O(L.notebookEditor,M=>M.isInputCollapsed=!0)}}),(0,k.registerAction2)(class extends C.NotebookMultiCellAction{constructor(){super({id:E,title:(0,A.localize)(16,null),f1:!0})}async runWithContext(F,L){O(L.notebookEditor,M=>M.isInputCollapsed=!1)}}),(0,k.registerAction2)(class extends C.NotebookMultiCellAction{constructor(){super({id:y,title:(0,A.localize)(17,null),f1:!0})}async runWithContext(F,L){O(L.notebookEditor,M=>M.isOutputCollapsed=!0)}}),(0,k.registerAction2)(class extends C.NotebookMultiCellAction{constructor(){super({id:T,title:(0,A.localize)(18,null),f1:!0})}async runWithContext(F,L){O(L.notebookEditor,M=>M.isOutputCollapsed=!1)}});function O(x,F){for(let L=0;L<x.getLength();L++){const M=x.cellAt(L);F(M,L)}}}),define(ne[2273],re([1,0,16,7,1630,153,104,5,168,21,61,2,403,184,30,140,58,39,67,15,62]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerAction2)(class extends t.Action2{constructor(){super({id:"notebook.format",title:{value:(0,_.localize)(0,null),original:"Format Notebook"},category:I.NOTEBOOK_ACTIONS_CATEGORY,precondition:f.ContextKeyExpr.and(A.NOTEBOOK_IS_ACTIVE_EDITOR,A.NOTEBOOK_EDITOR_EDITABLE),keybinding:{when:s.EditorContextKeys.editorTextFocus.toNegated(),primary:1024|512|36,linux:{primary:2048|1024|39},weight:200},f1:!0,menu:{id:t.MenuId.EditorContext,when:f.ContextKeyExpr.and(s.EditorContextKeys.inCompositeEditor,s.EditorContextKeys.hasDocumentFormattingProvider),group:"1_modification",order:1.3}})}async run(a){const n=a.get(w.IEditorService),h=a.get(v.ITextModelService),g=a.get(c.IEditorWorkerService),d=a.get(u.ILanguageFeaturesService),m=a.get(S.IBulkEditService),b=(0,k.getNotebookEditorFromEditorPane)(n.activeEditorPane);if(!b||!b.hasModel())return;const E=b.textModel,y=new C.DisposableStore;try{const T=await Promise.all(E.cells.map(async R=>{const O=await h.createModelReference(R.uri);y.add(O);const x=O.object.textEditorModel,F=await(0,o.getDocumentFormattingEditsUntilResult)(g,d,x,x.getOptions(),i.CancellationToken.None),L=[];if(F){for(let M of F)L.push(new S.ResourceTextEdit(x.uri,M,x.getVersionId()));return L}return[]}));await m.apply((0,p.flatten)(T),{label:(0,_.localize)(1,null),code:"undoredo.formatNotebook"})}finally{y.dispose()}}}),(0,l.registerEditorAction)(class extends l.EditorAction{constructor(){super({id:"notebook.formatCell",label:(0,_.localize)(2,null),alias:"Format Cell",precondition:f.ContextKeyExpr.and(A.NOTEBOOK_IS_ACTIVE_EDITOR,A.NOTEBOOK_EDITOR_EDITABLE,s.EditorContextKeys.inCompositeEditor,s.EditorContextKeys.writable,s.EditorContextKeys.hasDocumentFormattingProvider),kbOpts:{kbExpr:f.ContextKeyExpr.and(s.EditorContextKeys.editorTextFocus),primary:1024|512|36,linux:{primary:2048|1024|39},weight:100},contextMenuOpts:{group:"1_modification",order:1.301}})}async run(n,h){h.hasModel()&&await n.get(D.IInstantiationService).invokeFunction(o.formatDocumentWithSelectedProvider,h,1,r.Progress.None,i.CancellationToken.None)}})}),define(ne[2274],re([1,0,1632,16,8,168,64]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleCellToolbarPositionAction=void 0;const D="notebook.toggleCellToolbarPosition";class I extends f.Action2{constructor(){super({id:D,title:{value:(0,t.localize)(0,null),original:"Toggle Cell Toolbar Position"},menu:[{id:f.MenuId.NotebookCellTitle,group:"View",order:1}],category:A.NOTEBOOK_ACTIONS_CATEGORY,f1:!1})}async run(v,C){const o=C&&C.ui?C.notebookEditor:void 0;if(o&&o.hasModel()){const c=o.textModel.viewType,i=v.get(_.IConfigurationService),S=i.getValue(k.NotebookSetting.cellToolbarLocation),s=this.togglePosition(c,S);await i.updateValue(k.NotebookSetting.cellToolbarLocation,s)}}togglePosition(v,C){if(typeof C=="string")if(["left","right","hidden"].indexOf(C)>=0){const o=C==="right"?"left":"right",c={default:C};return c[v]=o,c}else{const o={default:"right"};return o[v]="left",o}else{const c=(C[v]??C.default??"right")==="right"?"left":"right",i={...C};return i[v]=c,i}}}e.ToggleCellToolbarPositionAction=I,(0,f.registerAction2)(I)}),define(ne[846],re([1,0,58,1633,16,57,7,141,17,168,153,104,64,39]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CENTER_ACTIVE_CELL=void 0;const i="notebook.focusTop",S="notebook.focusBottom",s="notebook.focusPreviousEditor",l="notebook.focusNextEditor",r="notebook.cell.focusInOutput",p="notebook.cell.focusOutOutput";e.CENTER_ACTIVE_CELL="notebook.centerActiveCell";const u="notebook.cell.cursorPageUp",a="notebook.cell.cursorPageUpSelect",n="notebook.cell.cursorPageDown",h="notebook.cell.cursorPageDownSelect";(0,_.registerAction2)(class extends w.NotebookCellAction{constructor(){super({id:l,title:(0,f.localize)(0,null),keybinding:[{when:k.ContextKeyExpr.and(v.NOTEBOOK_EDITOR_FOCUSED,k.ContextKeyExpr.has(D.InputFocusedContextKey),t.EditorContextKeys.editorTextFocus,o.NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo("top"),o.NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo("none"),k.ContextKeyExpr.equals("config.notebook.navigation.allowNavigateToSurroundingCells",!0)),primary:18,weight:w.NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT},{when:k.ContextKeyExpr.and(v.NOTEBOOK_EDITOR_FOCUSED,v.NOTEBOOK_OUTPUT_FOCUSED),primary:2048|18,mac:{primary:256|2048|18},weight:200}]})}async runWithContext(d,m){const b=m.notebookEditor,E=m.cell,y=b.getCellIndex(E);if(typeof y!="number"||y>=b.getLength()-1)return;const T=b.cellAt(y+1),R=T.cellKind===o.CellKind.Markup&&T.getEditState()===C.CellEditState.Preview?"container":"editor";b.focusNotebookCell(T,R),b.cursorNavigationMode=!0}}),(0,_.registerAction2)(class extends w.NotebookCellAction{constructor(){super({id:s,title:(0,f.localize)(1,null),keybinding:{when:k.ContextKeyExpr.and(v.NOTEBOOK_EDITOR_FOCUSED,k.ContextKeyExpr.has(D.InputFocusedContextKey),t.EditorContextKeys.editorTextFocus,o.NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo("bottom"),o.NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo("none"),k.ContextKeyExpr.equals("config.notebook.navigation.allowNavigateToSurroundingCells",!0)),primary:16,weight:w.NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT}})}async runWithContext(d,m){const b=m.notebookEditor,E=m.cell,y=b.getCellIndex(E);if(typeof y!="number"||y<1||b.getLength()===0)return;const T=b.cellAt(y-1),R=T.cellKind===o.CellKind.Markup&&T.getEditState()===C.CellEditState.Preview?"container":"editor";b.focusNotebookCell(T,R),b.cursorNavigationMode=!0}}),(0,_.registerAction2)(class extends w.NotebookAction{constructor(){super({id:i,title:(0,f.localize)(2,null),keybinding:{when:k.ContextKeyExpr.and(v.NOTEBOOK_EDITOR_FOCUSED,k.ContextKeyExpr.not(D.InputFocusedContextKey)),primary:2048|14,mac:{primary:2048|16},weight:200}})}async runWithContext(d,m){const b=m.notebookEditor;if(b.getLength()===0)return;const E=b.cellAt(0);b.focusNotebookCell(E,"container")}}),(0,_.registerAction2)(class extends w.NotebookAction{constructor(){super({id:S,title:(0,f.localize)(3,null),keybinding:{when:k.ContextKeyExpr.and(v.NOTEBOOK_EDITOR_FOCUSED,k.ContextKeyExpr.not(D.InputFocusedContextKey)),primary:2048|13,mac:{primary:2048|18},weight:200}})}async runWithContext(d,m){const b=m.notebookEditor;if(!b.hasModel()||b.getLength()===0)return;const E=b.getLength()-1,y=b.getPreviousVisibleCellIndex(E);if(y){const T=b.cellAt(y);b.focusNotebookCell(T,"container")}}}),(0,_.registerAction2)(class extends w.NotebookCellAction{constructor(){super({id:r,title:(0,f.localize)(4,null),keybinding:{when:k.ContextKeyExpr.and(v.NOTEBOOK_EDITOR_FOCUSED,v.NOTEBOOK_CELL_HAS_OUTPUTS),primary:2048|18,mac:{primary:256|2048|18},weight:200}})}async runWithContext(d,m){const b=m.notebookEditor,E=m.cell;b.focusNotebookCell(E,"output")}}),(0,_.registerAction2)(class extends w.NotebookCellAction{constructor(){super({id:p,title:(0,f.localize)(5,null),keybinding:{when:v.NOTEBOOK_EDITOR_FOCUSED,primary:2048|16,mac:{primary:256|2048|16},weight:200}})}async runWithContext(d,m){const b=m.notebookEditor,E=m.cell;b.focusNotebookCell(E,"editor")}}),(0,_.registerAction2)(class extends w.NotebookCellAction{constructor(){super({id:e.CENTER_ACTIVE_CELL,title:(0,f.localize)(6,null),keybinding:{when:v.NOTEBOOK_EDITOR_FOCUSED,primary:2048|42,mac:{primary:256|42},weight:200}})}async runWithContext(m,b){return b.notebookEditor.revealInCenter(b.cell)}}),(0,_.registerAction2)(class extends w.NotebookCellAction{constructor(){super({id:u,title:(0,f.localize)(7,null),keybinding:[{when:k.ContextKeyExpr.and(v.NOTEBOOK_EDITOR_FOCUSED,k.ContextKeyExpr.has(D.InputFocusedContextKey),t.EditorContextKeys.editorTextFocus),primary:11,weight:w.NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT}]})}async runWithContext(d,m){c.EditorExtensionsRegistry.getEditorCommand("cursorPageUp").runCommand(d,{pageSize:g(m)})}}),(0,_.registerAction2)(class extends w.NotebookCellAction{constructor(){super({id:a,title:(0,f.localize)(8,null),keybinding:[{when:k.ContextKeyExpr.and(v.NOTEBOOK_EDITOR_FOCUSED,k.ContextKeyExpr.has(D.InputFocusedContextKey),t.EditorContextKeys.editorTextFocus),primary:1024|11,weight:w.NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT}]})}async runWithContext(d,m){c.EditorExtensionsRegistry.getEditorCommand("cursorPageUpSelect").runCommand(d,{pageSize:g(m)})}}),(0,_.registerAction2)(class extends w.NotebookCellAction{constructor(){super({id:n,title:(0,f.localize)(9,null),keybinding:[{when:k.ContextKeyExpr.and(v.NOTEBOOK_EDITOR_FOCUSED,k.ContextKeyExpr.has(D.InputFocusedContextKey),t.EditorContextKeys.editorTextFocus),primary:12,weight:w.NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT}]})}async runWithContext(d,m){c.EditorExtensionsRegistry.getEditorCommand("cursorPageDown").runCommand(d,{pageSize:g(m)})}}),(0,_.registerAction2)(class extends w.NotebookCellAction{constructor(){super({id:h,title:(0,f.localize)(10,null),keybinding:[{when:k.ContextKeyExpr.and(v.NOTEBOOK_EDITOR_FOCUSED,k.ContextKeyExpr.has(D.InputFocusedContextKey),t.EditorContextKeys.editorTextFocus),primary:1024|12,weight:w.NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT}]})}async runWithContext(d,m){c.EditorExtensionsRegistry.getEditorCommand("cursorPageDownSelect").runCommand(d,{pageSize:g(m)})}});function g(d){const b=d.notebookEditor._getViewModel().layoutInfo,E=b?.fontInfo.lineHeight||17;return Math.max(1,Math.floor((b?.height||0)/E)-2)}I.Registry.as(A.Extensions.Configuration).registerConfiguration({id:"notebook",order:100,type:"object",properties:{"notebook.navigation.allowNavigateToSurroundingCells":{type:"boolean",default:!0,markdownDescription:(0,f.localize)(11,null)}}})}),define(ne[2275],re([1,0,92,9,42,1638,16,7,12,491,168,153,104,200,64,232,158,59,21,18]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.executeThisCellCondition=e.executeCondition=void 0;const u="notebook.execute",a="notebook.cancelExecution",n="notebook.cell.cancelExecution",h="notebook.cell.executeAndFocusContainer",g="notebook.cell.executeAndSelectBelow",d="notebook.cell.executeAndInsertBelow",m="notebook.cell.executeCellAndBelow",b="notebook.cell.executeCellsAbove",E="notebook.renderAllMarkdownCells",y="notebook.revealRunningCell";e.executeCondition=D.ContextKeyExpr.and(C.NOTEBOOK_CELL_TYPE.isEqualTo("code"),D.ContextKeyExpr.or(D.ContextKeyExpr.greater(C.NOTEBOOK_KERNEL_COUNT.key,0),C.NOTEBOOK_MISSING_KERNEL_EXTENSION)),e.executeThisCellCondition=D.ContextKeyExpr.and(e.executeCondition,C.NOTEBOOK_CELL_EXECUTING.toNegated());function T(x){for(let F=0;F<x.notebookEditor.getLength();F++){const L=x.notebookEditor.cellAt(F);L.cellKind===i.CellKind.Markup&&L.updateEditState(o.CellEditState.Preview,"renderAllMarkdownCells")}}async function R(x,F){const M=x.get(l.IEditorGroupsService).activeGroup;if(M&&M.activeEditor&&M.pinEditor(M.activeEditor),F.ui&&F.cell){if(await F.notebookEditor.executeNotebookCells(t.Iterable.single(F.cell)),F.autoReveal){const N=F.notebookEditor.getCellIndex(F.cell);F.notebookEditor.revealCellRangeInView({start:N,end:N+1})}}else if(F.selectedCells){await F.notebookEditor.executeNotebookCells(F.selectedCells);const N=F.selectedCells[0];if(N&&F.autoReveal){const B=F.notebookEditor.getCellIndex(N);F.notebookEditor.revealCellRangeInView({start:B,end:B+1})}}}(0,k.registerAction2)(class extends v.NotebookAction{constructor(){super({id:E,title:(0,A.localize)(0,null)})}async runWithContext(F,L){T(L)}}),(0,k.registerAction2)(class extends v.NotebookAction{constructor(){super({id:u,title:(0,A.localize)(1,null),icon:c.executeAllIcon,description:{description:(0,A.localize)(2,null),args:[{name:"uri",description:"The document uri"}]},menu:[{id:k.MenuId.EditorTitle,order:-1,group:"navigation",when:D.ContextKeyExpr.and(C.NOTEBOOK_IS_ACTIVE_EDITOR,v.executeNotebookCondition,D.ContextKeyExpr.or(C.NOTEBOOK_INTERRUPTIBLE_KERNEL.toNegated(),C.NOTEBOOK_HAS_RUNNING_CELL.toNegated()),D.ContextKeyExpr.notEquals("config.notebook.globalToolbar",!0))},{id:k.MenuId.NotebookToolbar,order:-1,group:"navigation/execute",when:D.ContextKeyExpr.and(v.executeNotebookCondition,D.ContextKeyExpr.or(C.NOTEBOOK_INTERRUPTIBLE_KERNEL.toNegated(),C.NOTEBOOK_HAS_RUNNING_CELL.toNegated()),D.ContextKeyExpr.equals("config.notebook.globalToolbar",!0))}]})}getEditorContextFromArgsOrActive(F,L){return(0,v.getContextFromUri)(F,L)??(0,v.getContextFromActiveEditor)(F.get(r.IEditorService))}async runWithContext(F,L){T(L);const N=F.get(r.IEditorService).getEditors(0).find(P=>P.editor instanceof S.NotebookEditorInput&&P.editor.viewType===L.notebookEditor.textModel.viewType&&P.editor.resource.toString()===L.notebookEditor.textModel.uri.toString()),B=F.get(l.IEditorGroupsService);return N&&B.getGroup(N.groupId)?.pinEditor(N.editor),L.notebookEditor.executeNotebookCells()}}),(0,k.registerAction2)(class extends v.NotebookMultiCellAction{constructor(){super({id:o.EXECUTE_CELL_COMMAND_ID,precondition:e.executeThisCellCondition,title:(0,A.localize)(3,null),keybinding:{when:C.NOTEBOOK_CELL_LIST_FOCUSED,primary:256|3,win:{primary:2048|512|3},weight:v.NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT},menu:{id:k.MenuId.NotebookCellExecutePrimary,when:e.executeThisCellCondition,group:"inline"},description:{description:(0,A.localize)(4,null),args:v.cellExecutionArgs},icon:c.executeIcon})}parseArgs(F,...L){return(0,v.parseMultiCellExecutionArgs)(F,...L)}async runWithContext(F,L){return L.ui&&L.notebookEditor.focusNotebookCell(L.cell,"container",{skipReveal:!0}),R(F,L)}}),(0,k.registerAction2)(class extends v.NotebookMultiCellAction{constructor(){super({id:b,precondition:e.executeCondition,title:(0,A.localize)(5,null),menu:[{id:k.MenuId.NotebookCellExecute,when:D.ContextKeyExpr.and(e.executeCondition,D.ContextKeyExpr.equals(`config.${i.NotebookSetting.consolidatedRunButton}`,!0))},{id:k.MenuId.NotebookCellTitle,order:1,group:v.CELL_TITLE_CELL_GROUP_ID,when:D.ContextKeyExpr.and(e.executeCondition,D.ContextKeyExpr.equals(`config.${i.NotebookSetting.consolidatedRunButton}`,!1))}],icon:c.executeAboveIcon})}parseArgs(F,...L){return(0,v.parseMultiCellExecutionArgs)(F,...L)}async runWithContext(F,L){let M;if(L.ui?(M=L.notebookEditor.getCellIndex(L.cell),L.notebookEditor.focusNotebookCell(L.cell,"container",{skipReveal:!0})):M=Math.min(...L.selectedCells.map(N=>L.notebookEditor.getCellIndex(N))),typeof M=="number"){const N={start:0,end:M},B=L.notebookEditor.getCellsInRange(N);L.notebookEditor.executeNotebookCells(B)}}}),(0,k.registerAction2)(class extends v.NotebookMultiCellAction{constructor(){super({id:m,precondition:e.executeCondition,title:(0,A.localize)(6,null),menu:[{id:k.MenuId.NotebookCellExecute,when:D.ContextKeyExpr.and(e.executeCondition,D.ContextKeyExpr.equals(`config.${i.NotebookSetting.consolidatedRunButton}`,!0))},{id:k.MenuId.NotebookCellTitle,order:2,group:v.CELL_TITLE_CELL_GROUP_ID,when:D.ContextKeyExpr.and(e.executeCondition,D.ContextKeyExpr.equals(`config.${i.NotebookSetting.consolidatedRunButton}`,!1))}],icon:c.executeBelowIcon})}parseArgs(F,...L){return(0,v.parseMultiCellExecutionArgs)(F,...L)}async runWithContext(F,L){let M;if(L.ui?(M=L.notebookEditor.getCellIndex(L.cell),L.notebookEditor.focusNotebookCell(L.cell,"container",{skipReveal:!0})):M=Math.min(...L.selectedCells.map(N=>L.notebookEditor.getCellIndex(N))),typeof M=="number"){const N={start:M,end:L.notebookEditor.getLength()},B=L.notebookEditor.getCellsInRange(N);L.notebookEditor.executeNotebookCells(B)}}}),(0,k.registerAction2)(class extends v.NotebookMultiCellAction{constructor(){super({id:h,precondition:e.executeThisCellCondition,title:(0,A.localize)(7,null),description:{description:(0,A.localize)(8,null),args:v.cellExecutionArgs},icon:c.executeIcon})}parseArgs(F,...L){return(0,v.parseMultiCellExecutionArgs)(F,...L)}async runWithContext(F,L){if(L.ui)L.notebookEditor.focusNotebookCell(L.cell,"container",{skipReveal:!0});else{const M=L.selectedCells[0];M&&L.notebookEditor.focusNotebookCell(M,"container",{skipReveal:!0})}await R(F,L)}});const O=D.ContextKeyExpr.or(D.ContextKeyExpr.equals(C.NOTEBOOK_CELL_EXECUTION_STATE.key,"executing"),D.ContextKeyExpr.equals(C.NOTEBOOK_CELL_EXECUTION_STATE.key,"pending"));(0,k.registerAction2)(class extends v.NotebookMultiCellAction{constructor(){super({id:n,precondition:O,title:(0,A.localize)(9,null),icon:c.stopIcon,menu:{id:k.MenuId.NotebookCellExecutePrimary,when:O,group:"inline"},description:{description:(0,A.localize)(10,null),args:[{name:"options",description:"The cell range options",schema:{type:"object",required:["ranges"],properties:{ranges:{type:"array",items:[{type:"object",required:["start","end"],properties:{start:{type:"number"},end:{type:"number"}}}]},document:{type:"object",description:"The document uri"}}}}]}})}parseArgs(F,...L){return(0,v.parseMultiCellExecutionArgs)(F,...L)}async runWithContext(F,L){return L.ui?(L.notebookEditor.focusNotebookCell(L.cell,"container",{skipReveal:!0}),L.notebookEditor.cancelNotebookCells(t.Iterable.single(L.cell))):L.notebookEditor.cancelNotebookCells(L.selectedCells)}}),(0,k.registerAction2)(class extends v.NotebookCellAction{constructor(){super({id:g,precondition:D.ContextKeyExpr.or(e.executeThisCellCondition,C.NOTEBOOK_CELL_TYPE.isEqualTo("markup")),title:(0,A.localize)(11,null),keybinding:{when:C.NOTEBOOK_CELL_LIST_FOCUSED,primary:1024|3,weight:v.NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT}})}async runWithContext(F,L){const M=L.notebookEditor.getCellIndex(L.cell);if(typeof M!="number")return;const N=F.get(_.ILanguageService);if(L.cell.cellKind===i.CellKind.Markup){const B=L.notebookEditor.cellAt(M+1);if(L.cell.updateEditState(o.CellEditState.Preview,g),B)L.notebookEditor.focusNotebookCell(B,"container");else{const P=(0,w.insertCell)(N,L.notebookEditor,M,i.CellKind.Markup,"below");P&&L.notebookEditor.focusNotebookCell(P,"editor")}return}else{const B=L.notebookEditor.cellAt(M+1);if(B)L.notebookEditor.focusNotebookCell(B,"container");else{const P=(0,w.insertCell)(N,L.notebookEditor,M,i.CellKind.Code,"below");P&&L.notebookEditor.focusNotebookCell(P,"editor")}return R(F,L)}}}),(0,k.registerAction2)(class extends v.NotebookCellAction{constructor(){super({id:d,precondition:D.ContextKeyExpr.or(e.executeThisCellCondition,C.NOTEBOOK_CELL_TYPE.isEqualTo("markup")),title:(0,A.localize)(12,null),keybinding:{when:C.NOTEBOOK_CELL_LIST_FOCUSED,primary:512|3,weight:v.NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT}})}async runWithContext(F,L){const M=L.notebookEditor.getCellIndex(L.cell),N=F.get(_.ILanguageService),B=L.cell.focusMode===o.CellFocusMode.Editor?"editor":"container",P=(0,w.insertCell)(N,L.notebookEditor,M,L.cell.cellKind,"below");P&&L.notebookEditor.focusNotebookCell(P,B),L.cell.cellKind===i.CellKind.Markup?L.cell.updateEditState(o.CellEditState.Preview,d):R(F,L)}}),(0,k.registerAction2)(class extends v.NotebookAction{constructor(){super({id:a,title:(0,A.localize)(13,null),icon:c.stopIcon,description:{description:(0,A.localize)(14,null),args:[{name:"uri",description:"The document uri",constraint:f.URI}]},menu:[{id:k.MenuId.EditorTitle,order:-1,group:"navigation",when:D.ContextKeyExpr.and(C.NOTEBOOK_IS_ACTIVE_EDITOR,C.NOTEBOOK_HAS_RUNNING_CELL,C.NOTEBOOK_INTERRUPTIBLE_KERNEL,D.ContextKeyExpr.notEquals("config.notebook.globalToolbar",!0))},{id:k.MenuId.NotebookToolbar,order:-1,group:"navigation/execute",when:D.ContextKeyExpr.and(C.NOTEBOOK_HAS_RUNNING_CELL,C.NOTEBOOK_INTERRUPTIBLE_KERNEL,D.ContextKeyExpr.equals("config.notebook.globalToolbar",!0))}]})}getEditorContextFromArgsOrActive(F,L){return(0,v.getContextFromUri)(F,L)??(0,v.getContextFromActiveEditor)(F.get(r.IEditorService))}async runWithContext(F,L){return L.notebookEditor.cancelNotebookCells()}}),(0,k.registerAction2)(class extends v.NotebookAction{constructor(){super({id:y,title:(0,A.localize)(15,null),precondition:C.NOTEBOOK_HAS_RUNNING_CELL,menu:[{id:k.MenuId.EditorTitle,when:D.ContextKeyExpr.and(C.NOTEBOOK_IS_ACTIVE_EDITOR,C.NOTEBOOK_HAS_RUNNING_CELL,D.ContextKeyExpr.notEquals("config.notebook.globalToolbar",!0)),group:"navigation",order:0},{id:k.MenuId.NotebookToolbar,when:D.ContextKeyExpr.and(C.NOTEBOOK_IS_ACTIVE_EDITOR,C.NOTEBOOK_HAS_RUNNING_CELL,D.ContextKeyExpr.equals("config.notebook.globalToolbar",!0)),group:"navigation/execute",order:0},{id:k.MenuId.InteractiveToolbar,when:D.ContextKeyExpr.and(C.NOTEBOOK_HAS_RUNNING_CELL,D.ContextKeyExpr.equals("resourceScheme",p.Schemas.vscodeInteractive)),group:"navigation",order:10}],icon:I.ThemeIcon.modify(c.executingStateIcon,"spin")})}async runWithContext(F,L){const M=F.get(s.INotebookExecutionStateService),N=L.notebookEditor.textModel.uri,B=M.getCellExecutionStatesForNotebook(N);if(B[0]){const P=L.notebookEditor.getCellByHandle(B[0].cellHandle);P&&L.notebookEditor.revealInCenter(P)}}})}),define(ne[847],re([1,0,2,153,104,2183,64,267,16,7,141,21,168,1639]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingController=void 0;class i extends t.Disposable{constructor(p){super();this._notebookEditor=p,this._foldingModel=null,this._localStore=this._register(new t.DisposableStore),this._register(this._notebookEditor.onMouseUp(u=>{this.onMouseUp(u)})),this._register(this._notebookEditor.onDidChangeModel(()=>{this._localStore.clear(),!!this._notebookEditor.hasModel()&&(this._localStore.add(this._notebookEditor.onDidChangeCellState(u=>{u.source.editStateChanged&&u.cell.cellKind===k.CellKind.Markup&&this._foldingModel?.recompute()})),this._foldingModel=new A.FoldingModel,this._localStore.add(this._foldingModel),this._foldingModel.attachViewModel(this._notebookEditor._getViewModel()),this._localStore.add(this._foldingModel.onDidFoldingRegionChanged(()=>{this._updateEditorFoldingRanges()})))}))}saveViewState(){return this._foldingModel?.getMemento()||[]}restoreViewState(p){this._foldingModel?.applyMemento(p||[]),this._updateEditorFoldingRanges()}setFoldingStateDown(p,u,a){const n=u===2,h=this._foldingModel.getRegionAtLine(p+1),g=[];if(h&&(h.isCollapsed!==n&&g.push(h),a>1)){const d=this._foldingModel.getRegionsInside(h,(m,b)=>m.isCollapsed!==n&&b<a);g.push(...d)}g.forEach(d=>this._foldingModel.setCollapsed(d.regionIndex,u===2)),this._updateEditorFoldingRanges()}setFoldingStateUp(p,u,a){if(!this._foldingModel)return;this._foldingModel.getAllRegionsAtLine(p+1,(h,g)=>h.isCollapsed!==(u===2)&&g<=a).forEach(h=>this._foldingModel.setCollapsed(h.regionIndex,u===2)),this._updateEditorFoldingRanges()}_updateEditorFoldingRanges(){if(!this._foldingModel||!this._notebookEditor.hasModel())return;const p=this._notebookEditor._getViewModel();p.updateFoldingRanges(this._foldingModel.regions);const u=p.getHiddenRanges();this._notebookEditor.setHiddenAreas(u)}onMouseUp(p){if(!p.event.target||!this._notebookEditor.hasModel())return;const u=this._notebookEditor._getViewModel(),a=p.event.target;if(a.classList.contains("codicon-notebook-collapsed")||a.classList.contains("codicon-notebook-expanded")){if(!a.parentElement.classList.contains("notebook-folding-indicator"))return;const h=p.target,g=u.getCellIndex(h),d=u.getFoldingState(g);if(d===0)return;this.setFoldingStateUp(g,d===2?1:2,1),this._notebookEditor.focusElement(h)}}}e.FoldingController=i,i.id="workbench.notebook.findController",(0,D.registerNotebookContribution)(i.id,i);const S=(0,c.localize)(0,null),s=(0,c.localize)(1,null),l={args:[{isOptional:!0,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}}}}]};(0,I.registerAction2)(class extends I.Action2{constructor(){super({id:"notebook.fold",title:{value:(0,c.localize)(2,null),original:"Fold Cell"},category:o.NOTEBOOK_ACTIONS_CATEGORY,keybinding:{when:w.ContextKeyExpr.and(f.NOTEBOOK_EDITOR_FOCUSED,w.ContextKeyExpr.not(v.InputFocusedContextKey)),primary:2048|1024|87,mac:{primary:2048|512|87,secondary:[15]},secondary:[15],weight:200},description:{description:S,args:l.args},precondition:f.NOTEBOOK_IS_ACTIVE_EDITOR,f1:!0})}async run(r,p){const u=r.get(C.IEditorService),a=(0,_.getNotebookEditorFromEditorPane)(u.activeEditorPane);if(!a||!a.hasModel())return;const n=p&&p.levels||1,h=p&&p.direction==="up"?"up":"down";let g;if(p)g=p.index;else{const m=a.getActiveCell();if(!m)return;g=a.getCellIndex(m)}const d=a.getContribution(i.id);if(g!==void 0){if((g<0||g>=a.getLength()?void 0:a.cellAt(g))?.cellKind===k.CellKind.Code&&h==="down")return;h==="up"?d.setFoldingStateUp(g,2,n):d.setFoldingStateDown(g,2,n);const b=a._getViewModel().getNearestVisibleCellIndexUpwards(g);a.focusElement(a.cellAt(b))}}}),(0,I.registerAction2)(class extends I.Action2{constructor(){super({id:"notebook.unfold",title:{value:s,original:"Unfold Cell"},category:o.NOTEBOOK_ACTIONS_CATEGORY,keybinding:{when:w.ContextKeyExpr.and(f.NOTEBOOK_EDITOR_FOCUSED,w.ContextKeyExpr.not(v.InputFocusedContextKey)),primary:2048|1024|89,mac:{primary:2048|512|89,secondary:[17]},secondary:[17],weight:200},description:{description:s,args:l.args},precondition:f.NOTEBOOK_IS_ACTIVE_EDITOR,f1:!0})}async run(r,p){const u=r.get(C.IEditorService),a=(0,_.getNotebookEditorFromEditorPane)(u.activeEditorPane);if(!a)return;const n=p&&p.levels||1,h=p&&p.direction==="up"?"up":"down";let g;if(p)g=p.index;else{const m=a.getActiveCell();if(!m)return;g=a.getCellIndex(m)}const d=a.getContribution(i.id);g!==void 0&&(h==="up"?d.setFoldingStateUp(g,1,n):d.setFoldingStateDown(g,1,n))}})}),define(ne[2276],re([1,0,33,42,1640,16,7,141,491,168,153,64]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const o="notebook.cell.insertCodeCellAbove",c="notebook.cell.insertCodeCellBelow",i="notebook.cell.insertCodeCellAboveAndFocusContainer",S="notebook.cell.insertCodeCellBelowAndFocusContainer",s="notebook.cell.insertCodeCellAtTop",l="notebook.cell.insertMarkdownCellAbove",r="notebook.cell.insertMarkdownCellBelow",p="notebook.cell.insertMarkdownCellAtTop";class u extends w.NotebookAction{constructor(n,h,g,d){super(n);this.kind=h,this.direction=g,this.focusEditor=d}async runWithContext(n,h){let g=null;h.ui&&h.notebookEditor.focus();const d=n.get(f.ILanguageService);if(h.cell){const m=h.notebookEditor.getCellIndex(h.cell);g=(0,I.insertCell)(d,h.notebookEditor,m,this.kind,this.direction,void 0,!0)}else{const m=h.notebookEditor.getFocus(),b=Math.max(m.end-1,0);g=(0,I.insertCell)(d,h.notebookEditor,b,this.kind,this.direction,void 0,!0)}g&&h.notebookEditor.focusNotebookCell(g,this.focusEditor?"editor":"container")}}(0,A.registerAction2)(class extends u{constructor(){super({id:o,title:(0,_.localize)(0,null),keybinding:{primary:2048|1024|3,when:k.ContextKeyExpr.and(v.NOTEBOOK_CELL_LIST_FOCUSED,D.InputFocusedContext.toNegated()),weight:200},menu:{id:A.MenuId.NotebookCellInsert,order:0}},C.CellKind.Code,"above",!0)}}),(0,A.registerAction2)(class extends u{constructor(){super({id:i,title:(0,_.localize)(1,null)},C.CellKind.Code,"above",!1)}}),(0,A.registerAction2)(class extends u{constructor(){super({id:c,title:(0,_.localize)(2,null),keybinding:{primary:2048|3,when:k.ContextKeyExpr.and(v.NOTEBOOK_CELL_LIST_FOCUSED,D.InputFocusedContext.toNegated()),weight:200},menu:{id:A.MenuId.NotebookCellInsert,order:1}},C.CellKind.Code,"below",!0)}}),(0,A.registerAction2)(class extends u{constructor(){super({id:S,title:(0,_.localize)(3,null)},C.CellKind.Code,"below",!1)}}),(0,A.registerAction2)(class extends u{constructor(){super({id:l,title:(0,_.localize)(4,null),menu:{id:A.MenuId.NotebookCellInsert,order:2}},C.CellKind.Markup,"above",!0)}}),(0,A.registerAction2)(class extends u{constructor(){super({id:r,title:(0,_.localize)(5,null),menu:{id:A.MenuId.NotebookCellInsert,order:3}},C.CellKind.Markup,"below",!0)}}),(0,A.registerAction2)(class extends w.NotebookAction{constructor(){super({id:s,title:(0,_.localize)(6,null),f1:!1})}async run(n,h){h=h??this.getEditorContextFromArgsOrActive(n),h&&this.runWithContext(n,h)}async runWithContext(n,h){const g=n.get(f.ILanguageService),d=(0,I.insertCell)(g,h.notebookEditor,0,C.CellKind.Code,"above",void 0,!0);d&&h.notebookEditor.focusNotebookCell(d,"editor")}}),(0,A.registerAction2)(class extends w.NotebookAction{constructor(){super({id:p,title:(0,_.localize)(7,null),f1:!1})}async run(n,h){h=h??this.getEditorContextFromArgsOrActive(n),h&&this.runWithContext(n,h)}async runWithContext(n,h){const g=n.get(f.ILanguageService),d=(0,I.insertCell)(g,h.notebookEditor,0,C.CellKind.Markup,"above",void 0,!0);d&&h.notebookEditor.focusNotebookCell(d,"editor")}}),A.MenuRegistry.appendMenuItem(A.MenuId.NotebookCellBetween,{command:{id:c,title:(0,_.localize)(8,null),tooltip:(0,_.localize)(9,null)},order:0,group:"inline",when:k.ContextKeyExpr.and(v.NOTEBOOK_EDITOR_EDITABLE.isEqualTo(!0),k.ContextKeyExpr.notEquals("config.notebook.experimental.insertToolbarAlignment","left"))}),A.MenuRegistry.appendMenuItem(A.MenuId.NotebookCellBetween,{command:{id:c,title:(0,_.localize)(10,null),icon:t.Codicon.add,tooltip:(0,_.localize)(11,null)},order:0,group:"inline",when:k.ContextKeyExpr.and(v.NOTEBOOK_EDITOR_EDITABLE.isEqualTo(!0),k.ContextKeyExpr.equals("config.notebook.experimental.insertToolbarAlignment","left"))}),A.MenuRegistry.appendMenuItem(A.MenuId.NotebookToolbar,{command:{id:c,icon:t.Codicon.add,title:(0,_.localize)(12,null),tooltip:(0,_.localize)(13,null)},order:-5,group:"navigation/add",when:k.ContextKeyExpr.and(v.NOTEBOOK_EDITOR_EDITABLE.isEqualTo(!0),k.ContextKeyExpr.notEquals("config.notebook.insertToolbarLocation","betweenCells"),k.ContextKeyExpr.notEquals("config.notebook.insertToolbarLocation","hidden"))}),A.MenuRegistry.appendMenuItem(A.MenuId.NotebookCellListTop,{command:{id:s,title:(0,_.localize)(14,null),tooltip:(0,_.localize)(15,null)},order:0,group:"inline",when:k.ContextKeyExpr.and(v.NOTEBOOK_EDITOR_EDITABLE.isEqualTo(!0),k.ContextKeyExpr.notEquals("config.notebook.experimental.insertToolbarAlignment","left"))}),A.MenuRegistry.appendMenuItem(A.MenuId.NotebookCellListTop,{command:{id:s,title:(0,_.localize)(16,null),icon:t.Codicon.add,tooltip:(0,_.localize)(17,null)},order:0,group:"inline",when:k.ContextKeyExpr.and(v.NOTEBOOK_EDITOR_EDITABLE.isEqualTo(!0),k.ContextKeyExpr.equals("config.notebook.experimental.insertToolbarAlignment","left"))}),A.MenuRegistry.appendMenuItem(A.MenuId.NotebookCellBetween,{command:{id:r,title:(0,_.localize)(18,null),tooltip:(0,_.localize)(19,null)},order:1,group:"inline",when:k.ContextKeyExpr.and(v.NOTEBOOK_EDITOR_EDITABLE.isEqualTo(!0),k.ContextKeyExpr.notEquals("config.notebook.experimental.insertToolbarAlignment","left"))}),A.MenuRegistry.appendMenuItem(A.MenuId.NotebookToolbar,{command:{id:r,icon:t.Codicon.add,title:(0,_.localize)(20,null),tooltip:(0,_.localize)(21,null)},order:-5,group:"navigation/add",when:k.ContextKeyExpr.and(v.NOTEBOOK_EDITOR_EDITABLE.isEqualTo(!0),k.ContextKeyExpr.notEquals("config.notebook.insertToolbarLocation","betweenCells"),k.ContextKeyExpr.notEquals("config.notebook.insertToolbarLocation","hidden"),k.ContextKeyExpr.notEquals(`config.${C.NotebookSetting.globalToolbarShowLabel}`,!1),k.ContextKeyExpr.notEquals(`config.${C.NotebookSetting.globalToolbarShowLabel}`,"never"))}),A.MenuRegistry.appendMenuItem(A.MenuId.NotebookCellListTop,{command:{id:p,title:(0,_.localize)(22,null),tooltip:(0,_.localize)(23,null)},order:1,group:"inline",when:k.ContextKeyExpr.and(v.NOTEBOOK_EDITOR_EDITABLE.isEqualTo(!0),k.ContextKeyExpr.notEquals("config.notebook.experimental.insertToolbarAlignment","left"))})}),define(ne[848],re([1,0,10,36,6,2,19,113,1647,7,23,5,24,27,12,166,44,168,290,801,64,232,584,603,59,21]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookEditor=void 0;const m="NotebookEditorViewState";let b=class _r extends S.EditorPane{constructor(T,R,O,x,F,L,M,N,B,P,V){super(_r.ID,T,R,x);this.instantiationService=O,this._editorService=F,this._editorGroupService=L,this._editorDropService=M,this._notebookWidgetService=N,this._contextKeyService=B,this.fileService=P,this._groupListener=this._register(new A.DisposableStore),this._widgetDisposableStore=this._register(new A.DisposableStore),this._widget={value:void 0},this.inputListener=this._register(new A.MutableDisposable),this._onDidFocusWidget=this._register(new _.Emitter),this._onDidBlurWidget=this._register(new _.Emitter),this._onDidChangeModel=this._register(new _.Emitter),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeSelection=this._register(new _.Emitter),this.onDidChangeSelection=this._onDidChangeSelection.event,this._editorMemento=this.getEditorMemento(L,V,m),this._register(this.fileService.onDidChangeFileSystemProviderCapabilities(z=>this.onDidChangeFileSystemProvider(z.scheme))),this._register(this.fileService.onDidChangeFileSystemProviderRegistrations(z=>this.onDidChangeFileSystemProvider(z.scheme)))}get onDidFocus(){return this._onDidFocusWidget.event}get onDidBlur(){return this._onDidBlurWidget.event}onDidChangeFileSystemProvider(T){this.input instanceof a.NotebookEditorInput&&this.input.resource?.scheme===T&&this.updateReadonly(this.input)}onDidChangeInputCapabilities(T){this.input===T&&this.updateReadonly(T)}updateReadonly(T){this._widget.value&&this._widget.value.setOptions({isReadOnly:T.hasCapability(2)})}get textModel(){return this._widget.value?.textModel}get minimumWidth(){return 220}get maximumWidth(){return Number.POSITIVE_INFINITY}set minimumWidth(T){}set maximumWidth(T){}get scopedContextKeyService(){return this._widget.value?.scopedContextKeyService}createEditor(T){this._rootElement=t.append(T,t.$(".notebook-editor"))}getDomNode(){return this._rootElement}getActionViewItem(T){if(T.id===l.SELECT_KERNEL_ID)return this.instantiationService.createInstance(p.NotebooKernelActionViewItem,T,this)}getControl(){return this._widget.value}setEditorVisible(T,R){super.setEditorVisible(T,R),R&&(this._groupListener.clear(),this._groupListener.add(R.onWillCloseEditor(O=>this._saveEditorViewState(O.editor))),this._groupListener.add(R.onDidModelChange(()=>{this._editorGroupService.activeGroup!==R&&this._widget?.value?.updateEditorFocus()}))),T||(this._saveEditorViewState(this.input),this.input&&this._widget.value&&this._widget.value.onWillHide())}focus(){super.focus(),this._widget.value?.focus()}hasFocus(){const T=document.activeElement,R=this._widget.value;return!!R&&t.isAncestor(T,R.getDomNode()||t.isAncestor(T,R.getOverflowContainerDomNode()))}async setInput(T,R,O,x){try{(0,n.clearMarks)(T.resource),(0,n.mark)(T.resource,"startTime");const F=this.group;this.inputListener.value=T.onDidChangeCapabilities(()=>this.onDidChangeInputCapabilities(T)),this._widgetDisposableStore.clear(),this._widget.value&&this._widget.value.onWillHide(),this._widget=this.instantiationService.invokeFunction(this._notebookWidgetService.retrieveWidget,F,T),this._widgetDisposableStore.add(this._widget.value.onDidChangeModel(()=>this._onDidChangeModel.fire())),this._widgetDisposableStore.add(this._widget.value.onDidChangeActiveCell(()=>this._onDidChangeSelection.fire({reason:2}))),this._dimension&&this._widget.value.layout(this._dimension,this._rootElement),await super.setInput(T,R,O,x);const L=await T.resolve();if((0,n.mark)(T.resource,"inputLoaded"),x.isCancellationRequested)return;if(L===null)throw new Error((0,I.localize)(0,null,T.viewType));this._widgetDisposableStore.add(L.notebook.onDidChangeContent(()=>this._onDidChangeSelection.fire({reason:3})));const M=R?.viewState??this._loadNotebookEditorViewState(T);this._widget.value?.setParentContextKeyService(this._contextKeyService),await this._widget.value.setModel(L.notebook,M);const N=T.hasCapability(2);await this._widget.value.setOptions({...R,isReadOnly:N}),this._widgetDisposableStore.add(this._widget.value.onDidFocusWidget(()=>this._onDidFocusWidget.fire())),this._widgetDisposableStore.add(this._widget.value.onDidBlurWidget(()=>this._onDidBlurWidget.fire())),this._widgetDisposableStore.add(this._editorDropService.createEditorDropTarget(this._widget.value.getDomNode(),{containsGroup:P=>this.group?.id===P.id})),(0,n.mark)(T.resource,"editorLoaded");const B=(0,n.getAndClearMarks)(T.resource);if(B){const P=B.startTime,V=B.extensionActivated,z=B.inputLoaded,U=B.customMarkdownLoaded,H=B.editorLoaded;P!==void 0&&V!==void 0&&z!==void 0&&U!==void 0&&H!==void 0?this.telemetryService.publicLog2("notebook/editorOpenPerf",{scheme:L.notebook.uri.scheme,ext:(0,k.extname)(L.notebook.uri),viewType:L.notebook.viewType,extensionActivated:V-P,inputLoaded:z-P,webviewCommLoaded:z-P,customMarkdownLoaded:U-P,editorLoaded:H-P}):console.warn(`notebook file open perf marks are broken: startTime ${P}, extensionActiviated ${V}, inputLoaded ${z}, customMarkdownLoaded ${U}, editorLoaded ${H}`)}}catch(F){const L=F instanceof Error?F:new Error(F.message);throw L.actions=[(0,f.toAction)({id:"workbench.notebook.action.openInTextEditor",label:(0,I.localize)(1,null),run:async()=>{const M=this._editorService.activeEditorPane;if(!M)return;const N=s.EditorResourceAccessor.getCanonicalUri(M.input);if(!!N&&N.toString()===T.resource?.toString())return this._editorService.openEditor({resource:N,options:{override:s.DEFAULT_EDITOR_ASSOCIATION.id,pinned:!0}})}})],L}}clearInput(){this.inputListener.clear(),this._widget.value&&(this._saveEditorViewState(this.input),this._widget.value.onWillHide()),super.clearInput()}setOptions(T){this._widget.value?.setOptions(T),super.setOptions(T)}saveState(){this._saveEditorViewState(this.input),super.saveState()}getViewState(){const T=this.input;if(T instanceof a.NotebookEditorInput)return this._saveEditorViewState(T),this._loadNotebookEditorViewState(T)}getSelection(){if(this._widget.value){const T=this._widget.value.getActiveCell()?.uri;if(T)return new E(T)}}_saveEditorViewState(T){if(this.group&&this._widget.value&&T instanceof a.NotebookEditorInput){if(this._widget.value.isDisposed)return;const R=this._widget.value.getEditorViewState();this._editorMemento.saveEditorState(this.group,T.resource,R)}}_loadNotebookEditorViewState(T){let R;if(this.group&&(R=this._editorMemento.loadEditorState(this.group,T.resource)),R)return R;for(const O of this._editorGroupService.getGroups(1))if(O.activeEditorPane!==this&&O.activeEditorPane instanceof _r&&O.activeEditor?.matches(T))return O.activeEditorPane._widget.value?.getEditorViewState()}layout(T){this._rootElement.classList.toggle("mid-width",T.width<1e3&&T.width>=600),this._rootElement.classList.toggle("narrow-width",T.width<600),this._dimension=T,!(!this._widget.value||!(this._input instanceof a.NotebookEditorInput))&&(this._input.resource.toString()!==this.textModel?.uri.toString()&&this._widget.value?.hasModel()||this._widget.value.layout(this._dimension,this._rootElement))}dispose(){super.dispose()}};b.ID=u.NOTEBOOK_EDITOR_ID,b=Ee([W(0,c.ITelemetryService),W(1,i.IThemeService),W(2,C.IInstantiationService),W(3,o.IStorageService),W(4,d.IEditorService),W(5,g.IEditorGroupsService),W(6,h.IEditorDropService),W(7,r.INotebookEditorService),W(8,w.IContextKeyService),W(9,v.IFileService),W(10,D.ITextResourceConfigurationService)],b),e.NotebookEditor=b;class E{constructor(T){this.cellUri=T}compare(T){return T instanceof E&&(0,k.isEqual)(this.cellUri,T.cellUri)?1:3}restore(T){const R={cellOptions:{resource:this.cellUri}};return Object.assign(R,T),R}log(){return this.cellUri.fragment}}}),define(ne[2277],re([1,0,1649,28,31,114,168,64,158,238]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookExecutionService=void 0;let v=class{constructor(o,c,i,S,s){this._commandService=o,this._notebookKernelService=c,this._workspaceTrustRequestService=i,this._logService=S,this._notebookExecutionStateService=s}async executeNotebookCells(o,c){const i=Array.from(c);this._logService.debug(`NotebookExecutionService#executeNotebookCells ${JSON.stringify(i.map(p=>p.handle))}`);const S=t.localize(0,null);if(!await this._workspaceTrustRequestService.requestWorkspaceTrust({message:S}))return;let l=this._notebookKernelService.getSelectedOrSuggestedKernel(o);if(l||(await this._commandService.executeCommand(k.SELECT_KERNEL_ID),l=this._notebookKernelService.getSelectedOrSuggestedKernel(o)),!l)return;const r=[];for(const p of i){const u=this._notebookExecutionStateService.getCellExecution(p.uri);p.cellKind!==D.CellKind.Code||!!u||!l.supportedLanguages.includes(p.language)||r.push(p)}if(r.length>0){this._notebookKernelService.selectKernelForNotebook(l,o);const p=r.map(a=>this._notebookExecutionStateService.createCellExecution(l.id,o.uri,a.handle));await l.executeNotebookCellsRequest(o.uri,r.map(a=>a.handle));const u=p.filter(a=>a.state===D.NotebookCellExecutionState.Unconfirmed);u.length&&(this._logService.debug(`NotebookExecutionService#executeNotebookCells completing unconfirmed executions ${JSON.stringify(u.map(a=>a.cellHandle))}`),u.forEach(a=>a.complete({})))}}async cancelNotebookCellHandles(o,c){const i=Array.from(c);this._logService.debug(`NotebookExecutionService#cancelNotebookCellHandles ${JSON.stringify(i)}`);const S=this._notebookKernelService.getSelectedOrSuggestedKernel(o);S&&await S.cancelNotebookCellExecution(o.uri,i)}async cancelNotebookCells(o,c){this.cancelNotebookCellHandles(o,Array.from(c,i=>i.handle))}};v=Ee([W(0,f.ICommandService),W(1,w.INotebookKernelService),W(2,A.IWorkspaceTrustRequestService),W(3,_.ILogService),W(4,I.INotebookExecutionStateService)],v),e.NotebookExecutionService=v}),define(ne[606],re([1,0,6,2,51,1652,16,8,57,7,17,74,168,153,175,64]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellEditorOptions=void 0;class s extends i.CellPart{constructor(r,p,u,a){super();this.notebookEditor=r,this.notebookOptions=p,this.configurationService=u,this.language=a,this._lineNumbers="inherit",this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this._localDisposableStore=this._register(new f.DisposableStore),this._register(u.onDidChangeConfiguration(n=>{(n.affectsConfiguration("editor")||n.affectsConfiguration("notebook"))&&this._recomputeOptions()})),this._register(p.onDidChangeOptions(n=>{(n.cellStatusBarVisibility||n.editorTopPadding||n.editorOptionsCustomizations)&&this._recomputeOptions()})),this._register(this.notebookEditor.onDidChangeModel(()=>{this._localDisposableStore.clear(),this.notebookEditor.hasModel()&&(this._localDisposableStore.add(this.notebookEditor.onDidChangeOptions(()=>{this._recomputeOptions()})),this._recomputeOptions())})),this.notebookEditor.hasModel()&&this._localDisposableStore.add(this.notebookEditor.onDidChangeOptions(()=>{this._recomputeOptions()})),this._value=this._computeEditorOptions()}updateState(r,p){p.cellLineNumberChanged&&this.setLineNumbers(r.lineNumbers)}_recomputeOptions(){this._value=this._computeEditorOptions(),this._onDidChange.fire()}_computeEditorOptions(){const p=this.configurationService.getValue("notebook.lineNumbers")==="on"?"on":"off",u=(0,_.deepClone)(this.configurationService.getValue("editor",{overrideIdentifier:this.language})),n=this.notebookOptions.getLayoutConfiguration().editorOptionsCustomizations??{},h={};for(const d in n)d.indexOf("editor.")===0&&(h[d.substring(7)]=n[d]);return{...u,...s.fixedEditorOptions,lineNumbers:p,...h,padding:{top:12,bottom:12},readOnly:this.notebookEditor.isReadOnly}}getUpdatedValue(r,p){const u=this.getValue(r,p);return delete u.hover,u}getValue(r,p){return{...this._value,padding:this.notebookOptions.computeEditorPadding(r,p)}}getDefaultValue(){return{...this._value,padding:{top:12,bottom:12}}}setLineNumbers(r){if(this._lineNumbers=r,this._lineNumbers==="inherit"){const u=this.configurationService.getValue("notebook.lineNumbers")==="on"?"on":"off";this._value.lineNumbers=u}else this._value.lineNumbers=r;this._onDidChange.fire()}}e.CellEditorOptions=s,s.fixedEditorOptions={scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!1},renderLineHighlightOnlyWhenFocus:!0,overviewRulerLanes:0,selectOnLineNumbers:!1,lineNumbers:"off",lineDecorationsWidth:0,folding:!0,fixedOverflowWidgets:!0,minimap:{enabled:!1},renderValidationDecorations:"on",lineNumbersMinChars:3},v.Registry.as(I.Extensions.Configuration).registerConfiguration({id:"notebook",order:100,type:"object",properties:{"notebook.lineNumbers":{type:"string",enum:["off","on"],default:"off",markdownDescription:(0,A.localize)(0,null)}}}),(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:"notebook.toggleLineNumbers",title:{value:(0,A.localize)(1,null),original:"Toggle Notebook Line Numbers"},precondition:c.NOTEBOOK_EDITOR_FOCUSED,menu:[{id:k.MenuId.NotebookToolbar,group:"notebookLayout",order:2,when:w.ContextKeyExpr.equals("config.notebook.globalToolbar",!0)}],category:o.NOTEBOOK_ACTIONS_CATEGORY,f1:!0,toggled:{condition:w.ContextKeyExpr.notEquals("config.notebook.lineNumbers","off"),title:{value:(0,A.localize)(2,null),original:"Show Notebook Line Numbers"}}})}async run(r){const p=r.get(D.IConfigurationService);p.getValue("notebook.lineNumbers")==="on"?p.updateValue("notebook.lineNumbers","off"):p.updateValue("notebook.lineNumbers","on")}}),(0,k.registerAction2)(class extends o.NotebookMultiCellAction{constructor(){super({id:"notebook.cell.toggleLineNumbers",title:(0,A.localize)(3,null),precondition:C.ActiveEditorContext.isEqualTo(S.NOTEBOOK_EDITOR_ID),menu:[{id:k.MenuId.NotebookCellTitle,group:"View",order:1}],toggled:w.ContextKeyExpr.or(c.NOTEBOOK_CELL_LINE_NUMBERS.isEqualTo("on"),w.ContextKeyExpr.and(c.NOTEBOOK_CELL_LINE_NUMBERS.isEqualTo("inherit"),w.ContextKeyExpr.equals("config.notebook.lineNumbers","on")))})}async runWithContext(r,p){if(p.ui)this.updateCell(r.get(D.IConfigurationService),p.cell);else{const u=r.get(D.IConfigurationService);p.selectedCells.forEach(a=>{this.updateCell(u,a)})}}updateCell(r,p){const u=r.getValue("notebook.lineNumbers")==="on",a=p.lineNumbers;a==="on"||a==="inherit"&&u?p.lineNumbers="off":p.lineNumbers="on"}})}),define(ne[2278],re([1,0,10,33,1658,847,104,175]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldedCellHint=void 0;class I extends D.CellPart{constructor(v,C){super();this._notebookEditor=v,this._container=C}didRenderCell(v){this.update(v)}update(v){if(!!this._notebookEditor.hasModel())if(v.isInputCollapsed||v.getEditState()===k.CellEditState.Editing)t.hide(this._container);else if(v.foldingState===2){const C=this._notebookEditor._getViewModel().getCellIndex(v),o=this._notebookEditor._getViewModel().getFoldedLength(C);t.reset(this._container,this.getHiddenCellsLabel(o),this.getHiddenCellHintButton(v)),t.show(this._container);const c=v.layoutInfo.previewHeight;this._container.style.top=`${c}px`}else v.foldingState===1&&t.hide(this._container)}getHiddenCellsLabel(v){const C=v===1?(0,_.localize)(0,null):(0,_.localize)(1,null,v);return t.$("span.notebook-folded-hint-label",void 0,C)}getHiddenCellHintButton(v){const C=t.$("span.cell-expand-part-button");return C.classList.add(...f.CSSIcon.asClassNameArray(f.Codicon.more)),this._register(t.addDisposableListener(C,t.EventType.CLICK,()=>{const o=this._notebookEditor.getContribution(A.FoldingController.id),c=this._notebookEditor.getCellIndex(v);typeof c=="number"&&o.setFoldingStateDown(c,1,1)})),C}updateInternalLayoutNow(v){this.update(v)}}e.FoldedCellHint=I}),define(ne[2279],re([1,0,10,181,11,30,33,2,165,58,42,308,1659,8,7,5,155,38,104,200,606,357]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StatefulMarkdownCell=void 0;let n=class extends D.Disposable{constructor(g,d,m,b,E,y,T,R,O,x){super();this.notebookEditor=g,this.viewCell=d,this.templateData=m,this.renderedEditors=b,this.contextKeyService=E,this.notebookCellStatusBarService=y,this.instantiationService=T,this.languageService=R,this.configurationService=O,this.keybindingService=x,this.editor=null,this.localDisposables=this._register(new D.DisposableStore),this.focusSwitchDisposable=this._register(new D.MutableDisposable),this.editorDisposables=this._register(new D.DisposableStore),this.constructDOM(),this.editorPart=m.editorPart,this.cellEditorOptions=this._register(new u.CellEditorOptions(this.notebookEditor,this.notebookEditor.notebookOptions,this.configurationService,this.viewCell.language)),this.cellEditorOptions.setLineNumbers(this.viewCell.lineNumbers),this.editorOptions=this.cellEditorOptions.getValue(this.viewCell.internalMetadata,this.viewCell.uri),this._register((0,D.toDisposable)(()=>b.delete(this.viewCell))),this.registerListeners(),this.templateData.cellParts.forEach(F=>F.renderCell(this.viewCell)),this._register((0,D.toDisposable)(()=>{this.templateData.cellParts.forEach(F=>F.unrenderCell(this.viewCell))})),this.updateForHover(),this.updateForFocusModeChange(),this.foldingState=d.foldingState,this.layoutFoldingIndicator(),this.updateFoldingIconShowClass(),this.viewCell.layoutInfo.totalHeight>0&&this.relayoutCell(),this.applyDecorations(),this.viewUpdate(),this.layoutCellParts(),this._register(this.viewCell.onDidChangeLayout(()=>{this.layoutCellParts()}))}layoutCellParts(){this.templateData.cellParts.forEach(g=>{g.updateInternalLayoutNow(this.viewCell)})}constructDOM(){const g=`aria-markup-cell-${this.viewCell.id}`;this.markdownAccessibilityContainer=this.templateData.cellContainer,this.markdownAccessibilityContainer.id=g,this.markdownAccessibilityContainer.style.height="1px",this.markdownAccessibilityContainer.style.position="absolute",this.markdownAccessibilityContainer.style.top="10000px",this.markdownAccessibilityContainer.ariaHidden="false",this.templateData.rootContainer.setAttribute("aria-describedby",g),this.templateData.container.classList.toggle("webview-backed-markdown-cell",!0)}registerListeners(){this._register(this.viewCell.onDidChangeState(g=>{this.templateData.cellParts.forEach(d=>{d.updateState(this.viewCell,g)})})),this._register(this.viewCell.model.onDidChangeMetadata(()=>{this.viewUpdate()})),this._register(this.viewCell.onDidChangeState(g=>{if((g.editStateChanged||g.contentChanged)&&this.viewUpdate(),g.focusModeChanged&&this.updateForFocusModeChange(),g.foldingStateChanged){const d=this.viewCell.foldingState;d!==this.foldingState&&(this.foldingState=d,this.layoutFoldingIndicator())}g.cellIsHoveredChanged&&this.updateForHover(),g.inputCollapsedChanged&&(this.updateCollapsedState(),this.viewUpdate()),g.cellLineNumberChanged&&this.cellEditorOptions.setLineNumbers(this.viewCell.lineNumbers)})),this._register(this.notebookEditor.notebookOptions.onDidChangeOptions(g=>{g.showFoldingControls&&this.updateFoldingIconShowClass()})),this._register(this.viewCell.onDidChangeLayout(g=>{const d=this.editor?.getLayoutInfo();g.outerWidth&&this.viewCell.getEditState()===r.CellEditState.Editing&&d&&d.width!==this.viewCell.layoutInfo.editorWidth?this.onCellEditorWidthChange():(g.totalHeight||g.outerWidth)&&this.relayoutCell()})),this._register(this.cellEditorOptions.onDidChange(()=>{this.updateEditorOptions(this.cellEditorOptions.getUpdatedValue(this.viewCell.internalMetadata,this.viewCell.uri))}))}updateCollapsedState(){this.viewCell.isInputCollapsed?this.notebookEditor.hideMarkupPreviews([this.viewCell]):this.notebookEditor.unhideMarkupPreviews([this.viewCell])}updateForHover(){this.templateData.container.classList.toggle("markdown-cell-hover",this.viewCell.cellIsHovered)}updateForFocusModeChange(){this.viewCell.focusMode===r.CellFocusMode.Editor&&this.focusEditorIfNeeded(),this.templateData.container.classList.toggle("cell-editor-focus",this.viewCell.focusMode===r.CellFocusMode.Editor)}applyDecorations(){this._register(this.viewCell.onCellDecorationsChanged(g=>{g.added.forEach(d=>{d.className&&this.notebookEditor.deltaCellOutputContainerClassNames(this.viewCell.id,[d.className],[])}),g.removed.forEach(d=>{d.className&&this.notebookEditor.deltaCellOutputContainerClassNames(this.viewCell.id,[],[d.className])})})),this.viewCell.getCellDecorations().forEach(g=>{g.className&&this.notebookEditor.deltaCellOutputContainerClassNames(this.viewCell.id,[g.className],[])})}dispose(){this.notebookEditor.getActiveCell()===this.viewCell&&this.viewCell.focusMode===r.CellFocusMode.Editor&&this.notebookEditor.focusContainer(),this.viewCell.detachTextEditor(),super.dispose()}updateFoldingIconShowClass(){const g=this.notebookEditor.notebookOptions.getLayoutConfiguration().showFoldingControls;this.templateData.foldingIndicator.classList.remove("mouseover","always"),this.templateData.foldingIndicator.classList.add(g)}viewUpdate(){this.viewCell.isInputCollapsed?this.viewUpdateCollapsed():this.viewCell.getEditState()===r.CellEditState.Editing?this.viewUpdateEditing():this.viewUpdatePreview()}viewUpdateCollapsed(){t.show(this.templateData.cellInputCollapsedContainer),t.hide(this.editorPart),this.templateData.cellInputCollapsedContainer.innerText="",t.append(this.templateData.cellInputCollapsedContainer,t.$("span")).classList.add(...k.CSSIcon.asClassNameArray(k.Codicon.markdown));const d=t.$("div");d.classList.add("cell-collapse-preview");const m=this.getRichText(this.viewCell.textBuffer,this.viewCell.language);t.safeInnerHtml(d,m),this.templateData.cellInputCollapsedContainer.appendChild(d);const b=t.append(d,t.$("span.expandInputIcon"));b.classList.add(...k.CSSIcon.asClassNameArray(k.Codicon.more));const E=this.keybindingService.lookupKeybinding(r.EXPAND_CELL_INPUT_COMMAND_ID);E&&(d.title=(0,o.localize)(0,null,E.getLabel()),b.title=(0,o.localize)(1,null,E.getLabel())),this.markdownAccessibilityContainer.ariaHidden="true",this.templateData.container.classList.toggle("input-collapsed",!0),this.viewCell.renderedMarkdownHeight=0,this.viewCell.layoutChange({})}getRichText(g,d){return(0,C.tokenizeToStringSync)(this.languageService,g.getLineContent(1),d)}viewUpdateEditing(){let g;if(t.show(this.editorPart),this.markdownAccessibilityContainer.ariaHidden="true",t.hide(this.templateData.cellInputCollapsedContainer),this.notebookEditor.hideMarkupPreviews([this.viewCell]),this.templateData.container.classList.toggle("input-collapsed",!1),this.templateData.container.classList.toggle("markdown-cell-edit-mode",!0),this.editor&&this.editor.hasModel())g=this.editor.getContentHeight(),this.viewCell.attachTextEditor(this.editor),this.focusEditorIfNeeded(),this.bindEditorListeners(this.editor),this.editor.layout({width:this.viewCell.layoutInfo.editorWidth,height:g});else{this.editorDisposables.clear();const d=this.notebookEditor.notebookOptions.computeMarkdownCellEditorWidth(this.notebookEditor.getLayoutInfo().width),m=this.viewCell.lineCount,b=this.viewCell.layoutInfo.fontInfo?.lineHeight||17,E=this.notebookEditor.notebookOptions.computeEditorPadding(this.viewCell.internalMetadata,this.viewCell.uri);g=Math.max(m,1)*b+E.top+E.bottom,this.templateData.editorContainer.innerText="";const y=this.contextKeyService.createScoped(this.templateData.editorPart);w.EditorContextKeys.inCompositeEditor.bindTo(y).set(!0);const T=this.instantiationService.createChild(new s.ServiceCollection([i.IContextKeyService,y]));this.editorDisposables.add(y),this.editor=this.editorDisposables.add(T.createInstance(I.CodeEditorWidget,this.templateData.editorContainer,{...this.editorOptions,dimension:{width:d,height:g}},{contributions:this.notebookEditor.creationOptions.cellEditorContributions})),this.templateData.currentEditor=this.editor;const R=new A.CancellationTokenSource;this.editorDisposables.add({dispose(){R.dispose(!0)}}),(0,_.raceCancellation)(this.viewCell.resolveTextModel(),R.token).then(O=>{if(!O)return;this.editor.setModel(O);const x=this.editor.getContentHeight();x!==g&&(this.editor.layout({width:d,height:x}),g=x),this.viewCell.attachTextEditor(this.editor),this.viewCell.getEditState()===r.CellEditState.Editing&&this.focusEditorIfNeeded(),this.bindEditorListeners(this.editor),this.viewCell.editorHeight=g})}this.viewCell.editorHeight=g,this.focusEditorIfNeeded(),this.renderedEditors.set(this.viewCell,this.editor)}viewUpdatePreview(){this.viewCell.detachTextEditor(),t.hide(this.editorPart),t.hide(this.templateData.cellInputCollapsedContainer),this.markdownAccessibilityContainer.ariaHidden="false",this.templateData.container.classList.toggle("input-collapsed",!1),this.templateData.container.classList.toggle("markdown-cell-edit-mode",!1),this.renderedEditors.delete(this.viewCell),this.markdownAccessibilityContainer.innerText="",this.viewCell.renderedHtml&&t.safeInnerHtml(this.markdownAccessibilityContainer,this.viewCell.renderedHtml),this.notebookEditor.createMarkupPreview(this.viewCell)}focusEditorIfNeeded(){if(this.viewCell.focusMode===r.CellFocusMode.Editor&&(this.notebookEditor.hasEditorFocus()||document.activeElement===document.body)){if(!this.editor)return;this.editor.focus();const g=this.editor.getSelection();if(!g)return;this.notebookEditor.revealRangeInViewAsync(this.viewCell,g)}}layoutEditor(g){this.editor?.layout(g)}onCellEditorWidthChange(){const g=this.editor.getContentHeight();this.layoutEditor({width:this.viewCell.layoutInfo.editorWidth,height:g})}relayoutCell(){this.notebookEditor.layoutNotebookCell(this.viewCell,this.viewCell.layoutInfo.totalHeight),this.layoutFoldingIndicator()}updateEditorOptions(g){this.editorOptions=g,this.editor&&this.editor.updateOptions(this.editorOptions)}layoutFoldingIndicator(){switch(this.foldingState){case 0:this.templateData.foldingIndicator.innerText="";break;case 2:t.reset(this.templateData.foldingIndicator,(0,f.renderIcon)(p.collapsedIcon));break;case 1:t.reset(this.templateData.foldingIndicator,(0,f.renderIcon)(p.expandedIcon));break;default:break}}bindEditorListeners(g){this.localDisposables.clear(),this.focusSwitchDisposable.clear(),this.localDisposables.add(g.onDidContentSizeChange(m=>{const b=g.getLayoutInfo();m.contentHeightChanged&&(this.viewCell.editorHeight=m.contentHeight,g.layout({width:b.width,height:m.contentHeight}))})),this.localDisposables.add(g.onDidChangeCursorSelection(m=>{if(m.source==="restoreState")return;const b=g.getSelections();if(b?.length){const E=b[b.length-1];this.notebookEditor.revealRangeInViewAsync(this.viewCell,E)}}));const d=()=>this.viewCell.focusMode=g.hasWidgetFocus()?r.CellFocusMode.Editor:r.CellFocusMode.Container;this.localDisposables.add(g.onDidFocusEditorWidget(()=>{d()})),this.localDisposables.add(g.onDidBlurEditorWidget(()=>{document.activeElement?.contains(this.templateData.container)?this.focusSwitchDisposable.value=(0,_.disposableTimeout)(()=>d(),300):d()})),d()}};n=Ee([W(4,i.IContextKeyService),W(5,a.INotebookCellStatusBarService),W(6,S.IInstantiationService),W(7,v.ILanguageService),W(8,c.IConfigurationService),W(9,l.IKeybindingService)],n),e.StatefulMarkdownCell=n}),define(ne[2280],re([1,0,10,139,163,36,6,2,73,16,8,37,5,38,32,12,168,64,801,414,21,295]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookEditorToolbar=void 0;var n;(function(T){T[T.Always=0]="Always",T[T.Never=1]="Never",T[T.Dynamic=2]="Dynamic"})(n||(n={}));const h=21,g=21,d=8;class m{constructor(R,O,x){this.notebookEditor=R,this.editorToolbar=O,this.instantiationService=x}actionProvider(R){if(R.id===s.SELECT_KERNEL_ID)return this.instantiationService.createInstance(r.NotebooKernelActionViewItem,R,this.notebookEditor);const O=this.editorToolbar.primaryActions.find(x=>x.action.id===R.id);return O&&O.renderLabel?R instanceof w.MenuItemAction?this.instantiationService.createInstance(p.ActionViewWithLabel,R):void 0:R instanceof w.MenuItemAction?this.instantiationService.createInstance(I.MenuEntryActionViewItem,R,void 0):void 0}_calculateFixedActions(R){const O=this.editorToolbar.primaryActions,F=O[O.length-1].action.id===_.ToggleMenuAction.ID;let L=0;const M=[];for(let N=0;N<O.length-(F?1:0);N++){const B=O[N],P=B.size;if(L+P<=R)L+=d+P,M.push(B);else break}return M.forEach(N=>N.visible=!0),O.slice(M.length).forEach(N=>N.visible=!1),{primaryActions:M.filter(N=>N.visible&&N.action.id!==_.ToggleMenuAction.ID).map(N=>N.action),secondaryActions:[...O.slice(M.length).filter(N=>!N.visible&&N.action.id!==_.ToggleMenuAction.ID).map(N=>N.action),...this.editorToolbar.secondaryActions]}}calculateActions(R){return this._calculateFixedActions(R)}}class b extends m{constructor(R,O,x){super(R,O,x)}actionProvider(R){return R.id===s.SELECT_KERNEL_ID?this.instantiationService.createInstance(r.NotebooKernelActionViewItem,R,this.notebookEditor):R instanceof w.MenuItemAction?this.instantiationService.createInstance(I.MenuEntryActionViewItem,R,void 0):void 0}}class E{constructor(R,O,x){this.notebookEditor=R,this.editorToolbar=O,this.instantiationService=x}actionProvider(R){if(R.id===s.SELECT_KERNEL_ID)return this.instantiationService.createInstance(r.NotebooKernelActionViewItem,R,this.notebookEditor);const O=this.editorToolbar.primaryActions.find(x=>x.action.id===R.id);return O&&O.renderLabel?R instanceof w.MenuItemAction?this.instantiationService.createInstance(p.ActionViewWithLabel,R):void 0:R instanceof w.MenuItemAction?this.instantiationService.createInstance(I.MenuEntryActionViewItem,R,void 0):void 0}calculateActions(R){const O=this.editorToolbar.primaryActions,x=this.editorToolbar.secondaryActions,L=O[O.length-1].action.id===_.ToggleMenuAction.ID,M=O.slice(0,O.length-(L?1:0));if(M.length===0)return{primaryActions:O.filter(U=>U.visible&&U.action.id!==_.ToggleMenuAction.ID).map(U=>U.action),secondaryActions:x};if(M.map(U=>U.size).reduce((U,H)=>U+H,0)+(M.length-1)*d<=R)return O.forEach(U=>{U.visible=!0,U.renderLabel=!0}),{primaryActions:O.filter(U=>U.visible&&U.action.id!==_.ToggleMenuAction.ID).map(U=>U.action),secondaryActions:x};if(M.length*h+(M.length-1)*d>R)return this._calcuateWithAlllabelsHidden(M,R);const B=[];let P=0,V=-1;for(let U=0;U<M.length;U++)if(P+=M[U].size+d,B.push(P),M[U].action instanceof A.Separator){const H=M.slice(U+1);P+(H.length===0?0:H.length*h+(H.length-1)*d)<=R&&(V=U)}else continue;if(V<0)return this._calcuateWithAlllabelsHidden(M,R);const z=M.slice(0,V+1);return z.forEach(U=>{U.visible=!0,U.renderLabel=!0}),O.slice(z.length).forEach(U=>{U.visible=!0,U.renderLabel=!1}),{primaryActions:O.filter(U=>U.visible&&U.action.id!==_.ToggleMenuAction.ID).map(U=>U.action),secondaryActions:x}}_calcuateWithAlllabelsHidden(R,O){const x=this.editorToolbar.primaryActions,F=this.editorToolbar.secondaryActions;x.forEach(N=>{N.renderLabel=!1});let L=0;const M=[];for(let N=0;N<R.length;N++){const B=R[N];if(B.action.id==="notebook.cell.insertMarkdownCellBelow"){M.push(B);continue}const P=h;if(L+P<=O)L+=d+P,M.push(B);else break}return M.forEach(N=>{N.action.id==="notebook.cell.insertMarkdownCellBelow"?N.visible=!1:N.visible=!0}),x.slice(M.length).forEach(N=>N.visible=!1),{primaryActions:M.filter(N=>N.visible&&N.action.id!==_.ToggleMenuAction.ID).map(N=>N.action),secondaryActions:[...x.slice(R.length).filter(N=>!N.visible&&N.action.id!==_.ToggleMenuAction.ID).map(N=>N.action),...F]}}}let y=class extends D.Disposable{constructor(R,O,x,F,L,M,N,B,P,V,z){super();this.notebookEditor=R,this.contextKeyService=O,this.notebookOptions=x,this.domNode=F,this.instantiationService=L,this.configurationService=M,this.contextMenuService=N,this.menuService=B,this.editorService=P,this.keybindingService=V,this.experimentService=z,this._useGlobalToolbar=!1,this._renderLabel=n.Always,this._onDidChangeState=this._register(new k.Emitter),this.onDidChangeState=this._onDidChangeState.event,this._dimension=null,this._primaryActions=[],this._secondaryActions=[],this._buildBody(),this._register(this.editorService.onDidActiveEditorChange(()=>{if(this.editorService.activeEditorPane?.getId()===l.NOTEBOOK_EDITOR_ID&&this.editorService.activeEditorPane.getControl()===this.notebookEditor){this._showNotebookActionsinEditorToolbar();return}})),this._registerNotebookActionsToolbar()}get primaryActions(){return this._primaryActions}get secondaryActions(){return this._secondaryActions}get useGlobalToolbar(){return this._useGlobalToolbar}_buildBody(){this._notebookTopLeftToolbarContainer=document.createElement("div"),this._notebookTopLeftToolbarContainer.classList.add("notebook-toolbar-left"),this._leftToolbarScrollable=new f.DomScrollableElement(this._notebookTopLeftToolbarContainer,{vertical:2,horizontal:1,horizontalScrollbarSize:3,useShadows:!1,scrollYToX:!0}),this._register(this._leftToolbarScrollable),t.append(this.domNode,this._leftToolbarScrollable.getDomNode()),this._notebookTopRightToolbarContainer=document.createElement("div"),this._notebookTopRightToolbarContainer.classList.add("notebook-toolbar-right"),t.append(this.domNode,this._notebookTopRightToolbarContainer)}_registerNotebookActionsToolbar(){this._notebookGlobalActionsMenu=this._register(this.menuService.createMenu(this.notebookEditor.creationOptions.menuIds.notebookToolbar,this.contextKeyService)),this._register(this._notebookGlobalActionsMenu),this._useGlobalToolbar=this.notebookOptions.getLayoutConfiguration().globalToolbar,this._renderLabel=this._convertConfiguration(this.configurationService.getValue(l.NotebookSetting.globalToolbarShowLabel)),this._updateStrategy();const R={ui:!0,notebookEditor:this.notebookEditor},O=L=>{if(L.id===s.SELECT_KERNEL_ID)return this.instantiationService.createInstance(r.NotebooKernelActionViewItem,L,this.notebookEditor);if(this._renderLabel!==n.Never){const M=this._primaryActions.find(N=>N.action.id===L.id);return M&&M.renderLabel?L instanceof w.MenuItemAction?this.instantiationService.createInstance(p.ActionViewWithLabel,L):void 0:L instanceof w.MenuItemAction?this.instantiationService.createInstance(I.MenuEntryActionViewItem,L,void 0):void 0}else return L instanceof w.MenuItemAction?this.instantiationService.createInstance(I.MenuEntryActionViewItem,L,void 0):void 0};this._notebookLeftToolbar=new _.ToolBar(this._notebookTopLeftToolbarContainer,this.contextMenuService,{getKeyBinding:L=>this.keybindingService.lookupKeybinding(L.id),actionViewItemProvider:L=>this._strategy.actionProvider(L),renderDropdownAsChildElement:!0}),this._register(this._notebookLeftToolbar),this._notebookLeftToolbar.context=R,this._notebookRightToolbar=new _.ToolBar(this._notebookTopRightToolbarContainer,this.contextMenuService,{getKeyBinding:L=>this.keybindingService.lookupKeybinding(L.id),actionViewItemProvider:O,renderDropdownAsChildElement:!0}),this._register(this._notebookRightToolbar),this._notebookRightToolbar.context=R,this._showNotebookActionsinEditorToolbar();let x=!1,F;this._register(this._notebookGlobalActionsMenu.onDidChange(()=>{if(x){F=()=>this._showNotebookActionsinEditorToolbar();return}this._showNotebookActionsinEditorToolbar()})),this._register(this._notebookLeftToolbar.onDidChangeDropdownVisibility(L=>{x=L,F&&!L&&(setTimeout(()=>{F&&F()},0),F=void 0)})),this._register(this.notebookOptions.onDidChangeOptions(L=>{L.globalToolbar!==void 0&&(this._useGlobalToolbar=this.notebookOptions.getLayoutConfiguration().globalToolbar,this._showNotebookActionsinEditorToolbar())})),this._register(this.configurationService.onDidChangeConfiguration(L=>{if(L.affectsConfiguration(l.NotebookSetting.globalToolbarShowLabel)){this._renderLabel=this._convertConfiguration(this.configurationService.getValue(l.NotebookSetting.globalToolbarShowLabel)),this._updateStrategy();const M=this._notebookLeftToolbar.getElement();M.parentElement?.removeChild(M),this._notebookLeftToolbar.dispose(),this._notebookLeftToolbar=new _.ToolBar(this._notebookTopLeftToolbarContainer,this.contextMenuService,{getKeyBinding:N=>this.keybindingService.lookupKeybinding(N.id),actionViewItemProvider:O,renderDropdownAsChildElement:!0}),this._register(this._notebookLeftToolbar),this._notebookLeftToolbar.context=R,this._showNotebookActionsinEditorToolbar();return}})),this.experimentService&&this.experimentService.getTreatment("nbtoolbarineditor").then(L=>{L!==void 0&&this._useGlobalToolbar!==L&&(this._useGlobalToolbar=L,this._showNotebookActionsinEditorToolbar())})}_updateStrategy(){switch(this._renderLabel){case n.Always:this._strategy=new m(this.notebookEditor,this,this.instantiationService);break;case n.Never:this._strategy=new b(this.notebookEditor,this,this.instantiationService);break;case n.Dynamic:this._strategy=new E(this.notebookEditor,this,this.instantiationService);break}}_convertConfiguration(R){switch(R){case!0:return n.Always;case!1:return n.Never;case"always":return n.Always;case"never":return n.Never;case"dynamic":return n.Dynamic}}_showNotebookActionsinEditorToolbar(){!this.notebookEditor.hasModel()||(this._useGlobalToolbar?this._setNotebookActions():this.domNode.style.display="none",this._onDidChangeState.fire())}_setNotebookActions(){const R=this._notebookGlobalActionsMenu.getActions({shouldForwardArgs:!0,renderShortTitle:!0});this.domNode.style.display="flex";const O=R.filter(N=>/^navigation/.test(N[0])),x=[];O.sort((N,B)=>N[0]==="navigation"?1:B[0]==="navigation"?-1:0).forEach((N,B)=>{x.push(...N[1]),B<O.length-1&&x.push(new A.Separator)});const F=R.find(N=>/^status/.test(N[0])),L=F?F[1]:[],M=R.filter(N=>!/^navigation/.test(N[0])&&!/^status/.test(N[0])).reduce((N,B)=>(N.push(...B[1]),N),[]);this._notebookLeftToolbar.setActions([],[]),this._primaryActions.forEach(N=>N.renderLabel=!0),this._notebookLeftToolbar.setActions(x,M),this._notebookRightToolbar.setActions(L,[]),this._secondaryActions=M,this._primaryActions=[],this._dimension&&this._dimension.width>=0&&this._dimension.height>=0&&this._cacheItemSizes(this._notebookLeftToolbar),this._computeSizes()}_cacheItemSizes(R){const O=[];for(let x=0;x<R.getItemsLength();x++){const F=R.getItemAction(x);O.push({action:F,size:R.getItemWidth(x),visible:!0,renderLabel:!0})}this._primaryActions=O}_canBeVisible(R){let O=0;for(let x=0;x<this._primaryActions.length;x++)O+=this._primaryActions[x].size+8;return O<=R}_computeSizes(){const R=this._notebookLeftToolbar,O=this._notebookRightToolbar;if(R&&O&&this._dimension&&this._dimension.height>=0&&this._dimension.width>=0){if(this._primaryActions.length===0&&R.getItemsLength()!==this._primaryActions.length&&this._cacheItemSizes(this._notebookLeftToolbar),this._primaryActions.length===0)return;const x=(O.getItemsLength()?O.getItemWidth(0):0)+d;if(this._canBeVisible(this._dimension.width-x-d)){this._primaryActions.forEach(M=>{M.visible=!0,M.renderLabel=!0}),R.setActions(this._primaryActions.filter(M=>M.action.id!==_.ToggleMenuAction.ID).map(M=>M.action),this._secondaryActions);return}const F=this._dimension.width-x-(g+d)-d,L=this._strategy.calculateActions(F);this._notebookLeftToolbar.setActions(L.primaryActions,L.secondaryActions)}}layout(R){this._dimension=R,this._useGlobalToolbar?this.domNode.style.display="flex":this.domNode.style.display="none",this._computeSizes()}};y=Ee([W(4,o.IInstantiationService),W(5,v.IConfigurationService),W(6,C.IContextMenuService),W(7,w.IMenuService),W(8,u.IEditorService),W(9,c.IKeybindingService),W(10,a.IWorkbenchAssignmentService)],y),e.NotebookEditorToolbar=y,(0,S.registerThemingParticipant)((T,R)=>{const O=T.getColor(i.toolbarActiveBackground);O&&R.addRule(` .monaco-workbench .notebookOverlay .notebook-toolbar-container .monaco-action-bar:not(.vertical) .action-item.active { background-color: ${O}; } `)})}),define(ne[365],re([1,0,22,34,44,21,30,23,20,13,7,29,15]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SearchStateKey=e.SearchUIState=e.extractRangeFromFilter=e.getOutOfWorkspaceEditorResources=e.getWorkspaceSymbols=e.WorkspaceSymbolItem=e.WorkspaceSymbolProviderRegistry=void 0;var c;(function(u){const a=[];function n(g){let d=g;return d&&a.push(d),{dispose(){if(d){const m=a.indexOf(d);m>=0&&(a.splice(m,1),d=void 0)}}}}u.register=n;function h(){return a.slice(0)}u.all=h})(c=e.WorkspaceSymbolProviderRegistry||(e.WorkspaceSymbolProviderRegistry={}));class i{constructor(a,n){this.symbol=a,this.provider=n}}e.WorkspaceSymbolItem=i;async function S(u,a=k.CancellationToken.None){const n=[],h=c.all().map(async d=>{try{const m=await d.provideWorkspaceSymbols(u,a);if(!m)return;for(let b of m)n.push(new i(b,d))}catch(m){(0,t.onUnexpectedExternalError)(m)}});if(await Promise.all(h),a.isCancellationRequested)return[];function g(d,m){let b=(0,C.compare)(d.symbol.name,m.symbol.name);return b===0&&(b=d.symbol.kind-m.symbol.kind),b===0&&(b=(0,C.compare)(d.symbol.location.uri.toString(),m.symbol.location.uri.toString())),b===0&&(d.symbol.location.range&&m.symbol.location.range?I.Range.areIntersecting(d.symbol.location.range,m.symbol.location.range)||(b=I.Range.compareRangesUsingStarts(d.symbol.location.range,m.symbol.location.range)):d.provider.resolveWorkspaceSymbol&&!m.provider.resolveWorkspaceSymbol?b=-1:!d.provider.resolveWorkspaceSymbol&&m.provider.resolveWorkspaceSymbol&&(b=1)),b===0&&(b=(0,C.compare)(d.symbol.containerName??"",m.symbol.containerName??"")),b}return(0,o.groupBy)(n,g).map(d=>d[0]).flat()}e.getWorkspaceSymbols=S;function s(u){const a=u.get(A.IEditorService),n=u.get(f.IWorkspaceContextService),h=u.get(D.IFileService);return a.editors.map(d=>_.EditorResourceAccessor.getOriginalUri(d,{supportSideBySide:_.SideBySideEditor.PRIMARY})).filter(d=>!!d&&!n.isInsideWorkspace(d)&&h.hasProvider(d))}e.getOutOfWorkspaceEditorResources=s;const l=/\s?[#:\(](?:line )?(\d*)(?:[#:,](\d*))?\)?\s*$/;function r(u,a){if(!u||a?.some(g=>u.indexOf(g)!==-1))return;let n;const h=l.exec(u);if(h){const g=parseInt(h[1]??"",10);if((0,w.isNumber)(g)){n={startLineNumber:g,startColumn:1,endLineNumber:g,endColumn:1};const d=parseInt(h[2]??"",10);(0,w.isNumber)(d)&&(n={startLineNumber:n.startLineNumber,startColumn:d,endLineNumber:n.endLineNumber,endColumn:d})}else h[1]===""&&(n={startLineNumber:1,startColumn:1,endLineNumber:1,endColumn:1})}if(h&&n)return{filter:u.substr(0,h.index),range:n}}e.extractRangeFromFilter=r;var p;(function(u){u[u.Idle=0]="Idle",u[u.Searching=1]="Searching",u[u.SlowSearch=2]="SlowSearch"})(p=e.SearchUIState||(e.SearchUIState={})),e.SearchStateKey=new v.RawContextKey("searchState",p.Idle)}),define(ne[849],re([1,0,1718,245,11,365,86,45,18,41,21,20,8,72,405,13,382,33]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SymbolsQuickAccessProvider=void 0;let r=class Vn extends f.PickerQuickAccessProvider{constructor(u,a,n,h,g){super(Vn.PREFIX,{canAcceptInBackground:!0,noResultsPick:{label:(0,t.localize)(0,null)}});this.labelService=u,this.openerService=a,this.editorService=n,this.configurationService=h,this.codeEditorService=g,this.delayer=this._register(new _.ThrottledDelayer(Vn.TYPING_SEARCH_DELAY))}get defaultFilterValue(){const u=this.codeEditorService.getFocusedCodeEditor();if(u)return(0,S.withNullAsUndefined)((0,i.getSelectionSearchString)(u))}get configuration(){const u=this.configurationService.getValue().workbench?.editor;return{openEditorPinned:!u?.enablePreviewFromQuickOpen||!u?.enablePreview,openSideBySideDirection:u?.openSideBySideDirection}}_getPicks(u,a,n){return this.getSymbolPicks(u,void 0,n)}async getSymbolPicks(u,a,n){return this.delayer.trigger(async()=>n.isCancellationRequested?[]:this.doGetSymbolPicks((0,s.prepareQuery)(u),a,n),a?.delay)}async doGetSymbolPicks(u,a,n){let h,g;u.values&&u.values.length>1?(h=(0,s.pieceToQuery)(u.values[0]),g=(0,s.pieceToQuery)(u.values.slice(1))):h=u;const d=await(0,A.getWorkspaceSymbols)(h.original,n);if(n.isCancellationRequested)return[];const m=[],b=this.configuration.openSideBySideDirection;for(const{symbol:E,provider:y}of d){if(a?.skipLocal&&!Vn.TREAT_AS_GLOBAL_SYMBOL_TYPES.has(E.kind)&&!!E.containerName)continue;const T=E.name,R=`$(${k.SymbolKinds.toIcon(E.kind).id}) ${T}`,O=R.length-T.length;let x,F,L=!1;if(h.original.length>0&&(h!==u&&([x,F]=(0,s.scoreFuzzy2)(R,{...u,values:void 0},0,O),typeof x=="number"&&(L=!0)),typeof x!="number"&&([x,F]=(0,s.scoreFuzzy2)(R,h,0,O),typeof x!="number")))continue;const M=E.location.uri;let N;if(M){const z=this.labelService.getUriLabel(M,{relative:!0});E.containerName?N=`${E.containerName} \u2022 ${z}`:N=z}let B,P;if(!L&&g&&g.original.length>0){if(N&&([B,P]=(0,s.scoreFuzzy2)(N,g)),typeof B!="number")continue;typeof x=="number"&&(x+=B)}const V=E.tags?E.tags.indexOf(1)>=0:!1;m.push({symbol:E,resource:M,score:x,label:R,ariaLabel:T,highlights:V?void 0:{label:F,description:P},description:N,strikethrough:V,buttons:[{iconClass:b==="right"?l.Codicon.splitHorizontal.classNames:l.Codicon.splitVertical.classNames,tooltip:b==="right"?(0,t.localize)(1,null):(0,t.localize)(2,null)}],trigger:(z,U)=>(this.openSymbol(y,E,n,{keyMods:U,forceOpenSideBySide:!0}),f.TriggerAction.CLOSE_PICKER),accept:async(z,U)=>this.openSymbol(y,E,n,{keyMods:z,preserveFocus:U.inBackground,forcePinned:U.inBackground})})}return a?.skipSorting||m.sort((E,y)=>this.compareSymbols(E,y)),m}async openSymbol(u,a,n,h){let g=a;typeof u.resolveWorkspaceSymbol=="function"&&(g=await u.resolveWorkspaceSymbol(a,n)||a,n.isCancellationRequested)||(g.location.uri.scheme===I.Schemas.http||g.location.uri.scheme===I.Schemas.https?await this.openerService.open(g.location.uri,{fromUserGesture:!0,allowContributedOpeners:!0}):await this.editorService.openEditor({resource:g.location.uri,options:{preserveFocus:h?.preserveFocus,pinned:h.keyMods.ctrlCmd||h.forcePinned||this.configuration.openEditorPinned,selection:g.location.range?C.Range.collapseToStart(g.location.range):void 0}},h.keyMods.alt||this.configuration.openEditorPinned&&h.keyMods.ctrlCmd||h?.forceOpenSideBySide?v.SIDE_GROUP:v.ACTIVE_GROUP))}compareSymbols(u,a){if(typeof u.score=="number"&&typeof a.score=="number"){if(u.score>a.score)return-1;if(u.score<a.score)return 1}if(u.symbol&&a.symbol){const n=u.symbol.name.toLowerCase(),h=a.symbol.name.toLowerCase(),g=n.localeCompare(h);if(g!==0)return g}if(u.symbol&&a.symbol){const n=k.SymbolKinds.toIcon(u.symbol.kind).id,h=k.SymbolKinds.toIcon(a.symbol.kind).id;return n.localeCompare(h)}return 0}};r.PREFIX="#",r.TYPING_SEARCH_DELAY=200,r.TREAT_AS_GLOBAL_SYMBOL_TYPES=new Set([4,9,0,10,2,3,1]),r=Ee([W(0,D.ILabelService),W(1,w.IOpenerService),W(2,v.IEditorService),W(3,o.IConfigurationService),W(4,c.ICodeEditorService)],r),e.SymbolsQuickAccessProvider=r}),define(ne[607],re([1,0,36,33,18,1765,16,7,188,74,120,176,239,21]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTerminalActionBarArgs=e.setupTerminalMenus=e.TerminalMenuBarGroup=e.TerminalTabContextMenuGroup=void 0;var i;(function(p){p.Create="1_create",p.Edit="2_edit",p.Clear="3_clear",p.Kill="4_kill",p.Config="5_config"})(i||(i={}));var S;(function(p){p.Default="1_create_default",p.Profile="2_create_profile",p.Configure="3_configure"})(S=e.TerminalTabContextMenuGroup||(e.TerminalTabContextMenuGroup={}));var s;(function(p){p.Create="1_create",p.Run="2_run",p.Manage="3_manage",p.Configure="4_configure"})(s=e.TerminalMenuBarGroup||(e.TerminalMenuBarGroup={}));function l(){k.MenuRegistry.appendMenuItems([{id:k.MenuId.MenubarTerminalMenu,item:{group:"1_create",command:{id:"workbench.action.terminal.new",title:(0,A.localize)(0,null)},order:1}},{id:k.MenuId.MenubarTerminalMenu,item:{group:"1_create",command:{id:"workbench.action.terminal.split",title:(0,A.localize)(1,null),precondition:D.ContextKeyExpr.has("terminalIsOpen")},order:2,when:C.TerminalContextKeys.processSupported}},{id:k.MenuId.MenubarTerminalMenu,item:{group:"2_run",command:{id:"workbench.action.terminal.runActiveFile",title:(0,A.localize)(2,null)},order:3,when:C.TerminalContextKeys.processSupported}},{id:k.MenuId.MenubarTerminalMenu,item:{group:"2_run",command:{id:"workbench.action.terminal.runSelectedText",title:(0,A.localize)(3,null)},order:4,when:C.TerminalContextKeys.processSupported}}]),k.MenuRegistry.appendMenuItems([{id:k.MenuId.TerminalInstanceContext,item:{group:"1_create",command:{id:"workbench.action.terminal.split",title:o.terminalStrings.split.value}}},{id:k.MenuId.TerminalInstanceContext,item:{command:{id:"workbench.action.terminal.new",title:(0,A.localize)(4,null)},group:"1_create"}},{id:k.MenuId.TerminalInstanceContext,item:{command:{id:"workbench.action.terminal.kill",title:o.terminalStrings.kill.value},group:"4_kill"}},{id:k.MenuId.TerminalInstanceContext,item:{command:{id:"workbench.action.terminal.copySelection",title:(0,A.localize)(5,null)},group:"2_edit",order:1}},{id:k.MenuId.TerminalInstanceContext,item:{command:{id:"workbench.action.terminal.copySelectionAsHtml",title:(0,A.localize)(6,null)},group:"2_edit",order:2}},{id:k.MenuId.TerminalInstanceContext,item:{command:{id:"workbench.action.terminal.paste",title:(0,A.localize)(7,null)},group:"2_edit",order:3}},{id:k.MenuId.TerminalInstanceContext,item:{command:{id:"workbench.action.terminal.clear",title:(0,A.localize)(8,null)},group:"3_clear"}},{id:k.MenuId.TerminalInstanceContext,item:{command:{id:"workbench.action.terminal.showTabs",title:(0,A.localize)(9,null)},when:D.ContextKeyExpr.not("config.terminal.integrated.tabs.enabled"),group:"5_config"}},{id:k.MenuId.TerminalInstanceContext,item:{command:{id:"workbench.action.terminal.sizeToContentWidth",title:o.terminalStrings.toggleSizeToContentWidth},group:"5_config"}},{id:k.MenuId.TerminalInstanceContext,item:{command:{id:"workbench.action.terminal.selectAll",title:(0,A.localize)(10,null)},group:"2_edit",order:3}}]),k.MenuRegistry.appendMenuItems([{id:k.MenuId.TerminalEditorInstanceContext,item:{group:"1_create",command:{id:"workbench.action.terminal.split",title:o.terminalStrings.split.value}}},{id:k.MenuId.TerminalEditorInstanceContext,item:{command:{id:"workbench.action.terminal.new",title:(0,A.localize)(11,null)},group:"1_create"}},{id:k.MenuId.TerminalEditorInstanceContext,item:{command:{id:"workbench.action.terminal.killEditor",title:o.terminalStrings.kill.value},group:"4_kill"}},{id:k.MenuId.TerminalEditorInstanceContext,item:{command:{id:"workbench.action.terminal.copySelection",title:(0,A.localize)(12,null)},group:"2_edit",order:1}},{id:k.MenuId.TerminalEditorInstanceContext,item:{command:{id:"workbench.action.terminal.copySelectionAsHtml",title:(0,A.localize)(13,null)},group:"2_edit",order:2}},{id:k.MenuId.TerminalEditorInstanceContext,item:{command:{id:"workbench.action.terminal.paste",title:(0,A.localize)(14,null)},group:"2_edit",order:3}},{id:k.MenuId.TerminalEditorInstanceContext,item:{command:{id:"workbench.action.terminal.clear",title:(0,A.localize)(15,null)},group:"3_clear"}},{id:k.MenuId.TerminalEditorInstanceContext,item:{command:{id:"workbench.action.terminal.selectAll",title:(0,A.localize)(16,null)},group:"2_edit",order:3}},{id:k.MenuId.TerminalEditorInstanceContext,item:{command:{id:"workbench.action.terminal.sizeToContentWidth",title:o.terminalStrings.toggleSizeToContentWidth},group:"5_config"}}]),k.MenuRegistry.appendMenuItems([{id:k.MenuId.TerminalTabEmptyAreaContext,item:{command:{id:"workbench.action.terminal.newWithProfile",title:(0,A.localize)(17,null)},group:"1_create"}},{id:k.MenuId.TerminalTabEmptyAreaContext,item:{command:{id:"workbench.action.terminal.new",title:(0,A.localize)(18,null)},group:"1_create"}}]),k.MenuRegistry.appendMenuItems([{id:k.MenuId.TerminalNewDropdownContext,item:{command:{id:"workbench.action.terminal.selectDefaultShell",title:{value:(0,A.localize)(19,null),original:"Select Default Profile"}},group:"3_configure"}},{id:k.MenuId.TerminalNewDropdownContext,item:{command:{id:"workbench.action.terminal.openSettings",title:(0,A.localize)(20,null)},group:"3_configure"}}]),k.MenuRegistry.appendMenuItems([{id:k.MenuId.ViewTitle,item:{command:{id:"workbench.action.terminal.switchTerminal",title:{value:(0,A.localize)(21,null),original:"Switch Terminal"}},group:"navigation",order:0,when:D.ContextKeyExpr.and(D.ContextKeyExpr.equals("view",v.TERMINAL_VIEW_ID),D.ContextKeyExpr.not("config.terminal.integrated.tabs.enabled"))}},{id:k.MenuId.ViewTitle,item:{command:{id:"workbench.action.terminal.focus",title:o.terminalStrings.focus},group:"navigation",order:0,when:D.ContextKeyExpr.and(D.ContextKeyExpr.equals("view",v.TERMINAL_VIEW_ID),D.ContextKeyExpr.has("config.terminal.integrated.tabs.enabled"),D.ContextKeyExpr.or(D.ContextKeyExpr.and(D.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActiveTerminal","singleTerminal"),D.ContextKeyExpr.equals("terminalCount",1)),D.ContextKeyExpr.and(D.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActiveTerminal","singleTerminalOrNarrow"),D.ContextKeyExpr.or(D.ContextKeyExpr.equals("terminalCount",1),D.ContextKeyExpr.has("isTerminalTabsNarrow"))),D.ContextKeyExpr.and(D.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActiveTerminal","singleGroup"),D.ContextKeyExpr.equals("terminalGroupCount",1)),D.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActiveTerminal","always")))}},{id:k.MenuId.ViewTitle,item:{command:{id:"workbench.action.terminal.split",title:o.terminalStrings.split,icon:f.Codicon.splitHorizontal},group:"navigation",order:2,when:D.ContextKeyExpr.and(D.ContextKeyExpr.equals("view",v.TERMINAL_VIEW_ID),D.ContextKeyExpr.or(D.ContextKeyExpr.not("config.terminal.integrated.tabs.enabled"),D.ContextKeyExpr.and(D.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActions","singleTerminal"),D.ContextKeyExpr.equals("terminalCount",1)),D.ContextKeyExpr.and(D.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActions","singleTerminalOrNarrow"),D.ContextKeyExpr.or(D.ContextKeyExpr.equals("terminalCount",1),D.ContextKeyExpr.has("isTerminalTabsNarrow"))),D.ContextKeyExpr.and(D.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActions","singleGroup"),D.ContextKeyExpr.equals("terminalGroupCount",1)),D.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActions","always")))}},{id:k.MenuId.ViewTitle,item:{command:{id:"workbench.action.terminal.kill",title:o.terminalStrings.kill,icon:f.Codicon.trash},group:"navigation",order:3,when:D.ContextKeyExpr.and(D.ContextKeyExpr.equals("view",v.TERMINAL_VIEW_ID),D.ContextKeyExpr.or(D.ContextKeyExpr.not("config.terminal.integrated.tabs.enabled"),D.ContextKeyExpr.and(D.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActions","singleTerminal"),D.ContextKeyExpr.equals("terminalCount",1)),D.ContextKeyExpr.and(D.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActions","singleTerminalOrNarrow"),D.ContextKeyExpr.or(D.ContextKeyExpr.equals("terminalCount",1),D.ContextKeyExpr.has("isTerminalTabsNarrow"))),D.ContextKeyExpr.and(D.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActions","singleGroup"),D.ContextKeyExpr.equals("terminalGroupCount",1)),D.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActions","always")))}},{id:k.MenuId.ViewTitle,item:{command:{id:"workbench.action.terminal.createProfileButton",title:"workbench.action.terminal.createProfileButton"},group:"navigation",order:0,when:D.ContextKeyExpr.and(D.ContextKeyExpr.equals("view",v.TERMINAL_VIEW_ID),D.ContextKeyExpr.or(C.TerminalContextKeys.webExtensionContributedProfile,C.TerminalContextKeys.processSupported))}}]),k.MenuRegistry.appendMenuItems([{id:k.MenuId.TerminalInlineTabContext,item:{command:{id:"workbench.action.terminal.split",title:o.terminalStrings.split.value},group:"1_create",order:1}},{id:k.MenuId.TerminalInlineTabContext,item:{command:{id:"workbench.action.terminal.moveToEditor",title:o.terminalStrings.moveToEditor.value},group:"1_create",order:2}},{id:k.MenuId.TerminalInlineTabContext,item:{command:{id:"workbench.action.terminal.changeIconPanel",title:o.terminalStrings.changeIcon.value},group:"2_edit"}},{id:k.MenuId.TerminalInlineTabContext,item:{command:{id:"workbench.action.terminal.changeColorPanel",title:o.terminalStrings.changeColor.value},group:"2_edit"}},{id:k.MenuId.TerminalInlineTabContext,item:{command:{id:"workbench.action.terminal.renamePanel",title:o.terminalStrings.rename.value},group:"2_edit"}},{id:k.MenuId.TerminalInlineTabContext,item:{command:{id:"workbench.action.terminal.sizeToContentWidthInstance",title:(0,A.localize)(22,null)},group:"2_edit"}},{id:k.MenuId.TerminalInlineTabContext,item:{command:{id:"workbench.action.terminal.kill",title:o.terminalStrings.kill.value},group:"4_kill"}}]),k.MenuRegistry.appendMenuItems([{id:k.MenuId.TerminalTabContext,item:{command:{id:"workbench.action.terminal.splitInstance",title:o.terminalStrings.split.value},group:"1_create",order:1}},{id:k.MenuId.TerminalTabContext,item:{command:{id:"workbench.action.terminal.moveToEditorInstance",title:o.terminalStrings.moveToEditor.value},group:"1_create",order:2}},{id:k.MenuId.TerminalTabContext,item:{command:{id:"workbench.action.terminal.renameInstance",title:(0,A.localize)(23,null)},group:"2_edit"}},{id:k.MenuId.TerminalTabContext,item:{command:{id:"workbench.action.terminal.changeIconInstance",title:(0,A.localize)(24,null)},group:"2_edit"}},{id:k.MenuId.TerminalTabContext,item:{command:{id:"workbench.action.terminal.changeColorInstance",title:(0,A.localize)(25,null)},group:"2_edit"}},{id:k.MenuId.TerminalTabContext,item:{command:{id:"workbench.action.terminal.sizeToContentWidthInstance",title:(0,A.localize)(26,null)},group:"2_edit"}},{id:k.MenuId.TerminalTabContext,item:{group:"5_config",command:{id:"workbench.action.terminal.joinInstance",title:(0,A.localize)(27,null)},when:C.TerminalContextKeys.tabsSingularSelection.toNegated()}},{id:k.MenuId.TerminalTabContext,item:{group:"5_config",command:{id:"workbench.action.terminal.unsplitInstance",title:o.terminalStrings.unsplit.value},when:D.ContextKeyExpr.and(C.TerminalContextKeys.tabsSingularSelection,C.TerminalContextKeys.splitTerminal)}},{id:k.MenuId.TerminalTabContext,item:{command:{id:"workbench.action.terminal.killInstance",title:o.terminalStrings.kill.value},group:"4_kill"}}]),k.MenuRegistry.appendMenuItem(k.MenuId.EditorTitleContext,{command:{id:"workbench.action.terminal.moveToTerminalPanel",title:o.terminalStrings.moveToTerminalPanel},when:w.ResourceContextKey.Scheme.isEqualTo(_.Schemas.vscodeTerminal),group:"2_files"}),k.MenuRegistry.appendMenuItem(k.MenuId.EditorTitleContext,{command:{id:"workbench.action.terminal.rename",title:o.terminalStrings.rename},when:w.ResourceContextKey.Scheme.isEqualTo(_.Schemas.vscodeTerminal),group:"3_files"}),k.MenuRegistry.appendMenuItem(k.MenuId.EditorTitleContext,{command:{id:"workbench.action.terminal.changeColor",title:o.terminalStrings.changeColor},when:w.ResourceContextKey.Scheme.isEqualTo(_.Schemas.vscodeTerminal),group:"3_files"}),k.MenuRegistry.appendMenuItem(k.MenuId.EditorTitleContext,{command:{id:"workbench.action.terminal.changeIcon",title:o.terminalStrings.changeIcon},when:w.ResourceContextKey.Scheme.isEqualTo(_.Schemas.vscodeTerminal),group:"3_files"}),k.MenuRegistry.appendMenuItem(k.MenuId.EditorTitleContext,{command:{id:"workbench.action.terminal.sizeToContentWidth",title:o.terminalStrings.toggleSizeToContentWidth},when:w.ResourceContextKey.Scheme.isEqualTo(_.Schemas.vscodeTerminal),group:"3_files"}),k.MenuRegistry.appendMenuItem(k.MenuId.EditorTitle,{command:{id:"workbench.action.terminal.createProfileButton",title:"workbench.action.terminal.createProfileButton"},group:"navigation",order:0,when:w.ResourceContextKey.Scheme.isEqualTo(_.Schemas.vscodeTerminal)})}e.setupTerminalMenus=l;function r(p,u,a,n,h,g,d,m,b){let E=[],y=[];u=u.filter(M=>!M.isAutoDetected);const T=p===I.TerminalLocation.Editor||typeof p=="object"&&"viewColumn"in p&&p.viewColumn===c.ACTIVE_GROUP?{viewColumn:c.SIDE_GROUP}:{splitActiveTerminal:!0};for(const M of u){const N=M.profileName===a,B={arg:{config:M,location:p},shouldForwardArgs:!0},P={arg:{config:M,splitLocation:T},shouldForwardArgs:!0};N?(E.unshift(new k.MenuItemAction({id:"workbench.action.terminal.newWithProfile",title:(0,A.localize)(28,null,M.profileName),category:"2_create_profile"},void 0,B,d,m)),y.unshift(new k.MenuItemAction({id:"workbench.action.terminal.split",title:(0,A.localize)(29,null,M.profileName),category:"2_create_profile"},void 0,P,d,m))):(E.push(new k.MenuItemAction({id:"workbench.action.terminal.newWithProfile",title:M.profileName.replace(/[\n\r\t]/g,""),category:"2_create_profile"},void 0,B,d,m)),y.push(new k.MenuItemAction({id:"workbench.action.terminal.split",title:M.profileName.replace(/[\n\r\t]/g,""),category:"2_create_profile"},void 0,P,d,m)))}for(const M of n){const B=M.title===a?(0,A.localize)(30,null,M.title.replace(/[\n\r\t]/g,"")):M.title.replace(/[\n\r\t]/g,"");E.push(new t.Action("contributed",B,void 0,!0,()=>g.createTerminal({config:{extensionIdentifier:M.extensionIdentifier,id:M.id,title:B},location:p}))),y.push(new t.Action("contributed-split",B,void 0,!0,()=>g.createTerminal({config:{extensionIdentifier:M.extensionIdentifier,id:M.id,title:B},location:T})))}const R=E.find(M=>M.label.endsWith("(Default)"));R&&(E=E.filter(M=>M!==R).sort((M,N)=>M.label.localeCompare(N.label)),E.unshift(R)),E.length>0&&(E.push(new t.SubmenuAction("split.profile",(0,A.localize)(31,null),y)),E.push(new t.Separator));for(const[,M]of b.getActions())for(const N of M)"alt"in N&&E.push(N);const O=y.find(M=>M.label.endsWith("(Default)"));O&&(y=y.filter(M=>M!==O).sort((M,N)=>M.label.localeCompare(N.label)),y.unshift(O));const x=g.resolveLocation(p),F=h.createInstance(k.MenuItemAction,{id:x===I.TerminalLocation.Editor?"workbench.action.createTerminalEditor":"workbench.action.terminal.new",title:(0,A.localize)(32,null),icon:f.Codicon.plus},{id:"workbench.action.terminal.split",title:o.terminalStrings.split.value,icon:f.Codicon.splitHorizontal},{shouldForwardArgs:!0,arg:{location:p}}),L=new t.Action("refresh profiles","Launch Profile...","codicon-chevron-down",!0);return{primaryAction:F,dropdownAction:L,dropdownMenuActions:E,className:`terminal-tab-actions-${g.resolveLocation(p)}`}}e.getTerminalActionBarArgs=r}),define(ne[850],re([1,0,10,315,473,16,7,37,5,24,27,12,166,105,821,607,120,14,223,26,817,28,21]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalEditor=void 0;const h=".simple-find-part-wrapper";let g=class extends o.EditorPane{constructor(m,b,E,y,T,R,O,x,F,L,M,N,B,P){super(c.terminalEditorId,m,b,E);this._terminalEditorService=y,this._terminalProfileResolverService=T,this._terminalService=R,this._contextKeyService=x,this._commandService=F,this._instantiationService=M,this._contextMenuService=N,this._notificationService=B,this._terminalProfileService=P,this._editorInput=void 0,this._cancelContextMenu=!1,this._findState=new f.FindReplaceState,this._findWidget=O.createInstance(i.TerminalFindWidget,this._findState),this._dropdownMenu=this._register(L.createMenu(A.MenuId.TerminalNewDropdownContext,x)),this._instanceMenu=this._register(L.createMenu(A.MenuId.TerminalEditorInstanceContext,x))}get findState(){return this._findState}async setInput(m,b,E,y){this._editorInput?.terminalInstance?.detachFromElement(),this._editorInput=m,await super.setInput(m,b,E,y),this._editorInput.terminalInstance?.attachToElement(this._overflowGuardElement),this._lastDimension&&this.layout(this._lastDimension),this._editorInput.terminalInstance?.setVisible(this.isVisible()),this._editorInput.terminalInstance&&(this._register(this._editorInput.terminalInstance.onDidFocus(()=>this._setActiveInstance())),this._editorInput.setCopyLaunchConfig(this._editorInput.terminalInstance.shellLaunchConfig))}clearInput(){super.clearInput(),this._editorInput?.terminalInstance?.detachFromElement(),this._editorInput=void 0}_setActiveInstance(){!this._editorInput?.terminalInstance||this._terminalEditorService.setActiveInstance(this._editorInput.terminalInstance)}focus(){this._editorInput?.terminalInstance?.focus()}createEditor(m){this._editorInstanceElement=m,this._overflowGuardElement=t.$(".terminal-overflow-guard"),this._editorInstanceElement.appendChild(this._overflowGuardElement),this._registerListeners()}_registerListeners(){!this._editorInstanceElement||(this._register(t.addDisposableListener(this._editorInstanceElement,"mousedown",async m=>{if(this._terminalEditorService.instances.length!==0){if(m.which===2&&l.isLinux){const b=this._terminalEditorService.activeInstance;b&&b.focus()}else if(m.which===3){const b=this._terminalService.configHelper.config.rightClickBehavior;if(b==="nothing"){m.shiftKey||(this._cancelContextMenu=!0);return}else if(b==="copyPaste"||b==="paste"){const E=this._terminalEditorService.activeInstance;if(!E)return;if(b==="copyPaste"&&m.shiftKey){(0,u.openContextMenu)(m,this._editorInstanceElement,this._instanceMenu,this._contextMenuService);return}b==="copyPaste"&&E.hasSelection()?(await E.copySelection(),E.clearSelection()):r.BrowserFeatures.clipboard.readText?E.paste():this._notificationService.info(`This browser doesn't support the clipboard.readText API needed to trigger a paste, try ${l.isMacintosh?"\u2318":"Ctrl"}+V instead.`),l.isMacintosh&&setTimeout(()=>{E.clearSelection()},0),this._cancelContextMenu=!0}}}})),this._register(t.addDisposableListener(this._editorInstanceElement,"contextmenu",m=>{const b=this._terminalService.configHelper.config.rightClickBehavior;if(b==="nothing"&&!m.shiftKey){m.preventDefault(),m.stopImmediatePropagation(),this._cancelContextMenu=!1;return}else!this._cancelContextMenu&&b!=="copyPaste"&&b!=="paste"&&(this._cancelContextMenu||(0,u.openContextMenu)(m,this._editorInstanceElement,this._instanceMenu,this._contextMenuService),m.preventDefault(),m.stopImmediatePropagation(),this._cancelContextMenu=!1)})))}layout(m){this._editorInput?.terminalInstance?.layout(m),this._lastDimension=m}setVisible(m,b){return super.setVisible(m,b),this._editorInput?.terminalInstance?.setVisible(m)}getActionViewItem(m){switch(m.id){case"workbench.action.terminal.createProfileButton":{const b={viewColumn:n.ACTIVE_GROUP},E=(0,S.getTerminalActionBarArgs)(b,this._terminalProfileService.availableProfiles,this._getDefaultProfileName(),this._terminalProfileService.contributedProfiles,this._instantiationService,this._terminalService,this._contextKeyService,this._commandService,this._dropdownMenu);return this._instantiationService.createInstance(_.DropdownWithPrimaryActionViewItem,E.primaryAction,E.dropdownAction,E.dropdownMenuActions,E.className,this._contextMenuService,{})}}return super.getActionViewItem(m)}_getDefaultProfileName(){let m;try{m=this._terminalProfileService.getDefaultProfileName()}catch{m=this._terminalProfileResolverService.defaultProfileName}return m}focusFindWidget(){this._overflowGuardElement&&!this._overflowGuardElement?.querySelector(h)&&this._overflowGuardElement.appendChild(this._findWidget.getDomNode());const m=this._terminalEditorService.activeInstance;m&&m.hasSelection()&&m.selection.indexOf(` `)===-1?this._findWidget.reveal(m.selection):this._findWidget.reveal()}hideFindWidget(){this.focus(),this._findWidget.hide()}showFindWidget(){const m=this._terminalEditorService.activeInstance;m&&m.hasSelection()&&m.selection.indexOf(` `)===-1?this._findWidget.show(m.selection):this._findWidget.show()}getFindWidget(){return this._findWidget}};g=Ee([W(0,v.ITelemetryService),W(1,C.IThemeService),W(2,w.IStorageService),W(3,c.ITerminalEditorService),W(4,s.ITerminalProfileResolverService),W(5,c.ITerminalService),W(6,I.IInstantiationService),W(7,k.IContextKeyService),W(8,a.ICommandService),W(9,A.IMenuService),W(10,I.IInstantiationService),W(11,D.IContextMenuService),W(12,p.INotificationService),W(13,s.ITerminalProfileService)],g),e.TerminalEditor=g}),define(ne[851],re([1,0,1769,245,102,105,28,12,590,292,239,188,21]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalQuickAccessProvider=void 0;let c=[],i=class No extends f.PickerQuickAccessProvider{constructor(s,l,r,p,u){super(No.PREFIX,{canAcceptInBackground:!0});this._editorService=s,this._terminalEditorService=l,this._terminalGroupService=r,this._commandService=p,this._themeService=u}_getPicks(s){c=[],c.push({type:"separator",label:"panel"});const l=this._terminalGroupService.groups;for(let a=0;a<l.length;a++){const n=l[a];for(let h=0;h<n.terminalInstances.length;h++){const g=n.terminalInstances[h],d=this._createPick(g,h,s,a);d&&c.push(d)}}c.length>0&&c.push({type:"separator",label:"editor"});const r=this._terminalEditorService.instances;for(let a=0;a<r.length;a++){const n=r[a];n.target=C.TerminalLocation.Editor;const h=this._createPick(n,a,s);h&&c.push(h)}c.length>0&&c.push({type:"separator"});const p=(0,t.localize)(0,null);c.push({label:`$(plus) ${p}`,ariaLabel:p,accept:()=>this._commandService.executeCommand("workbench.action.terminal.new")});const u=(0,t.localize)(1,null);return c.push({label:`$(plus) ${u}`,ariaLabel:u,accept:()=>this._commandService.executeCommand("workbench.action.terminal.newWithProfile")}),c}_createPick(s,l,r,p){const u=(0,w.getIconId)(s),a=p?`$(${u}) ${p+1}.${l+1}: ${s.title}`:`$(${u}) ${l+1}: ${s.title}`,n=[],h=(0,w.getColorClass)(s);h&&n.push(h);const g=(0,w.getUriClasses)(s,this._themeService.getColorTheme().type);g&&n.push(...g);const d=(0,_.matchesFuzzy)(r,a,!0);if(d)return{label:a,highlights:{label:d},buttons:[{iconClass:D.ThemeIcon.asClassName(I.renameTerminalIcon),tooltip:(0,t.localize)(2,null)},{iconClass:D.ThemeIcon.asClassName(I.killTerminalIcon),tooltip:v.terminalStrings.kill.value}],iconClasses:n,trigger:m=>{switch(m){case 0:return this._commandService.executeCommand("workbench.action.terminal.rename",s),f.TriggerAction.NO_ACTION;case 1:return s.dispose(!0),f.TriggerAction.REMOVE_ITEM}return f.TriggerAction.NO_ACTION},accept:(m,b)=>{if(s.target===C.TerminalLocation.Editor){const E=this._editorService.findEditors(s.resource);this._terminalEditorService.openEditor(s,{viewColumn:E?.[0].groupId}),this._terminalEditorService.setActiveInstance(s)}else this._terminalGroupService.showPanel(!b.inBackground),this._terminalGroupService.setActiveInstance(s)}}}};i.PREFIX="term ",i=Ee([W(0,o.IEditorService),W(1,A.ITerminalEditorService),W(2,A.ITerminalGroupService),W(3,k.ICommandService),W(4,D.IThemeService)],i),e.TerminalQuickAccessProvider=i}),define(ne[2281],re([1,0,13,191,31,144,34,592,218,44,21,18,45,325]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteTerminalChannelClient=e.REMOTE_TERMINAL_CHANNEL_NAME=void 0,e.REMOTE_TERMINAL_CHANNEL_NAME="remoteterminal";let i=class{constructor(s,l,r,p,u,a,n,h,g,d){this._remoteAuthority=s,this._channel=l,this._configurationService=r,this._workspaceContextService=p,this._resolverService=u,this._environmentVariableService=a,this._remoteAuthorityResolverService=n,this._logService=h,this._editorService=g,this._labelService=d}get onPtyHostExit(){return this._channel.listen("$onPtyHostExitEvent")}get onPtyHostStart(){return this._channel.listen("$onPtyHostStartEvent")}get onPtyHostUnresponsive(){return this._channel.listen("$onPtyHostUnresponsiveEvent")}get onPtyHostResponsive(){return this._channel.listen("$onPtyHostResponsiveEvent")}get onPtyHostRequestResolveVariables(){return this._channel.listen("$onPtyHostRequestResolveVariablesEvent")}get onProcessData(){return this._channel.listen("$onProcessDataEvent")}get onProcessExit(){return this._channel.listen("$onProcessExitEvent")}get onProcessReady(){return this._channel.listen("$onProcessReadyEvent")}get onProcessReplay(){return this._channel.listen("$onProcessReplayEvent")}get onProcessOrphanQuestion(){return this._channel.listen("$onProcessOrphanQuestion")}get onExecuteCommand(){return this._channel.listen("$onExecuteCommand")}get onDidRequestDetach(){return this._channel.listen("$onDidRequestDetach")}get onDidChangeProperty(){return this._channel.listen("$onDidChangeProperty")}restartPtyHost(){return this._channel.call("$restartPtyHost",[])}async createProcess(s,l,r,p,u,a,n,h){await this._configurationService.whenRemoteConfigurationLoaded();const g=Object.create(null),d=r?(0,t.withNullAsUndefined)(this._workspaceContextService.getWorkspaceFolder(r)):void 0;let m;try{m=(await this._resolverService.resolveAnyMap(d,{shellLaunchConfig:s,configuration:l})).resolvedVariables}catch(L){this._logService.error(L)}if(m)for(const[L,M]of m.entries())(/^config:/.test(L)||L==="selectedText"||L==="lineNumber")&&(g[L]=M);const b=[];for(const[L,M]of this._environmentVariableService.collections.entries())b.push([L,(0,D.serializeEnvironmentVariableCollection)(M.map)]);const E=await this._remoteAuthorityResolverService.resolveAuthority(this._remoteAuthority),y=E.options&&E.options.extensionHostEnv,T=this._workspaceContextService.getWorkspace(),R=T.folders,O=r?this._workspaceContextService.getWorkspaceFolder(r):null,x=w.EditorResourceAccessor.getOriginalUri(this._editorService.activeEditor,{supportSideBySide:w.SideBySideEditor.PRIMARY,filterByScheme:[C.Schemas.file,C.Schemas.vscodeUserData,C.Schemas.vscodeRemote]}),F={configuration:l,resolvedVariables:g,envVariableCollections:b,shellLaunchConfig:s,workspaceId:T.id,workspaceName:this._labelService.getWorkspaceLabel(T),workspaceFolders:R,activeWorkspaceFolder:O,activeFileResource:x,shouldPersistTerminal:u,options:p,cols:a,rows:n,unicodeVersion:h,resolverEnv:y};return await this._channel.call("$createProcess",F)}requestDetachInstance(s,l){return this._channel.call("$requestDetachInstance",[s,l])}acceptDetachInstanceReply(s,l){return this._channel.call("$acceptDetachInstanceReply",[s,l])}attachToProcess(s){return this._channel.call("$attachToProcess",[s])}detachFromProcess(s){return this._channel.call("$detachFromProcess",[s])}listProcesses(){return this._channel.call("$listProcesses")}reduceConnectionGraceTime(){return this._channel.call("$reduceConnectionGraceTime")}processBinary(s,l){return this._channel.call("$processBinary",[s,l])}start(s){return this._channel.call("$start",[s])}input(s,l){return this._channel.call("$input",[s,l])}acknowledgeDataEvent(s,l){return this._channel.call("$acknowledgeDataEvent",[s,l])}setUnicodeVersion(s,l){return this._channel.call("$setUnicodeVersion",[s,l])}shutdown(s,l){return this._channel.call("$shutdown",[s,l])}resize(s,l,r){return this._channel.call("$resize",[s,l,r])}getInitialCwd(s){return this._channel.call("$getInitialCwd",[s])}getCwd(s){return this._channel.call("$getCwd",[s])}orphanQuestionReply(s){return this._channel.call("$orphanQuestionReply",[s])}sendCommandResult(s,l,r){return this._channel.call("$sendCommandResult",[s,l,r])}installAutoReply(s,l){return this._channel.call("$installAutoReply",[s,l])}uninstallAllAutoReplies(){return this._channel.call("$uninstallAllAutoReplies",[])}getDefaultSystemShell(s){return this._channel.call("$getDefaultSystemShell",[s])}getProfiles(s,l,r){return this._channel.call("$getProfiles",[this._workspaceContextService.getWorkspace().id,s,l,r])}acceptPtyHostResolvedVariables(s,l){return this._channel.call("$acceptPtyHostResolvedVariables",[s,l])}getEnvironment(){return this._channel.call("$getEnvironment")}getWslPath(s){return this._channel.call("$getWslPath",[s])}setTerminalLayoutInfo(s){const r={workspaceId:this._workspaceContextService.getWorkspace().id,tabs:s?s.tabs:[]};return this._channel.call("$setTerminalLayoutInfo",r)}updateTitle(s,l,r){return this._channel.call("$updateTitle",[s,l,r])}updateIcon(s,l,r){return this._channel.call("$updateIcon",[s,l,r])}refreshProperty(s,l){return this._channel.call("$refreshProperty",[s,l])}updateProperty(s,l,r){return this._channel.call("$updateProperty",[s,l,r])}getTerminalLayoutInfo(){const l={workspaceId:this._workspaceContextService.getWorkspace().id};return this._channel.call("$getTerminalLayoutInfo",l)}reviveTerminalProcesses(s,l){return this._channel.call("$reviveTerminalProcesses",[s,l])}serializeTerminalState(s){return this._channel.call("$serializeTerminalState",[s])}};i=Ee([W(2,f.IWorkbenchConfigurationService),W(3,k.IWorkspaceContextService),W(4,I.IConfigurationResolverService),W(5,c.IEnvironmentVariableService),W(6,A.IRemoteAuthorityResolverService),W(7,_.ILogService),W(8,v.IEditorService),W(9,o.ILabelService)],i),e.RemoteTerminalChannelClient=i}),define(ne[2282],re([1,0,15,30,6,92,2,1798,7,5,26,24,114,2233,362,328,2235,363,270,251,216,21,8,327]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestService=void 0;let g=class extends k.Disposable{constructor(m,b,E,y,T,R,O,x,F){super();this.storage=E,this.editorService=y,this.testProfiles=T,this.notificationService=R,this.configurationService=O,this.testResults=x,this.workspaceTrustRequestService=F,this.testControllers=new Map,this.cancelExtensionTestRunEmitter=new _.Emitter,this.willProcessDiffEmitter=new _.Emitter,this.didProcessDiffEmitter=new _.Emitter,this.testRefreshCancellations=new Set,this.uiRunningTests=new Map,this.onWillProcessDiff=this.willProcessDiffEmitter.event,this.onDidProcessDiff=this.didProcessDiffEmitter.event,this.onDidCancelTestRun=this.cancelExtensionTestRunEmitter.event,this.collection=new c.MainThreadTestCollection(this.expandTest.bind(this)),this.showInlineOutput=i.MutableObservableValue.stored(new S.StoredValue({key:"inlineTestOutputVisible",scope:1,target:0},this.storage),!0),this.excluded=b.createInstance(s.TestExclusions),this.providerCount=r.TestingContextKeys.providerCount.bindTo(m),this.canRefreshTests=r.TestingContextKeys.canRefreshTests.bindTo(m),this.isRefreshingTests=r.TestingContextKeys.isRefreshingTests.bindTo(m)}async expandTest(m,b){await this.testControllers.get(l.TestId.fromString(m).controllerId)?.expandTest(m,b)}cancelTestRun(m){if(this.cancelExtensionTestRunEmitter.fire({runId:m}),m===void 0)for(const b of this.uiRunningTests.values())b.cancel();else this.uiRunningTests.get(m)?.cancel()}async runTests(m,b=f.CancellationToken.None){const E={targets:[],exclude:m.exclude?.map(y=>y.item.extId),isAutoRun:m.isAutoRun};for(const y of this.testProfiles.getGroupDefaultProfiles(m.group)){const T=m.tests.filter(R=>(0,p.canUseProfileWithTest)(y,R)).map(R=>R.item.extId);T.length&&E.targets.push({testIds:T,profileGroup:y.group,profileId:y.profileId,controllerId:y.controllerId})}if(E.targets.length===0)for(const y of(0,t.groupBy)(m.tests,(T,R)=>T.controllerId===R.controllerId?0:1)){const T=this.testProfiles.getControllerProfiles(y[0].controllerId),R=y.map(O=>({profile:T.find(x=>x.group===m.group&&(0,p.canUseProfileWithTest)(x,O)),test:O}));for(const O of(0,t.groupBy)(R,(x,F)=>x.profile===F.profile?0:1)){const x=O[0].profile;x&&E.targets.push({testIds:O.map(F=>F.test.item.extId),profileGroup:m.group,profileId:x.profileId,controllerId:x.controllerId})}}return this.runResolvedTests(E,b)}async runResolvedTests(m,b=f.CancellationToken.None){m.exclude||(m.exclude=[...this.excluded.all]);const E=this.testResults.createLiveResult(m);if(!await this.workspaceTrustRequestService.requestWorkspaceTrust({message:(0,D.localize)(0,null)}))return E.markComplete(),E;try{const T=new f.CancellationTokenSource(b);this.uiRunningTests.set(E.id,T);const R=m.targets.map(O=>this.testControllers.get(O.controllerId)?.runTests({runId:E.id,excludeExtIds:m.exclude.filter(x=>!O.testIds.includes(x)),profileId:O.profileId,controllerId:O.controllerId,testIds:O.testIds},T.token).catch(x=>{this.notificationService.error((0,D.localize)(1,null,x.message))}));return await this.saveAllBeforeTest(m),await Promise.all(R),E}finally{this.uiRunningTests.delete(E.id),E.markComplete()}}publishDiff(m,b){this.willProcessDiffEmitter.fire(b),this.collection.apply(b),this.didProcessDiffEmitter.fire(b)}getTestController(m){return this.testControllers.get(m)}async refreshTests(m){const b=new f.CancellationTokenSource;this.testRefreshCancellations.add(b),this.isRefreshingTests.set(!0);try{m?await this.testControllers.get(m)?.refreshTests(b.token):await Promise.all([...this.testControllers.values()].map(E=>E.refreshTests(b.token)))}finally{this.testRefreshCancellations.delete(b),this.isRefreshingTests.set(this.testRefreshCancellations.size>0),b.dispose()}}cancelRefreshTests(){for(const m of this.testRefreshCancellations)m.cancel();this.testRefreshCancellations.clear(),this.isRefreshingTests.set(!1)}registerTestController(m,b){this.testControllers.set(m,b),this.providerCount.set(this.testControllers.size),this.updateCanRefresh();const E=new k.DisposableStore;return E.add((0,k.toDisposable)(()=>{const y=[];for(const T of this.collection.rootItems)T.controllerId===m&&y.push({op:2,itemId:T.item.extId});this.publishDiff(m,y),this.testControllers.delete(m)&&(this.providerCount.set(this.testControllers.size),this.updateCanRefresh())})),E.add(b.canRefresh.onDidChange(this.updateCanRefresh,this)),E}async saveAllBeforeTest(m,b=this.configurationService,E=this.editorService){if(m.isUiTriggered===!1)return;(0,h.getTestingConfiguration)(this.configurationService,"testing.saveBeforeTest")&&await E.saveAll()}updateCanRefresh(){this.canRefreshTests.set(A.Iterable.some(this.testControllers.values(),m=>m.canRefresh.value))}};g=Ee([W(0,I.IContextKeyService),W(1,w.IInstantiationService),W(2,C.IStorageService),W(3,a.IEditorService),W(4,p.ITestProfileService),W(5,v.INotificationService),W(6,n.IConfigurationService),W(7,u.ITestResultService),W(8,o.IWorkspaceTrustRequestService)],g),e.TestService=g}),define(ne[2283],re([1,0,10,209,277,66,6,2,229,20,122,61,172,1804,73,16,7,5,71,24,12,2241,21,1127]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchyTreePeekWidget=void 0;var h;(function(b){b.Loading="loading",b.Message="message",b.Data="data"})(h||(h={}));class g{constructor(E,y){this.ratio=E,this.height=y}static store(E,y){y.store("typeHierarchyPeekLayout",JSON.stringify(E),0,1)}static retrieve(E){const y=E.get("typeHierarchyPeekLayout",0,"{}"),T={ratio:.7,height:17};try{return{...T,...JSON.parse(y)}}catch{return T}}}class d extends r.WorkbenchAsyncDataTree{}let m=class xo extends o.PeekViewWidget{constructor(E,y,T,R,O,x,F,L,M,N,B){super(E,{showFrame:!0,showArrow:!0,isResizeable:!0,isAccessible:!0},B);this._where=y,this._direction=T,this._peekViewService=O,this._editorService=x,this._textModelService=F,this._storageService=L,this._menuService=M,this._contextKeyService=N,this._instantiationService=B,this._treeViewStates=new Map,this._previewDisposable=new D.DisposableStore,this.create(),this._peekViewService.addExclusiveWidget(E,this),this._applyTheme(R.getColorTheme()),this._disposables.add(R.onDidColorThemeChange(this._applyTheme,this)),this._disposables.add(this._previewDisposable)}dispose(){g.store(this._layoutInfo,this._storageService),this._splitView.dispose(),this._tree.dispose(),this._editor.dispose(),super.dispose()}get direction(){return this._direction}_applyTheme(E){const y=E.getColor(o.peekViewBorder)||A.Color.transparent;this.style({arrowColor:y,frameColor:y,headerBackgroundColor:E.getColor(o.peekViewTitleBackground)||A.Color.transparent,primaryHeadingColor:E.getColor(o.peekViewTitleForeground),secondaryHeadingColor:E.getColor(o.peekViewTitleInfoForeground)})}_fillHead(E){super._fillHead(E,!0);const y=this._menuService.createMenu(xo.TitleMenu,this._contextKeyService),T=()=>{const R=[];(0,i.createAndFillInActionBarActions)(y,void 0,R),this._actionbarWidget.clear(),this._actionbarWidget.push(R,{label:!1,icon:!0})};this._disposables.add(y),this._disposables.add(y.onDidChange(T)),T()}_fillBody(E){this._layoutInfo=g.retrieve(this._storageService),this._dim=new t.Dimension(0,0),this._parent=E,E.classList.add("type-hierarchy");const y=document.createElement("div");y.classList.add("message"),E.appendChild(y),this._message=y,this._message.tabIndex=0;const T=document.createElement("div");T.classList.add("results"),E.appendChild(T),this._splitView=new f.SplitView(T,{orientation:1});const R=document.createElement("div");R.classList.add("editor"),T.appendChild(R);let O={scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!1},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1}};this._editor=this._instantiationService.createInstance(I.EmbeddedCodeEditorWidget,R,O,this.editor);const x=document.createElement("div");x.classList.add("tree"),T.appendChild(x);const F={sorter:new a.Sorter,accessibilityProvider:new a.AccessibilityProvider(()=>this._direction),identityProvider:new a.IdentityProvider(()=>this._direction),expandOnlyOnTwistieClick:!0,overrideStyles:{listBackground:o.peekViewResultsBackground}};this._tree=this._instantiationService.createInstance(d,"TypeHierarchyPeek",x,new a.VirtualDelegate,[this._instantiationService.createInstance(a.TypeRenderer)],this._instantiationService.createInstance(a.DataSource,()=>this._direction),F),this._splitView.addView({onDidChange:k.Event.None,element:R,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:L=>{this._dim.height&&this._editor.layout({height:this._dim.height,width:L})}},f.Sizing.Distribute),this._splitView.addView({onDidChange:k.Event.None,element:x,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:L=>{this._dim.height&&this._tree.layout(this._dim.height,L)}},f.Sizing.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this._layoutInfo.ratio=this._splitView.getViewSize(0)/this._dim.width)})),this._disposables.add(this._tree.onDidChangeFocus(this._updatePreview,this)),this._disposables.add(this._editor.onMouseDown(L=>{const{event:M,target:N}=L;if(M.detail!==2)return;const[B]=this._tree.getFocus();!B||(this.dispose(),this._editorService.openEditor({resource:B.item.uri,options:{selection:N.range}}))})),this._disposables.add(this._tree.onMouseDblClick(L=>{L.target!==_.TreeMouseEventTarget.Twistie&&L.element&&(this.dispose(),this._editorService.openEditor({resource:L.element.item.uri,options:{selection:L.element.item.selectionRange,pinned:!0}}))})),this._disposables.add(this._tree.onDidChangeSelection(L=>{const[M]=L.elements;M&&L.browserEvent instanceof KeyboardEvent&&(this.dispose(),this._editorService.openEditor({resource:M.item.uri,options:{selection:M.item.selectionRange,pinned:!0}}))}))}async _updatePreview(){const[E]=this._tree.getFocus();if(!E)return;this._previewDisposable.clear();const y={description:"type-hierarchy-decoration",stickiness:1,className:"type-decoration",overviewRuler:{color:(0,u.themeColorFromId)(o.peekViewEditorMatchHighlight),position:v.OverviewRulerLane.Center}};let T;this._direction==="supertypes"?T=E.parent?E.parent.item.uri:E.model.root.uri:T=E.item.uri;const R=await this._textModelService.createModelReference(T);this._editor.setModel(R.object.textEditorModel);let O=[],x;const F={uri:E.item.uri,range:E.item.selectionRange};if(F.uri.toString()===T.toString()&&(O.push({range:F.range,options:y}),x=x?w.Range.plusRange(F.range,x):F.range),x){this._editor.revealRangeInCenter(x,1);const M=this._editor.deltaDecorations([],O);this._previewDisposable.add((0,D.toDisposable)(()=>this._editor.deltaDecorations(M,[])))}this._previewDisposable.add(R);const L=this._direction==="supertypes"?(0,c.localize)(0,null,E.model.root.name):(0,c.localize)(1,null,E.model.root.name);this.setTitle(L)}showLoading(){this._parent.dataset.state="loading",this.setTitle((0,c.localize)(2,null)),this._show()}showMessage(E){this._parent.dataset.state="message",this.setTitle(""),this.setMetaTitle(""),this._message.innerText=E,this._show(),this._message.focus()}async showModel(E){this._show();const y=this._treeViewStates.get(this._direction);await this._tree.setInput(E,y);const T=this._tree.getNode(E).children[0];await this._tree.expand(T.element),T.children.length===0?this.showMessage(this._direction==="supertypes"?(0,c.localize)(3,null,E.root.name):(0,c.localize)(4,null,E.root.name)):(this._parent.dataset.state="data",(!y||this._tree.getFocus().length===0)&&this._tree.setFocus([T.children[0].element]),this._tree.domFocus(),this._updatePreview())}getModel(){return this._tree.getInput()}getFocused(){return this._tree.getFocus()[0]}async updateDirection(E){const y=this._tree.getInput();y&&E!==this._direction&&(this._treeViewStates.set(this._direction,this._tree.getViewState()),this._direction=E,await this.showModel(y))}_show(){this._isShowing||(this.editor.revealLineInCenterIfOutsideViewport(this._where.lineNumber,0),super.show(w.Range.fromPositions(this._where),this._layoutInfo.height))}_onWidth(E){this._dim&&this._doLayoutBody(this._dim.height,E)}_doLayoutBody(E,y){(this._dim.height!==E||this._dim.width!==y)&&(super._doLayoutBody(E,y),this._dim=new t.Dimension(y,E),this._layoutInfo.height=this._viewZone?this._viewZone.heightInLines:this._layoutInfo.height,this._splitView.layout(y),this._splitView.resizeView(0,y*this._layoutInfo.ratio))}};m.TitleMenu=new S.MenuId("typehierarchy/title"),m=Ee([W(3,u.IThemeService),W(4,o.IPeekViewService),W(5,n.IEditorService),W(6,C.ITextModelService),W(7,p.IStorageService),W(8,S.IMenuService),W(9,s.IContextKeyService),W(10,l.IInstantiationService)],m),e.TypeHierarchyTreePeekWidget=m,(0,u.registerThemingParticipant)((b,E)=>{const y=b.getColor(o.peekViewEditorMatchHighlight);y&&E.addRule(`.monaco-editor .type-hierarchy .type-decoration { background-color: ${y}; }`);const T=b.getColor(o.peekViewEditorMatchHighlightBorder);T&&E.addRule(`.monaco-editor .type-hierarchy .type-decoration { border: 2px solid ${T}; box-sizing: border-box; }`);const R=b.getColor(o.peekViewResultsBackground);R&&E.addRule(`.monaco-editor .type-hierarchy .tree { background-color: ${R}; }`);const O=b.getColor(o.peekViewResultsFileForeground);O&&E.addRule(`.monaco-editor .type-hierarchy .tree { color: ${O}; }`);const x=b.getColor(o.peekViewResultsSelectionBackground);x&&E.addRule(`.monaco-editor .type-hierarchy .tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { background-color: ${x}; }`);const F=b.getColor(o.peekViewResultsSelectionForeground);F&&E.addRule(`.monaco-editor .type-hierarchy .tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { color: ${F} !important; }`);const L=b.getColor(o.peekViewEditorBackground);L&&E.addRule(`.monaco-editor .type-hierarchy .editor .monaco-editor .monaco-editor-background,.monaco-editor .type-hierarchy .editor .monaco-editor .inputarea.ime-input { background-color: ${L};}`);const M=b.getColor(o.peekViewEditorGutterBackground);M&&E.addRule(`.monaco-editor .type-hierarchy .editor .monaco-editor .margin { background-color: ${M};}`)})}),define(ne[2284],re([1,0,30,33,22,6,2,39,72,20,172,1803,16,7,5,24,2283,598]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=new c.RawContextKey("editorHasTypeHierarchyProvider",!1,(0,C.localize)(0,null)),p=new c.RawContextKey("typeHierarchyVisible",!1,(0,C.localize)(1,null)),u=new c.RawContextKey("typeHierarchyDirection",void 0,{type:"string",description:(0,C.localize)(2,null)});function a(h){return h==="subtypes"||h==="supertypes"?h:"subtypes"}let n=class hn{constructor(g,d,m,b,E){this._editor=g,this._contextKeyService=d,this._storageService=m,this._editorService=b,this._instantiationService=E,this._disposables=new k.DisposableStore,this._sessionDisposables=new k.DisposableStore,this._ctxHasProvider=r.bindTo(this._contextKeyService),this._ctxIsVisible=p.bindTo(this._contextKeyService),this._ctxDirection=u.bindTo(this._contextKeyService),this._disposables.add(A.Event.any(g.onDidChangeModel,g.onDidChangeModelLanguage,l.TypeHierarchyProviderRegistry.onDidChange)(()=>{this._ctxHasProvider.set(g.hasModel()&&l.TypeHierarchyProviderRegistry.has(g.getModel()))})),this._disposables.add(this._sessionDisposables)}static get(g){return g.getContribution(hn.Id)}dispose(){this._disposables.dispose()}async startTypeHierarchyFromEditor(){if(this._sessionDisposables.clear(),!this._editor.hasModel())return;const g=this._editor.getModel(),d=this._editor.getPosition();if(!l.TypeHierarchyProviderRegistry.has(g))return;const m=new t.CancellationTokenSource,b=l.TypeHierarchyModel.create(g,d,m.token),E=a(this._storageService.get(hn._storageDirectionKey,0,"subtypes"));this._showTypeHierarchyWidget(d,E,b,m)}_showTypeHierarchyWidget(g,d,m,b){this._ctxIsVisible.set(!0),this._ctxDirection.set(d),A.Event.any(this._editor.onDidChangeModel,this._editor.onDidChangeModelLanguage)(this.endTypeHierarchy,this,this._sessionDisposables),this._widget=this._instantiationService.createInstance(s.TypeHierarchyTreePeekWidget,this._editor,g,d),this._widget.showLoading(),this._sessionDisposables.add(this._widget.onDidClose(()=>{this.endTypeHierarchy(),this._storageService.store(hn._storageDirectionKey,this._widget.direction,0,0)})),this._sessionDisposables.add({dispose(){b.dispose(!0)}}),this._sessionDisposables.add(this._widget),m.then(E=>{b.token.isCancellationRequested||(E?(this._sessionDisposables.add(E),this._widget.showModel(E)):this._widget.showMessage((0,C.localize)(3,null)))}).catch(E=>{if((0,_.isCancellationError)(E)){this.endTypeHierarchy();return}this._widget.showMessage((0,C.localize)(4,null))})}async startTypeHierarchyFromTypeHierarchy(){if(!this._widget)return;const g=this._widget.getModel(),d=this._widget.getFocused();if(!d||!g)return;const m=await this._editorService.openCodeEditor({resource:d.item.uri},this._editor);if(!m)return;const b=g.fork(d.item);this._sessionDisposables.clear(),hn.get(m)?._showTypeHierarchyWidget(w.Range.lift(b.root.selectionRange).getStartPosition(),this._widget.direction,Promise.resolve(b),new t.CancellationTokenSource)}showSupertypes(){this._widget?.updateDirection("supertypes"),this._ctxDirection.set("supertypes")}showSubtypes(){this._widget?.updateDirection("subtypes"),this._ctxDirection.set("subtypes")}endTypeHierarchy(){this._sessionDisposables.clear(),this._ctxIsVisible.set(!1),this._editor.focus()}};n.Id="typeHierarchy",n._storageDirectionKey="typeHierarchy/defaultDirection",n=Ee([W(1,c.IContextKeyService),W(2,S.IStorageService),W(3,I.ICodeEditorService),W(4,i.IInstantiationService)],n),(0,D.registerEditorContribution)(n.Id,n),(0,o.registerAction2)(class extends D.EditorAction2{constructor(){super({id:"editor.showTypeHierarchy",title:{value:(0,C.localize)(5,null),original:"Peek Type Hierarchy"},menu:{id:o.MenuId.EditorContextPeek,group:"navigation",order:1e3,when:c.ContextKeyExpr.and(r,v.PeekContext.notInPeekEditor)},precondition:c.ContextKeyExpr.and(r,v.PeekContext.notInPeekEditor)})}async runEditorCommand(h,g){return n.get(g)?.startTypeHierarchyFromEditor()}}),(0,o.registerAction2)(class extends D.EditorAction2{constructor(){super({id:"editor.showSupertypes",title:{value:(0,C.localize)(6,null),original:"Show Supertypes"},icon:f.Codicon.typeHierarchySuper,precondition:c.ContextKeyExpr.and(p,u.isEqualTo("subtypes")),keybinding:{weight:200,primary:1024+512+38},menu:{id:s.TypeHierarchyTreePeekWidget.TitleMenu,when:u.isEqualTo("subtypes"),order:1}})}runEditorCommand(h,g){return n.get(g)?.showSupertypes()}}),(0,o.registerAction2)(class extends D.EditorAction2{constructor(){super({id:"editor.showSubtypes",title:{value:(0,C.localize)(7,null),original:"Show Subtypes"},icon:f.Codicon.typeHierarchySub,precondition:c.ContextKeyExpr.and(p,u.isEqualTo("supertypes")),keybinding:{weight:200,primary:1024+512+38},menu:{id:s.TypeHierarchyTreePeekWidget.TitleMenu,when:u.isEqualTo("supertypes"),order:1}})}runEditorCommand(h,g){return n.get(g)?.showSubtypes()}}),(0,o.registerAction2)(class extends D.EditorAction2{constructor(){super({id:"editor.refocusTypeHierarchy",title:{value:(0,C.localize)(8,null),original:"Refocus Type Hierarchy"},precondition:p,keybinding:{weight:200,primary:1024+3}})}async runEditorCommand(h,g){return n.get(g)?.startTypeHierarchyFromTypeHierarchy()}}),(0,o.registerAction2)(class extends D.EditorAction2{constructor(){super({id:"editor.closeTypeHierarchy",title:(0,C.localize)(9,null),icon:f.Codicon.close,precondition:c.ContextKeyExpr.and(p,c.ContextKeyExpr.not("config.editor.stablePeek")),keybinding:{weight:200+10,primary:9},menu:{id:s.TypeHierarchyTreePeekWidget.TitleMenu,order:1e3}})}runEditorCommand(h,g){return n.get(g)?.endTypeHierarchy()}})}),define(ne[2285],re([1,0,39,470,1818,16,202,294,21]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const w=100;function v(C,o){C?.addImplementation(w,"webview",c=>{const S=c.get(k.IWebviewService).activeWebview;if(S?.isFocused)return o(S),!0;if(document.activeElement?.classList.contains("action-menu-item")){const s=c.get(I.IEditorService);if(s.activeEditor instanceof D.WebviewInput)return o(s.activeEditor.webview),!0}return!1})}v(t.UndoCommand,C=>C.undo()),v(t.RedoCommand,C=>C.redo()),v(t.SelectAllCommand,C=>C.selectAll()),v(f.CopyAction,C=>C.copy()),v(f.PasteAction,C=>C.paste()),v(f.CutAction,C=>C.cut()),f.CutAction&&A.MenuRegistry.appendMenuItem(A.MenuId.WebviewContext,{command:{id:f.CutAction.id,title:_.localize(0,null)},order:1}),f.CopyAction&&A.MenuRegistry.appendMenuItem(A.MenuId.WebviewContext,{command:{id:f.CopyAction.id,title:_.localize(1,null)},order:2}),f.PasteAction&&A.MenuRegistry.appendMenuItem(A.MenuId.WebviewContext,{command:{id:f.PasteAction.id,title:_.localize(2,null)},order:3})}),define(ne[2286],re([1,0,106,746,12,21,72,35,19,8,409]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeEditorService=void 0;let C=class extends f.AbstractCodeEditorService{constructor(c,i,S){super(i);this.editorService=c,this.configurationService=S}getActiveCodeEditor(){const c=this.editorService.activeTextEditorControl;if((0,t.isCodeEditor)(c))return c;if((0,t.isDiffEditor)(c))return c.getModifiedEditor();const i=this.editorService.activeEditorPane?.getControl();return(0,t.isCompositeEditor)(i)&&(0,t.isCodeEditor)(i.activeCodeEditor)?i.activeCodeEditor:null}async openCodeEditor(c,i,S){const s=this.editorService.activeTextEditorControl;if(!S&&(0,t.isDiffEditor)(s)&&c.options&&c.resource&&i===s.getModifiedEditor()&&s.getModel()&&(0,I.isEqual)(c.resource,s.getModel()?.modified.uri)){const l=s.getModifiedEditor();return(0,v.applyTextEditorOptions)(c.options,l,0),l}return this.doOpenCodeEditor(c,i,S)}async doOpenCodeEditor(c,i,S){if(!this.configurationService.getValue().workbench?.editor?.enablePreviewFromCodeNavigation&&i&&!c.options?.pinned&&!S&&!(0,I.isEqual)(i.getModel()?.uri,c.resource)){for(const r of this.editorService.visibleEditorPanes)if((0,t.getCodeEditor)(r.getControl())===i){r.group.pinEditor();break}}const l=await this.editorService.openEditor(c,S?A.SIDE_GROUP:A.ACTIVE_GROUP);if(l){const r=l.getControl();if((0,t.isCodeEditor)(r))return r;if((0,t.isCompositeEditor)(r)&&(0,t.isCodeEditor)(r.activeCodeEditor))return r.activeCodeEditor}return null}};C=Ee([W(0,A.IEditorService),W(1,_.IThemeService),W(2,w.IConfigurationService)],C),e.CodeEditorService=C,(0,D.registerSingleton)(k.ICodeEditorService,C,!0)}),define(ne[253],re([1,0,21]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.editorGroupToColumn=e.columnToEditorGroup=void 0;function f(A,k){if(typeof k!="number"||k===t.ACTIVE_GROUP||A.count===1&&A.activeGroup.isEmpty)return t.ACTIVE_GROUP;if(k===t.SIDE_GROUP)return t.SIDE_GROUP;const D=A.getGroups(2)[k];return D?D.id:t.SIDE_GROUP}e.columnToEditorGroup=f;function _(A,k){const D=typeof k=="number"?A.getGroup(k):k;return A.getGroups(2).indexOf(D??A.activeGroup)}e.editorGroupToColumn=_}),define(ne[608],re([1,0,19,8,132,44,59,21]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.findGroup=void 0;function I(i,S,s){const l=i.get(k.IEditorGroupsService),r=i.get(f.IConfigurationService),p=w(S,s,l,r);let u;return l.activeGroup!==p&&S.options&&!S.options.inactive&&S.options.preserveFocus&&typeof S.options.activation!="number"&&s!==D.SIDE_GROUP&&(u=_.EditorActivation.ACTIVATE),[p,u]}e.findGroup=I;function w(i,S,s,l){let r,p=(0,A.isEditorInputWithOptions)(i)?i.editor:i,u=i.options;if(S&&typeof S!="number")r=S;else if(typeof S=="number"&&S>=0)r=s.getGroup(S);else if(S===D.SIDE_GROUP){const a=(0,k.preferredSideBySideGroupDirection)(l);let n=s.findGroup({direction:a});(!n||v(n,p))&&(n=s.addGroup(s.activeGroup,a)),r=n}else if(!u||typeof u.index!="number"){const a=s.getGroups(1);if(u?.revealIfVisible){for(const n of a)if(C(n,p)){r=n;break}}if(!r&&(u?.revealIfOpened||l.getValue("workbench.editor.revealIfOpen")||(0,A.isEditorInput)(p)&&p.hasCapability(8))){let n,h;for(const g of a)if(o(g,p)&&(h||(h=g),!n&&g.isActive(p)&&(n=g)),h&&n)break;r=n||h}}if(!r){let a=s.activeGroup;if(v(a,p)){for(const n of s.getGroups(1))if(!v(n,p)){a=n;break}v(a,p)?r=s.addGroup(a,(0,k.preferredSideBySideGroupDirection)(l)):r=a}else r=a}return r}function v(i,S){return!(!i.isLocked||o(i,S))}function C(i,S){return i.activeEditor?c(i.activeEditor,S):!1}function o(i,S){for(const s of i.editors)if(c(s,S))return!0;return!1}function c(i,S){return i.matches(S)?!0:i.resource?(0,t.isEqual)(i.resource,A.EditorResourceAccessor.getCanonicalUri(S)):!1}}),define(ne[852],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEncryptionService=void 0,e.IEncryptionService=(0,t.createDecorator)("encryptionService")}),define(ne[2287],re([1,0,103,852]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerMainProcessRemoteService)(f.IEncryptionService,"encryption",{supportsDelayedInstantiation:!0})}),define(ne[233],re([1,0,18,19,9,85,110,22,157,31,13,5]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserWorkbenchEnvironmentService=e.IBrowserWorkbenchEnvironmentService=void 0,e.IBrowserWorkbenchEnvironmentService=(0,C.refineServiceDecorator)(A.IEnvironmentService);class o{constructor(i,S,s,l){if(this.workspaceId=i,this.logsHome=S,this.options=s,this.productService=l,this.extensionHostDebugEnvironment=void 0,s.workspaceProvider&&Array.isArray(s.workspaceProvider.payload))try{this.payload=new Map(s.workspaceProvider.payload)}catch(r){(0,D.onUnexpectedError)(r)}}get remoteAuthority(){return this.options.remoteAuthority}get isBuilt(){return!!this.productService.commit}get logsPath(){return this.logsHome.path}get logLevel(){return this.payload?.get("logLevel")||(this.options.developmentOptions?.logLevel!==void 0?(0,w.LogLevelToString)(this.options.developmentOptions?.logLevel):void 0)}get logFile(){return(0,f.joinPath)(this.logsHome,"window.log")}get userRoamingDataHome(){return _.URI.file("/User").with({scheme:t.Schemas.vscodeUserData})}get settingsResource(){return(0,f.joinPath)(this.userRoamingDataHome,"settings.json")}get argvResource(){return(0,f.joinPath)(this.userRoamingDataHome,"argv.json")}get snippetsHome(){return(0,f.joinPath)(this.userRoamingDataHome,"snippets")}get cacheHome(){return(0,f.joinPath)(this.userRoamingDataHome,"caches")}get globalStorageHome(){return(0,f.joinPath)(this.userRoamingDataHome,"globalStorage")}get workspaceStorageHome(){return(0,f.joinPath)(this.userRoamingDataHome,"workspaceStorage")}get localHistoryHome(){return(0,f.joinPath)(this.userRoamingDataHome,"History")}get userDataSyncHome(){return(0,f.joinPath)(this.userRoamingDataHome,"sync",this.workspaceId)}get userDataSyncLogResource(){return(0,f.joinPath)(this.logsHome,"userDataSync.log")}get sync(){}get keybindingsResource(){return(0,f.joinPath)(this.userRoamingDataHome,"keybindings.json")}get keyboardLayoutResource(){return(0,f.joinPath)(this.userRoamingDataHome,"keyboardLayout.json")}get untitledWorkspacesHome(){return(0,f.joinPath)(this.userRoamingDataHome,"Workspaces")}get serviceMachineIdResource(){return(0,f.joinPath)(this.userRoamingDataHome,"machineid")}get extHostLogsPath(){return(0,f.joinPath)(this.logsHome,"exthost")}get debugExtensionHost(){return this.extensionHostDebugEnvironment||(this.extensionHostDebugEnvironment=this.resolveExtensionHostDebugEnvironment()),this.extensionHostDebugEnvironment.params}get isExtensionDevelopment(){return this.extensionHostDebugEnvironment||(this.extensionHostDebugEnvironment=this.resolveExtensionHostDebugEnvironment()),this.extensionHostDebugEnvironment.isExtensionDevelopment}get extensionDevelopmentLocationURI(){return this.extensionHostDebugEnvironment||(this.extensionHostDebugEnvironment=this.resolveExtensionHostDebugEnvironment()),this.extensionHostDebugEnvironment.extensionDevelopmentLocationURI}get extensionDevelopmentLocationKind(){return this.extensionHostDebugEnvironment||(this.extensionHostDebugEnvironment=this.resolveExtensionHostDebugEnvironment()),this.extensionHostDebugEnvironment.extensionDevelopmentKind}get extensionTestsLocationURI(){return this.extensionHostDebugEnvironment||(this.extensionHostDebugEnvironment=this.resolveExtensionHostDebugEnvironment()),this.extensionHostDebugEnvironment.extensionTestsLocationURI}get extensionEnabledProposedApi(){return this.extensionHostDebugEnvironment||(this.extensionHostDebugEnvironment=this.resolveExtensionHostDebugEnvironment()),this.extensionHostDebugEnvironment.extensionEnabledProposedApi}get debugRenderer(){return this.extensionHostDebugEnvironment||(this.extensionHostDebugEnvironment=this.resolveExtensionHostDebugEnvironment()),this.extensionHostDebugEnvironment.debugRenderer}get disableExtensions(){return this.payload?.get("disableExtensions")==="true"}get enableExtensions(){return this.options.enabledExtensions}get webviewExternalEndpoint(){const i=this.options.webviewEndpoint||this.productService.webviewContentExternalBaseUrlTemplate||"https://{{uuid}}.vscode-webview.net/{{quality}}/{{commit}}/out/vs/workbench/contrib/webview/browser/pre/",S=this.payload?.get("webviewExternalEndpointCommit");return i.replace("{{commit}}",S??this.productService.commit??"181b43c0e2949e36ecb623d8cc6de29d4fa2bae8").replace("{{quality}}",(S?"insider":this.productService.quality)??"insider")}get telemetryLogResource(){return(0,f.joinPath)(this.logsHome,"telemetry.log")}get disableTelemetry(){return!1}get verbose(){return this.payload?.get("verbose")==="true"}get logExtensionHostCommunication(){return this.payload?.get("logExtensionHostCommunication")==="true"}get skipReleaseNotes(){return!1}get skipWelcome(){return this.payload?.get("skipWelcome")==="true"}get disableWorkspaceTrust(){return!this.options.enableWorkspaceTrust}resolveExtensionHostDebugEnvironment(){const i={params:{port:null,break:!1},debugRenderer:!1,isExtensionDevelopment:!1,extensionDevelopmentLocationURI:void 0,extensionDevelopmentKind:void 0};if(this.payload)for(const[s,l]of this.payload)switch(s){case"extensionDevelopmentPath":i.extensionDevelopmentLocationURI||(i.extensionDevelopmentLocationURI=[]),i.extensionDevelopmentLocationURI.push(_.URI.parse(l)),i.isExtensionDevelopment=!0;break;case"extensionDevelopmentKind":i.extensionDevelopmentKind=[l];break;case"extensionTestsPath":i.extensionTestsLocationURI=_.URI.parse(l);break;case"debugRenderer":i.debugRenderer=l==="true";break;case"debugId":i.params.debugId=l;break;case"inspect-brk-extensions":i.params.port=parseInt(l),i.params.break=!0;break;case"inspect-extensions":i.params.port=parseInt(l);break;case"enableProposedApi":i.extensionEnabledProposedApi=[];break}const S=this.options.developmentOptions;return S&&!i.isExtensionDevelopment&&(S.extensions?.length&&(i.extensionDevelopmentLocationURI=S.extensions.map(s=>_.URI.revive(s)),i.isExtensionDevelopment=!0),S.extensionTestsPath&&(i.extensionTestsLocationURI=_.URI.revive(S.extensionTestsPath))),i}get filesToOpenOrCreate(){if(this.payload){const i=this.payload.get("openFile");if(i){const S=_.URI.parse(i);if(this.payload.has("gotoLineMode")){const s=(0,I.parseLineAndColumnAware)(S.path);return[{fileUri:S.with({path:s.path}),selection:(0,v.isUndefined)(s.line)?void 0:{startLineNumber:s.line,startColumn:s.column||1}}]}return[{fileUri:S}]}}}get filesToDiff(){if(this.payload){const i=this.payload.get("diffFilePrimary"),S=this.payload.get("diffFileSecondary");if(i&&S)return[{fileUri:_.URI.parse(S)},{fileUri:_.URI.parse(i)}]}}}Ee([k.memoize],o.prototype,"remoteAuthority",null),Ee([k.memoize],o.prototype,"isBuilt",null),Ee([k.memoize],o.prototype,"logsPath",null),Ee([k.memoize],o.prototype,"logLevel",null),Ee([k.memoize],o.prototype,"logFile",null),Ee([k.memoize],o.prototype,"userRoamingDataHome",null),Ee([k.memoize],o.prototype,"settingsResource",null),Ee([k.memoize],o.prototype,"argvResource",null),Ee([k.memoize],o.prototype,"snippetsHome",null),Ee([k.memoize],o.prototype,"cacheHome",null),Ee([k.memoize],o.prototype,"globalStorageHome",null),Ee([k.memoize],o.prototype,"workspaceStorageHome",null),Ee([k.memoize],o.prototype,"localHistoryHome",null),Ee([k.memoize],o.prototype,"userDataSyncHome",null),Ee([k.memoize],o.prototype,"userDataSyncLogResource",null),Ee([k.memoize],o.prototype,"sync",null),Ee([k.memoize],o.prototype,"keybindingsResource",null),Ee([k.memoize],o.prototype,"keyboardLayoutResource",null),Ee([k.memoize],o.prototype,"untitledWorkspacesHome",null),Ee([k.memoize],o.prototype,"serviceMachineIdResource",null),Ee([k.memoize],o.prototype,"extHostLogsPath",null),Ee([k.memoize],o.prototype,"debugExtensionHost",null),Ee([k.memoize],o.prototype,"isExtensionDevelopment",null),Ee([k.memoize],o.prototype,"extensionDevelopmentLocationURI",null),Ee([k.memoize],o.prototype,"extensionDevelopmentLocationKind",null),Ee([k.memoize],o.prototype,"extensionTestsLocationURI",null),Ee([k.memoize],o.prototype,"extensionEnabledProposedApi",null),Ee([k.memoize],o.prototype,"debugRenderer",null),Ee([k.memoize],o.prototype,"disableExtensions",null),Ee([k.memoize],o.prototype,"enableExtensions",null),Ee([k.memoize],o.prototype,"webviewExternalEndpoint",null),Ee([k.memoize],o.prototype,"telemetryLogResource",null),Ee([k.memoize],o.prototype,"disableTelemetry",null),Ee([k.memoize],o.prototype,"verbose",null),Ee([k.memoize],o.prototype,"logExtensionHostCommunication",null),Ee([k.memoize],o.prototype,"skipReleaseNotes",null),Ee([k.memoize],o.prototype,"skipWelcome",null),Ee([k.memoize],o.prototype,"disableWorkspaceTrust",null),Ee([k.memoize],o.prototype,"filesToOpenOrCreate",null),Ee([k.memoize],o.prototype,"filesToDiff",null),e.BrowserWorkbenchEnvironmentService=o}),define(ne[2288],re([1,0,2,41,233]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExternalUriResolverContribution=void 0;let A=class extends t.Disposable{constructor(D,I){super();I.options&&I.options.resolveExternalUri&&this._register(D.registerExternalUriResolver({resolveExternalUri:async w=>({resolved:await I.options.resolveExternalUri(w),dispose:()=>{}})}))}};A=Ee([W(0,f.IOpenerService),W(1,_.IBrowserWorkbenchEnvironmentService)],A),e.ExternalUriResolverContribution=A}),define(ne[50],re([1,0,5,85]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWorkbenchEnvironmentService=void 0,e.IWorkbenchEnvironmentService=(0,t.refineServiceDecorator)(f.IEnvironmentService)}),define(ne[2289],re([1,0,1531,13,90,8,218,840,113,9,18,231,199,50,7]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Debugger=void 0;let S=class{constructor(l,r,p,u,a,n,h,g,d){this.adapterManager=l,this.configurationService=u,this.resourcePropertiesService=a,this.configurationResolverService=n,this.environmentService=h,this.debugService=g,this.contextKeyService=d,this.mergedExtensionDescriptions=[],this.debuggerContribution={type:r.type},this.merge(r,p),this.debuggerWhen=typeof this.debuggerContribution.when=="string"?i.ContextKeyExpr.deserialize(this.debuggerContribution.when):void 0}merge(l,r){function p(u,a,n,h=0){return(0,f.isObject)(u)?((0,f.isObject)(a)&&Object.keys(a).forEach(g=>{g!=="__proto__"&&((0,f.isObject)(u[g])&&(0,f.isObject)(a[g])?p(u[g],a[g],n,h+1):g in u?n&&(h===0&&g==="type"||(u[g]=a[g])):u[g]=a[g])}),u):a}this.mergedExtensionDescriptions.indexOf(r)<0&&(this.mergedExtensionDescriptions.push(r),p(this.debuggerContribution,l,r.isBuiltin),(0,C.isDebuggerMainContribution)(l)&&(this.mainExtensionDescription=r))}createDebugAdapter(l){return this.adapterManager.activateDebuggers("onDebugAdapterProtocolTracker",this.type).then(r=>{const p=this.adapterManager.createDebugAdapter(l);if(p)return Promise.resolve(p);throw new Error(t.localize(0,null,this.type))})}substituteVariables(l,r){return this.adapterManager.substituteVariables(this.type,l,r).then(p=>this.configurationResolverService.resolveWithInteractionReplace(l,p,"launch",this.variables,p.__configurationTarget))}runInTerminal(l,r){return this.adapterManager.runInTerminal(this.type,l,r)}get label(){return this.debuggerContribution.label||this.debuggerContribution.type}get type(){return this.debuggerContribution.type}get variables(){return this.debuggerContribution.variables}get configurationSnippets(){return this.debuggerContribution.configurationSnippets}get languages(){return this.debuggerContribution.languages}get when(){return this.debuggerWhen}get enabled(){return!this.debuggerWhen||this.contextKeyService.contextMatchesRules(this.debuggerWhen)}hasInitialConfiguration(){return!!this.debuggerContribution.initialConfigurations}hasConfigurationProvider(){return this.debugService.getConfigurationManager().hasDebugConfigurationProvider(this.type)}getInitialConfigurationContent(l){let r=this.debuggerContribution.initialConfigurations||[];l&&(r=r.concat(l));const p=this.resourcePropertiesService.getEOL(w.URI.from({scheme:v.Schemas.untitled,path:"1"}))===`\r `?`\r `:` `,u=JSON.stringify(r,null," ").split(` `).map(m=>" "+m).join(p).trim(),a=t.localize(1,null),n=t.localize(2,null),h=t.localize(3,null,"https://go.microsoft.com/fwlink/?linkid=830387");let g=["{",` // ${a}`,` // ${n}`,` // ${h}`,' "version": "0.2.0",',` "configurations": ${u}`,"}"].join(p);const d=this.configurationService.getValue();return d.editor&&d.editor.insertSpaces&&(g=g.replace(new RegExp(" ","g")," ".repeat(d.editor.tabSize))),Promise.resolve(g)}getMainExtensionDescriptor(){return this.mainExtensionDescription||this.mergedExtensionDescriptions[0]}getCustomTelemetryEndpoint(){const l=this.debuggerContribution.aiKey;if(!l)return;const r=(0,o.cleanRemoteAuthority)(this.environmentService.remoteAuthority)!=="other";return{id:`${this.getMainExtensionDescriptor().publisher}.${this.type}`,aiKey:l,sendErrorTelemetry:r}}getSchemaAttributes(l){return this.debuggerContribution.configurationAttributes?Object.keys(this.debuggerContribution.configurationAttributes).map(r=>{const p=`${this.type}:${r}`,u=this.debuggerContribution.configurationAttributes[r],a=["name","type","request"];u.required=u.required&&u.required.length?a.concat(u.required):a,u.type="object",u.properties||(u.properties={});const n=u.properties;n.type={enum:[this.type],description:t.localize(4,null),pattern:"^(?!node2)",deprecationMessage:this.enabled?void 0:(0,_.debuggerDisabledMessage)(this.type),errorMessage:t.localize(5,null),patternErrorMessage:t.localize(6,null)},n.request={enum:[r],description:t.localize(7,null)};for(const g in l.common.properties)n[g]={$ref:`#/definitions/common/properties/${g}`};return l[p]=u,Object.keys(n).forEach(g=>{D.applyDeprecatedVariableMessage(n[g])}),{allOf:[{$ref:`#/definitions/${p}`},{properties:{windows:{$ref:`#/definitions/${p}`,description:t.localize(8,null),required:[]},osx:{$ref:`#/definitions/${p}`,description:t.localize(9,null),required:[]},linux:{$ref:`#/definitions/${p}`,description:t.localize(10,null),required:[]}}}]}}):null}};S=Ee([W(3,A.IConfigurationService),W(4,I.ITextResourcePropertiesService),W(5,k.IConfigurationResolverService),W(6,c.IWorkbenchEnvironmentService),W(7,_.IDebugService),W(8,i.IContextKeyService)],S),e.Debugger=S}),define(ne[2290],re([1,0,1614,36,31,53,9,23,50,19,21]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenWindowSessionLogFileAction=e.SetLogLevelAction=void 0;let C=class extends f.Action{constructor(i,S,s,l){super(i,S);this.quickInputService=s,this.logService=l}run(){const i=this.logService.getLevel(),S=[{label:t.localize(1,null),level:_.LogLevel.Trace,description:this.getDescription(_.LogLevel.Trace,i)},{label:t.localize(2,null),level:_.LogLevel.Debug,description:this.getDescription(_.LogLevel.Debug,i)},{label:t.localize(3,null),level:_.LogLevel.Info,description:this.getDescription(_.LogLevel.Info,i)},{label:t.localize(4,null),level:_.LogLevel.Warning,description:this.getDescription(_.LogLevel.Warning,i)},{label:t.localize(5,null),level:_.LogLevel.Error,description:this.getDescription(_.LogLevel.Error,i)},{label:t.localize(6,null),level:_.LogLevel.Critical,description:this.getDescription(_.LogLevel.Critical,i)},{label:t.localize(7,null),level:_.LogLevel.Off,description:this.getDescription(_.LogLevel.Off,i)}];return this.quickInputService.pick(S,{placeHolder:t.localize(8,null),activeItem:S[this.logService.getLevel()]}).then(s=>{s&&this.logService.setLevel(s.level)})}getDescription(i,S){if(_.DEFAULT_LOG_LEVEL===i&&S===i)return t.localize(9,null);if(_.DEFAULT_LOG_LEVEL===i)return t.localize(10,null);if(S===i)return t.localize(11,null)}};C.ID="workbench.action.setLogLevel",C.LABEL=t.localize(0,null),C=Ee([W(2,A.IQuickInputService),W(3,_.ILogService)],C),e.SetLogLevelAction=C;let o=class extends f.Action{constructor(i,S,s,l,r,p){super(i,S);this.environmentService=s,this.fileService=l,this.quickInputService=r,this.editorService=p}async run(){const i=await this.quickInputService.pick(this.getSessions().then(S=>S.map((s,l)=>({id:s.toString(),label:(0,w.basename)(s),description:l===0?t.localize(13,null):void 0}))),{canPickMany:!1,placeHolder:t.localize(14,null)});if(i){const S=await this.quickInputService.pick(this.getLogFiles(k.URI.parse(i.id)).then(s=>s.map(l=>({id:l.toString(),label:(0,w.basename)(l)}))),{canPickMany:!1,placeHolder:t.localize(15,null)});if(S)return this.editorService.openEditor({resource:k.URI.parse(S.id),options:{pinned:!0}}).then(()=>{})}}async getSessions(){const i=k.URI.file(this.environmentService.logsPath).with({scheme:this.environmentService.logFile.scheme}),S=[i],s=await this.fileService.resolve((0,w.dirname)(i));return s.children&&S.push(...s.children.filter(l=>!(0,w.isEqual)(l.resource,i)&&l.isDirectory&&/^\d{8}T\d{6}$/.test(l.name)).sort().reverse().map(l=>l.resource)),S}async getLogFiles(i){const S=await this.fileService.resolve(i);return S.children?S.children.filter(s=>!s.isDirectory).map(s=>s.resource):[]}};o.ID="workbench.action.openSessionLogFile",o.LABEL=t.localize(12,null),o=Ee([W(2,I.IWorkbenchEnvironmentService),W(3,D.IFileService),W(4,A.IQuickInputService),W(5,v.IEditorService)],o),e.OpenWindowSessionLogFileAction=o}),define(ne[853],re([1,0,35,50,5,23,197,19,2195]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutputChannelModelService=e.AbstractOutputChannelModelService=e.IOutputChannelModelService=void 0,e.IOutputChannelModelService=(0,_.createDecorator)("outputChannelModelService");let w=class{constructor(o,c,i){this.outputLocation=o,this.fileService=c,this.instantiationService=i,this._outputDir=null}createOutputChannelModel(o,c,i,S){return S?this.instantiationService.createInstance(I.FileOutputChannelModel,c,i,S):this.instantiationService.createInstance(I.DelegatedOutputChannelModel,o,c,i,this.outputDir)}get outputDir(){return this._outputDir||(this._outputDir=this.fileService.createFolder(this.outputLocation).then(()=>this.outputLocation)),this._outputDir}};w=Ee([W(1,A.IFileService),W(2,_.IInstantiationService)],w),e.AbstractOutputChannelModelService=w;let v=class extends w{constructor(o,c,i){super((0,D.joinPath)((0,D.dirname)(c.logFile),(0,k.toLocalISOString)(new Date).replace(/-|:|\.\d+Z$/g,"")),i,o)}};v=Ee([W(0,_.IInstantiationService),W(1,f.IWorkbenchEnvironmentService),W(2,A.IFileService)],v),e.OutputChannelModelService=v,(0,t.registerSingleton)(e.IOutputChannelModelService,v)}),define(ne[2291],re([1,0,5,48,9,23,50,197,35,87,853]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutputChannelModelService=void 0;let C=class extends v.AbstractOutputChannelModelService{constructor(c,i,S,s){super(_.URI.file((0,f.join)(i.logsPath,`output_${s.windowId}_${(0,D.toLocalISOString)(new Date).replace(/-|:|\.\d+Z$/g,"")}`)),S,c)}};C=Ee([W(0,t.IInstantiationService),W(1,k.IWorkbenchEnvironmentService),W(2,A.IFileService),W(3,w.INativeHostService)],C),e.OutputChannelModelService=C,(0,I.registerSingleton)(v.IOutputChannelModelService,C)}),define(ne[854],re([1,0,77,10,11,60,30,6,2,18,9,89,1819,98,73,16,8,37,23,5,31,26,144,27,212,2103,776,570,2242,202,2245,50]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewElement=e.WebviewMessageChannels=void 0;var O;(function(L){L.onmessage="onmessage",L.didClickLink="did-click-link",L.didScroll="did-scroll",L.didFocus="did-focus",L.didBlur="did-blur",L.didLoad="did-load",L.didFind="did-find",L.doUpdateState="do-update-state",L.doReload="do-reload",L.setConfirmBeforeClose="set-confirm-before-close",L.loadResource="load-resource",L.loadLocalhost="load-localhost",L.webviewReady="webview-ready",L.wheel="did-scroll-wheel",L.fatalError="fatal-error",L.noCspFound="no-csp-found",L.didKeydown="did-keydown",L.didKeyup="did-keyup",L.didContextMenu="did-context-menu"})(O=e.WebviewMessageChannels||(e.WebviewMessageChannels={}));var x;(function(L){let M;(function(B){B[B.Initializing=0]="Initializing",B[B.Ready=1]="Ready"})(M=L.Type||(L.Type={}));class N{constructor(P){this.pendingMessages=P,this.type=0}}L.Initializing=N,L.Ready={type:1}})(x||(x={}));let F=class extends I.Disposable{constructor(M,N,B,P,V,z,U,H,K,G,q,Z,j,X,Y,$,J){super();this.options=N,this.extension=P,this.webviewThemeDataProvider=V,this._environmentService=G,this._fileService=q,this._logService=Z,this._remoteAuthorityResolverService=j,this._telemetryService=X,this._tunnelService=Y,this._accessibilityService=J,this._expectedServiceWorkerVersion=4,this._state=new x.Initializing([]),this._resourceLoadingCts=this._register(new k.CancellationTokenSource),this._focusDelayer=this._register(new _.ThrottledDelayer(50)),this._onDidHtmlChange=this._register(new D.Emitter),this.onDidHtmlChange=this._onDidHtmlChange.event,this._messageHandlers=new Map,this.checkImeCompletionState=!0,this._disposed=!1,this._onMissingCsp=this._register(new D.Emitter),this.onMissingCsp=this._onMissingCsp.event,this._onDidClickLink=this._register(new D.Emitter),this.onDidClickLink=this._onDidClickLink.event,this._onDidReload=this._register(new D.Emitter),this.onDidReload=this._onDidReload.event,this._onMessage=this._register(new D.Emitter),this.onMessage=this._onMessage.event,this._onDidScroll=this._register(new D.Emitter),this.onDidScroll=this._onDidScroll.event,this._onDidWheel=this._register(new D.Emitter),this.onDidWheel=this._onDidWheel.event,this._onDidUpdateState=this._register(new D.Emitter),this.onDidUpdateState=this._onDidUpdateState.event,this._onDidFocus=this._register(new D.Emitter),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new D.Emitter),this.onDidBlur=this._onDidBlur.event,this._onDidDispose=this._register(new D.Emitter),this.onDidDispose=this._onDidDispose.event,this._hasAlertedAboutMissingCsp=!1,this._hasFindResult=this._register(new D.Emitter),this.hasFindResult=this._hasFindResult.event,this._onDidStopFind=this._register(new D.Emitter),this.onDidStopFind=this._onDidStopFind.event,this.id=M,this.iframeId=(0,C.generateUuid)(),this.encodedWebviewOriginPromise=(0,m.parentOriginHash)(window.origin,this.iframeId).then(te=>this.encodedWebviewOrigin=te),this.content={html:"",options:B,state:void 0},this._portMappingManager=this._register(new d.WebviewPortMappingManager(()=>this.extension?.location,()=>this.content.options.portMapping||[],this._tunnelService)),this._element=this.createElement(N,B);const ee=this._register((0,f.addDisposableListener)(window,"message",te=>{if(!(!this.encodedWebviewOrigin||te?.data?.target!==this.iframeId)){if(te.origin!==this.webviewContentOrigin(this.encodedWebviewOrigin)){console.log(`Skipped renderer receiving message due to mismatched origins: ${te.origin} ${this.webviewContentOrigin}`);return}if(te.data.channel==="webview-ready"){if(this.messagePort)return;this._logService.debug(`Webview(${this.id}): webview ready`),this.messagePort=te.ports[0],this.messagePort.onmessage=se=>{const ie=this._messageHandlers.get(se.data.channel);if(!ie){console.log(`No handlers found for '${se.data.channel}'`);return}ie?.forEach(ce=>ce(se.data.data,se))},this.element?.classList.add("ready"),this._state.type===0&&this._state.pendingMessages.forEach(({channel:se,data:ie})=>this.doPostMessage(se,ie)),this._state=x.Ready,ee.dispose()}}}));this._register(this.on("no-csp-found",()=>{this.handleNoCspFound()})),this._register(this.on("did-click-link",te=>{this._onDidClickLink.fire(te)})),this._register(this.on("onmessage",te=>{this._onMessage.fire({message:te.message,transfer:te.transfer})})),this._register(this.on("did-scroll",te=>{this._onDidScroll.fire({scrollYPercentage:te})})),this._register(this.on("do-reload",()=>{this.reload()})),this._register(this.on("do-update-state",te=>{this.state=te,this._onDidUpdateState.fire(te)})),this._register(this.on("did-focus",()=>{this.handleFocusChange(!0)})),this._register(this.on("did-scroll-wheel",te=>{this._onDidWheel.fire(te)})),this._register(this.on("did-blur",()=>{this.handleFocusChange(!1)})),this._register(this.on("did-find",te=>{this._hasFindResult.fire(te)})),this._register(this.on("fatal-error",te=>{K.error((0,o.localize)(0,null,te.message))})),this._register(this.on("did-keydown",te=>{this.handleKeyEvent("keydown",te)})),this._register(this.on("did-keyup",te=>{this.handleKeyEvent("keyup",te)})),this._register(this.on("did-context-menu",te=>{if(!this.element||!this._contextKeyService)return;const se=this.element.getBoundingClientRect();U.showContextMenu({getActions:()=>{const ie=[],ce=H.createMenu(S.MenuId.WebviewContext,this._contextKeyService);return(0,i.createAndFillInContextMenuActions)(ce,void 0,ie),ce.dispose(),ie},getAnchor:()=>({x:se.x+te.clientX,y:se.y+te.clientY})})})),this._register(this.on("load-resource",async te=>{try{const se=(0,b.decodeAuthority)(te.authority),ie=v.URI.from({scheme:te.scheme,authority:se,path:decodeURIComponent(te.path),query:te.query?decodeURIComponent(te.query):te.query});this.loadResource(te.id,ie,te.ifNoneMatch)}catch{this._send("did-load-resource",{id:te.id,status:404,path:te.path})}})),this._register(this.on("load-localhost",te=>{this.localLocalhost(te.id,te.origin)})),this._register(D.Event.runAndSubscribe(V.onThemeDataChanged,()=>this.style())),this._register(J.onDidChangeReducedMotion(()=>this.style())),this._register(J.onDidChangeScreenReaderOptimized(()=>this.style())),this._confirmBeforeClose=z.getValue("window.confirmBeforeClose"),this._register(z.onDidChangeConfiguration(te=>{te.affectsConfiguration("window.confirmBeforeClose")&&(this._confirmBeforeClose=z.getValue("window.confirmBeforeClose"),this._send("set-confirm-before-close",this._confirmBeforeClose))})),N.enableFindWidget&&(this._webviewFindWidget=this._register($.createInstance(T.WebviewFindWidget,this)),this.styledFindWidget()),this.encodedWebviewOriginPromise.then(te=>{this._disposed||this.initElement(te,P,N)})}get platform(){return"browser"}get element(){return this._element}get isFocused(){return!(!this._focused||document.activeElement&&document.activeElement!==this.element)}dispose(){this._disposed=!0,this.element?.remove(),this._element=void 0,this.messagePort=void 0,this._onDidDispose.fire(),this._resourceLoadingCts.dispose(!0),super.dispose()}setContextKeyService(M){this._contextKeyService=M}postMessage(M,N){this._send("message",{message:M,transfer:N})}_send(M,N,B=[]){this._state.type===0?this._state.pendingMessages.push({channel:M,data:N,transferable:B}):this.doPostMessage(M,N,B)}createElement(M,N){const B=document.createElement("iframe");return B.name=this.id,B.className=`webview ${M.customClasses||""}`,B.sandbox.add("allow-scripts","allow-same-origin","allow-forms","allow-pointer-lock","allow-downloads"),t.isFirefox||B.setAttribute("allow","clipboard-read; clipboard-write;"),B.style.border="none",B.style.width="100%",B.style.height="100%",B.focus=()=>{this.doFocus()},B}initElement(M,N,B){const P={id:this.iframeId,swVersion:String(this._expectedServiceWorkerVersion),extensionId:N?.id.value??"",platform:this.platform,"vscode-resource-base-authority":b.webviewRootResourceAuthority,parentOrigin:window.origin};this._environmentService.remoteAuthority&&(P.remoteAuthority=this._environmentService.remoteAuthority),B.purpose&&(P.purpose=B.purpose);const V=new URLSearchParams(P).toString(),z=t.isFirefox?"index-no-csp.html":"index.html";this.element.setAttribute("src",`${this.webviewContentEndpoint(M)}/${z}?${V}`)}mountTo(M){!this.element||(this._webviewFindWidget&&M.appendChild(this._webviewFindWidget.getDomNode()),M.appendChild(this.element))}webviewContentEndpoint(M){const N=this._environmentService.webviewExternalEndpoint.replace("{{uuid}}",M);return N[N.length-1]==="/"?N.slice(0,N.length-1):N}webviewContentOrigin(M){const N=v.URI.parse(this.webviewContentEndpoint(M));return N.scheme+"://"+N.authority.toLowerCase()}doPostMessage(M,N,B=[]){this.element&&this.messagePort&&this.messagePort.postMessage({channel:M,args:N},B)}on(M,N){let B=this._messageHandlers.get(M);return B||(B=new Set,this._messageHandlers.set(M,B)),B.add(N),(0,I.toDisposable)(()=>{this._messageHandlers.get(M)?.delete(N)})}handleNoCspFound(){if(!this._hasAlertedAboutMissingCsp&&(this._hasAlertedAboutMissingCsp=!0,this.extension?.id)){this._environmentService.isExtensionDevelopment&&this._onMissingCsp.fire(this.extension.id);const M={extension:this.extension.id.value};this._telemetryService.publicLog2("webviewMissingCsp",M)}}reload(){this.doUpdateContent(this.content);const M=this._register(this.on("did-load",()=>{this._onDidReload.fire(),M.dispose()}))}set html(M){const N=this.rewriteVsCodeResourceUrls(M);this.doUpdateContent({html:N,options:this.content.options,state:this.content.state}),this._onDidHtmlChange.fire(M)}rewriteVsCodeResourceUrls(M){const N=this.extension?.location?.scheme===w.Schemas.vscodeRemote,B=this.extension?.location?.scheme===w.Schemas.vscodeRemote?this.extension.location.authority:void 0;return M.replace(/(["'])(?:vscode-resource):(\/\/([^\s\/'"]+?)(?=\/))?([^\s'"]+?)(["'])/gi,(P,V,z,U,H,K)=>{const G=v.URI.from({scheme:U||"file",path:decodeURIComponent(H)}),q=(0,b.asWebviewUri)(G,{isRemote:N,authority:B}).toString();return`${V}${q}${K}`}).replace(/(["'])(?:vscode-webview-resource):(\/\/[^\s\/'"]+\/([^\s\/'"]+?)(?=\/))?([^\s'"]+?)(["'])/gi,(P,V,z,U,H,K)=>{const G=v.URI.from({scheme:U||"file",path:decodeURIComponent(H)}),q=(0,b.asWebviewUri)(G,{isRemote:N,authority:B}).toString();return`${V}${q}${K}`})}set contentOptions(M){if(this._logService.debug(`Webview(${this.id}): will update content options`),(0,y.areWebviewContentOptionsEqual)(M,this.content.options)){this._logService.debug(`Webview(${this.id}): skipping content options update`);return}this.doUpdateContent({html:this.content.html,options:M,state:this.content.state})}set localResourcesRoot(M){this.content={...this.content,options:{...this.content.options,localResourceRoots:M}}}set state(M){this.content={html:this.content.html,options:this.content.options,state:M}}set initialScrollProgress(M){this._send("initial-scroll-position",M)}doUpdateContent(M){this._logService.debug(`Webview(${this.id}): will update content`),this.content=M;const N=!!this.content.options.allowScripts;this._send("content",{contents:this.content.html,options:{allowMultipleAPIAcquire:!!this.content.options.allowMultipleAPIAcquire,allowScripts:N,allowForms:this.content.options.allowForms??N},state:this.content.state,cspSource:b.webviewGenericCspSource,confirmBeforeClose:this._confirmBeforeClose})}style(){let{styles:M,activeTheme:N,themeLabel:B}=this.webviewThemeDataProvider.getWebviewThemeData();this.options.transformCssVariables&&(M=this.options.transformCssVariables(M));const P=this._accessibilityService.isMotionReduced(),V=this._accessibilityService.isScreenReaderOptimized();this._send("styles",{styles:M,activeTheme:N,themeName:B,reduceMotion:P,screenReader:V}),this.styledFindWidget()}styledFindWidget(){this._webviewFindWidget?.updateTheme(this.webviewThemeDataProvider.getTheme())}handleFocusChange(M){this._focused=M,M?this._onDidFocus.fire():this._onDidBlur.fire()}handleKeyEvent(M,N){const B=new KeyboardEvent(M,N);Object.defineProperty(B,"target",{get:()=>this.element}),window.dispatchEvent(B)}windowDidDragStart(){this.element&&(this.element.style.pointerEvents="none")}windowDidDragEnd(){this.element&&(this.element.style.pointerEvents="")}selectAll(){this.execCommand("selectAll")}copy(){this.execCommand("copy")}paste(){this.execCommand("paste")}cut(){this.execCommand("cut")}undo(){this.execCommand("undo")}redo(){this.execCommand("redo")}execCommand(M){this.element&&this._send("execCommand",M)}async loadResource(M,N,B){try{const P=await(0,E.loadLocalResource)(N,{ifNoneMatch:B,roots:this.content.options.localResourceRoots||[]},this._fileService,this._logService,this._resourceLoadingCts.token);switch(P.type){case E.WebviewResourceResponse.Type.Success:{const V=await this.streamToBuffer(P.stream);return this._send("did-load-resource",{id:M,status:200,path:N.path,mime:P.mimeType,data:V,etag:P.etag,mtime:P.mtime},[V])}case E.WebviewResourceResponse.Type.NotModified:return this._send("did-load-resource",{id:M,status:304,path:N.path,mime:P.mimeType,mtime:P.mtime});case E.WebviewResourceResponse.Type.AccessDenied:return this._send("did-load-resource",{id:M,status:401,path:N.path})}}catch{}return this._send("did-load-resource",{id:M,status:404,path:N.path})}async streamToBuffer(M){return(await(0,A.streamToBuffer)(M)).buffer.buffer}async localLocalhost(M,N){const B=this._environmentService.remoteAuthority,P=B?await this._remoteAuthorityResolverService.resolveAuthority(B):void 0,V=P?await this._portMappingManager.getRedirect(P.authority,N):void 0;return this._send("did-load-localhost",{id:M,origin:N,location:V})}focus(){this.doFocus(),this.handleFocusChange(!0)}doFocus(){if(!!this.element){try{this.element.contentWindow?.focus()}catch{}this._focusDelayer.trigger(async()=>{!this.isFocused||!this.element||document.activeElement&&document.activeElement!==this.element&&document.activeElement?.tagName!=="BODY"||this._send("focus")})}}find(M,N){!this.element||this._send("find",{value:M,previous:N})}updateFind(M){!M||!this.element||this._send("find",{value:M})}stopFind(M){!this.element||(this._send("find-stop",{keepSelection:M}),this._onDidStopFind.fire())}showFind(){this._webviewFindWidget?.reveal()}hideFind(){this._webviewFindWidget?.hide()}runFindAction(M){this._webviewFindWidget?.find(M)}};F=Ee([W(5,s.IConfigurationService),W(6,l.IContextMenuService),W(7,S.IMenuService),W(8,a.INotificationService),W(9,R.IWorkbenchEnvironmentService),W(10,r.IFileService),W(11,u.ILogService),W(12,n.IRemoteAuthorityResolverService),W(13,h.ITelemetryService),W(14,g.ITunnelService),W(15,p.IInstantiationService),W(16,c.IAccessibilityService)],F),e.WebviewElement=F}),define(ne[2292],re([1,0,6,2,5,2243,854,2244]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewService=void 0;let I=class extends f.Disposable{constructor(v){super();this._instantiationService=v,this._webviews=new Set,this._onDidChangeActiveWebview=this._register(new t.Emitter),this.onDidChangeActiveWebview=this._onDidChangeActiveWebview.event,this._webviewThemeDataProvider=this._instantiationService.createInstance(A.WebviewThemeDataProvider)}get activeWebview(){return this._activeWebview}updateActiveWebview(v){v!==this._activeWebview&&(this._activeWebview=v,this._onDidChangeActiveWebview.fire(v))}get webviews(){return this._webviews.values()}createWebviewElement(v,C,o,c){const i=this._instantiationService.createInstance(k.WebviewElement,v,C,o,c,this._webviewThemeDataProvider);return this.registerNewWebview(i),i}createWebviewOverlay(v,C,o,c){const i=this._instantiationService.createInstance(D.OverlayWebview,v,C,o,c);return this.registerNewWebview(i),i}registerNewWebview(v){this._webviews.add(v),v.onDidFocus(()=>{this.updateActiveWebview(v)});const C=()=>{this._activeWebview===v&&this.updateActiveWebview(void 0)};v.onDidBlur(C),v.onDidDispose(()=>{C(),this._webviews.delete(v)})}};I=Ee([W(0,_.IInstantiationService)],I),e.WebviewService=I}),define(ne[2293],re([1,0,11,18,206,171,98,16,8,37,23,5,103,31,87,26,144,27,212,854,2246,50]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElectronWebviewElement=void 0;let n=class extends p.WebviewElement{constructor(g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U){super(g,d,m,b,E,N,y,L,P,x,R,M,F,O,T,z,U);this.nativeHostService=V,this._findStarted=!1,this._iframeDelayer=this._register(new t.Delayer(200)),this._webviewKeyboardHandler=new u.WindowIgnoreMenuShortcutsManager(N,B,V),this._webviewMainService=A.ProxyChannel.toService(B.getChannel("webview")),this._register(this.on("did-focus",()=>{this._webviewKeyboardHandler.didFocus()})),this._register(this.on("did-blur",()=>{this._webviewKeyboardHandler.didBlur()})),d.enableFindWidget&&(this._register(this.onDidHtmlChange(H=>{this._findStarted&&this._cachedHtmlContent!==H&&(this.stopFind(!1),this._cachedHtmlContent=H)})),this._register(this._webviewMainService.onFoundInFrame(H=>{this._hasFindResult.fire(H.matches>0)})))}get platform(){return"electron"}webviewContentEndpoint(g){return`${f.Schemas.vscodeWebview}://${g}`}streamToBuffer(g){return(0,_.consumeStream)(g,d=>{const m=d.reduce((T,R)=>T+R.byteLength,0),b=new ArrayBuffer(m),E=new Uint8Array(b);let y=0;for(const T of d)E.set(T.buffer,y),y+=T.byteLength;return b})}find(g,d){if(!!this.element)if(!this._findStarted)this.updateFind(g);else{const m={forward:!d,findNext:!1,matchCase:!1};this._webviewMainService.findInFrame({windowId:this.nativeHostService.windowId},this.id,g,m)}}updateFind(g){if(!g||!this.element)return;const d={forward:!0,findNext:!0,matchCase:!1};this._iframeDelayer.trigger(()=>{this._findStarted=!0,this._webviewMainService.findInFrame({windowId:this.nativeHostService.windowId},this.id,g,d)})}stopFind(g){!this.element||(this._iframeDelayer.cancel(),this._findStarted=!1,this._webviewMainService.stopFindInFrame({windowId:this.nativeHostService.windowId},this.id,{keepSelection:g}),this._onDidStopFind.fire())}};n=Ee([W(5,w.IContextMenuService),W(6,r.ITunnelService),W(7,v.IFileService),W(8,l.ITelemetryService),W(9,a.IWorkbenchEnvironmentService),W(10,s.IRemoteAuthorityResolverService),W(11,D.IMenuService),W(12,c.ILogService),W(13,I.IConfigurationService),W(14,o.IMainProcessService),W(15,S.INotificationService),W(16,i.INativeHostService),W(17,C.IInstantiationService),W(18,k.IAccessibilityService)],n),e.ElectronWebviewElement=n}),define(ne[2294],re([1,0,2292,2293]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElectronWebviewService=void 0;class _ extends t.WebviewService{createWebviewElement(k,D,I,w){const v=this._instantiationService.createInstance(f.ElectronWebviewElement,k,D,I,w,this._webviewThemeDataProvider);return this.registerNewWebview(v),v}}e.ElectronWebviewService=_}),define(ne[2295],re([1,0,14,50]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0});function _(A){const k=t.isWeb&&!A.get(f.IWorkbenchEnvironmentService).remoteAuthority;return` ## Interactive Editor Playground The core editor in VS Code is packed with features. This page highlights a number of them and lets you interactively try them out through the use of a number of embedded editors. For full details on the editor features for VS Code and more head over to our [documentation](command:workbench.action.openDocumentationUrl). * [Multi-cursor Editing](#multi-cursor-editing) - block selection, select all occurrences, add additional cursors and more. * [IntelliSense](#intellisense) - get code assistance and parameter suggestions for your code and external modules. * [Line Actions](#line-actions) - quickly move lines around to re-order your code.${k?"":` * [Rename Refactoring](#rename-refactoring) - quickly rename symbols across your code base.`} * [Formatting](#formatting) - keep your code looking great with inbuilt document & selection formatting. * [Code Folding](#code-folding) - focus on the most relevant parts of your code by folding other areas. * [Errors and Warnings](#errors-and-warnings) - see errors and warning as you type. * [Snippets](#snippets) - spend less time typing with snippets. * [Emmet](#emmet) - integrated Emmet support takes HTML and CSS editing to the next level. * [JavaScript Type Checking](#javascript-type-checking) - perform type checking on your JavaScript file using TypeScript with zero configuration. ### Multi-Cursor Editing Using multiple cursors allows you to edit multiple parts of the document at once, greatly improving your productivity. Try the following actions in the code block below: 1. Box Selection - press <span class="mac-only windows-only">any combination of kb(cursorColumnSelectDown), kb(cursorColumnSelectRight), kb(cursorColumnSelectUp), kb(cursorColumnSelectLeft) to select a block of text. You can also press</span> <span class="shortcut mac-only">|\u21E7\u2325|</span><span class="shortcut windows-only linux-only">|Shift+Alt|</span> while selecting text with the mouse or drag-select using the middle mouse button. 2. Add a cursor - press kb(editor.action.insertCursorAbove) to add a new cursor above, or kb(editor.action.insertCursorBelow) to add a new cursor below. You can also use your mouse with <span class="shortcut"><span class="multi-cursor-modifier"></span>+Click</span> to add a cursor anywhere. 3. Create cursors on all occurrences of a string - select one instance of a string e.g. |background-color| and press kb(editor.action.selectHighlights). Now you can replace all instances by simply typing. That is the tip of the iceberg for multi-cursor editing. Have a look at the selection menu and our handy [keyboard reference guide](command:workbench.action.keybindingsReference) for additional actions. |||css #p1 {background-color: #ff0000;} /* red in HEX format */ #p2 {background-color: hsl(120, 100%, 50%);} /* green in HSL format */ #p3 {background-color: rgba(0, 4, 255, 0.733);} /* blue with alpha channel in RGBA format */ ||| > **CSS Tip:** you may have noticed in the example above we also provide color swatches inline for CSS, additionally if you hover over an element such as |#p1| we will show how this is represented in HTML. These swatches also act as color pickers that allow you to easily change a color value. A simple example of some language-specific editor features. ### IntelliSense Visual Studio Code comes with the powerful IntelliSense for JavaScript and TypeScript pre-installed. In the below example, position the text cursor right after the dot and press kb(editor.action.triggerSuggest) to invoke IntelliSense. Notice how the suggestions come from the Canvas API. |||js const canvas = document.querySelector('canvas'); const context = canvas.getContext('2d'); context.strokeStyle = 'blue'; context. ||| >**Tip:** while we ship JavaScript and TypeScript support out of the box other languages can be upgraded with better IntelliSense through one of the many [extensions](command:workbench.extensions.action.showPopularExtensions). ### Line Actions Since it's very common to work with the entire text in a line we provide a set of useful shortcuts to help with this. 1. <span class="mac-only windows-only">Copy a line and insert it above or below the current position with kb(editor.action.copyLinesDownAction) or kb(editor.action.copyLinesUpAction) respectively.</span><span class="linux-only">Copy the entire current line when no text is selected with kb(editor.action.clipboardCopyAction).</span> 2. Move an entire line or selection of lines up or down with kb(editor.action.moveLinesUpAction) and kb(editor.action.moveLinesDownAction) respectively. 3. Delete the entire line with kb(editor.action.deleteLines). |||json { "name": "John", "age": 31, "city": "New York" } ||| >**Tip:** Another very common task is to comment out a block of code - you can toggle commenting by pressing kb(editor.action.commentLine). ${k?"":` ### Rename Refactoring It's easy to rename a symbol such as a function name or variable name. Hit kb(editor.action.rename) while in the symbol |Book| to rename all instances - this will occur across all files in a project. You also have |Rename Symbol| in the right-click context menu. |||js // Reference the function new Book("War of the Worlds", "H G Wells"); new Book("The Martian", "Andy Weir"); /** * Represents a book. * * @param {string} title Title of the book * @param {string} author Who wrote the book */ function Book(title, author) { this.title = title; this.author = author; } ||| > **JSDoc Tip:** VS Code's IntelliSense uses JSDoc comments to provide richer suggestions. The types and documentation from JSDoc comments show up when you hover over a reference to |Book| or in IntelliSense when you create a new instance of |Book|. `} ### Formatting Keeping your code looking great is hard without a good formatter. Luckily it's easy to format content, either for the entire document with kb(editor.action.formatDocument) or for the current selection with kb(editor.action.formatSelection). Both of these options are also available through the right-click context menu. |||js const cars = ["\u{1F697}", "\u{1F699}", "\u{1F695}"]; for (const car of cars){ // Drive the car console.log(|This is the car \${car}|); } ||| >**Tip:** Additional formatters are available in the [extension gallery](command:workbench.extensions.action.showPopularExtensions). Formatting support can also be configured via [settings](command:workbench.action.openGlobalSettings) e.g. enabling |editor.formatOnSave|. ### Code Folding In a large file it can often be useful to collapse sections of code to increase readability. To do this, you can simply press kb(editor.fold) to fold or press kb(editor.unfold) to unfold the ranges at the current cursor position. Folding can also be done with the down and right angle bracket icons in the left gutter. To fold all sections use kb(editor.foldAll) or to unfold all use kb(editor.unfoldAll). |||html <div> <header> <ul> <li><a href=""></a></li> <li><a href=""></a></li> </ul> </header> <footer> <p></p> </footer> </div> ||| >**Tip:** Folding is based on indentation and as a result can apply to all languages. Simply indent your code to create a foldable section you can fold a certain number of levels with shortcuts like kb(editor.foldLevel1) through to kb(editor.foldLevel5). ### Errors and Warnings Errors and warnings are highlighted as you edit your code with squiggles. In the sample below you can see a number of syntax errors. By pressing kb(editor.action.marker.nextInFiles) you can navigate across them in sequence and see the detailed error message. As you correct them the squiggles and scrollbar indicators will update. |||js // This code has a few syntax errors Console.log(add(1, 1.5)); function Add(a, b) return a + b; } ||| ### Snippets You can greatly accelerate your editing through the use of snippets. Simply start typing |try| and select |trycatch| from the suggestion list and press kb(insertSnippet) to create a |try|->|catch| block. Your cursor will be placed on the text |error| for easy editing. If more than one parameter exists then press kb(jumpToNextSnippetPlaceholder) to jump to it. |||js ||| >**Tip:** the [extension gallery](command:workbench.extensions.action.showPopularExtensions) includes snippets for almost every framework and language imaginable. You can also create your own [user-defined snippets](command:workbench.action.openSnippets). ### Emmet Emmet takes the snippets idea to a whole new level: you can type CSS-like expressions that can be dynamically parsed, and produce output depending on what you type in the abbreviation. Try it by selecting |Emmet: Expand Abbreviation| from the |Edit| menu with the cursor at the end of a valid Emmet abbreviation or snippet and the expansion will occur. |||html ul>li.item$*5 ||| >**Tip:** The [Emmet cheat sheet](https://docs.emmet.io/cheat-sheet/) is a great source of Emmet syntax suggestions. To expand Emmet abbreviations and snippets using the |tab| key use the |emmet.triggerExpansionOnTab| [setting](command:workbench.action.openGlobalSettings). Check out the docs on [Emmet in VS Code](https://code.visualstudio.com/docs/editor/emmet) to learn more. ### JavaScript Type Checking Sometimes type checking your JavaScript code can help you spot mistakes you might have not caught otherwise. You can run the TypeScript type checker against your existing JavaScript code by simply adding a |// @ts-check| comment to the top of your file. |||js // @ts-nocheck let easy = true; easy = 42; ||| >**Tip:** You can also enable the checks workspace or application wide by adding |"js/ts.implicitProjectConfig.checkJs": true| to your workspace or user settings and explicitly ignoring files or lines using |// @ts-nocheck| and |// @ts-expect-error|. Check out the docs on [JavaScript in VS Code](https://code.visualstudio.com/docs/languages/javascript) to learn more. ## Thanks! Well if you have got this far then you will have touched on some of the editing features in Visual Studio Code. But don't stop now :) We have lots of additional [documentation](https://code.visualstudio.com/docs), [introductory videos](https://code.visualstudio.com/docs/getstarted/introvideos) and [tips and tricks](https://go.microsoft.com/fwlink/?linkid=852118) for the product that will help you learn how to use it. And while you are here, here are a few additional things you can try: - Open the Integrated Terminal by pressing kb(workbench.action.terminal.toggleTerminal), then see what's possible by [reviewing the terminal documentation](https://code.visualstudio.com/docs/editor/integrated-terminal) - Work with version control by pressing kb(workbench.view.scm). Understand how to stage, commit, change branches, and view diffs and more by reviewing the [version control documentation](https://code.visualstudio.com/docs/editor/versioncontrol) - Browse thousands of extensions in our integrated gallery by pressing kb(workbench.view.extensions). The [documentation](https://code.visualstudio.com/docs/editor/extension-gallery) will show you how to see the most popular extensions, disable installed ones and more. That's all for now, Happy Coding! \u{1F389} `.replace(/\|/g,"`")}e.default=_}),define(ne[2296],re([1,0,1837,21,36,5,601,18,132,2295]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorWalkThroughInputSerializer=e.EditorWalkThroughAction=void 0;const w="workbench.editors.walkThroughInput",v={typeId:w,name:(0,t.localize)(0,null),resource:D.FileAccess.asBrowserUri("./vs_code_editor_walkthrough.md",Q).with({scheme:D.Schemas.walkThrough,query:JSON.stringify({moduleId:"vs/workbench/contrib/welcomeWalkthrough/browser/editor/vs_code_editor_walkthrough"})}),telemetryFrom:"walkThrough"};let C=class extends _.Action{constructor(i,S,s,l){super(i,S);this.editorService=s,this.instantiationService=l}run(){const i=this.instantiationService.createInstance(k.WalkThroughInput,v);return this.editorService.openEditor(i,{pinned:!0,override:I.EditorResolution.DISABLED}).then(()=>{})}};C.ID="workbench.action.showInteractivePlayground",C.LABEL=(0,t.localize)(1,null),C=Ee([W(2,f.IEditorService),W(3,A.IInstantiationService)],C),e.EditorWalkThroughAction=C;class o{canSerialize(i){return!0}serialize(i){return""}deserialize(i){return i.createInstance(k.WalkThroughInput,v)}}e.EditorWalkThroughInputSerializer=o,o.ID=w}),define(ne[121],re([1,0,85,5,1933,110,9,18,48]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeWorkbenchEnvironmentService=e.INativeWorkbenchEnvironmentService=void 0,e.INativeWorkbenchEnvironmentService=(0,f.refineServiceDecorator)(t.IEnvironmentService);class w extends _.AbstractNativeEnvironmentService{constructor(C,o){super(C,{homeDir:C.homeDir,tmpDir:C.tmpDir,userDataDir:C.userDataDir},o);this.configuration=C}get mainPid(){return this.configuration.mainPid}get machineId(){return this.configuration.machineId}get remoteAuthority(){return this.configuration.remoteAuthority}get execPath(){return this.configuration.execPath}get backupPath(){return this.configuration.backupPath}get window(){return{id:this.configuration.windowId,colorScheme:this.configuration.colorScheme,maximized:this.configuration.maximized,accessibilitySupport:this.configuration.accessibilitySupport,perfMarks:this.configuration.perfMarks,isInitialStartup:this.configuration.isInitialStartup,isCodeCaching:typeof this.configuration.codeCachePath=="string"}}get userRoamingDataHome(){return this.appSettingsHome.with({scheme:D.Schemas.vscodeUserData})}get logFile(){return k.URI.file((0,I.join)(this.logsPath,`renderer${this.configuration.windowId}.log`))}get extHostLogsPath(){return k.URI.file((0,I.join)(this.logsPath,`exthost${this.configuration.windowId}`))}get webviewExternalEndpoint(){return`${D.Schemas.vscodeWebview}://{{uuid}}`}get skipReleaseNotes(){return!!this.args["skip-release-notes"]}get skipWelcome(){return!!this.args["skip-welcome"]}get logExtensionHostCommunication(){return!!this.args.logExtensionHostCommunication}get extensionEnabledProposedApi(){if(Array.isArray(this.args["enable-proposed-api"]))return this.args["enable-proposed-api"];if("enable-proposed-api"in this.args)return[]}get os(){return this.configuration.os}get filesToOpenOrCreate(){return this.configuration.filesToOpenOrCreate}get filesToDiff(){return this.configuration.filesToDiff}get filesToWait(){return this.configuration.filesToWait}}Ee([A.memoize],w.prototype,"mainPid",null),Ee([A.memoize],w.prototype,"machineId",null),Ee([A.memoize],w.prototype,"remoteAuthority",null),Ee([A.memoize],w.prototype,"execPath",null),Ee([A.memoize],w.prototype,"backupPath",null),Ee([A.memoize],w.prototype,"window",null),Ee([A.memoize],w.prototype,"userRoamingDataHome",null),Ee([A.memoize],w.prototype,"logFile",null),Ee([A.memoize],w.prototype,"extHostLogsPath",null),Ee([A.memoize],w.prototype,"webviewExternalEndpoint",null),Ee([A.memoize],w.prototype,"skipReleaseNotes",null),Ee([A.memoize],w.prototype,"skipWelcome",null),Ee([A.memoize],w.prototype,"logExtensionHostCommunication",null),Ee([A.memoize],w.prototype,"extensionEnabledProposedApi",null),Ee([A.memoize],w.prototype,"os",null),Ee([A.memoize],w.prototype,"filesToOpenOrCreate",null),Ee([A.memoize],w.prototype,"filesToDiff",null),Ee([A.memoize],w.prototype,"filesToWait",null),e.NativeWorkbenchEnvironmentService=w}),define(ne[2297],re([1,0,1564,23,9,121,87,18,16,79]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenExtensionsFolderAction=void 0;class v extends I.Action2{constructor(){super({id:"workbench.extensions.action.openExtensionsFolder",title:{value:(0,t.localize)(0,null),original:"Open Extensions Folder"},category:w.ExtensionsLocalizedLabel,f1:!0})}async run(o){const c=o.get(k.INativeHostService),i=o.get(f.IFileService),S=o.get(A.INativeWorkbenchEnvironmentService),s=_.URI.file(S.extensionsPath),l=await i.resolve(s);let r;if(l.children&&l.children.length>0?r=l.children[0].resource:r=s,r.scheme===D.Schemas.file)return c.showItemInFolder(r.fsPath)}}e.OpenExtensionsFolderAction=v}),define(ne[855],re([1,0,46,36,9,5,1566,30,187,19,54,81,41,87,121,467,23,60]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createSlowExtensionAction=e.SlowExtensionAction=void 0;class r{static fromExtension(g){let d;if(g.bugs&&typeof g.bugs.url=="string"){const m=_.URI.parse(g.bugs.url),b=/\/([^/]+)\/([^/]+)\/issues\/?$/.exec(g.bugs.url);b&&(d={base:m.with({path:null,fragment:null,query:null}).toString(!0),owner:b[1],repo:b[2]})}if(!d&&g.repository&&typeof g.repository.url=="string"){const m=_.URI.parse(g.repository.url),b=/\/([^/]+)\/([^/]+)(\.git)?$/.exec(g.repository.url);b&&(d={base:m.with({path:null,fragment:null,query:null}).toString(!0),owner:b[1],repo:b[2]})}return d&&d.base.indexOf("github")===-1&&(d=void 0),d}}let p=class extends f.Action{constructor(g,d,m){super("report.slow",(0,k.localize)(0,null),"extension-action report-issue");this.extension=g,this.profile=d,this._instantiationService=m,this.enabled=Boolean(r.fromExtension(g))}async run(){const g=await this._instantiationService.invokeFunction(u,this.extension,this.profile);g&&await g.run()}};p=Ee([W(2,A.IInstantiationService)],p),e.SlowExtensionAction=p;async function u(h,g,d){const m=r.fromExtension(g);if(!m)return;const b=h.get(I.IRequestService),E=h.get(A.IInstantiationService),y=`https://api.github.com/search/issues?q=is:issue+state:open+in:title+repo:${m.owner}/${m.repo}+%22Extension+causes+high+cpu+load%22`,T=await b.request({url:y},D.CancellationToken.None),R=await(0,I.asText)(T);if(!R)return;const O=JSON.parse(R);if(!(!O||typeof O.total_count!="number"))return O.total_count===0?E.createInstance(a,g,m,d):E.createInstance(n,g,m,d)}e.createSlowExtensionAction=u;let a=class extends f.Action{constructor(g,d,m,b,E,y,T,R,O){super("report.slow",(0,k.localize)(1,null));this.extension=g,this.repoInfo=d,this.profile=m,this._dialogService=b,this._openerService=E,this._productService=y,this._nativeHostService=T,this._environmentService=R,this._fileService=O}async run(){const g=S.Utils.rewriteAbsolutePaths(this.profile.data,"pii_removed"),d=(0,w.joinPath)(this._environmentService.tmpDir,`${this.extension.identifier.value}-unresponsive.cpuprofile.txt`);await this._fileService.writeFile(d,l.VSBuffer.fromString(JSON.stringify(g,void 0,4)));const m=await this._nativeHostService.getOSProperties(),b=encodeURIComponent("Extension causes high cpu load"),E=`${m.type} ${m.arch} ${m.release}`,y=`:warning: Make sure to **attach** this file from your *home*-directory: :warning:\`${d}\` Find more details here: https://github.com/microsoft/vscode/wiki/Explain-extension-causes-high-cpu-load`,T=encodeURIComponent(`- Issue Type: \`Performance\` - Extension Name: \`${this.extension.name}\` - Extension Version: \`${this.extension.version}\` - OS Version: \`${E}\` - VS Code version: \`${this._productService.version}\` ${y}`),R=`${this.repoInfo.base}/${this.repoInfo.owner}/${this.repoInfo.repo}/issues/new/?body=${T}&title=${b}`;this._openerService.open(_.URI.parse(R)),this._dialogService.show(C.default.Info,(0,k.localize)(2,null),void 0,{detail:(0,k.localize)(3,null,d.fsPath)})}};a=Ee([W(3,v.IDialogService),W(4,o.IOpenerService),W(5,t.IProductService),W(6,c.INativeHostService),W(7,i.INativeWorkbenchEnvironmentService),W(8,s.IFileService)],a);let n=class extends f.Action{constructor(g,d,m,b,E,y,T){super("show.slow",(0,k.localize)(4,null));this.extension=g,this.repoInfo=d,this.profile=m,this._dialogService=b,this._openerService=E,this._environmentService=y,this._fileService=T}async run(){const g=S.Utils.rewriteAbsolutePaths(this.profile.data,"pii_removed"),d=(0,w.joinPath)(this._environmentService.tmpDir,`${this.extension.identifier.value}-unresponsive.cpuprofile.txt`);await this._fileService.writeFile(d,l.VSBuffer.fromString(JSON.stringify(g,void 0,4)));const m=`${this.repoInfo.base}/${this.repoInfo.owner}/${this.repoInfo.repo}/issues?utf8=\u2713&q=is%3Aissue+state%3Aopen+%22Extension+causes+high+cpu+load%22`;this._openerService.open(_.URI.parse(m)),this._dialogService.show(C.default.Info,(0,k.localize)(5,null),void 0,{detail:(0,k.localize)(6,null,d.fsPath)})}};n=Ee([W(3,v.IDialogService),W(4,o.IOpenerService),W(5,i.INativeWorkbenchEnvironmentService),W(6,s.IFileService)],n)}),define(ne[2298],re([1,0,36,48,9,1615,87,121,23]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenExtensionLogsFolderAction=e.OpenLogsFolderAction=void 0;let w=class extends t.Action{constructor(o,c,i,S){super(o,c);this.environmentService=i,this.nativeHostService=S}run(){return this.nativeHostService.showItemInFolder(_.URI.file((0,f.join)(this.environmentService.logsPath,"main.log")).fsPath)}};w.ID="workbench.action.openLogsFolder",w.LABEL=A.localize(0,null),w=Ee([W(2,D.INativeWorkbenchEnvironmentService),W(3,k.INativeHostService)],w),e.OpenLogsFolderAction=w;let v=class extends t.Action{constructor(o,c,i,S,s){super(o,c);this.environmentSerice=i,this.fileService=S,this.nativeHostService=s}async run(){const o=await this.fileService.resolve(this.environmentSerice.extHostLogsPath);if(o.children&&o.children[0])return this.nativeHostService.showItemInFolder(o.children[0].resource.fsPath)}};v.ID="workbench.action.openExtensionLogsFolder",v.LABEL=A.localize(1,null),v=Ee([W(2,D.INativeWorkbenchEnvironmentService),W(3,I.IFileService),W(4,k.INativeHostService)],v),e.OpenExtensionLogsFolderAction=v}),define(ne[499],re([1,0,5,207,35]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShellEnvironmentService=e.IShellEnvironmentService=void 0,e.IShellEnvironmentService=(0,t.createDecorator)("shellEnvironmentService");class A{getShellEnv(){return f.process.shellEnv()}}e.ShellEnvironmentService=A,(0,_.registerSingleton)(e.IShellEnvironmentService,A)}),define(ne[2299],re([1,0,107,14,50,56,35,100,18,722]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BuiltinExtensionsScannerService=void 0;let v=class{constructor(o,c){if(this.builtinExtensions=[],f.isWeb){const i=I.FileAccess.asBrowserUri("../../../../../../extensions",Q);if(i){let S=[];if(o.isBuilt)S=[];else{const s=document.getElementById("vscode-workbench-builtin-extensions"),l=s?s.getAttribute("data-settings"):void 0;if(l)try{S=JSON.parse(l)}catch{}}this.builtinExtensions=S.map(s=>({identifier:{id:(0,D.getGalleryExtensionId)(s.packageJSON.publisher,s.packageJSON.name)},location:c.extUri.joinPath(i,s.extensionPath),type:0,isBuiltin:!0,manifest:s.packageNLS?(0,w.localizeManifest)(s.packageJSON,s.packageNLS):s.packageJSON,readmeUrl:s.readmePath?c.extUri.joinPath(i,s.readmePath):void 0,changelogUrl:s.changelogPath?c.extUri.joinPath(i,s.changelogPath):void 0,targetPlatform:"web"}))}}}async scanBuiltinExtensions(){return[...this.builtinExtensions]}};v=Ee([W(0,_.IWorkbenchEnvironmentService),W(1,A.IUriIdentityService)],v),e.BuiltinExtensionsScannerService=v,(0,k.registerSingleton)(t.IBuiltinExtensionsScannerService,v)}),define(ne[115],re([1,0,5,79,18]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWebExtensionsScannerService=e.IWorkbenchExtensionEnablementService=e.EnablementState=e.IWorkbenchExtensionManagementService=e.DefaultIconPath=e.IExtensionManagementServerService=e.ExtensionInstallLocation=void 0;var A;(function(D){D[D.Local=1]="Local",D[D.Remote=2]="Remote",D[D.Web=3]="Web"})(A=e.ExtensionInstallLocation||(e.ExtensionInstallLocation={})),e.IExtensionManagementServerService=(0,t.createDecorator)("extensionManagementServerService"),e.DefaultIconPath=_.FileAccess.asBrowserUri("./media/defaultIcon.png",Q).toString(!0),e.IWorkbenchExtensionManagementService=(0,t.refineServiceDecorator)(f.IExtensionManagementService);var k;(function(D){D[D.DisabledByTrustRequirement=0]="DisabledByTrustRequirement",D[D.DisabledByExtensionKind=1]="DisabledByExtensionKind",D[D.DisabledByEnvironment=2]="DisabledByEnvironment",D[D.EnabledByEnvironment=3]="EnabledByEnvironment",D[D.DisabledByVirtualWorkspace=4]="DisabledByVirtualWorkspace",D[D.DisabledByExtensionDependency=5]="DisabledByExtensionDependency",D[D.DisabledGlobally=6]="DisabledGlobally",D[D.DisabledWorkspace=7]="DisabledWorkspace",D[D.EnabledGlobally=8]="EnabledGlobally",D[D.EnabledWorkspace=9]="EnabledWorkspace"})(k=e.EnablementState||(e.EnablementState={})),e.IWorkbenchExtensionEnablementService=(0,t.createDecorator)("extensionEnablementService"),e.IWebExtensionsScannerService=(0,t.createDecorator)("IWebExtensionsScannerService")}),define(ne[2300],re([1,0,79,311,1978,31,115]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnsupportedExtensionsMigrationContrib=void 0;let D=class{constructor(w,v,C,o,c){w.remoteExtensionManagementServer&&(0,_.migrateUnsupportedExtensions)(w.remoteExtensionManagementServer.extensionManagementService,v,C,o,c),w.webExtensionManagementServer&&(0,_.migrateUnsupportedExtensions)(w.webExtensionManagementServer.extensionManagementService,v,C,o,c)}};D=Ee([W(0,k.IExtensionManagementServerService),W(1,t.IExtensionGalleryService),W(2,f.IExtensionStorageService),W(3,t.IGlobalExtensionEnablementService),W(4,A.ILogService)],D),e.UnsupportedExtensionsMigrationContrib=D}),define(ne[2301],re([1,0,266,46,13,1555,115]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebRecommendations=void 0;let D=class extends t.ExtensionRecommendations{constructor(w,v){super();this.productService=w,this.extensionManagementServerService=v,this._recommendations=[]}get recommendations(){return this._recommendations}async doActivate(){this.extensionManagementServerService.webExtensionManagementServer&&!this.extensionManagementServerService.localExtensionManagementServer&&!this.extensionManagementServerService.remoteExtensionManagementServer&&(0,_.isArray)(this.productService.webExtensionTips)&&(this._recommendations=this.productService.webExtensionTips.map(v=>({extensionId:v.toLowerCase(),reason:{reasonId:6,reasonText:(0,A.localize)(0,null,this.productService.nameLong)}})))}};D=Ee([W(0,f.IProductService),W(1,k.IExtensionManagementServerService)],D),e.WebRecommendations=D}),define(ne[2302],re([1,0,35,103,79,1983,23,46,187,31,18]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let C=class extends A.ExtensionTipsService{constructor(c,i,S,s,l){super(c,i,S,s);this.channel=l.getChannel("extensionTipsService")}getConfigBasedTips(c){return c.scheme===v.Schemas.file?this.channel.call("getConfigBasedTips",[c]):super.getConfigBasedTips(c)}getImportantExecutableBasedTips(){return this.channel.call("getImportantExecutableBasedTips")}getOtherExecutableBasedTips(){return this.channel.call("getOtherExecutableBasedTips")}getAllWorkspacesTips(){return this.channel.call("getAllWorkspacesTips")}};C=Ee([W(0,k.IFileService),W(1,D.IProductService),W(2,I.IRequestService),W(3,w.ILogService),W(4,f.ISharedProcessService)],C),(0,t.registerSingleton)(_.IExtensionTipsService,C)}),define(ne[2303],re([1,0,730,103]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,f.registerMainProcessRemoteService)(t.IExtensionUrlTrustService,"extensionUrlTrust")}),define(ne[254],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtensionIgnoredRecommendationsService=e.IExtensionRecommendationsService=e.ExtensionRecommendationReason=void 0;var f;(function(_){_[_.Workspace=0]="Workspace",_[_.File=1]="File",_[_.Executable=2]="Executable",_[_.WorkspaceConfig=3]="WorkspaceConfig",_[_.DynamicWorkspace=4]="DynamicWorkspace",_[_.Experimental=5]="Experimental",_[_.Application=6]="Application"})(f=e.ExtensionRecommendationReason||(e.ExtensionRecommendationReason={})),e.IExtensionRecommendationsService=(0,t.createDecorator)("extensionRecommendationsService"),e.IExtensionIgnoredRecommendationsService=(0,t.createDecorator)("IExtensionIgnoredRecommendationsService")}),define(ne[421],re([1,0,15,6,118,2,198,23,35,5,34,53,52,42,1870,272,55]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceExtensionsConfigService=e.IWorkspaceExtensionsConfigService=e.EXTENSIONS_CONFIG=void 0,e.EXTENSIONS_CONFIG=".vscode/extensions.json",e.IWorkspaceExtensionsConfigService=(0,w.createDecorator)("IWorkspaceExtensionsConfigService");let l=class extends A.Disposable{constructor(p,u,a,n,h,g){super();this.workspaceContextService=p,this.fileService=u,this.quickInputService=a,this.modelService=n,this.languageService=h,this.jsonEditingService=g,this._onDidChangeExtensionsConfigs=this._register(new f.Emitter),this.onDidChangeExtensionsConfigs=this._onDidChangeExtensionsConfigs.event,this._register(p.onDidChangeWorkspaceFolders(d=>this._onDidChangeExtensionsConfigs.fire())),this._register(u.onDidFilesChange(d=>{const m=p.getWorkspace();(m.configuration&&d.affects(m.configuration)||m.folders.some(b=>d.affects(b.toResource(e.EXTENSIONS_CONFIG))))&&this._onDidChangeExtensionsConfigs.fire()}))}async getExtensionsConfigs(){const p=this.workspaceContextService.getWorkspace(),u=[],a=p.configuration?await this.resolveWorkspaceExtensionConfig(p.configuration):void 0;return a&&u.push(a),u.push(...await Promise.all(p.folders.map(n=>this.resolveWorkspaceFolderExtensionConfig(n)))),u}async getRecommendations(){const p=await this.getExtensionsConfigs();return(0,t.distinct)((0,t.flatten)(p.map(u=>u.recommendations?u.recommendations.map(a=>a.toLowerCase()):[])))}async getUnwantedRecommendations(){const p=await this.getExtensionsConfigs();return(0,t.distinct)((0,t.flatten)(p.map(u=>u.unwantedRecommendations?u.unwantedRecommendations.map(a=>a.toLowerCase()):[])))}async toggleRecommendation(p){const u=this.workspaceContextService.getWorkspace(),a=u.configuration?await this.resolveWorkspaceExtensionConfig(u.configuration):void 0,n=new s.ResourceMap;await Promise.all(u.folders.map(async b=>{const E=await this.resolveWorkspaceFolderExtensionConfig(b);n.set(b.uri,E)}));const h=a&&a.recommendations?.some(b=>b===p),g=u.folders.filter(b=>n.get(b.uri)?.recommendations?.some(E=>E===p)),d=h||g.length>0,m=d?await this.pickWorkspaceOrFolders(g,h?u:void 0,(0,i.localize)(0,null)):await this.pickWorkspaceOrFolders(u.folders,u.configuration?u:void 0,(0,i.localize)(1,null));for(const b of m)(0,v.isWorkspace)(b)?await this.addOrRemoveWorkspaceRecommendation(p,b,a,!d):await this.addOrRemoveWorkspaceFolderRecommendation(p,b,n.get(b.uri),!d)}async toggleUnwantedRecommendation(p){const u=this.workspaceContextService.getWorkspace(),a=u.configuration?await this.resolveWorkspaceExtensionConfig(u.configuration):void 0,n=new s.ResourceMap;await Promise.all(u.folders.map(async b=>{const E=await this.resolveWorkspaceFolderExtensionConfig(b);n.set(b.uri,E)}));const h=a&&a.unwantedRecommendations?.some(b=>b===p),g=u.folders.filter(b=>n.get(b.uri)?.unwantedRecommendations?.some(E=>E===p)),d=h||g.length>0,m=d?await this.pickWorkspaceOrFolders(g,h?u:void 0,(0,i.localize)(2,null)):await this.pickWorkspaceOrFolders(u.folders,u.configuration?u:void 0,(0,i.localize)(3,null));for(const b of m)(0,v.isWorkspace)(b)?await this.addOrRemoveWorkspaceUnwantedRecommendation(p,b,a,!d):await this.addOrRemoveWorkspaceFolderUnwantedRecommendation(p,b,n.get(b.uri),!d)}async addOrRemoveWorkspaceFolderRecommendation(p,u,a,n){const h=[];if(n?(h.push({path:["recommendations"],value:[...a.recommendations||[],p]}),a.unwantedRecommendations&&a.unwantedRecommendations.some(g=>g===p)&&h.push({path:["unwantedRecommendations"],value:a.unwantedRecommendations.filter(g=>g!==p)})):a.recommendations&&h.push({path:["recommendations"],value:a.recommendations.filter(g=>g!==p)}),h.length)return this.jsonEditingService.write(u.toResource(e.EXTENSIONS_CONFIG),h,!0)}async addOrRemoveWorkspaceRecommendation(p,u,a,n){const h=[];if(a?n?(h.push({path:["extensions","recommendations"],value:[...a.recommendations||[],p]}),a.unwantedRecommendations&&a.unwantedRecommendations.some(g=>g===p)&&h.push({path:["extensions","unwantedRecommendations"],value:a.unwantedRecommendations.filter(g=>g!==p)})):a.recommendations&&h.push({path:["extensions","recommendations"],value:a.recommendations.filter(g=>g!==p)}):n&&h.push({path:["extensions"],value:{recommendations:[p]}}),h.length)return this.jsonEditingService.write(u.configuration,h,!0)}async addOrRemoveWorkspaceFolderUnwantedRecommendation(p,u,a,n){const h=[];if(n?(h.push({path:["unwantedRecommendations"],value:[...a.unwantedRecommendations||[],p]}),a.recommendations&&a.recommendations.some(g=>g===p)&&h.push({path:["recommendations"],value:a.recommendations.filter(g=>g!==p)})):a.unwantedRecommendations&&h.push({path:["unwantedRecommendations"],value:a.unwantedRecommendations.filter(g=>g!==p)}),h.length)return this.jsonEditingService.write(u.toResource(e.EXTENSIONS_CONFIG),h,!0)}async addOrRemoveWorkspaceUnwantedRecommendation(p,u,a,n){const h=[];if(a?n?(h.push({path:["extensions","unwantedRecommendations"],value:[...a.unwantedRecommendations||[],p]}),a.recommendations&&a.recommendations.some(g=>g===p)&&h.push({path:["extensions","recommendations"],value:a.recommendations.filter(g=>g!==p)})):a.unwantedRecommendations&&h.push({path:["extensions","unwantedRecommendations"],value:a.unwantedRecommendations.filter(g=>g!==p)}):n&&h.push({path:["extensions"],value:{unwantedRecommendations:[p]}}),h.length)return this.jsonEditingService.write(u.configuration,h,!0)}async pickWorkspaceOrFolders(p,u,a){const n=u?[...p,u]:[...p];if(n.length===1)return n;const h=p.map(d=>({label:d.name,description:(0,i.localize)(4,null),workspaceOrFolder:d,iconClasses:(0,k.getIconClasses)(this.modelService,this.languageService,d.uri,D.FileKind.ROOT_FOLDER)}));return u&&(h.push({type:"separator"}),h.push({label:(0,i.localize)(5,null),workspaceOrFolder:u})),(await this.quickInputService.pick(h,{placeHolder:a,canPickMany:!0})||[]).map(d=>d.workspaceOrFolder)}async resolveWorkspaceExtensionConfig(p){try{const u=await this.fileService.readFile(p),a=(0,_.parse)(u.value.toString()).extensions;return a?this.parseExtensionConfig(a):void 0}catch{}}async resolveWorkspaceFolderExtensionConfig(p){try{const u=await this.fileService.readFile(p.toResource(e.EXTENSIONS_CONFIG)),a=(0,_.parse)(u.value.toString());return this.parseExtensionConfig(a)}catch{}return{}}parseExtensionConfig(p){return{recommendations:(0,t.distinct)((p.recommendations||[]).map(u=>u.toLowerCase())),unwantedRecommendations:(0,t.distinct)((p.unwantedRecommendations||[]).map(u=>u.toLowerCase()))}}};l=Ee([W(0,v.IWorkspaceContextService),W(1,D.IFileService),W(2,C.IQuickInputService),W(3,o.IModelService),W(4,c.ILanguageService),W(5,S.IJSONEditingService)],l),e.WorkspaceExtensionsConfigService=l,(0,I.registerSingleton)(e.IWorkspaceExtensionsConfigService,l)}),define(ne[2304],re([1,0,79,15,266,26,31,30,1556,6,421]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceRecommendations=void 0;let C=class extends _.ExtensionRecommendations{constructor(c,i,S,s){super();this.workspaceExtensionsConfigService=c,this.galleryService=i,this.logService=S,this.notificationService=s,this._recommendations=[],this._onDidChangeRecommendations=this._register(new w.Emitter),this.onDidChangeRecommendations=this._onDidChangeRecommendations.event,this._ignoredRecommendations=[]}get recommendations(){return this._recommendations}get ignoredRecommendations(){return this._ignoredRecommendations}async doActivate(){await this.fetch(),this._register(this.workspaceExtensionsConfigService.onDidChangeExtensionsConfigs(()=>this.onDidChangeExtensionsConfigs()))}async fetch(){const c=await this.workspaceExtensionsConfigService.getExtensionsConfigs(),{invalidRecommendations:i,message:S}=await this.validateExtensions(c);i.length&&this.notificationService.warn(`The ${i.length} extension(s) below, in workspace recommendations have issues: ${S}`),this._recommendations=[],this._ignoredRecommendations=[];for(const s of c){if(s.unwantedRecommendations)for(const l of s.unwantedRecommendations)i.indexOf(l)===-1&&this._ignoredRecommendations.push(l);if(s.recommendations)for(const l of s.recommendations)i.indexOf(l)===-1&&this._recommendations.push({extensionId:l,reason:{reasonId:0,reasonText:(0,I.localize)(0,null)}})}}async validateExtensions(c){const i=[],S=[],s=[];let l="";const r=(0,f.distinct)((0,f.flatten)(c.map(({recommendations:u})=>u||[]))),p=new RegExp(t.EXTENSION_IDENTIFIER_PATTERN);for(const u of r)p.test(u)?s.push(u):(S.push(u),l+=`${u} (bad format) Expected: <provider>.<name> `);if(s.length)try{const a=(await this.galleryService.getExtensions(s.map(n=>({id:n})),D.CancellationToken.None)).map(n=>n.identifier.id.toLowerCase());for(const n of s)a.indexOf(n)===-1?(S.push(n),l+=`${n} (not found in marketplace) `):i.push(n)}catch(u){this.logService.warn("Error querying extensions gallery",u)}return{validRecommendations:i,invalidRecommendations:S,message:l}}async onDidChangeExtensionsConfigs(){await this.fetch(),this._onDidChangeRecommendations.fire()}};C=Ee([W(0,v.IWorkspaceExtensionsConfigService),W(1,t.IExtensionGalleryService),W(2,k.ILogService),W(3,A.INotificationService)],C),e.WorkspaceRecommendations=C}),define(ne[2305],re([1,0,15,6,2,35,24,254,421]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionIgnoredRecommendationsService=void 0;const w="extensionsAssistant/ignored_recommendations";let v=class extends _.Disposable{constructor(o,c){super();this.workspaceExtensionsConfigService=o,this.storageService=c,this._onDidChangeIgnoredRecommendations=this._register(new f.Emitter),this.onDidChangeIgnoredRecommendations=this._onDidChangeIgnoredRecommendations.event,this._globalIgnoredRecommendations=[],this._onDidChangeGlobalIgnoredRecommendation=this._register(new f.Emitter),this.onDidChangeGlobalIgnoredRecommendation=this._onDidChangeGlobalIgnoredRecommendation.event,this.ignoredWorkspaceRecommendations=[],this._globalIgnoredRecommendations=this.getCachedIgnoredRecommendations(),this._register(this.storageService.onDidChangeValue(i=>this.onDidStorageChange(i))),this.initIgnoredWorkspaceRecommendations()}get globalIgnoredRecommendations(){return[...this._globalIgnoredRecommendations]}get ignoredRecommendations(){return(0,t.distinct)([...this.globalIgnoredRecommendations,...this.ignoredWorkspaceRecommendations])}async initIgnoredWorkspaceRecommendations(){this.ignoredWorkspaceRecommendations=await this.workspaceExtensionsConfigService.getUnwantedRecommendations(),this._onDidChangeIgnoredRecommendations.fire(),this._register(this.workspaceExtensionsConfigService.onDidChangeExtensionsConfigs(async()=>{this.ignoredWorkspaceRecommendations=await this.workspaceExtensionsConfigService.getUnwantedRecommendations(),this._onDidChangeIgnoredRecommendations.fire()}))}toggleGlobalIgnoredRecommendation(o,c){o=o.toLowerCase(),this._globalIgnoredRecommendations.indexOf(o)!==-1!==c&&(this._globalIgnoredRecommendations=c?[...this._globalIgnoredRecommendations,o]:this._globalIgnoredRecommendations.filter(S=>S!==o),this.storeCachedIgnoredRecommendations(this._globalIgnoredRecommendations),this._onDidChangeGlobalIgnoredRecommendation.fire({extensionId:o,isRecommended:!c}),this._onDidChangeIgnoredRecommendations.fire())}getCachedIgnoredRecommendations(){return JSON.parse(this.ignoredRecommendationsValue).map(c=>c.toLowerCase())}onDidStorageChange(o){o.key===w&&o.scope===0&&this.ignoredRecommendationsValue!==this.getStoredIgnoredRecommendationsValue()&&(this._ignoredRecommendationsValue=void 0,this._globalIgnoredRecommendations=this.getCachedIgnoredRecommendations(),this._onDidChangeIgnoredRecommendations.fire())}storeCachedIgnoredRecommendations(o){this.ignoredRecommendationsValue=JSON.stringify(o)}get ignoredRecommendationsValue(){return this._ignoredRecommendationsValue||(this._ignoredRecommendationsValue=this.getStoredIgnoredRecommendationsValue()),this._ignoredRecommendationsValue}set ignoredRecommendationsValue(o){this.ignoredRecommendationsValue!==o&&(this._ignoredRecommendationsValue=o,this.setStoredIgnoredRecommendationsValue(o))}getStoredIgnoredRecommendationsValue(){return this.storageService.get(w,0,"[]")}setStoredIgnoredRecommendationsValue(o){this.storageService.store(w,o,0,0)}};v=Ee([W(0,I.IWorkspaceExtensionsConfigService),W(1,k.IStorageService)],v),e.ExtensionIgnoredRecommendationsService=v,(0,A.registerSingleton)(D.IExtensionIgnoredRecommendationsService,v)}),define(ne[296],re([1,0,14,29,9,5,347,199,18]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractExtensionResourceLoaderService=e.IExtensionResourceLoaderService=e.WEB_EXTENSION_RESOURCE_END_POINT=void 0,e.WEB_EXTENSION_RESOURCE_END_POINT="web-extension-resource",e.IExtensionResourceLoaderService=(0,A.createDecorator)("extensionResourceLoaderService");class w{constructor(C,o,c,i,S){this._fileService=C,this._storageService=o,this._productService=c,this._environmentService=i,this._configurationService=S,c.extensionsGallery&&(this._extensionGalleryResourceUrlTemplate=c.extensionsGallery.resourceUrlTemplate,this._extensionGalleryAuthority=this._extensionGalleryResourceUrlTemplate?this._getExtensionGalleryAuthority(_.URI.parse(this._extensionGalleryResourceUrlTemplate)):void 0)}get supportsExtensionGalleryResources(){return this._extensionGalleryResourceUrlTemplate!==void 0}getExtensionGalleryResourceURL(C,o){if(this._extensionGalleryResourceUrlTemplate){const c=_.URI.parse((0,f.format2)(this._extensionGalleryResourceUrlTemplate,{publisher:C.publisher,name:C.name,version:C.version,path:"extension"}));return this._isWebExtensionResourceEndPoint(c)?c.with({scheme:I.RemoteAuthorities.getPreferredWebSchema()}):c}}isExtensionGalleryResource(C){return this._extensionGalleryAuthority&&this._extensionGalleryAuthority===this._getExtensionGalleryAuthority(C)}async getExtensionGalleryRequestHeaders(){const C={"X-Client-Name":`${this._productService.applicationName}${t.isWeb?"-web":""}`,"X-Client-Version":this._productService.version};return(0,D.supportsTelemetry)(this._productService,this._environmentService)&&(0,D.getTelemetryLevel)(this._configurationService)===3&&(C["X-Machine-Id"]=await this._getServiceMachineId()),this._productService.commit&&(C["X-Client-Commit"]=this._productService.commit),C}_getServiceMachineId(){return this._serviceMachineIdPromise||(this._serviceMachineIdPromise=(0,k.getServiceMachineId)(this._environmentService,this._fileService,this._storageService)),this._serviceMachineIdPromise}_getExtensionGalleryAuthority(C){if(this._isWebExtensionResourceEndPoint(C))return C.authority;const o=C.authority.indexOf(".");return o!==-1?C.authority.substring(o+1):void 0}_isWebExtensionResourceEndPoint(C){return C.path.startsWith(`/${e.WEB_EXTENSION_RESOURCE_END_POINT}/`)}}e.AbstractExtensionResourceLoaderService=w}),define(ne[2306],re([1,0,35,23,296,46,187,24,85,8,30]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionResourceLoaderService=void 0;let C=class extends _.AbstractExtensionResourceLoaderService{constructor(c,i,S,s,l,r){super(c,i,S,s,l);this._requestService=r}async readExtensionResource(c){if(this.isExtensionGalleryResource(c)){const S=await this.getExtensionGalleryRequestHeaders(),s=await this._requestService.request({url:c.toString(),headers:S},v.CancellationToken.None);return await(0,k.asText)(s)||""}return(await this._fileService.readFile(c)).value.toString()}};C=Ee([W(0,f.IFileService),W(1,D.IStorageService),W(2,A.IProductService),W(3,I.IEnvironmentService),W(4,w.IConfigurationService),W(5,k.IRequestService)],C),e.ExtensionResourceLoaderService=C,(0,t.registerSingleton)(_.IExtensionResourceLoaderService,C)}),define(ne[75],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostCustomersRegistry=e.extHostCustomer=e.extHostNamedCustomer=void 0;function t(k){return function(D){A.INSTANCE.registerNamedCustomer(k,D)}}e.extHostNamedCustomer=t;function f(k){A.INSTANCE.registerCustomer(k)}e.extHostCustomer=f;var _;(function(k){function D(){return A.INSTANCE.getNamedCustomers()}k.getNamedCustomers=D;function I(){return A.INSTANCE.getCustomers()}k.getCustomers=I})(_=e.ExtHostCustomersRegistry||(e.ExtHostCustomersRegistry={}));class A{constructor(){this._namedCustomers=[],this._customers=[]}registerNamedCustomer(D,I){const w=[D,I];this._namedCustomers.push(w)}getNamedCustomers(){return this._namedCustomers}registerCustomer(D){this._customers.push(D)}getCustomers(){return this._customers}}A.INSTANCE=new A}),define(ne[500],re([1,0,107,6,48]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionDescriptionRegistry=e.DeltaExtensionsResult=void 0;class A{constructor(v){this.removedDueToLooping=v}}e.DeltaExtensionsResult=A;class k{constructor(v){this._onDidChange=new f.Emitter,this.onDidChange=this._onDidChange.event,this._extensionDescriptions=v,this._initialize()}_initialize(){this._extensionDescriptions.sort(I),this._extensionsMap=new Map,this._extensionsArr=[],this._activationMap=new Map;for(const v of this._extensionDescriptions){if(this._extensionsMap.has(t.ExtensionIdentifier.toKey(v.identifier))){console.error("Extension `"+v.identifier.value+"` is already registered");continue}if(this._extensionsMap.set(t.ExtensionIdentifier.toKey(v.identifier),v),this._extensionsArr.push(v),Array.isArray(v.activationEvents))for(let C of v.activationEvents)C==="onUri"&&(C=`onUri:${t.ExtensionIdentifier.toKey(v.identifier)}`),this._activationMap.has(C)||this._activationMap.set(C,[]),this._activationMap.get(C).push(v)}}keepOnly(v){const C=new Set;v.forEach(o=>C.add(t.ExtensionIdentifier.toKey(o))),this._extensionDescriptions=this._extensionDescriptions.filter(o=>C.has(t.ExtensionIdentifier.toKey(o.identifier))),this._initialize(),this._onDidChange.fire(void 0)}deltaExtensions(v,C){v.length>0&&(this._extensionDescriptions=this._extensionDescriptions.concat(v));const o=k._findLoopingExtensions(this._extensionDescriptions);if(C=C.concat(o.map(c=>c.identifier)),C.length>0){const c=new Set;C.forEach(i=>c.add(t.ExtensionIdentifier.toKey(i))),this._extensionDescriptions=this._extensionDescriptions.filter(i=>!c.has(t.ExtensionIdentifier.toKey(i.identifier)))}return this._initialize(),this._onDidChange.fire(void 0),new A(o)}static _findLoopingExtensions(v){const C=new class{constructor(){this._arcs=new Map,this._nodesSet=new Set,this._nodesArr=[]}addNode(s){this._nodesSet.has(s)||(this._nodesSet.add(s),this._nodesArr.push(s))}addArc(s,l){this.addNode(s),this.addNode(l),this._arcs.has(s)?this._arcs.get(s).push(l):this._arcs.set(s,[l])}getArcs(s){return this._arcs.has(s)?this._arcs.get(s):[]}hasOnlyGoodArcs(s,l){const r=C.getArcs(s);for(let p=0;p<r.length;p++)if(!l.has(r[p]))return!1;return!0}getNodes(){return this._nodesArr}};let o=new Map;for(let s of v){const l=t.ExtensionIdentifier.toKey(s.identifier);if(o.set(l,s),s.extensionDependencies)for(let r of s.extensionDependencies){const p=t.ExtensionIdentifier.toKey(r);C.addArc(l,p)}}let c=new Set;C.getNodes().filter(s=>C.getArcs(s).length===0).forEach(s=>c.add(s));let i=C.getNodes().filter(s=>!c.has(s)),S;do{S=!1;for(let s=0;s<i.length;s++){const l=i[s];C.hasOnlyGoodArcs(l,c)&&(i.splice(s,1),s--,c.add(l),S=!0)}}while(S);return i.map(s=>o.get(s))}containsActivationEvent(v){return this._activationMap.has(v)}containsExtension(v){return this._extensionsMap.has(t.ExtensionIdentifier.toKey(v))}getExtensionDescriptionsForActivationEvent(v){const C=this._activationMap.get(v);return C?C.slice(0):[]}getAllExtensionDescriptions(){return this._extensionsArr.slice(0)}getExtensionDescription(v){const C=this._extensionsMap.get(t.ExtensionIdentifier.toKey(v));return C||void 0}}e.ExtensionDescriptionRegistry=k;var D;(function(w){w[w.Builtin=0]="Builtin",w[w.User=1]="User",w[w.Dev=2]="Dev"})(D||(D={}));function I(w,v){const C=w.isBuiltin?0:w.isUnderDevelopment?2:1,o=v.isBuiltin?0:v.isUnderDevelopment?2:1;if(C!==o)return C-o;const c=_.posix.basename(w.extensionLocation.path),i=_.posix.basename(v.extensionLocation.path);return c<i?-1:c>i?1:0}}),define(ne[501],re([1,0,18]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseExtensionDevOptions=void 0;function f(_){let A=_.isExtensionDevelopment,k=!0,D=_.extensionDevelopmentLocationURI;if(D)for(let C of D)C.scheme!==t.Schemas.file&&(k=!1);let I=k&&typeof _.debugExtensionHost.port=="number",w=k&&!!_.debugExtensionHost.break,v=A&&!!_.extensionTestsLocationURI&&!_.debugExtensionHost.debugId;return{isExtensionDevHost:A,isExtensionDevDebug:I,isExtensionDevDebugBrk:w,isExtensionDevTestFromCli:v}}e.parseExtensionDevOptions=f}),define(ne[609],re([1,0,60]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isMessageOfType=e.createMessageOfType=e.MessageType=e.ExtensionHostExitCode=e.UIKind=void 0;var f;(function(I){I[I.Desktop=1]="Desktop",I[I.Web=2]="Web"})(f=e.UIKind||(e.UIKind={}));var _;(function(I){I[I.VersionMismatch=55]="VersionMismatch",I[I.UnexpectedError=81]="UnexpectedError"})(_=e.ExtensionHostExitCode||(e.ExtensionHostExitCode={}));var A;(function(I){I[I.Initialized=0]="Initialized",I[I.Ready=1]="Ready",I[I.Terminate=2]="Terminate"})(A=e.MessageType||(e.MessageType={}));function k(I){const w=t.VSBuffer.alloc(1);switch(I){case 0:w.writeUInt8(1,0);break;case 1:w.writeUInt8(2,0);break;case 2:w.writeUInt8(3,0);break}return w}e.createMessageOfType=k;function D(I,w){if(I.byteLength!==1)return!1;switch(I.readUInt8(0)){case 1:return w===0;case 2:return w===1;case 3:return w===2;default:return!1}}e.isMessageOfType=D}),define(ne[856],re([1,0,1875,48,19,401,118,15,391,13,9,100,723,107,23]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionScanner=e.ExtensionScannerInput=e.ExtensionManifestValidator=e.Translations=void 0;const S="package.json";var s;(function(b){function E(y,T){if(y===T)return!0;let R=Object.keys(y),O=new Set;for(let x of Object.keys(T))O.add(x);if(R.length!==O.size)return!1;for(let x of R){if(y[x]!==T[x])return!1;O.delete(x)}return O.size===0}b.equals=E})(s=e.Translations||(e.Translations={}));class l{constructor(E,y,T,R,O,x,F){this._ourVersion=E,this._ourProductDate=y,this._absoluteFolderPath=T,this._isBuiltin=R,this._isUnderDevelopment=O,this._log=x,this._fileService=F,this._absoluteManifestPath=f.join(this._absoluteFolderPath,S)}_error(E,y){this._log.error(`[${E}]: ${y}`)}_warn(E,y){this._log.warn(`[${E}]: ${y}`)}}class r extends l{static _fastParseJSON(E,y){try{return JSON.parse(E)}catch{return k.parse(E,y)}}parse(){return g(this._fileService,this._absoluteManifestPath).then(E=>{const y=[],T=r._fastParseJSON(E,y);if(k.getNodeType(T)!=="object")this._error(this._absoluteFolderPath,t.localize(0,null,this._absoluteManifestPath));else{if(y.length===0)return T.uuid=T.__metadata?.id,T.targetPlatform=T.__metadata?.targetPlatform??"undefined",T.isUserBuiltin=!!T.__metadata?.isBuiltin,delete T.__metadata,T;y.forEach(R=>{this._error(this._absoluteFolderPath,t.localize(1,null,this._absoluteManifestPath,R.offset,R.length,(0,I.getParseErrorMessage)(R.error)))})}return null},E=>(E.code==="ENOENT"||this._error(this._absoluteFolderPath,t.localize(2,null,this._absoluteManifestPath,E.message)),null))}}class p extends l{constructor(E,y,T,R,O,x,F,L){super(E,y,T,R,O,F,L);this._nlsConfig=x}replaceNLS(E){const y=(M,N)=>{N.forEach(B=>{this._error(this._absoluteFolderPath,t.localize(3,null,M,(0,I.getParseErrorMessage)(B.error)))})},T=M=>{this._error(this._absoluteFolderPath,t.localize(4,null,M))};let R=f.extname(this._absoluteManifestPath),O=this._absoluteManifestPath.substr(0,this._absoluteManifestPath.length-R.length);const x=`${E.publisher}.${E.name}`;let F=this._nlsConfig.translations[x],L;return F?L=g(this._fileService,F).then(M=>{let N=[],B=k.parse(M,N);return N.length>0?(y(F,N),{values:void 0,default:`${O}.nls.json`}):k.getNodeType(B)!=="object"?(T(F),{values:void 0,default:`${O}.nls.json`}):{values:B.contents?B.contents.package:void 0,default:`${O}.nls.json`}},M=>({values:void 0,default:`${O}.nls.json`})):L=d(this._fileService,O+".nls"+R).then(M=>{if(!!M)return p.findMessageBundles(this._nlsConfig,O,this._fileService).then(N=>N.localized?g(this._fileService,N.localized).then(B=>{let P=[],V=k.parse(B,P);return P.length>0?(y(N.localized,P),{values:void 0,default:N.original}):k.getNodeType(V)!=="object"?(T(N.localized),{values:void 0,default:N.original}):{values:V,default:N.original}},B=>({values:void 0,default:N.original})):{values:void 0,default:N.original},N=>{})}),L.then(M=>{if(M===void 0)return E;let N=[];return this.resolveOriginalMessageBundle(M.default,N).then(B=>{if(N.length>0)return y(M.default,N),E;if(k.getNodeType(M)!=="object")return T(M.default),E;const P=M.values||Object.create(null);return p._replaceNLStrings(this._nlsConfig,E,P,B,this._absoluteFolderPath,this._log),E})},M=>E)}resolveOriginalMessageBundle(E,y){return new Promise((T,R)=>{E?g(this._fileService,E).then(O=>{T(k.parse(O,y))},O=>{T(null)}):T(null)})}static findMessageBundles(E,y,T){return new Promise((R,O)=>{function x(F,L){let M=`${F}.nls.${L}.json`;d(T,M).then(N=>{N&&R({localized:M,original:`${F}.nls.json`});let B=L.lastIndexOf("-");B===-1?R({localized:`${F}.nls.json`,original:null}):(L=L.substring(0,B),x(F,L))})}if(E.devMode||E.pseudo||!E.locale)return R({localized:y+".nls.json",original:null});x(y,E.locale)})}static _replaceNLStrings(E,y,T,R,O,x){function F(L,M,N){const B=L[M];if(w.isString(B)){const P=B,V=P.length;if(V>1&&P[0]==="%"&&P[V-1]==="%"){const z=P.substr(1,V-2);let U=T[z];U===void 0&&R&&(U=R[z]);let H=typeof U=="string"?U:typeof U?.message=="string"?U.message:void 0;if(H!==void 0)E.pseudo&&(H="\uFF3B"+H.replace(/[aouei]/g,"$&$&")+"\uFF3D"),L[M]=N&&(M==="title"||M==="category")&&R?{value:H,original:R[z]}:H;else{const K=t.localize(5,null,z);x.warn(`[${O}]: ${K}`)}}}else if(w.isObject(B))for(let P in B)B.hasOwnProperty(P)&&(P==="commands"?F(B,P,!0):F(B,P,N));else if(w.isArray(B))for(let P=0;P<B.length;P++)F(B,P,N)}for(let L in y)y.hasOwnProperty(L)&&F(y,L)}}class u extends l{validate(E){let y=E;y.isBuiltin=this._isBuiltin,y.isUserBuiltin=!this._isBuiltin&&!!y.isUserBuiltin,y.isUnderDevelopment=this._isUnderDevelopment;let T=[];return u.isValidExtensionManifest(this._ourVersion,this._ourProductDate,v.URI.file(this._absoluteFolderPath),y,y.isBuiltin,T)?(T.forEach(R=>{this._warn(this._absoluteFolderPath,R)}),y.publisher||(y.publisher=c.UNDEFINED_PUBLISHER),y.id=(0,C.getExtensionId)(y.publisher,y.name),y.identifier=new c.ExtensionIdentifier(y.id),y.extensionLocation=v.URI.file(this._absoluteFolderPath),y):(T.forEach(R=>{this._error(this._absoluteFolderPath,R)}),null)}static isValidExtensionManifest(E,y,T,R,O,x){return u.baseIsValidExtensionManifest(T,R,x)?A.valid(R.version)?(0,o.isValidExtensionVersion)(E,y,R,O,x):(x.push(t.localize(6,null)),!1):!1}static baseIsValidExtensionManifest(E,y,T){if(!y)return T.push(t.localize(7,null)),!1;if(typeof y.publisher!="undefined"&&typeof y.publisher!="string")return T.push(t.localize(8,null)),!1;if(typeof y.name!="string")return T.push(t.localize(9,null,"name")),!1;if(typeof y.version!="string")return T.push(t.localize(10,null,"version")),!1;if(!y.engines)return T.push(t.localize(11,null,"engines")),!1;if(typeof y.engines.vscode!="string")return T.push(t.localize(12,null,"engines.vscode")),!1;if(typeof y.extensionDependencies!="undefined"&&!u._isStringArray(y.extensionDependencies))return T.push(t.localize(13,null,"extensionDependencies")),!1;if(typeof y.activationEvents!="undefined"){if(!u._isStringArray(y.activationEvents))return T.push(t.localize(14,null,"activationEvents")),!1;if(typeof y.main=="undefined"&&typeof y.browser=="undefined")return T.push(t.localize(15,null,"activationEvents","main")),!1}if(typeof y.extensionKind!="undefined"&&typeof y.main=="undefined"&&T.push(t.localize(16,null,"extensionKind")),typeof y.main!="undefined"){if(typeof y.main!="string")return T.push(t.localize(17,null,"main")),!1;{const R=_.joinPath(E,y.main);_.isEqualOrParent(R,E)||T.push(t.localize(18,null,R.path,E.path))}if(typeof y.activationEvents=="undefined")return T.push(t.localize(19,null,"activationEvents","main")),!1}if(typeof y.browser!="undefined"){if(typeof y.browser!="string")return T.push(t.localize(20,null,"browser")),!1;{const R=_.joinPath(E,y.browser);_.isEqualOrParent(R,E)||T.push(t.localize(21,null,R.path,E.path))}if(typeof y.activationEvents=="undefined")return T.push(t.localize(22,null,"activationEvents","browser")),!1}return!0}static _isStringArray(E){if(!Array.isArray(E))return!1;for(let y=0,T=E.length;y<T;y++)if(typeof E[y]!="string")return!1;return!0}}e.ExtensionManifestValidator=u;class a{constructor(E,y,T,R,O,x,F,L,M,N){this.ourVersion=E,this.ourProductDate=y,this.commit=T,this.locale=R,this.devMode=O,this.absoluteFolderPath=x,this.isBuiltin=F,this.isUnderDevelopment=L,this.targetPlatform=M,this.translations=N}static createNLSConfig(E){return{devMode:E.devMode,locale:E.locale,pseudo:E.locale==="pseudo",translations:E.translations}}static equals(E,y){return E.ourVersion===y.ourVersion&&E.ourProductDate===y.ourProductDate&&E.commit===y.commit&&E.locale===y.locale&&E.devMode===y.devMode&&E.absoluteFolderPath===y.absoluteFolderPath&&E.isBuiltin===y.isBuiltin&&E.isUnderDevelopment===y.isUnderDevelopment&&E.mtime===y.mtime&&E.targetPlatform===y.targetPlatform&&s.equals(E.translations,y.translations)}}e.ExtensionScannerInput=a;class n{constructor(E,y){this.root=E,this._fileService=y}resolveExtensions(){return m(this._fileService,this.root).then(E=>E.map(y=>({name:y,path:f.join(this.root,y)})))}}class h{static scanExtension(E,y,T,R,O,x,F,L){return T=f.normalize(T),new r(E,y,T,R,O,F,L).parse().then(N=>N===null?null:new p(E,y,T,R,O,x,F,L).replaceNLS(N)).then(N=>N===null?null:new u(E,y,T,R,O,F,L).validate(N))}static async scanExtensions(E,y,T,R=null){const O=E.absoluteFolderPath,x=E.isBuiltin,F=E.isUnderDevelopment;R||(R=new n(O,T));try{let L={};if(!x)try{const V=await g(T,f.join(O,".obsolete"));L=JSON.parse(V)}catch{}let M=await R.resolveExtensions();M.sort((V,z)=>V.name<z.name?-1:1),x||(M=M.filter(V=>V.name.indexOf(".")!==0));const N=a.createNLSConfig(E);let B=await Promise.all(M.map(V=>this.scanExtension(E.ourVersion,E.ourProductDate,V.path,x,F,N,y,T))),P=D.coalesce(B);return P=P.filter(V=>V!==null&&!L[new C.ExtensionKey({id:(0,C.getGalleryExtensionId)(V.publisher,V.name)},V.version,V.targetPlatform).toString()]),x||(P=this.filterOutdatedExtensions(P,E.targetPlatform)),P.sort((V,z)=>V.extensionLocation.fsPath<z.extensionLocation.fsPath?-1:1),P}catch(L){return y.error(`Error scanning extensions at ${O}:`),y.error(L),[]}}static scanOneOrMultipleExtensions(E,y,T){const R=E.absoluteFolderPath,O=E.isBuiltin,x=E.isUnderDevelopment;return d(T,f.join(R,S)).then(F=>{if(F){const L=a.createNLSConfig(E);return this.scanExtension(E.ourVersion,E.ourProductDate,R,O,x,L,y,T).then(M=>M===null?[]:[M])}return this.scanExtensions(E,y,T)},F=>(y.error(`Error scanning extensions at ${R}:`),y.error(F),[]))}static scanSingleExtension(E,y,T){const R=E.absoluteFolderPath,O=E.isBuiltin,x=E.isUnderDevelopment,F=a.createNLSConfig(E);return this.scanExtension(E.ourVersion,E.ourProductDate,R,O,x,F,y,T)}static mergeBuiltinExtensions(E,y){return Promise.all([E,y]).then(([T,R])=>{let O=Object.create(null);for(let F=0,L=T.length;F<L;F++)O[c.ExtensionIdentifier.toKey(T[F].identifier)]=T[F];for(let F=0,L=R.length;F<L;F++)O[c.ExtensionIdentifier.toKey(R[F].identifier)]=R[F];let x=Object.keys(O).map(F=>O[F]);return x.sort((F,L)=>{const M=f.basename(F.extensionLocation.fsPath),N=f.basename(L.extensionLocation.fsPath);return M<N?-1:M>N?1:0}),x})}static filterOutdatedExtensions(E,y){const T=new Map;for(const R of E){const O=R.identifier.value,x=T.get(O);x&&(A.gt(x.version,R.version)||A.eq(x.version,R.version)&&x.targetPlatform===y)||T.set(O,R)}return[...T.values()]}}e.ExtensionScanner=h;async function g(b,E){try{return(await b.readFile(v.URI.file(E),{atomic:!0})).value.toString()}catch(y){if((0,i.toFileOperationResult)(y)===1){const T=new Error("File not found");throw T.code="ENOENT",T}throw y}}async function d(b,E){try{return(await b.resolve(v.URI.file(E))).isFile}catch{return!1}}async function m(b,E){const y=await b.resolve(v.URI.file(E)),T=[];for(const R of y.children||[])R.isDirectory&&T.push(R.name);return T}}),define(ne[2307],re([1,0,22,85,311,23,31,24,56,34]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.migrateExtensionStorage=void 0;async function v(C,o,c,i){return i.invokeFunction(async S=>{const s=S.get(f.IEnvironmentService),l=S.get(_.IExtensionStorageService),r=S.get(D.IStorageService),p=S.get(I.IUriIdentityService),u=S.get(A.IFileService),a=S.get(w.IWorkspaceContextService),n=S.get(k.ILogService),h=`extensionStorage.migrate.${C}-${o}`,g=C.toLowerCase()===o.toLowerCase()?`extension.storage.migrateFromLowerCaseKey.${C.toLowerCase()}`:void 0;if(C===o)return;const d=(b,E)=>E?p.extUri.joinPath(s.globalStorageHome,b.toLowerCase()):p.extUri.joinPath(s.workspaceStorageHome,a.getWorkspace().id,b),m=c?0:1;if(!r.getBoolean(h,m,!1)&&!(g&&r.getBoolean(g,m,!1))){n.info(`Migrating ${c?"global":"workspace"} extension storage from ${C} to ${o}...`);const b=l.getExtensionState(C,c);b&&(l.setExtensionState(o,b,c),l.setExtensionState(C,void 0,c));const E=d(C,c),y=d(o,c);if(!p.extUri.isEqual(E,y))try{await u.move(E,y,!0)}catch(T){T.code!==A.FileSystemProviderErrorCode.FileNotFound&&n.info(`Error while migrating ${c?"global":"workspace"} file storage from '${C}' to '${o}'`,(0,t.getErrorMessage)(T))}n.info(`Migrated ${c?"global":"workspace"} extension storage from ${C} to ${o}`),r.store(h,!0,m,1)}})}e.migrateExtensionStorage=v}),define(ne[40],re([1,0,6,9,5,107,100]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NullExtensionService=e.toExtensionDescription=e.toExtension=e.ActivationKind=e.ExtensionHostLogFileName=e.ExtensionPointContribution=e.ActivationTimes=e.checkProposedApiEnabled=e.isProposedApiEnabled=e.extensionHostKindToString=e.ExtensionHostKind=e.MissingExtensionDependency=e.RemoteRunningLocation=e.LocalWebWorkerRunningLocation=e.LocalProcessRunningLocation=e.IExtensionService=e.webWorkerExtHostConfig=e.nullExtensionDescription=void 0,e.nullExtensionDescription=Object.freeze({identifier:new A.ExtensionIdentifier("nullExtensionDescription"),name:"Null Extension Description",version:"0.0.0",publisher:"vscode",engines:{vscode:""},extensionLocation:f.URI.parse("void:location"),isBuiltin:!1,targetPlatform:"undefined",isUserBuiltin:!1,isUnderDevelopment:!1}),e.webWorkerExtHostConfig="extensions.webWorker",e.IExtensionService=(0,_.createDecorator)("extensionService");class D{constructor(n){this.affinity=n,this.kind=1}equals(n){return this.kind===n.kind&&this.affinity===n.affinity}asString(){return this.affinity===0?"LocalProcess":`LocalProcess${this.affinity}`}}e.LocalProcessRunningLocation=D;class I{constructor(){this.kind=2,this.affinity=0}equals(n){return this.kind===n.kind}asString(){return"LocalWebWorker"}}e.LocalWebWorkerRunningLocation=I;class w{constructor(){this.kind=3,this.affinity=0}equals(n){return this.kind===n.kind}asString(){return"Remote"}}e.RemoteRunningLocation=w;class v{constructor(n){this.dependency=n}}e.MissingExtensionDependency=v;var C;(function(a){a[a.LocalProcess=1]="LocalProcess",a[a.LocalWebWorker=2]="LocalWebWorker",a[a.Remote=3]="Remote"})(C=e.ExtensionHostKind||(e.ExtensionHostKind={}));function o(a){if(a===null)return"None";switch(a){case 1:return"LocalProcess";case 2:return"LocalWebWorker";case 3:return"Remote"}}e.extensionHostKindToString=o;function c(a,n){return a.enabledApiProposals?a.enabledApiProposals.includes(n):!1}e.isProposedApiEnabled=c;function i(a,n){if(!c(a,n))throw new Error(`Extension '${a.identifier.value}' CANNOT use API proposal: ${n}. Its package.json#enabledApiProposals-property declares: ${a.enabledApiProposals?.join(", ")??"[]"} but NOT ${n}. The missing proposal MUST be added and you must start in extension development mode or use the following command line switch: --enable-proposed-api ${a.identifier.value}`)}e.checkProposedApiEnabled=i;class S{constructor(n,h,g,d){this.codeLoadingTime=n,this.activateCallTime=h,this.activateResolvedTime=g,this.activationReason=d}}e.ActivationTimes=S;class s{constructor(n,h){this.description=n,this.value=h}}e.ExtensionPointContribution=s,e.ExtensionHostLogFileName="exthost";var l;(function(a){a[a.Normal=0]="Normal",a[a.Immediate=1]="Immediate"})(l=e.ActivationKind||(e.ActivationKind={}));function r(a){return{type:a.isBuiltin?0:1,isBuiltin:a.isBuiltin||a.isUserBuiltin,identifier:{id:(0,k.getGalleryExtensionId)(a.publisher,a.name),uuid:a.uuid},manifest:a,location:a.extensionLocation,targetPlatform:a.targetPlatform}}e.toExtension=r;function p(a,n){return{identifier:new A.ExtensionIdentifier((0,k.getExtensionId)(a.manifest.publisher,a.manifest.name)),isBuiltin:a.type===0,isUserBuiltin:a.type===1&&a.isBuiltin,isUnderDevelopment:!!n,extensionLocation:a.location,...a.manifest,uuid:a.identifier.uuid,targetPlatform:a.targetPlatform}}e.toExtensionDescription=p;class u{constructor(){this.onDidRegisterExtensions=t.Event.None,this.onDidChangeExtensionsStatus=t.Event.None,this.onDidChangeExtensions=t.Event.None,this.onWillActivateByEvent=t.Event.None,this.onDidChangeResponsiveChange=t.Event.None}activateByEvent(n){return Promise.resolve(void 0)}activationEventIsDone(n){return!1}whenInstalledExtensionsRegistered(){return Promise.resolve(!0)}getExtensions(){return Promise.resolve([])}getExtension(){return Promise.resolve(void 0)}readExtensionPointContributions(n){return Promise.resolve(Object.create(null))}getExtensionsStatus(){return Object.create(null)}getInspectPort(n,h){return Promise.resolve(0)}getInspectPorts(n,h){return Promise.resolve([])}stopExtensionHosts(){}async restartExtensionHost(){}async startExtensionHosts(){}async setRemoteEnvironment(n){}canAddExtension(){return!1}canRemoveExtension(){return!1}_activateById(n,h){return Promise.resolve()}}e.NullExtensionService=u}),define(ne[2308],re([1,0,1398,17,2,57,248,159,40]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicEditorResolverConfigurations=void 0;let w=class zn extends _.Disposable{constructor(C,o){super();this.editorResolverService=C,this.configurationRegistry=f.Registry.as(A.Extensions.Configuration),(async()=>{await o.whenInstalledExtensionsRegistered(),this.updateConfiguration(),this.registerListeners()})()}registerListeners(){this._register(this.editorResolverService.onDidChangeEditorRegistrations(()=>this.updateConfiguration()))}updateConfiguration(){const C=[...this.editorResolverService.getEditors(),...zn.AUTO_LOCK_EXTRA_EDITORS],o=this.editorResolverService.getEditors().filter(r=>r.priority!==D.RegisteredEditorPriority.exclusive).map(r=>r.id),c=Object.create(null);for(const r of C)c[r.id]={type:"boolean",default:zn.AUTO_LOCK_DEFAULT_ENABLED.has(r.id),description:r.label};const i=Object.create(null);for(const r of C)i[r.id]=zn.AUTO_LOCK_DEFAULT_ENABLED.has(r.id);const S=this.autoLockConfigurationNode;this.autoLockConfigurationNode={...k.workbenchConfigurationNodeBase,properties:{"workbench.editor.autoLockGroups":{type:"object",description:(0,t.localize)(1,null),properties:c,default:i,additionalProperties:!1}}};const s=this.defaultBinaryEditorConfigurationNode;this.defaultBinaryEditorConfigurationNode={...k.workbenchConfigurationNodeBase,properties:{"workbench.editor.defaultBinaryEditor":{type:"string",enum:o,description:(0,t.localize)(2,null)}}};const l=this.editorAssociationsConfiguratioNnode;this.editorAssociationsConfiguratioNnode={...k.workbenchConfigurationNodeBase,properties:{"workbench.editorAssociations":{type:"object",markdownDescription:(0,t.localize)(3,null),patternProperties:{".*":{type:"string",enum:o}}}}},this.configurationRegistry.updateConfigurations({add:[this.autoLockConfigurationNode],remove:S?[S]:[]}),this.configurationRegistry.updateConfigurations({add:[this.defaultBinaryEditorConfigurationNode],remove:s?[s]:[]}),this.configurationRegistry.updateConfigurations({add:[this.editorAssociationsConfiguratioNnode],remove:l?[l]:[]})}};w.AUTO_LOCK_DEFAULT_ENABLED=new Set(["terminalEditor"]),w.AUTO_LOCK_EXTRA_EDITORS=[{id:"mainThreadWebview-markdown.preview",label:(0,t.localize)(0,null),priority:D.RegisteredEditorPriority.builtin}],w=Ee([W(0,D.IEditorResolverService),W(1,I.IExtensionService)],w),e.DynamicEditorResolverConfigurations=w}),define(ne[2309],re([1,0,121,17,57,40,28,23,60,9,46]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultConfigurationExportHelper=void 0;let C=class{constructor(c,i,S,s,l){this.extensionService=i,this.commandService=S,this.fileService=s,this.productService=l;const r=c.args["export-default-configuration"];r&&this.writeConfigModelAndQuit(w.URI.file(r))}async writeConfigModelAndQuit(c){try{await this.extensionService.whenInstalledExtensionsRegistered(),await this.writeConfigModel(c)}finally{this.commandService.executeCommand("workbench.action.quit")}}async writeConfigModel(c){const i=this.getConfigModel(),S=JSON.stringify(i,void 0," ");await this.fileService.writeFile(c,I.VSBuffer.fromString(S))}getConfigModel(){const c=f.Registry.as(_.Extensions.Configuration),i=c.getConfigurations().slice(),S=[],s=new Set,l=(a,n)=>{if(s.has(a)){console.warn("Setting is registered twice: "+a);return}s.add(a);const h={name:a,description:n.description||n.markdownDescription||"",default:n.default,type:n.type};n.enum&&(h.enum=n.enum),(n.enumDescriptions||n.markdownEnumDescriptions)&&(h.enumDescriptions=n.enumDescriptions||n.markdownEnumDescriptions),S.push(h)},r=a=>{if(a.properties)for(let n in a.properties)l(n,a.properties[n]);a.allOf&&a.allOf.forEach(r)};i.forEach(r);const p=c.getExcludedConfigurationProperties();for(let a in p)l(a,p[a]);return{settings:S.sort((a,n)=>a.name.localeCompare(n.name)),buildTime:Date.now(),commit:this.productService.commit,buildNumber:this.productService.settingsSearchBuildId}}};C=Ee([W(0,t.INativeWorkbenchEnvironmentService),W(1,A.IExtensionService),W(2,k.ICommandService),W(3,D.IFileService),W(4,v.IProductService)],C),e.DefaultConfigurationExportHelper=C}),define(ne[2310],re([1,0,40,67,1544,11,31]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionActivationProgress=void 0;let D=class{constructor(w,v,C){const o={location:10,title:(0,_.localize)(0,null)};let c,i=0;this._listener=w.onWillActivateByEvent(S=>{C.trace("onWillActivateByEvent: ",S.event),c||(c=new A.DeferredPromise,v.withProgress(o,s=>c.p)),i++,Promise.race([S.activation,(0,A.timeout)(5e3)]).finally(()=>{--i==0&&(c.complete(void 0),c=void 0)})})}dispose(){this._listener.dispose()}};D=Ee([W(0,t.IExtensionService),W(1,f.IProgressService),W(2,k.ILogService)],D),e.ExtensionActivationProgress=D}),define(ne[2311],re([1,0,1561,46,36,40,87,90,54,646]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugExtensionHostAction=void 0;let v=class Un extends _.Action{constructor(o,c,i,S,s){super(Un.ID,Un.LABEL,Un.CSS_CLASS);this._debugService=o,this._nativeHostService=c,this._dialogService=i,this._extensionService=S,this.productService=s}async run(){const o=await this._extensionService.getInspectPorts(1,!1);if(o.length===0){(await this._dialogService.confirm({type:"info",message:t.localize(1,null),detail:t.localize(2,null,this.productService.nameLong),primaryButton:t.localize(3,null),secondaryButton:t.localize(4,null)})).confirmed&&await this._nativeHostService.relaunch({addArgs:[`--inspect-extensions=${(0,w.randomPort)()}`]});return}return o.length>1&&console.warn("There are multiple extension hosts available for debugging. Picking the first one..."),this._debugService.startDebugging(void 0,{type:"node",name:t.localize(5,null),request:"attach",port:o[0]})}};v.ID="workbench.extensions.action.debugExtensionHost",v.LABEL=t.localize(0,null),v.CSS_CLASS="debug-extension-host",v=Ee([W(0,D.IDebugService),W(1,k.INativeHostService),W(2,I.IDialogService),W(3,A.IExtensionService),W(4,f.IProductService)],v),e.DebugExtensionHostAction=v}),define(ne[2312],re([1,0,2,24,214,486,40]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContributedExternalUriOpenersStore=void 0;let D=class Fo extends t.Disposable{constructor(w,v){super();this._extensionService=v,this._openers=new Map,this._memento=new _.Memento(Fo.STORAGE_ID,w),this._mementoObject=this._memento.getMemento(0,1);for(const[C,o]of Object.entries(this._mementoObject||{}))this.add(C,o.extensionId,{isCurrentlyRegistered:!1});this.invalidateOpenersOnExtensionsChanged(),this._register(this._extensionService.onDidChangeExtensions(()=>this.invalidateOpenersOnExtensionsChanged())),this._register(this._extensionService.onDidChangeExtensionsStatus(()=>this.invalidateOpenersOnExtensionsChanged()))}didRegisterOpener(w,v){this.add(w,v,{isCurrentlyRegistered:!0})}add(w,v,C){const o=this._openers.get(w);if(o){o.isCurrentlyRegistered=o.isCurrentlyRegistered||C.isCurrentlyRegistered;return}const c={extensionId:v,isCurrentlyRegistered:C.isCurrentlyRegistered};this._openers.set(w,c),this._mementoObject[w]=c,this._memento.saveMemento(),this.updateSchema()}delete(w){this._openers.delete(w),delete this._mementoObject[w],this._memento.saveMemento(),this.updateSchema()}async invalidateOpenersOnExtensionsChanged(){const w=await this._extensionService.getExtensions();for(const[v,C]of this._openers){const o=w.find(c=>c.identifier.value===C.extensionId);o?this._extensionService.canRemoveExtension(o)||C.isCurrentlyRegistered||this.delete(v):this.delete(v)}}updateSchema(){const w=[],v=[];for(const[C,o]of this._openers)w.push(C),v.push(o.extensionId);(0,A.updateContributedOpeners)(w,v)}};D.STORAGE_ID="externalUriOpeners",D=Ee([W(0,f.IStorageService),W(1,k.IExtensionService)],D),e.ContributedExternalUriOpenersStore=D}),define(ne[2313],re([1,0,6,2,40]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookRendererMessagingService=void 0;let A=class extends f.Disposable{constructor(D){super();this.extensionService=D,this.activations=new Map,this.scopedMessaging=new Map,this.postMessageEmitter=this._register(new t.Emitter),this.onShouldPostMessage=this.postMessageEmitter.event}receiveMessage(D,I,w){if(D===void 0){const v=[...this.scopedMessaging.values()].map(C=>C.receiveMessageHandler?.(I,w));return Promise.all(v).then(C=>C.some(o=>!!o))}return this.scopedMessaging.get(D)?.receiveMessageHandler?.(I,w)??Promise.resolve(!1)}prepare(D){if(this.activations.has(D))return;const I=[];this.activations.set(D,I),this.extensionService.activateByEvent(`onRenderer:${D}`).then(()=>{for(const w of I)this.postMessageEmitter.fire(w);this.activations.set(D,void 0)})}getScoped(D){const I=this.scopedMessaging.get(D);if(I)return I;const w={postMessage:(v,C)=>this.postMessage(D,v,C),dispose:()=>this.scopedMessaging.delete(D)};return this.scopedMessaging.set(D,w),w}postMessage(D,I,w){this.activations.has(I)||this.prepare(I);const v=this.activations.get(I),C={rendererId:I,editorId:D,message:w};v===void 0?this.postMessageEmitter.fire(C):v.push(C)}};A=Ee([W(0,_.IExtensionService)],A),e.NotebookRendererMessagingService=A}),define(ne[2314],re([1,0,2,7,104,153,158,238,40]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookEditorContextKeys=void 0;let w=class{constructor(C,o,c,i,S){this._editor=C,this._notebookKernelService=o,this._extensionService=i,this._notebookExecutionStateService=S,this._disposables=new t.DisposableStore,this._viewModelDisposables=new t.DisposableStore,this._cellOutputsListeners=[],this._notebookKernel=A.NOTEBOOK_KERNEL.bindTo(c),this._notebookKernelCount=A.NOTEBOOK_KERNEL_COUNT.bindTo(c),this._notebookKernelSelected=A.NOTEBOOK_KERNEL_SELECTED.bindTo(c),this._interruptibleKernel=A.NOTEBOOK_INTERRUPTIBLE_KERNEL.bindTo(c),this._someCellRunning=A.NOTEBOOK_HAS_RUNNING_CELL.bindTo(c),this._useConsolidatedOutputButton=A.NOTEBOOK_USE_CONSOLIDATED_OUTPUT_BUTTON.bindTo(c),this._hasOutputs=A.NOTEBOOK_HAS_OUTPUTS.bindTo(c),this._viewType=A.NOTEBOOK_VIEW_TYPE.bindTo(c),this._missingKernelExtension=A.NOTEBOOK_MISSING_KERNEL_EXTENSION.bindTo(c),this._cellToolbarLocation=A.NOTEBOOK_CELL_TOOLBAR_LOCATION.bindTo(c),this._handleDidChangeModel(),this._updateForNotebookOptions(),this._disposables.add(C.onDidChangeModel(this._handleDidChangeModel,this)),this._disposables.add(o.onDidAddKernel(this._updateKernelContext,this)),this._disposables.add(o.onDidChangeSelectedNotebooks(this._updateKernelContext,this)),this._disposables.add(C.notebookOptions.onDidChangeOptions(this._updateForNotebookOptions,this)),this._disposables.add(i.onDidChangeExtensions(this._updateForInstalledExtension,this)),this._disposables.add(S.onDidChangeCellExecution(this._updateForCellExecution,this))}dispose(){this._disposables.dispose(),this._viewModelDisposables.dispose(),this._notebookKernelCount.reset(),this._interruptibleKernel.reset(),this._someCellRunning.reset(),this._viewType.reset(),(0,t.dispose)(this._cellOutputsListeners),this._cellOutputsListeners.length=0}_handleDidChangeModel(){if(this._updateKernelContext(),this._updateForNotebookOptions(),this._viewModelDisposables.clear(),(0,t.dispose)(this._cellOutputsListeners),this._cellOutputsListeners.length=0,!this._editor.hasModel())return;const C=()=>{let c=!1;if(this._editor.hasModel()){for(let i=0;i<this._editor.getLength();i++)if(this._editor.cellAt(i).outputsViewModels.length>0){c=!0;break}}this._hasOutputs.set(c)},o=c=>c.model.onDidChangeOutputs(()=>{C()});for(let c=0;c<this._editor.getLength();c++){const i=this._editor.cellAt(c);this._cellOutputsListeners.push(o(i))}C(),this._updateForInstalledExtension(),this._viewModelDisposables.add(this._editor.onDidChangeViewCells(c=>{c.splices.reverse().forEach(i=>{const[S,s,l]=i,r=this._cellOutputsListeners.splice(S,s,...l.map(o));(0,t.dispose)(r)})})),this._viewType.set(this._editor.textModel.viewType)}_updateForCellExecution(){if(this._editor.textModel){const C=this._notebookExecutionStateService.getCellExecutionStatesForNotebook(this._editor.textModel.uri);this._someCellRunning.set(C.length>0)}else this._someCellRunning.set(!1)}async _updateForInstalledExtension(){if(!this._editor.hasModel())return;const C=this._editor.textModel.viewType,o=_.KERNEL_EXTENSIONS.get(C);this._missingKernelExtension.set(!!o&&!await this._extensionService.getExtension(o))}_updateKernelContext(){if(!this._editor.hasModel()){this._notebookKernelCount.reset(),this._interruptibleKernel.reset();return}const{selected:C,all:o}=this._notebookKernelService.getMatchingKernel(this._editor.textModel);this._notebookKernelCount.set(o.length),this._interruptibleKernel.set(C?.implementsInterrupt??!1),this._notebookKernelSelected.set(Boolean(C)),this._notebookKernel.set(C?.id??"")}_updateForNotebookOptions(){const C=this._editor.notebookOptions.getLayoutConfiguration();this._useConsolidatedOutputButton.set(C.consolidatedOutputButton),this._cellToolbarLocation.set(this._editor.notebookOptions.computeCellToolbarLocation(this._editor.textModel?.viewType))}};w=Ee([W(1,D.INotebookKernelService),W(2,f.IContextKeyService),W(3,I.IExtensionService),W(4,k.INotebookExecutionStateService)],w),e.NotebookEditorContextKeys=w}),define(ne[2315],re([1,0,6,110,24,40,2223,592]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EnvironmentVariableService=void 0;let I=class{constructor(v,C){this._extensionService=v,this._storageService=C,this.collections=new Map,this._onDidChangeCollections=new t.Emitter;const o=this._storageService.get("terminal.integrated.environmentVariableCollections",1);o&&(JSON.parse(o).forEach(i=>this.collections.set(i.extensionIdentifier,{persistent:!0,map:(0,D.deserializeEnvironmentVariableCollection)(i.collection)})),this._invalidateExtensionCollections()),this.mergedCollection=this._resolveMergedCollection(),this._extensionService.onDidChangeExtensions(()=>this._invalidateExtensionCollections())}get onDidChangeCollections(){return this._onDidChangeCollections.event}set(v,C){this.collections.set(v,C),this._updateCollections()}delete(v){this.collections.delete(v),this._updateCollections()}_updateCollections(){this._persistCollectionsEventually(),this.mergedCollection=this._resolveMergedCollection(),this._notifyCollectionUpdatesEventually()}_persistCollectionsEventually(){this._persistCollections()}_persistCollections(){const v=[];this.collections.forEach((o,c)=>{o.persistent&&v.push({extensionIdentifier:c,collection:(0,D.serializeEnvironmentVariableCollection)(this.collections.get(c).map)})});const C=JSON.stringify(v);this._storageService.store("terminal.integrated.environmentVariableCollections",C,1,1)}_notifyCollectionUpdatesEventually(){this._notifyCollectionUpdates()}_notifyCollectionUpdates(){this._onDidChangeCollections.fire(this.mergedCollection)}_resolveMergedCollection(){return new k.MergedEnvironmentVariableCollection(this.collections)}async _invalidateExtensionCollections(){await this._extensionService.whenInstalledExtensionsRegistered();const v=await this._extensionService.getExtensions();let C=!1;this.collections.forEach((o,c)=>{v.some(S=>S.identifier.value===c)||(this.collections.delete(c),C=!0)}),C&&this._updateCollections()}};Ee([(0,f.throttle)(1e3)],I.prototype,"_persistCollectionsEventually",null),Ee([(0,f.debounce)(1e3)],I.prototype,"_notifyCollectionUpdatesEventually",null),I=Ee([W(0,A.IExtensionService),W(1,_.IStorageService)],I),e.EnvironmentVariableService=I}),define(ne[2316],re([1,0,2315,35,325]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,f.registerSingleton)(_.IEnvironmentVariableService,t.EnvironmentVariableService,!0)}),define(ne[2317],re([1,0,89,387,86,581,14,19,13,570,55,23,26,42,40]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GettingStartedDetailsRenderer=void 0;let S=class{constructor(p,u,a,n){this.fileService=p,this.notificationService=u,this.extensionService=a,this.languageService=n,this.mdCache=new v.ResourceMap,this.svgCache=new v.ResourceMap}async renderMarkdown(p,u){const a=await this.readAndCacheStepMarkdown(p,u),n=(0,t.generateUuid)(),h=_.TokenizationRegistry.getColorMap(),g=h?(0,f.generateTokensCSSForColorMap)(h):"";return`<!DOCTYPE html> <html> <head> <meta http-equiv="Content-type" content="text/html;charset=UTF-8"> <meta http-equiv="Content-Security-Policy" content="default-src 'none'; ${document.location.protocol==="http:"?"img-src https: data: http:":"img-src https: data:"}; media-src https:; script-src 'nonce-${n}'; style-src 'nonce-${n}';"> <style nonce="${n}"> ${A.DEFAULT_MARKDOWN_STYLES} ${g} body > img { align-self: flex-start; } body > img[centered] { align-self: center; } body { display: flex; flex-direction: column; padding: 0; height: inherit; } checklist { display: flex; flex-wrap: wrap; justify-content: space-around; } checkbox { display: flex; flex-direction: column; align-items: center; margin: 5px; cursor: pointer; } checkbox.checked > img { box-sizing: border-box; margin-bottom: 4px; } checkbox.checked > img { outline: 2px solid var(--vscode-focusBorder); outline-offset: 2px; } blockquote > p:first-child { margin-top: 0; } body > * { margin-block-end: 0.25em; margin-block-start: 0.25em; } vertically-centered { padding-top: 5px; padding-bottom: 5px; } html { height: 100%; padding-right: 32px; } h1 { font-size: 19.5px; } h2 { font-size: 18.5px; } </style> </head> <body> <vertically-centered> ${a} </vertically-centered> </body> <script nonce="${n}"> const vscode = acquireVsCodeApi(); document.querySelectorAll('[when-checked]').forEach(el => { el.addEventListener('click', () => { vscode.postMessage(el.getAttribute('when-checked')); }); }); let ongoingLayout = undefined; const doLayout = () => { document.querySelectorAll('vertically-centered').forEach(element => { element.style.marginTop = Math.max((document.body.clientHeight - element.scrollHeight) * 3/10, 0) + 'px'; }); ongoingLayout = undefined; }; const layout = () => { if (ongoingLayout) { clearTimeout(ongoingLayout); } ongoingLayout = setTimeout(doLayout, 0); }; layout(); document.querySelectorAll('img').forEach(element => { element.onload = layout; }) window.addEventListener('message', event => { if (event.data.layoutMeNow) { layout(); } if (event.data.enabledContextKeys) { document.querySelectorAll('.checked').forEach(element => element.classList.remove('checked')) for (const key of event.data.enabledContextKeys) { document.querySelectorAll('[checked-on="' + key + '"]').forEach(element => element.classList.add('checked')) } } }); <\/script> </html>`}async renderSVG(p){const u=await this.readAndCacheSVGFile(p),a=(0,t.generateUuid)(),n=_.TokenizationRegistry.getColorMap(),h=n?(0,f.generateTokensCSSForColorMap)(n):"";return`<!DOCTYPE html> <html> <head> <meta http-equiv="Content-type" content="text/html;charset=UTF-8"> <meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src data:; style-src 'nonce-${a}';"> <style nonce="${a}"> ${A.DEFAULT_MARKDOWN_STYLES} ${h} svg { position: fixed; height: 100%; width: 80%; left: 50%; top: 50%; max-width: 530px; min-width: 350px; transform: translate(-50%,-50%); } </style> </head> <body> ${u} </body> </html>`}readAndCacheSVGFile(p){return this.svgCache.has(p)||this.svgCache.set(p,this.readContentsOfPath(p,!1)),(0,I.assertIsDefined)(this.svgCache.get(p))}readAndCacheStepMarkdown(p,u){return this.mdCache.has(p)||this.mdCache.set(p,this.readContentsOfPath(p).then(a=>(0,A.renderMarkdownDocument)(l(a,u),this.extensionService,this.languageService,!0,!0))),(0,I.assertIsDefined)(this.mdCache.get(p))}async readContentsOfPath(p,u=!0){try{const a=JSON.parse(p.query).moduleId;if(u&&a)return await new Promise(h=>{Q([a],g=>{h(g.default())})})}catch{}try{const a=p.with({path:p.path.replace(/\.md$/,`.nls.${k.locale}.md`)}),n=k.locale?.replace(/-.*$/,""),h=p.with({path:p.path.replace(/\.md$/,`.nls.${n}.md`)}),g=E=>this.fileService.stat(E).then(y=>!!y.size).catch(()=>!1),[d,m]=await Promise.all([g(a),g(h)]);return(await this.fileService.readFile(d?a:m?h:p)).value.toString()}catch(a){return this.notificationService.error("Error reading markdown document at `"+p+"`: "+a),""}}};S=Ee([W(0,C.IFileService),W(1,o.INotificationService),W(2,i.IExtensionService),W(3,c.ILanguageService)],S),e.GettingStartedDetailsRenderer=S;const s=(r,p)=>{const u=(0,D.joinPath)(p,r);return(0,w.asWebviewUri)(u).toString()},l=(r,p)=>r.replace(/src="([^"]*)"/g,(u,a)=>a.startsWith("https://")?`src="${a}"`:`src="${s(a,p)}"`).replace(/!\[([^\]]*)\]\(([^)]*)\)/g,(u,a,n)=>n.startsWith("https://")?``:`})`)}),define(ne[2318],re([1,0,1835,2,7,835,17,43,40]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewsWelcomeContribution=void 0;const w=k.Registry.as(D.Extensions.ViewsRegistry);class v extends f.Disposable{constructor(c){super();this.viewWelcomeContents=new Map,c.setHandler((i,{added:S,removed:s})=>{for(const r of s)for(const p of r.value){const u=this.viewWelcomeContents.get(p);u&&u.dispose()}const l=new Map;for(const r of S)for(const p of r.value){const{group:u,order:a}=C(p,r),n=_.ContextKeyExpr.deserialize(p.enablement),h=A.ViewIdentifierMap[p.view]??p.view;let g=l.get(h);g||(g=new Map,l.set(h,g)),g.set(p,{content:p.contents,when:_.ContextKeyExpr.deserialize(p.when),precondition:n,group:u,order:a})}for(const[r,p]of l){const u=w.registerViewWelcomeContent2(r,p);for(const[a,n]of u)this.viewWelcomeContents.set(a,n)}})}}e.ViewsWelcomeContribution=v;function C(o,c){let i,S;if(o.group){if(!(0,I.isProposedApiEnabled)(c.description,"contribViewsWelcome"))return c.collector.warn(t.localize(0,null,c.description.identifier.value)),{group:i,order:S};const s=o.group.lastIndexOf("@");s>0?(i=o.group.substr(0,s),S=Number(o.group.substr(s+1))||void 0):i=o.group}return{group:i,order:S}}}),define(ne[857],re([1,0,139,129,29,9,2,166,27,601,41,113,165,5,38,1839,24,7,8,13,28,12,32,2252,309,14,51,26,10,59,40,1132]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.embeddedEditorBackground=e.WalkThroughPart=e.WALK_THROUGH_FOCUS=void 0,e.WALK_THROUGH_FOCUS=new l.RawContextKey("interactivePlaygroundFocus",!1);const R=(0,S.localize)(0,null),O="walkThroughEditorViewState";let x=class Bo extends D.EditorPane{constructor(L,M,N,B,P,V,z,U,H,K,G,q){super(Bo.ID,L,M,z);this.instantiationService=B,this.openerService=P,this.keybindingService=V,this.contextKeyService=U,this.configurationService=H,this.notificationService=K,this.extensionService=G,this.disposables=new k.DisposableStore,this.contentDisposables=[],this.editorFocus=e.WALK_THROUGH_FOCUS.bindTo(this.contextKeyService),this.editorMemento=this.getEditorMemento(q,N,O)}createEditor(L){this.content=document.createElement("div"),this.content.classList.add("welcomePageFocusElement"),this.content.tabIndex=0,this.content.style.outlineStyle="none",this.scrollbar=new t.DomScrollableElement(this.content,{horizontal:1,vertical:1}),this.disposables.add(this.scrollbar),L.appendChild(this.scrollbar.getDomNode()),this.registerFocusHandlers(),this.registerClickHandler(),this.disposables.add(this.scrollbar.onScroll(M=>this.updatedScrollPosition()))}updatedScrollPosition(){const L=this.scrollbar.getScrollDimensions(),M=this.scrollbar.getScrollPosition(),N=L.scrollHeight;if(N&&this.input instanceof w.WalkThroughInput){const B=M.scrollTop,P=L.height;this.input.relativeScrollPosition(B/N,(B+P)/N)}}onTouchChange(L){L.preventDefault(),L.stopPropagation();const M=this.scrollbar.getScrollPosition();this.scrollbar.setScrollPosition({scrollTop:M.scrollTop-L.translationY})}addEventListener(L,M,N,B){return L.addEventListener(M,N,B),(0,k.toDisposable)(()=>{L.removeEventListener(M,N,B)})}registerFocusHandlers(){this.disposables.add(this.addEventListener(this.content,"mousedown",L=>{this.focus()})),this.disposables.add(this.addEventListener(this.content,"focus",L=>{this.editorFocus.set(!0)})),this.disposables.add(this.addEventListener(this.content,"blur",L=>{this.editorFocus.reset()})),this.disposables.add(this.addEventListener(this.content,"focusin",L=>{if(L.target instanceof HTMLElement&&L.target.classList.contains("zone-widget-container")){const M=this.scrollbar.getScrollPosition();this.content.scrollTop=M.scrollTop,this.content.scrollLeft=M.scrollLeft}L.target instanceof HTMLElement&&(this.lastFocus=L.target)}))}registerClickHandler(){this.content.addEventListener("click",L=>{for(let M=L.target;M;M=M.parentNode)if(M instanceof HTMLAnchorElement&&M.href){let N=window.document.getElementsByTagName("base")[0]||window.location;if(N&&M.href.indexOf(N.href)>=0&&M.hash){const B=this.content.querySelector(M.hash),P=this.content.firstElementChild;if(B&&P){const V=B.getBoundingClientRect().top-20,z=P.getBoundingClientRect().top;this.scrollbar.setScrollPosition({scrollTop:V-z})}}else this.open(A.URI.parse(M.href));L.preventDefault();break}else if(M instanceof HTMLButtonElement){const N=M.getAttribute("data-href");N&&this.open(A.URI.parse(N));break}else if(M===L.currentTarget)break})}open(L){if(L.scheme==="command"&&L.path==="git.clone"&&!u.CommandsRegistry.getCommand("git.clone")){this.notificationService.info((0,S.localize)(1,null));return}this.openerService.open(this.addFrom(L),{allowCommands:!0})}addFrom(L){if(L.scheme!=="command"||!(this.input instanceof w.WalkThroughInput))return L;const M=L.query?JSON.parse(L.query):{};return M.from=this.input.getTelemetryFrom(),L.with({query:JSON.stringify(M)})}layout(L){this.size=L,(0,E.size)(this.content,L.width,L.height),this.updateSizeClasses(),this.contentDisposables.forEach(N=>{N instanceof o.CodeEditorWidget&&N.layout()});const M=this.input instanceof w.WalkThroughInput&&this.input;M&&M.layout&&M.layout(L),this.scrollbar.scanDomNode()}updateSizeClasses(){const L=this.content.firstElementChild;this.size&&L&&L.classList[this.size.height<=685?"add":"remove"]("max-height-685px")}focus(){let L=document.activeElement;for(;L&&L!==this.content;)L=L.parentElement;L||(this.lastFocus||this.content).focus(),this.editorFocus.set(!0)}arrowUp(){const L=this.scrollbar.getScrollPosition();this.scrollbar.setScrollPosition({scrollTop:L.scrollTop-this.getArrowScrollHeight()})}arrowDown(){const L=this.scrollbar.getScrollPosition();this.scrollbar.setScrollPosition({scrollTop:L.scrollTop+this.getArrowScrollHeight()})}getArrowScrollHeight(){let L=this.configurationService.getValue("editor.fontSize");return(typeof L!="number"||L<1)&&(L=12),3*L}pageUp(){const L=this.scrollbar.getScrollDimensions(),M=this.scrollbar.getScrollPosition();this.scrollbar.setScrollPosition({scrollTop:M.scrollTop-L.height})}pageDown(){const L=this.scrollbar.getScrollDimensions(),M=this.scrollbar.getScrollPosition();this.scrollbar.setScrollPosition({scrollTop:M.scrollTop+L.height})}setInput(L,M,N,B){const P=new k.DisposableStore;return this.contentDisposables.push(P),this.content.innerText="",super.setInput(L,M,N,B).then(async()=>(L.resource.path.endsWith(".md")&&await this.extensionService.whenInstalledExtensionsRegistered(),L.resolve())).then(V=>{if(B.isCancellationRequested)return;const z=V.main;if(!L.resource.path.endsWith(".md")){(0,E.safeInnerHtml)(this.content,z),this.updateSizeClasses(),this.decorateContent(),this.contentDisposables.push(this.keybindingService.onDidUpdateKeybindings(()=>this.decorateContent())),L.onReady&&L.onReady(this.content.firstElementChild,P),this.scrollbar.scanDomNode(),this.loadTextEditorViewState(L),this.updatedScrollPosition();return}const U=document.createElement("div");U.classList.add("walkThroughContent");const H=this.expandMacros(z);(0,E.safeInnerHtml)(U,H),this.content.appendChild(U),V.snippets.forEach((K,G)=>{const q=K.textEditorModel;if(!q)return;const Z=`snippet-${q.uri.fragment}`,j=U.querySelector(`#${Z.replace(/[\\.]/g,"\\$&")}`),X=this.getEditorOptions(q.getLanguageId()),Y={target:this.input instanceof w.WalkThroughInput?this.input.getTelemetryFrom():void 0,snippet:G},$=this.instantiationService.createInstance(o.CodeEditorWidget,j,X,{telemetryData:Y});$.setModel(q),this.contentDisposables.push($);const J=ee=>{const te=$.getOption(59),se=`${Math.max(q.getLineCount()+1,4)*te}px`;j.style.height!==se&&(j.style.height=se,$.layout(),ee||this.scrollbar.scanDomNode())};J(!0),this.contentDisposables.push($.onDidChangeModelContent(()=>J(!1))),this.contentDisposables.push($.onDidChangeCursorPosition(ee=>{const te=this.content.firstElementChild;if(te){const se=j.getBoundingClientRect().top,ie=te.getBoundingClientRect().top,ce=$.getOption(59),le=se+(ee.position.lineNumber-1)*ce-ie,ae=le+ce,ue=this.scrollbar.getScrollDimensions(),fe=this.scrollbar.getScrollPosition().scrollTop,pe=ue.height;fe>le?this.scrollbar.setScrollPosition({scrollTop:le}):fe<ae-pe&&this.scrollbar.setScrollPosition({scrollTop:ae-pe})}})),this.contentDisposables.push(this.configurationService.onDidChangeConfiguration(()=>{K.textEditorModel&&$.updateOptions(this.getEditorOptions(K.textEditorModel.getLanguageId()))}))}),this.updateSizeClasses(),this.multiCursorModifier(),this.contentDisposables.push(this.configurationService.onDidChangeConfiguration(K=>{K.affectsConfiguration("editor.multiCursorModifier")&&this.multiCursorModifier()})),L.onReady&&L.onReady(U,P),this.scrollbar.scanDomNode(),this.loadTextEditorViewState(L),this.updatedScrollPosition(),this.contentDisposables.push(f.Gesture.addTarget(U)),this.contentDisposables.push((0,E.addDisposableListener)(U,f.EventType.Change,K=>this.onTouchChange(K)))})}getEditorOptions(L){const M=(0,m.deepClone)(this.configurationService.getValue("editor",{overrideIdentifier:L}));return{...(0,p.isObject)(M)?M:Object.create(null),scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!1},overviewRulerLanes:3,fixedOverflowWidgets:!1,lineNumbersMinChars:1,minimap:{enabled:!1}}}expandMacros(L){return L.replace(/kb\(([a-z.\d\-]+)\)/gi,(M,N)=>{const B=this.keybindingService.lookupKeybinding(N),P=B?B.getLabel()||"":R;return`<span class="shortcut">${_.escape(P)}</span>`})}decorateContent(){const L=this.content.querySelectorAll(".shortcut[data-command]");Array.prototype.forEach.call(L,N=>{const B=N.getAttribute("data-command"),P=B&&this.keybindingService.lookupKeybinding(B),V=P?P.getLabel()||"":R;for(;N.firstChild;)N.removeChild(N.firstChild);N.appendChild(document.createTextNode(V))});const M=this.content.querySelectorAll(".if_shortcut[data-command]");Array.prototype.forEach.call(M,N=>{const B=N.getAttribute("data-command"),P=B&&this.keybindingService.lookupKeybinding(B);N.style.display=P?"":"none"})}multiCursorModifier(){const L=g.UILabelProvider.modifierLabels[d.OS],M=this.configurationService.getValue("editor.multiCursorModifier"),N=L[M==="ctrlCmd"?d.OS===2?"metaKey":"ctrlKey":"altKey"],B=this.content.querySelectorAll(".multi-cursor-modifier");Array.prototype.forEach.call(B,P=>{for(;P.firstChild;)P.removeChild(P.firstChild);P.appendChild(document.createTextNode(N))})}saveTextEditorViewState(L){const M=this.scrollbar.getScrollPosition();this.group&&this.editorMemento.saveEditorState(this.group,L,{viewState:{scrollTop:M.scrollTop,scrollLeft:M.scrollLeft}})}loadTextEditorViewState(L){if(this.group){const M=this.editorMemento.loadEditorState(this.group,L);M&&this.scrollbar.setScrollPosition(M.viewState)}}clearInput(){this.input instanceof w.WalkThroughInput&&this.saveTextEditorViewState(this.input),this.contentDisposables=(0,k.dispose)(this.contentDisposables),super.clearInput()}saveState(){this.input instanceof w.WalkThroughInput&&this.saveTextEditorViewState(this.input),super.saveState()}dispose(){this.editorFocus.reset(),this.contentDisposables=(0,k.dispose)(this.contentDisposables),this.disposables.dispose(),super.dispose()}};x.ID="workbench.editor.walkThroughPart",x=Ee([W(0,I.ITelemetryService),W(1,a.IThemeService),W(2,C.ITextResourceConfigurationService),W(3,c.IInstantiationService),W(4,v.IOpenerService),W(5,i.IKeybindingService),W(6,s.IStorageService),W(7,l.IContextKeyService),W(8,r.IConfigurationService),W(9,b.INotificationService),W(10,T.IExtensionService),W(11,y.IEditorGroupsService)],x),e.WalkThroughPart=x,e.embeddedEditorBackground=(0,n.registerColor)("walkThrough.embeddedEditorBackground",{dark:null,light:null,hcDark:null,hcLight:null},(0,S.localize)(2,null)),(0,a.registerThemingParticipant)((F,L)=>{const M=(0,h.getExtraColor)(F,e.embeddedEditorBackground,{dark:"rgba(0, 0, 0, .4)",extra_dark:"rgba(200, 235, 255, .064)",light:"#f4f4f4",hcDark:null,hcLight:null});M&&L.addRule(`.monaco-workbench .part.editor > .content .walkThroughContent .monaco-editor-background, .monaco-workbench .part.editor > .content .walkThroughContent .margin-view-overlays { background: ${M}; }`);const N=F.getColor(n.textLinkForeground);N&&L.addRule(`.monaco-workbench .part.editor > .content .walkThroughContent a[href] { color: ${N}; }`);const B=F.getColor(n.textLinkActiveForeground);B&&L.addRule(`.monaco-workbench .part.editor > .content .walkThroughContent a:hover, .monaco-workbench .part.editor > .content .walkThroughContent a[href]:active { color: ${B}; }`);const P=F.getColor(n.focusBorder);P&&L.addRule(`.monaco-workbench .part.editor > .content .walkThroughContent a[href]:focus { outline-color: ${P}; }`);const V=F.getColor(n.textPreformatForeground);V&&L.addRule(`.monaco-workbench .part.editor > .content .walkThroughContent code, .monaco-workbench .part.editor > .content .walkThroughContent .shortcut { color: ${V}; }`);const z=F.getColor(n.contrastBorder);z&&L.addRule(`.monaco-workbench .part.editor > .content .walkThroughContent .monaco-editor { border-color: ${z}; }`);const U=F.getColor(n.textBlockQuoteBackground);U&&L.addRule(`.monaco-workbench .part.editor > .content .walkThroughContent blockquote { background: ${U}; }`);const H=F.getColor(n.textBlockQuoteBorder);H&&L.addRule(`.monaco-workbench .part.editor > .content .walkThroughContent blockquote { border-color: ${H}; }`)})}),define(ne[2319],re([1,0,21,857,58,7]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalkThroughPageDown=e.WalkThroughPageUp=e.WalkThroughArrowDown=e.WalkThroughArrowUp=void 0,e.WalkThroughArrowUp={id:"workbench.action.interactivePlayground.arrowUp",weight:200,when:A.ContextKeyExpr.and(f.WALK_THROUGH_FOCUS,_.EditorContextKeys.editorTextFocus.toNegated()),primary:16,handler:k=>{const I=k.get(t.IEditorService).activeEditorPane;I instanceof f.WalkThroughPart&&I.arrowUp()}},e.WalkThroughArrowDown={id:"workbench.action.interactivePlayground.arrowDown",weight:200,when:A.ContextKeyExpr.and(f.WALK_THROUGH_FOCUS,_.EditorContextKeys.editorTextFocus.toNegated()),primary:18,handler:k=>{const I=k.get(t.IEditorService).activeEditorPane;I instanceof f.WalkThroughPart&&I.arrowDown()}},e.WalkThroughPageUp={id:"workbench.action.interactivePlayground.pageUp",weight:200,when:A.ContextKeyExpr.and(f.WALK_THROUGH_FOCUS,_.EditorContextKeys.editorTextFocus.toNegated()),primary:11,handler:k=>{const I=k.get(t.IEditorService).activeEditorPane;I instanceof f.WalkThroughPart&&I.pageUp()}},e.WalkThroughPageDown={id:"workbench.action.interactivePlayground.pageDown",weight:200,when:A.ContextKeyExpr.and(f.WALK_THROUGH_FOCUS,_.EditorContextKeys.editorTextFocus.toNegated()),primary:12,handler:k=>{const I=k.get(t.IEditorService).activeEditorPane;I instanceof f.WalkThroughPart&&I.pageDown()}}}),define(ne[2320],re([1,0,5,28,40,6,2,31,35,11]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommandService=void 0;let v=class extends k.Disposable{constructor(o,c,i){super();this._instantiationService=o,this._extensionService=c,this._logService=i,this._extensionHostIsReady=!1,this._onWillExecuteCommand=this._register(new A.Emitter),this.onWillExecuteCommand=this._onWillExecuteCommand.event,this._onDidExecuteCommand=new A.Emitter,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._extensionService.whenInstalledExtensionsRegistered().then(S=>this._extensionHostIsReady=S),this._starActivation=null}_activateStar(){return this._starActivation||(this._starActivation=Promise.race([this._extensionService.activateByEvent("*"),(0,w.timeout)(3e4)])),this._starActivation}async executeCommand(o,...c){this._logService.trace("CommandService#executeCommand",o);const i=`onCommand:${o}`;return f.CommandsRegistry.getCommand(o)?this._extensionService.activationEventIsDone(i)?this._tryExecuteCommand(o,c):this._extensionHostIsReady?(await this._extensionService.activateByEvent(i),this._tryExecuteCommand(o,c)):(this._extensionService.activateByEvent(i),this._tryExecuteCommand(o,c)):(await Promise.all([this._extensionService.activateByEvent(i),Promise.race([this._activateStar(),A.Event.toPromise(A.Event.filter(f.CommandsRegistry.onDidRegisterCommand,s=>s===o))])]),this._tryExecuteCommand(o,c))}_tryExecuteCommand(o,c){const i=f.CommandsRegistry.getCommand(o);if(!i)return Promise.reject(new Error(`command '${o}' not found`));try{this._onWillExecuteCommand.fire({commandId:o,args:c});const S=this._instantiationService.invokeFunction(i.handler,...c);return this._onDidExecuteCommand.fire({commandId:o,args:c}),Promise.resolve(S)}catch(S){return Promise.reject(S)}}};v=Ee([W(0,t.IInstantiationService),W(1,_.IExtensionService),W(2,D.ILogService)],v),e.CommandService=v,(0,I.registerSingleton)(f.ICommandService,v,!0)}),define(ne[2321],re([1,0,152,15,2,19,9,8,132,44,59,18,159,53,1862,26,27,35,24,40,31,608,5,167,6]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorResolverService=void 0;let d=class fi extends _.Disposable{constructor(b,E,y,T,R,O,x,F,L){super();this.editorGroupService=b,this.instantiationService=E,this.configurationService=y,this.quickInputService=T,this.notificationService=R,this.telemetryService=O,this.storageService=x,this.extensionService=F,this.logService=L,this._onDidChangeEditorRegistrations=this._register(new g.Emitter),this.onDidChangeEditorRegistrations=this._onDidChangeEditorRegistrations.event,this._editors=new Map,this.cache=new Set(JSON.parse(this.storageService.get(fi.cacheStorageID,0,JSON.stringify([])))),this.storageService.remove(fi.cacheStorageID,0),this.convertOldAssociationFormat(),this._register(this.storageService.onWillSaveState(()=>{this.cacheEditors()})),this.extensionService.onDidRegisterExtensions(()=>{this.cache=void 0}),this._register(this.configurationService.onDidChangeConfiguration(M=>{M.affectsConfiguration(o.editorsAssociationsSettingId)&&this.convertOldAssociationFormat()}))}resolveUntypedInputAndGroup(b,E){let y;if((0,w.isEditorInputWithOptions)(b)?(y=b.editor.toUntyped(),y&&(y.options={...y.options,...b.options})):y=b,!y)return;const[T,R]=this.instantiationService.invokeFunction(a.findGroup,y,E);return[y,T,R]}async resolveEditor(b,E){if((0,w.isResourceSideBySideEditorInput)(b))return this.doResolveSideBySideEditor(b,E);const y=this.resolveUntypedInputAndGroup(b,E);if(!y)return 2;const[T,R,O]=y;O&&(T.options={...T.options,activation:O});let x=w.EditorResourceAccessor.getCanonicalUri(T,{supportSideBySide:w.SideBySideEditor.PRIMARY}),F=T.options;if(this.cache&&x&&this.resourceMatchesCache(x)&&await this.extensionService.whenInstalledExtensionsRegistered(),x===void 0)x=k.URI.from({scheme:C.Schemas.untitled});else if(x.scheme===void 0||x===null)return 2;if(T.options?.override===I.EditorResolution.DISABLED)throw new Error("Calling resolve editor when resolution is explicitly disabled!");if(T.options?.override===I.EditorResolution.PICK){const z=await this.doPickEditor(T);if(!z)return 1;T.options=z}let{editor:L,conflictingDefault:M}=this.getEditor(x,T.options?.override);if(!L)return 2;if((0,w.isResourceDiffEditorInput)(T)&&T.options?.override===void 0){let z=w.EditorResourceAccessor.getCanonicalUri(T,{supportSideBySide:w.SideBySideEditor.SECONDARY});z||(z=k.URI.from({scheme:C.Schemas.untitled}));const{editor:U}=this.getEditor(z,void 0);if(!U||L.editorInfo.id!==U.editorInfo.id){const{editor:H,conflictingDefault:K}=this.getEditor(x,w.DEFAULT_EDITOR_ASSOCIATION.id);L=H,M=K}if(!L)return 2}T.options={override:L.editorInfo.id,...T.options};let N=typeof L.options?.canHandleDiff=="function"?L.options.canHandleDiff():L.options?.canHandleDiff;if(N=N&&L.createDiffEditorInput!==void 0,N===!1&&(0,w.isResourceDiffEditorInput)(T))return 2;const B=R.activeEditor,P=B?B.matches(T):!1;if(B&&P)return{editor:B,options:F,group:R};const V=await this.doResolveEditor(T,R,L);return M&&V&&await this.doHandleConflictingDefaults(x,L.editorInfo.label,T,V.editor,R),V?(this.sendEditorResolutionTelemetry(V.editor),V.editor.editorId!==L.editorInfo.id&&this.logService.warn(`Editor ID Mismatch: ${V.editor.editorId} !== ${L.editorInfo.id}. This will cause bugs. Please ensure editorInput.editorId matches the registered id`),{...V,group:R}):1}async doResolveSideBySideEditor(b,E){const y=await this.resolveEditor(b.primary,E);if(!(0,w.isEditorInputWithOptionsAndGroup)(y))return 2;const T=await this.resolveEditor(b.secondary,y.group??E);return(0,w.isEditorInputWithOptionsAndGroup)(T)?{group:y.group??T.group,editor:this.instantiationService.createInstance(h.SideBySideEditorInput,b.label,b.description,T.editor,y.editor),options:b.options}:2}registerEditor(b,E,y,T,R,O){let x=this._editors.get(b);x===void 0&&(x=[],this._editors.set(b,x));const F=(0,f.insert)(x,{globPattern:b,editorInfo:E,options:y,createEditorInput:T,createUntitledEditorInput:R,createDiffEditorInput:O});return this._onDidChangeEditorRegistrations.fire(),(0,_.toDisposable)(()=>{F(),this._onDidChangeEditorRegistrations.fire()})}getAssociationsForResource(b){const y=this.getAllUserAssociations().filter(R=>R.filenamePattern&&(0,o.globMatchesResource)(R.filenamePattern,b)),T=this._registeredEditors;return y.filter(R=>T.find(O=>O.editorInfo.id===R.viewType))}convertOldAssociationFormat(){const b=this.configurationService.getValue(o.editorsAssociationsSettingId)||[];if(!Array.isArray(b))return;let E=Object.create(null);for(const y of b)y.filenamePattern&&(E[y.filenamePattern]=y.viewType);this.logService.info(`Migrating ${o.editorsAssociationsSettingId}`),this.configurationService.updateValue(o.editorsAssociationsSettingId,E)}getAllUserAssociations(){const b=this.configurationService.inspect(o.editorsAssociationsSettingId)||{},E=b.workspaceValue??{},y=b.userValue??{},T={...E};for(const[O,x]of Object.entries(y))T[O]===void 0&&(T[O]=x);let R=[];for(const[O,x]of Object.entries(T)){const F={filenamePattern:O,viewType:x};R.push(F)}return R}get _registeredEditors(){return(0,f.flatten)(Array.from(this._editors.values()))}updateUserAssociations(b,E){const y={viewType:E,filenamePattern:b},T=this.getAllUserAssociations(),R=Object.create(null);for(const O of[...T,y])O.filenamePattern&&(R[O.filenamePattern]=O.viewType);this.configurationService.updateValue(o.editorsAssociationsSettingId,R)}findMatchingEditors(b){const E=this.getAssociationsForResource(b);let y=[];for(const[T,R]of this._editors)for(const O of R)(E.find(F=>F.viewType===O.editorInfo.id)&&O.editorInfo.priority!==o.RegisteredEditorPriority.exclusive||(0,o.globMatchesResource)(T,b))&&y.push(O);return y.sort((T,R)=>(0,o.priorityToRank)(R.editorInfo.priority)===(0,o.priorityToRank)(T.editorInfo.priority)&&typeof R.globPattern=="string"&&typeof T.globPattern=="string"?R.globPattern.length-T.globPattern.length:(0,o.priorityToRank)(R.editorInfo.priority)-(0,o.priorityToRank)(T.editorInfo.priority))}getEditors(b){if(k.URI.isUri(b)){const E=this.findMatchingEditors(b);return E.find(y=>y.editorInfo.priority===o.RegisteredEditorPriority.exclusive)?[]:E.map(y=>y.editorInfo)}return(0,f.distinct)(this._registeredEditors.map(E=>E.editorInfo),E=>E.id)}getEditor(b,E){const y=(M,N)=>M.find(B=>B.options&&B.options.canSupportResource!==void 0?B.editorInfo.id===N&&B.options.canSupportResource(b):B.editorInfo.id===N);if(E&&E!==I.EditorResolution.EXCLUSIVE_ONLY){const M=this._registeredEditors;return{editor:y(M,E),conflictingDefault:!1}}let T=this.findMatchingEditors(b);const R=this.getAssociationsForResource(b),O=E===I.EditorResolution.EXCLUSIVE_ONLY?o.RegisteredEditorPriority.exclusive:o.RegisteredEditorPriority.builtin;let x=T.filter(M=>(0,o.priorityToRank)(M.editorInfo.priority)>=(0,o.priorityToRank)(O)&&M.editorInfo.id!==w.DEFAULT_EDITOR_ASSOCIATION.id);if(x.length===0)return{editor:R[0]&&O!==o.RegisteredEditorPriority.exclusive?y(T,R[0].viewType):void 0,conflictingDefault:!1};const F=x[0].editorInfo.priority===o.RegisteredEditorPriority.exclusive?x[0].editorInfo.id:R[0]?.viewType||x[0].editorInfo.id;let L=!1;return x=x.filter(M=>M.editorInfo.priority!==o.RegisteredEditorPriority.exclusive),R.length===0&&x.length>1&&(L=!0),{editor:y(T,F),conflictingDefault:L}}async doResolveEditor(b,E,y){let T=b.options;const R=w.EditorResourceAccessor.getCanonicalUri(b,{supportSideBySide:w.SideBySideEditor.PRIMARY});if(T&&typeof T.activation=="undefined"&&(T={...T,activation:T.preserveFocus?I.EditorActivation.RESTORE:void 0}),(0,w.isResourceDiffEditorInput)(b)){if(!y.createDiffEditorInput)return;const L=await y.createDiffEditorInput(b,E);return{editor:L.editor,options:L.options??T}}if((0,w.isResourceSideBySideEditorInput)(b))throw new Error("Untyped side by side editor input not supported here.");if((0,w.isUntitledResourceEditorInput)(b)){if(!y.createUntitledEditorInput)return;const L=await y.createUntitledEditorInput(b,E);return{editor:L.editor,options:L.options??T}}if(R===void 0)throw new Error("Undefined resource on non untitled editor input.");if(typeof y.options?.singlePerResource=="function"?y.options.singlePerResource():y.options?.singlePerResource){const L=await this.moveExistingEditorForResource(R,y.editorInfo.id,E);if(L)return{editor:L,options:T}}const x=await y.createEditorInput(b,E);return T=x.options??T,{editor:x.editor,options:T}}async moveExistingEditorForResource(b,E,y){const T=this.findExistingEditorsForResource(b,E);if(!T.length)return;const R=T[0];for(const{editor:O,group:x}of T)if(O!==R.editor&&!await x.closeEditor(O))return;if(y.id!==R.group.id)return R.group.moveEditor(R.editor,y),R.editor}findExistingEditorsForResource(b,E){const y=[],T=(0,f.distinct)([...this.editorGroupService.groups]);for(const R of T)for(const O of R.editors)(0,A.isEqual)(O.resource,b)&&O.editorId===E&&y.push({editor:O,group:R});return y}async doHandleConflictingDefaults(b,E,y,T,R){const O=this.findMatchingEditors(b),x=JSON.parse(this.storageService.get(fi.conflictingDefaultsStorageID,0,"{}")),F=`*${(0,A.extname)(b)}`,L=()=>{x[F]=[],O.forEach(B=>x[F].push(B.editorInfo.id)),this.storageService.store(fi.conflictingDefaultsStorageID,JSON.stringify(x),0,1)};if(x[F]&&x[F].find(B=>B===T.editorId))return;const N=this.notificationService.prompt(S.Severity.Warning,(0,i.localize)(0,null),[{label:(0,i.localize)(1,null),run:async()=>{const B=await this.doPickEditor(y,!0);if(!B)return;y.options=B;const P=await this.resolveEditor(y,R);P===1||P===2||R.replaceEditors([{editor:T,replacement:P.editor,options:P.options??B}])}},{label:(0,i.localize)(2,null,E),run:L}]).onDidClose(()=>{L(),N.dispose()})}mapEditorsToQuickPickEntry(b,E){const y=(0,f.firstOrDefault)(this.editorGroupService.activeGroup.findEditors(b));let T=b.scheme===C.Schemas.untitled?this._registeredEditors.filter(N=>N.editorInfo.priority!==o.RegisteredEditorPriority.exclusive):this.findMatchingEditors(b);T=(0,f.distinct)(T,N=>N.editorInfo.id);const R=this.getAssociationsForResource(b)[0]?.viewType;T=T.sort((N,B)=>N.editorInfo.id===w.DEFAULT_EDITOR_ASSOCIATION.id?-1:B.editorInfo.id===w.DEFAULT_EDITOR_ASSOCIATION.id?1:(0,o.priorityToRank)(B.editorInfo.priority)-(0,o.priorityToRank)(N.editorInfo.priority));const O=[],x=(0,i.localize)(3,null),F=(0,i.localize)(4,null),L=(0,i.localize)(5,null);let M=R;if(!M&&T.length>2&&T[1]?.editorInfo.priority!==o.RegisteredEditorPriority.option&&(M=T[1]?.editorInfo.id),M||(M=w.DEFAULT_EDITOR_ASSOCIATION.id),T.forEach(N=>{const B=y?.editorId??w.DEFAULT_EDITOR_ASSOCIATION.id,P=y?N.editorInfo.id===B:!1,V=N.editorInfo.id===M,z={id:N.editorInfo.id,label:N.editorInfo.label,description:P&&V?L:P?x:V?F:void 0,detail:N.editorInfo.detail??N.editorInfo.priority};O.push(z)}),!E&&(0,A.extname)(b)!==""){const N={type:"separator"};O.push(N);const B={id:fi.configureDefaultID,label:(0,i.localize)(6,null,`*${(0,A.extname)(b)}`)};O.push(B)}return O}async doPickEditor(b,E){let y=w.EditorResourceAccessor.getOriginalUri(b,{supportSideBySide:w.SideBySideEditor.PRIMARY});y===void 0&&(y=k.URI.from({scheme:C.Schemas.untitled}));const T=this.mapEditorsToQuickPickEntry(y,E),R=this.quickInputService.createQuickPick(),O=E?(0,i.localize)(7,null,`*${(0,A.extname)(y)}`):(0,i.localize)(8,null,(0,A.basename)(y));R.placeholder=O,R.canAcceptInBackground=!0,R.items=T;const x=R.items.find(L=>L.type==="item");x&&(R.selectedItems=[x]);const F=await new Promise(L=>{R.onDidAccept(M=>{let N;R.selectedItems.length===1&&(N={item:R.selectedItems[0],keyMods:R.keyMods,openInBackground:M.inBackground}),y&&E&&N?.item.id&&this.updateUserAssociations(`*${(0,A.extname)(y)}`,N.item.id),L(N)}),R.onDidHide(()=>L(void 0)),R.onDidTriggerItemButton(M=>{L({item:M.item,openInBackground:!1}),y&&M.item&&M.item.id&&this.updateUserAssociations(`*${(0,A.extname)(y)}`,M.item.id)}),R.show()});if(R.dispose(),F)return F.item.id===fi.configureDefaultID?this.doPickEditor(b,!0):{...b.options,override:F.item.id,preserveFocus:F.openInBackground||b.options?.preserveFocus}}sendEditorResolutionTelemetry(b){b.editorId&&this.telemetryService.publicLog2("override.viewType",{viewType:b.editorId})}cacheEditors(){const b=new Set;for(const[y,T]of this._editors)!T.find(O=>O.editorInfo.priority!==o.RegisteredEditorPriority.option&&O.editorInfo.id!==w.DEFAULT_EDITOR_ASSOCIATION.id)||(t.isRelativePattern(y)?b.add(`${y.pattern}`):b.add(y));const E=this.getAllUserAssociations();for(const y of E)y.filenamePattern&&b.add(y.filenamePattern);this.storageService.store(fi.cacheStorageID,JSON.stringify(Array.from(b)),0,1)}resourceMatchesCache(b){if(!this.cache)return!1;for(const E of this.cache)if((0,o.globMatchesResource)(E,b))return!0;return!1}};d.configureDefaultID="promptOpenWith.configureDefault",d.cacheStorageID="editorOverrideService.cache",d.conflictingDefaultsStorageID="editorOverrideService.conflictingDefaults",d=Ee([W(0,v.IEditorGroupsService),W(1,n.IInstantiationService),W(2,D.IConfigurationService),W(3,c.IQuickInputService),W(4,S.INotificationService),W(5,s.ITelemetryService),W(6,r.IStorageService),W(7,p.IExtensionService),W(8,u.ILogService)],d),e.EditorResolverService=d,(0,l.registerSingleton)(o.IEditorResolverService,d)}),define(ne[858],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.allApiProposals=void 0,e.allApiProposals=Object.freeze({authSession:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.authSession.d.ts",badges:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.badges.d.ts",commentsResolvedState:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.commentsResolvedState.d.ts",contribLabelFormatterWorkspaceTooltip:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribLabelFormatterWorkspaceTooltip.d.ts",contribMenuBarHome:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribMenuBarHome.d.ts",contribRemoteHelp:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribRemoteHelp.d.ts",contribViewsRemote:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribViewsRemote.d.ts",contribViewsWelcome:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribViewsWelcome.d.ts",customEditorMove:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.customEditorMove.d.ts",diffCommand:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.diffCommand.d.ts",documentFiltersExclusive:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.documentFiltersExclusive.d.ts",editorInsets:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.editorInsets.d.ts",extensionRuntime:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.extensionRuntime.d.ts",externalUriOpener:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.externalUriOpener.d.ts",fileSearchProvider:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.fileSearchProvider.d.ts",findTextInFiles:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.findTextInFiles.d.ts",fsChunks:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.fsChunks.d.ts",idToken:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.idToken.d.ts",inlineCompletions:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.inlineCompletions.d.ts",inlineCompletionsAdditions:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts",inlineCompletionsNew:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.inlineCompletionsNew.d.ts",inputBoxSeverity:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.inputBoxSeverity.d.ts",ipc:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.ipc.d.ts",notebookCellExecutionState:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookCellExecutionState.d.ts",notebookConcatTextDocument:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookConcatTextDocument.d.ts",notebookContentProvider:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookContentProvider.d.ts",notebookControllerKind:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookControllerKind.d.ts",notebookDebugOptions:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookDebugOptions.d.ts",notebookDeprecated:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookDeprecated.d.ts",notebookDocumentEvents:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookDocumentEvents.d.ts",notebookEditor:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookEditor.d.ts",notebookEditorDecorationType:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookEditorDecorationType.d.ts",notebookEditorEdit:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookEditorEdit.d.ts",notebookLiveShare:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookLiveShare.d.ts",notebookMessaging:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookMessaging.d.ts",notebookMime:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookMime.d.ts",portsAttributes:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.portsAttributes.d.ts",quickPickSortByLabel:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.quickPickSortByLabel.d.ts",resolvers:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.resolvers.d.ts",scmActionButton:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmActionButton.d.ts",scmSelectedProvider:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmSelectedProvider.d.ts",scmValidation:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmValidation.d.ts",tabs:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.tabs.d.ts",taskPresentationGroup:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.taskPresentationGroup.d.ts",telemetry:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.telemetry.d.ts",terminalDataWriteEvent:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalDataWriteEvent.d.ts",terminalDimensions:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalDimensions.d.ts",terminalNameChangeEvent:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalNameChangeEvent.d.ts",testCoverage:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.testCoverage.d.ts",testObserver:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.testObserver.d.ts",textDocumentNotebook:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.textDocumentNotebook.d.ts",textEditorDrop:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.textEditorDrop.d.ts",textSearchProvider:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.textSearchProvider.d.ts",timeline:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.timeline.d.ts",tokenInformation:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.tokenInformation.d.ts",treeViewReveal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.treeViewReveal.d.ts",workspaceTrust:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.workspaceTrust.d.ts"})}),define(ne[133],re([1,0,1876,22,81,79,146,17,107,858,143,46]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsRegistry=e.ExtensionsRegistryImpl=e.schema=e.ExtensionPoint=e.ExtensionPointUserDelta=e.ExtensionMessageCollector=void 0;const o=D.Registry.as(k.Extensions.JSONContribution);class c{constructor(a,n,h){this._messageHandler=a,this._extension=n,this._extensionPointId=h}_msg(a,n){this._messageHandler({type:a,message:n,extensionId:this._extension.identifier,extensionPointId:this._extensionPointId})}error(a){this._msg(_.default.Error,a)}warn(a){this._msg(_.default.Warning,a)}info(a){this._msg(_.default.Info,a)}}e.ExtensionMessageCollector=c;class i{constructor(a,n){this.added=a,this.removed=n}static _toSet(a){const n=new Set;for(let h=0,g=a.length;h<g;h++)n.add(I.ExtensionIdentifier.toKey(a[h].description.identifier));return n}static compute(a,n){if(!a||!a.length)return new i(n,[]);if(!n||!n.length)return new i([],a);const h=this._toSet(a),g=this._toSet(n);let d=n.filter(b=>!h.has(I.ExtensionIdentifier.toKey(b.description.identifier))),m=a.filter(b=>!g.has(I.ExtensionIdentifier.toKey(b.description.identifier)));return new i(d,m)}}e.ExtensionPointUserDelta=i;class S{constructor(a,n){this.name=a,this.defaultExtensionKind=n,this._handler=null,this._users=null,this._delta=null}setHandler(a){if(this._handler!==null)throw new Error("Handler already set!");this._handler=a,this._handle()}acceptUsers(a){this._delta=i.compute(this._users,a),this._users=a,this._handle()}_handle(){if(!(this._handler===null||this._users===null||this._delta===null))try{this._handler(this._users,this._delta)}catch(a){(0,f.onUnexpectedError)(a)}}}e.ExtensionPoint=S;const s={type:"string",enum:["ui","workspace"],enumDescriptions:[t.localize(0,null),t.localize(1,null)]},l="vscode://schemas/vscode-extensions";e.schema={properties:{engines:{type:"object",description:t.localize(2,null),properties:{vscode:{type:"string",description:t.localize(3,null),default:"^1.22.0"}}},publisher:{description:t.localize(4,null),type:"string"},displayName:{description:t.localize(5,null),type:"string"},categories:{description:t.localize(6,null),type:"array",uniqueItems:!0,items:{oneOf:[{type:"string",enum:I.EXTENSION_CATEGORIES},{type:"string",const:"Languages",deprecationMessage:t.localize(7,null)}]}},galleryBanner:{type:"object",description:t.localize(8,null),properties:{color:{description:t.localize(9,null),type:"string"},theme:{description:t.localize(10,null),type:"string",enum:["dark","light"]}}},contributes:{description:t.localize(11,null),type:"object",properties:{},default:{}},preview:{type:"boolean",description:t.localize(12,null)},enableProposedApi:{type:"boolean",deprecationMessage:t.localize(13,null)},enabledApiProposals:{markdownDescription:t.localize(14,null),type:"array",uniqueItems:!0,items:{type:"string",enum:Object.keys(w.allApiProposals),markdownEnumDescriptions:(0,v.values)(w.allApiProposals)}},activationEvents:{description:t.localize(15,null),type:"array",items:{type:"string",defaultSnippets:[{label:"onWebviewPanel",description:t.localize(16,null),body:"onWebviewPanel:viewType"},{label:"onLanguage",description:t.localize(17,null),body:"onLanguage:${1:languageId}"},{label:"onCommand",description:t.localize(18,null),body:"onCommand:${2:commandId}"},{label:"onDebug",description:t.localize(19,null),body:"onDebug"},{label:"onDebugInitialConfigurations",description:t.localize(20,null),body:"onDebugInitialConfigurations"},{label:"onDebugDynamicConfigurations",description:t.localize(21,null),body:"onDebugDynamicConfigurations"},{label:"onDebugResolve",description:t.localize(22,null),body:"onDebugResolve:${6:type}"},{label:"onDebugAdapterProtocolTracker",description:t.localize(23,null),body:"onDebugAdapterProtocolTracker:${6:type}"},{label:"workspaceContains",description:t.localize(24,null),body:"workspaceContains:${4:filePattern}"},{label:"onStartupFinished",description:t.localize(25,null),body:"onStartupFinished"},{label:"onTaskType",description:t.localize(26,null),body:"onTaskType:${1:taskType}"},{label:"onFileSystem",description:t.localize(27,null),body:"onFileSystem:${1:scheme}"},{label:"onSearch",description:t.localize(28,null),body:"onSearch:${7:scheme}"},{label:"onView",body:"onView:${5:viewId}",description:t.localize(29,null)},{label:"onIdentity",body:"onIdentity:${8:identity}",description:t.localize(30,null)},{label:"onUri",body:"onUri",description:t.localize(31,null)},{label:"onOpenExternalUri",body:"onOpenExternalUri",description:t.localize(32,null)},{label:"onCustomEditor",body:"onCustomEditor:${9:viewType}",description:t.localize(33,null)},{label:"onNotebook",body:"onNotebook:${1:type}",description:t.localize(34,null)},{label:"onAuthenticationRequest",body:"onAuthenticationRequest:${11:authenticationProviderId}",description:t.localize(35,null)},{label:"onRenderer",description:t.localize(36,null),body:"onRenderer:${11:rendererId}"},{label:"onTerminalProfile",body:"onTerminalProfile:${1:terminalId}",description:t.localize(37,null)},{label:"onWalkthrough",body:"onWalkthrough:${1:walkthroughID}",description:t.localize(38,null)},{label:"*",description:t.localize(39,null),body:"*"}]}},badges:{type:"array",description:t.localize(40,null),items:{type:"object",required:["url","href","description"],properties:{url:{type:"string",description:t.localize(41,null)},href:{type:"string",description:t.localize(42,null)},description:{type:"string",description:t.localize(43,null)}}}},markdown:{type:"string",description:t.localize(44,null),enum:["github","standard"],default:"github"},qna:{default:"marketplace",description:t.localize(45,null),anyOf:[{type:["string","boolean"],enum:["marketplace",!1]},{type:"string"}]},extensionDependencies:{description:t.localize(46,null),type:"array",uniqueItems:!0,items:{type:"string",pattern:A.EXTENSION_IDENTIFIER_PATTERN}},extensionPack:{description:t.localize(47,null),type:"array",uniqueItems:!0,items:{type:"string",pattern:A.EXTENSION_IDENTIFIER_PATTERN}},extensionKind:{description:t.localize(48,null),type:"array",items:s,default:["workspace"],defaultSnippets:[{body:["ui"],description:t.localize(49,null)},{body:["workspace"],description:t.localize(50,null)},{body:["ui","workspace"],description:t.localize(51,null)},{body:["workspace","ui"],description:t.localize(52,null)},{body:[],description:t.localize(53,null)}]},capabilities:{description:t.localize(54,null),type:"object",properties:{virtualWorkspaces:{description:t.localize(55,null),type:["boolean","object"],defaultSnippets:[{label:"limited",body:{supported:"${1:limited}",description:"${2}"}},{label:"false",body:{supported:!1,description:"${2}"}}],default:(!0).valueOf,properties:{supported:{markdownDescription:t.localize(56,null),type:["string","boolean"],enum:["limited",!0,!1],enumDescriptions:[t.localize(57,null),t.localize(58,null),t.localize(59,null)]},description:{type:"string",markdownDescription:t.localize(60,null)}}},untrustedWorkspaces:{description:t.localize(61,null),type:"object",required:["supported"],defaultSnippets:[{body:{supported:"${1:limited}",description:"${2}"}}],properties:{supported:{markdownDescription:t.localize(62,null),type:["string","boolean"],enum:["limited",!0,!1],enumDescriptions:[t.localize(63,null),t.localize(64,null),t.localize(65,null)]},restrictedConfigurations:{description:t.localize(66,null),type:"array",items:{type:"string"}},description:{type:"string",markdownDescription:t.localize(67,null)}}}}},scripts:{type:"object",properties:{"vscode:prepublish":{description:t.localize(68,null),type:"string"},"vscode:uninstall":{description:t.localize(69,null),type:"string"}}},icon:{type:"string",description:t.localize(70,null)}}};class r{constructor(){this._extensionPoints=new Map}registerExtensionPoint(a){if(this._extensionPoints.has(a.extensionPoint))throw new Error("Duplicate extension point: "+a.extensionPoint);const n=new S(a.extensionPoint,a.defaultExtensionKind);return this._extensionPoints.set(a.extensionPoint,n),e.schema.properties.contributes.properties[a.extensionPoint]=a.jsonSchema,o.registerSchema(l,e.schema),n}getExtensionPoints(){return Array.from(this._extensionPoints.values())}}e.ExtensionsRegistryImpl=r;const p={ExtensionsRegistry:"ExtensionsRegistry"};D.Registry.add(p.ExtensionsRegistry,new r),e.ExtensionsRegistry=D.Registry.as(p.ExtensionsRegistry),o.registerSchema(l,e.schema),o.registerSchema(C.productSchemaId,{properties:{extensionEnabledApiProposals:{description:t.localize(71,null),type:"object",properties:{},additionalProperties:{anyOf:[{type:"array",uniqueItems:!0,items:{type:"string",enum:Object.keys(w.allApiProposals),markdownEnumDescriptions:(0,v.values)(w.allApiProposals)}}]}}}})}),define(ne[2322],re([1,0,1367,51,17,133,57,146,191,13,107]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const C=_.Registry.as(D.Extensions.JSONContribution),o=_.Registry.as(k.Extensions.Configuration),c={type:"object",defaultSnippets:[{body:{title:"",properties:{}}}],properties:{title:{description:t.localize(0,null),type:"string"},order:{description:t.localize(1,null),type:"integer"},properties:{description:t.localize(2,null),type:"object",propertyNames:{pattern:"\\S+",patternErrorMessage:t.localize(3,null)},additionalProperties:{anyOf:[{title:t.localize(4,null),$ref:"http://json-schema.org/draft-07/schema#"},{type:"object",properties:{isExecutable:{type:"boolean",markdownDeprecationMessage:"This property is deprecated. Instead use `scope` property and set it to `machine` value."},scope:{type:"string",enum:["application","machine","window","resource","language-overridable","machine-overridable"],default:"window",enumDescriptions:[t.localize(5,null),t.localize(6,null),t.localize(7,null),t.localize(8,null),t.localize(9,null),t.localize(10,null)],markdownDescription:t.localize(11,null)},enumDescriptions:{type:"array",items:{type:"string"},description:t.localize(12,null)},markdownEnumDescriptions:{type:"array",items:{type:"string"},description:t.localize(13,null)},markdownDescription:{type:"string",description:t.localize(14,null)},deprecationMessage:{type:"string",description:t.localize(15,null)},markdownDeprecationMessage:{type:"string",description:t.localize(16,null)},editPresentation:{type:"string",enum:["singlelineText","multilineText"],enumDescriptions:[t.localize(17,null),t.localize(18,null)],default:"singlelineText",description:t.localize(19,null)},order:{type:"integer",description:t.localize(20,null)}}}]}}}},i=A.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"configurationDefaults",jsonSchema:{$ref:k.configurationDefaultsSchemaId}});i.setHandler((l,{added:r,removed:p})=>{if(p.length){const u=p.map(a=>({overrides:f.deepClone(a.value),source:{id:a.description.identifier.value,displayName:a.description.displayName}}));o.deregisterDefaultConfigurations(u)}if(r.length){const u=o.getConfigurationProperties(),a=[6,3,4,5],n=r.map(h=>{const g=f.deepClone(h.value);for(const d of Object.keys(g))if(!k.OVERRIDE_PROPERTY_REGEX.test(d)){const m=u[d];m?.scope&&!a.includes(m.scope)&&(h.collector.warn(t.localize(21,null,d)),delete g[d])}return{overrides:g,source:{id:h.description.identifier.value,displayName:h.description.displayName}}});o.registerDefaultConfigurations(n)}});const S=A.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"configuration",deps:[i],jsonSchema:{description:t.localize(22,null),oneOf:[c,{type:"array",items:c}]}}),s=new Map;S.setHandler((l,{added:r,removed:p})=>{if(p.length){const h=[];for(const g of p){const d=v.ExtensionIdentifier.toKey(g.description.identifier);h.push(...s.get(d)||[]),s.delete(d)}o.deregisterConfigurations(h)}const u=new Set;function a(h,g){const d=[];let m=f.deepClone(h);return m.title&&typeof m.title!="string"&&g.collector.error(t.localize(23,null)),n(m,g),m.id=h.id||g.description.identifier.value,m.extensionInfo={id:g.description.identifier.value,displayName:g.description.displayName},m.restrictedProperties=g.description.capabilities?.untrustedWorkspaces?.supported==="limited"?g.description.capabilities?.untrustedWorkspaces.restrictedConfigurations:void 0,m.title=m.title||g.description.displayName||g.description.identifier.value,d.push(m),d}function n(h,g){let d=h.properties;if(d){typeof d!="object"&&(g.collector.error(t.localize(24,null)),h.properties={});for(let b in d){const E=(0,k.validateProperty)(b);if(E){delete d[b],g.collector.warn(E);continue}if(u.has(b)){delete d[b],g.collector.warn(t.localize(25,null,b));continue}const y=d[b];if(!(0,w.isObject)(y)){delete d[b],g.collector.error(t.localize(26,null,b));continue}u.add(b),y.scope?y.scope.toString()==="application"?y.scope=1:y.scope.toString()==="machine"?y.scope=2:y.scope.toString()==="resource"?y.scope=4:y.scope.toString()==="machine-overridable"?y.scope=6:y.scope.toString()==="language-overridable"?y.scope=5:y.scope=3:y.scope=3}}let m=h.allOf;if(m){g.collector.error(t.localize(27,null));for(let b of m)n(b,g)}}if(r.length){const h=[];for(let g of r){const d=[],m=g.value;Array.isArray(m)?m.forEach(b=>d.push(...a(b,g))):d.push(...a(m,g)),s.set(v.ExtensionIdentifier.toKey(g.description.identifier),d),h.push(...d)}o.registerConfigurations(h,!1)}}),C.registerSchema("vscode://schemas/workspaceConfig",{allowComments:!0,allowTrailingCommas:!0,default:{folders:[{path:""}],settings:{}},required:["folders"],properties:{folders:{minItems:0,uniqueItems:!0,description:t.localize(28,null),items:{type:"object",defaultSnippets:[{body:{path:"$1"}}],oneOf:[{properties:{path:{type:"string",description:t.localize(29,null)},name:{type:"string",description:t.localize(30,null)}},required:["path"]},{properties:{uri:{type:"string",description:t.localize(31,null)},name:{type:"string",description:t.localize(32,null)}},required:["uri"]}]}},settings:{type:"object",default:{},description:t.localize(33,null),$ref:I.workspaceSettingsSchemaId},launch:{type:"object",default:{configurations:[],compounds:[]},description:t.localize(34,null),$ref:I.launchSchemaId},tasks:{type:"object",default:{version:"2.0.0",tasks:[]},description:t.localize(35,null),$ref:I.tasksSchemaId},extensions:{type:"object",default:{},description:t.localize(36,null),$ref:"vscode://schemas/extensions"},remoteAuthority:{type:"string",doNotSuggest:!0,description:t.localize(37,null)},transient:{type:"boolean",doNotSuggest:!0,description:t.localize(38,null)}},errorMessage:t.localize(39,null)})}),define(ne[2323],re([1,0,1368,133,19,13]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JSONValidationExtensionPoint=void 0;const k=f.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"jsonValidation",defaultExtensionKind:["workspace","web"],jsonSchema:{description:t.localize(0,null),type:"array",defaultSnippets:[{body:[{fileMatch:"${1:file.json}",url:"${2:url}"}]}],items:{type:"object",defaultSnippets:[{body:{fileMatch:"${1:file.json}",url:"${2:url}"}}],properties:{fileMatch:{type:["string","array"],description:t.localize(1,null),items:{type:["string"]}},url:{description:t.localize(2,null),type:"string"}}}}});class D{constructor(){k.setHandler(w=>{for(const v of w){const C=v.value,o=v.collector,c=v.description.extensionLocation;if(!C||!Array.isArray(C)){o.error(t.localize(3,null));return}C.forEach(i=>{if(!(0,A.isString)(i.fileMatch)&&!(Array.isArray(i.fileMatch)&&i.fileMatch.every(A.isString))){o.error(t.localize(4,null));return}let S=i.url;if(!(0,A.isString)(S)){o.error(t.localize(5,null));return}if(S.startsWith("./"))try{const s=_.joinPath(c,S);_.isEqualOrParent(s,c)||o.warn(t.localize(6,null,k.name,s.toString(),c.path))}catch(s){o.error(t.localize(7,null,s.message))}else if(!/^[^:/?#]+:\/\//.test(S)){o.error(t.localize(8,null));return}})}})}}e.JSONValidationExtensionPoint=D}),define(ne[859],re([1,0,133,1529,191,839]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.launchSchema=e.presentationSchema=e.breakpointsExtPoint=e.debuggersExtPoint=void 0,e.debuggersExtPoint=t.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"debuggers",defaultExtensionKind:["workspace"],jsonSchema:{description:f.localize(0,null),type:"array",defaultSnippets:[{body:[{type:""}]}],items:{additionalProperties:!1,type:"object",defaultSnippets:[{body:{type:"",program:"",runtime:""}}],properties:{type:{description:f.localize(1,null),type:"string"},label:{description:f.localize(2,null),type:"string"},program:{description:f.localize(3,null),type:"string"},args:{description:f.localize(4,null),type:"array"},runtime:{description:f.localize(5,null),type:"string"},runtimeArgs:{description:f.localize(6,null),type:"array"},variables:{description:f.localize(7,null),type:"object"},initialConfigurations:{description:f.localize(8,null),type:["array","string"]},languages:{description:f.localize(9,null),type:"array"},configurationSnippets:{description:f.localize(10,null),type:"array"},configurationAttributes:{description:f.localize(11,null),type:"object"},when:{description:f.localize(12,null),type:"string",default:""},windows:{description:f.localize(13,null),type:"object",properties:{runtime:{description:f.localize(14,null),type:"string"}}},osx:{description:f.localize(15,null),type:"object",properties:{runtime:{description:f.localize(16,null),type:"string"}}},linux:{description:f.localize(17,null),type:"object",properties:{runtime:{description:f.localize(18,null),type:"string"}}}}}}}),e.breakpointsExtPoint=t.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"breakpoints",jsonSchema:{description:f.localize(19,null),type:"array",defaultSnippets:[{body:[{language:""}]}],items:{type:"object",additionalProperties:!1,defaultSnippets:[{body:{language:""}}],properties:{language:{description:f.localize(20,null),type:"string"}}}}}),e.presentationSchema={type:"object",description:f.localize(21,null),properties:{hidden:{type:"boolean",default:!1,description:f.localize(22,null)},group:{type:"string",default:"",description:f.localize(23,null)},order:{type:"number",default:1,description:f.localize(24,null)}},default:{hidden:!1,group:"",order:1}};const k={name:"Compound",configurations:[]};e.launchSchema={id:_.launchSchemaId,type:"object",title:f.localize(25,null),allowTrailingCommas:!0,allowComments:!0,required:[],default:{version:"0.2.0",configurations:[],compounds:[]},properties:{version:{type:"string",description:f.localize(26,null),default:"0.2.0"},configurations:{type:"array",description:f.localize(27,null),items:{defaultSnippets:[],type:"object",oneOf:[]}},compounds:{type:"array",description:f.localize(28,null),items:{type:"object",required:["name","configurations"],properties:{name:{type:"string",description:f.localize(29,null)},presentation:e.presentationSchema,configurations:{type:"array",default:[],items:{oneOf:[{enum:[],description:f.localize(30,null)},{type:"object",required:["name"],properties:{name:{enum:[],description:f.localize(31,null)},folder:{enum:[],description:f.localize(32,null)}}}]},description:f.localize(33,null)},stopAll:{type:"boolean",default:!1,description:f.localize(34,null)},preLaunchTask:{type:"string",default:"",description:f.localize(35,null)}},default:k},default:[k]},inputs:A.inputsSchema.definitions.inputs}}}),define(ne[2324],re([1,0,1645,133,64]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.notebookRendererExtensionPoint=e.notebooksExtensionPoint=void 0;var A;(function(w){w.type="type",w.displayName="displayName",w.selector="selector",w.priority="priority"})(A||(A={}));var k;(function(w){w.id="id",w.displayName="displayName",w.mimeTypes="mimeTypes",w.entrypoint="entrypoint",w.hardDependencies="dependencies",w.optionalDependencies="optionalDependencies",w.requiresMessaging="requiresMessaging"})(k||(k={}));const D={description:t.localize(0,null),type:"array",defaultSnippets:[{body:[{type:"",displayName:"",selector:[{filenamePattern:""}]}]}],items:{type:"object",required:[A.type,A.displayName,A.selector],properties:{[A.type]:{type:"string",description:t.localize(1,null)},[A.displayName]:{type:"string",description:t.localize(2,null)},[A.selector]:{type:"array",description:t.localize(3,null),items:{type:"object",properties:{filenamePattern:{type:"string",description:t.localize(4,null)},excludeFileNamePattern:{type:"string",description:t.localize(5,null)}}}},[A.priority]:{type:"string",markdownDeprecationMessage:t.localize(6,null),enum:[_.NotebookEditorPriority.default,_.NotebookEditorPriority.option],markdownEnumDescriptions:[t.localize(7,null),t.localize(8,null)],default:"default"}}}},I={description:t.localize(9,null),type:"array",defaultSnippets:[{body:[{id:"",displayName:"",mimeTypes:[""],entrypoint:""}]}],items:{type:"object",required:[k.id,k.displayName,k.mimeTypes,k.entrypoint],properties:{[k.id]:{type:"string",description:t.localize(10,null)},[k.displayName]:{type:"string",description:t.localize(11,null)},[k.mimeTypes]:{type:"array",description:t.localize(12,null),items:{type:"string"}},[k.entrypoint]:{description:t.localize(13,null),oneOf:[{type:"string"}]},[k.hardDependencies]:{type:"array",uniqueItems:!0,items:{type:"string"},markdownDescription:t.localize(14,null)},[k.optionalDependencies]:{type:"array",uniqueItems:!0,items:{type:"string"},markdownDescription:t.localize(15,null)},[k.requiresMessaging]:{default:"never",enum:["always","optional","never"],enumDescriptions:[t.localize(16,null),t.localize(17,null),t.localize(18,null)],description:t.localize(19,null)}}}};e.notebooksExtensionPoint=f.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"notebooks",jsonSchema:D}),e.notebookRendererExtensionPoint=f.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"notebookRenderer",jsonSchema:I})}),define(ne[297],re([1,0,1744,51,29,515,48,13,89,14,81,9,645,125,133,6]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProblemMatcherRegistry=e.ProblemMatcherParser=e.ProblemPatternRegistry=e.Schemas=e.ExtensionRegistryReporter=e.ProblemPatternParser=e.Config=e.createLineMatcher=e.getResource=e.isNamedProblemMatcher=e.ApplyToKind=e.ProblemLocationKind=e.FileLocationKind=void 0;var s;(function(L){L[L.Default=0]="Default",L[L.Relative=1]="Relative",L[L.Absolute=2]="Absolute",L[L.AutoDetect=3]="AutoDetect"})(s=e.FileLocationKind||(e.FileLocationKind={})),function(L){function M(N){return N=N.toLowerCase(),N==="absolute"?L.Absolute:N==="relative"?L.Relative:N==="autodetect"?L.AutoDetect:void 0}L.fromString=M}(s=e.FileLocationKind||(e.FileLocationKind={}));var l;(function(L){L[L.File=0]="File",L[L.Location=1]="Location"})(l=e.ProblemLocationKind||(e.ProblemLocationKind={})),function(L){function M(N){return N=N.toLowerCase(),N==="file"?L.File:N==="location"?L.Location:void 0}L.fromString=M}(l=e.ProblemLocationKind||(e.ProblemLocationKind={}));var r;(function(L){L[L.allDocuments=0]="allDocuments",L[L.openDocuments=1]="openDocuments",L[L.closedDocuments=2]="closedDocuments"})(r=e.ApplyToKind||(e.ApplyToKind={})),function(L){function M(N){return N=N.toLowerCase(),N==="alldocuments"?L.allDocuments:N==="opendocuments"?L.openDocuments:N==="closeddocuments"?L.closedDocuments:void 0}L.fromString=M}(r=e.ApplyToKind||(e.ApplyToKind={}));function p(L){return!!(L&&D.isString(L.name))}e.isNamedProblemMatcher=p;async function u(L,M,N){let B=M.fileLocation,P;if(B===s.Absolute)P=L;else if(B===s.Relative&&M.filePrefix)P=(0,k.join)(M.filePrefix,L);else if(B===s.AutoDetect){const V=f.deepClone(M);if(V.fileLocation=s.Relative,N){const z=await u(L,V);let U;try{U=await N.stat(z)}catch{}if(U)return z}return V.fileLocation=s.Absolute,u(L,V)}if(P===void 0)throw new Error("FileLocationKind is not actionable. Does the matcher have a filePrefix? This should never happen.");return P=(0,k.normalize)(P),P=P.replace(/\\/g,"/"),P[0]!=="/"&&(P="/"+P),M.uriProvider!==void 0?M.uriProvider(P):C.URI.file(P)}e.getResource=u;function a(L,M){let N=L.pattern;return D.isArray(N)?new d(L,M):new g(L,M)}e.createLineMatcher=a;const n=w.OS===1?`\r `:` `;class h{constructor(M,N){this.matcher=M,this.fileService=N}handle(M,N=0){return{match:null,continue:!1}}next(M){return null}fillProblemData(M,N,B){return M?(this.fillProperty(M,"file",N,B,!0),this.appendProperty(M,"message",N,B,!0),this.fillProperty(M,"code",N,B,!0),this.fillProperty(M,"severity",N,B,!0),this.fillProperty(M,"location",N,B,!0),this.fillProperty(M,"line",N,B),this.fillProperty(M,"character",N,B),this.fillProperty(M,"endLine",N,B),this.fillProperty(M,"endCharacter",N,B),!0):!1}appendProperty(M,N,B,P,V=!1){const z=B[N];if(D.isUndefined(M[N]))this.fillProperty(M,N,B,P,V);else if(!D.isUndefined(z)&&z<P.length){let U=P[z];V&&(U=_.trim(U)),M[N]+=n+U}}fillProperty(M,N,B,P,V=!1){const z=B[N];if(D.isUndefined(M[N])&&!D.isUndefined(z)&&z<P.length){let U=P[z];U!==void 0&&(V&&(U=_.trim(U)),M[N]=U)}}getMarkerMatch(M){try{let N=this.getLocation(M);if(M.file&&N&&M.message){let B={severity:this.getSeverity(M),startLineNumber:N.startLineNumber,startColumn:N.startCharacter,endLineNumber:N.endLineNumber,endColumn:N.endCharacter,message:M.message};return M.code!==void 0&&(B.code=M.code),this.matcher.source!==void 0&&(B.source=this.matcher.source),{description:this.matcher,resource:this.getResource(M.file),marker:B}}}catch{console.error(`Failed to convert problem data into match: ${JSON.stringify(M)}`)}}getResource(M){return u(M,this.matcher,this.fileService)}getLocation(M){if(M.kind===l.File)return this.createLocation(0,0,0,0);if(M.location)return this.parseLocationInfo(M.location);if(!M.line)return null;let N=parseInt(M.line),B=M.character?parseInt(M.character):void 0,P=M.endLine?parseInt(M.endLine):void 0,V=M.endCharacter?parseInt(M.endCharacter):void 0;return this.createLocation(N,B,P,V)}parseLocationInfo(M){if(!M||!M.match(/(\d+|\d+,\d+|\d+,\d+,\d+,\d+)/))return null;let N=M.split(","),B=parseInt(N[0]),P=N.length>1?parseInt(N[1]):void 0;return N.length>3?this.createLocation(B,P,parseInt(N[2]),parseInt(N[3])):this.createLocation(B,P,void 0,void 0)}createLocation(M,N,B,P){return N!==void 0&&P!==void 0?{startLineNumber:M,startCharacter:N,endLineNumber:B||M,endCharacter:P}:N!==void 0?{startLineNumber:M,startCharacter:N,endLineNumber:M,endCharacter:N}:{startLineNumber:M,startCharacter:1,endLineNumber:M,endCharacter:2**31-1}}getSeverity(M){let N=null;if(M.severity){let B=M.severity;B&&(N=v.default.fromValue(B),N===v.default.Ignore&&(B==="E"?N=v.default.Error:B==="W"?N=v.default.Warning:(B==="I"||_.equalsIgnoreCase(B,"hint")||_.equalsIgnoreCase(B,"note"))&&(N=v.default.Info)))}return(N===null||N===v.default.Ignore)&&(N=this.matcher.severity||v.default.Error),c.MarkerSeverity.fromSeverity(N)}}class g extends h{constructor(M,N){super(M,N);this.pattern=M.pattern}get matchLength(){return 1}handle(M,N=0){A.ok(M.length-N==1);let B=Object.create(null);this.pattern.kind!==void 0&&(B.kind=this.pattern.kind);let P=this.pattern.regexp.exec(M[N]);if(P){this.fillProblemData(B,this.pattern,P);let V=this.getMarkerMatch(B);if(V)return{match:V,continue:!1}}return{match:null,continue:!1}}next(M){return null}}class d extends h{constructor(M,N){super(M,N);this.patterns=M.pattern}get matchLength(){return this.patterns.length}handle(M,N=0){A.ok(M.length-N===this.patterns.length),this.data=Object.create(null);let B=this.data;B.kind=this.patterns[0].kind;for(let z=0;z<this.patterns.length;z++){let U=this.patterns[z],H=U.regexp.exec(M[z+N]);if(H)U.loop&&z===this.patterns.length-1&&(B=f.deepClone(B)),this.fillProblemData(B,U,H);else return{match:null,continue:!1}}let P=!!this.patterns[this.patterns.length-1].loop;P||(this.data=void 0);const V=B?this.getMarkerMatch(B):null;return{match:V||null,continue:P}}next(M){let N=this.patterns[this.patterns.length-1];A.ok(N.loop===!0&&this.data!==null);let B=N.regexp.exec(M);if(!B)return this.data=void 0,null;let P=f.deepClone(this.data),V;return this.fillProblemData(P,N,B)&&(V=this.getMarkerMatch(P)),V||null}}var m;(function(L){let M;(function(H){function K(G){let q=G;return q&&D.isString(q.regexp)}H.is=K})(M=L.CheckedProblemPattern||(L.CheckedProblemPattern={}));let N;(function(H){function K(G){let q=G;return q&&D.isString(q.name)}H.is=K})(N=L.NamedProblemPattern||(L.NamedProblemPattern={}));let B;(function(H){function K(G){let q=G;return q&&N.is(q)&&D.isString(q.regexp)}H.is=K})(B=L.NamedCheckedProblemPattern||(L.NamedCheckedProblemPattern={}));let P;(function(H){function K(G){return G&&D.isArray(G)}H.is=K})(P=L.MultiLineProblemPattern||(L.MultiLineProblemPattern={}));let V;(function(H){function K(G){if(!P.is(G))return!1;for(const q of G)if(!L.CheckedProblemPattern.is(q))return!1;return!0}H.is=K})(V=L.MultiLineCheckedProblemPattern||(L.MultiLineCheckedProblemPattern={}));let z;(function(H){function K(G){let q=G;return q&&D.isString(q.name)&&D.isArray(q.patterns)&&V.is(q.patterns)}H.is=K})(z=L.NamedMultiLineCheckedProblemPattern||(L.NamedMultiLineCheckedProblemPattern={}));function U(H){return D.isString(H.name)}L.isNamedProblemMatcher=U})(m=e.Config||(e.Config={}));class b extends o.Parser{constructor(M){super(M)}parse(M){if(m.NamedMultiLineCheckedProblemPattern.is(M))return this.createNamedMultiLineProblemPattern(M);if(m.MultiLineCheckedProblemPattern.is(M))return this.createMultiLineProblemPattern(M);if(m.NamedCheckedProblemPattern.is(M)){let N=this.createSingleProblemPattern(M);return N.name=M.name,N}else return m.CheckedProblemPattern.is(M)?this.createSingleProblemPattern(M):(this.error((0,t.localize)(0,null)),null)}createSingleProblemPattern(M){let N=this.doCreateSingleProblemPattern(M,!0);return N===void 0?null:(N.kind===void 0&&(N.kind=l.Location),this.validateProblemPattern([N])?N:null)}createNamedMultiLineProblemPattern(M){const N=this.createMultiLineProblemPattern(M.patterns);return N?{name:M.name,label:M.label?M.label:M.name,patterns:N}:null}createMultiLineProblemPattern(M){let N=[];for(let B=0;B<M.length;B++){let P=this.doCreateSingleProblemPattern(M[B],!1);if(P===void 0)return null;B<M.length-1&&!D.isUndefined(P.loop)&&P.loop&&(P.loop=!1,this.error((0,t.localize)(1,null))),N.push(P)}return N[0].kind===void 0&&(N[0].kind=l.Location),this.validateProblemPattern(N)?N:null}doCreateSingleProblemPattern(M,N){const B=this.createRegularExpression(M.regexp);if(B===void 0)return;let P={regexp:B};M.kind&&(P.kind=l.fromString(M.kind));function V(z,U,H,K){const G=U[K];typeof G=="number"&&(z[H]=G)}if(V(P,M,"file","file"),V(P,M,"location","location"),V(P,M,"line","line"),V(P,M,"character","column"),V(P,M,"endLine","endLine"),V(P,M,"endCharacter","endColumn"),V(P,M,"severity","severity"),V(P,M,"code","code"),V(P,M,"message","message"),(M.loop===!0||M.loop===!1)&&(P.loop=M.loop),N)if(P.location||P.kind===l.File){let z={file:1,message:0};P=f.mixin(P,z,!1)}else{let z={file:1,line:2,character:3,message:0};P=f.mixin(P,z,!1)}return P}validateProblemPattern(M){let N=!1,B=!1,P=!1,V=!1,z=M[0].kind===void 0?l.Location:M[0].kind;return M.forEach((U,H)=>{H!==0&&U.kind&&this.error((0,t.localize)(2,null)),N=N||!D.isUndefined(U.file),B=B||!D.isUndefined(U.message),P=P||!D.isUndefined(U.location),V=V||!D.isUndefined(U.line)}),N&&B?z===l.Location&&!(P||V)?(this.error((0,t.localize)(4,null)),!1):!0:(this.error((0,t.localize)(3,null)),!1)}createRegularExpression(M){let N;try{N=new RegExp(M)}catch{this.error((0,t.localize)(5,null,M))}return N}}e.ProblemPatternParser=b;class E{constructor(M,N=new o.ValidationStatus){this._collector=M,this._validationStatus=N}info(M){this._validationStatus.state=1,this._collector.info(M)}warn(M){this._validationStatus.state=2,this._collector.warn(M)}error(M){this._validationStatus.state=3,this._collector.error(M)}fatal(M){this._validationStatus.state=4,this._collector.error(M)}get status(){return this._validationStatus}}e.ExtensionRegistryReporter=E;var y;(function(L){L.ProblemPattern={default:{regexp:"^([^\\\\s].*)\\\\((\\\\d+,\\\\d+)\\\\):\\\\s*(.*)$",file:1,location:2,message:3},type:"object",additionalProperties:!1,properties:{regexp:{type:"string",description:(0,t.localize)(6,null)},kind:{type:"string",description:(0,t.localize)(7,null)},file:{type:"integer",description:(0,t.localize)(8,null)},location:{type:"integer",description:(0,t.localize)(9,null)},line:{type:"integer",description:(0,t.localize)(10,null)},column:{type:"integer",description:(0,t.localize)(11,null)},endLine:{type:"integer",description:(0,t.localize)(12,null)},endColumn:{type:"integer",description:(0,t.localize)(13,null)},severity:{type:"integer",description:(0,t.localize)(14,null)},code:{type:"integer",description:(0,t.localize)(15,null)},message:{type:"integer",description:(0,t.localize)(16,null)},loop:{type:"boolean",description:(0,t.localize)(17,null)}}},L.NamedProblemPattern=f.deepClone(L.ProblemPattern),L.NamedProblemPattern.properties=f.deepClone(L.NamedProblemPattern.properties)||{},L.NamedProblemPattern.properties.name={type:"string",description:(0,t.localize)(18,null)},L.MultiLineProblemPattern={type:"array",items:L.ProblemPattern},L.NamedMultiLineProblemPattern={type:"object",additionalProperties:!1,properties:{name:{type:"string",description:(0,t.localize)(19,null)},patterns:{type:"array",description:(0,t.localize)(20,null),items:L.ProblemPattern}}}})(y=e.Schemas||(e.Schemas={}));const T=i.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"problemPatterns",jsonSchema:{description:(0,t.localize)(21,null),type:"array",items:{anyOf:[y.NamedProblemPattern,y.NamedMultiLineProblemPattern]}}});class R{constructor(){this.patterns=Object.create(null),this.fillDefaults(),this.readyPromise=new Promise((M,N)=>{T.setHandler((B,P)=>{try{P.removed.forEach(V=>{let z=V.value;for(let U of z)this.patterns[U.name]&&delete this.patterns[U.name]}),P.added.forEach(V=>{let z=V.value,U=new b(new E(V.collector));for(let H of z){if(m.NamedMultiLineCheckedProblemPattern.is(H)){let K=U.parse(H);U.problemReporter.status.state<3?this.add(K.name,K.patterns):(V.collector.error((0,t.localize)(22,null)),V.collector.error(JSON.stringify(H,void 0,4)))}else if(m.NamedProblemPattern.is(H)){let K=U.parse(H);U.problemReporter.status.state<3?this.add(H.name,K):(V.collector.error((0,t.localize)(23,null)),V.collector.error(JSON.stringify(H,void 0,4)))}U.reset()}})}catch{}M(void 0)})})}onReady(){return this.readyPromise}add(M,N){this.patterns[M]=N}get(M){return this.patterns[M]}fillDefaults(){this.add("msCompile",{regexp:/^(?:\s+\d+>)?(\S.*)\((\d+|\d+,\d+|\d+,\d+,\d+,\d+)\)\s*:\s+(error|warning|info)\s+(\w+\d+)\s*:\s*(.*)$/,kind:l.Location,file:1,location:2,severity:3,code:4,message:5}),this.add("gulp-tsc",{regexp:/^([^\s].*)\((\d+|\d+,\d+|\d+,\d+,\d+,\d+)\):\s+(\d+)\s+(.*)$/,kind:l.Location,file:1,location:2,code:3,message:4}),this.add("cpp",{regexp:/^(\S.*)\((\d+|\d+,\d+|\d+,\d+,\d+,\d+)\):\s+(error|warning|info)\s+(C\d+)\s*:\s*(.*)$/,kind:l.Location,file:1,location:2,severity:3,code:4,message:5}),this.add("csc",{regexp:/^(\S.*)\((\d+|\d+,\d+|\d+,\d+,\d+,\d+)\):\s+(error|warning|info)\s+(CS\d+)\s*:\s*(.*)$/,kind:l.Location,file:1,location:2,severity:3,code:4,message:5}),this.add("vb",{regexp:/^(\S.*)\((\d+|\d+,\d+|\d+,\d+,\d+,\d+)\):\s+(error|warning|info)\s+(BC\d+)\s*:\s*(.*)$/,kind:l.Location,file:1,location:2,severity:3,code:4,message:5}),this.add("lessCompile",{regexp:/^\s*(.*) in file (.*) line no. (\d+)$/,kind:l.Location,message:1,file:2,line:3}),this.add("jshint",{regexp:/^(.*):\s+line\s+(\d+),\s+col\s+(\d+),\s(.+?)(?:\s+\((\w)(\d+)\))?$/,kind:l.Location,file:1,line:2,character:3,message:4,severity:5,code:6}),this.add("jshint-stylish",[{regexp:/^(.+)$/,kind:l.Location,file:1},{regexp:/^\s+line\s+(\d+)\s+col\s+(\d+)\s+(.+?)(?:\s+\((\w)(\d+)\))?$/,line:1,character:2,message:3,severity:4,code:5,loop:!0}]),this.add("eslint-compact",{regexp:/^(.+):\sline\s(\d+),\scol\s(\d+),\s(Error|Warning|Info)\s-\s(.+)\s\((.+)\)$/,file:1,kind:l.Location,line:2,character:3,severity:4,message:5,code:6}),this.add("eslint-stylish",[{regexp:/^((?:[a-zA-Z]:)*[./\\]+.*?)$/,kind:l.Location,file:1},{regexp:/^\s+(\d+):(\d+)\s+(error|warning|info)\s+(.+?)(?:\s\s+(.*))?$/,line:1,character:2,severity:3,message:4,code:5,loop:!0}]),this.add("go",{regexp:/^([^:]*: )?((.:)?[^:]*):(\d+)(:(\d+))?: (.*)$/,kind:l.Location,file:2,line:4,character:6,message:7})}}e.ProblemPatternRegistry=new R;class O extends o.Parser{constructor(M){super(M)}parse(M){let N=this.createProblemMatcher(M);if(!!this.checkProblemMatcherValid(M,N))return this.addWatchingMatcher(M,N),N}checkProblemMatcherValid(M,N){return N?N.pattern?N.owner?D.isUndefined(N.fileLocation)?(this.error((0,t.localize)(27,null,JSON.stringify(M,null,4))),!1):!0:(this.error((0,t.localize)(26,null,JSON.stringify(M,null,4))),!1):(this.error((0,t.localize)(25,null,JSON.stringify(M,null,4))),!1):(this.error((0,t.localize)(24,null,JSON.stringify(M,null,4))),!1)}createProblemMatcher(M){let N=null,B=D.isString(M.owner)?M.owner:I.generateUuid(),P=D.isString(M.source)?M.source:void 0,V=D.isString(M.applyTo)?r.fromString(M.applyTo):r.allDocuments;V||(V=r.allDocuments);let z,U,H;if(D.isUndefined(M.fileLocation))z=s.Relative,U="${workspaceFolder}";else if(D.isString(M.fileLocation))H=s.fromString(M.fileLocation),H&&(z=H,(H===s.Relative||H===s.AutoDetect)&&(U="${workspaceFolder}"));else if(D.isStringArray(M.fileLocation)){let q=M.fileLocation;q.length>0&&(H=s.fromString(q[0]),q.length===1&&H===s.Absolute?z=H:q.length===2&&(H===s.Relative||H===s.AutoDetect)&&q[1]&&(z=H,U=q[1]))}let K=M.pattern?this.createProblemPattern(M.pattern):void 0,G=M.severity?v.default.fromValue(M.severity):void 0;if(G===v.default.Ignore&&(this.info((0,t.localize)(28,null,M.severity)),G=v.default.Error),D.isString(M.base)){let q=M.base;if(q.length>1&&q[0]==="$"){let Z=e.ProblemMatcherRegistry.get(q.substring(1));Z&&(N=f.deepClone(Z),M.owner!==void 0&&B!==void 0&&(N.owner=B),M.source!==void 0&&P!==void 0&&(N.source=P),M.fileLocation!==void 0&&z!==void 0&&(N.fileLocation=z,N.filePrefix=U),M.pattern!==void 0&&K!==void 0&&K!==null&&(N.pattern=K),M.severity!==void 0&&G!==void 0&&(N.severity=G),M.applyTo!==void 0&&V!==void 0&&(N.applyTo=V))}}else z&&K&&(N={owner:B,applyTo:V,fileLocation:z,pattern:K},P&&(N.source=P),U&&(N.filePrefix=U),G&&(N.severity=G));return m.isNamedProblemMatcher(M)&&(N.name=M.name,N.label=D.isString(M.label)?M.label:M.name),N}createProblemPattern(M){if(D.isString(M)){let N=M;if(N.length>1&&N[0]==="$"){let B=e.ProblemPatternRegistry.get(N.substring(1));return B||this.error((0,t.localize)(29,null,N)),B}else N.length===0?this.error((0,t.localize)(30,null)):this.error((0,t.localize)(31,null,N))}else if(M){let N=new b(this.problemReporter);return Array.isArray(M),N.parse(M)}return null}addWatchingMatcher(M,N){let B=this.createRegularExpression(M.watchedTaskBeginsRegExp),P=this.createRegularExpression(M.watchedTaskEndsRegExp);if(B&&P){N.watching={activeOnStart:!1,beginsPattern:{regexp:B},endsPattern:{regexp:P}};return}let V=M.background||M.watching;if(D.isUndefinedOrNull(V))return;let z=this.createWatchingPattern(V.beginsPattern),U=this.createWatchingPattern(V.endsPattern);if(z&&U){N.watching={activeOnStart:D.isBoolean(V.activeOnStart)?V.activeOnStart:!1,beginsPattern:z,endsPattern:U};return}(z||U)&&this.error((0,t.localize)(32,null))}createWatchingPattern(M){if(D.isUndefinedOrNull(M))return null;let N,B;return D.isString(M)?N=this.createRegularExpression(M):(N=this.createRegularExpression(M.regexp),D.isNumber(M.file)&&(B=M.file)),N?B?{regexp:N,file:B}:{regexp:N,file:1}:null}createRegularExpression(M){let N=null;if(!M)return N;try{N=new RegExp(M)}catch{this.error((0,t.localize)(33,null,M))}return N}}e.ProblemMatcherParser=O,function(L){L.WatchingPattern={type:"object",additionalProperties:!1,properties:{regexp:{type:"string",description:(0,t.localize)(34,null)},file:{type:"integer",description:(0,t.localize)(35,null)}}},L.PatternType={anyOf:[{type:"string",description:(0,t.localize)(36,null)},L.ProblemPattern,L.MultiLineProblemPattern],description:(0,t.localize)(37,null)},L.ProblemMatcher={type:"object",additionalProperties:!1,properties:{base:{type:"string",description:(0,t.localize)(38,null)},owner:{type:"string",description:(0,t.localize)(39,null)},source:{type:"string",description:(0,t.localize)(40,null)},severity:{type:"string",enum:["error","warning","info"],description:(0,t.localize)(41,null)},applyTo:{type:"string",enum:["allDocuments","openDocuments","closedDocuments"],description:(0,t.localize)(42,null)},pattern:L.PatternType,fileLocation:{oneOf:[{type:"string",enum:["absolute","relative","autoDetect"]},{type:"array",items:{type:"string"}}],description:(0,t.localize)(43,null)},background:{type:"object",additionalProperties:!1,description:(0,t.localize)(44,null),properties:{activeOnStart:{type:"boolean",description:(0,t.localize)(45,null)},beginsPattern:{oneOf:[{type:"string"},L.WatchingPattern],description:(0,t.localize)(46,null)},endsPattern:{oneOf:[{type:"string"},L.WatchingPattern],description:(0,t.localize)(47,null)}}},watching:{type:"object",additionalProperties:!1,deprecationMessage:(0,t.localize)(48,null),description:(0,t.localize)(49,null),properties:{activeOnStart:{type:"boolean",description:(0,t.localize)(50,null)},beginsPattern:{oneOf:[{type:"string"},L.WatchingPattern],description:(0,t.localize)(51,null)},endsPattern:{oneOf:[{type:"string"},L.WatchingPattern],description:(0,t.localize)(52,null)}}}}},L.LegacyProblemMatcher=f.deepClone(L.ProblemMatcher),L.LegacyProblemMatcher.properties=f.deepClone(L.LegacyProblemMatcher.properties)||{},L.LegacyProblemMatcher.properties.watchedTaskBeginsRegExp={type:"string",deprecationMessage:(0,t.localize)(53,null),description:(0,t.localize)(54,null)},L.LegacyProblemMatcher.properties.watchedTaskEndsRegExp={type:"string",deprecationMessage:(0,t.localize)(55,null),description:(0,t.localize)(56,null)},L.NamedProblemMatcher=f.deepClone(L.ProblemMatcher),L.NamedProblemMatcher.properties=f.deepClone(L.NamedProblemMatcher.properties)||{},L.NamedProblemMatcher.properties.name={type:"string",description:(0,t.localize)(57,null)},L.NamedProblemMatcher.properties.label={type:"string",description:(0,t.localize)(58,null)}}(y=e.Schemas||(e.Schemas={}));const x=i.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"problemMatchers",deps:[T],jsonSchema:{description:(0,t.localize)(59,null),type:"array",items:y.NamedProblemMatcher}});class F{constructor(){this._onMatchersChanged=new S.Emitter,this.onMatcherChanged=this._onMatchersChanged.event,this.matchers=Object.create(null),this.fillDefaults(),this.readyPromise=new Promise((M,N)=>{x.setHandler((B,P)=>{try{P.removed.forEach(z=>{let U=z.value;for(let H of U)this.matchers[H.name]&&delete this.matchers[H.name]}),P.added.forEach(z=>{let U=z.value,H=new O(new E(z.collector));for(let K of U){let G=H.parse(K);G&&p(G)&&this.add(G)}}),(P.removed.length>0||P.added.length>0)&&this._onMatchersChanged.fire()}catch{}let V=this.get("tsc-watch");V&&(V.tscWatch=!0),M(void 0)})})}onReady(){return e.ProblemPatternRegistry.onReady(),this.readyPromise}add(M){this.matchers[M.name]=M}get(M){return this.matchers[M]}keys(){return Object.keys(this.matchers)}fillDefaults(){this.add({name:"msCompile",label:(0,t.localize)(60,null),owner:"msCompile",applyTo:r.allDocuments,fileLocation:s.Absolute,pattern:e.ProblemPatternRegistry.get("msCompile")}),this.add({name:"lessCompile",label:(0,t.localize)(61,null),deprecated:!0,owner:"lessCompile",source:"less",applyTo:r.allDocuments,fileLocation:s.Absolute,pattern:e.ProblemPatternRegistry.get("lessCompile"),severity:v.default.Error}),this.add({name:"gulp-tsc",label:(0,t.localize)(62,null),owner:"typescript",source:"ts",applyTo:r.closedDocuments,fileLocation:s.Relative,filePrefix:"${workspaceFolder}",pattern:e.ProblemPatternRegistry.get("gulp-tsc")}),this.add({name:"jshint",label:(0,t.localize)(63,null),owner:"jshint",source:"jshint",applyTo:r.allDocuments,fileLocation:s.Absolute,pattern:e.ProblemPatternRegistry.get("jshint")}),this.add({name:"jshint-stylish",label:(0,t.localize)(64,null),owner:"jshint",source:"jshint",applyTo:r.allDocuments,fileLocation:s.Absolute,pattern:e.ProblemPatternRegistry.get("jshint-stylish")}),this.add({name:"eslint-compact",label:(0,t.localize)(65,null),owner:"eslint",source:"eslint",applyTo:r.allDocuments,fileLocation:s.Absolute,filePrefix:"${workspaceFolder}",pattern:e.ProblemPatternRegistry.get("eslint-compact")}),this.add({name:"eslint-stylish",label:(0,t.localize)(66,null),owner:"eslint",source:"eslint",applyTo:r.allDocuments,fileLocation:s.Absolute,pattern:e.ProblemPatternRegistry.get("eslint-stylish")}),this.add({name:"go",label:(0,t.localize)(67,null),owner:"go",source:"go",applyTo:r.allDocuments,fileLocation:s.Relative,filePrefix:"${workspaceFolder}",pattern:e.ProblemPatternRegistry.get("go")})}}e.ProblemMatcherRegistry=new F}),define(ne[860],re([1,0,1741,297]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const _={definitions:{showOutputType:{type:"string",enum:["always","silent","never"]},options:{type:"object",description:t.localize(0,null),properties:{cwd:{type:"string",description:t.localize(1,null)},env:{type:"object",additionalProperties:{type:"string"},description:t.localize(2,null)}},additionalProperties:{type:["string","array","object"]}},problemMatcherType:{oneOf:[{type:"string",errorMessage:t.localize(3,null)},f.Schemas.LegacyProblemMatcher,{type:"array",items:{anyOf:[{type:"string",errorMessage:t.localize(4,null)},f.Schemas.LegacyProblemMatcher]}}]},shellConfiguration:{type:"object",additionalProperties:!1,description:t.localize(5,null),properties:{executable:{type:"string",description:t.localize(6,null)},args:{type:"array",description:t.localize(7,null),items:{type:"string"}}}},commandConfiguration:{type:"object",additionalProperties:!1,properties:{command:{type:"string",description:t.localize(8,null)},args:{type:"array",description:t.localize(9,null),items:{type:"string"}},options:{$ref:"#/definitions/options"}}},taskDescription:{type:"object",required:["taskName"],additionalProperties:!1,properties:{taskName:{type:"string",description:t.localize(10,null)},command:{type:"string",description:t.localize(11,null)},args:{type:"array",description:t.localize(12,null),items:{type:"string"}},options:{$ref:"#/definitions/options"},windows:{anyOf:[{$ref:"#/definitions/commandConfiguration",description:t.localize(13,null)},{properties:{problemMatcher:{$ref:"#/definitions/problemMatcherType",description:t.localize(14,null)}}}]},osx:{anyOf:[{$ref:"#/definitions/commandConfiguration",description:t.localize(15,null)},{properties:{problemMatcher:{$ref:"#/definitions/problemMatcherType",description:t.localize(16,null)}}}]},linux:{anyOf:[{$ref:"#/definitions/commandConfiguration",description:t.localize(17,null)},{properties:{problemMatcher:{$ref:"#/definitions/problemMatcherType",description:t.localize(18,null)}}}]},suppressTaskName:{type:"boolean",description:t.localize(19,null),default:!0},showOutput:{$ref:"#/definitions/showOutputType",description:t.localize(20,null)},echoCommand:{type:"boolean",description:t.localize(21,null),default:!0},isWatching:{type:"boolean",deprecationMessage:t.localize(22,null),description:t.localize(23,null),default:!0},isBackground:{type:"boolean",description:t.localize(24,null),default:!0},promptOnClose:{type:"boolean",description:t.localize(25,null),default:!1},isBuildCommand:{type:"boolean",description:t.localize(26,null),default:!0},isTestCommand:{type:"boolean",description:t.localize(27,null),default:!0},problemMatcher:{$ref:"#/definitions/problemMatcherType",description:t.localize(28,null)}}},taskRunnerConfiguration:{type:"object",required:[],properties:{command:{type:"string",description:t.localize(29,null)},args:{type:"array",description:t.localize(30,null),items:{type:"string"}},options:{$ref:"#/definitions/options"},showOutput:{$ref:"#/definitions/showOutputType",description:t.localize(31,null)},isWatching:{type:"boolean",deprecationMessage:t.localize(32,null),description:t.localize(33,null),default:!0},isBackground:{type:"boolean",description:t.localize(34,null),default:!0},promptOnClose:{type:"boolean",description:t.localize(35,null),default:!1},echoCommand:{type:"boolean",description:t.localize(36,null),default:!0},suppressTaskName:{type:"boolean",description:t.localize(37,null),default:!0},taskSelector:{type:"string",description:t.localize(38,null)},problemMatcher:{$ref:"#/definitions/problemMatcherType",description:t.localize(39,null)},tasks:{type:"array",description:t.localize(40,null),items:{type:"object",$ref:"#/definitions/taskDescription"}}}}}};e.default=_}),define(ne[2325],re([1,0,1742,51,297,860]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const k={oneOf:[{allOf:[{type:"object",required:["version"],properties:{version:{type:"string",enum:["0.1.0"],deprecationMessage:t.localize(0,null),description:t.localize(1,null)},_runner:{deprecationMessage:t.localize(2,null)},runner:{type:"string",enum:["process","terminal"],default:"process",description:t.localize(3,null)},windows:{$ref:"#/definitions/taskRunnerConfiguration",description:t.localize(4,null)},osx:{$ref:"#/definitions/taskRunnerConfiguration",description:t.localize(5,null)},linux:{$ref:"#/definitions/taskRunnerConfiguration",description:t.localize(6,null)}}},{$ref:"#/definitions/taskRunnerConfiguration"}]}]},D={type:"boolean",default:!0,description:t.localize(7,null)};k.definitions=f.deepClone(A.default.definitions);let I=k.definitions;I.commandConfiguration.properties.isShellCommand=f.deepClone(D),I.taskDescription.properties.isShellCommand=f.deepClone(D),I.taskRunnerConfiguration.properties.isShellCommand=f.deepClone(D),Object.getOwnPropertyNames(I).forEach(v=>{let C=v+"1";I[C]=I[v],delete I[v]});function w(v){Array.isArray(v)?v.forEach(w):typeof v=="object"&&(v.$ref&&(v.$ref=v.$ref+"1"),Object.getOwnPropertyNames(v).forEach(C=>{let o=v[C];(Array.isArray(o)||typeof o=="object")&&w(o)}))}w(k),_.ProblemMatcherRegistry.onReady().then(()=>{try{let v=_.ProblemMatcherRegistry.keys().map(C=>"$"+C);I.problemMatcherType1.oneOf[0].enum=v,I.problemMatcherType1.oneOf[2].items.anyOf[1].enum=v}catch{console.log("Installing problem matcher ids failed")}}),e.default=k}),define(ne[861],re([1,0,9,6,2,297,125,89,14]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WatchingProblemCollector=e.StartStopProblemCollector=e.ProblemHandlingStrategy=e.AbstractProblemCollector=e.ProblemCollectorEventKind=void 0;var w;(function(S){S.BackgroundProcessingBegins="backgroundProcessingBegins",S.BackgroundProcessingEnds="backgroundProcessingEnds"})(w=e.ProblemCollectorEventKind||(e.ProblemCollectorEventKind={}));var v;(function(S){function s(l){return Object.freeze({kind:l})}S.create=s})(v||(v={}));class C{constructor(s,l,r,p){this.problemMatchers=s,this.markerService=l,this.modelService=r,this.modelListeners=new _.DisposableStore,this.matchers=Object.create(null),this.bufferLength=1,s.map(u=>(0,A.createLineMatcher)(u,p)).forEach(u=>{let a=u.matchLength;a>this.bufferLength&&(this.bufferLength=a);let n=this.matchers[a];n||(n=[],this.matchers[a]=n),n.push(u)}),this.buffer=[],this.activeMatcher=null,this._numberOfMatches=0,this._maxMarkerSeverity=void 0,this.openModels=Object.create(null),this.applyToByOwner=new Map;for(let u of s){let a=this.applyToByOwner.get(u.owner);a===void 0?this.applyToByOwner.set(u.owner,u.applyTo):this.applyToByOwner.set(u.owner,this.mergeApplyTo(a,u.applyTo))}this.resourcesToClean=new Map,this.markers=new Map,this.deliveredMarkers=new Map,this.modelService.onModelAdded(u=>{this.openModels[u.uri.toString()]=!0},this,this.modelListeners),this.modelService.onModelRemoved(u=>{delete this.openModels[u.uri.toString()]},this,this.modelListeners),this.modelService.getModels().forEach(u=>this.openModels[u.uri.toString()]=!0),this._onDidStateChange=new f.Emitter}get onDidStateChange(){return this._onDidStateChange.event}processLine(s){if(this.tail){const l=this.tail;this.tail=l.then(()=>this.processLineInternal(s))}else this.tail=this.processLineInternal(s)}dispose(){this.modelListeners.dispose()}get numberOfMatches(){return this._numberOfMatches}get maxMarkerSeverity(){return this._maxMarkerSeverity}tryFindMarker(s){let l=null;if(this.activeMatcher){if(l=this.activeMatcher.next(s),l)return this.captureMatch(l),l;this.clearBuffer(),this.activeMatcher=null}if(this.buffer.length<this.bufferLength)this.buffer.push(s);else{let r=this.buffer.length-1;for(let p=0;p<r;p++)this.buffer[p]=this.buffer[p+1];this.buffer[r]=s}return l=this.tryMatchers(),l&&this.clearBuffer(),l}async shouldApplyMatch(s){switch(s.description.applyTo){case A.ApplyToKind.allDocuments:return!0;case A.ApplyToKind.openDocuments:return!!this.openModels[(await s.resource).toString()];case A.ApplyToKind.closedDocuments:return!this.openModels[(await s.resource).toString()];default:return!0}}mergeApplyTo(s,l){return s===l||s===A.ApplyToKind.allDocuments?s:A.ApplyToKind.allDocuments}tryMatchers(){this.activeMatcher=null;let s=this.buffer.length;for(let l=0;l<s;l++){let r=this.matchers[s-l];if(!!r)for(const p of r){let u=p.handle(this.buffer,l);if(u.match)return this.captureMatch(u.match),u.continue&&(this.activeMatcher=p),u.match}}return null}captureMatch(s){this._numberOfMatches++,(this._maxMarkerSeverity===void 0||s.marker.severity>this._maxMarkerSeverity)&&(this._maxMarkerSeverity=s.marker.severity)}clearBuffer(){this.buffer.length>0&&(this.buffer=[])}recordResourcesToClean(s){let l=this.getResourceSetToClean(s);this.markerService.read({owner:s}).forEach(r=>l.set(r.resource.toString(),r.resource))}recordResourceToClean(s,l){this.getResourceSetToClean(s).set(l.toString(),l)}removeResourceToClean(s,l){let r=this.resourcesToClean.get(s);r&&r.delete(l)}getResourceSetToClean(s){let l=this.resourcesToClean.get(s);return l||(l=new Map,this.resourcesToClean.set(s,l)),l}cleanAllMarkers(){this.resourcesToClean.forEach((s,l)=>{this._cleanMarkers(l,s)}),this.resourcesToClean=new Map}cleanMarkers(s){let l=this.resourcesToClean.get(s);l&&(this._cleanMarkers(s,l),this.resourcesToClean.delete(s))}_cleanMarkers(s,l){let r=[],p=this.applyToByOwner.get(s);l.forEach((u,a)=>{(p===A.ApplyToKind.allDocuments||p===A.ApplyToKind.openDocuments&&this.openModels[a]||p===A.ApplyToKind.closedDocuments&&!this.openModels[a])&&r.push(u)}),this.markerService.remove(s,r)}recordMarker(s,l,r){let p=this.markers.get(l);p||(p=new Map,this.markers.set(l,p));let u=p.get(r);u||(u=new Map,p.set(r,u));let a=k.IMarkerData.makeKeyOptionalMessage(s,!1),n;u.has(a)?(n=u.get(a))!==void 0&&n.message.length<s.message.length&&I.isWindows&&u.set(a,s):u.set(a,s)}reportMarkers(){this.markers.forEach((s,l)=>{let r=this.getDeliveredMarkersPerOwner(l);s.forEach((p,u)=>{this.deliverMarkersPerOwnerAndResourceResolved(l,u,p,r)})})}deliverMarkersPerOwnerAndResource(s,l){let r=this.markers.get(s);if(!r)return;let p=this.getDeliveredMarkersPerOwner(s),u=r.get(l);!u||this.deliverMarkersPerOwnerAndResourceResolved(s,l,u,p)}deliverMarkersPerOwnerAndResourceResolved(s,l,r,p){if(r.size!==p.get(l)){let u=[];r.forEach(a=>u.push(a)),this.markerService.changeOne(s,t.URI.parse(l),u),p.set(l,r.size)}}getDeliveredMarkersPerOwner(s){let l=this.deliveredMarkers.get(s);return l||(l=new Map,this.deliveredMarkers.set(s,l)),l}cleanMarkerCaches(){this._numberOfMatches=0,this._maxMarkerSeverity=void 0,this.markers.clear(),this.deliveredMarkers.clear()}done(){this.reportMarkers(),this.cleanAllMarkers()}}e.AbstractProblemCollector=C;var o;(function(S){S[S.Clean=0]="Clean"})(o=e.ProblemHandlingStrategy||(e.ProblemHandlingStrategy={}));class c extends C{constructor(s,l,r,p=0,u){super(s,l,r,u);let a=Object.create(null);s.forEach(n=>a[n.owner]=!0),this.owners=Object.keys(a),this.owners.forEach(n=>{this.recordResourcesToClean(n)})}async processLineInternal(s){let l=this.tryFindMarker(s);if(!l)return;let r=l.description.owner,u=(await l.resource).toString();this.removeResourceToClean(r,u),await this.shouldApplyMatch(l)&&(this.recordMarker(l.marker,r,u),(this.currentOwner!==r||this.currentResource!==u)&&(this.currentOwner&&this.currentResource&&this.deliverMarkersPerOwnerAndResource(this.currentOwner,this.currentResource),this.currentOwner=r,this.currentResource=u))}}e.StartStopProblemCollector=c;class i extends C{constructor(s,l,r,p){super(s,l,r,p);this.lines=[],this.resetCurrentResource(),this.backgroundPatterns=[],this._activeBackgroundMatchers=new Set,this.problemMatchers.forEach(u=>{if(u.watching){const a=(0,D.generateUuid)();this.backgroundPatterns.push({key:a,matcher:u,begin:u.watching.beginsPattern,end:u.watching.endsPattern})}}),this.modelListeners.add(this.modelService.onModelRemoved(u=>{let a=f.Event.debounce(this.markerService.onMarkerChanged,(n,h)=>(n??[]).concat(h),500)(async n=>{if(a?.dispose(),a=void 0,!n.includes(u.uri)||this.markerService.read({resource:u.uri}).length!==0)return;const h=Array.from(this.lines);for(const g of h)await this.processLineInternal(g)});setTimeout(async()=>{a?.dispose(),a=void 0},600)}))}aboutToStart(){for(let s of this.backgroundPatterns)s.matcher.watching&&s.matcher.watching.activeOnStart&&(this._activeBackgroundMatchers.add(s.key),this._onDidStateChange.fire(v.create("backgroundProcessingBegins")),this.recordResourcesToClean(s.matcher.owner))}async processLineInternal(s){if(await this.tryBegin(s)||this.tryFinish(s))return;this.lines.push(s);let l=this.tryFindMarker(s);if(!l)return;let r=await l.resource,p=l.description.owner,u=r.toString();this.removeResourceToClean(p,u),await this.shouldApplyMatch(l)&&(this.recordMarker(l.marker,p,u),(this.currentOwner!==p||this.currentResource!==u)&&(this.reportMarkersForCurrentResource(),this.currentOwner=p,this.currentResource=u))}forceDelivery(){this.reportMarkersForCurrentResource()}async tryBegin(s){let l=!1;for(const r of this.backgroundPatterns){let p=r.begin.regexp.exec(s);if(p){if(this._activeBackgroundMatchers.has(r.key))continue;this._activeBackgroundMatchers.add(r.key),l=!0,this.lines=[],this.lines.push(s),this._onDidStateChange.fire(v.create("backgroundProcessingBegins")),this.cleanMarkerCaches(),this.resetCurrentResource();let u=r.matcher.owner,a=p[r.begin.file];if(a){let n=(0,A.getResource)(a,r.matcher);this.recordResourceToClean(u,await n)}else this.recordResourcesToClean(u)}}return l}tryFinish(s){let l=!1;for(const r of this.backgroundPatterns)if(r.end.regexp.exec(s)&&this._activeBackgroundMatchers.has(r.key)){this._activeBackgroundMatchers.delete(r.key),this.resetCurrentResource(),this._onDidStateChange.fire(v.create("backgroundProcessingEnds")),l=!0,this.lines.push(s);let u=r.matcher.owner;this.cleanMarkers(u),this.cleanMarkerCaches()}return l}resetCurrentResource(){this.reportMarkersForCurrentResource(),this.currentOwner=void 0,this.currentResource=void 0}reportMarkersForCurrentResource(){this.currentOwner&&this.currentResource&&this.deliverMarkersPerOwnerAndResource(this.currentOwner,this.currentResource)}done(){[...this.applyToByOwner.keys()].forEach(s=>{this.recordResourcesToClean(s)}),super.done()}isWatching(){return this.backgroundPatterns.length>0}}e.WatchingProblemCollector=i}),define(ne[2326],re([1,0,1738,33,2,81,861,125,63]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TaskTerminalStatus=void 0;const w="task_terminal_status",v={id:w,icon:I.spinningLoading,severity:A.default.Info,tooltip:t.localize(0,null)},C={id:w,icon:f.Codicon.check,severity:A.default.Info,tooltip:t.localize(1,null)},o={id:w,icon:f.Codicon.check,severity:A.default.Info,tooltip:t.localize(2,null)},c={id:w,icon:f.Codicon.error,severity:A.default.Error,tooltip:t.localize(3,null)},i={id:w,icon:f.Codicon.error,severity:A.default.Error,tooltip:t.localize(4,null)},S={id:w,icon:f.Codicon.warning,severity:A.default.Warning,tooltip:t.localize(5,null)},s={id:w,icon:f.Codicon.warning,severity:A.default.Warning,tooltip:t.localize(6,null)},l={id:w,icon:f.Codicon.info,severity:A.default.Info,tooltip:t.localize(7,null)},r={id:w,icon:f.Codicon.info,severity:A.default.Info,tooltip:t.localize(8,null)};class p extends _.Disposable{constructor(a){super();this.terminalMap=new Map,this._register(a.onDidStateChange(n=>{switch(n.kind){case"processStarted":case"active":this.eventActive(n);break;case"inactive":this.eventInactive(n);break;case"processEnded":this.eventEnd(n);break}}))}addTerminal(a,n,h){const g={id:w,severity:A.default.Info};n.statusList.add(g),this.terminalMap.set(a,{terminal:n,status:g,problemMatcher:h})}terminalFromEvent(a){if(!(!a.__task||!this.terminalMap.get(a.__task)))return this.terminalMap.get(a.__task)}eventEnd(a){const n=this.terminalFromEvent(a);!n||(this.terminalMap.delete(a.__task),n.terminal.statusList.remove(n.status),a.exitCode===0&&n.problemMatcher.numberOfMatches===0?n.terminal.statusList.add(C):n.problemMatcher.maxMarkerSeverity===D.MarkerSeverity.Error?n.terminal.statusList.add(c):n.problemMatcher.maxMarkerSeverity===D.MarkerSeverity.Warning?n.terminal.statusList.add(S):n.problemMatcher.maxMarkerSeverity===D.MarkerSeverity.Info&&n.terminal.statusList.add(l))}eventInactive(a){const n=this.terminalFromEvent(a);!n||!n.problemMatcher||(n.terminal.statusList.remove(n.status),n.problemMatcher.numberOfMatches===0?n.terminal.statusList.add(o):n.problemMatcher.maxMarkerSeverity===D.MarkerSeverity.Error?n.terminal.statusList.add(i):n.problemMatcher.maxMarkerSeverity===D.MarkerSeverity.Warning?n.terminal.statusList.add(s):n.problemMatcher.maxMarkerSeverity===D.MarkerSeverity.Info&&n.terminal.statusList.add(r))}eventActive(a){const n=this.terminalFromEvent(a);!n||(n.terminal.statusList.remove(n.status),(n.problemMatcher instanceof k.StartStopProblemCollector||n.problemMatcher?.problemMatchers.length>0)&&n.terminal.statusList.add(v))}}e.TaskTerminalStatus=p}),define(ne[366],re([1,0,1746,13,51,133,7,6]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TaskDefinitionRegistry=void 0;const I={type:"object",additionalProperties:!1,properties:{type:{type:"string",description:t.localize(0,null)},required:{type:"array",items:{type:"string"}},properties:{type:"object",description:t.localize(1,null),additionalProperties:{$ref:"http://json-schema.org/draft-07/schema#"}},when:{type:"string",markdownDescription:t.localize(2,null),default:""}}};var w;(function(o){function c(i,S,s){if(!i)return;let l=f.isString(i.type)?i.type:void 0;if(!l||l.length===0){s.error(t.localize(3,null));return}let r=[];if(Array.isArray(i.required))for(let p of i.required)f.isString(p)&&r.push(p);return{extensionId:S.value,taskType:l,required:r,properties:i.properties?_.deepClone(i.properties):{},when:i.when?k.ContextKeyExpr.deserialize(i.when):void 0}}o.from=c})(w||(w={}));const v=A.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"taskDefinitions",jsonSchema:{description:t.localize(4,null),type:"array",items:I}});class C{constructor(){this._onDefinitionsChanged=new D.Emitter,this.onDefinitionsChanged=this._onDefinitionsChanged.event,this.taskTypes=Object.create(null),this.readyPromise=new Promise((c,i)=>{v.setHandler((S,s)=>{try{for(let l of s.removed){let r=l.value;for(let p of r)this.taskTypes&&p.type&&this.taskTypes[p.type]&&delete this.taskTypes[p.type]}for(let l of s.added){let r=l.value;for(let p of r){let u=w.from(p,l.description.identifier,l.collector);u&&(this.taskTypes[u.taskType]=u)}}(s.removed.length>0||s.added.length>0)&&this._onDefinitionsChanged.fire()}catch{}c(void 0)})})}onReady(){return this.readyPromise}get(c){return this.taskTypes[c]}all(){return Object.keys(this.taskTypes).map(c=>this.taskTypes[c])}getJsonSchema(){if(this._schema===void 0){let c=[];for(let i of this.all()){let S={type:"object",additionalProperties:!1};i.required.length>0&&(S.required=i.required.slice(0)),i.properties!==void 0?S.properties=_.deepClone(i.properties):S.properties=Object.create(null),S.properties.type={type:"string",enum:[i.taskType]},c.push(S)}this._schema={oneOf:c}}return this._schema}}e.TaskDefinitionRegistry=new C}),define(ne[2327],re([1,0,1743,51,860,297,366,840,839]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.updateProblemMatchers=e.updateTaskDefinitions=void 0;function w(H){Array.isArray(H)?H.forEach(w):typeof H=="object"&&(H.$ref&&(H.$ref=H.$ref+"2"),Object.getOwnPropertyNames(H).forEach(K=>{let G=H[K];(Array.isArray(G)||typeof G=="object")&&w(G)}))}const v={anyOf:[{type:"boolean",default:!0,description:t.localize(0,null)},{$ref:"#/definitions/shellConfiguration"}],deprecationMessage:t.localize(1,null)},C={type:"object",additionalProperties:!0,properties:{type:{type:"string",description:t.localize(2,null)}}},o={anyOf:[{type:"string",description:t.localize(3,null)},C,{type:"array",description:t.localize(4,null),items:{anyOf:[{type:"string"},C]}}],description:t.localize(5,null)},c={type:"string",enum:["parallel","sequence"],enumDescriptions:[t.localize(6,null),t.localize(7,null)],default:"parallel",description:t.localize(8,null)},i={type:"string",description:t.localize(9,null)},S={type:"object",default:{echo:!0,reveal:"always",focus:!1,panel:"shared",showReuseMessage:!0,clear:!1},description:t.localize(10,null),additionalProperties:!1,properties:{echo:{type:"boolean",default:!0,description:t.localize(11,null)},focus:{type:"boolean",default:!1,description:t.localize(12,null)},revealProblems:{type:"string",enum:["always","onProblem","never"],enumDescriptions:[t.localize(13,null),t.localize(14,null),t.localize(15,null)],default:"never",description:t.localize(16,null)},reveal:{type:"string",enum:["always","silent","never"],enumDescriptions:[t.localize(17,null),t.localize(18,null),t.localize(19,null)],default:"always",description:t.localize(20,null)},panel:{type:"string",enum:["shared","dedicated","new"],default:"shared",description:t.localize(21,null)},showReuseMessage:{type:"boolean",default:!0,description:t.localize(22,null)},clear:{type:"boolean",default:!1,description:t.localize(23,null)},group:{type:"string",description:t.localize(24,null)},close:{type:"boolean",description:t.localize(25,null)}}},s=f.deepClone(S);s.deprecationMessage=t.localize(26,null);const l={type:"string",enum:["build","test","none"],enumDescriptions:[t.localize(27,null),t.localize(28,null),t.localize(29,null)],description:t.localize(30,null)},r={oneOf:[l,{type:"object",properties:{kind:l,isDefault:{type:"boolean",default:!1,description:t.localize(31,null)}}}],defaultSnippets:[{body:{kind:"build",isDefault:!0},description:t.localize(32,null)},{body:{kind:"test",isDefault:!0},description:t.localize(33,null)}],description:t.localize(34,null)},p={type:"string",enum:["shell"],default:"process",description:t.localize(35,null)},u={oneOf:[{oneOf:[{type:"string"},{type:"array",items:{type:"string"},description:t.localize(36,null)}]},{type:"object",required:["value","quoting"],properties:{value:{oneOf:[{type:"string"},{type:"array",items:{type:"string"},description:t.localize(37,null)}],description:t.localize(38,null)},quoting:{type:"string",enum:["escape","strong","weak"],enumDescriptions:[t.localize(39,null),t.localize(40,null),t.localize(41,null)],default:"strong",description:t.localize(42,null)}}}],description:t.localize(43,null)},a={type:"array",items:{oneOf:[{type:"string"},{type:"object",required:["value","quoting"],properties:{value:{type:"string",description:t.localize(44,null)},quoting:{type:"string",enum:["escape","strong","weak"],enumDescriptions:[t.localize(45,null),t.localize(46,null),t.localize(47,null)],default:"strong",description:t.localize(48,null)}}}]},description:t.localize(49,null)},n={type:"string",description:t.localize(50,null)},h={type:"string",enum:["2.0.0"],description:t.localize(51,null)},g={type:"string",description:t.localize(52,null),deprecationMessage:t.localize(53,null)},d={type:"object",additionalProperties:!1,properties:{reevaluateOnRerun:{type:"boolean",description:t.localize(54,null),default:!0},runOn:{type:"string",enum:["default","folderOpen"],description:t.localize(55,null),default:"default"},instanceLimit:{type:"number",description:t.localize(56,null),default:1}},description:t.localize(57,null)},m=_.default.definitions,b=f.deepClone(m.options),E=b.properties;E.shell=f.deepClone(m.shellConfiguration);let y={type:"object",additionalProperties:!1,properties:{label:{type:"string",description:t.localize(58,null)},taskName:{type:"string",description:t.localize(59,null),deprecationMessage:t.localize(60,null)},identifier:f.deepClone(g),group:f.deepClone(r),isBackground:{type:"boolean",description:t.localize(61,null),default:!0},promptOnClose:{type:"boolean",description:t.localize(62,null),default:!1},presentation:f.deepClone(S),options:b,problemMatcher:{$ref:"#/definitions/problemMatcherType",description:t.localize(63,null)},runOptions:f.deepClone(d),dependsOn:f.deepClone(o),dependsOrder:f.deepClone(c),detail:f.deepClone(i)}},T=[];k.TaskDefinitionRegistry.onReady().then(()=>{R()});function R(){for(let H of k.TaskDefinitionRegistry.all()){if(T.find(q=>q.properties?.type?.enum?.find?q.properties?.type.enum.find(Z=>Z===H.taskType):void 0))continue;let K=f.deepClone(y);const G=K.properties;if(G.type={type:"string",description:t.localize(64,null),enum:[H.taskType]},H.required?K.required=H.required.slice():K.required=[],K.required.push("type"),H.properties)for(let q of Object.keys(H.properties)){let Z=H.properties[q];G[q]=f.deepClone(Z)}w(K),T.push(K)}}e.updateTaskDefinitions=R;let O=f.deepClone(y);O.properties.customize={type:"string",deprecationMessage:t.localize(65,null)},O.required||(O.required=[]),O.required.push("customize"),T.push(O);let x=f.deepClone(m),F=x.taskDescription;F.required=["label"];const L=F.properties;L.label=f.deepClone(n),L.command=f.deepClone(u),L.args=f.deepClone(a),L.isShellCommand=f.deepClone(v),L.dependsOn=o,L.dependsOrder=c,L.identifier=f.deepClone(g),L.type=f.deepClone(p),L.presentation=f.deepClone(S),L.terminal=s,L.group=f.deepClone(r),L.runOptions=f.deepClone(d),L.detail=i,L.taskName.deprecationMessage=t.localize(66,null);const M=f.deepClone(F);F.default={label:"My Task",type:"shell",command:"echo Hello",problemMatcher:[]},x.showOutputType.deprecationMessage=t.localize(67,null),L.echoCommand.deprecationMessage=t.localize(68,null),L.suppressTaskName.deprecationMessage=t.localize(69,null),L.isBuildCommand.deprecationMessage=t.localize(70,null),L.isTestCommand.deprecationMessage=t.localize(71,null),M.properties.type={type:"string",enum:["process"],default:"process",description:t.localize(72,null)},M.required.push("command"),M.required.push("type"),T.push(M),T.push({$ref:"#/definitions/taskDescription"});const N=x.taskRunnerConfiguration.properties;let B=N.tasks;B.items={oneOf:T},N.inputs=I.inputsSchema.definitions.inputs,x.commandConfiguration.properties.isShellCommand=f.deepClone(v),x.commandConfiguration.properties.args=f.deepClone(a),x.options.properties.shell={$ref:"#/definitions/shellConfiguration"},N.isShellCommand=f.deepClone(v),N.type=f.deepClone(p),N.group=f.deepClone(r),N.presentation=f.deepClone(S),N.suppressTaskName.deprecationMessage=t.localize(73,null),N.taskSelector.deprecationMessage=t.localize(74,null);let P=f.deepClone(x.taskRunnerConfiguration);delete P.properties.tasks,P.additionalProperties=!1,x.osSpecificTaskRunnerConfiguration=P,N.version=f.deepClone(h);const V={oneOf:[{allOf:[{type:"object",required:["version"],properties:{version:f.deepClone(h),windows:{$ref:"#/definitions/osSpecificTaskRunnerConfiguration",description:t.localize(75,null)},osx:{$ref:"#/definitions/osSpecificTaskRunnerConfiguration",description:t.localize(76,null)},linux:{$ref:"#/definitions/osSpecificTaskRunnerConfiguration",description:t.localize(77,null)}}},{$ref:"#/definitions/taskRunnerConfiguration"}]}]};V.definitions=x;function z(H,K){const G=H[K].properties;G?Object.keys(G).forEach(q=>{z(G,q)}):D.applyDeprecatedVariableMessage(H[K])}Object.getOwnPropertyNames(x).forEach(H=>{let K=H+"2";x[K]=x[H],delete x[H],z(x,K)}),w(V);function U(){try{let H=A.ProblemMatcherRegistry.keys().map(K=>"$"+K);x.problemMatcherType2.oneOf[0].enum=H,x.problemMatcherType2.oneOf[2].items.anyOf[0].enum=H}catch{console.log("Installing problem matcher ids failed")}}e.updateProblemMatchers=U,A.ProblemMatcherRegistry.onReady().then(()=>{U()}),e.default=V}),define(ne[273],re([1,0,1749,13,19,51,7,366,269]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TaskDefinition=e.KeyedTaskIdentifier=e.TaskEvent=e.TaskRunSource=e.TaskRunType=e.TaskEventKind=e.TaskSorter=e.JsonSchemaVersion=e.ExecutionEngine=e.InMemoryTask=e.ContributedTask=e.ConfiguringTask=e.CustomTask=e.CommonTask=e.RunOptions=e.RunOnOptions=e.DependsOrder=e.TaskSourceKind=e.TaskScope=e.TaskGroup=e.CommandString=e.RuntimeType=e.PresentationOptions=e.PanelKind=e.RevealProblemKind=e.RevealKind=e.CommandOptions=e.CUSTOMIZED_TASK_TYPE=e.ShellQuoting=e.TASKS_CATEGORY=e.TASK_RUNNING_STATE=void 0,e.TASK_RUNNING_STATE=new k.RawContextKey("taskRunning",!1,t.localize(0,null)),e.TASKS_CATEGORY={value:t.localize(1,null),original:"Tasks"};var w;(function(N){N[N.Escape=1]="Escape",N[N.Strong=2]="Strong",N[N.Weak=3]="Weak"})(w=e.ShellQuoting||(e.ShellQuoting={})),e.CUSTOMIZED_TASK_TYPE="$customized",function(N){function B(P){if(!P)return N.Strong;switch(P.toLowerCase()){case"escape":return N.Escape;case"strong":return N.Strong;case"weak":return N.Weak;default:return N.Strong}}N.from=B}(w=e.ShellQuoting||(e.ShellQuoting={}));var v;(function(N){N.defaults={cwd:"${workspaceFolder}"}})(v=e.CommandOptions||(e.CommandOptions={}));var C;(function(N){N[N.Always=1]="Always",N[N.Silent=2]="Silent",N[N.Never=3]="Never"})(C=e.RevealKind||(e.RevealKind={})),function(N){function B(P){switch(P.toLowerCase()){case"always":return N.Always;case"silent":return N.Silent;case"never":return N.Never;default:return N.Always}}N.fromString=B}(C=e.RevealKind||(e.RevealKind={}));var o;(function(N){N[N.Never=1]="Never",N[N.OnProblem=2]="OnProblem",N[N.Always=3]="Always"})(o=e.RevealProblemKind||(e.RevealProblemKind={})),function(N){function B(P){switch(P.toLowerCase()){case"always":return N.Always;case"never":return N.Never;case"onproblem":return N.OnProblem;default:return N.OnProblem}}N.fromString=B}(o=e.RevealProblemKind||(e.RevealProblemKind={}));var c;(function(N){N[N.Shared=1]="Shared",N[N.Dedicated=2]="Dedicated",N[N.New=3]="New"})(c=e.PanelKind||(e.PanelKind={})),function(N){function B(P){switch(P.toLowerCase()){case"shared":return N.Shared;case"dedicated":return N.Dedicated;case"new":return N.New;default:return N.Shared}}N.fromString=B}(c=e.PanelKind||(e.PanelKind={}));var i;(function(N){N.defaults={echo:!0,reveal:C.Always,revealProblems:o.Never,focus:!1,panel:c.Shared,showReuseMessage:!0,clear:!1}})(i=e.PresentationOptions||(e.PresentationOptions={}));var S;(function(N){N[N.Shell=1]="Shell",N[N.Process=2]="Process",N[N.CustomExecution=3]="CustomExecution"})(S=e.RuntimeType||(e.RuntimeType={})),function(N){function B(V){switch(V.toLowerCase()){case"shell":return N.Shell;case"process":return N.Process;case"customExecution":return N.CustomExecution;default:return N.Process}}N.fromString=B;function P(V){switch(V){case N.Shell:return"shell";case N.Process:return"process";case N.CustomExecution:return"customExecution";default:return"process"}}N.toString=P}(S=e.RuntimeType||(e.RuntimeType={}));var s;(function(N){function B(P){return f.isString(P)?P:P.value}N.value=B})(s=e.CommandString||(e.CommandString={}));var l;(function(N){N.Clean={_id:"clean",isDefault:!1},N.Build={_id:"build",isDefault:!1},N.Rebuild={_id:"rebuild",isDefault:!1},N.Test={_id:"test",isDefault:!1};function B(V){return V===N.Clean._id||V===N.Build._id||V===N.Rebuild._id||V===N.Test._id}N.is=B;function P(V){if(V!==void 0)return f.isString(V)?B(V)?{_id:V,isDefault:!1}:void 0:V}N.from=P})(l=e.TaskGroup||(e.TaskGroup={}));var r;(function(N){N[N.Global=1]="Global",N[N.Workspace=2]="Workspace",N[N.Folder=3]="Folder"})(r=e.TaskScope||(e.TaskScope={}));var p;(function(N){N.Workspace="workspace",N.Extension="extension",N.InMemory="inMemory",N.WorkspaceFile="workspaceFile",N.User="user";function B(P){switch(P){case N.User:return 1;case N.WorkspaceFile:return 4;default:return 5}}N.toConfigurationTarget=B})(p=e.TaskSourceKind||(e.TaskSourceKind={}));var u;(function(N){N.parallel="parallel",N.sequence="sequence"})(u=e.DependsOrder||(e.DependsOrder={}));var a;(function(N){N[N.default=1]="default",N[N.folderOpen=2]="folderOpen"})(a=e.RunOnOptions||(e.RunOnOptions={}));var n;(function(N){N.defaults={reevaluateOnRerun:!0,runOn:a.default,instanceLimit:1}})(n=e.RunOptions||(e.RunOptions={}));class h{constructor(B,P,V,z,U,H){this._label="",this._id=B,P&&(this._label=P),V&&(this.type=V),this.runOptions=z,this.configurationProperties=U,this._source=H}getDefinition(B){}getMapKey(){return this._id}getRecentlyUsedKey(){}getCommonTaskId(){const B={folder:this.getFolderId(),id:this._id};return JSON.stringify(B)}clone(){return this.fromObject(Object.assign({},this))}getWorkspaceFolder(){}getWorkspaceFileName(){}getTelemetryKind(){return"unknown"}matches(B,P=!1){if(B===void 0)return!1;if(f.isString(B))return B===this._label||B===this.configurationProperties.identifier||P&&B===this._id;let V=this.getDefinition(!0);return V!==void 0&&V._key===B._key}getQualifiedLabel(){let B=this.getWorkspaceFolder();return B?`${this._label} (${B.name})`:this._label}getTaskExecution(){return{id:this._id,task:this}}addTaskLoadMessages(B){this._taskLoadMessages===void 0&&(this._taskLoadMessages=[]),B&&(this._taskLoadMessages=this._taskLoadMessages.concat(B))}get taskLoadMessages(){return this._taskLoadMessages}}e.CommonTask=h;class g extends h{constructor(B,P,V,z,U,H,K,G){super(B,V,void 0,K,G,P);this.command={},this._source=P,this.hasDefinedMatchers=H,U&&(this.command=U)}clone(){return new g(this._id,this._source,this._label,this.type,this.command,this.hasDefinedMatchers,this.runOptions,this.configurationProperties)}customizes(){if(this._source&&this._source.customizes)return this._source.customizes}getDefinition(B=!1){if(B&&this._source.customizes!==void 0)return this._source.customizes;{let P;switch(this.command?this.command.runtime:void 0){case S.Shell:P="shell";break;case S.Process:P="process";break;case S.CustomExecution:P="customExecution";break;case void 0:P="$composite";break;default:throw new Error("Unexpected task runtime")}return{type:P,_key:this._id,id:this._id}}}static is(B){return B instanceof g}getMapKey(){let B=this._source.config.workspaceFolder;return B?`${B.uri.toString()}|${this._id}|${this.instance}`:`${this._id}|${this.instance}`}getFolderId(){return this._source.kind===p.User?I.USER_TASKS_GROUP_KEY:this._source.config.workspaceFolder?.uri.toString()}getCommonTaskId(){return this._source.customizes?super.getCommonTaskId():this.getRecentlyUsedKey()??super.getCommonTaskId()}getRecentlyUsedKey(){let B=this.getFolderId();if(!B)return;let P=this.configurationProperties.identifier;this._source.kind!==p.Workspace&&(P+=this._source.kind);let V={type:e.CUSTOMIZED_TASK_TYPE,folder:B,id:P};return JSON.stringify(V)}getWorkspaceFolder(){return this._source.config.workspaceFolder}getWorkspaceFileName(){return this._source.config.workspace&&this._source.config.workspace.configuration?_.basename(this._source.config.workspace.configuration):void 0}getTelemetryKind(){return this._source.customizes?"workspace>extension":"workspace"}fromObject(B){return new g(B._id,B._source,B._label,B.type,B.command,B.hasDefinedMatchers,B.runOptions,B.configurationProperties)}}e.CustomTask=g;class d extends h{constructor(B,P,V,z,U,H,K){super(B,V,z,H,K,P);this._source=P,this.configures=U}static is(B){return B instanceof d}fromObject(B){return B}getDefinition(){return this.configures}getWorkspaceFileName(){return this._source.config.workspace&&this._source.config.workspace.configuration?_.basename(this._source.config.workspace.configuration):void 0}getWorkspaceFolder(){return this._source.config.workspaceFolder}getFolderId(){return this._source.kind===p.User?I.USER_TASKS_GROUP_KEY:this._source.config.workspaceFolder?.uri.toString()}getRecentlyUsedKey(){let B=this.getFolderId();if(!B)return;let P=this.configurationProperties.identifier;this._source.kind!==p.Workspace&&(P+=this._source.kind);let V={type:e.CUSTOMIZED_TASK_TYPE,folder:B,id:P};return JSON.stringify(V)}}e.ConfiguringTask=d;class m extends h{constructor(B,P,V,z,U,H,K,G,q){super(B,V,z,G,q,P);this.defines=U,this.hasDefinedMatchers=K,this.command=H}clone(){return new m(this._id,this._source,this._label,this.type,this.defines,this.command,this.hasDefinedMatchers,this.runOptions,this.configurationProperties)}getDefinition(){return this.defines}static is(B){return B instanceof m}getMapKey(){let B=this._source.workspaceFolder;return B?`${this._source.scope.toString()}|${B.uri.toString()}|${this._id}|${this.instance}`:`${this._source.scope.toString()}|${this._id}|${this.instance}`}getFolderId(){if(this._source.scope===3&&this._source.workspaceFolder)return this._source.workspaceFolder.uri.toString()}getRecentlyUsedKey(){let B={type:"contributed",scope:this._source.scope,id:this._id};return B.folder=this.getFolderId(),JSON.stringify(B)}getWorkspaceFolder(){return this._source.workspaceFolder}getTelemetryKind(){return"extension"}fromObject(B){return new m(B._id,B._source,B._label,B.type,B.defines,B.command,B.hasDefinedMatchers,B.runOptions,B.configurationProperties)}}e.ContributedTask=m;class b extends h{constructor(B,P,V,z,U,H){super(B,V,z,U,H,P);this._source=P}clone(){return new b(this._id,this._source,this._label,this.type,this.runOptions,this.configurationProperties)}static is(B){return B instanceof b}getTelemetryKind(){return"composite"}getMapKey(){return`${this._id}|${this.instance}`}getFolderId(){}fromObject(B){return new b(B._id,B._source,B._label,B.type,B.runOptions,B.configurationProperties)}}e.InMemoryTask=b;var E;(function(N){N[N.Process=1]="Process",N[N.Terminal=2]="Terminal"})(E=e.ExecutionEngine||(e.ExecutionEngine={})),function(N){N._default=N.Terminal}(E=e.ExecutionEngine||(e.ExecutionEngine={}));var y;(function(N){N[N.V0_1_0=1]="V0_1_0",N[N.V2_0_0=2]="V2_0_0"})(y=e.JsonSchemaVersion||(e.JsonSchemaVersion={}));class T{constructor(B){this._order=new Map;for(let P=0;P<B.length;P++)this._order.set(B[P].uri.toString(),P)}compare(B,P){let V=B.getWorkspaceFolder(),z=P.getWorkspaceFolder();if(V&&z){let U=this._order.get(V.uri.toString());U=U===void 0?0:U+1;let H=this._order.get(z.uri.toString());return H=H===void 0?0:H+1,U===H?B._label.localeCompare(P._label):U-H}else return!V&&z?-1:V&&!z?1:0}}e.TaskSorter=T;var R;(function(N){N.DependsOnStarted="dependsOnStarted",N.AcquiredInput="acquiredInput",N.Start="start",N.ProcessStarted="processStarted",N.Active="active",N.Inactive="inactive",N.Changed="changed",N.Terminated="terminated",N.ProcessEnded="processEnded",N.End="end"})(R=e.TaskEventKind||(e.TaskEventKind={}));var O;(function(N){N.SingleRun="singleRun",N.Background="background"})(O=e.TaskRunType||(e.TaskRunType={}));var x;(function(N){N[N.System=0]="System",N[N.User=1]="User",N[N.FolderOpen=2]="FolderOpen",N[N.ConfigurationChange=3]="ConfigurationChange"})(x=e.TaskRunSource||(e.TaskRunSource={}));var F;(function(N){function B(P,V,z,U){if(V){let H={kind:P,taskId:V._id,taskName:V.configurationProperties.name,runType:V.configurationProperties.isBackground?"background":"singleRun",group:V.configurationProperties.group,processId:void 0,exitCode:void 0,terminalId:void 0,__task:V};return P==="start"?(H.terminalId=z,H.resolvedVariables=U):P==="processStarted"?H.processId=z:P==="processEnded"&&(H.exitCode=z),Object.freeze(H)}else return Object.freeze({kind:"changed"})}N.create=B})(F=e.TaskEvent||(e.TaskEvent={}));var L;(function(N){function B(V){const z=Object.keys(V).sort();let U="";for(const H of z){let K=V[H];K instanceof Object?K=B(K):typeof K=="string"&&(K=K.replace(/,/g,",,")),U+=H+","+K+","}return U}function P(V){let U={_key:B(V),type:V.taskType};return Object.assign(U,V),U}N.create=P})(L=e.KeyedTaskIdentifier||(e.KeyedTaskIdentifier={}));var M;(function(N){function B(P,V){let z=D.TaskDefinitionRegistry.get(P.type);if(z===void 0){let G=A.deepClone(P);return delete G._key,L.create(G)}let U=Object.create(null);U.type=z.taskType;let H=new Set;z.required.forEach(G=>H.add(G));let K=z.properties;for(let G of Object.keys(K)){let q=P[G];if(q!=null)U[G]=q;else if(H.has(G)){let Z=K[G];if(Z.default!==void 0)U[G]=A.deepClone(Z.default);else switch(Z.type){case"boolean":U[G]=!1;break;case"number":case"integer":U[G]=0;break;case"string":U[G]="";break;default:V.error(t.localize(2,null,JSON.stringify(P,void 0,0),G));return}}}return L.create(U)}N.createTaskIdentifier=B})(M=e.TaskDefinition||(e.TaskDefinition={}))}),define(ne[862],re([1,0,1735,19,2,269,143,273,24,26,53,16,114,6,31]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ManageAutomaticTaskRunning=e.RunAutomaticTasks=void 0;const S="tasks.run.allowAutomatic";let s=class _i extends _.Disposable{constructor(p,u,a,n){super();this.taskService=p,this.storageService=u,this.workspaceTrustManagementService=a,this.logService=n,this.tryRunTasks()}async tryRunTasks(){this.logService.trace("RunAutomaticTasks: Trying to run tasks."),this.taskService.hasTaskSystemInfo||(this.logService.trace("RunAutomaticTasks: Awaiting task system info."),await c.Event.toPromise(c.Event.once(this.taskService.onDidChangeTaskSystemInfo))),this.logService.trace("RunAutomaticTasks: Checking if automatic tasks should run.");const p=this.storageService.getBoolean(S,1,void 0);await this.workspaceTrustManagementService.workspaceTrustInitialized;const u=this.workspaceTrustManagementService.isWorkspaceTrusted();p&&u&&this.taskService.getWorkspaceTasks(2).then(a=>{let{tasks:n}=_i.findAutoTasks(this.taskService,a);this.logService.trace(`RunAutomaticTasks: Found ${n.length} automatic tasks tasks`),n.length>0&&_i.runTasks(this.taskService,n)})}static runTasks(p,u){u.forEach(a=>{a instanceof Promise?a.then(n=>{n&&p.run(n)}):p.run(a)})}static getTaskSource(p){switch(D.TaskSourceKind.toConfigurationTarget(p.kind)){case 5:return f.joinPath(p.config.workspaceFolder.uri,p.config.file);case 4:return p.config.workspace?.configuration??void 0}}static findAutoTasks(p,u){const a=new Array,n=new Array,h=new Map;return u&&u.forEach(g=>{g.set&&g.set.tasks.forEach(d=>{if(d.runOptions.runOn===D.RunOnOptions.folderOpen){a.push(d),n.push(d._label);const m=_i.getTaskSource(d._source);m&&h.set(m.fsPath,m)}}),g.configurations&&(0,k.forEach)(g.configurations.byIdentifier,d=>{if(d.value.runOptions.runOn===D.RunOnOptions.folderOpen){a.push(new Promise(b=>{p.getTask(g.workspaceFolder,d.value._id,!0).then(E=>b(E))})),d.value._label?n.push(d.value._label):n.push(d.value.configures.task);const m=_i.getTaskSource(d.value._source);m&&h.set(m.fsPath,m)}})}),{tasks:a,taskNames:n,locations:h}}static async promptForPermission(p,u,a,n,h,g){if(!n.isWorkspaceTrusted||u.getBoolean(S,1,void 0)!==void 0)return;let{tasks:b,taskNames:E,locations:y}=_i.findAutoTasks(p,g);E.length>0&&this.showPrompt(a,u,p,h,E,y).then(T=>{T&&_i.runTasks(p,b)})}static showPrompt(p,u,a,n,h,g){return new Promise(d=>{p.prompt(w.Severity.Info,t.localize(0,null,h.join(", "),Array.from(g.keys()).join(", ")),[{label:t.localize(1,null),run:()=>{d(!0),u.store(S,!0,1,1)}},{label:t.localize(2,null),run:()=>{d(!1),u.store(S,!1,1,1)}},{label:g.size===1?t.localize(3,null):t.localize(4,null),run:async()=>{for(const m of g)await n.open(m[1]);d(!1)}}])})}};s=Ee([W(0,A.ITaskService),W(1,I.IStorageService),W(2,o.IWorkspaceTrustManagementService),W(3,i.ILogService)],s),e.RunAutomaticTasks=s;class l extends C.Action2{constructor(){super({id:l.ID,title:l.LABEL,category:D.TASKS_CATEGORY})}async run(p){const u=p.get(v.IQuickInputService),a=p.get(I.IStorageService),n={label:t.localize(6,null)},h={label:t.localize(7,null)},g=await u.pick([n,h],{canPickMany:!1});!g||a.store(S,g===n,1,1)}}e.ManageAutomaticTaskRunning=l,l.ID="workbench.action.tasks.manageAutomaticRunning",l.LABEL=t.localize(5,null)}),define(ne[863],re([1,0,1737,51,273,13,2,6,26,33,12,63]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TaskQuickPick=e.configureTaskIcon=e.isWorkspaceFolder=e.QUICKOPEN_SKIP_CONFIG=e.QUICKOPEN_DETAIL_CONFIG=void 0,e.QUICKOPEN_DETAIL_CONFIG="task.quickOpen.detail",e.QUICKOPEN_SKIP_CONFIG="task.quickOpen.skip";function o(s){return"uri"in s}e.isWorkspaceFolder=o;const c=t.localize(0,null);e.configureTaskIcon=(0,C.registerIcon)("tasks-list-configure",w.Codicon.gear,t.localize(1,null));const i=(0,C.registerIcon)("tasks-remove",w.Codicon.close,t.localize(2,null));class S extends k.Disposable{constructor(l,r,p,u,a){super();this.taskService=l,this.configurationService=r,this.quickInputService=p,this.notificationService=u,this.dialogService=a,this.sorter=this.taskService.createSorter()}showDetail(){return!!this.configurationService.getValue(e.QUICKOPEN_DETAIL_CONFIG)}guessTaskLabel(l){if(l._label)return l._label;if(_.ConfiguringTask.is(l)){let r=l.configures.type;const p=f.deepClone(l.configures);return delete p._key,delete p.type,Object.keys(p).forEach(u=>r+=`: ${p[u]}`),r}return""}createTaskEntry(l,r=[]){const p={label:this.guessTaskLabel(l),description:this.taskService.getTaskDescription(l),task:l,detail:this.showDetail()?l.configurationProperties.detail:void 0};return p.buttons=[{iconClass:v.ThemeIcon.asClassName(e.configureTaskIcon),tooltip:t.localize(3,null)},...r],p}createEntriesForGroup(l,r,p,u=[]){l.push({type:"separator",label:p}),r.forEach(a=>{l.push(this.createTaskEntry(a,u))})}createTypeEntries(l,r){l.push({type:"separator",label:t.localize(4,null)}),r.forEach(p=>{l.push({label:`$(folder) ${p}`,task:p,ariaLabel:t.localize(5,null,p)})}),l.push({label:c,task:c,alwaysShow:!0})}handleFolderTaskResult(l){let r=[];return Array.from(l).forEach(([p,u])=>{if(u.set&&r.push(...u.set.tasks),u.configurations)for(const a in u.configurations.byIdentifier)r.push(u.configurations.byIdentifier[a])}),r}dedupeConfiguredAndRecent(l,r){let p=[];const u=Array(l.length).fill(!1);for(let n=0;n<r.length;n++){const h=r[n].getWorkspaceFolder()?.uri.toString(),g=r[n].getDefinition()?._key,d=r[n].type,m=r[n]._label,b=r[n].getRecentlyUsedKey(),E=l.findIndex(y=>h&&g&&y.getWorkspaceFolder()?.uri.toString()===h&&(y.getDefinition()?._key===g||y.type===d&&y._label===m)||b&&y.getRecentlyUsedKey()===b);E===-1?p.push(r[n]):(l[E]=r[n],u[E]=!0)}p=p.sort((n,h)=>this.sorter.compare(n,h));const a=[];for(let n=0;n<l.length;n++)(u[n]||_.ConfiguringTask.is(l[n]))&&a.push(l[n]);return{configuredTasks:p,recentTasks:a}}async getTopLevelEntries(l){if(this.topLevelEntries!==void 0)return{entries:this.topLevelEntries};let r=(await this.taskService.readRecentTasks()).reverse();const p=this.handleFolderTaskResult(await this.taskService.getWorkspaceTasks()),u=this.taskService.taskTypes();this.topLevelEntries=[];const a=this.dedupeConfiguredAndRecent(r,p);let n=a.configuredTasks;if(r=a.recentTasks,r.length>0){const h={iconClass:v.ThemeIcon.asClassName(i),tooltip:t.localize(6,null)};this.createEntriesForGroup(this.topLevelEntries,r,t.localize(7,null),[h])}return p.length>0&&n.length>0&&this.createEntriesForGroup(this.topLevelEntries,n,t.localize(8,null)),l&&p.length===0&&(this.topLevelEntries.push({type:"separator",label:t.localize(9,null)}),this.topLevelEntries.push(l)),u.length>0&&this.createTypeEntries(this.topLevelEntries,u),{entries:this.topLevelEntries,isSingleConfigured:p.length===1?p[0]:void 0}}async handleSettingOption(l){const r=t.localize(10,null),p=t.localize(11,null);if((await this.dialogService.show(I.Severity.Warning,t.localize(12,null,l),[r,p])).choice===1)return await this.configurationService.updateValue(`${l}.autoDetect`,"on"),await new Promise(a=>setTimeout(()=>a(),100)),this.show(t.localize(13,null),void 0,l)}async show(l,r,p){const u=this.quickInputService.createQuickPick();u.placeholder=l,u.matchOnDescription=!0,u.ignoreFocusOut=!1,u.show(),u.onDidTriggerItemButton(async n=>{let h=n.item.task;if(n.button.iconClass===v.ThemeIcon.asClassName(i)){const g=h&&!A.isString(h)?h.getRecentlyUsedKey():void 0;g&&this.taskService.removeRecentlyUsedTask(g);const d=u.items.indexOf(n.item);d>=0&&(u.items=[...u.items.slice(0,d),...u.items.slice(d+1)])}else if(this.quickInputService.cancel(),_.ContributedTask.is(h))this.taskService.customize(h,void 0,!0);else if(_.CustomTask.is(h)||_.ConfiguringTask.is(h)){let g=!1;try{g=await this.taskService.openConfig(h)}catch{}g||this.taskService.customize(h,void 0,!0)}});let a=p;if(!a){const n=await this.getTopLevelEntries(r);if(n.isSingleConfigured&&this.configurationService.getValue(e.QUICKOPEN_SKIP_CONFIG))return u.dispose(),this.toTask(n.isSingleConfigured);const h=n.entries;a=await this.doPickerFirstLevel(u,h)}do if(A.isString(a)){const n=await this.doPickerSecondLevel(u,a);if(n&&!n.settingType&&n.task===null)a=await this.doPickerFirstLevel(u,(await this.getTopLevelEntries(r)).entries);else return n&&A.isString(n.settingType)?(u.dispose(),this.handleSettingOption(n.settingType)):(u.dispose(),n?.task&&!A.isString(n?.task)?this.toTask(n?.task):void 0)}else return a?(u.dispose(),this.toTask(a)):(u.dispose(),a);while(1)}async doPickerFirstLevel(l,r){return l.items=r,(await new Promise(u=>{D.Event.once(l.onDidAccept)(async()=>{u(l.selectedItems?l.selectedItems[0]:void 0)})}))?.task}async doPickerSecondLevel(l,r){if(l.busy=!0,r===c){const u=(await this.taskService.tasks()).sort((a,n)=>this.sorter.compare(a,n)).map(a=>this.createTaskEntry(a));u.push(...S.allSettingEntries(this.configurationService)),l.items=u}else l.value="",l.items=await this.getEntriesForProvider(r);return l.busy=!1,await new Promise(u=>{D.Event.once(l.onDidAccept)(async()=>{u(l.selectedItems?l.selectedItems[0]:void 0)})})}static allSettingEntries(l){const r=[],p=S.getSettingEntry(l,"grunt");p&&r.push(p);const u=S.getSettingEntry(l,"gulp");u&&r.push(u);const a=S.getSettingEntry(l,"jake");return a&&r.push(a),r}static getSettingEntry(l,r){if(l.getValue(`${r}.autoDetect`)==="off")return{label:t.localize(14,null,r[0].toUpperCase()+r.slice(1),r),task:null,settingType:r,alwaysShow:!0}}async getEntriesForProvider(l){const r=(await this.taskService.tasks({type:l})).sort((a,n)=>this.sorter.compare(a,n));let p;r.length>0?(p=r.map(a=>this.createTaskEntry(a)),p.push({type:"separator"},{label:t.localize(15,null),task:null,alwaysShow:!0})):p=[{label:t.localize(16,null,l),task:null,alwaysShow:!0}];const u=S.getSettingEntry(this.configurationService,l);return u&&p.push(u),p}async toTask(l){if(!_.ConfiguringTask.is(l))return l;const r=await this.taskService.tryResolveTask(l);return r||this.notificationService.error(t.localize(17,null,l.type)),r}static async show(l,r,p,u,a,n,h){return new S(l,r,p,u,a).show(n,h)}}e.TaskQuickPick=S}),define(ne[2328],re([1,0,1739,53,245,102,40,269,273,863,8,13,26,54]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TasksQuickAccessProvider=void 0;let i=class Wo extends _.PickerQuickAccessProvider{constructor(s,l,r,p,u,a){super(Wo.PREFIX,{noResultsPick:{label:(0,t.localize)(0,null)}});this.taskService=l,this.configurationService=r,this.quickInputService=p,this.notificationService=u,this.dialogService=a}async _getPicks(s,l,r){if(r.isCancellationRequested)return[];const p=new w.TaskQuickPick(this.taskService,this.configurationService,this.quickInputService,this.notificationService,this.dialogService),u=await p.getTopLevelEntries(),a=[];for(const n of u.entries){const h=(0,A.matchesFuzzy)(s,n.label);if(!h)continue;n.type==="separator"&&a.push(n);const g=n.task,d=n;d.highlights={label:h},d.trigger=m=>{if(m===1&&d.buttons?.length===2){const b=g&&!(0,C.isString)(g)?g.getRecentlyUsedKey():void 0;return b&&this.taskService.removeRecentlyUsedTask(b),_.TriggerAction.REFRESH_PICKER}else return I.ContributedTask.is(g)?this.taskService.customize(g,void 0,!0):I.CustomTask.is(g)&&this.taskService.openConfig(g),_.TriggerAction.CLOSE_PICKER},d.accept=async()=>{if((0,C.isString)(g)){const m=await p.show((0,t.localize)(1,null),void 0,g);m&&this.taskService.run(m,{attachProblemMatcher:!0})}else this.taskService.run(await this.toTask(g),{attachProblemMatcher:!0})},a.push(d)}return a}async toTask(s){return I.ConfiguringTask.is(s)?this.taskService.tryResolveTask(s):s}};i.PREFIX="task ",i=Ee([W(0,k.IExtensionService),W(1,D.ITaskService),W(2,v.IConfigurationService),W(3,f.IQuickInputService),W(4,o.INotificationService),W(5,c.IDialogService)],i),e.TasksQuickAccessProvider=i}),define(ne[864],re([1,0,48,1740,51,13,14,11,19,143,55,81,6,2,157,125,297,320,120,861,273,814,9,18,188,818,2326]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalTaskSystem=e.VerifiedTask=void 0;class b{constructor(){this._currentInstances=0,this._counter=0}addInstance(){this._currentInstances++,this._counter++}removeInstance(){this._currentInstances--}get instances(){return this._currentInstances}get counter(){return this._counter}}class E{constructor(O,x,F,L){this.workspaceFolder=O,this.taskSystemInfo=x,this.values=F,this._service=L}async resolve(O){const x=[];O.replace(E.regex,(L,...M)=>(x.push(this.replacer(L,M)),L));const F=await Promise.all(x);return O.replace(E.regex,()=>F.shift())}async replacer(O,x){let F=this.values.get(O.substring(2,O.length-1));return F??(this._service?this._service.resolveAsync(this.workspaceFolder,O):O)}}E.regex=/\$\{(.*?)\}/g;class y{constructor(O,x,F){this.task=O,this.resolver=x,this.trigger=F}verify(){let O=!1;return this.trigger&&this.resolvedVariables&&this.workspaceFolder&&this.shellLaunchConfig!==void 0&&(O=!0),O}getVerifiedTask(){if(this.verify())return{task:this.task,resolver:this.resolver,trigger:this.trigger,resolvedVariables:this.resolvedVariables,systemInfo:this.systemInfo,workspaceFolder:this.workspaceFolder,shellLaunchConfig:this.shellLaunchConfig};throw new Error("VerifiedTask was not checked. verify must be checked before getVerifiedTask.")}}e.VerifiedTask=y;class T extends c.Disposable{constructor(O,x,F,L,M,N,B,P,V,z,U,H,K,G,q,Z,j,X,Y,$,J){super();this.terminalService=O,this.terminalGroupService=x,this.outputService=F,this.paneCompositeService=L,this.viewsService=M,this.markerService=N,this.modelService=B,this.configurationResolverService=P,this.telemetryService=V,this.contextService=z,this.environmentService=U,this.outputChannelId=H,this.fileService=K,this.terminalProfileResolverService=G,this.pathService=q,this.viewDescriptorService=Z,this.logService=j,this.configurationService=X,this.notificationService=Y,this.isRerun=!1,this.terminalCreationQueue=Promise.resolve(),this.activeTasks=Object.create(null),this.instances=Object.create(null),this.busyTasks=Object.create(null),this.terminals=Object.create(null),this.idleTaskTerminals=new v.LinkedMap,this.sameTaskTerminals=Object.create(null),this._onDidStateChange=new o.Emitter,this.taskSystemInfoResolver=J,this._register(this.terminalStatusManager=new m.TaskTerminalStatus($))}get onDidStateChange(){return this._onDidStateChange.event}log(O){this.appendOutput(O+` `)}showOutput(){this.outputService.showChannel(this.outputChannelId,!0)}run(O,x,F=a.Triggers.command){O=O.clone();const L=O.getRecentlyUsedKey()??"";let M=O.runOptions&&O.runOptions.instanceLimit&&this.instances[L]&&this.instances[L].instances<O.runOptions.instanceLimit,N=this.instances[L]?this.instances[L].instances:0;this.currentTask=new y(O,x,F),N>0&&(O.instance=this.instances[L].counter);let B=this.getLastInstance(O),P=B?this.activeTasks[B.getMapKey()]:void 0;if(P&&P.promise&&!M)return this.lastTask=this.currentTask,{kind:2,task:P.task,active:{same:!0,background:O.configurationProperties.isBackground},promise:P.promise};try{const V={kind:1,task:O,started:{},promise:this.executeTask(O,x,F,new Set)};return V.promise.then(z=>{this.lastTask=this.currentTask}),(u.InMemoryTask.is(O)||!this.isTaskEmpty(O))&&(this.instances[L]||(this.instances[L]=new b),this.instances[L].addInstance()),V}catch(V){throw V instanceof a.TaskError?V:V instanceof Error?(this.log(V.message),new a.TaskError(C.default.Error,V.message,7)):(this.log(V.toString()),new a.TaskError(C.default.Error,f.localize(0,null),7))}}rerun(){if(this.lastTask&&this.lastTask.verify()){this.lastTask.task.runOptions.reevaluateOnRerun!==void 0&&!this.lastTask.task.runOptions.reevaluateOnRerun&&(this.isRerun=!0);const O=this.run(this.lastTask.task,this.lastTask.resolver);return O.promise.then(x=>{this.isRerun=!1}),O}else return}showTaskLoadErrors(O){if(O.taskLoadMessages&&O.taskLoadMessages.length>0){O.taskLoadMessages.forEach(F=>{this.log(F+` `)});const x="Show Output";this.notificationService.prompt(C.default.Warning,f.localize(1,null,O._label),[{label:x,run:()=>this.showOutput()}])}}isTaskVisible(O){let x=this.activeTasks[O.getMapKey()];if(!x)return!1;const F=this.terminalService.activeInstance;return!!this.viewsService.getActiveViewWithId(r.TERMINAL_VIEW_ID)&&F?.instanceId===x.terminal.instanceId}revealTask(O){let x=this.activeTasks[O.getMapKey()];if(!x)return!1;const F=this.viewDescriptorService.getViewLocationById(r.TERMINAL_VIEW_ID)===1;return F&&this.isTaskVisible(O)?(this.previousPanelId?(this.previousTerminalInstance&&this.terminalService.setActiveInstance(this.previousTerminalInstance),this.paneCompositeService.openPaneComposite(this.previousPanelId,1)):this.paneCompositeService.hideActivePaneComposite(1),this.previousPanelId=void 0,this.previousTerminalInstance=void 0):(F&&(this.previousPanelId=this.paneCompositeService.getActivePaneComposite(1)?.getId(),this.previousPanelId===r.TERMINAL_VIEW_ID&&(this.previousTerminalInstance=this.terminalService.activeInstance??void 0)),this.terminalService.setActiveInstance(x.terminal),(u.CustomTask.is(O)||u.ContributedTask.is(O))&&this.terminalGroupService.showPanel(O.command.presentation.focus)),!0}isActive(){return Promise.resolve(this.isActiveSync())}isActiveSync(){return Object.keys(this.activeTasks).length>0}canAutoTerminate(){return Object.keys(this.activeTasks).every(O=>!this.activeTasks[O].task.configurationProperties.promptOnClose)}getActiveTasks(){return Object.keys(this.activeTasks).map(O=>this.activeTasks[O].task)}getLastInstance(O){let x;const F=O.getRecentlyUsedKey();return Object.keys(this.activeTasks).forEach(L=>{F&&F===this.activeTasks[L].task.getRecentlyUsedKey()&&(x=this.activeTasks[L].task)}),x}getBusyTasks(){return Object.keys(this.busyTasks).map(O=>this.busyTasks[O])}customExecutionComplete(O,x){return this.activeTasks[O.getMapKey()]?new Promise(L=>{L()}):Promise.reject(new Error("Expected to have a terminal for an custom execution task"))}removeInstances(O){const x=O.getRecentlyUsedKey()??"";this.instances[x]&&(this.instances[x].removeInstance(),this.instances[x].instances===0&&delete this.instances[x])}removeFromActiveTasks(O){!this.activeTasks[O.getMapKey()]||(delete this.activeTasks[O.getMapKey()],this.removeInstances(O))}fireTaskEvent(O){if(O.__task){const x=this.activeTasks[O.__task.getMapKey()];x&&(x.state=O.kind)}this._onDidStateChange.fire(O)}terminate(O){let x=this.activeTasks[O.getMapKey()];return x?new Promise((F,L)=>{let M=x.terminal;const N=M.onExit(()=>{let B=x.task;try{N.dispose(),this.fireTaskEvent(u.TaskEvent.create("terminated",B))}catch{}F({success:!0,task:B})});M.dispose()}):Promise.resolve({success:!1,task:void 0})}terminateAll(){let O=[];return Object.keys(this.activeTasks).forEach(x=>{let F=this.activeTasks[x],L=F.terminal;O.push(new Promise((M,N)=>{const B=L.onExit(()=>{let P=F.task;try{B.dispose(),this.fireTaskEvent(u.TaskEvent.create("terminated",P))}catch{}M({success:!0,task:F.task})})})),L.dispose()}),this.activeTasks=Object.create(null),Promise.all(O)}showDependencyCycleMessage(O){this.log(f.localize(2,null,O._label)),this.showOutput()}async executeTask(O,x,F,L,M){if(L.has(O.getCommonTaskId()))return this.showDependencyCycleMessage(O),{};this.showTaskLoadErrors(O),M=M??new Map;let N=[];if(O.configurationProperties.dependsOn)for(const B of O.configurationProperties.dependsOn){let P=await x.resolve(B.uri,B.task);if(P){let V=P.getMapKey(),z=this.activeTasks[V]?this.getDependencyPromise(this.activeTasks[V]):void 0;if(z||(this.fireTaskEvent(u.TaskEvent.create("dependsOnStarted",O)),L.add(O.getCommonTaskId()),z=this.executeDependencyTask(P,x,F,L,M)),N.push(z),O.configurationProperties.dependsOrder==="sequence"){const U=await z;if(U.exitCode===0)z=Promise.resolve(U);else{z=Promise.reject(U);break}}N.push(z)}else this.log(f.localize(3,null,A.isString(B.task)?B.task:JSON.stringify(B.task,void 0,0),B.uri.toString())),this.showOutput()}return(u.ContributedTask.is(O)||u.CustomTask.is(O))&&O.command?Promise.all(N).then(B=>{L.delete(O.getCommonTaskId());for(let P of B)if(P.exitCode!==0)return this.removeInstances(O),{exitCode:P.exitCode};return this.isRerun?this.reexecuteCommand(O,F,M):this.executeCommand(O,F,M)}):Promise.all(N).then(B=>{L.delete(O.getCommonTaskId());for(let P of B)if(P.exitCode!==0)return{exitCode:P.exitCode};return{exitCode:0}})}createInactiveDependencyPromise(O){return new Promise(x=>{const F=this.onDidStateChange(L=>{L.kind==="inactive"&&L.__task===O&&(F.dispose(),x({exitCode:0}))})})}async getDependencyPromise(O){return!O.task.configurationProperties.isBackground||!O.task.configurationProperties.problemMatchers||O.task.configurationProperties.problemMatchers.length===0?O.promise:O.state==="inactive"?{exitCode:0}:this.createInactiveDependencyPromise(O.task)}async executeDependencyTask(O,x,F,L,M){if(!O.configurationProperties.isBackground)return this.executeTask(O,x,F,L,M);const N=this.createInactiveDependencyPromise(O);return Promise.race([N,this.executeTask(O,x,F,L,M)])}async resolveAndFindExecutable(O,x,F,L,M){const N=await this.configurationResolverService.resolveAsync(x,u.CommandString.value(F.command.name));L=L?await this.configurationResolverService.resolveAsync(x,L):void 0;const B=M?await Promise.all(M.split(t.delimiter).map(V=>this.configurationResolverService.resolveAsync(x,V))):void 0;let P=await O?.findExecutable(N,L,B);return P||(P=t.join(L??"",N)),P}findUnresolvedVariables(O,x){if(x.size===0)return O;const F=new Set;for(const L of O)x.has(L.substring(2,L.length-1))||F.add(L);return F}mergeMaps(O,x){for(const F of x)O.has(F[0])||O.set(F[0],F[1])}async acquireInput(O,x,F,L,M){const N=await this.resolveVariablesFromSet(O,x,F,L,M);return this.fireTaskEvent(u.TaskEvent.create("acquiredInput",F)),N}resolveVariablesFromSet(O,x,F,L,M){let N=F.command&&F.command.runtime===u.RuntimeType.Process,B=F.command&&F.command.options?F.command.options:void 0,P=B?B.cwd:void 0,V;if(B&&B.env){for(let H of Object.keys(B.env))if(H.toLowerCase()==="path"){A.isString(B.env[H])&&(V=B.env[H]);break}}const z=this.findUnresolvedVariables(L,M);let U;if(O&&x){let H={variables:z};return O.platform===3&&N&&(H.process={name:u.CommandString.value(F.command.name)},P&&(H.process.cwd=P),V&&(H.process.path=V)),U=O.resolveVariables(x,H,u.TaskSourceKind.toConfigurationTarget(F._source.kind)).then(async K=>{if(!!K){if(this.mergeMaps(M,K.variables),K.variables=new Map(M),N){let G=u.CommandString.value(F.command.name);O.platform===3&&(G=await this.resolveAndFindExecutable(O,x,F,P,V)),K.variables.set(T.ProcessVarName,G)}return K}}),U}else{let H=new Array;return z.forEach(K=>H.push(K)),new Promise((K,G)=>{this.configurationResolverService.resolveWithInteraction(x,H,"tasks",void 0,u.TaskSourceKind.toConfigurationTarget(F._source.kind)).then(async q=>{if(q){if(this.mergeMaps(M,q),q=new Map(M),N){let j;k.isWindows?j=await this.resolveAndFindExecutable(O,x,F,P,V):j=await this.configurationResolverService.resolveAsync(x,u.CommandString.value(F.command.name)),q.set(T.ProcessVarName,j)}K({variables:q})}else K(void 0)},q=>{G(q)})})}}executeCommand(O,x,F){const L=O.getWorkspaceFolder();let M;if(L)M=this.currentTask.workspaceFolder=L;else{const V=this.contextService.getWorkspace().folders;M=V.length>0?V[0]:void 0}const N=this.currentTask.systemInfo=this.taskSystemInfoResolver(M);let B=new Set;return this.collectTaskVariables(B,O),this.acquireInput(N,M,O,B,F).then(V=>V&&!this.isTaskEmpty(O)?(this.currentTask.resolvedVariables=V,this.executeInTerminal(O,x,new E(M,N,V.variables,this.configurationResolverService),M)):(this.fireTaskEvent(u.TaskEvent.create("end",O)),Promise.resolve({exitCode:0})),V=>Promise.reject(V))}isTaskEmpty(O){const x=O.command.runtime===u.RuntimeType.CustomExecution;return!(O.command!==void 0&&O.command.runtime&&(x||O.command.name!==void 0))}reexecuteCommand(O,x,F){const L=this.lastTask;if(!L)return Promise.reject(new Error("No task previously run"));const M=this.currentTask.workspaceFolder=L.workspaceFolder;let N=new Set;this.collectTaskVariables(N,O);let B=!0;return N.forEach(P=>{P.substring(2,P.length-1)in L.getVerifiedTask().resolvedVariables&&(B=!1)}),B?(this.currentTask.resolvedVariables=L.getVerifiedTask().resolvedVariables,this.executeInTerminal(O,x,new E(L.getVerifiedTask().workspaceFolder,L.getVerifiedTask().systemInfo,L.getVerifiedTask().resolvedVariables.variables,this.configurationResolverService),M)):this.acquireInput(L.getVerifiedTask().systemInfo,L.getVerifiedTask().workspaceFolder,O,N,F).then(P=>P?(this.currentTask.resolvedVariables=P,this.executeInTerminal(O,x,new E(L.getVerifiedTask().workspaceFolder,L.getVerifiedTask().systemInfo,P.variables,this.configurationResolverService),M)):(this.fireTaskEvent(u.TaskEvent.create("end",O)),{exitCode:0}),P=>Promise.reject(P))}async executeInTerminal(O,x,F,L){let M,N,B,P;if(O.configurationProperties.isBackground){const z=await this.resolveMatchers(F,O.configurationProperties.problemMatchers);let U=new p.WatchingProblemCollector(z,this.markerService,this.modelService,this.fileService);z.length>0&&!U.isWatching()&&(this.appendOutput(f.localize(4,null,O._label)),this.showOutput());const H=new c.DisposableStore;let K=0;const G=O.getMapKey();H.add(U.onDidStateChange(X=>{if(X.kind==="backgroundProcessingBegins")K++,this.busyTasks[G]=O,this.fireTaskEvent(u.TaskEvent.create("active",O));else if(X.kind==="backgroundProcessingEnds"&&(K--,this.busyTasks[G]&&delete this.busyTasks[G],this.fireTaskEvent(u.TaskEvent.create("inactive",O)),K===0&&U.numberOfMatches>0&&U.maxMarkerSeverity&&U.maxMarkerSeverity>=S.MarkerSeverity.Error)){let Y=O.command.presentation.reveal;O.command.presentation.revealProblems===u.RevealProblemKind.OnProblem?this.viewsService.openView(l.default.MARKERS_VIEW_ID,!0):Y===u.RevealKind.Silent&&(this.terminalService.setActiveInstance(M),this.terminalGroupService.showPanel(!1))}})),U.aboutToStart();let q;if([M,N,B]=await this.createTerminal(O,F,L),B)return Promise.reject(new Error(B.message));if(!M)return Promise.reject(new Error(`Failed to create terminal for task ${O._label}`));this.terminalStatusManager.addTerminal(O,M,U);let Z=!1;M.processReady.then(()=>{Z||(this.fireTaskEvent(u.TaskEvent.create("processStarted",O,M.processId)),Z=!0)},X=>{this.logService.error("Task terminal process never got ready")}),this.fireTaskEvent(u.TaskEvent.create("start",O,M.instanceId));const j=M.onLineData(X=>{U.processLine(X),q||(q=new D.Delayer(3e3)),q.trigger(()=>{U.forceDelivery(),q=void 0})});P=new Promise((X,Y)=>{const $=M.onExit(J=>{const ee=typeof J=="number"?J:J?.code;j.dispose(),$.dispose();let te=O.getMapKey();if(this.busyTasks[G]&&delete this.busyTasks[G],this.removeFromActiveTasks(O),this.fireTaskEvent(u.TaskEvent.create("changed")),J!==void 0)switch(O.command.presentation.panel){case u.PanelKind.Dedicated:this.sameTaskTerminals[te]=M.instanceId.toString();break;case u.PanelKind.Shared:this.idleTaskTerminals.set(te,M.instanceId.toString(),1);break}if(O.command.presentation.reveal===u.RevealKind.Silent&&(ee!==0||U.numberOfMatches>0&&U.maxMarkerSeverity&&U.maxMarkerSeverity>=S.MarkerSeverity.Error))try{this.terminalService.setActiveInstance(M),this.terminalGroupService.showPanel(!1)}catch{}U.done(),U.dispose(),Z||(this.fireTaskEvent(u.TaskEvent.create("processStarted",O,M.processId)),Z=!0),this.fireTaskEvent(u.TaskEvent.create("processEnded",O,ee??void 0));for(let ie=0;ie<K;ie++)this.fireTaskEvent(u.TaskEvent.create("inactive",O));K=0,this.fireTaskEvent(u.TaskEvent.create("end",O)),H.dispose(),X({exitCode:ee??void 0})})})}else{if([M,N,B]=await this.createTerminal(O,F,L),B)return Promise.reject(new Error(B.message));if(!M)return Promise.reject(new Error(`Failed to create terminal for task ${O._label}`));let z=!1;M.processReady.then(()=>{z||(this.fireTaskEvent(u.TaskEvent.create("processStarted",O,M.processId)),z=!0)},q=>{}),this.fireTaskEvent(u.TaskEvent.create("start",O,M.instanceId,F.values));const U=O.getMapKey();this.busyTasks[U]=O,this.fireTaskEvent(u.TaskEvent.create("active",O));let H=await this.resolveMatchers(F,O.configurationProperties.problemMatchers),K=new p.StartStopProblemCollector(H,this.markerService,this.modelService,0,this.fileService);this.terminalStatusManager.addTerminal(O,M,K);const G=M.onLineData(q=>{K.processLine(q)});P=new Promise((q,Z)=>{const j=M.onExit(X=>{const Y=typeof X=="number"?X:X?.code;j.dispose();let $=O.getMapKey();if(this.removeFromActiveTasks(O),this.fireTaskEvent(u.TaskEvent.create("changed")),X!==void 0)switch(O.command.presentation.panel){case u.PanelKind.Dedicated:this.sameTaskTerminals[$]=M.instanceId.toString();break;case u.PanelKind.Shared:this.idleTaskTerminals.set($,M.instanceId.toString(),1);break}let J=O.command.presentation.reveal,ee=O.command.presentation.revealProblems;if(M&&ee===u.RevealProblemKind.OnProblem&&K.numberOfMatches>0)this.viewsService.openView(l.default.MARKERS_VIEW_ID);else if(M&&J===u.RevealKind.Silent&&(Y!==0||K.numberOfMatches>0&&K.maxMarkerSeverity&&K.maxMarkerSeverity>=S.MarkerSeverity.Error))try{this.terminalService.setActiveInstance(M),this.terminalGroupService.showPanel(!1)}catch{}setTimeout(()=>{G.dispose(),K.done(),K.dispose()},100),!z&&M&&(this.fireTaskEvent(u.TaskEvent.create("processStarted",O,M.processId)),z=!0),this.fireTaskEvent(u.TaskEvent.create("processEnded",O,Y??void 0)),this.busyTasks[U]&&delete this.busyTasks[U],this.fireTaskEvent(u.TaskEvent.create("inactive",O)),this.fireTaskEvent(u.TaskEvent.create("end",O)),q({exitCode:Y??void 0})})})}return O.command.presentation&&O.command.presentation.revealProblems===u.RevealProblemKind.Always?this.viewsService.openView(l.default.MARKERS_VIEW_ID):O.command.presentation&&O.command.presentation.reveal===u.RevealKind.Always&&(this.terminalService.setActiveInstance(M),this.terminalGroupService.showPanel(O.command.presentation.focus)),this.activeTasks[O.getMapKey()]={terminal:M,task:O,promise:P},this.fireTaskEvent(u.TaskEvent.create("changed")),P.then(z=>{try{let U={trigger:x,runner:"terminal",taskKind:O.getTelemetryKind(),command:this.getSanitizedCommand(N),success:!0,exitCode:z.exitCode};this.telemetryService.publicLog(T.TelemetryEventName,U)}catch{}return z},z=>{try{let U={trigger:x,runner:"terminal",taskKind:O.getTelemetryKind(),command:this.getSanitizedCommand(N),success:!1};this.telemetryService.publicLog(T.TelemetryEventName,U)}catch{}return Promise.reject(z)})}createTerminalName(O){return this.contextService.getWorkbenchState()===3?O.getQualifiedLabel():O.configurationProperties.name||""}async createShellLaunchConfig(O,x,F,L,M,N,B,P){let V,z=O.command.runtime===u.RuntimeType.Shell,U=this.contextService.getWorkbenchState()===3,H=this.createTerminalName(O);const K="Task";let G=O.command.name;if(z){let q;switch(L){case 3:q=1;break;case 1:q=2;break;case 2:default:q=3;break}const Z=await this.terminalProfileResolverService.getDefaultProfile({allowAutomationShell:!0,os:q,remoteAuthority:this.environmentService.remoteAuthority});V={name:H,type:K,executable:Z.path,args:Z.args,icon:Z.icon,env:{...Z.env},color:Z.color,waitOnExit:P};let j=!1,X=O.command.options&&O.command.options.shell;X&&(X.executable&&(X.executable!==V.executable&&(V.args=void 0),V.executable=await this.resolveVariable(F,X.executable),j=!0),X.args&&(V.args=await this.resolveVariables(F,X.args.slice()))),V.args===void 0&&(V.args=[]);let Y=Array.isArray(V.args)?V.args.slice(0):[V.args],$=[],J=t.posix.basename((await this.pathService.fileURI(V.executable)).path).toLowerCase(),ee=this.buildShellCommandLine(L,J,X,N,G,B),te=!1;if(L===3){te=!0;const ie=await this.pathService.userHome();if(J==="cmd.exe"&&(M.cwd&&(0,i.isUNC)(M.cwd)||!M.cwd&&(0,i.isUNC)(ie.fsPath)))return;J==="powershell.exe"||J==="pwsh.exe"?j||$.push("-Command"):J==="bash.exe"||J==="zsh.exe"?(te=!1,j||$.push("-c")):J==="wsl.exe"?j||$.push("-e"):j||$.push("/d","/c")}else if(!j){if(L===1){const ie=this.configurationService.inspect("terminal.integrated.shellArgs.osx");if(ie.user===void 0&&ie.userLocal===void 0&&ie.userLocalValue===void 0&&ie.userRemote===void 0&&ie.userRemoteValue===void 0&&ie.userValue===void 0&&ie.workspace===void 0&&ie.workspaceFolder===void 0&&ie.workspaceFolderValue===void 0&&ie.workspaceValue===void 0){let ce=Y.indexOf("-l");ce!==-1&&Y.splice(ce,1)}}$.push("-c")}const se=this.addAllArgument($,Y);se.push(ee),V.args=te?se.join(" "):se,O.command.presentation&&O.command.presentation.echo&&(U&&x?V.initialText=`[1m> Executing task in folder ${x.name}: ${ee} <[0m `:V.initialText=`[1m> Executing task: ${ee} <[0m `)}else{let q=O.command.runtime!==u.RuntimeType.CustomExecution?u.CommandString.value(N):void 0,Z=z?q:await this.resolveVariable(F,await this.resolveVariable(F,"${"+T.ProcessVarName+"}"));if(V={name:H,type:K,executable:Z,args:B.map(j=>A.isString(j)?j:j.value),waitOnExit:P},O.command.presentation&&O.command.presentation.echo){let j=X=>!X||X.length===0?"":A.isString(X)?X:X.join(" ");U&&x?V.initialText=`[1m> Executing task in folder ${x.name}: ${V.executable} ${j(V.args)} <[0m `:V.initialText=`[1m> Executing task: ${V.executable} ${j(V.args)} <[0m `}}if(M.cwd){let q=M.cwd;t.isAbsolute(q)||x&&x.uri.scheme===h.Schemas.file&&(q=t.join(x.uri.fsPath,q)),V.cwd=(0,i.isUNC)(q)?q:I.toLocalResource(n.URI.from({scheme:h.Schemas.file,path:q}),this.environmentService.remoteAuthority,this.pathService.defaultUriScheme)}return M.env&&(V.env?V.env={...V.env,...M.env}:V.env=M.env),V.isFeatureTerminal=!0,V.useShellEnvironment=!0,V}addAllArgument(O,x){const F=_.deepClone(x);return O.forEach(L=>{x.every((N,B)=>N.toLowerCase()===L&&x.length>B+1?!x.slice(B+1).every(P=>P.startsWith("-")):N.toLowerCase()!==L)&&F.push(L)}),F}async doCreateTerminal(O,x){if(O){for(const L of(0,w.values)(this.terminals))if(L.group===O){this.logService.trace(`Found terminal to split for group ${O}`);const M=L.terminal,N=await this.terminalService.createTerminal({location:{parentTerminal:M},config:x});if(N)return N}this.logService.trace(`No terminal found to split for group ${O}`)}const F=await this.terminalService.createTerminal({location:g.TerminalLocation.Panel,config:x});return this.logService.trace("Created a new task terminal"),F}async createTerminal(O,x,F){let L=x.taskSystemInfo?x.taskSystemInfo.platform:k.platform,M=await this.resolveOptions(x,O.command.options);const N=O.command.presentation;let B=!1;if(!N)throw new Error("Task presentation options should not be undefined here.");N.close===void 0||N.close===!1?(N.reveal!==u.RevealKind.Never||!O.configurationProperties.isBackground||N.close===!1)&&(N.panel===u.PanelKind.New?B=f.localize(5,null):N.showReuseMessage?B=f.localize(6,null):B=!0):B=!N.close;let P,V,z,U;if(O.command.runtime===u.RuntimeType.CustomExecution)this.currentTask.shellLaunchConfig=U={customPtyImplementation:(Y,$,J)=>new d.TerminalProcessExtHostProxy(Y,$,J,this.terminalService),waitOnExit:B,name:this.createTerminalName(O),initialText:O.command.presentation&&O.command.presentation.echo?`[1m> Executing task: ${O._label} <[0m `:void 0,isFeatureTerminal:!0};else{let Y=await this.resolveCommandAndArgs(x,O.command);if(V=Y.command,z=Y.args,P=u.CommandString.value(V),this.currentTask.shellLaunchConfig=U=await this.createShellLaunchConfig(O,F,x,L,M,V,z,B),U===void 0)return[void 0,void 0,new a.TaskError(C.default.Error,f.localize(7,null),7)]}let H=N.panel===u.PanelKind.Dedicated,K=N.panel===u.PanelKind.Shared,G=N.group,q=O.getMapKey(),Z;if(H){let Y=this.sameTaskTerminals[q];Y&&(Z=this.terminals[Y],delete this.sameTaskTerminals[q])}else if(K){let Y=this.idleTaskTerminals.remove(q);if(!Y)for(const $ of this.idleTaskTerminals.keys()){const J=this.idleTaskTerminals.get($);if(J&&this.terminals[J]&&this.terminals[J].group===G){Y=this.idleTaskTerminals.remove($);break}}Y&&(Z=this.terminals[Y])}if(Z){if(!U)throw new Error("Task shell launch configuration should not be undefined here.");return Z.terminal.scrollToBottom(),await Z.terminal.reuseTerminal(U),O.command.presentation&&O.command.presentation.clear&&Z.terminal.clearBuffer(),this.terminals[Z.terminal.instanceId.toString()].lastTask=q,[Z.terminal,P,void 0]}this.terminalCreationQueue=this.terminalCreationQueue.then(()=>this.doCreateTerminal(G,U));const j=await this.terminalCreationQueue,X=j.instanceId.toString();return j.onDisposed(Y=>{let $=this.terminals[X];if($){delete this.terminals[X],delete this.sameTaskTerminals[$.lastTask],this.idleTaskTerminals.delete($.lastTask);const J=O.getMapKey();this.removeFromActiveTasks(O),this.busyTasks[J]&&delete this.busyTasks[J]}}),this.terminals[X]={terminal:j,lastTask:q,group:G},[j,P,void 0]}buildShellCommandLine(O,x,F,L,M,N){let B=t.parse(x).name.toLowerCase(),P=this.getQuotingOptions(B,F,O);function V(X){if(X.length>=2&&(X[0]===P.strong?P.strong:X[0]===P.weak?P.weak:void 0)===X[X.length-1])return!1;let Y;for(let $=0;$<X.length;$++){let J=X[$];if(J===Y)Y=void 0;else{if(Y!==void 0)continue;if(J===P.escape)$++;else if(J===P.strong||J===P.weak)Y=J;else if(J===" ")return!0}}return!1}function z(X,Y){if(Y===u.ShellQuoting.Strong&&P.strong)return[P.strong+X+P.strong,!0];if(Y===u.ShellQuoting.Weak&&P.weak)return[P.weak+X+P.weak,!0];if(Y===u.ShellQuoting.Escape&&P.escape){if(A.isString(P.escape))return[X.replace(/ /g,P.escape+" "),!0];{let $=[];for(let te of P.escape.charsToEscape)$.push(`\\${te}`);let J=new RegExp("["+$.join(",")+"]","g"),ee=P.escape.escapeChar;return[X.replace(J,te=>ee+te),!0]}}return[X,!1]}function U(X){return A.isString(X)?V(X)?z(X,u.ShellQuoting.Strong):[X,!1]:z(X.value,X.quoting)}if((!N||N.length===0)&&A.isString(L)&&(L===M||V(M)))return L;let H=[],K=!1,G=!1,q,Z;[q,Z]=U(L),H.push(q),K=Z;for(let X of N)[q,Z]=U(X),H.push(q),G=G||Z;let j=H.join(" ");return O===3&&(B==="cmd"&&K&&G?j='"'+j+'"':(B==="powershell"||B==="pwsh")&&K&&(j="& "+j)),j}getQuotingOptions(O,x,F){return x&&x.quoting?x.quoting:T.shellQuotes[O]||T.osShellQuotes[k.PlatformToString(F)]}collectTaskVariables(O,x){if(x.command&&x.command.name&&this.collectCommandVariables(O,x.command,x),this.collectMatcherVariables(O,x.configurationProperties.problemMatchers),x.command.runtime===u.RuntimeType.CustomExecution&&(u.CustomTask.is(x)||u.ContributedTask.is(x))){let F;u.CustomTask.is(x)?F=x._source.config.element:(F=_.deepClone(x.defines),delete F._key,delete F.type),this.collectDefinitionVariables(O,F)}}collectDefinitionVariables(O,x){if(A.isString(x))this.collectVariables(O,x);else if(A.isArray(x))x.forEach(F=>this.collectDefinitionVariables(O,F));else if(A.isObject(x))for(const F in x)this.collectDefinitionVariables(O,x[F])}collectCommandVariables(O,x,F){if(x.runtime===u.RuntimeType.CustomExecution)return;if(x.name===void 0)throw new Error("Command name should never be undefined here.");if(this.collectVariables(O,x.name),x.args&&x.args.forEach(M=>this.collectVariables(O,M)),F._source.scope!==1&&O.add("${workspaceFolder}"),x.options){let M=x.options;M.cwd&&this.collectVariables(O,M.cwd);const N=M.env;N&&Object.keys(N).forEach(B=>{let P=N[B];A.isString(P)&&this.collectVariables(O,P)}),M.shell&&(M.shell.executable&&this.collectVariables(O,M.shell.executable),M.shell.args&&M.shell.args.forEach(B=>this.collectVariables(O,B)))}}collectMatcherVariables(O,x){x==null||x.length===0||x.forEach(F=>{let L;A.isString(F)?F[0]==="$"?L=s.ProblemMatcherRegistry.get(F.substring(1)):L=s.ProblemMatcherRegistry.get(F):L=F,L&&L.filePrefix&&this.collectVariables(O,L.filePrefix)})}collectVariables(O,x){let F=A.isString(x)?x:x.value,L=/\$\{(.*?)\}/g,M;do M=L.exec(F),M&&O.add(M[0]);while(M)}async resolveCommandAndArgs(O,x){let F=x.args?x.args.slice():[];return F=await this.resolveVariables(O,F),{command:await this.resolveVariable(O,x.name),args:F}}async resolveVariables(O,x){return Promise.all(x.map(F=>this.resolveVariable(O,F)))}async resolveMatchers(O,x){if(x==null||x.length===0)return[];let F=[];for(const L of x){let M;if(A.isString(L)?L[0]==="$"?M=s.ProblemMatcherRegistry.get(L.substring(1)):M=s.ProblemMatcherRegistry.get(L):M=L,!M){this.appendOutput(f.localize(8,null));continue}let N=O.taskSystemInfo,B=M.filePrefix!==void 0,P=N!==void 0&&N.uriProvider!==void 0;if(!B&&!P)F.push(M);else{let V=_.deepClone(M);P&&N!==void 0&&(V.uriProvider=N.uriProvider),B&&(V.filePrefix=await this.resolveVariable(O,V.filePrefix)),F.push(V)}}return F}async resolveVariable(O,x){if(A.isString(x))return O.resolve(x);if(x!==void 0)return{value:await O.resolve(x.value),quoting:x.quoting};throw new Error("Should never try to resolve undefined.")}async resolveOptions(O,x){if(x==null){let L;try{L=await this.resolveVariable(O,"${workspaceFolder}")}catch{}return{cwd:L}}let F=A.isString(x.cwd)?{cwd:await this.resolveVariable(O,x.cwd)}:{cwd:await this.resolveVariable(O,"${workspaceFolder}")};if(x.env){F.env=Object.create(null);for(const L of Object.keys(x.env)){let M=x.env[L];A.isString(M)?F.env[L]=await this.resolveVariable(O,M):F.env[L]=M.toString()}}return F}getSanitizedCommand(O){let x=O.toLowerCase(),F=x.lastIndexOf(t.sep);return F!==-1&&(x=x.substring(F+1)),T.WellKnowCommands[x]?x:"other"}appendOutput(O){const x=this.outputService.getChannel(this.outputChannelId);x&&x.append(O)}}e.TerminalTaskSystem=T,T.TelemetryEventName="taskService",T.ProcessVarName="__process__",T.shellQuotes={cmd:{strong:'"'},powershell:{escape:{escapeChar:"`",charsToEscape:` "'()`},strong:"'",weak:'"'},bash:{escape:{escapeChar:"\\",charsToEscape:` "'`},strong:"'",weak:'"'},zsh:{escape:{escapeChar:"\\",charsToEscape:` "'`},strong:"'",weak:'"'}},T.osShellQuotes={Linux:T.shellQuotes.bash,Mac:T.shellQuotes.bash,Windows:T.shellQuotes.powershell},T.WellKnowCommands={ant:!0,cmake:!0,eslint:!0,gradle:!0,grunt:!0,gulp:!0,jake:!0,jenkins:!0,jshint:!0,make:!0,maven:!0,msbuild:!0,msc:!0,nmake:!0,npm:!0,rake:!0,tsc:!0,xbuild:!0}}),define(ne[2329],re([1,0,1745,51,13,89,297,273,366,269]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createCustomTask=e.parse=e.TaskConfigSource=e.JsonSchemaVersion=e.ExecutionEngine=e.GroupKind=e.RunOptions=e.RunOnOptions=e.CommandString=e.TaskIdentifier=e.ShellQuoting=void 0;var v;(function(q){q[q.escape=1]="escape",q[q.strong=2]="strong",q[q.weak=3]="weak"})(v=e.ShellQuoting||(e.ShellQuoting={}));var C;(function(q){function Z(j){return j!==void 0&&_.isString(j.type)}q.is=Z})(C=e.TaskIdentifier||(e.TaskIdentifier={}));var o;(function(q){function Z(j){return _.isString(j)?j:_.isStringArray(j)?j.join(" "):_.isString(j.value)?j.value:j.value.join(" ")}q.value=Z})(o=e.CommandString||(e.CommandString={}));var c;(function(q){q[q.Unknown=0]="Unknown",q[q.String=1]="String",q[q.ProblemMatcher=2]="ProblemMatcher",q[q.Array=3]="Array"})(c||(c={}));const i=[];Object.freeze(i);function S(q,Z,j){const X=Z[j];X!==void 0&&(q[j]=X)}function s(q,Z,j){const X=Z[j];q[j]===void 0&&X!==void 0&&(q[j]=X)}function l(q,Z,j=!1){if(q==null||Z===void 0)return!0;for(let X of Z){let Y=q[X.property];if(Y!=null){if(X.type!==void 0&&!X.type.isEmpty(Y))return!1;if(!Array.isArray(Y)||Y.length>0||j)return!1}}return!0}function r(q,Z,j){if(!Z||l(Z,j))return q;if(!q||l(q,j))return Z;for(let X of j){let Y=X.property,$;X.type!==void 0?$=X.type.assignProperties(q[Y],Z[Y]):$=Z[Y],$!=null&&(q[Y]=$)}return q}function p(q,Z,j,X=!1){if(!Z||l(Z,j))return q;if(!q||l(q,j,X))return Z;for(let Y of j){let $=Y.property,J;Y.type?J=Y.type.fillProperties(q[$],Z[$]):q[$]===void 0&&(J=Z[$]),J!=null&&(q[$]=J)}return q}function u(q,Z,j,X){if(q&&Object.isFrozen(q))return q;if(q==null||Z===void 0||Z===null)return Z!=null?f.deepClone(Z):void 0;for(let Y of j){let $=Y.property;if(q[$]!==void 0)continue;let J;Y.type?J=Y.type.fillDefaults(q[$],X):J=Z[$],J!=null&&(q[$]=J)}return q}function a(q,Z){if(q!=null){if(Object.isFrozen(q))return q;for(let j of Z)if(j.type){let X=q[j.property];X&&j.type.freeze(X)}return Object.freeze(q),q}}var n;(function(q){function Z(j){if(!j)return D.RunOnOptions.default;switch(j.toLowerCase()){case"folderopen":return D.RunOnOptions.folderOpen;case"default":default:return D.RunOnOptions.default}}q.fromString=Z})(n=e.RunOnOptions||(e.RunOnOptions={}));var h;(function(q){const Z=[{property:"reevaluateOnRerun"},{property:"runOn"},{property:"instanceLimit"}];function j($){return{reevaluateOnRerun:$?$.reevaluateOnRerun:!0,runOn:$?n.fromString($.runOn):D.RunOnOptions.default,instanceLimit:$?$.instanceLimit:1}}q.fromConfiguration=j;function X($,J){return r($,J,Z)}q.assignProperties=X;function Y($,J){return p($,J,Z)}q.fillProperties=Y})(h=e.RunOptions||(e.RunOptions={}));var g;(function(q){const Z=[{property:"executable"},{property:"args"},{property:"quoting"}];function j(se){let ie=se;return ie&&(_.isString(ie.executable)||_.isStringArray(ie.args))}q.is=j;function X(se,ie){if(!j(se))return;let ce={};return se.executable!==void 0&&(ce.executable=se.executable),se.args!==void 0&&(ce.args=se.args.slice()),se.quoting!==void 0&&(ce.quoting=f.deepClone(se.quoting)),ce}q.from=X;function Y(se){return l(se,Z,!0)}q.isEmpty=Y;function $(se,ie){return r(se,ie,Z)}q.assignProperties=$;function J(se,ie){return p(se,ie,Z,!0)}q.fillProperties=J;function ee(se,ie){return se}q.fillDefaults=ee;function te(se){if(!!se)return Object.freeze(se)}q.freeze=te})(g||(g={}));var d;(function(q){const Z=[{property:"cwd"},{property:"env"},{property:"shell",type:g}],j={cwd:"${workspaceFolder}"};function X(se,ie){let ce={};return se.cwd!==void 0&&(_.isString(se.cwd)?ce.cwd=se.cwd:ie.taskLoadIssues.push(t.localize(0,null,se.cwd))),se.env!==void 0&&(ce.env=f.deepClone(se.env)),ce.shell=g.from(se.shell,ie),Y(ce)?void 0:ce}q.from=X;function Y(se){return l(se,Z)}q.isEmpty=Y;function $(se,ie){if(ie===void 0||Y(ie))return se;if(se===void 0||Y(se))return ie;if(S(se,ie,"cwd"),se.env===void 0)se.env=ie.env;else if(ie.env!==void 0){let ce=Object.create(null);se.env!==void 0&&Object.keys(se.env).forEach(le=>ce[le]=se.env[le]),ie.env!==void 0&&Object.keys(ie.env).forEach(le=>ce[le]=ie.env[le]),se.env=ce}return se.shell=g.assignProperties(se.shell,ie.shell),se}q.assignProperties=$;function J(se,ie){return p(se,ie,Z)}q.fillProperties=J;function ee(se,ie){return u(se,j,Z,ie)}q.fillDefaults=ee;function te(se){return a(se,Z)}q.freeze=te})(d||(d={}));var m;(function(q){let Z;(function(ae){const ue=[{property:"echo"},{property:"reveal"},{property:"revealProblems"},{property:"focus"},{property:"panel"},{property:"showReuseMessage"},{property:"clear"},{property:"group"},{property:"close"}];function oe(ve,he){let ge,de,Se,we,ye,ke,Ie,Te,De,_e=!1;_.isBoolean(ve.echoCommand)&&(ge=ve.echoCommand,_e=!0),_.isString(ve.showOutput)&&(de=D.RevealKind.fromString(ve.showOutput),_e=!0);let Re=ve.presentation||ve.terminal;if(Re&&(_.isBoolean(Re.echo)&&(ge=Re.echo),_.isString(Re.reveal)&&(de=D.RevealKind.fromString(Re.reveal)),_.isString(Re.revealProblems)&&(Se=D.RevealProblemKind.fromString(Re.revealProblems)),_.isBoolean(Re.focus)&&(we=Re.focus),_.isString(Re.panel)&&(ye=D.PanelKind.fromString(Re.panel)),_.isBoolean(Re.showReuseMessage)&&(ke=Re.showReuseMessage),_.isBoolean(Re.clear)&&(Ie=Re.clear),_.isString(Re.group)&&(Te=Re.group),_.isBoolean(Re.close)&&(De=Re.close),_e=!0),!!_e)return{echo:ge,reveal:de,revealProblems:Se,focus:we,panel:ye,showReuseMessage:ke,clear:Ie,group:Te,close:De}}ae.from=oe;function fe(ve,he){return r(ve,he,ue)}ae.assignProperties=fe;function pe(ve,he){return p(ve,he,ue)}ae.fillProperties=pe;function me(ve,he){let ge=he.engine===D.ExecutionEngine.Terminal;return u(ve,{echo:ge,reveal:D.RevealKind.Always,revealProblems:D.RevealProblemKind.Never,focus:!1,panel:D.PanelKind.Shared,showReuseMessage:!0,clear:!1},ue,he)}ae.fillDefaults=me;function be(ve){return a(ve,ue)}ae.freeze=be;function Ce(ve){return l(ve,ue)}ae.isEmpty=Ce})(Z=q.PresentationOptions||(q.PresentationOptions={}));let j;(function(ae){function ue(oe){if(oe!=null){if(_.isString(oe))return oe;if(_.isStringArray(oe))return oe.join(" ");{let fe=D.ShellQuoting.from(oe.quoting),pe=_.isString(oe.value)?oe.value:_.isStringArray(oe.value)?oe.value.join(" "):void 0;return pe?{value:pe,quoting:fe}:void 0}}}ae.from=ue})(j||(j={}));const X=[{property:"runtime"},{property:"name"},{property:"options",type:d},{property:"args"},{property:"taskSelector"},{property:"suppressTaskName"},{property:"presentation",type:Z}];function Y(ae,ue){let oe=$(ae,ue),fe;return ae.windows&&ue.platform===3?fe=$(ae.windows,ue):ae.osx&&ue.platform===1?fe=$(ae.osx,ue):ae.linux&&ue.platform===2&&(fe=$(ae.linux,ue)),fe&&(oe=te(oe,fe,ue.schemaVersion===2)),ee(oe)?void 0:oe}q.from=Y;function $(ae,ue){let oe=j.from(ae.command),fe;_.isString(ae.type)&&(ae.type==="shell"||ae.type==="process")&&(fe=D.RuntimeType.fromString(ae.type));let pe=g.is(ae.isShellCommand);_.isBoolean(ae.isShellCommand)||pe?fe=D.RuntimeType.Shell:ae.isShellCommand!==void 0&&(fe=ae.isShellCommand?D.RuntimeType.Shell:D.RuntimeType.Process);let me={name:oe,runtime:fe,presentation:Z.from(ae,ue)};if(ae.args!==void 0){me.args=[];for(let be of ae.args){let Ce=j.from(be);Ce!==void 0?me.args.push(Ce):ue.taskLoadIssues.push(t.localize(1,null,be?JSON.stringify(be,void 0,4):"undefined"))}}return ae.options!==void 0&&(me.options=d.from(ae.options,ue),me.options&&me.options.shell===void 0&&pe&&(me.options.shell=g.from(ae.isShellCommand,ue),ue.engine!==D.ExecutionEngine.Terminal&&ue.taskLoadIssues.push(t.localize(2,null)))),_.isString(ae.taskSelector)&&(me.taskSelector=ae.taskSelector),_.isBoolean(ae.suppressTaskName)&&(me.suppressTaskName=ae.suppressTaskName),ee(me)?void 0:me}function J(ae){return ae&&!!ae.name}q.hasCommand=J;function ee(ae){return l(ae,X)}q.isEmpty=ee;function te(ae,ue,oe){return ee(ue)?ae:ee(ae)?ue:(S(ae,ue,"name"),S(ae,ue,"runtime"),S(ae,ue,"taskSelector"),S(ae,ue,"suppressTaskName"),ue.args!==void 0&&(ae.args===void 0||oe?ae.args=ue.args:ae.args=ae.args.concat(ue.args)),ae.presentation=Z.assignProperties(ae.presentation,ue.presentation),ae.options=d.assignProperties(ae.options,ue.options),ae)}q.assignProperties=te;function se(ae,ue){return p(ae,ue,X)}q.fillProperties=se;function ie(ae,ue,oe){if(ue===void 0||ee(ue))return ae;if(ae=ae||{name:void 0,runtime:void 0,presentation:void 0},ae.name===void 0){s(ae,ue,"name"),s(ae,ue,"taskSelector"),s(ae,ue,"suppressTaskName");let fe=ue.args?ue.args.slice():[];!ae.suppressTaskName&&oe&&(ae.taskSelector!==void 0?fe.push(ae.taskSelector+oe):fe.push(oe)),ae.args&&(fe=fe.concat(ae.args)),ae.args=fe}return s(ae,ue,"runtime"),ae.presentation=Z.fillProperties(ae.presentation,ue.presentation),ae.options=d.fillProperties(ae.options,ue.options),ae}q.fillGlobals=ie;function ce(ae,ue){!ae||Object.isFrozen(ae)||(ae.name!==void 0&&ae.runtime===void 0&&(ae.runtime=D.RuntimeType.Process),ae.presentation=Z.fillDefaults(ae.presentation,ue),ee(ae)||(ae.options=d.fillDefaults(ae.options,ue)),ae.args===void 0&&(ae.args=i),ae.suppressTaskName===void 0&&(ae.suppressTaskName=ue.schemaVersion===2))}q.fillDefaults=ce;function le(ae){return a(ae,X)}q.freeze=le})(m||(m={}));var b;(function(q){function Z(J,ee){let te=Object.create(null);return _.isArray(J)&&J.forEach(se=>{let ie=new k.ProblemMatcherParser(ee.problemReporter).parse(se);(0,k.isNamedProblemMatcher)(ie)?te[ie.name]=ie:ee.problemReporter.error(t.localize(3,null,JSON.stringify(se,void 0,4)))}),te}q.namedFrom=Z;function j(J,ee){let te={};return J.windows&&J.windows.problemMatcher&&ee.platform===3?te=X(J.windows.problemMatcher,ee):J.osx&&J.osx.problemMatcher&&ee.platform===1?te=X(J.osx.problemMatcher,ee):J.linux&&J.linux.problemMatcher&&ee.platform===2?te=X(J.linux.problemMatcher,ee):J.problemMatcher&&(te=X(J.problemMatcher,ee)),te}q.fromWithOsConfig=j;function X(J,ee){let te=[];if(J===void 0)return{value:te};const se=[];function ie(le){le.value&&te.push(le.value),le.errors&&se.push(...le.errors)}let ce=Y(J);if(ce===c.Unknown){const le=t.localize(4,null,JSON.stringify(J,null,4));ee.problemReporter.warn(le)}else ce===c.String||ce===c.ProblemMatcher?ie($(J,ee)):ce===c.Array&&J.forEach(ae=>{ie($(ae,ee))});return{value:te,errors:se}}q.from=X;function Y(J){return _.isString(J)?c.String:_.isArray(J)?c.Array:_.isUndefined(J)?c.Unknown:c.ProblemMatcher}function $(J,ee){if(_.isString(J)){let te=J;if(te.length>1&&te[0]==="$"){te=te.substring(1);let se=k.ProblemMatcherRegistry.get(te);if(se)return{value:f.deepClone(se)};let ie=ee.namedProblemMatchers[te];if(ie)return ie=f.deepClone(ie),delete ie.name,{value:ie}}return{errors:[t.localize(5,null,J)]}}else{let te=J;return{value:new k.ProblemMatcherParser(ee.problemReporter).parse(te)}}}})(b||(b={}));const E={label:"Workspace",config:void 0};var y;(function(q){function Z(X){if(X!==void 0){if(_.isString(X)&&D.TaskGroup.is(X))return{_id:X,isDefault:!1};if(_.isString(X.kind)&&D.TaskGroup.is(X.kind)){let Y=X.kind,$=!!X.isDefault;return{_id:Y,isDefault:$}}}}q.from=Z;function j(X){return _.isString(X)?X:X.isDefault?{kind:X._id,isDefault:X.isDefault}:X._id}q.to=j})(y=e.GroupKind||(e.GroupKind={}));var T;(function(q){function Z(X,Y){switch(Y){case V.User:return w.USER_TASKS_GROUP_KEY;case V.TasksJson:return X.workspaceFolder.uri;default:return X.workspace&&X.workspace.configuration?X.workspace.configuration:X.workspaceFolder.uri}}function j(X,Y,$){return _.isString(X)?{uri:Z(Y,$),task:X}:C.is(X)?{uri:Z(Y,$),task:D.TaskDefinition.createTaskIdentifier(X,Y.problemReporter)}:void 0}q.from=j})(T||(T={}));var R;(function(q){function Z(j){switch(j){case"sequence":return"sequence";case"parallel":default:return"parallel"}}q.from=Z})(R||(R={}));var O;(function(q){const Z=[{property:"name"},{property:"identifier"},{property:"group"},{property:"isBackground"},{property:"promptOnClose"},{property:"dependsOn"},{property:"presentation",type:m.PresentationOptions},{property:"problemMatchers"},{property:"options"}];function j(Y,$,J,ee,te){if(!Y)return{};let se={};if(te)for(const ce of Object.keys(te))Y[ce]!==void 0&&(se[ce]=f.deepClone(Y[ce]));if(_.isString(Y.taskName)&&(se.name=Y.taskName),_.isString(Y.label)&&$.schemaVersion===2&&(se.name=Y.label),_.isString(Y.identifier)&&(se.identifier=Y.identifier),Y.isBackground!==void 0&&(se.isBackground=!!Y.isBackground),Y.promptOnClose!==void 0&&(se.promptOnClose=!!Y.promptOnClose),se.group=y.from(Y.group),Y.dependsOn!==void 0)if(_.isArray(Y.dependsOn))se.dependsOn=Y.dependsOn.reduce((ce,le)=>{const ae=T.from(le,$,ee);return ae&&ce.push(ae),ce},[]);else{const ce=T.from(Y.dependsOn,$,ee);se.dependsOn=ce?[ce]:void 0}se.dependsOrder=R.from(Y.dependsOrder),J&&(Y.presentation!==void 0||Y.terminal!==void 0)&&(se.presentation=m.PresentationOptions.from(Y,$)),J&&Y.options!==void 0&&(se.options=d.from(Y.options,$));const ie=b.fromWithOsConfig(Y,$);return ie.value!==void 0&&(se.problemMatchers=ie.value),Y.detail&&(se.detail=Y.detail),X(se)?{}:{value:se,errors:ie.errors}}q.from=j;function X(Y){return l(Y,Z)}q.isEmpty=X})(O||(O={}));var x;(function(q){const Z="grunt.",j="jake.",X="gulp.",Y="vscode.npm.",$="vscode.typescript.";function J(ee,te,se,ie){if(!ee)return;let ce=ee.type,le=ee.customize;if(!ce&&!le){te.problemReporter.error(t.localize(6,null,JSON.stringify(ee,null,4)));return}let ae=ce?I.TaskDefinitionRegistry.get(ce):void 0;if(!ae){let Ce=t.localize(7,null,ce);te.problemReporter.error(Ce);return}let ue;if(_.isString(le)?le.indexOf(Z)===0?ue={type:"grunt",task:le.substring(Z.length)}:le.indexOf(j)===0?ue={type:"jake",task:le.substring(j.length)}:le.indexOf(X)===0?ue={type:"gulp",task:le.substring(X.length)}:le.indexOf(Y)===0?ue={type:"npm",script:le.substring(Y.length+4)}:le.indexOf($)===0&&(ue={type:"typescript",tsconfig:le.substring($.length+6)}):_.isString(ee.type)&&(ue=ee),ue===void 0){te.problemReporter.error(t.localize(8,null,JSON.stringify(ee,void 0,0)));return}let oe=D.TaskDefinition.createTaskIdentifier(ue,te.problemReporter);if(oe===void 0){te.problemReporter.error(t.localize(9,null,JSON.stringify(ee,void 0,0)));return}let fe={workspaceFolder:te.workspaceFolder,file:".vscode/tasks.json",index:se,element:ee},pe;switch(ie){case V.User:{pe=Object.assign({},E,{kind:D.TaskSourceKind.User,config:fe});break}case V.WorkspaceFile:{pe=Object.assign({},E,{kind:D.TaskSourceKind.WorkspaceFile,config:fe});break}default:{pe=Object.assign({},E,{kind:D.TaskSourceKind.Workspace,config:fe});break}}let me=new D.ConfiguringTask(`${ae.extensionId}.${oe._key}`,pe,void 0,ce,oe,h.fromConfiguration(ee.runOptions),{}),be=O.from(ee,te,!0,ie,ae.properties);if(me.addTaskLoadMessages(be.errors),be.value){if(me.configurationProperties=Object.assign(me.configurationProperties,be.value),me.configurationProperties.name)me._label=me.configurationProperties.name;else{let Ce=me.configures.type;if(ae.required&&ae.required.length>0)for(let ve of ae.required){let he=me.configures[ve];if(he){Ce=Ce+" "+he;break}}me._label=Ce}me.configurationProperties.identifier||(me.configurationProperties.identifier=oe._key)}return me}q.from=J})(x||(x={}));var F;(function(q){function Z($,J,ee,te){if(!$)return;let se=$.type;if(se==null&&(se=D.CUSTOMIZED_TASK_TYPE),se!==D.CUSTOMIZED_TASK_TYPE&&se!=="shell"&&se!=="process"){J.problemReporter.error(t.localize(10,null,JSON.stringify($,null,4)));return}let ie=$.taskName;if(_.isString($.label)&&J.schemaVersion===2&&(ie=$.label),!ie){J.problemReporter.error(t.localize(11,null,JSON.stringify($,null,4)));return}let ce;switch(te){case V.User:{ce=Object.assign({},E,{kind:D.TaskSourceKind.User,config:{index:ee,element:$,file:".vscode/tasks.json",workspaceFolder:J.workspaceFolder}});break}case V.WorkspaceFile:{ce=Object.assign({},E,{kind:D.TaskSourceKind.WorkspaceFile,config:{index:ee,element:$,file:".vscode/tasks.json",workspaceFolder:J.workspaceFolder,workspace:J.workspace}});break}default:{ce=Object.assign({},E,{kind:D.TaskSourceKind.Workspace,config:{index:ee,element:$,file:".vscode/tasks.json",workspaceFolder:J.workspaceFolder}});break}}let le=new D.CustomTask(J.uuidMap.getUUID(ie),ce,ie,D.CUSTOMIZED_TASK_TYPE,void 0,!1,h.fromConfiguration($.runOptions),{name:ie,identifier:ie}),ae=O.from($,J,!1,te);if(le.addTaskLoadMessages(ae.errors),ae.value&&(le.configurationProperties=Object.assign(le.configurationProperties,ae.value)),!0){let fe=$;le.configurationProperties.isBackground===void 0&&fe.isWatching!==void 0&&(le.configurationProperties.isBackground=!!fe.isWatching),le.configurationProperties.group===void 0&&(fe.isBuildCommand===!0?le.configurationProperties.group=D.TaskGroup.Build:fe.isTestCommand===!0&&(le.configurationProperties.group=D.TaskGroup.Test))}let oe=m.from($,J);return oe&&(le.command=oe),$.command!==void 0&&(oe.suppressTaskName=!0),le}q.from=Z;function j($,J){(m.hasCommand($.command)||$.configurationProperties.dependsOn===void 0)&&($.command=m.fillGlobals($.command,J.command,$.configurationProperties.name)),$.configurationProperties.problemMatchers===void 0&&J.problemMatcher!==void 0&&($.configurationProperties.problemMatchers=f.deepClone(J.problemMatcher),$.hasDefinedMatchers=!0),$.configurationProperties.promptOnClose===void 0&&$.configurationProperties.isBackground===void 0&&J.promptOnClose!==void 0&&($.configurationProperties.promptOnClose=J.promptOnClose)}q.fillGlobals=j;function X($,J){m.fillDefaults($.command,J),$.configurationProperties.promptOnClose===void 0&&($.configurationProperties.promptOnClose=$.configurationProperties.isBackground!==void 0?!$.configurationProperties.isBackground:!0),$.configurationProperties.isBackground===void 0&&($.configurationProperties.isBackground=!1),$.configurationProperties.problemMatchers===void 0&&($.configurationProperties.problemMatchers=i)}q.fillDefaults=X;function Y($,J){let ee=new D.CustomTask(J._id,Object.assign({},J._source,{customizes:$.defines}),J.configurationProperties.name||$._label,D.CUSTOMIZED_TASK_TYPE,$.command,!1,$.runOptions,{name:J.configurationProperties.name||$.configurationProperties.name,identifier:J.configurationProperties.identifier||$.configurationProperties.identifier});ee.addTaskLoadMessages(J.taskLoadMessages);let te=ee.configurationProperties;S(te,J.configurationProperties,"group"),S(te,J.configurationProperties,"isBackground"),S(te,J.configurationProperties,"dependsOn"),S(te,J.configurationProperties,"problemMatchers"),S(te,J.configurationProperties,"promptOnClose"),S(te,J.configurationProperties,"detail"),ee.command.presentation=m.PresentationOptions.assignProperties(ee.command.presentation,J.configurationProperties.presentation),ee.command.options=d.assignProperties(ee.command.options,J.configurationProperties.options),ee.runOptions=h.assignProperties(ee.runOptions,J.runOptions);let se=$.configurationProperties;return s(te,se,"group"),s(te,se,"isBackground"),s(te,se,"dependsOn"),s(te,se,"problemMatchers"),s(te,se,"promptOnClose"),s(te,se,"detail"),ee.command.presentation=m.PresentationOptions.fillProperties(ee.command.presentation,se.presentation),ee.command.options=d.fillProperties(ee.command.options,se.options),ee.runOptions=h.fillProperties(ee.runOptions,$.runOptions),$.hasDefinedMatchers===!0&&(ee.hasDefinedMatchers=!0),ee}q.createCustomTask=Y})(F||(F={}));var L;(function(q){function Z($){let J=$.type;return $.customize===void 0&&(J==null||J===D.CUSTOMIZED_TASK_TYPE||J==="shell"||J==="process")}const j={shell:w.ShellExecutionSupportedContext,process:w.ProcessExecutionSupportedContext};function X($,J,ee,te){let se={custom:[],configured:[]};if(!$)return se;let ie={task:void 0,rank:-1},ce={task:void 0,rank:-1},le=ee.schemaVersion===2;const ae=f.deepClone(ee.taskLoadIssues);for(let fe=0;fe<$.length;fe++){let pe=$[fe];const me=pe.type?I.TaskDefinitionRegistry.get(pe.type):void 0;let be=!1;if(me&&me.when&&!ee.contextKeyService.contextMatchesRules(me.when))be=!0;else if(!me&&pe.type){for(const Ce of Object.keys(j))if(pe.type===Ce){be=!w.ShellExecutionSupportedContext.evaluate(ee.contextKeyService.getContext(null));break}}if(be){ee.problemReporter.info(t.localize(12,null,pe.type));continue}if(Z(pe)){let Ce=F.from(pe,ee,fe,te);if(Ce){if(F.fillGlobals(Ce,J),F.fillDefaults(Ce,ee),le){if((Ce.command===void 0||Ce.command.name===void 0)&&(Ce.configurationProperties.dependsOn===void 0||Ce.configurationProperties.dependsOn.length===0)){ee.problemReporter.error(t.localize(13,null,Ce.configurationProperties.name,JSON.stringify(pe,void 0,4)));continue}}else if(Ce.command===void 0||Ce.command.name===void 0){ee.problemReporter.warn(t.localize(14,null,Ce.configurationProperties.name,JSON.stringify(pe,void 0,4)));continue}Ce.configurationProperties.group===D.TaskGroup.Build&&ie.rank<2?(ie.task=Ce,ie.rank=2):Ce.configurationProperties.group===D.TaskGroup.Test&&ce.rank<2?(ce.task=Ce,ce.rank=2):Ce.configurationProperties.name==="build"&&ie.rank<1?(ie.task=Ce,ie.rank=1):Ce.configurationProperties.name==="test"&&ce.rank<1&&(ce.task=Ce,ce.rank=1),Ce.addTaskLoadMessages(ee.taskLoadIssues),se.custom.push(Ce)}}else{let Ce=x.from(pe,ee,fe,te);Ce&&(Ce.addTaskLoadMessages(ee.taskLoadIssues),se.configured.push(Ce))}ee.taskLoadIssues=f.deepClone(ae)}const ue=_.isString(ie.task?.configurationProperties.group)?ie.task?.configurationProperties.group:ie.task?.configurationProperties.group?._id,oe=_.isString(ce.task?.configurationProperties.group)?ce.task?.configurationProperties.group:ce.task?.configurationProperties.group?._id;return ue!==D.TaskGroup.Build._id&&ie.rank>-1&&ie.rank<2&&ie.task?ie.task.configurationProperties.group=D.TaskGroup.Build:oe!==D.TaskGroup.Test._id&&ce.rank>-1&&ce.rank<2&&ce.task&&(ce.task.configurationProperties.group=D.TaskGroup.Test),se}q.from=X;function Y($,J){if(J===void 0||J.length===0)return $;if($===void 0||$.length===0)return J;if(J){let ee=Object.create(null);$.forEach(se=>{ee[se.configurationProperties.name]=se}),J.forEach(se=>{ee[se.configurationProperties.name]=se});let te=[];$.forEach(se=>{te.push(ee[se.configurationProperties.name]),delete ee[se.configurationProperties.name]}),Object.keys(ee).forEach(se=>te.push(ee[se])),$=te}return $}q.assignTasks=Y})(L||(L={}));var M;(function(q){function Z(ee,te){let se=j(ee,te),ie;ee.windows&&te.platform===3?ie=j(ee.windows,te):ee.osx&&te.platform===1?ie=j(ee.osx,te):ee.linux&&te.platform===2&&(ie=j(ee.linux,te)),ie&&(se=q.assignProperties(se,ie));let ce=m.from(ee,te);return ce&&(se.command=ce),q.fillDefaults(se,te),q.freeze(se),se}q.from=Z;function j(ee,te){let se={};return ee.suppressTaskName!==void 0&&(se.suppressTaskName=!!ee.suppressTaskName),ee.promptOnClose!==void 0&&(se.promptOnClose=!!ee.promptOnClose),ee.problemMatcher&&(se.problemMatcher=b.from(ee.problemMatcher,te).value),se}q.fromBase=j;function X(ee){return!ee||ee.command===void 0&&ee.promptOnClose===void 0&&ee.suppressTaskName===void 0}q.isEmpty=X;function Y(ee,te){return X(te)?ee:X(ee)?te:(S(ee,te,"promptOnClose"),S(ee,te,"suppressTaskName"),ee)}q.assignProperties=Y;function $(ee,te){!ee||(m.fillDefaults(ee.command,te),ee.suppressTaskName===void 0&&(ee.suppressTaskName=te.schemaVersion===2),ee.promptOnClose===void 0&&(ee.promptOnClose=!0))}q.fillDefaults=$;function J(ee){Object.freeze(ee),ee.command&&m.freeze(ee.command)}q.freeze=J})(M||(M={}));var N;(function(q){function Z(j){let X=j.runner||j._runner,Y;if(X)switch(X){case"terminal":Y=D.ExecutionEngine.Terminal;break;case"process":Y=D.ExecutionEngine.Process;break}let $=B.from(j);if($===1)return Y||D.ExecutionEngine.Process;if($===2)return D.ExecutionEngine.Terminal;throw new Error("Shouldn't happen.")}q.from=Z})(N=e.ExecutionEngine||(e.ExecutionEngine={}));var B;(function(q){const Z=2;function j(X){let Y=X.version;if(!Y)return Z;switch(Y){case"0.1.0":return 1;case"2.0.0":return 2;default:return Z}}q.from=j})(B=e.JsonSchemaVersion||(e.JsonSchemaVersion={}));class P{constructor(Z){if(this.current=Object.create(null),Z)for(let j of Object.keys(Z.current)){let X=Z.current[j];Array.isArray(X)?this.current[j]=X.slice():this.current[j]=X}}start(){this.last=this.current,this.current=Object.create(null)}getUUID(Z){let j=this.last?this.last[Z]:void 0,X;j!==void 0&&(Array.isArray(j)?(X=j.shift(),j.length===0&&delete this.last[Z]):(X=j,delete this.last[Z])),X===void 0&&(X=A.generateUuid());let Y=this.current[Z];if(Y===void 0)this.current[Z]=X;else if(Array.isArray(Y))Y.push(X);else{let $=[Y];$.push(X),this.current[Z]=$}return X}finish(){this.last=void 0}}var V;(function(q){q[q.TasksJson=0]="TasksJson",q[q.WorkspaceFile=1]="WorkspaceFile",q[q.User=2]="User"})(V=e.TaskConfigSource||(e.TaskConfigSource={}));class z{constructor(Z,j,X,Y,$){this.workspaceFolder=Z,this.workspace=j,this.platform=X,this.problemReporter=Y,this.uuidMap=$}run(Z,j,X){let Y=N.from(Z),$=B.from(Z),J={workspaceFolder:this.workspaceFolder,workspace:this.workspace,problemReporter:this.problemReporter,uuidMap:this.uuidMap,namedProblemMatchers:{},engine:Y,schemaVersion:$,platform:this.platform,taskLoadIssues:[],contextKeyService:X},ee=this.createTaskRunnerConfiguration(Z,J,j);return{validationStatus:this.problemReporter.status,custom:ee.custom,configured:ee.configured,engine:Y}}createTaskRunnerConfiguration(Z,j,X){let Y=M.from(Z,j);if(this.problemReporter.status.isFatal())return{custom:[],configured:[]};j.namedProblemMatchers=b.namedFrom(Z.declares,j);let $,J;if(Z.windows&&j.platform===3?($=L.from(Z.windows.tasks,Y,j,X).custom,J=Z.windows.tasks):Z.osx&&j.platform===1?($=L.from(Z.osx.tasks,Y,j,X).custom,J=Z.osx.tasks):Z.linux&&j.platform===2&&($=L.from(Z.linux.tasks,Y,j,X).custom,J=Z.linux.tasks),j.schemaVersion===2&&$&&$.length>0&&J&&J.length>0){let te=[];for(let se of J)te.push(JSON.stringify(se,null,4));j.problemReporter.error(t.localize(15,null,te.join(` `)))}let ee={custom:[],configured:[]};if(Z.tasks&&(ee=L.from(Z.tasks,Y,j,X)),$&&(ee.custom=L.assignTasks(ee.custom,$)),(!ee.custom||ee.custom.length===0)&&Y.command&&Y.command.name){const te=b.from(Z.problemMatcher,j).value??[];let se=Z.isBackground?!!Z.isBackground:Z.isWatching?!!Z.isWatching:void 0,ie=D.CommandString.value(Y.command.name),ce=new D.CustomTask(j.uuidMap.getUUID(ie),Object.assign({},X,{config:{index:-1,element:Z,workspaceFolder:j.workspaceFolder}}),ie,D.CUSTOMIZED_TASK_TYPE,{name:void 0,runtime:void 0,presentation:void 0,suppressTaskName:!0},!1,{reevaluateOnRerun:!0},{name:ie,identifier:ie,group:D.TaskGroup.Build,isBackground:se,problemMatchers:te}),le=y.from(Z.group);le!==void 0?ce.configurationProperties.group=le:Z.group==="none"&&(ce.configurationProperties.group=void 0),F.fillGlobals(ce,Y),F.fillDefaults(ce,j),ee.custom=[ce]}return ee.custom=ee.custom||[],ee.configured=ee.configured||[],ee}}let U=new Map,H=new Map;function K(q,Z,j,X,Y,$,J,ee=!1){let te=ee?H:U,se=te.get($);se||(te.set($,new Map),se=te.get($));let ie=se.get(q.uri.toString());ie||(ie=new P,se.set(q.uri.toString(),ie));try{return ie.start(),new z(q,Z,j,Y,ie).run(X,$,J)}finally{ie.finish()}}e.parse=K;function G(q,Z){return F.createCustomTask(q,Z)}e.createCustomTask=G}),define(ne[865],re([1,0,133,120,15,5,9]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalContributionService=e.ITerminalContributionService=e.terminalsExtPoint=void 0,e.terminalsExtPoint=t.ExtensionsRegistry.registerExtensionPoint(f.terminalContributionsDescriptor),e.ITerminalContributionService=(0,A.createDecorator)("terminalContributionsService");class D{constructor(){this._terminalProfiles=[],e.terminalsExtPoint.setHandler(v=>{this._terminalProfiles=(0,_.flatten)(v.map(C=>C.value?.profiles?.filter(o=>I(o)).map(o=>({...o,extensionIdentifier:C.description.identifier.value}))||[]))})}get terminalProfiles(){return this._terminalProfiles}}e.TerminalContributionService=D;function I(w){return!w.icon||typeof w.icon=="string"||k.URI.isUri(w.icon)||"light"in w.icon&&"dark"in w.icon&&k.URI.isUri(w.icon.light)&&k.URI.isUri(w.icon.dark)}}),define(ne[2330],re([1,0,35,865]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerSingleton)(f.ITerminalContributionService,f.TerminalContributionService,!0)}),define(ne[2331],re([1,0,1826,133]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.walkthroughsExtensionPoint=void 0;const _=(0,t.localize)(0,null);e.walkthroughsExtensionPoint=f.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"walkthroughs",jsonSchema:{description:(0,t.localize)(1,null),type:"array",items:{type:"object",required:["id","title","description","steps"],defaultSnippets:[{body:{id:"$1",title:"$2",description:"$3",steps:[]}}],properties:{id:{type:"string",description:(0,t.localize)(2,null)},title:{type:"string",description:(0,t.localize)(3,null)},description:{type:"string",description:(0,t.localize)(4,null)},featuredFor:{type:"array",description:(0,t.localize)(5,null),items:{type:"string"}},when:{type:"string",description:(0,t.localize)(6,null)},steps:{type:"array",description:(0,t.localize)(7,null),items:{type:"object",required:["id","title","media"],defaultSnippets:[{body:{id:"$1",title:"$2",description:"$3",completionEvents:["$5"],media:{}}}],properties:{id:{type:"string",description:(0,t.localize)(8,null)},title:{type:"string",description:(0,t.localize)(9,null)},description:{type:"string",description:(0,t.localize)(10,null,`[${_}](command:myext.command)`,`[${_}](command:toSide:myext.command)`,`[${_}](https://aka.ms)`)},button:{deprecationMessage:(0,t.localize)(11,null,`[${_}](command:myext.command)`,`[${_}](command:toSide:myext.command)`,`[${_}](https://aka.ms)`)},media:{type:"object",description:(0,t.localize)(12,null),oneOf:[{required:["image","altText"],additionalProperties:!1,properties:{path:{deprecationMessage:(0,t.localize)(13,null)},image:{description:(0,t.localize)(14,null),oneOf:[{type:"string"},{type:"object",required:["dark","light","hc","hcLight"],properties:{dark:{description:(0,t.localize)(15,null),type:"string"},light:{description:(0,t.localize)(16,null),type:"string"},hc:{description:(0,t.localize)(17,null),type:"string"},hcLight:{description:(0,t.localize)(18,null),type:"string"}}}]},altText:{type:"string",description:(0,t.localize)(19,null)}}},{required:["svg","altText"],additionalProperties:!1,properties:{svg:{description:(0,t.localize)(20,null),type:"string"},altText:{type:"string",description:(0,t.localize)(21,null)}}},{required:["markdown"],additionalProperties:!1,properties:{path:{deprecationMessage:(0,t.localize)(22,null)},markdown:{description:(0,t.localize)(23,null),type:"string"}}}]},completionEvents:{description:(0,t.localize)(24,null),type:"array",items:{type:"string",defaultSnippets:[{label:"onCommand",description:(0,t.localize)(25,null),body:"onCommand:${1:commandId}"},{label:"onLink",description:(0,t.localize)(26,null),body:"onLink:${2:linkId}"},{label:"onView",description:(0,t.localize)(27,null),body:"onView:${2:viewId}"},{label:"onSettingChanged",description:(0,t.localize)(28,null),body:"onSettingChanged:${2:settingName}"},{label:"onContext",description:(0,t.localize)(29,null),body:"onContext:${2:key}"},{label:"onExtensionInstalled",description:(0,t.localize)(30,null),body:"onExtensionInstalled:${3:extensionId}"},{label:"onStepSelected",description:(0,t.localize)(31,null),body:"onStepSelected"}]}},doneOn:{description:(0,t.localize)(32,null),deprecationMessage:(0,t.localize)(33,null),type:"object",required:["command"],defaultSnippets:[{body:{command:"$1"}}],properties:{command:{description:(0,t.localize)(34,null),type:"string"}}},when:{type:"string",description:(0,t.localize)(35,null)}}}}}}}})}),define(ne[866],re([1,0,1850,29,19,143,133,7,16,2,12,92,15,40]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.commandsExtensionPoint=void 0;const i=[{key:"commandPalette",id:I.MenuId.CommandPalette,description:(0,t.localize)(0,null),supportsSubmenus:!1},{key:"touchBar",id:I.MenuId.TouchBarContext,description:(0,t.localize)(1,null),supportsSubmenus:!1},{key:"editor/title",id:I.MenuId.EditorTitle,description:(0,t.localize)(2,null)},{key:"editor/title/run",id:I.MenuId.EditorTitleRun,description:(0,t.localize)(3,null)},{key:"editor/context",id:I.MenuId.EditorContext,description:(0,t.localize)(4,null)},{key:"editor/context/copy",id:I.MenuId.EditorContextCopy,description:(0,t.localize)(5,null)},{key:"explorer/context",id:I.MenuId.ExplorerContext,description:(0,t.localize)(6,null)},{key:"editor/title/context",id:I.MenuId.EditorTitleContext,description:(0,t.localize)(7,null)},{key:"debug/callstack/context",id:I.MenuId.DebugCallStackContext,description:(0,t.localize)(8,null)},{key:"debug/variables/context",id:I.MenuId.DebugVariablesContext,description:(0,t.localize)(9,null)},{key:"debug/toolBar",id:I.MenuId.DebugToolBar,description:(0,t.localize)(10,null)},{key:"menuBar/home",id:I.MenuId.MenubarHomeMenu,description:(0,t.localize)(11,null),proposed:"contribMenuBarHome",supportsSubmenus:!1},{key:"menuBar/edit/copy",id:I.MenuId.MenubarCopy,description:(0,t.localize)(12,null)},{key:"scm/title",id:I.MenuId.SCMTitle,description:(0,t.localize)(13,null)},{key:"scm/sourceControl",id:I.MenuId.SCMSourceControl,description:(0,t.localize)(14,null)},{key:"scm/resourceState/context",id:I.MenuId.SCMResourceContext,description:(0,t.localize)(15,null)},{key:"scm/resourceFolder/context",id:I.MenuId.SCMResourceFolderContext,description:(0,t.localize)(16,null)},{key:"scm/resourceGroup/context",id:I.MenuId.SCMResourceGroupContext,description:(0,t.localize)(17,null)},{key:"scm/change/title",id:I.MenuId.SCMChangeContext,description:(0,t.localize)(18,null)},{key:"statusBar/remoteIndicator",id:I.MenuId.StatusBarRemoteIndicatorMenu,description:(0,t.localize)(19,null),supportsSubmenus:!1},{key:"view/title",id:I.MenuId.ViewTitle,description:(0,t.localize)(20,null)},{key:"view/item/context",id:I.MenuId.ViewItemContext,description:(0,t.localize)(21,null)},{key:"comments/commentThread/title",id:I.MenuId.CommentThreadTitle,description:(0,t.localize)(22,null)},{key:"comments/commentThread/context",id:I.MenuId.CommentThreadActions,description:(0,t.localize)(23,null),supportsSubmenus:!1},{key:"comments/comment/title",id:I.MenuId.CommentTitle,description:(0,t.localize)(24,null)},{key:"comments/comment/context",id:I.MenuId.CommentActions,description:(0,t.localize)(25,null),supportsSubmenus:!1},{key:"notebook/toolbar",id:I.MenuId.NotebookToolbar,description:(0,t.localize)(26,null)},{key:"notebook/cell/title",id:I.MenuId.NotebookCellTitle,description:(0,t.localize)(27,null)},{key:"notebook/cell/execute",id:I.MenuId.NotebookCellExecute,description:(0,t.localize)(28,null)},{key:"notebook/cell/executePrimary",id:I.MenuId.NotebookCellExecutePrimary,description:(0,t.localize)(29,null),proposed:"notebookEditor"},{key:"interactive/toolbar",id:I.MenuId.InteractiveToolbar,description:(0,t.localize)(30,null),proposed:"notebookEditor"},{key:"interactive/cell/title",id:I.MenuId.InteractiveCellTitle,description:(0,t.localize)(31,null),proposed:"notebookEditor"},{key:"testing/item/context",id:I.MenuId.TestItem,description:(0,t.localize)(32,null)},{key:"testing/item/gutter",id:I.MenuId.TestItemGutter,description:(0,t.localize)(33,null)},{key:"extension/context",id:I.MenuId.ExtensionContext,description:(0,t.localize)(34,null)},{key:"timeline/title",id:I.MenuId.TimelineTitle,description:(0,t.localize)(35,null)},{key:"timeline/item/context",id:I.MenuId.TimelineItemContext,description:(0,t.localize)(36,null)},{key:"ports/item/context",id:I.MenuId.TunnelContext,description:(0,t.localize)(37,null)},{key:"ports/item/origin/inline",id:I.MenuId.TunnelOriginInline,description:(0,t.localize)(38,null)},{key:"ports/item/port/inline",id:I.MenuId.TunnelPortInline,description:(0,t.localize)(39,null)},{key:"file/newFile",id:I.MenuId.NewFile,description:(0,t.localize)(40,null),supportsSubmenus:!1},{key:"editor/inlineCompletions/actions",id:I.MenuId.InlineCompletionsActions,description:(0,t.localize)(41,null),supportsSubmenus:!1,proposed:"inlineCompletions"}];var S;(function(h){function g(M){return typeof M.command=="string"}h.isMenuItem=g;function d(M,N){return typeof M.command!="string"?(N.error((0,t.localize)(42,null,"command")),!1):M.alt&&typeof M.alt!="string"?(N.error((0,t.localize)(43,null,"alt")),!1):M.when&&typeof M.when!="string"?(N.error((0,t.localize)(44,null,"when")),!1):M.group&&typeof M.group!="string"?(N.error((0,t.localize)(45,null,"group")),!1):!0}h.isValidMenuItem=d;function m(M,N){return typeof M.submenu!="string"?(N.error((0,t.localize)(46,null,"submenu")),!1):M.when&&typeof M.when!="string"?(N.error((0,t.localize)(47,null,"when")),!1):M.group&&typeof M.group!="string"?(N.error((0,t.localize)(48,null,"group")),!1):!0}h.isValidSubmenuItem=m;function b(M,N){if(!Array.isArray(M))return N.error((0,t.localize)(49,null)),!1;for(let B of M)if(g(B)){if(!d(B,N))return!1}else if(!m(B,N))return!1;return!0}h.isValidItems=b;function E(M,N){return typeof M!="object"?(N.error((0,t.localize)(50,null)),!1):typeof M.id!="string"?(N.error((0,t.localize)(51,null,"id")),!1):typeof M.label!="string"?(N.error((0,t.localize)(52,null,"label")),!1):!0}h.isValidSubmenu=E;const y={type:"object",required:["command"],properties:{command:{description:(0,t.localize)(53,null),type:"string"},alt:{description:(0,t.localize)(54,null),type:"string"},when:{description:(0,t.localize)(55,null),type:"string"},group:{description:(0,t.localize)(56,null),type:"string"}}},T={type:"object",required:["submenu"],properties:{submenu:{description:(0,t.localize)(57,null),type:"string"},when:{description:(0,t.localize)(58,null),type:"string"},group:{description:(0,t.localize)(59,null),type:"string"}}},R={type:"object",required:["id","label"],properties:{id:{description:(0,t.localize)(60,null),type:"string"},label:{description:(0,t.localize)(61,null),type:"string"},icon:{description:(0,t.localize)(62,null),anyOf:[{type:"string"},{type:"object",properties:{light:{description:(0,t.localize)(63,null),type:"string"},dark:{description:(0,t.localize)(64,null),type:"string"}}}]}}};h.menusContribution={description:(0,t.localize)(65,null),type:"object",properties:(0,o.index)(i,M=>M.key,M=>({markdownDescription:M.proposed?(0,t.localize)(66,null,M.proposed,M.description):M.description,type:"array",items:M.supportsSubmenus===!1?y:{oneOf:[y,T]}})),additionalProperties:{description:"Submenu",type:"array",items:{oneOf:[y,T]}}},h.submenusContribution={description:(0,t.localize)(67,null),type:"array",items:R};function O(M,N){return M?(0,f.isFalsyOrWhitespace)(M.command)?(N.error((0,t.localize)(69,null,"command")),!1):!F(M.title,N,"title")||M.shortTitle&&!F(M.shortTitle,N,"shortTitle")?!1:M.enablement&&typeof M.enablement!="string"?(N.error((0,t.localize)(70,null,"precondition")),!1):!(M.category&&!F(M.category,N,"category")||!x(M.icon,N)):(N.error((0,t.localize)(68,null)),!1)}h.isValidCommand=O;function x(M,N){return typeof M=="undefined"||typeof M=="string"||typeof M.dark=="string"&&typeof M.light=="string"?!0:(N.error((0,t.localize)(71,null)),!1)}function F(M,N,B){return typeof M=="undefined"?(N.error((0,t.localize)(72,null,B)),!1):typeof M=="string"&&(0,f.isFalsyOrWhitespace)(M)?(N.error((0,t.localize)(73,null,B)),!1):typeof M!="string"&&((0,f.isFalsyOrWhitespace)(M.original)||(0,f.isFalsyOrWhitespace)(M.value))?(N.error((0,t.localize)(74,null,`${B}.value`,`${B}.original`)),!1):!0}const L={type:"object",required:["command","title"],properties:{command:{description:(0,t.localize)(75,null),type:"string"},title:{description:(0,t.localize)(76,null),type:"string"},shortTitle:{markdownDescription:(0,t.localize)(77,null),type:"string"},category:{description:(0,t.localize)(78,null),type:"string"},enablement:{description:(0,t.localize)(79,null),type:"string"},icon:{description:(0,t.localize)(80,null),anyOf:[{type:"string"},{type:"object",properties:{light:{description:(0,t.localize)(81,null),type:"string"},dark:{description:(0,t.localize)(82,null),type:"string"}}}]}}};h.commandsContribution={description:(0,t.localize)(83,null),oneOf:[L,{type:"array",items:L}]}})(S||(S={}));const s=new w.DisposableStore;e.commandsExtensionPoint=k.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"commands",jsonSchema:S.commandsContribution}),e.commandsExtensionPoint.setHandler(h=>{function g(m,b,E){if(!S.isValidCommand(m,b.collector))return;const{icon:y,enablement:T,category:R,title:O,shortTitle:x,command:F}=m;let L;y&&(typeof y=="string"?L=v.ThemeIcon.fromString(y)??{dark:_.joinPath(b.description.extensionLocation,y),light:_.joinPath(b.description.extensionLocation,y)}:L={dark:_.joinPath(b.description.extensionLocation,y.dark),light:_.joinPath(b.description.extensionLocation,y.light)}),I.MenuRegistry.getCommand(F)&&b.collector.info((0,t.localize)(84,null,m.command)),E.push({id:F,title:O,source:b.description.displayName??b.description.name,shortTitle:x,tooltip:O,category:R,precondition:D.ContextKeyExpr.deserialize(T),icon:L})}s.clear();const d=[];for(const m of h){const{value:b}=m;if(Array.isArray(b))for(const E of b)g(E,m,d);else g(b,m,d)}s.add(I.MenuRegistry.addCommands(d))});const l=new Map,r=k.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"submenus",jsonSchema:S.submenusContribution});r.setHandler(h=>{l.clear();for(let g of h){const{value:d,collector:m}=g;(0,A.forEach)(d,b=>{if(!S.isValidSubmenu(b.value,m))return;if(!b.value.id){m.warn((0,t.localize)(85,null,b.value.id));return}if(l.has(b.value.id)){m.warn((0,t.localize)(86,null,b.value.id));return}if(!b.value.label){m.warn((0,t.localize)(87,null,b.value.label));return}let E;b.value.icon&&(typeof b.value.icon=="string"?E=v.ThemeIcon.fromString(b.value.icon)||{dark:_.joinPath(g.description.extensionLocation,b.value.icon)}:E={dark:_.joinPath(g.description.extensionLocation,b.value.icon.dark),light:_.joinPath(g.description.extensionLocation,b.value.icon.light)});const y={id:new I.MenuId(`api:${b.value.id}`),label:b.value.label,icon:E};l.set(b.value.id,y)})}});const p=new Map(C.Iterable.map(C.Iterable.from(i),h=>[h.key,h])),u=new w.DisposableStore,a=new Map;k.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"menus",jsonSchema:S.menusContribution,deps:[r]}).setHandler(h=>{u.clear(),a.clear();const g=[];for(let d of h){const{value:m,collector:b}=d;(0,A.forEach)(m,E=>{if(!S.isValidItems(E.value,b))return;let y=p.get(E.key);if(!y){const T=l.get(E.key);T&&(y={key:E.key,id:T.id,description:""})}if(!y){b.info((0,t.localize)(88,null,E.key));return}if(y.proposed&&!(0,c.isProposedApiEnabled)(d.description,y.proposed)){b.error((0,t.localize)(89,null,E.key,y.proposed,d.description.identifier.value));return}for(const T of E.value){let R;if(S.isMenuItem(T)){const O=I.MenuRegistry.getCommand(T.command),x=T.alt&&I.MenuRegistry.getCommand(T.alt)||void 0;if(!O){b.error((0,t.localize)(90,null,T.command));continue}T.alt&&!x&&b.warn((0,t.localize)(91,null,T.alt)),T.command===T.alt&&b.info((0,t.localize)(92,null)),R={command:O,alt:x,group:void 0,order:void 0,when:void 0}}else{if(y.supportsSubmenus===!1){b.error((0,t.localize)(93,null));continue}const O=l.get(T.submenu);if(!O){b.error((0,t.localize)(94,null,T.submenu));continue}let x=a.get(y.id.id);if(x||(x=new Set,a.set(y.id.id,x)),x.has(O.id.id)){b.warn((0,t.localize)(95,null,T.submenu,E.key));continue}x.add(O.id.id),R={submenu:O.id,icon:O.icon,title:O.label,group:void 0,order:void 0,when:void 0}}if(T.group){const O=T.group.lastIndexOf("@");O>0?(R.group=T.group.substr(0,O),R.order=Number(T.group.substr(O+1))||void 0):R.group=T.group}R.when=D.ContextKeyExpr.deserialize(T.when),g.push({id:y.id,item:R})}})}u.add(I.MenuRegistry.appendMenuItems(g))})}),define(ne[867],re([1,0,107,1877]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dedupExtensions=void 0;function _(A,k,D,I){let w=new Map;A.forEach(C=>{const o=t.ExtensionIdentifier.toKey(C.identifier),c=w.get(o);c&&I.warn((0,f.localize)(0,null,c.extensionLocation.fsPath,C.extensionLocation.fsPath)),w.set(o,C)}),k.forEach(C=>{const o=t.ExtensionIdentifier.toKey(C.identifier),c=w.get(o);c&&(c.isBuiltin?C.isBuiltin=!0:I.warn((0,f.localize)(1,null,c.extensionLocation.fsPath,C.extensionLocation.fsPath))),w.set(o,C)}),D.forEach(C=>{I.info((0,f.localize)(2,null,C.extensionLocation.fsPath));const o=t.ExtensionIdentifier.toKey(C.identifier),c=w.get(o);c&&c.isBuiltin&&(C.isBuiltin=!0),w.set(o,C)});let v=[];return w.forEach(C=>v.push(C)),v}e.dedupExtensions=_}),define(ne[2332],re([1,0,22]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LazyPromise=void 0;class f{constructor(){this._actual=null,this._actualOk=null,this._actualErr=null,this._hasValue=!1,this._value=null,this._hasErr=!1,this._err=null}get[Symbol.toStringTag](){return this.toString()}_ensureActual(){return this._actual||(this._actual=new Promise((A,k)=>{this._actualOk=A,this._actualErr=k,this._hasValue&&this._actualOk(this._value),this._hasErr&&this._actualErr(this._err)})),this._actual}resolveOk(A){this._hasValue||this._hasErr||(this._hasValue=!0,this._value=A,this._actual&&this._actualOk(A))}resolveErr(A){this._hasValue||this._hasErr||(this._hasErr=!0,this._err=A,this._actual?this._actualErr(A):(0,t.onUnexpectedError)(A))}then(A,k){return this._ensureActual().then(A,k)}catch(A){return this._ensureActual().then(void 0,A)}finally(A){return this._ensureActual().finally(A)}}e.LazyPromise=f}),define(ne[331],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SerializableObjectWithBuffers=e.getStringIdentifierForProxy=e.createProxyIdentifier=e.ProxyIdentifier=void 0;class t{constructor(I){this._proxyIdentifierBrand=void 0,this.sid=I,this.nid=++t.count}}e.ProxyIdentifier=t,t.count=0;const f=[];function _(D){const I=new t(D);return f[I.nid]=I,I}e.createProxyIdentifier=_;function A(D){return f[D].sid}e.getStringIdentifierForProxy=A;class k{constructor(I){this.value=I}}e.SerializableObjectWithBuffers=k}),define(ne[65],re([1,0,180,9,331]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostContext=e.MainContext=e.ExtHostTestingResource=e.reviveWorkspaceEditDto=e.WorkspaceEditType=e.ISuggestResultDtoField=e.ISuggestDataDtoField=e.IdObject=e.CandidatePortSource=e.NotebookEditorRevealType=e.CellOutputKind=e.WebviewMessageArrayBufferViewType=e.WebviewEditorCapabilities=e.TabInputKind=e.TextEditorRevealType=void 0;var A;(function(r){r[r.Default=0]="Default",r[r.InCenter=1]="InCenter",r[r.InCenterIfOutsideViewport=2]="InCenterIfOutsideViewport",r[r.AtTop=3]="AtTop"})(A=e.TextEditorRevealType||(e.TextEditorRevealType={}));var k;(function(r){r[r.UnknownInput=0]="UnknownInput",r[r.TextInput=1]="TextInput",r[r.TextDiffInput=2]="TextDiffInput",r[r.NotebookInput=3]="NotebookInput",r[r.NotebookDiffInput=4]="NotebookDiffInput",r[r.CustomEditorInput=5]="CustomEditorInput",r[r.WebviewEditorInput=6]="WebviewEditorInput",r[r.TerminalEditorInput=7]="TerminalEditorInput"})(k=e.TabInputKind||(e.TabInputKind={}));var D;(function(r){r[r.Editable=0]="Editable",r[r.SupportsHotExit=1]="SupportsHotExit"})(D=e.WebviewEditorCapabilities||(e.WebviewEditorCapabilities={}));var I;(function(r){r[r.Int8Array=1]="Int8Array",r[r.Uint8Array=2]="Uint8Array",r[r.Uint8ClampedArray=3]="Uint8ClampedArray",r[r.Int16Array=4]="Int16Array",r[r.Uint16Array=5]="Uint16Array",r[r.Int32Array=6]="Int32Array",r[r.Uint32Array=7]="Uint32Array",r[r.Float32Array=8]="Float32Array",r[r.Float64Array=9]="Float64Array",r[r.BigInt64Array=10]="BigInt64Array",r[r.BigUint64Array=11]="BigUint64Array"})(I=e.WebviewMessageArrayBufferViewType||(e.WebviewMessageArrayBufferViewType={}));var w;(function(r){r[r.Text=1]="Text",r[r.Error=2]="Error",r[r.Rich=3]="Rich"})(w=e.CellOutputKind||(e.CellOutputKind={}));var v;(function(r){r[r.Default=0]="Default",r[r.InCenter=1]="InCenter",r[r.InCenterIfOutsideViewport=2]="InCenterIfOutsideViewport",r[r.AtTop=3]="AtTop"})(v=e.NotebookEditorRevealType||(e.NotebookEditorRevealType={}));var C;(function(r){r[r.None=0]="None",r[r.Process=1]="Process",r[r.Output=2]="Output"})(C=e.CandidatePortSource||(e.CandidatePortSource={}));class o{static mixin(p){return p._id=o._n++,p}}e.IdObject=o,o._n=0;var c;(function(r){r.label="a",r.kind="b",r.detail="c",r.documentation="d",r.sortText="e",r.filterText="f",r.preselect="g",r.insertText="h",r.insertTextRules="i",r.range="j",r.commitCharacters="k",r.additionalTextEdits="l",r.command="m",r.kindModifier="n"})(c=e.ISuggestDataDtoField||(e.ISuggestDataDtoField={}));var i;(function(r){r.defaultRanges="a",r.completions="b",r.isIncomplete="c",r.duration="d"})(i=e.ISuggestResultDtoField||(e.ISuggestResultDtoField={}));var S;(function(r){r[r.File=1]="File",r[r.Text=2]="Text",r[r.Cell=3]="Cell"})(S=e.WorkspaceEditType||(e.WorkspaceEditType={}));function s(r){if(r&&r.edits)for(const p of r.edits)typeof p.resource=="object"?p.resource=f.URI.revive(p.resource):(p.newUri=f.URI.revive(p.newUri),p.oldUri=f.URI.revive(p.oldUri)),p.metadata&&p.metadata.iconPath&&(p.metadata=(0,t.revive)(p.metadata));return r}e.reviveWorkspaceEditDto=s;var l;(function(r){r[r.Workspace=0]="Workspace",r[r.TextDocument=1]="TextDocument"})(l=e.ExtHostTestingResource||(e.ExtHostTestingResource={})),e.MainContext={MainThreadAuthentication:(0,_.createProxyIdentifier)("MainThreadAuthentication"),MainThreadBulkEdits:(0,_.createProxyIdentifier)("MainThreadBulkEdits"),MainThreadClipboard:(0,_.createProxyIdentifier)("MainThreadClipboard"),MainThreadCommands:(0,_.createProxyIdentifier)("MainThreadCommands"),MainThreadComments:(0,_.createProxyIdentifier)("MainThreadComments"),MainThreadConfiguration:(0,_.createProxyIdentifier)("MainThreadConfiguration"),MainThreadConsole:(0,_.createProxyIdentifier)("MainThreadConsole"),MainThreadDebugService:(0,_.createProxyIdentifier)("MainThreadDebugService"),MainThreadDecorations:(0,_.createProxyIdentifier)("MainThreadDecorations"),MainThreadDiagnostics:(0,_.createProxyIdentifier)("MainThreadDiagnostics"),MainThreadDialogs:(0,_.createProxyIdentifier)("MainThreadDiaglogs"),MainThreadDocuments:(0,_.createProxyIdentifier)("MainThreadDocuments"),MainThreadDocumentContentProviders:(0,_.createProxyIdentifier)("MainThreadDocumentContentProviders"),MainThreadTextEditors:(0,_.createProxyIdentifier)("MainThreadTextEditors"),MainThreadEditorInsets:(0,_.createProxyIdentifier)("MainThreadEditorInsets"),MainThreadEditorTabs:(0,_.createProxyIdentifier)("MainThreadEditorTabs"),MainThreadErrors:(0,_.createProxyIdentifier)("MainThreadErrors"),MainThreadTreeViews:(0,_.createProxyIdentifier)("MainThreadTreeViews"),MainThreadDownloadService:(0,_.createProxyIdentifier)("MainThreadDownloadService"),MainThreadKeytar:(0,_.createProxyIdentifier)("MainThreadKeytar"),MainThreadLanguageFeatures:(0,_.createProxyIdentifier)("MainThreadLanguageFeatures"),MainThreadLanguages:(0,_.createProxyIdentifier)("MainThreadLanguages"),MainThreadLogger:(0,_.createProxyIdentifier)("MainThreadLogger"),MainThreadMessageService:(0,_.createProxyIdentifier)("MainThreadMessageService"),MainThreadOutputService:(0,_.createProxyIdentifier)("MainThreadOutputService"),MainThreadProgress:(0,_.createProxyIdentifier)("MainThreadProgress"),MainThreadQuickOpen:(0,_.createProxyIdentifier)("MainThreadQuickOpen"),MainThreadStatusBar:(0,_.createProxyIdentifier)("MainThreadStatusBar"),MainThreadSecretState:(0,_.createProxyIdentifier)("MainThreadSecretState"),MainThreadStorage:(0,_.createProxyIdentifier)("MainThreadStorage"),MainThreadTelemetry:(0,_.createProxyIdentifier)("MainThreadTelemetry"),MainThreadTerminalService:(0,_.createProxyIdentifier)("MainThreadTerminalService"),MainThreadWebviews:(0,_.createProxyIdentifier)("MainThreadWebviews"),MainThreadWebviewPanels:(0,_.createProxyIdentifier)("MainThreadWebviewPanels"),MainThreadWebviewViews:(0,_.createProxyIdentifier)("MainThreadWebviewViews"),MainThreadCustomEditors:(0,_.createProxyIdentifier)("MainThreadCustomEditors"),MainThreadUrls:(0,_.createProxyIdentifier)("MainThreadUrls"),MainThreadUriOpeners:(0,_.createProxyIdentifier)("MainThreadUriOpeners"),MainThreadWorkspace:(0,_.createProxyIdentifier)("MainThreadWorkspace"),MainThreadFileSystem:(0,_.createProxyIdentifier)("MainThreadFileSystem"),MainThreadExtensionService:(0,_.createProxyIdentifier)("MainThreadExtensionService"),MainThreadSCM:(0,_.createProxyIdentifier)("MainThreadSCM"),MainThreadSearch:(0,_.createProxyIdentifier)("MainThreadSearch"),MainThreadTask:(0,_.createProxyIdentifier)("MainThreadTask"),MainThreadWindow:(0,_.createProxyIdentifier)("MainThreadWindow"),MainThreadLabelService:(0,_.createProxyIdentifier)("MainThreadLabelService"),MainThreadNotebook:(0,_.createProxyIdentifier)("MainThreadNotebook"),MainThreadNotebookDocuments:(0,_.createProxyIdentifier)("MainThreadNotebookDocumentsShape"),MainThreadNotebookEditors:(0,_.createProxyIdentifier)("MainThreadNotebookEditorsShape"),MainThreadNotebookKernels:(0,_.createProxyIdentifier)("MainThreadNotebookKernels"),MainThreadNotebookRenderers:(0,_.createProxyIdentifier)("MainThreadNotebookRenderers"),MainThreadInteractive:(0,_.createProxyIdentifier)("MainThreadInteractive"),MainThreadTheming:(0,_.createProxyIdentifier)("MainThreadTheming"),MainThreadTunnelService:(0,_.createProxyIdentifier)("MainThreadTunnelService"),MainThreadTimeline:(0,_.createProxyIdentifier)("MainThreadTimeline"),MainThreadTesting:(0,_.createProxyIdentifier)("MainThreadTesting")},e.ExtHostContext={ExtHostCommands:(0,_.createProxyIdentifier)("ExtHostCommands"),ExtHostConfiguration:(0,_.createProxyIdentifier)("ExtHostConfiguration"),ExtHostDiagnostics:(0,_.createProxyIdentifier)("ExtHostDiagnostics"),ExtHostDebugService:(0,_.createProxyIdentifier)("ExtHostDebugService"),ExtHostDecorations:(0,_.createProxyIdentifier)("ExtHostDecorations"),ExtHostDocumentsAndEditors:(0,_.createProxyIdentifier)("ExtHostDocumentsAndEditors"),ExtHostDocuments:(0,_.createProxyIdentifier)("ExtHostDocuments"),ExtHostDocumentContentProviders:(0,_.createProxyIdentifier)("ExtHostDocumentContentProviders"),ExtHostDocumentSaveParticipant:(0,_.createProxyIdentifier)("ExtHostDocumentSaveParticipant"),ExtHostEditors:(0,_.createProxyIdentifier)("ExtHostEditors"),ExtHostTreeViews:(0,_.createProxyIdentifier)("ExtHostTreeViews"),ExtHostFileSystem:(0,_.createProxyIdentifier)("ExtHostFileSystem"),ExtHostFileSystemInfo:(0,_.createProxyIdentifier)("ExtHostFileSystemInfo"),ExtHostFileSystemEventService:(0,_.createProxyIdentifier)("ExtHostFileSystemEventService"),ExtHostLanguages:(0,_.createProxyIdentifier)("ExtHostLanguages"),ExtHostLanguageFeatures:(0,_.createProxyIdentifier)("ExtHostLanguageFeatures"),ExtHostQuickOpen:(0,_.createProxyIdentifier)("ExtHostQuickOpen"),ExtHostExtensionService:(0,_.createProxyIdentifier)("ExtHostExtensionService"),ExtHostLogLevelServiceShape:(0,_.createProxyIdentifier)("ExtHostLogLevelServiceShape"),ExtHostTerminalService:(0,_.createProxyIdentifier)("ExtHostTerminalService"),ExtHostSCM:(0,_.createProxyIdentifier)("ExtHostSCM"),ExtHostSearch:(0,_.createProxyIdentifier)("ExtHostSearch"),ExtHostTask:(0,_.createProxyIdentifier)("ExtHostTask"),ExtHostWorkspace:(0,_.createProxyIdentifier)("ExtHostWorkspace"),ExtHostWindow:(0,_.createProxyIdentifier)("ExtHostWindow"),ExtHostWebviews:(0,_.createProxyIdentifier)("ExtHostWebviews"),ExtHostWebviewPanels:(0,_.createProxyIdentifier)("ExtHostWebviewPanels"),ExtHostCustomEditors:(0,_.createProxyIdentifier)("ExtHostCustomEditors"),ExtHostWebviewViews:(0,_.createProxyIdentifier)("ExtHostWebviewViews"),ExtHostEditorInsets:(0,_.createProxyIdentifier)("ExtHostEditorInsets"),ExtHostEditorTabs:(0,_.createProxyIdentifier)("ExtHostEditorTabs"),ExtHostProgress:(0,_.createProxyIdentifier)("ExtHostProgress"),ExtHostComments:(0,_.createProxyIdentifier)("ExtHostComments"),ExtHostSecretState:(0,_.createProxyIdentifier)("ExtHostSecretState"),ExtHostStorage:(0,_.createProxyIdentifier)("ExtHostStorage"),ExtHostUrls:(0,_.createProxyIdentifier)("ExtHostUrls"),ExtHostUriOpeners:(0,_.createProxyIdentifier)("ExtHostUriOpeners"),ExtHostOutputService:(0,_.createProxyIdentifier)("ExtHostOutputService"),ExtHosLabelService:(0,_.createProxyIdentifier)("ExtHostLabelService"),ExtHostNotebook:(0,_.createProxyIdentifier)("ExtHostNotebook"),ExtHostNotebookDocuments:(0,_.createProxyIdentifier)("ExtHostNotebookDocuments"),ExtHostNotebookEditors:(0,_.createProxyIdentifier)("ExtHostNotebookEditors"),ExtHostNotebookKernels:(0,_.createProxyIdentifier)("ExtHostNotebookKernels"),ExtHostNotebookRenderers:(0,_.createProxyIdentifier)("ExtHostNotebookRenderers"),ExtHostInteractive:(0,_.createProxyIdentifier)("ExtHostInteractive"),ExtHostTheming:(0,_.createProxyIdentifier)("ExtHostTheming"),ExtHostTunnelService:(0,_.createProxyIdentifier)("ExtHostTunnelService"),ExtHostAuthentication:(0,_.createProxyIdentifier)("ExtHostAuthentication"),ExtHostTimeline:(0,_.createProxyIdentifier)("ExtHostTimeline"),ExtHostTesting:(0,_.createProxyIdentifier)("ExtHostTesting"),ExtHostTelemetry:(0,_.createProxyIdentifier)("ExtHostTelemetry")}}),define(ne[2333],re([1,0,75,65,95]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadClipboard=void 0;let A=class{constructor(D,I){this._clipboardService=I}dispose(){}$readText(){return this._clipboardService.readText()}$writeText(D){return this._clipboardService.writeText(D)}};A=Ee([(0,t.extHostNamedCustomer)(f.MainContext.MainThreadClipboard),W(1,_.IClipboardService)],A),e.MainThreadClipboard=A}),define(ne[2334],re([1,0,28,2,65,75,180,40,331]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadCommands=void 0;let w=class{constructor(o,c,i){this._commandService=c,this._extensionService=i,this._commandRegistrations=new Map,this._proxy=o.getProxy(_.ExtHostContext.ExtHostCommands),this._generateCommandsDocumentationRegistration=t.CommandsRegistry.registerCommand("_generateCommandsDocumentation",()=>this._generateCommandsDocumentation())}dispose(){(0,f.dispose)(this._commandRegistrations.values()),this._commandRegistrations.clear(),this._generateCommandsDocumentationRegistration.dispose()}async _generateCommandsDocumentation(){const o=await this._proxy.$getContributedCommandHandlerDescriptions(),c=t.CommandsRegistry.getCommands();for(const[S,s]of c)s.description&&(o[S]=s.description);const i=[];for(let S in o)i.push("`"+S+"` - "+v(o[S]));console.log(i.join(` `))}$registerCommand(o){this._commandRegistrations.set(o,t.CommandsRegistry.registerCommand(o,(c,...i)=>this._proxy.$executeContributedCommand(o,...i).then(S=>(0,k.revive)(S))))}$unregisterCommand(o){const c=this._commandRegistrations.get(o);c&&(c.dispose(),this._commandRegistrations.delete(o))}async $executeCommand(o,c,i){c instanceof I.SerializableObjectWithBuffers&&(c=c.value);for(let S=0;S<c.length;S++)c[S]=(0,k.revive)(c[S]);if(i&&c.length>0&&!t.CommandsRegistry.getCommand(o))throw await this._extensionService.activateByEvent(`onCommand:${o}`),new Error("$executeCommand:retry");return this._commandService.executeCommand(o,...c)}$getCommands(){return Promise.resolve([...t.CommandsRegistry.getCommands().keys()])}};w=Ee([(0,A.extHostNamedCustomer)(_.MainContext.MainThreadCommands),W(1,t.ICommandService),W(2,D.IExtensionService)],w),e.MainThreadCommands=w;function v(C){if(typeof C=="string")return C;{const o=[C.description];if(o.push(` `),C.args)for(let c of C.args)o.push(`* _${c.name}_ - ${c.description||""} `);return C.returns&&o.push(`* _(returns)_ - ${C.returns}`),o.push(` `),o.join("")}}}),define(ne[2335],re([1,0,9,17,57,34,65,75,8,85]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadConfiguration=void 0;let v=class{constructor(o,c,i,S){this._workspaceContextService=c,this.configurationService=i,this._environmentService=S;const s=o.getProxy(k.ExtHostContext.ExtHostConfiguration);s.$initializeConfiguration(this._getConfigurationData()),this._configurationListener=i.onDidChangeConfiguration(l=>{s.$acceptConfigurationChanged(this._getConfigurationData(),l.change)})}_getConfigurationData(){const o={...this.configurationService.getConfigurationData(),configurationScopes:[]};return(!this._environmentService.isBuilt||this._environmentService.isExtensionDevelopment)&&(o.configurationScopes=(0,_.getScopes)()),o}dispose(){this._configurationListener.dispose()}$updateConfigurationOption(o,c,i,S,s){return S={resource:S?.resource?t.URI.revive(S.resource):void 0,overrideIdentifier:S?.overrideIdentifier},this.writeConfiguration(o,c,i,S,s)}$removeConfigurationOption(o,c,i,S){return i={resource:i?.resource?t.URI.revive(i.resource):void 0,overrideIdentifier:i?.overrideIdentifier},this.writeConfiguration(o,c,void 0,i,S)}writeConfiguration(o,c,i,S,s){o=o??this.deriveConfigurationTarget(c,S);const l=this.configurationService.inspect(c,S);switch(o){case 7:return this._updateValue(c,i,o,l?.memory?.override,S,s);case 5:return this._updateValue(c,i,o,l?.workspaceFolder?.override,S,s);case 4:return this._updateValue(c,i,o,l?.workspace?.override,S,s);case 3:return this._updateValue(c,i,o,l?.userRemote?.override,S,s);default:return this._updateValue(c,i,o,l?.userLocal?.override,S,s)}}_updateValue(o,c,i,S,s,l){return s=l===!0?s:l===!1?{resource:s.resource}:s.overrideIdentifier&&S!==void 0?s:{resource:s.resource},this.configurationService.updateValue(o,c,s,i,!0)}deriveConfigurationTarget(o,c){if(c.resource&&this._workspaceContextService.getWorkbenchState()===3){const i=f.Registry.as(_.Extensions.Configuration).getConfigurationProperties();if(i[o]&&(i[o].scope===4||i[o].scope===5))return 5}return 4}};v=Ee([(0,D.extHostNamedCustomer)(k.MainContext.MainThreadConfiguration),W(1,A.IWorkspaceContextService),W(2,I.IConfigurationService),W(3,w.IEnvironmentService)],v),e.MainThreadConfiguration=v}),define(ne[2336],re([1,0,2,9,90,65,75,81,2135,231,22]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadDebugService=void 0;let C=class{constructor(i,S){this.debugService=S,this._toDispose=new t.DisposableStore,this._debugAdaptersHandleCounter=1,this._proxy=i.getProxy(A.ExtHostContext.ExtHostDebugService),this._toDispose.add(S.onDidNewSession(s=>{this._proxy.$acceptDebugSessionStarted(this.getSessionDto(s)),this._toDispose.add(s.onDidChangeName(l=>{this._proxy.$acceptDebugSessionNameChanged(this.getSessionDto(s),l)}))})),this._toDispose.add(S.onWillNewSession(s=>{this._toDispose.add(s.onDidCustomEvent(l=>this._proxy.$acceptDebugSessionCustomEvent(this.getSessionDto(s),l)))})),this._toDispose.add(S.onDidEndSession(s=>{this._proxy.$acceptDebugSessionTerminated(this.getSessionDto(s)),this._sessions.delete(s.getId())})),this._toDispose.add(S.getViewModel().onDidFocusSession(s=>{this._proxy.$acceptDebugSessionActiveChanged(this.getSessionDto(s))})),this._debugAdapters=new Map,this._debugConfigurationProviders=new Map,this._debugAdapterDescriptorFactories=new Map,this._sessions=new Set}dispose(){this._toDispose.dispose()}createDebugAdapter(i){const S=this._debugAdaptersHandleCounter++,s=new o(this,S,this._proxy,i);return this._debugAdapters.set(S,s),s}substituteVariables(i,S){return Promise.resolve(this._proxy.$substituteVariables(i?i.uri:void 0,S))}runInTerminal(i,S){return this._proxy.$runInTerminal(i,S)}$registerDebugTypes(i){this._toDispose.add(this.debugService.getAdapterManager().registerDebugAdapterFactory(i,this))}$startBreakpointEvents(){if(!this._breakpointEventsActive){this._breakpointEventsActive=!0,this._toDispose.add(this.debugService.getModel().onDidChangeBreakpoints(l=>{if(l&&!l.sessionOnly){const r={};l.added&&(r.added=this.convertToDto(l.added)),l.removed&&(r.removed=l.removed.map(p=>p.getId())),l.changed&&(r.changed=this.convertToDto(l.changed)),(r.added||r.removed||r.changed)&&this._proxy.$acceptBreakpointsDelta(r)}}));const i=this.debugService.getModel().getBreakpoints(),S=this.debugService.getModel().getFunctionBreakpoints(),s=this.debugService.getModel().getDataBreakpoints();(i.length>0||S.length>0)&&this._proxy.$acceptBreakpointsDelta({added:this.convertToDto(i).concat(this.convertToDto(S)).concat(this.convertToDto(s))})}}$registerBreakpoints(i){for(let S of i)if(S.type==="sourceMulti"){const s=S.lines.map(l=>({id:l.id,enabled:l.enabled,lineNumber:l.line+1,column:l.character>0?l.character+1:void 0,condition:l.condition,hitCondition:l.hitCondition,logMessage:l.logMessage}));this.debugService.addBreakpoints(f.URI.revive(S.uri),s)}else S.type==="function"?this.debugService.addFunctionBreakpoint(S.functionName,S.id):S.type==="data"&&this.debugService.addDataBreakpoint(S.label,S.dataId,S.canPersist,S.accessTypes,S.accessType);return Promise.resolve()}$unregisterBreakpoints(i,S,s){return i.forEach(l=>this.debugService.removeBreakpoints(l)),S.forEach(l=>this.debugService.removeFunctionBreakpoints(l)),s.forEach(l=>this.debugService.removeDataBreakpoints(l)),Promise.resolve()}$registerDebugConfigurationProvider(i,S,s,l,r,p){const u={type:i,triggerKind:S};return s&&(u.provideDebugConfigurations=(a,n)=>this._proxy.$provideDebugConfigurations(p,a,n)),l&&(u.resolveDebugConfiguration=(a,n,h)=>this._proxy.$resolveDebugConfiguration(p,a,n,h)),r&&(u.resolveDebugConfigurationWithSubstitutedVariables=(a,n,h)=>this._proxy.$resolveDebugConfigurationWithSubstitutedVariables(p,a,n,h)),this._debugConfigurationProviders.set(p,u),this._toDispose.add(this.debugService.getConfigurationManager().registerDebugConfigurationProvider(u)),Promise.resolve(void 0)}$unregisterDebugConfigurationProvider(i){const S=this._debugConfigurationProviders.get(i);S&&(this._debugConfigurationProviders.delete(i),this.debugService.getConfigurationManager().unregisterDebugConfigurationProvider(S))}$registerDebugAdapterDescriptorFactory(i,S){const s={type:i,createDebugAdapterDescriptor:l=>Promise.resolve(this._proxy.$provideDebugAdapter(S,this.getSessionDto(l)))};return this._debugAdapterDescriptorFactories.set(S,s),this._toDispose.add(this.debugService.getAdapterManager().registerDebugAdapterDescriptorFactory(s)),Promise.resolve(void 0)}$unregisterDebugAdapterDescriptorFactory(i){const S=this._debugAdapterDescriptorFactories.get(i);S&&(this._debugAdapterDescriptorFactories.delete(i),this.debugService.getAdapterManager().unregisterDebugAdapterDescriptorFactory(S))}getSession(i){if(i)return this.debugService.getModel().getSession(i,!0)}async $startDebugging(i,S,s){const l=i?f.URI.revive(i):void 0,r=this.debugService.getConfigurationManager().getLaunch(l),p=this.getSession(s.parentSessionID),u={noDebug:s.noDebug,parentSession:p,lifecycleManagedByParent:s.lifecycleManagedByParent,repl:s.repl,compact:s.compact,debugUI:s.debugUI,compoundRoot:p?.compoundRoot};try{const a=typeof s.suppressSaveBeforeStart=="boolean"?!s.suppressSaveBeforeStart:void 0;return this.debugService.startDebugging(r,S,u,a)}catch(a){throw new v.ErrorNoTelemetry(a&&a.message?a.message:"cannot start debugging")}}$setDebugSessionName(i,S){const s=this.debugService.getModel().getSession(i);s&&s.setName(S)}$customDebugAdapterRequest(i,S,s){const l=this.debugService.getModel().getSession(i,!0);return l?l.customRequest(S,s).then(r=>r&&r.success?r.body:Promise.reject(new v.ErrorNoTelemetry(r?r.message:"custom request failed"))):Promise.reject(new v.ErrorNoTelemetry("debug session not found"))}$getDebugProtocolBreakpoint(i,S){const s=this.debugService.getModel().getSession(i,!0);return s?Promise.resolve(s.getDebugProtocolBreakpoint(S)):Promise.reject(new v.ErrorNoTelemetry("debug session not found"))}$stopDebugging(i){if(i){const S=this.debugService.getModel().getSession(i,!0);if(S)return this.debugService.stopSession(S,(0,w.isSessionAttach)(S))}else return this.debugService.stopSession(void 0);return Promise.reject(new v.ErrorNoTelemetry("debug session not found"))}$appendDebugConsole(i){const S=this.debugService.getViewModel().focusedSession;S&&S.appendToRepl(i,D.default.Warning)}$acceptDAMessage(i,S){this.getDebugAdapter(i).acceptMessage((0,w.convertToVSCPaths)(S,!1))}$acceptDAError(i,S,s,l){this.getDebugAdapter(i).fireError(i,new Error(`${S}: ${s} ${l}`))}$acceptDAExit(i,S,s){this.getDebugAdapter(i).fireExit(i,S,s)}getDebugAdapter(i){const S=this._debugAdapters.get(i);if(!S)throw new Error("Invalid debug adapter");return S}$sessionCached(i){this._sessions.add(i)}getSessionDto(i){if(i){const S=i.getId();return this._sessions.has(S)?S:{id:S,type:i.configuration.type,name:i.name,folderUri:i.root?i.root.uri:void 0,configuration:i.configuration,parent:i.parentSession?.getId()}}}convertToDto(i){return i.map(S=>{if("name"in S){const s=S;return{type:"function",id:s.getId(),enabled:s.enabled,condition:s.condition,hitCondition:s.hitCondition,logMessage:s.logMessage,functionName:s.name}}else if("dataId"in S){const s=S;return{type:"data",id:s.getId(),dataId:s.dataId,enabled:s.enabled,condition:s.condition,hitCondition:s.hitCondition,logMessage:s.logMessage,label:s.description,canPersist:s.canPersist}}else{const s=S;return{type:"source",id:s.getId(),enabled:s.enabled,condition:s.condition,hitCondition:s.hitCondition,logMessage:s.logMessage,uri:s.uri,line:s.lineNumber>0?s.lineNumber-1:0,character:typeof s.column=="number"&&s.column>0?s.column-1:0}}})}};C=Ee([(0,k.extHostNamedCustomer)(A.MainContext.MainThreadDebugService),W(1,_.IDebugService)],C),e.MainThreadDebugService=C;class o extends I.AbstractDebugAdapter{constructor(i,S,s,l){super();this._ds=i,this._handle=S,this._proxy=s,this._session=l}fireError(i,S){this._onError.fire(S)}fireExit(i,S,s){this._onExit.fire(S)}startSession(){return Promise.resolve(this._proxy.$startDASession(this._handle,this._ds.getSessionDto(this._session)))}sendMessage(i){this._proxy.$sendDAMessage(this._handle,(0,w.convertToDAPaths)(i,!0))}async stopSession(){return await this.cancelPendingRequests(),Promise.resolve(this._proxy.$stopDASession(this._handle))}}}),define(ne[2337],re([1,0,9,6,2,65,75,252,30]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadDecorations=void 0;class w{constructor(o,c){this._proxy=o,this._handle=c,this._idPool=0,this._requests=new Map,this._resolver=new Map}enqueue(o,c){const i=++this._idPool,S=new Promise(l=>{this._requests.set(i,{id:i,uri:o}),this._resolver.set(i,l),this._processQueue()}),s=c.onCancellationRequested(()=>{this._requests.delete(i),this._resolver.delete(i)});return S.finally(()=>s.dispose())}_processQueue(){typeof this._timer!="number"&&(this._timer=setTimeout(()=>{const o=this._requests,c=this._resolver;this._proxy.$provideDecorations(this._handle,[...o.values()],I.CancellationToken.None).then(i=>{for(let[S,s]of c)s(i[S])}),this._requests=new Map,this._resolver=new Map,this._timer=void 0},0))}}let v=class{constructor(o,c){this._decorationsService=c,this._provider=new Map,this._proxy=o.getProxy(A.ExtHostContext.ExtHostDecorations)}dispose(){this._provider.forEach(o=>(0,_.dispose)(o)),this._provider.clear()}$registerDecorationProvider(o,c){const i=new f.Emitter,S=new w(this._proxy,o),s=this._decorationsService.registerDecorationsProvider({label:c,onDidChange:i.event,provideDecorations:async(l,r)=>{const p=await S.enqueue(l,r);if(!p)return;const[u,a,n,h]=p;return{weight:10,bubble:u??!1,color:h?.id,tooltip:a,letter:n}}});this._provider.set(o,[i,s])}$onDidChange(o,c){const i=this._provider.get(o);if(i){const[S]=i;S.fire(c&&c.map(s=>t.URI.revive(s)))}}$unregisterDecorationProvider(o){const c=this._provider.get(o);c&&((0,_.dispose)(c),this._provider.delete(o))}};v=Ee([(0,k.extHostNamedCustomer)(A.MainContext.MainThreadDecorations),W(1,D.IDecorationsService)],v),e.MainThreadDecorations=v}),define(ne[2338],re([1,0,125,9,65,75,56]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadDiagnostics=void 0;let D=class{constructor(w,v,C){this._markerService=v,this._uriIdentService=C,this._activeOwners=new Set,this._proxy=w.getProxy(_.ExtHostContext.ExtHostDiagnostics),this._markerListener=this._markerService.onMarkerChanged(this._forwardMarkers,this)}dispose(){this._markerListener.dispose(),this._activeOwners.forEach(w=>this._markerService.changeAll(w,[])),this._activeOwners.clear()}_forwardMarkers(w){const v=[];for(const C of w){const o=this._markerService.read({resource:C});if(o.length===0)v.push([C,[]]);else{const c=o.filter(i=>!this._activeOwners.has(i.owner));c.length>0&&v.push([C,c])}}v.length>0&&this._proxy.$acceptMarkersChange(v)}$changeMany(w,v){for(let C of v){let[o,c]=C;if(c)for(const i of c){if(i.relatedInformation)for(const S of i.relatedInformation)S.resource=f.URI.revive(S.resource);i.code&&typeof i.code!="string"&&(i.code.target=f.URI.revive(i.code.target))}this._markerService.changeOne(w,this._uriIdentService.asCanonicalUri(f.URI.revive(o)),c)}this._activeOwners.add(w)}$clear(w){this._markerService.changeAll(w,[]),this._activeOwners.delete(w)}};D=Ee([(0,A.extHostNamedCustomer)(_.MainContext.MainThreadDiagnostics),W(1,t.IMarkerService),W(2,k.IUriIdentityService)],D),e.MainThreadDiagnostics=D}),define(ne[2339],re([1,0,9,65,75,143,54]),function(Q,e,t,f,_,A,k){"use strict";var D;Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadDialogs=void 0;let I=D=class{constructor(v,C){this._fileDialogService=C}dispose(){}async $showOpenDialog(v){const C=D._convertOpenOptions(v);return C.defaultUri||(C.defaultUri=await this._fileDialogService.defaultFilePath()),Promise.resolve(this._fileDialogService.showOpenDialog(C))}async $showSaveDialog(v){const C=D._convertSaveOptions(v);return C.defaultUri||(C.defaultUri=await this._fileDialogService.defaultFilePath()),Promise.resolve(this._fileDialogService.showSaveDialog(C))}static _convertOpenOptions(v){const C={openLabel:v?.openLabel||void 0,canSelectFiles:v?.canSelectFiles||!v?.canSelectFiles&&!v?.canSelectFolders,canSelectFolders:v?.canSelectFolders,canSelectMany:v?.canSelectMany,defaultUri:v?.defaultUri?t.URI.revive(v.defaultUri):void 0,title:v?.title||void 0,availableFileSystems:[]};return v?.filters&&(C.filters=[],(0,A.forEach)(v.filters,o=>C.filters.push({name:o.key,extensions:o.value}))),C}static _convertSaveOptions(v){const C={defaultUri:v?.defaultUri?t.URI.revive(v.defaultUri):void 0,saveLabel:v?.saveLabel||void 0,title:v?.title||void 0};return v?.filters&&(C.filters=[],(0,A.forEach)(v.filters,o=>C.filters.push({name:o.key,extensions:o.value}))),C}};I=D=Ee([(0,_.extHostNamedCustomer)(f.MainContext.MainThreadDialogs),W(1,k.IFileDialogService)],I),e.MainThreadDialogs=I}),define(ne[2340],re([1,0,22,2,9,136,20,184,52,42,61,75,65,30]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadDocumentContentProviders=void 0;let i=class{constructor(s,l,r,p,u){this._textModelResolverService=l,this._languageService=r,this._modelService=p,this._editorWorkerService=u,this._resourceContentProvider=new Map,this._pendingUpdate=new Map,this._proxy=s.getProxy(o.ExtHostContext.ExtHostDocumentContentProviders)}dispose(){(0,f.dispose)(this._resourceContentProvider.values()),(0,f.dispose)(this._pendingUpdate.values())}$registerTextContentProvider(s,l){const r=this._textModelResolverService.registerTextModelContentProvider(l,{provideTextContent:p=>this._proxy.$provideTextDocumentContent(s,p).then(u=>{if(typeof u=="string"){const a=u.substr(0,1+u.search(/\r?\n/)),n=this._languageService.createByFilepathOrFirstLine(p,a);return this._modelService.createModel(u,n,p)}return null})});this._resourceContentProvider.set(s,r)}$unregisterTextContentProvider(s){const l=this._resourceContentProvider.get(s);l&&(l.dispose(),this._resourceContentProvider.delete(s))}$onVirtualDocumentChange(s,l){const r=this._modelService.getModel(_.URI.revive(s));if(!r)return;const p=this._pendingUpdate.get(r.id);p&&p.cancel();const u=new c.CancellationTokenSource;this._pendingUpdate.set(r.id,u),this._editorWorkerService.computeMoreMinimalEdits(r.uri,[{text:l,range:r.getFullModelRange()}]).then(a=>{this._pendingUpdate.delete(r.id),!u.token.isCancellationRequested&&a&&a.length>0&&r.applyEdits(a.map(n=>A.EditOperation.replace(k.Range.lift(n.range),n.text)))}).catch(t.onUnexpectedError)}};i=Ee([(0,C.extHostNamedCustomer)(o.MainContext.MainThreadDocumentContentProviders),W(1,v.ITextModelService),W(2,w.ILanguageService),W(3,I.IModelService),W(4,D.IEditorWorkerService)],i),e.MainThreadDocumentContentProviders=i}),define(ne[2341],re([1,0,2,65,75,398,9]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadDownloadService=void 0;let D=class extends t.Disposable{constructor(w,v){super();this.downloadService=v}$download(w,v){return this.downloadService.download(k.URI.revive(w),k.URI.revive(v))}};D=Ee([(0,_.extHostNamedCustomer)(f.MainContext.MainThreadDownloadService),W(1,A.IDownloadService)],D),e.MainThreadDownloadService=D}),define(ne[868],re([1,0,6,2,123,20,84,173,65,13,15,287,261]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadTextEditor=e.MainThreadTextEditorProperties=void 0;class c{constructor(s,l,r){this.selections=s,this.options=l,this.visibleRanges=r}static readFromEditor(s,l,r){const p=c._readSelectionsFromCodeEditor(s,r),u=c._readOptionsFromCodeEditor(s,l,r),a=c._readVisibleRangesFromCodeEditor(s,r);return new c(p,u,a)}static _readSelectionsFromCodeEditor(s,l){let r=null;return l&&(r=l.getSelections()),!r&&s&&(r=s.selections),r||(r=[new k.Selection(1,1,1,1)]),r}static _readOptionsFromCodeEditor(s,l,r){if(l.isDisposed()){if(s)return s.options;throw new Error("No valid properties")}let p,u;if(r){const n=r.getOptions(),h=n.get(60);p=n.get(24),u=h.renderType}else s?(p=s.options.cursorStyle,u=s.options.lineNumbers):(p=_.TextEditorCursorStyle.Line,u=1);const a=l.getOptions();return{insertSpaces:a.insertSpaces,tabSize:a.tabSize,cursorStyle:p,lineNumbers:u}}static _readVisibleRangesFromCodeEditor(s,l){return l?l.getVisibleRanges():[]}generateDelta(s,l){const r={options:null,selections:null,visibleRanges:null};return(!s||!c._selectionsEqual(s.selections,this.selections))&&(r.selections={selections:this.selections,source:(0,w.withNullAsUndefined)(l)}),(!s||!c._optionsEqual(s.options,this.options))&&(r.options=this.options),(!s||!c._rangesEqual(s.visibleRanges,this.visibleRanges))&&(r.visibleRanges=this.visibleRanges),r.selections||r.options||r.visibleRanges?r:null}static _selectionsEqual(s,l){return(0,v.equals)(s,l,(r,p)=>r.equalsSelection(p))}static _rangesEqual(s,l){return(0,v.equals)(s,l,(r,p)=>r.equalsRange(p))}static _optionsEqual(s,l){return s&&!l||!s&&l?!1:!s&&!l?!0:s.tabSize===l.tabSize&&s.insertSpaces===l.insertSpaces&&s.cursorStyle===l.cursorStyle&&s.lineNumbers===l.lineNumbers}}e.MainThreadTextEditorProperties=c;class i{constructor(s,l,r,p,u,a,n){this._modelListeners=new f.DisposableStore,this._codeEditorListeners=new f.DisposableStore,this._id=s,this._model=l,this._codeEditor=null,this._properties=null,this._focusTracker=p,this._mainThreadDocuments=u,this._modelService=a,this._clipboardService=n,this._onPropertiesChanged=new t.Emitter,this._modelListeners.add(this._model.onDidChangeOptions(h=>{this._updatePropertiesNow(null)})),this.setCodeEditor(r),this._updatePropertiesNow(null)}dispose(){this._modelListeners.dispose(),this._codeEditor=null,this._codeEditorListeners.dispose()}_updatePropertiesNow(s){this._setProperties(c.readFromEditor(this._properties,this._model,this._codeEditor),s)}_setProperties(s,l){const r=s.generateDelta(this._properties,l);this._properties=s,r&&this._onPropertiesChanged.fire(r)}getId(){return this._id}getModel(){return this._model}getCodeEditor(){return this._codeEditor}hasCodeEditor(s){return this._codeEditor===s}setCodeEditor(s){if(!this.hasCodeEditor(s)&&(this._codeEditorListeners.clear(),this._codeEditor=s,this._codeEditor)){this._codeEditorListeners.add(this._codeEditor.onDidChangeModel(()=>{this.setCodeEditor(null)})),this._codeEditorListeners.add(this._codeEditor.onDidFocusEditorWidget(()=>{this._focusTracker.onGainedFocus()})),this._codeEditorListeners.add(this._codeEditor.onDidBlurEditorWidget(()=>{this._focusTracker.onLostFocus()}));let l=null;this._codeEditorListeners.add(this._mainThreadDocuments.onIsCaughtUpWithContentChanges(u=>{if(u.toString()===this._model.uri.toString()){const a=l;l=null,this._updatePropertiesNow(a)}}));const r=()=>this._codeEditor&&this._codeEditor.getModel()===this._model,p=u=>{this._mainThreadDocuments.isCaughtUpWithContentChanges(this._model.uri)?(l=null,this._updatePropertiesNow(u)):l=u};this._codeEditorListeners.add(this._codeEditor.onDidChangeCursorSelection(u=>{!r()||p(u.source)})),this._codeEditorListeners.add(this._codeEditor.onDidChangeConfiguration(u=>{!r()||p(null)})),this._codeEditorListeners.add(this._codeEditor.onDidLayoutChange(()=>{!r()||p(null)})),this._codeEditorListeners.add(this._codeEditor.onDidScrollChange(()=>{!r()||p(null)})),this._updatePropertiesNow(null)}}isVisible(){return!!this._codeEditor}getProperties(){return this._properties}get onPropertiesChanged(){return this._onPropertiesChanged.event}setSelections(s){if(this._codeEditor){this._codeEditor.setSelections(s);return}const l=s.map(k.Selection.liftSelection);this._setProperties(new c(l,this._properties.options,this._properties.visibleRanges),null)}_setIndentConfiguration(s){const l=this._modelService.getCreationOptions(this._model.getLanguageId(),this._model.uri,this._model.isForSimpleWidget);if(s.tabSize==="auto"||s.insertSpaces==="auto"){let p=l.insertSpaces,u=l.tabSize;s.insertSpaces!=="auto"&&typeof s.insertSpaces!="undefined"&&(p=s.insertSpaces),s.tabSize!=="auto"&&typeof s.tabSize!="undefined"&&(u=s.tabSize),this._model.detectIndentation(p,u);return}const r={};typeof s.insertSpaces!="undefined"&&(r.insertSpaces=s.insertSpaces),typeof s.tabSize!="undefined"&&(r.tabSize=s.tabSize),this._model.updateOptions(r)}setConfiguration(s){if(this._setIndentConfiguration(s),!!this._codeEditor){if(s.cursorStyle){const l=(0,_.cursorStyleToString)(s.cursorStyle);this._codeEditor.updateOptions({cursorStyle:l})}if(typeof s.lineNumbers!="undefined"){let l;switch(s.lineNumbers){case 1:l="on";break;case 2:l="relative";break;default:l="off"}this._codeEditor.updateOptions({lineNumbers:l})}}}setDecorations(s,l){!this._codeEditor||this._codeEditor.setDecorations("exthost-api",s,l)}setDecorationsFast(s,l){if(!this._codeEditor)return;const r=[];for(let p=0,u=Math.floor(l.length/4);p<u;p++)r[p]=new A.Range(l[4*p],l[4*p+1],l[4*p+2],l[4*p+3]);this._codeEditor.setDecorationsFast(s,r)}revealRange(s,l){if(!!this._codeEditor)switch(l){case I.TextEditorRevealType.Default:this._codeEditor.revealRange(s,0);break;case I.TextEditorRevealType.InCenter:this._codeEditor.revealRangeInCenter(s,0);break;case I.TextEditorRevealType.InCenterIfOutsideViewport:this._codeEditor.revealRangeInCenterIfOutsideViewport(s,0);break;case I.TextEditorRevealType.AtTop:this._codeEditor.revealRangeAtTop(s,0);break;default:console.warn(`Unknown revealType: ${l}`);break}}isFocused(){return this._codeEditor?this._codeEditor.hasTextFocus():!1}matches(s){return s?s.getControl()===this._codeEditor:!1}applyEdits(s,l,r){if(this._model.getVersionId()!==s||!this._codeEditor)return!1;typeof r.setEndOfLine!="undefined"&&this._model.pushEOL(r.setEndOfLine);const p=l.map(u=>({range:A.Range.lift(u.range),text:u.text,forceMoveMarkers:u.forceMoveMarkers}));return r.undoStopBefore&&this._codeEditor.pushUndoStop(),this._codeEditor.executeEdits("MainThreadTextEditor",p),r.undoStopAfter&&this._codeEditor.pushUndoStop(),!0}async insertSnippet(s,l,r){if(!this._codeEditor||!this._codeEditor.hasModel())return!1;let p;if(o.SnippetParser.guessNeedsClipboard(s)){const h=new C.EditorState(this._codeEditor,1|4);if(p=await this._clipboardService.readText(),!h.validate(this._codeEditor))return!1}const a=D.SnippetController2.get(this._codeEditor),n=l.map(h=>new k.Selection(h.startLineNumber,h.startColumn,h.endLineNumber,h.endColumn));return this._codeEditor.setSelections(n),this._codeEditor.focus(),a?.insert(s,{overwriteBefore:0,overwriteAfter:0,undoStopBefore:r.undoStopBefore,undoStopAfter:r.undoStopAfter,clipboardText:p}),!0}}e.MainThreadTextEditor=i}),define(ne[2342],re([1,0,22,75,65]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadErrors=void 0;let A=class{dispose(){}$onUnexpectedError(D){if(D&&D.$isError){const{name:I,message:w,stack:v}=D;D=new Error,D.message=w,D.name=I,D.stack=v}(0,t.onUnexpectedError)(D)}};A=Ee([(0,f.extHostNamedCustomer)(_.MainContext.MainThreadErrors)],A),e.MainThreadErrors=A}),define(ne[2343],re([1,0,2,126,65,75,579]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadInteractive=void 0;let D=class{constructor(w,v){this._disposables=new t.DisposableStore,this._proxy=w.getProxy(_.ExtHostContext.ExtHostInteractive),this._disposables.add(v.onWillAddInteractiveDocument(C=>{this._proxy.$willAddInteractiveDocument(C.inputUri,` `,f.PLAINTEXT_LANGUAGE_ID,C.notebookUri)})),this._disposables.add(v.onWillRemoveInteractiveDocument(C=>{this._proxy.$willRemoveInteractiveDocument(C.inputUri,C.notebookUri)}))}dispose(){this._disposables.dispose()}};D=Ee([(0,A.extHostNamedCustomer)(_.MainContext.MainThreadInteractive),W(1,k.IInteractiveDocumentService)],D),e.MainThreadInteractive=D}),define(ne[2344],re([1,0,75,65,349]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadKeytar=void 0;let A=class{constructor(D,I){this._credentialsService=I}async $getPassword(D,I){return this._credentialsService.getPassword(D,I)}async $setPassword(D,I,w){return this._credentialsService.setPassword(D,I,w)}async $deletePassword(D,I){return this._credentialsService.deletePassword(D,I)}async $findPassword(D){return this._credentialsService.findPassword(D)}async $findCredentials(D){return this._credentialsService.findCredentials(D)}dispose(){}};A=Ee([(0,t.extHostNamedCustomer)(f.MainContext.MainThreadKeytar),W(1,_.ICredentialsService)],A),e.MainThreadKeytar=A}),define(ne[2345],re([1,0,65,75,45,2]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadLabelService=void 0;let k=class{constructor(I,w){this._labelService=w,this._resourceLabelFormatters=new Map}$registerResourceLabelFormatter(I,w){w.priority=!0;const v=this._labelService.registerFormatter(w);this._resourceLabelFormatters.set(I,v)}$unregisterResourceLabelFormatter(I){(0,A.dispose)(this._resourceLabelFormatters.get(I)),this._resourceLabelFormatters.delete(I)}dispose(){}};k=Ee([(0,f.extHostNamedCustomer)(t.MainContext.MainThreadLabelService),W(1,_.ILabelService)],k),e.MainThreadLabelService=k}),define(ne[2346],re([1,0,6,365,65,124,42,75,9,572,598,51,696,180,22,62]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";var s;Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadDocumentRangeSemanticTokensProvider=e.MainThreadDocumentSemanticTokensProvider=e.MainThreadLanguageFeatures=void 0;let l=s=class{constructor(a,n,h,g){if(this._languageFeaturesService=g,this._registrations=new Map,this._proxy=a.getProxy(_.ExtHostContext.ExtHostLanguageFeatures),this._languageService=n,this._languageService){const d=()=>{let m=[];for(const b of n.getRegisteredLanguageIds()){const E=h.getLanguageConfiguration(b).getWordDefinition();m.push({languageId:b,regexSource:E.source,regexFlags:E.flags})}this._proxy.$setWordDefinitions(m)};h.onDidChange(m=>{if(!m.languageId)d();else{const b=h.getLanguageConfiguration(m.languageId).getWordDefinition();this._proxy.$setWordDefinitions([{languageId:m.languageId,regexSource:b.source,regexFlags:b.flags}])}}),d()}}dispose(){for(const a of this._registrations.values())a.dispose();this._registrations.clear()}$unregister(a){const n=this._registrations.get(a);n&&(n.dispose(),this._registrations.delete(a))}static _reviveLocationDto(a){return a&&(Array.isArray(a)?(a.forEach(n=>s._reviveLocationDto(n)),a):(a.uri=I.URI.revive(a.uri),a))}static _reviveLocationLinkDto(a){return a&&(Array.isArray(a)?(a.forEach(n=>s._reviveLocationLinkDto(n)),a):(a.uri=I.URI.revive(a.uri),a))}static _reviveWorkspaceSymbolDto(a){return a&&(Array.isArray(a)?(a.forEach(s._reviveWorkspaceSymbolDto),a):(a.location=s._reviveLocationDto(a.location),a))}static _reviveCodeActionDto(a){return a&&a.forEach(n=>(0,_.reviveWorkspaceEditDto)(n.edit)),a}static _reviveLinkDTO(a){return a.url&&typeof a.url!="string"&&(a.url=I.URI.revive(a.url)),a}static _reviveCallHierarchyItemDto(a){return a&&(a.uri=I.URI.revive(a.uri)),a}static _reviveTypeHierarchyItemDto(a){return a&&(a.uri=I.URI.revive(a.uri)),a}$registerDocumentSymbolProvider(a,n,h){this._registrations.set(a,this._languageFeaturesService.documentSymbolProvider.register(n,{displayName:h,provideDocumentSymbols:(g,d)=>this._proxy.$provideDocumentSymbols(a,g.uri,d)}))}$registerCodeLensSupport(a,n,h){const g={provideCodeLenses:async(d,m)=>{const b=await this._proxy.$provideCodeLenses(a,d.uri,m);if(!!b)return{lenses:b.lenses,dispose:()=>b.cacheId&&this._proxy.$releaseCodeLenses(a,b.cacheId)}},resolveCodeLens:(d,m,b)=>this._proxy.$resolveCodeLens(a,m,b)};if(typeof h=="number"){const d=new t.Emitter;this._registrations.set(h,d),g.onDidChange=d.event}this._registrations.set(a,this._languageFeaturesService.codeLensProvider.register(n,g))}$emitCodeLensEvent(a,n){const h=this._registrations.get(a);h instanceof t.Emitter&&h.fire(n)}$registerDefinitionSupport(a,n){this._registrations.set(a,this._languageFeaturesService.definitionProvider.register(n,{provideDefinition:(h,g,d)=>this._proxy.$provideDefinition(a,h.uri,g,d).then(s._reviveLocationLinkDto)}))}$registerDeclarationSupport(a,n){this._registrations.set(a,this._languageFeaturesService.declarationProvider.register(n,{provideDeclaration:(h,g,d)=>this._proxy.$provideDeclaration(a,h.uri,g,d).then(s._reviveLocationLinkDto)}))}$registerImplementationSupport(a,n){this._registrations.set(a,this._languageFeaturesService.implementationProvider.register(n,{provideImplementation:(h,g,d)=>this._proxy.$provideImplementation(a,h.uri,g,d).then(s._reviveLocationLinkDto)}))}$registerTypeDefinitionSupport(a,n){this._registrations.set(a,this._languageFeaturesService.typeDefinitionProvider.register(n,{provideTypeDefinition:(h,g,d)=>this._proxy.$provideTypeDefinition(a,h.uri,g,d).then(s._reviveLocationLinkDto)}))}$registerHoverProvider(a,n){this._registrations.set(a,this._languageFeaturesService.hoverProvider.register(n,{provideHover:(h,g,d)=>this._proxy.$provideHover(a,h.uri,g,d)}))}$registerEvaluatableExpressionProvider(a,n){this._registrations.set(a,this._languageFeaturesService.evaluatableExpressionProvider.register(n,{provideEvaluatableExpression:(h,g,d)=>this._proxy.$provideEvaluatableExpression(a,h.uri,g,d)}))}$registerInlineValuesProvider(a,n,h){const g={provideInlineValues:(d,m,b,E)=>this._proxy.$provideInlineValues(a,d.uri,m,b,E)};if(typeof h=="number"){const d=new t.Emitter;this._registrations.set(h,d),g.onDidChangeInlineValues=d.event}this._registrations.set(a,this._languageFeaturesService.inlineValuesProvider.register(n,g))}$emitInlineValuesEvent(a,n){const h=this._registrations.get(a);h instanceof t.Emitter&&h.fire(n)}$registerDocumentHighlightProvider(a,n){this._registrations.set(a,this._languageFeaturesService.documentHighlightProvider.register(n,{provideDocumentHighlights:(h,g,d)=>this._proxy.$provideDocumentHighlights(a,h.uri,g,d)}))}$registerLinkedEditingRangeProvider(a,n){this._registrations.set(a,this._languageFeaturesService.linkedEditingRangeProvider.register(n,{provideLinkedEditingRanges:async(h,g,d)=>{const m=await this._proxy.$provideLinkedEditingRanges(a,h.uri,g,d);if(m)return{ranges:m.ranges,wordPattern:m.wordPattern?s._reviveRegExp(m.wordPattern):void 0}}}))}$registerReferenceSupport(a,n){this._registrations.set(a,this._languageFeaturesService.referenceProvider.register(n,{provideReferences:(h,g,d,m)=>this._proxy.$provideReferences(a,h.uri,g,d,m).then(s._reviveLocationDto)}))}$registerQuickFixSupport(a,n,h,g,d){const m={provideCodeActions:async(b,E,y,T)=>{const R=await this._proxy.$provideCodeActions(a,b.uri,E,y,T);if(!!R)return{actions:s._reviveCodeActionDto(R.actions),dispose:()=>{typeof R.cacheId=="number"&&this._proxy.$releaseCodeActions(a,R.cacheId)}}},providedCodeActionKinds:h.providedKinds,documentation:h.documentation,displayName:g};d&&(m.resolveCodeAction=async(b,E)=>{const y=await this._proxy.$resolveCodeAction(a,b.cacheId,E);return b.edit=(0,_.reviveWorkspaceEditDto)(y),b}),this._registrations.set(a,this._languageFeaturesService.codeActionProvider.register(n,m))}$registerDocumentFormattingSupport(a,n,h,g){this._registrations.set(a,this._languageFeaturesService.documentFormattingEditProvider.register(n,{extensionId:h,displayName:g,provideDocumentFormattingEdits:(d,m,b)=>this._proxy.$provideDocumentFormattingEdits(a,d.uri,m,b)}))}$registerRangeFormattingSupport(a,n,h,g){this._registrations.set(a,this._languageFeaturesService.documentRangeFormattingEditProvider.register(n,{extensionId:h,displayName:g,provideDocumentRangeFormattingEdits:(d,m,b,E)=>this._proxy.$provideDocumentRangeFormattingEdits(a,d.uri,m,b,E)}))}$registerOnTypeFormattingSupport(a,n,h,g){this._registrations.set(a,this._languageFeaturesService.onTypeFormattingEditProvider.register(n,{extensionId:g,autoFormatTriggerCharacters:h,provideOnTypeFormattingEdits:(d,m,b,E,y)=>this._proxy.$provideOnTypeFormattingEdits(a,d.uri,m,b,E,y)}))}$registerNavigateTypeSupport(a,n){let h;const g={provideWorkspaceSymbols:async(d,m)=>{const b=await this._proxy.$provideWorkspaceSymbols(a,d,m);return h!==void 0&&this._proxy.$releaseWorkspaceSymbols(a,h),h=b.cacheId,s._reviveWorkspaceSymbolDto(b.symbols)}};n&&(g.resolveWorkspaceSymbol=async(d,m)=>{const b=await this._proxy.$resolveWorkspaceSymbol(a,d,m);return b&&s._reviveWorkspaceSymbolDto(b)}),this._registrations.set(a,f.WorkspaceSymbolProviderRegistry.register(g))}$registerRenameSupport(a,n,h){this._registrations.set(a,this._languageFeaturesService.renameProvider.register(n,{provideRenameEdits:(g,d,m,b)=>this._proxy.$provideRenameEdits(a,g.uri,d,m,b).then(_.reviveWorkspaceEditDto),resolveRenameLocation:h?(g,d,m)=>this._proxy.$resolveRenameLocation(a,g.uri,d,m):void 0}))}$registerDocumentSemanticTokensProvider(a,n,h,g){let d;if(typeof g=="number"){const m=new t.Emitter;this._registrations.set(g,m),d=m.event}this._registrations.set(a,this._languageFeaturesService.documentSemanticTokensProvider.register(n,new r(this._proxy,a,h,d)))}$emitDocumentSemanticTokensEvent(a){const n=this._registrations.get(a);n instanceof t.Emitter&&n.fire(void 0)}$registerDocumentRangeSemanticTokensProvider(a,n,h){this._registrations.set(a,this._languageFeaturesService.documentRangeSemanticTokensProvider.register(n,new p(this._proxy,a,h)))}static _inflateSuggestDto(a,n){const h=n.a;return{label:h,kind:n.b??9,tags:n.n,detail:n.c,documentation:n.d,sortText:n.e,filterText:n.f,preselect:n.g,insertText:n.h??(typeof h=="string"?h:h.label),range:n.j??a,insertTextRules:n.i,commitCharacters:n.k,additionalTextEdits:n.l,command:n.m,_id:n.x}}$registerSuggestSupport(a,n,h,g,d){const m={triggerCharacters:h,_debugDisplayName:d,provideCompletionItems:async(b,E,y,T)=>{const R=await this._proxy.$provideCompletionItems(a,b.uri,E,y,T);return R&&{suggestions:R.b.map(O=>s._inflateSuggestDto(R.a,O)),incomplete:R.c||!1,duration:R.d,dispose:()=>{typeof R.x=="number"&&this._proxy.$releaseCompletionItems(a,R.x)}}}};g&&(m.resolveCompletionItem=(b,E)=>this._proxy.$resolveCompletionItem(a,b._id,E).then(y=>{if(!y)return b;let T=s._inflateSuggestDto(b.range,y);return(0,C.mixin)(b,T,!0)})),this._registrations.set(a,this._languageFeaturesService.completionProvider.register(n,m))}$registerInlineCompletionsSupport(a,n){const h={provideInlineCompletions:async(g,d,m,b)=>this._proxy.$provideInlineCompletions(a,g.uri,d,m,b),handleItemDidShow:async(g,d)=>this._proxy.$handleInlineCompletionDidShow(a,g.pid,d.idx),freeInlineCompletions:g=>{this._proxy.$freeInlineCompletionsList(a,g.pid)}};this._registrations.set(a,this._languageFeaturesService.inlineCompletionsProvider.register(n,h))}$registerSignatureHelpProvider(a,n,h){this._registrations.set(a,this._languageFeaturesService.signatureHelpProvider.register(n,{signatureHelpTriggerCharacters:h.triggerCharacters,signatureHelpRetriggerCharacters:h.retriggerCharacters,provideSignatureHelp:async(g,d,m,b)=>{const E=await this._proxy.$provideSignatureHelp(a,g.uri,d,b,m);if(!!E)return{value:E,dispose:()=>{this._proxy.$releaseSignatureHelp(a,E.id)}}}}))}$registerInlayHintsProvider(a,n,h,g,d){const m={displayName:d,provideInlayHints:async(b,E,y)=>{const T=await this._proxy.$provideInlayHints(a,b.uri,E,y);if(!!T)return{hints:(0,c.revive)(T.hints),dispose:()=>{T.cacheId&&this._proxy.$releaseInlayHints(a,T.cacheId)}}}};if(h&&(m.resolveInlayHint=async(b,E)=>{const y=b;if(!y.cacheId)return b;const T=await this._proxy.$resolveInlayHint(a,y.cacheId,E);if(E.isCancellationRequested)throw new i.CancellationError;return T?{...b,tooltip:T.tooltip,label:(0,c.revive)(T.label)}:b}),typeof g=="number"){const b=new t.Emitter;this._registrations.set(g,b),m.onDidChangeInlayHints=b.event}this._registrations.set(a,this._languageFeaturesService.inlayHintsProvider.register(n,m))}$emitInlayHintsEvent(a){const n=this._registrations.get(a);n instanceof t.Emitter&&n.fire(void 0)}$registerDocumentLinkProvider(a,n,h){const g={provideLinks:(d,m)=>this._proxy.$provideDocumentLinks(a,d.uri,m).then(b=>{if(!!b)return{links:b.links.map(s._reviveLinkDTO),dispose:()=>{typeof b.cacheId=="number"&&this._proxy.$releaseDocumentLinks(a,b.cacheId)}}})};h&&(g.resolveLink=(d,m)=>{const b=d;return b.cacheId?this._proxy.$resolveDocumentLink(a,b.cacheId,m).then(E=>E&&s._reviveLinkDTO(E)):d}),this._registrations.set(a,this._languageFeaturesService.linkProvider.register(n,g))}$registerDocumentColorProvider(a,n){const h=this._proxy;this._registrations.set(a,this._languageFeaturesService.colorProvider.register(n,{provideDocumentColors:(g,d)=>h.$provideDocumentColors(a,g.uri,d).then(m=>m.map(b=>{const[E,y,T,R]=b.color;return{color:{red:E,green:y,blue:T,alpha:R},range:b.range}})),provideColorPresentations:(g,d,m)=>h.$provideColorPresentations(a,g.uri,{color:[d.color.red,d.color.green,d.color.blue,d.color.alpha],range:d.range},m)}))}$registerFoldingRangeProvider(a,n,h){const g={provideFoldingRanges:(d,m,b)=>this._proxy.$provideFoldingRanges(a,d.uri,m,b)};if(typeof h=="number"){const d=new t.Emitter;this._registrations.set(h,d),g.onDidChange=d.event}this._registrations.set(a,this._languageFeaturesService.foldingRangeProvider.register(n,g))}$emitFoldingRangeEvent(a,n){const h=this._registrations.get(a);h instanceof t.Emitter&&h.fire(n)}$registerSelectionRangeProvider(a,n){this._registrations.set(a,this._languageFeaturesService.selectionRangeProvider.register(n,{provideSelectionRanges:(h,g,d)=>this._proxy.$provideSelectionRanges(a,h.uri,g,d)}))}$registerCallHierarchyProvider(a,n){this._registrations.set(a,w.CallHierarchyProviderRegistry.register(n,{prepareCallHierarchy:async(h,g,d)=>{const m=await this._proxy.$prepareCallHierarchy(a,h.uri,g,d);if(!(!m||m.length===0))return{dispose:()=>{for(const b of m)this._proxy.$releaseCallHierarchy(a,b._sessionId)},roots:m.map(s._reviveCallHierarchyItemDto)}},provideOutgoingCalls:async(h,g)=>{const d=await this._proxy.$provideCallHierarchyOutgoingCalls(a,h._sessionId,h._itemId,g);return d&&(d.forEach(m=>{m.to=s._reviveCallHierarchyItemDto(m.to)}),d)},provideIncomingCalls:async(h,g)=>{const d=await this._proxy.$provideCallHierarchyIncomingCalls(a,h._sessionId,h._itemId,g);return d&&(d.forEach(m=>{m.from=s._reviveCallHierarchyItemDto(m.from)}),d)}}))}static _reviveRegExp(a){return new RegExp(a.pattern,a.flags)}static _reviveIndentationRule(a){return{decreaseIndentPattern:s._reviveRegExp(a.decreaseIndentPattern),increaseIndentPattern:s._reviveRegExp(a.increaseIndentPattern),indentNextLinePattern:a.indentNextLinePattern?s._reviveRegExp(a.indentNextLinePattern):void 0,unIndentedLinePattern:a.unIndentedLinePattern?s._reviveRegExp(a.unIndentedLinePattern):void 0}}static _reviveOnEnterRule(a){return{beforeText:s._reviveRegExp(a.beforeText),afterText:a.afterText?s._reviveRegExp(a.afterText):void 0,previousLineText:a.previousLineText?s._reviveRegExp(a.previousLineText):void 0,action:a.action}}static _reviveOnEnterRules(a){return a.map(s._reviveOnEnterRule)}$setLanguageConfiguration(a,n,h){const g={comments:h.comments,brackets:h.brackets,wordPattern:h.wordPattern?s._reviveRegExp(h.wordPattern):void 0,indentationRules:h.indentationRules?s._reviveIndentationRule(h.indentationRules):void 0,onEnterRules:h.onEnterRules?s._reviveOnEnterRules(h.onEnterRules):void 0,autoClosingPairs:void 0,surroundingPairs:void 0,__electricCharacterSupport:void 0};h.__characterPairSupport&&(g.autoClosingPairs=h.__characterPairSupport.autoClosingPairs),h.__electricCharacterSupport&&h.__electricCharacterSupport.docComment&&(g.__electricCharacterSupport={docComment:{open:h.__electricCharacterSupport.docComment.open,close:h.__electricCharacterSupport.docComment.close}}),this._languageService.isRegisteredLanguageId(n)&&this._registrations.set(a,A.LanguageConfigurationRegistry.register(n,g,100))}$registerTypeHierarchyProvider(a,n){this._registrations.set(a,v.TypeHierarchyProviderRegistry.register(n,{prepareTypeHierarchy:async(h,g,d)=>{const m=await this._proxy.$prepareTypeHierarchy(a,h.uri,g,d);if(!!m)return{dispose:()=>{for(const b of m)this._proxy.$releaseTypeHierarchy(a,b._sessionId)},roots:m.map(s._reviveTypeHierarchyItemDto)}},provideSupertypes:async(h,g)=>{const d=await this._proxy.$provideTypeHierarchySupertypes(a,h._sessionId,h._itemId,g);return d&&d.map(s._reviveTypeHierarchyItemDto)},provideSubtypes:async(h,g)=>{const d=await this._proxy.$provideTypeHierarchySubtypes(a,h._sessionId,h._itemId,g);return d&&d.map(s._reviveTypeHierarchyItemDto)}}))}};l=s=Ee([(0,D.extHostNamedCustomer)(_.MainContext.MainThreadLanguageFeatures),W(1,k.ILanguageService),W(2,A.ILanguageConfigurationService),W(3,S.ILanguageFeaturesService)],l),e.MainThreadLanguageFeatures=l;class r{constructor(a,n,h,g){this._proxy=a,this._handle=n,this._legend=h,this.onDidChange=g}releaseDocumentSemanticTokens(a){a&&this._proxy.$releaseDocumentSemanticTokens(this._handle,parseInt(a,10))}getLegend(){return this._legend}async provideDocumentSemanticTokens(a,n,h){const g=n?parseInt(n,10):0,d=await this._proxy.$provideDocumentSemanticTokens(this._handle,a.uri,g,h);if(!d||h.isCancellationRequested)return null;const m=(0,o.decodeSemanticTokensDto)(d);return m.type==="full"?{resultId:String(m.id),data:m.data}:{resultId:String(m.id),edits:m.deltas}}}e.MainThreadDocumentSemanticTokensProvider=r;class p{constructor(a,n,h){this._proxy=a,this._handle=n,this._legend=h}getLegend(){return this._legend}async provideDocumentRangeSemanticTokens(a,n,h){const g=await this._proxy.$provideDocumentRangeSemanticTokens(this._handle,a.uri,n,h);if(!g||h.isCancellationRequested)return null;const d=(0,o.decodeSemanticTokensDto)(g);if(d.type==="full")return{resultId:String(d.id),data:d.data};throw new Error("Unexpected")}}e.MainThreadDocumentRangeSemanticTokensProvider=p}),define(ne[2347],re([1,0,75,31,65,9,28,85]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadLoggerService=void 0;let I=class{constructor(v,C,o){this._loggerService=o;const c=v.getProxy(_.ExtHostContext.ExtHostLogLevelServiceShape);this._logListener=C.onDidChangeLogLevel(i=>c.$setLevel(i))}$log(v,C){const o=this._loggerService.getLogger(A.URI.revive(v));if(!o)throw new Error("Create the logger before logging");for(const[c,i]of C)(0,f.log)(o,c,i)}async $createLogger(v,C){this._loggerService.createLogger(A.URI.revive(v),C)}dispose(){this._logListener.dispose()}};I=Ee([(0,t.extHostNamedCustomer)(_.MainContext.MainThreadLogger),W(1,f.ILogService),W(2,f.ILoggerService)],I),e.MainThreadLoggerService=I,k.CommandsRegistry.registerCommand("_extensionTests.setLogLevel",function(w,v){const C=w.get(f.ILogService),o=w.get(D.IEnvironmentService);o.isExtensionDevelopment&&!!o.extensionTestsLocationURI&&C.setLevel(v)}),k.CommandsRegistry.registerCommand("_extensionTests.getLogLevel",function(w){return w.get(f.ILogService).getLevel()})}),define(ne[2348],re([1,0,1358,36,65,75,54,26,6,28,2]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadMessageService=void 0;let C=class{constructor(c,i,S,s){this._notificationService=i,this._commandService=S,this._dialogService=s}dispose(){}$showMessage(c,i,S,s){return S.modal?this._showModalMessage(c,i,S.detail,s,S.useCustom):this._showMessage(c,i,s,S)}_showMessage(c,i,S,s){return new Promise(l=>{const r=[];class p extends f.Action{constructor(d,m,b){super(d,m,void 0,!0,()=>(l(b),Promise.resolve()))}}class u extends f.Action{constructor(d,m,b){super(d.value,m,void 0,!0,()=>b.executeCommand("_extensions.manage",d.value))}}S.forEach(g=>{r.push(new p("_extension_message_handle_"+g.handle,g.title,g.handle))});let a;s.source&&(a={label:t.localize(0,null,s.source.label),id:s.source.identifier.value}),a||(a=t.localize(1,null));const n=[];s.source&&n.push(new u(s.source.identifier,t.localize(2,null),this._commandService));const h=this._notificationService.notify({severity:c,message:i,actions:{primary:r,secondary:n},source:a});I.Event.once(h.onDidClose)(()=>{(0,v.dispose)(r),(0,v.dispose)(n),l(void 0)})})}async _showModalMessage(c,i,S,s,l){let r;const p=s.map((a,n)=>(a.isCloseAffordance===!0&&(r=n),a.title));r===void 0&&(p.length>0?p.push(t.localize(3,null)):p.push(t.localize(4,null)),r=p.length-1);const{choice:u}=await this._dialogService.show(c,i,p,{cancelId:r,custom:l,detail:S});return u===s.length?void 0:s[u].handle}};C=Ee([(0,A.extHostNamedCustomer)(_.MainContext.MainThreadMessageService),W(1,D.INotificationService),W(2,w.ICommandService),W(3,k.IDialogService)],C),e.MainThreadMessageService=C}),define(ne[2349],re([1,0,30,6,2,359,75,357,142,331,65,31,151]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadNotebooks=void 0;let c=class{constructor(S,s,l,r){this._notebookService=s,this._cellStatusBarService=l,this._logService=r,this._disposables=new _.DisposableStore,this._notebookProviders=new Map,this._notebookSerializer=new Map,this._notebookCellStatusBarRegistrations=new Map,this._proxy=S.getProxy(v.ExtHostContext.ExtHostNotebook)}dispose(){this._disposables.dispose();for(const S of this._notebookProviders.values())S.disposable.dispose();(0,_.dispose)(this._notebookSerializer.values())}async $registerNotebookProvider(S,s,l,r){let p={...l};const u={get options(){return p},set options(n){p.transientCellMetadata=n.transientCellMetadata,p.transientDocumentMetadata=n.transientDocumentMetadata,p.transientOutputs=n.transientOutputs},open:async(n,h,g,d)=>{const m=await this._proxy.$openNotebook(s,n,h,g,d);return{data:A.NotebookDto.fromNotebookDataDto(m.value),transientOptions:p}},save:async(n,h)=>this._proxy.$saveNotebook(s,n,h),saveAs:async(n,h,g)=>this._proxy.$saveNotebookAs(s,n,h,g),backup:async(n,h)=>this._proxy.$backupNotebook(s,n,h)},a=new _.DisposableStore;a.add(this._notebookService.registerNotebookController(s,S,u)),r&&a.add(this._notebookService.registerContributedNotebookType(s,r)),this._notebookProviders.set(s,{controller:u,disposable:a})}async $updateNotebookProviderOptions(S,s){const l=this._notebookProviders.get(S);l&&s&&(l.controller.options=s,this._notebookService.listNotebookDocuments().forEach(r=>{r.viewType===S&&(r.transientOptions=l.controller.options)}))}async $unregisterNotebookProvider(S){const s=this._notebookProviders.get(S);s&&(s.disposable.dispose(),this._notebookProviders.delete(S))}$registerNotebookSerializer(S,s,l,r,p){const u=this._notebookService.registerNotebookSerializer(l,s,{options:r,dataToNotebook:async n=>{const h=new o.StopWatch(!0),g=await this._proxy.$dataToNotebook(S,n,t.CancellationToken.None),d=A.NotebookDto.fromNotebookDataDto(g.value);return this._logService.trace("[NotebookSerializer] dataToNotebook DONE",s.id,h.elapsed()),d},notebookToData:n=>{const h=new o.StopWatch(!0),g=this._proxy.$notebookToData(S,new w.SerializableObjectWithBuffers(A.NotebookDto.toNotebookDataDto(n)),t.CancellationToken.None);return this._logService.trace("[NotebookSerializer] notebookToData DONE",s.id,h.elapsed()),g}}),a=new _.DisposableStore;a.add(u),p&&a.add(this._notebookService.registerContributedNotebookType(l,p)),this._notebookSerializer.set(S,a)}$unregisterNotebookSerializer(S){this._notebookSerializer.get(S)?.dispose(),this._notebookSerializer.delete(S)}$emitCellStatusBarEvent(S){const s=this._notebookCellStatusBarRegistrations.get(S);s instanceof f.Emitter&&s.fire(void 0)}async $registerNotebookCellStatusBarItemProvider(S,s,l){const r=this,p={async provideCellStatusBarItems(a,n,h){const g=await r._proxy.$provideNotebookCellStatusBarItems(S,a,n,h);return{items:g?.items??[],dispose(){g&&r._proxy.$releaseNotebookCellStatusBarItems(g.cacheId)}}},viewType:l};if(typeof s=="number"){const a=new f.Emitter;this._notebookCellStatusBarRegistrations.set(s,a),p.onDidChangeStatusBarItems=a.event}const u=this._cellStatusBarService.registerCellStatusBarItemProvider(p);this._notebookCellStatusBarRegistrations.set(S,u)}async $unregisterNotebookCellStatusBarItemProvider(S,s){const l=r=>{this._notebookCellStatusBarRegistrations.get(r)&&(this._notebookCellStatusBarRegistrations.get(r)?.dispose(),this._notebookCellStatusBarRegistrations.delete(r))};l(S),typeof s=="number"&&l(s)}};c=Ee([(0,k.extHostNamedCustomer)(v.MainContext.MainThreadNotebook),W(1,I.INotebookService),W(2,D.INotebookCellStatusBarService),W(3,C.ILogService)],c),e.MainThreadNotebooks=c}),define(ne[2350],re([1,0,2,104,290,65,31,9,132,21,59,253,51,359]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadNotebookEditors=void 0;class i{constructor(l,r){this.editor=l,this.disposables=r}dispose(){this.disposables.dispose()}}let S=class{constructor(l,r,p,u,a){this._editorService=r,this._logService=p,this._notebookEditorService=u,this._editorGroupService=a,this._disposables=new t.DisposableStore,this._mainThreadEditors=new Map,this._proxy=l.getProxy(A.ExtHostContext.ExtHostNotebookEditors),this._editorService.onDidActiveEditorChange(()=>this._updateEditorViewColumns(),this,this._disposables),this._editorGroupService.onDidRemoveGroup(()=>this._updateEditorViewColumns(),this,this._disposables),this._editorGroupService.onDidMoveGroup(()=>this._updateEditorViewColumns(),this,this._disposables)}dispose(){this._disposables.dispose(),(0,t.dispose)(this._mainThreadEditors.values())}handleEditorsAdded(l){for(const r of l){const p=new t.DisposableStore;p.add(r.onDidChangeVisibleRanges(()=>{this._proxy.$acceptEditorPropertiesChanged(r.getId(),{visibleRanges:{ranges:r.visibleRanges}})})),p.add(r.onDidChangeSelection(()=>{this._proxy.$acceptEditorPropertiesChanged(r.getId(),{selections:{selections:r.getSelections()}})}));const u=new i(r,p);this._mainThreadEditors.set(r.getId(),u)}}handleEditorsRemoved(l){for(const r of l)this._mainThreadEditors.get(r)?.dispose(),this._mainThreadEditors.delete(r)}_updateEditorViewColumns(){const l=Object.create(null);for(let r of this._editorService.visibleEditorPanes){const p=(0,f.getNotebookEditorFromEditorPane)(r);p&&this._mainThreadEditors.has(p.getId())&&(l[p.getId()]=(0,C.editorGroupToColumn)(this._editorGroupService,r.group))}(0,o.equals)(l,this._currentViewColumnInfo)||(this._currentViewColumnInfo=l,this._proxy.$acceptEditorViewColumns(l))}async $tryApplyEdits(l,r,p){const u=this._mainThreadEditors.get(l);if(!u)return!1;const{editor:a}=u;return a.textModel?a.textModel.versionId!==r?!1:a.textModel.applyEdits(p.map(c.NotebookDto.fromCellEditOperationDto),!0,void 0,()=>{},void 0):(this._logService.warn("Notebook editor has NO model",l),!1)}async $tryShowNotebookDocument(l,r,p){const u={cellSelections:p.selections,preserveFocus:p.preserveFocus,pinned:p.pinned,activation:p.preserveFocus?I.EditorActivation.RESTORE:void 0,override:r},a=await this._editorService.openEditor({resource:D.URI.revive(l),options:u},(0,C.columnToEditorGroup)(this._editorGroupService,p.position)),n=(0,f.getNotebookEditorFromEditorPane)(a);if(n)return n.getId();throw new Error(`Notebook Editor creation failure for documenet ${l}`)}async $tryRevealRange(l,r,p){const u=this._notebookEditorService.getNotebookEditor(l);if(!u)return;const a=u;if(!a.hasModel()||r.start>=a.getLength())return;const n=a.cellAt(r.start);switch(p){case A.NotebookEditorRevealType.Default:return a.revealCellRangeInView(r);case A.NotebookEditorRevealType.InCenter:return a.revealInCenter(n);case A.NotebookEditorRevealType.InCenterIfOutsideViewport:return a.revealInCenterIfOutsideViewport(n);case A.NotebookEditorRevealType.AtTop:return a.revealInViewAtTop(n)}}$registerNotebookEditorDecorationType(l,r){this._notebookEditorService.registerEditorDecorationType(l,r)}$removeNotebookEditorDecorationType(l){this._notebookEditorService.removeEditorDecorationType(l)}$trySetDecorations(l,r,p){const u=this._notebookEditorService.getNotebookEditor(l);u&&u.setEditorDecorations(p,r)}$trySetSelections(l,r){const p=this._notebookEditorService.getNotebookEditor(l);!p||(p.setSelections(r),r.length&&p.setFocus({start:r[0].start,end:r[0].start+1}))}};S=Ee([W(1,w.IEditorService),W(2,k.ILogService),W(3,_.INotebookEditorService),W(4,v.IEditorGroupsService)],S),e.MainThreadNotebookEditors=S}),define(ne[2351],re([1,0,15,22,6,2,9,42,359,75,290,158,238,65]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadNotebookKernels=void 0;class i{constructor(l,r){this._languageService=r,this._onDidChange=new _.Emitter,this.onDidChange=this._onDidChange.event,this.id=l.id,this.viewType=l.notebookType,this.extension=l.extensionId,this.implementsInterrupt=l.supportsInterrupt??!1,this.label=l.label,this.description=l.description,this.detail=l.detail,this.kind=l.kind,this.supportedLanguages=(0,t.isNonEmptyArray)(l.supportedLanguages)?l.supportedLanguages:r.getRegisteredLanguageIds(),this.implementsExecutionOrder=l.supportsExecutionOrder??!1,this.localResourceRoot=k.URI.revive(l.extensionLocation),this.preloads=l.preloads?.map(p=>({uri:k.URI.revive(p.uri),provides:p.provides}))??[]}get preloadUris(){return this.preloads.map(l=>l.uri)}get preloadProvides(){return(0,t.flatten)(this.preloads.map(l=>l.provides))}update(l){const r=Object.create(null);l.label!==void 0&&(this.label=l.label,r.label=!0),l.description!==void 0&&(this.description=l.description,r.description=!0),l.detail!==void 0&&(this.detail=l.detail,r.detail=!0),l.kind!==void 0&&(this.kind=l.kind,r.kind=!0),l.supportedLanguages!==void 0&&(this.supportedLanguages=(0,t.isNonEmptyArray)(l.supportedLanguages)?l.supportedLanguages:this._languageService.getRegisteredLanguageIds(),r.supportedLanguages=!0),l.supportsExecutionOrder!==void 0&&(this.implementsExecutionOrder=l.supportsExecutionOrder,r.hasExecutionOrder=!0),this._onDidChange.fire(r)}}let S=class{constructor(l,r,p,u,a){this._languageService=r,this._notebookKernelService=p,this._notebookExecutionStateService=u,this._editors=new Map,this._disposables=new A.DisposableStore,this._kernels=new Map,this._executions=new Map,this._proxy=l.getProxy(c.ExtHostContext.ExtHostNotebookKernels),a.listNotebookEditors().forEach(this._onEditorAdd,this),a.onDidAddNotebookEditor(this._onEditorAdd,this,this._disposables),a.onDidRemoveNotebookEditor(this._onEditorRemove,this,this._disposables),this._disposables.add((0,A.toDisposable)(()=>{this._executions.forEach(n=>{n.complete({})})})),this._disposables.add(this._notebookExecutionStateService.onDidChangeCellExecution(n=>{this._proxy.$cellExecutionChanged(n.notebook,n.cellHandle,n.changed?.state)}))}dispose(){this._disposables.dispose();for(let[,l]of this._kernels.values())l.dispose()}_onEditorAdd(l){const r=l.onDidReceiveMessage(p=>{if(!l.hasModel())return;const{selected:u}=this._notebookKernelService.getMatchingKernel(l.textModel);if(!!u){for(let[a,n]of this._kernels)if(n[0]===u){this._proxy.$acceptKernelMessageFromRenderer(a,l.getId(),p.message);break}}});this._editors.set(l,r)}_onEditorRemove(l){this._editors.get(l)?.dispose(),this._editors.delete(l)}async $postMessage(l,r,p){const u=this._kernels.get(l);if(!u)throw new Error("kernel already disposed");const[a]=u;let n=!1;for(const[h]of this._editors)if(!!h.hasModel()&&this._notebookKernelService.getMatchingKernel(h.textModel).selected===a){if(r===void 0)h.postMessage(p),n=!0;else if(h.getId()===r){h.postMessage(p),n=!0;break}}return n}async $addKernel(l,r){const p=this,u=new class extends i{async executeNotebookCellsRequest(h,g){await p._proxy.$executeCells(l,h,g)}async cancelNotebookCellExecution(h,g){await p._proxy.$cancelCells(l,h,g)}}(r,this._languageService),a=this._notebookKernelService.onDidChangeSelectedNotebooks(h=>{h.oldKernel===u.id?this._proxy.$acceptNotebookAssociation(l,h.notebook,!1):h.newKernel===u.id&&this._proxy.$acceptNotebookAssociation(l,h.notebook,!0)}),n=this._notebookKernelService.registerKernel(u);this._kernels.set(l,[u,(0,A.combinedDisposable)(a,n)])}$updateKernel(l,r){const p=this._kernels.get(l);p&&p[0].update(r)}$removeKernel(l){const r=this._kernels.get(l);r&&(r[1].dispose(),this._kernels.delete(l))}$updateNotebookPriority(l,r,p){const u=this._kernels.get(l);u&&this._notebookKernelService.updateKernelNotebookAffinity(u[0],k.URI.revive(r),p)}$createExecution(l,r,p,u){const a=k.URI.revive(p),n=this._notebookExecutionStateService.createCellExecution(r,a,u);n.confirm(),this._executions.set(l,n)}$updateExecution(l,r){const p=r.value;try{const u=this._executions.get(l);u&&u.update(p.map(I.NotebookDto.fromCellExecuteUpdateDto))}catch(u){(0,f.onUnexpectedError)(u)}}$completeExecution(l,r){try{const p=this._executions.get(l);p&&p.complete(I.NotebookDto.fromCellExecuteCompleteDto(r.value))}catch(p){(0,f.onUnexpectedError)(p)}finally{this._executions.delete(l)}}};S=Ee([(0,w.extHostNamedCustomer)(c.MainContext.MainThreadNotebookKernels),W(1,D.ILanguageService),W(2,o.INotebookKernelService),W(3,C.INotebookExecutionStateService),W(4,v.INotebookEditorService)],S),e.MainThreadNotebookKernels=S}),define(ne[2352],re([1,0,2,65,75,585]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadNotebookRenderers=void 0;let k=class extends t.Disposable{constructor(I,w){super();this.messaging=w,this.proxy=I.getProxy(f.ExtHostContext.ExtHostNotebookRenderers),this._register(w.onShouldPostMessage(v=>{this.proxy.$postRendererMessage(v.editorId,v.rendererId,v.message)}))}$postMessage(I,w,v){return this.messaging.receiveMessage(I,w,v)}};k=Ee([(0,_.extHostNamedCustomer)(f.MainContext.MainThreadNotebookRenderers),W(1,A.INotebookRendererMessagingService)],k),e.MainThreadNotebookRenderers=k}),define(ne[2353],re([1,0,67,65,75,36,28,1359]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadProgress=void 0;class I extends A.Action{constructor(C,o,c){super(C,o,void 0,!0,()=>c.executeCommand("_extensions.manage",C))}}let w=class{constructor(C,o,c){this._commandService=c,this._progress=new Map,this._proxy=C.getProxy(f.ExtHostContext.ExtHostProgress),this._progressService=o}dispose(){this._progress.forEach(C=>C.resolve()),this._progress.clear()}async $startProgress(C,o,c){const i=this._createTask(C);o.location===15&&c&&(o={...o,location:15,secondaryActions:[new I(c,(0,D.localize)(0,null),this._commandService)]}),this._progressService.withProgress(o,i,()=>this._proxy.$acceptProgressCanceled(C))}$progressReport(C,o){const c=this._progress.get(C);c&&c.progress.report(o)}$progressEnd(C){const o=this._progress.get(C);o&&(o.resolve(),this._progress.delete(C))}_createTask(C){return o=>new Promise(c=>{this._progress.set(C,{resolve:c,progress:o})})}};w=Ee([(0,_.extHostNamedCustomer)(f.MainContext.MainThreadProgress),W(1,t.IProgressService),W(2,k.ICommandService)],w),e.MainThreadProgress=w}),define(ne[2354],re([1,0,53,65,75,9]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadQuickOpen=void 0;function k(I){I.dark=A.URI.revive(I.dark),I.light&&(I.light=A.URI.revive(I.light))}let D=class{constructor(w,v){this._items={},this.sessions=new Map,this._proxy=w.getProxy(f.ExtHostContext.ExtHostQuickOpen),this._quickInputService=v}dispose(){}$show(w,v,C){const o=new Promise((c,i)=>{this._items[w]={resolve:c,reject:i}});return v={...v,onDidFocus:c=>{c&&this._proxy.$onItemSelected(c.handle)}},v.canPickMany?this._quickInputService.pick(o,v,C).then(c=>{if(c)return c.map(i=>i.handle)}):this._quickInputService.pick(o,v,C).then(c=>{if(c)return c.handle})}$setItems(w,v){return this._items[w]&&(this._items[w].resolve(v),delete this._items[w]),Promise.resolve()}$setError(w,v){return this._items[w]&&(this._items[w].reject(v),delete this._items[w]),Promise.resolve()}$input(w,v,C){const o=Object.create(null);return w&&(o.title=w.title,o.password=w.password,o.placeHolder=w.placeHolder,o.valueSelection=w.valueSelection,o.prompt=w.prompt,o.value=w.value,o.ignoreFocusLost=w.ignoreFocusOut),v&&(o.validateInput=c=>this._proxy.$validateInput(c)),this._quickInputService.input(o,C)}$createOrUpdate(w){const v=w.id;let C=this.sessions.get(v);if(!C){const i=w.type==="quickPick"?this._quickInputService.createQuickPick():this._quickInputService.createInputBox();if(i.onDidAccept(()=>{this._proxy.$onDidAccept(v)}),i.onDidTriggerButton(S=>{this._proxy.$onDidTriggerButton(v,S.handle)}),i.onDidChangeValue(S=>{this._proxy.$onDidChangeValue(v,S)}),i.onDidHide(()=>{this._proxy.$onDidHide(v)}),w.type==="quickPick"){const S=i;S.onDidChangeActive(s=>{this._proxy.$onDidChangeActive(v,s.map(l=>l.handle))}),S.onDidChangeSelection(s=>{this._proxy.$onDidChangeSelection(v,s.map(l=>l.handle))}),S.onDidTriggerItemButton(s=>{this._proxy.$onDidTriggerItemButton(v,s.item.handle,s.button.handle)})}C={input:i,handlesToItems:new Map},this.sessions.set(v,C)}const{input:o,handlesToItems:c}=C;for(const i in w)i==="id"||i==="type"||(i==="visible"?w.visible?o.show():o.hide():i==="items"?(c.clear(),w[i].forEach(S=>{S.type!=="separator"&&(S.buttons&&(S.buttons=S.buttons.map(s=>(s.iconPath&&k(s.iconPath),s))),c.set(S.handle,S))}),o[i]=w[i]):i==="activeItems"||i==="selectedItems"?o[i]=w[i].filter(S=>c.has(S)).map(S=>c.get(S)):i==="buttons"?o[i]=w.buttons.map(S=>S.handle===-1?this._quickInputService.backButton:(S.iconPath&&k(S.iconPath),S)):o[i]=w[i]);return Promise.resolve(void 0)}$dispose(w){const v=this.sessions.get(w);return v&&(v.input.dispose(),this.sessions.delete(w)),Promise.resolve(void 0)}};D=Ee([(0,_.extHostNamedCustomer)(f.MainContext.MainThreadQuickOpen),W(1,t.IQuickInputService)],D),e.MainThreadQuickOpen=D}),define(ne[2355],re([1,0,75,65,144,2,50]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadRemoteConnectionData=void 0;let D=class extends A.Disposable{constructor(w,v,C){super();this._environmentService=v,this._proxy=w.getProxy(f.ExtHostContext.ExtHostExtensionService);const o=this._environmentService.remoteAuthority;o&&this._register(C.onDidChangeConnectionData(()=>{const c=C.getConnectionData(o);c&&this._proxy.$updateRemoteConnectionData(c)}))}};D=Ee([t.extHostCustomer,W(1,k.IWorkbenchEnvironmentService),W(2,_.IRemoteAuthorityResolverService)],D),e.MainThreadRemoteConnectionData=D}),define(ne[2356],re([1,0,9,6,2,215,65,75,959,30,12]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadSCM=void 0;class C{constructor(s,l,r,p,u,a){this.sourceControlHandle=s,this.handle=l,this.provider=r,this.features=p,this.label=u,this.id=a,this.elements=[],this._onDidSplice=new f.Emitter,this.onDidSplice=this._onDidSplice.event,this._onDidChange=new f.Emitter,this.onDidChange=this._onDidChange.event}get hideWhenEmpty(){return!!this.features.hideWhenEmpty}toJSON(){return{$mid:4,sourceControlHandle:this.sourceControlHandle,groupHandle:this.handle}}splice(s,l,r){this.elements.splice(s,l,...r),this._onDidSplice.fire({start:s,deleteCount:l,toInsert:r})}$updateGroup(s){this.features={...this.features,...s},this._onDidChange.fire()}$updateGroupLabel(s){this.label=s,this._onDidChange.fire()}}class o{constructor(s,l,r,p,u,a,n,h,g){this.proxy=s,this.sourceControlHandle=l,this.groupHandle=r,this.handle=p,this.sourceUri=u,this.resourceGroup=a,this.decorations=n,this.contextValue=h,this.command=g}open(s){return this.proxy.$executeResourceCommand(this.sourceControlHandle,this.groupHandle,this.handle,s)}toJSON(){return{$mid:3,sourceControlHandle:this.sourceControlHandle,groupHandle:this.groupHandle,handle:this.handle}}}class c{constructor(s,l,r,p,u){this.proxy=s,this._handle=l,this._contextValue=r,this._label=p,this._rootUri=u,this._id=`scm${c.ID_HANDLE++}`,this.groups=new I.Sequence,this._groupsByHandle=Object.create(null),this._onDidChangeResources=new f.Emitter,this.onDidChangeResources=this._onDidChangeResources.event,this.features={},this._onDidChangeCommitTemplate=new f.Emitter,this.onDidChangeCommitTemplate=this._onDidChangeCommitTemplate.event,this._onDidChangeStatusBarCommands=new f.Emitter,this._onDidChange=new f.Emitter,this.onDidChange=this._onDidChange.event}get id(){return this._id}get handle(){return this._handle}get label(){return this._label}get rootUri(){return this._rootUri}get contextValue(){return this._contextValue}get commitTemplate(){return this.features.commitTemplate||""}get acceptInputCommand(){return this.features.acceptInputCommand}get actionButton(){return this.features.actionButton??void 0}get statusBarCommands(){return this.features.statusBarCommands}get count(){return this.features.count}get onDidChangeStatusBarCommands(){return this._onDidChangeStatusBarCommands.event}$updateSourceControl(s){this.features={...this.features,...s},this._onDidChange.fire(),typeof s.commitTemplate!="undefined"&&this._onDidChangeCommitTemplate.fire(this.commitTemplate),typeof s.statusBarCommands!="undefined"&&this._onDidChangeStatusBarCommands.fire(this.statusBarCommands)}$registerGroups(s){const l=s.map(([r,p,u,a])=>{const n=new C(this.handle,r,this,a,u,p);return this._groupsByHandle[r]=n,n});this.groups.splice(this.groups.elements.length,0,l)}$updateGroup(s,l){const r=this._groupsByHandle[s];!r||r.$updateGroup(l)}$updateGroupLabel(s,l){const r=this._groupsByHandle[s];!r||r.$updateGroupLabel(l)}$spliceGroupResourceStates(s){for(const[l,r]of s){const p=this._groupsByHandle[l];if(!p){console.warn(`SCM group ${l} not found in provider ${this.label}`);continue}r.reverse();for(const[u,a,n]of r){const h=n.map(g=>{const[d,m,b,E,y,T,R,O]=g,[x,F]=b,L=v.ThemeIcon.isThemeIcon(x)?x:t.URI.revive(x),M=(v.ThemeIcon.isThemeIcon(F)?F:t.URI.revive(F))||L,N={icon:L,iconDark:M,tooltip:E,strikeThrough:y,faded:T};return new o(this.proxy,this.handle,l,d,t.URI.revive(m),p,N,R||void 0,O)});p.splice(u,a,h)}}this._onDidChangeResources.fire()}$unregisterGroup(s){const l=this._groupsByHandle[s];!l||(delete this._groupsByHandle[s],this.groups.splice(this.groups.elements.indexOf(l),1),this._onDidChangeResources.fire())}async getOriginalResource(s){if(!this.features.hasQuickDiffProvider)return null;const l=await this.proxy.$provideOriginalResource(this.handle,s,w.CancellationToken.None);return l&&t.URI.revive(l)}toJSON(){return{$mid:5,handle:this.handle}}dispose(){}}c.ID_HANDLE=0;let i=class{constructor(s,l,r){this.scmService=l,this.scmViewService=r,this._repositories=new Map,this._repositoryDisposables=new Map,this._disposables=new _.DisposableStore,this._proxy=s.getProxy(k.ExtHostContext.ExtHostSCM)}dispose(){(0,_.dispose)(this._repositories.values()),this._repositories.clear(),(0,_.dispose)(this._repositoryDisposables.values()),this._repositoryDisposables.clear(),this._disposables.dispose()}$registerSourceControl(s,l,r,p){const u=new c(this._proxy,s,l,r,p?t.URI.revive(p):void 0),a=this.scmService.registerSCMProvider(u);this._repositories.set(s,a);const n=(0,_.combinedDisposable)(f.Event.filter(this.scmViewService.onDidFocusRepository,h=>h===a)(h=>this._proxy.$setSelectedSourceControl(s)),a.input.onDidChange(({value:h})=>this._proxy.$onInputBoxValueChange(s,h)));this.scmViewService.focusedRepository===a&&setTimeout(()=>this._proxy.$setSelectedSourceControl(s),0),a.input.value&&setTimeout(()=>this._proxy.$onInputBoxValueChange(s,a.input.value),0),this._repositoryDisposables.set(s,n)}$updateSourceControl(s,l){const r=this._repositories.get(s);if(!r)return;r.provider.$updateSourceControl(l)}$unregisterSourceControl(s){const l=this._repositories.get(s);!l||(this._repositoryDisposables.get(s).dispose(),this._repositoryDisposables.delete(s),l.dispose(),this._repositories.delete(s))}$registerGroups(s,l,r){const p=this._repositories.get(s);if(!p)return;const u=p.provider;u.$registerGroups(l),u.$spliceGroupResourceStates(r)}$updateGroup(s,l,r){const p=this._repositories.get(s);if(!p)return;p.provider.$updateGroup(l,r)}$updateGroupLabel(s,l,r){const p=this._repositories.get(s);if(!p)return;p.provider.$updateGroupLabel(l,r)}$spliceResourceStates(s,l){const r=this._repositories.get(s);if(!r)return;r.provider.$spliceGroupResourceStates(l)}$unregisterGroup(s,l){const r=this._repositories.get(s);if(!r)return;r.provider.$unregisterGroup(l)}$setInputBoxValue(s,l){const r=this._repositories.get(s);!r||r.input.setValue(l,!1)}$setInputBoxPlaceholder(s,l){const r=this._repositories.get(s);!r||(r.input.placeholder=l)}$setInputBoxVisibility(s,l){const r=this._repositories.get(s);!r||(r.input.visible=l)}$showValidationMessage(s,l,r){const p=this._repositories.get(s);!p||p.input.showValidationMessage(l,r)}$setValidationProviderIsEnabled(s,l){const r=this._repositories.get(s);!r||(l?r.input.validateInput=async(p,u)=>{const a=await this._proxy.$validateInput(s,p,u);return a&&{message:a[0],type:a[1]}}:r.input.validateInput=async()=>{})}};i=Ee([(0,D.extHostNamedCustomer)(k.MainContext.MainThreadSCM),W(1,A.ISCMService),W(2,A.ISCMViewService)],i),e.MainThreadSCM=i}),define(ne[2357],re([1,0,2,75,349,852,65]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadSecretState=void 0;let D=class extends t.Disposable{constructor(w,v,C){super();this.credentialsService=v,this.encryptionService=C,this.secretStoragePrefix=this.credentialsService.getSecretStoragePrefix(),this._proxy=w.getProxy(k.ExtHostContext.ExtHostSecretState),this._register(this.credentialsService.onDidChangePassword(async o=>{const c=o.service.substring((await this.secretStoragePrefix).length);this._proxy.$onDidChangePassword({extensionId:c,key:o.account})}))}async getFullKey(w){return`${await this.secretStoragePrefix}${w}`}async $getPassword(w,v){const C=await this.getFullKey(w),o=await this.credentialsService.getPassword(C,v),c=o&&await this.encryptionService.decrypt(o);if(c)try{const i=JSON.parse(c);if(i.extensionId===w)return i.content}catch{throw new Error("Cannot get password")}}async $setPassword(w,v,C){const o=await this.getFullKey(w),c=JSON.stringify({extensionId:w,content:C}),i=await this.encryptionService.encrypt(c);return this.credentialsService.setPassword(o,v,i)}async $deletePassword(w,v){try{const C=await this.getFullKey(w);await this.credentialsService.deletePassword(C,v)}catch{throw new Error("Cannot delete password")}}};D=Ee([(0,f.extHostNamedCustomer)(k.MainContext.MainThreadSecretState),W(1,_.ICredentialsService),W(2,A.IEncryptionService)],D),e.MainThreadSecretState=D}),define(ne[2358],re([1,0,24,65,75,14,311,2307,5,31]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadStorage=void 0;let v=class{constructor(o,c,i,S,s){this._extensionStorageService=c,this._storageService=i,this._instantiationService=S,this._logService=s,this._sharedStorageKeysToWatch=new Map,this._proxy=o.getProxy(f.ExtHostContext.ExtHostStorage),this._storageListener=this._storageService.onDidChangeValue(l=>{const r=l.scope===0;r&&this._sharedStorageKeysToWatch.has(l.key)&&this._proxy.$acceptValue(r,l.key,this._extensionStorageService.getExtensionState(l.key,r))})}dispose(){this._storageListener.dispose()}async $initializeExtensionStorage(o,c){return await this.checkAndMigrateExtensionStorage(c,o),o&&this._sharedStorageKeysToWatch.set(c,!0),this._extensionStorageService.getExtensionState(c,o)}async $setValue(o,c,i){this._extensionStorageService.setExtensionState(c,i,o)}$registerExtensionStorageKeysToSync(o,c){this._extensionStorageService.setKeysForSync(o,c)}async checkAndMigrateExtensionStorage(o,c){try{let i=this._extensionStorageService.getSourceExtensionToMigrate(o);!i&&A.isWeb&&o!==o.toLowerCase()&&(i=o.toLowerCase()),i&&(A.isWeb&&i!==i.toLowerCase()&&this._extensionStorageService.getExtensionState(i.toLowerCase(),c)&&!this._extensionStorageService.getExtensionState(i,c)&&(i=i.toLowerCase()),await(0,D.migrateExtensionStorage)(i,o,c,this._instantiationService))}catch(i){this._logService.error(i)}}};v=Ee([(0,_.extHostNamedCustomer)(f.MainContext.MainThreadStorage),W(1,k.IExtensionStorageService),W(2,t.IStorageService),W(3,I.IInstantiationService),W(4,w.ILogService)],v),e.MainThreadStorage=v}),define(ne[2359],re([1,0,1361,9,89,13,14,143,34,273,269,75,65,218]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadTask=void 0;var i;(function(T){function R(O){return{id:O.id,task:b.from(O.task)}}T.from=R})(i||(i={}));var S;(function(T){function R(O,x){return{id:O.id,processId:x}}T.from=R})(S||(S={}));var s;(function(T){function R(O,x){return{id:O.id,exitCode:x}}T.from=R})(s||(s={}));var l;(function(T){function R(x){const F=Object.assign(Object.create(null),x);return delete F._key,F}T.from=R;function O(x,F){let L=w.TaskDefinition.createTaskIdentifier(x,console);return L===void 0&&F&&(L={_key:(0,_.generateUuid)(),type:"$executeOnly"}),L}T.to=O})(l||(l={}));var r;(function(T){function R(x){if(x!=null)return Object.assign(Object.create(null),x)}T.from=R;function O(x){return x==null?w.PresentationOptions.defaults:Object.assign(Object.create(null),w.PresentationOptions.defaults,x)}T.to=O})(r||(r={}));var p;(function(T){function R(x){if(x!=null)return Object.assign(Object.create(null),x)}T.from=R;function O(x){return x==null?w.RunOptions.defaults:Object.assign(Object.create(null),w.RunOptions.defaults,x)}T.to=O})(p||(p={}));var u;(function(T){function R(x){if(x!=null)return{cwd:x.cwd,env:x.env}}T.from=R;function O(x){return x==null?w.CommandOptions.defaults:{cwd:x.cwd||w.CommandOptions.defaults.cwd,env:x.env}}T.to=O})(u||(u={}));var a;(function(T){function R(F){const L=F;return L&&!!L.process}T.is=R;function O(F){const L=A.isString(F.name)?F.name:F.name.value,M=F.args?F.args.map(B=>A.isString(B)?B:B.value):[],N={process:L,args:M};return F.options&&(N.options=u.from(F.options)),N}T.from=O;function x(F){const L={runtime:w.RuntimeType.Process,name:F.process,args:F.args,presentation:void 0};return L.options=u.to(F.options),L}T.to=x})(a||(a={}));var n;(function(T){function R(x){if(x==null)return;const F={cwd:x.cwd||w.CommandOptions.defaults.cwd,env:x.env};return x.shell&&(F.executable=x.shell.executable,F.shellArgs=x.shell.args,F.shellQuoting=x.shell.quoting),F}T.from=R;function O(x){if(x==null)return;const F={cwd:x.cwd,env:x.env};return x.executable&&(F.shell={executable:x.executable},x.shellArgs&&(F.shell.args=x.shellArgs),x.shellQuoting&&(F.shell.quoting=x.shellQuoting)),F}T.to=O})(n||(n={}));var h;(function(T){function R(F){const L=F;return L&&(!!L.commandLine||!!L.command)}T.is=R;function O(F){const L={};return F.name&&A.isString(F.name)&&(F.args===void 0||F.args===null||F.args.length===0)?L.commandLine=F.name:(L.command=F.name,L.args=F.args),F.options&&(L.options=n.from(F.options)),L}T.from=O;function x(F){const L={runtime:w.RuntimeType.Shell,name:F.commandLine?F.commandLine:F.command,args:F.args,presentation:void 0};return F.options&&(L.options=n.to(F.options)),L}T.to=x})(h||(h={}));var g;(function(T){function R(F){const L=F;return L&&L.customExecution==="customExecution"}T.is=R;function O(F){return{customExecution:"customExecution"}}T.from=O;function x(F){return{runtime:w.RuntimeType.CustomExecution,presentation:void 0}}T.to=x})(g||(g={}));var d;(function(T){function R(x){const F={label:x.label};return x.kind===w.TaskSourceKind.Extension?(F.extensionId=x.extension,x.workspaceFolder?F.scope=x.workspaceFolder.uri:F.scope=x.scope):x.kind===w.TaskSourceKind.Workspace&&(F.extensionId="$core",F.scope=x.config.workspaceFolder?x.config.workspaceFolder.uri:1),F}T.from=R;function O(x,F){let L,M;return x.scope===void 0||typeof x.scope=="number"&&x.scope!==1?F.getWorkspace().folders.length===0?(L=1,M=void 0):(L=3,M=F.getWorkspace().folders[0]):typeof x.scope=="number"?L=x.scope:(L=3,M=A.withNullAsUndefined(F.getWorkspaceFolder(f.URI.revive(x.scope)))),{kind:w.TaskSourceKind.Extension,label:x.label,extension:x.extensionId,scope:L,workspaceFolder:M}}T.to=O})(d||(d={}));var m;(function(T){function R(O){const x=O;return x&&A.isString(x.id)&&!!x.workspaceFolder}T.is=R})(m||(m={}));var b;(function(T){function R(x){if(x==null||!w.CustomTask.is(x)&&!w.ContributedTask.is(x)&&!w.ConfiguringTask.is(x))return;const F={_id:x._id,name:x.configurationProperties.name,definition:l.from(x.getDefinition(!0)),source:d.from(x._source),execution:void 0,presentationOptions:!w.ConfiguringTask.is(x)&&x.command?r.from(x.command.presentation):void 0,isBackground:x.configurationProperties.isBackground,problemMatchers:[],hasDefinedMatchers:w.ContributedTask.is(x)?x.hasDefinedMatchers:!1,runOptions:p.from(x.runOptions)};if(F.group=w.TaskGroup.from(x.configurationProperties.group),x.configurationProperties.detail&&(F.detail=x.configurationProperties.detail),!w.ConfiguringTask.is(x)&&x.command)switch(x.command.runtime){case w.RuntimeType.Process:F.execution=a.from(x.command);break;case w.RuntimeType.Shell:F.execution=h.from(x.command);break;case w.RuntimeType.CustomExecution:F.execution=g.from(x.command);break}if(x.configurationProperties.problemMatchers)for(let L of x.configurationProperties.problemMatchers)A.isString(L)&&F.problemMatchers.push(L);return F}T.from=R;function O(x,F,L){if(!x||typeof x.name!="string")return;let M;if(x.execution&&(h.is(x.execution)?M=h.to(x.execution):a.is(x.execution)?M=a.to(x.execution):g.is(x.execution)&&(M=g.to(x.execution))),!M)return;M.presentation=r.to(x.presentationOptions);const N=d.to(x.source,F),B=t.localize(0,null,N.label,x.name),P=l.to(x.definition,L),V=g.is(x.execution)&&x._id?x._id:`${x.source.extensionId}.${P._key}`;return new w.ContributedTask(V,N,B,P.type,P,M,x.hasDefinedMatchers,p.to(x.runOptions),{name:x.name,identifier:B,group:x.group,isBackground:!!x.isBackground,problemMatchers:x.problemMatchers.slice(),detail:x.detail})}T.to=O})(b||(b={}));var E;(function(T){function R(x){return x}T.from=R;function O(x){return x}T.to=O})(E||(E={}));let y=class{constructor(R,O,x,F){this._taskService=O,this._workspaceContextServer=x,this._configurationResolverService=F,this._proxy=R.getProxy(o.ExtHostContext.ExtHostTask),this._providers=new Map,this._taskService.onDidStateChange(async L=>{const M=L.__task;if(L.kind==="start"){const N=i.from(M.getTaskExecution());let B=N.task.definition;if(N.task?.execution&&g.is(N.task.execution)&&L.resolvedVariables){const P={};Array.from(L.resolvedVariables.entries()).forEach(V=>P[V[0]]=V[1]),B=await this._configurationResolverService.resolveAnyAsync(M.getWorkspaceFolder(),N.task.definition,P)}this._proxy.$onDidStartTask(N,L.terminalId,B)}else L.kind==="processStarted"?this._proxy.$onDidStartTaskProcess(S.from(M.getTaskExecution(),L.processId)):L.kind==="processEnded"?this._proxy.$onDidEndTaskProcess(s.from(M.getTaskExecution(),L.exitCode)):L.kind==="end"&&this._proxy.$OnDidEndTask(i.from(M.getTaskExecution()))})}dispose(){this._providers.forEach(R=>{R.disposable.dispose()}),this._providers.clear()}$createTaskId(R){return new Promise((O,x)=>{let F=b.to(R,this._workspaceContextServer,!0);F?O(F._id):x(new Error("Task could not be created from DTO"))})}$registerTaskProvider(R,O){const x={provideTasks:L=>Promise.resolve(this._proxy.$provideTasks(R,L)).then(M=>{const N=[];for(let B of M.tasks){const P=b.to(B,this._workspaceContextServer,!0);P?N.push(P):console.error(`Task System: can not convert task: ${JSON.stringify(B.definition,void 0,0)}. Task will be dropped`)}return{tasks:N,extension:M.extension}}),resolveTask:L=>{const M=b.from(L);return M?(M.name=M.name===void 0?"":M.name,Promise.resolve(this._proxy.$resolveTask(R,M)).then(N=>{if(N)return b.to(N,this._workspaceContextServer,!0)})):Promise.resolve(void 0)}},F=this._taskService.registerTaskProvider(x,O);return this._providers.set(R,{disposable:F,provider:x}),Promise.resolve(void 0)}$unregisterTaskProvider(R){const O=this._providers.get(R);return O&&(O.disposable.dispose(),this._providers.delete(R)),Promise.resolve(void 0)}$fetchTasks(R){return this._taskService.tasks(E.to(R)).then(O=>{const x=[];for(let F of O){const L=b.from(F);L&&x.push(L)}return x})}getWorkspace(R){let O;if(typeof R=="string")O=R;else{const x=this._workspaceContextServer.getWorkspace(),F=f.URI.revive(R);x.configuration?.toString()===F.toString()?O=x:O=this._workspaceContextServer.getWorkspaceFolder(F)}return O}async $getTaskExecution(R){if(m.is(R)){const O=this.getWorkspace(R.workspaceFolder);if(O){const x=await this._taskService.getTask(O,R.id,!0);if(x)return{id:x._id,task:b.from(x)};throw new Error("Task not found")}else throw new Error("No workspace folder")}else{const O=b.to(R,this._workspaceContextServer,!0);return{id:O._id,task:b.from(O)}}}$executeTask(R){return new Promise((O,x)=>{if(m.is(R)){const F=this.getWorkspace(R.workspaceFolder);F?this._taskService.getTask(F,R.id,!0).then(L=>{if(!L)x(new Error("Task not found"));else{const M={id:R.id,task:b.from(L)};this._taskService.run(L).then(N=>{(N?.exitCode===void 0||N.exitCode!==0)&&this._proxy.$OnDidEndTask(M)},N=>{}),O(M)}},L=>{x(new Error("Task not found"))}):x(new Error("No workspace folder"))}else{const F=b.to(R,this._workspaceContextServer,!0);this._taskService.run(F).then(void 0,M=>{});const L={id:F._id,task:b.from(F)};O(L)}})}$customExecutionComplete(R,O){return new Promise((x,F)=>{this._taskService.getActiveTasks().then(L=>{for(let M of L)if(R===M._id){this._taskService.extensionCallbackTaskComplete(M,O).then(N=>{x(void 0)},N=>{F(N)});return}F(new Error("Task to mark as complete not found"))})})}$terminateTask(R){return new Promise((O,x)=>{this._taskService.getActiveTasks().then(F=>{for(let L of F)if(R===L._id){this._taskService.terminate(L).then(M=>{O(void 0)},M=>{x(void 0)});return}x(new Error("Task to terminate not found"))})})}$registerTaskSystem(R,O){let x;switch(O.platform){case"Web":x=0;break;case"win32":x=3;break;case"darwin":x=1;break;case"linux":x=2;break;default:x=k.platform}this._taskService.registerTaskSystem(R,{platform:x,uriProvider:F=>f.URI.from({scheme:O.scheme,authority:O.authority,path:F}),context:this._extHostContext,resolveVariables:(F,L,M)=>{const N=[];return L.variables.forEach(B=>N.push(B)),Promise.resolve(this._proxy.$resolveVariables(F.uri,{process:L.process,variables:N})).then(B=>{const P=new Array;return(0,D.forEach)(B.variables,V=>{P.push(V.value)}),new Promise((V,z)=>{this._configurationResolverService.resolveWithInteraction(F,P,"tasks",void 0,M).then(U=>{U||V(void 0);const H={process:void 0,variables:new Map};for(let K=0;K<P.length;K++){const G=N[K].substring(2,N[K].length-1);if(U&&B.variables[N[K]]===N[K]){const q=U.get(G);typeof q=="string"&&H.variables.set(G,q)}else H.variables.set(G,P[K])}A.isString(B.process)&&(H.process=B.process),V(H)},U=>{z(U)})})})},findExecutable:(F,L,M)=>this._proxy.$findExecutable(F,L,M)})}async $registerSupportedExecutions(R,O,x){return this._taskService.registerSupportedExecutions(R,O,x)}};y=Ee([(0,C.extHostNamedCustomer)(o.MainContext.MainThreadTask),W(1,v.ITaskService),W(2,I.IWorkspaceContextService),W(3,c.IConfigurationResolverService)],y),e.MainThreadTask=y}),define(ne[2360],re([1,0,27,65,75,2,8,85,46,199]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";var v;Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadTelemetry=void 0;let C=v=class extends A.Disposable{constructor(c,i,S,s,l){super();this._telemetryService=i,this._configurationService=S,this._environmentService=s,this._productService=l,this._proxy=c.getProxy(f.ExtHostContext.ExtHostTelemetry),(0,w.supportsTelemetry)(this._productService,this._environmentService)&&this._register(this._configurationService.onDidChangeConfiguration(r=>{(r.affectsConfiguration(t.TELEMETRY_SETTING_ID)||r.affectsConfiguration(t.TELEMETRY_OLD_SETTING_ID))&&this._proxy.$onDidChangeTelemetryLevel(this.telemetryLevel)})),this._proxy.$initializeTelemetryLevel(this.telemetryLevel,this._productService.enabledTelemetryLevels)}get telemetryLevel(){return(0,w.supportsTelemetry)(this._productService,this._environmentService)?(0,w.getTelemetryLevel)(this._configurationService):0}$publicLog(c,i=Object.create(null)){i[v._name]=!0,this._telemetryService.publicLog(c,i)}$publicLog2(c,i){this.$publicLog(c,i)}};C._name="pluginHostTelemetry",C=v=Ee([(0,_.extHostNamedCustomer)(f.MainContext.MainThreadTelemetry),W(1,t.ITelemetryService),W(2,k.IConfigurationService),W(3,D.IEnvironmentService),W(4,I.IProductService)],C),e.MainThreadTelemetry=C}),define(ne[2361],re([1,0,2,180,13,9,20,362,329,2234,251,419,216,250,75,65]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadTesting=void 0;let s=class extends t.Disposable{constructor(r,p,u,a){super();this.testService=p,this.testProfiles=u,this.resultService=a,this.diffListener=this._register(new t.MutableDisposable),this.testProviderRegistrations=new Map,this.proxy=r.getProxy(S.ExtHostContext.ExtHostTesting);const n=a.results.map(h=>h.toJSON()).filter(_.isDefined);n.length&&this.proxy.$publishTestResults(n),this._register(this.testService.onDidCancelTestRun(({runId:h})=>{this.proxy.$cancelExtensionTestRun(h)})),this._register(a.onResultsChanged(h=>{const d=("completed"in h?h.completed:"inserted"in h?h.inserted:void 0)?.toJSON();d&&this.proxy.$publishTestResults([d])}))}$publishTestRunProfile(r){const p=this.testProviderRegistrations.get(r.controllerId);p&&this.testProfiles.addProfile(p.instance,r)}$updateTestRunConfig(r,p,u){this.testProfiles.updateProfile(r,p,u)}$removeTestProfile(r,p){this.testProfiles.removeProfile(r,p)}$addTestsToRun(r,p,u){this.withLiveRun(p,a=>a.addTestChainToRun(r,u.map(I.ITestItem.deserialize)))}$signalCoverageAvailable(r,p){this.withLiveRun(r,u=>{const a=u.tasks.find(n=>n.id===p);!a||(a.coverage.value=new w.TestCoverage({provideFileCoverage:async n=>(0,f.revive)(await this.proxy.$provideFileCoverage(r,p,n)),resolveFileCoverage:(n,h)=>this.proxy.$resolveFileCoverage(r,p,n,h)}))})}$startedExtensionTestRun(r){this.resultService.createLiveResult(r)}$startedTestRunTask(r,p){this.withLiveRun(r,u=>u.addTask(p))}$finishedTestRunTask(r,p){this.withLiveRun(r,u=>u.markTaskComplete(p))}$finishedExtensionTestRun(r){this.withLiveRun(r,p=>p.markComplete())}$updateTestStateInRun(r,p,u,a,n){this.withLiveRun(r,h=>h.updateState(u,p,a,n))}$appendOutputToRun(r,p,u,a,n){const h=a&&{uri:A.URI.revive(a.uri),range:k.Range.lift(a.range)};this.withLiveRun(r,g=>g.appendOutput(u,p,h,n))}$appendTestMessagesInRun(r,p,u,a){const n=this.resultService.getResult(r);if(n&&n instanceof C.LiveTestResult)for(const h of a)n.appendMessage(u,p,I.ITestMessage.deserialize(h))}$registerTestController(r,p,u){const a=new t.DisposableStore,n=a.add(new D.MutableObservableValue(p)),h=a.add(new D.MutableObservableValue(u)),g={id:r,label:n,canRefresh:h,refreshTests:d=>this.proxy.$refreshTests(r,d),configureRunProfile:d=>this.proxy.$configureRunProfile(r,d),runTests:(d,m)=>this.proxy.$runControllerTests(d,m),expandTest:(d,m)=>this.proxy.$expandTest(d,isFinite(m)?m:-1)};a.add((0,t.toDisposable)(()=>this.testProfiles.removeProfile(r))),a.add(this.testService.registerTestController(r,g)),this.testProviderRegistrations.set(r,{instance:g,label:n,canRefresh:h,disposable:a})}$updateController(r,p){const u=this.testProviderRegistrations.get(r);!u||(p.label!==void 0&&(u.label.value=p.label),p.canRefresh!==void 0&&(u.canRefresh.value=p.canRefresh))}$unregisterTestController(r){this.testProviderRegistrations.get(r)?.disposable.dispose(),this.testProviderRegistrations.delete(r)}$subscribeToDiffs(){this.proxy.$acceptDiff(this.testService.collection.getReviverDiff().map(I.TestsDiffOp.serialize)),this.diffListener.value=this.testService.onDidProcessDiff(this.proxy.$acceptDiff,this.proxy)}$unsubscribeFromDiffs(){this.diffListener.clear()}$publishDiff(r,p){this.testService.publishDiff(r,p.map(I.TestsDiffOp.deserialize))}async $runTests(r,p){return(await this.testService.runResolvedTests(r,p)).id}dispose(){super.dispose();for(const r of this.testProviderRegistrations.values())r.disposable.dispose();this.testProviderRegistrations.clear()}withLiveRun(r,p){const u=this.resultService.getResult(r);return u&&u instanceof C.LiveTestResult?p(u):void 0}};s=Ee([(0,i.extHostNamedCustomer)(S.MainContext.MainThreadTesting),W(1,c.ITestService),W(2,v.ITestProfileService),W(3,o.ITestResultService)],s),e.MainThreadTesting=s}),define(ne[2362],re([1,0,65,75,12]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadTheming=void 0;let A=class{constructor(D,I){this._themeService=I,this._proxy=D.getProxy(t.ExtHostContext.ExtHostTheming),this._themeChangeListener=this._themeService.onDidColorThemeChange(w=>{this._proxy.$onColorThemeChange(this._themeService.getColorTheme().type)}),this._proxy.$onColorThemeChange(this._themeService.getColorTheme().type)}dispose(){this._themeChangeListener.dispose()}};A=Ee([(0,f.extHostNamedCustomer)(t.MainContext.MainThreadTheming),W(1,_.IThemeService)],A),e.MainThreadTheming=A}),define(ne[2363],re([1,0,6,31,65,75,420,180]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadTimeline=void 0;let I=class{constructor(v,C,o){this.logService=C,this._timelineService=o,this._providerEmitters=new Map,this._proxy=v.getProxy(_.ExtHostContext.ExtHostTimeline)}$registerTimelineProvider(v){this.logService.trace(`MainThreadTimeline#registerTimelineProvider: id=${v.id}`);const C=this._proxy,o=this._providerEmitters;let c=o.get(v.id);c===void 0&&(c=new t.Emitter,o.set(v.id,c)),this._timelineService.registerTimelineProvider({...v,onDidChange:c.event,async provideTimeline(i,S,s,l){return(0,D.revive)(await C.$getTimeline(v.id,i,S,s,l))},dispose(){o.delete(v.id),c?.dispose()}})}$unregisterTimelineProvider(v){this.logService.trace(`MainThreadTimeline#unregisterTimelineProvider: id=${v}`),this._timelineService.unregisterTimelineProvider(v)}$emitTimelineChangeEvent(v){this.logService.trace(`MainThreadTimeline#emitChangeEvent: id=${v.id}, uri=${v.uri?.toString(!0)}`),this._providerEmitters.get(v.id)?.fire(v)}dispose(){}};I=Ee([(0,A.extHostNamedCustomer)(_.MainContext.MainThreadTimeline),W(1,f.ILogService),W(2,k.ITimelineService)],I),e.MainThreadTimeline=I}),define(ne[2364],re([1,0,2,65,43,75,15,26,13,17,40,31,774]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadTreeViews=void 0;let c=class extends t.Disposable{constructor(l,r,p,u,a){super();this.viewsService=r,this.notificationService=p,this.extensionService=u,this.logService=a,this._dataProviders=new Map,this._proxy=l.getProxy(f.ExtHostContext.ExtHostTreeViews)}async $registerTreeViewDataProvider(l,r){this.logService.trace("MainThreadTreeViews#$registerTreeViewDataProvider",l,r),this.extensionService.whenInstalledExtensionsRegistered().then(()=>{const p=new S(l,this._proxy,this.notificationService);this._dataProviders.set(l,p);const u=r.hasHandleDrag||r.hasHandleDrop?new i(l,r.dropMimeTypes,r.dragMimeTypes,r.hasHandleDrag,this._proxy):void 0,a=this.getTreeView(l);a?(a.showCollapseAllAction=!!r.showCollapseAll,a.canSelectMany=!!r.canSelectMany,a.dragAndDropController=u,a.dataProvider=p,this.registerListeners(l,a),this._proxy.$setVisible(l,a.visible)):this.notificationService.error("No view is registered with id: "+l)})}$reveal(l,r,p){return this.logService.trace("MainThreadTreeViews#$reveal",l,r?.item,r?.parentChain,p),this.viewsService.openView(l,p.focus).then(()=>{const u=this.getTreeView(l);if(u&&r)return this.reveal(u,this._dataProviders.get(l),r.item,r.parentChain,p)})}$refresh(l,r){this.logService.trace("MainThreadTreeViews#$refresh",l,r);const p=this.getTreeView(l),u=this._dataProviders.get(l);if(p&&u){const a=u.getItemsToRefresh(r);return p.refresh(a.length?a:void 0)}return Promise.resolve()}$setMessage(l,r){this.logService.trace("MainThreadTreeViews#$setMessage",l,r);const p=this.getTreeView(l);p&&(p.message=r)}$setTitle(l,r,p){this.logService.trace("MainThreadTreeViews#$setTitle",l,r,p);const u=this.getTreeView(l);u&&(u.title=r,u.description=p)}async reveal(l,r,p,u,a){a=a||{select:!1,focus:!1};const n=(0,I.isUndefinedOrNull)(a.select)?!1:a.select,h=(0,I.isUndefinedOrNull)(a.focus)?!1:a.focus;let g=Math.min((0,I.isNumber)(a.expand)?a.expand:a.expand===!0?1:0,3);r.isEmpty()&&await l.refresh();for(const m of u){const b=r.getItem(m.handle);b&&await l.expand(b)}const d=r.getItem(p.handle);if(d){await l.reveal(d),n&&l.setSelection([d]),h&&l.setFocus(d);let m=[d];for(;m.length>0&&g>0;g--)await l.expand(m),m=m.reduce((b,E)=>{const y=r.getItem(E.handle);return y&&y.children&&y.children.length&&b.push(...y.children),b},[])}}registerListeners(l,r){this._register(r.onDidExpandItem(p=>this._proxy.$setExpanded(l,p.handle,!0))),this._register(r.onDidCollapseItem(p=>this._proxy.$setExpanded(l,p.handle,!1))),this._register(r.onDidChangeSelection(p=>this._proxy.$setSelection(l,p.map(({handle:u})=>u)))),this._register(r.onDidChangeVisibility(p=>this._proxy.$setVisible(l,p)))}getTreeView(l){const r=w.Registry.as(_.Extensions.ViewsRegistry).getView(l);return r?r.treeView:null}dispose(){this._dataProviders.forEach((l,r)=>{const p=this.getTreeView(r);p&&(p.dataProvider=void 0)}),this._dataProviders.clear(),super.dispose()}};c=Ee([(0,A.extHostNamedCustomer)(f.MainContext.MainThreadTreeViews),W(1,_.IViewsService),W(2,D.INotificationService),W(3,v.IExtensionService),W(4,C.ILogService)],c),e.MainThreadTreeViews=c;class i{constructor(l,r,p,u,a){this.treeViewId=l,this.dropMimeTypes=r,this.dragMimeTypes=p,this.hasWillDrop=u,this._proxy=a}async handleDrop(l,r,p,u,a,n){return this._proxy.$handleDrop(this.treeViewId,await o.DataTransferConverter.toDataTransferDTO(l),r?.handle,p,u,a,n)}async handleDrag(l,r,p){if(!this.hasWillDrop)return;const u=await this._proxy.$handleDrag(this.treeViewId,l,r,p);if(!!u)return o.DataTransferConverter.toDataTransfer(u)}}class S{constructor(l,r,p){this.treeViewId=l,this._proxy=r,this.notificationService=p,this.itemsMap=new Map,this.hasResolve=this._proxy.$hasResolve(this.treeViewId)}getChildren(l){return this._proxy.$getChildren(this.treeViewId,l?l.handle:void 0).then(r=>this.postGetChildren(r),r=>(this.notificationService.error(r),[]))}getItemsToRefresh(l){const r=[];if(l)for(const p of Object.keys(l)){const u=this.getItem(p);if(u){const a=l[p];if(this.updateTreeItem(u,a),p===a.handle)r.push(u);else{this.itemsMap.delete(p),this.itemsMap.set(u.handle,u);const n=a.parentHandle?this.itemsMap.get(a.parentHandle):null;n&&r.push(n)}}}return r}getItem(l){return this.itemsMap.get(l)}isEmpty(){return this.itemsMap.size===0}async postGetChildren(l){if(l===void 0)return;const r=[],p=await this.hasResolve;if(l)for(const u of l){const a=new _.ResolvableTreeItem(u,p?n=>this._proxy.$resolve(this.treeViewId,u.handle,n):void 0);this.itemsMap.set(u.handle,a),r.push(a)}return r}updateTreeItem(l,r){if(r.children=r.children?r.children:void 0,l){const p=(0,k.distinct)([...Object.keys(l instanceof _.ResolvableTreeItem?l.asTreeItem():l),...Object.keys(r)]);for(const u of p)l[u]=r[u];l instanceof _.ResolvableTreeItem&&l.resetResolve()}}}}),define(ne[422],re([1,0,2,18,14,29,9,1364,41,46,65,2114,331]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.reviveWebviewContentOptions=e.reviveWebviewExtension=e.MainThreadWebviews=void 0;let c=class Vo extends t.Disposable{constructor(l,r,p){super();this._openerService=r,this._productService=p,this._webviews=new Map,this._proxy=l.getProxy(v.ExtHostContext.ExtHostWebviews)}addWebview(l,r,p){if(this._webviews.has(l))throw new Error("Webview already registered");this._webviews.set(l,r),this.hookupWebviewEventDelegate(l,r,p)}$setHtml(l,r){const p=this.getWebview(l);p.html=r}$setOptions(l,r){const p=this.getWebview(l);p.contentOptions=S(r)}async $postMessage(l,r,...p){const u=this.getWebview(l),{message:a,arrayBuffers:n}=(0,C.deserializeWebviewMessage)(r,p);return u.postMessage(a,n),!0}hookupWebviewEventDelegate(l,r,p){const u=new t.DisposableStore;u.add(r.onDidClickLink(a=>this.onDidClickLink(l,a))),u.add(r.onMessage(a=>{const n=(0,C.serializeWebviewMessage)(a.message,p);this._proxy.$onMessage(l,n.message,new o.SerializableObjectWithBuffers(n.buffers))})),u.add(r.onMissingCsp(a=>this._proxy.$onMissingCsp(l,a.value))),u.add(r.onDidDispose(()=>{u.dispose(),this._webviews.delete(l)}))}onDidClickLink(l,r){const p=this.getWebview(l);this.isSupportedLink(p,k.URI.parse(r))&&this._openerService.open(r,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:!0})}isSupportedLink(l,r){return Vo.standardSupportedLinkSchemes.has(r.scheme)||!_.isWeb&&this._productService.urlProtocol===r.scheme?!0:!!l.contentOptions.enableCommandUris&&r.scheme===f.Schemas.command}getWebview(l){const r=this._webviews.get(l);if(!r)throw new Error(`Unknown webview handle:${l}`);return r}getWebviewResolvedFailedContent(l){return`<!DOCTYPE html> <html> <head> <meta http-equiv="Content-type" content="text/html;charset=UTF-8"> <meta http-equiv="Content-Security-Policy" content="default-src 'none';"> </head> <body>${(0,D.localize)(0,null,(0,A.escape)(l))}</body> </html>`}};c.standardSupportedLinkSchemes=new Set([f.Schemas.http,f.Schemas.https,f.Schemas.mailto,f.Schemas.vscode,"vscode-insider"]),c=Ee([W(1,I.IOpenerService),W(2,w.IProductService)],c),e.MainThreadWebviews=c;function i(s){return{id:s.id,location:k.URI.revive(s.location)}}e.reviveWebviewExtension=i;function S(s){return{allowScripts:s.enableScripts,allowForms:s.enableForms,enableCommandUris:s.enableCommandUris,localResourceRoots:Array.isArray(s.localResourceRoots)?s.localResourceRoots.map(l=>k.URI.revive(l)):void 0,portMapping:s.portMapping}}e.reviveWebviewContentOptions=S}),define(ne[2365],re([1,0,2,19,9,72,422,65,202,75]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadEditorInsets=void 0;class v{constructor(c,i,S,s){this.editor=c,this.line=i,this.height=S,this.webview=s,this.domNode=document.createElement("div"),this.domNode.style.zIndex="10",this.afterLineNumber=i,this.afterColumn=1,this.heightInLines=S,c.changeViewZones(l=>this._id=l.addZone(this)),s.mountTo(this.domNode)}dispose(){this.editor.changeViewZones(c=>this._id&&c.removeZone(this._id))}}let C=class{constructor(c,i,S){this._editorService=i,this._webviewService=S,this._disposables=new t.DisposableStore,this._insets=new Map,this._proxy=c.getProxy(D.ExtHostContext.ExtHostEditorInsets)}dispose(){this._disposables.dispose()}async $createEditorInset(c,i,S,s,l,r,p,u){let a;i=i.substr(0,i.indexOf(","));for(const m of this._editorService.listCodeEditors())if(m.getId()===i&&m.hasModel()&&(0,f.isEqual)(m.getModel().uri,_.URI.revive(S))){a=m;break}if(!a){setTimeout(()=>this._proxy.$onDidDispose(c));return}const n=new t.DisposableStore,h=this._webviewService.createWebviewElement("mainThreadCodeInsets_"+c,{enableFindWidget:!1},(0,k.reviveWebviewContentOptions)(r),{id:p,location:_.URI.revive(u)}),g=new v(a,s,l,h),d=()=>{n.dispose(),this._proxy.$onDidDispose(c),this._insets.delete(c)};n.add(a.onDidChangeModel(d)),n.add(a.onDidDispose(d)),n.add(g),n.add(h),n.add(h.onMessage(m=>this._proxy.$onDidReceiveMessage(c,m.message))),this._insets.set(c,g)}$disposeEditorInset(c){const i=this.getInset(c);this._insets.delete(c),i.dispose()}$setHtml(c,i){const S=this.getInset(c);S.webview.html=i}$setOptions(c,i){const S=this.getInset(c);S.webview.contentOptions=(0,k.reviveWebviewContentOptions)(i)}async $postMessage(c,i){return this.getInset(c).webview.postMessage(i),!0}getInset(c){const i=this._insets.get(c);if(!i)throw new Error("Unknown inset");return i}};C=Ee([(0,w.extHostNamedCustomer)(D.MainContext.MainThreadEditorInsets),W(1,A.ICodeEditorService),W(2,I.IWebviewService)],C),e.MainThreadEditorInsets=C}),define(ne[2366],re([1,0,22,2,422,65,599]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadWebviewsViews=void 0;let D=class extends f.Disposable{constructor(w,v,C){super();this.mainThreadWebviews=v,this._webviewViewService=C,this._webviewViews=new Map,this._webviewViewProviders=new Map,this._proxy=w.getProxy(A.ExtHostContext.ExtHostWebviewViews)}dispose(){super.dispose(),(0,f.dispose)(this._webviewViewProviders.values()),this._webviewViewProviders.clear(),(0,f.dispose)(this._webviewViews.values())}$setWebviewViewTitle(w,v){const C=this.getWebviewView(w);C.title=v}$setWebviewViewDescription(w,v){const C=this.getWebviewView(w);C.description=v}$show(w,v){this.getWebviewView(w).show(v)}$registerWebviewViewProvider(w,v,C){if(this._webviewViewProviders.has(v))throw new Error(`View provider for ${v} already registered`);const o=(0,_.reviveWebviewExtension)(w),c=this._webviewViewService.register(v,{resolve:async(i,S)=>{const s=i.webview.id;this._webviewViews.set(s,i),this.mainThreadWebviews.addWebview(s,i.webview,{serializeBuffersForPostMessage:C.serializeBuffersForPostMessage});let l;if(i.webview.state)try{l=JSON.parse(i.webview.state)}catch(r){console.error("Could not load webview state",r,i.webview.state)}i.webview.extension=o,C&&(i.webview.options=C),i.onDidChangeVisibility(r=>{this._proxy.$onDidChangeWebviewViewVisibility(s,r)}),i.onDispose(()=>{this._proxy.$disposeWebviewView(s),this._webviewViews.delete(s)});try{await this._proxy.$resolveWebviewView(s,v,i.title,l,S)}catch(r){(0,t.onUnexpectedError)(r),i.webview.html=this.mainThreadWebviews.getWebviewResolvedFailedContent(v)}}});this._webviewViewProviders.set(v,c)}$unregisterWebviewViewProvider(w){const v=this._webviewViewProviders.get(w);if(!v)throw new Error(`No view provider for ${w} registered`);v.dispose(),this._webviewViewProviders.delete(w)}getWebviewView(w){const v=this._webviewViews.get(w);if(!v)throw new Error("unknown webview view");return v}};D=Ee([W(2,k.IWebviewViewService)],D),e.MainThreadWebviewsViews=D}),define(ne[869],re([1,0,516]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.logRemoteEntryIfError=e.logRemoteEntry=void 0;function f(A,k,D=null){const I=(0,t.parse)(k).args;let w=I.shift();if(typeof w=="string")switch(k.severity||(k.severity="info"),D&&(/^\[/.test(D)||(D=`[${D}]`),/ $/.test(D)||(D=`${D} `),w=D+w),k.severity){case"log":case"info":A.info(w,...I);break;case"warn":A.warn(w,...I);break;case"error":A.error(w,...I);break}}e.logRemoteEntry=f;function _(A,k,D){const I=(0,t.parse)(k).args,w=I.shift();typeof w!="string"||k.severity!=="error"||(/^\[/.test(D)||(D=`[${D}]`),/ $/.test(D)||(D=`${D} `),A.error(D+w,...I))}e.logRemoteEntryIfError=_}),define(ne[2367],re([1,0,75,65,85,516,869,501,31]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadConsole=void 0;let w=class{constructor(C,o,c){this._environmentService=o,this._logService=c;const i=(0,D.parseExtensionDevOptions)(this._environmentService);this._isExtensionDevTestFromCli=i.isExtensionDevTestFromCli}dispose(){}$logExtensionHostMessage(C){this._isExtensionDevTestFromCli?(0,k.logRemoteEntry)(this._logService,C):((0,k.logRemoteEntryIfError)(this._logService,C,"Extension Host"),(0,A.log)(C,"Extension Host"))}};w=Ee([(0,t.extHostNamedCustomer)(f.MainContext.MainThreadConsole),W(1,_.IEnvironmentService),W(2,I.ILogService)],w),e.MainThreadConsole=w}),define(ne[2368],re([1,0,11,60,30,22,6,2,654,2332,331]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";var C;Object.defineProperty(e,"__esModule",{value:!0}),e.RPCProtocol=e.ResponsiveState=e.RequestInitiator=e.parseJsonAndRestoreBufferRefs=e.stringifyJsonWithBufferRefs=void 0;function o(R,O){try{return JSON.stringify(R,O)}catch{return"null"}}const c="$$ref$$",i={[c]:-1};class S{constructor(O,x){this.jsonString=O,this.referencedBuffers=x}}function s(R,O=null,x=!1){const F=[];return{jsonString:(x?o:JSON.stringify)(R,(M,N)=>{if(typeof N=="undefined")return i;if(typeof N=="object"){if(N instanceof f.VSBuffer){const B=F.push(N)-1;return{[c]:B}}if(O)return O(M,N)}return N}),referencedBuffers:F}}e.stringifyJsonWithBufferRefs=s;function l(R,O,x){return JSON.parse(R,(F,L)=>{if(L){const M=L[c];if(typeof M=="number")return O[M];if(x&&L.$mid===1)return x.transformIncoming(L)}return L})}e.parseJsonAndRestoreBufferRefs=l;function r(R,O){return JSON.stringify(R,O)}function p(R){return R?(O,x)=>x&&x.$mid===1?R.transformOutgoing(x):x:null}var u;(function(R){R[R.LocalSide=0]="LocalSide",R[R.OtherSide=1]="OtherSide"})(u=e.RequestInitiator||(e.RequestInitiator={}));var a;(function(R){R[R.Responsive=0]="Responsive",R[R.Unresponsive=1]="Unresponsive"})(a=e.ResponsiveState||(e.ResponsiveState={}));const n=()=>{},h=Symbol.for("rpcProtocol"),g=Symbol.for("rpcProxy");class d extends D.Disposable{constructor(O,x=null,F=null){super();this[C]=!0,this._onDidChangeResponsiveState=this._register(new k.Emitter),this.onDidChangeResponsiveState=this._onDidChangeResponsiveState.event,this._protocol=O,this._logger=x,this._uriTransformer=F,this._uriReplacer=p(this._uriTransformer),this._isDisposed=!1,this._locals=[],this._proxies=[];for(let L=0,M=v.ProxyIdentifier.count;L<M;L++)this._locals[L]=null,this._proxies[L]=null;this._lastMessageId=0,this._cancelInvokedHandlers=Object.create(null),this._pendingRPCReplies={},this._responsiveState=0,this._unacknowledgedCount=0,this._unresponsiveTime=0,this._asyncCheckUresponsive=this._register(new t.RunOnceScheduler(()=>this._checkUnresponsive(),1e3)),this._protocol.onMessage(L=>this._receiveOneMessage(L))}dispose(){this._isDisposed=!0,Object.keys(this._pendingRPCReplies).forEach(O=>{this._pendingRPCReplies[O].resolveErr(A.canceled())})}drain(){return typeof this._protocol.drain=="function"?this._protocol.drain():Promise.resolve()}_onWillSendRequest(O){this._unacknowledgedCount===0&&(this._unresponsiveTime=Date.now()+d.UNRESPONSIVE_TIME),this._unacknowledgedCount++,this._asyncCheckUresponsive.isScheduled()||this._asyncCheckUresponsive.schedule()}_onDidReceiveAcknowledge(O){this._unresponsiveTime=Date.now()+d.UNRESPONSIVE_TIME,this._unacknowledgedCount--,this._unacknowledgedCount===0&&this._asyncCheckUresponsive.cancel(),this._setResponsiveState(0)}_checkUnresponsive(){this._unacknowledgedCount!==0&&(Date.now()>this._unresponsiveTime?this._setResponsiveState(1):this._asyncCheckUresponsive.schedule())}_setResponsiveState(O){this._responsiveState!==O&&(this._responsiveState=O,this._onDidChangeResponsiveState.fire(this._responsiveState))}get responsiveState(){return this._responsiveState}transformIncomingURIs(O){return this._uriTransformer?(0,I.transformIncomingURIs)(O,this._uriTransformer):O}getProxy(O){const{nid:x,sid:F}=O;return this._proxies[x]||(this._proxies[x]=this._createProxy(x,F)),this._proxies[x]}_createProxy(O,x){let F={get:(L,M)=>(typeof M=="string"&&!L[M]&&M.charCodeAt(0)===36&&(L[M]=(...N)=>this._remoteCall(O,M,N)),M===g?x:L[M])};return new Proxy(Object.create(null),F)}set(O,x){return this._locals[O.nid]=x,x}assertRegistered(O){for(let x=0,F=O.length;x<F;x++){const L=O[x];if(!this._locals[L.nid])throw new Error(`Missing proxy instance ${L.sid}`)}}_receiveOneMessage(O){if(this._isDisposed)return;const x=O.byteLength,F=m.read(O,0),L=F.readUInt8(),M=F.readUInt32();switch(L){case 1:case 2:{let{rpcId:N,method:B,args:P}=E.deserializeRequestJSONArgs(F);this._uriTransformer&&(P=(0,I.transformIncomingURIs)(P,this._uriTransformer)),this._receiveRequest(x,M,N,B,P,L===2);break}case 3:case 4:{let{rpcId:N,method:B,args:P}=E.deserializeRequestMixedArgs(F);this._uriTransformer&&(P=(0,I.transformIncomingURIs)(P,this._uriTransformer)),this._receiveRequest(x,M,N,B,P,L===4);break}case 5:{this._logger&&this._logger.logIncoming(x,M,0,"ack"),this._onDidReceiveAcknowledge(M);break}case 6:{this._receiveCancel(x,M);break}case 7:{this._receiveReply(x,M,void 0);break}case 9:{let N=E.deserializeReplyOKJSON(F);this._uriTransformer&&(N=(0,I.transformIncomingURIs)(N,this._uriTransformer)),this._receiveReply(x,M,N);break}case 10:{const N=E.deserializeReplyOKJSONWithBuffers(F,this._uriTransformer);this._receiveReply(x,M,N);break}case 8:{let N=E.deserializeReplyOKVSBuffer(F);this._receiveReply(x,M,N);break}case 11:{let N=E.deserializeReplyErrError(F);this._uriTransformer&&(N=(0,I.transformIncomingURIs)(N,this._uriTransformer)),this._receiveReplyErr(x,M,N);break}case 12:{this._receiveReplyErr(x,M,void 0);break}default:console.error("received unexpected message"),console.error(O)}}_receiveRequest(O,x,F,L,M,N){this._logger&&this._logger.logIncoming(O,x,1,`receiveRequest ${(0,v.getStringIdentifierForProxy)(F)}.${L}(`,M);const B=String(x);let P,V;if(N){const U=new _.CancellationTokenSource;M.push(U.token),P=this._invokeHandler(F,L,M),V=()=>U.cancel()}else P=this._invokeHandler(F,L,M),V=n;this._cancelInvokedHandlers[B]=V;const z=E.serializeAcknowledged(x);this._logger&&this._logger.logOutgoing(z.byteLength,x,1,"ack"),this._protocol.send(z),P.then(U=>{delete this._cancelInvokedHandlers[B];const H=E.serializeReplyOK(x,U,this._uriReplacer);this._logger&&this._logger.logOutgoing(H.byteLength,x,1,"reply:",U),this._protocol.send(H)},U=>{delete this._cancelInvokedHandlers[B];const H=E.serializeReplyErr(x,U);this._logger&&this._logger.logOutgoing(H.byteLength,x,1,"replyErr:",U),this._protocol.send(H)})}_receiveCancel(O,x){this._logger&&this._logger.logIncoming(O,x,1,"receiveCancel");const F=String(x);this._cancelInvokedHandlers[F]&&this._cancelInvokedHandlers[F]()}_receiveReply(O,x,F){this._logger&&this._logger.logIncoming(O,x,0,"receiveReply:",F);const L=String(x);if(!this._pendingRPCReplies.hasOwnProperty(L))return;const M=this._pendingRPCReplies[L];delete this._pendingRPCReplies[L],M.resolveOk(F)}_receiveReplyErr(O,x,F){this._logger&&this._logger.logIncoming(O,x,0,"receiveReplyErr:",F);const L=String(x);if(!this._pendingRPCReplies.hasOwnProperty(L))return;const M=this._pendingRPCReplies[L];delete this._pendingRPCReplies[L];let N;F&&(F.$isError?(N=new Error,N.name=F.name,N.message=F.message,N.stack=F.stack):N=F),M.resolveErr(N)}_invokeHandler(O,x,F){try{return Promise.resolve(this._doInvokeHandler(O,x,F))}catch(L){return Promise.reject(L)}}_doInvokeHandler(O,x,F){const L=this._locals[O];if(!L)throw new Error("Unknown actor "+(0,v.getStringIdentifierForProxy)(O));let M=L[x];if(typeof M!="function")throw new Error("Unknown method "+x+" on actor "+(0,v.getStringIdentifierForProxy)(O));return M.apply(L,F)}_remoteCall(O,x,F){if(this._isDisposed)return Promise.reject(A.canceled());let L=null;if(F.length>0&&_.CancellationToken.isCancellationToken(F[F.length-1])&&(L=F.pop()),L&&L.isCancellationRequested)return Promise.reject(A.canceled());const M=E.serializeRequestArguments(F,this._uriReplacer),N=++this._lastMessageId,B=String(N),P=new w.LazyPromise;L&&L.onCancellationRequested(()=>{const z=E.serializeCancel(N);this._logger&&this._logger.logOutgoing(z.byteLength,N,0,"cancel"),this._protocol.send(E.serializeCancel(N))}),this._pendingRPCReplies[B]=P,this._onWillSendRequest(N);const V=E.serializeRequest(N,O,x,M,!!L);return this._logger&&this._logger.logOutgoing(V.byteLength,N,0,`request: ${(0,v.getStringIdentifierForProxy)(O)}.${x}(`,F),this._protocol.send(V),P}}e.RPCProtocol=d,C=h,d.UNRESPONSIVE_TIME=3*1e3;class m{constructor(O,x){this._buff=O,this._offset=x}static alloc(O,x,F){let L=new m(f.VSBuffer.alloc(F+1+4),0);return L.writeUInt8(O),L.writeUInt32(x),L}static read(O,x){return new m(O,x)}get buffer(){return this._buff}static sizeUInt8(){return 1}writeUInt8(O){this._buff.writeUInt8(O,this._offset),this._offset+=1}readUInt8(){const O=this._buff.readUInt8(this._offset);return this._offset+=1,O}writeUInt32(O){this._buff.writeUInt32BE(O,this._offset),this._offset+=4}readUInt32(){const O=this._buff.readUInt32BE(this._offset);return this._offset+=4,O}static sizeShortString(O){return 1+O.byteLength}writeShortString(O){this._buff.writeUInt8(O.byteLength,this._offset),this._offset+=1,this._buff.set(O,this._offset),this._offset+=O.byteLength}readShortString(){const O=this._buff.readUInt8(this._offset);this._offset+=1;const F=this._buff.slice(this._offset,this._offset+O).toString();return this._offset+=O,F}static sizeLongString(O){return 4+O.byteLength}writeLongString(O){this._buff.writeUInt32BE(O.byteLength,this._offset),this._offset+=4,this._buff.set(O,this._offset),this._offset+=O.byteLength}readLongString(){const O=this._buff.readUInt32BE(this._offset);this._offset+=4;const F=this._buff.slice(this._offset,this._offset+O).toString();return this._offset+=O,F}writeBuffer(O){this._buff.writeUInt32BE(O.byteLength,this._offset),this._offset+=4,this._buff.set(O,this._offset),this._offset+=O.byteLength}static sizeVSBuffer(O){return 4+O.byteLength}writeVSBuffer(O){this._buff.writeUInt32BE(O.byteLength,this._offset),this._offset+=4,this._buff.set(O,this._offset),this._offset+=O.byteLength}readVSBuffer(){const O=this._buff.readUInt32BE(this._offset);this._offset+=4;const x=this._buff.slice(this._offset,this._offset+O);return this._offset+=O,x}static sizeMixedArray(O){let x=0;x+=1;for(let F=0,L=O.length;F<L;F++){const M=O[F];switch(x+=1,M.type){case 1:x+=this.sizeLongString(M.value);break;case 2:x+=this.sizeVSBuffer(M.value);break;case 3:x+=this.sizeUInt32,x+=this.sizeLongString(M.value);for(let N=0;N<M.buffers.length;++N)x+=this.sizeVSBuffer(M.buffers[N]);break;case 4:break}}return x}writeMixedArray(O){this._buff.writeUInt8(O.length,this._offset),this._offset+=1;for(let x=0,F=O.length;x<F;x++){const L=O[x];switch(L.type){case 1:this.writeUInt8(1),this.writeLongString(L.value);break;case 2:this.writeUInt8(2),this.writeVSBuffer(L.value);break;case 3:this.writeUInt8(3),this.writeUInt32(L.buffers.length),this.writeLongString(L.value);for(let M=0;M<L.buffers.length;++M)this.writeBuffer(L.buffers[M]);break;case 4:this.writeUInt8(4);break}}}readMixedArray(){const O=this._buff.readUInt8(this._offset);this._offset+=1;let x=new Array(O);for(let F=0;F<O;F++)switch(this.readUInt8()){case 1:x[F]=this.readLongString();break;case 2:x[F]=this.readVSBuffer();break;case 3:{const M=this.readUInt32(),N=this.readLongString(),B=[];for(let P=0;P<M;++P)B.push(this.readVSBuffer());x[F]=new v.SerializableObjectWithBuffers(l(N,B,null));break}case 4:x[F]=void 0;break}return x}}m.sizeUInt32=4;var b;(function(R){R[R.Simple=0]="Simple",R[R.Mixed=1]="Mixed"})(b||(b={}));class E{static _useMixedArgSerialization(O){for(let x=0,F=O.length;x<F;x++)if(O[x]instanceof f.VSBuffer||O[x]instanceof v.SerializableObjectWithBuffers||typeof O[x]=="undefined")return!0;return!1}static serializeRequestArguments(O,x){if(this._useMixedArgSerialization(O)){const F=[];for(let L=0,M=O.length;L<M;L++){const N=O[L];if(N instanceof f.VSBuffer)F[L]={type:2,value:N};else if(typeof N=="undefined")F[L]={type:4};else if(N instanceof v.SerializableObjectWithBuffers){const{jsonString:B,referencedBuffers:P}=s(N.value,x);F[L]={type:3,value:f.VSBuffer.fromString(B),buffers:P}}else F[L]={type:1,value:f.VSBuffer.fromString(r(N,x))}}return{type:1,args:F}}return{type:0,args:r(O,x)}}static serializeRequest(O,x,F,L,M){switch(L.type){case 0:return this._requestJSONArgs(O,x,F,L.args,M);case 1:return this._requestMixedArgs(O,x,F,L.args,M)}}static _requestJSONArgs(O,x,F,L,M){const N=f.VSBuffer.fromString(F),B=f.VSBuffer.fromString(L);let P=0;P+=m.sizeUInt8(),P+=m.sizeShortString(N),P+=m.sizeLongString(B);let V=m.alloc(M?2:1,O,P);return V.writeUInt8(x),V.writeShortString(N),V.writeLongString(B),V.buffer}static deserializeRequestJSONArgs(O){const x=O.readUInt8(),F=O.readShortString(),L=O.readLongString();return{rpcId:x,method:F,args:JSON.parse(L)}}static _requestMixedArgs(O,x,F,L,M){const N=f.VSBuffer.fromString(F);let B=0;B+=m.sizeUInt8(),B+=m.sizeShortString(N),B+=m.sizeMixedArray(L);let P=m.alloc(M?4:3,O,B);return P.writeUInt8(x),P.writeShortString(N),P.writeMixedArray(L),P.buffer}static deserializeRequestMixedArgs(O){const x=O.readUInt8(),F=O.readShortString(),L=O.readMixedArray(),M=new Array(L.length);for(let N=0,B=L.length;N<B;N++){const P=L[N];typeof P=="string"?M[N]=JSON.parse(P):M[N]=P}return{rpcId:x,method:F,args:M}}static serializeAcknowledged(O){return m.alloc(5,O,0).buffer}static serializeCancel(O){return m.alloc(6,O,0).buffer}static serializeReplyOK(O,x,F){if(typeof x=="undefined")return this._serializeReplyOKEmpty(O);if(x instanceof f.VSBuffer)return this._serializeReplyOKVSBuffer(O,x);if(x instanceof v.SerializableObjectWithBuffers){const{jsonString:L,referencedBuffers:M}=s(x.value,F,!0);return this._serializeReplyOKJSONWithBuffers(O,L,M)}else return this._serializeReplyOKJSON(O,o(x,F))}static _serializeReplyOKEmpty(O){return m.alloc(7,O,0).buffer}static _serializeReplyOKVSBuffer(O,x){let F=0;F+=m.sizeVSBuffer(x);let L=m.alloc(8,O,F);return L.writeVSBuffer(x),L.buffer}static deserializeReplyOKVSBuffer(O){return O.readVSBuffer()}static _serializeReplyOKJSON(O,x){const F=f.VSBuffer.fromString(x);let L=0;L+=m.sizeLongString(F);let M=m.alloc(9,O,L);return M.writeLongString(F),M.buffer}static _serializeReplyOKJSONWithBuffers(O,x,F){const L=f.VSBuffer.fromString(x);let M=0;M+=m.sizeUInt32,M+=m.sizeLongString(L);for(const B of F)M+=m.sizeVSBuffer(B);let N=m.alloc(10,O,M);N.writeUInt32(F.length),N.writeLongString(L);for(const B of F)N.writeBuffer(B);return N.buffer}static deserializeReplyOKJSON(O){const x=O.readLongString();return JSON.parse(x)}static deserializeReplyOKJSONWithBuffers(O,x){const F=O.readUInt32(),L=O.readLongString(),M=[];for(let N=0;N<F;++N)M.push(O.readVSBuffer());return new v.SerializableObjectWithBuffers(l(L,M,x))}static serializeReplyErr(O,x){const F=x?o(A.transformErrorForSerialization(x),null):void 0;if(typeof F!="string")return this._serializeReplyErrEmpty(O);const L=f.VSBuffer.fromString(F);let M=0;M+=m.sizeLongString(L);let N=m.alloc(11,O,M);return N.writeLongString(L),N.buffer}static deserializeReplyErrError(O){const x=O.readLongString();return JSON.parse(x)}static _serializeReplyErrEmpty(O){return m.alloc(12,O,0).buffer}}var y;(function(R){R[R.RequestJSONArgs=1]="RequestJSONArgs",R[R.RequestJSONArgsWithCancellation=2]="RequestJSONArgsWithCancellation",R[R.RequestMixedArgs=3]="RequestMixedArgs",R[R.RequestMixedArgsWithCancellation=4]="RequestMixedArgsWithCancellation",R[R.Acknowledged=5]="Acknowledged",R[R.Cancel=6]="Cancel",R[R.ReplyOKEmpty=7]="ReplyOKEmpty",R[R.ReplyOKVSBuffer=8]="ReplyOKVSBuffer",R[R.ReplyOKJSON=9]="ReplyOKJSON",R[R.ReplyOKJSONWithBuffers=10]="ReplyOKJSONWithBuffers",R[R.ReplyErrError=11]="ReplyErrError",R[R.ReplyErrEmpty=12]="ReplyErrEmpty"})(y||(y={}));var T;(function(R){R[R.String=1]="String",R[R.VSBuffer=2]="VSBuffer",R[R.SerializedObjectWithBuffers=3]="SerializedObjectWithBuffers",R[R.Undefined=4]="Undefined"})(T||(T={}))}),define(ne[870],re([1,0,55,40,13,18,9,467,150]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionHostProfiler=void 0;let w=class{constructor(C,o,c){this._port=C,this._extensionService=o,this._profilingService=c}async start(){const C=await this._profilingService.startProfiling({port:this._port});return{stop:(0,I.once)(async()=>{const o=await this._profilingService.stopProfiling(C),c=await this._extensionService.getExtensions();return this._distill(o,c)})}}_distill(C,o){let c=t.TernarySearchTree.forUris();for(let g of o)g.extensionLocation.scheme===A.Schemas.file&&c.set(k.URI.file(g.extensionLocation.fsPath),g);let i=C.nodes,S=new Map,s=new Map;for(let g of i)S.set(g.id,g);function l(g,d){if(d){if(d==="self"&&g.callFrame.url){let m;try{m=c.findSubstr(k.URI.parse(g.callFrame.url))}catch{}m&&(d=m.identifier.value)}}else switch(g.callFrame.functionName){case"(root)":break;case"(program)":d="program";break;case"(garbage collector)":d="gc";break;default:d="self";break}if(s.set(g.id,d),g.children)for(const m of g.children){const b=S.get(m);b&&l(b,d)}}l(i[0],null);const r=C.samples||[];let p=C.timeDeltas||[],u=[],a=[],n=0,h;for(let g=0;g<r.length;g++){let d=r[g],m=s.get(d);m!==h&&(h&&(a.push(h),u.push(n)),h=(0,_.withNullAsUndefined)(m),n=0),n+=p[g]}return h&&(a.push(h),u.push(n)),{startTime:C.startTime,endTime:C.endTime,deltas:u,ids:a,data:C,getAggregatedTimes:()=>{let g=new Map;for(let d=0;d<a.length;d++){let m=a[d];g.set(m,(g.get(m)||0)+u[d])}return g}}}};w=Ee([W(1,f.IExtensionService),W(2,D.IV8InspectProfilingService)],w),e.ExtensionHostProfiler=w}),define(ne[2369],re([1,0,103,731]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerMainProcessRemoteService)(f.IExtensionHostStarter,f.ipcExtensionHostStarterChannelName,{supportsDelayedInstantiation:!0})}),define(ne[367],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IElevatedFileService=void 0,e.IElevatedFileService=(0,t.createDecorator)("elevatedFileService")}),define(ne[610],re([1,0,23,5]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWorkbenchFileService=void 0,e.IWorkbenchFileService=(0,f.refineServiceDecorator)(t.IFileService)}),define(ne[2370],re([1,0,6,2,9,23,75,65,60,34,31,8,610]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";var c;Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadFileSystem=void 0;let i=c=class{constructor(l,r,p,u,a){this._fileService=r,this._contextService=p,this._logService=u,this._configurationService=a,this._fileProvider=new Map,this._disposables=new f.DisposableStore,this._watches=new Map,this._proxy=l.getProxy(D.ExtHostContext.ExtHostFileSystem);const n=l.getProxy(D.ExtHostContext.ExtHostFileSystemInfo);for(let h of r.listCapabilities())n.$acceptProviderInfos(_.URI.from({scheme:h.scheme,path:"/dummy"}),h.capabilities);this._disposables.add(r.onDidChangeFileSystemProviderRegistrations(h=>n.$acceptProviderInfos(_.URI.from({scheme:h.scheme,path:"/dummy"}),h.provider?.capabilities??null))),this._disposables.add(r.onDidChangeFileSystemProviderCapabilities(h=>n.$acceptProviderInfos(_.URI.from({scheme:h.scheme,path:"/dummy"}),h.provider.capabilities)))}dispose(){this._disposables.dispose(),(0,f.dispose)(this._fileProvider.values()),(0,f.dispose)(this._watches.values()),this._fileProvider.clear()}async $registerFileSystemProvider(l,r,p){this._fileProvider.set(l,new S(this._fileService,r,p,l,this._proxy))}$unregisterProvider(l){this._fileProvider.get(l)?.dispose(),this._fileProvider.delete(l)}$onFileSystemChange(l,r){const p=this._fileProvider.get(l);if(!p)throw new Error("Unknown file provider");p.$onFileSystemChange(r)}$stat(l){return this._fileService.stat(_.URI.revive(l)).then(r=>({ctime:r.ctime,mtime:r.mtime,size:r.size,permissions:r.readonly?A.FilePermission.Readonly:void 0,type:c._asFileType(r)})).catch(c._handleError)}$readdir(l){return this._fileService.resolve(_.URI.revive(l),{resolveMetadata:!1}).then(r=>{if(!r.isDirectory){const p=new Error(r.name);throw p.name=A.FileSystemProviderErrorCode.FileNotADirectory,p}return r.children?r.children.map(p=>[p.name,c._asFileType(p)]):[]}).catch(c._handleError)}static _asFileType(l){let r=0;return l.isFile?r+=A.FileType.File:l.isDirectory&&(r+=A.FileType.Directory),l.isSymbolicLink&&(r+=A.FileType.SymbolicLink),r}$readFile(l){return this._fileService.readFile(_.URI.revive(l)).then(r=>r.value).catch(c._handleError)}$writeFile(l,r){return this._fileService.writeFile(_.URI.revive(l),r).then(()=>{}).catch(c._handleError)}$rename(l,r,p){return this._fileService.move(_.URI.revive(l),_.URI.revive(r),p.overwrite).then(()=>{}).catch(c._handleError)}$copy(l,r,p){return this._fileService.copy(_.URI.revive(l),_.URI.revive(r),p.overwrite).then(()=>{}).catch(c._handleError)}$mkdir(l){return this._fileService.createFolder(_.URI.revive(l)).then(()=>{}).catch(c._handleError)}$delete(l,r){return this._fileService.del(_.URI.revive(l),r).catch(c._handleError)}static _handleError(l){if(l instanceof A.FileOperationError)switch(l.fileOperationResult){case 1:l.name=A.FileSystemProviderErrorCode.FileNotFound;break;case 0:l.name=A.FileSystemProviderErrorCode.FileIsADirectory;break;case 6:l.name=A.FileSystemProviderErrorCode.NoPermissions;break;case 4:l.name=A.FileSystemProviderErrorCode.FileExists;break}else if(l instanceof Error){const r=(0,A.toFileSystemProviderErrorCode)(l);r!==A.FileSystemProviderErrorCode.Unknown&&(l.name=r)}throw l}$ensureActivation(l){return this._fileService.activateProvider(l)}$watch(l,r,p,u){const a=_.URI.revive(p);if(this._contextService.isInsideWorkspace(a)){this._logService.trace(`MainThreadFileSystem#$watch(): ignoring request to start watching because path is inside workspace (extension: ${l}, path: ${a.toString(!0)}, recursive: ${u.recursive}, session: ${r})`);return}if(this._logService.trace(`MainThreadFileSystem#$watch(): request to start watching (extension: ${l}, path: ${a.toString(!0)}, recursive: ${u.recursive}, session: ${r})`),u.recursive){const h=this._configurationService.getValue();if(h.files?.watcherExclude)for(const g in h.files.watcherExclude)h.files.watcherExclude[g]===!0&&u.excludes.push(g)}const n=this._fileService.watch(a,u);this._watches.set(r,n)}$unwatch(l){const r=this._watches.get(l);r&&(this._logService.trace(`MainThreadFileSystem#$unwatch(): request to stop watching (session: ${l})`),r.dispose(),this._watches.delete(l))}};i=c=Ee([(0,k.extHostNamedCustomer)(D.MainContext.MainThreadFileSystem),W(1,o.IWorkbenchFileService),W(2,w.IWorkspaceContextService),W(3,v.ILogService),W(4,C.IConfigurationService)],i),e.MainThreadFileSystem=i;class S{constructor(l,r,p,u,a){this._handle=u,this._proxy=a,this._onDidChange=new t.Emitter,this.onDidChangeFile=this._onDidChange.event,this.onDidChangeCapabilities=t.Event.None,this.capabilities=p,this._registration=l.registerProvider(r,this)}dispose(){this._registration.dispose(),this._onDidChange.dispose()}watch(l,r){const p=Math.random();return this._proxy.$watch(this._handle,p,l,r),(0,f.toDisposable)(()=>{this._proxy.$unwatch(this._handle,p)})}$onFileSystemChange(l){this._onDidChange.fire(l.map(S._createFileChange))}static _createFileChange(l){return{resource:_.URI.revive(l.resource),type:l.type}}stat(l){return this._proxy.$stat(this._handle,l).then(void 0,r=>{throw r})}readFile(l){return this._proxy.$readFile(this._handle,l).then(r=>r.buffer)}writeFile(l,r,p){return this._proxy.$writeFile(this._handle,l,I.VSBuffer.wrap(r),p)}delete(l,r){return this._proxy.$delete(this._handle,l,r)}mkdir(l){return this._proxy.$mkdir(this._handle,l)}readdir(l){return this._proxy.$readdir(this._handle,l)}rename(l,r,p){return this._proxy.$rename(this._handle,l,r,p)}copy(l,r,p){return this._proxy.$copy(this._handle,l,r,p)}open(l,r){return this._proxy.$open(this._handle,l,r)}close(l){return this._proxy.$close(this._handle,l)}read(l,r,p,u,a){return this._proxy.$read(this._handle,l,r,a).then(n=>(p.set(n.buffer,u),n.byteLength))}write(l,r,p,u,a){return this._proxy.$write(this._handle,l,r,I.VSBuffer.wrap(p).slice(u,u+a))}}}),define(ne[2371],re([1,0,157,18,9,23,35,87,121,367]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeElevatedFileService=void 0;let v=class{constructor(o,c,i){this.nativeHostService=o,this.fileService=c,this.environmentService=i}isSupported(o){return o.scheme===f.Schemas.file}async writeFileElevated(o,c,i){const S=_.URI.file((0,t.randomPath)(this.environmentService.userDataPath,"code-elevated"));try{await this.fileService.writeFile(S,c,i),await this.nativeHostService.writeElevated(S,o,i)}finally{await this.fileService.del(S)}return this.fileService.resolve(o,{resolveMetadata:!0})}};v=Ee([W(0,D.INativeHostService),W(1,A.IFileService),W(2,I.INativeWorkbenchEnvironmentService)],v),e.NativeElevatedFileService=v,(0,k.registerSingleton)(w.IElevatedFileService,v)}),define(ne[2372],re([1,0,2,171,734]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UniversalWatcherClient=void 0;class A extends _.AbstractUniversalWatcherClient{constructor(D,I,w,v){super(D,I,w);this.sharedProcessWorkerWorkbenchService=v,this.init()}createWatcher(D){const I=f.ProxyChannel.toService((0,f.getDelayedChannel)((async()=>{const{client:w,onDidTerminate:v}=await this.sharedProcessWorkerWorkbenchService.createWorker({moduleId:"vs/platform/files/node/watcher/watcherMain",type:"fileWatcher"});return v.then(({reason:C})=>{C&&this.onError(`terminated by itself with code ${C.code}, signal: ${C.signal}`)}),w.getChannel("watcher")})()));return D.add((0,t.toDisposable)(()=>I.stop())),I}}e.UniversalWatcherClient=A}),define(ne[2373],re([1,0,14,1963,733,2372]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiskFileSystemProvider=void 0;class k extends f.AbstractDiskFileSystemProvider{constructor(I,w,v){super(v,{watcher:{forceUniversal:!0}});this.mainProcessService=I,this.sharedProcessWorkerWorkbenchService=w,this.provider=this._register(new _.DiskFileSystemProviderClient(this.mainProcessService.getChannel(_.LOCAL_FILE_SYSTEM_CHANNEL_NAME),{pathCaseSensitive:t.isLinux,trash:!0})),this.registerListeners()}registerListeners(){this.provider.onDidChangeFile(I=>this._onDidChangeFile.fire(I)),this.provider.onDidWatchError(I=>this._onDidWatchError.fire(I))}get onDidChangeCapabilities(){return this.provider.onDidChangeCapabilities}get capabilities(){return this.provider.capabilities}stat(I){return this.provider.stat(I)}readdir(I){return this.provider.readdir(I)}readFile(I,w){return this.provider.readFile(I,w)}readFileStream(I,w,v){return this.provider.readFileStream(I,w,v)}writeFile(I,w,v){return this.provider.writeFile(I,w,v)}open(I,w){return this.provider.open(I,w)}close(I){return this.provider.close(I)}read(I,w,v,C,o){return this.provider.read(I,w,v,C,o)}write(I,w,v,C,o){return this.provider.write(I,w,v,C,o)}mkdir(I){return this.provider.mkdir(I)}delete(I,w){return this.provider.delete(I,w)}rename(I,w,v){return this.provider.rename(I,w,v)}copy(I,w,v){return this.provider.copy(I,w,v)}cloneFile(I,w){return this.provider.cloneFile(I,w)}createUniversalWatcher(I,w,v){return new A.UniversalWatcherClient(C=>I(C),C=>w(C),v,this.sharedProcessWorkerWorkbenchService)}createNonRecursiveWatcher(){throw new Error("Method not implemented in sandbox.")}}e.DiskFileSystemProvider=k}),define(ne[154],re([1,0,5,35,6,2,7,8,23,51,14,34]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FilesConfigurationService=e.IFilesConfigurationService=e.AutoSaveMode=e.AutoSaveAfterShortDelayContext=void 0,e.AutoSaveAfterShortDelayContext=new k.RawContextKey("autoSaveAfterShortDelayContext",!1,!0);var o;(function(i){i[i.OFF=0]="OFF",i[i.AFTER_SHORT_DELAY=1]="AFTER_SHORT_DELAY",i[i.AFTER_LONG_DELAY=2]="AFTER_LONG_DELAY",i[i.ON_FOCUS_CHANGE=3]="ON_FOCUS_CHANGE",i[i.ON_WINDOW_CHANGE=4]="ON_WINDOW_CHANGE"})(o=e.AutoSaveMode||(e.AutoSaveMode={})),e.IFilesConfigurationService=(0,t.createDecorator)("filesConfigurationService");let c=class zo extends A.Disposable{constructor(S,s,l){super();this.configurationService=s,this.contextService=l,this._onAutoSaveConfigurationChange=this._register(new _.Emitter),this.onAutoSaveConfigurationChange=this._onAutoSaveConfigurationChange.event,this._onFilesAssociationChange=this._register(new _.Emitter),this.onFilesAssociationChange=this._onFilesAssociationChange.event,this.autoSaveAfterShortDelayContext=e.AutoSaveAfterShortDelayContext.bindTo(S);const r=s.getValue();this.currentFilesAssociationConfig=r?.files?.associations,this.currentHotExitConfig=r?.files?.hotExit||I.HotExitConfiguration.ON_EXIT,this.onFilesConfigurationChange(r),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(S=>{S.affectsConfiguration("files")&&this.onFilesConfigurationChange(this.configurationService.getValue())}))}onFilesConfigurationChange(S){switch(S?.files?.autoSave||zo.DEFAULT_AUTO_SAVE_MODE){case I.AutoSaveConfiguration.AFTER_DELAY:this.configuredAutoSaveDelay=S?.files?.autoSaveDelay,this.configuredAutoSaveOnFocusChange=!1,this.configuredAutoSaveOnWindowChange=!1;break;case I.AutoSaveConfiguration.ON_FOCUS_CHANGE:this.configuredAutoSaveDelay=void 0,this.configuredAutoSaveOnFocusChange=!0,this.configuredAutoSaveOnWindowChange=!1;break;case I.AutoSaveConfiguration.ON_WINDOW_CHANGE:this.configuredAutoSaveDelay=void 0,this.configuredAutoSaveOnFocusChange=!1,this.configuredAutoSaveOnWindowChange=!0;break;default:this.configuredAutoSaveDelay=void 0,this.configuredAutoSaveOnFocusChange=!1,this.configuredAutoSaveOnWindowChange=!1;break}this.autoSaveAfterShortDelayContext.set(this.getAutoSaveMode()===1),this._onAutoSaveConfigurationChange.fire(this.getAutoSaveConfiguration());const l=S?.files?.associations;(0,w.equals)(this.currentFilesAssociationConfig,l)||(this.currentFilesAssociationConfig=l,this._onFilesAssociationChange.fire());const r=S?.files?.hotExit;r===I.HotExitConfiguration.OFF||r===I.HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE?this.currentHotExitConfig=r:this.currentHotExitConfig=I.HotExitConfiguration.ON_EXIT}getAutoSaveMode(){return this.configuredAutoSaveOnFocusChange?3:this.configuredAutoSaveOnWindowChange?4:typeof this.configuredAutoSaveDelay=="number"&&this.configuredAutoSaveDelay>=0?this.configuredAutoSaveDelay<=1e3?1:2:0}getAutoSaveConfiguration(){return{autoSaveDelay:typeof this.configuredAutoSaveDelay=="number"&&this.configuredAutoSaveDelay>=0?this.configuredAutoSaveDelay:void 0,autoSaveFocusChange:!!this.configuredAutoSaveOnFocusChange,autoSaveApplicationChange:!!this.configuredAutoSaveOnWindowChange}}async toggleAutoSave(){const S=this.configurationService.getValue("files.autoSave");let s;return[I.AutoSaveConfiguration.AFTER_DELAY,I.AutoSaveConfiguration.ON_FOCUS_CHANGE,I.AutoSaveConfiguration.ON_WINDOW_CHANGE].some(l=>l===S)?s=I.AutoSaveConfiguration.OFF:s=I.AutoSaveConfiguration.AFTER_DELAY,this.configurationService.updateValue("files.autoSave",s)}get isHotExitEnabled(){return this.contextService.getWorkspace().transient?!1:this.currentHotExitConfig!==I.HotExitConfiguration.OFF}get hotExitConfiguration(){return this.currentHotExitConfig}preventSaveConflicts(S,s){return this.configurationService.getValue("files.saveConflictResolution",{resource:S,overrideIdentifier:s})!=="overwriteFileOnDisk"}};c.DEFAULT_AUTO_SAVE_MODE=v.isWeb?I.AutoSaveConfiguration.AFTER_DELAY:I.AutoSaveConfiguration.OFF,c=Ee([W(0,k.IContextKeyService),W(1,D.IConfigurationService),W(2,C.IWorkspaceContextService)],c),e.FilesConfigurationService=c,(0,f.registerSingleton)(e.IFilesConfigurationService,c)}),define(ne[177],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GoScope=e.GoFilter=e.IHistoryService=void 0,e.IHistoryService=(0,t.createDecorator)("historyService");var f;(function(A){A[A.NONE=0]="NONE",A[A.EDITS=1]="EDITS",A[A.NAVIGATION=2]="NAVIGATION"})(f=e.GoFilter||(e.GoFilter={}));var _;(function(A){A[A.DEFAULT=0]="DEFAULT",A[A.EDITOR_GROUP=1]="EDITOR_GROUP",A[A.EDITOR=2]="EDITOR"})(_=e.GoScope||(e.GoScope={}))}),define(ne[871],re([1,0,1570,48,732,16,177,94,18,57,17,1951,8,176,144]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExternalTerminalContribution=void 0;const S="workbench.action.terminal.openNativeConsole";D.KeybindingsRegistry.registerCommandAndKeybindingRule({id:S,primary:2048|1024|33,when:c.TerminalContextKeys.notFocus,weight:200,handler:async l=>{const r=l.get(k.IHistoryService),p=l.get(_.IExternalTerminalService),u=l.get(o.IConfigurationService),a=l.get(i.IRemoteAuthorityResolverService),n=r.getLastActiveWorkspaceRoot(),h=u.getValue("terminal.external");if(n?.scheme===I.Schemas.file){p.openTerminal(h,n.fsPath);return}try{if(n?.scheme===I.Schemas.vscodeRemote){const d=await a.getCanonicalURI(n);if(d.scheme===I.Schemas.file){p.openTerminal(h,d.fsPath);return}}}catch{}const g=r.getLastActiveFile(I.Schemas.file);if(g?.scheme===I.Schemas.file){p.openTerminal(h,f.dirname(g.fsPath));return}try{if(g?.scheme===I.Schemas.vscodeRemote){const d=await a.getCanonicalURI(g);if(d.scheme===I.Schemas.file){p.openTerminal(h,d.fsPath);return}}}catch{}p.openTerminal(h,void 0)}}),A.MenuRegistry.appendMenuItem(A.MenuId.CommandPalette,{command:{id:S,title:{value:t.localize(0,null),original:"Open New External Terminal"}}});let s=class{constructor(r){this._externalTerminalService=r,this._updateConfiguration()}async _updateConfiguration(){const r=await this._externalTerminalService.getDefaultTerminalForPlatforms();v.Registry.as(w.Extensions.Configuration).registerConfiguration({id:"externalTerminal",order:100,title:t.localize(1,null),type:"object",properties:{"terminal.explorerKind":{type:"string",enum:["integrated","external"],enumDescriptions:[t.localize(2,null),t.localize(3,null)],description:t.localize(4,null),default:"integrated"},"terminal.external.windowsExec":{type:"string",description:t.localize(5,null),default:r.windows,scope:1},"terminal.external.osxExec":{type:"string",description:t.localize(6,null),default:_.DEFAULT_TERMINAL_OSX,scope:1},"terminal.external.linuxExec":{type:"string",description:t.localize(7,null),default:r.linux,scope:1}}})}};s=Ee([W(0,C.IExternalTerminalMainService)],s),e.ExternalTerminalContribution=s}),define(ne[2374],re([1,0,6,14,13,8,5,45,31,26,17,24,556,34,105,120,2231,218,499,177,822,46,325,815]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LocalTerminalBackendContribution=void 0;let g=class{constructor(b,E){const y=b.createInstance(d,void 0);v.Registry.as(S.TerminalExtensions.Backend).registerTerminalBackend(y),E.handleNewRegisteredBackend(y)}};g=Ee([W(0,k.IInstantiationService),W(1,i.ITerminalService)],g),e.LocalTerminalBackendContribution=g;let d=class extends h.BaseTerminalBackend{constructor(b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H){super(R,T,U,H,L,y);this.remoteAuthority=b,this._instantiationService=E,this._localPtyService=R,this._labelService=O,this._shellEnvironmentService=x,this._storageService=F,this._configurationResolverService=L,this._configurationService=N,this._productService=B,this._historyService=P,this._terminalProfileResolverService=V,this._environmentVariableService=z,this._ptys=new Map,this._onDidRequestDetach=this._register(new t.Emitter),this.onDidRequestDetach=this._onDidRequestDetach.event,this._localPtyService.onProcessData(G=>this._ptys.get(G.id)?.handleData(G.event)),this._localPtyService.onDidChangeProperty(G=>this._ptys.get(G.id)?.handleDidChangeProperty(G.property)),this._localPtyService.onProcessExit(G=>{const q=this._ptys.get(G.id);q&&(q.handleExit(G.event),this._ptys.delete(G.id))}),this._localPtyService.onProcessReady(G=>this._ptys.get(G.id)?.handleReady(G.event)),this._localPtyService.onProcessReplay(G=>this._ptys.get(G.id)?.handleReplay(G.event)),this._localPtyService.onProcessOrphanQuestion(G=>this._ptys.get(G.id)?.handleOrphanQuestion()),this._localPtyService.onDidRequestDetach(G=>this._onDidRequestDetach.fire(G));const K=M.getValue(S.TERMINAL_CONFIG_SECTION);for(const G of Object.keys(K.autoReplies)){const q=K.autoReplies[G];q&&this._localPtyService.installAutoReply(G,q)}this._register(M.onDidChangeConfiguration(async G=>{if(G.affectsConfiguration("terminal.integrated.autoReplies")){this._localPtyService.uninstallAllAutoReplies();const q=M.getValue(S.TERMINAL_CONFIG_SECTION);for(const Z of Object.keys(q.autoReplies)){const j=q.autoReplies[Z];j&&await this._localPtyService.installAutoReply(Z,j)}}}))}async requestDetachInstance(b,E){return this._localPtyService.requestDetachInstance(b,E)}async acceptDetachInstanceReply(b,E){if(!E){this._logService.warn("Cannot attach to feature terminals, custom pty terminals, or those without a persistentProcessId");return}return this._localPtyService.acceptDetachInstanceReply(b,E)}async persistTerminalState(){const b=Array.from(this._ptys.keys()),E=await this._localPtyService.serializeTerminalState(b);this._storageService.store("terminal.integrated.bufferState",E,1,1)}async updateTitle(b,E,y){await this._localPtyService.updateTitle(b,E,y)}async updateIcon(b,E,y){await this._localPtyService.updateIcon(b,E,y)}updateProperty(b,E,y){return this._localPtyService.updateProperty(b,E,y)}async createProcess(b,E,y,T,R,O,x,F){const L=await this._shellEnvironmentService.getShellEnv(),M=await this._localPtyService.createProcess(b,E,y,T,R,O,L,x,F,this._getWorkspaceId(),this._getWorkspaceName()),N=this._instantiationService.createInstance(s.LocalPty,M,F);return this._ptys.set(M,N),N}async attachToProcess(b){try{await this._localPtyService.attachToProcess(b);const E=this._instantiationService.createInstance(s.LocalPty,b,!0);return this._ptys.set(b,E),E}catch(E){this._logService.trace(`Couldn't attach to process ${E.message}`)}}async listProcesses(){return this._localPtyService.listProcesses()}async reduceConnectionGraceTime(){this._localPtyService.reduceConnectionGraceTime()}async getDefaultSystemShell(b){return this._localPtyService.getDefaultSystemShell(b)}async getProfiles(b,E,y){return this._localPtyService.getProfiles?.(this._workspaceContextService.getWorkspace().id,b,E,y)||[]}async getEnvironment(){return this._localPtyService.getEnvironment()}async getShellEnvironment(){return this._shellEnvironmentService.getShellEnv()}async getWslPath(b){return this._localPtyService.getWslPath(b)}async setTerminalLayoutInfo(b){const E={workspaceId:this._getWorkspaceId(),tabs:b?b.tabs:[]};await this._localPtyService.setTerminalLayoutInfo(E),this._storageService.store("terminal.integrated.layoutInfo",JSON.stringify(E),1,1)}async getTerminalLayoutInfo(){const b={workspaceId:this._getWorkspaceId()},E=this._storageService.get("terminal.integrated.bufferState",1),y=this._deserializeTerminalState(E);if(y)try{const T=this._historyService.getLastActiveWorkspaceRoot(),R=T?(0,_.withNullAsUndefined)(this._workspaceContextService.getWorkspaceFolder(T)):void 0,O=u.createVariableResolver(R,await this._terminalProfileResolverService.getEnvironment(this.remoteAuthority),this._configurationResolverService);for(const F of y){const L=await this._resolveEnvironmentForRevive(O,F.shellLaunchConfig);F.processLaunchConfig.env=L}await this._localPtyService.reviveTerminalProcesses(y,Intl.DateTimeFormat().resolvedOptions().locale),this._storageService.remove("terminal.integrated.bufferState",1);const x=this._storageService.get("terminal.integrated.layoutInfo",1);x&&(await this._localPtyService.setTerminalLayoutInfo(JSON.parse(x)),this._storageService.remove("terminal.integrated.layoutInfo",1))}catch{}return this._localPtyService.getTerminalLayoutInfo(b)}async _resolveEnvironmentForRevive(b,E){const y=f.isWindows?"windows":f.isMacintosh?"osx":"linux",T=this._configurationService.getValue(`terminal.integrated.env.${y}`),R=await(E.useShellEnvironment?this.getShellEnvironment():this.getEnvironment()),O=u.createTerminalEnvironment(E,T,b,this._productService.version,this._configurationService.getValue("terminal.integrated.detectLocale"),R);return!E.strictEnv&&!E.hideFromUser&&this._environmentVariableService.mergedCollection.applyToProcessEnvironment(O,b),O}_getWorkspaceId(){return this._workspaceContextService.getWorkspace().id}_getWorkspaceName(){return this._labelService.getWorkspaceLabel(this._workspaceContextService.getWorkspace())}};d=Ee([W(1,k.IInstantiationService),W(2,c.IWorkspaceContextService),W(3,I.ILogService),W(4,o.ILocalPtyService),W(5,D.ILabelService),W(6,r.IShellEnvironmentService),W(7,C.IStorageService),W(8,l.IConfigurationResolverService),W(9,A.IConfigurationService),W(10,A.IConfigurationService),W(11,a.IProductService),W(12,p.IHistoryService),W(13,S.ITerminalProfileResolverService),W(14,n.IEnvironmentVariableService),W(15,w.INotificationService),W(16,p.IHistoryService)],d)}),define(ne[69],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IHostService=void 0,e.IHostService=(0,t.createDecorator)("hostService")}),define(ne[2375],re([1,0,6,2,9,41,75,65,69]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadWindow=void 0;let w=class{constructor(C,o,c){this.hostService=o,this.openerService=c,this.disposables=new f.DisposableStore,this.resolved=new Map,this.proxy=C.getProxy(D.ExtHostContext.ExtHostWindow),t.Event.latch(o.onDidChangeFocus)(this.proxy.$onDidChangeWindowFocus,this.proxy,this.disposables)}dispose(){this.disposables.dispose();for(const C of this.resolved.values())C.dispose();this.resolved.clear()}$getWindowVisibility(){return Promise.resolve(this.hostService.hasFocus)}async $openUri(C,o,c){const i=_.URI.from(C);let S;return o&&_.URI.parse(o).toString()===i.toString()?S=o:S=i,this.openerService.open(S,{openExternal:!0,allowTunneling:c.allowTunneling,allowContributedOpeners:c.allowContributedOpeners})}async $asExternalUri(C,o){return(await this.openerService.resolveExternalUri(_.URI.revive(C),o)).resolved}};w=Ee([(0,k.extHostNamedCustomer)(D.MainContext.MainThreadWindow),W(1,I.IHostService),W(2,A.IOpenerService)],w),e.MainThreadWindow=w}),define(ne[298],re([1,0,138,106,6,38,12,10,68,32,5,69,34,2,1378,19,23,21,93]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenWorkspaceButtonContribution=e.FloatingClickWidget=e.RangeHighlightDecorations=void 0;let p=class Rr extends c.Disposable{constructor(h){super();this.editorService=h,this._onHighlightRemoved=this._register(new _.Emitter),this.onHighlightRemoved=this._onHighlightRemoved.event,this.rangeHighlightDecorationId=null,this.editor=null,this.editorDisposables=this._register(new c.DisposableStore)}removeHighlightRange(){this.editor?.getModel()&&this.rangeHighlightDecorationId&&(this.editor.deltaDecorations([this.rangeHighlightDecorationId],[]),this._onHighlightRemoved.fire()),this.rangeHighlightDecorationId=null}highlightRange(h,g){g=g??this.getEditor(h),(0,f.isCodeEditor)(g)?this.doHighlightRange(g,h):(0,f.isCompositeEditor)(g)&&(0,f.isCodeEditor)(g.activeCodeEditor)&&this.doHighlightRange(g.activeCodeEditor,h)}doHighlightRange(h,g){this.removeHighlightRange(),h.changeDecorations(d=>{this.rangeHighlightDecorationId=d.addDecoration(g.range,this.createRangeHighlightDecoration(g.isWholeLine))}),this.setEditor(h)}getEditor(h){const g=this.editorService.activeEditor?.resource;if(g&&(0,S.isEqual)(g,h.resource)&&(0,f.isCodeEditor)(this.editorService.activeTextEditorControl))return this.editorService.activeTextEditorControl}setEditor(h){this.editor!==h&&(this.editorDisposables.clear(),this.editor=h,this.editorDisposables.add(this.editor.onDidChangeCursorPosition(g=>{(g.reason===0||g.reason===3||g.reason===5||g.reason===6)&&this.removeHighlightRange()})),this.editorDisposables.add(this.editor.onDidChangeModel(()=>{this.removeHighlightRange()})),this.editorDisposables.add(this.editor.onDidDispose(()=>{this.removeHighlightRange(),this.editor=null})))}createRangeHighlightDecoration(h=!0){return h?Rr._WHOLE_LINE_RANGE_HIGHLIGHT:Rr._RANGE_HIGHLIGHT}dispose(){super.dispose(),this.editor?.getModel()&&(this.removeHighlightRange(),this.editor=null)}};p._WHOLE_LINE_RANGE_HIGHLIGHT=r.ModelDecorationOptions.register({description:"codeeditor-range-highlight-whole",stickiness:1,className:"rangeHighlight",isWholeLine:!0}),p._RANGE_HIGHLIGHT=r.ModelDecorationOptions.register({description:"codeeditor-range-highlight",stickiness:1,className:"rangeHighlight"}),p=Ee([W(0,l.IEditorService)],p),e.RangeHighlightDecorations=p;let u=class extends t.Widget{constructor(h,g,d,m,b){super();if(this.editor=h,this.label=g,this.themeService=b,this._onClick=this._register(new _.Emitter),this.onClick=this._onClick.event,this._domNode=(0,D.$)(".floating-click-widget"),this._domNode.style.padding="10px",this._domNode.style.cursor="pointer",d){const E=m.lookupKeybinding(d);E&&(this.label+=` (${E.getLabel()})`)}}getId(){return"editor.overlayWidget.floatingClickWidget"}getDomNode(){return this._domNode}getPosition(){return{preference:1}}render(){(0,D.clearNode)(this._domNode),this._register((0,I.attachStylerCallback)(this.themeService,{buttonBackground:w.buttonBackground,buttonForeground:w.buttonForeground,editorBackground:w.editorBackground,editorForeground:w.editorForeground,contrastBorder:w.contrastBorder},h=>{const g=h.buttonBackground?h.buttonBackground:h.editorBackground;g&&(this._domNode.style.backgroundColor=g.toString());const d=h.buttonForeground?h.buttonForeground:h.editorForeground;d&&(this._domNode.style.color=d.toString());const m=h.contrastBorder?h.contrastBorder.toString():"";this._domNode.style.borderWidth=m?"1px":"",this._domNode.style.borderStyle=m?"solid":"",this._domNode.style.borderColor=m})),(0,D.append)(this._domNode,(0,D.$)("")).textContent=this.label,this.onclick(this._domNode,h=>this._onClick.fire()),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}};u=Ee([W(3,A.IKeybindingService),W(4,k.IThemeService)],u),e.FloatingClickWidget=u;let a=class Uo extends c.Disposable{constructor(h,g,d,m,b){super();this.editor=h,this.instantiationService=g,this.hostService=d,this.contextService=m,this.fileService=b,this.update(),this.registerListeners()}static get(h){return h.getContribution(Uo.ID)}registerListeners(){this._register(this.editor.onDidChangeModel(h=>this.update()))}update(){if(!this.shouldShowButton(this.editor)){this.disposeOpenWorkspaceWidgetRenderer();return}this.createOpenWorkspaceWidgetRenderer()}shouldShowButton(h){const g=h.getModel();if(!g||!(0,o.hasWorkspaceFileExtension)(g.uri)||!this.fileService.hasProvider(g.uri)||(0,o.isTemporaryWorkspace)(this.contextService.getWorkspace()))return!1;if(this.contextService.getWorkbenchState()===3){const d=this.contextService.getWorkspace().configuration;if(d&&(0,S.isEqual)(d,g.uri))return!1}return!h.getOption(54)}createOpenWorkspaceWidgetRenderer(){this.openWorkspaceButton||(this.openWorkspaceButton=this.instantiationService.createInstance(u,this.editor,(0,i.localize)(0,null),null),this._register(this.openWorkspaceButton.onClick(()=>{const h=this.editor.getModel();h&&this.hostService.openWindow([{workspaceUri:h.uri}])})),this.openWorkspaceButton.render())}disposeOpenWorkspaceWidgetRenderer(){(0,c.dispose)(this.openWorkspaceButton),this.openWorkspaceButton=void 0}dispose(){this.disposeOpenWorkspaceWidgetRenderer(),super.dispose()}};a.ID="editor.contrib.openWorkspaceButton",a=Ee([W(1,v.IInstantiationService),W(2,C.IHostService),W(3,o.IWorkspaceContextService),W(4,s.IFileService)],a),e.OpenWorkspaceButtonContribution=a}),define(ne[2376],re([1,0,1455,39,2,298,5,8,26,229]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var v;(function(o){o[o.Hidden=0]="Hidden",o[o.HintWhitespace=1]="HintWhitespace"})(v||(v={}));let C=class extends _.Disposable{constructor(c,i,S,s){super();this._diffEditor=c,this._instantiationService=i,this._configurationService=S,this._notificationService=s,this._helperWidget=null,this._helperWidgetListener=null,this._state=0,this._diffEditor instanceof w.EmbeddedDiffEditorWidget||this._register(this._diffEditor.onDidUpdateDiff(()=>{const l=this._diffEditor.getDiffComputationResult();this._setState(this._deduceState(l)),l&&l.quitEarly&&this._notificationService.prompt(I.Severity.Warning,t.localize(0,null,this._diffEditor.maxComputationTime),[{label:t.localize(1,null),run:()=>{this._configurationService.updateValue("diffEditor.maxComputationTime",0)}}],{})}))}_deduceState(c){return c&&this._diffEditor.ignoreTrimWhitespace&&c.changes.length===0&&!c.identical?1:0}_setState(c){this._state!==c&&(this._state=c,this._helperWidgetListener&&(this._helperWidgetListener.dispose(),this._helperWidgetListener=null),this._helperWidget&&(this._helperWidget.dispose(),this._helperWidget=null),this._state===1&&(this._helperWidget=this._instantiationService.createInstance(A.FloatingClickWidget,this._diffEditor.getModifiedEditor(),t.localize(2,null),null),this._helperWidgetListener=this._helperWidget.onClick(()=>this._onDidClickHelperWidget()),this._helperWidget.render()))}_onDidClickHelperWidget(){this._state===1&&this._configurationService.updateValue("diffEditor.ignoreTrimWhitespace",!1)}dispose(){super.dispose()}};C.ID="editor.contrib.diffEditorHelper",C=Ee([W(1,k.IInstantiationService),W(2,D.IConfigurationService),W(3,I.INotificationService)],C),(0,f.registerDiffEditorContribution)(C.ID,C)}),define(ne[2377],re([1,0,2,114,50,115,40,69]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionEnablementWorkspaceTrustTransitionParticipant=void 0;let I=class extends t.Disposable{constructor(v,C,o,c,i,S){super();i.isWorkspaceTrustEnabled()&&S.workspaceTrustInitialized.then(()=>{const s=new class{async participate(l){l?await c.updateExtensionsEnablementsWhenWorkspaceTrustChanges():o.remoteAuthority?C.reload():(v.stopExtensionHosts(),await c.updateExtensionsEnablementsWhenWorkspaceTrustChanges(),v.startExtensionHosts())}};this._register(S.addWorkspaceTrustTransitionParticipant(s))})}};I=Ee([W(0,k.IExtensionService),W(1,D.IHostService),W(2,_.IWorkbenchEnvironmentService),W(3,A.IWorkbenchExtensionEnablementService),W(4,f.IWorkspaceTrustEnablementService),W(5,f.IWorkspaceTrustManagementService)],I),e.ExtensionEnablementWorkspaceTrustTransitionParticipant=I}),define(ne[2378],re([1,0,119,40,28,16,1546,100,26,36,69,2,30,11]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionDependencyChecker=void 0;let i=class extends C.Disposable{constructor(s,l,r,p){super();this.extensionService=s,this.extensionsWorkbenchService=l,this.notificationService=r,this.hostService=p,_.CommandsRegistry.registerCommand("workbench.extensions.installMissingDependencies",()=>this.installMissingDependencies()),A.MenuRegistry.appendMenuItem(A.MenuId.CommandPalette,{command:{id:"workbench.extensions.installMissingDependencies",category:(0,k.localize)(0,null),title:(0,k.localize)(1,null)}})}async getUninstalledMissingDependencies(){const s=await this.getAllMissingDependencies(),l=await this.extensionsWorkbenchService.queryLocal();return s.filter(r=>l.every(p=>!(0,D.areSameExtensions)(p.identifier,{id:r})))}async getAllMissingDependencies(){const s=await this.extensionService.getExtensions(),l=s.reduce((p,u)=>(p.add(u.identifier.value.toLowerCase()),p),new Set),r=new Set;for(const p of s)p.extensionDependencies&&p.extensionDependencies.forEach(u=>{l.has(u.toLowerCase())||r.add(u)});return[...r.values()]}async installMissingDependencies(){const s=await this.getUninstalledMissingDependencies();if(s.length){const l=await this.extensionsWorkbenchService.getExtensions(s.map(r=>({id:r})),o.CancellationToken.None);l.length&&(await c.Promises.settled(l.map(r=>this.extensionsWorkbenchService.install(r))),this.notificationService.notify({severity:I.Severity.Info,message:(0,k.localize)(2,null),actions:{primary:[new w.Action("realod",(0,k.localize)(3,null),"",!0,()=>this.hostService.reload())]}}))}else this.notificationService.info((0,k.localize)(4,null))}};i=Ee([W(0,f.IExtensionService),W(1,t.IExtensionsWorkbenchService),W(2,I.INotificationService),W(3,v.IHostService)],i),e.ExtensionDependencyChecker=i}),define(ne[2379],re([1,0,6,34,2,355,23,19,8,95,21,56,140,147,67,30,11,69]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExplorerService=e.UNDO_REDO_SOURCE=void 0,e.UNDO_REDO_SOURCE=new c.UndoRedoSource;let r=class Ho{constructor(a,n,h,g,d,m,b,E,y){this.fileService=a,this.configurationService=n,this.contextService=h,this.clipboardService=g,this.editorService=d,this.uriIdentityService=m,this.bulkEditService=b,this.progressService=E,this.disposables=new _.DisposableStore,this.fileChangeEvents=[],this._sortOrder=this.configurationService.getValue("explorer.sortOrder"),this._lexicographicOptions=this.configurationService.getValue("explorer.sortOrderLexicographicOptions"),this.model=new A.ExplorerModel(this.contextService,this.uriIdentityService,this.fileService,this.configurationService),this.disposables.add(this.model),this.disposables.add(this.fileService.onDidRunOperation(R=>this.onDidRunOperation(R))),this.onFileChangesScheduler=new s.RunOnceScheduler(async()=>{const R=this.fileChangeEvents;this.fileChangeEvents=[];const O=[2];this._sortOrder==="modified"&&O.push(0);let x=!1;this.roots.forEach(F=>{this.view&&!x&&(x=p(F,this.view,R,O))}),R.forEach(F=>{if(!x)for(const L of F.rawAdded){const M=this.model.findClosest((0,D.dirname)(L));if(M&&!M.getChild((0,D.basename)(L))){x=!0;break}}}),x&&await this.refresh(!1)},Ho.EXPLORER_FILE_CHANGES_REACT_DELAY),this.disposables.add(this.fileService.onDidFilesChange(R=>{this.fileChangeEvents.push(R),!this.editable&&(this.onFileChangesScheduler.isScheduled()||this.onFileChangesScheduler.schedule())})),this.disposables.add(this.configurationService.onDidChangeConfiguration(R=>this.onConfigurationUpdated(this.configurationService.getValue(),R))),this.disposables.add(t.Event.any(this.fileService.onDidChangeFileSystemProviderRegistrations,this.fileService.onDidChangeFileSystemProviderCapabilities)(async R=>{let O=!1;this.model.roots.forEach(x=>{x.resource.scheme===R.scheme&&(O=!0,x.forgetChildren())}),O&&this.view&&await this.view.setTreeInput()})),this.disposables.add(this.model.onDidChangeRoots(()=>{this.view&&this.view.setTreeInput()}));const T=this.configurationService.getValue("skipRefreshExplorerOnWindowFocus");this.disposables.add(y.onDidChangeFocus(R=>{!T&&R&&this.refresh(!1)}))}get roots(){return this.model.roots}get sortOrderConfiguration(){return{sortOrder:this._sortOrder,lexicographicOptions:this._lexicographicOptions}}registerView(a){this.view=a}getContext(a,n=!1){if(!this.view)return[];const h=new Set(this.view.getContext(a));return n&&h.forEach(g=>{if(g.nestedChildren)for(const d of g.nestedChildren)h.add(d)}),[...h]}async applyBulkEdit(a,n){const h=new S.CancellationTokenSource,g=this.progressService.withProgress({location:n.progressLocation||10,title:n.progressLabel,cancellable:a.length>1,delay:500},async d=>{await this.bulkEditService.apply(a,{undoRedoSource:e.UNDO_REDO_SOURCE,label:n.undoLabel,code:"undoredo.explorerOperation",progress:d,token:h.token,confirmBeforeUndo:n.confirmBeforeUndo})},()=>h.cancel());await this.progressService.withProgress({location:1,delay:500},()=>g),h.dispose()}hasViewFocus(){return!!this.view&&this.view.hasFocus()}findClosest(a){return this.model.findClosest(a)}findClosestRoot(a){const n=this.model.roots.filter(h=>this.uriIdentityService.extUri.isEqualOrParent(a,h.resource)).sort((h,g)=>g.resource.path.length-h.resource.path.length);return n.length?n[0]:null}async setEditable(a,n){if(!this.view)return;n?this.editable={stat:a,data:n}:this.editable=void 0;const h=this.isEditable(a);await this.view.setEditable(a,h),!this.editable&&this.fileChangeEvents.length&&!this.onFileChangesScheduler.isScheduled()&&this.onFileChangesScheduler.schedule()}async setToCopy(a,n){const h=this.cutItems;this.cutItems=n?a:void 0,await this.clipboardService.writeResources(a.map(g=>g.resource)),this.view?.itemsCopied(a,n,h)}isCut(a){return!!this.cutItems&&this.cutItems.some(n=>this.uriIdentityService.extUri.isEqual(n.resource,a.resource))}getEditable(){return this.editable}getEditableData(a){return this.editable&&this.editable.stat===a?this.editable.data:void 0}isEditable(a){return!!this.editable&&(this.editable.stat===a||!a)}async select(a,n){if(!this.view)return;const h=this.findClosest(a);if(h)return await this.view.selectResource(h.resource,n),Promise.resolve(void 0);const g={resolveTo:[a],resolveMetadata:this._sortOrder==="modified"},d=this.findClosestRoot(a);if(!!d)try{const m=await this.fileService.resolve(d.resource,g),b=A.ExplorerItem.create(this.fileService,this.configurationService,m,void 0,g.resolveTo);A.ExplorerItem.mergeLocalWithDisk(b,d);const E=d.find(a);await this.view.refresh(!0,d),await this.view.selectResource(E?E.resource:void 0,n)}catch{d.isError=!0,await this.view.refresh(!1,d)}}async refresh(a=!0){if(this.model.roots.forEach(n=>n.forgetChildren()),this.view){await this.view.refresh(!0);const n=this.editorService.activeEditor?.resource,h=this.configurationService.getValue().explorer.autoReveal;a&&n&&h&&this.select(n,h)}}async onDidRunOperation(a){if(a.isOperation(0)||a.isOperation(3)){const n=a.target,h=(0,D.dirname)(n.resource),g=this.model.findAll(h);g.length&&await Promise.all(g.map(async d=>{const m=this._sortOrder==="modified";if(!d.isDirectoryResolved){const E=await this.fileService.resolve(d.resource,{resolveMetadata:m});if(E){const y=A.ExplorerItem.create(this.fileService,this.configurationService,E,d.parent);A.ExplorerItem.mergeLocalWithDisk(y,d)}}const b=A.ExplorerItem.create(this.fileService,this.configurationService,n,d.parent);d.removeChild(b),d.addChild(b),await this.view?.refresh(!1,d)}))}else if(a.isOperation(2)){const n=a.resource,h=a.target,g=(0,D.dirname)(n),d=(0,D.dirname)(h.resource),m=this.model.findAll(n);if(m.every(E=>!E.nestedParent)&&this.uriIdentityService.extUri.isEqual(g,d))await Promise.all(m.map(async E=>{E.rename(h),await this.view?.refresh(!1,E.parent)}));else{const E=this.model.findAll(d);E.length&&m.length&&await Promise.all(m.map(async(y,T)=>{const R=y.parent,O=y.nestedParent;y.move(E[T]),O&&await this.view?.refresh(!1,O),await this.view?.refresh(!1,R),await this.view?.refresh(!1,E[T])}))}}else if(a.isOperation(1)){const n=this.model.findAll(a.resource);await Promise.all(n.map(async h=>{if(h.parent){const g=h.parent;g.removeChild(h);const d=h.nestedParent;d&&(d.removeChild(h),await this.view?.refresh(!1,d)),await this.view?.refresh(!1,g)}}))}}async onConfigurationUpdated(a,n){let h=!1;n?.affectedKeys.some(m=>m.startsWith("explorer.experimental.fileNesting."))&&(h=!0);const g=a?.explorer?.sortOrder||"default";this._sortOrder!==g&&(h=this._sortOrder!==void 0,this._sortOrder=g);const d=a?.explorer?.sortOrderLexicographicOptions||"default";this._lexicographicOptions!==d&&(h=h||this._lexicographicOptions!==void 0,this._lexicographicOptions=d),h&&await this.refresh()}dispose(){this.disposables.dispose()}};r.EXPLORER_FILE_CHANGES_REACT_DELAY=500,r=Ee([W(0,k.IFileService),W(1,I.IConfigurationService),W(2,f.IWorkspaceContextService),W(3,w.IClipboardService),W(4,v.IEditorService),W(5,C.IUriIdentityService),W(6,o.IBulkEditService),W(7,i.IProgressService),W(8,l.IHostService)],r),e.ExplorerService=r;function p(u,a,n,h){for(let[g,d]of u.children)if(a.isItemVisible(d)&&(n.some(m=>m.contains(d.resource,...h))||d.isDirectory&&d.isDirectoryResolved&&p(d,a,n,h)))return!0;return!1}}),define(ne[2380],re([1,0,1590,2,9,8,34,55,26,41,48,56,69,610]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceWatcher=void 0;let i=class extends f.Disposable{constructor(s,l,r,p,u,a,n){super();this.fileService=s,this.configurationService=l,this.contextService=r,this.notificationService=p,this.openerService=u,this.uriIdentityService=a,this.hostService=n,this.watchedWorkspaces=new D.ResourceMap(h=>this.uriIdentityService.extUri.getComparisonKey(h)),this.registerListeners(),this.refresh()}registerListeners(){this._register(this.contextService.onDidChangeWorkspaceFolders(s=>this.onDidChangeWorkspaceFolders(s))),this._register(this.contextService.onDidChangeWorkbenchState(()=>this.onDidChangeWorkbenchState())),this._register(this.configurationService.onDidChangeConfiguration(s=>this.onDidChangeConfiguration(s))),this._register(this.fileService.onDidWatchError(s=>this.onDidWatchError(s)))}onDidChangeWorkspaceFolders(s){for(const l of s.removed)this.unwatchWorkspace(l);for(const l of s.added)this.watchWorkspace(l)}onDidChangeWorkbenchState(){this.refresh()}onDidChangeConfiguration(s){(s.affectsConfiguration("files.watcherExclude")||s.affectsConfiguration("files.watcherInclude"))&&this.refresh()}onDidWatchError(s){const l=s.toString();l.indexOf("ENOSPC")>=0?this.notificationService.prompt(I.Severity.Warning,(0,t.localize)(0,null),[{label:(0,t.localize)(1,null),run:()=>this.openerService.open(_.URI.parse("https://go.microsoft.com/fwlink/?linkid=867693"))}],{sticky:!0,neverShowAgain:{id:"ignoreEnospcError",isSecondary:!0,scope:I.NeverShowAgainScope.WORKSPACE}}):l.indexOf("EUNKNOWN")>=0&&this.notificationService.prompt(I.Severity.Warning,(0,t.localize)(2,null),[{label:(0,t.localize)(3,null),run:()=>this.hostService.reload()}],{sticky:!0,silent:!0})}watchWorkspace(s){const l=[],r=this.configurationService.getValue({resource:s.uri});if(r.files?.watcherExclude)for(const a in r.files.watcherExclude)r.files.watcherExclude[a]===!0&&l.push(a);const p=new D.ResourceMap(a=>this.uriIdentityService.extUri.getComparisonKey(a));if(p.set(s.uri,s.uri),r.files?.watcherInclude){for(const a of r.files.watcherInclude)if(!!a)if((0,v.isAbsolute)(a)){const n=_.URI.file(a).with({scheme:s.uri.scheme});this.uriIdentityService.extUri.isEqualOrParent(n,s.uri)&&p.set(n,n)}else{const n=s.toResource(a);p.set(n,n)}}const u=new f.DisposableStore;for(const[,a]of p)u.add(this.fileService.watch(a,{recursive:!0,excludes:l}));this.watchedWorkspaces.set(s.uri,u)}unwatchWorkspace(s){this.watchedWorkspaces.has(s.uri)&&((0,f.dispose)(this.watchedWorkspaces.get(s.uri)),this.watchedWorkspaces.delete(s.uri))}refresh(){this.unwatchWorkspaces();for(const s of this.contextService.getWorkspace().folders)this.watchWorkspace(s)}unwatchWorkspaces(){for(const[,s]of this.watchedWorkspaces)s.dispose();this.watchedWorkspaces.clear()}dispose(){super.dispose(),this.unwatchWorkspaces()}};i=Ee([W(0,c.IWorkbenchFileService),W(1,A.IConfigurationService),W(2,k.IWorkspaceContextService),W(3,I.INotificationService),W(4,w.IOpenerService),W(5,C.IUriIdentityService),W(6,o.IHostService)],i),e.WorkspaceWatcher=i}),define(ne[2381],re([1,0,1881,48,22,18,51,14,19,9,121,107,46,26,69,856,867,23,60,79]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CachedExtensionScanner=void 0;let u=null;function a(){return u||(u=f.normalize(f.join(A.FileAccess.asFileUri("",Q).fsPath,"..","extensions"))),u}let n=null;function h(){return n||(n=f.normalize(f.join(A.FileAccess.asFileUri("",Q).fsPath,"..",".build","builtInExtensions"))),n}let g=class{constructor(y,T,R,O,x,F){this._notificationService=y,this._environmentService=T,this._hostService=R,this._productService=O,this._fileService=x,this._extensionManagementService=F,this.scannedExtensions=new Promise((L,M)=>{this._scannedExtensionsResolve=L,this._scannedExtensionsReject=M}),this.translationConfig=this._readTranslationConfig()}async scanSingleExtension(y,T,R){const O=await this.translationConfig,x=this._productService.version,F=this._productService.commit,L=this._productService.date,M=!this._environmentService.isBuilt,N=D.language,B=await this._extensionManagementService.getTargetPlatform(),P=new S.ExtensionScannerInput(x,L,F,N,M,y,T,!1,B,O);return S.ExtensionScanner.scanSingleExtension(P,R,this._fileService)}async startScanningExtensions(y){try{const T=await this.translationConfig,{system:R,user:O,development:x}=await this._scanInstalledExtensions(y,T),F=(0,s.dedupExtensions)(R,O,x,y);this._scannedExtensionsResolve(F)}catch(T){this._scannedExtensionsReject(T)}}async _validateExtensionsCache(y,T){const R=f.join(this._environmentService.userDataPath,C.MANIFEST_CACHE_FOLDER),O=f.join(R,y),x=JSON.parse(JSON.stringify(await S.ExtensionScanner.scanExtensions(T,new b,this._fileService))),F=await this._readExtensionCache(y);if(!F)return;const L=F.result;if(!k.equals(x,L)){try{await this._fileService.del(w.URI.file(O))}catch(M){_.onUnexpectedError(M),console.error(M)}this._notificationService.prompt(c.Severity.Error,t.localize(0,null),[{label:t.localize(1,null),run:()=>this._hostService.reload()}])}}async _readExtensionCache(y){const T=f.join(this._environmentService.userDataPath,C.MANIFEST_CACHE_FOLDER),R=f.join(T,y);try{const O=await this._fileService.readFile(w.URI.file(R));return JSON.parse(O.value.toString())}catch{}return null}async _writeExtensionCache(y,T){const R=f.join(this._environmentService.userDataPath,C.MANIFEST_CACHE_FOLDER),O=f.join(R,y);try{await this._fileService.createFolder(w.URI.file(R))}catch{}try{await this._fileService.writeFile(w.URI.file(O),r.VSBuffer.fromString(JSON.stringify(T)))}catch{}}async _scanExtensionsWithCache(y,T,R){if(T.devMode)return S.ExtensionScanner.scanExtensions(T,R,this._fileService);try{const L=await this._fileService.stat(w.URI.file(T.absoluteFolderPath));typeof L.mtime=="number"&&(T.mtime=L.mtime)}catch{}const O=await this._readExtensionCache(y);if(O&&O.input&&S.ExtensionScannerInput.equals(O.input,T))return setTimeout(async()=>{try{await this._validateExtensionsCache(y,T)}catch(L){_.onUnexpectedError(L)}},5e3),O.result.map(L=>(L.extensionLocation=w.URI.revive(L.extensionLocation),L));const x=new m(R),F=await S.ExtensionScanner.scanExtensions(T,x,this._fileService);if(x.errorCnt===0){const L={input:T,result:F};await this._writeExtensionCache(y,L)}return F}async _readTranslationConfig(){if(D.translationsConfigFile)try{const y=await this._fileService.readFile(w.URI.file(D.translationsConfigFile));return JSON.parse(y.value.toString())}catch{}return Object.create(null)}async _scanInstalledExtensions(y,T){const R=this._productService.version,O=this._productService.commit,x=this._productService.date,F=!this._environmentService.isBuilt,L=D.language,M=await this._extensionManagementService.getTargetPlatform(),N=this._scanExtensionsWithCache(C.BUILTIN_MANIFEST_CACHE_FILE,new S.ExtensionScannerInput(R,x,O,L,F,a(),!0,!1,M,T),y);let B=N;if(F){const z=Promise.resolve(this._productService.builtInExtensions||[]),U=(0,I.joinPath)(this._environmentService.userHome,".vscode-oss-dev","extensions","control.json").fsPath,H=this._fileService.readFile(w.URI.file(U)).then(q=>JSON.parse(q.value.toString()),()=>({})),K=new S.ExtensionScannerInput(R,x,O,L,F,h(),!0,!1,M,T),G=Promise.all([z,H]).then(([q,Z])=>new d(q,Z)).then(q=>S.ExtensionScanner.scanExtensions(K,y,this._fileService,q));B=S.ExtensionScanner.mergeBuiltinExtensions(N,G)}const P=this._scanExtensionsWithCache(C.USER_MANIFEST_CACHE_FILE,new S.ExtensionScannerInput(R,x,O,L,F,this._environmentService.extensionsPath,!1,!1,M,T),y);let V=Promise.resolve([]);if(this._environmentService.isExtensionDevelopment&&this._environmentService.extensionDevelopmentLocationURI){const z=this._environmentService.extensionDevelopmentLocationURI.filter(U=>U.scheme===A.Schemas.file).map(U=>S.ExtensionScanner.scanOneOrMultipleExtensions(new S.ExtensionScannerInput(R,x,O,L,F,(0,I.originalFSPath)(U),!1,!0,M,T),y,this._fileService));V=Promise.all(z).then(U=>{let H=[];for(let K of U)H=H.concat(K);return H})}return Promise.all([B,P,V]).then(z=>{const U=z[0],H=z[1],K=z[2];return{system:U,user:H,development:K}}).then(void 0,z=>(y.error("Error scanning installed extensions:"),y.error(z),{system:[],user:[],development:[]}))}};g=Ee([W(0,c.INotificationService),W(1,v.INativeWorkbenchEnvironmentService),W(2,i.IHostService),W(3,o.IProductService),W(4,l.IFileService),W(5,p.IExtensionManagementService)],g),e.CachedExtensionScanner=g;class d{constructor(y,T){this.builtInExtensions=y,this.control=T}resolveExtensions(){const y=[];for(const T of this.builtInExtensions){const R=this.control[T.name]||"marketplace";switch(R){case"disabled":break;case"marketplace":y.push({name:T.name,path:f.join(h(),T.name)});break;default:y.push({name:T.name,path:R});break}}return Promise.resolve(y)}}class m{constructor(y){this._actual=y,this.errorCnt=0,this.warnCnt=0,this.infoCnt=0}error(y){this.errorCnt++,this._actual.error(y)}warn(y){this.warnCnt++,this._actual.warn(y)}info(y){this.infoCnt++,this._actual.info(y)}}class b{error(y){}warn(y){}info(y){}}}),define(ne[2382],re([1,0,6,69,87,35,45,50,213,2,1967,121,103]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let c=class extends v.NativeHostService{constructor(s,l){super(s.window.id,l)}};c=Ee([W(0,C.INativeWorkbenchEnvironmentService),W(1,o.IMainProcessService)],c);let i=class extends w.Disposable{constructor(s,l,r){super();this.nativeHostService=s,this.labelService=l,this.environmentService=r,this._onDidChangeFocus=t.Event.latch(t.Event.any(t.Event.map(t.Event.filter(this.nativeHostService.onDidFocusWindow,p=>p===this.nativeHostService.windowId),()=>this.hasFocus),t.Event.map(t.Event.filter(this.nativeHostService.onDidBlurWindow,p=>p===this.nativeHostService.windowId),()=>this.hasFocus)),void 0,this._store)}get onDidChangeFocus(){return this._onDidChangeFocus}get hasFocus(){return document.hasFocus()}async hadLastFocus(){const s=await this.nativeHostService.getActiveWindowId();return typeof s=="undefined"?!1:s===this.nativeHostService.windowId}openWindow(s,l){return Array.isArray(s)?this.doOpenWindow(s,l):this.doOpenEmptyWindow(s)}doOpenWindow(s,l){const r=this.environmentService.remoteAuthority;return r&&(s.forEach(p=>p.label=p.label||this.getRecentLabel(p)),l?.remoteAuthority===void 0&&(l=l?{...l,remoteAuthority:r}:{remoteAuthority:r})),this.nativeHostService.openWindow(s,l)}getRecentLabel(s){return(0,I.isFolderToOpen)(s)?this.labelService.getWorkspaceLabel(s.folderUri,{verbose:!0}):(0,I.isWorkspaceToOpen)(s)?this.labelService.getWorkspaceLabel({id:"",configPath:s.workspaceUri},{verbose:!0}):this.labelService.getUriLabel(s.fileUri)}doOpenEmptyWindow(s){const l=this.environmentService.remoteAuthority;return!!l&&s?.remoteAuthority===void 0&&(s=s?{...s,remoteAuthority:l}:{remoteAuthority:l}),this.nativeHostService.openWindow(s)}toggleFullScreen(){return this.nativeHostService.toggleFullScreen()}focus(s){return this.nativeHostService.focusWindow(s)}restart(){return this.nativeHostService.relaunch()}reload(s){return this.nativeHostService.reload(s)}close(){return this.nativeHostService.closeWindow()}};i=Ee([W(0,_.INativeHostService),W(1,k.ILabelService),W(2,D.IWorkbenchEnvironmentService)],i),(0,A.registerSingleton)(f.IHostService,i,!0),(0,A.registerSingleton)(_.INativeHostService,c,!0)}),define(ne[219],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IHoverService=void 0,e.IHoverService=(0,t.createDecorator)("hoverService")}),define(ne[2383],re([1,0,138,117,11,8,10,219,12]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EnvironmentVariableInfoWidget=void 0;let w=class extends t.Widget{constructor(C,o,c){super();this._info=C,this._configurationService=o,this._hoverService=c,this.id="env-var-info"}get requiresAction(){return this._info.requiresAction}attach(C){this._container=C,this._domNode=document.createElement("div"),this._domNode.classList.add("terminal-env-var-info",...I.ThemeIcon.asClassNameArray(this._info.getIcon())),this.requiresAction&&this._domNode.classList.add("requires-action"),C.appendChild(this._domNode);const o=new _.RunOnceScheduler(()=>this._showHover(),this._configurationService.getValue("workbench.hover.delay"));this._register(o);const c={x:0,y:0};this.onmouseover(this._domNode,i=>{c.x=i.browserEvent.pageX,c.y=i.browserEvent.pageY,o.schedule(),this._mouseMoveListener=k.addDisposableListener(this._domNode,k.EventType.MOUSE_MOVE,S=>{(Math.abs(S.pageX-c.x)>window.devicePixelRatio*2||Math.abs(S.pageY-c.y)>window.devicePixelRatio*2)&&(c.x=S.pageX,c.y=S.pageY,o.schedule())})}),this.onnonbubblingmouseout(this._domNode,()=>{o.cancel(),this._mouseMoveListener?.dispose()})}dispose(){super.dispose(),this._domNode?.parentElement?.removeChild(this._domNode),this._mouseMoveListener?.dispose()}focus(){this._showHover(!0)}_showHover(C){if(!(!this._domNode||!this._container)){if(!this._hoverOptions){const o=this._info.getActions?this._info.getActions():void 0;this._hoverOptions={target:this._domNode,content:new f.MarkdownString(this._info.getInfo()),actions:o}}this._hoverService.showHover(this._hoverOptions,C)}}};w=Ee([W(1,A.IConfigurationService),W(2,D.IHoverService)],w),e.EnvironmentVariableInfoWidget=w}),define(ne[2384],re([1,0,2,138,10,219,12,32,8]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalHover=void 0;const w=_.$;let v=class extends t.Disposable{constructor(c,i,S,s,l,r){super();this._targetOptions=c,this._text=i,this._actions=S,this._linkHandler=s,this._hoverService=l,this._configurationService=r,this.id="hover"}dispose(){super.dispose()}attach(c){if(!this._configurationService.getValue("terminal.integrated.showLinkHover"))return;const S=new C(c,this._targetOptions),s=this._hoverService.showHover({target:S,content:this._text,actions:this._actions,linkHandler:this._linkHandler,additionalClasses:["xterm-hover"]});s&&this._register(s)}};v=Ee([W(4,A.IHoverService),W(5,I.IConfigurationService)],v),e.TerminalHover=v;class C extends f.Widget{constructor(c,i){super();this._options=i,this._targetElements=[],this._domNode=w("div.terminal-hover-targets.xterm-hover");const S=this._options.viewportRange.end.y-this._options.viewportRange.start.y+1,s=(this._options.viewportRange.end.y>this._options.viewportRange.start.y?this._options.terminalDimensions.width-this._options.viewportRange.start.x:this._options.viewportRange.end.x-this._options.viewportRange.start.x+1)*this._options.cellDimensions.width,l=w("div.terminal-hover-target.hoverHighlight");if(l.style.left=`${this._options.viewportRange.start.x*this._options.cellDimensions.width}px`,l.style.bottom=`${(this._options.terminalDimensions.height-this._options.viewportRange.start.y-1)*this._options.cellDimensions.height}px`,l.style.width=`${s}px`,l.style.height=`${this._options.cellDimensions.height}px`,this._targetElements.push(this._domNode.appendChild(l)),S>2){const r=w("div.terminal-hover-target.hoverHighlight");r.style.left="0px",r.style.bottom=`${(this._options.terminalDimensions.height-this._options.viewportRange.start.y-1-(S-2))*this._options.cellDimensions.height}px`,r.style.width=`${this._options.terminalDimensions.width*this._options.cellDimensions.width}px`,r.style.height=`${(S-2)*this._options.cellDimensions.height}px`,this._targetElements.push(this._domNode.appendChild(r))}if(S>1){const r=w("div.terminal-hover-target.hoverHighlight");r.style.left="0px",r.style.bottom=`${(this._options.terminalDimensions.height-this._options.viewportRange.end.y-1)*this._options.cellDimensions.height}px`,r.style.width=`${(this._options.viewportRange.end.x+1)*this._options.cellDimensions.width}px`,r.style.height=`${this._options.cellDimensions.height}px`,this._targetElements.push(this._domNode.appendChild(r))}if(this._options.modifierDownCallback&&this._options.modifierUpCallback){let r=!1;this._register(_.addDisposableListener(document,"keydown",p=>{p.ctrlKey&&!r&&(r=!0,this._options.modifierDownCallback())})),this._register(_.addDisposableListener(document,"keyup",p=>{p.ctrlKey||(r=!1,this._options.modifierUpCallback())}))}c.appendChild(this._domNode)}get targetElements(){return this._targetElements}dispose(){this._domNode?.parentElement?.removeChild(this._domNode),super.dispose()}}(0,k.registerThemingParticipant)((o,c)=>{let i=o.getColor(D.editorHoverHighlight);i&&(i.isOpaque()&&(i=i.transparent(.5)),c.addRule(`.integrated-terminal .hoverHighlight { background-color: ${i}; }`))})}),define(ne[2385],re([1,0,2,10,95,12,37,219,6,117,1775,11,8,197,32,326]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationAddon=void 0;var s;(function(n){n.CommandDecoration="terminal-command-decoration",n.ErrorColor="error",n.DefaultColor="default",n.Codicon="codicon",n.XtermDecoration="xterm-decoration",n.OverviewRuler="xterm-decoration-overview-ruler"})(s||(s={}));var l;(function(n){n[n.DefaultDimension=16]="DefaultDimension",n[n.MarginLeft=-17]="MarginLeft"})(l||(l={}));let r=class extends t.Disposable{constructor(h,g,d,m,b,E){super();this._capabilities=h,this._clipboardService=g,this._contextMenuService=d,this._hoverService=m,this._configurationService=b,this._themeService=E,this._contextMenuVisible=!1,this._decorations=new Map,this._onDidRequestRunCommand=this._register(new I.Emitter),this.onDidRequestRunCommand=this._onDidRequestRunCommand.event,this._register((0,t.toDisposable)(()=>this.clearDecorations(!0))),this._register(this._contextMenuService.onDidShowContextMenu(()=>this._contextMenuVisible=!0)),this._register(this._contextMenuService.onDidHideContextMenu(()=>this._contextMenuVisible=!1)),this._hoverDelayer=this._register(new C.Delayer(this._configurationService.getValue("workbench.hover.delay"))),this._configurationService.onDidChangeConfiguration(y=>{y.affectsConfiguration("terminal.integrated.shellIntegration.decorationIcon")||y.affectsConfiguration("terminal.integrated.shellIntegration.decorationIconSuccess")||y.affectsConfiguration("terminal.integrated.shellIntegration.decorationIconError")?this._refreshStyles():(y.affectsConfiguration("terminal.integrated.fontSize")||y.affectsConfiguration("terminal.integrated.lineHeight"))&&this.refreshLayouts()}),this._themeService.onDidColorThemeChange(()=>this._refreshStyles(!0))}refreshLayouts(){this._updateLayout(this._placeholderDecoration?.element);for(const h of this._decorations)this._updateLayout(h[1].decoration.element)}_refreshStyles(h){if(h)for(const g of this._decorations.values()){let d=g.exitCode===void 0?a:g.exitCode?u:p;d&&typeof d!="string"?d=d.toString():d="",g.decoration.overviewRulerOptions?g.decoration.overviewRulerOptions.color=d:g.decoration.overviewRulerOptions={color:d}}this._updateClasses(this._placeholderDecoration?.element);for(const g of this._decorations.values())this._updateClasses(g.decoration.element,g.exitCode)}clearDecorations(h){h&&(this._commandStartedListener?.dispose(),this._commandFinishedListener?.dispose()),this._placeholderDecoration?.dispose(),this._placeholderDecoration?.marker.dispose();for(const g of this._decorations.values())g.decoration.dispose(),(0,t.dispose)(g.disposables);this._decorations.clear()}_attachToCommandCapability(){this._capabilities.has(2)?(this._addCommandFinishedListener(),this._addCommandStartedListener()):this._register(this._capabilities.onDidAddCapability(h=>{h===2&&(this._addCommandFinishedListener(),this._addCommandStartedListener())})),this._register(this._capabilities.onDidRemoveCapability(h=>{h===2&&(this._commandStartedListener?.dispose(),this._commandFinishedListener?.dispose())}))}_addCommandStartedListener(){if(this._commandStartedListener)return;const h=this._capabilities.get(2);!h||(h.executingCommandObject?.marker&&this.registerCommandDecoration(h.executingCommandObject,!0),this._commandStartedListener=h.onCommandStarted(g=>this.registerCommandDecoration(g,!0)))}_addCommandFinishedListener(){if(this._commandFinishedListener)return;const h=this._capabilities.get(2);if(!!h){for(const g of h.commands)this.registerCommandDecoration(g);this._commandFinishedListener=h.onCommandFinished(g=>{if(g.command.trim().toLowerCase()==="clear"||g.command.trim().toLowerCase()==="cls"){this.clearDecorations();return}this.registerCommandDecoration(g)})}}activate(h){this._terminal=h,this._attachToCommandCapability()}registerCommandDecoration(h,g){if(!this._terminal)return;if(!h.marker)throw new Error(`cannot add a decoration for a command ${JSON.stringify(h)} with no marker`);this._placeholderDecoration?.dispose();let d=h.exitCode===void 0?a:h.exitCode?u:p;d&&typeof d!="string"?d=d.toString():d="";const m=this._terminal.registerDecoration({marker:h.marker,overviewRulerOptions:g?void 0:{color:d,position:h.exitCode?"right":"left"}});if(!!m)return m.onRender(b=>{b.classList.contains("xterm-decoration-overview-ruler")||(g&&!this._placeholderDecoration?(this._placeholderDecoration=m,this._placeholderDecoration.onDispose(()=>this._placeholderDecoration=void 0)):(m.onDispose(()=>this._decorations.delete(m.marker.id)),this._decorations.set(m.marker.id,{decoration:m,disposables:h.exitCode===void 0?[]:[this._createContextMenu(b,h),...this._createHover(b,h)],exitCode:h.exitCode})),(!b.classList.contains("codicon")||h.marker?.line===0)&&(this._updateLayout(b),this._updateClasses(b,h.exitCode)))}),m}_updateLayout(h){if(!h)return;const g=this._configurationService.inspect("terminal.integrated.fontSize").value,d=this._configurationService.inspect("terminal.integrated.fontSize").defaultValue,m=this._configurationService.inspect("terminal.integrated.lineHeight").value;if(typeof g=="number"&&typeof d=="number"&&typeof m=="number"){const b=g/d<=1?g/d:1;h.style.width=`${b*16}px`,h.style.height=`${b*16*m}px`,h.style.fontSize=`${b*16}px`,h.style.marginLeft=`${b*-17}px`}}_updateClasses(h,g){if(!!h){for(const d of h.classList)h.classList.remove(d);h.classList.add("terminal-command-decoration","codicon","xterm-decoration"),g===void 0?(h.classList.add("default"),h.classList.add(`codicon-${this._configurationService.getValue("terminal.integrated.shellIntegration.decorationIcon")}`)):g?(h.classList.add("error"),h.classList.add(`codicon-${this._configurationService.getValue("terminal.integrated.shellIntegration.decorationIconError")}`)):h.classList.add(`codicon-${this._configurationService.getValue("terminal.integrated.shellIntegration.decorationIconSuccess")}`)}}_createContextMenu(h,g){return f.addDisposableListener(h,f.EventType.CLICK,async()=>{this._hideHover();const d=await this._getCommandActions(g);this._contextMenuService.showContextMenu({getAnchor:()=>h,getActions:()=>d})})}_createHover(h,g){return[f.addDisposableListener(h,f.EventType.MOUSE_ENTER,()=>{this._contextMenuVisible||this._hoverDelayer.trigger(()=>{let d=`${(0,v.localize)(0,null)}...`;d+=` --- `,g.exitCode?g.exitCode===-1?d+=(0,v.localize)(1,null,(0,c.fromNow)(g.timestamp,!0)):d+=(0,v.localize)(2,null,(0,c.fromNow)(g.timestamp,!0),g.exitCode):d+=(0,v.localize)(3,null,(0,c.fromNow)(g.timestamp,!0)),this._hoverService.showHover({content:new w.MarkdownString(d),target:h})})}),f.addDisposableListener(h,f.EventType.MOUSE_LEAVE,()=>this._hideHover()),f.addDisposableListener(h,f.EventType.MOUSE_OUT,()=>this._hideHover())]}_hideHover(){this._hoverDelayer.cancel(),this._hoverService.hideHover()}async _getCommandActions(h){const g=[];return h.hasOutput&&g.push({class:"copy-output",tooltip:"Copy Output",dispose:()=>{},id:"terminal.copyOutput",label:(0,v.localize)(4,null),enabled:!0,run:()=>this._clipboardService.writeText(h.getOutput())}),g.push({class:"rerun-command",tooltip:"Rerun Command",dispose:()=>{},id:"terminal.rerunCommand",label:(0,v.localize)(5,null),enabled:!0,run:()=>this._onDidRequestRunCommand.fire(h.command)}),g}};r=Ee([W(1,_.IClipboardService),W(2,k.IContextMenuService),W(3,D.IHoverService),W(4,o.IConfigurationService),W(5,A.IThemeService)],r),e.DecorationAddon=r;let p,u,a;(0,A.registerThemingParticipant)((n,h)=>{p=n.getColor(S.TERMINAL_COMMAND_DECORATION_SUCCESS_BACKGROUND_COLOR),u=n.getColor(S.TERMINAL_COMMAND_DECORATION_ERROR_BACKGROUND_COLOR),a=n.getColor(S.TERMINAL_COMMAND_DECORATION_DEFAULT_BACKGROUND_COLOR);const g=n.getColor(i.toolbarHoverBackground);p&&h.addRule(`.terminal-command-decoration { color: ${p.toString()}; } `),u&&h.addRule(`.terminal-command-decoration.error { color: ${u.toString()}; } `),a&&h.addRule(`.terminal-command-decoration.default { color: ${a.toString()};} `),g&&h.addRule(`.terminal-command-decoration:not(.default):hover { background-color: ${g.toString()}; }`)})}),define(ne[2386],re([1,0,8,2,188,120,77,31,24,26,2228,1776,12,43,32,82,326,2006,5,2385,6]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.XtermTerminal=void 0;const a=50,n=20;let h,g,d,m,b=class Ri extends f.DisposableStore{constructor(y,T,R,O,x,F,L,M,N,B,P,V,z){super();this._configHelper=T,this._capabilities=F,this._configurationService=L,this._instantiationService=M,this._logService=N,this._notificationService=B,this._storageService=P,this._themeService=V,this._viewDescriptorService=z,this._onDidRequestRunCommand=new u.Emitter,this.onDidRequestRunCommand=this._onDidRequestRunCommand.event,this.target=x;const U=this._configHelper.getFont(void 0,!0),H=this._configHelper.config,K=this._configurationService.getValue("editor");this.raw=this.add(new y({cols:R,rows:O,altClickMovesCursor:H.altClickMovesCursor&&K.multiCursorModifier==="alt",scrollback:H.scrollback,theme:this._getXtermTheme(),drawBoldTextInBrightColors:H.drawBoldTextInBrightColors,fontFamily:U.fontFamily,fontWeight:H.fontWeight,fontWeightBold:H.fontWeightBold,fontSize:U.fontSize,letterSpacing:U.letterSpacing,lineHeight:U.lineHeight,minimumContrastRatio:H.minimumContrastRatio,cursorBlink:H.cursorBlinking,cursorStyle:H.cursorStyle==="line"?"bar":H.cursorStyle,cursorWidth:H.cursorWidth,bellStyle:"none",macOptionIsMeta:H.macOptionIsMeta,macOptionClickForcesSelection:H.macOptionClickForcesSelection,rightClickSelectsWord:H.rightClickBehavior==="selectWord",fastScrollModifier:"alt",fastScrollSensitivity:H.fastScrollSensitivity,scrollSensitivity:H.mouseWheelScrollSensitivity,rendererType:this._getBuiltInXtermRenderer(H.gpuAcceleration,Ri._suggestedRendererType),wordSeparator:H.wordSeparators,overviewRulerWidth:10})),this._core=this.raw._core,this.add(this._configurationService.onDidChangeConfiguration(async G=>{G.affectsConfiguration("terminal.integrated.gpuAcceleration")&&(Ri._suggestedRendererType=void 0),(G.affectsConfiguration("terminal.integrated")||G.affectsConfiguration("editor.fastScrollSensitivity")||G.affectsConfiguration("editor.mouseWheelScrollSensitivity")||G.affectsConfiguration("editor.multiCursorModifier"))&&this.updateConfig(),G.affectsConfiguration("terminal.integrated.unicodeVersion")&&this._updateUnicodeVersion(),(G.affectsConfiguration("terminal.integrated.shellIntegration.decorationsEnabled")||G.affectsConfiguration("terminal.integrated.shellIntegration.enabled"))&&this._updateDecorationAddon()})),this.add(this._themeService.onDidColorThemeChange(G=>this._updateTheme(G))),this.add(this._viewDescriptorService.onDidChangeLocation(({views:G})=>{G.some(q=>q.id===A.TERMINAL_VIEW_ID)&&(this._updateTheme(),this._decorationAddon?.refreshLayouts())})),this._updateUnicodeVersion(),this._commandNavigationAddon=this._instantiationService.createInstance(v.CommandNavigationAddon,F),this.raw.loadAddon(this._commandNavigationAddon),this._shellIntegrationAddon=this._instantiationService.createInstance(l.ShellIntegrationAddon),this.raw.loadAddon(this._shellIntegrationAddon),this._updateDecorationAddon()}get commandTracker(){return this._commandNavigationAddon}get shellIntegration(){return this._shellIntegrationAddon}set target(y){this._target=y}get target(){return this._target}_createDecorationAddon(){this._decorationAddon=this._instantiationService.createInstance(p.DecorationAddon,this._capabilities),this._decorationAddon.onDidRequestRunCommand(y=>this._onDidRequestRunCommand.fire(y)),this.raw.loadAddon(this._decorationAddon)}async getSelectionAsHtml(){if(!this._serializeAddon){const y=await this._getSerializeAddonConstructor();this._serializeAddon=new y,this.raw.loadAddon(this._serializeAddon)}return this._serializeAddon.serializeAsHTML({onlySelection:!0})}attachToElement(y){return this._updateTheme(),this._container||this.raw.open(y),this._container=y,this._shouldLoadWebgl()&&this._enableWebglRenderer(),this._container.querySelector(".xterm-screen")}updateConfig(){const y=this._configHelper.config;this.raw.options.altClickMovesCursor=y.altClickMovesCursor,this._setCursorBlink(y.cursorBlinking),this._setCursorStyle(y.cursorStyle),this._setCursorWidth(y.cursorWidth),this.raw.options.scrollback=y.scrollback,this.raw.options.drawBoldTextInBrightColors=y.drawBoldTextInBrightColors,this.raw.options.minimumContrastRatio=y.minimumContrastRatio,this.raw.options.fastScrollSensitivity=y.fastScrollSensitivity,this.raw.options.scrollSensitivity=y.mouseWheelScrollSensitivity,this.raw.options.macOptionIsMeta=y.macOptionIsMeta;const T=this._configurationService.getValue("editor");this.raw.options.altClickMovesCursor=y.altClickMovesCursor&&T.multiCursorModifier==="alt",this.raw.options.macOptionClickForcesSelection=y.macOptionClickForcesSelection,this.raw.options.rightClickSelectsWord=y.rightClickBehavior==="selectWord",this.raw.options.wordSeparator=y.wordSeparators,this.raw.options.customGlyphs=y.customGlyphs,this._shouldLoadWebgl()?this._enableWebglRenderer():(this._disposeOfWebglRenderer(),this.raw.options.rendererType=this._getBuiltInXtermRenderer(y.gpuAcceleration,Ri._suggestedRendererType))}_shouldLoadWebgl(){return!k.isSafari&&this._configHelper.config.gpuAcceleration==="auto"&&Ri._suggestedRendererType===void 0||this._configHelper.config.gpuAcceleration==="on"}forceRedraw(){this._webglAddon?.clearTextureAtlas(),this.raw.clearTextureAtlas()}clearDecorations(){this._decorationAddon?.clearDecorations(!0)}forceRefresh(){this._core.viewport?._innerRefresh()}forceUnpause(){this.raw.getOption("rendererType")==="canvas"&&(this._core._renderService?._onIntersectionChange({intersectionRatio:1}),this.raw.refresh(0,this.raw.rows-1))}async findNext(y,T){return this._updateFindColors(T),(await this._getSearchAddon()).findNext(y,T)}async findPrevious(y,T){return this._updateFindColors(T),(await this._getSearchAddon()).findPrevious(y,T)}_updateFindColors(y){const T=this._themeService.getColorTheme(),R=T.getColor(s.TERMINAL_FIND_MATCH_BACKGROUND_COLOR),O=T.getColor(s.TERMINAL_FIND_MATCH_BORDER_COLOR),x=T.getColor(s.TERMINAL_OVERVIEW_RULER_CURSOR_FOREGROUND_COLOR),F=T.getColor(s.TERMINAL_FIND_MATCH_HIGHLIGHT_BACKGROUND_COLOR),L=T.getColor(s.TERMINAL_FIND_MATCH_HIGHLIGHT_BORDER_COLOR),M=T.getColor(s.TERMINAL_OVERVIEW_RULER_FIND_MATCH_FOREGROUND_COLOR);y.decorations={activeMatchBackground:R?.toString()||"transparent",activeMatchBorder:O?.toString()||"transparent",activeMatchColorOverviewRuler:x?.toString()||"transparent",matchBackground:F?.toString()||"transparent",matchBorder:L?.toString()||"transparent",matchOverviewRuler:M?.toString()||"transparent"}}async _getSearchAddon(){if(this._searchAddon)return this._searchAddon;const y=await this._getSearchAddonConstructor();return this._searchAddon=new y,this.raw.loadAddon(this._searchAddon),this._searchAddon}clearSearchDecorations(){this._searchAddon?.clearDecorations()}getFont(){return this._configHelper.getFont(this._core)}getLongestViewportWrappedLineLength(){let y=0;for(let T=this.raw.buffer.active.length-1;T>=this.raw.buffer.active.viewportY;T--){const R=this._getWrappedLineCount(T,this.raw.buffer.active);y=Math.max(y,R.lineCount*this.raw.cols-R.endSpaces||0),T=R.currentIndex}return y}_getWrappedLineCount(y,T){let R=T.getLine(y);if(!R)throw new Error("Could not get line");let O=y,x=0;for(let F=Math.min(R.length,this.raw.cols)-1;F>=0&&(R&&!R?.getCell(F)?.getChars());F--)x++;for(;R?.isWrapped&&O>0;)O--,R=T.getLine(O);return{lineCount:y-O+1,currentIndex:O,endSpaces:x}}scrollDownLine(){this.raw.scrollLines(1)}scrollDownPage(){this.raw.scrollPages(1)}scrollToBottom(){this.raw.scrollToBottom()}scrollUpLine(){this.raw.scrollLines(-1)}scrollUpPage(){this.raw.scrollPages(-1)}scrollToTop(){this.raw.scrollToTop()}clearBuffer(){this.raw.clear(),this._decorationAddon?.registerCommandDecoration({marker:this.raw.registerMarker(0),hasOutput:!1,timestamp:Date.now(),getOutput:()=>{},command:""},!0)}_setCursorBlink(y){this.raw.options.cursorBlink!==y&&(this.raw.options.cursorBlink=y,this.raw.refresh(0,this.raw.rows-1))}_setCursorStyle(y){this.raw.options.cursorStyle!==y&&(this.raw.options.cursorStyle=y==="line"?"bar":y)}_setCursorWidth(y){this.raw.options.cursorWidth!==y&&(this.raw.options.cursorWidth=y)}_getBuiltInXtermRenderer(y,T){let R="canvas";return(y==="off"||y==="auto"&&T==="dom")&&(R="dom"),R}async _enableWebglRenderer(){if(!this.raw.element||this._webglAddon)return;const y=await this._getWebglAddonConstructor();this._webglAddon=new y;try{this.raw.loadAddon(this._webglAddon),this._logService.trace("Webgl was loaded"),this._webglAddon.onContextLoss(()=>{this._logService.info("Webgl lost context, disposing of webgl renderer"),this._disposeOfWebglRenderer(),this.raw.options.rendererType="dom"})}catch(T){this._logService.warn("Webgl could not be loaded. Falling back to the canvas renderer type.",T),!this._storageService.getBoolean("terminal.integrated.neverMeasureRenderTime",0,!1)&&this._configHelper.config.gpuAcceleration!=="off"&&this._measureRenderTime(),this.raw.options.rendererType="canvas",Ri._suggestedRendererType="canvas",this._disposeOfWebglRenderer()}}async _getSearchAddonConstructor(){return h||(h=(await new Promise((y,T)=>{Q(["xterm-addon-search"],y,T)})).SearchAddon),h}async _getUnicode11Constructor(){return g||(g=(await new Promise((y,T)=>{Q(["xterm-addon-unicode11"],y,T)})).Unicode11Addon),g}async _getWebglAddonConstructor(){return d||(d=(await new Promise((y,T)=>{Q(["xterm-addon-webgl"],y,T)})).WebglAddon),d}async _getSerializeAddonConstructor(){return m||(m=(await new Promise((y,T)=>{Q(["xterm-addon-serialize"],y,T)})).SerializeAddon),m}_disposeOfWebglRenderer(){try{this._webglAddon?.dispose()}catch{}this._webglAddon=void 0}async _measureRenderTime(){const y=[];if(!this._core._renderService?._renderer._renderLayers)return;const T=this._core._renderService._renderer._renderLayers[0],R=T?.onGridChanged,O=()=>{if(y.shift(),y.sort((F,L)=>F-L)[Math.floor(y.length/2)]>a)if(this._configHelper.config.gpuAcceleration==="auto")Ri._suggestedRendererType="dom",this.updateConfig();else{const F=[{label:(0,C.localize)(0,null),run:()=>this._configurationService.updateValue("terminal.integrated.gpuAcceleration","off",1)},{label:(0,C.localize)(1,null),run:()=>{}},{label:(0,C.localize)(2,null),isSecondary:!0,run:()=>this._storageService.store("terminal.integrated.neverMeasureRenderTime",!0,0,1)}];this._notificationService.prompt(w.Severity.Warning,(0,C.localize)(3,null),F)}};T.onGridChanged=(x,F,L)=>{const M=performance.now();R.call(T,x,F,L),y.push(performance.now()-M),y.length===n&&(O(),T.onGridChanged=R)}}_getXtermTheme(y){y||(y=this._themeService.getColorTheme());const T=this._viewDescriptorService.getViewLocationById(A.TERMINAL_VIEW_ID),R=y.getColor(s.TERMINAL_FOREGROUND_COLOR);let O;this.target===_.TerminalLocation.Editor?O=y.getColor(s.TERMINAL_BACKGROUND_COLOR)||y.getColor(i.editorBackground):O=y.getColor(s.TERMINAL_BACKGROUND_COLOR)||(T===1?y.getColor(S.PANEL_BACKGROUND):y.getColor(S.SIDE_BAR_BACKGROUND));const x=y.getColor(s.TERMINAL_CURSOR_FOREGROUND_COLOR)||R,F=y.getColor(s.TERMINAL_CURSOR_BACKGROUND_COLOR)||O,L=y.getColor(s.TERMINAL_SELECTION_BACKGROUND_COLOR);return{background:O?O.toString():void 0,foreground:R?R.toString():void 0,cursor:x?x.toString():void 0,cursorAccent:F?F.toString():void 0,selection:L?L.toString():void 0,black:y.getColor(s.ansiColorIdentifiers[0])?.toString(),red:y.getColor(s.ansiColorIdentifiers[1])?.toString(),green:y.getColor(s.ansiColorIdentifiers[2])?.toString(),yellow:y.getColor(s.ansiColorIdentifiers[3])?.toString(),blue:y.getColor(s.ansiColorIdentifiers[4])?.toString(),magenta:y.getColor(s.ansiColorIdentifiers[5])?.toString(),cyan:y.getColor(s.ansiColorIdentifiers[6])?.toString(),white:y.getColor(s.ansiColorIdentifiers[7])?.toString(),brightBlack:y.getColor(s.ansiColorIdentifiers[8])?.toString(),brightRed:y.getColor(s.ansiColorIdentifiers[9])?.toString(),brightGreen:y.getColor(s.ansiColorIdentifiers[10])?.toString(),brightYellow:y.getColor(s.ansiColorIdentifiers[11])?.toString(),brightBlue:y.getColor(s.ansiColorIdentifiers[12])?.toString(),brightMagenta:y.getColor(s.ansiColorIdentifiers[13])?.toString(),brightCyan:y.getColor(s.ansiColorIdentifiers[14])?.toString(),brightWhite:y.getColor(s.ansiColorIdentifiers[15])?.toString()}}_updateTheme(y){this.raw.setOption("theme",this._getXtermTheme(y))}async _updateUnicodeVersion(){if(!this._unicode11Addon&&this._configHelper.config.unicodeVersion==="11"){const y=await this._getUnicode11Constructor();this._unicode11Addon=new y,this.raw.loadAddon(this._unicode11Addon)}this.raw.unicode.activeVersion!==this._configHelper.config.unicodeVersion&&(this.raw.unicode.activeVersion=this._configHelper.config.unicodeVersion)}_updateDecorationAddon(){if(this._configHelper.config.shellIntegration?.enabled&&this._configHelper.config.shellIntegration.decorationsEnabled){this._decorationAddon||this._createDecorationAddon();return}this._decorationAddon&&(this._decorationAddon.dispose(),this._decorationAddon=void 0)}};b._suggestedRendererType=void 0,b=Ee([W(6,t.IConfigurationService),W(7,r.IInstantiationService),W(8,D.ILogService),W(9,w.INotificationService),W(10,I.IStorageService),W(11,o.IThemeService),W(12,c.IViewDescriptorService)],b),e.XtermTerminal=b}),define(ne[2387],re([1,0,2,6,10,38,8,123,521,138,41,5,186,117]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverWidget=void 0;const i=_.$;var S;(function(p){p[p.PointerSize=3]="PointerSize",p[p.HoverBorderWidth=2]="HoverBorderWidth",p[p.HoverWindowEdgeMargin=2]="HoverWindowEdgeMargin"})(S||(S={}));let s=class extends w.Widget{constructor(u,a,n,h,g){super();this._keybindingService=a,this._configurationService=n,this._openerService=h,this._instantiationService=g,this._messageListeners=new t.DisposableStore,this._isDisposed=!1,this._forcePosition=!1,this._x=0,this._y=0,this._onDispose=this._register(new f.Emitter),this._onRequestLayout=this._register(new f.Emitter),this._linkHandler=u.linkHandler||(y=>this._openerService.open(y,{allowCommands:(0,c.isMarkdownString)(u.content)&&u.content.isTrusted})),this._target="targetElements"in u.target?u.target:new r(u.target),this._hoverPointer=u.showPointer?i("div.workbench-hover-pointer"):void 0,this._hover=this._register(new I.HoverWidget),this._hover.containerDomNode.classList.add("workbench-hover","fadeIn"),u.compact&&this._hover.containerDomNode.classList.add("workbench-hover","compact"),u.skipFadeInAnimation&&this._hover.containerDomNode.classList.add("skip-fade-in"),u.additionalClasses&&this._hover.containerDomNode.classList.add(...u.additionalClasses),u.forcePosition&&(this._forcePosition=!0),this._hoverPosition=u.hoverPosition??3,this.onmousedown(this._hover.containerDomNode,y=>y.stopPropagation()),this.onkeydown(this._hover.containerDomNode,y=>{y.equals(9)&&this.dispose()});const d=i("div.hover-row.markdown-hover"),m=i("div.hover-contents");if(typeof u.content=="string")m.textContent=u.content,m.style.whiteSpace="pre-wrap";else if(u.content instanceof HTMLElement)m.appendChild(u.content),m.classList.add("html-hover-contents");else{const y=u.content,T=this._instantiationService.createInstance(o.MarkdownRenderer,{codeBlockFontFamily:this._configurationService.getValue("editor").fontFamily||D.EDITOR_FONT_DEFAULTS.fontFamily}),{element:R}=T.render(y,{actionHandler:{callback:O=>this._linkHandler(O),disposables:this._messageListeners},asyncRenderCallback:()=>{m.classList.add("code-hover-contents"),this._onRequestLayout.fire()}});m.appendChild(R)}if(d.appendChild(m),this._hover.contentsDomNode.appendChild(d),u.actions&&u.actions.length>0){const y=i("div.hover-row.status-bar"),T=i("div.actions");u.actions.forEach(R=>{const O=this._keybindingService.lookupKeybinding(R.commandId),x=O?O.getLabel():null;I.HoverAction.render(T,{label:R.label,commandId:R.commandId,run:F=>{R.run(F),this.dispose()},iconClass:R.iconClass},x)}),y.appendChild(T),this._hover.containerDomNode.appendChild(y)}this._hoverContainer=i("div.workbench-hover-container"),this._hoverPointer&&this._hoverContainer.appendChild(this._hoverPointer),this._hoverContainer.appendChild(this._hover.containerDomNode);const b=[...this._target.targetElements];let E;u.actions&&u.actions.length>0?E=!1:u.hideOnHover===void 0?E=typeof u.content=="string":E=u.hideOnHover,E||b.push(this._hoverContainer),this._mouseTracker=new l(b),this._register(this._mouseTracker.onMouseOut(()=>this.dispose())),this._register(this._mouseTracker)}get isDisposed(){return this._isDisposed}get domNode(){return this._hover.containerDomNode}get onDispose(){return this._onDispose.event}get onRequestLayout(){return this._onRequestLayout.event}get anchor(){return this._hoverPosition===2?0:1}get x(){return this._x}get y(){return this._y}render(u){u.appendChild(this._hoverContainer),this.layout()}layout(){this._hover.containerDomNode.classList.remove("right-aligned"),this._hover.contentsDomNode.style.maxHeight="";const u=this._target.targetElements.map(E=>E.getBoundingClientRect()),a=Math.min(...u.map(E=>E.top)),n=Math.max(...u.map(E=>E.right)),h=Math.max(...u.map(E=>E.bottom)),g=Math.min(...u.map(E=>E.left)),d=n-g,m=h-a,b={top:a,right:n,bottom:h,left:g,width:d,height:m,center:{x:g+d/2,y:a+m/2}};if(this.adjustHorizontalHoverPosition(b),this.adjustVerticalHoverPosition(b),this._hoverContainer.style.padding="",this._hoverContainer.style.margin="",this._hoverPointer){switch(this._hoverPosition){case 1:b.left+=3,b.right+=3,this._hoverContainer.style.paddingLeft=`${3}px`,this._hoverContainer.style.marginLeft=`${-3}px`;break;case 0:b.left-=3,b.right-=3,this._hoverContainer.style.paddingRight=`${3}px`,this._hoverContainer.style.marginRight=`${-3}px`;break;case 2:b.top+=3,b.bottom+=3,this._hoverContainer.style.paddingTop=`${3}px`,this._hoverContainer.style.marginTop=`${-3}px`;break;case 3:b.top-=3,b.bottom-=3,this._hoverContainer.style.paddingBottom=`${3}px`,this._hoverContainer.style.marginBottom=`${-3}px`;break}b.center.x=b.left+d/2,b.center.y=b.top+m/2}this.computeXCordinate(b),this.computeYCordinate(b),this._hoverPointer&&(this._hoverPointer.classList.remove("top"),this._hoverPointer.classList.remove("left"),this._hoverPointer.classList.remove("right"),this._hoverPointer.classList.remove("bottom"),this.setHoverPointerPosition(b)),this._hover.onContentsChanged()}computeXCordinate(u){const a=this._hover.containerDomNode.clientWidth+2;this._target.x!==void 0?this._x=this._target.x:this._hoverPosition===1?this._x=u.right:this._hoverPosition===0?this._x=u.left-a:(this._hoverPointer?this._x=u.center.x-this._hover.containerDomNode.clientWidth/2:this._x=u.left,this._x+a>=document.documentElement.clientWidth&&(this._hover.containerDomNode.classList.add("right-aligned"),this._x=Math.max(document.documentElement.clientWidth-a-2,document.documentElement.clientLeft))),this._x<document.documentElement.clientLeft&&(this._x=u.left+2)}computeYCordinate(u){this._target.y!==void 0?this._y=this._target.y:this._hoverPosition===3?this._y=u.top:this._hoverPosition===2?this._y=u.bottom-2:this._hoverPointer?this._y=u.center.y+this._hover.containerDomNode.clientHeight/2:this._y=u.bottom,this._y>window.innerHeight&&(this._y=u.bottom)}adjustHorizontalHoverPosition(u){if(this._target.x===void 0){if(this._forcePosition){const a=(this._hoverPointer?3:0)+2;this._hoverPosition===1?this._hover.containerDomNode.style.maxWidth=`${document.documentElement.clientWidth-u.right-a}px`:this._hoverPosition===0&&(this._hover.containerDomNode.style.maxWidth=`${u.left-a}px`);return}this._hoverPosition===1&&u.right+this._hover.containerDomNode.clientWidth>=document.documentElement.clientWidth&&(this._hoverPosition=0),this._hoverPosition===0&&u.left-this._hover.containerDomNode.clientWidth<=document.documentElement.clientLeft&&(this._hoverPosition=1)}}adjustVerticalHoverPosition(u){if(this._target.y===void 0){if(this._forcePosition){const a=(this._hoverPointer?3:0)+2;this._hoverPosition===3?this._hover.containerDomNode.style.maxHeight=`${u.top-a}px`:this._hoverPosition===2&&(this._hover.containerDomNode.style.maxHeight=`${window.innerHeight-u.bottom-a}px`);return}this._hoverPosition===3?u.top-this._hover.containerDomNode.clientHeight<0&&(this._hoverPosition=2):this._hoverPosition===2&&u.bottom+this._hover.containerDomNode.clientHeight>window.innerHeight&&(this._hoverPosition=3)}}setHoverPointerPosition(u){if(!!this._hoverPointer)switch(this._hoverPosition){case 0:case 1:{this._hoverPointer.classList.add(this._hoverPosition===0?"right":"left");const a=this._hover.containerDomNode.clientHeight;a>u.height?this._hoverPointer.style.top=`${u.center.y-(this._y-a)-3}px`:this._hoverPointer.style.top=`${Math.round(a/2)-3}px`;break}case 3:case 2:{this._hoverPointer.classList.add(this._hoverPosition===3?"bottom":"top");const a=this._hover.containerDomNode.clientWidth;let n=Math.round(a/2)-3;const h=this._x+n;(h<u.left||h>u.right)&&(n=u.center.x-this._x-3),this._hoverPointer.style.left=`${n}px`;break}}}focus(){this._hover.containerDomNode.focus()}hide(){this.dispose()}dispose(){this._isDisposed||(this._onDispose.fire(),this._hoverContainer.remove(),this._messageListeners.dispose(),this._target.dispose(),super.dispose()),this._isDisposed=!0}};s=Ee([W(1,A.IKeybindingService),W(2,k.IConfigurationService),W(3,v.IOpenerService),W(4,C.IInstantiationService)],s),e.HoverWidget=s;class l extends w.Widget{constructor(u){super();this._elements=u,this._isMouseIn=!1,this._onMouseOut=this._register(new f.Emitter),this._elements.forEach(a=>this.onmouseover(a,()=>this._onTargetMouseOver())),this._elements.forEach(a=>this.onnonbubblingmouseout(a,()=>this._onTargetMouseOut()))}get onMouseOut(){return this._onMouseOut.event}_onTargetMouseOver(){this._isMouseIn=!0,this._clearEvaluateMouseStateTimeout()}_onTargetMouseOut(){this._isMouseIn=!1,this._evaluateMouseState()}_evaluateMouseState(){this._clearEvaluateMouseStateTimeout(),this._mouseTimeout=window.setTimeout(()=>this._fireIfMouseOutside(),0)}_clearEvaluateMouseStateTimeout(){this._mouseTimeout&&(clearTimeout(this._mouseTimeout),this._mouseTimeout=void 0)}_fireIfMouseOutside(){this._isMouseIn||this._onMouseOut.fire()}}class r{constructor(u){this._element=u,this.targetElements=[this._element]}dispose(){}}}),define(ne[2388],re([1,0,35,12,32,219,37,5,2387,2,10,1135]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverService=void 0;let C=class{constructor(i,S,s){this._instantiationService=i,this._contextViewService=S,s.onDidShowContextMenu(()=>this.hideHover())}showHover(i,S){if(this._currentHoverOptions===i)return;this._currentHoverOptions=i;const s=new w.DisposableStore,l=this._instantiationService.createInstance(I.HoverWidget,i);l.onDispose(()=>{this._currentHoverOptions=void 0,s.dispose()});const r=this._contextViewService;if(r.showContextView(new o(l,S)),l.onRequestLayout(()=>r.layout()),"targetElements"in i.target)for(const p of i.target.targetElements)s.add((0,v.addDisposableListener)(p,v.EventType.CLICK,()=>this.hideHover()));else s.add((0,v.addDisposableListener)(i.target,v.EventType.CLICK,()=>this.hideHover()));if(i.hideOnKeyDown){const p=document.activeElement;p&&s.add((0,v.addDisposableListener)(p,v.EventType.KEY_DOWN,()=>this.hideHover()))}if("IntersectionObserver"in window){const p=new IntersectionObserver(a=>this._intersectionChange(a,l),{threshold:0}),u="targetElements"in i.target?i.target.targetElements[0]:i.target;p.observe(u),s.add((0,w.toDisposable)(()=>p.disconnect()))}return l}hideHover(){!this._currentHoverOptions||(this._currentHoverOptions=void 0,this._contextViewService.hideContextView())}_intersectionChange(i,S){i[i.length-1].isIntersecting||S.dispose()}};C=Ee([W(0,D.IInstantiationService),W(1,k.IContextViewService),W(2,k.IContextMenuService)],C),e.HoverService=C;class o{constructor(i,S=!1){this._hover=i,this._focus=S}get anchorPosition(){return this._hover.anchor}render(i){return this._hover.render(i),this._focus&&this._hover.focus(),this._hover}getAnchor(){return{x:this._hover.x,y:this._hover.y}}layout(){this._hover.layout()}}(0,t.registerSingleton)(A.IHoverService,C,!0),(0,f.registerThemingParticipant)((c,i)=>{const S=c.getColor(_.editorHoverBackground);S&&(i.addRule(`.monaco-workbench .workbench-hover { background-color: ${S}; }`),i.addRule(`.monaco-workbench .workbench-hover-pointer:after { background-color: ${S}; }`));const s=c.getColor(_.editorHoverBorder);s&&(i.addRule(`.monaco-workbench .workbench-hover { border: 1px solid ${s}; }`),i.addRule(`.monaco-workbench .workbench-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${s.transparent(.5)}; }`),i.addRule(`.monaco-workbench .workbench-hover hr { border-top: 1px solid ${s.transparent(.5)}; }`),i.addRule(`.monaco-workbench .workbench-hover hr { border-bottom: 0px solid ${s.transparent(.5)}; }`),i.addRule(`.monaco-workbench .workbench-hover-pointer:after { border-right: 1px solid ${s}; }`),i.addRule(`.monaco-workbench .workbench-hover-pointer:after { border-bottom: 1px solid ${s}; }`));const l=c.getColor(_.textLinkForeground);l&&i.addRule(`.monaco-workbench .workbench-hover a { color: ${l}; }`);const r=c.getColor(_.textLinkActiveForeground);r&&i.addRule(`.monaco-workbench .workbench-hover a:hover { color: ${r}; }`);const p=c.getColor(_.editorHoverForeground);p&&i.addRule(`.monaco-workbench .workbench-hover { color: ${p}; }`);const u=c.getColor(_.editorHoverStatusBarBackground);u&&i.addRule(`.monaco-workbench .workbench-hover .hover-row .actions { background-color: ${u}; }`);const a=c.getColor(_.textCodeBlockBackground);a&&i.addRule(`.monaco-workbench .workbench-hover code { background-color: ${a}; }`)}),(0,f.registerThemingParticipant)((c,i)=>{const S=c.getColor(_.widgetShadow);S&&i.addRule(`.monaco-workbench .workbench-hover { box-shadow: 0 2px 8px ${S}; }`)})}),define(ne[611],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IIntegrityService=void 0,e.IIntegrityService=(0,t.createDecorator)("integrityService")}),define(ne[612],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWorkbenchIssueService=void 0,e.IWorkbenchIssueService=(0,t.createDecorator)("workbenchIssueService")}),define(ne[872],re([1,0,735,12,32,82,79,115,77,121,196,46,295,271,103,114]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIssueReporterStyles=e.WorkbenchIssueService=void 0;let s=class{constructor(u,a,n,h,g,d,m,b,E){this.issueService=u,this.themeService=a,this.extensionManagementService=n,this.extensionEnablementService=h,this.environmentService=g,this.workspaceTrustManagementService=d,this.productService=m,this.experimentService=b,this.authenticationService=E}async openReporter(u={}){const a=[];try{const b=(await this.extensionManagementService.getInstalled()).filter(E=>this.extensionEnablementService.isEnabled(E)||u.extensionId&&E.identifier.id===u.extensionId);a.push(...b.map(E=>{const{manifest:y}=E,T=y.contributes?Object.keys(y.contributes):[],R=!y.activationEvents&&T.length===1&&T[0]==="themes",O=E.type===0;return{name:y.name,publisher:y.publisher,version:y.version,repositoryUrl:y.repository&&y.repository.url,bugsUrl:y.bugs&&y.bugs.url,displayName:y.displayName,id:E.identifier.id,isTheme:R,isBuiltin:O}}))}catch(m){a.push({name:"Workbench Issue Service",publisher:"Unknown",version:"0.0.0",repositoryUrl:void 0,bugsUrl:void 0,displayName:`Extensions not loaded: ${m}`,id:"workbench.issue",isTheme:!1,isBuiltin:!0})}const n=await this.experimentService.getCurrentExperiments();let h="";try{h=(await this.authenticationService.getSessions("github")).filter(E=>E.scopes.includes("repo"))[0]?.accessToken}catch{}const g=this.themeService.getColorTheme(),d=Object.assign({styles:l(g),zoomLevel:(0,I.getZoomLevel)(),enabledExtensions:a,experiments:n?.join(` `),restrictedMode:!this.workspaceTrustManagementService.isWorkspaceTrusted(),githubAccessToken:h},u);return this.issueService.openReporter(d)}openProcessExplorer(){const u=this.themeService.getColorTheme(),a={pid:this.environmentService.mainPid,zoomLevel:(0,I.getZoomLevel)(),styles:{backgroundColor:r(u,_.editorBackground),color:r(u,_.editorForeground),listHoverBackground:r(u,_.listHoverBackground),listHoverForeground:r(u,_.listHoverForeground),listFocusBackground:r(u,_.listFocusBackground),listFocusForeground:r(u,_.listFocusForeground),listFocusOutline:r(u,_.listFocusOutline),listActiveSelectionBackground:r(u,_.listActiveSelectionBackground),listActiveSelectionForeground:r(u,_.listActiveSelectionForeground),listHoverOutline:r(u,_.activeContrastBorder)},platform:v.platform,applicationName:this.productService.applicationName};return this.issueService.openProcessExplorer(a)}};s=Ee([W(0,t.IIssueService),W(1,f.IThemeService),W(2,k.IExtensionManagementService),W(3,D.IWorkbenchExtensionEnablementService),W(4,w.INativeWorkbenchEnvironmentService),W(5,S.IWorkspaceTrustManagementService),W(6,C.IProductService),W(7,o.IWorkbenchAssignmentService),W(8,c.IAuthenticationService)],s),e.WorkbenchIssueService=s;function l(p){return{backgroundColor:r(p,A.SIDE_BAR_BACKGROUND),color:r(p,_.foreground),textLinkColor:r(p,_.textLinkForeground),textLinkActiveForeground:r(p,_.textLinkActiveForeground),inputBackground:r(p,_.inputBackground),inputForeground:r(p,_.inputForeground),inputBorder:r(p,_.inputBorder),inputActiveBorder:r(p,_.inputActiveOptionBorder),inputErrorBorder:r(p,_.inputValidationErrorBorder),inputErrorBackground:r(p,_.inputValidationErrorBackground),inputErrorForeground:r(p,_.inputValidationErrorForeground),buttonBackground:r(p,_.buttonBackground),buttonForeground:r(p,_.buttonForeground),buttonHoverBackground:r(p,_.buttonHoverBackground),sliderActiveColor:r(p,_.scrollbarSliderActiveBackground),sliderBackgroundColor:r(p,_.scrollbarSliderBackground),sliderHoverColor:r(p,_.scrollbarSliderHoverBackground)}}e.getIssueReporterStyles=l;function r(p,u){const a=p.getColor(u);return a?a.toString():void 0}(0,i.registerMainProcessRemoteService)(t.IIssueService,"issue",{supportsDelayedInstantiation:!0})}),define(ne[873],re([1,0,28,15,39,16]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getAllUnboundCommands=void 0;function k(D){const I=[],w=new Map,v=(C,o)=>{if(!w.has(C)&&(w.set(C,!0),!(C[0]==="_"||C.indexOf("vscode.")===0)&&D.get(C)!==!0)){if(!o){const c=t.CommandsRegistry.getCommand(C);if(c&&typeof c.description=="object"&&(0,f.isNonEmptyArray)(c.description.args))return}I.push(C)}};for(const C of A.MenuRegistry.getMenuItems(A.MenuId.CommandPalette))(0,A.isIMenuItem)(C)&&v(C.command.id,!0);for(const C of _.EditorExtensionsRegistry.getEditorActions())v(C.id,!0);for(const C of t.CommandsRegistry.getCommands().keys())v(C,!1);return I}e.getAllUnboundCommands=k}),define(ne[2389],re([1,0,442,7]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutputBuilder=e.KeybindingIO=void 0;class _{static writeKeybindingItem(I,w){if(!w.resolvedKeybinding)return;let v=JSON.stringify(w.resolvedKeybinding.getUserSettingsLabel());I.write(`{ "key": ${A(v+",",25)} "command": `);let C=w.when?JSON.stringify(w.when.serialize()):"",o=JSON.stringify(w.command);C.length>0?(I.write(`${o},`),I.writeLine(),I.write(` "when": ${C}`)):I.write(`${o}`),w.commandArgs&&(I.write(","),I.writeLine(),I.write(` "args": ${JSON.stringify(w.commandArgs)}`)),I.write(" }")}static readUserKeybindingItem(I){const w=typeof I.key=="string"?t.KeybindingParser.parseUserBinding(I.key):[],v=typeof I.when=="string"?f.ContextKeyExpr.deserialize(I.when):void 0,C=typeof I.command=="string"?I.command:null,o=typeof I.args!="undefined"?I.args:void 0;return{parts:w,command:C,commandArgs:o,when:v}}}e.KeybindingIO=_;function A(D,I){return D.length<I?D+new Array(I-D.length).join(" "):D}class k{constructor(){this._lines=[],this._currentLine=""}write(I){this._currentLine+=I}writeLine(I=""){this._lines.push(this._currentLine+I),this._currentLine=""}toString(){return this.writeLine(),this._lines.join(` `)}}e.OutputBuilder=k}),define(ne[2390],re([1,0,1884,77,10,91,6,97,222,442,14,28,8,57,7,85,146,1952,38,1953,94,465,26,17,27,133,2389,69,40,16,35,866,2,11,23,118,51,551,1955,13,15,223,31,19,873,309]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H,K,G){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkbenchKeybindingService=void 0;function q(pe){return Array.isArray(pe)}function Z(pe,me){return pe?typeof pe.command!="string"?(me.push(t.localize(1,null,"command")),!1):pe.key&&typeof pe.key!="string"?(me.push(t.localize(2,null,"key")),!1):pe.when&&typeof pe.when!="string"?(me.push(t.localize(3,null,"when")),!1):pe.mac&&typeof pe.mac!="string"?(me.push(t.localize(4,null,"mac")),!1):pe.linux&&typeof pe.linux!="string"?(me.push(t.localize(5,null,"linux")),!1):pe.win&&typeof pe.win!="string"?(me.push(t.localize(6,null,"win")),!1):!0:(me.push(t.localize(0,null)),!1)}const j={type:"object",default:{command:"",key:""},properties:{command:{description:t.localize(7,null),type:"string"},args:{description:t.localize(8,null)},key:{description:t.localize(9,null),type:"string"},mac:{description:t.localize(10,null),type:"string"},linux:{description:t.localize(11,null),type:"string"},win:{description:t.localize(12,null),type:"string"},when:{description:t.localize(13,null),type:"string"}}},X=d.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"keybindings",deps:[R.commandsExtensionPoint],jsonSchema:{description:t.localize(14,null),oneOf:[j,{type:"array",items:j}]}}),Y=[90,91,92,93,95,96,97,98,99,100,101,102,103,104,105],$=new Map;$.set(95,22),$.set(96,23),$.set(97,24),$.set(98,25),$.set(99,26),$.set(100,27),$.set(101,28),$.set(102,29),$.set(103,30),$.set(104,21);let J=class Hn extends l.AbstractKeybindingService{constructor(me,be,Ce,ve,he,ge,de,Se,we,ye,ke){super(me,be,Ce,ve,ye);this.hostService=de,this.keyboardLayoutService=ke,this._contributions=[],this.isComposingGlobalContextKey=me.createKey("isComposing",!1),this.updateSchema();let Ie=(0,B.getDispatchConfig)(ge);ge.onDidChangeConfiguration(Te=>{const De=(0,B.getDispatchConfig)(ge);Ie!==De&&(Ie=De,this._keyboardMapper=this.keyboardLayoutService.getKeyboardMapper(Ie),this.updateResolver({source:1}))}),this._keyboardMapper=this.keyboardLayoutService.getKeyboardMapper(Ie),this.keyboardLayoutService.onDidChangeKeyboardLayout(()=>{this._keyboardMapper=this.keyboardLayoutService.getKeyboardMapper(Ie),this.updateResolver({source:1})}),this._cachedResolver=null,this.userKeybindings=this._register(new ee(he.keybindingsResource,we,ye)),this.userKeybindings.initialize().then(()=>{this.userKeybindings.keybindings.length&&this.updateResolver({source:2})}),this._register(this.userKeybindings.onDidChange(()=>{ye.debug("User keybindings changed"),this.updateResolver({source:2,keybindings:this.userKeybindings.keybindings})})),X.setHandler(Te=>{const De=[];for(const _e of Te)this._handleKeybindingsExtensionPointUser(_e.description.identifier,_e.description.isBuiltin,_e.value,_e.collector,De);u.KeybindingsRegistry.setExtensionKeybindings(De),this.updateResolver({source:1})}),this.updateSchema(),this._register(Se.onDidRegisterExtensions(()=>this.updateSchema())),this._register(_.addDisposableListener(window,_.EventType.KEY_DOWN,Te=>{this.isComposingGlobalContextKey.set(Te.isComposing);const De=new A.StandardKeyboardEvent(Te);this._log(`/ Received keydown event - ${(0,A.printKeyboardEvent)(Te)}`),this._log(`| Converted keydown event - ${(0,A.printStandardKeyboardEvent)(De)}`),this._dispatch(De,De.target)&&De.preventDefault(),this.isComposingGlobalContextKey.set(!1)})),this._register(_.addDisposableListener(window,_.EventType.KEY_UP,Te=>{this.isComposingGlobalContextKey.set(Te.isComposing);const De=new A.StandardKeyboardEvent(Te);this._singleModifierDispatch(De,De.target)&&De.preventDefault(),this.isComposingGlobalContextKey.set(!1)})),this._register(f.onDidChangeFullscreen(()=>{const Te=navigator.keyboard;z.BrowserFeatures.keyboard!==2&&(f.isFullscreen()?Te?.lock(["Escape"]):Te?.unlock(),this._cachedResolver=null,this._onDidUpdateKeybindings.fire({source:2}))}))}registerSchemaContribution(me){this._contributions.push(me),me.onDidChange&&this._register(me.onDidChange(()=>this.updateSchema())),this.updateSchema()}updateSchema(){ue((0,V.flatten)(this._contributions.map(me=>me.getSchemaAdditions())))}_printUserBinding(me){return G.UserSettingsLabelProvider.toLabel(v.OS,me,be=>be instanceof I.SimpleKeybinding?D.KeyCodeUtils.toString(be.keyCode):D.ScanCodeUtils.toString(be.scanCode))||"[null]"}_printResolvedKeybinding(me){return me.getDispatchParts().map(be=>be||"[null]").join(" ")}_printResolvedKeybindings(me,be,Ce){const ve=35,he=`${be.padStart(ve," ")} => `;if(Ce.length===0){me.push(`${he}${"[NO BINDING]".padStart(ve," ")}`);return}const ge=he.length;let de=!0;for(const Se of Ce)de?me.push(`${he}${this._printResolvedKeybinding(Se).padStart(ve," ")}`):me.push(`${" ".repeat(ge)}${this._printResolvedKeybinding(Se).padStart(ve," ")}`)}_dumpResolveKeybindingDebugInfo(){const me=new Set,be=[];be.push("Default Resolved Keybindings (unique only):");for(const Ce of u.KeybindingsRegistry.getDefaultKeybindings()){if(!Ce.keybinding||Ce.keybinding.length===0)continue;const ve=this._printUserBinding(Ce.keybinding);if(me.has(ve))continue;me.add(ve);const he=this._keyboardMapper.resolveUserBinding(Ce.keybinding);this._printResolvedKeybindings(be,ve,he)}be.push("User Resolved Keybindings (unique only):");for(const Ce of this.userKeybindings.keybindings){const ve=m.KeybindingIO.readUserKeybindingItem(Ce);if(!ve.parts||ve.parts.length===0)continue;const he=Ce.key;if(me.has(he))continue;me.add(he);const ge=this._keyboardMapper.resolveUserBinding(ve.parts);this._printResolvedKeybindings(be,he,ge)}return be.join(` `)}_dumpDebugInfo(){const me=JSON.stringify(this.keyboardLayoutService.getCurrentKeyboardLayout(),null," "),be=this._keyboardMapper.dumpDebugInfo(),Ce=this._dumpResolveKeybindingDebugInfo(),ve=JSON.stringify(this.keyboardLayoutService.getRawKeyboardMapping(),null," ");return`Layout info: ${me} ${Ce} ${be} Raw mapping: ${ve}`}_dumpDebugInfoJSON(){const me={layout:this.keyboardLayoutService.getCurrentKeyboardLayout(),rawMapping:this.keyboardLayoutService.getRawKeyboardMapping()};return JSON.stringify(me,null," ")}customKeybindingsCount(){return this.userKeybindings.keybindings.length}updateResolver(me){this._cachedResolver=null,this._onDidUpdateKeybindings.fire(me)}_getResolver(){if(!this._cachedResolver){const me=this._resolveKeybindingItems(u.KeybindingsRegistry.getDefaultKeybindings(),!0),be=this._resolveUserKeybindingItems(this.userKeybindings.keybindings.map(Ce=>m.KeybindingIO.readUserKeybindingItem(Ce)),!1);this._cachedResolver=new p.KeybindingResolver(me,be,Ce=>this._log(Ce))}return this._cachedResolver}_documentHasFocus(){return this.hostService.hasFocus}_resolveKeybindingItems(me,be){const Ce=[];let ve=0;for(const he of me){const ge=he.when||void 0,de=he.keybinding;if(!de)Ce[ve++]=new a.ResolvedKeybindingItem(void 0,he.command,he.commandArgs,ge,be,he.extensionId,he.isBuiltinExtension);else{if(this._assertBrowserConflicts(de,he.command))continue;const Se=this._keyboardMapper.resolveUserBinding(de);for(let we=Se.length-1;we>=0;we--){const ye=Se[we];Ce[ve++]=new a.ResolvedKeybindingItem(ye,he.command,he.commandArgs,ge,be,he.extensionId,he.isBuiltinExtension)}}}return Ce}_resolveUserKeybindingItems(me,be){const Ce=[];let ve=0;for(const he of me){const ge=he.when||void 0,de=he.parts;if(de.length===0)Ce[ve++]=new a.ResolvedKeybindingItem(void 0,he.command,he.commandArgs,ge,be,null,!1);else{const Se=this._keyboardMapper.resolveUserBinding(de);for(const we of Se)Ce[ve++]=new a.ResolvedKeybindingItem(we,he.command,he.commandArgs,ge,be,null,!1)}}return Ce}_assertBrowserConflicts(me,be){if(z.BrowserFeatures.keyboard===0||z.BrowserFeatures.keyboard===1&&f.isFullscreen())return!1;for(const Ce of me){if(!Ce.metaKey&&!Ce.altKey&&!Ce.ctrlKey&&!Ce.shiftKey)continue;const ve=2048|512|1024;let he=0;if(Ce.metaKey&&(he|=2048),Ce.shiftKey&&(he|=1024),Ce.altKey&&(he|=512),Ce.ctrlKey&&v.OS===2&&(he|=256),(he&ve)==(2048|512)&&(Ce instanceof I.ScanCodeBinding&&(Ce.scanCode===86||Ce.scanCode===85)||Ce instanceof I.SimpleKeybinding&&(Ce.keyCode===15||Ce.keyCode===17))||(he&ve)==2048&&(Ce instanceof I.ScanCodeBinding&&Ce.scanCode>=36&&Ce.scanCode<=45||Ce instanceof I.SimpleKeybinding&&Ce.keyCode>=21&&Ce.keyCode<=30))return!0}return!1}resolveKeybinding(me){return this._keyboardMapper.resolveKeybinding(me)}resolveKeyboardEvent(me){return this.keyboardLayoutService.validateCurrentKeyboardMapping(me),this._keyboardMapper.resolveKeyboardEvent(me)}resolveUserBinding(me){const be=w.KeybindingParser.parseUserBinding(me);return this._keyboardMapper.resolveUserBinding(be)}_handleKeybindingsExtensionPointUser(me,be,Ce,ve,he){if(q(Ce))for(let ge=0,de=Ce.length;ge<de;ge++)this._handleKeybinding(me,be,ge+1,Ce[ge],ve,he);else this._handleKeybinding(me,be,1,Ce,ve,he)}_handleKeybinding(me,be,Ce,ve,he,ge){const de=[];if(Z(ve,de)){const Se=this._asCommandRule(me,be,Ce++,ve);Se&&ge.push(Se)}de.length>0&&he.error(t.localize(15,null,X.name,de.join(` `)))}static bindToCurrentPlatform(me,be,Ce,ve){if(v.OS===1&&ve){if(ve)return ve}else if(v.OS===2){if(be)return be}else if(Ce)return Ce;return me}_asCommandRule(me,be,Ce,ve){const{command:he,args:ge,when:de,key:Se,mac:we,linux:ye,win:ke}=ve,Ie=Hn.bindToCurrentPlatform(Se,we,ye,ke);if(!Ie)return;let Te;be?Te=300+Ce:Te=400+Ce;const De=y.MenuRegistry.getCommand(he),_e=De&&De.precondition;let Re;return de&&_e?Re=i.ContextKeyExpr.and(_e,i.ContextKeyExpr.deserialize(de)):de?Re=i.ContextKeyExpr.deserialize(de):_e&&(Re=_e),{id:he,args:ge,when:Re,weight:Te,keybinding:w.KeybindingParser.parseUserBinding(Ie),extensionId:me.value,isBuiltinExtension:be}}getDefaultKeybindingsContent(){const me=this._getResolver(),be=me.getDefaultKeybindings(),Ce=me.getDefaultBoundCommands();return Hn._getDefaultKeybindings(be)+` `+Hn._getAllCommandsAsComment(Ce)}static _getDefaultKeybindings(me){const be=new m.OutputBuilder;be.writeLine("[");const Ce=me.length-1;return me.forEach((ve,he)=>{m.KeybindingIO.writeKeybindingItem(be,ve),he!==Ce?be.writeLine(","):be.writeLine()}),be.writeLine("]"),be.toString()}static _getAllCommandsAsComment(me){const Ce=(0,K.getAllUnboundCommands)(me).sort().join(` // - `);return"// "+t.localize(16,null)+` // - `+Ce}mightProducePrintableCharacter(me){if(me.ctrlKey||me.metaKey||me.altKey)return!1;const be=D.ScanCodeUtils.toEnum(me.code);if(Y.indexOf(be)!==-1)return!!(me.keyCode===D.IMMUTABLE_CODE_TO_KEY_CODE[be]||v.isMacintosh&&me.keyCode===$.get(be));if(D.IMMUTABLE_CODE_TO_KEY_CODE[be]!==-1)return!1;const ve=this.keyboardLayoutService.getRawKeyboardMapping();if(!ve)return!1;const he=ve[me.code];return!(!he||!he.value||/\s/.test(he.value))}};J=Ee([W(0,i.IContextKeyService),W(1,C.ICommandService),W(2,g.ITelemetryService),W(3,n.INotificationService),W(4,S.IEnvironmentService),W(5,o.IConfigurationService),W(6,b.IHostService),W(7,E.IExtensionService),W(8,F.IFileService),W(9,U.ILogService),W(10,N.IKeyboardLayoutService)],J),e.WorkbenchKeybindingService=J;class ee extends O.Disposable{constructor(me,be,Ce){super();this.keybindingsResource=me,this.fileService=be,this._keybindings=[],this._onDidChange=this._register(new k.Emitter),this.onDidChange=this._onDidChange.event,this._register(be.watch((0,H.dirname)(me))),this._register(this.fileService.watch(this.keybindingsResource)),this.reloadConfigurationScheduler=this._register(new x.RunOnceScheduler(()=>this.reload().then(ve=>{ve&&this._onDidChange.fire()}),50)),this._register(k.Event.filter(this.fileService.onDidFilesChange,ve=>ve.contains(this.keybindingsResource))(()=>{Ce.debug("Keybindings file changed"),this.reloadConfigurationScheduler.schedule()})),this._register(this.fileService.onDidRunOperation(ve=>{ve.operation===4&&ve.resource.toString()===this.keybindingsResource.toString()&&(Ce.debug("Keybindings file written"),this.reloadConfigurationScheduler.schedule())}))}get keybindings(){return this._keybindings}async initialize(){await this.reload()}async reload(){const me=this._keybindings;try{const be=await this.fileService.readFile(this.keybindingsResource),Ce=(0,L.parse)(be.value.toString());this._keybindings=(0,P.isArray)(Ce)?Ce:[]}catch{this._keybindings=[]}return me?!M.equals(me,this._keybindings):!0}}const te="vscode://schemas/keybindings",se=[],ie=[],ce=[],le={id:te,type:"array",title:t.localize(17,null),allowTrailingCommas:!0,allowComments:!0,definitions:{editorGroupsSchema:{type:"array",items:{type:"object",properties:{groups:{$ref:"#/definitions/editorGroupsSchema",default:[{},{}]},size:{type:"number",default:.5}}}}},items:{required:["key"],type:"object",defaultSnippets:[{body:{key:"$1",command:"$2",when:"$3"}}],properties:{key:{type:"string",description:t.localize(18,null)},command:{anyOf:[{type:"string",enum:ie,enumDescriptions:ce,description:t.localize(19,null)},{type:"string"}]},when:{type:"string",description:t.localize(20,null)},args:{description:t.localize(21,null)}},allOf:se}},ae=h.Registry.as(s.Extensions.JSONContribution);ae.registerSchema(te,le);function ue(pe){se.length=0,ie.length=0,ce.length=0;const me=new Set,be=(he,ge)=>{/^_/.test(he)||me.has(he)||(me.add(he),ie.push(he),ce.push(ge),ie.push(`-${he}`),ce.push(ge))},Ce=C.CommandsRegistry.getCommands();for(const[he,ge]of Ce){const de=ge.description;if(be(he,de?de.description:void 0),!de||!de.args||de.args.length!==1||!de.args[0].schema)continue;const Se=de.args[0].schema,we=typeof de.args[0].isOptional!="undefined"?!de.args[0].isOptional:Array.isArray(Se.required)&&Se.required.length>0,ye={if:{properties:{command:{const:he}}},then:{required:[].concat(we?["args"]:[]),properties:{args:Se}}};se.push(ye)}const ve=y.MenuRegistry.getCommands();for(const he of ve.keys())be(he);se.push(...pe),ae.notifySchemaChanged(te)}const oe=h.Registry.as(c.Extensions.Configuration),fe={id:"keyboard",order:15,type:"object",title:t.localize(22,null),properties:{"keyboard.dispatch":{scope:1,type:"string",enum:["code","keyCode"],default:"code",markdownDescription:t.localize(23,null),included:v.OS===2||v.OS===3}}};oe.registerConfiguration(fe),(0,T.registerSingleton)(r.IKeybindingService,J)}),define(ne[2391],re([1,0,222,1954]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MacLinuxFallbackKeyboardMapper=void 0;class _{constructor(k){this._OS=k}dumpDebugInfo(){return"FallbackKeyboardMapper dispatching on keyCode"}resolveKeybinding(k){return[new f.USLayoutResolvedKeybinding(k,this._OS)]}resolveKeyboardEvent(k){const D=new t.SimpleKeybinding(k.ctrlKey,k.shiftKey,k.altKey,k.metaKey,k.keyCode);return new f.USLayoutResolvedKeybinding(D.toChord(),this._OS)}resolveUserBinding(k){return f.USLayoutResolvedKeybinding.resolveUserBinding(k,this._OS)}}e.MacLinuxFallbackKeyboardMapper=_}),define(ne[2392],re([1,0,97,222,550]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MacLinuxKeyboardMapper=e.NativeResolvedKeybinding=void 0;const A=[];class k extends _.BaseResolvedKeybinding{constructor(o,c,i){super(c,i);this._mapper=o}_getLabel(o){return this._mapper.getUILabelForScanCodeBinding(o)}_getAriaLabel(o){return this._mapper.getAriaLabelForScanCodeBinding(o)}_getElectronAccelerator(o){return this._mapper.getElectronAcceleratorLabelForScanCodeBinding(o)}_getUserSettingsLabel(o){return this._mapper.getUserSettingsLabelForScanCodeBinding(o)}_isWYSIWYG(o){if(!o||t.IMMUTABLE_CODE_TO_KEY_CODE[o.scanCode]!==-1)return!0;let c=this._mapper.getAriaLabelForScanCodeBinding(o),i=this._mapper.getUserSettingsLabelForScanCodeBinding(o);return!c&&!i?!0:!c||!i?!1:c.toLowerCase()===i.toLowerCase()}_getDispatchPart(o){return this._mapper.getDispatchStrForScanCodeBinding(o)}_getSingleModifierDispatchPart(o){return(o.scanCode===157||o.scanCode===161)&&!o.shiftKey&&!o.altKey&&!o.metaKey?"ctrl":(o.scanCode===159||o.scanCode===163)&&!o.ctrlKey&&!o.shiftKey&&!o.metaKey?"alt":(o.scanCode===158||o.scanCode===162)&&!o.ctrlKey&&!o.altKey&&!o.metaKey?"shift":(o.scanCode===160||o.scanCode===164)&&!o.ctrlKey&&!o.shiftKey&&!o.altKey?"meta":null}}e.NativeResolvedKeybinding=k;class D{constructor(o,c,i,S){this.ctrlKey=o,this.shiftKey=c,this.altKey=i,this.scanCode=S}toString(){return`${this.ctrlKey?"Ctrl+":""}${this.shiftKey?"Shift+":""}${this.altKey?"Alt+":""}${t.ScanCodeUtils.toString(this.scanCode)}`}equals(o){return this.ctrlKey===o.ctrlKey&&this.shiftKey===o.shiftKey&&this.altKey===o.altKey&&this.scanCode===o.scanCode}getProducedCharCode(o){return o?this.ctrlKey&&this.shiftKey&&this.altKey?o.withShiftAltGr:this.ctrlKey&&this.altKey?o.withAltGr:this.shiftKey?o.withShift:o.value:""}getProducedChar(o){const c=v.getCharCode(this.getProducedCharCode(o));return c===0?" --- ":c>=768&&c<=879?"U+"+c.toString(16):" "+String.fromCharCode(c)+" "}}class I{constructor(o,c,i,S){this.ctrlKey=o,this.shiftKey=c,this.altKey=i,this.keyCode=S}toString(){return`${this.ctrlKey?"Ctrl+":""}${this.shiftKey?"Shift+":""}${this.altKey?"Alt+":""}${t.KeyCodeUtils.toString(this.keyCode)}`}}class w{constructor(){this._scanCodeToKeyCode=[],this._keyCodeToScanCode=[],this._scanCodeToKeyCode=[],this._keyCodeToScanCode=[]}registrationComplete(){this._moveToEnd(56),this._moveToEnd(106)}_moveToEnd(o){for(let c=0;c<8;c++){const i=this._scanCodeToKeyCode[(o<<3)+c];if(!!i)for(let S=0,s=i.length;S<s;S++){const l=this._keyCodeToScanCode[i[S]];if(l.length!==1)for(let r=0,p=l.length;r<p;r++){const u=l[r];if(u>>>3===o){for(let n=r+1;n<p;n++)l[n-1]=l[n];l[p-1]=u}}}}}registerIfUnknown(o,c){if(c.keyCode===0)return;const i=this._encodeScanCodeCombo(o),S=this._encodeKeyCodeCombo(c),s=c.keyCode>=21&&c.keyCode<=30,l=c.keyCode>=31&&c.keyCode<=56,r=this._scanCodeToKeyCode[i];if(s||l){if(r){for(let p=0,u=r.length;p<u;p++)if(r[p]===S)return}}else if(r&&r.length!==0)return;this._scanCodeToKeyCode[i]=this._scanCodeToKeyCode[i]||[],this._scanCodeToKeyCode[i].unshift(S),this._keyCodeToScanCode[S]=this._keyCodeToScanCode[S]||[],this._keyCodeToScanCode[S].unshift(i)}lookupKeyCodeCombo(o){const c=this._encodeKeyCodeCombo(o),i=this._keyCodeToScanCode[c];if(!i||i.length===0)return[];let S=[];for(let s=0,l=i.length;s<l;s++){const r=i[s],p=!!(r&1),u=!!(r&2),a=!!(r&4),n=r>>>3;S[s]=new D(p,u,a,n)}return S}lookupScanCodeCombo(o){const c=this._encodeScanCodeCombo(o),i=this._scanCodeToKeyCode[c];if(!i||i.length===0)return[];let S=[];for(let s=0,l=i.length;s<l;s++){const r=i[s],p=!!(r&1),u=!!(r&2),a=!!(r&4),n=r>>>3;S[s]=new I(p,u,a,n)}return S}guessStableKeyCode(o){if(o>=36&&o<=45)switch(o){case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21}const c=this.lookupScanCodeCombo(new D(!1,!1,!1,o)),i=this.lookupScanCodeCombo(new D(!1,!0,!1,o));if(c.length===1&&i.length===1){const S=c[0].shiftKey,s=c[0].keyCode,l=i[0].shiftKey,r=i[0].keyCode;if(s===r&&S!==l)return s}return-1}_encodeScanCodeCombo(o){return this._encode(o.ctrlKey,o.shiftKey,o.altKey,o.scanCode)}_encodeKeyCodeCombo(o){return this._encode(o.ctrlKey,o.shiftKey,o.altKey,o.keyCode)}_encode(o,c,i,S){return((o?1:0)<<0|(c?1:0)<<1|(i?1:0)<<2|S<<3)>>>0}}class v{constructor(o,c,i){this._scanCodeToLabel=[],this._scanCodeToDispatch=[],this._isUSStandard=o,this._OS=i,this._codeInfo=[],this._scanCodeKeyCodeMapper=new w,this._scanCodeToLabel=[],this._scanCodeToDispatch=[];const S=(u,a,n,h,g,d,m,b)=>{this._scanCodeKeyCodeMapper.registerIfUnknown(new D(!!u,!!a,!!n,h),new I(!!g,!!d,!!m,b))},s=(u,a,n,h,g)=>{for(let d=u;d<=1;d++)for(let m=a;m<=1;m++)for(let b=n;b<=1;b++)S(d,m,b,h,d,m,b,g)};for(let u=0;u<193;u++)this._scanCodeToLabel[u]=null;for(let u=0;u<193;u++)this._scanCodeToDispatch[u]=null;for(let u=0;u<193;u++){const a=t.IMMUTABLE_CODE_TO_KEY_CODE[u];a!==-1&&(s(0,0,0,u,a),this._scanCodeToLabel[u]=t.KeyCodeUtils.toString(a),a===0||a===5||a===57||a===6||a===4?this._scanCodeToDispatch[u]=null:this._scanCodeToDispatch[u]=`[${t.ScanCodeUtils.toString(u)}]`)}const l={};{let u=[];for(let n in c)if(c.hasOwnProperty(n)){const h=t.ScanCodeUtils.toEnum(n);if(h===0||t.IMMUTABLE_CODE_TO_KEY_CODE[h]!==-1)continue;const g=c[n],d=v.getCharCode(g.value);if(d>=97&&d<=122){const m=65+(d-97);u[m]=!0}}const a=(n,h,g,d)=>{u[n]||(l[t.ScanCodeUtils.toString(h)]={value:g,withShift:d,withAltGr:"",withShiftAltGr:""})};a(65,10,"a","A"),a(66,11,"b","B"),a(67,12,"c","C"),a(68,13,"d","D"),a(69,14,"e","E"),a(70,15,"f","F"),a(71,16,"g","G"),a(72,17,"h","H"),a(73,18,"i","I"),a(74,19,"j","J"),a(75,20,"k","K"),a(76,21,"l","L"),a(77,22,"m","M"),a(78,23,"n","N"),a(79,24,"o","O"),a(80,25,"p","P"),a(81,26,"q","Q"),a(82,27,"r","R"),a(83,28,"s","S"),a(84,29,"t","T"),a(85,30,"u","U"),a(86,31,"v","V"),a(87,32,"w","W"),a(88,33,"x","X"),a(89,34,"y","Y"),a(90,35,"z","Z")}let r=[],p=0;for(let u in c)if(c.hasOwnProperty(u)){const a=t.ScanCodeUtils.toEnum(u);if(a===0||t.IMMUTABLE_CODE_TO_KEY_CODE[a]!==-1)continue;this._codeInfo[a]=c[u];const n=l[u]||c[u],h=v.getCharCode(n.value),g=v.getCharCode(n.withShift),d=v.getCharCode(n.withAltGr),m=v.getCharCode(n.withShiftAltGr),b={scanCode:a,value:h,withShift:g,withAltGr:d,withShiftAltGr:m};if(r[p++]=b,this._scanCodeToDispatch[a]=`[${t.ScanCodeUtils.toString(a)}]`,h>=97&&h<=122){const E=65+(h-97);this._scanCodeToLabel[a]=String.fromCharCode(E)}else h>=65&&h<=90?this._scanCodeToLabel[a]=String.fromCharCode(h):h?this._scanCodeToLabel[a]=String.fromCharCode(h):this._scanCodeToLabel[a]=null}for(let u=r.length-1;u>=0;u--){const a=r[u],n=a.scanCode,h=a.withShiftAltGr;if(h===a.withAltGr||h===a.withShift||h===a.value)continue;const g=v._charCodeToKb(h);if(!g)continue;const d=g.shiftKey,m=g.keyCode;d?S(1,1,1,n,0,1,0,m):S(1,1,1,n,0,0,0,m)}for(let u=r.length-1;u>=0;u--){const a=r[u],n=a.scanCode,h=a.withAltGr;if(h===a.withShift||h===a.value)continue;const g=v._charCodeToKb(h);if(!g)continue;const d=g.shiftKey,m=g.keyCode;d?S(1,0,1,n,0,1,0,m):S(1,0,1,n,0,0,0,m)}for(let u=r.length-1;u>=0;u--){const a=r[u],n=a.scanCode,h=a.withShift;if(h===a.value)continue;const g=v._charCodeToKb(h);if(!g)continue;const d=g.shiftKey,m=g.keyCode;d?(S(0,1,0,n,0,1,0,m),S(0,1,1,n,0,1,1,m),S(1,1,0,n,1,1,0,m),S(1,1,1,n,1,1,1,m)):(S(0,1,0,n,0,0,0,m),S(0,1,0,n,0,1,0,m),S(0,1,1,n,0,0,1,m),S(0,1,1,n,0,1,1,m),S(1,1,0,n,1,0,0,m),S(1,1,0,n,1,1,0,m),S(1,1,1,n,1,0,1,m),S(1,1,1,n,1,1,1,m))}for(let u=r.length-1;u>=0;u--){const a=r[u],n=a.scanCode,h=v._charCodeToKb(a.value);if(!h)continue;const g=h.shiftKey,d=h.keyCode;g?(S(0,0,0,n,0,1,0,d),S(0,0,1,n,0,1,1,d),S(1,0,0,n,1,1,0,d),S(1,0,1,n,1,1,1,d)):(S(0,0,0,n,0,0,0,d),S(0,0,1,n,0,0,1,d),S(0,1,0,n,0,1,0,d),S(0,1,1,n,0,1,1,d),S(1,0,0,n,1,0,0,d),S(1,0,1,n,1,0,1,d),S(1,1,0,n,1,1,0,d),S(1,1,1,n,1,1,1,d))}s(0,0,0,36,22),s(0,0,0,37,23),s(0,0,0,38,24),s(0,0,0,39,25),s(0,0,0,40,26),s(0,0,0,41,27),s(0,0,0,42,28),s(0,0,0,43,29),s(0,0,0,44,30),s(0,0,0,45,21),this._scanCodeKeyCodeMapper.registrationComplete()}dumpDebugInfo(){let o=[],c=[88,104],i=0;o.push(`isUSStandard: ${this._isUSStandard}`),o.push("----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------");for(let S=0;S<193;S++){if(t.IMMUTABLE_CODE_TO_KEY_CODE[S]!==-1&&c.indexOf(S)===-1)continue;i%4==0&&(o.push("| HW Code combination | Key | KeyCode combination | Pri | UI label | User settings | Electron accelerator | Dispatching string | WYSIWYG |"),o.push("----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------")),i++;const s=this._codeInfo[S];for(let l=0;l<8;l++){const r=!!(l&1),p=!!(l&2),u=!!(l&4),a=new D(r,p,u,S),n=this.resolveKeyboardEvent({_standardKeyboardEventBrand:!0,ctrlKey:a.ctrlKey,shiftKey:a.shiftKey,altKey:a.altKey,metaKey:!1,keyCode:-1,code:t.ScanCodeUtils.toString(S)}),h=a.toString(),g=a.getProducedChar(s),d=n.getAriaLabel(),m=d?d.replace(/Control\+/,"Ctrl+"):null,b=n.getUserSettingsLabel(),E=n.getElectronAccelerator(),y=n.getDispatchParts()[0],R=(n?n.isWYSIWYG():!1)?" ":" NO ",O=this._scanCodeKeyCodeMapper.lookupScanCodeCombo(a);if(O.length===0)o.push(`| ${this._leftPad(h,30)} | ${g} | ${this._leftPad("",25)} | ${this._leftPad("",3)} | ${this._leftPad(m,25)} | ${this._leftPad(b,30)} | ${this._leftPad(E,25)} | ${this._leftPad(y,30)} | ${R} |`);else for(let x=0,F=O.length;x<F;x++){const L=O[x];let M;const N=this._scanCodeKeyCodeMapper.lookupKeyCodeCombo(L);if(N.length===1)M="";else{let P=-1;for(let V=0;V<N.length;V++)if(N[V].equals(a)){P=V+1;break}M=String(P)}const B=L.toString();x===0?o.push(`| ${this._leftPad(h,30)} | ${g} | ${this._leftPad(B,25)} | ${this._leftPad(M,3)} | ${this._leftPad(m,25)} | ${this._leftPad(b,30)} | ${this._leftPad(E,25)} | ${this._leftPad(y,30)} | ${R} |`):o.push(`| ${this._leftPad("",30)} | | ${this._leftPad(B,25)} | ${this._leftPad(M,3)} | ${this._leftPad("",25)} | ${this._leftPad("",30)} | ${this._leftPad("",25)} | ${this._leftPad("",30)} | |`)}}o.push("----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------")}return o.join(` `)}_leftPad(o,c){for(o===null&&(o="null");o.length<c;)o=" "+o;return o}simpleKeybindingToScanCodeBinding(o){if(o.keyCode===3)return[new f.ScanCodeBinding(o.ctrlKey,o.shiftKey,o.altKey,o.metaKey,46)];const c=this._scanCodeKeyCodeMapper.lookupKeyCodeCombo(new I(o.ctrlKey,o.shiftKey,o.altKey,o.keyCode));let i=[];for(let S=0,s=c.length;S<s;S++){const l=c[S];i[S]=new f.ScanCodeBinding(l.ctrlKey,l.shiftKey,l.altKey,o.metaKey,l.scanCode)}return i}getUILabelForScanCodeBinding(o){if(!o)return null;if(o.isDuplicateModifierCase())return"";if(this._OS===2)switch(o.scanCode){case 86:return"\u2190";case 88:return"\u2191";case 85:return"\u2192";case 87:return"\u2193"}return this._scanCodeToLabel[o.scanCode]}getAriaLabelForScanCodeBinding(o){return o?o.isDuplicateModifierCase()?"":this._scanCodeToLabel[o.scanCode]:null}getDispatchStrForScanCodeBinding(o){const c=this._scanCodeToDispatch[o.scanCode];if(!c)return null;let i="";return o.ctrlKey&&(i+="ctrl+"),o.shiftKey&&(i+="shift+"),o.altKey&&(i+="alt+"),o.metaKey&&(i+="meta+"),i+=c,i}getUserSettingsLabelForScanCodeBinding(o){if(!o)return null;if(o.isDuplicateModifierCase())return"";const c=t.IMMUTABLE_CODE_TO_KEY_CODE[o.scanCode];if(c!==-1)return t.KeyCodeUtils.toUserSettingsUS(c).toLowerCase();let i=this._scanCodeKeyCodeMapper.guessStableKeyCode(o.scanCode);if(i!==-1){let S=this.simpleKeybindingToScanCodeBinding(new f.SimpleKeybinding(o.ctrlKey,o.shiftKey,o.altKey,o.metaKey,i));for(let s=0,l=S.length;s<l;s++)if(S[s].scanCode===o.scanCode)return t.KeyCodeUtils.toUserSettingsUS(i).toLowerCase()}return this._scanCodeToDispatch[o.scanCode]}getElectronAcceleratorLabelForScanCodeBinding(o){if(!o)return null;const c=t.IMMUTABLE_CODE_TO_KEY_CODE[o.scanCode];if(c!==-1)return t.KeyCodeUtils.toElectronAccelerator(c);const i=this._scanCodeKeyCodeMapper.guessStableKeyCode(o.scanCode);return this._OS===3&&!this._isUSStandard&&(i===80||i===81||i===82||i===83||i===84||i===85||i===86||i===87||i===88||i===89)?null:i!==-1?t.KeyCodeUtils.toElectronAccelerator(i):null}resolveKeybinding(o){let c=[];for(let i of o.parts)c.push(this.simpleKeybindingToScanCodeBinding(i));return this._toResolvedKeybinding(c)}_toResolvedKeybinding(o){if(o.length===0)return[];let c=[];return this._generateResolvedKeybindings(o,0,[],c),c}_generateResolvedKeybindings(o,c,i,S){const s=o[c],l=c===o.length-1;for(let r=0,p=s.length;r<p;r++){let u=[...i,s[r]];l?S.push(new k(this,this._OS,u)):this._generateResolvedKeybindings(o,c+1,u,S)}}resolveKeyboardEvent(o){let c=t.ScanCodeUtils.toEnum(o.code);c===94&&(c=46);const i=o.keyCode;if(i===15||i===16||i===17||i===18||i===20||i===19||i===14||i===13||i===12||i===11||i===1){const s=t.IMMUTABLE_KEY_CODE_TO_CODE[i];s!==-1&&(c=s)}else if((c===95||c===96||c===97||c===98||c===99||c===100||c===101||c===102||c===103||c===104||c===105)&&i>=0){const s=t.IMMUTABLE_KEY_CODE_TO_CODE[i];s!==-1&&(c=s)}const S=new f.ScanCodeBinding(o.ctrlKey,o.shiftKey,o.altKey,o.metaKey,c);return new k(this,this._OS,[S])}_resolveSimpleUserBinding(o){return o?o instanceof f.ScanCodeBinding?[o]:this.simpleKeybindingToScanCodeBinding(o):[]}resolveUserBinding(o){const c=o.map(i=>this._resolveSimpleUserBinding(i));return this._toResolvedKeybinding(c)}static _redirectCharCode(o){switch(o){case 12290:return 46;case 12300:return 91;case 12301:return 93;case 12304:return 91;case 12305:return 93;case 65307:return 59;case 65292:return 44}return o}static _charCodeToKb(o){return o=this._redirectCharCode(o),o<A.length?A[o]:null}static getCharCode(o){if(o.length===0)return 0;const c=o.charCodeAt(0);switch(c){case 768:return 96;case 769:return 180;case 770:return 94;case 771:return 732;case 772:return 175;case 773:return 8254;case 774:return 728;case 775:return 729;case 776:return 168;case 778:return 730;case 779:return 733}return c}}e.MacLinuxKeyboardMapper=v,function(){function C(o,c,i){for(let S=A.length;S<o;S++)A[S]=null;A[o]={keyCode:c,shiftKey:i}}for(let o=65;o<=90;o++)C(o,31+(o-65),!0);for(let o=97;o<=122;o++)C(o,31+(o-97),!1);C(59,80,!1),C(58,80,!0),C(61,81,!1),C(43,81,!0),C(44,82,!1),C(60,82,!0),C(45,83,!1),C(95,83,!0),C(46,84,!1),C(62,84,!0),C(47,85,!1),C(63,85,!0),C(96,86,!1),C(126,86,!0),C(91,87,!1),C(123,87,!0),C(92,88,!1),C(124,88,!0),C(93,89,!1),C(125,89,!0),C(39,90,!1),C(34,90,!0)}()}),define(ne[874],re([1,0,97,222,309,550,465]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WindowsKeyboardMapper=e.WindowsNativeResolvedKeybinding=void 0;const D=!1;function I(C){D&&console.info(C)}class w extends A.BaseResolvedKeybinding{constructor(o,c){super(1,c);this._mapper=o}_getLabel(o){return o.isDuplicateModifierCase()?"":this._mapper.getUILabelForKeyCode(o.keyCode)}_getUSLabelForKeybinding(o){return o.isDuplicateModifierCase()?"":t.KeyCodeUtils.toString(o.keyCode)}getUSLabel(){return _.UILabelProvider.toLabel(this._os,this._parts,o=>this._getUSLabelForKeybinding(o))}_getAriaLabel(o){return o.isDuplicateModifierCase()?"":this._mapper.getAriaLabelForKeyCode(o.keyCode)}_getElectronAccelerator(o){return this._mapper.getElectronAcceleratorForKeyBinding(o)}_getUserSettingsLabel(o){if(o.isDuplicateModifierCase())return"";const c=this._mapper.getUserSettingsLabelForKeyCode(o.keyCode);return c&&c.toLowerCase()}_isWYSIWYG(o){return this.__isWYSIWYG(o.keyCode)}__isWYSIWYG(o){if(o===15||o===16||o===17||o===18)return!0;const c=this._mapper.getAriaLabelForKeyCode(o),i=this._mapper.getUserSettingsLabelForKeyCode(o);return c===i}_getDispatchPart(o){if(o.isModifierKey())return null;let c="";return o.ctrlKey&&(c+="ctrl+"),o.shiftKey&&(c+="shift+"),o.altKey&&(c+="alt+"),o.metaKey&&(c+="meta+"),c+=t.KeyCodeUtils.toString(o.keyCode),c}_getSingleModifierDispatchPart(o){return o.keyCode===5&&!o.shiftKey&&!o.altKey&&!o.metaKey?"ctrl":o.keyCode===4&&!o.ctrlKey&&!o.altKey&&!o.metaKey?"shift":o.keyCode===6&&!o.ctrlKey&&!o.shiftKey&&!o.metaKey?"alt":o.keyCode===57&&!o.ctrlKey&&!o.shiftKey&&!o.altKey?"meta":null}static getProducedCharCode(o,c){return c?o.ctrlKey&&o.shiftKey&&o.altKey?c.withShiftAltGr:o.ctrlKey&&o.altKey?c.withAltGr:o.shiftKey?c.withShift:c.value:null}static getProducedChar(o,c){const i=this.getProducedCharCode(o,c);return i===null||i.length===0?" --- ":" "+i+" "}}e.WindowsNativeResolvedKeybinding=w;class v{constructor(o,c){this._keyCodeToLabel=[],this.isUSStandard=o,this._scanCodeToKeyCode=[],this._keyCodeToLabel=[],this._keyCodeExists=[],this._keyCodeToLabel[0]=t.KeyCodeUtils.toString(0);for(let l=0;l<193;l++){const r=t.IMMUTABLE_CODE_TO_KEY_CODE[l];r!==-1&&(this._scanCodeToKeyCode[l]=r,this._keyCodeToLabel[r]=t.KeyCodeUtils.toString(r),this._keyCodeExists[r]=!0)}let i=[],S=!1;this._codeInfo=[];for(let l in c)if(c.hasOwnProperty(l)){const r=t.ScanCodeUtils.toEnum(l);if(r===0){I(`Unknown scanCode ${l} in mapping.`);continue}const p=c[l],u=t.IMMUTABLE_CODE_TO_KEY_CODE[r];if(u!==-1){const b=t.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE[p.vkey]||0;if(b===0||u===b||r!==134)continue}const a=p.value,n=p.withShift,h=p.withAltGr,g=p.withShiftAltGr,d=t.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE[p.vkey]||0,m={scanCode:r,keyCode:d,value:a,withShift:n,withAltGr:h,withShiftAltGr:g};if(this._codeInfo[r]=m,this._scanCodeToKeyCode[r]=d,d===0)continue;if(this._keyCodeExists[d]=!0,a.length===0)this._keyCodeToLabel[d]=null;else if(a.length>1)this._keyCodeToLabel[d]=a;else{const b=a.charCodeAt(0);if(b>=97&&b<=122){const E=65+(b-97);i[E]=!0,S=!0,this._keyCodeToLabel[d]=String.fromCharCode(65+(b-97))}else b>=65&&b<=90?(i[b]=!0,S=!0,this._keyCodeToLabel[d]=a):this._keyCodeToLabel[d]=a}}const s=(l,r)=>{i[l]||(this._keyCodeToLabel[r]=String.fromCharCode(l))};if(s(65,31),s(66,32),s(67,33),s(68,34),s(69,35),s(70,36),s(71,37),s(72,38),s(73,39),s(74,40),s(75,41),s(76,42),s(77,43),s(78,44),s(79,45),s(80,46),s(81,47),s(82,48),s(83,49),s(84,50),s(85,51),s(86,52),s(87,53),s(88,54),s(89,55),s(90,56),!S){const l=(r,p)=>{this._keyCodeToLabel[r]=String.fromCharCode(p)};l(80,59),l(81,61),l(82,44),l(83,45),l(84,46),l(85,47),l(86,96),l(87,91),l(88,92),l(89,93),l(90,39)}}dumpDebugInfo(){let o=[],c=[88,104],i=0;o.push("-----------------------------------------------------------------------------------------------------------------------------------------");for(let S=0;S<193;S++){if(t.IMMUTABLE_CODE_TO_KEY_CODE[S]!==-1&&c.indexOf(S)===-1)continue;i%6==0&&(o.push("| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG |"),o.push("-----------------------------------------------------------------------------------------------------------------------------------------")),i++;const s=this._codeInfo[S],l=t.ScanCodeUtils.toString(S),r=[0,2,5,7];for(const p of r){const u=!!(p&1),a=!!(p&2),n=!!(p&4),h=new f.ScanCodeBinding(u,a,n,!1,S),g=this._resolveSimpleUserBinding(h),d=g?t.KeyCodeUtils.toString(g.keyCode):null,m=g?new w(this,[g]):null,b=`${u?"Ctrl+":""}${a?"Shift+":""}${n?"Alt+":""}${l}`,E=m?m.getAriaLabel():null,y=E?E.replace(/Control\+/,"Ctrl+"):null,T=m?m.getUserSettingsLabel():null,R=w.getProducedChar(h,s),O=d?`${u?"Ctrl+":""}${a?"Shift+":""}${n?"Alt+":""}${d}`:null,F=(m?m.isWYSIWYG():!1)?" ":" NO ";o.push(`| ${this._leftPad(b,30)} | ${R} | ${this._leftPad(O,25)} | ${this._leftPad(y,25)} | ${this._leftPad(T,25)} | ${F} |`)}o.push("-----------------------------------------------------------------------------------------------------------------------------------------")}return o.join(` `)}_leftPad(o,c){for(o===null&&(o="null");o.length<c;)o=" "+o;return o}getUILabelForKeyCode(o){return this._getLabelForKeyCode(o)}getAriaLabelForKeyCode(o){return this._getLabelForKeyCode(o)}getUserSettingsLabelForKeyCode(o){return this.isUSStandard?t.KeyCodeUtils.toUserSettingsUS(o):t.KeyCodeUtils.toUserSettingsGeneral(o)}getElectronAcceleratorForKeyBinding(o){return t.KeyCodeUtils.toElectronAccelerator(o.keyCode)}_getLabelForKeyCode(o){return this._keyCodeToLabel[o]||t.KeyCodeUtils.toString(0)}resolveKeybinding(o){const c=o.parts;for(let i=0,S=c.length;i<S;i++){const s=c[i];if(!this._keyCodeExists[s.keyCode])return[]}return[new w(this,c)]}resolveKeyboardEvent(o){const c=new f.SimpleKeybinding(o.ctrlKey,o.shiftKey,o.altKey,o.metaKey,o.keyCode);return new w(this,[c])}_resolveSimpleUserBinding(o){if(!o)return null;if(o instanceof f.SimpleKeybinding)return this._keyCodeExists[o.keyCode]?o:null;const c=this._scanCodeToKeyCode[o.scanCode]||0;return c===0||!this._keyCodeExists[c]?null:new f.SimpleKeybinding(o.ctrlKey,o.shiftKey,o.altKey,o.metaKey,c)}resolveUserBinding(o){const c=(0,k.removeElementsAfterNulls)(o.map(i=>this._resolveSimpleUserBinding(i)));return c.length>0?[new w(this,c)]:[]}}e.WindowsKeyboardMapper=v}),define(ne[2393],re([1,0,2,551,6,14,1956,874,2391,2392,103,171]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeyboardLayoutService=void 0;let o=class extends t.Disposable{constructor(l){super();this._onDidChangeKeyboardLayout=this._register(new _.Emitter),this.onDidChangeKeyboardLayout=this._onDidChangeKeyboardLayout.event,this._keyboardLayoutService=C.ProxyChannel.toService(l.getChannel("keyboardLayout")),this._initPromise=null,this._keyboardMapping=null,this._keyboardLayoutInfo=null,this._keyboardMapper=new I.MacLinuxFallbackKeyboardMapper(A.OS),this._register(this._keyboardLayoutService.onDidChangeKeyboardLayout(async({keyboardLayoutInfo:r,keyboardMapping:p})=>{await this.initialize(),!c(this._keyboardMapping,p)&&(this._keyboardMapping=p,this._keyboardLayoutInfo=r,this._keyboardMapper=new k.CachedKeyboardMapper(i(this._keyboardLayoutInfo,this._keyboardMapping)),this._onDidChangeKeyboardLayout.fire())}))}initialize(){return this._initPromise||(this._initPromise=this._doInitialize()),this._initPromise}async _doInitialize(){const l=await this._keyboardLayoutService.getKeyboardLayoutData(),{keyboardLayoutInfo:r,keyboardMapping:p}=l;this._keyboardMapping=p,this._keyboardLayoutInfo=r,this._keyboardMapper=new k.CachedKeyboardMapper(i(this._keyboardLayoutInfo,this._keyboardMapping))}getRawKeyboardMapping(){return this._keyboardMapping}getCurrentKeyboardLayout(){return this._keyboardLayoutInfo}getAllKeyboardLayouts(){return[]}getKeyboardMapper(l){return l===1?new I.MacLinuxFallbackKeyboardMapper(A.OS):this._keyboardMapper}validateCurrentKeyboardMapping(l){}};o=Ee([W(0,v.IMainProcessService)],o),e.KeyboardLayoutService=o;function c(s,l){return A.OS===1?(0,f.windowsKeyboardMappingEquals)(s,l):(0,f.macLinuxKeyboardMappingEquals)(s,l)}function i(s,l){const r=S(s);return A.OS===1?new D.WindowsKeyboardMapper(r,l):!l||Object.keys(l).length===0?new I.MacLinuxFallbackKeyboardMapper(A.OS):A.OS===2&&s.id==="com.apple.keylayout.DVORAK-QWERTYCMD"?new I.MacLinuxFallbackKeyboardMapper(A.OS):new w.MacLinuxKeyboardMapper(r,l,A.OS)}function S(s){if(!s)return!1;if(A.OS===3){const l=s;return l.layout.split(/,/g)[l.group]==="us"}return A.OS===2?s.id==="com.apple.keylayout.US":A.OS===1?s.name==="00000409":!1}}),define(ne[368],re([1,0,1887,350,19,42,1972,8,85,23,40,133,35]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkbenchLanguageService=e.languagesExtPoint=void 0,e.languagesExtPoint=C.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"languages",jsonSchema:{description:(0,t.localize)(0,null),type:"array",items:{type:"object",defaultSnippets:[{body:{id:"${1:languageId}",aliases:["${2:label}"],extensions:["${3:extension}"],configuration:"./language-configuration.json"}}],properties:{id:{description:(0,t.localize)(1,null),type:"string"},aliases:{description:(0,t.localize)(2,null),type:"array",items:{type:"string"}},extensions:{description:(0,t.localize)(3,null),default:[".foo"],type:"array",items:{type:"string"}},filenames:{description:(0,t.localize)(4,null),type:"array",items:{type:"string"}},filenamePatterns:{description:(0,t.localize)(5,null),type:"array",items:{type:"string"}},mimetypes:{description:(0,t.localize)(6,null),type:"array",items:{type:"string"}},firstLine:{description:(0,t.localize)(7,null),type:"string"},configuration:{description:(0,t.localize)(8,null),type:"string",default:"./language-configuration.json"},icon:{type:"object",description:(0,t.localize)(9,null),properties:{light:{description:(0,t.localize)(10,null),type:"string"},dark:{description:(0,t.localize)(11,null),type:"string"}}}}}}});let c=class extends k.LanguageService{constructor(l,r,p){super(p.verbose||p.isExtensionDevelopment||!p.isBuilt);this._configurationService=r,this._extensionService=l,e.languagesExtPoint.setHandler(u=>{let a=[];for(let n=0,h=u.length;n<h;n++){let g=u[n];if(!Array.isArray(g.value)){g.collector.error((0,t.localize)(12,null,e.languagesExtPoint.name));continue}for(let d=0,m=g.value.length;d<m;d++){let b=g.value[d];if(S(b,g.description,g.collector)){let E;b.configuration&&(E=(0,_.joinPath)(g.description.extensionLocation,b.configuration)),a.push({id:b.id,extensions:b.extensions,filenames:b.filenames,filenamePatterns:b.filenamePatterns,firstLine:b.firstLine,aliases:b.aliases,mimetypes:b.mimetypes,configuration:E,icon:b.icon&&{light:(0,_.joinPath)(g.description.extensionLocation,b.icon.light),dark:(0,_.joinPath)(g.description.extensionLocation,b.icon.dark)}})}}}this._registry.setDynamicLanguages(a)}),this.updateMime(),this._configurationService.onDidChangeConfiguration(u=>{u.affectsConfiguration(w.FILES_ASSOCIATIONS_CONFIG)&&this.updateMime()}),this._extensionService.whenInstalledExtensionsRegistered().then(()=>{this.updateMime()}),this.onDidEncounterLanguage(u=>{this._extensionService.activateByEvent(`onLanguage:${u}`)})}updateMime(){const l=this._configurationService.getValue();(0,f.clearConfiguredLanguageAssociations)(),l.files?.associations&&Object.keys(l.files.associations).forEach(r=>{const p=l.files.associations[r],u=this.getMimeType(p)||`text/x-${p}`;(0,f.registerConfiguredLanguageAssociation)({id:p,mime:u,filepattern:r})}),this._onDidChange.fire()}};c=Ee([W(0,v.IExtensionService),W(1,D.IConfigurationService),W(2,I.IEnvironmentService)],c),e.WorkbenchLanguageService=c;function i(s){return typeof s=="undefined"?!0:Array.isArray(s)?s.every(l=>typeof l=="string"):!1}function S(s,l,r){return s?typeof s.id!="string"?(r.error((0,t.localize)(14,null,"id")),!1):i(s.extensions)?i(s.filenames)?typeof s.firstLine!="undefined"&&typeof s.firstLine!="string"?(r.error((0,t.localize)(17,null,"firstLine")),!1):typeof s.configuration!="undefined"&&typeof s.configuration!="string"?(r.error((0,t.localize)(18,null,"configuration")),!1):i(s.aliases)?i(s.mimetypes)?typeof s.icon!="undefined"&&(typeof s.icon!="object"||typeof s.icon.light!="string"||typeof s.icon.dark!="string")?(r.error((0,t.localize)(21,null,"icon","light","dark")),!1):!0:(r.error((0,t.localize)(20,null,"mimetypes")),!1):(r.error((0,t.localize)(19,null,"aliases")),!1):(r.error((0,t.localize)(16,null,"filenames")),!1):(r.error((0,t.localize)(15,null,"extensions")),!1):(r.error((0,t.localize)(13,null,e.languagesExtPoint.name)),!1)}(0,o.registerSingleton)(A.ILanguageService,c)}),define(ne[2394],re([1,0,1452,368]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.codeActionsExtensionPointDescriptor=e.CodeActionExtensionPointFields=void 0;var _;(function(k){k.languages="languages",k.actions="actions",k.kind="kind",k.title="title",k.description="description"})(_=e.CodeActionExtensionPointFields||(e.CodeActionExtensionPointFields={}));const A=Object.freeze({type:"array",markdownDescription:t.localize(0,null),items:{type:"object",required:[_.languages,_.actions],properties:{[_.languages]:{type:"array",description:t.localize(1,null),items:{type:"string"}},[_.actions]:{type:"object",required:[_.kind,_.title],properties:{[_.kind]:{type:"string",markdownDescription:t.localize(2,null)},[_.title]:{type:"string",description:t.localize(3,null)},[_.description]:{type:"string",description:t.localize(4,null)}}}}}});e.codeActionsExtensionPointDescriptor={extensionPoint:"codeActions",deps:[f.languagesExtPoint],jsonSchema:A}}),define(ne[2395],re([1,0,1453,368]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.documentationExtensionPointDescriptor=e.DocumentationExtensionPointFields=void 0;var _;(function(k){k.when="when",k.title="title",k.command="command"})(_=e.DocumentationExtensionPointFields||(e.DocumentationExtensionPointFields={}));const A=Object.freeze({type:"object",description:t.localize(0,null),properties:{refactoring:{type:"array",description:t.localize(1,null),items:{type:"object",description:t.localize(2,null),required:[_.title,_.when,_.command],properties:{[_.title]:{type:"string",description:t.localize(3,null)},[_.when]:{type:"string",description:t.localize(4,null)},[_.command]:{type:"string",description:t.localize(5,null)}}}}}});e.documentationExtensionPointDescriptor={extensionPoint:"documentation",deps:[f.languagesExtPoint],jsonSchema:A}}),define(ne[2396],re([1,0,1489,133,368]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.customEditorsExtensionPoint=void 0;var A;(function(D){D.viewType="viewType",D.displayName="displayName",D.selector="selector",D.priority="priority"})(A||(A={}));const k={description:t.localize(0,null),type:"array",defaultSnippets:[{body:[{[A.viewType]:"$1",[A.displayName]:"$2",[A.selector]:[{filenamePattern:"$3"}]}]}],items:{type:"object",required:[A.viewType,A.displayName,A.selector],properties:{[A.viewType]:{type:"string",markdownDescription:t.localize(1,null)},[A.displayName]:{type:"string",description:t.localize(2,null)},[A.selector]:{type:"array",description:t.localize(3,null),items:{type:"object",defaultSnippets:[{body:{filenamePattern:"$1"}}],properties:{filenamePattern:{type:"string",description:t.localize(4,null)}}}},[A.priority]:{type:"string",markdownDeprecationMessage:t.localize(5,null),enum:["default","option"],markdownEnumDescriptions:[t.localize(6,null),t.localize(7,null)],default:"default"}}}};e.customEditorsExtensionPoint=f.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"customEditors",deps:[_.languagesExtPoint],jsonSchema:k})}),define(ne[2397],re([1,0,6,2,1487,214,364,2396,159]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContributedCustomEditors=void 0;class w extends f.Disposable{constructor(o){super();this._editors=new Map,this._onChange=this._register(new t.Emitter),this.onChange=this._onChange.event,this._memento=new A.Memento(w.CUSTOM_EDITORS_STORAGE_ID,o);const c=this._memento.getMemento(0,1);for(const i of c[w.CUSTOM_EDITORS_ENTRY_ID]||[])this.add(new k.CustomEditorInfo(i));D.customEditorsExtensionPoint.setHandler(i=>{this.update(i)})}update(o){this._editors.clear();for(const i of o)for(const S of i.value)this.add(new k.CustomEditorInfo({id:S.viewType,displayName:S.displayName,providerDisplayName:i.description.isBuiltin?_.localize(0,null):i.description.displayName||i.description.identifier.value,selector:S.selector||[],priority:v(S,i.description)}));const c=this._memento.getMemento(0,1);c[w.CUSTOM_EDITORS_ENTRY_ID]=Array.from(this._editors.values()),this._memento.saveMemento(),this._onChange.fire()}[Symbol.iterator](){return this._editors.values()}get(o){return this._editors.get(o)}getContributedEditors(o){return Array.from(this._editors.values()).filter(c=>c.matches(o))}add(o){if(this._editors.has(o.id)){console.error(`Custom editor with id '${o.id}' already registered`);return}this._editors.set(o.id,o)}}e.ContributedCustomEditors=w,w.CUSTOM_EDITORS_STORAGE_ID="customEditors",w.CUSTOM_EDITORS_ENTRY_ID="editors";function v(C,o){switch(C.priority){case I.RegisteredEditorPriority.default:case I.RegisteredEditorPriority.option:return C.priority;case I.RegisteredEditorPriority.builtin:return o.isBuiltin?I.RegisteredEditorPriority.builtin:I.RegisteredEditorPriority.default;default:return I.RegisteredEditorPriority.default}}}),define(ne[332],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageDetectionStatsId=e.AutomaticLanguageDetectionLikelyWrongId=e.ILanguageDetectionService=void 0,e.ILanguageDetectionService=(0,t.createDecorator)("ILanguageDetectionService"),e.AutomaticLanguageDetectionLikelyWrongId="automaticlanguagedetection.likelywrong",e.LanguageDetectionStatsId="automaticlanguagedetection.stats"}),define(ne[369],re([1,0,265,42,52,2,126,13,332,11,98,1437]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseTextEditorModel=void 0;let o=class Ko extends t.EditorModel{constructor(i,S,s,l,r){super();this.modelService=i,this.languageService=S,this.languageDetectionService=s,this.accessibilityService=l,this.textEditorModelHandle=void 0,this.modelDisposeListener=this._register(new A.MutableDisposable),this.autoDetectLanguageThrottler=this._register(new w.ThrottledDelayer(Ko.AUTO_DETECT_LANGUAGE_THROTTLE_DELAY)),this._hasLanguageSetExplicitly=!1,r&&this.handleExistingModel(r)}handleExistingModel(i){const S=this.modelService.getModel(i);if(!S)throw new Error(`Document with resource ${i.toString(!0)} does not exist`);this.textEditorModelHandle=i,this.registerModelDisposeListener(S)}registerModelDisposeListener(i){this.modelDisposeListener.value=i.onWillDispose(()=>{this.textEditorModelHandle=void 0,this.dispose()})}get textEditorModel(){return this.textEditorModelHandle?this.modelService.getModel(this.textEditorModelHandle):null}isReadonly(){return!0}get hasLanguageSetExplicitly(){return this._hasLanguageSetExplicitly}setLanguageId(i){this._hasLanguageSetExplicitly=!0,this.setLanguageIdInternal(i)}setLanguageIdInternal(i){!this.isResolved()||!i||i===this.textEditorModel.getLanguageId()||this.modelService.setMode(this.textEditorModel,this.languageService.createById(i))}getLanguageId(){return this.textEditorModel?.getLanguageId()}autoDetectLanguage(){return this.autoDetectLanguageThrottler.trigger(()=>this.doAutoDetectLanguage())}async doAutoDetectLanguage(){if(this.hasLanguageSetExplicitly||!this.textEditorModelHandle||!this.languageDetectionService.isEnabledForLanguage(this.getLanguageId()??k.PLAINTEXT_LANGUAGE_ID))return;const i=await this.languageDetectionService.detectLanguage(this.textEditorModelHandle);if(i&&!this.isDisposed()){this.setLanguageIdInternal(i);const S=this.languageService.getLanguageName(i);S&&this.accessibilityService.alert((0,C.localize)(0,null,S))}}createTextEditorModel(i,S,s){const l=this.getFirstLineText(i),r=this.getOrCreateLanguage(S,this.languageService,s,l);return this.doCreateTextEditorModel(i,r,S)}doCreateTextEditorModel(i,S,s){let l=s&&this.modelService.getModel(s);return l?this.updateTextEditorModel(i,S.languageId):(l=this.modelService.createModel(i,S,s),this.createdEditorModel=!0,this.registerModelDisposeListener(l)),this.textEditorModelHandle=l.uri,l}getFirstLineText(i){const S=i;return typeof S.getFirstLineText=="function"?S.getFirstLineText(1e3):i.getLineContent(1).substr(0,1e3)}getOrCreateLanguage(i,S,s,l){return!s||s===k.PLAINTEXT_LANGUAGE_ID?S.createByFilepathOrFirstLine((0,D.withUndefinedAsNull)(i),l):S.createById(s)}updateTextEditorModel(i,S){!this.isResolved()||(i&&this.modelService.updateModel(this.textEditorModel,i),S&&S!==k.PLAINTEXT_LANGUAGE_ID&&this.textEditorModel.getLanguageId()!==S&&this.modelService.setMode(this.textEditorModel,this.languageService.createById(S)))}createSnapshot(){return this.textEditorModel?this.textEditorModel.createSnapshot(!0):null}isResolved(){return!!this.textEditorModelHandle}dispose(){this.modelDisposeListener.dispose(),this.textEditorModelHandle&&this.createdEditorModel&&this.modelService.destroyModel(this.textEditorModelHandle),this.textEditorModelHandle=void 0,this.createdEditorModel=!1,super.dispose()}};o.AUTO_DETECT_LANGUAGE_THROTTLE_DELAY=600,o=Ee([W(0,_.IModelService),W(1,f.ILanguageService),W(2,I.ILanguageDetectionService),W(3,v.IAccessibilityService)],o),e.BaseTextEditorModel=o}),define(ne[203],re([1,0,1435,167,44,369,778,780,13,21,111]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorInputSerializer=e.DiffEditorInput=void 0;let C=class Ar extends f.SideBySideEditorInput{constructor(i,S,s,l,r,p){super(i,S,s,l,p);this.original=s,this.modified=l,this.forceOpenAsBinary=r,this.cachedModel=void 0,this.labels=this.computeLabels()}get typeId(){return Ar.ID}get editorId(){return this.modified.editorId===this.original.editorId?this.modified.editorId:void 0}get capabilities(){let i=super.capabilities;return this.labels.forceDescription&&(i|=64),i}computeLabels(){let i,S=!1;if(this.preferredName)i=this.preferredName;else{const n=this.original.getName(),h=this.modified.getName();i=(0,t.localize)(0,null,n,h),S=n===h}let s,l,r;if(this.preferredDescription)s=this.preferredDescription,l=this.preferredDescription,r=this.preferredDescription;else{s=this.computeLabel(this.original.getDescription(0),this.modified.getDescription(0)),r=this.computeLabel(this.original.getDescription(2),this.modified.getDescription(2));const n=this.original.getDescription(1),h=this.modified.getDescription(1);if(typeof n=="string"&&typeof h=="string"){const[g,d]=(0,v.shorten)([n,h]);l=this.computeLabel(g,d)}}const p=this.computeLabel(this.original.getTitle(0)??this.original.getName(),this.modified.getTitle(0)??this.modified.getName()," \u2194 "),u=this.computeLabel(this.original.getTitle(1)??this.original.getName(),this.modified.getTitle(1)??this.modified.getName()," \u2194 "),a=this.computeLabel(this.original.getTitle(2)??this.original.getName(),this.modified.getTitle(2)??this.modified.getName()," \u2194 ");return{name:i,shortDescription:s,mediumDescription:l,longDescription:r,forceDescription:S,shortTitle:p,mediumTitle:u,longTitle:a}}computeLabel(i,S,s=" - "){if(!(!i||!S))return i===S?S:`${i}${s}${S}`}getName(){return this.labels.name}getDescription(i=1){switch(i){case 0:return this.labels.shortDescription;case 2:return this.labels.longDescription;case 1:default:return this.labels.mediumDescription}}getTitle(i){switch(i){case 0:return this.labels.shortTitle;case 2:return this.labels.longTitle;default:case 1:return this.labels.mediumTitle}}async resolve(){const i=await this.createModel();return this.cachedModel&&this.cachedModel.dispose(),this.cachedModel=i,this.cachedModel}prefersEditorPane(i){return this.forceOpenAsBinary?i.find(S=>S.typeId===_.BINARY_DIFF_EDITOR_ID):i.find(S=>S.typeId===_.TEXT_DIFF_EDITOR_ID)}async createModel(){const[i,S]=await Promise.all([this.original.resolve(),this.modified.resolve()]);return S instanceof A.BaseTextEditorModel&&i instanceof A.BaseTextEditorModel?new D.TextDiffEditorModel(i,S):new k.DiffEditorModel((0,I.withNullAsUndefined)(i),(0,I.withNullAsUndefined)(S))}toUntyped(i){const S=super.toUntyped(i);if(S)return{...S,modified:S.primary,original:S.secondary}}matches(i){return this===i?!0:i instanceof Ar?this.modified.matches(i.modified)&&this.original.matches(i.original)&&i.forceOpenAsBinary===this.forceOpenAsBinary:(0,_.isResourceDiffEditorInput)(i)?this.modified.matches(i.modified)&&this.original.matches(i.original):!1}dispose(){this.cachedModel&&(this.cachedModel.dispose(),this.cachedModel=void 0),super.dispose()}};C.ID="workbench.editors.diffEditorInput",C=Ee([W(5,w.IEditorService)],C),e.DiffEditorInput=C;class o extends f.AbstractSideBySideEditorInputSerializer{createEditorInput(i,S,s,l,r){return i.createInstance(C,S,s,l,r,void 0)}}e.DiffEditorInputSerializer=o}),define(ne[875],re([1,0,369,42,52,332,98]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextResourceEditorModel=void 0;let D=class extends t.BaseTextEditorModel{constructor(w,v,C,o,c){super(C,v,o,c,w)}dispose(){this.textEditorModelHandle&&this.modelService.destroyModel(this.textEditorModelHandle),super.dispose()}};D=Ee([W(1,f.ILanguageService),W(2,_.IModelService),W(3,A.ILanguageDetectionService),W(4,k.IAccessibilityService)],D),e.TextResourceEditorModel=D}),define(ne[876],re([1,0,169,9,58,198,52,42,1637,16,28,7,141,53,491,168,153,104,200,64,332,158]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DeleteCellAction=void 0;const n="notebook.clearAllCellsOutputs",h="notebook.cell.edit",g="notebook.cell.delete",d="notebook.cell.clearOutputs";let m=class extends w.MenuItemAction{constructor(y,T){super({id:g,title:(0,I.localize)(0,null),icon:r.deleteCellIcon,precondition:s.NOTEBOOK_EDITOR_EDITABLE.isEqualTo(!0)},void 0,{shouldForwardArgs:!0},y,T)}};m=Ee([W(0,C.IContextKeyService),W(1,v.ICommandService)],m),e.DeleteCellAction=m,(0,w.registerAction2)(class extends S.NotebookCellAction{constructor(){super({id:h,title:(0,I.localize)(1,null),keybinding:{when:C.ContextKeyExpr.and(s.NOTEBOOK_CELL_LIST_FOCUSED,C.ContextKeyExpr.not(o.InputFocusedContextKey),s.NOTEBOOK_EDITOR_EDITABLE.isEqualTo(!0)),primary:3,weight:200},menu:{id:w.MenuId.NotebookCellTitle,when:C.ContextKeyExpr.and(s.NOTEBOOK_EDITOR_EDITABLE.isEqualTo(!0),s.NOTEBOOK_CELL_TYPE.isEqualTo("markup"),s.NOTEBOOK_CELL_MARKDOWN_EDIT_MODE.toNegated(),s.NOTEBOOK_CELL_EDITABLE),order:0,group:S.CELL_TITLE_CELL_GROUP_ID},icon:r.editIcon})}async runWithContext(y,T){!T.notebookEditor.hasModel()||T.notebookEditor.isReadOnly||T.notebookEditor.focusNotebookCell(T.cell,"editor")}});const b=C.ContextKeyExpr.and(s.NOTEBOOK_EDITOR_FOCUSED,o.InputFocusedContext);(0,w.registerAction2)(class extends S.NotebookCellAction{constructor(){super({id:l.QUIT_EDIT_CELL_COMMAND_ID,title:(0,I.localize)(2,null),menu:{id:w.MenuId.NotebookCellTitle,when:C.ContextKeyExpr.and(s.NOTEBOOK_CELL_TYPE.isEqualTo("markup"),s.NOTEBOOK_CELL_MARKDOWN_EDIT_MODE,s.NOTEBOOK_CELL_EDITABLE),order:3,group:S.CELL_TITLE_CELL_GROUP_ID},icon:r.stopEditIcon,keybinding:[{when:C.ContextKeyExpr.and(b,_.EditorContextKeys.hoverVisible.toNegated(),_.EditorContextKeys.hasNonEmptySelection.toNegated(),_.EditorContextKeys.hasMultipleSelections.toNegated()),primary:9,weight:S.NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT-5},{when:C.ContextKeyExpr.and(b,s.NOTEBOOK_CELL_TYPE.isEqualTo("markup")),primary:256|3,win:{primary:2048|512|3},weight:S.NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT-5}]})}async runWithContext(y,T){T.cell.cellKind===p.CellKind.Markup&&T.cell.updateEditState(l.CellEditState.Preview,l.QUIT_EDIT_CELL_COMMAND_ID),T.notebookEditor.focusNotebookCell(T.cell,"container",{skipReveal:!0})}}),(0,w.registerAction2)(class extends S.NotebookCellAction{constructor(){super({id:g,title:(0,I.localize)(3,null),keybinding:{primary:20,mac:{primary:2048|1},when:C.ContextKeyExpr.and(s.NOTEBOOK_EDITOR_FOCUSED,s.NOTEBOOK_EDITOR_EDITABLE,C.ContextKeyExpr.not(o.InputFocusedContextKey)),weight:200},icon:r.deleteCellIcon})}async runWithContext(y,T){!T.notebookEditor.hasModel()||T.notebookEditor.isReadOnly||(0,i.runDeleteAction)(T.notebookEditor,T.cell)}}),(0,w.registerAction2)(class extends S.NotebookCellAction{constructor(){super({id:d,title:(0,I.localize)(4,null),menu:[{id:w.MenuId.NotebookCellTitle,when:C.ContextKeyExpr.and(s.NOTEBOOK_CELL_TYPE.isEqualTo("code"),S.executeNotebookCondition,s.NOTEBOOK_CELL_HAS_OUTPUTS,s.NOTEBOOK_EDITOR_EDITABLE,s.NOTEBOOK_CELL_EDITABLE,s.NOTEBOOK_USE_CONSOLIDATED_OUTPUT_BUTTON.toNegated()),order:5,group:S.CELL_TITLE_OUTPUT_GROUP_ID},{id:w.MenuId.NotebookOutputToolbar,when:C.ContextKeyExpr.and(s.NOTEBOOK_CELL_HAS_OUTPUTS,s.NOTEBOOK_EDITOR_EDITABLE,s.NOTEBOOK_CELL_EDITABLE)}],keybinding:{when:C.ContextKeyExpr.and(s.NOTEBOOK_EDITOR_FOCUSED,C.ContextKeyExpr.not(o.InputFocusedContextKey),s.NOTEBOOK_CELL_HAS_OUTPUTS,s.NOTEBOOK_EDITOR_EDITABLE,s.NOTEBOOK_CELL_EDITABLE),primary:512|20,weight:200},icon:r.clearIcon})}async runWithContext(y,T){const R=y.get(a.INotebookExecutionStateService),O=T.notebookEditor;if(!O.hasModel()||!O.textModel.length)return;const x=T.cell,F=O.textModel.cells.indexOf(x.model);if(F<0)return;O.textModel.applyEdits([{editType:2,index:F,outputs:[]}],!0,void 0,()=>{},void 0),R.getCellExecution(T.cell.uri)?.state!==p.NotebookCellExecutionState.Executing&&T.notebookEditor.textModel.applyEdits([{editType:9,index:F,internalMetadata:{runStartTime:null,runStartTimeAdjustment:null,runEndTime:null,executionOrder:null,lastRunSuccess:null}}],!0,void 0,()=>{},void 0)}}),(0,w.registerAction2)(class extends S.NotebookAction{constructor(){super({id:n,title:(0,I.localize)(5,null),precondition:s.NOTEBOOK_HAS_OUTPUTS,menu:[{id:w.MenuId.EditorTitle,when:C.ContextKeyExpr.and(s.NOTEBOOK_IS_ACTIVE_EDITOR,C.ContextKeyExpr.notEquals("config.notebook.globalToolbar",!0)),group:"navigation",order:0},{id:w.MenuId.NotebookToolbar,when:C.ContextKeyExpr.and(S.executeNotebookCondition,C.ContextKeyExpr.equals("config.notebook.globalToolbar",!0)),group:"navigation/execute",order:0}],icon:r.clearIcon})}async runWithContext(y,T){const R=y.get(a.INotebookExecutionStateService),O=T.notebookEditor;if(!O.hasModel()||!O.textModel.length)return;O.textModel.applyEdits(O.textModel.cells.map((F,L)=>({editType:2,index:L,outputs:[]})),!0,void 0,()=>{},void 0);const x=O.textModel.cells.map((F,L)=>{if(R.getCellExecution(F.uri)?.state!==p.NotebookCellExecutionState.Executing)return{editType:9,index:L,internalMetadata:{runStartTime:null,runStartTimeAdjustment:null,runEndTime:null,executionOrder:null,lastRunSuccess:null}}}).filter(F=>!!F);x.length&&T.notebookEditor.textModel.applyEdits(x,!0,void 0,()=>{},void 0)}}),(0,w.registerAction2)(class extends S.NotebookCellAction{constructor(){super({id:l.CHANGE_CELL_LANGUAGE,title:(0,I.localize)(6,null),description:{description:(0,I.localize)(7,null),args:[{name:"range",description:"The cell range",schema:{type:"object",required:["start","end"],properties:{start:{type:"number"},end:{type:"number"}}}},{name:"language",description:"The target cell language",schema:{type:"string"}}]}})}getCellContextFromArgs(y,T,...R){if(!T||typeof T.start!="number"||typeof T.end!="number"||T.start>=T.end)return;const O=R.length&&typeof R[0]=="string"?R[0]:void 0,x=this.getEditorContextFromArgsOrActive(y);if(!(!x||!x.notebookEditor.hasModel()||T.start>=x.notebookEditor.getLength()))return{notebookEditor:x.notebookEditor,cell:x.notebookEditor.cellAt(T.start),language:O}}async runWithContext(y,T){T.language?await this.setLanguage(T,T.language):await this.showLanguagePicker(y,T)}async showLanguagePicker(y,T){const R=[],O=[],x=y.get(D.ILanguageService),F=y.get(k.IModelService),L=y.get(c.IQuickInputService),M=y.get(u.ILanguageDetectionService);new Set([...T.notebookEditor.activeKernel?.supportedLanguages??x.getRegisteredLanguageIds(),"markdown"]).forEach(U=>{let H;(T.cell.cellKind===p.CellKind.Markup?U==="markdown":U===T.cell.language)?H=(0,I.localize)(8,null,U):H=(0,I.localize)(9,null,U);const K=x.getLanguageName(U);if(!K)return;const G={label:K,iconClasses:(0,A.getIconClasses)(F,x,this.getFakeResource(K,x)),description:H,languageId:U};U==="markdown"||U===T.cell.language?R.push(G):O.push(G)}),O.sort((U,H)=>U.description.localeCompare(H.description));const B={label:(0,I.localize)(10,null)},P=[B,{type:"separator",label:(0,I.localize)(11,null)},...R,{type:"separator"},...O],V=await L.pick(P,{placeHolder:(0,I.localize)(12,null)}),z=V===B?await M.detectLanguage(T.cell.uri):V?.languageId;z&&await this.setLanguage(T,z)}async setLanguage(y,T){if(T==="markdown"&&y.cell?.language!=="markdown"){const R=y.notebookEditor.getCellIndex(y.cell);await(0,i.changeCellToKind)(p.CellKind.Markup,{cell:y.cell,notebookEditor:y.notebookEditor,ui:!0},"markdown",t.Mimes.markdown);const O=y.notebookEditor.cellAt(R);O&&y.notebookEditor.focusNotebookCell(O,"editor")}else if(T!=="markdown"&&y.cell?.cellKind===p.CellKind.Markup)await(0,i.changeCellToKind)(p.CellKind.Code,{cell:y.cell,notebookEditor:y.notebookEditor,ui:!0},T);else{const R=y.notebookEditor.textModel.cells.indexOf(y.cell.model);y.notebookEditor.textModel.applyEdits([{editType:4,index:R,language:T}],!0,void 0,()=>{},void 0)}}getFakeResource(y,T){let R;const O=T.getLanguageIdByLanguageName(y);if(O){const x=T.getExtensions(O);if(x.length)R=f.URI.file(x[0]);else{const F=T.getFilenames(O);F.length&&(R=f.URI.file(F[0]))}}return R}})}),define(ne[877],re([1,0,44,265,203,232,21]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookDiffEditorInput=void 0;class D extends f.EditorModel{constructor(v,C){super();this.original=v,this.modified=C}}let I=class Kn extends _.DiffEditorInput{constructor(v,C,o,c,i,S){super(v,C,o,c,void 0,S);this.original=o,this.modified=c,this.viewType=i,this._modifiedTextModel=null,this._originalTextModel=null,this._cachedModel=void 0}static create(v,C,o,c,i,S){const s=A.NotebookEditorInput.create(v,i,S),l=A.NotebookEditorInput.create(v,C,S);return v.createInstance(Kn,o,c,s,l,S)}get resource(){return this.modified.resource}get editorId(){return this.viewType}get typeId(){return Kn.ID}async resolve(){const[v,C]=await Promise.all([this.original.resolve(),this.modified.resolve()]);if(this._cachedModel?.dispose(),!C)throw new Error(`Fail to resolve modified editor model for resource ${this.modified.resource} with notebookType ${this.viewType}`);if(!v)throw new Error(`Fail to resolve original editor model for resource ${this.original.resource} with notebookType ${this.viewType}`);return this._originalTextModel=v,this._modifiedTextModel=C,this._cachedModel=new D(this._originalTextModel,this._modifiedTextModel),this._cachedModel}toUntyped(){const v={resource:this.original.resource},C={resource:this.resource};return{original:v,modified:C,primary:C,secondary:v,options:{override:this.viewType}}}matches(v){return this===v?!0:v instanceof Kn?this.modified.matches(v.modified)&&this.original.matches(v.original)&&this.viewType===v.viewType:(0,t.isResourceDiffEditorInput)(v)?this.modified.matches(v.modified)&&this.original.matches(v.original)&&this.editorId!==void 0&&this.editorId===v.options?.override:!1}};I.ID="workbench.input.diffNotebookInput",I=Ee([W(5,k.IEditorService)],I),e.NotebookDiffEditorInput=I}),define(ne[2398],re([1,0,77,6,92,278,2,55,18,13,9,72,263,98,8,23,5,24,214,2324,877,2174,64,232,415,490,2181,803,142,159,40]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookService=e.NotebookOutputRendererInfoStore=e.NotebookProviderInfoStore=void 0;let R=class pi extends k.Disposable{constructor(M,N,B,P,V,z,U,H){super();this._editorResolverService=B,this._configurationService=P,this._accessibilityService=V,this._instantiationService=z,this._fileService=U,this._notebookEditorModelResolverService=H,this._handled=!1,this._contributedEditors=new Map,this._contributedEditorDisposables=this._register(new k.DisposableStore),this._memento=new r.Memento(pi.CUSTOM_EDITORS_STORAGE_ID,M);const K=this._memento.getMemento(0,1);for(const G of K[pi.CUSTOM_EDITORS_ENTRY_ID]||[])this.add(new b.NotebookProviderInfo(G));this._register(N.onDidRegisterExtensions(()=>{this._handled||(this._clear(),K[pi.CUSTOM_EDITORS_ENTRY_ID]=[],this._memento.saveMemento())})),p.notebooksExtensionPoint.setHandler(G=>this._setupHandler(G))}dispose(){this._clear(),super.dispose()}_setupHandler(M){this._handled=!0;const N=[...this._contributedEditors.values()].filter(V=>!V.extension);this._clear();const B=new Map;N.forEach(V=>{B.set(V.id,this.add(V))});for(const V of M)for(const z of V.value){if(!z.type){V.collector.error("Notebook does not specify type-property");continue}const U=this.get(z.type);if(U)if(!U.extension&&V.description.isBuiltin&&N.find(H=>H.id===z.type))B.get(z.type)?.dispose();else{V.collector.error(`Notebook type '${z.type}' already used`);continue}this.add(new b.NotebookProviderInfo({extension:V.description.identifier,id:z.type,displayName:z.displayName,selectors:z.selector||[],priority:this._convertPriority(z.priority),providerDisplayName:V.description.displayName??V.description.identifier.value,exclusive:!1}))}const P=this._memento.getMemento(0,1);P[pi.CUSTOM_EDITORS_ENTRY_ID]=Array.from(this._contributedEditors.values()),this._memento.saveMemento()}clearEditorCache(){const M=this._memento.getMemento(0,1);M[pi.CUSTOM_EDITORS_ENTRY_ID]=[],this._memento.saveMemento()}_convertPriority(M){return!M||M===n.NotebookEditorPriority.default?y.RegisteredEditorPriority.default:y.RegisteredEditorPriority.option}_registerContributionPoint(M){const N=new k.DisposableStore;for(const B of M.selectors){const P=B.include||B,V={id:M.id,label:M.displayName,detail:M.providerDisplayName,priority:M.exclusive?y.RegisteredEditorPriority.exclusive:M.priority},z={canHandleDiff:()=>!!this._configurationService.getValue(n.NotebookSetting.textDiffEditorPreview)&&!this._accessibilityService.isScreenReaderOptimized(),canSupportResource:G=>G.scheme===I.Schemas.untitled||G.scheme===I.Schemas.vscodeNotebookCell||this._fileService.hasProvider(G)},U=({resource:G,options:q})=>{const Z=n.CellUri.parse(G);let j=G,X;Z&&(j=Z.notebook,X={resource:G,options:q});const Y={...q,cellOptions:X};return{editor:h.NotebookEditorInput.create(this._instantiationService,j,M.id),options:Y}},H=async({resource:G,options:q})=>{const Z=await this._notebookEditorModelResolverService.resolve({untitledResource:G},M.id);return Z.object.notebook.onWillDispose(()=>{Z.dispose()}),{editor:h.NotebookEditorInput.create(this._instantiationService,Z.object.resource,M.id),options:q}},K=({modified:G,original:q,label:Z,description:j})=>({editor:u.NotebookDiffEditorInput.create(this._instantiationService,G.resource,Z,j,q.resource,M.id)});N.add(this._editorResolverService.registerEditor(P,V,z,U,H,K)),N.add(this._editorResolverService.registerEditor(`${I.Schemas.vscodeNotebookCell}:/**/${P}`,{...V,priority:y.RegisteredEditorPriority.exclusive},z,U,void 0,K))}return N}_clear(){this._contributedEditors.clear(),this._contributedEditorDisposables.clear()}get(M){return this._contributedEditors.get(M)}add(M){if(this._contributedEditors.has(M.id))throw new Error(`notebook type '${M.id}' ALREADY EXISTS`);this._contributedEditors.set(M.id,M);const N=this._registerContributionPoint(M);this._contributedEditorDisposables.add(N);const B=this._memento.getMemento(0,1);return B[pi.CUSTOM_EDITORS_ENTRY_ID]=Array.from(this._contributedEditors.values()),this._memento.saveMemento(),(0,k.toDisposable)(()=>{const P=this._memento.getMemento(0,1);P[pi.CUSTOM_EDITORS_ENTRY_ID]=Array.from(this._contributedEditors.values()),this._memento.saveMemento(),N.dispose(),this._contributedEditors.delete(M.id)})}getContributedNotebook(M){const N=[];for(const B of this._contributedEditors.values())B.matches(M)&&N.push(B);return N.length===0&&M.scheme===I.Schemas.untitled?Array.from(this._contributedEditors.values()):N}[Symbol.iterator](){return this._contributedEditors.values()}};R.CUSTOM_EDITORS_STORAGE_ID="notebookEditors",R.CUSTOM_EDITORS_ENTRY_ID="editors",R=Ee([W(0,l.IStorageService),W(1,T.IExtensionService),W(2,y.IEditorResolverService),W(3,i.IConfigurationService),W(4,c.IAccessibilityService),W(5,s.IInstantiationService),W(6,S.IFileService),W(7,g.INotebookEditorModelResolverService)],R),e.NotebookProviderInfoStore=R;let O=class{constructor(M){this.contributedRenderers=new Map,this.preferredMimetype=new A.Lazy(()=>this.preferredMimetypeMemento.getMemento(1,0)),this.preferredMimetypeMemento=new r.Memento("workbench.editor.notebook.preferredRenderer2",M)}clear(){this.contributedRenderers.clear()}get(M){return this.contributedRenderers.get(M)}getAll(){return Array.from(this.contributedRenderers.values())}add(M){this.contributedRenderers.has(M.id)||this.contributedRenderers.set(M.id,M)}setPreferred(M,N,B){const P=this.preferredMimetype.getValue(),V=P[M.id];V?V[N]=B:P[M.id]={[N]:B},this.preferredMimetypeMemento.saveMemento()}findBestRenderers(M,N,B){let P;(function(K){K[K.PreviouslySelected=256]="PreviouslySelected",K[K.SameExtensionAsNotebook=512]="SameExtensionAsNotebook",K[K.BuiltIn=768]="BuiltIn",K[K.OtherRenderer=1024]="OtherRenderer"})(P||(P={}));const V=M&&this.preferredMimetype.getValue()[M.id]?.[N],z=M?.extension?.value,U=M?.id,H=Array.from(this.contributedRenderers.values()).map(K=>{const G=B===void 0?K.matchesWithoutKernel(N):K.matches(N,B);if(G===3)return;const q=K.extensionId.value,Z=V===K.id?256:q===z||n.RENDERER_EQUIVALENT_EXTENSIONS.get(q)?.has(U)?512:K.isBuiltin?768:1024;return{ordered:{mimeType:N,rendererId:K.id,isTrusted:!0},score:Z|G}}).filter(w.isDefined);return H.length===0?[{mimeType:N,rendererId:n.RENDERER_NOT_AVAILABLE,isTrusted:!0}]:H.sort((K,G)=>K.score-G.score).map(K=>K.ordered)}};O=Ee([W(0,l.IStorageService)],O),e.NotebookOutputRendererInfoStore=O;class x{constructor(M,N){this.model=M,this._modelEventListeners=new k.DisposableStore,this._modelEventListeners.add(M.onWillDispose(()=>N(M)))}dispose(){this._modelEventListeners.dispose()}}let F=class extends k.Disposable{constructor(M,N,B,P,V,z){super();this._extensionService=M,this._configurationService=N,this._accessibilityService=B,this._instantiationService=P,this._codeEditorService=V,this.configurationService=z,this._notebookProviders=new Map,this._notebookProviderInfoStore=void 0,this._notebookRenderersInfoStore=this._instantiationService.createInstance(O),this._models=new D.ResourceMap,this._onWillAddNotebookDocument=this._register(new f.Emitter),this._onDidAddNotebookDocument=this._register(new f.Emitter),this._onWillRemoveNotebookDocument=this._register(new f.Emitter),this._onDidRemoveNotebookDocument=this._register(new f.Emitter),this.onWillAddNotebookDocument=this._onWillAddNotebookDocument.event,this.onDidAddNotebookDocument=this._onDidAddNotebookDocument.event,this.onDidRemoveNotebookDocument=this._onDidRemoveNotebookDocument.event,this.onWillRemoveNotebookDocument=this._onWillRemoveNotebookDocument.event,this._onAddViewType=this._register(new f.Emitter),this.onAddViewType=this._onAddViewType.event,this._onWillRemoveViewType=this._register(new f.Emitter),this.onWillRemoveViewType=this._onWillRemoveViewType.event,this._onDidChangeEditorTypes=this._register(new f.Emitter),this.onDidChangeEditorTypes=this._onDidChangeEditorTypes.event,this._lastClipboardIsCopy=!0,p.notebookRendererExtensionPoint.setHandler(G=>{this._notebookRenderersInfoStore.clear();for(const q of G)for(const Z of q.value){if(!Z.entrypoint){q.collector.error("Notebook renderer does not specify entry point");continue}const j=Z.id;if(!j){q.collector.error("Notebook renderer does not specify id-property");continue}this._notebookRenderersInfoStore.add(new m.NotebookOutputRendererInfo({id:j,extension:q.description,entrypoint:Z.entrypoint,displayName:Z.displayName,mimeTypes:Z.mimeTypes||[],dependencies:Z.dependencies,optionalDependencies:Z.optionalDependencies,requiresMessaging:Z.requiresMessaging}))}});const U=()=>{this._displayOrder=new n.MimeTypeDisplayOrder(this._configurationService.getValue(n.NotebookSetting.displayOrder)||[],this._accessibilityService.isScreenReaderOptimized()?n.ACCESSIBLE_NOTEBOOK_DISPLAY_ORDER:n.NOTEBOOK_DISPLAY_ORDER)};U(),this._register(this._configurationService.onDidChangeConfiguration(G=>{G.affectedKeys.indexOf(n.NotebookSetting.displayOrder)>=0&&U()})),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>{U()}));let H=!1;const K=new Set;this._register(this._codeEditorService.onDecorationTypeRegistered(G=>{if(H||K.has(G))return;const q=this._codeEditorService.resolveDecorationOptions(G,!0);if(q.afterContentClassName||q.beforeContentClassName){const Z=this._codeEditorService.resolveDecorationCSSRules(G);if(Z!==null){for(let j=0;j<Z.length;j++)if((Z[j].selectorText.endsWith("::after")||Z[j].selectorText.endsWith("::after"))&&Z[j].cssText.indexOf("top:")>-1){const X=this.configurationService.getValue("editor");(0,d.updateEditorTopPadding)(o.BareFontInfo.createFromRawSettings(X,t.PixelRatio.value).lineHeight+2),H=!0;break}}}K.add(G)}))}get notebookProviderInfoStore(){return this._notebookProviderInfoStore||(this._notebookProviderInfoStore=this._register(this._instantiationService.createInstance(R))),this._notebookProviderInfoStore}getEditorTypes(){return[...this.notebookProviderInfoStore].map(M=>({id:M.id,displayName:M.displayName,providerDisplayName:M.providerDisplayName}))}clearEditorCache(){this.notebookProviderInfoStore.clearEditorCache()}_postDocumentOpenActivation(M){this._extensionService.activateByEvent(`onNotebook:${M}`),this._extensionService.activateByEvent("onNotebook:*")}async canResolve(M){if(this._notebookProviders.has(M))return!0;await this._extensionService.whenInstalledExtensionsRegistered();const N=this._notebookProviderInfoStore?.get(M),B=[f.Event.toPromise(f.Event.filter(this.onAddViewType,()=>this._notebookProviders.has(M)))];if(N&&N.extension){const P=await this._extensionService.getExtension(N.extension.value);P?.activationEvents&&P.activationEvents.indexOf(`onNotebook:${M}`)>=0&&B.push(this._extensionService._activateById(N.extension,{startup:!1,activationEvent:`onNotebook:${M}}`,extensionId:N.extension}))}return await Promise.race(B),this._notebookProviders.has(M)}registerContributedNotebookType(M,N){const B=new b.NotebookProviderInfo({extension:N.extension,id:M,displayName:N.displayName,providerDisplayName:N.providerDisplayName,exclusive:N.exclusive,priority:y.RegisteredEditorPriority.default,selectors:[]});B.update({selectors:N.filenamePattern});const P=this.notebookProviderInfoStore.add(B);return this._onDidChangeEditorTypes.fire(),(0,k.toDisposable)(()=>{P.dispose(),this._onDidChangeEditorTypes.fire()})}_registerProviderData(M,N){if(this._notebookProviders.has(M))throw new Error(`notebook provider for viewtype '${M}' already exists`);return this._notebookProviders.set(M,N),this._onAddViewType.fire(M),(0,k.toDisposable)(()=>{this._onWillRemoveViewType.fire(M),this._notebookProviders.delete(M)})}registerNotebookController(M,N,B){return this.notebookProviderInfoStore.get(M)?.update({options:B.options}),this._registerProviderData(M,new E.ComplexNotebookProviderInfo(M,B,N))}registerNotebookSerializer(M,N,B){return this.notebookProviderInfoStore.get(M)?.update({options:B.options}),this._registerProviderData(M,new E.SimpleNotebookProviderInfo(M,B,N))}async withNotebookDataProvider(M,N){const B=this.notebookProviderInfoStore.getContributedNotebook(M),P=N?B.find(z=>z.id===N):B[0];if(!P)throw new Error(`NO contribution for resource: '${M.toString()}'`);await this.canResolve(P.id);const V=this._notebookProviders.get(P.id);if(!V)throw new Error(`NO provider registered for view type: '${P.id}'`);return V}getRendererInfo(M){return this._notebookRenderersInfoStore.get(M)}updateMimePreferredRenderer(M,N,B,P){const V=this.notebookProviderInfoStore.get(M);V&&this._notebookRenderersInfoStore.setPreferred(V,N,B),this._displayOrder.prioritize(N,P)}saveMimeDisplayOrder(M){this._configurationService.updateValue(n.NotebookSetting.displayOrder,this._displayOrder.toArray(),M)}getRenderers(){return this._notebookRenderersInfoStore.getAll()}createNotebookTextModel(M,N,B,P){if(this._models.has(N))throw new Error(`notebook for ${N} already exists`);const V=this._instantiationService.createInstance(a.NotebookTextModel,M,N,B.cells,B.metadata,P);return this._models.set(N,new x(V,this._onWillDisposeDocument.bind(this))),this._onWillAddNotebookDocument.fire(V),this._onDidAddNotebookDocument.fire(V),this._postDocumentOpenActivation(M),V}getNotebookTextModel(M){return this._models.get(M)?.model}getNotebookTextModels(){return _.Iterable.map(this._models.values(),M=>M.model)}listNotebookDocuments(){return[...this._models].map(M=>M[1].model)}_onWillDisposeDocument(M){const N=this._models.get(M.uri);N&&(this._onWillRemoveNotebookDocument.fire(N.model),this._models.delete(M.uri),N.dispose(),this._onDidRemoveNotebookDocument.fire(N.model))}getOutputMimeTypeInfo(M,N,B){const P=this._displayOrder.sort(new Set(B.outputs.map(z=>z.mime))),V=this.notebookProviderInfoStore.get(M.viewType);return P.flatMap(z=>this._notebookRenderersInfoStore.findBestRenderers(V,z,N)).sort((z,U)=>(z.rendererId===n.RENDERER_NOT_AVAILABLE?1:0)-(U.rendererId===n.RENDERER_NOT_AVAILABLE?1:0))}getContributedNotebookTypes(M){return M?this.notebookProviderInfoStore.getContributedNotebook(M):[...this.notebookProviderInfoStore]}getContributedNotebookType(M){return this.notebookProviderInfoStore.get(M)}getNotebookProviderResourceRoots(){const M=[];return this._notebookProviders.forEach(N=>{N.extensionData.location&&M.push(v.URI.revive(N.extensionData.location))}),M}setToCopy(M,N){this._cutItems=M,this._lastClipboardIsCopy=N}getToCopy(){if(this._cutItems)return{items:this._cutItems,isCopy:this._lastClipboardIsCopy}}};F=Ee([W(0,T.IExtensionService),W(1,i.IConfigurationService),W(2,c.IAccessibilityService),W(3,s.IInstantiationService),W(4,C.ICodeEditorService),W(5,i.IConfigurationService)],F),e.NotebookService=F}),define(ne[2399],re([1,0,10,163,11,6,2,73,16,7,37,5,38,876,414,175,798]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellTitleToolbarPart=e.BetweenCellToolbar=void 0;let l=class extends S.CellPart{constructor(n,h,g,d,m,b,E){super();this._notebookEditor=n,this._bottomCellToolbarContainer=g,this._betweenCellToolbar=this._register(new f.ToolBar(this._bottomCellToolbarContainer,m,{actionViewItemProvider:R=>{if(R instanceof I.MenuItemAction)return this._notebookEditor.notebookOptions.getLayoutConfiguration().insertToolbarAlignment==="center"?d.createInstance(i.CodiconActionViewItem,R):d.createInstance(D.MenuEntryActionViewItem,R,void 0)}}));const y=this._register(E.createMenu(this._notebookEditor.creationOptions.menuIds.cellInsertToolbar,b)),T=()=>{const R=p(y);this._betweenCellToolbar.setActions(R.primary,R.secondary)};this._register(y.onDidChange(()=>T())),this._register(this._notebookEditor.notebookOptions.onDidChangeOptions(R=>{R.insertToolbarAlignment&&T()})),T()}updateContext(n){this._betweenCellToolbar.context=n}didRenderCell(n){this._betweenCellToolbar.context={ui:!0,cell:n,notebookEditor:this._notebookEditor,$mid:12}}updateInternalLayoutNow(n){const h=n.layoutInfo.bottomToolbarOffset;this._bottomCellToolbarContainer.style.transform=`translateY(${h}px)`}};l=Ee([W(3,C.IInstantiationService),W(4,v.IContextMenuService),W(5,w.IContextKeyService),W(6,I.IMenuService)],l),e.BetweenCellToolbar=l;let r=class extends S.CellPart{constructor(n,h,g,d,m,b,E){super();this.toolbarContainer=n,this._rootClassDelegate=h,this._notebookEditor=d,this._actionsDisposables=this._register(new k.DisposableStore),this._hasActions=!1,this._onDidUpdateActions=this._register(new A.Emitter),this.onDidUpdateActions=this._onDidUpdateActions.event,this._toolbar=E.invokeFunction(y=>u(y,n)),this._titleMenu=this._register(b.createMenu(g,m)),this._deleteToolbar=this._register(E.invokeFunction(y=>u(y,n,"cell-delete-toolbar"))),this._notebookEditor.creationOptions.isReadOnly||this._deleteToolbar.setActions([E.createInstance(c.DeleteCellAction)]),this.setupChangeListeners()}get hasActions(){return this._hasActions}didRenderCell(n){this.cellDisposables.add((0,s.registerStickyScroll)(this._notebookEditor,n,this.toolbarContainer,{extraOffset:4,min:-14})),this.updateContext({ui:!0,cell:n,notebookEditor:this._notebookEditor,$mid:12})}updateContext(n){this._toolbar.context=n,this._deleteToolbar.context=n}setupChangeListeners(){let n=!1,h;this.updateActions(),this._register(this._titleMenu.onDidChange(()=>{if(n){h=()=>this.updateActions();return}this.updateActions()})),this._rootClassDelegate.toggle("cell-toolbar-dropdown-active",!1),this._register(this._toolbar.onDidChangeDropdownVisibility(g=>{n=g,this._rootClassDelegate.toggle("cell-toolbar-dropdown-active",g),h&&!g&&(this._register((0,_.disposableTimeout)(()=>{h&&h()})),h=void 0)}))}updateActions(){this._actionsDisposables.clear();const n=p(this._titleMenu);this._actionsDisposables.add(n.disposable);const h=t.isAncestor(document.activeElement,this._toolbar.getElement());this._toolbar.setActions(n.primary,n.secondary),h&&this._notebookEditor.focus(),n.primary.length||n.secondary.length?(this._rootClassDelegate.toggle("cell-has-toolbar-actions",!0),this._hasActions=!0,this._onDidUpdateActions.fire()):(this._rootClassDelegate.toggle("cell-has-toolbar-actions",!1),this._hasActions=!1,this._onDidUpdateActions.fire())}};r=Ee([W(4,w.IContextKeyService),W(5,I.IMenuService),W(6,C.IInstantiationService)],r),e.CellTitleToolbarPart=r;function p(a){const g={primary:[],secondary:[]},d=(0,D.createAndFillInActionBarActions)(a,{shouldForwardArgs:!0},g,m=>/^inline/.test(m));return{...g,disposable:d}}function u(a,n,h){const g=a.get(v.IContextMenuService),d=a.get(o.IKeybindingService),m=a.get(C.IInstantiationService),b=new f.ToolBar(n,g,{getKeyBinding:E=>d.lookupKeybinding(E.id),actionViewItemProvider:E=>(0,D.createActionViewItem)(m,E),renderDropdownAsChildElement:!0});return h&&b.getElement().classList.add(h),b}}),define(ne[2400],re([1,0,2,332,18,50,8,42,9,14,35,52,448,27,552,124,549,34,21,24,55,31]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageDetectionWorkerClient=e.LanguageDetectionWorkerHost=e.LanguageDetectionService=void 0;const n=12,h="../../../../../../node_modules/vscode-regexp-languagedetection",g="../../../../../../node_modules.asar/vscode-regexp-languagedetection",d="../../../../../../node_modules/@vscode/vscode-languagedetection",m="../../../../../../node_modules.asar/@vscode/vscode-languagedetection";let b=class mi extends t.Disposable{constructor(R,O,x,F,L,M,N,B,P,V,z){super();this._environmentService=R,this._languageService=O,this._configurationService=x,this._diagnosticsService=F,this._workspaceContextService=L,this._editorService=N,this._logService=V,this.hasResolvedWorkspaceLanguageIds=!1,this.workspaceLanguageIds=new Set,this.sessionOpenedLanguageIds=new Set,this.historicalGlobalOpenedLanguageIds=new u.LRUCache(n),this.historicalWorkspaceOpenedLanguageIds=new u.LRUCache(n),this.dirtyBiases=!0,this.langBiases={},this._languageDetectionWorkerClient=new y(M,B,this._environmentService.isBuilt&&!w.isWeb?_.FileAccess.asBrowserUri(`${m}/dist/lib/index.js`,Q).toString(!0):_.FileAccess.asBrowserUri(`${d}/dist/lib/index.js`,Q).toString(!0),this._environmentService.isBuilt&&!w.isWeb?_.FileAccess.asBrowserUri(`${m}/model/model.json`,Q).toString(!0):_.FileAccess.asBrowserUri(`${d}/model/model.json`,Q).toString(!0),this._environmentService.isBuilt&&!w.isWeb?_.FileAccess.asBrowserUri(`${m}/model/group1-shard1of1.bin`,Q).toString(!0):_.FileAccess.asBrowserUri(`${d}/model/group1-shard1of1.bin`,Q).toString(!0),this._environmentService.isBuilt&&!w.isWeb?_.FileAccess.asBrowserUri(`${g}/dist/index.js`,Q).toString(!0):_.FileAccess.asBrowserUri(`${h}/dist/index.js`,Q).toString(!0),z),this.initEditorOpenedListeners(P)}async resolveWorkspaceLanguageIds(){if(this.hasResolvedWorkspaceLanguageIds)return;this.hasResolvedWorkspaceLanguageIds=!0;const R=await this._diagnosticsService.getWorkspaceFileExtensions(this._workspaceContextService.getWorkspace());let O=0;for(const x of R.extensions){const F=this.getLanguageId(x);if(F&&O<n&&(this.workspaceLanguageIds.add(F),O++,O>n))break}this.dirtyBiases=!0}isEnabledForLanguage(R){return!!R&&this._configurationService.getValue(mi.enablementSettingKey,{overrideIdentifier:R})}getLanguageId(R){if(!!R)return this._languageService.isRegisteredLanguageId(R)?R:this._languageService.guessLanguageIdByFilepathOrFirstLine(I.URI.file(`file.${R}`))??void 0}getLanguageBiases(){if(!this.dirtyBiases)return this.langBiases;const R={};return this.sessionOpenedLanguageIds.forEach(O=>R[O]=(R[O]??0)+7),this.workspaceLanguageIds.forEach(O=>R[O]=(R[O]??0)+5),[...this.historicalWorkspaceOpenedLanguageIds.keys()].forEach(O=>R[O]=(R[O]??0)+3),[...this.historicalGlobalOpenedLanguageIds.keys()].forEach(O=>R[O]=(R[O]??0)+1),this._logService.trace("Session Languages:",JSON.stringify([...this.sessionOpenedLanguageIds])),this._logService.trace("Workspace Languages:",JSON.stringify([...this.workspaceLanguageIds])),this._logService.trace("Historical Workspace Opened Languages:",JSON.stringify([...this.historicalWorkspaceOpenedLanguageIds.keys()])),this._logService.trace("Historical Globally Opened Languages:",JSON.stringify([...this.historicalGlobalOpenedLanguageIds.keys()])),this._logService.trace("Computed Language Detection Biases:",JSON.stringify(R)),this.dirtyBiases=!1,this.langBiases=R,R}async detectLanguage(R){const O=this._configurationService.getValue(mi.historyBasedEnablementConfig),x=this._configurationService.getValue(mi.preferHistoryConfig);O&&await this.resolveWorkspaceLanguageIds();const F=O?this.getLanguageBiases():void 0,L=await this._languageDetectionWorkerClient.detectLanguage(R,F,x);if(L)return this.getLanguageId(L)}initEditorOpenedListeners(R){try{const O=JSON.parse(R.get(mi.globalOpenedLanguagesStorageKey,0,"[]"));this.historicalGlobalOpenedLanguageIds.fromJSON(O)}catch(O){console.error(O)}try{const O=JSON.parse(R.get(mi.workspaceOpenedLanguagesStorageKey,1,"[]"));this.historicalWorkspaceOpenedLanguageIds.fromJSON(O)}catch(O){console.error(O)}this._register(this._editorService.onDidActiveEditorChange(()=>{const O=this._editorService.activeTextEditorLanguageId;O&&this._editorService.activeEditor?.resource?.scheme!==_.Schemas.untitled&&(this.sessionOpenedLanguageIds.add(O),this.historicalGlobalOpenedLanguageIds.set(O,!0),this.historicalWorkspaceOpenedLanguageIds.set(O,!0),R.store(mi.globalOpenedLanguagesStorageKey,JSON.stringify(this.historicalGlobalOpenedLanguageIds.toJSON()),0,1),R.store(mi.workspaceOpenedLanguagesStorageKey,JSON.stringify(this.historicalWorkspaceOpenedLanguageIds.toJSON()),1,1),this.dirtyBiases=!0)}))}};b.enablementSettingKey="workbench.editor.languageDetection",b.historyBasedEnablementConfig="workbench.editor.historyBasedLanguageDetection",b.preferHistoryConfig="workbench.editor.preferHistoryBasedLanguageDetection",b.workspaceOpenedLanguagesStorageKey="workbench.editor.languageDetectionOpenedLanguages.workspace",b.globalOpenedLanguagesStorageKey="workbench.editor.languageDetectionOpenedLanguages.global",b=Ee([W(0,A.IWorkbenchEnvironmentService),W(1,D.ILanguageService),W(2,k.IConfigurationService),W(3,s.IDiagnosticsService),W(4,l.IWorkspaceContextService),W(5,C.IModelService),W(6,r.IEditorService),W(7,c.ITelemetryService),W(8,p.IStorageService),W(9,a.ILogService),W(10,S.ILanguageConfigurationService)],b),e.LanguageDetectionService=b;class E{constructor(R,O,x,F){this._indexJsUri=R,this._modelJsonUri=O,this._weightsUri=x,this._telemetryService=F}async getIndexJsUri(){return this._indexJsUri}async getModelJsonUri(){return this._modelJsonUri}async getWeightsUri(){return this._weightsUri}async sendTelemetryEvent(R,O,x){this._telemetryService.publicLog2("automaticlanguagedetection.stats",{languages:R.join(","),confidences:O.join(","),timeSpent:x})}}e.LanguageDetectionWorkerHost=E;class y extends i.EditorWorkerClient{constructor(R,O,x,F,L,M,N){super(R,!0,"languageDetectionWorkerService",N);this._telemetryService=O,this._indexJsUri=x,this._modelJsonUri=F,this._weightsUri=L,this._regexpModelUri=M}_getOrCreateLanguageDetectionWorker(){return this.workerPromise?this.workerPromise:(this.workerPromise=new Promise((R,O)=>{R(this._register(new o.SimpleWorkerClient(this._workerFactory,"vs/workbench/services/languageDetection/browser/languageDetectionSimpleWorker",new i.EditorWorkerHost(this))))}),this.workerPromise)}async _getProxy(){return(await this._getOrCreateLanguageDetectionWorker()).getProxyObject()}async fhr(R,O){switch(R){case"getIndexJsUri":return this.getIndexJsUri();case"getModelJsonUri":return this.getModelJsonUri();case"getWeightsUri":return this.getWeightsUri();case"getRegexpModelUri":return this.getRegexpModelUri();case"sendTelemetryEvent":return this.sendTelemetryEvent(O[0],O[1],O[2]);default:return super.fhr(R,O)}}async getIndexJsUri(){return this._indexJsUri}async getModelJsonUri(){return this._modelJsonUri}async getWeightsUri(){return this._weightsUri}async getRegexpModelUri(){return this._regexpModelUri}async sendTelemetryEvent(R,O,x){this._telemetryService.publicLog2(f.LanguageDetectionStatsId,{languages:R.join(","),confidences:O.join(","),timeSpent:x})}async detectLanguage(R,O,x){return await this._withSyncedResources([R]),(await this._getProxy()).detectLanguage(R.toString(),O,x)}}e.LanguageDetectionWorkerClient=y,(0,v.registerSingleton)(f.ILanguageDetectionService,b)}),define(ne[878],re([1,0,29,457,35,5]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILanguageStatusService=void 0,e.ILanguageStatusService=(0,A.createDecorator)("ILanguageStatusService");class k{constructor(){this._provider=new f.LanguageFeatureRegistry,this.onDidChange=this._provider.onDidChange}addStatus(I){return this._provider.register(I.selector,I)}getLanguageStatus(I){return this._provider.ordered(I).sort((w,v)=>{let C=v.severity-w.severity;return C===0&&(C=(0,t.compare)(w.source,v.source)),C===0&&(C=(0,t.compare)(w.id,v.id)),C})}}(0,_.registerSingleton)(e.ILanguageStatusService,k,!0)}),define(ne[2401],re([1,0,9,42,52,65,75,20,61,878,2]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadLanguages=void 0;let C=class{constructor(c,i,S,s,l){this._languageService=i,this._modelService=S,this._resolverService=s,this._languageStatusService=l,this._disposables=new v.DisposableStore,this._status=new Map,this._proxy=c.getProxy(A.ExtHostContext.ExtHostLanguages),this._proxy.$acceptLanguageIds(i.getRegisteredLanguageIds()),this._disposables.add(i.onDidChange(r=>{this._proxy.$acceptLanguageIds(i.getRegisteredLanguageIds())}))}dispose(){this._disposables.dispose();for(const c of this._status.values())c.dispose();this._status.clear()}async $changeLanguage(c,i){if(!this._languageService.isRegisteredLanguageId(i))return Promise.reject(new Error(`Unknown language id: ${i}`));const S=t.URI.revive(c),s=await this._resolverService.createModelReference(S);try{this._modelService.setMode(s.object.textEditorModel,this._languageService.createById(i))}finally{s.dispose()}}async $tokensAtPosition(c,i){const S=t.URI.revive(c),s=this._modelService.getModel(S);if(!s)return;s.tokenizeIfCheap(i.lineNumber);const l=s.getLineTokens(i.lineNumber),r=l.findTokenIndexAtOffset(i.column-1);return{type:l.getStandardTokenType(r),range:new D.Range(i.lineNumber,1+l.getStartOffset(r),i.lineNumber,1+l.getEndOffset(r))}}$setLanguageStatus(c,i){this._status.get(c)?.dispose(),this._status.set(c,this._languageStatusService.addStatus(i))}$removeLanguageStatus(c){this._status.get(c)?.dispose()}};C=Ee([(0,k.extHostNamedCustomer)(A.MainContext.MainThreadLanguages),W(1,f.ILanguageService),W(2,_.IModelService),W(3,I.ITextModelService),W(4,w.ILanguageStatusService)],C),e.MainThreadLanguages=C}),define(ne[80],re([1,0,5,185]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.panelOpensMaximizedFromString=e.panelOpensMaximizedSettingToString=e.positionFromString=e.positionToString=e.PanelOpensMaximizedOptions=e.Position=e.Parts=e.IWorkbenchLayoutService=void 0,e.IWorkbenchLayoutService=(0,t.refineServiceDecorator)(f.ILayoutService);var _;(function(c){c.TITLEBAR_PART="workbench.parts.titlebar",c.BANNER_PART="workbench.parts.banner",c.ACTIVITYBAR_PART="workbench.parts.activitybar",c.SIDEBAR_PART="workbench.parts.sidebar",c.PANEL_PART="workbench.parts.panel",c.AUXILIARYBAR_PART="workbench.parts.auxiliarybar",c.EDITOR_PART="workbench.parts.editor",c.STATUSBAR_PART="workbench.parts.statusbar"})(_=e.Parts||(e.Parts={}));var A;(function(c){c[c.LEFT=0]="LEFT",c[c.RIGHT=1]="RIGHT",c[c.BOTTOM=2]="BOTTOM"})(A=e.Position||(e.Position={}));var k;(function(c){c[c.ALWAYS=0]="ALWAYS",c[c.NEVER=1]="NEVER",c[c.REMEMBER_LAST=2]="REMEMBER_LAST"})(k=e.PanelOpensMaximizedOptions||(e.PanelOpensMaximizedOptions={}));function D(c){switch(c){case 0:return"left";case 1:return"right";case 2:return"bottom";default:return"bottom"}}e.positionToString=D;const I={[D(0)]:0,[D(1)]:1,[D(2)]:2};function w(c){return I[c]}e.positionFromString=w;function v(c){switch(c){case 0:return"always";case 1:return"never";case 2:return"preserve";default:return"preserve"}}e.panelOpensMaximizedSettingToString=v;const C={[v(0)]:0,[v(1)]:1,[v(2)]:2};function o(c){return C[c]}e.panelOpensMaximizedFromString=o}),define(ne[2402],re([1,0,10,6,2,80]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkbenchLayoutSettings=e.LayoutStateModel=e.LayoutStateKeys=void 0;class k{constructor(c,i,S,s){this.name=c,this.scope=i,this.target=S,this.defaultValue=s}}class D extends k{constructor(c,i,S,s,l){super(c,i,S,s);this.zenModeIgnore=l,this.runtime=!0}}class I extends k{constructor(){super(...arguments);this.runtime=!1}}e.LayoutStateKeys={EDITOR_CENTERED:new D("editor.centered",1,0,!1),ZEN_MODE_ACTIVE:new D("zenMode.active",1,0,!1),ZEN_MODE_EXIT_INFO:new D("zenMode.exitInfo",1,0,{transitionedToCenteredEditorLayout:!1,transitionedToFullScreen:!1,wasVisible:{auxiliaryBar:!1,panel:!1,sideBar:!1}}),GRID_SIZE:new I("grid.size",0,1,{width:800,height:600}),SIDEBAR_SIZE:new I("sideBar.size",0,1,200),AUXILIARYBAR_SIZE:new I("auxiliaryBar.size",0,1,200),PANEL_SIZE:new I("panel.size",0,1,300),PANEL_LAST_NON_MAXIMIZED_HEIGHT:new D("panel.lastNonMaximizedHeight",0,1,300),PANEL_LAST_NON_MAXIMIZED_WIDTH:new D("panel.lastNonMaximizedWidth",0,1,300),PANEL_WAS_LAST_MAXIMIZED:new D("panel.wasLastMaximized",1,0,!1),SIDEBAR_POSITON:new D("sideBar.position",1,0,0),PANEL_POSITION:new D("panel.position",1,0,2),PANEL_ALIGNMENT:new D("panel.alignment",0,0,"center"),ACTIVITYBAR_HIDDEN:new D("activityBar.hidden",1,0,!1,!0),SIDEBAR_HIDDEN:new D("sideBar.hidden",1,0,!1),EDITOR_HIDDEN:new D("editor.hidden",1,0,!1),PANEL_HIDDEN:new D("panel.hidden",1,0,!0),AUXILIARYBAR_HIDDEN:new D("auxiliaryBar.hidden",1,0,!0),STATUSBAR_HIDDEN:new D("statusBar.hidden",1,0,!1,!0)};class w extends _.Disposable{constructor(c,i,S,s){super();this.storageService=c,this.configurationService=i,this.contextService=S,this.container=s,this.stateCache=new Map,this._onDidChangeState=this._register(new f.Emitter),this.onDidChangeState=this._onDidChangeState.event,this._register(this.configurationService.onDidChangeConfiguration(l=>this.updateStateFromLegacySettings(l)))}updateStateFromLegacySettings(c){const i=this.getRuntimeValue(e.LayoutStateKeys.ZEN_MODE_ACTIVE);c.affectsConfiguration(C.ACTIVITYBAR_VISIBLE)&&!i&&this.setRuntimeValueAndFire(e.LayoutStateKeys.ACTIVITYBAR_HIDDEN,!this.configurationService.getValue(C.ACTIVITYBAR_VISIBLE)),c.affectsConfiguration(C.STATUSBAR_VISIBLE)&&!i&&this.setRuntimeValueAndFire(e.LayoutStateKeys.STATUSBAR_HIDDEN,!this.configurationService.getValue(C.STATUSBAR_VISIBLE)),c.affectsConfiguration(C.SIDEBAR_POSITION)&&this.setRuntimeValueAndFire(e.LayoutStateKeys.SIDEBAR_POSITON,(0,A.positionFromString)(this.configurationService.getValue(C.SIDEBAR_POSITION)??"left"))}updateLegacySettingsFromState(c,i){const S=this.getRuntimeValue(e.LayoutStateKeys.ZEN_MODE_ACTIVE);c.zenModeIgnore&&S||(c===e.LayoutStateKeys.ACTIVITYBAR_HIDDEN?this.configurationService.updateValue(C.ACTIVITYBAR_VISIBLE,!i):c===e.LayoutStateKeys.STATUSBAR_HIDDEN?this.configurationService.updateValue(C.STATUSBAR_VISIBLE,!i):c===e.LayoutStateKeys.SIDEBAR_POSITON&&this.configurationService.updateValue(C.SIDEBAR_POSITION,(0,A.positionToString)(i)))}load(){let c;for(c in e.LayoutStateKeys){const S=e.LayoutStateKeys[c],s=this.loadKeyFromStorage(S);s!==void 0&&this.stateCache.set(S.name,s)}this.stateCache.set(e.LayoutStateKeys.ACTIVITYBAR_HIDDEN.name,!this.configurationService.getValue(C.ACTIVITYBAR_VISIBLE)),this.stateCache.set(e.LayoutStateKeys.STATUSBAR_HIDDEN.name,!this.configurationService.getValue(C.STATUSBAR_VISIBLE)),this.stateCache.set(e.LayoutStateKeys.SIDEBAR_POSITON.name,(0,A.positionFromString)(this.configurationService.getValue(C.SIDEBAR_POSITION)??"left"));const i=(0,t.getClientArea)(this.container);e.LayoutStateKeys.PANEL_POSITION.defaultValue=(0,A.positionFromString)(this.configurationService.getValue(v.PANEL_POSITION)??"bottom"),e.LayoutStateKeys.GRID_SIZE.defaultValue={height:i.height,width:i.width},e.LayoutStateKeys.SIDEBAR_SIZE.defaultValue=Math.min(300,i.width/4),e.LayoutStateKeys.AUXILIARYBAR_SIZE.defaultValue=Math.min(300,i.width/4),e.LayoutStateKeys.PANEL_SIZE.defaultValue=(this.stateCache.get(e.LayoutStateKeys.PANEL_POSITION.name)??e.LayoutStateKeys.PANEL_POSITION.defaultValue)==="bottom"?i.height/3:i.width/4,e.LayoutStateKeys.SIDEBAR_HIDDEN.defaultValue=this.contextService.getWorkbenchState()===1;for(c in e.LayoutStateKeys){const S=e.LayoutStateKeys[c];this.stateCache.get(S.name)===void 0&&this.stateCache.set(S.name,S.defaultValue)}this._register(this.storageService.onDidChangeValue(S=>{let s;for(s in e.LayoutStateKeys){const l=e.LayoutStateKeys[s];if(l instanceof D&&l.scope===0&&l.target===0&&`${w.STORAGE_PREFIX}${l.name}`===S.key){const r=this.loadKeyFromStorage(l)??l.defaultValue;this.stateCache.get(l.name)!==r&&(this.stateCache.set(l.name,r),this._onDidChangeState.fire({key:l,value:r}))}}}))}save(c,i){let S;const s=this.getRuntimeValue(e.LayoutStateKeys.ZEN_MODE_ACTIVE);for(S in e.LayoutStateKeys){const l=e.LayoutStateKeys[S];if(c&&l.scope===1||i&&l.scope===0){if(s&&l instanceof D&&l.zenModeIgnore)continue;this.saveKeyToStorage(l)}}}getInitializationValue(c){return this.stateCache.get(c.name)}setInitializationValue(c,i){this.stateCache.set(c.name,i)}getRuntimeValue(c,i){if(i){const S=this.loadKeyFromStorage(c);this.stateCache.set(c.name,S??c.defaultValue)}return this.stateCache.get(c.name)}setRuntimeValue(c,i){this.stateCache.set(c.name,i);const S=this.getRuntimeValue(e.LayoutStateKeys.ZEN_MODE_ACTIVE);c.scope===0&&(!S||!c.zenModeIgnore)&&(this.saveKeyToStorage(c),this.updateLegacySettingsFromState(c,i))}setRuntimeValueAndFire(c,i){this.stateCache.get(c.name)!==i&&(this.setRuntimeValue(c,i),this._onDidChangeState.fire({key:c,value:i}))}saveKeyToStorage(c){const i=this.stateCache.get(c.name);this.storageService.store(`${w.STORAGE_PREFIX}${c.name}`,typeof i=="object"?JSON.stringify(i):i,c.scope,c.target)}loadKeyFromStorage(c){let i=this.storageService.get(`${w.STORAGE_PREFIX}${c.name}`,c.scope);if(i!==void 0)switch(typeof c.defaultValue){case"boolean":i=i==="true";break;case"number":i=parseInt(i);break;case"object":i=JSON.parse(i);break}return i}}e.LayoutStateModel=w,w.STORAGE_PREFIX="workbench.";var v;(function(o){o.PANEL_POSITION="workbench.panel.defaultLocation",o.PANEL_OPENS_MAXIMIZED="workbench.panel.opensMaximized",o.ZEN_MODE_CONFIG="zenMode",o.ZEN_MODE_SILENT_NOTIFICATIONS="zenMode.silentNotifications",o.EDITOR_CENTERED_LAYOUT_AUTO_RESIZE="workbench.editor.centeredLayoutAutoResize"})(v=e.WorkbenchLayoutSettings||(e.WorkbenchLayoutSettings={}));var C;(function(o){o.ACTIVITYBAR_VISIBLE="workbench.activityBar.visible",o.STATUSBAR_VISIBLE="workbench.statusBar.visible",o.SIDEBAR_POSITION="workbench.sideBar.location"})(C||(C={}))}),define(ne[2403],re([1,0,82,12,80,6,7,783,5,10,32,59,1411,78,569,38,13,74,1064,674]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationsCenter=void 0;let r=class Lr extends f.Themable{constructor(u,a,n,h,g,d,m,b){super(n);this.container=u,this.model=a,this.instantiationService=h,this.layoutService=g,this.contextKeyService=d,this.editorGroupService=m,this.keybindingService=b,this._onDidChangeVisibility=this._register(new A.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.notificationsCenterVisibleContextKey=l.NotificationsCenterVisibleContext.bindTo(this.contextKeyService),this.notificationsCenterVisibleContextKey=l.NotificationsCenterVisibleContext.bindTo(d),this.registerListeners()}registerListeners(){this._register(this.model.onDidChangeNotification(u=>this.onDidChangeNotification(u))),this._register(this.layoutService.onDidLayout(u=>this.layout(w.Dimension.lift(u))))}get isVisible(){return!!this._isVisible}show(){if(this._isVisible){(0,s.assertIsDefined)(this.notificationsList).show(!0);return}this.notificationsCenterContainer||this.create(),this.updateTitle();const[u,a]=(0,s.assertAllDefined)(this.notificationsList,this.notificationsCenterContainer);this._isVisible=!0,a.classList.add("visible"),u.show(),this.layout(this.workbenchDimensions),u.updateNotificationsList(0,0,this.model.notifications),u.focusFirst(),this.updateStyles(),this.model.notifications.forEach(n=>n.updateVisibility(!0)),this.notificationsCenterVisibleContextKey.set(!0),this._onDidChangeVisibility.fire()}updateTitle(){const[u,a]=(0,s.assertAllDefined)(this.notificationsCenterTitle,this.clearAllAction);this.model.notifications.length===0?(u.textContent=(0,o.localize)(0,null),a.enabled=!1):(u.textContent=(0,o.localize)(1,null),a.enabled=this.model.notifications.some(n=>!n.hasProgress))}create(){this.notificationsCenterContainer=document.createElement("div"),this.notificationsCenterContainer.classList.add("notifications-center"),this.notificationsCenterHeader=document.createElement("div"),this.notificationsCenterHeader.classList.add("notifications-center-header"),this.notificationsCenterContainer.appendChild(this.notificationsCenterHeader),this.notificationsCenterTitle=document.createElement("span"),this.notificationsCenterTitle.classList.add("notifications-center-header-title"),this.notificationsCenterHeader.appendChild(this.notificationsCenterTitle);const u=document.createElement("div");u.classList.add("notifications-center-header-toolbar"),this.notificationsCenterHeader.appendChild(u);const a=this._register(this.instantiationService.createInstance(i.NotificationActionRunner)),n=this._register(new c.ActionBar(u,{ariaLabel:(0,o.localize)(2,null),actionRunner:a}));this.clearAllAction=this._register(this.instantiationService.createInstance(i.ClearAllNotificationsAction,i.ClearAllNotificationsAction.ID,i.ClearAllNotificationsAction.LABEL)),n.push(this.clearAllAction,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(this.clearAllAction)});const h=this._register(this.instantiationService.createInstance(i.HideNotificationsCenterAction,i.HideNotificationsCenterAction.ID,i.HideNotificationsCenterAction.LABEL));n.push(h,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(h)}),this.notificationsList=this.instantiationService.createInstance(D.NotificationsList,this.notificationsCenterContainer,{widgetAriaLabel:(0,o.localize)(3,null)}),this.container.appendChild(this.notificationsCenterContainer)}getKeybindingLabel(u){const a=this.keybindingService.lookupKeybinding(u.id);return a?a.getLabel():null}onDidChangeNotification(u){if(!this._isVisible)return;let a=!1;const[n,h]=(0,s.assertAllDefined)(this.notificationsList,this.notificationsCenterContainer);switch(u.kind){case 0:n.updateNotificationsList(u.index,0,[u.item]),u.item.updateVisibility(!0);break;case 1:switch(u.detail){case 2:n.updateNotificationsList(u.index,1,[u.item]);break;case 1:u.item.expanded&&n.updateNotificationHeight(u.item);break}break;case 2:n.updateNotificationsList(u.index,1,[u.item]);break;case 3:a=(0,w.isAncestor)(document.activeElement,h),n.updateNotificationsList(u.index,1),u.item.updateVisibility(!1);break}this.updateTitle(),this.model.notifications.length===0&&(this.hide(),a&&this.editorGroupService.activeGroup.focus())}hide(){if(!this._isVisible||!this.notificationsCenterContainer||!this.notificationsList)return;const u=(0,w.isAncestor)(document.activeElement,this.notificationsCenterContainer);this._isVisible=!1,this.notificationsCenterContainer.classList.remove("visible"),this.notificationsList.hide(),this.model.notifications.forEach(a=>a.updateVisibility(!1)),this.notificationsCenterVisibleContextKey.set(!1),this._onDidChangeVisibility.fire(),u&&this.editorGroupService.activeGroup.focus()}updateStyles(){if(this.notificationsCenterContainer&&this.notificationsCenterHeader){const u=this.getColor(v.widgetShadow);this.notificationsCenterContainer.style.boxShadow=u?`0 0 8px 2px ${u}`:"";const a=this.getColor(t.NOTIFICATIONS_CENTER_BORDER);this.notificationsCenterContainer.style.border=a?`1px solid ${a}`:"";const n=this.getColor(t.NOTIFICATIONS_CENTER_HEADER_FOREGROUND);this.notificationsCenterHeader.style.color=n?n.toString():"";const h=this.getColor(t.NOTIFICATIONS_CENTER_HEADER_BACKGROUND);this.notificationsCenterHeader.style.background=h?h.toString():""}}layout(u){if(this.workbenchDimensions=u,this._isVisible&&this.notificationsCenterContainer){let a=Lr.MAX_DIMENSIONS.width,n=Lr.MAX_DIMENSIONS.height,h=a,g=n;this.workbenchDimensions&&(h=this.workbenchDimensions.width,h-=2*8,g=this.workbenchDimensions.height-35,this.layoutService.isVisible("workbench.parts.statusbar")&&(g-=22),this.layoutService.isVisible("workbench.parts.titlebar")&&(g-=22),g-=2*12),(0,s.assertIsDefined)(this.notificationsList).layout(Math.min(a,h),Math.min(n,g))}}clearAll(){this.hide();for(const u of[...this.model.notifications])u.hasProgress||u.close()}};r.MAX_DIMENSIONS=new w.Dimension(450,400),r=Ee([W(2,f.IThemeService),W(3,I.IInstantiationService),W(4,_.IWorkbenchLayoutService),W(5,k.IContextKeyService),W(6,C.IEditorGroupsService),W(7,S.IKeybindingService)],r),e.NotificationsCenter=r,(0,f.registerThemingParticipant)((p,u)=>{const a=p.getColor(t.NOTIFICATIONS_BORDER);a&&u.addRule(`.monaco-workbench > .notifications-center .notifications-list-container .monaco-list-row[data-last-element="false"] > .notification-list-item { border-bottom: 1px solid ${a}; }`)})}),define(ne[613],re([1,0,10,6,2,14,89,7,24,27,12,166,832,294,603,21,69,80]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewEditor=void 0;let r=class Go extends C.EditorPane{constructor(u,a,n,h,g,d,m,b){super(Go.ID,u,a,n);this._editorService=h,this._workbenchLayoutService=g,this._editorDropService=d,this._hostService=m,this._contextKeyService=b,this._visible=!1,this._isDisposed=!1,this._webviewVisibleDisposables=this._register(new _.DisposableStore),this._onFocusWindowHandler=this._register(new _.MutableDisposable),this._onDidFocusWebview=this._register(new f.Emitter),this._scopedContextKeyService=this._register(new _.MutableDisposable)}get onDidFocus(){return this._onDidFocusWebview.event}get webview(){return this.input instanceof c.WebviewInput?this.input.webview:void 0}get scopedContextKeyService(){return this._scopedContextKeyService.value}createEditor(u){const a=document.createElement("div");this._element=a,this._element.id=`webview-editor-element-${(0,k.generateUuid)()}`,u.appendChild(a),this._scopedContextKeyService.value=this._contextKeyService.createScoped(a)}dispose(){this._isDisposed=!0,this._element?.remove(),this._element=void 0,super.dispose()}layout(u){this._dimension=u,this.webview&&this._visible&&this.synchronizeWebviewContainerDimensions(this.webview,u)}focus(){super.focus(),!this._onFocusWindowHandler.value&&!A.isWeb&&(this._onFocusWindowHandler.value=this._hostService.onDidChangeFocus(u=>{u&&this._editorService.activeEditorPane===this&&this._workbenchLayoutService.hasFocus("workbench.parts.editor")&&this.focus()})),this.webview?.focus()}setEditorVisible(u,a){this._visible=u,this.input instanceof c.WebviewInput&&this.webview&&(u?this.claimWebview(this.input):this.webview.release(this)),super.setEditorVisible(u,a)}clearInput(){this.webview&&(this.webview.release(this),this._webviewVisibleDisposables.clear()),super.clearInput()}async setInput(u,a,n,h){if(this.input&&u.matches(this.input))return;const g=u instanceof c.WebviewInput&&u.webview===this.webview;this.webview&&!g&&this.webview.release(this),await super.setInput(u,a,n,h),await u.resolve(),!(h.isCancellationRequested||this._isDisposed)&&u instanceof c.WebviewInput&&(this.group&&u.updateGroup(this.group.id),g||this.claimWebview(u),this._dimension&&this.layout(this._dimension))}claimWebview(u){u.webview.claim(this,this.scopedContextKeyService),this._element&&(this._element.setAttribute("aria-flowto",u.webview.container.id),t.setParentFlowTo(u.webview.container,this._element)),this._webviewVisibleDisposables.clear(),this._webviewVisibleDisposables.add(this._editorDropService.createEditorDropTarget(u.webview.container,{containsGroup:a=>this.group?.id===a.id})),this._webviewVisibleDisposables.add(new o.WebviewWindowDragMonitor(()=>this.webview)),this.synchronizeWebviewContainerDimensions(u.webview),this._webviewVisibleDisposables.add(this.trackFocus(u.webview))}synchronizeWebviewContainerDimensions(u,a){this._element&&u.layoutWebviewOverElement(this._element.parentElement,a)}trackFocus(u){const a=new _.DisposableStore,n=t.trackFocus(u.container);return a.add(n),a.add(n.onDidFocus(()=>this._onDidFocusWebview.fire())),a.add(u.onDidFocus(()=>this._onDidFocusWebview.fire())),a}};r.ID="WebviewEditor",r=Ee([W(0,w.ITelemetryService),W(1,v.IThemeService),W(2,I.IStorageService),W(3,S.IEditorService),W(4,l.IWorkbenchLayoutService),W(5,i.IEditorDropService),W(6,s.IHostService),W(7,D.IContextKeyService)],r),e.WebviewEditor=r}),define(ne[76],re([1,0,6,5]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NullLifecycleService=e.LifecyclePhaseToString=e.LifecyclePhase=e.StartupKindToString=e.StartupKind=e.ShutdownReason=e.ILifecycleService=void 0,e.ILifecycleService=(0,f.createDecorator)("lifecycleService");var _;(function(w){w[w.CLOSE=1]="CLOSE",w[w.QUIT=2]="QUIT",w[w.RELOAD=3]="RELOAD",w[w.LOAD=4]="LOAD"})(_=e.ShutdownReason||(e.ShutdownReason={}));var A;(function(w){w[w.NewWindow=1]="NewWindow",w[w.ReloadedWindow=3]="ReloadedWindow",w[w.ReopenedWindow=4]="ReopenedWindow"})(A=e.StartupKind||(e.StartupKind={}));function k(w){switch(w){case 1:return"NewWindow";case 3:return"ReloadedWindow";case 4:return"ReopenedWindow"}}e.StartupKindToString=k;var D;(function(w){w[w.Starting=1]="Starting",w[w.Ready=2]="Ready",w[w.Restored=3]="Restored",w[w.Eventually=4]="Eventually"})(D=e.LifecyclePhase||(e.LifecyclePhase={}));function I(w){switch(w){case 1:return"Starting";case 2:return"Ready";case 3:return"Restored";case 4:return"Eventually"}}e.LifecyclePhaseToString=I,e.NullLifecycleService={_serviceBrand:void 0,onBeforeShutdown:t.Event.None,onBeforeShutdownError:t.Event.None,onShutdownVeto:t.Event.None,onWillShutdown:t.Event.None,onDidShutdown:t.Event.None,phase:3,startupKind:1,async when(){},async shutdown(){}}}),define(ne[2404],re([1,0,1415,2,10,5,783,6,80,82,12,32,59,7,26,76,69,11,13,74,1066]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationsToasts=void 0;var u;(function(n){n[n.HIDDEN_OR_VISIBLE=0]="HIDDEN_OR_VISIBLE",n[n.HIDDEN=1]="HIDDEN",n[n.VISIBLE=2]="VISIBLE"})(u||(u={}));let a=class zi extends v.Themable{constructor(h,g,d,m,b,E,y,T,R){super(b);this.container=h,this.model=g,this.instantiationService=d,this.layoutService=m,this.editorGroupService=E,this.contextKeyService=y,this.lifecycleService=T,this.hostService=R,this._onDidChangeVisibility=this._register(new D.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._isVisible=!1,this.mapNotificationToToast=new Map,this.mapNotificationToDisposable=new Map,this.notificationsToastsVisibleContextKey=p.NotificationsToastsVisibleContext.bindTo(this.contextKeyService),this.addedToastsIntervalCounter=new l.IntervalCounter(zi.SPAM_PROTECTION.interval),this.registerListeners()}get isVisible(){return!!this._isVisible}registerListeners(){this._register(this.layoutService.onDidLayout(h=>this.layout(_.Dimension.lift(h)))),this.lifecycleService.when(3).then(()=>{this.model.notifications.forEach(h=>this.addToast(h)),this._register(this.model.onDidChangeNotification(h=>this.onDidChangeNotification(h)))}),this._register(this.model.onDidChangeFilter(h=>{(h===i.NotificationsFilter.SILENT||h===i.NotificationsFilter.ERROR)&&this.hide()}))}onDidChangeNotification(h){switch(h.kind){case 0:return this.addToast(h.item);case 3:return this.removeToast(h.item)}}addToast(h){if(this.isNotificationsCenterVisible||h.silent||this.addedToastsIntervalCounter.increment()>zi.SPAM_PROTECTION.limit)return;const g=new f.DisposableStore;this.mapNotificationToDisposable.set(h,g),g.add((0,_.scheduleAtNextAnimationFrame)(()=>this.doAddToast(h,g)))}doAddToast(h,g){let d=this.notificationsToastsContainer;d||(d=this.notificationsToastsContainer=document.createElement("div"),d.classList.add("notifications-toasts"),this.container.appendChild(d)),d.classList.add("visible");const m=document.createElement("div");m.classList.add("notification-toast-container");const b=d.firstChild;b?d.insertBefore(m,b):d.appendChild(m);const E=document.createElement("div");E.classList.add("notification-toast"),m.appendChild(E);const y=this.instantiationService.createInstance(k.NotificationsList,E,{verticalScrollMode:2,widgetAriaLabel:(()=>h.source?(0,t.localize)(1,null,h.message.raw,h.source):(0,t.localize)(0,null,h.message.raw))()});g.add(y);const T={item:h,list:y,container:m,toast:E};this.mapNotificationToToast.set(h,T),g.add((0,f.toDisposable)(()=>this.updateToastVisibility(T,!1))),y.show();const R=this.computeMaxDimensions();this.layoutLists(R.width),y.updateNotificationsList(0,0,[h]),this.layoutContainer(R.height),g.add(h.onDidChangeExpansion(()=>{y.updateNotificationsList(0,1,[h])})),g.add(h.onDidChangeContent(O=>{switch(O.kind){case 2:y.updateNotificationsList(0,1,[h]);break;case 1:h.expanded&&y.updateNotificationHeight(h);break}})),D.Event.once(h.onDidClose)(()=>{this.removeToast(h)}),this.purgeNotification(h,m,y,g),this.updateStyles(),this.notificationsToastsVisibleContextKey.set(!0),E.classList.add("notification-fade-in"),g.add((0,_.addDisposableListener)(E,"transitionend",()=>{E.classList.remove("notification-fade-in"),E.classList.add("notification-fade-in-done")})),h.updateVisibility(!0),this._isVisible||(this._isVisible=!0,this._onDidChangeVisibility.fire())}purgeNotification(h,g,d,m){let b=!1;m.add((0,_.addDisposableListener)(g,_.EventType.MOUSE_OVER,()=>b=!0)),m.add((0,_.addDisposableListener)(g,_.EventType.MOUSE_OUT,()=>b=!1));let E,y;const T=()=>{E=setTimeout(()=>{this.hostService.hasFocus?h.sticky||d.hasFocus()||b?T():this.removeToast(h):y||(y=this.hostService.onDidChangeFocus(R=>{R&&T()}),m.add(y))},zi.PURGE_TIMEOUT[h.severity])};T(),m.add((0,f.toDisposable)(()=>clearTimeout(E)))}removeToast(h){let g=!1;const d=this.mapNotificationToToast.get(h);d&&((0,_.isAncestor)(document.activeElement,d.container)&&(g=!(this.focusNext()||this.focusPrevious())),this.mapNotificationToToast.delete(h));const m=this.mapNotificationToDisposable.get(h);m&&((0,f.dispose)(m),this.mapNotificationToDisposable.delete(h)),this.mapNotificationToToast.size>0?this.layout(this.workbenchDimensions):(this.doHide(),g&&this.editorGroupService.activeGroup.focus())}removeToasts(){this.mapNotificationToToast.clear(),this.mapNotificationToDisposable.forEach(h=>(0,f.dispose)(h)),this.mapNotificationToDisposable.clear(),this.doHide()}doHide(){this.notificationsToastsContainer&&this.notificationsToastsContainer.classList.remove("visible"),this.notificationsToastsVisibleContextKey.set(!1),this._isVisible&&(this._isVisible=!1,this._onDidChangeVisibility.fire())}hide(){const h=this.notificationsToastsContainer?(0,_.isAncestor)(document.activeElement,this.notificationsToastsContainer):!1;this.removeToasts(),h&&this.editorGroupService.activeGroup.focus()}focus(){const h=this.getToasts(u.VISIBLE);return h.length>0?(h[0].list.focusFirst(),!0):!1}focusNext(){const h=this.getToasts(u.VISIBLE);for(let g=0;g<h.length;g++)if(h[g].list.hasFocus()){const m=h[g+1];if(m)return m.list.focusFirst(),!0;break}return!1}focusPrevious(){const h=this.getToasts(u.VISIBLE);for(let g=0;g<h.length;g++)if(h[g].list.hasFocus()){const m=h[g-1];if(m)return m.list.focusFirst(),!0;break}return!1}focusFirst(){const h=this.getToasts(u.VISIBLE)[0];return h?(h.list.focusFirst(),!0):!1}focusLast(){const h=this.getToasts(u.VISIBLE);return h.length>0?(h[h.length-1].list.focusFirst(),!0):!1}update(h){this.isNotificationsCenterVisible!==h&&(this.isNotificationsCenterVisible=h,this.isNotificationsCenterVisible&&this.removeToasts())}updateStyles(){this.mapNotificationToToast.forEach(({toast:h})=>{const g=this.getColor(w.NOTIFICATIONS_BACKGROUND);h.style.background=g||"";const d=this.getColor(C.widgetShadow);h.style.boxShadow=d?`0 0 8px 2px ${d}`:"";const m=this.getColor(w.NOTIFICATIONS_TOAST_BORDER);h.style.border=m?`1px solid ${m}`:""})}getToasts(h){const g=[];return this.mapNotificationToToast.forEach(d=>{switch(h){case u.HIDDEN_OR_VISIBLE:g.push(d);break;case u.HIDDEN:this.isToastInDOM(d)||g.push(d);break;case u.VISIBLE:this.isToastInDOM(d)&&g.push(d);break}}),g.reverse()}layout(h){this.workbenchDimensions=h;const g=this.computeMaxDimensions();g.height&&this.layoutContainer(g.height),this.layoutLists(g.width)}computeMaxDimensions(){let h=zi.MAX_WIDTH,g=h,d;return this.workbenchDimensions&&(g=this.workbenchDimensions.width,g-=2*8,d=this.workbenchDimensions.height,this.layoutService.isVisible("workbench.parts.statusbar")&&(d-=22),this.layoutService.isVisible("workbench.parts.titlebar")&&(d-=22),d-=2*12),d=typeof d=="number"?Math.round(d*.618):0,new _.Dimension(Math.min(h,g),d)}layoutLists(h){this.mapNotificationToToast.forEach(({list:g})=>g.layout(h))}layoutContainer(h){let g=0;for(const d of this.getToasts(u.HIDDEN_OR_VISIBLE)){d.container.style.opacity="0",this.updateToastVisibility(d,!0),h-=d.container.offsetHeight;let m=!1;g===zi.MAX_NOTIFICATIONS?m=!1:h>=0&&(m=!0),this.updateToastVisibility(d,m),d.container.style.opacity="",m&&g++}}updateToastVisibility(h,g){if(this.isToastInDOM(h)===g)return;const d=(0,r.assertIsDefined)(this.notificationsToastsContainer);g?d.appendChild(h.container):d.removeChild(h.container),h.item.updateVisibility(g)}isToastInDOM(h){return!!h.container.parentElement}};a.MAX_WIDTH=450,a.MAX_NOTIFICATIONS=3,a.PURGE_TIMEOUT={[i.Severity.Info]:15e3,[i.Severity.Warning]:18e3,[i.Severity.Error]:2e4},a.SPAM_PROTECTION={interval:800,limit:a.MAX_NOTIFICATIONS},a=Ee([W(2,A.IInstantiationService),W(3,I.IWorkbenchLayoutService),W(4,v.IThemeService),W(5,o.IEditorGroupsService),W(6,c.IContextKeyService),W(7,S.ILifecycleService),W(8,s.IHostService)],a),e.NotificationsToasts=a}),define(ne[70],re([1,0,1431,17,94,28,16,5,2,76,26,7]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CATEGORIES=e.Extensions=void 0,e.Extensions={WorkbenchActions:"workbench.contributions.actions"},f.Registry.add(e.Extensions.WorkbenchActions,new class{registerWorkbenchAction(o,c,i,S){return this.registerWorkbenchCommandFromAction(o,c,i,S)}registerWorkbenchCommandFromAction(o,c,i,S){const s=new I.DisposableStore;s.add(A.CommandsRegistry.registerCommand(o.id,this.createCommandHandler(o)));const l=typeof o.keybindingWeight=="undefined"?200:o.keybindingWeight,r=o.keybindings;if(_.KeybindingsRegistry.registerKeybindingRule({id:o.id,weight:l,when:o.keybindingContext&&S?C.ContextKeyExpr.and(o.keybindingContext,S):o.keybindingContext||S||null,primary:r?r.primary:0,secondary:r?.secondary,win:r?.win,mac:r?.mac,linux:r?.linux}),o.label){let p=c.indexOf(": "),u="";p>0&&(u=c.substr(0,p),c=c.substr(p+2));const a={id:o.id,title:{value:o.label,original:c},category:i?{value:i,original:u}:void 0};k.MenuRegistry.addCommand(a),s.add(k.MenuRegistry.appendMenuItem(k.MenuId.CommandPalette,{command:a,when:S}))}return s}createCommandHandler(o){return async(c,i)=>{const S=c.get(v.INotificationService),s=c.get(D.IInstantiationService),l=c.get(w.ILifecycleService);try{await this.triggerAndDisposeAction(s,l,o,i)}catch(r){S.error(r)}}}async triggerAndDisposeAction(o,c,i,S){await c.when(2);const s=o.createInstance(i.syncDescriptor);if(s.label=i.label||s.label,!s.enabled){s.dispose();return}try{const l=S?.from||"keybinding";await s.run(void 0,{from:l})}finally{s.dispose()}}}),e.CATEGORIES={View:{value:(0,t.localize)(0,null),original:"View"},Help:{value:(0,t.localize)(1,null),original:"Help"},Test:{value:(0,t.localize)(2,null),original:"Test"},Preferences:{value:(0,t.localize)(3,null),original:"Preferences"},Developer:{value:(0,t.localize)(4,null),original:"Developer"}}}),define(ne[2405],re([1,0,1370,310,14,27,41,9,16,97,46,70]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class o extends I.Action2{constructor(){super({id:o.ID,title:{value:(0,t.localize)(0,null),mnemonicTitle:(0,t.localize)(1,null),original:"Keyboard Shortcuts Reference"},category:C.CATEGORIES.Help,f1:!0,keybinding:{weight:200,when:null,primary:(0,w.KeyChord)(2048|41,2048|48)},menu:{id:I.MenuId.MenubarHelpMenu,group:"2_reference",order:1}})}run(n){const h=n.get(v.IProductService),g=n.get(k.IOpenerService),d=_.isLinux?h.keyboardShortcutsUrlLinux:_.isMacintosh?h.keyboardShortcutsUrlMac:h.keyboardShortcutsUrlWin;d&&g.open(D.URI.parse(d))}}o.ID="workbench.action.keybindingsReference",o.AVAILABLE=!!(_.isLinux?f.default.keyboardShortcutsUrlLinux:_.isMacintosh?f.default.keyboardShortcutsUrlMac:f.default.keyboardShortcutsUrlWin);class c extends I.Action2{constructor(){super({id:c.ID,title:{value:(0,t.localize)(2,null),mnemonicTitle:(0,t.localize)(3,null),original:"Video Tutorials"},category:C.CATEGORIES.Help,f1:!0,menu:{id:I.MenuId.MenubarHelpMenu,group:"2_reference",order:2}})}run(n){const h=n.get(v.IProductService),g=n.get(k.IOpenerService);h.introductoryVideosUrl&&g.open(D.URI.parse(h.introductoryVideosUrl))}}c.ID="workbench.action.openVideoTutorialsUrl",c.AVAILABLE=!!f.default.introductoryVideosUrl;class i extends I.Action2{constructor(){super({id:i.ID,title:{value:(0,t.localize)(4,null),mnemonicTitle:(0,t.localize)(5,null),original:"Tips and Tricks"},category:C.CATEGORIES.Help,f1:!0,menu:{id:I.MenuId.MenubarHelpMenu,group:"2_reference",order:3}})}run(n){const h=n.get(v.IProductService),g=n.get(k.IOpenerService);h.tipsAndTricksUrl&&g.open(D.URI.parse(h.tipsAndTricksUrl))}}i.ID="workbench.action.openTipsAndTricksUrl",i.AVAILABLE=!!f.default.tipsAndTricksUrl;class S extends I.Action2{constructor(){super({id:S.ID,title:{value:(0,t.localize)(6,null),mnemonicTitle:(0,t.localize)(7,null),original:"Documentation"},category:C.CATEGORIES.Help,f1:!0,menu:{id:I.MenuId.MenubarHelpMenu,group:"1_welcome",order:3}})}run(n){const h=n.get(v.IProductService),g=n.get(k.IOpenerService);h.documentationUrl&&g.open(D.URI.parse(h.documentationUrl))}}S.ID="workbench.action.openDocumentationUrl",S.AVAILABLE=!!f.default.documentationUrl;class s extends I.Action2{constructor(){super({id:s.ID,title:{value:(0,t.localize)(8,null),original:"Signup for the VS Code Newsletter"},category:C.CATEGORIES.Help,f1:!0})}async run(n){const h=n.get(v.IProductService),g=n.get(k.IOpenerService),m=await n.get(A.ITelemetryService).getTelemetryInfo();g.open(D.URI.parse(`${h.newsletterSignupUrl}?machineId=${encodeURIComponent(m.machineId)}`))}}s.ID="workbench.action.openNewsletterSignupUrl",s.AVAILABLE=!!f.default.newsletterSignupUrl;class l extends I.Action2{constructor(){super({id:l.ID,title:{value:(0,t.localize)(9,null),mnemonicTitle:(0,t.localize)(10,null),original:"Join Us on Twitter"},category:C.CATEGORIES.Help,f1:!0,menu:{id:I.MenuId.MenubarHelpMenu,group:"3_feedback",order:1}})}run(n){const h=n.get(v.IProductService),g=n.get(k.IOpenerService);h.twitterUrl&&g.open(D.URI.parse(h.twitterUrl))}}l.ID="workbench.action.openTwitterUrl",l.AVAILABLE=!!f.default.twitterUrl;class r extends I.Action2{constructor(){super({id:r.ID,title:{value:(0,t.localize)(11,null),mnemonicTitle:(0,t.localize)(12,null),original:"Search Feature Requests"},category:C.CATEGORIES.Help,f1:!0,menu:{id:I.MenuId.MenubarHelpMenu,group:"3_feedback",order:2}})}run(n){const h=n.get(v.IProductService),g=n.get(k.IOpenerService);h.requestFeatureUrl&&g.open(D.URI.parse(h.requestFeatureUrl))}}r.ID="workbench.action.openRequestFeatureUrl",r.AVAILABLE=!!f.default.requestFeatureUrl;class p extends I.Action2{constructor(){super({id:p.ID,title:{value:(0,t.localize)(13,null),mnemonicTitle:(0,t.localize)(14,null),original:"View License"},category:C.CATEGORIES.Help,f1:!0,menu:{id:I.MenuId.MenubarHelpMenu,group:"4_legal",order:1}})}run(n){const h=n.get(v.IProductService),g=n.get(k.IOpenerService);if(h.licenseUrl)if(_.language){const d=h.licenseUrl.indexOf("?")>0?"&":"?";g.open(D.URI.parse(`${h.licenseUrl}${d}lang=${_.language}`))}else g.open(D.URI.parse(h.licenseUrl))}}p.ID="workbench.action.openLicenseUrl",p.AVAILABLE=!!f.default.licenseUrl;class u extends I.Action2{constructor(){super({id:u.ID,title:{value:(0,t.localize)(15,null),mnemonicTitle:(0,t.localize)(16,null),original:"Privacy Statement"},category:C.CATEGORIES.Help,f1:!0,menu:{id:I.MenuId.MenubarHelpMenu,group:"4_legal",order:2}})}run(n){const h=n.get(v.IProductService),g=n.get(k.IOpenerService);h.privacyStatementUrl&&g.open(D.URI.parse(h.privacyStatementUrl))}}u.ID="workbench.action.openPrivacyStatementUrl",u.AVAILABE=!!f.default.privacyStatementUrl,o.AVAILABLE&&(0,I.registerAction2)(o),c.AVAILABLE&&(0,I.registerAction2)(c),i.AVAILABLE&&(0,I.registerAction2)(i),S.AVAILABLE&&(0,I.registerAction2)(S),s.AVAILABLE&&(0,I.registerAction2)(s),l.AVAILABLE&&(0,I.registerAction2)(l),r.AVAILABLE&&(0,I.registerAction2)(r),p.AVAILABLE&&(0,I.registerAction2)(p),u.AVAILABE&&(0,I.registerAction2)(u)}),define(ne[299],re([1,0,1375,54,16,97,74,141,70,94,53,34,45,38,52,42,189,198,23,111,14,7,317,69,55,33,10,28,8,1929]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReloadWindowAction=e.OpenRecentAction=e.inRecentFilesPickerContextKey=void 0,e.inRecentFilesPickerContextKey="inRecentFilesPicker";const T={value:(0,t.localize)(0,null),original:"File"};class R extends _.Action2{constructor(H){super(H);this.removeFromRecentlyOpened={iconClass:d.Codicon.removeClose.classNames,tooltip:(0,t.localize)(1,null)},this.dirtyRecentlyOpenedFolder={iconClass:"dirty-workspace "+d.Codicon.closeDirty.classNames,tooltip:(0,t.localize)(2,null),alwaysVisible:!0},this.dirtyRecentlyOpenedWorkspace={...this.dirtyRecentlyOpenedFolder,tooltip:(0,t.localize)(3,null)}}async run(H){const K=H.get(s.IWorkspacesService),G=H.get(v.IQuickInputService),q=H.get(C.IWorkspaceContextService),Z=H.get(o.ILabelService),j=H.get(c.IKeybindingService),X=H.get(i.IModelService),Y=H.get(S.ILanguageService),$=H.get(h.IHostService),J=H.get(f.IDialogService),ee=await K.getRecentlyOpened(),te=await K.getDirtyWorkspaces();let se=!1;const ie=new g.ResourceMap,ce=new g.ResourceMap;for(const ge of te)(0,y.isFolderBackupInfo)(ge)?ie.set(ge.folderUri,!0):(ce.set(ge.workspace.configPath,ge.workspace),se=!0);const le=new g.ResourceMap,ae=new g.ResourceMap;for(const ge of ee.workspaces)(0,s.isRecentFolder)(ge)?le.set(ge.folderUri,!0):(ae.set(ge.workspace.configPath,ge.workspace),se=!0);const ue=[];for(const ge of ee.workspaces){const de=(0,s.isRecentFolder)(ge)?ie.has(ge.folderUri):ce.has(ge.workspace.configPath);ue.push(this.toQuickPick(X,Y,Z,ge,de))}for(const ge of te)(0,y.isFolderBackupInfo)(ge)&&!le.has(ge.folderUri)?ue.push(this.toQuickPick(X,Y,Z,ge,!0)):(0,y.isWorkspaceBackupInfo)(ge)&&!ae.has(ge.workspace.configPath)&&ue.push(this.toQuickPick(X,Y,Z,ge,!0));const oe=ee.files.map(ge=>this.toQuickPick(X,Y,Z,ge,!1)),fe=ee.workspaces[0],pe=fe&&q.isCurrentWorkspace((0,s.isRecentWorkspace)(fe)?fe.workspace:fe.folderUri);let me;const be={type:"separator",label:se?(0,t.localize)(4,null):(0,t.localize)(5,null)},Ce={type:"separator",label:(0,t.localize)(6,null)},ve=[be,...ue,Ce,...oe],he=await G.pick(ve,{contextKey:e.inRecentFilesPickerContextKey,activeItem:[...ue,...oe][pe?1:0],placeHolder:u.isMacintosh?(0,t.localize)(7,null):(0,t.localize)(8,null),matchOnDescription:!0,onKeyMods:ge=>me=ge,quickNavigate:this.isQuickNavigate()?{keybindings:j.lookupKeybindings(this.desc.id)}:void 0,onDidTriggerItemButton:async ge=>{if(ge.button===this.removeFromRecentlyOpened)await K.removeRecentlyOpened([ge.item.resource]),ge.removeItem();else if(ge.button===this.dirtyRecentlyOpenedFolder||ge.button===this.dirtyRecentlyOpenedWorkspace){const de=ge.button===this.dirtyRecentlyOpenedWorkspace;(await J.confirm({type:"question",title:de?(0,t.localize)(9,null):(0,t.localize)(10,null),message:de?(0,t.localize)(11,null):(0,t.localize)(12,null),detail:de?(0,t.localize)(13,null):(0,t.localize)(14,null)})).confirmed&&($.openWindow([ge.item.openable],{remoteAuthority:ge.item.remoteAuthority||null}),G.cancel())}}});if(he)return $.openWindow([he.openable],{forceNewWindow:me?.ctrlCmd,forceReuseWindow:me?.alt,remoteAuthority:he.remoteAuthority||null})}toQuickPick(H,K,G,q,Z){let j,X,Y,$,J=!1;(0,s.isRecentFolder)(q)?($=q.folderUri,X=(0,l.getIconClasses)(H,K,$,r.FileKind.FOLDER),j={folderUri:$},Y=q.label||G.getWorkspaceLabel($,{verbose:!0})):(0,s.isRecentWorkspace)(q)?($=q.workspace.configPath,X=(0,l.getIconClasses)(H,K,$,r.FileKind.ROOT_FOLDER),j={workspaceUri:$},Y=q.label||G.getWorkspaceLabel(q.workspace,{verbose:!0}),J=!0):($=q.fileUri,X=(0,l.getIconClasses)(H,K,$,r.FileKind.FILE),j={fileUri:$},Y=q.label||G.getUriLabel($));const{name:ee,parentPath:te}=(0,p.splitName)(Y);return{iconClasses:X,label:ee,ariaLabel:Z?J?(0,t.localize)(15,null,ee):(0,t.localize)(16,null,ee):ee,description:te,buttons:Z?[J?this.dirtyRecentlyOpenedWorkspace:this.dirtyRecentlyOpenedFolder]:[this.removeFromRecentlyOpened],openable:j,resource:$,remoteAuthority:q.remoteAuthority}}}class O extends R{constructor(){super({id:O.ID,title:{value:(0,t.localize)(17,null),mnemonicTitle:(0,t.localize)(18,null),original:"Open Recent..."},category:T,f1:!0,keybinding:{weight:200,primary:2048|48,mac:{primary:256|48}},menu:{id:_.MenuId.MenubarRecentMenu,group:"y_more",order:1}})}isQuickNavigate(){return!1}}e.OpenRecentAction=O,O.ID="workbench.action.openRecent";class x extends R{constructor(){super({id:"workbench.action.quickOpenRecent",title:{value:(0,t.localize)(19,null),original:"Quick Open Recent..."},category:T,f1:!0})}isQuickNavigate(){return!0}}class F extends _.Action2{constructor(){super({id:"workbench.action.toggleFullScreen",title:{value:(0,t.localize)(20,null),mnemonicTitle:(0,t.localize)(21,null),original:"Toggle Full Screen"},category:I.CATEGORIES.View,f1:!0,keybinding:{weight:200,primary:69,mac:{primary:2048|256|36}},precondition:D.IsIOSContext.toNegated(),toggled:k.IsFullscreenContext,menu:[{id:_.MenuId.MenubarAppearanceMenu,group:"1_toggle_view",order:1}]})}run(H){return H.get(h.IHostService).toggleFullScreen()}}class L extends _.Action2{constructor(){super({id:L.ID,title:{value:(0,t.localize)(22,null),original:"Reload Window"},category:I.CATEGORIES.Developer,f1:!0,keybinding:{weight:200+50,when:D.IsDevelopmentContext,primary:2048|48}})}run(H){return H.get(h.IHostService).reload()}}e.ReloadWindowAction=L,L.ID="workbench.action.reloadWindow";class M extends _.Action2{constructor(){super({id:"workbench.action.showAboutDialog",title:{value:(0,t.localize)(23,null),mnemonicTitle:(0,t.localize)(24,null),original:"About"},category:I.CATEGORIES.Help,f1:!0,menu:{id:_.MenuId.MenubarHelpMenu,group:"z_about",order:1,when:D.IsMacNativeContext.toNegated()}})}run(H){return H.get(f.IDialogService).about()}}class N extends _.Action2{constructor(){super({id:"workbench.action.newWindow",title:{value:(0,t.localize)(25,null),mnemonicTitle:(0,t.localize)(26,null),original:"New Window"},f1:!0,keybinding:{weight:200,primary:u.isWeb?u.isWindows?(0,A.KeyChord)(2048|41,1024|44):2048|512|1024|44:2048|1024|44,secondary:u.isWeb?[2048|1024|44]:void 0},menu:{id:_.MenuId.MenubarFileMenu,group:"1_new",order:3}})}run(H){return H.get(h.IHostService).openWindow({remoteAuthority:null})}}class B extends _.Action2{constructor(){super({id:"workbench.action.blur",title:{value:(0,t.localize)(27,null),original:"Remove keyboard focus from focused element"}})}run(){const H=document.activeElement;(0,m.isHTMLElement)(H)&&H.blur()}}(0,_.registerAction2)(N),(0,_.registerAction2)(F),(0,_.registerAction2)(x),(0,_.registerAction2)(O),(0,_.registerAction2)(L),(0,_.registerAction2)(M),(0,_.registerAction2)(B);const P=a.ContextKeyExpr.and(n.inQuickPickContext,a.ContextKeyExpr.has(e.inRecentFilesPickerContextKey)),V="workbench.action.quickOpenNavigateNextInRecentFilesPicker";w.KeybindingsRegistry.registerCommandAndKeybindingRule({id:V,weight:200+50,handler:(0,n.getQuickNavigateHandler)(V,!0),when:P,primary:2048|48,mac:{primary:256|48}});const z="workbench.action.quickOpenNavigatePreviousInRecentFilesPicker";w.KeybindingsRegistry.registerCommandAndKeybindingRule({id:z,weight:200+50,handler:(0,n.getQuickNavigateHandler)(z,!1),when:P,primary:2048|1024|48,mac:{primary:256|1024|48}}),b.CommandsRegistry.registerCommand("workbench.action.toggleConfirmBeforeClose",U=>{const H=U.get(E.IConfigurationService),K=H.inspect("window.confirmBeforeClose").userValue;return H.updateValue("window.confirmBeforeClose",K==="never"?"keyboardOnly":"never")}),_.MenuRegistry.appendMenuItem(_.MenuId.MenubarFileMenu,{group:"z_ConfirmClose",command:{id:"workbench.action.toggleConfirmBeforeClose",title:(0,t.localize)(28,null),toggled:a.ContextKeyExpr.notEquals("config.window.confirmBeforeClose","never")},order:1,when:D.IsWebContext}),_.MenuRegistry.appendMenuItem(_.MenuId.MenubarFileMenu,{title:(0,t.localize)(29,null),submenu:_.MenuId.MenubarRecentMenu,group:"2_open",order:4})}),define(ne[2406],re([1,0,1385,10,78,33,35,5,24,12,353,80,36,237,6,602,186,82,16,70,94,7,9,63,74,1052]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BannerPart=void 0,(0,w.registerThemingParticipant)((b,E)=>{const y=b.getColor(l.BANNER_BACKGROUND);y&&E.addRule(`.monaco-workbench .part.banner { background-color: ${y}; }`);const T=b.getColor(l.BANNER_FOREGROUND);T&&E.addRule(` .monaco-workbench .part.banner, .monaco-workbench .part.banner .action-container .codicon, .monaco-workbench .part.banner .message-actions-container .monaco-link { color: ${T}; } `);const R=b.getColor(l.BANNER_ICON_FOREGROUND);R&&E.addRule(`.monaco-workbench .part.banner .icon-container .codicon { color: ${R} }`)});let d=class extends v.Part{constructor(E,y,T,R,O){super("workbench.parts.banner",{hasTitle:!1},E,T,y);this.contextKeyService=R,this.instantiationService=O,this.height=26,this.minimumWidth=0,this.maximumWidth=Number.POSITIVE_INFINITY,this._onDidChangeSize=this._register(new i.Emitter),this.visible=!1,this.focusedActionIndex=-1,this.markdownRenderer=this.instantiationService.createInstance(s.MarkdownRenderer,{})}get minimumHeight(){return this.visible?this.height:0}get maximumHeight(){return this.visible?this.height:0}get onDidChange(){return this._onDidChangeSize.event}createContentArea(E){this.element=E,this.element.tabIndex=0,this._register((0,f.addDisposableListener)(this.element,f.EventType.FOCUS,()=>{this.focusedActionIndex!==-1&&this.focusActionLink()}));const y=this.contextKeyService.createScoped(this.element);return g.BannerFocused.bindTo(y).set(!0),this.element}close(E){this.setVisibility(!1),(0,f.clearNode)(this.element),typeof E.onClose=="function"&&E.onClose(),this.item=void 0}focusActionLink(){const E=this.item?.actions?.length??0;if(this.focusedActionIndex<E){const y=this.messageActionsContainer?.children[this.focusedActionIndex];y instanceof HTMLElement&&(this.actionBar?.setFocusable(!1),y.focus())}else this.actionBar?.focus(0)}getAriaLabel(E){if(E.ariaLabel)return E.ariaLabel;if(typeof E.message=="string")return E.message}getBannerMessage(E){if(typeof E=="string"){const y=(0,f.$)("span");return y.innerText=E,y}return this.markdownRenderer.render(E).element}setVisibility(E){E!==this.visible&&(this.visible=E,this.focusedActionIndex=-1,this.layoutService.setPartHidden(!E,"workbench.parts.banner"),this._onDidChangeSize.fire(void 0))}focus(){this.focusedActionIndex=-1,this.element.focus()}focusNextAction(){const E=this.item?.actions?.length??0;this.focusedActionIndex=this.focusedActionIndex<E?this.focusedActionIndex+1:0,this.focusActionLink()}focusPreviousAction(){const E=this.item?.actions?.length??0;this.focusedActionIndex=this.focusedActionIndex>0?this.focusedActionIndex-1:E,this.focusActionLink()}hide(E){this.item?.id===E&&this.setVisibility(!1)}show(E){if(E.id===this.item?.id){this.setVisibility(!0);return}(0,f.clearNode)(this.element);const y=this.getAriaLabel(E);y&&this.element.setAttribute("aria-label",y);const T=(0,f.append)(this.element,(0,f.$)("div.icon-container"));T.setAttribute("aria-hidden","true"),E.icon instanceof A.Codicon?T.appendChild((0,f.$)(`div${E.icon.cssSelector}`)):(T.classList.add("custom-icon"),n.URI.isUri(E.icon)&&(T.style.backgroundImage=(0,f.asCSSUrl)(E.icon)));const R=(0,f.append)(this.element,(0,f.$)("div.message-container"));if(R.setAttribute("aria-hidden","true"),R.appendChild(this.getBannerMessage(E.message)),E.actions){this.messageActionsContainer=(0,f.append)(this.element,(0,f.$)("div.message-actions-container"));for(const F of E.actions)this._register(this.instantiationService.createInstance(c.Link,this.messageActionsContainer,{...F,tabIndex:-1},{}))}const O=(0,f.append)(this.element,(0,f.$)("div.action-container"));this.actionBar=this._register(new _.ActionBar(O));const x=this._register(new o.Action("banner.close","Close Banner",w.ThemeIcon.asClassName(h.widgetClose),!0,()=>this.close(E)));this.actionBar.push(x,{icon:!0,label:!1}),this.actionBar.setFocusable(!1),this.setVisibility(!0),this.item=E}toJSON(){return{type:"workbench.parts.banner"}}};d=Ee([W(0,w.IThemeService),W(1,C.IWorkbenchLayoutService),W(2,I.IStorageService),W(3,a.IContextKeyService),W(4,D.IInstantiationService)],d),e.BannerPart=d,(0,k.registerSingleton)(S.IBannerService,d),u.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.banner.focusBanner",weight:200,primary:9,when:g.BannerFocused,handler:b=>{b.get(S.IBannerService).focus()}}),u.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.banner.focusNextAction",weight:200,primary:17,secondary:[18],when:g.BannerFocused,handler:b=>{b.get(S.IBannerService).focusNextAction()}}),u.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.banner.focusPreviousAction",weight:200,primary:15,secondary:[16],when:g.BannerFocused,handler:b=>{b.get(S.IBannerService).focusPreviousAction()}});class m extends r.Action2{constructor(){super({id:m.ID,title:{value:m.LABEL,original:"Focus Banner"},category:p.CATEGORIES.View,f1:!0})}async run(E){E.get(C.IWorkbenchLayoutService).focusPart("workbench.parts.banner")}}m.ID="workbench.action.focusBanner",m.LABEL=(0,t.localize)(0,null),(0,r.registerAction2)(m)}),define(ne[47],re([1,0,5,76,17,11]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=void 0;var k;(function(I){I.Workbench="workbench.contributions.kind"})(k=e.Extensions||(e.Extensions={}));class D{constructor(){this.toBeInstantiated=new Map}registerWorkbenchContribution(w,v=1){if(this.instantiationService&&this.lifecycleService&&this.lifecycleService.phase>=v)this.instantiationService.createInstance(w);else{let C=this.toBeInstantiated.get(v);C||(C=[],this.toBeInstantiated.set(v,C)),C.push(w)}}start(w){const v=this.instantiationService=w.get(t.IInstantiationService),C=this.lifecycleService=w.get(f.ILifecycleService);[1,2,3,4].forEach(o=>{this.instantiateByPhase(v,C,o)})}instantiateByPhase(w,v,C){v.phase>=C?this.doInstantiateByPhase(w,C):v.when(C).then(()=>this.doInstantiateByPhase(w,C))}doInstantiateByPhase(w,v){const C=this.toBeInstantiated.get(v);if(C)if(this.toBeInstantiated.delete(v),v!==4)for(const o of C)this.safeCreateInstance(w,o);else{let o=3e3,c=0,i=S=>{for(;c<C.length;){const s=C[c++];if(this.safeCreateInstance(w,s),S.timeRemaining()<1){(0,A.runWhenIdle)(i,o);break}}};(0,A.runWhenIdle)(i,o)}}safeCreateInstance(w,v){try{w.createInstance(v)}catch(C){console.error(`Unable to instantiate workbench contribution ${v.name}.`,C)}}}_.Registry.add(k.Workbench,new D)}),define(ne[2407],re([1,0,36,1374,80,37,2,10,47,17,14,95]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextInputActionsProvider=void 0;let o=class extends k.Disposable{constructor(i,S,s){super();this.layoutService=i,this.contextMenuService=S,this.clipboardService=s,this.textInputActions=[],this.createActions(),this.registerListeners()}createActions(){this.textInputActions.push(new t.Action("undo",(0,f.localize)(0,null),void 0,!0,async()=>document.execCommand("undo")),new t.Action("redo",(0,f.localize)(1,null),void 0,!0,async()=>document.execCommand("redo")),new t.Separator,new t.Action("editor.action.clipboardCutAction",(0,f.localize)(2,null),void 0,!0,async()=>document.execCommand("cut")),new t.Action("editor.action.clipboardCopyAction",(0,f.localize)(3,null),void 0,!0,async()=>document.execCommand("copy")),new t.Action("editor.action.clipboardPasteAction",(0,f.localize)(4,null),void 0,!0,async i=>{if(v.isNative)document.execCommand("paste");else{const S=await this.clipboardService.readText();if(i instanceof HTMLTextAreaElement||i instanceof HTMLInputElement){const s=i.selectionStart||0,l=i.selectionEnd||0;i.value=`${i.value.substring(0,s)}${S}${i.value.substring(l,i.value.length)}`,i.selectionStart=s+S.length,i.selectionEnd=i.selectionStart}}}),new t.Separator,new t.Action("editor.action.selectAll",(0,f.localize)(5,null),void 0,!0,async()=>document.execCommand("selectAll")))}registerListeners(){this.layoutService.container.addEventListener("contextmenu",i=>this.onContextMenu(i))}onContextMenu(i){if(i.defaultPrevented)return;const S=i.target;!(S instanceof HTMLElement)||S.nodeName.toLowerCase()!=="input"&&S.nodeName.toLowerCase()!=="textarea"||(D.EventHelper.stop(i,!0),this.contextMenuService.showContextMenu({getAnchor:()=>i,getActions:()=>this.textInputActions,getActionsContext:()=>S,onHide:()=>S.focus()}))}};o=Ee([W(0,_.IWorkbenchLayoutService),W(1,A.IContextMenuService),W(2,C.IClipboardService)],o),e.TextInputActionsProvider=o,w.Registry.as(I.Extensions.Workbench).registerWorkbenchContribution(o,2)}),define(ne[2408],re([1,0,57,5,17,47,2394,2395,133,2124,2125]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const C=I.ExtensionsRegistry.registerExtensionPoint(k.codeActionsExtensionPointDescriptor),o=I.ExtensionsRegistry.registerExtensionPoint(D.documentationExtensionPointDescriptor);_.Registry.as(t.Extensions.Configuration).registerConfiguration(w.editorConfiguration);let c=class{constructor(S){S.createInstance(w.CodeActionsContribution,C),S.createInstance(v.CodeActionDocumentationContribution,o)}};c=Ee([W(0,f.IInstantiationService)],c),_.Registry.as(A.Extensions.Workbench).registerWorkbenchContribution(c,4)}),define(ne[2409],re([1,0,1458,38,21,70,16]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class D extends k.Action2{constructor(){super({id:"workbench.action.inspectKeyMappings",title:{value:(0,t.localize)(0,null),original:"Inspect Key Mappings"},category:A.CATEGORIES.Developer,f1:!0})}run(v,C){const o=v.get(f.IKeybindingService);v.get(_.IEditorService).openEditor({resource:void 0,contents:o._dumpDebugInfo(),options:{pinned:!0}})}}(0,k.registerAction2)(D);class I extends k.Action2{constructor(){super({id:"workbench.action.inspectKeyMappingsJSON",title:{value:(0,t.localize)(1,null),original:"Inspect Key Mappings (JSON)"},category:A.CATEGORIES.Developer,f1:!0})}async run(v){const C=v.get(_.IEditorService),o=v.get(f.IKeybindingService);await C.openEditor({resource:void 0,contents:o._dumpDebugInfoJSON(),options:{pinned:!0}})}}(0,k.registerAction2)(I)}),define(ne[2410],re([1,0,1467,16,8,7,70]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleMinimapAction=void 0;class D extends f.Action2{constructor(){super({id:D.ID,title:{value:(0,t.localize)(0,null),original:"Toggle Minimap",mnemonicTitle:(0,t.localize)(1,null)},category:k.CATEGORIES.View,f1:!0,toggled:A.ContextKeyExpr.equals("config.editor.minimap.enabled",!0),menu:{id:f.MenuId.MenubarViewMenu,group:"5_editor",order:2}})}async run(w){const v=w.get(_.IConfigurationService),C=!v.getValue("editor.minimap.enabled");return v.updateValue("editor.minimap.enabled",C)}}e.ToggleMinimapAction=D,D.ID="editor.action.toggleMinimap",(0,f.registerAction2)(D)}),define(ne[2411],re([1,0,1468,14,16,8,7,17,47]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleMultiCursorModifierAction=void 0;class w extends _.Action2{constructor(){super({id:w.ID,title:{value:(0,t.localize)(0,null),original:"Toggle Multi-Cursor Modifier"},f1:!0})}run(c){const i=c.get(A.IConfigurationService),s=i.getValue("editor").multiCursorModifier==="ctrlCmd"?"alt":"ctrlCmd";return i.updateValue(w.multiCursorModifierConfigurationKey,s)}}e.ToggleMultiCursorModifierAction=w,w.ID="workbench.action.toggleMultiCursorModifier",w.multiCursorModifierConfigurationKey="editor.multiCursorModifier";const v=new k.RawContextKey("multiCursorModifier","altKey");let C=class{constructor(c,i){this.configurationService=c,this._multiCursorModifier=v.bindTo(i),this._update(),c.onDidChangeConfiguration(S=>{S.affectsConfiguration("editor.multiCursorModifier")&&this._update()})}_update(){const i=this.configurationService.getValue("editor").multiCursorModifier==="ctrlCmd"?"ctrlCmd":"altKey";this._multiCursorModifier.set(i)}};C=Ee([W(0,A.IConfigurationService),W(1,k.IContextKeyService)],C),D.Registry.as(I.Extensions.Workbench).registerWorkbenchContribution(C,3),(0,_.registerAction2)(w),_.MenuRegistry.appendMenuItem(_.MenuId.MenubarSelectionMenu,{group:"4_config",command:{id:w.ID,title:(0,t.localize)(1,null)},when:v.isEqualTo("ctrlCmd"),order:1}),_.MenuRegistry.appendMenuItem(_.MenuId.MenubarSelectionMenu,{group:"4_config",command:{id:w.ID,title:f.isMacintosh?(0,t.localize)(2,null):(0,t.localize)(3,null)},when:v.isEqualTo("altKey"),order:1})}),define(ne[2412],re([1,0,1469,16,8,7,70]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleRenderControlCharacterAction=void 0;class D extends f.Action2{constructor(){super({id:D.ID,title:{value:(0,t.localize)(0,null),mnemonicTitle:(0,t.localize)(1,null),original:"Toggle Control Characters"},category:k.CATEGORIES.View,f1:!0,toggled:A.ContextKeyExpr.equals("config.editor.renderControlCharacters",!0),menu:{id:f.MenuId.MenubarViewMenu,group:"5_editor",order:5}})}run(w){const v=w.get(_.IConfigurationService),C=!v.getValue("editor.renderControlCharacters");return v.updateValue("editor.renderControlCharacters",C)}}e.ToggleRenderControlCharacterAction=D,D.ID="editor.action.toggleRenderControlCharacter",(0,f.registerAction2)(D)}),define(ne[2413],re([1,0,1470,16,8,7,70]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class D extends f.Action2{constructor(){super({id:D.ID,title:{value:(0,t.localize)(0,null),mnemonicTitle:(0,t.localize)(1,null),original:"Toggle Render Whitespace"},category:k.CATEGORIES.View,f1:!0,toggled:A.ContextKeyExpr.notEquals("config.editor.renderWhitespace","none"),menu:{id:f.MenuId.MenubarViewMenu,group:"5_editor",order:4}})}run(w){const v=w.get(_.IConfigurationService),C=v.getValue("editor.renderWhitespace");let o;return C==="none"?o="all":o="none",v.updateValue("editor.renderWhitespace",o)}}D.ID="editor.action.toggleRenderWhitespace",(0,f.registerAction2)(D)}),define(ne[614],re([1,0,1471,2,39,72,16,7,58,33,17,47,21]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readTransientState=e.writeTransientState=void 0;const c="transientWordWrapState",i="isWordWrapMinified",S="isDominatedByLongLines",s=new D.RawContextKey("canToggleWordWrap",!1,!0),l=new D.RawContextKey("editorWordWrap",!1,t.localize(0,null));function r(m,b,E){E.setTransientModelProperty(m,c,b)}e.writeTransientState=r;function p(m,b){return b.getTransientModelProperty(m,c)}e.readTransientState=p;const u="editor.action.toggleWordWrap";class a extends _.EditorAction{constructor(){super({id:u,label:t.localize(1,null),alias:"View: Toggle Word Wrap",precondition:void 0,kbOpts:{kbExpr:null,primary:512|56,weight:100}})}run(b,E){const y=b.get(A.ICodeEditorService);if(!h(y,E))return;const T=E.getModel(),R=p(T,y);let O;if(R?O=null:O={wordWrapOverride:E.getOption(132).wrappingColumn===-1?"on":"off"},r(T,O,y),E.getOption(54))for(const x of y.listDiffEditors()){const F=x.getOriginalEditor(),L=x.getModifiedEditor();if(F===E){h(y,L)&&(r(L.getModel(),O,y),x.updateOptions({}));break}if(L===E){h(y,F)&&(r(F.getModel(),O,y),x.updateOptions({}));break}}}}let n=class extends f.Disposable{constructor(b,E,y){super();this._editor=b,this._contextKeyService=E,this._codeEditorService=y;const R=this._editor.getOptions().get(132),O=this._contextKeyService.createKey(i,R.isWordWrapMinified),x=this._contextKeyService.createKey(S,R.isDominatedByLongLines);let F=!1;this._register(b.onDidChangeConfiguration(M=>{if(!M.hasChanged(132))return;const B=this._editor.getOptions().get(132);O.set(B.isWordWrapMinified),x.set(B.isDominatedByLongLines),F||L()})),this._register(b.onDidChangeModel(M=>{L()})),this._register(y.onDidChangeTransientModelProperty(()=>{L()}));const L=()=>{if(!h(this._codeEditorService,this._editor))return;const M=p(this._editor.getModel(),this._codeEditorService);try{F=!0,this._applyWordWrapState(M)}finally{F=!1}}}_applyWordWrapState(b){const E=b?b.wordWrapOverride:"inherit";this._editor.updateOptions({wordWrapOverride2:E})}};n.ID="editor.contrib.toggleWordWrapController",n=Ee([W(1,D.IContextKeyService),W(2,A.ICodeEditorService)],n);function h(m,b){if(!b||b.isSimpleWidget)return!1;const E=b.getModel();if(!E||E.uri.scheme==="output")return!1;if(b.getOption(54)){for(const y of m.listDiffEditors())if(y.getOriginalEditor()===b&&!y.renderSideBySide)return!1}return!0}let g=class{constructor(b,E,y){this._editorService=b,this._codeEditorService=E,this._contextService=y,window.addEventListener("focus",()=>this._update(),!0),window.addEventListener("blur",()=>this._update(),!0),this._editorService.onDidActiveEditorChange(()=>this._update()),this._canToggleWordWrap=s.bindTo(this._contextService),this._editorWordWrap=l.bindTo(this._contextService),this._activeEditor=null,this._activeEditorListener=new f.DisposableStore,this._update()}_update(){const b=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();this._activeEditor!==b&&(this._activeEditorListener.clear(),this._activeEditor=b,b&&(this._activeEditorListener.add(b.onDidChangeModel(()=>this._updateFromCodeEditor())),this._activeEditorListener.add(b.onDidChangeConfiguration(E=>{E.hasChanged(132)&&this._updateFromCodeEditor()})),this._updateFromCodeEditor()))}_updateFromCodeEditor(){if(h(this._codeEditorService,this._activeEditor)){const b=this._activeEditor.getOption(132);this._setValues(!0,b.wrappingColumn!==-1)}else return this._setValues(!1,!1)}_setValues(b,E){this._canToggleWordWrap.set(b),this._editorWordWrap.set(E)}};g=Ee([W(0,o.IEditorService),W(1,A.ICodeEditorService),W(2,D.IContextKeyService)],g),v.Registry.as(C.Extensions.Workbench).registerWorkbenchContribution(g,2),(0,_.registerEditorContribution)(n.ID,n),(0,_.registerEditorAction)(a),k.MenuRegistry.appendMenuItem(k.MenuId.EditorTitle,{command:{id:u,title:t.localize(2,null),icon:w.Codicon.wordWrap},group:"navigation",order:1,when:D.ContextKeyExpr.and(D.ContextKeyExpr.has(S),D.ContextKeyExpr.has(i))}),k.MenuRegistry.appendMenuItem(k.MenuId.EditorTitle,{command:{id:u,title:t.localize(3,null),icon:w.Codicon.wordWrap},group:"navigation",order:1,when:D.ContextKeyExpr.and(I.EditorContextKeys.inDiffEditor.negate(),D.ContextKeyExpr.has(S),D.ContextKeyExpr.not(i))}),k.MenuRegistry.appendMenuItem(k.MenuId.MenubarViewMenu,{group:"5_editor",command:{id:u,title:t.localize(4,null),toggled:l,precondition:s},order:1})}),define(ne[2414],re([1,0,2,393,87,17,47]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let D=class extends t.Disposable{constructor(w){super();this._register(w.onDidChangeDisplay(()=>{f.FontMeasurements.clearAllFontInfos()}))}};D=Ee([W(0,_.INativeHostService)],D),A.Registry.as(k.Extensions.Workbench).registerWorkbenchContribution(D,4)}),define(ne[2415],re([1,0,1473,11,2,14,39,20,95,354,17,47,8,58]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionClipboard=void 0;let i=class $o extends _.Disposable{constructor(r,p){super();if(A.isLinux){let u=r.getOption(96);this._register(r.onDidChangeConfiguration(n=>{n.hasChanged(96)&&(u=r.getOption(96))}));let a=this._register(new f.RunOnceScheduler(()=>{if(!r.hasModel())return;let n=r.getModel(),h=r.getSelections();h=h.slice(0),h.sort(D.Range.compareRangesUsingStarts);let g=0;for(const b of h){if(b.isEmpty())return;g+=n.getValueLengthInRange(b)}if(g>$o.SELECTION_LENGTH_LIMIT)return;let d=[];for(const b of h)d.push(n.getValueInRange(b,0));let m=d.join(n.getEOL());p.writeText(m,"selection")},100));this._register(r.onDidChangeCursorSelection(n=>{!u||n.source!=="restoreState"&&a.schedule()}))}}dispose(){super.dispose()}};i.SELECTION_LENGTH_LIMIT=65536,i=Ee([W(1,I.IClipboardService)],i),e.SelectionClipboard=i;let S=class{constructor(r){A.isLinux&&document.addEventListener("mouseup",p=>{p.button===1&&(r.getValue("editor").selectionClipboard||p.preventDefault())})}};S=Ee([W(0,o.IConfigurationService)],S);class s extends k.EditorAction{constructor(){super({id:"editor.action.selectionClipboardPaste",label:t.localize(0,null),alias:"Paste Selection Clipboard",precondition:c.EditorContextKeys.writable})}async run(r,p,u){const n=await r.get(I.IClipboardService).readText("selection");p.trigger("keyboard","paste",{text:n,pasteOnNewLine:!1,multicursorText:null})}}(0,k.registerEditorContribution)(w.SelectionClipboardContributionID,i),v.Registry.as(C.Extensions.Workbench).registerWorkbenchContribution(S,2),A.isLinux&&(0,k.registerEditorAction)(s)}),define(ne[2416],re([1,0,17,47,72,87,2]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let D=class extends k.Disposable{constructor(w,v){super();this._register(v.onDidResumeOS(()=>{w.listCodeEditors().forEach(C=>C.render(!0))}))}};D=Ee([W(0,_.ICodeEditorService),W(1,A.INativeHostService)],D),t.Registry.as(f.Extensions.Workbench).registerWorkbenchContribution(D,4)}),define(ne[2417],re([1,0,47,17,5,121,2309]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionPoints=void 0;let D=class{constructor(w,v){v.args["export-default-configuration"]&&w.createInstance(k.DefaultConfigurationExportHelper)}};D=Ee([W(0,_.IInstantiationService),W(1,A.INativeWorkbenchEnvironmentService)],D),e.ExtensionPoints=D,f.Registry.as(t.Extensions.Workbench).registerWorkbenchContribution(D,3)}),define(ne[2418],re([1,0,2,37,185,17,47]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let D=class{constructor(w,v){this.disposables=new t.DisposableStore;const C=o=>w.container.classList.toggle("context-menu-visible",o);v.onDidShowContextMenu(()=>C(!0),null,this.disposables),v.onDidHideContextMenu(()=>C(!1),null,this.disposables)}};D=Ee([W(0,_.ILayoutService),W(1,f.IContextMenuService)],D),A.Registry.as(k.Extensions.Workbench).registerWorkbenchContribution(D,4)}),define(ne[2419],re([1,0,6,2,81,29,106,42,1497,28,8,7,54,5,146,53,17,90,2289,859,366,191,21,40,76]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AdapterManager=void 0;const d=s.Registry.as(i.Extensions.JSONContribution);let m=class extends f.Disposable{constructor(E,y,T,R,O,x,F,L,M,N){super();this.editorService=E,this.configurationService=y,this.quickInputService=T,this.instantiationService=R,this.commandService=O,this.extensionService=x,this.contextKeyService=F,this.languageService=L,this.dialogService=M,this.lifecycleService=N,this.debugAdapterFactories=new Map,this._onDidRegisterDebugger=new t.Emitter,this._onDidDebuggersExtPointRead=new t.Emitter,this.breakpointLanguageIdsSet=new Set,this.debuggerWhenKeys=new Set,this.adapterDescriptorFactories=[],this.debuggers=[],this.registerListeners(),this.debuggersAvailable=l.CONTEXT_DEBUGGERS_AVAILABLE.bindTo(F),this._register(this.contextKeyService.onDidChangeContext(B=>{B.affectsSome(this.debuggerWhenKeys)&&(this.debuggersAvailable.set(this.hasEnabledDebuggers()),this.updateDebugAdapterSchema())})),this.debugExtensionsAvailable=l.CONTEXT_DEBUG_EXTENSION_AVAILABLE.bindTo(F),this.debugExtensionsAvailable.set(!0),this._register(this.onDidDebuggersExtPointRead(()=>{this.debugExtensionsAvailable.set(this.debuggers.length>0)})),this.lifecycleService.when(4).then(()=>this.debugExtensionsAvailable.set(this.debuggers.length>0))}registerListeners(){p.debuggersExtPoint.setHandler((E,y)=>{y.added.forEach(T=>{T.value.forEach(R=>{if((!R.type||typeof R.type!="string")&&T.collector.error(I.localize(0,null)),R.type!=="*"){const O=this.getDebugger(R.type);if(O)O.merge(R,T.description);else{const x=this.instantiationService.createInstance(r.Debugger,this,R,T.description);x.when?.keys().forEach(F=>this.debuggerWhenKeys.add(F)),this.debuggers.push(x)}}})}),E.forEach(T=>{T.value.forEach(R=>{R.type==="*"&&this.debuggers.forEach(O=>O.merge(R,T.description))})}),y.removed.forEach(T=>{const R=T.value.map(O=>O.type);this.debuggers=this.debuggers.filter(O=>R.indexOf(O.type)===-1)}),this.updateDebugAdapterSchema(),this._onDidDebuggersExtPointRead.fire()}),p.breakpointsExtPoint.setHandler((E,y)=>{y.removed.forEach(T=>{T.value.forEach(R=>this.breakpointLanguageIdsSet.delete(R.language))}),y.added.forEach(T=>{T.value.forEach(R=>this.breakpointLanguageIdsSet.add(R.language))})})}updateDebugAdapterSchema(){const E=p.launchSchema.properties.configurations.items,y=u.TaskDefinitionRegistry.getJsonSchema(),T={common:{properties:{name:{type:"string",description:I.localize(1,null),default:"Launch"},debugServer:{type:"number",description:I.localize(2,null),default:4711},preLaunchTask:{anyOf:[y,{type:["string"]}],default:"",defaultSnippets:[{body:{task:"",type:""}}],description:I.localize(3,null)},postDebugTask:{anyOf:[y,{type:["string"]}],default:"",defaultSnippets:[{body:{task:"",type:""}}],description:I.localize(4,null)},presentation:p.presentationSchema,internalConsoleOptions:l.INTERNAL_CONSOLE_OPTIONS_SCHEMA}}};p.launchSchema.definitions=T,E.oneOf=[],E.defaultSnippets=[],this.debuggers.forEach(R=>{const O=R.getSchemaAttributes(T);O&&E.oneOf&&E.oneOf.push(...O);const x=R.configurationSnippets;x&&E.defaultSnippets&&E.defaultSnippets.push(...x)}),d.registerSchema(a.launchSchemaId,p.launchSchema)}registerDebugAdapterFactory(E,y){return E.forEach(T=>this.debugAdapterFactories.set(T,y)),this.debuggersAvailable.set(this.hasEnabledDebuggers()),this._onDidRegisterDebugger.fire(),{dispose:()=>{E.forEach(T=>this.debugAdapterFactories.delete(T))}}}hasEnabledDebuggers(){for(const[E]of this.debugAdapterFactories){const y=this.getDebugger(E);if(y&&y.enabled)return!0}return!1}createDebugAdapter(E){const y=this.debugAdapterFactories.get(E.configuration.type);if(y)return y.createDebugAdapter(E)}substituteVariables(E,y,T){const R=this.debugAdapterFactories.get(E);return R?R.substituteVariables(y,T):Promise.resolve(T)}runInTerminal(E,y,T){const R=this.debugAdapterFactories.get(E);return R?R.runInTerminal(y,T):Promise.resolve(void 0)}registerDebugAdapterDescriptorFactory(E){return this.adapterDescriptorFactories.push(E),{dispose:()=>{this.unregisterDebugAdapterDescriptorFactory(E)}}}unregisterDebugAdapterDescriptorFactory(E){const y=this.adapterDescriptorFactories.indexOf(E);y>=0&&this.adapterDescriptorFactories.splice(y,1)}getDebugAdapterDescriptor(E){const y=E.configuration,T=this.adapterDescriptorFactories.filter(R=>R.type===y.type&&R.createDebugAdapterDescriptor);return T.length===1?T[0].createDebugAdapterDescriptor(E):Promise.resolve(void 0)}getDebuggerLabel(E){const y=this.getDebugger(E);if(y)return y.label}get onDidRegisterDebugger(){return this._onDidRegisterDebugger.event}get onDidDebuggersExtPointRead(){return this._onDidDebuggersExtPointRead.event}canSetBreakpointsIn(E){const y=E.getLanguageId();return!y||y==="jsonc"||y==="log"?!1:this.configurationService.getValue("debug").allowBreakpointsEverywhere?!0:this.breakpointLanguageIdsSet.has(y)}getDebugger(E){return this.debuggers.find(y=>A.equalsIgnoreCase(y.type,E))}isDebuggerInterestedInLanguage(E){return!!this.debuggers.filter(y=>y.enabled).find(y=>E&&y.languages&&y.languages.indexOf(E)>=0)}async guessDebugger(E,y){if(y){const M=this.getDebugger(y);return M&&M.enabled?M:void 0}const T=this.editorService.activeTextEditorControl;let R=[],O=null,x=null;if((0,k.isCodeEditor)(T)){x=T.getModel();const M=x?x.getLanguageId():void 0;M&&(O=this.languageService.getLanguageName(M));const N=this.debuggers.filter(B=>B.enabled).filter(B=>M&&B.languages&&B.languages.indexOf(M)>=0);if(N.length===1)return N[0];N.length>1&&(R=N)}(!O||E||x&&this.canSetBreakpointsIn(x))&&R.length===0&&(await this.activateDebuggers("onDebugInitialConfigurations"),R=this.debuggers.filter(M=>M.enabled).filter(M=>M.hasInitialConfiguration()||M.hasConfigurationProvider())),R.sort((M,N)=>M.label.localeCompare(N.label));const F=R.map(M=>({label:M.label,debugger:M}));if(F.length===0&&O){O.indexOf(" ")>=0&&(O=`'${O}'`);const M=I.localize(5,null,O),N=I.localize(6,null,O);(await this.dialogService.show(_.default.Warning,M,[N,I.localize(7,null)],{cancelId:1})).choice===0&&await this.commandService.executeCommand("debug.installAdditionalDebuggers",O);return}F.push({type:"separator",label:""});const L=I.localize(8,null);return F.push({label:O?I.localize(9,null,O):I.localize(10,null)}),this.quickInputService.pick(F,{activeItem:F[0],placeHolder:L}).then(M=>{if(M&&M.debugger)return M.debugger;M&&this.commandService.executeCommand("debug.installAdditionalDebuggers",O)})}async activateDebuggers(E,y){const T=[this.extensionService.activateByEvent(E),this.extensionService.activateByEvent("onDebug")];y&&T.push(this.extensionService.activateByEvent(`${E}:${y}`)),await Promise.all(T)}};m=Ee([W(0,n.IEditorService),W(1,v.IConfigurationService),W(2,S.IQuickInputService),W(3,c.IInstantiationService),W(4,w.ICommandService),W(5,h.IExtensionService),W(6,C.IContextKeyService),W(7,D.ILanguageService),W(8,o.IDialogService),W(9,g.ILifecycleService)],m),e.AdapterManager=m}),define(ne[2420],re([1,0,1527,8,54,90,76]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugLifecycle=void 0;let D=class{constructor(w,v,C,o){this.debugService=v,this.configurationService=C,this.dialogService=o,w.onBeforeShutdown(async c=>c.veto(this.shouldVetoShutdown(c.reason),"veto.debug"))}shouldVetoShutdown(w){const v=this.debugService.getModel().getSessions().filter(o=>o.parentSession===void 0);return v.length===0||this.configurationService.getValue("debug").confirmOnExit==="never"?!1:this.showWindowCloseConfirmation(v.length)}async showWindowCloseConfirmation(w){let v;return w===1?v=t.localize(0,null):v=t.localize(1,null),!(await this.dialogService.confirm({message:v,type:"warning",primaryButton:t.localize(2,null)})).confirmed}};D=Ee([W(0,k.ILifecycleService),W(1,A.IDebugService),W(2,f.IConfigurationService),W(3,_.IDialogService)],D),e.DebugLifecycle=D}),define(ne[879],re([1,0,1536,36,166,27,5,119,12,40,71,10,78,2,11,115,37,110,15,26,7,24,45,181,107,18,50,32,21,485,16,70,95,1091]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowRuntimeExtensionsAction=e.AbstractRuntimeExtensionsEditor=void 0;let x=class qo extends _.EditorPane{constructor(M,N,B,P,V,z,U,H,K,G,q,Z){super(qo.ID,M,N,K);this._extensionsWorkbenchService=P,this._extensionService=V,this._notificationService=z,this._contextMenuService=U,this._instantiationService=H,this._labelService=G,this._environmentService=q,this._clipboardService=Z,this._list=null,this._elements=null,this._updateSoon=this._register(new i.RunOnceScheduler(()=>this._updateExtensions(),200)),this._register(this._extensionService.onDidChangeExtensionsStatus(()=>this._updateSoon.schedule())),this._updateExtensions()}async _updateExtensions(){this._elements=await this._resolveExtensions(),this._list&&this._list.splice(0,this._list.length,this._elements)}async _resolveExtensions(){const M=(await this._extensionService.getExtensions()).filter(q=>Boolean(q.main)||Boolean(q.browser));let N=Object.create(null);const B=await this._extensionsWorkbenchService.queryLocal();for(let q of B)N[g.ExtensionIdentifier.toKey(q.identifier.id)]=q;let P=this._extensionService.getExtensionsStatus(),V=Object.create(null);const z=this._getProfileInfo();if(z){let q=z.startTime;for(let Z=0,j=z.deltas.length;Z<j;Z++){const X=z.ids[Z],Y=z.deltas[Z];let $=V[g.ExtensionIdentifier.toKey(X)];$||($=[],V[g.ExtensionIdentifier.toKey(X)]=$),$.push(q),q=q+Y,$.push(q)}}let U=[];for(let q=0,Z=M.length;q<Z;q++){const j=M[q];let X=null;if(z){let Y=V[g.ExtensionIdentifier.toKey(j.identifier)]||[],$=0;for(let J=0,ee=Y.length/2;J<ee;J++){const te=Y[2*J];$+=Y[2*J+1]-te}X={segments:Y,totalTime:$}}U[q]={originalIndex:q,description:j,marketplaceInfo:N[g.ExtensionIdentifier.toKey(j.identifier)],status:P[j.identifier.value],profileInfo:X||void 0,unresponsiveProfile:this._getUnresponsiveProfile(j.identifier)}}U=U.filter(q=>q.status.activationTimes);const H=q=>q.unresponsiveProfile===z,K=q=>q.profileInfo?.totalTime??0,G=q=>(q.status.activationTimes?.codeLoadingTime??0)+(q.status.activationTimes?.activateCallTime??0);return U=U.sort((q,Z)=>H(q)||H(Z)?+H(Z)-+H(q):K(q)||K(Z)?K(Z)-K(q):G(q)||G(Z)?G(Z)-G(q):q.originalIndex-Z.originalIndex),U}createEditor(M){M.classList.add("runtime-extensions-editor");const N="runtimeExtensionElementTemplate",B=new class{getHeight(V){return 62}getTemplateId(V){return N}},P={templateId:N,renderTemplate:V=>{const z=(0,C.append)(V,(0,C.$)(".extension")),U=(0,C.append)(z,(0,C.$)(".icon-container")),H=(0,C.append)(U,(0,C.$)("img.icon")),K=(0,C.append)(z,(0,C.$)("div.desc")),G=(0,C.append)(K,(0,C.$)(".header-container")),q=(0,C.append)(G,(0,C.$)(".header")),Z=(0,C.append)(q,(0,C.$)("div.name")),j=(0,C.append)(q,(0,C.$)("span.version")),X=(0,C.append)(K,(0,C.$)("div.msg")),Y=new o.ActionBar(K,{animated:!1});Y.onDidRun(({error:se})=>se&&this._notificationService.error(se));const $=(0,C.append)(z,(0,C.$)(".time")),J=(0,C.append)($,(0,C.$)("div.activation-time")),ee=(0,C.append)($,(0,C.$)("div.profile-time"));return{root:V,element:z,icon:H,name:Z,version:j,actionbar:Y,activationTime:J,profileTime:ee,msgContainer:X,disposables:[Y],elementDisposables:[]}},renderElement:(V,z,U)=>{U.elementDisposables=(0,c.dispose)(U.elementDisposables),U.root.classList.toggle("odd",z%2==1),U.elementDisposables.push((0,C.addDisposableListener)(U.icon,"error",()=>U.icon.src=V.marketplaceInfo?.iconUrlFallback||S.DefaultIconPath,{once:!0})),U.icon.src=V.marketplaceInfo?.iconUrl||S.DefaultIconPath,U.icon.complete?U.icon.style.visibility="inherit":(U.icon.style.visibility="hidden",U.icon.onload=()=>U.icon.style.visibility="inherit"),U.name.textContent=(V.marketplaceInfo?.displayName||V.description.identifier.value).substr(0,50),U.version.textContent=V.description.version;const H=V.status.activationTimes;let K=H.codeLoadingTime+H.activateCallTime;U.activationTime.textContent=H.activationReason.startup?`Startup Activation: ${K}ms`:`Activation: ${K}ms`,U.actionbar.clear();const G=this._createSlowExtensionAction(V);if(G&&U.actionbar.push(G,{icon:!0,label:!0}),(0,r.isNonEmptyArray)(V.status.runtimeErrors)){const Y=this._createReportExtensionIssueAction(V);Y&&U.actionbar.push(Y,{icon:!0,label:!0})}let q;const Z=H.activationReason.extensionId.value,j=H.activationReason.activationEvent;if(j==="*")q=t.localize(0,null,Z);else if(/^workspaceContains:/.test(j)){let Y=j.substr("workspaceContains:".length);Y.indexOf("*")>=0||Y.indexOf("?")>=0?q=t.localize(1,null,Y,Z):q=t.localize(2,null,Y,Z)}else if(/^workspaceContainsTimeout:/.test(j)){const Y=j.substr("workspaceContainsTimeout:".length);q=t.localize(3,null,Y,Z)}else if(j==="onStartupFinished")q=t.localize(4,null,Z);else if(/^onLanguage:/.test(j)){let Y=j.substr("onLanguage:".length);q=t.localize(5,null,Y,Z)}else q=t.localize(6,null,j,Z);if(U.activationTime.title=q,(0,C.clearNode)(U.msgContainer),this._getUnresponsiveProfile(V.description.identifier)){const Y=(0,C.$)("span",void 0,...(0,h.renderLabelWithIcons)(" $(alert) Unresponsive"));Y.title=t.localize(7,null),U.msgContainer.appendChild(Y)}if((0,r.isNonEmptyArray)(V.status.runtimeErrors)){const Y=(0,C.$)("span",void 0,...(0,h.renderLabelWithIcons)(`$(bug) ${t.localize(8,null,V.status.runtimeErrors.length)}`));U.msgContainer.appendChild(Y)}if(V.status.messages&&V.status.messages.length>0){const Y=(0,C.$)("span",void 0,...(0,h.renderLabelWithIcons)(`$(alert) ${V.status.messages[0].message}`));U.msgContainer.appendChild(Y)}let X=null;if(V.status.runningLocation&&V.status.runningLocation.equals(new w.LocalWebWorkerRunningLocation))X="$(globe) web worker";else if(V.description.extensionLocation.scheme===d.Schemas.vscodeRemote){const Y=this._labelService.getHostLabel(d.Schemas.vscodeRemote,this._environmentService.remoteAuthority);Y?X=`$(remote) ${Y}`:X=`$(remote) ${V.description.extensionLocation.authority}`}else V.status.runningLocation&&V.status.runningLocation.affinity>0&&(X=`$(server-process) local process ${V.status.runningLocation.affinity+1}`);if(X){const Y=(0,C.$)("span",void 0,...(0,h.renderLabelWithIcons)(X));U.msgContainer.appendChild(Y)}V.profileInfo?U.profileTime.textContent=`Profile: ${(V.profileInfo.totalTime/1e3).toFixed(2)}ms`:U.profileTime.textContent=""},disposeTemplate:V=>{V.disposables=(0,c.dispose)(V.disposables)}};this._list=this._instantiationService.createInstance(v.WorkbenchList,"RuntimeExtensions",M,B,[P],{multipleSelectionSupport:!1,setRowLineHeight:!1,horizontalScrolling:!1,overrideStyles:{listBackground:b.editorBackground},accessibilityProvider:new class{getWidgetAriaLabel(){return t.localize(9,null)}getAriaLabel(V){return V.description.name}}}),this._list.splice(0,this._list.length,this._elements||void 0),this._list.onContextMenu(V=>{if(!V.element)return;const z=[];z.push(new f.Action("runtimeExtensionsEditor.action.copyId",t.localize(10,null,V.element.description.identifier.value),void 0,!0,()=>{this._clipboardService.writeText(V.element.description.identifier.value)}));const U=this._createReportExtensionIssueAction(V.element);U&&z.push(U),z.push(new f.Separator),V.element.marketplaceInfo&&(z.push(new f.Action("runtimeExtensionsEditor.action.disableWorkspace",t.localize(11,null),void 0,!0,()=>this._extensionsWorkbenchService.setEnablement(V.element.marketplaceInfo,7))),z.push(new f.Action("runtimeExtensionsEditor.action.disable",t.localize(12,null),void 0,!0,()=>this._extensionsWorkbenchService.setEnablement(V.element.marketplaceInfo,6)))),z.push(new f.Separator);const H=this._createProfileAction();H&&z.push(H);const K=this.saveExtensionHostProfileAction;K&&z.push(K),this._contextMenuService.showContextMenu({getAnchor:()=>V.anchor,getActions:()=>z})})}get saveExtensionHostProfileAction(){return this._createSaveExtensionHostProfileAction()}layout(M){this._list&&this._list.layout(M.height)}};x.ID="workbench.editor.runtimeExtensions",Ee([l.memoize],x.prototype,"saveExtensionHostProfileAction",null),x=Ee([W(0,A.ITelemetryService),W(1,I.IThemeService),W(2,u.IContextKeyService),W(3,D.IExtensionsWorkbenchService),W(4,w.IExtensionService),W(5,p.INotificationService),W(6,s.IContextMenuService),W(7,k.IInstantiationService),W(8,a.IStorageService),W(9,n.ILabelService),W(10,m.IWorkbenchEnvironmentService),W(11,O.IClipboardService)],x),e.AbstractRuntimeExtensionsEditor=x;class F extends T.Action2{constructor(){super({id:"workbench.action.showRuntimeExtensions",title:{value:t.localize(13,null),original:"Show Running Extensions"},category:R.CATEGORIES.Developer,f1:!0,menu:{id:T.MenuId.ViewContainerTitle,when:u.ContextKeyExpr.equals("viewContainer","workbench.view.extensions"),group:"2_enablement",order:3}})}async run(M){await M.get(E.IEditorService).openEditor(y.RuntimeExtensionsInput.instance,{pinned:!0})}}e.ShowRuntimeExtensionsAction=F}),define(ne[880],re([1,0,1559,6,22,2,79,115,254,76,5,100,26]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isKeymapExtension=e.getInstalledExtensions=e.onExtensionChanged=e.KeymapExtensions=void 0;let c=class extends A.Disposable{constructor(r,p,u,a,n){super();this.instantiationService=r,this.extensionEnablementService=p,this.tipsService=u,this.notificationService=n,this._register(a.onDidShutdown(()=>this.dispose())),this._register(r.invokeFunction(i)(h=>{Promise.all(h.map(g=>this.checkForOtherKeymaps(g))).then(void 0,_.onUnexpectedError)}))}checkForOtherKeymaps(r){return this.instantiationService.invokeFunction(S).then(p=>{const u=p.filter(n=>s(this.tipsService,n)),a=u.find(n=>(0,C.areSameExtensions)(n.identifier,r));if(a&&a.globallyEnabled){const n=u.filter(h=>!(0,C.areSameExtensions)(h.identifier,r)&&h.globallyEnabled);if(n.length)return this.promptForDisablingOtherKeymaps(a,n)}})}promptForDisablingOtherKeymaps(r,p){const u=a=>{a&&this.extensionEnablementService.setEnablement(p.map(n=>n.local),6)};this.notificationService.prompt(o.Severity.Info,(0,t.localize)(0,null,p.map(a=>`'${a.local.manifest.displayName}'`).join(", ")),[{label:(0,t.localize)(1,null),run:()=>u(!0)},{label:(0,t.localize)(2,null),run:()=>u(!1)}])}};c=Ee([W(0,v.IInstantiationService),W(1,D.IWorkbenchExtensionEnablementService),W(2,I.IExtensionRecommendationsService),W(3,w.ILifecycleService),W(4,o.INotificationService)],c),e.KeymapExtensions=c;function i(l){const r=l.get(k.IExtensionManagementService),p=l.get(D.IWorkbenchExtensionEnablementService),u=f.Event.chain(r.onDidInstallExtensions).filter(a=>a.some(({operation:n})=>n===2)).map(a=>a.map(({identifier:n})=>n)).event;return f.Event.debounce(f.Event.any(f.Event.chain(f.Event.any(u,f.Event.map(r.onDidUninstallExtension,a=>[a.identifier]))).event,f.Event.map(p.onEnablementChanged,a=>a.map(n=>n.identifier))),(a,n)=>{a=a||[];for(const h of n)a.some(g=>!(0,C.areSameExtensions)(g,h))&&a.push(h);return a})}e.onExtensionChanged=i;async function S(l){const r=l.get(k.IExtensionManagementService),p=l.get(D.IWorkbenchExtensionEnablementService);return(await r.getInstalled()).map(a=>({identifier:a.identifier,local:a,globallyEnabled:p.isEnabled(a)}))}e.getInstalledExtensions=S;function s(l,r){const p=r.local.manifest.categories;return p&&p.indexOf("Keymaps")!==-1||l.getKeymapRecommendations().some(u=>(0,C.areSameExtensions)({id:u},r.local.identifier))}e.isKeymapExtension=s}),define(ne[615],re([1,0,1568,36,27,5,119,12,40,37,26,7,24,45,855,50,2149,879,60,9,23,87,467,95]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SaveExtensionHostProfileAction=e.StopExtensionHostProfileAction=e.StartExtensionHostProfileAction=e.RuntimeExtensionsEditor=e.ProfileSessionState=e.CONTEXT_EXTENSION_HOST_PROFILE_RECORDED=e.CONTEXT_PROFILE_SESSION_STATE=e.IExtensionHostProfileService=void 0,e.IExtensionHostProfileService=(0,A.createDecorator)("extensionHostProfileService"),e.CONTEXT_PROFILE_SESSION_STATE=new C.RawContextKey("profileSessionState","none"),e.CONTEXT_EXTENSION_HOST_PROFILE_RECORDED=new C.RawContextKey("extensionHostProfileRecorded",!1);var g;(function(y){y[y.None=0]="None",y[y.Starting=1]="Starting",y[y.Running=2]="Running",y[y.Stopping=3]="Stopping"})(g=e.ProfileSessionState||(e.ProfileSessionState={}));let d=class extends l.AbstractRuntimeExtensionsEditor{constructor(T,R,O,x,F,L,M,N,B,P,V,z,U){super(T,R,O,x,F,L,M,N,B,P,V,z);this._extensionHostProfileService=U,this._profileInfo=this._extensionHostProfileService.lastProfile,this._extensionsHostRecorded=e.CONTEXT_EXTENSION_HOST_PROFILE_RECORDED.bindTo(O),this._profileSessionState=e.CONTEXT_PROFILE_SESSION_STATE.bindTo(O),this._register(this._extensionHostProfileService.onDidChangeLastProfile(()=>{this._profileInfo=this._extensionHostProfileService.lastProfile,this._extensionsHostRecorded.set(!!this._profileInfo),this._updateExtensions()})),this._register(this._extensionHostProfileService.onDidChangeState(()=>{const H=this._extensionHostProfileService.state;this._profileSessionState.set(g[H].toLowerCase())}))}_getProfileInfo(){return this._profileInfo}_getUnresponsiveProfile(T){return this._extensionHostProfileService.getUnresponsiveProfile(T)}_createSlowExtensionAction(T){return T.unresponsiveProfile?this._instantiationService.createInstance(i.SlowExtensionAction,T.description,T.unresponsiveProfile):null}_createReportExtensionIssueAction(T){return T.marketplaceInfo?this._instantiationService.createInstance(s.ReportExtensionIssueAction,{description:T.description,marketplaceInfo:T.marketplaceInfo,status:T.status,unresponsiveProfile:T.unresponsiveProfile}):null}_createSaveExtensionHostProfileAction(){return this._instantiationService.createInstance(E,E.ID,E.LABEL)}_createProfileAction(){return this._extensionHostProfileService.state===g.Running?this._instantiationService.createInstance(b,b.ID,b.LABEL):this._instantiationService.createInstance(m,m.ID,m.LABEL)}};d=Ee([W(0,_.ITelemetryService),W(1,D.IThemeService),W(2,C.IContextKeyService),W(3,k.IExtensionsWorkbenchService),W(4,I.IExtensionService),W(5,v.INotificationService),W(6,w.IContextMenuService),W(7,A.IInstantiationService),W(8,o.IStorageService),W(9,c.ILabelService),W(10,S.IWorkbenchEnvironmentService),W(11,h.IClipboardService),W(12,e.IExtensionHostProfileService)],d),e.RuntimeExtensionsEditor=d;let m=class Mr extends f.Action{constructor(T=Mr.ID,R=Mr.LABEL,O){super(T,R);this._extensionHostProfileService=O}run(){return this._extensionHostProfileService.startProfiling(),Promise.resolve()}};m.ID="workbench.extensions.action.extensionHostProfile",m.LABEL=t.localize(0,null),m=Ee([W(2,e.IExtensionHostProfileService)],m),e.StartExtensionHostProfileAction=m;let b=class extends f.Action{constructor(T=m.ID,R=m.LABEL,O){super(T,R);this._extensionHostProfileService=O}run(){return this._extensionHostProfileService.stopProfiling(),Promise.resolve()}};b.ID="workbench.extensions.action.stopExtensionHostProfile",b.LABEL=t.localize(1,null),b=Ee([W(2,e.IExtensionHostProfileService)],b),e.StopExtensionHostProfileAction=b;let E=class Pr extends f.Action{constructor(T=Pr.ID,R=Pr.LABEL,O,x,F,L){super(T,R,void 0,!1);this._nativeHostService=O,this._environmentService=x,this._extensionHostProfileService=F,this._fileService=L,this._extensionHostProfileService.onDidChangeLastProfile(()=>{this.enabled=this._extensionHostProfileService.lastProfile!==null})}run(){return Promise.resolve(this._asyncRun())}async _asyncRun(){let T=await this._nativeHostService.showSaveDialog({title:"Save Extension Host Profile",buttonLabel:"Save",defaultPath:`CPU-${new Date().toISOString().replace(/[\-:]/g,"")}.cpuprofile`,filters:[{name:"CPU Profiles",extensions:["cpuprofile","txt"]}]});if(!T||!T.filePath||T.canceled)return;const R=this._extensionHostProfileService.lastProfile;let O=R?R.data:{},x=T.filePath;return this._environmentService.isBuilt&&(O=n.Utils.rewriteAbsolutePaths(O,"piiRemoved"),x=x+".txt"),this._fileService.writeFile(p.URI.file(x),r.VSBuffer.fromString(JSON.stringify(R?R.data:{},null," ")))}};E.LABEL=t.localize(2,null),E.ID="workbench.extensions.action.saveExtensionHostProfile",E=Ee([W(2,a.INativeHostService),W(3,S.IWorkbenchEnvironmentService),W(4,e.IExtensionHostProfileService),W(5,u.IFileService)],E),e.SaveExtensionHostProfileAction=E}),define(ne[2421],re([1,0,40,27,2,31,30,22,19,615,26,1565,21,485,107,5,855,870,121,23,60,11]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsAutoProfiler=void 0;let n=class extends _.Disposable{constructor(g,d,m,b,E,y,T,R,O){super();this._extensionService=g,this._extensionProfileService=d,this._telemetryService=m,this._logService=b,this._notificationService=E,this._editorService=y,this._instantiationService=T,this._environmentServie=R,this._fileService=O,this._blame=new Set,this._register(g.onDidChangeResponsiveChange(this._onDidChangeResponsiveChange,this))}async _onDidChangeResponsiveChange(g){if(g.extensionHostKind!==1)return;const d=await this._extensionService.getInspectPort(g.extensionHostId,!0);if(!!d){if(g.isResponsive&&this._session)this._session.cancel(),this._logService.info("UNRESPONSIVE extension host: received responsive event and cancelling profiling session");else if(!g.isResponsive&&!this._session){const m=new k.CancellationTokenSource;this._session=m;let b;try{b=await this._instantiationService.createInstance(l.ExtensionHostProfiler,d).start()}catch{this._session=void 0;return}this._logService.info("UNRESPONSIVE extension host: starting to profile NOW");try{await(0,a.timeout)(5e3,m.token)}catch{}try{this._processCpuProfile(await b.stop())}catch(E){(0,D.onUnexpectedError)(E)}finally{this._session=void 0}}}}async _processCpuProfile(g){let d=[];for(let x=0;x<g.ids.length;x++){let F=g.ids[x],L=g.deltas[x];d.push({id:F,total:L,percentage:0})}let m=0;d.sort((x,F)=>x.id.localeCompare(F.id));for(let x=1;x<d.length;x++)d[m].id===d[x].id?d[m].total+=d[x].total:(m+=1,d[m]=d[x]);d=d.slice(0,m+1);const b=g.endTime-g.startTime,E=b/100;let y;for(const x of d)x.percentage=Math.round(x.total/E),(!y||y.percentage<x.percentage)&&(y=x);if(!y)return;const T=await this._extensionService.getExtension(y.id);if(!T)return;const R=(0,I.joinPath)(this._environmentServie.tmpDir,`exthost-${Math.random().toString(16).slice(2,8)}.cpuprofile`);if(await this._fileService.writeFile(R,u.VSBuffer.fromString(JSON.stringify(g.data))),this._logService.warn(`UNRESPONSIVE extension host: '${y.id}' took ${y.percentage}% of ${b/1e3}ms, saved PROFILE here: '${R}'`,d),this._telemetryService.publicLog("exthostunresponsive",{duration:b,data:d}),this._extensionProfileService.setUnresponsiveProfile(T.identifier,g),!(y.percentage>=99&&y.total>=5e6))return;const O=await this._instantiationService.invokeFunction(s.createSlowExtensionAction,T,g);!O||this._blame.has(i.ExtensionIdentifier.toKey(T.identifier))||this._blame.size>=3||(this._blame.add(i.ExtensionIdentifier.toKey(T.identifier)),this._notificationService.prompt(v.Severity.Warning,(0,C.localize)(0,null,T.displayName||T.name),[{label:(0,C.localize)(1,null),run:()=>this._editorService.openEditor(c.RuntimeExtensionsInput.instance,{pinned:!0})},O],{silent:!0}))}};n=Ee([W(0,t.IExtensionService),W(1,w.IExtensionHostProfileService),W(2,f.ITelemetryService),W(3,A.ILogService),W(4,v.INotificationService),W(5,o.IEditorService),W(6,S.IInstantiationService),W(7,r.INativeWorkbenchEnvironmentService),W(8,p.IFileService)],n),e.ExtensionsAutoProfiler=n}),define(ne[2422],re([1,0,39,58,1596,7,53,30,5,403,20,27,107,17,57,47,40,2,8,26,42,115,553,54,62]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let d=class Xt extends l.Disposable{constructor(y,T,R,O,x,F,L){super();this._extensionService=y,this._extensionEnablementService=T,this._configService=R,this._notificationService=O,this._dialogService=x,this._quickInputService=F,this._languageService=L,this._register(this._extensionService.onDidChangeExtensions(this._updateConfigValues,this)),this._register(w.FormattingConflicts.setFormatterSelector((M,N,B)=>this._selectFormatter(M,N,B))),this._updateConfigValues()}async _updateConfigValues(){let y=await this._extensionService.getExtensions();y=y.sort((T,R)=>{let O=T.categories?.find(F=>F==="Formatters"||F==="Programming Languages"),x=R.categories?.find(F=>F==="Formatters"||F==="Programming Languages");return O&&!x?-1:!O&&x?1:T.name.localeCompare(R.name)}),Xt.extensionIds.length=0,Xt.extensionItemLabels.length=0,Xt.extensionDescriptions.length=0,Xt.extensionIds.push(null),Xt.extensionItemLabels.push(_.localize(0,null)),Xt.extensionDescriptions.push(_.localize(1,null));for(const T of y)(T.main||T.browser)&&(Xt.extensionIds.push(T.identifier.value),Xt.extensionItemLabels.push(T.displayName??""),Xt.extensionDescriptions.push(T.description??""))}static _maybeQuotes(y){return y.match(/\s/)?`'${y}'`:y}async _selectFormatter(y,T,R){const O=this._configService.getValue(Xt.configName,{resource:T.uri,overrideIdentifier:T.getLanguageId()});if(O){const L=y.find(N=>o.ExtensionIdentifier.equals(N.extensionId,O));if(L)return L;const M=await this._extensionService.getExtension(O);if(M&&this._extensionEnablementService.isEnabled((0,s.toExtension)(M))){const N=this._languageService.getLanguageName(T.getLanguageId())||T.getLanguageId(),B=_.localize(2,null,M.displayName||M.name,N);if(R===2){this._notificationService.status(B,{hideAfter:4e3});return}else return(await this._dialogService.confirm({message:_.localize(3,null),detail:B,primaryButton:_.localize(4,null),secondaryButton:_.localize(5,null)})).confirmed?this._pickAndPersistDefaultFormatter(y,T):void 0}}else if(y.length===1)return y[0];const x=this._languageService.getLanguageName(T.getLanguageId())||T.getLanguageId(),F=O?_.localize(7,null,O):_.localize(6,null,Xt._maybeQuotes(x));if(R!==2){if((await this._dialogService.confirm({message:F,primaryButton:_.localize(8,null),secondaryButton:_.localize(9,null)})).confirmed)return this._pickAndPersistDefaultFormatter(y,T)}else this._notificationService.prompt(p.Severity.Info,F,[{label:_.localize(10,null),run:()=>this._pickAndPersistDefaultFormatter(y,T)}],{silent:!0})}async _pickAndPersistDefaultFormatter(y,T){const R=y.map((F,L)=>({index:L,label:F.displayName||(F.extensionId?F.extensionId.value:"?"),description:F.extensionId&&F.extensionId.value})),O=this._languageService.getLanguageName(T.getLanguageId())||T.getLanguageId(),x=await this._quickInputService.pick(R,{placeHolder:_.localize(11,null,Xt._maybeQuotes(O))});if(!(!x||!y[x.index].extensionId))return this._configService.updateValue(Xt.configName,y[x.index].extensionId.value,{resource:T.uri,overrideIdentifier:T.getLanguageId()}),y[x.index]}};d.configName="editor.defaultFormatter",d.extensionIds=[],d.extensionItemLabels=[],d.extensionDescriptions=[],d=Ee([W(0,s.IExtensionService),W(1,a.IWorkbenchExtensionEnablementService),W(2,r.IConfigurationService),W(3,p.INotificationService),W(4,h.IDialogService),W(5,k.IQuickInputService),W(6,u.ILanguageService)],d),c.Registry.as(S.Extensions.Workbench).registerWorkbenchContribution(d,3),c.Registry.as(i.Extensions.Configuration).registerConfiguration({...n.editorConfigurationBaseNode,properties:{[d.configName]:{description:_.localize(12,null),type:["string","null"],default:null,enum:d.extensionIds,enumItemLabels:d.extensionItemLabels,markdownEnumDescriptions:d.extensionDescriptions}}});function m(E,y,T,R){function O(x){return x.extensionId?o.ExtensionIdentifier.toKey(x.extensionId):"unknown"}E.publicLog("formatterpick",{mode:y,extensions:T.map(O),pick:R?O(R):"none"})}async function b(E,y,T){const R=E.get(k.IQuickInputService),O=E.get(r.IConfigurationService),x=E.get(u.ILanguageService),F={resource:y.uri,overrideIdentifier:y.getLanguageId()},L=O.getValue(d.configName,F);let M;const N=T.map((V,z)=>{const U=o.ExtensionIdentifier.equals(V.extensionId,L),H={index:z,label:V.displayName||"",description:U?_.localize(13,null):void 0};return U&&(M=H),H}),B={label:_.localize(14,null)},P=await R.pick([...N,{type:"separator"},B],{placeHolder:_.localize(15,null),activeItem:M});if(P)if(P===B){const V=x.getLanguageName(y.getLanguageId())||y.getLanguageId(),z=await R.pick(N,{placeHolder:_.localize(16,null,d._maybeQuotes(V))});z&&T[z.index].extensionId&&O.updateValue(d.configName,T[z.index].extensionId.value,F);return}else return P.index;else return}(0,t.registerEditorAction)(class extends t.EditorAction{constructor(){super({id:"editor.action.formatDocument.multiple",label:_.localize(17,null),alias:"Format Document...",precondition:A.ContextKeyExpr.and(f.EditorContextKeys.writable,f.EditorContextKeys.hasMultipleDocumentFormattingProvider),contextMenuOpts:{group:"1_modification",order:1.3}})}async run(y,T,R){if(!T.hasModel())return;const O=y.get(I.IInstantiationService),x=y.get(C.ITelemetryService),F=y.get(g.ILanguageFeaturesService),L=T.getModel(),M=(0,w.getRealAndSyntheticDocumentFormattersOrdered)(F.documentFormattingEditProvider,F.documentRangeFormattingEditProvider,L),N=await O.invokeFunction(b,L,M);typeof N=="number"&&await O.invokeFunction(w.formatDocumentWithProvider,M[N],T,1,D.CancellationToken.None),m(x,"document",M,typeof N=="number"&&M[N]||void 0)}}),(0,t.registerEditorAction)(class extends t.EditorAction{constructor(){super({id:"editor.action.formatSelection.multiple",label:_.localize(18,null),alias:"Format Code...",precondition:A.ContextKeyExpr.and(A.ContextKeyExpr.and(f.EditorContextKeys.writable),f.EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider),contextMenuOpts:{when:A.ContextKeyExpr.and(f.EditorContextKeys.hasNonEmptySelection),group:"1_modification",order:1.31}})}async run(y,T){if(!T.hasModel())return;const R=y.get(I.IInstantiationService),O=y.get(g.ILanguageFeaturesService),x=y.get(C.ITelemetryService),F=T.getModel();let L=T.getSelection();L.isEmpty()&&(L=new v.Range(L.startLineNumber,1,L.startLineNumber,F.getLineMaxColumn(L.startLineNumber)));const M=O.documentRangeFormattingEditProvider.ordered(F),N=await R.invokeFunction(b,F,M);typeof N=="number"&&await R.invokeFunction(w.formatDocumentRangesWithProvider,M[N],T,L,D.CancellationToken.None),m(x,"range",M,typeof N=="number"&&M[N]||void 0)}})}),define(ne[2423],re([1,0,1603,16,70,612]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReportPerformanceIssueUsingReporterAction=e.OpenProcessExplorer=void 0;class k extends f.Action2{constructor(){super({id:k.ID,title:{value:(0,t.localize)(0,null),original:"Open Process Explorer"},category:_.CATEGORIES.Developer,f1:!0})}async run(w){return w.get(A.IWorkbenchIssueService).openProcessExplorer()}}e.OpenProcessExplorer=k,k.ID="workbench.action.openProcessExplorer";class D extends f.Action2{constructor(){super({id:D.ID,title:{value:(0,t.localize)(1,null),original:"Report Performance Issue"},category:_.CATEGORIES.Help,f1:!0})}async run(w){return w.get(A.IWorkbenchIssueService).openReporter({issueType:1})}}e.ReportPerformanceIssueUsingReporterAction=D,D.ID="workbench.action.reportPerformanceIssueUsingReporter"}),define(ne[2424],re([1,0,1602,310,16,70,2423,35,612,872,28,735,2153]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";if(Object.defineProperty(e,"__esModule",{value:!0}),f.default.reportIssueUrl){(0,_.registerAction2)(k.ReportPerformanceIssueUsingReporterAction),v.CommandsRegistry.registerCommand(o.OpenIssueReporterActionId,function(i,S){const s=Array.isArray(S)?{extensionId:S[0]}:S||{};return i.get(I.IWorkbenchIssueService).openReporter(s)}),v.CommandsRegistry.registerCommand({id:o.OpenIssueReporterApiCommandId,handler:function(i,S){const s=Array.isArray(S)?{extensionId:S[0]}:S||{};return i.get(I.IWorkbenchIssueService).openReporter(s)},description:{description:"Open the issue reporter and optionally prefill part of the form.",args:[{name:"options",description:"Data to use to prefill the issue reporter with.",isOptional:!0,schema:{oneOf:[{type:"string",description:"The extension id to preselect."},{type:"object",properties:{extensionId:{type:"string"},issueTitle:{type:"string"},issueBody:{type:"string"}}}]}}]}});const c={id:o.OpenIssueReporterActionId,title:{value:(0,t.localize)(0,null),original:"Report Issue..."},category:A.CATEGORIES.Help};_.MenuRegistry.appendMenuItem(_.MenuId.CommandPalette,{command:c}),_.MenuRegistry.appendMenuItem(_.MenuId.MenubarHelpMenu,{group:"3_feedback",command:{id:o.OpenIssueReporterActionId,title:(0,t.localize)(1,null)},order:3})}_.MenuRegistry.appendMenuItem(_.MenuId.MenubarHelpMenu,{group:"5_tools",command:{id:"workbench.action.openProcessExplorer",title:(0,t.localize)(2,null)},order:2}),(0,_.registerAction2)(k.OpenProcessExplorer),(0,D.registerSingleton)(I.IWorkbenchIssueService,w.WorkbenchIssueService,!0),v.CommandsRegistry.registerCommand("_issues.getSystemStatus",c=>c.get(C.IIssueService).getSystemStatus())}),define(ne[2425],re([1,0,1604,16,38,70,413,201]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class I extends f.Action2{constructor(){super({id:"workbench.action.toggleKeybindingsLog",title:{value:t.localize(0,null),original:"Toggle Keyboard Shortcuts Troubleshooting"},category:A.CATEGORIES.Developer,f1:!0})}run(v){v.get(_.IKeybindingService).toggleLogging()&&v.get(D.IOutputService).showChannel(k.rendererLogChannelId)}}(0,f.registerAction2)(I)}),define(ne[2426],re([1,0,7,71,17,47]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListContext=e.WorkbenchListAutomaticKeyboardNavigation=e.WorkbenchListSupportsKeyboardNavigation=void 0,e.WorkbenchListSupportsKeyboardNavigation=new t.RawContextKey("listSupportsKeyboardNavigation",!0),e.WorkbenchListAutomaticKeyboardNavigation=new t.RawContextKey(f.WorkbenchListAutomaticKeyboardNavigationKey,!0);let k=class{constructor(I){e.WorkbenchListSupportsKeyboardNavigation.bindTo(I),e.WorkbenchListAutomaticKeyboardNavigation.bindTo(I)}};k=Ee([W(0,t.IContextKeyService)],k),e.ListContext=k,_.Registry.as(A.Extensions.Workbench).registerWorkbenchContribution(k,1)}),define(ne[2427],re([1,0,2,23,19,50,9,76,11]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LogsDataCleaner=void 0;let w=class extends t.Disposable{constructor(C,o,c){super();this.environmentService=C,this.fileService=o,this.lifecycleService=c,this.cleanUpOldLogsSoon()}cleanUpOldLogsSoon(){let C=setTimeout(async()=>{C=void 0;const o=k.URI.file(this.environmentService.logsPath).with({scheme:this.environmentService.logFile.scheme}),c=await this.fileService.resolve((0,_.dirname)(o));if(c.children){const i=(0,_.basename)(o),s=c.children.filter(r=>r.isDirectory&&/^\d{8}T\d{6}$/.test(r.name)).sort().filter((r,p)=>r.name!==i),l=s.slice(0,Math.max(0,s.length-49));I.Promises.settled(l.map(r=>this.fileService.del(r.resource,{recursive:!0})))}},10*1e3);this.lifecycleService.onWillShutdown(()=>{C&&(clearTimeout(C),C=void 0)})}};w=Ee([W(0,A.IWorkbenchEnvironmentService),W(1,f.IFileService),W(2,D.ILifecycleService)],w),e.LogsDataCleaner=w}),define(ne[2428],re([1,0,17,70,16,2298]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const k=t.Registry.as(f.Extensions.WorkbenchActions);k.registerWorkbenchAction(_.SyncActionDescriptor.from(A.OpenLogsFolderAction),"Developer: Open Logs Folder",f.CATEGORIES.Developer.value),k.registerWorkbenchAction(_.SyncActionDescriptor.from(A.OpenExtensionLogsFolderAction),"Developer: Open Extension Logs Folder",f.CATEGORIES.Developer.value)}),define(ne[2429],re([1,0,47,125,252,2,1618,17,32,8,57]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class C{constructor(i){this._markerService=i,this.label=(0,k.localize)(0,null),this.onDidChange=i.onMarkerChanged}provideDecorations(i){let S=this._markerService.read({resource:i,severities:f.MarkerSeverity.Error|f.MarkerSeverity.Warning}),s;for(const l of S)(!s||l.severity>s.severity)&&(s=l);if(!!s)return{weight:100*s.severity,bubble:!0,tooltip:S.length===1?(0,k.localize)(1,null):(0,k.localize)(2,null,S.length),letter:S.length<10?S.length.toString():"9+",color:s.severity===f.MarkerSeverity.Error?I.listErrorForeground:I.listWarningForeground}}}let o=class{constructor(i,S,s){this._markerService=i,this._decorationsService=S,this._configurationService=s,this._disposables=[this._configurationService.onDidChangeConfiguration(this._updateEnablement,this)],this._updateEnablement()}dispose(){(0,A.dispose)(this._provider),(0,A.dispose)(this._disposables)}_updateEnablement(){let i=this._configurationService.getValue("problems");if(i.decorations.enabled!==this._enabled)if(this._enabled=i.decorations.enabled,this._enabled){const S=new C(this._markerService);this._provider=this._decorationsService.registerDecorationsProvider(S)}else this._provider&&(this._enabled=i.decorations.enabled,this._provider.dispose())}};o=Ee([W(0,f.IMarkerService),W(1,_.IDecorationsService),W(2,w.IConfigurationService)],o),D.Registry.as(v.Extensions.Configuration).registerConfiguration({id:"problems",order:101,type:"object",properties:{"problems.decorations.enabled":{description:(0,k.localize)(3,null),type:"boolean",default:!0}}}),D.Registry.as(t.Extensions.Workbench).registerWorkbenchContribution(o,3)}),define(ne[2430],re([1,0,11,2,55,18,19,9,17,47,90,104,64,416,158,142,21]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let l=class extends f.Disposable{constructor(u,a,n){super();this._debugService=u,this._editorService=n;const h=new _.ResourceMap;this._register(a.onWillAddNotebookDocument(g=>{h.set(g.uri,g.onWillAddRemoveCells(d=>{const m=this._debugService.getModel();if(!!m.getBreakpoints().length&&d.rawEvent.kind===o.NotebookCellsChangeType.ModelChange)for(const b of d.rawEvent.changes){const[E,y]=b;if(y>0){const T=g.cells.slice(E,E+y);for(const R of T)m.getBreakpoints({uri:R.uri}).forEach(x=>this._debugService.removeBreakpoints(x.getId()))}}}))})),this._register(a.onWillRemoveNotebookDocument(g=>{this.updateBreakpoints(g),h.get(g.uri)?.dispose(),h.delete(g.uri)})),this._register(this._debugService.getModel().onDidChangeBreakpoints(g=>{const d=g?.added?.find(m=>"uri"in m&&m.uri.scheme===A.Schemas.vscodeNotebookCell);if(d){const m=o.CellUri.parse(d.uri);if(!m)return;const b=(0,C.getNotebookEditorFromEditorPane)(this._editorService.activeEditorPane);if(!b||!b.hasModel()||b.textModel.uri.toString()!==m.notebook.toString())return;const E=b.getCellByHandle(m.handle);if(!E)return;b.focusElement(E)}}))}updateBreakpoints(u){const a=this._debugService.getModel().getBreakpoints();if(!a.length||!u.cells.length)return;const n=new _.ResourceMap;u.cells.forEach((h,g)=>{n.set(h.uri,g)}),a.forEach(h=>{const g=n.get(h.uri);if(typeof g!="number")return;const d=o.CellUri.parse(h.uri)?.notebook;if(!d)return;const m=o.CellUri.generate(d,g);(0,k.isEqual)(m,h.uri)||(this._debugService.removeBreakpoints(h.getId()),this._debugService.addBreakpoints(m,[{column:h.column,condition:h.condition,enabled:h.enabled,hitCondition:h.hitCondition,logMessage:h.logMessage,lineNumber:h.lineNumber}]))})}};l=Ee([W(0,v.IDebugService),W(1,S.INotebookService),W(2,s.IEditorService)],l),I.Registry.as(w.Extensions.Workbench).registerWorkbenchContribution(l,3);let r=class extends f.Disposable{constructor(u,a){super();this._debugService=u,this._notebookExecutionStateService=a,this._pausedCells=new Set,this._register(u.getModel().onDidChangeCallStack(()=>{this.onDidChangeCallStack(!0),this._scheduler.schedule()})),this._scheduler=this._register(new t.RunOnceScheduler(()=>this.onDidChangeCallStack(!1),2e3))}async onDidChangeCallStack(u){const a=new Set;for(const n of this._debugService.getModel().getSessions())for(const h of n.getAllThreads()){let g=h.getCallStack();u&&!g.length&&(g=h.getStaleCallStack()),g.forEach(d=>{o.CellUri.parse(d.source.uri)&&(a.add(d.source.uri.toString()),this.editIsPaused(d.source.uri,!0))})}for(const n of this._pausedCells)a.has(n)||(this.editIsPaused(D.URI.parse(n),!1),this._pausedCells.delete(n));a.forEach(n=>this._pausedCells.add(n))}editIsPaused(u,a){if(o.CellUri.parse(u)){const h=this._notebookExecutionStateService.getCellExecution(u);h&&(h.isPaused!==a||!h.didPause)&&h.update([{editType:c.CellExecutionUpdateType.ExecutionState,didPause:!0,isPaused:a}])}}};r=Ee([W(0,v.IDebugService),W(1,i.INotebookExecutionStateService)],r),I.Registry.as(w.Extensions.Workbench).registerWorkbenchContribution(r,3)}),define(ne[2431],re([1,0,2,42,1625,5,17,47,104,357,64,142]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let o=class{constructor(S,s){this._notebookService=S,this._languageService=s,this.viewType="*"}async provideCellStatusBarItems(S,s,l){const p=this._notebookService.getNotebookTextModel(S)?.cells[s];if(!p)return;const u=p.cellKind===v.CellKind.Markup?"markdown":this._languageService.getLanguageIdByLanguageName(p.language)||p.language;return{items:[{text:this._languageService.getLanguageName(u)||u,command:I.CHANGE_CELL_LANGUAGE,tooltip:(0,_.localize)(0,null),alignment:2,priority:-Number.MAX_SAFE_INTEGER}]}}};o=Ee([W(0,C.INotebookService),W(1,f.ILanguageService)],o);let c=class extends t.Disposable{constructor(S,s){super();[o].forEach(r=>{this._register(s.registerCellStatusBarItemProvider(S.createInstance(r)))})}};c=Ee([W(0,A.IInstantiationService),W(1,w.INotebookCellStatusBarService)],c),k.Registry.as(D.Extensions.Workbench).registerWorkbenchContribution(c,3)}),define(ne[2432],re([1,0,1626,2,17,47,21,153,104,470,95,489,64,142,14,16,168,7,141,39,70,201,413,31]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookClipboardContribution=e.runCutCells=e.runCopyCells=e.runPasteCells=void 0;let g=!1;function d(){g=!g}function m(P,V){g&&P.info(`[NotebookClipboard]: ${V}`)}function b(P){const V=P.get(h.ILogService),z=P.get(k.IEditorService),U=(0,I.getNotebookEditorFromEditorPane)(z.activeEditorPane);if(!U){m(V,"[Revive Webview] No notebook editor found for active editor pane, bypass");return}if(!U.hasEditorFocus()){m(V,"[Revive Webview] Notebook editor is not focused, bypass");return}if(!U.hasWebviewFocus()){m(V,"[Revive Webview] Notebook editor backlayer webview is not focused, bypass");return}const H=U.getInnerWebview();return m(V,"[Revive Webview] Notebook editor backlayer webview is focused"),H}function E(P,V){const z=b(P);return z?(V(z),!0):!1}const y=105;p.UndoCommand.addImplementation(y,"notebook-webview",P=>E(P,V=>V.undo())),p.RedoCommand.addImplementation(y,"notebook-webview",P=>E(P,V=>V.redo())),w.CopyAction?.addImplementation(y,"notebook-webview",P=>E(P,V=>V.copy())),w.PasteAction?.addImplementation(y,"notebook-webview",P=>E(P,V=>V.paste())),w.CutAction?.addImplementation(y,"notebook-webview",P=>E(P,V=>V.cut()));function T(P,V,z){if(!P.hasModel())return!1;const U=P.textModel;if(P.isReadOnly)return!1;const H={kind:o.SelectionStateType.Index,focus:P.getFocus(),selections:P.getSelections()};if(V){const K=P.getCellIndex(V),G=typeof K=="number"?K+1:0;U.applyEdits([{editType:1,index:G,count:0,cells:z.items.map(q=>(0,C.cloneNotebookCellTextModel)(q))}],!0,H,()=>({kind:o.SelectionStateType.Index,focus:{start:G,end:G+1},selections:[{start:G,end:G+z.items.length}]}),void 0)}else{if(P.getLength()!==0)return!1;U.applyEdits([{editType:1,index:0,count:0,cells:z.items.map(K=>(0,C.cloneNotebookCellTextModel)(K))}],!0,H,()=>({kind:o.SelectionStateType.Index,focus:{start:0,end:1},selections:[{start:1,end:z.items.length+1}]}),void 0)}return!0}e.runPasteCells=T;function R(P,V,z){if(!V.hasModel())return!1;if(V.hasOutputTextSelection())return document.execCommand("copy"),!0;const U=P.get(v.IClipboardService),H=P.get(c.INotebookService),K=V.getSelections();if(z){const Z=V.getCellIndex(z);if(!K.find(X=>X.start<=Z&&Z<X.end))return U.writeText(z.getText()),H.setToCopy([z.model],!0),!0}const G=(0,I.expandCellRangesWithHiddenCells)(V,V.getSelections()),q=(0,I.cellRangeToViewCells)(V,G);return q.length?(U.writeText(q.map(Z=>Z.getText()).join(` `)),H.setToCopy(q.map(Z=>Z.model),!0),!0):!1}e.runCopyCells=R;function O(P,V,z){if(!V.hasModel()||V.isReadOnly)return!1;const U=V.textModel,H=P.get(v.IClipboardService),K=P.get(c.INotebookService),G=V.getSelections();if(z){const ee=V.getCellIndex(z);if(!G.find(se=>se.start<=ee&&ee<se.end)){H.writeText(z.getText());const se=V.getFocus(),ie=se.end<=ee?se:{start:se.start-1,end:se.end-1},ce=G.map(le=>le.end<=ee?le:{start:le.start-1,end:le.end-1});return U.applyEdits([{editType:1,index:ee,count:1,cells:[]}],!0,{kind:o.SelectionStateType.Index,focus:V.getFocus(),selections:G},()=>({kind:o.SelectionStateType.Index,focus:ie,selections:ce}),void 0,!0),K.setToCopy([z.model],!1),!0}}const q=V.getFocus();if(!G.find(ee=>ee.start<=q.start&&q.end<=ee.end)){const ee=V.cellAt(q.start);H.writeText(ee.getText());const te=q.end===V.getLength()?{start:q.start-1,end:q.end-1}:q,se=G.map(ie=>ie.end<=q.start?ie:{start:ie.start-1,end:ie.end-1});return U.applyEdits([{editType:1,index:q.start,count:1,cells:[]}],!0,{kind:o.SelectionStateType.Index,focus:V.getFocus(),selections:G},()=>({kind:o.SelectionStateType.Index,focus:te,selections:se}),void 0,!0),K.setToCopy([ee.model],!1),!0}const j=(0,I.expandCellRangesWithHiddenCells)(V,V.getSelections()),X=(0,I.cellRangeToViewCells)(V,j);if(!X.length)return!1;H.writeText(X.map(ee=>ee.getText()).join(` `));const Y=j.map(ee=>({editType:1,index:ee.start,count:ee.end-ee.start,cells:[]})),$=j[0].start,J=$<U.cells.length-1?$:Math.max(U.cells.length-2,0);return U.applyEdits(Y,!0,{kind:o.SelectionStateType.Index,focus:V.getFocus(),selections:j},()=>({kind:o.SelectionStateType.Index,focus:{start:J,end:J+1},selections:[{start:J,end:J+1}]}),void 0,!0),K.setToCopy(X.map(ee=>ee.model),!1),!0}e.runCutCells=O;let x=class extends f.Disposable{constructor(V){super();this._editorService=V;const z=105;w.CopyAction&&this._register(w.CopyAction.addImplementation(z,"notebook-clipboard",U=>this.runCopyAction(U))),w.PasteAction&&w.PasteAction.addImplementation(z,"notebook-clipboard",U=>this.runPasteAction(U)),w.CutAction&&w.CutAction.addImplementation(z,"notebook-clipboard",U=>this.runCutAction(U))}_getContext(){const V=(0,I.getNotebookEditorFromEditorPane)(this._editorService.activeEditorPane),z=V?.getActiveCell();return{editor:V,activeCell:z}}_focusInsideEmebedMonaco(V){const z=window.getSelection();if(z?.rangeCount!==1)return!1;const U=z.getRangeAt(0);if(U.startContainer===U.endContainer&&U.endOffset-U.startOffset==0)return!1;let H=U.commonAncestorContainer;const K=V.getDomNode();if(!K.contains(H))return!1;for(;H&&H!==K;){if(H.classList&&H.classList.contains("monaco-editor"))return!0;H=H.parentNode}return!1}runCopyAction(V){const z=V.get(h.ILogService),U=document.activeElement;if(U&&["input","textarea"].indexOf(U.tagName.toLowerCase())>=0)return m(z,"[NotebookEditor] focus is on input or textarea element, bypass"),!1;const{editor:H}=this._getContext();return H?this._focusInsideEmebedMonaco(H)?(m(z,"[NotebookEditor] focus is on embed monaco editor, bypass"),!1):(m(z,"[NotebookEditor] run copy actions on notebook model"),R(V,H,void 0)):(m(z,"[NotebookEditor] no active notebook editor, bypass"),!1)}runPasteAction(V){const z=document.activeElement;if(z&&["input","textarea"].indexOf(z.tagName.toLowerCase())>=0)return!1;const H=V.get(c.INotebookService).getToCopy();if(!H)return!1;const{editor:K,activeCell:G}=this._getContext();return K?T(K,G,H):!1}runCutAction(V){const z=document.activeElement;if(z&&["input","textarea"].indexOf(z.tagName.toLowerCase())>=0)return!1;const{editor:U}=this._getContext();return U?O(V,U,void 0):!1}};x=Ee([W(0,k.IEditorService)],x),e.NotebookClipboardContribution=x,_.Registry.as(A.Extensions.Workbench).registerWorkbenchContribution(x,2);const L="notebook.cell.copy",M="notebook.cell.cut",N="notebook.cell.paste",B="notebook.cell.pasteAbove";(0,S.registerAction2)(class extends s.NotebookCellAction{constructor(){super({id:L,title:(0,t.localize)(0,null),menu:{id:S.MenuId.NotebookCellTitle,when:D.NOTEBOOK_EDITOR_FOCUSED,group:"1_copy"},keybinding:i.isNative?void 0:{primary:2048|33,win:{primary:2048|33,secondary:[2048|19]},when:l.ContextKeyExpr.and(D.NOTEBOOK_EDITOR_FOCUSED,l.ContextKeyExpr.not(r.InputFocusedContextKey)),weight:200}})}async runWithContext(P,V){R(P,V.notebookEditor,V.cell)}}),(0,S.registerAction2)(class extends s.NotebookCellAction{constructor(){super({id:M,title:(0,t.localize)(1,null),menu:{id:S.MenuId.NotebookCellTitle,when:l.ContextKeyExpr.and(D.NOTEBOOK_EDITOR_FOCUSED,D.NOTEBOOK_EDITOR_EDITABLE,D.NOTEBOOK_CELL_EDITABLE),group:"1_copy"},keybinding:i.isNative?void 0:{when:l.ContextKeyExpr.and(D.NOTEBOOK_EDITOR_FOCUSED,l.ContextKeyExpr.not(r.InputFocusedContextKey)),primary:2048|54,win:{primary:2048|54,secondary:[1024|20]},weight:200}})}async runWithContext(P,V){O(P,V.notebookEditor,V.cell)}}),(0,S.registerAction2)(class extends s.NotebookAction{constructor(){super({id:N,title:(0,t.localize)(2,null),menu:{id:S.MenuId.NotebookCellTitle,when:l.ContextKeyExpr.and(D.NOTEBOOK_EDITOR_FOCUSED,D.NOTEBOOK_EDITOR_EDITABLE),group:"1_copy"},keybinding:i.isNative?void 0:{when:l.ContextKeyExpr.and(D.NOTEBOOK_EDITOR_FOCUSED,l.ContextKeyExpr.not(r.InputFocusedContextKey)),primary:2048|52,win:{primary:2048|52,secondary:[1024|19]},linux:{primary:2048|52,secondary:[1024|19]},weight:100}})}async runWithContext(P,V){const U=P.get(c.INotebookService).getToCopy();!V.notebookEditor.hasModel()||V.notebookEditor.isReadOnly||!U||T(V.notebookEditor,V.cell,U)}}),(0,S.registerAction2)(class extends s.NotebookCellAction{constructor(){super({id:B,title:(0,t.localize)(3,null),keybinding:{when:l.ContextKeyExpr.and(D.NOTEBOOK_EDITOR_FOCUSED,l.ContextKeyExpr.not(r.InputFocusedContextKey)),primary:2048|1024|52,weight:s.NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT}})}async runWithContext(P,V){const U=P.get(c.INotebookService).getToCopy(),H=V.notebookEditor,K=H.textModel;if(H.isReadOnly||!U)return;const G={kind:o.SelectionStateType.Index,focus:H.getFocus(),selections:H.getSelections()},q=V.notebookEditor.getCellIndex(V.cell),Z=q;K.applyEdits([{editType:1,index:q,count:0,cells:U.items.map(j=>(0,C.cloneNotebookCellTextModel)(j))}],!0,G,()=>({kind:o.SelectionStateType.Index,focus:{start:Z,end:Z+1},selections:[{start:Z,end:Z+U.items.length}]}),void 0,!0)}}),(0,S.registerAction2)(class extends S.Action2{constructor(){super({id:"workbench.action.toggleNotebookClipboardLog",title:{value:(0,t.localize)(4,null),original:"Toggle Notebook Clipboard Troubleshooting"},category:u.CATEGORIES.Developer,f1:!0})}run(P){d(),g&&P.get(a.IOutputService).showChannel(n.rendererLogChannelId)}})}),define(ne[2433],re([1,0,2,1631,16,28,8,7,17,24,70,47,214,153,64,232,21]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookGettingStarted=void 0;const l="hasOpenedNotebook",r="hasShownNotebookGettingStarted";let p=class extends t.Disposable{constructor(a,n,h,g,d){super();const m=c.HAS_OPENED_NOTEBOOK.bindTo(h),b=new o.Memento("notebookGettingStarted2",n),E=b.getMemento(0,0);E[l]&&m.set(!0);const y=d.getValue(i.NotebookSetting.openGettingStarted)&&!E[r];if(!E[l]||y){const T=()=>{m.set(!0),E[l]=!0,y&&(g.executeCommand("workbench.action.openWalkthrough",{category:"notebooks",step:"notebookProfile"},!0),E[r]=!0),b.saveMemento()};if(a.activeEditor?.typeId===S.NotebookEditorInput.ID){T();return}const R=this._register(a.onDidActiveEditorChange(()=>{a.activeEditor?.typeId===S.NotebookEditorInput.ID&&(R.dispose(),T())}))}}};p=Ee([W(0,s.IEditorService),W(1,w.IStorageService),W(2,D.IContextKeyService),W(3,A.ICommandService),W(4,k.IConfigurationService)],p),e.NotebookGettingStarted=p,I.Registry.as(C.Extensions.Workbench).registerWorkbenchContribution(p,3),(0,_.registerAction2)(class extends _.Action2{constructor(){super({id:"workbench.notebook.layout.gettingStarted",title:(0,f.localize)(0,null),f1:!0,precondition:D.ContextKeyExpr.equals(`config.${i.NotebookSetting.openGettingStarted}`,!0),category:v.CATEGORIES.Developer})}run(a){const n=a.get(w.IStorageService),h=new o.Memento("notebookGettingStarted",n),g=h.getMemento(0,0);g[l]=void 0,h.saveMemento()}})}),define(ne[2434],re([1,0,17,47,738,64,125,8]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let I=class{constructor(v,C,o){this._markerService=v,this._configService=o,this._dispoables=C.registerProvider(this)}dispose(){this._dispoables.dispose()}getMarkerList(v){if(!v)return;const C=A.CellUri.parse(v);if(!!C)return new _.MarkerList(o=>A.CellUri.parse(o)?.notebook.toString()===C.notebook.toString(),this._markerService,this._configService)}};I=Ee([W(0,k.IMarkerService),W(1,_.IMarkerNavigationService),W(2,D.IConfigurationService)],I),t.Registry.as(f.Extensions.Workbench).registerWorkbenchContribution(I,2)}),define(ne[2435],re([1,0,2,17,1635,16,8,64,295,47]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookProfileContribution=e.NotebookProfileType=void 0;var v;(function(s){s.default="default",s.jupyter="jupyter",s.colab="colab"})(v=e.NotebookProfileType||(e.NotebookProfileType={}));const C={[v.default]:{[D.NotebookSetting.focusIndicator]:"gutter",[D.NotebookSetting.insertToolbarLocation]:"both",[D.NotebookSetting.globalToolbar]:!0,[D.NotebookSetting.cellToolbarLocation]:{default:"right"},[D.NotebookSetting.compactView]:!0,[D.NotebookSetting.showCellStatusBar]:"visible",[D.NotebookSetting.consolidatedRunButton]:!0,[D.NotebookSetting.undoRedoPerCell]:!1},[v.jupyter]:{[D.NotebookSetting.focusIndicator]:"gutter",[D.NotebookSetting.insertToolbarLocation]:"notebookToolbar",[D.NotebookSetting.globalToolbar]:!0,[D.NotebookSetting.cellToolbarLocation]:{default:"left"},[D.NotebookSetting.compactView]:!0,[D.NotebookSetting.showCellStatusBar]:"visible",[D.NotebookSetting.consolidatedRunButton]:!1,[D.NotebookSetting.undoRedoPerCell]:!0},[v.colab]:{[D.NotebookSetting.focusIndicator]:"border",[D.NotebookSetting.insertToolbarLocation]:"betweenCells",[D.NotebookSetting.globalToolbar]:!1,[D.NotebookSetting.cellToolbarLocation]:{default:"right"},[D.NotebookSetting.compactView]:!1,[D.NotebookSetting.showCellStatusBar]:"hidden",[D.NotebookSetting.consolidatedRunButton]:!0,[D.NotebookSetting.undoRedoPerCell]:!1}};async function o(s,l){const r=[];for(const p in l)r.push(s.updateValue(p,l[p]));await Promise.all(r)}(0,A.registerAction2)(class extends A.Action2{constructor(){super({id:"notebook.setProfile",title:(0,_.localize)(0,null)})}async run(s,l){if(!c(l))return;const r=s.get(k.IConfigurationService);return o(r,C[l.profile])}});function c(s){const l=s;return l.profile===v.colab||l.profile===v.default||l.profile===v.jupyter}let i=class extends t.Disposable{constructor(l,r){super();this.experimentService=r,this.experimentService&&this.experimentService.getTreatment("notebookprofile").then(p=>{if(p!==void 0){const u=l.getValue(D.NotebookSetting.focusIndicator),a=l.getValue(D.NotebookSetting.insertToolbarLocation),n=l.getValue(D.NotebookSetting.globalToolbar),h=l.getValue(D.NotebookSetting.compactView),g=l.getValue(D.NotebookSetting.showCellStatusBar),d=l.getValue(D.NotebookSetting.consolidatedRunButton);u==="border"&&a==="both"&&n===!1&&h===!0&&g==="visible"&&d===!0&&o(l,C[p]??C[v.default])}})}};i=Ee([W(0,k.IConfigurationService),W(1,I.IWorkbenchAssignmentService)],i),e.NotebookProfileContribution=i,f.Registry.as(w.Extensions.Workbench).registerWorkbenchContribution(i,2)}),define(ne[2436],re([1,0,2,16,70,104,267,142,21]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TroubleshootController=void 0;class w extends t.Disposable{constructor(C){super();this._notebookEditor=C,this._localStore=this._register(new t.DisposableStore),this._cellStateListeners=[],this._logging=!1,this._register(this._notebookEditor.onDidChangeModel(()=>{this._localStore.clear(),this._cellStateListeners.forEach(o=>o.dispose()),!!this._notebookEditor.hasModel()&&this._updateListener()})),this._updateListener()}toggleLogging(){this._logging=!this._logging}_log(C,o){if(this._logging){const c=this._notebookEditor.getViewHeight(C);console.log(`cell#${C.handle}`,o,`${c} -> ${C.layoutInfo.totalHeight}`)}}_updateListener(){if(!!this._notebookEditor.hasModel()){for(let C=0;C<this._notebookEditor.getLength();C++){const o=this._notebookEditor.cellAt(C);this._cellStateListeners.push(o.onDidChangeLayout(c=>{this._log(o,c)}))}this._localStore.add(this._notebookEditor.onDidChangeViewCells(C=>{C.splices.reverse().forEach(o=>{const[c,i,S]=o,s=this._cellStateListeners.splice(c,i,...S.map(l=>l.onDidChangeLayout(r=>{this._log(l,r)})));(0,t.dispose)(s)})}))}}dispose(){(0,t.dispose)(this._cellStateListeners),super.dispose()}}e.TroubleshootController=w,w.id="workbench.notebook.troubleshoot",(0,k.registerNotebookContribution)(w.id,w),(0,f.registerAction2)(class extends f.Action2{constructor(){super({id:"notebook.toggleLayoutTroubleshoot",title:"Toggle Notebook Layout Troubleshoot",category:_.CATEGORIES.Developer,f1:!0})}async run(v){const C=v.get(I.IEditorService),o=(0,A.getNotebookEditorFromEditorPane)(C.activeEditorPane);if(!o)return;o.getContribution(w.id)?.toggleLogging()}}),(0,f.registerAction2)(class extends f.Action2{constructor(){super({id:"notebook.inspectLayout",title:"Inspect Notebook Layout",category:_.CATEGORIES.Developer,f1:!0})}async run(v){const C=v.get(I.IEditorService),o=(0,A.getNotebookEditorFromEditorPane)(C.activeEditorPane);if(!(!o||!o.hasModel()))for(let c=0;c<o.getLength();c++){const i=o.cellAt(c);console.log(`cell#${i.handle}`,i.layoutInfo)}}}),(0,f.registerAction2)(class extends f.Action2{constructor(){super({id:"notebook.clearNotebookEdtitorTypeCache",title:"Clear Notebook Editor Cache",category:_.CATEGORIES.Developer,f1:!0})}async run(v){v.get(D.INotebookService).clearEditorCache()}})}),define(ne[2437],re([1,0,2,17,47,64,21,104,39]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let w=class extends t.Disposable{constructor(o){super();this._editorService=o;const c=105;this._register(I.UndoCommand.addImplementation(c,"notebook-undo-redo",()=>{const i=(0,D.getNotebookEditorFromEditorPane)(this._editorService.activeEditorPane),S=i?._getViewModel();return i&&i.hasModel()&&S?S.undo().then(s=>{if(s?.length){for(let l=0;l<i.getLength();l++){const r=i.cellAt(l);r.cellKind===A.CellKind.Markup&&s.find(p=>p.fragment===r.model.uri.fragment)&&r.updateEditState(D.CellEditState.Editing,"undo")}i?.setOptions({cellOptions:{resource:s[0]},preserveFocus:!0})}}):!1})),this._register(I.RedoCommand.addImplementation(c,"notebook-undo-redo",()=>{const i=(0,D.getNotebookEditorFromEditorPane)(this._editorService.activeEditorPane),S=i?._getViewModel();return i&&i.hasModel()&&S?S.redo().then(s=>{if(s?.length){for(let l=0;l<i.getLength();l++){const r=i.cellAt(l);r.cellKind===A.CellKind.Markup&&s.find(p=>p.fragment===r.model.uri.fragment)&&r.updateEditState(D.CellEditState.Editing,"redo")}i?.setOptions({cellOptions:{resource:s[0]},preserveFocus:!0})}}):!1}))}};w=Ee([W(0,k.IEditorService)],w),f.Registry.as(_.Extensions.Workbench).registerWorkbenchContribution(w,2)}),define(ne[2438],re([1,0,22,6,2,1651,5,26,880,115,76,79,100,24,214,15]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isNotebookKeymapExtension=e.NotebookKeymapService=void 0;function s(u){const a=u.get(C.IExtensionManagementService),n=u.get(w.IWorkbenchExtensionEnablementService),h=f.Event.chain(a.onDidInstallExtensions).filter(g=>g.some(({operation:d})=>d===2)).map(g=>g.map(({identifier:d})=>d)).event;return f.Event.debounce(f.Event.any(f.Event.chain(f.Event.any(h,f.Event.map(a.onDidUninstallExtension,g=>[g.identifier]))).event,f.Event.map(n.onEnablementChanged,g=>g.map(d=>d.identifier))),(g,d)=>{g=g||(d.length?[d[0]]:[]);for(const m of d)g.some(b=>!(0,o.areSameExtensions)(b,m))&&g.push(m);return g})}const l="hasRecommendedKeymap";let r=class extends _.Disposable{constructor(a,n,h,g,d){super();this.instantiationService=a,this.extensionEnablementService=n,this.notificationService=h,this.notebookKeymapMemento=new i.Memento("notebookKeymap",g),this.notebookKeymap=this.notebookKeymapMemento.getMemento(0,0),this._register(d.onDidShutdown(()=>this.dispose())),this._register(this.instantiationService.invokeFunction(s)(m=>{Promise.all(m.map(b=>this.checkForOtherKeymaps(b))).then(void 0,t.onUnexpectedError)}))}checkForOtherKeymaps(a){return this.instantiationService.invokeFunction(I.getInstalledExtensions).then(n=>{const h=n.filter(d=>p(d)),g=h.find(d=>(0,o.areSameExtensions)(d.identifier,a));if(g&&g.globallyEnabled){this.notebookKeymap[l]=!0,this.notebookKeymapMemento.saveMemento();const d=h.filter(m=>!(0,o.areSameExtensions)(m.identifier,a)&&m.globallyEnabled);if(d.length)return this.promptForDisablingOtherKeymaps(g,d)}})}promptForDisablingOtherKeymaps(a,n){const h=g=>{g&&this.extensionEnablementService.setEnablement(n.map(d=>d.local),6)};this.notificationService.prompt(D.Severity.Info,(0,A.localize)(0,null,(0,S.distinct)(n.map(g=>g.local.manifest.displayName)).map(g=>`'${g}'`).join(", ")),[{label:(0,A.localize)(1,null),run:()=>h(!0)},{label:(0,A.localize)(2,null),run:()=>h(!1)}])}};r=Ee([W(0,k.IInstantiationService),W(1,w.IWorkbenchExtensionEnablementService),W(2,D.INotificationService),W(3,c.IStorageService),W(4,v.ILifecycleService)],r),e.NotebookKeymapService=r;function p(u){if(u.local.manifest.extensionPack)return!1;const a=u.local.manifest.keywords;return a?a.indexOf("notebook-keymap")!==-1:!1}e.isNotebookKeymapExtension=p}),define(ne[881],re([1,0,6,2,169,20,345,614,104]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseCellViewModel=void 0;class w extends f.Disposable{constructor(C,o,c,i,S,s,l,r){super();this.viewType=C,this.model=o,this.id=c,this._viewContext=i,this._configurationService=S,this._modelService=s,this._undoRedoService=l,this._codeEditorService=r,this._onDidChangeEditorAttachState=this._register(new t.Emitter),this.onDidChangeEditorAttachState=this._onDidChangeEditorAttachState.event,this._onDidChangeState=this._register(new t.Emitter),this.onDidChangeState=this._onDidChangeState.event,this._editState=I.CellEditState.Preview,this._lineNumbers="inherit",this._focusMode=I.CellFocusMode.Container,this._editorListeners=[],this._editorViewStates=null,this._editorTransientState=null,this._resolvedCellDecorations=new Map,this._cellDecorationsChanged=this._register(new t.Emitter),this.onCellDecorationsChanged=this._cellDecorationsChanged.event,this._resolvedDecorations=new Map,this._lastDecorationId=0,this._cellStatusBarItems=new Map,this._onDidChangeCellStatusBarItems=this._register(new t.Emitter),this.onDidChangeCellStatusBarItems=this._onDidChangeCellStatusBarItems.event,this._lastStatusBarId=0,this._dragging=!1,this._inputCollapsed=!1,this._outputCollapsed=!1,this._editStateSource="",this._register(o.onDidChangeMetadata(()=>{this._onDidChangeState.fire({metadataChanged:!0})})),this._register(o.onDidChangeInternalMetadata(p=>{this._onDidChangeState.fire({internalMetadataChanged:!0}),p.lastRunSuccessChanged&&this.layoutChange({})})),this._register(this._configurationService.onDidChangeConfiguration(p=>{p.affectsConfiguration("notebook.lineNumbers")&&(this.lineNumbers="inherit")})),this.model.collapseState?.inputCollapsed&&(this._inputCollapsed=!0),this.model.collapseState?.outputCollapsed&&(this._outputCollapsed=!0)}get handle(){return this.model.handle}get uri(){return this.model.uri}get lineCount(){return this.model.textBuffer.getLineCount()}get metadata(){return this.model.metadata}get internalMetadata(){return this.model.internalMetadata}get language(){return this.model.language}get mime(){if(typeof this.model.mime=="string")return this.model.mime;switch(this.language){case"markdown":return _.Mimes.markdown;default:return _.Mimes.text}}get lineNumbers(){return this._lineNumbers}set lineNumbers(C){C!==this._lineNumbers&&(this._lineNumbers=C,this._onDidChangeState.fire({cellLineNumberChanged:!0}))}get focusMode(){return this._focusMode}set focusMode(C){this._focusMode!==C&&(this._focusMode=C,this._onDidChangeState.fire({focusModeChanged:!0}))}get editorAttached(){return!!this._textEditor}get textModel(){return this.model.textModel}hasModel(){return!!this.textModel}get dragging(){return this._dragging}set dragging(C){this._dragging=C,this._onDidChangeState.fire({dragStateChanged:!0})}get isInputCollapsed(){return this._inputCollapsed}set isInputCollapsed(C){this._inputCollapsed=C,this._onDidChangeState.fire({inputCollapsedChanged:!0})}get isOutputCollapsed(){return this._outputCollapsed}set isOutputCollapsed(C){this._outputCollapsed=C,this._onDidChangeState.fire({outputCollapsedChanged:!0})}assertTextModelAttached(){return!!(this.textModel&&this._textEditor&&this._textEditor.getModel()===this.textModel)}attachTextEditor(C){if(!C.hasModel())throw new Error("Invalid editor: model is missing");if(this._textEditor===C){this._editorListeners.length===0&&(this._editorListeners.push(this._textEditor.onDidChangeCursorSelection(()=>{this._onDidChangeState.fire({selectionChanged:!0})})),this._onDidChangeState.fire({selectionChanged:!0}));return}this._textEditor=C,this._editorViewStates&&this._restoreViewState(this._editorViewStates),this._editorTransientState&&(0,D.writeTransientState)(C.getModel(),this._editorTransientState,this._codeEditorService),this._resolvedDecorations.forEach((o,c)=>{if(c.startsWith("_lazy_")){const i=this._textEditor.deltaDecorations([],[o.options]);this._resolvedDecorations.get(c).id=i[0]}else{const i=this._textEditor.deltaDecorations([],[o.options]);this._resolvedDecorations.get(c).id=i[0]}}),this._editorListeners.push(this._textEditor.onDidChangeCursorSelection(()=>{this._onDidChangeState.fire({selectionChanged:!0})})),this._onDidChangeState.fire({selectionChanged:!0}),this._onDidChangeEditorAttachState.fire()}detachTextEditor(){this.saveViewState(),this.saveTransientState(),this._resolvedDecorations.forEach(C=>{const o=C.id;o&&this._textEditor?.deltaDecorations([o],[])}),this._textEditor=void 0,(0,f.dispose)(this._editorListeners),this._editorListeners=[],this._onDidChangeEditorAttachState.fire(),this._textModelRef&&(this._textModelRef.dispose(),this._textModelRef=void 0)}getText(){return this.model.getValue()}getTextLength(){return this.model.getTextLength()}saveViewState(){!this._textEditor||(this._editorViewStates=this._textEditor.saveViewState())}saveTransientState(){!this._textEditor||!this._textEditor.hasModel()||(this._editorTransientState=(0,D.readTransientState)(this._textEditor.getModel(),this._codeEditorService))}saveEditorViewState(){return this._textEditor&&(this._editorViewStates=this._textEditor.saveViewState()),this._editorViewStates}restoreEditorViewState(C,o){this._editorViewStates=C}_restoreViewState(C){C&&this._textEditor?.restoreViewState(C)}addModelDecoration(C){if(!this._textEditor){const c=++this._lastDecorationId,i=`_lazy_${this.id};${c}`;return this._resolvedDecorations.set(i,{options:C}),i}const o=this._textEditor.deltaDecorations([],[C]);return this._resolvedDecorations.set(o[0],{id:o[0],options:C}),o[0]}removeModelDecoration(C){const o=this._resolvedDecorations.get(C);this._textEditor&&o&&o.id!==void 0&&this._textEditor.deltaDecorations([o.id],[]),this._resolvedDecorations.delete(C)}deltaModelDecorations(C,o){return C.forEach(i=>{this.removeModelDecoration(i)}),o.map(i=>this.addModelDecoration(i))}_removeCellDecoration(C){const o=this._resolvedCellDecorations.get(C);o&&(this._cellDecorationsChanged.fire({added:[],removed:[o]}),this._resolvedCellDecorations.delete(C))}_addCellDecoration(C){const o=++this._lastDecorationId,c=`_cell_${this.id};${o}`;return this._resolvedCellDecorations.set(c,C),this._cellDecorationsChanged.fire({added:[C],removed:[]}),c}getCellDecorations(){return[...this._resolvedCellDecorations.values()]}getCellDecorationRange(C){return this._textEditor?this._textEditor.getModel()?.getDecorationRange(C)??null:null}deltaCellDecorations(C,o){return C.forEach(i=>{this._removeCellDecoration(i)}),o.map(i=>this._addCellDecoration(i))}deltaCellStatusBarItems(C,o){C.forEach(i=>{this._cellStatusBarItems.get(i)&&this._cellStatusBarItems.delete(i)});const c=o.map(i=>{const S=++this._lastStatusBarId,s=`_cell_${this.id};${S}`;return this._cellStatusBarItems.set(s,i),s});return this._onDidChangeCellStatusBarItems.fire(),c}getCellStatusBarItems(){return Array.from(this._cellStatusBarItems.values())}revealRangeInCenter(C){this._textEditor?.revealRangeInCenter(C,1)}setSelection(C){this._textEditor?.setSelection(C)}setSelections(C){C.length&&this._textEditor?.setSelections(C)}getSelections(){return this._textEditor?.getSelections()||[]}getSelectionsStartPosition(){return this._textEditor?this._textEditor.getSelections()?.map(o=>o.getStartPosition()):this._editorViewStates?.cursorState?.map(o=>o.selectionStart)}getLineScrollTopOffset(C){if(!this._textEditor)return 0;const o=this._viewContext.notebookOptions.computeEditorPadding(this.internalMetadata,this.uri);return this._textEditor.getTopForLineNumber(C)+o.top}getPositionScrollTopOffset(C,o){if(!this._textEditor)return 0;const c=this._viewContext.notebookOptions.computeEditorPadding(this.internalMetadata,this.uri);return this._textEditor.getTopForPosition(C,o)+c.top}cursorAtBoundary(){if(!this._textEditor||!this.textModel)return I.CursorAtBoundary.None;const C=this._textEditor.getSelection();if(!C||!C.isEmpty())return I.CursorAtBoundary.None;const o=this._textEditor.getTopForPosition(1,1),c=this._textEditor.getTopForPosition(this.textModel.getLineCount(),this.textModel.getLineLength(this.textModel.getLineCount())),i=this._textEditor.getTopForPosition(C.startLineNumber,C.startColumn);return i===c?i===o?I.CursorAtBoundary.Both:I.CursorAtBoundary.Bottom:i===o?I.CursorAtBoundary.Top:I.CursorAtBoundary.None}get editStateSource(){return this._editStateSource}updateEditState(C,o){this._editStateSource=o,C!==this._editState&&(this._editState=C,this._onDidChangeState.fire({editStateChanged:!0}),this._editState===I.CellEditState.Preview&&(this.focusMode=I.CellFocusMode.Container))}getEditState(){return this._editState}get textBuffer(){return this.model.textBuffer}async resolveTextModel(){if(!this._textModelRef||!this.textModel){if(this._textModelRef=await this._modelService.createModelReference(this.uri),!this._textModelRef)throw new Error(`Cannot resolve text model for ${this.uri}`);this._register(this.textModel.onDidChangeContent(()=>this.onDidChangeTextModelContent()))}return this.textModel}cellStartFind(C,o){let c=[];if(this.assertTextModelAttached())c=this.textModel.findMatches(C,!1,o.regex||!1,o.caseSensitive||!1,o.wholeWord&&o.wordSeparators||null,o.regex||!1);else{const i=this.textBuffer.getLineCount(),S=new A.Range(1,1,i,this.textBuffer.getLineLength(i)+1),l=new k.SearchParams(C,o.regex||!1,o.caseSensitive||!1,o.wholeWord&&o.wordSeparators||null).parseSearchRequest();if(!l)return null;c=this.textBuffer.findMatchesLineByLine(S,l,o.regex||!1,1e3)}return c}dispose(){super.dispose(),(0,f.dispose)(this._editorListeners),this._undoRedoService.getUriComparisonKey(this.uri)===this.uri.toString()&&this._undoRedoService.removeElements(this.uri),this._textModelRef&&this._textModelRef.dispose()}toJSON(){return{handle:this.handle}}}e.BaseCellViewModel=w}),define(ne[423],re([1,0,6,2,89,72,61,344,8,147,104,800,64,802,142,881]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeCellViewModel=void 0;let s=class extends S.BaseCellViewModel{constructor(r,p,u,a,n,h,g,d,m,b){super(r,p,_.generateUuid(),a,n,g,d,b);this.viewContext=a,this._notebookService=h,this.cellKind=o.CellKind.Code,this._onLayoutInfoRead=this._register(new t.Emitter),this.onLayoutInfoRead=this._onLayoutInfoRead.event,this._onDidChangeOutputs=this._register(new t.Emitter),this.onDidChangeOutputs=this._onDidChangeOutputs.event,this._onDidRemoveOutputs=this._register(new t.Emitter),this.onDidRemoveOutputs=this._onDidRemoveOutputs.event,this._outputCollection=[],this._outputsTop=null,this._pauseableEmitter=this._register(new t.PauseableEmitter),this.onDidChangeLayout=this._pauseableEmitter.event,this._editorHeight=0,this._commentHeight=0,this._hoveringOutput=!1,this._focusOnOutput=!1,this._outputMinHeight=0,this._hasFindResult=this._register(new t.Emitter),this.hasFindResult=this._hasFindResult.event,this._outputViewModels=this.model.outputs.map(E=>new C.CellOutputViewModel(this,E,this._notebookService)),this._register(this.model.onDidChangeOutputs(E=>{const y=[];this._outputCollection.splice(E.start,E.deleteCount,...E.newOutputs.map(()=>0)),y.push(...this._outputViewModels.splice(E.start,E.deleteCount,...E.newOutputs.map(T=>new C.CellOutputViewModel(this,T,this._notebookService)))),this._outputsTop=null,this._onDidChangeOutputs.fire(E),this._onDidRemoveOutputs.fire(y),this.layoutChange({outputHeight:!0},"CodeCellViewModel#model.onDidChangeOutputs"),(0,f.dispose)(y)})),this._outputCollection=new Array(this.model.outputs.length),this._layoutInfo={fontInfo:u?.fontInfo||null,editorHeight:0,editorWidth:u?this.viewContext.notebookOptions.computeCodeCellEditorWidth(u.width):0,statusBarHeight:0,commentHeight:0,outputContainerOffset:0,outputTotalHeight:0,outputShowMoreContainerHeight:0,outputShowMoreContainerOffset:0,totalHeight:this.computeTotalHeight(17,0,0),codeIndicatorHeight:0,outputIndicatorHeight:0,bottomToolbarOffset:0,layoutState:v.CellLayoutState.Uninitialized}}set editorHeight(r){this._editorHeight=r,this.layoutChange({editorHeight:!0},"CodeCellViewModel#editorHeight")}get editorHeight(){throw new Error("editorHeight is write-only")}set commentHeight(r){this._commentHeight!==r&&(this._commentHeight=r,this.layoutChange({commentHeight:!0},"CodeCellViewModel#commentHeight"))}get outputIsHovered(){return this._hoveringOutput}set outputIsHovered(r){this._hoveringOutput=r,this._onDidChangeState.fire({outputIsHoveredChanged:!0})}get outputIsFocused(){return this._focusOnOutput}set outputIsFocused(r){this._focusOnOutput=r,this._onDidChangeState.fire({outputIsFocusedChanged:!0})}get outputMinHeight(){return this._outputMinHeight}set outputMinHeight(r){this._outputMinHeight=r}get layoutInfo(){return this._layoutInfo}get outputsViewModels(){return this._outputViewModels}updateOptions(r){(r.cellStatusBarVisibility||r.insertToolbarPosition||r.cellToolbarLocation)&&this.layoutChange({})}pauseLayout(){this._pauseableEmitter.pause()}resumeLayout(){this._pauseableEmitter.resume()}layoutChange(r,p){this._ensureOutputsTop();const u=this.viewContext.notebookOptions.getLayoutConfiguration(),a=this.viewContext.notebookOptions.computeBottomToolbarDimensions(),n=r.outputShowMoreContainerHeight?r.outputShowMoreContainerHeight:this._layoutInfo.outputShowMoreContainerHeight,h=Math.max(this._outputMinHeight,this.isOutputCollapsed?u.collapsedIndicatorHeight:this._outputsTop.getTotalSum()),g=r.commentHeight?this._commentHeight:this._layoutInfo.commentHeight,d=this.layoutInfo;if(this.isInputCollapsed){const m=u.collapsedIndicatorHeight,b=h+n,E=u.cellTopMargin+u.collapsedIndicatorHeight,y=u.cellTopMargin+u.collapsedIndicatorHeight+u.cellBottomMargin+a.bottomToolbarGap+g+h+n,T=y-a.bottomToolbarGap-a.bottomToolbarHeight/2-n,R=this.viewContext.notebookOptions.computeBottomToolbarOffset(y,this.viewType),O=r.outerWidth!==void 0?this.viewContext.notebookOptions.computeCodeCellEditorWidth(r.outerWidth):this._layoutInfo?.editorWidth;this._layoutInfo={fontInfo:r.font??this._layoutInfo.fontInfo??null,editorHeight:this._layoutInfo.editorHeight,editorWidth:O,statusBarHeight:0,commentHeight:g,outputContainerOffset:E,outputTotalHeight:h,outputShowMoreContainerHeight:n,outputShowMoreContainerOffset:T,totalHeight:y,codeIndicatorHeight:m,outputIndicatorHeight:b,bottomToolbarOffset:R,layoutState:this._layoutInfo.layoutState}}else{let m,b,E;!r.editorHeight&&this._layoutInfo.layoutState===v.CellLayoutState.FromCache&&!r.outputHeight?(b=this.estimateEditorHeight(r.font?.lineHeight??this._layoutInfo.fontInfo?.lineHeight),E=this._layoutInfo.totalHeight,m=v.CellLayoutState.FromCache):r.editorHeight||this._layoutInfo.layoutState===v.CellLayoutState.Measured?(b=this._editorHeight,E=this.computeTotalHeight(this._editorHeight,h,n),m=v.CellLayoutState.Measured):(b=this.estimateEditorHeight(r.font?.lineHeight??this._layoutInfo.fontInfo?.lineHeight),E=this.computeTotalHeight(b,h,n),m=v.CellLayoutState.Estimated);const y=this.viewContext.notebookOptions.computeEditorStatusbarHeight(this.internalMetadata,this.uri),T=b+y,R=h+n,O=u.editorToolbarHeight+u.cellTopMargin+b+y,x=E-a.bottomToolbarGap-a.bottomToolbarHeight/2-n,F=this.viewContext.notebookOptions.computeBottomToolbarOffset(E,this.viewType),L=r.outerWidth!==void 0?this.viewContext.notebookOptions.computeCodeCellEditorWidth(r.outerWidth):this._layoutInfo?.editorWidth;this._layoutInfo={fontInfo:r.font??this._layoutInfo.fontInfo??null,editorHeight:b,editorWidth:L,statusBarHeight:y,commentHeight:g,outputContainerOffset:O,outputTotalHeight:h,outputShowMoreContainerHeight:n,outputShowMoreContainerOffset:x,totalHeight:E,codeIndicatorHeight:T,outputIndicatorHeight:R,bottomToolbarOffset:F,layoutState:m}}r.totalHeight=this.layoutInfo.totalHeight!==d.totalHeight,r.source=p,this._fireOnDidChangeLayout(r)}_fireOnDidChangeLayout(r){this._pauseableEmitter.fire(r)}restoreEditorViewState(r,p){super.restoreEditorViewState(r),p!==void 0&&this._layoutInfo.layoutState!==v.CellLayoutState.Measured&&(this._layoutInfo={fontInfo:this._layoutInfo.fontInfo,editorHeight:this._layoutInfo.editorHeight,editorWidth:this._layoutInfo.editorWidth,statusBarHeight:this.layoutInfo.statusBarHeight,commentHeight:this.layoutInfo.commentHeight,outputContainerOffset:this._layoutInfo.outputContainerOffset,outputTotalHeight:this._layoutInfo.outputTotalHeight,outputShowMoreContainerHeight:this._layoutInfo.outputShowMoreContainerHeight,outputShowMoreContainerOffset:this._layoutInfo.outputShowMoreContainerOffset,totalHeight:p,codeIndicatorHeight:this._layoutInfo.codeIndicatorHeight,outputIndicatorHeight:this._layoutInfo.outputIndicatorHeight,bottomToolbarOffset:this._layoutInfo.bottomToolbarOffset,layoutState:v.CellLayoutState.FromCache})}hasDynamicHeight(){return!1}getDynamicHeight(){return this._onLayoutInfoRead.fire(),this._layoutInfo.totalHeight}firstLine(){return this.getText().split(` `)[0]}getHeight(r){if(this._layoutInfo.layoutState===v.CellLayoutState.Uninitialized){const p=this.estimateEditorHeight(r);return this.computeTotalHeight(p,0,0)}else return this._layoutInfo.totalHeight}estimateEditorHeight(r=20){let p=!1;if(this.layoutInfo.fontInfo){for(let n=0;n<this.lineCount;n++)if(this.textBuffer.getLineLastNonWhitespaceColumn(n+1)*(this.layoutInfo.fontInfo.typicalHalfwidthCharacterWidth+this.layoutInfo.fontInfo.letterSpacing)>this.layoutInfo.editorWidth){p=!0;break}}const u=p?12:0,a=this.viewContext.notebookOptions.computeEditorPadding(this.internalMetadata,this.uri);return this.lineCount*r+a.top+a.bottom+u}computeTotalHeight(r,p,u){const a=this.viewContext.notebookOptions.getLayoutConfiguration(),{bottomToolbarGap:n}=this.viewContext.notebookOptions.computeBottomToolbarDimensions(this.viewType);return a.editorToolbarHeight+a.cellTopMargin+r+this.viewContext.notebookOptions.computeEditorStatusbarHeight(this.internalMetadata,this.uri)+this._commentHeight+p+u+n+a.cellBottomMargin}onDidChangeTextModelContent(){this.getEditState()!==v.CellEditState.Editing&&(this.updateEditState(v.CellEditState.Editing,"onDidChangeTextModelContent"),this._onDidChangeState.fire({contentChanged:!0}))}onDeselect(){this.updateEditState(v.CellEditState.Preview,"onDeselect")}updateOutputShowMoreContainerHeight(r){this.layoutChange({outputShowMoreContainerHeight:r},"CodeCellViewModel#updateOutputShowMoreContainerHeight")}updateOutputMinHeight(r){this.outputMinHeight=r}unlockOutputHeight(){this.outputMinHeight=0,this.layoutChange({outputHeight:!0})}updateOutputHeight(r,p,u){if(r>=this._outputCollection.length)throw new Error("Output index out of range!");this._ensureOutputsTop(),p<28&&this._outputViewModels[r].hasMultiMimeType()&&(p=28),this._outputCollection[r]=p,this._outputsTop.setValue(r,p)&&this.layoutChange({outputHeight:!0},u)}getOutputHeight(r){return r>=this._outputCollection.length?-1:(this._ensureOutputsTop(),this._outputCollection[r])}getOutputOffsetInContainer(r){if(this._ensureOutputsTop(),r>=this._outputCollection.length)throw new Error("Output index out of range!");return this._outputsTop.getPrefixSum(r-1)}getOutputOffset(r){return this.layoutInfo.outputContainerOffset+this.getOutputOffsetInContainer(r)}spliceOutputHeights(r,p,u){if(this._ensureOutputsTop(),this._outputsTop.removeValues(r,p),u.length){const a=new Uint32Array(u.length);for(let n=0;n<u.length;n++)a[n]=u[n];this._outputsTop.insertValues(r,a)}this.layoutChange({outputHeight:!0},"CodeCellViewModel#spliceOutputs")}_ensureOutputsTop(){if(!this._outputsTop){const r=new Uint32Array(this._outputCollection.length);for(let p=0;p<this._outputCollection.length;p++)r[p]=this._outputCollection[p];this._outputsTop=new D.PrefixSumComputer(r)}}startFind(r,p){const u=super.cellStartFind(r,p);return u===null?null:{cell:this,matches:u,modelMatchCount:u.length}}dispose(){super.dispose(),this._outputCollection=[],this._outputsTop=null,(0,f.dispose)(this._outputViewModels)}};s=Ee([W(4,I.IConfigurationService),W(5,i.INotebookService),W(6,k.ITextModelService),W(7,w.IUndoRedoService),W(8,c.INotebookKeymapService),W(9,A.ICodeEditorService)],s),e.CodeCellViewModel=s}),define(ne[2439],re([1,0,10,91,517,130,6,225,2,306,28,5,26,27,12,104,175,423]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellEditorStatusBar=void 0;const r=t.$;let p=class extends s.CellPart{constructor(n,h,g,d,m,b){super();this._notebookEditor=n,this._cellContainer=h,this._editor=d,this._instantiationService=m,this._themeService=b,this.leftItems=[],this.rightItems=[],this.width=0,this._onDidClick=this._register(new k.Emitter),this.onDidClick=this._onDidClick.event,this.statusBarContainer=t.append(g,r(".cell-statusbar-container")),this.statusBarContainer.tabIndex=-1;const E=t.append(this.statusBarContainer,r(".cell-status-left")),y=t.append(this.statusBarContainer,r(".cell-status-right"));this.leftItemsContainer=t.append(E,r(".cell-contributed-items.cell-contributed-items-left")),this.rightItemsContainer=t.append(y,r(".cell-contributed-items.cell-contributed-items-right")),this.itemsDisposable=this._register(new I.DisposableStore),this._register(this._themeService.onDidColorThemeChange(()=>this.currentContext&&this.updateContext(this.currentContext))),this._register(t.addDisposableListener(this.statusBarContainer,t.EventType.CLICK,T=>{T.target===E||T.target===y||T.target===this.statusBarContainer?this._onDidClick.fire({type:0,event:T}):T.target.classList.contains("cell-status-item-has-command")?this._onDidClick.fire({type:2,event:T}):this._onDidClick.fire({type:1,event:T})}))}didRenderCell(n){if(this.updateContext({ui:!0,cell:n,notebookEditor:this._notebookEditor,$mid:12}),this._editor){const h=()=>{n.focusMode=this._editor&&(this._editor.hasWidgetFocus()||document.activeElement&&this.statusBarContainer.contains(document.activeElement))?S.CellFocusMode.Editor:S.CellFocusMode.Container};this.cellDisposables.add(this._editor.onDidFocusEditorWidget(()=>{h()})),this.cellDisposables.add(this._editor.onDidBlurEditorWidget(()=>{this._notebookEditor.hasEditorFocus()&&!(document.activeElement&&this.statusBarContainer.contains(document.activeElement))&&h()})),this.cellDisposables.add(this.onDidClick(g=>{if(this.currentCell instanceof l.CodeCellViewModel&&g.type!==2&&this._editor){const d=this._editor.getTargetAtClientPoint(g.event.clientX,g.event.clientY-this._notebookEditor.notebookOptions.computeEditorStatusbarHeight(this.currentCell.internalMetadata,this.currentCell.uri));d?.position&&(this._editor.setPosition(d.position),this._editor.focus())}}))}}updateInternalLayoutNow(n){this._cellContainer.classList.toggle("cell-statusbar-hidden",this._notebookEditor.notebookOptions.computeEditorStatusbarHeight(n.internalMetadata,n.uri)===0);const g=n.layoutInfo.editorWidth;if(!g)return;this.width=g,this.statusBarContainer.style.width=`${g}px`;const d=this.getMaxItemWidth();this.leftItems.forEach(m=>m.maxWidth=d),this.rightItems.forEach(m=>m.maxWidth=d)}getMaxItemWidth(){return this.width/2}updateContext(n){this.currentContext=n,this.itemsDisposable.clear(),!!this.currentContext&&(this.itemsDisposable.add(this.currentContext.cell.onDidChangeLayout(()=>{this.currentContext&&this.updateInternalLayoutNow(this.currentContext.cell)})),this.itemsDisposable.add(this.currentContext.cell.onDidChangeCellStatusBarItems(()=>this.updateRenderedItems())),this.itemsDisposable.add(this.currentContext.notebookEditor.onDidChangeActiveCell(()=>this.updateActiveCell())),this.updateInternalLayoutNow(this.currentContext.cell),this.updateActiveCell(),this.updateRenderedItems())}updateActiveCell(){const n=this.currentContext.notebookEditor.getActiveCell()===this.currentContext?.cell;this.statusBarContainer.classList.toggle("is-active-cell",n)}updateRenderedItems(){const n=this.currentContext.cell.getCellStatusBarItems();n.sort((b,E)=>(E.priority??0)-(b.priority??0));const h=this.getMaxItemWidth(),g=n.filter(b=>b.alignment===1),d=n.filter(b=>b.alignment===2).reverse(),m=(b,E,y)=>{if(b.length>E.length){const T=b.splice(E.length,b.length-E.length);for(const R of T)y.removeChild(R.container),R.dispose()}E.forEach((T,R)=>{const O=b[R];if(O)O.updateItem(T,h);else{const x=this._instantiationService.createInstance(u,this.currentContext,T,h);b.push(x),y.appendChild(x.container)}})};m(this.leftItems,g,this.leftItemsContainer),m(this.rightItems,d,this.rightItemsContainer)}dispose(){super.dispose(),(0,I.dispose)(this.leftItems),(0,I.dispose)(this.rightItems)}};p=Ee([W(4,C.IInstantiationService),W(5,i.IThemeService)],p),e.CellEditorStatusBar=p;let u=class extends I.Disposable{constructor(n,h,g,d,m,b,E){super();this._context=n,this._telemetryService=d,this._commandService=m,this._notificationService=b,this._themeService=E,this.container=r(".cell-status-item"),this._itemDisposables=this._register(new I.DisposableStore),this.updateItem(h,g)}set maxWidth(n){this.container.style.maxWidth=n+"px"}updateItem(n,h){this._itemDisposables.clear(),(!this._currentItem||this._currentItem.text!==n.text)&&(new _.SimpleIconLabel(this.container).text=n.text.replace(/\n/g," "));const g=b=>(0,w.isThemeColor)(b)?this._themeService.getColorTheme().getColor(b.id)?.toString()||"":b;this.container.style.color=n.color?g(n.color):"",this.container.style.backgroundColor=n.backgroundColor?g(n.backgroundColor):"",this.container.style.opacity=n.opacity?n.opacity:"",this.container.classList.toggle("cell-status-item-show-when-active",!!n.onlyShowWhenActive),typeof h=="number"&&(this.maxWidth=h);let d,m;n.accessibilityInformation?(d=n.accessibilityInformation.label,m=n.accessibilityInformation.role):d=n.text?(0,D.stripIcons)(n.text).trim():"",this.container.setAttribute("aria-label",d),this.container.setAttribute("role",m||""),this.container.title=n.tooltip??"",this.container.classList.toggle("cell-status-item-has-command",!!n.command),n.command?(this.container.tabIndex=0,this._itemDisposables.add(t.addDisposableListener(this.container,t.EventType.CLICK,b=>{this.executeCommand()})),this._itemDisposables.add(t.addDisposableListener(this.container,t.EventType.KEY_DOWN,b=>{const E=new f.StandardKeyboardEvent(b);(E.equals(10)||E.equals(3))&&this.executeCommand()}))):this.container.removeAttribute("tabIndex"),this._currentItem=n}async executeCommand(){const n=this._currentItem.command;if(!n)return;const h=typeof n=="string"?n:n.id,g=typeof n=="string"?[]:n.arguments??[];g.unshift(this._context),this._telemetryService.publicLog2("workbenchActionExecuted",{id:h,from:"cell status bar"});try{await this._commandService.executeCommand(h,...g)}catch(d){this._notificationService.error((0,A.toErrorMessage)(d))}}};u=Ee([W(3,c.ITelemetryService),W(4,v.ICommandService),W(5,o.INotificationService),W(6,i.IThemeService)],u)}),define(ne[424],re([1,0,6,89,8,104,881,64,61,5,147,72,488]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkupCellViewModel=void 0;let c=class extends k.BaseCellViewModel{constructor(S,s,l,r,p,u,a,n,h,g){super(S,s,f.generateUuid(),p,u,a,h,g);this.foldingDelegate=r,this.viewContext=p,this.cellKind=D.CellKind.Markup,this._previewHeight=0,this._editorHeight=0,this._statusBarHeight=0,this._onDidChangeLayout=this._register(new t.Emitter),this.onDidChangeLayout=this._onDidChangeLayout.event,this._hoveringOutput=!1,this._focusOnOutput=!1,this._hoveringCell=!1,this.outputsViewModels=[],this._hasFindResult=this._register(new t.Emitter),this.hasFindResult=this._hasFindResult.event;const{bottomToolbarGap:d}=this.viewContext.notebookOptions.computeBottomToolbarDimensions(this.viewType);this._layoutInfo={editorHeight:0,previewHeight:0,fontInfo:l?.fontInfo||null,editorWidth:l?.width?this.viewContext.notebookOptions.computeMarkdownCellEditorWidth(l.width):0,bottomToolbarOffset:d,totalHeight:100,layoutState:A.CellLayoutState.Uninitialized,foldHintHeight:0,statusBarHeight:0},this._register(this.onDidChangeState(m=>{this.viewContext.eventDispatcher.emit([new o.NotebookCellStateChangedEvent(m,this.model)]),m.foldingStateChanged&&this._updateTotalHeight(this._computeTotalHeight(),A.CellLayoutContext.Fold)}))}get renderedHtml(){return this._renderedHtml}set renderedHtml(S){this._renderedHtml=S,this._onDidChangeState.fire({contentChanged:!0})}get layoutInfo(){return this._layoutInfo}set renderedMarkdownHeight(S){this._previewHeight=S,this._updateTotalHeight(this._computeTotalHeight())}set editorHeight(S){this._editorHeight=S,this._statusBarHeight=this.viewContext.notebookOptions.computeStatusBarHeight(),this._updateTotalHeight(this._computeTotalHeight())}get editorHeight(){throw new Error("MarkdownCellViewModel.editorHeight is write only")}get foldingState(){return this.foldingDelegate.getFoldingState(this.foldingDelegate.getCellIndex(this))}get outputIsHovered(){return this._hoveringOutput}set outputIsHovered(S){this._hoveringOutput=S}get outputIsFocused(){return this._focusOnOutput}set outputIsFocused(S){this._focusOnOutput=S}get cellIsHovered(){return this._hoveringCell}set cellIsHovered(S){this._hoveringCell=S,this._onDidChangeState.fire({cellIsHoveredChanged:!0})}_computeTotalHeight(){const S=this.viewContext.notebookOptions.getLayoutConfiguration(),{bottomToolbarGap:s}=this.viewContext.notebookOptions.computeBottomToolbarDimensions(this.viewType),l=this._computeFoldHintHeight();return this.getEditState()===A.CellEditState.Editing?this._editorHeight+S.markdownCellTopMargin+S.markdownCellBottomMargin+s+this._statusBarHeight:Math.max(1,this._previewHeight+s+l)}_computeFoldHintHeight(){return this.getEditState()===A.CellEditState.Editing||this.foldingState!==2?0:this.viewContext.notebookOptions.getLayoutConfiguration().markdownFoldHintHeight}updateOptions(S){(S.cellStatusBarVisibility||S.insertToolbarPosition||S.cellToolbarLocation)&&this._updateTotalHeight(this._computeTotalHeight())}getOutputOffset(S){return-1}updateOutputHeight(S,s){}triggerFoldingStateChange(){this._onDidChangeState.fire({foldingStateChanged:!0})}_updateTotalHeight(S,s){S!==this.layoutInfo.totalHeight&&this.layoutChange({totalHeight:S,context:s})}layoutChange(S){const s=this._computeFoldHintHeight();if(this.isInputCollapsed){const l=S.outerWidth!==void 0?this.viewContext.notebookOptions.computeMarkdownCellEditorWidth(S.outerWidth):this._layoutInfo.editorWidth,r=this.viewContext.notebookOptions.computeCollapsedMarkdownCellHeight(this.viewType);S.totalHeight=r,this._layoutInfo={fontInfo:S.font||this._layoutInfo.fontInfo,editorWidth:l,editorHeight:this._editorHeight,statusBarHeight:this._statusBarHeight,previewHeight:this._previewHeight,bottomToolbarOffset:this.viewContext.notebookOptions.computeBottomToolbarOffset(r,this.viewType),totalHeight:r,layoutState:A.CellLayoutState.Measured,foldHintHeight:0}}else{const l=S.outerWidth!==void 0?this.viewContext.notebookOptions.computeMarkdownCellEditorWidth(S.outerWidth):this._layoutInfo.editorWidth,r=S.totalHeight===void 0?this._layoutInfo.layoutState===A.CellLayoutState.Uninitialized?100:this._layoutInfo.totalHeight:S.totalHeight,p=this._previewHeight;this._layoutInfo={fontInfo:S.font||this._layoutInfo.fontInfo,editorWidth:l,previewHeight:p,editorHeight:this._editorHeight,statusBarHeight:this._statusBarHeight,bottomToolbarOffset:this.viewContext.notebookOptions.computeBottomToolbarOffset(r,this.viewType),totalHeight:r,layoutState:A.CellLayoutState.Measured,foldHintHeight:s}}this._onDidChangeLayout.fire(S)}restoreEditorViewState(S,s){super.restoreEditorViewState(S),s!==void 0&&this.layoutInfo.layoutState===A.CellLayoutState.Uninitialized&&(this._layoutInfo={fontInfo:this._layoutInfo.fontInfo,editorWidth:this._layoutInfo.editorWidth,previewHeight:this._layoutInfo.previewHeight,bottomToolbarOffset:this._layoutInfo.bottomToolbarOffset,totalHeight:s,editorHeight:this._editorHeight,statusBarHeight:this._statusBarHeight,layoutState:A.CellLayoutState.FromCache,foldHintHeight:this._layoutInfo.foldHintHeight},this.layoutChange({}))}hasDynamicHeight(){return!1}getDynamicHeight(){return null}getHeight(S){return this._layoutInfo.layoutState===A.CellLayoutState.Uninitialized?100:this._layoutInfo.totalHeight}onDidChangeTextModelContent(){this._onDidChangeState.fire({contentChanged:!0})}onDeselect(){}startFind(S,s){const l=super.cellStartFind(S,s);return l===null?null:{cell:this,matches:l,modelMatchCount:l.length}}dispose(){super.dispose(),this.foldingDelegate=null}};c=Ee([W(5,_.IConfigurationService),W(6,I.ITextModelService),W(7,w.IInstantiationService),W(8,v.IUndoRedoService),W(9,C.ICodeEditorService)],c),e.MarkupCellViewModel=c}),define(ne[882],re([1,0,2,7,104,153,423,424,64,158,175,5]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellContextKeyManager=e.CellContextKeyPart=void 0;let o=class extends v.CellPart{constructor(S,s){super();this.instantiationService=s,this.cellContextKeyManager=this._register(this.instantiationService.createInstance(c,S,void 0))}didRenderCell(S){this.cellContextKeyManager.updateForElement(S)}};o=Ee([W(1,C.IInstantiationService)],o),e.CellContextKeyPart=o;let c=class extends t.Disposable{constructor(S,s,l,r){super();this.notebookEditor=S,this.element=s,this._contextKeyService=l,this._notebookExecutionStateService=r,this.elementDisposables=this._register(new t.DisposableStore),this._contextKeyService.bufferChangeEvents(()=>{this.cellType=A.NOTEBOOK_CELL_TYPE.bindTo(this._contextKeyService),this.cellEditable=A.NOTEBOOK_CELL_EDITABLE.bindTo(this._contextKeyService),this.cellFocused=A.NOTEBOOK_CELL_FOCUSED.bindTo(this._contextKeyService),this.cellEditorFocused=A.NOTEBOOK_CELL_EDITOR_FOCUSED.bindTo(this._contextKeyService),this.markdownEditMode=A.NOTEBOOK_CELL_MARKDOWN_EDIT_MODE.bindTo(this._contextKeyService),this.cellRunState=A.NOTEBOOK_CELL_EXECUTION_STATE.bindTo(this._contextKeyService),this.cellExecuting=A.NOTEBOOK_CELL_EXECUTING.bindTo(this._contextKeyService),this.cellHasOutputs=A.NOTEBOOK_CELL_HAS_OUTPUTS.bindTo(this._contextKeyService),this.cellContentCollapsed=A.NOTEBOOK_CELL_INPUT_COLLAPSED.bindTo(this._contextKeyService),this.cellOutputCollapsed=A.NOTEBOOK_CELL_OUTPUT_COLLAPSED.bindTo(this._contextKeyService),this.cellLineNumbers=A.NOTEBOOK_CELL_LINE_NUMBERS.bindTo(this._contextKeyService),s&&this.updateForElement(s)}),this._register(this._notebookExecutionStateService.onDidChangeCellExecution(p=>{this.element&&p.affectsCell(this.element.uri)&&this.updateForExecutionState()}))}updateForElement(S){this.elementDisposables.clear(),this.element=S,!!S&&(this.elementDisposables.add(S.onDidChangeState(s=>this.onDidChangeState(s))),S instanceof k.CodeCellViewModel&&this.elementDisposables.add(S.onDidChangeOutputs(()=>this.updateForOutputs())),this.elementDisposables.add(this.notebookEditor.onDidChangeActiveCell(()=>this.updateForFocusState())),this.element instanceof D.MarkupCellViewModel?this.cellType.set("markup"):this.element instanceof k.CodeCellViewModel&&this.cellType.set("code"),this._contextKeyService.bufferChangeEvents(()=>{this.updateForFocusState(),this.updateForExecutionState(),this.updateForEditState(),this.updateForCollapseState(),this.updateForOutputs(),this.cellLineNumbers.set(this.element.lineNumbers)}))}onDidChangeState(S){this._contextKeyService.bufferChangeEvents(()=>{S.internalMetadataChanged&&this.updateForExecutionState(),S.editStateChanged&&this.updateForEditState(),S.focusModeChanged&&this.updateForFocusState(),S.cellLineNumberChanged&&this.cellLineNumbers.set(this.element.lineNumbers),(S.inputCollapsedChanged||S.outputCollapsedChanged)&&this.updateForCollapseState()})}updateForFocusState(){if(!this.element)return;const S=this.notebookEditor.getActiveCell();this.cellFocused.set(this.notebookEditor.getActiveCell()===this.element),S===this.element?this.cellEditorFocused.set(this.element.focusMode===_.CellFocusMode.Editor):this.cellEditorFocused.set(!1)}updateForExecutionState(){if(!this.element)return;const S=this.element.internalMetadata;this.cellEditable.set(!this.notebookEditor.isReadOnly);const s=this._notebookExecutionStateService.getCellExecution(this.element.uri);this.element instanceof D.MarkupCellViewModel?(this.cellRunState.reset(),this.cellExecuting.reset()):s?.state===I.NotebookCellExecutionState.Executing?(this.cellRunState.set("executing"),this.cellExecuting.set(!0)):s?.state===I.NotebookCellExecutionState.Pending||s?.state===I.NotebookCellExecutionState.Unconfirmed?(this.cellRunState.set("pending"),this.cellExecuting.set(!0)):S.lastRunSuccess===!0?(this.cellRunState.set("succeeded"),this.cellExecuting.set(!1)):S.lastRunSuccess===!1?(this.cellRunState.set("failed"),this.cellExecuting.set(!1)):(this.cellRunState.set("idle"),this.cellExecuting.set(!1))}updateForEditState(){!this.element||(this.element instanceof D.MarkupCellViewModel?this.markdownEditMode.set(this.element.getEditState()===_.CellEditState.Editing):this.markdownEditMode.set(!1))}updateForCollapseState(){!this.element||(this.cellContentCollapsed.set(!!this.element.isInputCollapsed),this.cellOutputCollapsed.set(!!this.element.isOutputCollapsed))}updateForOutputs(){this.element instanceof k.CodeCellViewModel?this.cellHasOutputs.set(this.element.outputsViewModels.length>0):this.cellHasOutputs.set(!1)}};c=Ee([W(2,f.IContextKeyService),W(3,w.INotebookExecutionStateService)],c),e.CellContextKeyManager=c}),define(ne[883],re([1,0,10,441,6,2,14,20,344,8,38,71,12,104,64,268,153,195,128,424]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListViewInfoAccessor=e.NotebookCellList=e.NOTEBOOK_WEBVIEW_BOUNDARY=void 0;var u;(function(E){E[E.Line=0]="Line",E[E.Range=1]="Range"})(u||(u={}));var a;(function(E){E[E.Top=0]="Top",E[E.Center=1]="Center",E[E.Bottom=2]="Bottom"})(a||(a={}));function n(E,y){if(!y.length)return E;let T=0,R=0;const O=[];for(;T<E.length&&R<y.length;)T<y[R].start&&O.push(...E.slice(T,y[R].start)),T=y[R].end+1,R++;return T<E.length&&O.push(...E.slice(T)),O}e.NOTEBOOK_WEBVIEW_BOUNDARY=5e3;function h(E){const y=0-(parseInt(E.style.top,10)||0);return y>=0&&y<=e.NOTEBOOK_WEBVIEW_BOUNDARY*2}let g=class extends C.WorkbenchList{constructor(y,T,R,O,x,F,L,M,N,B,P,V){super(y,R,x,F,M,L,N,B,P,V);this.listUser=y,this._previousFocusedElements=[],this._localDisposableStore=new A.DisposableStore,this._viewModelStore=new A.DisposableStore,this._onDidRemoveOutputs=this._localDisposableStore.add(new _.Emitter),this.onDidRemoveOutputs=this._onDidRemoveOutputs.event,this._onDidHideOutputs=this._localDisposableStore.add(new _.Emitter),this.onDidHideOutputs=this._onDidHideOutputs.event,this._onDidRemoveCellsFromView=this._localDisposableStore.add(new _.Emitter),this.onDidRemoveCellsFromView=this._onDidRemoveCellsFromView.event,this._viewModel=null,this._hiddenRangeIds=[],this.hiddenRangesPrefixSum=null,this._onDidChangeVisibleRanges=this._localDisposableStore.add(new _.Emitter),this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._visibleRanges=[],this._isDisposed=!1,this._isInLayout=!1,this._webviewElement=null,s.NOTEBOOK_CELL_LIST_FOCUSED.bindTo(this.contextKeyService).set(!0),this._viewContext=O,this._focusNextPreviousDelegate=M.focusNextPreviousDelegate,this._previousFocusedElements=this.getFocusedElements(),this._localDisposableStore.add(this.onDidChangeFocus(q=>{this._previousFocusedElements.forEach(Z=>{q.elements.indexOf(Z)<0&&Z.onDeselect()}),this._previousFocusedElements=q.elements,document.activeElement&&document.activeElement.classList.contains("webview")&&super.domFocus()}));const z=i.NOTEBOOK_EDITOR_CURSOR_BOUNDARY.bindTo(L);z.set("none");const U=this._localDisposableStore.add(new A.MutableDisposable),H=this._localDisposableStore.add(new A.MutableDisposable),K=q=>{switch(q.cursorAtBoundary()){case c.CursorAtBoundary.Both:z.set("both");break;case c.CursorAtBoundary.Top:z.set("top");break;case c.CursorAtBoundary.Bottom:z.set("bottom");break;default:z.set("none");break}};this._localDisposableStore.add(this.onDidChangeFocus(q=>{if(q.elements.length){const Z=q.elements[0];U.value=Z.onDidChangeState(j=>{j.selectionChanged&&K(Z)}),H.value=Z.onDidChangeEditorAttachState(()=>{Z.editorAttached&&K(Z)}),K(Z);return}z.set("none")})),this._localDisposableStore.add(this.view.onMouseDblClick(()=>{const q=this.getFocusedElements()[0];q&&q.cellKind===i.CellKind.Markup&&!q.isInputCollapsed&&!this._viewModel?.options.isReadOnly&&(this.revealElementInView(q),q.updateEditState(c.CellEditState.Editing,"dbclick"),q.focusMode=c.CellFocusMode.Editor)}));const G=()=>{if(!this.view.length)return;const q=this.getViewScrollTop(),Z=this.getViewScrollBottom();if(q>=Z)return;const j=(0,l.clamp)(this.view.indexAt(q),0,this.view.length-1),X=this.view.element(j),Y=this._viewModel.getCellIndex(X),$=(0,l.clamp)(this.view.indexAt(Z),0,this.view.length-1),J=this.view.element($),ee=this._viewModel.getCellIndex(J);ee-Y==$-j?this.visibleRanges=[{start:Y,end:ee+1}]:this.visibleRanges=this._getVisibleRangesFromIndex(j,Y,$,ee)};this._localDisposableStore.add(this.view.onDidChangeContentHeight(()=>{this._isInLayout&&t.scheduleAtNextAnimationFrame(()=>{G()}),G()})),this._localDisposableStore.add(this.view.onDidScroll(()=>{this._isInLayout&&t.scheduleAtNextAnimationFrame(()=>{G()}),G()}))}get onWillScroll(){return this.view.onWillScroll}get rowsContainer(){return this.view.containerDomNode}get scrollableElement(){return this.view.scrollableElementDomNode}get viewModel(){return this._viewModel}get visibleRanges(){return this._visibleRanges}set visibleRanges(y){(0,S.cellRangesEqual)(this._visibleRanges,y)||(this._visibleRanges=y,this._onDidChangeVisibleRanges.fire())}get isDisposed(){return this._isDisposed}get webviewElement(){return this._webviewElement}attachWebview(y){y.style.top=`-${e.NOTEBOOK_WEBVIEW_BOUNDARY}px`,this.rowsContainer.insertAdjacentElement("afterbegin",y),this._webviewElement=new r.FastDomNode(y)}elementAt(y){if(!this.view.length)return;const T=this.view.indexAt(y),R=(0,l.clamp)(T,0,this.view.length-1);return this.element(R)}elementHeight(y){const T=this._getViewIndexUpperBound(y);if(T===void 0||T<0||T>=this.length)throw this._getViewIndexUpperBound(y),new f.ListError(this.listUser,`Invalid index ${T}`);return this.view.elementHeight(T)}detachViewModel(){this._viewModelStore.clear(),this._viewModel=null,this.hiddenRangesPrefixSum=null}attachViewModel(y){this._viewModel=y,this._viewModelStore.add(y.onDidChangeViewCells(x=>{if(this._isDisposed)return;const F=this._hiddenRangeIds.map(P=>this._viewModel.getTrackedRange(P)).filter(P=>P!==null),L=n(this._viewModel.viewCells,F),M=[],N=new Set;for(let P=0;P<this.length;P++)M.push(this.element(P)),N.add(this.element(P).uri.toString());const B=(0,i.diff)(M,L,P=>N.has(P.uri.toString()));x.synchronous?this._updateElementsInWebview(B):this._viewModelStore.add(t.scheduleAtNextAnimationFrame(()=>{this._isDisposed||this._updateElementsInWebview(B)}))})),this._viewModelStore.add(y.onDidChangeSelection(x=>{if(x==="view")return;const F=(0,S.cellRangesToIndexes)(y.getSelections()).map(M=>y.cellAt(M)).filter(M=>!!M).map(M=>this._getViewIndexUpperBound(M));this.setSelection(F,void 0,!0);const L=(0,S.cellRangesToIndexes)([y.getFocus()]).map(M=>y.cellAt(M)).filter(M=>!!M).map(M=>this._getViewIndexUpperBound(M));L.length&&this.setFocus(L,void 0,!0)}));const T=y.getHiddenRanges();this.setHiddenAreas(T,!1);const R=(0,S.reduceCellRanges)(T),O=y.viewCells.slice(0);R.reverse().forEach(x=>{const F=O.splice(x.start,x.end-x.start+1);this._onDidRemoveCellsFromView.fire(F)}),this.splice2(0,0,O)}_updateElementsInWebview(y){y.reverse().forEach(T=>{const R=[],O=[],x=[];for(let F=T.start;F<T.start+T.deleteCount;F++){const L=this.element(F);L.cellKind===i.CellKind.Code?this._viewModel.hasCell(L)?R.push(...L?.outputsViewModels):O.push(...L?.outputsViewModels):x.push(L)}this.splice2(T.start,T.deleteCount,T.toInsert),this._onDidHideOutputs.fire(R),this._onDidRemoveOutputs.fire(O),this._onDidRemoveCellsFromView.fire(x)})}clear(){super.splice(0,this.length)}setHiddenAreas(y,T){if(!this._viewModel)return!1;const R=(0,S.reduceCellRanges)(y),O=this._hiddenRangeIds.map(F=>this._viewModel.getTrackedRange(F)).filter(F=>F!==null);if(R.length===O.length){let F=!1;for(let L=0;L<R.length;L++)if(!(R[L].start===O[L].start&&R[L].end===O[L].end)){F=!0;break}if(!F)return this._updateHiddenRangePrefixSum(R),!1}this._hiddenRangeIds.forEach(F=>this._viewModel.setTrackedRange(F,null,3));const x=R.map(F=>this._viewModel.setTrackedRange(null,F,3)).filter(F=>F!==null);return this._hiddenRangeIds=x,this._updateHiddenRangePrefixSum(R),T&&this.updateHiddenAreasInView(O,R),!0}_updateHiddenRangePrefixSum(y){let T=0,R=0;const O=[];for(;R<y.length;){for(let F=T;F<y[R].start-1;F++)O.push(1);O.push(y[R].end-y[R].start+1+1),T=y[R].end+1,R++}for(let F=T;F<this._viewModel.length;F++)O.push(1);const x=new Uint32Array(O.length);for(let F=0;F<O.length;F++)x[F]=O[F];this.hiddenRangesPrefixSum=new I.PrefixSumComputer(x)}updateHiddenAreasInView(y,T){const R=n(this._viewModel.viewCells,y),O=new Set;R.forEach(L=>{O.add(L.uri.toString())});const x=n(this._viewModel.viewCells,T),F=(0,i.diff)(R,x,L=>O.has(L.uri.toString()));this._updateElementsInWebview(F)}splice2(y,T,R=[]){if(y<0||y>this.view.length)return;const O=t.isAncestor(document.activeElement,this.rowsContainer);super.splice(y,T,R),O&&this.domFocus();const x=[];this.getSelectedElements().forEach(F=>{this._viewModel.hasCell(F)&&x.push(F.handle)}),!x.length&&this._viewModel.viewCells.length&&this._viewModel.updateSelectionsState({kind:i.SelectionStateType.Index,focus:{start:0,end:1},selections:[{start:0,end:1}]})}getModelIndex(y){const T=this.indexOf(y);return this.getModelIndex2(T)}getModelIndex2(y){return this.hiddenRangesPrefixSum?this.hiddenRangesPrefixSum.getPrefixSum(y-1):y}getViewIndex(y){const T=this._viewModel.getCellIndex(y);return this.getViewIndex2(T)}getViewIndex2(y){if(!this.hiddenRangesPrefixSum)return y;const T=this.hiddenRangesPrefixSum.getIndexOf(y);return T.remainder!==0?y>=this.hiddenRangesPrefixSum.getTotalSum()?y-(this.hiddenRangesPrefixSum.getTotalSum()-this.hiddenRangesPrefixSum.getCount()):void 0:T.index}_getVisibleRangesFromIndex(y,T,R,O){const x=[],F=[];let L=y,M=T;for(;L<=R;){const N=this.hiddenRangesPrefixSum.getPrefixSum(L);N===M+1?(x.length&&(x[x.length-1]===M-1?F.push({start:x[x.length-1],end:M+1}):F.push({start:x[x.length-1],end:x[x.length-1]+1})),x.push(M),L++,M++):(x.length&&(x[x.length-1]===M-1?F.push({start:x[x.length-1],end:M+1}):F.push({start:x[x.length-1],end:x[x.length-1]+1})),x.push(M),L++,M=N)}return x.length&&F.push({start:x[x.length-1],end:x[x.length-1]+1}),(0,S.reduceCellRanges)(F)}getVisibleRangesPlusViewportBelow(){if(this.view.length<=0)return[];const y=(0,l.clamp)(this.getViewScrollBottom()+this.renderHeight,0,this.scrollHeight),T=this.firstVisibleIndex,R=this.view.element(T),O=this._viewModel.getCellIndex(R),x=(0,l.clamp)(this.view.indexAt(y),0,this.view.length-1),F=this.view.element(x),L=this._viewModel.getCellIndex(F);return L-O==x-T?[{start:O,end:L}]:this._getVisibleRangesFromIndex(T,O,x,L)}_getViewIndexUpperBound(y){if(!this._viewModel)return-1;const T=this._viewModel.getCellIndex(y);if(!this.hiddenRangesPrefixSum)return T;const R=this.hiddenRangesPrefixSum.getIndexOf(T);return R.remainder!==0&&T>=this.hiddenRangesPrefixSum.getTotalSum()?T-(this.hiddenRangesPrefixSum.getTotalSum()-this.hiddenRangesPrefixSum.getCount()):R.index}_getViewIndexUpperBound2(y){if(!this.hiddenRangesPrefixSum)return y;const T=this.hiddenRangesPrefixSum.getIndexOf(y);return T.remainder!==0&&y>=this.hiddenRangesPrefixSum.getTotalSum()?y-(this.hiddenRangesPrefixSum.getTotalSum()-this.hiddenRangesPrefixSum.getCount()):T.index}focusElement(y){const T=this._getViewIndexUpperBound(y);if(T>=0&&this._viewModel){const R=this.element(T).handle;this._viewModel.updateSelectionsState({kind:i.SelectionStateType.Handle,primary:R,selections:[R]},"view"),this.setFocus([T],void 0,!1)}}selectElements(y){const T=y.map(R=>this._getViewIndexUpperBound(R)).filter(R=>R>=0);this.setSelection(T)}focusNext(y,T,R,O){this._focusNextPreviousDelegate.onFocusNext(()=>{super.focusNext(y,T,R,O)})}focusPrevious(y,T,R,O){this._focusNextPreviousDelegate.onFocusPrevious(()=>{super.focusPrevious(y,T,R,O)})}setFocus(y,T,R){if(R){super.setFocus(y,T);return}if(y.length){if(this._viewModel){const O=this.element(y[0]).handle;this._viewModel.updateSelectionsState({kind:i.SelectionStateType.Handle,primary:O,selections:this.getSelection().map(x=>this.element(x).handle)},"view")}}else if(this._viewModel){if(this.length)return;this._viewModel.updateSelectionsState({kind:i.SelectionStateType.Handle,primary:null,selections:[]},"view")}super.setFocus(y,T)}setSelection(y,T,R){if(R){super.setSelection(y,T);return}y.length?this._viewModel&&this._viewModel.updateSelectionsState({kind:i.SelectionStateType.Handle,primary:this.getFocusedElements()[0]?.handle??null,selections:y.map(O=>this.element(O)).map(O=>O.handle)},"view"):this._viewModel&&this._viewModel.updateSelectionsState({kind:i.SelectionStateType.Handle,primary:this.getFocusedElements()[0]?.handle??null,selections:[]},"view"),super.setSelection(y,T)}revealElementsInView(y){const T=this._getViewIndexUpperBound2(y.start);if(T<0)return;const R=this._getViewIndexUpperBound2(y.end-1),O=this.getViewScrollTop(),x=this.getViewScrollBottom(),F=this.view.elementTop(T);if(F>=O&&F<x){const L=this.view.elementTop(R),M=this.view.elementHeight(R);if(L+M<=x)return;if(L>=x)return this._revealInternal(R,!1,2);if(L<x)return L+M-x<F-O?this.view.setScrollTop(O+L+M-x):this._revealInternal(T,!1,0)}this._revealInView(T)}isScrolledToBottom(){if(this.length===0)return!0;const y=this.length-1,T=this.view.elementHeight(y)+this.view.elementTop(y),R=this.getViewScrollTop()+this.view.renderHeight;return T<=R}scrollToBottom(){const y=this.view.scrollHeight,T=this.getViewScrollTop(),R=this.getViewScrollBottom(),O=this._viewContext.notebookOptions.computeTopInsertToolbarHeight(this.viewModel?.viewType);this.view.setScrollTop(y-(R-T)-O)}revealElementInView(y){const T=this._getViewIndexUpperBound(y);T>=0&&this._revealInView(T)}revealElementInViewAtTop(y){const T=this._getViewIndexUpperBound(y);T>=0&&this._revealInternal(T,!1,0)}revealElementInCenterIfOutsideViewport(y){const T=this._getViewIndexUpperBound(y);T>=0&&this._revealInCenterIfOutsideViewport(T)}revealElementInCenter(y){const T=this._getViewIndexUpperBound(y);T>=0&&this._revealInCenter(T)}async revealElementInCenterIfOutsideViewportAsync(y){const T=this._getViewIndexUpperBound(y);if(T>=0)return this._revealInCenterIfOutsideViewportAsync(T)}async revealElementLineInViewAsync(y,T){const R=this._getViewIndexUpperBound(y);if(R>=0)return this._revealLineInViewAsync(R,T)}async revealElementLineInCenterAsync(y,T){const R=this._getViewIndexUpperBound(y);if(R>=0)return this._revealLineInCenterAsync(R,T)}async revealElementLineInCenterIfOutsideViewportAsync(y,T){const R=this._getViewIndexUpperBound(y);if(R>=0)return this._revealLineInCenterIfOutsideViewportAsync(R,T)}async revealElementRangeInViewAsync(y,T){const R=this._getViewIndexUpperBound(y);if(R>=0)return this._revealRangeInView(R,T)}async revealElementRangeInCenterAsync(y,T){const R=this._getViewIndexUpperBound(y);if(R>=0)return this._revealRangeInCenterAsync(R,T)}async revealElementRangeInCenterIfOutsideViewportAsync(y,T){const R=this._getViewIndexUpperBound(y);if(R>=0)return this._revealRangeInCenterIfOutsideViewportAsync(R,T)}async revealElementOffsetInCenterAsync(y,T){const R=this._getViewIndexUpperBound(y);if(R>=0)return this._revealOffset(R,T)}domElementOfElement(y){const T=this._getViewIndexUpperBound(y);return T>=0?this.view.domElement(T):null}focusView(){this.view.domNode.focus()}getAbsoluteTopOfElement(y){const T=this._getViewIndexUpperBound(y);if(T===void 0||T<0||T>=this.length)throw this._getViewIndexUpperBound(y),new f.ListError(this.listUser,`Invalid index ${T}`);return this.view.elementTop(T)}triggerScrollFromMouseWheelEvent(y){this.view.triggerScrollFromMouseWheelEvent(y)}isElementAboveViewport(y){return this.view.elementTop(y)+this.view.elementHeight(y)<this.scrollTop}updateElementHeight2(y,T){const R=this._getViewIndexUpperBound(y);if(R===void 0||R<0||R>=this.length)return;if(this.isElementAboveViewport(R)){const L=this.elementHeight(y)-T;this._webviewElement&&_.Event.once(this.view.onWillScroll)(()=>{const M=parseInt(this._webviewElement.domNode.style.top,10);h(this._webviewElement.domNode)?this._webviewElement.setTop(M-L):this._webviewElement.setTop(-e.NOTEBOOK_WEBVIEW_BOUNDARY)}),this.view.updateElementHeight(R,T,null);return}const O=this.getFocus();if(!O.length){this.view.updateElementHeight(R,T,null);return}const x=O[0];if(x<=R){this.view.updateElementHeight(R,T,x);return}if(this.view.elementTop(R)>=this.view.scrollTop){this.view.updateElementHeight(R,T,R);return}this.view.updateElementHeight(R,T,x)}domFocus(){const y=this.getFocusedElements()[0],T=y&&this.domElementOfElement(y);document.activeElement&&T&&T.contains(document.activeElement)||!k.isMacintosh&&document.activeElement&&b()||super.domFocus()}focusContainer(){super.domFocus()}getViewScrollTop(){return this.view.getScrollTop()}getViewScrollBottom(){const y=this._viewContext.notebookOptions.computeTopInsertToolbarHeight(this.viewModel?.viewType);return this.getViewScrollTop()+this.view.renderHeight-y}_revealOffset(y,T){const R=this.view.element(y),O=this.view.elementTop(y);if(R instanceof p.MarkupCellViewModel)return this._revealInCenterIfOutsideViewport(y);{const x=R.layoutInfo.outputContainerOffset+T;this.view.setScrollTop(O-this.view.renderHeight/2),this.view.setScrollTop(O+x-this.view.renderHeight/2)}}_revealRange(y,T,R,O,x){const F=this.view.element(y),L=this.getViewScrollTop(),M=this.getViewScrollBottom(),N=F.getPositionScrollTopOffset(T.startLineNumber,T.startColumn),P=this.view.elementTop(y)+N;P<L?this.view.setScrollTop(P-30):P>M?this.view.setScrollTop(L+P-M+30):O&&(x?this.view.setScrollTop(L+P-M+30):this.view.setScrollTop(P-30)),R===1&&F.revealRangeInCenter(T)}async _revealRangeInternalAsync(y,T,R){const O=this.getViewScrollTop(),x=this.getViewScrollBottom(),F=this.view.elementTop(y),L=this.view.element(y);if(L.editorAttached)this._revealRange(y,T,R,!1,!1);else{const M=this.view.elementHeight(y);let N=!1;return F+M<O?(this.view.setScrollTop(F),N=!1):F>x&&(this.view.setScrollTop(F-this.view.renderHeight/2),N=!0),new Promise((P,V)=>{L.onDidChangeEditorAttachState(()=>{L.editorAttached?P():V()})}).then(()=>{this._revealRange(y,T,R,!0,N)})}}async _revealLineInViewAsync(y,T){return this._revealRangeInternalAsync(y,new D.Range(T,1,T,1),0)}async _revealRangeInView(y,T){return this._revealRangeInternalAsync(y,T,1)}async _revealRangeInCenterInternalAsync(y,T,R){const O=(M,N,B)=>{const P=this.view.element(M),V=P.getPositionScrollTopOffset(N.startLineNumber,N.startColumn),z=this.view.elementTop(M)+V;this.view.setScrollTop(z-this.view.renderHeight/2),B===1&&P.revealRangeInCenter(N)},F=this.view.elementTop(y);this.view.setScrollTop(F-this.view.renderHeight/2);const L=this.view.element(y);if(L.editorAttached)O(y,T,R);else return m(L).then(()=>O(y,T,R))}async _revealLineInCenterAsync(y,T){return this._revealRangeInCenterInternalAsync(y,new D.Range(T,1,T,1),0)}_revealRangeInCenterAsync(y,T){return this._revealRangeInCenterInternalAsync(y,T,1)}async _revealRangeInCenterIfOutsideViewportInternalAsync(y,T,R){const O=(P,V,z)=>{const U=this.view.element(P),H=U.getPositionScrollTopOffset(V.startLineNumber,V.startColumn),K=this.view.elementTop(P)+H;this.view.setScrollTop(K-this.view.renderHeight/2),z===1&&U.revealRangeInCenter(V)},x=this.getViewScrollTop(),F=this.getViewScrollBottom(),M=this.view.elementTop(y),N=this.view.element(y),B=M+N.getPositionScrollTopOffset(T.startLineNumber,T.startColumn);if(B<x||B>F){this.view.setScrollTop(B-this.view.renderHeight/2);const P=this.view.elementTop(y)+N.getPositionScrollTopOffset(T.startLineNumber,T.startColumn);if(this.view.setScrollTop(P-this.view.renderHeight/2),!N.editorAttached)return m(N).then(()=>O(y,T,R))}else if(N.editorAttached)N.revealRangeInCenter(T);else return m(N).then(()=>O(y,T,R))}async _revealInCenterIfOutsideViewportAsync(y){this._revealInternal(y,!0,1);const T=this.view.element(y);if(T.getEditState()===c.CellEditState.Editing&&!T.editorAttached)return m(T)}async _revealLineInCenterIfOutsideViewportAsync(y,T){return this._revealRangeInCenterIfOutsideViewportInternalAsync(y,new D.Range(T,1,T,1),0)}async _revealRangeInCenterIfOutsideViewportAsync(y,T){return this._revealRangeInCenterIfOutsideViewportInternalAsync(y,T,1)}_revealInternal(y,T,R){if(y>=this.view.length)return;const O=this.getViewScrollTop(),x=this.getViewScrollBottom(),F=this.view.elementTop(y),L=this.view.elementHeight(y)+F;if(!(T&&F>=O&&F<x&&!(R===1&&L>x&&F>(O+x)/2)))switch(R){case 0:this.view.setScrollTop(F),this.view.setScrollTop(this.view.elementTop(y));break;case 1:this.view.setScrollTop(F-this.view.renderHeight/2),this.view.setScrollTop(this.view.elementTop(y)-this.view.renderHeight/2);break;case 2:this.view.setScrollTop(this.scrollTop+(L-x)),this.view.setScrollTop(this.scrollTop+(this.view.elementTop(y)+this.view.elementHeight(y)-this.getViewScrollBottom()));break;default:break}}_revealInView(y){const T=this.view.firstVisibleIndex;y<T?this._revealInternal(y,!0,0):this._revealInternal(y,!0,2)}_revealInCenter(y){this._revealInternal(y,!1,1)}_revealInCenterIfOutsideViewport(y){this._revealInternal(y,!0,1)}setCellSelection(y,T){const R=y;R.editorAttached?R.setSelection(T):m(R).then(()=>{R.setSelection(T)})}style(y){const T=this.view.domId;this.styleElement||(this.styleElement=t.createStyleSheet(this.view.domNode));const R=T&&`.${T}`,O=[];y.listBackground&&(y.listBackground.isOpaque()?O.push(`.monaco-list${R} > div.monaco-scrollable-element > .monaco-list-rows { background: ${y.listBackground}; }`):k.isMacintosh||console.warn(`List with id '${T}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`)),y.listFocusBackground&&(O.push(`.monaco-list${R}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { background-color: ${y.listFocusBackground}; }`),O.push(`.monaco-list${R}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused:hover { background-color: ${y.listFocusBackground}; }`)),y.listFocusForeground&&O.push(`.monaco-list${R}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { color: ${y.listFocusForeground}; }`),y.listActiveSelectionBackground&&(O.push(`.monaco-list${R}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { background-color: ${y.listActiveSelectionBackground}; }`),O.push(`.monaco-list${R}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected:hover { background-color: ${y.listActiveSelectionBackground}; }`)),y.listActiveSelectionForeground&&O.push(`.monaco-list${R}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { color: ${y.listActiveSelectionForeground}; }`),y.listFocusAndSelectionBackground&&O.push(` .monaco-drag-image, .monaco-list${R}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected.focused { background-color: ${y.listFocusAndSelectionBackground}; } `),y.listFocusAndSelectionForeground&&O.push(` .monaco-drag-image, .monaco-list${R}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected.focused { color: ${y.listFocusAndSelectionForeground}; } `),y.listInactiveFocusBackground&&(O.push(`.monaco-list${R} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { background-color: ${y.listInactiveFocusBackground}; }`),O.push(`.monaco-list${R} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused:hover { background-color: ${y.listInactiveFocusBackground}; }`)),y.listInactiveSelectionBackground&&(O.push(`.monaco-list${R} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { background-color: ${y.listInactiveSelectionBackground}; }`),O.push(`.monaco-list${R} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected:hover { background-color: ${y.listInactiveSelectionBackground}; }`)),y.listInactiveSelectionForeground&&O.push(`.monaco-list${R} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { color: ${y.listInactiveSelectionForeground}; }`),y.listHoverBackground&&O.push(`.monaco-list${R}:not(.drop-target) > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${y.listHoverBackground}; }`),y.listHoverForeground&&O.push(`.monaco-list${R} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row:hover:not(.selected):not(.focused) { color: ${y.listHoverForeground}; }`),y.listSelectionOutline&&O.push(`.monaco-list${R} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { outline: 1px dotted ${y.listSelectionOutline}; outline-offset: -1px; }`),y.listFocusOutline&&O.push(` .monaco-drag-image, .monaco-list${R}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { outline: 1px solid ${y.listFocusOutline}; outline-offset: -1px; } `),y.listInactiveFocusOutline&&O.push(`.monaco-list${R} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { outline: 1px dotted ${y.listInactiveFocusOutline}; outline-offset: -1px; }`),y.listHoverOutline&&O.push(`.monaco-list${R} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row:hover { outline: 1px dashed ${y.listHoverOutline}; outline-offset: -1px; }`),y.listDropBackground&&O.push(` .monaco-list${R}.drop-target, .monaco-list${R} > div.monaco-scrollable-element > .monaco-list-rows.drop-target, .monaco-list${R} > div.monaco-scrollable-element > .monaco-list-row.drop-target { background-color: ${y.listDropBackground} !important; color: inherit !important; } `),y.listFilterWidgetBackground&&O.push(`.monaco-list-type-filter { background-color: ${y.listFilterWidgetBackground} }`),y.listFilterWidgetOutline&&O.push(`.monaco-list-type-filter { border: 1px solid ${y.listFilterWidgetOutline}; }`),y.listFilterWidgetNoMatchesOutline&&O.push(`.monaco-list-type-filter.no-matches { border: 1px solid ${y.listFilterWidgetNoMatchesOutline}; }`),y.listMatchesShadow&&O.push(`.monaco-list-type-filter { box-shadow: 1px 1px 1px ${y.listMatchesShadow}; }`);const x=O.join(` `);x!==this.styleElement.textContent&&(this.styleElement.textContent=x)}getRenderHeight(){return this.view.renderHeight}getScrollHeight(){return this.view.scrollHeight}layout(y,T){this._isInLayout=!0,super.layout(y,T),this.renderHeight===0?this.view.domNode.style.visibility="hidden":this.view.domNode.style.visibility="initial",this._isInLayout=!1}dispose(){this._isDisposed=!0,this._viewModelStore.dispose(),this._localDisposableStore.dispose(),super.dispose(),this._previousFocusedElements=[],this._viewModel=null,this._hiddenRangeIds=[],this.hiddenRangesPrefixSum=null,this._visibleRanges=[]}};g=Ee([W(8,C.IListService),W(9,o.IThemeService),W(10,w.IConfigurationService),W(11,v.IKeybindingService)],g),e.NotebookCellList=g;class d extends A.Disposable{constructor(y){super();this.list=y}setScrollTop(y){this.list.scrollTop=y}isScrolledToBottom(){return this.list.isScrolledToBottom()}scrollToBottom(){this.list.scrollToBottom()}revealCellRangeInView(y){return this.list.revealElementsInView(y)}revealInView(y){this.list.revealElementInView(y)}revealInViewAtTop(y){this.list.revealElementInViewAtTop(y)}revealInCenterIfOutsideViewport(y){this.list.revealElementInCenterIfOutsideViewport(y)}async revealInCenterIfOutsideViewportAsync(y){return this.list.revealElementInCenterIfOutsideViewportAsync(y)}revealInCenter(y){this.list.revealElementInCenter(y)}async revealLineInViewAsync(y,T){return this.list.revealElementLineInViewAsync(y,T)}async revealLineInCenterAsync(y,T){return this.list.revealElementLineInCenterAsync(y,T)}async revealLineInCenterIfOutsideViewportAsync(y,T){return this.list.revealElementLineInCenterIfOutsideViewportAsync(y,T)}async revealRangeInViewAsync(y,T){return this.list.revealElementRangeInViewAsync(y,T)}async revealRangeInCenterAsync(y,T){return this.list.revealElementRangeInCenterAsync(y,T)}async revealRangeInCenterIfOutsideViewportAsync(y,T){return this.list.revealElementRangeInCenterIfOutsideViewportAsync(y,T)}async revealCellOffsetInCenterAsync(y,T){return this.list.revealElementOffsetInCenterAsync(y,T)}getViewIndex(y){return this.list.getViewIndex(y)??-1}getViewHeight(y){return this.list.viewModel?this.list.elementHeight(y):-1}getCellRangeFromViewRange(y,T){if(!this.list.viewModel)return;const R=this.list.getModelIndex2(y);if(R===void 0)throw new Error(`startIndex ${y} out of boundary`);if(T>=this.list.length){const O=this.list.viewModel.length;return{start:R,end:O}}else{const O=this.list.getModelIndex2(T);if(O===void 0)throw new Error(`endIndex ${T} out of boundary`);return{start:R,end:O}}}getCellsFromViewRange(y,T){if(!this.list.viewModel)return[];const R=this.getCellRangeFromViewRange(y,T);return R?this.list.viewModel.getCellsInRange(R):[]}getCellsInRange(y){return this.list.viewModel?.getCellsInRange(y)??[]}setCellEditorSelection(y,T){this.list.setCellSelection(y,T)}setHiddenAreas(y){return this.list.setHiddenAreas(y,!0)}getVisibleRangesPlusViewportBelow(){return this.list?.getVisibleRangesPlusViewportBelow()??[]}triggerScroll(y){this.list.triggerScrollFromMouseWheelEvent(y)}}e.ListViewInfoAccessor=d;function m(E){return new Promise((y,T)=>{_.Event.once(E.onDidChangeEditorAttachState)(()=>E.editorAttached?y():T())})}function b(){return!!t.findParentWithClass(document.activeElement,"context-view")}}),define(ne[884],re([1,0,15,60,6,2,169,18,14,19,9,89,86,42,387,308,1660,73,16,8,7,37,54,23,41,34,114,570,104,883,2164,2165,424,64,142,202,59,50]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BackLayerWebView=void 0;let B=class extends A.Disposable{constructor(z,U,H,K,G,q,Z,j,X,Y,$,J,ee,te,se,ie,ce,le,ae,ue){super();this.notebookEditor=z,this.id=U,this.documentUri=H,this.options=K,this.rendererMessaging=G,this.webviewService=q,this.openerService=Z,this.notebookService=j,this.contextService=X,this.environmentService=Y,this.fileDialogService=$,this.fileService=J,this.contextMenuService=ee,this.menuService=te,this.contextKeyService=se,this.workspaceTrustManagementService=ie,this.configurationService=ce,this.languageService=le,this.workspaceContextService=ae,this.editorGroupService=ue,this.webview=void 0,this.insetMapping=new Map,this.markupPreviewMapping=new Map,this.hiddenInsetMapping=new Set,this.reversedInsetMapping=new Map,this.localResourceRootsCache=void 0,this._onMessage=this._register(new _.Emitter),this._preloadsCache=new Set,this.onMessage=this._onMessage.event,this._disposed=!1,this.nonce=C.generateUuid(),this.element=document.createElement("div"),this.element.style.height="1400px",this.element.style.position="absolute",G&&(this._register(G),G.receiveMessageHandler=(oe,fe)=>!this.webview||this._disposed?Promise.resolve(!1):(this._sendMessageToWebview({__vscode_notebook_message:!0,type:"customRendererMessage",rendererId:oe,message:fe}),Promise.resolve(!0))),this._register(ie.onDidChangeTrust(oe=>{this._sendMessageToWebview({type:"updateWorkspaceTrust",isTrusted:oe})})),this._register(o.TokenizationRegistry.onDidChange(()=>{this._sendMessageToWebview({type:"tokenizedStylesChanged",css:P()})}))}updateOptions(z){this.options=z,this._updateStyles(),this._updateOptions()}_updateStyles(){this._sendMessageToWebview({type:"notebookStyles",styles:this._generateStyles()})}_updateOptions(){this._sendMessageToWebview({type:"notebookOptions",options:{dragAndDropEnabled:this.options.dragAndDropEnabled}})}_generateStyles(){return{"notebook-output-left-margin":`${this.options.leftMargin+this.options.runGutter}px`,"notebook-output-width":`calc(100% - ${this.options.leftMargin+this.options.rightMargin+this.options.runGutter}px)`,"notebook-output-node-padding":`${this.options.outputNodePadding}px`,"notebook-run-gutter":`${this.options.runGutter}px`,"notebook-preview-node-padding":`${this.options.previewNodePadding}px`,"notebook-markdown-left-margin":`${this.options.markdownLeftMargin}px`,"notebook-output-node-left-padding":`${this.options.outputNodeLeftPadding}px`,"notebook-markdown-min-height":`${this.options.previewNodePadding*2}px`,"notebook-markup-font-size":typeof this.options.markupFontSize=="number"&&this.options.markupFontSize>0?`${this.options.markupFontSize}px`:`calc(${this.options.fontSize}px * 1.2)`,"notebook-cell-output-font-size":`${this.options.fontSize}px`,"notebook-cell-output-font-family":this.options.fontFamily,"notebook-cell-markup-empty-content":s.localize(0,null),"notebook-cell-renderer-not-found-error":s.localize(1,null)}}generateContent(z,U){const H=this.getRendererData(),K=(0,T.preloadsScriptStr)(this.options,{dragAndDropEnabled:this.options.dragAndDropEnabled},H,this.workspaceTrustManagementService.isWorkspaceTrusted(),this.configurationService.getValue(x.NotebookSetting.textOutputLineLimit)??30,this.nonce),G=this.configurationService.getValue("notebook.experimental.enableCsp");return` <html lang="en"> <head> <meta charset="UTF-8"> <base href="${U}/" /> ${G?`<meta http-equiv="Content-Security-Policy" content=" default-src 'none'; script-src ${b.webviewGenericCspSource} 'unsafe-inline' 'unsafe-eval'; style-src ${b.webviewGenericCspSource} 'unsafe-inline'; img-src ${b.webviewGenericCspSource} https: http: data:; font-src ${b.webviewGenericCspSource} https:; connect-src https:; child-src https: data:; ">`:""} <style nonce="${this.nonce}"> ::highlight(find-highlight) { background-color: var(--vscode-editor-findMatchHighlightBackground); } ::highlight(current-find-highlight) { background-color: var(--vscode-editor-findMatchBackground); } #container .cell_container { width: 100%; } #container .output_container { width: 100%; } #container > div > div > div.output { font-size: var(--notebook-cell-output-font-size); width: var(--notebook-output-width); margin-left: var(--notebook-output-left-margin); padding-top: var(--notebook-output-node-padding); padding-right: var(--notebook-output-node-padding); padding-bottom: var(--notebook-output-node-padding); padding-left: var(--notebook-output-node-left-padding); box-sizing: border-box; border-top: none !important; border: 1px solid var(--theme-notebook-output-border); background-color: var(--theme-notebook-output-background); } /* markdown */ #container div.preview { width: 100%; padding-right: var(--notebook-preview-node-padding); padding-left: var(--notebook-markdown-left-margin); padding-top: var(--notebook-preview-node-padding); padding-bottom: var(--notebook-preview-node-padding); box-sizing: border-box; white-space: nowrap; overflow: hidden; white-space: initial; font-size: var(--notebook-markup-font-size); color: var(--theme-ui-foreground); } #container div.preview.draggable { user-select: none; -webkit-user-select: none; -ms-user-select: none; cursor: grab; } #container div.preview.selected { background: var(--theme-notebook-cell-selected-background); } #container div.preview.dragging { background-color: var(--theme-background); opacity: 0.5 !important; } .monaco-workbench.vs-dark .notebookOverlay .cell.markdown .latex img, .monaco-workbench.vs-dark .notebookOverlay .cell.markdown .latex-block img { filter: brightness(0) invert(1) } #container > div.nb-symbolHighlight { background-color: var(--theme-notebook-symbol-highlight-background); } #container > div.nb-cellDeleted .output_container { background-color: var(--theme-notebook-diff-removed-background); } #container > div.nb-cellAdded .output_container { background-color: var(--theme-notebook-diff-inserted-background); } #container > div > div:not(.preview) > div { overflow-x: auto; } #container .no-renderer-error { color: var(--vscode-editorError-foreground); } body { padding: 0px; height: 100%; width: 100%; } table, thead, tr, th, td, tbody { border: none !important; border-color: transparent; border-spacing: 0; border-collapse: collapse; } table, th, tr { vertical-align: middle; text-align: right; } thead { font-weight: bold; background-color: rgba(130, 130, 130, 0.16); } th, td { padding: 4px 8px; } tr:nth-child(even) { background-color: rgba(130, 130, 130, 0.08); } tbody th { font-weight: normal; } .find-match { background-color: var(--vscode-editor-findMatchHighlightBackground); } .current-find-match { background-color: var(--vscode-editor-findMatchBackground); } #_defaultColorPalatte { color: var(--vscode-editor-findMatchHighlightBackground); background-color: var(--vscode-editor-findMatchBackground); } </style> <style id="vscode-tokenization-styles" nonce="${this.nonce}">${P()}</style> </head> <body style="overflow: hidden;"> <script> self.require = {}; <\/script> ${z} <div id='findStart' tabIndex=-1></div> <div id='container' class="widgetarea" style="position: absolute;width:100%;top: 0px"></div> <script type="module">${K}<\/script> <div id="container" class="widgetarea" style="position: absolute; width:100%; top: 0px"></div> <div id="_defaultColorPalatte"></div> </body> </html>`}getRendererData(){return this.notebookService.getRenderers().map(z=>{const U=this.asWebviewUri(z.entrypoint,z.extensionLocation).toString();return{id:z.id,entrypoint:U,mimeTypes:z.mimeTypes,extends:z.extends,messaging:z.messaging!=="never",isBuiltin:z.isBuiltin}})}asWebviewUri(z,U){return(0,b.asWebviewUri)(z,U?.scheme===D.Schemas.vscodeRemote?{isRemote:!0,authority:U.authority}:void 0)}postKernelMessage(z){this._sendMessageToWebview({__vscode_notebook_message:!0,type:"customKernelMessage",message:z})}resolveOutputId(z){const U=this.reversedInsetMapping.get(z);return U?{cellInfo:this.insetMapping.get(U).cellInfo,output:U}:void 0}isResolved(){return!!this.webview}async createWebview(){const z=this.asWebviewUri((0,w.dirname)(this.documentUri),void 0);if(!this.documentUri.path.toLowerCase().endsWith(".ipynb")){const K=this.generateContent("",z.toString());this._initialize(K);return}let U="",H;if(this._initialized=new Promise(K=>{H=K}),I.isWeb){const K=D.FileAccess.asBrowserUri("vs/loader.js",Q);fetch(K.toString(!0)).then(async G=>{if(G.status!==200)throw new Error(G.statusText);U=` <script> ${await G.text()} <\/script> <script> var requirejs = (function() { return require; }()); <\/script> `;const Z=this.generateContent(U,z.toString());this._initialize(Z),H()},G=>{const q=this.generateContent(U,z.toString());this._initialize(q),H()})}else{const K=D.FileAccess.asFileUri("vs/loader.js",Q);U=`<script src="${this.asWebviewUri(K,void 0)}"><\/script><script> var requirejs = (function() { return require; }()); <\/script>`;const q=this.generateContent(U,z.toString());this._initialize(q),H()}await this._initialized}getBuiltinLocalResourceRoots(){return this.documentUri.path.toLowerCase().endsWith(".ipynb")?I.isWeb?[]:[(0,w.dirname)(D.FileAccess.asFileUri("vs/loader.js",Q))]:[]}_initialize(z){if(!document.body.contains(this.element))throw new Error("Element is already detached from the DOM tree");this.webview=this._createInset(this.webviewService,z),this.webview.mountTo(this.element),this._register(this.webview),this._register(this.webview.onDidClickLink(U=>{if(!this._disposed&&!!U){if((0,g.matchesScheme)(U,D.Schemas.command)){const H=/command\:workbench\.action\.openLargeOutput\?(.*)/.exec(U);if(H&&H.length===2){const K=H[1];this.openerService.open(x.CellUri.generateCellOutputUri(this.documentUri,K));return}console.warn("Command links are deprecated and will be removed, use message passing instead: https://github.com/microsoft/vscode/issues/123601")}(0,g.matchesScheme)(U,D.Schemas.command)?this.workspaceTrustManagementService.isWorkspaceTrusted()?this.openerService.open(U,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:!0}):console.warn("Command links are disabled in untrusted workspaces"):(0,g.matchesSomeScheme)(U,D.Schemas.vscodeNotebookCell,D.Schemas.http,D.Schemas.https,D.Schemas.mailto)&&this.openerService.open(U,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:!0})}})),this._register(this.webview.onMessage(U=>{const H=U.message;if(!this._disposed&&!!H.__vscode_notebook_message)switch(H.type){case"initialized":{this.initializeWebViewState();break}case"dimension":{for(const K of H.updates){const G=K.height;if(K.isOutput){const q=this.resolveOutputId(K.id);if(q){const{cellInfo:Z,output:j}=q;this.notebookEditor.updateOutputHeight(Z,j,G,!!K.init,"webview#dimension"),this.notebookEditor.scheduleOutputHeightAck(Z,K.id,G)}}else this.notebookEditor.updateMarkupCellHeight(K.id,G,!!K.init)}break}case"mouseenter":{const K=this.resolveOutputId(H.id);if(K){const G=this.notebookEditor.getCellByInfo(K.cellInfo);G&&(G.outputIsHovered=!0)}break}case"mouseleave":{const K=this.resolveOutputId(H.id);if(K){const G=this.notebookEditor.getCellByInfo(K.cellInfo);G&&(G.outputIsHovered=!1)}break}case"outputFocus":{const K=this.resolveOutputId(H.id);if(K){const G=this.notebookEditor.getCellByInfo(K.cellInfo);G&&(G.outputIsFocused=!0)}break}case"outputBlur":{const K=this.resolveOutputId(H.id);if(K){const G=this.notebookEditor.getCellByInfo(K.cellInfo);G&&(G.outputIsFocused=!1)}break}case"scroll-ack":break;case"scroll-to-reveal":{this.notebookEditor.setScrollTop(H.scrollTop-y.NOTEBOOK_WEBVIEW_BOUNDARY);break}case"did-scroll-wheel":{this.notebookEditor.triggerScroll({...H.payload,preventDefault:()=>{},stopPropagation:()=>{}});break}case"focus-editor":{const K=this.notebookEditor.getCellById(H.cellId);K&&(H.focusNext?this.notebookEditor.focusNextNotebookCell(K,"editor"):this.notebookEditor.focusNotebookCell(K,"editor"));break}case"clicked-data-url":{this._onDidClickDataLink(H);break}case"clicked-link":{let K;if((0,g.matchesScheme)(H.href,D.Schemas.command)){const G=/command\:workbench\.action\.openLargeOutput\?(.*)/.exec(H.href);if(G&&G.length===2){const q=G[1],Z=this.editorGroupService.activeGroup;Z&&Z.activeEditor&&Z.pinEditor(Z.activeEditor),this.openerService.open(x.CellUri.generateCellOutputUri(this.documentUri,q));return}}if((0,g.matchesSomeScheme)(H.href,D.Schemas.http,D.Schemas.https,D.Schemas.mailto,D.Schemas.command,D.Schemas.vscodeNotebookCell,D.Schemas.vscodeNotebook))K=H.href;else if(!/^[\w\-]+:/.test(H.href))if(this.documentUri.scheme===D.Schemas.untitled){const G=this.workspaceContextService.getWorkspace().folders;if(!G.length)return;K=v.URI.joinPath(G[0].uri,H.href)}else if(H.href.startsWith("/")){let G=this.workspaceContextService.getWorkspaceFolder(this.documentUri);if(!G){const q=this.workspaceContextService.getWorkspace().folders;if(!q.length)return;G=q[0]}K=v.URI.joinPath(G.uri,H.href)}else K=v.URI.joinPath((0,w.dirname)(this.documentUri),H.href);K&&this.openerService.open(K,{fromUserGesture:!0,allowCommands:!0});break}case"customKernelMessage":{this._onMessage.fire({message:H.message});break}case"customRendererMessage":{this.rendererMessaging?.postMessage(H.rendererId,H.message);break}case"clickMarkupCell":{const K=this.notebookEditor.getCellById(H.cellId);K&&(H.shiftKey||(I.isMacintosh?H.metaKey:H.ctrlKey)?this.notebookEditor.toggleNotebookCellSelection(K,H.shiftKey):this.notebookEditor.focusNotebookCell(K,"container",{skipReveal:!0}));break}case"contextMenuMarkupCell":{const K=this.notebookEditor.getCellById(H.cellId);if(K){this.notebookEditor.focusNotebookCell(K,"container",{skipReveal:!0});const G=this.element.getBoundingClientRect();this.contextMenuService.showContextMenu({getActions:()=>{const q=[],Z=this.menuService.createMenu(r.MenuId.NotebookCellTitle,this.contextKeyService);return(0,l.createAndFillInContextMenuActions)(Z,void 0,q),Z.dispose(),q},getAnchor:()=>({x:G.x+H.clientX,y:G.y+H.clientY})})}break}case"toggleMarkupPreview":{const K=this.notebookEditor.getCellById(H.cellId);K&&!this.notebookEditor.creationOptions.isReadOnly&&(this.notebookEditor.setMarkupCellEditState(H.cellId,E.CellEditState.Editing),this.notebookEditor.focusNotebookCell(K,"editor",{skipReveal:!0}));break}case"mouseEnterMarkupCell":{const K=this.notebookEditor.getCellById(H.cellId);K instanceof O.MarkupCellViewModel&&(K.cellIsHovered=!0);break}case"mouseLeaveMarkupCell":{const K=this.notebookEditor.getCellById(H.cellId);K instanceof O.MarkupCellViewModel&&(K.cellIsHovered=!1);break}case"cell-drag-start":{this.notebookEditor.didStartDragMarkupCell(H.cellId,H);break}case"cell-drag":{this.notebookEditor.didDragMarkupCell(H.cellId,H);break}case"cell-drop":{this.notebookEditor.didDropMarkupCell(H.cellId,{dragOffsetY:H.dragOffsetY,ctrlKey:H.ctrlKey,altKey:H.altKey});break}case"cell-drag-end":{this.notebookEditor.didEndDragMarkupCell(H.cellId);break}case"renderedMarkup":{const K=this.notebookEditor.getCellById(H.cellId);K instanceof O.MarkupCellViewModel&&(K.renderedHtml=H.html),this._handleHighlightCodeBlock(H.codeBlocks);break}case"renderedCellOutput":{this._handleHighlightCodeBlock(H.codeBlocks);break}}}))}_handleHighlightCodeBlock(z){for(const{id:U,value:H,lang:K}of z){const G=this.languageService.getLanguageIdByLanguageName(K);!G||(0,S.tokenizeToString)(this.languageService,H,G).then(q=>{this._disposed||this._sendMessageToWebview({type:"tokenizedCodeBlock",html:q,codeBlockId:U})})}}async _onDidClickDataLink(z){if(typeof z.data!="string")return;const[U,H]=z.data.split(";base64,");if(!H||!U)return;const K=(0,w.dirname)(this.documentUri);let G;if(z.downloadName)G=z.downloadName;else{const X=U.replace(/^data:/,""),Y=X&&(0,k.getExtensionForMimeType)(X);G=Y?`download${Y}`:"download"}const q=(0,w.joinPath)(K,G),Z=await this.fileDialogService.showSaveDialog({defaultUri:q});if(!Z)return;const j=(0,f.decodeBase64)(H);await this.fileService.writeFile(Z,j),await this.openerService.open(Z)}_createInset(z,U){const H=this.contextService.getWorkspace().folders.map(G=>G.uri);this.localResourceRootsCache=[...this.notebookService.getNotebookProviderResourceRoots(),...this.notebookService.getRenderers().map(G=>(0,w.dirname)(G.entrypoint)),...H,...this.getBuiltinLocalResourceRoots()];const K=z.createWebviewElement(this.id,{purpose:"notebookRenderer",enableFindWidget:!1,transformCssVariables:R.transformWebviewThemeVars},{allowMultipleAPIAcquire:!0,allowScripts:!0,localResourceRoots:this.localResourceRootsCache},void 0);return K.html=U,K}initializeWebViewState(){const z=new Set;for(const H of this.insetMapping.values())H.renderer&&z.add(H.renderer);this._preloadsCache.clear(),this._currentKernel&&this._updatePreloadsFromKernel(this._currentKernel);for(const[H,K]of this.insetMapping.entries())this._sendMessageToWebview({...K.cachedCreation,initiallyHidden:this.hiddenInsetMapping.has(H)});const U=[...this.markupPreviewMapping.values()];this.markupPreviewMapping.clear(),this.initializeMarkup(U),this._updateStyles(),this._updateOptions()}shouldUpdateInset(z,U,H,K){if(this._disposed||"isOutputCollapsed"in z&&z.isOutputCollapsed)return!1;if(this.hiddenInsetMapping.has(U))return!0;const G=this.insetMapping.get(U);return!(!G||K===G.cachedCreation.outputOffset&&H===G.cachedCreation.cellTop)}ackHeight(z){this._sendMessageToWebview({type:"ack-dimension",updates:z})}updateScrollTops(z,U){if(this._disposed)return;const H=(0,t.coalesce)(z.map(K=>{const G=this.insetMapping.get(K.output);if(!G||!K.forceDisplay&&!this.shouldUpdateInset(K.cell,K.output,K.cellTop,K.outputOffset))return;const q=G.outputId;return G.cachedCreation.cellTop=K.cellTop,G.cachedCreation.outputOffset=K.outputOffset,this.hiddenInsetMapping.delete(K.output),{cellId:K.cell.id,outputId:q,cellTop:K.cellTop,outputOffset:K.outputOffset,forceDisplay:K.forceDisplay}}));!H.length&&!U.length||this._sendMessageToWebview({type:"view-scroll",widgets:H,markupCells:U})}async createMarkupPreview(z){if(!this._disposed){if(this.markupPreviewMapping.has(z.cellId)){console.error("Trying to create markup preview that already exists");return}this.markupPreviewMapping.set(z.cellId,z),this._sendMessageToWebview({type:"createMarkupCell",cell:z})}}async showMarkupPreview(z){if(this._disposed)return;const U=this.markupPreviewMapping.get(z.cellId);if(!U)return this.createMarkupPreview(z);const H=z.content===U.content;(!H||!U.visible)&&this._sendMessageToWebview({type:"showMarkupCell",id:z.cellId,handle:z.cellHandle,content:H?void 0:z.content,top:z.offset}),U.content=z.content,U.offset=z.offset,U.visible=!0}async hideMarkupPreviews(z){if(this._disposed)return;const U=[];for(const H of z){const K=this.markupPreviewMapping.get(H);K&&K.visible&&(U.push(H),K.visible=!1)}U.length&&this._sendMessageToWebview({type:"hideMarkupCells",ids:U})}async unhideMarkupPreviews(z){if(this._disposed)return;const U=[];for(const H of z){const K=this.markupPreviewMapping.get(H);K?K.visible||(K.visible=!0,U.push(H)):console.error(`Trying to unhide a preview that does not exist: ${H}`)}this._sendMessageToWebview({type:"unhideMarkupCells",ids:U})}async deleteMarkupPreviews(z){if(!this._disposed){for(const U of z)this.markupPreviewMapping.has(U)||console.error(`Trying to delete a preview that does not exist: ${U}`),this.markupPreviewMapping.delete(U);z.length&&this._sendMessageToWebview({type:"deleteMarkupCell",ids:z})}}async updateMarkupPreviewSelections(z){this._disposed||this._sendMessageToWebview({type:"updateSelectedMarkupCells",selectedCellIds:z.filter(U=>this.markupPreviewMapping.has(U))})}async initializeMarkup(z){if(this._disposed)return;const U=new Promise(H=>{const K=this.webview?.onMessage(G=>{G.message.type==="initializedMarkup"&&(H(),K?.dispose())})});for(const H of z)this.markupPreviewMapping.set(H.cellId,H);this._sendMessageToWebview({type:"initializeMarkup",cells:z}),await U}async createOutput(z,U,H,K){if(this._disposed)return;if(this.insetMapping.has(U.source)){const j=this.insetMapping.get(U.source);if(j){this.hiddenInsetMapping.delete(U.source),this._sendMessageToWebview({type:"showOutput",cellId:j.cellInfo.cellId,outputId:j.outputId,cellTop:H,outputOffset:K});return}}const G={type:"html",cellId:z.cellId,cellTop:H,outputOffset:K,left:0,requiredPreloads:[]};let q,Z;if(U.type===1){const j=U.source.model;Z=U.renderer;const X=j.outputs.find(Y=>Y.mime===U.mimeType);q={...G,outputId:j.outputId,rendererId:U.renderer.id,content:{type:1,outputId:j.outputId,mimeType:X.mime,valueBytes:X.data.buffer,metadata:j.metadata}}}else q={...G,outputId:C.generateUuid(),content:{type:U.type,htmlContent:U.htmlContent}};this._sendMessageToWebview(q),this.insetMapping.set(U.source,{outputId:q.outputId,cellInfo:z,renderer:Z,cachedCreation:q}),this.hiddenInsetMapping.delete(U.source),this.reversedInsetMapping.set(q.outputId,U.source)}async updateOutput(z,U,H,K){if(this._disposed)return;if(!this.insetMapping.has(U.source)){this.createOutput(z,U,H,K);return}const G=this.insetMapping.get(U.source);this.hiddenInsetMapping.delete(U.source);let q;if(U.type===1){const Z=U.source.model,j=Z.outputs.find(X=>X.mime===U.mimeType);q={type:1,outputId:G.outputId,mimeType:j.mime,valueBytes:j.data.buffer,metadata:Z.metadata}}this._sendMessageToWebview({type:"showOutput",cellId:G.cellInfo.cellId,outputId:G.outputId,cellTop:H,outputOffset:K,content:q})}removeInsets(z){if(!this._disposed)for(const U of z){const H=this.insetMapping.get(U);if(!H)continue;const K=H.outputId;this._sendMessageToWebview({type:"clearOutput",rendererId:H.cachedCreation.rendererId,cellUri:H.cellInfo.cellUri.toString(),outputId:K,cellId:H.cellInfo.cellId}),this.insetMapping.delete(U),this.reversedInsetMapping.delete(K)}}hideInset(z){if(this._disposed)return;const U=this.insetMapping.get(z);!U||(this.hiddenInsetMapping.add(z),this._sendMessageToWebview({type:"hideOutput",outputId:U.outputId,cellId:U.cellInfo.cellId}))}clearInsets(){this._disposed||(this._sendMessageToWebview({type:"clear"}),this.insetMapping=new Map,this.reversedInsetMapping=new Map)}focusWebview(){this._disposed||this.webview?.focus()}focusOutput(z){this._disposed||(this.webview?.focus(),setTimeout(()=>{this._sendMessageToWebview({type:"focus-output",cellId:z})},50))}async find(z,U){if(z==="")return[];const H=new Promise(G=>{const q=this.webview?.onMessage(Z=>{Z.message.type==="didFind"&&(G(Z.message.matches),q?.dispose())})});return this._sendMessageToWebview({type:"find",query:z,options:U}),await H}findStop(){this._sendMessageToWebview({type:"findStop"})}async findHighlight(z){const U=new Promise(K=>{const G=this.webview?.onMessage(q=>{q.message.type==="didFindHighlight"&&(K(q.message.offset),G?.dispose())})});return this._sendMessageToWebview({type:"findHighlight",index:z}),await U}async findUnHighlight(z){this._sendMessageToWebview({type:"findUnHighlight",index:z})}deltaCellOutputContainerClassNames(z,U,H){this._sendMessageToWebview({type:"decorations",cellId:z,addedClassNames:U,removedClassNames:H})}async updateKernelPreloads(z){if(this._disposed||z===this._currentKernel)return;const U=this._currentKernel;this._currentKernel=z,U&&U.preloadUris.length>0?this.webview?.reload():z&&this._updatePreloadsFromKernel(z)}_updatePreloadsFromKernel(z){const U=[];for(const H of z.preloadUris){const K=this.environmentService.isExtensionDevelopment&&(H.scheme==="http"||H.scheme==="https")?H:this.asWebviewUri(H,void 0);this._preloadsCache.has(K.toString())||(U.push({uri:K.toString(),originalUri:H.toString()}),this._preloadsCache.add(K.toString()))}!U.length||this._updatePreloads(U)}_updatePreloads(z){if(!this.webview)return;const U=[...this.localResourceRootsCache||[],...this._currentKernel?[this._currentKernel.localResourceRoot]:[]];this.webview.localResourcesRoot=U,this._sendMessageToWebview({type:"preload",resources:z})}_sendMessageToWebview(z){this._disposed||this.webview?.postMessage(z)}clearPreloadsCache(){this._preloadsCache.clear()}dispose(){this._disposed=!0,this.webview?.dispose(),super.dispose()}};B=Ee([W(5,L.IWebviewService),W(6,g.IOpenerService),W(7,F.INotebookService),W(8,d.IWorkspaceContextService),W(9,N.IWorkbenchEnvironmentService),W(10,n.IFileDialogService),W(11,h.IFileService),W(12,a.IContextMenuService),W(13,r.IMenuService),W(14,u.IContextKeyService),W(15,m.IWorkspaceTrustManagementService),W(16,p.IConfigurationService),W(17,c.ILanguageService),W(18,d.IWorkspaceContextService),W(19,M.IEditorGroupsService)],B),e.BackLayerWebView=B;function P(){const V=o.TokenizationRegistry.getColorMap();return V?(0,i.generateTokensCSSForColorMap)(V):""}}),define(ne[2440],re([1,0,143,22,6,2,195,29,140,20,394,692,93,61,5,147,104,2166,423,424,64,268,488]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createCellViewModel=e.NotebookViewModel=void 0;const h=()=>{throw new Error("Invalid change accessor")};class g{constructor(){this._decorationsTree=new C.IntervalTree}intervalSearch(R,O,x,F,L){return this._decorationsTree.intervalSearch(R,O,x,F,L)}search(R,O,x,F){return this._decorationsTree.search(R,O,F)}collectNodesFromOwner(R){return this._decorationsTree.collectNodesFromOwner(R)}collectNodesPostOrder(){return this._decorationsTree.collectNodesPostOrder()}insert(R){this._decorationsTree.insert(R)}delete(R){this._decorationsTree.delete(R)}resolveNode(R,O){this._decorationsTree.resolveNode(R,O)}acceptReplace(R,O,x,F){this._decorationsTree.acceptReplace(R,O,x,F)}}const d=[o.ModelDecorationOptions.register({description:"notebook-view-model-tracked-range-always-grows-when-typing-at-edges",stickiness:0}),o.ModelDecorationOptions.register({description:"notebook-view-model-tracked-range-never-grows-when-typing-at-edges",stickiness:1}),o.ModelDecorationOptions.register({description:"notebook-view-model-tracked-range-grows-only-when-typing-before",stickiness:2}),o.ModelDecorationOptions.register({description:"notebook-view-model-tracked-range-grows-only-when-typing-after",stickiness:3})];function m(T){return T instanceof o.ModelDecorationOptions?T:o.ModelDecorationOptions.createDynamic(T)}let b=0,E=class extends A.Disposable{constructor(R,O,x,F,L,M,N,B,P){super();this.viewType=R,this._notebook=O,this._viewContext=x,this._layoutInfo=F,this._options=L,this._instantiationService=M,this._bulkEditService=N,this._undoService=B,this._textModelService=P,this._localStore=this._register(new A.DisposableStore),this._handleToViewCellMapping=new Map,this._onDidChangeOptions=this._register(new _.Emitter),this._viewCells=[],this._onDidChangeViewCells=this._register(new _.Emitter),this._lastNotebookEditResource=[],this._onDidChangeSelection=this._register(new _.Emitter),this._selectionCollection=new l.NotebookCellSelectionCollection,this._decorationsTree=new g,this._decorations=Object.create(null),this._lastDecorationId=0,this._foldingRanges=null,this._hiddenRanges=[],this._focused=!0,this._decorationIdToCellMap=new Map,this._statusBarItemIdToCellMap=new Map,b++,this.id="$notebookViewModel"+b,this._instanceId=D.singleLetterHash(b);const V=(z,U)=>{const H=z.map(Z=>[Z[0],Z[1],Z[2].map(j=>y(this._instantiationService,this,j,this._viewContext))]);H.reverse().forEach(Z=>{const j=this._viewCells.splice(Z[0],Z[1],...Z[2]);this._decorationsTree.acceptReplace(Z[0],Z[1],Z[2].length,!0),j.forEach(X=>{this._handleToViewCellMapping.delete(X.handle),X.dispose()}),Z[2].forEach(X=>{this._handleToViewCellMapping.set(X.handle,X),this._localStore.add(X)})});const K=this.selectionHandles;this._onDidChangeViewCells.fire({synchronous:U,splices:H});let G=[];if(K.length){const Z=K[0],j=this._viewCells.indexOf(this.getCellByHandle(Z));G=[Z];let X=0;for(let Y=0;Y<H.length;Y++){const $=H[0];if($[0]+$[1]<=j){X+=$[2].length-$[1];continue}if($[0]>j){G=[Z];break}if($[0]+$[1]>j){G=[this._viewCells[$[0]+X].handle];break}}}const q=G.map(Z=>this._viewCells.findIndex(j=>j.handle===Z));this._selectionCollection.setState((0,a.cellIndexesToRanges)([q[0]])[0],(0,a.cellIndexesToRanges)(q),!0,"model")};this._register(this._notebook.onDidChangeContent(z=>{for(let U=0;U<z.rawEvents.length;U++){const H=z.rawEvents[U];let K=[];const G=z.synchronous??!0;if(H.kind===u.NotebookCellsChangeType.ModelChange||H.kind===u.NotebookCellsChangeType.Initialize){K=H.changes,V(K,G);continue}else if(H.kind===u.NotebookCellsChangeType.Move)V([[H.index,H.length,[]]],G),V([[H.newIdx,0,H.cells]],G);else continue}})),this._register(this._notebook.onDidChangeContent(z=>{z.rawEvents.forEach(U=>{U.kind===u.NotebookCellsChangeType.ChangeDocumentMetadata&&this._viewContext.eventDispatcher.emit([new n.NotebookMetadataChangedEvent(this._notebook.metadata)])}),z.endSelectionState&&this.updateSelectionsState(z.endSelectionState)})),this._register(this._viewContext.eventDispatcher.onDidChangeLayout(z=>{this._layoutInfo=z.value,this._viewCells.forEach(U=>{U.cellKind===u.CellKind.Markup?(z.source.width||z.source.fontInfo)&&U.layoutChange({outerWidth:z.value.width,font:z.value.fontInfo}):z.source.width!==void 0&&U.layoutChange({outerWidth:z.value.width,font:z.value.fontInfo})})})),this._register(this._viewContext.notebookOptions.onDidChangeOptions(z=>{for(let U=0;U<this.length;U++)this._viewCells[U].updateOptions(z)})),this._register(this._selectionCollection.onDidChangeSelection(z=>{this._onDidChangeSelection.fire(z)})),this._viewCells=this._notebook.cells.map(z=>y(this._instantiationService,this,z,this._viewContext)),this._viewCells.forEach(z=>{this._handleToViewCellMapping.set(z.handle,z)})}get options(){return this._options}get onDidChangeOptions(){return this._onDidChangeOptions.event}get viewCells(){return this._viewCells}set viewCells(R){throw new Error("NotebookViewModel.viewCells is readonly")}get length(){return this._viewCells.length}get notebookDocument(){return this._notebook}get uri(){return this._notebook.uri}get metadata(){return this._notebook.metadata}get onDidChangeViewCells(){return this._onDidChangeViewCells.event}get lastNotebookEditResource(){return this._lastNotebookEditResource.length?this._lastNotebookEditResource[this._lastNotebookEditResource.length-1]:null}get layoutInfo(){return this._layoutInfo}get onDidChangeSelection(){return this._onDidChangeSelection.event}get selectionHandles(){const R=new Set,O=[];return(0,a.cellRangesToIndexes)(this._selectionCollection.selections).map(x=>x<this.length?this.cellAt(x):void 0).forEach(x=>{x&&!R.has(x.handle)&&O.push(x.handle)}),O}set selectionHandles(R){const O=R.map(x=>this._viewCells.findIndex(F=>F.handle===x));this._selectionCollection.setSelections((0,a.cellIndexesToRanges)(O),!0,"model")}get focused(){return this._focused}updateOptions(R){this._options={...this._options,...R},this._onDidChangeOptions.fire()}getFocus(){return this._selectionCollection.focus}getSelections(){return this._selectionCollection.selections}setEditorFocus(R){this._focused=R}validateRange(R){if(!R)return null;const O=(0,k.clamp)(R.start,0,this.length),x=(0,k.clamp)(R.end,0,this.length);return O===x?null:O<x?{start:O,end:x}:{start:x,end:O}}updateSelectionsState(R,O="model"){if(this._focused||O==="model")if(R.kind===u.SelectionStateType.Handle){const x=R.primary!==null?this.getCellIndexByHandle(R.primary):null,F=x!==null?this.validateRange({start:x,end:x+1}):null,L=(0,a.cellIndexesToRanges)(R.selections.map(M=>this.getCellIndexByHandle(M))).map(M=>this.validateRange(M)).filter(M=>M!==null);this._selectionCollection.setState(F,(0,a.reduceCellRanges)(L),!0,O)}else{const x=this.validateRange(R.focus),F=R.selections.map(L=>this.validateRange(L)).filter(L=>L!==null);this._selectionCollection.setState(x,(0,a.reduceCellRanges)(F),!0,O)}}getFoldingStartIndex(R){if(!this._foldingRanges)return-1;const O=this._foldingRanges.findRange(R+1);return this._foldingRanges.getStartLineNumber(O)-1}getFoldingState(R){if(!this._foldingRanges)return 0;const O=this._foldingRanges.findRange(R+1);return this._foldingRanges.getStartLineNumber(O)-1!==R?0:this._foldingRanges.isCollapsed(O)?2:1}getFoldedLength(R){if(!this._foldingRanges)return 0;const O=this._foldingRanges.findRange(R+1),x=this._foldingRanges.getStartLineNumber(O)-1;return this._foldingRanges.getEndLineNumber(O)-1-x}updateFoldingRanges(R){this._foldingRanges=R;let O=!1;const x=[];let F=0,L=0,M=Number.MAX_VALUE,N=-1;for(;F<R.length;F++){if(!R.isCollapsed(F))continue;const B=R.getStartLineNumber(F)+1,P=R.getEndLineNumber(F);M<=B&&P<=N||(!O&&L<this._hiddenRanges.length&&this._hiddenRanges[L].start+1===B&&this._hiddenRanges[L].end+1===P?(x.push(this._hiddenRanges[L]),L++):(O=!0,x.push({start:B-1,end:P-1})),M=B,N=P)}(O||L<this._hiddenRanges.length)&&(this._hiddenRanges=x),this._viewCells.forEach(B=>{B.cellKind===u.CellKind.Markup&&B.triggerFoldingStateChange()})}getHiddenRanges(){return this._hiddenRanges}getCellByHandle(R){return this._handleToViewCellMapping.get(R)}getCellIndexByHandle(R){return this._viewCells.findIndex(O=>O.handle===R)}getCellIndex(R){return this._viewCells.indexOf(R)}cellAt(R){return this._viewCells[R]}getCellsInRange(R){if(!R)return this._viewCells.slice(0);const O=this.validateRange(R);if(O){const x=[];for(let F=O.start;F<O.end;F++)x.push(this._viewCells[F]);return x}return[]}getNearestVisibleCellIndexUpwards(R){for(let O=this._hiddenRanges.length-1;O>=0;O--){const x=this._hiddenRanges[O],F=x.start-1,L=x.end;if(!(F>R)){if(F<=R&&L>=R)return R;break}}return R}getNextVisibleCellIndex(R){for(let O=0;O<this._hiddenRanges.length;O++){const x=this._hiddenRanges[O],F=x.start-1,L=x.end;if(!(L<R)){if(F<=R)return L+1;break}}return R+1}getPreviousVisibleCellIndex(R){for(let O=this._hiddenRanges.length-1;O>=0;O--){const x=this._hiddenRanges[O],F=x.start-1;if(x.end<R)return R;if(F<=R)return F}return R}hasCell(R){return this._handleToViewCellMapping.has(R.handle)}getVersionId(){return this._notebook.versionId}getAlternativeId(){return this._notebook.alternativeVersionId}getTrackedRange(R){return this._getDecorationRange(R)}_getDecorationRange(R){const O=this._decorations[R];if(!O)return null;const x=this.getVersionId();return O.cachedVersionId!==x&&this._decorationsTree.resolveNode(O,x),O.range===null?{start:O.cachedAbsoluteStart-1,end:O.cachedAbsoluteEnd-1}:{start:O.range.startLineNumber-1,end:O.range.endLineNumber-1}}setTrackedRange(R,O,x){const F=R?this._decorations[R]:null;return F?O?(this._decorationsTree.delete(F),F.reset(this.getVersionId(),O.start,O.end+1,new w.Range(O.start+1,1,O.end+1,1)),F.setOptions(d[x]),this._decorationsTree.insert(F),F.id):(this._decorationsTree.delete(F),delete this._decorations[F.id],null):O?this._deltaCellDecorationsImpl(0,[],[{range:new w.Range(O.start+1,1,O.end+1,1),options:d[x]}])[0]:null}_deltaCellDecorationsImpl(R,O,x){const F=this.getVersionId(),L=O.length;let M=0;const N=x.length;let B=0;const P=new Array(N);for(;M<L||B<N;){let V=null;if(M<L){do V=this._decorations[O[M++]];while(!V&&M<L);V&&this._decorationsTree.delete(V)}if(B<N){if(!V){const K=++this._lastDecorationId,G=`${this._instanceId};${K}`;V=new C.IntervalNode(G,0,0),this._decorations[G]=V}const z=x[B],U=z.range,H=m(z.options);V.ownerId=R,V.reset(F,U.startLineNumber,U.endLineNumber,w.Range.lift(U)),V.setOptions(H),this._decorationsTree.insert(V),P[B]=V.id,B++}else V&&delete this._decorations[V.id]}return P}deltaCellDecorations(R,O){R.forEach(F=>{const L=this._decorationIdToCellMap.get(F);L!==void 0&&this.getCellByHandle(L)?.deltaCellDecorations([F],[])});const x=[];return O.forEach(F=>{const M=this.getCellByHandle(F.handle)?.deltaCellDecorations([],[F.options])||[];M.forEach(N=>{this._decorationIdToCellMap.set(N,F.handle)}),x.push(...M)}),x}deltaCellStatusBarItems(R,O){const x=(0,t.groupBy)(R,L=>this._statusBarItemIdToCellMap.get(L)??-1),F=[];O.forEach(L=>{const M=this.getCellByHandle(L.handle),N=x[L.handle]??[];delete x[L.handle];const B=M?.deltaCellStatusBarItems(N,L.items)||[];B.forEach(P=>{this._statusBarItemIdToCellMap.set(P,L.handle)}),F.push(...B)});for(const L in x){const M=parseInt(L),N=x[M];this.getCellByHandle(M)?.deltaCellStatusBarItems(N,[])}return F}nearestCodeCellIndex(R){const O=this.viewCells.slice(0,R).reverse().findIndex(x=>x.cellKind===u.CellKind.Code);if(O>-1)return R-O-1;{const x=this.viewCells.slice(R+1).findIndex(F=>F.cellKind===u.CellKind.Code);return x>-1?R+1+x:-1}}getEditorViewState(){const R={},O={},x={};this._viewCells.forEach((L,M)=>{L.getEditState()===s.CellEditState.Editing&&(R[M]=!0),L.isInputCollapsed&&(O[M]=!0),L instanceof r.CodeCellViewModel&&L.isOutputCollapsed&&(x[M]=!0)});const F={};return this._viewCells.map(L=>({handle:L.model.handle,state:L.saveEditorViewState()})).forEach((L,M)=>{L.state&&(F[M]=L.state)}),{editingCells:R,editorViewStates:F,collapsedInputCells:O,collapsedOutputCells:x}}restoreEditorViewState(R){!R||this._viewCells.forEach((O,x)=>{const F=R.editingCells&&R.editingCells[x],L=R.editorViewStates&&R.editorViewStates[x];O.updateEditState(F?s.CellEditState.Editing:s.CellEditState.Preview,"viewState");const M=R.cellTotalHeights?R.cellTotalHeights[x]:void 0;O.restoreEditorViewState(L,M),R.collapsedInputCells&&R.collapsedInputCells[x]&&(O.isInputCollapsed=!0),R.collapsedOutputCells&&R.collapsedOutputCells[x]&&O instanceof r.CodeCellViewModel&&(O.isOutputCollapsed=!0)})}changeModelDecorations(R){const O={deltaDecorations:(F,L)=>this._deltaModelDecorationsImpl(F,L)};let x=null;try{x=R(O)}catch(F){(0,f.onUnexpectedError)(F)}return O.deltaDecorations=h,x}_deltaModelDecorationsImpl(R,O){const x=new Map;R.forEach(L=>{const M=L.ownerId;if(!x.has(M)){const B=this._viewCells.find(P=>P.handle===M);B&&x.set(M,{cell:B,oldDecorations:[],newDecorations:[]})}const N=x.get(M);N&&(N.oldDecorations=L.decorations)}),O.forEach(L=>{const M=L.ownerId;if(!x.has(M)){const B=this._viewCells.find(P=>P.handle===M);B&&x.set(M,{cell:B,oldDecorations:[],newDecorations:[]})}const N=x.get(M);N&&(N.newDecorations=L.decorations)});const F=[];return x.forEach((L,M)=>{const N=L.cell.deltaModelDecorations(L.oldDecorations,L.newDecorations);F.push({ownerId:M,decorations:N})}),F}find(R,O){const x=[];return this._viewCells.forEach((F,L)=>{const M=F.startFind(R,O);M&&x.push({cell:M.cell,index:L,matches:M.matches,modelMatchCount:M.matches.length})}),x}replaceOne(R,O,x){const F=R;return this._lastNotebookEditResource.push(F.uri),F.resolveTextModel().then(()=>{this._bulkEditService.apply([new I.ResourceTextEdit(R.uri,{range:O,text:x})],{quotableLabel:"Notebook Replace"})})}async replaceAll(R,O){if(!R.length)return;const x=[];return this._lastNotebookEditResource.push(R[0].cell.uri),R.forEach(F=>{F.matches.forEach((L,M)=>{L.index!==void 0&&x.push({edit:{range:L.range,text:O[M]},resource:F.cell.uri})})}),Promise.all(R.map(F=>F.cell.resolveTextModel())).then(async()=>{this._bulkEditService.apply(I.ResourceEdit.convert({edits:x}),{quotableLabel:"Notebook Replace All"})})}async _withElement(R,O){const x=this._viewCells.filter(L=>R.matchesResource(L.uri)),F=await Promise.all(x.map(L=>this._textModelService.createModelReference(L.uri)));await O(),F.forEach(L=>L.dispose())}async undo(){if(this._options.isReadOnly)return null;const R=this._undoService.getElements(this.uri),O=R.past.length?R.past[R.past.length-1]:void 0;return O&&O instanceof v.SingleModelEditStackElement||O instanceof v.MultiModelEditStackElement?(await this._withElement(O,async()=>{await this._undoService.undo(this.uri)}),O instanceof v.SingleModelEditStackElement?[O.resource]:O.resources):(await this._undoService.undo(this.uri),[])}async redo(){if(this._options.isReadOnly)return null;const O=this._undoService.getElements(this.uri).future[0];return O&&O instanceof v.SingleModelEditStackElement||O instanceof v.MultiModelEditStackElement?(await this._withElement(O,async()=>{await this._undoService.redo(this.uri)}),O instanceof v.SingleModelEditStackElement?[O.resource]:O.resources):(await this._undoService.redo(this.uri),[])}equal(R){return this._notebook===R}dispose(){this._localStore.clear(),this._viewCells.forEach(R=>{R.dispose()}),super.dispose()}};E=Ee([W(5,i.IInstantiationService),W(6,I.IBulkEditService),W(7,S.IUndoRedoService),W(8,c.ITextModelService)],E),e.NotebookViewModel=E;function y(T,R,O,x){return O.cellKind===u.CellKind.Code?T.createInstance(r.CodeCellViewModel,R.viewType,O,R.layoutInfo,x):T.createInstance(p.MarkupCellViewModel,R.viewType,O,R.layoutInfo,R,x)}e.createCellViewModel=y}),define(ne[2441],re([1,0,2,47,17,69,8,1691,34,40,11,19,14,54,50,46]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceChangeExtHostRelauncher=e.SettingsChangeRelauncher=void 0;let s=class extends t.Disposable{constructor(u,a,n,h){super();this.hostService=u,this.configurationService=a,this.productService=n,this.dialogService=h,this.onConfigurationChange(a.getValue(),!1),this._register(this.configurationService.onDidChangeConfiguration(g=>this.onConfigurationChange(this.configurationService.getValue(),!0)))}onConfigurationChange(u,a){let n=!1;o.isNative&&(typeof u.window?.titleBarStyle=="string"&&u.window?.titleBarStyle!==this.titleBarStyle&&(u.window.titleBarStyle==="native"||u.window.titleBarStyle==="custom")&&(this.titleBarStyle=u.window.titleBarStyle,n=!0),o.isMacintosh&&typeof u.window?.nativeTabs=="boolean"&&u.window.nativeTabs!==this.nativeTabs&&(this.nativeTabs=u.window.nativeTabs,n=!0),o.isMacintosh&&typeof u.window?.nativeFullScreen=="boolean"&&u.window.nativeFullScreen!==this.nativeFullScreen&&(this.nativeFullScreen=u.window.nativeFullScreen,n=!0),o.isMacintosh&&typeof u.window?.clickThroughInactive=="boolean"&&u.window.clickThroughInactive!==this.clickThroughInactive&&(this.clickThroughInactive=u.window.clickThroughInactive,n=!0),typeof u.update?.mode=="string"&&u.update.mode!==this.updateMode&&(this.updateMode=u.update.mode,n=!0),o.isLinux&&typeof u.editor?.accessibilitySupport=="string"&&u.editor.accessibilitySupport!==this.accessibilitySupport&&(this.accessibilitySupport=u.editor.accessibilitySupport,this.accessibilitySupport==="on"&&(n=!0)),typeof u?.security?.workspace?.trust?.enabled=="boolean"&&u.security?.workspace.trust.enabled!==this.workspaceTrustEnabled&&(this.workspaceTrustEnabled=u.security.workspace.trust.enabled,n=!0)),a&&n&&this.doConfirm(o.isNative?(0,D.localize)(0,null):(0,D.localize)(1,null),o.isNative?(0,D.localize)(2,null,this.productService.nameLong):(0,D.localize)(3,null,this.productService.nameLong),o.isNative?(0,D.localize)(4,null):(0,D.localize)(5,null),()=>this.hostService.restart())}async doConfirm(u,a,n,h){this.hostService.hasFocus&&(await this.dialogService.confirm({type:"info",message:u,detail:a,primaryButton:n})).confirmed&&h()}};s=Ee([W(0,A.IHostService),W(1,k.IConfigurationService),W(2,S.IProductService),W(3,c.IDialogService)],s),e.SettingsChangeRelauncher=s;let l=class extends t.Disposable{constructor(u,a,n,h){super();this.contextService=u,this.extensionHostRestarter=this._register(new v.RunOnceScheduler(()=>{h.extensionTestsLocationURI||(h.remoteAuthority?n.reload():o.isNative&&a.restartExtensionHost())},10)),this.contextService.getCompleteWorkspace().then(g=>{this.firstFolderResource=g.folders.length>0?g.folders[0].uri:void 0,this.handleWorkbenchState(),this._register(this.contextService.onDidChangeWorkbenchState(()=>setTimeout(()=>this.handleWorkbenchState())))}),this._register((0,t.toDisposable)(()=>{this.onDidChangeWorkspaceFoldersUnbind&&this.onDidChangeWorkspaceFoldersUnbind.dispose()}))}handleWorkbenchState(){if(this.contextService.getWorkbenchState()===3){const u=this.contextService.getWorkspace();this.firstFolderResource=u.folders.length>0?u.folders[0].uri:void 0,this.onDidChangeWorkspaceFoldersUnbind||(this.onDidChangeWorkspaceFoldersUnbind=this.contextService.onDidChangeWorkspaceFolders(()=>this.onDidChangeWorkspaceFolders()))}else(0,t.dispose)(this.onDidChangeWorkspaceFoldersUnbind),this.onDidChangeWorkspaceFoldersUnbind=void 0}onDidChangeWorkspaceFolders(){const u=this.contextService.getWorkspace(),a=u.folders.length>0?u.folders[0].uri:void 0;(0,C.isEqual)(this.firstFolderResource,a)||(this.firstFolderResource=a,this.extensionHostRestarter.schedule())}};l=Ee([W(0,I.IWorkspaceContextService),W(1,w.IExtensionService),W(2,A.IHostService),W(3,i.IWorkbenchEnvironmentService)],l),e.WorkspaceChangeExtHostRelauncher=l;const r=_.Registry.as(f.Extensions.Workbench);r.registerWorkbenchContribution(s,3),r.registerWorkbenchContribution(l,3)}),define(ne[2442],re([1,0,1701,57,17,248,47,2199,12,32,14]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),_.Registry.as(k.Extensions.Workbench).registerWorkbenchContribution(D.SashSettingsController,3),_.Registry.as(f.Extensions.Configuration).registerConfiguration({...A.workbenchConfigurationNodeBase,properties:{"workbench.sash.size":{type:"number",default:v.isIOS?20:4,minimum:1,maximum:20,description:(0,t.localize)(0,null)},"workbench.sash.hoverDelay":{type:"number",default:300,minimum:0,maximum:2e3,description:(0,t.localize)(1,null)}}}),(0,I.registerThemingParticipant)((C,o)=>{const c=C.getColor(w.sashHoverBorder);o.addRule(` .monaco-sash.hover:before, .monaco-sash.active:before { background: ${c}; } `)})}),define(ne[2443],re([1,0,77,10,66,6,2,76,32,12,316,82,80,50,59,8,235,13,11,813]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PartsSplash=void 0;let u=class jo{constructor(n,h,g,d,m,b,E){this._themeService=n,this._layoutService=h,this._environmentService=g,this._partSplashService=E,this._disposables=new k.DisposableStore,d.when(3).then(T=>{this._removePartsSplash(),s.mark("code/didRemovePartsSplash")});const y=new r.RunOnceScheduler(()=>this._savePartsSplash(),800);A.Event.any(t.onDidChangeFullscreen,m.onDidLayout)(()=>{y.schedule()},void 0,this._disposables),b.onDidChangeConfiguration(T=>{T.affectsConfiguration("window.titleBarStyle")&&(this._didChangeTitleBarStyle=!0,this._savePartsSplash())},this,this._disposables),n.onDidColorThemeChange(T=>{this._savePartsSplash()},this,this._disposables)}dispose(){this._disposables.dispose()}_savePartsSplash(){const n=this._themeService.getColorTheme();this._partSplashService.saveWindowSplash({baseTheme:(0,w.getThemeTypeSelector)(n.type),colorInfo:{foreground:n.getColor(I.foreground)?.toString(),background:_.Color.Format.CSS.formatHex(n.getColor(I.editorBackground)||C.WORKBENCH_BACKGROUND(n)),editorBackground:n.getColor(I.editorBackground)?.toString(),titleBarBackground:n.getColor(C.TITLE_BAR_ACTIVE_BACKGROUND)?.toString(),activityBarBackground:n.getColor(C.ACTIVITY_BAR_BACKGROUND)?.toString(),sideBarBackground:n.getColor(C.SIDE_BAR_BACKGROUND)?.toString(),statusBarBackground:n.getColor(C.STATUS_BAR_BACKGROUND)?.toString(),statusBarNoFolderBackground:n.getColor(C.STATUS_BAR_NO_FOLDER_BACKGROUND)?.toString(),windowBorder:n.getColor(C.WINDOW_ACTIVE_BORDER)?.toString()??n.getColor(C.WINDOW_INACTIVE_BORDER)?.toString()},layoutInfo:this._shouldSaveLayoutInfo()?{sideBarSide:this._layoutService.getSideBarPosition()===1?"right":"left",editorPartMinWidth:v.DEFAULT_EDITOR_MIN_DIMENSIONS.width,titleBarHeight:this._layoutService.isVisible("workbench.parts.titlebar")?(0,f.getTotalHeight)((0,l.assertIsDefined)(this._layoutService.getContainer("workbench.parts.titlebar"))):0,activityBarWidth:this._layoutService.isVisible("workbench.parts.activitybar")?(0,f.getTotalWidth)((0,l.assertIsDefined)(this._layoutService.getContainer("workbench.parts.activitybar"))):0,sideBarWidth:this._layoutService.isVisible("workbench.parts.sidebar")?(0,f.getTotalWidth)((0,l.assertIsDefined)(this._layoutService.getContainer("workbench.parts.sidebar"))):0,statusBarHeight:this._layoutService.isVisible("workbench.parts.statusbar")?(0,f.getTotalHeight)((0,l.assertIsDefined)(this._layoutService.getContainer("workbench.parts.statusbar"))):0,windowBorder:this._layoutService.hasWindowBorder(),windowBorderRadius:this._layoutService.getWindowBorderRadius()}:void 0})}_shouldSaveLayoutInfo(){return!(0,t.isFullscreen)()&&!this._environmentService.isExtensionDevelopment&&!this._didChangeTitleBarStyle}_removePartsSplash(){const n=document.getElementById(jo._splashElementId);n&&(n.style.display="none");const h=document.head.getElementsByClassName("initialShellColors");h.length&&document.head.removeChild(h[0])}};u._splashElementId="monaco-parts-splash",u=Ee([W(0,w.IThemeService),W(1,o.IWorkbenchLayoutService),W(2,c.IWorkbenchEnvironmentService),W(3,D.ILifecycleService),W(4,i.IEditorGroupsService),W(5,S.IConfigurationService),W(6,p.ISplashStorageService)],u),e.PartsSplash=u}),define(ne[2444],re([1,0,17,47,813,87,35,2443]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let I=class{constructor(v){this.saveWindowSplash=v.saveWindowSplash.bind(v)}};I=Ee([W(0,A.INativeHostService)],I),(0,k.registerSingleton)(_.ISplashStorageService,I,!0),t.Registry.as(f.Extensions.Workbench).registerWorkbenchContribution(D.PartsSplash,1)}),define(ne[2445],re([1,0,1731,14,47,17,27,24,46,26,41,295,9,196,11,2,6]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const l=1e3*60*60,r=1e3*60*2,p=1e3*60*60*24,u=1e3*60*60*4,a="ces/skipSurvey",n="ces/remindLaterDate";let h=class extends S.Disposable{constructor(d,m,b,E,y,T){super();this.storageService=d,this.notificationService=m,this.telemetryService=b,this.openerService=E,this.productService=y,this.promptDelayer=this._register(new i.ThrottledDelayer(0)),this.tasExperimentService=T,!(!y.cesSurveyUrl||d.get(a,0,""))&&this.schedulePrompt()}async promptUser(){if(!await this.tasExperimentService?.getTreatment("CESSurvey")){this.skipSurvey();return}const m=T=>{this.telemetryService.publicLog("cesSurvey:popup",{userReaction:T})},b=await this.tasExperimentService?.getTreatment("CESSurveyMessage")??t.localize(0,null),E=await this.tasExperimentService?.getTreatment("CESSurveyButton")??t.localize(1,null),y=this.notificationService.prompt(w.Severity.Info,b,[{label:E,run:()=>{m("accept"),this.telemetryService.getTelemetryInfo().then(T=>{let R=`${this.productService.cesSurveyUrl}?o=${encodeURIComponent(c.platform)}&v=${encodeURIComponent(this.productService.version)}&m=${encodeURIComponent(T.machineId)}`;const O=this.productService.surveys?.filter(x=>x.surveyId&&x.languageId).filter(x=>this.storageService.getNumber(`${x.surveyId}.editedCount`,0,0)>0).map(x=>`${encodeURIComponent(x.languageId)}Lang=1`).join("&");O&&(R+=`&${O}`),this.openerService.open(o.URI.parse(R)),this.skipSurvey()})}},{label:t.localize(2,null),run:()=>{m("remindLater"),this.storageService.store(n,new Date().toUTCString(),0,0),this.schedulePrompt()}}],{sticky:!0,onCancel:()=>{m("cancelled"),this.skipSurvey()}});await s.Event.toPromise(y.onDidClose)}async schedulePrompt(){let d=0;const m=this.storageService.get(n,0,"");if(m){const b=new Date(m).getTime()+u-Date.now();b>0&&(d=b)}else{const b=await this.telemetryService.getTelemetryInfo(),E=Date.now()-new Date(b.firstSessionDate).getTime();if(!(!isNaN(E)&&E<p)){this.skipSurvey();return}E<l&&(d=l-E)}this.telemetryService.publicLog("cesSurvey:schedule"),this.promptDelayer.trigger(async()=>{await this.promptUser()},Math.max(d,r))}skipSurvey(){this.storageService.store(a,this.productService.version,0,0)}};h=Ee([W(0,D.IStorageService),W(1,w.INotificationService),W(2,k.ITelemetryService),W(3,v.IOpenerService),W(4,I.IProductService),W(5,C.IWorkbenchAssignmentService)],h),f.language==="en"&&A.Registry.as(_.Extensions.Workbench).registerWorkbenchContribution(h,3)}),define(ne[2446],re([1,0,1733,14,47,17,27,24,46,26,41,9,196]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const c=.15,i="nps/sessionCount",S="nps/lastSessionDate",s="nps/skipVersion",l="nps/isCandidate";let r=class{constructor(u,a,n,h,g){if(!g.npsSurveyUrl||u.get(s,0,""))return;const m=new Date().toDateString(),b=u.get(S,0,new Date(0).toDateString());if(m===b)return;const E=(u.getNumber(i,0,0)||0)+1;if(u.store(S,m,0,0),u.store(i,E,0,0),E<9)return;const y=u.getBoolean(l,0,!1)||Math.random()<c;if(u.store(l,y,0,0),!y){u.store(s,g.version,0,0);return}a.prompt(w.Severity.Info,t.localize(0,null),[{label:t.localize(1,null),run:()=>{n.getTelemetryInfo().then(T=>{h.open(C.URI.parse(`${g.npsSurveyUrl}?o=${encodeURIComponent(o.platform)}&v=${encodeURIComponent(g.version)}&m=${encodeURIComponent(T.machineId)}`)),u.store(l,!1,0,0),u.store(s,g.version,0,0)})}},{label:t.localize(2,null),run:()=>u.store(i,E-3,0,0)},{label:t.localize(3,null),run:()=>{u.store(l,!1,0,0),u.store(s,g.version,0,0)}}],{sticky:!0})}};r=Ee([W(0,D.IStorageService),W(1,w.INotificationService),W(2,k.ITelemetryService),W(3,v.IOpenerService),W(4,I.IProductService)],r),f.language==="en"&&A.Registry.as(_.Extensions.Workbench).registerWorkbenchContribution(r,3)}),define(ne[425],re([1,0,1762,81,2,12,174,105,292,5,188,76,7,8,176,54,6]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalEditorInput=void 0;let l=class Or extends k.EditorInput{constructor(p,u,a,n,h,g,d,m,b){super();this.resource=p,this._terminalInstance=u,this._themeService=a,this._terminalInstanceService=n,this._instantiationService=h,this._configurationService=g,this._lifecycleService=d,this._dialogService=b,this._onDidRequestAttach=this._register(new s.Emitter),this.onDidRequestAttach=this._onDidRequestAttach.event,this._isDetached=!1,this._isShuttingDown=!1,this._isReverted=!1,this._terminalEditorFocusContextKey=i.TerminalContextKeys.editorFocus.bindTo(m),this._configurationService.onDidChangeConfiguration(E=>{E.affectsConfiguration("terminal.integrated.confirmOnKill")&&this._onDidChangeDirty.fire()}),u&&this._setupInstanceListeners()}setGroup(p){this._group=p}get group(){return this._group}get typeId(){return Or.ID}get editorId(){return D.terminalEditorId}get capabilities(){return 2|8}setTerminalInstance(p){if(this._terminalInstance)throw new Error("cannot set instance that has already been set");this._terminalInstance=p,this._setupInstanceListeners(),this._configurationService.onDidChangeConfiguration(u=>{u.affectsConfiguration("terminal.integrated.confirmOnKill")&&this._onDidChangeDirty.fire()})}copy(){const p=this._terminalInstanceService.createInstance(this._copyLaunchConfig||{},v.TerminalLocation.Editor);return p.focusWhenReady(),this._copyLaunchConfig=void 0,this._instantiationService.createInstance(Or,p.resource,p)}setCopyLaunchConfig(p){this._copyLaunchConfig=p}get terminalInstance(){return this._isDetached?void 0:this._terminalInstance}isDirty(){if(this._isReverted)return!1;const p=this._configurationService.getValue("terminal.integrated.confirmOnKill");return(p==="editor"||p==="always")&&this._terminalInstance?.hasChildProcesses||!1}async confirm(p){const{choice:u}=await this._dialogService.show(f.default.Warning,(0,t.localize)(0,null),[(0,t.localize)(1,null),(0,t.localize)(2,null)],{cancelId:1,detail:p&&p.length>1?p.map(a=>a.editor.getName()).join(` `)+` `+(0,t.localize)(3,null):(0,t.localize)(4,null)});switch(u){case 0:return 1;default:return 2}}async revert(){this._isReverted=!0}_setupInstanceListeners(){const p=this._terminalInstance;if(!p)return;this._register((0,_.toDisposable)(()=>{!this._isDetached&&!this._isShuttingDown&&p.dispose()}));const u=[p.onExit(()=>this.dispose()),p.onDisposed(()=>this.dispose()),p.onTitleChanged(()=>this._onDidChangeLabel.fire()),p.onIconChanged(()=>this._onDidChangeLabel.fire()),p.onDidFocus(()=>this._terminalEditorFocusContextKey.set(!0)),p.onDidBlur(()=>this._terminalEditorFocusContextKey.reset()),p.onDidChangeHasChildProcesses(()=>this._onDidChangeDirty.fire()),p.statusList.onDidChangePrimaryStatus(()=>this._onDidChangeLabel.fire())];this._lifecycleService.onWillShutdown(()=>{this._isShuttingDown=!0,(0,_.dispose)(u)})}getName(){return this._terminalInstance?.title||this.resource.fragment}getLabelExtraClasses(){if(!this._terminalInstance)return[];const p=["terminal-tab"],u=(0,I.getColorClass)(this._terminalInstance);u&&p.push(u);const a=(0,I.getUriClasses)(this._terminalInstance,this._themeService.getColorTheme().type);return a&&p.push(...a),A.ThemeIcon.isThemeIcon(this._terminalInstance.icon)&&p.push(`codicon-${this._terminalInstance.icon.id}`),p}detachInstance(){this._isShuttingDown||(this._terminalInstance?.detachFromElement(),this._isDetached=!0)}getDescription(){return this._terminalInstance?.description}toUntyped(){return{resource:this.resource,options:{override:D.terminalEditorId,pinned:!0,forceReload:!0}}}};l.ID="workbench.editors.terminal",l=Ee([W(2,A.IThemeService),W(3,D.ITerminalInstanceService),W(4,w.IInstantiationService),W(5,c.IConfigurationService),W(6,C.ILifecycleService),W(7,o.IContextKeyService),W(8,S.IDialogService)],l),e.TerminalEditorInput=l}),define(ne[2447],re([1,0,6,2,9,7,132,5,188,105,850,425,418,176,59,21,50,76]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalEditorService=void 0;let r=class extends f.Disposable{constructor(u,a,n,h,g,d,m){super();this._editorService=u,this._editorGroupsService=a,this._terminalInstanceService=n,this._instantiationService=h,this._environmentService=d,this.instances=[],this._activeInstanceIndex=-1,this._isShuttingDown=!1,this._editorInputs=new Map,this._instanceDisposables=new Map,this._onDidDisposeInstance=new t.Emitter,this.onDidDisposeInstance=this._onDidDisposeInstance.event,this._onDidFocusInstance=new t.Emitter,this.onDidFocusInstance=this._onDidFocusInstance.event,this._onDidChangeInstanceCapability=new t.Emitter,this.onDidChangeInstanceCapability=this._onDidChangeInstanceCapability.event,this._onDidChangeActiveInstance=new t.Emitter,this.onDidChangeActiveInstance=this._onDidChangeActiveInstance.event,this._onDidChangeInstances=new t.Emitter,this.onDidChangeInstances=this._onDidChangeInstances.event,this._terminalEditorActive=c.TerminalContextKeys.terminalEditorActive.bindTo(m),this._register((0,f.toDisposable)(()=>{for(const b of this._instanceDisposables.values())(0,f.dispose)(b)})),this._register(g.onWillShutdown(()=>this._isShuttingDown=!0)),this._register(this._editorService.onDidActiveEditorChange(()=>{const b=this._editorService.activeEditor,E=b instanceof C.TerminalEditorInput?b?.terminalInstance:void 0,y=!!E&&b instanceof C.TerminalEditorInput;this._terminalEditorActive.set(y),y&&(b?.setGroup(this._editorService.activeEditorPane?.group),this._setActiveInstance(E))})),this._register(this._editorService.onDidVisibleEditorsChange(()=>{const b=this.instances.map(T=>T.instanceId),y=this._getActiveTerminalEditors().find(T=>{const R=T instanceof C.TerminalEditorInput?T.terminalInstance?.instanceId:void 0;return R===void 0?!1:!b.includes(R)});y instanceof C.TerminalEditorInput&&y.terminalInstance&&(this._editorInputs.set(y.terminalInstance.resource.path,y),this.instances.push(y.terminalInstance))})),this._register(this.onDidDisposeInstance(b=>this.detachInstance(b))),this._register(this._editorService.onDidCloseEditor(b=>{const E=b.editor instanceof C.TerminalEditorInput?b.editor.terminalInstance:void 0;if(E){const y=this.instances.findIndex(T=>T===E);y!==-1&&this.instances.splice(y,1)}}))}_getActiveTerminalEditors(){return this._editorService.visibleEditors.filter(u=>u instanceof C.TerminalEditorInput&&u.terminalInstance?.instanceId)}_getActiveTerminalEditor(){return this._editorService.activeEditorPane instanceof v.TerminalEditor?this._editorService.activeEditorPane:void 0}findPrevious(){const u=this._getActiveTerminalEditor();u?.showFindWidget(),u?.getFindWidget().find(!0)}findNext(){const u=this._getActiveTerminalEditor();u?.showFindWidget(),u?.getFindWidget().find(!1)}getFindState(){return this._getActiveTerminalEditor().findState}async focusFindWidget(){const u=this.activeInstance;u&&await u.focusWhenReady(!0),this._getActiveTerminalEditor()?.focusFindWidget()}hideFindWidget(){this._getActiveTerminalEditor()?.hideFindWidget()}get activeInstance(){if(!(this.instances.length===0||this._activeInstanceIndex===-1))return this.instances[this._activeInstanceIndex]}setActiveInstance(u){this._setActiveInstance(u)}_setActiveInstance(u){u===void 0?this._activeInstanceIndex=-1:this._activeInstanceIndex=this.instances.findIndex(a=>a===u),this._onDidChangeActiveInstance.fire(this.activeInstance)}async openEditor(u,a){const n=this.resolveResource(u);n&&await this._editorService.openEditor({resource:n,description:u.description||u.shellLaunchConfig.type,options:{pinned:!0,forceReload:!0,preserveFocus:a?.preserveFocus}},a?.viewColumn||S.ACTIVE_GROUP)}resolveResource(u,a=!1){const n=_.URI.isUri(u)?u:u.resource,h=n.path,g=this._editorInputs.get(h);if(g)return g.resource;if(_.URI.isUri(u)){const m=(0,o.parseTerminalUri)(u);m.instanceId&&this._terminalInstanceService.getBackend(this._environmentService.remoteAuthority)?.requestDetachInstance(m.workspaceId,m.instanceId).then(E=>{const y=this._terminalInstanceService.createInstance({attachPersistentProcess:E},I.TerminalLocation.Editor,n);return d=this._instantiationService.createInstance(C.TerminalEditorInput,n,y),this._editorService.openEditor(d,{pinned:!0,forceReload:!0},d.group),this._registerInstance(h,d,y),u})}let d;return"instanceId"in u?(u.target=I.TerminalLocation.Editor,d=this._instantiationService.createInstance(C.TerminalEditorInput,n,u),this._registerInstance(h,d,u),d.resource):u}getInputFromResource(u){const a=this._editorInputs.get(u.path);if(!a)throw new Error(`Could not get input from resource: ${u.path}`);return a}_registerInstance(u,a,n){this._editorInputs.set(u,a),this._instanceDisposables.set(u,[n.onDidFocus(this._onDidFocusInstance.fire,this._onDidFocusInstance),n.onDisposed(this._onDidDisposeInstance.fire,this._onDidDisposeInstance),n.capabilities.onDidAddCapability(()=>this._onDidChangeInstanceCapability.fire(n)),n.capabilities.onDidRemoveCapability(()=>this._onDidChangeInstanceCapability.fire(n))]),this.instances.push(n),this._onDidChangeInstances.fire()}getInstanceFromResource(u){return(0,o.getInstanceFromResource)(this.instances,u)}splitInstance(u,a={}){if(u.target===I.TerminalLocation.Editor){const g=this._editorInputs.get(u.resource.path)?.group;g&&this._editorGroupsService.activateGroup(g)}const n=this._terminalInstanceService.createInstance(a,I.TerminalLocation.Editor),h=this.resolveResource(n);return h&&this._editorService.openEditor({resource:_.URI.revive(h),description:n.description,options:{pinned:!0,forceReload:!0}},S.SIDE_GROUP),n}reviveInput(u){const a=_.URI.isUri(u)?u:u.resource,n=a.path;if("pid"in u){const h=this._terminalInstanceService.createInstance({attachPersistentProcess:u},I.TerminalLocation.Editor);h.target=I.TerminalLocation.Editor;const g=this._instantiationService.createInstance(C.TerminalEditorInput,a,h);return this._registerInstance(n,g,h),g}else throw new Error(`Could not revive terminal editor input, ${u}`)}detachActiveEditorInstance(){const u=this._editorService.activeEditor;if(!(u instanceof C.TerminalEditorInput))throw new Error("Active editor is not a terminal");const a=u.terminalInstance;if(!a)throw new Error("Terminal is already detached");return this.detachInstance(a),a}detachInstance(u){const a=u.resource.path,n=this._editorInputs.get(a);n?.detachInstance(),this._editorInputs.delete(a);const h=this.instances.findIndex(d=>d===u);h!==-1&&this.instances.splice(h,1),this._isShuttingDown||n?.dispose();const g=this._instanceDisposables.get(a);this._instanceDisposables.delete(a),g&&(0,f.dispose)(g),this._onDidChangeInstances.fire()}revealActiveEditor(u){const a=this.activeInstance;if(!a)return;const n=this._editorInputs.get(a.resource.path);this._editorService.openEditor(n,{pinned:!0,forceReload:!0,preserveFocus:u,activation:k.EditorActivation.PRESERVE},n.group)}};r=Ee([W(0,S.IEditorService),W(1,i.IEditorGroupsService),W(2,w.ITerminalInstanceService),W(3,D.IInstantiationService),W(4,l.ILifecycleService),W(5,s.IWorkbenchEnvironmentService),W(6,A.IContextKeyService)],r),e.TerminalEditorService=r}),define(ne[2448],re([1,0,1782,17,70,16,120,36,105,85,144,177,18]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CreateNewLocalTerminalAction=e.registerRemoteContributions=void 0;function c(){f.Registry.as(_.Extensions.WorkbenchActions).registerWorkbenchAction(A.SyncActionDescriptor.from(i),"Terminal: Create New Integrated Terminal (Local)",k.TERMINAL_ACTION_CATEGORY)}e.registerRemoteContributions=c;let i=class extends D.Action{constructor(s,l,r,p,u,a,n){super(s,l);this._terminalService=r,this._terminalGroupService=p,this._nativeEnvironmentService=u,this._remoteAuthorityResolverService=a,this._historyService=n}async run(){let s;try{const r=this._historyService.getLastActiveWorkspaceRoot(o.Schemas.vscodeRemote);if(r){const p=await this._remoteAuthorityResolverService.getCanonicalURI(r);p.scheme===o.Schemas.file&&(s=p)}}catch{}s||(s=this._nativeEnvironmentService.userHome);const l=await this._terminalService.createTerminal({cwd:s});return l?(this._terminalService.setActiveInstance(l),this._terminalGroupService.showPanel(!0)):Promise.resolve(void 0)}};i.ID="workbench.action.terminal.newLocal",i.LABEL=t.localize(0,null),i=Ee([W(2,I.ITerminalService),W(3,I.ITerminalGroupService),W(4,w.INativeEnvironmentService),W(5,v.IRemoteAuthorityResolverService),W(6,C.IHistoryService)],i),e.CreateNewLocalTerminalAction=i}),define(ne[2449],re([1,0,1820,16,87,70]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenWebviewDeveloperToolsAction=void 0;class k extends f.Action2{constructor(){super({id:"workbench.action.webview.openDeveloperTools",title:{value:t.localize(0,null),original:"Open Webview Developer Tools"},category:A.CATEGORIES.Developer,f1:!0})}async run(I){const w=I.get(_.INativeHostService);document.querySelectorAll("iframe.webview.ready").length&&(console.info(t.localize(1,null)),w.openDevTools())}}e.OpenWebviewDeveloperToolsAction=k}),define(ne[2450],re([1,0,16,35,202,2449,2294]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,f.registerSingleton)(_.IWebviewService,k.ElectronWebviewService,!0),(0,t.registerAction2)(A.OpenWebviewDeveloperToolsAction)}),define(ne[2451],re([1,0,58,1821,16,7,70,202,613,294,21]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getActiveWebviewEditor=e.ReloadWebviewAction=e.WebViewEditorFindPreviousCommand=e.WebViewEditorFindNextCommand=e.HideWebViewEditorFindCommand=e.ShowWebViewEditorFindWidgetAction=void 0;const C=A.ContextKeyExpr.and(A.ContextKeyExpr.equals("activeEditor",I.WebviewEditor.ID),t.EditorContextKeys.focus.toNegated());class o extends _.Action2{constructor(){super({id:o.ID,title:o.LABEL,keybinding:{when:A.ContextKeyExpr.and(C,D.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_ENABLED),primary:2048|36,weight:100}})}run(p){l(p)?.showFind()}}e.ShowWebViewEditorFindWidgetAction=o,o.ID="editor.action.webvieweditor.showFind",o.LABEL=f.localize(0,null);class c extends _.Action2{constructor(){super({id:c.ID,title:c.LABEL,keybinding:{when:A.ContextKeyExpr.and(C,D.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE),primary:9,weight:100}})}run(p){l(p)?.hideFind()}}e.HideWebViewEditorFindCommand=c,c.ID="editor.action.webvieweditor.hideFind",c.LABEL=f.localize(1,null);class i extends _.Action2{constructor(){super({id:i.ID,title:i.LABEL,keybinding:{when:A.ContextKeyExpr.and(C,D.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_FOCUSED),primary:3,weight:100}})}run(p){l(p)?.runFindAction(!1)}}e.WebViewEditorFindNextCommand=i,i.ID="editor.action.webvieweditor.findNext",i.LABEL=f.localize(2,null);class S extends _.Action2{constructor(){super({id:S.ID,title:S.LABEL,keybinding:{when:A.ContextKeyExpr.and(C,D.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_FOCUSED),primary:1024|3,weight:100}})}run(p){l(p)?.runFindAction(!0)}}e.WebViewEditorFindPreviousCommand=S,S.ID="editor.action.webvieweditor.findPrevious",S.LABEL=f.localize(3,null);class s extends _.Action2{constructor(){super({id:s.ID,title:{value:s.LABEL,original:"Reload Webviews"},category:k.CATEGORIES.Developer,menu:[{id:_.MenuId.CommandPalette}]})}async run(p){const u=p.get(D.IWebviewService);for(const a of u.webviews)a.reload()}}e.ReloadWebviewAction=s,s.ID="workbench.action.webview.reloadWebviewAction",s.LABEL=f.localize(4,null);function l(r){const u=r.get(v.IEditorService).activeEditor;return u instanceof w.WebviewInput?u.webview:void 0}e.getActiveWebviewEditor=l}),define(ne[2452],re([1,0,10,8,76]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewIconManager=void 0;let A=class{constructor(D,I){this._lifecycleService=D,this._configService=I,this._icons=new Map,this._configService.onDidChangeConfiguration(w=>{w.affectsConfiguration("workbench.iconTheme")&&this.updateStyleSheet()})}dispose(){this._styleElement?.remove(),this._styleElement=void 0}get styleElement(){return this._styleElement||(this._styleElement=t.createStyleSheet(),this._styleElement.className="webview-icons"),this._styleElement}setIcons(D,I){I?this._icons.set(D,I):this._icons.delete(D),this.updateStyleSheet()}async updateStyleSheet(){await this._lifecycleService.when(1);const D=[];if(this._configService.getValue("workbench.iconTheme")!==null)for(const[I,w]of this._icons){const v=`.show-file-icons .webview-${I}-name-file-icon::before`;try{D.push(`.monaco-workbench.vs ${v}, .monaco-workbench.hc-light ${v} { content: ""; background-image: ${t.asCSSUrl(w.light)}; }`,`.monaco-workbench.vs-dark ${v}, .monaco-workbench.hc-black ${v} { content: ""; background-image: ${t.asCSSUrl(w.dark)}; }`)}catch{}}this.styleElement.textContent=D.join(` `)}};A=Ee([W(0,_.ILifecycleService),W(1,f.IConfigurationService)],A),e.WebviewIconManager=A});var dt=this&&this.__classPrivateFieldGet||function(Q,e,t,f){if(t==="a"&&!f)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?Q!==e||!f:!e.has(Q))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?f:t==="a"?f.call(Q):f?f.value:e.get(Q)},Ot=this&&this.__classPrivateFieldSet||function(Q,e,t,f,_){if(f==="m")throw new TypeError("Private method is not writable");if(f==="a"&&!_)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?Q!==e||!_:!e.has(Q))throw new TypeError("Cannot write private member to an object whose class did not declare it");return f==="a"?_.call(Q,t):_?_.value=t:e.set(Q,t),t};define(ne[333],re([1,0,11,30,110,22,6,92,2,132,5,203,202,2452,21,294]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";var s,l;Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewEditorService=e.LazilyResolvedWebviewEditorInput=e.IWebviewWorkbenchService=void 0,e.IWebviewWorkbenchService=(0,v.createDecorator)("webviewEditorService");function r(n,h){return n.canResolve(h)}let p=class extends S.WebviewInput{constructor(h,g,d,m,b){super(h,g,d,m,b.iconManager);this._webviewWorkbenchService=b,s.set(this,!1),l.set(this,void 0)}dispose(){super.dispose(),dt(this,l,"f")?.cancel(),Ot(this,l,void 0,"f")}async resolve(){if(!dt(this,s,"f")){Ot(this,s,!0,"f"),Ot(this,l,this._webviewWorkbenchService.resolveWebview(this),"f");try{await dt(this,l,"f")}catch(h){if(!(0,A.isCancellationError)(h))throw h}}return super.resolve()}transfer(h){if(!!super.transfer(h))return Ot(h,s,dt(this,s,"f"),"f"),h}};s=new WeakMap,l=new WeakMap,Ee([_.memoize],p.prototype,"resolve",null),p=Ee([W(4,e.IWebviewWorkbenchService)],p),e.LazilyResolvedWebviewEditorInput=p;class u{constructor(){this._awaitingRevival=[]}add(h,g){this._awaitingRevival.push({input:h,resolve:g})}reviveFor(h,g){const d=this._awaitingRevival.filter(({input:m})=>r(h,m));this._awaitingRevival=this._awaitingRevival.filter(({input:m})=>!r(h,m));for(const{input:m,resolve:b}of d)h.resolveWebview(m,g).then(b)}}let a=class extends I.Disposable{constructor(h,g,d){super();this._editorService=h,this._instantiationService=g,this._webviewService=d,this._revivers=new Set,this._revivalPool=new u,this._onDidChangeActiveWebviewEditor=this._register(new k.Emitter),this.onDidChangeActiveWebviewEditor=this._onDidChangeActiveWebviewEditor.event,this._iconManager=this._register(this._instantiationService.createInstance(c.WebviewIconManager)),this._register(h.onDidActiveEditorChange(()=>{this.updateActiveWebview()})),this._register(d.onDidChangeActiveWebview(()=>{this.updateActiveWebview()})),this.updateActiveWebview()}get iconManager(){return this._iconManager}updateActiveWebview(){const h=this._editorService.activeEditor;let g;h instanceof S.WebviewInput?g=h:h instanceof C.DiffEditorInput&&(h.primary instanceof S.WebviewInput&&h.primary.webview===this._webviewService.activeWebview?g=h.primary:h.secondary instanceof S.WebviewInput&&h.secondary.webview===this._webviewService.activeWebview&&(g=h.secondary)),g!==this._activeWebview&&(this._activeWebview=g,this._onDidChangeActiveWebviewEditor.fire(g))}createWebview(h,g,d,m,b,E,y){const T=this._webviewService.createWebviewOverlay(h,b,E,y),R=this._instantiationService.createInstance(S.WebviewInput,h,g,d,T,this.iconManager);return this._editorService.openEditor(R,{pinned:!0,preserveFocus:m.preserveFocus,activation:m.preserveFocus?w.EditorActivation.RESTORE:void 0},m.group),R}revealWebview(h,g,d){const m=this.findTopLevelEditorForWebview(h);this._editorService.openEditor(m,{preserveFocus:d,activation:d?w.EditorActivation.RESTORE:void 0},g)}findTopLevelEditorForWebview(h){for(const g of this._editorService.editors)if(g===h||g instanceof C.DiffEditorInput&&(h===g.primary||h===g.secondary))return g;return h}reviveWebview(h){const g=this._webviewService.createWebviewOverlay(h.id,h.webviewOptions,h.contentOptions,h.extension);g.state=h.state;const d=this._instantiationService.createInstance(p,h.id,h.viewType,h.title,g);return d.iconPath=h.iconPath,typeof h.group=="number"&&d.updateGroup(h.group),d}registerResolver(h){this._revivers.add(h);const g=new f.CancellationTokenSource;return this._revivalPool.reviveFor(h,g.token),(0,I.toDisposable)(()=>{this._revivers.delete(h),g.dispose(!0)})}shouldPersist(h){return h instanceof p?!0:D.Iterable.some(this._revivers.values(),g=>r(g,h))}async tryRevive(h,g){for(const d of this._revivers.values())if(r(d,h))return await d.resolveWebview(h,g),!0;return!1}resolveWebview(h){return(0,t.createCancelablePromise)(async g=>{if(!await this.tryRevive(h,g)){let m;const b=new Promise(E=>{m=E});return this._revivalPool.add(h,m),b}})}setIcons(h,g){this._iconManager.setIcons(h,g)}};a=Ee([W(0,i.IEditorService),W(1,v.IInstantiationService),W(2,o.IWebviewService)],a),e.WebviewEditorService=a}),define(ne[2453],re([1,0,22,2,9,8,27,422,65,203,294,333,253,59,21,40]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadWebviewPanels=void 0;class s{constructor(){this._handlesToInputs=new Map,this._inputsToHandles=new Map}add(n,h){this._handlesToInputs.set(n,h),this._inputsToHandles.set(h,n)}getHandleForInput(n){return this._inputsToHandles.get(n)}getInputForHandle(n){return this._handlesToInputs.get(n)}delete(n){const h=this.getInputForHandle(n);this._handlesToInputs.delete(n),h&&this._inputsToHandles.delete(h)}get size(){return this._handlesToInputs.size}[Symbol.iterator](){return this._handlesToInputs.values()}}class l{constructor(n){this.prefix=n}fromExternal(n){return this.prefix+n}toExternal(n){return n.startsWith(this.prefix)?n.substr(this.prefix.length):void 0}}let r=class extends f.Disposable{constructor(n,h,g,d,m,b,E,y){super();this._mainThreadWebviews=h,this._configurationService=g,this._editorGroupService=d,this._editorService=m,this._telemetryService=E,this._webviewWorkbenchService=y,this.webviewPanelViewType=new l("mainThreadWebview-"),this._webviewInputs=new s,this._editorProviders=new Map,this._revivers=new Map,this._proxy=n.getProxy(I.ExtHostContext.ExtHostWebviewPanels),this._register(m.onDidActiveEditorChange(()=>{this.updateWebviewViewStates(this._editorService.activeEditor)})),this._register(m.onDidVisibleEditorsChange(()=>{this.updateWebviewViewStates(this._editorService.activeEditor)})),this._register(y.onDidChangeActiveWebviewEditor(T=>{this.updateWebviewViewStates(T)})),this._register(y.registerResolver({canResolve:T=>{const R=this.webviewPanelViewType.toExternal(T.viewType);return typeof R=="string"&&b.activateByEvent(`onWebviewPanel:${R}`),!1},resolveWebview:()=>{throw new Error("not implemented")}}))}dispose(){super.dispose(),(0,f.dispose)(this._editorProviders.values()),this._editorProviders.clear(),(0,f.dispose)(this._revivers.values()),this._revivers.clear()}get webviewInputs(){return this._webviewInputs}addWebviewInput(n,h,g){this._webviewInputs.add(n,h),this._mainThreadWebviews.addWebview(n,h.webview,g),h.webview.onDidDispose(()=>{this._proxy.$onDidDisposeWebviewPanel(n).finally(()=>{this._webviewInputs.delete(n)})})}$createWebviewPanel(n,h,g,d,m){const b=this.getTargetGroupFromShowOptions(m),E=m?{preserveFocus:!!m.preserveFocus,group:b}:{},y=(0,D.reviveWebviewExtension)(n),T=this._webviewWorkbenchService.createWebview(h,this.webviewPanelViewType.fromExternal(g),d.title,E,u(d.panelOptions),(0,D.reviveWebviewContentOptions)(d.webviewOptions),y);this.addWebviewInput(h,T,{serializeBuffersForPostMessage:d.serializeBuffersForPostMessage});const R={extensionId:y.id.value,viewType:g};this._telemetryService.publicLog2("webviews:createWebviewPanel",R)}$disposeWebview(n){this.getWebviewInput(n).dispose()}$setTitle(n,h){this.getWebviewInput(n).setName(h)}$setIconPath(n,h){const g=this.getWebviewInput(n);g.iconPath=p(h)}$reveal(n,h){const g=this.getWebviewInput(n);if(g.isDisposed())return;const d=this.getTargetGroupFromShowOptions(h);this._webviewWorkbenchService.revealWebview(g,d,!!h.preserveFocus)}getTargetGroupFromShowOptions(n){if(typeof n.viewColumn=="undefined"||n.viewColumn===i.ACTIVE_GROUP||this._editorGroupService.count===1&&this._editorGroupService.activeGroup.isEmpty)return i.ACTIVE_GROUP;if(n.viewColumn===i.SIDE_GROUP)return i.SIDE_GROUP;if(n.viewColumn>=0){const h=this._editorGroupService.getGroups(2)[n.viewColumn];if(h)return h.id;const g=this._editorGroupService.findGroup({location:1});if(g){const d=(0,c.preferredSideBySideGroupDirection)(this._configurationService);return this._editorGroupService.addGroup(g,d)}}return i.ACTIVE_GROUP}$registerSerializer(n,h){if(this._revivers.has(n))throw new Error(`Reviver for ${n} already registered`);this._revivers.set(n,this._webviewWorkbenchService.registerResolver({canResolve:g=>g.viewType===this.webviewPanelViewType.fromExternal(n),resolveWebview:async g=>{const d=this.webviewPanelViewType.toExternal(g.viewType);if(!d){g.webview.html=this._mainThreadWebviews.getWebviewResolvedFailedContent(g.viewType);return}const m=g.id;this.addWebviewInput(m,g,h);let b;if(g.webview.state)try{b=JSON.parse(g.webview.state)}catch(E){console.error("Could not load webview state",E,g.webview.state)}try{await this._proxy.$deserializeWebviewPanel(m,d,{title:g.getTitle(),state:b,panelOptions:g.webview.options,webviewOptions:g.webview.contentOptions},(0,o.editorGroupToColumn)(this._editorGroupService,g.group||0))}catch(E){(0,t.onUnexpectedError)(E),g.webview.html=this._mainThreadWebviews.getWebviewResolvedFailedContent(d)}}}))}$unregisterSerializer(n){const h=this._revivers.get(n);if(!h)throw new Error(`No reviver for ${n} registered`);h.dispose(),this._revivers.delete(n)}updateWebviewViewStates(n){if(!this._webviewInputs.size)return;const h={},g=(d,m,b)=>{if(!(b instanceof v.WebviewInput))return;b.updateGroup(d.id);const E=this._webviewInputs.getHandleForInput(b);E&&(h[E]={visible:m===d.activeEditor,active:b===n,position:(0,o.editorGroupToColumn)(this._editorGroupService,d.id)})};for(const d of this._editorGroupService.groups)for(const m of d.editors)m instanceof w.DiffEditorInput?(g(d,m,m.primary),g(d,m,m.secondary)):g(d,m,m);Object.keys(h).length&&this._proxy.$onDidChangeWebviewPanelViewStates(h)}getWebviewInput(n){const h=this.tryGetWebviewInput(n);if(!h)throw new Error(`Unknown webview handle:${n}`);return h}tryGetWebviewInput(n){return this._webviewInputs.getInputForHandle(n)}};r=Ee([W(2,A.IConfigurationService),W(3,c.IEditorGroupsService),W(4,i.IEditorService),W(5,S.IExtensionService),W(6,k.ITelemetryService),W(7,C.IWebviewWorkbenchService)],r),e.MainThreadWebviewPanels=r;function p(a){if(!!a)return{light:_.URI.revive(a.light),dark:_.URI.revive(a.dark)}}function u(a){return{enableFindWidget:a.enableFindWidget,retainContextWhenHidden:a.retainContextWhenHidden}}}),define(ne[2454],re([1,0,30,22,117,442,14,29,9,89,86,387,42,1806,85,38,41,46,187,581,333,59,21,40,199,8,1128]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReleaseNotesManager=void 0;let m=class{constructor(E,y,T,R,O,x,F,L,M,N,B){this._environmentService=E,this._keybindingService=y,this._languageService=T,this._openerService=R,this._requestService=O,this._configurationService=x,this._editorService=F,this._editorGroupService=L,this._webviewWorkbenchService=M,this._extensionService=N,this._productService=B,this._releaseNotesCache=new Map,this._currentReleaseNotes=void 0,v.TokenizationRegistry.onDidChange(async()=>{if(!this._currentReleaseNotes||!this._lastText)return;const P=await this.renderBody(this._lastText);this._currentReleaseNotes&&(this._currentReleaseNotes.webview.html=P)})}async show(E,y){const T=await this.loadReleaseNotes(y);this._lastText=T;const R=await this.renderBody(T),O=c.localize(0,null,y),x=this._editorService.activeEditorPane;return this._currentReleaseNotes?(this._currentReleaseNotes.setName(O),this._currentReleaseNotes.webview.html=R,this._webviewWorkbenchService.revealWebview(this._currentReleaseNotes,x?x.group:this._editorGroupService.activeGroup,!1)):(this._currentReleaseNotes=this._webviewWorkbenchService.createWebview((0,w.generateUuid)(),"releaseNotes",O,{group:n.ACTIVE_GROUP,preserveFocus:!1},{tryRestoreScrollPosition:!0,enableFindWidget:!0},{localResourceRoots:[]},void 0),this._currentReleaseNotes.webview.onDidClickLink(F=>this.onDidClickLink(I.URI.parse(F))),this._currentReleaseNotes.onWillDispose(()=>{this._currentReleaseNotes=void 0}),this._currentReleaseNotes.webview.html=R),!0}async loadReleaseNotes(E){const y=/^(\d+\.\d+)\./.exec(E);if(!y)throw new Error("not found");const O=`https://code.visualstudio.com/raw/v${y[1].replace(/\./g,"_")}.md`,x=c.localize(1,null),F=N=>(0,D.escape)(N).replace(/\\/g,"\\\\"),L=N=>{const B=(U,H)=>{const K=this._keybindingService.lookupKeybinding(H);return K&&K.getLabel()||x},P=(U,H)=>{const K=A.KeybindingParser.parseKeybinding(H,k.OS);if(!K)return x;const G=this._keybindingService.resolveKeybinding(K);return G.length===0?x:G[0].getLabel()||x},V=(U,H)=>{const K=B(U,H);return K&&`<code title="${H}">${F(K)}</code>`},z=(U,H)=>{const K=P(U,H);return K&&`<code title="${H}">${F(K)}</code>`};return N.replace(/`kb\(([a-z.\d\-]+)\)`/gi,V).replace(/`kbstyle\(([^\)]+)\)`/gi,z).replace(/kb\(([a-z.\d\-]+)\)/gi,(U,H)=>(0,_.escapeMarkdownSyntaxTokens)(B(U,H))).replace(/kbstyle\(([^\)]+)\)/gi,(U,H)=>(0,_.escapeMarkdownSyntaxTokens)(P(U,H)))},M=async()=>{let N;try{N=await(0,r.asText)(await this._requestService.request({url:O},t.CancellationToken.None))}catch{throw new Error("Failed to fetch release notes")}if(!N||!/^#\s/.test(N))throw new Error("Invalid release notes");return L(N)};return this._releaseNotesCache.has(E)||this._releaseNotesCache.set(E,(async()=>{try{return await M()}catch(N){throw this._releaseNotesCache.delete(E),N}})()),this._releaseNotesCache.get(E)}onDidClickLink(E){this.addGAParameters(E,"ReleaseNotes").then(y=>this._openerService.open(y)).then(void 0,f.onUnexpectedError)}async addGAParameters(E,y,T="1"){return(0,g.supportsTelemetry)(this._productService,this._environmentService)&&(0,g.getTelemetryLevel)(this._configurationService)===3&&E.scheme==="https"&&E.authority==="code.visualstudio.com"?E.with({query:`${E.query?E.query+"&":""}utm_source=VsCode&utm_medium=${encodeURIComponent(y)}&utm_content=${encodeURIComponent(T)}`}):E}async renderBody(E){const y=(0,w.generateUuid)(),T=await(0,p.renderMarkdownDocument)(E,this._extensionService,this._languageService,!1),R=v.TokenizationRegistry.getColorMap(),O=R?(0,C.generateTokensCSSForColorMap)(R):"";return`<!DOCTYPE html> <html> <head> <base href="https://code.visualstudio.com/raw/"> <meta http-equiv="Content-type" content="text/html;charset=UTF-8"> <meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src https: data:; media-src https:; style-src 'nonce-${y}' https://code.visualstudio.com;"> <style nonce="${y}"> ${p.DEFAULT_MARKDOWN_STYLES} ${O} </style> </head> <body>${T}</body> </html>`}};m=Ee([W(0,i.IEnvironmentService),W(1,S.IKeybindingService),W(2,o.ILanguageService),W(3,s.IOpenerService),W(4,r.IRequestService),W(5,d.IConfigurationService),W(6,n.IEditorService),W(7,a.IEditorGroupsService),W(8,u.IWebviewWorkbenchService),W(9,h.IExtensionService),W(10,l.IProductService)],m),e.ReleaseNotesManager=m}),define(ne[885],re([1,0,9,107,294,333]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.restoreWebviewContentOptions=e.restoreWebviewOptions=e.reviveWebviewExtensionDescription=e.WebviewEditorInputSerializer=void 0;let k=class{constructor(i){this._webviewWorkbenchService=i}canSerialize(i){return this._webviewWorkbenchService.shouldPersist(i)}serialize(i){if(!this._webviewWorkbenchService.shouldPersist(i))return;const S=this.toJson(i);try{return JSON.stringify(S)}catch{return}}deserialize(i,S){const s=this.fromJson(JSON.parse(S));return this._webviewWorkbenchService.reviveWebview({id:s.id,viewType:s.viewType,title:s.title,iconPath:s.iconPath,state:s.state,webviewOptions:s.webviewOptions,contentOptions:s.contentOptions,extension:s.extension,group:s.group})}fromJson(i){return{...i,extension:D(i.extensionId,i.extensionLocation),iconPath:I(i.iconPath),state:v(i.state),webviewOptions:C(i.options),contentOptions:o(i.options)}}toJson(i){return{id:i.id,viewType:i.viewType,title:i.getName(),options:{...i.webview.options,...i.webview.contentOptions},extensionLocation:i.extension?i.extension.location:void 0,extensionId:i.extension&&i.extension.id?i.extension.id.value:void 0,state:i.webview.state,iconPath:i.iconPath?{light:i.iconPath.light,dark:i.iconPath.dark}:void 0,group:i.group}}};k.ID=_.WebviewInput.typeId,k=Ee([W(0,A.IWebviewWorkbenchService)],k),e.WebviewEditorInputSerializer=k;function D(c,i){if(!c)return;const S=w(i);if(!!S)return{id:new f.ExtensionIdentifier(c),location:S}}e.reviveWebviewExtensionDescription=D;function I(c){if(!c)return;const i=w(c.light),S=w(c.dark);return i&&S?{light:i,dark:S}:void 0}function w(c){if(!!c)try{return typeof c=="string"?t.URI.parse(c):t.URI.from(c)}catch{return}}function v(c){return typeof c=="string"?c:void 0}function C(c){return c}e.restoreWebviewOptions=C;function o(c){return{...c,localResourceRoots:c.localResourceRoots?.map(i=>w(i))}}e.restoreWebviewContentOptions=o}),define(ne[2455],re([1,0,2,13,1834,16,28,7,38,53,17,47]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HasMultipleNewFileEntries=void 0;const o=(0,_.localize)(0,null);e.HasMultipleNewFileEntries=new D.RawContextKey("hasMultipleNewFileEntries",!1),(0,A.registerAction2)(class extends A.Action2{constructor(){super({id:"welcome.showNewFileEntries",title:{value:(0,_.localize)(1,null),original:"New File..."},category:o,f1:!0,keybinding:{primary:512+2048+256+44,weight:200},menu:{id:A.MenuId.MenubarFileMenu,when:e.HasMultipleNewFileEntries,group:"1_new",order:2}})}run(i){(0,f.assertIsDefined)(c.Instance).run()}});let c=class Gn extends t.Disposable{constructor(S,s,l,r,p){super();this.quickInputService=S,this.contextKeyService=s,this.commandService=l,this.keybindingService=r,Gn.Instance=this,this._register({dispose(){Gn.Instance===this&&(Gn.Instance=void 0)}}),this.menu=p.createMenu(A.MenuId.NewFile,s),this.updateContextKeys(),this._register(this.menu.onDidChange(()=>{this.updateContextKeys()}))}allEntries(){const S=[];for(const[s,l]of this.menu.getActions({renderShortTitle:!0}))for(const r of l)r instanceof A.MenuItemAction&&S.push({commandID:r.item.id,from:r.item.source??(0,_.localize)(2,null),title:r.label,group:s});return S}updateContextKeys(){e.HasMultipleNewFileEntries.bindTo(this.contextKeyService).set(this.allEntries().length>1)}run(){const S=this.allEntries();if(S.length===0)throw Error("Unexpected empty new items list");S.length===1?this.commandService.executeCommand(S[0].commandID):this.selectNewEntry(S)}async selectNewEntry(S){const s=new t.DisposableStore,l=this.quickInputService.createQuickPick();l.title=(0,_.localize)(3,null),l.matchOnDetail=!0,l.matchOnDescription=!0;const r=(a,n)=>{const h={file:1,notebook:2};return h[a]&&h[n]?h[n]-h[a]:h[a]?1:h[n]?-1:a.localeCompare(n)},p={file:(0,_.localize)(4,null),notebook:(0,_.localize)(5,null)},u=a=>{const n=[];let h;a.sort((g,d)=>-r(g.group,d.group)).forEach(g=>{const d=g.commandID,m=this.keybindingService.lookupKeybinding(d||"",this.contextKeyService);h!==g.group&&(n.push({type:"separator",label:p[g.group]??g.group}),h=g.group),n.push({...g,label:g.title,type:"item",keybinding:m,buttons:d?[{iconClass:"codicon codicon-gear",tooltip:(0,_.localize)(6,null)}]:[],detail:"",description:g.from})}),l.items=n};u(S),s.add(this.menu.onDidChange(()=>u(this.allEntries()))),s.add(l.onDidAccept(async a=>{const n=l.selectedItems[0];l.hide(),n&&await this.commandService.executeCommand(n.commandID)})),s.add(l.onDidHide(()=>{l.dispose(),s.dispose()})),s.add(l.onDidTriggerItemButton(a=>{l.hide(),this.commandService.executeCommand("workbench.action.openGlobalKeybindings",a.item.commandID)})),l.show()}};c=Ee([W(0,w.IQuickInputService),W(1,D.IContextKeyService),W(2,k.ICommandService),W(3,I.IKeybindingService),W(4,A.IMenuService)],c),v.Registry.as(C.Extensions.Workbench).registerWorkbenchContribution(c,3),A.MenuRegistry.appendMenuItem(A.MenuId.NewFile,{group:"File",command:{id:"workbench.action.files.newUntitledFile",title:(0,_.localize)(7,null)},order:1})}),define(ne[2456],re([1,0,5,17,47,2318,835,133]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const I=D.ExtensionsRegistry.registerExtensionPoint(k.viewsWelcomeExtensionPointDescriptor);let w=class{constructor(C){C.createInstance(A.ViewsWelcomeContribution,I)}};w=Ee([W(0,t.IInstantiationService)],w),f.Registry.as(_.Extensions.Workbench).registerWorkbenchContribution(w,3)}),define(ne[2457],re([1,0,1843,17,47,34,2,23,26,19,69,53,24,230]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspacesFinderContribution=void 0;let i=class extends k.Disposable{constructor(s,l,r,p,u,a){super();this.contextService=s,this.notificationService=l,this.fileService=r,this.quickInputService=p,this.hostService=u,this.storageService=a,this.findWorkspaces()}async findWorkspaces(){const s=this.contextService.getWorkspace().folders[0];if(!s||this.contextService.getWorkbenchState()!==2||(0,c.isVirtualWorkspace)(this.contextService.getWorkspace()))return;const l=(await this.fileService.resolve(s.uri)).children?.map(r=>r.name);if(Array.isArray(l)){const r=l.filter(A.hasWorkspaceFileExtension);r.length>0&&this.doHandleWorkspaceFiles(s.uri,r)}}doHandleWorkspaceFiles(s,l){const r={id:"workspaces.dontPromptToOpen",scope:I.NeverShowAgainScope.WORKSPACE,isSecondary:!0};if(l.length===1){const p=l[0];this.notificationService.prompt(I.Severity.Info,(0,t.localize)(0,null,p,"https://go.microsoft.com/fwlink/?linkid=2025315"),[{label:(0,t.localize)(1,null),run:()=>this.hostService.openWindow([{workspaceUri:(0,w.joinPath)(s,p)}])}],{neverShowAgain:r,silent:!this.storageService.isNew(1)})}else l.length>1&&this.notificationService.prompt(I.Severity.Info,(0,t.localize)(2,null,"https://go.microsoft.com/fwlink/?linkid=2025315"),[{label:(0,t.localize)(3,null),run:()=>{this.quickInputService.pick(l.map(p=>({label:p})),{placeHolder:(0,t.localize)(4,null)}).then(p=>{p&&this.hostService.openWindow([{workspaceUri:(0,w.joinPath)(s,p.label)}])})}}],{neverShowAgain:r,silent:!this.storageService.isNew(1)})}};i=Ee([W(0,A.IWorkspaceContextService),W(1,I.INotificationService),W(2,D.IFileService),W(3,C.IQuickInputService),W(4,v.IHostService),W(5,o.IStorageService)],i),e.WorkspacesFinderContribution=i,f.Registry.as(_.Extensions.Workbench).registerWorkbenchContribution(i,4)}),define(ne[2458],re([1,0,1844,87,21,16,70,50,141]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReloadWindowWithExtensionsDisabledAction=e.ToggleSharedProcessAction=e.ConfigureRuntimeArgumentsAction=e.ToggleDevToolsAction=void 0;class w extends A.Action2{constructor(){super({id:"workbench.action.toggleDevTools",title:{value:(0,t.localize)(0,null),original:"Toggle Developer Tools"},category:k.CATEGORIES.Developer,f1:!0,keybinding:{weight:200+50,when:I.IsDevelopmentContext,primary:2048|1024|39,mac:{primary:2048|512|39}},menu:{id:A.MenuId.MenubarHelpMenu,group:"5_tools",order:1}})}async run(i){return i.get(f.INativeHostService).toggleDevTools()}}e.ToggleDevToolsAction=w;class v extends A.Action2{constructor(){super({id:"workbench.action.configureRuntimeArguments",title:{value:(0,t.localize)(1,null),original:"Configure Runtime Arguments"},category:k.CATEGORIES.Preferences,f1:!0})}async run(i){const S=i.get(_.IEditorService),s=i.get(D.IWorkbenchEnvironmentService);await S.openEditor({resource:s.argvResource,options:{pinned:!0}})}}e.ConfigureRuntimeArgumentsAction=v;class C extends A.Action2{constructor(){super({id:"workbench.action.toggleSharedProcess",title:{value:(0,t.localize)(2,null),original:"Toggle Shared Process"},category:k.CATEGORIES.Developer,f1:!0})}async run(i){return i.get(f.INativeHostService).toggleSharedProcessWindow()}}e.ToggleSharedProcessAction=C;class o extends A.Action2{constructor(){super({id:"workbench.action.reloadWindowWithExtensionsDisabled",title:{value:(0,t.localize)(3,null),original:"Reload With Extensions Disabled"},category:k.CATEGORIES.Developer,f1:!0})}async run(i){return i.get(f.INativeHostService).reload({disableExtensions:!0})}}e.ReloadWindowWithExtensionsDisabledAction=o}),define(ne[2459],re([1,0,9,1846,770,38,77,23,52,42,53,198,8,87,33,34,16,70,1134]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleWindowTabsBarHandler=e.MergeWindowTabsHandlerHandler=e.MoveWindowTabToNewWindowHandler=e.ShowNextWindowTabHandler=e.ShowPreviousWindowTabHandler=e.NewWindowTabHandler=e.QuickSwitchWindowAction=e.SwitchWindowAction=e.ZoomResetAction=e.ZoomOutAction=e.ZoomInAction=e.CloseWindowAction=void 0;class r extends s.Action2{constructor(){super({id:r.ID,title:{value:(0,f.localize)(0,null),mnemonicTitle:(0,f.localize)(1,null),original:"Close Window"},f1:!0,keybinding:{weight:200,mac:{primary:2048|1024|53},linux:{primary:512|62,secondary:[2048|1024|53]},win:{primary:512|62,secondary:[2048|1024|53]}},menu:{id:s.MenuId.MenubarFileMenu,group:"6_close",order:4}})}async run(x){return x.get(c.INativeHostService).closeWindow()}}e.CloseWindowAction=r,r.ID="workbench.action.closeWindow";class p extends s.Action2{constructor(x){super(x)}async setConfiguredZoomLevel(x,F){const L=x.get(o.IConfigurationService);F=Math.round(F),!(F>p.MAX_ZOOM_LEVEL||F<p.MIN_ZOOM_LEVEL)&&(await L.updateValue(p.SETTING_KEY,F),(0,_.applyZoom)(F))}}p.SETTING_KEY="window.zoomLevel",p.MAX_ZOOM_LEVEL=8,p.MIN_ZOOM_LEVEL=-8;class u extends p{constructor(){super({id:"workbench.action.zoomIn",title:{value:(0,f.localize)(2,null),mnemonicTitle:(0,f.localize)(3,null),original:"Zoom In"},category:l.CATEGORIES.View,f1:!0,keybinding:{weight:200,primary:2048|81,secondary:[2048|1024|81,2048|104]},menu:{id:s.MenuId.MenubarAppearanceMenu,group:"3_zoom",order:1}})}run(x){return super.setConfiguredZoomLevel(x,(0,k.getZoomLevel)()+1)}}e.ZoomInAction=u;class a extends p{constructor(){super({id:"workbench.action.zoomOut",title:{value:(0,f.localize)(4,null),mnemonicTitle:(0,f.localize)(5,null),original:"Zoom Out"},category:l.CATEGORIES.View,f1:!0,keybinding:{weight:200,primary:2048|83,secondary:[2048|1024|83,2048|106],linux:{primary:2048|83,secondary:[2048|106]}},menu:{id:s.MenuId.MenubarAppearanceMenu,group:"3_zoom",order:2}})}run(x){return super.setConfiguredZoomLevel(x,(0,k.getZoomLevel)()-1)}}e.ZoomOutAction=a;class n extends p{constructor(){super({id:"workbench.action.zoomReset",title:{value:(0,f.localize)(6,null),mnemonicTitle:(0,f.localize)(7,null),original:"Reset Zoom"},category:l.CATEGORIES.View,f1:!0,keybinding:{weight:200,primary:2048|93},menu:{id:s.MenuId.MenubarAppearanceMenu,group:"3_zoom",order:3}})}run(x){return super.setConfiguredZoomLevel(x,0)}}e.ZoomResetAction=n;class h extends s.Action2{constructor(x){super(x);this.closeWindowAction={iconClass:i.Codicon.removeClose.classNames,tooltip:(0,f.localize)(8,null)},this.closeDirtyWindowAction={iconClass:"dirty-window "+i.Codicon.closeDirty,tooltip:(0,f.localize)(9,null),alwaysVisible:!0}}async run(x){const F=x.get(v.IQuickInputService),L=x.get(A.IKeybindingService),M=x.get(I.IModelService),N=x.get(w.ILanguageService),B=x.get(c.INativeHostService),P=B.windowId,V=await B.getWindows(),z=(0,f.localize)(10,null),U=V.map(G=>{const q=G.filename?t.URI.file(G.filename):(0,S.isSingleFolderWorkspaceIdentifier)(G.workspace)?G.workspace.uri:(0,S.isWorkspaceIdentifier)(G.workspace)?G.workspace.configPath:void 0,Z=G.filename?D.FileKind.FILE:(0,S.isSingleFolderWorkspaceIdentifier)(G.workspace)?D.FileKind.FOLDER:(0,S.isWorkspaceIdentifier)(G.workspace)?D.FileKind.ROOT_FOLDER:D.FileKind.FILE;return{payload:G.id,label:G.title,ariaLabel:G.dirty?(0,f.localize)(11,null,G.title):G.title,iconClasses:(0,C.getIconClasses)(M,N,q,Z),description:P===G.id?(0,f.localize)(12,null):void 0,buttons:P!==G.id?G.dirty?[this.closeDirtyWindowAction]:[this.closeWindowAction]:void 0}}),H=(U.indexOf(U.filter(G=>G.payload===P)[0])+1)%U.length,K=await F.pick(U,{contextKey:"inWindowsPicker",activeItem:U[H],placeHolder:z,quickNavigate:this.isQuickNavigate()?{keybindings:L.lookupKeybindings(this.desc.id)}:void 0,onDidTriggerItemButton:async G=>{await B.closeWindowById(G.item.payload),G.removeItem()}});K&&B.focusWindow({windowId:K.payload})}}class g extends h{constructor(){super({id:"workbench.action.switchWindow",title:{value:(0,f.localize)(13,null),original:"Switch Window..."},f1:!0,keybinding:{weight:200,primary:0,mac:{primary:256|53}}})}isQuickNavigate(){return!1}}e.SwitchWindowAction=g;class d extends h{constructor(){super({id:"workbench.action.quickSwitchWindow",title:{value:(0,f.localize)(14,null),original:"Quick Switch Window..."},f1:!0})}isQuickNavigate(){return!0}}e.QuickSwitchWindowAction=d;const m=function(O){return O.get(c.INativeHostService).newWindowTab()};e.NewWindowTabHandler=m;const b=function(O){return O.get(c.INativeHostService).showPreviousWindowTab()};e.ShowPreviousWindowTabHandler=b;const E=function(O){return O.get(c.INativeHostService).showNextWindowTab()};e.ShowNextWindowTabHandler=E;const y=function(O){return O.get(c.INativeHostService).moveWindowTabToNewWindow()};e.MoveWindowTabToNewWindowHandler=y;const T=function(O){return O.get(c.INativeHostService).mergeAllWindowTabs()};e.MergeWindowTabsHandlerHandler=T;const R=function(O){return O.get(c.INativeHostService).toggleWindowTabsBar()};e.ToggleWindowTabsBarHandler=R}),define(ne[2460],re([1,0,17,1847,16,57,14,2458,2459,7,94,28,141,87,146,2253,74,27]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(){(0,_.registerAction2)(I.ZoomInAction),(0,_.registerAction2)(I.ZoomOutAction),(0,_.registerAction2)(I.ZoomResetAction),(0,_.registerAction2)(I.SwitchWindowAction),(0,_.registerAction2)(I.QuickSwitchWindowAction),(0,_.registerAction2)(I.CloseWindowAction),k.isMacintosh&&v.KeybindingsRegistry.registerKeybindingRule({id:I.CloseWindowAction.ID,weight:200,when:w.ContextKeyExpr.and(s.EditorsVisibleContext.toNegated(),s.SingleEditorGroupsContext),primary:2048|53}),k.isMacintosh&&((0,_.registerAction2)(S.InstallShellScriptAction),(0,_.registerAction2)(S.UninstallShellScriptAction)),v.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.quit",weight:200,handler(p){p.get(c.INativeHostService).quit()},when:void 0,mac:{primary:2048|47},linux:{primary:2048|47}}),k.isMacintosh&&[{handler:I.NewWindowTabHandler,id:"workbench.action.newWindowTab",title:{value:(0,f.localize)(0,null),original:"New Window Tab"}},{handler:I.ShowPreviousWindowTabHandler,id:"workbench.action.showPreviousWindowTab",title:{value:(0,f.localize)(1,null),original:"Show Previous Window Tab"}},{handler:I.ShowNextWindowTabHandler,id:"workbench.action.showNextWindowTab",title:{value:(0,f.localize)(2,null),original:"Show Next Window Tab"}},{handler:I.MoveWindowTabToNewWindowHandler,id:"workbench.action.moveWindowTabToNewWindow",title:{value:(0,f.localize)(3,null),original:"Move Window Tab to New Window"}},{handler:I.MergeWindowTabsHandlerHandler,id:"workbench.action.mergeAllWindowTabs",title:{value:(0,f.localize)(4,null),original:"Merge All Windows"}},{handler:I.ToggleWindowTabsBarHandler,id:"workbench.action.toggleWindowTabsBar",title:{value:(0,f.localize)(5,null),original:"Toggle Window Tabs Bar"}}].forEach(p=>{C.CommandsRegistry.registerCommand(p.id,p.handler),_.MenuRegistry.appendMenuItem(_.MenuId.CommandPalette,{command:p,when:w.ContextKeyExpr.equals("config.window.nativeTabs",!0)})}),(0,_.registerAction2)(D.ReloadWindowWithExtensionsDisabledAction),(0,_.registerAction2)(D.ConfigureRuntimeArgumentsAction),(0,_.registerAction2)(D.ToggleSharedProcessAction),(0,_.registerAction2)(D.ToggleDevToolsAction)}(),function(){_.MenuRegistry.appendMenuItem(_.MenuId.MenubarFileMenu,{group:"z_Exit",command:{id:"workbench.action.quit",title:(0,f.localize)(6,null)},order:1,when:o.IsMacContext.toNegated()})}(),function(){const p=t.Registry.as(A.Extensions.Configuration);p.registerConfiguration({id:"window",order:8,title:(0,f.localize)(7,null),type:"object",properties:{"window.openWithoutArgumentsInNewWindow":{type:"string",enum:["on","off"],enumDescriptions:[(0,f.localize)(8,null),(0,f.localize)(9,null)],default:k.isMacintosh?"off":"on",scope:1,markdownDescription:(0,f.localize)(10,null)},"window.restoreWindows":{type:"string",enum:["preserve","all","folders","one","none"],enumDescriptions:[(0,f.localize)(11,null),(0,f.localize)(12,null),(0,f.localize)(13,null),(0,f.localize)(14,null),(0,f.localize)(15,null)],default:"all",scope:1,description:(0,f.localize)(16,null)},"window.restoreFullscreen":{type:"boolean",default:!1,scope:1,description:(0,f.localize)(17,null)},"window.zoomLevel":{type:"number",default:0,description:(0,f.localize)(18,null),ignoreSync:!0},"window.newWindowDimensions":{type:"string",enum:["default","inherit","offset","maximized","fullscreen"],enumDescriptions:[(0,f.localize)(19,null),(0,f.localize)(20,null),(0,f.localize)(21,null),(0,f.localize)(22,null),(0,f.localize)(23,null)],default:"default",scope:1,description:(0,f.localize)(24,null)},"window.closeWhenEmpty":{type:"boolean",default:!1,description:(0,f.localize)(25,null)},"window.doubleClickIconToClose":{type:"boolean",default:!1,scope:1,markdownDescription:(0,f.localize)(26,null)},"window.titleBarStyle":{type:"string",enum:["native","custom"],default:k.isLinux?"native":"custom",scope:1,description:(0,f.localize)(27,null)},"window.dialogStyle":{type:"string",enum:["native","custom"],default:"native",scope:1,description:(0,f.localize)(28,null)},"window.nativeTabs":{type:"boolean",default:!1,scope:1,description:(0,f.localize)(29,null),included:k.isMacintosh},"window.nativeFullScreen":{type:"boolean",default:!0,description:(0,f.localize)(30,null),scope:1,included:k.isMacintosh},"window.clickThroughInactive":{type:"boolean",default:!0,scope:1,description:(0,f.localize)(31,null),included:k.isMacintosh}}}),p.registerConfiguration({id:"telemetry",order:110,title:(0,f.localize)(32,null),type:"object",properties:{"telemetry.enableCrashReporter":{type:"boolean",description:(0,f.localize)(33,null),default:!0,tags:["usesOnlineServices","telemetry"],markdownDeprecationMessage:(0,f.localize)(34,null,`\`#${l.TELEMETRY_SETTING_ID}#\``)}}}),p.registerConfiguration({id:"keyboard",order:15,type:"object",title:(0,f.localize)(35,null),properties:{"keyboard.touchbar.enabled":{type:"boolean",default:!0,description:(0,f.localize)(36,null),included:k.isMacintosh},"keyboard.touchbar.ignored":{type:"array",items:{type:"string"},default:[],markdownDescription:(0,f.localize)(37,null),included:k.isMacintosh}}})}(),function(){const p="vscode://schemas/argv",u=t.Registry.as(i.Extensions.JSONContribution),a={id:p,allowComments:!0,allowTrailingCommas:!0,description:"VSCode static command line definition file",type:"object",additionalProperties:!1,properties:{locale:{type:"string",description:(0,f.localize)(38,null)},"disable-hardware-acceleration":{type:"boolean",description:(0,f.localize)(39,null)},"disable-color-correct-rendering":{type:"boolean",description:(0,f.localize)(40,null)},"force-color-profile":{type:"string",markdownDescription:(0,f.localize)(41,null)},"enable-crash-reporter":{type:"boolean",markdownDescription:(0,f.localize)(42,null)},"crash-reporter-id":{type:"string",markdownDescription:(0,f.localize)(43,null)},"enable-proposed-api":{type:"array",description:(0,f.localize)(44,null),items:{type:"string"}},"log-level":{type:"string",description:(0,f.localize)(45,null)}}};k.isLinux&&(a.properties["force-renderer-accessibility"]={type:"boolean",description:(0,f.localize)(46,null)}),u.registerSchema(p,a)}()}),define(ne[2461],re([1,0,95,8,54,38,185,31,87,46,17,12,47,2116,2254,2,5]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DialogHandlerContribution=void 0;let l=class extends S.Disposable{constructor(u,a,n,h,g,d,m,b,E,y){super();this.configurationService=u,this.dialogService=a,this.browserImpl=new c.BrowserDialogHandler(n,h,g,d,m,b,E),this.nativeImpl=new i.NativeDialogHandler(n,y,b,E),this.model=this.dialogService.model,this._register(this.model.onWillShowDialog(()=>{this.currentDialog||this.processDialogs()})),this.processDialogs()}async processDialogs(){for(;this.model.dialogs.length;){this.currentDialog=this.model.dialogs[0];let u;if(this.currentDialog.args.confirmArgs){const a=this.currentDialog.args.confirmArgs;u=this.useCustomDialog?await this.browserImpl.confirm(a.confirmation):await this.nativeImpl.confirm(a.confirmation)}else if(this.currentDialog.args.inputArgs){const a=this.currentDialog.args.inputArgs;u=await this.browserImpl.input(a.severity,a.message,a.buttons,a.inputs,a.options)}else if(this.currentDialog.args.showArgs){const a=this.currentDialog.args.showArgs;u=this.useCustomDialog||a.options?.custom?await this.browserImpl.show(a.severity,a.message,a.buttons,a.options):await this.nativeImpl.show(a.severity,a.message,a.buttons,a.options)}else await this.nativeImpl.about();this.currentDialog.close(u),this.currentDialog=void 0}}get useCustomDialog(){return this.configurationService.getValue("window.dialogStyle")==="custom"}};l=Ee([W(0,f.IConfigurationService),W(1,_.IDialogService),W(2,D.ILogService),W(3,k.ILayoutService),W(4,C.IThemeService),W(5,A.IKeybindingService),W(6,s.IInstantiationService),W(7,w.IProductService),W(8,t.IClipboardService),W(9,I.INativeHostService)],l),e.DialogHandlerContribution=l,v.Registry.as(o.Extensions.Workbench).registerWorkbenchContribution(l,1)}),define(ne[2462],re([1,0,98,14,121,7,8,17,1957,35,27,272,47,87,185]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeAccessibilityService=void 0;let S=class extends I.AccessibilityService{constructor(r,p,u,a,n,h){super(p,a,u);this._telemetryService=n,this.nativeHostService=h,this.didSendTelemetry=!1,this.shouldAlwaysUnderlineAccessKeys=void 0,this.setAccessibilitySupport(r.window.accessibilitySupport?2:1)}async alwaysUnderlineAccessKeys(){if(!f.isWindows)return!1;if(typeof this.shouldAlwaysUnderlineAccessKeys!="boolean"){const r=await this.nativeHostService.windowsGetStringRegKey("HKEY_CURRENT_USER","Control Panel\\Accessibility\\Keyboard Preference","On");this.shouldAlwaysUnderlineAccessKeys=r==="1"}return this.shouldAlwaysUnderlineAccessKeys}setAccessibilitySupport(r){super.setAccessibilitySupport(r),!this.didSendTelemetry&&r===2&&(this._telemetryService.publicLog2("accessibility",{enabled:!0}),this.didSendTelemetry=!0)}};S=Ee([W(0,_.INativeWorkbenchEnvironmentService),W(1,A.IContextKeyService),W(2,k.IConfigurationService),W(3,i.ILayoutService),W(4,v.ITelemetryService),W(5,c.INativeHostService)],S),e.NativeAccessibilityService=S,(0,w.registerSingleton)(t.IAccessibilityService,S,!0);let s=class{constructor(r,p,u){const a=()=>{p.isScreenReaderOptimized()&&r.write(u.argvResource,[{path:["force-renderer-accessibility"],value:!0}],!0)};a(),p.onDidChangeScreenReaderOptimized(a)}};s=Ee([W(0,C.IJSONEditingService),W(1,t.IAccessibilityService),W(2,_.INativeWorkbenchEnvironmentService)],s),f.isLinux&&D.Registry.as(o.Extensions.Workbench).registerWorkbenchContribution(s,2)}),define(ne[2463],re([1,0,1864,79,24,107,35,26,69,5,16,7,54,17,47,28,31,46,612,50,100,70]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtensionBisectService=void 0,e.IExtensionBisectService=(0,w.createDecorator)("IExtensionBisectService");class n{constructor(m,b,E,y=(b+E)/2|0){this.extensions=m,this.low=b,this.high=E,this.mid=y}static fromJSON(m){if(!!m)try{const b=JSON.parse(m);return new n(b.extensions,b.low,b.high,b.mid)}catch{return}}}let h=class gn{constructor(m,b,E){this._storageService=b,this._envService=E,this._disabled=new Map;const y=b.get(gn._storageKey,0);if(this._state=n.fromJSON(y),this._state){const{mid:T,high:R}=this._state;for(let O=0;O<this._state.extensions.length;O++){const x=O>=T&&O<R;this._disabled.set(this._state.extensions[O],x)}m.warn("extension BISECT active",[...this._disabled])}}get isActive(){return!!this._state}get disabledCount(){return this._state?this._state.high-this._state.mid:-1}isDisabledByBisect(m){return!this._state||(0,A.isResolverExtension)(m.manifest,this._envService.remoteAuthority)||this._isEnabledInEnv(m)?!1:this._disabled.get(m.identifier.id)??!1}_isEnabledInEnv(m){return Array.isArray(this._envService.enableExtensions)&&this._envService.enableExtensions.some(b=>(0,u.areSameExtensions)({id:b},m.identifier))}async start(m){if(this._state)throw new Error("invalid state");const b=m.map(y=>y.identifier.id),E=new n(b,0,b.length,0);this._storageService.store(gn._storageKey,JSON.stringify(E),0,1),await this._storageService.flush()}async next(m){if(!this._state)throw new Error("invalid state");if(m&&this._state.mid===0&&this._state.high===this._state.extensions.length)return{bad:!0,id:""};if(this._state.low===this._state.high-1)return await this.reset(),{id:this._state.extensions[this._state.low],bad:m};const b=new n(this._state.extensions,m?this._state.low:this._state.mid,m?this._state.mid:this._state.high);this._storageService.store(gn._storageKey,JSON.stringify(b),0,1),await this._storageService.flush()}async reset(){this._storageService.remove(gn._storageKey,0),await this._storageService.flush()}};h._storageKey="extensionBisectState",h=Ee([W(0,s.ILogService),W(1,_.IStorageService),W(2,p.IWorkbenchEnvironmentService)],h),(0,k.registerSingleton)(e.IExtensionBisectService,h,!0);let g=class Yo{constructor(m,b,E,y){this._extensionBisectService=b,this._notificationService=E,this._commandService=y,b.isActive&&(Yo.ctxIsBisectActive.bindTo(m).set(!0),this._showBisectPrompt())}_showBisectPrompt(){const m={label:"Good now",run:()=>this._commandService.executeCommand("extension.bisect.next",!1)},b={label:"This is bad",run:()=>this._commandService.executeCommand("extension.bisect.next",!0)},E={label:"Stop Bisect",run:()=>this._commandService.executeCommand("extension.bisect.stop")},y=this._extensionBisectService.disabledCount===1?(0,t.localize)(0,null):(0,t.localize)(1,null,this._extensionBisectService.disabledCount);this._notificationService.prompt(D.Severity.Info,y,[m,b,E],{sticky:!0})}};g.ctxIsBisectActive=new C.RawContextKey("isExtensionBisectActive",!1),g=Ee([W(0,C.IContextKeyService),W(1,e.IExtensionBisectService),W(2,D.INotificationService),W(3,S.ICommandService)],g),c.Registry.as(i.Extensions.Workbench).registerWorkbenchContribution(g,3),(0,v.registerAction2)(class extends v.Action2{constructor(){super({id:"extension.bisect.start",title:{value:(0,t.localize)(2,null),original:"Start Extension Bisect"},category:a.CATEGORIES.Help,f1:!0,precondition:g.ctxIsBisectActive.negate(),menu:{id:v.MenuId.ViewContainerTitle,when:C.ContextKeyExpr.equals("viewContainer","workbench.view.extensions"),group:"2_enablement",order:4}})}async run(d){const m=d.get(o.IDialogService),b=d.get(I.IHostService),E=d.get(f.IExtensionManagementService),y=d.get(f.IGlobalExtensionEnablementService),T=d.get(e.IExtensionBisectService),R=new Set(y.getDisabledExtensions().map(F=>F.id)),O=(await E.getInstalled(1)).filter(F=>!R.has(F.identifier.id));(await m.confirm({message:(0,t.localize)(3,null),detail:(0,t.localize)(4,null,2+Math.log2(O.length)|0),primaryButton:(0,t.localize)(5,null)})).confirmed&&(await T.start(O),b.reload())}}),(0,v.registerAction2)(class extends v.Action2{constructor(){super({id:"extension.bisect.next",title:{value:(0,t.localize)(6,null),original:"Continue Extension Bisect"},category:(0,t.localize)(7,null),f1:!0,precondition:g.ctxIsBisectActive})}async run(d,m){const b=d.get(o.IDialogService),E=d.get(I.IHostService),y=d.get(e.IExtensionBisectService),T=d.get(l.IProductService),R=d.get(f.IGlobalExtensionEnablementService),O=d.get(r.IWorkbenchIssueService);if(!y.isActive)return;if(m===void 0){const F=await this._checkForBad(b,y);if(F===null)return;m=F}if(m===void 0){await y.reset(),E.reload();return}const x=await y.next(m);if(!x){E.reload();return}if(x.bad)await b.show(D.Severity.Info,(0,t.localize)(8,null),void 0,{detail:(0,t.localize)(9,null,T.nameShort)});else{const F=await b.show(D.Severity.Info,(0,t.localize)(10,null),[(0,t.localize)(11,null),(0,t.localize)(12,null)],{detail:(0,t.localize)(13,null,x.id),checkbox:{label:(0,t.localize)(14,null),checked:!0},cancelId:1});F.checkboxChecked&&await R.disableExtension({id:x.id},void 0),F.choice===0&&await O.openReporter({extensionId:x.id})}await y.reset(),E.reload()}async _checkForBad(d,m){const b={cancelId:3,detail:(0,t.localize)(15,null,m.disabledCount)};switch((await d.show(D.Severity.Info,(0,t.localize)(16,null),[(0,t.localize)(17,null),(0,t.localize)(18,null),(0,t.localize)(19,null),(0,t.localize)(20,null)],b)).choice){case 0:return!1;case 1:return!0;case 2:return}return null}}),(0,v.registerAction2)(class extends v.Action2{constructor(){super({id:"extension.bisect.stop",title:{value:(0,t.localize)(21,null),original:"Stop Extension Bisect"},category:(0,t.localize)(22,null),f1:!0,precondition:g.ctxIsBisectActive})}async run(d){const m=d.get(e.IExtensionBisectService),b=d.get(I.IHostService);await m.reset(),b.reload()}})}),define(ne[886],re([1,0,1871,2,9,8,54,79,115,100,5,26,24,407,69,40,107,35,17,47,16,53,67,141,730,30,27]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtensionUrlHandler=void 0;const b=5*60*1e3,E=30*1e3,y="extensionUrlHandler.urlToHandle",T="extensions.confirmedUriHandlerExtensionIds",R="extensionUrlHandler.confirmedExtensions";function O(B){return/^[a-z0-9][a-z0-9\-]*\.[a-z0-9][a-z0-9\-]*$/i.test(B)}class x{constructor(P){this.storageService=P}get extensions(){const P=this.storageService.get(R,0,"[]");try{return JSON.parse(P)}catch{return[]}}has(P){return this.extensions.indexOf(P)>-1}add(P){this.set([...this.extensions,P])}set(P){this.storageService.store(R,JSON.stringify(P),0,1)}}e.IExtensionUrlHandler=(0,v.createDecorator)("extensionUrlHandler");let F=class{constructor(P,V,z,U,H,K,G,q,Z,j,X,Y,$){this.extensionService=V,this.dialogService=z,this.notificationService=U,this.extensionManagementService=H,this.extensionEnablementService=K,this.hostService=G,this.galleryService=q,this.storageService=Z,this.configurationService=j,this.progressService=X,this.telemetryService=Y,this.extensionUrlTrustService=$,this.extensionHandlers=new Map,this.uriBuffer=new Map,this.userTrustedExtensionsStorage=new x(Z);const J=setInterval(()=>this.garbageCollect(),E),ee=this.storageService.get(y,1);ee&&(this.storageService.remove(y,1),this.handleURL(_.URI.revive(JSON.parse(ee)),{trusted:!0})),this.disposable=(0,f.combinedDisposable)(P.registerHandler(this),(0,f.toDisposable)(()=>clearInterval(J)));const te=L.cache;setTimeout(()=>te.forEach(([se,ie])=>this.handleURL(se,ie)))}async handleURL(P,V){if(!O(P.authority))return!1;const z=P.authority;this.telemetryService.publicLog2("uri_invoked/start",{extensionId:z});const U=this.extensionHandlers.has(s.ExtensionIdentifier.toKey(z)),H=await this.extensionService.getExtension(z);if(!H)return await this.handleUnhandledURL(P,{id:z},V),!0;if(!(V?.trusted||(V?.originalUrl?await this.extensionUrlTrustService.isExtensionUrlTrusted(z,V.originalUrl):!1)||this.didUserTrustExtension(s.ExtensionIdentifier.toKey(z)))){let j=P.toString(!1);j.length>40&&(j=`${j.substring(0,30)}...${j.substring(j.length-5)}`);const X=await this.dialogService.confirm({message:(0,t.localize)(0,null,z),checkbox:{label:(0,t.localize)(1,null)},detail:`${H.displayName||H.name} (${z}) wants to open a URI: ${j}`,primaryButton:(0,t.localize)(2,null),type:"question"});if(!X.confirmed)return this.telemetryService.publicLog2("uri_invoked/cancel",{extensionId:z}),!0;X.checkboxChecked&&this.userTrustedExtensionsStorage.add(s.ExtensionIdentifier.toKey(z))}const G=this.extensionHandlers.get(s.ExtensionIdentifier.toKey(z));if(G)return U?!1:await this.handleURLByExtension(z,G,P,V);const q=new Date().getTime();let Z=this.uriBuffer.get(s.ExtensionIdentifier.toKey(z));return Z||(Z=[],this.uriBuffer.set(s.ExtensionIdentifier.toKey(z),Z)),Z.push({timestamp:q,uri:P}),await this.extensionService.activateByEvent(`onUri:${s.ExtensionIdentifier.toKey(z)}`),!0}registerExtensionHandler(P,V){this.extensionHandlers.set(s.ExtensionIdentifier.toKey(P),V);const z=this.uriBuffer.get(s.ExtensionIdentifier.toKey(P))||[];for(const{uri:U}of z)this.handleURLByExtension(P,V,U);this.uriBuffer.delete(s.ExtensionIdentifier.toKey(P))}unregisterExtensionHandler(P){this.extensionHandlers.delete(s.ExtensionIdentifier.toKey(P))}async handleURLByExtension(P,V,z,U){return this.telemetryService.publicLog2("uri_invoked/end",{extensionId:s.ExtensionIdentifier.toKey(P)}),await V.handleURL(z,U)}async handleUnhandledURL(P,V,z){let H=(await this.extensionManagementService.getInstalled()).find(K=>(0,w.areSameExtensions)(K.identifier,V));if(!H){let K;try{K=(await this.galleryService.getExtensions([V],d.CancellationToken.None))[0]??void 0}catch{return}if(!K)return;if(this.telemetryService.publicLog2("uri_invoked/install_extension/start",{extensionId:V.id}),!(await this.dialogService.confirm({message:(0,t.localize)(3,null,K.displayName||K.name),detail:`${K.displayName||K.name} (${V.id}) wants to open a URL: ${P.toString()}`,primaryButton:(0,t.localize)(4,null),type:"question"})).confirmed){this.telemetryService.publicLog2("uri_invoked/install_extension/cancel",{extensionId:V.id});return}this.telemetryService.publicLog2("uri_invoked/install_extension/accept",{extensionId:V.id});try{H=await this.progressService.withProgress({location:15,title:(0,t.localize)(5,null,K.displayName||K.name)},()=>this.extensionManagementService.installFromGallery(K))}catch(q){this.notificationService.error(q);return}}if(!this.extensionEnablementService.isEnabled(H)){if(this.telemetryService.publicLog2("uri_invoked/enable_extension/start",{extensionId:V.id}),!(await this.dialogService.confirm({message:(0,t.localize)(6,null,H.manifest.displayName||H.manifest.name),detail:`${H.manifest.displayName||H.manifest.name} (${V.id}) wants to open a URL: ${P.toString()}`,primaryButton:(0,t.localize)(7,null),type:"question"})).confirmed){this.telemetryService.publicLog2("uri_invoked/enable_extension/cancel",{extensionId:V.id});return}this.telemetryService.publicLog2("uri_invoked/enable_extension/accept",{extensionId:V.id}),await this.extensionEnablementService.setEnablement([H],8)}if(this.extensionService.canAddExtension((0,S.toExtensionDescription)(H)))await this.waitUntilExtensionIsAdded(V),await this.handleURL(P,{...z,trusted:!0});else{if(this.telemetryService.publicLog2("uri_invoked/activate_extension/start",{extensionId:V.id}),!(await this.dialogService.confirm({message:(0,t.localize)(8,null,H.manifest.displayName||H.manifest.name),detail:`${H.manifest.displayName||H.manifest.name} (${V.id}) wants to open a URL: ${P.toString()}`,primaryButton:(0,t.localize)(9,null),type:"question"})).confirmed){this.telemetryService.publicLog2("uri_invoked/activate_extension/cancel",{extensionId:V.id});return}this.telemetryService.publicLog2("uri_invoked/activate_extension/accept",{extensionId:V.id}),this.storageService.store(y,JSON.stringify(P.toJSON()),1,1),await this.hostService.reload()}}async waitUntilExtensionIsAdded(P){await this.extensionService.getExtension(P.id)||await new Promise((V,z)=>{const U=this.extensionService.onDidChangeExtensions(async()=>{try{await this.extensionService.getExtension(P.id)&&(U.dispose(),V())}catch(H){z(H)}})})}garbageCollect(){const P=new Date().getTime(),V=new Map;this.uriBuffer.forEach((z,U)=>{z=z.filter(({timestamp:H})=>P-H<b),z.length>0&&V.set(U,z)}),this.uriBuffer=V}didUserTrustExtension(P){return this.userTrustedExtensionsStorage.has(P)?!0:this.getConfirmedTrustedExtensionIdsFromConfiguration().indexOf(P)>-1}getConfirmedTrustedExtensionIdsFromConfiguration(){const P=this.configurationService.getValue(T);return Array.isArray(P)?P:[]}dispose(){this.disposable.dispose(),this.extensionHandlers.clear(),this.uriBuffer.clear()}};F=Ee([W(0,c.IURLService),W(1,S.IExtensionService),W(2,k.IDialogService),W(3,C.INotificationService),W(4,D.IExtensionManagementService),W(5,I.IWorkbenchExtensionEnablementService),W(6,i.IHostService),W(7,D.IExtensionGalleryService),W(8,o.IStorageService),W(9,A.IConfigurationService),W(10,n.IProgressService),W(11,m.ITelemetryService),W(12,g.IExtensionUrlTrustService)],F),(0,l.registerSingleton)(e.IExtensionUrlHandler,F);let L=class Ui{constructor(P){Ui.disposable=P.registerHandler(this)}static get cache(){Ui.disposable.dispose();const P=Ui._cache;return Ui._cache=[],P}async handleURL(P,V){return O(P.authority)?(Ui._cache.push([P,V]),!0):!1}};L._cache=[],L=Ee([W(0,c.IURLService)],L),r.Registry.as(p.Extensions.Workbench).registerWorkbenchContribution(L,2);class N extends u.Action2{constructor(){super({id:"workbench.extensions.action.manageAuthorizedExtensionURIs",title:{value:(0,t.localize)(10,null),original:"Manage Authorized Extension URIs..."},category:{value:(0,t.localize)(11,null),original:"Extensions"},menu:{id:u.MenuId.CommandPalette,when:h.IsWebContext.toNegated()}})}async run(P){const V=P.get(o.IStorageService),z=P.get(a.IQuickInputService),U=new x(V),H=U.extensions.map(G=>({label:G,picked:!0}));if(H.length===0){await z.pick([{label:(0,t.localize)(12,null)}]);return}const K=await z.pick(H,{canPickMany:!0});!K||U.set(K.map(G=>G.label))}}(0,u.registerAction2)(N)}),define(ne[2464],re([1,0,65,75,407,886,107]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadUrls=void 0;class D{constructor(v,C,o){this.proxy=v,this.handle=C,this.extensionId=o}handleURL(v,C){return k.ExtensionIdentifier.equals(this.extensionId,v.authority)?Promise.resolve(this.proxy.$handleExternalUri(this.handle,v)).then(()=>!0):Promise.resolve(!1)}}let I=class{constructor(v,C,o){this.urlService=C,this.extensionUrlHandler=o,this.handlers=new Map,this.proxy=v.getProxy(t.ExtHostContext.ExtHostUrls)}$registerUriHandler(v,C){const o=new D(this.proxy,v,C),c=this.urlService.registerHandler(o);return this.handlers.set(v,{extensionId:C,disposable:c}),this.extensionUrlHandler.registerExtensionHandler(C,o),Promise.resolve(void 0)}$unregisterUriHandler(v){const C=this.handlers.get(v);if(!C)return Promise.resolve(void 0);const{extensionId:o,disposable:c}=C;return this.extensionUrlHandler.unregisterExtensionHandler(o),this.handlers.delete(v),c.dispose(),Promise.resolve(void 0)}async $createAppUri(v){return this.urlService.create(v)}dispose(){this.handlers.forEach(({disposable:v})=>v.dispose()),this.handlers.clear()}};I=Ee([(0,f.extHostNamedCustomer)(t.MainContext.MainThreadUrls),W(1,_.IURLService),W(2,A.IExtensionUrlHandler)],I),e.MainThreadUrls=I}),define(ne[2465],re([1,0,22,6,2,50,5,75,2368,144,1874,16,21,151,60,40,70,11,31,27]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createExtensionHostManager=void 0;const u=!1,a=!0;function n(O,x,F,L,M,N){return F.lazyStart&&L&&M.length===0?O.createInstance(g,x,F,N):O.createInstance(h,x,F,M,N)}e.createExtensionHostManager=n;let h=class Nr extends _.Disposable{constructor(x,F,L,M,N,B,P,V){super();this.extensionHostId=x,this._internalExtensionService=M,this._instantiationService=N,this._environmentService=B,this._telemetryService=P,this._logService=V,this._onDidChangeResponsiveState=this._register(new f.Emitter),this.onDidChangeResponsiveState=this._onDidChangeResponsiveState.event,this._hasStarted=!1,this._cachedActivationEvents=new Map,this._resolvedActivationEvents=new Set,this._rpcProtocol=null,this._customers=[],this._extensionHost=F,this.onDidExit=this._extensionHost.onExit;const z={time:Date.now(),action:"starting",kind:(0,S.extensionHostKindToString)(this.kind)};this._telemetryService.publicLog2("extensionHostStartup",z),this._proxy=this._extensionHost.start().then(U=>{this._hasStarted=!0;const H={time:Date.now(),action:"success",kind:(0,S.extensionHostKindToString)(this.kind)};return this._telemetryService.publicLog2("extensionHostStartup",H),this._createExtensionHostCustomers(U)},U=>{this._logService.error(`Error received from starting extension host (kind: ${(0,S.extensionHostKindToString)(this.kind)})`),this._logService.error(U);const H={time:Date.now(),action:"error",kind:(0,S.extensionHostKindToString)(this.kind)};return U&&U.name&&(H.errorName=U.name),U&&U.message&&(H.errorMessage=U.message),U&&U.stack&&(H.errorStack=U.stack),this._telemetryService.publicLog2("extensionHostStartup",H,!0),null}),this._proxy.then(()=>{L.forEach(U=>this.activateByEvent(U,0)),this._register(T({measure:()=>this.measure()}))})}get kind(){return this._extensionHost.runningLocation.kind}dispose(){this._extensionHost&&this._extensionHost.dispose(),this._rpcProtocol&&this._rpcProtocol.dispose();for(let x=0,F=this._customers.length;x<F;x++){const L=this._customers[x];try{L.dispose()}catch(M){t.onUnexpectedError(M)}}this._proxy=null,super.dispose()}async measure(){const x=await this._proxy;if(!x)return null;const F=await this._measureLatency(x),L=await this._measureDown(x),M=await this._measureUp(x);return{remoteAuthority:this._extensionHost.remoteAuthority,latency:F,down:L,up:M}}async ready(){await this._proxy}async _measureLatency(x){const F=10;let L=0;for(let M=0;M<F;M++){const N=c.StopWatch.create(!0);await x.test_latency(M),N.stop(),L+=N.elapsed()}return L/F}static _convert(x,F){return x*1e3*8/F}async _measureUp(x){const F=10*1024*1024;let L=i.VSBuffer.alloc(F),M=Math.ceil(Math.random()*256);for(let B=0;B<L.byteLength;B++)L.writeUInt8(B,M);const N=c.StopWatch.create(!0);return await x.test_up(L),N.stop(),Nr._convert(F,N.elapsed())}async _measureDown(x){const F=10*1024*1024,L=c.StopWatch.create(!0);return await x.test_down(F),L.stop(),Nr._convert(F,L.elapsed())}_createExtensionHostCustomers(x){let F=null;(u||this._environmentService.logExtensionHostCommunication)&&(F=new E),this._rpcProtocol=new I.RPCProtocol(x,F),this._register(this._rpcProtocol.onDidChangeResponsiveState(V=>this._onDidChangeResponsiveState.fire(V)));let L=null,M=[];const N={remoteAuthority:this._extensionHost.remoteAuthority,extensionHostKind:this.kind,getProxy:V=>this._rpcProtocol.getProxy(V),set:(V,z)=>this._rpcProtocol.set(V,z),assertRegistered:V=>this._rpcProtocol.assertRegistered(V),drain:()=>this._rpcProtocol.drain(),internalExtensionService:this._internalExtensionService,_setExtensionHostProxy:V=>{L=V},_setAllMainProxyIdentifiers:V=>{M=V}},B=D.ExtHostCustomersRegistry.getNamedCustomers();for(let V=0,z=B.length;V<z;V++){const[U,H]=B[V],K=this._instantiationService.createInstance(H,N);this._customers.push(K),this._rpcProtocol.set(U,K)}const P=D.ExtHostCustomersRegistry.getCustomers();for(const V of P){const z=this._instantiationService.createInstance(V,N);this._customers.push(z)}if(!L)throw new Error("Missing IExtensionHostProxy!");return this._rpcProtocol.assertRegistered(M),L}async activate(x,F){const L=await this._proxy;return L?L.activate(x,F):!1}activateByEvent(x,F){return F===1&&!this._hasStarted?Promise.resolve():(this._cachedActivationEvents.has(x)||this._cachedActivationEvents.set(x,this._activateByEvent(x,F)),this._cachedActivationEvents.get(x))}activationEventIsDone(x){return this._resolvedActivationEvents.has(x)}async _activateByEvent(x,F){if(!this._proxy)return;const L=await this._proxy;!L||(await L.activateByEvent(x,F),this._resolvedActivationEvents.add(x))}async getInspectPort(x){if(this._extensionHost){x&&await this._extensionHost.enableInspectPort();let F=this._extensionHost.getInspectPort();if(F)return F}return 0}async resolveAuthority(x,F){const L=await this._proxy;if(!L)return{type:"error",error:{message:"Cannot resolve authority",code:w.RemoteAuthorityResolverErrorCode.Unknown,detail:void 0}};try{return L.resolveAuthority(x,F)}catch(M){return{type:"error",error:{message:M.message,code:w.RemoteAuthorityResolverErrorCode.Unknown,detail:M}}}}async getCanonicalURI(x,F){const L=await this._proxy;if(!L)throw new Error("Cannot resolve canonical URI");return L.getCanonicalURI(x,F)}async start(x){const F=await this._proxy;if(!!F)return this._extensionHost.extensions.keepOnly(x),F.startExtensionHost(x)}async extensionTestsExecute(){const x=await this._proxy;if(!x)throw new Error("Could not obtain Extension Host Proxy");return x.extensionTestsExecute()}async extensionTestsSendExit(x){const F=await this._proxy;!F||(F.extensionTestsExit(x),this._rpcProtocol&&await Promise.race([this._rpcProtocol.drain(),(0,l.timeout)(5e3)]))}representsRunningLocation(x){return this._extensionHost.runningLocation.equals(x)}async deltaExtensions(x,F){const L=await this._proxy;if(!!L)return this._extensionHost.extensions.deltaExtensions(x,F),L.deltaExtensions(x,F)}containsExtension(x){return this._extensionHost.extensions.containsExtension(x)}async setRemoteEnvironment(x){const F=await this._proxy;if(!!F)return F.setRemoteEnvironment(x)}};h=Ee([W(4,k.IInstantiationService),W(5,A.IWorkbenchEnvironmentService),W(6,p.ITelemetryService),W(7,r.ILogService)],h);let g=class extends _.Disposable{constructor(x,F,L,M,N){super();this.extensionHostId=x,this._internalExtensionService=L,this._instantiationService=M,this._logService=N,this._onDidChangeResponsiveState=this._register(new f.Emitter),this.onDidChangeResponsiveState=this._onDidChangeResponsiveState.event,this._extensionHost=F,this.onDidExit=F.onExit,this._startCalled=new l.Barrier,this._actual=null}get kind(){return this._extensionHost.runningLocation.kind}_createActual(x){return this._logService.info(`Creating lazy extension host: ${x}`),this._actual=this._register(this._instantiationService.createInstance(h,this.extensionHostId,this._extensionHost,[],this._internalExtensionService)),this._register(this._actual.onDidChangeResponsiveState(F=>this._onDidChangeResponsiveState.fire(F))),this._actual}async _getOrCreateActualAndStart(x){if(this._actual)return this._actual;const F=this._createActual(x);return await F.start([]),F}async ready(){await this._startCalled.wait(),this._actual&&await this._actual.ready()}representsRunningLocation(x){return this._extensionHost.runningLocation.equals(x)}async deltaExtensions(x,F){await this._startCalled.wait();const L=Boolean(this._actual),M=x.length>0;if(L||M)return(await this._getOrCreateActualAndStart(`contains ${x.length} new extension(s) (installed or enabled): ${x.map(B=>B.identifier.value)}`)).deltaExtensions(x,F)}containsExtension(x){return this._extensionHost.extensions.containsExtension(x)}async activate(x,F){return await this._startCalled.wait(),this._actual?this._actual.activate(x,F):!1}async activateByEvent(x,F){if(F===1)return this._actual?this._actual.activateByEvent(x,F):void 0;if(await this._startCalled.wait(),this._actual)return this._actual.activateByEvent(x,F)}activationEventIsDone(x){return this._startCalled.isOpen()?this._actual?this._actual.activationEventIsDone(x):!0:!1}async getInspectPort(x){return await this._startCalled.wait(),this._actual?this._actual.getInspectPort(x):0}async resolveAuthority(x,F){return await this._startCalled.wait(),this._actual?this._actual.resolveAuthority(x,F):{type:"error",error:{message:"Cannot resolve authority",code:w.RemoteAuthorityResolverErrorCode.Unknown,detail:void 0}}}async getCanonicalURI(x,F){if(await this._startCalled.wait(),this._actual)return this._actual.getCanonicalURI(x,F);throw new Error("Cannot resolve canonical URI")}async start(x){if(x.length>0){const L=this._createActual(`contains ${x.length} extension(s): ${x.map(M=>M.value)}.`).start(x);return this._startCalled.open(),L}this._startCalled.open()}async extensionTestsExecute(){return await this._startCalled.wait(),(await this._getOrCreateActualAndStart("execute tests.")).extensionTestsExecute()}async extensionTestsSendExit(x){return await this._startCalled.wait(),(await this._getOrCreateActualAndStart("execute tests.")).extensionTestsSendExit(x)}async setRemoteEnvironment(x){if(await this._startCalled.wait(),this._actual)return this._actual.setRemoteEnvironment(x)}};g=Ee([W(3,k.IInstantiationService),W(4,r.ILogService)],g);const d=[["#2977B1","#FC802D","#34A13A","#D3282F","#9366BA"],["#8B564C","#E177C0","#7F7F7F","#BBBE3D","#2EBECD"]];function m(O){if(Array.isArray(O))return O;if(O&&typeof O=="object"&&typeof O.toString=="function"){let x=O.toString();if(x!=="[object Object]")return x}return O}function b(O){return Array.isArray(O)?O.map(m):m(O)}class E{constructor(){this._totalIncoming=0,this._totalOutgoing=0}_log(x,F,L,M,N,B,P){P=b(P);const V=d[N],z=a?V[M%V.length]:"#000000";let U=[`%c[${x}]%c[${String(F).padStart(7)}]%c[len: ${String(L).padStart(5)}]%c${String(M).padStart(5)} - ${B}`,"color: darkgreen","color: grey","color: grey",`color: ${z}`];/\($/.test(B)?(U=U.concat(P),U.push(")")):U.push(P),console.log.apply(console,U)}logIncoming(x,F,L,M,N){this._totalIncoming+=x,this._log("Ext \u2192 Win",this._totalIncoming,x,F,L,M,N)}logOutgoing(x,F,L,M,N){this._totalOutgoing+=x,this._log("Win \u2192 Ext",this._totalOutgoing,x,F,L,M,N)}}let y=[];function T(O){return y.push(O),{dispose:()=>{for(let x=0;x<y.length;x++)if(y[x]===O){y.splice(x,1);return}}}}function R(){return y.slice(0)}(0,C.registerAction2)(class $n extends C.Action2{constructor(){super({id:"editor.action.measureExtHostLatency",title:{value:v.localize(0,null),original:"Measure Extension Host Latency"},category:s.CATEGORIES.Developer,f1:!0})}async run(x){const F=x.get(o.IEditorService),L=await Promise.all(R().map(M=>M.measure()));F.openEditor({resource:void 0,contents:L.map($n._print).join(` `),options:{pinned:!0}})}static _print(x){return x?`${x.remoteAuthority?`Authority: ${x.remoteAuthority} `:""}Roundtrip latency: ${x.latency.toFixed(3)}ms Up: ${$n._printSpeed(x.up)} Down: ${$n._printSpeed(x.down)} `:""}static _printSpeed(x){return x<=1024?`${x} bps`:x<1024*1024?`${(x/1024).toFixed(1)} kbps`:`${(x/1024/1024).toFixed(1)} Mbps`}})}),define(ne[2466],re([1,0,1883,81,9,611,76,46,26,24,35,41,18,724]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IntegrityService=void 0;class i{constructor(l){this.storageService=l,this.value=this._read()}_read(){let l=this.storageService.get(i.KEY,0);if(!l)return null;try{return JSON.parse(l)}catch{return null}}get(){return this.value}set(l){this.value=l,this.storageService.store(i.KEY,JSON.stringify(this.value),0,1)}}i.KEY="integrityService";let S=class xr{constructor(l,r,p,u,a,n){this.notificationService=l,this.lifecycleService=p,this.openerService=u,this.productService=a,this.checksumService=n,this._storage=new i(r),this._isPurePromise=this._isPure(),this.isPure().then(h=>{h.isPure||this._prompt()})}_prompt(){const l=this._storage.get();if(l?.dontShowPrompt&&l.commit===this.productService.commit)return;const r=this.productService.checksumFailMoreInfoUrl,p=(0,t.localize)(0,null,this.productService.nameShort);r?this.notificationService.prompt(f.default.Warning,p,[{label:(0,t.localize)(1,null),run:()=>this.openerService.open(_.URI.parse(r))},{label:(0,t.localize)(2,null),isSecondary:!0,run:()=>this._storage.set({dontShowPrompt:!0,commit:this.productService.commit})}],{sticky:!0}):this.notificationService.notify({severity:f.default.Warning,message:p,sticky:!0})}isPure(){return this._isPurePromise}async _isPure(){const l=this.productService.checksums||{};await this.lifecycleService.when(4);const r=await Promise.all(Object.keys(l).map(u=>this._resolve(u,l[u])));let p=!0;for(let u=0,a=r.length;u<a;u++)if(!r[u].isPure){p=!1;break}return{isPure:p,proof:r}}async _resolve(l,r){const p=o.FileAccess.asFileUri(l,Q);try{const u=await this.checksumService.checksum(p);return xr._createChecksumPair(p,u,r)}catch{return xr._createChecksumPair(p,"",r)}}static _createChecksumPair(l,r,p){return{uri:l,actual:r,expected:p,isPure:r===p}}};S=Ee([W(0,I.INotificationService),W(1,w.IStorageService),W(2,k.ILifecycleService),W(3,C.IOpenerService),W(4,D.IProductService),W(5,c.IChecksumService)],S),e.IntegrityService=S,(0,v.registerSingleton)(A.IIntegrityService,S,!0)}),define(ne[2467],re([1,0,6,11,2,76,31,235,24]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractLifecycleService=void 0;let w=class qn extends _.Disposable{constructor(C,o){super();this.logService=C,this.storageService=o,this._onBeforeShutdown=this._register(new t.Emitter),this.onBeforeShutdown=this._onBeforeShutdown.event,this._onWillShutdown=this._register(new t.Emitter),this.onWillShutdown=this._onWillShutdown.event,this._onDidShutdown=this._register(new t.Emitter),this.onDidShutdown=this._onDidShutdown.event,this._onBeforeShutdownError=this._register(new t.Emitter),this.onBeforeShutdownError=this._onBeforeShutdownError.event,this._onShutdownVeto=this._register(new t.Emitter),this.onShutdownVeto=this._onShutdownVeto.event,this._phase=1,this.phaseWhen=new Map,this._startupKind=this.resolveStartupKind(),this.storageService.onWillSaveState(c=>{c.reason===I.WillSaveStateReason.SHUTDOWN&&this.storageService.store(qn.LAST_SHUTDOWN_REASON_KEY,this.shutdownReason,1,1)})}get startupKind(){return this._startupKind}get phase(){return this._phase}resolveStartupKind(){const C=this.storageService.getNumber(qn.LAST_SHUTDOWN_REASON_KEY,1);this.storageService.remove(qn.LAST_SHUTDOWN_REASON_KEY,1);let o;switch(C){case 3:o=3;break;case 4:o=4;break;default:o=1}return this.logService.trace(`[lifecycle] starting up (startup kind: ${o})`),o}set phase(C){if(C<this.phase)throw new Error("Lifecycle cannot go backwards");if(this._phase===C)return;this.logService.trace(`lifecycle: phase changed (value: ${C})`),this._phase=C,(0,D.mark)(`code/LifecyclePhase/${(0,A.LifecyclePhaseToString)(C)}`);const o=this.phaseWhen.get(this._phase);o&&(o.open(),this.phaseWhen.delete(this._phase))}async when(C){if(C<=this._phase)return;let o=this.phaseWhen.get(C);o||(o=new f.Barrier,this.phaseWhen.set(C,o)),await o.wait()}};w.LAST_SHUTDOWN_REASON_KEY="lifecyle.lastShutdownReason",w=Ee([W(0,k.ILogService),W(1,I.IStorageService)],w),e.AbstractLifecycleService=w}),define(ne[2468],re([1,0,1960,76,24,207,31,2467,35,87,11,130,30]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeLifecycleService=void 0;let c=class Fr extends D.AbstractLifecycleService{constructor(S,s,l){super(l,s);this.nativeHostService=S,this.registerListeners()}registerListeners(){const S=this.nativeHostService.windowId;A.ipcRenderer.on("vscode:onBeforeUnload",async(s,l)=>{this.logService.trace(`[lifecycle] onBeforeUnload (reason: ${l.reason})`),await this.handleBeforeShutdown(l.reason)?(this.logService.trace("[lifecycle] onBeforeUnload prevented via veto"),this._onShutdownVeto.fire(),A.ipcRenderer.send(l.cancelChannel,S)):(this.logService.trace("[lifecycle] onBeforeUnload continues without veto"),this.shutdownReason=l.reason,A.ipcRenderer.send(l.okChannel,S))}),A.ipcRenderer.on("vscode:onWillUnload",async(s,l)=>{this.logService.trace(`[lifecycle] onWillUnload (reason: ${l.reason})`),await this.handleWillShutdown(l.reason),this._onDidShutdown.fire(),A.ipcRenderer.send(l.replyChannel,S)})}async handleBeforeShutdown(S){const s=this.logService,l=[],r=new Set;let p,u;this._onBeforeShutdown.fire({reason:S,veto(n,h){l.push(n),n===!0?s.info(`[lifecycle]: Shutdown was prevented (id: ${h})`):n instanceof Promise&&(r.add(h),n.then(g=>{g===!0&&s.info(`[lifecycle]: Shutdown was prevented (id: ${h})`)}).finally(()=>r.delete(h)))},finalVeto(n,h){if(!p)p=n,u=h;else throw new Error(`[lifecycle]: Final veto is already defined (id: ${h})`)}});const a=(0,v.disposableTimeout)(()=>{s.warn(`[lifecycle] onBeforeShutdown is taking a long time, pending operations: ${Array.from(r).join(", ")}`)},Fr.BEFORE_SHUTDOWN_WARNING_DELAY);try{let n=await(0,t.handleVetos)(l,h=>this.handleBeforeShutdownError(h,S));if(n)return n;if(p)try{r.add(u),n=await p(),n&&s.info(`[lifecycle]: Shutdown was prevented by final veto (id: ${u})`)}catch(h){n=!0,this.handleBeforeShutdownError(h,S)}return n}finally{a.dispose()}}handleBeforeShutdownError(S,s){this.logService.error(`[lifecycle]: Error during before-shutdown phase (error: ${(0,C.toErrorMessage)(S)})`),this._onBeforeShutdownError.fire({reason:s,error:S})}async handleWillShutdown(S){const s=[],l=new Set,r=new o.CancellationTokenSource;this._onWillShutdown.fire({reason:S,token:r.token,join(u,a){s.push(u),l.add(a),u.finally(()=>l.delete(a))},force:()=>{r.dispose(!0)}});const p=(0,v.disposableTimeout)(()=>{this.logService.warn(`[lifecycle] onWillShutdown is taking a long time, pending operations: ${Array.from(l).join(", ")}`)},Fr.WILL_SHUTDOWN_WARNING_DELAY);try{await(0,v.raceCancellation)(v.Promises.settled(s),r.token)}catch(u){this.logService.error(`[lifecycle]: Error during will-shutdown phase (error: ${(0,C.toErrorMessage)(u)})`)}finally{p.dispose()}}shutdown(){return this.nativeHostService.closeWindow()}};c.BEFORE_SHUTDOWN_WARNING_DELAY=5e3,c.WILL_SHUTDOWN_WARNING_DELAY=800,c=Ee([W(0,w.INativeHostService),W(1,_.IStorageService),W(2,k.ILogService)],c),e.NativeLifecycleService=c,(0,I.registerSingleton)(f.ILifecycleService,c)}),define(ne[2469],re([1,0,736,103]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,f.registerSharedProcessRemoteService)(t.ILocalizationsService,"localizations",{supportsDelayedInstantiation:!0})}),define(ne[2470],re([1,0,31,466,2]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeLogService=void 0;class A extends t.LogService{constructor(D,I,w,v,C){const o=new _.DisposableStore,c=[];c.push(o.add(w.createLogger(C.logFile,{name:D}))),C.isExtensionDevelopment&&!!C.extensionTestsLocationURI?c.push(w.createConsoleMainLogger()):c.push(o.add(new t.ConsoleLogger(I)));const i=o.add(new t.MultiplexLogService(c)),S=o.add(new f.FollowerLogService(v,i));super(S);this._register(o)}}e.NativeLogService=A}),define(ne[2471],re([1,0,739,103]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,f.registerMainProcessRemoteService)(t.IMenubarService,"menubar",{supportsDelayedInstantiation:!0})}),define(ne[2472],re([1,0,1888,26,410,2,6,35,36,24]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationService=void 0;let v=class extends A.Disposable{constructor(o){super();this.storageService=o,this.model=this._register(new _.NotificationsModel),this._onDidAddNotification=this._register(new k.Emitter),this.onDidAddNotification=this._onDidAddNotification.event,this._onDidRemoveNotification=this._register(new k.Emitter),this.onDidRemoveNotification=this._onDidRemoveNotification.event,this.registerListeners()}registerListeners(){this._register(this.model.onDidChangeNotification(o=>{switch(o.kind){case 0:case 3:{const c={message:o.item.message.original,severity:o.item.severity,source:typeof o.item.sourceId=="string"&&typeof o.item.source=="string"?{id:o.item.sourceId,label:o.item.source}:o.item.source,silent:o.item.silent};o.kind===0&&this._onDidAddNotification.fire(c),o.kind===3&&this._onDidRemoveNotification.fire(c);break}}}))}setFilter(o){this.model.setFilter(o)}info(o){if(Array.isArray(o)){o.forEach(c=>this.info(c));return}this.model.addNotification({severity:f.Severity.Info,message:o})}warn(o){if(Array.isArray(o)){o.forEach(c=>this.warn(c));return}this.model.addNotification({severity:f.Severity.Warning,message:o})}error(o){if(Array.isArray(o)){o.forEach(c=>this.error(c));return}this.model.addNotification({severity:f.Severity.Error,message:o})}notify(o){const c=new A.DisposableStore;let i;if(o.neverShowAgain){const S=o.neverShowAgain.scope===f.NeverShowAgainScope.WORKSPACE?1:0,s=o.neverShowAgain.id;if(this.storageService.getBoolean(s,S))return new f.NoOpNotification;const l=c.add(new I.Action("workbench.notification.neverShowAgain",(0,t.localize)(0,null),void 0,!0,async()=>{i.close(),this.storageService.store(s,!0,S,0)})),r={primary:o.actions?.primary||[],secondary:o.actions?.secondary||[]};o.neverShowAgain.isSecondary?r.secondary=[...r.secondary,l]:r.primary=[l,...r.primary],o.actions=r}return i=this.model.addNotification(o),k.Event.once(i.onDidClose)(()=>c.dispose()),i}prompt(o,c,i,S){const s=new A.DisposableStore;if(S?.neverShowAgain){const n=S.neverShowAgain.scope===f.NeverShowAgainScope.WORKSPACE?1:0,h=S.neverShowAgain.id;if(this.storageService.getBoolean(h,n))return new f.NoOpNotification;const g={label:(0,t.localize)(1,null),run:()=>this.storageService.store(h,!0,n,0),isSecondary:S.neverShowAgain.isSecondary};S.neverShowAgain.isSecondary?i=[...i,g]:i=[g,...i]}let l=!1,r;const p=[],u=[];i.forEach((n,h)=>{const g=new _.ChoiceAction(`workbench.dialog.choice.${h}`,n);n.isSecondary?u.push(g):p.push(g),s.add(g.onDidRun(()=>{l=!0,n.keepOpen||r.close()})),s.add(g)});const a={primary:p,secondary:u};return r=this.notify({severity:o,message:c,actions:a,sticky:S?.sticky,silent:S?.silent}),k.Event.once(r.onDidClose)(()=>{s.dispose(),S&&typeof S.onCancel=="function"&&!l&&S.onCancel()}),r}status(o,c){return this.model.showStatusMessage(o,c)}};v=Ee([W(0,w.IStorageService)],v),e.NotificationService=v,(0,D.registerSingleton)(f.INotificationService,v,!0)}),define(ne[370],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlineConfigKeys=e.OutlineTarget=e.IOutlineService=void 0,e.IOutlineService=(0,t.createDecorator)("IOutlineService");var f;(function(A){A[A.OutlinePane=1]="OutlinePane",A[A.Breadcrumbs=2]="Breadcrumbs",A[A.QuickPick=4]="QuickPick"})(f=e.OutlineTarget||(e.OutlineTarget={}));var _;(function(A){A.icons="outline.icons",A.problemsEnabled="outline.problems.enabled",A.problemsColors="outline.problems.colors",A.problemsBadges="outline.problems.badges"})(_=e.OutlineConfigKeys||(e.OutlineConfigKeys={}))}),define(ne[2473],re([1,0,30,22,6,2,19,34,18,8,481,23,13,370]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BreadcrumbsModel=e.OutlineElement2=e.FileElement=void 0;class i{constructor(r,p){this.uri=r,this.kind=p}}e.FileElement=i;class S{constructor(r,p){this.element=r,this.outline=p}}e.OutlineElement2=S;let s=class{constructor(r,p,u,a,n){this.resource=r,this._workspaceService=a,this._outlineService=n,this._disposables=new A.DisposableStore,this._currentOutline=new A.MutableDisposable,this._outlineDisposables=new A.DisposableStore,this._onDidUpdate=new _.Emitter,this.onDidUpdate=this._onDidUpdate.event,this._cfgFilePath=v.BreadcrumbsConfig.FilePath.bindTo(u),this._cfgSymbolPath=v.BreadcrumbsConfig.SymbolPath.bindTo(u),this._disposables.add(this._cfgFilePath.onDidChange(h=>this._onDidUpdate.fire(this))),this._disposables.add(this._cfgSymbolPath.onDidChange(h=>this._onDidUpdate.fire(this))),this._fileInfo=this._initFilePathInfo(r),p&&(this._bindToEditor(p),this._disposables.add(n.onDidChange(()=>this._bindToEditor(p))),this._disposables.add(p.onDidChangeControl(()=>this._bindToEditor(p)))),this._onDidUpdate.fire(this)}dispose(){this._disposables.dispose(),this._cfgFilePath.dispose(),this._cfgSymbolPath.dispose(),this._currentOutline.dispose(),this._outlineDisposables.dispose(),this._onDidUpdate.dispose()}isRelative(){return Boolean(this._fileInfo.folder)}getElements(){let r=[];if(this._cfgFilePath.getValue()==="on"?r=r.concat(this._fileInfo.path):this._cfgFilePath.getValue()==="last"&&this._fileInfo.path.length>0&&(r=r.concat(this._fileInfo.path.slice(-1))),this._cfgSymbolPath.getValue()==="off"||!this._currentOutline.value)return r;const p=this._currentOutline.value.config.breadcrumbsDataSource.getBreadcrumbElements();for(let u=this._cfgSymbolPath.getValue()==="last"&&p.length>0?p.length-1:0;u<p.length;u++)r.push(new S(p[u],this._currentOutline.value));return p.length===0&&!this._currentOutline.value.isEmpty&&r.push(new S(this._currentOutline.value,this._currentOutline.value)),r}_initFilePathInfo(r){if(r.scheme===I.Schemas.untitled)return{folder:void 0,path:[]};let p={folder:(0,o.withNullAsUndefined)(this._workspaceService.getWorkspaceFolder(r)),path:[]},u=r;for(;u&&u.path!=="/"&&!(p.folder&&(0,k.isEqual)(p.folder.uri,u));){p.path.unshift(new i(u,p.path.length===0?C.FileKind.FILE:C.FileKind.FOLDER));let a=u.path.length;if(u=(0,k.dirname)(u),u.path.length===a)break}return p.folder&&this._workspaceService.getWorkbenchState()===3&&p.path.unshift(new i(p.folder.uri,C.FileKind.ROOT_FOLDER)),p}_bindToEditor(r){const p=new t.CancellationTokenSource;this._currentOutline.clear(),this._outlineDisposables.clear(),this._outlineDisposables.add((0,A.toDisposable)(()=>p.dispose(!0))),this._outlineService.createOutline(r,2,p.token).then(u=>{p.token.isCancellationRequested&&(u?.dispose(),u=void 0),this._currentOutline.value=u,this._onDidUpdate.fire(this),u&&this._outlineDisposables.add(u.onDidChange(()=>this._onDidUpdate.fire(this)))}).catch(u=>{this._onDidUpdate.fire(this),(0,f.onUnexpectedError)(u)})}};s=Ee([W(2,w.IConfigurationService),W(3,D.IWorkspaceContextService),W(4,c.IOutlineService)],s),e.BreadcrumbsModel=s}),define(ne[2474],re([1,0,6,2,370,47,17,2127,106,400,30,11,22,113,5,20,72,8,1461,464,125,19,62]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let h=class{constructor(b,E){this._editor=b,this._textResourceConfigurationService=E,this._breadcrumbs=[]}getBreadcrumbElements(){return this._breadcrumbs}clear(){this._breadcrumbs=[]}update(b,E){const y=this._computeBreadcrumbs(b,E);this._breadcrumbs=y}_computeBreadcrumbs(b,E){let y=b.getItemEnclosingPosition(E);if(!y)return[];let T=[];for(;y;){T.push(y);let O=y.parent;if(O instanceof w.OutlineModel||O instanceof w.OutlineGroup&&O.parent&&O.parent.children.size===1)break;y=O}let R=[];for(let O=T.length-1;O>=0;O--){let x=T[O];if(this._isFiltered(x))break;R.push(x)}return R.length===0?[]:R}_isFiltered(b){if(!(b instanceof w.OutlineElement))return!1;const E=`breadcrumbs.${D.DocumentSymbolFilter.kindToConfigName[b.symbol.kind]}`;let y;return this._editor&&this._editor.getModel()&&(y=this._editor.getModel().uri),!this._textResourceConfigurationService.getValue(y,E)}};h=Ee([W(1,c.ITextResourceConfigurationService)],h);let g=class{constructor(b,E,y,T,R,O,x,F,L,M){this._editor=b,this._languageFeaturesService=T,this._codeEditorService=R,this._outlineModelService=O,this._configurationService=x,this._markerDecorationsService=F,this._disposables=new f.DisposableStore,this._onDidChange=new t.Emitter,this.onDidChange=this._onDidChange.event,this._outlineDisposables=new f.DisposableStore,this.outlineKind="documentSymbols",this._breadcrumbsDataSource=new h(b,L);const N=new D.DocumentSymbolVirtualDelegate,B=[new D.DocumentSymbolGroupRenderer,M.createInstance(D.DocumentSymbolRenderer,!0)],P={getChildren:H=>H instanceof w.OutlineElement||H instanceof w.OutlineGroup?H.children.values():H===this&&this._outlineModel?this._outlineModel.children.values():[]},V=new D.DocumentSymbolComparator,z={collapseByDefault:E===2,expandOnlyOnTwistieClick:!0,multipleSelectionSupport:!1,identityProvider:new D.DocumentSymbolIdentityProvider,keyboardNavigationLabelProvider:new D.DocumentSymbolNavigationLabelProvider,accessibilityProvider:new D.DocumentSymbolAccessibilityProvider((0,r.localize)(0,null)),filter:E===1?M.createInstance(D.DocumentSymbolFilter,"outline"):E===2?M.createInstance(D.DocumentSymbolFilter,"breadcrumbs"):void 0};this.config={breadcrumbsDataSource:this._breadcrumbsDataSource,delegate:N,renderers:B,treeDataSource:P,comparator:V,options:z,quickPickDataSource:{getQuickPickElements:()=>{throw new Error("not implemented")}}},this._disposables.add(T.documentSymbolProvider.onDidChange(H=>this._createOutline())),this._disposables.add(this._editor.onDidChangeModel(H=>this._createOutline())),this._disposables.add(this._editor.onDidChangeModelLanguage(H=>this._createOutline()));const U=new C.TimeoutTimer;this._disposables.add(U),this._disposables.add(this._editor.onDidChangeModelContent(H=>{const K=this._editor.getModel();if(K){const G=O.getDebounceValue(K);U.cancelAndSet(()=>this._createOutline(H),G)}})),this._disposables.add(this._editor.onDidDispose(()=>this._outlineDisposables.clear())),this._createOutline().finally(()=>y.open())}get activeElement(){const b=this._editor.getPosition();if(!(!b||!this._outlineModel))return this._outlineModel.getItemEnclosingPosition(b)}dispose(){this._disposables.dispose(),this._outlineDisposables.dispose()}get isEmpty(){return!this._outlineModel||w.TreeElement.empty(this._outlineModel)}get uri(){return this._outlineModel?.uri}async reveal(b,E,y){const T=w.OutlineModel.get(b);!T||!(b instanceof w.OutlineElement)||await this._codeEditorService.openCodeEditor({resource:T.uri,options:{...E,selection:S.Range.collapseToStart(b.symbol.selectionRange),selectionRevealType:3}},this._editor,y)}preview(b){if(!(b instanceof w.OutlineElement))return f.Disposable.None;const{symbol:E}=b;this._editor.revealRangeInCenterIfOutsideViewport(E.range,0);const y=this._editor.deltaDecorations([],[{range:E.range,options:{description:"document-symbols-outline-range-highlight",className:"rangeHighlight",isWholeLine:!0}}]);return(0,f.toDisposable)(()=>this._editor.deltaDecorations(y,[]))}captureViewState(){const b=this._editor.saveViewState();return(0,f.toDisposable)(()=>{b&&this._editor.restoreViewState(b)})}async _createOutline(b){if(this._outlineDisposables.clear(),b||this._setOutlineModel(void 0),!this._editor.hasModel())return;const E=this._editor.getModel();if(!this._languageFeaturesService.documentSymbolProvider.has(E))return;const y=new v.CancellationTokenSource,T=E.getVersionId(),R=new C.TimeoutTimer;this._outlineDisposables.add(R),this._outlineDisposables.add((0,f.toDisposable)(()=>y.dispose(!0)));try{let O=await this._outlineModelService.getOrCreate(E,y.token);if(y.token.isCancellationRequested)return;if(w.TreeElement.empty(O)||!this._editor.hasModel()){this._setOutlineModel(O);return}if(b&&this._outlineModel&&E.getLineCount()>=25){const x=w.TreeElement.size(O),F=E.getValueLength(),L=x/F,M=w.TreeElement.size(this._outlineModel),N=F-b.changes.reduce((P,V)=>P+V.rangeLength,0),B=M/N;if((L<=B*.5||L>=B*1.5)&&!await(0,C.raceCancellation)((0,C.timeout)(2e3).then(()=>!0),y.token,!1))return}this._applyMarkersToOutline(O),this._outlineDisposables.add(this._markerDecorationsService.onDidChangeMarker(x=>{(0,a.isEqual)(O.uri,x.uri)&&(this._applyMarkersToOutline(O),this._onDidChange.fire({}))})),this._outlineDisposables.add(this._configurationService.onDidChangeConfiguration(x=>{x.affectsConfiguration("outline.problems.enabled")&&(this._configurationService.getValue("outline.problems.enabled")?this._applyMarkersToOutline(O):O.updateMarker([]),this._onDidChange.fire({})),x.affectsConfiguration("outline")&&this._onDidChange.fire({}),x.affectsConfiguration("breadcrumbs")&&this._editor.hasModel()&&(this._breadcrumbsDataSource.update(O,this._editor.getPosition()),this._onDidChange.fire({}))})),this._outlineDisposables.add(this._configurationService.onDidChangeConfiguration(x=>{x.affectsConfiguration("outline.icons")&&this._onDidChange.fire({}),x.affectsConfiguration("outline")&&this._onDidChange.fire({})})),this._outlineDisposables.add(this._editor.onDidChangeCursorPosition(x=>{R.cancelAndSet(()=>{!E.isDisposed()&&T===E.getVersionId()&&this._editor.hasModel()&&(this._breadcrumbsDataSource.update(O,this._editor.getPosition()),this._onDidChange.fire({affectOnlyActiveElement:!0}))},150)})),this._setOutlineModel(O)}catch(O){this._setOutlineModel(void 0),(0,o.onUnexpectedError)(O)}}_applyMarkersToOutline(b){if(!b||!this._configurationService.getValue("outline.problems.enabled"))return;const E=[];for(const[y,T]of this._markerDecorationsService.getLiveMarkers(b.uri))(T.severity===u.MarkerSeverity.Error||T.severity===u.MarkerSeverity.Warning)&&E.push({...y,severity:T.severity});b.updateMarker(E)}_setOutlineModel(b){const E=this._editor.getPosition();!E||!b?(this._outlineModel=void 0,this._breadcrumbsDataSource.clear()):(this._outlineModel?.merge(b)||(this._outlineModel=b),this._breadcrumbsDataSource.update(b,E)),this._onDidChange.fire({})}};g=Ee([W(3,n.ILanguageFeaturesService),W(4,s.ICodeEditorService),W(5,w.IOutlineModelService),W(6,l.IConfigurationService),W(7,p.IMarkerDecorationsService),W(8,c.ITextResourceConfigurationService),W(9,i.IInstantiationService)],g);let d=class{constructor(b,E){this._instantiationService=E;const y=b.registerOutlineCreator(this);this.dispose=()=>y.dispose()}matches(b){const E=b.getControl();return(0,I.isCodeEditor)(E)||(0,I.isDiffEditor)(E)}async createOutline(b,E,y){const T=b.getControl();let R;if((0,I.isCodeEditor)(T)?R=T:(0,I.isDiffEditor)(T)&&(R=T.getModifiedEditor()),!R)return;const O=new C.Barrier,x=this._instantiationService.createInstance(g,R,E,O);return await O.wait(),x}};d=Ee([W(0,_.IOutlineService),W(1,i.IInstantiationService)],d),k.Registry.as(A.Extensions.Workbench).registerWorkbenchContribution(d,4)}),define(ne[616],re([1,0,1464,53,21,17,210,2027,8,2,11,30,16,382,102,22,370,106,59,400,62]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoSymbolQuickAccessProvider=void 0;let a=class Xo extends D.AbstractGotoSymbolQuickAccessProvider{constructor(h,g,d,m,b,E){super(m,E,{openSideBySideDirection:()=>this.configuration.openSideBySideDirection});this.editorService=h,this.editorGroupService=g,this.configurationService=d,this.outlineService=b,this.onDidActiveTextEditorControlChange=this.editorService.onDidActiveEditorChange}get configuration(){const h=this.configurationService.getValue().workbench?.editor;return{openEditorPinned:!h?.enablePreviewFromQuickOpen||!h?.enablePreview,openSideBySideDirection:h?.openSideBySideDirection}}get activeTextEditorControl(){if(!(0,l.isCompositeEditor)(this.editorService.activeEditorPane?.getControl()))return this.editorService.activeTextEditorControl}gotoLocation(h,g){if((g.keyMods.alt||this.configuration.openEditorPinned&&g.keyMods.ctrlCmd||g.forceSideBySide)&&this.editorService.activeEditor){h.restoreViewState?.();const d={selection:g.range,pinned:g.keyMods.ctrlCmd||this.configuration.openEditorPinned,preserveFocus:g.preserveFocus};this.editorGroupService.sideGroup.openEditor(this.editorService.activeEditor,d)}else super.gotoLocation(h,g)}async getSymbolPicks(h,g,d,m,b){return!await Promise.race([this.waitForLanguageSymbolRegistry(h,m),(0,v.timeout)(Xo.SYMBOL_PICKS_TIMEOUT)])||b.isCancellationRequested?[]:this.doGetSymbolPicks(this.getDocumentSymbols(h,b),(0,c.prepareQuery)(g),d,b)}addDecorations(h,g){super.addDecorations(h,g)}clearDecorations(h){super.clearDecorations(h)}provideWithoutTextEditor(h){return this.canPickWithOutlineService()?this.doGetOutlinePicks(h):super.provideWithoutTextEditor(h)}canPickWithOutlineService(){return this.editorService.activeEditorPane?this.outlineService.canCreateOutline(this.editorService.activeEditorPane):!1}doGetOutlinePicks(h){const g=this.editorService.activeEditorPane;if(!g)return w.Disposable.None;const d=new C.CancellationTokenSource,m=new w.DisposableStore;return m.add((0,w.toDisposable)(()=>d.dispose(!0))),h.busy=!0,this.outlineService.createOutline(g,4,d.token).then(b=>{if(!b)return;if(d.token.isCancellationRequested){b.dispose();return}m.add(b);const E=b.captureViewState();m.add((0,w.toDisposable)(()=>{h.selectedItems.length===0&&E.dispose()}));const y=b.config.quickPickDataSource.getQuickPickElements(),T=y.map((x,F)=>({kind:0,index:F,score:0,label:x.label,description:x.description,ariaLabel:x.ariaLabel,iconClasses:x.iconClasses}));m.add(h.onDidAccept(()=>{h.hide();const[x]=h.selectedItems;x&&y[x.index]&&b.reveal(y[x.index].element,{},!1)}));const R=()=>{const x=T.filter(F=>{if(h.value==="@")return F.score=0,F.highlights=void 0,!0;const L=(0,i.fuzzyScore)(h.value,h.value.toLowerCase(),1,F.label,F.label.toLowerCase(),0,!0);return L?(F.score=L[1],F.highlights={label:(0,i.createMatches)(L)},!0):!1});if(x.length===0){const F=(0,t.localize)(0,null);h.items=[{label:F,index:-1,kind:14}],h.ariaLabel=F}else h.items=x};R(),m.add(h.onDidChangeValue(R));const O=new w.MutableDisposable;m.add(O),m.add(h.onDidChangeActive(()=>{const[x]=h.activeItems;x&&y[x.index]?O.value=b.preview(y[x.index].element):O.clear()}))}).catch(b=>{(0,S.onUnexpectedError)(b),h.hide()}).finally(()=>{h.busy=!1}),m}};a.SYMBOL_PICKS_TIMEOUT=8e3,a=Ee([W(0,_.IEditorService),W(1,r.IEditorGroupsService),W(2,I.IConfigurationService),W(3,u.ILanguageFeaturesService),W(4,s.IOutlineService),W(5,p.IOutlineModelService)],a),e.GotoSymbolQuickAccessProvider=a,A.Registry.as(k.Extensions.Quickaccess).registerQuickAccessProvider({ctor:a,prefix:D.AbstractGotoSymbolQuickAccessProvider.PREFIX,contextKey:"inFileSymbolsPicker",placeholder:(0,t.localize)(1,null),helpEntries:[{description:(0,t.localize)(2,null),prefix:D.AbstractGotoSymbolQuickAccessProvider.PREFIX,needsEditor:!0},{description:(0,t.localize)(3,null),prefix:D.AbstractGotoSymbolQuickAccessProvider.PREFIX_BY_CATEGORY,needsEditor:!0}]}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.gotoSymbol",title:{value:(0,t.localize)(4,null),mnemonicTitle:(0,t.localize)(5,null),original:"Go to Symbol in Editor..."},f1:!0,keybinding:{when:void 0,weight:200,primary:2048|1024|45},menu:{id:o.MenuId.MenubarGoMenu,group:"4_symbol_nav",order:1}})}run(h){h.get(f.IQuickInputService).quickAccess.show(a.PREFIX)}})}),define(ne[2475],re([1,0,33,6,2,12,848,64,370,47,17,102,234,21,5,198,1634,125,32,19,11,8,57,378,242,158,200,1100]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookCellOutline=e.OutlineEntry=void 0;class b{constructor(B,P,V,z,U,H){this.index=B,this.level=P,this.cell=V,this.label=z,this.isExecuting=U,this.isPaused=H,this._children=[]}get icon(){return this.isExecuting&&this.isPaused?m.executingStateIcon:this.isExecuting?A.ThemeIcon.modify(m.executingStateIcon,"spin"):this.cell.cellKind===D.CellKind.Markup?t.Codicon.markdown:t.Codicon.code}addChild(B){this._children.push(B),B._parent=this}get parent(){return this._parent}get children(){return this._children}get markerInfo(){return this._markerInfo}updateMarkers(B){if(this.cell.cellKind===D.CellKind.Code){const P=B.read({resource:this.cell.uri,severities:l.MarkerSeverity.Error|l.MarkerSeverity.Warning});if(P.length===0)this._markerInfo=void 0;else{const V=P.find(z=>z.severity===l.MarkerSeverity.Error)?.severity??l.MarkerSeverity.Warning;this._markerInfo={topSev:V,count:P.length}}}else{let P;for(const V of this.children)V.updateMarkers(B),V.markerInfo&&(P=P?Math.max(V.markerInfo.topSev,P):V.markerInfo.topSev);this._markerInfo=P&&{topSev:P,count:0}}}clearMarkers(){this._markerInfo=void 0;for(const B of this.children)B.clearMarkers()}find(B,P){if(B.id===this.cell.id)return this;P.push(this);for(const V of this.children){const z=V.find(B,P);if(z)return z}P.pop()}asFlatList(B){B.push(this);for(const P of this.children)P.asFlatList(B)}}e.OutlineEntry=b;class E{constructor(B,P,V,z){this.container=B,this.iconClass=P,this.iconLabel=V,this.decoration=z}}E.templateId="NotebookOutlineRenderer";let y=class{constructor(B,P){this._themeService=B,this._configurationService=P,this.templateId=E.templateId}renderTemplate(B){B.classList.add("notebook-outline-element","show-file-icons");const P=document.createElement("div");B.append(P);const V=new o.IconLabel(B,{supportHighlights:!0}),z=document.createElement("div");return z.className="element-decoration",B.append(z),new E(B,P,V,z)}renderElement(B,P,V,z){const U={matches:(0,C.createMatches)(B.filterData),labelEscapeNewLines:!0,extraClasses:[]};B.element.cell.cellKind===D.CellKind.Code&&this._themeService.getFileIconTheme().hasFileIcons&&!B.element.isExecuting?(V.iconClass.className="",U.extraClasses?.push(...(0,S.getIconClassesForLanguageId)(B.element.cell.language??""))):V.iconClass.className="element-icon "+A.ThemeIcon.asClassNameArray(B.element.icon).join(" "),V.iconLabel.setLabel(B.element.label,void 0,U);const{markerInfo:H}=B.element;if(V.container.style.removeProperty("--outline-element-color"),V.decoration.innerText="",H){this._configurationService.getValue("outline.problems.badges")?H.count===0?(V.decoration.classList.add("bubble"),V.decoration.innerText="\uEA71"):(V.decoration.classList.remove("bubble"),V.decoration.innerText=H.count>9?"9+":String(H.count)):(V.decoration.classList.remove("bubble"),V.decoration.innerText="");const G=this._themeService.getColorTheme().getColor(H.topSev===l.MarkerSeverity.Error?r.listErrorForeground:r.listWarningForeground);this._configurationService.getValue("outline.problems.colors")?V.container.style.setProperty("--outline-element-color",G?.toString()??"inherit"):(V.container.style.removeProperty("--outline-element-color"),V.decoration.style.setProperty("--outline-element-color",G?.toString()??"inherit"))}}disposeTemplate(B){B.iconLabel.dispose()}};y=Ee([W(0,A.IThemeService),W(1,a.IConfigurationService)],y);class T{getAriaLabel(B){return B.label}getWidgetAriaLabel(){return""}}class R{getKeyboardNavigationLabel(B){return B.label}}class O{getHeight(B){return 22}getTemplateId(B){return E.templateId}}let x=class{constructor(B,P){this._getEntries=B,this._themeService=P}getQuickPickElements(){const B=[];for(const z of this._getEntries())z.asFlatList(B);const P=[],{hasFileIcons:V}=this._themeService.getFileIconTheme();for(const z of B)P.push({element:z,label:V?z.label:`$(${z.icon.id}) ${z.label}`,ariaLabel:z.label,iconClasses:V?(0,S.getIconClassesForLanguageId)(z.cell.language??""):void 0});return P}};x=Ee([W(1,A.IThemeService)],x);class F{constructor(){this._collator=new u.IdleValue(()=>new Intl.Collator(void 0,{numeric:!0}))}compareByPosition(B,P){return B.index-P.index}compareByType(B,P){return B.cell.cellKind-P.cell.cellKind||this._collator.value.compare(B.label,P.label)}compareByName(B,P){return this._collator.value.compare(B.label,P.label)}}let L=class Qo extends _.Disposable{constructor(B,P,V,z,U,H,K,G){super();this._editor=B,this._target=P,this._editorService=U,this._markerService=H,this._configurationService=K,this._notebookExecutionStateService=G,this._onDidChange=this._register(new f.Emitter),this.onDidChange=this._onDidChange.event,this._entries=[],this._entriesDisposables=this._register(new _.DisposableStore),this.outlineKind="notebookCells";const q=this._register(new _.MutableDisposable),Z=()=>{const ee=B.getControl();ee?.hasModel()?q.value=(0,_.combinedDisposable)(ee.onDidChangeSelection(()=>this._recomputeActive()),ee.onDidChangeViewCells(()=>this._recomputeState())):q.clear()};this._register(B.onDidChangeModel(()=>{this._recomputeState(),Z()})),this._register(K.onDidChangeConfiguration(ee=>{ee.affectsConfiguration("notebook.outline.showCodeCells")&&this._recomputeState()})),this._register(z.onDidFileIconThemeChange(()=>{this._onDidChange.fire({})})),this._register(G.onDidChangeCellExecution(ee=>{!!this._editor.textModel&&ee.affectsNotebook(this._editor.textModel?.uri)&&this._recomputeState()})),this._recomputeState(),Z();const j={collapseByDefault:P===2,expandOnlyOnTwistieClick:!0,multipleSelectionSupport:!1,accessibilityProvider:new T,identityProvider:{getId:ee=>ee.cell.id},keyboardNavigationLabelProvider:new R},X={getChildren:ee=>ee instanceof Qo?this._entries:ee.children},Y=new O,$=[V.createInstance(y)],J=new F;this.config={breadcrumbsDataSource:{getBreadcrumbElements:()=>{const ee=[];let te=this._activeEntry;for(;te;)ee.unshift(te),te=te.parent;return ee}},quickPickDataSource:V.createInstance(x,()=>this._entries),treeDataSource:X,delegate:Y,renderers:$,comparator:J,options:j}}get activeElement(){return this._activeEntry}_recomputeState(){this._entriesDisposables.clear(),this._activeEntry=void 0,this._entries.length=0,this._uri=void 0;const B=this._editor.getControl();if(!B||!B.hasModel())return;this._uri=B.textModel.uri;const P=B;if(P.getLength()===0)return;let V=!0;this._target===1?V=this._configurationService.getValue("notebook.outline.showCodeCells"):this._target===2&&(V=this._configurationService.getValue("notebook.breadcrumbs.showCodeCells"));const z=P.getFocus().start,U=P.cellAt(z)?.handle,H=[];for(let q=0;q<P.getLength();q++){const Z=P.cellAt(q),j=Z.cellKind===D.CellKind.Markup;if(!j&&!V)continue;let X=Z.getText().substring(0,1e4),Y=!1;if(j){for(const $ of h.marked.lexer(X,{gfm:!0}))$.type==="heading"&&(Y=!0,H.push(new b(H.length,$.depth,Z,(0,g.renderMarkdownAsPlaintext)({value:$.text}).trim(),!1,!1)));Y||(X=(0,g.renderMarkdownAsPlaintext)({value:X}))}if(!Y){let $=X.trim();$.length===0&&($=(0,s.localize)(0,null));const J=!j&&this._notebookExecutionStateService.getCellExecution(Z.uri);H.push(new b(H.length,7,Z,$,!!J,J?J.isPaused:!1))}Z.handle===U&&(this._activeEntry=H[H.length-1]),this._entriesDisposables.add(Z.model.onDidChangeContent(()=>{this._recomputeState(),this._onDidChange.fire({})}))}if(H.length>0){const q=[H[0]],Z=[H[0]];for(let j=1;j<H.length;j++){const X=H[j];for(;;){const Y=Z.length;if(Y===0){q.push(X),Z.push(X);break}else{const $=Z[Y-1];if($.level<X.level){$.addChild(X),Z.push(X);break}else Z.pop()}}}this._entries=q}const K=new _.MutableDisposable;this._entriesDisposables.add(K);const G=()=>{const q=Z=>{for(const j of this._entries)Z?j.clearMarkers():j.updateMarkers(this._markerService)};this._configurationService.getValue("outline.problems.enabled")?(K.value=this._markerService.onMarkerChanged(Z=>{Z.some(j=>P.getCellsInRange().some(X=>(0,p.isEqual)(X.uri,j)))&&(q(!1),this._onDidChange.fire({}))}),q(!1)):(K.clear(),q(!0))};G(),this._entriesDisposables.add(this._configurationService.onDidChangeConfiguration(q=>{q.affectsConfiguration("outline.problems.enabled")&&(G(),this._onDidChange.fire({}))})),this._onDidChange.fire({})}_recomputeActive(){let B;const P=this._editor.getControl();if(P&&P.hasModel()&&P.getLength()>0){const V=P.cellAt(P.getFocus().start);if(V){for(const z of this._entries)if(B=z.find(V,[]),B)break}}B!==this._activeEntry&&(this._activeEntry=B,this._onDidChange.fire({affectOnlyActiveElement:!0}))}get isEmpty(){return this._entries.length===0}get uri(){return this._uri}async reveal(B,P,V){await this._editorService.openEditor({resource:B.cell.uri,options:{...P,override:this._editor.input?.editorId}},V?c.SIDE_GROUP:void 0)}preview(B){const P=this._editor.getControl();if(!P)return _.Disposable.None;P.revealInCenterIfOutsideViewport(B.cell);const V=P.deltaCellDecorations([],[{handle:B.cell.handle,options:{className:"nb-symbolHighlight",outputClassName:"nb-symbolHighlight"}}]);return(0,_.toDisposable)(()=>{P.deltaCellDecorations(V,[])})}captureViewState(){const B=this._editor.getControl(),P=B?.getEditorViewState();return(0,_.toDisposable)(()=>{P&&B?.restoreListViewState(P)})}};L=Ee([W(2,i.IInstantiationService),W(3,A.IThemeService),W(4,c.IEditorService),W(5,l.IMarkerService),W(6,a.IConfigurationService),W(7,d.INotebookExecutionStateService)],L),e.NotebookCellOutline=L;let M=class{constructor(B,P){this._instantiationService=P;const V=B.registerOutlineCreator(this);this.dispose=()=>V.dispose()}matches(B){return B.getId()===k.NotebookEditor.ID}async createOutline(B,P){return this._instantiationService.createInstance(L,B,P)}};M=Ee([W(0,I.IOutlineService),W(1,i.IInstantiationService)],M),v.Registry.as(w.Extensions.Workbench).registerWorkbenchContribution(M,4),v.Registry.as(n.Extensions.Configuration).registerConfiguration({id:"notebook",order:100,type:"object",properties:{"notebook.outline.showCodeCells":{type:"boolean",default:!1,markdownDescription:(0,s.localize)(1,null)},"notebook.breadcrumbs.showCodeCells":{type:"boolean",default:!0,markdownDescription:(0,s.localize)(2,null)}}})}),define(ne[2476],re([1,0,2,194,35,370,6]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class D{constructor(){this._factories=new f.LinkedList,this._onDidChange=new k.Emitter,this.onDidChange=this._onDidChange.event}canCreateOutline(w){for(let v of this._factories)if(v.matches(w))return!0;return!1}async createOutline(w,v,C){for(let o of this._factories)if(o.matches(w))return await o.createOutline(w,v,C)}registerOutlineCreator(w){const v=this._factories.push(w);return this._onDidChange.fire(),(0,t.toDisposable)(()=>{v(),this._onDidChange.fire()})}}(0,_.registerSingleton)(A.IOutlineService,D,!0)}),define(ne[255],re([1,0,6,17]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=void 0,e.Extensions={OutputChannels:"workbench.contributions.outputChannels"};class _{constructor(){this.channels=new Map,this._onDidRegisterChannel=new t.Emitter,this.onDidRegisterChannel=this._onDidRegisterChannel.event,this._onDidRemoveChannel=new t.Emitter,this.onDidRemoveChannel=this._onDidRemoveChannel.event}registerChannel(k){this.channels.has(k.id)||(this.channels.set(k.id,k),this._onDidRegisterChannel.fire(k.id))}getChannels(){const k=[];return this.channels.forEach(D=>k.push(D)),k}getChannel(k){return this.channels.get(k)}removeChannel(k){this.channels.delete(k),this._onDidRemoveChannel.fire(k)}}f.Registry.add(e.Extensions.OutputChannels,new _)}),define(ne[2477],re([1,0,17,201,255,65,75,9,2,6,43,13]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";var o;Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadOutputService=void 0;let c=o=class extends I.Disposable{constructor(S,s,l){super();this._outputService=s,this._viewsService=l,this._proxy=S.getProxy(A.ExtHostContext.ExtHostOutputService);const r=()=>{const p=this._viewsService.isViewVisible(f.OUTPUT_VIEW_ID)?this._outputService.getActiveChannel():void 0;this._proxy.$setVisibleChannel(p?p.id:null)};this._register(w.Event.any(this._outputService.onActiveOutputChannel,w.Event.filter(this._viewsService.onDidChangeViewVisibility,({id:p})=>p===f.OUTPUT_VIEW_ID))(()=>r())),r()}async $register(S,s,l,r,p){const u=(o._extensionIdPool.get(p)||0)+1;o._extensionIdPool.set(p,u);const a=`extension-output-${p}-#${u}`;return t.Registry.as(_.Extensions.OutputChannels).registerChannel({id:a,label:S,file:D.URI.revive(l),log:s,languageId:r}),this._register((0,I.toDisposable)(()=>this.$dispose(a))),a}async $update(S,s,l){const r=this._getChannel(S);r&&(s===f.OutputChannelUpdateMode.Append?r.update(s):(0,C.isNumber)(l)&&r.update(s,l))}async $reveal(S,s){const l=this._getChannel(S);l&&this._outputService.showChannel(l.id,s)}async $close(S){if(this._viewsService.isViewVisible(f.OUTPUT_VIEW_ID)){const s=this._outputService.getActiveChannel();s&&S===s.id&&this._viewsService.closeView(f.OUTPUT_VIEW_ID)}}async $dispose(S){const s=this._getChannel(S);s&&s.dispose()}_getChannel(S){return this._outputService.getChannel(S)}};c._extensionIdPool=new Map,c=o=Ee([(0,k.extHostNamedCustomer)(A.MainContext.MainThreadOutputService),W(1,f.IOutputService),W(2,v.IViewsService)],c),e.MainThreadOutputService=c}),define(ne[2478],re([1,0,1613,48,17,70,16,2290,413,47,50,23,9,255,2,31,14,5,2427,201,199,46,11,22]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),_.Registry.as(A.Extensions.WorkbenchActions).registerWorkbenchAction(k.SyncActionDescriptor.from(D.SetLogLevelAction),"Developer: Set Log Level...",A.CATEGORIES.Developer.value);let d=class extends i.Disposable{constructor(b,E,y,T,R){super();this.environmentService=b,this.productService=E,this.logService=y,this.fileService=T,this.instantiationService=R,this.registerCommonContributions(),s.isWeb?this.registerWebContributions():this.registerNativeContributions()}registerCommonContributions(){this.registerLogChannel(I.userDataSyncLogChannelId,t.localize(0,null),this.environmentService.userDataSyncLogResource),this.registerLogChannel(I.rendererLogChannelId,t.localize(1,null),this.environmentService.logFile);const b=()=>(0,u.supportsTelemetry)(this.productService,this.environmentService)&&this.logService.getLevel()===S.LogLevel.Trace?(this.registerLogChannel(I.telemetryLogChannelId,t.localize(2,null),this.environmentService.telemetryLogResource),!0):!1;if(!b()){const E=this.logService.onDidChangeLogLevel(()=>{b()&&E.dispose()})}(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:I.showWindowLogActionId,title:{value:t.localize(3,null),original:"Show Window Log"},category:A.CATEGORIES.Developer,f1:!0})}async run(y){y.get(p.IOutputService).showChannel(I.rendererLogChannelId)}})}registerWebContributions(){this.instantiationService.createInstance(r.LogsDataCleaner),_.Registry.as(A.Extensions.WorkbenchActions).registerWorkbenchAction(k.SyncActionDescriptor.from(D.OpenWindowSessionLogFileAction),"Developer: Open Window Log File (Session)...",A.CATEGORIES.Developer.value)}registerNativeContributions(){this.registerLogChannel(I.mainLogChannelId,t.localize(4,null),o.URI.file((0,f.join)(this.environmentService.logsPath,"main.log"))),this.registerLogChannel(I.sharedLogChannelId,t.localize(5,null),o.URI.file((0,f.join)(this.environmentService.logsPath,"sharedprocess.log")))}async registerLogChannel(b,E,y){await(0,C.whenProviderRegistered)(y,this.fileService);const T=_.Registry.as(c.Extensions.OutputChannels);try{const R=(0,n.createCancelablePromise)(O=>this.whenFileExists(y,1,O));this._register((0,i.toDisposable)(()=>R.cancel())),await R,T.registerChannel({id:b,label:E,file:y,log:!0})}catch(R){(0,h.isCancellationError)(R)||this.logService.error("Error while registering log channel",y.toString(),(0,h.getErrorMessage)(R))}}async whenFileExists(b,E,y){if(!await this.fileService.exists(b)){if(y.isCancellationRequested)throw(0,h.canceled)();if(E>10)throw new Error("Timed out while waiting for file to be created");this.logService.debug("[Registering Log Channel] File does not exist. Waiting for 1s to retry.",b.toString()),await(0,n.timeout)(1e3,y),await this.whenFileExists(b,E+1,y)}}};d=Ee([W(0,v.IWorkbenchEnvironmentService),W(1,a.IProductService),W(2,S.ILogService),W(3,C.IFileService),W(4,l.IInstantiationService)],d),_.Registry.as(w.Extensions.Workbench).registerWorkbenchContribution(d,3)}),define(ne[2479],re([1,0,6,9,2,5,24,17,201,255,2194,61,31,76,43,853,42]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LogContentProvider=e.OutputService=void 0;const l="output.activechannel";let r=class extends _.Disposable{constructor(n,h,g){super();this.outputChannelDescriptor=n,this.scrollLock=!1,this.id=n.id,this.label=n.label,this.uri=f.URI.from({scheme:I.OUTPUT_SCHEME,path:this.id}),this.model=this._register(h.createOutputChannelModel(this.id,this.uri,n.languageId?g.createById(n.languageId):g.createByMimeType(n.log?I.LOG_MIME:I.OUTPUT_MIME),n.file))}append(n){this.model.append(n)}update(n,h){this.model.update(n,h)}clear(){this.model.clear()}replace(n){this.model.replace(n)}};r=Ee([W(1,S.IOutputChannelModelService),W(2,s.ILanguageService)],r);let p=class extends _.Disposable{constructor(n,h,g,d,m,b){super();this.storageService=n,this.instantiationService=h,this.logService=d,this.lifecycleService=m,this.viewsService=b,this.channels=new Map,this._onActiveOutputChannel=this._register(new t.Emitter),this.onActiveOutputChannel=this._onActiveOutputChannel.event,this.activeChannelIdInStorage=this.storageService.get(l,1,""),g.registerTextModelContentProvider(I.OUTPUT_SCHEME,this),h.createInstance(v.OutputLinkProvider);const E=D.Registry.as(w.Extensions.OutputChannels);for(const y of E.getChannels())this.onDidRegisterChannel(y.id);if(this._register(E.onDidRegisterChannel(this.onDidRegisterChannel,this)),!this.activeChannel){const y=this.getChannelDescriptors();this.setActiveChannel(y&&y.length>0?this.getChannel(y[0].id):void 0)}this._register(this.lifecycleService.onDidShutdown(()=>this.dispose()))}provideTextContent(n){const h=this.getChannel(n.path);return h?h.model.loadModel():null}async showChannel(n,h){const g=this.getChannel(n);this.activeChannel?.id!==g?.id&&(this.setActiveChannel(g),this._onActiveOutputChannel.fire(n));const d=await this.viewsService.openView(I.OUTPUT_VIEW_ID,!h);d&&g&&d.showChannel(g,!!h)}getChannel(n){return this.channels.get(n)}getChannelDescriptor(n){return D.Registry.as(w.Extensions.OutputChannels).getChannel(n)}getChannelDescriptors(){return D.Registry.as(w.Extensions.OutputChannels).getChannels()}getActiveChannel(){return this.activeChannel}async onDidRegisterChannel(n){const h=this.createChannel(n);if(this.channels.set(n,h),!this.activeChannel||this.activeChannelIdInStorage===n){this.setActiveChannel(h),this._onActiveOutputChannel.fire(n);const g=this.viewsService.getActiveViewWithId(I.OUTPUT_VIEW_ID);g&&g.showChannel(h,!0)}}createChannel(n){const h=[],g=this.instantiateChannel(n);return g.model.onDispose(()=>{if(this.activeChannel===g){const d=this.getChannelDescriptors(),m=d.length?this.getChannel(d[0].id):void 0;m&&this.viewsService.isViewVisible(I.OUTPUT_VIEW_ID)?this.showChannel(m.id):this.setActiveChannel(void 0)}D.Registry.as(w.Extensions.OutputChannels).removeChannel(n),(0,_.dispose)(h)},h),g}instantiateChannel(n){const h=D.Registry.as(w.Extensions.OutputChannels).getChannel(n);if(!h)throw this.logService.error(`Channel '${n}' is not registered yet`),new Error(`Channel '${n}' is not registered yet`);return this.instantiationService.createInstance(r,h)}setActiveChannel(n){this.activeChannel=n,this.activeChannel?this.storageService.store(l,this.activeChannel.id,1,0):this.storageService.remove(l,1)}};p=Ee([W(0,k.IStorageService),W(1,A.IInstantiationService),W(2,C.ITextModelService),W(3,o.ILogService),W(4,c.ILifecycleService),W(5,i.IViewsService)],p),e.OutputService=p;let u=class{constructor(n,h,g){this.outputService=n,this.outputChannelModelService=h,this.languageService=g,this.channelModels=new Map}provideTextContent(n){if(n.scheme===I.LOG_SCHEME){let h=this.getChannelModel(n);if(h)return h.loadModel()}return null}getChannelModel(n){const h=n.path;let g=this.channelModels.get(h);if(!g){const d=[],m=this.outputService.getChannelDescriptors().filter(({id:b})=>b===h)[0];m&&m.file&&(g=this.outputChannelModelService.createOutputChannelModel(h,n,m.languageId?this.languageService.createById(m.languageId):this.languageService.createByMimeType(m.log?I.LOG_MIME:I.OUTPUT_MIME),m.file),g.onDispose(()=>(0,_.dispose)(d),d),this.channelModels.set(h,g))}return g}};u=Ee([W(0,I.IOutputService),W(1,S.IOutputChannelModelService),W(2,s.ILanguageService)],u),e.LogContentProvider=u}),define(ne[2480],re([1,0,6,2,60,609,27,34,45,31,14,10,40,46,233,19,17,255,1872,89,22,11,185,18,24,776,500]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebWorkerExtensionHost=void 0;let b=class extends f.Disposable{constructor(y,T,R,O,x,F,L,M,N,B,P){super();this.runningLocation=y,this._initDataProvider=R,this._telemetryService=O,this._contextService=x,this._labelService=F,this._logService=L,this._environmentService=M,this._productService=N,this._layoutService=B,this._storageService=P,this.remoteAuthority=null,this.extensions=new m.ExtensionDescriptionRegistry([]),this._onDidExit=this._register(new t.Emitter),this.onExit=this._onDidExit.event,this.lazyStart=T,this._isTerminating=!1,this._protocolPromise=null,this._protocol=null,this._extensionHostLogsLocation=(0,S.joinPath)(this._environmentService.extHostLogsPath,"webWorker"),this._extensionHostLogFile=(0,S.joinPath)(this._extensionHostLogsLocation,`${o.ExtensionHostLogFileName}.log`)}async _getWebWorkerExtensionHostIframeSrc(){const y=this._environmentService.debugExtensionHost&&this._environmentService.debugRenderer?"?debugged=1":"?",T="vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html";if(v.isWeb){const O=this._productService.webEndpointUrlTemplate,x=this._productService.commit,F=this._productService.quality;if(O&&x&&F){const L="webWorkerExtensionHostIframeStableOriginUUID";let M=this._storageService.get(L,1);typeof M=="undefined"&&(M=(0,p.generateUuid)(),this._storageService.store(L,M,1,1));const N=await(0,d.parentOriginHash)(window.origin,M),B=O.replace("{{uuid}}",`v--${N}`).replace("{{commit}}",x).replace("{{quality}}",F),P=new URL(`${B}/out/${T}${y}`);return P.searchParams.set("parentOrigin",window.origin),P.searchParams.set("salt",M),P.toString()}console.warn("The web worker extension host is started in a same-origin iframe!")}return`${h.FileAccess.asBrowserUri(T,Q).toString(!0)}${y}`}async start(){return this._protocolPromise||(this._protocolPromise=this._startInsideIframe(),this._protocolPromise.then(y=>this._protocol=y)),this._protocolPromise}async _startInsideIframe(){const y=await this._getWebWorkerExtensionHostIframeSrc(),T=this._register(new t.Emitter),R=document.createElement("iframe");R.setAttribute("class","web-worker-ext-host-iframe"),R.setAttribute("sandbox","allow-scripts allow-same-origin"),R.style.display="none";const O=(0,p.generateUuid)();R.setAttribute("src",`${y}&vscodeWebWorkerExtHostId=${O}`);const x=new a.Barrier;let F,L=null,M=!1,N=null;const B=(U,H)=>{L=H,M=!0,(0,u.onUnexpectedError)(L),clearTimeout(N),this._onDidExit.fire([81,L.message]),x.open()},P=U=>{F=U,clearTimeout(N),x.open()};if(N=setTimeout(()=>{console.warn("The Web Worker Extension Host did not start in 60s, that might be a problem.")},6e4),this._register(C.addDisposableListener(window,"message",U=>{if(U.source!==R.contentWindow||U.data.vscodeWebWorkerExtHostId!==O)return;if(U.data.error){const{name:K,message:G,stack:q}=U.data.error,Z=new Error;return Z.message=G,Z.name=K,Z.stack=q,B(81,Z)}const{data:H}=U.data;if(x.isOpen()||!(H instanceof MessagePort)){console.warn("UNEXPECTED message",U);const K=new Error("UNEXPECTED message");return B(81,K)}P(H)})),this._layoutService.container.appendChild(R),this._register((0,f.toDisposable)(()=>R.remove())),await x.wait(),M)throw L;const V=this._environmentService.options?.messagePorts??new Map;R.contentWindow.postMessage({type:"vscode.init",data:V},"*",[...V.values()]),F.onmessage=U=>{const{data:H}=U;if(!(H instanceof ArrayBuffer)){console.warn("UNKNOWN data received",H),this._onDidExit.fire([77,"UNKNOWN data received"]);return}T.fire(_.VSBuffer.wrap(new Uint8Array(H,0,H.byteLength)))};const z={onMessage:T.event,send:U=>{const H=U.buffer.buffer.slice(U.buffer.byteOffset,U.buffer.byteOffset+U.buffer.byteLength);F.postMessage(H,[H])}};return this._performHandshake(z)}async _performHandshake(y){if(await t.Event.toPromise(t.Event.filter(y.onMessage,T=>(0,A.isMessageOfType)(T,1))),this._isTerminating||(y.send(_.VSBuffer.fromString(JSON.stringify(await this._createExtHostInitData()))),this._isTerminating)||(await t.Event.toPromise(t.Event.filter(y.onMessage,T=>(0,A.isMessageOfType)(T,0))),this._isTerminating))throw(0,u.canceled)();return s.Registry.as(l.Extensions.OutputChannels).registerChannel({id:"webWorkerExtHostLog",label:(0,r.localize)(0,null),file:this._extensionHostLogFile,log:!0}),y}dispose(){this._isTerminating||(this._isTerminating=!0,this._protocol&&this._protocol.send((0,A.createMessageOfType)(2)),super.dispose())}getInspectPort(){}enableInspectPort(){return Promise.resolve(!1)}async _createExtHostInitData(){const[y,T]=await Promise.all([this._telemetryService.getTelemetryInfo(),this._initDataProvider.getInitData()]),R=this._contextService.getWorkspace();return this.extensions.deltaExtensions(T.extensions,[]),{commit:this._productService.commit,version:this._productService.version,parentPid:-1,environment:{isExtensionDevelopmentDebug:this._environmentService.debugRenderer,appName:this._productService.nameLong,appHost:this._productService.embedderIdentifier??(v.isWeb?"web":"desktop"),appUriScheme:this._productService.urlProtocol,appLanguage:v.language,extensionDevelopmentLocationURI:this._environmentService.extensionDevelopmentLocationURI,extensionTestsLocationURI:this._environmentService.extensionTestsLocationURI,globalStorageHome:this._environmentService.globalStorageHome,workspaceStorageHome:this._environmentService.workspaceStorageHome},workspace:this._contextService.getWorkbenchState()===1?void 0:{configuration:R.configuration||void 0,id:R.id,name:this._labelService.getWorkspaceLabel(R),transient:R.transient},resolvedExtensions:[],hostExtensions:[],extensions:this.extensions.getAllExtensionDescriptions(),telemetryInfo:y,logLevel:this._logService.getLevel(),logsLocation:this._extensionHostLogsLocation,logFile:this._extensionHostLogFile,autoStart:T.autoStart,remote:{authority:this._environmentService.remoteAuthority,connectionData:null,isRemote:!1},uiKind:v.isWeb?A.UIKind.Web:A.UIKind.Desktop}}};b=Ee([W(3,k.ITelemetryService),W(4,D.IWorkspaceContextService),W(5,I.ILabelService),W(6,w.ILogService),W(7,i.IBrowserWorkbenchEnvironmentService),W(8,c.IProductService),W(9,n.ILayoutService),W(10,g.IStorageService)],b),e.WebWorkerExtensionHost=b}),define(ne[2481],re([1,0,60,6,2,18,14,19,1878,397,107,45,31,46,17,554,144,469,27,34,50,500,501,609,40,76,255]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteExtensionHost=void 0;let b=class extends _.Disposable{constructor(y,T,R,O,x,F,L,M,N,B,P,V,z){super();this.runningLocation=y,this._initDataProvider=T,this._socketFactory=R,this._contextService=O,this._environmentService=x,this._telemetryService=F,this._lifecycleService=L,this._logService=M,this._labelService=N,this.remoteAuthorityResolverService=B,this._extensionHostDebugService=P,this._productService=V,this._signService=z,this.lazyStart=!1,this.extensions=new a.ExtensionDescriptionRegistry([]),this._onExit=this._register(new f.Emitter),this.onExit=this._onExit.event,this.remoteAuthority=this._initDataProvider.remoteAuthority,this._protocol=null,this._hasLostConnection=!1,this._terminating=!1,this._register(this._lifecycleService.onDidShutdown(()=>this.dispose()));const U=(0,n.parseExtensionDevOptions)(this._environmentService);this._isExtensionDevHost=U.isExtensionDevHost}start(){const y={commit:this._productService.commit,socketFactory:this._socketFactory,addressProvider:{getAddress:async()=>{const{authority:T}=await this.remoteAuthorityResolverService.resolveAuthority(this._initDataProvider.remoteAuthority);return{host:T.host,port:T.port,connectionToken:T.connectionToken}}},signService:this._signService,logService:this._logService,ipcLogger:null};return this.remoteAuthorityResolverService.resolveAuthority(this._initDataProvider.remoteAuthority).then(T=>{const R={language:k.language,debugId:this._environmentService.debugExtensionHost.debugId,break:this._environmentService.debugExtensionHost.break,port:this._environmentService.debugExtensionHost.port,env:{...this._environmentService.debugExtensionHost.env,...T.options?.extensionHostEnv}},O=this._environmentService.extensionDevelopmentLocationURI;let x=!0;return O&&O.length>0&&O[0].scheme===A.Schemas.file&&(x=!1),x||(R.break=!1),(0,S.connectRemoteAgentExtensionHost)(y,R).then(F=>{this._register(F);let{protocol:L,debugPort:M,reconnectionToken:N}=F;const B=typeof M=="number";return x&&this._environmentService.isExtensionDevelopment&&this._environmentService.debugExtensionHost.debugId&&M&&this._extensionHostDebugService.attachSession(this._environmentService.debugExtensionHost.debugId,M,this._initDataProvider.remoteAuthority),L.onDidDispose(()=>{this._onExtHostConnectionLost(N)}),L.onSocketClose(()=>{this._isExtensionDevHost&&this._onExtHostConnectionLost(N)}),new Promise((P,V)=>{let z=setTimeout(()=>{V("The remote extenion host took longer than 60s to send its ready message.")},60*1e3),U;const H=L.onMessage(K=>{if((0,h.isMessageOfType)(K,1)){this._createExtHostInitData(B).then(G=>{U=G.logFile,L.send(t.VSBuffer.fromString(JSON.stringify(G)))});return}if((0,h.isMessageOfType)(K,0)){clearTimeout(z),H.dispose(),i.Registry.as(m.Extensions.OutputChannels).registerChannel({id:"remoteExtHostLog",label:(0,I.localize)(0,null),file:U,log:!0}),this._protocol=L,P(L);return}console.error("received unexpected message during handshake phase from the extension host: ",K)})})})})}_onExtHostConnectionLost(y){this._hasLostConnection||(this._hasLostConnection=!0,this._isExtensionDevHost&&this._environmentService.debugExtensionHost.debugId&&this._extensionHostDebugService.close(this._environmentService.debugExtensionHost.debugId),!this._terminating&&this._onExit.fire([0,y]))}async _createExtHostInitData(y){const[T,R]=await Promise.all([this._telemetryService.getTelemetryInfo(),this._initDataProvider.getInitData()]),O=new Set;R.extensions.forEach(M=>O.add(v.ExtensionIdentifier.toKey(M.identifier.value)));const x=R.allExtensions.filter(M=>!M.main&&!M.browser).map(M=>M.identifier),F=R.allExtensions.filter(M=>!O.has(v.ExtensionIdentifier.toKey(M.identifier.value))).filter(M=>(M.main||M.browser)&&M.api==="none").map(M=>M.identifier),L=this._contextService.getWorkspace();return this.extensions.deltaExtensions(R.extensions,[]),{commit:this._productService.commit,version:this._productService.version,parentPid:R.pid,environment:{isExtensionDevelopmentDebug:y,appRoot:R.appRoot,appName:this._productService.nameLong,appHost:this._productService.embedderIdentifier||"desktop",appUriScheme:this._productService.urlProtocol,appLanguage:k.language,extensionDevelopmentLocationURI:this._environmentService.extensionDevelopmentLocationURI,extensionTestsLocationURI:this._environmentService.extensionTestsLocationURI,globalStorageHome:R.globalStorageHome,workspaceStorageHome:R.workspaceStorageHome},workspace:this._contextService.getWorkbenchState()===1?null:{configuration:L.configuration,id:L.id,name:this._labelService.getWorkspaceLabel(L),transient:L.transient},remote:{isRemote:!0,authority:this._initDataProvider.remoteAuthority,connectionData:R.connectionData},resolvedExtensions:x,hostExtensions:F,extensions:this.extensions.getAllExtensionDescriptions(),telemetryInfo:T,logLevel:this._logService.getLevel(),logsLocation:R.extensionHostLogsPath,logFile:(0,D.joinPath)(R.extensionHostLogsPath,`${g.ExtensionHostLogFileName}.log`),autoStart:!0,uiKind:k.isWeb?h.UIKind.Web:h.UIKind.Desktop}}getInspectPort(){}enableInspectPort(){return Promise.resolve(!1)}dispose(){if(super.dispose(),this._terminating=!0,this._protocol){const y=this._protocol.getSocket();this._protocol.send((0,h.createMessageOfType)(2)),this._protocol.sendDisconnect(),this._protocol.dispose(),y.end(),this._protocol=null}}};b=Ee([W(3,p.IWorkspaceContextService),W(4,u.IWorkbenchEnvironmentService),W(5,r.ITelemetryService),W(6,d.ILifecycleService),W(7,o.ILogService),W(8,C.ILabelService),W(9,s.IRemoteAuthorityResolverService),W(10,w.IExtensionHostDebugService),W(11,c.IProductService),W(12,l.ISignService)],b),e.RemoteExtensionHost=b}),define(ne[88],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IPaneCompositePartService=void 0,e.IPaneCompositePartService=(0,t.createDecorator)("paneCompositePartService")}),define(ne[2482],re([1,0,1372,17,36,59,80,16,70,21,88]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FocusPreviousPart=e.FocusNextPart=void 0;let C=class extends _.Action{constructor(n,h,g,d,m,b){super(n,h);this.direction=g,this.editorGroupService=d,this.paneCompositeService=m,this.layoutService=b}async run(){const n=this.layoutService.hasFocus("workbench.parts.editor"),h=this.layoutService.hasFocus("workbench.parts.panel"),g=this.layoutService.hasFocus("workbench.parts.sidebar"),d=this.layoutService.hasFocus("workbench.parts.auxiliarybar");let m;if(n){if(this.navigateAcrossEditorGroup(this.toGroupDirection(this.direction)))return;m=this.layoutService.getVisibleNeighborPart("workbench.parts.editor",this.direction)}h&&(m=this.layoutService.getVisibleNeighborPart("workbench.parts.panel",this.direction)),g&&(m=this.layoutService.getVisibleNeighborPart("workbench.parts.sidebar",this.direction)),d&&(m=m=this.layoutService.getVisibleNeighborPart("workbench.parts.auxiliarybar",this.direction)),m==="workbench.parts.editor"?this.navigateBackToEditorGroup(this.toGroupDirection(this.direction))||this.navigateToEditorGroup(this.direction===3?0:1):m==="workbench.parts.sidebar"?this.navigateToSidebar():m==="workbench.parts.panel"?this.navigateToPanel():m==="workbench.parts.auxiliarybar"&&this.navigateToAuxiliaryBar()}async navigateToPanel(){if(!this.layoutService.isVisible("workbench.parts.panel"))return!1;const n=this.paneCompositeService.getActivePaneComposite(1);if(!n)return!1;const h=n.getId(),g=await this.paneCompositeService.openPaneComposite(h,1,!0);return g||!1}async navigateToSidebar(){if(!this.layoutService.isVisible("workbench.parts.sidebar"))return!1;const n=this.paneCompositeService.getActivePaneComposite(0);if(!n)return!1;const h=n.getId();return!!await this.paneCompositeService.openPaneComposite(h,0,!0)}async navigateToAuxiliaryBar(){if(!this.layoutService.isVisible("workbench.parts.auxiliarybar"))return!1;const n=this.paneCompositeService.getActivePaneComposite(2);if(!n)return!1;const h=n.getId(),g=await this.paneCompositeService.openPaneComposite(h,2,!0);return g||!1}navigateAcrossEditorGroup(n){return this.doNavigateToEditorGroup({direction:n})}navigateToEditorGroup(n){return this.doNavigateToEditorGroup({location:n})}navigateBackToEditorGroup(n){if(!this.editorGroupService.activeGroup)return!1;const h=this.toOppositeDirection(n);return this.editorGroupService.findGroup({direction:h},this.editorGroupService.activeGroup)?!1:(this.editorGroupService.activeGroup.focus(),!0)}toGroupDirection(n){switch(n){case 1:return 1;case 2:return 2;case 3:return 3;case 0:return 0}}toOppositeDirection(n){switch(n){case 0:return 1;case 3:return 2;case 2:return 3;case 1:return 0}}doNavigateToEditorGroup(n){const h=this.editorGroupService.findGroup(n,this.editorGroupService.activeGroup);return h?(h.focus(),!0):!1}};C=Ee([W(3,A.IEditorGroupsService),W(4,v.IPaneCompositePartService),W(5,k.IWorkbenchLayoutService)],C);let o=class extends C{constructor(n,h,g,d,m){super(n,h,2,g,d,m)}};o.ID="workbench.action.navigateLeft",o.LABEL=(0,t.localize)(0,null),o=Ee([W(2,A.IEditorGroupsService),W(3,v.IPaneCompositePartService),W(4,k.IWorkbenchLayoutService)],o);let c=class extends C{constructor(n,h,g,d,m){super(n,h,3,g,d,m)}};c.ID="workbench.action.navigateRight",c.LABEL=(0,t.localize)(1,null),c=Ee([W(2,A.IEditorGroupsService),W(3,v.IPaneCompositePartService),W(4,k.IWorkbenchLayoutService)],c);let i=class extends C{constructor(n,h,g,d,m){super(n,h,0,g,d,m)}};i.ID="workbench.action.navigateUp",i.LABEL=(0,t.localize)(2,null),i=Ee([W(2,A.IEditorGroupsService),W(3,v.IPaneCompositePartService),W(4,k.IWorkbenchLayoutService)],i);let S=class extends C{constructor(n,h,g,d,m){super(n,h,1,g,d,m)}};S.ID="workbench.action.navigateDown",S.LABEL=(0,t.localize)(3,null),S=Ee([W(2,A.IEditorGroupsService),W(3,v.IPaneCompositePartService),W(4,k.IWorkbenchLayoutService)],S);function s(a,n,h){const g=n==="workbench.parts.editor"?h?"workbench.parts.panel":"workbench.parts.sidebar":n==="workbench.parts.panel"?h?"workbench.parts.statusbar":"workbench.parts.editor":n==="workbench.parts.statusbar"?h?"workbench.parts.activitybar":"workbench.parts.panel":n==="workbench.parts.activitybar"?h?"workbench.parts.sidebar":"workbench.parts.statusbar":n==="workbench.parts.sidebar"?h?"workbench.parts.editor":"workbench.parts.activitybar":"workbench.parts.editor";return a.isVisible(g)||g==="workbench.parts.editor"?g:s(a,g,h)}function l(a,n,h){const d=n.activeEditorPane?.hasFocus()||a.hasFocus("workbench.parts.editor")?"workbench.parts.editor":a.hasFocus("workbench.parts.activitybar")?"workbench.parts.activitybar":a.hasFocus("workbench.parts.statusbar")?"workbench.parts.statusbar":a.hasFocus("workbench.parts.sidebar")?"workbench.parts.sidebar":a.hasFocus("workbench.parts.panel")?"workbench.parts.panel":void 0;let m="workbench.parts.editor";d&&(m=s(a,d,h)),a.focusPart(m)}let r=class extends _.Action{constructor(n,h,g,d){super(n,h);this.layoutService=g,this.editorService=d}async run(){l(this.layoutService,this.editorService,!0)}};r.ID="workbench.action.focusNextPart",r.LABEL=(0,t.localize)(4,null),r=Ee([W(2,k.IWorkbenchLayoutService),W(3,w.IEditorService)],r),e.FocusNextPart=r;let p=class extends _.Action{constructor(n,h,g,d){super(n,h);this.layoutService=g,this.editorService=d}async run(){l(this.layoutService,this.editorService,!1)}};p.ID="workbench.action.focusPreviousPart",p.LABEL=(0,t.localize)(5,null),p=Ee([W(2,k.IWorkbenchLayoutService),W(3,w.IEditorService)],p),e.FocusPreviousPart=p;const u=f.Registry.as(I.Extensions.WorkbenchActions);u.registerWorkbenchAction(D.SyncActionDescriptor.from(i,void 0),"View: Navigate to the View Above",I.CATEGORIES.View.value),u.registerWorkbenchAction(D.SyncActionDescriptor.from(S,void 0),"View: Navigate to the View Below",I.CATEGORIES.View.value),u.registerWorkbenchAction(D.SyncActionDescriptor.from(o,void 0),"View: Navigate to the View on the Left",I.CATEGORIES.View.value),u.registerWorkbenchAction(D.SyncActionDescriptor.from(c,void 0),"View: Navigate to the View on the Right",I.CATEGORIES.View.value),u.registerWorkbenchAction(D.SyncActionDescriptor.from(r,{primary:64}),"View: Focus Next Part",I.CATEGORIES.View.value),u.registerWorkbenchAction(D.SyncActionDescriptor.from(p,{primary:1024|64}),"View: Focus Previous Part",I.CATEGORIES.View.value)}),define(ne[887],re([1,0,36,33,1383,16,7,17,63,70,74,43,80,88]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleAuxiliaryBarAction=void 0;const i=(0,I.registerIcon)("auxiliarybar-right-layout-icon",f.Codicon.layoutSidebarRight,(0,_.localize)(0,null)),S=(0,I.registerIcon)("auxiliarybar-left-layout-icon",f.Codicon.layoutSidebarLeft,(0,_.localize)(1,null));let s=class extends t.Action{constructor(u,a,n){super(u,a,n.isVisible("workbench.parts.auxiliarybar")?"auxiliaryBar expanded":"auxiliaryBar");this.layoutService=n}async run(){this.layoutService.setPartHidden(this.layoutService.isVisible("workbench.parts.auxiliarybar"),"workbench.parts.auxiliarybar")}};s.ID="workbench.action.toggleAuxiliaryBar",s.LABEL=(0,_.localize)(2,null),s=Ee([W(2,o.IWorkbenchLayoutService)],s),e.ToggleAuxiliaryBarAction=s;let l=class extends t.Action{constructor(u,a,n,h){super(u,a);this.paneCompositeService=n,this.layoutService=h}async run(){this.layoutService.isVisible("workbench.parts.auxiliarybar")||this.layoutService.setPartHidden(!1,"workbench.parts.auxiliarybar");let u=this.paneCompositeService.getActivePaneComposite(2);u&&u.focus()}};l.ID="workbench.action.focusAuxiliaryBar",l.LABEL=(0,_.localize)(3,null),l=Ee([W(2,c.IPaneCompositePartService),W(3,o.IWorkbenchLayoutService)],l),A.MenuRegistry.appendMenuItems([{id:A.MenuId.LayoutControlMenuSubmenu,item:{group:"0_workbench_layout",command:{id:s.ID,title:(0,_.localize)(4,null),toggled:v.AuxiliaryBarVisibleContext},order:2}},{id:A.MenuId.LayoutControlMenu,item:{group:"0_workbench_toggles",command:{id:s.ID,title:(0,_.localize)(5,null),toggled:v.AuxiliaryBarVisibleContext,icon:S},when:k.ContextKeyExpr.and(k.ContextKeyExpr.or(k.ContextKeyExpr.equals("config.workbench.layoutControl.type","toggles"),k.ContextKeyExpr.equals("config.workbench.layoutControl.type","both")),k.ContextKeyExpr.equals("config.workbench.sideBar.location","right")),order:0}},{id:A.MenuId.LayoutControlMenu,item:{group:"0_workbench_toggles",command:{id:s.ID,title:(0,_.localize)(6,null),toggled:v.AuxiliaryBarVisibleContext,icon:i},when:k.ContextKeyExpr.and(k.ContextKeyExpr.or(k.ContextKeyExpr.equals("config.workbench.layoutControl.type","toggles"),k.ContextKeyExpr.equals("config.workbench.layoutControl.type","both")),k.ContextKeyExpr.equals("config.workbench.sideBar.location","left")),order:2}},{id:A.MenuId.MenubarAppearanceMenu,item:{group:"2_workbench_layout",command:{id:s.ID,title:(0,_.localize)(7,null),toggled:v.AuxiliaryBarVisibleContext},order:2}},{id:A.MenuId.ViewTitleContext,item:{group:"3_workbench_layout_move",command:{id:s.ID,title:{value:(0,_.localize)(8,null),original:"Hide Secondary Side Bar"}},when:k.ContextKeyExpr.and(v.AuxiliaryBarVisibleContext,k.ContextKeyExpr.equals("viewLocation",(0,C.ViewContainerLocationToString)(2))),order:2}}]);const r=D.Registry.as(w.Extensions.WorkbenchActions);r.registerWorkbenchAction(A.SyncActionDescriptor.from(s),"View: Toggle Secondary Side Bar Visibility",w.CATEGORIES.View.value),r.registerWorkbenchAction(A.SyncActionDescriptor.from(l),"View: Focus into Secondary Side Bar",w.CATEGORIES.View.value)}),define(ne[2483],re([1,0,1419,16,80,70,88,676]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FocusSideBarAction=void 0;class D extends f.Action2{constructor(){super({id:"workbench.action.focusSideBar",title:{value:(0,t.localize)(0,null),original:"Focus into Primary Side Bar"},category:A.CATEGORIES.View,f1:!0,keybinding:{weight:200,when:null,primary:2048|21}})}async run(w){const v=w.get(_.IWorkbenchLayoutService),C=w.get(k.IPaneCompositePartService);if(!v.isVisible("workbench.parts.sidebar")){v.setPartHidden(!1,"workbench.parts.sidebar");return}const o=C.getActivePaneComposite(0);o&&o.focus()}}e.FocusSideBarAction=D,(0,f.registerAction2)(D)}),define(ne[2484],re([1,0,245,1548,119,79,26,31,88]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ManageExtensionsQuickAccessProvider=e.InstallExtensionQuickAccessProvider=void 0;let w=class Jo extends t.PickerQuickAccessProvider{constructor(c,i,S,s,l){super(Jo.PREFIX);this.paneCompositeService=c,this.galleryService=i,this.extensionsService=S,this.notificationService=s,this.logService=l}_getPicks(c,i,S){if(!c)return[{label:(0,f.localize)(0,null)}];const s={label:(0,f.localize)(1,null,c),accept:()=>this.searchExtension(c)};return/\./.test(c)?this.getPicksForExtensionId(c,s,S):[s]}async getPicksForExtensionId(c,i,S){try{const[s]=await this.galleryService.getExtensions([{id:c}],S);return S.isCancellationRequested?[]:s?[{label:(0,f.localize)(2,null,c),accept:()=>this.installExtension(s,c)}]:[i]}catch(s){return S.isCancellationRequested?[]:(this.logService.error(s),[i])}}async installExtension(c,i){try{await C(this.paneCompositeService,`@id:${i}`),await this.extensionsService.installFromGallery(c)}catch(S){this.notificationService.error(S)}}async searchExtension(c){C(this.paneCompositeService,c)}};w.PREFIX="ext install ",w=Ee([W(0,I.IPaneCompositePartService),W(1,A.IExtensionGalleryService),W(2,A.IExtensionManagementService),W(3,k.INotificationService),W(4,D.ILogService)],w),e.InstallExtensionQuickAccessProvider=w;let v=class Zo extends t.PickerQuickAccessProvider{constructor(c){super(Zo.PREFIX);this.paneCompositeService=c}_getPicks(){return[{label:(0,f.localize)(3,null),accept:()=>C(this.paneCompositeService)}]}};v.PREFIX="ext ",v=Ee([W(0,I.IPaneCompositePartService)],v),e.ManageExtensionsQuickAccessProvider=v;async function C(o,c=""){const S=(await o.openPaneComposite(_.VIEWLET_ID,0,!0))?.getViewPaneContainer();S?.search(c),S?.focus()}}),define(ne[2485],re([1,0,27,266,26,115,254,119,30,1554,24,46,143,18,19,152,169,350,40,52,42,399,295,15,2,64,11,88,34,100]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileBasedRecommendations=void 0;const T="fileBasedRecommendations/promptedRecommendations",R="fileBasedRecommendations/promptedFileExtensions",O="extensionsAssistant/recommendations",x=(0,w.localize)(0,null),F=1e3*60*60*24;let L=class extends f.ExtensionRecommendations{constructor(N,B,P,V,z,U,H,K,G,q,Z,j,X,Y){super();this.extensionsWorkbenchService=N,this.extensionService=B,this.paneCompositeService=P,this.modelService=V,this.languageService=z,this.notificationService=H,this.telemetryService=K,this.storageService=G,this.extensionRecommendationNotificationService=q,this.extensionIgnoredRecommendationsService=Z,this.tasExperimentService=j,this.workspaceContextService=X,this.extensionManagementServerService=Y,this.extensionTips=new Map,this.importantExtensionTips=new Map,this.fileBasedRecommendationsByPattern=new Map,this.fileBasedRecommendationsByLanguage=new Map,this.fileBasedRecommendations=new Map,this.processedFileExtensions=[],this.processedLanguages=[],this.tasExperimentService=j,U.extensionTips&&(0,o.forEach)(U.extensionTips,({key:$,value:J})=>this.extensionTips.set($.toLowerCase(),J)),U.extensionImportantTips&&(0,o.forEach)(U.extensionImportantTips,({key:$,value:J})=>this.importantExtensionTips.set($.toLowerCase(),J))}get recommendations(){const N=[];return[...this.fileBasedRecommendations.keys()].sort((B,P)=>{if(this.fileBasedRecommendations.get(B).recommendedTime===this.fileBasedRecommendations.get(P).recommendedTime){if(this.importantExtensionTips.has(B))return-1;if(this.importantExtensionTips.has(P))return 1}return this.fileBasedRecommendations.get(B).recommendedTime>this.fileBasedRecommendations.get(P).recommendedTime?-1:1}).forEach(B=>{N.push({extensionId:B,reason:{reasonId:1,reasonText:(0,w.localize)(1,null)}})}),N}get importantRecommendations(){return this.recommendations.filter(N=>this.importantExtensionTips.has(N.extensionId))}get otherRecommendations(){return this.recommendations.filter(N=>!this.importantExtensionTips.has(N.extensionId))}async doActivate(){await this.extensionService.whenInstalledExtensionsRegistered();const N=[];for(const[V,z]of this.extensionTips){const U=this.fileBasedRecommendationsByPattern.get(z)||[];U.push(V),this.fileBasedRecommendationsByPattern.set(z,U),N.push(V)}for(const[V,z]of this.importantExtensionTips){if(z.pattern){const U=this.fileBasedRecommendationsByPattern.get(z.pattern)||[];U.push(V),this.fileBasedRecommendationsByPattern.set(z.pattern,U)}if(z.languages)for(const U of z.languages){const H=this.fileBasedRecommendationsByLanguage.get(U)||[];H.push(V),this.fileBasedRecommendationsByLanguage.set(U,H)}N.push(V)}const B=this.getCachedRecommendations(),P=Date.now();(0,o.forEach)(B,({key:V,value:z})=>{(P-z)/F<=7&&N.indexOf(V)>-1&&this.fileBasedRecommendations.set(V.toLowerCase(),{recommendedTime:z})}),this._register(this.modelService.onModelAdded(V=>this.onModelAdded(V))),this.modelService.getModels().forEach(V=>this.onModelAdded(V))}onModelAdded(N){const B=N.uri.scheme===c.Schemas.vscodeNotebookCell?d.CellUri.parse(N.uri)?.notebook:N.uri;if(!B)return;const P=(0,h.distinct)([c.Schemas.untitled,c.Schemas.file,c.Schemas.vscodeRemote,...this.workspaceContextService.getWorkspace().folders.map(z=>z.uri.scheme)]);if(!B||!P.includes(B.scheme))return;this.promptRecommendationsForModel(N);const V=new g.DisposableStore;V.add(N.onDidChangeLanguage(()=>this.promptRecommendationsForModel(N))),V.add(N.onWillDispose(()=>V.dispose()))}promptRecommendationsForModel(N){const B=N.uri,P=N.getLanguageId(),V=(0,i.extname)(B).toLowerCase();this.processedLanguages.includes(P)&&this.processedFileExtensions.includes(V)||(this.processedLanguages.push(P),this.processedFileExtensions.push(V),this._register((0,m.disposableTimeout)(()=>this.promptRecommendations(B,P,V),0)))}async promptRecommendations(N,B,P){const V=await this.extensionsWorkbenchService.queryLocal(),z=(this.fileBasedRecommendationsByLanguage.get(B)||[]).filter(K=>{const G=this.importantExtensionTips.get(K);return G?!G.whenNotInstalled||G.whenNotInstalled.every(q=>V.every(Z=>!(0,y.areSameExtensions)(Z.identifier,{id:q}))):!1});let U=z.length?this.languageService.getLanguageName(B):null;const H=[...z];for(let[K,G]of this.fileBasedRecommendationsByPattern)if(G=G.filter(q=>!z.includes(q)),!!G.length&&!!(0,S.match)(K,N.with({fragment:""}).toString()))for(const q of G){H.push(q);const Z=this.importantExtensionTips.get(q);Z&&Z.pattern===K&&z.push(q)}for(const K of H){const G=this.fileBasedRecommendations.get(K)||{recommendedTime:Date.now(),sources:[]};G.recommendedTime=Date.now(),this.fileBasedRecommendations.set(K,G)}this.storeCachedRecommendations(),!this.extensionRecommendationNotificationService.hasToIgnoreRecommendationNotifications()&&(z.length&&await this.promptRecommendedExtensionForFileType(U||(0,i.basename)(N),B,z,V)||this.promptRecommendedExtensionForFileExtension(N,P,V))}async promptRecommendedExtensionForFileType(N,B,P,V){if(P=this.filterIgnoredOrNotAllowed(P),P.length===0||(P=this.filterInstalled(P,V),P.length===0))return!1;const z=P[0];if(!this.importantExtensionTips.get(z))return!1;const H=this.getPromptedRecommendations();if(H[B]&&H[B].includes(z))return!1;const K=await this.tasExperimentService.getTreatment("languageRecommendationMessage"),G=K?K.replace("{0}",N):(0,w.localize)(2,null,N);return this.extensionRecommendationNotificationService.promptImportantExtensionsInstallNotification([z],G,`@id:${z}`,1).then(q=>{q==="reacted"&&this.addToPromptedRecommendations(B,[z])}),!0}getPromptedRecommendations(){return JSON.parse(this.storageService.get(T,0,"{}"))}addToPromptedRecommendations(N,B){const P=this.getPromptedRecommendations();P[N]=B,this.storageService.store(T,JSON.stringify(P),0,0)}getPromptedFileExtensions(){return JSON.parse(this.storageService.get(R,0,"[]"))}addToPromptedFileExtensions(N){const B=this.getPromptedFileExtensions();B.push(N),this.storageService.store(R,JSON.stringify((0,h.distinct)(B)),0,0)}async promptRecommendedExtensionForFileExtension(N,B,P){if(!this.extensionManagementServerService.localExtensionManagementServer&&!this.extensionManagementServerService.remoteExtensionManagementServer||(B=B.substring(1),!B))return;const V=(0,l.getMimeTypes)(N);if(V.length!==1||V[0]!==s.Mimes.unknown)return;const z=JSON.parse(this.storageService.get("extensionsAssistant/fileExtensionsSuggestionIgnore",0,"[]"));if(z.indexOf(B)>-1||this.getPromptedFileExtensions().includes(B))return;const H=`ext:${B}`,K=await this.extensionsWorkbenchService.queryGallery({text:H,pageSize:100},I.CancellationToken.None);if(K.firstPage.length===0)return;const G=P.reduce((q,Z)=>(q.add(Z.identifier.id.toLowerCase()),q),new Set);K.firstPage.some(q=>G.has(q.identifier.id.toLowerCase()))||this.notificationService.prompt(_.Severity.Info,(0,w.localize)(3,null,B),[{label:x,run:()=>{this.addToPromptedFileExtensions(B),this.telemetryService.publicLog2("fileExtensionSuggestion:popup",{userReaction:"ok",fileExtension:B}),this.paneCompositeService.openPaneComposite(D.VIEWLET_ID,0,!0).then(q=>q?.getViewPaneContainer()).then(q=>{q.search(`ext:${B}`),q.focus()})}},{label:(0,w.localize)(4,null,B),run:()=>{z.push(B),this.storageService.store("extensionsAssistant/fileExtensionsSuggestionIgnore",JSON.stringify(z),0,0),this.telemetryService.publicLog2("fileExtensionSuggestion:popup",{userReaction:"neverShowAgain",fileExtension:B})}}],{sticky:!0,onCancel:()=>{this.telemetryService.publicLog2("fileExtensionSuggestion:popup",{userReaction:"cancelled",fileExtension:B})}})}filterIgnoredOrNotAllowed(N){const B=[...this.extensionIgnoredRecommendationsService.ignoredRecommendations,...this.extensionRecommendationNotificationService.ignoredRecommendations];return N.filter(P=>!B.includes(P))}filterInstalled(N,B){const P=B.reduce((V,z)=>(z.enablementState!==1&&V.add(z.identifier.id.toLowerCase()),V),new Set);return N.filter(V=>!P.has(V.toLowerCase()))}getCachedRecommendations(){let N=JSON.parse(this.storageService.get(O,0,"[]"));Array.isArray(N)&&(N=N.reduce((P,V)=>(P[V]=Date.now(),P),{}));const B={};return(0,o.forEach)(N,({key:P,value:V})=>{typeof V=="number"&&(B[P.toLowerCase()]=V)}),B}storeCachedRecommendations(){const N={};this.fileBasedRecommendations.forEach((B,P)=>N[P]=B.recommendedTime),this.storageService.store(O,JSON.stringify(N),0,1)}};L=Ee([W(0,D.IExtensionsWorkbenchService),W(1,r.IExtensionService),W(2,b.IPaneCompositePartService),W(3,p.IModelService),W(4,u.ILanguageService),W(5,C.IProductService),W(6,_.INotificationService),W(7,t.ITelemetryService),W(8,v.IStorageService),W(9,a.IExtensionRecommendationNotificationService),W(10,k.IExtensionIgnoredRecommendationsService),W(11,n.IWorkbenchAssignmentService),W(12,E.IWorkspaceContextService),W(13,A.IExtensionManagementServerService)],L),e.FileBasedRecommendations=L}),define(ne[2486],re([1,0,39,58,1597,7,28,26,119,54,88,62]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0});async function o(c,i){const S=await c.openPaneComposite(I.VIEWLET_ID,0,!0);S&&S?.getViewPaneContainer().search(i)}(0,t.registerEditorAction)(class extends t.EditorAction{constructor(){super({id:"editor.action.formatDocument.none",label:_.localize(0,null),alias:"Format Document",precondition:A.ContextKeyExpr.and(f.EditorContextKeys.writable,f.EditorContextKeys.hasDocumentFormattingProvider.toNegated()),kbOpts:{kbExpr:f.EditorContextKeys.editorTextFocus,primary:1024|512|36,linux:{primary:2048|1024|39},weight:100}})}async run(i,S){if(!S.hasModel())return;const s=i.get(k.ICommandService),l=i.get(v.IPaneCompositePartService),r=i.get(D.INotificationService),p=i.get(w.IDialogService),u=i.get(C.ILanguageFeaturesService),a=S.getModel(),n=u.documentFormattingEditProvider.all(a).length;if(n>1)return s.executeCommand("editor.action.formatDocument.multiple");if(n===1)return s.executeCommand("editor.action.formatDocument");if(a.isTooLargeForSyncing())r.warn(_.localize(1,null));else{const h=a.getLanguageId(),g=_.localize(2,null,h);(await p.show(D.Severity.Info,g,[_.localize(3,null),_.localize(4,null)])).choice===1&&o(l,`category:formatters ${h}`)}}})}),define(ne[2487],re([1,0,1611,36,85,736,53,272,69,26,14,119,54,46,88]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigureLocaleAction=void 0;let S=class extends f.Action{constructor(l,r,p,u,a,n,h,g,d,m,b){super(l,r);this.environmentService=p,this.localizationService=u,this.quickInputService=a,this.jsonEditingService=n,this.hostService=h,this.notificationService=g,this.paneCompositeService=d,this.dialogService=m,this.productService=b}async getLanguageOptions(){const l=await this.localizationService.getLanguageIds();return l.sort(),l.map(r=>({label:r})).concat({label:(0,t.localize)(1,null)})}async run(){const l=await this.getLanguageOptions(),r=l.findIndex(p=>p.label===v.language);try{const p=await this.quickInputService.pick(l,{canPickMany:!1,placeHolder:(0,t.localize)(2,null),activeItem:l[r]});if(p===l[l.length-1])return this.paneCompositeService.openPaneComposite(C.VIEWLET_ID,0,!0).then(u=>u?.getViewPaneContainer()).then(u=>{const a=u;a.search('@category:"language packs"'),a.focus()});p&&(await this.jsonEditingService.write(this.environmentService.argvResource,[{path:["locale"],value:p.label}],!0),(await this.dialogService.confirm({type:"info",message:(0,t.localize)(3,null),detail:(0,t.localize)(4,null,this.productService.nameLong),primaryButton:(0,t.localize)(5,null)})).confirmed&&this.hostService.restart())}catch(p){this.notificationService.error(p)}}};S.ID="workbench.action.configureLocale",S.LABEL=(0,t.localize)(0,null),S=Ee([W(2,_.IEnvironmentService),W(3,A.ILocalizationsService),W(4,k.IQuickInputService),W(5,D.IJSONEditingService),W(6,I.IHostService),W(7,w.INotificationService),W(8,i.IPaneCompositePartService),W(9,o.IDialogService),W(10,c.IProductService)],S),e.ConfigureLocaleAction=S}),define(ne[2488],re([1,0,1610,17,47,70,16,2,2487,133,14,79,26,81,272,85,69,24,119,2154,27,30,88]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LocalizationWorkbenchContribution=void 0,f.Registry.as(A.Extensions.WorkbenchActions).registerWorkbenchAction(k.SyncActionDescriptor.from(I.ConfigureLocaleAction),"Configure Display Language");const g="extensionsAssistant/languagePackSuggestionIgnore";let d=class extends D.Disposable{constructor(E,y,T,R,O,x,F,L,M){super();this.notificationService=E,this.jsonEditingService=y,this.environmentService=T,this.hostService=R,this.storageService=O,this.extensionManagementService=x,this.galleryService=F,this.paneCompositeService=L,this.telemetryService=M,this.checkAndInstall(),this._register(this.extensionManagementService.onDidInstallExtensions(N=>this.onDidInstallExtensions(N)))}onDidInstallExtensions(E){for(const y of E)if(y.local&&y.operation===2&&y.local.manifest.contributes&&y.local.manifest.contributes.localizations&&y.local.manifest.contributes.localizations.length){const T=y.local.manifest.contributes.localizations[0].languageId;if(v.language!==T){const R=v.locale!==T;this.notificationService.prompt(c.default.Info,R?(0,t.localize)(0,null,y.local.manifest.contributes.localizations[0].languageName||y.local.manifest.contributes.localizations[0].languageId):(0,t.localize)(1,null,y.local.manifest.contributes.localizations[0].languageName||y.local.manifest.contributes.localizations[0].languageId),[{label:R?(0,t.localize)(2,null):(0,t.localize)(3,null),run:()=>{(R?this.jsonEditingService.write(this.environmentService.argvResource,[{path:["locale"],value:T}],!0):Promise.resolve(void 0)).then(()=>this.hostService.restart(),x=>this.notificationService.error(x))}},{label:R?(0,t.localize)(4,null):(0,t.localize)(5,null),run:()=>{}}],{sticky:!0,neverShowAgain:{id:"langugage.update.donotask",isSecondary:!0}})}}}checkAndInstall(){const E=v.language,y=v.locale,T=JSON.parse(this.storageService.get(g,0,"[]"));!this.galleryService.isEnabled()||!E||!y||y==="en"||y.indexOf("en-")===0||E===y||T.indexOf(y)>-1||this.isLanguageInstalled(y).then(R=>{R||this.galleryService.query({text:`tag:lp-${y}`},a.CancellationToken.None).then(O=>{if(O.total===0)return;const x=O.total===1?O.firstPage[0]:O.firstPage.filter(L=>L.publisher==="MS-CEINTL"&&L.name.indexOf("vscode-language-pack")===0)[0],F=x||O.firstPage[0];!F.assets.manifest||Promise.all([this.galleryService.getManifest(F,a.CancellationToken.None),this.galleryService.getCoreTranslation(F,y)]).then(([L,M])=>{const N=L&&L.contributes&&L.contributes.localizations&&L.contributes.localizations.filter(j=>j.languageId.toLowerCase()===y)[0],B=N&&N.languageName||y,P=N&&(N.localizedLanguageName||N.languageName)||y,V=M&&M.contents?M.contents["vs/workbench/contrib/localizations/browser/minimalTranslations"]:{},z=x?"installAndRestartMessage":"showLanguagePackExtensions",U=!V[z],H={};Object.keys(p.minimumTranslatedStrings).forEach(j=>{!V[j]||U?H[j]=p.minimumTranslatedStrings[j].replace("{0}",B):H[j]=`${V[j].replace("{0}",P)} (${p.minimumTranslatedStrings[j].replace("{0}",B)})`});const K=j=>{this.telemetryService.publicLog("languagePackSuggestion:popup",{userReaction:j,language:y})},G={label:H.searchMarketplace,run:()=>{K("search"),this.paneCompositeService.openPaneComposite(r.VIEWLET_ID,0,!0).then(j=>j?.getViewPaneContainer()).then(j=>{j.search(`tag:lp-${y}`),j.focus()})}},q={label:H.installAndRestart,run:()=>{K("installAndRestart"),this.installExtension(x).then(()=>this.hostService.restart())}},Z=H[z];this.notificationService.prompt(c.default.Info,Z,[x?q:G,{label:(0,t.localize)(6,null),isSecondary:!0,run:()=>{T.push(y),this.storageService.store(g,JSON.stringify(T),0,0),K("neverShowAgain")}}],{onCancel:()=>{K("cancelled")}})})})})}isLanguageInstalled(E){return this.extensionManagementService.getInstalled().then(y=>y.some(T=>!!(T.manifest&&T.manifest.contributes&&T.manifest.contributes.localizations&&T.manifest.contributes.localizations.length&&T.manifest.contributes.localizations.some(R=>R.languageId.toLowerCase()===E))))}installExtension(E){return this.paneCompositeService.openPaneComposite(r.VIEWLET_ID,0).then(y=>y?.getViewPaneContainer()).then(y=>y.search(`@id:${E.identifier.id}`)).then(()=>this.extensionManagementService.installFromGallery(E)).then(()=>{},y=>this.notificationService.error(y))}};d=Ee([W(0,o.INotificationService),W(1,i.IJSONEditingService),W(2,S.IEnvironmentService),W(3,s.IHostService),W(4,l.IStorageService),W(5,C.IExtensionManagementService),W(6,C.IExtensionGalleryService),W(7,n.IPaneCompositePartService),W(8,u.ITelemetryService)],d),e.LocalizationWorkbenchContribution=d,f.Registry.as(_.Extensions.Workbench).registerWorkbenchContribution(d,4),w.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"localizations",defaultExtensionKind:["ui","workspace"],jsonSchema:{description:(0,t.localize)(7,null),type:"array",default:[],items:{type:"object",required:["languageId","translations"],defaultSnippets:[{body:{languageId:"",languageName:"",localizedLanguageName:"",translations:[{id:"vscode",path:""}]}}],properties:{languageId:{description:(0,t.localize)(8,null),type:"string"},languageName:{description:(0,t.localize)(9,null),type:"string"},localizedLanguageName:{description:(0,t.localize)(10,null),type:"string"},translations:{description:(0,t.localize)(11,null),type:"array",default:[{id:"vscode",path:""}],items:{type:"object",required:["id","path"],properties:{id:{type:"string",description:(0,t.localize)(12,null),pattern:"^((vscode)|([a-z0-9A-Z][a-z0-9A-Z-]*)\\.([a-z0-9A-Z][a-z0-9A-Z-]*))$",patternErrorMessage:(0,t.localize)(13,null)},path:{type:"string",description:(0,t.localize)(14,null)}},defaultSnippets:[{body:{id:"",path:""}}]}}}}}})}),define(ne[2489],re([1,0,10,242,163,36,2,1653,73,16,7,37,5,38,41,53,12,119,104,200,175,64,142,88]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellOutputContainer=e.CellOutputElement=void 0;let g=class extends k.Disposable{constructor(y,T,R,O,x,F,L,M,N,B,P,V){super();this.notebookEditor=y,this.viewCell=T,this.cellOutputContainer=R,this.outputContainer=O,this.output=x,this.notebookService=F,this.quickInputService=L,this.contextMenuService=M,this.keybindingService=N,this.menuService=P,this.paneCompositeService=V,this._renderDisposableStore=this._register(new k.DisposableStore),this._actionsDisposable=this._register(new k.MutableDisposable),this._outputHeightTimer=null,this.contextKeyService=B,this._register(this.output.model.onDidChangeData(()=>{this.updateOutputData()}))}detach(){this.renderedOutputContainer&&this.renderedOutputContainer.parentElement?.removeChild(this.renderedOutputContainer);let y=0;if(this.innerContainer){for(let T=0;T<this.innerContainer.childNodes.length&&(this.innerContainer.childNodes[T].className==="rendered-output"&&y++,!(y>1));T++);y===0&&this.innerContainer.parentElement?.removeChild(this.innerContainer)}this.notebookEditor.removeInset(this.output)}updateDOMTop(y){this.innerContainer&&(this.innerContainer.style.top=`${y}px`)}updateOutputData(){if(this.notebookEditor.hasModel()&&this.innerContainer&&this.renderResult&&this.renderResult.type===1){const[y,T]=this.output.resolveMimeTypes(this.notebookEditor.textModel,this.notebookEditor.activeKernel?.preloadProvides),R=y[T];if(R.mimeType===this.renderResult.mimeType&&R.rendererId===this.renderResult.renderer.id){const O=this.viewCell.outputsViewModels.indexOf(this.output);this.notebookEditor.updateOutput(this.viewCell,this.renderResult,this.viewCell.getOutputOffset(O));return}}if(this.innerContainer){const y=this.innerContainer.nextElementSibling;this._renderDisposableStore.clear();const T=this.innerContainer;T&&(T.parentElement?.removeChild(T),this.notebookEditor.removeInset(this.output)),this.render(y)}else{const y=this.cellOutputContainer.renderedOutputEntries.findIndex(R=>R.element===this),T=y>0&&!!this.cellOutputContainer.renderedOutputEntries[y-1].element.innerContainer?.parentElement?this.cellOutputContainer.renderedOutputEntries[y-1].element.innerContainer:void 0;this.render(T)}this._relayoutCell()}_generateInnerOutputContainer(y,T){return this.innerContainer=t.$(".output-inner-container"),y&&y.nextElementSibling?this.outputContainer.domNode.insertBefore(this.innerContainer,y.nextElementSibling):this.outputContainer.domNode.appendChild(this.innerContainer),this.innerContainer.setAttribute("output-mime-type",T.mimeType),this.innerContainer}render(y){const T=this.viewCell.outputsViewModels.indexOf(this.output);if(this.viewCell.isOutputCollapsed||!this.notebookEditor.hasModel()||!a.CellUri.parse(this.viewCell.uri)?.notebook)return;const O=this.notebookEditor.textModel,[x,F]=this.output.resolveMimeTypes(O,this.notebookEditor.activeKernel?.preloadProvides);if(!x.find(B=>B.isTrusted)||x.length===0){this.viewCell.updateOutputHeight(T,0,"CellOutputElement#noMimeType");return}const L=x[F],M=this._generateInnerOutputContainer(y,L);this._attachToolbar(M,O,this.notebookEditor.activeKernel,T,x),this.renderedOutputContainer=t.append(M,t.$(".rendered-output"));const N=this.notebookService.getRendererInfo(L.rendererId);if(this.renderResult=N?{type:1,renderer:N,source:this.output,mimeType:L.mimeType}:this._renderMissingRenderer(this.output,L.mimeType),this.output.pickedMimeType=L,!this.renderResult){this.viewCell.updateOutputHeight(T,0,"CellOutputElement#renderResultUndefined");return}return this.notebookEditor.createOutput(this.viewCell,this.renderResult,this.viewCell.getOutputOffset(T)),M.classList.add("background"),{initRenderIsSynchronous:!1}}_renderMissingRenderer(y,T){if(!y.model.outputs.length)return this._renderMessage(y,D.localize(0,null));if(!T){const O=y.model.outputs.map(x=>x.mime).join(", ");return this._renderMessage(y,D.localize(1,null,O))}return this._renderSearchForMimetype(y,T)}_renderSearchForMimetype(y,T){const R=`@tag:notebookRenderer ${T}`;return{type:0,source:y,htmlContent:`<p>No renderer could be found for mimetype "${T}", but one might be available on the Marketplace.</p> <a href="command:workbench.extensions.search?%22${R}%22" class="monaco-button monaco-text-button" tabindex="0" role="button" style="padding: 8px; text-decoration: none; color: rgb(255, 255, 255); background-color: rgb(14, 99, 156); max-width: 200px;">Search Marketplace</a>`}}_renderMessage(y,T){return{type:0,source:y,htmlContent:`<p>${T}</p>`}}async _attachToolbar(y,T,R,O,x){const F=x.filter(P=>P.isTrusted).length<=1;if(O>0&&F||!this.notebookEditor.hasModel())return;const L=this.notebookEditor.notebookOptions.getLayoutConfiguration().consolidatedOutputButton;y.style.position="relative";const M=t.$(".cell-output-toolbar");y.appendChild(M);const N=this._renderDisposableStore.add(new _.ToolBar(M,this.contextMenuService,{getKeyBinding:P=>this.keybindingService.lookupKeybinding(P.id),renderDropdownAsChildElement:!1}));N.context={ui:!0,cell:this.output.cellViewModel,notebookEditor:this.notebookEditor,$mid:12};const B=new A.Action("notebook.output.pickMimetype",D.localize(2,null),s.ThemeIcon.asClassName(p.mimetypeIcon),void 0,async P=>this._pickActiveMimeTypeRenderer(y,T,R,this.output));if(O===0&&L){const P=this._renderDisposableStore.add(this.menuService.createMenu(w.MenuId.NotebookOutputToolbar,this.contextKeyService)),V=()=>{const z=[],U=[],H={primary:z,secondary:U};this._actionsDisposable.value=(0,I.createAndFillInActionBarActions)(P,{shouldForwardArgs:!0},H,()=>!1),N.setActions([],[B,...U])};V(),this._renderDisposableStore.add(P.onDidChange(V))}else N.setActions([B])}async _pickActiveMimeTypeRenderer(y,T,R,O){const[x,F]=O.resolveMimeTypes(T,R?.preloadProvides),L=[],M=[];x.forEach((H,K)=>{H.isTrusted&&(H.rendererId===a.RENDERER_NOT_AVAILABLE?M:L).push({label:H.mimeType,id:H.mimeType,index:K,picked:K===F,detail:this._generateRendererInfo(H.rendererId),description:K===F?D.localize(3,null):void 0})}),M.some(H=>b.includes(H.id))&&M.push({label:D.localize(4,null),id:"installRenderers",index:x.length});const N=this.quickInputService.createQuickPick();N.items=[...L,{type:"separator"},...M],N.activeItems=L.filter(H=>!!H.picked),N.placeholder=L.length!==x.length?D.localize(5,null):D.localize(6,null);const B=await new Promise(H=>{N.onDidAccept(()=>{H(N.selectedItems.length===1?N.selectedItems[0]:void 0),N.dispose()}),N.show()});if(B===void 0||B.index===F)return;if(B.id==="installRenderers"){this._showJupyterExtension();return}const P=y.nextElementSibling;this._renderDisposableStore.clear();const V=this.innerContainer;V&&(V.parentElement?.removeChild(V),this.notebookEditor.removeInset(O)),O.pickedMimeType=x[B.index],this.viewCell.updateOutputMinHeight(this.viewCell.layoutInfo.outputTotalHeight);const{mimeType:z,rendererId:U}=x[B.index];this.notebookService.updateMimePreferredRenderer(T.viewType,z,U,x.map(H=>H.mimeType)),this.render(P),this._validateFinalOutputHeight(!1),this._relayoutCell()}async _showJupyterExtension(){(await this.paneCompositeService.openPaneComposite(l.VIEWLET_ID,0,!0))?.getViewPaneContainer()?.search(`@id:${r.JUPYTER_EXTENSION_ID}`)}_generateRendererInfo(y){const T=this.notebookService.getRendererInfo(y);return T?`${T.displayName!==""?T.displayName:T.id} (${T.extensionId.value})`:D.localize(7,null)}_validateFinalOutputHeight(y){this._outputHeightTimer!==null&&clearTimeout(this._outputHeightTimer),y?this.viewCell.unlockOutputHeight():this._outputHeightTimer=setTimeout(()=>{this.viewCell.unlockOutputHeight()},1e3)}_relayoutCell(){this.notebookEditor.layoutNotebookCell(this.viewCell,this.viewCell.layoutInfo.totalHeight)}dispose(){this._outputHeightTimer&&(this.viewCell.unlockOutputHeight(),clearTimeout(this._outputHeightTimer)),super.dispose()}};g=Ee([W(5,n.INotebookService),W(6,S.IQuickInputService),W(7,C.IContextMenuService),W(8,c.IKeybindingService),W(9,v.IContextKeyService),W(10,w.IMenuService),W(11,h.IPaneCompositePartService)],g),e.CellOutputElement=g;class d{constructor(y,T){this.model=y,this.element=T}}let m=class extends u.CellPart{constructor(y,T,R,O,x,F){super();this.notebookEditor=y,this.viewCell=T,this.templateData=R,this.options=O,this.openerService=x,this.instantiationService=F,this._outputEntries=[],this._outputHeightTimer=null,this._register(T.onDidChangeOutputs(L=>{this._updateOutputs(L)})),this._register(T.onDidChangeLayout(()=>{this.updateInternalLayoutNow(T)}))}get renderedOutputEntries(){return this._outputEntries}updateInternalLayoutNow(y){this.templateData.outputContainer.setTop(y.layoutInfo.outputContainerOffset),this.templateData.outputShowMoreContainer.setTop(y.layoutInfo.outputShowMoreContainerOffset),this._outputEntries.forEach(T=>{const R=this.viewCell.outputsViewModels.indexOf(T.model);if(R>=0){const O=this.viewCell.getOutputOffsetInContainer(R);T.element.updateDOMTop(O)}})}render(y){if(this.viewCell.outputsViewModels.length>0){this.viewCell.layoutInfo.totalHeight!==0&&this.viewCell.layoutInfo.editorHeight>y&&(this.viewCell.updateOutputMinHeight(this.viewCell.layoutInfo.outputTotalHeight),this._relayoutCell()),t.show(this.templateData.outputContainer.domNode);for(let T=0;T<Math.min(this.options.limit,this.viewCell.outputsViewModels.length);T++){const R=this.viewCell.outputsViewModels[T],O=this.instantiationService.createInstance(g,this.notebookEditor,this.viewCell,this,this.templateData.outputContainer,R);this._outputEntries.push(new d(R,O)),O.render(void 0)}this.viewCell.editorHeight=y,this.viewCell.outputsViewModels.length>this.options.limit&&(t.show(this.templateData.outputShowMoreContainer.domNode),this.viewCell.updateOutputShowMoreContainerHeight(46)),this._relayoutCell(),this._validateFinalOutputHeight(!1)}else this.viewCell.editorHeight=y,this._relayoutCell(),t.hide(this.templateData.outputContainer.domNode);this.templateData.outputShowMoreContainer.domNode.innerText="",this.viewCell.outputsViewModels.length>this.options.limit?this.templateData.outputShowMoreContainer.domNode.appendChild(this._generateShowMoreElement(this.templateData.templateDisposables)):(t.hide(this.templateData.outputShowMoreContainer.domNode),this.viewCell.updateOutputShowMoreContainerHeight(0))}viewUpdateShowOutputs(y){for(let T=0;T<this._outputEntries.length;T++){const O=this._outputEntries[T].element;O.renderResult?this.notebookEditor.createOutput(this.viewCell,O.renderResult,this.viewCell.getOutputOffset(T)):O.render(void 0)}this._relayoutCell()}viewUpdateHideOuputs(){for(let y=0;y<this._outputEntries.length;y++)this.notebookEditor.hideInset(this._outputEntries[y].model)}_validateFinalOutputHeight(y){this._outputHeightTimer!==null&&clearTimeout(this._outputHeightTimer),y?this.viewCell.unlockOutputHeight():this._outputHeightTimer=setTimeout(()=>{this.viewCell.unlockOutputHeight()},1e3)}_updateOutputs(y){const T=this.viewCell.layoutInfo.outputTotalHeight;this.viewCell.updateOutputMinHeight(T),this.viewCell.outputsViewModels.length?t.show(this.templateData.outputContainer.domNode):t.hide(this.templateData.outputContainer.domNode),this.viewCell.spliceOutputHeights(y.start,y.deleteCount,y.newOutputs.map(R=>0)),this._renderNow(y)}_renderNow(y){if(y.start>=this.options.limit)return;const T=this._outputEntries.slice(0,y.start),R=this._outputEntries.slice(y.start,y.start+y.deleteCount),O=this._outputEntries.slice(y.start+y.deleteCount);let x=this.viewCell.outputsViewModels.slice(y.start,y.start+y.newOutputs.length);if(T.length+x.length+O.length>this.options.limit)if(T.length+x.length>this.options.limit){[...R,...O].forEach(M=>{M.element.detach(),M.element.dispose()}),x=x.slice(0,this.options.limit-T.length);const L=x.map(M=>new d(M,this.instantiationService.createInstance(g,this.notebookEditor,this.viewCell,this,this.templateData.outputContainer,M)));this._outputEntries=[...T,...L];for(let M=T.length;M<this._outputEntries.length;M++)this._outputEntries[M].element.render(void 0)}else{const L=O.slice(this.options.limit-T.length-x.length);[...R,...L].forEach(B=>{B.element.detach(),B.element.dispose()});let M=T.length+x.length;const N=x.map(B=>new d(B,this.instantiationService.createInstance(g,this.notebookEditor,this.viewCell,this,this.templateData.outputContainer,B)));this._outputEntries=[...T,...N,...O.slice(0,this.options.limit-T.length-x.length)];for(let B=T.length;B<M;B++){const P=B-1>=0&&this._outputEntries[B-1]&&!!this._outputEntries[B-1].element.innerContainer?.parentElement?this._outputEntries[B-1].element.innerContainer:void 0;this._outputEntries[B].element.render(P)}}else{R.forEach(B=>{B.element.detach(),B.element.dispose()});let L=T.length+x.length;const M=x.map(B=>new d(B,this.instantiationService.createInstance(g,this.notebookEditor,this.viewCell,this,this.templateData.outputContainer,B)));let N=[];if(T.length+M.length+O.length<this.viewCell.outputsViewModels.length){const B=Math.min(this.options.limit,this.viewCell.outputsViewModels.length);N=this.viewCell.outputsViewModels.slice(T.length+M.length+O.length,B).map(P=>new d(P,this.instantiationService.createInstance(g,this.notebookEditor,this.viewCell,this,this.templateData.outputContainer,P)))}this._outputEntries=[...T,...M,...O,...N];for(let B=T.length;B<L;B++){const P=B-1>=0&&this._outputEntries[B-1]&&!!this._outputEntries[B-1].element.innerContainer?.parentElement?this._outputEntries[B-1].element.innerContainer:void 0;this._outputEntries[B].element.render(P)}for(let B=0;B<N.length;B++)this._outputEntries[T.length+x.length+O.length+B].element.render(void 0)}this.viewCell.outputsViewModels.length>this.options.limit?(t.show(this.templateData.outputShowMoreContainer.domNode),this.templateData.outputShowMoreContainer.domNode.hasChildNodes()||this.templateData.outputShowMoreContainer.domNode.appendChild(this._generateShowMoreElement(this.templateData.templateDisposables)),this.viewCell.updateOutputShowMoreContainerHeight(46)):t.hide(this.templateData.outputShowMoreContainer.domNode);const F=this.templateData.editor.getContentHeight();this.viewCell.editorHeight=F,this._relayoutCell(),this._validateFinalOutputHeight(this.viewCell.outputsViewModels.length===0)}_generateShowMoreElement(y){const T={value:`There are more than ${this.options.limit} outputs, [show more (open the raw output data in a text editor) ...](command:workbench.action.openLargeOutput)`,isTrusted:!0,supportThemeIcons:!0},R=(0,f.renderMarkdown)(T,{actionHandler:{callback:O=>{O==="command:workbench.action.openLargeOutput"&&this.openerService.open(a.CellUri.generateCellOutputUri(this.notebookEditor.textModel.uri))},disposables:y}});return y.add(R),R.element.classList.add("output-show-more"),R.element}_relayoutCell(){this.notebookEditor.layoutNotebookCell(this.viewCell,this.viewCell.layoutInfo.totalHeight)}dispose(){this.viewCell.updateOutputMinHeight(0),this._outputHeightTimer&&clearTimeout(this._outputHeightTimer),this._outputEntries.forEach(y=>{y.element.dispose()}),super.dispose()}};m=Ee([W(4,i.IOpenerService),W(5,o.IInstantiationService)],m),e.CellOutputContainer=m;const b=["application/geo+json","application/vdom.v1+json","application/vnd.dataresource+json","application/vnd.plotly.v1+json","application/vnd.vega.v2+json","application/vnd.vega.v3+json","application/vnd.vega.v4+json","application/vnd.vega.v5+json","application/vnd.vegalite.v1+json","application/vnd.vegalite.v2+json","application/vnd.vegalite.v3+json","application/vnd.vegalite.v4+json","application/x-nteract-model-debug+json","image/svg+xml","text/latex","text/vnd.plotly.v1+html","application/vnd.jupyter.widget-view+json","application/vnd.code.notebook.error"]}),define(ne[2490],re([1,0,10,11,30,33,6,2,42,308,1654,8,5,38,41,104,606,2489,2180,357,158]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeCell=void 0;let a=class extends D.Disposable{constructor(h,g,d,m,b,E,y,T,R,O){super();this.notebookEditor=h,this.viewCell=g,this.templateData=d,this.instantiationService=m,this.notebookCellStatusBarService=b,this.keybindingService=E,this.openerService=y,this.languageService=T,this.configurationService=R,this._isDisposed=!1;const x=this._register(new s.CellEditorOptions(this.notebookEditor,this.notebookEditor.notebookOptions,this.configurationService,this.viewCell.language));this._outputContainerRenderer=this.instantiationService.createInstance(l.CellOutputContainer,h,g,d,{limit:500}),this.cellParts=[...d.cellParts,x,this._outputContainerRenderer];const F=this.calculateInitEditorHeight();this.initializeEditor(F),this.registerViewCellLayoutChange(),this.registerCellEditorEventListeners(),this.registerDecorations(),this.registerMouseListener(),this._register(O.onDidChangeCellExecution(M=>{M.affectsCell(this.viewCell.uri)&&this.cellParts.forEach(N=>{N.updateForExecutionState(this.viewCell,M)})})),this._register(this.viewCell.onDidChangeState(M=>{if(this.cellParts.forEach(N=>{N.updateState(this.viewCell,M)}),M.outputIsHoveredChanged&&this.updateForOutputHover(),M.outputIsFocusedChanged&&this.updateForOutputFocus(),(M.metadataChanged||M.internalMetadataChanged)&&this.updateEditorOptions(),M.inputCollapsedChanged||M.outputCollapsedChanged){this.viewCell.pauseLayout();const N=this.updateForCollapseState();this.viewCell.resumeLayout(),N&&this.relayoutCell()}M.focusModeChanged&&this.updateEditorForFocusModeChange()})),this.cellParts.forEach(M=>M.renderCell(this.viewCell)),this._register((0,D.toDisposable)(()=>{this.cellParts.forEach(M=>M.unrenderCell(this.viewCell))})),this.updateEditorOptions(),this.updateEditorForFocusModeChange(),this.updateForOutputHover(),this.updateForOutputFocus(),this._outputContainerRenderer.render(F),this.viewCell.isOutputCollapsed===void 0&&this.viewCell.isInputCollapsed===void 0&&(this.initialViewUpdateExpanded(),this.viewCell.layoutChange({})),this._register(this.viewCell.onLayoutInfoRead(()=>{this.cellParts.forEach(M=>M.prepareLayout())}));const L=t.append(this.templateData.cellInputCollapsedContainer,t.$(".collapsed-execution-icon"));this._register((0,D.toDisposable)(()=>{L.parentElement?.removeChild(L)})),this._collapsedExecutionIcon=this._register(this.instantiationService.createInstance(r.CollapsedCodeCellExecutionIcon,this.notebookEditor,this.viewCell,L)),this.updateForCollapseState(),this._register(k.Event.runAndSubscribe(g.onDidChangeOutputs,this.updateForOutputs.bind(this))),this._register(k.Event.runAndSubscribe(g.onDidChangeLayout,this.updateForLayout.bind(this))),this._register(x.onDidChange(()=>d.editor.updateOptions(x.getUpdatedValue(this.viewCell.internalMetadata,this.viewCell.uri)))),d.editor.updateOptions(x.getUpdatedValue(this.viewCell.internalMetadata,this.viewCell.uri)),x.setLineNumbers(this.viewCell.lineNumbers)}updateForLayout(){this._pendingLayout?.dispose(),this._pendingLayout=t.modify(()=>{this.cellParts.forEach(h=>{h.updateInternalLayoutNow(this.viewCell)})})}updateForOutputHover(){this.templateData.container.classList.toggle("cell-output-hover",this.viewCell.outputIsHovered)}updateForOutputFocus(){this.templateData.container.classList.toggle("cell-output-focus",this.viewCell.outputIsFocused)}calculateInitEditorHeight(){const h=this.viewCell.lineCount,g=this.viewCell.layoutInfo.fontInfo?.lineHeight||17,d=this.notebookEditor.notebookOptions.computeEditorPadding(this.viewCell.internalMetadata,this.viewCell.uri);return this.viewCell.layoutInfo.editorHeight===0?h*g+d.top+d.bottom:this.viewCell.layoutInfo.editorHeight}initializeEditor(h){const g=this.viewCell.layoutInfo.editorWidth;this.layoutEditor({width:g,height:h});const d=new _.CancellationTokenSource;this._register({dispose(){d.dispose(!0)}}),(0,f.raceCancellation)(this.viewCell.resolveTextModel(),d.token).then(m=>{if(!this._isDisposed&&m&&this.templateData.editor){this.templateData.editor.setModel(m),this.viewCell.attachTextEditor(this.templateData.editor);const b=()=>{this.notebookEditor.getActiveCell()===this.viewCell&&this.viewCell.focusMode===S.CellFocusMode.Editor&&(this.notebookEditor.hasEditorFocus()||document.activeElement===document.body)&&this.templateData.editor?.focus()};b();const E=this.templateData.editor?.getContentHeight();E!==void 0&&E!==h&&this.onCellEditorHeightChange(E),b()}})}updateForOutputs(){this.viewCell.outputsViewModels.length?t.show(this.templateData.focusSinkElement):t.hide(this.templateData.focusSinkElement)}updateEditorOptions(){const h=this.templateData.editor;if(!h)return;const g=this.notebookEditor.isReadOnly,d=this.notebookEditor.notebookOptions.computeEditorPadding(this.viewCell.internalMetadata,this.viewCell.uri),m=h.getOptions();(m.get(81)!==g||m.get(75)!==d)&&h.updateOptions({readOnly:this.notebookEditor.isReadOnly,padding:this.notebookEditor.notebookOptions.computeEditorPadding(this.viewCell.internalMetadata,this.viewCell.uri)})}registerViewCellLayoutChange(){this._register(this.viewCell.onDidChangeLayout(h=>{h.outerWidth!==void 0&&this.templateData.editor.getLayoutInfo().width!==this.viewCell.layoutInfo.editorWidth&&this.onCellWidthChange(),h.totalHeight&&this.relayoutCell()}))}registerCellEditorEventListeners(){this._register(this.templateData.editor.onDidContentSizeChange(h=>{h.contentHeightChanged&&this.viewCell.layoutInfo.editorHeight!==h.contentHeight&&this.onCellEditorHeightChange(h.contentHeight)})),this._register(this.templateData.editor.onDidChangeCursorSelection(h=>{if(h.source==="restoreState")return;const g=this.templateData.editor.getSelections();if(g?.length){const d=g[g.length-1];this.notebookEditor.revealLineInViewAsync(this.viewCell,d.positionLineNumber)}}))}registerDecorations(){this._register(this.viewCell.onCellDecorationsChanged(h=>{h.added.forEach(g=>{g.className&&this.templateData.rootContainer.classList.add(g.className),g.outputClassName&&this.notebookEditor.deltaCellOutputContainerClassNames(this.viewCell.id,[g.outputClassName],[])}),h.removed.forEach(g=>{g.className&&this.templateData.rootContainer.classList.remove(g.className),g.outputClassName&&this.notebookEditor.deltaCellOutputContainerClassNames(this.viewCell.id,[],[g.outputClassName])})})),this.viewCell.getCellDecorations().forEach(h=>{h.className&&this.templateData.rootContainer.classList.add(h.className),h.outputClassName&&this.notebookEditor.deltaCellOutputContainerClassNames(this.viewCell.id,[h.outputClassName],[])})}registerMouseListener(){this._register(this.templateData.editor.onMouseDown(h=>{h.event.rightButton&&h.event.preventDefault()}))}updateEditorForFocusModeChange(){this.viewCell.focusMode===S.CellFocusMode.Editor&&this.notebookEditor.getActiveCell()===this.viewCell&&this.templateData.editor?.focus(),this.templateData.container.classList.toggle("cell-editor-focus",this.viewCell.focusMode===S.CellFocusMode.Editor)}updateForCollapseState(){return this.viewCell.isOutputCollapsed===this._renderedOutputCollapseState&&this.viewCell.isInputCollapsed===this._renderedInputCollapseState?!1:(this.viewCell.layoutChange({editorHeight:!0}),this.viewCell.isInputCollapsed?this._collapseInput():this._showInput(),this.viewCell.isOutputCollapsed?this._collapseOutput():this._showOutput(!1),this.relayoutCell(),this._renderedOutputCollapseState=this.viewCell.isOutputCollapsed,this._renderedInputCollapseState=this.viewCell.isInputCollapsed,!0)}_collapseInput(){t.hide(this.templateData.editorPart),this.templateData.container.classList.toggle("input-collapsed",!0),this._removeInputCollapsePreview(),this._collapsedExecutionIcon.setVisibility(!0);const h=this._getRichText(this.viewCell.textBuffer,this.viewCell.language),g=t.$("div.cell-collapse-preview");t.safeInnerHtml(g,h),this.templateData.cellInputCollapsedContainer.appendChild(g);const d=t.$("span.expandInputIcon"),m=this.keybindingService.lookupKeybinding(S.EXPAND_CELL_INPUT_COMMAND_ID);m&&(g.title=(0,v.localize)(0,null,m.getLabel()),d.title=(0,v.localize)(1,null,m.getLabel())),d.classList.add(...A.CSSIcon.asClassNameArray(A.Codicon.more)),g.appendChild(d),t.show(this.templateData.cellInputCollapsedContainer)}_showInput(){this._collapsedExecutionIcon.setVisibility(!1),t.show(this.templateData.editorPart),t.hide(this.templateData.cellInputCollapsedContainer)}_getRichText(h,g){return(0,w.tokenizeToStringSync)(this.languageService,h.getLineContent(1),g)}_removeInputCollapsePreview(){const h=this.templateData.cellInputCollapsedContainer.children,g=[];for(let d=0;d<h.length;d++)h[d].classList.contains("cell-collapse-preview")&&g.push(h[d]);g.forEach(d=>{d.parentElement?.removeChild(d)})}_updateOutputInnerContainer(h){const g=this.templateData.outputContainer.domNode.children;for(let d=0;d<g.length;d++)g[d].classList.contains("output-inner-container")&&(h?t.hide(g[d]):t.show(g[d]))}_collapseOutput(){this.templateData.container.classList.toggle("output-collapsed",!0),t.show(this.templateData.cellOutputCollapsedContainer),this._updateOutputInnerContainer(!0),this._outputContainerRenderer.viewUpdateHideOuputs()}_showOutput(h){this.templateData.container.classList.toggle("output-collapsed",!1),t.hide(this.templateData.cellOutputCollapsedContainer),this._updateOutputInnerContainer(!1),this._outputContainerRenderer.viewUpdateShowOutputs(h)}initialViewUpdateExpanded(){this.templateData.container.classList.toggle("input-collapsed",!1),this._showInput(),this.templateData.container.classList.toggle("output-collapsed",!1),this._showOutput(!0),this.relayoutCell()}layoutEditor(h){this.templateData.editor?.layout(h)}onCellWidthChange(){if(!this.templateData.editor.hasModel())return;const h=this.templateData.editor.getContentHeight();this.viewCell.editorHeight=h,this.relayoutCell(),this.layoutEditor({width:this.viewCell.layoutInfo.editorWidth,height:h})}onCellEditorHeightChange(h){const g=this.templateData.editor.getLayoutInfo();this.viewCell.editorHeight=h,this.relayoutCell(),this.layoutEditor({width:g.width,height:h})}relayoutCell(){this.notebookEditor.layoutNotebookCell(this.viewCell,this.viewCell.layoutInfo.totalHeight)}dispose(){this._isDisposed=!0,this.notebookEditor.getActiveCell()===this.viewCell&&this.viewCell.focusMode===S.CellFocusMode.Editor&&this.notebookEditor.focusContainer(),this.viewCell.detachTextEditor(),this._removeInputCollapsePreview(),this._outputContainerRenderer.dispose(),this._pendingLayout?.dispose(),super.dispose()}};a=Ee([W(3,o.IInstantiationService),W(4,p.INotebookCellStatusBarService),W(5,c.IKeybindingService),W(6,i.IOpenerService),W(7,I.ILanguageService),W(8,C.IConfigurationService),W(9,u.INotebookExecutionStateService)],a),e.CodeCell=a}),define(ne[2491],re([1,0,1690,53,245,43,201,105,7,102,29,13,38,16,70,88]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickAccessViewPickerAction=e.OpenViewPickerAction=e.ViewQuickAccessProvider=void 0;let s=class ea extends _.PickerQuickAccessProvider{constructor(u,a,n,h,g,d,m){super(ea.PREFIX,{noResultsPick:{label:(0,t.localize)(0,null),containerLabel:""}});this.viewDescriptorService=u,this.viewsService=a,this.outputService=n,this.terminalService=h,this.terminalGroupService=g,this.paneCompositeService=d,this.contextKeyService=m}_getPicks(u){const a=this.doGetViewPickItems().filter(d=>u?(d.highlights={label:(0,C.withNullAsUndefined)((0,w.matchesFuzzy)(u,d.label,!0))},d.highlights.label||(0,v.fuzzyContains)(d.containerLabel,u)):!0),n=new Map;for(const d of a)n.has(d.label)||n.set(d.label,d.containerLabel);const h=[];let g;for(const d of a){if(g!==d.containerLabel){g=d.containerLabel;let m;n.has(g)?m=`${n.get(g)} / ${g}`:m=g,h.push({type:"separator",label:m})}h.push(d)}return h}doGetViewPickItems(){const u=[],a=(d,m)=>{const b=this.viewDescriptorService.getViewContainerModel(m),E=[];for(const y of b.allViewDescriptors)this.contextKeyService.contextMatchesRules(y.when)&&E.push({label:y.name,containerLabel:b.title,accept:()=>this.viewsService.openView(y.id,!0)});return E},n=(d,m)=>{const b=this.paneCompositeService.getPaneComposites(d),E=this.paneCompositeService.getVisiblePaneCompositeIds(d);b.sort((y,T)=>{let R=E.findIndex(x=>y.id===x),O=E.findIndex(x=>T.id===x);return R<0&&(R=b.indexOf(y)+E.length),O<0&&(O=b.indexOf(T)+E.length),R-O});for(const y of b)if(this.includeViewContainer(y)){const T=this.viewDescriptorService.getViewContainerById(y.id);T&&u.push({label:this.viewDescriptorService.getViewContainerModel(T).title,containerLabel:m,accept:()=>this.paneCompositeService.openPaneComposite(y.id,d,!0)})}};n(0,(0,t.localize)(1,null)),n(1,(0,t.localize)(2,null)),n(2,(0,t.localize)(3,null));const h=d=>{const m=this.paneCompositeService.getPaneComposites(d);for(const b of m){const E=this.viewDescriptorService.getViewContainerById(b.id);E&&u.push(...a(b,E))}};h(0),h(1),h(2),this.terminalGroupService.groups.forEach((d,m)=>{d.terminalInstances.forEach((b,E)=>{const y=(0,t.localize)(4,null,`${m+1}.${E+1}`,b.title);u.push({label:y,containerLabel:(0,t.localize)(5,null),accept:async()=>{await this.terminalGroupService.showPanel(!0),this.terminalService.setActiveInstance(b)}})})});const g=this.outputService.getChannelDescriptors();for(const d of g){const m=d.log?(0,t.localize)(6,null,d.label):d.label;u.push({label:m,containerLabel:(0,t.localize)(7,null),accept:()=>this.outputService.showChannel(d.id)})}return u}includeViewContainer(u){const a=this.viewDescriptorService.getViewContainerById(u.id);return a?.hideIfEmpty?this.viewDescriptorService.getViewContainerModel(a).activeViewDescriptors.length>0:!0}};s.PREFIX="view ",s=Ee([W(0,A.IViewDescriptorService),W(1,A.IViewsService),W(2,k.IOutputService),W(3,D.ITerminalService),W(4,D.ITerminalGroupService),W(5,S.IPaneCompositePartService),W(6,I.IContextKeyService)],s),e.ViewQuickAccessProvider=s;class l extends c.Action2{constructor(){super({id:l.ID,title:{value:(0,t.localize)(8,null),original:"Open View"},category:i.CATEGORIES.View,f1:!0})}async run(u){u.get(f.IQuickInputService).quickAccess.show(s.PREFIX)}}e.OpenViewPickerAction=l,l.ID="workbench.action.openView";class r extends c.Action2{constructor(){super({id:r.ID,title:{value:(0,t.localize)(9,null),original:"Quick Open View"},category:i.CATEGORIES.View,f1:!0,keybinding:{weight:200,when:void 0,...r.KEYBINDING}})}async run(u){const a=u.get(o.IKeybindingService),n=u.get(f.IQuickInputService),h=a.lookupKeybindings(r.ID);n.quickAccess.show(s.PREFIX,{quickNavigateConfiguration:{keybindings:h},itemActivation:f.ItemActivation.FIRST})}}e.QuickAccessViewPickerAction=r,r.ID="workbench.action.quickOpenView",r.KEYBINDING={primary:2048|47,mac:{primary:256|47},linux:{primary:0}}}),define(ne[888],re([1,0,11,6,2,1792,8,5,67,327,330,216,88]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestingProgressUiService=e.TestingProgressTrigger=e.ITestingProgressUiService=void 0,e.ITestingProgressUiService=(0,D.createDecorator)("testingProgressUiService");let c=class extends _.Disposable{constructor(r,p,u,a){super();this.configurationService=u,this.paneCompositeService=a;const n=this._register(new t.RunOnceScheduler(()=>p.update(),200));this._register(r.onResultsChanged(h=>{"started"in h&&this.attachAutoOpenForNewResults(h.started),n.isScheduled()||n.schedule()})),this._register(r.onTestChanged(()=>{n.isScheduled()||n.schedule()}))}attachAutoOpenForNewResults(r){if(r.request.isUiTriggered===!1)return;const p=(0,w.getTestingConfiguration)(this.configurationService,"testing.openTesting");if(p==="neverOpen")return;if(p==="openOnTestStart")return this.openTestView();const u=new _.DisposableStore;u.add(r.onComplete(()=>u.dispose())),u.add(r.onChange(a=>{a.reason===3&&(0,v.isFailedState)(a.item.ownComputedState)&&(this.openTestView(),u.dispose())}))}openTestView(){this.paneCompositeService.openPaneComposite("workbench.view.extension.test",0)}};c=Ee([W(0,C.ITestResultService),W(1,e.ITestingProgressUiService),W(2,k.IConfigurationService),W(3,o.IPaneCompositePartService)],c),e.TestingProgressTrigger=c;let i=class extends _.Disposable{constructor(r,p){super();this.resultService=r,this.instantiaionService=p,this.windowProg=this._register(new _.MutableDisposable),this.testViewProg=this._register(new _.MutableDisposable),this.updateCountsEmitter=new f.Emitter,this.updateTextEmitter=new f.Emitter,this.lastRunSoFar=0,this.onCountChange=this.updateCountsEmitter.event,this.onTextChange=this.updateTextEmitter.event}update(){const r=this.resultService.results,p=r.filter(n=>n.completedAt===void 0);if(!p.length){if(r.length){const n=S(!1,r[0].counts);this.updateCountsEmitter.fire(n),this.updateTextEmitter.fire(s(!1,n))}else this.updateTextEmitter.fire(""),this.updateCountsEmitter.fire(S(!1));this.windowProg.clear(),this.testViewProg.clear(),this.lastRunSoFar=0;return}this.windowProg.value||(this.windowProg.value=this.instantiaionService.createInstance(I.UnmanagedProgress,{location:10}),this.testViewProg.value=this.instantiaionService.createInstance(I.UnmanagedProgress,{location:"workbench.view.extension.test",total:100}));const u=S(!0,...p.map(n=>n.counts));this.updateCountsEmitter.fire(u);const a=s(!0,u);this.updateTextEmitter.fire(a),this.windowProg.value.report({message:a}),this.testViewProg.value.report({increment:u.runSoFar-this.lastRunSoFar,total:u.totalWillBeRun}),this.lastRunSoFar=u.runSoFar}};i=Ee([W(0,C.ITestResultService),W(1,D.IInstantiationService)],i),e.TestingProgressUiService=i;const S=(l,...r)=>{let p=0,u=0,a=0,n=0,h=0;for(const g of r)u+=g[6]+g[4],p+=g[3],a+=g[5],n+=g[2],h+=g[1];return{isRunning:l,passed:p,failed:u,runSoFar:p+u,totalWillBeRun:p+u+h+n,skipped:a}},s=(l,{passed:r,runSoFar:p,totalWillBeRun:u,skipped:a,failed:n})=>{let h=r/p*100;return n>0?h=Math.min(h,99.9):p===0&&(h=0),l?p===0?(0,A.localize)(0,null):a===0?(0,A.localize)(1,null,r,u,h.toPrecision(3)):(0,A.localize)(2,null,r,u,h.toPrecision(3),a):a===0?(0,A.localize)(3,null,r,p,h.toPrecision(3)):(0,A.localize)(4,null,r,p,h.toPrecision(3),a)}}),define(ne[2492],re([1,0,217,2,35,43,777,6,5,88]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActivityService=void 0;let v=class extends f.Disposable{constructor(c,i,S){super();this.viewId=c,this.viewDescriptorService=i,this.activityService=S,this.activity=void 0,this.activityDisposable=f.Disposable.None,this._register(D.Event.filter(this.viewDescriptorService.onDidChangeContainer,s=>s.views.some(l=>l.id===c))(()=>this.update())),this._register(D.Event.filter(this.viewDescriptorService.onDidChangeLocation,s=>s.views.some(l=>l.id===c))(()=>this.update()))}setActivity(c){this.activity=c,this.update()}clearActivity(){this.activity=void 0,this.update()}update(){this.activityDisposable.dispose();const c=this.viewDescriptorService.getViewContainerByViewId(this.viewId);c&&this.activity&&(this.activityDisposable=this.activityService.showViewContainerActivity(c.id,this.activity))}dispose(){this.activityDisposable.dispose()}};v=Ee([W(1,A.IViewDescriptorService),W(2,t.IActivityService)],v);let C=class{constructor(c,i,S){this.paneCompositeService=c,this.viewDescriptorService=i,this.instantiationService=S,this.viewActivities=new Map}showViewContainerActivity(c,{badge:i,clazz:S,priority:s}){const l=this.viewDescriptorService.getViewContainerById(c);if(l){const r=this.viewDescriptorService.getViewContainerLocation(l);if(r!==null)return this.paneCompositeService.showActivity(l.id,r,i,S,s)}return f.Disposable.None}showViewActivity(c,i){let S=this.viewActivities.get(c);S?S.id++:(S={id:1,activity:this.instantiationService.createInstance(v,c)},this.viewActivities.set(c,S));const s=S.id;S.activity.setActivity(i);const l=S;return(0,f.toDisposable)(()=>{l.id===s&&(l.activity.dispose(),this.viewActivities.delete(c))})}showAccountsActivity({badge:c,clazz:i,priority:S}){return this.paneCompositeService.showActivity(k.ACCOUNTS_ACTIVITY_ID,0,c,i,S)}showGlobalActivity({badge:c,clazz:i,priority:S}){return this.paneCompositeService.showActivity(k.GLOBAL_ACTIVITY_ID,0,c,i,S)}};C=Ee([W(0,w.IPaneCompositePartService),W(1,A.IViewDescriptorService),W(2,I.IInstantiationService)],C),e.ActivityService=C,(0,_.registerSingleton)(t.IActivityService,C,!0)}),define(ne[889],re([1,0,1890,15,29,14,102,17,309,16,70,265,38,465,873]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingsEditorModel=e.KEYBINDING_ENTRY_TEMPLATE_ID=void 0,e.KEYBINDING_ENTRY_TEMPLATE_ID="keybinding.entry.template";const S=(0,t.localize)(0,null),s=(0,t.localize)(1,null),l=(0,t.localize)(2,null),r=(0,k.or)(k.matchesPrefix,k.matchesWords,k.matchesContiguousSubString);let p=class ii extends C.EditorModel{constructor(n,h){super();this.keybindingsService=h,this._keybindingItems=[],this._keybindingItemsSortedByPrecedence=[],this.modifierLabels={ui:I.UILabelProvider.modifierLabels[n],aria:I.AriaLabelProvider.modifierLabels[n],user:I.UserSettingsLabelProvider.modifierLabels[n]}}fetch(n,h=!1){let g=h?this._keybindingItemsSortedByPrecedence:this._keybindingItems;const d=/@command:\s*(.+)/i.exec(n);if(d&&d[1])return g.filter(m=>m.command===d[1]).map(m=>({id:ii.getId(m),keybindingItem:m,templateId:e.KEYBINDING_ENTRY_TEMPLATE_ID}));if(/@source:\s*(user|default|extension)/i.test(n))g=this.filterBySource(g,n),n=n.replace(/@source:\s*(user|default|extension)/i,"");else{const m=/@keybinding:\s*((\".+\")|(\S+))/i.exec(n);m&&(m[2]||m[3])&&(n=m[2]||`"${m[3]}"`)}return n=n.trim(),n?this.filterByText(g,n):g.map(m=>({id:ii.getId(m),keybindingItem:m,templateId:e.KEYBINDING_ENTRY_TEMPLATE_ID}))}filterBySource(n,h){return/@source:\s*default/i.test(h)?n.filter(g=>g.source===S):/@source:\s*user/i.test(h)?n.filter(g=>g.source===l):/@source:\s*extension/i.test(h)?n.filter(g=>g.source===s):n}filterByText(n,h){const g=h.charAt(0)==='"',d=h.charAt(h.length-1)==='"',m=g&&d;g&&(h=h.substring(1)),d&&(h=h.substring(0,h.length-1)),h=h.trim();const b=[],E=h.split(" "),y=this.splitKeybindingWords(E);for(const T of n){const R=new u(this.modifierLabels,T,h,E,y,m);(R.commandIdMatches||R.commandLabelMatches||R.commandDefaultLabelMatches||R.sourceMatches||R.whenMatches||R.keybindingMatches)&&b.push({id:ii.getId(T),templateId:e.KEYBINDING_ENTRY_TEMPLATE_ID,commandLabelMatches:R.commandLabelMatches||void 0,commandDefaultLabelMatches:R.commandDefaultLabelMatches||void 0,keybindingItem:T,keybindingMatches:R.keybindingMatches||void 0,commandIdMatches:R.commandIdMatches||void 0,sourceMatches:R.sourceMatches||void 0,whenMatches:R.whenMatches||void 0})}return b}splitKeybindingWords(n){const h=[];for(const g of n)h.push(...(0,f.coalesce)(g.split("+")));return h}async resolve(n=new Map){const h=D.Registry.as(v.Extensions.WorkbenchActions);this._keybindingItemsSortedByPrecedence=[];const g=new Map;for(const m of this.keybindingsService.getKeybindings())m.command&&(this._keybindingItemsSortedByPrecedence.push(ii.toKeybindingEntry(m.command,m,h,n)),g.set(m.command,!0));const d=this.keybindingsService.getDefaultKeybindings().map(m=>m.command);for(const m of(0,i.getAllUnboundCommands)(g)){const b=new c.ResolvedKeybindingItem(void 0,m,null,void 0,d.indexOf(m)===-1,null,!1);this._keybindingItemsSortedByPrecedence.push(ii.toKeybindingEntry(m,b,h,n))}return this._keybindingItemsSortedByPrecedence=(0,f.distinct)(this._keybindingItemsSortedByPrecedence,m=>ii.getId(m)),this._keybindingItems=this._keybindingItemsSortedByPrecedence.slice(0).sort((m,b)=>ii.compareKeybindingData(m,b)),super.resolve()}static getId(n){return n.command+(n.keybinding?n.keybinding.getAriaLabel():"")+n.source+n.when}static compareKeybindingData(n,h){return n.keybinding&&!h.keybinding?-1:h.keybinding&&!n.keybinding?1:n.commandLabel&&!h.commandLabel?-1:h.commandLabel&&!n.commandLabel?1:n.commandLabel&&h.commandLabel&&n.commandLabel!==h.commandLabel?n.commandLabel.localeCompare(h.commandLabel):n.command===h.command?n.keybindingItem.isDefault?1:-1:n.command.localeCompare(h.command)}static toKeybindingEntry(n,h,g,d){const m=w.MenuRegistry.getCommand(n),b=d.get(n);return{keybinding:h.resolvedKeybinding,keybindingItem:h,command:n,commandLabel:ii.getCommandLabel(m,b),commandDefaultLabel:ii.getCommandDefaultLabel(m,g),when:h.when?h.when.serialize():"",source:h.extensionId?h.isBuiltinExtension?S:s:h.isDefault?S:l}}static getCommandDefaultLabel(n,h){if(!A.Language.isDefaultVariant()&&n&&n.title&&n.title.original){const g=n.category?n.category.original:void 0,d=n.title.original;return g?(0,t.localize)(3,null,g,d):d}return null}static getCommandLabel(n,h){if(n){const g=n.category?typeof n.category=="string"?n.category:n.category.value:void 0,d=typeof n.title=="string"?n.title:n.title.value;return g?(0,t.localize)(4,null,g,d):d}return h||""}};p=Ee([W(1,o.IKeybindingService)],p),e.KeybindingsEditorModel=p;class u{constructor(n,h,g,d,m,b){this.modifierLabels=n,this.commandIdMatches=null,this.commandLabelMatches=null,this.commandDefaultLabelMatches=null,this.sourceMatches=null,this.whenMatches=null,this.keybindingMatches=null,b||(this.commandIdMatches=this.matches(g,h.command,(0,k.or)(k.matchesWords,k.matchesCamelCase),d),this.commandLabelMatches=h.commandLabel?this.matches(g,h.commandLabel,(E,y)=>(0,k.matchesWords)(E,h.commandLabel,!0),d):null,this.commandDefaultLabelMatches=h.commandDefaultLabel?this.matches(g,h.commandDefaultLabel,(E,y)=>(0,k.matchesWords)(E,h.commandDefaultLabel,!0),d):null,this.sourceMatches=this.matches(g,h.source,(E,y)=>(0,k.matchesWords)(E,h.source,!0),d),this.whenMatches=h.when?this.matches(null,h.when,(0,k.or)(k.matchesWords,k.matchesCamelCase),d):null),this.keybindingMatches=h.keybinding?this.matchesKeybinding(h.keybinding,g,m,b):null}matches(n,h,g,d){let m=n?r(n,h):null;return m||(m=this.matchesWords(d,h,g)),m&&(m=this.filterAndSort(m)),m}matchesWords(n,h,g){let d=[];for(const m of n){const b=g(m,h);if(b)d=[...d||[],...b];else{d=null;break}}return d}filterAndSort(n){return(0,f.distinct)(n,h=>h.start+"."+h.end).filter(h=>!n.some(g=>!(g.start===h.start&&g.end===h.end)&&g.start<=h.start&&g.end>=h.end)).sort((h,g)=>h.start-g.start)}matchesKeybinding(n,h,g,d){const[m,b]=n.getParts(),E=n.getUserSettingsLabel(),y=n.getAriaLabel(),T=n.getLabel();if(E&&_.compareIgnoreCase(h,E)===0||y&&_.compareIgnoreCase(h,y)===0||T&&_.compareIgnoreCase(h,T)===0)return{firstPart:this.createCompleteMatch(m),chordPart:this.createCompleteMatch(b)};const R={};let O={};const x=[],F=[];let L=[],M=!0;for(let N=0;N<g.length;N++){const B=g[N];let P=!1,V=!1;M=M&&!R.keyCode;let z=!O.keyCode;if(M&&(P=this.matchPart(m,R,B,d),R.keyCode)){for(const U of L)F.indexOf(U)===-1&&x.splice(x.indexOf(U),1);O={},L=[],z=!1}z&&(V=this.matchPart(b,O,B,d)),P&&F.push(N),V&&L.push(N),(P||V)&&x.push(N),M=M&&this.isModifier(B)}return x.length!==g.length||d&&(!this.isCompleteMatch(m,R)||!this.isCompleteMatch(b,O))?null:this.hasAnyMatch(R)||this.hasAnyMatch(O)?{firstPart:R,chordPart:O}:null}matchPart(n,h,g,d){let m=!1;return this.matchesMetaModifier(n,g)&&(m=!0,h.metaKey=!0),this.matchesCtrlModifier(n,g)&&(m=!0,h.ctrlKey=!0),this.matchesShiftModifier(n,g)&&(m=!0,h.shiftKey=!0),this.matchesAltModifier(n,g)&&(m=!0,h.altKey=!0),this.matchesKeyCode(n,g,d)&&(h.keyCode=!0,m=!0),m}matchesKeyCode(n,h,g){if(!n)return!1;const d=n.keyAriaLabel||"";if(g||d.length===1||h.length===1){if(_.compareIgnoreCase(d,h)===0)return!0}else if((0,k.matchesContiguousSubString)(h,d))return!0;return!1}matchesMetaModifier(n,h){return!n||!n.metaKey?!1:this.wordMatchesMetaModifier(h)}matchesCtrlModifier(n,h){return!n||!n.ctrlKey?!1:this.wordMatchesCtrlModifier(h)}matchesShiftModifier(n,h){return!n||!n.shiftKey?!1:this.wordMatchesShiftModifier(h)}matchesAltModifier(n,h){return!n||!n.altKey?!1:this.wordMatchesAltModifier(h)}hasAnyMatch(n){return!!n.altKey||!!n.ctrlKey||!!n.metaKey||!!n.shiftKey||!!n.keyCode}isCompleteMatch(n,h){return n?!(!h.keyCode||n.metaKey&&!h.metaKey||n.altKey&&!h.altKey||n.ctrlKey&&!h.ctrlKey||n.shiftKey&&!h.shiftKey):!0}createCompleteMatch(n){const h={};return n&&(h.keyCode=!0,n.metaKey&&(h.metaKey=!0),n.altKey&&(h.altKey=!0),n.ctrlKey&&(h.ctrlKey=!0),n.shiftKey&&(h.shiftKey=!0)),h}isModifier(n){return!!(this.wordMatchesAltModifier(n)||this.wordMatchesCtrlModifier(n)||this.wordMatchesMetaModifier(n)||this.wordMatchesShiftModifier(n))}wordMatchesAltModifier(n){return!!(_.equalsIgnoreCase(this.modifierLabels.ui.altKey,n)||_.equalsIgnoreCase(this.modifierLabels.aria.altKey,n)||_.equalsIgnoreCase(this.modifierLabels.user.altKey,n)||_.equalsIgnoreCase((0,t.localize)(5,null),n))}wordMatchesCtrlModifier(n){return!!(_.equalsIgnoreCase(this.modifierLabels.ui.ctrlKey,n)||_.equalsIgnoreCase(this.modifierLabels.aria.ctrlKey,n)||_.equalsIgnoreCase(this.modifierLabels.user.ctrlKey,n))}wordMatchesMetaModifier(n){return!!(_.equalsIgnoreCase(this.modifierLabels.ui.metaKey,n)||_.equalsIgnoreCase(this.modifierLabels.aria.metaKey,n)||_.equalsIgnoreCase(this.modifierLabels.user.metaKey,n)||_.equalsIgnoreCase((0,t.localize)(6,null),n))}wordMatchesShiftModifier(n){return!!(_.equalsIgnoreCase(this.modifierLabels.ui.shiftKey,n)||_.equalsIgnoreCase(this.modifierLabels.aria.shiftKey,n)||_.equalsIgnoreCase(this.modifierLabels.user.shiftKey,n))}}}),define(ne[617],re([1,0,14,1889,5,174,889]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingsEditorInput=void 0;let D=class Br extends A.EditorInput{constructor(w){super();this.searchOptions=null,this.resource=void 0,this.keybindingsModel=w.createInstance(k.KeybindingsEditorModel,t.OS)}get typeId(){return Br.ID}getName(){return f.localize(0,null)}async resolve(){return this.keybindingsModel}matches(w){return super.matches(w)||w instanceof Br}dispose(){this.keybindingsModel.dispose(),super.dispose()}};D.ID="workbench.input.keybindings",D=Ee([W(0,_.IInstantiationService)],D),e.KeybindingsEditorInput=D}),define(ne[108],re([1,0,132,5]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.USE_SPLIT_JSON_SETTING=e.DEFAULT_SETTINGS_EDITOR_SETTING=e.FOLDER_SETTINGS_PATH=e.IPreferencesService=e.validateSettingsEditorOptions=e.SettingMatchType=e.SettingValueType=void 0;var _;(function(D){D.Null="null",D.Enum="enum",D.String="string",D.MultilineString="multiline-string",D.Integer="integer",D.Number="number",D.Boolean="boolean",D.Array="array",D.Exclude="exclude",D.Complex="complex",D.NullableInteger="nullable-integer",D.NullableNumber="nullable-number",D.Object="object",D.BooleanObject="boolean-object",D.LanguageTag="language-tag"})(_=e.SettingValueType||(e.SettingValueType={}));var A;(function(D){D[D.None=0]="None",D[D.WholeWordMatch=1]="WholeWordMatch",D[D.KeyMatch=2]="KeyMatch"})(A=e.SettingMatchType||(e.SettingMatchType={}));function k(D){return{...D,override:t.EditorResolution.DISABLED,pinned:!0}}e.validateSettingsEditorOptions=k,e.IPreferencesService=(0,f.createDecorator)("preferencesService"),e.FOLDER_SETTINGS_PATH=".vscode/settings.json",e.DEFAULT_SETTINGS_EDITOR_SETTING="workbench.settings.openDefaultSettings",e.USE_SPLIT_JSON_SETTING="workbench.settings.useSplitJSON"}),define(ne[618],re([1,0,1422,16,12,213,7,36,10,38,14,8,6,2,189,11,82,45,264,24,26,108,50,1218,545,68,111,98,80,77,69,223,141,28,27,299]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomMenubarControl=e.MenubarControl=void 0,f.MenuRegistry.appendMenuItem(f.MenuId.MenubarMainMenu,{submenu:f.MenuId.MenubarFileMenu,title:{value:"File",original:"File",mnemonicTitle:(0,t.localize)(0,null)},order:1}),f.MenuRegistry.appendMenuItem(f.MenuId.MenubarMainMenu,{submenu:f.MenuId.MenubarEditMenu,title:{value:"Edit",original:"Edit",mnemonicTitle:(0,t.localize)(1,null)},order:2}),f.MenuRegistry.appendMenuItem(f.MenuId.MenubarMainMenu,{submenu:f.MenuId.MenubarSelectionMenu,title:{value:"Selection",original:"Selection",mnemonicTitle:(0,t.localize)(2,null)},order:3}),f.MenuRegistry.appendMenuItem(f.MenuId.MenubarMainMenu,{submenu:f.MenuId.MenubarViewMenu,title:{value:"View",original:"View",mnemonicTitle:(0,t.localize)(3,null)},order:4}),f.MenuRegistry.appendMenuItem(f.MenuId.MenubarMainMenu,{submenu:f.MenuId.MenubarGoMenu,title:{value:"Go",original:"Go",mnemonicTitle:(0,t.localize)(4,null)},order:5}),f.MenuRegistry.appendMenuItem(f.MenuId.MenubarMainMenu,{submenu:f.MenuId.MenubarTerminalMenu,title:{value:"Terminal",original:"Terminal",mnemonicTitle:(0,t.localize)(5,null)},order:7,when:k.ContextKeyExpr.has("terminalProcessSupported")}),f.MenuRegistry.appendMenuItem(f.MenuId.MenubarMainMenu,{submenu:f.MenuId.MenubarHelpMenu,title:{value:"Help",original:"Help",mnemonicTitle:(0,t.localize)(6,null)},order:8}),f.MenuRegistry.appendMenuItem(f.MenuId.MenubarMainMenu,{submenu:f.MenuId.MenubarPreferencesMenu,title:{value:"Preferences",original:"Preferences",mnemonicTitle:(0,t.localize)(7,null)},when:O.IsMacNativeContext,order:9});class M extends c.Disposable{constructor(P,V,z,U,H,K,G,q,Z,j,X,Y,$,J){super();this.menuService=P,this.workspacesService=V,this.contextKeyService=z,this.keybindingService=U,this.configurationService=H,this.labelService=K,this.updateService=G,this.storageService=q,this.notificationService=Z,this.preferencesService=j,this.environmentService=X,this.accessibilityService=Y,this.hostService=$,this.commandService=J,this.keys=["window.menuBarVisibility","window.enableMenuBarMnemonics","window.customMenuBarAltFocus","workbench.sideBar.location","window.nativeTabs"],this.menus={},this.topLevelTitles={},this.recentlyOpened={files:[],workspaces:[]},this.mainMenu=this._register(this.menuService.createMenu(f.MenuId.MenubarMainMenu,this.contextKeyService)),this.mainMenuDisposables=this._register(new c.DisposableStore),this.setupMainMenu(),this.menuUpdater=this._register(new S.RunOnceScheduler(()=>this.doUpdateMenubar(!1),200)),this.notifyUserOfCustomMenubarAccessibility()}registerListeners(){this._register(this.hostService.onDidChangeFocus(P=>this.onDidChangeWindowFocus(P))),this._register(this.configurationService.onDidChangeConfiguration(P=>this.onConfigurationUpdated(P))),this.updateService.onStateChange(()=>this.onUpdateStateChange()),this._register(this.workspacesService.onDidChangeRecentlyOpened(()=>{this.onDidChangeRecentlyOpened()})),this._register(this.keybindingService.onDidUpdateKeybindings(()=>this.updateMenubar())),this._register(this.labelService.onDidChangeFormatters(()=>{this.onDidChangeRecentlyOpened()})),this._register(this.mainMenu.onDidChange(()=>{this.setupMainMenu(),this.doUpdateMenubar(!0)}))}setupMainMenu(){this.mainMenuDisposables.clear(),this.menus={},this.topLevelTitles={};const[,P]=this.mainMenu.getActions()[0];for(const V of P)V instanceof f.SubmenuItemAction&&typeof V.item.title!="string"&&(this.menus[V.item.title.original]=this.mainMenuDisposables.add(this.menuService.createMenu(V.item.submenu,this.contextKeyService)),this.topLevelTitles[V.item.title.original]=V.item.title.mnemonicTitle??V.item.title.value)}updateMenubar(){this.menuUpdater.schedule()}calculateActionLabel(P){let V=P.label;switch(P.id){default:break}return V}onUpdateStateChange(){this.updateMenubar()}onUpdateKeybindings(){this.updateMenubar()}getOpenRecentActions(){if(!this.recentlyOpened)return[];const{workspaces:P,files:V}=this.recentlyOpened,z=[];if(P.length>0){for(let U=0;U<M.MAX_MENU_RECENT_ENTRIES&&U<P.length;U++)z.push(this.createOpenRecentMenuAction(P[U]));z.push(new D.Separator)}if(V.length>0){for(let U=0;U<M.MAX_MENU_RECENT_ENTRIES&&U<V.length;U++)z.push(this.createOpenRecentMenuAction(V[U]));z.push(new D.Separator)}return z}onDidChangeWindowFocus(P){P&&this.onDidChangeRecentlyOpened()}onConfigurationUpdated(P){this.keys.some(V=>P.affectsConfiguration(V))&&this.updateMenubar(),P.affectsConfiguration("editor.accessibilitySupport")&&this.notifyUserOfCustomMenubarAccessibility(),P.affectsConfiguration("window.menuBarVisibility")&&this.onDidChangeRecentlyOpened()}get menubarHidden(){return v.isMacintosh&&v.isNative?!1:(0,A.getMenuBarVisibility)(this.configurationService)==="hidden"}onDidChangeRecentlyOpened(){this.menubarHidden||this.workspacesService.getRecentlyOpened().then(P=>{this.recentlyOpened=P,this.updateMenubar()})}createOpenRecentMenuAction(P){let V,z,U,H;const K=P.remoteAuthority;(0,i.isRecentFolder)(P)?(z=P.folderUri,V=P.label||this.labelService.getWorkspaceLabel(z,{verbose:!0}),U="openRecentFolder",H={folderUri:z}):(0,i.isRecentWorkspace)(P)?(z=P.workspace.configPath,V=P.label||this.labelService.getWorkspaceLabel(P.workspace,{verbose:!0}),U="openRecentWorkspace",H={workspaceUri:z}):(z=P.fileUri,V=P.label||this.labelService.getUriLabel(z),U="openRecentFile",H={fileUri:z});const G=new D.Action(U,(0,m.unmnemonicLabel)(V),void 0,void 0,q=>{const Z=q,j=q&&(!v.isMacintosh&&(Z.ctrlKey||Z.shiftKey)||v.isMacintosh&&(Z.metaKey||Z.altKey));return this.hostService.openWindow([H],{forceNewWindow:!!j,remoteAuthority:K||null})});return Object.assign(G,{uri:z,remoteAuthority:K})}notifyUserOfCustomMenubarAccessibility(){if(v.isWeb||v.isMacintosh)return;const P=this.storageService.getBoolean("menubar/accessibleMenubarNotified",0,!1),V=(0,A.getTitleBarStyle)(this.configurationService)==="custom";if(P||V||!this.accessibilityService.isScreenReaderOptimized())return;const z=(0,t.localize)(8,null);this.notificationService.prompt(u.Severity.Info,z,[{label:(0,t.localize)(9,null),run:()=>this.preferencesService.openUserSettings({query:"window.titleBarStyle"})}]),this.storageService.store("menubar/accessibleMenubarNotified",!0,0,0)}}e.MenubarControl=M,M.MAX_MENU_RECENT_ENTRIES=10;let N=class extends M{constructor(P,V,z,U,H,K,G,q,Z,j,X,Y,$,J,ee,te,se){super(P,V,z,U,H,K,G,q,Z,j,X,Y,te,se);this.themeService=$,this.layoutService=J,this.telemetryService=ee,this.alwaysOnMnemonics=!1,this.focusInsideMenubar=!1,this.visible=!0,this.webNavigationMenu=this._register(this.menuService.createMenu(f.MenuId.MenubarHomeMenu,this.contextKeyService)),this.reinstallDisposables=this._register(new c.DisposableStore),this._onVisibilityChange=this._register(new o.Emitter),this._onFocusStateChange=this._register(new o.Emitter),this.actionRunner=this._register(new D.ActionRunner),this.actionRunner.onDidRun(ie=>{this.telemetryService.publicLog2("workbenchActionExecuted",{id:ie.action.id,from:"menu"})}),this.workspacesService.getRecentlyOpened().then(ie=>{this.recentlyOpened=ie}),this.registerListeners(),this.registerActions(),(0,_.registerThemingParticipant)((ie,ce)=>{const le=ie.getColor(s.TITLE_BAR_ACTIVE_FOREGROUND);le&&ce.addRule(` .monaco-workbench .menubar > .menubar-menu-button, .monaco-workbench .menubar .toolbar-toggle-more { color: ${le}; } `);const ae=ie.getColor(s.ACTIVITY_BAR_INACTIVE_FOREGROUND);ae&&ce.addRule(` .monaco-workbench .menubar.compact > .menubar-menu-button, .monaco-workbench .menubar.compact .toolbar-toggle-more { color: ${ae}; } `);const ue=ie.getColor(s.ACTIVITY_BAR_FOREGROUND);ue&&ce.addRule(` .monaco-workbench .menubar.compact > .menubar-menu-button.open, .monaco-workbench .menubar.compact > .menubar-menu-button:focus, .monaco-workbench .menubar.compact:not(:focus-within) > .menubar-menu-button:hover, .monaco-workbench .menubar.compact > .menubar-menu-button.open .toolbar-toggle-more, .monaco-workbench .menubar.compact > .menubar-menu-button:focus .toolbar-toggle-more, .monaco-workbench .menubar.compact:not(:focus-within) > .menubar-menu-button:hover .toolbar-toggle-more { color: ${ue}; } `);const oe=ie.getColor(s.TITLE_BAR_INACTIVE_FOREGROUND);oe&&ce.addRule(` .monaco-workbench .menubar.inactive:not(.compact) > .menubar-menu-button, .monaco-workbench .menubar.inactive:not(.compact) > .menubar-menu-button .toolbar-toggle-more { color: ${oe}; } `);const fe=ie.getColor(s.MENUBAR_SELECTION_FOREGROUND);fe&&ce.addRule(` .monaco-workbench .menubar:not(.compact) > .menubar-menu-button.open, .monaco-workbench .menubar:not(.compact) > .menubar-menu-button:focus, .monaco-workbench .menubar:not(:focus-within):not(.compact) > .menubar-menu-button:hover, .monaco-workbench .menubar:not(.compact) > .menubar-menu-button.open .toolbar-toggle-more, .monaco-workbench .menubar:not(.compact) > .menubar-menu-button:focus .toolbar-toggle-more, .monaco-workbench .menubar:not(:focus-within):not(.compact) > .menubar-menu-button:hover .toolbar-toggle-more { color: ${fe}; } `);const pe=ie.getColor(s.MENUBAR_SELECTION_BACKGROUND);pe&&ce.addRule(` .monaco-workbench .menubar:not(.compact) > .menubar-menu-button.open, .monaco-workbench .menubar:not(.compact) > .menubar-menu-button:focus, .monaco-workbench .menubar:not(:focus-within):not(.compact) > .menubar-menu-button:hover { background-color: ${pe}; } `);const me=ie.getColor(s.MENUBAR_SELECTION_BORDER);me&&ce.addRule(` .monaco-workbench .menubar > .menubar-menu-button:hover { outline: dashed 1px; } .monaco-workbench .menubar > .menubar-menu-button.open, .monaco-workbench .menubar > .menubar-menu-button:focus { outline: solid 1px; } .monaco-workbench .menubar > .menubar-menu-button.open, .monaco-workbench .menubar > .menubar-menu-button:focus, .monaco-workbench .menubar > .menubar-menu-button:hover { outline-color: ${me}; } `)})}doUpdateMenubar(P){this.setupCustomMenubar(P)}registerActions(){const P=this;v.isWeb&&this._register((0,f.registerAction2)(class extends f.Action2{constructor(){super({id:"workbench.actions.menubar.focus",title:{value:(0,t.localize)(10,null),original:"Focus Application Menu"},keybinding:{primary:68,weight:200,when:O.IsWebContext},f1:!0})}async run(){P.menubar&&P.menubar.toggleFocus()}}))}getUpdateAction(){switch(this.updateService.state.type){case"uninitialized":return null;case"idle":return new D.Action("update.check",(0,t.localize)(11,null),void 0,!0,()=>this.updateService.checkForUpdates(!0));case"checking for updates":return new D.Action("update.checking",(0,t.localize)(12,null),void 0,!1);case"available for download":return new D.Action("update.downloadNow",(0,t.localize)(13,null),void 0,!0,()=>this.updateService.downloadUpdate());case"downloading":return new D.Action("update.downloading",(0,t.localize)(14,null),void 0,!1);case"downloaded":return new D.Action("update.install",(0,t.localize)(15,null),void 0,!0,()=>this.updateService.applyUpdate());case"updating":return new D.Action("update.updating",(0,t.localize)(16,null),void 0,!1);case"ready":return new D.Action("update.restart",(0,t.localize)(17,null),void 0,!0,()=>this.updateService.quitAndInstall())}}get currentMenubarVisibility(){return(0,A.getMenuBarVisibility)(this.configurationService)}get currentDisableMenuBarAltFocus(){let P=this.configurationService.getValue("window.customMenuBarAltFocus"),V=!1;return typeof P=="boolean"&&(V=!P),V}insertActionsBefore(P,V){switch(P.id){case L.OpenRecentAction.ID:V.push(...this.getOpenRecentActions());break;case"workbench.action.showAboutDialog":if(!v.isMacintosh&&!v.isWeb){const z=this.getUpdateAction();z&&(z.label=(0,m.mnemonicMenuLabel)(z.label),V.push(z),V.push(new D.Separator))}break;default:break}}get currentEnableMenuBarMnemonics(){let P=this.configurationService.getValue("window.enableMenuBarMnemonics");return typeof P!="boolean"&&(P=!0),P&&(!v.isWeb||(0,y.isFullscreen)())}get currentCompactMenuMode(){return this.currentMenubarVisibility!=="compact"?void 0:this.configurationService.getValue("workbench.sideBar.location")==="right"?g.Direction.Left:g.Direction.Right}onDidVisibilityChange(P){this.visible=P,this.onDidChangeRecentlyOpened(),this._onVisibilityChange.fire(P)}setupCustomMenubar(P){if(!this.container)return;P?(this.menubar&&this.reinstallDisposables.clear(),this.menubar=this.reinstallDisposables.add(new h.MenuBar(this.container,this.getMenuBarOptions())),this.accessibilityService.alwaysUnderlineAccessKeys().then(z=>{this.alwaysOnMnemonics=z,this.menubar?.update(this.getMenuBarOptions())}),this.reinstallDisposables.add(this.menubar.onFocusStateChange(z=>{this._onFocusStateChange.fire(z),z||(this.updateMenubar(),this.focusInsideMenubar=!1)})),this.reinstallDisposables.add(this.menubar.onVisibilityChange(z=>this.onDidVisibilityChange(z))),this.reinstallDisposables.add((0,I.addDisposableListener)(this.container,I.EventType.FOCUS_IN,()=>{this.focusInsideMenubar=!0})),this.reinstallDisposables.add((0,I.addDisposableListener)(this.container,I.EventType.FOCUS_OUT,()=>{this.focusInsideMenubar=!1})),this.reinstallDisposables.add((0,d.attachMenuStyler)(this.menubar,this.themeService))):this.menubar?.update(this.getMenuBarOptions());const V=(z,U,H)=>{U.splice(0);let K=z.getActions();for(let G of K){const[,q]=G;for(let Z of q){this.insertActionsBefore(Z,U);const j=typeof Z.item.title=="string"?Z.item.title:Z.item.title.mnemonicTitle??Z.item.title.value;if(Z instanceof f.SubmenuItemAction){let X=this.menus[Z.item.submenu.id];X||(X=this._register(this.menus[Z.item.submenu.id]=this.menuService.createMenu(Z.item.submenu,this.contextKeyService)),this._register(X.onDidChange(()=>{if(!this.focusInsideMenubar){const $=[];V(z,$,H),this.menubar&&this.topLevelTitles[H]&&this.menubar.updateMenu({actions:$,label:(0,m.mnemonicMenuLabel)(this.topLevelTitles[H])})}},this)));const Y=[];V(X,Y,H),Y.length>0&&U.push(new D.SubmenuAction(Z.id,(0,m.mnemonicMenuLabel)(j),Y))}else{const X=new D.Action(Z.id,(0,m.mnemonicMenuLabel)(j),Z.class,Z.enabled,()=>this.commandService.executeCommand(Z.id));X.tooltip=Z.tooltip,X.checked=Z.checked,U.push(X)}}U.push(new D.Separator)}if(z===this.menus.File&&this.currentCompactMenuMode===void 0){const G=this.getWebNavigationActions();G.length&&(U.push(...G),U.push(new D.Separator))}U.pop()};for(const z of Object.keys(this.topLevelTitles)){const U=this.menus[z];P&&U&&(this.reinstallDisposables.add(U.onDidChange(()=>{if(!this.focusInsideMenubar){const K=[];V(U,K,z),this.menubar&&this.menubar.updateMenu({actions:K,label:(0,m.mnemonicMenuLabel)(this.topLevelTitles[z])})}})),U===this.menus.File&&this.reinstallDisposables.add(this.webNavigationMenu.onDidChange(()=>{if(!this.focusInsideMenubar){const K=[];V(U,K,z),this.menubar&&this.menubar.updateMenu({actions:K,label:(0,m.mnemonicMenuLabel)(this.topLevelTitles[z])})}})));const H=[];U&&V(U,H,z),this.menubar&&(P?this.menubar.push({actions:H,label:(0,m.mnemonicMenuLabel)(this.topLevelTitles[z])}):this.menubar.updateMenu({actions:H,label:(0,m.mnemonicMenuLabel)(this.topLevelTitles[z])}))}}getWebNavigationActions(){if(!v.isWeb)return[];const P=[];for(const V of this.webNavigationMenu.getActions()){const[,z]=V;for(const U of z)if(U instanceof f.MenuItemAction){const H=typeof U.item.title=="string"?U.item.title:U.item.title.mnemonicTitle??U.item.title.value;P.push(new D.Action(U.id,(0,m.mnemonicMenuLabel)(H),U.class,U.enabled,async K=>{this.commandService.executeCommand(U.id,K)}))}P.push(new D.Separator)}return P.length&&P.pop(),P}getMenuBarOptions(){return{enableMnemonics:this.currentEnableMenuBarMnemonics,disableAltFocus:this.currentDisableMenuBarAltFocus,visibility:this.currentMenubarVisibility,actionRunner:this.actionRunner,getKeybinding:P=>this.keybindingService.lookupKeybinding(P.id),alwaysOnMnemonics:this.alwaysOnMnemonics,compactMode:this.currentCompactMenuMode,getCompactMenuActions:()=>v.isWeb?this.getWebNavigationActions():[]}}onDidChangeWindowFocus(P){!this.visible||(super.onDidChangeWindowFocus(P),this.container&&(P?this.container.classList.remove("inactive"):(this.container.classList.add("inactive"),this.menubar&&this.menubar.blur())))}onUpdateStateChange(){!this.visible||super.onUpdateStateChange()}onDidChangeRecentlyOpened(){!this.visible||super.onDidChangeRecentlyOpened()}onUpdateKeybindings(){!this.visible||super.onUpdateKeybindings()}registerListeners(){super.registerListeners(),this._register((0,I.addDisposableListener)(window,I.EventType.RESIZE,()=>{this.menubar&&!(v.isIOS&&R.BrowserFeatures.pointerEvents)&&this.menubar.blur()})),v.isWeb&&(this._register(this.layoutService.onDidChangeFullscreen(P=>this.updateMenubar())),this._register(this.webNavigationMenu.onDidChange(()=>this.updateMenubar())))}get onVisibilityChange(){return this._onVisibilityChange.event}get onFocusStateChange(){return this._onFocusStateChange.event}getMenubarItemsDimensions(){return this.menubar?new I.Dimension(this.menubar.getWidth(),this.menubar.getHeight()):new I.Dimension(0,0)}create(P){return this.container=P,this.container&&this.doUpdateMenubar(!0),this.container}layout(P){this.container&&(this.container.style.height=`${P.height}px`),this.menubar?.update(this.getMenuBarOptions())}toggleFocus(){this.menubar&&this.menubar.toggleFocus()}};N=Ee([W(0,f.IMenuService),W(1,i.IWorkspacesService),W(2,k.IContextKeyService),W(3,w.IKeybindingService),W(4,C.IConfigurationService),W(5,l.ILabelService),W(6,r.IUpdateService),W(7,p.IStorageService),W(8,u.INotificationService),W(9,a.IPreferencesService),W(10,n.IWorkbenchEnvironmentService),W(11,b.IAccessibilityService),W(12,_.IThemeService),W(13,E.IWorkbenchLayoutService),W(14,F.ITelemetryService),W(15,T.IHostService),W(16,x.ICommandService)],N),e.CustomMenubarControl=N}),define(ne[2493],re([1,0,1423,19,353,77,213,37,137,8,21,2,44,233,34,12,82,14,66,29,10,618,5,111,45,6,24,80,11,73,16,7,69,46,18,13,33,230,63,163,1069]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TitlebarPart=void 0;let V=class fn extends _.Part{constructor(U,H,K,G,q,Z,j,X,Y,$,J,ee,te,se){super("workbench.parts.titlebar",{hasTitle:!1},j,Y,$);this.contextMenuService=U,this.configurationService=H,this.editorService=K,this.environmentService=G,this.contextService=q,this.instantiationService=Z,this.labelService=X,this.menuService=J,this.contextKeyService=ee,this.hostService=te,this.productService=se,this.minimumWidth=0,this.maximumWidth=Number.POSITIVE_INFINITY,this._onMenubarVisibilityChange=this._register(new d.Emitter),this.onMenubarVisibilityChange=this._onMenubarVisibilityChange.event,this.isInactive=!1,this.properties={isPure:!0,isAdmin:!1,prefix:void 0},this.activeEditorListeners=this._register(new C.DisposableStore),this.titleUpdater=this._register(new E.RunOnceScheduler(()=>this.doUpdateTitle(),0)),this.contextMenu=this._register(J.createMenu(T.MenuId.TitleBarContext,ee)),this.titleBarStyle=(0,k.getTitleBarStyle)(this.configurationService),this.registerListeners()}get minimumHeight(){return 30/(this.currentMenubarVisibility==="hidden"?(0,A.getZoomFactor)():1)}get maximumHeight(){return this.minimumHeight}registerListeners(){this._register(this.hostService.onDidChangeFocus(U=>U?this.onFocus():this.onBlur())),this._register(this.configurationService.onDidChangeConfiguration(U=>this.onConfigurationChanged(U))),this._register(this.editorService.onDidActiveEditorChange(()=>this.onActiveEditorChange())),this._register(this.contextService.onDidChangeWorkspaceFolders(()=>this.titleUpdater.schedule())),this._register(this.contextService.onDidChangeWorkbenchState(()=>this.titleUpdater.schedule())),this._register(this.contextService.onDidChangeWorkspaceName(()=>this.titleUpdater.schedule())),this._register(this.labelService.onDidChangeFormatters(()=>this.titleUpdater.schedule()))}onBlur(){this.isInactive=!0,this.updateStyles()}onFocus(){this.isInactive=!1,this.updateStyles()}onConfigurationChanged(U){(U.affectsConfiguration("window.title")||U.affectsConfiguration("window.titleSeparator"))&&this.titleUpdater.schedule(),this.titleBarStyle!=="native"&&(!l.isMacintosh||l.isWeb)&&U.affectsConfiguration("window.menuBarVisibility")&&(this.currentMenubarVisibility==="compact"?this.uninstallMenubar():this.installMenubar()),this.titleBarStyle!=="native"&&this.windowControls&&U.affectsConfiguration("workbench.layoutControl.enabled")&&this.windowControls.classList.toggle("show-layout-control",this.layoutControlEnabled)}onMenubarVisibilityChanged(U){(l.isWeb||l.isWindows||l.isLinux)&&(this.adjustTitleMarginToCenter(),this._onMenubarVisibilityChange.fire(U))}onActiveEditorChange(){this.activeEditorListeners.clear(),this.titleUpdater.schedule();const U=this.editorService.activeEditor;U&&(this.activeEditorListeners.add(U.onDidChangeDirty(()=>this.titleUpdater.schedule())),this.activeEditorListeners.add(U.onDidChangeLabel(()=>this.titleUpdater.schedule())))}doUpdateTitle(){const U=this.getWindowTitle();let H=U;(0,p.trim)(H)||(H=this.productService.nameLong),window.document.title=H,this.title?this.title.innerText=U:this.pendingTitle=U,(l.isWeb||l.isWindows||l.isLinux)&&this.title&&this.lastLayoutDimensions&&this.updateLayout(this.lastLayoutDimensions)}getWindowTitle(){let U=this.doGetWindowTitle();return this.properties.prefix&&(U=`${this.properties.prefix} ${U||this.productService.nameLong}`),this.properties.isAdmin&&(U=`${U||this.productService.nameLong} ${fn.NLS_USER_IS_ADMIN}`),this.properties.isPure||(U=`${U||this.productService.nameLong} ${fn.NLS_UNSUPPORTED}`),this.environmentService.isExtensionDevelopment&&(U=`${fn.NLS_EXTENSION_HOST} - ${U||this.productService.nameLong}`),U=U.replace(/[^\S ]/g," "),U}updateProperties(U){const H=typeof U.isAdmin=="boolean"?U.isAdmin:this.properties.isAdmin,K=typeof U.isPure=="boolean"?U.isPure:this.properties.isPure,G=typeof U.prefix=="string"?U.prefix:this.properties.prefix;(H!==this.properties.isAdmin||K!==this.properties.isPure||G!==this.properties.prefix)&&(this.properties.isAdmin=H,this.properties.isPure=K,this.properties.prefix=G,this.titleUpdater.schedule())}doGetWindowTitle(){const U=this.editorService.activeEditor,H=this.contextService.getWorkspace();let K;H.configuration?K=H.configuration:H.folders.length&&(K=H.folders[0].uri);const G=o.EditorResourceAccessor.getOriginalUri(U,{supportSideBySide:o.SideBySideEditor.PRIMARY});let q=G?(0,f.dirname)(G):void 0;q?.path==="."&&(q=void 0);let Z;this.contextService.getWorkbenchState()===2?Z=H.folders[0]:G&&(Z=(0,L.withNullAsUndefined)(this.contextService.getWorkspaceFolder(G)));let j;if(this.environmentService.remoteAuthority&&!l.isWeb)j=this.labelService.getHostLabel(F.Schemas.vscodeRemote,this.environmentService.remoteAuthority);else{const pe=(0,N.getVirtualWorkspaceLocation)(H);pe&&(j=this.labelService.getHostLabel(pe.scheme,pe.authority))}const X=U?U.getTitle(0):"",Y=U?U.getTitle(1):X,$=U?U.getTitle(2):Y,J=q?(0,f.basename)(q):"",ee=q?this.labelService.getUriLabel(q,{relative:!0}):"",te=q?this.labelService.getUriLabel(q):"",se=this.labelService.getWorkspaceLabel(H),ie=K?this.labelService.getUriLabel(K):"",ce=Z?Z.name:"",le=Z?this.labelService.getUriLabel(Z.uri):"",ae=U?.isDirty()&&!U.isSaving()?fn.TITLE_DIRTY:"",ue=this.productService.nameLong,oe=this.configurationService.getValue("window.titleSeparator"),fe=this.configurationService.getValue("window.title");return(0,h.template)(fe,{activeEditorShort:X,activeEditorLong:$,activeEditorMedium:Y,activeFolderShort:J,activeFolderMedium:ee,activeFolderLong:te,rootName:se,rootPath:ie,folderName:ce,folderPath:le,dirty:ae,appName:ue,remoteName:j,separator:{label:oe}})}uninstallMenubar(){this.customMenubar&&(this.customMenubar.dispose(),this.customMenubar=void 0),this.menubar&&(this.menubar.remove(),this.menubar=void 0)}installMenubar(){this.menubar||(this.customMenubar=this._register(this.instantiationService.createInstance(a.CustomMenubarControl)),this.menubar=this.rootContainer.insertBefore((0,u.$)("div.menubar"),this.title),this.menubar.setAttribute("role","menubar"),this.customMenubar.create(this.menubar),this._register(this.customMenubar.onVisibilityChange(U=>this.onMenubarVisibilityChanged(U))))}createContentArea(U){if(this.element=U,this.rootContainer=(0,u.append)(U,(0,u.$)(".titlebar-container")),(!l.isMacintosh||l.isWeb)&&(this.appIcon=(0,u.prepend)(this.rootContainer,(0,u.$)("a.window-appicon")),l.isWeb)){const H=this.environmentService.options?.homeIndicator;if(H){const K=(0,B.getIconRegistry)().getIcon(H.icon)?{id:H.icon}:M.Codicon.code;this.appIcon.setAttribute("href",H.href),this.appIcon.classList.add(...S.ThemeIcon.asClassNameArray(K)),this.appIconBadge=document.createElement("div"),this.appIconBadge.classList.add("home-bar-icon-badge"),this.appIcon.appendChild(this.appIconBadge)}}if(this.titleBarStyle!=="native"&&(!l.isMacintosh||l.isWeb)&&this.currentMenubarVisibility!=="compact"&&this.installMenubar(),this.title=(0,u.append)(this.rootContainer,(0,u.$)("div.window-title")),this.pendingTitle?this.title.innerText=this.pendingTitle:this.titleUpdater.schedule(),this.titleBarStyle!=="native"){this.windowControls=(0,u.append)(this.rootContainer,(0,u.$)("div.window-controls-container")),this.windowControls.classList.toggle("show-layout-control",this.layoutControlEnabled);const H=(0,u.append)(this.windowControls,(0,u.$)("div.layout-dropdown-container"));this.layoutToolbar=new P.ToolBar(H,this.contextMenuService,{actionViewItemProvider:q=>(0,y.createActionViewItem)(this.instantiationService,q)});const K=this._register(this.menuService.createMenu(T.MenuId.LayoutControlMenu,this.contextKeyService)),G=()=>{if(!this.layoutToolbar)return;const q=[],Z=(0,y.createAndFillInContextMenuActions)(K,void 0,{primary:[],secondary:q});this.layoutToolbar.setActions(q),Z.dispose()};K.onDidChange(G),G()}return[u.EventType.CONTEXT_MENU,u.EventType.MOUSE_DOWN].forEach(H=>{this._register((0,u.addDisposableListener)(this.title,H,K=>{(K.type===u.EventType.CONTEXT_MENU||K.metaKey)&&(u.EventHelper.stop(K),this.onContextMenu(K))}))}),this._register((0,u.addDisposableListener)(this.element,u.EventType.MOUSE_DOWN,H=>{if(H.target&&this.menubar&&(0,u.isAncestor)(H.target,this.menubar)||H.target&&this.layoutToolbar&&(0,u.isAncestor)(H.target,this.layoutToolbar.getElement()))return;const K=document.activeElement;setTimeout(()=>{K instanceof HTMLElement&&K.focus()},0)},!0)),this.updateStyles(),this.element}updateStyles(){if(super.updateStyles(),this.element){this.isInactive?this.element.classList.add("inactive"):this.element.classList.remove("inactive");const U=this.getColor(this.isInactive?s.TITLE_BAR_INACTIVE_BACKGROUND:s.TITLE_BAR_ACTIVE_BACKGROUND,(G,q)=>G.isOpaque()?G:G.makeOpaque((0,s.WORKBENCH_BACKGROUND)(q)))||"";this.element.style.backgroundColor=U,this.appIconBadge&&(this.appIconBadge.style.backgroundColor=U),U&&r.Color.fromHex(U).isLighter()?this.element.classList.add("light"):this.element.classList.remove("light");const H=this.getColor(this.isInactive?s.TITLE_BAR_INACTIVE_FOREGROUND:s.TITLE_BAR_ACTIVE_FOREGROUND);this.element.style.color=H||"";const K=this.getColor(s.TITLE_BAR_BORDER);this.element.style.borderBottom=K?`1px solid ${K}`:""}}onContextMenu(U){const H=new I.StandardMouseEvent(U),K={x:H.posx,y:H.posy},G=[],q=(0,y.createAndFillInContextMenuActions)(this.contextMenu,void 0,G);this.contextMenuService.showContextMenu({getAnchor:()=>K,getActions:()=>G,onHide:()=>(0,C.dispose)(q)})}adjustTitleMarginToCenter(){if(this.customMenubar&&this.menubar){const U=(this.appIcon?this.appIcon.clientWidth:0)+this.menubar.clientWidth+10,H=this.element.clientWidth-10;if(U>(this.element.clientWidth-this.title.clientWidth)/2||H<(this.element.clientWidth+this.title.clientWidth)/2){this.title.style.position="",this.title.style.left="",this.title.style.transform="";return}}this.title.style.position="absolute",this.title.style.left="50%",this.title.style.transform="translate(-50%, 0)"}get currentMenubarVisibility(){return(0,k.getMenuBarVisibility)(this.configurationService)}get layoutControlEnabled(){return this.configurationService.getValue("workbench.layoutControl.enabled")}updateLayout(U){if(this.lastLayoutDimensions=U,(0,k.getTitleBarStyle)(this.configurationService)==="custom"&&(!l.isWeb&&l.isMacintosh||this.currentMenubarVisibility==="hidden"?(this.rootContainer.style.height=`${100*(0,A.getZoomFactor)()}%`,this.rootContainer.style.width=`${100*(0,A.getZoomFactor)()}%`,this.rootContainer.style.transform=`scale(${1/(0,A.getZoomFactor)()})`):(this.rootContainer.style.height="100%",this.rootContainer.style.width="100%",this.rootContainer.style.transform=""),(0,u.runAtThisOrScheduleAtNextAnimationFrame)(()=>this.adjustTitleMarginToCenter()),this.customMenubar)){const H=new u.Dimension(0,U.height);this.customMenubar.layout(H)}}layout(U,H){this.updateLayout(new u.Dimension(U,H)),super.layoutContents(U,H)}toJSON(){return{type:"workbench.parts.titlebar"}}};V.NLS_UNSUPPORTED=(0,t.localize)(0,null),V.NLS_USER_IS_ADMIN=l.isWindows?(0,t.localize)(1,null):(0,t.localize)(2,null),V.NLS_EXTENSION_HOST=(0,t.localize)(3,null),V.TITLE_DIRTY="\u25CF ",V=Ee([W(0,D.IContextMenuService),W(1,w.IConfigurationService),W(2,v.IEditorService),W(3,c.IBrowserWorkbenchEnvironmentService),W(4,i.IWorkspaceContextService),W(5,n.IInstantiationService),W(6,S.IThemeService),W(7,g.ILabelService),W(8,m.IStorageService),W(9,b.IWorkbenchLayoutService),W(10,T.IMenuService),W(11,R.IContextKeyService),W(12,O.IHostService),W(13,x.IProductService)],V),e.TitlebarPart=V,(0,S.registerThemingParticipant)((z,U)=>{const H=z.getColor(s.TITLE_BAR_ACTIVE_FOREGROUND);H&&U.addRule(` .monaco-workbench .part.titlebar .window-controls-container .window-icon { color: ${H}; } `);const K=z.getColor(s.TITLE_BAR_INACTIVE_FOREGROUND);K&&U.addRule(` .monaco-workbench .part.titlebar.inactive .window-controls-container .window-icon { color: ${K}; } `)})}),define(ne[2494],re([1,0,33,1442,98,16,53,411,108]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowAudioCueHelp=void 0;class w extends A.Action2{constructor(){super({id:w.ID,title:{value:(0,f.localize)(0,null),original:"Help: List Audio Cues"},f1:!0})}async run(C){const o=C.get(D.IAudioCueService),c=C.get(k.IQuickInputService),i=C.get(I.IPreferencesService),S=C.get(_.IAccessibilityService),s=D.AudioCue.allAudioCues.map((r,p)=>({label:S.isScreenReaderOptimized()?`${r.name}${o.isEnabled(r).get()?"":" ("+(0,f.localize)(1,null)+")"}`:`${o.isEnabled(r).get()?"$(check)":" "} ${r.name}`,audioCue:r,buttons:[{iconClass:t.Codicon.settingsGear.classNames,tooltip:(0,f.localize)(2,null)}]}));await c.pick(s,{activeItem:s[0],onDidFocus:r=>{o.playSound(r.audioCue.sound)},onDidTriggerItemButton:r=>{i.openSettings({query:r.item.audioCue.settingsKey})},placeHolder:(0,f.localize)(3,null)})}}e.ShowAudioCueHelp=w,w.ID="audioCues.help"}),define(ne[2495],re([1,0,1441,16,57,35,17,47,2136,2266,411,2494]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,A.registerSingleton)(v.IAudioCueService,v.AudioCueService),k.Registry.as(D.Extensions.Workbench).registerWorkbenchContribution(w.AudioCueLineFeatureContribution,3),k.Registry.as(D.Extensions.Workbench).registerWorkbenchContribution(I.AudioCueLineDebuggerContribution,3);const o={type:"string",enum:["auto","on","off"],default:"auto",enumDescriptions:[(0,t.localize)(0,null),(0,t.localize)(1,null),(0,t.localize)(2,null)]};k.Registry.as(_.Extensions.Configuration).registerConfiguration({properties:{"audioCues.enabled":{markdownDeprecationMessage:"Deprecated. Use the specific setting for each audio cue instead (`audioCues.*`)."},"audioCues.volume":{description:(0,t.localize)(3,null),type:"number",minimum:0,maximum:100,default:50},"audioCues.lineHasBreakpoint":{description:(0,t.localize)(4,null),...o},"audioCues.lineHasInlineSuggestion":{description:(0,t.localize)(5,null),...o},"audioCues.lineHasError":{description:(0,t.localize)(6,null),...o},"audioCues.lineHasFoldedArea":{description:(0,t.localize)(7,null),...o},"audioCues.lineHasWarning":{description:(0,t.localize)(8,null),...o,default:"off"},"audioCues.onDebugBreak":{description:(0,t.localize)(9,null),...o},"audioCues.noInlayHints":{description:(0,t.localize)(10,null),...o}}}),(0,f.registerAction2)(C.ShowAudioCueHelp)}),define(ne[502],re([1,0,15,92,2,194,14,9,86,1572,8,5,31,41,53,24,486,831,108]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExternalUriOpenerService=e.IExternalUriOpenerService=void 0,e.IExternalUriOpenerService=(0,C.createDecorator)("externalUriOpenerService");let p=class extends _.Disposable{constructor(a,n,h,g,d,m){super();this.configurationService=h,this.logService=g,this.preferencesService=d,this.quickInputService=m,this._providers=new A.LinkedList,this._register(a.registerExternalOpener(this))}registerExternalOpenerProvider(a){return{dispose:this._providers.push(a)}}async getOpeners(a,n,h,g){const d=await this.getAllOpenersForUri(a);if(d.size===0)return[];if(h.preferredOpenerId){if(h.preferredOpenerId===s.defaultExternalUriOpenerId)return[];const y=d.get(h.preferredOpenerId);if(y)return[y]}const m=this.getConfiguredOpenerForUri(d,a);if(m)return m===s.defaultExternalUriOpenerId?[]:[m];const b=[];if(await Promise.all(Array.from(d.values()).map(async y=>{let T;try{T=await y.canOpen(h.sourceUri,g)}catch(R){this.logService.error(R);return}switch(T){case I.ExternalUriOpenerPriority.Option:case I.ExternalUriOpenerPriority.Default:case I.ExternalUriOpenerPriority.Preferred:b.push({opener:y,priority:T});break}})),b.length===0)return[];const E=(0,t.firstOrDefault)(b.filter(y=>y.priority===I.ExternalUriOpenerPriority.Preferred));return E?[E.opener]:!n&&b.every(y=>y.priority===I.ExternalUriOpenerPriority.Option)?[]:b.map(y=>y.opener)}async openExternal(a,n,h){const g=typeof a=="string"?D.URI.parse(a):a,d=await this.getOpeners(g,!1,n,h);return d.length===0?!1:d.length===1?d[0].openExternalUri(g,n,h):this.showOpenerPrompt(d,g,n,h)}async getOpener(a,n,h){const g=await this.getOpeners(a,!0,n,h);if(g.length>=1)return g[0]}async getAllOpenersForUri(a){const n=new Map;return await Promise.all(f.Iterable.map(this._providers,async h=>{for await(const g of h.getOpeners(a))n.set(g.id,g)})),n}getConfiguredOpenerForUri(a,n){const h=this.configurationService.getValue(s.externalUriOpenersSettingId)||{};for(const[g,d]of Object.entries(h))if((0,l.testUrlMatchesGlob)(n.toString(),g)){if(d===s.defaultExternalUriOpenerId)return"default";const m=a.get(d);if(m)return m}}async showOpenerPrompt(a,n,h,g){const d=a.map(b=>({label:b.label,opener:b}));d.push({label:k.isWeb?w.localize(0,null):w.localize(1,null),opener:void 0},{type:"separator"},{label:w.localize(2,null),opener:"configureDefault"});const m=await this.quickInputService.pick(d,{placeHolder:w.localize(3,null,n.toString())});return m?typeof m.opener=="undefined"?!1:m.opener==="configureDefault"?(await this.preferencesService.openUserSettings({jsonEditor:!0,revealSetting:{key:s.externalUriOpenersSettingId,edit:!0}}),!0):m.opener.openExternalUri(n,h,g):!0}};p=Ee([W(0,c.IOpenerService),W(1,S.IStorageService),W(2,v.IConfigurationService),W(3,o.ILogService),W(4,r.IPreferencesService),W(5,i.IQuickInputService)],p),e.ExternalUriOpenerService=p}),define(ne[2496],re([1,0,36,22,2,18,1363,26,41,24,65,486,2312,502,40,75]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadUriOpeners=void 0;let s=class extends _.Disposable{constructor(r,p,u,a,n,h){super();this.extensionService=a,this.openerService=n,this.notificationService=h,this._registeredOpeners=new Map,this.proxy=r.getProxy(v.ExtHostContext.ExtHostUriOpeners),this._register(u.registerExternalOpenerProvider(this)),this._contributedExternalUriOpenersStore=this._register(new o.ContributedExternalUriOpenersStore(p,a))}async*getOpeners(r){if(!(r.scheme!==A.Schemas.http&&r.scheme!==A.Schemas.https)){await this.extensionService.activateByEvent(`onOpenExternalUri:${r.scheme}`);for(const[p,u]of this._registeredOpeners)u.schemes.has(r.scheme)&&(yield this.createOpener(p,u))}}createOpener(r,p){return{id:r,label:p.label,canOpen:(u,a)=>this.proxy.$canOpenUri(r,u,a),openExternalUri:async(u,a,n)=>{try{await this.proxy.$openUri(r,{resolvedUri:u,sourceUri:a.sourceUri},n)}catch(h){if(!(0,f.isCancellationError)(h)){const g=new t.Action("default",(0,k.localize)(0,null),void 0,void 0,async()=>{await this.openerService.open(u,{allowTunneling:!1,allowContributedOpeners:C.defaultExternalUriOpenerId})});g.tooltip=u.toString(),this.notificationService.notify({severity:D.Severity.Error,message:(0,k.localize)(1,null,r,h.toString()),actions:{primary:[g]}})}}return!0}}}async $registerUriOpener(r,p,u,a){if(this._registeredOpeners.has(r))throw new Error(`Opener with id '${r}' already registered`);this._registeredOpeners.set(r,{schemes:new Set(p),label:a,extensionId:u}),this._contributedExternalUriOpenersStore.didRegisterOpener(r,u.value)}async $unregisterUriOpener(r){this._registeredOpeners.delete(r),this._contributedExternalUriOpenersStore.delete(r)}dispose(){super.dispose(),this._registeredOpeners.clear()}};s=Ee([(0,S.extHostNamedCustomer)(v.MainContext.MainThreadUriOpeners),W(1,w.IStorageService),W(2,c.IExternalUriOpenerService),W(3,i.IExtensionService),W(4,I.IOpenerService),W(5,D.INotificationService)],s),e.MainThreadUriOpeners=s}),define(ne[2497],re([1,0,57,35,17,486,502]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,f.registerSingleton)(k.IExternalUriOpenerService,k.ExternalUriOpenerService),_.Registry.as(t.Extensions.Configuration).registerConfiguration(A.externalUriOpenersConfigurationNode)}),define(ne[2498],re([1,0,33,1641,16,28,7,53,168,153,64,142,108]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,_.registerAction2)(class extends _.Action2{constructor(){super({id:"workbench.notebook.layout.select",title:(0,f.localize)(0,null),f1:!0,precondition:k.ContextKeyExpr.equals(`config.${v.NotebookSetting.openGettingStarted}`,!0),category:I.NOTEBOOK_ACTIONS_CATEGORY,menu:[{id:_.MenuId.EditorTitle,group:"notebookLayout",when:k.ContextKeyExpr.and(w.NOTEBOOK_IS_ACTIVE_EDITOR,k.ContextKeyExpr.notEquals("config.notebook.globalToolbar",!0),k.ContextKeyExpr.equals(`config.${v.NotebookSetting.openGettingStarted}`,!0)),order:0},{id:_.MenuId.NotebookToolbar,group:"notebookLayout",when:k.ContextKeyExpr.and(k.ContextKeyExpr.equals("config.notebook.globalToolbar",!0),k.ContextKeyExpr.equals(`config.${v.NotebookSetting.openGettingStarted}`,!0)),order:0}]})}run(i){i.get(A.ICommandService).executeCommand("workbench.action.openWalkthrough",{category:"notebooks",step:"notebookProfile"},!0)}}),(0,_.registerAction2)(class extends _.Action2{constructor(){super({id:"workbench.notebook.layout.configure",title:(0,f.localize)(1,null),f1:!0,category:I.NOTEBOOK_ACTIONS_CATEGORY,menu:[{id:_.MenuId.NotebookToolbar,group:"notebookLayout",when:k.ContextKeyExpr.equals("config.notebook.globalToolbar",!0),order:1}]})}run(i){i.get(o.IPreferencesService).openSettings({jsonEditor:!1,query:"@tag:notebookLayout"})}}),(0,_.registerAction2)(class extends _.Action2{constructor(){super({id:"workbench.notebook.layout.configure.editorTitle",title:(0,f.localize)(2,null),f1:!1,category:I.NOTEBOOK_ACTIONS_CATEGORY,menu:[{id:_.MenuId.NotebookEditorLayoutConfigure,group:"notebookLayout",when:w.NOTEBOOK_IS_ACTIVE_EDITOR,order:1}]})}run(i){i.get(o.IPreferencesService).openSettings({jsonEditor:!1,query:"@tag:notebookLayout"})}}),_.MenuRegistry.appendMenuItem(_.MenuId.EditorTitle,{submenu:_.MenuId.NotebookEditorLayoutConfigure,rememberDefaultAction:!1,title:{value:(0,f.localize)(3,null),original:"Customize Notebook..."},icon:t.Codicon.gear,group:"navigation",order:-1,when:w.NOTEBOOK_IS_ACTIVE_EDITOR}),(0,_.registerAction2)(class extends _.Action2{constructor(){super({id:"notebook.toggleLineNumbersFromEditorTitle",title:{value:(0,f.localize)(4,null),original:"Toggle Notebook Line Numbers"},precondition:w.NOTEBOOK_EDITOR_FOCUSED,menu:[{id:_.MenuId.NotebookEditorLayoutConfigure,group:"notebookLayoutDetails",order:1,when:w.NOTEBOOK_IS_ACTIVE_EDITOR}],category:I.NOTEBOOK_ACTIONS_CATEGORY,f1:!0,toggled:{condition:k.ContextKeyExpr.notEquals("config.notebook.lineNumbers","off"),title:{value:(0,f.localize)(5,null),original:"Show Notebook Line Numbers"}}})}async run(i){return i.get(A.ICommandService).executeCommand("notebook.toggleLineNumbers")}}),(0,_.registerAction2)(class extends _.Action2{constructor(){super({id:"notebook.toggleCellToolbarPositionFromEditorTitle",title:{value:(0,f.localize)(6,null),original:"Toggle Cell Toolbar Position"},menu:[{id:_.MenuId.NotebookEditorLayoutConfigure,group:"notebookLayoutDetails",order:3}],category:I.NOTEBOOK_ACTIONS_CATEGORY,f1:!1})}async run(i,...S){return i.get(A.ICommandService).executeCommand("notebook.toggleCellToolbarPosition",...S)}}),(0,_.registerAction2)(class extends _.Action2{constructor(){super({id:"breadcrumbs.toggleFromEditorTitle",title:{value:(0,f.localize)(7,null),original:"Toggle Breadcrumbs"},menu:[{id:_.MenuId.NotebookEditorLayoutConfigure,group:"notebookLayoutDetails",order:2}],f1:!1})}async run(i){return i.get(A.ICommandService).executeCommand("breadcrumbs.toggle")}}),_.MenuRegistry.appendMenuItem(_.MenuId.NotebookToolbar,{command:{id:"breadcrumbs.toggle",title:{value:(0,f.localize)(8,null),original:"Toggle Breadcrumbs"}},group:"notebookLayout",order:2}),(0,_.registerAction2)(class extends _.Action2{constructor(){super({id:"notebook.saveMimeTypeOrder",title:(0,f.localize)(9,null),f1:!0,category:I.NOTEBOOK_ACTIONS_CATEGORY,precondition:w.NOTEBOOK_IS_ACTIVE_EDITOR})}run(i){const S=i.get(C.INotebookService),s=i.get(D.IQuickInputService).createQuickPick();s.placeholder=(0,f.localize)(10,null),s.items=[{target:1,label:(0,f.localize)(11,null)},{target:4,label:(0,f.localize)(12,null)}],s.onDidAccept(()=>{const l=s.selectedItems[0]?.target;l!==void 0&&S.saveMimeDisplayOrder(l),s.dispose()}),s.onDidHide(()=>s.dispose()),s.show()}})}),define(ne[2499],re([1,0,36,9,198,52,42,1676,53,108]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigureLanguageBasedSettingsAction=void 0;let v=class extends t.Action{constructor(o,c,i,S,s,l){super(o,c);this.modelService=i,this.languageService=S,this.quickInputService=s,this.preferencesService=l}async run(){const c=this.languageService.getSortedRegisteredLanguageNames().map(({languageName:i,languageId:S})=>{const s=D.localize(1,null,S);let l;const r=this.languageService.getExtensions(S);if(r.length)l=f.URI.file(r[0]);else{const p=this.languageService.getFilenames(S);p.length&&(l=f.URI.file(p[0]))}return{label:i,iconClasses:(0,_.getIconClasses)(this.modelService,this.languageService,l),description:s}});await this.quickInputService.pick(c,{placeHolder:D.localize(2,null)}).then(i=>{if(i){const S=this.languageService.getLanguageIdByLanguageName(i.label);if(typeof S=="string")return this.preferencesService.openLanguageSpecificSettings(S)}})}};v.ID="workbench.action.configureLanguageBasedSettings",v.LABEL={value:D.localize(0,null),original:"Configure Language Specific Settings..."},v=Ee([W(2,A.IModelService),W(3,k.ILanguageService),W(4,I.IQuickInputService),W(5,w.IPreferencesService)],v),e.ConfigureLanguageBasedSettingsAction=v}),define(ne[619],re([1,0,10,91,78,134,138,36,6,117,2,18,19,9,1679,236,348,7,37,5,38,45,32,68,12,34,82,321,50,108]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditPreferenceWidget=e.SearchWidget=e.SettingsTargetsWidget=e.FolderSettingsActionViewItem=void 0;let T=class extends A.BaseActionViewItem{constructor(L,M,N,B){super(null,L);this.contextService=M,this.contextMenuService=N,this.preferencesService=B,this._folderSettingCounts=new Map;const P=this.contextService.getWorkspace();this._folder=P.folders.length===1?P.folders[0]:null,this._register(this.contextService.onDidChangeWorkspaceFolders(()=>this.onWorkspaceFoldersChanged()))}get folder(){return this._folder}set folder(L){this._folder=L,this.update()}setCount(L,M){const N=this.contextService.getWorkspaceFolder(L);if(!N)throw new Error("unknown folder");const B=N.uri;this._folderSettingCounts.set(B.toString(),M),this.update()}render(L){this.element=L,this.container=L,this.labelElement=t.$(".action-title"),this.detailsElement=t.$(".action-details"),this.dropDownElement=t.$(".dropdown-icon.hide"+g.ThemeIcon.asCSSSelector(b.settingsScopeDropDownIcon)),this.anchorElement=t.$("a.action-label.folder-settings",{role:"button","aria-haspopup":"true",tabindex:"0"},this.labelElement,this.detailsElement,this.dropDownElement),this._register(t.addDisposableListener(this.anchorElement,t.EventType.MOUSE_DOWN,M=>t.EventHelper.stop(M))),this._register(t.addDisposableListener(this.anchorElement,t.EventType.CLICK,M=>this.onClick(M))),this._register(t.addDisposableListener(this.container,t.EventType.KEY_UP,M=>this.onKeyUp(M))),t.append(this.container,this.anchorElement),this.update()}onKeyUp(L){switch(new f.StandardKeyboardEvent(L).keyCode){case 3:case 10:this.onClick(L);return}}onClick(L){t.EventHelper.stop(L,!0),!this.folder||this._action.checked?this.showMenu():this._action.run(this._folder)}updateEnabled(){this.update()}updateChecked(){this.update()}onWorkspaceFoldersChanged(){const L=this._folder,M=this.contextService.getWorkspace();L&&(this._folder=M.folders.filter(N=>(0,o.isEqual)(N.uri,L.uri))[0]||M.folders[0]),this._folder=this._folder?this._folder:M.folders.length===1?M.folders[0]:null,this.update(),this._action.checked&&this._action.run(this._folder)}async update(){let L=0;this._folderSettingCounts.forEach(N=>L+=N);const M=this.contextService.getWorkspace();if(this._folder){this.labelElement.textContent=this._folder.name,this.anchorElement.title=(await this.preferencesService.getEditableSettingsURI(5,this._folder.uri))?.fsPath||"";const N=this.labelWithCount(this._action.label,L);this.detailsElement.textContent=N,this.dropDownElement.classList.toggle("hide",M.folders.length===1||!this._action.checked)}else{const N=this.labelWithCount(this._action.label,L);this.labelElement.textContent=N,this.detailsElement.textContent="",this.anchorElement.title=this._action.label,this.dropDownElement.classList.remove("hide")}this.anchorElement.classList.toggle("checked",this._action.checked),this.container.classList.toggle("disabled",!this._action.enabled)}showMenu(){this.contextMenuService.showContextMenu({getAnchor:()=>this.container,getActions:()=>this.getDropdownMenuActions(),getActionViewItem:()=>{},onHide:()=>{this.anchorElement.blur()}})}getDropdownMenuActions(){const L=[],M=this.contextService.getWorkspace().folders;return this.contextService.getWorkbenchState()===3&&M.length>0&&L.push(...M.map((N,B)=>{const P=this._folderSettingCounts.get(N.uri.toString());return{id:"folderSettingsTarget"+B,label:this.labelWithCount(N.name,P),checked:this.folder&&(0,o.isEqual)(this.folder.uri,N.uri),enabled:!0,run:()=>this._action.run(N)}})),L}labelWithCount(L,M){return M&&(L+=` (${M})`),L}};T=Ee([W(1,d.IWorkspaceContextService),W(2,r.IContextMenuService),W(3,y.IPreferencesService)],T),e.FolderSettingsActionViewItem=T;let R=class extends k.Widget{constructor(L,M,N,B,P,V,z){super();this.contextService=N,this.instantiationService=B,this.environmentService=P,this.labelService=V,this.preferencesService=z,this._settingsTarget=null,this._onDidTargetChange=this._register(new I.Emitter),this.onDidTargetChange=this._onDidTargetChange.event,this.options=M||{},this.create(L),this._register(this.contextService.onDidChangeWorkbenchState(()=>this.onWorkbenchStateChanged())),this._register(this.contextService.onDidChangeWorkspaceFolders(()=>this.update()))}create(L){const M=t.append(L,t.$(".settings-tabs-widget"));this.settingsSwitcherBar=this._register(new _.ActionBar(M,{orientation:0,focusOnlyEnabledItems:!0,ariaLabel:(0,i.localize)(0,null),animated:!1,actionViewItemProvider:z=>z.id==="folderSettings"?this.folderSettings:void 0})),this.userLocalSettings=new D.Action("userSettings",(0,i.localize)(1,null),".settings-tab",!0,()=>this.updateTarget(2)),this.preferencesService.getEditableSettingsURI(2).then(z=>{this.userLocalSettings.tooltip=z?.fsPath||""});const N=this.environmentService.remoteAuthority,B=N&&this.labelService.getHostLabel(C.Schemas.vscodeRemote,N),P=(0,i.localize)(2,null)+(B?` [${B}]`:"");this.userRemoteSettings=new D.Action("userSettingsRemote",P,".settings-tab",!0,()=>this.updateTarget(3)),this.preferencesService.getEditableSettingsURI(3).then(z=>{this.userRemoteSettings.tooltip=z?.fsPath||""}),this.workspaceSettings=new D.Action("workspaceSettings",(0,i.localize)(3,null),".settings-tab",!1,()=>this.updateTarget(4));const V=new D.Action("folderSettings",(0,i.localize)(4,null),".settings-tab",!1,async z=>{this.updateTarget((0,d.isWorkspaceFolder)(z)?z.uri:2)});this.folderSettings=this.instantiationService.createInstance(T,V),this.update(),this.settingsSwitcherBar.push([this.userLocalSettings,this.userRemoteSettings,this.workspaceSettings,V])}get settingsTarget(){return this._settingsTarget}set settingsTarget(L){this._settingsTarget=L,this.userLocalSettings.checked=this.settingsTarget===2,this.userRemoteSettings.checked=this.settingsTarget===3,this.workspaceSettings.checked=this.settingsTarget===4,this.settingsTarget instanceof c.URI?(this.folderSettings.getAction().checked=!0,this.folderSettings.folder=this.contextService.getWorkspaceFolder(this.settingsTarget)):this.folderSettings.getAction().checked=!1}setResultCount(L,M){if(L===4){let N=(0,i.localize)(5,null);M&&(N+=` (${M})`),this.workspaceSettings.label=N}else if(L===2){let N=(0,i.localize)(6,null);M&&(N+=` (${M})`),this.userLocalSettings.label=N}else L instanceof c.URI&&this.folderSettings.setCount(L,M)}onWorkbenchStateChanged(){this.folderSettings.folder=null,this.update(),this.settingsTarget===4&&this.contextService.getWorkbenchState()===3&&this.updateTarget(2)}updateTarget(L){return this.settingsTarget===L||L instanceof c.URI&&this.settingsTarget instanceof c.URI&&(0,o.isEqual)(this.settingsTarget,L)||(this.settingsTarget=L,this._onDidTargetChange.fire(this.settingsTarget)),Promise.resolve(void 0)}async update(){this.settingsSwitcherBar.domNode.classList.toggle("empty-workbench",this.contextService.getWorkbenchState()===1),this.userRemoteSettings.enabled=!!(this.options.enableRemoteSettings&&this.environmentService.remoteAuthority),this.workspaceSettings.enabled=this.contextService.getWorkbenchState()!==1,this.folderSettings.getAction().enabled=this.contextService.getWorkbenchState()===3&&this.contextService.getWorkspace().folders.length>0,this.workspaceSettings.tooltip=(await this.preferencesService.getEditableSettingsURI(4))?.fsPath||""}};R=Ee([W(2,d.IWorkspaceContextService),W(3,p.IInstantiationService),W(4,E.IWorkbenchEnvironmentService),W(5,a.ILabelService),W(6,y.IPreferencesService)],R),e.SettingsTargetsWidget=R;let O=class extends k.Widget{constructor(L,M,N,B,P,V,z){super();this.options=M,this.contextViewService=N,this.instantiationService=B,this.themeService=P,this.contextKeyService=V,this.keybindingService=z,this._onDidChange=this._register(new I.Emitter),this.onDidChange=this._onDidChange.event,this._onFocus=this._register(new I.Emitter),this.onFocus=this._onFocus.event,this.create(L)}create(L){this.domNode=t.append(L,t.$("div.settings-header-widget")),this.createSearchContainer(t.append(this.domNode,t.$("div.settings-search-container"))),this.controlsDiv=t.append(this.domNode,t.$("div.settings-search-controls")),this.options.showResultCount&&(this.countElement=t.append(this.controlsDiv,t.$(".settings-count-widget")),this._register((0,h.attachStylerCallback)(this.themeService,{badgeBackground:n.badgeBackground,contrastBorder:n.contrastBorder},B=>{const P=B.badgeBackground?B.badgeBackground.toString():"",V=B.contrastBorder?B.contrastBorder.toString():"";this.countElement.style.backgroundColor=P,this.countElement.style.borderWidth=V?"1px":"",this.countElement.style.borderStyle=V?"solid":"",this.countElement.style.borderColor=V;const z=this.themeService.getColorTheme().getColor(n.badgeForeground);this.countElement.style.color=z?z.toString():""}))),this.inputBox.inputElement.setAttribute("aria-live",this.options.ariaLive||"off"),this.options.ariaLabelledBy&&this.inputBox.inputElement.setAttribute("aria-labelledBy",this.options.ariaLabelledBy);const M=this._register(t.trackFocus(this.inputBox.inputElement));this._register(M.onDidFocus(()=>this._onFocus.fire()));const N=this.options.focusKey;N&&(this._register(M.onDidFocus(()=>N.set(!0))),this._register(M.onDidBlur(()=>N.set(!1))))}createSearchContainer(L){this.searchContainer=L;const M=t.append(this.searchContainer,t.$("div.settings-search-input"));this.inputBox=this._register(this.createInputBox(M)),this._register(this.inputBox.onDidChange(N=>this._onDidChange.fire(N)))}createInputBox(L){const M=()=>(0,s.showHistoryKeybindingHint)(this.keybindingService),N=this._register(new S.ContextScopedHistoryInputBox(L,this.contextViewService,{...this.options,showHistoryHint:M},this.contextKeyService));return this._register((0,h.attachInputBoxStyler)(N,this.themeService)),N}showMessage(L){this.countElement&&L!==this.countElement.textContent&&(this.countElement.textContent=L,this.inputBox.inputElement.setAttribute("aria-label",L),this.inputBox.inputElement.style.paddingRight=this.getControlsWidth()+"px")}layout(L){L.width<400?(this.countElement&&this.countElement.classList.add("hide"),this.inputBox.inputElement.style.paddingRight="0px"):(this.countElement&&this.countElement.classList.remove("hide"),this.inputBox.inputElement.style.paddingRight=this.getControlsWidth()+"px")}getControlsWidth(){return(this.countElement?t.getTotalWidth(this.countElement):0)+20}focus(){this.inputBox.focus(),this.getValue()&&this.inputBox.select()}hasFocus(){return this.inputBox.hasFocus()}clear(){this.inputBox.value=""}getValue(){return this.inputBox.value}setValue(L){return this.inputBox.value=L}dispose(){this.options.focusKey&&this.options.focusKey.set(!1),super.dispose()}};O=Ee([W(2,r.IContextViewService),W(3,p.IInstantiationService),W(4,g.IThemeService),W(5,l.IContextKeyService),W(6,u.IKeybindingService)],O),e.SearchWidget=O;class x extends v.Disposable{constructor(L){super();this.editor=L,this._line=-1,this._preferences=[],this._onClick=this._register(new I.Emitter),this.onClick=this._onClick.event,this._editPreferenceDecoration=[],this._register(this.editor.onMouseDown(M=>{M.target.type!==2||M.target.detail.isAfterLines||!this.isVisible()||this._onClick.fire(M)}))}get preferences(){return this._preferences}getLine(){return this._line}show(L,M,N){this._preferences=N;const B=[];this._line=L,B.push({options:{description:"edit-preference-widget-decoration",glyphMarginClassName:g.ThemeIcon.asClassName(b.settingsEditIcon),glyphMarginHoverMessage:new w.MarkdownString().appendText(M),stickiness:1},range:{startLineNumber:L,startColumn:1,endLineNumber:L,endColumn:1}}),this._editPreferenceDecoration=this.editor.deltaDecorations(this._editPreferenceDecoration,B)}hide(){this._editPreferenceDecoration=this.editor.deltaDecorations(this._editPreferenceDecoration,[])}isVisible(){return this._editPreferenceDecoration.length>0}dispose(){this.hide(),super.dispose()}}e.EditPreferenceWidget=x,(0,g.registerThemingParticipant)((F,L)=>{L.addRule(` .settings-tabs-widget > .monaco-action-bar .action-item .action-label:focus, .settings-tabs-widget > .monaco-action-bar .action-item .action-label.checked { border-bottom: 1px solid; } `);const M=F.getColor(m.PANEL_ACTIVE_TITLE_FOREGROUND),N=F.getColor(m.PANEL_ACTIVE_TITLE_BORDER);(M||N)&&L.addRule(` .settings-tabs-widget > .monaco-action-bar .action-item .action-label:hover, .settings-tabs-widget > .monaco-action-bar .action-item .action-label.checked { color: ${M}; border-bottom-color: ${N}; } `);const B=F.getColor(m.PANEL_INACTIVE_TITLE_FOREGROUND);B&&L.addRule(` .settings-tabs-widget > .monaco-action-bar .action-item .action-label { color: ${B}; } `);const P=F.getColor(n.focusBorder);if(P&&(L.addRule(` .settings-tabs-widget > .monaco-action-bar .action-item .action-label:focus { border-bottom-color: ${P} !important; } `),L.addRule(` .settings-tabs-widget > .monaco-action-bar .action-item .action-label:focus { outline: none; } `)),F.getColor(n.activeContrastBorder)){const z=F.getColor(n.activeContrastBorder);L.addRule(` .settings-tabs-widget > .monaco-action-bar .action-item .action-label.checked, .settings-tabs-widget > .monaco-action-bar .action-item .action-label:hover { outline-color: ${z}; outline-width: 1px; outline-style: solid; border-bottom: none; padding-bottom: 0; outline-offset: -1px; } .settings-tabs-widget > .monaco-action-bar .action-item .action-label:not(.checked):hover { outline-style: dashed; } `)}})}),define(ne[890],re([1,0,1672,14,2,6,392,138,10,91,128,38,37,5,68,12,32,619,13,11,7,1111]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefineKeybindingOverlayWidget=e.DefineKeybindingWidget=e.KeybindingsSearchWidget=void 0;let a=class extends l.SearchWidget{constructor(d,m,b,E,y,T,R){super(d,m,b,E,y,T,R);this.recordDisposables=this._register(new _.DisposableStore),this._onKeybinding=this._register(new A.Emitter),this.onKeybinding=this._onKeybinding.event,this._onEnter=this._register(new A.Emitter),this.onEnter=this._onEnter.event,this._onEscape=this._register(new A.Emitter),this.onEscape=this._onEscape.event,this._onBlur=this._register(new A.Emitter),this.onBlur=this._onBlur.event,this._register((0,i.attachInputBoxStyler)(this.inputBox,y)),this._register((0,_.toDisposable)(()=>this.stopRecordingKeys())),this._firstPart=null,this._chordPart=null,this._inputValue="",this._reset()}clear(){this._reset(),super.clear()}startRecordingKeys(){this.recordDisposables.add(I.addDisposableListener(this.inputBox.inputElement,I.EventType.KEY_DOWN,d=>this._onKeyDown(new w.StandardKeyboardEvent(d)))),this.recordDisposables.add(I.addDisposableListener(this.inputBox.inputElement,I.EventType.BLUR,()=>this._onBlur.fire())),this.recordDisposables.add(I.addDisposableListener(this.inputBox.inputElement,I.EventType.INPUT,()=>{this.setInputValue(this._inputValue)}))}stopRecordingKeys(){this._reset(),this.recordDisposables.clear()}setInputValue(d){this._inputValue=d,this.inputBox.value=this._inputValue}_reset(){this._firstPart=null,this._chordPart=null}_onKeyDown(d){if(d.preventDefault(),d.stopPropagation(),!this.options.recordEnter&&d.equals(3)){this._onEnter.fire();return}if(d.equals(9)){this._onEscape.fire();return}this.printKeybinding(d)}printKeybinding(d){const m=this.keybindingService.resolveKeyboardEvent(d),b=`code: ${d.browserEvent.code}, keyCode: ${d.browserEvent.keyCode}, key: ${d.browserEvent.key} => UI: ${m.getAriaLabel()}, user settings: ${m.getUserSettingsLabel()}, dispatch: ${m.getDispatchParts()[0]}`,E=this.options,y=this._firstPart&&this._firstPart.getDispatchParts()[0]!==null,T=this._chordPart&&this._chordPart.getDispatchParts()[0]!==null;y&&T?(this._firstPart=m,this._chordPart=null):y?this._chordPart=m:this._firstPart=m;let R="";this._firstPart&&(R=this._firstPart.getUserSettingsLabel()||""),this._chordPart&&(R=R+" "+this._chordPart.getUserSettingsLabel()),this.setInputValue(E.quoteRecordedKeys?`"${R}"`:R),this.inputBox.inputElement.title=b,this._onKeybinding.fire([this._firstPart,this._chordPart])}};a=Ee([W(2,o.IContextViewService),W(3,c.IInstantiationService),W(4,S.IThemeService),W(5,u.IContextKeyService),W(6,C.IKeybindingService)],a),e.KeybindingsSearchWidget=a;let n=class pn extends D.Widget{constructor(d,m,b){super();this.instantiationService=m,this.themeService=b,this._firstPart=null,this._chordPart=null,this._isVisible=!1,this._onHide=this._register(new A.Emitter),this._onDidChange=this._register(new A.Emitter),this.onDidChange=this._onDidChange.event,this._onShowExistingKeybindings=this._register(new A.Emitter),this.onShowExistingKeybidings=this._onShowExistingKeybindings.event,this.disposables=this._register(new _.DisposableStore),this.keybindingLabelStylers=this.disposables.add(new _.DisposableStore),this._domNode=(0,v.createFastDomNode)(document.createElement("div")),this._domNode.setDisplay("none"),this._domNode.setClassName("defineKeybindingWidget"),this._domNode.setWidth(pn.WIDTH),this._domNode.setHeight(pn.HEIGHT);const E=t.localize(0,null);I.append(this._domNode.domNode,I.$(".message",void 0,E)),this._register((0,i.attachStylerCallback)(this.themeService,{editorWidgetBackground:s.editorWidgetBackground,editorWidgetForeground:s.editorWidgetForeground,widgetShadow:s.widgetShadow},y=>{y.editorWidgetBackground?this._domNode.domNode.style.backgroundColor=y.editorWidgetBackground.toString():this._domNode.domNode.style.backgroundColor="",y.editorWidgetForeground?this._domNode.domNode.style.color=y.editorWidgetForeground.toString():this._domNode.domNode.style.color="",y.widgetShadow?this._domNode.domNode.style.boxShadow=`0 2px 8px ${y.widgetShadow}`:this._domNode.domNode.style.boxShadow=""})),this._keybindingInputWidget=this._register(this.instantiationService.createInstance(a,this._domNode.domNode,{ariaLabel:E,history:[]})),this._keybindingInputWidget.startRecordingKeys(),this._register(this._keybindingInputWidget.onKeybinding(y=>this.onKeybinding(y))),this._register(this._keybindingInputWidget.onEnter(()=>this.hide())),this._register(this._keybindingInputWidget.onEscape(()=>this.onCancel())),this._register(this._keybindingInputWidget.onBlur(()=>this.onCancel())),this._outputNode=I.append(this._domNode.domNode,I.$(".output")),this._showExistingKeybindingsNode=I.append(this._domNode.domNode,I.$(".existing")),d&&I.append(d,this._domNode.domNode)}get domNode(){return this._domNode.domNode}define(){return this._keybindingInputWidget.clear(),p.Promises.withAsyncBody(async d=>{this._isVisible||(this._isVisible=!0,this._domNode.setDisplay("block"),this._firstPart=null,this._chordPart=null,this._keybindingInputWidget.setInputValue(""),I.clearNode(this._outputNode),I.clearNode(this._showExistingKeybindingsNode),await(0,p.timeout)(0),this._keybindingInputWidget.focus());const m=this._onHide.event(()=>{d(this.getUserSettingsLabel()),m.dispose()})})}layout(d){const m=Math.round((d.height-pn.HEIGHT)/2);this._domNode.setTop(m);const b=Math.round((d.width-pn.WIDTH)/2);this._domNode.setLeft(b)}printExisting(d){if(d>0){const m=I.$("span.existingText"),b=d===1?t.localize(1,null,d):t.localize(2,null,d);I.append(m,document.createTextNode(b)),this._showExistingKeybindingsNode.appendChild(m),m.onmousedown=E=>{E.preventDefault()},m.onmouseup=E=>{E.preventDefault()},m.onclick=()=>{this._onShowExistingKeybindings.fire(this.getUserSettingsLabel())}}}onKeybinding(d){const[m,b]=d;this._firstPart=m,this._chordPart=b,I.clearNode(this._outputNode),I.clearNode(this._showExistingKeybindingsNode),this.keybindingLabelStylers.clear();const E=new k.KeybindingLabel(this._outputNode,f.OS);if(E.set((0,r.withNullAsUndefined)(this._firstPart)),this.keybindingLabelStylers.add((0,i.attachKeybindingLabelStyler)(E,this.themeService)),this._chordPart){this._outputNode.appendChild(document.createTextNode(t.localize(3,null)));const T=new k.KeybindingLabel(this._outputNode,f.OS);T.set(this._chordPart),this.keybindingLabelStylers.add((0,i.attachKeybindingLabelStyler)(T,this.themeService))}const y=this.getUserSettingsLabel();y&&this._onDidChange.fire(y)}getUserSettingsLabel(){let d=null;return this._firstPart&&(d=this._firstPart.getUserSettingsLabel(),this._chordPart&&(d=d+" "+this._chordPart.getUserSettingsLabel())),d}onCancel(){this._firstPart=null,this._chordPart=null,this.hide()}hide(){this._domNode.setDisplay("none"),this._isVisible=!1,this._onHide.fire()}};n.WIDTH=400,n.HEIGHT=110,n=Ee([W(1,c.IInstantiationService),W(2,S.IThemeService)],n),e.DefineKeybindingWidget=n;let h=class ta extends _.Disposable{constructor(d,m){super();this._editor=d,this._widget=m.createInstance(n,null),this._editor.addOverlayWidget(this)}getId(){return ta.ID}getDomNode(){return this._widget.domNode}getPosition(){return{preference:null}}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}start(){this._editor.hasModel()&&this._editor.revealPositionInCenterIfOutsideViewport(this._editor.getPosition(),0);const d=this._editor.getLayoutInfo();return this._widget.layout(new I.Dimension(d.width,d.height)),this._widget.define()}};h.ID="editor.contrib.defineKeybindingWidget",h=Ee([W(1,c.IInstantiationService)],h),e.DefineKeybindingOverlayWidget=h}),define(ne[2500],re([1,0,1674,11,117,97,222,2,38,5,7,20,39,173,2197,890,298,118,58,874,12,164,122,442,15,13,85,19]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingEditorDecorationsRenderer=e.KeybindingWidgetRenderer=e.DefineKeybindingController=void 0;const E=t.localize(0,null),y=t.localize(1,null);let T=class ia extends D.Disposable{constructor(M,N,B){super();this._editor=M,this._instantiationService=N,this._environmentService=B,this._register(this._editor.onDidChangeModel(P=>this._update())),this._update()}static get(M){return M.getContribution(ia.ID)}get keybindingWidgetRenderer(){return this._keybindingWidgetRenderer}dispose(){this._disposeKeybindingWidgetRenderer(),this._disposeKeybindingDecorationRenderer(),super.dispose()}_update(){if(!F(this._editor,this._environmentService)){this._disposeKeybindingWidgetRenderer(),this._disposeKeybindingDecorationRenderer();return}this._createKeybindingDecorationRenderer(),this._editor.getOption(81)?this._disposeKeybindingWidgetRenderer():this._createKeybindingWidgetRenderer()}_createKeybindingWidgetRenderer(){this._keybindingWidgetRenderer||(this._keybindingWidgetRenderer=this._instantiationService.createInstance(R,this._editor))}_disposeKeybindingWidgetRenderer(){this._keybindingWidgetRenderer&&(this._keybindingWidgetRenderer.dispose(),this._keybindingWidgetRenderer=void 0)}_createKeybindingDecorationRenderer(){this._keybindingDecorationRenderer||(this._keybindingDecorationRenderer=this._instantiationService.createInstance(O,this._editor))}_disposeKeybindingDecorationRenderer(){this._keybindingDecorationRenderer&&(this._keybindingDecorationRenderer.dispose(),this._keybindingDecorationRenderer=void 0)}};T.ID="editor.contrib.defineKeybinding",T=Ee([W(1,w.IInstantiationService),W(2,m.IEnvironmentService)],T),e.DefineKeybindingController=T;let R=class extends D.Disposable{constructor(M,N){super();this._editor=M,this._instantiationService=N,this._launchWidget=this._register(this._instantiationService.createInstance(s.FloatingClickWidget,this._editor,E,x.ID)),this._register(this._launchWidget.onClick(()=>this.showDefineKeybindingWidget())),this._defineWidget=this._register(this._instantiationService.createInstance(S.DefineKeybindingOverlayWidget,this._editor)),this._launchWidget.render()}showDefineKeybindingWidget(){this._defineWidget.start().then(M=>this._onAccepted(M))}_onAccepted(M){if(this._editor.focus(),M&&this._editor.hasModel()){new RegExp(/\\/g).test(M)&&(M=M.slice(0,-1)+"\\\\");let P=["{",' "key": '+JSON.stringify(M)+",",' "command": "${1:commandId}",',' "when": "${2:editorTextFocus}"',"}$0"].join(` `);const V=i.SmartSnippetInserter.insertSnippet(this._editor.getModel(),this._editor.getPosition());P=V.prepend+P+V.append,this._editor.setPosition(V.position),c.SnippetController2.get(this._editor)?.insert(P,{overwriteBefore:0,overwriteAfter:0})}}};R=Ee([W(1,w.IInstantiationService)],R),e.KeybindingWidgetRenderer=R;let O=class na extends D.Disposable{constructor(M,N){super();this._editor=M,this._keybindingService=N,this._dec=[],this._updateDecorations=this._register(new f.RunOnceScheduler(()=>this._updateDecorationsNow(),500));const B=(0,d.assertIsDefined)(this._editor.getModel());this._register(B.onDidChangeContent(()=>this._updateDecorations.schedule())),this._register(this._keybindingService.onDidUpdateKeybindings(P=>this._updateDecorations.schedule())),this._register({dispose:()=>{this._dec=this._editor.deltaDecorations(this._dec,[]),this._updateDecorations.cancel()}}),this._updateDecorations.schedule()}_updateDecorationsNow(){const M=(0,d.assertIsDefined)(this._editor.getModel()),N=[],B=(0,l.parseTree)(M.getValue());if(B&&Array.isArray(B.children))for(let P=0,V=B.children.length;P<V;P++){const z=B.children[P],U=this._getDecorationForEntry(M,z);U!==null&&N.push(U)}this._dec=this._editor.deltaDecorations(this._dec,N)}_getDecorationForEntry(M,N){if(!Array.isArray(N.children))return null;for(let B=0,P=N.children.length;B<P;B++){const V=N.children[B];if(V.type!=="property"||!Array.isArray(V.children)||V.children.length!==2||V.children[0].value!=="key")continue;const U=V.children[1];if(U.type!=="string")continue;const H=this._keybindingService.resolveUserBinding(U.value);if(H.length===0)return this._createDecoration(!0,null,null,M,U);const K=H[0];let G=null;if(K instanceof p.WindowsNativeResolvedKeybinding&&(G=K.getUSLabel()),!K.isWYSIWYG()){const Z=K.getLabel();return typeof Z=="string"&&U.value.toLowerCase()===Z.toLowerCase()?null:this._createDecoration(!1,K.getLabel(),G,M,U)}if(/abnt_|oem_/.test(U.value))return this._createDecoration(!1,K.getLabel(),G,M,U);const q=K.getUserSettingsLabel();return typeof q=="string"&&!na._userSettingsFuzzyEquals(U.value,q)?this._createDecoration(!1,K.getLabel(),G,M,U):null}return null}static _userSettingsFuzzyEquals(M,N){if(M=M.trim().toLowerCase(),N=N.trim().toLowerCase(),M===N)return!0;const B=h.KeybindingParser.parseUserBinding(M),P=h.KeybindingParser.parseUserBinding(N);return(0,g.equals)(B,P,(V,z)=>this._userBindingEquals(V,z))}static _userBindingEquals(M,N){return M===null&&N===null?!0:!M||!N?!1:M instanceof k.SimpleKeybinding&&N instanceof k.SimpleKeybinding||M instanceof k.ScanCodeBinding&&N instanceof k.ScanCodeBinding?M.equals(N):!1}_createDecoration(M,N,B,P,V){let z,U,H;M?(z=new _.MarkdownString().appendText(y),U="keybindingError",H=(0,u.themeColorFromId)(a.overviewRulerError)):(B&&N!==B?z=new _.MarkdownString(t.localize(2,null,N,B)):z=new _.MarkdownString(t.localize(3,null,N)),U="keybindingInfo",H=(0,u.themeColorFromId)(a.overviewRulerInfo));const K=P.getPositionAt(V.offset),G=P.getPositionAt(V.offset+V.length);return{range:new C.Range(K.lineNumber,K.column,G.lineNumber,G.column),options:{description:"keybindings-widget",stickiness:1,className:U,hoverMessage:z,overviewRuler:{color:H,position:n.OverviewRulerLane.Right}}}}};O=Ee([W(1,I.IKeybindingService)],O),e.KeybindingEditorDecorationsRenderer=O;class x extends o.EditorCommand{constructor(){super({id:x.ID,precondition:v.ContextKeyExpr.and(r.EditorContextKeys.writable,r.EditorContextKeys.languageId.isEqualTo("jsonc")),kbOpts:{kbExpr:r.EditorContextKeys.editorTextFocus,primary:(0,A.KeyChord)(2048|41,2048|41),weight:100}})}runEditorCommand(M,N){if(!F(N,M.get(m.IEnvironmentService))||N.getOption(81))return;const B=T.get(N);B&&B.keybindingWidgetRenderer&&B.keybindingWidgetRenderer.showDefineKeybindingWidget()}}x.ID="editor.action.defineKeybinding";function F(L,M){const N=L.getModel();return N?(0,b.isEqual)(N.uri,M.keybindingsResource):!1}(0,o.registerEditorContribution)(T.ID,T),(0,o.registerEditorCommand)(new x)}),define(ne[620],re([1,0,15,29,13,9,1683,808,322,108,50,191,2,6,57,42]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseQuery=e.SearchResultModel=e.SearchResultIdx=e.isExcludeSetting=e.settingKeyToDisplayFormat=e.inspectSetting=e.SettingsTreeModel=e.SettingsTreeSettingElement=e.SettingsTreeNewExtensionsElement=e.SettingsTreeGroupElement=e.SettingsTreeElement=e.ONLINE_SERVICES_SETTING_TAG=void 0,e.ONLINE_SERVICES_SETTING_TAG="usesOnlineServices";class s extends o.Disposable{constructor(V){super();this._tabbable=!1,this._onDidChangeTabbable=new c.Emitter,this.onDidChangeTabbable=this._onDidChangeTabbable.event,this.id=V}get tabbable(){return this._tabbable}set tabbable(V){this._tabbable=V,this._onDidChangeTabbable.fire()}}e.SettingsTreeElement=s;class l extends s{constructor(V,z,U,H,K){super(V);this._childSettingKeys=new Set,this._children=[],this.count=z,this.label=U,this.level=H,this.isFirstGroup=K}get children(){return this._children}set children(V){this._children=V,this._childSettingKeys=new Set,this._children.forEach(z=>{z instanceof p&&this._childSettingKeys.add(z.setting.key)})}containsSetting(V){return this._childSettingKeys.has(V)}}e.SettingsTreeGroupElement=l;class r extends s{constructor(V,z){super(V);this.extensionIds=z}}e.SettingsTreeNewExtensionsElement=r;class p extends s{constructor(V,z,U,H,K){super(h(z.id+"_"+V.key));this.languageService=K,this._displayCategory=null,this._displayLabel=null,this.isConfigured=!1,this.isUntrusted=!1,this.overriddenScopeList=[],this.languageOverrideValues=new Map,this.setting=V,this.parent=z,this.update(U,H)}get displayCategory(){return this._displayCategory||this.initLabels(),this._displayCategory}get displayLabel(){return this._displayLabel||this.initLabels(),this._displayLabel}initLabels(){const V=g(this.setting.key,this.parent.id,this.setting.isLanguageTagSetting);this._displayLabel=V.label,this._displayCategory=V.category}update(V,z){const{isConfigured:U,inspected:H,targetSelector:K,inspectedLanguageOverrides:G,languageSelector:q}=V;switch(K){case"workspaceFolderValue":case"workspaceValue":this.isUntrusted=!!this.setting.restricted&&!z;break}let Z=U?H[K]:H.defaultValue;const j=[];if(K!=="workspaceValue"&&typeof H.workspaceValue!="undefined"&&j.push((0,k.localize)(0,null)),K!=="userRemoteValue"&&typeof H.userRemoteValue!="undefined"&&j.push((0,k.localize)(1,null)),K!=="userLocalValue"&&typeof H.userLocalValue!="undefined"&&j.push((0,k.localize)(2,null)),H.overrideIdentifiers)for(const X of H.overrideIdentifiers){const Y=G.get(X);Y&&this.languageOverrideValues.set(X,Y)}if(q&&this.languageOverrideValues.has(q)){const X=this.languageOverrideValues.get(q);Z=(U?X[K]:X.defaultValue)??Z,this.value=Z,this.scopeValue=U&&X[K],this.defaultValue=X.defaultValue??H.defaultValue}else this.value=Z,this.scopeValue=U&&H[K],this.defaultValue=H.defaultValue;if(this.isConfigured=U,(U||this.setting.tags||this.tags||this.setting.restricted)&&(this.tags=new Set,U&&this.tags.add(I.MODIFIED_SETTING_TAG),this.setting.tags&&this.setting.tags.forEach(X=>this.tags.add(X)),this.setting.restricted&&this.tags.add(I.REQUIRE_TRUSTED_WORKSPACE_SETTING_TAG)),this.overriddenScopeList=j,this.setting.description.length>p.MAX_DESC_LINES){const X=this.setting.description.slice(0,p.MAX_DESC_LINES);X.push("[...]"),this.description=X.join(` `)}else this.description=this.setting.description.join(` `);this.setting.enum&&(!this.setting.type||T(this.setting.type))?this.valueType=w.SettingValueType.Enum:this.setting.type==="string"?this.setting.editPresentation===i.EditPresentationTypes.Multiline?this.valueType=w.SettingValueType.MultilineString:this.valueType=w.SettingValueType.String:b(this.setting)?this.valueType=w.SettingValueType.Exclude:this.setting.type==="integer"?this.valueType=w.SettingValueType.Integer:this.setting.type==="number"?this.valueType=w.SettingValueType.Number:this.setting.type==="boolean"?this.valueType=w.SettingValueType.Boolean:this.setting.type==="array"&&this.setting.arrayItemType&&["string","enum","number","integer"].includes(this.setting.arrayItemType)?this.valueType=w.SettingValueType.Array:(0,_.isArray)(this.setting.type)&&this.setting.type.includes(w.SettingValueType.Null)&&this.setting.type.length===2?this.setting.type.includes(w.SettingValueType.Integer)?this.valueType=w.SettingValueType.NullableInteger:this.setting.type.includes(w.SettingValueType.Number)?this.valueType=w.SettingValueType.NullableNumber:this.valueType=w.SettingValueType.Complex:y(this.setting)?this.setting.allKeysAreBoolean?this.valueType=w.SettingValueType.BooleanObject:this.valueType=w.SettingValueType.Object:this.setting.isLanguageTagSetting?this.valueType=w.SettingValueType.LanguageTag:this.valueType=w.SettingValueType.Complex}matchesAllTags(V){if(!V||!V.size)return!0;if(this.tags){let z=!0;return V.forEach(U=>{z=z&&this.tags.has(U)}),z}else return!1}matchesScope(V,z){const U=A.URI.isUri(V)?5:V;return this.setting.scope?U===5?C.FOLDER_SCOPES.indexOf(this.setting.scope)!==-1:U===4?C.WORKSPACE_SCOPES.indexOf(this.setting.scope)!==-1:U===3?C.REMOTE_MACHINE_SCOPES.indexOf(this.setting.scope)!==-1:U===2&&z?C.LOCAL_MACHINE_SCOPES.indexOf(this.setting.scope)!==-1:!0:!0}matchesAnyExtension(V){return!V||!V.size?!0:this.setting.extensionInfo?Array.from(V).some(z=>z.toLowerCase()===this.setting.extensionInfo.id.toLowerCase()):!1}matchesAnyFeature(V){if(!V||!V.size)return!0;const z=D.tocData.children.find(U=>U.id==="features");return Array.from(V).some(U=>{if(z&&z.children){const H=z.children.find(K=>"features/"+U===K.id);if(H){const K=H.settings?.map(G=>u(G));return K&&!this.setting.extensionInfo&&K.some(G=>G.test(this.setting.key.toLowerCase()))}else return!1}else return!1})}matchesAnyId(V){return!V||!V.size?!0:V.has(this.setting.key)}matchesAllLanguages(V){return V?this.languageService.isRegisteredLanguageId(V)?this.setting.scope===5:!1:!0}}e.SettingsTreeSettingElement=p,p.MAX_DESC_LINES=20;function u(P){return P=(0,f.escapeRegExpCharacters)(P).replace(/\\\*/g,".*"),new RegExp(`^${P}$`,"i")}let a=class{constructor(V,z,U,H){this._viewState=V,this._isWorkspaceTrusted=z,this._configurationService=U,this._languageService=H,this._treeElementsBySettingName=new Map}get root(){return this._root}update(V=this._tocRoot){this._treeElementsBySettingName.clear();const z=this.createSettingsTreeGroupElement(V);z.children[0]instanceof l&&(z.children[0].isFirstGroup=!0),this._root?(this.disposeChildren(this._root.children),this._root.children=z.children):this._root=z}updateWorkspaceTrust(V){this._isWorkspaceTrusted=V,this.updateRequireTrustedTargetElements()}disposeChildren(V){for(let z of V)this.recursiveDispose(z)}recursiveDispose(V){V instanceof l&&this.disposeChildren(V.children),V.dispose()}getElementsByName(V){return(0,_.withUndefinedAsNull)(this._treeElementsBySettingName.get(V))}updateElementsByName(V){!this._treeElementsBySettingName.has(V)||this.updateSettings(this._treeElementsBySettingName.get(V))}updateRequireTrustedTargetElements(){this.updateSettings(t.flatten([...this._treeElementsBySettingName.values()]).filter(V=>V.isUntrusted))}updateSettings(V){V.forEach(z=>{const U=n(z.setting.key,this._viewState.settingsTarget,this._viewState.languageFilter,this._configurationService);z.update(U,this._isWorkspaceTrusted)})}createSettingsTreeGroupElement(V,z){const U=z?this.getDepth(z)+1:0,H=new l(V.id,void 0,V.label,U,!1);H.parent=z;const K=[];if(V.settings){const G=V.settings.map(q=>this.createSettingsTreeSettingElement(q,H)).filter(q=>q.setting.deprecationMessage?q.isConfigured:!0);K.push(...G)}if(V.children){const G=V.children.map(q=>this.createSettingsTreeGroupElement(q,H));K.push(...G)}return H.children=K,H}getDepth(V){return V.parent?1+this.getDepth(V.parent):0}createSettingsTreeSettingElement(V,z){const U=n(V.key,this._viewState.settingsTarget,this._viewState.languageFilter,this._configurationService),H=new p(V,z,U,this._isWorkspaceTrusted,this._languageService),K=this._treeElementsBySettingName.get(V.key)||[];return K.push(H),this._treeElementsBySettingName.set(V.key,K),H}};a=Ee([W(2,C.IWorkbenchConfigurationService),W(3,S.ILanguageService)],a),e.SettingsTreeModel=a;function n(P,V,z,U){const H=A.URI.isUri(V)?{resource:V}:void 0,K=U.inspect(P,H),G=V===2?"userLocalValue":V===3?"userRemoteValue":V===4?"workspaceValue":"workspaceFolderValue",q=V===2?"userLocal":V===3?"userRemote":V===4?"workspace":"workspaceFolder";let Z=typeof K[G]!="undefined";Z||(V===2?Z=!!U.restrictedSettings.userLocal?.includes(P):V===3?Z=!!U.restrictedSettings.userRemote?.includes(P):V===4?Z=!!U.restrictedSettings.workspace?.includes(P):V instanceof A.URI&&(Z=!!U.restrictedSettings.workspaceFolder?.get(V)?.includes(P)));const j=K.overrideIdentifiers,X=new Map;if(z&&(Z=!1),j){for(const Y of j)X.set(Y,U.inspect(P,{overrideIdentifier:Y}));z&&X.has(z)&&typeof X.get(z)[q]?.override!="undefined"&&(Z=!0)}return{isConfigured:Z,inspected:K,targetSelector:G,inspectedLanguageOverrides:X,languageSelector:z}}e.inspectSetting=n;function h(P){return P.replace(/[\.\/]/,"_")}function g(P,V="",z=!1){const U=P.lastIndexOf(".");let H="";U>=0&&(H=P.substring(0,U),P=P.substring(U+1)),V=V.replace(/\//g,"."),H=m(H,V),H=d(H),z&&(P=P.replace(/[\[\]]/g,""),P="$(bracket) "+P);const K=d(P);return{category:H,label:K}}e.settingKeyToDisplayFormat=g;function d(P){P=P.replace(/\.([a-z0-9])/g,(V,z)=>` \u203A ${z.toUpperCase()}`).replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/^[a-z]/g,V=>V.toUpperCase()).replace(/\b\w+\b/g,V=>D.knownAcronyms.has(V.toLowerCase())?V.toUpperCase():V);for(const[V,z]of D.knownTermMappings)P=P.replace(new RegExp(`\\b${V}\\b`,"gi"),z);return P}function m(P,V){const z=H=>{/insiders$/i.test(P)||(V=V.replace(/-?insiders$/i,""));const K=V.split(".").map(G=>G.replace(/-/g,"").toLowerCase()===P.toLowerCase()?G.replace(/-/g,""):G);for(;K.length;){const G=new RegExp(`^${K.join("\\.")}(\\.|$)`,"i");if(G.test(P))return P.replace(G,"");H?K.pop():K.shift()}return null};let U=z(!0);return U===null&&(U=z(!1)),U===null&&(U=P),U}function b(P){return P.key==="files.exclude"||P.key==="search.exclude"||P.key==="workbench.localHistory.exclude"||P.key==="files.watcherExclude"}e.isExcludeSetting=b;function E({type:P}){return P==="string"||P==="boolean"||P==="integer"||P==="number"}function y({type:P,objectProperties:V,objectPatternProperties:z,objectAdditionalProperties:U}){if(P!=="object"||(0,_.isUndefinedOrNull)(V)&&(0,_.isUndefinedOrNull)(z)&&(0,_.isUndefinedOrNull)(U)||(U===!0||U===void 0)&&!Object.keys(z??{}).includes(".*"))return!1;const H=[...Object.values(V??{}),...Object.values(z??{})];return U&&typeof U=="object"&&H.push(U),t.flatten(H.map(G=>Array.isArray(G.anyOf)?G.anyOf:[G])).every(E)}function T(P){const V=["string","boolean","null","integer","number"];return((0,_.isArray)(P)?P:[P]).every(U=>V.includes(U))}var R;(function(P){P[P.Local=0]="Local",P[P.Remote=1]="Remote",P[P.NewExtensions=2]="NewExtensions"})(R=e.SearchResultIdx||(e.SearchResultIdx={}));let O=class extends a{constructor(V,z,U,H,K){super(V,z,U,K);this.environmentService=H,this.rawSearchResults=null,this.cachedUniqueSearchResults=null,this.newExtensionSearchResults=null,this.id="searchResultModel",this.update({id:"searchResultModel",label:""})}getUniqueResults(){if(this.cachedUniqueSearchResults)return this.cachedUniqueSearchResults;if(!this.rawSearchResults)return[];const V=new Set,z=this.rawSearchResults[0];z&&z.filterMatches.forEach(H=>V.add(H.setting.key));const U=this.rawSearchResults[1];return U&&(U.filterMatches=U.filterMatches.filter(H=>!V.has(H.setting.key))),U&&(this.newExtensionSearchResults=this.rawSearchResults[2]),this.cachedUniqueSearchResults=[z,U],this.cachedUniqueSearchResults}getRawResults(){return this.rawSearchResults||[]}setResult(V,z){if(this.cachedUniqueSearchResults=null,this.newExtensionSearchResults=null,this.rawSearchResults=this.rawSearchResults||[],!z){delete this.rawSearchResults[V];return}z.exactMatch&&(this.rawSearchResults=[]),this.rawSearchResults[V]=z,this.updateChildren()}updateChildren(){this.update({id:"searchResultModel",label:"searchResultModel",settings:this.getFlatSettings()});const V=!!this.environmentService.remoteAuthority;if(this.root.children=this.root.children.filter(z=>z instanceof p&&z.matchesAllTags(this._viewState.tagFilters)&&z.matchesScope(this._viewState.settingsTarget,V)&&z.matchesAnyExtension(this._viewState.extensionFilters)&&z.matchesAnyId(this._viewState.idFilters)&&z.matchesAnyFeature(this._viewState.featureFilters)&&z.matchesAllLanguages(this._viewState.languageFilter)),this.newExtensionSearchResults&&this.newExtensionSearchResults.filterMatches.length){const z=this.newExtensionSearchResults.filterMatches.map(H=>H.setting).filter(H=>H.extensionName&&H.extensionPublisher).map(H=>`${H.extensionPublisher}.${H.extensionName}`),U=new r("newExtensions",t.distinct(z));U.parent=this._root,this._root.children.push(U)}}getFlatSettings(){const V=[];return t.coalesce(this.getUniqueResults()).forEach(z=>{V.push(...z.filterMatches.map(U=>U.setting))}),V}};O=Ee([W(2,C.IWorkbenchConfigurationService),W(3,v.IWorkbenchEnvironmentService),W(4,S.ILanguageService)],O),e.SearchResultModel=O;const x=/(^|\s)@tag:("([^"]*)"|[^"]\S*)/g,F=/(^|\s)@ext:("([^"]*)"|[^"]\S*)?/g,L=/(^|\s)@feature:("([^"]*)"|[^"]\S*)?/g,M=/(^|\s)@id:("([^"]*)"|[^"]\S*)?/g,N=/(^|\s)@lang:("([^"]*)"|[^"]\S*)?/g;function B(P){function V(q,Z,j){return q.replace(Z,(X,Y,$,J)=>{const ee=J||$;return ee&&j.push(...ee.split(",").map(te=>te.trim()).filter(te=>!(0,f.isFalsyOrWhitespace)(te))),""})}const z=[];P=P.replace(x,(q,Z,j,X)=>(z.push(X||j),"")),P=P.replace(`@${I.MODIFIED_SETTING_TAG}`,()=>(z.push(I.MODIFIED_SETTING_TAG),""));const U=[],H=[],K=[],G=[];return P=V(P,F,U),P=V(P,L,H),P=V(P,M,K),I.ENABLE_LANGUAGE_FILTER&&(P=V(P,N,G)),P=P.trim(),{tags:z,extensionFilters:U,featureFilters:H,idFilters:K,languageFilter:G.length?G[0]:void 0,query:P}}e.parseQuery=B}),define(ne[621],re([1,0,1688,743,21,16,40,11,2,1992,14,5,38,28,27,54,210,8,33,53,24,59,245,108,225,77]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClearCommandHistoryAction=e.ShowAllCommandsAction=e.CommandsQuickAccessProvider=void 0;let m=class extends w.AbstractEditorCommandsQuickAccessProvider{constructor(T,R,O,x,F,L,M,N,B,P,V){super({showAlias:!v.Language.isDefaultVariant(),noResultsPick:{label:(0,t.localize)(0,null),commandId:""}},x,F,L,M,N);this.editorService=T,this.menuService=R,this.extensionService=O,this.configurationService=B,this.editorGroupService=P,this.preferencesService=V,this.extensionRegistrationRace=Promise.race([(0,D.timeout)(800),this.extensionService.whenInstalledExtensionsRegistered()])}get activeTextEditorControl(){return this.editorService.activeTextEditorControl}get defaultFilterValue(){if(this.configuration.preserveInput)return s.DefaultQuickAccessFilterValue.LAST}get configuration(){return{preserveInput:this.configurationService.getValue().workbench.commandPalette.preserveInput}}async getCommandPicks(T,R){return await this.extensionRegistrationRace,R.isCancellationRequested?[]:[...this.getCodeEditorCommandPicks(),...this.getGlobalCommandPicks(T)].map(O=>({...O,buttons:[{iconClass:r.Codicon.gear.classNames,tooltip:(0,t.localize)(1,null)}],trigger:()=>(this.preferencesService.openGlobalKeybindingSettings(!1,{query:`@command:${O.commandId}`}),n.TriggerAction.CLOSE_PICKER)}))}getGlobalCommandPicks(T){const R=[],O=this.editorService.activeEditorPane?.scopedContextKeyService||this.editorGroupService.activeGroup.scopedContextKeyService,x=this.menuService.createMenu(A.MenuId.CommandPalette,O),F=x.getActions().reduce((L,[,M])=>[...L,...M],[]).filter(L=>L instanceof A.MenuItemAction&&L.enabled);for(const L of F){let M=(typeof L.item.title=="string"?L.item.title:L.item.title.value)||L.item.id;const N=typeof L.item.category=="string"?L.item.category:L.item.category?.value;N&&(M=(0,t.localize)(2,null,N,M));const B=typeof L.item.title!="string"?L.item.title.original:void 0,P=N&&L.item.category&&typeof L.item.category!="string"?L.item.category.original:void 0,V=B&&N?P?`${P}: ${B}`:`${N}: ${B}`:B;R.push({commandId:L.item.id,commandAlias:V,label:(0,g.stripIcons)(M)})}return x.dispose(),T.add((0,I.toDisposable)(()=>(0,I.dispose)(F))),R}};m=Ee([W(0,_.IEditorService),W(1,A.IMenuService),W(2,k.IExtensionService),W(3,C.IInstantiationService),W(4,o.IKeybindingService),W(5,c.ICommandService),W(6,i.ITelemetryService),W(7,S.IDialogService),W(8,l.IConfigurationService),W(9,a.IEditorGroupsService),W(10,h.IPreferencesService)],m),e.CommandsQuickAccessProvider=m;class b extends A.Action2{constructor(){super({id:b.ID,title:{value:(0,t.localize)(3,null),original:"Show All Commands"},f1:!0,keybinding:{weight:200,when:void 0,primary:d.isFirefox?void 0:2048|1024|46,secondary:[59]}})}async run(T){T.get(p.IQuickInputService).quickAccess.show(m.PREFIX)}}e.ShowAllCommandsAction=b,b.ID="workbench.action.showCommands";class E extends A.Action2{constructor(){super({id:"workbench.action.clearCommandHistory",title:{value:(0,t.localize)(4,null),original:"Clear Command History"},f1:!0})}async run(T){const R=T.get(l.IConfigurationService),O=T.get(u.IStorageService);f.CommandsHistory.getConfiguredCommandHistoryLength(R)>0&&f.CommandsHistory.clearHistory(R,O)}}e.ClearCommandHistoryAction=E}),define(ne[2501],re([1,0,1689,210,17,1974,2491,621,16,7,317,94,58]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const c=_.Registry.as(f.Extensions.Quickaccess);c.registerQuickAccessProvider({ctor:A.HelpQuickAccessProvider,prefix:A.HelpQuickAccessProvider.PREFIX,placeholder:(0,t.localize)(0,null,A.HelpQuickAccessProvider.PREFIX),helpEntries:[{description:(0,t.localize)(1,null),needsEditor:!1}]}),c.registerQuickAccessProvider({ctor:k.ViewQuickAccessProvider,prefix:k.ViewQuickAccessProvider.PREFIX,contextKey:"inViewsPicker",placeholder:(0,t.localize)(2,null),helpEntries:[{description:(0,t.localize)(3,null),needsEditor:!1}]}),c.registerQuickAccessProvider({ctor:D.CommandsQuickAccessProvider,prefix:D.CommandsQuickAccessProvider.PREFIX,contextKey:"inCommandsPicker",placeholder:(0,t.localize)(4,null),helpEntries:[{description:(0,t.localize)(5,null),needsEditor:!1}]}),I.MenuRegistry.appendMenuItem(I.MenuId.MenubarViewMenu,{group:"1_open",command:{id:D.ShowAllCommandsAction.ID,title:(0,t.localize)(6,null)},order:1}),I.MenuRegistry.appendMenuItem(I.MenuId.MenubarHelpMenu,{group:"1_welcome",command:{id:D.ShowAllCommandsAction.ID,title:(0,t.localize)(7,null)},order:2}),I.MenuRegistry.appendMenuItem(I.MenuId.MenubarViewMenu,{group:"1_open",command:{id:k.OpenViewPickerAction.ID,title:(0,t.localize)(8,null)},order:2}),I.MenuRegistry.appendMenuItem(I.MenuId.MenubarGoMenu,{group:"5_infile_nav",command:{id:"workbench.action.gotoLine",title:(0,t.localize)(9,null)},order:1}),I.MenuRegistry.appendMenuItem(I.MenuId.GlobalActivity,{group:"1_command",command:{id:D.ShowAllCommandsAction.ID,title:(0,t.localize)(10,null)},order:1}),I.MenuRegistry.appendMenuItem(I.MenuId.EditorContext,{group:"z_commands",when:o.EditorContextKeys.editorSimpleInput.toNegated(),command:{id:D.ShowAllCommandsAction.ID,title:(0,t.localize)(11,null)},order:1}),(0,I.registerAction2)(D.ClearCommandHistoryAction),(0,I.registerAction2)(D.ShowAllCommandsAction),(0,I.registerAction2)(k.OpenViewPickerAction),(0,I.registerAction2)(k.QuickAccessViewPickerAction);const i="inViewsPicker",S=w.ContextKeyExpr.and(v.inQuickPickContext,w.ContextKeyExpr.has(i)),s=k.QuickAccessViewPickerAction.KEYBINDING,l="workbench.action.quickOpenNavigateNextInViewPicker";C.KeybindingsRegistry.registerCommandAndKeybindingRule({id:l,weight:200+50,handler:(0,v.getQuickNavigateHandler)(l,!0),when:S,primary:s.primary,linux:s.linux,mac:s.mac});const r="workbench.action.quickOpenNavigatePreviousInViewPicker";C.KeybindingsRegistry.registerCommandAndKeybindingRule({id:r,weight:200+50,handler:(0,v.getQuickNavigateHandler)(r,!1),when:S,primary:s.primary|1024,linux:s.linux,mac:{primary:s.mac.primary|1024}})}),define(ne[2502],re([1,0,10,17,38,621,21,185,1833,36,70,16,28,2,7,5,12,32,66,33,1131]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HideWelcomeOverlayAction=e.WelcomeOverlayAction=void 0;const u=t.$,a=[{id:"explorer",arrow:"\u2190",label:(0,I.localize)(0,null),command:"workbench.view.explorer"},{id:"search",arrow:"\u2190",label:(0,I.localize)(1,null),command:"workbench.view.search"},{id:"git",arrow:"\u2190",label:(0,I.localize)(2,null),command:"workbench.view.scm"},{id:"debug",arrow:"\u2190",label:(0,I.localize)(3,null),command:"workbench.view.debug"},{id:"extensions",arrow:"\u2190",label:(0,I.localize)(4,null),command:"workbench.view.extensions"},{id:"problems",arrow:"\u2939",label:(0,I.localize)(5,null),command:"workbench.actions.view.problems"},{id:"terminal",label:(0,I.localize)(6,null),command:"workbench.action.terminal.toggleTerminal"},{id:"commandPalette",arrow:"\u2196",label:(0,I.localize)(7,null),command:A.ShowAllCommandsAction.ID},{id:"notifications",arrow:"\u2935",arrowLast:!0,label:(0,I.localize)(8,null),command:"notifications.showList"}],n=new i.RawContextKey("interfaceOverviewVisible",!1);let h,g=class extends w.Action{constructor(E,y,T){super(E,y);this.instantiationService=T}run(){return h||(h=this.instantiationService.createInstance(m)),h.show(),Promise.resolve()}};g.ID="workbench.action.showInterfaceOverview",g.LABEL=(0,I.localize)(9,null),g=Ee([W(2,S.IInstantiationService)],g),e.WelcomeOverlayAction=g;class d extends w.Action{constructor(E,y){super(E,y)}run(){return h&&h.hide(),Promise.resolve()}}e.HideWelcomeOverlayAction=d,d.ID="workbench.action.hideInterfaceOverview",d.LABEL=(0,I.localize)(10,null);let m=class extends c.Disposable{constructor(E,y,T,R,O){super();this.layoutService=E,this.editorService=y,this.commandService=T,this._contextKeyService=R,this.keybindingService=O,this._overlayVisible=n.bindTo(this._contextKeyService),this.create()}create(){const E=this.layoutService.offset?.top??0;this._overlay=t.append(this.layoutService.container,u(".welcomeOverlay")),this._overlay.style.top=`${E}px`,this._overlay.style.height=`calc(100% - ${E}px)`,this._overlay.style.display="none",this._overlay.tabIndex=-1,this._register(t.addStandardDisposableListener(this._overlay,"click",()=>this.hide())),this.commandService.onWillExecuteCommand(()=>this.hide()),t.append(this._overlay,u(".commandPalettePlaceholder"));const y=!!this.editorService.visibleEditors.length;a.filter(T=>!("withEditor"in T)||T.withEditor===y).forEach(({id:T,arrow:R,label:O,command:x,arrowLast:F})=>{const L=t.append(this._overlay,u(`.key.${T}`));if(R&&!F&&t.append(L,u("span.arrow",void 0,R)),t.append(L,u("span.label")).textContent=O,x){const M=this.keybindingService.lookupKeybinding(x);M&&(t.append(L,u("span.shortcut")).textContent=M.getLabel())}R&&F&&t.append(L,u("span.arrow",void 0,R))})}show(){this._overlay.style.display!=="block"&&(this._overlay.style.display="block",document.querySelector(".monaco-workbench").classList.add("blur-background"),this._overlayVisible.set(!0),this.updateProblemsKey(),this.updateActivityBarKeys(),this._overlay.focus())}updateProblemsKey(){const E=document.querySelector(`footer[id="workbench.parts.statusbar"] .statusbar-item.left ${p.Codicon.warning.cssSelector}`),y=this._overlay.querySelector(".key.problems");if(E instanceof HTMLElement){const T=E.getBoundingClientRect(),R=this._overlay.getBoundingClientRect(),O=R.bottom-T.top+3,x=(T.left+T.right)/2-R.left;y.style.bottom=O+"px",y.style.left=x+"px"}else y.style.bottom="",y.style.left=""}updateActivityBarKeys(){const E=["explorer","search","git","debug","extensions"],y=document.querySelector(".activitybar .composite-bar");if(y instanceof HTMLElement){const T=y.getBoundingClientRect(),R=this._overlay.getBoundingClientRect();for(let O=0;O<E.length;O++){const x=this._overlay.querySelector(`.key.${E[O]}`),F=T.top-R.top+50*O+13;x.style.top=F+"px"}}else for(let T=0;T<E.length;T++){const R=this._overlay.querySelector(`.key.${E[T]}`);R.style.top=""}}hide(){this._overlay.style.display!=="none"&&(this._overlay.style.display="none",document.querySelector(".monaco-workbench").classList.remove("blur-background"),this._overlayVisible.reset())}};m=Ee([W(0,D.ILayoutService),W(1,k.IEditorService),W(2,o.ICommandService),W(3,i.IContextKeyService),W(4,_.IKeybindingService)],m),f.Registry.as(v.Extensions.WorkbenchActions).registerWorkbenchAction(C.SyncActionDescriptor.from(g),"Help: User Interface Overview",v.CATEGORIES.Help.value),f.Registry.as(v.Extensions.WorkbenchActions).registerWorkbenchAction(C.SyncActionDescriptor.from(d,{primary:9},n),"Help: Hide Interface Overview",v.CATEGORIES.Help.value),(0,s.registerThemingParticipant)((b,E)=>{const y=b.getColor(l.foreground);y&&E.addRule(`.monaco-workbench > .welcomeOverlay > .key { color: ${y}; }`);const T=r.Color.fromHex(b.type==="light"?"#FFFFFF85":"#00000085");T&&E.addRule(`.monaco-workbench > .welcomeOverlay { background: ${T}; }`);const R=b.getColor(l.textPreformatForeground);R&&E.addRule(`.monaco-workbench > .welcomeOverlay > .key > .shortcut { color: ${R}; }`)})}),define(ne[2503],re([1,0,36,16,7,189,14,26,38,121,98,8,45,264,618,24,739,13,87,69,108,28,299]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeMenubarControl=void 0;let h=class extends i.MenubarControl{constructor(d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V){super(d,m,b,E,y,T,R,O,x,F,L,M,B,V);this.menubarService=N,this.nativeHostService=P,(async()=>{this.recentlyOpened=await this.workspacesService.getRecentlyOpened(),this.doUpdateMenubar()})(),this.registerListeners()}setupMainMenu(){super.setupMainMenu();for(const d of Object.keys(this.topLevelTitles)){const m=this.menus[d];m&&this.mainMenuDisposables.add(m.onDidChange(()=>this.updateMenubar()))}}doUpdateMenubar(){if(!this.hostService.hasFocus)return;const d={menus:{},keybindings:{}};this.getMenubarMenus(d)&&this.menubarService.updateMenubar(this.nativeHostService.windowId,d)}getMenubarMenus(d){if(!d)return!1;d.keybindings=this.getAdditionalKeybindings();for(const m of Object.keys(this.topLevelTitles)){const b=this.menus[m];if(b){const E={items:[]};if(this.populateMenuItems(b,E,d.keybindings),E.items.length===0)return!1;d.menus[m]=E}}return!0}populateMenuItems(d,m,b){let E=d.getActions();for(let y of E){const[,T]=y;T.forEach(R=>{const O=typeof R.item.title=="string"?R.item.title:R.item.title.mnemonicTitle??R.item.title.value;if(R instanceof f.SubmenuItemAction){const x={items:[]};if(!this.menus[R.item.submenu.id]){const L=this.menus[R.item.submenu.id]=this._register(this.menuService.createMenu(R.item.submenu,this.contextKeyService));this._register(L.onDidChange(()=>this.updateMenubar()))}const F=this.menuService.createMenu(R.item.submenu,this.contextKeyService);if(this.populateMenuItems(F,x,b),x.items.length>0){let L={id:R.id,label:O,submenu:x};m.items.push(L)}F.dispose()}else{if(R.id===n.OpenRecentAction.ID){const F=this.getOpenRecentActions().map(this.transformOpenRecentAction);m.items.push(...F)}let x={id:R.id,label:O};R.checked&&(x.checked=!0),R.enabled||(x.enabled=!1),b[R.id]=this.getMenubarKeybinding(R.id),m.items.push(x)}}),m.items.push({id:"vscode.menubar.separator"})}m.items.length>0&&m.items.pop()}transformOpenRecentAction(d){return d instanceof t.Separator?{id:"vscode.menubar.separator"}:{id:d.id,uri:d.uri,remoteAuthority:d.remoteAuthority,enabled:d.enabled,label:d.label}}getAdditionalKeybindings(){const d={};if(k.isMacintosh){const m=this.getMenubarKeybinding("workbench.action.quit");m&&(d["workbench.action.quit"]=m)}return d}getMenubarKeybinding(d){const m=this.keybindingService.lookupKeybinding(d);if(!m)return;const b=m.getElectronAccelerator();if(b)return{label:b,userSettingsLabel:(0,l.withNullAsUndefined)(m.getUserSettingsLabel())};const E=m.getLabel();if(E)return{label:E,isNative:!1,userSettingsLabel:(0,l.withNullAsUndefined)(m.getUserSettingsLabel())}}};h=Ee([W(0,f.IMenuService),W(1,A.IWorkspacesService),W(2,_.IContextKeyService),W(3,I.IKeybindingService),W(4,C.IConfigurationService),W(5,o.ILabelService),W(6,c.IUpdateService),W(7,S.IStorageService),W(8,D.INotificationService),W(9,u.IPreferencesService),W(10,w.INativeWorkbenchEnvironmentService),W(11,v.IAccessibilityService),W(12,s.IMenubarService),W(13,p.IHostService),W(14,r.INativeHostService),W(15,a.ICommandService)],h),e.NativeMenubarControl=h}),define(ne[2504],re([1,0,77,10,7,8,45,24,121,69,14,16,2493,37,21,34,12,80,46,87,213,5,33,2503]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TitlebarPart=void 0;let g=class extends o.TitlebarPart{constructor(m,b,E,y,T,R,O,x,F,L,M,N,B,P,V){super(m,b,E,y,T,R,O,x,F,L,M,N,B,P);this.nativeHostService=V,this.environmentService=y}getMacTitlebarSize(){const m=this.environmentService.os.release;return parseFloat(m)>=20?28:22}get minimumHeight(){return v.isMacintosh?this.getMacTitlebarSize()/(0,t.getZoomFactor)():super.minimumHeight}get maximumHeight(){return this.minimumHeight}onUpdateAppIconDragBehavior(){this.configurationService.getValue("window.doubleClickIconToClose")&&this.appIcon?this.appIcon.style["-webkit-app-region"]="no-drag":this.appIcon&&(this.appIcon.style["-webkit-app-region"]="drag")}onDidChangeWindowMaximized(m){this.maxRestoreControl&&(m?(this.maxRestoreControl.classList.remove(...n.Codicon.chromeMaximize.classNamesArray),this.maxRestoreControl.classList.add(...n.Codicon.chromeRestore.classNamesArray)):(this.maxRestoreControl.classList.remove(...n.Codicon.chromeRestore.classNamesArray),this.maxRestoreControl.classList.add(...n.Codicon.chromeMaximize.classNamesArray))),this.resizer&&(m?(0,f.hide)(this.resizer):(0,f.show)(this.resizer)),this.adjustTitleMarginToCenter()}onMenubarFocusChanged(m){(v.isWindows||v.isLinux)&&this.currentMenubarVisibility!=="compact"&&this.dragRegion&&(m?(0,f.hide)(this.dragRegion):(0,f.show)(this.dragRegion))}onMenubarVisibilityChanged(m){(v.isWindows||v.isLinux)&&this.currentMenubarVisibility==="toggle"&&m&&this.dragRegion&&((0,f.hide)(this.dragRegion),setTimeout(()=>(0,f.show)(this.dragRegion),50)),super.onMenubarVisibilityChanged(m)}onConfigurationChanged(m){super.onConfigurationChanged(m),m.affectsConfiguration("window.doubleClickIconToClose")&&this.appIcon&&this.onUpdateAppIconDragBehavior()}adjustTitleMarginToCenter(){if(this.customMenubar&&this.menubar){const m=(this.appIcon?this.appIcon.clientWidth:0)+this.menubar.clientWidth+10,b=this.element.clientWidth-(this.windowControls?this.windowControls.clientWidth:0)-10;if(m>(this.element.clientWidth-this.title.clientWidth)/2||b<(this.element.clientWidth+this.title.clientWidth)/2){this.title.style.position="",this.title.style.left="",this.title.style.transform="";return}}this.title.style.position="absolute",this.title.style.left="50%",this.title.style.transform="translate(-50%, 0)",this.title.style.maxWidth=`calc(100vw - ${2*((this.windowControls?.clientWidth||70)+10)}px)`}installMenubar(){super.installMenubar(),!this.menubar&&this.customMenubar&&this._register(this.customMenubar.onFocusStateChange(m=>this.onMenubarFocusChanged(m)))}createContentArea(m){const b=super.createContentArea(m);if((v.isMacintosh||(0,u.getTitleBarStyle)(this.configurationService)==="native")&&this._register(this.instantiationService.createInstance(h.NativeMenubarControl)),this.appIcon&&(this.onUpdateAppIconDragBehavior(),this._register((0,f.addDisposableListener)(this.appIcon,f.EventType.DBLCLICK,E=>{this.nativeHostService.closeWindow()}))),this.dragRegion=(0,f.prepend)(this.rootContainer,(0,f.$)("div.titlebar-drag-region")),!v.isMacintosh&&this.windowControls){const E=(0,f.append)(this.windowControls,(0,f.$)("div.window-icon.window-minimize"+n.Codicon.chromeMinimize.cssSelector));this._register((0,f.addDisposableListener)(E,f.EventType.CLICK,T=>{this.nativeHostService.minimizeWindow()})),this.maxRestoreControl=(0,f.append)(this.windowControls,(0,f.$)("div.window-icon.window-max-restore")),this._register((0,f.addDisposableListener)(this.maxRestoreControl,f.EventType.CLICK,async T=>await this.nativeHostService.isMaximized()?this.nativeHostService.unmaximizeWindow():this.nativeHostService.maximizeWindow()));const y=(0,f.append)(this.windowControls,(0,f.$)("div.window-icon.window-close"+n.Codicon.chromeClose.cssSelector));this._register((0,f.addDisposableListener)(y,f.EventType.CLICK,T=>{this.nativeHostService.closeWindow()})),this.resizer=(0,f.append)(this.rootContainer,(0,f.$)("div.resizer")),this._register(this.layoutService.onDidChangeWindowMaximized(T=>this.onDidChangeWindowMaximized(T))),this.onDidChangeWindowMaximized(this.layoutService.isWindowMaximized())}return b}updateLayout(m){if(this.lastLayoutDimensions=m,(0,u.getTitleBarStyle)(this.configurationService)==="custom"&&(v.isMacintosh||this.currentMenubarVisibility==="hidden"?(this.rootContainer.style.height=`${100*(0,t.getZoomFactor)()}%`,this.rootContainer.style.width=`${100*(0,t.getZoomFactor)()}%`,this.rootContainer.style.transform=`scale(${1/(0,t.getZoomFactor)()})`):(this.rootContainer.style.height="100%",this.rootContainer.style.width="100%",this.rootContainer.style.transform=""),(0,f.runAtThisOrScheduleAtNextAnimationFrame)(()=>this.adjustTitleMarginToCenter()),this.customMenubar)){const b=new f.Dimension(0,m.height);this.customMenubar.layout(b)}}};g=Ee([W(0,c.IContextMenuService),W(1,A.IConfigurationService),W(2,i.IEditorService),W(3,I.INativeWorkbenchEnvironmentService),W(4,S.IWorkspaceContextService),W(5,a.IInstantiationService),W(6,s.IThemeService),W(7,k.ILabelService),W(8,D.IStorageService),W(9,l.IWorkbenchLayoutService),W(10,C.IMenuService),W(11,_.IContextKeyService),W(12,w.IHostService),W(13,r.IProductService),W(14,p.INativeHostService)],g),e.TitlebarPart=g}),define(ne[622],re([1,0,18,9,1892,174,108]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SettingsEditor2Input=void 0;let D=class Wr extends A.EditorInput{constructor(w){super();this.resource=f.URI.from({scheme:t.Schemas.vscodeSettings,path:"settingseditor"}),this._settingsModel=w.createSettings2EditorModel()}matches(w){return super.matches(w)||w instanceof Wr}get typeId(){return Wr.ID}getName(){return _.localize(0,null)}async resolve(){return this._settingsModel}dispose(){this._settingsModel.dispose(),super.dispose()}};D.ID="workbench.input.settings2",D=Ee([W(0,k.IPreferencesService)],D),e.SettingsEditor2Input=D}),define(ne[2505],re([1,0,6,2,14,19,96,43,119,21,50,69,617,622]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataSyncTrigger=void 0;let i=class extends f.Disposable{constructor(s,l,r,p,u){super();this.environmentService=l;const a=t.Event.filter(t.Event.any(t.Event.map(s.onDidActiveEditorChange,()=>this.getUserDataEditorInputSource(s.activeEditor)),t.Event.map(t.Event.filter(r.onDidChangeViewContainerVisibility,n=>n.id===I.VIEWLET_ID&&n.visible),n=>n.id)),n=>n!==void 0);_.isWeb?this._register(t.Event.debounce(t.Event.any(t.Event.map(u.onDidChangeFocus,()=>"windowFocus"),t.Event.map(a,n=>n)),(n,h)=>n?[...n,h]:[h],1e3)(n=>p.triggerSync(n,!0,!1))):this._register(a(n=>p.triggerSync([n],!0,!1)))}getUserDataEditorInputSource(s){if(!s)return;if(s instanceof c.SettingsEditor2Input)return"settingsEditor";if(s instanceof o.KeybindingsEditorInput)return"keybindingsEditor";const l=s.resource;if((0,A.isEqual)(l,this.environmentService.settingsResource))return"settingsEditor";if((0,A.isEqual)(l,this.environmentService.keybindingsResource))return"keybindingsEditor"}};i=Ee([W(0,w.IEditorService),W(1,v.IWorkbenchEnvironmentService),W(2,D.IViewsService),W(3,k.IUserDataAutoSyncService),W(4,C.IHostService)],i),e.UserDataSyncTrigger=i}),define(ne[891],re([1,0,1894,66,13]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getInvalidTypeError=e.createValidator=void 0;function A(S,...s){return s.some(l=>S.includes(l))}function k(S){return S===""||(0,_.isUndefinedOrNull)(S)}function D(S){const s=(0,_.isArray)(S.type)?S.type:[S.type],l=A(s,"null"),r=(A(s,"number")||A(s,"integer"))&&(s.length===1||s.length===2&&l),p=C(S),u=v(S),a=o(S),n=c(S);return h=>{if(l&&k(h))return"";const g=[];if(a){const d=a(h);d&&g.push(d)}if(n){const d=n(h);d&&g.push(d)}return S.type==="boolean"&&h!==!0&&h!==!1&&g.push(t.localize(0,null)),r&&(k(h)||typeof h=="boolean"||Array.isArray(h)||isNaN(+h)?g.push(t.localize(1,null)):g.push(...p.filter(d=>!d.isValid(+h)).map(d=>d.message))),S.type==="string"&&(S.enum&&!(0,_.isStringArray)(S.enum)?g.push(t.localize(2,null)):(0,_.isString)(h)?g.push(...u.filter(d=>!d.isValid(h)).map(d=>d.message)):g.push(t.localize(3,null))),g.length?S.errorMessage?[S.errorMessage,...g].join(" "):g.join(" "):""}}e.createValidator=D;function I(S,s){if(typeof s=="undefined")return;if(!((0,_.isArray)(s)?s:[s]).some(r=>w(S,r)))return t.localize(4,null,JSON.stringify(s))}e.getInvalidTypeError=I;function w(S,s){const l=typeof S;return s==="boolean"?l==="boolean":s==="object"?S&&!(0,_.isArray)(S)&&l==="object":s==="null"?S===null:s==="array"?(0,_.isArray)(S):s==="string"?l==="string":s==="number"||s==="integer"?l==="number":!0}function v(S){const s=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;let l;return typeof S.pattern=="string"&&(l=new RegExp(S.pattern)),[{enabled:S.maxLength!==void 0,isValid:r=>r.length<=S.maxLength,message:t.localize(5,null,S.maxLength)},{enabled:S.minLength!==void 0,isValid:r=>r.length>=S.minLength,message:t.localize(6,null,S.minLength)},{enabled:l!==void 0,isValid:r=>l.test(r),message:S.patternErrorMessage||t.localize(7,null,S.pattern)},{enabled:S.format==="color-hex",isValid:r=>f.Color.Format.CSS.parseHex(r),message:t.localize(8,null)},{enabled:S.format==="uri"||S.format==="uri-reference",isValid:r=>!!r.length,message:t.localize(9,null)},{enabled:S.format==="uri"||S.format==="uri-reference",isValid:r=>s.test(r),message:t.localize(10,null)},{enabled:S.format==="uri",isValid:r=>{const p=r.match(s);return!!(p&&p[2])},message:t.localize(11,null)},{enabled:S.enum!==void 0,isValid:r=>S.enum.includes(r),message:t.localize(12,null,S.enum?S.enum.map(r=>`"${r}"`).join(", "):"[]")}].filter(r=>r.enabled)}function C(S){const s=(0,_.isArray)(S.type)?S.type:[S.type],l=A(s,"null"),r=A(s,"integer")&&(s.length===1||s.length===2&&l);if(!(A(s,"number","integer")&&(s.length===1||s.length===2&&l)))return[];let u,a;return typeof S.exclusiveMaximum=="boolean"?u=S.exclusiveMaximum?S.maximum:void 0:u=S.exclusiveMaximum,typeof S.exclusiveMinimum=="boolean"?a=S.exclusiveMinimum?S.minimum:void 0:a=S.exclusiveMinimum,[{enabled:u!==void 0&&(S.maximum===void 0||u<=S.maximum),isValid:n=>n<u,message:t.localize(13,null,u)},{enabled:a!==void 0&&(S.minimum===void 0||a>=S.minimum),isValid:n=>n>a,message:t.localize(14,null,a)},{enabled:S.maximum!==void 0&&(u===void 0||u>S.maximum),isValid:n=>n<=S.maximum,message:t.localize(15,null,S.maximum)},{enabled:S.minimum!==void 0&&(a===void 0||a<S.minimum),isValid:n=>n>=S.minimum,message:t.localize(16,null,S.minimum)},{enabled:S.multipleOf!==void 0,isValid:n=>n%S.multipleOf==0,message:t.localize(17,null,S.multipleOf)},{enabled:r,isValid:n=>n%1==0,message:t.localize(18,null)}].filter(n=>n.enabled)}function o(S){if(S.type==="array"&&S.items&&!(0,_.isArray)(S.items)){const s=S.items;if(s&&!(0,_.isArray)(s.type)){const l=r=>"'"+r+"'";return r=>{if(!r)return null;let p="";if(!(0,_.isArray)(r))return p+=t.localize(19,null),p+=` `,p;const u=r;if(S.uniqueItems&&new Set(u).size<u.length&&(p+=t.localize(20,null),p+=` `),S.minItems&&u.length<S.minItems&&(p+=t.localize(21,null,S.minItems),p+=` `),S.maxItems&&u.length>S.maxItems&&(p+=t.localize(22,null,S.maxItems),p+=` `),s.type==="string"){if(!(0,_.isStringArray)(u))return p+=t.localize(23,null),p+=` `,p;if(typeof s.pattern=="string"){const n=new RegExp(s.pattern);u.forEach(h=>{n.test(h)||(p+=s.patternErrorMessage||t.localize(24,null,l(h),l(s.pattern)))})}const a=s.enum;a&&u.forEach(n=>{a.indexOf(n)===-1&&(p+=t.localize(25,null,l(n),"["+a.map(l).join(", ")+"]"),p+=` `)})}else(s.type==="integer"||s.type==="number")&&u.forEach(a=>{const n=i(s,a);n&&(p+=`${a}: ${n} `)});return p}}}return null}function c(S){if(S.type==="object"){const{properties:s,patternProperties:l,additionalProperties:r}=S;return p=>{if(!p)return null;const u=[];return(0,_.isObject)(p)?Object.keys(p).forEach(a=>{const n=p[a];if(s&&a in s){const h=i(s[a],n);h&&u.push(`${a}: ${h} `);return}if(l){for(const h in l)if(RegExp(h).test(a)){const g=i(l[h],n);g&&u.push(`${a}: ${g} `);return}}if(r===!1)u.push(t.localize(27,null,a));else if(typeof r=="object"){const h=i(r,n);h&&u.push(`${a}: ${h} `)}}):u.push(t.localize(26,null)),u.length?S.errorMessage?[S.errorMessage,...u].join(" "):u.join(" "):""}}return null}function i(S,s){return D(S)(s)}}),define(ne[892],re([1,0,223,10,112,162,244,183,441,208,389,163,447,36,15,66,22,6,2,14,29,13,1682,95,28,8,37,5,38,41,32,68,12,767,620,2196,322,50,108,96,891,33,517,71,7,98,321,186,493]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H,K,G,q,Z,j){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SettingsTree=e.NonCollapsibleObjectTreeModel=e.SettingsTreeFilter=e.SettingTreeRenderers=e.SettingUntrustedRenderer=e.SettingBoolRenderer=e.SettingNumberRenderer=e.SettingEnumRenderer=e.SettingMultilineTextRenderer=e.SettingTextRenderer=e.SettingExcludeRenderer=e.SettingBoolObjectRenderer=e.SettingObjectRenderer=e.SettingArrayRenderer=e.SettingComplexRenderer=e.SettingNewExtensionsRenderer=e.SettingGroupRenderer=e.AbstractSettingRenderer=e.createSettingMatchRegExp=e.createTocTreeForExtensionSettings=e.resolveConfiguredUntrustedSettings=e.resolveSettingsTree=void 0;const X=f.$;function Y(je){const Oe=je.isConfigured?{...je.defaultValue,...je.scopeValue}:je.defaultValue;return Object.keys(Oe).filter(ze=>!!Oe[ze]).map(ze=>{const Je=Oe[ze],ot=typeof Je=="boolean"?void 0:Je.when;return{value:{type:"string",data:ze},sibling:ot,elementType:je.valueType}})}function $(je,Oe){const ze=new Set(je);return Oe.forEach(({key:Je})=>ze.delete(Je.data)),ze.size===0}function J(je){if(je.anyOf)return i.flatten(je.anyOf.map(J));const Oe=je.enumDescriptions??[];return(je.enum??[]).map((ze,Je)=>{const ot=Je<Oe.length?Oe[Je]:void 0;return{value:ze,description:ot}})}function ee(je){return je.anyOf?je.anyOf.map(ee).some(ze=>ze==="enum")?"enum":"string":je.type==="boolean"?"boolean":je.type==="string"&&(0,a.isDefined)(je.enum)&&je.enum.length>0?"enum":"string"}function te(je){const Oe=typeof je.defaultValue=="object"?je.defaultValue??{}:{},{objectProperties:ze,objectPatternProperties:Je,objectAdditionalProperties:ot}=je.setting,ht=Object.entries(Je??{}).map(([Ct,_t])=>({pattern:new RegExp(Ct),schema:_t})),gt=Object.entries(ze??{}).map(([Ct,_t])=>({value:Ct,description:_t.description}));let bt=je.value??{};return je.setting.allKeysAreBoolean&&(bt={...Oe,...bt}),Object.keys(bt).map(Ct=>{if((0,a.isDefined)(ze)&&Ct in ze){if(je.setting.allKeysAreBoolean)return{key:{type:"string",data:Ct},value:{type:"boolean",data:bt[Ct]},keyDescription:ze[Ct].description,removable:!1};const Pt=Oe[Ct],Nt=J(ze[Ct]);return{key:{type:"enum",data:Ct,options:gt},value:{type:ee(ze[Ct]),data:bt[Ct],options:Nt},keyDescription:ze[Ct].description,removable:(0,a.isUndefinedOrNull)(Pt)}}const _t=ht.find(({pattern:Pt})=>Pt.test(Ct))?.schema;if(_t){const Pt=J(_t);return{key:{type:"string",data:Ct},value:{type:ee(_t),data:bt[Ct],options:Pt},keyDescription:_t.description,removable:!0}}const Lt=J(typeof ot=="boolean"?{}:ot??{});return{key:{type:"string",data:Ct},value:{type:typeof ot=="object"?ee(ot):"string",data:bt[Ct],options:Lt},keyDescription:typeof ot=="object"?ot.description:void 0,removable:!0}}).filter(Ct=>!(0,a.isUndefinedOrNull)(Ct.value.data))}function se(je){return(Oe,ze)=>{const Je=[];return je.setting.enum&&je.setting.enum.forEach((ot,ht)=>{if(!je.setting.uniqueItems||ze!==void 0&&ot===Oe[ze]||!Oe.includes(ot)){const gt=je.setting.enumDescriptions?.[ht];Je.push({value:ot,description:gt})}}),Je.length>0?{type:"enum",data:Je[0].value,options:Je}:void 0}}function ie(je){const{objectProperties:Oe}=je.setting,ze=Object.keys(Oe??{});return Je=>{const ot=new Set(Je),ht=[];return ze.forEach(gt=>{ot.has(gt)||ht.push({value:gt,description:Oe[gt].description})}),ht.length>0?{type:"enum",data:ht[0].value,options:ht}:void 0}}function ce(je){const{objectProperties:Oe,objectPatternProperties:ze,objectAdditionalProperties:Je}=je.setting,ot=Object.entries(ze??{}).map(([ht,gt])=>({pattern:new RegExp(ht),schema:gt}));return ht=>{let gt;(0,a.isDefined)(Oe)&&ht in Oe&&(gt=Oe[ht]);const bt=gt??ot.find(({pattern:Ct})=>Ct.test(ht))?.schema;if((0,a.isDefined)(bt)?gt=bt:(0,a.isDefined)(Je)&&typeof Je=="object"&&(gt=Je),(0,a.isDefined)(gt)){const Ct=ee(gt);if(Ct==="boolean")return{type:Ct,data:gt.default??!0};if(Ct==="enum"){const _t=J(gt);return{type:Ct,data:gt.default??_t[0].value,options:_t}}else return{type:Ct,data:gt.default??""}}}}function le(je){return je==="number"||je==="integer"}function ae(je,Oe){const ze={};for(const Je in Oe){let ot;const ht=je.setting.objectPatternProperties,gt=je.setting.objectProperties,bt=je.setting.objectAdditionalProperties;if(gt){for(const Ct in gt)if(Ct===Je){ot=le(gt[Ct].type);break}}if(ot===void 0&&ht){for(const Ct in ht)if(Je.match(Ct)){ot=le(ht[Ct].type);break}}ot===void 0&&bt&&typeof bt!="boolean"&&le(bt.type)&&(ot=!0),ze[Je]=ot?Number(Oe[Je]):Oe[Je]}return ze}function ue(je){if(!je.value||!(0,a.isArray)(je.value))return[];if(je.setting.arrayItemType==="enum"){let Oe=[];return je.setting.enum&&(Oe=je.setting.enum.map((ze,Je)=>({value:ze,description:je.setting.enumDescriptions?.[Je]}))),je.value.map(ze=>({value:{type:"enum",data:ze,options:Oe}}))}else return je.value.map(Oe=>({value:{type:"string",data:Oe}}))}function oe(je,Oe){return je.setting.enum&&je.setting.uniqueItems?je.setting.enum.length-Oe.length>0:!0}function fe(je,Oe,ze){const Je=we(Oe);return{tree:Ce(je,Je,ze),leftoverSettings:Je}}e.resolveSettingsTree=fe;function pe(je,Oe,ze,Je){return[...we(je)].filter(ht=>ht.restricted&&(0,F.inspectSetting)(ht.key,Oe,ze,Je).isConfigured)}e.resolveConfiguredUntrustedSettings=pe;function me(je,Oe){const ze=je??Number.MAX_SAFE_INTEGER,Je=Oe??Number.MAX_SAFE_INTEGER;return ze-Je}async function be(je,Oe){const ze=new Map,Je=(gt,bt,Ct)=>{if(!ze.has(gt)){const _t={id:gt,label:bt,children:[]};ze.set(gt,_t)}ze.get(gt).children.push(Ct)},ot=async gt=>{const bt=i.flatten(gt.sections.map(Nt=>Nt.settings)),Ct=gt.extensionInfo.id,_t=await je.getExtension(Ct),Lt=_t?.displayName??_t?.name??Ct,Pt={id:gt.id||gt.title,label:gt.title,order:gt.order,settings:bt};Je(Ct,Lt,Pt)},ht=Oe.map(gt=>ot(gt));return Promise.all(ht).then(()=>{const gt=[];for(const bt of ze.values()){for(const Ct of bt.children)Ct.settings?.sort((_t,Lt)=>me(_t.order,Lt.order));if(bt.children.length===1)gt.push({id:bt.id,label:bt.children[0].label,settings:bt.children[0].settings});else{bt.children.sort((_t,Lt)=>me(_t.order,Lt.order));const Ct=bt.children.find(_t=>_t.label===bt.label);if(Ct&&!Ct.children){const _t=bt.children.filter(Lt=>Lt!==Ct);gt.push({id:bt.id,label:bt.label,settings:Ct.settings,children:_t})}else gt.push(bt)}}return gt.sort((bt,Ct)=>bt.label.localeCompare(Ct.label)),{id:"extensions",label:(0,n.localize)(0,null),children:gt}})}e.createTocTreeForExtensionSettings=be;function Ce(je,Oe,ze){let Je;je.children&&(Je=je.children.map(ht=>Ce(ht,Oe,ze)).filter(ht=>ht.children&&ht.children.length||ht.settings&&ht.settings.length));let ot;if(je.settings&&(ot=i.flatten(je.settings.map(ht=>he(Oe,ht,ze)))),!Je&&!ot)throw new Error(`TOC node has no child groups or settings: ${je.id}`);return{id:je.id,label:je.label,children:Je,settings:ot}}const ve=[/^settingsSync\..*/,/^sync\..*/,/^workbench.fontAliasing$/];function he(je,Oe,ze){const Je=[];return je.forEach(ot=>{Se(ot,Oe)&&(Je.push(ot),je.delete(ot))}),!Je.length&&!ve.some(ot=>ot.test(Oe))&&ze.warn(`Settings pattern "${Oe}" doesn't match any settings`),Je.sort((ot,ht)=>ot.key.localeCompare(ht.key))}const ge=new Map;function de(je){return je=(0,u.escapeRegExpCharacters)(je).replace(/\\\*/g,".*"),new RegExp(`^${je}$`,"i")}e.createSettingMatchRegExp=de;function Se(je,Oe){let ze=ge.get(Oe);return ze||(ze=de(Oe),ge.set(Oe,ze)),ze.test(je.key)}function we(je){const Oe=new Set;for(const ze of je)for(const Je of ze.sections)for(const ot of Je.settings)(!ot.overrides||!ot.overrides.length)&&Oe.add(ot);return Oe}const ye="settings.untrusted.template",ke="settings.text.template",Ie="settings.multilineText.template",Te="settings.number.template",De="settings.enum.template",_e="settings.bool.template",Re="settings.array.template",Ne="settings.exclude.template",xe="settings.object.template",Ae="settings.boolObject.template",Le="settings.complex.template",Me="settings.newExtensions.template",We="settings.group.template";function Ve(je){je.querySelectorAll(` [tabindex="0"], input:not([tabindex="-1"]), select:not([tabindex="-1"]), textarea:not([tabindex="-1"]), a:not([tabindex="-1"]), button:not([tabindex="-1"]), area:not([tabindex="-1"]) `).forEach(ze=>{ze.setAttribute(et.ELEMENT_FOCUSABLE_ATTR,"true"),ze.setAttribute("tabindex","-1")})}function Ue(je){je.querySelectorAll(`[${et.ELEMENT_FOCUSABLE_ATTR}="true"]`).forEach(ze=>{ze.removeAttribute(et.ELEMENT_FOCUSABLE_ATTR),ze.setAttribute("tabindex","0")})}let et=class jn extends r.Disposable{constructor(Oe,ze,Je,ot,ht,gt,bt,Ct,_t,Lt){super();this.settingActions=Oe,this.disposableActionFactory=ze,this._themeService=Je,this._contextViewService=ot,this._openerService=ht,this._instantiationService=gt,this._commandService=bt,this._contextMenuService=Ct,this._keybindingService=_t,this._configService=Lt,this._onDidClickOverrideElement=this._register(new l.Emitter),this.onDidClickOverrideElement=this._onDidClickOverrideElement.event,this._onDidChangeSetting=this._register(new l.Emitter),this.onDidChangeSetting=this._onDidChangeSetting.event,this._onDidOpenSettings=this._register(new l.Emitter),this.onDidOpenSettings=this._onDidOpenSettings.event,this._onDidClickSettingLink=this._register(new l.Emitter),this.onDidClickSettingLink=this._onDidClickSettingLink.event,this._onDidFocusSetting=this._register(new l.Emitter),this.onDidFocusSetting=this._onDidFocusSetting.event,this._onDidChangeIgnoredSettings=this._register(new l.Emitter),this.onDidChangeIgnoredSettings=this._onDidChangeIgnoredSettings.event,this._onDidChangeSettingHeight=this._register(new l.Emitter),this.onDidChangeSettingHeight=this._onDidChangeSettingHeight.event,this._onApplyLanguageFilter=this._register(new l.Emitter),this.onApplyLanguageFilter=this._onApplyLanguageFilter.event,this.markdownRenderer=this._register(gt.createInstance(Z.MarkdownRenderer,{})),this.ignoredSettings=(0,x.getIgnoredSettings)((0,P.getDefaultIgnoredSettings)(),this._configService),this._register(this._configService.onDidChangeConfiguration(Pt=>{this.ignoredSettings=(0,x.getIgnoredSettings)((0,P.getDefaultIgnoredSettings)(),this._configService),this._onDidChangeIgnoredSettings.fire()}))}renderCommonTemplate(Oe,ze,Je){ze.classList.add("setting-item"),ze.classList.add("setting-item-"+Je);const ot=f.append(ze,X(jn.CONTENTS_SELECTOR));ot.classList.add("settings-row-inner-container");const ht=f.append(ot,X(".setting-item-title")),gt=f.append(ht,X(".setting-item-cat-label-container")),bt=f.append(gt,X("span.setting-item-category")),Ct=f.append(gt,X("span.setting-item-label")),_t=new U.SimpleIconLabel(Ct),Lt=new Et(ht),Pt=f.append(ot,X(".setting-item-description")),Nt=f.append(ot,X(".setting-item-modified-indicator"));Nt.title=(0,n.localize)(1,null);const Ft=f.append(ot,X(".setting-item-value")),Bt=f.append(Ft,X("div.setting-item-control")),Yt=f.append(ot,X(".setting-item-deprecation-message")),Kt=new r.DisposableStore,Gt=f.append(ot,X(".setting-toolbar-container")),wt=this.renderSettingToolbar(Gt),tt={toDispose:Kt,elementDisposables:new r.DisposableStore,containerElement:ot,categoryElement:bt,labelElement:_t,descriptionElement:Pt,controlElement:Bt,deprecationWarningElement:Yt,miscLabel:Lt,toolbar:wt};return Kt.add(f.addDisposableListener(Bt,f.EventType.MOUSE_DOWN,nt=>nt.stopPropagation())),Kt.add(f.addDisposableListener(ht,f.EventType.MOUSE_ENTER,nt=>ot.classList.add("mouseover"))),Kt.add(f.addDisposableListener(ht,f.EventType.MOUSE_LEAVE,nt=>ot.classList.remove("mouseover"))),tt}addSettingElementFocusHandler(Oe){const ze=f.trackFocus(Oe.containerElement);Oe.toDispose.add(ze),ze.onDidBlur(()=>{Oe.containerElement.classList.contains("focused")&&Oe.containerElement.classList.remove("focused")}),ze.onDidFocus(()=>{Oe.containerElement.classList.add("focused"),Oe.context&&this._onDidFocusSetting.fire(Oe.context)})}renderSettingToolbar(Oe){const ze=this._keybindingService.lookupKeybinding(M.SETTINGS_EDITOR_COMMAND_SHOW_CONTEXT_MENU);let Je=(0,n.localize)(2,null);return ze&&(Je+=` (${ze&&ze.getLabel()})`),new C.ToolBar(Oe,this._contextMenuService,{toggleMenuTitle:Je,renderDropdownAsChildElement:!p.isIOS,moreIcon:q.settingsMoreActionIcon})}renderSettingElement(Oe,ze,Je){const ot=Oe.element;Je.context=ot,Je.toolbar.context=ot;const ht=this.disposableActionFactory(ot.setting);ht.forEach(Lt=>Je.elementDisposables?.add(Lt)),Je.toolbar.setActions([],[...this.settingActions,...ht]);const gt=ot.setting;Je.containerElement.classList.toggle("is-configured",ot.isConfigured),Je.containerElement.setAttribute(jn.SETTING_KEY_ATTR,ot.setting.key),Je.containerElement.setAttribute(jn.SETTING_ID_ATTR,ot.id);const bt=gt.key+(ot.isConfigured?" - Modified":"");if(Je.categoryElement.textContent=ot.displayCategory&&ot.displayCategory+": ",Je.categoryElement.title=bt,Je.labelElement.text=ot.displayLabel,Je.labelElement.title=bt,Je.descriptionElement.innerText="",ot.setting.descriptionIsMarkdown){const Lt=new r.DisposableStore;Je.elementDisposables.add(Lt);const Pt=this.renderSettingMarkdown(ot,Je.containerElement,ot.description,Lt);Je.descriptionElement.appendChild(Pt)}else Je.descriptionElement.innerText=ot.description;Je.miscLabel.updateOtherOverrides(ot,Je.elementDisposables,this._onDidClickOverrideElement);const Ct=Lt=>this._onDidChangeSetting.fire({key:ot.setting.key,value:Lt,type:Je.context.valueType,manualReset:!1}),_t=ot.setting.deprecationMessage||"";if(_t&&ot.setting.deprecationMessageIsMarkdown){const Lt=new r.DisposableStore;Je.elementDisposables.add(Lt),Je.deprecationWarningElement.innerText="",Je.deprecationWarningElement.appendChild(this.renderSettingMarkdown(ot,Je.containerElement,ot.setting.deprecationMessage,Je.elementDisposables))}else Je.deprecationWarningElement.innerText=_t;Je.deprecationWarningElement.prepend(X(".codicon.codicon-error")),Je.containerElement.classList.toggle("is-deprecated",!!_t),this.renderValue(ot,Je,Ct),Je.miscLabel.updateSyncIgnored(ot,this.ignoredSettings),Je.miscLabel.updateDefaultOverrideIndicator(ot),Je.elementDisposables.add(this.onDidChangeIgnoredSettings(()=>{Je.miscLabel.updateSyncIgnored(ot,this.ignoredSettings)})),this.updateSettingTabbable(ot,Je),Je.elementDisposables.add(ot.onDidChangeTabbable(()=>{this.updateSettingTabbable(ot,Je)}))}updateSettingTabbable(Oe,ze){Oe.tabbable?Ue(ze.containerElement):Ve(ze.containerElement)}renderSettingMarkdown(Oe,ze,Je,ot){Je=ut(Je);const ht=this.markdownRenderer.render({value:Je,isTrusted:!0},{actionHandler:{callback:gt=>{if(gt.startsWith("#")){const bt={source:Oe,targetKey:gt.substring(1)};this._onDidClickSettingLink.fire(bt)}else this._openerService.open(gt,{allowCommands:!0}).catch(s.onUnexpectedError)},disposables:ot},asyncRenderCallback:()=>{const gt=ze.clientHeight;gt&&this._onDidChangeSettingHeight.fire({element:Oe,height:gt})}});return ot.add(ht),ht.element.classList.add("setting-item-markdown"),lt(ht.element),ht.element}disposeTemplate(Oe){(0,r.dispose)(Oe.toDispose)}disposeElement(Oe,ze,Je,ot){Je.elementDisposables&&Je.elementDisposables.clear()}};et.CONTROL_CLASS="setting-control-focus-target",et.CONTROL_SELECTOR="."+et.CONTROL_CLASS,et.CONTENTS_CLASS="setting-item-contents",et.CONTENTS_SELECTOR="."+et.CONTENTS_CLASS,et.ALL_ROWS_SELECTOR=".monaco-list-row",et.SETTING_KEY_ATTR="data-key",et.SETTING_ID_ATTR="data-id",et.ELEMENT_FOCUSABLE_ATTR="data-focusable",et=Ee([W(2,O.IThemeService),W(3,m.IContextViewService),W(4,y.IOpenerService),W(5,b.IInstantiationService),W(6,g.ICommandService),W(7,m.IContextMenuService),W(8,E.IKeybindingService),W(9,d.IConfigurationService)],et),e.AbstractSettingRenderer=et;class Ze{constructor(){this.templateId=We}renderTemplate(Oe){return Oe.classList.add("group-title"),{parent:Oe,toDispose:new r.DisposableStore}}renderElement(Oe,ze,Je){Je.parent.innerText="";const ot=f.append(Je.parent,X("div.settings-group-title-label.settings-row-inner-container"));ot.classList.add(`settings-group-level-${Oe.element.level}`),ot.textContent=Oe.element.label,Oe.element.isFirstGroup&&ot.classList.add("settings-group-first")}disposeTemplate(Oe){}}e.SettingGroupRenderer=Ze;let Fe=class{constructor(Oe,ze){this._themeService=Oe,this._commandService=ze,this.templateId=Me}renderTemplate(Oe){const ze=new r.DisposableStore;Oe.classList.add("setting-item-new-extensions");const Je=new A.Button(Oe,{title:!0,buttonBackground:void 0,buttonHoverBackground:void 0});ze.add(Je),ze.add(Je.onDidClick(()=>{ot.context&&this._commandService.executeCommand("workbench.extensions.action.showExtensionsWithIds",ot.context.extensionIds)})),Je.label=(0,n.localize)(3,null),Je.element.classList.add("settings-new-extensions-button"),ze.add((0,R.attachButtonStyler)(Je,this._themeService));const ot={button:Je,toDispose:ze};return ot}renderElement(Oe,ze,Je){Je.context=Oe.element}disposeTemplate(Oe){(0,r.dispose)(Oe.toDispose)}};Fe=Ee([W(0,O.IThemeService),W(1,g.ICommandService)],Fe),e.SettingNewExtensionsRenderer=Fe;class Qe extends et{constructor(){super(...arguments);this.templateId=Le}renderTemplate(Oe){const ze=this.renderCommonTemplate(null,Oe,"complex"),Je=new A.Button(ze.controlElement,{title:!0,buttonBackground:void 0,buttonHoverBackground:void 0});ze.toDispose.add(Je),Je.element.classList.add("edit-in-settings-button"),Je.element.classList.add(et.CONTROL_CLASS),ze.toDispose.add((0,R.attachButtonStyler)(Je,this._themeService,{buttonBackground:S.Color.transparent.toString(),buttonHoverBackground:S.Color.transparent.toString(),buttonForeground:"foreground"}));const ot=X(".setting-item-validation-message");ze.containerElement.appendChild(ot);const ht={...ze,button:Je,validationErrorMessageElement:ot};return this.addSettingElementFocusHandler(ht),ht}renderElement(Oe,ze,Je){super.renderSettingElement(Oe,ze,Je)}renderValue(Oe,ze,Je){const ot=(0,d.getLanguageTagSettingPlainKey)(Oe.setting.key),ht=(0,n.localize)(5,null,ot),gt=Oe.setting.isLanguageTagSetting;ze.button.label=gt?ht:Qe.EDIT_IN_JSON_LABEL,ze.elementDisposables.add(ze.button.onDidClick(()=>{gt?this._onApplyLanguageFilter.fire(ot):this._onDidOpenSettings.fire(Oe.setting.key)})),this.renderValidations(Oe,ze),gt?ze.button.element.setAttribute("aria-label",ht):ze.button.element.setAttribute("aria-label",`${Qe.EDIT_IN_JSON_LABEL}: ${Oe.setting.key}`)}renderValidations(Oe,ze){const Je=Oe.isConfigured&&(0,V.getInvalidTypeError)(Oe.value,Oe.setting.type);if(Je){ze.containerElement.classList.add("invalid-input"),ze.validationErrorMessageElement.innerText=Je;return}ze.containerElement.classList.remove("invalid-input")}}e.SettingComplexRenderer=Qe,Qe.EDIT_IN_JSON_LABEL=(0,n.localize)(4,null);class qe extends et{constructor(){super(...arguments);this.templateId=Re}renderTemplate(Oe){const ze=this.renderCommonTemplate(null,Oe,"list"),Je=ze.containerElement.querySelector(".setting-item-description"),ot=X(".setting-item-validation-message");Je.after(ot);const ht=this._instantiationService.createInstance(L.ListSettingWidget,ze.controlElement);ht.domNode.classList.add(et.CONTROL_CLASS),ze.toDispose.add(ht);const gt={...ze,listWidget:ht,validationErrorMessageElement:ot};return this.addSettingElementFocusHandler(gt),ze.toDispose.add(ht.onDidChangeList(bt=>{const Ct=this.computeNewList(gt,bt);gt.onChange&>.onChange(Ct)})),gt}computeNewList(Oe,ze){if(Oe.context){let Je=[];if((0,a.isArray)(Oe.context.scopeValue)?Je=[...Oe.context.scopeValue]:(0,a.isArray)(Oe.context.value)&&(Je=[...Oe.context.value]),ze.sourceIndex!==void 0){const ot=ze.sourceIndex,ht=ze.targetIndex,gt=Je.splice(ot,1)[0];Je.splice(ht,0,gt)}else if(ze.targetIndex!==void 0){const ot=ze.item?.value.data.toString()??"";!ze.item?.value.data&&ze.originalItem.value.data&&ze.targetIndex>-1?Je.splice(ze.targetIndex,1):ze.item?.value.data&&ze.originalItem.value.data?ze.targetIndex>-1?Je[ze.targetIndex]=ot:Je.push(ot):ze.item?.value.data&&!ze.originalItem.value.data&&ze.targetIndex>=Je.length&&Je.push(ot)}return Oe.context.defaultValue&&(0,a.isArray)(Oe.context.defaultValue)&&Oe.context.defaultValue.length===Je.length&&Oe.context.defaultValue.join()===Je.join()?void 0:Je}}renderElement(Oe,ze,Je){super.renderSettingElement(Oe,ze,Je)}renderValue(Oe,ze,Je){const ot=ue(Oe),ht=Oe.setting.enum?se(Oe):void 0;ze.listWidget.setValue(ot,{showAddButton:oe(Oe,ot),keySuggester:ht}),ze.context=Oe,ze.elementDisposables.add((0,r.toDisposable)(()=>{ze.listWidget.cancelEdit()})),ze.onChange=gt=>{if(gt&&!ct(Oe,ze,gt,!1)){const bt=Oe.setting.arrayItemType,Ct=le(bt)?gt.map(_t=>+_t):gt;Je(Ct)}else Je(gt)},ct(Oe,ze,ot.map(gt=>gt.value.data.toString()),!0)}}e.SettingArrayRenderer=qe;class Be extends et{renderTemplateWithWidget(Oe,ze){ze.domNode.classList.add(et.CONTROL_CLASS),Oe.toDispose.add(ze);const Je=Oe.containerElement.querySelector(".setting-item-description"),ot=X(".setting-item-validation-message");Je.after(ot);const ht={...Oe,validationErrorMessageElement:ot};return ze instanceof L.ObjectSettingCheckboxWidget?ht.objectCheckboxWidget=ze:ht.objectDropdownWidget=ze,this.addSettingElementFocusHandler(ht),Oe.toDispose.add(ze.onDidChangeList(gt=>{this.onDidChangeObject(ht,gt)})),ht}onDidChangeObject(Oe,ze){const Je=Oe.objectCheckboxWidget??Oe.objectDropdownWidget;if(Oe.context){const ot=typeof Oe.context.defaultValue=="object"?Oe.context.defaultValue??{}:{},ht=typeof Oe.context.scopeValue=="object"?Oe.context.scopeValue??{}:{},gt={},bt=[];if(Je.items.forEach((Ct,_t)=>{(0,a.isDefined)(ze.item)&&ze.targetIndex===_t?(gt[ze.item.key.data]=ze.item.value.data,bt.push(ze.item)):((0,a.isUndefinedOrNull)(ze.item)||ze.item.key.data!==Ct.key.data)&&(gt[Ct.key.data]=Ct.value.data,bt.push(Ct))}),(0,a.isUndefinedOrNull)(ze.item)){delete gt[ze.originalItem.key.data];const Ct=bt.findIndex(Lt=>Lt.key.data===ze.originalItem.key.data),_t=ot[ze.originalItem.key.data];(0,a.isUndefinedOrNull)(ot[ze.originalItem.key.data])&&Ct>-1?bt.splice(Ct,1):Ct>-1&&(bt[Ct].value.data=_t)}else Je.isItemNew(ze.originalItem)&&ze.item.key.data!==""&&(gt[ze.item.key.data]=ze.item.value.data,bt.push(ze.item));Oe.objectCheckboxWidget?(Object.entries(gt).forEach(([Ct,_t])=>{ht[Ct]!==_t&&ot[Ct]===_t&&delete gt[Ct]}),Oe.objectCheckboxWidget.setValue(bt)):Oe.objectDropdownWidget.setValue(bt),Oe.onChange&&Oe.onChange(gt)}}renderElement(Oe,ze,Je){super.renderSettingElement(Oe,ze,Je)}}class Ke extends Be{constructor(){super(...arguments);this.templateId=xe}renderTemplate(Oe){const ze=this.renderCommonTemplate(null,Oe,"list"),Je=this._instantiationService.createInstance(L.ObjectSettingDropdownWidget,ze.controlElement);return this.renderTemplateWithWidget(ze,Je)}renderValue(Oe,ze,Je){const ot=te(Oe),{key:ht,objectProperties:gt,objectPatternProperties:bt,objectAdditionalProperties:Ct}=Oe.setting;ze.objectDropdownWidget.setValue(ot,{settingKey:ht,showAddButton:Ct===!1?!$(Object.keys(gt??{}),ot)||(0,a.isDefined)(bt):!0,keySuggester:ie(Oe),valueSuggester:ce(Oe)}),ze.context=Oe,ze.elementDisposables.add((0,r.toDisposable)(()=>{ze.objectDropdownWidget.cancelEdit()})),ze.onChange=_t=>{if(_t&&!ct(Oe,ze,_t,!1)){const Lt=ae(Oe,_t);Je(Lt)}else Je(_t)},ct(Oe,ze,Oe.value,!0)}}e.SettingObjectRenderer=Ke;class Xe extends Be{constructor(){super(...arguments);this.templateId=Ae}renderTemplate(Oe){const ze=this.renderCommonTemplate(null,Oe,"list"),Je=this._instantiationService.createInstance(L.ObjectSettingCheckboxWidget,ze.controlElement);return this.renderTemplateWithWidget(ze,Je)}onDidChangeObject(Oe,ze){Oe.context&&(super.onDidChangeObject(Oe,ze),this._onDidFocusSetting.fire(Oe.context))}renderValue(Oe,ze,Je){const ot=te(Oe),{key:ht}=Oe.setting;ze.objectCheckboxWidget.setValue(ot,{settingKey:ht}),ze.context=Oe,ze.onChange=gt=>{Je(gt)}}}e.SettingBoolObjectRenderer=Xe;class rt extends et{constructor(){super(...arguments);this.templateId=Ne}renderTemplate(Oe){const ze=this.renderCommonTemplate(null,Oe,"list"),Je=this._instantiationService.createInstance(L.ExcludeSettingWidget,ze.controlElement);Je.domNode.classList.add(et.CONTROL_CLASS),ze.toDispose.add(Je);const ot={...ze,excludeWidget:Je};return this.addSettingElementFocusHandler(ot),ze.toDispose.add(Je.onDidChangeList(ht=>this.onDidChangeExclude(ot,ht))),ot}onDidChangeExclude(Oe,ze){if(Oe.context){let ot=function(ht){const gt=Object.keys(ht).sort((Ct,_t)=>Ct.localeCompare(_t)),bt={};for(const Ct of gt)bt[Ct]=ht[Ct];return bt};const Je={...Oe.context.scopeValue};ze.originalItem.value.data.toString()in Oe.context.defaultValue?Je[ze.originalItem.value.data.toString()]=!1:delete Je[ze.originalItem.value.data.toString()],ze.item?.value&&(ze.item.value.data.toString()in Oe.context.defaultValue&&!ze.item.sibling?delete Je[ze.item.value.data.toString()]:Je[ze.item.value.data.toString()]=ze.item.sibling?{when:ze.item.sibling}:!0),this._onDidChangeSetting.fire({key:Oe.context.setting.key,value:Object.keys(Je).length===0?void 0:ot(Je),type:Oe.context.valueType,manualReset:!1})}}renderElement(Oe,ze,Je){super.renderSettingElement(Oe,ze,Je)}renderValue(Oe,ze,Je){const ot=Y(Oe);ze.excludeWidget.setValue(ot),ze.context=Oe,ze.elementDisposables.add((0,r.toDisposable)(()=>{ze.excludeWidget.cancelEdit()}))}}e.SettingExcludeRenderer=rt;class it extends et{constructor(){super(...arguments);this.MULTILINE_MAX_HEIGHT=150}renderTemplate(Oe,ze){const Je=this.renderCommonTemplate(null,Oe,"text"),ot=f.append(Je.containerElement,X(".setting-item-validation-message")),ht={flexibleHeight:ze,flexibleWidth:!1,flexibleMaxHeight:this.MULTILINE_MAX_HEIGHT},gt=new D.InputBox(Je.controlElement,this._contextViewService,ht);Je.toDispose.add(gt),Je.toDispose.add((0,R.attachInputBoxStyler)(gt,this._themeService,{inputBackground:j.settingsTextInputBackground,inputForeground:j.settingsTextInputForeground,inputBorder:j.settingsTextInputBorder})),Je.toDispose.add(gt.onDidChange(Ct=>{bt.onChange&&bt.onChange(Ct)})),Je.toDispose.add(gt),gt.inputElement.classList.add(et.CONTROL_CLASS),gt.inputElement.tabIndex=0;const bt={...Je,inputBox:gt,validationErrorMessageElement:ot};return this.addSettingElementFocusHandler(bt),bt}renderElement(Oe,ze,Je){super.renderSettingElement(Oe,ze,Je)}renderValue(Oe,ze,Je){ze.onChange=void 0,ze.inputBox.value=Oe.value,ze.inputBox.setAriaLabel(Oe.setting.key),ze.onChange=ot=>{He(Oe,ze,!1)||Je(ot)},He(Oe,ze,!0)}}class at extends it{constructor(){super(...arguments);this.templateId=ke}renderTemplate(Oe){const ze=super.renderTemplate(Oe,!1);return ze.toDispose.add(f.addStandardDisposableListener(ze.inputBox.inputElement,f.EventType.KEY_DOWN,Je=>{(Je.equals(16)||Je.equals(18))&&Je.preventDefault()})),ze}}e.SettingTextRenderer=at;class ft extends it{constructor(){super(...arguments);this.templateId=Ie}renderTemplate(Oe){return super.renderTemplate(Oe,!0)}renderValue(Oe,ze,Je){const ot=ht=>{Oe.value=ht,Je(ht)};super.renderValue(Oe,ze,ot),ze.elementDisposables.add(ze.inputBox.onDidHeightChange(ht=>{ze.containerElement.clientHeight&&this._onDidChangeSettingHeight.fire({element:Oe,height:ze.containerElement.clientHeight})})),ze.inputBox.layout()}}e.SettingMultilineTextRenderer=ft;class vt extends et{constructor(){super(...arguments);this.templateId=De}renderTemplate(Oe){const ze=this.renderCommonTemplate(null,Oe,"enum"),Je=new v.SelectBox([],0,this._contextViewService,void 0,{useCustomDrawn:!(p.isIOS&&t.BrowserFeatures.pointerEvents)});ze.toDispose.add(Je),ze.toDispose.add((0,R.attachSelectBoxStyler)(Je,this._themeService,{selectBackground:j.settingsSelectBackground,selectForeground:j.settingsSelectForeground,selectBorder:j.settingsSelectBorder,selectListBorder:j.settingsSelectListBorder})),Je.render(ze.controlElement);const ot=ze.controlElement.querySelector("select");ot&&(ot.classList.add(et.CONTROL_CLASS),ot.tabIndex=0),ze.toDispose.add(Je.onDidSelect(bt=>{gt.onChange&>.onChange(bt.index)}));const ht=ze.containerElement.insertBefore(X(".setting-item-enumDescription"),ze.descriptionElement.nextSibling),gt={...ze,selectBox:Je,enumDescriptionElement:ht};return this.addSettingElementFocusHandler(gt),gt}renderElement(Oe,ze,Je){super.renderSettingElement(Oe,ze,Je)}renderValue(Oe,ze,Je){const ot=Oe.setting.enumItemLabels?[...Oe.setting.enumItemLabels]:[],ht=Oe.setting.enumDescriptions?[...Oe.setting.enumDescriptions]:[],gt=[...Oe.setting.enum],bt=Oe.setting.enumDescriptionsAreMarkdown,Ct=new r.DisposableStore;ze.toDispose.add(Ct);let _t=!1;gt.includes(Oe.defaultValue)||(gt.unshift(Oe.defaultValue),ht.unshift(""),ot.unshift(""),_t=!0);const Lt=pt(String(Oe.defaultValue)),Pt=gt.map(String).map(pt).map((Ft,Bt)=>{const Yt=ht[Bt]&&(bt?ut(ht[Bt],!1):ht[Bt]);return{text:ot[Bt]?ot[Bt]:Ft,detail:ot[Bt]?Ft:"",description:Yt,descriptionIsMarkdown:bt,descriptionMarkdownActionHandler:{callback:Kt=>{this._openerService.open(Kt).catch(s.onUnexpectedError)},disposables:Ct},decoratorRight:Ft===Lt||_t&&Bt===0?(0,n.localize)(6,null):""}});ze.selectBox.setOptions(Pt),ze.selectBox.setAriaLabel(Oe.setting.key);let Nt=gt.indexOf(Oe.value);Nt===-1&&(Nt=0),ze.onChange=void 0,ze.selectBox.select(Nt),ze.onChange=Ft=>{Je(_t&&Ft===0?Oe.defaultValue:gt[Ft])},ze.enumDescriptionElement.innerText=""}}e.SettingEnumRenderer=vt;class Dt extends et{constructor(){super(...arguments);this.templateId=Te}renderTemplate(Oe){const ze=super.renderCommonTemplate(null,Oe,"number"),Je=f.append(ze.containerElement,X(".setting-item-validation-message")),ot=new D.InputBox(ze.controlElement,this._contextViewService,{type:"number"});ze.toDispose.add(ot),ze.toDispose.add((0,R.attachInputBoxStyler)(ot,this._themeService,{inputBackground:j.settingsNumberInputBackground,inputForeground:j.settingsNumberInputForeground,inputBorder:j.settingsNumberInputBorder})),ze.toDispose.add(ot.onDidChange(gt=>{ht.onChange&&ht.onChange(gt)})),ze.toDispose.add(ot),ot.inputElement.classList.add(et.CONTROL_CLASS),ot.inputElement.tabIndex=0;const ht={...ze,inputBox:ot,validationErrorMessageElement:Je};return this.addSettingElementFocusHandler(ht),ht}renderElement(Oe,ze,Je){super.renderSettingElement(Oe,ze,Je)}renderValue(Oe,ze,Je){const ot=Oe.valueType==="integer"||Oe.valueType==="nullable-integer"?parseInt:parseFloat,ht=Oe.valueType==="nullable-integer"||Oe.valueType==="nullable-number"?gt=>gt===""?null:ot(gt):ot;ze.onChange=void 0,ze.inputBox.value=Oe.value,ze.inputBox.setAriaLabel(Oe.setting.key),ze.onChange=gt=>{He(Oe,ze,!1)||Je(ht(gt))},He(Oe,ze,!0)}}e.SettingNumberRenderer=Dt;class kt extends et{constructor(){super(...arguments);this.templateId=_e}renderTemplate(Oe){Oe.classList.add("setting-item"),Oe.classList.add("setting-item-bool");const ze=f.append(Oe,X(et.CONTENTS_SELECTOR));ze.classList.add("settings-row-inner-container");const Je=f.append(ze,X(".setting-item-title")),ot=f.append(Je,X("span.setting-item-category")),ht=f.append(Je,X("span.setting-item-label")),gt=new U.SimpleIconLabel(ht),bt=new Et(Je),Ct=f.append(ze,X(".setting-item-value-description")),_t=f.append(Ct,X(".setting-item-bool-control")),Lt=f.append(Ct,X(".setting-item-description")),Pt=f.append(ze,X(".setting-item-modified-indicator"));Pt.title=(0,n.localize)(7,null);const Nt=f.append(ze,X(".setting-item-deprecation-message")),Ft=new r.DisposableStore,Bt=new k.Toggle({icon:z.Codicon.check,actionClassName:"setting-value-checkbox",isChecked:!0,title:"",inputActiveOptionBorder:void 0});_t.appendChild(Bt.domNode),Ft.add(Bt),Ft.add(Bt.onChange(()=>{Gt.onChange(Bt.checked)})),Ft.add(f.addDisposableListener(Lt,f.EventType.MOUSE_DOWN,wt=>{wt.target.tagName.toLowerCase()!=="a"&&(Gt.checkbox.checked=!Gt.checkbox.checked,Gt.onChange(Bt.checked)),f.EventHelper.stop(wt)})),Bt.domNode.classList.add(et.CONTROL_CLASS);const Yt=f.append(ze,X(".setting-toolbar-container")),Kt=this.renderSettingToolbar(Yt);Ft.add(Kt);const Gt={toDispose:Ft,elementDisposables:new r.DisposableStore,containerElement:ze,categoryElement:ot,labelElement:gt,controlElement:_t,checkbox:Bt,descriptionElement:Lt,deprecationWarningElement:Nt,miscLabel:bt,toolbar:Kt};return this.addSettingElementFocusHandler(Gt),Ft.add(f.addDisposableListener(_t,"mousedown",wt=>wt.stopPropagation())),Ft.add(f.addDisposableListener(Je,f.EventType.MOUSE_ENTER,wt=>ze.classList.add("mouseover"))),Ft.add(f.addDisposableListener(Je,f.EventType.MOUSE_LEAVE,wt=>ze.classList.remove("mouseover"))),Gt}renderElement(Oe,ze,Je){super.renderSettingElement(Oe,ze,Je)}renderValue(Oe,ze,Je){ze.onChange=void 0,ze.checkbox.checked=Oe.value,ze.checkbox.setTitle(Oe.setting.key),ze.onChange=Je}}e.SettingBoolRenderer=kt;class At extends et{constructor(){super(...arguments);this.templateId=ye}renderTemplate(Oe){const ze=this.renderCommonTemplate(null,Oe,"untrusted"),Je=(0,n.localize)(8,null),ot=X(".setting-item-trust-description"),ht=f.append(ot,X("span.codicon.codicon-workspace-untrusted"));ze.toDispose.add((0,R.attachStylerCallback)(this._themeService,{editorErrorForeground:T.editorErrorForeground},Ct=>{ht.style.setProperty("--workspace-trust-state-untrusted-color",Ct.editorErrorForeground?.toString()||"")}));const gt=f.append(ot,X("span"));gt.textContent=(0,n.localize)(9,null);const bt=f.append(ot,X("a"));return bt.textContent=Je,bt.setAttribute("tabindex","0"),bt.href="#",ze.toDispose.add(f.addStandardDisposableListener(bt,f.EventType.CLICK,Ct=>{Ct.preventDefault(),Ct.stopPropagation(),this._commandService.executeCommand("workbench.trust.manage")})),ze.toDispose.add(f.addStandardDisposableListener(bt,f.EventType.KEY_DOWN,Ct=>{(Ct.equals(3)||Ct.equals(10))&&(this._commandService.executeCommand("workbench.trust.manage"),Ct.stopPropagation())})),ze.containerElement.insertBefore(ot,ze.descriptionElement),ze}renderElement(Oe,ze,Je){super.renderSettingElement(Oe,ze,Je)}renderValue(Oe,ze,Je){}}e.SettingUntrustedRenderer=At;let St=class{constructor(Oe,ze,Je,ot){this._instantiationService=Oe,this._contextMenuService=ze,this._contextViewService=Je,this._userDataSyncEnablementService=ot,this._onDidChangeSetting=new l.Emitter,this.settingActions=[new c.Action("settings.resetSetting",(0,n.localize)(10,null),void 0,void 0,async bt=>{bt instanceof F.SettingsTreeSettingElement&&(bt.isUntrusted||this._onDidChangeSetting.fire({key:bt.setting.key,value:void 0,type:bt.setting.type,manualReset:!0}))}),new c.Separator,this._instantiationService.createInstance(Pe),this._instantiationService.createInstance(Ge)];const ht=bt=>this.getActionsForSetting(bt),gt=[this._instantiationService.createInstance(kt,this.settingActions,ht),this._instantiationService.createInstance(Dt,this.settingActions,ht),this._instantiationService.createInstance(qe,this.settingActions,ht),this._instantiationService.createInstance(Qe,this.settingActions,ht),this._instantiationService.createInstance(at,this.settingActions,ht),this._instantiationService.createInstance(ft,this.settingActions,ht),this._instantiationService.createInstance(rt,this.settingActions,ht),this._instantiationService.createInstance(vt,this.settingActions,ht),this._instantiationService.createInstance(Ke,this.settingActions,ht),this._instantiationService.createInstance(Xe,this.settingActions,ht),this._instantiationService.createInstance(At,this.settingActions,ht)];this.onDidClickOverrideElement=l.Event.any(...gt.map(bt=>bt.onDidClickOverrideElement)),this.onDidChangeSetting=l.Event.any(...gt.map(bt=>bt.onDidChangeSetting),this._onDidChangeSetting.event),this.onDidOpenSettings=l.Event.any(...gt.map(bt=>bt.onDidOpenSettings)),this.onDidClickSettingLink=l.Event.any(...gt.map(bt=>bt.onDidClickSettingLink)),this.onDidFocusSetting=l.Event.any(...gt.map(bt=>bt.onDidFocusSetting)),this.onDidChangeSettingHeight=l.Event.any(...gt.map(bt=>bt.onDidChangeSettingHeight)),this.onApplyLanguageFilter=l.Event.any(...gt.map(bt=>bt.onApplyLanguageFilter)),this.allRenderers=[...gt,this._instantiationService.createInstance(Ze),this._instantiationService.createInstance(Fe)]}getActionsForSetting(Oe){return this._userDataSyncEnablementService.isEnabled()&&!Oe.disallowSyncIgnore?[new c.Separator,this._instantiationService.createInstance(Ye,Oe)]:[]}cancelSuggesters(){this._contextViewService.hideContextView()}showContextMenu(Oe,ze){const Je=ze.querySelector(".monaco-toolbar");Je&&this._contextMenuService.showContextMenu({getActions:()=>this.settingActions,getAnchor:()=>Je,getActionsContext:()=>Oe})}getSettingDOMElementForDOMElement(Oe){const ze=f.findParentWithClass(Oe,et.CONTENTS_CLASS);return ze||null}getDOMElementsForSettingKey(Oe,ze){return Oe.querySelectorAll(`[${et.SETTING_KEY_ATTR}="${ze}"]`)}getKeyForDOMElementInSetting(Oe){const ze=this.getSettingDOMElementForDOMElement(Oe);return ze&&ze.getAttribute(et.SETTING_KEY_ATTR)}getIdForDOMElementInSetting(Oe){const ze=this.getSettingDOMElementForDOMElement(Oe);return ze&&ze.getAttribute(et.SETTING_ID_ATTR)}};St=Ee([W(0,b.IInstantiationService),W(1,m.IContextMenuService),W(2,m.IContextViewService),W(3,P.IUserDataSyncEnablementService)],St),e.SettingTreeRenderers=St;function He(je,Oe,ze){if(je.setting.validator){const Je=je.setting.validator(Oe.inputBox.value);if(Je){Oe.containerElement.classList.add("invalid-input"),Oe.validationErrorMessageElement.innerText=Je;const ot=(0,n.localize)(11,null);return Oe.inputBox.inputElement.parentElement.setAttribute("aria-label",[ot,Je].join(" ")),ze||(0,_.alert)(ot+" "+Je),!0}else Oe.inputBox.inputElement.parentElement.removeAttribute("aria-label")}return Oe.containerElement.classList.remove("invalid-input"),!1}function ct(je,Oe,ze,Je){if(Oe.containerElement.classList.add("invalid-input"),je.setting.validator){const ot=je.setting.validator(ze);if(ot&&ot!==""){Oe.containerElement.classList.add("invalid-input"),Oe.validationErrorMessageElement.innerText=ot;const ht=(0,n.localize)(12,null);return Oe.containerElement.setAttribute("aria-label",[je.setting.key,ht,ot].join(" ")),Je||(0,_.alert)(ht+" "+ot),!0}else Oe.containerElement.setAttribute("aria-label",je.setting.key),Oe.containerElement.classList.remove("invalid-input")}return!1}function lt(je){for(let Oe=0;Oe<je.childNodes.length;Oe++){const ze=je.childNodes.item(Oe);(ze.tagName&&ze.tagName.toLowerCase())==="img"?je.removeChild(ze):lt(ze)}}function ut(je,Oe=!0){return je.replace(/`#([^#]*)#`|'#([^#]*)#'/g,(ze,Je,ot)=>{const ht=Je??ot,gt=(0,F.settingKeyToDisplayFormat)(ht),bt=`${gt.category}: ${gt.label}`;return Oe?`[${bt}](#${ht} "${ht}")`:`"${bt}"`})}function pt(je){return je&&je.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class Et{constructor(Oe){this.labelElement=f.append(Oe,X(".misc-label")),this.labelElement.style.display="inline",this.otherOverridesElement=this.createOtherOverridesElement(),this.syncIgnoredElement=this.createSyncIgnoredElement();const{element:ze,label:Je}=this.createDefaultOverrideIndicator();this.defaultOverrideIndicatorElement=ze,this.defaultOverrideIndicatorLabel=Je}createOtherOverridesElement(){return X("span.setting-item-overrides")}createSyncIgnoredElement(){const Oe=X("span.setting-item-ignored"),ze=new U.SimpleIconLabel(Oe);return ze.text=`$(sync-ignored) ${(0,n.localize)(13,null)}`,ze.title=(0,n.localize)(14,null),Oe}createDefaultOverrideIndicator(){const Oe=X("span.setting-item-default-overridden"),ze=new U.SimpleIconLabel(Oe);return{element:Oe,label:ze}}render(){const Oe=[this.otherOverridesElement,this.syncIgnoredElement,this.defaultOverrideIndicatorElement].filter(ze=>ze.style.display!=="none");if(this.labelElement.innerText="",this.labelElement.style.display="none",Oe.length){this.labelElement.style.display="inline",f.append(this.labelElement,X("span",void 0,"("));for(let ze=0;ze<Oe.length-1;ze++)f.append(this.labelElement,Oe[ze]),f.append(this.labelElement,X("span.comma",void 0,", "));f.append(this.labelElement,Oe[Oe.length-1]),f.append(this.labelElement,X("span",void 0,")"))}}updateSyncIgnored(Oe,ze){this.syncIgnoredElement.style.display=ze.includes(Oe.setting.key)?"inline":"none",this.render()}updateOtherOverrides(Oe,ze,Je){if(this.otherOverridesElement.innerText="",this.otherOverridesElement.style.display="none",Oe.overriddenScopeList.length){this.otherOverridesElement.style.display="inline";const ot=Oe.isConfigured?(0,n.localize)(15,null):(0,n.localize)(16,null);f.append(this.otherOverridesElement,X("span",void 0,`${ot}: `));for(let ht=0;ht<Oe.overriddenScopeList.length;ht++){const gt=f.append(this.otherOverridesElement,X("a.modified-scope",void 0,Oe.overriddenScopeList[ht]));ht!==Oe.overriddenScopeList.length-1&&f.append(this.otherOverridesElement,X("span",void 0,", ")),ze.add(f.addStandardDisposableListener(gt,f.EventType.CLICK,bt=>{Je.fire({targetKey:Oe.setting.key,scope:Oe.overriddenScopeList[ht]}),bt.preventDefault(),bt.stopPropagation()}))}}this.render()}updateDefaultOverrideIndicator(Oe){if(this.defaultOverrideIndicatorElement.style.display="none",Oe.setting.defaultValueSource){this.defaultOverrideIndicatorElement.style.display="inline";const ze=Oe.setting.defaultValueSource;if(typeof ze!="string"&&ze.id!==Oe.setting.extensionInfo?.id){const Je=ze.displayName??ze.id;this.defaultOverrideIndicatorLabel.title=(0,n.localize)(17,null,Je),this.defaultOverrideIndicatorLabel.text=(0,n.localize)(18,null,Je)}else typeof ze=="string"&&(this.defaultOverrideIndicatorLabel.title=(0,n.localize)(19,null,ze),this.defaultOverrideIndicatorLabel.text=(0,n.localize)(20,null,ze))}this.render()}}let yt=class{constructor(Oe,ze){this.viewState=Oe,this.environmentService=ze}filter(Oe,ze){if(this.viewState.filterToCategory&&Oe instanceof F.SettingsTreeSettingElement&&!this.settingContainedInGroup(Oe.setting,this.viewState.filterToCategory))return!1;if(Oe instanceof F.SettingsTreeSettingElement&&this.viewState.settingsTarget!==2){const Je=!!this.environmentService.remoteAuthority;if(!Oe.matchesScope(this.viewState.settingsTarget,Je))return!1}return Oe instanceof F.SettingsTreeSettingElement&&this.viewState.tagFilters&&!Oe.matchesAllTags(this.viewState.tagFilters)?!1:Oe instanceof F.SettingsTreeGroupElement?typeof Oe.count=="number"?Oe.count>0:2:!(Oe instanceof F.SettingsTreeNewExtensionsElement&&(this.viewState.tagFilters&&this.viewState.tagFilters.size||this.viewState.filterToCategory))}settingContainedInGroup(Oe,ze){return ze.children.some(Je=>Je instanceof F.SettingsTreeGroupElement?this.settingContainedInGroup(Oe,Je):Je instanceof F.SettingsTreeSettingElement?Je.setting.key===Oe.key:!1)}};yt=Ee([W(1,N.IWorkbenchEnvironmentService)],yt),e.SettingsTreeFilter=yt;class mt extends I.CachedListVirtualDelegate{getTemplateId(Oe){if(Oe instanceof F.SettingsTreeGroupElement)return We;if(Oe instanceof F.SettingsTreeSettingElement)return Oe.isUntrusted?ye:Oe.isConfigured&&(0,V.getInvalidTypeError)(Oe.value,Oe.setting.type)?Le:Oe.valueType===B.SettingValueType.Boolean?_e:Oe.valueType===B.SettingValueType.Integer||Oe.valueType===B.SettingValueType.Number||Oe.valueType===B.SettingValueType.NullableInteger||Oe.valueType===B.SettingValueType.NullableNumber?Te:Oe.valueType===B.SettingValueType.MultilineString?Ie:Oe.valueType===B.SettingValueType.String?ke:Oe.valueType===B.SettingValueType.Enum?De:Oe.valueType===B.SettingValueType.Array?Re:Oe.valueType===B.SettingValueType.Exclude?Ne:Oe.valueType===B.SettingValueType.Object?xe:Oe.valueType===B.SettingValueType.BooleanObject?Ae:(Oe.valueType===B.SettingValueType.LanguageTag,Le);if(Oe instanceof F.SettingsTreeNewExtensionsElement)return Me;throw new Error("unknown element type: "+Oe)}hasDynamicHeight(Oe){return!(Oe instanceof F.SettingsTreeGroupElement)}estimateHeight(Oe){return Oe instanceof F.SettingsTreeGroupElement?42:Oe instanceof F.SettingsTreeSettingElement&&Oe.valueType===B.SettingValueType.Boolean?78:104}}class It extends o.ObjectTreeModel{isCollapsible(Oe){return!1}setCollapsed(Oe,ze,Je){return!1}}e.NonCollapsibleObjectTreeModel=It;class Rt{constructor(Oe){this.configurationService=Oe}getAriaLabel(Oe){if(Oe instanceof F.SettingsTreeSettingElement){const ze=[];if(ze.push(`${Oe.displayCategory} ${Oe.displayLabel}.`),Oe.isConfigured){const ht=(0,n.localize)(21,null);ze.push(ht)}const Je=this.getMiscLabelAriaLabel(Oe);Je.length&&ze.push(`${Je}.`);const ot=ut(Oe.description,!1);return ot.length&&ze.push(ot),ze.join(" ")}else return Oe instanceof F.SettingsTreeGroupElement?Oe.label:Oe.id}getWidgetAriaLabel(){return(0,n.localize)(22,null)}getMiscLabelAriaLabel(Oe){const ze=[],Je=Oe.isConfigured?(0,n.localize)(23,null):(0,n.localize)(24,null),ot=Oe.overriddenScopeList.join(", ");if(Oe.overriddenScopeList.length&&ze.push(`${Je} ${ot}`),(0,x.getIgnoredSettings)((0,P.getDefaultIgnoredSettings)(),this.configurationService).includes(Oe.setting.key)&&ze.push((0,n.localize)(25,null)),Oe.setting.defaultValueSource){const bt=Oe.setting.defaultValueSource;if(typeof bt!="string"&&bt.id!==Oe.setting.extensionInfo?.id){const Ct=bt.displayName??bt.id;ze.push((0,n.localize)(26,null,Ct))}else typeof bt=="string"&&ze.push((0,n.localize)(27,null,bt))}return ze.join(". ")}}let $e=class extends H.WorkbenchObjectTree{constructor(Oe,ze,Je,ot,ht,gt,bt,Ct,_t,Lt){super("SettingsTree",Oe,new mt,Je,{horizontalScrolling:!1,supportDynamicHeights:!0,identityProvider:{getId(Pt){return Pt.id}},accessibilityProvider:new Rt(bt),styleController:Pt=>new w.DefaultStyleController(f.createStyleSheet(Oe),Pt),filter:Lt.createInstance(yt,ze),smoothScrolling:bt.getValue("workbench.list.smoothScrolling"),multipleSelectionSupport:!1},ot,ht,gt,bt,Ct,_t);this.disposables.add((0,O.registerThemingParticipant)((Pt,Nt)=>{const Ft=Pt.getColor(T.foreground);if(Ft){const Mt=new S.Color(new S.RGBA(Ft.rgba.r,Ft.rgba.g,Ft.rgba.b,.9));Nt.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-description { color: ${Mt}; }`),Nt.addRule(`.settings-editor > .settings-body .settings-toc-container .monaco-list-row:not(.selected) { color: ${Mt}; }`);const zt=new S.Color(new S.RGBA(Ft.rgba.r,Ft.rgba.g,Ft.rgba.b,.7));Nt.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-untrusted > .setting-item-contents .setting-item-description { color: ${zt}; }`),Nt.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-title .setting-item-overrides, .settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-title .setting-item-ignored { color: ${Mt}; }`)}const Bt=Pt.getColor(T.errorForeground);Bt&&Nt.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-deprecation-message { color: ${Bt}; }`);const Yt=Pt.getColor(T.inputValidationErrorBackground);Yt&&Nt.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-validation-message { background-color: ${Yt}; }`);const Kt=Pt.getColor(T.inputValidationErrorForeground);Kt&&Nt.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-validation-message { color: ${Kt}; }`);const Gt=Pt.getColor(T.inputValidationErrorBorder);Gt&&(Nt.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-validation-message { border-style:solid; border-width: 1px; border-color: ${Gt}; }`),Nt.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item.invalid-input .setting-item-control .monaco-inputbox.idle { outline-width: 0; border-style:solid; border-width: 1px; border-color: ${Gt}; }`));const wt=Pt.getColor(j.focusedRowBackground);wt&&Nt.addRule(`.settings-editor > .settings-body .settings-tree-container .monaco-list-row.focused .settings-row-inner-container { background-color: ${wt}; }`);const tt=Pt.getColor(j.rowHoverBackground);tt&&Nt.addRule(`.settings-editor > .settings-body .settings-tree-container .monaco-list-row:not(.focused) .settings-row-inner-container:hover { background-color: ${tt}; }`);const nt=Pt.getColor(j.focusedRowBorder);nt&&(Nt.addRule(`.settings-editor > .settings-body .settings-tree-container .monaco-list:focus-within .monaco-list-row.focused .setting-item-contents { outline: 1px solid ${nt} }`),Nt.addRule(`.settings-editor > .settings-body .settings-tree-container .monaco-list:focus-within .monaco-list-row.focused .settings-group-title-label { outline: 1px solid ${nt} }`));const st=Pt.getColor(j.settingsHeaderForeground);st&&(Nt.addRule(`.settings-editor > .settings-body .settings-tree-container .settings-group-title-label { color: ${st}; }`),Nt.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-label { color: ${st}; }`));const Tt=Pt.getColor(T.focusBorder);Tt&&(Nt.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-trust-description a:focus { outline-color: ${Tt} }`),Nt.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-markdown a:focus { outline-color: ${Tt} }`))})),this.getHTMLElement().classList.add("settings-editor-tree"),this.disposables.add((0,R.attachStyler)(gt,{listBackground:T.editorBackground,listActiveSelectionBackground:T.editorBackground,listActiveSelectionForeground:T.foreground,listFocusAndSelectionBackground:T.editorBackground,listFocusAndSelectionForeground:T.foreground,listFocusBackground:T.editorBackground,listFocusForeground:T.foreground,listHoverForeground:T.foreground,listHoverBackground:T.editorBackground,listHoverOutline:T.editorBackground,listFocusOutline:T.editorBackground,listInactiveSelectionBackground:T.editorBackground,listInactiveSelectionForeground:T.foreground,listInactiveFocusBackground:T.editorBackground,listInactiveFocusOutline:T.editorBackground},Pt=>{this.style(Pt)})),this.disposables.add(bt.onDidChangeConfiguration(Pt=>{Pt.affectsConfiguration("workbench.list.smoothScrolling")&&this.updateOptions({smoothScrolling:bt.getValue("workbench.list.smoothScrolling")})}))}createModel(Oe,ze,Je){return new It(Oe,ze,Je)}};$e=Ee([W(3,K.IContextKeyService),W(4,H.IListService),W(5,O.IThemeService),W(6,d.IConfigurationService),W(7,E.IKeybindingService),W(8,G.IAccessibilityService),W(9,b.IInstantiationService)],$e),e.SettingsTree=$e;let Pe=class Vr extends c.Action{constructor(Oe){super(Vr.ID,Vr.LABEL);this.clipboardService=Oe}async run(Oe){return Oe&&await this.clipboardService.writeText(Oe.setting.key),Promise.resolve(void 0)}};Pe.ID="settings.copySettingId",Pe.LABEL=(0,n.localize)(28,null),Pe=Ee([W(0,h.IClipboardService)],Pe);let Ge=class zr extends c.Action{constructor(Oe){super(zr.ID,zr.LABEL);this.clipboardService=Oe}async run(Oe){if(Oe){const ze=`"${Oe.setting.key}": ${JSON.stringify(Oe.value,void 0," ")}`;await this.clipboardService.writeText(ze)}return Promise.resolve(void 0)}};Ge.ID="settings.copySettingAsJSON",Ge.LABEL=(0,n.localize)(29,null),Ge=Ee([W(0,h.IClipboardService)],Ge);let Ye=class Ur extends c.Action{constructor(Oe,ze){super(Ur.ID,Ur.LABEL);this.setting=Oe,this.configService=ze,this._register(l.Event.filter(ze.onDidChangeConfiguration,Je=>Je.affectsConfiguration("settingsSync.ignoredSettings"))(()=>this.update())),this.update()}async update(){const Oe=(0,x.getIgnoredSettings)((0,P.getDefaultIgnoredSettings)(),this.configService);this.checked=!Oe.includes(this.setting.key)}async run(){let Oe=[...this.configService.getValue("settingsSync.ignoredSettings")];Oe=Oe.filter(ht=>ht!==this.setting.key&&ht!==`-${this.setting.key}`);const Je=(0,P.getDefaultIgnoredSettings)().includes(this.setting.key),ot=!this.checked;return ot&&Je&&Oe.push(`-${this.setting.key}`),!ot&&!Je&&Oe.push(this.setting.key),this.configService.updateValue("settingsSync.ignoredSettings",Oe.length?Oe:void 0,1),Promise.resolve(void 0)}};Ye.ID="settings.stopSyncingSetting",Ye.LABEL=(0,n.localize)(30,null),Ye=Ee([W(1,d.IConfigurationService)],Ye)}),define(ne[2506],re([1,0,10,208,92,1685,98,8,7,5,38,71,32,68,12,892,620,493,50]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TOCTree=e.createTOCIterator=e.TOCRenderer=e.TOCTreeModel=void 0;const p=t.$;let u=class{constructor(E,y){this._viewState=E,this.environmentService=y,this._currentSearchModel=null}get settingsTreeRoot(){return this._settingsTreeRoot}set settingsTreeRoot(E){this._settingsTreeRoot=E,this.update()}get currentSearchModel(){return this._currentSearchModel}set currentSearchModel(E){this._currentSearchModel=E,this.update()}get children(){return this._settingsTreeRoot.children}update(){this._settingsTreeRoot&&this.updateGroupCount(this._settingsTreeRoot)}updateGroupCount(E){E.children.forEach(T=>{T instanceof s.SettingsTreeGroupElement&&this.updateGroupCount(T)});const y=E.children.filter(T=>T instanceof s.SettingsTreeGroupElement).reduce((T,R)=>T+R.count,0);E.count=y+this.getGroupCount(E)}getGroupCount(E){return E.children.filter(y=>{if(!(y instanceof s.SettingsTreeSettingElement)||this._currentSearchModel&&!this._currentSearchModel.root.containsSetting(y.setting.key))return!1;const T=!!this.environmentService.remoteAuthority;return y.matchesScope(this._viewState.settingsTarget,T)&&y.matchesAllTags(this._viewState.tagFilters)&&y.matchesAnyFeature(this._viewState.featureFilters)&&y.matchesAnyExtension(this._viewState.extensionFilters)&&y.matchesAnyId(this._viewState.idFilters)}).length}};u=Ee([W(1,r.IWorkbenchEnvironmentService)],u),e.TOCTreeModel=u;const a="settings.toc.entry";class n{constructor(){this.templateId=a}renderTemplate(E){return{labelElement:t.append(E,p(".settings-toc-entry")),countElement:t.append(E,p(".settings-toc-count"))}}renderElement(E,y,T){const R=E.element,O=R.count,x=R.label;T.labelElement.textContent=x,T.labelElement.title=x,O?T.countElement.textContent=` (${O})`:T.countElement.textContent=""}disposeTemplate(E){}}e.TOCRenderer=n;class h{getTemplateId(E){return a}getHeight(E){return 22}}function g(b,E){const y=b.children.filter(T=>T instanceof s.SettingsTreeGroupElement);return _.Iterable.map(y,T=>{const R=T.children.some(O=>O instanceof s.SettingsTreeGroupElement);return{element:T,collapsed:void 0,collapsible:R,children:T instanceof s.SettingsTreeGroupElement?g(T,E):void 0}})}e.createTOCIterator=g;class d{getWidgetAriaLabel(){return(0,A.localize)(0,null)}getAriaLabel(E){return E&&E instanceof s.SettingsTreeGroupElement?(0,A.localize)(1,null,E.label):""}getAriaLevel(E){let y=1;for(;E instanceof s.SettingsTreeGroupElement&&E.parent;)y++,E=E.parent;return y}}let m=class extends C.WorkbenchObjectTree{constructor(E,y,T,R,O,x,F,L,M){const B={filter:M.createInstance(S.SettingsTreeFilter,y),multipleSelectionSupport:!1,identityProvider:{getId(P){return P.id}},styleController:P=>new f.DefaultStyleController(t.createStyleSheet(E),P),accessibilityProvider:M.createInstance(d),collapseByDefault:!0,horizontalScrolling:!1,hideTwistiesOfChildlessElements:!0};super("SettingsTOC",E,new h,[new n],B,T,R,O,x,F,L);this.disposables.add((0,c.attachStyler)(O,{listBackground:o.editorBackground,listFocusOutline:o.focusBorder,listActiveSelectionBackground:o.editorBackground,listActiveSelectionForeground:l.settingsHeaderForeground,listFocusAndSelectionBackground:o.editorBackground,listFocusAndSelectionForeground:l.settingsHeaderForeground,listFocusBackground:o.editorBackground,listFocusForeground:(0,o.transparent)(o.foreground,.9),listHoverForeground:(0,o.transparent)(o.foreground,.9),listHoverBackground:o.editorBackground,listInactiveSelectionBackground:o.editorBackground,listInactiveSelectionForeground:l.settingsHeaderForeground,listInactiveFocusBackground:o.editorBackground,listInactiveFocusOutline:o.editorBackground},P=>{this.style(P)}))}};m=Ee([W(2,I.IContextKeyService),W(3,C.IListService),W(4,i.IThemeService),W(5,D.IConfigurationService),W(6,v.IKeybindingService),W(7,k.IAccessibilityService),W(8,w.IInstantiationService)],m),e.TOCTree=m}),define(ne[426],re([1,0,15,6,118,2,20,84,1893,8,57,38,17,265,108,13,191,891]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultKeybindingsEditorModel=e.defaultKeybindingsContents=e.DefaultRawSettingsEditorModel=e.DefaultSettingsEditorModel=e.DefaultSettings=e.WorkspaceConfigurationEditorModel=e.Settings2EditorModel=e.SettingsEditorModel=e.AbstractSettingsModel=e.isNullRange=e.nullRange=void 0,e.nullRange={startLineNumber:-1,startColumn:-1,endLineNumber:-1,endColumn:-1};function r(O){return O.startLineNumber===-1&&O.startColumn===-1&&O.endLineNumber===-1&&O.endColumn===-1}e.isNullRange=r;class p extends c.EditorModel{constructor(){super(...arguments);this._currentResultGroups=new Map}updateResultGroup(x,F){return F?this._currentResultGroups.set(x,F):this._currentResultGroups.delete(x),this.removeDuplicateResults(),this.update()}removeDuplicateResults(){const x=new Set;[...this._currentResultGroups.keys()].sort((F,L)=>this._currentResultGroups.get(F).order-this._currentResultGroups.get(L).order).forEach(F=>{const L=this._currentResultGroups.get(F);L.result.filterMatches=L.result.filterMatches.filter(M=>!x.has(M.setting.key)),L.result.filterMatches.forEach(M=>x.add(M.setting.key))})}compareTwoNullableNumbers(x,F){const L=x??Number.MAX_SAFE_INTEGER,M=F??Number.MAX_SAFE_INTEGER;return L<M?-1:L>M?1:0}filterSettings(x,F,L){const M=this.filterGroups,N=[];for(const B of M){const P=F(B);for(const V of B.sections)for(const z of V.settings){const U=L(z,B);(P||U)&&N.push({setting:z,matches:U&&U.matches,matchType:U?.matchType??i.SettingMatchType.None,score:U?.score??0})}}return N.sort((B,P)=>{if(B.matchType!==P.matchType)return P.matchType-B.matchType;if(B.setting.extensionInfo&&P.setting.extensionInfo&&B.setting.extensionInfo.id===P.setting.extensionInfo.id){if(B.setting.categoryLabel!==P.setting.categoryLabel&&(B.setting.categoryOrder!==void 0||P.setting.categoryOrder!==void 0)&&B.setting.categoryOrder!==P.setting.categoryOrder)return this.compareTwoNullableNumbers(B.setting.categoryOrder,P.setting.categoryOrder);if(B.setting.categoryLabel===P.setting.categoryLabel&&(B.setting.order!==void 0||P.setting.order!==void 0)&&B.setting.order!==P.setting.order)return this.compareTwoNullableNumbers(B.setting.order,P.setting.order)}return P.score-B.score}),N}getPreference(x){for(const F of this.settingsGroups)for(const L of F.sections)for(const M of L.settings)if(x===M.key)return M}collectMetadata(x){const F=Object.create(null);let L=!1;return x.forEach(M=>{M.result.metadata&&(F[M.id]=M.result.metadata,L=!0)}),L?F:null}get filterGroups(){return this.settingsGroups}}e.AbstractSettingsModel=p;class u extends p{constructor(x,F){super();this._configurationTarget=F,this._onDidChangeGroups=this._register(new f.Emitter),this.onDidChangeGroups=this._onDidChangeGroups.event,this.settingsModel=x.object.textEditorModel,this._register(this.onWillDispose(()=>x.dispose())),this._register(this.settingsModel.onDidChangeContent(()=>{this._settingsGroups=void 0,this._onDidChangeGroups.fire()}))}get uri(){return this.settingsModel.uri}get configurationTarget(){return this._configurationTarget}get settingsGroups(){return this._settingsGroups||this.parse(),this._settingsGroups}get content(){return this.settingsModel.getValue()}findValueMatches(x,F){return this.settingsModel.findMatches(x,F.valueRange,!1,!1,null,!1).map(L=>L.range)}isSettingsProperty(x,F){return F.length===0}parse(){this._settingsGroups=n(this.settingsModel,(x,F)=>this.isSettingsProperty(x,F))}update(){const x=[...this._currentResultGroups.values()];if(!x.length)return;const F=[],L=[];x.forEach(P=>{P.result.filterMatches.forEach(V=>{F.push(V.setting),V.matches&&L.push(...V.matches)})});let M;const N=this.settingsGroups[0];N&&(M={id:N.id,range:N.range,sections:[{settings:F}],title:N.title,titleRange:N.titleRange,order:N.order,extensionInfo:N.extensionInfo});const B=this.collectMetadata(x);return{allGroups:this.settingsGroups,filteredGroups:M?[M]:[],matches:L,metadata:B}}}e.SettingsEditorModel=u;let a=class extends p{constructor(x,F){super();this._defaultSettings=x,this._onDidChangeGroups=this._register(new f.Emitter),this.onDidChangeGroups=this._onDidChangeGroups.event,this.dirty=!1,this._register(F.onDidChangeConfiguration(L=>{L.source===6&&(this.dirty=!0,this._onDidChangeGroups.fire())})),this._register(o.Registry.as(v.Extensions.Configuration).onDidSchemaChange(L=>{this.dirty=!0,this._onDidChangeGroups.fire()}))}get filterGroups(){return this.settingsGroups.slice(1)}get settingsGroups(){const x=this._defaultSettings.getSettingsGroups(this.dirty);return this.dirty=!1,x}findValueMatches(x,F){return[]}update(){throw new Error("Not supported")}};a=Ee([W(1,w.IConfigurationService)],a),e.Settings2EditorModel=a;function n(O,x){const F=[];let L=null,M=null,N=[];const B=[];let P=-1;const V={startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0};function z(H,K,G){if(Array.isArray(N)?N.push(H):M&&(N[M]=H),B.length===P+1||B.length===P+2&&L!==null){const q=B.length===P+1?F[F.length-1]:L.overrides[L.overrides.length-1];if(q){const Z=O.getPositionAt(K),j=O.getPositionAt(K+G);q.value=H,q.valueRange={startLineNumber:Z.lineNumber,startColumn:Z.column,endLineNumber:j.lineNumber,endColumn:j.column},q.range=Object.assign(q.range,{endLineNumber:j.lineNumber,endColumn:j.column})}}}const U={onObjectBegin:(H,K)=>{if(x(M,B)){P=B.length;const q=O.getPositionAt(H);V.startLineNumber=q.lineNumber,V.startColumn=q.column}const G={};z(G,H,K),N=G,M=null,B.push(N)},onObjectProperty:(H,K,G)=>{if(M=H,B.length===P+1||B.length===P+2&&L!==null){const q=O.getPositionAt(K),Z={description:[],descriptionIsMarkdown:!1,key:H,keyRange:{startLineNumber:q.lineNumber,startColumn:q.column+1,endLineNumber:q.lineNumber,endColumn:q.column+G},range:{startLineNumber:q.lineNumber,startColumn:q.column,endLineNumber:0,endColumn:0},value:null,valueRange:e.nullRange,descriptionRanges:[],overrides:[],overrideOf:(0,S.withNullAsUndefined)(L)};B.length===P+1?(F.push(Z),v.OVERRIDE_PROPERTY_REGEX.test(H)&&(L=Z)):L.overrides.push(Z)}},onObjectEnd:(H,K)=>{if(N=B.pop(),P!==-1&&(B.length===P+1||B.length===P+2&&L!==null)){const G=B.length===P+1?F[F.length-1]:L.overrides[L.overrides.length-1];if(G){const q=O.getPositionAt(H+K);G.valueRange=Object.assign(G.valueRange,{endLineNumber:q.lineNumber,endColumn:q.column}),G.range=Object.assign(G.range,{endLineNumber:q.lineNumber,endColumn:q.column})}B.length===P+1&&(L=null)}if(B.length===P){const G=O.getPositionAt(H);V.endLineNumber=G.lineNumber,V.endColumn=G.column,P=-1}},onArrayBegin:(H,K)=>{const G=[];z(G,H,K),B.push(N),N=G,M=null},onArrayEnd:(H,K)=>{if(N=B.pop(),B.length===P+1||B.length===P+2&&L!==null){const G=B.length===P+1?F[F.length-1]:L.overrides[L.overrides.length-1];if(G){const q=O.getPositionAt(H+K);G.valueRange=Object.assign(G.valueRange,{endLineNumber:q.lineNumber,endColumn:q.column}),G.range=Object.assign(G.range,{endLineNumber:q.lineNumber,endColumn:q.column})}}},onLiteralValue:z,onError:H=>{const K=F[F.length-1];K&&(r(K.range)||r(K.keyRange)||r(K.valueRange))&&F.pop()}};return O.isDisposed()||(0,_.visit)(O.getValue(),U),F.length>0?[{sections:[{settings:F}],title:"",titleRange:e.nullRange,range:V}]:[]}class h extends u{constructor(){super(...arguments);this._configurationGroups=[]}get configurationGroups(){return this._configurationGroups}parse(){super.parse(),this._configurationGroups=n(this.settingsModel,(x,F)=>F.length===0)}isSettingsProperty(x,F){return x==="settings"&&F.length===1}}e.WorkspaceConfigurationEditorModel=h;class g extends A.Disposable{constructor(x,F){super();this._mostCommonlyUsedSettingsKeys=x,this.target=F,this._settingsByName=new Map,this._onDidChange=this._register(new f.Emitter),this.onDidChange=this._onDidChange.event}getContent(x=!1){return(!this._content||x)&&this.initialize(),this._content}getContentWithoutMostCommonlyUsed(x=!1){return(!this._contentWithoutMostCommonlyUsed||x)&&this.initialize(),this._contentWithoutMostCommonlyUsed}getSettingsGroups(x=!1){return(!this._allSettingsGroups||x)&&this.initialize(),this._allSettingsGroups}initialize(){this._allSettingsGroups=this.parse(),this._content=this.toContent(this._allSettingsGroups,0),this._contentWithoutMostCommonlyUsed=this.toContent(this._allSettingsGroups,1)}parse(){const x=this.getRegisteredGroups();return this.initAllSettingsMap(x),[this.getMostCommonlyUsedSettings(x),...x]}getRegisteredGroups(){const x=o.Registry.as(v.Extensions.Configuration).getConfigurations().slice(),F=this.removeEmptySettingsGroups(x.sort(this.compareConfigurationNodes).reduce((L,M,N,B)=>this.parseConfig(M,L,B),[]));return this.sortGroups(F)}sortGroups(x){return x.forEach(F=>{F.sections.forEach(L=>{L.settings.sort((M,N)=>M.key.localeCompare(N.key))})}),x}initAllSettingsMap(x){this._settingsByName=new Map;for(const F of x)for(const L of F.sections)for(const M of L.settings)this._settingsByName.set(M.key,M)}getMostCommonlyUsedSettings(x){const F=(0,t.coalesce)(this._mostCommonlyUsedSettingsKeys.map(L=>{const M=this._settingsByName.get(L);return M?{description:M.description,key:M.key,value:M.value,keyRange:e.nullRange,range:e.nullRange,valueRange:e.nullRange,overrides:[],scope:4,type:M.type,enum:M.enum,enumDescriptions:M.enumDescriptions,descriptionRanges:[]}:null}));return{id:"mostCommonlyUsed",range:e.nullRange,title:I.localize(0,null),titleRange:e.nullRange,sections:[{settings:F}]}}parseConfig(x,F,L,M,N){N=N||{};let B=x.title;if(!B){const P=L.find(V=>V.id===x.id&&V.title);P&&(B=P.title)}if(B&&(M?M.sections[M.sections.length-1].title=B:(M=F.find(P=>P.title===B&&P.extensionInfo?.id===x.extensionInfo?.id),M||(M={sections:[{settings:[]}],id:x.id||"",title:B||"",titleRange:e.nullRange,order:x.order,range:e.nullRange,extensionInfo:x.extensionInfo},F.push(M)))),x.properties){M||(M={sections:[{settings:[]}],id:x.id||"",title:x.id||"",titleRange:e.nullRange,order:x.order,range:e.nullRange,extensionInfo:x.extensionInfo},F.push(M));const P=[];for(const V of[...M.sections[M.sections.length-1].settings,...this.parseSettings(x)])N[V.key]||(P.push(V),N[V.key]=!0);P.length&&(M.sections[M.sections.length-1].settings=P)}return x.allOf&&x.allOf.forEach(P=>this.parseConfig(P,F,L,M,N)),F}removeEmptySettingsGroups(x){const F=[];for(const L of x)L.sections=L.sections.filter(M=>M.settings.length>0),L.sections.length&&F.push(L);return F}parseSettings(x){const F=[],L=x.properties,M=x.extensionInfo,N=x.extensionInfo?.id===x.id?x.title:x.id,B=x.order;for(const P in L){const V=L[P];if(this.matchesScope(V)){const z=V.default;let U=V.description||V.markdownDescription||"";typeof U!="string"&&(U="");const H=U.split(` `),K=v.OVERRIDE_PROPERTY_REGEX.test(P)?this.parseOverrideSettings(V.default):[];let G;V.type==="array"&&V.items&&!(0,S.isArray)(V.items)&&V.items.type&&(V.items.enum?G="enum":(0,S.isArray)(V.items.type)||(G=V.items.type));const q=V.type==="object"?V.properties:void 0,Z=V.type==="object"?V.patternProperties:void 0,j=V.type==="object"?V.additionalProperties:void 0;let X=V.enum,Y=V.enumDescriptions??V.markdownEnumDescriptions,$=!V.enumDescriptions;G==="enum"&&!(0,S.isArray)(V.items)&&(X=V.items.enum,Y=V.items.enumDescriptions??V.items.markdownEnumDescriptions,$=$&&!V.items.enumDescriptions);let J=!1;V.type==="object"&&!V.additionalProperties&&V.properties&&Object.keys(V.properties).length&&(J=Object.keys(V.properties).every(ie=>V.properties[ie].type==="boolean"));const ee=V;let te;ee&&ee.defaultValueSource&&(te=ee.defaultValueSource);let se=!1;v.OVERRIDE_PROPERTY_REGEX.test(P)&&(se=!0),F.push({key:P,value:z,description:H,descriptionIsMarkdown:!V.description,range:e.nullRange,keyRange:e.nullRange,valueRange:e.nullRange,descriptionRanges:[],overrides:K,scope:V.scope,type:V.type,arrayItemType:G,objectProperties:q,objectPatternProperties:Z,objectAdditionalProperties:j,enum:X,enumDescriptions:Y,enumDescriptionsAreMarkdown:$,uniqueItems:V.uniqueItems,tags:V.tags,disallowSyncIgnore:V.disallowSyncIgnore,restricted:V.restricted,extensionInfo:M,deprecationMessage:V.markdownDeprecationMessage||V.deprecationMessage,deprecationMessageIsMarkdown:!!V.markdownDeprecationMessage,validator:(0,l.createValidator)(V),enumItemLabels:V.enumItemLabels,allKeysAreBoolean:J,editPresentation:V.editPresentation,order:V.order,defaultValueSource:te,isLanguageTagSetting:se,categoryLabel:N,categoryOrder:B})}}return F}parseOverrideSettings(x){return Object.keys(x).map(F=>({key:F,value:x[F],description:[],descriptionIsMarkdown:!1,range:e.nullRange,keyRange:e.nullRange,valueRange:e.nullRange,descriptionRanges:[],overrides:[]}))}matchesScope(x){return x.scope?this.target===5?s.FOLDER_SCOPES.indexOf(x.scope)!==-1:this.target===4?s.WORKSPACE_SCOPES.indexOf(x.scope)!==-1:!0:!0}compareConfigurationNodes(x,F){if(typeof x.order!="number")return 1;if(typeof F.order!="number")return-1;if(x.order===F.order){const L=x.title||"",M=F.title||"";return L.localeCompare(M)}return x.order-F.order}toContent(x,F){const L=new m;for(let M=F;M<x.length;M++)L.pushGroup(x[M],M===F,M===x.length-1);return L.getContent()}}e.DefaultSettings=g;class d extends p{constructor(x,F,L){super();this._uri=x,this.defaultSettings=L,this._onDidChangeGroups=this._register(new f.Emitter),this.onDidChangeGroups=this._onDidChangeGroups.event,this._register(L.onDidChange(()=>this._onDidChangeGroups.fire())),this._model=F.object.textEditorModel,this._register(this.onWillDispose(()=>F.dispose()))}get uri(){return this._uri}get target(){return this.defaultSettings.target}get settingsGroups(){return this.defaultSettings.getSettingsGroups()}get filterGroups(){return this.settingsGroups.slice(1)}update(){if(this._model.isDisposed())return;const x=[...this._currentResultGroups.values()].sort((P,V)=>P.order-V.order),F=x.filter(P=>P.result.filterMatches.length),L=(0,t.tail)(this.settingsGroups).range.endLineNumber+2,{settingsGroups:M,matches:N}=this.writeResultGroups(F,L),B=this.collectMetadata(x);return x.length?{allGroups:this.settingsGroups,filteredGroups:M,matches:N,metadata:B}:void 0}writeResultGroups(x,F){const L=F-1,M=new m(L),N=[],B=[];x.length&&(M.pushLine(","),x.forEach(K=>{const G=this.getGroup(K);N.push(G),B.push(...this.writeSettingsGroupToBuilder(M,G,K.result.filterMatches))}));const P=M.getContent()+` `,V=this._model.getLineCount(),z=new D.Selection(F,1,F,1),U={text:P,forceMoveMarkers:!0,range:new k.Range(F,1,V,1)};this._model.pushEditOperations([z],[U],()=>[z]);const H=Math.min(F+60,this._model.getLineCount());return this._model.forceTokenization(H),{matches:B,settingsGroups:N}}writeSettingsGroupToBuilder(x,F,L){return L=L.map(N=>({setting:N.setting,score:N.score,matches:N.matches&&N.matches.map(B=>new k.Range(B.startLineNumber-N.setting.range.startLineNumber,B.startColumn,B.endLineNumber-N.setting.range.startLineNumber,B.endColumn))})),x.pushGroup(F),(0,t.flatten)(L.map(N=>N.matches||[]).map((N,B)=>{const P=F.sections[0].settings[B];return N.map(V=>new k.Range(V.startLineNumber+P.range.startLineNumber,V.startColumn,V.endLineNumber+P.range.startLineNumber,V.endColumn))}))}copySetting(x){return{description:x.description,scope:x.scope,type:x.type,enum:x.enum,enumDescriptions:x.enumDescriptions,key:x.key,value:x.value,range:x.range,overrides:[],overrideOf:x.overrideOf,tags:x.tags,deprecationMessage:x.deprecationMessage,keyRange:e.nullRange,valueRange:e.nullRange,descriptionIsMarkdown:void 0,descriptionRanges:[]}}findValueMatches(x,F){return[]}getPreference(x){for(const F of this.settingsGroups)for(const L of F.sections)for(const M of L.settings)if(M.key===x)return M}getGroup(x){return{id:x.id,range:e.nullRange,title:x.label,titleRange:e.nullRange,sections:[{settings:x.result.filterMatches.map(F=>this.copySetting(F.setting))}]}}}e.DefaultSettingsEditorModel=d;class m{constructor(x=0){this._rangeOffset=x,this._contentByLines=[]}get lineCountWithOffset(){return this._contentByLines.length+this._rangeOffset}get lastLine(){return this._contentByLines[this._contentByLines.length-1]||""}pushLine(...x){this._contentByLines.push(...x)}pushGroup(x,F,L){this._contentByLines.push(F?"[{":"{");const M=this._pushGroup(x," ");if(M){const N=M.range.endLineNumber-this._rangeOffset,B=this._contentByLines[N-2];this._contentByLines[N-2]=B.substring(0,B.length-1)}this._contentByLines.push(L?"}]":"},")}_pushGroup(x,F){let L=null;const M=this.lineCountWithOffset+1;for(const N of x.sections){if(N.title){const B=this.lineCountWithOffset+1;this.addDescription([N.title],F,this._contentByLines),N.titleRange={startLineNumber:B,startColumn:1,endLineNumber:this.lineCountWithOffset,endColumn:this.lastLine.length}}if(N.settings.length)for(const B of N.settings)this.pushSetting(B,F),L=B}return x.range={startLineNumber:M,startColumn:1,endLineNumber:this.lineCountWithOffset,endColumn:this.lastLine.length},L}getContent(){return this._contentByLines.join(` `)}pushSetting(x,F){const L=this.lineCountWithOffset+1;this.pushSettingDescription(x,F);let M=F;M+=JSON.stringify(x.key),x.keyRange={startLineNumber:this.lineCountWithOffset+1,startColumn:M.indexOf(x.key)+1,endLineNumber:this.lineCountWithOffset+1,endColumn:x.key.length},M+=": ";const B=this.lineCountWithOffset+1;this.pushValue(x,M,F),x.valueRange={startLineNumber:B,startColumn:M.length+1,endLineNumber:this.lineCountWithOffset,endColumn:this.lastLine.length+1},this._contentByLines[this._contentByLines.length-1]+=",",this._contentByLines.push(""),x.range={startLineNumber:L,startColumn:1,endLineNumber:this.lineCountWithOffset,endColumn:this.lastLine.length}}pushSettingDescription(x,F){const L=B=>B.replace(/`#(.*)#`/g,(P,V)=>`\`${V}\``);x.descriptionRanges=[];const M=F+"// ",N=x.deprecationMessage?.split(/\n/g)??[];for(let B of[...N,...x.description])B=L(B),this._contentByLines.push(M+B),x.descriptionRanges.push({startLineNumber:this.lineCountWithOffset,startColumn:this.lastLine.indexOf(B)+1,endLineNumber:this.lineCountWithOffset,endColumn:this.lastLine.length});x.enumDescriptions&&x.enumDescriptions.some(B=>!!B)&&x.enumDescriptions.forEach((B,P)=>{const V=y(String(x.enum[P])),z=B?`${V}: ${L(B)}`:V,U=z.split(/\n/g);U[0]=" - "+U[0],this._contentByLines.push(...U.map(H=>`${F}// ${H}`)),x.descriptionRanges.push({startLineNumber:this.lineCountWithOffset,startColumn:this.lastLine.indexOf(z)+1,endLineNumber:this.lineCountWithOffset,endColumn:this.lastLine.length})})}pushValue(x,F,L){const M=JSON.stringify(x.value,null,L);if(M&&typeof x.value=="object")if(x.overrides&&x.overrides.length){this._contentByLines.push(F+" {");for(const P of x.overrides)this.pushSetting(P,L+L),this._contentByLines.pop();const N=x.overrides[x.overrides.length-1],B=this._contentByLines[N.range.endLineNumber-2];this._contentByLines[N.range.endLineNumber-2]=B.substring(0,B.length-1),this._contentByLines.push(L+"}")}else{const N=M.split(` `);this._contentByLines.push(F+N[0]);for(let B=1;B<N.length;B++)this._contentByLines.push(L+N[B])}else this._contentByLines.push(F+M)}addDescription(x,F,L){for(const M of x)L.push(F+"// "+M)}}class b extends m{constructor(x=" "){super(0);this.indent=x}pushGroup(x){this._pushGroup(x,this.indent)}}class E extends A.Disposable{constructor(x){super();this.defaultSettings=x,this._content=null,this._register(x.onDidChange(()=>this._content=null))}get content(){if(this._content===null){const x=new b;x.pushLine("{");for(const F of this.defaultSettings.getRegisteredGroups())x.pushGroup(F);x.pushLine("}"),this._content=x.getContent()}return this._content}}e.DefaultRawSettingsEditorModel=E;function y(O){return O&&O.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}function T(O){return"// "+I.localize(1,null)+` `+O.getDefaultKeybindingsContent()}e.defaultKeybindingsContents=T;let R=class{constructor(x,F){this._uri=x,this.keybindingService=F}get uri(){return this._uri}get content(){return this._content||(this._content=T(this.keybindingService)),this._content}getPreference(){return null}dispose(){}};R=Ee([W(1,C.IKeybindingService)],R),e.DefaultKeybindingsEditorModel=R}),define(ne[2507],re([1,0,10,36,11,6,2,55,49,20,93,260,1678,8,57,37,5,125,17,12,34,114,298,321,619,50,108,426,56,62]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceSettingsRenderer=e.UserSettingsRenderer=void 0;let T=class extends k.Disposable{constructor(N,B,P,V,z){super();this.editor=N,this.preferencesModel=B,this.preferencesService=P,this.configurationService=V,this.instantiationService=z,this.modelChangeDelayer=new _.Delayer(200),this.settingHighlighter=this._register(z.createInstance(x,N)),this.editSettingActionRenderer=this._register(this.instantiationService.createInstance(O,this.editor,this.preferencesModel,this.settingHighlighter)),this._register(this.editSettingActionRenderer.onUpdateSetting(({key:U,value:H,source:K})=>this.updatePreference(U,H,K))),this._register(this.editor.getModel().onDidChangeContent(()=>this.modelChangeDelayer.trigger(()=>this.onModelChanged()))),this.unsupportedSettingsRenderer=this._register(z.createInstance(F,N,B))}render(){this.editSettingActionRenderer.render(this.preferencesModel.settingsGroups,this.associatedPreferencesModel),this.unsupportedSettingsRenderer.render()}updatePreference(N,B,P){const V=P.overrideOf?(0,i.overrideIdentifiersFromKey)(P.overrideOf.key):null,z=this.preferencesModel.uri;this.configurationService.updateValue(N,B,{overrideIdentifiers:V,resource:z},this.preferencesModel.configurationTarget).then(()=>this.onSettingUpdated(P))}onModelChanged(){!this.editor.hasModel()||this.render()}onSettingUpdated(N){this.editor.focus(),N=this.getSetting(N),N&&(this.editor.setSelection(N.valueRange),this.settingHighlighter.highlight(N,!0))}getSetting(N){const{key:B,overrideOf:P}=N;if(P){const V=this.getSetting(P);for(const z of V.overrides)if(z.key===B)return z;return}return this.preferencesModel.getPreference(B)}focusPreference(N){const B=this.getSetting(N);B?(this.settingHighlighter.highlight(B,!0),this.editor.setPosition({lineNumber:B.keyRange.startLineNumber,column:B.keyRange.startColumn})):this.settingHighlighter.clear(!0)}clearFocus(N){this.settingHighlighter.clear(!0)}editPreference(N){const B=this.getSetting(N);return!!(B&&this.editSettingActionRenderer.activateOnSetting(B))}};T=Ee([W(2,m.IPreferencesService),W(3,c.IConfigurationService),W(4,s.IInstantiationService)],T),e.UserSettingsRenderer=T;let R=class extends T{constructor(N,B,P,V,z){super(N,B,P,V,z);this.workspaceConfigurationRenderer=this._register(z.createInstance(L,N,B))}render(){super.render(),this.workspaceConfigurationRenderer.render()}};R=Ee([W(2,m.IPreferencesService),W(3,c.IConfigurationService),W(4,s.IInstantiationService)],R),e.WorkspaceSettingsRenderer=R;let O=class extends k.Disposable{constructor(N,B,P,V,z){super();this.editor=N,this.primarySettingsModel=B,this.settingHighlighter=P,this.instantiationService=V,this.contextMenuService=z,this.settingsGroups=[],this._onUpdateSetting=new A.Emitter,this.onUpdateSetting=this._onUpdateSetting.event,this.editPreferenceWidgetForCursorPosition=this._register(this.instantiationService.createInstance(g.EditPreferenceWidget,N)),this.editPreferenceWidgetForMouseMove=this._register(this.instantiationService.createInstance(g.EditPreferenceWidget,N)),this.toggleEditPreferencesForMouseMoveDelayer=new _.Delayer(75),this._register(this.editPreferenceWidgetForCursorPosition.onClick(U=>this.onEditSettingClicked(this.editPreferenceWidgetForCursorPosition,U))),this._register(this.editPreferenceWidgetForMouseMove.onClick(U=>this.onEditSettingClicked(this.editPreferenceWidgetForMouseMove,U))),this._register(this.editor.onDidChangeCursorPosition(U=>this.onPositionChanged(U))),this._register(this.editor.onMouseMove(U=>this.onMouseMoved(U))),this._register(this.editor.onDidChangeConfiguration(()=>this.onConfigurationChanged()))}render(N,B){this.editPreferenceWidgetForCursorPosition.hide(),this.editPreferenceWidgetForMouseMove.hide(),this.settingsGroups=N,this.associatedPreferencesModel=B;const P=this.getSettings(this.editor.getPosition().lineNumber);P.length&&this.showEditPreferencesWidget(this.editPreferenceWidgetForCursorPosition,P)}isDefaultSettings(){return this.primarySettingsModel instanceof b.DefaultSettingsEditorModel}onConfigurationChanged(){this.editor.getOption(50)||(this.editPreferenceWidgetForCursorPosition.hide(),this.editPreferenceWidgetForMouseMove.hide())}onPositionChanged(N){this.editPreferenceWidgetForMouseMove.hide();const B=this.getSettings(N.position.lineNumber);B.length?this.showEditPreferencesWidget(this.editPreferenceWidgetForCursorPosition,B):this.editPreferenceWidgetForCursorPosition.hide()}onMouseMoved(N){const B=this.getEditPreferenceWidgetUnderMouse(N);if(B){this.onMouseOver(B);return}this.settingHighlighter.clear(),this.toggleEditPreferencesForMouseMoveDelayer.trigger(()=>this.toggleEditPreferenceWidgetForMouseMove(N))}getEditPreferenceWidgetUnderMouse(N){if(N.target.type===2){const B=N.target.position.lineNumber;if(this.editPreferenceWidgetForMouseMove.getLine()===B&&this.editPreferenceWidgetForMouseMove.isVisible())return this.editPreferenceWidgetForMouseMove;if(this.editPreferenceWidgetForCursorPosition.getLine()===B&&this.editPreferenceWidgetForCursorPosition.isVisible())return this.editPreferenceWidgetForCursorPosition}}toggleEditPreferenceWidgetForMouseMove(N){const B=N.target.position?this.getSettings(N.target.position.lineNumber):null;B&&B.length?this.showEditPreferencesWidget(this.editPreferenceWidgetForMouseMove,B):this.editPreferenceWidgetForMouseMove.hide()}showEditPreferencesWidget(N,B){const P=B[0].valueRange.startLineNumber;this.editor.getOption(50)&&this.marginFreeFromOtherDecorations(P)&&(N.show(P,o.localize(0,null),B),(N===this.editPreferenceWidgetForCursorPosition?this.editPreferenceWidgetForMouseMove:this.editPreferenceWidgetForCursorPosition).hide())}marginFreeFromOtherDecorations(N){const B=this.editor.getLineDecorations(N);if(B){for(const{options:P}of B)if(P.glyphMarginClassName&&P.glyphMarginClassName.indexOf(p.ThemeIcon.asClassName(h.settingsEditIcon))===-1)return!1}return!0}getSettings(N){const B=this.getConfigurationsMap();return this.getSettingsAtLineNumber(N).filter(P=>{const V=B[P.key];if(V){if(this.isDefaultSettings())return P.key!=="launch";if((V.type==="boolean"||V.enum)&&(this.primarySettingsModel.configurationTarget!==5||V.scope===4||V.scope===5))return!0}return!1})}getSettingsAtLineNumber(N){let B=0;const P=[];for(const V of this.settingsGroups){if(V.range.startLineNumber>N)break;if(N>=V.range.startLineNumber&&N<=V.range.endLineNumber)for(const z of V.sections)for(const U of z.settings){if(U.range.startLineNumber>N)break;if(N>=U.range.startLineNumber&&N<=U.range.endLineNumber)if(!this.isDefaultSettings()&&U.overrides.length)for(const H of U.overrides)N>=H.range.startLineNumber&&N<=H.range.endLineNumber&&P.push({...H,index:B,groupId:V.id});else P.push({...U,index:B,groupId:V.id});B++}}return P}onMouseOver(N){this.settingHighlighter.highlight(N.preferences[0])}onEditSettingClicked(N,B){t.EventHelper.stop(B.event,!0);const P={x:B.event.posx,y:B.event.posy},V=this.getSettings(N.getLine()).length===1?this.getActions(N.preferences[0],this.getConfigurationsMap()[N.preferences[0].key]):N.preferences.map(z=>new f.SubmenuAction(`preferences.submenu.${z.key}`,z.key,this.getActions(z,this.getConfigurationsMap()[z.key])));this.contextMenuService.showContextMenu({getAnchor:()=>P,getActions:()=>V})}activateOnSetting(N){const B=N.keyRange.startLineNumber,P=this.getSettings(B);if(!P.length)return!1;this.editPreferenceWidgetForMouseMove.show(B,"",P);const V=this.getActions(this.editPreferenceWidgetForMouseMove.preferences[0],this.getConfigurationsMap()[this.editPreferenceWidgetForMouseMove.preferences[0].key]);return this.contextMenuService.showContextMenu({getAnchor:()=>this.toAbsoluteCoords(new I.Position(B,1)),getActions:()=>V}),!0}toAbsoluteCoords(N){const B=this.editor.getScrolledVisiblePosition(N),P=(0,t.getDomNodePagePosition)(this.editor.getDomNode()),V=P.left+B.left,z=P.top+B.top+B.height;return{x:V,y:z+10}}getConfigurationsMap(){return r.Registry.as(i.Extensions.Configuration).getConfigurationProperties()}getActions(N,B){return B.type==="boolean"?[{id:"truthyValue",label:"true",enabled:!0,run:()=>this.updateSetting(N.key,!0,N)},{id:"falsyValue",label:"false",enabled:!0,run:()=>this.updateSetting(N.key,!1,N)}]:B.enum?B.enum.map(P=>({id:P,label:JSON.stringify(P),enabled:!0,run:()=>this.updateSetting(N.key,P,N)})):this.getDefaultActions(N)}getDefaultActions(N){if(this.isDefaultSettings()){const B=this.associatedPreferencesModel.getPreference(N.key);return[{id:"setDefaultValue",label:B?o.localize(1,null):o.localize(2,null),enabled:!0,run:()=>this.updateSetting(N.key,N.value,N)}]}return[]}updateSetting(N,B,P){this._onUpdateSetting.fire({key:N,value:B,source:P})}};O=Ee([W(3,s.IInstantiationService),W(4,S.IContextMenuService)],O);let x=class extends k.Disposable{constructor(N,B){super();this.editor=N,this.fixedHighlighter=this._register(B.createInstance(n.RangeHighlightDecorations)),this.volatileHighlighter=this._register(B.createInstance(n.RangeHighlightDecorations))}highlight(N,B=!1){this.volatileHighlighter.removeHighlightRange(),this.fixedHighlighter.removeHighlightRange(),(B?this.fixedHighlighter:this.volatileHighlighter).highlightRange({range:N.valueRange,resource:this.editor.getModel().uri},this.editor),this.editor.revealLineInCenterIfOutsideViewport(N.valueRange.startLineNumber,0)}clear(N=!1){this.volatileHighlighter.removeHighlightRange(),N&&this.fixedHighlighter.removeHighlightRange()}};x=Ee([W(1,s.IInstantiationService)],x);let F=class extends k.Disposable{constructor(N,B,P,V,z,U,H,K){super();this.editor=N,this.settingsEditorModel=B,this.markerService=P,this.environmentService=V,this.configurationService=z,this.workspaceTrustManagementService=U,this.uriIdentityService=H,this.renderingDelayer=new _.Delayer(200),this.codeActions=new D.ResourceMap(G=>this.uriIdentityService.extUri.getComparisonKey(G)),this._register(this.editor.getModel().onDidChangeContent(()=>this.delayedRender())),this._register(A.Event.filter(this.configurationService.onDidChangeConfiguration,G=>G.source===6)(()=>this.delayedRender())),this._register(K.codeActionProvider.register({pattern:B.uri.path},this))}delayedRender(){this.renderingDelayer.trigger(()=>this.render())}render(){this.codeActions.clear();const N=this.generateMarkerData();N.length?this.markerService.changeOne("UnsupportedSettingsRenderer",this.settingsEditorModel.uri,N):this.markerService.remove("UnsupportedSettingsRenderer",[this.settingsEditorModel.uri])}async provideCodeActions(N,B,P,V){const z=[],U=this.codeActions.get(N.uri);if(U)for(const[H,K]of U)H.containsRange(B)&&z.push(...K);return{actions:z,dispose:()=>{}}}generateMarkerData(){const N=[],B=r.Registry.as(i.Extensions.Configuration).getConfigurationProperties();for(const P of this.settingsEditorModel.settingsGroups)for(const V of P.sections)for(const z of V.settings){const U=B[z.key];if(U)switch(this.settingsEditorModel.configurationTarget){case 2:this.handleLocalUserConfiguration(z,U,N);break;case 3:this.handleRemoteUserConfiguration(z,U,N);break;case 4:this.handleWorkspaceConfiguration(z,U,N);break;case 5:this.handleWorkspaceFolderConfiguration(z,U,N);break}else i.OVERRIDE_PROPERTY_REGEX.test(z.key)||N.push({severity:l.MarkerSeverity.Hint,tags:[1],...z.range,message:o.localize(3,null)})}return N}handleLocalUserConfiguration(N,B,P){this.environmentService.remoteAuthority&&(B.scope===2||B.scope===6)&&P.push({severity:l.MarkerSeverity.Hint,tags:[1],...N.range,message:o.localize(4,null)})}handleRemoteUserConfiguration(N,B,P){B.scope===1&&P.push(this.generateUnsupportedApplicationSettingMarker(N))}handleWorkspaceConfiguration(N,B,P){if(B.scope===1&&P.push(this.generateUnsupportedApplicationSettingMarker(N)),B.scope===2&&P.push(this.generateUnsupportedMachineSettingMarker(N)),!this.workspaceTrustManagementService.isWorkspaceTrusted()&&B.restricted){const V=this.generateUntrustedSettingMarker(N);P.push(V);const z=this.generateUntrustedSettingCodeActions([V]);this.addCodeActions(V,z)}}handleWorkspaceFolderConfiguration(N,B,P){if(B.scope===1&&P.push(this.generateUnsupportedApplicationSettingMarker(N)),B.scope===2&&P.push(this.generateUnsupportedMachineSettingMarker(N)),B.scope===3&&P.push({severity:l.MarkerSeverity.Hint,tags:[1],...N.range,message:o.localize(5,null)}),!this.workspaceTrustManagementService.isWorkspaceTrusted()&&B.restricted){const V=this.generateUntrustedSettingMarker(N);P.push(V);const z=this.generateUntrustedSettingCodeActions([V]);this.addCodeActions(V,z)}}generateUnsupportedApplicationSettingMarker(N){return{severity:l.MarkerSeverity.Hint,tags:[1],...N.range,message:o.localize(6,null)}}generateUnsupportedMachineSettingMarker(N){return{severity:l.MarkerSeverity.Hint,tags:[1],...N.range,message:o.localize(7,null)}}generateUntrustedSettingMarker(N){return{severity:l.MarkerSeverity.Warning,...N.range,message:o.localize(8,null)}}generateUntrustedSettingCodeActions(N){return[{title:o.localize(9,null),command:{id:"workbench.trust.manage",title:o.localize(10,null)},diagnostics:N,kind:C.CodeActionKind.QuickFix.value}]}addCodeActions(N,B){let P=this.codeActions.get(this.settingsEditorModel.uri);P||(P=[],this.codeActions.set(this.settingsEditorModel.uri,P)),P.push([w.Range.lift(N),B])}dispose(){this.markerService.remove("UnsupportedSettingsRenderer",[this.settingsEditorModel.uri]),this.codeActions.clear(),super.dispose()}};F=Ee([W(2,l.IMarkerService),W(3,d.IWorkbenchEnvironmentService),W(4,c.IConfigurationService),W(5,a.IWorkspaceTrustManagementService),W(6,E.IUriIdentityService),W(7,y.ILanguageFeaturesService)],F);let L=class Hr extends k.Disposable{constructor(N,B,P,V){super();this.editor=N,this.workspaceSettingsEditorModel=B,this.workspaceContextService=P,this.markerService=V,this.decorationIds=[],this.renderingDelayer=new _.Delayer(200),this._register(this.editor.getModel().onDidChangeContent(()=>this.renderingDelayer.trigger(()=>this.render())))}render(){const N=[];if(this.workspaceContextService.getWorkbenchState()===3&&this.workspaceSettingsEditorModel instanceof b.WorkspaceConfigurationEditorModel){const B=[];for(const P of this.workspaceSettingsEditorModel.configurationGroups)for(const V of P.sections)for(const z of V.settings)Hr.supportedKeys.includes(z.key)||N.push({severity:l.MarkerSeverity.Hint,tags:[1],...z.range,message:o.localize(11,null)});this.decorationIds=this.editor.deltaDecorations(this.decorationIds,B.map(P=>this.createDecoration(P)))}N.length?this.markerService.changeOne("WorkspaceConfigurationRenderer",this.workspaceSettingsEditorModel.uri,N):this.markerService.remove("WorkspaceConfigurationRenderer",[this.workspaceSettingsEditorModel.uri])}createDecoration(N){return{range:N,options:Hr._DIM_CONFIGURATION_}}dispose(){this.markerService.remove("WorkspaceConfigurationRenderer",[this.workspaceSettingsEditorModel.uri]),this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[]),super.dispose()}};L.supportedKeys=["folders","tasks","launch","extensions","settings","remoteAuthority","transient"],L._DIM_CONFIGURATION_=v.ModelDecorationOptions.register({description:"dim-configuration",stickiness:1,inlineClassName:"dim-configuration"}),L=Ee([W(2,u.IWorkspaceContextService),W(3,l.IMarkerService)],L)}),define(ne[2508],re([1,0,2,5,34,2507,108,426]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SettingsEditorContribution=void 0;let I=class extends t.Disposable{constructor(v,C,o,c){super();this.editor=v,this.instantiationService=C,this.preferencesService=o,this.workspaceContextService=c,this.disposables=this._register(new t.DisposableStore),this._createPreferencesRenderer(),this._register(this.editor.onDidChangeModel(i=>this._createPreferencesRenderer())),this._register(this.workspaceContextService.onDidChangeWorkbenchState(()=>this._createPreferencesRenderer()))}async _createPreferencesRenderer(){this.disposables.clear(),this.currentRenderer=void 0;const v=this.editor.getModel();if(v){const C=await this.preferencesService.createPreferencesEditorModel(v.uri);if(C instanceof D.SettingsEditorModel&&this.editor.getModel())switch(this.disposables.add(C),C.configurationTarget){case 4:this.currentRenderer=this.disposables.add(this.instantiationService.createInstance(A.WorkspaceSettingsRenderer,this.editor,C));break;default:this.currentRenderer=this.disposables.add(this.instantiationService.createInstance(A.UserSettingsRenderer,this.editor,C));break}this.currentRenderer?.render()}}};I.ID="editor.contrib.settings",I=Ee([W(1,f.IInstantiationService),W(2,k.IPreferencesService),W(3,_.IWorkspaceContextService)],I),e.SettingsEditorContribution=I}),define(ne[2509],re([1,0,108,15,29,17,57,102,5,2,322,187,79,115,31,30,22,426,8,46,35]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SettingMatches=e.LocalSearchProvider=e.PreferencesSearchService=void 0;let a=class extends w.Disposable{constructor(R,O,x,F,L){super();this.instantiationService=R,this.configurationService=O,this.productService=x,this.extensionManagementService=F,this.extensionEnablementService=L,this._installedExtensions=this.extensionManagementService.getInstalled(1).then(M=>M.filter(N=>this.extensionEnablementService.isEnabled(N)).filter(N=>N.manifest&&N.manifest.contributes&&N.manifest.contributes.configuration).filter(N=>!!N.identifier.uuid))}get remoteSearchAllowed(){return this.configurationService.getValue().workbench.settings.enableNaturalLanguageSearch?!!this._endpoint.urlBase:!1}get _endpoint(){const R=this.configurationService.getValue().workbench.settings;return R.naturalLanguageSearchEndpoint?{urlBase:R.naturalLanguageSearchEndpoint,key:R.naturalLanguageSearchKey}:{urlBase:this.productService.settingsSearchUrl}}getRemoteSearchProvider(R,O=!1){const x={filter:R,newExtensionsOnly:O,endpoint:this._endpoint};return this.remoteSearchAllowed?this.instantiationService.createInstance(h,x,this._installedExtensions):void 0}getLocalSearchProvider(R){return this.instantiationService.createInstance(n,R)}};a=Ee([W(0,I.IInstantiationService),W(1,r.IConfigurationService),W(2,p.IProductService),W(3,o.IExtensionManagementService),W(4,c.IWorkbenchExtensionEnablementService)],a),e.PreferencesSearchService=a;let n=class Yn{constructor(R,O){this._filter=R,this.configurationService=O,this._filter=this._filter.replace(/[":]/g," ").replace(/ /g," ").trim()}searchModel(R,O){if(!this._filter)return Promise.resolve(null);let x=Yn.START_SCORE;const F=M=>{const{matches:N,matchType:B}=new y(this._filter,M,!0,!0,(V,z)=>R.findValueMatches(V,z),this.configurationService),P=this._filter===M.key?Yn.EXACT_MATCH_SCORE:x--;return N&&N.length?{matches:N,matchType:B,score:P}:null},L=R.filterSettings(this._filter,this.getGroupFilter(this._filter),F);return L[0]&&L[0].score===Yn.EXACT_MATCH_SCORE?Promise.resolve({filterMatches:L.slice(0,1),exactMatch:!0}):Promise.resolve({filterMatches:L})}getGroupFilter(R){const O=_.createRegExp(R,!1,{global:!0});return x=>O.test(x.title)}};n.EXACT_MATCH_SCORE=1e4,n.START_SCORE=1e3,n=Ee([W(1,r.IConfigurationService)],n),e.LocalSearchProvider=n;let h=class Hi{constructor(R,O,x,F,L,M){this.options=R,this.installedExtensions=O,this.productService=x,this.requestService=F,this.logService=L,this.configurationService=M,this._remoteSearchP=this.options.filter?Promise.resolve(this.getSettingsForFilter(this.options.filter)):Promise.resolve(null)}searchModel(R,O){return this._remoteSearchP.then(x=>{if(!x)return null;if(O&&O.isCancellationRequested)throw(0,s.canceled)();const F=Object.keys(x.scoredResults),L=(0,f.top)(F,(B,P)=>x.scoredResults[P].score-x.scoredResults[B].score,1)[0],N=(L?x.scoredResults[L].score:0)/5;if(this.options.newExtensionsOnly)return this.installedExtensions.then(B=>{const P=Math.max(Hi.NEW_EXTENSIONS_MIN_SCORE,N);return{filterMatches:F.filter(U=>{const H=x.scoredResults[U],K=(H.extensionPublisher+"."+H.extensionName).toLowerCase();return!B.some(G=>G.identifier.id.toLowerCase()===K)}).filter(U=>x.scoredResults[U].score>=P).map(U=>{const H=x.scoredResults[U];return{setting:E(H),score:H.score,matches:[],matchType:t.SettingMatchType.None}}),metadata:x}});{const B=this.getRemoteSettingMatcher(x.scoredResults,N,R);return{filterMatches:R.filterSettings(this.options.filter,V=>null,B),metadata:x}}})}async getSettingsForFilter(R){const O=[];for(let x=0;x<Hi.MAX_REQUESTS;x++){const F=await this.prepareRequest(R,x);if(O.push(F),!F.hasMoreFilters)break}return Promise.all(O.map(x=>this.getSettingsFromBing(x))).then(x=>{const F=x[0];F.requestCount=1;for(const L of x.slice(1))F.requestCount++,F.scoredResults={...F.scoredResults,...L.scoredResults};return F})}getSettingsFromBing(R){this.logService.debug(`Searching settings via ${R.url}`),R.body&&this.logService.debug(`Body: ${R.body}`);const O=R.body?"post":"get",x={"User-Agent":"request","Content-Type":"application/json; charset=utf-8"};this.options.endpoint.key&&(x["api-key"]=this.options.endpoint.key);const F=Date.now();return this.requestService.request({type:O,url:R.url,data:R.body,headers:x,timeout:5e3},S.CancellationToken.None).then(L=>{if(typeof L.res.statusCode=="number"&&L.res.statusCode>=300)throw new Error(`${JSON.stringify(R)} returned status code: ${L.res.statusCode}`);return(0,C.asJson)(L)}).then(L=>{const M=Date.now(),N=M-F,B=(L.value||[]).map(V=>{const z=JSON.parse(V.setting||V.Setting),U=V.packageid,H=g(z,U),K=V.value,G=K&&JSON.parse(K),q=V.packagename;let Z,j;return q&&q.indexOf("##")>=0&&([j,Z]=q.split("##")),{key:z,id:H,defaultValue:G,score:V["@search.score"],description:JSON.parse(V.details),packageId:U,extensionName:Z,extensionPublisher:j}}),P=Object.create(null);return B.forEach(V=>{P[V.id]=V}),{requestUrl:R.url,requestBody:R.body,duration:N,timestamp:M,scoredResults:P,context:L["@odata.context"]}})}getRemoteSettingMatcher(R,O,x){return(F,L)=>{const M=R[g(F.key,L.id)]||R[g(F.key,"core")]||R[g(F.key)];if(M&&M.score>=O){const{matches:N,matchType:B}=new y(this.options.filter,F,!1,!0,(P,V)=>x.findValueMatches(P,V),this.configurationService);return{matches:N,matchType:B,score:M.score}}return null}}async prepareRequest(R,O=0){const x=R;R=b(R);const L=`(${R})^${10}`;R=R.replace(/\ +/g,"~ ")+"~";const M=encodeURIComponent(L+" || "+R);let N=`${this.options.endpoint.urlBase}`;this.options.endpoint.key&&(N+=`${d}&${m}`);const B=await this.installedExtensions,P=this.options.newExtensionsOnly?["diminish eq 'latest'"]:this.getVersionFilters(B,this.productService.settingsSearchBuildId),V=P.slice(O*Hi.MAX_REQUEST_FILTERS,(O+1)*Hi.MAX_REQUEST_FILTERS).join(" or "),z=P.length>(O+1)*Hi.MAX_REQUEST_FILTERS,U=JSON.stringify({query:M,filters:encodeURIComponent(V),rawQuery:encodeURIComponent(x)});return{url:N,body:U,hasMoreFilters:z}}getVersionFilters(R,O){const x=R.filter(F=>F.manifest.contributes&&F.manifest.contributes.configuration).map(F=>this.getExtensionFilter(F));return O&&x.push(`(packageid eq 'core' and startbuildno le '${O}' and endbuildno ge '${O}')`),x}getExtensionFilter(R){const O=R.identifier.uuid,x=R.manifest.version.split(".").map(F=>String(F).padStart(10),"0").join("");return`(packageid eq '${O}' and startbuildno le '${x}' and endbuildno ge '${x}')`}};h.MAX_REQUEST_FILTERS=42,h.MAX_REQUESTS=10,h.NEW_EXTENSIONS_MIN_SCORE=1,h=Ee([W(2,p.IProductService),W(3,C.IRequestService),W(4,i.ILogService),W(5,r.IConfigurationService)],h);function g(T,R){return R?R+"##"+T:T}const d="api-version=2016-09-01-Preview",m="querytype=full";function b(T){return T.replace(/\./g," ").replace(/[\\/+\-&|!"~*?:(){}\[\]\^]/g,"\\$&").replace(/ /g," ").trim()}function E(T){return{description:T.description.split(` `),descriptionIsMarkdown:!1,descriptionRanges:[],key:T.key,keyRange:l.nullRange,value:T.defaultValue,range:l.nullRange,valueRange:l.nullRange,overrides:[],extensionName:T.extensionName,extensionPublisher:T.extensionPublisher}}let y=class ra{constructor(R,O,x,F,L,M){this.requireFullQueryMatch=x,this.searchDescription=F,this.valuesMatcher=L,this.configurationService=M,this.descriptionMatchingWords=new Map,this.keyMatchingWords=new Map,this.valueMatchingWords=new Map,this.matchType=t.SettingMatchType.None,this.matches=(0,f.distinct)(this._findMatchesInSetting(R,O),N=>`${N.startLineNumber}_${N.startColumn}_${N.endLineNumber}_${N.endColumn}_`)}_findMatchesInSetting(R,O){const x=this._doFindMatchesInSetting(R,O);if(O.overrides&&O.overrides.length)for(const F of O.overrides){const L=new ra(R,F,this.requireFullQueryMatch,this.searchDescription,this.valuesMatcher,this.configurationService),M=R.split(" "),N=this.getRangesForWords(M,this.descriptionMatchingWords,[L.descriptionMatchingWords,L.keyMatchingWords,L.valueMatchingWords]),B=this.getRangesForWords(M,this.keyMatchingWords,[L.descriptionMatchingWords,L.keyMatchingWords,L.valueMatchingWords]),P=this.getRangesForWords(M,L.keyMatchingWords,[this.descriptionMatchingWords,this.keyMatchingWords,L.valueMatchingWords]),V=this.getRangesForWords(M,L.valueMatchingWords,[this.descriptionMatchingWords,this.keyMatchingWords,L.keyMatchingWords]);x.push(...N,...B,...P,...V),x.push(...L.matches),this.refreshMatchType(B.length+P.length),this.matchType|=L.matchType}return x}_doFindMatchesInSetting(R,O){const F=A.Registry.as(k.Extensions.Configuration).getConfigurationProperties()[O.key],L=R.split(" "),M=O.key.split(".").join(" "),N=this.configurationService.getValue(O.key);for(const U of L){if(this.searchDescription)for(let G=0;G<O.description.length;G++){const q=(0,D.matchesWords)(U,O.description[G],!0);q&&this.descriptionMatchingWords.set(U,q.map(Z=>this.toDescriptionRange(O,Z,G))),this.checkForWholeWordMatchType(U,O.description[G])}const H=(0,D.or)(D.matchesWords,D.matchesCamelCase)(U,M);H&&this.keyMatchingWords.set(U,H.map(G=>this.toKeyRange(O,G))),this.checkForWholeWordMatchType(U,M);const K=typeof N=="string"?(0,D.matchesContiguousSubString)(U,N):null;K?this.valueMatchingWords.set(U,K.map(G=>this.toValueRange(O,G))):F&&F.enum&&F.enum.some(G=>typeof G=="string"&&!!(0,D.matchesContiguousSubString)(U,G))&&this.valueMatchingWords.set(U,[]),typeof N=="string"&&this.checkForWholeWordMatchType(U,N)}const B=[];if(this.searchDescription){for(let U=0;U<O.description.length;U++){const H=(0,D.or)(D.matchesContiguousSubString)(R,O.description[U]||"")||[];B.push(...H.map(K=>this.toDescriptionRange(O,K,U)))}B.length===0&&B.push(...this.getRangesForWords(L,this.descriptionMatchingWords,[this.keyMatchingWords,this.valueMatchingWords]))}const P=(0,D.or)(D.matchesPrefix,D.matchesContiguousSubString)(R,O.key),V=P?P.map(U=>this.toKeyRange(O,U)):this.getRangesForWords(L,this.keyMatchingWords,[this.descriptionMatchingWords,this.valueMatchingWords]);let z=[];if(typeof N=="string"&&N){const U=(0,D.or)(D.matchesPrefix,D.matchesContiguousSubString)(R,N);z=U?U.map(H=>this.toValueRange(O,H)):this.getRangesForWords(L,this.valueMatchingWords,[this.keyMatchingWords,this.descriptionMatchingWords])}else z=this.valuesMatcher(R,O);return this.refreshMatchType(V.length),[...B,...V,...z]}checkForWholeWordMatchType(R,O){R=R.toLowerCase().replace(/[\s-\._]+$/,""),O=O.toLowerCase(),new RegExp(`\\b${R}\\b`).test(O)&&(this.matchType|=t.SettingMatchType.WholeWordMatch)}refreshMatchType(R){R&&(this.matchType|=t.SettingMatchType.KeyMatch)}getRangesForWords(R,O,x){const F=[];for(const L of R){const M=O.get(L);if(M)F.push(...M);else if(this.requireFullQueryMatch&&x.every(N=>!N.has(L)))return[]}return F}toKeyRange(R,O){return{startLineNumber:R.keyRange.startLineNumber,startColumn:R.keyRange.startColumn+O.start,endLineNumber:R.keyRange.startLineNumber,endColumn:R.keyRange.startColumn+O.end}}toDescriptionRange(R,O,x){return{startLineNumber:R.descriptionRanges[x].startLineNumber,startColumn:R.descriptionRanges[x].startColumn+O.start,endLineNumber:R.descriptionRanges[x].endLineNumber,endColumn:R.descriptionRanges[x].startColumn+O.end}}toValueRange(R,O){return{startLineNumber:R.valueRange.startLineNumber,startColumn:R.valueRange.startColumn+O.start+1,endLineNumber:R.valueRange.startLineNumber,endColumn:R.valueRange.startColumn+O.end+1}}};y=Ee([W(5,r.IConfigurationService)],y),e.SettingMatches=y,(0,u.registerSingleton)(v.IPreferencesSearchService,a,!0)}),define(ne[623],re([1,0,6,2,67,43,88]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositeProgressIndicator=e.CompositeProgressScope=e.EditorProgressIndicator=void 0;class D extends f.Disposable{constructor(c,i){super();this.progressBar=c,this.group=i,this.registerListeners()}registerListeners(){this._register(this.group.onDidModelChange(c=>{(c.kind===6||c.kind===4&&this.group.isEmpty)&&this.progressBar.stop().hide()}))}show(c,i){return this.group.isEmpty?_.emptyProgressRunner:c===!0?this.doShow(!0,i):this.doShow(c,i)}doShow(c,i){return typeof c=="boolean"?this.progressBar.infinite().show(i):this.progressBar.total(c).show(i),{total:S=>{this.progressBar.total(S)},worked:S=>{this.progressBar.hasTotal()?this.progressBar.worked(S):this.progressBar.infinite().show()},done:()=>{this.progressBar.stop().hide()}}}async showWhile(c,i){if(this.group.isEmpty)try{await c}catch{}return this.doShowWhile(c,i)}async doShowWhile(c,i){try{this.progressBar.infinite().show(i),await c}catch{}finally{this.progressBar.stop().hide()}}}e.EditorProgressIndicator=D;var I;(function(o){let c;(function(s){s[s.None=0]="None",s[s.Done=1]="Done",s[s.Infinite=2]="Infinite",s[s.While=3]="While",s[s.Work=4]="Work"})(c=o.Type||(o.Type={})),o.None={type:0},o.Done={type:1},o.Infinite={type:2};class i{constructor(l,r,p){this.whilePromise=l,this.whileStart=r,this.whileDelay=p,this.type=3}}o.While=i;class S{constructor(l,r){this.total=l,this.worked=r,this.type=4}}o.Work=S})(I||(I={}));class w extends f.Disposable{constructor(c,i){super();this.progressBar=c,this.scope=i,this.progressState=I.None,this.registerListeners()}registerListeners(){this._register(this.scope.onDidChangeActive(()=>{this.scope.isActive?this.onDidScopeActivate():this.onDidScopeDeactivate()}))}onDidScopeActivate(){if(this.progressState.type!==I.Done.type)if(this.progressState.type===3){let c;if(this.progressState.whileDelay>0){const i=this.progressState.whileDelay-(Date.now()-this.progressState.whileStart);i>0&&(c=i)}this.doShowWhile(c)}else this.progressState.type===2?this.progressBar.infinite().show():this.progressState.type===4&&(this.progressState.total&&this.progressBar.total(this.progressState.total).show(),this.progressState.worked&&this.progressBar.worked(this.progressState.worked).show())}onDidScopeDeactivate(){this.progressBar.stop().hide()}show(c,i){return typeof c=="boolean"?this.progressState=I.Infinite:this.progressState=new I.Work(c,void 0),this.scope.isActive&&(this.progressState.type===2?this.progressBar.infinite().show(i):this.progressState.type===4&&typeof this.progressState.total=="number"&&this.progressBar.total(this.progressState.total).show(i)),{total:S=>{this.progressState=new I.Work(S,this.progressState.type===4?this.progressState.worked:void 0),this.scope.isActive&&this.progressBar.total(S)},worked:S=>{!this.scope.isActive||this.progressBar.hasTotal()?(this.progressState=new I.Work(this.progressState.type===4?this.progressState.total:void 0,this.progressState.type===4&&typeof this.progressState.worked=="number"?this.progressState.worked+S:S),this.scope.isActive&&this.progressBar.worked(S)):(this.progressState=I.Infinite,this.progressBar.infinite().show())},done:()=>{this.progressState=I.Done,this.scope.isActive&&this.progressBar.stop().hide()}}}async showWhile(c,i){this.progressState.type===3&&(c=Promise.all([c,this.progressState.whilePromise])),this.progressState=new I.While(c,i||0,Date.now());try{this.doShowWhile(i),await c}catch{}finally{(this.progressState.type!==3||this.progressState.whilePromise===c)&&(this.progressState=I.None,this.scope.isActive&&this.progressBar.stop().hide())}}doShowWhile(c){this.scope.isActive&&this.progressBar.infinite().show(c)}}class v extends f.Disposable{constructor(c,i,S,s){super();this.paneCompositeService=c,this.viewsService=i,this.scopeId=S,this._isActive=s,this._onDidChangeActive=this._register(new t.Emitter),this.onDidChangeActive=this._onDidChangeActive.event,this.registerListeners()}get isActive(){return this._isActive}registerListeners(){this._register(this.viewsService.onDidChangeViewVisibility(c=>c.visible?this.onScopeOpened(c.id):this.onScopeClosed(c.id))),this._register(this.paneCompositeService.onDidPaneCompositeOpen(c=>this.onScopeOpened(c.composite.getId()))),this._register(this.paneCompositeService.onDidPaneCompositeClose(c=>this.onScopeClosed(c.composite.getId())))}onScopeOpened(c){c===this.scopeId&&(this._isActive||(this._isActive=!0,this._onDidChangeActive.fire()))}onScopeClosed(c){c===this.scopeId&&this._isActive&&(this._isActive=!1,this._onDidChangeActive.fire())}}e.CompositeProgressScope=v;let C=class extends w{constructor(c,i,S,s,l){super(c,new v(s,l,i,S))}};C=Ee([W(3,k.IPaneCompositePartService),W(4,A.IViewsService)],C),e.CompositeProgressIndicator=C}),define(ne[893],re([1,0,1388,338,2,6,22,163,78,280,353,623,155,67,68,10,13,73,1063]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositePart=void 0;class r extends v.Part{constructor(u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L){super(F,L,b,a,g);this.notificationService=u,this.storageService=a,this.telemetryService=n,this.contextMenuService=h,this.keybindingService=d,this.instantiationService=m,this.registry=E,this.activeCompositeSettingsKey=y,this.defaultCompositeId=T,this.nameForTelemetry=R,this.compositeCSSClass=O,this.titleForegroundColor=x,this.onDidCompositeOpen=this._register(new A.Emitter),this.onDidCompositeClose=this._register(new A.Emitter),this.mapCompositeToCompositeContainer=new Map,this.mapActionsBindingToComposite=new Map,this.instantiatedCompositeItems=new Map,this.telemetryActionsListener=this._register(new _.MutableDisposable),this.lastActiveCompositeId=a.get(y,1,this.defaultCompositeId)}openComposite(u,a){if(this.activeComposite?.getId()===u)return a&&this.activeComposite.focus(),this.activeComposite;if(!!this.element)return this.doOpenComposite(u,a)}doOpenComposite(u,a=!1){const n=f.defaultGenerator.nextId();this.currentCompositeOpenToken=n,this.activeComposite&&this.hideActiveComposite(),this.updateTitle(u);const h=this.createComposite(u,!0);if(!(this.currentCompositeOpenToken!==n||this.activeComposite&&this.activeComposite.getId()!==h.getId()))return this.activeComposite?.getId()===h.getId()?(a&&h.focus(),this.onDidCompositeOpen.fire({composite:h,focus:a}),h):(this.showComposite(h),a&&h.focus(),h&&this.onDidCompositeOpen.fire({composite:h,focus:a}),h)}createComposite(u,a){const n=this.instantiatedCompositeItems.get(u);if(n)return n.composite;const h=this.registry.getComposite(u);if(h){const g=this.instantiationService.createInstance(C.CompositeProgressIndicator,(0,s.assertIsDefined)(this.progressBar),h.id,!!a),d=this.instantiationService.createChild(new o.ServiceCollection([c.IEditorProgressService,g])),m=h.instantiate(d),b=new _.DisposableStore;return this.instantiatedCompositeItems.set(u,{composite:m,disposable:b,progress:g}),b.add(m.onTitleAreaUpdate(()=>this.onTitleAreaUpdate(m.getId()),this)),m}throw new Error(`Unable to find composite with id ${u}`)}showComposite(u){this.activeComposite=u;const a=this.activeComposite.getId();a!==this.defaultCompositeId?this.storageService.store(this.activeCompositeSettingsKey,a,1,0):this.storageService.remove(this.activeCompositeSettingsKey,1),this.lastActiveCompositeId=this.activeComposite.getId();let n=this.mapCompositeToCompositeContainer.get(u.getId());if(n||(n=(0,S.$)(".composite"),n.classList.add(...this.compositeCSSClass.split(" ")),n.id=u.getId(),u.create(n),u.updateStyles(),this.mapCompositeToCompositeContainer.set(u.getId(),n)),!this.activeComposite||u.getId()!==this.activeComposite.getId())return;const h=this.getContentArea();h&&h.appendChild(n),(0,S.show)(n);const g=(0,s.assertIsDefined)(this.toolBar);g.actionRunner=u.getActionRunner();const d=this.registry.getComposite(u.getId());d&&d.name!==u.getTitle()&&this.updateTitle(u.getId(),u.getTitle());let m=this.mapActionsBindingToComposite.get(u.getId());m||(m=this.collectCompositeActions(u),this.mapActionsBindingToComposite.set(u.getId(),m)),m(),this.telemetryActionsListener.value=g.actionRunner.onDidRun(b=>{b.error&&!(0,k.isCancellationError)(b.error)&&this.notificationService.error(b.error),this.telemetryService.publicLog2("workbenchActionExecuted",{id:b.action.id,from:this.nameForTelemetry})}),u.setVisible(!0),!(!this.activeComposite||u.getId()!==this.activeComposite.getId())&&this.contentAreaSize&&u.layout(this.contentAreaSize)}onTitleAreaUpdate(u){const a=this.instantiatedCompositeItems.get(u);if(a&&this.updateTitle(u,a.composite.getTitle()),this.activeComposite?.getId()===u){const n=this.collectCompositeActions(this.activeComposite);this.mapActionsBindingToComposite.set(this.activeComposite.getId(),n),n()}else this.mapActionsBindingToComposite.delete(u)}updateTitle(u,a){const n=this.registry.getComposite(u);if(!n||!this.titleLabel)return;a||(a=n.name);const h=this.keybindingService.lookupKeybinding(u);this.titleLabel.updateTitle(u,a,(0,s.withNullAsUndefined)(h?.getLabel())),(0,s.assertIsDefined)(this.toolBar).setAriaLabel((0,t.localize)(0,null,a))}collectCompositeActions(u){const a=u?.getActions().slice(0)||[],n=u?.getSecondaryActions().slice(0)||[],h=(0,s.assertIsDefined)(this.toolBar);return h.context=this.actionsContextProvider(),()=>h.setActions((0,I.prepareActions)(a),(0,I.prepareActions)(n))}getActiveComposite(){return this.activeComposite}getLastActiveCompositetId(){return this.lastActiveCompositeId}hideActiveComposite(){if(!this.activeComposite)return;const u=this.activeComposite;this.activeComposite=void 0;const a=this.mapCompositeToCompositeContainer.get(u.getId());return u.setVisible(!1),a&&(a.remove(),(0,S.hide)(a)),this.progressBar&&this.progressBar.stop().hide(),this.toolBar&&this.collectCompositeActions()(),this.onDidCompositeClose.fire(u),u}createTitleArea(u){const a=(0,S.append)(u,(0,S.$)(".composite"));a.classList.add("title"),this.titleLabel=this.createTitleLabel(a);const n=(0,S.append)(a,(0,S.$)(".title-actions"));return this.toolBar=this._register(new D.ToolBar(n,this.contextMenuService,{actionViewItemProvider:h=>this.actionViewItemProvider(h),orientation:0,getKeyBinding:h=>this.keybindingService.lookupKeybinding(h.id),anchorAlignmentProvider:()=>this.getTitleAreaDropDownAnchorAlignment(),toggleMenuTitle:(0,t.localize)(1,null)})),this.collectCompositeActions()(),a}createTitleLabel(u){const a=(0,S.append)(u,(0,S.$)(".title-label")),n=(0,S.append)(a,(0,S.$)("h2"));this.titleLabelElement=n;const h=this;return{updateTitle:(g,d,m)=>{(!this.activeComposite||this.activeComposite.getId()===g)&&(n.innerText=d,n.title=m?(0,t.localize)(2,null,d,m):d)},updateStyles:()=>{n.style.color=h.titleForegroundColor&&h.getColor(h.titleForegroundColor)||""}}}updateStyles(){super.updateStyles(),(0,s.assertIsDefined)(this.titleLabel).updateStyles()}actionViewItemProvider(u){return this.activeComposite?this.activeComposite.getActionViewItem(u):(0,l.createActionViewItem)(this.instantiationService,u)}actionsContextProvider(){return this.activeComposite?this.activeComposite.getActionsContext():null}createContentArea(u){const a=(0,S.append)(u,(0,S.$)(".content"));return this.progressBar=this._register(new w.ProgressBar(a)),this._register((0,i.attachProgressBarStyler)(this.progressBar,this.themeService)),this.progressBar.hide(),a}getProgressIndicator(u){const a=this.instantiatedCompositeItems.get(u);return a?a.progress:void 0}getTitleAreaDropDownAnchorAlignment(){return 1}layout(u,a,n,h){super.layout(u,a,n,h),this.contentAreaSize=S.Dimension.lift(super.layoutContents(u,a).contentSize),this.activeComposite&&this.activeComposite.layout(this.contentAreaSize)}removeComposite(u){if(this.activeComposite?.getId()===u)return!1;this.mapCompositeToCompositeContainer.delete(u),this.mapActionsBindingToComposite.delete(u);const a=this.instantiatedCompositeItems.get(u);return a&&(a.composite.dispose(),(0,_.dispose)(a.disposable),this.instantiatedCompositeItems.delete(u)),!0}dispose(){this.mapCompositeToCompositeContainer.clear(),this.mapActionsBindingToComposite.clear(),this.instantiatedCompositeItems.forEach(u=>{u.composite.dispose(),(0,_.dispose)(u.disposable)}),this.instantiatedCompositeItems.clear(),super.dispose()}}e.CompositePart=r}),define(ne[131],re([1,0,1425,6,32,68,82,10,2,78,17,163,38,37,27,12,715,8,43,7,13,5,16,73,303,41,162,237,280,623,139,9,63,33,565,677]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewAction=e.ViewPane=void 0;const L=(0,O.registerIcon)("view-pane-container-expanded",x.Codicon.chevronDown,t.localize(0,null)),M=(0,O.registerIcon)("view-pane-container-collapsed",x.Codicon.chevronRight,t.localize(1,null)),N=v.Registry.as(r.Extensions.ViewsRegistry);let B=class{constructor(H,K){this.id=H,this.contextKeyService=K,this._onDidChange=new f.Emitter,this.onDidChange=this._onDidChange.event,this.items=[],this.disposables=new I.DisposableStore,K.onDidChangeContext(this.onDidChangeContext,this,this.disposables),f.Event.filter(N.onDidChangeViewWelcomeContent,G=>G===this.id)(this.onDidChangeViewWelcomeContent,this,this.disposables),this.onDidChangeViewWelcomeContent()}get contents(){const H=this.items.filter(K=>K.visible);return H.length===0&&this.defaultItem?[this.defaultItem.descriptor]:H.map(K=>K.descriptor)}onDidChangeViewWelcomeContent(){const H=N.getViewWelcomeContent(this.id);this.items=[];for(const K of H)if(K.when==="default")this.defaultItem={descriptor:K,visible:!0};else{const G=K.when?this.contextKeyService.contextMatchesRules(K.when):!0;this.items.push({descriptor:K,visible:G})}this._onDidChange.fire()}onDidChangeContext(){let H=!1;for(const K of this.items){if(!K.descriptor.when||K.descriptor.when==="default")continue;const G=this.contextKeyService.contextMatchesRules(K.descriptor.when);K.visible!==G&&(K.visible=G,H=!0)}H&&this._onDidChange.fire()}dispose(){this.disposables.dispose()}};B=Ee([W(1,p.IContextKeyService)],B);let P=class extends F.CompositeMenuActions{constructor(H,K,G,q,Z,j,X,Y){const $=j.createScoped(H);$.createKey("view",K);const J=$.createKey("viewLocation",(0,r.ViewContainerLocationToString)(Y.getViewLocationById(K)));super(G,q,{shouldForwardArgs:!Z},$,X);this._register($),this._register(f.Event.filter(Y.onDidChangeLocation,ee=>ee.views.some(te=>te.id===K))(()=>J.set((0,r.ViewContainerLocationToString)(Y.getViewLocationById(K)))))}};P=Ee([W(5,p.IContextKeyService),W(6,n.IMenuService),W(7,r.IViewDescriptorService)],P);let V=class sa extends s.Pane{constructor(H,K,G,q,Z,j,X,Y,$,J){super({...H,orientation:j.getViewLocationById(H.id)===1?1:0});this.keybindingService=K,this.contextMenuService=G,this.configurationService=q,this.contextKeyService=Z,this.viewDescriptorService=j,this.instantiationService=X,this.openerService=Y,this.themeService=$,this.telemetryService=J,this._onDidFocus=this._register(new f.Emitter),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new f.Emitter),this.onDidBlur=this._onDidBlur.event,this._onDidChangeBodyVisibility=this._register(new f.Emitter),this.onDidChangeBodyVisibility=this._onDidChangeBodyVisibility.event,this._onDidChangeTitleArea=this._register(new f.Emitter),this.onDidChangeTitleArea=this._onDidChangeTitleArea.event,this._onDidChangeViewWelcomeState=this._register(new f.Emitter),this.onDidChangeViewWelcomeState=this._onDidChangeViewWelcomeState.event,this._isVisible=!1,this.showActionsAlways=!1,this.viewWelcomeDisposable=I.Disposable.None,this.id=H.id,this._title=H.title,this._titleDescription=H.titleDescription,this.showActionsAlways=!!H.showActionsAlways,this.menuActions=this._register(this.instantiationService.createInstance(P,this.element,this.id,H.titleMenuId||n.MenuId.ViewTitle,n.MenuId.ViewTitleContext,!!H.donotForwardArgs)),this._register(this.menuActions.onDidChange(()=>this.updateActions())),this.viewWelcomeController=new B(this.id,Z)}get title(){return this._title}get titleDescription(){return this._titleDescription}get headerVisible(){return super.headerVisible}set headerVisible(H){super.headerVisible=H,this.element.classList.toggle("merged-header",!H)}setVisible(H){this._isVisible!==H&&(this._isVisible=H,this.isExpanded()&&this._onDidChangeBodyVisibility.fire(H))}isVisible(){return this._isVisible}isBodyVisible(){return this._isVisible&&this.isExpanded()}setExpanded(H){const K=super.setExpanded(H);return K&&this._onDidChangeBodyVisibility.fire(H),this.twistiesContainer&&(this.twistiesContainer.classList.remove(...S.ThemeIcon.asClassNameArray(this.getTwistyIcon(!H))),this.twistiesContainer.classList.add(...S.ThemeIcon.asClassNameArray(this.getTwistyIcon(H)))),K}render(){super.render();const H=(0,D.trackFocus)(this.element);this._register(H),this._register(H.onDidFocus(()=>this._onDidFocus.fire())),this._register(H.onDidBlur(()=>this._onDidBlur.fire()))}renderHeader(H){this.headerContainer=H,this.twistiesContainer=(0,D.append)(H,(0,D.$)(S.ThemeIcon.asCSSSelector(this.getTwistyIcon(this.isExpanded())))),this.renderHeaderTitle(H,this.title);const K=(0,D.append)(H,(0,D.$)(".actions"));K.classList.toggle("show",this.showActionsAlways),this.toolbar=new C.ToolBar(K,this.contextMenuService,{orientation:0,actionViewItemProvider:q=>this.getActionViewItem(q),ariaLabel:t.localize(2,null,this.title),getKeyBinding:q=>this.keybindingService.lookupKeybinding(q.id),renderDropdownAsChildElement:!0}),this._register(this.toolbar),this.setActions(),this._register((0,D.addDisposableListener)(K,D.EventType.CLICK,q=>q.preventDefault())),this._register(this.viewDescriptorService.getViewContainerModel(this.viewDescriptorService.getViewContainerByViewId(this.id)).onDidChangeContainerInfo(({title:q})=>{this.updateTitle(this.title)}));const G=f.Event.filter(this.configurationService.onDidChangeConfiguration,q=>q.affectsConfiguration(sa.AlwaysShowActionsConfig));this._register(G(this.updateActionsVisibility,this)),this.updateActionsVisibility()}getTwistyIcon(H){return H?L:M}style(H){super.style(H);const K=this.getIcon();if(this.iconContainer){const G=H.headerForeground||this.themeService.getColorTheme().getColor(_.foreground);R.URI.isUri(K)?(this.iconContainer.style.backgroundColor=G?G.toString():"",this.iconContainer.style.color=""):(this.iconContainer.style.color=G?G.toString():"",this.iconContainer.style.backgroundColor="")}}getIcon(){return this.viewDescriptorService.getViewDescriptorById(this.id)?.containerIcon||r.defaultViewIcon}renderHeaderTitle(H,K){this.iconContainer=(0,D.append)(H,(0,D.$)(".icon",void 0));const G=this.getIcon();let q;if(R.URI.isUri(G)){q=`view-${this.id.replace(/[\.\:]/g,"-")}`;const j=`.pane-header .icon.${q}`;(0,D.createCSSRule)(j,` mask: ${(0,D.asCSSUrl)(G)} no-repeat 50% 50%; mask-size: 24px; -webkit-mask: ${(0,D.asCSSUrl)(G)} no-repeat 50% 50%; -webkit-mask-size: 16px; `)}else S.ThemeIcon.isThemeIcon(G)&&(q=S.ThemeIcon.asClassName(G));q&&this.iconContainer.classList.add(...q.split(" "));const Z=this.calculateTitle(K);this.titleContainer=(0,D.append)(H,(0,D.$)("h3.title",{title:Z},Z)),this._titleDescription&&this.setTitleDescription(this._titleDescription),this.iconContainer.title=Z,this.iconContainer.setAttribute("aria-label",Z)}updateTitle(H){const K=this.calculateTitle(H);this.titleContainer&&(this.titleContainer.textContent=K,this.titleContainer.setAttribute("title",K)),this.iconContainer&&(this.iconContainer.title=K,this.iconContainer.setAttribute("aria-label",K)),this._title=H,this._onDidChangeTitleArea.fire()}setTitleDescription(H){this.titleDescriptionContainer?(this.titleDescriptionContainer.textContent=H??"",this.titleDescriptionContainer.setAttribute("title",H??"")):H&&this.titleContainer&&(this.titleDescriptionContainer=(0,D.after)(this.titleContainer,(0,D.$)("span.description",{title:H},H)))}updateTitleDescription(H){this.setTitleDescription(H),this._titleDescription=H,this._onDidChangeTitleArea.fire()}calculateTitle(H){const K=this.viewDescriptorService.getViewContainerByViewId(this.id),G=this.viewDescriptorService.getViewContainerModel(K),q=this.viewDescriptorService.getViewDescriptorById(this.id);return!(this.viewDescriptorService.getDefaultContainerById(this.id)===K)&&q?.containerTitle&&G.title!==q.containerTitle?`${q.containerTitle}: ${H}`:H}renderBody(H){this.bodyContainer=H;const K=(0,D.append)(H,(0,D.$)(".welcome-view"));this.viewWelcomeContainer=(0,D.$)(".welcome-view-content",{tabIndex:0}),this.scrollableElement=this._register(new T.DomScrollableElement(this.viewWelcomeContainer,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3})),(0,D.append)(K,this.scrollableElement.getDomNode());const G=f.Event.any(this.viewWelcomeController.onDidChange,this.onDidChangeViewWelcomeState);this._register(G(this.updateViewWelcome,this)),this.updateViewWelcome()}layoutBody(H,K){this.viewWelcomeContainer.style.height=`${H}px`,this.viewWelcomeContainer.style.width=`${K}px`,this.viewWelcomeContainer.classList.toggle("wide",K>640),this.scrollableElement.scanDomNode()}onDidScrollRoot(){}getProgressIndicator(){return this.progressBar===void 0&&(this.progressBar=this._register(new E.ProgressBar(this.element)),this._register((0,A.attachProgressBarStyler)(this.progressBar,this.themeService)),this.progressBar.hide()),this.progressIndicator===void 0&&(this.progressIndicator=this.instantiationService.createInstance(y.CompositeProgressIndicator,(0,u.assertIsDefined)(this.progressBar),this.id,this.isBodyVisible())),this.progressIndicator}getProgressLocation(){return this.viewDescriptorService.getViewContainerByViewId(this.id).id}getBackgroundColor(){switch(this.viewDescriptorService.getViewLocationById(this.id)){case 1:return k.PANEL_BACKGROUND;case 0:case 2:return k.SIDE_BAR_BACKGROUND}return k.SIDE_BAR_BACKGROUND}focus(){this.shouldShowWelcome()?this.viewWelcomeContainer.focus():this.element&&(this.element.focus(),this._onDidFocus.fire())}setActions(){this.toolbar&&(this.toolbar.setActions((0,w.prepareActions)(this.menuActions.getPrimaryActions()),(0,w.prepareActions)(this.menuActions.getSecondaryActions())),this.toolbar.context=this.getActionsContext())}updateActionsVisibility(){if(!this.headerContainer)return;const H=this.configurationService.getValue("workbench.view.alwaysShowHeaderActions");this.headerContainer.classList.toggle("actions-always-visible",H)}updateActions(){this.setActions(),this._onDidChangeTitleArea.fire()}getActionViewItem(H,K){return(0,h.createActionViewItem)(this.instantiationService,H,{...K,menuAsChild:H instanceof n.SubmenuItemAction})}getActionsContext(){}getOptimalWidth(){return 0}saveState(){}updateViewWelcome(){if(this.viewWelcomeDisposable.dispose(),!this.shouldShowWelcome()){this.bodyContainer.classList.remove("welcome"),this.viewWelcomeContainer.innerText="",this.scrollableElement.scanDomNode();return}const H=this.viewWelcomeController.contents;if(H.length===0){this.bodyContainer.classList.remove("welcome"),this.viewWelcomeContainer.innerText="",this.scrollableElement.scanDomNode();return}const K=new I.DisposableStore;this.bodyContainer.classList.add("welcome"),this.viewWelcomeContainer.innerText="";for(const{content:G,precondition:q}of H){const Z=G.split(` `);for(let j of Z){if(j=j.trim(),!j)continue;const X=(0,g.parseLinkedText)(j);if(X.nodes.length===1&&typeof X.nodes[0]!="string"){const Y=X.nodes[0],$=(0,D.append)(this.viewWelcomeContainer,(0,D.$)(".button-container")),J=new m.Button($,{title:Y.title,supportIcons:!0});if(J.label=Y.label,J.onDidClick(ee=>{this.telemetryService.publicLog2("views.welcomeAction",{viewId:this.id,uri:Y.href}),this.openerService.open(Y.href,{allowCommands:!0})},null,K),K.add(J),K.add((0,A.attachButtonStyler)(J,this.themeService)),q){const ee=()=>J.enabled=this.contextKeyService.contextMatchesRules(q);ee();const te=new Set;q.keys().forEach(ie=>te.add(ie)),f.Event.filter(this.contextKeyService.onDidChangeContext,ie=>ie.affectsSome(te))(ee,null,K)}}else{const Y=(0,D.append)(this.viewWelcomeContainer,(0,D.$)("p"));for(const $ of X.nodes)if(typeof $=="string")(0,D.append)(Y,document.createTextNode($));else{const J=K.add(this.instantiationService.createInstance(b.Link,Y,$,{}));if(q&&$.href.startsWith("command:")){const ee=()=>J.enabled=this.contextKeyService.contextMatchesRules(q);ee();const te=new Set;q.keys().forEach(ie=>te.add(ie)),f.Event.filter(this.contextKeyService.onDidChangeContext,ie=>ie.affectsSome(te))(ee,null,K)}}}}}this.scrollableElement.scanDomNode(),this.viewWelcomeDisposable=K}shouldShowWelcome(){return!1}};V.AlwaysShowActionsConfig="workbench.view.alwaysShowHeaderActions",V=Ee([W(1,o.IKeybindingService),W(2,c.IContextMenuService),W(3,l.IConfigurationService),W(4,p.IContextKeyService),W(5,r.IViewDescriptorService),W(6,a.IInstantiationService),W(7,d.IOpenerService),W(8,S.IThemeService),W(9,i.ITelemetryService)],V),e.ViewPane=V;class z extends n.Action2{constructor(H){super(H);this.desc=H}run(H,...K){const G=H.get(r.IViewsService).getActiveViewWithId(this.desc.viewId);if(G)return this.runInView(H,G,...K)}}e.ViewAction=z}),define(ne[2510],re([1,0,10,280,11,2,55,1665,8,7,37,5,38,71,24,68,12,131,21,19,43,41,27,33,16,2193,370,44,30,6,390,1109]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlinePane=void 0;const R=new w.RawContextKey("outlineFollowsCursor",!1),O=new w.RawContextKey("outlineFiltersOnType",!1),x=new w.RawContextKey("outlineSortMode",0);class F{constructor(N,B){this._comparator=N,this.order=B}compare(N,B){return this.order===2?this._comparator.compareByType(N,B):this.order===1?this._comparator.compareByName(N,B):this._comparator.compareByPosition(N,B)}}let L=class extends l.ViewPane{constructor(N,B,P,V,z,U,H,K,G,q,Z,j,X,Y){super(N,G,Z,K,q,V,P,j,X,Y);this._outlineService=B,this._instantiationService=P,this._themeService=z,this._storageService=U,this._editorService=H,this._disposables=new A.DisposableStore,this._editorControlDisposables=new A.DisposableStore,this._editorPaneDisposables=new A.DisposableStore,this._outlineViewState=new d.OutlineViewState,this._editorListener=new A.MutableDisposable,this._treeStates=new k.LRUCache(10),this._outlineViewState.restore(this._storageService),this._disposables.add(this._outlineViewState),q.bufferChangeEvents(()=>{this._ctxFollowsCursor=R.bindTo(q),this._ctxFilterOnType=O.bindTo(q),this._ctxSortMode=x.bindTo(q)});const $=()=>{this._ctxFollowsCursor.set(this._outlineViewState.followCursor),this._ctxFilterOnType.set(this._outlineViewState.filterOnType),this._ctxSortMode.set(this._outlineViewState.sortBy)};$(),this._disposables.add(this._outlineViewState.onDidChange($))}dispose(){this._disposables.dispose(),this._editorPaneDisposables.dispose(),this._editorControlDisposables.dispose(),this._editorListener.dispose(),super.dispose()}focus(){this._tree?.domFocus()}renderBody(N){super.renderBody(N),this._domNode=N,N.classList.add("outline-pane");let B=t.$(".outline-progress");this._message=t.$(".outline-message"),this._progressBar=new f.ProgressBar(B),this._disposables.add((0,S.attachProgressBarStyler)(this._progressBar,this._themeService)),this._treeContainer=t.$(".outline-tree"),t.append(N,B,this._message,this._treeContainer),this._disposables.add(this.onDidChangeBodyVisibility(P=>{if(!P)this._editorListener.clear(),this._editorPaneDisposables.clear(),this._editorControlDisposables.clear();else if(!this._editorListener.value){const V=y.Event.any(this._editorService.onDidActiveEditorChange,this._outlineService.onDidChange);this._editorListener.value=V(()=>this._handleEditorChanged(this._editorService.activeEditorPane)),this._handleEditorChanged(this._editorService.activeEditorPane)}}))}layoutBody(N,B){super.layoutBody(N,B),this._tree?.layout(N,B),this._treeDimensions=new t.Dimension(B,N)}collapseAll(){this._tree?.collapseAll()}get outlineViewState(){return this._outlineViewState}_showMessage(N){this._domNode.classList.add("message"),this._progressBar.stop().hide(),this._message.innerText=N}_captureViewState(){if(this._tree){const N=this._tree.getInput();if(N&&N.uri)return this._treeStates.set(`${N.outlineKind}/${N.uri}`,this._tree.getViewState()),!0}return!1}_handleEditorChanged(N){this._editorPaneDisposables.clear(),N&&this._editorPaneDisposables.add(N.onDidChangeControl(()=>{this._handleEditorControlChanged(N)})),this._handleEditorControlChanged(N)}async _handleEditorControlChanged(N){const B=b.EditorResourceAccessor.getOriginalUri(N?.input),P=this._captureViewState();if(this._editorControlDisposables.clear(),!N||!this._outlineService.canCreateOutline(N)||!B)return this._showMessage((0,D.localize)(0,null));let V;P||(V=new _.TimeoutTimer(()=>{this._showMessage((0,D.localize)(1,null,(0,p.basename)(B)))},100)),this._progressBar.infinite().show(500);const z=new E.CancellationTokenSource;this._editorControlDisposables.add((0,A.toDisposable)(()=>z.dispose(!0)));const U=await this._outlineService.createOutline(N,1,z.token);if(V?.dispose(),!U)return;if(z.token.isCancellationRequested){U?.dispose();return}this._editorControlDisposables.add(U),this._progressBar.stop().hide();const H=new F(U.config.comparator,this._outlineViewState.sortBy),K=this._instantiationService.createInstance(c.WorkbenchDataTree,"OutlinePane",this._treeContainer,U.config.delegate,U.config.renderers,U.config.treeDataSource,{...U.config.options,sorter:H,expandOnDoubleClick:!1,expandOnlyOnTwistieClick:!0,multipleSelectionSupport:!1,hideTwistiesOfChildlessElements:!0,filterOnType:this._outlineViewState.filterOnType,overrideStyles:{listBackground:this.getBackgroundColor()}}),G=()=>{if(U.isEmpty)this._showMessage((0,D.localize)(2,null,(0,p.basename)(B))),this._captureViewState(),K.setInput(void 0);else if(K.getInput())this._domNode.classList.remove("message"),K.updateChildren();else{this._domNode.classList.remove("message");const j=this._treeStates.get(`${U.outlineKind}/${B}`);K.setInput(U,j&&T.AbstractTreeViewState.lift(j))}};G(),this._editorControlDisposables.add(U.onDidChange(G)),this._editorControlDisposables.add(this.viewDescriptorService.onDidChangeLocation(({views:j})=>{j.some(X=>X.id===this.id)&&K.updateOptions({overrideStyles:{listBackground:this.getBackgroundColor()}})})),this._editorControlDisposables.add(K.onDidUpdateOptions(j=>this._outlineViewState.filterOnType=Boolean(j.filterOnType))),this._editorControlDisposables.add(K.onDidOpen(j=>U.reveal(j.element,j.editorOptions,j.sideBySide)));const q=()=>{if(!this._outlineViewState.followCursor||!U.activeElement)return;let j=U.activeElement;for(;j;){if(K.getRelativeTop(j)===null&&K.reveal(j,.5),K.getRelativeTop(j)!==null){K.setFocus([j]),K.setSelection([j]);break}j=K.getParentElement(j)}};q(),this._editorControlDisposables.add(U.onDidChange(q)),this._editorControlDisposables.add(this._outlineViewState.onDidChange(j=>{this._outlineViewState.persist(this._storageService),j.filterOnType&&K.updateOptions({filterOnType:this._outlineViewState.filterOnType}),j.followCursor&&q(),j.sortBy&&(H.order=this._outlineViewState.sortBy,K.resort())}));let Z;this._editorControlDisposables.add(K.onDidChangeTypeFilterPattern(j=>{!K.options.filterOnType||(!Z&&j?(Z=K.getViewState(),K.expandAll()):!j&&Z&&(K.setInput(K.getInput(),Z),Z=void 0))})),K.layout(this._treeDimensions?.height,this._treeDimensions?.width),this._tree=K,this._editorControlDisposables.add((0,A.toDisposable)(()=>{K.dispose(),this._tree=void 0}))}};L.Id="outline",L=Ee([W(1,m.IOutlineService),W(2,C.IInstantiationService),W(3,u.IViewDescriptorService),W(4,s.IThemeService),W(5,i.IStorageService),W(6,r.IEditorService),W(7,I.IConfigurationService),W(8,o.IKeybindingService),W(9,w.IContextKeyService),W(10,v.IContextMenuService),W(11,a.IOpenerService),W(12,s.IThemeService),W(13,n.ITelemetryService)],L),e.OutlinePane=L,(0,g.registerAction2)(class extends l.ViewAction{constructor(){super({viewId:L.Id,id:"outline.collapse",title:(0,D.localize)(3,null),f1:!1,icon:h.Codicon.collapseAll,menu:{id:g.MenuId.ViewTitle,group:"navigation",when:w.ContextKeyExpr.equals("view",L.Id)}})}runInView(N,B){B.collapseAll()}}),(0,g.registerAction2)(class extends l.ViewAction{constructor(){super({viewId:L.Id,id:"outline.followCursor",title:(0,D.localize)(4,null),f1:!1,toggled:R,menu:{id:g.MenuId.ViewTitle,group:"config",order:1,when:w.ContextKeyExpr.equals("view",L.Id)}})}runInView(N,B){B.outlineViewState.followCursor=!B.outlineViewState.followCursor}}),(0,g.registerAction2)(class extends l.ViewAction{constructor(){super({viewId:L.Id,id:"outline.filterOnType",title:(0,D.localize)(5,null),f1:!1,toggled:O,menu:{id:g.MenuId.ViewTitle,group:"config",order:2,when:w.ContextKeyExpr.equals("view",L.Id)}})}runInView(N,B){B.outlineViewState.filterOnType=!B.outlineViewState.filterOnType}}),(0,g.registerAction2)(class extends l.ViewAction{constructor(){super({viewId:L.Id,id:"outline.sortByPosition",title:(0,D.localize)(6,null),f1:!1,toggled:x.isEqualTo(0),menu:{id:g.MenuId.ViewTitle,group:"sort",order:1,when:w.ContextKeyExpr.equals("view",L.Id)}})}runInView(N,B){B.outlineViewState.sortBy=0}}),(0,g.registerAction2)(class extends l.ViewAction{constructor(){super({viewId:L.Id,id:"outline.sortByName",title:(0,D.localize)(7,null),f1:!1,toggled:x.isEqualTo(1),menu:{id:g.MenuId.ViewTitle,group:"sort",order:2,when:w.ContextKeyExpr.equals("view",L.Id)}})}runInView(N,B){B.outlineViewState.sortBy=1}}),(0,g.registerAction2)(class extends l.ViewAction{constructor(){super({viewId:L.Id,id:"outline.sortByKind",title:(0,D.localize)(8,null),f1:!1,toggled:x.isEqualTo(2),menu:{id:g.MenuId.ViewTitle,group:"sort",order:3,when:w.ContextKeyExpr.equals("view",L.Id)}})}runInView(N,B){B.outlineViewState.sortBy=2}})}),define(ne[2511],re([1,0,1705,131,10,215,5,37,7,38,12,71,8,43,82,41,27,809,587,383]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SCMRepositoriesViewPane=void 0;class p{getHeight(){return 22}getTemplateId(){return l.RepositoryRenderer.TEMPLATE_ID}}let u=class extends f.ViewPane{constructor(n,h,g,d,m,b,E,y,T,R,O){super(n,g,d,y,E,b,m,T,R,O);this.scmViewService=h}renderBody(n){super.renderBody(n);const h=(0,_.append)(n,(0,_.$)(".scm-view.scm-repositories-view")),g=new p,d=this.instantiationService.createInstance(l.RepositoryRenderer,(0,r.getActionViewItemProvider)(this.instantiationService)),m={getId:b=>b.provider.id};this.list=this.instantiationService.createInstance(C.WorkbenchList,"SCM Main",h,g,[d],{identityProvider:m,horizontalScrolling:!1,overrideStyles:{listBackground:i.SIDE_BAR_BACKGROUND},accessibilityProvider:{getAriaLabel(b){return b.provider.label},getWidgetAriaLabel(){return(0,t.localize)(0,null)}}}),this._register(this.list),this._register(this.list.onDidChangeSelection(this.onListSelectionChange,this)),this._register(this.list.onContextMenu(this.onListContextMenu,this)),this._register(this.scmViewService.onDidChangeRepositories(this.onDidChangeRepositories,this)),this._register(this.scmViewService.onDidChangeVisibleRepositories(this.updateListSelection,this)),this.orientation===0&&this._register(this.configurationService.onDidChangeConfiguration(b=>{b.affectsConfiguration("scm.repositories.visible")&&this.updateBodySize()})),this.onDidChangeRepositories(),this.updateListSelection()}onDidChangeRepositories(){this.list.splice(0,this.list.length,this.scmViewService.repositories),this.updateBodySize()}focus(){this.list.domFocus()}layoutBody(n,h){super.layoutBody(n,h),this.list.layout(n,h)}updateBodySize(){if(this.orientation===1)return;const n=this.configurationService.getValue("scm.repositories.visible"),h=this.list.length===0,g=Math.min(this.list.length,n)*22;this.minimumBodySize=n===0?22:g,this.maximumBodySize=n===0||h?Number.POSITIVE_INFINITY:g}onListContextMenu(n){if(!n.element)return;const h=n.element.provider,d=this.scmViewService.menus.getRepositoryMenus(h).repositoryMenu,[m,b]=(0,r.collectContextMenuActions)(d);this.contextMenuService.showContextMenu({getAnchor:()=>n.anchor,getActions:()=>m,getActionsContext:()=>h,onHide(){b.dispose()}})}onListSelectionChange(n){if(n.browserEvent&&n.elements.length>0){const h=this.list.scrollTop;this.scmViewService.visibleRepositories=n.elements,this.list.scrollTop=h}}updateListSelection(){const n=new Set;for(const g of this.scmViewService.visibleRepositories)n.add(g);const h=[];for(let g=0;g<this.list.length;g++)n.has(this.list.element(g))&&h.push(g);this.list.setSelection(h),h.length>0&&(this.list.setAnchor(h[0]),this.list.setFocus([h[0]]))}};u=Ee([W(1,A.ISCMViewService),W(2,w.IKeybindingService),W(3,D.IContextMenuService),W(4,k.IInstantiationService),W(5,c.IViewDescriptorService),W(6,I.IContextKeyService),W(7,o.IConfigurationService),W(8,S.IOpenerService),W(9,v.IThemeService),W(10,s.ITelemetryService)],u),e.SCMRepositoriesViewPane=u}),define(ne[2512],re([1,0,15,33,92,97,13,49,20,58,1784,16,28,7,26,67,56,131,70,74,119,495,293,596,829,270,497,330,251,216,250,21,88]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.allTestActions=e.CancelTestRefreshAction=e.RefreshTestsAction=e.ToggleInlineTestOutput=e.OpenOutputPeek=e.SearchForTestExtension=e.DebugLastRun=e.ReRunLastRun=e.DebugFailedTests=e.ReRunFailedTests=e.discoverAndRunTests=e.DebugCurrentFile=e.RunCurrentFile=e.DebugAtCursor=e.RunAtCursor=e.AutoRunOffAction=e.AutoRunOnAction=e.GoToTest=e.ClearTestResultsAction=e.CollapseAllAction=e.ShowMostRecentOutputAction=e.TestingSortByDurationAction=e.TestingSortByLocationAction=e.TestingSortByStatusAction=e.TestingViewAsTreeAction=e.TestingViewAsListAction=e.CancelTestRunAction=e.DebugAllAction=e.RunAllAction=e.DebugSelectedAction=e.RunSelectedAction=e.ConfigureTestProfilesAction=e.SelectDefaultTestProfiles=e.RunAction=e.RunUsingProfileAction=e.DebugAction=e.UnhideTestAction=e.HideTestAction=void 0;const x=r.CATEGORIES.Test;var F;(function(Me){Me[Me.Refresh=10]="Refresh",Me[Me.Run=11]="Run",Me[Me.Debug=12]="Debug",Me[Me.Coverage=13]="Coverage",Me[Me.RunUsing=14]="RunUsing",Me[Me.AutoRun=15]="AutoRun",Me[Me.Collapse=16]="Collapse",Me[Me.ClearResults=17]="ClearResults",Me[Me.DisplayMode=18]="DisplayMode",Me[Me.Sort=19]="Sort",Me[Me.GoToTest=20]="GoToTest",Me[Me.HideTest=21]="HideTest"})(F||(F={}));const L=c.ContextKeyGreaterExpr.create(d.TestingContextKeys.providerCount.key,0);class M extends C.Action2{constructor(){super({id:"testing.hideTest",title:(0,v.localize)(0,null),menu:{id:C.MenuId.TestItem,group:"builtin@2",when:d.TestingContextKeys.testItemIsHidden.isEqualTo(!1)}})}run(We,...Ve){const Ue=We.get(T.ITestService);for(const et of Ve)et instanceof a.TestItemTreeElement&&Ue.excluded.toggle(et.test,!0);return Promise.resolve()}}e.HideTestAction=M;class N extends C.Action2{constructor(){super({id:"testing.unhideTest",title:(0,v.localize)(1,null),menu:{id:C.MenuId.TestItem,order:21,when:d.TestingContextKeys.testItemIsHidden.isEqualTo(!0)}})}run(We,...Ve){const Ue=We.get(T.ITestService);for(const et of Ve)et instanceof a.TestItemTreeElement&&Ue.excluded.toggle(et.test,!1);return Promise.resolve()}}e.UnhideTestAction=N;const B=(Me,We)=>[{id:C.MenuId.TestItem,group:"inline",order:Me,when:We},{id:C.MenuId.TestItem,group:"builtin@1",order:Me,when:We}];class P extends C.Action2{constructor(){super({id:"testing.debug",title:(0,v.localize)(2,null),icon:n.testingDebugIcon,menu:B(12,d.TestingContextKeys.hasDebuggableTests.isEqualTo(!0))})}run(We,...Ve){return We.get(T.ITestService).runTests({tests:[..._.Iterable.concatNested(Ve.map(Ue=>Ue.tests))],group:4})}}e.DebugAction=P;class V extends C.Action2{constructor(){super({id:"testing.runUsing",title:(0,v.localize)(3,null),icon:n.testingDebugIcon,menu:{id:C.MenuId.TestItem,order:14,group:"builtin@2",when:d.TestingContextKeys.hasNonDefaultProfile.isEqualTo(!0)}})}async run(We,...Ve){const Ue=Ve.filter(Qe=>Qe instanceof a.TestItemTreeElement);if(Ue.length===0)return;const et=We.get(o.ICommandService),Ze=We.get(T.ITestService),Fe=await et.executeCommand("vscode.pickTestProfile",{onlyForTest:Ue[0].test});!Fe||Ze.runResolvedTests({targets:[{profileGroup:Fe.group,profileId:Fe.profileId,controllerId:Fe.controllerId,testIds:Ue.filter(Qe=>(0,E.canUseProfileWithTest)(Fe,Qe.test)).map(Qe=>Qe.test.item.extId)}]})}}e.RunUsingProfileAction=V;class z extends C.Action2{constructor(){super({id:"testing.run",title:(0,v.localize)(4,null),icon:n.testingRunIcon,menu:B(11,d.TestingContextKeys.hasRunnableTests.isEqualTo(!0))})}run(We,...Ve){return We.get(T.ITestService).runTests({tests:[..._.Iterable.concatNested(Ve.map(Ue=>Ue.tests))],group:2})}}e.RunAction=z;class U extends C.Action2{constructor(){super({id:"testing.selectDefaultTestProfiles",title:(0,v.localize)(5,null),icon:n.testingUpdateProfiles,category:x})}async run(We,Ve){const Ue=We.get(o.ICommandService),et=We.get(E.ITestProfileService),Ze=await Ue.executeCommand("vscode.pickMultipleTestProfiles",{showConfigureButtons:!1,selected:et.getGroupDefaultProfiles(Ve),onlyGroup:Ve});Ze?.length&&et.setGroupDefaultProfiles(Ve,Ze)}}e.SelectDefaultTestProfiles=U;class H extends C.Action2{constructor(){super({id:"testing.configureProfile",title:(0,v.localize)(6,null),icon:n.testingUpdateProfiles,f1:!0,category:x,menu:{id:C.MenuId.CommandPalette,when:d.TestingContextKeys.hasConfigurableProfile.isEqualTo(!0)}})}async run(We,Ve){const Ue=We.get(o.ICommandService),et=We.get(E.ITestProfileService),Ze=await Ue.executeCommand("vscode.pickTestProfile",{placeholder:(0,v.localize)(7,null),showConfigureButtons:!1,onlyConfigurable:!0,onlyGroup:Ve});Ze&&et.configure(Ze.controllerId,Ze.profileId)}}e.ConfigureTestProfilesAction=H;class K extends l.ViewAction{constructor(We,Ve){super({...We,menu:[{id:C.MenuId.ViewTitle,order:Ve===2?11:Ve===4?12:13,group:"navigation",when:c.ContextKeyExpr.and(c.ContextKeyExpr.equals("view","workbench.view.testing"),d.TestingContextKeys.isRunning.isEqualTo(!1),d.TestingContextKeys.capabilityToContextKey[Ve].isEqualTo(!0))}],category:x,viewId:"workbench.view.testing"});this.group=Ve}runInView(We,Ve){const{include:Ue,exclude:et}=Ve.getSelectedOrVisibleItems();return We.get(T.ITestService).runTests({tests:Ue,exclude:et,group:this.group})}}class G extends K{constructor(){super({id:"testing.runSelected",title:(0,v.localize)(8,null),icon:n.testingRunAllIcon},2)}}e.RunSelectedAction=G;class q extends K{constructor(){super({id:"testing.debugSelected",title:(0,v.localize)(9,null),icon:n.testingDebugAllIcon},4)}}e.DebugSelectedAction=q;const Z=(Me,We)=>Me.withProgress({location:10,title:(0,v.localize)(10,null)},()=>We);class j extends C.Action2{constructor(We,Ve,Ue){super({...We,category:x,menu:[{id:C.MenuId.CommandPalette,when:d.TestingContextKeys.capabilityToContextKey[Ve].isEqualTo(!0)}]});this.group=Ve,this.noTestsFoundError=Ue}async run(We){const Ve=We.get(T.ITestService),Ue=We.get(i.INotificationService),et=[...Ve.collection.rootItems];if(!et.length){Ue.info(this.noTestsFoundError);return}await Ve.runTests({tests:et,group:this.group})}}class X extends j{constructor(){super({id:"testing.runAll",title:(0,v.localize)(11,null),icon:n.testingRunAllIcon,keybinding:{weight:200,primary:(0,A.KeyChord)(2048|80,31)}},2,(0,v.localize)(12,null))}}e.RunAllAction=X;class Y extends j{constructor(){super({id:"testing.debugAll",title:(0,v.localize)(13,null),icon:n.testingDebugIcon,keybinding:{weight:200,primary:(0,A.KeyChord)(2048|80,2048|31)}},4,(0,v.localize)(14,null))}}e.DebugAllAction=Y;class $ extends C.Action2{constructor(){super({id:"testing.cancelRun",title:(0,v.localize)(15,null),icon:n.testingCancelIcon,keybinding:{weight:200,primary:(0,A.KeyChord)(2048|80,2048|54)},menu:{id:C.MenuId.ViewTitle,order:11,group:"navigation",when:c.ContextKeyExpr.and(c.ContextKeyExpr.equals("view","workbench.view.testing"),c.ContextKeyExpr.equals(d.TestingContextKeys.isRunning.serialize(),!0))}})}async run(We){const Ve=We.get(y.ITestResultService),Ue=We.get(T.ITestService);for(const et of Ve.results)et.completedAt||Ue.cancelTestRun(et.id)}}e.CancelTestRunAction=$;class J extends l.ViewAction{constructor(){super({id:"testing.viewAsList",viewId:"workbench.view.testing",title:(0,v.localize)(16,null),toggled:d.TestingContextKeys.viewMode.isEqualTo("list"),menu:{id:C.MenuId.ViewTitle,order:18,group:"viewAs",when:c.ContextKeyExpr.equals("view","workbench.view.testing")}})}runInView(We,Ve){Ve.viewModel.viewMode="list"}}e.TestingViewAsListAction=J;class ee extends l.ViewAction{constructor(){super({id:"testing.viewAsTree",viewId:"workbench.view.testing",title:(0,v.localize)(17,null),toggled:d.TestingContextKeys.viewMode.isEqualTo("true"),menu:{id:C.MenuId.ViewTitle,order:18,group:"viewAs",when:c.ContextKeyExpr.equals("view","workbench.view.testing")}})}runInView(We,Ve){Ve.viewModel.viewMode="true"}}e.TestingViewAsTreeAction=ee;class te extends l.ViewAction{constructor(){super({id:"testing.sortByStatus",viewId:"workbench.view.testing",title:(0,v.localize)(18,null),toggled:d.TestingContextKeys.viewSorting.isEqualTo("status"),menu:{id:C.MenuId.ViewTitle,order:19,group:"sortBy",when:c.ContextKeyExpr.equals("view","workbench.view.testing")}})}runInView(We,Ve){Ve.viewModel.viewSorting="status"}}e.TestingSortByStatusAction=te;class se extends l.ViewAction{constructor(){super({id:"testing.sortByLocation",viewId:"workbench.view.testing",title:(0,v.localize)(19,null),toggled:d.TestingContextKeys.viewSorting.isEqualTo("location"),menu:{id:C.MenuId.ViewTitle,order:19,group:"sortBy",when:c.ContextKeyExpr.equals("view","workbench.view.testing")}})}runInView(We,Ve){Ve.viewModel.viewSorting="location"}}e.TestingSortByLocationAction=se;class ie extends l.ViewAction{constructor(){super({id:"testing.sortByDuration",viewId:"workbench.view.testing",title:(0,v.localize)(20,null),toggled:d.TestingContextKeys.viewSorting.isEqualTo("duration"),menu:{id:C.MenuId.ViewTitle,order:19,group:"sortBy",when:c.ContextKeyExpr.equals("view","workbench.view.testing")}})}runInView(We,Ve){Ve.viewModel.viewSorting="duration"}}e.TestingSortByDurationAction=ie;class ce extends C.Action2{constructor(){super({id:"testing.showMostRecentOutput",title:(0,v.localize)(21,null),category:x,icon:f.Codicon.terminal,keybinding:{weight:200,primary:(0,A.KeyChord)(2048|80,2048|45)},precondition:d.TestingContextKeys.hasAnyResults.isEqualTo(!0),menu:[{id:C.MenuId.ViewTitle,order:16,group:"navigation",when:c.ContextKeyExpr.equals("view","workbench.view.testing")},{id:C.MenuId.CommandPalette,when:d.TestingContextKeys.hasAnyResults.isEqualTo(!0)}]})}run(We){const Ve=We.get(y.ITestResultService).results[0];We.get(h.ITestingOutputTerminalService).open(Ve)}}e.ShowMostRecentOutputAction=ce;class le extends l.ViewAction{constructor(){super({id:"testing.collapseAll",viewId:"workbench.view.testing",title:(0,v.localize)(22,null),icon:f.Codicon.collapseAll,menu:{id:C.MenuId.ViewTitle,order:16,group:"displayAction",when:c.ContextKeyExpr.equals("view","workbench.view.testing")}})}runInView(We,Ve){Ve.viewModel.collapseAll()}}e.CollapseAllAction=le;class ae extends C.Action2{constructor(){super({id:"testing.clearTestResults",title:(0,v.localize)(23,null),category:x,icon:f.Codicon.trash,menu:[{id:C.MenuId.TestPeekTitle},{id:C.MenuId.CommandPalette,when:d.TestingContextKeys.hasAnyResults.isEqualTo(!0)},{id:C.MenuId.ViewTitle,order:17,group:"displayAction",when:c.ContextKeyExpr.equals("view","workbench.view.testing")}]})}run(We){We.get(y.ITestResultService).clear()}}e.ClearTestResultsAction=ae;class ue extends C.Action2{constructor(){super({id:"testing.editFocusedTest",title:(0,v.localize)(24,null),icon:f.Codicon.goToFile,menu:B(20,d.TestingContextKeys.testItemHasUri.isEqualTo(!0)),keybinding:{weight:100-10,when:p.FocusedViewContext.isEqualTo("workbench.view.testing"),primary:3|512}})}async run(We,Ve,Ue){Ve&&Ve instanceof a.TestItemTreeElement&&We.get(o.ICommandService).executeCommand("vscode.revealTest",Ve.test.item.extId,Ue)}}e.GoToTest=ue;class oe extends C.Action2{constructor(We,Ve){super({id:"testing.toggleautoRun",title:We,icon:n.testingAutorunIcon,toggled:Ve===!0?c.ContextKeyExpr.true():c.ContextKeyExpr.false(),menu:{id:C.MenuId.ViewTitle,order:15,group:"navigation",when:c.ContextKeyExpr.and(c.ContextKeyExpr.equals("view","workbench.view.testing"),d.TestingContextKeys.autoRun.isEqualTo(Ve))}})}run(We){We.get(g.ITestingAutoRun).toggle()}}class fe extends oe{constructor(){super((0,v.localize)(25,null),!1)}}e.AutoRunOnAction=fe;class pe extends oe{constructor(){super((0,v.localize)(26,null),!0)}}e.AutoRunOffAction=pe;class me extends C.Action2{constructor(We,Ve){super({...We,menu:{id:C.MenuId.CommandPalette,when:L}});this.group=Ve}async run(We){const Ve=We.get(R.IEditorService).activeTextEditorControl,Ue=Ve?.getPosition(),et=Ve?.getModel();if(!Ue||!et||!("uri"in et))return;const Ze=We.get(T.ITestService),Fe=We.get(E.ITestProfileService),Qe=We.get(s.IUriIdentityService);let qe=[],Be,Ke=[],Xe;await Z(We.get(S.IProgressService),(async()=>{for await(const it of(0,T.testsInFile)(Ze.collection,Qe,et.uri)){if(!it.item.range||!(Fe.capabilitiesForTest(it)&this.group))continue;const at=I.Range.lift(it.item.range);at.containsPosition(Ue)?Be&&I.Range.equalsRange(it.item.range,Be)?qe.push(it):(Be=at,qe=[it]):D.Position.isBefore(at.getStartPosition(),Ue)&&(!Xe||Xe.getStartPosition().isBefore(at.getStartPosition())?(Xe=at,Ke=[it]):at.equalsRange(Xe)&&Ke.push(it))}})()),(qe.length?qe:Ke).length&&await Ze.runTests({group:this.group,tests:qe.length?qe:Ke})}}class be extends me{constructor(){super({id:"testing.runAtCursor",title:(0,v.localize)(27,null),category:x,keybinding:{weight:200,when:w.EditorContextKeys.editorTextFocus,primary:(0,A.KeyChord)(2048|80,33)}},2)}}e.RunAtCursor=be;class Ce extends me{constructor(){super({id:"testing.debugAtCursor",title:(0,v.localize)(28,null),category:x,keybinding:{weight:200,when:w.EditorContextKeys.editorTextFocus,primary:(0,A.KeyChord)(2048|80,2048|33)}},4)}}e.DebugAtCursor=Ce;class ve extends C.Action2{constructor(We,Ve){super({...We,menu:{id:C.MenuId.CommandPalette,when:d.TestingContextKeys.capabilityToContextKey[Ve].isEqualTo(!0)}});this.group=Ve}run(We){const Ve=We.get(R.IEditorService).activeTextEditorControl,Ue=Ve?.getPosition(),et=Ve?.getModel();if(!Ue||!et||!("uri"in et))return;const Ze=We.get(T.ITestService),Fe=et.uri.toString(),Qe=[Ze.collection.rootIds],qe=[];for(;Qe.length;)for(const Be of Qe.pop()){const Ke=Ze.collection.getNodeById(Be);Ke.item.uri?.toString()===Fe?qe.push(Ke):Qe.push(Ke.children)}if(qe.length)return Ze.runTests({tests:qe,group:this.group})}}class he extends ve{constructor(){super({id:"testing.runCurrentFile",title:(0,v.localize)(29,null),category:x,keybinding:{weight:200,when:w.EditorContextKeys.editorTextFocus,primary:(0,A.KeyChord)(2048|80,36)}},2)}}e.RunCurrentFile=he;class ge extends ve{constructor(){super({id:"testing.debugCurrentFile",title:(0,v.localize)(30,null),category:x,keybinding:{weight:200,when:w.EditorContextKeys.editorTextFocus,primary:(0,A.KeyChord)(2048|80,2048|36)}},4)}}e.DebugCurrentFile=ge;const de=async(Me,We,Ve,Ue)=>{const et=Promise.all(Ve.map(Fe=>(0,T.expandAndGetTestById)(Me,Fe))),Ze=(await Z(We,et)).filter(k.isDefined);return Ze.length?await Ue(Ze):void 0};e.discoverAndRunTests=de;class Se extends C.Action2{async run(We,...Ve){const Ue=We.get(T.ITestService);await(0,e.discoverAndRunTests)(We.get(T.ITestService).collection,We.get(S.IProgressService),[...this.getTestExtIdsToRun(We,...Ve)],et=>this.runTest(Ue,et))}}class we extends Se{constructor(We){super({...We,menu:{id:C.MenuId.CommandPalette,when:L}})}getTestExtIdsToRun(We){const{results:Ve}=We.get(y.ITestResultService),Ue=new Set;for(let et=Ve.length-1;et>=0;et--){const Ze=Ve[et];for(const Fe of Ze.tests)(0,b.isFailedState)(Fe.ownComputedState)?Ue.add(Fe.item.extId):Ue.delete(Fe.item.extId)}return Ue}}class ye extends Se{constructor(We){super({...We,menu:{id:C.MenuId.CommandPalette,when:c.ContextKeyExpr.and(L,d.TestingContextKeys.hasAnyResults.isEqualTo(!0))}})}*getTestExtIdsToRun(We,Ve){const Ue=We.get(y.ITestResultService),et=Ve?Ue.results.find(Ze=>Ze.id===Ve):Ue.results[0];if(!!et)for(const Ze of et.request.targets)for(const Fe of Ze.testIds)yield Fe}}class ke extends we{constructor(){super({id:"testing.reRunFailTests",title:(0,v.localize)(31,null),category:x,keybinding:{weight:200,primary:(0,A.KeyChord)(2048|80,35)}})}runTest(We,Ve){return We.runTests({group:2,tests:Ve})}}e.ReRunFailedTests=ke;class Ie extends we{constructor(){super({id:"testing.debugFailTests",title:(0,v.localize)(32,null),category:x,keybinding:{weight:200,primary:(0,A.KeyChord)(2048|80,2048|35)}})}runTest(We,Ve){return We.runTests({group:4,tests:Ve})}}e.DebugFailedTests=Ie;class Te extends ye{constructor(){super({id:"testing.reRunLastRun",title:(0,v.localize)(33,null),category:x,keybinding:{weight:200,primary:(0,A.KeyChord)(2048|80,42)}})}runTest(We,Ve){return We.runTests({group:2,tests:Ve})}}e.ReRunLastRun=Te;class De extends ye{constructor(){super({id:"testing.debugLastRun",title:(0,v.localize)(34,null),category:x,keybinding:{weight:200,primary:(0,A.KeyChord)(2048|80,2048|42)}})}runTest(We,Ve){return We.runTests({group:4,tests:Ve})}}e.DebugLastRun=De;class _e extends C.Action2{constructor(){super({id:"testing.searchForTestExtension",title:(0,v.localize)(35,null)})}async run(We){const Ue=(await We.get(O.IPaneCompositePartService).openPaneComposite(u.VIEWLET_ID,0,!0))?.getViewPaneContainer();Ue.search('@category:"testing"'),Ue.focus()}}e.SearchForTestExtension=_e;class Re extends C.Action2{constructor(){super({id:"testing.openOutputPeek",title:(0,v.localize)(36,null),category:x,keybinding:{weight:200,primary:(0,A.KeyChord)(2048|80,2048|43)},menu:{id:C.MenuId.CommandPalette,when:d.TestingContextKeys.hasAnyResults.isEqualTo(!0)}})}async run(We){We.get(m.ITestingPeekOpener).open()}}e.OpenOutputPeek=Re;class Ne extends C.Action2{constructor(){super({id:"testing.toggleInlineTestOutput",title:(0,v.localize)(37,null),category:x,keybinding:{weight:200,primary:(0,A.KeyChord)(2048|80,2048|39)},menu:{id:C.MenuId.CommandPalette,when:d.TestingContextKeys.hasAnyResults.isEqualTo(!0)}})}async run(We){const Ve=We.get(T.ITestService);Ve.showInlineOutput.value=!Ve.showInlineOutput.value}}e.ToggleInlineTestOutput=Ne;const xe=Me=>[{id:C.MenuId.TestItem,group:"inline",order:10,when:c.ContextKeyExpr.and(d.TestingContextKeys.canRefreshTests.isEqualTo(!0),d.TestingContextKeys.isRefreshingTests.isEqualTo(Me))},{id:C.MenuId.ViewTitle,group:"navigation",order:10,when:c.ContextKeyExpr.and(c.ContextKeyExpr.equals("view","workbench.view.testing"),d.TestingContextKeys.canRefreshTests.isEqualTo(!0),d.TestingContextKeys.isRefreshingTests.isEqualTo(Me))},{id:C.MenuId.CommandPalette,when:d.TestingContextKeys.canRefreshTests.isEqualTo(!0)}];class Ae extends C.Action2{constructor(){super({id:"testing.refreshTests",title:(0,v.localize)(38,null),category:x,icon:n.testingRefreshTests,keybinding:{weight:200,primary:(0,A.KeyChord)(2048|80,2048|48),when:d.TestingContextKeys.canRefreshTests.isEqualTo(!0)},menu:xe(!1)})}async run(We,...Ve){const Ue=We.get(T.ITestService),et=We.get(S.IProgressService),Ze=(0,t.distinct)(Ve.filter(Fe=>Fe instanceof a.TestItemTreeElement).map(Fe=>Fe.test.controllerId));return et.withProgress({location:"workbench.view.extension.test"},async()=>{Ze.length?await Promise.all(Ze.map(Fe=>Ue.refreshTests(Fe))):await Ue.refreshTests()})}}e.RefreshTestsAction=Ae;class Le extends C.Action2{constructor(){super({id:"testing.cancelTestRefresh",title:(0,v.localize)(39,null),category:x,icon:n.testingCancelRefreshTests,menu:xe(!0)})}async run(We){We.get(T.ITestService).cancelRefreshTests()}}e.CancelTestRefreshAction=Le,e.allTestActions=[Le,$,ae,le,H,P,Y,Ce,ge,Ie,De,q,ue,M,Re,Ae,ke,Te,z,X,be,he,G,V,_e,U,ce,ie,se,te,J,ee,Ne,N]}),define(ne[2513],re([1,0,10,30,6,2,89,16,8,7,37,5,38,41,67,24,27,12,131,214,43,202,832,599,40]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewViewPane=void 0;const d={webviewState:"webviewState"};let m=class extends r.ViewPane{constructor(E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H){super({...E,titleMenuId:D.MenuId.ViewTitle},y,T,R,O,x,F,L,M,N);this.extensionService=P,this.progressService=V,this.webviewService=z,this.webviewViewService=U,this.viewService=H,this._webview=this._register(new A.MutableDisposable),this._webviewDisposables=this._register(new A.DisposableStore),this._activated=!1,this._onDidChangeVisibility=this._register(new _.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._onDispose=this._register(new _.Emitter),this.onDispose=this._onDispose.event,this.extensionId=E.fromExtensionId,this.defaultTitle=this.title,this.memento=new p.Memento(`webviewView.${this.id}`,B),this.viewState=this.memento.getMemento(1,1),this._register(this.onDidChangeBodyVisibility(()=>this.updateTreeVisibility())),this._register(this.webviewViewService.onNewResolverRegistered(K=>{K.viewType===this.id&&this.updateTreeVisibility()})),this.updateTreeVisibility()}dispose(){this._onDispose.fire(),super.dispose()}focus(){super.focus(),this._webview.value?.focus()}renderBody(E){super.renderBody(E),this._container=E,this._rootContainer=void 0,this._resizeObserver||(this._resizeObserver=new ResizeObserver(()=>{setTimeout(()=>{this.layoutWebview()},0)}),this._register((0,A.toDisposable)(()=>{this._resizeObserver.disconnect()})),this._resizeObserver.observe(E))}saveState(){this._webview.value&&(this.viewState[d.webviewState]=this._webview.value.state),this.memento.saveMemento(),super.saveState()}layoutBody(E,y){super.layoutBody(E,y),!!this._webview.value&&this.layoutWebview()}updateTreeVisibility(){this.isBodyVisible()?(this.activate(),this._webview.value?.claim(this,void 0)):this._webview.value?.release(this)}activate(){if(this._activated)return;this._activated=!0;const E=(0,k.generateUuid)(),y=this.webviewService.createWebviewOverlay(E,{purpose:"webviewView"},{},this.extensionId?{id:this.extensionId}:void 0);y.state=this.viewState[d.webviewState],this._webview.value=y,this._container&&this._webview.value?.layoutWebviewOverElement(this._container),this._webviewDisposables.add((0,A.toDisposable)(()=>{this._webview.value?.release(this)})),this._webviewDisposables.add(y.onDidUpdateState(()=>{this.viewState[d.webviewState]=y.state}));for(const R of[t.EventType.DRAG,t.EventType.DRAG_END,t.EventType.DRAG_ENTER,t.EventType.DRAG_LEAVE,t.EventType.DRAG_START])this._webviewDisposables.add((0,t.addDisposableListener)(this._webview.value.container,R,O=>{O.preventDefault(),O.stopImmediatePropagation(),this.dropTargetElement.dispatchEvent(new DragEvent(O.type,O))}));this._webviewDisposables.add(new n.WebviewWindowDragMonitor(()=>this._webview.value));const T=this._webviewDisposables.add(new f.CancellationTokenSource);this.withProgress(async()=>{await this.extensionService.activateByEvent(`onView:${this.id}`);let R=this;const O={webview:y,onDidChangeVisibility:this.onDidChangeBodyVisibility,onDispose:this.onDispose,get title(){return R.setTitle},set title(x){R.updateTitle(x)},get description(){return R.titleDescription},set description(x){R.updateTitleDescription(x)},dispose:()=>{this._activated=!1,this._webview.clear(),this._webviewDisposables.clear()},show:x=>{this.viewService.openView(this.id,!x)}};await this.webviewViewService.resolve(this.id,O,T.token)})}updateTitle(E){this.setTitle=E,super.updateTitle(typeof E=="string"?E:this.defaultTitle)}async withProgress(E){return this.progressService.withProgress({location:this.id,delay:500},E)}onDidScrollRoot(){this.layoutWebview()}layoutWebview(){const E=this._webview.value;if(!(!this._container||!E)&&(E.layoutWebviewOverElement(this._container),(!this._rootContainer||!this._rootContainer.isConnected)&&(this._rootContainer=this.findRootContainer(this._container)),this._rootContainer)){const y=this._container.getBoundingClientRect(),T=this._rootContainer.getBoundingClientRect(),R=Math.max(T.top-y.top,0),O=Math.max(y.width-(y.right-T.right),0),x=Math.max(y.height-(y.bottom-T.bottom),0),F=Math.max(T.left-y.left,0);E.container.style.clip=`rect(${R}px, ${O}px, ${x}px, ${F}px)`}}findRootContainer(E){for(let y=E;y;y=y.parentNode)if(y instanceof HTMLElement&&y.classList.contains("monaco-scrollable-element"))return y}};m=Ee([W(1,o.IKeybindingService),W(2,v.IContextMenuService),W(3,I.IConfigurationService),W(4,w.IContextKeyService),W(5,u.IViewDescriptorService),W(6,C.IInstantiationService),W(7,c.IOpenerService),W(8,l.IThemeService),W(9,s.ITelemetryService),W(10,S.IStorageService),W(11,g.IExtensionService),W(12,i.IProgressService),W(13,a.IWebviewService),W(14,h.IWebviewViewService),W(15,u.IViewsService)],m),e.WebviewViewPane=m}),define(ne[2514],re([1,0,185,5,12,8,7,38,98,2054,35,53,317]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputService=void 0;let c=class extends w.QuickInputService{constructor(S,s,l,r,p,u,a){super(s,r,p,u,a);this.configurationService=S,this.keybindingService=l,this.inQuickInputContext=o.InQuickPickContextKey.bindTo(this.contextKeyService),this.registerListeners()}registerListeners(){this._register(this.onShow(()=>this.inQuickInputContext.set(!0))),this._register(this.onHide(()=>this.inQuickInputContext.set(!1)))}createController(){return super.createController(this.layoutService,{ignoreFocusOut:()=>!this.configurationService.getValue("workbench.quickOpen.closeOnFocusLost"),backKeybindingLabel:()=>this.keybindingService.lookupKeybinding("workbench.action.quickInputBack")?.getLabel()||void 0})}};c=Ee([W(0,A.IConfigurationService),W(1,f.IInstantiationService),W(2,D.IKeybindingService),W(3,k.IContextKeyService),W(4,_.IThemeService),W(5,I.IAccessibilityService),W(6,t.ILayoutService)],c),e.QuickInputService=c,(0,v.registerSingleton)(C.IQuickInputService,c,!0)}),define(ne[2515],re([1,0,14,9]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteExtensionEnvironmentChannelClient=void 0;class _{static async getEnvironmentData(k,D){const I={remoteAuthority:D},w=await k.call("getEnvironmentData",I);return{pid:w.pid,connectionToken:w.connectionToken,appRoot:f.URI.revive(w.appRoot),settingsPath:f.URI.revive(w.settingsPath),logsPath:f.URI.revive(w.logsPath),extensionsPath:f.URI.revive(w.extensionsPath),extensionHostLogsPath:f.URI.revive(w.extensionHostLogsPath),globalStorageHome:f.URI.revive(w.globalStorageHome),workspaceStorageHome:f.URI.revive(w.workspaceStorageHome),localHistoryHome:f.URI.revive(w.localHistoryHome),userHome:f.URI.revive(w.userHome),os:w.os,arch:w.arch,marks:w.marks,useHostProxy:w.useHostProxy}}static async getExtensionHostExitInfo(k,D,I){const w={remoteAuthority:D,reconnectionToken:I};return k.call("getExtensionHostExitInfo",w)}static async whenExtensionsReady(k){await k.call("whenExtensionsReady")}static async scanExtensions(k,D,I,w){const v={language:t.language,remoteAuthority:D,extensionDevelopmentPath:I,skipExtensions:w},C=await k.call("scanExtensions",v);return C.forEach(o=>{o.extensionLocation=f.URI.revive(o.extensionLocation)}),C}static async scanSingleExtension(k,D,I,w){const v={language:t.language,remoteAuthority:D,isBuiltin:I,extensionLocation:w},C=await k.call("scanSingleExtension",v);return C&&(C.extensionLocation=f.URI.revive(C.extensionLocation)),C}static getDiagnosticInfo(k,D){return k.call("getDiagnosticInfo",D)}static updateTelemetryLevel(k,D){return k.call("updateTelemetryLevel",{telemetryLevel:D})}static logTelemetry(k,D,I){return k.call("logTelemetry",{eventName:D,data:I})}static flushTelemetry(k){return k.call("flushTelemetry")}}e.RemoteExtensionEnvironmentChannelClient=_}),define(ne[2516],re([1,0,2,171,50,554,144,2515,6,469,31,46]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteAgentConnection=e.AbstractRemoteAgentService=void 0;let o=class extends t.Disposable{constructor(S,s,l,r,p,u){super();this._environmentService=s,this._remoteAuthorityResolverService=r,this.socketFactory=S,this._environmentService.remoteAuthority?this._connection=this._register(new c(this._environmentService.remoteAuthority,l.commit,this.socketFactory,this._remoteAuthorityResolverService,p,u)):this._connection=null,this._environment=null}getConnection(){return this._connection}getEnvironment(){return this.getRawEnvironment().then(void 0,()=>null)}getRawEnvironment(){return this._environment||(this._environment=this._withChannel(async(S,s)=>{const l=await D.RemoteExtensionEnvironmentChannelClient.getEnvironmentData(S,s.remoteAuthority);return this._remoteAuthorityResolverService._setAuthorityConnectionToken(s.remoteAuthority,l.connectionToken),l},null)),this._environment}getExtensionHostExitInfo(S){return this._withChannel((s,l)=>D.RemoteExtensionEnvironmentChannelClient.getExtensionHostExitInfo(s,l.remoteAuthority,S),null)}whenExtensionsReady(){return this._withChannel(S=>D.RemoteExtensionEnvironmentChannelClient.whenExtensionsReady(S),void 0)}scanExtensions(S=[]){return this._withChannel((s,l)=>D.RemoteExtensionEnvironmentChannelClient.scanExtensions(s,l.remoteAuthority,this._environmentService.extensionDevelopmentLocationURI,S),[]).then(void 0,()=>[])}scanSingleExtension(S,s){return this._withChannel((l,r)=>D.RemoteExtensionEnvironmentChannelClient.scanSingleExtension(l,r.remoteAuthority,s,S),null).then(void 0,()=>null)}getDiagnosticInfo(S){return this._withChannel(s=>D.RemoteExtensionEnvironmentChannelClient.getDiagnosticInfo(s,S),void 0)}updateTelemetryLevel(S){return this._withTelemetryChannel(s=>D.RemoteExtensionEnvironmentChannelClient.updateTelemetryLevel(s,S),void 0)}logTelemetry(S,s){return this._withTelemetryChannel(l=>D.RemoteExtensionEnvironmentChannelClient.logTelemetry(l,S,s),void 0)}flushTelemetry(){return this._withTelemetryChannel(S=>D.RemoteExtensionEnvironmentChannelClient.flushTelemetry(S),void 0)}_withChannel(S,s){const l=this.getConnection();return l?l.withChannel("remoteextensionsenvironment",r=>S(r,l)):Promise.resolve(s)}_withTelemetryChannel(S,s){const l=this.getConnection();return l?l.withChannel("telemetry",r=>S(r,l)):Promise.resolve(s)}};o=Ee([W(1,_.IWorkbenchEnvironmentService),W(2,C.IProductService),W(3,k.IRemoteAuthorityResolverService),W(4,w.ISignService),W(5,v.ILogService)],o),e.AbstractRemoteAgentService=o;class c extends t.Disposable{constructor(S,s,l,r,p,u){super();this._commit=s,this._socketFactory=l,this._remoteAuthorityResolverService=r,this._signService=p,this._logService=u,this._onReconnecting=this._register(new I.Emitter),this.onReconnecting=this._onReconnecting.event,this._onDidStateChange=this._register(new I.Emitter),this.onDidStateChange=this._onDidStateChange.event,this.remoteAuthority=S,this._connection=null}getChannel(S){return(0,f.getDelayedChannel)(this._getOrCreateConnection().then(s=>s.getChannel(S)))}withChannel(S,s){const l=this.getChannel(S);return s(l)}registerChannel(S,s){this._getOrCreateConnection().then(l=>l.registerChannel(S,s))}_getOrCreateConnection(){return this._connection||(this._connection=this._createConnection()),this._connection}async _createConnection(){let S=!0;const s={commit:this._commit,socketFactory:this._socketFactory,addressProvider:{getAddress:async()=>{S?S=!1:this._onReconnecting.fire(void 0);const{authority:r}=await this._remoteAuthorityResolverService.resolveAuthority(this.remoteAuthority);return{host:r.host,port:r.port,connectionToken:r.connectionToken}}},signService:this._signService,logService:this._logService,ipcLogger:null},l=this._register(await(0,A.connectRemoteAgentManagement)(s,this.remoteAuthority,"renderer"));return l.protocol.onDidDispose(()=>{l.dispose()}),this._register(l.onDidStateChange(r=>this._onDidStateChange.fire(r))),l.client}}e.RemoteAgentConnection=c}),define(ne[109],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IRemoteAgentService=e.RemoteExtensionLogFileName=void 0,e.RemoteExtensionLogFileName="remoteagent",e.IRemoteAgentService=(0,t.createDecorator)("remoteAgentService")}),define(ne[2517],re([1,0,2,65,75,9,151,5,31,188,2003,105,818,325,592,120,109,13,14,11]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadTerminalService=void 0;let u=class{constructor(g,d,m,b,E,y,T,R,O,x,F){this._extHostContext=g,this._terminalService=d,this.terminalInstanceService=m,this._instantiationService=b,this._environmentVariableService=E,this._logService=y,this._terminalProfileResolverService=T,this._terminalGroupService=O,this._terminalEditorService=x,this._terminalProfileService=F,this._extHostTerminals=new Map,this._toDispose=new t.DisposableStore,this._terminalProcessProxies=new Map,this._profileProviders=new Map,this._os=r.OS,this._proxy=g.getProxy(f.ExtHostContext.ExtHostTerminalService),this._toDispose.add(d.onDidCreateInstance(M=>{this._onTerminalOpened(M),this._onInstanceDimensionsChanged(M)})),this._toDispose.add(d.onDidDisposeInstance(M=>this._onTerminalDisposed(M))),this._toDispose.add(d.onDidReceiveProcessId(M=>this._onTerminalProcessIdReady(M))),this._toDispose.add(d.onDidChangeInstanceDimensions(M=>this._onInstanceDimensionsChanged(M))),this._toDispose.add(d.onDidMaximumDimensionsChange(M=>this._onInstanceMaximumDimensionsChanged(M))),this._toDispose.add(d.onDidRequestStartExtensionTerminal(M=>this._onRequestStartExtensionTerminal(M))),this._toDispose.add(d.onDidChangeActiveInstance(M=>this._onActiveTerminalChanged(M?M.instanceId:null))),this._toDispose.add(d.onDidChangeInstanceTitle(M=>M&&this._onTitleChanged(M.instanceId,M.title))),this._toDispose.add(d.onDidInputInstanceData(M=>this._proxy.$acceptTerminalInteraction(M.instanceId))),this._terminalService.instances.forEach(M=>{this._onTerminalOpened(M),M.processReady.then(()=>this._onTerminalProcessIdReady(M))});const L=this._terminalService.activeInstance;if(L&&this._proxy.$acceptActiveTerminalChanged(L.instanceId),this._environmentVariableService.collections.size>0){const N=[...this._environmentVariableService.collections.entries()].map(B=>[B[0],(0,i.serializeEnvironmentVariableCollection)(B[1].map)]);this._proxy.$initEnvironmentVariableCollections(N)}R.getEnvironment().then(async M=>{this._os=M?.os||r.OS,this._updateDefaultProfile()}),this._terminalProfileService.onDidChangeAvailableProfiles(()=>this._updateDefaultProfile())}dispose(){this._toDispose.dispose(),this._linkProvider?.dispose()}async _updateDefaultProfile(){const g=(0,l.withNullAsUndefined)(this._extHostContext.remoteAuthority),d=this._terminalProfileResolverService.getDefaultProfile({remoteAuthority:g,os:this._os}),m=this._terminalProfileResolverService.getDefaultProfile({remoteAuthority:g,os:this._os,allowAutomationShell:!0});this._proxy.$acceptDefaultProfile(...await Promise.all([d,m]))}async _getTerminalInstance(g){return typeof g=="string"?this._extHostTerminals.get(g):this._terminalService.getInstanceFromId(g)}async $createTerminal(g,d){const m={name:d.name,executable:d.shellPath,args:d.shellArgs,cwd:typeof d.cwd=="string"?d.cwd:A.URI.revive(d.cwd),icon:d.icon,color:d.color,initialText:d.initialText,waitOnExit:d.waitOnExit,ignoreConfigurationCwd:!0,env:d.env,strictEnv:d.strictEnv,hideFromUser:d.hideFromUser,customPtyImplementation:d.isExtensionCustomPtyTerminal?(E,y,T)=>new o.TerminalProcessExtHostProxy(E,y,T,this._terminalService):void 0,extHostTerminalId:g,isFeatureTerminal:d.isFeatureTerminal,isExtensionOwnedTerminal:d.isExtensionOwnedTerminal,useShellEnvironment:d.useShellEnvironment,isTransient:d.isTransient},b=p.Promises.withAsyncBody(async E=>{const y=await this._terminalService.createTerminal({config:m,location:await this._deserializeParentTerminal(d.location)});E(y)});this._extHostTerminals.set(g,b),await b}async _deserializeParentTerminal(g){if(typeof g=="object"&&"parentTerminal"in g){const d=await this._extHostTerminals.get(g.parentTerminal.toString());return d?{parentTerminal:d}:void 0}return g}async $show(g,d){const m=await this._getTerminalInstance(g);m&&(this._terminalService.setActiveInstance(m),m.target===w.TerminalLocation.Editor?this._terminalEditorService.revealActiveEditor(d):this._terminalGroupService.showPanel(!d))}async $hide(g){const d=await this._getTerminalInstance(g),m=this._terminalService.activeInstance;m&&m.instanceId===d?.instanceId&&m.target!==w.TerminalLocation.Editor&&this._terminalGroupService.hidePanel()}async $dispose(g){(await this._getTerminalInstance(g))?.dispose()}async $sendText(g,d,m){await(await this._getTerminalInstance(g))?.sendText(d,m)}$sendProcessExit(g,d){this._terminalProcessProxies.get(g)?.emitExit(d)}$startSendingDataEvents(){this._dataEventTracker||(this._dataEventTracker=this._instantiationService.createInstance(a,(g,d)=>{this._onTerminalData(g,d)}),this._terminalService.instances.forEach(g=>{g.initialDataEvents?.forEach(d=>this._onTerminalData(g.instanceId,d))}))}$stopSendingDataEvents(){this._dataEventTracker?.dispose(),this._dataEventTracker=void 0}$startLinkProvider(){this._linkProvider?.dispose(),this._linkProvider=this._terminalService.registerLinkProvider(new n(this._proxy))}$stopLinkProvider(){this._linkProvider?.dispose(),this._linkProvider=void 0}$registerProcessSupport(g){this._terminalService.registerProcessSupport(g)}$registerProfileProvider(g,d){this._profileProviders.set(g,this._terminalProfileService.registerTerminalProfileProvider(d,g,{createContributedTerminalProfile:async m=>this._proxy.$createContributedProfileTerminal(g,m)}))}$unregisterProfileProvider(g){this._profileProviders.get(g)?.dispose(),this._profileProviders.delete(g)}_onActiveTerminalChanged(g){this._proxy.$acceptActiveTerminalChanged(g)}_onTerminalData(g,d){this._proxy.$acceptTerminalProcessData(g,d)}_onTitleChanged(g,d){this._proxy.$acceptTerminalTitleChange(g,d)}_onTerminalDisposed(g){this._proxy.$acceptTerminalClosed(g.instanceId,g.exitCode)}_onTerminalOpened(g){const d=g.shellLaunchConfig.extHostTerminalId,m={name:g.shellLaunchConfig.name,executable:g.shellLaunchConfig.executable,args:g.shellLaunchConfig.args,cwd:g.shellLaunchConfig.cwd,env:g.shellLaunchConfig.env,hideFromUser:g.shellLaunchConfig.hideFromUser};this._proxy.$acceptTerminalOpened(g.instanceId,d,g.title,m)}_onTerminalProcessIdReady(g){g.processId!==void 0&&this._proxy.$acceptTerminalProcessId(g.instanceId,g.processId)}_onInstanceDimensionsChanged(g){this._proxy.$acceptTerminalDimensions(g.instanceId,g.cols,g.rows)}_onInstanceMaximumDimensionsChanged(g){this._proxy.$acceptTerminalMaximumDimensions(g.instanceId,g.maxCols,g.maxRows)}_onRequestStartExtensionTerminal(g){const d=g.proxy;this._terminalProcessProxies.set(d.instanceId,d);const m=g.cols&&g.rows?{columns:g.cols,rows:g.rows}:void 0;this._proxy.$startExtensionTerminal(d.instanceId,m).then(g.callback),d.onInput(b=>this._proxy.$acceptProcessInput(d.instanceId,b)),d.onShutdown(b=>this._proxy.$acceptProcessShutdown(d.instanceId,b)),d.onRequestCwd(()=>this._proxy.$acceptProcessRequestCwd(d.instanceId)),d.onRequestInitialCwd(()=>this._proxy.$acceptProcessRequestInitialCwd(d.instanceId)),d.onRequestLatency(()=>this._onRequestLatency(d.instanceId))}$sendProcessData(g,d){this._terminalProcessProxies.get(g)?.emitData(d)}$sendProcessReady(g,d,m){this._terminalProcessProxies.get(g)?.emitReady(d,m)}$sendProcessProperty(g,d){if(d.type==="title"){const m=this._terminalService.getInstanceFromId(g);m&&m.refreshTabLabels(d.value,w.TitleEventSource.Api)}this._terminalProcessProxies.get(g)?.emitProcessProperty(d)}async _onRequestLatency(g){const d=2;let m=0;for(let b=0;b<d;b++){const E=k.StopWatch.create(!0);await this._proxy.$acceptProcessRequestLatency(g),E.stop(),m+=E.elapsed()}this._getTerminalProcess(g)?.emitLatency(m/d)}_getTerminalProcess(g){const d=this._terminalProcessProxies.get(g);if(!d){this._logService.error(`Unknown terminal: ${g}`);return}return d}$setEnvironmentVariableCollection(g,d,m){if(m){const b={persistent:d,map:(0,i.deserializeEnvironmentVariableCollection)(m)};this._environmentVariableService.set(g,b)}else this._environmentVariableService.delete(g)}};u=Ee([(0,_.extHostNamedCustomer)(f.MainContext.MainThreadTerminalService),W(1,C.ITerminalService),W(2,C.ITerminalInstanceService),W(3,D.IInstantiationService),W(4,c.IEnvironmentVariableService),W(5,I.ILogService),W(6,S.ITerminalProfileResolverService),W(7,s.IRemoteAgentService),W(8,C.ITerminalGroupService),W(9,C.ITerminalEditorService),W(10,S.ITerminalProfileService)],u),e.MainThreadTerminalService=u;let a=class extends t.Disposable{constructor(g,d){super();this._callback=g,this._terminalService=d,this._register(this._bufferer=new v.TerminalDataBufferer(this._callback)),this._terminalService.instances.forEach(m=>this._registerInstance(m)),this._register(this._terminalService.onDidCreateInstance(m=>this._registerInstance(m))),this._register(this._terminalService.onDidDisposeInstance(m=>this._bufferer.stopBuffering(m.instanceId)))}_registerInstance(g){this._register(this._bufferer.startBuffering(g.instanceId,g.onData))}};a=Ee([W(1,C.ITerminalService)],a);class n{constructor(g){this._proxy=g}async provideLinks(g,d){const m=this._proxy;return(await m.$provideLinks(g.instanceId,d)).map(E=>({id:E.id,startIndex:E.startIndex,length:E.length,label:E.label,activate:()=>m.$activateLink(g.instanceId,E.id)}))}}}),define(ne[2518],re([1,0,47,17,45,14,18,109,31,466,255,1699,19,2,57,23,54,50,34,15,16,70,554,27,246]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LabelContribution=void 0;let d=class{constructor(F,L){this.labelService=F,this.remoteAgentService=L,this.registerFormatters()}registerFormatters(){this.remoteAgentService.getEnvironment().then(F=>{const L=F?.os||A.OS,M={label:"${path}",separator:L===1?"\\":"/",tildify:L!==1,normalizeDriveLetter:L===1,workspaceSuffix:A.isWeb?void 0:k.Schemas.vscodeRemote};this.labelService.registerFormatter({scheme:k.Schemas.vscodeRemote,formatting:M}),F&&this.labelService.registerFormatter({scheme:k.Schemas.vscodeUserData,formatting:M})})}};d=Ee([W(0,_.ILabelService),W(1,D.IRemoteAgentService)],d),e.LabelContribution=d;let m=class extends c.Disposable{constructor(F,L){super();const M=()=>{const N=L.getConnection();!N||N.withChannel("logger",B=>w.LogLevelChannelClient.setLevel(B,F.getLevel()))};M(),this._register(F.onDidChangeLogLevel(M))}};m=Ee([W(0,I.ILogService),W(1,D.IRemoteAgentService)],m);let b=class{constructor(F){F.getEnvironment().then(L=>{L&&f.Registry.as(v.Extensions.OutputChannels).registerChannel({id:"remoteExtensionLog",label:(0,C.localize)(0,null),file:(0,o.joinPath)(L.logsPath,`${D.RemoteExtensionLogFileName}.log`),log:!0})})}};b=Ee([W(0,D.IRemoteAgentService)],b);let E=class extends c.Disposable{constructor(F,L,M,N,B,P){super();this.fileService=F,this.dialogService=L,this.environmentService=M,this.contextService=N,this.fileDialogService=B,this.environmentService.remoteAuthority&&P.getEnvironment().then(V=>{V&&this.validateRemoteWorkspace()})}async validateRemoteWorkspace(){const F=this.contextService.getWorkspace(),L=F.configuration??(0,p.firstOrDefault)(F.folders)?.uri;if(!L||await this.fileService.exists(L))return;if((await this.dialogService.confirm({type:"warning",message:(0,C.localize)(1,null),detail:(0,C.localize)(2,null),primaryButton:(0,C.localize)(3,null),secondaryButton:(0,C.localize)(4,null)})).confirmed)return F.configuration?this.fileDialogService.pickWorkspaceAndOpen({}):this.fileDialogService.pickFolderAndOpen({})}};E=Ee([W(0,S.IFileService),W(1,s.IDialogService),W(2,l.IWorkbenchEnvironmentService),W(3,r.IWorkspaceContextService),W(4,s.IFileDialogService),W(5,D.IRemoteAgentService)],E);let y=class{constructor(F,L,M){this._remoteAgentService=F,this._environmentService=L,this._telemetryService=M,this._environmentService.remoteAuthority&&this._checkInitialRemoteConnectionHealth()}async _checkInitialRemoteConnectionHealth(){try{await this._remoteAgentService.getRawEnvironment(),this._telemetryService.publicLog2("remoteConnectionSuccess",{web:A.isWeb,remoteName:(0,g.getRemoteName)(this._environmentService.remoteAuthority)})}catch(F){this._telemetryService.publicLog2("remoteConnectionFailure",{web:A.isWeb,remoteName:(0,g.getRemoteName)(this._environmentService.remoteAuthority),message:F?F.message:""})}}};y=Ee([W(0,D.IRemoteAgentService),W(1,l.IWorkbenchEnvironmentService),W(2,h.ITelemetryService)],y);const T=f.Registry.as(t.Extensions.Workbench);if(T.registerWorkbenchContribution(d,1),T.registerWorkbenchContribution(m,1),T.registerWorkbenchContribution(E,1),T.registerWorkbenchContribution(b,3),T.registerWorkbenchContribution(y,2),!0){class x extends u.Action2{constructor(){super({id:"workbench.action.triggerReconnect",title:{value:(0,C.localize)(5,null),original:"Connection: Trigger Reconnect"},category:a.CATEGORIES.Developer,f1:!0})}async run(M){n.PersistentConnection.debugTriggerReconnection()}}class F extends u.Action2{constructor(){super({id:"workbench.action.pauseSocketWriting",title:{value:(0,C.localize)(6,null),original:"Connection: Pause socket writing"},category:a.CATEGORIES.Developer,f1:!0})}async run(M){n.PersistentConnection.debugPauseSocketWriting()}}(0,u.registerAction2)(x),(0,u.registerAction2)(F)}const O={type:"string",enum:["ui","workspace"],enumDescriptions:[(0,C.localize)(7,null),(0,C.localize)(8,null)]};f.Registry.as(i.Extensions.Configuration).registerConfiguration({id:"remote",title:(0,C.localize)(9,null),type:"object",properties:{"remote.extensionKind":{type:"object",markdownDescription:(0,C.localize)(10,null),patternProperties:{"([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$":{oneOf:[{type:"array",items:O},O],default:["ui"]}},default:{"pub.name":["ui"]}},"remote.restoreForwardedPorts":{type:"boolean",markdownDescription:(0,C.localize)(11,null),default:!0},"remote.autoForwardPorts":{type:"boolean",markdownDescription:(0,C.localize)(12,null),default:!0},"remote.autoForwardPortsSource":{type:"string",markdownDescription:(0,C.localize)(13,null),enum:["process","output"],enumDescriptions:[(0,C.localize)(14,null),(0,C.localize)(15,null)],default:"process"},"remote.portsAttributes":{type:"object",patternProperties:{"(^\\d+(-\\d+)?$)|(.+)":{type:"object",description:(0,C.localize)(16,null),properties:{onAutoForward:{type:"string",enum:["notify","openBrowser","openBrowserOnce","openPreview","silent","ignore"],enumDescriptions:[(0,C.localize)(17,null),(0,C.localize)(18,null),(0,C.localize)(19,null),(0,C.localize)(20,null),(0,C.localize)(21,null),(0,C.localize)(22,null)],description:(0,C.localize)(23,null),default:"notify"},elevateIfNeeded:{type:"boolean",description:(0,C.localize)(24,null),default:!1},label:{type:"string",description:(0,C.localize)(25,null),default:(0,C.localize)(26,null)},requireLocalPort:{type:"boolean",markdownDescription:(0,C.localize)(27,null),default:!1},protocol:{type:"string",enum:["http","https"],description:(0,C.localize)(28,null)}},default:{label:(0,C.localize)(29,null),onAutoForward:"notify"}}},markdownDescription:(0,C.localize)(30,null),defaultSnippets:[{body:{"${1:3000}":{label:"${2:Application}",onAutoForward:"openPreview"}}}],errorMessage:(0,C.localize)(31,null),additionalProperties:!1,default:{"443":{protocol:"https"},"8443":{protocol:"https"}}},"remote.otherPortsAttributes":{type:"object",properties:{onAutoForward:{type:"string",enum:["notify","openBrowser","openPreview","silent","ignore"],enumDescriptions:[(0,C.localize)(32,null),(0,C.localize)(33,null),(0,C.localize)(34,null),(0,C.localize)(35,null),(0,C.localize)(36,null)],description:(0,C.localize)(37,null),default:"notify"},elevateIfNeeded:{type:"boolean",description:(0,C.localize)(38,null),default:!1},label:{type:"string",description:(0,C.localize)(39,null),default:(0,C.localize)(40,null)},requireLocalPort:{type:"boolean",markdownDescription:(0,C.localize)(41,null),default:!1},protocol:{type:"string",enum:["http","https"],description:(0,C.localize)(42,null)}},defaultSnippets:[{body:{onAutoForward:"ignore"}}],markdownDescription:(0,C.localize)(43,null),additionalProperties:!1},"remote.localPortHost":{type:"string",enum:["localhost","allInterfaces"],default:"localhost",description:(0,C.localize)(44,null)}}})}),define(ne[2519],re([1,0,6,180,28,8,5,31,26,17,144,24,34,815,2214,105,2281,120,218,177,109]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteTerminalBackendContribution=void 0;let a=class{constructor(g,d,m){const b=d.getConnection()?.remoteAuthority;if(b){const E=d.getConnection();if(E){const y=g.createInstance(s.RemoteTerminalChannelClient,E.remoteAuthority,E.getChannel(s.REMOTE_TERMINAL_CHANNEL_NAME)),T=g.createInstance(n,b,y);w.Registry.as(l.TerminalExtensions.Backend).registerTerminalBackend(T),m.handleNewRegisteredBackend(T)}}}};a=Ee([W(0,k.IInstantiationService),W(1,u.IRemoteAgentService),W(2,S.ITerminalService)],a),e.RemoteTerminalBackendContribution=a;let n=class extends c.BaseTerminalBackend{constructor(g,d,m,b,E,y,T,R,O,x,F,L){super(d,b,T,F,x,O);this.remoteAuthority=g,this._remoteTerminalChannel=d,this._remoteAgentService=m,this._commandService=E,this._storageService=y,this._remoteAuthorityResolverService=R,this._historyService=F,this._configurationService=L,this._ptys=new Map,this._onDidRequestDetach=this._register(new t.Emitter),this.onDidRequestDetach=this._onDidRequestDetach.event,this._onRestoreCommands=this._register(new t.Emitter),this.onRestoreCommands=this._onRestoreCommands.event,this._remoteTerminalChannel.onProcessData(B=>this._ptys.get(B.id)?.handleData(B.event)),this._remoteTerminalChannel.onProcessReplay(B=>{this._ptys.get(B.id)?.handleReplay(B.event),B.event.commands.commands.length>0&&this._onRestoreCommands.fire({id:B.id,commands:B.event.commands.commands})}),this._remoteTerminalChannel.onProcessOrphanQuestion(B=>this._ptys.get(B.id)?.handleOrphanQuestion()),this._remoteTerminalChannel.onDidRequestDetach(B=>this._onDidRequestDetach.fire(B)),this._remoteTerminalChannel.onProcessReady(B=>this._ptys.get(B.id)?.handleReady(B.event)),this._remoteTerminalChannel.onDidChangeProperty(B=>this._ptys.get(B.id)?.handleDidChangeProperty(B.property)),this._remoteTerminalChannel.onProcessExit(B=>{const P=this._ptys.get(B.id);P&&(P.handleExit(B.event),this._ptys.delete(B.id))});const M=["_remoteCLI.openExternal","_remoteCLI.windowOpen","_remoteCLI.getSystemStatus","_remoteCLI.manageExtensions"];this._remoteTerminalChannel.onExecuteCommand(async B=>{const P=B.reqId,V=B.commandId;if(!M.includes(V)){this._remoteTerminalChannel.sendCommandResult(P,!0,"Invalid remote cli command: "+V);return}const z=B.commandArgs.map(U=>(0,f.revive)(U));try{const U=await this._commandService.executeCommand(B.commandId,...z);this._remoteTerminalChannel.sendCommandResult(P,!1,U)}catch(U){this._remoteTerminalChannel.sendCommandResult(P,!0,U)}});const N=this._configurationService.getValue(l.TERMINAL_CONFIG_SECTION);for(const B of Object.keys(N.autoReplies)){const P=N.autoReplies[B];P&&this._remoteTerminalChannel.installAutoReply(B,P)}this._register(this._configurationService.onDidChangeConfiguration(async B=>{if(B.affectsConfiguration("terminal.integrated.autoReplies")){this._remoteTerminalChannel.uninstallAllAutoReplies();const P=this._configurationService.getValue(l.TERMINAL_CONFIG_SECTION);for(const V of Object.keys(P.autoReplies)){const z=P.autoReplies[V];z&&await this._remoteTerminalChannel.installAutoReply(V,z)}}}))}async requestDetachInstance(g,d){if(!this._remoteTerminalChannel)throw new Error("Cannot request detach instance when there is no remote!");return this._remoteTerminalChannel.requestDetachInstance(g,d)}async acceptDetachInstanceReply(g,d){if(this._remoteTerminalChannel){if(!d){this._logService.warn("Cannot attach to feature terminals, custom pty terminals, or those without a persistentProcessId");return}}else throw new Error("Cannot accept detached instance when there is no remote!");return this._remoteTerminalChannel.acceptDetachInstanceReply(g,d)}async persistTerminalState(){if(!this._remoteTerminalChannel)throw new Error("Cannot persist terminal state when there is no remote!");const g=Array.from(this._ptys.keys()),d=await this._remoteTerminalChannel.serializeTerminalState(g);this._storageService.store("terminal.integrated.bufferState",d,1,1)}async createProcess(g,d,m,b,E,y,T,R){if(!this._remoteTerminalChannel)throw new Error("Cannot create remote terminal when there is no remote!");if(!await this._remoteAgentService.getEnvironment())throw new Error("Could not fetch remote environment");const x=this._configurationService.getValue(l.TERMINAL_CONFIG_SECTION),F={"terminal.integrated.automationShell.windows":this._configurationService.getValue("terminal.integrated.automationShell.windows"),"terminal.integrated.automationShell.osx":this._configurationService.getValue("terminal.integrated.automationShell.osx"),"terminal.integrated.automationShell.linux":this._configurationService.getValue("terminal.integrated.automationShell.linux"),"terminal.integrated.shell.windows":this._configurationService.getValue("terminal.integrated.shell.windows"),"terminal.integrated.shell.osx":this._configurationService.getValue("terminal.integrated.shell.osx"),"terminal.integrated.shell.linux":this._configurationService.getValue("terminal.integrated.shell.linux"),"terminal.integrated.shellArgs.windows":this._configurationService.getValue("terminal.integrated.shellArgs.windows"),"terminal.integrated.shellArgs.osx":this._configurationService.getValue("terminal.integrated.shellArgs.osx"),"terminal.integrated.shellArgs.linux":this._configurationService.getValue("terminal.integrated.shellArgs.linux"),"terminal.integrated.env.windows":this._configurationService.getValue("terminal.integrated.env.windows"),"terminal.integrated.env.osx":this._configurationService.getValue("terminal.integrated.env.osx"),"terminal.integrated.env.linux":this._configurationService.getValue("terminal.integrated.env.linux"),"terminal.integrated.cwd":this._configurationService.getValue("terminal.integrated.cwd"),"terminal.integrated.detectLocale":x.detectLocale},L={name:g.name,executable:g.executable,args:g.args,cwd:g.cwd,env:g.env,useShellEnvironment:g.useShellEnvironment},M=this._historyService.getLastActiveWorkspaceRoot(),N=await this._remoteTerminalChannel.createProcess(L,F,M,T,R,m,b,E),B=new i.RemotePty(N.persistentTerminalId,R,this._remoteTerminalChannel,this._remoteAgentService,this._logService);return this._ptys.set(N.persistentTerminalId,B),B}async attachToProcess(g){if(!this._remoteTerminalChannel)throw new Error("Cannot create remote terminal when there is no remote!");try{await this._remoteTerminalChannel.attachToProcess(g);const d=new i.RemotePty(g,!0,this._remoteTerminalChannel,this._remoteAgentService,this._logService);return this._ptys.set(g,d),d}catch(d){this._logService.trace(`Couldn't attach to process ${d.message}`)}}async listProcesses(){return(this._remoteTerminalChannel?await this._remoteTerminalChannel.listProcesses():[]).map(d=>({id:d.id,pid:d.pid,title:d.title,titleSource:d.titleSource,cwd:d.cwd,workspaceId:d.workspaceId,workspaceName:d.workspaceName,icon:d.icon,color:d.color,isOrphan:d.isOrphan,fixedDimensions:d.fixedDimensions}))}async updateProperty(g,d,m){await this._remoteTerminalChannel?.updateProperty(g,d,m)}async updateTitle(g,d,m){await this._remoteTerminalChannel?.updateTitle(g,d,m)}async updateIcon(g,d,m){await this._remoteTerminalChannel?.updateIcon(g,d,m)}async getDefaultSystemShell(g){return this._remoteTerminalChannel?.getDefaultSystemShell(g)||""}async getProfiles(g,d,m){return this._remoteTerminalChannel?.getProfiles(g,d,m)||[]}async getEnvironment(){return this._remoteTerminalChannel?.getEnvironment()||{}}async getShellEnvironment(){const g=this._remoteAgentService.getConnection();return g?(await this._remoteAuthorityResolverService.resolveAuthority(g.remoteAuthority)).options?.extensionHostEnv:void 0}async getWslPath(g){return(await this._remoteAgentService.getEnvironment())?.os!==1?g:this._remoteTerminalChannel?.getWslPath(g)||g}async setTerminalLayoutInfo(g){if(!this._remoteTerminalChannel)throw new Error("Cannot call setActiveInstanceId when there is no remote");return this._remoteTerminalChannel.setTerminalLayoutInfo(g)}async reduceConnectionGraceTime(){if(!this._remoteTerminalChannel)throw new Error("Cannot reduce grace time when there is no remote");return this._remoteTerminalChannel.reduceConnectionGraceTime()}async getTerminalLayoutInfo(){if(!this._remoteTerminalChannel)throw new Error("Cannot call getActiveInstanceId when there is no remote");const g=this._storageService.get("terminal.integrated.bufferState",1),d=this._deserializeTerminalState(g);if(d)try{await this._remoteTerminalChannel.reviveTerminalProcesses(d,Intl.DateTimeFormat().resolvedOptions().locale),this._storageService.remove("terminal.integrated.bufferState",1);const m=this._storageService.get("terminal.integrated.layoutInfo",1);m&&(await this._remoteTerminalChannel.setTerminalLayoutInfo(JSON.parse(m)),this._storageService.remove("terminal.integrated.layoutInfo",1))}catch{}return this._remoteTerminalChannel.getTerminalLayoutInfo()}};n=Ee([W(2,u.IRemoteAgentService),W(3,D.ILogService),W(4,_.ICommandService),W(5,C.IStorageService),W(6,I.INotificationService),W(7,v.IRemoteAuthorityResolverService),W(8,o.IWorkspaceContextService),W(9,r.IConfigurationResolverService),W(10,p.IHistoryService),W(11,A.IConfigurationService)],n)}),define(ne[2520],re([1,0,18,196,13,8,31,34,218,177,14,120,48,33,109,110,12,9,15,24,81,26,1768,51,475,105]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserTerminalProfileResolverService=e.BaseTerminalProfileResolverService=void 0;const m="Generated",b="terminals.integrated.profile-migration";let E=!1;class y{constructor(O,x,F,L,M,N,B,P,V,z){this._context=O,this._configurationService=x,this._configurationResolverService=F,this._historyService=L,this._logService=M,this._terminalProfileService=N,this._workspaceContextService=B,this._remoteAgentService=P,this._storageService=V,this._notificationService=z,this._remoteAgentService.getConnection()?this._remoteAgentService.getEnvironment().then(U=>this._primaryBackendOs=U?.os||v.OS):this._primaryBackendOs=v.OS,this._configurationService.onDidChangeConfiguration(U=>{(U.affectsConfiguration("terminal.integrated.defaultProfile.windows")||U.affectsConfiguration("terminal.integrated.defaultProfile.osx")||U.affectsConfiguration("terminal.integrated.defaultProfile.linux"))&&this._refreshDefaultProfileName()}),this._terminalProfileService.onDidChangeAvailableProfiles(()=>this._refreshDefaultProfileName()),this.showProfileMigrationNotification()}get defaultProfileName(){return this._defaultProfileName}async _refreshDefaultProfileName(){this._primaryBackendOs&&(this._defaultProfileName=(await this.getDefaultProfile({remoteAuthority:this._remoteAgentService.getConnection()?.remoteAuthority,os:this._primaryBackendOs}))?.profileName)}resolveIcon(O,x){if(O.icon){O.icon=this._getCustomIcon(O.icon)||c.Codicon.terminal;return}if(O.customPtyImplementation){O.icon=c.Codicon.terminal;return}if(O.executable)return;const F=this._getUnresolvedRealDefaultProfile(x);F&&(O.icon=F.icon)}async resolveShellLaunchConfig(O,x){let F;O.executable?F=await this._resolveProfile({path:O.executable,args:O.args,profileName:m,isDefault:!1},x):F=await this.getDefaultProfile(x),O.executable=F.path,O.args=F.args,F.env&&(O.env?O.env={...O.env,...F.env}:O.env=F.env),O.icon=this._getCustomIcon(O.icon)||this._getCustomIcon(F.icon)||c.Codicon.terminal,F.overrideName&&(O.name=F.profileName),O.color=O.color||F.color,O.useShellEnvironment===void 0&&(O.useShellEnvironment=this._configurationService.getValue("terminal.integrated.inheritEnv"))}async getDefaultShell(O){return(await this.getDefaultProfile(O)).path}async getDefaultShellArgs(O){return(await this.getDefaultProfile(O)).args||[]}async getDefaultProfile(O){return this._resolveProfile(await this._getUnresolvedDefaultProfile(O),O)}getEnvironment(O){return this._context.getEnvironment(O)}_getCustomIcon(O){if(!!O){if(typeof O=="string")return s.ThemeIcon.fromId(O);if(s.ThemeIcon.isThemeIcon(O))return O;if(l.URI.isUri(O)||(0,g.isUriComponents)(O))return l.URI.revive(O);if(typeof O=="object"&&O&&"light"in O&&"dark"in O){const x=O;if((l.URI.isUri(x.light)||(0,g.isUriComponents)(x.light))&&(l.URI.isUri(x.dark)||(0,g.isUriComponents)(x.dark)))return{light:l.URI.revive(x.light),dark:l.URI.revive(x.dark)}}}}async _getUnresolvedDefaultProfile(O){if(O.allowAutomationShell){const L=this._getUnresolvedAutomationShellProfile(O);if(L)return L}const x=await this._getUnresolvedShellSettingDefaultProfile(O);if(x)return this._setIconForAutomation(O,x);await this._terminalProfileService.profilesReady;const F=this._getUnresolvedRealDefaultProfile(O.os);return F?this._setIconForAutomation(O,F):this._setIconForAutomation(O,await this._getUnresolvedFallbackDefaultProfile(O))}_setIconForAutomation(O,x){if(O.allowAutomationShell){const F=(0,h.deepClone)(x);return F.icon=c.Codicon.tools,F}return x}_getUnresolvedRealDefaultProfile(O){const x=this._configurationService.getValue(`terminal.integrated.defaultProfile.${this._getOsKey(O)}`);if(x&&typeof x=="string")return this._terminalProfileService.availableProfiles.find(F=>F.profileName===x)}async _getUnresolvedShellSettingDefaultProfile(O){let x=this._configurationService.getValue(`terminal.integrated.shell.${this._getOsKey(O.os)}`);if(!this._isValidShell(x)){const N=this._configurationService.inspect(`terminal.integrated.shellArgs.${this._getOsKey(O.os)}`);if(!N.userValue&&!N.workspaceValue)return}(!x||!this._isValidShell(x))&&(x=await this._context.getDefaultSystemShell(O.remoteAuthority,O.os));let F;const L=this._configurationService.getValue(`terminal.integrated.shellArgs.${this._getOsKey(O.os)}`);this._isValidShellArgs(L,O.os)&&(F=L),F===void 0&&(O.os===2&&F===void 0&&o.parse(x).name.match(/(zsh|bash|fish)/)?F=["--login"]:F=[]);const M=this._guessProfileIcon(x);return{profileName:m,path:x,args:F,icon:M,isDefault:!1}}async _getUnresolvedFallbackDefaultProfile(O){const x=await this._context.getDefaultSystemShell(O.remoteAuthority,O.os);let F=this._terminalProfileService.availableProfiles.find(N=>o.parse(N.path).name===o.parse(x).name);if(F)return O.allowAutomationShell&&(F=(0,h.deepClone)(F),F.icon=c.Codicon.tools),F;let L;O.os===2&&o.parse(x).name.match(/(zsh|bash)/)?L=["--login"]:L=[];const M=this._guessProfileIcon(x);return{profileName:m,path:x,args:L,icon:M,isDefault:!1}}_getUnresolvedAutomationShellProfile(O){const x=this._configurationService.getValue(`terminal.integrated.automationShell.${this._getOsKey(O.os)}`);if(x&&typeof x=="string")return{path:x,profileName:m,isDefault:!1,icon:c.Codicon.tools};const F=this._configurationService.getValue(`terminal.integrated.automationProfile.${this._getOsKey(O.os)}`);if(this._isValidAutomationProfile(F,O.os))return F.icon=this._getCustomIcon(F.icon)||c.Codicon.tools,F}async _resolveProfile(O,x){if(x.os===1){const N=await this._context.getEnvironment(x.remoteAuthority),B=!!N.hasOwnProperty("PROCESSOR_ARCHITEW6432"),P=N.windir;if(!B&&P){const V=o.join(P,"Sysnative").replace(/\//g,"\\").toLowerCase();O.path&&O.path.toLowerCase().indexOf(V)===0&&(O.path=o.join(P,"System32",O.path.substr(V.length+1)))}O.path&&(O.path=O.path.replace(/\//g,"\\"))}const F=await this._context.getEnvironment(x.remoteAuthority),L=this._historyService.getLastActiveWorkspaceRoot(x.remoteAuthority?t.Schemas.vscodeRemote:t.Schemas.file),M=L?(0,_.withNullAsUndefined)(this._workspaceContextService.getWorkspaceFolder(L)):void 0;if(O.path=this._resolveVariables(O.path,F,M),O.args)if(typeof O.args=="string")O.args=this._resolveVariables(O.args,F,M);else for(let N=0;N<O.args.length;N++)O.args[N]=this._resolveVariables(O.args[N],F,M);return O}_resolveVariables(O,x,F){try{O=this._configurationResolverService.resolveWithEnvironment(x,F,O)}catch(L){this._logService.error("Could not resolve shell",L)}return O}_getOsKey(O){switch(O){case 3:return"linux";case 2:return"osx";case 1:return"windows"}}_guessProfileIcon(O){switch(o.parse(O).name){case"bash":return c.Codicon.terminalBash;case"pwsh":case"powershell":return c.Codicon.terminalPowershell;case"tmux":return c.Codicon.terminalTmux;case"cmd":return c.Codicon.terminalCmd;default:return}}_isValidShell(O){return O?typeof O=="string":!1}_isValidShellArgs(O,x){return!!(O===void 0||x===1&&typeof O=="string"||Array.isArray(O)&&O.every(F=>typeof F=="string"))}async createProfileFromShellAndShellArgs(O,x){const F=this._terminalProfileService.availableProfiles?.find(P=>P.path!==O?!1:P.args===void 0||typeof P.args=="string"?P.args===x:P.path===O&&(0,r.equals)(P.args,x||[])),L=await this.getDefaultProfile({remoteAuthority:this._remoteAgentService.getConnection()?.remoteAuthority,os:this._primaryBackendOs});L.profileName=`${L.path} (migrated)`;const M=F||L,N=this._isValidShellArgs(x,this._primaryBackendOs)?x:M.args,B={profileName:M.profileName,path:M.path,args:N,isDefault:!0};return F&&F.profileName===B.profileName&&F.path===B.path&&(0,g.terminalProfileArgsMatch)(F.args,B.args)?F.profileName:B}_isValidAutomationProfile(O,x){return!O===void 0||typeof O!="object"||O===null?!1:"path"in O&&typeof O.path=="string"}async showProfileMigrationNotification(){(!!this._configurationService.getValue("terminal.integrated.shell."+this._primaryBackendOs)||!!this._configurationService.inspect("terminal.integrated.shellArgs."+this._primaryBackendOs).userValue)&&!!this._configurationService.getValue("terminal.integrated.defaultProfile."+this._primaryBackendOs)&&this._storageService.getBoolean(b,1,!0)&&!E&&(this._notificationService.prompt(u.default.Info,(0,n.localize)(0,null),[{label:(0,n.localize)(1,null),run:async()=>{const x=this._configurationService.getValue("terminal.integrated.shell."+this._primaryBackendOs),F=this._configurationService.getValue("terminal.integrated.shellArgs."+this._primaryBackendOs),L=await this.createProfileFromShellAndShellArgs(x,F);if(typeof L=="string")await this._configurationService.updateValue("terminal.integrated.defaultProfile."+this._primaryBackendOs,L),this._logService.trace(`migrated from shell/shellArgs, using existing profile ${L}`);else{const M={...this._configurationService.inspect("terminal.integrated.profiles."+this._primaryBackendOs).userValue},N={path:L.path};L.args&&(N.args=L.args),M[L.profileName]=N,await this._configurationService.updateValue("terminal.integrated.profiles."+this._primaryBackendOs,M),await this._configurationService.updateValue("terminal.integrated.defaultProfile."+this._primaryBackendOs,L.profileName),this._logService.trace(`migrated from shell/shellArgs, ${x} ${F} to profile ${JSON.stringify(L)}`)}await this._configurationService.updateValue("terminal.integrated.shell."+this._primaryBackendOs,void 0),await this._configurationService.updateValue("terminal.integrated.shellArgs."+this._primaryBackendOs,void 0)}}],{neverShowAgain:{id:b,scope:a.NeverShowAgainScope.WORKSPACE}}),E=!0)}}Ee([(0,S.debounce)(200)],y.prototype,"_refreshDefaultProfileName",null),e.BaseTerminalProfileResolverService=y;let T=class extends y{constructor(O,x,F,L,M,N,B,P,V,z){super({getDefaultSystemShell:async(U,H)=>{const K=M.getBackend(U);return!U||!K?H===1?"pwsh":"bash":K.getDefaultSystemShell(H)},getEnvironment:async U=>{const H=M.getBackend(U);return!U||!H?f.env:H.getEnvironment()}},x,O,F,L,N,B,P,V,z)}};T=Ee([W(0,I.IConfigurationResolverService),W(1,A.IConfigurationService),W(2,w.IHistoryService),W(3,k.ILogService),W(4,d.ITerminalInstanceService),W(5,C.ITerminalProfileService),W(6,D.IWorkspaceContextService),W(7,i.IRemoteAgentService),W(8,p.IStorageService),W(9,a.INotificationService)],T),e.BrowserTerminalProfileResolverService=T}),define(ne[2521],re([1,0,207,9,23,5,2448,109,87,2,105]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalNativeContribution=void 0;let C=class extends w.Disposable{constructor(c,i,S,s,l){super();this._fileService=c,this._terminalService=i,this.instantiationService=S,this.remoteAgentService=s,this.nativeHostService=l,t.ipcRenderer.on("vscode:openFiles",(p,u)=>this._onOpenFileRequest(u)),this._register(l.onDidResumeOS(()=>this._onOsResume())),this._terminalService.setNativeDelegate({getWindowCount:()=>l.getWindowCount(),openDevTools:()=>l.openDevTools(),toggleDevTools:()=>l.toggleDevTools()});const r=s.getConnection();r&&r.remoteAuthority&&(0,k.registerRemoteContributions)()}_onOsResume(){this._terminalService.instances.forEach(c=>c.xterm?.forceRedraw())}async _onOpenFileRequest(c){if(c.termProgram==="vscode"&&c.filesToWait){const i=f.URI.revive(c.filesToWait.waitMarkerFileUri);await this._whenFileDeleted(i),this._terminalService.activeInstance?.focus()}}_whenFileDeleted(c){return new Promise(i=>{let S=!1;const s=setInterval(async()=>{if(!S){S=!0;const l=await this._fileService.exists(c);S=!1,l||(clearInterval(s),i(void 0))}},1e3)})}};C=Ee([W(0,_.IFileService),W(1,v.ITerminalService),W(2,A.IInstantiationService),W(3,D.IRemoteAgentService),W(4,I.INativeHostService)],C),e.TerminalNativeContribution=C}),define(ne[2522],re([1,0,8,31,26,24,34,105,2520,120,218,177,109]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElectronTerminalProfileResolverService=void 0;let c=class extends I.BaseTerminalProfileResolverService{constructor(S,s,l,r,p,u,a,n,h,g){super({getDefaultSystemShell:async(d,m)=>{const b=g.getBackend(d);if(!b)throw new Error(`Cannot get default system shell when there is no backend for remote authority '${d}'`);return b.getDefaultSystemShell(m)},getEnvironment:d=>{const m=g.getBackend(d);if(!m)throw new Error(`Cannot get environment when there is no backend for remote authority '${d}'`);return m.getEnvironment()}},s,S,l,r,u,p,a,n,h)}};c=Ee([W(0,v.IConfigurationResolverService),W(1,t.IConfigurationService),W(2,C.IHistoryService),W(3,f.ILogService),W(4,k.IWorkspaceContextService),W(5,w.ITerminalProfileService),W(6,o.IRemoteAgentService),W(7,A.IStorageService),W(8,_.INotificationService),W(9,D.ITerminalInstanceService)],c),e.ElectronTerminalProfileResolverService=c}),define(ne[2523],re([1,0,35,103,17,188,556,47,871,120,2521,2522,2374]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,f.registerSharedProcessRemoteService)(k.ILocalPtyService,A.TerminalIpcChannels.LocalPty,{supportsDelayedInstantiation:!0}),(0,t.registerSingleton)(w.ITerminalProfileResolverService,C.ElectronTerminalProfileResolverService,!0);const c=_.Registry.as(D.Extensions.Workbench);c.registerWorkbenchContribution(o.LocalTerminalBackendContribution,1),c.registerWorkbenchContribution(v.TerminalNativeContribution,2),c.registerWorkbenchContribution(I.ExternalTerminalContribution,2)}),define(ne[427],re([1,0,15,6,2,14,29,13,1851,16,28,7,54,35,26,53,24,217,271,233,40,133,109]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AuthenticationService=e.readAllowedExtensions=e.getCurrentAuthenticationSessionInfo=e.addAccountUsage=e.removeAccountUsage=e.readAccountUsages=e.getAuthenticationProviderActivationEvent=void 0;function h(F){return`onAuthenticationRequest:${F}`}e.getAuthenticationProviderActivationEvent=h;const g=["github.vscode-pull-request-github","vscode.git","github.remotehub","github.remotehub-insiders","github.codespaces","ms-vsliveshare.vsliveshare"];function d(F,L,M){const N=`${L}-${M}-usages`,B=F.get(N,0);let P=[];if(B)try{P=JSON.parse(B)}catch{}return P}e.readAccountUsages=d;function m(F,L,M){const N=`${L}-${M}-usages`;F.remove(N,0)}e.removeAccountUsage=m;function b(F,L,M,N,B){const P=`${L}-${M}-usages`,V=d(F,L,M),z=V.findIndex(U=>U.extensionId===N);z>-1?V.splice(z,1,{extensionId:N,extensionName:B,lastUsed:Date.now()}):V.push({extensionId:N,extensionName:B,lastUsed:Date.now()}),F.store(P,JSON.stringify(V),0,1)}e.addAccountUsage=b;async function E(F,L){const M=await F.getPassword(`${L.urlProtocol}.login`,"account");if(M){const N=JSON.parse(M);if(N&&(0,D.isString)(N.id)&&(0,D.isString)(N.accessToken)&&(0,D.isString)(N.providerId))return N}}e.getCurrentAuthenticationSessionInfo=E;function y(F,L,M){let N=[];try{const B=F.get(`${L}-${M}`,0);B&&(N=JSON.parse(B))}catch{}return N}e.readAllowedExtensions=y;const T=" ";v.CommandsRegistry.registerCommand("workbench.getCodeExchangeProxyEndpoints",function(F,L){return F.get(p.IBrowserWorkbenchEnvironmentService).options?.codeExchangeProxyEndpoints});const R={type:"object",additionalProperties:!1,properties:{id:{type:"string",description:I.localize(0,null)},label:{type:"string",description:I.localize(1,null)}}},O=a.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"authentication",jsonSchema:{description:I.localize(2,null),type:"array",items:R}});let x=class extends _.Disposable{constructor(L,M,N,B,P,V){super();this.activityService=L,this.extensionService=M,this.storageService=N,this.remoteAgentService=B,this.dialogService=P,this.quickInputService=V,this._signInRequestItems=new Map,this._sessionAccessRequestItems=new Map,this._accountBadgeDisposable=this._register(new _.MutableDisposable),this._authenticationProviders=new Map,this.declaredProviders=[],this._onDidRegisterAuthenticationProvider=this._register(new f.Emitter),this.onDidRegisterAuthenticationProvider=this._onDidRegisterAuthenticationProvider.event,this._onDidUnregisterAuthenticationProvider=this._register(new f.Emitter),this.onDidUnregisterAuthenticationProvider=this._onDidUnregisterAuthenticationProvider.event,this._onDidChangeSessions=this._register(new f.Emitter),this.onDidChangeSessions=this._onDidChangeSessions.event,this._onDidChangeDeclaredProviders=this._register(new f.Emitter),this.onDidChangeDeclaredProviders=this._onDidChangeDeclaredProviders.event,this._placeholderMenuItem=w.MenuRegistry.appendMenuItem(w.MenuId.AccountsContext,{command:{id:"noAuthenticationProviders",title:I.localize(3,null),precondition:C.ContextKeyExpr.false()}}),O.setHandler((z,{added:U,removed:H})=>{U.forEach(G=>{for(const q of G.value){if((0,k.isFalsyOrWhitespace)(q.id)){G.collector.error(I.localize(4,null));continue}if((0,k.isFalsyOrWhitespace)(q.label)){G.collector.error(I.localize(5,null));continue}this.declaredProviders.some(Z=>Z.id===q.id)?G.collector.error(I.localize(6,null,q.id)):this.declaredProviders.push(q)}}),(0,t.flatten)(H.map(G=>G.value)).forEach(G=>{const q=this.declaredProviders.findIndex(Z=>Z.id===G.id);q>-1&&this.declaredProviders.splice(q,1)}),this._onDidChangeDeclaredProviders.fire(this.declaredProviders)})}getProviderIds(){const L=[];return this._authenticationProviders.forEach(M=>{L.push(M.id)}),L}isAuthenticationProviderRegistered(L){return this._authenticationProviders.has(L)}registerAuthenticationProvider(L,M){this._authenticationProviders.set(L,M),this._onDidRegisterAuthenticationProvider.fire({id:L,label:M.label}),this._placeholderMenuItem&&(this._placeholderMenuItem.dispose(),this._placeholderMenuItem=void 0)}unregisterAuthenticationProvider(L){const M=this._authenticationProviders.get(L);if(M){M.dispose(),this._authenticationProviders.delete(L),this._onDidUnregisterAuthenticationProvider.fire({id:L,label:M.label});const N=this._sessionAccessRequestItems.get(L)||{};Object.keys(N).forEach(B=>{this.removeAccessRequest(L,B)})}this._authenticationProviders.size||(this._placeholderMenuItem=w.MenuRegistry.appendMenuItem(w.MenuId.AccountsContext,{command:{id:"noAuthenticationProviders",title:I.localize(7,null),precondition:C.ContextKeyExpr.false()}}))}async sessionsUpdate(L,M){const N=this._authenticationProviders.get(L);N&&(this._onDidChangeSessions.fire({providerId:L,label:N.label,event:M}),M.added&&await this.updateNewSessionRequests(N,M.added),M.removed&&await this.updateAccessRequests(L,M.removed),this.updateBadgeCount())}async updateNewSessionRequests(L,M){const N=this._signInRequestItems.get(L.id);!N||Object.keys(N).forEach(B=>{M.some(P=>P.scopes.slice().join(T)===B)&&(N[B]?.disposables.forEach(V=>V.dispose()),delete N[B],Object.keys(N).length===0?this._signInRequestItems.delete(L.id):this._signInRequestItems.set(L.id,N))})}async updateAccessRequests(L,M){const N=this._sessionAccessRequestItems.get(L);N&&Object.keys(N).forEach(B=>{M.forEach(P=>{const V=N[B].possibleSessions.findIndex(z=>z.id===P.id);V&&N[B].possibleSessions.splice(V,1)}),N[B].possibleSessions.length||this.removeAccessRequest(L,B)})}updateBadgeCount(){this._accountBadgeDisposable.clear();let L=0;if(this._signInRequestItems.forEach(M=>{Object.keys(M).forEach(N=>{L+=M[N].requestingExtensionIds.length})}),this._sessionAccessRequestItems.forEach(M=>{L+=Object.keys(M).length}),L>0){const M=new l.NumberBadge(L,()=>I.localize(8,null));this._accountBadgeDisposable.value=this.activityService.showAccountsActivity({badge:M})}}removeAccessRequest(L,M){const N=this._sessionAccessRequestItems.get(L)||{};N[M]&&((0,_.dispose)(N[M].disposables),delete N[M],this.updateBadgeCount())}isAccessAllowed(L,M,N){const P=y(this.storageService,L,M).find(U=>U.id===N);if(P)return P.allowed!==void 0?P.allowed:!0;const V=this.remoteAgentService.getConnection();if((V!==null?V.remoteAuthority.startsWith("codespaces"):A.isWeb)&&g.includes(N))return!0}async updatedAllowedExtension(L,M,N,B,P){const V=y(this.storageService,L,M),z=V.findIndex(U=>U.id===N);z===-1?V.push({id:N,name:B,allowed:P}):V[z].allowed=P,await this.storageService.store(`${L}-${M}`,JSON.stringify(V),0,0)}async showGetSessionPrompt(L,M,N,B){const P=this.getLabel(L),{choice:V}=await this.dialogService.show(i.Severity.Info,I.localize(9,null,B,P,M),[I.localize(10,null),I.localize(11,null),I.localize(12,null)],{cancelId:2}),z=V===2,U=V===0;return z||(this.updatedAllowedExtension(L,M,N,B,U),this.removeAccessRequest(L,N)),U}async selectSession(L,M,N,B,P){return new Promise((V,z)=>{P.length||z("No available sessions");const U=this.quickInputService.createQuickPick();U.ignoreFocusOut=!0;const H=P.map(G=>({label:G.account.label,session:G}));H.push({label:I.localize(13,null)});const K=this.getLabel(L);U.items=H,U.title=I.localize(14,null,N,K),U.placeholder=I.localize(15,null,N),U.onDidAccept(async G=>{const q=U.selectedItems[0].session??await this.createSession(L,B),Z=q.account.label;this.updatedAllowedExtension(L,Z,M,N,!0),this.removeAccessRequest(L,M),this.storageService.store(`${N}-${L}`,q.id,0,1),U.dispose(),V(q)}),U.onDidHide(G=>{U.selectedItems[0]||z("User did not consent to account access"),U.dispose()}),U.show()})}async completeSessionAccessRequest(L,M,N,B){const V=(this._sessionAccessRequestItems.get(L)||{})[M];if(!V)return;const z=V.possibleSessions,U=this.supportsMultipleAccounts(L);let H;if(U)try{H=await this.selectSession(L,M,N,B,z)}catch{}else await this.showGetSessionPrompt(L,z[0].account.label,M,N)&&(H=z[0]);if(H){b(this.storageService,L,H.account.label,M,N);const K=this.getLabel(L);this._onDidChangeSessions.fire({providerId:L,label:K,event:{added:[],removed:[],changed:[H]}})}}requestSessionAccess(L,M,N,B,P){const V=this._sessionAccessRequestItems.get(L)||{};if(V[M])return;const U=w.MenuRegistry.appendMenuItem(w.MenuId.AccountsContext,{group:"3_accessRequests",command:{id:`${L}${M}Access`,title:I.localize(16,null,this.getLabel(L),N)}}),H=v.CommandsRegistry.registerCommand({id:`${L}${M}Access`,handler:async K=>{K.get(r.IAuthenticationService).completeSessionAccessRequest(L,M,N,B)}});V[M]={possibleSessions:P,disposables:[U,H]},this._sessionAccessRequestItems.set(L,V),this.updateBadgeCount()}async requestNewSession(L,M,N,B){let P=this._authenticationProviders.get(L);if(P||await new Promise((q,Z)=>{this.onDidRegisterAuthenticationProvider(j=>{j.id===L&&(P=this._authenticationProviders.get(L),q())})}),!P)return;const V=this._signInRequestItems.get(L),z=M.join(T);if(V&&V[z]&&V[z].requestingExtensionIds.includes(N))return;const H=`${L}:${N}:signIn${Object.keys(V||[]).length}`,K=w.MenuRegistry.appendMenuItem(w.MenuId.AccountsContext,{group:"2_signInRequests",command:{id:H,title:I.localize(17,null,P.label,B)}}),G=v.CommandsRegistry.registerCommand({id:H,handler:async q=>{const Z=q.get(r.IAuthenticationService),j=q.get(s.IStorageService),X=await Z.createSession(L,M);this.updatedAllowedExtension(L,X.account.label,N,B,!0),j.store(`${B}-${L}`,X.id,0,1)}});if(V){const q=V[z]||{disposables:[],requestingExtensionIds:[]};V[z]={disposables:[...q.disposables,K,G],requestingExtensionIds:[...q.requestingExtensionIds,N]},this._signInRequestItems.set(L,V)}else this._signInRequestItems.set(L,{[z]:{disposables:[K,G],requestingExtensionIds:[N]}});this.updateBadgeCount()}getLabel(L){const M=this._authenticationProviders.get(L);if(M)return M.label;throw new Error(`No authentication provider '${L}' is currently registered.`)}supportsMultipleAccounts(L){const M=this._authenticationProviders.get(L);if(M)return M.supportsMultipleAccounts;throw new Error(`No authentication provider '${L}' is currently registered.`)}async tryActivateProvider(L,M){await this.extensionService.activateByEvent(h(L),M?1:0);let N=this._authenticationProviders.get(L);if(N)return N;const B=new Promise((V,z)=>{this.onDidRegisterAuthenticationProvider(U=>{if(U.id===L)if(N=this._authenticationProviders.get(L),N)V(N);else throw new Error(`No authentication provider '${L}' is currently registered.`)})}),P=new Promise((V,z)=>{setTimeout(()=>{z("Timed out waiting for authentication provider to register")},5e3)});return Promise.race([B,P])}async getSessions(L,M,N=!1){const B=this._authenticationProviders.get(L)||await this.tryActivateProvider(L,N);if(B)return await B.getSessions(M);throw new Error(`No authentication provider '${L}' is currently registered.`)}async createSession(L,M,N=!1){const B=this._authenticationProviders.get(L)||await this.tryActivateProvider(L,N);if(B)return await B.createSession(M);throw new Error(`No authentication provider '${L}' is currently registered.`)}async removeSession(L,M){const N=this._authenticationProviders.get(L);if(N)return N.removeSession(M);throw new Error(`No authentication provider '${L}' is currently registered.`)}async manageTrustedExtensionsForAccount(L,M){const N=this._authenticationProviders.get(L);if(N)return N.manageTrustedExtensions(M);throw new Error(`No authentication provider '${L}' is currently registered.`)}async removeAccountSessions(L,M,N){const B=this._authenticationProviders.get(L);if(B)return B.removeAccountSessions(M,N);throw new Error(`No authentication provider '${L}' is currently registered.`)}};x=Ee([W(0,l.IActivityService),W(1,u.IExtensionService),W(2,s.IStorageService),W(3,n.IRemoteAgentService),W(4,o.IDialogService),W(5,S.IQuickInputService)],x),e.AuthenticationService=x,(0,c.registerSingleton)(r.IAuthenticationService,x)}),define(ne[2524],re([1,0,2,1352,75,427,271,65,54,24,81,53,26,197,40,27]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadAuthentication=e.MainThreadAuthenticationProvider=void 0;class s extends t.Disposable{constructor(p,u,a,n,h,g,d,m){super();this._proxy=p,this.id=u,this.label=a,this.supportsMultipleAccounts=n,this.notificationService=h,this.storageService=g,this.quickInputService=d,this.dialogService=m}manageTrustedExtensions(p){const u=(0,A.readAllowedExtensions)(this.storageService,this.id,p);if(!u.length){this.dialogService.show(v.default.Info,f.localize(0,null));return}const a=this.quickInputService.createQuickPick();a.canSelectMany=!0,a.customButton=!0,a.customLabel=f.localize(1,null);const n=(0,A.readAccountUsages)(this.storageService,this.id,p),h=u.map(g=>{const d=n.find(m=>g.id===m.extensionId);return{label:g.name,description:d?f.localize(2,null,(0,c.fromNow)(d.lastUsed,!0)):f.localize(3,null),extension:g}});a.items=h,a.selectedItems=h.filter(g=>g.extension.allowed===void 0||g.extension.allowed),a.title=f.localize(4,null),a.placeholder=f.localize(5,null),a.onDidAccept(()=>{const g=a.items.map(d=>d.extension);this.storageService.store(`${this.id}-${p}`,JSON.stringify(g),0,0),a.dispose()}),a.onDidChangeSelection(g=>{a.items.forEach(d=>{d.extension&&(d.extension.allowed=!1)}),g.forEach(d=>d.extension.allowed=!0)}),a.onDidHide(()=>{a.dispose()}),a.onDidCustom(()=>{a.hide()}),a.show()}async removeAccountSessions(p,u){const a=(0,A.readAccountUsages)(this.storageService,this.id,p);if((await this.dialogService.show(v.default.Info,a.length?f.localize(6,null,p,a.map(h=>h.extensionName).join(` `)):f.localize(7,null,p),[f.localize(8,null),f.localize(9,null)],{cancelId:1})).choice===0){const h=u.map(g=>this.removeSession(g.id));await Promise.all(h),(0,A.removeAccountUsage)(this.storageService,this.id,p),this.storageService.remove(`${this.id}-${p}`,0)}}async getSessions(p){return this._proxy.$getSessions(this.id,p)}createSession(p){return this._proxy.$createSession(this.id,p)}async removeSession(p){await this._proxy.$removeSession(this.id,p),this.notificationService.info(f.localize(10,null))}}e.MainThreadAuthenticationProvider=s;let l=class extends t.Disposable{constructor(p,u,a,n,h,g,d,m){super();this.authenticationService=u,this.dialogService=a,this.storageService=n,this.notificationService=h,this.quickInputService=g,this.extensionService=d,this.telemetryService=m,this._proxy=p.getProxy(D.ExtHostContext.ExtHostAuthentication),this._register(this.authenticationService.onDidChangeSessions(b=>{this._proxy.$onDidChangeAuthenticationSessions(b.providerId,b.label)})),this._proxy.$setProviders(this.authenticationService.declaredProviders),this._register(this.authenticationService.onDidChangeDeclaredProviders(b=>{this._proxy.$setProviders(b)}))}async $registerAuthenticationProvider(p,u,a){const n=new s(this._proxy,p,u,a,this.notificationService,this.storageService,this.quickInputService,this.dialogService);this.authenticationService.registerAuthenticationProvider(p,n)}$unregisterAuthenticationProvider(p){this.authenticationService.unregisterAuthenticationProvider(p)}$ensureProvider(p){return this.extensionService.activateByEvent((0,A.getAuthenticationProviderActivationEvent)(p),1)}$sendDidChangeSessions(p,u){this.authenticationService.sessionsUpdate(p,u)}$removeSession(p,u){return this.authenticationService.removeSession(p,u)}async loginPrompt(p,u,a,n){const h=a?f.localize(11,null,u,p):f.localize(12,null,u,p),{choice:g}=await this.dialogService.show(v.default.Info,h,[f.localize(13,null),f.localize(14,null)],{cancelId:1,detail:n});return g===0}async setTrustedExtensionAndAccountPreference(p,u,a,n,h){this.authenticationService.updatedAllowedExtension(p,u,a,n,!0),this.storageService.store(`${n}-${p}`,h,0,1)}async doGetSession(p,u,a,n,h){const g=await this.authenticationService.getSessions(p,u,!0),d=this.authenticationService.supportsMultipleAccounts(p);if(h.forceNewSession&&!g.length)throw new Error("No existing sessions found.");if(h.forceNewSession&&h.createIfNone)throw new Error("Invalid combination of options. Please remove one of the following: forceNewSession, createIfNone");if(h.forceNewSession&&h.silent)throw new Error("Invalid combination of options. Please remove one of the following: forceNewSession, silent");if(h.createIfNone&&h.silent)throw new Error("Invalid combination of options. Please remove one of the following: createIfNone, silent");if(!h.forceNewSession&&g.length){if(d)if(h.clearSessionPreference)this.storageService.remove(`${n}-${p}`,0);else{const b=this.storageService.get(`${n}-${p}`,0);if(b){const E=g.find(y=>y.id===b);if(E&&this.authenticationService.isAccessAllowed(p,E.account.label,a))return E}}else if(this.authenticationService.isAccessAllowed(p,g[0].account.label,a))return g[0]}if(h.createIfNone||h.forceNewSession){const b=this.authenticationService.getLabel(p),E=typeof h.forceNewSession=="object"?h.forceNewSession.detail:void 0;if(!await this.loginPrompt(b,n,!!h.forceNewSession,E))throw new Error("User did not consent to login.");const T=g?.length&&!h.forceNewSession&&d?await this.authenticationService.selectSession(p,a,n,u,g):await this.authenticationService.createSession(p,u,!0);return await this.setTrustedExtensionAndAccountPreference(p,T.account.label,a,n,T.id),T}const m=g.find(b=>this.authenticationService.isAccessAllowed(p,b.account.label,a));return!h.silent&&!m&&await this.authenticationService.requestNewSession(p,u,a,n),m}async $getSession(p,u,a,n,h){const g=await this.doGetSession(p,u,a,n,h);return g&&(this.telemetryService.publicLog2("authentication.providerUsage",{providerId:p,extensionId:a}),(0,A.addAccountUsage)(this.storageService,p,g.account.label,a,n)),g}};l=Ee([(0,_.extHostNamedCustomer)(D.MainContext.MainThreadAuthentication),W(1,k.IAuthenticationService),W(2,I.IDialogService),W(3,w.IStorageService),W(4,o.INotificationService),W(5,C.IQuickInputService),W(6,i.IExtensionService),W(7,S.ITelemetryService)],l),e.MainThreadAuthentication=l}),define(ne[101],re([1,0,157,18,48,14,19,9,5,230,34,50,109]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractPathService=e.IPathService=void 0,e.IPathService=(0,I.createDecorator)("pathService");let c=class oa{constructor(S,s,l,r){this.localUserHome=S,this.remoteAgentService=s,this.environmentService=l,this.contextService=r,this.resolveOS=(async()=>(await this.remoteAgentService.getEnvironment())?.os||A.OS)(),this.resolveUserHome=(async()=>{const p=await this.remoteAgentService.getEnvironment();return this.maybeUnresolvedUserHome=p?.userHome||S})()}hasValidBasename(S,s,l){return typeof s=="string"||typeof s=="undefined"?this.resolveOS.then(r=>this.doHasValidBasename(S,r,s)):this.doHasValidBasename(S,s,l)}doHasValidBasename(S,s,l){return S.scheme===f.Schemas.file||S.scheme===f.Schemas.vscodeRemote?(0,t.isValidBasename)(l??(0,k.basename)(S),s===1):!0}get defaultUriScheme(){return oa.findDefaultUriScheme(this.environmentService,this.contextService)}static findDefaultUriScheme(S,s){if(S.remoteAuthority)return f.Schemas.vscodeRemote;const l=(0,w.getVirtualWorkspaceScheme)(s.getWorkspace());if(l)return l;const r=s.getWorkspace().folders[0];if(r)return r.uri.scheme;const p=s.getWorkspace().configuration;return p?p.scheme:f.Schemas.file}async userHome(S){return S?.preferLocal?this.localUserHome:this.resolveUserHome}get resolvedUserHome(){return this.maybeUnresolvedUserHome}get path(){return this.resolveOS.then(S=>S===1?_.win32:_.posix)}async fileURI(S){let s="";if(await this.resolveOS===1&&(S=S.replace(/\\/g,"/")),S[0]==="/"&&S[1]==="/"){const r=S.indexOf("/",2);r===-1?(s=S.substring(2),S="/"):(s=S.substring(2,r),S=S.substring(r)||"/")}return D.URI.from({scheme:f.Schemas.file,authority:s,path:S,query:"",fragment:""})}};c=Ee([W(1,o.IRemoteAgentService),W(2,C.IWorkbenchEnvironmentService),W(3,v.IWorkspaceContextService)],c),e.AbstractPathService=c}),define(ne[428],re([1,0,18,48,14,9,23,41,21,50,101,91,1514,212]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkDetector=void 0;const i="\\u0000-\\u0020\\u007f-\\u009f",S=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|data:|www\\.)[^\\s"+i+'"]{2,}[^\\s'+i+`"')}\\],:;.!?]`,"ug"),s=/(?:[a-zA-Z]:(?:(?:\\|\/)[\w\.-]*)+)/,l=/(?:(?:\~|\.)(?:(?:\\|\/)[\w\.-]*)+)/,r=new RegExp(`(${s.source}|${l.source})`),p=/((?:\~|\.)?(?:\/[\w\.-]*)+)/,u=/(?:\:([\d]+))?(?:\:([\d]+))?/,a=new RegExp(`${_.isWindows?r.source:p.source}${u.source}`,"g"),n=2e3;let h=class{constructor(d,m,b,E,y,T){this.editorService=d,this.fileService=m,this.openerService=b,this.pathService=E,this.tunnelService=y,this.environmentService=T}linkify(d,m,b){if(m){const y=d.split(` `);for(let O=0;O<y.length-1;O++)y[O]=y[O]+` `;y[y.length-1]||y.pop();const T=y.map(O=>this.linkify(O,!1,b));if(T.length===1)return T[0];const R=document.createElement("span");return T.forEach(O=>R.appendChild(O)),R}const E=document.createElement("span");for(const y of this.detectLinks(d))try{switch(y.kind){case"text":E.appendChild(document.createTextNode(y.value));break;case"web":E.appendChild(this.createWebLink(y.value));break;case"path":{const T=y.captures[0],R=y.captures[1]?Number(y.captures[1]):0,O=y.captures[2]?Number(y.captures[2]):0;E.appendChild(this.createPathLink(y.value,T,R,O,b));break}}}catch{E.appendChild(document.createTextNode(y.value))}return E}createWebLink(d){const m=this.createLink(d),b=A.URI.parse(d);return this.decorateLink(m,b,async()=>{if(b.scheme===t.Schemas.file){const E=b.fsPath,y=await this.pathService.path,T=f.normalize(y.sep===f.posix.sep&&_.isWindows?E.replace(/\\/g,f.posix.sep):E),R=A.URI.parse(T);if(!await this.fileService.exists(R))return;await this.editorService.openEditor({resource:R,options:{pinned:!0}});return}this.openerService.open(d,{allowTunneling:!!this.environmentService.remoteAuthority})}),m}createPathLink(d,m,b,E,y){if(m[0]==="/"&&m[1]==="/")return document.createTextNode(d);const T={selection:{startLineNumber:b,startColumn:E}};if(m[0]==="."){if(!y)return document.createTextNode(d);const x=y.toResource(m),F=this.createLink(d);return this.decorateLink(F,x,L=>this.editorService.openEditor({resource:x,options:{...T,preserveFocus:L}})),F}if(m[0]==="~"){const x=this.pathService.resolvedUserHome;x&&(m=f.join(x.fsPath,m.substring(1)))}const R=this.createLink(d);R.tabIndex=0;const O=A.URI.file(f.normalize(m));return this.fileService.stat(O).then(x=>{x.isDirectory||this.decorateLink(R,O,F=>this.editorService.openEditor({resource:O,options:{...T,preserveFocus:F}}))}).catch(()=>{}),R}createLink(d){const m=document.createElement("a");return m.textContent=d,m}decorateLink(d,m,b){d.classList.add("link");const E=this.tunnelService.canTunnel(m)?(0,o.localize)(0,null):(0,o.localize)(1,null);d.title=_.isMacintosh?(0,o.localize)(2,null,E):(0,o.localize)(3,null,E),d.onmousemove=y=>{d.classList.toggle("pointer",_.isMacintosh?y.metaKey:y.ctrlKey)},d.onmouseleave=()=>d.classList.remove("pointer"),d.onclick=y=>{const T=window.getSelection();!T||T.type==="Range"||!(_.isMacintosh?y.metaKey:y.ctrlKey)||(y.preventDefault(),y.stopImmediatePropagation(),b(!1))},d.onkeydown=y=>{const T=new C.StandardKeyboardEvent(y);(T.keyCode===3||T.keyCode===10)&&(T.preventDefault(),T.stopPropagation(),b(T.keyCode===10))}}detectLinks(d){if(d.length>n)return[{kind:"text",value:d,captures:[]}];const m=[S,a],b=["web","path"],E=[],y=(T,R)=>{if(R>=m.length){E.push({value:T,kind:"text",captures:[]});return}const O=m[R];let x=0,F;for(O.lastIndex=0;(F=O.exec(T))!==null;){const M=T.substring(x,F.index);M&&y(M,R+1);const N=F[0];E.push({value:N,kind:b[R],captures:F.slice(1)}),x=F.index+N.length}const L=T.substring(x);L&&y(L,R+1)};return y(d,0),E}};h=Ee([W(0,I.IEditorService),W(1,k.IFileService),W(2,D.IOpenerService),W(3,v.IPathService),W(4,c.ITunnelService),W(5,w.IWorkbenchEnvironmentService)],h),e.LinkDetector=h}),define(ne[2525],re([1,0,1513,10,477,90,11,12,32,5,428,78,36,63,1084]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExceptionWidget=e.debugExceptionWidgetBackground=e.debugExceptionWidgetBorder=void 0;const i=f.$;e.debugExceptionWidgetBorder=(0,I.registerColor)("debugExceptionWidget.border",{dark:"#a31515",light:"#a31515",hcDark:"#a31515",hcLight:"#a31515"},t.localize(0,null)),e.debugExceptionWidgetBackground=(0,I.registerColor)("debugExceptionWidget.background",{dark:"#420b0d",light:"#f1dfde",hcDark:"#420b0d",hcLight:"#f1dfde"},t.localize(1,null));let S=class extends _.ZoneWidget{constructor(l,r,p,u,a){super(l,{showFrame:!0,showArrow:!0,isAccessible:!0,frameWidth:1,className:"exception-widget-container"});this.exceptionInfo=r,this.debugSession=p,this.instantiationService=a,this.applyTheme(u.getColorTheme()),this._disposables.add(u.onDidColorThemeChange(this.applyTheme.bind(this))),this.create();const n=new k.RunOnceScheduler(()=>this._doLayout(void 0,void 0),50);this._disposables.add(this.editor.onDidLayoutChange(()=>n.schedule())),this._disposables.add(n)}applyTheme(l){this.backgroundColor=l.getColor(e.debugExceptionWidgetBackground);const r=l.getColor(e.debugExceptionWidgetBorder);this.style({arrowColor:r,frameColor:r})}_applyStyles(){this.container&&(this.container.style.backgroundColor=this.backgroundColor?this.backgroundColor.toString():""),super._applyStyles()}_fillContainer(l){this.setCssClass("exception-widget");const r=this.editor.getOption(44);l.style.fontSize=`${r.fontSize}px`,l.style.lineHeight=`${r.lineHeight}px`,l.tabIndex=0;const p=i(".title"),u=i(".label");f.append(p,u);const a=i(".actions");f.append(p,a),u.textContent=this.exceptionInfo.id?t.localize(2,null,this.exceptionInfo.id):t.localize(3,null);let n=u.textContent;if(new C.ActionBar(a).push(new o.Action("editor.closeExceptionWidget",t.localize(4,null),D.ThemeIcon.asClassName(c.widgetClose),!0,async()=>{this.editor.getContribution(A.EDITOR_CONTRIBUTION_ID)?.closeExceptionWidget()}),{label:!1,icon:!0}),f.append(l,p),this.exceptionInfo.description){const g=i(".description");g.textContent=this.exceptionInfo.description,n+=", "+this.exceptionInfo.description,f.append(l,g)}if(this.exceptionInfo.details&&this.exceptionInfo.details.stackTrace){const g=i(".stack-trace"),m=this.instantiationService.createInstance(v.LinkDetector).linkify(this.exceptionInfo.details.stackTrace,!0,this.debugSession?this.debugSession.root:void 0);g.appendChild(m),f.append(l,g),n+=", "+this.exceptionInfo.details.stackTrace}l.setAttribute("aria-label",n)}_doLayout(l,r){this.container.style.height="initial";const p=this.editor.getOption(59),u=Math.round(p/3),a=Math.ceil((this.container.offsetHeight+u)/p);this._relayout(a)}focus(){this.container?.focus()}hasFocus(){return f.isAncestor(document.activeElement,this.container)}};S=Ee([W(3,D.IThemeService),W(4,w.IInstantiationService)],S),e.ExceptionWidget=S}),define(ne[2526],re([1,0,822,120,31,6,177,5,34,218,18,246,50,46,109,2,13,2222,101,325,2005,1766,239,14,8,105,555,2001]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalProcessManager=void 0;const E=500,y=1e3;var T;(function(L){L[L.Process=0]="Process",L[L.PsuedoTerminal=1]="PsuedoTerminal"})(T||(T={}));let R=class extends S.Disposable{constructor(M,N,B,P,V,z,U,H,K,G,q,Z,j,X,Y,$){super();this._instanceId=M,this._configHelper=N,this._historyService=P,this._instantiationService=V,this._logService=z,this._workspaceContextService=U,this._configurationResolverService=H,this._workbenchEnvironmentService=K,this._productService=G,this._remoteAgentService=q,this._pathService=Z,this._environmentVariableService=j,this._terminalProfileResolverService=X,this._configurationService=Y,this._terminalInstanceService=$,this.processState=1,this.isDisconnected=!1,this.capabilities=new m.TerminalCapabilityStore,this._isDisposed=!1,this._process=null,this._processType=T.Process,this._preLaunchInputQueue=[],this._latency=-1,this._latencyLastMeasured=0,this._hasWrittenData=!1,this._hasChildProcesses=!1,this._ptyListenersAttached=!1,this._dimensions={cols:0,rows:0},this._isScreenReaderModeEnabled=!1,this._onPtyDisconnect=this._register(new A.Emitter),this.onPtyDisconnect=this._onPtyDisconnect.event,this._onPtyReconnect=this._register(new A.Emitter),this.onPtyReconnect=this._onPtyReconnect.event,this._onProcessReady=this._register(new A.Emitter),this.onProcessReady=this._onProcessReady.event,this._onProcessStateChange=this._register(new A.Emitter),this.onProcessStateChange=this._onProcessStateChange.event,this._onBeforeProcessData=this._register(new A.Emitter),this.onBeforeProcessData=this._onBeforeProcessData.event,this._onProcessData=this._register(new A.Emitter),this.onProcessData=this._onProcessData.event,this._onDidChangeProperty=this._register(new A.Emitter),this.onDidChangeProperty=this._onDidChangeProperty.event,this._onEnvironmentVariableInfoChange=this._register(new A.Emitter),this.onEnvironmentVariableInfoChanged=this._onEnvironmentVariableInfoChange.event,this._onProcessExit=this._register(new A.Emitter),this.onProcessExit=this._onProcessExit.event,this._onRestoreCommands=this._register(new A.Emitter),this.onRestoreCommands=this._onRestoreCommands.event,this.ptyProcessReady=this._createPtyProcessReadyPromise(),this.getLatency(),this._ackDataBufferer=new O(J=>this._process?.acknowledgeDataEvent(J)),this._dataFilter=this._instantiationService.createInstance(F),this._dataFilter.onProcessData(J=>{const te={data:typeof J=="string"?J:J.data};this._onBeforeProcessData.fire(te),te.data&&te.data.length>0&&(typeof J!="string"&&(J.data=te.data),this._onProcessData.fire(typeof J!="string"?J:{data:te.data,trackCommit:!1}))}),B&&typeof B=="object"?this.remoteAuthority=(0,C.getRemoteAuthority)(B):this.remoteAuthority=this._workbenchEnvironmentService.remoteAuthority}get persistentProcessId(){return this._process?.id}get shouldPersist(){return this._process?this._process.shouldPersist:!1}get hasWrittenData(){return this._hasWrittenData}get hasChildProcesses(){return this._hasChildProcesses}dispose(M=!1){this._isDisposed=!0,this._process&&(this._setProcessState(5),this._process.shutdown(M),this._process=null),super.dispose()}_createPtyProcessReadyPromise(){return new Promise(M=>{const N=this.onProcessReady(()=>{this._logService.debug(`Terminal process ready (shellProcessId: ${this.shellProcessId})`),N.dispose(),M(void 0)})})}async detachFromProcess(){await this._process?.detach?.(),this._process=null}async createProcess(M,N,B,P,V=!0){this._shellLaunchConfig=M,this._dimensions.cols=N,this._dimensions.rows=B,this._isScreenReaderModeEnabled=P;let z;if(M.customPtyImplementation)this._processType=T.PsuedoTerminal,z=M.customPtyImplementation(this._instanceId,N,B);else{const H=this._terminalInstanceService.getBackend(this.remoteAuthority);if(!H)throw new Error(`No terminal backend registered for remote authority '${this.remoteAuthority}'`);this.backend=H;const K=this._historyService.getLastActiveWorkspaceRoot(),G=K?(0,s.withNullAsUndefined)(this._workspaceContextService.getWorkspaceFolder(K)):void 0,q=t.createVariableResolver(G,await this._terminalProfileResolverService.getEnvironment(this.remoteAuthority),this._configurationResolverService);if(this.userHome=this._pathService.resolvedUserHome?.fsPath,this.os=h.OS,this.remoteAuthority){const Z=await this._pathService.userHome();this.userHome=Z.path;const j=await this._remoteAgentService.getEnvironment();if(!j)throw new Error(`Failed to get remote environment for remote authority "${this.remoteAuthority}"`);this.userHome=j.userHome.path,this.os=j.os;const X=await this._resolveEnvironment(H,q,M),Y=!M.isFeatureTerminal&&this._configHelper.config.enablePersistentSessions&&!M.isTransient;if(M.attachPersistentProcess){const $=await H.attachToProcess(M.attachPersistentProcess.id);if($)z=$;else{this._logService.trace(`Attach to process failed for terminal ${M.attachPersistentProcess}`);return}}else{await this._terminalProfileResolverService.resolveShellLaunchConfig(M,{remoteAuthority:this.remoteAuthority,os:this.os});const $={shellIntegration:{enabled:this._configurationService.getValue("terminal.integrated.shellIntegration.enabled"),showWelcome:this._configurationService.getValue("terminal.integrated.shellIntegration.showWelcome")},windowsEnableConpty:this._configHelper.config.windowsEnableConpty&&!P};try{z=await H.createProcess(M,"",N,B,this._configHelper.config.unicodeVersion,X,$,Y)}catch(J){if(J?.message==="Could not fetch remote environment"){this._logService.trace("Could not fetch remote environment, silently failing");return}throw J}}this._isDisposed||this._setupPtyHostListeners(H)}else{if(M.attachPersistentProcess){const Z=await H.attachToProcess(M.attachPersistentProcess.id);if(Z)z=Z;else{this._logService.trace(`Attach to process failed for terminal ${M.attachPersistentProcess}`);return}}else z=await this._launchLocalProcess(H,M,N,B,this.userHome,P,q);this._isDisposed||this._setupPtyHostListeners(H)}}if(this._isDisposed){z.shutdown(!1);return}this._process=z,this._setProcessState(2),(this.os===3||this.os===2)&&this.capabilities.add(1,new b.NaiveCwdDetectionCapability(this._process)),this._dataFilter.newProcess(this._process,V),this._processListeners&&(0,S.dispose)(this._processListeners),this._processListeners=[z.onProcessReady(H=>{this.shellProcessId=H.pid,this._initialCwd=H.cwd,this._onDidChangeProperty.fire({type:"initialCwd",value:this._initialCwd}),this._onProcessReady.fire(H),this._preLaunchInputQueue.length>0&&this._process&&(z.input(this._preLaunchInputQueue.join("")),this._preLaunchInputQueue.length=0)}),z.onProcessExit(H=>this._onExit(H)),z.onDidChangeProperty(({type:H,value:K})=>{switch(H){case"hasChildProcesses":this._hasChildProcesses=K;break}this._onDidChangeProperty.fire({type:H,value:K})})],z.onRestoreCommands&&this._processListeners.push(z.onRestoreCommands(H=>{this._onRestoreCommands.fire(H)})),setTimeout(()=>{this.processState===2&&this._setProcessState(3)},E);const U=await z.start();if(U)return U}async relaunch(M,N,B,P,V){return this.ptyProcessReady=this._createPtyProcessReadyPromise(),this._logService.trace(`Relaunching terminal instance ${this._instanceId}`),this.isDisconnected&&(this.isDisconnected=!1,this._onPtyReconnect.fire()),this._hasWrittenData=!1,this.createProcess(M,N,B,P,V)}async _resolveEnvironment(M,N,B){const P=h.isWindows?"windows":h.isMacintosh?"osx":"linux",V=this._configurationService.getValue(`terminal.integrated.env.${P}`);this._configHelper.showRecommendations(B);let z;B.useShellEnvironment?z=await M.getShellEnvironment():z=await this._terminalProfileResolverService.getEnvironment(this.remoteAuthority);const U=t.createTerminalEnvironment(B,V,N,this._productService.version,this._configHelper.config.detectLocale,z);return!this._isDisposed&&!B.strictEnv&&!B.hideFromUser&&(this._extEnvironmentVariableCollection=this._environmentVariableService.mergedCollection,this._register(this._environmentVariableService.onDidChangeCollections(H=>this._onEnvironmentVariableCollectionChange(H))),this._extEnvironmentVariableCollection.applyToProcessEnvironment(U,N),this._extEnvironmentVariableCollection.map.size>0&&(this.environmentVariableInfo=new l.EnvironmentVariableInfoChangesActive(this._extEnvironmentVariableCollection),this._onEnvironmentVariableInfoChange.fire(this.environmentVariableInfo))),U}async _launchLocalProcess(M,N,B,P,V,z,U){await this._terminalProfileResolverService.resolveShellLaunchConfig(N,{remoteAuthority:void 0,os:h.OS});const H=this._historyService.getLastActiveWorkspaceRoot(v.Schemas.file),K=t.getCwd(N,V,U,H,this._configHelper.config.cwd,this._logService),G=await this._resolveEnvironment(M,U,N),q={shellIntegration:{enabled:this._configurationService.getValue("terminal.integrated.shellIntegration.enabled"),showWelcome:this._configurationService.getValue("terminal.integrated.shellIntegration.showWelcome")},windowsEnableConpty:this._configHelper.config.windowsEnableConpty&&!z},Z=this._configHelper.config.enablePersistentSessions&&!N.isFeatureTerminal;return await M.createProcess(N,K,B,P,this._configHelper.config.unicodeVersion,G,q,Z)}_setupPtyHostListeners(M){this._ptyListenersAttached||(this._ptyListenersAttached=!0,this._register(M.onPtyHostUnresponsive(()=>{this.isDisconnected=!0,this._onPtyDisconnect.fire()})),this._ptyResponsiveListener=M.onPtyHostResponsive(()=>{this.isDisconnected=!1,this._onPtyReconnect.fire()}),this._register((0,S.toDisposable)(()=>this._ptyResponsiveListener?.dispose())),this._register(M.onPtyHostRestart(async()=>{if(this.isDisconnected||(this.isDisconnected=!0,this._onPtyDisconnect.fire()),this._ptyResponsiveListener?.dispose(),this._ptyResponsiveListener=void 0,this._shellLaunchConfig)if(this._shellLaunchConfig.isFeatureTerminal)this._onExit(-1);else{const N=(0,a.localize)(0,null);this._onProcessData.fire({data:(0,n.formatMessageForTerminal)(N),trackCommit:!1}),await this.relaunch(this._shellLaunchConfig,this._dimensions.cols,this._dimensions.rows,this._isScreenReaderModeEnabled,!1)}})))}async getBackendOS(){let M=h.OS;if(this.remoteAuthority){const N=await this._remoteAgentService.getEnvironment();if(!N)throw new Error(`Failed to get remote environment for remote authority "${this.remoteAuthority}"`);M=N.os}return M}setDimensions(M,N,B){if(B){this._resize(M,N);return}return this.ptyProcessReady.then(()=>this._resize(M,N))}async setUnicodeVersion(M){return this._process?.setUnicodeVersion(M)}_resize(M,N){if(!!this._process){try{this._process.resize(M,N)}catch(B){if(B.code!=="EPIPE"&&B.code!=="ERR_IPC_CHANNEL_CLOSED")throw B}this._dimensions.cols=M,this._dimensions.rows=N}}async write(M){await this.ptyProcessReady,this._dataFilter.disableSeamlessRelaunch(),this._hasWrittenData=!0,this.shellProcessId||this._processType===T.PsuedoTerminal?this._process&&this._process.input(M):this._preLaunchInputQueue.push(M)}async processBinary(M){await this.ptyProcessReady,this._dataFilter.disableSeamlessRelaunch(),this._hasWrittenData=!0,this._process?.processBinary(M)}getInitialCwd(){return Promise.resolve(this._initialCwd?this._initialCwd:"")}async getLatency(){if(await this.ptyProcessReady,!this._process)return Promise.resolve(0);if(this._latencyLastMeasured===0||this._latencyLastMeasured+y<Date.now()){const M=this._process.getLatency();this._latency=await M,this._latencyLastMeasured=Date.now()}return Promise.resolve(this._latency)}async refreshProperty(M){if(!this._process)throw new Error("Cannot refresh property when process is not set");return this._process.refreshProperty(M)}async updateProperty(M,N){return this._process?.updateProperty(M,N)}acknowledgeDataEvent(M){this._ackDataBufferer.ack(M)}_onExit(M){this._process=null,this.processState===2&&this._setProcessState(4),this.processState===3&&this._setProcessState(6),this._onProcessExit.fire(M)}_setProcessState(M){this.processState=M,this._onProcessStateChange.fire()}_onEnvironmentVariableCollectionChange(M){const N=this._extEnvironmentVariableCollection.diff(M);N!==void 0&&(this.environmentVariableInfo=this._instantiationService.createInstance(l.EnvironmentVariableInfoStale,N,this._instanceId),this._onEnvironmentVariableInfoChange.fire(this.environmentVariableInfo))}};R=Ee([W(3,k.IHistoryService),W(4,D.IInstantiationService),W(5,_.ILogService),W(6,I.IWorkspaceContextService),W(7,w.IConfigurationResolverService),W(8,o.IWorkbenchEnvironmentService),W(9,c.IProductService),W(10,i.IRemoteAgentService),W(11,r.IPathService),W(12,p.IEnvironmentVariableService),W(13,f.ITerminalProfileResolverService),W(14,g.IConfigurationService),W(15,d.ITerminalInstanceService)],R),e.TerminalProcessManager=R;class O{constructor(M){this._callback=M,this._unsentCharCount=0}ack(M){for(this._unsentCharCount+=M;this._unsentCharCount>5e3;)this._unsentCharCount-=5e3,this._callback(5e3)}}var x;(function(L){L[L.RecordTerminalDuration=1e4]="RecordTerminalDuration",L[L.SwapWaitMaximumDuration=3e3]="SwapWaitMaximumDuration"})(x||(x={}));let F=class extends S.Disposable{constructor(M){super();this._logService=M,this._disableSeamlessRelaunch=!1,this._onProcessData=this._register(new A.Emitter)}get onProcessData(){return this._onProcessData.event}newProcess(M,N){if(this._dataListener?.dispose(),this._activeProcess?.shutdown(!1),this._activeProcess=M,!this._firstRecorder||!N||this._disableSeamlessRelaunch){this._firstDisposable?.dispose(),[this._firstRecorder,this._firstDisposable]=this._createRecorder(M),this._disableSeamlessRelaunch&&N&&this._onProcessData.fire("c"),this._dataListener=M.onProcessData(P=>this._onProcessData.fire(P)),this._disableSeamlessRelaunch=!1;return}this._secondRecorder&&this.triggerSwap(),this._swapTimeout=window.setTimeout(()=>this.triggerSwap(),3e3),this._dataListener?.dispose(),this._firstDisposable?.dispose();const B=this._createRecorder(M);[this._secondRecorder,this._secondDisposable]=B}disableSeamlessRelaunch(){this._disableSeamlessRelaunch=!0,this._stopRecording(),this.triggerSwap()}triggerSwap(){if(this._swapTimeout&&(window.clearTimeout(this._swapTimeout),this._swapTimeout=void 0),!this._firstRecorder)return;if(!this._secondRecorder){this._firstRecorder=void 0,this._firstDisposable?.dispose();return}const M=this._getDataFromRecorder(this._firstRecorder),N=this._getDataFromRecorder(this._secondRecorder);M===N?this._logService.trace("Seamless terminal relaunch - identical content"):(this._logService.trace("Seamless terminal relaunch - resetting content"),this._onProcessData.fire({data:`c${N}`,trackCommit:!1})),this._dataListener?.dispose(),this._dataListener=this._activeProcess.onProcessData(B=>this._onProcessData.fire(B)),this._firstRecorder=this._secondRecorder,this._firstDisposable?.dispose(),this._firstDisposable=this._secondDisposable,this._secondRecorder=void 0}_stopRecording(){this._swapTimeout||(this._firstRecorder=void 0,this._firstDisposable?.dispose(),this._secondRecorder=void 0,this._secondDisposable?.dispose())}_createRecorder(M){const N=new u.TerminalRecorder(0,0),B=M.onProcessData(P=>N.handleData(typeof P=="string"?P:P.data));return[N,B]}_getDataFromRecorder(M){return M.generateReplayEventSync().events.filter(N=>!!N.data).map(N=>N.data).join("")}};F=Ee([W(0,_.ILogService)],F)}),define(ne[2527],re([1,0,1855,13,18,44,143,8,28,34,21,841,106,53,45,101]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationResolverService=e.BaseConfigurationResolverService=void 0;class s extends C.AbstractVariableResolverService{constructor(p,u,a,n,h,g,d,m,b){super({getFolderUri:E=>{const y=g.getWorkspace().folders.filter(T=>T.name===E).pop();return y?y.uri:void 0},getWorkspaceFolderCount:()=>g.getWorkspace().folders.length,getConfigurationValue:(E,y)=>n.getValue(y,E?{resource:E}:{}),getAppRoot:()=>p.getAppRoot(),getExecPath:()=>p.getExecPath(),getFilePath:()=>{const E=A.EditorResourceAccessor.getOriginalUri(a.activeEditor,{supportSideBySide:A.SideBySideEditor.PRIMARY,filterByScheme:[_.Schemas.file,_.Schemas.vscodeUserData,this.pathService.defaultUriScheme]});if(!!E)return this.labelService.getUriLabel(E,{noPrefix:!0})},getWorkspaceFolderPathForFile:()=>{const E=A.EditorResourceAccessor.getOriginalUri(a.activeEditor,{supportSideBySide:A.SideBySideEditor.PRIMARY,filterByScheme:[_.Schemas.file,_.Schemas.vscodeUserData,this.pathService.defaultUriScheme]});if(!E)return;const y=g.getWorkspaceFolder(E);if(!!y)return this.labelService.getUriLabel(y.uri,{noPrefix:!0})},getSelectedText:()=>{const E=a.activeTextEditorControl;let y=null;if((0,o.isCodeEditor)(E))y=E;else if((0,o.isDiffEditor)(E)){const O=E.getOriginalEditor(),x=E.getModifiedEditor();y=O.hasWidgetFocus()?O:x}const T=y?.getModel(),R=y?.getSelection();if(T&&R)return T.getValueInRange(R)},getLineNumber:()=>{const E=a.activeTextEditorControl;if((0,o.isCodeEditor)(E)){const y=E.getSelection();if(y){const T=y.positionLineNumber;return String(T)}}}},m,b.userHome().then(E=>E.path),u);this.configurationService=n,this.commandService=h,this.workspaceContextService=g,this.quickInputService=d,this.labelService=m,this.pathService=b}async resolveWithInteractionReplace(p,u,a,n,h){return u=await this.resolveAnyAsync(p,u),this.resolveWithInteraction(p,u,a,n,h).then(g=>g?g.size>0?this.resolveAnyAsync(p,u,(0,k.fromMap)(g)):u:null)}async resolveWithInteraction(p,u,a,n,h){const g=await this.resolveAnyMap(p,u);u=g.newConfig;const d=g.resolvedVariables;return this.resolveWithInputAndCommands(p,u,n,a,h).then(m=>{if(this.updateMapping(m,d))return d})}updateMapping(p,u){return p?((0,k.forEach)(p,a=>{u.set(a.key,a.value)}),!0):!1}async resolveWithInputAndCommands(p,u,a,n,h){if(!u)return Promise.resolve(void 0);let g=[];if(this.workspaceContextService.getWorkbenchState()!==1&&n){const b=p?{resource:p.uri}:{};let E=this.configurationService.inspect(n,b);if(E&&(E.userValue||E.workspaceValue||E.workspaceFolderValue))switch(h){case 1:g=E.userValue?.inputs;break;case 4:g=E.workspaceValue?.inputs;break;default:g=E.workspaceFolderValue?.inputs}else{const y=this.configurationService.getValue(n,b);y&&(g=y.inputs)}}const d=[];this.findVariables(u,d);const m=Object.create(null);for(const b of d){const[E,y]=b.split(":",2);let T;switch(E){case"input":T=await this.showUserInput(y,g);break;case"command":{const R=(a?a[y]:void 0)||y;if(T=await this.commandService.executeCommand(R,u),typeof T!="string"&&!f.isUndefinedOrNull(T))throw new Error(t.localize(0,null,R));break}default:this._contributedVariables.has(b)&&(T=await this._contributedVariables.get(b)())}if(typeof T=="string")m[b]=T;else return}return m}findVariables(p,u){if(typeof p=="string"){let a;for(;(a=s.INPUT_OR_COMMAND_VARIABLES_PATTERN.exec(p))!==null;)if(a.length===4){const n=a[1];u.indexOf(n)<0&&u.push(n)}this._contributedVariables.forEach((n,h)=>{u.indexOf(h)<0&&p.indexOf("${"+h+"}")>=0&&u.push(h)})}else f.isArray(p)?p.forEach(a=>{this.findVariables(a,u)}):p&&Object.keys(p).forEach(a=>{const n=p[a];this.findVariables(n,u)})}showUserInput(p,u){if(!u)return Promise.reject(new Error(t.localize(1,null,p,"input")));const a=u.filter(n=>n.id===p).pop();if(a){const n=h=>{throw new Error(t.localize(2,null,p,a.type,h))};switch(a.type){case"promptString":{f.isString(a.description)||n("description");const h={prompt:a.description,ignoreFocusLost:!0};return a.default&&(h.value=a.default),a.password&&(h.password=a.password),this.quickInputService.input(h).then(g=>g)}case"pickString":{f.isString(a.description)||n("description"),f.isArray(a.options)?a.options.forEach(d=>{!f.isString(d)&&!f.isString(d.value)&&n("value")}):n("options");const h=new Array;a.options.forEach(d=>{const m=f.isString(d)?d:d.value,b=f.isString(d)?void 0:d.label,E={label:b?`${b}: ${m}`:m,value:m};m===a.default?(E.description=t.localize(3,null),h.unshift(E)):h.push(E)});const g={placeHolder:a.description,matchOnDetail:!0,ignoreFocusLost:!0};return this.quickInputService.pick(h,g,void 0).then(d=>{if(d)return d.value})}case"command":return f.isString(a.command)||n("command"),this.commandService.executeCommand(a.command,a.args).then(h=>{if(typeof h=="string"||f.isUndefinedOrNull(h))return h;throw new Error(t.localize(4,null,p,a.command))});default:throw new Error(t.localize(5,null,p))}}return Promise.reject(new Error(t.localize(6,null,p)))}}e.BaseConfigurationResolverService=s,s.INPUT_OR_COMMAND_VARIABLES_PATTERN=/\${((input|command):(.*?))}/g;let l=class extends s{constructor(p,u,a,n,h,g,d){super({getAppRoot:()=>{},getExecPath:()=>{}},Promise.resolve(Object.create(null)),p,u,a,n,h,g,d)}};l=Ee([W(0,v.IEditorService),W(1,D.IConfigurationService),W(2,I.ICommandService),W(3,w.IWorkspaceContextService),W(4,c.IQuickInputService),W(5,i.ILabelService),W(6,S.IPathService)],l),e.ConfigurationResolverService=l}),define(ne[2528],re([1,0,121,8,28,34,21,53,218,35,2527,45,499,101]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationResolverService=void 0;let i=class extends v.BaseConfigurationResolverService{constructor(s,l,r,p,u,a,n,h,g){super({getAppRoot:()=>l.appRoot,getExecPath:()=>l.execPath},h.getShellEnv(),s,r,p,u,a,n,g)}};i=Ee([W(0,k.IEditorService),W(1,t.INativeWorkbenchEnvironmentService),W(2,f.IConfigurationService),W(3,_.ICommandService),W(4,A.IWorkspaceContextService),W(5,D.IQuickInputService),W(6,C.ILabelService),W(7,o.IShellEnvironmentService),W(8,c.IPathService)],i),e.ConfigurationResolverService=i,(0,w.registerSingleton)(I.IConfigurationResolverService,i,!0)}),define(ne[894],re([1,0,1861,19,51,23,53,9,14,54,45,34,26,52,42,198,18,50,109,7,29,38,157,6,2,11,21,111,101,98]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleFileDialog=e.RemoteFileDialogContext=e.OpenLocalFileFolderCommand=e.OpenLocalFolderCommand=e.SaveLocalFileCommand=e.OpenLocalFileCommand=void 0;var T;(function(M){M.ID="workbench.action.files.openLocalFile",M.LABEL=t.localize(0,null);function N(){return B=>B.get(w.IFileDialogService).pickFileAndOpen({forceNewWindow:!1,availableFileSystems:[s.Schemas.file]})}M.handler=N})(T=e.OpenLocalFileCommand||(e.OpenLocalFileCommand={}));var R;(function(M){M.ID="workbench.action.files.saveLocalFile",M.LABEL=t.localize(1,null);function N(){return B=>{const P=B.get(m.IEditorService),V=P.activeEditorPane;return V?P.save({groupId:V.group.id,editor:V.input},{saveAs:!0,availableFileSystems:[s.Schemas.file],reason:1}):Promise.resolve(void 0)}}M.handler=N})(R=e.SaveLocalFileCommand||(e.SaveLocalFileCommand={}));var O;(function(M){M.ID="workbench.action.files.openLocalFolder",M.LABEL=t.localize(2,null);function N(){return B=>B.get(w.IFileDialogService).pickFolderAndOpen({forceNewWindow:!1,availableFileSystems:[s.Schemas.file]})}M.handler=N})(O=e.OpenLocalFolderCommand||(e.OpenLocalFolderCommand={}));var x;(function(M){M.ID="workbench.action.files.openLocalFileFolder",M.LABEL=t.localize(3,null);function N(){return B=>B.get(w.IFileDialogService).pickFileFolderAndOpen({forceNewWindow:!1,availableFileSystems:[s.Schemas.file]})}M.handler=N})(x=e.OpenLocalFileFolderCommand||(e.OpenLocalFileFolderCommand={}));var F;(function(M){M[M.Updated=0]="Updated",M[M.UpdatedWithTrailing=1]="UpdatedWithTrailing",M[M.Updating=2]="Updating",M[M.NotUpdated=3]="NotUpdated",M[M.InvalidPath=4]="InvalidPath"})(F||(F={})),e.RemoteFileDialogContext=new p.RawContextKey("remoteFileDialogVisible",!1);let L=class{constructor(N,B,P,V,z,U,H,K,G,q,Z,j,X,Y){this.fileService=N,this.quickInputService=B,this.labelService=P,this.workspaceContextService=V,this.notificationService=z,this.fileDialogService=U,this.modelService=H,this.languageService=K,this.environmentService=G,this.remoteAgentService=q,this.pathService=Z,this.keybindingService=j,this.accessibilityService=Y,this.hidden=!1,this.allowFileSelection=!0,this.allowFolderSelection=!1,this.requiresTrailing=!1,this.userEnteredPathSegment="",this.autoCompletePathSegment="",this.isWindows=!1,this.separator="/",this.onBusyChangeEmitter=new h.Emitter,this.disposables=[this.onBusyChangeEmitter],this.remoteAuthority=this.environmentService.remoteAuthority,this.contextKey=e.RemoteFileDialogContext.bindTo(X),this.scheme=this.pathService.defaultUriScheme}set busy(N){this.filePickBox.busy!==N&&(this.filePickBox.busy=N,this.onBusyChangeEmitter.fire(N))}get busy(){return this.filePickBox.busy}async showOpenDialog(N={}){this.scheme=this.getScheme(N.availableFileSystems,N.defaultUri),this.userHome=await this.getUserHome();const B=this.getOptions(N);return B?(this.options=B,this.pickResource()):Promise.resolve(void 0)}async showSaveDialog(N){this.scheme=this.getScheme(N.availableFileSystems,N.defaultUri),this.userHome=await this.getUserHome(),this.requiresTrailing=!0;const B=this.getOptions(N,!0);return B?(this.options=B,this.options.canSelectFolders=!0,this.options.canSelectFiles=!0,new Promise(P=>{this.pickResource(!0).then(V=>{P(V)})})):Promise.resolve(void 0)}getOptions(N,B=!1){let P,V;if(N.defaultUri&&(P=this.scheme===N.defaultUri.scheme?N.defaultUri:void 0,V=B?f.basename(N.defaultUri):void 0),P||(P=this.userHome,V&&(P=f.joinPath(P,V))),this.scheme!==s.Schemas.file&&!this.fileService.hasProvider(P)){this.notificationService.info(t.localize(4,null,P.toString()));return}const z=_.deepClone(N);return z.defaultUri=P,z}remoteUriFrom(N,B){N.startsWith("\\\\")||(N=N.replace(/\\/g,"/"));const P=this.scheme===s.Schemas.file?D.URI.file(N):D.URI.from({scheme:this.scheme,path:N,query:B?.query,fragment:B?.fragment}),V=P.scheme===s.Schemas.file?void 0:this.remoteAuthority??B?.authority;return f.toLocalResource(P,V,V?this.pathService.defaultUriScheme:P.scheme)}getScheme(N,B){return N&&N.length>0?B&&N.indexOf(B.scheme)>=0?B.scheme:N[0]:B?B.scheme:s.Schemas.file}async getRemoteAgentEnvironment(){return this.remoteAgentEnvironment===void 0&&(this.remoteAgentEnvironment=await this.remoteAgentService.getEnvironment()),this.remoteAgentEnvironment}getUserHome(){return this.pathService.userHome({preferLocal:this.scheme===s.Schemas.file})}async pickResource(N=!1){this.allowFolderSelection=!!this.options.canSelectFolders,this.allowFileSelection=!!this.options.canSelectFiles,this.separator=this.labelService.getSeparator(this.scheme,this.remoteAuthority),this.hidden=!1,this.isWindows=await this.checkIsWindowsOS();let B=this.options.defaultUri?this.options.defaultUri:this.workspaceContextService.getWorkspace().folders[0].uri,P,V=f.extname(B);if(this.options.defaultUri){try{P=await this.fileService.stat(this.options.defaultUri)}catch{}(!P||!P.isDirectory)&&(B=f.dirname(this.options.defaultUri),this.trailing=f.basename(this.options.defaultUri))}return new Promise(z=>{if(this.filePickBox=this.quickInputService.createQuickPick(),this.busy=!0,this.filePickBox.matchOnLabel=!1,this.filePickBox.sortByLabel=!1,this.filePickBox.autoFocusOnList=!1,this.filePickBox.ignoreFocusOut=!0,this.filePickBox.ok=!0,this.scheme!==s.Schemas.file&&this.options&&this.options.availableFileSystems&&this.options.availableFileSystems.length>1&&this.options.availableFileSystems.indexOf(s.Schemas.file)>-1){this.filePickBox.customButton=!0,this.filePickBox.customLabel=t.localize(5,null);let q;N?q=R:q=this.allowFileSelection?this.allowFolderSelection?x:T:O;const Z=this.keybindingService.lookupKeybinding(q.ID);if(Z){const j=Z.getLabel();j&&(this.filePickBox.customHover=(0,u.format)("{0} ({1})",q.LABEL,j))}}let U=0,H=!1;this.currentFolder=f.dirname(B),this.userEnteredPathSegment="",this.autoCompletePathSegment="",this.filePickBox.title=this.options.title,this.filePickBox.value=this.pathFromUri(this.currentFolder,!0),this.filePickBox.valueSelection=[this.filePickBox.value.length,this.filePickBox.value.length],this.filePickBox.items=[];function K(q,Z){Z&&(Z=f.addTrailingPathSeparator(Z,q.separator),Z=f.removeTrailingPathSeparator(Z)),z(Z),q.contextKey.set(!1),q.filePickBox.dispose(),(0,g.dispose)(q.disposables)}this.filePickBox.onDidCustom(()=>{if(!(H||this.busy))return H=!0,U++,this.options.availableFileSystems&&this.options.availableFileSystems.length>1&&(this.options.availableFileSystems=this.options.availableFileSystems.slice(1)),this.filePickBox.hide(),N?this.fileDialogService.showSaveDialog(this.options).then(q=>{K(this,q)}):this.fileDialogService.showOpenDialog(this.options).then(q=>{K(this,q?q[0]:void 0)})});function G(q){if(q.busy){q.onBusyChangeEmitter.event(Z=>{Z||G(q)});return}else if(H)return;H=!0,U++,q.onDidAccept().then(Z=>{Z?(q.filePickBox.hide(),K(q,Z)):q.hidden?K(q,void 0):(U--,H=!1)})}this.filePickBox.onDidAccept(q=>{G(this)}),this.filePickBox.onDidChangeActive(q=>{if(H=!1,q.length===1&&this.isSelectionChangeFromUser()){this.filePickBox.validationMessage=void 0;const Z=this.constructFullUserPath();(0,u.equalsIgnoreCase)(this.filePickBox.value.substring(0,Z.length),Z)||(this.filePickBox.valueSelection=[0,this.filePickBox.value.length],this.insertText(Z,Z)),this.setAutoComplete(Z,this.userEnteredPathSegment,q[0],!0)}}),this.filePickBox.onDidChangeValue(async q=>this.handleValueChange(q)),this.filePickBox.onDidHide(()=>{this.hidden=!0,U===0&&K(this,void 0)}),this.filePickBox.show(),this.contextKey.set(!0),this.updateItems(B,!0,this.trailing).then(()=>{this.trailing?this.filePickBox.valueSelection=[this.filePickBox.value.length-this.trailing.length,this.filePickBox.value.length-V.length]:this.filePickBox.valueSelection=[this.filePickBox.value.length,this.filePickBox.value.length],this.busy=!1})})}async handleValueChange(N){try{if(this.isValueChangeFromUser())if(!(0,u.equalsIgnoreCase)(N,this.constructFullUserPath())&&!this.isBadSubpath(N)){this.filePickBox.validationMessage=void 0;const B=this.filePickBoxValue();let P=F.NotUpdated;f.extUriIgnorePathCase.isEqual(this.currentFolder,B)||(P=await this.tryUpdateItems(N,B)),(P===F.NotUpdated||P===F.UpdatedWithTrailing)&&this.setActiveItems(N)}else this.filePickBox.activeItems=[],this.userEnteredPathSegment=""}catch{}}isBadSubpath(N){return this.badPath&&N.length>this.badPath.length&&(0,u.equalsIgnoreCase)(N.substring(0,this.badPath.length),this.badPath)}isValueChangeFromUser(){return!(0,u.equalsIgnoreCase)(this.filePickBox.value,this.pathAppend(this.currentFolder,this.userEnteredPathSegment+this.autoCompletePathSegment))}isSelectionChangeFromUser(){return this.activeItem!==(this.filePickBox.activeItems?this.filePickBox.activeItems[0]:void 0)}constructFullUserPath(){const N=this.pathFromUri(this.currentFolder);return(0,u.equalsIgnoreCase)(this.filePickBox.value.substr(0,this.userEnteredPathSegment.length),this.userEnteredPathSegment)?(0,u.equalsIgnoreCase)(this.filePickBox.value.substr(0,N.length),N)?N:this.userEnteredPathSegment:this.pathAppend(this.currentFolder,this.userEnteredPathSegment)}filePickBoxValue(){const N=this.remoteUriFrom(this.filePickBox.value.trimRight(),this.currentFolder),B=this.pathFromUri(this.currentFolder);if((0,u.equalsIgnoreCase)(this.filePickBox.value,B))return this.currentFolder;const P=this.remoteUriFrom(B,this.currentFolder),V=f.relativePath(P,N),z=this.filePickBox.value.length>1&&B.length>1?(0,u.equalsIgnoreCase)(this.filePickBox.value.substr(0,2),B.substr(0,2)):!1;if(V&&z){let U=f.joinPath(this.currentFolder,V);const H=f.basename(N);return(H==="."||H==="..")&&(U=this.remoteUriFrom(this.pathAppend(U,H),this.currentFolder)),f.hasTrailingPathSeparator(N)?f.addTrailingPathSeparator(U):U}else return N}async onDidAccept(){if(this.busy=!0,this.filePickBox.activeItems.length===1){const B=this.filePickBox.selectedItems[0];if(B.isFolder){if(this.trailing)await this.updateItems(B.uri,!0,this.trailing);else{const P=this.pathFromUri(B.uri);(0,u.startsWithIgnoreCase)(P,this.filePickBox.value)&&(0,u.equalsIgnoreCase)(B.label,f.basename(B.uri))?(this.filePickBox.valueSelection=[this.pathFromUri(this.currentFolder).length,this.filePickBox.value.length],this.insertText(P,this.basenameWithTrailingSlash(B.uri))):B.label===".."&&(0,u.startsWithIgnoreCase)(this.filePickBox.value,P)?(this.filePickBox.valueSelection=[P.length,this.filePickBox.value.length],this.insertText(P,"")):await this.updateItems(B.uri,!0)}this.filePickBox.busy=!1;return}}else if(await this.tryUpdateItems(this.filePickBox.value,this.filePickBoxValue())!==F.NotUpdated){this.filePickBox.busy=!1;return}let N;if(this.filePickBox.activeItems.length===0?N=this.filePickBoxValue():this.filePickBox.activeItems.length===1&&(N=this.filePickBox.selectedItems[0].uri),N&&(N=this.addPostfix(N)),await this.validate(N))return this.busy=!1,N;this.busy=!1}root(N){let B=N,P=f.dirname(N);for(;!f.isEqual(B,P);)B=P,P=f.dirname(P);return P}tildaReplace(N){const B=this.userHome;return N.length>0&&N[0]==="~"?f.joinPath(B,N.substring(1)):this.remoteUriFrom(N)}async tryUpdateItems(N,B){if(N.length>0&&N[0]==="~"){let P=this.tildaReplace(N);return await this.updateItems(P,!0)?F.UpdatedWithTrailing:F.Updated}else{if(N==="\\")return B=this.root(this.currentFolder),N=this.pathFromUri(B),await this.updateItems(B,!0)?F.UpdatedWithTrailing:F.Updated;if(!f.extUriIgnorePathCase.isEqual(this.currentFolder,B)&&(this.endsWithSlash(N)||!f.extUriIgnorePathCase.isEqual(this.currentFolder,f.dirname(B))&&f.extUriIgnorePathCase.isEqualOrParent(this.currentFolder,f.dirname(B)))){let P;try{P=await this.fileService.stat(B)}catch{}if(P&&P.isDirectory&&f.basename(B)!=="."&&this.endsWithSlash(N))return await this.updateItems(B)?F.UpdatedWithTrailing:F.Updated;if(this.endsWithSlash(N))return this.filePickBox.validationMessage=t.localize(6,null),this.badPath=N,F.InvalidPath;{let V=f.dirname(B);const z=f.removeTrailingPathSeparator(f.addTrailingPathSeparator(this.currentFolder)),U=f.removeTrailingPathSeparator(f.addTrailingPathSeparator(V));if(!f.extUriIgnorePathCase.isEqual(z,U)&&(!/^[a-zA-Z]:$/.test(this.filePickBox.value)||!(0,u.equalsIgnoreCase)(this.pathFromUri(this.currentFolder).substring(0,this.filePickBox.value.length),this.filePickBox.value))){let H;try{H=await this.fileService.stat(V)}catch{}if(H&&H.isDirectory)return this.badPath=void 0,this.endsWithSlash(V.path)||(V=f.addTrailingPathSeparator(V)),await this.updateItems(V,!1,f.basename(B))?F.UpdatedWithTrailing:F.Updated}}}}return this.badPath=void 0,F.NotUpdated}tryUpdateTrailing(N){const B=f.extname(N);this.trailing&&B&&(this.trailing=f.basename(N))}setActiveItems(N){N=this.pathFromUri(this.tildaReplace(N));const B=this.remoteUriFrom(N),P=f.basename(B),V=this.constructFullUserPath();if((0,u.equalsIgnoreCase)(V,N.substring(0,V.length))||(0,u.equalsIgnoreCase)(N,V.substring(0,N.length))){let U=!1;for(let H=0;H<this.filePickBox.items.length;H++){const K=this.filePickBox.items[H];if(this.setAutoComplete(N,P,K)){U=!0;break}}if(!U){const H=P.length>=2?V.substring(V.length-P.length+2):"";this.userEnteredPathSegment=H===P?P:"",this.autoCompletePathSegment="",this.filePickBox.activeItems=[],this.tryUpdateTrailing(B)}}else this.userEnteredPathSegment=P,this.autoCompletePathSegment="",this.filePickBox.activeItems=[],this.tryUpdateTrailing(B)}setAutoComplete(N,B,P,V=!1){if(this.busy)return this.userEnteredPathSegment=B,this.autoCompletePathSegment="",!1;const z=P.label;return z===".."?(this.userEnteredPathSegment="",this.autoCompletePathSegment="",this.activeItem=P,V&&document.execCommand("insertText",!1,""),!1):!V&&z.length>=B.length&&(0,u.equalsIgnoreCase)(z.substr(0,B.length),B)?(this.userEnteredPathSegment=B,this.activeItem=P,this.autoCompletePathSegment="",P.isFolder||!this.trailing?this.filePickBox.activeItems=[P]:this.filePickBox.activeItems=[],!0):V&&!(0,u.equalsIgnoreCase)(this.basenameWithTrailingSlash(P.uri),this.userEnteredPathSegment+this.autoCompletePathSegment)?(this.userEnteredPathSegment="",this.accessibilityService.isScreenReaderOptimized()||(this.autoCompletePathSegment=this.trimTrailingSlash(z)),this.activeItem=P,this.accessibilityService.isScreenReaderOptimized()||(this.filePickBox.valueSelection=[this.pathFromUri(this.currentFolder,!0).length,this.filePickBox.value.length],this.insertText(this.pathAppend(this.currentFolder,this.autoCompletePathSegment),this.autoCompletePathSegment),this.filePickBox.valueSelection=[this.filePickBox.value.length-this.autoCompletePathSegment.length,this.filePickBox.value.length]),!0):(this.userEnteredPathSegment=B,this.autoCompletePathSegment="",!1)}insertText(N,B){this.filePickBox.inputHasFocus()?(document.execCommand("insertText",!1,B),this.filePickBox.value!==N&&(this.filePickBox.value=N,this.handleValueChange(N))):(this.filePickBox.value=N,this.handleValueChange(N))}addPostfix(N){let B=N;if(this.requiresTrailing&&this.options.filters&&this.options.filters.length>0&&!f.hasTrailingPathSeparator(N)){let P=!1;const V=f.extname(N).substr(1);for(let z=0;z<this.options.filters.length;z++){for(let U=0;U<this.options.filters[z].extensions.length;U++)if(this.options.filters[z].extensions[U]==="*"||this.options.filters[z].extensions[U]===V){P=!0;break}if(P)break}P||(B=f.joinPath(f.dirname(N),f.basename(N)+"."+this.options.filters[0].extensions[0]))}return B}trimTrailingSlash(N){return N.length>1&&this.endsWithSlash(N)?N.substr(0,N.length-1):N}yesNoPrompt(N,B){const P=this.quickInputService.createQuickPick();P.title=B,P.ignoreFocusOut=!0,P.ok=!0,P.customButton=!0,P.customLabel=t.localize(7,null),P.value=this.pathFromUri(N);let V=!1;return new Promise(z=>{P.onDidAccept(()=>{V=!0,P.hide(),z(!0)}),P.onDidHide(()=>{V||z(!1),this.filePickBox.show(),this.hidden=!1,this.filePickBox.items=this.filePickBox.items,P.dispose()}),P.onDidChangeValue(()=>{P.hide()}),P.onDidCustom(()=>{P.hide()}),P.show()})}async validate(N){if(N===void 0)return this.filePickBox.validationMessage=t.localize(8,null),Promise.resolve(!1);let B,P;try{P=await this.fileService.stat(f.dirname(N)),B=await this.fileService.stat(N)}catch{}if(this.requiresTrailing){if(B&&B.isDirectory)return this.filePickBox.validationMessage=t.localize(9,null),Promise.resolve(!1);if(B){const V=t.localize(10,null,f.basename(N));return this.yesNoPrompt(N,V)}else if((0,n.isValidBasename)(f.basename(N),this.isWindows)){if(!P||!P.isDirectory)return this.filePickBox.validationMessage=t.localize(12,null),Promise.resolve(!1)}else return this.filePickBox.validationMessage=t.localize(11,null),Promise.resolve(!1)}else if(B){if(N.path==="/"&&this.isWindows)return this.filePickBox.validationMessage=t.localize(14,null),Promise.resolve(!1);if(B.isDirectory&&!this.allowFolderSelection)return this.filePickBox.validationMessage=t.localize(15,null),Promise.resolve(!1);if(!B.isDirectory&&!this.allowFileSelection)return this.filePickBox.validationMessage=t.localize(16,null),Promise.resolve(!1)}else return this.filePickBox.validationMessage=t.localize(13,null),Promise.resolve(!1);return Promise.resolve(!0)}async updateItems(N,B=!1,P){this.busy=!0,this.autoCompletePathSegment="";const V=!!P;let z=!1;const U=(0,d.createCancelablePromise)(async H=>{let K;try{K=await this.fileService.resolve(N),K.isDirectory||(P=f.basename(N),N=f.dirname(N),K=void 0,z=!0)}catch{}const G=P?this.pathAppend(N,P):this.pathFromUri(N,!0);return this.currentFolder=this.endsWithSlash(N.path)?N:f.addTrailingPathSeparator(N,this.separator),this.userEnteredPathSegment=P||"",this.createItems(K,this.currentFolder,H).then(q=>H.isCancellationRequested?(this.busy=!1,!1):(this.filePickBox.items=q,this.filePickBox.activeItems=[this.filePickBox.items[0]],this.filePickBox.activeItems=[],!(0,u.equalsIgnoreCase)(this.filePickBox.value,G)&&B&&(this.filePickBox.valueSelection=[0,this.filePickBox.value.length],this.insertText(G,G)),B&&P&&V?this.filePickBox.valueSelection=[this.filePickBox.value.length-P.length,this.filePickBox.value.length-P.length]:P||(this.filePickBox.valueSelection=[this.filePickBox.value.length,this.filePickBox.value.length]),this.busy=!1,this.updatingPromise=void 0,z))});return this.updatingPromise!==void 0&&this.updatingPromise.cancel(),this.updatingPromise=U,U}pathFromUri(N,B=!1){let P=(0,b.normalizeDriveLetter)(N.fsPath,this.isWindows).replace(/\n/g,"");return this.separator==="/"?P=P.replace(/\\/g,this.separator):P=P.replace(/\//g,this.separator),B&&!this.endsWithSlash(P)&&(P=P+this.separator),P}pathAppend(N,B){return B===".."||B==="."?this.pathFromUri(N,!0)+B:this.pathFromUri(f.joinPath(N,B))}async checkIsWindowsOS(){let N=I.isWindows;const B=await this.getRemoteAgentEnvironment();return B&&(N=B.os===1),N}endsWithSlash(N){return/[\/\\]$/.test(N)}basenameWithTrailingSlash(N){const B=this.pathFromUri(N,!0),P=this.pathFromUri(f.dirname(N),!0);return B.substring(P.length)}async createBackItem(N){const B=this.currentFolder.with({scheme:s.Schemas.file,authority:""}),P=f.dirname(B);if(!f.isEqual(B,P)){const V=f.dirname(N);if(await this.fileService.exists(V))return{label:"..",uri:f.addTrailingPathSeparator(V,this.separator),isFolder:!0}}}async createItems(N,B,P){const V=[],z=await this.createBackItem(B);try{N||(N=await this.fileService.resolve(B));const H=N.children?await Promise.all(N.children.map(K=>this.createItem(K,B,P))):[];for(let K of H)K&&V.push(K)}catch(H){console.log(H)}if(P.isCancellationRequested)return[];const U=V.sort((H,K)=>{if(H.isFolder!==K.isFolder)return H.isFolder?-1:1;const G=this.endsWithSlash(H.label)?H.label.substr(0,H.label.length-1):H.label,q=this.endsWithSlash(K.label)?K.label.substr(0,K.label.length-1):K.label;return G.localeCompare(q)});return z&&U.unshift(z),U}filterFile(N){if(this.options.filters){const B=f.extname(N);for(let P=0;P<this.options.filters.length;P++)for(let V=0;V<this.options.filters[P].extensions.length;V++){const z=this.options.filters[P].extensions[V];if(z==="*"||B==="."+z)return!0}return!1}return!0}async createItem(N,B,P){if(P.isCancellationRequested)return;let V=f.joinPath(B,N.name);if(N.isDirectory){const z=f.basename(V);return V=f.addTrailingPathSeparator(V,this.separator),{label:z,uri:V,isFolder:!0,iconClasses:(0,S.getIconClasses)(this.modelService,this.languageService,V||void 0,A.FileKind.FOLDER)}}else if(!N.isDirectory&&this.allowFileSelection&&this.filterFile(V))return{label:N.name,uri:V,isFolder:!1,iconClasses:(0,S.getIconClasses)(this.modelService,this.languageService,V||void 0)}}};L=Ee([W(0,A.IFileService),W(1,k.IQuickInputService),W(2,v.ILabelService),W(3,C.IWorkspaceContextService),W(4,o.INotificationService),W(5,w.IFileDialogService),W(6,c.IModelService),W(7,i.ILanguageService),W(8,l.IWorkbenchEnvironmentService),W(9,r.IRemoteAgentService),W(10,E.IPathService),W(11,a.IKeybindingService),W(12,p.IContextKeyService),W(13,y.IAccessibilityService)],L),e.SimpleFileDialog=L}),define(ne[2529],re([1,0,1700,17,109,2,14,97,94,47,45,28,18,40,31,1931,466,207,121,8,57,144,398,894,34,27,199]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let b=class{constructor(F,L,M,N){const B=M.getConnection();B&&(B.registerChannel("download",new S.DownloadServiceChannel(N)),B.registerChannel("logger",new s.LogLevelChannel(F)))}};b=Ee([W(0,i.ILogService),W(1,i.ILogService),W(2,_.IRemoteAgentService),W(3,n.IDownloadService)],b);let E=class{constructor(F,L){l.ipcRenderer.on("vscode:getDiagnosticInfo",(M,N)=>{const B=F.getConnection();if(B){const P=L.getHostLabel(o.Schemas.vscodeRemote,B.remoteAuthority);F.getDiagnosticInfo(N.args).then(V=>{V&&(V.hostName=P),l.ipcRenderer.send(N.replyChannel,V)}).catch(V=>{const z=V&&V.message?`Connection to '${P}' could not be established ${V.message}`:`Connection to '${P}' could not be established `;l.ipcRenderer.send(N.replyChannel,{hostName:P,errorMessage:z})})}else l.ipcRenderer.send(N.replyChannel)})}};E=Ee([W(0,_.IRemoteAgentService),W(1,v.ILabelService)],E);let y=class{constructor(F,L,M){const N=F.getConnection();N&&N.onDidStateChange(async B=>{if(B.type===4){const P=await L.resolveAuthority(N.remoteAuthority);P.options&&P.options.extensionHostEnv&&await M.setRemoteEnvironment(P.options.extensionHostEnv)}})}};y=Ee([W(0,_.IRemoteAgentService),W(1,a.IRemoteAuthorityResolverService),W(2,c.IExtensionService)],y);let T=class extends A.Disposable{constructor(F,L){super();this.remoteAgentService=F,this.configurationService=L,this.updateRemoteTelemetryEnablement(),this._register(L.onDidChangeConfiguration(M=>{M.affectsConfiguration(d.TELEMETRY_SETTING_ID)&&this.updateRemoteTelemetryEnablement()}))}updateRemoteTelemetryEnablement(){return this.remoteAgentService.updateTelemetryLevel((0,m.getTelemetryLevel)(this.configurationService))}};T=Ee([W(0,_.IRemoteAgentService),W(1,p.IConfigurationService)],T);let R=class extends A.Disposable{constructor(F,L,M,N,B){super();function P(){const G=M.getValue("workbench.startupEditor");return G!=="welcomePage"&&G!=="welcomePageInEmptyWorkbench"}function V(){return P()}const{remoteAuthority:z,filesToDiff:U,filesToOpenOrCreate:H,filesToWait:K}=F;z&&B.getWorkbenchState()===1&&!U?.length&&!H?.length&&!K&&L.resolveAuthority(z).then(()=>{P()&&N.executeCommand("workbench.view.explorer"),V()&&N.executeCommand("workbench.action.terminal.toggleTerminal")})}};R=Ee([W(0,r.INativeWorkbenchEnvironmentService),W(1,a.IRemoteAuthorityResolverService),W(2,p.IConfigurationService),W(3,C.ICommandService),W(4,g.IWorkspaceContextService)],R);const O=f.Registry.as(w.Extensions.Workbench);O.registerWorkbenchContribution(b,1),O.registerWorkbenchContribution(E,4),O.registerWorkbenchContribution(y,4),O.registerWorkbenchContribution(T,2),O.registerWorkbenchContribution(R,1),f.Registry.as(u.Extensions.Configuration).registerConfiguration({id:"remote",title:t.localize(0,null),type:"object",properties:{"remote.downloadExtensionsLocally":{type:"boolean",markdownDescription:t.localize(1,null),default:!1}}}),k.isMacintosh?I.KeybindingsRegistry.registerCommandAndKeybindingRule({id:h.OpenLocalFileFolderCommand.ID,weight:200,primary:2048|45,when:h.RemoteFileDialogContext,description:{description:h.OpenLocalFileFolderCommand.LABEL,args:[]},handler:h.OpenLocalFileFolderCommand.handler()}):(I.KeybindingsRegistry.registerCommandAndKeybindingRule({id:h.OpenLocalFileCommand.ID,weight:200,primary:2048|45,when:h.RemoteFileDialogContext,description:{description:h.OpenLocalFileCommand.LABEL,args:[]},handler:h.OpenLocalFileCommand.handler()}),I.KeybindingsRegistry.registerCommandAndKeybindingRule({id:h.OpenLocalFolderCommand.ID,weight:200,primary:(0,D.KeyChord)(2048|41,2048|45),when:h.RemoteFileDialogContext,description:{description:h.OpenLocalFolderCommand.LABEL,args:[]},handler:h.OpenLocalFolderCommand.handler()})),I.KeybindingsRegistry.registerCommandAndKeybindingRule({id:h.SaveLocalFileCommand.ID,weight:200,primary:2048|1024|49,when:h.RemoteFileDialogContext,description:{description:h.SaveLocalFileCommand.LABEL,args:[]},handler:h.SaveLocalFileCommand.handler()})}),define(ne[2530],re([1,0,1860,213,54,34,177,50,19,5,894,189,8,23,41,69,81,15,29,42,45,101,18,126,28,72,21]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractFileDialogService=void 0;let b=class{constructor(y,T,R,O,x,F,L,M,N,B,P,V,z,U,H,K){this.hostService=y,this.contextService=T,this.historyService=R,this.environmentService=O,this.instantiationService=x,this.configurationService=F,this.fileService=L,this.openerService=M,this.dialogService=N,this.languageService=B,this.workspacesService=P,this.labelService=V,this.pathService=z,this.commandService=U,this.editorService=H,this.codeEditorService=K}async defaultFilePath(y=this.getSchemeFilterForWindow()){let T=this.historyService.getLastActiveFile(y);return T?T=T&&I.dirname(T):T=this.historyService.getLastActiveWorkspaceRoot(y),T||(T=await this.pathService.userHome({preferLocal:y===n.Schemas.file})),T}async defaultFolderPath(y=this.getSchemeFilterForWindow()){let T=this.historyService.getLastActiveWorkspaceRoot(y);return T||(T=this.historyService.getLastActiveFile(y)),T?I.dirname(T):this.pathService.userHome({preferLocal:y===n.Schemas.file})}async defaultWorkspacePath(y=this.getSchemeFilterForWindow(),T){let R;if(this.contextService.getWorkbenchState()===3){const O=this.contextService.getWorkspace().configuration;O&&O.scheme===y&&(0,A.isSavedWorkspace)(O,this.environmentService)&&(R=I.dirname(O)||void 0)}return R||(R=await this.defaultFilePath(y)),R&&T&&(R=I.joinPath(R,T)),R}async showSaveConfirm(y){return this.environmentService.isExtensionDevelopment&&this.environmentService.extensionTestsLocationURI?1:this.doShowSaveConfirm(y)}async doShowSaveConfirm(y){if(y.length===0)return 1;let T,R=t.localize(0,null);y.length===1?T=t.localize(1,null,typeof y[0]=="string"?y[0]:I.basename(y[0])):(T=t.localize(2,null,y.length),R=(0,_.getFileNamesMessage)(y)+` `+R);const O=[y.length>1?t.localize(3,null):t.localize(4,null),t.localize(5,null),t.localize(6,null)],{choice:x}=await this.dialogService.show(s.default.Warning,T,O,{cancelId:2,detail:R});switch(x){case 0:return 0;case 1:return 1;default:return 2}}addFileSchemaIfNeeded(y,T){return y===n.Schemas.untitled?[n.Schemas.file]:y!==n.Schemas.file?[y,n.Schemas.file]:[y]}async pickFileFolderAndOpenSimplified(y,T,R){const O=t.localize(7,null),x=this.addFileSchemaIfNeeded(y),F=await this.pickResource({canSelectFiles:!0,canSelectFolders:!0,canSelectMany:!1,defaultUri:T.defaultUri,title:O,availableFileSystems:x});if(F){const L=await this.fileService.stat(F),M=L.isDirectory?{folderUri:F}:{fileUri:F};!(0,f.isWorkspaceToOpen)(M)&&(0,f.isFileToOpen)(M)&&this.addFileToRecentlyOpened(M.fileUri),L.isDirectory||T.forceNewWindow||R?await this.hostService.openWindow([M],{forceNewWindow:T.forceNewWindow,remoteAuthority:T.remoteAuthority}):await this.openerService.open(F,{fromUserGesture:!0,editorOptions:{pinned:!0}})}}async pickFileAndOpenSimplified(y,T,R){const O=t.localize(8,null),x=this.addFileSchemaIfNeeded(y),F=await this.pickResource({canSelectFiles:!0,canSelectFolders:!1,canSelectMany:!1,defaultUri:T.defaultUri,title:O,availableFileSystems:x});F&&(this.addFileToRecentlyOpened(F),T.forceNewWindow||R?await this.hostService.openWindow([{fileUri:F}],{forceNewWindow:T.forceNewWindow,remoteAuthority:T.remoteAuthority}):await this.openerService.open(F,{fromUserGesture:!0,editorOptions:{pinned:!0}}))}addFileToRecentlyOpened(y){this.contextService.isInsideWorkspace(y)||this.workspacesService.addRecentlyOpened([{fileUri:y,label:this.labelService.getUriLabel(y)}])}async pickFolderAndOpenSimplified(y,T){const R=t.localize(9,null),O=this.addFileSchemaIfNeeded(y,!0),x=await this.pickResource({canSelectFiles:!1,canSelectFolders:!0,canSelectMany:!1,defaultUri:T.defaultUri,title:R,availableFileSystems:O});if(x)return this.hostService.openWindow([{folderUri:x}],{forceNewWindow:T.forceNewWindow,remoteAuthority:T.remoteAuthority})}async pickWorkspaceAndOpenSimplified(y,T){const R=t.localize(10,null),O=[{name:t.localize(11,null),extensions:[A.WORKSPACE_EXTENSION]}],x=this.addFileSchemaIfNeeded(y,!0),F=await this.pickResource({canSelectFiles:!0,canSelectFolders:!1,canSelectMany:!1,defaultUri:T.defaultUri,title:R,filters:O,availableFileSystems:x});if(F)return this.hostService.openWindow([{workspaceUri:F}],{forceNewWindow:T.forceNewWindow,remoteAuthority:T.remoteAuthority})}async pickFileToSaveSimplified(y,T){return T.availableFileSystems||(T.availableFileSystems=this.addFileSchemaIfNeeded(y)),T.title=t.localize(12,null),this.saveRemoteResource(T)}async showSaveDialogSimplified(y,T){return T.availableFileSystems||(T.availableFileSystems=this.addFileSchemaIfNeeded(y)),this.saveRemoteResource(T)}async showOpenDialogSimplified(y,T){T.availableFileSystems||(T.availableFileSystems=this.addFileSchemaIfNeeded(y,T.canSelectFolders));const R=await this.pickResource(T);return R?[R]:void 0}getSimpleFileDialog(){return this.instantiationService.createInstance(v.SimpleFileDialog)}pickResource(y){return this.getSimpleFileDialog().showOpenDialog(y)}saveRemoteResource(y){return this.getSimpleFileDialog().showSaveDialog(y)}getSchemeFilterForWindow(y){return y??this.pathService.defaultUriScheme}getFileSystemSchema(y){return y.availableFileSystems&&y.availableFileSystems[0]||this.getSchemeFilterForWindow(y.defaultUri?.scheme)}getWorkspaceAvailableFileSystems(y){if(y.availableFileSystems&&y.availableFileSystems.length>0)return y.availableFileSystems;const T=[n.Schemas.file];return this.environmentService.remoteAuthority&&T.unshift(n.Schemas.vscodeRemote),T}getPickFileToSaveDialogOptions(y,T){const R={defaultUri:y,title:t.localize(13,null),availableFileSystems:T},O=y?I.extname(y):void 0;let x;const F=this.languageService.getSortedRegisteredLanguageNames(),L=(0,l.coalesce)(F.map(({languageName:M,languageId:N})=>{const B=this.languageService.getExtensions(N);if(!B.length)return null;const P={name:M,extensions:(0,l.distinct)(B).slice(0,10).map(V=>(0,r.trim)(V,"."))};return!x&&B.indexOf(O||h.PLAINTEXT_EXTENSION)>=0?(x=P,null):P}));return!x&&O&&(x={name:(0,r.trim)(O,".").toUpperCase(),extensions:[(0,r.trim)(O,".")]}),R.filters=(0,l.coalesce)([{name:t.localize(14,null),extensions:["*"]},x,...L,{name:t.localize(15,null),extensions:[""]}]),R}};b=Ee([W(0,S.IHostService),W(1,A.IWorkspaceContextService),W(2,k.IHistoryService),W(3,D.IWorkbenchEnvironmentService),W(4,w.IInstantiationService),W(5,o.IConfigurationService),W(6,c.IFileService),W(7,i.IOpenerService),W(8,_.IDialogService),W(9,p.ILanguageService),W(10,C.IWorkspacesService),W(11,u.ILabelService),W(12,a.IPathService),W(13,g.ICommandService),W(14,m.IEditorService),W(15,d.ICodeEditorService)],b),e.AbstractFileDialogService=b}),define(ne[2531],re([1,0,69,54,34,177,50,9,5,8,35,23,41,87,2530,18,42,189,45,101,28,72,21]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileDialogService=void 0;let h=class extends i.AbstractFileDialogService{constructor(d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z){super(d,m,b,E,y,T,R,O,F,L,M,N,B,P,V,z);this.nativeHostService=x}toNativeOpenDialogOptions(d){return{forceNewWindow:d.forceNewWindow,telemetryExtraData:d.telemetryExtraData,defaultPath:d.defaultUri&&d.defaultUri.fsPath}}shouldUseSimplified(d){const m=this.configurationService.getValue("files.simpleDialog.enable")===!0,b=this.configurationService.getValue("window.openFilesInNewWindow")==="on";return{useSimplified:d!==S.Schemas.file&&d!==S.Schemas.vscodeUserData||m,isSetting:b}}async pickFileFolderAndOpen(d){const m=this.getFileSystemSchema(d);d.defaultUri||(d.defaultUri=await this.defaultFilePath(m));const b=this.shouldUseSimplified(m);return b.useSimplified?this.pickFileFolderAndOpenSimplified(m,d,b.isSetting):this.nativeHostService.pickFileFolderAndOpen(this.toNativeOpenDialogOptions(d))}async pickFileAndOpen(d){const m=this.getFileSystemSchema(d);d.defaultUri||(d.defaultUri=await this.defaultFilePath(m));const b=this.shouldUseSimplified(m);return b.useSimplified?this.pickFileAndOpenSimplified(m,d,b.isSetting):this.nativeHostService.pickFileAndOpen(this.toNativeOpenDialogOptions(d))}async pickFolderAndOpen(d){const m=this.getFileSystemSchema(d);return d.defaultUri||(d.defaultUri=await this.defaultFolderPath(m)),this.shouldUseSimplified(m).useSimplified?this.pickFolderAndOpenSimplified(m,d):this.nativeHostService.pickFolderAndOpen(this.toNativeOpenDialogOptions(d))}async pickWorkspaceAndOpen(d){d.availableFileSystems=this.getWorkspaceAvailableFileSystems(d);const m=this.getFileSystemSchema(d);return d.defaultUri||(d.defaultUri=await this.defaultWorkspacePath(m)),this.shouldUseSimplified(m).useSimplified?this.pickWorkspaceAndOpenSimplified(m,d):this.nativeHostService.pickWorkspaceAndOpen(this.toNativeOpenDialogOptions(d))}async pickFileToSave(d,m){const b=this.getFileSystemSchema({defaultUri:d,availableFileSystems:m}),E=this.getPickFileToSaveDialogOptions(d,m);if(this.shouldUseSimplified(b).useSimplified)return this.pickFileToSaveSimplified(b,E);{const y=await this.nativeHostService.showSaveDialog(this.toNativeSaveDialogOptions(E));if(y&&!y.canceled&&y.filePath)return D.URI.file(y.filePath)}}toNativeSaveDialogOptions(d){return d.defaultUri=d.defaultUri?D.URI.file(d.defaultUri.path):void 0,{defaultPath:d.defaultUri&&d.defaultUri.fsPath,buttonLabel:d.saveLabel,filters:d.filters,title:d.title}}async showSaveDialog(d){const m=this.getFileSystemSchema(d);if(this.shouldUseSimplified(m).useSimplified)return this.showSaveDialogSimplified(m,d);const b=await this.nativeHostService.showSaveDialog(this.toNativeSaveDialogOptions(d));if(b&&!b.canceled&&b.filePath)return D.URI.file(b.filePath)}async showOpenDialog(d){const m=this.getFileSystemSchema(d);if(this.shouldUseSimplified(m).useSimplified)return this.showOpenDialogSimplified(m,d);const b=d.defaultUri,E={title:d.title,defaultPath:b&&b.fsPath,buttonLabel:d.openLabel,filters:d.filters,properties:[]};E.properties.push("createDirectory"),d.canSelectFiles&&E.properties.push("openFile"),d.canSelectFolders&&E.properties.push("openDirectory"),d.canSelectMany&&E.properties.push("multiSelections");const y=await this.nativeHostService.showOpenDialog(E);return y&&Array.isArray(y.filePaths)&&y.filePaths.length>0?y.filePaths.map(D.URI.file):void 0}};h=Ee([W(0,t.IHostService),W(1,_.IWorkspaceContextService),W(2,A.IHistoryService),W(3,k.IWorkbenchEnvironmentService),W(4,I.IInstantiationService),W(5,w.IConfigurationService),W(6,C.IFileService),W(7,o.IOpenerService),W(8,c.INativeHostService),W(9,f.IDialogService),W(10,s.ILanguageService),W(11,l.IWorkspacesService),W(12,r.ILabelService),W(13,p.IPathService),W(14,u.ICommandService),W(15,n.IEditorService),W(16,a.ICodeEditorService)],h),e.FileDialogService=h,(0,v.registerSingleton)(f.IFileDialogService,h,!0)}),define(ne[2532],re([1,0,1886,9,2,48,6,47,17,85,34,19,111,45,133,152,35,101,40]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LabelService=void 0;const p=i.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"resourceLabelFormatters",jsonSchema:{description:(0,t.localize)(0,null),type:"array",items:{type:"object",required:["scheme","formatting"],properties:{scheme:{type:"string",description:(0,t.localize)(1,null)},authority:{type:"string",description:(0,t.localize)(2,null)},formatting:{description:(0,t.localize)(3,null),type:"object",properties:{label:{type:"string",description:(0,t.localize)(4,null)},separator:{type:"string",description:(0,t.localize)(5,null)},stripPathStartingSeparator:{type:"boolean",description:(0,t.localize)(6,null)},tildify:{type:"boolean",description:(0,t.localize)(7,null)},workspaceSuffix:{type:"string",description:(0,t.localize)(8,null)}}}}}}}),u=/\//g,a=/\$\{(scheme|authority|path|(query)\.(.+?))\}/g;function n(d){return!!(d&&d[2]===":")}let h=class{constructor(m){this.formattersDisposables=new Map,p.setHandler((b,E)=>{E.added.forEach(y=>y.value.forEach(T=>{!(0,r.isProposedApiEnabled)(y.description,"contribLabelFormatterWorkspaceTooltip")&&T.formatting.workspaceTooltip&&(T.formatting.workspaceTooltip=void 0),this.formattersDisposables.set(T,m.registerFormatter(T))})),E.removed.forEach(y=>y.value.forEach(T=>{this.formattersDisposables.get(T).dispose()}))})}};h=Ee([W(0,c.ILabelService)],h),I.Registry.as(D.Extensions.Workbench).registerWorkbenchContribution(h,3);let g=class extends _.Disposable{constructor(m,b,E){super();this.environmentService=m,this.contextService=b,this.pathService=E,this.formatters=[],this._onDidChangeFormatters=this._register(new k.Emitter({leakWarningThreshold:400})),this.onDidChangeFormatters=this._onDidChangeFormatters.event}findFormatting(m){let b;return this.formatters.forEach(E=>{if(E.scheme===m.scheme){if(!E.authority&&(!b||E.priority)){b=E;return}if(!E.authority)return;(0,S.match)(E.authority.toLowerCase(),m.authority.toLowerCase())&&(!b||!b.authority||E.authority.length>b.authority.length||E.authority.length===b.authority.length&&E.priority)&&(b=E)}}),b?b.formatting:void 0}getUriLabel(m,b={}){let E=this.findFormatting(m);E&&b.separator&&(E={...E,separator:b.separator});const y=this.doGetUriLabel(m,E,b);return!E&&b.separator?y.replace(u,b.separator):y}doGetUriLabel(m,b,E={}){if(!b)return(0,o.getPathLabel)(m.path,{userHome:this.pathService.resolvedUserHome},E.relative?this.contextService:void 0);let y;const T=this.contextService?.getWorkspaceFolder(m);if(E.relative&&T){const R=this.formatUri(T.uri,b,E.noPrefix);let O=this.formatUri(m,b,E.noPrefix),x=0;for(;O[x]&&O[x]===R[x];)x++;if(!O[x]||O[x]===b.separator?O=O.substring(1+x):x===R.length&&T.uri.path==="/"&&(O=O.substring(x)),this.contextService.getWorkspace().folders.length>1&&!E.noPrefix){const L=T?.name??(0,C.basenameOrAuthority)(T.uri);O=O?L+" \u2022 "+O:L}y=O}else y=this.formatUri(m,b,E.noPrefix);return E.endWithSeparator?this.appendSeparatorIfMissing(y,b):y}getUriBasenameLabel(m){const b=this.findFormatting(m),E=this.doGetUriLabel(m,b);if(b)switch(b.separator){case A.win32.sep:return A.win32.basename(E);case A.posix.sep:return A.posix.basename(E)}return A.basename(E)}getWorkspaceLabel(m,b){if((0,v.isWorkspace)(m)){const E=(0,v.toWorkspaceIdentifier)(m);return E?this.getWorkspaceLabel(E,b):""}return f.URI.isUri(m)?this.doGetSingleFolderWorkspaceLabel(m,b):(0,v.isSingleFolderWorkspaceIdentifier)(m)?this.doGetSingleFolderWorkspaceLabel(m.uri,b):(0,v.isWorkspaceIdentifier)(m)?this.doGetWorkspaceLabel(m.configPath,b):""}doGetWorkspaceLabel(m,b){if((0,v.isUntitledWorkspace)(m,this.environmentService))return(0,t.localize)(9,null);if((0,v.isTemporaryWorkspace)(m))return(0,t.localize)(10,null);let E=(0,C.basename)(m);E.endsWith(v.WORKSPACE_EXTENSION)&&(E=E.substr(0,E.length-v.WORKSPACE_EXTENSION.length-1));let y;return b?.verbose?y=(0,t.localize)(11,null,this.getUriLabel((0,C.joinPath)((0,C.dirname)(m),E))):y=(0,t.localize)(12,null,E),this.appendWorkspaceSuffix(y,m)}doGetSingleFolderWorkspaceLabel(m,b){const E=b?.verbose?this.getUriLabel(m):(0,C.basename)(m)||"/";return this.appendWorkspaceSuffix(E,m)}getSeparator(m,b){return this.findFormatting(f.URI.from({scheme:m,authority:b}))?.separator||"/"}getHostLabel(m,b){return this.findFormatting(f.URI.from({scheme:m,authority:b}))?.workspaceSuffix||b||""}getHostTooltip(m,b){return this.findFormatting(f.URI.from({scheme:m,authority:b}))?.workspaceTooltip}registerFormatter(m){return this.formatters.push(m),this._onDidChangeFormatters.fire({scheme:m.scheme}),{dispose:()=>{this.formatters=this.formatters.filter(b=>b!==m),this._onDidChangeFormatters.fire({scheme:m.scheme})}}}formatUri(m,b,E){let y=b.label.replace(a,(T,R,O,x)=>{switch(R){case"scheme":return m.scheme;case"authority":return m.authority;case"path":return b.stripPathStartingSeparator?m.path.slice(m.path[0]===b.separator?1:0):m.path;default:{if(O==="query"){const{query:F}=m;if(F&&F[0]==="{"&&F[F.length-1]==="}")try{return JSON.parse(F)[x]||""}catch{}}return""}}});if(b.normalizeDriveLetter&&n(y)&&(y=y.charAt(1).toUpperCase()+y.substr(2)),b.tildify&&!E){const T=this.pathService.resolvedUserHome;T&&(y=(0,o.tildify)(y,T.fsPath))}return b.authorityPrefix&&m.authority&&(y=b.authorityPrefix+y),y.replace(u,b.separator)}appendSeparatorIfMissing(m,b){let E=m;return m.endsWith(b.separator)||(E+=b.separator),E}appendWorkspaceSuffix(m,b){const E=this.findFormatting(b),y=E&&typeof E.workspaceSuffix=="string"?E.workspaceSuffix:void 0;return y?`${m} [${y}]`:m}};g=Ee([W(0,w.IEnvironmentService),W(1,v.IWorkspaceContextService),W(2,l.IPathService)],g),e.LabelService=g,(0,s.registerSingleton)(c.ILabelService,g,!0)}),define(ne[2533],re([1,0,124,52,558,42,113,8,35,31,12,147,101,228,62]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkbenchModelService=void 0;let S=class extends _.ModelService{constructor(l,r,p,u,a,n,h,g,d,m){super(l,r,p,u,a,h,n,g,d);this._pathService=m}_schemaShouldMaintainUndoRedoElements(l){return super._schemaShouldMaintainUndoRedoElements(l)||l.scheme===this._pathService.defaultUriScheme}};S=Ee([W(0,D.IConfigurationService),W(1,k.ITextResourcePropertiesService),W(2,v.IThemeService),W(3,w.ILogService),W(4,C.IUndoRedoService),W(5,t.ILanguageConfigurationService),W(6,A.ILanguageService),W(7,c.ILanguageFeatureDebounceService),W(8,i.ILanguageFeaturesService),W(9,o.IPathService)],S),e.WorkbenchModelService=S,(0,I.registerSingleton)(f.IModelService,S,!0)}),define(ne[2534],re([1,0,35,109,121,101,34]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativePathService=void 0;let D=class extends A.AbstractPathService{constructor(w,v,C){super(v.userHome,w,v,C)}};D=Ee([W(0,f.IRemoteAgentService),W(1,_.INativeWorkbenchEnvironmentService),W(2,k.IWorkspaceContextService)],D),e.NativePathService=D,(0,t.registerSingleton)(A.IPathService,D,!0)}),define(ne[274],re([1,0,1896,6,5,35,24,212,2,8,144,50,13,34,116,31,30,15,81,54,9,51]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TunnelModel=e.PortsAttributes=e.OnPortForward=e.mapHasAddressLocalhostOrAllInterfaces=e.mapHasAddress=e.parseAddress=e.makeAddress=e.AutoTunnelSource=e.UserTunnelSource=e.TunnelSource=e.TunnelEditId=e.TunnelType=e.PORT_AUTO_SOURCE_SETTING_OUTPUT=e.PORT_AUTO_SOURCE_SETTING_PROCESS=e.PORT_AUTO_SOURCE_SETTING=e.PORT_AUTO_FORWARD_SETTING=e.TUNNEL_VIEW_CONTAINER_ID=e.TUNNEL_VIEW_ID=e.REMOTE_EXPLORER_TYPE_KEY=e.IRemoteExplorerService=void 0,e.IRemoteExplorerService=(0,_.createDecorator)("remoteExplorerService"),e.REMOTE_EXPLORER_TYPE_KEY="remote.explorerType";const n="remote.tunnels.toRestore";e.TUNNEL_VIEW_ID="~remote.forwardedPorts",e.TUNNEL_VIEW_CONTAINER_ID="~remote.forwardedPortsContainer",e.PORT_AUTO_FORWARD_SETTING="remote.autoForwardPorts",e.PORT_AUTO_SOURCE_SETTING="remote.autoForwardPortsSource",e.PORT_AUTO_SOURCE_SETTING_PROCESS="process",e.PORT_AUTO_SOURCE_SETTING_OUTPUT="output";var h;(function(L){L.Candidate="Candidate",L.Detected="Detected",L.Forwarded="Forwarded",L.Add="Add"})(h=e.TunnelType||(e.TunnelType={}));var g;(function(L){L[L.None=0]="None",L[L.New=1]="New",L[L.Label=2]="Label",L[L.LocalPort=3]="LocalPort"})(g=e.TunnelEditId||(e.TunnelEditId={}));var d;(function(L){L[L.User=0]="User",L[L.Auto=1]="Auto",L[L.Extension=2]="Extension"})(d=e.TunnelSource||(e.TunnelSource={})),e.UserTunnelSource={source:d.User,description:t.localize(0,null)},e.AutoTunnelSource={source:d.Auto,description:t.localize(1,null)};function m(L,M){return L+":"+M}e.makeAddress=m;function b(L){const M=L.match(/^([a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*:)?([0-9]+)$/);if(!!M)return{host:M[1]?.substring(0,M[1].length-1)||"localhost",port:Number(M[2])}}e.parseAddress=b;function E(L,M,N){const B=L.get(m(M,N));if(B)return B;if((0,D.isLocalhost)(M))for(const P of D.LOCALHOST_ADDRESSES){const V=m(P,N);if(L.has(V))return L.get(V)}else if((0,D.isAllInterfaces)(M))for(const P of D.ALL_INTERFACES_ADDRESSES){const V=m(P,N);if(L.has(V))return L.get(V)}}e.mapHasAddress=E;function y(L,M,N){const B=E(L,M,N);if(B)return B;const P=(0,D.isAllInterfaces)(M)?"localhost":(0,D.isLocalhost)(M)?"0.0.0.0":void 0;if(P)return E(L,P,N)}e.mapHasAddressLocalhostOrAllInterfaces=y;var T;(function(L){L.Notify="notify",L.OpenBrowser="openBrowser",L.OpenBrowserOnce="openBrowserOnce",L.OpenPreview="openPreview",L.Silent="silent",L.Ignore="ignore"})(T=e.OnPortForward||(e.OnPortForward={}));class R extends I.Disposable{constructor(M){super();this.configurationService=M,this.portsAttributes=[],this._onDidChangeAttributes=new f.Emitter,this.onDidChangeAttributes=this._onDidChangeAttributes.event,this._register(M.onDidChangeConfiguration(N=>{(N.affectsConfiguration(R.SETTING)||N.affectsConfiguration(R.DEFAULTS))&&this.updateAttributes()})),this.updateAttributes()}updateAttributes(){this.portsAttributes=this.readSetting(),this._onDidChangeAttributes.fire()}getAttributes(M,N,B){let P=this.findNextIndex(M,N,B,this.portsAttributes,0);const V={label:void 0,onAutoForward:void 0,elevateIfNeeded:void 0,requireLocalPort:void 0,protocol:void 0};for(;P>=0;){const z=this.portsAttributes[P];z.key===M?(V.onAutoForward=z.onAutoForward??V.onAutoForward,V.elevateIfNeeded=z.elevateIfNeeded!==void 0?z.elevateIfNeeded:V.elevateIfNeeded,V.label=z.label??V.label,V.requireLocalPort=z.requireLocalPort,V.protocol=z.protocol):(V.onAutoForward=V.onAutoForward??z.onAutoForward,V.elevateIfNeeded=V.elevateIfNeeded!==void 0?V.elevateIfNeeded:z.elevateIfNeeded,V.label=V.label??z.label,V.requireLocalPort=V.requireLocalPort!==void 0?V.requireLocalPort:void 0,V.protocol=V.protocol??z.protocol),P=this.findNextIndex(M,N,B,this.portsAttributes,P+1)}return V.onAutoForward!==void 0||V.elevateIfNeeded!==void 0||V.label!==void 0||V.requireLocalPort!==void 0||V.protocol!==void 0?V:this.getOtherAttributes()}hasStartEnd(M){return M.start!==void 0&&M.end!==void 0}hasHostAndPort(M){return M.host!==void 0&&M.port!==void 0&&(0,o.isString)(M.host)&&(0,o.isNumber)(M.port)}findNextIndex(M,N,B,P,V){if(V>=P.length)return-1;const z=!(0,D.isLocalhost)(N)&&!(0,D.isAllInterfaces)(N),H=P.slice(V).findIndex(K=>(0,o.isNumber)(K.key)?z?!1:K.key===M:this.hasStartEnd(K.key)?z?!1:M>=K.key.start&&M<=K.key.end:this.hasHostAndPort(K.key)?M===K.key.port&&N===K.key.host:B?K.key.test(B):!1);return H>=0?H+V:-1}readSetting(){const M=this.configurationService.getValue(R.SETTING);if(!M||!(0,o.isObject)(M))return[];const N=[];for(let P in M){if(P===void 0)continue;const V=M[P];let z;if(Number(P))z=Number(P);else if((0,o.isString)(P))if(R.RANGE.test(P)){const U=P.match(R.RANGE);z={start:Number(U[1]),end:Number(U[2])}}else if(R.HOST_AND_PORT.test(P)){const U=P.match(R.HOST_AND_PORT);z={host:U[1],port:Number(U[2])}}else{let U;try{U=RegExp(P)}catch{}U&&(z=U)}!z||N.push({key:z,elevateIfNeeded:V.elevateIfNeeded,onAutoForward:V.onAutoForward,label:V.label,requireLocalPort:V.requireLocalPort,protocol:V.protocol})}const B=this.configurationService.getValue(R.DEFAULTS);return B&&(this.defaultPortAttributes={elevateIfNeeded:B.elevateIfNeeded,label:B.label,onAutoForward:B.onAutoForward,requireLocalPort:B.requireLocalPort,protocol:B.protocol}),this.sortAttributes(N)}sortAttributes(M){function N(B,P){return(0,o.isNumber)(B.key)?B.key:P.hasStartEnd(B.key)?B.key.start:P.hasHostAndPort(B.key)?B.key.port:Number.MAX_VALUE}return M.sort((B,P)=>N(B,this)-N(P,this))}getOtherAttributes(){return this.defaultPortAttributes}static providedActionToAction(M){switch(M){case D.ProvidedOnAutoForward.Notify:return T.Notify;case D.ProvidedOnAutoForward.OpenBrowser:return T.OpenBrowser;case D.ProvidedOnAutoForward.OpenBrowserOnce:return T.OpenBrowserOnce;case D.ProvidedOnAutoForward.OpenPreview:return T.OpenPreview;case D.ProvidedOnAutoForward.Silent:return T.Silent;case D.ProvidedOnAutoForward.Ignore:return T.Ignore;default:return}}async addAttributes(M,N,B){const V=this.configurationService.inspect(R.SETTING).userRemoteValue;let z;!V||!(0,o.isObject)(V)?z={}:z=(0,a.deepClone)(V),z[`${M}`]||(z[`${M}`]={});for(const U in N)z[`${M}`][U]=N[U];return this.configurationService.updateValue(R.SETTING,z,B)}}e.PortsAttributes=R,R.SETTING="remote.portsAttributes",R.DEFAULTS="remote.otherPortsAttributes",R.RANGE=/^(\d+)\-(\d+)$/,R.HOST_AND_PORT=/^([a-z0-9\-]+):(\d{1,5})$/;const O=10*1e3;let x=class extends I.Disposable{constructor(M,N,B,P,V,z,U,H){super();this.tunnelService=M,this.storageService=N,this.configurationService=B,this.environmentService=P,this.remoteAuthorityResolverService=V,this.workspaceContextService=z,this.logService=U,this.dialogService=H,this.inProgress=new Map,this._onForwardPort=new f.Emitter,this.onForwardPort=this._onForwardPort.event,this._onClosePort=new f.Emitter,this.onClosePort=this._onClosePort.event,this._onPortName=new f.Emitter,this.onPortName=this._onPortName.event,this._onCandidatesChanged=new f.Emitter,this.onCandidatesChanged=this._onCandidatesChanged.event,this._onEnvironmentTunnelsSet=new f.Emitter,this.onEnvironmentTunnelsSet=this._onEnvironmentTunnelsSet.event,this._environmentTunnelsSet=!1,this.portAttributesProviders=[],this.mismatchCooldown=new Date,this.configPortsAttributes=new R(B),this.tunnelRestoreValue=this.getTunnelRestoreValue(),this._register(this.configPortsAttributes.onDidChangeAttributes(this.updateAttributes,this)),this.forwarded=new Map,this.remoteTunnels=new Map,this.tunnelService.tunnels.then(async K=>{const G=await this.getAttributes(K.map(q=>({port:q.tunnelRemotePort,host:q.tunnelRemoteHost})));for(const q of K)if(q.localAddress){const Z=m(q.tunnelRemoteHost,q.tunnelRemotePort),j=y(this._candidates??new Map,q.tunnelRemoteHost,q.tunnelRemotePort);this.forwarded.set(Z,{remotePort:q.tunnelRemotePort,remoteHost:q.tunnelRemoteHost,localAddress:q.localAddress,protocol:G?.get(q.tunnelRemotePort)?.protocol??D.TunnelProtocol.Http,localUri:await this.makeLocalUri(q.localAddress,G?.get(q.tunnelRemotePort)),localPort:q.tunnelLocalPort,runningProcess:j?.detail,hasRunningProcess:!!j,pid:j?.pid,privacy:q.privacy,source:e.UserTunnelSource}),this.remoteTunnels.set(Z,q)}}),this.detected=new Map,this._register(this.tunnelService.onTunnelOpened(async K=>{const G=m(K.tunnelRemoteHost,K.tunnelRemotePort);if(!y(this.forwarded,K.tunnelRemoteHost,K.tunnelRemotePort)&&!y(this.inProgress,K.tunnelRemoteHost,K.tunnelRemotePort)&&K.localAddress){const q=y(this._candidates??new Map,K.tunnelRemoteHost,K.tunnelRemotePort),Z=(await this.getAttributes([{port:K.tunnelRemotePort,host:K.tunnelRemoteHost}]))?.get(K.tunnelRemotePort);this.forwarded.set(G,{remoteHost:K.tunnelRemoteHost,remotePort:K.tunnelRemotePort,localAddress:K.localAddress,protocol:Z?.protocol??D.TunnelProtocol.Http,localUri:await this.makeLocalUri(K.localAddress,Z),localPort:K.tunnelLocalPort,closeable:!0,runningProcess:q?.detail,hasRunningProcess:!!q,pid:q?.pid,privacy:K.privacy,source:e.UserTunnelSource})}await this.storeForwarded(),this.remoteTunnels.set(G,K),this._onForwardPort.fire(this.forwarded.get(G))})),this._register(this.tunnelService.onTunnelClosed(K=>this.onTunnelClosed(K)))}async onTunnelClosed(M){const N=m(M.host,M.port);this.forwarded.has(N)&&(this.forwarded.delete(N),await this.storeForwarded(),this._onClosePort.fire(M))}makeLocalUri(M,N){if(M.startsWith("http"))return u.URI.parse(M);const B=N?.protocol??"http";return u.URI.parse(`${B}://${M}`)}async getStorageKey(){const M=this.workspaceContextService.getWorkspace(),N=M.configuration?(0,i.hash)(M.configuration.path):M.folders.length>0?(0,i.hash)(M.folders[0].uri.path):void 0;return`${n}.${this.environmentService.remoteAuthority}.${N}`}async getTunnelRestoreValue(){const M=this.storageService.get(n,1);return M?(this.storageService.remove(n,1),await this.storeForwarded(),M):this.storageService.get(await this.getStorageKey(),0)}async restoreForwarded(){if(this.configurationService.getValue("remote.restoreForwardedPorts")){const M=await this.tunnelRestoreValue;if(M&&M!==this.knownPortsRestoreValue){const N=JSON.parse(M)??[];this.logService.trace(`ForwardedPorts: (TunnelModel) restoring ports ${N.map(B=>B.remotePort).join(", ")}`);for(let B of N)y(this.detected,B.remoteHost,B.remotePort)||await this.forward({remote:{host:B.remoteHost,port:B.remotePort},local:B.localPort,name:B.name,privacy:B.privacy,elevateIfNeeded:!0})}}if(!this.restoreListener){const M=await this.getStorageKey();this.restoreListener=this._register(this.storageService.onDidChangeValue(async N=>{N.key===M&&(this.tunnelRestoreValue=Promise.resolve(this.storageService.get(await this.getStorageKey(),0)),await this.restoreForwarded())}))}}async storeForwarded(){if(this.configurationService.getValue("remote.restoreForwardedPorts")){const M=JSON.stringify(Array.from(this.forwarded.values()).filter(N=>N.source.source===d.User));M!==this.knownPortsRestoreValue&&(this.knownPortsRestoreValue=M,this.storageService.store(await this.getStorageKey(),this.knownPortsRestoreValue,0,0))}}async showPortMismatchModalIfNeeded(M,N,B){if(!M.tunnelLocalPort||!B?.requireLocalPort||M.tunnelLocalPort===N)return;const P=new Date;if(this.mismatchCooldown.getTime()+O>P.getTime())return;this.mismatchCooldown=P;const V=t.localize(2,null,N,M.tunnelRemotePort,M.tunnelLocalPort);return this.dialogService.show(r.default.Info,V)}async forward(M,N){const B=y(this.forwarded,M.remote.host,M.remote.port);N=N??(N!==null?(await this.getAttributes([M.remote]))?.get(M.remote.port):void 0);const P=M.local!==void 0?M.local:M.remote.port;if(B){const V=N?.label??M.name;return V!==B.name&&(B.name=V,this._onForwardPort.fire()),(N?.protocol||B.protocol!==D.TunnelProtocol.Http)&&N?.protocol!==B.protocol&&(await this.close(B.remoteHost,B.remotePort),M.source=B.source,await this.forward(M,N)),y(this.remoteTunnels,M.remote.host,M.remote.port)}else{const V=this.environmentService.remoteAuthority,z=V?{getAddress:async()=>(await this.remoteAuthorityResolverService.resolveAuthority(V)).authority}:void 0,U=m(M.remote.host,M.remote.port);this.inProgress.set(U,!0);const H=await this.tunnelService.openTunnel(z,M.remote.host,M.remote.port,P,M.elevateIfNeeded?M.elevateIfNeeded:N?.elevateIfNeeded,M.privacy,N?.protocol);if(H&&H.localAddress){const K=y(this._candidates??new Map,M.remote.host,M.remote.port),G=H.protocol?H.protocol===D.TunnelProtocol.Https?D.TunnelProtocol.Https:D.TunnelProtocol.Http:N?.protocol??D.TunnelProtocol.Http,q={remoteHost:H.tunnelRemoteHost,remotePort:H.tunnelRemotePort,localPort:H.tunnelLocalPort,name:N?.label??M.name,closeable:!0,localAddress:H.localAddress,protocol:G,localUri:await this.makeLocalUri(H.localAddress,N),runningProcess:K?.detail,hasRunningProcess:!!K,pid:K?.pid,source:M.source??e.UserTunnelSource,privacy:H.privacy};return this.forwarded.set(U,q),this.remoteTunnels.set(U,H),this.inProgress.delete(U),await this.storeForwarded(),await this.showPortMismatchModalIfNeeded(H,P,N),this._onForwardPort.fire(q),H}}}async name(M,N,B){const P=y(this.forwarded,M,N),V=m(M,N);if(P){P.name=B,await this.storeForwarded(),this._onPortName.fire({host:M,port:N});return}else this.detected.has(V)&&(this.detected.get(V).name=B,this._onPortName.fire({host:M,port:N}))}async close(M,N){return await this.tunnelService.closeTunnel(M,N),this.onTunnelClosed({host:M,port:N})}address(M,N){const B=m(M,N);return(this.forwarded.get(B)||this.detected.get(B))?.localAddress}get environmentTunnelsSet(){return this._environmentTunnelsSet}addEnvironmentTunnels(M){if(M)for(const N of M){const B=y(this._candidates??new Map,N.remoteAddress.host,N.remoteAddress.port),P=typeof N.localAddress=="string"?N.localAddress:m(N.localAddress.host,N.localAddress.port);this.detected.set(m(N.remoteAddress.host,N.remoteAddress.port),{remoteHost:N.remoteAddress.host,remotePort:N.remoteAddress.port,localAddress:P,protocol:D.TunnelProtocol.Http,localUri:this.makeLocalUri(P),closeable:!1,runningProcess:B?.detail,hasRunningProcess:!!B,pid:B?.pid,privacy:D.TunnelPrivacyId.ConstantPrivate,source:{source:d.Extension,description:t.localize(3,null)}})}this._environmentTunnelsSet=!0,this._onEnvironmentTunnelsSet.fire(),this._onForwardPort.fire()}setCandidateFilter(M){this._candidateFilter=M}async setCandidates(M){let N=M;this._candidateFilter&&(N=await this._candidateFilter(M));const B=this.updateInResponseToCandidates(N);this.logService.trace(`ForwardedPorts: (TunnelModel) removed candidates ${Array.from(B.values()).map(P=>P.port).join(", ")}`),this._onCandidatesChanged.fire(B)}updateInResponseToCandidates(M){const N=this._candidates??new Map,B=new Map;return this._candidates=B,M.forEach(P=>{const V=m(P.host,P.port);B.set(V,{host:P.host,port:P.port,detail:P.detail,pid:P.pid}),N.has(V)&&N.delete(V);const z=y(this.forwarded,P.host,P.port);z&&(z.runningProcess=P.detail,z.hasRunningProcess=!0,z.pid=P.pid)}),N.forEach((P,V)=>{const z=b(V);if(!z)return;const U=y(this.forwarded,z.host,z.port);U&&(U.runningProcess=void 0,U.hasRunningProcess=!1,U.pid=void 0);const H=y(this.detected,z.host,z.port);H&&(H.runningProcess=void 0,H.hasRunningProcess=!1,H.pid=void 0)}),N}get candidates(){return this._candidates?Array.from(this._candidates.values()):[]}get candidatesOrUndefined(){return this._candidates?this.candidates:void 0}async updateAttributes(){const M=Array.from(this.forwarded.values()),N=await this.getAttributes(M.map(B=>({port:B.remotePort,host:B.remoteHost})),!1);if(!!N)for(const B of M){const P=N.get(B.remotePort);(P?.protocol||B.protocol!==D.TunnelProtocol.Http)&&P?.protocol!==B.protocol&&await this.forward({remote:{host:B.remoteHost,port:B.remotePort},local:B.localPort,name:B.name,source:B.source},P),!!P&&P.label&&P.label!==B.name&&await this.name(B.remoteHost,B.remotePort,P.label)}}async getAttributes(M,N=!0){const B=new Map,P=new Map;M.forEach(K=>{const G=y(this._candidates??new Map,D.LOCALHOST_ADDRESSES[0],K.port);G&&(B.set(K.port,G),P.has(G.pid)||P.set(G.pid,[]),P.get(G.pid)?.push(K.port))});const V=new Map;if(M.forEach(K=>{const G=this.configPortsAttributes.getAttributes(K.port,K.host,B.get(K.port)?.detail);G&&V.set(K.port,G)}),this.portAttributesProviders.length===0||!N)return V.size>0?V:void 0;const z=await Promise.all((0,l.flatten)(this.portAttributesProviders.map(K=>Array.from(P.entries()).map(G=>{const q=G[1],Z=B.get(q[0]);return K.providePortAttributes(q,Z?.pid,Z?.detail,new s.CancellationTokenSource().token)})))),U=new Map;if(z.forEach(K=>K.forEach(G=>{G&&U.set(G.port,G)})),!V&&!U)return;const H=new Map;return M.forEach(K=>{const G=V.get(K.port),q=U.get(K.port);H.set(K.port,{elevateIfNeeded:G?.elevateIfNeeded,label:G?.label,onAutoForward:G?.onAutoForward??R.providedActionToAction(q?.autoForwardAction),requireLocalPort:G?.requireLocalPort,protocol:G?.protocol})}),H}addAttributesProvider(M){this.portAttributesProviders.push(M)}};x=Ee([W(0,D.ITunnelService),W(1,k.IStorageService),W(2,w.IConfigurationService),W(3,C.IWorkbenchEnvironmentService),W(4,v.IRemoteAuthorityResolverService),W(5,c.IWorkspaceContextService),W(6,S.ILogService),W(7,p.IDialogService)],x),e.TunnelModel=x;let F=class{constructor(M,N,B,P,V,z,U,H){this.storageService=M,this.tunnelService=N,this._targetType=[],this._onDidChangeTargetType=new f.Emitter,this.onDidChangeTargetType=this._onDidChangeTargetType.event,this._onDidChangeEditable=new f.Emitter,this.onDidChangeEditable=this._onDidChangeEditable.event,this._onEnabledPortsFeatures=new f.Emitter,this.onEnabledPortsFeatures=this._onEnabledPortsFeatures.event,this._portsFeaturesEnabled=!1,this.namedProcesses=new Map,this._tunnelModel=new x(N,M,B,P,V,z,U,H)}set targetType(M){const N=this._targetType.length>0?this._targetType[0]:"",B=M.length>0?M[0]:"";N!==B&&(this._targetType=M,this.storageService.store(e.REMOTE_EXPLORER_TYPE_KEY,this._targetType.toString(),1,0),this.storageService.store(e.REMOTE_EXPLORER_TYPE_KEY,this._targetType.toString(),0,0),this._onDidChangeTargetType.fire(this._targetType))}get targetType(){return this._targetType}get tunnelModel(){return this._tunnelModel}forward(M,N){return this.tunnelModel.forward(M,N)}close(M){return this.tunnelModel.close(M.host,M.port)}setTunnelInformation(M){M?.features&&this.tunnelService.setTunnelFeatures(M.features),this.tunnelModel.addEnvironmentTunnels(M?.environmentTunnels)}setEditable(M,N,B){B?this._editable={tunnelItem:M,data:B,editId:N}:this._editable=void 0,this._onDidChangeEditable.fire(M?{tunnel:M,editId:N}:void 0)}getEditableData(M,N){return this._editable&&(!M&&M===this._editable.tunnelItem||M&&this._editable.tunnelItem?.remotePort===M.remotePort&&this._editable.tunnelItem.remoteHost===M.remoteHost&&this._editable.editId===N)?this._editable.data:void 0}setCandidateFilter(M){return M?(this.tunnelModel.setCandidateFilter(M),{dispose:()=>{this.tunnelModel.setCandidateFilter(void 0)}}):{dispose:()=>{}}}onFoundNewCandidates(M){this.tunnelModel.setCandidates(M)}restore(){return this.tunnelModel.restoreForwarded()}enablePortsFeatures(){this._portsFeaturesEnabled=!0,this._onEnabledPortsFeatures.fire()}get portsFeaturesEnabled(){return this._portsFeaturesEnabled}};F=Ee([W(0,k.IStorageService),W(1,D.ITunnelService),W(2,w.IConfigurationService),W(3,C.IWorkbenchEnvironmentService),W(4,v.IRemoteAuthorityResolverService),W(5,c.IWorkspaceContextService),W(6,S.ILogService),W(7,p.IDialogService)],F),(0,A.registerSingleton)(e.IRemoteExplorerService,F,!0)}),define(ne[2535],re([1,0,1362,65,2113,75,274,212,2,26,8,31,109,17,57]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadTunnelService=void 0;let S=class extends I.Disposable{constructor(l,r,p,u,a,n,h){super();this.remoteExplorerService=r,this.tunnelService=p,this.notificationService=u,this.configurationService=a,this.logService=n,this.remoteAgentService=h,this.elevateionRetry=!1,this.portsAttributesProviders=new Map,this._alreadyRegistered=!1,this._proxy=l.getProxy(f.ExtHostContext.ExtHostTunnelService),this._register(p.onTunnelOpened(()=>this._proxy.$onDidTunnelsChange())),this._register(p.onTunnelClosed(()=>this._proxy.$onDidTunnelsChange()))}processFindingEnabled(){return(!!this.configurationService.getValue(k.PORT_AUTO_FORWARD_SETTING)||this.tunnelService.hasTunnelProvider)&&this.configurationService.getValue(k.PORT_AUTO_SOURCE_SETTING)===k.PORT_AUTO_SOURCE_SETTING_PROCESS}async $setRemoteTunnelService(l){this.remoteExplorerService.namedProcesses.set(l,"Code Extension Host"),this.remoteExplorerService.portsFeaturesEnabled?this._proxy.$registerCandidateFinder(this.processFindingEnabled()):this._register(this.remoteExplorerService.onEnabledPortsFeatures(()=>this._proxy.$registerCandidateFinder(this.configurationService.getValue(k.PORT_AUTO_FORWARD_SETTING)))),this._register(this.configurationService.onDidChangeConfiguration(async r=>{if(r.affectsConfiguration(k.PORT_AUTO_FORWARD_SETTING)||r.affectsConfiguration(k.PORT_AUTO_SOURCE_SETTING))return this._proxy.$registerCandidateFinder(this.processFindingEnabled())})),this._register(this.tunnelService.onAddedTunnelProvider(()=>this._proxy.$registerCandidateFinder(this.processFindingEnabled())))}async $registerPortsAttributesProvider(l,r){this.portsAttributesProviders.set(r,l),this._alreadyRegistered||(this.remoteExplorerService.tunnelModel.addAttributesProvider(this),this._alreadyRegistered=!0)}async $unregisterPortsAttributesProvider(l){this.portsAttributesProviders.delete(l)}async providePortAttributes(l,r,p,u){if(this.portsAttributesProviders.size===0)return[];const a=Array.from(this.portsAttributesProviders.entries()).filter(n=>{const h=n[1],g=h.portRange,d=g?l.some(E=>g[0]<=E&&E<g[1]):!0,m=!h.pid||h.pid===r,b=!h.commandMatcher||p&&p.match(h.commandMatcher);return d&&m&&b}).map(n=>n[0]);return a.length===0?[]:this._proxy.$providePortAttributes(a,l,r,p,u)}async $openTunnel(l,r){const p=await this.remoteExplorerService.forward({remote:l.remoteAddress,local:l.localAddressPort,name:l.label,source:{source:k.TunnelSource.Extension,description:r},elevateIfNeeded:!1});if(p)return!this.elevateionRetry&&l.localAddressPort!==void 0&&p.tunnelLocalPort!==void 0&&(0,D.isPortPrivileged)(l.localAddressPort)&&p.tunnelLocalPort!==l.localAddressPort&&this.tunnelService.canElevate&&this.elevationPrompt(l,p,r),_.TunnelDtoConverter.fromServiceTunnel(p)}async elevationPrompt(l,r,p){return this.notificationService.prompt(w.Severity.Info,t.localize(0,null,p,l.remoteAddress.port,l.localAddressPort),[{label:t.localize(1,null,r.tunnelRemotePort),run:async()=>{this.elevateionRetry=!0,await this.remoteExplorerService.close({host:r.tunnelRemoteHost,port:r.tunnelRemotePort}),await this.remoteExplorerService.forward({remote:l.remoteAddress,local:l.localAddressPort,name:l.label,source:{source:k.TunnelSource.Extension,description:p},elevateIfNeeded:!0}),this.elevateionRetry=!1}}])}async $closeTunnel(l){return this.remoteExplorerService.close(l)}async $getTunnels(){return(await this.tunnelService.tunnels).map(l=>({remoteAddress:{port:l.tunnelRemotePort,host:l.tunnelRemoteHost},localAddress:l.localAddress,privacy:l.privacy,protocol:l.protocol}))}async $onFoundNewCandidates(l){this.remoteExplorerService.onFoundNewCandidates(l)}async $setTunnelProvider(l){const r={forwardPort:(p,u)=>this._proxy.$forwardPort(p,u).then(n=>{if(this.logService.trace(`ForwardedPorts: (MainThreadTunnelService) New tunnel established by tunnel provider: ${n?.remoteAddress.host}:${n?.remoteAddress.port}`),!!n)return{tunnelRemotePort:n.remoteAddress.port,tunnelRemoteHost:n.remoteAddress.host,localAddress:typeof n.localAddress=="string"?n.localAddress:(0,k.makeAddress)(n.localAddress.host,n.localAddress.port),tunnelLocalPort:typeof n.localAddress!="string"?n.localAddress.port:void 0,public:n.public,privacy:n.privacy,protocol:n.protocol??D.TunnelProtocol.Http,dispose:async h=>(this.logService.trace(`ForwardedPorts: (MainThreadTunnelService) Closing tunnel from tunnel provider: ${n?.remoteAddress.host}:${n?.remoteAddress.port}`),this._proxy.$closeTunnel({host:n.remoteAddress.host,port:n.remoteAddress.port},h))}})};this.tunnelService.setTunnelProvider(r),l&&this.tunnelService.setTunnelFeatures(l)}async $setCandidateFilter(){this.remoteExplorerService.setCandidateFilter(l=>this._proxy.$applyCandidateFilter(l))}async $setCandidatePortSource(l){this.remoteAgentService.getEnvironment().then(()=>{switch(l){case f.CandidatePortSource.None:{c.Registry.as(i.Extensions.Configuration).registerDefaultConfigurations([{overrides:{"remote.autoForwardPorts":!1}}]);break}case f.CandidatePortSource.Output:{c.Registry.as(i.Extensions.Configuration).registerDefaultConfigurations([{overrides:{"remote.autoForwardPortsSource":k.PORT_AUTO_SOURCE_SETTING_OUTPUT}}]);break}default:}}).catch(()=>{})}};S=Ee([(0,A.extHostNamedCustomer)(f.MainContext.MainThreadTunnelService),W(1,k.IRemoteExplorerService),W(2,D.ITunnelService),W(3,w.INotificationService),W(4,v.IConfigurationService),W(5,C.ILogService),W(6,o.IRemoteAgentService)],S),e.MainThreadTunnelService=S}),define(ne[2536],re([1,0,2,233,274]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowCandidateContribution=void 0;let A=class extends t.Disposable{constructor(D,I){super();const w=I.options?.tunnelProvider?.showPortCandidate;w&&this._register(D.setCandidateFilter(async v=>{const C=await Promise.all(v.map(c=>w(c.host,c.port,c.detail??""))),o=[];if(C.length!==v.length)return v;for(let c=0;c<v.length;c++)C[c]&&o.push(v[c]);return o}))}};A=Ee([W(0,_.IRemoteExplorerService),W(1,f.IBrowserWorkbenchEnvironmentService)],A),e.ShowCandidateContribution=A}),define(ne[2537],re([1,0,1697,212,2,233,41,9,274,31]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TunnelFactoryContribution=void 0;let v=class extends _.Disposable{constructor(o,c,i,S,s){super();this.openerService=i;const l=c.options?.tunnelProvider?.tunnelFactory;if(l){let r=c.options?.tunnelProvider?.features?.privacyOptions??[];c.options?.tunnelProvider?.features?.public&&r.length===0&&(r=[{id:"private",label:t.localize(0,null),themeIcon:"lock"},{id:"public",label:t.localize(1,null),themeIcon:"eye"}]),this._register(o.setTunnelProvider({forwardPort:async(u,a)=>{let n;try{n=l(u,a)}catch{s.trace("tunnelFactory: tunnel provider error")}if(!n)return;let h;try{h=await n}catch{s.trace("tunnelFactory: tunnel provider promise error");return}const g=h.localAddress.startsWith("http")?h.localAddress:`http://${h.localAddress}`;return{tunnelRemotePort:h.remoteAddress.port,tunnelRemoteHost:h.remoteAddress.host,localAddress:await this.resolveExternalUri(g),privacy:h.privacy??(h.public?f.TunnelPrivacyId.Public:f.TunnelPrivacyId.Private),protocol:h.protocol??f.TunnelProtocol.Http,dispose:async()=>{await h.dispose()}}}}));const p=c.options?.tunnelProvider?.features?{features:{elevation:!!c.options?.tunnelProvider?.features?.elevation,public:!!c.options?.tunnelProvider?.features?.public,privacyOptions:r}}:void 0;S.setTunnelInformation(p)}}async resolveExternalUri(o){try{return(await this.openerService.resolveExternalUri(D.URI.parse(o))).resolved.toString()}catch{return o}}};v=Ee([W(0,f.ITunnelService),W(1,A.IBrowserWorkbenchEnvironmentService),W(2,k.IOpenerService),W(3,I.IRemoteExplorerService),W(4,w.ILogService)],v),e.TunnelFactoryContribution=v}),define(ne[2538],re([1,0,1698,10,43,38,37,7,8,5,41,53,28,6,2,78,234,36,16,73,274,95,26,183,68,150,12,131,9,212,99,94,27,134,586,502,30,14,71,162,32,117,219,82,33,1117]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H,K){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.portWithRunningProcessForeground=e.OpenPortInPreviewAction=e.OpenPortInBrowserAction=e.ForwardPortAction=e.TunnelPanelDescriptor=e.TunnelPanel=e.TunnelCloseableContextKey=e.TunnelTypeContextKey=e.TunnelViewModel=e.forwardedPortsViewEnabled=void 0,e.forwardedPortsViewEnabled=new D.RawContextKey("forwardedPortsViewEnabled",!1,t.localize(0,null));class G{constructor(Fe){this.remoteExplorerService=Fe,this.headerRowHeight=22}getHeight(Fe){return Fe.tunnelType===u.TunnelType.Add&&!this.remoteExplorerService.getEditableData(void 0)?30:22}}let q=class{constructor(Fe,Qe){this.remoteExplorerService=Fe,this.tunnelService=Qe,this._candidates=new Map,this.input={label:t.localize(1,null),icon:void 0,tunnelType:u.TunnelType.Add,hasRunningProcess:!1,remoteHost:"",remotePort:0,processDescription:"",tooltipPostfix:"",iconTooltip:"",portTooltip:"",processTooltip:"",originTooltip:"",privacyTooltip:"",source:{source:u.TunnelSource.User,description:""},protocol:y.TunnelProtocol.Http,privacy:{id:y.TunnelPrivacyId.Private,themeIcon:F.privatePortIcon.id,label:t.localize(2,null)},strip:()=>{}},this.model=Fe.tunnelModel,this.onForwardedPortsChanged=c.Event.any(this.model.onForwardPort,this.model.onClosePort,this.model.onPortName,this.model.onCandidatesChanged)}get all(){const Fe=[];return this._candidates=new Map,this.model.candidates.forEach(Qe=>{this._candidates.set((0,u.makeAddress)(Qe.host,Qe.port),Qe)}),(this.model.forwarded.size>0||this.remoteExplorerService.getEditableData(void 0))&&Fe.push(...this.forwarded),this.model.detected.size>0&&Fe.push(...this.detected),Fe.push(this.input),Fe}addProcessInfoFromCandidate(Fe){const Qe=(0,u.makeAddress)(Fe.remoteHost,Fe.remotePort);this._candidates.has(Qe)&&(Fe.processDescription=this._candidates.get(Qe).detail)}get forwarded(){return Array.from(this.model.forwarded.values()).map(Qe=>{const qe=se.createFromTunnel(this.remoteExplorerService,this.tunnelService,Qe);return this.addProcessInfoFromCandidate(qe),qe}).sort((Qe,qe)=>Qe.remotePort===qe.remotePort?Qe.remoteHost<qe.remoteHost?-1:1:Qe.remotePort<qe.remotePort?-1:1)}get detected(){return Array.from(this.model.detected.values()).map(Fe=>{const Qe=se.createFromTunnel(this.remoteExplorerService,this.tunnelService,Fe,u.TunnelType.Detected,!1);return this.addProcessInfoFromCandidate(Qe),Qe})}isEmpty(){return this.detected.length===0&&(this.forwarded.length===0||this.forwarded.length===1&&this.forwarded[0].tunnelType===u.TunnelType.Add&&!this.remoteExplorerService.getEditableData(void 0))}};q=Ee([W(0,u.IRemoteExplorerService),W(1,y.ITunnelService)],q),e.TunnelViewModel=q;function Z(Ze){return{label:"",tunnel:Ze,editId:u.TunnelEditId.None,tooltip:""}}class j{constructor(){this.label="",this.tooltip="",this.weight=1,this.minimumWidth=40,this.maximumWidth=40,this.templateId="actionbar"}project(Fe){if(Fe.tunnelType===u.TunnelType.Add)return Z(Fe);const Qe=Fe.processDescription?F.forwardedPortWithProcessIcon:F.forwardedPortWithoutProcessIcon;let qe="";return Fe instanceof se&&(qe=`${Fe.iconTooltip} ${Fe.tooltipPostfix}`),{label:"",icon:Qe,tunnel:Fe,editId:u.TunnelEditId.None,tooltip:qe}}}class X{constructor(){this.label=t.localize(3,null),this.tooltip=t.localize(4,null),this.weight=1,this.templateId="actionbar"}project(Fe){const Qe=Fe.tunnelType===u.TunnelType.Add,qe=Fe.label;let Be="";return Fe instanceof se&&!Qe?Be=`${Fe.portTooltip} ${Fe.tooltipPostfix}`:Be=qe,{label:qe,tunnel:Fe,menuId:r.MenuId.TunnelPortInline,editId:Fe.tunnelType===u.TunnelType.Add?u.TunnelEditId.New:u.TunnelEditId.Label,tooltip:Be}}}class Y{constructor(){this.label=t.localize(5,null),this.tooltip=t.localize(6,null),this.weight=1,this.templateId="actionbar"}project(Fe){if(Fe.tunnelType===u.TunnelType.Add)return Z(Fe);const Qe=Fe.localAddress??"";let qe=Qe;return Fe instanceof se&&(qe=Fe.tooltipPostfix),{label:Qe,menuId:r.MenuId.TunnelLocalAddressInline,tunnel:Fe,editId:u.TunnelEditId.LocalPort,tooltip:qe,markdownTooltip:Qe?Y.getHoverText(Qe):void 0}}static getHoverText(Fe){return function(Qe){const qe=Qe.getValue("editor");let Be="";qe.multiCursorModifier==="ctrlCmd"?N.isMacintosh?Be=t.localize(7,null):Be=t.localize(8,null):N.isMacintosh?Be=t.localize(9,null):Be=t.localize(10,null);const Ke=new z.MarkdownString("",!0),Xe=Fe.startsWith("http")?Fe:`http://${Fe}`;return Ke.appendLink(Xe,"Follow link").appendMarkdown(` (${Be})`)}}}class ${constructor(){this.label=t.localize(11,null),this.tooltip=t.localize(12,null),this.weight=2,this.templateId="actionbar"}project(Fe){return Fe.tunnelType===u.TunnelType.Add?Z(Fe):{label:Fe.processDescription??"",tunnel:Fe,editId:u.TunnelEditId.None,tooltip:Fe instanceof se?Fe.processTooltip:""}}}class J{constructor(){this.label=t.localize(13,null),this.tooltip=t.localize(14,null),this.weight=1,this.templateId="actionbar"}project(Fe){if(Fe.tunnelType===u.TunnelType.Add)return Z(Fe);const Qe=Fe.source.description,qe=`${Fe instanceof se?Fe.originTooltip:""}. ${Fe instanceof se?Fe.tooltipPostfix:""}`;return{label:Qe,menuId:r.MenuId.TunnelOriginInline,tunnel:Fe,editId:u.TunnelEditId.None,tooltip:qe}}}class ee{constructor(){this.label=t.localize(15,null),this.tooltip=t.localize(16,null),this.weight=1,this.templateId="actionbar"}project(Fe){if(Fe.tunnelType===u.TunnelType.Add)return Z(Fe);const Qe=Fe.privacy?.label;let qe="";return Fe instanceof se&&(qe=`${Fe.privacy.label} ${Fe.tooltipPostfix}`),{label:Qe,tunnel:Fe,icon:{id:Fe.privacy.themeIcon},editId:u.TunnelEditId.None,tooltip:qe}}}let te=class extends i.Disposable{constructor(Fe,Qe,qe,Be,Ke,Xe,rt,it,at){super();this.instantiationService=Fe,this.contextKeyService=Qe,this.menuService=qe,this.contextViewService=Be,this.themeService=Ke,this.remoteExplorerService=Xe,this.commandService=rt,this.configurationService=it,this.hoverService=at,this.templateId="actionbar"}set actionRunner(Fe){this._actionRunner=Fe}renderTemplate(Fe){const Qe=f.append(Fe,f.$(".ports-view-actionbar-cell")),qe=f.append(Qe,f.$(".ports-view-actionbar-cell-icon")),Be=new s.IconLabel(Qe,{supportHighlights:!0,hoverDelegate:{showHover:rt=>this.hoverService.showHover(rt),delay:this.configurationService.getValue("workbench.hover.delay")}}),Ke=f.append(Qe,f.$(".actions")),Xe=new S.ActionBar(Ke,{actionViewItemProvider:p.createActionViewItem.bind(void 0,this.instantiationService)});return{label:Be,icon:qe,actionBar:Xe,container:Qe,elementDisposable:i.Disposable.None}}renderElement(Fe,Qe,qe){qe.actionBar.clear(),qe.icon.className="ports-view-actionbar-cell-icon",qe.icon.style.display="none",qe.label.setLabel(""),qe.label.element.style.display="none",qe.container.style.height="22px",qe.button&&(qe.button.element.style.display="none",qe.button.dispose()),qe.container.style.paddingLeft="0px",qe.elementDisposable.dispose();let Be;Fe.editId===u.TunnelEditId.New&&(Be=this.remoteExplorerService.getEditableData(void 0))?this.renderInputBox(qe.container,Be):(Be=this.remoteExplorerService.getEditableData(Fe.tunnel,Fe.editId),Be?this.renderInputBox(qe.container,Be):Fe.tunnel.tunnelType===u.TunnelType.Add&&Fe.menuId===r.MenuId.TunnelPortInline?this.renderButton(Fe,qe):this.renderActionBarItem(Fe,qe))}renderButton(Fe,Qe){Qe.container.style.paddingLeft="7px",Qe.container.style.height="28px",Qe.button=this._register(new P.Button(Qe.container)),Qe.button.label=Fe.label,Qe.button.element.title=Fe.tooltip,this._register((0,g.attachButtonStyler)(Qe.button,this.themeService)),this._register(Qe.button.onDidClick(()=>{this.commandService.executeCommand(ke.INLINE_ID)}))}tunnelContext(Fe){let Qe;return Fe instanceof se&&(Qe=Fe.strip()),Qe||(Qe={tunnelType:Fe.tunnelType,remoteHost:Fe.remoteHost,remotePort:Fe.remotePort,localAddress:Fe.localAddress,protocol:Fe.protocol,localUri:Fe.localUri,localPort:Fe.localPort,name:Fe.name,closeable:Fe.closeable,source:Fe.source,privacy:Fe.privacy,processDescription:Fe.processDescription,label:Fe.label}),Qe}renderActionBarItem(Fe,Qe){Qe.label.element.style.display="flex",Qe.label.setLabel(Fe.label,void 0,{title:Fe.markdownTooltip?{markdown:Fe.markdownTooltip(this.configurationService),markdownNotSupportedFallback:Fe.tooltip}:Fe.tooltip,extraClasses:Fe.menuId===r.MenuId.TunnelLocalAddressInline?["ports-view-actionbar-cell-localaddress"]:void 0}),Qe.actionBar.context=this.tunnelContext(Fe.tunnel),Qe.container.style.paddingLeft="10px";const qe=[["view",u.TUNNEL_VIEW_ID],[e.TunnelTypeContextKey.key,Fe.tunnel.tunnelType],[e.TunnelCloseableContextKey.key,Fe.tunnel.closeable],[ie.key,Fe.tunnel.privacy.id],[le.key,Fe.tunnel.protocol]],Be=this.contextKeyService.createOverlay(qe),Ke=new i.DisposableStore;if(Qe.elementDisposable=Ke,Fe.menuId){const Xe=Ke.add(this.menuService.createMenu(Fe.menuId,Be));let rt=[];if(Ke.add((0,p.createAndFillInActionBarActions)(Xe,{shouldForwardArgs:!0},rt)),rt){let it=rt.filter(at=>at.id.toLowerCase().indexOf("label")>=0);it.length>1&&(it.sort((at,ft)=>at.label.length-ft.label.length),it.pop(),rt=rt.filter(at=>it.indexOf(at)<0)),Qe.actionBar.push(rt,{icon:!0,label:!1}),this._actionRunner&&(Qe.actionBar.actionRunner=this._actionRunner)}}Fe.icon&&(Qe.icon.className=`ports-view-actionbar-cell-icon ${m.ThemeIcon.asClassName(Fe.icon)}`,Qe.icon.title=Fe.tooltip,Qe.icon.style.display="inline")}renderInputBox(Fe,Qe){this.inputDone&&(this.inputDone(!1,!1),this.inputDone=void 0),Fe.style.paddingLeft="5px";const qe=Qe.startingValue||"",Be=new h.InputBox(Fe,this.contextViewService,{ariaLabel:t.localize(17,null),validationOptions:{validation:it=>{const at=Qe.validationMessage(it);return at?{content:at.content,formatContent:!0,type:at.severity===n.Severity.Error?3:1}:null}},placeholder:Qe.placeholder||""}),Ke=(0,g.attachInputBoxStyler)(Be,this.themeService);Be.value=qe,Be.focus(),Be.select({start:0,end:Qe.startingValue?Qe.startingValue.length:0});const Xe=(0,d.once)(async(it,at)=>{(0,i.dispose)(rt),this.inputDone&&(this.inputDone=void 0),Be.element.style.display="none";const ft=Be.value;if(at)return Qe.onFinish(ft,it)});this.inputDone=Xe;const rt=[Be,f.addStandardDisposableListener(Be.inputElement,f.EventType.KEY_DOWN,async it=>{if(it.equals(3))return it.stopPropagation(),Be.validate()!==3?Xe(!0,!0):Xe(!1,!0);if(it.equals(9))return it.preventDefault(),it.stopPropagation(),Xe(!1,!0)}),f.addDisposableListener(Be.inputElement,f.EventType.BLUR,()=>Xe(Be.validate()!==3,!0)),Ke];return(0,i.toDisposable)(()=>{Xe(!1,!1)})}disposeElement(Fe,Qe,qe,Be){qe.elementDisposable.dispose()}disposeTemplate(Fe){Fe.label.dispose(),Fe.actionBar.dispose(),Fe.elementDisposable.dispose(),Fe.button?.dispose()}};te=Ee([W(0,w.IInstantiationService),W(1,D.IContextKeyService),W(2,r.IMenuService),W(3,k.IContextViewService),W(4,m.IThemeService),W(5,u.IRemoteExplorerService),W(6,o.ICommandService),W(7,I.IConfigurationService),W(8,U.IHoverService)],te);class se{constructor(Fe,Qe,qe,Be,Ke,Xe,rt,it,at,ft,vt,Dt,kt,At,St,He){this.tunnelType=Fe,this.remoteHost=Qe,this.remotePort=qe,this.source=Be,this.hasRunningProcess=Ke,this.protocol=Xe,this.localUri=rt,this.localAddress=it,this.localPort=at,this.closeable=ft,this.name=vt,this.runningProcess=Dt,this.pid=kt,this._privacy=At,this.remoteExplorerService=St,this.tunnelService=He}static createFromTunnel(Fe,Qe,qe,Be=u.TunnelType.Forwarded,Ke){return new se(Be,qe.remoteHost,qe.remotePort,qe.source,!!qe.hasRunningProcess,qe.protocol,qe.localUri,qe.localAddress,qe.localPort,Ke===void 0?qe.closeable:Ke,qe.name,qe.runningProcess,qe.pid,qe.privacy,Fe,Qe)}strip(){return new se(this.tunnelType,this.remoteHost,this.remotePort,this.source,this.hasRunningProcess,this.protocol,this.localUri,this.localAddress,this.localPort,this.closeable,this.name,this.runningProcess,this.pid,this._privacy)}get label(){if(this.tunnelType===u.TunnelType.Add&&this.name)return this.name;const Fe=(0,y.isLocalhost)(this.remoteHost)||(0,y.isAllInterfaces)(this.remoteHost)?`${this.remotePort}`:`${this.remoteHost}:${this.remotePort}`;return this.name?`${this.name} (${Fe})`:Fe}set processDescription(Fe){this.runningProcess=Fe}get processDescription(){let Fe="";return this.runningProcess?(this.pid&&this.remoteExplorerService?.namedProcesses.has(this.pid)?Fe=this.remoteExplorerService.namedProcesses.get(this.pid):Fe=this.runningProcess.replace(/\0/g," ").trim(),this.pid&&(Fe+=` (${this.pid})`)):this.hasRunningProcess&&(Fe=t.localize(18,null)),Fe}get tooltipPostfix(){let Fe;return this.localAddress?Fe=t.localize(19,null,this.remoteHost,this.remotePort,this.localAddress):Fe=t.localize(20,null,this.remoteHost,this.remotePort),Fe}get iconTooltip(){return this.tunnelType===u.TunnelType.Add?this.label:`${this.processDescription?t.localize(21,null):t.localize(22,null)}`}get portTooltip(){return this.tunnelType===u.TunnelType.Add?"":`${this.name?t.localize(23,null,this.name):""}`}get processTooltip(){return this.processDescription??""}get originTooltip(){return this.source.description}get privacy(){return this.tunnelService?.privacyOptions?this.tunnelService?.privacyOptions.find(Fe=>Fe.id===this._privacy)??{id:"",themeIcon:K.Codicon.question.id,label:t.localize(24,null)}:{id:y.TunnelPrivacyId.Private,themeIcon:F.privatePortIcon.id,label:t.localize(25,null)}}}e.TunnelTypeContextKey=new D.RawContextKey("tunnelType",u.TunnelType.Add,!0),e.TunnelCloseableContextKey=new D.RawContextKey("tunnelCloseable",!1,!0);const ie=new D.RawContextKey("tunnelPrivacy",void 0,!0),ce=new D.RawContextKey("tunnelPrivacyEnabled",!1,!0),le=new D.RawContextKey("tunnelProtocol",y.TunnelProtocol.Http,!0),ae=new D.RawContextKey("tunnelViewFocus",!1,t.localize(26,null)),ue="tunnelViewSelection",oe=new D.RawContextKey(ue,void 0,!0),fe="tunnelViewMultiSelection",pe=new D.RawContextKey(fe,void 0,!0),me=new D.RawContextKey("portChangable",!1,!0),be=new D.RawContextKey("isWeb",N.isWeb,!0);let Ce=class aa extends b.ViewPane{constructor(Fe,Qe,qe,Be,Ke,Xe,rt,it,at,ft,vt,Dt,kt,At,St,He,ct,lt){super(Qe,qe,Be,Xe,Ke,it,rt,at,kt,St);this.viewModel=Fe,this.quickInputService=ft,this.commandService=vt,this.menuService=Dt,this.remoteExplorerService=At,this.tunnelService=He,this.contextViewService=ct,this.hoverService=lt,this.isEditing=!1,this.titleActions=[],this.lastFocus=[],this.titleActionsDisposable=this._register(new i.MutableDisposable),this.tunnelTypeContext=e.TunnelTypeContextKey.bindTo(Ke),this.tunnelCloseableContext=e.TunnelCloseableContextKey.bindTo(Ke),this.tunnelPrivacyContext=ie.bindTo(Ke),this.tunnelPrivacyEnabledContext=ce.bindTo(Ke),this.tunnelPrivacyEnabledContext.set(He.privacyOptions.length!==0),this.tunnelProtocolContext=le.bindTo(Ke),this.tunnelViewFocusContext=ae.bindTo(Ke),this.tunnelViewSelectionContext=oe.bindTo(Ke),this.tunnelViewMultiSelectionContext=pe.bindTo(Ke),this.portChangableContextKey=me.bindTo(Ke);const ut=this._register(this.contextKeyService.createOverlay([["view",aa.ID]])),pt=this._register(this.menuService.createMenu(r.MenuId.TunnelTitle,ut)),Et=()=>{this.titleActions=[],this.titleActionsDisposable.value=(0,p.createAndFillInActionBarActions)(pt,void 0,this.titleActions),this.updateActions()};this._register(pt.onDidChange(Et)),Et(),this._register((0,i.toDisposable)(()=>{this.titleActions=[]})),this.registerPrivacyActions()}registerPrivacyActions(){for(const Fe of this.tunnelService.privacyOptions){const Qe=`remote.tunnel.privacy${Fe.id}`;o.CommandsRegistry.registerCommand(Qe,Ae.handler(Fe.id)),r.MenuRegistry.appendMenuItem(r.MenuId.TunnelPrivacy,{order:0,command:{id:Qe,title:Fe.label,toggled:ie.isEqualTo(Fe.id)}})}}get portCount(){return this.remoteExplorerService.tunnelModel.forwarded.size+this.remoteExplorerService.tunnelModel.detected.size}renderBody(Fe){super.renderBody(Fe);const Qe=f.append(Fe,f.$(".tree-explorer-viewlet-tree-view")),qe=f.append(Qe,f.$(".customview-tree"));qe.classList.add("ports-view"),qe.classList.add("file-icon-themable-tree","show-file-icons");const Be=new te(this.instantiationService,this.contextKeyService,this.menuService,this.contextViewService,this.themeService,this.remoteExplorerService,this.commandService,this.configurationService,this.hoverService),Ke=[new j,new X,new Y,new $];this.tunnelService.canChangePrivacy&&Ke.push(new ee),Ke.push(new J),this.table=this.instantiationService.createInstance(B.WorkbenchTable,"RemoteTunnels",qe,new G(this.remoteExplorerService),Ke,[Be],{keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:at=>at.label},multipleSelectionSupport:!0,accessibilityProvider:{getAriaLabel:at=>at instanceof se?`${at.tooltipPostfix} ${at.portTooltip} ${at.iconTooltip} ${at.processTooltip} ${at.originTooltip} ${this.tunnelService.canChangePrivacy?at.privacy.label:""}`:at.label,getWidgetAriaLabel:()=>t.localize(28,null)},openOnSingleClick:!0});const Xe=new l.ActionRunner;Be.actionRunner=Xe,this._register(this.table.onContextMenu(at=>this.onContextMenu(at,Xe))),this._register(this.table.onMouseDblClick(at=>this.onMouseDblClick(at))),this._register(this.table.onDidChangeFocus(at=>this.onFocusChanged(at))),this._register(this.table.onDidChangeSelection(at=>this.onSelectionChanged(at))),this._register(this.table.onDidFocus(()=>this.tunnelViewFocusContext.set(!0))),this._register(this.table.onDidBlur(()=>this.tunnelViewFocusContext.set(!1)));const rt=()=>this.table.splice(0,Number.POSITIVE_INFINITY,this.viewModel.all);rt();let it=this.portCount;this._register(c.Event.debounce(this.viewModel.onForwardedPortsChanged,(at,ft)=>ft,50)(()=>{const at=this.portCount;(it===0||at===0)&&it!==at&&this._onDidChangeViewWelcomeState.fire(),it=at,rt()})),this._register(this.table.onMouseClick(at=>{if(this.hasOpenLinkModifier(at.browserEvent)){const ft=this.table.getSelectedElements();(ft.length===0||ft.length===1&&ft[0]===at.element)&&this.commandService.executeCommand(De.ID,at.element)}})),this._register(this.table.onDidOpen(at=>{!at.element||at.element.tunnelType!==u.TunnelType.Forwarded||at.browserEvent?.type==="dblclick"&&this.commandService.executeCommand(he.ID)})),this._register(this.remoteExplorerService.onDidChangeEditable(at=>{this.isEditing=!!this.remoteExplorerService.getEditableData(at?.tunnel,at?.editId),this._onDidChangeViewWelcomeState.fire(),this.isEditing||qe.classList.remove("highlight"),rt(),this.isEditing?(qe.classList.add("highlight"),at||this.table.reveal(this.table.indexOf(this.viewModel.input))):(at&&at.tunnel.tunnelType!==u.TunnelType.Add&&this.table.setFocus(this.lastFocus),this.focus())}))}shouldShowWelcome(){return this.viewModel.isEmpty()&&!this.isEditing}focus(){super.focus(),this.table.domFocus()}onFocusChanged(Fe){Fe.indexes.length>0&&Fe.elements.length>0&&(this.lastFocus=Fe.indexes);const Qe=Fe.elements,qe=Qe&&Qe.length?Qe[0]:void 0;qe?(this.tunnelViewSelectionContext.set(qe),this.tunnelTypeContext.set(qe.tunnelType),this.tunnelCloseableContext.set(!!qe.closeable),this.tunnelPrivacyContext.set(qe.privacy.id),this.tunnelProtocolContext.set((qe.protocol===y.TunnelProtocol.Https,y.TunnelProtocol.Https)),this.portChangableContextKey.set(!!qe.localPort)):(this.tunnelTypeContext.reset(),this.tunnelViewSelectionContext.reset(),this.tunnelCloseableContext.reset(),this.tunnelPrivacyContext.reset(),this.tunnelProtocolContext.reset(),this.portChangableContextKey.reset())}hasOpenLinkModifier(Fe){const Qe=this.configurationService.getValue("editor");let qe=!1;return Qe.multiCursorModifier==="ctrlCmd"?qe=Fe.altKey:N.isMacintosh?qe=Fe.metaKey:qe=Fe.ctrlKey,qe}onSelectionChanged(Fe){const Qe=Fe.elements;Qe.length>1?this.tunnelViewMultiSelectionContext.set(Qe):this.tunnelViewMultiSelectionContext.set(void 0)}onContextMenu(Fe,Qe){if(Fe.element!==void 0&&!(Fe.element instanceof se))return;Fe.browserEvent.preventDefault(),Fe.browserEvent.stopPropagation();const qe=Fe.element;qe?(this.table.setFocus([this.table.indexOf(qe)]),this.tunnelTypeContext.set(qe.tunnelType),this.tunnelCloseableContext.set(!!qe.closeable),this.tunnelPrivacyContext.set(qe.privacy.id),this.tunnelProtocolContext.set(qe.protocol),this.portChangableContextKey.set(!!qe.localPort)):(this.tunnelTypeContext.set(u.TunnelType.Add),this.tunnelCloseableContext.set(!1),this.tunnelPrivacyContext.set(void 0),this.tunnelProtocolContext.set(void 0),this.portChangableContextKey.set(!1));const Be=this.menuService.createMenu(r.MenuId.TunnelContext,this.table.contextKeyService),Ke=[];this._register((0,p.createAndFillInContextMenuActions)(Be,{shouldForwardArgs:!0},Ke)),Be.dispose(),this.contextMenuService.showContextMenu({getAnchor:()=>Fe.anchor,getActions:()=>Ke,getActionViewItem:Xe=>{const rt=this.keybindingService.lookupKeybinding(Xe.id);if(rt)return new x.ActionViewItem(Xe,Xe,{label:!0,keybinding:rt.getLabel()})},onHide:Xe=>{Xe&&this.table.domFocus()},getActionsContext:()=>qe,actionRunner:Qe})}onMouseDblClick(Fe){Fe.element||this.commandService.executeCommand(ke.INLINE_ID)}layoutBody(Fe,Qe){super.layoutBody(Fe,Qe),this.table.layout(Fe,Qe)}};Ce.ID=u.TUNNEL_VIEW_ID,Ce.TITLE=t.localize(27,null),Ce=Ee([W(2,A.IKeybindingService),W(3,k.IContextMenuService),W(4,D.IContextKeyService),W(5,I.IConfigurationService),W(6,w.IInstantiationService),W(7,_.IViewDescriptorService),W(8,v.IOpenerService),W(9,C.IQuickInputService),W(10,o.ICommandService),W(11,r.IMenuService),W(12,m.IThemeService),W(13,u.IRemoteExplorerService),W(14,O.ITelemetryService),W(15,y.ITunnelService),W(16,k.IContextViewService),W(17,U.IHoverService)],Ce),e.TunnelPanel=Ce;class ve{constructor(Fe,Qe){this.id=Ce.ID,this.name=Ce.TITLE,this.canToggleVisibility=!0,this.hideByDefault=!1,this.workspace=!0,this.group="details@0",this.order=-500,this.canMoveView=!0,this.containerIcon=F.portsViewIcon,this.ctorDescriptor=new T.SyncDescriptor(Ce,[Fe]),this.remoteAuthority=Qe.remoteAuthority?Qe.remoteAuthority.split("+")[0]:void 0}}e.TunnelPanelDescriptor=ve;var he;(function(Ze){Ze.ID="remote.tunnel.label",Ze.LABEL=t.localize(29,null),Ze.COMMAND_ID_KEYWORD="label";function Fe(qe){return qe&&qe.tunnelType&&qe.remoteHost&&qe.source}function Qe(){return async(qe,Be)=>{const Ke=Fe(Be)?Be:qe.get(D.IContextKeyService).getContextKeyValue(ue);if(Ke)return new Promise(Xe=>{const rt=qe.get(u.IRemoteExplorerService),it=Ke.name?Ke.name:`${Ke.remotePort}`;rt.setEditable(Ke,u.TunnelEditId.Label,{onFinish:async(at,ft)=>{at=at.trim(),rt.setEditable(Ke,u.TunnelEditId.Label,null);const vt=ft&&at!==it;vt&&await rt.tunnelModel.name(Ke.remoteHost,Ke.remotePort,at),Xe(vt?{port:Ke.remotePort,label:at}:void 0)},validationMessage:()=>null,placeholder:t.localize(30,null),startingValue:it})})}}Ze.handler=Qe})(he||(he={}));const ge=t.localize(31,null),de=65536,Se=t.localize(32,null,de),we=t.localize(33,null),ye=t.localize(34,null);var ke;(function(Ze){Ze.INLINE_ID="remote.tunnel.forwardInline",Ze.COMMANDPALETTE_ID="remote.tunnel.forwardCommandPalette",Ze.LABEL={value:t.localize(35,null),original:"Forward a Port"},Ze.TREEITEM_LABEL=t.localize(36,null);const Fe=t.localize(37,null);function Qe(Xe,rt,it){const at=(0,u.parseAddress)(rt);if(at){if(at.port>=de)return{content:Se,severity:n.Severity.Error};if(it&&(0,y.isPortPrivileged)(at.port))return{content:we,severity:n.Severity.Info};if((0,u.mapHasAddressLocalhostOrAllInterfaces)(Xe.tunnelModel.forwarded,at.host,at.port))return{content:ye,severity:n.Severity.Error}}else return{content:ge,severity:n.Severity.Error};return null}function qe(Xe,rt,it,at){rt||Xe.warn(t.localize(38,null,it,at))}function Be(){return async(Xe,rt)=>{const it=Xe.get(u.IRemoteExplorerService),at=Xe.get(n.INotificationService),ft=Xe.get(y.ITunnelService);it.setEditable(void 0,u.TunnelEditId.New,{onFinish:async(vt,Dt)=>{it.setEditable(void 0,u.TunnelEditId.New,null);let kt;Dt&&(kt=(0,u.parseAddress)(vt))&&it.forward({remote:{host:kt.host,port:kt.port},elevateIfNeeded:!0}).then(At=>qe(at,At,kt.host,kt.port))},validationMessage:vt=>Qe(it,vt,ft.canElevate),placeholder:Fe})}}Ze.inlineHandler=Be;function Ke(){return async(Xe,rt)=>{const it=Xe.get(u.IRemoteExplorerService),at=Xe.get(n.INotificationService),ft=Xe.get(_.IViewsService),vt=Xe.get(C.IQuickInputService),Dt=Xe.get(y.ITunnelService);await ft.openView(Ce.ID,!0);const kt=await vt.input({prompt:Fe,validateInput:St=>Promise.resolve(Qe(it,St,Dt.canElevate))});let At;kt&&(At=(0,u.parseAddress)(kt))&&it.forward({remote:{host:At.host,port:At.port},elevateIfNeeded:!0}).then(St=>qe(at,St,At.host,At.port))}}Ze.commandPaletteHandler=Ke})(ke=e.ForwardPortAction||(e.ForwardPortAction={}));function Ie(Ze,Fe,Qe){const qe=Ze.map(Be=>{const Ke=se.createFromTunnel(Fe,Qe,Be);return{label:Ke.label,description:Ke.processDescription,tunnel:Ke}});return qe.length===0&&qe.push({label:t.localize(39,null,ke.LABEL.value)}),qe}var Te;(function(Ze){Ze.INLINE_ID="remote.tunnel.closeInline",Ze.COMMANDPALETTE_ID="remote.tunnel.closeCommandPalette",Ze.LABEL={value:t.localize(40,null),original:"Stop Forwarding Port"};function Fe(){return async(qe,Be)=>{const Ke=qe.get(D.IContextKeyService);let Xe=Ke.getContextKeyValue(fe);if(!Xe){const it=Be!==void 0||Be instanceof se?Be:Ke.getContextKeyValue(ue);it&&(Xe=[it])}if(!Xe)return;const rt=qe.get(u.IRemoteExplorerService);return Promise.all(Xe.map(it=>rt.close({host:it.remoteHost,port:it.remotePort})))}}Ze.inlineHandler=Fe;function Qe(){return async qe=>{const Be=qe.get(C.IQuickInputService),Ke=qe.get(u.IRemoteExplorerService),Xe=qe.get(y.ITunnelService),rt=qe.get(o.ICommandService),it=Ie(Array.from(Ke.tunnelModel.forwarded.values()).filter(ft=>ft.closeable),Ke,Xe),at=await Be.pick(it,{placeHolder:t.localize(41,null)});at&&at.tunnel?await Ke.close({host:at.tunnel.remoteHost,port:at.tunnel.remotePort}):at&&await rt.executeCommand(ke.COMMANDPALETTE_ID)}}Ze.commandPaletteHandler=Qe})(Te||(Te={}));var De;(function(Ze){Ze.ID="remote.tunnel.open",Ze.LABEL=t.localize(42,null);function Fe(){return async(qe,Be)=>{let Ke;if(Be instanceof se?Ke=(0,u.makeAddress)(Be.remoteHost,Be.remotePort):Be.tunnelRemoteHost&&Be.tunnelRemotePort&&(Ke=(0,u.makeAddress)(Be.tunnelRemoteHost,Be.tunnelRemotePort)),Ke){const Xe=qe.get(u.IRemoteExplorerService).tunnelModel,rt=qe.get(v.IOpenerService);return Qe(Xe,rt,Ke)}}}Ze.handler=Fe;function Qe(qe,Be,Ke){const Xe=qe.forwarded.get(Ke)||qe.detected.get(Ke);return Xe?Be.open(Xe.localUri,{allowContributedOpeners:!1}):Promise.resolve()}Ze.run=Qe})(De=e.OpenPortInBrowserAction||(e.OpenPortInBrowserAction={}));var _e;(function(Ze){Ze.ID="remote.tunnel.openPreview",Ze.LABEL=t.localize(43,null);function Fe(){return async(qe,Be)=>{let Ke;if(Be instanceof se?Ke=(0,u.makeAddress)(Be.remoteHost,Be.remotePort):Be.tunnelRemoteHost&&Be.tunnelRemotePort&&(Ke=(0,u.makeAddress)(Be.tunnelRemoteHost,Be.tunnelRemotePort)),Ke){const Xe=qe.get(u.IRemoteExplorerService).tunnelModel,rt=qe.get(v.IOpenerService),it=qe.get(L.IExternalUriOpenerService);return Qe(Xe,rt,it,Ke)}}}Ze.handler=Fe;async function Qe(qe,Be,Ke,Xe){const rt=qe.forwarded.get(Xe)||qe.detected.get(Xe);if(rt){const it=E.URI.parse(`http://${rt.remoteHost}:${rt.remotePort}`),at=await Ke.getOpener(rt.localUri,{sourceUri:it},new M.CancellationTokenSource().token);return at?at.openExternalUri(rt.localUri,{sourceUri:it},new M.CancellationTokenSource().token):Be.open(rt.localUri)}return Promise.resolve()}Ze.run=Qe})(_e=e.OpenPortInPreviewAction||(e.OpenPortInPreviewAction={}));var Re;(function(Ze){Ze.ID="remote.tunnel.openCommandPalette",Ze.LABEL=t.localize(44,null);function Fe(){return async(Qe,qe)=>{const Be=Qe.get(u.IRemoteExplorerService),Ke=Qe.get(y.ITunnelService),Xe=Be.tunnelModel,rt=Qe.get(C.IQuickInputService),it=Qe.get(v.IOpenerService),at=Qe.get(o.ICommandService),ft=[...Xe.forwarded,...Xe.detected].map(Dt=>{const kt=se.createFromTunnel(Be,Ke,Dt[1]);return{label:kt.label,description:kt.processDescription,tunnel:kt}});ft.length===0?ft.push({label:t.localize(45,null)}):ft.push({label:t.localize(46,null)});const vt=await rt.pick(ft,{placeHolder:t.localize(47,null)});if(vt&&vt.tunnel)return De.run(Xe,it,(0,u.makeAddress)(vt.tunnel.remoteHost,vt.tunnel.remotePort));if(vt)return at.executeCommand(`${u.TUNNEL_VIEW_ID}.focus`)}}Ze.handler=Fe})(Re||(Re={}));var Ne;(function(Ze){Ze.INLINE_ID="remote.tunnel.copyAddressInline",Ze.COMMANDPALETTE_ID="remote.tunnel.copyAddressCommandPalette",Ze.INLINE_LABEL=t.localize(48,null),Ze.COMMANDPALETTE_LABEL=t.localize(49,null);async function Fe(Be,Ke,Xe){const rt=Be.tunnelModel.address(Xe.remoteHost,Xe.remotePort);rt&&await Ke.writeText(rt.toString())}function Qe(){return async(Be,Ke)=>{const Xe=Ke!==void 0||Ke instanceof se?Ke:Be.get(D.IContextKeyService).getContextKeyValue(ue);if(Xe instanceof se)return Fe(Be.get(u.IRemoteExplorerService),Be.get(a.IClipboardService),Xe)}}Ze.inlineHandler=Qe;function qe(){return async(Be,Ke)=>{const Xe=Be.get(C.IQuickInputService),rt=Be.get(u.IRemoteExplorerService),it=Be.get(y.ITunnelService),at=Be.get(o.ICommandService),ft=Be.get(a.IClipboardService),vt=Array.from(rt.tunnelModel.forwarded.values()).concat(Array.from(rt.tunnelModel.detected.values())),Dt=await Xe.pick(Ie(vt,rt,it),{placeHolder:t.localize(50,null)});Dt&&Dt.tunnel?await Fe(rt,ft,Dt.tunnel):Dt&&await at.executeCommand(ke.COMMANDPALETTE_ID)}}Ze.commandPaletteHandler=qe})(Ne||(Ne={}));var xe;(function(Ze){Ze.ID="remote.tunnel.changeLocalPort",Ze.LABEL=t.localize(51,null);function Fe(qe,Be){if(qe.match(/^[0-9]+$/)){if(Number(qe)>=de)return{content:Se,severity:n.Severity.Error};if(Be&&(0,y.isPortPrivileged)(Number(qe)))return{content:we,severity:n.Severity.Info}}else return{content:ge,severity:n.Severity.Error};return null}function Qe(){return async(qe,Be)=>{const Ke=qe.get(u.IRemoteExplorerService),Xe=qe.get(n.INotificationService),rt=qe.get(y.ITunnelService),it=Be!==void 0||Be instanceof se?Be:qe.get(D.IContextKeyService).getContextKeyValue(ue);it instanceof se&&Ke.setEditable(it,u.TunnelEditId.LocalPort,{onFinish:async(at,ft)=>{if(Ke.setEditable(it,u.TunnelEditId.LocalPort,null),ft){await Ke.close({host:it.remoteHost,port:it.remotePort});const vt=Number(at),Dt=await Ke.forward({remote:{host:it.remoteHost,port:it.remotePort},local:vt,name:it.name,elevateIfNeeded:!0,source:it.source});Dt&&Dt.tunnelLocalPort!==vt&&Xe.warn(t.localize(52,null,at,Dt.tunnelLocalPort??Dt.localAddress))}},validationMessage:at=>Fe(at,rt.canElevate),placeholder:t.localize(53,null)})}}Ze.handler=Qe})(xe||(xe={}));var Ae;(function(Ze){function Fe(Qe){return async(qe,Be)=>{if(Be instanceof se){const Ke=qe.get(u.IRemoteExplorerService);return await Ke.close({host:Be.remoteHost,port:Be.remotePort}),Ke.forward({remote:{host:Be.remoteHost,port:Be.remotePort},local:Be.localPort,name:Be.name,elevateIfNeeded:!0,privacy:Qe,source:Be.source})}}}Ze.handler=Fe})(Ae||(Ae={}));var Le;(function(Ze){Ze.ID_HTTP="remote.tunnel.setProtocolHttp",Ze.ID_HTTPS="remote.tunnel.setProtocolHttps",Ze.LABEL_HTTP=t.localize(54,null),Ze.LABEL_HTTPS=t.localize(55,null);async function Fe(Be,Ke,Xe){if(Be instanceof se){const rt={protocol:Ke};return Xe.tunnelModel.configPortsAttributes.addAttributes(Be.remotePort,rt,3)}}function Qe(){return async(Be,Ke)=>Fe(Ke,y.TunnelProtocol.Http,Be.get(u.IRemoteExplorerService))}Ze.handlerHttp=Qe;function qe(){return async(Be,Ke)=>Fe(Ke,y.TunnelProtocol.Https,Be.get(u.IRemoteExplorerService))}Ze.handlerHttps=qe})(Le||(Le={}));const Me=10,We=e.TunnelTypeContextKey.isEqualTo(u.TunnelType.Forwarded),Ve=D.ContextKeyExpr.or(We,e.TunnelTypeContextKey.isEqualTo(u.TunnelType.Detected)),Ue=pe.isEqualTo(void 0),et=D.ContextKeyExpr.and(ie.notEqualsTo(y.TunnelPrivacyId.Private),ie.notEqualsTo(y.TunnelPrivacyId.ConstantPrivate));R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:he.ID,weight:200+Me,when:D.ContextKeyExpr.and(ae,We,Ue),primary:60,mac:{primary:3},handler:he.handler()}),o.CommandsRegistry.registerCommand(ke.INLINE_ID,ke.inlineHandler()),o.CommandsRegistry.registerCommand(ke.COMMANDPALETTE_ID,ke.commandPaletteHandler()),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:Te.INLINE_ID,weight:200+Me,when:D.ContextKeyExpr.and(e.TunnelCloseableContextKey,ae),primary:20,mac:{primary:2048|1,secondary:[20]},handler:Te.inlineHandler()}),o.CommandsRegistry.registerCommand(Te.COMMANDPALETTE_ID,Te.commandPaletteHandler()),o.CommandsRegistry.registerCommand(De.ID,De.handler()),o.CommandsRegistry.registerCommand(_e.ID,_e.handler()),o.CommandsRegistry.registerCommand(Re.ID,Re.handler()),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:Ne.INLINE_ID,weight:200+Me,when:D.ContextKeyExpr.and(ae,Ve,Ue),primary:2048|33,handler:Ne.inlineHandler()}),o.CommandsRegistry.registerCommand(Ne.COMMANDPALETTE_ID,Ne.commandPaletteHandler()),o.CommandsRegistry.registerCommand(xe.ID,xe.handler()),o.CommandsRegistry.registerCommand(Le.ID_HTTP,Le.handlerHttp()),o.CommandsRegistry.registerCommand(Le.ID_HTTPS,Le.handlerHttps()),r.MenuRegistry.appendMenuItem(r.MenuId.CommandPalette,{command:{id:Te.COMMANDPALETTE_ID,title:Te.LABEL},when:e.forwardedPortsViewEnabled}),r.MenuRegistry.appendMenuItem(r.MenuId.CommandPalette,{command:{id:ke.COMMANDPALETTE_ID,title:ke.LABEL},when:e.forwardedPortsViewEnabled}),r.MenuRegistry.appendMenuItem(r.MenuId.CommandPalette,{command:{id:Ne.COMMANDPALETTE_ID,title:Ne.COMMANDPALETTE_LABEL},when:e.forwardedPortsViewEnabled}),r.MenuRegistry.appendMenuItem(r.MenuId.CommandPalette,{command:{id:Re.ID,title:Re.LABEL},when:e.forwardedPortsViewEnabled}),r.MenuRegistry.appendMenuItem(r.MenuId.TunnelContext,{group:"._open",order:0,command:{id:De.ID,title:De.LABEL},when:D.ContextKeyExpr.and(Ve,Ue)}),r.MenuRegistry.appendMenuItem(r.MenuId.TunnelContext,{group:"._open",order:1,command:{id:_e.ID,title:_e.LABEL},when:D.ContextKeyExpr.and(D.ContextKeyExpr.or(be.negate(),et),Ve,Ue)}),r.MenuRegistry.appendMenuItem(r.MenuId.TunnelContext,{group:"0_manage",order:1,command:{id:he.ID,title:he.LABEL,icon:F.labelPortIcon},when:D.ContextKeyExpr.and(We,Ue)}),r.MenuRegistry.appendMenuItem(r.MenuId.TunnelContext,{group:"2_localaddress",order:0,command:{id:Ne.INLINE_ID,title:Ne.INLINE_LABEL},when:D.ContextKeyExpr.and(Ve,Ue)}),r.MenuRegistry.appendMenuItem(r.MenuId.TunnelContext,{group:"2_localaddress",order:1,command:{id:xe.ID,title:xe.LABEL},when:D.ContextKeyExpr.and(We,me,Ue)}),r.MenuRegistry.appendMenuItem(r.MenuId.TunnelContext,{group:"2_localaddress",order:2,submenu:r.MenuId.TunnelPrivacy,title:t.localize(56,null),when:D.ContextKeyExpr.and(We,ce)}),r.MenuRegistry.appendMenuItem(r.MenuId.TunnelContext,{group:"2_localaddress",order:3,submenu:r.MenuId.TunnelProtocol,title:t.localize(57,null),when:D.ContextKeyExpr.and(We,Ue)}),r.MenuRegistry.appendMenuItem(r.MenuId.TunnelContext,{group:"3_forward",order:0,command:{id:Te.INLINE_ID,title:Te.LABEL},when:e.TunnelCloseableContextKey}),r.MenuRegistry.appendMenuItem(r.MenuId.TunnelContext,{group:"3_forward",order:1,command:{id:ke.INLINE_ID,title:ke.LABEL}}),r.MenuRegistry.appendMenuItem(r.MenuId.TunnelProtocol,{order:0,command:{id:Le.ID_HTTP,title:Le.LABEL_HTTP,toggled:le.isEqualTo(y.TunnelProtocol.Http)}}),r.MenuRegistry.appendMenuItem(r.MenuId.TunnelProtocol,{order:1,command:{id:Le.ID_HTTPS,title:Le.LABEL_HTTPS,toggled:le.isEqualTo(y.TunnelProtocol.Https)}}),r.MenuRegistry.appendMenuItem(r.MenuId.TunnelPortInline,{group:"0_manage",order:0,command:{id:ke.INLINE_ID,title:ke.TREEITEM_LABEL,icon:F.forwardPortIcon},when:e.TunnelTypeContextKey.isEqualTo(u.TunnelType.Candidate)}),r.MenuRegistry.appendMenuItem(r.MenuId.TunnelPortInline,{group:"0_manage",order:4,command:{id:he.ID,title:he.LABEL,icon:F.labelPortIcon},when:We}),r.MenuRegistry.appendMenuItem(r.MenuId.TunnelPortInline,{group:"0_manage",order:5,command:{id:Te.INLINE_ID,title:Te.LABEL,icon:F.stopForwardIcon},when:e.TunnelCloseableContextKey}),r.MenuRegistry.appendMenuItem(r.MenuId.TunnelLocalAddressInline,{order:-1,command:{id:Ne.INLINE_ID,title:Ne.INLINE_LABEL,icon:F.copyAddressIcon},when:Ve}),r.MenuRegistry.appendMenuItem(r.MenuId.TunnelLocalAddressInline,{order:0,command:{id:De.ID,title:De.LABEL,icon:F.openBrowserIcon},when:Ve}),r.MenuRegistry.appendMenuItem(r.MenuId.TunnelLocalAddressInline,{order:1,command:{id:_e.ID,title:_e.LABEL,icon:F.openPreviewIcon},when:D.ContextKeyExpr.and(D.ContextKeyExpr.or(be.negate(),et),Ve)}),e.portWithRunningProcessForeground=(0,V.registerColor)("ports.iconRunningProcessForeground",{light:H.STATUS_BAR_HOST_NAME_BACKGROUND,dark:H.STATUS_BAR_HOST_NAME_BACKGROUND,hcDark:H.STATUS_BAR_HOST_NAME_BACKGROUND,hcLight:H.STATUS_BAR_HOST_NAME_BACKGROUND},t.localize(58,null)),(0,m.registerThemingParticipant)((Ze,Fe)=>{const Qe=Ze.getColor(e.portWithRunningProcessForeground);Qe&&Fe.addRule(`.monaco-workbench ${m.ThemeIcon.asCSSSelector(F.forwardedPortWithProcessIcon)} { color: ${Qe} ; }`)})}),define(ne[2539],re([1,0,22,2,18,733]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteFileSystemProviderClient=e.REMOTE_FILE_SYSTEM_CHANNEL_NAME=void 0,e.REMOTE_FILE_SYSTEM_CHANNEL_NAME="remoteFilesystem";class k extends A.DiskFileSystemProviderClient{static register(I,w,v){const C=I.getConnection();if(!C)return f.Disposable.None;const o=new f.DisposableStore,c=(async()=>{try{const i=await I.getRawEnvironment();i?w.registerProvider(_.Schemas.vscodeRemote,o.add(new k(i,C))):v.error("Cannot register remote filesystem provider. Remote environment doesnot exist.")}catch(i){v.error("Cannot register remote filesystem provider. Error while fetching remote environment.",(0,t.getErrorMessage)(i))}})();return o.add(w.onWillActivateFileSystemProvider(i=>{i.scheme===_.Schemas.vscodeRemote&&i.join(c)})),o}constructor(I,w){super(w.getChannel(e.REMOTE_FILE_SYSTEM_CHANNEL_NAME),{pathCaseSensitive:I.os===3})}}e.RemoteFileSystemProviderClient=k}),define(ne[2540],re([1,0,1897,109,144,46,1976,2516,469,31,50,26,17,47,27,87,9,41]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteAgentService=void 0;let r=class extends D.AbstractRemoteAgentService{constructor(n,h,g,d,m){super(new k.BrowserSocketFactory(null),n,h,g,d,m)}};r=Ee([W(0,v.IWorkbenchEnvironmentService),W(1,A.IProductService),W(2,_.IRemoteAuthorityResolverService),W(3,I.ISignService),W(4,w.ILogService)],r),e.RemoteAgentService=r;let p=class{constructor(n,h,g,d,m,b,E){this._remoteAgentService=n,this._remoteAuthorityResolverService=b,this._remoteAgentService.getRawEnvironment().then(void 0,y=>{if(!_.RemoteAuthorityResolverError.isHandled(y)){const T=[{label:t.localize(0,null),run:()=>m.openDevTools()}],R=this._getTroubleshootingURL();R&&T.push({label:t.localize(1,null),run:()=>E.open(R,{openExternal:!0})}),h.prompt(C.Severity.Error,t.localize(2,null,y?y.message:""),T)}})}_getTroubleshootingURL(){const n=this._remoteAgentService.getConnection();if(!n)return null;const h=this._remoteAuthorityResolverService.getConnectionData(n.remoteAuthority);return h?s.URI.from({scheme:"http",authority:`${h.host}:${h.port}`,path:"/version"}):null}};p=Ee([W(0,f.IRemoteAgentService),W(1,C.INotificationService),W(2,v.IWorkbenchEnvironmentService),W(3,i.ITelemetryService),W(4,S.INativeHostService),W(5,_.IRemoteAuthorityResolverService),W(6,l.IOpenerService)],p),o.Registry.as(c.Extensions.Workbench).registerWorkbenchContribution(p,2)}),define(ne[2541],re([1,0,8,31,1981,35,187,87]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeRequestService=void 0;let I=class extends _.RequestService{constructor(v,C,o){super(v,C);this.nativeHostService=o}async resolveProxy(v){return this.nativeHostService.resolveProxy(v)}};I=Ee([W(0,t.IConfigurationService),W(1,f.ILogService),W(2,D.INativeHostService)],I),e.NativeRequestService=I,(0,A.registerSingleton)(k.IRequestService,I,!0)}),define(ne[2542],re([1,0,29,650]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplacePattern=void 0;class _{constructor(k,D,I){this._hasParameters=!1,this._replacePattern=k;let w,v;typeof D=="boolean"?(v=D,this._regExp=I):(w=D,v=!!w.isRegExp,this._regExp=t.createRegExp(w.pattern,!!w.isRegExp,{matchCase:w.isCaseSensitive,wholeWord:w.isWordMatch,multiline:w.isMultiline,global:!1,unicode:!0})),v&&this.parseReplaceString(k),this._regExp.global&&(this._regExp=t.createRegExp(this._regExp.source,!0,{matchCase:!this._regExp.ignoreCase,wholeWord:!1,multiline:this._regExp.multiline,global:!1})),this._caseOpsRegExp=new RegExp(/([\s\S]*?)((?:\\[uUlL])+?|)(\$[0-9]+)([\s\S]*?)/g)}get hasParameters(){return this._hasParameters}get pattern(){return this._replacePattern}get regExp(){return this._regExp}getReplaceString(k,D){this._regExp.lastIndex=0;const I=this._regExp.exec(k);if(I){if(this.hasParameters){const w=this.replaceWithCaseOperations(k,this._regExp,this.buildReplaceString(I,D));return I[0]===k?w:w.substr(I.index,I[0].length-(k.length-w.length))}return this.buildReplaceString(I,D)}return null}replaceWithCaseOperations(k,D,I){if(!/\\[uUlL]/.test(I))return k.replace(D,I);const w=D.exec(k);if(w===null)return k.replace(D,I);let v,C="",o=0,c="";for(;(v=this._caseOpsRegExp.exec(I))!==null;){o=v.index;const i=v[0];c=i;let S=v[2];const s=v[3];if(!S){C+=i;continue}const l=w[parseInt(s.slice(1))];if(!l){C+=i;continue}const r=l.length;C+=v[1],S=S.replace(/\\/g,"");let p=0;for(;p<S.length;p++)switch(S[p]){case"U":C+=l.slice(p).toUpperCase(),p=r;break;case"u":C+=l[p].toUpperCase();break;case"L":C+=l.slice(p).toLowerCase(),p=r;break;case"l":C+=l[p].toLowerCase();break}p<r&&(C+=l.slice(p)),C+=v[4]}return C+=I.slice(o+c.length),k.replace(D,C)}buildReplaceString(k,D){return D?(0,f.buildReplaceStringWithCasePreserved)(k,this._replacePattern):this._replacePattern}parseReplaceString(k){if(!k||k.length===0)return;let D=0,I="";for(let w=0,v=k.length;w<v;w++){const C=k.charCodeAt(w);if(C===92){if(w++,w>=v)break;const o=k.charCodeAt(w);let c=null;switch(o){case 92:c="\\";break;case 110:c=` `;break;case 116:c=" ";break}c&&(I+=k.substring(D,w-1)+c,D=w+1)}if(C===36){if(w++,w>=v)break;const o=k.charCodeAt(w);let c=null;switch(o){case 48:c="$&",this._hasParameters=!0;break;case 96:case 39:this._hasParameters=!0;break;default:{if(!this.between(o,49,57))break;if(w===k.length-1){this._hasParameters=!0;break}let i=k.charCodeAt(++w);if(!this.between(i,48,57)){this._hasParameters=!0,--w;break}if(w===k.length-1){this._hasParameters=!0;break}if(i=k.charCodeAt(++w),!this.between(i,48,57)){this._hasParameters=!0,--w;break}break}}c&&(I+=k.substring(D,w-1)+c,D=w+1)}}D!==0&&(this._replacePattern=I+k.substring(D))}between(k,D,I){return D<=k&&k<=I}}e.ReplacePattern=_}),define(ne[895],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextSearchCompleteMessageType=e.Range=e.Position=void 0;class t{constructor(k,D){this.line=k,this.character=D}isBefore(k){return!1}isBeforeOrEqual(k){return!1}isAfter(k){return!1}isAfterOrEqual(k){return!1}isEqual(k){return!1}compareTo(k){return 0}translate(k,D){return new t(0,0)}with(k){return new t(0,0)}}e.Position=t;class f{constructor(k,D,I,w){this.isEmpty=!1,this.isSingleLine=!1,this.start=new t(k,D),this.end=new t(I,w)}contains(k){return!1}isEqual(k){return!1}intersection(k){}union(k){return new f(0,0,0,0)}with(k){return new f(0,0,0,0)}}e.Range=f;var _;(function(A){A[A.Information=1]="Information",A[A.Warning=2]="Warning"})(_=e.TextSearchCompleteMessageType||(e.TextSearchCompleteMessageType={}))}),define(ne[896],re([1,0,1714,10,303,81,474,895,18,237,9]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderSearchMessage=void 0;const C=(o,c,i,S,s,l,r)=>{const p=f.$("div.providerMessage"),u=(0,_.parseLinkedText)(o.text);f.append(p,f.$("."+k.SeverityIcon.className(o.type===D.TextSearchCompleteMessageType.Information?A.default.Info:A.default.Warning).split(" ").join(".")));for(const a of u.nodes)if(typeof a=="string")f.append(p,document.createTextNode(a));else{const n=c.createInstance(w.Link,p,a,{opener:async h=>{if(!o.trusted)return;const g=v.URI.parse(h,!0);g.scheme===I.Schemas.command&&o.trusted?(await s.executeCommand(g.path))?.triggerSearch&&r():g.scheme===I.Schemas.https?S.open(g):g.scheme===I.Schemas.command&&!o.trusted?i.error(t.localize(0,null,h)):i.error(t.localize(1,null,h))}});l.add(n)}return p};e.renderSearchMessage=C}),define(ne[192],re([1,0,15,152,51,157,29,5,48,22,895,11]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasSiblingFn=e.hasSiblingPromiseFn=e.QueryGlobTester=e.resolvePatternsForProvider=e.SerializableFileMatch=e.isFilePatternMatch=e.isSerializedFileMatch=e.isSerializedSearchSuccess=e.isSerializedSearchComplete=e.serializeSearchError=e.deserializeSearchError=e.SearchError=e.SearchErrorCode=e.pathIncludedInQuery=e.getExcludes=e.SearchSortOrder=e.OneLineRange=e.SearchRange=e.TextSearchMatch=e.FileMatch=e.SearchCompletionExitCode=e.isProgressMessage=e.isFileMatch=e.resultIsMatch=e.QueryType=e.SearchProviderType=e.ISearchService=e.SEARCH_EXCLUDE_CONFIG=e.VIEW_ID=e.PANEL_ID=e.VIEWLET_ID=e.TextSearchCompleteMessageType=void 0,Object.defineProperty(e,"TextSearchCompleteMessageType",{enumerable:!0,get:function(){return v.TextSearchCompleteMessageType}}),e.VIEWLET_ID="workbench.view.search",e.PANEL_ID="workbench.panel.search",e.VIEW_ID="workbench.view.search",e.SEARCH_EXCLUDE_CONFIG="search.exclude";const o="\u27EA ",c=" characters skipped \u27EB",i=(o.length+c.length+5)*2;e.ISearchService=(0,D.createDecorator)("searchService");var S;(function(K){K[K.file=0]="file",K[K.text=1]="text"})(S=e.SearchProviderType||(e.SearchProviderType={}));var s;(function(K){K[K.File=1]="File",K[K.Text=2]="Text"})(s=e.QueryType||(e.QueryType={}));function l(K){return!!K.preview}e.resultIsMatch=l;function r(K){return!!K.resource}e.isFileMatch=r;function p(K){return!!K.message}e.isProgressMessage=p;var u;(function(K){K[K.Normal=0]="Normal",K[K.NewSearchStarted=1]="NewSearchStarted"})(u=e.SearchCompletionExitCode||(e.SearchCompletionExitCode={}));class a{constructor(G){this.resource=G,this.results=[]}}e.FileMatch=a;class n{constructor(G,q,Z){this.ranges=q;const j=Array.isArray(q)?q:[q];if(Z&&Z.matchLines===1&&h(j)){G=(0,k.getNLines)(G,Z.matchLines);let X="",Y=0,$=0;const J=Math.floor(Z.charsPerLine/5),ee=[];for(const te of j){const se=Math.max(te.startColumn-J,0),ie=te.startColumn+Z.charsPerLine;if(se>$+J+i){const ce=o+(se-$)+c;X+=ce+G.slice(se,ie),Y+=se-($+ce.length)}else X+=G.slice($,ie);ee.push(new d(0,te.startColumn-Y,te.endColumn-Y)),$=ie}this.preview={text:X,matches:Array.isArray(this.ranges)?ee:ee[0]}}else{const X=Array.isArray(q)?q[0].startLineNumber:q.startLineNumber;this.preview={text:G,matches:(0,t.mapArrayOrNot)(q,Y=>new g(Y.startLineNumber-X,Y.startColumn,Y.endLineNumber-X,Y.endColumn))}}}}e.TextSearchMatch=n;function h(K){const G=K[0].startLineNumber;for(const q of K)if(q.startLineNumber!==G||q.endLineNumber!==G)return!1;return!0}class g{constructor(G,q,Z,j){this.startLineNumber=G,this.startColumn=q,this.endLineNumber=Z,this.endColumn=j}}e.SearchRange=g;class d extends g{constructor(G,q,Z){super(G,q,G,Z)}}e.OneLineRange=d;var m;(function(K){K.Default="default",K.FileNames="fileNames",K.Type="type",K.Modified="modified",K.CountDescending="countDescending",K.CountAscending="countAscending"})(m=e.SearchSortOrder||(e.SearchSortOrder={}));function b(K,G=!0){const q=K&&K.files&&K.files.exclude,Z=G&&K&&K.search&&K.search.exclude;if(!q&&!Z)return;if(!q||!Z)return q||Z;let j=Object.create(null);return j=_.mixin(j,_.deepClone(q)),j=_.mixin(j,_.deepClone(Z),!0),j}e.getExcludes=b;function E(K,G){return K.excludePattern&&f.match(K.excludePattern,G)?!1:K.includePattern||K.usingSearchPaths?K.includePattern&&f.match(K.includePattern,G)?!0:K.usingSearchPaths?!!K.folderQueries&&K.folderQueries.some(q=>{const Z=q.folder.fsPath;if(A.isEqualOrParent(G,Z)){const j=I.relative(Z,G);return!q.includePattern||!!f.match(q.includePattern,j)}else return!1}):!1:!0}e.pathIncludedInQuery=E;var y;(function(K){K[K.unknownEncoding=1]="unknownEncoding",K[K.regexParseError=2]="regexParseError",K[K.globParseError=3]="globParseError",K[K.invalidLiteral=4]="invalidLiteral",K[K.rgProcessError=5]="rgProcessError",K[K.other=6]="other",K[K.canceled=7]="canceled"})(y=e.SearchErrorCode||(e.SearchErrorCode={}));class T extends Error{constructor(G,q){super(G);this.code=q}}e.SearchError=T;function R(K){const G=K.message;if((0,w.isCancellationError)(K))return new T(G,y.canceled);try{const q=JSON.parse(G);return new T(q.message,q.code)}catch{return new T(G,y.other)}}e.deserializeSearchError=R;function O(K){const G={message:K.message,code:K.code};return new Error(JSON.stringify(G))}e.serializeSearchError=O;function x(K){return K.type==="error"?!0:K.type==="success"}e.isSerializedSearchComplete=x;function F(K){return K.type==="success"}e.isSerializedSearchSuccess=F;function L(K){return!!K.path}e.isSerializedFileMatch=L;function M(K,G){const q=K.searchPath?K.searchPath:K.relativePath;return(0,k.fuzzyContains)(q,G)}e.isFilePatternMatch=M;class N{constructor(G){this.path=G,this.results=[]}addMatch(G){this.results.push(G)}serialize(){return{path:this.path,results:this.results,numMatches:this.results.length}}}e.SerializableFileMatch=N;function B(K,G){const q={...K||{},...G||{}};return Object.keys(q).filter(Z=>{const j=q[Z];return typeof j=="boolean"&&j})}e.resolvePatternsForProvider=B;class P{constructor(G,q){this._parsedIncludeExpression=null,this._excludeExpression={...G.excludePattern||{},...q.excludePattern||{}},this._parsedExcludeExpression=f.parse(this._excludeExpression);let Z=G.includePattern;q.includePattern&&(Z?Z={...Z,...q.includePattern}:Z=q.includePattern),Z&&(this._parsedIncludeExpression=f.parse(Z))}matchesExcludesSync(G,q,Z){return!!(this._parsedExcludeExpression&&this._parsedExcludeExpression(G,q,Z))}includedInQuerySync(G,q,Z){return!(this._parsedExcludeExpression&&this._parsedExcludeExpression(G,q,Z)||this._parsedIncludeExpression&&!this._parsedIncludeExpression(G,q,Z))}includedInQuery(G,q,Z){const j=this._parsedExcludeExpression(G,q,Z),X=()=>this._parsedIncludeExpression?!!this._parsedIncludeExpression(G,q,Z):!0;return(0,C.isThenable)(j)?j.then(Y=>Y?!1:X()):X()}hasSiblingExcludeClauses(){return V(this._excludeExpression)}}e.QueryGlobTester=P;function V(K){for(const G in K)if(typeof K[G]!="boolean")return!0;return!1}function z(K){if(!K)return;let G;return q=>(G||(G=(K()||Promise.resolve([])).then(Z=>Z?H(Z):{})),G.then(Z=>!!Z[q]))}e.hasSiblingPromiseFn=z;function U(K){if(!K)return;let G;return q=>{if(!G){const Z=K();G=Z?H(Z):{}}return!!G[q]}}e.hasSiblingFn=U;function H(K){const G={};for(const q of K)G[q]=!0;return G}}),define(ne[2543],re([1,0,30,2,9,8,27,75,192,65]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadSearch=void 0;let v=class{constructor(i,S,s,l){this._searchService=S,this._telemetryService=s,this._searchProvider=new Map,this._proxy=i.getProxy(w.ExtHostContext.ExtHostSearch),this._proxy.$enableExtensionHostSearch()}dispose(){this._searchProvider.forEach(i=>i.dispose()),this._searchProvider.clear()}$registerTextSearchProvider(i,S){this._searchProvider.set(i,new o(this._searchService,1,S,i,this._proxy))}$registerFileSearchProvider(i,S){this._searchProvider.set(i,new o(this._searchService,0,S,i,this._proxy))}$unregisterProvider(i){(0,f.dispose)(this._searchProvider.get(i)),this._searchProvider.delete(i)}$handleFileMatch(i,S,s){const l=this._searchProvider.get(i);if(!l)throw new Error("Got result for unknown provider");l.handleFindMatch(S,s)}$handleTextMatch(i,S,s){const l=this._searchProvider.get(i);if(!l)throw new Error("Got result for unknown provider");l.handleFindMatch(S,s)}$handleTelemetry(i,S){this._telemetryService.publicLog(i,S)}};v=Ee([(0,D.extHostNamedCustomer)(w.MainContext.MainThreadSearch),W(1,I.ISearchService),W(2,k.ITelemetryService),W(3,A.IConfigurationService)],v),e.MainThreadSearch=v;class C{constructor(i,S=++C._idPool,s=new Map){this.progress=i,this.id=S,this.matches=s}addMatch(i){const S=this.matches.get(i.resource.toString());S?S.results&&i.results&&S.results.push(...i.results):this.matches.set(i.resource.toString(),i),this.progress&&this.progress(i)}}C._idPool=0;class o{constructor(i,S,s,l,r){this._scheme=s,this._handle=l,this._proxy=r,this._registrations=new f.DisposableStore,this._searches=new Map,this._registrations.add(i.registerSearchResultProvider(this._scheme,S,this))}dispose(){this._registrations.dispose()}fileSearch(i,S=t.CancellationToken.None){return this.doSearch(i,void 0,S)}textSearch(i,S,s=t.CancellationToken.None){return this.doSearch(i,S,s)}doSearch(i,S,s=t.CancellationToken.None){if(!i.folderQueries.length)throw new Error("Empty folderQueries");const l=new C(S);this._searches.set(l.id,l);const r=i.type===1?this._proxy.$provideFileSearchResults(this._handle,l.id,i,s):this._proxy.$provideTextSearchResults(this._handle,l.id,i,s);return Promise.resolve(r).then(p=>(this._searches.delete(l.id),{results:Array.from(l.matches.values()),stats:p.stats,limitHit:p.limitHit,messages:p.messages}),p=>(this._searches.delete(l.id),Promise.reject(p)))}clearCache(i){return Promise.resolve(this._proxy.$clearCache(i))}handleFindMatch(i,S){const s=this._searches.get(i);!s||S.forEach(l=>{l.results?s.addMatch({resource:_.URI.revive(l.resource),results:l.results}):s.addMatch({resource:_.URI.revive(l)})})}}}),define(ne[2544],re([1,0,1882,9,180,44,21,177,23,34,2,24,6,8,59,192,5,80,7,15,35,10,189,18,22,11,782,101,56,76,31]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorNavigationStack=e.HistoryService=void 0;let R=class ci extends v.Disposable{constructor(B,P,V,z,U,H,K,G,q,Z){super();this.editorService=B,this.editorGroupService=P,this.contextService=V,this.storageService=z,this.configurationService=U,this.fileService=H,this.workspacesService=K,this.instantiationService=G,this.layoutService=q,this.contextKeyService=Z,this.activeEditorListeners=this._register(new v.DisposableStore),this.lastActiveEditor=void 0,this.editorHelper=this.instantiationService.createInstance(M),this.canNavigateBackContextKey=new r.RawContextKey("canNavigateBack",!1,(0,t.localize)(0,null)).bindTo(this.contextKeyService),this.canNavigateForwardContextKey=new r.RawContextKey("canNavigateForward",!1,(0,t.localize)(1,null)).bindTo(this.contextKeyService),this.canNavigateBackInNavigationsContextKey=new r.RawContextKey("canNavigateBackInNavigationLocations",!1,(0,t.localize)(2,null)).bindTo(this.contextKeyService),this.canNavigateForwardInNavigationsContextKey=new r.RawContextKey("canNavigateForwardInNavigationLocations",!1,(0,t.localize)(3,null)).bindTo(this.contextKeyService),this.canNavigateToLastNavigationLocationContextKey=new r.RawContextKey("canNavigateToLastNavigationLocation",!1,(0,t.localize)(4,null)).bindTo(this.contextKeyService),this.canNavigateBackInEditsContextKey=new r.RawContextKey("canNavigateBackInEditLocations",!1,(0,t.localize)(5,null)).bindTo(this.contextKeyService),this.canNavigateForwardInEditsContextKey=new r.RawContextKey("canNavigateForwardInEditLocations",!1,(0,t.localize)(6,null)).bindTo(this.contextKeyService),this.canNavigateToLastEditLocationContextKey=new r.RawContextKey("canNavigateToLastEditLocation",!1,(0,t.localize)(7,null)).bindTo(this.contextKeyService),this.canReopenClosedEditorContextKey=new r.RawContextKey("canReopenClosedEditor",!1,(0,t.localize)(8,null)).bindTo(this.contextKeyService),this._onDidChangeEditorNavigationStack=this._register(new o.Emitter),this.onDidChangeEditorNavigationStack=this._onDidChangeEditorNavigationStack.event,this.defaultScopedEditorNavigationStack=void 0,this.editorGroupScopedNavigationStacks=new Map,this.editorScopedNavigationStacks=new Map,this.editorNavigationScope=0,this.recentlyUsedEditorsStack=void 0,this.recentlyUsedEditorsStackIndex=0,this.recentlyUsedEditorsInGroupStack=void 0,this.recentlyUsedEditorsInGroupStackIndex=0,this.navigatingInRecentlyUsedEditorsStack=!1,this.navigatingInRecentlyUsedEditorsInGroupStack=!1,this.recentlyClosedEditors=[],this.ignoreEditorCloseEvent=!1,this.history=void 0,this.editorHistoryListeners=new Map,this.resourceExcludeMatcher=this._register(new d.IdleValue(()=>{const j=this._register(this.instantiationService.createInstance(m.ResourceGlobMatcher,X=>(0,S.getExcludes)(X?this.configurationService.getValue({resource:X}):this.configurationService.getValue())||Object.create(null),X=>X.affectsConfiguration(I.FILES_EXCLUDE_CONFIG)||X.affectsConfiguration(S.SEARCH_EXCLUDE_CONFIG)));return this._register(j.onExpressionChange(()=>this.removeExcludedFromHistory())),j})),this.registerListeners(),this.editorService.activeEditorPane&&this.onDidActiveEditorChange()}registerListeners(){this.registerMouseNavigationListener(),this._register(this.editorService.onDidActiveEditorChange(()=>this.onDidActiveEditorChange())),this._register(this.editorService.onDidOpenEditorFail(B=>this.remove(B.editor))),this._register(this.editorService.onDidCloseEditor(B=>this.onDidCloseEditor(B))),this._register(this.editorService.onDidMostRecentlyActiveEditorsChange(()=>this.handleEditorEventInRecentEditorsStack())),this._register(this.editorGroupService.onDidRemoveGroup(B=>this.onDidRemoveGroup(B))),this._register(this.fileService.onDidFilesChange(B=>this.onDidFilesChange(B))),this._register(this.fileService.onDidRunOperation(B=>this.onDidFilesChange(B))),this._register(this.storageService.onWillSaveState(()=>this.saveState())),this.registerEditorNavigationScopeChangeListener(),this._register(this.onDidChangeEditorNavigationStack(()=>this.updateContextKeys())),this._register(this.editorGroupService.onDidChangeActiveGroup(()=>this.updateContextKeys()))}onDidCloseEditor(B){this.handleEditorCloseEventInHistory(B),this.handleEditorCloseEventInReopen(B)}registerMouseNavigationListener(){const B=this._register(new v.DisposableStore),P=()=>{B.clear(),this.configurationService.getValue(ci.MOUSE_NAVIGATION_SETTING)&&B.add((0,a.addDisposableListener)(this.layoutService.container,a.EventType.MOUSE_DOWN,V=>this.onMouseDown(V)))};this._register(this.configurationService.onDidChangeConfiguration(V=>{V.affectsConfiguration(ci.MOUSE_NAVIGATION_SETTING)&&P()})),P()}onMouseDown(B){switch(B.button){case 3:a.EventHelper.stop(B),this.goBack();break;case 4:a.EventHelper.stop(B),this.goForward();break}}onDidRemoveGroup(B){this.handleEditorGroupRemoveInNavigationStacks(B)}onDidActiveEditorChange(){const B=this.editorGroupService.activeGroup,P=B.activeEditorPane;this.lastActiveEditor&&this.editorHelper.matchesEditorIdentifier(this.lastActiveEditor,P)||(this.lastActiveEditor=P?.input&&P.group?{editor:P.input,groupId:P.group.id}:void 0,this.activeEditorListeners.clear(),this.handleActiveEditorChange(B,P),(0,A.isEditorPaneWithSelection)(P)&&this.activeEditorListeners.add(P.onDidChangeSelection(V=>this.handleActiveEditorSelectionChangeEvent(B,P,V))),this.updateContextKeys())}onDidFilesChange(B){B instanceof I.FileChangesEvent?B.gotDeleted()&&this.remove(B):B.isOperation(1)?this.remove(B):B.isOperation(2)&&B.target.isFile&&this.move(B)}handleActiveEditorChange(B,P){this.handleActiveEditorChangeInHistory(P),this.handleActiveEditorChangeInNavigationStacks(B,P)}handleActiveEditorSelectionChangeEvent(B,P,V){this.handleActiveEditorSelectionChangeInNavigationStacks(B,P,V)}move(B){this.moveInHistory(B),this.moveInEditorNavigationStacks(B)}remove(B){this.removeFromHistory(B),this.removeFromEditorNavigationStacks(B),this.removeFromRecentlyClosedEditors(B),this.removeFromRecentlyOpened(B)}removeFromRecentlyOpened(B){let P;(0,A.isEditorInput)(B)?P=A.EditorResourceAccessor.getOriginalUri(B):B instanceof I.FileChangesEvent||(P=B.resource),P&&this.workspacesService.removeRecentlyOpened([P])}clear(){this.clearRecentlyOpened(),this.clearEditorNavigationStacks(),this.recentlyClosedEditors=[],this.updateContextKeys()}updateContextKeys(){this.contextKeyService.bufferChangeEvents(()=>{const B=this.getStack();this.canNavigateBackContextKey.set(B.canGoBack(0)),this.canNavigateForwardContextKey.set(B.canGoForward(0)),this.canNavigateBackInNavigationsContextKey.set(B.canGoBack(2)),this.canNavigateForwardInNavigationsContextKey.set(B.canGoForward(2)),this.canNavigateToLastNavigationLocationContextKey.set(B.canGoLast(2)),this.canNavigateBackInEditsContextKey.set(B.canGoBack(1)),this.canNavigateForwardInEditsContextKey.set(B.canGoForward(1)),this.canNavigateToLastEditLocationContextKey.set(B.canGoLast(1)),this.canReopenClosedEditorContextKey.set(this.recentlyClosedEditors.length>0)})}registerEditorNavigationScopeChangeListener(){const B=()=>{this.disposeEditorNavigationStacks();const P=this.configurationService.getValue(ci.NAVIGATION_SCOPE_SETTING);P==="editorGroup"?this.editorNavigationScope=1:P==="editor"?this.editorNavigationScope=2:this.editorNavigationScope=0};this._register(this.configurationService.onDidChangeConfiguration(P=>{P.affectsConfiguration(ci.NAVIGATION_SCOPE_SETTING)&&B()})),B()}getStack(B=this.editorGroupService.activeGroup,P=B.activeEditor){switch(this.editorNavigationScope){case 2:{if(!P)return new F;let V=this.editorScopedNavigationStacks.get(B.id);V||(V=new Map,this.editorScopedNavigationStacks.set(B.id,V));let z=V.get(P)?.stack;if(!z){const U=new v.DisposableStore;z=U.add(this.instantiationService.createInstance(x,2)),U.add(z.onDidChange(()=>this._onDidChangeEditorNavigationStack.fire())),V.set(P,{stack:z,disposable:U})}return z}case 1:{let V=this.editorGroupScopedNavigationStacks.get(B.id)?.stack;if(!V){const z=new v.DisposableStore;V=z.add(this.instantiationService.createInstance(x,1)),z.add(V.onDidChange(()=>this._onDidChangeEditorNavigationStack.fire())),this.editorGroupScopedNavigationStacks.set(B.id,{stack:V,disposable:z})}return V}case 0:return this.defaultScopedEditorNavigationStack||(this.defaultScopedEditorNavigationStack=this._register(this.instantiationService.createInstance(x,0)),this._register(this.defaultScopedEditorNavigationStack.onDidChange(()=>this._onDidChangeEditorNavigationStack.fire()))),this.defaultScopedEditorNavigationStack}}goForward(B){return this.getStack().goForward(B)}goBack(B){return this.getStack().goBack(B)}goPrevious(B){return this.getStack().goPrevious(B)}goLast(B){return this.getStack().goLast(B)}handleActiveEditorChangeInNavigationStacks(B,P){this.getStack(B,P?.input).handleActiveEditorChange(P)}handleActiveEditorSelectionChangeInNavigationStacks(B,P,V){this.getStack(B,P.input).handleActiveEditorSelectionChange(P,V)}handleEditorCloseEventInHistory(B){const P=this.editorScopedNavigationStacks.get(B.groupId);if(P){const V=P.get(B.editor);V&&(V.disposable.dispose(),P.delete(B.editor)),P.size===0&&this.editorScopedNavigationStacks.delete(B.groupId)}}handleEditorGroupRemoveInNavigationStacks(B){this.defaultScopedEditorNavigationStack?.remove(B.id);const P=this.editorGroupScopedNavigationStacks.get(B.id);P&&(P.disposable.dispose(),this.editorGroupScopedNavigationStacks.delete(B.id))}clearEditorNavigationStacks(){this.withEachEditorNavigationStack(B=>B.clear())}removeFromEditorNavigationStacks(B){this.withEachEditorNavigationStack(P=>P.remove(B))}moveInEditorNavigationStacks(B){this.withEachEditorNavigationStack(P=>P.move(B))}withEachEditorNavigationStack(B){this.defaultScopedEditorNavigationStack&&B(this.defaultScopedEditorNavigationStack);for(const[,P]of this.editorGroupScopedNavigationStacks)B(P.stack);for(const[,P]of this.editorScopedNavigationStacks)for(const[,V]of P)B(V.stack)}disposeEditorNavigationStacks(){this.defaultScopedEditorNavigationStack?.dispose(),this.defaultScopedEditorNavigationStack=void 0;for(const[,B]of this.editorGroupScopedNavigationStacks)B.disposable.dispose();this.editorGroupScopedNavigationStacks.clear();for(const[,B]of this.editorScopedNavigationStacks)for(const[,P]of B)P.disposable.dispose();this.editorScopedNavigationStacks.clear()}openNextRecentlyUsedEditor(B){const[P,V]=this.ensureRecentlyUsedStack(z=>z-1,B);return this.doNavigateInRecentlyUsedEditorsStack(P[V],B)}openPreviouslyUsedEditor(B){const[P,V]=this.ensureRecentlyUsedStack(z=>z+1,B);return this.doNavigateInRecentlyUsedEditorsStack(P[V],B)}async doNavigateInRecentlyUsedEditorsStack(B,P){if(B){const V=typeof P!="number"||!this.editorGroupService.getGroup(P);V?this.navigatingInRecentlyUsedEditorsStack=!0:this.navigatingInRecentlyUsedEditorsInGroupStack=!0;const z=this.editorGroupService.getGroup(B.groupId)??this.editorGroupService.activeGroup;try{await z.openEditor(B.editor)}finally{V?this.navigatingInRecentlyUsedEditorsStack=!1:this.navigatingInRecentlyUsedEditorsInGroupStack=!1}}}ensureRecentlyUsedStack(B,P){let V,z;const U=typeof P=="number"?this.editorGroupService.getGroup(P):void 0;U?(V=this.recentlyUsedEditorsInGroupStack||U.getEditors(0).map(K=>({groupId:U.id,editor:K})),z=this.recentlyUsedEditorsInGroupStackIndex):(V=this.recentlyUsedEditorsStack||this.editorService.getEditors(0),z=this.recentlyUsedEditorsStackIndex);let H=B(z);return H<0?H=0:H>V.length-1&&(H=V.length-1),U?(this.recentlyUsedEditorsInGroupStack=V,this.recentlyUsedEditorsInGroupStackIndex=H):(this.recentlyUsedEditorsStack=V,this.recentlyUsedEditorsStackIndex=H),[V,H]}handleEditorEventInRecentEditorsStack(){this.navigatingInRecentlyUsedEditorsStack||(this.recentlyUsedEditorsStack=void 0,this.recentlyUsedEditorsStackIndex=0),this.navigatingInRecentlyUsedEditorsInGroupStack||(this.recentlyUsedEditorsInGroupStack=void 0,this.recentlyUsedEditorsInGroupStackIndex=0)}handleEditorCloseEventInReopen(B){if(this.ignoreEditorCloseEvent)return;const{editor:P,context:V}=B;if(V===A.EditorCloseContext.REPLACE||V===A.EditorCloseContext.MOVE)return;const z=P.toUntyped();if(!z)return;const U=[],H=A.EditorResourceAccessor.getOriginalUri(P,{supportSideBySide:A.SideBySideEditor.BOTH});f.URI.isUri(H)?U.push(H):H&&U.push(...(0,p.coalesce)([H.primary,H.secondary])),this.removeFromRecentlyClosedEditors(P),this.recentlyClosedEditors.push({editorId:P.editorId,editor:z,resource:A.EditorResourceAccessor.getOriginalUri(P),associatedResources:U,index:B.index,sticky:B.sticky}),this.recentlyClosedEditors.length>ci.MAX_RECENTLY_CLOSED_EDITORS&&this.recentlyClosedEditors.shift(),this.canReopenClosedEditorContextKey.set(!0)}async reopenLastClosedEditor(){const B=this.recentlyClosedEditors.pop();let P;return B&&(P=this.doReopenLastClosedEditor(B)),this.canReopenClosedEditorContextKey.set(this.recentlyClosedEditors.length>0),P}async doReopenLastClosedEditor(B){const P={pinned:!0,sticky:B.sticky,index:B.index,ignoreError:!0};(B.sticky&&!this.editorGroupService.activeGroup.isSticky(B.index)||!B.sticky&&this.editorGroupService.activeGroup.isSticky(B.index))&&(P.index=void 0);let V;if(!this.editorGroupService.activeGroup.contains(B.editor)){this.ignoreEditorCloseEvent=!0;try{V=await this.editorService.openEditor({...B.editor,options:{...B.editor.options,...P}})}finally{this.ignoreEditorCloseEvent=!1}}V||((0,p.remove)(this.recentlyClosedEditors,B),this.reopenLastClosedEditor())}removeFromRecentlyClosedEditors(B){this.recentlyClosedEditors=this.recentlyClosedEditors.filter(P=>(0,A.isEditorInput)(B)&&P.editorId!==B.editorId?!0:!(P.resource&&this.editorHelper.matchesFile(P.resource,B)||P.associatedResources.some(V=>this.editorHelper.matchesFile(V,B)))),this.canReopenClosedEditorContextKey.set(this.recentlyClosedEditors.length>0)}handleActiveEditorChangeInHistory(B){const P=B?.input;!P||P.isDisposed()||!this.includeInHistory(P)||(this.removeFromHistory(P),this.addToHistory(P))}addToHistory(B,P=!0){this.ensureHistoryLoaded(this.history);const V=this.editorHelper.preferResourceEditorInput(B);!V||(P?this.history.unshift(V):this.history.push(V),this.history.length>ci.MAX_HISTORY_ITEMS&&this.editorHelper.clearOnEditorDispose(this.history.pop(),this.editorHistoryListeners),(0,A.isEditorInput)(V)&&this.editorHelper.onEditorDispose(V,()=>this.updateHistoryOnEditorDispose(V),this.editorHistoryListeners))}updateHistoryOnEditorDispose(B){if(!(0,A.isSideBySideEditorInput)(B))this.removeFromHistory(B);else{const P=[],V=B.primary.matches(B.secondary)?[B.primary]:[B.primary,B.secondary];for(const z of V){const U=this.editorHelper.preferResourceEditorInput(z);(0,A.isResourceEditorInput)(U)&&P.push(U)}this.replaceInHistory(B,...P)}}includeInHistory(B){return(0,A.isEditorInput)(B)?!0:!this.resourceExcludeMatcher.value.matches(B.resource)}removeExcludedFromHistory(){this.ensureHistoryLoaded(this.history),this.history=this.history.filter(B=>{const P=this.includeInHistory(B);return P||this.editorHelper.clearOnEditorDispose(B,this.editorHistoryListeners),P})}moveInHistory(B){B.isOperation(2)&&this.removeFromHistory(B)&&this.addToHistory({resource:B.target.resource})}removeFromHistory(B){let P=!1;return this.ensureHistoryLoaded(this.history),this.history=this.history.filter(V=>{const z=this.editorHelper.matchesEditor(B,V);return z&&(this.editorHelper.clearOnEditorDispose(B,this.editorHistoryListeners),P=!0),!z}),P}replaceInHistory(B,...P){this.ensureHistoryLoaded(this.history);let V=!1;const z=[];for(const U of this.history)this.editorHelper.matchesEditor(B,U)?(this.editorHelper.clearOnEditorDispose(B,this.editorHistoryListeners),V||(z.push(...P),V=!0)):P.some(H=>this.editorHelper.matchesEditor(H,U))||z.push(U);V||z.push(...P),this.history=z}clearRecentlyOpened(){this.history=[];for(const[,B]of this.editorHistoryListeners)(0,v.dispose)(B);this.editorHistoryListeners.clear()}getHistory(){return this.ensureHistoryLoaded(this.history),this.history}ensureHistoryLoaded(B){this.history||(this.history=[],this.editorGroupService.isReady?this.loadHistory():(async()=>{await this.editorGroupService.whenReady,this.loadHistory()})())}loadHistory(){this.history=[];const B=this.loadHistoryFromStorage(),P=[...this.editorService.getEditors(0)].reverse(),V=new Set;for(const{editor:z}of P)!this.includeInHistory(z)||(this.addToHistory(z),z.resource&&V.add(`${z.resource.toString()}/${z.editorId}`));for(const z of B)V.has(`${z.resource.toString()}/${z.options?.override}`)||this.addToHistory(z,!1)}loadHistoryFromStorage(){let B=[];const P=this.storageService.get(ci.HISTORY_STORAGE_KEY,1);if(P)try{B=(0,p.coalesce)((0,_.parse)(P))}catch(V){(0,g.onUnexpectedError)(V)}return(0,p.coalesce)(B.map(V=>V.editor))}saveState(){if(!this.history)return;const B=[];for(const P of this.history)(0,A.isEditorInput)(P)||!(0,A.isResourceEditorInput)(P)||B.push({editor:P});this.storageService.store(ci.HISTORY_STORAGE_KEY,(0,_.stringify)(B),1,1)}getLastActiveWorkspaceRoot(B){const P=this.contextService.getWorkspace().folders;if(P.length!==0){if(P.length===1){const V=P[0].uri;return!B||V.scheme===B?V:void 0}for(const V of this.getHistory()){if((0,A.isEditorInput)(V)||B&&V.resource.scheme!==B)continue;const z=this.contextService.getWorkspaceFolder(V.resource);if(z)return z.uri}for(const V of P){const z=V.uri;if(!B||z.scheme===B)return z}}}getLastActiveFile(B){for(const P of this.getHistory()){let V;if((0,A.isEditorInput)(P)?V=A.EditorResourceAccessor.getOriginalUri(P,{filterByScheme:B}):V=P.resource,V?.scheme===B)return V}}};R.MOUSE_NAVIGATION_SETTING="workbench.editor.mouseBackForwardToNavigate",R.NAVIGATION_SCOPE_SETTING="workbench.editor.navigationScope",R.MAX_RECENTLY_CLOSED_EDITORS=20,R.MAX_HISTORY_ITEMS=200,R.HISTORY_STORAGE_KEY="history.entries",R=Ee([W(0,k.IEditorService),W(1,i.IEditorGroupsService),W(2,w.IWorkspaceContextService),W(3,C.IStorageService),W(4,c.IConfigurationService),W(5,I.IFileService),W(6,n.IWorkspacesService),W(7,s.IInstantiationService),W(8,l.IWorkbenchLayoutService),W(9,r.IContextKeyService)],R),e.HistoryService=R,(0,u.registerSingleton)(D.IHistoryService,R);class O{constructor(B,P,V){this.editorIdentifier=B,this.selection=P,this.reason=V}justifiesNewNavigationEntry(B){if(this.editorIdentifier.groupId!==B.editorIdentifier.groupId||!this.editorIdentifier.editor.matches(B.editorIdentifier.editor)||!this.selection||!B.selection)return!0;const P=this.selection.compare(B.selection);return P===2&&(B.reason===4||B.reason===5)?!0:P===3}}let x=class extends v.Disposable{constructor(B,P){super();this.scope=B,this.instantiationService=P,this.selectionsStack=this._register(this.instantiationService.createInstance(L,0,this.scope)),this.editsStack=this._register(this.instantiationService.createInstance(L,1,this.scope)),this.navigationsStack=this._register(this.instantiationService.createInstance(L,2,this.scope)),this.stacks=[this.selectionsStack,this.editsStack,this.navigationsStack],this.onDidChange=o.Event.any(this.selectionsStack.onDidChange,this.editsStack.onDidChange,this.navigationsStack.onDidChange)}canGoForward(B){return this.getStack(B).canGoForward()}goForward(B){return this.getStack(B).goForward()}canGoBack(B){return this.getStack(B).canGoBack()}goBack(B){return this.getStack(B).goBack()}goPrevious(B){return this.getStack(B).goPrevious()}canGoLast(B){return this.getStack(B).canGoLast()}goLast(B){return this.getStack(B).goLast()}getStack(B=0){switch(B){case 0:return this.selectionsStack;case 1:return this.editsStack;case 2:return this.navigationsStack}}handleActiveEditorChange(B){this.selectionsStack.notifyNavigation(B)}handleActiveEditorSelectionChange(B,P){const V=this.selectionsStack.current;this.selectionsStack.notifyNavigation(B,P),P.reason===3?this.editsStack.notifyNavigation(B,P):(P.reason===4||P.reason===5)&&!this.selectionsStack.isNavigating()&&(P.reason===5&&!this.navigationsStack.isNavigating()&&V&&this.navigationsStack.addOrReplace(V.groupId,V.editor,V.selection),this.navigationsStack.notifyNavigation(B,P))}clear(){for(const B of this.stacks)B.clear()}remove(B){for(const P of this.stacks)P.remove(B)}move(B){for(const P of this.stacks)P.move(B)}};x=Ee([W(1,s.IInstantiationService)],x);class F{constructor(){this.onDidChange=o.Event.None}canGoForward(){return!1}async goForward(){}canGoBack(){return!1}async goBack(){}async goPrevious(){}canGoLast(){return!1}async goLast(){}handleActiveEditorChange(){}handleActiveEditorSelectionChange(){}clear(){}remove(){}move(){}dispose(){}}let L=class la extends v.Disposable{constructor(B,P,V,z,U,H){super();this.filter=B,this.scope=P,this.instantiationService=V,this.editorService=z,this.editorGroupService=U,this.logService=H,this._onDidChange=this._register(new o.Emitter),this.onDidChange=this._onDidChange.event,this.mapEditorToDisposable=new Map,this.mapGroupToDisposable=new Map,this.editorHelper=this.instantiationService.createInstance(M),this.stack=[],this.index=-1,this.previousIndex=-1,this.navigating=!1,this.currentSelectionState=void 0,this.registerListeners()}get current(){return this.stack[this.index]}set current(B){B&&(this.stack[this.index]=B)}registerListeners(){this._register(this.onDidChange(()=>this.traceStack())),this._register(this.logService.onDidChangeLogLevel(()=>this.traceStack()))}traceStack(){if(this.logService.getLevel()!==T.LogLevel.Trace)return;let B=[];for(const P of this.stack)typeof P.selection?.log=="function"?B.push(`- group: ${P.groupId}, editor: ${P.editor.resource?.toString()}, selection: ${P.selection.log()}`):B.push(`- group: ${P.groupId}, editor: ${P.editor.resource?.toString()}, selection: <none>`);B.length===0?this.trace(`index: ${this.index}, navigating: ${this.isNavigating()}: <empty>`):this.trace(`index: ${this.index}, navigating: ${this.isNavigating()} ${B.join(` `)} `)}trace(B,P=null,V){if(this.logService.getLevel()!==T.LogLevel.Trace)return;let z;switch(this.filter){case 0:z="global";break;case 1:z="edits";break;case 2:z="navigation";break}let U;switch(this.scope){case 0:U="default";break;case 1:U="editorGroup";break;case 2:U="editor";break}P!==null?this.logService.trace(`[History stack ${z}-${U}]: ${B} (editor: ${P?.resource?.toString()}, event: ${this.traceEvent(V)})`):this.logService.trace(`[History stack ${z}-${U}]: ${B}`)}traceEvent(B){if(!B)return"<none>";switch(B.reason){case 3:return"edit";case 4:return"navigation";case 5:return"jump";case 1:return"programmatic";case 2:return"user"}}registerGroupListeners(B){if(!this.mapGroupToDisposable.has(B)){const P=this.editorGroupService.getGroup(B);P&&this.mapGroupToDisposable.set(B,P.onWillMoveEditor(V=>this.onWillMoveEditor(V)))}}onWillMoveEditor(B){if(this.trace("onWillMoveEditor()",B.editor),this.scope!==1)for(const P of this.stack)P.groupId===B.groupId&&(!this.editorHelper.matchesEditor(B.editor,P.editor)||(P.groupId=B.target))}notifyNavigation(B,P){this.trace("notifyNavigation()",B?.input,P);const V=(0,A.isEditorPaneWithSelection)(B),z=B?.group&&B.input&&!B.input.isDisposed();this.navigating?(this.trace("notifyNavigation() ignoring (navigating)",B?.input,P),V&&z?(this.trace("notifyNavigation() updating current selection state",B?.input,P),this.currentSelectionState=new O({groupId:B.group.id,editor:B.input},B.getSelection(),P?.reason)):(this.trace("notifyNavigation() dropping current selection state",B?.input,P),this.currentSelectionState=void 0)):(this.trace("notifyNavigation() not ignoring",B?.input,P),V&&z?this.onSelectionAwareEditorNavigation(B.group.id,B.input,B.getSelection(),P):(this.currentSelectionState=void 0,z&&this.onNonSelectionAwareEditorNavigation(B.group.id,B.input)))}onSelectionAwareEditorNavigation(B,P,V,z){if(this.current?.groupId===B&&!V&&this.editorHelper.matchesEditor(this.current.editor,P))return;this.trace("onSelectionAwareEditorNavigation()",P,z);const U=new O({groupId:B,editor:P},V,z?.reason);!this.currentSelectionState||this.currentSelectionState.justifiesNewNavigationEntry(U)?this.doAdd(B,P,U.selection):this.doReplace(B,P,U.selection),this.currentSelectionState=U}onNonSelectionAwareEditorNavigation(B,P){this.current?.groupId===B&&this.editorHelper.matchesEditor(this.current.editor,P)||(this.trace("onNonSelectionAwareEditorNavigation()",P),this.doAdd(B,P))}doAdd(B,P,V){this.navigating||this.addOrReplace(B,P,V)}doReplace(B,P,V){this.navigating||this.addOrReplace(B,P,V,!0)}addOrReplace(B,P,V,z){this.registerGroupListeners(B);let U=!1;this.current&&(z||this.shouldReplaceStackEntry(this.current,{groupId:B,editor:P,selection:V}))&&(U=!0);const H=this.editorHelper.preferResourceEditorInput(P);if(!H)return;U?this.trace("replace()",H):this.trace("add()",H);const K={groupId:B,editor:H,selection:V};let G=[];if(U)this.current&&G.push(this.current),this.current=K;else{if(this.stack.length>this.index+1){for(let q=this.index+1;q<this.stack.length;q++)G.push(this.stack[q]);this.stack=this.stack.slice(0,this.index+1)}this.stack.splice(this.index+1,0,K),this.stack.length>la.MAX_STACK_SIZE?(G.push(this.stack.shift()),this.previousIndex>=0&&this.previousIndex--):this.setIndex(this.index+1,!0)}for(const q of G)this.editorHelper.clearOnEditorDispose(q.editor,this.mapEditorToDisposable);(0,A.isEditorInput)(H)&&this.editorHelper.onEditorDispose(H,()=>this.remove(H),this.mapEditorToDisposable),this._onDidChange.fire()}shouldReplaceStackEntry(B,P){return B.groupId!==P.groupId||!this.editorHelper.matchesEditor(B.editor,P.editor)?!1:B.selection?P.selection?B.selection.compare(P.selection)===1:!1:!0}move(B){if(B.isOperation(2))for(const P of this.stack)this.editorHelper.matchesEditor(B,P.editor)&&(P.editor={resource:B.target.resource})}remove(B){this.stack=this.stack.filter(P=>{const V=typeof B=="number"?P.groupId===B:this.editorHelper.matchesEditor(B,P.editor);return V&&this.editorHelper.clearOnEditorDispose(P.editor,this.mapEditorToDisposable),!V}),this.flatten(),this.index=this.stack.length-1,this.previousIndex=-1,typeof B=="number"&&(this.mapGroupToDisposable.get(B)?.dispose(),this.mapGroupToDisposable.delete(B)),this._onDidChange.fire()}flatten(){const B=[];let P;for(const V of this.stack)P&&this.shouldReplaceStackEntry(V,P)||(P=V,B.push(V));this.stack=B}clear(){this.index=-1,this.previousIndex=-1,this.stack.splice(0);for(const[,B]of this.mapEditorToDisposable)(0,v.dispose)(B);this.mapEditorToDisposable.clear();for(const[,B]of this.mapGroupToDisposable)(0,v.dispose)(B);this.mapGroupToDisposable.clear()}dispose(){super.dispose(),this.clear()}canGoForward(){return this.stack.length>this.index+1}async goForward(){if(!await this.maybeGoCurrent()&&!!this.canGoForward())return this.setIndex(this.index+1),this.navigate()}canGoBack(){return this.index>0}async goBack(){if(!await this.maybeGoCurrent()&&!!this.canGoBack())return this.setIndex(this.index-1),this.navigate()}async goPrevious(){if(!await this.maybeGoCurrent())return this.previousIndex===-1?this.goBack():(this.setIndex(this.previousIndex),this.navigate())}canGoLast(){return this.stack.length>0}async goLast(){if(!!this.canGoLast())return this.setIndex(this.stack.length-1),this.navigate()}async maybeGoCurrent(){return this.filter===0||this.isCurrentSelectionActive()?!1:(await this.navigate(),!0)}isCurrentSelectionActive(){if(!this.current?.selection)return!1;const B=this.editorService.activeEditorPane;if(!(0,A.isEditorPaneWithSelection)(B)||B.group?.id!==this.current.groupId||!B.input||!this.editorHelper.matchesEditor(B.input,this.current.editor))return!1;const P=B.getSelection();return P?P.compare(this.current.selection)===1:!1}setIndex(B,P){this.previousIndex=this.index,this.index=B,P||this._onDidChange.fire()}async navigate(){this.navigating=!0;try{this.current&&await this.doNavigate(this.current)}finally{this.navigating=!1}}doNavigate(B){let P=Object.create(null);return B.selection&&(P=B.selection.restore(P)),(0,A.isEditorInput)(B.editor)?this.editorService.openEditor(B.editor,P,B.groupId):this.editorService.openEditor({...B.editor,options:{...B.editor.options,...P}},B.groupId)}isNavigating(){return this.navigating}};L.MAX_STACK_SIZE=50,L=Ee([W(2,s.IInstantiationService),W(3,k.IEditorService),W(4,i.IEditorGroupsService),W(5,T.ILogService)],L),e.EditorNavigationStack=L;let M=class{constructor(B,P,V,z){this.uriIdentityService=B,this.lifecycleService=P,this.fileService=V,this.pathService=z}preferResourceEditorInput(B){const P=A.EditorResourceAccessor.getOriginalUri(B);if(P?.scheme===h.Schemas.file||P?.scheme===h.Schemas.vscodeRemote||P?.scheme===h.Schemas.vscodeUserData||P?.scheme===this.pathService.defaultUriScheme){if((0,A.isEditorInput)(B)){const z=B.toUntyped();if((0,A.isResourceEditorInput)(z))return z}return B}else return(0,A.isEditorInput)(B)?B:void 0}matchesEditor(B,P){return B instanceof I.FileChangesEvent||B instanceof I.FileOperationEvent?(0,A.isEditorInput)(P)?!1:B instanceof I.FileChangesEvent?B.contains(P.resource,2):this.matchesFile(P.resource,B):(0,A.isEditorInput)(B)?(0,A.isEditorInput)(P)?B.matches(P):this.matchesFile(P.resource,B):(0,A.isEditorInput)(P)?this.matchesFile(B.resource,P):B&&P&&this.uriIdentityService.extUri.isEqual(B.resource,P.resource)}matchesFile(B,P){if(P instanceof I.FileChangesEvent)return P.contains(B,2);if(P instanceof I.FileOperationEvent)return this.uriIdentityService.extUri.isEqualOrParent(B,P.resource);if((0,A.isEditorInput)(P)){const V=P.resource;return!V||this.lifecycleService.phase>=3&&!this.fileService.hasProvider(V)?!1:this.uriIdentityService.extUri.isEqual(V,B)}return this.uriIdentityService.extUri.isEqual(P?.resource,B)}matchesEditorIdentifier(B,P){return!P?.group||B.groupId!==P.group.id?!1:P.input?B.editor.matches(P.input):!1}onEditorDispose(B,P,V){const z=o.Event.once(B.onWillDispose)(()=>P());let U=V.get(B);U||(U=new v.DisposableStore,V.set(B,U)),U.add(z)}clearOnEditorDispose(B,P){if(!(0,A.isEditorInput)(B))return;const V=P.get(B);V&&((0,v.dispose)(V),P.delete(B))}};M=Ee([W(0,E.IUriIdentityService),W(1,y.ILifecycleService),W(2,I.IFileService),W(3,b.IPathService)],M)}),define(ne[334],re([1,0,15,143,152,111,55,18,48,19,29,13,9,345,1898,8,31,34,59,101,192]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolveResourcesForSearchIncludes=e.QueryBuilder=void 0;let a=class{constructor(T,R,O,x,F){this.configurationService=T,this.workspaceContextService=R,this.editorGroupsService=O,this.logService=x,this.pathService=F}text(T,R,O={}){T=this.getContentPattern(T,O);const x=this.configurationService.getValue(),F=R&&R.some(M=>!this.configurationService.getValue({resource:M}).search.useRipgrep);return{...this.commonQuery(R?.map(l.toWorkspaceFolder),O),type:2,contentPattern:T,previewOptions:O.previewOptions,maxFileSize:O.maxFileSize,usePCRE2:x.search.usePCRE2||F||!1,beforeContext:O.beforeContext,afterContext:O.afterContext,userDisabledExcludesAndIgnoreFiles:O.disregardExcludeSettings&&O.disregardIgnoreFiles}}getContentPattern(T,R){const O=this.configurationService.getValue();T.isRegExp&&(T.pattern=T.pattern.replace(/\r?\n/g,"\\n"));const x={...T,wordSeparators:O.editor.wordSeparators};return this.isCaseSensitive(T,R)&&(x.isCaseSensitive=!0),this.isMultiline(T)&&(x.isMultiline=!0),x}file(T,R={}){return{...this.commonQuery(T,R),type:1,filePattern:R.filePattern?R.filePattern.trim():R.filePattern,exists:R.exists,sortByScore:R.sortByScore,cacheKey:R.cacheKey}}handleIncludeExclude(T,R){return T?(T=Array.isArray(T)?T.map(m):m(T),R?this.parseSearchPaths(T):{pattern:h(...Array.isArray(T)?T:[T])}):{}}commonQuery(T=[],R={}){const O=this.handleIncludeExclude(R.includePattern,R.expandPatterns),x=this.handleIncludeExclude(R.excludePattern,R.expandPatterns),F=T.length>1,L=(O.searchPaths&&O.searchPaths.length?O.searchPaths.map(B=>this.getFolderQueryForSearchPath(B,R,x)):T.map(B=>this.getFolderQueryForRoot(B,R,x,F))).filter(B=>!!B),M={_reason:R._reason,folderQueries:L,usingSearchPaths:!!(O.searchPaths&&O.searchPaths.length),extraFileResources:R.extraFileResources,excludePattern:x.pattern,includePattern:O.pattern,onlyOpenEditors:R.onlyOpenEditors,maxResults:R.maxResults};if(R.onlyOpenEditors){const B=t.coalesce(t.flatten(this.editorGroupsService.groups.map(z=>z.editors.map(U=>U.resource))));this.logService.trace("QueryBuilder#commonQuery - openEditor URIs",JSON.stringify(B));const P=B.filter(z=>(0,u.pathIncludedInQuery)(M,z.fsPath)),V=this.commonQueryFromFileList(P);return this.logService.trace("QueryBuilder#commonQuery - openEditor Query",JSON.stringify(V)),{...M,...V}}const N=R.extraFileResources&&R.extraFileResources.filter(B=>(0,u.pathIncludedInQuery)(M,B.fsPath));return M.extraFileResources=N&&N.length?N:void 0,M}commonQueryFromFileList(T){const R=[],O=new k.ResourceMap,x={};let F=!1;return T.forEach(L=>{if(L.scheme===D.Schemas.walkThrough)return;if((0,w.isAbsolutePath)(L)){const N=this.workspaceContextService.getWorkspaceFolder(L)?.uri??L.with({path:I.dirname(L.fsPath)});let B=O.get(N);B||(F=!0,B={folder:N,includePattern:{}},R.push(B),O.set(N,B));const P=I.relative(N.fsPath,L.fsPath);(0,C.assertIsDefined)(B.includePattern)[P.replace(/\\/g,"/")]=!0}else L.fsPath&&(F=!0,x[L.fsPath]=!0)}),{folderQueries:R,includePattern:x,usingSearchPaths:!0,excludePattern:F?void 0:{"**/*":!0}}}isCaseSensitive(T,R){if(R.isSmartCase){if(T.isRegExp){if(v.containsUppercaseCharacter(T.pattern,!0))return!0}else if(v.containsUppercaseCharacter(T.pattern))return!0}return!!T.isCaseSensitive}isMultiline(T){return T.isMultiline||T.isRegExp&&(0,c.isMultilineRegexSource)(T.pattern)||T.pattern.indexOf(` `)>=0?!0:!!T.isMultiline}parseSearchPaths(T){const R=V=>I.isAbsolute(V)||/^\.\.?([\/\\]|$)/.test(V),x=(Array.isArray(T)?T:g(T)).map(V=>{const z=this.pathService.resolvedUserHome;return z?(0,A.untildify)(V,z.scheme===D.Schemas.file?z.fsPath:z.path):V}),F=f.groupBy(x,V=>R(V)?"searchPaths":"exprSegments"),L=(F.exprSegments||[]).map(V=>v.rtrim(V,"/")).map(V=>v.rtrim(V,"\\")).map(V=>(V[0]==="."&&(V="*"+V),d(V))),M={},N=this.expandSearchPathPatterns(F.searchPaths||[]);N&&N.length&&(M.searchPaths=N);const B=t.flatten(L),P=h(...B);return P&&(M.pattern=P),M}getExcludesForFolder(T,R){return R.disregardExcludeSettings?void 0:(0,u.getExcludes)(T,!R.disregardSearchExcludeSettings)}expandSearchPathPatterns(T){if(!T||!T.length)return[];const R=t.flatten(T.map(x=>{let{pathPortion:F,globPortion:L}=n(x);L&&(L=b(L));const M=this.expandOneSearchPath(F);return t.flatten(M.map(N=>this.resolveOneSearchPathPattern(N,L)))})),O=new Map;return R.forEach(x=>{const F=x.searchPath.toString(),L=O.get(F);L?x.pattern&&(L.pattern=L.pattern||{},L.pattern[x.pattern]=!0):O.set(F,{searchPath:x.searchPath,pattern:x.pattern?h(x.pattern):void 0})}),Array.from(O.values())}expandOneSearchPath(T){if(I.isAbsolute(T)){const R=this.workspaceContextService.getWorkspace().folders;return R[0]&&R[0].uri.scheme!==D.Schemas.file?[{searchPath:R[0].uri.with({path:T})}]:[{searchPath:o.URI.file(I.normalize(T))}]}if(this.workspaceContextService.getWorkbenchState()===2){const R=this.workspaceContextService.getWorkspace().folders[0].uri;if(T=m(T),T.startsWith("../")||T===".."){const x=I.posix.resolve(R.path,T);return[{searchPath:R.with({path:x})}]}const O=b(T);return[{searchPath:R,pattern:O}]}else{if(T==="./"||T===".\\")return[];{const R=T.replace(/^\.[\/\\]/,""),x=this.workspaceContextService.getWorkspace().folders.map(F=>{const L=R.match(new RegExp(`^${v.escapeRegExpCharacters(F.name)}(?:/(.*)|$)`));return L?{match:L,folder:F}:null}).filter(C.isDefined);if(x.length)return x.map(F=>{const L=F.match[1];return{searchPath:F.folder.uri,pattern:L&&b(L)}});{const F=T.match(/\.[\/\\](.+)[\/\\]?/),L=F?F[1]:T,M=i.localize(0,null,L);throw new Error(M)}}}}resolveOneSearchPathPattern(T,R){const O=T.pattern&&R?`${T.pattern}/${R}`:T.pattern||R,x=[{searchPath:T.searchPath,pattern:O}];return O&&!O.endsWith("**")&&x.push({searchPath:T.searchPath,pattern:O+"/**"}),x}getFolderQueryForSearchPath(T,R,O){const x=this.getFolderQueryForRoot((0,l.toWorkspaceFolder)(T.searchPath),R,O,!1);return x?{...x,includePattern:T.pattern}:null}getFolderQueryForRoot(T,R,O,x){let F;const L=o.URI.isUri(T)?T:T.uri;if(O.searchPaths){const V=O.searchPaths.filter(z=>(0,w.isEqual)(z.searchPath,L))[0];if(V&&!V.pattern)return null;V&&(F=V.pattern)}const M=this.configurationService.getValue({resource:L}),B={...this.getExcludesForFolder(M,R)||{},...F||{}},P=o.URI.isUri(T)?(0,w.basename)(T):T.name;return{folder:L,folderName:x?P:void 0,excludePattern:Object.keys(B).length>0?B:void 0,fileEncoding:M.files&&M.files.encoding,disregardIgnoreFiles:typeof R.disregardIgnoreFiles=="boolean"?R.disregardIgnoreFiles:!M.search.useIgnoreFiles,disregardGlobalIgnoreFiles:typeof R.disregardGlobalIgnoreFiles=="boolean"?R.disregardGlobalIgnoreFiles:!M.search.useGlobalIgnoreFiles,disregardParentIgnoreFiles:typeof R.disregardParentIgnoreFiles=="boolean"?R.disregardParentIgnoreFiles:!M.search.useParentIgnoreFiles,ignoreSymlinks:typeof R.ignoreSymlinks=="boolean"?R.ignoreSymlinks:!M.search.followSymlinks}}};a=Ee([W(0,S.IConfigurationService),W(1,l.IWorkspaceContextService),W(2,r.IEditorGroupsService),W(3,s.ILogService),W(4,p.IPathService)],a),e.QueryBuilder=a;function n(y){const T=y.match(/[\*\{\}\(\)\[\]\?]/);if(T){const R=T.index,O=y.substr(0,R).match(/[/|\\][^/\\]*$/);if(O){let x=y.substr(0,O.index);return x.match(/[/\\]/)||(x+="/"),{pathPortion:x,globPortion:y.substr((O.index||0)+1)}}}return{pathPortion:y}}function h(...y){return y.length?y.reduce((T,R)=>(T[R]=!0,T),Object.create(null)):void 0}function g(y){return _.splitGlobAware(y,",").map(T=>T.trim()).filter(T=>!!T.length)}function d(y){return[`**/${y}/**`,`**/${y}`].map(R=>R.replace(/\*\*\/\*\*/g,"**"))}function m(y){return y.replace(/\\/g,"/")}function b(y){return m(y).replace(/^\.\//,"").replace(/\/+$/g,"")}function E(y,T){y=t.distinct(y,x=>x.toString());const R=[],O=T.getWorkspace();return y&&y.forEach(x=>{let F;if(T.getWorkbenchState()===2)F=(0,w.relativePath)(O.folders[0].uri,x),F&&F!=="."&&(F="./"+F);else{const L=T.getWorkspaceFolder(x);if(L){const M=L.name;if(O.folders.filter(B=>B.name===M).length===1){const B=(0,w.relativePath)(L.uri,x);B===""?F=`./${L.name}`:F=`./${L.name}/${B}`}else F=x.fsPath}}F&&R.push(F)}),R}e.resolveResourcesForSearchIncludes=E}),define(ne[2545],re([1,0,18,9,28,23,5,41,53,34,361,816,21,50,69,334,192]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalUrlLinkOpener=e.TerminalSearchLinkOpener=e.TerminalLocalFolderOutsideWorkspaceLinkOpener=e.TerminalLocalFolderInWorkspaceLinkOpener=e.TerminalLocalFileLinkOpener=void 0;let l=class{constructor(h,g){this._os=h,this._editorService=g}async open(h){if(!h.uri)throw new Error("Tried to open file link without a resolved URI");const g=this.extractLineColumnInfo(h.text),d={startLineNumber:g.lineNumber,startColumn:g.columnNumber};await this._editorService.openEditor({resource:h.uri,options:{pinned:!0,selection:d,revealIfOpened:!0}})}extractLineColumnInfo(h){const g=(0,C.getLocalLinkRegex)(this._os).exec(h),d={lineNumber:1,columnNumber:1};if(!g)return d;const m=this._os===1?C.winLineAndColumnMatchIndex:C.unixLineAndColumnMatchIndex;for(let b=0;b<C.lineAndColumnClause.length;b++){const E=m+C.lineAndColumnClauseGroupCount*b,y=g[E];if(y){d.lineNumber=parseInt(y,10);const T=g[E+2];T&&(d.columnNumber=parseInt(T,10));break}}return d}};l=Ee([W(1,o.IEditorService)],l),e.TerminalLocalFileLinkOpener=l;let r=class{constructor(h){this._commandService=h}async open(h){if(!h.uri)throw new Error("Tried to open folder in workspace link without a resolved URI");await this._commandService.executeCommand("revealInExplorer",h.uri)}};r=Ee([W(0,_.ICommandService)],r),e.TerminalLocalFolderInWorkspaceLinkOpener=r;let p=class{constructor(h){this._hostService=h}async open(h){if(!h.uri)throw new Error("Tried to open folder in workspace link without a resolved URI");this._hostService.openWindow([{folderUri:h.uri}],{forceNewWindow:!0})}};p=Ee([W(0,i.IHostService)],p),e.TerminalLocalFolderOutsideWorkspaceLinkOpener=p;let u=class{constructor(h,g,d,m,b,E,y,T,R,O){this._capabilities=h,this._localFileOpener=g,this._localFolderInWorkspaceOpener=d,this._os=m,this._fileService=b,this._instantiationService=E,this._quickInputService=y,this._searchService=T,this._workspaceContextService=R,this._workbenchEnvironmentService=O,this._fileQueryBuilder=this._instantiationService.createInstance(S.QueryBuilder)}async open(h){const g=(0,v.osPathModule)(this._os).sep;let d=h.text.replace(/^file:\/\/\/?/,"");d=(0,v.osPathModule)(this._os).normalize(d).replace(/^(\.+[\\/])+/,""),d=d.replace(/:in$/,""),this._workspaceContextService.getWorkspace().folders.forEach(E=>{if(d.substring(0,E.name.length+1)===E.name+g){d=d.substring(E.name.length+1);return}});let m=d;this._capabilities.has(2)&&(m=(0,v.updateLinkWithRelativeCwd)(this._capabilities,h.bufferRange.start.y,d,g)||d);const b=m.replace(/:\d+(:\d+)?$/,"");try{const E=await this._getExactMatch(b);if(E){const{uri:y,isDirectory:T}=E,R={text:m,uri:y,bufferRange:h.bufferRange,type:h.type};if(y)return T?this._localFolderInWorkspaceOpener.open(R):this._localFileOpener.open(R)}}catch{return this._quickInputService.quickAccess.show(d)}return this._quickInputService.quickAccess.show(d)}async _getExactMatch(h){let g;if((0,v.osPathModule)(this._os).isAbsolute(h)){const d=this._workbenchEnvironmentService.remoteAuthority?t.Schemas.vscodeRemote:t.Schemas.file,m=f.URI.from({scheme:d,path:h});try{const b=await this._fileService.stat(m);g={uri:m,isDirectory:b.isDirectory}}catch{}}if(!g){const d=await this._searchService.fileSearch(this._fileQueryBuilder.file(this._workspaceContextService.getWorkspace().folders,{filePattern:h,maxResults:2}));d.results.length===1&&(g={uri:d.results[0].resource})}return g}};u=Ee([W(4,A.IFileService),W(5,k.IInstantiationService),W(6,I.IQuickInputService),W(7,s.ISearchService),W(8,w.IWorkspaceContextService),W(9,c.IWorkbenchEnvironmentService)],u),e.TerminalSearchLinkOpener=u;let a=class{constructor(h,g){this._isRemote=h,this._openerService=g}async open(h){if(!h.uri)throw new Error("Tried to open a url without a resolved URI");this._openerService.open(h.uri||f.URI.parse(h.text),{allowTunneling:this._isRemote,allowContributedOpeners:!0})}};a=Ee([W(1,D.IOpenerService)],a),e.TerminalUrlLinkOpener=a}),define(ne[2546],re([1,0,10,117,2,18,48,14,9,1755,8,23,5,31,212,2210,2212,2545,816,2230,2213,2224,105,2384,120]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalLinkManager=void 0;let d=class extends _.DisposableStore{constructor(y,T,R,O,x,F,L,M){super();this._xterm=y,this._processManager=T,this._configurationService=O,this._fileService=x,this._instantiationService=F,this._logService=L,this._tunnelService=M,this._standardLinkProviders=new Map,this._linkProvidersDisposables=[],this._externalLinkProviders=[],this._openers=new Map,this._resolvedLinkCache=new b,this._setupLinkDetector(u.TerminalUriLinkDetector.id,this._instantiationService.createInstance(u.TerminalUriLinkDetector,this._xterm,this._resolvePath.bind(this))),this._configurationService.getValue(g.TERMINAL_CONFIG_SECTION).enableFileLinks&&this._setupLinkDetector(r.TerminalLocalLinkDetector.id,this._instantiationService.createInstance(r.TerminalLocalLinkDetector,this._xterm,R,this._processManager.os||D.OS,this._resolvePath.bind(this))),this._setupLinkDetector(p.TerminalShellIntegrationLinkDetector.id,this._instantiationService.createInstance(p.TerminalShellIntegrationLinkDetector,this._xterm)),this._setupLinkDetector(a.TerminalWordLinkDetector.id,this._instantiationService.createInstance(a.TerminalWordLinkDetector,this._xterm)),R.get(0)?.onDidChangeCwd(P=>{this.processCwd=P});const N=this._instantiationService.createInstance(l.TerminalLocalFileLinkOpener,this._processManager.os||D.OS),B=this._instantiationService.createInstance(l.TerminalLocalFolderInWorkspaceLinkOpener);this._openers.set(0,N),this._openers.set(2,B),this._openers.set(1,this._instantiationService.createInstance(l.TerminalLocalFolderOutsideWorkspaceLinkOpener)),this._openers.set(3,this._instantiationService.createInstance(l.TerminalSearchLinkOpener,R,N,B,this._processManager.os||D.OS)),this._openers.set(4,this._instantiationService.createInstance(l.TerminalUrlLinkOpener,!!this._processManager.remoteAuthority)),this._registerStandardLinkProviders()}_setupLinkDetector(y,T,R=!1){const O=this._instantiationService.createInstance(s.TerminalLinkDetectorAdapter,T);return O.onDidActivateLink(x=>{x.event?.preventDefault(),!(x.event&&!(x.event instanceof n.TerminalLinkQuickPickEvent)&&!this._isLinkActivationModifierDown(x.event))&&(x.link.activate?x.link.activate(x.link.text):this._openLink(x.link))}),O.onDidShowHover(x=>this._tooltipCallback(x.link,x.viewportRange,x.modifierDownCallback,x.modifierUpCallback)),R||this._standardLinkProviders.set(y,O),O}async _openLink(y){this._logService.debug("Opening link",y);const T=this._openers.get(y.type);if(!T)throw new Error(`No matching opener for link type "${y.type}"`);await T.open(y)}async openRecentLink(y){let T,R=this._xterm.buffer.active.length;for(;(!T||T.length===0)&&R>=this._xterm.buffer.active.viewportY;)T=await this._getLinksForType(R,y),R--;if(!T||T.length<1)return;const O=new n.TerminalLinkQuickPickEvent(t.EventType.CLICK);return T[0].activate(O,T[0].text),T[0]}async getLinks(){const y=[],T=[],R=[];for(let O=this._xterm.buffer.active.length-1;O>=this._xterm.buffer.active.viewportY;O--){const x=await this._getLinksForLine(O);if(x){const{wordLinks:F,webLinks:L,fileLinks:M}=x;F&&F.length&&y.push(...F.reverse()),L&&L.length&&T.push(...L.reverse()),M&&M.length&&R.push(...M.reverse())}}return{webLinks:T,fileLinks:R,wordLinks:y}}async _getLinksForLine(y){let T=await this._getLinksForType(y,"word");const R=await this._getLinksForType(y,"url"),O=await this._getLinksForType(y,"localFile"),x=new Set;let F;if(T){F=[];for(const L of T)!x.has(L.text)&&L.text.length>1&&(F.push(L),x.add(L.text))}return{wordLinks:F,webLinks:R,fileLinks:O}}async _getLinksForType(y,T){switch(T){case"word":return await new Promise(R=>this._standardLinkProviders.get(a.TerminalWordLinkDetector.id)?.provideLinks(y,R));case"url":return await new Promise(R=>this._standardLinkProviders.get(u.TerminalUriLinkDetector.id)?.provideLinks(y,R));case"localFile":return(await new Promise(O=>this._standardLinkProviders.get(r.TerminalLocalLinkDetector.id)?.provideLinks(y,O)))?.filter(O=>O.type===0)}}_tooltipCallback(y,T,R,O){if(!this._widgetManager)return;const x=this._xterm._core,F={width:x._renderService.dimensions.actualCellWidth,height:x._renderService.dimensions.actualCellHeight},L={width:this._xterm.cols,height:this._xterm.rows};this._showHover({viewportRange:T,cellDimensions:F,terminalDimensions:L,modifierDownCallback:R,modifierUpCallback:O},this._getLinkHoverString(y.text,y.label),y.actions,M=>y.activate(void 0,M),y)}_showHover(y,T,R,O,x){if(this._widgetManager){const F=this._instantiationService.createInstance(h.TerminalHover,y,T,R,O),L=this._widgetManager.attachWidget(F);L&&x?.onInvalidated(()=>L.dispose())}}setWidgetManager(y){this._widgetManager=y}set processCwd(y){this._processCwd=y}_clearLinkProviders(){(0,_.dispose)(this._linkProvidersDisposables),this._linkProvidersDisposables.length=0}_registerStandardLinkProviders(){for(const y of this._standardLinkProviders.values())this._linkProvidersDisposables.push(this._xterm.registerLinkProvider(y))}registerExternalLinkProvider(y){this._clearLinkProviders();const T=`extension-${this._externalLinkProviders.length}`,R=this._setupLinkDetector(T,new S.TerminalExternalLinkDetector(T,this._xterm,y),!0),O=this._xterm.registerLinkProvider(R);return this._externalLinkProviders.push(O),this._registerStandardLinkProviders(),O}get _localLinkRegex(){if(!this._processManager)throw new Error("Process manager is required");const y=this._processManager.os===1?r.winLocalLinkClause:r.unixLocalLinkClause;return new RegExp(`${y}(${r.lineAndColumnClause})`)}_isLinkActivationModifierDown(y){return this._configurationService.getValue("editor").multiCursorModifier==="ctrlCmd"?!!y.altKey:D.isMacintosh?y.metaKey:y.ctrlKey}_getLinkHoverString(y,T){const R=this._configurationService.getValue("editor");let O="";R.multiCursorModifier==="ctrlCmd"?D.isMacintosh?O=w.localize(0,null):O=w.localize(1,null):D.isMacintosh?O=w.localize(2,null):O=w.localize(3,null);let x=w.localize(4,null);try{this._tunnelService.canTunnel(I.URI.parse(y))&&(x=w.localize(5,null))}catch{}const F=new f.MarkdownString("",!0);return T&&(T=F.appendText(T).value,F.value=""),y&&(y=F.appendText(y).value,F.value=""),T=T||x,y=y||T,/(\s| )/.test(y)&&(y=w.localize(6,null)),F.appendLink(y,T).appendMarkdown(` (${O})`)}get _osPath(){if(!this._processManager)throw new Error("Process manager is required");return this._processManager.os===1?k.win32:k.posix}_preprocessPath(y){if(!this._processManager)throw new Error("Process manager is required");if(y.charAt(0)==="~"){if(!this._processManager.userHome)return null;y=this._osPath.join(this._processManager.userHome,y.substring(1))}else if(y.charAt(0)!=="/"&&y.charAt(0)!=="~")if(this._processManager.os===1)if(!y.match("^"+r.winDrivePrefix)&&!y.startsWith("\\\\?\\")){if(!this._processCwd)return null;y=this._osPath.join(this._processCwd,y)}else y=y.replace(/^\\\\\?\\/,"");else{if(!this._processCwd)return null;y=this._osPath.join(this._processCwd,y)}return y=this._osPath.normalize(y),y}async _resolvePath(y,T){if(!this._processManager)throw new Error("Process manager is required");const R=this._resolvedLinkCache.get(T||y);if(R!==void 0)return R;if(T)try{const F=await this._fileService.stat(T),L={uri:T,link:y,isDirectory:F.isDirectory};return this._resolvedLinkCache.set(T,L),L}catch{return this._resolvedLinkCache.set(T,null),null}const O=this._preprocessPath(y);if(!O)return this._resolvedLinkCache.set(y,null),null;const x=this.extractLinkUrl(O);if(!x)return this._resolvedLinkCache.set(y,null),null;try{let F;this._processManager.remoteAuthority?F=I.URI.from({scheme:A.Schemas.vscodeRemote,authority:this._processManager.remoteAuthority,path:x}):F=I.URI.file(x);try{const L=await this._fileService.stat(F),M={uri:F,link:y,isDirectory:L.isDirectory};return this._resolvedLinkCache.set(y,M),M}catch{return this._resolvedLinkCache.set(y,null),null}}catch{return this._resolvedLinkCache.set(y,null),null}}extractLinkUrl(y){const T=this._localLinkRegex.exec(y);return T?T[1]:null}};d=Ee([W(3,v.IConfigurationService),W(4,C.IFileService),W(5,o.IInstantiationService),W(6,c.ILogService),W(7,i.ITunnelService)],d),e.TerminalLinkManager=d;var m;(function(E){E[E.TTL=1e4]="TTL"})(m||(m={}));class b{constructor(){this._cache=new Map,this._cacheTilTimeout=0}set(y,T){this._cacheTilTimeout&&window.clearTimeout(this._cacheTilTimeout),this._cacheTilTimeout=window.setTimeout(()=>this._cache.clear(),1e4),this._cache.set(this._getKey(y),T)}get(y){return this._cache.get(this._getKey(y))}_getKey(y){return I.URI.isUri(y)?y.toString():y}}}),define(ne[624],re([1,0,19,9,30,22,5,334,192,34]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.checkGlobFileExists=e.checkActivateWorkspaceContainsExtension=void 0;const v=7e3;function C(S,s){const l=s.activationEvents;if(!l)return Promise.resolve(void 0);const r=[],p=[];for(const d of l)if(/^workspaceContains:/.test(d)){const m=d.substr("workspaceContains:".length);m.indexOf("*")>=0||m.indexOf("?")>=0||S.forceUsingSearch?p.push(m):r.push(m)}if(r.length===0&&p.length===0)return Promise.resolve(void 0);let u;const a=new Promise((d,m)=>{u=d}),n=d=>u({activationEvent:d}),h=Promise.all(r.map(d=>o(S,d,n))).then(()=>{}),g=c(S,s.identifier,p,n);return Promise.all([h,g]).then(()=>{u(void 0)}),a}e.checkActivateWorkspaceContainsExtension=C;async function o(S,s,l){for(const r of S.folders)if(await S.exists(t.joinPath(f.URI.revive(r),s))){l(`workspaceContains:${s}`);return}}async function c(S,s,l,r){if(l.length===0)return Promise.resolve(void 0);const p=new _.CancellationTokenSource,u=S.checkExists(S.folders,l,p.token),a=setTimeout(async()=>{p.cancel(),S.logService.info(`Not activating extension '${s.value}': Timed out while searching for 'workspaceContains' pattern ${l.join(",")}`)},v);let n=!1;try{n=await u}catch(h){A.isCancellationError(h)||A.onUnexpectedError(h)}p.dispose(),clearTimeout(a),n&&r(`workspaceContains:${l.join(",")}`)}function i(S,s,l,r){const p=S.get(k.IInstantiationService),u=S.get(I.ISearchService),n=p.createInstance(D.QueryBuilder).file(s.map(h=>(0,w.toWorkspaceFolder)(f.URI.revive(h))),{_reason:"checkExists",includePattern:l,exists:!0});return u.fileSearch(n,r).then(h=>!!h.limitHit,h=>A.isCancellationError(h)?!1:Promise.reject(h))}e.checkGlobFileExists=i}),define(ne[897],re([1,0,5,6,24,214,16,28,7,2,96,9,19,18,79,834,295,69,8,303,2331,35,48,15,43,1829,27,624,34,30,115]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.convertInternalMediaPathToFileURI=e.WalkthroughsService=e.walkthroughMetadataConfigurationKey=e.hiddenEntriesConfigurationKey=e.IWalkthroughsService=e.HasMultipleNewFileEntries=void 0,e.HasMultipleNewFileEntries=new I.RawContextKey("hasMultipleNewFileEntries",!1),e.IWalkthroughsService=(0,t.createDecorator)("walkthroughsService"),e.hiddenEntriesConfigurationKey="workbench.welcomePage.hiddenCategories",e.walkthroughMetadataConfigurationKey="workbench.welcomePage.walkthroughMetadata";const R=(0,d.localize)(0,null),O=24*60*60*1e3,x=7*O;let F=class extends w.Disposable{constructor(V,z,U,H,K,G,q,Z,j,X,Y,$){super();this.storageService=V,this.commandService=z,this.instantiationService=U,this.workspaceContextService=H,this.contextService=K,this.userDataSyncEnablementService=G,this.configurationService=q,this.extensionManagementService=Z,this.hostService=j,this.viewsService=X,this.telemetryService=Y,this._onDidAddWalkthrough=new f.Emitter,this.onDidAddWalkthrough=this._onDidAddWalkthrough.event,this._onDidRemoveWalkthrough=new f.Emitter,this.onDidRemoveWalkthrough=this._onDidRemoveWalkthrough.event,this._onDidChangeWalkthrough=new f.Emitter,this.onDidChangeWalkthrough=this._onDidChangeWalkthrough.event,this._onDidProgressStep=new f.Emitter,this.onDidProgressStep=this._onDidProgressStep.event,this.sessionEvents=new Set,this.completionListeners=new Map,this.gettingStartedContributions=new Map,this.steps=new Map,this.sessionInstalledExtensions=new Set,this.categoryVisibilityContextKeys=new Set,this.stepCompletionContextKeyExpressions=new Set,this.stepCompletionContextKeys=new Set,this.tasExperimentService=$,this.metadata=new Map(JSON.parse(this.storageService.get(e.walkthroughMetadataConfigurationKey,0,"[]"))),this.memento=new A.Memento("gettingStartedService",this.storageService),this.stepProgress=this.memento.getMemento(0,0),u.walkthroughsExtensionPoint.setHandler(async(J,{added:ee,removed:te})=>{await Promise.all([...ee.map(se=>this.registerExtensionWalkthroughContributions(se.description)),...te.map(se=>this.unregisterExtensionWalkthroughContributions(se.description))]),this.triggerInstalledExtensionsRegistered()}),this.initCompletionEventListeners(),e.HasMultipleNewFileEntries.bindTo(this.contextService).set(!1),this.installedExtensionsRegistered=new Promise(J=>this.triggerInstalledExtensionsRegistered=J),S.walkthroughs.forEach(async(J,ee)=>{this._registerWalkthrough({...J,icon:{type:"icon",icon:J.icon},order:S.walkthroughs.length-ee,source:R,when:I.ContextKeyExpr.deserialize(J.when)??I.ContextKeyExpr.true(),steps:J.content.steps.map((te,se)=>({...te,completionEvents:te.completionEvents??[],description:L(te.description),category:J.id,order:se,when:I.ContextKeyExpr.deserialize(te.when)??I.ContextKeyExpr.true(),media:te.media.type==="image"?{type:"image",altText:te.media.altText,path:B(te.media.path)}:te.media.type==="svg"?{type:"svg",altText:te.media.altText,path:(0,e.convertInternalMediaPathToFileURI)(te.media.path).with({query:JSON.stringify({moduleId:"vs/workbench/contrib/welcomeGettingStarted/common/media/"+te.media.path})})}:{type:"markdown",path:(0,e.convertInternalMediaPathToFileURI)(te.media.path).with({query:JSON.stringify({moduleId:"vs/workbench/contrib/welcomeGettingStarted/common/media/"+te.media.path})}),base:c.FileAccess.asFileUri("vs/workbench/contrib/welcomeGettingStarted/common/media/",Q),root:c.FileAccess.asFileUri("vs/workbench/contrib/welcomeGettingStarted/common/media/",Q)}}))})})}initCompletionEventListeners(){this._register(this.commandService.onDidExecuteCommand(V=>this.progressByEvent(`onCommand:${V.commandId}`))),this.extensionManagementService.getInstalled().then(V=>{V.forEach(z=>this.progressByEvent(`extensionInstalled:${z.identifier.id.toLowerCase()}`))}),this._register(this.extensionManagementService.onDidInstallExtensions(async V=>{const z=await this.hostService.hadLastFocus();for(const U of V)z&&this.sessionInstalledExtensions.add(U.identifier.id.toLowerCase()),this.progressByEvent(`extensionInstalled:${U.identifier.id.toLowerCase()}`)})),this._register(this.contextService.onDidChangeContext(V=>{V.affectsSome(this.stepCompletionContextKeys)&&this.stepCompletionContextKeyExpressions.forEach(z=>{V.affectsSome(new Set(z.keys()))&&this.contextService.contextMatchesRules(z)&&this.progressByEvent("onContext:"+z.serialize())})})),this._register(this.viewsService.onDidChangeViewVisibility(V=>{V.visible&&this.progressByEvent("onView:"+V.id)})),this._register(this.configurationService.onDidChangeConfiguration(V=>{V.affectedKeys.forEach(z=>{this.progressByEvent("onSettingChanged:"+z)})})),this.userDataSyncEnablementService.isEnabled()&&this.progressByEvent("onEvent:sync-enabled"),this._register(this.userDataSyncEnablementService.onDidChangeEnablement(()=>{this.userDataSyncEnablementService.isEnabled()&&this.progressByEvent("onEvent:sync-enabled")}))}markWalkthroughOpened(V){const z=this.gettingStartedContributions.get(V),U=this.metadata.get(V);U&&z&&this.metadata.set(V,{...U,manaullyOpened:!0,stepIDs:z.steps.map(H=>H.id)}),this.storageService.store(e.walkthroughMetadataConfigurationKey,JSON.stringify([...this.metadata.entries()]),0,0)}async registerExtensionWalkthroughContributions(V){const z=G=>G.startsWith("https://")?C.URI.parse(G,!0):c.FileAccess.asFileUri((0,o.joinPath)(V.extensionLocation,G)),U=G=>{const q=Z=>Z.startsWith("https://")?C.URI.parse(Z,!0):c.FileAccess.asBrowserUri((0,o.joinPath)(V.extensionLocation,Z));if(typeof G=="string"){const Z=q(G);return{hcDark:Z,hcLight:Z,dark:Z,light:Z}}else return{hcDark:q(G.hc),hcLight:q(G.hcLight??G.light),light:q(G.light),dark:q(G.dark)}};if(!V.contributes?.walkthroughs?.length)return;let H,K=Math.min();await Promise.all(V.contributes?.walkthroughs?.map(async(G,q)=>{const Z=V.identifier.value+"#"+G.id,j=!this.metadata.get(Z);j&&this.metadata.set(Z,{firstSeen:+new Date,stepIDs:G.steps?.map(ee=>ee.id)??[],manaullyOpened:!1});const X=await Promise.race([this.tasExperimentService?.getTreatment(`gettingStarted.overrideCategory.${V.identifier.value+"."+G.id}.when`),new Promise(ee=>setTimeout(()=>ee(G.when),5e3))]);this.sessionInstalledExtensions.has(V.identifier.value.toLowerCase())&&this.contextService.contextMatchesRules(I.ContextKeyExpr.deserialize(X??G.when)??I.ContextKeyExpr.true())&&(this.sessionInstalledExtensions.delete(V.identifier.value.toLowerCase()),q<K&&j&&(H=Z,K=q));const Y=(G.steps??[]).map((ee,te)=>{const se=L(ee.description||""),ie=V.identifier.value+"#"+G.id+"#"+ee.id;let ce;if(!ee.media)throw Error("missing media in walkthrough step: "+G.id+"@"+ee.id);if(ee.media.image){const le=ee.media.altText;le===void 0&&console.error("Walkthrough item:",ie,"is missing altText for its media element."),ce={type:"image",altText:le,path:U(ee.media.image)}}else if(ee.media.markdown)ce={type:"markdown",path:z(ee.media.markdown),base:z((0,n.dirname)(ee.media.markdown)),root:c.FileAccess.asFileUri(V.extensionLocation)};else if(ee.media.svg)ce={type:"svg",path:z(ee.media.svg),altText:ee.media.svg};else{const le=ee.media;if(typeof le.path=="string"&&le.path.endsWith(".md"))ce={type:"markdown",path:z(le.path),base:z((0,n.dirname)(le.path)),root:c.FileAccess.asFileUri(V.extensionLocation)};else{const ae=le.altText;ae===void 0&&console.error("Walkthrough item:",ie,"is missing altText for its media element."),ce={type:"image",altText:ae,path:U(le.path)}}}return{description:se,media:ce,completionEvents:ee.completionEvents?.filter(le=>typeof le=="string")??[],id:ie,title:ee.title,when:I.ContextKeyExpr.deserialize(ee.when)??I.ContextKeyExpr.true(),category:Z,order:te}});let $=!1;if(G.featuredFor){const ee=this.workspaceContextService.getWorkspace().folders.map(se=>se.uri),te=new y.CancellationTokenSource;setTimeout(()=>te.cancel(),2e3),$=await this.instantiationService.invokeFunction(se=>(0,b.checkGlobFileExists)(se,ee,G.featuredFor,te.token))}const J={description:G.description,title:G.title,id:Z,isFeatured:$,source:V.displayName??V.name,order:0,steps:Y,icon:{type:"image",path:V.icon?c.FileAccess.asBrowserUri((0,o.joinPath)(V.extensionLocation,V.icon)).toString(!0):T.DefaultIconPath},when:I.ContextKeyExpr.deserialize(X??G.when)??I.ContextKeyExpr.true()};this._registerWalkthrough(J),this._onDidAddWalkthrough.fire(this.resolveWalkthrough(J))})),this.storageService.store(e.walkthroughMetadataConfigurationKey,JSON.stringify([...this.metadata.entries()]),0,0),H&&this.configurationService.getValue("workbench.welcomePage.walkthroughs.openOnInstall")&&(this.telemetryService.publicLog2("gettingStarted.didAutoOpenWalkthrough",{id:H}),this.commandService.executeCommand("workbench.action.openWalkthrough",H))}unregisterExtensionWalkthroughContributions(V){!V.contributes?.walkthroughs?.length||V.contributes?.walkthroughs?.forEach(z=>{const U=V.identifier.value+"#walkthrough#"+z.id;z.steps.forEach(H=>{const K=V.identifier.value+"#"+z.id+"#"+H.id;this.steps.delete(K)}),this.gettingStartedContributions.delete(U),this._onDidRemoveWalkthrough.fire(U)})}getWalkthrough(V){const z=this.gettingStartedContributions.get(V);if(!z)throw Error("Trying to get unknown walkthrough: "+V);return this.resolveWalkthrough(z)}getWalkthroughs(){return[...this.gettingStartedContributions.values()].map(U=>({...U,content:{type:"steps",steps:U.steps}})).filter(U=>U.content.type!=="steps"||U.content.steps.length).map(U=>this.resolveWalkthrough(U))}resolveWalkthrough(V){const z=V.steps.map(Y=>this.getStepProgress(Y)),U=this.metadata.get(V.id)?.manaullyOpened,H=this.metadata.get(V.id)?.firstSeen,K=H&&H>+new Date-x,G=this.metadata.get(V.id)?.stepIDs,q=this.gettingStartedContributions.get(V.id);if(!q)throw Error("Could not find walkthrough with id "+V.id);const Z=q.steps.map(Y=>Y.id),j=G&&(Z.length!==G.length||Z.some((Y,$)=>Y!==G[$]));let X=0;if(H){const $=+new Date-H;X=Math.max(0,(x-$)/x)}return{...V,recencyBonus:X,steps:z,newItems:!!j,newEntry:!!(K&&!U)}}getStepProgress(V){return{...V,done:!1,...this.stepProgress[V.id]}}progressStep(V){const z=this.stepProgress[V];if(!z||z.done!==!0){this.stepProgress[V]={done:!0},this.memento.saveMemento();const U=this.getStep(V);if(!U)throw Error("Tried to progress unknown step");this._onDidProgressStep.fire(this.getStepProgress(U))}}deprogressStep(V){delete this.stepProgress[V],this.memento.saveMemento();const z=this.getStep(V);this._onDidProgressStep.fire(this.getStepProgress(z))}progressByEvent(V){this.sessionEvents.has(V)||(this.sessionEvents.add(V),this.completionListeners.get(V)?.forEach(z=>this.progressStep(z)))}registerWalkthrough(V){this._registerWalkthrough({...V,steps:V.steps.map(z=>({...z,description:L(z.description)}))})}_registerWalkthrough(V){if(this.gettingStartedContributions.get(V.id)){console.error(`Skipping attempt to overwrite walkthrough. (${V.id})`);return}this.gettingStartedContributions.set(V.id,V),V.steps.forEach(U=>{if(this.steps.has(U.id))throw Error("Attempting to register step with id "+U.id+" twice. Second is dropped.");this.steps.set(U.id,U),U.when.keys().forEach(H=>this.categoryVisibilityContextKeys.add(H)),this.registerDoneListeners(U)}),V.when.keys().forEach(U=>this.categoryVisibilityContextKeys.add(U))}registerDoneListeners(V){if(V.doneOn){console.error("wakthrough step",V,"uses deprecated 'doneOn' property. Adopt 'completionEvents' to silence this warning");return}V.completionEvents.length||(V.completionEvents=(0,h.coalesce)((0,h.flatten)(V.description.filter(z=>z.nodes.length===1).map(z=>z.nodes.filter(U=>typeof U!="string").map(({href:U})=>{if(U.startsWith("command:"))return"onCommand:"+U.slice("command:".length,U.includes("?")?U.indexOf("?"):void 0);if(U.startsWith("https://")||U.startsWith("http://"))return"onLink:"+U}))))),V.completionEvents.length||V.completionEvents.push("stepSelected");for(let z of V.completionEvents){const[U,H,K]=/^([^:]*):?(.*)$/.exec(z)??[];if(!H){console.error(`Unknown completionEvent ${z} when registering step ${V.id}`);continue}switch(H){case"onLink":case"onEvent":case"onView":case"onSettingChanged":break;case"onContext":{const G=I.ContextKeyExpr.deserialize(K);G?(this.stepCompletionContextKeyExpressions.add(G),G.keys().forEach(q=>this.stepCompletionContextKeys.add(q)),z=H+":"+G.serialize(),this.contextService.contextMatchesRules(G)&&this.sessionEvents.add(z)):console.error("Unable to parse context key expression:",G,"in walkthrough step",V.id);break}case"onStepSelected":case"stepSelected":z="stepSelected:"+V.id;break;case"onCommand":z=H+":"+K.replace(/^toSide:/,"");break;case"onExtensionInstalled":case"extensionInstalled":z="extensionInstalled:"+K.toLowerCase();break;default:console.error(`Unknown completionEvent ${z} when registering step ${V.id}`);continue}this.registerCompletionListener(z,V),this.sessionEvents.has(z)&&this.progressStep(V.id)}}registerCompletionListener(V,z){this.completionListeners.has(V)||this.completionListeners.set(V,new Set),this.completionListeners.get(V)?.add(z.id)}getStep(V){const z=this.steps.get(V);if(!z)throw Error("Attempting to access step which does not exist in registry "+V);return z}};F=Ee([W(0,_.IStorageService),W(1,D.ICommandService),W(2,t.IInstantiationService),W(3,E.IWorkspaceContextService),W(4,I.IContextKeyService),W(5,v.IUserDataSyncEnablementService),W(6,r.IConfigurationService),W(7,i.IExtensionManagementService),W(8,l.IHostService),W(9,g.IViewsService),W(10,m.ITelemetryService),W(11,s.IWorkbenchAssignmentService)],F),e.WalkthroughsService=F;const L=P=>P.split(` `).filter(V=>V).map(V=>(0,p.parseLinkedText)(V)),M=P=>P.startsWith("https://")?C.URI.parse(P,!0):c.FileAccess.asFileUri("vs/workbench/contrib/welcomeGettingStarted/common/media/"+P,Q);e.convertInternalMediaPathToFileURI=M;const N=P=>P.startsWith("https://")?C.URI.parse(P,!0):c.FileAccess.asBrowserUri("vs/workbench/contrib/welcomeGettingStarted/common/media/"+P,Q),B=P=>{if(typeof P=="string"){const V=N(P);return{hcDark:V,hcLight:V,dark:V,light:V}}else return{hcDark:N(P.hc),hcLight:N(P.hcLight??P.light),light:N(P.light),dark:N(P.dark)}};(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:"resetGettingStartedProgress",category:"Developer",title:"Reset Welcome Page Walkthrough Progress",f1:!0})}run(P){const V=P.get(e.IWalkthroughsService),z=P.get(_.IStorageService);z.store(e.hiddenEntriesConfigurationKey,JSON.stringify([]),0,0),z.store(e.walkthroughMetadataConfigurationKey,JSON.stringify([]),0,0);const U=new A.Memento("gettingStartedService",P.get(_.IStorageService)),H=U.getMemento(0,0);for(const K in H)if(Object.prototype.hasOwnProperty.call(H,K))try{V.deprogressStep(K)}catch(G){console.error(G)}U.saveMemento()}}),(0,a.registerSingleton)(e.IWalkthroughsService,F)}),define(ne[898],re([1,0,20,192]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addContextToEditorMatches=e.editorMatchesToTextSearchResults=void 0;function _(I,w,v){const C=I[0].range.startLineNumber,o=I[I.length-1].range.endLineNumber,c=[];for(let i=C;i<=o;i++)c.push(w.getLineContent(i));return new f.TextSearchMatch(c.join(` `)+` `,I.map(i=>new t.Range(i.range.startLineNumber-1,i.range.startColumn-1,i.range.endLineNumber-1,i.range.endColumn-1)),v)}function A(I,w,v){let C=-1;const o=[];let c=[];return I.forEach(i=>{i.range.startLineNumber!==C&&(c=[],o.push(c)),c.push(i),C=i.range.endLineNumber}),o.map(i=>_(i,w,v))}e.editorMatchesToTextSearchResults=A;function k(I,w,v){const C=[];let o=-1;for(let c=0;c<I.length;c++){const{start:i,end:S}=D(I[c]);if(typeof v.beforeContext=="number"&&v.beforeContext>0){const r=Math.max(o+1,i-v.beforeContext);for(let p=r;p<i;p++)C.push({text:w.getLineContent(p+1),lineNumber:p})}C.push(I[c]);const s=I[c+1],l=s?D(s).start:Number.MAX_VALUE;if(typeof v.afterContext=="number"&&v.afterContext>0){const r=Math.min(l-1,S+v.afterContext,w.getLineCount()-1);for(let p=S+1;p<=r;p++)C.push({text:w.getLineContent(p+1),lineNumber:p})}o=S}return C}e.addContextToEditorMatches=k;function D(I){const w=I.ranges,v=Array.isArray(w)?w[0].startLineNumber:w.startLineNumber,C=Array.isArray(w)?w[w.length-1].endLineNumber:w.endLineNumber;return{start:v,end:C}}}),define(ne[335],re([1,0,11,30,22,6,111,2,55,29,9,20,122,93,52,5,2542,192,27,32,12,417,898,13,110,8,279,18,56]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RangeHighlightDecorations=e.ISearchWorkbenchService=e.SearchWorkbenchService=e.SearchModel=e.SearchResult=e.searchMatchComparer=e.FolderMatchWithResource=e.FolderMatch=e.FileMatch=e.Match=void 0;class y{constructor(V,z,U,H){this._parent=V,this._fullPreviewLines=z,this._oneLinePreviewText=z[U.startLineNumber];const K=U.startLineNumber===U.endLineNumber?U.endColumn:this._oneLinePreviewText.length;this._rangeInPreviewText=new l.OneLineRange(1,U.startColumn+1,K+1),this._range=new C.Range(H.startLineNumber+1,H.startColumn+1,H.endLineNumber+1,H.endColumn+1),this._fullPreviewRange=U,this._id=this._parent.id()+">"+this._range+this.getMatchString()}id(){return this._id}parent(){return this._parent}text(){return this._oneLinePreviewText}range(){return this._range}preview(){let V=this._oneLinePreviewText.substring(0,this._rangeInPreviewText.startColumn-1),z=this.getMatchString(),U=this._oneLinePreviewText.substring(this._rangeInPreviewText.endColumn-1);V=(0,w.lcut)(V,26),V=V.trimLeft();let H=y.MAX_PREVIEW_CHARS-V.length;return z=z.substr(0,H),H-=z.length,U=U.substr(0,H),{before:V,inside:z,after:U}}get replaceString(){const V=this.parent().parent().searchModel;if(!V.replacePattern)throw new Error("searchModel.replacePattern must be set before accessing replaceString");const z=this.fullMatchText();let U=V.replacePattern.getReplaceString(z,V.preserveCase);if(U===null){const H=this.fullMatchText(!0);if(U=V.replacePattern.getReplaceString(H,V.preserveCase),U===null){const K=H.replace(/\r\n/g,` `);U=V.replacePattern.getReplaceString(K,V.preserveCase)}}return U===null&&(U=V.replacePattern.pattern),U}fullMatchText(V=!1){let z;return V?z=this._fullPreviewLines:(z=this._fullPreviewLines.slice(this._fullPreviewRange.startLineNumber,this._fullPreviewRange.endLineNumber+1),z[z.length-1]=z[z.length-1].slice(0,this._fullPreviewRange.endColumn),z[0]=z[0].slice(this._fullPreviewRange.startColumn)),z.join(` `)}rangeInPreview(){return{...this._fullPreviewRange,startColumn:this._fullPreviewRange.startColumn+1,endColumn:this._fullPreviewRange.endColumn+1}}fullPreviewLines(){return this._fullPreviewLines.slice(this._fullPreviewRange.startLineNumber,this._fullPreviewRange.endLineNumber+1)}getMatchString(){return this._oneLinePreviewText.substring(this._rangeInPreviewText.startColumn-1,this._rangeInPreviewText.endColumn-1)}}y.MAX_PREVIEW_CHARS=250,Ee([g.memoize],y.prototype,"preview",null),e.Match=y;let T=class Xn extends D.Disposable{constructor(V,z,U,H,K,G,q){super();this._query=V,this._previewOptions=z,this._maxResults=U,this._parent=H,this.rawMatch=K,this.modelService=G,this.replaceService=q,this._onChange=this._register(new A.Emitter),this.onChange=this._onChange.event,this._onDispose=this._register(new A.Emitter),this.onDispose=this._onDispose.event,this._model=null,this._modelListener=null,this._selectedMatch=null,this._modelDecorations=[],this._context=new Map,this.replaceQ=Promise.resolve(),this._resource=this.rawMatch.resource,this._matches=new Map,this._removedMatches=new Set,this._updateScheduler=new t.RunOnceScheduler(this.updateMatchesForModel.bind(this),250),this.createMatches()}static getDecorationOption(V){return V?Xn._CURRENT_FIND_MATCH:Xn._FIND_MATCH}get context(){return new Map(this._context)}createMatches(){const V=this.modelService.getModel(this._resource);V?(this.bindModel(V),this.updateMatchesForModel()):(this.rawMatch.results.filter(l.resultIsMatch).forEach(z=>{B(z,this).forEach(U=>this.add(U))}),this.addContext(this.rawMatch.results))}bindModel(V){this._model=V,this._modelListener=this._model.onDidChangeContent(()=>{this._updateScheduler.schedule()}),this._model.onWillDispose(()=>this.onModelWillDispose()),this.updateHighlights()}onModelWillDispose(){this.updateMatchesForModel(),this.unbindModel()}unbindModel(){this._model&&(this._updateScheduler.cancel(),this._model.deltaDecorations(this._modelDecorations,[]),this._model=null,this._modelListener.dispose())}updateMatchesForModel(){if(!this._model)return;this._matches=new Map;const V=this._query.isWordMatch&&this._query.wordSeparators?this._query.wordSeparators:null,z=this._model.findMatches(this._query.pattern,this._model.getFullModelRange(),!!this._query.isRegExp,!!this._query.isCaseSensitive,V,!1,this._maxResults??Number.MAX_SAFE_INTEGER);this.updateMatches(z,!0)}updatesMatchesForLineAfterReplace(V,z){if(!this._model)return;const U={startLineNumber:V,startColumn:this._model.getLineMinColumn(V),endLineNumber:V,endColumn:this._model.getLineMaxColumn(V)};Array.from(this._matches.values()).filter(q=>q.range().startLineNumber===V).forEach(q=>this._matches.delete(q.id()));const K=this._query.isWordMatch&&this._query.wordSeparators?this._query.wordSeparators:null,G=this._model.findMatches(this._query.pattern,U,!!this._query.isRegExp,!!this._query.isCaseSensitive,K,!1,this._maxResults??Number.MAX_SAFE_INTEGER);this.updateMatches(G,z)}updateMatches(V,z){if(!this._model)return;const U=(0,n.editorMatchesToTextSearchResults)(V,this._model,this._previewOptions);U.forEach(H=>{B(H,this).forEach(K=>{this._removedMatches.has(K.id())||(this.add(K),this.isMatchSelected(K)&&(this._selectedMatch=K))})}),this.addContext((0,n.addContextToEditorMatches)(U,this._model,this.parent().parent().query).filter(H=>!(0,l.resultIsMatch)(H)).map(H=>({...H,lineNumber:H.lineNumber+1}))),this._onChange.fire({forceUpdateModel:z}),this.updateHighlights()}updateHighlights(){!this._model||(this.parent().showHighlights?this._modelDecorations=this._model.deltaDecorations(this._modelDecorations,this.matches().map(V=>({range:V.range(),options:Xn.getDecorationOption(this.isMatchSelected(V))}))):this._modelDecorations=this._model.deltaDecorations(this._modelDecorations,[]))}id(){return this.resource.toString()}parent(){return this._parent}matches(){return Array.from(this._matches.values())}remove(V){this.removeMatch(V),this._removedMatches.add(V.id()),this._onChange.fire({didRemove:!0})}async replace(V){return this.replaceQ=this.replaceQ.finally(async()=>{await this.replaceService.replace(V),this.updatesMatchesForLineAfterReplace(V.range().startLineNumber,!1)})}setSelectedMatch(V){V&&(!this._matches.has(V.id())||this.isMatchSelected(V))||(this._selectedMatch=V,this.updateHighlights())}getSelectedMatch(){return this._selectedMatch}isMatchSelected(V){return!!this._selectedMatch&&this._selectedMatch.id()===V.id()}count(){return this.matches().length}get resource(){return this._resource}name(){return(0,k.getBaseLabel)(this.resource)}addContext(V){!V||V.filter(z=>!(0,l.resultIsMatch)(z)).forEach(z=>this._context.set(z.lineNumber,z.text))}add(V,z){this._matches.set(V.id(),V),z&&this._onChange.fire({forceUpdateModel:!0})}removeMatch(V){this._matches.delete(V.id()),this.isMatchSelected(V)?this.setSelectedMatch(null):this.updateHighlights()}async resolveFileStat(V){this._fileStat=await V.stat(this.resource).catch(()=>{})}get fileStat(){return this._fileStat}set fileStat(V){this._fileStat=V}dispose(){this.setSelectedMatch(null),this.unbindModel(),this._onDispose.fire(),super.dispose()}};T._CURRENT_FIND_MATCH=c.ModelDecorationOptions.register({description:"search-current-find-match",stickiness:1,zIndex:13,className:"currentFindMatch",overviewRuler:{color:(0,u.themeColorFromId)(p.overviewRulerFindMatchForeground),position:o.OverviewRulerLane.Center},minimap:{color:(0,u.themeColorFromId)(p.minimapFindMatch),position:o.MinimapPosition.Inline}}),T._FIND_MATCH=c.ModelDecorationOptions.register({description:"search-find-match",stickiness:1,className:"findMatch",overviewRuler:{color:(0,u.themeColorFromId)(p.overviewRulerFindMatchForeground),position:o.OverviewRulerLane.Center},minimap:{color:(0,u.themeColorFromId)(p.minimapFindMatch),position:o.MinimapPosition.Inline}}),T=Ee([W(5,i.IModelService),W(6,a.IReplaceService)],T),e.FileMatch=T;let R=class extends D.Disposable{constructor(V,z,U,H,K,G,q,Z){super();this._resource=V,this._id=z,this._index=U,this._query=H,this._parent=K,this._searchModel=G,this.replaceService=q,this.instantiationService=Z,this._onChange=this._register(new A.Emitter),this.onChange=this._onChange.event,this._onDispose=this._register(new A.Emitter),this.onDispose=this._onDispose.event,this._replacingAll=!1,this._fileMatches=new I.ResourceMap,this._unDisposedFileMatches=new I.ResourceMap}get searchModel(){return this._searchModel}get showHighlights(){return this._parent.showHighlights}set replacingAll(V){this._replacingAll=V}id(){return this._id}get resource(){return this._resource}index(){return this._index}name(){return(0,k.getBaseLabel)((0,h.withNullAsUndefined)(this.resource))||""}parent(){return this._parent}bindModel(V){const z=this._fileMatches.get(V.uri);z&&z.bindModel(V)}add(V,z){const U=[],H=[];V.forEach(G=>{const q=this._fileMatches.get(G.resource);if(q)G.results.filter(l.resultIsMatch).forEach(Z=>{B(Z,q).forEach(j=>q.add(j))}),H.push(q),q.addContext(G.results);else{const Z=this.instantiationService.createInstance(T,this._query.contentPattern,this._query.previewOptions,this._query.maxResults,this,G);this.doAdd(Z),U.push(Z);const j=Z.onChange(({didRemove:X})=>this.onFileChange(Z,X));Z.onDispose(()=>j.dispose())}});const K=[...U,...H];!z&&K.length&&this._onChange.fire({elements:K,added:!!U.length})}clear(){const V=this.matches();this.disposeMatches(),this._onChange.fire({elements:V,removed:!0})}remove(V){this.doRemove(V)}replace(V){return this.replaceService.replace([V]).then(()=>{this.doRemove(V)})}replaceAll(){const V=this.matches();return this.replaceService.replace(V).then(()=>this.doRemove(V))}matches(){return[...this._fileMatches.values()]}isEmpty(){return this.fileCount()===0}fileCount(){return this._fileMatches.size}count(){return this.matches().reduce((V,z)=>V+z.count(),0)}onFileChange(V,z=!1){let U=!1;this._fileMatches.has(V.resource)||(this.doAdd(V),U=!0),V.count()===0&&(this.doRemove(V,!1,!1),U=!1,z=!0),this._replacingAll||this._onChange.fire({elements:[V],added:U,removed:z})}doAdd(V){this._fileMatches.set(V.resource,V),this._unDisposedFileMatches.has(V.resource)&&this._unDisposedFileMatches.delete(V.resource)}doRemove(V,z=!0,U=!0){Array.isArray(V)||(V=[V]);for(const H of V)this._fileMatches.delete(H.resource),z?H.dispose():this._unDisposedFileMatches.set(H.resource,H);U&&this._onChange.fire({elements:V,removed:!0})}disposeMatches(){[...this._fileMatches.values()].forEach(V=>V.dispose()),[...this._unDisposedFileMatches.values()].forEach(V=>V.dispose()),this._fileMatches.clear(),this._unDisposedFileMatches.clear()}dispose(){this.disposeMatches(),this._onDispose.fire(),super.dispose()}};R=Ee([W(6,a.IReplaceService),W(7,S.IInstantiationService)],R),e.FolderMatch=R;let O=class extends R{constructor(V,z,U,H,K,G,q,Z){super(V,z,U,H,K,G,q,Z)}get resource(){return this._resource}};O=Ee([W(6,a.IReplaceService),W(7,S.IInstantiationService)],O),e.FolderMatchWithResource=O;function x(P,V,z="default"){if(P instanceof R&&V instanceof R)return P.index()-V.index();if(P instanceof T&&V instanceof T)switch(z){case"countDescending":return V.count()-P.count();case"countAscending":return P.count()-V.count();case"type":return(0,m.compareFileExtensions)(P.name(),V.name());case"fileNames":return(0,m.compareFileNames)(P.name(),V.name());case"modified":{const U=P.fileStat,H=V.fileStat;if(U&&H)return H.mtime-U.mtime}default:return(0,m.comparePaths)(P.resource.fsPath,V.resource.fsPath)||(0,m.compareFileNames)(P.name(),V.name())}return P instanceof y&&V instanceof y?C.Range.compareRangesUsingStarts(P.range(),V.range()):0}e.searchMatchComparer=x;let F=class extends D.Disposable{constructor(V,z,U,H,K){super();this._searchModel=V,this.replaceService=z,this.instantiationService=U,this.modelService=H,this.uriIdentityService=K,this._onChange=this._register(new A.Emitter),this.onChange=this._onChange.event,this._folderMatches=[],this._otherFilesMatch=null,this._folderMatchesMap=I.TernarySearchTree.forUris(G=>this.uriIdentityService.extUri.ignorePathCasing(G)),this._showHighlights=!1,this._query=null,this.disposePastResults=()=>{},this._isDirty=!1,this._rangeHighlightDecorations=this.instantiationService.createInstance(N),this._register(this.modelService.onModelAdded(G=>this.onModelAdded(G))),this._register(this.onChange(G=>{G.removed&&(this._isDirty=!this.isEmpty())}))}get isDirty(){return this._isDirty}get query(){return this._query}set query(V){const z=this.folderMatches();new Promise(U=>this.disposePastResults=U).then(()=>z.forEach(U=>U.clear())).then(()=>z.forEach(U=>U.dispose())).then(()=>this._isDirty=!1),this._rangeHighlightDecorations.removeHighlightRange(),this._folderMatchesMap=I.TernarySearchTree.forUris(U=>this.uriIdentityService.extUri.ignorePathCasing(U)),!!V&&(this._folderMatches=(V&&V.folderQueries||[]).map(U=>U.folder).map((U,H)=>this.createFolderMatchWithResource(U,U.toString(),H,V)),this._folderMatches.forEach(U=>this._folderMatchesMap.set(U.resource,U)),this._otherFilesMatch=this.createOtherFilesFolderMatch("otherFiles",this._folderMatches.length+1,V),this._query=V)}onModelAdded(V){const z=this._folderMatchesMap.findSubstr(V.uri);z&&z.bindModel(V)}createFolderMatchWithResource(V,z,U,H){return this._createBaseFolderMatch(O,V,z,U,H)}createOtherFilesFolderMatch(V,z,U){return this._createBaseFolderMatch(R,null,V,z,U)}_createBaseFolderMatch(V,z,U,H,K){const G=this.instantiationService.createInstance(V,z,U,H,K,this,this._searchModel),q=G.onChange(Z=>this._onChange.fire(Z));return G.onDispose(()=>q.dispose()),G}get searchModel(){return this._searchModel}add(V,z=!1){const{byFolder:U,other:H}=this.groupFilesByFolder(V);U.forEach(K=>{if(!K.length)return;const G=this.getFolderMatch(K[0].resource);G&&G.add(K,z)}),this._otherFilesMatch?.add(H,z),this.disposePastResults()}clear(){this.folderMatches().forEach(V=>V.clear()),this.disposeMatches(),this._folderMatches=[],this._otherFilesMatch=null}remove(V){Array.isArray(V)||(V=[V]),V.forEach(K=>{K instanceof R&&K.clear()});const z=V.filter(K=>K instanceof T),{byFolder:U,other:H}=this.groupFilesByFolder(z);U.forEach(K=>{!K.length||this.getFolderMatch(K[0].resource).remove(K)}),H.length&&this.getFolderMatch(H[0].resource).remove(H)}replace(V){return this.getFolderMatch(V.resource).replace(V)}replaceAll(V){return this.replacingAll=!0,this.replaceService.replace(this.matches(),V).then(()=>{this.replacingAll=!1,this.clear()},()=>{this.replacingAll=!1})}folderMatches(){return this._otherFilesMatch?[...this._folderMatches,this._otherFilesMatch]:[...this._folderMatches]}matches(){const V=[];return this.folderMatches().forEach(z=>{V.push(z.matches())}),[].concat(...V)}isEmpty(){return this.folderMatches().every(V=>V.isEmpty())}fileCount(){return this.folderMatches().reduce((V,z)=>V+z.fileCount(),0)}count(){return this.matches().reduce((V,z)=>V+z.count(),0)}get showHighlights(){return this._showHighlights}toggleHighlights(V){if(this._showHighlights===V)return;this._showHighlights=V;let z=null;this.matches().forEach(U=>{U.updateHighlights(),z||(z=U.getSelectedMatch())}),this._showHighlights&&z?this._rangeHighlightDecorations.highlightRange(z.parent().resource,z.range()):this._rangeHighlightDecorations.removeHighlightRange()}get rangeHighlightDecorations(){return this._rangeHighlightDecorations}getFolderMatch(V){const z=this._folderMatchesMap.findSubstr(V);return z||this._otherFilesMatch}set replacingAll(V){this.folderMatches().forEach(z=>{z.replacingAll=V})}groupFilesByFolder(V){const z=new I.ResourceMap,U=[];return this._folderMatches.forEach(H=>z.set(H.resource,[])),V.forEach(H=>{const K=this.getFolderMatch(H.resource);if(!K)return;const G=K.resource;G?z.get(G).push(H):U.push(H)}),{byFolder:z,other:U}}disposeMatches(){this.folderMatches().forEach(V=>V.dispose()),this._folderMatches=[],this._folderMatchesMap=I.TernarySearchTree.forUris(V=>this.uriIdentityService.extUri.ignorePathCasing(V)),this._rangeHighlightDecorations.removeHighlightRange()}dispose(){this.disposePastResults(),this.disposeMatches(),this._rangeHighlightDecorations.dispose(),super.dispose()}};F=Ee([W(1,a.IReplaceService),W(2,S.IInstantiationService),W(3,i.IModelService),W(4,E.IUriIdentityService)],F),e.SearchResult=F;let L=class extends D.Disposable{constructor(V,z,U,H){super();this.searchService=V,this.telemetryService=z,this.configurationService=U,this.instantiationService=H,this._searchQuery=null,this._replaceActive=!1,this._replaceString=null,this._replacePattern=null,this._preserveCase=!1,this._startStreamDelay=Promise.resolve(),this._resultQueue=[],this._onReplaceTermChanged=this._register(new A.Emitter),this.onReplaceTermChanged=this._onReplaceTermChanged.event,this.currentCancelTokenSource=null,this.searchCancelledForNewSearch=!1,this._searchResult=this.instantiationService.createInstance(F,this)}isReplaceActive(){return this._replaceActive}set replaceActive(V){this._replaceActive=V}get replacePattern(){return this._replacePattern}get replaceString(){return this._replaceString||""}set preserveCase(V){this._preserveCase=V}get preserveCase(){return this._preserveCase}set replaceString(V){this._replaceString=V,this._searchQuery&&(this._replacePattern=new s.ReplacePattern(V,this._searchQuery.contentPattern)),this._onReplaceTermChanged.fire()}get searchResult(){return this._searchResult}async search(V,z){this.cancelSearch(!0),this._searchQuery=V,this.searchConfig.searchOnType||this.searchResult.clear(),this._searchResult.query=this._searchQuery;const U=new A.Emitter;this._replacePattern=new s.ReplacePattern(this.replaceString,this._searchQuery.contentPattern),this._startStreamDelay=new Promise(Z=>setTimeout(Z,this.searchConfig.searchOnType?150:0));const H=this.currentCancelTokenSource=new f.CancellationTokenSource,K=this.searchService.textSearch(this._searchQuery,this.currentCancelTokenSource.token,Z=>{U.fire(),this.onSearchProgress(Z),z&&z(Z)}),G=()=>H.dispose();K.then(G,G);const q=Date.now();Promise.race([K,A.Event.toPromise(U.event)]).finally(()=>{this.telemetryService.publicLog("searchResultsFirstRender",{duration:Date.now()-q})}),K.then(Z=>this.onSearchCompleted(Z,Date.now()-q),Z=>this.onSearchError(Z,Date.now()-q));try{return await K}finally{this.telemetryService.publicLog("searchResultsFinished",{duration:Date.now()-q})}}onSearchCompleted(V,z){if(!this._searchQuery)throw new Error("onSearchCompleted must be called after a search is started");this._searchResult.add(this._resultQueue),this._resultQueue=[];const U=Object.assign({},this._searchQuery.contentPattern);delete U.pattern;const H=V&&V.stats,K=this._searchQuery.folderQueries.every(Z=>Z.folder.scheme===b.Schemas.file),G=this._searchQuery.folderQueries.every(Z=>Z.folder.scheme!==b.Schemas.file),q=K?b.Schemas.file:G?"other":"mixed";return this.telemetryService.publicLog("searchResultsShown",{count:this._searchResult.count(),fileCount:this._searchResult.fileCount(),options:U,duration:z,type:H&&H.type,scheme:q,searchOnTypeEnabled:this.searchConfig.searchOnType}),V}onSearchError(V,z){_.isCancellationError(V)&&(this.onSearchCompleted(this.searchCancelledForNewSearch?{exit:1,results:[],messages:[]}:null,z),this.searchCancelledForNewSearch=!1)}async onSearchProgress(V){V.resource&&(this._resultQueue.push(V),await this._startStreamDelay,this._resultQueue.length&&(this._searchResult.add(this._resultQueue,!0),this._resultQueue=[]))}get searchConfig(){return this.configurationService.getValue("search")}cancelSearch(V=!1){return this.currentCancelTokenSource?(this.searchCancelledForNewSearch=V,this.currentCancelTokenSource.cancel(),!0):!1}dispose(){this.cancelSearch(),this.searchResult.dispose(),super.dispose()}};L=Ee([W(0,l.ISearchService),W(1,r.ITelemetryService),W(2,d.IConfigurationService),W(3,S.IInstantiationService)],L),e.SearchModel=L;let M=class{constructor(V){this.instantiationService=V,this._searchModel=null}get searchModel(){return this._searchModel||(this._searchModel=this.instantiationService.createInstance(L)),this._searchModel}};M=Ee([W(0,S.IInstantiationService)],M),e.SearchWorkbenchService=M,e.ISearchWorkbenchService=(0,S.createDecorator)("searchWorkbenchService");let N=class ca{constructor(V){this._modelService=V,this._decorationId=null,this._model=null,this._modelDisposables=new D.DisposableStore}removeHighlightRange(){this._model&&this._decorationId&&this._model.deltaDecorations([this._decorationId],[]),this._decorationId=null}highlightRange(V,z,U=0){let H;v.URI.isUri(V)?H=this._modelService.getModel(V):H=V,H&&this.doHighlightRange(H,z)}doHighlightRange(V,z){this.removeHighlightRange(),this._decorationId=V.deltaDecorations([],[{range:z,options:ca._RANGE_HIGHLIGHT_DECORATION}])[0],this.setModel(V)}setModel(V){this._model!==V&&(this.clearModelListeners(),this._model=V,this._modelDisposables.add(this._model.onDidChangeDecorations(z=>{this.clearModelListeners(),this.removeHighlightRange(),this._model=null})),this._modelDisposables.add(this._model.onWillDispose(()=>{this.clearModelListeners(),this.removeHighlightRange(),this._model=null})))}clearModelListeners(){this._modelDisposables.clear()}dispose(){this._model&&(this.removeHighlightRange(),this._modelDisposables.dispose(),this._model=null)}};N._RANGE_HIGHLIGHT_DECORATION=c.ModelDecorationOptions.register({description:"search-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0}),N=Ee([W(0,i.IModelService)],N),e.RangeHighlightDecorations=N;function B(P,V){const z=P.preview.text.split(` `);if(Array.isArray(P.ranges))return P.ranges.map((U,H)=>{const K=P.preview.matches[H];return new y(V,z,K,U)});{const U=P.preview.matches;return[new y(V,z,U,P.ranges)]}}}),define(ne[2547],re([1,0,15,11,22,2,55,18,151,13,52,23,31,27,56,44,21,40,192,898]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SearchService=void 0;let u=class extends A.Disposable{constructor(n,h,g,d,m,b,E){super();this.modelService=n,this.editorService=h,this.telemetryService=g,this.logService=d,this.extensionService=m,this.fileService=b,this.uriIdentityService=E,this.fileSearchProviders=new Map,this.textSearchProviders=new Map,this.deferredFileSearchesByScheme=new Map,this.deferredTextSearchesByScheme=new Map,this.loggedSchemesMissingProviders=new Set}registerSearchResultProvider(n,h,g){let d,m;if(h===0)d=this.fileSearchProviders,m=this.deferredFileSearchesByScheme;else if(h===1)d=this.textSearchProviders,m=this.deferredTextSearchesByScheme;else throw new Error("Unknown SearchProviderType");return d.set(n,g),m.has(n)&&(m.get(n).complete(g),m.delete(n)),(0,A.toDisposable)(()=>{d.delete(n)})}async textSearch(n,h,g){const d=this.getLocalResults(n);g&&t.coalesce([...d.results.values()]).forEach(g);const m=E=>{(0,r.isFileMatch)(E)?!d.results.has(E.resource)&&g&&g(E):g&&g(E),(0,r.isProgressMessage)(E)&&this.logService.debug("SearchService#search",E.message)},b=await this.doSearch(n,h,m);return{...b,limitHit:b.limitHit||d.limitHit,results:[...b.results,...t.coalesce([...d.results.values()])]}}fileSearch(n,h){return this.doSearch(n,h)}doSearch(n,h,g){this.logService.trace("SearchService#search",JSON.stringify(n));const d=this.getSchemesInQuery(n),m=[Promise.resolve(null)];d.forEach(E=>m.push(this.extensionService.activateByEvent(`onSearch:${E}`))),m.push(this.extensionService.activateByEvent("onSearch:file"));const b=(async()=>{if(await Promise.all(m),await this.extensionService.whenInstalledExtensionsRegistered(),h&&h.isCancellationRequested)return Promise.reject(new _.CancellationError);const E=R=>{h&&h.isCancellationRequested||g&&g(R)},y=await Promise.all(n.folderQueries.map(R=>this.fileService.exists(R.folder)));n.folderQueries=n.folderQueries.filter((R,O)=>y[O]);let T=await this.searchWithProviders(n,E,h);return T=t.coalesce(T),T.length?{limitHit:T[0]&&T[0].limitHit,stats:T[0].stats,messages:t.coalesce(t.flatten(T.map(R=>R.messages))).filter(t.uniqueFilter(R=>R.type+R.text+R.trusted)),results:t.flatten(T.map(R=>R.results))}:{limitHit:!1,results:[],messages:[]}})();return new Promise((E,y)=>{h&&h.onCancellationRequested(()=>{y(new _.CancellationError)}),b.then(E,y)})}getSchemesInQuery(n){const h=new Set;return n.folderQueries&&n.folderQueries.forEach(g=>h.add(g.folder.scheme)),n.extraFileResources&&n.extraFileResources.forEach(g=>h.add(g.scheme)),h}async waitForProvider(n,h){const g=n===1?this.deferredFileSearchesByScheme:this.deferredTextSearchesByScheme;if(g.has(h))return g.get(h).p;{const d=new f.DeferredPromise;return g.set(h,d),d.p}}async searchWithProviders(n,h,g){const d=I.StopWatch.create(!1),m=[],b=this.groupFolderQueriesByScheme(n),E=[...b.keys()].some(y=>n.type===1?this.fileSearchProviders.has(y):this.textSearchProviders.has(y));return await Promise.all([...b.keys()].map(async y=>{const T=b.get(y);let R=n.type===1?this.fileSearchProviders.get(y):this.textSearchProviders.get(y);if(!R)if(E){this.loggedSchemesMissingProviders.has(y)||(this.logService.warn(`No search provider registered for scheme: ${y}. Another scheme has a provider, not waiting for ${y}`),this.loggedSchemesMissingProviders.add(y));return}else this.loggedSchemesMissingProviders.has(y)||(this.logService.warn(`No search provider registered for scheme: ${y}, waiting`),this.loggedSchemesMissingProviders.add(y)),R=await this.waitForProvider(n.type,y);const O={...n,folderQueries:T};m.push(n.type===1?R.fileSearch(O,g):R.textSearch(O,h,g))})),Promise.all(m).then(y=>{const T=d.elapsed();return this.logService.trace(`SearchService#search: ${T}ms`),y.forEach(R=>{this.sendTelemetry(n,T,R)}),y},y=>{const T=d.elapsed();this.logService.trace(`SearchService#search: ${T}ms`);const R=(0,r.deserializeSearchError)(y);throw this.logService.trace(`SearchService#searchError: ${R.message}`),this.sendTelemetry(n,T,void 0,R),R})}groupFolderQueriesByScheme(n){const h=new Map;return n.folderQueries.forEach(g=>{const d=h.get(g.folder.scheme)||[];d.push(g),h.set(g.folder.scheme,d)}),h}sendTelemetry(n,h,g,d){const m=n.folderQueries.every(y=>y.folder.scheme===D.Schemas.file),b=n.folderQueries.every(y=>y.folder.scheme!==D.Schemas.file),E=m?D.Schemas.file:b?"other":"mixed";if(n.type===1&&g&&g.stats){const y=g.stats;if(y.fromCache){const T=y.detailStats;this.telemetryService.publicLog2("cachedSearchComplete",{reason:n._reason,resultCount:y.resultCount,workspaceFolderCount:n.folderQueries.length,type:y.type,endToEndTime:h,sortingTime:y.sortingTime,cacheWasResolved:T.cacheWasResolved,cacheLookupTime:T.cacheLookupTime,cacheFilterTime:T.cacheFilterTime,cacheEntryCount:T.cacheEntryCount,scheme:E})}else{const T=y.detailStats;this.telemetryService.publicLog2("searchComplete",{reason:n._reason,resultCount:y.resultCount,workspaceFolderCount:n.folderQueries.length,type:y.type,endToEndTime:h,sortingTime:y.sortingTime,fileWalkTime:T.fileWalkTime,directoriesWalked:T.directoriesWalked,filesWalked:T.filesWalked,cmdTime:T.cmdTime,cmdResultCount:T.cmdResultCount,scheme:E})}}else if(n.type===2){let y;d&&(y=d.code===r.SearchErrorCode.regexParseError?"regex":d.code===r.SearchErrorCode.unknownEncoding?"encoding":d.code===r.SearchErrorCode.globParseError?"glob":d.code===r.SearchErrorCode.invalidLiteral?"literal":d.code===r.SearchErrorCode.other?"other":d.code===r.SearchErrorCode.canceled?"canceled":"unknown"),this.telemetryService.publicLog2("textSearchComplete",{reason:n._reason,workspaceFolderCount:n.folderQueries.length,endToEndTime:h,scheme:E,error:y,usePCRE2:!!n.usePCRE2})}}getLocalResults(n){const h=new k.ResourceMap(d=>this.uriIdentityService.extUri.getComparisonKey(d));let g=!1;if(n.type===2){const d=new k.ResourceMap;for(let b of this.editorService.editors){const E=S.EditorResourceAccessor.getCanonicalUri(b,{supportSideBySide:S.SideBySideEditor.PRIMARY}),y=S.EditorResourceAccessor.getOriginalUri(b,{supportSideBySide:S.SideBySideEditor.PRIMARY});E&&d.set(E,y??E)}this.modelService.getModels().forEach(b=>{const E=b.uri;if(!E||g)return;const y=d.get(E);if(!y||b.getLanguageId()==="search-result"&&!(n.includePattern&&n.includePattern["**/*.code-search"])||y.scheme!==D.Schemas.untitled&&!this.fileService.hasProvider(y)||y.scheme==="git"||!this.matches(y,n))return;const T=(0,w.isNumber)(n.maxResults)?n.maxResults+1:Number.MAX_SAFE_INTEGER;let R=b.findMatches(n.contentPattern.pattern,!1,!!n.contentPattern.isRegExp,!!n.contentPattern.isCaseSensitive,n.contentPattern.isWordMatch?n.contentPattern.wordSeparators:null,!1,T);if(R.length){T&&R.length>=T&&(g=!0,R=R.slice(0,T-1));const O=new r.FileMatch(y);h.set(y,O);const x=(0,p.editorMatchesToTextSearchResults)(R,b,n.previewOptions);O.results=(0,p.addContextToEditorMatches)(x,b,n)}else h.set(y,null)})}return{results:h,limitHit:g}}matches(n,h){return(0,r.pathIncludedInQuery)(h,n.fsPath)}async clearCache(n){const h=Array.from(this.fileSearchProviders.values()).map(g=>g&&g.clearCache(n));await Promise.all(h)}};u=Ee([W(0,v.IModelService),W(1,s.IEditorService),W(2,c.ITelemetryService),W(3,o.ILogService),W(4,l.IExtensionService),W(5,C.IFileService),W(6,i.IUriIdentityService)],u),e.SearchService=u}),define(ne[2548],re([1,0,35,192,2547]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerSingleton)(f.ISearchService,_.SearchService,!0)}),define(ne[2549],re([1,0,657,171,31,2,235,11,660]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SharedProcessService=void 0;let w=class extends A.Disposable{constructor(C,o){super();this.windowId=C,this.logService=o,this.restoredBarrier=new D.Barrier,this.withSharedProcessConnection=this.connect()}async connect(){this.logService.trace("Renderer->SharedProcess#connect"),await Promise.race([this.restoredBarrier.wait(),(0,D.timeout)(2e3)]),(0,k.mark)("code/willConnectSharedProcess");const C=await(0,I.acquirePort)("vscode:createSharedProcessMessageChannel","vscode:createSharedProcessMessageChannelResult");return(0,k.mark)("code/didConnectSharedProcess"),this.logService.trace("Renderer->SharedProcess#connect: connection established"),this._register(new t.Client(C,`window:${this.windowId}`))}notifyRestored(){this.restoredBarrier.isOpen()||this.restoredBarrier.open()}getChannel(C){return(0,f.getDelayedChannel)(this.withSharedProcessConnection.then(o=>o.getChannel(C)))}registerChannel(C,o){this.withSharedProcessConnection.then(c=>c.registerChannel(C,o))}};w=Ee([W(1,_.ILogService)],w),e.SharedProcessService=w}),define(ne[2550],re([1,0,31,2,103,657,5,1984,171,89,660]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SharedProcessWorkerWorkbenchService=e.ISharedProcessWorkerWorkbenchService=void 0,e.ISharedProcessWorkerWorkbenchService=(0,k.createDecorator)("sharedProcessWorkerWorkbenchService");let C=class extends f.Disposable{constructor(c,i,S){super();this.windowId=c,this.logService=i,this.sharedProcessService=S,this._sharedProcessWorkerService=void 0}get sharedProcessWorkerService(){return this._sharedProcessWorkerService||(this._sharedProcessWorkerService=I.ProxyChannel.toService(this.sharedProcessService.getChannel(D.ipcSharedProcessWorkerChannelName))),this._sharedProcessWorkerService}async createWorker(c){this.logService.trace("Renderer->SharedProcess#createWorker");const i=(0,w.generateUuid)(),S="vscode:createSharedProcessWorkerMessageChannelResult",s=(0,v.acquirePort)(void 0,S,i),l=this.sharedProcessWorkerService.createWorker({process:c,reply:{windowId:this.windowId,channel:S,nonce:i}}),r=new f.DisposableStore;r.add((0,f.toDisposable)(()=>{this.logService.trace("Renderer->SharedProcess#disposeWorker",c),this.sharedProcessWorkerService.disposeWorker({process:c,reply:{windowId:this.windowId}})}));const p=await s,u=r.add(new A.Client(p,`window:${this.windowId},module:${c.moduleId}`));return this.logService.trace("Renderer->SharedProcess#createWorkerChannel: connection established"),{client:u,onDidTerminate:l,dispose:()=>r.dispose()}}};C=Ee([W(1,t.ILogService),W(2,_.ISharedProcessService)],C),e.SharedProcessWorkerWorkbenchService=C}),define(ne[145],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowTooltipCommand=e.isStatusbarEntryLocation=e.StatusbarAlignment=e.IStatusbarService=void 0,e.IStatusbarService=(0,t.createDecorator)("statusbarService");var f;(function(A){A[A.LEFT=0]="LEFT",A[A.RIGHT=1]="RIGHT"})(f=e.StatusbarAlignment||(e.StatusbarAlignment={}));function _(A){const k=A;return typeof k?.id=="string"&&typeof k.alignment=="number"}e.isStatusbarEntryLocation=_,e.ShowTooltipCommand={id:"statusBar.entry.showTooltip",title:""}}),define(ne[2551],re([1,0,145,65,75,2,33]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadStatusBar=void 0;let D=class{constructor(w,v){this.statusbarService=v,this.entries=new Map}dispose(){this.entries.forEach(w=>w.accessor.dispose()),this.entries.clear()}$setEntry(w,v,C,o,c,i,S,s,l,r,p){let u,a;p?(u=p.label,a=p.role):(u=(0,k.getCodiconAriaLabel)(o),c&&(u+=`, ${typeof c=="string"?c:c.value}`));const n={name:C,text:o,tooltip:c,command:i,color:S,backgroundColor:s,ariaLabel:u,role:a};typeof r=="undefined"&&(r=0);const h=l?0:1;let g=this.entries.get(w);g&&(g.alignment!==h||g.priority!==r)&&((0,A.dispose)(g.accessor),this.entries.delete(w),g=void 0),g?g.accessor.update(n):this.entries.set(w,{accessor:this.statusbarService.addEntry(n,v,h,r),alignment:h,priority:r})}$dispose(w){const v=this.entries.get(w);v&&((0,A.dispose)(v.accessor),this.entries.delete(w))}};D=Ee([(0,_.extHostNamedCustomer)(f.MainContext.MainThreadStatusBar),W(1,t.IStatusbarService)],D),e.MainThreadStatusBar=D}),define(ne[2552],re([1,0,145,2,482,1414]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationsStatus=void 0;let k=class extends f.Disposable{constructor(I,w){super();this.model=I,this.statusbarService=w,this.newNotificationsCount=0,this.isNotificationsCenterVisible=!1,this.isNotificationsToastsVisible=!1,this.updateNotificationsCenterStatusItem(),I.statusMessage&&this.doSetStatusMessage(I.statusMessage),this.registerListeners()}registerListeners(){this._register(this.model.onDidChangeNotification(I=>this.onDidChangeNotification(I))),this._register(this.model.onDidChangeStatusMessage(I=>this.onDidChangeStatusMessage(I)))}onDidChangeNotification(I){this.isNotificationsCenterVisible||(I.kind===0?this.newNotificationsCount++:I.kind===3&&this.newNotificationsCount>0&&this.newNotificationsCount--),this.updateNotificationsCenterStatusItem()}updateNotificationsCenterStatusItem(){let I=0;if(!this.isNotificationsCenterVisible&&!this.isNotificationsToastsVisible)for(const v of this.model.notifications)v.hasProgress&&I++;const w={name:(0,A.localize)(0,null),text:`${I>0||this.newNotificationsCount>0?"$(bell-dot)":"$(bell)"}`,ariaLabel:(0,A.localize)(1,null),command:this.isNotificationsCenterVisible?_.HIDE_NOTIFICATIONS_CENTER:_.SHOW_NOTIFICATIONS_CENTER,tooltip:this.getTooltip(I),showBeak:this.isNotificationsCenterVisible};this.notificationsCenterStatusItem?this.notificationsCenterStatusItem.update(w):this.notificationsCenterStatusItem=this.statusbarService.addEntry(w,"status.notifications",1,-Number.MAX_VALUE)}getTooltip(I){return this.isNotificationsCenterVisible?(0,A.localize)(2,null):this.model.notifications.length===0?(0,A.localize)(3,null):I===0?this.newNotificationsCount===0?(0,A.localize)(4,null):this.newNotificationsCount===1?(0,A.localize)(5,null):(0,A.localize)(6,null,this.newNotificationsCount):this.newNotificationsCount===0?(0,A.localize)(7,null,I):this.newNotificationsCount===1?(0,A.localize)(8,null,I):(0,A.localize)(9,null,this.newNotificationsCount,I)}update(I,w){let v=!1;this.isNotificationsCenterVisible!==I&&(this.isNotificationsCenterVisible=I,this.newNotificationsCount=0,v=!0),this.isNotificationsToastsVisible!==w&&(this.isNotificationsToastsVisible=w,v=!0),v&&this.updateNotificationsCenterStatusItem()}onDidChangeStatusMessage(I){const w=I.item;switch(I.kind){case 0:this.doSetStatusMessage(w);break;case 1:this.currentStatusMessage&&this.currentStatusMessage[0]===w&&((0,f.dispose)(this.currentStatusMessage[1]),this.currentStatusMessage=void 0);break}}doSetStatusMessage(I){const w=I.message,v=I.options&&typeof I.options.showAfter=="number"?I.options.showAfter:0,C=I.options&&typeof I.options.hideAfter=="number"?I.options.hideAfter:-1;this.currentStatusMessage&&(0,f.dispose)(this.currentStatusMessage[1]);let o,c=setTimeout(()=>{o=this.statusbarService.addEntry({name:(0,A.localize)(10,null),text:w,ariaLabel:w},"status.message",0,-Number.MAX_VALUE),c=null},v),i;const S={dispose:()=>{c&&clearTimeout(c),i&&clearTimeout(i),o&&o.dispose()}};C>0&&(i=setTimeout(()=>S.dispose(),C)),this.currentStatusMessage=[I,S]}};k=Ee([W(1,t.IStatusbarService)],k),e.NotificationsStatus=k}),define(ne[2553],re([1,0,1420,145,36,80,94,16,70,21,74]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HideStatusbarEntryAction=e.ToggleStatusbarEntryVisibilityAction=void 0;class C extends _.Action{constructor(S,s,l){super(S,s,void 0,!0);this.model=l,this.checked=!l.isHidden(S)}async run(){this.model.isHidden(this.id)?this.model.show(this.id):this.model.hide(this.id)}}e.ToggleStatusbarEntryVisibilityAction=C;class o extends _.Action{constructor(S,s,l){super(S,(0,t.localize)(0,null,s),void 0,!0);this.model=l}async run(){this.model.hide(this.id)}}e.HideStatusbarEntryAction=o,k.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.statusBar.focusPrevious",weight:200,primary:15,secondary:[16],when:v.StatusBarFocused,handler:i=>{i.get(f.IStatusbarService).focusPreviousEntry()}}),k.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.statusBar.focusNext",weight:200,primary:17,secondary:[18],when:v.StatusBarFocused,handler:i=>{i.get(f.IStatusbarService).focusNextEntry()}}),k.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.statusBar.focusFirst",weight:200,primary:14,when:v.StatusBarFocused,handler:i=>{const S=i.get(f.IStatusbarService);S.focus(!1),S.focusNextEntry()}}),k.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.statusBar.focusLast",weight:200,primary:13,when:v.StatusBarFocused,handler:i=>{const S=i.get(f.IStatusbarService);S.focus(!1),S.focusPreviousEntry()}}),k.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.statusBar.clearFocus",weight:200,primary:9,when:v.StatusBarFocused,handler:i=>{const S=i.get(f.IStatusbarService),s=i.get(w.IEditorService);S.isEntryFocused()?S.focus(!1):s.activeEditorPane&&s.activeEditorPane.focus()}});class c extends D.Action2{constructor(){super({id:"workbench.action.focusStatusBar",title:{value:(0,t.localize)(1,null),original:"Focus Status Bar"},category:I.CATEGORIES.View,f1:!0})}async run(S){S.get(A.IWorkbenchLayoutService).focusPart("workbench.parts.statusbar")}}(0,D.registerAction2)(c)}),define(ne[2554],re([1,0,130,2,517,28,27,145,12,306,10,26,13,91,181,63,543,117,129]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StatusbarEntryItem=void 0;let p=class extends f.Disposable{constructor(n,h,g,d,m,b,E){super();this.container=n,this.hoverDelegate=g,this.commandService=d,this.notificationService=m,this.telemetryService=b,this.themeService=E,this.entry=void 0,this.foregroundListener=this._register(new f.MutableDisposable),this.backgroundListener=this._register(new f.MutableDisposable),this.commandMouseListener=this._register(new f.MutableDisposable),this.commandTouchListener=this._register(new f.MutableDisposable),this.commandKeyboardListener=this._register(new f.MutableDisposable),this.hover=void 0,this.labelContainer=document.createElement("a"),this.labelContainer.tabIndex=-1,this.labelContainer.setAttribute("role","button"),this._register(r.Gesture.addTarget(this.labelContainer)),this.label=new u(this.labelContainer),this.container.appendChild(this.labelContainer),this.update(h)}get name(){return(0,o.assertIsDefined)(this.entry).name}get hasCommand(){return typeof this.entry?.command!="undefined"}update(n){if(this.label.showProgress=!!n.showProgress,(!this.entry||n.text!==this.entry.text)&&(this.label.text=n.text,n.text?(0,v.show)(this.labelContainer):(0,v.hide)(this.labelContainer)),(!this.entry||n.ariaLabel!==this.entry.ariaLabel)&&(this.container.setAttribute("aria-label",n.ariaLabel),this.labelContainer.setAttribute("aria-label",n.ariaLabel)),(!this.entry||n.role!==this.entry.role)&&this.labelContainer.setAttribute("role",n.role||"button"),!this.entry||!this.isEqualTooltip(this.entry,n)){const h=(0,l.isMarkdownString)(n.tooltip)?{markdown:n.tooltip,markdownNotSupportedFallback:void 0}:n.tooltip;this.hover?this.hover.update(h):this.hover=this._register((0,s.setupCustomHover)(this.hoverDelegate,this.container,h))}if(!this.entry||n.command!==this.entry.command){this.commandMouseListener.clear(),this.commandTouchListener.clear(),this.commandKeyboardListener.clear();const h=n.command;h&&(h!==D.ShowTooltipCommand||this.hover)?(this.commandMouseListener.value=(0,v.addDisposableListener)(this.labelContainer,v.EventType.CLICK,()=>this.executeCommand(h)),this.commandTouchListener.value=(0,v.addDisposableListener)(this.labelContainer,r.EventType.Tap,()=>this.executeCommand(h)),this.commandKeyboardListener.value=(0,v.addDisposableListener)(this.labelContainer,v.EventType.KEY_DOWN,g=>{const d=new c.StandardKeyboardEvent(g);(d.equals(10)||d.equals(3))&&this.executeCommand(h)}),this.labelContainer.classList.remove("disabled")):this.labelContainer.classList.add("disabled")}(!this.entry||n.showBeak!==this.entry.showBeak)&&(n.showBeak?this.container.classList.add("has-beak"):this.container.classList.remove("has-beak")),(!this.entry||n.color!==this.entry.color)&&this.applyColor(this.labelContainer,n.color),(!this.entry||n.backgroundColor!==this.entry.backgroundColor)&&(this.container.classList.toggle("has-background-color",!!n.backgroundColor),this.applyColor(this.container,n.backgroundColor,!0)),this.entry=n}isEqualTooltip({tooltip:n},{tooltip:h}){return n===void 0?h===void 0:(0,l.isMarkdownString)(n)?(0,l.isMarkdownString)(h)&&(0,l.markdownStringEqual)(n,h):n===h}async executeCommand(n){if(n===D.ShowTooltipCommand)this.hover?.show(!0);else{const h=typeof n=="string"?n:n.id,g=typeof n=="string"?[]:n.arguments??[];this.telemetryService.publicLog2("workbenchActionExecuted",{id:h,from:"status bar"});try{await this.commandService.executeCommand(h,...g)}catch(d){this.notificationService.error((0,t.toErrorMessage)(d))}}}applyColor(n,h,g){let d;if(g?this.backgroundListener.clear():this.foregroundListener.clear(),h)if((0,w.isThemeColor)(h)){d=this.themeService.getColorTheme().getColor(h.id)?.toString();const m=this.themeService.onDidColorThemeChange(b=>{const E=b.getColor(h.id)?.toString();g?n.style.backgroundColor=E??"":n.style.color=E??""});g?this.backgroundListener.value=m:this.foregroundListener.value=m}else d=h;g?n.style.backgroundColor=d??"":n.style.color=d??""}};p=Ee([W(3,A.ICommandService),W(4,C.INotificationService),W(5,k.ITelemetryService),W(6,I.IThemeService)],p),e.StatusbarEntryItem=p;class u extends _.SimpleIconLabel{constructor(n){super(n);this.container=n,this.progressCodicon=(0,i.renderIcon)(S.syncing),this.currentText="",this.currentShowProgress=!1}set showProgress(n){this.currentShowProgress!==n&&(this.currentShowProgress=n,this.text=this.currentText)}set text(n){if(this.currentShowProgress){this.container.firstChild!==this.progressCodicon&&this.container.appendChild(this.progressCodicon);for(const g of Array.from(this.container.childNodes))g!==this.progressCodicon&&g.remove();let h=n??"";h&&(h=` ${h}`),(0,v.append)(this.container,...(0,i.renderLabelWithIcons)(h))}else super.text=n}}}),define(ne[2555],re([1,0,2,145,10,6]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StatusbarViewModel=void 0;class k extends t.Disposable{constructor(I){super();this.storageService=I,this._onDidChangeEntryVisibility=this._register(new A.Emitter),this.onDidChangeEntryVisibility=this._onDidChangeEntryVisibility.event,this._entries=[],this.hidden=new Set,this.restoreState(),this.registerListeners()}get entries(){return this._entries.slice(0)}get lastFocusedEntry(){return this._lastFocusedEntry&&!this.isHidden(this._lastFocusedEntry.id)?this._lastFocusedEntry:void 0}restoreState(){const I=this.storageService.get(k.HIDDEN_ENTRIES_KEY,0);if(I)try{const w=JSON.parse(I);this.hidden=new Set(w)}catch{}}registerListeners(){this._register(this.storageService.onDidChangeValue(I=>this.onDidStorageValueChange(I)))}onDidStorageValueChange(I){if(I.key===k.HIDDEN_ENTRIES_KEY&&I.scope===0){const w=new Set(this.hidden);this.hidden.clear(),this.restoreState();const v=new Set;for(const C of w)this.hidden.has(C)||v.add(C);for(const C of this.hidden)w.has(C)||v.add(C);if(v.size>0)for(const C of this._entries)v.has(C.id)&&(this.updateVisibility(C.id,!0),v.delete(C.id))}}add(I){this._entries.push(I),this.updateVisibility(I,!1),this.sort(),this.markFirstLastVisibleEntry()}remove(I){const w=this._entries.indexOf(I);w>=0&&(this._entries.splice(w,1),this._entries.some(v=>(0,f.isStatusbarEntryLocation)(v.priority.primary)&&v.priority.primary.id===I.id)&&this.sort(),this.markFirstLastVisibleEntry())}isHidden(I){return this.hidden.has(I)}hide(I){this.hidden.has(I)||(this.hidden.add(I),this.updateVisibility(I,!0),this.saveState())}show(I){this.hidden.has(I)&&(this.hidden.delete(I),this.updateVisibility(I,!0),this.saveState())}findEntry(I){return this._entries.find(w=>w.container===I)}getEntries(I){return this._entries.filter(w=>w.alignment===I)}focusNextEntry(){this.focusEntry(1,0)}focusPreviousEntry(){this.focusEntry(-1,this.entries.length-1)}isEntryFocused(){return!!this.getFocusedEntry()}getFocusedEntry(){return this._entries.find(I=>(0,_.isAncestor)(document.activeElement,I.container))}focusEntry(I,w){const v=c=>{let i=c,S=i>=0&&i<this._entries.length?this._entries[i]:void 0;for(;S&&this.isHidden(S.id);)i+=I,S=i>=0&&i<this._entries.length?this._entries[i]:void 0;return S},C=this.getFocusedEntry();if(C){const c=v(this._entries.indexOf(C)+I);if(c){this._lastFocusedEntry=c,c.labelContainer.focus();return}}const o=v(w);o&&(this._lastFocusedEntry=o,o.labelContainer.focus())}updateVisibility(I,w){if(typeof I=="string"){const v=I;for(const C of this._entries)C.id===v&&this.updateVisibility(C,w)}else{const v=I,C=this.isHidden(v.id);C?(0,_.hide)(v.container):(0,_.show)(v.container),w&&this._onDidChangeEntryVisibility.fire({id:v.id,visible:!C}),this.markFirstLastVisibleEntry()}}saveState(){this.hidden.size>0?this.storageService.store(k.HIDDEN_ENTRIES_KEY,JSON.stringify(Array.from(this.hidden.values())),0,0):this.storageService.remove(k.HIDDEN_ENTRIES_KEY,0)}sort(){const I=new Map,w=new Map;for(let o=0;o<this._entries.length;o++){const c=this._entries[o];if(typeof c.priority.primary=="number")I.set(c,o);else{let i=w.get(c.priority.primary.id);i||(i=[],w.set(c.priority.primary.id,i)),i.push(c)}}const v=Array.from(I.keys());v.sort((o,c)=>o.alignment===c.alignment?o.priority.primary!==c.priority.primary?Number(c.priority.primary)-Number(o.priority.primary):o.priority.secondary!==c.priority.secondary?c.priority.secondary-o.priority.secondary:I.get(o)-I.get(c):o.alignment===0?-1:c.alignment===0?1:0);let C;if(w.size>0){C=[];for(const o of v){const c=w.get(o.id);c&&C.push(...c.filter(i=>(0,f.isStatusbarEntryLocation)(i.priority.primary)&&i.priority.primary.alignment===0)),C.push(o),c&&C.push(...c.filter(i=>(0,f.isStatusbarEntryLocation)(i.priority.primary)&&i.priority.primary.alignment===1)),w.delete(o.id)}for(const[,o]of w)C.push(...o)}else C=v;this._entries=C}markFirstLastVisibleEntry(){this.doMarkFirstLastVisibleStatusbarItem(this.getEntries(0)),this.doMarkFirstLastVisibleStatusbarItem(this.getEntries(1))}doMarkFirstLastVisibleStatusbarItem(I){let w,v;for(const C of I)C.container.classList.remove("first-visible-item","last-visible-item"),!this.isHidden(C.id)&&(w||(w=C),v=C);w&&w.container.classList.add("first-visible-item"),v&&v.container.classList.add("last-visible-item")}}e.StatusbarViewModel=k,k.HIDDEN_ENTRIES_KEY="workbench.statusbar.hidden"}),define(ne[2556],re([1,0,1508,2,90,8,145]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugStatusContribution=void 0;let D=class{constructor(w,v,C){this.statusBarService=w,this.debugService=v,this.configurationService=C,this.toDispose=[];const o=()=>{this.entryAccessor=this.statusBarService.addEntry(this.entry,"status.debug",0,30)},c=()=>{this.showInStatusBar=C.getValue("debug").showInStatusBar,this.showInStatusBar==="always"&&!this.entryAccessor&&o()};c(),this.toDispose.push(this.debugService.onDidChangeState(i=>{i!==0&&this.showInStatusBar==="onFirstSessionStart"&&!this.entryAccessor&&o()})),this.toDispose.push(C.onDidChangeConfiguration(i=>{i.affectsConfiguration("debug.showInStatusBar")&&(c(),this.entryAccessor&&this.showInStatusBar==="never"&&(this.entryAccessor.dispose(),this.entryAccessor=void 0))})),this.toDispose.push(this.debugService.getConfigurationManager().onDidSelectConfiguration(i=>{this.entryAccessor&&this.entryAccessor.update(this.entry)}))}get entry(){let w="";const v=this.debugService.getConfigurationManager(),C=v.selectedConfiguration.name||"";return C&&v.selectedConfiguration.launch&&(w=v.getLaunches().length>1?`${C} (${v.selectedConfiguration.launch.name})`:C),{name:t.localize(0,null),text:"$(debug-alt-small) "+w,ariaLabel:t.localize(1,null,w),tooltip:t.localize(2,null),command:"workbench.action.debug.selectandstart"}}dispose(){this.entryAccessor&&this.entryAccessor.dispose(),(0,f.dispose)(this.toDispose)}};D=Ee([W(0,k.IStatusbarService),W(1,_.IDebugService),W(2,A.IConfigurationService)],D),e.DebugStatusContribution=D}),define(ne[2557],re([1,0,1520,32,90,34,82,2,145]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isStatusbarInDebugMode=e.StatusBarColorProvider=e.STATUS_BAR_DEBUGGING_BORDER=e.STATUS_BAR_DEBUGGING_FOREGROUND=e.STATUS_BAR_DEBUGGING_BACKGROUND=void 0,e.STATUS_BAR_DEBUGGING_BACKGROUND=(0,f.registerColor)("statusBar.debuggingBackground",{dark:"#CC6633",light:"#CC6633",hcDark:"#CC6633",hcLight:"#CC6633"},(0,t.localize)(0,null)),e.STATUS_BAR_DEBUGGING_FOREGROUND=(0,f.registerColor)("statusBar.debuggingForeground",{dark:k.STATUS_BAR_FOREGROUND,light:k.STATUS_BAR_FOREGROUND,hcDark:k.STATUS_BAR_FOREGROUND,hcLight:k.STATUS_BAR_FOREGROUND},(0,t.localize)(1,null)),e.STATUS_BAR_DEBUGGING_BORDER=(0,f.registerColor)("statusBar.debuggingBorder",{dark:k.STATUS_BAR_BORDER,light:k.STATUS_BAR_BORDER,hcDark:k.STATUS_BAR_BORDER,hcLight:k.STATUS_BAR_BORDER},(0,t.localize)(2,null));let w=class{constructor(o,c,i){this.debugService=o,this.contextService=c,this.statusbarService=i,this.disposables=new D.DisposableStore,this.debugService.onDidChangeState(this.update,this,this.disposables),this.contextService.onDidChangeWorkbenchState(this.update,this,this.disposables),this.update()}set enabled(o){o!==!!this.disposable&&(o?this.disposable=this.statusbarService.overrideStyle({priority:10,foreground:e.STATUS_BAR_DEBUGGING_FOREGROUND,background:e.STATUS_BAR_DEBUGGING_BACKGROUND,border:e.STATUS_BAR_DEBUGGING_BORDER}):(this.disposable.dispose(),this.disposable=void 0))}update(){this.enabled=v(this.debugService.state,this.debugService.getViewModel().focusedSession)}dispose(){this.disposable?.dispose(),this.disposables.dispose()}};w=Ee([W(0,_.IDebugService),W(1,A.IWorkspaceContextService),W(2,I.IStatusbarService)],w),e.StatusBarColorProvider=w;function v(C,o){return!(C===0||C===1||o?.isSimpleUI||o?.configuration?.noDebug)}e.isStatusbarInDebugMode=v}),define(ne[2558],re([1,0,1562,6,5,40,2,22,145,615,21,87,54,646,46,485,107,870,28]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionHostProfileService=void 0;let p=class extends k.Disposable{constructor(a,n,h,g,d,m,b){super();this._extensionService=a,this._editorService=n,this._instantiationService=h,this._nativeHostService=g,this._dialogService=d,this._statusbarService=m,this._productService=b,this._onDidChangeState=this._register(new f.Emitter),this.onDidChangeState=this._onDidChangeState.event,this._onDidChangeLastProfile=this._register(new f.Emitter),this.onDidChangeLastProfile=this._onDidChangeLastProfile.event,this._unresponsiveProfiles=new Map,this._state=w.ProfileSessionState.None,this.profilingStatusBarIndicatorLabelUpdater=this._register(new k.MutableDisposable),this._profile=null,this._profileSession=null,this._setState(w.ProfileSessionState.None),r.CommandsRegistry.registerCommand("workbench.action.extensionHostProfiler.stop",()=>{this.stopProfiling(),this._editorService.openEditor(S.RuntimeExtensionsInput.instance,{pinned:!0})})}get state(){return this._state}get lastProfile(){return this._profile}_setState(a){this._state!==a&&(this._state=a,this._state===w.ProfileSessionState.Running?this.updateProfilingStatusBarIndicator(!0):this._state===w.ProfileSessionState.Stopping&&this.updateProfilingStatusBarIndicator(!1),this._onDidChangeState.fire(void 0))}updateProfilingStatusBarIndicator(a){if(this.profilingStatusBarIndicatorLabelUpdater.clear(),a){const n={name:t.localize(0,null),text:t.localize(1,null),showProgress:!0,ariaLabel:t.localize(2,null),tooltip:t.localize(3,null),command:"workbench.action.extensionHostProfiler.stop"},h=Date.now(),g=setInterval(()=>{this.profilingStatusBarIndicator&&this.profilingStatusBarIndicator.update({...n,text:t.localize(4,null,Math.round((new Date().getTime()-h)/1e3))})},1e3);this.profilingStatusBarIndicatorLabelUpdater.value=(0,k.toDisposable)(()=>clearInterval(g)),this.profilingStatusBarIndicator?this.profilingStatusBarIndicator.update(n):this.profilingStatusBarIndicator=this._statusbarService.addEntry(n,"status.profiler",1)}else this.profilingStatusBarIndicator&&(this.profilingStatusBarIndicator.dispose(),this.profilingStatusBarIndicator=void 0)}async startProfiling(){if(this._state!==w.ProfileSessionState.None)return null;const a=await this._extensionService.getInspectPorts(1,!0);return a.length===0?this._dialogService.confirm({type:"info",message:t.localize(5,null),detail:t.localize(6,null,this._productService.nameLong),primaryButton:t.localize(7,null),secondaryButton:t.localize(8,null)}).then(n=>{n.confirmed&&this._nativeHostService.relaunch({addArgs:[`--inspect-extensions=${(0,c.randomPort)()}`]})}):(a.length>1&&console.warn("There are multiple extension hosts available for profiling. Picking the first one..."),this._setState(w.ProfileSessionState.Starting),this._instantiationService.createInstance(l.ExtensionHostProfiler,a[0]).start().then(n=>{this._profileSession=n,this._setState(w.ProfileSessionState.Running)},n=>{(0,D.onUnexpectedError)(n),this._setState(w.ProfileSessionState.None)}))}stopProfiling(){this._state!==w.ProfileSessionState.Running||!this._profileSession||(this._setState(w.ProfileSessionState.Stopping),this._profileSession.stop().then(a=>{this._setLastProfile(a),this._setState(w.ProfileSessionState.None)},a=>{(0,D.onUnexpectedError)(a),this._setState(w.ProfileSessionState.None)}),this._profileSession=null)}_setLastProfile(a){this._profile=a,this._onDidChangeLastProfile.fire(void 0)}getUnresponsiveProfile(a){return this._unresponsiveProfiles.get(s.ExtensionIdentifier.toKey(a))}setUnresponsiveProfile(a,n){this._unresponsiveProfiles.set(s.ExtensionIdentifier.toKey(a),n),this._setLastProfile(n)}};p=Ee([W(0,A.IExtensionService),W(1,v.IEditorService),W(2,_.IInstantiationService),W(3,C.INativeHostService),W(4,o.IDialogService),W(5,I.IStatusbarService),W(6,i.IProductService)],p),e.ExtensionHostProfileService=p}),define(ne[2559],re([1,0,1573,2,37,10,28,611,12,68,32,162,27,145,46,41,91,33,6,80,1092]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FeedbackWidget=void 0;let u=class extends f.Disposable{constructor(n,h,g,d,m,b,E,y,T,R){super();this.contextViewService=h,this.layoutService=g,this.commandService=d,this.telemetryService=m,this.integrityService=b,this.themeService=E,this.statusbarService=y,this.openerService=R,this._onDidChangeVisibility=new r.Emitter,this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.feedback="",this.sentiment=1,this.feedbackForm=void 0,this.feedbackDescriptionInput=void 0,this.smileyInput=void 0,this.frownyInput=void 0,this.sendButton=void 0,this.hideButton=void 0,this.remainingCharacterCount=void 0,this.isPure=!0,this.feedbackDelegate=n.feedbackService,this.maxFeedbackCharacters=this.feedbackDelegate.getCharacterLimit(this.sentiment),T.sendASmile&&(this.requestFeatureLink=T.sendASmile.requestFeatureUrl),this.integrityService.isPure().then(O=>{O.isPure||(this.isPure=!1)}),this._register(this.layoutService.onDidChangeNotificationsVisibility(O=>{O&&this.hide()}))}getAnchor(){const n=this.layoutService.dimension;return{x:n.width-8,y:n.height-31}}renderContents(n){const h=new f.DisposableStore;n.classList.add("monaco-menu-container"),this.feedbackForm=A.append(n,A.$("form.feedback-form")),this.feedbackForm.setAttribute("action","javascript:void(0);"),A.append(this.feedbackForm,A.$("h2.title")).textContent=t.localize(0,null);const g=A.append(this.feedbackForm,A.$("div.cancel"+l.Codicon.close.cssSelector));g.tabIndex=0,g.setAttribute("role","button"),g.title=t.localize(1,null),h.add(A.addDisposableListener(n,A.EventType.KEY_DOWN,M=>{new s.StandardKeyboardEvent(M).keyCode===9&&this.hide()})),h.add(A.addDisposableListener(g,A.EventType.MOUSE_OVER,()=>{const M=this.themeService.getColorTheme();let N;switch(M.type){case"light":N=.1;break;case"dark":N=.2;break}if(N){const B=M.getColor(v.editorWidgetBackground);if(B){const P=B.darken(N);P&&(g.style.backgroundColor=P.toString())}}})),h.add(A.addDisposableListener(g,A.EventType.MOUSE_OUT,()=>{g.style.backgroundColor=""})),this.invoke(g,h,()=>this.hide());const d=A.append(this.feedbackForm,A.$("div.content")),m=A.append(d,A.$("div"));this.isPure||(A.append(m,A.$("span")).textContent=t.localize(2,null),m.appendChild(document.createElement("br")),A.append(m,A.$("span")).textContent=t.localize(3,null),m.appendChild(document.createElement("br"))),A.append(m,A.$("span")).textContent=t.localize(4,null);const b=A.append(m,A.$("div.feedback-sentiment"));this.smileyInput=A.append(b,A.$("div.sentiment")),this.smileyInput.classList.add("smile"),this.smileyInput.setAttribute("aria-checked","false"),this.smileyInput.setAttribute("aria-label",t.localize(5,null)),this.smileyInput.setAttribute("role","checkbox"),this.smileyInput.title=t.localize(6,null),this.smileyInput.tabIndex=0,this.invoke(this.smileyInput,h,()=>this.setSentiment(!0)),this.frownyInput=A.append(b,A.$("div.sentiment")),this.frownyInput.classList.add("frown"),this.frownyInput.setAttribute("aria-checked","false"),this.frownyInput.setAttribute("aria-label",t.localize(7,null)),this.frownyInput.setAttribute("role","checkbox"),this.frownyInput.title=t.localize(8,null),this.frownyInput.tabIndex=0,this.invoke(this.frownyInput,h,()=>this.setSentiment(!1)),this.sentiment===1?(this.smileyInput.classList.add("checked"),this.smileyInput.setAttribute("aria-checked","true")):(this.frownyInput.classList.add("checked"),this.frownyInput.setAttribute("aria-checked","true"));const E=A.append(d,A.$("div.contactus"));A.append(E,A.$("span")).textContent=t.localize(9,null);const y=A.append(E,A.$("div.channels")),T=A.append(y,A.$("div")),R=A.append(T,A.$("a"));if(R.setAttribute("target","_blank"),R.setAttribute("href","#"),R.textContent=t.localize(10,null),R.tabIndex=0,h.add(A.addDisposableListener(R,"click",M=>{A.EventHelper.stop(M);const N="workbench.action.openIssueReporter";this.commandService.executeCommand(N),this.hide(),this.telemetryService.publicLog2("workbenchActionExecuted",{id:N,from:"feedback"})})),this.requestFeatureLink){const M=A.append(y,A.$("div")),N=A.append(M,A.$("a"));N.setAttribute("target","_blank"),N.setAttribute("href",this.requestFeatureLink),N.textContent=t.localize(11,null),N.tabIndex=0,h.add(A.addDisposableListener(N,"click",B=>this.hide()))}const O=A.append(this.feedbackForm,A.$("h3"));O.textContent=t.localize(12,null),this.remainingCharacterCount=A.append(O,A.$("span.char-counter")),this.remainingCharacterCount.textContent=this.getCharCountText(0),this.feedbackDescriptionInput=A.append(this.feedbackForm,A.$("textarea.feedback-description")),this.feedbackDescriptionInput.rows=3,this.feedbackDescriptionInput.maxLength=this.maxFeedbackCharacters,this.feedbackDescriptionInput.textContent=this.feedback,this.feedbackDescriptionInput.required=!0,this.feedbackDescriptionInput.setAttribute("aria-label",t.localize(13,null)),this.feedbackDescriptionInput.focus(),h.add(A.addDisposableListener(this.feedbackDescriptionInput,"keyup",()=>this.updateCharCountText()));const x=A.append(this.feedbackForm,A.$("div.form-buttons")),F=A.append(x,A.$("div.hide-button-container"));this.hideButton=A.append(F,A.$("input.hide-button")),this.hideButton.type="checkbox",this.hideButton.checked=!0,this.hideButton.id="hide-button";const L=A.append(F,A.$("label"));return L.setAttribute("for","hide-button"),L.textContent=t.localize(14,null),this.sendButton=new C.Button(x),this.sendButton.enabled=!1,this.sendButton.label=t.localize(15,null),A.prepend(this.sendButton.element,A.$("span"+l.Codicon.twitter.cssSelector)),this.sendButton.element.classList.add("send"),this.sendButton.element.title=t.localize(16,null),h.add((0,w.attachButtonStyler)(this.sendButton,this.themeService)),this.sendButton.onDidClick(()=>this.onSubmit()),h.add((0,w.attachStylerCallback)(this.themeService,{widgetShadow:v.widgetShadow,editorWidgetBackground:v.editorWidgetBackground,editorWidgetForeground:v.editorWidgetForeground,inputBackground:v.inputBackground,inputForeground:v.inputForeground,inputBorder:v.inputBorder,editorBackground:v.editorBackground,contrastBorder:v.contrastBorder},M=>{this.feedbackForm&&(this.feedbackForm.style.backgroundColor=M.editorWidgetBackground?M.editorWidgetBackground.toString():"",this.feedbackForm.style.color=M.editorWidgetForeground?M.editorWidgetForeground.toString():"",this.feedbackForm.style.boxShadow=M.widgetShadow?`0 0 8px 2px ${M.widgetShadow}`:""),this.feedbackDescriptionInput&&(this.feedbackDescriptionInput.style.backgroundColor=M.inputBackground?M.inputBackground.toString():"",this.feedbackDescriptionInput.style.color=M.inputForeground?M.inputForeground.toString():"",this.feedbackDescriptionInput.style.border=`1px solid ${M.inputBorder||"transparent"}`),E.style.backgroundColor=M.editorBackground?M.editorBackground.toString():"",E.style.border=`1px solid ${M.contrastBorder||"transparent"}`})),{dispose:()=>{this.feedbackForm=void 0,this.feedbackDescriptionInput=void 0,this.smileyInput=void 0,this.frownyInput=void 0,h.dispose()}}}updateFeedbackDescription(){this.feedbackDescriptionInput&&this.feedbackDescriptionInput.textLength>this.maxFeedbackCharacters&&(this.feedbackDescriptionInput.value=this.feedbackDescriptionInput.value.substring(0,this.maxFeedbackCharacters))}getCharCountText(n){const h=this.maxFeedbackCharacters-n,g=h===1?t.localize(17,null):t.localize(18,null);return`(${h} ${g})`}updateCharCountText(){this.feedbackDescriptionInput&&this.remainingCharacterCount&&this.sendButton&&(this.remainingCharacterCount.innerText=this.getCharCountText(this.feedbackDescriptionInput.value.length),this.sendButton.enabled=this.feedbackDescriptionInput.value.length>0)}setSentiment(n){n?(this.smileyInput&&(this.smileyInput.classList.add("checked"),this.smileyInput.setAttribute("aria-checked","true")),this.frownyInput&&(this.frownyInput.classList.remove("checked"),this.frownyInput.setAttribute("aria-checked","false"))):(this.frownyInput&&(this.frownyInput.classList.add("checked"),this.frownyInput.setAttribute("aria-checked","true")),this.smileyInput&&(this.smileyInput.classList.remove("checked"),this.smileyInput.setAttribute("aria-checked","false"))),this.sentiment=n?1:0,this.maxFeedbackCharacters=this.feedbackDelegate.getCharacterLimit(this.sentiment),this.updateFeedbackDescription(),this.updateCharCountText(),this.feedbackDescriptionInput&&(this.feedbackDescriptionInput.maxLength=this.maxFeedbackCharacters)}invoke(n,h,g){return h.add(A.addDisposableListener(n,"click",g)),h.add(A.addDisposableListener(n,"keypress",d=>{if(d instanceof KeyboardEvent){const m=d;(m.keyCode===13||m.keyCode===32)&&g()}})),n}show(){this.visible||(this.visible=!0,this.contextViewService.showContextView({getAnchor:()=>this.getAnchor(),render:n=>this.renderContents(n),onDOMEvent:(n,h)=>{this.onEvent(n,h)},onHide:()=>this._onDidChangeVisibility.fire(!1)}),this._onDidChangeVisibility.fire(!0),this.updateCharCountText())}hide(){!this.visible||(this.feedbackDescriptionInput&&(this.feedback=this.feedbackDescriptionInput.value),this.hideButton&&!this.hideButton.checked&&this.statusbarService.updateEntryVisibility("status.feedback",!1),this.visible=!1,this.contextViewService.hideContextView())}isVisible(){return!!this.visible}onEvent(n,h){n instanceof KeyboardEvent&&n.keyCode===27&&this.hide()}onSubmit(){!this.feedbackForm||!this.feedbackDescriptionInput||this.feedbackForm.checkValidity&&!this.feedbackForm.checkValidity()||(this.feedbackDelegate.submitFeedback({feedback:this.feedbackDescriptionInput.value,sentiment:this.sentiment},this.openerService),this.hide())}};u=Ee([W(1,_.IContextViewService),W(2,p.IWorkbenchLayoutService),W(3,k.ICommandService),W(4,o.ITelemetryService),W(5,D.IIntegrityService),W(6,I.IThemeService),W(7,c.IStatusbarService),W(8,i.IProductService),W(9,S.IOpenerService)],u),e.FeedbackWidget=u,(0,I.registerThemingParticipant)((a,n)=>{const h=a.getColor(v.inputActiveOptionBorder);h&&n.addRule(`.monaco-workbench .feedback-form .sentiment.checked { border: 1px solid ${h}; }`);const g=a.getColor(v.textLinkForeground)||a.getColor(v.contrastBorder);g&&n.addRule(`.monaco-workbench .feedback-form .content .channels a { color: ${g}; }`)})}),define(ne[2560],re([1,0,2,2559,5,46,145,1574,28,9,16,70,482,14]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FeedbackStatusbarConribution=void 0;class i{combineHashTagsAsString(){return i.HASHTAGS.join(",")}submitFeedback(l,r){const p=`?${l.sentiment===1?`hashtags=${this.combineHashTagsAsString()}&`:""}ref_src=twsrc%5Etfw&related=twitterapi%2Ctwitter&text=${encodeURIComponent(l.feedback)}&tw_p=tweetbutton&via=${i.VIA_NAME}`,u=i.TWITTER_URL+p;r.open(w.URI.parse(u))}getCharacterLimit(l){let r=0;return l===1&&i.HASHTAGS.forEach(p=>{r+=p.length+2}),i.VIA_NAME&&(r+=` via @${i.VIA_NAME}`.length),280-r}}i.TWITTER_URL="https://twitter.com/intent/tweet",i.VIA_NAME="code",i.HASHTAGS=["HappyCoding"];let S=class Qn extends t.Disposable{constructor(l,r,p,u){super();this.statusbarService=l,this.instantiationService=p,this.commandService=u,r.sendASmile&&!c.isIOS&&this.createFeedbackStatusEntry()}createFeedbackStatusEntry(){this.entry=this._register(this.statusbarService.addEntry(this.getStatusEntry(),"status.feedback",1,-100)),I.CommandsRegistry.registerCommand(Qn.TOGGLE_FEEDBACK_COMMAND,()=>this.toggleFeedback()),v.MenuRegistry.appendMenuItem(v.MenuId.CommandPalette,{command:{id:Qn.TOGGLE_FEEDBACK_COMMAND,category:C.CATEGORIES.Help,title:(0,D.localize)(0,null)}})}toggleFeedback(){this.widget||(this.widget=this._register(this.instantiationService.createInstance(f.FeedbackWidget,{feedbackService:this.instantiationService.createInstance(i)})),this._register(this.widget.onDidChangeVisibility(l=>this.entry.update(this.getStatusEntry(l))))),this.widget&&(this.widget.isVisible()?this.widget.hide():(this.commandService.executeCommand(o.HIDE_NOTIFICATION_TOAST),this.commandService.executeCommand(o.HIDE_NOTIFICATIONS_CENTER),this.widget.show()))}getStatusEntry(l){return{name:(0,D.localize)(1,null),text:"$(feedback)",ariaLabel:(0,D.localize)(2,null),tooltip:(0,D.localize)(3,null),command:Qn.TOGGLE_FEEDBACK_COMMAND,showBeak:l}}};S.TOGGLE_FEEDBACK_COMMAND="help.tweetFeedback",S=Ee([W(0,k.IStatusbarService),W(1,A.IProductService),W(2,_.IInstantiationService),W(3,I.ICommandService)],S),e.FeedbackStatusbarConribution=S}),define(ne[2561],re([1,0,17,2560,47]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t.Registry.as(_.Extensions.Workbench).registerWorkbenchContribution(f.FeedbackStatusbarConribution,1)}),define(ne[2562],re([1,0,10,181,2,81,106,1605,17,12,47,82,21,878,145,303,237,41,117,78,36,33,24,15,9,1096]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class d{constructor(E,y){this.combined=E,this.dedicated=y}isEqual(E){return(0,h.equals)(this.combined,E.combined)&&(0,h.equals)(this.dedicated,E.dedicated)}}let m=class di{constructor(E,y,T,R,O){this._languageStatusService=E,this._statusBarService=y,this._editorService=T,this._openerService=R,this._storageService=O,this._disposables=new _.DisposableStore,this._dedicated=new Set,this._dedicatedEntries=new Map,this._renderDisposables=new _.DisposableStore,O.onDidChangeValue(this._handleStorageChange,this,this._disposables),this._restoreState(),E.onDidChange(this._update,this,this._disposables),T.onDidActiveEditorChange(this._update,this,this._disposables),this._update(),y.onDidChangeEntryVisibility(x=>{!x.visible&&this._dedicated.has(x.id)&&(this._dedicated.delete(x.id),this._update(),this._storeState())},this._disposables)}dispose(){this._disposables.dispose(),this._combinedEntry?.dispose(),(0,_.dispose)(this._dedicatedEntries.values()),this._renderDisposables.dispose()}_handleStorageChange(E){E.key===di._keyDedicatedItems&&(this._restoreState(),this._update())}_restoreState(){const E=this._storageService.get(di._keyDedicatedItems,0,"[]");try{const y=JSON.parse(E);this._dedicated=new Set(y)}catch{this._dedicated.clear()}}_storeState(){if(this._dedicated.size===0)this._storageService.remove(di._keyDedicatedItems,0);else{const E=JSON.stringify(Array.from(this._dedicated.keys()));this._storageService.store(di._keyDedicatedItems,E,0,0)}}_createViewModel(E){if(!E?.hasModel())return new d([],[]);const y=this._languageStatusService.getLanguageStatus(E.getModel()),T=[],R=[];for(let O of y)this._dedicated.has(O.id)&&R.push(O),T.push(O);return new d(T,R)}_update(){const E=(0,k.getCodeEditor)(this._editorService.activeTextEditorControl),y=this._createViewModel(E);if(this._model?.isEqual(y))return;if(this._renderDisposables.clear(),this._model=y,E?.onDidChangeModelLanguage(this._update,this,this._renderDisposables),y.combined.length===0)this._combinedEntry?.dispose(),this._combinedEntry=void 0;else{const[R]=y.combined,O=R.severity>=A.default.Warning,x=di._severityToComboCodicon(R.severity);let F=!1;const L=[],M=document.createElement("div");for(const B of y.combined){const P=y.dedicated.includes(B);M.appendChild(this._renderStatus(B,O,P,this._renderDisposables)),L.push(this._asAriaLabel(B)),F=F||!P&&B.busy}const N={name:(0,D.localize)(0,null),ariaLabel:(0,D.localize)(1,null,L.join(", next: ")),tooltip:M,command:i.ShowTooltipCommand,text:F?`${x}\xA0\xA0$(sync~spin)`:x};this._combinedEntry?this._combinedEntry.update(N):this._combinedEntry=this._statusBarService.addEntry(N,di._id,1,{id:"status.editor.mode",alignment:0,compact:!0})}const T=new Map;for(const R of y.dedicated){const O=di._asStatusbarEntry(R);let x=this._dedicatedEntries.get(R.id);x?(x.update(O),this._dedicatedEntries.delete(R.id)):x=this._statusBarService.addEntry(O,R.id,1,{id:"status.editor.mode",alignment:1}),T.set(R.id,x)}(0,_.dispose)(this._dedicatedEntries.values()),this._dedicatedEntries=T}_renderStatus(E,y,T,R){const O=document.createElement("div");O.classList.add("hover-language-status");const x=document.createElement("div");x.classList.add("severity",`sev${E.severity}`),x.classList.toggle("show",y);const F=di._severityToSingleCodicon(E.severity);t.append(x,...(0,f.renderLabelWithIcons)(F)),O.appendChild(x);const L=document.createElement("div");L.classList.add("element"),O.appendChild(L);const M=document.createElement("div");M.classList.add("left"),L.appendChild(M);const N=document.createElement("span");N.classList.add("label"),t.append(N,...(0,f.renderLabelWithIcons)(E.busy?`$(sync~spin)\xA0\xA0${E.label}`:E.label)),M.appendChild(N);const B=document.createElement("span");B.classList.add("detail"),this._renderTextPlus(B,E.detail,R),M.appendChild(B);const P=document.createElement("div");P.classList.add("right"),L.appendChild(P);const{command:V}=E;V&&R.add(new s.Link(P,{label:V.title,title:V.tooltip,href:g.URI.from({scheme:"command",path:V.id,query:V.arguments&&JSON.stringify(V.arguments)}).toString()},void 0,this._openerService));const z=new p.ActionBar(P,{});R.add(z);let U;return T?U=new u.Action("unpin",(0,D.localize)(3,null),a.Codicon.pinned.classNames,!0,()=>{this._dedicated.delete(E.id),this._statusBarService.updateEntryVisibility(E.id,!1),this._update(),this._storeState()}):U=new u.Action("pin",(0,D.localize)(2,null),a.Codicon.pin.classNames,!0,()=>{this._dedicated.add(E.id),this._statusBarService.updateEntryVisibility(E.id,!0),this._update(),this._storeState()}),z.push(U,{icon:!0,label:!1}),R.add(U),O}static _severityToComboCodicon(E){switch(E){case A.default.Error:return"$(bracket-error)";case A.default.Warning:return"$(bracket-dot)";default:return"$(bracket)"}}static _severityToSingleCodicon(E){switch(E){case A.default.Error:return"$(error)";case A.default.Warning:return"$(info)";default:return"$(check)"}}_renderTextPlus(E,y,T){for(let R of(0,S.parseLinkedText)(y).nodes)if(typeof R=="string"){const O=(0,f.renderLabelWithIcons)(R);t.append(E,...O)}else T.add(new s.Link(E,R,void 0,this._openerService))}_asAriaLabel(E){return E.accessibilityInfo?E.accessibilityInfo.label:E.detail?(0,D.localize)(4,null,E.label,E.detail):(0,D.localize)(5,null,E.label)}static _asStatusbarEntry(E){let y,T;return E.severity===A.default.Warning?(y=(0,w.themeColorFromId)(C.STATUS_BAR_WARNING_ITEM_FOREGROUND),T=(0,w.themeColorFromId)(C.STATUS_BAR_WARNING_ITEM_BACKGROUND)):E.severity===A.default.Error&&(y=(0,w.themeColorFromId)(C.STATUS_BAR_ERROR_ITEM_FOREGROUND),T=(0,w.themeColorFromId)(C.STATUS_BAR_ERROR_ITEM_BACKGROUND)),{name:(0,D.localize)(6,null,E.name),text:E.busy?`${E.label}\xA0\xA0$(sync~spin)`:E.label,ariaLabel:E.accessibilityInfo?.label??E.label,role:E.accessibilityInfo?.role,tooltip:E.command?.tooltip||new r.MarkdownString(E.detail,{isTrusted:!0,supportThemeIcons:!0}),color:y,backgroundColor:T,command:E.command}}};m._id="status.languageStatus",m._keyDedicatedItems="languageStatus.dedicated",m=Ee([W(0,c.ILanguageStatusService),W(1,i.IStatusbarService),W(2,o.IEditorService),W(3,l.IOpenerService),W(4,n.IStorageService)],m),I.Registry.as(v.Extensions.Workbench).registerWorkbenchContribution(m,3)}),define(ne[2563],re([1,0,15,2,18,29,1627,16,7,107,5,45,31,53,17,12,47,119,846,168,153,104,200,64,238,21,88,145,62]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActiveCellStatus=e.KernelStatus=void 0,(0,D.registerAction2)(class extends D.Action2{constructor(){super({id:"_notebook.selectKernel",category:p.NOTEBOOK_ACTIONS_CATEGORY,title:{value:k.localize(0,null),original:"Select Notebook Kernel"},icon:n.selectKernelIcon,f1:!0,menu:[{id:D.MenuId.EditorTitle,when:I.ContextKeyExpr.and(u.NOTEBOOK_IS_ACTIVE_EDITOR,I.ContextKeyExpr.or(u.NOTEBOOK_KERNEL_COUNT.notEqualsTo(0),u.NOTEBOOK_MISSING_KERNEL_EXTENSION),I.ContextKeyExpr.notEquals("config.notebook.globalToolbar",!0)),group:"navigation",order:-10},{id:D.MenuId.NotebookToolbar,when:I.ContextKeyExpr.and(I.ContextKeyExpr.or(u.NOTEBOOK_KERNEL_COUNT.notEqualsTo(0),u.NOTEBOOK_MISSING_KERNEL_EXTENSION),I.ContextKeyExpr.equals("config.notebook.globalToolbar",!0)),group:"status",order:-10},{id:D.MenuId.InteractiveToolbar,when:u.NOTEBOOK_KERNEL_COUNT.notEqualsTo(0),group:"status",order:-10}],description:{description:k.localize(1,null),args:[{name:"kernelInfo",description:"The kernel info",schema:{type:"object",required:["id","extension"],properties:{id:{type:"string"},extension:{type:"string"},notebookEditorId:{type:"string"}}}}]}})}async run(O,x){const F=O.get(g.INotebookKernelService),L=O.get(d.IEditorService),M=O.get(c.IQuickInputService),N=O.get(C.ILabelService),B=O.get(o.ILogService),P=O.get(m.IPaneCompositePartService);let V;if(x!==void 0&&"notebookEditorId"in x){const j=x.notebookEditorId,X=L.visibleEditorPanes.find(Y=>(0,a.getNotebookEditorFromEditorPane)(Y)?.getId()===j);V=(0,a.getNotebookEditorFromEditorPane)(X)}else x!==void 0&&"notebookEditor"in x?V=x?.notebookEditor:V=(0,a.getNotebookEditorFromEditorPane)(L.activeEditorPane);if(!V||!V.hasModel())return!1;let z=x&&"id"in x?x.id:void 0,U=x&&"extension"in x?x.extension:void 0;z&&(typeof z!="string"||typeof U!="string")&&(z=void 0,U=void 0);const H=V.textModel,{selected:K,all:G,suggestions:q}=F.getMatchingKernel(H);if(K&&z&&K.id===z&&w.ExtensionIdentifier.equals(K.extension,U))return!0;let Z;if(z){const j=`${U}/${z}`;for(const X of G)if(X.id===j){Z=X;break}if(!Z)return B.warn(`wanted kernel DOES NOT EXIST, wanted: ${j}, all: ${G.map(X=>X.id)}`),!1}if(!Z){let X=function(J){const ee={kernel:J,picked:J.id===K?.id,label:J.label,description:J.description,detail:J.detail,buttons:[j]};return J.id===K?.id&&(ee.description?ee.description=k.localize(4,null,ee.description):ee.description=k.localize(3,null)),ee};const j={iconClass:S.ThemeIcon.asClassName(n.configureKernelIcon),tooltip:k.localize(2,null,V.textModel.viewType)},Y=[];if(!G.length)Y.push({id:"install",label:k.localize(5,null)});else{q.length&&(Y.push({type:"separator",label:k.localize(6,null)}),Y.push(...q.map(X)));const J=G.filter(te=>!q.includes(te)).map(X);(0,t.groupBy)(J,(te,se)=>(0,A.compareIgnoreCase)(te.kernel.kind||"z",se.kernel.kind||"z")).forEach(te=>{Y.push({type:"separator",label:te[0].kernel.kind||k.localize(7,null)}),Y.push(...te)})}const $=await M.pick(Y,{placeHolder:K?k.localize(8,null,N.getUriLabel(H.uri,{relative:!0})):k.localize(9,null,N.getUriLabel(H.uri,{relative:!0})),onDidTriggerItemButton:J=>{"kernel"in J.item&&F.selectKernelForNotebookType(J.item.kernel,H.viewType)}});$&&($.id==="install"?await this._showKernelExtension(P,H.viewType):"kernel"in $&&(Z=$.kernel))}return Z?(F.selectKernelForNotebook(Z,H),!0):!1}async _showKernelExtension(O,x){const L=(await O.openPaneComposite(l.VIEWLET_ID,0,!0))?.getViewPaneContainer(),M=a.KERNEL_EXTENSIONS.get(x);if(M)L?.search(`@id:${M}`);else{const N=x.split(/[^a-z0-9]/ig).map(A.uppercaseFirstLetter).join("");L?.search(`@tag:notebookKernel${N}`)}}});let y=class{constructor(x,F,L,M,N){const B=new f.DisposableStore;this.dispose=B.dispose.bind(B);const P=()=>{B.clear(),L.selectKernelForNotebook(F,x)};B.add(x.onDidChangeContent(V=>{for(const z of V.rawEvents)switch(z.kind){case h.NotebookCellsChangeType.ChangeCellContent:case h.NotebookCellsChangeType.ModelChange:case h.NotebookCellsChangeType.Move:case h.NotebookCellsChangeType.ChangeLanguage:N.trace("IMPLICIT kernel selection because of change event",z.kind),P();break}})),B.add(M.hoverProvider.register({scheme:_.Schemas.vscodeNotebookCell,pattern:x.uri.path},{provideHover(){N.trace("IMPLICIT kernel selection because of hover"),P()}}))}};y=Ee([W(2,g.INotebookKernelService),W(3,E.ILanguageFeaturesService),W(4,o.ILogService)],y);let T=class extends f.Disposable{constructor(x,F,L,M){super();this._editorService=x,this._statusbarService=F,this._notebookKernelService=L,this._instantiationService=M,this._editorDisposables=this._register(new f.DisposableStore),this._kernelInfoElement=this._register(new f.DisposableStore),this._register(this._editorService.onDidActiveEditorChange(()=>this._updateStatusbar()))}_updateStatusbar(){this._editorDisposables.clear();const x=(0,a.getNotebookEditorFromEditorPane)(this._editorService.activeEditorPane);if(!x){this._kernelInfoElement.clear();return}const F=()=>{if(x.notebookOptions.getLayoutConfiguration().globalToolbar){this._kernelInfoElement.clear();return}const L=x.textModel;L?this._showKernelStatus(L):this._kernelInfoElement.clear()};this._editorDisposables.add(this._notebookKernelService.onDidAddKernel(F)),this._editorDisposables.add(this._notebookKernelService.onDidChangeSelectedNotebooks(F)),this._editorDisposables.add(this._notebookKernelService.onDidChangeNotebookAffinity(F)),this._editorDisposables.add(x.onDidChangeModel(F)),this._editorDisposables.add(x.notebookOptions.onDidChangeOptions(F)),F()}_showKernelStatus(x){this._kernelInfoElement.clear();const{selected:F,suggestions:L,all:M}=this._notebookKernelService.getMatchingKernel(x),N=L.length===1&&M.length===1?L[0]:void 0;let B=!1;if(M.length!==0)if(F||N){let P=F;P||(P=N,B=!0,this._kernelInfoElement.add(this._instantiationService.createInstance(y,x,P)));const V=P.description??P.detail??P.label;this._kernelInfoElement.add(this._statusbarService.addEntry({name:k.localize(10,null),text:`$(notebook-kernel-select) ${P.label}`,ariaLabel:P.label,tooltip:B?k.localize(11,null,V):V,command:p.SELECT_KERNEL_ID},"_notebook.selectKernel",1,10)),this._kernelInfoElement.add(P.onDidChange(()=>this._showKernelStatus(x)))}else this._kernelInfoElement.add(this._statusbarService.addEntry({name:k.localize(12,null),text:k.localize(13,null),ariaLabel:k.localize(14,null),command:p.SELECT_KERNEL_ID,backgroundColor:{id:"statusBarItem.prominentBackground"}},"_notebook.selectKernel",1,10))}};T=Ee([W(0,d.IEditorService),W(1,b.IStatusbarService),W(2,g.INotebookKernelService),W(3,v.IInstantiationService)],T),e.KernelStatus=T,i.Registry.as(s.Extensions.Workbench).registerWorkbenchContribution(T,3);let R=class extends f.Disposable{constructor(x,F){super();this._editorService=x,this._statusbarService=F,this._itemDisposables=this._register(new f.DisposableStore),this._accessor=this._register(new f.MutableDisposable),this._register(this._editorService.onDidActiveEditorChange(()=>this._update()))}_update(){this._itemDisposables.clear();const x=(0,a.getNotebookEditorFromEditorPane)(this._editorService.activeEditorPane);x?(this._itemDisposables.add(x.onDidChangeSelection(()=>this._show(x))),this._itemDisposables.add(x.onDidChangeActiveCell(()=>this._show(x))),this._show(x)):this._accessor.clear()}_show(x){if(!x.hasModel()){this._accessor.clear();return}const F=this._getSelectionsText(x);if(!F){this._accessor.clear();return}const L={name:k.localize(15,null),text:F,ariaLabel:F,command:r.CENTER_ACTIVE_CELL};this._accessor.value?this._accessor.value.update(L):this._accessor.value=this._statusbarService.addEntry(L,"notebook.activeCellStatus",1,100)}_getSelectionsText(x){if(!x.hasModel())return;const F=x.getActiveCell();if(!F)return;const L=x.getCellIndex(F)+1,M=x.getSelections().reduce((B,P)=>B+(P.end-P.start),0),N=x.getLength();return M>1?k.localize(16,null,L,M):k.localize(17,null,L,N)}};R=Ee([W(0,d.IEditorService),W(1,b.IStatusbarService)],R),e.ActiveCellStatus=R,i.Registry.as(s.Extensions.Workbench).registerWorkbenchContribution(R,3)}),define(ne[2564],re([1,0,1696,82,12,109,2,16,145,45,7,28,18,40,53,233,144,69,14,150,29,34,246,230,33,31,299,79,119,117,74,88]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteStatusIndicator=void 0;let O=class $t extends k.Disposable{constructor(F,L,M,N,B,P,V,z,U,H,K,G,q,Z){super();this.statusbarService=F,this.environmentService=L,this.labelService=M,this.contextKeyService=N,this.menuService=B,this.quickInputService=P,this.commandService=V,this.extensionService=z,this.remoteAgentService=U,this.remoteAuthorityResolverService=H,this.hostService=K,this.workspaceContextService=G,this.logService=q,this.extensionGalleryService=Z,this.legacyIndicatorMenu=this._register(this.menuService.createMenu(D.MenuId.StatusBarWindowIndicatorMenu,this.contextKeyService)),this.remoteIndicatorMenu=this._register(this.menuService.createMenu(D.MenuId.StatusBarRemoteIndicatorMenu,this.contextKeyService)),this.remoteAuthority=this.environmentService.remoteAuthority,this.virtualWorkspaceLocation=void 0,this.connectionState=void 0,this.connectionStateContextKey=new v.RawContextKey("remoteConnectionState","").bindTo(this.contextKeyService),this.loggedInvalidGroupNames=Object.create(null),this.remoteAuthority?(this.connectionState="initializing",this.connectionStateContextKey.set(this.connectionState)):this.updateVirtualWorkspaceLocation(),this.registerActions(),this.registerListeners(),this.updateWhenInstalledExtensionsRegistered(),this.updateRemoteStatusIndicator()}registerActions(){const F={value:t.localize(0,null),original:"Remote"},L=this;(0,D.registerAction2)(class extends D.Action2{constructor(){super({id:$t.REMOTE_ACTIONS_COMMAND_ID,category:F,title:{value:t.localize(1,null),original:"Show Remote Menu"},f1:!0});this.run=()=>L.showRemoteMenu()}}),$t.SHOW_CLOSE_REMOTE_COMMAND_ID&&((0,D.registerAction2)(class extends D.Action2{constructor(){super({id:$t.CLOSE_REMOTE_COMMAND_ID,category:F,title:{value:t.localize(2,null),original:"Close Remote Connection"},f1:!0,precondition:v.ContextKeyExpr.or(T.RemoteNameContext,T.VirtualWorkspaceContext)});this.run=()=>L.hostService.openWindow({forceReuseWindow:!0,remoteAuthority:null})}}),this.remoteAuthority&&D.MenuRegistry.appendMenuItem(D.MenuId.MenubarFileMenu,{group:"6_close",command:{id:$t.CLOSE_REMOTE_COMMAND_ID,title:t.localize(3,null)},order:3.5})),this.extensionGalleryService.isEnabled()&&(0,D.registerAction2)(class extends D.Action2{constructor(){super({id:$t.INSTALL_REMOTE_EXTENSIONS_ID,category:F,title:{value:t.localize(4,null),original:"Install Remote Development Extensions"},f1:!0});this.run=(M,N)=>M.get(R.IPaneCompositePartService).openPaneComposite(E.VIEWLET_ID,0,!0).then(P=>{P&&(P?.getViewPaneContainer().search('tag:"remote-menu"'),P.focus())})}})}registerListeners(){const F=()=>{this.remoteMenuActionsGroups=void 0,this.updateRemoteStatusIndicator()};this._register(this.legacyIndicatorMenu.onDidChange(F)),this._register(this.remoteIndicatorMenu.onDidChange(F)),this._register(this.labelService.onDidChangeFormatters(()=>this.updateRemoteStatusIndicator()));const L=this.environmentService.options?.windowIndicator;if(L&&L.onDidChange&&this._register(L.onDidChange(()=>this.updateRemoteStatusIndicator())),this.remoteAuthority){const M=this.remoteAgentService.getConnection();M&&this._register(M.onDidStateChange(N=>{switch(N.type){case 0:case 2:case 1:this.setState("reconnecting");break;case 3:this.setState("disconnected");break;case 4:this.setState("connected");break}}))}else this._register(this.workspaceContextService.onDidChangeWorkbenchState(()=>{this.updateVirtualWorkspaceLocation(),this.updateRemoteStatusIndicator()}))}updateVirtualWorkspaceLocation(){this.virtualWorkspaceLocation=(0,h.getVirtualWorkspaceLocation)(this.workspaceContextService.getWorkspace())}async updateWhenInstalledExtensionsRegistered(){await this.extensionService.whenInstalledExtensionsRegistered();const F=this.remoteAuthority;F&&(async()=>{try{await this.remoteAuthorityResolverService.resolveAuthority(F),this.setState("connected")}catch{this.setState("disconnected")}})(),this.updateRemoteStatusIndicator()}setState(F){this.connectionState!==F&&(this.connectionState=F,this.connectionState==="reconnecting"?this.connectionStateContextKey.set("disconnected"):this.connectionStateContextKey.set(this.connectionState),this.updateRemoteStatusIndicator())}validatedGroup(F){return F.match(/^(remote|virtualfs)_(\d\d)_(([a-z][a-z0-9+.-]*)_(.*))$/)?!0:(this.loggedInvalidGroupNames[F]||(this.loggedInvalidGroupNames[F]=!0,this.logService.warn(`Invalid group name used in "statusBar/remoteIndicator" menu contribution: ${F}. Entries ignored. Expected format: 'remote_$ORDER_$REMOTENAME_$GROUPING or 'virtualfs_$ORDER_$FILESCHEME_$GROUPING.`)),!1)}getRemoteMenuActions(F){return(!this.remoteMenuActionsGroups||F)&&(this.remoteMenuActionsGroups=this.remoteIndicatorMenu.getActions().filter(L=>this.validatedGroup(L[0])).concat(this.legacyIndicatorMenu.getActions())),this.remoteMenuActionsGroups}updateRemoteStatusIndicator(){const F=this.environmentService.options?.windowIndicator;if(F){this.renderRemoteStatusIndicator((0,u.truncate)(F.label,$t.REMOTE_STATUS_LABEL_MAX_LENGTH),F.tooltip,F.command);return}if(this.remoteAuthority&&!r.isWeb){const L=this.labelService.getHostLabel(o.Schemas.vscodeRemote,this.remoteAuthority)||this.remoteAuthority;switch(this.connectionState){case"initializing":this.renderRemoteStatusIndicator(t.localize(5,null),t.localize(6,null),void 0,!0);break;case"reconnecting":this.renderRemoteStatusIndicator(`${t.localize(7,null,(0,u.truncate)(L,$t.REMOTE_STATUS_LABEL_MAX_LENGTH))}`,void 0,void 0,!0);break;case"disconnected":this.renderRemoteStatusIndicator(`$(alert) ${t.localize(8,null,(0,u.truncate)(L,$t.REMOTE_STATUS_LABEL_MAX_LENGTH))}`);break;default:{const M=new y.MarkdownString("",{isTrusted:!0,supportThemeIcons:!0}),N=this.labelService.getHostTooltip(o.Schemas.vscodeRemote,this.remoteAuthority);N?M.appendMarkdown(N):M.appendText(t.localize(9,null,L)),this.renderRemoteStatusIndicator(`$(remote) ${(0,u.truncate)(L,$t.REMOTE_STATUS_LABEL_MAX_LENGTH)}`,M)}}return}if(this.virtualWorkspaceLocation){const L=this.labelService.getHostLabel(this.virtualWorkspaceLocation.scheme,this.virtualWorkspaceLocation.authority);if(L){const M=new y.MarkdownString("",{isTrusted:!0,supportThemeIcons:!0}),N=this.labelService.getHostTooltip(this.virtualWorkspaceLocation.scheme,this.virtualWorkspaceLocation.authority);N?M.appendMarkdown(N):M.appendText(t.localize(10,null,L)),(!r.isWeb||this.remoteAuthority)&&(M.appendMarkdown(` `),M.appendMarkdown(t.localize(11,null,`command:${E.LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`))),this.renderRemoteStatusIndicator(`$(remote) ${(0,u.truncate)(L,$t.REMOTE_STATUS_LABEL_MAX_LENGTH)}`,M);return}}if(this.getRemoteMenuActions().length>0){this.renderRemoteStatusIndicator("$(remote)",t.localize(12,null));return}(0,k.dispose)(this.remoteStatusEntry),this.remoteStatusEntry=void 0}renderRemoteStatusIndicator(F,L,M,N){const B=t.localize(13,null);typeof M!="string"&&this.getRemoteMenuActions().length>0&&(M=$t.REMOTE_ACTIONS_COMMAND_ID);const P=(0,g.getCodiconAriaLabel)(F),V={name:B,backgroundColor:(0,_.themeColorFromId)(f.STATUS_BAR_HOST_NAME_BACKGROUND),color:(0,_.themeColorFromId)(f.STATUS_BAR_HOST_NAME_FOREGROUND),ariaLabel:P,text:F,showProgress:N,tooltip:L,command:M};this.remoteStatusEntry?this.remoteStatusEntry.update(V):this.remoteStatusEntry=this.statusbarService.addEntry(V,"status.host",0,Number.MAX_VALUE)}showRemoteMenu(){const F=V=>{if(V.item.category)return typeof V.item.category=="string"?V.item.category:V.item.category.value},L=()=>{if(this.remoteAuthority)return new RegExp(`^remote_\\d\\d_${(0,n.getRemoteName)(this.remoteAuthority)}_`);if(this.virtualWorkspaceLocation)return new RegExp(`^virtualfs_\\d\\d_${this.virtualWorkspaceLocation.scheme}_`)},M=()=>{let V=this.getRemoteMenuActions(!0);const z=[],U=L();U&&(V=V.sort((G,q)=>{const Z=U.test(G[0]),j=U.test(q[0]);return Z!==j?Z?-1:1:G[0].localeCompare(q[0])}));let H;for(let G of V){let q=!1;for(let Z of G[1])if(Z instanceof D.MenuItemAction){if(!q){const X=F(Z);X!==H&&(z.push({type:"separator",label:X}),H=X),q=!0}let j=typeof Z.item.title=="string"?Z.item.title:Z.item.title.value;z.push({type:"item",id:Z.item.id,label:j})}}z.push({type:"separator"});let K=z.length;return $t.SHOW_CLOSE_REMOTE_COMMAND_ID&&(this.remoteAuthority?(z.push({type:"item",id:$t.CLOSE_REMOTE_COMMAND_ID,label:t.localize(14,null)}),this.connectionState==="disconnected"&&z.push({type:"item",id:m.ReloadWindowAction.ID,label:t.localize(15,null)})):this.virtualWorkspaceLocation&&z.push({type:"item",id:$t.CLOSE_REMOTE_COMMAND_ID,label:t.localize(16,null)})),!this.remoteAuthority&&!this.virtualWorkspaceLocation&&this.extensionGalleryService.isEnabled()&&z.push({id:$t.INSTALL_REMOTE_EXTENSIONS_ID,label:t.localize(17,null),alwaysShow:!0}),z.length===K&&z.pop(),z},N=this.quickInputService.createQuickPick();N.items=M(),N.sortByLabel=!1,N.canSelectMany=!1,(0,p.once)(N.onDidAccept)(V=>{const z=N.selectedItems;z.length===1&&this.commandService.executeCommand(z[0].id),N.hide()});const B=this.legacyIndicatorMenu.onDidChange(()=>N.items=M());N.onDidHide(B.dispose);const P=this.remoteIndicatorMenu.onDidChange(()=>N.items=M());N.onDidHide(P.dispose),N.show()}};O.REMOTE_ACTIONS_COMMAND_ID="workbench.action.remote.showMenu",O.CLOSE_REMOTE_COMMAND_ID="workbench.action.remote.close",O.SHOW_CLOSE_REMOTE_COMMAND_ID=!r.isWeb,O.INSTALL_REMOTE_EXTENSIONS_ID="workbench.action.remote.extensions",O.REMOTE_STATUS_LABEL_MAX_LENGTH=40,O=Ee([W(0,I.IStatusbarService),W(1,S.IBrowserWorkbenchEnvironmentService),W(2,w.ILabelService),W(3,v.IContextKeyService),W(4,D.IMenuService),W(5,i.IQuickInputService),W(6,C.ICommandService),W(7,c.IExtensionService),W(8,A.IRemoteAgentService),W(9,s.IRemoteAuthorityResolverService),W(10,l.IHostService),W(11,a.IWorkspaceContextService),W(12,d.ILogService),W(13,b.IExtensionGalleryService)],O),e.RemoteStatusIndicator=O}),define(ne[2565],re([1,0,1702,19,2,6,215,217,7,145,21,8,44,56,225,18]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SCMActiveResourceContextKeyController=e.SCMStatusController=void 0;function s(p){return typeof p.provider.count=="number"?p.provider.count:p.provider.groups.elements.reduce((u,a)=>u+a.elements.length,0)}let l=class{constructor(u,a,n,h,g,d,m,b){this.scmService=u,this.scmViewService=a,this.statusbarService=n,this.contextKeyService=h,this.activityService=g,this.editorService=d,this.configurationService=m,this.uriIdentityService=b,this.statusBarDisposable=_.Disposable.None,this.focusDisposable=_.Disposable.None,this.focusedRepository=void 0,this.badgeDisposable=new _.MutableDisposable,this.disposables=new _.DisposableStore,this.repositoryDisposables=new Set,this.scmService.onDidAddRepository(this.onDidAddRepository,this,this.disposables),this.scmService.onDidRemoveRepository(this.onDidRemoveRepository,this,this.disposables),A.Event.filter(m.onDidChangeConfiguration,y=>y.affectsConfiguration("scm.countBadge"))(this.renderActivityCount,this,this.disposables);for(const y of this.scmService.repositories)this.onDidAddRepository(y);this.scmViewService.onDidFocusRepository(this.focusRepository,this,this.disposables),this.focusRepository(this.scmViewService.focusedRepository),d.onDidActiveEditorChange(this.tryFocusRepositoryBasedOnActiveEditor,this,this.disposables),this.renderActivityCount()}tryFocusRepositoryBasedOnActiveEditor(){const u=o.EditorResourceAccessor.getOriginalUri(this.editorService.activeEditor);if(!u)return!1;let a=null,n=Number.POSITIVE_INFINITY;for(const h of this.scmService.repositories){const g=h.provider.rootUri;if(!g)continue;const d=this.uriIdentityService.extUri.relativePath(g,u);d&&!/^\.\./.test(d)&&d.length<n&&(a=h,n=d.length)}return a?(this.focusRepository(a),!0):!1}onDidAddRepository(u){const n=A.Event.any(u.provider.onDidChange,u.provider.onDidChangeResources)(()=>this.renderActivityCount()),g=A.Event.filter(this.scmService.onDidRemoveRepository,m=>m===u)(()=>{d.dispose(),this.repositoryDisposables.delete(d),this.renderActivityCount()}),d=(0,_.combinedDisposable)(n,g);this.repositoryDisposables.add(d)}onDidRemoveRepository(u){this.focusedRepository===u&&this.focusRepository(this.scmService.repositories[0])}focusRepository(u){this.focusedRepository!==u&&(this.focusDisposable.dispose(),this.focusedRepository=u,u&&u.provider.onDidChangeStatusBarCommands&&(this.focusDisposable=u.provider.onDidChangeStatusBarCommands(()=>this.renderStatusBar(u))),this.renderStatusBar(u),this.renderActivityCount())}renderStatusBar(u){if(this.statusBarDisposable.dispose(),!u)return;const a=u.provider.statusBarCommands||[],n=u.provider.rootUri?`${(0,f.basename)(u.provider.rootUri)} (${u.provider.label})`:u.provider.label,h=new _.DisposableStore;for(const g of a){const d=`${n}${g.tooltip?` - ${g.tooltip}`:""}`;let m=(0,i.stripIcons)(g.title).trim();m=m?`${m}, ${n}`:n,h.add(this.statusbarService.addEntry({name:(0,t.localize)(0,null),text:g.title,ariaLabel:`${m}${g.tooltip?` - ${g.tooltip}`:""}`,tooltip:d,command:g.id?g:void 0},"status.scm",0,1e4))}this.statusBarDisposable=h}renderActivityCount(){const u=this.configurationService.getValue("scm.countBadge");let a=0;if(u==="all"?a=this.scmService.repositories.reduce((n,h)=>n+s(h),0):u==="focused"&&this.focusedRepository&&(a=s(this.focusedRepository)),a>0){const n=new D.NumberBadge(a,h=>(0,t.localize)(1,null,h));this.badgeDisposable.value=this.activityService.showViewActivity(k.VIEW_PANE_ID,{badge:n,clazz:"scm-viewlet-label"})}else this.badgeDisposable.value=void 0}dispose(){this.focusDisposable.dispose(),this.statusBarDisposable.dispose(),this.badgeDisposable.dispose(),this.disposables=(0,_.dispose)(this.disposables),(0,_.dispose)(this.repositoryDisposables.values()),this.repositoryDisposables.clear()}};l=Ee([W(0,k.ISCMService),W(1,k.ISCMViewService),W(2,w.IStatusbarService),W(3,I.IContextKeyService),W(4,D.IActivityService),W(5,v.IEditorService),W(6,C.IConfigurationService),W(7,c.IUriIdentityService)],l),e.SCMStatusController=l;let r=class{constructor(u,a,n,h){this.contextKeyService=u,this.editorService=a,this.scmService=n,this.uriIdentityService=h,this.disposables=new _.DisposableStore,this.repositoryDisposables=new Set,this.activeResourceHasChangesContextKey=u.createKey("scmActiveResourceHasChanges",!1),this.activeResourceRepositoryContextKey=u.createKey("scmActiveResourceRepository",void 0),this.scmService.onDidAddRepository(this.onDidAddRepository,this,this.disposables);for(const g of this.scmService.repositories)this.onDidAddRepository(g);a.onDidActiveEditorChange(this.updateContextKey,this,this.disposables)}onDidAddRepository(u){const n=A.Event.any(u.provider.onDidChange,u.provider.onDidChangeResources)(()=>this.updateContextKey()),g=A.Event.filter(this.scmService.onDidRemoveRepository,m=>m===u)(()=>{d.dispose(),this.repositoryDisposables.delete(d),this.updateContextKey()}),d=(0,_.combinedDisposable)(n,g);this.repositoryDisposables.add(d)}updateContextKey(){const u=o.EditorResourceAccessor.getOriginalUri(this.editorService.activeEditor);if(u?.scheme===S.Schemas.file||u?.scheme===S.Schemas.vscodeRemote){const a=this.scmService.repositories.find(n=>n.provider.rootUri&&this.uriIdentityService.extUri.isEqualOrParent(u,n.provider.rootUri));this.activeResourceRepositoryContextKey.set(a);for(const n of a?.provider.groups.elements??[])if(n.elements.some(h=>this.uriIdentityService.extUri.isEqual(u,h.sourceUri))){this.activeResourceHasChangesContextKey.set(!0);return}this.activeResourceHasChangesContextKey.set(!1)}else this.activeResourceHasChangesContextKey.set(!1),this.activeResourceRepositoryContextKey.set(void 0)}dispose(){this.disposables=(0,_.dispose)(this.disposables),(0,_.dispose)(this.repositoryDisposables.values()),this.repositoryDisposables.clear()}};r=Ee([W(0,I.IContextKeyService),W(1,v.IEditorService),W(2,k.ISCMService),W(3,c.IUriIdentityService)],r),e.SCMActiveResourceContextKeyController=r}),define(ne[2566],re([1,0,1895,2,67,145,11,217,26,36,6,35,185,717,68,12,38,10,303,43,88,225,1136]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressService=void 0;let n=class extends f.Disposable{constructor(g,d,m,b,E,y,T,R,O){super();this.activityService=g,this.paneCompositeService=d,this.viewDescriptorService=m,this.viewsService=b,this.notificationService=E,this.statusbarService=y,this.layoutService=T,this.themeService=R,this.keybindingService=O,this.windowProgressStack=[],this.windowProgressStatusEntry=void 0}async withProgress(g,d,m){const{location:b}=g,E=y=>{const T=this.viewDescriptorService.getViewContainerById(y);if(T){const R=this.viewDescriptorService.getViewContainerLocation(T);if(R!==null)return this.withPaneCompositeProgress(y,R,d,{...g,location:y})}if(this.viewDescriptorService.getViewDescriptorById(y)!==null)return this.withViewProgress(y,d,{...g,location:y});throw new Error(`Bad progress location: ${y}`)};if(typeof b=="string")return E(b);switch(b){case 15:return this.withNotificationProgress({...g,location:b},d,m);case 10:return g.command?this.withWindowProgress({...g,location:b},d):this.withNotificationProgress({delay:150,...g,silent:!0,location:15},d,m);case 1:return this.withPaneCompositeProgress("workbench.view.explorer",0,d,{...g,location:b});case 3:return E("workbench.scm");case 5:return this.withPaneCompositeProgress("workbench.view.extensions",0,d,{...g,location:b});case 20:return this.withDialogProgress(g,d,m);default:throw new Error(`Bad progress location: ${b}`)}}withWindowProgress(g,d){const m=[g,new _.Progress(()=>this.updateWindowProgress())],b=d(m[1]);let E=setTimeout(()=>{E=void 0,this.windowProgressStack.unshift(m),this.updateWindowProgress(),Promise.all([(0,k.timeout)(150),b]).finally(()=>{const y=this.windowProgressStack.indexOf(m);this.windowProgressStack.splice(y,1),this.updateWindowProgress()})},150);return b.finally(()=>clearTimeout(E))}updateWindowProgress(g=0){if(g<this.windowProgressStack.length){const[d,m]=this.windowProgressStack[g];let b=d.title,E=m.value&&m.value.message,y=d.command,T,R;const O=d.source&&typeof d.source!="string"?d.source.label:d.source;if(b&&E)T=(0,t.localize)(0,null,b,E),R=O?(0,t.localize)(1,null,O,b,E):T;else if(b)T=b,R=O?(0,t.localize)(2,null,O,b):T;else if(E)T=E,R=O?(0,t.localize)(3,null,O,E):T;else{this.updateWindowProgress(g+1);return}const x={name:(0,t.localize)(4,null),text:T,showProgress:!0,ariaLabel:T,tooltip:R,command:y};this.windowProgressStatusEntry?this.windowProgressStatusEntry.update(x):this.windowProgressStatusEntry=this.statusbarService.addEntry(x,"status.progress",0)}else this.windowProgressStatusEntry?.dispose(),this.windowProgressStatusEntry=void 0}withNotificationProgress(g,d,m){const b=new class extends f.Disposable{constructor(){super();this._onDidReport=this._register(new v.Emitter),this.onDidReport=this._onDidReport.event,this._onWillDispose=this._register(new v.Emitter),this.onWillDispose=this._onWillDispose.event,this._step=void 0,this._done=!1,this.promise=d(this),this.promise.finally(()=>{this.dispose()})}get step(){return this._step}get done(){return this._done}report(M){this._step=M,this._onDidReport.fire(M)}cancel(M){m?.(M),this.dispose()}dispose(){this._done=!0,this._onWillDispose.fire(),super.dispose()}},E=()=>{const M=new k.DeferredPromise;return this.withWindowProgress({location:10,title:g.title?(0,r.parseLinkedText)(g.title).toString():void 0,command:"notifications.showList"},N=>{function B(V){V.message&&N.report({message:(0,r.parseLinkedText)(V.message).toString()})}b.step&&B(b.step);const P=b.onDidReport(V=>B(V));return M.p.finally(()=>P.dispose()),v.Event.once(b.onWillDispose)(()=>M.complete()),M.p}),(0,f.toDisposable)(()=>M.complete())},y=(M,N,B)=>{const P=new f.DisposableStore,V=g.primaryActions?Array.from(g.primaryActions):[],z=g.secondaryActions?Array.from(g.secondaryActions):[];if(g.buttons&&g.buttons.forEach((G,q)=>{const Z=new class extends w.Action{constructor(){super(`progress.button.${G}`,G,void 0,!0)}async run(){b.cancel(q)}};P.add(Z),V.push(Z)}),g.cancellable){const G=new class extends w.Action{constructor(){super("progress.cancel",(0,t.localize)(5,null),void 0,!0)}async run(){b.cancel()}};P.add(G),V.push(G)}const U=this.notificationService.notify({severity:I.Severity.Info,message:(0,a.stripIcons)(M),source:g.source,actions:{primary:V,secondary:z},progress:typeof B=="number"&&B>=0?{total:100,worked:B}:{infinite:!0},silent:N});let H;const K=G=>{(0,f.dispose)(H),!G&&!b.done&&(H=E())};return P.add(U.onDidChangeVisibility(K)),N&&K(!1),v.Event.once(U.onDidClose)(()=>P.dispose()),U},T=(M,N)=>{typeof N=="number"&&N>=0?(M.progress.total(100),M.progress.worked(N)):M.progress.infinite()};let R,O,x;const F=M=>{M?.message&&g.title?x=`${g.title}: ${M.message}`:x=g.title||M?.message,!R&&x&&(typeof g.delay=="number"&&g.delay>0?typeof O!="number"&&(O=setTimeout(()=>R=y(x,!!g.silent,M?.increment),g.delay)):R=y(x,!!g.silent,M?.increment)),R&&(x&&R.updateMessage(x),typeof M?.increment=="number"&&T(R,M.increment))};F(b.step);const L=b.onDidReport(M=>F(M));return v.Event.once(b.onWillDispose)(()=>L.dispose()),(async()=>{try{typeof g.delay=="number"&&g.delay>0?await b.promise:await Promise.all([(0,k.timeout)(800),b.promise])}finally{clearTimeout(O),R?.close()}})(),b.promise}withPaneCompositeProgress(g,d,m,b){const E=this.paneCompositeService.getProgressIndicator(g,d),y=E?this.withCompositeProgress(E,m,b):m({report:()=>{}});return d===0&&this.showOnActivityBar(g,b,y),y}withViewProgress(g,d,m){const b=this.viewsService.getViewProgressIndicator(g),E=b?this.withCompositeProgress(b,d,m):d({report:()=>{}});if(this.viewDescriptorService.getViewLocationById(g)!==0)return E;const T=this.viewDescriptorService.getViewContainerByViewId(g)?.id;return T===void 0||this.showOnActivityBar(T,m,E),E}showOnActivityBar(g,d,m){let b,E=setTimeout(()=>{E=void 0;const y=this.activityService.showViewContainerActivity(g,{badge:new D.ProgressBadge(()=>""),clazz:"progress-badge",priority:100}),T=Date.now(),R=300;b={dispose(){const O=Date.now()-T;O<R?setTimeout(()=>y.dispose(),R-O):y.dispose()}}},d.delay||300);m.finally(()=>{clearTimeout(E),(0,f.dispose)(b)})}withCompositeProgress(g,d,m){let b;function E(T){let R,O;return typeof T!="undefined"&&(typeof T=="number"?R=T:typeof T.increment=="number"&&(R=T.total??100,O=T.increment)),typeof R=="number"?(b||(b=g.show(R,m.delay),y.catch(()=>{}).finally(()=>b?.done())),typeof O=="number"&&b.worked(O)):(b&&b.done(),g.showWhile(y,m.delay)),b}const y=d({report:T=>{E(T)}});return E(m.total),y}withDialogProgress(g,d,m){const b=new f.DisposableStore,E=["workbench.action.quit","workbench.action.reloadWindow","copy","cut","editor.action.clipboardCopyAction","editor.action.clipboardCutAction"];let y;const T=M=>{const N=g.buttons||[];return g.sticky||N.push(g.cancellable?(0,t.localize)(6,null):(0,t.localize)(7,null)),y=new c.Dialog(this.layoutService.container,M,N,{type:"pending",detail:g.detail,cancelId:N.length-1,disableCloseAction:g.sticky,disableDefaultAction:g.sticky,keyEventProcessor:B=>{const P=this.keybindingService.softDispatch(B,this.layoutService.container);P?.commandId&&(E.includes(P.commandId)||l.EventHelper.stop(B,!0))}}),b.add(y),b.add((0,i.attachDialogStyler)(y,this.themeService)),y.show().then(B=>{m?.(B.button),(0,f.dispose)(y)}),y};let R=g.delay??0,O;const x=b.add(new k.RunOnceScheduler(()=>{R=0,O&&!y?y=T(O):O&&y.updateMessage(O)},0)),F=function(M){O=M,x.isScheduled()||x.schedule(R)},L=d({report:M=>{F(M.message)}});return L.finally(()=>{(0,f.dispose)(b)}),g.title&&F(g.title),L}};n=Ee([W(0,D.IActivityService),W(1,u.IPaneCompositePartService),W(2,p.IViewDescriptorService),W(3,p.IViewsService),W(4,I.INotificationService),W(5,A.IStatusbarService),W(6,o.ILayoutService),W(7,S.IThemeService),W(8,s.IKeybindingService)],n),e.ProgressService=n,(0,C.registerSingleton)(_.IProgressService,n,!0)}),define(ne[2567],re([1,0,1989,27,199,207]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolveWorkbenchCommonProperties=void 0;async function k(D,I,w,v,C,o,c,i,S,s){const l=await(0,t.resolveCommonProperties)(I,w,v,A.process.arch,C,o,c,i,S),r=D.get(f.firstSessionDateStorageKey,0),p=D.get(f.lastSessionDateStorageKey,0);return l["common.version.shell"]=A.process.versions.electron,l["common.version.renderer"]=A.process.versions.chrome,l["common.firstSessionDate"]=r,l["common.lastSessionDate"]=p||"",l["common.isNewSession"]=p?"0":"1",l["common.remoteAuthority"]=(0,_.cleanRemoteAuthority)(s),l}e.resolveWorkbenchCommonProperties=k}),define(ne[2568],re([1,0,27,199,8,2,121,46,103,1993,24,2567,1997,35,23]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryService=void 0;let S=class extends A.Disposable{constructor(l,r,p,u,a,n){super();if((0,f.supportsTelemetry)(r,l)){const h=p.getChannel("telemetryAppender"),g={appenders:[new w.TelemetryAppenderClient(h)],commonProperties:(0,C.resolveWorkbenchCommonProperties)(u,n,l.os.release,l.os.hostname,r.commit,r.version,l.machineId,r.msftInternalDomains,l.installSourcePath,l.remoteAuthority),piiPaths:(0,f.getPiiPathsFromEnvironment)(l),sendErrorTelemetry:!0};this.impl=this._register(new o.TelemetryService(g,a,r))}else this.impl=f.NullTelemetryService;this.sendErrorTelemetry=this.impl.sendErrorTelemetry}setExperimentProperty(l,r){return this.impl.setExperimentProperty(l,r)}get telemetryLevel(){return this.impl.telemetryLevel}publicLog(l,r,p){return this.impl.publicLog(l,r,p)}publicLog2(l,r,p){return this.publicLog(l,r,p)}publicLogError(l,r){return this.impl.publicLogError(l,r)}publicLogError2(l,r){return this.publicLog(l,r)}getTelemetryInfo(){return this.impl.getTelemetryInfo()}};S=Ee([W(0,k.INativeWorkbenchEnvironmentService),W(1,D.IProductService),W(2,I.ISharedProcessService),W(3,v.IStorageService),W(4,_.IConfigurationService),W(5,i.IFileService)],S),e.TelemetryService=S,(0,c.registerSingleton)(t.ITelemetryService,S)}),define(ne[429],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITextMateService=void 0,e.ITextMateService=(0,t.createDecorator)("textMateService")}),define(ne[2569],re([1,0,1459,118,13,342,124,42,146,17,40,429,391,296,116,2]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageConfigurationFileHandler=void 0;function s(n){if(!Array.isArray(n))return!1;for(let h=0,g=n.length;h<g;h++)if(typeof n[h]!="string")return!1;return!0}function l(n){return s(n)&&n.length===2}let r=class extends S.Disposable{constructor(h,g,d,m){super();this._languageService=g,this._extensionResourceLoaderService=d,this._extensionService=m,this._done=new Map,this._register(this._languageService.onDidEncounterLanguage(async b=>{this._extensionService.whenInstalledExtensionsRegistered().then(()=>{this._loadConfigurationsForMode(b)})})),this._register(this._languageService.onDidChange(()=>{for(const[b]of this._done)this._loadConfigurationsForMode(b)})),this._register(h.onDidEncounterLanguage(b=>{this._loadConfigurationsForMode(b)}))}async _loadConfigurationsForMode(h){const g=this._languageService.getConfigurationFiles(h),d=(0,i.hash)(g.map(b=>b.toString()));if(this._done.get(h)===d)return;this._done.set(h,d);const m=await Promise.all(g.map(b=>this._readConfigFile(b)));for(const b of m)this._handleConfig(h,b)}async _readConfigFile(h){try{const g=await this._extensionResourceLoaderService.readExtensionResource(h),d=[];let m=(0,f.parse)(g,d);return d.length&&console.error(t.localize(0,null,h.toString(),d.map(b=>`[${b.offset}, ${b.length}] ${(0,o.getParseErrorMessage)(b.error)}`).join(` `))),(0,f.getNodeType)(m)!=="object"&&(console.error(t.localize(1,null,h.toString())),m={}),m}catch(g){return console.error(g),{}}}_extractValidCommentRule(h,g){const d=g.comments;if(typeof d=="undefined")return;if(!_.isObject(d)){console.warn(`[${h}]: language configuration: expected \`comments\` to be an object.`);return}let m;return typeof d.lineComment!="undefined"&&(typeof d.lineComment!="string"?console.warn(`[${h}]: language configuration: expected \`comments.lineComment\` to be a string.`):(m=m||{},m.lineComment=d.lineComment)),typeof d.blockComment!="undefined"&&(l(d.blockComment)?(m=m||{},m.blockComment=d.blockComment):console.warn(`[${h}]: language configuration: expected \`comments.blockComment\` to be an array of two strings.`)),m}_extractValidBrackets(h,g){const d=g.brackets;if(typeof d=="undefined")return;if(!Array.isArray(d)){console.warn(`[${h}]: language configuration: expected \`brackets\` to be an array.`);return}let m;for(let b=0,E=d.length;b<E;b++){const y=d[b];if(!l(y)){console.warn(`[${h}]: language configuration: expected \`brackets[${b}]\` to be an array of two strings.`);continue}m=m||[],m.push(y)}return m}_extractValidAutoClosingPairs(h,g){const d=g.autoClosingPairs;if(typeof d=="undefined")return;if(!Array.isArray(d)){console.warn(`[${h}]: language configuration: expected \`autoClosingPairs\` to be an array.`);return}let m;for(let b=0,E=d.length;b<E;b++){const y=d[b];if(Array.isArray(y)){if(!l(y)){console.warn(`[${h}]: language configuration: expected \`autoClosingPairs[${b}]\` to be an array of two strings or an object.`);continue}m=m||[],m.push({open:y[0],close:y[1]})}else{if(!_.isObject(y)){console.warn(`[${h}]: language configuration: expected \`autoClosingPairs[${b}]\` to be an array of two strings or an object.`);continue}if(typeof y.open!="string"){console.warn(`[${h}]: language configuration: expected \`autoClosingPairs[${b}].open\` to be a string.`);continue}if(typeof y.close!="string"){console.warn(`[${h}]: language configuration: expected \`autoClosingPairs[${b}].close\` to be a string.`);continue}if(typeof y.notIn!="undefined"&&!s(y.notIn)){console.warn(`[${h}]: language configuration: expected \`autoClosingPairs[${b}].notIn\` to be a string array.`);continue}m=m||[],m.push({open:y.open,close:y.close,notIn:y.notIn})}}return m}_extractValidSurroundingPairs(h,g){const d=g.surroundingPairs;if(typeof d=="undefined")return;if(!Array.isArray(d)){console.warn(`[${h}]: language configuration: expected \`surroundingPairs\` to be an array.`);return}let m;for(let b=0,E=d.length;b<E;b++){const y=d[b];if(Array.isArray(y)){if(!l(y)){console.warn(`[${h}]: language configuration: expected \`surroundingPairs[${b}]\` to be an array of two strings or an object.`);continue}m=m||[],m.push({open:y[0],close:y[1]})}else{if(!_.isObject(y)){console.warn(`[${h}]: language configuration: expected \`surroundingPairs[${b}]\` to be an array of two strings or an object.`);continue}if(typeof y.open!="string"){console.warn(`[${h}]: language configuration: expected \`surroundingPairs[${b}].open\` to be a string.`);continue}if(typeof y.close!="string"){console.warn(`[${h}]: language configuration: expected \`surroundingPairs[${b}].close\` to be a string.`);continue}m=m||[],m.push({open:y.open,close:y.close})}}return m}_extractValidColorizedBracketPairs(h,g){const d=g.colorizedBracketPairs;if(typeof d=="undefined")return;if(!Array.isArray(d)){console.warn(`[${h}]: language configuration: expected \`colorizedBracketPairs\` to be an array.`);return}const m=[];for(let b=0,E=d.length;b<E;b++){const y=d[b];if(!l(y)){console.warn(`[${h}]: language configuration: expected \`colorizedBracketPairs[${b}]\` to be an array of two strings.`);continue}m.push([y[0],y[1]])}return m}_extractValidOnEnterRules(h,g){const d=g.onEnterRules;if(typeof d=="undefined")return;if(!Array.isArray(d)){console.warn(`[${h}]: language configuration: expected \`onEnterRules\` to be an array.`);return}let m;for(let b=0,E=d.length;b<E;b++){const y=d[b];if(!_.isObject(y)){console.warn(`[${h}]: language configuration: expected \`onEnterRules[${b}]\` to be an object.`);continue}if(!_.isObject(y.action)){console.warn(`[${h}]: language configuration: expected \`onEnterRules[${b}].action\` to be an object.`);continue}let T;if(y.action.indent==="none")T=A.IndentAction.None;else if(y.action.indent==="indent")T=A.IndentAction.Indent;else if(y.action.indent==="indentOutdent")T=A.IndentAction.IndentOutdent;else if(y.action.indent==="outdent")T=A.IndentAction.Outdent;else{console.warn(`[${h}]: language configuration: expected \`onEnterRules[${b}].action.indent\` to be 'none', 'indent', 'indentOutdent' or 'outdent'.`);continue}const R={indentAction:T};y.action.appendText&&(typeof y.action.appendText=="string"?R.appendText=y.action.appendText:console.warn(`[${h}]: language configuration: expected \`onEnterRules[${b}].action.appendText\` to be undefined or a string.`)),y.action.removeText&&(typeof y.action.removeText=="number"?R.removeText=y.action.removeText:console.warn(`[${h}]: language configuration: expected \`onEnterRules[${b}].action.removeText\` to be undefined or a number.`));const O=this._parseRegex(h,`onEnterRules[${b}].beforeText`,y.beforeText);if(!O)continue;const x={beforeText:O,action:R};if(y.afterText){const F=this._parseRegex(h,`onEnterRules[${b}].afterText`,y.afterText);F&&(x.afterText=F)}if(y.previousLineText){const F=this._parseRegex(h,`onEnterRules[${b}].previousLineText`,y.previousLineText);F&&(x.previousLineText=F)}m=m||[],m.push(x)}return m}_handleConfig(h,g){const d=this._extractValidCommentRule(h,g),m=this._extractValidBrackets(h,g),b=this._extractValidAutoClosingPairs(h,g),E=this._extractValidSurroundingPairs(h,g),y=this._extractValidColorizedBracketPairs(h,g),T=typeof g.autoCloseBefore=="string"?g.autoCloseBefore:void 0,R=g.wordPattern?this._parseRegex(h,"wordPattern",g.wordPattern):void 0,O=g.indentationRules?this._mapIndentationRules(h,g.indentationRules):void 0;let x;if(g.folding){const M=g.folding.markers;x={offSide:g.folding.offSide,markers:M?{start:new RegExp(M.start),end:new RegExp(M.end)}:void 0}}const F=this._extractValidOnEnterRules(h,g),L={comments:d,brackets:m,wordPattern:R,indentationRules:O,onEnterRules:F,autoClosingPairs:b,surroundingPairs:E,colorizedBracketPairs:y,autoCloseBefore:T,folding:x,__electricCharacterSupport:void 0};k.LanguageConfigurationRegistry.register(h,L,50)}_parseRegex(h,g,d){if(typeof d=="string")try{return new RegExp(d,"")}catch(m){console.warn(`[${h}]: Invalid regular expression in \`${g}\`: `,m);return}if(_.isObject(d)){if(typeof d.pattern!="string"){console.warn(`[${h}]: language configuration: expected \`${g}.pattern\` to be a string.`);return}if(typeof d.flags!="undefined"&&typeof d.flags!="string"){console.warn(`[${h}]: language configuration: expected \`${g}.flags\` to be a string.`);return}try{return new RegExp(d.pattern,d.flags)}catch(m){console.warn(`[${h}]: Invalid regular expression in \`${g}\`: `,m);return}}console.warn(`[${h}]: language configuration: expected \`${g}\` to be a string or an object.`)}_mapIndentationRules(h,g){const d=this._parseRegex(h,"indentationRules.increaseIndentPattern",g.increaseIndentPattern);if(!d)return;const m=this._parseRegex(h,"indentationRules.decreaseIndentPattern",g.decreaseIndentPattern);if(!m)return;const b={increaseIndentPattern:d,decreaseIndentPattern:m};return g.indentNextLinePattern&&(b.indentNextLinePattern=this._parseRegex(h,"indentationRules.indentNextLinePattern",g.indentNextLinePattern)),g.unIndentedLinePattern&&(b.unIndentedLinePattern=this._parseRegex(h,"indentationRules.unIndentedLinePattern",g.unIndentedLinePattern)),b}};r=Ee([W(0,C.ITextMateService),W(1,D.ILanguageService),W(2,c.IExtensionResourceLoaderService),W(3,v.IExtensionService)],r),e.LanguageConfigurationFileHandler=r;const p="vscode://schemas/language-configuration",u={allowComments:!0,allowTrailingCommas:!0,default:{comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["(",")"],["[","]"],["{","}"]],autoClosingPairs:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[["(",")"],["[","]"],["{","}"]]},definitions:{openBracket:{type:"string",description:t.localize(2,null)},closeBracket:{type:"string",description:t.localize(3,null)},bracketPair:{type:"array",items:[{$ref:"#/definitions/openBracket"},{$ref:"#/definitions/closeBracket"}]}},properties:{comments:{default:{blockComment:["/*","*/"],lineComment:"//"},description:t.localize(4,null),type:"object",properties:{blockComment:{type:"array",description:t.localize(5,null),items:[{type:"string",description:t.localize(6,null)},{type:"string",description:t.localize(7,null)}]},lineComment:{type:"string",description:t.localize(8,null)}}},brackets:{default:[["(",")"],["[","]"],["{","}"]],description:t.localize(9,null),type:"array",items:{$ref:"#/definitions/bracketPair"}},colorizedBracketPairs:{default:[["(",")"],["[","]"],["{","}"]],description:t.localize(10,null),type:"array",items:{$ref:"#/definitions/bracketPair"}},autoClosingPairs:{default:[["(",")"],["[","]"],["{","}"]],description:t.localize(11,null),type:"array",items:{oneOf:[{$ref:"#/definitions/bracketPair"},{type:"object",properties:{open:{$ref:"#/definitions/openBracket"},close:{$ref:"#/definitions/closeBracket"},notIn:{type:"array",description:t.localize(12,null),items:{enum:["string","comment"]}}}}]}},autoCloseBefore:{default:`;:.,=}])> `,description:t.localize(13,null),type:"string"},surroundingPairs:{default:[["(",")"],["[","]"],["{","}"]],description:t.localize(14,null),type:"array",items:{oneOf:[{$ref:"#/definitions/bracketPair"},{type:"object",properties:{open:{$ref:"#/definitions/openBracket"},close:{$ref:"#/definitions/closeBracket"}}}]}},wordPattern:{default:"",description:t.localize(15,null),type:["string","object"],properties:{pattern:{type:"string",description:t.localize(16,null),default:""},flags:{type:"string",description:t.localize(17,null),default:"g",pattern:"^([gimuy]+)$",patternErrorMessage:t.localize(18,null)}}},indentationRules:{default:{increaseIndentPattern:"",decreaseIndentPattern:""},description:t.localize(19,null),type:"object",properties:{increaseIndentPattern:{type:["string","object"],description:t.localize(20,null),properties:{pattern:{type:"string",description:t.localize(21,null),default:""},flags:{type:"string",description:t.localize(22,null),default:"",pattern:"^([gimuy]+)$",patternErrorMessage:t.localize(23,null)}}},decreaseIndentPattern:{type:["string","object"],description:t.localize(24,null),properties:{pattern:{type:"string",description:t.localize(25,null),default:""},flags:{type:"string",description:t.localize(26,null),default:"",pattern:"^([gimuy]+)$",patternErrorMessage:t.localize(27,null)}}},indentNextLinePattern:{type:["string","object"],description:t.localize(28,null),properties:{pattern:{type:"string",description:t.localize(29,null),default:""},flags:{type:"string",description:t.localize(30,null),default:"",pattern:"^([gimuy]+)$",patternErrorMessage:t.localize(31,null)}}},unIndentedLinePattern:{type:["string","object"],description:t.localize(32,null),properties:{pattern:{type:"string",description:t.localize(33,null),default:""},flags:{type:"string",description:t.localize(34,null),default:"",pattern:"^([gimuy]+)$",patternErrorMessage:t.localize(35,null)}}}}},folding:{type:"object",description:t.localize(36,null),properties:{offSide:{type:"boolean",description:t.localize(37,null)},markers:{type:"object",description:t.localize(38,null),properties:{start:{type:"string",description:t.localize(39,null)},end:{type:"string",description:t.localize(40,null)}}}}},onEnterRules:{type:"array",description:t.localize(41,null),items:{type:"object",description:t.localize(42,null),required:["beforeText","action"],properties:{beforeText:{type:["string","object"],description:t.localize(43,null),properties:{pattern:{type:"string",description:t.localize(44,null),default:""},flags:{type:"string",description:t.localize(45,null),default:"",pattern:"^([gimuy]+)$",patternErrorMessage:t.localize(46,null)}}},afterText:{type:["string","object"],description:t.localize(47,null),properties:{pattern:{type:"string",description:t.localize(48,null),default:""},flags:{type:"string",description:t.localize(49,null),default:"",pattern:"^([gimuy]+)$",patternErrorMessage:t.localize(50,null)}}},previousLineText:{type:["string","object"],description:t.localize(51,null),properties:{pattern:{type:"string",description:t.localize(52,null),default:""},flags:{type:"string",description:t.localize(53,null),default:"",pattern:"^([gimuy]+)$",patternErrorMessage:t.localize(54,null)}}},action:{type:["string","object"],description:t.localize(55,null),required:["indent"],default:{indent:"indent"},properties:{indent:{type:"string",description:t.localize(56,null),default:"indent",enum:["none","indent","indentOutdent","outdent"],markdownEnumDescriptions:[t.localize(57,null),t.localize(58,null),t.localize(59,null),t.localize(60,null)]},appendText:{type:"string",description:t.localize(61,null),default:""},removeText:{type:"number",description:t.localize(62,null),default:0}}}}}}}};w.Registry.as(I.Extensions.JSONContribution).registerSchema(p,u)}),define(ne[2570],re([1,0,1474,20,16,70,429,52,21,9,89,72,69,121,31,19,23]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class l extends _.Action2{constructor(){super({id:"editor.action.startDebugTextMate",title:{value:t.localize(0,null),original:"Start Text Mate Syntax Grammar Logging"},category:A.CATEGORIES.Developer,f1:!0})}_getOrCreateModel(p){const u=p.getModel(l.resource);return u||p.createModel("",null,l.resource)}_append(p,u){const a=p.getLineCount();p.applyEdits([{range:new f.Range(a,1073741824,a,1073741824),text:u}])}async run(p){const u=p.get(k.ITextMateService),a=p.get(D.IModelService),n=p.get(I.IEditorService),h=p.get(C.ICodeEditorService),g=p.get(o.IHostService),d=p.get(c.INativeWorkbenchEnvironmentService),m=p.get(i.ILoggerService),b=p.get(s.IFileService),E=(0,S.joinPath)(d.tmpDir,`vcode-tm-log-${(0,v.generateUuid)()}.txt`);await b.createFile(E);const y=m.createLogger(E,{name:"debug textmate"}),T=this._getOrCreateModel(a),R=F=>{this._append(T,F+` `),x(),y.info(F),y.flush()};if(await g.openWindow([{fileUri:E}],{forceNewWindow:!0}),!await n.openEditor({resource:T.uri,options:{pinned:!0}}))return;const x=()=>{const F=h.listCodeEditors();for(const L of F)L.hasModel()&&L.getModel().uri.toString()===l.resource.toString()&&L.revealLine(L.getModel().getLineCount())};R("// Open the file you want to test to the side and watch here"),R(`// Output mirrored at ${E}`),u.startDebugMode(F=>{this._append(T,F+` `),x(),y.info(F),y.flush()},()=>{})}}l.resource=w.URI.parse("inmemory:///tm-log.txt"),(0,_.registerAction2)(l)}),define(ne[2571],re([1,0,2414,2130,2415,2416,2570]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),define(ne[899],re([1,0,1900,133,368]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.grammarsExtPoint=void 0,e.grammarsExtPoint=f.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"grammars",deps:[_.languagesExtPoint],jsonSchema:{description:t.localize(0,null),type:"array",defaultSnippets:[{body:[{language:"${1:id}",scopeName:"source.${2:id}",path:"./syntaxes/${3:id}.tmLanguage."}]}],items:{type:"object",defaultSnippets:[{body:{language:"${1:id}",scopeName:"source.${2:id}",path:"./syntaxes/${3:id}.tmLanguage."}}],properties:{language:{description:t.localize(1,null),type:"string"},scopeName:{description:t.localize(2,null),type:"string"},path:{description:t.localize(3,null),type:"string"},embeddedLanguages:{description:t.localize(4,null),type:"object"},tokenTypes:{description:t.localize(5,null),type:"object",additionalProperties:{enum:["string","comment","other"]}},injectTo:{description:t.localize(6,null),type:"array",items:{type:"string"}}},required:["scopeName","path"]}}})}),define(ne[2572],re([1,0,39,899,40,28]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EmmetEditorAction=void 0;class k{constructor(w){Object.keys(k._grammars).length||this.fillModeScopeMap(w)}fillModeScopeMap(w){w.forEach(v=>{v.value.forEach(C=>{C.language&&C.scopeName&&(k._grammars[C.language]=C.scopeName)})})}getGrammar(w){return k._grammars[w]}}k._grammars={};class D extends t.EditorAction{constructor(w){super(w);this._lastGrammarContributions=null,this._lastExtensionService=null,this.emmetActionName=w.actionName}_withGrammarContributions(w){return this._lastExtensionService!==w&&(this._lastExtensionService=w,this._lastGrammarContributions=w.readExtensionPointContributions(f.grammarsExtPoint).then(v=>new k(v))),this._lastGrammarContributions||Promise.resolve(null)}run(w,v){const C=w.get(_.IExtensionService),o=w.get(A.ICommandService);return this._withGrammarContributions(C).then(c=>{if(this.id==="editor.emmet.action.expandAbbreviation"&&c)return o.executeCommand("emmet.expandAbbreviation",D.getLanguage(v,c))})}static getLanguage(w,v){const C=w.getModel(),o=w.getSelection();if(!C||!o)return null;const c=o.getStartPosition();C.tokenizeIfCheap(c.lineNumber);const S=C.getLanguageIdAtPosition(c.lineNumber,c.column).split(".").pop();return S?{language:S,parentMode:(()=>{let l=v.getGrammar(S);if(!l)return S;let r=l.split(".");if(r.length<2)return S;for(let p=1;p<r.length;p++){const u=r[r.length-p];if(this.emmetSupportedModes.indexOf(u)!==-1)return u}return S})()}:null}}e.EmmetEditorAction=D,D.emmetSupportedModes=["html","css","xml","xsl","haml","jade","jsx","slim","scss","sass","less","stylus","styl","svg"]}),define(ne[2573],re([1,0,1534,2572,39,58,7,16]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class I extends f.EmmetEditorAction{constructor(){super({id:"editor.emmet.action.expandAbbreviation",label:t.localize(0,null),alias:"Emmet: Expand Abbreviation",precondition:A.EditorContextKeys.writable,actionName:"expand_abbreviation",kbOpts:{primary:2,kbExpr:k.ContextKeyExpr.and(A.EditorContextKeys.editorTextFocus,A.EditorContextKeys.tabDoesNotMoveFocus,k.ContextKeyExpr.has("config.emmet.triggerExpansionOnTab")),weight:100},menuOpts:{menuId:D.MenuId.MenubarEditMenu,group:"5_insert",title:t.localize(1,null),order:3}})}}(0,_.registerEditorAction)(I)}),define(ne[2574],re([1,0,2573]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),define(ne[900],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ThemeRule=e.findMatchingThemeRule=void 0;function t(A,k,D=!0){for(let I=k.length-1;I>=0;I--){let w=k.slice(0,I),v=k[I],C=f(A,v,w,D);if(C)return C}return null}e.findMatchingThemeRule=t;function f(A,k,D,I){let w=null;for(let v=A.tokenColors.length-1;v>=0;v--){let C=A.tokenColors[v];if(I&&!C.settings.foreground)continue;let o;if(typeof C.scope=="string")o=C.scope.split(/,/).map(c=>c.trim());else if(Array.isArray(C.scope))o=C.scope;else continue;for(let c=0,i=o.length;c<i;c++){let S=o[c],s=new _(S,C.settings);s.matches(k,D)&&s.isMoreSpecific(w)&&(w=s)}}return w}class _{constructor(k,D){this.rawSelector=k,this.settings=D;let I=this.rawSelector.split(/ /);this.scope=I[I.length-1],this.parentScopes=I.slice(0,I.length-1)}matches(k,D){return _._matches(this.scope,this.parentScopes,k,D)}static _cmp(k,D){if(k===null&&D===null)return 0;if(k===null)return-1;if(D===null)return 1;if(k.scope.length!==D.scope.length)return k.scope.length-D.scope.length;const I=k.parentScopes.length,w=D.parentScopes.length;if(I!==w)return I-w;for(let v=0;v<I;v++){const C=k.parentScopes[v].length,o=D.parentScopes[v].length;if(C!==o)return C-o}return 0}isMoreSpecific(k){return _._cmp(this,k)>0}static _matchesOne(k,D){let I=k+".";return k===D||D.substring(0,I.length)===I}static _matches(k,D,I,w){if(!this._matchesOne(k,I))return!1;let v=D.length-1,C=w.length-1;for(;v>=0&&C>=0;)this._matchesOne(D[v],w[C])&&v--,C--;return v===-1}}e.ThemeRule=_}),define(ne[2575],re([1,0,19,2]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TMScopeRegistry=void 0;class _ extends f.Disposable{constructor(){super();this._scopeNameToLanguageRegistration=Object.create(null)}reset(){this._scopeNameToLanguageRegistration=Object.create(null)}register(k){if(this._scopeNameToLanguageRegistration[k.scopeName]){const D=this._scopeNameToLanguageRegistration[k.scopeName];t.isEqual(D.location,k.location)||console.warn(`Overwriting grammar scope name to file mapping for scope ${k.scopeName}. Old grammar file: ${D.location.toString()}. New grammar file: ${k.location.toString()}`)}this._scopeNameToLanguageRegistration[k.scopeName]=k}getGrammarDefinition(k){return this._scopeNameToLanguageRegistration[k]||null}}e.TMScopeRegistry=_}),define(ne[2576],re([1,0,2,2575]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TMGrammarFactory=e.missingTMGrammarErrorMessage=void 0,e.missingTMGrammarErrorMessage="No TM Grammar registered for this language.";class _ extends t.Disposable{constructor(k,D,I,w){super();this._host=k,this._initialState=I.INITIAL,this._scopeRegistry=this._register(new f.TMScopeRegistry),this._injections={},this._injectedEmbeddedLanguages={},this._languageToScope=new Map,this._grammarRegistry=this._register(new I.Registry({onigLib:w,loadGrammar:async v=>{const C=this._scopeRegistry.getGrammarDefinition(v);if(!C)return this._host.logTrace(`No grammar found for scope ${v}`),null;const o=C.location;try{const c=await this._host.readFile(o);return I.parseRawGrammar(c,o.path)}catch(c){return this._host.logError(`Unable to load and parse grammar for scope ${v} from ${o}`,c),null}},getInjections:v=>{const C=v.split(".");let o=[];for(let c=1;c<=C.length;c++){const i=C.slice(0,c).join(".");o=[...o,...this._injections[i]||[]]}return o}}));for(const v of D){if(this._scopeRegistry.register(v),v.injectTo){for(let C of v.injectTo){let o=this._injections[C];o||(this._injections[C]=o=[]),o.push(v.scopeName)}if(v.embeddedLanguages)for(let C of v.injectTo){let o=this._injectedEmbeddedLanguages[C];o||(this._injectedEmbeddedLanguages[C]=o=[]),o.push(v.embeddedLanguages)}}v.language&&this._languageToScope.set(v.language,v.scopeName)}}has(k){return this._languageToScope.has(k)}setTheme(k,D){this._grammarRegistry.setTheme(k,D)}getColorMap(){return this._grammarRegistry.getColorMap()}async createGrammar(k,D){const I=this._languageToScope.get(k);if(typeof I!="string")throw new Error(e.missingTMGrammarErrorMessage);const w=this._scopeRegistry.getGrammarDefinition(I);if(!w)throw new Error(e.missingTMGrammarErrorMessage);let v=w.embeddedLanguages;if(this._injectedEmbeddedLanguages[I]){const c=this._injectedEmbeddedLanguages[I];for(const i of c)for(const S of Object.keys(i))v[S]=i[S]}const C=Object.keys(v).length>0;let o;try{o=await this._grammarRegistry.loadGrammarWithConfiguration(I,D,{embeddedLanguages:v,tokenTypes:w.tokenTypes})}catch(c){throw c.message&&c.message.startsWith("No grammar provided for")?new Error(e.missingTMGrammarErrorMessage):c}return{languageId:k,grammar:o,initialState:this._initialState,containsEmbeddedLanguages:C}}}e.TMGrammarFactory=_}),define(ne[2577],re([1,0,6,86,2]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TMTokenization=void 0;class A extends _.Disposable{constructor(D,I,w){super();this._onDidEncounterLanguage=this._register(new t.Emitter),this.onDidEncounterLanguage=this._onDidEncounterLanguage.event,this._grammar=D,this._initialState=I,this._containsEmbeddedLanguages=w,this._seenLanguages=[]}getInitialState(){return this._initialState}tokenize(D,I,w){throw new Error("Not supported!")}tokenizeEncoded(D,I,w){const v=this._grammar.tokenizeLine2(D,w,500);if(v.stoppedEarly)return console.warn(`Time limit reached when tokenizing line: ${D.substring(0,100)}`),new f.EncodedTokenizationResult(v.tokens,w);if(this._containsEmbeddedLanguages){let o=this._seenLanguages,c=v.tokens;for(let i=0,S=c.length>>>1;i<S;i++){let s=c[(i<<1)+1],l=f.TokenMetadata.getLanguageId(s);o[l]||(o[l]=!0,this._onDidEncounterLanguage.fire(l))}}let C;return w.equals(v.ruleStack)?C=w:C=v.ruleStack,new f.EncodedTokenizationResult(v.tokens,C)}}e.TMTokenization=A}),define(ne[430],re([1,0,206,60]),function(Q,e,t,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SUPPORTED_ENCODINGS=e.detectEncodingFromBuffer=e.toCanonicalName=e.detectEncodingByBOMFromBuffer=e.toNodeEncoding=e.encodingExists=e.toEncodeReadable=e.toDecodeStream=e.DecodeStreamError=e.DecodeStreamErrorKind=e.UTF8_BOM=e.UTF16le_BOM=e.UTF16be_BOM=e.isUTFEncoding=e.UTF16le=e.UTF16be=e.UTF8_with_bom=e.UTF8=void 0,e.UTF8="utf8",e.UTF8_with_bom="utf8bom",e.UTF16be="utf16be",e.UTF16le="utf16le";function _(g){return[e.UTF8,e.UTF8_with_bom,e.UTF16be,e.UTF16le].some(d=>d===g)}e.isUTFEncoding=_,e.UTF16be_BOM=[254,255],e.UTF16le_BOM=[255,254],e.UTF8_BOM=[239,187,191];const A=512,k=512,D=512*8,I=512*128;var w;(function(g){g[g.STREAM_IS_BINARY=1]="STREAM_IS_BINARY"})(w=e.DecodeStreamErrorKind||(e.DecodeStreamErrorKind={}));class v extends Error{constructor(d,m){super(d);this.decodeStreamErrorKind=m}}e.DecodeStreamError=v;class C{constructor(d){this.iconvLiteDecoder=d}static async create(d){let m;if(d!==e.UTF8)m=(await new Promise((E,y)=>{Q(["@vscode/iconv-lite-umd"],E,y)})).getDecoder(S(d));else{const b=new TextDecoder;m={write(E){return b.decode(E,{stream:!0})},end(){return b.decode()}}}return new C(m)}write(d){return this.iconvLiteDecoder.write(d)}end(){return this.iconvLiteDecoder.end()}}function o(g,d){const m=d.minBytesRequiredForDetection??d.guessEncoding?D:k;return new Promise((b,E)=>{const y=(0,t.newWriteableStream)(L=>L.join("")),T=[];let R=0,O,x;const F=async()=>{try{const L=await h({buffer:f.VSBuffer.concat(T),bytesRead:R},d.guessEncoding);if(L.seemsBinary&&d.acceptTextOnly)throw new v("Stream is binary but only text is accepted for decoding",1);L.encoding=await d.overwriteEncoding(L.encoding),O=await C.create(L.encoding);const M=O.write(f.VSBuffer.concat(T).buffer);y.write(M),T.length=0,R=0,b({stream:y,detected:L})}catch(L){x?.dispose(),y.destroy(),E(L)}};x=(0,t.listenStream)(g,{onData:async L=>{O?y.write(O.write(L.buffer)):(T.push(L),R+=L.byteLength,R>=m&&(g.pause(),await F(),setTimeout(()=>g.resume())))},onError:L=>y.error(L),onEnd:async()=>{O||await F(),y.end(O?.end())}})})}e.toDecodeStream=o;async function c(g,d,m){const E=(await new Promise((R,O)=>{Q(["@vscode/iconv-lite-umd"],R,O)})).getEncoder(S(d),m);let y=!1,T=!1;return{read(){if(T)return null;const R=g.read();if(typeof R!="string"){if(T=!0,!y&&m?.addBOM)switch(d){case e.UTF8:case e.UTF8_with_bom:return f.VSBuffer.wrap(Uint8Array.from(e.UTF8_BOM));case e.UTF16be:return f.VSBuffer.wrap(Uint8Array.from(e.UTF16be_BOM));case e.UTF16le:return f.VSBuffer.wrap(Uint8Array.from(e.UTF16le_BOM))}const O=E.end();return O&&O.length>0?(y=!0,f.VSBuffer.wrap(O)):null}return y=!0,f.VSBuffer.wrap(E.write(R))}}}e.toEncodeReadable=c;async function i(g){return(await new Promise((m,b)=>{Q(["@vscode/iconv-lite-umd"],m,b)})).encodingExists(S(g))}e.encodingExists=i;function S(g){return g===e.UTF8_with_bom||g===null?e.UTF8:g}e.toNodeEncoding=S;function s(g,d){if(!g||d<e.UTF16be_BOM.length)return null;const m=g.readUInt8(0),b=g.readUInt8(1);if(m===e.UTF16be_BOM[0]&&b===e.UTF16be_BOM[1])return e.UTF16be;if(m===e.UTF16le_BOM[0]&&b===e.UTF16le_BOM[1])return e.UTF16le;if(d<e.UTF8_BOM.length)return null;const E=g.readUInt8(2);return m===e.UTF8_BOM[0]&&b===e.UTF8_BOM[1]&&E===e.UTF8_BOM[2]?e.UTF8_with_bom:null}e.detectEncodingByBOMFromBuffer=s;const l=["ascii","utf-16","utf-32"];async function r(g){const d=await new Promise((T,R)=>{Q(["jschardet"],T,R)}),m=g.slice(0,I),b=a(m.buffer),E=d.detect(b);if(!E||!E.encoding)return null;const y=E.encoding.toLowerCase();return 0<=l.indexOf(y)?null:u(E.encoding)}const p={ibm866:"cp866",big5:"cp950"};function u(g){const d=g.replace(/[^a-zA-Z0-9]/g,"").toLowerCase();return p[d]||d}function a(g){let d="";for(let m=0;m<g.length;m++)d+=String.fromCharCode(g[m]);return d}function n(g){switch(g){case"shiftjis":return"shift-jis";case"utf16le":return"utf-16le";case"utf16be":return"utf-16be";case"big5hkscs":return"big5-hkscs";case"eucjp":return"euc-jp";case"euckr":return"euc-kr";case"koi8r":return"koi8-r";case"koi8u":return"koi8-u";case"macroman":return"x-mac-roman";case"utf8bom":return"utf8";default:{const d=g.match(/windows(\d+)/);return d?"windows-"+d[1]:g}}}e.toCanonicalName=n;function h({buffer:g,bytesRead:d},m){let b=s(g,d),E=!1;if(b!==e.UTF16be&&b!==e.UTF16le&&g){let y=!0,T=!0,R=!1;for(let O=0;O<d&&O<A;O++){const x=O%2==1,F=g.readUInt8(O)===0;if(F&&(R=!0),y&&(x&&!F||!x&&F)&&(y=!1),T&&(x&&F||!x&&!F)&&(T=!1),F&&!y&&!T)break}R&&(y?b=e.UTF16le:T?b=e.UTF16be:E=!0)}return m&&!E&&!b&&g?r(g.slice(0,d)).then(y=>({seemsBinary:!1,encoding:y})):{seemsBinary:E,encoding:b}}e.detectEncodingFromBuffer=h,e.SUPPORTED_ENCODINGS={utf8:{labelLong:"UTF-8",labelShort:"UTF-8",order:1,alias:"utf8bom"},utf8bom:{labelLong:"UTF-8 with BOM",labelShort:"UTF-8 with BOM",encodeOnly:!0,order:2,alias:"utf8"},utf16le:{labelLong:"UTF-16 LE",labelShort:"UTF-16 LE",order:3},utf16be:{labelLong:"UTF-16 BE",labelShort:"UTF-16 BE",order:4},windows1252:{labelLong:"Western (Windows 1252)",labelShort:"Windows 1252",order:5},iso88591:{labelLong:"Western (ISO 8859-1)",labelShort:"ISO 8859-1",order:6},iso88593:{labelLong:"Western (ISO 8859-3)",labelShort:"ISO 8859-3",order:7},iso885915:{labelLong:"Western (ISO 8859-15)",labelShort:"ISO 8859-15",order:8},macroman:{labelLong:"Western (Mac Roman)",labelShort:"Mac Roman",order:9},cp437:{labelLong:"DOS (CP 437)",labelShort:"CP437",order:10},windows1256:{labelLong:"Arabic (Windows 1256)",labelShort:"Windows 1256",order:11},iso88596:{labelLong:"Arabic (ISO 8859-6)",labelShort:"ISO 8859-6",order:12},windows1257:{labelLong:"Baltic (Windows 1257)",labelShort:"Windows 1257",order:13},iso88594:{labelLong:"Baltic (ISO 8859-4)",labelShort:"ISO 8859-4",order:14},iso885914:{labelLong:"Celtic (ISO 8859-14)",labelShort:"ISO 8859-14",order:15},windows1250:{labelLong:"Central European (Windows 1250)",labelShort:"Windows 1250",order:16},iso88592:{labelLong:"Central European (ISO 8859-2)",labelShort:"ISO 8859-2",order:17},cp852:{labelLong:"Central European (CP 852)",labelShort:"CP 852",order:18},windows1251:{labelLong:"Cyrillic (Windows 1251)",labelShort:"Windows 1251",order:19},cp866:{labelLong:"Cyrillic (CP 866)",labelShort:"CP 866",order:20},iso88595:{labelLong:"Cyrillic (ISO 8859-5)",labelShort:"ISO 8859-5",order:21},koi8r:{labelLong:"Cyrillic (KOI8-R)",labelShort:"KOI8-R",order:22},koi8u:{labelLong:"Cyrillic (KOI8-U)",labelShort:"KOI8-U",order:23},iso885913:{labelLong:"Estonian (ISO 8859-13)",labelShort:"ISO 8859-13",order:24},windows1253:{labelLong:"Greek (Windows 1253)",labelShort:"Windows 1253",order:25},iso88597:{labelLong:"Greek (ISO 8859-7)",labelShort:"ISO 8859-7",order:26},windows1255:{labelLong:"Hebrew (Windows 1255)",labelShort:"Windows 1255",order:27},iso88598:{labelLong:"Hebrew (ISO 8859-8)",labelShort:"ISO 8859-8",order:28},iso885910:{labelLong:"Nordic (ISO 8859-10)",labelShort:"ISO 8859-10",order:29},iso885916:{labelLong:"Romanian (ISO 8859-16)",labelShort:"ISO 8859-16",order:30},windows1254:{labelLong:"Turkish (Windows 1254)",labelShort:"Windows 1254",order:31},iso88599:{labelLong:"Turkish (ISO 8859-9)",labelShort:"ISO 8859-9",order:32},windows1258:{labelLong:"Vietnamese (Windows 1258)",labelShort:"Windows 1258",order:33},gbk:{labelLong:"Simplified Chinese (GBK)",labelShort:"GBK",order:34},gb18030:{labelLong:"Simplified Chinese (GB18030)",labelShort:"GB18030",order:35},cp950:{labelLong:"Traditional Chinese (Big5)",labelShort:"Big5",order:36},big5hkscs:{labelLong:"Traditional Chinese (Big5-HKSCS)",labelShort:"Big5-HKSCS",order:37},shiftjis:{labelLong:"Japanese (Shift JIS)",labelShort:"Shift JIS",order:38},eucjp:{labelLong:"Japanese (EUC-JP)",labelShort:"EUC-JP",order:39},euckr:{labelLong:"Korean (EUC-KR)",labelShort:"EUC-KR",order:40},windows874:{labelLong:"Thai (Windows 874)",labelShort:"Windows 874",order:41},iso885911:{labelLong:"Latin/Thai (ISO 8859-11)",labelShort:"ISO 8859-11",order:42},koi8ru:{labelLong:"Cyrillic (KOI8-RU)",labelShort:"KOI8-RU",order:43},koi8t:{labelLong:"Tajik (KOI8-T)",labelShort:"KOI8-T",order:44},gb2312:{labelLong:"Simplified Chinese (GB 2312)",labelShort:"GB 2312",order:45},cp865:{labelLong:"Nordic DOS (CP 865)",labelShort:"CP 865",order:46},cp850:{labelLong:"Western European DOS (CP 850)",labelShort:"CP 850",order:47}}}),define(ne[2578],re([1,0,1903,11,30,31,67,2,15]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextFileSaveParticipant=void 0;let w=class extends D.Disposable{constructor(C,o){super();this.progressService=C,this.logService=o,this.saveParticipants=[]}addSaveParticipant(C){const o=(0,I.insert)(this.saveParticipants,C);return(0,D.toDisposable)(()=>o())}participate(C,o,c){const i=new _.CancellationTokenSource(c);return this.progressService.withProgress({title:(0,t.localize)(0,null,C.name),location:15,cancellable:!0,delay:C.isDirty()?3e3:5e3},async S=>{C.textEditorModel?.pushStackElement();for(const s of this.saveParticipants){if(i.token.isCancellationRequested||!C.textEditorModel)break;try{const l=s.participate(C,o,S,i.token);await(0,f.raceCancellation)(l,i.token)}catch(l){this.logService.warn(l)}}C.textEditorModel?.pushStackElement()},()=>{i.dispose(!0)})}dispose(){this.saveParticipants.splice(0,this.saveParticipants.length)}};w=Ee([W(0,k.IProgressService),W(1,A.ILogService)],w),e.TextFileSaveParticipant=w}),define(ne[83],re([1,0,23,5,60,13]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toBufferOrReadable=e.stringToSnapshot=e.snapshotToString=e.isTextFileEditorModel=e.EncodingMode=e.TextFileResolveReason=e.TextFileEditorModelState=e.TextFileOperationError=e.TextFileOperationResult=e.ITextFileService=void 0,e.ITextFileService=(0,f.createDecorator)("textFileService");var k;(function(S){S[S.FILE_IS_BINARY=0]="FILE_IS_BINARY"})(k=e.TextFileOperationResult||(e.TextFileOperationResult={}));class D extends t.FileOperationError{constructor(s,l,r){super(s,11);this.textFileOperationResult=l,this.options=r}static isTextFileOperationError(s){return s instanceof Error&&!(0,A.isUndefinedOrNull)(s.textFileOperationResult)}}e.TextFileOperationError=D;var I;(function(S){S[S.SAVED=0]="SAVED",S[S.DIRTY=1]="DIRTY",S[S.PENDING_SAVE=2]="PENDING_SAVE",S[S.CONFLICT=3]="CONFLICT",S[S.ORPHAN=4]="ORPHAN",S[S.ERROR=5]="ERROR"})(I=e.TextFileEditorModelState||(e.TextFileEditorModelState={}));var w;(function(S){S[S.EDITOR=1]="EDITOR",S[S.REFERENCE=2]="REFERENCE",S[S.OTHER=3]="OTHER"})(w=e.TextFileResolveReason||(e.TextFileResolveReason={}));var v;(function(S){S[S.Encode=0]="Encode",S[S.Decode=1]="Decode"})(v=e.EncodingMode||(e.EncodingMode={}));function C(S){const s=S;return(0,A.areFunctions)(s.setEncoding,s.getEncoding,s.save,s.revert,s.isDirty,s.getLanguageId)}e.isTextFileEditorModel=C;function o(S){const s=[];let l;for(;typeof(l=S.read())=="string";)s.push(l);return s.join("")}e.snapshotToString=o;function c(S){let s=!1;return{read(){return s?null:(s=!0,S)}}}e.stringToSnapshot=c;function i(S){if(typeof S!="undefined")return typeof S=="string"?_.VSBuffer.fromString(S):{read:()=>{const s=S.read();return typeof s=="string"?_.VSBuffer.fromString(s):null}}}e.toBufferOrReadable=i}),define(ne[2579],re([1,0,122,1360,5,75,83,65,11]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SaveParticipant=void 0;class w{constructor(o){this._proxy=o.getProxy(D.ExtHostContext.ExtHostDocumentSaveParticipant)}async participate(o,c,i,S){if(!o.textEditorModel||!(0,t.shouldSynchronizeModel)(o.textEditorModel))return;const s=new Promise((l,r)=>{setTimeout(()=>r(new Error((0,f.localize)(0,null))),1750),this._proxy.$participateInSave(o.resource,c.reason).then(p=>{if(!p.every(u=>u))return Promise.reject(new Error("listener failed"))}).then(l,r)});return(0,I.raceCancellationError)(s,S)}}let v=class{constructor(o,c,i){this._textFileService=i,this._saveParticipantDisposable=this._textFileService.files.addSaveParticipant(c.createInstance(w,o))}dispose(){this._saveParticipantDisposable.dispose()}};v=Ee([A.extHostCustomer,W(1,_.IInstantiationService),W(2,k.ITextFileService)],v),e.SaveParticipant=v}),define(ne[178],re([1,0,9,19,234,42,34,8,52,83,252,18,23,12,6,45,198,2,5,111]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceLabel=e.ResourceLabels=e.DEFAULT_LABELS_CONTAINER=void 0;function u(d){if(!(!d||!d.resource))return t.URI.isUri(d.resource)?d.resource:d.resource.primary}e.DEFAULT_LABELS_CONTAINER={onDidChangeVisibility:i.Event.None};let a=class extends l.Disposable{constructor(m,b,E,y,T,R,O,x,F){super();this.instantiationService=b,this.configurationService=E,this.modelService=y,this.languageService=T,this.decorationsService=R,this.themeService=O,this.labelService=x,this.textFileService=F,this._onDidChangeDecorations=this._register(new i.Emitter),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this.widgets=[],this.labels=[],this.registerListeners(m)}registerListeners(m){this._register(m.onDidChangeVisibility(b=>{this.widgets.forEach(E=>E.notifyVisibilityChanged(b))})),this._register(this.languageService.onDidChange(()=>this.widgets.forEach(b=>b.notifyExtensionsRegistered()))),this._register(this.modelService.onModelLanguageChanged(b=>{!b.model.uri||this.widgets.forEach(E=>E.notifyModelLanguageChanged(b.model))})),this._register(this.modelService.onModelAdded(b=>{!b.uri||this.widgets.forEach(E=>E.notifyModelAdded(b))})),this._register(this.decorationsService.onDidChangeDecorations(b=>{let E=!1;this.widgets.forEach(y=>{y.notifyFileDecorationsChanges(b)&&(E=!0)}),E&&this._onDidChangeDecorations.fire()})),this._register(this.themeService.onDidColorThemeChange(()=>this.widgets.forEach(b=>b.notifyThemeChange()))),this._register(this.configurationService.onDidChangeConfiguration(b=>{b.affectsConfiguration(o.FILES_ASSOCIATIONS_CONFIG)&&this.widgets.forEach(E=>E.notifyFileAssociationsChange())})),this._register(this.labelService.onDidChangeFormatters(b=>{this.widgets.forEach(E=>E.notifyFormattersChange(b.scheme))})),this._register(this.textFileService.untitled.onDidChangeLabel(b=>{this.widgets.forEach(E=>E.notifyUntitledLabelChange(b.resource))}))}get(m){return this.labels[m]}create(m,b){const E=this.instantiationService.createInstance(g,m,b),y={element:E.element,onDidRender:E.onDidRender,setLabel:(T,R,O)=>E.setLabel(T,R,O),setResource:(T,R)=>E.setResource(T,R),setFile:(T,R)=>E.setFile(T,R),clear:()=>E.clear(),dispose:()=>this.disposeWidget(E)};return this.labels.push(y),this.widgets.push(E),y}disposeWidget(m){const b=this.widgets.indexOf(m);b>-1&&(this.widgets.splice(b,1),this.labels.splice(b,1)),(0,l.dispose)(m)}clear(){this.widgets=(0,l.dispose)(this.widgets),this.labels=[]}dispose(){super.dispose(),this.clear()}};a=Ee([W(1,r.IInstantiationService),W(2,D.IConfigurationService),W(3,I.IModelService),W(4,A.ILanguageService),W(5,v.IDecorationsService),W(6,c.IThemeService),W(7,S.ILabelService),W(8,w.ITextFileService)],a),e.ResourceLabels=a;let n=class extends a{constructor(m,b,E,y,T,R,O,x,F,L){super(e.DEFAULT_LABELS_CONTAINER,E,y,T,R,O,x,F,L);this.label=this._register(this.create(m,b))}get element(){return this.label}};n=Ee([W(2,r.IInstantiationService),W(3,D.IConfigurationService),W(4,I.IModelService),W(5,A.ILanguageService),W(6,v.IDecorationsService),W(7,c.IThemeService),W(8,S.ILabelService),W(9,w.ITextFileService)],n),e.ResourceLabel=n;var h;(function(d){d[d.Basic=1]="Basic",d[d.Full=2]="Full"})(h||(h={}));let g=class extends _.IconLabel{constructor(m,b,E,y,T,R,O,x){super(m,b);this.languageService=E,this.modelService=y,this.decorationsService=T,this.labelService=R,this.textFileService=O,this.contextService=x,this._onDidRender=this._register(new i.Emitter),this.onDidRender=this._onDidRender.event,this.decoration=this._register(new l.MutableDisposable),this.isHidden=!1}notifyVisibilityChanged(m){m===this.isHidden&&(this.isHidden=!m,m&&this.needsRedraw&&(this.render({updateIcon:this.needsRedraw===h.Full,updateDecoration:this.needsRedraw===h.Full}),this.needsRedraw=void 0))}notifyModelLanguageChanged(m){this.handleModelEvent(m)}notifyModelAdded(m){this.handleModelEvent(m)}handleModelEvent(m){const b=u(this.label);!b||(0,f.isEqual)(m.uri,b)&&this.lastKnownDetectedLanguageId!==m.getLanguageId()&&(this.lastKnownDetectedLanguageId=m.getLanguageId(),this.render({updateIcon:!0,updateDecoration:!1}))}notifyFileDecorationsChanges(m){if(!this.options)return!1;const b=u(this.label);return b&&this.options.fileDecorations&&m.affectsResource(b)?this.render({updateIcon:!1,updateDecoration:!0}):!1}notifyExtensionsRegistered(){this.render({updateIcon:!0,updateDecoration:!1})}notifyThemeChange(){this.render({updateIcon:!1,updateDecoration:!1})}notifyFileAssociationsChange(){this.render({updateIcon:!0,updateDecoration:!1})}notifyFormattersChange(m){u(this.label)?.scheme===m&&this.render({updateIcon:!1,updateDecoration:!1})}notifyUntitledLabelChange(m){(0,f.isEqual)(m,u(this.label))&&this.render({updateIcon:!1,updateDecoration:!1})}setFile(m,b){const E=b?.hideLabel;let y;if(!E){if(b?.fileKind===o.FileKind.ROOT_FOLDER){const R=this.contextService.getWorkspaceFolder(m);R&&(y=R.name)}y||(y=(0,p.normalizeDriveLetter)((0,f.basenameOrAuthority)(m)))}let T;b?.hidePath||(T=this.labelService.getUriLabel((0,f.dirname)(m),{relative:!0})),this.setResource({resource:m,name:y,description:T},b)}setResource(m,b=Object.create(null)){const E=u(m),y=m?.resource&&!t.URI.isUri(m.resource);if(!b.forceLabel&&!y&&E?.scheme===C.Schemas.untitled){const x=this.textFileService.untitled.get(E);if(x&&!x.hasAssociatedFilePath){if(typeof m.name=="string"&&(m.name=x.name),typeof m.description=="string"){let L=x.resource.path;m.name!==L?m.description=L:m.description=void 0}let F=x.resource.path;x.name!==F?b.title=`${x.name} \u2022 ${F}`:b.title=F}}const T=this.hasResourceChanged(m),R=T||this.hasPathLabelChanged(m),O=this.hasFileKindChanged(b);this.label=m,this.options=b,R&&(this.computedPathLabel=void 0),this.render({updateIcon:T||O,updateDecoration:T||O})}hasFileKindChanged(m){const b=m?.fileKind,E=this.options?.fileKind;return b!==E}hasResourceChanged(m){const b=u(m),E=u(this.label);return b&&E?b.toString()!==E.toString():!(!b&&!E)}hasPathLabelChanged(m){const b=u(m);return!!b&&this.computedPathLabel!==this.labelService.getUriLabel(b)}clear(){this.label=void 0,this.options=void 0,this.lastKnownDetectedLanguageId=void 0,this.computedIconClasses=void 0,this.computedPathLabel=void 0,this.setLabel("")}render(m){if(this.isHidden)return this.needsRedraw!==h.Full&&(this.needsRedraw=m.updateIcon||m.updateDecoration?h.Full:h.Basic),!1;if(m.updateIcon&&(this.computedIconClasses=void 0),!this.label)return!1;const b={title:"",italic:this.options?.italic,strikethrough:this.options?.strikethrough,matches:this.options?.matches,descriptionMatches:this.options?.descriptionMatches,extraClasses:[],separator:this.options?.separator,domId:this.options?.domId},E=u(this.label),y=this.label.name;if(this.options?.title!==void 0&&(b.title=this.options.title),E&&E.scheme!==C.Schemas.data&&(!this.options?.title||typeof this.options.title!="string"&&!this.options.title.markdownNotSupportedFallback)&&(this.computedPathLabel||(this.computedPathLabel=this.labelService.getUriLabel(E)),!b.title||typeof b.title=="string"?b.title=this.computedPathLabel:b.title.markdownNotSupportedFallback||(b.title.markdownNotSupportedFallback=this.computedPathLabel)),this.options&&!this.options.hideIcon&&(this.computedIconClasses||(this.computedIconClasses=(0,s.getIconClasses)(this.modelService,this.languageService,E,this.options.fileKind)),b.extraClasses=this.computedIconClasses.slice(0)),this.options?.extraClasses&&b.extraClasses.push(...this.options.extraClasses),this.options?.fileDecorations&&E){m.updateDecoration&&(this.decoration.value=this.decorationsService.getDecoration(E,this.options.fileKind!==o.FileKind.FILE));const T=this.decoration.value;T&&(T.tooltip&&typeof b.title=="string"&&(b.title=`${b.title} \u2022 ${T.tooltip}`),T.strikethrough&&(b.strikethrough=!0),this.options.fileDecorations.colors&&b.extraClasses.push(T.labelClassName),this.options.fileDecorations.badges&&(b.extraClasses.push(T.badgeClassName),b.extraClasses.push(T.iconClassName)))}return this.setLabel(y||"",this.label.description,b),this._onDidRender.fire(),!0}dispose(){super.dispose(),this.label=void 0,this.options=void 0,this.lastKnownDetectedLanguageId=void 0,this.computedIconClasses=void 0,this.computedPathLabel=void 0}};g=Ee([W(2,A.ILanguageService),W(3,I.IModelService),W(4,v.IDecorationsService),W(5,S.ILabelService),W(6,w.ITextFileService),W(7,k.IWorkspaceContextService)],g)}),define(ne[2580],re([1,0,279,22,6,102,152,2,48,19,9,8,23,5,71,32,34,178,481,12,1394,21,113,673]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BreadcrumbsOutlinePicker=e.BreadcrumbsFilePicker=e.FileSorter=e.BreadcrumbsPicker=void 0;let h=class{constructor(M,N,B,P,V){this.resource=N,this._instantiationService=B,this._themeService=P,this._configurationService=V,this._disposables=new D.DisposableStore,this._fakeEvent=new UIEvent("fakeEvent"),this._onWillPickElement=new _.Emitter,this.onWillPickElement=this._onWillPickElement.event,this._previewDispoables=new D.MutableDisposable,this._domNode=document.createElement("div"),this._domNode.className="monaco-breadcrumbs-picker show-file-icons",M.appendChild(this._domNode)}dispose(){this._disposables.dispose(),this._previewDispoables.dispose(),this._onWillPickElement.dispose(),this._domNode.remove(),setTimeout(()=>this._tree.dispose(),0)}async show(M,N,B,P,V){const U=this._themeService.getColorTheme().getColor(S.breadcrumbsPickerBackground);this._arrow=document.createElement("div"),this._arrow.className="arrow",this._arrow.style.borderColor=`transparent transparent ${U?U.toString():""}`,this._domNode.appendChild(this._arrow),this._treeContainer=document.createElement("div"),this._treeContainer.style.background=U?U.toString():"",this._treeContainer.style.paddingTop="2px",this._treeContainer.style.boxShadow=`0 0 8px 2px ${this._themeService.getColorTheme().getColor(S.widgetShadow)}`,this._domNode.appendChild(this._treeContainer),this._layoutInfo={maxHeight:N,width:B,arrowSize:P,arrowOffset:V,inputHeight:0},this._tree=this._createTree(this._treeContainer,M),this._disposables.add(this._tree.onDidOpen(async H=>{const{element:K,editorOptions:G,sideBySide:q}=H;!!await this._revealElement(K,{...G,preserveFocus:!1},q)})),this._disposables.add(this._tree.onDidChangeFocus(H=>{this._previewDispoables.value=this._previewElement(H.elements[0])})),this._disposables.add(this._tree.onDidChangeContentHeight(()=>{this._layout()})),this._domNode.focus();try{await this._setInput(M),this._layout()}catch(H){(0,f.onUnexpectedError)(H)}}_layout(){const M=2*this._layoutInfo.arrowSize,N=Math.min(this._layoutInfo.maxHeight-M,this._tree.contentHeight),B=N+M;this._domNode.style.height=`${B}px`,this._domNode.style.width=`${this._layoutInfo.width}px`,this._arrow.style.top=`-${2*this._layoutInfo.arrowSize}px`,this._arrow.style.borderWidth=`${this._layoutInfo.arrowSize}px`,this._arrow.style.marginLeft=`${this._layoutInfo.arrowOffset}px`,this._treeContainer.style.height=`${N}px`,this._treeContainer.style.width=`${this._layoutInfo.width}px`,this._tree.layout(N,this._layoutInfo.width)}restoreViewState(){}};h=Ee([W(2,c.IInstantiationService),W(3,p.IThemeService),W(4,C.IConfigurationService)],h),e.BreadcrumbsPicker=h;class g{getHeight(M){return 22}getTemplateId(M){return"FileStat"}}class d{getId(M){return v.URI.isUri(M)?M.toString():(0,s.isWorkspace)(M)?M.id:(0,s.isWorkspaceFolder)(M)?M.uri.toString():M.resource.toString()}}let m=class{constructor(M){this._fileService=M}hasChildren(M){return v.URI.isUri(M)||(0,s.isWorkspace)(M)||(0,s.isWorkspaceFolder)(M)||M.isDirectory}async getChildren(M){if((0,s.isWorkspace)(M))return M.folders;let N;return(0,s.isWorkspaceFolder)(M)?N=M.uri:v.URI.isUri(M)?N=M:N=M.resource,(await this._fileService.resolve(N)).children??[]}};m=Ee([W(0,o.IFileService)],m);let b=class{constructor(M,N){this._labels=M,this._configService=N,this.templateId="FileStat"}renderTemplate(M){return this._labels.create(M,{supportHighlights:!0})}renderElement(M,N,B){const P=this._configService.getValue("explorer.decorations"),{element:V}=M;let z,U;(0,s.isWorkspaceFolder)(V)?(z=V.uri,U=o.FileKind.ROOT_FOLDER):(z=V.resource,U=V.isDirectory?o.FileKind.FOLDER:o.FileKind.FILE),B.setFile(z,{fileKind:U,hidePath:!0,fileDecorations:P,matches:(0,A.createMatches)(M.filterData),extraClasses:["picker-item"]})}disposeTemplate(M){M.dispose()}};b=Ee([W(1,C.IConfigurationService)],b);class E{getKeyboardNavigationLabel(M){return M.name}}class y{getWidgetAriaLabel(){return(0,u.localize)(0,null)}getAriaLabel(M){return M.name}}let T=class{constructor(M,N){this._workspaceService=M,this._cachedExpressions=new Map,this._disposables=new D.DisposableStore;const B=r.BreadcrumbsConfig.FileExcludes.bindTo(N),P=()=>{M.getWorkspace().folders.forEach(V=>{const z=B.getValue({resource:V.uri});if(!z)return;const U={};for(const H in z){if(typeof z[H]!="boolean")continue;let K=H.indexOf("**/")!==0?I.posix.join(V.uri.path,H):H;U[K]=z[H]}this._cachedExpressions.set(V.uri.toString(),k.parse(U))})};P(),this._disposables.add(B),this._disposables.add(B.onDidChange(P)),this._disposables.add(M.onDidChangeWorkspaceFolders(P))}dispose(){this._disposables.dispose()}filter(M,N){if((0,s.isWorkspaceFolder)(M))return!0;const B=this._workspaceService.getWorkspaceFolder(M.resource);return!B||!this._cachedExpressions.has(B.uri.toString())?!0:!this._cachedExpressions.get(B.uri.toString())((0,I.relative)(B.uri.path,M.resource.path),(0,w.basename)(M.resource))}};T=Ee([W(0,s.IWorkspaceContextService),W(1,C.IConfigurationService)],T);class R{compare(M,N){return(0,s.isWorkspaceFolder)(M)&&(0,s.isWorkspaceFolder)(N)?M.index-N.index:M.isDirectory===N.isDirectory?(0,t.compareFileNames)(M.name,N.name):M.isDirectory?-1:1}}e.FileSorter=R;let O=class extends h{constructor(M,N,B,P,V,z,U){super(M,N,B,P,V);this._workspaceService=z,this._editorService=U}_createTree(M){this._treeContainer.classList.add("file-icon-themable-tree"),this._treeContainer.classList.add("show-file-icons");const N=P=>{this._treeContainer.classList.toggle("align-icons-and-twisties",P.hasFileIcons&&!P.hasFolderIcons),this._treeContainer.classList.toggle("hide-arrows",P.hidesExplorerArrows===!0)};this._disposables.add(this._themeService.onDidFileIconThemeChange(N)),N(this._themeService.getFileIconTheme());const B=this._instantiationService.createInstance(l.ResourceLabels,l.DEFAULT_LABELS_CONTAINER);return this._disposables.add(B),this._instantiationService.createInstance(i.WorkbenchAsyncDataTree,"BreadcrumbsFilePicker",M,new g,[this._instantiationService.createInstance(b,B)],this._instantiationService.createInstance(m),{multipleSelectionSupport:!1,sorter:new R,filter:this._instantiationService.createInstance(T),identityProvider:new d,keyboardNavigationLabelProvider:new E,accessibilityProvider:this._instantiationService.createInstance(y),overrideStyles:{listBackground:S.breadcrumbsPickerBackground}})}async _setInput(M){const{uri:N,kind:B}=M;let P;B===o.FileKind.ROOT_FOLDER?P=this._workspaceService.getWorkspace():P=(0,w.dirname)(N);const V=this._tree;await V.setInput(P);let z;for(const{element:U}of V.getNode().children)if((0,s.isWorkspaceFolder)(U)&&(0,w.isEqual)(U.uri,N)){z=U;break}else if((0,w.isEqual)(U.resource,N)){z=U;break}z&&(V.reveal(z,.5),V.setFocus([z],this._fakeEvent)),V.domFocus()}_previewElement(M){return D.Disposable.None}async _revealElement(M,N,B){return!(0,s.isWorkspaceFolder)(M)&&M.isFile?(this._onWillPickElement.fire(),await this._editorService.openEditor({resource:M.resource,options:N},B?a.SIDE_GROUP:void 0),!0):!1}};O=Ee([W(2,c.IInstantiationService),W(3,p.IThemeService),W(4,C.IConfigurationService),W(5,s.IWorkspaceContextService),W(6,a.IEditorService)],O),e.BreadcrumbsFilePicker=O;let x=class{constructor(M,N,B){this.comparator=M,this._order=B.getValue(N,"breadcrumbs.symbolSortOrder")}compare(M,N){return this._order==="name"?this.comparator.compareByName(M,N):this._order==="type"?this.comparator.compareByType(M,N):this.comparator.compareByPosition(M,N)}};x=Ee([W(2,n.ITextResourceConfigurationService)],x);class F extends h{_createTree(M,N){const{config:B}=N.outline;return this._instantiationService.createInstance(i.WorkbenchDataTree,"BreadcrumbsOutlinePicker",M,B.delegate,B.renderers,B.treeDataSource,{...B.options,sorter:this._instantiationService.createInstance(x,B.comparator,void 0),collapseByDefault:!0,expandOnlyOnTwistieClick:!0,multipleSelectionSupport:!1})}_setInput(M){const N=M.outline.captureViewState();this.restoreViewState=()=>{N.dispose()};const B=this._tree;return B.setInput(M.outline),M.element!==M.outline&&(B.reveal(M.element,.5),B.setFocus([M.element],this._fakeEvent)),B.domFocus(),Promise.resolve()}_previewElement(M){return this._tree.getInput().preview(M)}async _revealElement(M,N,B){return this._onWillPickElement.fire(),await this._tree.getInput().reveal(M,N,B),!0}}e.BreadcrumbsOutlinePicker=F}),define(ne[901],re([1,0,10,137,994,15,11,2,19,9,1393,16,28,8,7,37,23,5,94,71,53,68,12,178,481,2473,2580,44,21,59,77,45,70,63,33,673]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BreadcrumbsControl=void 0;class L extends _.BreadcrumbsItem{constructor(z,U,H){super();this.model=z,this.element=U,this.options=H,this._disposables=new D.DisposableStore}dispose(){this._disposables.dispose()}equals(z){return z instanceof L?this.element.element===z.element.element&&this.options.showFileIcons===z.options.showFileIcons&&this.options.showSymbolIcons===z.options.showSymbolIcons:!1}render(z){const{element:U,outline:H}=this.element;if(U===H){const Z=t.$("span",void 0,"\u2026");z.appendChild(Z);return}const K=H.config.delegate.getTemplateId(U),G=H.config.renderers.find(Z=>Z.templateId===K);if(!G){z.innerText="<<NO RENDERER>>";return}const q=G.renderTemplate(z);G.renderElement({element:U,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:0,collapsible:!1,collapsed:!1,visible:!0,filterData:void 0},0,q,void 0),this._disposables.add((0,D.toDisposable)(()=>{G.disposeTemplate(q)}))}}let M=class da extends _.BreadcrumbsItem{constructor(z,U,H,K){super();this.model=z,this.element=U,this.options=H,this._instantiationService=K,this._disposables=new D.DisposableStore}dispose(){this._disposables.dispose()}equals(z){return z instanceof da?I.extUri.isEqual(this.element.uri,z.element.uri)&&this.options.showFileIcons===z.options.showFileIcons&&this.options.showSymbolIcons===z.options.showSymbolIcons:!1}render(z){let U=this._instantiationService.createInstance(h.ResourceLabel,z,{});U.element.setFile(this.element.uri,{hidePath:!0,hideIcon:this.element.kind===s.FileKind.FOLDER||!this.options.showFileIcons,fileKind:this.element.kind,fileDecorations:{colors:this.options.showDecorationColors,badges:!1}}),z.classList.add(s.FileKind[this.element.kind].toLowerCase()),this._disposables.add(U)}};M=Ee([W(3,l.IInstantiationService)],M);const N=(0,x.registerIcon)("breadcrumb-separator",F.Codicon.chevronRight,(0,v.localize)(0,null));let B=class ui{constructor(z,U,H,K,G,q,Z,j,X,Y,$,J,ee){this._options=U,this._editorGroup=H,this._contextKeyService=K,this._contextViewService=G,this._instantiationService=q,this._themeService=Z,this._quickInputService=j,this._fileService=X,this._editorService=Y,this._labelService=$,this._disposables=new D.DisposableStore,this._breadcrumbsDisposables=new D.DisposableStore,this._breadcrumbsPickerShowing=!1,this.domNode=document.createElement("div"),this.domNode.classList.add("breadcrumbs-control"),t.append(z,this.domNode),this._cfUseQuickPick=g.BreadcrumbsConfig.UseQuickPick.bindTo(J),this._cfShowIcons=g.BreadcrumbsConfig.Icons.bindTo(J),this._cfTitleScrollbarSizing=g.BreadcrumbsConfig.TitleScrollbarSizing.bindTo(J);const te=this._cfTitleScrollbarSizing.getValue()??"default";this._widget=new _.BreadcrumbsWidget(this.domNode,ui.SCROLLBAR_SIZES[te],N),this._widget.onDidSelectItem(this._onSelectEvent,this,this._disposables),this._widget.onDidFocusItem(this._onFocusEvent,this,this._disposables),this._widget.onDidChangeFocus(this._updateCkBreadcrumbsActive,this,this._disposables),this._disposables.add((0,a.attachBreadcrumbsStyler)(this._widget,this._themeService,{breadcrumbsBackground:U.breadcrumbsBackground})),this._ckBreadcrumbsPossible=ui.CK_BreadcrumbsPossible.bindTo(this._contextKeyService),this._ckBreadcrumbsVisible=ui.CK_BreadcrumbsVisible.bindTo(this._contextKeyService),this._ckBreadcrumbsActive=ui.CK_BreadcrumbsActive.bindTo(this._contextKeyService),this._disposables.add(ee.register(this._editorGroup.id,this._widget)),this.hide()}dispose(){this._disposables.dispose(),this._breadcrumbsDisposables.dispose(),this._ckBreadcrumbsPossible.reset(),this._ckBreadcrumbsVisible.reset(),this._ckBreadcrumbsActive.reset(),this._cfUseQuickPick.dispose(),this._cfShowIcons.dispose(),this._widget.dispose(),this.domNode.remove()}layout(z){this._widget.layout(z)}isHidden(){return this.domNode.classList.contains("hidden")}hide(){this._breadcrumbsDisposables.clear(),this._ckBreadcrumbsVisible.set(!1),this.domNode.classList.toggle("hidden",!0)}update(){this._breadcrumbsDisposables.clear();const z=b.EditorResourceAccessor.getCanonicalUri(this._editorGroup.activeEditor,{supportSideBySide:b.SideBySideEditor.PRIMARY}),U=this.isHidden();if(!z||!this._fileService.hasProvider(z))return this._ckBreadcrumbsPossible.set(!1),U?!1:(this.hide(),!0);const H=b.EditorResourceAccessor.getOriginalUri(this._editorGroup.activeEditor,{supportSideBySide:b.SideBySideEditor.PRIMARY});this.domNode.classList.toggle("hidden",!1),this._ckBreadcrumbsVisible.set(!0),this._ckBreadcrumbsPossible.set(!0);const K=this._instantiationService.createInstance(d.BreadcrumbsModel,H??z,this._editorGroup.activeEditorPane);this.domNode.classList.toggle("relative-path",K.isRelative()),this.domNode.classList.toggle("backslash-path",this._labelService.getSeparator(z.scheme,z.authority)==="\\");const G=()=>{const Y=this._cfShowIcons.getValue(),$={...this._options,showFileIcons:this._options.showFileIcons&&Y,showSymbolIcons:this._options.showSymbolIcons&&Y},J=K.getElements().map(ee=>ee instanceof d.FileElement?new M(K,ee,$,this._instantiationService):new L(K,ee,$));J.length===0?(this._widget.setEnabled(!1),this._widget.setItems([new class extends _.BreadcrumbsItem{render(ee){ee.innerText=(0,v.localize)(4,null)}equals(ee){return ee===this}}])):(this._widget.setEnabled(!0),this._widget.setItems(J),this._widget.reveal(J[J.length-1]))},q=K.onDidUpdate(G),Z=this._cfShowIcons.onDidChange(G);G(),this._breadcrumbsDisposables.clear(),this._breadcrumbsDisposables.add(q),this._breadcrumbsDisposables.add(K),this._breadcrumbsDisposables.add(Z),this._breadcrumbsDisposables.add((0,D.toDisposable)(()=>this._widget.setItems([])));const j=()=>{const Y=this._cfTitleScrollbarSizing.getValue()??"default";this._widget.setHorizontalScrollbarSize(ui.SCROLLBAR_SIZES[Y])};j();const X=this._cfTitleScrollbarSizing.onDidChange(j);return this._breadcrumbsDisposables.add(X),this._breadcrumbsDisposables.add({dispose:()=>{this._breadcrumbsPickerShowing&&this._contextViewService.hideContextView({source:this})}}),U!==this.isHidden()}_onFocusEvent(z){z.item&&this._breadcrumbsPickerShowing&&(this._breadcrumbsPickerIgnoreOnceItem=void 0,this._widget.setSelection(z.item))}_onSelectEvent(z){if(!z.item)return;if(z.item===this._breadcrumbsPickerIgnoreOnceItem){this._breadcrumbsPickerIgnoreOnceItem=void 0,this._widget.setFocused(void 0),this._widget.setSelection(void 0);return}const{element:U}=z.item;this._editorGroup.focus();const H=this._getEditorGroup(z.payload);if(H!==void 0){this._widget.setFocused(void 0),this._widget.setSelection(void 0),this._revealInEditor(z,U,H);return}if(this._cfUseQuickPick.getValue()){this._widget.setFocused(void 0),this._widget.setSelection(void 0),this._quickInputService.quickAccess.show(U instanceof d.OutlineElement2?"@":"");return}let K,G;this._contextViewService.showContextView({render:q=>{z.item instanceof M?K=this._instantiationService.createInstance(m.BreadcrumbsFilePicker,q,z.item.model.resource):z.item instanceof L&&(K=this._instantiationService.createInstance(m.BreadcrumbsOutlinePicker,q,z.item.model.resource));let Z=K.onWillPickElement(()=>this._contextViewService.hideContextView({source:this,didPick:!0})),j=T.PixelRatio.onDidChange(()=>this._contextViewService.hideContextView({source:this})),X=t.trackFocus(q),Y=X.onDidBlur(()=>{this._breadcrumbsPickerIgnoreOnceItem=this._widget.isDOMFocused()?z.item:void 0,this._contextViewService.hideContextView({source:this})});return this._breadcrumbsPickerShowing=!0,this._updateCkBreadcrumbsActive(),(0,D.combinedDisposable)(K,Z,j,X,Y)},getAnchor:()=>{if(!G){let q=window.innerWidth-8,Z=Math.min(window.innerHeight*.7,300),j=Math.min(q,Math.max(240,q/4.17)),X=8,Y,$=t.getDomNodePagePosition(z.node.firstChild),J=$.top+$.height+X;J+Z>=window.innerHeight&&(Z=window.innerHeight-J-30);let ee=$.left;if(ee+j>=q&&(ee=q-j),z.payload instanceof f.StandardMouseEvent){let te=j-2*X;Y=z.payload.posx-ee,Y>te&&(ee=Math.min(q-j,ee+Y-te),Y=te)}else Y=$.left+$.width*.3-ee;K.show(U,Z,j,X,Math.max(0,Y)),G={x:ee,y:J}}return G},onHide:q=>{q?.didPick||K.restoreViewState(),this._breadcrumbsPickerShowing=!1,this._updateCkBreadcrumbsActive(),q?.source===this&&(this._widget.setFocused(void 0),this._widget.setSelection(void 0)),K.dispose()}})}_updateCkBreadcrumbsActive(){const z=this._widget.isDOMFocused()||this._breadcrumbsPickerShowing;this._ckBreadcrumbsActive.set(z)}async _revealInEditor(z,U,H,K=!1){if(U instanceof d.FileElement)if(U.kind===s.FileKind.FILE)await this._editorService.openEditor({resource:U.uri,options:{pinned:K}},H);else{let G=this._widget.getItems(),q=G.indexOf(z.item);this._widget.setFocused(G[q+1]),this._widget.setSelection(G[q+1],ui.Payload_Pick)}else U.outline.reveal(U,{pinned:K},H===E.SIDE_GROUP)}_getEditorGroup(z){return z===ui.Payload_RevealAside?E.SIDE_GROUP:z===ui.Payload_Reveal?E.ACTIVE_GROUP:void 0}};B.HEIGHT=22,B.SCROLLBAR_SIZES={default:3,large:8},B.Payload_Reveal={},B.Payload_RevealAside={},B.Payload_Pick={},B.CK_BreadcrumbsPossible=new i.RawContextKey("breadcrumbsPossible",!1,(0,v.localize)(1,null)),B.CK_BreadcrumbsVisible=new i.RawContextKey("breadcrumbsVisible",!1,(0,v.localize)(2,null)),B.CK_BreadcrumbsActive=new i.RawContextKey("breadcrumbsActive",!1,(0,v.localize)(3,null)),B=Ee([W(3,i.IContextKeyService),W(4,S.IContextViewService),W(5,l.IInstantiationService),W(6,n.IThemeService),W(7,u.IQuickInputService),W(8,s.IFileService),W(9,E.IEditorService),W(10,R.ILabelService),W(11,c.IConfigurationService),W(12,g.IBreadcrumbsService)],B),e.BreadcrumbsControl=B,C.MenuRegistry.appendMenuItem(C.MenuId.CommandPalette,{command:{id:"breadcrumbs.toggle",title:{value:(0,v.localize)(5,null),original:"Toggle Breadcrumbs"},category:O.CATEGORIES.View}}),C.MenuRegistry.appendMenuItem(C.MenuId.MenubarViewMenu,{group:"5_editor",order:3,command:{id:"breadcrumbs.toggle",title:(0,v.localize)(6,null),toggled:i.ContextKeyExpr.equals("config.breadcrumbs.enabled",!0)}}),o.CommandsRegistry.registerCommand("breadcrumbs.toggle",V=>{let z=V.get(c.IConfigurationService),U=g.BreadcrumbsConfig.IsEnabled.bindTo(z).getValue();g.BreadcrumbsConfig.IsEnabled.bindTo(z).updateValue(!U)});function P(V,z){const U=V.get(y.IEditorGroupsService),K=V.get(g.IBreadcrumbsService).getWidget(U.activeGroup.id);if(K){const G=(0,A.tail)(K.getItems());K.setFocused(G),z&&K.setSelection(G,B.Payload_Pick)}}C.MenuRegistry.appendMenuItem(C.MenuId.CommandPalette,{command:{id:"breadcrumbs.focusAndSelect",title:{value:(0,v.localize)(7,null),original:"Focus Breadcrumbs"},precondition:B.CK_BreadcrumbsVisible}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"breadcrumbs.focusAndSelect",weight:200,primary:2048|1024|84,when:B.CK_BreadcrumbsPossible,handler:V=>P(V,!0)}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"breadcrumbs.focus",weight:200,primary:2048|1024|80,when:B.CK_BreadcrumbsPossible,handler:V=>P(V,!1)}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"breadcrumbs.toggleToOn",weight:200,primary:2048|1024|84,when:i.ContextKeyExpr.not("config.breadcrumbs.enabled"),handler:async V=>{const z=V.get(l.IInstantiationService),U=V.get(c.IConfigurationService),H=g.BreadcrumbsConfig.IsEnabled.bindTo(U);return H.getValue()||(await H.updateValue(!0),await(0,k.timeout)(50)),z.invokeFunction(P,!0)}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"breadcrumbs.focusNext",weight:200,primary:17,secondary:[2048|17],mac:{primary:17,secondary:[512|17]},when:i.ContextKeyExpr.and(B.CK_BreadcrumbsVisible,B.CK_BreadcrumbsActive),handler(V){const z=V.get(y.IEditorGroupsService),H=V.get(g.IBreadcrumbsService).getWidget(z.activeGroup.id);!H||H.focusNext()}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"breadcrumbs.focusPrevious",weight:200,primary:15,secondary:[2048|15],mac:{primary:15,secondary:[512|15]},when:i.ContextKeyExpr.and(B.CK_BreadcrumbsVisible,B.CK_BreadcrumbsActive),handler(V){const z=V.get(y.IEditorGroupsService),H=V.get(g.IBreadcrumbsService).getWidget(z.activeGroup.id);!H||H.focusPrev()}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"breadcrumbs.focusNextWithPicker",weight:200+1,primary:2048|17,mac:{primary:512|17},when:i.ContextKeyExpr.and(B.CK_BreadcrumbsVisible,B.CK_BreadcrumbsActive,p.WorkbenchListFocusContextKey),handler(V){const z=V.get(y.IEditorGroupsService),H=V.get(g.IBreadcrumbsService).getWidget(z.activeGroup.id);!H||H.focusNext()}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"breadcrumbs.focusPreviousWithPicker",weight:200+1,primary:2048|15,mac:{primary:512|15},when:i.ContextKeyExpr.and(B.CK_BreadcrumbsVisible,B.CK_BreadcrumbsActive,p.WorkbenchListFocusContextKey),handler(V){const z=V.get(y.IEditorGroupsService),H=V.get(g.IBreadcrumbsService).getWidget(z.activeGroup.id);!H||H.focusPrev()}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"breadcrumbs.selectFocused",weight:200,primary:3,secondary:[18],when:i.ContextKeyExpr.and(B.CK_BreadcrumbsVisible,B.CK_BreadcrumbsActive),handler(V){const z=V.get(y.IEditorGroupsService),H=V.get(g.IBreadcrumbsService).getWidget(z.activeGroup.id);!H||H.setSelection(H.getFocused(),B.Payload_Pick)}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"breadcrumbs.revealFocused",weight:200,primary:10,secondary:[2048|3],when:i.ContextKeyExpr.and(B.CK_BreadcrumbsVisible,B.CK_BreadcrumbsActive),handler(V){const z=V.get(y.IEditorGroupsService),H=V.get(g.IBreadcrumbsService).getWidget(z.activeGroup.id);!H||H.setSelection(H.getFocused(),B.Payload_Reveal)}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"breadcrumbs.selectEditor",weight:200+1,primary:9,when:i.ContextKeyExpr.and(B.CK_BreadcrumbsVisible,B.CK_BreadcrumbsActive),handler(V){const z=V.get(y.IEditorGroupsService),H=V.get(g.IBreadcrumbsService).getWidget(z.activeGroup.id);!H||(H.setFocused(void 0),H.setSelection(void 0),z.activeGroup.activeEditorPane&&z.activeGroup.activeEditorPane.focus())}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"breadcrumbs.revealFocusedFromTreeAside",weight:200,primary:2048|3,when:i.ContextKeyExpr.and(B.CK_BreadcrumbsVisible,B.CK_BreadcrumbsActive,p.WorkbenchListFocusContextKey),handler(V){const z=V.get(E.IEditorService),H=V.get(p.IListService).lastFocusedList;if(!(H instanceof p.WorkbenchDataTree))return;const K=H.getFocus()[0];if(w.URI.isUri(K?.resource))return z.openEditor({resource:K.resource,options:{pinned:!0}},E.SIDE_GROUP);const G=H.getInput();if(G&&typeof G.outlineKind=="string")return G.reveal(K,{pinned:!0,preserveFocus:!1},!0)}})}),define(ne[256],re([1,0,44,779,83,21,23,45,18,19,61,875,93]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextResourceEditorInput=e.AbstractTextResourceEditorInput=void 0;let c=class extends f.AbstractResourceEditorInput{constructor(s,l,r,p,u,a){super(s,l,u,a);this.editorService=r,this.textFileService=p}save(s,l){return this.resource.scheme!==I.Schemas.untitled&&!this.fileService.hasProvider(this.resource)?this.saveAs(s,l):this.doSave(l,!1,s)}saveAs(s,l){return this.doSave(l,!0,s)}async doSave(s,l,r){let p;if(l?p=await this.textFileService.saveAs(this.resource,void 0,{...s,suggestedTarget:this.preferredResource}):p=await this.textFileService.save(this.resource,s),!!p)return{resource:p}}async revert(s,l){await this.textFileService.revert(this.resource,l)}};c=Ee([W(2,A.IEditorService),W(3,_.ITextFileService),W(4,D.ILabelService),W(5,k.IFileService)],c),e.AbstractTextResourceEditorInput=c;let i=class Kr extends c{constructor(s,l,r,p,u,a,n,h,g,d){super(s,void 0,h,n,d,g);this.name=l,this.description=r,this.preferredLanguageId=p,this.preferredContents=u,this.textModelResolverService=a,this.cachedModel=void 0,this.modelReference=void 0}get typeId(){return Kr.ID}get editorId(){return t.DEFAULT_EDITOR_ASSOCIATION.id}getName(){return this.name||super.getName()}setName(s){this.name!==s&&(this.name=s,this._onDidChangeLabel.fire())}getDescription(){return this.description}setDescription(s){this.description!==s&&(this.description=s,this._onDidChangeLabel.fire())}setLanguageId(s){this.setPreferredLanguageId(s),this.cachedModel&&this.cachedModel.setLanguageId(s)}setPreferredLanguageId(s){this.preferredLanguageId=s}setPreferredContents(s){this.preferredContents=s}async resolve(){const s=this.preferredContents,l=this.preferredLanguageId;this.preferredContents=void 0,this.preferredLanguageId=void 0,this.modelReference||(this.modelReference=this.textModelResolverService.createModelReference(this.resource));const r=await this.modelReference,p=r.object;if(!(p instanceof C.TextResourceEditorModel))throw r.dispose(),this.modelReference=void 0,new Error(`Unexpected model for TextResourceEditorInput: ${this.resource}`);return this.cachedModel=p,(typeof s=="string"||typeof l=="string")&&p.updateTextEditorModel(typeof s=="string"?(0,o.createTextBufferFactory)(s):void 0,l),p}matches(s){return super.matches(s)?!0:s instanceof Kr?(0,w.isEqual)(s.resource,this.resource):!1}dispose(){this.modelReference&&(this.modelReference.then(s=>s.dispose()),this.modelReference=void 0),this.cachedModel=void 0,super.dispose()}};i.ID="workbench.editors.resourceEditorInput",i=Ee([W(5,v.ITextModelService),W(6,_.ITextFileService),W(7,A.IEditorService),W(8,k.IFileService),W(9,D.ILabelService)],i),e.TextResourceEditorInput=i}),define(ne[2581],re([1,0,71,2177,5,12,1445,2,21,583,45,61,131,38,37,8,7,178,54,81,19,16,73,24,43,41,27,162,1071]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BulkEditPane=void 0;var E;(function(T){T.Data="data",T.Message="message"})(E||(E={}));let y=class Ki extends o.ViewPane{constructor(R,O,x,F,L,M,N,B,P,V,z,U,H,K,G,q,Z){super({...R,titleMenuId:a.MenuId.BulkEditTitle},U,H,K,P,z,O,G,q,Z);this._instaService=O,this._editorService=x,this._labelService=F,this._textModelService=L,this._dialogService=M,this._menuService=N,this._contextMenuService=B,this._contextKeyService=P,this._storageService=V,this._treeViewStates=new Map,this._disposables=new D.DisposableStore,this._sessionDisposables=new D.DisposableStore,this.element.classList.add("bulk-edit-panel","show-file-icons"),this._ctxHasCategories=Ki.ctxHasCategories.bindTo(P),this._ctxGroupByFile=Ki.ctxGroupByFile.bindTo(P),this._ctxHasCheckedChanges=Ki.ctxHasCheckedChanges.bindTo(P)}dispose(){this._tree.dispose(),this._disposables.dispose()}renderBody(R){super.renderBody(R);const O=this._instaService.createInstance(l.ResourceLabels,{onDidChangeVisibility:this.onDidChangeBodyVisibility});this._disposables.add(O);const x=document.createElement("div");x.className="content",R.appendChild(x);const F=document.createElement("div");x.appendChild(F),this._treeDataSource=this._instaService.createInstance(f.BulkEditDataSource),this._treeDataSource.groupByFile=this._storageService.getBoolean(Ki._memGroupByFile,0,!0),this._ctxGroupByFile.set(this._treeDataSource.groupByFile),this._tree=this._instaService.createInstance(t.WorkbenchAsyncDataTree,this.id,F,new f.BulkEditDelegate,[this._instaService.createInstance(f.TextEditElementRenderer),this._instaService.createInstance(f.FileElementRenderer,O),this._instaService.createInstance(f.CategoryElementRenderer)],this._treeDataSource,{accessibilityProvider:this._instaService.createInstance(f.BulkEditAccessibilityProvider),identityProvider:new f.BulkEditIdentityProvider,expandOnlyOnTwistieClick:!0,multipleSelectionSupport:!1,keyboardNavigationLabelProvider:new f.BulkEditNaviLabelProvider,sorter:new f.BulkEditSorter,selectionNavigation:!0}),this._disposables.add(this._tree.onContextMenu(this._onContextMenu,this)),this._disposables.add(this._tree.onDidOpen(P=>this._openElementAsEditor(P)));const L=document.createElement("div");L.className="buttons",x.appendChild(L);const M=new b.ButtonBar(L);this._disposables.add(M);const N=M.addButton({supportIcons:!0});N.label=(0,k.localize)(0,null),N.onDidClick(()=>this.accept(),this,this._disposables);const B=M.addButton({});B.label=(0,k.localize)(1,null),B.onDidClick(()=>this.discard(),this,this._disposables),this._message=document.createElement("span"),this._message.className="message",this._message.innerText=(0,k.localize)(2,null),R.appendChild(this._message),this._setState("message")}layoutBody(R,O){super.layoutBody(R,O);const x=R-50;this._tree.getHTMLElement().parentElement.style.height=`${x}px`,this._tree.layout(x,O)}_setState(R){this.element.dataset.state=R}async setInput(R,O){this._setState("data"),this._sessionDisposables.clear(),this._treeViewStates.clear(),this._currentResolve&&(this._currentResolve(void 0),this._currentResolve=void 0);const x=await this._instaService.invokeFunction(w.BulkFileOperations.create,R);this._currentProvider=this._instaService.createInstance(w.BulkEditPreviewProvider,x),this._sessionDisposables.add(this._currentProvider),this._sessionDisposables.add(x);const F=x.categories.length>1;return this._ctxHasCategories.set(F),this._treeDataSource.groupByFile=!F||this._treeDataSource.groupByFile,this._ctxHasCheckedChanges.set(x.checked.checkedCount>0),this._currentInput=x,new Promise(L=>{O.onCancellationRequested(()=>L(void 0)),this._currentResolve=L,this._setTreeInput(x),this._sessionDisposables.add(x.checked.onDidChange(()=>{this._tree.updateChildren(),this._ctxHasCheckedChanges.set(x.checked.checkedCount>0)}))})}hasInput(){return Boolean(this._currentInput)}async _setTreeInput(R){const O=this._treeViewStates.get(this._treeDataSource.groupByFile);if(await this._tree.setInput(R,O),this._tree.domFocus(),O)return;const x=[...this._tree.getNode(R).children].slice(0,10);for(;x.length>0;){const{element:F}=x.shift();F instanceof f.FileElement&&await this._tree.expand(F,!0),F instanceof f.CategoryElement&&(await this._tree.expand(F,!0),x.push(...this._tree.getNode(F).children))}}accept(){const R=this._currentInput?.conflicts.list();if(!R||R.length===0){this._done(!0);return}let O;R.length===1?O=(0,k.localize)(3,null,this._labelService.getUriLabel(R[0],{relative:!0})):O=(0,k.localize)(4,null,R.length),this._dialogService.show(p.default.Warning,O).finally(()=>this._done(!1))}discard(){this._done(!1)}_done(R){this._currentResolve&&this._currentResolve(R?this._currentInput?.getWorkspaceEdit():void 0),this._currentInput=void 0,this._setState("message"),this._sessionDisposables.clear()}toggleChecked(){const[R]=this._tree.getFocus();(R instanceof f.FileElement||R instanceof f.TextEditElement)&&!R.isDisabled()&&R.setChecked(!R.isChecked())}groupByFile(){this._treeDataSource.groupByFile||this.toggleGrouping()}groupByType(){this._treeDataSource.groupByFile&&this.toggleGrouping()}toggleGrouping(){const R=this._tree.getInput();if(R){let O=this._tree.getViewState();this._treeViewStates.set(this._treeDataSource.groupByFile,O),this._treeDataSource.groupByFile=!this._treeDataSource.groupByFile,this._setTreeInput(R),this._storageService.store(Ki._memGroupByFile,this._treeDataSource.groupByFile,0,0),this._ctxGroupByFile.set(this._treeDataSource.groupByFile)}}async _openElementAsEditor(R){let O={...R.editorOptions},x;if(R.element instanceof f.TextEditElement)x=R.element.parent,O.selection=R.element.edit.textEdit.textEdit.range;else if(R.element instanceof f.FileElement)x=R.element,O.selection=R.element.edit.textEdits[0]?.textEdit.textEdit.range;else return;const F=this._currentProvider.asPreviewUri(x.edit.uri);if(x.edit.type&4)this._editorService.openEditor({label:(0,k.localize)(5,null,(0,u.basename)(x.edit.uri)),resource:F,options:O});else{let L;try{(await this._textModelService.createModelReference(x.edit.uri)).dispose(),L=x.edit.uri}catch{L=w.BulkEditPreviewProvider.emptyPreview}let M;x.edit.type&8?M=(0,k.localize)(6,null):x.edit.type&2&&(M=(0,k.localize)(7,null));let N;M?N=(0,k.localize)(8,null,(0,u.basename)(x.edit.uri),M):N=(0,k.localize)(9,null,(0,u.basename)(x.edit.uri)),this._editorService.openEditor({original:{resource:L},modified:{resource:F},label:N,description:this._labelService.getUriLabel((0,u.dirname)(L),{relative:!0}),options:O},R.sideBySide?I.SIDE_GROUP:I.ACTIVE_GROUP)}}_onContextMenu(R){const O=this._menuService.createMenu(a.MenuId.BulkEditContext,this._contextKeyService),x=[],F=(0,n.createAndFillInContextMenuActions)(O,void 0,x);this._contextMenuService.showContextMenu({getActions:()=>x,getAnchor:()=>R.anchor,onHide:()=>{F.dispose(),O.dispose()}})}};y.ID="refactorPreview",y.ctxHasCategories=new s.RawContextKey("refactorPreview.hasCategories",!1),y.ctxGroupByFile=new s.RawContextKey("refactorPreview.groupByFile",!0),y.ctxHasCheckedChanges=new s.RawContextKey("refactorPreview.hasCheckedChanges",!0),y._memGroupByFile=`${y.ID}.groupByFile`,y=Ee([W(1,_.IInstantiationService),W(2,I.IEditorService),W(3,v.ILabelService),W(4,C.ITextModelService),W(5,r.IDialogService),W(6,a.IMenuService),W(7,i.IContextMenuService),W(8,s.IContextKeyService),W(9,h.IStorageService),W(10,g.IViewDescriptorService),W(11,c.IKeybindingService),W(12,i.IContextMenuService),W(13,S.IConfigurationService),W(14,d.IOpenerService),W(15,A.IThemeService),W(16,m.ITelemetryService)],y),e.BulkEditPane=y}),define(ne[2582],re([1,0,6,2,19,61,83]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomTextEditorModel=void 0;let D=class ua extends f.Disposable{constructor(w,v,C,o){super();this.viewType=w,this._resource=v,this._model=C,this.textFileService=o,this._onDidChangeOrphaned=this._register(new t.Emitter),this.onDidChangeOrphaned=this._onDidChangeOrphaned.event,this._onDidChangeReadonly=this._register(new t.Emitter),this.onDidChangeReadonly=this._onDidChangeReadonly.event,this._onDidChangeDirty=this._register(new t.Emitter),this.onDidChangeDirty=this._onDidChangeDirty.event,this._onDidChangeContent=this._register(new t.Emitter),this.onDidChangeContent=this._onDidChangeContent.event,this._register(C),this._textFileModel=this.textFileService.files.get(v),this._textFileModel&&(this._register(this._textFileModel.onDidChangeOrphaned(()=>this._onDidChangeOrphaned.fire())),this._register(this._textFileModel.onDidChangeReadonly(()=>this._onDidChangeReadonly.fire()))),this._register(this.textFileService.files.onDidChangeDirty(c=>{(0,_.isEqual)(this.resource,c.resource)&&(this._onDidChangeDirty.fire(),this._onDidChangeContent.fire())}))}static async create(w,v,C){return w.invokeFunction(async o=>{const i=await o.get(A.ITextModelService).createModelReference(C);return w.createInstance(ua,v,C,i)})}get resource(){return this._resource}isReadonly(){return this._model.object.isReadonly()}get backupId(){}isDirty(){return this.textFileService.isDirty(this.resource)}isOrphaned(){return!!this._textFileModel?.hasState(4)}async revert(w){return this.textFileService.revert(this.resource,w)}saveCustomEditor(w){return this.textFileService.save(this.resource,w)}async saveCustomEditorAs(w,v,C){return!!await this.textFileService.saveAs(w,v,C)}};D=Ee([W(3,k.ITextFileService)],D),e.CustomTextEditorModel=D}),define(ne[2583],re([1,0,1500,2,6,51,118,9,19,24,40,8,23,34,5,90,21,191,108,17,146,859,53,7,83,30,13,11,177,15,231,56,190,12]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationManager=void 0;const F=p.Registry.as(u.Extensions.JSONContribution);F.registerSchema(l.launchSchemaId,a.launchSchema);const L="debug.selectedconfigname",M="debug.selectedroot",N="debug.selectedtype",B="debug.recentdynamicconfigurations";let P=class{constructor(G,q,Z,j,X,Y,$,J,ee,te){this.adapterManager=G,this.contextService=q,this.configurationService=Z,this.quickInputService=j,this.instantiationService=X,this.storageService=Y,this.extensionService=$,this.historyService=J,this.uriIdentityService=ee,this.getSelectedConfig=()=>Promise.resolve(void 0),this._onDidSelectConfigurationName=new _.Emitter,this.configProviders=[],this.toDispose=[],this.initLaunches(),this.registerListeners();const se=this.storageService.get(M,1),ie=this.storageService.get(N,1),ce=this.launches.find(ue=>ue.uri.toString()===se),le=this.storageService.get(L,1);this.debugConfigurationTypeContext=S.CONTEXT_DEBUG_CONFIGURATION_TYPE.bindTo(te);const ae=ie?{type:ie}:void 0;ce&&ce.getConfigurationNames().length?this.selectConfiguration(ce,le,void 0,ae):this.launches.length>0&&this.selectConfiguration(void 0,le,void 0,ae)}registerDebugConfigurationProvider(G){return this.configProviders.push(G),{dispose:()=>{this.unregisterDebugConfigurationProvider(G)}}}unregisterDebugConfigurationProvider(G){const q=this.configProviders.indexOf(G);q>=0&&this.configProviders.splice(q,1)}hasDebugConfigurationProvider(G,q){return q===void 0&&(q=S.DebugConfigurationProviderTriggerKind.Initial),!!this.configProviders.find(j=>j.provideDebugConfigurations&&j.type===G&&j.triggerKind===q)}async resolveConfigurationByProviders(G,q,Z,j){await this.activateDebuggers("onDebugResolve",q);const X=this.configProviders.filter($=>$.type===q&&$.resolveDebugConfiguration).concat(this.configProviders.filter($=>$.type==="*"&&$.resolveDebugConfiguration));let Y=Z;return await(0,b.sequence)(X.map($=>async()=>{Y&&(Y=await $.resolveDebugConfiguration(G,Y,j))})),Y?.type&&Y.type!==Z.type&&await this.activateDebuggers("onDebugResolve",Y.type),Y}async resolveDebugConfigurationWithSubstitutedVariables(G,q,Z,j){const X=this.configProviders.filter($=>$.type===q&&$.resolveDebugConfigurationWithSubstitutedVariables).concat(this.configProviders.filter($=>$.type==="*"&&$.resolveDebugConfigurationWithSubstitutedVariables));let Y=Z;return await(0,b.sequence)(X.map($=>async()=>{Y&&(Y=await $.resolveDebugConfigurationWithSubstitutedVariables(G,Y,j))})),Y}async provideDebugConfigurations(G,q,Z){return await this.activateDebuggers("onDebugInitialConfigurations"),(await Promise.all(this.configProviders.filter(X=>X.type===q&&X.triggerKind===S.DebugConfigurationProviderTriggerKind.Initial&&X.provideDebugConfigurations).map(X=>X.provideDebugConfigurations(G,Z)))).reduce((X,Y)=>X.concat(Y),[])}async getDynamicProviders(){const G=await this.extensionService.getExtensions(),q="onDebugDynamicConfigurations";return G.reduce((j,X)=>{if(!X.activationEvents)return j;const Y=[];let $=!1;for(const J of X.activationEvents)J===q?$=!0:J.startsWith(`${q}:`)&&Y.push(J.slice(q.length+1));if(Y.length)return j.concat(Y);if($){const J=X.contributes?.debuggers?.[0].type;return J?j.concat(J):j}return j},[]).map(j=>({label:this.adapterManager.getDebuggerLabel(j),getProvider:async()=>(await this.activateDebuggers(q,j),this.configProviders.find(X=>X.type===j&&X.triggerKind===S.DebugConfigurationProviderTriggerKind.Dynamic&&X.provideDebugConfigurations)),type:j,pick:async()=>{await this.activateDebuggers(q,j);const X=new f.DisposableStore,Y=X.add(this.quickInputService.createQuickPick());Y.busy=!0,Y.placeholder=t.localize(0,null),Y.show();const $=new Promise(le=>{X.add(Y.onDidAccept(()=>le(Y.activeItems[0]))),X.add(Y.onDidTriggerItemButton(async ae=>{le(void 0);const{launch:ue,config:oe}=ae.item;await ue.openConfigFile(!1,oe.type),await ue.writeConfiguration(oe),await this.selectConfiguration(ue,oe.name)}))}),J=new d.CancellationTokenSource,ee=[],te=this.configProviders.find(le=>le.type===j&&le.triggerKind===S.DebugConfigurationProviderTriggerKind.Dynamic&&le.provideDebugConfigurations);this.getLaunches().forEach(le=>{le.workspace&&te&&ee.push(te.provideDebugConfigurations(le.workspace.uri,J.token).then(ae=>ae.map(ue=>({label:ue.name,description:le.name,config:ue,buttons:[{iconClass:x.ThemeIcon.asClassName(O.debugConfigure),tooltip:t.localize(1,null)}],launch:le}))))});const se=await Promise.all(ee),ie=(0,y.flatten)(se);Y.items=ie,Y.busy=!1;const ce=await $;if(X.dispose(),!ce){J.cancel();return}return ce}}))}getAllConfigurations(){const G=[];for(const q of this.launches)for(const Z of q.getConfigurationNames()){const j=q.getConfiguration(Z)||q.getCompound(Z);j&&G.push({launch:q,name:Z,presentation:j.presentation})}return(0,T.getVisibleAndSorted)(G)}removeRecentDynamicConfigurations(G,q){const Z=this.getRecentDynamicConfigurations().filter(j=>j.name!==G||j.type!==q);this.storageService.store(B,JSON.stringify(Z),1,0),this.selectedConfiguration.name===G&&this.selectedType===q?this.selectConfiguration(void 0,void 0):this._onDidSelectConfigurationName.fire()}getRecentDynamicConfigurations(){return JSON.parse(this.storageService.get(B,1,"[]"))}registerListeners(){this.toDispose.push(_.Event.any(this.contextService.onDidChangeWorkspaceFolders,this.contextService.onDidChangeWorkbenchState)(()=>{this.initLaunches(),this.selectConfiguration(void 0),this.setCompoundSchemaValues()})),this.toDispose.push(this.configurationService.onDidChangeConfiguration(async G=>{G.affectsConfiguration("launch")&&(await this.selectConfiguration(void 0),this.setCompoundSchemaValues())})),this.toDispose.push(this.adapterManager.onDidDebuggersExtPointRead(()=>{this.setCompoundSchemaValues()}))}initLaunches(){this.launches=this.contextService.getWorkspace().folders.map(G=>this.instantiationService.createInstance(z,this,this.adapterManager,G)),this.contextService.getWorkbenchState()===3&&this.launches.push(this.instantiationService.createInstance(U,this,this.adapterManager)),this.launches.push(this.instantiationService.createInstance(H,this,this.adapterManager)),this.selectedLaunch&&this.launches.indexOf(this.selectedLaunch)===-1&&this.selectConfiguration(void 0)}setCompoundSchemaValues(){const G=a.launchSchema.properties.compounds.items.properties.configurations,q=this.launches.map(j=>j.getConfigurationNames(!0)).reduce((j,X)=>j.concat(X),[]);G.items.oneOf[0].enum=q,G.items.oneOf[1].properties.name.enum=q;const Z=this.contextService.getWorkspace().folders.map(j=>j.name);G.items.oneOf[1].properties.folder.enum=Z,F.registerSchema(l.launchSchemaId,a.launchSchema)}getLaunches(){return this.launches}getLaunch(G){if(!!D.URI.isUri(G))return this.launches.find(q=>q.workspace&&this.uriIdentityService.extUri.isEqual(q.workspace.uri,G))}get selectedConfiguration(){return{launch:this.selectedLaunch,name:this.selectedName,getConfig:this.getSelectedConfig,type:this.selectedType}}get onDidSelectConfiguration(){return this._onDidSelectConfigurationName.event}getWorkspaceLaunch(){if(this.contextService.getWorkbenchState()===3)return this.launches[this.launches.length-1]}async selectConfiguration(G,q,Z,j){if(typeof G=="undefined"){const ee=this.historyService.getLastActiveWorkspaceRoot();G=this.getLaunch(ee),(!G||G.getConfigurationNames().length===0)&&(G=this.launches.find(te=>!!(te&&te.getConfigurationNames().length))||G||this.launches[0])}const X=this.selectedLaunch,Y=this.selectedName;this.selectedLaunch=G,this.selectedLaunch?this.storageService.store(M,this.selectedLaunch.uri.toString(),1,1):this.storageService.remove(M,1);const $=G?G.getConfigurationNames():[];this.getSelectedConfig=()=>{const ee=this.selectedName?G?.getConfiguration(this.selectedName):void 0;return Promise.resolve(ee||Z)};let J=Z?.type;if(q&&$.indexOf(q)>=0)this.setSelectedLaunchName(q);else if(j&&j.type){if(J=j.type,!Z){const te=(await this.getDynamicProviders()).filter(se=>se.type===J);this.getSelectedConfig=async()=>{const se=await Promise.all(te.map(ce=>ce.getProvider())),ie=se.length>0?se[0]:void 0;if(ie&&G&&G.workspace){const ce=new d.CancellationTokenSource,ae=(await ie.provideDebugConfigurations(G.workspace.uri,ce.token)).find(ue=>ue.name===q);if(ae)return ae}}}this.setSelectedLaunchName(q);let ee=this.getRecentDynamicConfigurations();q&&j.type&&(ee.unshift({name:q,type:j.type}),ee=(0,y.distinct)(ee,te=>`${te.name} : ${te.type}`),this.storageService.store(B,JSON.stringify(ee),1,0))}else if(!this.selectedName||$.indexOf(this.selectedName)===-1){const ee=$.length?$[0]:void 0;this.setSelectedLaunchName(ee)}!Z&&G&&this.selectedName&&(Z=G.getConfiguration(this.selectedName),J=Z?.type),this.selectedType=j?.type||Z?.type,this.storageService.store(N,j?this.selectedType:void 0,1,1),J?this.debugConfigurationTypeContext.set(J):this.debugConfigurationTypeContext.reset(),(this.selectedLaunch!==X||this.selectedName!==Y)&&this._onDidSelectConfigurationName.fire()}async activateDebuggers(G,q){const Z=[this.extensionService.activateByEvent(G),this.extensionService.activateByEvent("onDebug")];q&&Z.push(this.extensionService.activateByEvent(`${G}:${q}`)),await Promise.all(Z)}setSelectedLaunchName(G){this.selectedName=G,this.selectedName?this.storageService.store(L,this.selectedName,1,1):this.storageService.remove(L,1)}dispose(){this.toDispose=(0,f.dispose)(this.toDispose)}};P=Ee([W(1,c.IWorkspaceContextService),W(2,C.IConfigurationService),W(3,n.IQuickInputService),W(4,i.IInstantiationService),W(5,w.IStorageService),W(6,v.IExtensionService),W(7,E.IHistoryService),W(8,R.IUriIdentityService),W(9,h.IContextKeyService)],P),e.ConfigurationManager=P;class V{constructor(G,q){this.configurationManager=G,this.adapterManager=q}getCompound(G){const q=this.getConfig();if(!(!q||!q.compounds))return q.compounds.find(Z=>Z.name===G)}getConfigurationNames(G=!1){const q=this.getConfig();if(!q||!Array.isArray(q.configurations)&&!Array.isArray(q.compounds))return[];{const Z=[];return q.configurations&&Z.push(...q.configurations.filter(j=>j&&typeof j.name=="string")),G?Z.map(j=>j.name):(q.compounds&&Z.push(...q.compounds.filter(j=>typeof j.name=="string"&&j.configurations&&j.configurations.length)),(0,T.getVisibleAndSorted)(Z).map(j=>j.name))}}getConfiguration(G){const q=A.deepClone(this.getConfig());if(!q||!q.configurations)return;const Z=q.configurations.find(j=>j&&j.name===G);return Z&&(this instanceof H?Z.__configurationTarget=1:this instanceof U?Z.__configurationTarget=4:Z.__configurationTarget=5),Z}async getInitialConfigurationContent(G,q,Z){let j="";const X=await this.adapterManager.guessDebugger(!0,q);if(X){const Y=await this.configurationManager.provideDebugConfigurations(G,X.type,Z||d.CancellationToken.None);j=await X.getInitialConfigurationContent(Y)}return j}get hidden(){return!1}}let z=class extends V{constructor(G,q,Z,j,X,Y,$){super(G,q);this.workspace=Z,this.fileService=j,this.textFileService=X,this.editorService=Y,this.configurationService=$}get uri(){return I.joinPath(this.workspace.uri,"/.vscode/launch.json")}get name(){return this.workspace.name}getConfig(){return this.configurationService.inspect("launch",{resource:this.workspace.uri}).workspaceFolderValue}async openConfigFile(G,q,Z){const j=this.uri;let X=!1,Y="";try{Y=(await this.fileService.readFile(j)).value.toString()}catch{if(Y=await this.getInitialConfigurationContent(this.workspace.uri,q,Z),!Y)return{editor:null,created:!1};X=!0;try{await this.textFileService.write(j,Y)}catch(se){throw new Error(t.localize(2,null,se.message))}}const $=Y.indexOf(`"${this.configurationManager.selectedConfiguration.name}"`);let J=1;for(let se=0;se<$;se++)Y.charAt(se)===` `&&J++;const ee=J>1?{startLineNumber:J,startColumn:4}:void 0,te=await this.editorService.openEditor({resource:j,options:{selection:ee,preserveFocus:G,pinned:X,revealIfVisible:!0}},s.ACTIVE_GROUP);return{editor:(0,m.withUndefinedAsNull)(te),created:X}}async writeConfiguration(G){const q=A.deepClone(this.getConfig());q.configurations||(q.configurations=[]),q.configurations.push(G),await this.configurationService.updateValue("launch",q,{resource:this.workspace.uri},5)}};z=Ee([W(3,o.IFileService),W(4,g.ITextFileService),W(5,s.IEditorService),W(6,C.IConfigurationService)],z);let U=class extends V{constructor(G,q,Z,j,X){super(G,q);this.editorService=Z,this.configurationService=j,this.contextService=X}get workspace(){}get uri(){return this.contextService.getWorkspace().configuration}get name(){return t.localize(3,null)}getConfig(){return this.configurationService.inspect("launch").workspaceValue}async openConfigFile(G,q,Z){if(!!!this.getConfig()){const Y=await this.getInitialConfigurationContent(void 0,q,Z);if(Y)await this.configurationService.updateValue("launch",k.parse(Y),4);else return{editor:null,created:!1}}const X=await this.editorService.openEditor({resource:this.contextService.getWorkspace().configuration,options:{preserveFocus:G}},s.ACTIVE_GROUP);return{editor:(0,m.withUndefinedAsNull)(X),created:!1}}};U=Ee([W(2,s.IEditorService),W(3,C.IConfigurationService),W(4,c.IWorkspaceContextService)],U);let H=class extends V{constructor(G,q,Z,j){super(G,q);this.configurationService=Z,this.preferencesService=j}get workspace(){}get uri(){return this.preferencesService.userSettingsResource}get name(){return t.localize(4,null)}get hidden(){return!0}getConfig(){return this.configurationService.inspect("launch").userValue}async openConfigFile(G){const q=await this.preferencesService.openUserSettings({jsonEditor:!0,preserveFocus:G,revealSetting:{key:"launch"}});return{editor:(0,m.withUndefinedAsNull)(q),created:!1}}};H=Ee([W(2,C.IConfigurationService),W(3,r.IPreferencesService)],H)}),define(ne[179],re([1,0,15,11,60,30,6,2,51,19,13,9,89,20,1528,56,90,498,412,83]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugModel=e.Memory=e.ThreadAndSessionIds=e.InstructionBreakpoint=e.ExceptionBreakpoint=e.DataBreakpoint=e.FunctionBreakpoint=e.Breakpoint=e.BaseBreakpoint=e.Enablement=e.MemoryRegion=e.getUriForDebugMemory=e.Thread=e.StackFrame=e.ErrorScope=e.Scope=e.Variable=e.Expression=e.ExpressionContainer=void 0;class u{constructor(U,H,K,G,q=0,Z=0,j=void 0,X=0,Y=void 0){this.session=U,this.threadId=H,this._reference=K,this.id=G,this.namedVariables=q,this.indexedVariables=Z,this.memoryReference=j,this.startOfVariables=X,this.presentationHint=Y,this.valueChanged=!1,this._value=""}get reference(){return this._reference}set reference(U){this._reference=U,this.children=void 0}async evaluateLazy(){if(typeof this.reference=="undefined")return;const U=await this.session.variables(this.reference,this.threadId,void 0,void 0,void 0);if(!U||!U.body||!U.body.variables||U.body.variables.length!==1)return;const H=U.body.variables[0];this.reference=H.variablesReference,this._value=H.value,this.namedVariables=H.namedVariables,this.indexedVariables=H.indexedVariables,this.memoryReference=H.memoryReference,this.presentationHint=H.presentationHint,this.adoptLazyResponse(H)}adoptLazyResponse(U){}getChildren(){return this.children||(this.children=this.doGetChildren()),this.children}async doGetChildren(){if(!this.hasChildren)return[];if(!this.getChildrenInChunks)return this.fetchVariables(void 0,void 0,void 0);const U=this.namedVariables?await this.fetchVariables(void 0,void 0,"named"):[];let H=u.BASE_CHUNK_SIZE;for(;!!this.indexedVariables&&this.indexedVariables>H*u.BASE_CHUNK_SIZE;)H*=u.BASE_CHUNK_SIZE;if(!!this.indexedVariables&&this.indexedVariables>H){const G=Math.ceil(this.indexedVariables/H);for(let q=0;q<G;q++){const Z=(this.startOfVariables||0)+q*H,j=Math.min(H,this.indexedVariables-q*H);U.push(new h(this.session,this.threadId,this,this.reference,`[${Z}..${Z+j-1}]`,"","",void 0,j,void 0,{kind:"virtual"},void 0,void 0,!0,Z))}return U}const K=await this.fetchVariables(this.startOfVariables,this.indexedVariables,"indexed");return U.concat(K)}getId(){return this.id}getSession(){return this.session}get value(){return this._value}get hasChildren(){return!!this.reference&&this.reference>0&&!this.presentationHint?.lazy}async fetchVariables(U,H,K){try{const G=await this.session.variables(this.reference||0,this.threadId,K,U,H);if(!G||!G.body||!G.body.variables)return[];const q=new Map;return G.body.variables.filter(Z=>!!Z).map(Z=>{if((0,v.isString)(Z.value)&&(0,v.isString)(Z.name)&&typeof Z.variablesReference=="number"){const j=q.get(Z.name)||0,X=j>0?j.toString():"";return q.set(Z.name,j+1),new h(this.session,this.threadId,this,Z.variablesReference,Z.name,Z.evaluateName,Z.value,Z.namedVariables,Z.indexedVariables,Z.memoryReference,Z.presentationHint,Z.type,Z.__vscodeVariableMenuContext,!0,0,X)}return new h(this.session,this.threadId,this,0,"",void 0,i.localize(0,null),0,0,void 0,{kind:"virtual"},void 0,void 0,!1)})}catch(G){return[new h(this.session,this.threadId,this,0,"",void 0,G.message,0,0,void 0,{kind:"virtual"},void 0,void 0,!1)]}}get getChildrenInChunks(){return!!this.indexedVariables}set value(U){this._value=U,this.valueChanged=!!u.allValues.get(this.getId())&&u.allValues.get(this.getId())!==n.DEFAULT_VALUE&&u.allValues.get(this.getId())!==U,u.allValues.set(this.getId(),U)}toString(){return this.value}async evaluateExpression(U,H,K,G,q=!1){if(!H||!K&&G!=="repl")return this.value=G==="repl"?i.localize(1,null):n.DEFAULT_VALUE,this.reference=0,!1;this.session=H;try{const Z=await H.evaluate(U,K?K.frameId:void 0,G);return Z&&Z.body?(this.value=Z.body.result||"",this.reference=Z.body.variablesReference,this.namedVariables=Z.body.namedVariables,this.indexedVariables=Z.body.indexedVariables,this.memoryReference=Z.body.memoryReference,this.type=Z.body.type||this.type,this.presentationHint=Z.body.presentationHint,!q&&Z.body.presentationHint?.lazy&&await this.evaluateLazy(),!0):!1}catch(Z){return this.value=Z.message||"",this.reference=0,!1}}}e.ExpressionContainer=u,u.allValues=new Map,u.BASE_CHUNK_SIZE=100;function a(z,U){U&&U.body&&(z.value=U.body.value||"",z.type=U.body.type||z.type,z.reference=U.body.variablesReference,z.namedVariables=U.body.namedVariables,z.indexedVariables=U.body.indexedVariables)}class n extends u{constructor(U,H=(0,o.generateUuid)()){super(void 0,void 0,0,H);this.name=U,this.available=!1,U&&(this.value=n.DEFAULT_VALUE)}async evaluate(U,H,K,G){this.available=await this.evaluateExpression(this.name,U,H,K,G)}toString(){return`${this.name} ${this.value}`}async setExpression(U,H){if(!this.session)return;const K=await this.session.setExpression(H.frameId,this.name,U);a(this,K)}}e.Expression=n,n.DEFAULT_VALUE=i.localize(2,null);class h extends u{constructor(U,H,K,G,q,Z,j,X,Y,$,J,ee=void 0,te=void 0,se=!0,ie=0,ce=""){super(U,H,G,`variable:${K.getId()}:${q}:${ce}`,X,Y,$,ie,J);this.parent=K,this.name=q,this.evaluateName=Z,this.variableMenuContext=te,this.available=se,this.value=j||"",this.type=ee}async setVariable(U,H){if(!!this.session)try{if(this.session.capabilities.supportsSetExpression&&!this.session.capabilities.supportsSetVariable&&this.evaluateName)return this.setExpression(U,H);const K=await this.session.setVariable(this.parent.reference,this.name,U);a(this,K)}catch(K){this.errorMessage=K.message}}async setExpression(U,H){if(!this.session||!this.evaluateName)return;const K=await this.session.setExpression(H.frameId,this.evaluateName,U);a(this,K)}toString(){return this.name?`${this.name}: ${this.value}`:this.value}adoptLazyResponse(U){this.evaluateName=U.evaluateName}toDebugProtocolObject(){return{name:this.name,variablesReference:this.reference||0,memoryReference:this.memoryReference,value:this.value,evaluateName:this.evaluateName}}}e.Variable=h;class g extends u{constructor(U,H,K,G,q,Z,j,X){super(U.thread.session,U.thread.threadId,G,`scope:${K}:${H}`,Z,j);this.name=K,this.expensive=q,this.range=X}toString(){return this.name}toDebugProtocolObject(){return{name:this.name,variablesReference:this.reference||0,expensive:this.expensive}}}e.Scope=g;class d extends g{constructor(U,H,K){super(U,H,K,0,!1)}toString(){return this.name}}e.ErrorScope=d;class m{constructor(U,H,K,G,q,Z,j,X,Y){this.thread=U,this.frameId=H,this.source=K,this.name=G,this.presentationHint=q,this.range=Z,this.index=j,this.canRestart=X,this.instructionPointerReference=Y}getId(){return`stackframe:${this.thread.getId()}:${this.index}:${this.source.name}`}getScopes(){return this.scopes||(this.scopes=this.thread.session.scopes(this.frameId,this.thread.threadId).then(U=>{if(!U||!U.body||!U.body.scopes)return[];const H=new Map;return U.body.scopes.map(K=>{const G=H.get(K.name),q=typeof G=="number"?G+1:0;return H.set(K.name,q),new g(this,q,K.name,K.variablesReference,K.expensive,K.namedVariables,K.indexedVariables,K.line&&K.column&&K.endLine&&K.endColumn?new c.Range(K.line,K.column,K.endLine,K.endColumn):void 0)})},U=>[new d(this,0,U.message)])),this.scopes}async getMostSpecificScopes(U){const K=(await this.getScopes()).filter(Z=>!Z.expensive);if(!K.some(Z=>!!Z.range))return K;const q=K.filter(Z=>Z.range&&c.Range.containsRange(Z.range,U)).sort((Z,j)=>Z.range.endLineNumber-Z.range.startLineNumber-(j.range.endLineNumber-j.range.startLineNumber));return q.length?q:K}restart(){return this.thread.session.restartFrame(this.frameId,this.thread.threadId)}forgetScopes(){this.scopes=void 0}toString(){const U=typeof this.range.startLineNumber=="number"?`:${this.range.startLineNumber}`:"",H=`${this.source.inMemory?this.source.name:this.source.uri.fsPath}${U}`;return H===l.UNKNOWN_SOURCE_LABEL?this.name:`${this.name} (${H})`}async openInEditor(U,H,K,G){const q=this.thread.stoppedDetails?.reason;if(this.instructionPointerReference&&(q==="instruction breakpoint"||q==="step"&&this.thread.lastSteppingGranularity==="instruction"))return U.openEditor(r.DisassemblyViewInput.instance,{pinned:!0});if(this.source.available)return this.source.openInEditor(U,this.range,H,K,G)}equals(U){return this.name===U.name&&U.thread===this.thread&&this.frameId===U.frameId&&U.source===this.source&&c.Range.equalsRange(this.range,U.range)}}e.StackFrame=m;class b{constructor(U,H,K){this.session=U,this.name=H,this.threadId=K,this.callStackCancellationTokens=[],this.reachedEndOfCallStack=!1,this.callStack=[],this.staleCallStack=[],this.stopped=!1}getId(){return`thread:${this.session.getId()}:${this.threadId}`}clearCallStack(){this.callStack.length&&(this.staleCallStack=this.callStack),this.callStack=[],this.callStackCancellationTokens.forEach(U=>U.dispose(!0)),this.callStackCancellationTokens=[]}getCallStack(){return this.callStack}getStaleCallStack(){return this.staleCallStack}getTopStackFrame(){const U=this.getCallStack();return U.find(K=>!!(K&&(this.stoppedDetails?.reason==="instruction breakpoint"||this.stoppedDetails?.reason==="step"&&this.lastSteppingGranularity==="instruction")&&K.instructionPointerReference||K.source&&K.source.available&&K.source.presentationHint!=="deemphasize"))||(U.length>0?U[0]:void 0)}get stateLabel(){return this.stoppedDetails?this.stoppedDetails.description||(this.stoppedDetails.reason?i.localize(3,null,this.stoppedDetails.reason):i.localize(4,null)):i.localize(5,null)}async fetchCallStack(U=20){if(this.stopped){const H=this.callStack.length,K=await this.getCallStackImpl(H,U);this.reachedEndOfCallStack=K.length<U,H<this.callStack.length&&this.callStack.splice(H,this.callStack.length-H),this.callStack=this.callStack.concat(K||[]),typeof this.stoppedDetails?.totalFrames=="number"&&this.stoppedDetails.totalFrames===this.callStack.length&&(this.reachedEndOfCallStack=!0)}}async getCallStackImpl(U,H){try{const K=new A.CancellationTokenSource;this.callStackCancellationTokens.push(K);const G=await this.session.stackTrace(this.threadId,U,H,K.token);return!G||!G.body||K.token.isCancellationRequested?[]:(this.stoppedDetails&&(this.stoppedDetails.totalFrames=G.body.totalFrames),G.body.stackFrames.map((q,Z)=>{const j=this.session.getSource(q.source);return new m(this,q.id,j,q.name,q.presentationHint,new c.Range(q.line,q.column,q.endLine||q.line,q.endColumn||q.column),U+Z,typeof q.canRestart=="boolean"?q.canRestart:!0,q.instructionPointerReference)}))}catch(K){return this.stoppedDetails&&(this.stoppedDetails.framesErrorMessage=K.message),[]}}get exceptionInfo(){return this.stoppedDetails&&this.stoppedDetails.reason==="exception"?this.session.capabilities.supportsExceptionInfoRequest?this.session.exceptionInfo(this.threadId):Promise.resolve({description:this.stoppedDetails.text,breakMode:null}):Promise.resolve(void 0)}next(U){return this.session.next(this.threadId,U)}stepIn(U){return this.session.stepIn(this.threadId,void 0,U)}stepOut(U){return this.session.stepOut(this.threadId,U)}stepBack(U){return this.session.stepBack(this.threadId,U)}continue(){return this.session.continue(this.threadId)}pause(){return this.session.pause(this.threadId)}terminate(){return this.session.terminateThreads([this.threadId])}reverseContinue(){return this.session.reverseContinue(this.threadId)}}e.Thread=b;const E=(z,U,H,K="memory")=>C.URI.from({scheme:s.DEBUG_MEMORY_SCHEME,authority:z,path:"/"+encodeURIComponent(U)+`/${encodeURIComponent(K)}.bin`,query:H?`?range=${H.fromOffset}:${H.toOffset}`:void 0});e.getUriForDebugMemory=E;class y extends D.Disposable{constructor(U,H){super();this.memoryReference=U,this.session=H,this.invalidateEmitter=this._register(new k.Emitter),this.onDidInvalidate=this.invalidateEmitter.event,this.writable=!!this.session.capabilities.supportsWriteMemoryRequest,this._register(H.onDidInvalidateMemory(K=>{K.body.memoryReference===U&&this.invalidate(K.body.offset,K.body.count-K.body.offset)}))}async read(U,H){const K=H-U,G=U,q=await this.session.readMemory(this.memoryReference,G,K);if(q===void 0||!q.body?.data)return[{type:1,offset:G,length:K}];let Z;try{Z=(0,_.decodeBase64)(q.body.data)}catch{return[{type:2,offset:G,length:K,error:"Invalid base64 data from debug adapter"}]}const j=q.body.unreadableBytes||0,X=K-j;if(Z.byteLength<X){const Y=_.VSBuffer.alloc(X-Z.byteLength);Y.buffer.fill(0),Z=_.VSBuffer.concat([Z,Y],X)}else Z.byteLength>X&&(Z=Z.slice(0,X));return j?[{type:0,offset:G,length:X,data:Z},{type:1,offset:G+X,length:j}]:[{type:0,offset:G,length:K,data:Z}]}async write(U,H){const G=(await this.session.writeMemory(this.memoryReference,U,(0,_.encodeBase64)(H),!0))?.body?.bytesWritten??H.byteLength;return this.invalidate(U,U+G),G}dispose(){super.dispose()}invalidate(U,H){this.invalidateEmitter.fire({fromOffset:U,toOffset:H})}}e.MemoryRegion=y;class T{constructor(U,H){this.enabled=U,this.id=H}getId(){return this.id}}e.Enablement=T;function R(z,U){return(0,I.mixin)({supportsConditionalBreakpoints:!!U.supportsConditionalBreakpoints,supportsHitConditionalBreakpoints:!!U.supportsHitConditionalBreakpoints,supportsLogPoints:!!U.supportsLogPoints,supportsFunctionBreakpoints:!!U.supportsFunctionBreakpoints,supportsDataBreakpoints:!!U.supportsDataBreakpoints,supportsInstructionBreakpoints:!!U.supportsInstructionBreakpoints},z)}class O extends T{constructor(U,H,K,G,q){super(U,q);this.hitCondition=H,this.condition=K,this.logMessage=G,this.sessionData=new Map,U===void 0&&(this.enabled=!0)}setSessionData(U,H){H?(H.sessionId=U,this.sessionData.set(U,H)):this.sessionData.delete(U);const K=Array.from(this.sessionData.values()),G=(0,t.distinct)(K.filter(q=>q.verified),q=>`${q.line}:${q.column}`);G.length?this.data=G.length===1?G[0]:void 0:this.data=K.length?K[0]:void 0}get message(){if(!!this.data)return this.data.message}get verified(){return this.data?this.data.verified:!0}get sessionsThatVerified(){const U=[];for(const[H,K]of this.sessionData)K.verified&&U.push(H);return U}getIdFromAdapter(U){const H=this.sessionData.get(U);return H?H.id:void 0}getDebugProtocolBreakpoint(U){const H=this.sessionData.get(U);if(H)return{id:H.id,verified:H.verified,message:H.message,source:H.source,line:H.line,column:H.column,endLine:H.endLine,endColumn:H.endColumn,instructionReference:H.instructionReference,offset:H.offset}}toJSON(){const U=Object.create(null);return U.enabled=this.enabled,U.condition=this.condition,U.hitCondition=this.hitCondition,U.logMessage=this.logMessage,U}}e.BaseBreakpoint=O;class x extends O{constructor(U,H,K,G,q,Z,j,X,Y,$,J=(0,o.generateUuid)()){super(G,Z,q,j,J);this._uri=U,this._lineNumber=H,this._column=K,this._adapterData=X,this.textFileService=Y,this.uriIdentityService=$}get lineNumber(){return this.verified&&this.data&&typeof this.data.line=="number"?this.data.line:this._lineNumber}get verified(){return this.data?this.data.verified&&!this.textFileService.isDirty(this._uri):!0}get uri(){return this.verified&&this.data&&this.data.source?(0,l.getUriFromSource)(this.data.source,this.data.source.path,this.data.sessionId,this.uriIdentityService):this._uri}get column(){return this.verified&&this.data&&typeof this.data.column=="number"?this.data.column:this._column}get message(){return this.textFileService.isDirty(this.uri)?i.localize(6,null):super.message}get adapterData(){return this.data&&this.data.source&&this.data.source.adapterData?this.data.source.adapterData:this._adapterData}get endLineNumber(){return this.verified&&this.data?this.data.endLine:void 0}get endColumn(){return this.verified&&this.data?this.data.endColumn:void 0}get sessionAgnosticData(){return{lineNumber:this._lineNumber,column:this._column}}get supported(){return this.data?!(this.logMessage&&!this.data.supportsLogPoints||this.condition&&!this.data.supportsConditionalBreakpoints||this.hitCondition&&!this.data.supportsHitConditionalBreakpoints):!0}setSessionData(U,H){super.setSessionData(U,H),this._adapterData||(this._adapterData=this.adapterData)}toJSON(){const U=super.toJSON();return U.uri=this._uri,U.lineNumber=this._lineNumber,U.column=this._column,U.adapterData=this.adapterData,U}toString(){return`${w.basenameOrAuthority(this.uri)} ${this.lineNumber}`}update(U){(0,v.isUndefinedOrNull)(U.lineNumber)||(this._lineNumber=U.lineNumber),(0,v.isUndefinedOrNull)(U.column)||(this._column=U.column),(0,v.isUndefinedOrNull)(U.condition)||(this.condition=U.condition),(0,v.isUndefinedOrNull)(U.hitCondition)||(this.hitCondition=U.hitCondition),(0,v.isUndefinedOrNull)(U.logMessage)||(this.logMessage=U.logMessage)}}e.Breakpoint=x;class F extends O{constructor(U,H,K,G,q,Z=(0,o.generateUuid)()){super(H,K,G,q,Z);this.name=U}toJSON(){const U=super.toJSON();return U.name=this.name,U}get supported(){return this.data?this.data.supportsFunctionBreakpoints:!0}toString(){return this.name}}e.FunctionBreakpoint=F;class L extends O{constructor(U,H,K,G,q,Z,j,X,Y,$=(0,o.generateUuid)()){super(G,q,Z,j,$);this.description=U,this.dataId=H,this.canPersist=K,this.accessTypes=X,this.accessType=Y}toJSON(){const U=super.toJSON();return U.description=this.description,U.dataId=this.dataId,U.accessTypes=this.accessTypes,U.accessType=this.accessType,U}get supported(){return this.data?this.data.supportsDataBreakpoints:!0}toString(){return this.description}}e.DataBreakpoint=L;class M extends O{constructor(U,H,K,G,q,Z,j){super(K,void 0,q,void 0,(0,o.generateUuid)());this.filter=U,this.label=H,this.supportsCondition=G,this.description=Z,this.conditionDescription=j}toJSON(){const U=Object.create(null);return U.filter=this.filter,U.label=this.label,U.enabled=this.enabled,U.supportsCondition=this.supportsCondition,U.condition=this.condition,U}get supported(){return!0}toString(){return this.label}}e.ExceptionBreakpoint=M;class N extends O{constructor(U,H,K,G,q,Z,j,X=(0,o.generateUuid)()){super(G,q,Z,j,X);this.instructionReference=U,this.offset=H,this.canPersist=K}toJSON(){const U=super.toJSON();return U.instructionReference=this.instructionReference,U.offset=this.offset,U}get supported(){return this.data?this.data.supportsInstructionBreakpoints:!0}toString(){return this.instructionReference}}e.InstructionBreakpoint=N;class B{constructor(U,H){this.sessionId=U,this.threadId=H}getId(){return`${this.sessionId}:${this.threadId}`}}e.ThreadAndSessionIds=B;class P{}e.Memory=P;let V=class{constructor(U,H,K){this.textFileService=H,this.uriIdentityService=K,this.schedulers=new Map,this.breakpointsActivated=!0,this._onDidChangeBreakpoints=new k.Emitter,this._onDidChangeCallStack=new k.Emitter,this._onDidChangeWatchExpressions=new k.Emitter,this.breakpoints=U.loadBreakpoints(),this.functionBreakpoints=U.loadFunctionBreakpoints(),this.exceptionBreakpoints=U.loadExceptionBreakpoints(),this.dataBreakpoints=U.loadDataBreakpoints(),this.watchExpressions=U.loadWatchExpressions(),this.instructionBreakpoints=[],this.sessions=[]}getId(){return"root"}getSession(U,H=!1){if(U)return this.getSessions(H).find(K=>K.getId()===U)}getSessions(U=!1){return this.sessions.filter(H=>U||H.state!==0)}addSession(U){this.sessions=this.sessions.filter(G=>!(G.getId()===U.getId()||G.state===0&&G.configuration.name===U.configuration.name));let H=1;for(;this.sessions.some(G=>G.getLabel()===U.getLabel());)U.setName(`${U.configuration.name} ${++H}`);let K=-1;U.parentSession&&(K=(0,t.lastIndex)(this.sessions,G=>G.parentSession===U.parentSession||G===U.parentSession)),K>=0?this.sessions.splice(K+1,0,U):this.sessions.push(U),this._onDidChangeCallStack.fire(void 0)}get onDidChangeBreakpoints(){return this._onDidChangeBreakpoints.event}get onDidChangeCallStack(){return this._onDidChangeCallStack.event}get onDidChangeWatchExpressions(){return this._onDidChangeWatchExpressions.event}rawUpdate(U){const H=this.sessions.find(K=>K.getId()===U.sessionId);H&&(H.rawUpdate(U),this._onDidChangeCallStack.fire(void 0))}clearThreads(U,H,K=void 0){const G=this.sessions.find(q=>q.getId()===U);this.schedulers.forEach(q=>q.dispose()),this.schedulers.clear(),G&&(G.clearThreads(H,K),this._onDidChangeCallStack.fire(void 0))}fetchCallStack(U){if(U.session.capabilities.supportsDelayedStackTraceLoading){let K=Promise.resolve();const G=new Promise((q,Z)=>{K=U.fetchCallStack(1).then(()=>{this.schedulers.has(U.getId())||this.schedulers.set(U.getId(),new f.RunOnceScheduler(()=>{U.fetchCallStack(19).then(()=>{const j=U.getStaleCallStack(),X=U.getCallStack();let Y=j.length!==X.length;for(let $=1;$<j.length&&!Y;$++)Y=!j[$].equals(X[$]);Y&&this._onDidChangeCallStack.fire(),q()})},420)),this.schedulers.get(U.getId()).schedule(),this._onDidChangeCallStack.fire()})});return{topCallStack:K,wholeCallStack:G}}const H=U.fetchCallStack();return{wholeCallStack:H,topCallStack:H}}getBreakpoints(U){if(U){const H=U.uri?U.uri.toString():void 0;return this.breakpoints.filter(K=>!(H&&K.uri.toString()!==H||U.lineNumber&&K.lineNumber!==U.lineNumber||U.column&&K.column!==U.column||U.enabledOnly&&(!this.breakpointsActivated||!K.enabled)))}return this.breakpoints}getFunctionBreakpoints(){return this.functionBreakpoints}getDataBreakpoints(){return this.dataBreakpoints}getExceptionBreakpoints(){return this.exceptionBreakpoints}getInstructionBreakpoints(){return this.instructionBreakpoints}setExceptionBreakpoints(U){if(U){if(this.exceptionBreakpoints.length===U.length&&this.exceptionBreakpoints.every((H,K)=>H.filter===U[K].filter&&H.label===U[K].label&&H.supportsCondition===U[K].supportsCondition&&H.conditionDescription===U[K].conditionDescription&&H.description===U[K].description))return;this.exceptionBreakpoints=U.map(H=>{const K=this.exceptionBreakpoints.filter(G=>G.filter===H.filter).pop();return new M(H.filter,H.label,K?K.enabled:!!H.default,!!H.supportsCondition,K?.condition,H.description,H.conditionDescription)}),this._onDidChangeBreakpoints.fire(void 0)}}setExceptionBreakpointCondition(U,H){U.condition=H,this._onDidChangeBreakpoints.fire(void 0)}areBreakpointsActivated(){return this.breakpointsActivated}setBreakpointsActivated(U){this.breakpointsActivated=U,this._onDidChangeBreakpoints.fire(void 0)}addBreakpoints(U,H,K=!0){const G=H.map(q=>new x(U,q.lineNumber,q.column,q.enabled!==!1,q.condition,q.hitCondition,q.logMessage,void 0,this.textFileService,this.uriIdentityService,q.id));return this.breakpoints=this.breakpoints.concat(G),this.breakpointsActivated=!0,this.sortAndDeDup(),K&&this._onDidChangeBreakpoints.fire({added:G,sessionOnly:!1}),G}removeBreakpoints(U){this.breakpoints=this.breakpoints.filter(H=>!U.some(K=>K.getId()===H.getId())),this._onDidChangeBreakpoints.fire({removed:U,sessionOnly:!1})}updateBreakpoints(U){const H=[];this.breakpoints.forEach(K=>{const G=U.get(K.getId());G&&(K.update(G),H.push(K))}),this.sortAndDeDup(),this._onDidChangeBreakpoints.fire({changed:H,sessionOnly:!1})}setBreakpointSessionData(U,H,K){this.breakpoints.forEach(G=>{if(!K)G.setSessionData(U,void 0);else{const q=K.get(G.getId());q&&G.setSessionData(U,R(q,H))}}),this.functionBreakpoints.forEach(G=>{if(!K)G.setSessionData(U,void 0);else{const q=K.get(G.getId());q&&G.setSessionData(U,R(q,H))}}),this.dataBreakpoints.forEach(G=>{if(!K)G.setSessionData(U,void 0);else{const q=K.get(G.getId());q&&G.setSessionData(U,R(q,H))}}),this.exceptionBreakpoints.forEach(G=>{if(!K)G.setSessionData(U,void 0);else{const q=K.get(G.getId());q&&G.setSessionData(U,R(q,H))}}),this.instructionBreakpoints.forEach(G=>{if(!K)G.setSessionData(U,void 0);else{const q=K.get(G.getId());q&&G.setSessionData(U,R(q,H))}}),this._onDidChangeBreakpoints.fire({sessionOnly:!0})}getDebugProtocolBreakpoint(U,H){const K=this.breakpoints.find(G=>G.getId()===U);if(K)return K.getDebugProtocolBreakpoint(H)}sortAndDeDup(){this.breakpoints=this.breakpoints.sort((U,H)=>U.uri.toString()!==H.uri.toString()?w.basenameOrAuthority(U.uri).localeCompare(w.basenameOrAuthority(H.uri)):U.lineNumber===H.lineNumber?U.column&&H.column?U.column-H.column:1:U.lineNumber-H.lineNumber),this.breakpoints=(0,t.distinct)(this.breakpoints,U=>`${U.uri.toString()}:${U.lineNumber}:${U.column}`)}setEnablement(U,H){if(U instanceof x||U instanceof F||U instanceof M||U instanceof L||U instanceof N){const K=[];U.enabled!==H&&(U instanceof x||U instanceof F||U instanceof L||U instanceof N)&&K.push(U),U.enabled=H,H&&(this.breakpointsActivated=!0),this._onDidChangeBreakpoints.fire({changed:K,sessionOnly:!1})}}enableOrDisableAllBreakpoints(U){const H=[];this.breakpoints.forEach(K=>{K.enabled!==U&&H.push(K),K.enabled=U}),this.functionBreakpoints.forEach(K=>{K.enabled!==U&&H.push(K),K.enabled=U}),this.dataBreakpoints.forEach(K=>{K.enabled!==U&&H.push(K),K.enabled=U}),this.instructionBreakpoints.forEach(K=>{K.enabled!==U&&H.push(K),K.enabled=U}),U&&(this.breakpointsActivated=!0),this._onDidChangeBreakpoints.fire({changed:H,sessionOnly:!1})}addFunctionBreakpoint(U,H){const K=new F(U,!0,void 0,void 0,void 0,H);return this.functionBreakpoints.push(K),this._onDidChangeBreakpoints.fire({added:[K],sessionOnly:!1}),K}updateFunctionBreakpoint(U,H){const K=this.functionBreakpoints.find(G=>G.getId()===U);K&&(typeof H.name=="string"&&(K.name=H.name),typeof H.condition=="string"&&(K.condition=H.condition),typeof H.hitCondition=="string"&&(K.hitCondition=H.hitCondition),this._onDidChangeBreakpoints.fire({changed:[K],sessionOnly:!1}))}removeFunctionBreakpoints(U){let H;U?(H=this.functionBreakpoints.filter(K=>K.getId()===U),this.functionBreakpoints=this.functionBreakpoints.filter(K=>K.getId()!==U)):(H=this.functionBreakpoints,this.functionBreakpoints=[]),this._onDidChangeBreakpoints.fire({removed:H,sessionOnly:!1})}addDataBreakpoint(U,H,K,G,q){const Z=new L(U,H,K,!0,void 0,void 0,void 0,G,q);this.dataBreakpoints.push(Z),this._onDidChangeBreakpoints.fire({added:[Z],sessionOnly:!1})}removeDataBreakpoints(U){let H;U?(H=this.dataBreakpoints.filter(K=>K.getId()===U),this.dataBreakpoints=this.dataBreakpoints.filter(K=>K.getId()!==U)):(H=this.dataBreakpoints,this.dataBreakpoints=[]),this._onDidChangeBreakpoints.fire({removed:H,sessionOnly:!1})}addInstructionBreakpoint(U,H,K,G){const q=new N(U,H,!1,!0,G,K,void 0);this.instructionBreakpoints.push(q),this._onDidChangeBreakpoints.fire({added:[q],sessionOnly:!0})}removeInstructionBreakpoints(U){let H;U?(H=this.instructionBreakpoints.filter(K=>K.instructionReference===U),this.instructionBreakpoints=this.instructionBreakpoints.filter(K=>K.instructionReference!==U)):(H=this.instructionBreakpoints,this.instructionBreakpoints=[]),this._onDidChangeBreakpoints.fire({removed:H,sessionOnly:!1})}getWatchExpressions(){return this.watchExpressions}addWatchExpression(U){const H=new n(U||"");return this.watchExpressions.push(H),this._onDidChangeWatchExpressions.fire(H),H}renameWatchExpression(U,H){const K=this.watchExpressions.filter(G=>G.getId()===U);K.length===1&&(K[0].name=H,this._onDidChangeWatchExpressions.fire(K[0]))}removeWatchExpressions(U=null){this.watchExpressions=U?this.watchExpressions.filter(H=>H.getId()!==U):[],this._onDidChangeWatchExpressions.fire(void 0)}moveWatchExpression(U,H){const K=this.watchExpressions.find(G=>G.getId()===U);K&&(this.watchExpressions=this.watchExpressions.filter(G=>G.getId()!==U),this.watchExpressions=this.watchExpressions.slice(0,H).concat(K,this.watchExpressions.slice(H)),this._onDidChangeWatchExpressions.fire(void 0))}sourceIsNotAvailable(U){this.sessions.forEach(H=>{const K=H.getSourceForUri(U);K&&(K.available=!1)}),this._onDidChangeCallStack.fire(void 0)}};V=Ee([W(1,p.ITextFileService),W(2,S.IUriIdentityService)],V),e.DebugModel=V}),define(ne[503],re([1,0,19,10,36,90,179,37,5,38,12,2,183,71,68,8,21,131,45,7,129,43,41,27,190,16,1492,73,106,78,33,15,412]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getBreakpointMessageAndIcon=e.openBreakpointSource=e.BreakpointsView=e.getExpandedBodySize=void 0;const x=f.$;function F(){const Y=x("input");return Y.type="checkbox",Y.tabIndex=-1,u.Gesture.ignoreTarget(Y),Y}const L=9;function M(Y,$){const J=Y.getBreakpoints().length+Y.getExceptionBreakpoints().length+Y.getFunctionBreakpoints().length+Y.getDataBreakpoints().length+Y.getInstructionBreakpoints().length;return Math.min($,J)*22}e.getExpandedBodySize=M;let N=class extends l.ViewPane{constructor($,J,ee,te,se,ie,ce,le,ae,ue,oe,fe,pe,me,be){super($,te,J,ae,oe,ue,se,fe,ie,pe);this.debugService=ee,this.editorService=ce,this.contextViewService=le,this.labelService=me,this.needsRefresh=!1,this.needsStateChange=!1,this.ignoreLayout=!1,this.autoFocusedIndex=-1,this.menu=be.createMenu(d.MenuId.DebugBreakpointsContext,oe),this._register(this.menu),this.breakpointItemType=A.CONTEXT_BREAKPOINT_ITEM_TYPE.bindTo(oe),this.breakpointSupportsCondition=A.CONTEXT_BREAKPOINT_SUPPORTS_CONDITION.bindTo(oe),this.breakpointInputFocused=A.CONTEXT_BREAKPOINT_INPUT_FOCUSED.bindTo(oe),this._register(this.debugService.getModel().onDidChangeBreakpoints(()=>this.onBreakpointsChange())),this._register(this.debugService.onDidChangeState(()=>this.onStateChange()))}renderBody($){super.renderBody($),this.element.classList.add("debug-pane"),$.classList.add("debug-breakpoints");const J=new B(this);this.list=this.instantiationService.createInstance(c.WorkbenchList,"Breakpoints",$,J,[this.instantiationService.createInstance(V,this.menu,this.breakpointSupportsCondition,this.breakpointItemType),new z(this.menu,this.breakpointSupportsCondition,this.breakpointItemType,this.debugService),new q(this,this.debugService,this.contextViewService,this.themeService),this.instantiationService.createInstance(U,this.menu,this.breakpointSupportsCondition,this.breakpointItemType),this.instantiationService.createInstance(H),new G(this,this.debugService,this.contextViewService,this.themeService,this.labelService),this.instantiationService.createInstance(K)],{identityProvider:{getId:te=>te.getId()},multipleSelectionSupport:!1,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:te=>te},accessibilityProvider:new Z(this.debugService,this.labelService),overrideStyles:{listBackground:this.getBackgroundColor()}}),A.CONTEXT_BREAKPOINTS_FOCUSED.bindTo(this.list.contextKeyService),this._register(this.list.onContextMenu(this.onListContextMenu,this)),this.list.onMouseMiddleClick(async({element:te})=>{te instanceof k.Breakpoint?await this.debugService.removeBreakpoints(te.getId()):te instanceof k.FunctionBreakpoint?await this.debugService.removeFunctionBreakpoints(te.getId()):te instanceof k.DataBreakpoint?await this.debugService.removeDataBreakpoints(te.getId()):te instanceof k.InstructionBreakpoint&&await this.debugService.removeInstructionBreakpoints(te.instructionReference)}),this._register(this.list.onDidOpen(async te=>{!te.element||te.browserEvent instanceof MouseEvent&&te.browserEvent.button===1||(te.element instanceof k.Breakpoint&&j(te.element,te.sideBySide,te.editorOptions.preserveFocus||!1,te.editorOptions.pinned||!te.editorOptions.preserveFocus,this.debugService,this.editorService),te.element instanceof k.InstructionBreakpoint&&(await this.editorService.openEditor(O.DisassemblyViewInput.instance)).goToAddress(te.element.instructionReference,te.browserEvent instanceof MouseEvent&&te.browserEvent.detail===2),te.browserEvent instanceof MouseEvent&&te.browserEvent.detail===2&&te.element instanceof k.FunctionBreakpoint&&te.element!==this.inputBoxData?.breakpoint&&this.renderInputBox({breakpoint:te.element,type:"name"}))})),this.list.splice(0,this.list.length,this.elements),this._register(this.onDidChangeBodyVisibility(te=>{te&&(this.needsRefresh&&this.onBreakpointsChange(),this.needsStateChange&&this.onStateChange())}));const ee=this.viewDescriptorService.getViewContainerModel(this.viewDescriptorService.getViewContainerByViewId(this.id));this._register(ee.onDidChangeAllViewDescriptors(()=>{this.updateSize()}))}focus(){super.focus(),this.list&&this.list.domFocus()}renderInputBox($){this._inputBoxData=$,this.onBreakpointsChange(),this._inputBoxData=void 0}get inputBoxData(){return this._inputBoxData}layoutBody($,J){if(!this.ignoreLayout){super.layoutBody($,J),this.list&&this.list.layout($,J);try{this.ignoreLayout=!0,this.updateSize()}finally{this.ignoreLayout=!1}}}onListContextMenu($){const J=$.element,ee=J instanceof k.Breakpoint?"breakpoint":J instanceof k.ExceptionBreakpoint?"exceptionBreakpoint":J instanceof k.FunctionBreakpoint?"functionBreakpoint":J instanceof k.DataBreakpoint?"dataBreakpoint":J instanceof k.InstructionBreakpoint?"instructionBreakpoint":void 0;this.breakpointItemType.set(ee);const te=this.debugService.getViewModel().focusedSession,se=J instanceof k.ExceptionBreakpoint?J.supportsCondition:!te||!!te.capabilities.supportsConditionalBreakpoints;this.breakpointSupportsCondition.set(se);const ie=[],ce=(0,b.createAndFillInContextMenuActions)(this.menu,{arg:$.element,shouldForwardArgs:!1},{primary:[],secondary:ie},"inline");this.contextMenuService.showContextMenu({getAnchor:()=>$.anchor,getActions:()=>ie,getActionsContext:()=>J,onHide:()=>(0,C.dispose)(ce)})}updateSize(){const $=this.viewDescriptorService.getViewContainerModel(this.viewDescriptorService.getViewContainerByViewId(this.id));this.minimumBodySize=this.orientation===0?M(this.debugService.getModel(),L):170,this.maximumBodySize=this.orientation===0&&$.visibleViewDescriptors.length>1?M(this.debugService.getModel(),Number.POSITIVE_INFINITY):Number.POSITIVE_INFINITY}onBreakpointsChange(){if(this.isBodyVisible()){if(this.updateSize(),this.list){const $=this.list.getFocus()[0],J=$&&!this.elements.includes(this.list.element($));this.list.splice(0,this.list.length,this.elements),this.needsRefresh=!1,J&&this.list.focusNth(Math.min($,this.list.length-1))}}else this.needsRefresh=!0}onStateChange(){if(this.isBodyVisible()){this.needsStateChange=!1;const $=this.debugService.getViewModel().focusedThread;let J=!1;if($&&$.stoppedDetails&&$.stoppedDetails.hitBreakpointIds&&$.stoppedDetails.hitBreakpointIds.length>0){const ee=$.stoppedDetails.hitBreakpointIds,se=this.elements.findIndex(ie=>{const ce=ie.getIdFromAdapter($.session.getId());return typeof ce=="number"&&ee.indexOf(ce)!==-1});se>=0&&(this.list.setFocus([se]),this.list.setSelection([se]),J=!0,this.autoFocusedIndex=se)}if(!J){const ee=this.list.getFocus(),te=this.list.getSelection();this.autoFocusedIndex>=0&&(0,R.equals)(ee,te)&&ee.indexOf(this.autoFocusedIndex)>=0&&(this.list.setFocus([]),this.list.setSelection([])),this.autoFocusedIndex=-1}}else this.needsStateChange=!0}get elements(){const $=this.debugService.getModel();return $.getExceptionBreakpoints().concat($.getFunctionBreakpoints()).concat($.getDataBreakpoints()).concat($.getBreakpoints()).concat($.getInstructionBreakpoints())}};N=Ee([W(1,D.IContextMenuService),W(2,A.IDebugService),W(3,w.IKeybindingService),W(4,I.IInstantiationService),W(5,v.IThemeService),W(6,s.IEditorService),W(7,D.IContextViewService),W(8,S.IConfigurationService),W(9,a.IViewDescriptorService),W(10,p.IContextKeyService),W(11,n.IOpenerService),W(12,h.ITelemetryService),W(13,r.ILabelService),W(14,d.IMenuService)],N),e.BreakpointsView=N;class B{constructor($){this.view=$}getHeight($){return 22}getTemplateId($){if($ instanceof k.Breakpoint)return V.ID;if($ instanceof k.FunctionBreakpoint){const J=this.view.inputBoxData?.breakpoint;return!$.name||J&&J.getId()===$.getId()?G.ID:U.ID}if($ instanceof k.ExceptionBreakpoint){const J=this.view.inputBoxData?.breakpoint;return J&&J.getId()===$.getId()?q.ID:z.ID}return $ instanceof k.DataBreakpoint?H.ID:$ instanceof k.InstructionBreakpoint?K.ID:""}}const P=new Map;let V=class ha{constructor($,J,ee,te,se){this.menu=$,this.breakpointSupportsCondition=J,this.breakpointItemType=ee,this.debugService=te,this.labelService=se}get templateId(){return ha.ID}renderTemplate($){const J=Object.create(null);J.breakpoint=f.append($,x(".breakpoint")),J.icon=x(".icon"),J.checkbox=F(),J.toDispose=[],J.elementDisposable=[],J.toDispose.push(f.addStandardDisposableListener(J.checkbox,"change",te=>{this.debugService.enableOrDisableBreakpoints(!J.context.enabled,J.context)})),f.append(J.breakpoint,J.icon),f.append(J.breakpoint,J.checkbox),J.name=f.append(J.breakpoint,x("span.name")),J.filePath=f.append(J.breakpoint,x("span.file-path")),J.actionBar=new y.ActionBar(J.breakpoint),J.toDispose.push(J.actionBar);const ee=f.append(J.breakpoint,x(".line-number-container"));return J.lineNumber=f.append(ee,x("span.line-number.monaco-count-badge")),J}renderElement($,J,ee){ee.context=$,ee.breakpoint.classList.toggle("disabled",!this.debugService.getModel().areBreakpointsActivated()),ee.name.textContent=t.basenameOrAuthority($.uri),ee.lineNumber.textContent=$.lineNumber.toString(),$.column&&(ee.lineNumber.textContent+=`:${$.column}`),ee.filePath.textContent=this.labelService.getUriLabel(t.dirname($.uri),{relative:!0}),ee.checkbox.checked=$.enabled;const{message:te,icon:se}=X(this.debugService.state,this.debugService.getModel().areBreakpointsActivated(),$,this.labelService);ee.icon.className=v.ThemeIcon.asClassName(se),ee.breakpoint.title=$.message||te||"",(this.debugService.state===3||this.debugService.state===2)&&!$.verified&&ee.breakpoint.classList.add("disabled");const ce=[],le=this.debugService.getViewModel().focusedSession;this.breakpointSupportsCondition.set(!le||!!le.capabilities.supportsConditionalBreakpoints),this.breakpointItemType.set("breakpoint"),ee.elementDisposable.push((0,b.createAndFillInActionBarActions)(this.menu,{arg:$,shouldForwardArgs:!0},{primary:ce,secondary:[]},"inline")),ee.actionBar.clear(),ee.actionBar.push(ce,{icon:!0,label:!1}),P.set($.getId(),ee.actionBar.domNode)}disposeElement($,J,ee){(0,C.dispose)(ee.elementDisposable)}disposeTemplate($){(0,C.dispose)($.toDispose)}};V.ID="breakpoints",V=Ee([W(3,A.IDebugService),W(4,r.ILabelService)],V);class z{constructor($,J,ee,te){this.menu=$,this.breakpointSupportsCondition=J,this.breakpointItemType=ee,this.debugService=te}get templateId(){return z.ID}renderTemplate($){const J=Object.create(null);return J.breakpoint=f.append($,x(".breakpoint")),J.checkbox=F(),J.toDispose=[],J.elementDisposable=[],J.toDispose.push(f.addStandardDisposableListener(J.checkbox,"change",ee=>{this.debugService.enableOrDisableBreakpoints(!J.context.enabled,J.context)})),f.append(J.breakpoint,J.checkbox),J.name=f.append(J.breakpoint,x("span.name")),J.condition=f.append(J.breakpoint,x("span.condition")),J.breakpoint.classList.add("exception"),J.actionBar=new y.ActionBar(J.breakpoint),J.toDispose.push(J.actionBar),J}renderElement($,J,ee){ee.context=$,ee.name.textContent=$.label||`${$.filter} exceptions`,ee.breakpoint.title=$.verified?$.description||ee.name.textContent:$.message||(0,m.localize)(0,null),ee.breakpoint.classList.toggle("disabled",!$.verified),ee.checkbox.checked=$.enabled,ee.condition.textContent=$.condition||"",ee.condition.title=(0,m.localize)(1,null,$.condition);const te=[];this.breakpointSupportsCondition.set($.supportsCondition),this.breakpointItemType.set("exceptionBreakpoint"),ee.elementDisposable.push((0,b.createAndFillInActionBarActions)(this.menu,{arg:$,shouldForwardArgs:!0},{primary:te,secondary:[]},"inline")),ee.actionBar.clear(),ee.actionBar.push(te,{icon:!0,label:!1}),P.set($.getId(),ee.actionBar.domNode)}disposeElement($,J,ee){(0,C.dispose)(ee.elementDisposable)}disposeTemplate($){(0,C.dispose)($.toDispose)}}z.ID="exceptionbreakpoints";let U=class ga{constructor($,J,ee,te,se){this.menu=$,this.breakpointSupportsCondition=J,this.breakpointItemType=ee,this.debugService=te,this.labelService=se}get templateId(){return ga.ID}renderTemplate($){const J=Object.create(null);return J.breakpoint=f.append($,x(".breakpoint")),J.icon=x(".icon"),J.checkbox=F(),J.toDispose=[],J.elementDisposable=[],J.toDispose.push(f.addStandardDisposableListener(J.checkbox,"change",ee=>{this.debugService.enableOrDisableBreakpoints(!J.context.enabled,J.context)})),f.append(J.breakpoint,J.icon),f.append(J.breakpoint,J.checkbox),J.name=f.append(J.breakpoint,x("span.name")),J.condition=f.append(J.breakpoint,x("span.condition")),J.actionBar=new y.ActionBar(J.breakpoint),J.toDispose.push(J.actionBar),J}renderElement($,J,ee){ee.context=$,ee.name.textContent=$.name;const{icon:te,message:se}=X(this.debugService.state,this.debugService.getModel().areBreakpointsActivated(),$,this.labelService);ee.icon.className=v.ThemeIcon.asClassName(te),ee.icon.title=se||"",ee.checkbox.checked=$.enabled,ee.breakpoint.title=se||"",$.condition&&$.hitCondition?ee.condition.textContent=(0,m.localize)(2,null,$.condition,$.hitCondition):ee.condition.textContent=$.condition||$.hitCondition||"";const ie=this.debugService.getViewModel().focusedSession;ee.breakpoint.classList.toggle("disabled",ie&&!ie.capabilities.supportsFunctionBreakpoints||!this.debugService.getModel().areBreakpointsActivated()),ie&&!ie.capabilities.supportsFunctionBreakpoints&&(ee.breakpoint.title=(0,m.localize)(3,null));const ce=[];this.breakpointSupportsCondition.set(!ie||!!ie.capabilities.supportsConditionalBreakpoints),this.breakpointItemType.set("functionBreakpoint"),ee.elementDisposable.push((0,b.createAndFillInActionBarActions)(this.menu,{arg:$,shouldForwardArgs:!0},{primary:ce,secondary:[]},"inline")),ee.actionBar.clear(),ee.actionBar.push(ce,{icon:!0,label:!1}),P.set($.getId(),ee.actionBar.domNode)}disposeElement($,J,ee){(0,C.dispose)(ee.elementDisposable)}disposeTemplate($){(0,C.dispose)($.toDispose)}};U.ID="functionbreakpoints",U=Ee([W(3,A.IDebugService),W(4,r.ILabelService)],U);let H=class fa{constructor($,J){this.debugService=$,this.labelService=J}get templateId(){return fa.ID}renderTemplate($){const J=Object.create(null);return J.breakpoint=f.append($,x(".breakpoint")),J.icon=x(".icon"),J.checkbox=F(),J.toDispose=[],J.toDispose.push(f.addStandardDisposableListener(J.checkbox,"change",ee=>{this.debugService.enableOrDisableBreakpoints(!J.context.enabled,J.context)})),f.append(J.breakpoint,J.icon),f.append(J.breakpoint,J.checkbox),J.name=f.append(J.breakpoint,x("span.name")),J.accessType=f.append(J.breakpoint,x("span.access-type")),J}renderElement($,J,ee){ee.context=$,ee.name.textContent=$.description;const{icon:te,message:se}=X(this.debugService.state,this.debugService.getModel().areBreakpointsActivated(),$,this.labelService);ee.icon.className=v.ThemeIcon.asClassName(te),ee.icon.title=se||"",ee.checkbox.checked=$.enabled,ee.breakpoint.title=se||"";const ie=this.debugService.getViewModel().focusedSession;if(ee.breakpoint.classList.toggle("disabled",ie&&!ie.capabilities.supportsDataBreakpoints||!this.debugService.getModel().areBreakpointsActivated()),ie&&!ie.capabilities.supportsDataBreakpoints&&(ee.breakpoint.title=(0,m.localize)(4,null)),$.accessType){const ce=$.accessType==="read"?(0,m.localize)(5,null):$.accessType==="write"?(0,m.localize)(6,null):(0,m.localize)(7,null);ee.accessType.textContent=ce}else ee.accessType.textContent=""}disposeTemplate($){(0,C.dispose)($.toDispose)}};H.ID="databreakpoints",H=Ee([W(0,A.IDebugService),W(1,r.ILabelService)],H);let K=class pa{constructor($,J){this.debugService=$,this.labelService=J}get templateId(){return pa.ID}renderTemplate($){const J=Object.create(null);return J.breakpoint=f.append($,x(".breakpoint")),J.icon=x(".icon"),J.checkbox=F(),J.toDispose=[],J.elementDisposable=[],J.toDispose.push(f.addStandardDisposableListener(J.checkbox,"change",ee=>{this.debugService.enableOrDisableBreakpoints(!J.context.enabled,J.context)})),f.append(J.breakpoint,J.icon),f.append(J.breakpoint,J.checkbox),J.name=f.append(J.breakpoint,x("span.name")),J.address=f.append(J.breakpoint,x("span.file-path")),J.actionBar=new y.ActionBar(J.breakpoint),J.toDispose.push(J.actionBar),J}renderElement($,J,ee){ee.context=$,ee.breakpoint.classList.toggle("disabled",!this.debugService.getModel().areBreakpointsActivated()),ee.name.textContent=$.instructionReference,ee.checkbox.checked=$.enabled;const{message:te,icon:se}=X(this.debugService.state,this.debugService.getModel().areBreakpointsActivated(),$,this.labelService);ee.icon.className=v.ThemeIcon.asClassName(se),ee.breakpoint.title=$.message||te||"",(this.debugService.state===3||this.debugService.state===2)&&!$.verified&&ee.breakpoint.classList.add("disabled")}disposeElement($,J,ee){(0,C.dispose)(ee.elementDisposable)}disposeTemplate($){(0,C.dispose)($.toDispose)}};K.ID="instructionBreakpoints",K=Ee([W(0,A.IDebugService),W(1,r.ILabelService)],K);class G{constructor($,J,ee,te,se){this.view=$,this.debugService=J,this.contextViewService=ee,this.themeService=te,this.labelService=se}get templateId(){return G.ID}renderTemplate($){const J=Object.create(null),ee=f.append($,x(".breakpoint"));J.icon=x(".icon"),J.checkbox=F(),f.append(ee,J.icon),f.append(ee,J.checkbox),this.view.breakpointInputFocused.set(!0);const te=f.append(ee,x(".inputBoxContainer")),se=new o.InputBox(te,this.contextViewService),ie=(0,i.attachInputBoxStyler)(se,this.themeService),ce=[se,ie],le=ae=>{this.view.breakpointInputFocused.set(!1);const ue=J.breakpoint.getId();ae?(J.type==="name"&&this.debugService.updateFunctionBreakpoint(ue,{name:se.value}),J.type==="condition"&&this.debugService.updateFunctionBreakpoint(ue,{condition:se.value}),J.type==="hitCount"&&this.debugService.updateFunctionBreakpoint(ue,{hitCondition:se.value})):J.type==="name"&&!J.breakpoint.name?this.debugService.removeFunctionBreakpoints(ue):this.view.renderInputBox(void 0)};return ce.push(f.addStandardDisposableListener(se.inputElement,"keydown",ae=>{const ue=ae.equals(9),oe=ae.equals(3);(ue||oe)&&(ae.preventDefault(),ae.stopPropagation(),le(oe))})),ce.push(f.addDisposableListener(se.inputElement,"blur",()=>{setTimeout(()=>{le(!!se.value)})})),J.inputBox=se,J.toDispose=ce,J}renderElement($,J,ee){ee.breakpoint=$,ee.type=this.view.inputBoxData?.type||"name";const{icon:te,message:se}=X(this.debugService.state,this.debugService.getModel().areBreakpointsActivated(),$,this.labelService);ee.icon.className=v.ThemeIcon.asClassName(te),ee.icon.title=se||"",ee.checkbox.checked=$.enabled,ee.checkbox.disabled=!0,ee.inputBox.value=$.name||"";let ie=(0,m.localize)(8,null),ce=(0,m.localize)(9,null);ee.type==="condition"?(ee.inputBox.value=$.condition||"",ie=(0,m.localize)(10,null),ce=(0,m.localize)(11,null)):ee.type==="hitCount"&&(ee.inputBox.value=$.hitCondition||"",ie=(0,m.localize)(12,null),ce=(0,m.localize)(13,null)),ee.inputBox.setAriaLabel(ce),ee.inputBox.setPlaceHolder(ie),setTimeout(()=>{ee.inputBox.focus(),ee.inputBox.select()},0)}disposeTemplate($){(0,C.dispose)($.toDispose)}}G.ID="functionbreakpointinput";class q{constructor($,J,ee,te){this.view=$,this.debugService=J,this.contextViewService=ee,this.themeService=te}get templateId(){return q.ID}renderTemplate($){const J=Object.create(null),ee=f.append($,x(".breakpoint"));ee.classList.add("exception"),J.checkbox=F(),f.append(ee,J.checkbox),this.view.breakpointInputFocused.set(!0);const te=f.append(ee,x(".inputBoxContainer")),se=new o.InputBox(te,this.contextViewService,{ariaLabel:(0,m.localize)(14,null)}),ie=(0,i.attachInputBoxStyler)(se,this.themeService),ce=[se,ie],le=ae=>{this.view.breakpointInputFocused.set(!1);let ue=J.breakpoint.condition;ae&&(ue=se.value!==""?se.value:void 0),this.debugService.setExceptionBreakpointCondition(J.breakpoint,ue)};return ce.push(f.addStandardDisposableListener(se.inputElement,"keydown",ae=>{const ue=ae.equals(9),oe=ae.equals(3);(ue||oe)&&(ae.preventDefault(),ae.stopPropagation(),le(oe))})),ce.push(f.addDisposableListener(se.inputElement,"blur",()=>{setTimeout(()=>{le(!0)})})),J.inputBox=se,J.toDispose=ce,J}renderElement($,J,ee){const te=$.conditionDescription||(0,m.localize)(15,null);ee.inputBox.setPlaceHolder(te),ee.breakpoint=$,ee.checkbox.checked=$.enabled,ee.checkbox.disabled=!0,ee.inputBox.value=$.condition||"",setTimeout(()=>{ee.inputBox.focus(),ee.inputBox.select()},0)}disposeTemplate($){(0,C.dispose)($.toDispose)}}q.ID="exceptionbreakpointinput";class Z{constructor($,J){this.debugService=$,this.labelService=J}getWidgetAriaLabel(){return(0,m.localize)(16,null)}getRole(){return"checkbox"}isChecked($){return $.enabled}getAriaLabel($){if($ instanceof k.ExceptionBreakpoint)return $.toString();const{message:J}=X(this.debugService.state,this.debugService.getModel().areBreakpointsActivated(),$,this.labelService),ee=$.toString();return J?`${ee}, ${J}`:ee}}function j(Y,$,J,ee,te,se){if(Y.uri.scheme===A.DEBUG_SCHEME&&te.state===0)return Promise.resolve(void 0);const ie=Y.endLineNumber?{startLineNumber:Y.lineNumber,endLineNumber:Y.endLineNumber,startColumn:Y.column||1,endColumn:Y.endColumn||1073741824}:{startLineNumber:Y.lineNumber,startColumn:Y.column||1,endLineNumber:Y.lineNumber,endColumn:Y.column||1073741824};return se.openEditor({resource:Y.uri,options:{preserveFocus:J,selection:ie,revealIfOpened:!0,selectionRevealType:1,pinned:ee}},$?s.SIDE_GROUP:s.ACTIVE_GROUP)}e.openBreakpointSource=j;function X(Y,$,J,ee){const te=Y===3||Y===2,se=J instanceof k.DataBreakpoint?g.dataBreakpoint:J instanceof k.FunctionBreakpoint?g.functionBreakpoint:J.logMessage?g.logBreakpoint:g.breakpoint;if(!J.enabled||!$)return{icon:se.disabled,message:J.logMessage?(0,m.localize)(17,null):(0,m.localize)(18,null)};const ie=le=>"message"in J&&J.message?le.concat(", "+J.message):le;if(te&&!J.verified)return{icon:se.unverified,message:"message"in J&&J.message?J.message:J.logMessage?(0,m.localize)(19,null):(0,m.localize)(20,null)};if(J instanceof k.DataBreakpoint)return J.supported?{icon:se.regular,message:J.message||(0,m.localize)(22,null)}:{icon:se.unverified,message:(0,m.localize)(21,null)};if(J instanceof k.FunctionBreakpoint){if(!J.supported)return{icon:se.unverified,message:(0,m.localize)(23,null)};const le=[];return le.push(J.message||(0,m.localize)(24,null)),J.condition&&le.push((0,m.localize)(25,null,J.condition)),J.hitCondition&&le.push((0,m.localize)(26,null,J.hitCondition)),{icon:se.regular,message:ie(le.join(` `))}}if(J instanceof k.InstructionBreakpoint){if(!J.supported)return{icon:se.unverified,message:(0,m.localize)(27,null)};const le=[];return J.message?le.push(J.message):J.instructionReference?le.push((0,m.localize)(28,null,J.instructionReference)):le.push((0,m.localize)(29,null)),J.hitCondition&&le.push((0,m.localize)(30,null,J.hitCondition)),{icon:se.regular,message:ie(le.join(` `))}}if(J.logMessage||J.condition||J.hitCondition){const le=[];return J.supported?(J.logMessage&&le.push((0,m.localize)(32,null,J.logMessage)),J.condition&&le.push((0,m.localize)(33,null,J.condition)),J.hitCondition&&le.push((0,m.localize)(34,null,J.hitCondition)),{icon:J.logMessage?g.logBreakpoint.regular:g.conditionalBreakpoint.regular,message:ie(le.join(` `))}):{icon:g.debugBreakpointUnsupported,message:(0,m.localize)(31,null)}}const ce="message"in J&&J.message?J.message:J instanceof k.Breakpoint&&ee?ee.getUriLabel(J.uri):(0,m.localize)(35,null);return{icon:se.regular,message:ce}}e.getBreakpointMessageAndIcon=X,(0,d.registerAction2)(class extends d.Action2{constructor(){super({id:"workbench.debug.viewlet.action.addFunctionBreakpointAction",title:{value:(0,m.localize)(36,null),original:"Add Function Breakpoint",mnemonicTitle:(0,m.localize)(37,null)},f1:!0,icon:g.watchExpressionsAddFuncBreakpoint,menu:[{id:d.MenuId.ViewTitle,group:"navigation",order:10,when:p.ContextKeyExpr.equals("view",A.BREAKPOINTS_VIEW_ID)},{id:d.MenuId.MenubarNewBreakpointMenu,group:"1_breakpoints",order:3,when:A.CONTEXT_DEBUGGERS_AVAILABLE}]})}run(Y){Y.get(A.IDebugService).addFunctionBreakpoint()}}),(0,d.registerAction2)(class extends d.Action2{constructor(){super({id:"workbench.debug.viewlet.action.toggleBreakpointsActivatedAction",title:{value:(0,m.localize)(38,null),original:"Toggle Activate Breakpoints"},f1:!0,icon:g.breakpointsActivate,menu:{id:d.MenuId.ViewTitle,group:"navigation",order:20,when:p.ContextKeyExpr.equals("view",A.BREAKPOINTS_VIEW_ID)}})}run(Y){const $=Y.get(A.IDebugService);$.setBreakpointsActivated(!$.getModel().areBreakpointsActivated())}}),(0,d.registerAction2)(class extends d.Action2{constructor(){super({id:"workbench.debug.viewlet.action.removeBreakpoint",title:(0,m.localize)(39,null),icon:T.Codicon.removeClose,menu:[{id:d.MenuId.DebugBreakpointsContext,group:"3_modification",order:10,when:A.CONTEXT_BREAKPOINT_ITEM_TYPE.notEqualsTo("exceptionBreakpoint")},{id:d.MenuId.DebugBreakpointsContext,group:"inline",order:20,when:A.CONTEXT_BREAKPOINT_ITEM_TYPE.notEqualsTo("exceptionBreakpoint")}]})}async run(Y,$){const J=Y.get(A.IDebugService);$ instanceof k.Breakpoint?await J.removeBreakpoints($.getId()):$ instanceof k.FunctionBreakpoint?await J.removeFunctionBreakpoints($.getId()):$ instanceof k.DataBreakpoint?await J.removeDataBreakpoints($.getId()):$ instanceof k.InstructionBreakpoint&&await J.removeInstructionBreakpoints($.instructionReference)}}),(0,d.registerAction2)(class extends d.Action2{constructor(){super({id:"workbench.debug.viewlet.action.removeAllBreakpoints",title:{original:"Remove All Breakpoints",value:(0,m.localize)(40,null),mnemonicTitle:(0,m.localize)(41,null)},f1:!0,icon:g.breakpointsRemoveAll,menu:[{id:d.MenuId.ViewTitle,group:"navigation",order:30,when:p.ContextKeyExpr.equals("view",A.BREAKPOINTS_VIEW_ID)},{id:d.MenuId.DebugBreakpointsContext,group:"3_modification",order:20,when:p.ContextKeyExpr.and(A.CONTEXT_BREAKPOINTS_EXIST,A.CONTEXT_BREAKPOINT_ITEM_TYPE.notEqualsTo("exceptionBreakpoint"))},{id:d.MenuId.MenubarDebugMenu,group:"5_breakpoints",order:3,when:A.CONTEXT_DEBUGGERS_AVAILABLE}]})}run(Y){const $=Y.get(A.IDebugService);$.removeBreakpoints(),$.removeFunctionBreakpoints(),$.removeDataBreakpoints(),$.removeInstructionBreakpoints()}}),(0,d.registerAction2)(class extends d.Action2{constructor(){super({id:"workbench.debug.viewlet.action.enableAllBreakpoints",title:{original:"Enable All Breakpoints",value:(0,m.localize)(42,null),mnemonicTitle:(0,m.localize)(43,null)},f1:!0,precondition:A.CONTEXT_DEBUGGERS_AVAILABLE,menu:[{id:d.MenuId.DebugBreakpointsContext,group:"z_commands",order:10,when:p.ContextKeyExpr.and(A.CONTEXT_BREAKPOINTS_EXIST,A.CONTEXT_BREAKPOINT_ITEM_TYPE.notEqualsTo("exceptionBreakpoint"))},{id:d.MenuId.MenubarDebugMenu,group:"5_breakpoints",order:1,when:A.CONTEXT_DEBUGGERS_AVAILABLE}]})}async run(Y){await Y.get(A.IDebugService).enableOrDisableBreakpoints(!0)}}),(0,d.registerAction2)(class extends d.Action2{constructor(){super({id:"workbench.debug.viewlet.action.disableAllBreakpoints",title:{original:"Disable All Breakpoints",value:(0,m.localize)(44,null),mnemonicTitle:(0,m.localize)(45,null)},f1:!0,precondition:A.CONTEXT_DEBUGGERS_AVAILABLE,menu:[{id:d.MenuId.DebugBreakpointsContext,group:"z_commands",order:20,when:p.ContextKeyExpr.and(A.CONTEXT_BREAKPOINTS_EXIST,A.CONTEXT_BREAKPOINT_ITEM_TYPE.notEqualsTo("exceptionBreakpoint"))},{id:d.MenuId.MenubarDebugMenu,group:"5_breakpoints",order:2,when:A.CONTEXT_DEBUGGERS_AVAILABLE}]})}async run(Y){await Y.get(A.IDebugService).enableOrDisableBreakpoints(!1)}}),(0,d.registerAction2)(class extends d.Action2{constructor(){super({id:"workbench.debug.viewlet.action.reapplyBreakpointsAction",title:{value:(0,m.localize)(46,null),original:"Reapply All Breakpoints"},f1:!0,precondition:A.CONTEXT_IN_DEBUG_MODE,menu:[{id:d.MenuId.DebugBreakpointsContext,group:"z_commands",order:30,when:p.ContextKeyExpr.and(A.CONTEXT_BREAKPOINTS_EXIST,A.CONTEXT_BREAKPOINT_ITEM_TYPE.notEqualsTo("exceptionBreakpoint"))}]})}async run(Y){await Y.get(A.IDebugService).setBreakpointsActivated(!0)}}),(0,d.registerAction2)(class extends l.ViewAction{constructor(){super({id:"debug.editBreakpoint",viewId:A.BREAKPOINTS_VIEW_ID,title:(0,m.localize)(47,null),icon:T.Codicon.edit,precondition:A.CONTEXT_BREAKPOINT_SUPPORTS_CONDITION,menu:[{id:d.MenuId.DebugBreakpointsContext,group:"navigation",order:10},{id:d.MenuId.DebugBreakpointsContext,group:"inline",order:10}]})}async runInView(Y,$,J){const ee=Y.get(A.IDebugService),te=Y.get(s.IEditorService);if(J instanceof k.Breakpoint){const se=await j(J,!1,!1,!0,ee,te);if(se){const ie=se.getControl();(0,E.isCodeEditor)(ie)&&ie.getContribution(A.BREAKPOINT_EDITOR_CONTRIBUTION_ID)?.showBreakpointWidget(J.lineNumber,J.column)}}else if(J instanceof k.FunctionBreakpoint){const se=Y.get(D.IContextMenuService),ie=[new _.Action("breakpoint.editCondition",(0,m.localize)(48,null),void 0,!0,async()=>$.renderInputBox({breakpoint:J,type:"condition"})),new _.Action("breakpoint.editCondition",(0,m.localize)(49,null),void 0,!0,async()=>$.renderInputBox({breakpoint:J,type:"hitCount"}))],ce=P.get(J.getId());ce&&se.showContextMenu({getActions:()=>ie,getAnchor:()=>ce,onHide:()=>(0,C.dispose)(ie)})}else $.renderInputBox({breakpoint:J,type:"condition"})}}),(0,d.registerAction2)(class extends l.ViewAction{constructor(){super({id:"debug.editFunctionBreakpoint",viewId:A.BREAKPOINTS_VIEW_ID,title:(0,m.localize)(50,null),menu:[{id:d.MenuId.DebugBreakpointsContext,group:"1_breakpoints",order:10,when:A.CONTEXT_BREAKPOINT_ITEM_TYPE.isEqualTo("functionBreakpoint")}]})}runInView(Y,$,J){$.renderInputBox({breakpoint:J,type:"name"})}}),(0,d.registerAction2)(class extends l.ViewAction{constructor(){super({id:"debug.editFunctionBreakpointHitCount",viewId:A.BREAKPOINTS_VIEW_ID,title:(0,m.localize)(51,null),precondition:A.CONTEXT_BREAKPOINT_SUPPORTS_CONDITION,menu:[{id:d.MenuId.DebugBreakpointsContext,group:"navigation",order:20,when:A.CONTEXT_BREAKPOINT_ITEM_TYPE.isEqualTo("functionBreakpoint")}]})}runInView(Y,$,J){$.renderInputBox({breakpoint:J,type:"hitCount"})}})}),define(ne[275],re([1,0,1499,208,94,71,90,179,119,106,16,21,58,7,503,26,141,74,28,113,95,8,53,43,51,14,231,88]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEBUG_RUN_LABEL=e.DEBUG_START_LABEL=e.DEBUG_CONFIGURE_LABEL=e.SELECT_AND_START_LABEL=e.FOCUS_SESSION_LABEL=e.CONTINUE_LABEL=e.STOP_LABEL=e.DISCONNECT_LABEL=e.PAUSE_LABEL=e.STEP_OUT_LABEL=e.STEP_INTO_LABEL=e.STEP_OVER_LABEL=e.RESTART_LABEL=e.REMOVE_EXPRESSION_COMMAND_ID=e.SET_EXPRESSION_COMMAND_ID=e.EDIT_EXPRESSION_COMMAND_ID=e.DEBUG_RUN_COMMAND_ID=e.DEBUG_START_COMMAND_ID=e.DEBUG_CONFIGURE_COMMAND_ID=e.SELECT_AND_START_ID=e.FOCUS_SESSION_ID=e.JUMP_TO_CURSOR_ID=e.FOCUS_REPL_ID=e.CONTINUE_ID=e.RESTART_FRAME_ID=e.STOP_ID=e.DISCONNECT_ID=e.PAUSE_ID=e.STEP_OUT_ID=e.STEP_INTO_ID=e.STEP_OVER_ID=e.TERMINATE_THREAD_ID=e.RESTART_SESSION_ID=e.STEP_BACK_ID=e.REVERSE_CONTINUE_ID=e.COPY_STACK_TRACE_ID=e.TOGGLE_INLINE_BREAKPOINT_ID=e.ADD_CONFIGURATION_ID=void 0,e.ADD_CONFIGURATION_ID="debug.addConfiguration",e.TOGGLE_INLINE_BREAKPOINT_ID="editor.debug.action.toggleInlineBreakpoint",e.COPY_STACK_TRACE_ID="debug.copyStackTrace",e.REVERSE_CONTINUE_ID="workbench.action.debug.reverseContinue",e.STEP_BACK_ID="workbench.action.debug.stepBack",e.RESTART_SESSION_ID="workbench.action.debug.restart",e.TERMINATE_THREAD_ID="workbench.action.debug.terminateThread",e.STEP_OVER_ID="workbench.action.debug.stepOver",e.STEP_INTO_ID="workbench.action.debug.stepInto",e.STEP_OUT_ID="workbench.action.debug.stepOut",e.PAUSE_ID="workbench.action.debug.pause",e.DISCONNECT_ID="workbench.action.debug.disconnect",e.STOP_ID="workbench.action.debug.stop",e.RESTART_FRAME_ID="workbench.action.debug.restartFrame",e.CONTINUE_ID="workbench.action.debug.continue",e.FOCUS_REPL_ID="workbench.debug.action.focusRepl",e.JUMP_TO_CURSOR_ID="debug.jumpToCursor",e.FOCUS_SESSION_ID="workbench.action.debug.focusProcess",e.SELECT_AND_START_ID="workbench.action.debug.selectandstart",e.DEBUG_CONFIGURE_COMMAND_ID="workbench.action.debug.configure",e.DEBUG_START_COMMAND_ID="workbench.action.debug.start",e.DEBUG_RUN_COMMAND_ID="workbench.action.debug.run",e.EDIT_EXPRESSION_COMMAND_ID="debug.renameWatchExpression",e.SET_EXPRESSION_COMMAND_ID="debug.setWatchExpression",e.REMOVE_EXPRESSION_COMMAND_ID="debug.removeWatchExpression",e.RESTART_LABEL=t.localize(0,null),e.STEP_OVER_LABEL=t.localize(1,null),e.STEP_INTO_LABEL=t.localize(2,null),e.STEP_OUT_LABEL=t.localize(3,null),e.PAUSE_LABEL=t.localize(4,null),e.DISCONNECT_LABEL=t.localize(5,null),e.STOP_LABEL=t.localize(6,null),e.CONTINUE_LABEL=t.localize(7,null),e.FOCUS_SESSION_LABEL=t.localize(8,null),e.SELECT_AND_START_LABEL=t.localize(9,null),e.DEBUG_CONFIGURE_LABEL=t.localize(10,null,"launch.json"),e.DEBUG_START_LABEL=t.localize(11,null),e.DEBUG_RUN_LABEL=t.localize(12,null);function E(L){return L&&typeof L.sessionId=="string"&&typeof L.threadId=="string"}async function y(L,M,N){const B=L.get(k.IDebugService);let P;if(E(M)){const V=B.getModel().getSession(M.sessionId);V&&(P=V.getAllThreads().find(z=>z.getId()===M.threadId))}else if(O(M)){const V=B.getModel().getSession(M.sessionId);if(V){const z=V.getAllThreads();P=z.length>0?z[0]:void 0}}if(!P&&(P=B.getViewModel().focusedThread,!P)){const V=B.getViewModel().focusedSession,z=V?V.getAllThreads():void 0;P=z&&z.length?z[0]:void 0}P&&await N(P)}function T(L){return L&&typeof L.sessionId=="string"&&typeof L.threadId=="string"&&typeof L.frameId=="string"}function R(L,M){if(T(M)){const N=L.getModel().getSession(M.sessionId);if(N){const B=N.getAllThreads().find(P=>P.getId()===M.threadId);if(B)return B.getCallStack().find(P=>P.getId()===M.frameId)}}}function O(L){return L&&typeof L.sessionId=="string"}r.CommandsRegistry.registerCommand({id:e.COPY_STACK_TRACE_ID,handler:async(L,M,N)=>{const B=L.get(p.ITextResourcePropertiesService),P=L.get(u.IClipboardService),V=R(L.get(k.IDebugService),N);if(V){const z=B.getEOL(V.source.uri);await P.writeText(V.thread.getCallStack().map(U=>U.toString()).join(z))}}}),r.CommandsRegistry.registerCommand({id:e.REVERSE_CONTINUE_ID,handler:(L,M,N)=>{y(L,N,B=>B.reverseContinue())}}),r.CommandsRegistry.registerCommand({id:e.STEP_BACK_ID,handler:(L,M,N)=>{const B=L.get(c.IContextKeyService);k.CONTEXT_DISASSEMBLY_VIEW_FOCUS.getValue(B)?y(L,N,P=>P.stepBack("instruction")):y(L,N,P=>P.stepBack())}}),r.CommandsRegistry.registerCommand({id:e.TERMINATE_THREAD_ID,handler:(L,M,N)=>{y(L,N,B=>B.terminate())}}),r.CommandsRegistry.registerCommand({id:e.JUMP_TO_CURSOR_ID,handler:async L=>{const N=L.get(k.IDebugService).getViewModel().focusedStackFrame,P=L.get(C.IEditorService).activeTextEditorControl,V=L.get(S.INotificationService),z=L.get(n.IQuickInputService);if(N&&(0,w.isCodeEditor)(P)&&P.hasModel()){const U=P.getPosition(),H=P.getModel().uri,K=N.thread.session.getSourceForUri(H);if(K){const q=(await N.thread.session.gotoTargets(K.raw,U.lineNumber,U.column))?.body.targets;if(q&&q.length){let Z=q[0].id;if(q.length>1){const j=q.map(Y=>({label:Y.label,_id:Y.id})),X=await z.pick(j,{placeHolder:t.localize(13,null)});if(!X)return;Z=X._id}return await N.thread.session.goto(N.thread.threadId,Z).catch(j=>V.warn(j))}}}return V.warn(t.localize(14,null))}}),v.MenuRegistry.appendMenuItem(v.MenuId.EditorContext,{command:{id:e.JUMP_TO_CURSOR_ID,title:t.localize(15,null),category:{value:t.localize(16,null),original:"Debug"}},when:c.ContextKeyExpr.and(k.CONTEXT_JUMP_TO_CURSOR_SUPPORTED,o.EditorContextKeys.editorTextFocus),group:"debug",order:3}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.RESTART_SESSION_ID,weight:200,primary:1024|2048|63,when:k.CONTEXT_IN_DEBUG_MODE,handler:async(L,M,N)=>{const B=L.get(k.IDebugService),P=L.get(a.IConfigurationService);let V;if(O(N)?V=B.getModel().getSession(N.sessionId):V=B.getViewModel().focusedSession,V){const z=P.getValue("debug").showSubSessionsInToolBar;for(;!z&&V&&V.parentSession;)V=V.parentSession;V.removeReplExpressions(),await B.restartSession(V)}else{const{launch:z,name:U}=B.getConfigurationManager().selectedConfiguration;await B.startDebugging(z,U,{noDebug:!1,startedByUser:!0})}}}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.STEP_OVER_ID,weight:200,primary:d.isWeb?512|68:68,when:k.CONTEXT_DEBUG_STATE.isEqualTo("stopped"),handler:(L,M,N)=>{const B=L.get(c.IContextKeyService);k.CONTEXT_DISASSEMBLY_VIEW_FOCUS.getValue(B)?y(L,N,P=>P.next("instruction")):y(L,N,P=>P.next())}}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.STEP_INTO_ID,weight:200+10,primary:d.isWeb&&d.isWindows?512|69:69,when:k.CONTEXT_DEBUG_STATE.notEqualsTo("inactive"),handler:(L,M,N)=>{const B=L.get(c.IContextKeyService);k.CONTEXT_DISASSEMBLY_VIEW_FOCUS.getValue(B)?y(L,N,P=>P.stepIn("instruction")):y(L,N,P=>P.stepIn())}}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.STEP_OUT_ID,weight:200,primary:1024|69,when:k.CONTEXT_DEBUG_STATE.isEqualTo("stopped"),handler:(L,M,N)=>{const B=L.get(c.IContextKeyService);k.CONTEXT_DISASSEMBLY_VIEW_FOCUS.getValue(B)?y(L,N,P=>P.stepOut("instruction")):y(L,N,P=>P.stepOut())}}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.PAUSE_ID,weight:200+2,primary:64,when:k.CONTEXT_DEBUG_STATE.isEqualTo("running"),handler:(L,M,N)=>{y(L,N,B=>B.pause())}});async function x(L,M,N,B){const P=L.get(k.IDebugService);let V;O(N)?V=P.getModel().getSession(N.sessionId):V=P.getViewModel().focusedSession;const U=L.get(a.IConfigurationService).getValue("debug").showSubSessionsInToolBar;for(;!U&&V&&V.parentSession;)V=V.parentSession;await P.stopSession(V,B)}_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.DISCONNECT_ID,weight:200,primary:1024|63,when:c.ContextKeyExpr.and(k.CONTEXT_FOCUSED_SESSION_IS_ATTACH,k.CONTEXT_IN_DEBUG_MODE),handler:(L,M,N)=>x(L,M,N,!0)}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.STOP_ID,weight:200,primary:1024|63,when:c.ContextKeyExpr.and(k.CONTEXT_FOCUSED_SESSION_IS_ATTACH.toNegated(),k.CONTEXT_IN_DEBUG_MODE),handler:(L,M,N)=>x(L,M,N,!1)}),r.CommandsRegistry.registerCommand({id:e.RESTART_FRAME_ID,handler:async(L,M,N)=>{const B=L.get(k.IDebugService),P=L.get(S.INotificationService),V=R(B,N);if(V)try{await V.restart()}catch(z){P.error(z)}}}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.CONTINUE_ID,weight:200+10,primary:63,when:k.CONTEXT_DEBUG_STATE.isEqualTo("stopped"),handler:(L,M,N)=>{y(L,N,B=>B.continue())}}),r.CommandsRegistry.registerCommand({id:e.FOCUS_REPL_ID,handler:async L=>{await L.get(h.IViewsService).openView(k.REPL_VIEW_ID,!0)}}),r.CommandsRegistry.registerCommand({id:"debug.startFromConfig",handler:async(L,M)=>{await L.get(k.IDebugService).startDebugging(void 0,M)}}),r.CommandsRegistry.registerCommand({id:e.FOCUS_SESSION_ID,handler:async(L,M)=>{const N=L.get(k.IDebugService),B=L.get(C.IEditorService),P=N.getModel().getSessions().find(z=>z.parentSession===M&&z.state===2);P&&M.state!==2&&(M=P),await N.focusStackFrame(void 0,void 0,M,!0);const V=N.getViewModel().focusedStackFrame;V&&await V.openInEditor(B,!0)}}),r.CommandsRegistry.registerCommand({id:e.SELECT_AND_START_ID,handler:async L=>{L.get(n.IQuickInputService).quickAccess.show("debug ")}}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.DEBUG_START_COMMAND_ID,weight:200,primary:63,when:c.ContextKeyExpr.and(k.CONTEXT_DEBUGGERS_AVAILABLE,k.CONTEXT_DEBUG_STATE.isEqualTo("inactive")),handler:async(L,M)=>{const N=L.get(k.IDebugService);await(0,m.saveAllBeforeDebugStart)(L.get(a.IConfigurationService),L.get(C.IEditorService));const{launch:B,name:P,getConfig:V}=N.getConfigurationManager().selectedConfiguration,z=await V(),U=z?Object.assign((0,g.deepClone)(z),M?.config):P;await N.startDebugging(B,U,{noDebug:M?.noDebug,startedByUser:!0},!1)}}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.DEBUG_RUN_COMMAND_ID,weight:200,primary:2048|63,mac:{primary:256|63},when:c.ContextKeyExpr.and(k.CONTEXT_DEBUGGERS_AVAILABLE,k.CONTEXT_DEBUG_STATE.notEqualsTo((0,k.getStateLabel)(1))),handler:async L=>{await L.get(r.ICommandService).executeCommand(e.DEBUG_START_COMMAND_ID,{noDebug:!0})}}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"debug.toggleBreakpoint",weight:200+5,when:c.ContextKeyExpr.and(k.CONTEXT_BREAKPOINTS_FOCUSED,s.InputFocusedContext.toNegated()),primary:10,handler:L=>{const M=L.get(A.IListService),N=L.get(k.IDebugService),B=M.lastFocusedList;if(B instanceof f.List){const P=B.getFocusedElements();P&&P.length&&N.enableOrDisableBreakpoints(!P[0].enabled,P[0])}}}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"debug.enableOrDisableBreakpoint",weight:200,primary:void 0,when:o.EditorContextKeys.editorTextFocus,handler:L=>{const M=L.get(k.IDebugService),B=L.get(C.IEditorService).activeTextEditorControl;if((0,w.isCodeEditor)(B)){const P=B.getModel();if(P){const V=B.getPosition();if(V){const z=M.getModel().getBreakpoints({uri:P.uri,lineNumber:V.lineNumber});z.length&&M.enableOrDisableBreakpoints(!z[0].enabled,z[0])}}}}}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.EDIT_EXPRESSION_COMMAND_ID,weight:200+5,when:k.CONTEXT_WATCH_EXPRESSIONS_FOCUSED,primary:60,mac:{primary:3},handler:(L,M)=>{const N=L.get(k.IDebugService);if(!(M instanceof D.Expression)){const P=L.get(A.IListService).lastFocusedList;if(P){const V=P.getFocus();Array.isArray(V)&&V[0]instanceof D.Expression&&(M=V[0])}}M instanceof D.Expression&&N.getViewModel().setSelectedExpression(M,!1)}}),r.CommandsRegistry.registerCommand({id:e.SET_EXPRESSION_COMMAND_ID,handler:async(L,M)=>{const N=L.get(k.IDebugService);(M instanceof D.Expression||M instanceof D.Variable)&&N.getViewModel().setSelectedExpression(M,!0)}}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"debug.setVariable",weight:200+5,when:k.CONTEXT_VARIABLES_FOCUSED,primary:60,mac:{primary:3},handler:L=>{const M=L.get(A.IListService),N=L.get(k.IDebugService),B=M.lastFocusedList;if(B){const P=B.getFocus();Array.isArray(P)&&P[0]instanceof D.Variable&&N.getViewModel().setSelectedExpression(P[0],!1)}}}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.REMOVE_EXPRESSION_COMMAND_ID,weight:200,when:c.ContextKeyExpr.and(k.CONTEXT_WATCH_EXPRESSIONS_FOCUSED,k.CONTEXT_EXPRESSION_SELECTED.toNegated()),primary:20,mac:{primary:2048|1},handler:(L,M)=>{const N=L.get(k.IDebugService);if(M instanceof D.Expression){N.removeWatchExpressions(M.getId());return}const P=L.get(A.IListService).lastFocusedList;if(P){let V=P.getFocus();if(Array.isArray(V)&&V[0]instanceof D.Expression){const z=P.getSelection();z&&z.indexOf(V[0])>=0&&(V=z),V.forEach(U=>N.removeWatchExpressions(U.getId()))}}}}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"debug.removeBreakpoint",weight:200,when:c.ContextKeyExpr.and(k.CONTEXT_BREAKPOINTS_FOCUSED,k.CONTEXT_BREAKPOINT_INPUT_FOCUSED.toNegated()),primary:20,mac:{primary:2048|1},handler:L=>{const M=L.get(A.IListService),N=L.get(k.IDebugService),B=M.lastFocusedList;if(B instanceof f.List){const P=B.getFocusedElements(),V=P.length?P[0]:void 0;V instanceof D.Breakpoint?N.removeBreakpoints(V.getId()):V instanceof D.FunctionBreakpoint?N.removeFunctionBreakpoints(V.getId()):V instanceof D.DataBreakpoint&&N.removeDataBreakpoints(V.getId())}}}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"debug.installAdditionalDebuggers",weight:200,when:void 0,primary:void 0,handler:async(L,M)=>{const B=(await L.get(b.IPaneCompositePartService).openPaneComposite(I.VIEWLET_ID,0,!0))?.getViewPaneContainer();let P="@category:debuggers";typeof M=="string"&&(P+=` ${M}`),B.search(P),B.focus()}}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.ADD_CONFIGURATION_ID,weight:200,when:void 0,primary:void 0,handler:async(L,M)=>{const N=L.get(k.IDebugService).getConfigurationManager(),B=N.getLaunches().find(P=>P.uri.toString()===M)||N.selectedConfiguration.launch;if(B){const{editor:P,created:V}=await B.openConfigFile(!1);if(P&&!V){const z=P.getControl();z&&await z.getContribution(k.EDITOR_CONTRIBUTION_ID)?.addLaunchConfiguration()}}}});const F=L=>{const M=L.get(k.IDebugService),B=L.get(C.IEditorService).activeTextEditorControl;if((0,w.isCodeEditor)(B)){const P=B.getPosition();if(P&&B.hasModel()&&M.canSetBreakpointsIn(B.getModel())){const V=B.getModel().uri;M.getModel().getBreakpoints({lineNumber:P.lineNumber,uri:V}).some(U=>U.sessionAgnosticData.column===P.column||!U.column&&P.column<=1)||M.addBreakpoints(V,[{lineNumber:P.lineNumber,column:P.column>1?P.column:void 0}])}}};_.KeybindingsRegistry.registerCommandAndKeybindingRule({weight:200,primary:1024|67,when:o.EditorContextKeys.editorTextFocus,id:e.TOGGLE_INLINE_BREAKPOINT_ID,handler:F}),v.MenuRegistry.appendMenuItem(v.MenuId.EditorContext,{command:{id:e.TOGGLE_INLINE_BREAKPOINT_ID,title:t.localize(17,null),category:{value:t.localize(18,null),original:"Debug"}},when:c.ContextKeyExpr.and(k.CONTEXT_IN_DEBUG_MODE,l.PanelFocusContext.toNegated(),o.EditorContextKeys.editorTextFocus),group:"debug",order:1}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"debug.openBreakpointToSide",weight:200,when:k.CONTEXT_BREAKPOINTS_FOCUSED,primary:2048|3,secondary:[512|3],handler:L=>{const N=L.get(A.IListService).lastFocusedList;if(N instanceof f.List){const B=N.getFocusedElements();if(B.length&&B[0]instanceof D.Breakpoint)return(0,i.openBreakpointSource)(B[0],!0,!1,!0,L.get(k.IDebugService),L.get(C.IEditorService))}}}),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"debug.openView",weight:200,when:k.CONTEXT_DEBUGGERS_AVAILABLE.toNegated(),primary:63,secondary:[2048|63],handler:async L=>{await L.get(b.IPaneCompositePartService).openPaneComposite(k.VIEWLET_ID,0,!0)}})}),define(ne[625],re([1,0,1496,10,91,389,8,28,90,12,68,32,37,34,2,275,134,190,38]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FocusSessionActionViewItem=e.StartDebugActionViewItem=void 0;const p=f.$;let u=class Gr extends s.BaseActionViewItem{constructor(h,g,d,m,b,E,y,T,R){super(h,g);this.context=h,this.debugService=d,this.themeService=m,this.configurationService=b,this.commandService=E,this.contextService=y,this.keybindingService=R,this.debugOptions=[],this.selected=0,this.providers=[],this.toDispose=[],this.selectBox=new A.SelectBox([],-1,T,void 0,{ariaLabel:t.localize(0,null)}),this.selectBox.setFocusable(!1),this.toDispose.push(this.selectBox),this.toDispose.push((0,v.attachSelectBoxStyler)(this.selectBox,m)),this.registerListeners()}registerListeners(){this.toDispose.push(this.configurationService.onDidChangeConfiguration(h=>{h.affectsConfiguration("launch")&&this.updateOptions()})),this.toDispose.push(this.debugService.getConfigurationManager().onDidSelectConfiguration(()=>{this.updateOptions()}))}render(h){this.container=h,h.classList.add("start-debug-action-item"),this.start=f.append(h,p(w.ThemeIcon.asCSSSelector(l.debugStart)));const g=this.keybindingService.lookupKeybinding(this.action.id)?.getLabel(),d=g?` (${g})`:"";this.start.title=this.action.label+d,this.start.setAttribute("role","button"),this.toDispose.push(f.addDisposableListener(this.start,f.EventType.CLICK,()=>{this.start.blur(),this.debugService.state!==1&&this.actionRunner.run(this.action,this.context)})),this.toDispose.push(f.addDisposableListener(this.start,f.EventType.MOUSE_DOWN,b=>{this.action.enabled&&b.button===0&&this.start.classList.add("active")})),this.toDispose.push(f.addDisposableListener(this.start,f.EventType.MOUSE_UP,()=>{this.start.classList.remove("active")})),this.toDispose.push(f.addDisposableListener(this.start,f.EventType.MOUSE_OUT,()=>{this.start.classList.remove("active")})),this.toDispose.push(f.addDisposableListener(this.start,f.EventType.KEY_DOWN,b=>{const E=new _.StandardKeyboardEvent(b);E.equals(3)&&this.debugService.state!==1&&this.actionRunner.run(this.action,this.context),E.equals(17)&&(this.start.tabIndex=-1,this.selectBox.focus(),E.stopPropagation())})),this.toDispose.push(this.selectBox.onDidSelect(async b=>{const E=this.debugOptions[b.index];(E.handler?await E.handler():!1)?this.selected=b.index:this.selectBox.select(this.selected)}));const m=p(".configuration");this.selectBox.render(f.append(h,m)),this.toDispose.push(f.addDisposableListener(m,f.EventType.KEY_DOWN,b=>{const E=new _.StandardKeyboardEvent(b);E.equals(15)&&(this.selectBox.setFocusable(!1),this.start.tabIndex=0,this.start.focus(),E.stopPropagation())})),this.toDispose.push((0,v.attachStylerCallback)(this.themeService,{selectBorder:C.selectBorder,selectBackground:C.selectBackground},b=>{this.container.style.border=b.selectBorder?`1px solid ${b.selectBorder}`:"",m.style.borderLeft=b.selectBorder?`1px solid ${b.selectBorder}`:"";const E=b.selectBackground?`${b.selectBackground}`:"";this.container.style.backgroundColor=E})),this.debugService.getConfigurationManager().getDynamicProviders().then(b=>{this.providers=b,this.providers.length>0&&this.updateOptions()}),this.updateOptions()}setActionContext(h){this.context=h}isEnabled(){return!0}focus(h){h?this.selectBox.focus():(this.start.tabIndex=0,this.start.focus())}blur(){this.start.tabIndex=-1,this.selectBox.blur(),this.container.blur()}setFocusable(h){h?this.start.tabIndex=0:(this.start.tabIndex=-1,this.selectBox.setFocusable(!1))}dispose(){this.toDispose=(0,i.dispose)(this.toDispose)}updateOptions(){this.selected=0,this.debugOptions=[];const h=this.debugService.getConfigurationManager(),g=this.contextService.getWorkbenchState()===3;let d;const m=[];h.getAllConfigurations().forEach(({launch:b,name:E,presentation:y})=>{d!==y?.group&&(d=y?.group,this.debugOptions.length&&(this.debugOptions.push({label:Gr.SEPARATOR,handler:()=>Promise.resolve(!1)}),m.push(this.debugOptions.length-1))),E===h.selectedConfiguration.name&&b===h.selectedConfiguration.launch&&(this.selected=this.debugOptions.length);const T=g?`${E} (${b.name})`:E;this.debugOptions.push({label:T,handler:async()=>(await h.selectConfiguration(b,E),!0)})}),h.getRecentDynamicConfigurations().slice(0,3).forEach(({name:b,type:E})=>{E===h.selectedConfiguration.type&&h.selectedConfiguration.name===b&&(this.selected=this.debugOptions.length),this.debugOptions.push({label:b,handler:async()=>(await h.selectConfiguration(void 0,b,void 0,{type:E}),!0)})}),this.debugOptions.length===0&&this.debugOptions.push({label:t.localize(1,null),handler:async()=>!1}),this.debugOptions.push({label:Gr.SEPARATOR,handler:()=>Promise.resolve(!1)}),m.push(this.debugOptions.length-1),this.providers.forEach(b=>{this.debugOptions.push({label:`${b.label}...`,handler:async()=>{const E=await b.pick();return E?(await h.selectConfiguration(E.launch,E.config.name,E.config,{type:b.type}),!0):!1}})}),h.getLaunches().filter(b=>!b.hidden).forEach(b=>{const E=g?t.localize(2,null,b.name):t.localize(3,null);this.debugOptions.push({label:E,handler:async()=>(await this.commandService.executeCommand(S.ADD_CONFIGURATION_ID,b.uri.toString()),!1)})}),this.selectBox.setOptions(this.debugOptions.map((b,E)=>({text:b.label,isDisabled:m.indexOf(E)!==-1})),this.selected)}};u.SEPARATOR="\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",u=Ee([W(2,I.IDebugService),W(3,w.IThemeService),W(4,k.IConfigurationService),W(5,D.ICommandService),W(6,c.IWorkspaceContextService),W(7,o.IContextViewService),W(8,r.IKeybindingService)],u),e.StartDebugActionViewItem=u;let a=class extends s.SelectActionViewItem{constructor(h,g,d,m,b,E){super(null,h,[],-1,b,{ariaLabel:t.localize(4,null)});this.debugService=d,this.configurationService=E,this._register((0,v.attachSelectBoxStyler)(this.selectBox,m)),this._register(this.debugService.getViewModel().onDidFocusSession(()=>{const T=this.getSelectedSession();if(T){const R=this.getSessions().indexOf(T);this.select(R)}})),this._register(this.debugService.onDidNewSession(T=>{const R=[];R.push(T.onDidChangeName(()=>this.update())),R.push(T.onDidEndAdapter(()=>(0,i.dispose)(R))),this.update()})),this.getSessions().forEach(T=>{this._register(T.onDidChangeName(()=>this.update()))}),this._register(this.debugService.onDidEndSession(()=>this.update()));const y=g?this.mapFocusedSessionToSelected(g):void 0;this.update(y)}getActionContext(h,g){return this.getSessions()[g]}update(h){h||(h=this.getSelectedSession());const g=this.getSessions(),d=g.map(m=>{const b=m.getLabel();return m.parentSession?`\xA0\xA0${b}`:b});this.setOptions(d.map(m=>({text:m})),h?g.indexOf(h):void 0)}getSelectedSession(){const h=this.debugService.getViewModel().focusedSession;return h?this.mapFocusedSessionToSelected(h):void 0}getSessions(){const h=this.configurationService.getValue("debug").showSubSessionsInToolBar,g=this.debugService.getModel().getSessions();return h?g:g.filter(d=>!d.parentSession)}mapFocusedSessionToSelected(h){const g=this.configurationService.getValue("debug").showSubSessionsInToolBar;for(;h.parentSession&&!g;)h=h.parentSession;return h}};a=Ee([W(2,I.IDebugService),W(3,w.IThemeService),W(4,o.IContextViewService),W(5,k.IConfigurationService)],a),e.FocusSessionActionViewItem=a}),define(ne[2584],re([1,0,1501,97,20,58,39,7,90,21,503,74,43,37,36,10,56,16,412,8]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RunToCursorAction=void 0;class u extends k.EditorAction{constructor(){super({id:"editor.debug.action.toggleBreakpoint",label:t.localize(0,null),alias:"Debug: Toggle Breakpoint",precondition:I.CONTEXT_DEBUGGERS_AVAILABLE,kbOpts:{kbExpr:A.EditorContextKeys.editorTextFocus,primary:67,weight:100},menuOpts:{when:I.CONTEXT_DEBUGGERS_AVAILABLE,title:t.localize(1,null),menuId:l.MenuId.MenubarDebugMenu,group:"4_new_breakpoint",order:1}})}async run(L,M){if(M.hasModel()){const N=L.get(I.IDebugService),B=M.getModel().uri,P=N.canSetBreakpointsIn(M.getModel()),V=[...new Set(M.getSelections().map(z=>z.getPosition().lineNumber))];await Promise.all(V.map(async z=>{const U=N.getModel().getBreakpoints({lineNumber:z,uri:B});U.length?await Promise.all(U.map(H=>N.removeBreakpoints(H.getId()))):P&&await N.addBreakpoints(B,[{lineNumber:z}])}))}}}class a extends k.EditorAction{constructor(){super({id:"editor.debug.action.conditionalBreakpoint",label:t.localize(2,null),alias:"Debug: Add Conditional Breakpoint...",precondition:I.CONTEXT_DEBUGGERS_AVAILABLE,menuOpts:{menuId:l.MenuId.MenubarNewBreakpointMenu,title:t.localize(3,null),group:"1_breakpoints",order:1,when:I.CONTEXT_DEBUGGERS_AVAILABLE}})}async run(L,M){const N=L.get(I.IDebugService),B=M.getPosition();B&&M.hasModel()&&N.canSetBreakpointsIn(M.getModel())&&M.getContribution(I.BREAKPOINT_EDITOR_CONTRIBUTION_ID)?.showBreakpointWidget(B.lineNumber,void 0,0)}}class n extends k.EditorAction{constructor(){super({id:"editor.debug.action.addLogPoint",label:t.localize(4,null),precondition:I.CONTEXT_DEBUGGERS_AVAILABLE,alias:"Debug: Add Logpoint...",menuOpts:[{menuId:l.MenuId.MenubarNewBreakpointMenu,title:t.localize(5,null),group:"1_breakpoints",order:4,when:I.CONTEXT_DEBUGGERS_AVAILABLE}]})}async run(L,M){const N=L.get(I.IDebugService),B=M.getPosition();B&&M.hasModel()&&N.canSetBreakpointsIn(M.getModel())&&M.getContribution(I.BREAKPOINT_EDITOR_CONTRIBUTION_ID)?.showBreakpointWidget(B.lineNumber,B.column,2)}}class h extends k.EditorAction2{constructor(){super({id:h.ID,title:{value:t.localize(6,null),original:"Open Disassembly View",mnemonicTitle:t.localize(7,null)},precondition:I.CONTEXT_FOCUSED_STACK_FRAME_HAS_INSTRUCTION_POINTER_REFERENCE,menu:[{id:l.MenuId.EditorContext,group:"debug",order:5,when:D.ContextKeyExpr.and(I.CONTEXT_IN_DEBUG_MODE,C.PanelFocusContext.toNegated(),I.CONTEXT_DEBUG_STATE.isEqualTo("stopped"),A.EditorContextKeys.editorTextFocus,I.CONTEXT_DISASSEMBLE_REQUEST_SUPPORTED,I.CONTEXT_LANGUAGE_SUPPORTS_DISASSEMBLE_REQUEST)},{id:l.MenuId.DebugCallStackContext,group:"z_commands",order:50,when:D.ContextKeyExpr.and(I.CONTEXT_IN_DEBUG_MODE,I.CONTEXT_DEBUG_STATE.isEqualTo("stopped"),I.CONTEXT_CALLSTACK_ITEM_TYPE.isEqualTo("stackFrame"),I.CONTEXT_DISASSEMBLE_REQUEST_SUPPORTED)},{id:l.MenuId.CommandPalette,when:D.ContextKeyExpr.and(I.CONTEXT_IN_DEBUG_MODE,I.CONTEXT_DEBUG_STATE.isEqualTo("stopped"),I.CONTEXT_DISASSEMBLE_REQUEST_SUPPORTED)}]})}runEditorCommand(L,M,...N){M.hasModel()&&L.get(w.IEditorService).openEditor(r.DisassemblyViewInput.instance,{pinned:!0})}}h.ID="editor.debug.action.openDisassemblyView";class g extends l.Action2{constructor(){super({id:g.ID,title:{value:t.localize(8,null),original:"Toggle Source Code in Disassembly View",mnemonicTitle:t.localize(9,null)},f1:!0})}run(L,M,...N){const B=L.get(p.IConfigurationService);if(B){const P=B.getValue("debug").disassemblyView.showSourceCode;B.updateValue(g.configID,!P)}}}g.ID="debug.action.toggleDisassemblyViewSourceCode",g.configID="debug.disassemblyView.showSourceCode";class d extends k.EditorAction{constructor(){super({id:d.ID,label:d.LABEL,alias:"Debug: Run to Cursor",precondition:D.ContextKeyExpr.and(I.CONTEXT_IN_DEBUG_MODE,C.PanelFocusContext.toNegated(),I.CONTEXT_DEBUG_STATE.isEqualTo("stopped"),A.EditorContextKeys.editorTextFocus),contextMenuOpts:{group:"debug",order:2}})}async run(L,M){const N=M.getPosition();if(!(M.hasModel()&&N))return;const B=M.getModel().uri,P=L.get(I.IDebugService),V=P.getViewModel(),z=L.get(s.IUriIdentityService);let U;const H=V.focusedStackFrame;H&&z.extUri.isEqual(H.source.uri,B)&&H.range.startLineNumber===N.lineNumber&&(U=N.column),await P.runTo(B,N.lineNumber,U)}}e.RunToCursorAction=d,d.ID="editor.debug.action.runToCursor",d.LABEL=t.localize(10,null);class m extends k.EditorAction{constructor(){super({id:"editor.debug.action.selectionToRepl",label:t.localize(11,null),alias:"Evaluate",precondition:D.ContextKeyExpr.and(A.EditorContextKeys.hasNonEmptySelection,I.CONTEXT_IN_DEBUG_MODE,A.EditorContextKeys.editorTextFocus),contextMenuOpts:{group:"debug",order:0}})}async run(L,M){const N=L.get(I.IDebugService),B=L.get(o.IViewsService),P=N.getViewModel(),V=P.focusedSession;if(!M.hasModel()||!V)return;const z=M.getModel().getValueInRange(M.getSelection());await V.addReplExpression(P.focusedStackFrame,z),await B.openView(I.REPL_VIEW_ID,!1)}}class b extends k.EditorAction{constructor(){super({id:"editor.debug.action.selectionToWatch",label:t.localize(12,null),alias:"Add to Watch",precondition:D.ContextKeyExpr.and(A.EditorContextKeys.hasNonEmptySelection,I.CONTEXT_IN_DEBUG_MODE,A.EditorContextKeys.editorTextFocus),contextMenuOpts:{group:"debug",order:1}})}async run(L,M){const N=L.get(I.IDebugService),B=L.get(o.IViewsService);if(!M.hasModel())return;const P=M.getModel().getValueInRange(M.getSelection());await B.openView(I.WATCH_VIEW_ID),N.addWatchExpression(P)}}class E extends k.EditorAction{constructor(){super({id:"editor.debug.action.showDebugHover",label:t.localize(13,null),alias:"Debug: Show Hover",precondition:I.CONTEXT_IN_DEBUG_MODE,kbOpts:{kbExpr:A.EditorContextKeys.editorTextFocus,primary:(0,f.KeyChord)(2048|41,2048|39),weight:100}})}async run(L,M){const N=M.getPosition();if(!N||!M.hasModel())return;const B=M.getModel().getWordAtPosition(N);if(!B)return;const P=new _.Range(N.lineNumber,N.column,N.lineNumber,B.endColumn);return M.getContribution(I.EDITOR_CONTRIBUTION_ID)?.showHover(P,!0)}}class y extends k.EditorAction{constructor(){super({id:y.ID,label:y.LABEL,alias:"Debug: Step Into Targets...",precondition:D.ContextKeyExpr.and(I.CONTEXT_STEP_INTO_TARGETS_SUPPORTED,I.CONTEXT_IN_DEBUG_MODE,I.CONTEXT_DEBUG_STATE.isEqualTo("stopped"),A.EditorContextKeys.editorTextFocus),contextMenuOpts:{group:"debug",order:1.5}})}async run(L,M){const N=L.get(I.IDebugService),B=L.get(c.IContextMenuService),P=L.get(s.IUriIdentityService),V=N.getViewModel().focusedSession,z=N.getViewModel().focusedStackFrame;if(V&&z&&M.hasModel()&&P.extUri.isEqual(M.getModel().uri,z.source.uri)){const U=await V.stepInTargets(z.frameId);if(!U)return;M.revealLineInCenterIfOutsideViewport(z.range.startLineNumber);const H=M.getScrolledVisiblePosition({lineNumber:z.range.startLineNumber,column:z.range.startColumn}),K=(0,S.getDomNodePagePosition)(M.getDomNode()),G=K.left+H.left,q=K.top+H.top+H.height;B.showContextMenu({getAnchor:()=>({x:G,y:q}),getActions:()=>U.map(Z=>new i.Action(`stepIntoTarget:${Z.id}`,Z.label,void 0,!0,()=>V.stepIn(z.thread.threadId,Z.id)))})}}}y.ID="editor.debug.action.stepIntoTargets",y.LABEL=t.localize(14,null);class T extends k.EditorAction{constructor(L,M){super(M);this.isNext=L}async run(L,M){const N=L.get(I.IDebugService),B=L.get(w.IEditorService),P=L.get(s.IUriIdentityService);if(M.hasModel()){const V=M.getModel().uri,z=M.getPosition().lineNumber,U=N.getModel().getBreakpoints({enabledOnly:!0});let H=this.isNext?U.filter(K=>P.extUri.isEqual(K.uri,V)&&K.lineNumber>z).shift():U.filter(K=>P.extUri.isEqual(K.uri,V)&&K.lineNumber<z).pop();if(H||(H=this.isNext?U.filter(K=>K.uri.toString()>V.toString()).shift():U.filter(K=>K.uri.toString()<V.toString()).pop()),!H&&U.length&&(H=this.isNext?U[0]:U[U.length-1]),H)return(0,v.openBreakpointSource)(H,!1,!0,!1,N,B)}}}class R extends T{constructor(){super(!0,{id:"editor.debug.action.goToNextBreakpoint",label:t.localize(15,null),alias:"Debug: Go to Next Breakpoint",precondition:I.CONTEXT_DEBUGGERS_AVAILABLE})}}class O extends T{constructor(){super(!1,{id:"editor.debug.action.goToPreviousBreakpoint",label:t.localize(16,null),alias:"Debug: Go to Previous Breakpoint",precondition:I.CONTEXT_DEBUGGERS_AVAILABLE})}}class x extends k.EditorAction{constructor(){super({id:"editor.debug.action.closeExceptionWidget",label:t.localize(17,null),alias:"Close Exception Widget",precondition:I.CONTEXT_EXCEPTION_WIDGET_VISIBLE,kbOpts:{primary:9,weight:100}})}async run(L,M){M.getContribution(I.EDITOR_CONTRIBUTION_ID)?.closeExceptionWidget()}}(0,l.registerAction2)(h),(0,l.registerAction2)(g),(0,k.registerEditorAction)(u),(0,k.registerEditorAction)(a),(0,k.registerEditorAction)(n),(0,k.registerEditorAction)(d),(0,k.registerEditorAction)(y),(0,k.registerEditorAction)(m),(0,k.registerEditorAction)(b),(0,k.registerEditorAction)(E),(0,k.registerEditorAction)(R),(0,k.registerEditorAction)(O),(0,k.registerEditorAction)(x)}),define(ne[2585],re([1,0,245,1505,26,90,34,28,102,13,275,190,12]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StartDebugQuickAccessProvider=void 0;let c=class ma extends t.PickerQuickAccessProvider{constructor(S,s,l,r){super(ma.PREFIX,{noResultsPick:{label:(0,f.localize)(0,null)}});this.debugService=S,this.contextService=s,this.commandService=l,this.notificationService=r}async _getPicks(S){const s=[];if(!this.debugService.getAdapterManager().hasEnabledDebuggers())return[];s.push({type:"separator",label:"launch.json"});const l=this.debugService.getConfigurationManager();let r;for(const a of l.getAllConfigurations()){const n=(0,I.matchesFuzzy)(S,a.name,!0);n&&(r!==a.presentation?.group&&(s.push({type:"separator"}),r=a.presentation?.group),s.push({label:a.name,description:this.contextService.getWorkbenchState()===3?a.launch.name:"",highlights:{label:n},buttons:[{iconClass:o.ThemeIcon.asClassName(C.debugConfigure),tooltip:(0,f.localize)(1,null)}],trigger:()=>(a.launch.openConfigFile(!1),t.TriggerAction.CLOSE_PICKER),accept:async()=>{await l.selectConfiguration(a.launch,a.name);try{await this.debugService.startDebugging(a.launch,void 0,{startedByUser:!0})}catch(h){this.notificationService.error(h)}}}))}const p=await l.getDynamicProviders();p.length>0&&s.push({type:"separator",label:(0,f.localize)(2,null)}),l.getRecentDynamicConfigurations().forEach(({name:a,type:n})=>{const h=(0,I.matchesFuzzy)(S,a,!0);h&&s.push({label:a,highlights:{label:h},buttons:[{iconClass:o.ThemeIcon.asClassName(C.debugRemoveConfig),tooltip:(0,f.localize)(3,null)}],trigger:()=>(l.removeRecentDynamicConfigurations(a,n),t.TriggerAction.CLOSE_PICKER),accept:async()=>{await l.selectConfiguration(void 0,a,void 0,{type:n});try{const{launch:g,getConfig:d}=l.selectedConfiguration,m=await d();await this.debugService.startDebugging(g,m,{startedByUser:!0})}catch(g){this.notificationService.error(g)}}})}),p.forEach(a=>{s.push({label:`$(folder) ${a.label}...`,ariaLabel:(0,f.localize)(4,null,a.label),accept:async()=>{const n=await a.pick();n&&(await l.selectConfiguration(n.launch,n.config.name,n.config,{type:a.type}),this.debugService.startDebugging(n.launch,n.config,{startedByUser:!0}))}})});const u=l.getLaunches().filter(a=>!a.hidden);u.length>0&&s.push({type:"separator",label:(0,f.localize)(5,null)});for(const a of u){const n=this.contextService.getWorkbenchState()===3?(0,f.localize)(6,null,a.name):(0,f.localize)(7,null);s.push({label:n,description:this.contextService.getWorkbenchState()===3?a.name:"",highlights:{label:(0,w.withNullAsUndefined)((0,I.matchesFuzzy)(S,n,!0))},accept:()=>this.commandService.executeCommand(v.ADD_CONFIGURATION_ID,a.uri.toString())})}return s}};c.PREFIX="debug ",c=Ee([W(0,A.IDebugService),W(1,k.IWorkspaceContextService),W(2,D.ICommandService),W(3,_.INotificationService)],c),e.StartDebugQuickAccessProvider=c}),define(ne[2586],re([1,0,22,77,10,15,1510,137,78,80,90,625,8,24,27,12,32,26,11,5,73,16,7,2,190,484,275,1082]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugToolBar=void 0;const b="debug.actionswidgetposition",E="debug.actionswidgety";let y=class extends S.Themable{constructor(x,F,L,M,N,B,P,V,z,U){super(P);this.notificationService=x,this.telemetryService=F,this.debugService=L,this.layoutService=M,this.storageService=N,this.configurationService=B,this.instantiationService=V,this.yCoordinate=0,this.isVisible=!1,this.isBuilt=!1,this.$el=_.$("div.debug-toolbar"),this.$el.style.top=`${M.offset?.top??0}px`,this.dragArea=_.append(this.$el,_.$("div.drag-area"+S.ThemeIcon.asCSSSelector(g.debugGripper)));const H=_.append(this.$el,_.$("div.action-bar-container"));this.debugToolBarMenu=z.createMenu(a.MenuId.DebugToolBar,U),this._register(this.debugToolBarMenu),this.activeActions=[],this.actionBar=this._register(new I.ActionBar(H,{orientation:0,actionViewItemProvider:K=>K.id===m.FOCUS_SESSION_ID?this.instantiationService.createInstance(C.FocusSessionActionViewItem,K,void 0):(0,u.createActionViewItem)(this.instantiationService,K)})),this.updateScheduler=this._register(new r.RunOnceScheduler(()=>{const K=this.debugService.state,G=this.configurationService.getValue("debug").toolBarLocation;if(K===0||G==="docked"||G==="hidden"||this.debugService.getViewModel().focusedSession?.isSimpleUI||K===1&&this.debugService.initializingOptions?.debugUI?.simple)return this.hide();const q=[],Z=(0,u.createAndFillInActionBarActions)(this.debugToolBarMenu,{shouldForwardArgs:!0},q);A.equals(q,this.activeActions,(j,X)=>j.id===X.id&&j.enabled===X.enabled)||(this.actionBar.clear(),this.actionBar.push(q,{icon:!0,label:!1}),this.activeActions=q),this.disposeOnUpdate&&(0,h.dispose)(this.disposeOnUpdate),this.disposeOnUpdate=Z,this.show()},20)),this.updateStyles(),this.registerListeners(),this.hide()}registerListeners(){this._register(this.debugService.onDidChangeState(()=>this.updateScheduler.schedule())),this._register(this.configurationService.onDidChangeConfiguration(x=>{x.affectsConfiguration("debug.toolBarLocation")&&this.updateScheduler.schedule()})),this._register(this.debugToolBarMenu.onDidChange(()=>this.updateScheduler.schedule())),this._register(this.actionBar.actionRunner.onDidRun(x=>{x.error&&!t.isCancellationError(x.error)&&this.notificationService.error(x.error),this.telemetryService.publicLog2("workbenchActionExecuted",{id:x.action.id,from:"debugActionsWidget"})})),this._register(_.addDisposableListener(window,_.EventType.RESIZE,()=>this.setCoordinates())),this._register(_.addDisposableGenericMouseUpListener(this.dragArea,x=>{if(new D.StandardMouseEvent(x).detail===2){const L=this.$el.clientWidth;this.setCoordinates(.5*window.innerWidth-.5*L,0),this.storePosition()}})),this._register(_.addDisposableGenericMouseDownListener(this.dragArea,x=>{this.dragArea.classList.add("dragged");const F=_.addDisposableGenericMouseMoveListener(window,M=>{const N=new D.StandardMouseEvent(M);N.preventDefault(),this.setCoordinates(N.posx-14,N.posy-(this.layoutService.offset?.top??0))}),L=_.addDisposableGenericMouseUpListener(window,M=>{this.storePosition(),this.dragArea.classList.remove("dragged"),F.dispose(),L.dispose()})})),this._register(this.layoutService.onDidChangePartVisibility(()=>this.setYCoordinate())),this._register(f.PixelRatio.onDidChange(()=>this.setYCoordinate()))}storePosition(){const x=_.getComputedStyle(this.$el).left;if(x){const F=parseFloat(x)/window.innerWidth;this.storageService.store(b,F,0,1)}}updateStyles(){if(super.updateStyles(),this.$el){this.$el.style.backgroundColor=this.getColor(d.debugToolBarBackground)||"";const x=this.getColor(s.widgetShadow);this.$el.style.boxShadow=x?`0 0 8px 2px ${x}`:"";const F=this.getColor(s.contrastBorder),L=this.getColor(d.debugToolBarBorder);F?this.$el.style.border=`1px solid ${F}`:(this.$el.style.border=L?`solid ${L}`:"none",this.$el.style.border="1px 0")}}setYCoordinate(x=this.yCoordinate){const F=this.layoutService.offset?.top??0;this.$el.style.top=`${F+x}px`,this.yCoordinate=x}setCoordinates(x,F){if(!this.isVisible)return;const L=this.$el.clientWidth;if(x===void 0){const N=this.storageService.get(b,0);x=N!==void 0?parseFloat(N)*window.innerWidth:.5*window.innerWidth-.5*L}x=Math.max(0,Math.min(x,window.innerWidth-L)),this.$el.style.left=`${x}px`,F===void 0&&(F=this.storageService.getNumber(E,0,0));const M=35;if(F<M/2||F>M+M/2){const N=F<M;this.setYCoordinate(N?0:M),this.storageService.store(E,N?0:2*M,0,1)}}show(){if(this.isVisible){this.setCoordinates();return}this.isBuilt||(this.isBuilt=!0,this.layoutService.container.appendChild(this.$el)),this.isVisible=!0,_.show(this.$el),this.setCoordinates()}hide(){this.isVisible=!1,_.hide(this.$el)}dispose(){super.dispose(),this.$el&&this.$el.remove(),this.disposeOnUpdate&&(0,h.dispose)(this.disposeOnUpdate)}};y=Ee([W(0,l.INotificationService),W(1,i.ITelemetryService),W(2,v.IDebugService),W(3,w.IWorkbenchLayoutService),W(4,c.IStorageService),W(5,o.IConfigurationService),W(6,S.IThemeService),W(7,p.IInstantiationService),W(8,a.IMenuService),W(9,n.IContextKeyService)],y),e.DebugToolBar=y;const T=[],R=(O,x,F,L,M,N,B)=>{a.MenuRegistry.appendMenuItem(a.MenuId.DebugToolBar,{group:"navigation",when:M,order:F,command:{id:O,title:x,icon:L,precondition:N},alt:B}),T.push(a.MenuRegistry.appendMenuItem(a.MenuId.ViewContainerTitle,{group:"navigation",when:n.ContextKeyExpr.and(M,n.ContextKeyExpr.equals("viewContainer",v.VIEWLET_ID),v.CONTEXT_DEBUG_STATE.notEqualsTo("inactive"),n.ContextKeyExpr.equals("config.debug.toolBarLocation","docked")),order:F,command:{id:O,title:x,icon:L,precondition:N}}))};a.MenuRegistry.onDidChangeMenu(O=>{if(O.has(a.MenuId.DebugToolBar)){(0,h.dispose)(T);const x=a.MenuRegistry.getMenuItems(a.MenuId.DebugToolBar);for(const F of x)T.push(a.MenuRegistry.appendMenuItem(a.MenuId.ViewContainerTitle,{...F,when:n.ContextKeyExpr.and(F.when,n.ContextKeyExpr.equals("viewContainer",v.VIEWLET_ID),v.CONTEXT_DEBUG_STATE.notEqualsTo("inactive"),n.ContextKeyExpr.equals("config.debug.toolBarLocation","docked"))}))}}),R(m.CONTINUE_ID,m.CONTINUE_LABEL,10,g.debugContinue,v.CONTEXT_DEBUG_STATE.isEqualTo("stopped")),R(m.PAUSE_ID,m.PAUSE_LABEL,10,g.debugPause,v.CONTEXT_DEBUG_STATE.notEqualsTo("stopped"),v.CONTEXT_DEBUG_STATE.isEqualTo("running")),R(m.STOP_ID,m.STOP_LABEL,70,g.debugStop,v.CONTEXT_FOCUSED_SESSION_IS_ATTACH.toNegated(),void 0,{id:m.DISCONNECT_ID,title:m.DISCONNECT_LABEL,icon:g.debugDisconnect}),R(m.DISCONNECT_ID,m.DISCONNECT_LABEL,70,g.debugDisconnect,v.CONTEXT_FOCUSED_SESSION_IS_ATTACH,void 0,{id:m.STOP_ID,title:m.STOP_LABEL,icon:g.debugStop}),R(m.STEP_OVER_ID,m.STEP_OVER_LABEL,20,g.debugStepOver,void 0,v.CONTEXT_DEBUG_STATE.isEqualTo("stopped")),R(m.STEP_INTO_ID,m.STEP_INTO_LABEL,30,g.debugStepInto,void 0,v.CONTEXT_DEBUG_STATE.isEqualTo("stopped")),R(m.STEP_OUT_ID,m.STEP_OUT_LABEL,40,g.debugStepOut,void 0,v.CONTEXT_DEBUG_STATE.isEqualTo("stopped")),R(m.RESTART_SESSION_ID,m.RESTART_LABEL,60,g.debugRestart),R(m.STEP_BACK_ID,(0,k.localize)(0,null),50,g.debugStepBack,v.CONTEXT_STEP_BACK_SUPPORTED,v.CONTEXT_DEBUG_STATE.isEqualTo("stopped")),R(m.REVERSE_CONTINUE_ID,(0,k.localize)(1,null),55,g.debugReverseContinue,v.CONTEXT_STEP_BACK_SUPPORTED,v.CONTEXT_DEBUG_STATE.isEqualTo("stopped")),R(m.FOCUS_SESSION_ID,m.FOCUS_SESSION_LABEL,100,void 0,v.CONTEXT_MULTI_SESSION_DEBUG)}),define(ne[2587],re([1,0,77,10,263,1512,8,5,71,24,27,32,12,166,90,190,282,2,6,576,179,7,21,106,498,56,61,20,9,231,48,227]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DisassemblyViewContribution=e.DisassemblyView=void 0;const O={allowBreakpoint:!1,isBreakpointSet:!1,isBreakpointEnabled:!1,instruction:{address:"-1",instruction:(0,A.localize)(0,null)},instructionAddress:BigInt(-1)};let x=class Gi extends c.EditorPane{constructor(P,V,z,U,H,K){super(i.DISASSEMBLY_VIEW_ID,P,V,z);this._configurationService=U,this._instantiationService=H,this._debugService=K,this._instructionBpList=[],this._enableSourceCodeRender=!0,this._loadingLock=!1,this._disassembledInstructions=void 0,this._onDidChangeStackFrame=new r.Emitter,this._previousDebuggingState=K.state,this._fontInfo=_.BareFontInfo.createFromRawSettings(U.getValue("editor"),t.PixelRatio.value),this._register(U.onDidChangeConfiguration(G=>{if(G.affectsConfiguration("editor")&&(this._fontInfo=_.BareFontInfo.createFromRawSettings(U.getValue("editor"),t.PixelRatio.value)),G.affectsConfiguration("debug")){const q=this._configurationService.getValue("debug").disassemblyView.showSourceCode;this._enableSourceCodeRender!==q?(this._enableSourceCodeRender=q,this.reloadDisassembly(void 0)):this._disassembledInstructions?.rerender()}}))}get fontInfo(){return this._fontInfo}get currentInstructionAddresses(){return this._debugService.getModel().getSessions(!1).map(P=>P.getAllThreads()).reduce((P,V)=>P.concat(V),[]).map(P=>P.getTopStackFrame()).map(P=>P?.instructionPointerReference)}get focusedCurrentInstructionAddress(){return this._debugService.getViewModel().focusedStackFrame?.thread.getTopStackFrame()?.instructionPointerReference}get focusedInstructionAddress(){return this._debugService.getViewModel().focusedStackFrame?.instructionPointerReference}get isSourceCodeRender(){return this._enableSourceCodeRender}get debugSession(){return this._debugService.getViewModel().focusedSession}get onDidChangeStackFrame(){return this._onDidChangeStackFrame.event}createEditor(P){this._enableSourceCodeRender=this._configurationService.getValue("debug").disassemblyView.showSourceCode;const V=this.fontInfo.lineHeight,z=this,U=new class{constructor(){this.headerRowHeight=0}getHeight(K){return z.isSourceCodeRender&&K.instruction.location?.path&&K.instruction.line?K.instruction.endLine?V*(K.instruction.endLine-K.instruction.line+2):V*2:V}},H=this._register(this._instantiationService.createInstance(L,this));this._disassembledInstructions=this._register(this._instantiationService.createInstance(I.WorkbenchTable,"DisassemblyView",P,U,[{label:"",tooltip:"",weight:0,minimumWidth:this.fontInfo.lineHeight,maximumWidth:this.fontInfo.lineHeight,templateId:F.TEMPLATE_ID,project(K){return K}},{label:(0,A.localize)(1,null),tooltip:"",weight:.3,templateId:L.TEMPLATE_ID,project(K){return K}}],[this._instantiationService.createInstance(F,this),H],{identityProvider:{getId:K=>K.instruction.address},horizontalScrolling:!1,overrideStyles:{listBackground:C.editorBackground},multipleSelectionSupport:!1,setRowLineHeight:!1,openOnSingleClick:!1,accessibilityProvider:new M,mouseSupport:!1})),this.reloadDisassembly(),this._register(this._disassembledInstructions.onDidScroll(K=>{if(!this._loadingLock)if(K.oldScrollTop>K.scrollTop&&K.scrollTop<K.height){this._loadingLock=!0;const G=Math.floor(K.scrollTop/this.fontInfo.lineHeight)+Gi.NUM_INSTRUCTIONS_TO_LOAD;this.scrollUp_LoadDisassembledInstructions(Gi.NUM_INSTRUCTIONS_TO_LOAD).then(q=>{q&&this._disassembledInstructions.reveal(G,0),this._loadingLock=!1})}else K.oldScrollTop<K.scrollTop&&K.scrollTop+K.height>K.scrollHeight-K.height&&(this._loadingLock=!0,this.scrollDown_LoadDisassembledInstructions(Gi.NUM_INSTRUCTIONS_TO_LOAD).then(()=>{this._loadingLock=!1}))})),this._register(this._debugService.getViewModel().onDidFocusStackFrame(K=>{this._disassembledInstructions&&(this.goToAddress(),this._onDidChangeStackFrame.fire())})),this._register(this._debugService.getModel().onDidChangeBreakpoints(K=>{if(K&&this._disassembledInstructions){let G=!1;K.added?.forEach(q=>{if(q instanceof u.InstructionBreakpoint){const Z=this.getIndexFromAddress(q.instructionReference);Z>=0&&(this._disassembledInstructions.row(Z).isBreakpointSet=!0,this._disassembledInstructions.row(Z).isBreakpointEnabled=q.enabled,G=!0)}}),K.removed?.forEach(q=>{if(q instanceof u.InstructionBreakpoint){const Z=this.getIndexFromAddress(q.instructionReference);Z>=0&&(this._disassembledInstructions.row(Z).isBreakpointSet=!1,G=!0)}}),K.changed?.forEach(q=>{if(q instanceof u.InstructionBreakpoint){const Z=this.getIndexFromAddress(q.instructionReference);Z>=0&&this._disassembledInstructions.row(Z).isBreakpointEnabled!==q.enabled&&(this._disassembledInstructions.row(Z).isBreakpointEnabled=q.enabled,G=!0)}}),this._instructionBpList=this._debugService.getModel().getInstructionBreakpoints(),G&&this._onDidChangeStackFrame.fire()}})),this._register(this._debugService.onDidChangeState(K=>{(K===3||K===2)&&this._previousDebuggingState!==3&&this._previousDebuggingState!==2&&(this._disassembledInstructions?.splice(0,this._disassembledInstructions.length,[O]),this._enableSourceCodeRender=this._configurationService.getValue("debug").disassemblyView.showSourceCode),this._previousDebuggingState=K}))}layout(P){this._disassembledInstructions&&this._disassembledInstructions.layout(P.height)}goToAddress(P,V){if(!this._disassembledInstructions||(P||(P=this.focusedInstructionAddress),!P))return;const z=this.getIndexFromAddress(P);z>=0?(this._disassembledInstructions.reveal(z),V&&(this._disassembledInstructions.domFocus(),this._disassembledInstructions.setFocus([z]))):this._debugService.state===2&&this.reloadDisassembly(P)}async scrollUp_LoadDisassembledInstructions(P){if(this._disassembledInstructions&&this._disassembledInstructions.length>0){const V=this._disassembledInstructions?.row(0).instruction.address;return this.loadDisassembledInstructions(V,-P,P)}return!1}async scrollDown_LoadDisassembledInstructions(P){if(this._disassembledInstructions&&this._disassembledInstructions.length>0){const V=this._disassembledInstructions?.row(this._disassembledInstructions?.length-1).instruction.address;return this.loadDisassembledInstructions(V,1,P)}return!1}async loadDisassembledInstructions(P,V,z){if((!P||P==="-1")&&(P=this.focusedInstructionAddress),!P)return!1;const U=this.debugSession,H=await U?.disassemble(P,0,V,z);if(U&&H&&this._disassembledInstructions){const K=[];let G,q;for(let j=0;j<H.length;j++){const X=this._instructionBpList.find($=>$.instructionReference===H[j].address),Y=H[j];if(Y.location&&(G=Y.location,q=void 0),Y.line){const $={startLineNumber:Y.line,startColumn:Y.column??0,endLineNumber:Y.endLine??Y.line,endColumn:Y.endColumn??0};b.Range.equalsRange($,q??null)||(q=$,Y.location=G)}K.push({allowBreakpoint:!0,isBreakpointSet:X!==void 0,isBreakpointEnabled:!!X?.enabled,instruction:Y})}const Z=this._disassembledInstructions.length===1?1:0;return V>=0?this._disassembledInstructions.splice(this._disassembledInstructions.length,Z,K):this._disassembledInstructions.splice(0,Z,K),!0}return!1}getIndexFromAddress(P){if(this._disassembledInstructions&&this._disassembledInstructions.length>0){const V=BigInt(P);if(V){let z=0,U=this._disassembledInstructions.length-1;const H=this._disassembledInstructions.row(z),K=this._disassembledInstructions.row(U);if(this.ensureAddressParsed(H),this.ensureAddressParsed(K),H.instructionAddress>V||K.instructionAddress<V)return-1;if(H.instructionAddress===V)return z;if(K.instructionAddress===V)return U;for(;U>z;){const G=Math.floor((U-z)/2)+z,q=this._disassembledInstructions.row(G);if(this.ensureAddressParsed(q),q.instructionAddress>V)U=G;else if(q.instructionAddress<V)z=G;else return G}return z}}return-1}ensureAddressParsed(P){P.instructionAddress===void 0&&(P.instructionAddress=BigInt(P.instruction.address))}reloadDisassembly(P){this._disassembledInstructions&&(this._loadingLock=!0,this._disassembledInstructions.splice(0,this._disassembledInstructions.length,[O]),this._instructionBpList=this._debugService.getModel().getInstructionBreakpoints(),this.loadDisassembledInstructions(P,-Gi.NUM_INSTRUCTIONS_TO_LOAD*4,Gi.NUM_INSTRUCTIONS_TO_LOAD*8).then(()=>{if(this._disassembledInstructions.length>0){const V=Math.floor(this._disassembledInstructions.length/2);this._disassembledInstructions.reveal(V,.5),this._disassembledInstructions.domFocus(),this._disassembledInstructions.setFocus([V])}this._loadingLock=!1}))}};x.NUM_INSTRUCTIONS_TO_LOAD=50,x=Ee([W(0,v.ITelemetryService),W(1,o.IThemeService),W(2,w.IStorageService),W(3,k.IConfigurationService),W(4,D.IInstantiationService),W(5,i.IDebugService)],x),e.DisassemblyView=x;let F=class va{constructor(P,V){this._disassemblyView=P,this._debugService=V,this.templateId=va.TEMPLATE_ID,this._breakpointIcon="codicon-"+S.breakpoint.regular.id,this._breakpointDisabledIcon="codicon-"+S.breakpoint.disabled.id,this._breakpointHintIcon="codicon-"+S.debugBreakpointHint.id,this._debugStackframe="codicon-"+S.debugStackframe.id,this._debugStackframeFocused="codicon-"+S.debugStackframeFocused.id}renderTemplate(P){P.style.alignSelf="flex-end";const V=(0,f.append)(P,(0,f.$)(".disassembly-view"));V.classList.add("codicon"),V.style.display="flex",V.style.alignItems="center",V.style.justifyContent="center",V.style.height=this._disassemblyView.fontInfo.lineHeight+"px";const z={element:void 0},U=[this._disassemblyView.onDidChangeStackFrame(()=>this.rerenderDebugStackframe(V,z.element)),(0,f.addStandardDisposableListener)(P,"mouseover",()=>{z.element?.allowBreakpoint&&V.classList.add(this._breakpointHintIcon)}),(0,f.addStandardDisposableListener)(P,"mouseout",()=>{z.element?.allowBreakpoint&&V.classList.remove(this._breakpointHintIcon)}),(0,f.addStandardDisposableListener)(P,"click",()=>{z.element?.allowBreakpoint&&(V.classList.add(this._breakpointHintIcon),z.element.isBreakpointSet?this._debugService.removeInstructionBreakpoints(z.element.instruction.address):z.element.allowBreakpoint&&!z.element.isBreakpointSet&&this._debugService.addInstructionBreakpoint(z.element.instruction.address,0))})];return{currentElement:z,icon:V,disposables:U}}renderElement(P,V,z,U){z.currentElement.element=P,this.rerenderDebugStackframe(z.icon,P)}disposeTemplate(P){(0,l.dispose)(P.disposables),P.disposables=[]}rerenderDebugStackframe(P,V){V?.instruction.address===this._disassemblyView.focusedCurrentInstructionAddress?P.classList.add(this._debugStackframe):V?.instruction.address===this._disassemblyView.focusedInstructionAddress?P.classList.add(this._debugStackframeFocused):(P.classList.remove(this._debugStackframe),P.classList.remove(this._debugStackframeFocused)),P.classList.remove(this._breakpointHintIcon),V?.isBreakpointSet?V.isBreakpointEnabled?(P.classList.add(this._breakpointIcon),P.classList.remove(this._breakpointDisabledIcon)):(P.classList.remove(this._breakpointIcon),P.classList.add(this._breakpointDisabledIcon)):(P.classList.remove(this._breakpointIcon),P.classList.remove(this._breakpointDisabledIcon))}};F.TEMPLATE_ID="breakpoint",F=Ee([W(1,i.IDebugService)],F);let L=class $i extends l.Disposable{constructor(P,V,z,U,H){super();this._disassemblyView=P,this.editorService=z,this.textModelService=U,this.uriService=H,this.templateId=$i.TEMPLATE_ID,this._topStackFrameColor=V.getColorTheme().getColor(p.topStackFrameColor),this._focusedStackFrameColor=V.getColorTheme().getColor(p.focusedStackFrameColor),this._register(V.onDidColorThemeChange(K=>{this._topStackFrameColor=K.getColor(p.topStackFrameColor),this._focusedStackFrameColor=K.getColor(p.focusedStackFrameColor)}))}renderTemplate(P){const V=(0,f.append)(P,(0,f.$)(".sourcecode")),z=(0,f.append)(P,(0,f.$)(".instruction"));this.applyFontInfo(V),this.applyFontInfo(z);const U={element:void 0},H=[],K=[this._disassemblyView.onDidChangeStackFrame(()=>this.rerenderBackground(z,V,U.element)),(0,f.addStandardDisposableListener)(V,"dblclick",()=>this.openSourceCode(U.element?.instruction))];return{currentElement:U,instruction:z,sourcecode:V,cellDisposable:H,disposables:K}}renderElement(P,V,z,U){this.renderElementInner(P,V,z,U)}async renderElementInner(P,V,z,U){z.currentElement.element=P;const H=P.instruction;z.sourcecode.innerText="";const K=(0,s.createStringBuilder)(1e3);if(this._disassemblyView.isSourceCodeRender&&H.location?.path&&H.line){const q=this.getUriFromSource(H);if(q){let Z;const j=(0,s.createStringBuilder)(1e4),X=await this.textModelService.createModelReference(q);if(Z=X.object.textEditorModel,z.cellDisposable.push(X),Z&&z.currentElement.element===P){let Y=H.line;for(;Y&&Y>=1&&Y<=Z.getLineCount();){const $=Z.getLineContent(Y);if(j.appendASCIIString(` ${Y}: `),j.appendASCIIString($+` `),H.endLine&&Y<H.endLine){Y++;continue}break}z.sourcecode.innerText=j.build()}}}let G=10;if(H.address!=="-1"){K.appendASCIIString(H.address),H.address.length<$i.INSTRUCTION_ADDR_MIN_LENGTH&&(G=$i.INSTRUCTION_ADDR_MIN_LENGTH-H.address.length);for(let q=0;q<G;q++)K.appendASCIIString(" ")}if(H.instructionBytes){K.appendASCIIString(H.instructionBytes),G=10,H.instructionBytes.length<$i.INSTRUCTION_BYTES_MIN_LENGTH&&(G=$i.INSTRUCTION_BYTES_MIN_LENGTH-H.instructionBytes.length);for(let q=0;q<G;q++)K.appendASCIIString(" ")}K.appendASCIIString(H.instruction),z.instruction.innerText=K.build(),this.rerenderBackground(z.instruction,z.sourcecode,P)}disposeElement(P,V,z,U){(0,l.dispose)(z.cellDisposable),z.cellDisposable=[]}disposeTemplate(P){(0,l.dispose)(P.disposables),P.disposables=[]}rerenderBackground(P,V,z){z&&this._disassemblyView.currentInstructionAddresses.includes(z.instruction.address)?P.style.background=this._topStackFrameColor?.toString()||"transparent":z?.instruction.address===this._disassemblyView.focusedInstructionAddress?P.style.background=this._focusedStackFrameColor?.toString()||"transparent":P.style.background="transparent"}openSourceCode(P){if(P){const V=this.getUriFromSource(P),z=P.endLine?{startLineNumber:P.line,endLineNumber:P.endLine,startColumn:P.column||1,endColumn:P.endColumn||1073741824}:{startLineNumber:P.line,endLineNumber:P.line,startColumn:P.column||1,endColumn:P.endColumn||1073741824};this.editorService.openEditor({resource:V,description:(0,A.localize)(2,null),options:{preserveFocus:!1,selection:z,revealIfOpened:!0,selectionRevealType:1,pinned:!1}})}}getUriFromSource(P){const V=P.location.path;return V&&(0,y.isUri)(V)?this.uriService.asCanonicalUri(E.URI.parse(V)):V&&(0,T.isAbsolute)(V)?this.uriService.asCanonicalUri(E.URI.file(V)):(0,g.getUriFromSource)(P.location,P.location.path,this._disassemblyView.debugSession.getId(),this.uriService)}applyFontInfo(P){(0,R.applyFontInfo)(P,this._disassemblyView.fontInfo),P.style.whiteSpace="pre"}};L.TEMPLATE_ID="instruction",L.INSTRUCTION_ADDR_MIN_LENGTH=25,L.INSTRUCTION_BYTES_MIN_LENGTH=30,L=Ee([W(1,o.IThemeService),W(2,n.IEditorService),W(3,m.ITextModelService),W(4,d.IUriIdentityService)],L);class M{getWidgetAriaLabel(){return(0,A.localize)(3,null)}getAriaLabel(P){let V="";const z=P.instruction;return z.address!=="-1"&&(V+=`${(0,A.localize)(4,null)}: ${z.address}`),z.instructionBytes&&(V+=`, ${(0,A.localize)(5,null)}: ${z.instructionBytes}`),V+=`, ${(0,A.localize)(6,null)}: ${z.instruction}`,V}}let N=class{constructor(P,V,z){z.bufferChangeEvents(()=>{this._languageSupportsDisassemleRequest=i.CONTEXT_LANGUAGE_SUPPORTS_DISASSEMBLE_REQUEST.bindTo(z)});const U=()=>{this._onDidChangeModelLanguage&&(this._onDidChangeModelLanguage.dispose(),this._onDidChangeModelLanguage=void 0);const H=P.activeTextEditorControl;if((0,h.isCodeEditor)(H)){const K=H.getModel()?.getLanguageId();this._languageSupportsDisassemleRequest?.set(!!K&&V.getAdapterManager().isDebuggerInterestedInLanguage(K)),this._onDidChangeModelLanguage=H.onDidChangeModelLanguage(G=>{this._languageSupportsDisassemleRequest?.set(V.getAdapterManager().isDebuggerInterestedInLanguage(G.newLanguage))})}else this._languageSupportsDisassemleRequest?.set(!1)};U(),this._onDidActiveEditorChangeListener=P.onDidActiveEditorChange(U)}dispose(){this._onDidActiveEditorChangeListener.dispose(),this._onDidChangeModelLanguage?.dispose()}};N=Ee([W(0,n.IEditorService),W(1,i.IDebugService),W(2,a.IContextKeyService)],N),e.DisassemblyViewContribution=N}),define(ne[2588],re([1,0,9,24,179,83,56]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugStorage=void 0;const D="debug.breakpoint",I="debug.functionbreakpoint",w="debug.databreakpoint",v="debug.exceptionbreakpoint",C="debug.watchexpressions",o="debug.chosenenvironment",c="debug.uxstate";let i=class{constructor(s,l,r){this.storageService=s,this.textFileService=l,this.uriIdentityService=r}loadDebugUxState(){return this.storageService.get(c,1,"default")}storeDebugUxState(s){this.storageService.store(c,s,1,0)}loadBreakpoints(){let s;try{s=JSON.parse(this.storageService.get(D,1,"[]")).map(l=>new _.Breakpoint(t.URI.parse(l.uri.external||l.source.uri.external),l.lineNumber,l.column,l.enabled,l.condition,l.hitCondition,l.logMessage,l.adapterData,this.textFileService,this.uriIdentityService))}catch{}return s||[]}loadFunctionBreakpoints(){let s;try{s=JSON.parse(this.storageService.get(I,1,"[]")).map(l=>new _.FunctionBreakpoint(l.name,l.enabled,l.hitCondition,l.condition,l.logMessage))}catch{}return s||[]}loadExceptionBreakpoints(){let s;try{s=JSON.parse(this.storageService.get(v,1,"[]")).map(l=>new _.ExceptionBreakpoint(l.filter,l.label,l.enabled,l.supportsCondition,l.condition,l.description,l.conditionDescription))}catch{}return s||[]}loadDataBreakpoints(){let s;try{s=JSON.parse(this.storageService.get(w,1,"[]")).map(l=>new _.DataBreakpoint(l.description,l.dataId,!0,l.enabled,l.hitCondition,l.condition,l.logMessage,l.accessTypes,l.accessType))}catch{}return s||[]}loadWatchExpressions(){let s;try{s=JSON.parse(this.storageService.get(C,1,"[]")).map(l=>new _.Expression(l.name,l.id))}catch{}return s||[]}loadChosenEnvironments(){return JSON.parse(this.storageService.get(o,1,"{}"))}storeChosenEnvironments(s){this.storageService.store(o,JSON.stringify(s),1,0)}storeWatchExpressions(s){s.length?this.storageService.store(C,JSON.stringify(s.map(l=>({name:l.name,id:l.getId()}))),1,0):this.storageService.remove(C,1)}storeBreakpoints(s){const l=s.getBreakpoints();l.length?this.storageService.store(D,JSON.stringify(l),1,0):this.storageService.remove(D,1);const r=s.getFunctionBreakpoints();r.length?this.storageService.store(I,JSON.stringify(r),1,0):this.storageService.remove(I,1);const p=s.getDataBreakpoints().filter(a=>a.canPersist);p.length?this.storageService.store(w,JSON.stringify(p),1,0):this.storageService.remove(w,1);const u=s.getExceptionBreakpoints();u.length?this.storageService.store(v,JSON.stringify(u),1,0):this.storageService.remove(v,1)}};i=Ee([W(0,f.IStorageService),W(1,A.ITextFileService),W(2,k.IUriIdentityService)],i),e.DebugStorage=i}),define(ne[431],re([1,0,6,81,13,89,1533,179]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplModel=e.ReplGroup=e.ReplEvaluationResult=e.ReplEvaluationInput=e.RawObjectReplElement=e.SimpleReplElement=void 0;const I=1e4;let w=0;const v=()=>`topReplElement:${w++}`;class C{constructor(p,u,a,n,h){this.session=p,this.id=u,this.value=a,this.severity=n,this.sourceData=h,this._count=1,this._onDidChangeCount=new t.Emitter}toString(p=!1){let u=this.value;for(let n=1;n<this.count;n++)u+=(u.endsWith(` `)?"":` `)+this.value;const a=this.sourceData&&p?` ${this.sourceData.source.name}`:"";return u+a}getId(){return this.id}set count(p){this._count=p,this._onDidChangeCount.fire()}get count(){return this._count}get onDidChangeCount(){return this._onDidChangeCount.event}}e.SimpleReplElement=C;class o{constructor(p,u,a,n,h){this.id=p,this.name=u,this.valueObj=a,this.sourceData=n,this.annotation=h}getId(){return this.id}get value(){return this.valueObj===null?"null":Array.isArray(this.valueObj)?`Array[${this.valueObj.length}]`:(0,_.isObject)(this.valueObj)?"Object":(0,_.isString)(this.valueObj)?`"${this.valueObj}"`:String(this.valueObj)||""}get hasChildren(){return Array.isArray(this.valueObj)&&this.valueObj.length>0||(0,_.isObject)(this.valueObj)&&Object.getOwnPropertyNames(this.valueObj).length>0}evaluateLazy(){throw new Error("Method not implemented.")}getChildren(){let p=[];return Array.isArray(this.valueObj)?p=this.valueObj.slice(0,o.MAX_CHILDREN).map((u,a)=>new o(`${this.id}:${a}`,String(a),u)):(0,_.isObject)(this.valueObj)&&(p=Object.getOwnPropertyNames(this.valueObj).slice(0,o.MAX_CHILDREN).map((u,a)=>new o(`${this.id}:${a}`,u,this.valueObj[u]))),Promise.resolve(p)}toString(){return`${this.name} ${this.value}`}}e.RawObjectReplElement=o,o.MAX_CHILDREN=1e3;class c{constructor(p){this.value=p,this.id=(0,A.generateUuid)()}toString(){return this.value}getId(){return this.id}}e.ReplEvaluationInput=c;class i extends D.ExpressionContainer{constructor(){super(void 0,void 0,0,(0,A.generateUuid)());this._available=!0}get available(){return this._available}async evaluateExpression(p,u,a,n){const h=await super.evaluateExpression(p,u,a,n);return this._available=h,h}toString(){return`${this.value}`}}e.ReplEvaluationResult=i;class S{constructor(p,u,a){this.name=p,this.autoExpand=u,this.sourceData=a,this.children=[],this.ended=!1,this.id=`replGroup:${S.COUNTER++}`}get hasChildren(){return!0}getId(){return this.id}toString(p=!1){const u=p&&this.sourceData?` ${this.sourceData.source.name}`:"";return this.name+u}addChild(p){const u=this.children.length?this.children[this.children.length-1]:void 0;u instanceof S&&!u.hasEnded?u.addChild(p):this.children.push(p)}getChildren(){return this.children}end(){const p=this.children.length?this.children[this.children.length-1]:void 0;p instanceof S&&!p.hasEnded?p.end():this.ended=!0}get hasEnded(){return this.ended}}e.ReplGroup=S,S.COUNTER=0;function s(r,p){return!r&&!p?!0:r&&p?r.column===p.column&&r.lineNumber===p.lineNumber&&r.source.uri.toString()===p.source.uri.toString():!1}class l{constructor(p){this.configurationService=p,this.replElements=[],this._onDidChangeElements=new t.Emitter,this.onDidChangeElements=this._onDidChangeElements.event}getReplElements(){return this.replElements}async addReplExpression(p,u,a){this.addReplElement(new c(a));const n=new i;await n.evaluateExpression(a,p,u,"repl"),this.addReplElement(n)}appendToRepl(p,u,a,n){const h="[2J";if(typeof u=="string"&&u.indexOf(h)>=0&&(this.removeReplExpressions(),this.appendToRepl(p,k.localize(0,null),f.default.Ignore),u=u.substring(u.lastIndexOf(h)+h.length)),typeof u=="string"){const g=this.replElements.length?this.replElements[this.replElements.length-1]:void 0;if(g instanceof C&&g.severity===a){const m=this.configurationService.getValue("debug");if(g.value===u&&s(g.sourceData,n)&&m.console.collapseIdenticalLines){g.count++;return}if(!g.value.endsWith(` `)&&!g.value.endsWith(`\r `)&&g.count===1){this.replElements[this.replElements.length-1]=new C(p,v(),g.value+u,a,n),this._onDidChangeElements.fire();return}}const d=new C(p,v(),u,a,n);this.addReplElement(d)}else u.severity=a,u.sourceData=n,this.addReplElement(u)}startGroup(p,u,a){const n=new S(p,u,a);this.addReplElement(n)}endGroup(){const p=this.replElements[this.replElements.length-1];p instanceof S&&p.end()}addReplElement(p){const u=this.replElements.length?this.replElements[this.replElements.length-1]:void 0;u instanceof S&&!u.hasEnded?u.addChild(p):(this.replElements.push(p),this.replElements.length>I&&this.replElements.splice(0,this.replElements.length-I)),this._onDidChangeElements.fire()}removeReplExpressions(){this.replElements.length>0&&(this.replElements=[],this._onDidChangeElements.fire())}}e.ReplModel=l}),define(ne[371],re([1,0,10,78,241,183,102,150,2,37,68,12,90,179,431]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractExpressionsRenderer=e.renderVariable=e.renderExpressionValue=e.renderViewTree=e.twistiePixels=e.MAX_VALUE_RENDER_LENGTH_IN_VIEWLET=void 0,e.MAX_VALUE_RENDER_LENGTH_IN_VIEWLET=1024,e.twistiePixels=20;const S=/^(true|false)$/i,s=/^(['"]).*\1$/,l=t.$;function r(n){const h=l(".");return h.classList.add("debug-view-content"),n.appendChild(h),h}e.renderViewTree=r;function p(n,h,g){let d=typeof n=="string"?n:n.value;if(h.className="value",d===null||(n instanceof c.Expression||n instanceof c.Variable||n instanceof i.ReplEvaluationResult)&&!n.available?(h.classList.add("unavailable"),d!==c.Expression.DEFAULT_VALUE&&h.classList.add("error")):n instanceof c.ExpressionContainer&&g.showChanged&&n.valueChanged&&d!==c.Expression.DEFAULT_VALUE&&(h.className="value changed",n.valueChanged=!1),g.colorize&&typeof n!="string"&&(n.type==="number"||n.type==="boolean"||n.type==="string"?h.classList.add(n.type):isNaN(+d)?S.test(d)?h.classList.add("boolean"):s.test(d)&&h.classList.add("string"):h.classList.add("number")),g.maxValueLength&&d&&d.length>g.maxValueLength&&(d=d.substring(0,g.maxValueLength)+"..."),d||(d=""),g.linkDetector){h.textContent="";const m=n instanceof c.ExpressionContainer?n.getSession():void 0;h.appendChild(g.linkDetector.linkify(d,!1,m?m.root:void 0))}else h.textContent=d;g.showHover&&(h.title=d||"")}e.renderExpressionValue=p;function u(n,h,g,d,m){if(n.available){let b=n.name;n.value&&typeof n.name=="string"&&(b+=":"),h.label.set(b,d,n.type?n.type:n.name),h.name.classList.toggle("virtual",n.presentationHint?.kind==="virtual"),h.name.classList.toggle("internal",n.presentationHint?.visibility==="internal")}else n.value&&typeof n.name=="string"&&n.name&&h.label.set(":");h.expression.classList.toggle("lazy",!!n.presentationHint?.lazy),h.lazyButton.title=n.presentationHint?.lazy?n.value:"",p(n,h.value,{showChanged:g,maxValueLength:e.MAX_VALUE_RENDER_LENGTH_IN_VIEWLET,showHover:!0,colorize:!0,linkDetector:m})}e.renderVariable=u;let a=class{constructor(h,g,d){this.debugService=h,this.contextViewService=g,this.themeService=d}renderTemplate(h){const g=t.append(h,l(".expression")),d=t.append(g,l("span.name")),m=t.append(g,l("span.value")),b=t.append(g,l("span.lazy-button"));b.textContent="(...)";const E=new _.HighlightedLabel(d),y=t.append(g,l(".inputBoxContainer")),T=new I.DisposableStore;let R;this.renderActionBar&&(t.append(g,l(".span.actionbar-spacer")),R=T.add(new f.ActionBar(g)));const O={expression:g,name:d,value:m,label:E,inputBoxContainer:y,actionBar:R,elementDisposable:[],templateDisposable:T,lazyButton:b,currentElement:void 0};return T.add(t.addDisposableListener(b,t.EventType.CLICK,()=>{O.currentElement&&this.debugService.getViewModel().evaluateLazyExpression(O.currentElement)})),O}renderElement(h,g,d){const{element:m}=h;d.currentElement=m,this.renderExpression(m,d,(0,k.createMatches)(h.filterData)),d.actionBar&&this.renderActionBar(d.actionBar,m,d);const b=this.debugService.getViewModel().getSelectedExpression();if(m===b?.expression||m instanceof c.Variable&&m.errorMessage){const E=this.getInputBoxOptions(m,!!b?.settingWatch);E&&d.elementDisposable.push(this.renderInputBox(d.name,d.value,d.inputBoxContainer,E))}}renderInputBox(h,g,d,m){h.style.display="none",g.style.display="none",d.style.display="initial";const b=new A.InputBox(d,this.contextViewService,m),E=(0,v.attachInputBoxStyler)(b,this.themeService);b.value=m.initialValue,b.focus(),b.select();const y=(0,D.once)((R,O)=>{h.style.display="",g.style.display="",d.style.display="none";const x=b.value;(0,I.dispose)(T),O&&(this.debugService.getViewModel().setSelectedExpression(void 0,!1),m.onFinish(x,R))}),T=[b,t.addStandardDisposableListener(b.inputElement,t.EventType.KEY_DOWN,R=>{const O=R.equals(9),x=R.equals(3);(O||x)&&(R.preventDefault(),R.stopPropagation(),y(x,!0))}),t.addDisposableListener(b.inputElement,t.EventType.BLUR,()=>{y(!0,!0)}),t.addDisposableListener(b.inputElement,t.EventType.CLICK,R=>{R.preventDefault(),R.stopPropagation()}),E];return(0,I.toDisposable)(()=>{y(!1,!1)})}disposeElement(h,g,d){(0,I.dispose)(d.elementDisposable),d.elementDisposable=[]}disposeTemplate(h){(0,I.dispose)(h.elementDisposable),h.templateDisposable.dispose()}};a=Ee([W(0,o.IDebugService),W(1,w.IContextViewService),W(2,C.IThemeService)],a),e.AbstractExpressionsRenderer=a}),define(ne[2589],re([1,0,11,10,90,179,37,5,16,38,371,36,21,8,7,131,45,73,71,241,102,6,2,78,231,275,43,32,12,41,27,68,26,29,48,190,1494,33]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CallStackView=e.getSpecificSourceName=e.getContextForContributedActions=e.getContext=void 0;const B=f.$;function P(me,be){return be.sessionId=me.getId(),be}function V(me,be){return be.threadId=me.getId(),P(me.session,be),be}function z(me,be){return be.frameId=me.getId(),be.frameName=me.name,be.frameLocation={range:me.range,source:me.source.raw},V(me.thread,be),be}function U(me){return me instanceof A.StackFrame?z(me,{}):me instanceof A.Thread?V(me,{}):ce(me)?P(me,{}):void 0}e.getContext=U;function H(me){return me instanceof A.StackFrame?me.source.inMemory?me.source.raw.path||me.source.reference||me.source.name:me.source.uri.toString():me instanceof A.Thread?me.threadId:ce(me)?me.getId():""}e.getContextForContributedActions=H;function K(me){let be=me.thread.getStaleCallStack();be=be.length>0?be:me.thread.getCallStack();const Ce=be.map(ge=>ge.source).filter(ge=>ge!==me.source);let ve=0;if(Ce.forEach(ge=>{ge.name===me.source.name&&(ve=Math.max(ve,(0,x.commonSuffixLength)(me.source.uri.path,ge.uri.path)))}),ve===0)return me.source.name;const he=Math.max(0,me.source.uri.path.lastIndexOf(F.posix.sep,me.source.uri.path.length-ve-1));return(he>0?"...":"")+me.source.uri.path.substring(he)}e.getSpecificSourceName=K;async function G(me,be){me.parentSession&&await G(me.parentSession,be),await be.expand(me)}let q=class extends S.ViewPane{constructor(be,Ce,ve,he,ge,de,Se,we,ye,ke,Ie,Te,De){super(be,he,Ce,we,ke,de,ge,Ie,Te,De);this.options=be,this.debugService=ve,this.editorService=Se,this.needsRefresh=!1,this.ignoreSelectionChangedEvent=!1,this.ignoreFocusStackFrameEvent=!1,this.autoExpandedSessions=new Set,this.selectionNeedsUpdate=!1,this.callStackItemType=_.CONTEXT_CALLSTACK_ITEM_TYPE.bindTo(ke),this.callStackSessionIsAttach=_.CONTEXT_CALLSTACK_SESSION_IS_ATTACH.bindTo(ke),this.stackFrameSupportsRestart=_.CONTEXT_STACK_FRAME_SUPPORTS_RESTART.bindTo(ke),this.callStackItemStopped=_.CONTEXT_CALLSTACK_ITEM_STOPPED.bindTo(ke),this.sessionHasOneThread=_.CONTEXT_CALLSTACK_SESSION_HAS_ONE_THREAD.bindTo(ke),this.menu=ye.createMenu(I.MenuId.DebugCallStackContext,ke),this._register(this.menu),this.onCallStackChangeScheduler=this._register(new t.RunOnceScheduler(async()=>{const _e=this.debugService.getModel().getSessions();_e.length===0&&this.autoExpandedSessions.clear();const Re=_e.length===1&&_e[0].getAllThreads().length===1?_e[0].getAllThreads()[0]:void 0,Ne=_e.length===1?_e[0].getStoppedDetails():void 0;Ne&&(Re||typeof Ne.threadId!="number")?(this.stateMessageLabel.textContent=se(Ne),this.stateMessageLabel.title=te(Ne),this.stateMessageLabel.classList.toggle("exception",Ne.reason==="exception"),this.stateMessage.hidden=!1):_e.length===1&&_e[0].state===3?(this.stateMessageLabel.textContent=(0,M.localize)(0,null),this.stateMessageLabel.title=_e[0].getLabel(),this.stateMessageLabel.classList.remove("exception"),this.stateMessage.hidden=!1):this.stateMessage.hidden=!0,this.updateActions(),this.needsRefresh=!1,this.dataSource.deemphasizedStackFramesToShow=[],await this.tree.updateChildren();try{const xe=new Set;_e.forEach(Ae=>{Ae.parentSession&&!this.autoExpandedSessions.has(Ae.parentSession)&&xe.add(Ae.parentSession)});for(const Ae of xe)await G(Ae,this.tree),this.autoExpandedSessions.add(Ae)}catch{}this.selectionNeedsUpdate&&(this.selectionNeedsUpdate=!1,await this.updateTreeSelection())},50))}renderHeaderTitle(be){super.renderHeaderTitle(be,this.options.title),this.stateMessage=f.append(be,B("span.call-stack-state-message")),this.stateMessage.hidden=!0,this.stateMessageLabel=f.append(this.stateMessage,B("span.label"))}renderBody(be){super.renderBody(be),this.element.classList.add("debug-pane"),be.classList.add("debug-call-stack");const Ce=(0,v.renderViewTree)(be);this.dataSource=new ae(this.debugService),this.tree=this.instantiationService.createInstance(r.WorkbenchCompressibleAsyncDataTree,"CallStackView",Ce,new ee,new oe(this.debugService),[new Z(this.menu,this.callStackItemType,this.callStackSessionIsAttach,this.callStackItemStopped,this.sessionHasOneThread,this.instantiationService),new j(this.menu,this.callStackItemType,this.callStackItemStopped),this.instantiationService.createInstance(X,this.callStackItemType),new Y,new $(this.themeService),new J(this.themeService)],this.dataSource,{accessibilityProvider:new ue,compressionEnabled:!0,autoExpandSingleChildren:!0,identityProvider:{getId:he=>typeof he=="string"?he:he instanceof Array?`showMore ${he[0].getId()}`:he.getId()},keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:he=>ce(he)?he.getLabel():he instanceof A.Thread?`${he.name} ${he.stateLabel}`:he instanceof A.StackFrame||typeof he=="string"?he:he instanceof A.ThreadAndSessionIds?$.LABEL:(0,M.localize)(1,null),getCompressedNodeKeyboardNavigationLabel:he=>{const ge=he[0];return ce(ge)?ge.getLabel():""}},expandOnlyOnTwistieClick:!0,overrideStyles:{listBackground:this.getBackgroundColor()}}),this.tree.setInput(this.debugService.getModel()),this._register(this.tree.onDidOpen(async he=>{if(this.ignoreSelectionChangedEvent)return;const ge=(Se,we,ye)=>{this.ignoreFocusStackFrameEvent=!0;try{this.debugService.focusStackFrame(Se,we,ye,!0)}finally{this.ignoreFocusStackFrameEvent=!1}},de=he.element;if(de instanceof A.StackFrame&&(ge(de,de.thread,de.thread.session),de.openInEditor(this.editorService,he.editorOptions.preserveFocus,he.sideBySide,he.editorOptions.pinned)),de instanceof A.Thread&&ge(void 0,de,de.session),ce(de)&&ge(void 0,void 0,de),de instanceof A.ThreadAndSessionIds){const Se=this.debugService.getModel().getSession(de.sessionId),we=Se&&Se.getThread(de.threadId);if(we){const ye=we.stoppedDetails?.totalFrames,ke=typeof ye=="number"?ye-we.getCallStack().length:void 0;await we.fetchCallStack(ke),await this.tree.updateChildren()}}de instanceof Array&&(this.dataSource.deemphasizedStackFramesToShow.push(...de),this.tree.updateChildren())})),this._register(this.debugService.getModel().onDidChangeCallStack(()=>{if(!this.isBodyVisible()){this.needsRefresh=!0;return}this.onCallStackChangeScheduler.isScheduled()||this.onCallStackChangeScheduler.schedule()}));const ve=a.Event.any(this.debugService.getViewModel().onDidFocusStackFrame,this.debugService.getViewModel().onDidFocusSession);this._register(ve(async()=>{if(!this.ignoreFocusStackFrameEvent){if(!this.isBodyVisible()){this.needsRefresh=!0;return}if(this.onCallStackChangeScheduler.isScheduled()){this.selectionNeedsUpdate=!0;return}await this.updateTreeSelection()}})),this._register(this.tree.onContextMenu(he=>this.onContextMenu(he))),this.debugService.state===2&&this.onCallStackChangeScheduler.schedule(0),this._register(this.onDidChangeBodyVisibility(he=>{he&&this.needsRefresh&&this.onCallStackChangeScheduler.schedule()})),this._register(this.debugService.onDidNewSession(he=>{const ge=[];ge.push(he.onDidChangeName(()=>{this.tree.hasNode(he)&&this.tree.rerender(he)})),ge.push(he.onDidEndAdapter(()=>(0,n.dispose)(ge))),he.parentSession&&this.autoExpandedSessions.delete(he.parentSession)}))}layoutBody(be,Ce){super.layoutBody(be,Ce),this.tree.layout(be,Ce)}focus(){this.tree.domFocus()}collapseAll(){this.tree.collapseAll()}async updateTreeSelection(){if(!this.tree||!this.tree.getInput())return;const be=ge=>{this.ignoreSelectionChangedEvent=!0;try{this.tree.setSelection([ge]),this.tree.getRelativeTop(ge)===null?this.tree.reveal(ge,.5):this.tree.reveal(ge)}catch{}finally{this.ignoreSelectionChangedEvent=!1}},Ce=this.debugService.getViewModel().focusedThread,ve=this.debugService.getViewModel().focusedSession,he=this.debugService.getViewModel().focusedStackFrame;if(!Ce)ve?be(ve):this.tree.setSelection([]);else{try{await G(Ce.session,this.tree)}catch{}try{await this.tree.expand(Ce)}catch{}const ge=he||ve;ge&&be(ge)}}onContextMenu(be){const Ce=be.element;this.stackFrameSupportsRestart.reset(),ce(Ce)?this.callStackItemType.set("session"):Ce instanceof A.Thread?this.callStackItemType.set("thread"):Ce instanceof A.StackFrame?(this.callStackItemType.set("stackFrame"),this.stackFrameSupportsRestart.set(Ce.canRestart)):this.callStackItemType.reset();const ge={primary:[],secondary:[]},de=(0,l.createAndFillInContextMenuActions)(this.menu,{arg:H(Ce),shouldForwardArgs:!0},ge,"inline");this.contextMenuService.showContextMenu({getAnchor:()=>be.anchor,getActions:()=>ge.secondary,getActionsContext:()=>U(Ce),onHide:()=>(0,n.dispose)(de)})}};q=Ee([W(1,k.IContextMenuService),W(2,_.IDebugService),W(3,w.IKeybindingService),W(4,D.IInstantiationService),W(5,m.IViewDescriptorService),W(6,o.IEditorService),W(7,c.IConfigurationService),W(8,I.IMenuService),W(9,i.IContextKeyService),W(10,y.IOpenerService),W(11,E.IThemeService),W(12,T.ITelemetryService)],q),e.CallStackView=q;class Z{constructor(be,Ce,ve,he,ge,de){this.menu=be,this.callStackItemType=Ce,this.callStackSessionIsAttach=ve,this.callStackItemStopped=he,this.sessionHasOneThread=ge,this.instantiationService=de}get templateId(){return Z.ID}renderTemplate(be){const Ce=f.append(be,B(".session"));f.append(Ce,B(E.ThemeIcon.asCSSSelector(L.callstackViewSession)));const ve=f.append(Ce,B(".name")),he=f.append(Ce,B("span.state.label.monaco-count-badge.long")),ge=new p.HighlightedLabel(ve),de=new h.ActionBar(Ce,{actionViewItemProvider:Se=>{if(Se instanceof I.MenuItemAction)return this.instantiationService.createInstance(l.MenuEntryActionViewItem,Se,void 0);if(Se instanceof I.SubmenuItemAction)return this.instantiationService.createInstance(l.SubmenuEntryActionViewItem,Se,void 0)}});return{session:Ce,name:ve,stateLabel:he,label:ge,actionBar:de,elementDisposable:[]}}renderElement(be,Ce,ve){this.doRenderElement(be.element,(0,u.createMatches)(be.filterData),ve)}renderCompressedElements(be,Ce,ve){const he=be.element.elements[be.element.elements.length-1],ge=(0,u.createMatches)(be.filterData);this.doRenderElement(he,ge,ve)}doRenderElement(be,Ce,ve){ve.session.title=(0,M.localize)(2,null),ve.label.set(be.getLabel(),Ce);const he=be.getStoppedDetails(),ge=be.getAllThreads().find(ye=>ye.stopped),de=[],we={primary:de,secondary:[]};this.callStackItemType.set("session"),this.callStackItemStopped.set(be.state===2),this.sessionHasOneThread.set(be.getAllThreads().length===1),this.callStackSessionIsAttach.set((0,g.isSessionAttach)(be)),ve.elementDisposable.push((0,l.createAndFillInActionBarActions)(this.menu,{arg:H(be),shouldForwardArgs:!0},we,"inline")),ve.actionBar.clear(),ve.actionBar.push(de,{icon:!0,label:!1}),ve.actionBar.context=U(be),ve.stateLabel.style.display="",he?(ve.stateLabel.textContent=se(he),ve.session.title=`${be.getLabel()}: ${te(he)}`,ve.stateLabel.classList.toggle("exception",he.reason==="exception")):ge&&ge.stoppedDetails?(ve.stateLabel.textContent=se(ge.stoppedDetails),ve.session.title=`${be.getLabel()}: ${te(ge.stoppedDetails)}`,ve.stateLabel.classList.toggle("exception",ge.stoppedDetails.reason==="exception")):(ve.stateLabel.textContent=(0,M.localize)(3,null),ve.stateLabel.classList.remove("exception"))}disposeTemplate(be){be.actionBar.dispose()}disposeElement(be,Ce,ve){(0,n.dispose)(ve.elementDisposable)}}Z.ID="session";class j{constructor(be,Ce,ve){this.menu=be,this.callStackItemType=Ce,this.callStackItemStopped=ve}get templateId(){return j.ID}renderTemplate(be){const Ce=f.append(be,B(".thread")),ve=f.append(Ce,B(".name")),he=f.append(Ce,B("span.state.label.monaco-count-badge.long")),ge=new p.HighlightedLabel(ve),de=new h.ActionBar(Ce);return{thread:Ce,name:ve,stateLabel:he,label:ge,actionBar:de,elementDisposable:[]}}renderElement(be,Ce,ve){const he=be.element;ve.thread.title=he.name,ve.label.set(he.name,(0,u.createMatches)(be.filterData)),ve.stateLabel.textContent=he.stateLabel,ve.stateLabel.classList.toggle("exception",he.stoppedDetails?.reason==="exception"),ve.actionBar.clear(),this.callStackItemType.set("thread"),this.callStackItemStopped.set(he.stopped);const ge=[],de={primary:ge,secondary:[]};ve.elementDisposable.push((0,l.createAndFillInActionBarActions)(this.menu,{arg:H(he),shouldForwardArgs:!0},de,"inline")),ve.actionBar.push(ge,{icon:!0,label:!1})}renderCompressedElements(be,Ce,ve,he){throw new Error("Method not implemented.")}disposeElement(be,Ce,ve){(0,n.dispose)(ve.elementDisposable)}disposeTemplate(be){be.actionBar.dispose()}}j.ID="thread";let X=class Sa{constructor(be,Ce,ve){this.callStackItemType=be,this.labelService=Ce,this.notificationService=ve}get templateId(){return Sa.ID}renderTemplate(be){const Ce=f.append(be,B(".stack-frame")),ve=f.append(Ce,B("span.label.expression")),he=f.append(Ce,B(".file")),ge=f.append(he,B("span.file-name")),de=f.append(he,B("span.line-number-wrapper")),Se=f.append(de,B("span.line-number.monaco-count-badge")),we=new p.HighlightedLabel(ve),ye=new h.ActionBar(Ce);return{file:he,fileName:ge,label:we,lineNumber:Se,stackFrame:Ce,actionBar:ye}}renderElement(be,Ce,ve){const he=be.element;ve.stackFrame.classList.toggle("disabled",!he.source||!he.source.available||le(he)),ve.stackFrame.classList.toggle("label",he.presentationHint==="label"),ve.stackFrame.classList.toggle("subtle",he.presentationHint==="subtle");const ge=!!he.thread.session.capabilities.supportsRestartFrame&&he.presentationHint!=="label"&&he.presentationHint!=="subtle"&&he.canRestart;if(ve.stackFrame.classList.toggle("has-actions",ge),ve.file.title=he.source.inMemory?he.source.uri.path:this.labelService.getUriLabel(he.source.uri),he.source.raw.origin&&(ve.file.title+=` ${he.source.raw.origin}`),ve.label.set(he.name,(0,u.createMatches)(be.filterData),he.name),ve.fileName.textContent=K(he),he.range.startLineNumber!==void 0?(ve.lineNumber.textContent=`${he.range.startLineNumber}`,he.range.startColumn&&(ve.lineNumber.textContent+=`:${he.range.startColumn}`),ve.lineNumber.classList.remove("unavailable")):ve.lineNumber.classList.add("unavailable"),ve.actionBar.clear(),this.callStackItemType.set("stackFrame"),ge){const de=new C.Action("debug.callStack.restartFrame",(0,M.localize)(4,null),E.ThemeIcon.asClassName(L.debugRestartFrame),!0,async()=>{try{await he.restart()}catch(Se){this.notificationService.error(Se)}});ve.actionBar.push(de,{icon:!0,label:!1})}}renderCompressedElements(be,Ce,ve,he){throw new Error("Method not implemented.")}disposeTemplate(be){be.actionBar.dispose()}};X.ID="stackFrame",X=Ee([W(1,s.ILabelService),W(2,O.INotificationService)],X);class Y{get templateId(){return Y.ID}renderTemplate(be){return{label:f.append(be,B(".error"))}}renderElement(be,Ce,ve){const he=be.element;ve.label.textContent=he,ve.label.title=he}renderCompressedElements(be,Ce,ve,he){throw new Error("Method not implemented.")}disposeTemplate(be){}}Y.ID="error";class ${constructor(be){this.themeService=be}get templateId(){return $.ID}renderTemplate(be){const Ce=f.append(be,B(".load-all")),ve=(0,R.attachStylerCallback)(this.themeService,{textLinkForeground:b.textLinkForeground},he=>{he.textLinkForeground&&(Ce.style.color=he.textLinkForeground.toString())});return{label:Ce,toDispose:ve}}renderElement(be,Ce,ve){ve.label.textContent=$.LABEL}renderCompressedElements(be,Ce,ve,he){throw new Error("Method not implemented.")}disposeTemplate(be){be.toDispose.dispose()}}$.ID="loadAll",$.LABEL=(0,M.localize)(5,null);class J{constructor(be){this.themeService=be}get templateId(){return J.ID}renderTemplate(be){const Ce=f.append(be,B(".show-more")),ve=(0,R.attachStylerCallback)(this.themeService,{textLinkForeground:b.textLinkForeground},he=>{he.textLinkForeground&&(Ce.style.color=he.textLinkForeground.toString())});return{label:Ce,toDispose:ve}}renderElement(be,Ce,ve){const he=be.element;he.every(ge=>!!(ge.source&&ge.source.origin&&ge.source.origin===he[0].source.origin))?ve.label.textContent=(0,M.localize)(6,null,he.length,he[0].source.origin):ve.label.textContent=(0,M.localize)(7,null,he.length)}renderCompressedElements(be,Ce,ve,he){throw new Error("Method not implemented.")}disposeTemplate(be){be.toDispose.dispose()}}J.ID="showMore";class ee{getHeight(be){return be instanceof A.StackFrame&&be.presentationHint==="label"||be instanceof A.ThreadAndSessionIds||be instanceof Array?16:22}getTemplateId(be){return ce(be)?Z.ID:be instanceof A.Thread?j.ID:be instanceof A.StackFrame?X.ID:typeof be=="string"?Y.ID:be instanceof A.ThreadAndSessionIds?$.ID:J.ID}}function te(me){return me.text??se(me)}function se(me){return me.description||(me.reason?(0,M.localize)(8,null,me.reason):(0,M.localize)(9,null))}function ie(me){return typeof me.getSessions=="function"}function ce(me){return me&&typeof me.getAllThreads=="function"}function le(me){return me.source.presentationHint==="deemphasize"||me.presentationHint==="deemphasize"}class ae{constructor(be){this.debugService=be,this.deemphasizedStackFramesToShow=[]}hasChildren(be){if(ce(be)){const Ce=be.getAllThreads();return Ce.length>1||Ce.length===1&&Ce[0].stopped||!!this.debugService.getModel().getSessions().find(ve=>ve.parentSession===be)}return ie(be)||be instanceof A.Thread&&be.stopped}async getChildren(be){if(ie(be)){const Ce=be.getSessions();if(Ce.length===0)return Promise.resolve([]);if(Ce.length>1||this.debugService.getViewModel().isMultiSessionView())return Promise.resolve(Ce.filter(he=>!he.parentSession));const ve=Ce[0].getAllThreads();return ve.length===1?this.getThreadChildren(ve[0]):Promise.resolve(ve)}else if(ce(be)){const Ce=this.debugService.getModel().getSessions().filter(he=>he.parentSession===be),ve=be.getAllThreads();return ve.length===1?(await this.getThreadChildren(ve[0])).concat(Ce):Promise.resolve(ve.concat(Ce))}else return this.getThreadChildren(be)}getThreadChildren(be){return this.getThreadCallstack(be).then(Ce=>{const ve=[];return Ce.forEach((he,ge)=>{if(he instanceof A.StackFrame&&he.source&&le(he)&&this.deemphasizedStackFramesToShow.indexOf(he)===-1){if(ve.length){const Se=ve[ve.length-1];if(Se instanceof Array){Se.push(he);return}}const de=ge<Ce.length-1?Ce[ge+1]:void 0;if(de instanceof A.StackFrame&&de.source&&le(de)){ve.push([he]);return}}ve.push(he)}),ve})}async getThreadCallstack(be){let Ce=be.getCallStack();return(!Ce||!Ce.length)&&(await be.fetchCallStack(),Ce=be.getCallStack()),Ce.length===1&&be.session.capabilities.supportsDelayedStackTraceLoading&&be.stoppedDetails&&be.stoppedDetails.totalFrames&&be.stoppedDetails.totalFrames>1&&(Ce=Ce.concat(be.getStaleCallStack().slice(1))),be.stoppedDetails&&be.stoppedDetails.framesErrorMessage&&(Ce=Ce.concat([be.stoppedDetails.framesErrorMessage])),!be.reachedEndOfCallStack&&be.stoppedDetails&&(Ce=Ce.concat([new A.ThreadAndSessionIds(be.session.getId(),be.threadId)])),Ce}}class ue{getWidgetAriaLabel(){return(0,M.localize)(10,null)}getAriaLabel(be){if(be instanceof A.Thread)return(0,M.localize)(11,null,be.name,be.stateLabel);if(be instanceof A.StackFrame)return(0,M.localize)(12,null,be.name,be.range.startLineNumber,K(be));if(ce(be)){const Ce=be.getAllThreads().find(he=>he.stopped),ve=Ce?Ce.stateLabel:(0,M.localize)(13,null);return(0,M.localize)(14,null,be.getLabel(),ve)}return typeof be=="string"?be:be instanceof Array?(0,M.localize)(15,null,be.length):$.LABEL}}class oe{constructor(be){this.debugService=be}isIncompressible(be){return ce(be)?!(be.compact||this.debugService.getModel().getSessions().some(ve=>ve.parentSession===be&&ve.compact)):!0}}(0,I.registerAction2)(class extends S.ViewAction{constructor(){super({id:"callStack.collapse",viewId:_.CALLSTACK_VIEW_ID,title:(0,M.localize)(16,null),f1:!1,icon:N.Codicon.collapseAll,precondition:_.CONTEXT_DEBUG_STATE.isEqualTo((0,_.getStateLabel)(2)),menu:{id:I.MenuId.ViewTitle,order:10,group:"navigation",when:i.ContextKeyExpr.equals("view",_.CALLSTACK_VIEW_ID)}})}runInView(be,Ce){Ce.collapseAll()}});function fe(me,be,Ce,ve,he,ge){I.MenuRegistry.appendMenuItem(I.MenuId.DebugCallStackContext,{group:"inline",order:he,when:ve,command:{id:me,title:be,icon:Ce,precondition:ge}})}const pe=i.ContextKeyExpr.or(_.CONTEXT_CALLSTACK_ITEM_TYPE.isEqualTo("thread"),i.ContextKeyExpr.and(_.CONTEXT_CALLSTACK_ITEM_TYPE.isEqualTo("session"),_.CONTEXT_CALLSTACK_SESSION_HAS_ONE_THREAD));fe(d.PAUSE_ID,d.PAUSE_LABEL,L.debugPause,i.ContextKeyExpr.and(pe,_.CONTEXT_CALLSTACK_ITEM_STOPPED.toNegated()),10),fe(d.CONTINUE_ID,d.CONTINUE_LABEL,L.debugContinue,i.ContextKeyExpr.and(pe,_.CONTEXT_CALLSTACK_ITEM_STOPPED),10),fe(d.STEP_OVER_ID,d.STEP_OVER_LABEL,L.debugStepOver,pe,20,_.CONTEXT_CALLSTACK_ITEM_STOPPED),fe(d.STEP_INTO_ID,d.STEP_INTO_LABEL,L.debugStepInto,pe,30,_.CONTEXT_CALLSTACK_ITEM_STOPPED),fe(d.STEP_OUT_ID,d.STEP_OUT_LABEL,L.debugStepOut,pe,40,_.CONTEXT_CALLSTACK_ITEM_STOPPED),fe(d.RESTART_SESSION_ID,d.RESTART_LABEL,L.debugRestart,_.CONTEXT_CALLSTACK_ITEM_TYPE.isEqualTo("session"),50),fe(d.STOP_ID,d.STOP_LABEL,L.debugStop,i.ContextKeyExpr.and(_.CONTEXT_CALLSTACK_SESSION_IS_ATTACH.toNegated(),_.CONTEXT_CALLSTACK_ITEM_TYPE.isEqualTo("session")),60),fe(d.DISCONNECT_ID,d.DISCONNECT_LABEL,L.debugDisconnect,i.ContextKeyExpr.and(_.CONTEXT_CALLSTACK_SESSION_IS_ATTACH,_.CONTEXT_CALLSTACK_ITEM_TYPE.isEqualTo("session")),60)}),define(ne[2590],re([1,0,112,15,11,30,22,6,111,2,51,14,19,81,89,1507,8,5,26,46,27,56,34,2141,90,179,498,231,431,50,69,76,88]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugSession=void 0;let x=class{constructor(L,M,N,B,P,V,z,U,H,K,G,q,Z,j,X,Y,$,J){this.id=L,this._configuration=M,this.root=N,this.model=B,this.debugService=V,this.telemetryService=z,this.hostService=U,this.configurationService=H,this.paneCompositeService=K,this.workspaceContextService=G,this.productService=q,this.notificationService=Z,this.uriIdentityService=X,this.instantiationService=Y,this.customEndpointTelemetryService=$,this.workbenchEnvironmentService=J,this.initialized=!1,this.sources=new Map,this.threads=new Map,this.threadIds=[],this.cancellationMap=new Map,this.rawListeners=[],this.stoppedDetails=[],this._onDidChangeState=new D.Emitter,this._onDidEndAdapter=new D.Emitter,this._onDidLoadedSource=new D.Emitter,this._onDidCustomEvent=new D.Emitter,this._onDidProgressStart=new D.Emitter,this._onDidProgressUpdate=new D.Emitter,this._onDidProgressEnd=new D.Emitter,this._onDidInvalidMemory=new D.Emitter,this._onDidChangeREPLElements=new D.Emitter,this._onDidChangeName=new D.Emitter,this._options=P||{},this.hasSeparateRepl()?this.repl=new E.ReplModel(this.configurationService):this.repl=this.parentSession.repl;const ee=[];ee.push(this.repl.onDidChangeElements(()=>this._onDidChangeREPLElements.fire())),j&&ee.push(j.onWillShutdown(()=>{this.shutdown(),(0,w.dispose)(ee)}));const te=this._options.compoundRoot;te&&ee.push(te.onDidSessionStop(()=>this.terminate())),this.passFocusScheduler=new _.RunOnceScheduler(()=>{if(this.debugService.getModel().getSessions().some(se=>se.state===2)||this.getAllThreads().some(se=>se.stopped))if(typeof this.lastContinuedThreadId=="number"){const se=this.debugService.getViewModel().focusedThread;if(se&&se.threadId===this.lastContinuedThreadId&&!se.stopped){const ie=this.getStoppedDetails()?.threadId,ce=typeof ie=="number"?this.getThread(ie):void 0;this.debugService.focusStackFrame(void 0,ce)}}else{const se=this.debugService.getViewModel().focusedSession;se&&se.getId()===this.getId()&&se.state!==2&&this.debugService.focusStackFrame(void 0)}},800)}getId(){return this.id}setSubId(L){this._subId=L}getMemory(L){return new d.MemoryRegion(L,this)}get subId(){return this._subId}get configuration(){return this._configuration.resolved}get unresolvedConfiguration(){return this._configuration.unresolved}get parentSession(){return this._options.parentSession}get compact(){return!!this._options.compact}get compoundRoot(){return this._options.compoundRoot}get isSimpleUI(){return this._options.debugUI?.simple??!1}setConfiguration(L){this._configuration=L}getLabel(){return this.workspaceContextService.getWorkspace().folders.length>1&&this.root?`${this.name} (${o.basenameOrAuthority(this.root.uri)})`:this.name}setName(L){this._name=L,this._onDidChangeName.fire(L)}get name(){return this._name||this.configuration.name}get state(){if(!this.initialized)return 1;if(!this.raw)return 0;const L=this.debugService.getViewModel().focusedThread;return L&&L.session===this?L.stopped?2:3:this.getAllThreads().some(M=>M.stopped)?2:3}get capabilities(){return this.raw?this.raw.capabilities:Object.create(null)}get onDidChangeState(){return this._onDidChangeState.event}get onDidEndAdapter(){return this._onDidEndAdapter.event}get onDidChangeReplElements(){return this._onDidChangeREPLElements.event}get onDidChangeName(){return this._onDidChangeName.event}get onDidCustomEvent(){return this._onDidCustomEvent.event}get onDidLoadedSource(){return this._onDidLoadedSource.event}get onDidProgressStart(){return this._onDidProgressStart.event}get onDidProgressUpdate(){return this._onDidProgressUpdate.event}get onDidProgressEnd(){return this._onDidProgressEnd.event}get onDidInvalidateMemory(){return this._onDidInvalidMemory.event}async initialize(L){this.raw&&await this.shutdown();try{const M=await L.createDebugAdapter(this);this.raw=this.instantiationService.createInstance(h.RawDebugSession,M,L,this.id),await this.raw.start(),this.registerListeners(),await this.raw.initialize({clientID:"vscode",clientName:this.productService.nameLong,adapterID:this.configuration.type,pathFormat:"path",linesStartAt1:!0,columnsStartAt1:!0,supportsVariableType:!0,supportsVariablePaging:!0,supportsRunInTerminalRequest:!0,locale:C.locale,supportsProgressReporting:!0,supportsInvalidatedEvent:!0,supportsMemoryReferences:!0}),this.initialized=!0,this._onDidChangeState.fire(),this.debugService.setExceptionBreakpoints(this.raw&&this.raw.capabilities.exceptionBreakpointFilters||[])}catch(M){throw this.initialized=!0,this._onDidChangeState.fire(),await this.shutdown(),M}}async launchOrAttach(L){if(!this.raw)throw new Error((0,S.localize)(0,null,"launch or attach"));if(this.parentSession&&this.parentSession.state===0)throw(0,k.canceled)();L.__sessionId=this.getId();try{await this.raw.launchOrAttach(L)}catch(M){throw this.shutdown(),M}}async terminate(L=!1){this.raw||this.onDidExitAdapter(),this.cancelAllRequests(),this._options.lifecycleManagedByParent&&this.parentSession?await this.parentSession.terminate(L):this.raw&&(this.raw.capabilities.supportsTerminateRequest&&this._configuration.resolved.request==="launch"?await this.raw.terminate(L):await this.raw.disconnect({restart:L,terminateDebuggee:!0})),L||this._options.compoundRoot?.sessionStopped()}async disconnect(L=!1){this.raw||this.onDidExitAdapter(),this.cancelAllRequests(),this._options.lifecycleManagedByParent&&this.parentSession?await this.parentSession.disconnect(L):this.raw&&await this.raw.disconnect({restart:L,terminateDebuggee:!1}),L||this._options.compoundRoot?.sessionStopped()}async restart(){if(!this.raw)throw new Error((0,S.localize)(1,null,"restart"));this.cancelAllRequests(),this._options.lifecycleManagedByParent&&this.parentSession?await this.parentSession.restart():await this.raw.restart({arguments:this.configuration})}async sendBreakpoints(L,M,N){if(!this.raw)throw new Error((0,S.localize)(2,null,"breakpoints"));if(!this.raw.readyForBreakpoints)return Promise.resolve(void 0);const B=this.getRawSource(L);M.length&&!B.adapterData&&(B.adapterData=M[0].adapterData),B.path&&(B.path=(0,I.normalizeDriveLetter)(B.path));const P=await this.raw.setBreakpoints({source:B,lines:M.map(V=>V.sessionAgnosticData.lineNumber),breakpoints:M.map(V=>({line:V.sessionAgnosticData.lineNumber,column:V.sessionAgnosticData.column,condition:V.condition,hitCondition:V.hitCondition,logMessage:V.logMessage})),sourceModified:N});if(P&&P.body){const V=new Map;for(let z=0;z<M.length;z++)V.set(M[z].getId(),P.body.breakpoints[z]);this.model.setBreakpointSessionData(this.getId(),this.capabilities,V)}}async sendFunctionBreakpoints(L){if(!this.raw)throw new Error((0,S.localize)(3,null,"function breakpoints"));if(this.raw.readyForBreakpoints){const M=await this.raw.setFunctionBreakpoints({breakpoints:L});if(M&&M.body){const N=new Map;for(let B=0;B<L.length;B++)N.set(L[B].getId(),M.body.breakpoints[B]);this.model.setBreakpointSessionData(this.getId(),this.capabilities,N)}}}async sendExceptionBreakpoints(L){if(!this.raw)throw new Error((0,S.localize)(4,null,"exception breakpoints"));if(this.raw.readyForBreakpoints){const M=this.capabilities.supportsExceptionFilterOptions?{filters:[],filterOptions:L.map(B=>B.condition?{filterId:B.filter,condition:B.condition}:{filterId:B.filter})}:{filters:L.map(B=>B.filter)},N=await this.raw.setExceptionBreakpoints(M);if(N&&N.body&&N.body.breakpoints){const B=new Map;for(let P=0;P<L.length;P++)B.set(L[P].getId(),N.body.breakpoints[P]);this.model.setBreakpointSessionData(this.getId(),this.capabilities,B)}}}async dataBreakpointInfo(L,M){if(!this.raw)throw new Error((0,S.localize)(5,null,"data breakpoints info"));if(!this.raw.readyForBreakpoints)throw new Error((0,S.localize)(6,null));return(await this.raw.dataBreakpointInfo({name:L,variablesReference:M}))?.body}async sendDataBreakpoints(L){if(!this.raw)throw new Error((0,S.localize)(7,null,"data breakpoints"));if(this.raw.readyForBreakpoints){const M=await this.raw.setDataBreakpoints({breakpoints:L});if(M&&M.body){const N=new Map;for(let B=0;B<L.length;B++)N.set(L[B].getId(),M.body.breakpoints[B]);this.model.setBreakpointSessionData(this.getId(),this.capabilities,N)}}}async sendInstructionBreakpoints(L){if(!this.raw)throw new Error((0,S.localize)(8,null,"instruction breakpoints"));if(this.raw.readyForBreakpoints){const M=await this.raw.setInstructionBreakpoints({breakpoints:L});if(M&&M.body){const N=new Map;for(let B=0;B<L.length;B++)N.set(L[B].getId(),M.body.breakpoints[B]);this.model.setBreakpointSessionData(this.getId(),this.capabilities,N)}}}async breakpointsLocations(L,M){if(!this.raw)throw new Error((0,S.localize)(9,null,"breakpoints locations"));const N=this.getRawSource(L),B=await this.raw.breakpointLocations({source:N,line:M});if(!B||!B.body||!B.body.breakpoints)return[];const P=B.body.breakpoints.map(V=>({lineNumber:V.line,column:V.column||1}));return(0,f.distinct)(P,V=>`${V.lineNumber}:${V.column}`)}getDebugProtocolBreakpoint(L){return this.model.getDebugProtocolBreakpoint(L,this.getId())}customRequest(L,M){if(!this.raw)throw new Error((0,S.localize)(10,null,L));return this.raw.custom(L,M)}stackTrace(L,M,N,B){if(!this.raw)throw new Error((0,S.localize)(11,null,"stackTrace"));const P=this.getNewCancellationToken(L,B);return this.raw.stackTrace({threadId:L,startFrame:M,levels:N},P)}async exceptionInfo(L){if(!this.raw)throw new Error((0,S.localize)(12,null,"exceptionInfo"));const M=await this.raw.exceptionInfo({threadId:L});if(M)return{id:M.body.exceptionId,description:M.body.description,breakMode:M.body.breakMode,details:M.body.details}}scopes(L,M){if(!this.raw)throw new Error((0,S.localize)(13,null,"scopes"));const N=this.getNewCancellationToken(M);return this.raw.scopes({frameId:L},N)}variables(L,M,N,B,P){if(!this.raw)throw new Error((0,S.localize)(14,null,"variables"));const V=M?this.getNewCancellationToken(M):void 0;return this.raw.variables({variablesReference:L,filter:N,start:B,count:P},V)}evaluate(L,M,N){if(!this.raw)throw new Error((0,S.localize)(15,null,"evaluate"));return this.raw.evaluate({expression:L,frameId:M,context:N})}async restartFrame(L,M){if(!this.raw)throw new Error((0,S.localize)(16,null,"restartFrame"));await this.raw.restartFrame({frameId:L},M)}setLastSteppingGranularity(L,M){const N=this.getThread(L);N&&(N.lastSteppingGranularity=M)}async next(L,M){if(!this.raw)throw new Error((0,S.localize)(17,null,"next"));this.setLastSteppingGranularity(L,M),await this.raw.next({threadId:L,granularity:M})}async stepIn(L,M,N){if(!this.raw)throw new Error((0,S.localize)(18,null,"stepIn"));this.setLastSteppingGranularity(L,N),await this.raw.stepIn({threadId:L,targetId:M,granularity:N})}async stepOut(L,M){if(!this.raw)throw new Error((0,S.localize)(19,null,"stepOut"));this.setLastSteppingGranularity(L,M),await this.raw.stepOut({threadId:L,granularity:M})}async stepBack(L,M){if(!this.raw)throw new Error((0,S.localize)(20,null,"stepBack"));this.setLastSteppingGranularity(L,M),await this.raw.stepBack({threadId:L,granularity:M})}async continue(L){if(!this.raw)throw new Error((0,S.localize)(21,null,"continue"));await this.raw.continue({threadId:L})}async reverseContinue(L){if(!this.raw)throw new Error((0,S.localize)(22,null,"reverse continue"));await this.raw.reverseContinue({threadId:L})}async pause(L){if(!this.raw)throw new Error((0,S.localize)(23,null,"pause"));await this.raw.pause({threadId:L})}async terminateThreads(L){if(!this.raw)throw new Error((0,S.localize)(24,null,"terminateThreads"));await this.raw.terminateThreads({threadIds:L})}setVariable(L,M,N){if(!this.raw)throw new Error((0,S.localize)(25,null,"setVariable"));return this.raw.setVariable({variablesReference:L,name:M,value:N})}setExpression(L,M,N){if(!this.raw)throw new Error((0,S.localize)(26,null,"setExpression"));return this.raw.setExpression({expression:M,value:N,frameId:L})}gotoTargets(L,M,N){if(!this.raw)throw new Error((0,S.localize)(27,null,"gotoTargets"));return this.raw.gotoTargets({source:L,line:M,column:N})}goto(L,M){if(!this.raw)throw new Error((0,S.localize)(28,null,"goto"));return this.raw.goto({threadId:L,targetId:M})}loadSource(L){if(!this.raw)return Promise.reject(new Error((0,S.localize)(29,null,"loadSource")));const M=this.getSourceForUri(L);let N;if(M)N=M.raw;else{const B=m.Source.getEncodedDebugData(L);N={path:B.path,sourceReference:B.sourceReference}}return this.raw.source({sourceReference:N.sourceReference||0,source:N})}async getLoadedSources(){if(!this.raw)return Promise.reject(new Error((0,S.localize)(30,null,"getLoadedSources")));const L=await this.raw.loadedSources({});return L&&L.body&&L.body.sources?L.body.sources.map(M=>this.getSource(M)):[]}async completions(L,M,N,B,P,V){if(!this.raw)return Promise.reject(new Error((0,S.localize)(31,null,"completions")));const z=this.getNewCancellationToken(M,V);return this.raw.completions({frameId:L,text:N,column:B.column,line:B.lineNumber},z)}async stepInTargets(L){return this.raw?(await this.raw.stepInTargets({frameId:L}))?.body.targets:Promise.reject(new Error((0,S.localize)(32,null,"stepInTargets")))}async cancel(L){return this.raw?this.raw.cancel({progressId:L}):Promise.reject(new Error((0,S.localize)(33,null,"cancel")))}async disassemble(L,M,N,B){return this.raw?(await this.raw.disassemble({memoryReference:L,offset:M,instructionOffset:N,instructionCount:B,resolveSymbols:!0}))?.body?.instructions:Promise.reject(new Error((0,S.localize)(34,null,"disassemble")))}readMemory(L,M,N){return this.raw?this.raw.readMemory({count:N,memoryReference:L,offset:M}):Promise.reject(new Error((0,S.localize)(35,null,"readMemory")))}writeMemory(L,M,N,B){return this.raw?this.raw.writeMemory({memoryReference:L,offset:M,allowPartial:B,data:N}):Promise.reject(new Error((0,S.localize)(36,null,"disassemble")))}getThread(L){return this.threads.get(L)}getAllThreads(){const L=[];return this.threadIds.forEach(M=>{const N=this.threads.get(M);N&&L.push(N)}),L}clearThreads(L,M=void 0){if(M!=null){const N=this.threads.get(M);N&&(N.clearCallStack(),N.stoppedDetails=void 0,N.stopped=!1,L&&this.threads.delete(M))}else this.threads.forEach(N=>{N.clearCallStack(),N.stoppedDetails=void 0,N.stopped=!1}),L&&(this.threads.clear(),this.threadIds=[],d.ExpressionContainer.allValues.clear())}getStoppedDetails(){return this.stoppedDetails.length>=1?this.stoppedDetails[0]:void 0}rawUpdate(L){this.threadIds=[],L.threads.forEach(N=>{if(this.threadIds.push(N.id),!this.threads.has(N.id))this.threads.set(N.id,new d.Thread(this,N.name,N.id));else if(N.name){const B=this.threads.get(N.id);B&&(B.name=N.name)}}),this.threads.forEach(N=>{this.threadIds.indexOf(N.threadId)===-1&&this.threads.delete(N.threadId)});const M=L.stoppedDetails;if(M)if(M.allThreadsStopped)this.threads.forEach(N=>{N.stoppedDetails=N.threadId===M.threadId?M:{reason:void 0},N.stopped=!0,N.clearCallStack()});else{const N=typeof M.threadId=="number"?this.threads.get(M.threadId):void 0;N&&(N.stoppedDetails=M,N.clearCallStack(),N.stopped=!0)}}async fetchThreads(L){if(this.raw){const M=await this.raw.threads();M&&M.body&&M.body.threads&&this.model.rawUpdate({sessionId:this.getId(),threads:M.body.threads,stoppedDetails:L})}}initializeForTest(L){this.raw=L,this.registerListeners()}registerListeners(){if(!this.raw)return;this.rawListeners.push(this.raw.onDidInitialize(async()=>{t.status((0,S.localize)(37,null));const M=async()=>{if(this.raw&&this.raw.capabilities.supportsConfigurationDoneRequest)try{await this.raw.configurationDone()}catch(N){this.notificationService.error(N),this.raw&&this.raw.disconnect({})}};try{await this.debugService.sendAllBreakpoints(this)}finally{await M(),await this.fetchThreads()}})),this.rawListeners.push(this.raw.onDidStop(async M=>{this.passFocusScheduler.cancel(),this.stoppedDetails.push(M.body),await this.fetchThreads(M.body);const N=this.debugService.getViewModel().focusedThread,B=N!==void 0&&N.session===this&&!this.threads.has(N.threadId);B&&this.debugService.focusStackFrame(void 0,void 0);const P=typeof M.body.threadId=="number"?this.getThread(M.body.threadId):void 0;if(P){const V=this.model.fetchCallStack(P),z=async()=>{if(B||!M.body.preserveFocusHint&&P.getCallStack().length){const H=this.debugService.getViewModel().focusedStackFrame;(!H||H.thread.session===this)&&await this.debugService.focusStackFrame(void 0,P),P.stoppedDetails&&(P.stoppedDetails.reason==="breakpoint"&&this.configurationService.getValue("debug").openDebug==="openOnDebugBreak"&&!this.isSimpleUI&&await this.paneCompositeService.openPaneComposite(g.VIEWLET_ID,0),this.configurationService.getValue("debug").focusWindowOnBreak&&!this.workbenchEnvironmentService.extensionTestsLocationURI&&await this.hostService.focus({force:!0}))}};await V.topCallStack,z(),await V.wholeCallStack;const U=this.debugService.getViewModel().focusedStackFrame;(!U||!U.source||U.source.presentationHint==="deemphasize"||U.presentationHint==="deemphasize")&&z()}this._onDidChangeState.fire()})),this.rawListeners.push(this.raw.onDidThread(M=>{if(M.body.reason==="started")this.fetchThreadsScheduler||(this.fetchThreadsScheduler=new _.RunOnceScheduler(()=>{this.fetchThreads()},100),this.rawListeners.push(this.fetchThreadsScheduler)),this.fetchThreadsScheduler.isScheduled()||this.fetchThreadsScheduler.schedule();else if(M.body.reason==="exited"){this.model.clearThreads(this.getId(),!0,M.body.threadId);const N=this.debugService.getViewModel(),B=N.focusedThread;this.passFocusScheduler.cancel(),B&&M.body.threadId===B.threadId&&this.debugService.focusStackFrame(void 0,void 0,N.focusedSession,!1)}})),this.rawListeners.push(this.raw.onDidTerminateDebugee(async M=>{t.status((0,S.localize)(38,null)),M.body&&M.body.restart?await this.debugService.restartSession(this,M.body.restart):this.raw&&await this.raw.disconnect({terminateDebuggee:!1})})),this.rawListeners.push(this.raw.onDidContinued(M=>{const N=M.body.allThreadsContinued!==!1?void 0:M.body.threadId;if(typeof N=="number"){this.stoppedDetails=this.stoppedDetails.filter(P=>P.threadId!==N);const B=this.cancellationMap.get(N);this.cancellationMap.delete(N),B&&B.forEach(P=>P.cancel())}else this.stoppedDetails=[],this.cancelAllRequests();this.lastContinuedThreadId=N,this.passFocusScheduler.schedule(),this.model.clearThreads(this.getId(),!1,N),this._onDidChangeState.fire()}));const L=new _.Queue;this.rawListeners.push(this.raw.onDidOutput(async M=>{if(M.body.variablesReference){const N=M.body.source&&M.body.line?{lineNumber:M.body.line,column:M.body.column?M.body.column:1,source:this.getSource(M.body.source)}:void 0,P=new d.ExpressionContainer(this,void 0,M.body.variablesReference,(0,i.generateUuid)()).getChildren();L.queue(async()=>{(await P).forEach(z=>{z.name=null,this.appendToRepl(z,c.default.Info,M.body.category==="important",N)})});return}L.queue(async()=>{if(!M.body||!this.raw)return;const N=M.body.category==="stderr"?c.default.Error:M.body.category==="console"?c.default.Warning:c.default.Info;if(M.body.category==="telemetry"){const P=this.raw.dbgr.getCustomTelemetryEndpoint();if(P&&this.telemetryService.telemetryLevel!==0){let V=M.body.data;!P.sendErrorTelemetry&&M.body.data&&(V=(0,b.filterExceptionsFromTelemetry)(M.body.data)),this.customEndpointTelemetryService.publicLog(P,M.body.output,V)}return}const B=M.body.source&&M.body.line?{lineNumber:M.body.line,column:M.body.column?M.body.column:1,source:this.getSource(M.body.source)}:void 0;if(M.body.group==="start"||M.body.group==="startCollapsed"){const P=M.body.group==="start";this.repl.startGroup(M.body.output||"",P,B);return}M.body.group==="end"&&(this.repl.endGroup(),!M.body.output)||typeof M.body.output=="string"&&this.appendToRepl(M.body.output,N,M.body.category==="important",B)})})),this.rawListeners.push(this.raw.onDidBreakpoint(M=>{const N=M.body&&M.body.breakpoint?M.body.breakpoint.id:void 0,B=this.model.getBreakpoints().find(U=>U.getIdFromAdapter(this.getId())===N),P=this.model.getFunctionBreakpoints().find(U=>U.getIdFromAdapter(this.getId())===N),V=this.model.getDataBreakpoints().find(U=>U.getIdFromAdapter(this.getId())===N),z=this.model.getExceptionBreakpoints().find(U=>U.getIdFromAdapter(this.getId())===N);if(M.body.reason==="new"&&M.body.breakpoint.source&&M.body.breakpoint.line){const U=this.getSource(M.body.breakpoint.source),H=this.model.addBreakpoints(U.uri,[{column:M.body.breakpoint.column,enabled:!0,lineNumber:M.body.breakpoint.line}],!1);if(H.length===1){const K=new Map([[H[0].getId(),M.body.breakpoint]]);this.model.setBreakpointSessionData(this.getId(),this.capabilities,K)}}if(M.body.reason==="removed"&&(B&&this.model.removeBreakpoints([B]),P&&this.model.removeFunctionBreakpoints(P.getId()),V&&this.model.removeDataBreakpoints(V.getId())),M.body.reason==="changed"){if(B){B.column||(M.body.breakpoint.column=void 0);const U=new Map([[B.getId(),M.body.breakpoint]]);this.model.setBreakpointSessionData(this.getId(),this.capabilities,U)}if(P){const U=new Map([[P.getId(),M.body.breakpoint]]);this.model.setBreakpointSessionData(this.getId(),this.capabilities,U)}if(V){const U=new Map([[V.getId(),M.body.breakpoint]]);this.model.setBreakpointSessionData(this.getId(),this.capabilities,U)}if(z){const U=new Map([[z.getId(),M.body.breakpoint]]);this.model.setBreakpointSessionData(this.getId(),this.capabilities,U)}}})),this.rawListeners.push(this.raw.onDidLoadedSource(M=>{this._onDidLoadedSource.fire({reason:M.body.reason,source:this.getSource(M.body.source)})})),this.rawListeners.push(this.raw.onDidCustomEvent(M=>{this._onDidCustomEvent.fire(M)})),this.rawListeners.push(this.raw.onDidProgressStart(M=>{this._onDidProgressStart.fire(M)})),this.rawListeners.push(this.raw.onDidProgressUpdate(M=>{this._onDidProgressUpdate.fire(M)})),this.rawListeners.push(this.raw.onDidProgressEnd(M=>{this._onDidProgressEnd.fire(M)})),this.rawListeners.push(this.raw.onDidInvalidateMemory(M=>{this._onDidInvalidMemory.fire(M)})),this.rawListeners.push(this.raw.onDidInvalidated(async M=>{M.body.areas&&M.body.areas.length===1&&(M.body.areas[0]==="variables"||M.body.areas[0]==="watch")||(this.cancelAllRequests(),this.model.clearThreads(this.getId(),!0),await this.fetchThreads(this.getStoppedDetails()));const N=this.debugService.getViewModel();N.focusedSession===this&&N.updateViews()})),this.rawListeners.push(this.raw.onDidExitAdapter(M=>this.onDidExitAdapter(M)))}onDidExitAdapter(L){this.initialized=!0,this.model.setBreakpointSessionData(this.getId(),this.capabilities,void 0),this.shutdown(),this._onDidEndAdapter.fire(L)}shutdown(){(0,w.dispose)(this.rawListeners),this.raw&&(this.raw.disconnect({}),this.raw.dispose(),this.raw=void 0),this.fetchThreadsScheduler?.dispose(),this.fetchThreadsScheduler=void 0,this.passFocusScheduler.cancel(),this.passFocusScheduler.dispose(),this.model.clearThreads(this.getId(),!0),this._onDidChangeState.fire()}getSourceForUri(L){return this.sources.get(this.uriIdentityService.asCanonicalUri(L).toString())}getSource(L){let M=new m.Source(L,this.getId(),this.uriIdentityService);const N=M.uri.toString(),B=this.sources.get(N);return B?(M=B,M.raw=(0,v.mixin)(M.raw,L),M.raw&&L&&(M.raw.presentationHint=L.presentationHint)):this.sources.set(N,M),M}getRawSource(L){const M=this.getSourceForUri(L);if(M)return M.raw;{const N=m.Source.getEncodedDebugData(L);return{name:N.name,path:N.path,sourceReference:N.sourceReference}}}getNewCancellationToken(L,M){const N=new A.CancellationTokenSource(M),B=this.cancellationMap.get(L)||[];return B.push(N),this.cancellationMap.set(L,B),N.token}cancelAllRequests(){this.cancellationMap.forEach(L=>L.forEach(M=>M.cancel())),this.cancellationMap.clear()}getReplElements(){return this.repl.getReplElements()}hasSeparateRepl(){return!this.parentSession||this._options.repl!=="mergeWithParent"}removeReplExpressions(){this.repl.removeReplExpressions()}async addReplExpression(L,M){await this.repl.addReplExpression(this,L,M),this.debugService.getViewModel().updateViews()}appendToRepl(L,M,N,B){this.repl.appendToRepl(this,L,M,B),N&&this.notificationService.notify({message:L.toString(),severity:M,source:this.name})}};x=Ee([W(5,g.IDebugService),W(6,u.ITelemetryService),W(7,T.IHostService),W(8,s.IConfigurationService),W(9,O.IPaneCompositePartService),W(10,n.IWorkspaceContextService),W(11,p.IProductService),W(12,r.INotificationService),W(13,R.ILifecycleService),W(14,a.IUriIdentityService),W(15,l.IInstantiationService),W(16,u.ICustomEndpointTelemetryService),W(17,y.IWorkbenchEnvironmentService)],x),e.DebugSession=x}),define(ne[2591],re([1,0,1515,48,131,37,38,5,8,371,90,34,7,111,14,9,29,11,178,23,21,71,2,102,845,45,43,41,12,27,101]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LoadedScriptsView=void 0;const R=!0,O=/^[a-zA-Z][a-zA-Z0-9\+\-\.]+:/;class x{constructor(K,G,q=!1){this._parent=K,this._label=G,this.isIncompressible=q,this._children=new Map,this._showedMoreThanOne=!1}updateLabel(K){this._label=K}isLeaf(){return this._children.size===0}getSession(){if(this._parent)return this._parent.getSession()}setSource(K,G){if(this._source=G,this._children.clear(),G.raw&&G.raw.sources){for(const q of G.raw.sources)if(q.name&&q.path){const Z=new x(this,q.name);this._children.set(q.path,Z);const j=K.getSource(q);Z.setSource(K,j)}}}createIfNeeded(K,G){let q=this._children.get(K);return q||(q=G(this,K),this._children.set(K,q)),q}getChild(K){return this._children.get(K)}remove(K){this._children.delete(K)}removeFromParent(){this._parent&&(this._parent.remove(this._label),this._parent._children.size===0&&this._parent.removeFromParent())}getTemplateId(){return"id"}getId(){const K=this.getParent();return K?`${K.getId()}/${this.getInternalId()}`:this.getInternalId()}getInternalId(){return this._label}getParent(){if(this._parent)return this._parent.isSkipped()?this._parent.getParent():this._parent}isSkipped(){return this._parent?!!this._parent.oneChild():!0}hasChildren(){const K=this.oneChild();return K?K.hasChildren():this._children.size>0}getChildren(){const K=this.oneChild();if(K)return K.getChildren();const G=[];for(const q of this._children.values())G.push(q);return G.sort((q,Z)=>this.compare(q,Z))}getLabel(K=!0){const G=this.oneChild();if(G){const q=this instanceof F&&K?" \u2022 ":f.posix.sep;return`${this._label}${q}${G.getLabel()}`}return this._label}getHoverLabel(){if(this._source&&this._parent&&this._parent._source)return this._source.raw.path||this._source.raw.name;const K=this.getLabel(!1),G=this.getParent();if(G){const q=G.getHoverLabel();if(q)return`${q}/${K}`}return K}getSource(){const K=this.oneChild();return K?K.getSource():this._source}compare(K,G){return K._label&&G._label?K._label.localeCompare(G._label):0}oneChild(){if(!this._source&&!this._showedMoreThanOne&&this.skipOneChild()){if(this._children.size===1)return this._children.values().next().value;this._children.size>1&&(this._showedMoreThanOne=!0)}}skipOneChild(){return R?this instanceof L:!(this instanceof F)&&!(this instanceof M)}}class F extends x{constructor(K,G){super(K,G.name,!0);this.folder=G}}class L extends x{constructor(K,G,q){super(void 0,"Root");this._pathService=K,this._contextService=G,this._labelService=q}add(K){return this.createIfNeeded(K.getId(),()=>new M(this._labelService,this,K,this._pathService,this._contextService))}find(K){return this.getChild(K.getId())}}class M extends x{constructor(K,G,q,Z,j){super(G,q.getLabel(),!0);this._pathService=Z,this.rootProvider=j,this._map=new Map,this._labelService=K,this._session=q}getInternalId(){return this._session.getId()}getSession(){return this._session}getHoverLabel(){}hasChildren(){return!0}compare(K,G){const q=this.category(K),Z=this.category(G);return q!==Z?q-Z:super.compare(K,G)}category(K){if(K instanceof F)return K.folder.index;const G=K.getLabel();return G&&/^<.+>$/.test(G)?1e3:999}async addPath(K){let G,q,Z=K.raw.path;if(!Z)return;this._labelService&&O.test(Z)&&(Z=this._labelService.getUriLabel(S.URI.parse(Z)));const j=M.URL_REGEXP.exec(Z);if(j&&j.length===3)q=j[1],Z=decodeURI(j[2]);else if((0,f.isAbsolute)(Z)){const Y=S.URI.file(Z);G=this.rootProvider?this.rootProvider.getWorkspaceFolder(Y):null,G?(Z=(0,f.normalize)((0,s.ltrim)(Y.path.substring(G.uri.path.length),f.posix.sep)),this.rootProvider.getWorkspace().folders.length>1?Z=f.posix.sep+Z:G=null):(Z=(0,f.normalize)(Z),i.isWindows?Z=(0,c.normalizeDriveLetter)(Z):Z=(0,c.tildify)(Z,(await this._pathService.userHome()).fsPath))}let X=this;Z.split(/[\/\\]/).forEach((Y,$)=>{if($===0&&G){const J=G;X=X.createIfNeeded(G.name,ee=>new F(ee,J))}else $===0&&q?X=X.createIfNeeded(q,J=>new x(J,q)):X=X.createIfNeeded(Y,J=>new x(J,Y))}),X.setSource(this._session,K),K.raw.path&&this._map.set(K.raw.path,X)}removePath(K){if(K.raw.path){const G=this._map.get(K.raw.path);if(G)return G.removeFromParent(),!0}return!1}}M.URL_REGEXP=/^(https?:\/\/[^/]+)(\/.*)$/;function N(H,K){const G=H.getChildren(),q=K?!K.expanded.has(H.getId()):!(H instanceof M);return{element:H,collapsed:q,collapsible:H.hasChildren(),children:G.map(Z=>N(Z,K))}}let B=class extends _.ViewPane{constructor(K,G,q,Z,j,X,Y,$,J,ee,te,se,ie,ce,le){super(K,q,G,X,$,j,Z,ie,ce,le);this.editorService=Y,this.contextService=J,this.debugService=ee,this.labelService=te,this.pathService=se,this.treeNeedsRefreshOnVisible=!1,this.loadedScriptsItemType=v.CONTEXT_LOADED_SCRIPTS_ITEM_TYPE.bindTo($)}renderBody(K){super.renderBody(K),this.element.classList.add("debug-pane"),K.classList.add("debug-loaded-scripts"),K.classList.add("show-file-icons"),this.treeContainer=(0,w.renderViewTree)(K),this.filter=new U;const G=new L(this.pathService,this.contextService,this.labelService);this.treeLabels=this.instantiationService.createInstance(r.ResourceLabels,{onDidChangeVisibility:this.onDidChangeBodyVisibility}),this._register(this.treeLabels),this.tree=this.instantiationService.createInstance(a.WorkbenchCompressibleObjectTree,"LoadedScriptsView",this.treeContainer,new P,[new V(this.treeLabels)],{compressionEnabled:R,collapseByDefault:!0,hideTwistiesOfChildlessElements:!0,identityProvider:{getId:$=>$.getId()},keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:$=>$.getLabel(),getCompressedNodeKeyboardNavigationLabel:$=>$.map(J=>J.getLabel()).join("/")},filter:this.filter,accessibilityProvider:new z,overrideStyles:{listBackground:this.getBackgroundColor()}});const q=$=>this.tree.setChildren(null,N(G,$).children);q(),this.changeScheduler=new l.RunOnceScheduler(()=>{this.treeNeedsRefreshOnVisible=!1,this.tree&&q()},300),this._register(this.changeScheduler),this._register(this.tree.onDidOpen($=>{if($.element instanceof x){const J=$.element.getSource();if(J&&J.available){const ee={startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0};J.openInEditor(this.editorService,ee,$.editorOptions.preserveFocus,$.sideBySide,$.editorOptions.pinned)}}})),this._register(this.tree.onDidChangeFocus(()=>{this.tree.getFocus()instanceof M?this.loadedScriptsItemType.set("session"):this.loadedScriptsItemType.reset()}));const Z=()=>{this.isBodyVisible()?this.changeScheduler.schedule():this.treeNeedsRefreshOnVisible=!0},j=async $=>{if($.capabilities.supportsLoadedSourcesRequest){const J=G.add($),ee=await $.getLoadedSources();for(const te of ee)await J.addPath(te);Z()}},X=$=>{this._register($.onDidChangeName(async()=>{const J=G.find($);J&&(J.updateLabel($.getLabel()),Z())})),this._register($.onDidLoadedSource(async J=>{let ee;switch(J.reason){case"new":case"changed":ee=G.add($),await ee.addPath(J.source),Z(),J.reason==="changed"&&g.DebugContentProvider.refreshDebugContent(J.source.uri);break;case"removed":ee=G.find($),ee&&ee.removePath(J.source)&&Z();break;default:this.filter.setFilter(J.source.name),this.tree.refilter();break}}))};this._register(this.debugService.onDidNewSession(X)),this.debugService.getModel().getSessions().forEach(X),this._register(this.debugService.onDidEndSession($=>{G.remove($.getId()),this.changeScheduler.schedule()})),this.changeScheduler.schedule(0),this._register(this.onDidChangeBodyVisibility($=>{$&&this.treeNeedsRefreshOnVisible&&this.changeScheduler.schedule()}));let Y;this._register(this.tree.onDidChangeTypeFilterPattern($=>{if(!!this.tree.options.filterOnType)if(!Y&&$){const J=new Set,ee=te=>{te.element&&!te.collapsed&&J.add(te.element.getId());for(const se of te.children)ee(se)};ee(this.tree.getNode()),Y={expanded:J},this.tree.expandAll()}else!$&&Y&&(this.tree.setFocus([]),q(Y),Y=void 0)})),this.debugService.getModel().getSessions().forEach($=>j($))}layoutBody(K,G){super.layoutBody(K,G),this.tree.layout(K,G)}dispose(){(0,n.dispose)(this.tree),(0,n.dispose)(this.treeLabels),super.dispose()}};B=Ee([W(1,A.IContextMenuService),W(2,k.IKeybindingService),W(3,D.IInstantiationService),W(4,m.IViewDescriptorService),W(5,I.IConfigurationService),W(6,u.IEditorService),W(7,o.IContextKeyService),W(8,C.IWorkspaceContextService),W(9,v.IDebugService),W(10,d.ILabelService),W(11,T.IPathService),W(12,b.IOpenerService),W(13,E.IThemeService),W(14,y.ITelemetryService)],B),e.LoadedScriptsView=B;class P{getHeight(K){return 22}getTemplateId(K){return V.ID}}class V{constructor(K){this.labels=K}get templateId(){return V.ID}renderTemplate(K){return{label:this.labels.create(K,{supportHighlights:!0})}}renderElement(K,G,q){const Z=K.element,j=Z.getLabel();this.render(Z,j,q,K.filterData)}renderCompressedElements(K,G,q,Z){const j=K.element.elements[K.element.elements.length-1],X=K.element.elements.map(Y=>Y.getLabel());this.render(j,X,q,K.filterData)}render(K,G,q,Z){const j={name:G},X={title:K.getHoverLabel()};if(K instanceof F)X.fileKind=p.FileKind.ROOT_FOLDER;else if(K instanceof M)X.title=t.localize(0,null),X.hideIcon=!0;else if(K instanceof x){const Y=K.getSource();Y&&Y.uri?(j.resource=Y.uri,X.fileKind=p.FileKind.FILE):X.fileKind=p.FileKind.FOLDER}X.matches=(0,h.createMatches)(Z),q.label.setResource(j,X)}disposeTemplate(K){K.label.dispose()}}V.ID="lsrenderer";class z{getWidgetAriaLabel(){return t.localize(1,null)}getAriaLabel(K){return K instanceof F?t.localize(2,null,K.getLabel()):K instanceof M?t.localize(3,null,K.getLabel()):K.hasChildren()?t.localize(4,null,K.getLabel()):t.localize(5,null,K.getLabel())}}class U{setFilter(K){this.filterText=K}filter(K,G){return this.filterText?K.isLeaf()?K.getLabel().indexOf(this.filterText)>=0?1:0:2:1}}}),define(ne[2592],re([1,0,102,152,10,134,11,5,37,2,6,236,68,12,32,431,1518,179]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplFilterActionViewItem=e.ReplFilterState=e.ReplFilter=void 0;class r{constructor(){this._parsedQueries=[]}set filterQuery(n){if(this._parsedQueries=[],n=n.trim(),n&&n!==""){const h=(0,f.splitGlobAware)(n,",").map(g=>g.trim()).filter(g=>!!g.length);for(const g of h)g.startsWith("!")?this._parsedQueries.push({type:"exclude",query:g.slice(1)}):this._parsedQueries.push({type:"include",query:g})}}filter(n,h){if(n instanceof S.ReplEvaluationInput||n instanceof S.ReplEvaluationResult||n instanceof l.Variable)return 1;let g=!1,d=!1;const m=n.toString(!0);for(const{type:b,query:E}of this._parsedQueries){if(b==="exclude"&&r.matchQuery(E,m))return!1;b==="include"&&(g=!0,r.matchQuery(E,m)&&(d=!0))}return g?d:typeof h!="undefined"?h:1}}e.ReplFilter=r,r.matchQuery=t.matchesFuzzy;class p{constructor(n){this.filterStatsProvider=n,this._onDidChange=new v.Emitter,this._onDidStatsChange=new v.Emitter,this._filterText="",this._stats={total:0,filtered:0}}get onDidChange(){return this._onDidChange.event}get onDidStatsChange(){return this._onDidStatsChange.event}get filterText(){return this._filterText}get filterStats(){return this._stats}set filterText(n){this._filterText!==n&&(this._filterText=n,this._onDidChange.fire(),this.updateFilterStats())}updateFilterStats(){const{total:n,filtered:h}=this.filterStatsProvider.getFilterStats();(this._stats.total!==n||this._stats.filtered!==h)&&(this._stats={total:n,filtered:h},this._onDidStatsChange.fire())}}e.ReplFilterState=p;let u=class extends A.BaseActionViewItem{constructor(n,h,g,d,m,b,E,y){super(null,n);this.placeholder=h,this.filters=g,this.history=d,this.showHistoryHint=m,this.instantiationService=b,this.themeService=E,this.contextViewService=y,this.delayedFilterUpdate=new k.Delayer(400),this._register((0,w.toDisposable)(()=>this.delayedFilterUpdate.cancel()))}render(n){this.container=n,this.container.classList.add("repl-panel-filter-container"),this.element=_.append(this.container,_.$("")),this.element.className=this.class,this.createInput(this.element),this.createBadge(this.element),this.updateClass()}focus(){this.filterInputBox&&this.filterInputBox.focus()}blur(){this.filterInputBox&&this.filterInputBox.blur()}setFocusable(){}getHistory(){return this.filterInputBox.getHistory()}get trapsArrowNavigation(){return!0}clearFilterText(){this.filterInputBox.value=""}createInput(n){this.filterInputBox=this._register(this.instantiationService.createInstance(C.ContextScopedHistoryInputBox,n,this.contextViewService,{placeholder:this.placeholder,history:this.history,showHistoryHint:this.showHistoryHint})),this._register((0,o.attachInputBoxStyler)(this.filterInputBox,this.themeService)),this.filterInputBox.value=this.filters.filterText,this._register(this.filterInputBox.onDidChange(()=>this.delayedFilterUpdate.trigger(()=>this.onDidInputChange(this.filterInputBox)))),this._register(this.filters.onDidChange(()=>{this.filterInputBox.value=this.filters.filterText})),this._register(_.addStandardDisposableListener(this.filterInputBox.inputElement,_.EventType.KEY_DOWN,h=>this.onInputKeyDown(h))),this._register(_.addStandardDisposableListener(n,_.EventType.KEY_DOWN,this.handleKeyboardEvent)),this._register(_.addStandardDisposableListener(n,_.EventType.KEY_UP,this.handleKeyboardEvent)),this._register(_.addStandardDisposableListener(this.filterInputBox.inputElement,_.EventType.CLICK,h=>{h.stopPropagation(),h.preventDefault()}))}onDidInputChange(n){n.addToHistory(),this.filters.filterText=n.value}handleKeyboardEvent(n){(n.equals(10)||n.equals(15)||n.equals(17)||n.equals(9))&&n.stopPropagation()}onInputKeyDown(n){n.equals(9)&&(this.clearFilterText(),n.stopPropagation(),n.preventDefault())}createBadge(n){const h=_.append(n,_.$(".repl-panel-filter-controls")),g=this.filterBadge=_.append(h,_.$(".repl-panel-filter-badge"));this._register((0,o.attachStylerCallback)(this.themeService,{badgeBackground:i.badgeBackground,badgeForeground:i.badgeForeground,contrastBorder:i.contrastBorder},d=>{const m=d.badgeBackground?d.badgeBackground.toString():"",b=d.badgeForeground?d.badgeForeground.toString():"",E=d.contrastBorder?d.contrastBorder.toString():"";g.style.backgroundColor=m,g.style.borderWidth=E?"1px":"",g.style.borderStyle=E?"solid":"",g.style.borderColor=E,g.style.color=b})),this.updateBadge(),this._register(this.filters.onDidStatsChange(()=>this.updateBadge()))}updateBadge(){const{total:n,filtered:h}=this.filters.filterStats,g=n===h||n===0;this.filterBadge.classList.toggle("hidden",g),this.filterBadge.textContent=(0,s.localize)(0,null,h,n),this.filterInputBox.inputElement.style.paddingRight=g?"4px":"150px"}get class(){return"panel-action-tree-filter"}};u=Ee([W(5,D.IInstantiationService),W(6,c.IThemeService),W(7,I.IContextViewService)],u),e.ReplFilterActionViewItem=u}),define(ne[2593],re([1,0,10,258,241,441,102,2,81,1519,37,45,68,12,371,2226,190,90,179,431,21]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplAccessibilityProvider=e.ReplDataSource=e.ReplDelegate=e.ReplRawObjectsRenderer=e.ReplVariablesRenderer=e.ReplSimpleElementsRenderer=e.ReplEvaluationResultsRenderer=e.ReplGroupRenderer=e.ReplEvaluationInputsRenderer=void 0;const a=t.$;class n{get templateId(){return n.ID}renderTemplate(F){t.append(F,a("span.arrow"+c.ThemeIcon.asCSSSelector(s.debugConsoleEvaluationInput)));const L=t.append(F,a(".expression"));return{label:new _.HighlightedLabel(L)}}renderElement(F,L,M){const N=F.element;M.label.set(N.value,(0,k.createMatches)(F.filterData))}disposeTemplate(F){}}e.ReplEvaluationInputsRenderer=n,n.ID="replEvaluationInput";let h=class ba{constructor(F,L){this.linkDetector=F,this.themeService=L}get templateId(){return ba.ID}renderTemplate(F){return{label:t.append(F,a(".expression"))}}renderElement(F,L,M){const N=F.element;t.clearNode(M.label);const B=(0,S.handleANSIOutput)(N.name,this.linkDetector,this.themeService,void 0);M.label.appendChild(B)}disposeTemplate(F){}};h.ID="replGroup",h=Ee([W(1,c.IThemeService)],h),e.ReplGroupRenderer=h;class g{constructor(F){this.linkDetector=F}get templateId(){return g.ID}renderTemplate(F){const L=t.append(F,a(".evaluation-result.expression"));return{value:t.append(L,a("span.value"))}}renderElement(F,L,M){const N=F.element;(0,i.renderExpressionValue)(N,M.value,{showHover:!1,colorize:!0,linkDetector:this.linkDetector})}disposeTemplate(F){}}e.ReplEvaluationResultsRenderer=g,g.ID="replEvaluationResult";let d=class Ca{constructor(F,L,M,N){this.linkDetector=F,this.editorService=L,this.labelService=M,this.themeService=N}get templateId(){return Ca.ID}renderTemplate(F){const L=Object.create(null);F.classList.add("output");const M=t.append(F,a(".output.expression.value-and-source"));return L.container=F,L.countContainer=t.append(M,a(".count-badge-wrapper")),L.count=new f.CountBadge(L.countContainer),L.value=t.append(M,a("span.value")),L.source=t.append(M,a(".source")),L.toDispose=[],L.toDispose.push((0,o.attachBadgeStyler)(L.count,this.themeService)),L.toDispose.push(t.addDisposableListener(L.source,"click",N=>{N.preventDefault(),N.stopPropagation();const B=L.getReplElementSource();B&&B.source.openInEditor(this.editorService,{startLineNumber:B.lineNumber,startColumn:B.column,endLineNumber:B.lineNumber,endColumn:B.column})})),L}renderElement({element:F},L,M){this.setElementCount(F,M),M.elementListener=F.onDidChangeCount(()=>this.setElementCount(F,M)),t.clearNode(M.value),M.value.className="value";const N=(0,S.handleANSIOutput)(F.value,this.linkDetector,this.themeService,F.session.root);M.value.appendChild(N),M.value.classList.add(F.severity===I.default.Warning?"warn":F.severity===I.default.Error?"error":F.severity===I.default.Ignore?"ignore":"info"),M.source.textContent=F.sourceData?`${F.sourceData.source.name}:${F.sourceData.lineNumber}`:"",M.source.title=F.sourceData?`${this.labelService.getUriLabel(F.sourceData.source.uri)}:${F.sourceData.lineNumber}`:"",M.getReplElementSource=()=>F.sourceData}setElementCount(F,L){F.count>=2?(L.count.setCount(F.count),L.countContainer.hidden=!1):L.countContainer.hidden=!0}disposeTemplate(F){(0,D.dispose)(F.toDispose)}disposeElement(F,L,M){M.elementListener.dispose()}};d.ID="simpleReplElement",d=Ee([W(1,u.IEditorService),W(2,C.ILabelService),W(3,c.IThemeService)],d),e.ReplSimpleElementsRenderer=d;let m=class wa extends i.AbstractExpressionsRenderer{constructor(F,L,M,N){super(L,M,N);this.linkDetector=F}get templateId(){return wa.ID}renderExpression(F,L,M){(0,i.renderVariable)(F,L,!0,M,this.linkDetector)}getInputBoxOptions(F){}};m.ID="replVariable",m=Ee([W(1,l.IDebugService),W(2,v.IContextViewService),W(3,c.IThemeService)],m),e.ReplVariablesRenderer=m;class b{constructor(F){this.linkDetector=F}get templateId(){return b.ID}renderTemplate(F){F.classList.add("output");const L=t.append(F,a(".output.expression")),M=t.append(L,a("span.name")),N=new _.HighlightedLabel(M),B=t.append(L,a("span.value"));return{container:F,expression:L,name:M,label:N,value:B}}renderElement(F,L,M){const N=F.element;M.label.set(N.name?`${N.name}:`:"",(0,k.createMatches)(F.filterData)),N.name?M.name.textContent=`${N.name}:`:M.name.textContent="",(0,i.renderExpressionValue)(N.value,M.value,{showHover:!1,linkDetector:this.linkDetector})}disposeTemplate(F){}}e.ReplRawObjectsRenderer=b,b.ID="rawObject";function E(x){return x instanceof r.Variable&&(x.parent instanceof p.ReplEvaluationResult||x.parent instanceof r.Variable)}class y extends A.CachedListVirtualDelegate{constructor(F){super();this.configurationService=F}getHeight(F){return this.configurationService.getValue("debug").console.wordWrap?super.getHeight(F):this.estimateHeight(F,!0)}estimateHeight(F,L=!1){const M=this.configurationService.getValue("debug"),N=Math.ceil(1.3*M.console.fontSize),B=V=>Math.max(1,(V&&V.match(/\r\n|\n/g)||[]).length);if((V=>typeof V.value=="string")(F)&&!E(F)){const V=F.value;return(B(V)+(L?0:Math.floor(V.length/70)))*N}return N}getTemplateId(F){return F instanceof r.Variable&&F.name?m.ID:F instanceof p.ReplEvaluationResult||F instanceof r.Variable&&!F.name?g.ID:F instanceof p.ReplEvaluationInput?n.ID:F instanceof p.SimpleReplElement?d.ID:F instanceof p.ReplGroup?h.ID:b.ID}hasDynamicHeight(F){return E(F)?!1:F.toString().length>0}}e.ReplDelegate=y;function T(x){return typeof x.getReplElements=="function"}class R{hasChildren(F){return T(F)?!0:!!F.hasChildren}getChildren(F){return T(F)?Promise.resolve(F.getReplElements()):F instanceof p.RawObjectReplElement?F.getChildren():F instanceof p.ReplGroup?Promise.resolve(F.getChildren()):F.getChildren()}}e.ReplDataSource=R;class O{getWidgetAriaLabel(){return(0,w.localize)(0,null)}getAriaLabel(F){return F instanceof r.Variable?(0,w.localize)(1,null,F.name,F.value):F instanceof p.SimpleReplElement||F instanceof p.ReplEvaluationInput||F instanceof p.ReplEvaluationResult?F.value+(F instanceof p.SimpleReplElement&&F.count>1?(0,w.localize)(2,null,F.count):""):F instanceof p.RawObjectReplElement?(0,w.localize)(3,null,F.name,F.value):F instanceof p.ReplGroup?(0,w.localize)(4,null,F.name):""}}e.ReplAccessibilityProvider=O}),define(ne[626],re([1,0,10,241,15,11,33,102,2,13,1521,73,16,95,28,8,7,37,5,38,71,26,41,67,27,12,131,43,371,428,90,179,21,40]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ADD_TO_WATCH_ID=e.COPY_EVALUATE_PATH_ID=e.BREAK_WHEN_VALUE_IS_READ_ID=e.BREAK_WHEN_VALUE_IS_ACCESSED_ID=e.BREAK_WHEN_VALUE_CHANGES_ID=e.VIEW_MEMORY_ID=e.COPY_VALUE_ID=e.SET_VARIABLE_ID=e.VariablesRenderer=e.VariablesDataSource=e.VariablesView=void 0;const F=t.$;let L=!0,M,N,B=class extends m.ViewPane{constructor(ee,te,se,ie,ce,le,ae,ue,oe,fe,pe,me){super(ee,ie,te,ce,ue,ae,le,oe,fe,pe);this.debugService=se,this.menuService=me,this.needsRefresh=!1,this.savedViewState=new Map,this.autoExpandedScopes=new Set,this.updateTreeScheduler=new A.RunOnceScheduler(async()=>{const be=this.debugService.getViewModel().focusedStackFrame;this.needsRefresh=!1;const Ce=this.tree.getInput();if(Ce&&this.savedViewState.set(Ce.getId(),this.tree.getViewState()),!be){await this.tree.setInput(null);return}const ve=this.savedViewState.get(be.getId());await this.tree.setInput(be,ve);const he=await be.getScopes(),ge=he.find(de=>!de.expensive);ge&&(he.every(de=>this.tree.isCollapsed(de))||!this.autoExpandedScopes.has(ge.getId()))&&(this.autoExpandedScopes.add(ge.getId()),await this.tree.expand(ge))},400)}renderBody(ee){super.renderBody(ee),this.element.classList.add("debug-pane"),ee.classList.add("debug-variables");const te=(0,E.renderViewTree)(ee),se=this.instantiationService.createInstance(y.LinkDetector);this.tree=this.instantiationService.createInstance(u.WorkbenchAsyncDataTree,"VariablesView",te,new K,[this.instantiationService.createInstance(Z,se),new G,new q],new H,{accessibilityProvider:new j,identityProvider:{getId:ce=>ce.getId()},keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:ce=>ce.name},overrideStyles:{listBackground:this.getBackgroundColor()}}),this.tree.setInput((0,w.withUndefinedAsNull)(this.debugService.getViewModel().focusedStackFrame)),T.CONTEXT_VARIABLES_FOCUSED.bindTo(this.tree.contextKeyService),this._register(this.debugService.getViewModel().onDidFocusStackFrame(ce=>{if(!this.isBodyVisible()){this.needsRefresh=!0;return}const le=ce.explicit?0:void 0;this.updateTreeScheduler.schedule(le)})),this._register(this.debugService.getViewModel().onWillUpdateViews(()=>{const ce=this.debugService.getViewModel().focusedStackFrame;ce&&L&&ce.forgetScopes(),L=!0,this.tree.updateChildren()})),this._register(this.tree.onMouseDblClick(ce=>this.onMouseDblClick(ce))),this._register(this.tree.onContextMenu(async ce=>await this.onContextMenu(ce))),this._register(this.onDidChangeBodyVisibility(ce=>{ce&&this.needsRefresh&&this.updateTreeScheduler.schedule()}));let ie;this._register(this.debugService.getViewModel().onDidSelectExpression(ce=>{const le=ce?.expression;le instanceof R.Variable&&!ce?.settingWatch?(ie=this.tree.options.horizontalScrolling,ie&&this.tree.updateOptions({horizontalScrolling:!1}),this.tree.rerender(le)):!ce&&ie!==void 0&&(this.tree.updateOptions({horizontalScrolling:ie}),ie=void 0)})),this._register(this.debugService.getViewModel().onDidEvaluateLazyExpression(async ce=>{ce instanceof R.Variable&&(await this.tree.updateChildren(ce,!1,!0),await this.tree.expand(ce))})),this._register(this.debugService.onDidEndSession(()=>{this.savedViewState.clear(),this.autoExpandedScopes.clear()}))}layoutBody(ee,te){super.layoutBody(te,ee),this.tree.layout(ee,te)}focus(){this.tree.domFocus()}collapseAll(){this.tree.collapseAll()}onMouseDblClick(ee){const te=this.debugService.getViewModel().focusedSession;te&&ee.element instanceof R.Variable&&te.capabilities.supportsSetVariable&&!ee.element.presentationHint?.attributes?.includes("readOnly")&&!ee.element.presentationHint?.lazy&&this.debugService.getViewModel().setSelectedExpression(ee.element,!1)}async onContextMenu(ee){const te=ee.element;if(!(te instanceof R.Variable)||!te.value)return;const se=new I.DisposableStore;try{const ie=se.add(await V(this.contextKeyService,te)),ce=se.add(this.menuService.createMenu(o.MenuId.DebugVariablesContext,ie)),le=P(te),ae=[],ue=(0,C.createAndFillInContextMenuActions)(ce,{arg:le,shouldForwardArgs:!1},{primary:[],secondary:ae},"inline");this.contextMenuService.showContextMenu({getAnchor:()=>ee.anchor,getActions:()=>ae,onHide:()=>(0,I.dispose)(ue)})}finally{se.dispose()}}};B=Ee([W(1,l.IContextMenuService),W(2,T.IDebugService),W(3,p.IKeybindingService),W(4,S.IConfigurationService),W(5,r.IInstantiationService),W(6,b.IViewDescriptorService),W(7,s.IContextKeyService),W(8,n.IOpenerService),W(9,d.IThemeService),W(10,g.ITelemetryService),W(11,o.IMenuService)],B),e.VariablesView=B;const P=J=>({sessionId:J.getSession()?.getId(),container:J.parent instanceof R.Expression?{expression:J.parent.name}:J.parent.toDebugProtocolObject(),variable:J.toDebugProtocolObject()});async function V(J,ee){const te=ee.getSession();if(!te||!te.capabilities.supportsDataBreakpoints)return z(J,ee);const se=[];N=await te.dataBreakpointInfo(ee.name,ee.parent.reference);const ie=N?.dataId,ce=N?.accessTypes;if(!ce)se.push([T.CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED.key,!!ie]);else for(const le of ce)switch(le){case"read":se.push([T.CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED.key,!!ie]);break;case"write":se.push([T.CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED.key,!!ie]);break;case"readWrite":se.push([T.CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED.key,!!ie]);break}return z(J,ee,se)}function z(J,ee,te=[]){const se=ee.getSession(),ie=[[T.CONTEXT_DEBUG_PROTOCOL_VARIABLE_MENU_CONTEXT.key,ee.variableMenuContext||""],[T.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT.key,!!ee.evaluateName],[T.CONTEXT_CAN_VIEW_MEMORY.key,!!se?.capabilities.supportsReadMemoryRequest&&ee.memoryReference!==void 0],[T.CONTEXT_VARIABLE_IS_READONLY.key,!!ee.presentationHint?.attributes?.includes("readOnly")||ee.presentationHint?.lazy],...te];return M=ee,J.createOverlay(ie)}function U(J){return J instanceof R.StackFrame}class H{hasChildren(ee){return ee?U(ee)?!0:ee.hasChildren:!1}getChildren(ee){return U(ee)?ee.getScopes():ee.getChildren()}}e.VariablesDataSource=H;class K{getHeight(ee){return 22}getTemplateId(ee){return ee instanceof R.ErrorScope?q.ID:ee instanceof R.Scope?G.ID:Z.ID}}class G{get templateId(){return G.ID}renderTemplate(ee){const te=t.append(ee,F(".scope")),se=new f.HighlightedLabel(te);return{name:te,label:se}}renderElement(ee,te,se){se.label.set(ee.element.name,(0,D.createMatches)(ee.filterData))}disposeTemplate(ee){}}G.ID="scope";class q{get templateId(){return q.ID}renderTemplate(ee){const te=t.append(ee,F(".scope"));return{error:t.append(te,F(".error"))}}renderElement(ee,te,se){se.error.innerText=ee.element.name}disposeTemplate(){}}q.ID="scopeError";let Z=class Ea extends E.AbstractExpressionsRenderer{constructor(ee,te,se,ie,ce,le){super(ie,ce,le);this.linkDetector=ee,this.menuService=te,this.contextKeyService=se}get templateId(){return Ea.ID}renderExpression(ee,te,se){(0,E.renderVariable)(ee,te,!0,se,this.linkDetector)}getInputBoxOptions(ee){const te=ee;return{initialValue:ee.value,ariaLabel:(0,v.localize)(0,null),validationOptions:{validation:()=>te.errorMessage?{content:te.errorMessage}:null},onFinish:(se,ie)=>{te.errorMessage=void 0;const ce=this.debugService.getViewModel().focusedStackFrame;ie&&te.value!==se&&ce&&te.setVariable(se,ce).then(()=>{L=!1,this.debugService.getViewModel().updateViews()})}}}renderActionBar(ee,te,se){const ie=te,ce=z(this.contextKeyService,ie),le=this.menuService.createMenu(o.MenuId.DebugVariablesContext,ce),ae=[],ue=P(ie);se.elementDisposable.push((0,C.createAndFillInContextMenuActions)(le,{arg:ue,shouldForwardArgs:!1},{primary:ae,secondary:[]},"inline")),ee.clear(),ee.context=ue,ee.push(ae,{icon:!0,label:!1})}};Z.ID="variable",Z=Ee([W(1,o.IMenuService),W(2,s.IContextKeyService),W(3,T.IDebugService),W(4,l.IContextViewService),W(5,d.IThemeService)],Z),e.VariablesRenderer=Z;class j{getWidgetAriaLabel(){return(0,v.localize)(1,null)}getAriaLabel(ee){return ee instanceof R.Scope?(0,v.localize)(2,null,ee.name):ee instanceof R.Variable?(0,v.localize)(3,null,ee.name,ee.value):null}}e.SET_VARIABLE_ID="debug.setVariable",i.CommandsRegistry.registerCommand({id:e.SET_VARIABLE_ID,handler:J=>{J.get(T.IDebugService).getViewModel().setSelectedExpression(M,!1)}}),e.COPY_VALUE_ID="workbench.debug.viewlet.action.copyValue",i.CommandsRegistry.registerCommand({id:e.COPY_VALUE_ID,handler:async(J,ee,te)=>{const se=J.get(T.IDebugService),ie=J.get(c.IClipboardService);let ce="",le;ee instanceof R.Variable||ee instanceof R.Expression?(ce="watch",le=te||[]):(ce="variables",le=M?[M]:[]);const ae=se.getViewModel().focusedStackFrame,ue=se.getViewModel().focusedSession;if(!ae||!ue||le.length===0)return;const oe=ue.capabilities.supportsClipboardContext?"clipboard":ce,fe=le.map(pe=>pe instanceof R.Variable?pe.evaluateName||pe.value:pe.name);try{const pe=await Promise.all(fe.map(be=>ue.evaluate(be,ae.frameId,oe))),me=(0,_.coalesce)(pe).map(be=>be.body.result);me.length&&ie.writeText(me.join(` `))}catch{const me=le.map(be=>be.value);ie.writeText(me.join(` `))}}}),e.VIEW_MEMORY_ID="workbench.debug.viewlet.action.viewMemory";const X="ms-vscode.hexeditor",Y="hexEditor.hexedit";i.CommandsRegistry.registerCommand({id:e.VIEW_MEMORY_ID,handler:async(J,ee,te)=>{if(!ee.sessionId||!ee.variable.memoryReference)return;const se=J.get(i.ICommandService),ie=J.get(O.IEditorService),ce=J.get(a.INotificationService),le=J.get(h.IProgressService),ae=J.get(x.IExtensionService),ue=J.get(g.ITelemetryService),oe=J.get(T.IDebugService);(await ae.getExtension(X)||await $(ce,le,ae,se))&&(ue.publicLog("debug/didViewMemory",{debugType:oe.getModel().getSession(ee.sessionId)?.configuration.type}),await ie.openEditor({resource:(0,R.getUriForDebugMemory)(ee.sessionId,ee.variable.memoryReference),options:{revealIfOpened:!0,override:Y}},O.SIDE_GROUP))}});function $(J,ee,te,se){return new Promise(ie=>{let ce=!1;J.prompt(a.Severity.Info,(0,v.localize)(4,null),[{label:(0,v.localize)(5,null),run:()=>ie(!1)},{label:(0,v.localize)(6,null),run:async()=>{ce=!0;try{await ee.withProgress({location:15,title:(0,v.localize)(7,null)},async()=>{for(await se.executeCommand("workbench.extensions.installExtension",X);!await te.getExtension(X);)await(0,A.timeout)(30)}),ie(!0)}catch(ae){J.error(ae),ie(!1)}}}],{sticky:!0}).onDidClose(ae=>{ce||ie(!1)})})}e.BREAK_WHEN_VALUE_CHANGES_ID="debug.breakWhenValueChanges",i.CommandsRegistry.registerCommand({id:e.BREAK_WHEN_VALUE_CHANGES_ID,handler:async J=>{const ee=J.get(T.IDebugService);N&&await ee.addDataBreakpoint(N.description,N.dataId,!!N.canPersist,N.accessTypes,"write")}}),e.BREAK_WHEN_VALUE_IS_ACCESSED_ID="debug.breakWhenValueIsAccessed",i.CommandsRegistry.registerCommand({id:e.BREAK_WHEN_VALUE_IS_ACCESSED_ID,handler:async J=>{const ee=J.get(T.IDebugService);N&&await ee.addDataBreakpoint(N.description,N.dataId,!!N.canPersist,N.accessTypes,"readWrite")}}),e.BREAK_WHEN_VALUE_IS_READ_ID="debug.breakWhenValueIsRead",i.CommandsRegistry.registerCommand({id:e.BREAK_WHEN_VALUE_IS_READ_ID,handler:async J=>{const ee=J.get(T.IDebugService);N&&await ee.addDataBreakpoint(N.description,N.dataId,!!N.canPersist,N.accessTypes,"read")}}),e.COPY_EVALUATE_PATH_ID="debug.copyEvaluatePath",i.CommandsRegistry.registerCommand({id:e.COPY_EVALUATE_PATH_ID,handler:async(J,ee)=>{await J.get(c.IClipboardService).writeText(ee.variable.evaluateName)}}),e.ADD_TO_WATCH_ID="debug.addToWatchExpressions",i.CommandsRegistry.registerCommand({id:e.ADD_TO_WATCH_ID,handler:async(J,ee)=>{J.get(T.IDebugService).addWatchExpression(ee.variable.evaluateName)}}),(0,o.registerAction2)(class extends m.ViewAction{constructor(){super({id:"variables.collapse",viewId:T.VARIABLES_VIEW_ID,title:(0,v.localize)(8,null),f1:!1,icon:k.Codicon.collapseAll,menu:{id:o.MenuId.ViewTitle,group:"navigation",when:s.ContextKeyExpr.equals("view",T.VARIABLES_VIEW_ID)}})}runInView(J,ee){ee.collapseAll()}})}),define(ne[2594],re([1,0,1503,2,10,20,5,90,179,371,139,68,12,32,93,231,71,15,626,30,14,428,62]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugHoverWidget=e.findExpressionInStackFrame=void 0;const h=_.$;async function g(T,R){if(!T)return Promise.resolve(null);const x=(await T.getChildren()).filter(F=>R[0]===F.name);return x.length!==1?null:R.length===1?x[0]:g(x[0],R.slice(1))}async function d(T,R){const x=(await T.getScopes()).filter(L=>!L.expensive),F=(0,l.coalesce)(await Promise.all(x.map(L=>g(L,R))));return F.length>0&&F.every(L=>L.value===F[0].value)?F[0]:void 0}e.findExpressionInStackFrame=d;let m=class $r{constructor(R,O,x,F,L){this.editor=R,this.debugService=O,this.instantiationService=x,this.themeService=F,this.languageFeaturesService=L,this.allowEditorOverflow=!0,this.toDispose=[],this._isVisible=!1,this.showAtPosition=null,this.highlightDecorations=[],this.positionPreference=[1,2]}create(){this.domNode=h(".debug-hover-widget"),this.complexValueContainer=_.append(this.domNode,h(".complex-value")),this.complexValueTitle=_.append(this.complexValueContainer,h(".title")),this.treeContainer=_.append(this.complexValueContainer,h(".debug-hover-tree")),this.treeContainer.setAttribute("role","tree");const R=_.append(this.complexValueContainer,h(".tip"));R.textContent=t.localize(0,null,u.isMacintosh?"Option":"Alt");const O=new E,x=this.instantiationService.createInstance(a.LinkDetector);this.tree=this.instantiationService.createInstance(s.WorkbenchAsyncDataTree,"DebugHover",this.treeContainer,new y,[this.instantiationService.createInstance(r.VariablesRenderer,x)],O,{accessibilityProvider:new b,mouseSupport:!1,horizontalScrolling:!0,useShadows:!1,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:F=>F.name},filterOnType:!1,simpleKeyboardNavigation:!0,overrideStyles:{listBackground:c.editorHoverBackground}}),this.valueContainer=h(".value"),this.valueContainer.tabIndex=0,this.valueContainer.setAttribute("role","tooltip"),this.scrollbar=new v.DomScrollableElement(this.valueContainer,{horizontal:2}),this.domNode.appendChild(this.scrollbar.getDomNode()),this.toDispose.push(this.scrollbar),this.editor.applyFontInfo(this.domNode),this.toDispose.push((0,C.attachStylerCallback)(this.themeService,{editorHoverBackground:c.editorHoverBackground,editorHoverBorder:c.editorHoverBorder,editorHoverForeground:c.editorHoverForeground},F=>{F.editorHoverBackground?this.domNode.style.backgroundColor=F.editorHoverBackground.toString():this.domNode.style.backgroundColor="",F.editorHoverBorder?this.domNode.style.border=`1px solid ${F.editorHoverBorder}`:this.domNode.style.border="",F.editorHoverForeground?this.domNode.style.color=F.editorHoverForeground.toString():this.domNode.style.color=""})),this.toDispose.push(this.tree.onDidChangeContentHeight(()=>this.layoutTreeAndContainer(!1))),this.registerListeners(),this.editor.addContentWidget(this)}registerListeners(){this.toDispose.push(_.addStandardDisposableListener(this.domNode,"keydown",R=>{R.equals(9)&&this.hide()})),this.toDispose.push(this.editor.onDidChangeConfiguration(R=>{R.hasChanged(44)&&this.editor.applyFontInfo(this.domNode)})),this.toDispose.push(this.debugService.getViewModel().onDidEvaluateLazyExpression(async R=>{R instanceof I.Variable&&this.tree.hasNode(R)&&(await this.tree.updateChildren(R,!1,!0),await this.tree.expand(R))}))}isHovered(){return!!this.domNode?.matches(":hover")}isVisible(){return this._isVisible}willBeVisible(){return!!this.showCancellationSource}getId(){return $r.ID}getDomNode(){return this.domNode}async showAt(R,O){this.showCancellationSource?.cancel();const x=this.showCancellationSource=new p.CancellationTokenSource,F=this.debugService.getViewModel().focusedSession;if(!F||!this.editor.hasModel())return Promise.resolve(this.hide());const L=this.editor.getModel(),M=R.getStartPosition();let N,B;if(this.languageFeaturesService.evaluatableExpressionProvider.has(L)){const z=this.languageFeaturesService.evaluatableExpressionProvider.ordered(L).map(H=>Promise.resolve(H.provideEvaluatableExpression(L,M,x.token)).then(K=>K,K=>{})),U=await Promise.all(z).then(l.coalesce);U.length>0&&(B=U[0].expression,N=U[0].range,B||(B=L.getLineContent(M.lineNumber).substring(N.startColumn-1,N.endColumn-1)))}else{const V=L.getLineContent(M.lineNumber),{start:z,end:U}=(0,S.getExactExpressionStartAndEnd)(V,R.startColumn,R.endColumn);B=V.substring(z-1,U),N=new A.Range(M.lineNumber,z,M.lineNumber,z+B.length)}if(!B)return Promise.resolve(this.hide());let P;if(F.capabilities.supportsEvaluateForHovers)P=new I.Expression(B),await P.evaluate(F,this.debugService.getViewModel().focusedStackFrame,"hover");else{const V=this.debugService.getViewModel().focusedStackFrame;V&&(P=await d(V,(0,l.coalesce)(B.split(".").map(z=>z.trim()))))}if(x.token.isCancellationRequested||!P||P instanceof I.Expression&&!P.available){this.hide();return}return N&&(this.highlightDecorations=this.editor.deltaDecorations(this.highlightDecorations,[{range:N,options:$r._HOVER_HIGHLIGHT_DECORATION_OPTIONS}])),this.doShow(M,P,O)}async doShow(R,O,x,F=!1){if(this.domNode||this.create(),this.showAtPosition=R,this._isVisible=!0,!O.hasChildren||F)return this.complexValueContainer.hidden=!0,this.valueContainer.hidden=!1,(0,w.renderExpressionValue)(O,this.valueContainer,{showChanged:!1,colorize:!0}),this.valueContainer.title="",this.editor.layoutContentWidget(this),this.scrollbar.scanDomNode(),x&&(this.editor.render(),this.valueContainer.focus()),Promise.resolve(void 0);this.valueContainer.hidden=!0,await this.tree.setInput(O),this.complexValueTitle.textContent=O.value,this.complexValueTitle.title=O.value,this.layoutTreeAndContainer(!0),this.tree.scrollTop=0,this.tree.scrollLeft=0,this.complexValueContainer.hidden=!1,x&&(this.editor.render(),this.tree.domFocus())}layoutTreeAndContainer(R){const O=10,x=Math.min(Math.max(266,this.editor.getLayoutInfo().height*.55),this.tree.contentHeight+O);this.treeContainer.style.height=`${x}px`,this.tree.layout(x,R?400:void 0),this.editor.layoutContentWidget(this),this.scrollbar.scanDomNode()}afterRender(R){R&&(this.positionPreference=[R])}hide(){this.showCancellationSource&&(this.showCancellationSource.cancel(),this.showCancellationSource=void 0),!!this._isVisible&&(_.isAncestor(document.activeElement,this.domNode)&&this.editor.focus(),this._isVisible=!1,this.editor.deltaDecorations(this.highlightDecorations,[]),this.highlightDecorations=[],this.editor.layoutContentWidget(this),this.positionPreference=[1,2])}getPosition(){return this._isVisible?{position:this.showAtPosition,preference:this.positionPreference}:null}dispose(){this.toDispose=f.dispose(this.toDispose)}};m.ID="debug.hoverWidget",m._HOVER_HIGHLIGHT_DECORATION_OPTIONS=i.ModelDecorationOptions.register({description:"bdebug-hover-highlight",className:"hoverHighlight"}),m=Ee([W(1,D.IDebugService),W(2,k.IInstantiationService),W(3,o.IThemeService),W(4,n.ILanguageFeaturesService)],m),e.DebugHoverWidget=m;class b{getWidgetAriaLabel(){return t.localize(1,null)}getAriaLabel(R){return t.localize(2,null,R.name,R.value)}}class E{hasChildren(R){return R.hasChildren}getChildren(R){return R.getChildren()}}class y{getHeight(R){return 18}getTemplateId(R){return r.VariablesRenderer.ID}}}),define(ne[902],re([1,0,1502,29,11,14,118,302,91,30,15,22,283,20,5,8,28,90,2525,298,49,312,110,2594,122,2,136,48,406,69,6,56,7,179,32,10,224,62,228]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugEditorContribution=e.debugInlineBackground=e.debugInlineForeground=void 0;const P=/\.vscode\/launch\.json$/,V=100,z=150,U=500,H=200;e.debugInlineForeground=(0,F.registerColor)("editor.inlineValuesForeground",{dark:"#ffffff80",light:"#00000080",hcDark:"#ffffff80",hcLight:"#00000080"},t.localize(0,null)),e.debugInlineBackground=(0,F.registerColor)("editor.inlineValuesBackground",{dark:"#ffc80033",light:"#ffc80033",hcDark:"#ffc80033",hcLight:"#ffc80033"},t.localize(1,null));class K{constructor($,J){this.column=$,this.text=J}}function G(Y,$,J=1073741824){return $.length>z&&($=$.substring(0,z)+"..."),[{range:{startLineNumber:Y,endLineNumber:Y,startColumn:J,endColumn:J},options:{description:"debug-inline-value-decoration-spacer",after:{content:f.noBreakWhitespace,cursorStops:g.InjectedTextCursorStops.None},showIfCollapsed:!0}},{range:{startLineNumber:Y,endLineNumber:Y,startColumn:J,endColumn:J},options:{description:"debug-inline-value-decoration",after:{content:q($),inlineClassName:"debug-inline-value",inlineClassNameAffectsLetterSpacing:!0,cursorStops:g.InjectedTextCursorStops.None},showIfCollapsed:!0}}]}function q(Y){return Y.replace(/[ \t]/g,f.noBreakWhitespace)}function Z(Y,$,J,ee){const te=new Map;for(const ce of Y)if(te.set(ce.name,ce.value),te.size>=V)break;const se=new Map;te.forEach((ce,le)=>{const ae=ee.get(le);if(ae)for(const ue of ae)$.containsPosition(new u.Position(ue,0))&&(se.has(ue)||se.set(ue,[]),se.get(ue).indexOf(le)===-1&&se.get(ue).push(le))});const ie=[];return se.forEach((ce,le)=>{const ae=ce.sort((ue,oe)=>{const fe=J.getLineContent(le);return fe.indexOf(ue)-fe.indexOf(oe)}).map(ue=>`${ue} = ${te.get(ue)}`).join(", ");ie.push(...G(le,ae))}),ie}function j(Y){const $=new Map;if(!Y)return $;for(let J=1,ee=Y.getLineCount();J<=ee;++J){const te=Y.getLineContent(J);if(te.length>U)continue;Y.forceTokenization(J);const se=Y.getLineTokens(J);for(let ie=0,ce=se.getCount();ie<ce;ie++)if(se.getStandardTokenType(ie)===0){o.DEFAULT_WORD_REGEXP.lastIndex=0;const ae=se.getStartOffset(ie),ue=se.getEndOffset(ie),oe=te.substring(ae,ue),fe=o.DEFAULT_WORD_REGEXP.exec(oe);if(fe){const pe=fe[0];$.has(pe)||$.set(pe,[]),$.get(pe).push(J)}}}return $}let X=class{constructor($,J,ee,te,se,ie,ce,le,ae,ue){this.editor=$,this.debugService=J,this.instantiationService=ee,this.commandService=te,this.configurationService=se,this.hostService=ie,this.uriIdentityService=ce,this.languageFeaturesService=ae,this.hoverRange=null,this.mouseDown=!1,this.altPressed=!1,this.oldDecorations=[],this._wordToLineNumbersMap=void 0,this.debounceInfo=ue.for(ae.inlineValuesProvider,"InlineValues",{min:H}),this.hoverWidget=this.instantiationService.createInstance(h.DebugHoverWidget,this.editor),this.toDispose=[],this.registerListeners(),this.updateConfigurationWidgetVisibility(),this.exceptionWidgetVisible=l.CONTEXT_EXCEPTION_WIDGET_VISIBLE.bindTo(le),this.toggleExceptionWidget()}registerListeners(){this.toDispose.push(this.debugService.getViewModel().onDidFocusStackFrame($=>this.onFocusStackFrame($.stackFrame))),this.toDispose.push(this.editor.onMouseDown($=>this.onEditorMouseDown($))),this.toDispose.push(this.editor.onMouseUp(()=>this.mouseDown=!1)),this.toDispose.push(this.editor.onMouseMove($=>this.onEditorMouseMove($))),this.toDispose.push(this.editor.onMouseLeave($=>{const J=this.hoverWidget.getDomNode();if(!J)return;const ee=J.getBoundingClientRect();($.event.posx<ee.left||$.event.posx>ee.right||$.event.posy<ee.top||$.event.posy>ee.bottom)&&this.hideHoverWidget()})),this.toDispose.push(this.editor.onKeyDown($=>this.onKeyDown($))),this.toDispose.push(this.editor.onDidChangeModelContent(()=>{this._wordToLineNumbersMap=void 0,this.updateInlineValuesScheduler.schedule()})),this.toDispose.push(this.debugService.getViewModel().onWillUpdateViews(()=>this.updateInlineValuesScheduler.schedule())),this.toDispose.push(this.debugService.getViewModel().onDidEvaluateLazyExpression(()=>this.updateInlineValuesScheduler.schedule())),this.toDispose.push(this.editor.onDidChangeModel(async()=>{const $=this.debugService.getViewModel().focusedStackFrame,J=this.editor.getModel();J&&this.applyHoverConfiguration(J,$),this.toggleExceptionWidget(),this.hideHoverWidget(),this.updateConfigurationWidgetVisibility(),this._wordToLineNumbersMap=void 0,await this.updateInlineValueDecorations($)})),this.toDispose.push(this.editor.onDidScrollChange(()=>{this.hideHoverWidget();const $=this.editor.getModel();$&&this.languageFeaturesService.inlineValuesProvider.has($)&&this.updateInlineValuesScheduler.schedule()})),this.toDispose.push(this.debugService.onDidChangeState($=>{$!==2&&this.toggleExceptionWidget()}))}get wordToLineNumbersMap(){return this._wordToLineNumbersMap||(this._wordToLineNumbersMap=j(this.editor.getModel())),this._wordToLineNumbersMap}applyHoverConfiguration($,J){J&&this.uriIdentityService.extUri.isEqual($.uri,J.source.uri)?(this.altListener&&this.altListener.dispose(),this.altListener=(0,L.addDisposableListener)(document,"keydown",ee=>{if(new I.StandardKeyboardEvent(ee).keyCode===6){this.altPressed=!0;const se=this.hoverWidget.isVisible();this.hoverWidget.hide(),this.enableEditorHover(),se&&this.hoverRange&&this.editor.getContribution(E.ModesHoverController.ID)?.showContentHover(this.hoverRange,1,!1);const ie=new M.DomEmitter(document,"keyup"),ce=T.Event.any(this.hostService.onDidChangeFocus,ie.event)(le=>{let ae;le instanceof KeyboardEvent&&(ae=new I.StandardKeyboardEvent(le)),(!ae||ae.keyCode===6)&&(this.altPressed=!1,this.editor.updateOptions({hover:{enabled:!1}}),ce.dispose(),ie.dispose())})}}),this.editor.updateOptions({hover:{enabled:!1}})):(this.altListener?.dispose(),this.enableEditorHover())}enableEditorHover(){if(this.editor.hasModel()){const $=this.editor.getModel(),J={resource:$.uri,overrideIdentifier:$.getLanguageId()},ee=this.configurationService.getValue("editor.hover",J);this.editor.updateOptions({hover:{enabled:ee.enabled,delay:ee.delay,sticky:ee.sticky}})}}async showHover($,J){const ee=this.debugService.getViewModel().focusedStackFrame,te=this.editor.getModel();if(ee&&te&&this.uriIdentityService.extUri.isEqual(ee.source.uri,te.uri)&&!this.altPressed)return this.hoverWidget.showAt($,J)}async onFocusStackFrame($){const J=this.editor.getModel();J&&(this.applyHoverConfiguration(J,$),$&&this.uriIdentityService.extUri.isEqual($.source.uri,J.uri)?await this.toggleExceptionWidget():this.hideHoverWidget()),await this.updateInlineValueDecorations($)}get showHoverScheduler(){const $=this.editor.getOption(53),J=new _.RunOnceScheduler(()=>{this.hoverRange&&this.showHover(this.hoverRange,!1)},$.delay*2);return this.toDispose.push(J),J}get hideHoverScheduler(){const $=new _.RunOnceScheduler(()=>{this.hoverWidget.isHovered()||this.hoverWidget.hide()},0);return this.toDispose.push($),$}hideHoverWidget(){!this.hideHoverScheduler.isScheduled()&&this.hoverWidget.willBeVisible()&&this.hideHoverScheduler.schedule(),this.showHoverScheduler.cancel()}onEditorMouseDown($){this.mouseDown=!0,!($.target.type===9&&$.target.detail===h.DebugHoverWidget.ID)&&this.hideHoverWidget()}onEditorMouseMove($){if(this.debugService.state!==2)return;const J=$.target,ee=A.isMacintosh?"metaKey":"ctrlKey";J.type===9&&J.detail===h.DebugHoverWidget.ID&&!$.event[ee]||(J.type===6?J.range&&!J.range.equalsRange(this.hoverRange)&&(this.hoverRange=J.range,this.hideHoverScheduler.cancel(),this.showHoverScheduler.schedule()):this.mouseDown||this.hideHoverWidget())}onKeyDown($){const J=A.isMacintosh?57:5;$.keyCode!==J&&this.hideHoverWidget()}async toggleExceptionWidget(){const $=this.editor.getModel(),J=this.debugService.getViewModel().focusedStackFrame,ee=J?J.thread.getCallStack():null;if(!$||!J||!ee||ee.length===0){this.closeExceptionWidget();return}const te=ee.find(ie=>!!(ie&&ie.source&&ie.source.available&&ie.source.presentationHint!=="deemphasize"));if(!te||te!==J){this.closeExceptionWidget();return}const se=this.uriIdentityService.extUri.isEqual(te.source.uri,$.uri);if(this.exceptionWidget&&!se)this.closeExceptionWidget();else if(se){const ie=await J.thread.exceptionInfo;ie&&this.showExceptionWidget(ie,this.debugService.getViewModel().focusedSession,te.range.startLineNumber,te.range.startColumn)}}showExceptionWidget($,J,ee,te){this.exceptionWidget&&this.exceptionWidget.dispose(),this.exceptionWidget=this.instantiationService.createInstance(r.ExceptionWidget,this.editor,$,J),this.exceptionWidget.show({lineNumber:ee,column:te},0),this.exceptionWidget.focus(),this.editor.revealRangeInCenter({startLineNumber:ee,startColumn:te,endLineNumber:ee,endColumn:te}),this.exceptionWidgetVisible.set(!0)}closeExceptionWidget(){if(this.exceptionWidget){const $=this.exceptionWidget.hasFocus();this.exceptionWidget.dispose(),this.exceptionWidget=void 0,this.exceptionWidgetVisible.set(!1),$&&this.editor.focus()}}updateConfigurationWidgetVisibility(){const $=this.editor.getModel();this.configurationWidget&&this.configurationWidget.dispose(),$&&P.test($.uri.toString())&&!this.editor.getOption(81)&&(this.configurationWidget=this.instantiationService.createInstance(p.FloatingClickWidget,this.editor,t.localize(2,null),null),this.configurationWidget.render(),this.toDispose.push(this.configurationWidget.onClick(()=>this.addLaunchConfiguration())))}async addLaunchConfiguration(){const $=this.editor.getModel();if(!$)return;let J,ee;const te=()=>{let ie=0;(0,k.visit)($.getValue(),{onObjectProperty:ce=>{ee=ce},onArrayBegin:ce=>{ee==="configurations"&&ie===0&&(J=$.getPositionAt(ce+1)),ie++},onArrayEnd:()=>{ie--}})};if(te(),!J){const{tabSize:ie,insertSpaces:ce}=$.getOptions(),le=$.getEOL(),ae=(0,b.basename)($.uri.fsPath)==="launch.json"?(0,D.setProperty)($.getValue(),["configurations"],[],{tabSize:ie,insertSpaces:ce,eol:le})[0]:(0,D.setProperty)($.getValue(),["launch"],{configurations:[]},{tabSize:ie,insertSpaces:ce,eol:le})[0],ue=$.getPositionAt(ae.offset),oe=ue.lineNumber,fe=new c.Range(oe,ue.column,oe,$.getLineMaxColumn(oe));$.pushEditOperations(null,[m.EditOperation.replace(fe,ae.content)],()=>null),te()}if(!J)return;this.editor.focus(),await(ie=>($.getLineLastNonWhitespaceColumn(ie.lineNumber)>ie.column&&(this.editor.setPosition(ie),a.CoreEditingCommands.LineBreakInsert.runEditorCommand(null,this.editor,null)),this.editor.setPosition(ie),this.commandService.executeCommand("editor.action.insertLineAfter")))(J),await this.commandService.executeCommand("editor.action.triggerSuggest")}get removeInlineValuesScheduler(){return new _.RunOnceScheduler(()=>{this.oldDecorations=this.editor.deltaDecorations(this.oldDecorations,[])},100)}get updateInlineValuesScheduler(){const $=this.editor.getModel();return new _.RunOnceScheduler(async()=>await this.updateInlineValueDecorations(this.debugService.getViewModel().focusedStackFrame),$?this.debounceInfo.get($):H)}async updateInlineValueDecorations($){const J="{0} = {1}",ee=", ",te=this.editor.getModel(),se=this.configurationService.getValue("debug").inlineValues;if(!(se===!0||se==="auto"&&te&&this.languageFeaturesService.inlineValuesProvider.has(te))||!te||!$||te.uri.toString()!==$.source.uri.toString()){this.removeInlineValuesScheduler.isScheduled()||this.removeInlineValuesScheduler.schedule();return}this.removeInlineValuesScheduler.cancel();let ce;if(this.languageFeaturesService.inlineValuesProvider.has(te)){const le=async(Ce,ve)=>{const he=await $.getMostSpecificScopes($.range),ge=ve?Ce:Ce.toLowerCase();for(const de of he){const we=(await de.getChildren()).find(ye=>ve?ye.name===ge:ye.name.toLowerCase()===ge);if(we)return we.value}},ae={frameId:$.frameId,stoppedLocation:new c.Range($.range.startLineNumber,$.range.startColumn+1,$.range.endLineNumber,$.range.endColumn+1)},ue=new w.CancellationTokenSource().token,oe=this.editor.getVisibleRangesPlusViewportAboveBelow(),fe=this.languageFeaturesService.inlineValuesProvider.ordered(te).reverse();ce=[];const pe=new Map,me=(0,v.flatten)(fe.map(Ce=>oe.map(ve=>Promise.resolve(Ce.provideInlineValues(te,ve,ae,ue)).then(async he=>{if(he)for(const ge of he){let de;switch(ge.type){case"text":de=ge.text;break;case"variable":{let Se=ge.variableName;Se||(Se=te.getLineContent(ge.range.startLineNumber).substring(ge.range.startColumn-1,ge.range.endColumn-1));const we=await le(Se,ge.caseSensitiveLookup);we&&(de=f.format(J,Se,we));break}case"expression":{let Se=ge.expression;if(Se||(Se=te.getLineContent(ge.range.startLineNumber).substring(ge.range.startColumn-1,ge.range.endColumn-1)),Se){const we=new x.Expression(Se);await we.evaluate($.thread.session,$,"watch",!0),we.available&&(de=f.format(J,Se,we.value))}break}}if(de){const Se=ge.range.startLineNumber;let we=pe.get(Se);we||(we=[],pe.set(Se,we)),we.some(ye=>ye.text===de)||we.push(new K(ge.range.startColumn,de))}}},he=>{(0,C.onUnexpectedExternalError)(he)})))),be=Date.now();await Promise.all(me),this.updateInlineValuesScheduler.delay=this.debounceInfo.update(te,Date.now()-be),pe.forEach((Ce,ve)=>{if(Ce.length>0){Ce=Ce.sort((ge,de)=>ge.column-de.column);const he=Ce.map(ge=>ge.text).join(ee);ce.push(...G(ve,he))}})}else{const le=await $.getMostSpecificScopes($.range),ae=await Promise.all(le.map(async ue=>{const oe=await ue.getChildren();let fe=new c.Range(0,0,$.range.startLineNumber,$.range.startColumn);return ue.range&&(fe=fe.setStartPosition(ue.range.startLineNumber,ue.range.startColumn)),Z(oe,fe,te,this.wordToLineNumbersMap)}));ce=(0,v.distinct)(ae.reduce((ue,oe)=>ue.concat(oe),[]),ue=>`${ue.range.startLineNumber}:${ue?.options.after?.content}`)}this.oldDecorations=this.editor.deltaDecorations(this.oldDecorations,ce)}dispose(){this.hoverWidget&&this.hoverWidget.dispose(),this.configurationWidget&&this.configurationWidget.dispose(),this.toDispose=(0,d.dispose)(this.toDispose),this.oldDecorations=this.editor.deltaDecorations(this.oldDecorations,[])}};Ee([n.memoize],X.prototype,"showHoverScheduler",null),Ee([n.memoize],X.prototype,"hideHoverScheduler",null),Ee([n.memoize],X.prototype,"removeInlineValuesScheduler",null),Ee([n.memoize],X.prototype,"updateInlineValuesScheduler",null),X=Ee([W(1,l.IDebugService),W(2,i.IInstantiationService),W(3,s.ICommandService),W(4,S.IConfigurationService),W(5,y.IHostService),W(6,R.IUriIdentityService),W(7,O.IContextKeyService),W(8,N.ILanguageFeaturesService),W(9,B.ILanguageFeatureDebounceService)],X),e.DebugEditorContribution=X}),define(ne[2595],re([1,0,11,90,179,37,5,38,371,8,131,71,305,626,7,2,43,41,12,27,190,16,1522,33,73,428]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.REMOVE_WATCH_EXPRESSIONS_LABEL=e.REMOVE_WATCH_EXPRESSIONS_COMMAND_ID=e.ADD_WATCH_LABEL=e.ADD_WATCH_ID=e.WatchExpressionsRenderer=e.WatchExpressionsView=void 0;const m=1024;let b=!1,E=!1,y=class extends v.ViewPane{constructor(N,B,P,V,z,U,H,K,G,q,Z,j){super(N,V,B,H,K,U,z,G,q,Z);this.debugService=P,this.needsRefresh=!1,this.menu=j.createMenu(a.MenuId.DebugWatchContext,K),this._register(this.menu),this.watchExpressionsUpdatedScheduler=new t.RunOnceScheduler(()=>{this.needsRefresh=!1,this.tree.updateChildren()},50),this.watchExpressionsExist=f.CONTEXT_WATCH_EXPRESSIONS_EXIST.bindTo(K),this.variableReadonly=f.CONTEXT_VARIABLE_IS_READONLY.bindTo(K),this.watchExpressionsExist.set(this.debugService.getModel().getWatchExpressions().length>0),this.watchItemType=f.CONTEXT_WATCH_ITEM_TYPE.bindTo(K)}renderBody(N){super.renderBody(N),this.element.classList.add("debug-pane"),N.classList.add("debug-watch");const B=(0,I.renderViewTree)(N),P=this.instantiationService.createInstance(x),V=this.instantiationService.createInstance(d.LinkDetector);this.tree=this.instantiationService.createInstance(C.WorkbenchAsyncDataTree,"WatchExpressions",B,new T,[P,this.instantiationService.createInstance(c.VariablesRenderer,V)],new O,{accessibilityProvider:new F,identityProvider:{getId:U=>U.getId()},keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:U=>{if(U!==this.debugService.getViewModel().getSelectedExpression()?.expression)return U.name}},dnd:new L(this.debugService),overrideStyles:{listBackground:this.getBackgroundColor()}}),this.tree.setInput(this.debugService),f.CONTEXT_WATCH_EXPRESSIONS_FOCUSED.bindTo(this.tree.contextKeyService),this._register(this.tree.onContextMenu(U=>this.onContextMenu(U))),this._register(this.tree.onMouseDblClick(U=>this.onMouseDblClick(U))),this._register(this.debugService.getModel().onDidChangeWatchExpressions(async U=>{this.watchExpressionsExist.set(this.debugService.getModel().getWatchExpressions().length>0),this.isBodyVisible()?(U&&!U.name&&(E=!0),await this.tree.updateChildren(),E=!1,U instanceof _.Expression&&this.tree.reveal(U)):this.needsRefresh=!0})),this._register(this.debugService.getViewModel().onDidFocusStackFrame(()=>{if(!this.isBodyVisible()){this.needsRefresh=!0;return}this.watchExpressionsUpdatedScheduler.isScheduled()||this.watchExpressionsUpdatedScheduler.schedule()})),this._register(this.debugService.getViewModel().onWillUpdateViews(()=>{b||this.tree.updateChildren()})),this._register(this.onDidChangeBodyVisibility(U=>{U&&this.needsRefresh&&this.watchExpressionsUpdatedScheduler.schedule()}));let z;this._register(this.debugService.getViewModel().onDidSelectExpression(U=>{const H=U?.expression;H instanceof _.Expression||H instanceof _.Variable&&U?.settingWatch?(z=this.tree.options.horizontalScrolling,z&&this.tree.updateOptions({horizontalScrolling:!1}),H.name&&this.tree.rerender(H)):!H&&z!==void 0&&(this.tree.updateOptions({horizontalScrolling:z}),z=void 0)})),this._register(this.debugService.getViewModel().onDidEvaluateLazyExpression(async U=>{U instanceof _.Variable&&this.tree.hasNode(U)&&(await this.tree.updateChildren(U,!1,!0),await this.tree.expand(U))}))}layoutBody(N,B){super.layoutBody(N,B),this.tree.layout(N,B)}focus(){this.tree.domFocus()}collapseAll(){this.tree.collapseAll()}onMouseDblClick(N){if(N.browserEvent.target.className.indexOf("twistie")>=0)return;const B=N.element,P=this.debugService.getViewModel().getSelectedExpression();B instanceof _.Expression&&B!==P?.expression?this.debugService.getViewModel().setSelectedExpression(B,!1):B||this.debugService.addWatchExpression()}onContextMenu(N){const B=N.element,P=this.tree.getSelection();this.watchItemType.set(B instanceof _.Expression?"expression":B instanceof _.Variable?"variable":void 0);const V=[],z=B instanceof _.Variable?B.presentationHint?.attributes:void 0;this.variableReadonly.set(!!z&&z.indexOf("readOnly")>=0||!!B?.presentationHint?.lazy);const U=(0,g.createAndFillInContextMenuActions)(this.menu,{arg:B,shouldForwardArgs:!0},V);this.contextMenuService.showContextMenu({getAnchor:()=>N.anchor,getActions:()=>V,getActionsContext:()=>B&&P.includes(B)?P:B?[B]:[],onHide:()=>(0,S.dispose)(U)})}};y=Ee([W(1,A.IContextMenuService),W(2,f.IDebugService),W(3,D.IKeybindingService),W(4,k.IInstantiationService),W(5,s.IViewDescriptorService),W(6,w.IConfigurationService),W(7,i.IContextKeyService),W(8,l.IOpenerService),W(9,r.IThemeService),W(10,p.ITelemetryService),W(11,a.IMenuService)],y),e.WatchExpressionsView=y;class T{getHeight(N){return 22}getTemplateId(N){return N instanceof _.Expression?x.ID:c.VariablesRenderer.ID}}function R(M){return typeof M.getConfigurationManager=="function"}class O{hasChildren(N){return R(N)||N.hasChildren}getChildren(N){if(R(N)){const B=N,P=B.getModel().getWatchExpressions(),V=B.getViewModel();return Promise.all(P.map(z=>!!z.name&&!E?z.evaluate(V.focusedSession,V.focusedStackFrame,"watch").then(()=>z):Promise.resolve(z)))}return N.getChildren()}}class x extends I.AbstractExpressionsRenderer{get templateId(){return x.ID}renderExpression(N,B,P){const V=typeof N.value=="string"?`${N.name}:`:N.name;B.label.set(V,P,N.type?N.type:N.value),(0,I.renderExpressionValue)(N,B.value,{showChanged:!0,maxValueLength:m,showHover:!0,colorize:!0})}getInputBoxOptions(N,B){return B?{initialValue:N.value,ariaLabel:(0,n.localize)(0,null),onFinish:async(P,V)=>{if(V&&P){const z=this.debugService.getViewModel().focusedStackFrame;z&&(N instanceof _.Variable||N instanceof _.Expression)&&(await N.setExpression(P,z),this.debugService.getViewModel().updateViews())}}}:{initialValue:N.name?N.name:"",ariaLabel:(0,n.localize)(1,null),placeholder:(0,n.localize)(2,null),onFinish:(P,V)=>{V&&P?(this.debugService.renameWatchExpression(N.getId(),P),b=!0,this.debugService.getViewModel().updateViews(),b=!1):N.name||this.debugService.removeWatchExpressions(N.getId())}}}}e.WatchExpressionsRenderer=x,x.ID="watchexpression";class F{getWidgetAriaLabel(){return(0,n.localize)(3,null)}getAriaLabel(N){return N instanceof _.Expression?(0,n.localize)(4,null,N.name,N.value):(0,n.localize)(5,null,N.name,N.value)}}class L{constructor(N){this.debugService=N}onDragOver(N){if(!(N instanceof o.ElementsDragAndDropData))return!1;const B=N.elements;return B.length>0&&B[0]instanceof _.Expression}getDragURI(N){return!(N instanceof _.Expression)||N===this.debugService.getViewModel().getSelectedExpression()?.expression?null:N.getId()}getDragLabel(N){if(N.length===1)return N[0].name}drop(N,B){if(!(N instanceof o.ElementsDragAndDropData))return;const P=N.elements[0],V=this.debugService.getModel().getWatchExpressions(),z=B instanceof _.Expression?V.indexOf(B):V.length-1;this.debugService.moveWatchExpression(P.getId(),z)}}(0,a.registerAction2)(class extends v.ViewAction{constructor(){super({id:"watch.collapse",viewId:f.WATCH_VIEW_ID,title:(0,n.localize)(6,null),f1:!1,icon:h.Codicon.collapseAll,precondition:f.CONTEXT_WATCH_EXPRESSIONS_EXIST,menu:{id:a.MenuId.ViewTitle,order:30,group:"navigation",when:i.ContextKeyExpr.equals("view",f.WATCH_VIEW_ID)}})}runInView(N,B){B.collapseAll()}}),e.ADD_WATCH_ID="workbench.debug.viewlet.action.addWatchExpression",e.ADD_WATCH_LABEL=(0,n.localize)(7,null),(0,a.registerAction2)(class extends a.Action2{constructor(){super({id:e.ADD_WATCH_ID,title:e.ADD_WATCH_LABEL,f1:!1,icon:u.watchExpressionsAdd,menu:{id:a.MenuId.ViewTitle,group:"navigation",when:i.ContextKeyExpr.equals("view",f.WATCH_VIEW_ID)}})}run(N){N.get(f.IDebugService).addWatchExpression()}}),e.REMOVE_WATCH_EXPRESSIONS_COMMAND_ID="workbench.debug.viewlet.action.removeAllWatchExpressions",e.REMOVE_WATCH_EXPRESSIONS_LABEL=(0,n.localize)(8,null),(0,a.registerAction2)(class extends a.Action2{constructor(){super({id:e.REMOVE_WATCH_EXPRESSIONS_COMMAND_ID,title:e.REMOVE_WATCH_EXPRESSIONS_LABEL,f1:!1,icon:u.watchExpressionsRemoveAll,precondition:f.CONTEXT_WATCH_EXPRESSIONS_EXIST,menu:{id:a.MenuId.ViewTitle,order:20,group:"navigation",when:i.ContextKeyExpr.equals("view",f.WATCH_VIEW_ID)}})}run(N){N.get(f.IDebugService).removeWatchExpressions()}})}),define(ne[504],re([1,0,15,11,30,6,152,2,51,14,13,8,79,5,46,187,24,27,494,40,76,83]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExperimentService=e.getCurrentActivationRecord=e.currentSchemaVersion=e.IExperimentService=e.ExperimentActionType=e.ExperimentState=void 0;var n;(function(E){E[E.Evaluating=0]="Evaluating",E[E.NoRun=1]="NoRun",E[E.Run=2]="Run",E[E.Complete=3]="Complete"})(n=e.ExperimentState||(e.ExperimentState={}));var h;(function(E){E.Custom="Custom",E.Prompt="Prompt",E.AddToRecommendations="AddToRecommendations",E.ExtensionSearchResults="ExtensionSearchResults"})(h=e.ExperimentActionType||(e.ExperimentActionType={})),e.IExperimentService=(0,c.createDecorator)("experimentService"),e.currentSchemaVersion=5;const g=E=>"experimentEventRecord-"+E.replace(/[^0-9a-z]/ig,"-"),d=(E,y=7)=>{const T=1e3*60*60*24,R=Date.now();if(!E)return{count:new Array(y).fill(0),mostRecentBucket:R};const O=Math.min(y,Math.floor((R-E.mostRecentBucket)/T));return O?{count:new Array(O).fill(0).concat(E.count.slice(0,-O)),mostRecentBucket:E.mostRecentBucket+O*T}:E};e.getCurrentActivationRecord=d;let m=class extends D.Disposable{constructor(y,T,R,O,x,F,L,M,N,B){super();this.storageService=y,this.extensionManagementService=T,this.textFileService=R,this.telemetryService=O,this.lifecycleService=x,this.requestService=F,this.configurationService=L,this.productService=M,this.workspaceTagsService=N,this.extensionService=B,this._experiments=[],this._curatedMapping=Object.create(null),this._onExperimentEnabled=this._register(new A.Emitter),this.onExperimentEnabled=this._onExperimentEnabled.event,this._loadExperimentsPromise=Promise.resolve(this.lifecycleService.when(4)).then(()=>this.loadExperiments())}getExperimentById(y){return this._loadExperimentsPromise.then(()=>this._experiments.filter(T=>T.id===y)[0])}getExperimentsByType(y){return this._loadExperimentsPromise.then(()=>y===h.Custom?this._experiments.filter(T=>T.enabled&&(!T.action||T.action.type===y)):this._experiments.filter(T=>T.enabled&&T.action&&T.action.type===y))}getCuratedExtensionsList(y){return this._loadExperimentsPromise.then(()=>{for(const T of this._experiments)if(T.enabled&&T.state===2&&this._curatedMapping[T.id]&&this._curatedMapping[T.id].curatedExtensionsKey===y)return this._curatedMapping[T.id].curatedExtensionsList;return[]})}markAsCompleted(y){const T="experiments."+y,R=b(this.storageService.get(T,0),{});R.state=3,this.storageService.store(T,JSON.stringify(R),0,1)}async getExperiments(){const y=this.configurationService.getValue("_workbench.experimentsUrl")||this.productService.experimentsUrl;if(!y||this.configurationService.getValue("workbench.enableExperiments")===!1)return[];try{const T=await this.requestService.request({type:"GET",url:y},_.CancellationToken.None);if(T.res.statusCode!==200)return null;const R=await(0,S.asJson)(T);return R&&Array.isArray(R.experiments)?R.experiments:[]}catch{return null}}loadExperiments(){return this.getExperiments().then(y=>{if(!y){const F=b(this.storageService.get("allExperiments",0),[]);return Array.isArray(F)&&F.forEach(L=>{const M="experiments."+L,N=b(this.storageService.get(M,0),null);N&&this._experiments.push({id:L,raw:void 0,enabled:N.enabled,state:N.state})}),Promise.resolve(null)}y=y.filter(F=>(F.schemaVersion||0)<=e.currentSchemaVersion);const T=b(this.storageService.get("allExperiments",0),[]),R=y.filter(F=>!!F.enabled).map(F=>F.id.toLowerCase());Array.isArray(T)&&T.forEach(F=>{R.indexOf(F)===-1&&this.storageService.remove(`experiments.${F}`,0)}),R.length?this.storageService.store("allExperiments",JSON.stringify(R),0,1):this.storageService.remove("allExperiments",0);const O=new Set(y.map(F=>F.condition?.activationEvent?.event).filter(v.isDefined).flatMap(F=>typeof F=="string"?[F]:[]));O.size&&this._register(this.extensionService.onWillActivateByEvent(F=>{O.has(F.event)&&this.recordActivatedEvent(F.event)}));const x=y.map(F=>this.evaluateExperiment(F));return Promise.all(x).then(()=>{this.telemetryService.publicLog2("experiments",{experiments:this._experiments.map(F=>F.id)})})})}evaluateExperiment(y){const T={id:y.id,raw:y,enabled:!!y.enabled,state:y.enabled?0:1},R=y.action2||y.action;if(R&&(T.action={type:h[R.type]||h.Custom,properties:R.properties},T.action.type===h.Prompt&&(T.action.properties.commands||[]).forEach(F=>{F.curatedExtensionsKey&&Array.isArray(F.curatedExtensionsList)&&(this._curatedMapping[y.id]=F)}),T.action.properties||(T.action.properties={})),this._experiments=this._experiments.filter(F=>F.id!==T.id),this._experiments.push(T),!T.enabled)return Promise.resolve(null);const O="experiments."+y.id,x=b(this.storageService.get(O,0),{});return x.hasOwnProperty("enabled")||(x.enabled=T.enabled),x.hasOwnProperty("state")?T.state=x.state:x.state=T.enabled?0:1,this.shouldRunExperiment(y,T).then(F=>(x.state=T.state=F,this.storageService.store(O,JSON.stringify(x),0,1),F===2&&this.fireRunExperiment(T),Promise.resolve(null)))}fireRunExperiment(y){this._onExperimentEnabled.fire(y);const T=b(this.storageService.get("currentOrPreviouslyRunExperiments",0),[]);T.indexOf(y.id)===-1&&T.push(y.id);const R=(0,t.distinct)(T);T.length!==R.length&&this.storageService.store("currentOrPreviouslyRunExperiments",JSON.stringify(R),0,1)}checkExperimentDependencies(y){const T=y.condition?.experimentsPreviouslyRun;if(T){const R=b(this.storageService.get("currentOrPreviouslyRunExperiments",0),[]);let O=!0,x=!0;const F=T.includes;Array.isArray(F)&&(O=R.some(M=>F.indexOf(M)>-1));const L=T.excludes;if(O&&Array.isArray(L)&&(x=!R.some(M=>L.indexOf(M)>-1)),!O||!x)return!1}return!0}recordActivatedEvent(y){const T=g(y),R=(0,e.getCurrentActivationRecord)(b(this.storageService.get(T,0),void 0));R.count[0]++,this.storageService.store(T,JSON.stringify(R),0,1),this._experiments.filter(O=>{const x=O.raw?.condition?.activationEvent?.event;return O.state!==0||!x?!1:typeof x=="string"?x===y:x?.includes(y)}).forEach(O=>this.evaluateExperiment(O.raw))}checkActivationEventFrequency(y){const T=y.condition?.activationEvent;if(!T)return!0;let R=0,O=0;const x=typeof T.event=="string"?[T.event]:T.event;for(const F of x){const{count:L}=(0,e.getCurrentActivationRecord)(b(this.storageService.get(g(F),0),void 0));for(const M of L)M>0&&(O++,R+=M)}return R>=T.minEvents&&(!T.uniqueDays||O>=T.uniqueDays)}shouldRunExperiment(y,T){if(T.state!==0)return Promise.resolve(T.state);if(!y.enabled)return Promise.resolve(1);const R=y.condition;if(!R)return Promise.resolve(2);if(y.condition?.os&&!y.condition.os.includes(w.OS)||!this.checkExperimentDependencies(y))return Promise.resolve(1);for(const[N,B]of Object.entries(y.condition?.userSetting||{}))if(!(0,I.equals)(this.configurationService.getValue(N),B))return Promise.resolve(1);if(!this.checkActivationEventFrequency(y))return Promise.resolve(0);if(this.productService.quality==="stable"&&R.insidersOnly===!0)return Promise.resolve(1);const O=!this.storageService.get(l.lastSessionDateStorageKey,0);if(R.newUser===!0&&!O||R.newUser===!1&&O)return Promise.resolve(1);if(typeof R.displayLanguage=="string"){let N=R.displayLanguage.toLowerCase(),B=w.language.toLowerCase();if(N!==B){const P=B.indexOf("-"),V=N.indexOf("-");if(P>-1&&(B=B.substr(0,P)),V>-1&&(N=N.substr(0,V)),B!==N)return Promise.resolve(1)}}R.userProbability||(R.userProbability=1);let x=Promise.resolve(!0);const F=R.installedExtensions;F&&(x=this.extensionManagementService.getInstalled(1).then(N=>{let B=!0,P=!0;const V=N.map(z=>`${z.manifest.publisher.toLowerCase()}.${z.manifest.name.toLowerCase()}`);if(Array.isArray(F.includes)&&F.includes.length){const z=F.includes.map(U=>U.toLowerCase());B=V.some(U=>z.indexOf(U)>-1)}if(Array.isArray(F.excludes)&&F.excludes.length){const z=F.excludes.map(U=>U.toLowerCase());P=!V.some(U=>z.indexOf(U)>-1)}return B&&P}));const L="experiments."+y.id,M=b(this.storageService.get(L,0),{});return x.then(N=>{const B=R.fileEdits;if(!N||!B||typeof B.minEditCount!="number")return N&&typeof R.userProbability=="number"&&Math.random()<R.userProbability?2:1;if(M.editCount=M.editCount||0,M.editCount>=B.minEditCount)return 2;const P=this._register(new f.RunOnceWorker(z=>{const U=new Date().toDateString(),H=b(this.storageService.get(L,0),{});if(H.state!==0){V.dispose(),P.dispose();return}z.forEach(async K=>{if(H.state!==0||U===H.lastEditedDate||typeof H.editCount=="number"&&H.editCount>=B.minEditCount)return;let G=!0,q=!0;if(typeof B.filePathPattern=="string"&&(G=(0,k.match)(B.filePathPattern,K.resource.fsPath)),Array.isArray(B.workspaceIncludes)&&B.workspaceIncludes.length){const Z=await this.workspaceTagsService.getTags();q=!!Z&&B.workspaceIncludes.some(j=>!!Z[j])}if(q&&Array.isArray(B.workspaceExcludes)&&B.workspaceExcludes.length){const Z=await this.workspaceTagsService.getTags();q=!!Z&&!B.workspaceExcludes.some(j=>!!Z[j])}G&&q&&(H.editCount=(H.editCount||0)+1,H.lastEditedDate=U,this.storageService.store(L,JSON.stringify(H),0,1))}),typeof H.editCount=="number"&&H.editCount>=B.minEditCount&&(T.state=H.state=typeof R.userProbability=="number"&&Math.random()<R.userProbability&&this.checkExperimentDependencies(y)?2:1,this.storageService.store(L,JSON.stringify(H),0,1),H.state===2&&T.action&&h[T.action.type]===h.Prompt&&this.fireRunExperiment(T))},250)),V=this._register(this.textFileService.files.onDidSave(z=>P.work(z.model)));return 0})}};m=Ee([W(0,s.IStorageService),W(1,o.IExtensionManagementService),W(2,a.ITextFileService),W(3,l.ITelemetryService),W(4,u.ILifecycleService),W(5,S.IRequestService),W(6,C.IConfigurationService),W(7,i.IProductService),W(8,r.IWorkspaceTagsService),W(9,p.IExtensionService)],m),e.ExperimentService=m;function b(E,y){try{return E&&JSON.parse(E)||y}catch{return y}}}),define(ne[2596],re([1,0,26,504,119,2,14,41,9,28,88]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExperimentalPrompts=void 0;let C=class qr extends A.Disposable{constructor(c,i,S,s,l){super();this.experimentService=c,this.paneCompositeService=i,this.notificationService=S,this.openerService=s,this.commandService=l,this._register(this.experimentService.onExperimentEnabled(r=>{r.action&&r.action.type===f.ExperimentActionType.Prompt&&r.state===2&&this.showExperimentalPrompts(r)},this))}showExperimentalPrompts(c){if(!c||!c.enabled||!c.action||c.state!==2)return;const i=c.action.properties,S=qr.getLocalizedText(i.promptText,k.language||"");if(!i||!S)return;i.commands||(i.commands=[]);const s=i.commands.map(l=>({label:qr.getLocalizedText(l.text,k.language||""),run:()=>{l.externalLink?this.openerService.open(I.URI.parse(l.externalLink)):l.curatedExtensionsKey&&Array.isArray(l.curatedExtensionsList)?this.paneCompositeService.openPaneComposite(_.VIEWLET_ID,0,!0).then(p=>p?.getViewPaneContainer()).then(p=>{p&&p.search("curated:"+l.curatedExtensionsKey)}):l.codeCommand&&this.commandService.executeCommand(l.codeCommand.id,...l.codeCommand.arguments),this.experimentService.markAsCompleted(c.id)}}));this.notificationService.prompt(t.Severity.Info,S,s,{onCancel:()=>{this.experimentService.markAsCompleted(c.id)}})}static getLocalizedText(c,i){if(typeof c=="string")return c;const S=c.en||c["en-us"];return i=i.toLowerCase(),!c[i]&&i.indexOf("-")===2&&(i=i.substr(0,2)),c[i]||S}};C=Ee([W(0,f.IExperimentService),W(1,v.IPaneCompositePartService),W(2,t.INotificationService),W(3,D.IOpenerService),W(4,w.ICommandService)],C),e.ExperimentalPrompts=C}),define(ne[2597],re([1,0,1535,35,504,17,47,2596,57,248]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,f.registerSingleton)(_.IExperimentService,_.ExperimentService,!0),A.Registry.as(k.Extensions.Workbench).registerWorkbenchContribution(D.ExperimentalPrompts,4),A.Registry.as(I.Extensions.Configuration).registerConfiguration({...w.workbenchConfigurationNodeBase,properties:{"workbench.enableExperiments":{type:"boolean",description:(0,t.localize)(0,null),default:!0,scope:1,restricted:!0,tags:["usesOnlineServices"]}}})}),define(ne[2598],re([1,0,15,266,504,13,79]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExperimentalRecommendations=void 0;let D=class extends f.ExtensionRecommendations{constructor(w){super();this.experimentService=w,this._recommendations=[]}get recommendations(){return this._recommendations}async doActivate(){const w=await this.experimentService.getExperimentsByType(_.ExperimentActionType.AddToRecommendations);for(const{action:v,state:C}of w)if(C===2&&(0,t.isNonEmptyArray)(v?.properties?.recommendations)&&v?.properties?.recommendationReason)for(const o of v.properties.recommendations)try{(0,A.isString)(o)&&k.EXTENSION_IDENTIFIER_REGEX.test(o)&&this._recommendations.push({extensionId:o.toLowerCase(),reason:{reasonId:5,reasonText:v.properties.recommendationReason}})}catch{}}};D=Ee([W(0,_.IExperimentService)],D),e.ExperimentalRecommendations=D}),define(ne[2599],re([1,0,2,79,254,5,27,15,6,85,76,2207,2145,2598,2304,2485,2147,2148,2144,399,11,9,2301,119,100]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionRecommendationsService=void 0;let d=class extends t.Disposable{constructor(b,E,y,T,R,O,x,F,L){super();if(this.lifecycleService=E,this.galleryService=y,this.telemetryService=T,this.environmentService=R,this.extensionManagementService=O,this.extensionRecommendationsManagementService=x,this.extensionRecommendationNotificationService=F,this.extensionsWorkbenchService=L,this._onDidChangeRecommendations=this._register(new I.Emitter),this.onDidChangeRecommendations=this._onDidChangeRecommendations.event,this.workspaceRecommendations=b.createInstance(i.WorkspaceRecommendations),this.fileBasedRecommendations=b.createInstance(S.FileBasedRecommendations),this.experimentalRecommendations=b.createInstance(c.ExperimentalRecommendations),this.configBasedRecommendations=b.createInstance(r.ConfigBasedRecommendations),this.exeBasedRecommendations=b.createInstance(o.ExeBasedRecommendations),this.dynamicWorkspaceRecommendations=b.createInstance(C.DynamicWorkspaceRecommendations),this.keymapRecommendations=b.createInstance(s.KeymapRecommendations),this.webRecommendations=b.createInstance(n.WebRecommendations),this.languageRecommendations=b.createInstance(l.LanguageRecommendations),!this.isEnabled()){this.sessionSeed=0,this.activationPromise=Promise.resolve();return}this.sessionSeed=+new Date,this.activationPromise=this.activate(),this._register(this.extensionManagementService.onDidInstallExtensions(M=>this.onDidInstallExtensions(M)))}async activate(){await this.lifecycleService.when(3),await Promise.all([this.workspaceRecommendations.activate(),this.configBasedRecommendations.activate(),this.fileBasedRecommendations.activate(),this.experimentalRecommendations.activate(),this.keymapRecommendations.activate(),this.languageRecommendations.activate(),this.webRecommendations.activate()]),this._register(I.Event.any(this.workspaceRecommendations.onDidChangeRecommendations,this.configBasedRecommendations.onDidChangeRecommendations,this.extensionRecommendationsManagementService.onDidChangeIgnoredRecommendations)(()=>this._onDidChangeRecommendations.fire())),this._register(this.extensionRecommendationsManagementService.onDidChangeGlobalIgnoredRecommendation(({extensionId:b,isRecommended:E})=>{if(!E){const y=this.getAllRecommendationsWithReason()[b];y&&y.reasonId&&this.telemetryService.publicLog2("extensionsRecommendations:ignoreRecommendation",{extensionId:b,recommendationReason:y.reasonId})}})),this.promptWorkspaceRecommendations()}isEnabled(){return this.galleryService.isEnabled()&&!this.environmentService.isExtensionDevelopment}async activateProactiveRecommendations(){await Promise.all([this.dynamicWorkspaceRecommendations.activate(),this.exeBasedRecommendations.activate(),this.configBasedRecommendations.activate()])}getAllRecommendationsWithReason(){this.activateProactiveRecommendations();const b=Object.create(null),E=[...this.dynamicWorkspaceRecommendations.recommendations,...this.configBasedRecommendations.recommendations,...this.exeBasedRecommendations.recommendations,...this.experimentalRecommendations.recommendations,...this.fileBasedRecommendations.recommendations,...this.workspaceRecommendations.recommendations,...this.keymapRecommendations.recommendations,...this.languageRecommendations.recommendations,...this.webRecommendations.recommendations];for(const{extensionId:y,reason:T}of E)this.isExtensionAllowedToBeRecommended(y)&&(b[y.toLowerCase()]=T);return b}async getConfigBasedRecommendations(){return await this.configBasedRecommendations.activate(),{important:this.toExtensionRecommendations(this.configBasedRecommendations.importantRecommendations),others:this.toExtensionRecommendations(this.configBasedRecommendations.otherRecommendations)}}async getOtherRecommendations(){await this.activationPromise,await this.activateProactiveRecommendations();const b=[...this.configBasedRecommendations.otherRecommendations,...this.exeBasedRecommendations.otherRecommendations,...this.dynamicWorkspaceRecommendations.recommendations,...this.experimentalRecommendations.recommendations,...this.webRecommendations.recommendations],E=(0,D.distinct)(b.map(y=>y.extensionId)).filter(y=>this.isExtensionAllowedToBeRecommended(y));return(0,D.shuffle)(E,this.sessionSeed),E}async getImportantRecommendations(){await this.activateProactiveRecommendations();const b=[...this.fileBasedRecommendations.importantRecommendations,...this.configBasedRecommendations.importantRecommendations,...this.exeBasedRecommendations.importantRecommendations],E=(0,D.distinct)(b.map(y=>y.extensionId)).filter(y=>this.isExtensionAllowedToBeRecommended(y));return(0,D.shuffle)(E,this.sessionSeed),E}getKeymapRecommendations(){return this.toExtensionRecommendations(this.keymapRecommendations.recommendations)}getLanguageRecommendations(){return this.toExtensionRecommendations(this.languageRecommendations.recommendations)}async getWorkspaceRecommendations(){return this.isEnabled()?(await this.workspaceRecommendations.activate(),this.toExtensionRecommendations(this.workspaceRecommendations.recommendations)):[]}async getExeBasedRecommendations(b){await this.exeBasedRecommendations.activate();const{important:E,others:y}=b?this.exeBasedRecommendations.getRecommendations(b):{important:this.exeBasedRecommendations.importantRecommendations,others:this.exeBasedRecommendations.otherRecommendations};return{important:this.toExtensionRecommendations(E),others:this.toExtensionRecommendations(y)}}getFileBasedRecommendations(){return this.toExtensionRecommendations(this.fileBasedRecommendations.recommendations)}onDidInstallExtensions(b){for(const E of b)if(E.source&&!a.URI.isUri(E.source)&&E.operation===2){const T=(this.getAllRecommendationsWithReason()||{})[E.source.identifier.id.toLowerCase()];T&&this.telemetryService.publicLog("extensionGallery:install:recommendations",{...E.source.telemetryData,recommendationReason:T.reasonId})}}toExtensionRecommendations(b){return(0,D.distinct)(b.map(y=>y.extensionId)).filter(y=>this.isExtensionAllowedToBeRecommended(y))}isExtensionAllowedToBeRecommended(b){return!this.extensionRecommendationsManagementService.ignoredRecommendations.includes(b.toLowerCase())}get workbenchRecommendationDelay(){return 5e3}async promptWorkspaceRecommendations(){const b=await this.extensionsWorkbenchService.queryLocal(),E=[...this.workspaceRecommendations.recommendations,...this.configBasedRecommendations.importantRecommendations.filter(y=>!y.whenNotInstalled||y.whenNotInstalled.every(T=>b.every(R=>!(0,g.areSameExtensions)(R.identifier,{id:T}))))].map(({extensionId:y})=>y).filter(y=>this.isExtensionAllowedToBeRecommended(y));E.length&&(await(0,u.timeout)(this.workbenchRecommendationDelay),await this.extensionRecommendationNotificationService.promptWorkspaceRecommendations(E))}};d=Ee([W(0,A.IInstantiationService),W(1,v.ILifecycleService),W(2,f.IExtensionGalleryService),W(3,k.ITelemetryService),W(4,w.IEnvironmentService),W(5,f.IExtensionManagementService),W(6,_.IExtensionIgnoredRecommendationsService),W(7,p.IExtensionRecommendationNotificationService),W(8,h.IExtensionsWorkbenchService)],d),e.ExtensionRecommendationsService=d}),define(ne[148],re([1,0,44,23,7,2,52,42,83,141,150,1592]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenEditor=e.TextFileContentProvider=e.LexicographicOptions=e.UndoConfirmLevel=e.SortOrder=e.BINARY_TEXT_FILE_MODE=e.BINARY_FILE_EDITOR_ID=e.FILE_EDITOR_INPUT_ID=e.TEXT_FILE_EDITOR_ID=e.ExplorerFocusCondition=e.FilesExplorerFocusCondition=e.ExplorerCompressedLastFocusContext=e.ExplorerCompressedFirstFocusContext=e.ExplorerCompressedFocusContext=e.ExplorerFocusedContext=e.OpenEditorsFocusedContext=e.OpenEditorsVisibleContext=e.FilesExplorerFocusedContext=e.ExplorerResourceMoveableToTrash=e.ExplorerResourceCut=e.ExplorerRootContext=e.ExplorerResourceAvailableEditorIdsContext=e.ExplorerResourceNotReadonlyContext=e.ExplorerResourceReadonlyContext=e.ExplorerFolderContext=e.ExplorerViewletVisibleContext=e.VIEW_ID=e.VIEWLET_ID=void 0,e.VIEWLET_ID="workbench.view.explorer",e.VIEW_ID="workbench.explorer.fileView",e.ExplorerViewletVisibleContext=new _.RawContextKey("explorerViewletVisible",!0,{type:"boolean",description:(0,C.localize)(0,null)}),e.ExplorerFolderContext=new _.RawContextKey("explorerResourceIsFolder",!1,{type:"boolean",description:(0,C.localize)(1,null)}),e.ExplorerResourceReadonlyContext=new _.RawContextKey("explorerResourceReadonly",!1,{type:"boolean",description:(0,C.localize)(2,null)}),e.ExplorerResourceNotReadonlyContext=e.ExplorerResourceReadonlyContext.toNegated(),e.ExplorerResourceAvailableEditorIdsContext=new _.RawContextKey("explorerResourceAvailableEditorIds",""),e.ExplorerRootContext=new _.RawContextKey("explorerResourceIsRoot",!1,{type:"boolean",description:(0,C.localize)(3,null)}),e.ExplorerResourceCut=new _.RawContextKey("explorerResourceCut",!1,{type:"boolean",description:(0,C.localize)(4,null)}),e.ExplorerResourceMoveableToTrash=new _.RawContextKey("explorerResourceMoveableToTrash",!1,{type:"boolean",description:(0,C.localize)(5,null)}),e.FilesExplorerFocusedContext=new _.RawContextKey("filesExplorerFocus",!0,{type:"boolean",description:(0,C.localize)(6,null)}),e.OpenEditorsVisibleContext=new _.RawContextKey("openEditorsVisible",!1,{type:"boolean",description:(0,C.localize)(7,null)}),e.OpenEditorsFocusedContext=new _.RawContextKey("openEditorsFocus",!0,{type:"boolean",description:(0,C.localize)(8,null)}),e.ExplorerFocusedContext=new _.RawContextKey("explorerViewletFocus",!0,{type:"boolean",description:(0,C.localize)(9,null)}),e.ExplorerCompressedFocusContext=new _.RawContextKey("explorerViewletCompressedFocus",!0,{type:"boolean",description:(0,C.localize)(10,null)}),e.ExplorerCompressedFirstFocusContext=new _.RawContextKey("explorerViewletCompressedFirstFocus",!0,{type:"boolean",description:(0,C.localize)(11,null)}),e.ExplorerCompressedLastFocusContext=new _.RawContextKey("explorerViewletCompressedLastFocus",!0,{type:"boolean",description:(0,C.localize)(12,null)}),e.FilesExplorerFocusCondition=_.ContextKeyExpr.and(e.ExplorerViewletVisibleContext,e.FilesExplorerFocusedContext,_.ContextKeyExpr.not(w.InputFocusedContextKey)),e.ExplorerFocusCondition=_.ContextKeyExpr.and(e.ExplorerViewletVisibleContext,e.ExplorerFocusedContext,_.ContextKeyExpr.not(w.InputFocusedContextKey)),e.TEXT_FILE_EDITOR_ID="workbench.editors.files.textFileEditor",e.FILE_EDITOR_INPUT_ID="workbench.editors.files.fileEditorInput",e.BINARY_FILE_EDITOR_ID="workbench.editors.files.binaryFileEditor",e.BINARY_TEXT_FILE_MODE="code-text-binary";var o;(function(l){l.Default="default",l.Mixed="mixed",l.FilesFirst="filesFirst",l.Type="type",l.Modified="modified",l.FoldersNestsFiles="foldersNestsFiles"})(o=e.SortOrder||(e.SortOrder={}));var c;(function(l){l.Verbose="verbose",l.Default="default",l.Light="light"})(c=e.UndoConfirmLevel||(e.UndoConfirmLevel={}));var i;(function(l){l.Default="default",l.Upper="upper",l.Lower="lower",l.Unicode="unicode"})(i=e.LexicographicOptions||(e.LexicographicOptions={}));let S=class Jn extends A.Disposable{constructor(r,p,u,a){super();this.textFileService=r,this.fileService=p,this.languageService=u,this.modelService=a,this.fileWatcherDisposable=this._register(new A.MutableDisposable)}static async open(r,p,u,a,n){await a.openEditor({original:{resource:Jn.resourceToTextFile(p,r)},modified:{resource:r},label:u,options:n})}static resourceToTextFile(r,p){return p.with({scheme:r,query:JSON.stringify({scheme:p.scheme,query:p.query})})}static textFileToResource(r){const{scheme:p,query:u}=JSON.parse(r.query);return r.with({scheme:p,query:u})}async provideTextContent(r){if(!r.query)return null;const p=Jn.textFileToResource(r),u=await this.resolveEditorModel(r);return this.fileWatcherDisposable.value||(this.fileWatcherDisposable.value=this.fileService.onDidFilesChange(a=>{a.contains(p,0)&&this.resolveEditorModel(r,!1)}),u&&(0,v.once)(u.onWillDispose)(()=>this.fileWatcherDisposable.clear())),u}async resolveEditorModel(r,p=!0){const u=Jn.textFileToResource(r),a=await this.textFileService.readStream(u);let n=this.modelService.getModel(r);if(n)this.modelService.updateModel(n,a.value);else if(p){const h=this.modelService.getModel(u);let g;h?g=this.languageService.createById(h.getLanguageId()):g=this.languageService.createByFilepathOrFirstLine(u),n=this.modelService.createModel(a.value,g,r)}return n}};S=Ee([W(0,I.ITextFileService),W(1,f.IFileService),W(2,D.ILanguageService),W(3,k.IModelService)],S),e.TextFileContentProvider=S;class s{constructor(r,p){this._editor=r,this._group=p,this.id=s.COUNTER++}get editor(){return this._editor}get group(){return this._group}get groupId(){return this._group.id}getId(){return`openeditor:${this.groupId}:${this.id}`}isPreview(){return!this._group.isPinned(this.editor)}isSticky(){return this._group.isSticky(this.editor)}getResource(){return t.EditorResourceAccessor.getOriginalUri(this.editor,{supportSideBySide:t.SideBySideEditor.PRIMARY})}}e.OpenEditor=s,s.COUNTER=0}),define(ne[2600],re([1,0,112,36,15,11,30,130,22,6,2,51,81,89,106,1506,28,8,7,397,54,23,5,26,53,56,34,114,43,2419,275,2583,2137,2590,2208,90,2139,179,2588,2140,231,2142,412,148,217,21,40,80,76,88]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H,K,G,q,Z,j,X){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getStackFrameThreadAndSessionToFocus=e.DebugService=void 0;let Y=class{constructor(te,se,ie,ce,le,ae,ue,oe,fe,pe,me,be,Ce,ve,he,ge,de,Se,we,ye){this.editorService=te,this.paneCompositeService=se,this.viewsService=ie,this.viewDescriptorService=ce,this.notificationService=le,this.dialogService=ae,this.layoutService=ue,this.contextService=oe,this.contextKeyService=fe,this.lifecycleService=pe,this.instantiationService=me,this.extensionService=be,this.fileService=Ce,this.configurationService=ve,this.extensionHostDebugService=he,this.activityService=ge,this.commandService=de,this.quickInputService=Se,this.workspaceTrustRequestService=we,this.uriIdentityService=ye,this.disposables=new v.DisposableStore,this.initializing=!1,this.sessionCancellationTokens=new Map,this.breakpointsToSendOnResourceSaved=new Set,this._onDidChangeState=new w.Emitter,this._onDidNewSession=new w.Emitter,this._onWillNewSession=new w.Emitter,this._onDidEndSession=new w.Emitter,this.adapterManager=this.instantiationService.createInstance(y.AdapterManager),this.disposables.add(this.adapterManager),this.configurationManager=this.instantiationService.createInstance(R.ConfigurationManager,this.adapterManager),this.disposables.add(this.configurationManager),this.debugStorage=this.instantiationService.createInstance(B.DebugStorage),fe.bufferChangeEvents(()=>{this.debugType=L.CONTEXT_DEBUG_TYPE.bindTo(fe),this.debugState=L.CONTEXT_DEBUG_STATE.bindTo(fe),this.inDebugMode=L.CONTEXT_IN_DEBUG_MODE.bindTo(fe),this.debugUx=L.CONTEXT_DEBUG_UX.bindTo(fe),this.debugUx.set(this.debugStorage.loadDebugUxState()),this.breakpointsExist=L.CONTEXT_BREAKPOINTS_EXIST.bindTo(fe),this.disassemblyViewFocus=L.CONTEXT_DISASSEMBLY_VIEW_FOCUS.bindTo(fe)}),this.chosenEnvironments=this.debugStorage.loadChosenEnvironments(),this.model=this.instantiationService.createInstance(N.DebugModel,this.debugStorage),this.telemetry=this.instantiationService.createInstance(P.DebugTelemetry,this.model);const ke=()=>this.breakpointsExist.set(!!(this.model.getBreakpoints().length||this.model.getDataBreakpoints().length||this.model.getFunctionBreakpoints().length));ke(),this.viewModel=new z.ViewModel(fe),this.taskRunner=this.instantiationService.createInstance(F.DebugTaskRunner),this.disposables.add(this.fileService.registerProvider(L.DEBUG_MEMORY_SCHEME,new O.DebugMemoryFileSystemProvider(this))),this.disposables.add(this.fileService.onDidFilesChange(Ie=>this.onFileChanges(Ie))),this.disposables.add(this.lifecycleService.onWillShutdown(this.dispose,this)),this.disposables.add(this.extensionHostDebugService.onAttachSession(Ie=>{const Te=this.model.getSession(Ie.sessionId,!0);Te&&(Te.configuration.request="attach",Te.configuration.port=Ie.port,Te.setSubId(Ie.subId),this.launchOrAttachToSession(Te))})),this.disposables.add(this.extensionHostDebugService.onTerminateSession(Ie=>{const Te=this.model.getSession(Ie.sessionId);Te&&Te.subId===Ie.subId&&Te.disconnect()})),this.disposables.add(this.viewModel.onDidFocusStackFrame(()=>{this.onStateChange()})),this.disposables.add(this.viewModel.onDidFocusSession(()=>{this.onStateChange()})),this.disposables.add(w.Event.any(this.adapterManager.onDidRegisterDebugger,this.configurationManager.onDidSelectConfiguration)(()=>{const Ie=this.state!==0||this.configurationManager.getAllConfigurations().length>0&&this.adapterManager.hasEnabledDebuggers()?"default":"simple";this.debugUx.set(Ie),this.debugStorage.storeDebugUxState(Ie)})),this.disposables.add(this.model.onDidChangeCallStack(()=>{const Ie=this.model.getSessions().filter(Te=>!Te.parentSession).length;if(this.activity&&this.activity.dispose(),Ie>0){const Te=this.viewDescriptorService.getViewContainerByViewId(L.CALLSTACK_VIEW_ID);Te&&(this.activity=this.activityService.showViewContainerActivity(Te.id,{badge:new K.NumberBadge(Ie,De=>De===1?S.localize(0,null):S.localize(1,null,De))}))}})),this.disposables.add(this.model.onDidChangeBreakpoints(()=>ke())),this.disposables.add(te.onDidActiveEditorChange(()=>{this.contextKeyService.bufferChangeEvents(()=>{te.activeEditor===U.DisassemblyViewInput.instance?this.disassemblyViewFocus.set(!0):this.disassemblyViewFocus.reset()})})),this.disposables.add(this.lifecycleService.onBeforeShutdown(()=>{for(const Ie of te.editors)Ie.resource?.scheme===L.DEBUG_MEMORY_SCHEME&&Ie.dispose()}))}getModel(){return this.model}getViewModel(){return this.viewModel}getConfigurationManager(){return this.configurationManager}getAdapterManager(){return this.adapterManager}sourceIsNotAvailable(te){this.model.sourceIsNotAvailable(te)}dispose(){this.disposables.dispose()}get state(){const te=this.viewModel.focusedSession;return te?te.state:this.initializing?1:0}get initializingOptions(){return this._initializingOptions}startInitializingState(te){this.initializing||(this.initializing=!0,this._initializingOptions=te,this.onStateChange())}endInitializingState(){this.initializing&&(this.initializing=!1,this._initializingOptions=void 0,this.onStateChange())}cancelTokens(te){if(te){const se=this.sessionCancellationTokens.get(te);se&&(se.cancel(),this.sessionCancellationTokens.delete(te))}else this.sessionCancellationTokens.forEach(se=>se.cancel()),this.sessionCancellationTokens.clear()}onStateChange(){const te=this.state;this.previousState!==te&&(this.contextKeyService.bufferChangeEvents(()=>{this.debugState.set((0,L.getStateLabel)(te)),this.inDebugMode.set(te!==0);const se=te!==0&&te!==1||this.adapterManager.hasEnabledDebuggers()&&this.configurationManager.selectedConfiguration.name?"default":"simple";this.debugUx.set(se),this.debugStorage.storeDebugUxState(se)}),this.previousState=te,this._onDidChangeState.fire(te))}get onDidChangeState(){return this._onDidChangeState.event}get onDidNewSession(){return this._onDidNewSession.event}get onWillNewSession(){return this._onWillNewSession.event}get onDidEndSession(){return this._onDidEndSession.event}async startDebugging(te,se,ie,ce=!ie?.parentSession){const le=ie&&ie.noDebug?S.localize(2,null):S.localize(3,null);if(!await this.workspaceTrustRequestService.requestWorkspaceTrust({message:le}))return!1;this.startInitializingState(ie);try{await this.extensionService.activateByEvent("onDebug"),ce&&await(0,V.saveAllBeforeDebugStart)(this.configurationService,this.editorService),await this.extensionService.whenInstalledExtensionsRegistered();let ue,oe;if(se||(se=this.configurationManager.selectedConfiguration.name),typeof se=="string"&&te?(ue=te.getConfiguration(se),oe=te.getCompound(se)):typeof se!="string"&&(ue=se),oe){if(!oe.configurations)throw new Error(S.localize(4,null));if(oe.preLaunchTask&&await this.taskRunner.runTaskAndCheckErrors(te?.workspace||this.contextService.getWorkspace(),oe.preLaunchTask)===0)return this.endInitializingState(),!1;oe.stopAll&&(ie={...ie,compoundRoot:new M.DebugCompoundRoot});const me=(await Promise.all(oe.configurations.map(be=>{const Ce=typeof be=="string"?be:be.name;if(Ce===oe.name)return Promise.resolve(!1);let ve;if(typeof be=="string"){const he=this.configurationManager.getLaunches().filter(ge=>!!ge.getConfiguration(Ce));if(he.length===1)ve=he[0];else if(te&&he.length>1&&he.indexOf(te)>=0)ve=te;else throw new Error(he.length===0?S.localize(5,null,Ce):S.localize(6,null,Ce))}else if(be.folder){const he=this.configurationManager.getLaunches().filter(ge=>ge.workspace&&ge.workspace.name===be.folder&&!!ge.getConfiguration(be.name));if(he.length===1)ve=he[0];else throw new Error(S.localize(7,null,be.folder,be.name,oe.name))}return this.createSession(ve,ve.getConfiguration(Ce),ie)}))).every(be=>!!be);return this.endInitializingState(),me}if(se&&!ue){const pe=te?S.localize(8,null,typeof se=="string"?se:se.name):S.localize(9,null);throw new Error(pe)}const fe=await this.createSession(te,ue,ie);return this.endInitializingState(),fe}catch(ue){return this.notificationService.error(ue),this.endInitializingState(),Promise.reject(ue)}}async createSession(te,se,ie){let ce;se?ce=se.type:se=Object.create(null),(ie&&ie.noDebug||ie&&typeof ie.noDebug=="undefined"&&ie.parentSession&&ie.parentSession.configuration.noDebug)&&(se.noDebug=!0);const le=(0,C.deepClone)(se);let ae,ue;ce||(ue=this.editorService.activeEditor,ue&&ue.resource&&(ce=this.chosenEnvironments[ue.resource.toString()]),ce||(ae=await this.adapterManager.guessDebugger(!1),ae&&(ce=ae.type)));const oe=new k.CancellationTokenSource,fe=(0,c.generateUuid)();this.sessionCancellationTokens.set(fe,oe);const pe=await this.configurationManager.resolveConfigurationByProviders(te&&te.workspace?te.workspace.uri:void 0,ce,se,oe.token);if(pe&&pe.type)try{let me=await this.substituteVariables(te,pe);if(!me||oe.token.isCancellationRequested)return!1;const be=te?.workspace||this.contextService.getWorkspace();if(await this.taskRunner.runTaskAndCheckErrors(be,me.preLaunchTask)===0)return!1;const ve=await this.configurationManager.resolveDebugConfigurationWithSubstitutedVariables(te&&te.workspace?te.workspace.uri:void 0,ce,me,oe.token);if(!ve)return te&&ce&&ve===null&&!oe.token.isCancellationRequested&&await te.openConfigFile(!0,ce,oe.token),!1;me=ve;const he=this.adapterManager.getDebugger(me.type);if(!he||pe.request!=="attach"&&pe.request!=="launch"){let de;pe.request!=="attach"&&pe.request!=="launch"?de=pe.request?S.localize(10,null,"request",pe.request):S.localize(11,null,"request"):de=me.type?S.localize(12,null,me.type):S.localize(13,null);const Se=[];return Se.push(new f.Action("installAdditionalDebuggers",S.localize(14,null,me.type),void 0,!0,async()=>this.commandService.executeCommand("debug.installAdditionalDebuggers",me?.type))),await this.showError(de,Se),!1}if(!he.enabled)return await this.showError((0,L.debuggerDisabledMessage)(he.type),[]),!1;const ge=await this.doCreateSession(fe,te?.workspace,{resolved:me,unresolved:le},ie);return ge&&ae&&ue&&ue.resource&&(this.chosenEnvironments[ue.resource.toString()]=ae.type,this.debugStorage.storeChosenEnvironments(this.chosenEnvironments)),ge}catch(me){return me&&me.message?await this.showError(me.message):this.contextService.getWorkbenchState()===1&&await this.showError(S.localize(15,null)),te&&!oe.token.isCancellationRequested&&await te.openConfigFile(!0,void 0,oe.token),!1}return te&&ce&&pe===null&&!oe.token.isCancellationRequested&&await te.openConfigFile(!0,ce,oe.token),!1}async doCreateSession(te,se,ie,ce){const le=this.instantiationService.createInstance(x.DebugSession,te,ie,se,this.model,ce);if(ce?.startedByUser&&this.model.getSessions().some(ue=>ue.getLabel()===le.getLabel())&&!(await this.dialogService.confirm({message:S.localize(16,null,le.getLabel())})).confirmed)return!1;this.model.addSession(le),this.registerSessionListeners(le),this._onWillNewSession.fire(le);const ae=this.configurationService.getValue("debug").openDebug;!ie.resolved.noDebug&&(ae==="openOnSessionStart"||ae!=="neverOpen"&&this.viewModel.firstSessionStart)&&!le.isSimpleUI&&await this.paneCompositeService.openPaneComposite(L.VIEWLET_ID,0);try{await this.launchOrAttachToSession(le);const ue=le.configuration.internalConsoleOptions||this.configurationService.getValue("debug").internalConsoleOptions;(ue==="openOnSessionStart"||this.viewModel.firstSessionStart&&ue==="openOnFirstSessionStart")&&this.viewsService.openView(L.REPL_VIEW_ID,!1),this.viewModel.firstSessionStart=!1;const oe=this.configurationService.getValue("debug").showSubSessionsInToolBar,fe=this.model.getSessions();return(oe?fe:fe.filter(me=>!me.parentSession)).length>1&&this.viewModel.setMultiSessionView(!0),this._onDidNewSession.fire(le),!0}catch(ue){if(I.isCancellationError(ue)||(le&&le.getReplElements().length>0&&this.viewsService.openView(L.REPL_VIEW_ID,!1),le.configuration&&le.configuration.request==="attach"&&le.configuration.__autoAttach))return!1;const oe=ue instanceof Error?ue.message:ue;return ue.showUser!==!1&&await this.showError(oe,(0,D.isErrorWithActions)(ue)?ue.actions:[]),!1}}async launchOrAttachToSession(te,se=!1){const ie=this.adapterManager.getDebugger(te.configuration.type);try{await te.initialize(ie),await te.launchOrAttach(te.configuration);const ce=!!te.root&&!!this.configurationService.getValue("launch",{resource:te.root.uri});await this.telemetry.logDebugSessionStart(ie,ce),(se||!this.viewModel.focusedSession||te.parentSession===this.viewModel.focusedSession&&te.compact)&&await this.focusStackFrame(void 0,void 0,te)}catch(ce){return this.viewModel.focusedSession===te&&await this.focusStackFrame(void 0),Promise.reject(ce)}}registerSessionListeners(te){const se=new A.RunOnceScheduler(()=>{te.state===3&&this.viewModel.focusedSession===te&&this.viewModel.setFocus(void 0,this.viewModel.focusedThread,te,!1)},200);this.disposables.add(te.onDidChangeState(()=>{te.state===3&&this.viewModel.focusedSession===te&&se.schedule(),te===this.viewModel.focusedSession&&this.onStateChange()})),this.disposables.add(te.onDidEndAdapter(async ie=>{ie&&(ie.error&&this.notificationService.error(S.localize(17,null,ie.error.message||ie.error.toString())),this.telemetry.logDebugSessionStop(te,ie));const ce=(0,V.getExtensionHostDebugSession)(te);if(ce&&ce.state===3&&ce.configuration.noDebug&&this.extensionHostDebugService.close(ce.getId()),te.configuration.postDebugTask){const ae=te.root??this.contextService.getWorkspace();try{await this.taskRunner.runTask(ae,te.configuration.postDebugTask)}catch(ue){this.notificationService.error(ue)}}this.endInitializingState(),this.cancelTokens(te.getId()),this._onDidEndSession.fire(te);const le=this.viewModel.focusedSession;if(le&&le.getId()===te.getId()){const{session:ae,thread:ue,stackFrame:oe}=$(this.model,void 0,void 0,void 0,le);this.viewModel.setFocus(oe,ue,ae,!1)}this.model.getSessions().length===0&&(this.viewModel.setMultiSessionView(!1),this.layoutService.isVisible("workbench.parts.sidebar")&&this.configurationService.getValue("debug").openExplorerOnEnd&&this.paneCompositeService.openPaneComposite(H.VIEWLET_ID,0),this.model.getDataBreakpoints().filter(ue=>!ue.canPersist).forEach(ue=>this.model.removeDataBreakpoints(ue.getId())),this.viewsService.isViewVisible(L.REPL_VIEW_ID)&&this.configurationService.getValue("debug").console.closeOnEnd&&this.viewsService.closeView(L.REPL_VIEW_ID))}))}async restartSession(te,se){await this.editorService.saveAll();const ie=!!se,ce=async()=>{if(ie)return Promise.resolve(1);const me=te.root||this.contextService.getWorkspace();await this.taskRunner.runTask(me,te.configuration.preRestartTask),await this.taskRunner.runTask(me,te.configuration.postDebugTask);const be=await this.taskRunner.runTaskAndCheckErrors(me,te.configuration.preLaunchTask);return be!==1?be:this.taskRunner.runTaskAndCheckErrors(me,te.configuration.postRestartTask)},le=(0,V.getExtensionHostDebugSession)(te);if(le){await ce()===1&&this.extensionHostDebugService.reload(le.getId());return}let ae=!1,ue;const oe=te.root?this.configurationManager.getLaunch(te.root.uri):void 0;oe&&(ue=oe.getConfiguration(te.configuration.name),ue&&!(0,C.equals)(ue,te.unresolvedConfiguration)&&(ue.type=te.configuration.type,ue.noDebug=te.configuration.noDebug,ae=!0));let fe=te.configuration;if(oe&&ae&&ue){const me=new k.CancellationTokenSource;this.sessionCancellationTokens.set(te.getId(),me);const be=await this.configurationManager.resolveConfigurationByProviders(oe.workspace?oe.workspace.uri:void 0,ue.type,ue,me.token);be?(fe=await this.substituteVariables(oe,be),fe&&!me.token.isCancellationRequested&&(fe=await this.configurationManager.resolveDebugConfigurationWithSubstitutedVariables(oe&&oe.workspace?oe.workspace.uri:void 0,ue.type,fe,me.token))):fe=be}if(fe&&te.setConfiguration({resolved:fe,unresolved:ue}),te.configuration.__restart=se,te.capabilities.supportsRestartRequest){await ce()===1&&await te.restart();return}const pe=!!this.viewModel.focusedSession&&te.getId()===this.viewModel.focusedSession.getId();return ie?await te.disconnect(!0):await te.terminate(!0),new Promise((me,be)=>{setTimeout(async()=>{if(await ce()===1){if(!fe)return me(void 0);try{await this.launchOrAttachToSession(te,pe),this._onDidNewSession.fire(te),me(void 0)}catch(ve){be(ve)}}},300)})}async stopSession(te,se=!1){if(te)return se?te.disconnect():te.terminate();const ie=this.model.getSessions();return ie.length===0&&(this.taskRunner.cancel(),await this.quickInputService.cancel(),this.endInitializingState(),this.cancelTokens(void 0)),Promise.all(ie.map(ce=>se?ce.disconnect():ce.terminate()))}async substituteVariables(te,se){const ie=this.adapterManager.getDebugger(se.type);if(ie){let ce;if(te&&te.workspace)ce=te.workspace;else{const le=this.contextService.getWorkspace().folders;le.length===1&&(ce=le[0])}try{return await ie.substituteVariables(ce,se)}catch(le){this.showError(le.message);return}}return Promise.resolve(se)}async showError(te,se=[]){const ie=new f.Action(T.DEBUG_CONFIGURE_COMMAND_ID,T.DEBUG_CONFIGURE_LABEL,void 0,!0,()=>this.commandService.executeCommand(T.DEBUG_CONFIGURE_COMMAND_ID)),ce=se.filter(ae=>ae.id.endsWith(".command")).length>0?se:[...se,ie],{choice:le}=await this.dialogService.show(o.default.Error,te,ce.map(ae=>ae.label).concat(S.localize(18,null)),{cancelId:ce.length});le<ce.length&&await ce[le].run()}async focusStackFrame(te,se,ie,ce){const{stackFrame:le,thread:ae,session:ue}=$(this.model,te,se,ie);if(le){const oe=await le.openInEditor(this.editorService,!0);if(oe&&oe.input!==U.DisassemblyViewInput.instance){const fe=oe.getControl();if(le&&(0,i.isCodeEditor)(fe)&&fe.hasModel()){const pe=fe.getModel(),me=le.range.startLineNumber;if(me>=1&&me<=pe.getLineCount()){const be=fe.getModel().getLineContent(me);t.alert(S.localize(19,null,le.source?le.source.name:"",le.range.startLineNumber,ae&&ae.stoppedDetails?`, reason ${ae.stoppedDetails.reason}`:"",be))}}}}ue?this.debugType.set(ue.configuration.type):this.debugType.reset(),this.viewModel.setFocus(le,ae,ue,!!ce)}addWatchExpression(te){const se=this.model.addWatchExpression(te);te||this.viewModel.setSelectedExpression(se,!1),this.debugStorage.storeWatchExpressions(this.model.getWatchExpressions())}renameWatchExpression(te,se){this.model.renameWatchExpression(te,se),this.debugStorage.storeWatchExpressions(this.model.getWatchExpressions())}moveWatchExpression(te,se){this.model.moveWatchExpression(te,se),this.debugStorage.storeWatchExpressions(this.model.getWatchExpressions())}removeWatchExpressions(te){this.model.removeWatchExpressions(te),this.debugStorage.storeWatchExpressions(this.model.getWatchExpressions())}canSetBreakpointsIn(te){return this.adapterManager.canSetBreakpointsIn(te)}async enableOrDisableBreakpoints(te,se){se?(this.model.setEnablement(se,te),this.debugStorage.storeBreakpoints(this.model),se instanceof N.Breakpoint?await this.sendBreakpoints(se.uri):se instanceof N.FunctionBreakpoint?await this.sendFunctionBreakpoints():se instanceof N.DataBreakpoint?await this.sendDataBreakpoints():se instanceof N.InstructionBreakpoint?await this.sendInstructionBreakpoints():await this.sendExceptionBreakpoints()):(this.model.enableOrDisableAllBreakpoints(te),this.debugStorage.storeBreakpoints(this.model),await this.sendAllBreakpoints()),this.debugStorage.storeBreakpoints(this.model)}async addBreakpoints(te,se,ie=!0){const ce=this.model.addBreakpoints(te,se);return ie&&ce.forEach(le=>t.status(S.localize(20,null,le.lineNumber,te.fsPath))),this.debugStorage.storeBreakpoints(this.model),await this.sendBreakpoints(te),this.debugStorage.storeBreakpoints(this.model),ce}async updateBreakpoints(te,se,ie){this.model.updateBreakpoints(se),this.debugStorage.storeBreakpoints(this.model),ie?this.breakpointsToSendOnResourceSaved.add(te):(await this.sendBreakpoints(te),this.debugStorage.storeBreakpoints(this.model))}async removeBreakpoints(te){const se=this.model.getBreakpoints().filter(ce=>!te||ce.getId()===te);se.forEach(ce=>t.status(S.localize(21,null,ce.lineNumber,ce.uri.fsPath)));const ie=(0,_.distinct)(se,ce=>ce.uri.toString()).map(ce=>ce.uri);this.model.removeBreakpoints(se),this.debugStorage.storeBreakpoints(this.model),await Promise.all(ie.map(ce=>this.sendBreakpoints(ce)))}setBreakpointsActivated(te){return this.model.setBreakpointsActivated(te),this.sendAllBreakpoints()}addFunctionBreakpoint(te,se){this.model.addFunctionBreakpoint(te||"",se)}async updateFunctionBreakpoint(te,se){this.model.updateFunctionBreakpoint(te,se),this.debugStorage.storeBreakpoints(this.model),await this.sendFunctionBreakpoints()}async removeFunctionBreakpoints(te){this.model.removeFunctionBreakpoints(te),this.debugStorage.storeBreakpoints(this.model),await this.sendFunctionBreakpoints()}async addDataBreakpoint(te,se,ie,ce,le){this.model.addDataBreakpoint(te,se,ie,ce,le),this.debugStorage.storeBreakpoints(this.model),await this.sendDataBreakpoints(),this.debugStorage.storeBreakpoints(this.model)}async removeDataBreakpoints(te){this.model.removeDataBreakpoints(te),this.debugStorage.storeBreakpoints(this.model),await this.sendDataBreakpoints()}async addInstructionBreakpoint(te,se,ie,ce){this.model.addInstructionBreakpoint(te,se,ie,ce),this.debugStorage.storeBreakpoints(this.model),await this.sendInstructionBreakpoints(),this.debugStorage.storeBreakpoints(this.model)}async removeInstructionBreakpoints(te){this.model.removeInstructionBreakpoints(te),this.debugStorage.storeBreakpoints(this.model),await this.sendInstructionBreakpoints()}setExceptionBreakpoints(te){this.model.setExceptionBreakpoints(te),this.debugStorage.storeBreakpoints(this.model)}async setExceptionBreakpointCondition(te,se){this.model.setExceptionBreakpointCondition(te,se),this.debugStorage.storeBreakpoints(this.model),await this.sendExceptionBreakpoints()}async sendAllBreakpoints(te){await Promise.all((0,_.distinct)(this.model.getBreakpoints(),se=>se.uri.toString()).map(se=>this.sendBreakpoints(se.uri,!1,te))),await this.sendFunctionBreakpoints(te),await this.sendDataBreakpoints(te),await this.sendInstructionBreakpoints(te),await this.sendExceptionBreakpoints(te)}async sendBreakpoints(te,se=!1,ie){const ce=this.model.getBreakpoints({uri:te,enabledOnly:!0});await J(this.model,ie,async le=>{le.configuration.noDebug||await le.sendBreakpoints(te,ce,se)})}async sendFunctionBreakpoints(te){const se=this.model.getFunctionBreakpoints().filter(ie=>ie.enabled&&this.model.areBreakpointsActivated());await J(this.model,te,async ie=>{ie.capabilities.supportsFunctionBreakpoints&&!ie.configuration.noDebug&&await ie.sendFunctionBreakpoints(se)})}async sendDataBreakpoints(te){const se=this.model.getDataBreakpoints().filter(ie=>ie.enabled&&this.model.areBreakpointsActivated());await J(this.model,te,async ie=>{ie.capabilities.supportsDataBreakpoints&&!ie.configuration.noDebug&&await ie.sendDataBreakpoints(se)})}async sendInstructionBreakpoints(te){const se=this.model.getInstructionBreakpoints().filter(ie=>ie.enabled&&this.model.areBreakpointsActivated());await J(this.model,te,async ie=>{ie.capabilities.supportsInstructionBreakpoints&&!ie.configuration.noDebug&&await ie.sendInstructionBreakpoints(se)})}sendExceptionBreakpoints(te){const se=this.model.getExceptionBreakpoints().filter(ie=>ie.enabled);return J(this.model,te,async ie=>{ie.capabilities.supportsConfigurationDoneRequest&&(!ie.capabilities.exceptionBreakpointFilters||ie.capabilities.exceptionBreakpointFilters.length===0)||ie.configuration.noDebug||await ie.sendExceptionBreakpoints(se)})}onFileChanges(te){const se=this.model.getBreakpoints().filter(ce=>te.contains(ce.uri,2));se.length&&this.model.removeBreakpoints(se);const ie=[];for(const ce of this.breakpointsToSendOnResourceSaved)te.contains(ce,0)&&ie.push(ce);for(const ce of ie)this.breakpointsToSendOnResourceSaved.delete(ce),this.sendBreakpoints(ce,!0)}async runTo(te,se,ie){const ce=this.getViewModel().focusedSession;if(this.state!==2||!ce)return;const le=!!this.getModel().getBreakpoints({column:ie,lineNumber:se,uri:te}).length;let ae,ue=this.getViewModel().focusedThread;if(!le){const fe=await this.addAndValidateBreakpoints(te,se,ie);fe.thread&&(ue=fe.thread),fe.breakpoint&&(ae=fe.breakpoint)}if(!ue)return;const oe=ue.session.onDidChangeState(()=>{const fe=ce.state;(fe===2||fe===0)&&(ae&&this.removeBreakpoints(ae.getId()),oe.dispose())});await ue.continue()}async addAndValidateBreakpoints(te,se,ie){const ce=this.getModel(),le=this.getViewModel(),ue=(await this.addBreakpoints(te,[{lineNumber:se,column:ie}],!1))?.[0];if(!ue)return{breakpoint:void 0,thread:le.focusedThread};if(!ue.verified){let me;await(0,A.raceTimeout)(new Promise(be=>{me=ce.onDidChangeBreakpoints(()=>{ue.verified&&be()})}),2e3),me.dispose()}let oe;(function(me){me[me.Focused=0]="Focused",me[me.Verified=1]="Verified",me[me.VerifiedAndPausedInFile=2]="VerifiedAndPausedInFile",me[me.VerifiedAndFocused=3]="VerifiedAndFocused"})(oe||(oe={}));let fe=le.focusedThread,pe=0;for(const me of ue.sessionsThatVerified){const be=ce.getSession(me);if(!be)continue;const Ce=be.getAllThreads().filter(ve=>ve.stopped);if(pe<3&&le.focusedThread&&Ce.includes(le.focusedThread)&&(fe=le.focusedThread,pe=3),pe<2){const ve=Ce.find(he=>{const ge=he.getTopStackFrame();return ge&&this.uriIdentityService.extUri.isEqual(ge.source.uri,te)});ve&&(fe=ve,pe=2)}pe<1&&(fe=Ce[0],pe=2)}return{thread:fe,breakpoint:ue}}};Y=Ee([W(0,G.IEditorService),W(1,X.IPaneCompositePartService),W(2,E.IViewsService),W(3,E.IViewDescriptorService),W(4,h.INotificationService),W(5,u.IDialogService),W(6,Z.IWorkbenchLayoutService),W(7,m.IWorkspaceContextService),W(8,r.IContextKeyService),W(9,j.ILifecycleService),W(10,n.IInstantiationService),W(11,q.IExtensionService),W(12,a.IFileService),W(13,l.IConfigurationService),W(14,p.IExtensionHostDebugService),W(15,K.IActivityService),W(16,s.ICommandService),W(17,g.IQuickInputService),W(18,b.IWorkspaceTrustRequestService),W(19,d.IUriIdentityService)],Y),e.DebugService=Y;function $(ee,te,se,ie,ce){if(!ie)if(te||se)ie=te?te.thread.session:se.session;else{const le=ee.getSessions();ie=le.find(ue=>ue.state===2)||le.find(ue=>ue!==ce&&ue!==ce?.parentSession)||(le.length?le[0]:void 0)}if(!se)if(te)se=te.thread;else{const le=ie?ie.getAllThreads():void 0;se=le&&le.find(ue=>ue.stopped)||(le&&le.length?le[0]:void 0)}return!te&&se&&(te=se.getTopStackFrame()),{session:ie,thread:se,stackFrame:te}}e.getStackFrameThreadAndSessionToFocus=$;async function J(ee,te,se){te?await se(te):await Promise.all(ee.getSessions().map(ie=>se(ie)))}}),define(ne[432],re([1,0,44,256,566,23,83,5,2,61,148,45,154,21,19,6,18,93,101]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileEditorInput=void 0;var p;(function(a){a[a.None=0]="None",a[a.Text=1]="Text",a[a.Binary=2]="Binary"})(p||(p={}));let u=class ya extends f.AbstractTextResourceEditorInput{constructor(n,h,g,d,m,b,E,y,T,R,O,x,F,L,M){super(n,h,L,T,O,x);this.instantiationService=y,this.textModelResolverService=R,this.filesConfigurationService=F,this.pathService=M,this.forceOpenAs=0,this.model=void 0,this.cachedTextFileModelReference=void 0,this.modelListeners=this._register(new I.DisposableStore),this.model=this.textFileService.files.get(n),g&&this.setPreferredName(g),d&&this.setPreferredDescription(d),m&&this.setPreferredEncoding(m),b&&this.setPreferredLanguageId(b),typeof E=="string"&&this.setPreferredContents(E),this._register(this.textFileService.files.onDidCreate(N=>this.onDidCreateTextFileModel(N))),this.model&&this.registerModelListeners(this.model)}get typeId(){return v.FILE_EDITOR_INPUT_ID}get editorId(){return t.DEFAULT_EDITOR_ASSOCIATION.id}get capabilities(){let n=32;return this.model?this.model.isReadonly()&&(n|=2):this.fileService.hasProvider(this.resource)?this.fileService.hasCapability(this.resource,2048)&&(n|=2):n|=4,n}onDidCreateTextFileModel(n){(0,i.isEqual)(n.resource,this.resource)&&(this.model=n,this.registerModelListeners(n))}registerModelListeners(n){this.modelListeners.clear(),this.modelListeners.add(n.onDidChangeDirty(()=>this._onDidChangeDirty.fire())),this.modelListeners.add(n.onDidChangeReadonly(()=>this._onDidChangeCapabilities.fire())),this.modelListeners.add(n.onDidSaveError(()=>this._onDidChangeDirty.fire())),this.modelListeners.add(S.Event.once(n.onWillDispose)(()=>{this.modelListeners.clear(),this.model=void 0}))}getName(){return this.preferredName||super.getName()}setPreferredName(n){!this.allowLabelOverride()||this.preferredName!==n&&(this.preferredName=n,this._onDidChangeLabel.fire())}allowLabelOverride(){return this.resource.scheme!==this.pathService.defaultUriScheme&&this.resource.scheme!==s.Schemas.vscodeUserData&&this.resource.scheme!==s.Schemas.file&&this.resource.scheme!==s.Schemas.vscodeRemote}getPreferredName(){return this.preferredName}getDescription(n){return this.preferredDescription||super.getDescription(n)}setPreferredDescription(n){!this.allowLabelOverride()||this.preferredDescription!==n&&(this.preferredDescription=n,this._onDidChangeLabel.fire())}getPreferredDescription(){return this.preferredDescription}getEncoding(){return this.model?this.model.getEncoding():this.preferredEncoding}getPreferredEncoding(){return this.preferredEncoding}async setEncoding(n,h){return this.setPreferredEncoding(n),this.model?.setEncoding(n,h)}setPreferredEncoding(n){this.preferredEncoding=n,this.setForceOpenAsText()}getLanguageId(){return this.model?this.model.getLanguageId():this.preferredLanguageId}getPreferredLanguageId(){return this.preferredLanguageId}setLanguageId(n){this.setPreferredLanguageId(n),this.model?.setLanguageId(n)}setPreferredLanguageId(n){this.preferredLanguageId=n,this.setForceOpenAsText()}setPreferredContents(n){this.preferredContents=n,this.setForceOpenAsText()}setForceOpenAsText(){this.forceOpenAs=1}setForceOpenAsBinary(){this.forceOpenAs=2}isDirty(){return!!this.model?.isDirty()}isSaving(){return this.model?.hasState(0)||this.model?.hasState(3)||this.model?.hasState(5)?!1:this.filesConfigurationService.getAutoSaveMode()===1?!0:super.isSaving()}prefersEditorPane(n){return this.forceOpenAs===2?n.find(h=>h.typeId===v.BINARY_FILE_EDITOR_ID):n.find(h=>h.typeId===v.TEXT_FILE_EDITOR_ID)}resolve(){return this.forceOpenAs===2?this.doResolveAsBinary():this.doResolveAsText()}async doResolveAsText(){try{const n=this.preferredContents;this.preferredContents=void 0,await this.textFileService.files.resolve(this.resource,{languageId:this.preferredLanguageId,encoding:this.preferredEncoding,contents:typeof n=="string"?(0,l.createTextBufferFactory)(n):void 0,reload:{async:!0},allowBinary:this.forceOpenAs===1,reason:1}),this.cachedTextFileModelReference||(this.cachedTextFileModelReference=await this.textModelResolverService.createModelReference(this.resource));const h=this.cachedTextFileModelReference.object;return this.isDisposed()&&this.disposeModelReference(),h}catch(n){if(n.textFileOperationResult===0||n.fileOperationResult===7)return this.doResolveAsBinary();throw n}}async doResolveAsBinary(){const n=this.instantiationService.createInstance(_.BinaryEditorModel,this.preferredResource,this.getName());return await n.resolve(),n}isResolved(){return!!this.model}async rename(n,h){return{editor:{resource:h,encoding:this.getEncoding(),options:{viewState:(0,t.findViewStateForEditor)(this,n,this.editorService)}}}}toUntyped(n){const h={resource:this.preferredResource,forceFile:!0,options:{override:this.editorId}};return typeof n?.preserveViewState=="number"&&(h.encoding=this.getEncoding(),h.languageId=this.getLanguageId(),h.contents=(()=>{const g=this.textFileService.files.get(this.resource);if(g?.isDirty())return g.textEditorModel.getValue()})(),h.options={...h.options,viewState:(0,t.findViewStateForEditor)(this,n.preserveViewState,this.editorService)}),h}matches(n){return super.matches(n)?!0:n instanceof ya?(0,i.isEqual)(n.resource,this.resource):!1}dispose(){this.model=void 0,this.disposeModelReference(),super.dispose()}disposeModelReference(){(0,I.dispose)(this.cachedTextFileModelReference),this.cachedTextFileModelReference=void 0}};u=Ee([W(7,D.IInstantiationService),W(8,k.ITextFileService),W(9,w.ITextModelService),W(10,C.ILabelService),W(11,A.IFileService),W(12,o.IFilesConfigurationService),W(13,c.IEditorService),W(14,r.IPathService)],u),e.FileEditorInput=u}),define(ne[2601],re([1,0,1575,568,27,12,432,148,24,132,159,44,203,5,59]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BinaryFileEditor=void 0;let S=class Ia extends f.BaseBinaryResourceEditor{constructor(l,r,p,u,a,n){super(Ia.ID,{openInternal:(h,g)=>this.openInternal(h,g)},l,r,u,a);this.editorResolverService=p,this.editorGroupService=n}async openInternal(l,r){if(l instanceof k.FileEditorInput&&this.group?.activeEditor){const p=this.group.activeEditor,u=p?.toUntyped();if(!u)return;let a=await this.editorResolverService.resolveEditor({...u,options:{...r,override:w.EditorResolution.PICK}},this.group);if(a===2)a=void 0;else if(a===1)return;if((0,C.isEditorInputWithOptions)(a))for(const n of a.editor instanceof o.DiffEditorInput?[a.editor.original,a.editor.modified]:[a.editor])n instanceof k.FileEditorInput&&(n.setForceOpenAsText(),n.setPreferredLanguageId(D.BINARY_TEXT_FILE_MODE));await(this.group??this.editorGroupService.activeGroup).replaceEditors([{editor:p,replacement:a?.editor??l,options:{...a?.options??r}}])}}getTitle(){return this.input?this.input.getName():(0,t.localize)(0,null)}};S.ID=D.BINARY_FILE_EDITOR_ID,S=Ee([W(0,_.ITelemetryService),W(1,A.IThemeService),W(2,v.IEditorResolverService),W(3,I.IStorageService),W(4,c.IInstantiationService),W(5,i.IEditorGroupsService)],S),e.BinaryFileEditor=S}),define(ne[903],re([1,0,1577,130,19,36,9,83,5,2,61,55,203,7,148,432,289,26,41,24,46,6,21,14,18,108,44,116]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.revertLocalChangesCommand=e.acceptLocalChangesCommand=e.TextFileSaveErrorHandler=e.CONFLICT_RESOLUTION_SCHEME=e.CONFLICT_RESOLUTION_CONTEXT=void 0,e.CONFLICT_RESOLUTION_CONTEXT="saveConflictResolutionContext",e.CONFLICT_RESOLUTION_SCHEME="conflictResolution";const E="learnMoreDirtyWriteError",y=(0,t.localize)(0,null);let T=class extends w.Disposable{constructor(Z,j,X,Y,$,J,ee){super();this.notificationService=Z,this.textFileService=j,this.contextKeyService=X,this.editorService=Y,this.instantiationService=J,this.storageService=ee,this.messages=new C.ResourceMap,this.conflictResolutionContext=new c.RawContextKey(e.CONFLICT_RESOLUTION_CONTEXT,!1,!0).bindTo(this.contextKeyService),this.activeConflictResolutionResource=void 0;const te=this._register(J.createInstance(i.TextFileContentProvider));this._register($.registerTextModelContentProvider(e.CONFLICT_RESOLUTION_SCHEME,te)),this.textFileService.files.saveErrorHandler=this,this.registerListeners()}registerListeners(){this._register(this.textFileService.files.onDidSave(Z=>this.onFileSavedOrReverted(Z.model.resource))),this._register(this.textFileService.files.onDidRevert(Z=>this.onFileSavedOrReverted(Z.resource))),this._register(this.editorService.onDidActiveEditorChange(()=>this.onActiveEditorChanged()))}onActiveEditorChanged(){let Z=!1,j;const X=this.editorService.activeEditor;X instanceof o.DiffEditorInput&&X.original.resource?.scheme===e.CONFLICT_RESOLUTION_SCHEME&&(Z=!0,j=X.modified.resource),this.conflictResolutionContext.set(Z),this.activeConflictResolutionResource=j}onFileSavedOrReverted(Z){const j=this.messages.get(Z);j&&(j.close(),this.messages.delete(Z))}onSaveError(Z,j){const X=Z,Y=j.resource;let $;const J=[],ee=[];if(X.fileOperationResult===3)if(this.activeConflictResolutionResource&&(0,_.isEqual)(this.activeConflictResolutionResource,j.resource)){if(this.storageService.getBoolean(E,0))return;$=y,J.push(this.instantiationService.createInstance(x)),ee.push(this.instantiationService.createInstance(F))}else $=(0,t.localize)(1,null,(0,_.basename)(Y)),J.push(this.instantiationService.createInstance(L,j)),J.push(this.instantiationService.createInstance(z,j)),ee.push(this.instantiationService.createInstance(U));else{const ie=X.fileOperationResult===5,ce=ie&&X.options?.unlock,le=X.fileOperationResult===6,ae=Y.scheme===g.Schemas.file;ae&&(le||ce)?J.push(this.instantiationService.createInstance(M,j,!!ce)):ie?J.push(this.instantiationService.createInstance(V,j)):J.push(this.instantiationService.createInstance(N,j)),J.push(this.instantiationService.createInstance(P,j)),J.push(this.instantiationService.createInstance(B,j)),ie?ce&&ae?$=h.isWindows?(0,t.localize)(2,null,(0,_.basename)(Y)):(0,t.localize)(3,null,(0,_.basename)(Y)):$=(0,t.localize)(4,null,(0,_.basename)(Y)):ae&&le?$=h.isWindows?(0,t.localize)(5,null,(0,_.basename)(Y)):(0,t.localize)(6,null,(0,_.basename)(Y)):$=(0,t.localize)(7,null,(0,_.basename)(Y),(0,f.toErrorMessage)(Z,!1))}const te={primary:J,secondary:ee},se=this.notificationService.notify({id:`${(0,b.hash)(j.resource.toString())}`,severity:l.Severity.Error,message:$,actions:te});a.Event.once(se.onDidClose)(()=>{(0,w.dispose)(J),(0,w.dispose)(ee)}),this.messages.set(j.resource,se)}dispose(){super.dispose(),this.messages.clear()}};T=Ee([W(0,l.INotificationService),W(1,D.ITextFileService),W(2,c.IContextKeyService),W(3,n.IEditorService),W(4,v.ITextModelService),W(5,I.IInstantiationService),W(6,p.IStorageService)],T),e.TextFileSaveErrorHandler=T;const R=[];function O(){for(;R.length>0;){const q=R.pop();q&&q.close()}}let x=class extends A.Action{constructor(Z){super("workbench.files.action.resolveConflictLearnMore",(0,t.localize)(8,null));this.openerService=Z}async run(){await this.openerService.open(k.URI.parse("https://go.microsoft.com/fwlink/?linkid=868264"))}};x=Ee([W(0,r.IOpenerService)],x);let F=class extends A.Action{constructor(Z){super("workbench.files.action.resolveConflictLearnMoreDoNotShowAgain",(0,t.localize)(9,null));this.storageService=Z}async run(Z){this.storageService.store(E,!0,0,0),Z.dispose()}};F=Ee([W(0,p.IStorageService)],F);let L=class extends A.Action{constructor(Z,j,X,Y,$){super("workbench.files.action.resolveConflict",(0,t.localize)(10,null));this.model=Z,this.editorService=j,this.notificationService=X,this.instantiationService=Y,this.productService=$}async run(){if(!this.model.isDisposed()){const Z=this.model.resource,j=(0,_.basename)(Z),X=(0,t.localize)(11,null,j,j,this.productService.nameLong);await i.TextFileContentProvider.open(Z,e.CONFLICT_RESOLUTION_SCHEME,X,this.editorService,{pinned:!0});const Y={primary:[this.instantiationService.createInstance(x)]},$=this.notificationService.notify({id:`${(0,b.hash)(Z.toString())}`,severity:l.Severity.Info,message:y,actions:Y,neverShowAgain:{id:E,isSecondary:!0}});a.Event.once($.onDidClose)(()=>(0,w.dispose)(Y.primary)),R.push($)}}};L=Ee([W(1,n.IEditorService),W(2,l.INotificationService),W(3,I.IInstantiationService),W(4,u.IProductService)],L);class M extends A.Action{constructor(Z,j){super("workbench.files.action.saveModelElevated",j?h.isWindows?(0,t.localize)(12,null):(0,t.localize)(13,null):h.isWindows?(0,t.localize)(14,null):(0,t.localize)(15,null));this.model=Z,this.triedToUnlock=j}async run(){this.model.isDisposed()||await this.model.save({writeElevated:!0,writeUnlock:this.triedToUnlock,reason:1})}}class N extends A.Action{constructor(Z){super("workbench.files.action.saveModel",(0,t.localize)(16,null));this.model=Z}async run(){this.model.isDisposed()||await this.model.save({reason:1})}}class B extends A.Action{constructor(Z){super("workbench.files.action.discardModel",(0,t.localize)(17,null));this.model=Z}async run(){this.model.isDisposed()||await this.model.revert()}}let P=class extends A.Action{constructor(Z,j){super("workbench.files.action.saveModelAs",s.SAVE_FILE_AS_LABEL);this.model=Z,this.editorService=j}async run(){if(!this.model.isDisposed()){const Z=this.findEditor();Z&&await this.editorService.save(Z,{saveAs:!0,reason:1})}}findEditor(){let Z;const j=this.editorService.findEditors(this.model.resource,{supportSideBySide:m.SideBySideEditor.PRIMARY});for(const X of j)if(X.editor instanceof S.FileEditorInput){Z=X;break}else Z||(Z=X);return Z}};P=Ee([W(1,n.IEditorService)],P);class V extends A.Action{constructor(Z){super("workbench.files.action.unlock",(0,t.localize)(18,null));this.model=Z}async run(){this.model.isDisposed()||await this.model.save({writeUnlock:!0,reason:1})}}class z extends A.Action{constructor(Z){super("workbench.files.action.saveIgnoreModifiedSince",(0,t.localize)(19,null));this.model=Z}async run(){this.model.isDisposed()||await this.model.save({ignoreModifiedSince:!0,reason:1})}}let U=class extends A.Action{constructor(Z){super("workbench.files.action.configureSaveConflict",(0,t.localize)(20,null));this.preferencesService=Z}async run(){this.preferencesService.openSettings({query:"files.saveConflictResolution"})}};U=Ee([W(0,d.IPreferencesService)],U);const H=(q,Z)=>G(q,Z,!0);e.acceptLocalChangesCommand=H;const K=(q,Z)=>G(q,Z,!1);e.revertLocalChangesCommand=K;async function G(q,Z,j){const X=q.get(n.IEditorService),Y=X.activeEditorPane;if(!Y)return;const $=Y.input,J=Y.group;if(O(),j){const ee={ignoreModifiedSince:!0,reason:1};await X.save({editor:$,groupId:J.id},ee)}else await X.revert({editor:$,groupId:J.id});return await X.openEditor({resource:Z},J),J.closeEditor($)}}),define(ne[220],re([1,0,9,148,44,208,355,15,463,5]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getOpenEditorsViewMultiSelection=e.getMultiSelectedResources=e.getResourceForCommand=e.IExplorerService=void 0,e.IExplorerService=(0,w.createDecorator)("explorerService");function v(i){let S=i.lastFocusedList;if(S?.getHTMLElement()===document.activeElement){let s;if(S instanceof A.List){const l=S.getFocusedElements();l.length&&(s=l[0])}else if(S instanceof I.AsyncDataTree){const l=S.getFocus();l.length&&(s=l[0])}return s}}function C(i,S,s){if(t.URI.isUri(i))return i;const l=v(S);return l instanceof k.ExplorerItem?l.resource:l instanceof f.OpenEditor?l.getResource():_.EditorResourceAccessor.getOriginalUri(s.activeEditor,{supportSideBySide:_.SideBySideEditor.PRIMARY})}e.getResourceForCommand=C;function o(i,S,s,l){const r=S.lastFocusedList;if(r?.getHTMLElement()===document.activeElement){if(r instanceof I.AsyncDataTree&&r.getFocus().every(u=>u instanceof k.ExplorerItem)){const u=l.getContext(!0);if(u.length)return u.map(a=>a.resource)}if(r instanceof A.List){const u=(0,D.coalesce)(r.getSelectedElements().filter(g=>g instanceof f.OpenEditor).map(g=>g.getResource())),a=r.getFocusedElements(),n=a.length?a[0]:void 0;let h;if(t.URI.isUri(i))h=i.toString();else if(n instanceof f.OpenEditor){const g=n.getResource();h=g?g.toString():void 0}if(u.some(g=>g.toString()===h))return u}}const p=C(i,S,s);return p?[p]:[]}e.getMultiSelectedResources=o;function c(i,S){const s=i.lastFocusedList;if(s?.getHTMLElement()===document.activeElement&&s instanceof A.List){const l=(0,D.coalesce)(s.getSelectedElements().filter(a=>a instanceof f.OpenEditor)),r=s.getFocusedElements(),p=r.length?r[0]:void 0;let u;if(p instanceof f.OpenEditor&&(u=p),l.some(a=>a===u))return l}}e.getOpenEditorsViewMultiSelection=c}),define(ne[2602],re([1,0,1569,8,9,16,105,74,23,71,220,28,18,15,21,109,7,47,2,14,48,17,732,188]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExternalTerminalContribution=void 0;const g="openInTerminal";C.CommandsRegistry.registerCommand({id:g,handler:async(m,b)=>{const E=m.get(f.IConfigurationService),y=m.get(i.IEditorService),T=m.get(I.IFileService),R=m.get(k.ITerminalService),O=m.get(S.IRemoteAgentService),x=m.get(k.ITerminalGroupService);let F;try{F=m.get(n.IExternalTerminalService)}catch{}const L=(0,v.getMultiSelectedResources)(b,m.get(w.IListService),y,m.get(v.IExplorerService));return T.resolveAll(L.map(M=>({resource:M}))).then(async M=>{const N=(0,c.distinct)(M.filter(V=>V.success)),B=E.getValue();if(O.getConnection()||B.terminal.explorerKind==="integrated"){const V={},z=N.map(({stat:U})=>{const H=U.resource;return U.isDirectory?H:_.URI.from({scheme:H.scheme,authority:H.authority,fragment:H.fragment,query:H.query,path:(0,u.dirname)(H.path)})});for(const U of z){if(V[U.path])return;V[U.path]=!0;const H=await R.createTerminal({config:{cwd:U}});H&&H.target!==h.TerminalLocation.Editor&&(L.length===1||!b||U.path===b.path||U.path===(0,u.dirname)(b.path))&&(R.setActiveInstance(H),x.showPanel(!0))}}else F&&(0,c.distinct)(N.map(({stat:V})=>V.isDirectory?V.resource.fsPath:(0,u.dirname)(V.resource.fsPath))).forEach(V=>{F.openTerminal(B.terminal.external,V)})})}});let d=class extends r.Disposable{constructor(b){super();this._configurationService=b,this._openInTerminalMenuItem={group:"navigation",order:30,command:{id:g,title:t.localize(0,null)},when:s.ContextKeyExpr.or(D.ResourceContextKey.Scheme.isEqualTo(o.Schemas.file),D.ResourceContextKey.Scheme.isEqualTo(o.Schemas.vscodeRemote))},A.MenuRegistry.appendMenuItem(A.MenuId.OpenEditorsContext,this._openInTerminalMenuItem),A.MenuRegistry.appendMenuItem(A.MenuId.ExplorerContext,this._openInTerminalMenuItem),this._configurationService.onDidChangeConfiguration(E=>{(E.affectsConfiguration("terminal.explorerKind")||E.affectsConfiguration("terminal.external"))&&this._refreshOpenInTerminalMenuItemTitle()}),this._refreshOpenInTerminalMenuItemTitle()}_refreshOpenInTerminalMenuItemTitle(){if(p.isWeb){this._openInTerminalMenuItem.command.title=t.localize(1,null);return}const b=this._configurationService.getValue().terminal;if(b.explorerKind==="integrated"){this._openInTerminalMenuItem.command.title=t.localize(2,null);return}if(p.isWindows&&b.external?.windowsExec){const E=(0,u.basename)(b.external.windowsExec);if(E==="wt"||E==="wt.exe"){this._openInTerminalMenuItem.command.title=t.localize(3,null);return}}this._openInTerminalMenuItem.command.title=t.localize(4,null)}};d=Ee([W(0,f.IConfigurationService)],d),e.ExternalTerminalContribution=d,a.Registry.as(l.Extensions.Workbench).registerWorkbenchContribution(d,3)}),define(ne[627],re([1,0,1703,11,2,6,165,5,61,21,184,8,215,93,12,32,39,172,7,58,49,195,94,229,36,38,19,16,73,122,15,72,10,83,63,33,22,74,67,66,1118]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DirtyDiffWorkbenchController=e.DirtyDiffModel=e.getOriginalResource=e.createProviderComparer=e.overviewRulerDeletedForeground=e.overviewRulerAddedForeground=e.overviewRulerModifiedForeground=e.minimapGutterDeletedBackground=e.minimapGutterAddedBackground=e.minimapGutterModifiedBackground=e.editorGutterDeletedBackground=e.editorGutterAddedBackground=e.editorGutterModifiedBackground=e.DirtyDiffController=e.GotoNextChangeAction=e.GotoPreviousChangeAction=e.ShowNextChangeAction=e.ShowPreviousChangeAction=e.isDirtyDiffVisible=void 0;class V extends g.ActionRunner{runAction(pe,me){return pe instanceof b.MenuItemAction?pe.run(...me):super.runAction(pe,me)}}e.isDirtyDiffVisible=new r.RawContextKey("dirtyDiffVisible",!1);function z(fe){const pe=fe.modifiedEndLineNumber-fe.modifiedStartLineNumber+1,me=fe.originalEndLineNumber-fe.originalStartLineNumber+1;return fe.originalEndLineNumber===0?pe:fe.modifiedEndLineNumber===0?me:pe+me}function U(fe){return fe.modifiedEndLineNumber===0?fe.modifiedStartLineNumber===0?1:fe.modifiedStartLineNumber:fe.modifiedEndLineNumber}function H(fe,pe){return fe===1&&pe.modifiedStartLineNumber===0&&pe.modifiedEndLineNumber===0?!0:fe>=pe.modifiedStartLineNumber&&fe<=(pe.modifiedEndLineNumber||pe.modifiedStartLineNumber)}let K=class extends g.Action{constructor(pe,me,be,Ce,ve){const he=Ce.lookupKeybinding(me.id),ge=me.label+(he?` (${he.getLabel()})`:"");super(me.id,ge,be);this.instantiationService=ve,this.action=me,this.editor=pe}run(){return Promise.resolve(this.instantiationService.invokeFunction(pe=>this.action.run(pe,this.editor,null)))}};K=Ee([W(3,d.IKeybindingService),W(4,D.IInstantiationService)],K);var G;(function(fe){fe[fe.Modify=0]="Modify",fe[fe.Add=1]="Add",fe[fe.Delete=2]="Delete"})(G||(G={}));function q(fe){return fe.originalEndLineNumber===0?G.Add:fe.modifiedEndLineNumber===0?G.Delete:G.Modify}function Z(fe,pe){switch(pe){case G.Modify:return fe.getColor(e.editorGutterModifiedBackground);case G.Add:return fe.getColor(e.editorGutterAddedBackground);case G.Delete:return fe.getColor(e.editorGutterDeletedBackground)}}function j(fe){const pe=fe.get(R.ICodeEditorService).listDiffEditors();for(const me of pe)if(me.hasTextFocus()&&me instanceof h.EmbeddedDiffEditorWidget)return me.getParentEditor();return(0,l.getOuterEditor)(fe)}let X=class extends l.PeekViewWidget{constructor(pe,me,be,Ce,ve,he){super(pe,{isResizeable:!0,frameWidth:1,keepEditorSelection:!0},Ce);this.model=me,this.themeService=be,this.index=0,this.height=void 0,this._disposables.add(be.onDidColorThemeChange(this._applyTheme,this)),this._applyTheme(be.getColorTheme());const ge=he.createOverlay([["originalResourceScheme",this.model.original.uri.scheme]]);this.menu=ve.createMenu(b.MenuId.SCMChangeContext,ge),this._disposables.add(this.menu),this.create(),pe.hasModel()?this.title=(0,m.basename)(pe.getModel().uri):this.title="",this.setTitle(this.title),this._disposables.add(me.onDidChange(this.renderTitle,this))}showChange(pe){const me=this.model.changes[pe];if(this.index=pe,this.change=me,!this.model.original)return;A.Event.once(this.diffEditor.onDidUpdateDiff)(()=>setTimeout(()=>this.revealChange(me),0)),this.diffEditor.setModel(this.model);const ve=new u.Position(U(me),1),he=this.editor.getOption(59),ge=this.editor.getLayoutInfo().height,de=Math.floor(ge/he),Se=Math.min(z(me)+8,Math.floor(de/3));this.renderTitle();const we=q(me),ye=Z(this.themeService.getColorTheme(),we);this.style({frameColor:ye,arrowColor:ye}),this._actionbarWidget.context=[this.model.modified.uri,this.model.changes,pe],this.show(ve,Se),this.editor.focus()}renderTitle(){const pe=this.model.changes.length>1?t.localize(0,null,this.index+1,this.model.changes.length):t.localize(1,null,this.index+1,this.model.changes.length);this.setTitle(this.title,pe)}_fillHead(pe){super._fillHead(pe,!0);const me=this.instantiationService.createInstance(K,this.editor,new Y,i.ThemeIcon.asClassName(F.gotoPreviousLocation)),be=this.instantiationService.createInstance(K,this.editor,new $,i.ThemeIcon.asClassName(F.gotoNextLocation));this._disposables.add(me),this._disposables.add(be);const Ce=[];this._disposables.add((0,E.createAndFillInActionBarActions)(this.menu,{shouldForwardArgs:!0},Ce)),this._actionbarWidget.push(Ce.reverse(),{label:!1,icon:!0}),this._actionbarWidget.push([be,me],{label:!1,icon:!0}),this._actionbarWidget.push(new g.Action("peekview.close",t.localize(2,null),L.Codicon.close.classNames,!0,()=>this.dispose()),{label:!1,icon:!0})}_getActionBarOptions(){const pe=new V;return pe.onDidRun(me=>{!(me.action instanceof K)&&!me.error&&this.dispose()}),{...super._getActionBarOptions(),actionRunner:pe}}_fillBody(pe){const me={scrollBeyondLastLine:!0,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1},renderSideBySide:!1,readOnly:!1,renderIndicators:!1};this.diffEditor=this.instantiationService.createInstance(h.EmbeddedDiffEditorWidget,pe,me,this.editor),this._disposables.add(this.diffEditor)}_onWidth(pe){typeof this.height!="undefined"&&this.diffEditor.layout({height:this.height,width:pe})}_doLayoutBody(pe,me){super._doLayoutBody(pe,me),this.diffEditor.layout({height:pe,width:me}),typeof this.height=="undefined"&&this.change&&this.revealChange(this.change),this.height=pe}revealChange(pe){let me,be;pe.modifiedEndLineNumber===0?(me=pe.modifiedStartLineNumber,be=pe.modifiedStartLineNumber+1):pe.originalEndLineNumber>0?(me=pe.modifiedStartLineNumber-1,be=pe.modifiedEndLineNumber+1):(me=pe.modifiedStartLineNumber,be=pe.modifiedEndLineNumber),this.diffEditor.revealLinesInCenter(me,be,1)}_applyTheme(pe){const me=pe.getColor(l.peekViewBorder)||P.Color.transparent;this.style({arrowColor:me,frameColor:me,headerBackgroundColor:pe.getColor(l.peekViewTitleBackground)||P.Color.transparent,primaryHeadingColor:pe.getColor(l.peekViewTitleForeground),secondaryHeadingColor:pe.getColor(l.peekViewTitleInfoForeground)})}revealLine(pe){this.editor.revealLineInCenterIfOutsideViewport(pe,0)}hasFocus(){return this.diffEditor.hasTextFocus()}};X=Ee([W(2,i.IThemeService),W(3,D.IInstantiationService),W(4,b.IMenuService),W(5,r.IContextKeyService)],X);class Y extends s.EditorAction{constructor(){super({id:"editor.action.dirtydiff.previous",label:t.localize(3,null),alias:"Show Previous Change",precondition:N.TextCompareEditorActiveContext.toNegated(),kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:1024|512|61,weight:100}})}run(pe,me){const be=j(pe);if(!be)return;const Ce=te.get(be);!Ce||!Ce.canNavigate()||Ce.previous()}}e.ShowPreviousChangeAction=Y,(0,s.registerEditorAction)(Y);class $ extends s.EditorAction{constructor(){super({id:"editor.action.dirtydiff.next",label:t.localize(4,null),alias:"Show Next Change",precondition:N.TextCompareEditorActiveContext.toNegated(),kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:512|61,weight:100}})}run(pe,me){const be=j(pe);if(!be)return;const Ce=te.get(be);!Ce||!Ce.canNavigate()||Ce.next()}}e.ShowNextChangeAction=$,(0,s.registerEditorAction)($),b.MenuRegistry.appendMenuItem(b.MenuId.MenubarGoMenu,{group:"7_change_nav",command:{id:"editor.action.dirtydiff.next",title:t.localize(5,null)},order:1}),b.MenuRegistry.appendMenuItem(b.MenuId.MenubarGoMenu,{group:"7_change_nav",command:{id:"editor.action.dirtydiff.previous",title:t.localize(6,null)},order:2});class J extends s.EditorAction{constructor(){super({id:"workbench.action.editor.previousChange",label:t.localize(7,null),alias:"Go to Previous Change",precondition:N.TextCompareEditorActiveContext.toNegated(),kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:1024|512|63,weight:100}})}run(pe,me){const be=j(pe);if(!be||!be.hasModel())return;const Ce=te.get(be);if(!Ce||!Ce.modelRegistry)return;const ve=be.getPosition().lineNumber,he=Ce.modelRegistry.getModel(be.getModel());if(!he||he.changes.length===0)return;const ge=he.findPreviousClosestChange(ve,!1),de=he.changes[ge],Se=new u.Position(de.modifiedStartLineNumber,1);be.setPosition(Se),be.revealPositionInCenter(Se)}}e.GotoPreviousChangeAction=J,(0,s.registerEditorAction)(J);class ee extends s.EditorAction{constructor(){super({id:"workbench.action.editor.nextChange",label:t.localize(8,null),alias:"Go to Next Change",precondition:N.TextCompareEditorActiveContext.toNegated(),kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:512|63,weight:100}})}run(pe,me){const be=j(pe);if(!be||!be.hasModel())return;const Ce=te.get(be);if(!Ce||!Ce.modelRegistry)return;const ve=be.getPosition().lineNumber,he=Ce.modelRegistry.getModel(be.getModel());if(!he||he.changes.length===0)return;const ge=he.findNextClosestChange(ve,!1),de=he.changes[ge],Se=new u.Position(de.modifiedStartLineNumber,1);be.setPosition(Se),be.revealPositionInCenter(Se)}}e.GotoNextChangeAction=ee,(0,s.registerEditorAction)(ee),n.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"closeDirtyDiff",weight:100+50,primary:9,secondary:[1024|9],when:r.ContextKeyExpr.and(e.isDirtyDiffVisible),handler:fe=>{const pe=j(fe);if(!pe)return;const me=te.get(pe);!me||me.close()}});let te=class Da extends _.Disposable{constructor(pe,me,be,Ce){super();if(this.editor=pe,this.configurationService=be,this.instantiationService=Ce,this.modelRegistry=null,this.model=null,this.widget=null,this.currentIndex=-1,this.session=_.Disposable.None,this.mouseDownInfo=null,this.enabled=!1,this.gutterActionDisposables=new _.DisposableStore,this.enabled=!me.getContextKeyValue("isInDiffEditor"),this.stylesheet=(0,O.createStyleSheet)(),this._register((0,_.toDisposable)(()=>this.stylesheet.remove())),this.enabled){this.isDirtyDiffVisible=e.isDirtyDiffVisible.bindTo(me),this._register(pe.onDidChangeModel(()=>this.close()));const ve=A.Event.filter(be.onDidChangeConfiguration,he=>he.affectsConfiguration("scm.diffDecorationsGutterAction"));this._register(ve(this.onDidChangeGutterAction,this)),this.onDidChangeGutterAction()}}static get(pe){return pe.getContribution(Da.ID)}onDidChangeGutterAction(){const pe=this.configurationService.getValue("scm.diffDecorationsGutterAction");this.gutterActionDisposables.dispose(),this.gutterActionDisposables=new _.DisposableStore,pe==="diff"?(this.gutterActionDisposables.add(this.editor.onMouseDown(me=>this.onEditorMouseDown(me))),this.gutterActionDisposables.add(this.editor.onMouseUp(me=>this.onEditorMouseUp(me))),this.stylesheet.textContent=` .monaco-editor .dirty-diff-glyph { cursor: pointer; } .monaco-editor .margin-view-overlays .dirty-diff-glyph:hover::before { width: 9px; left: -6px; } .monaco-editor .margin-view-overlays .dirty-diff-deleted:hover::after { bottom: 0; border-top-width: 0; border-bottom-width: 0; } `):this.stylesheet.textContent=""}canNavigate(){return this.currentIndex===-1||!!this.model&&this.model.changes.length>1}next(pe){!this.assertWidget()||!this.widget||!this.model||(this.editor.hasModel()&&(typeof pe=="number"||this.currentIndex===-1)?this.currentIndex=this.model.findNextClosestChange(typeof pe=="number"?pe:this.editor.getPosition().lineNumber):this.currentIndex=(0,a.rot)(this.currentIndex+1,this.model.changes.length),this.widget.showChange(this.currentIndex))}previous(pe){!this.assertWidget()||!this.widget||!this.model||(this.editor.hasModel()&&(typeof pe=="number"||this.currentIndex===-1)?this.currentIndex=this.model.findPreviousClosestChange(typeof pe=="number"?pe:this.editor.getPosition().lineNumber):this.currentIndex=(0,a.rot)(this.currentIndex-1,this.model.changes.length),this.widget.showChange(this.currentIndex))}close(){this.session.dispose(),this.session=_.Disposable.None}assertWidget(){if(!this.enabled)return!1;if(this.widget)return!this.model||this.model.changes.length===0?(this.close(),!1):!0;if(!this.modelRegistry)return!1;const pe=this.editor.getModel();if(!pe)return!1;const me=this.modelRegistry.getModel(pe);if(!me||me.changes.length===0)return!1;this.currentIndex=-1,this.model=me,this.widget=this.instantiationService.createInstance(X,this.editor,me),this.isDirtyDiffVisible.set(!0);const be=new _.DisposableStore;return be.add(A.Event.once(this.widget.onDidClose)(this.close,this)),A.Event.chain(me.onDidChange).filter(Ce=>Ce.diff.length>0).map(Ce=>Ce.diff).event(this.onDidModelChange,this,be),be.add(this.widget),be.add((0,_.toDisposable)(()=>{this.model=null,this.widget=null,this.currentIndex=-1,this.isDirtyDiffVisible.set(!1),this.editor.focus()})),this.session=be,!0}onDidModelChange(pe){if(!(!this.model||!this.widget||this.widget.hasFocus()))for(const me of pe)me.start<=this.currentIndex&&(this.currentIndex<me.start+me.deleteCount?(this.currentIndex=-1,this.next()):(this.currentIndex=(0,a.rot)(this.currentIndex+me.toInsert.length-me.deleteCount-1,this.model.changes.length),this.next()))}onEditorMouseDown(pe){this.mouseDownInfo=null;const me=pe.target.range;if(!me||!pe.event.leftButton||pe.target.type!==4||!pe.target.element||pe.target.element.className.indexOf("dirty-diff-glyph")<0)return;const be=pe.target.detail,Ce=pe.target.element.offsetLeft,ve=be.offsetX-Ce;ve<-3||ve>6||(this.mouseDownInfo={lineNumber:me.startLineNumber})}onEditorMouseUp(pe){if(!this.mouseDownInfo)return;const{lineNumber:me}=this.mouseDownInfo;this.mouseDownInfo=null;const be=pe.target.range;if(!be||be.startLineNumber!==me||pe.target.type!==4||!this.modelRegistry)return;const Ce=this.editor.getModel();if(!Ce)return;const ve=this.modelRegistry.getModel(Ce);if(!ve)return;const he=ve.changes.findIndex(ge=>H(me,ge));he<0||(he===this.currentIndex?this.close():this.next(me))}getChanges(){if(!this.modelRegistry)return[];if(!this.editor.hasModel())return[];const pe=this.modelRegistry.getModel(this.editor.getModel());return pe?pe.changes:[]}dispose(){this.gutterActionDisposables.dispose(),super.dispose()}};te.ID="editor.contrib.dirtydiff",te=Ee([W(1,r.IContextKeyService),W(2,C.IConfigurationService),W(3,D.IInstantiationService)],te),e.DirtyDiffController=te,e.editorGutterModifiedBackground=(0,S.registerColor)("editorGutter.modifiedBackground",{dark:"#1B81A8",light:"#2090D3",hcDark:"#1B81A8",hcLight:"#2090D3"},t.localize(9,null)),e.editorGutterAddedBackground=(0,S.registerColor)("editorGutter.addedBackground",{dark:"#487E02",light:"#48985D",hcDark:"#487E02",hcLight:"#48985D"},t.localize(10,null)),e.editorGutterDeletedBackground=(0,S.registerColor)("editorGutter.deletedBackground",{dark:S.editorErrorForeground,light:S.editorErrorForeground,hcDark:S.editorErrorForeground,hcLight:S.editorErrorForeground},t.localize(11,null)),e.minimapGutterModifiedBackground=(0,S.registerColor)("minimapGutter.modifiedBackground",{dark:e.editorGutterModifiedBackground,light:e.editorGutterModifiedBackground,hcDark:e.editorGutterModifiedBackground,hcLight:e.editorGutterModifiedBackground},t.localize(12,null)),e.minimapGutterAddedBackground=(0,S.registerColor)("minimapGutter.addedBackground",{dark:e.editorGutterAddedBackground,light:e.editorGutterAddedBackground,hcDark:e.editorGutterAddedBackground,hcLight:e.editorGutterAddedBackground},t.localize(13,null)),e.minimapGutterDeletedBackground=(0,S.registerColor)("minimapGutter.deletedBackground",{dark:e.editorGutterDeletedBackground,light:e.editorGutterDeletedBackground,hcDark:e.editorGutterDeletedBackground,hcLight:e.editorGutterDeletedBackground},t.localize(14,null)),e.overviewRulerModifiedForeground=(0,S.registerColor)("editorOverviewRuler.modifiedForeground",{dark:(0,S.transparent)(e.editorGutterModifiedBackground,.6),light:(0,S.transparent)(e.editorGutterModifiedBackground,.6),hcDark:(0,S.transparent)(e.editorGutterModifiedBackground,.6),hcLight:(0,S.transparent)(e.editorGutterModifiedBackground,.6)},t.localize(15,null)),e.overviewRulerAddedForeground=(0,S.registerColor)("editorOverviewRuler.addedForeground",{dark:(0,S.transparent)(e.editorGutterAddedBackground,.6),light:(0,S.transparent)(e.editorGutterAddedBackground,.6),hcDark:(0,S.transparent)(e.editorGutterAddedBackground,.6),hcLight:(0,S.transparent)(e.editorGutterAddedBackground,.6)},t.localize(16,null)),e.overviewRulerDeletedForeground=(0,S.registerColor)("editorOverviewRuler.deletedForeground",{dark:(0,S.transparent)(e.editorGutterDeletedBackground,.6),light:(0,S.transparent)(e.editorGutterDeletedBackground,.6),hcDark:(0,S.transparent)(e.editorGutterDeletedBackground,.6),hcLight:(0,S.transparent)(e.editorGutterDeletedBackground,.6)},t.localize(17,null));let se=class Zn extends _.Disposable{constructor(pe,me,be){super();this.model=me,this.decorations=[],this.editorModel=pe;const Ce=be.getValue("scm.diffDecorations"),ve=Ce==="all"||Ce==="gutter",he=Ce==="all"||Ce==="overview",ge=Ce==="all"||Ce==="minimap";this.modifiedOptions=Zn.createDecoration("dirty-diff-modified",{gutter:ve,overview:{active:he,color:e.overviewRulerModifiedForeground},minimap:{active:ge,color:e.minimapGutterModifiedBackground},isWholeLine:!0}),this.addedOptions=Zn.createDecoration("dirty-diff-added",{gutter:ve,overview:{active:he,color:e.overviewRulerAddedForeground},minimap:{active:ge,color:e.minimapGutterAddedBackground},isWholeLine:!0}),this.deletedOptions=Zn.createDecoration("dirty-diff-deleted",{gutter:ve,overview:{active:he,color:e.overviewRulerDeletedForeground},minimap:{active:ge,color:e.minimapGutterDeletedBackground},isWholeLine:!1}),this._register(me.onDidChange(this.onDidChange,this))}static createDecoration(pe,me){const be={description:"dirty-diff-decoration",isWholeLine:me.isWholeLine};return me.gutter&&(be.linesDecorationsClassName=`dirty-diff-glyph ${pe}`),me.overview.active&&(be.overviewRuler={color:(0,i.themeColorFromId)(me.overview.color),position:y.OverviewRulerLane.Left}),me.minimap.active&&(be.minimap={color:(0,i.themeColorFromId)(me.minimap.color),position:y.MinimapPosition.Gutter}),c.ModelDecorationOptions.createDynamic(be)}onDidChange(){if(!this.editorModel)return;const pe=this.model.changes.map(me=>{const be=q(me),Ce=me.modifiedStartLineNumber,ve=me.modifiedEndLineNumber||Ce;switch(be){case G.Add:return{range:{startLineNumber:Ce,startColumn:1,endLineNumber:ve,endColumn:1},options:this.addedOptions};case G.Delete:return{range:{startLineNumber:Ce,startColumn:Number.MAX_VALUE,endLineNumber:Ce,endColumn:Number.MAX_VALUE},options:this.deletedOptions};case G.Modify:return{range:{startLineNumber:Ce,startColumn:1,endLineNumber:ve,endColumn:1},options:this.modifiedOptions}}});this.decorations=this.editorModel.deltaDecorations(this.decorations,pe)}dispose(){super.dispose(),this.editorModel&&!this.editorModel.isDisposed()&&this.editorModel.deltaDecorations(this.decorations,[]),this.editorModel=null,this.decorations=[]}};se=Ee([W(2,C.IConfigurationService)],se);function ie(fe,pe){let me=fe.modifiedStartLineNumber-pe.modifiedStartLineNumber;return me!==0||(me=fe.modifiedEndLineNumber-pe.modifiedEndLineNumber,me!==0)||(me=fe.originalStartLineNumber-pe.originalStartLineNumber,me!==0)?me:fe.originalEndLineNumber-pe.originalEndLineNumber}function ce(fe){return(pe,me)=>{const be=(0,m.isEqualOrParent)(fe,pe.rootUri),Ce=(0,m.isEqualOrParent)(fe,me.rootUri);return be&&Ce?pe.rootUri.fsPath.length-me.rootUri.fsPath.length:be?-1:Ce?1:0}}e.createProviderComparer=ce;async function le(fe,pe){const me=fe.repositories.map(he=>he.provider),be=me.filter(he=>!!he.rootUri);be.sort(ce(pe));const Ce=await(0,f.first)(be.map(he=>()=>he.getOriginalResource(pe)));if(Ce)return Ce;const ve=me.filter(he=>!he.rootUri);return(0,f.first)(ve.map(he=>()=>he.getOriginalResource(pe)))}e.getOriginalResource=le;let ae=class extends _.Disposable{constructor(pe,me,be,Ce,ve,he){super();this.scmService=me,this.editorWorkerService=be,this.configurationService=Ce,this.textModelResolverService=ve,this.progressService=he,this._originalResource=null,this._originalModel=null,this.diffDelayer=new f.ThrottledDelayer(200),this.repositoryDisposables=new Set,this.originalModelDisposables=this._register(new _.DisposableStore),this._disposed=!1,this._onDidChange=new A.Emitter,this.onDidChange=this._onDidChange.event,this._changes=[],this._model=pe,this._register(pe.textEditorModel.onDidChangeContent(()=>this.triggerDiff())),this._register(A.Event.filter(Ce.onDidChangeConfiguration,ge=>ge.affectsConfiguration("scm.diffDecorationsIgnoreTrimWhitespace")||ge.affectsConfiguration("diffEditor.ignoreTrimWhitespace"))(this.triggerDiff,this)),this._register(me.onDidAddRepository(this.onDidAddRepository,this)),me.repositories.forEach(ge=>this.onDidAddRepository(ge)),this._register(this._model.onDidChangeEncoding(()=>{this.diffDelayer.cancel(),this._originalResource=null,this._originalModel=null,this._originalURIPromise=void 0,this.setChanges([]),this.triggerDiff()})),this.triggerDiff()}get original(){return this._originalModel?.textEditorModel||null}get modified(){return this._model.textEditorModel||null}get changes(){return this._changes}onDidAddRepository(pe){const me=new _.DisposableStore;this.repositoryDisposables.add(me),me.add((0,_.toDisposable)(()=>this.repositoryDisposables.delete(me)));const be=A.Event.any(pe.provider.onDidChange,pe.provider.onDidChangeResources);me.add(be(this.triggerDiff,this));const Ce=A.Event.filter(this.scmService.onDidRemoveRepository,ve=>ve===pe);me.add(Ce(()=>(0,_.dispose)(me),null)),this.triggerDiff()}triggerDiff(){return this.diffDelayer?this.diffDelayer.trigger(()=>this.diff()).then(pe=>{this._disposed||this._model.isDisposed()||!this._originalModel||this._originalModel.isDisposed()||(this._originalModel.textEditorModel.getValueLength()===0&&(pe=[]),pe||(pe=[]),this.setChanges(pe))},pe=>(0,M.onUnexpectedError)(pe)):Promise.resolve(null)}setChanges(pe){const me=(0,T.sortedDiff)(this._changes,pe,ie);this._changes=pe,this._onDidChange.fire({changes:pe,diff:me})}diff(){return this.progressService.withProgress({location:3,delay:250},async()=>this.getOriginalURIPromise().then(pe=>{if(this._disposed||this._model.isDisposed()||!pe)return Promise.resolve([]);if(!this.editorWorkerService.canComputeDirtyDiff(pe,this._model.resource))return Promise.resolve([]);const me=this.configurationService.getValue("scm.diffDecorationsIgnoreTrimWhitespace"),be=me==="inherit"?this.configurationService.getValue("diffEditor.ignoreTrimWhitespace"):me!=="false";return this.editorWorkerService.computeDirtyDiff(pe,this._model.resource,be)}))}getOriginalURIPromise(){return this._originalURIPromise?this._originalURIPromise:(this._originalURIPromise=this.getOriginalResource().then(pe=>this._disposed?null:pe?this._originalResource?.toString()===pe.toString()?pe:this.textModelResolverService.createModelReference(pe).then(me=>{if(this._disposed)return me.dispose(),null;if(this._originalResource=pe,this._originalModel=me.object,(0,x.isTextFileEditorModel)(this._originalModel)){const be=this._model.getEncoding();be&&this._originalModel.setEncoding(be,1)}return this.originalModelDisposables.clear(),this.originalModelDisposables.add(me),this.originalModelDisposables.add(me.object.textEditorModel.onDidChangeContent(()=>this.triggerDiff())),pe}).catch(me=>null):(this._originalResource=null,this._originalModel=null,null)),this._originalURIPromise.finally(()=>{this._originalURIPromise=void 0}))}async getOriginalResource(){if(this._disposed)return Promise.resolve(null);const pe=this._model.resource;return le(this.scmService,pe)}findNextClosestChange(pe,me=!0){for(let be=0;be<this.changes.length;be++){const Ce=this.changes[be];if(me){if(U(Ce)>=pe)return be}else if(Ce.modifiedStartLineNumber>pe)return be}return 0}findPreviousClosestChange(pe,me=!0){for(let be=this.changes.length-1;be>=0;be--){const Ce=this.changes[be];if(me){if(Ce.modifiedStartLineNumber<=pe)return be}else if(U(Ce)<pe)return be}return this.changes.length-1}dispose(){super.dispose(),this._disposed=!0,this._originalResource=null,this._originalModel=null,this.diffDelayer.cancel(),this.repositoryDisposables.forEach(pe=>(0,_.dispose)(pe)),this.repositoryDisposables.clear()}};ae=Ee([W(1,o.ISCMService),W(2,v.IEditorWorkerService),W(3,C.IConfigurationService),W(4,I.ITextModelService),W(5,B.IProgressService)],ae),e.DirtyDiffModel=ae;class ue{constructor(pe,me){this.model=pe,this.decorator=me}dispose(){this.decorator.dispose(),this.model.dispose()}}let oe=class extends _.Disposable{constructor(pe,me,be,Ce){super();this.editorService=pe,this.instantiationService=me,this.configurationService=be,this.textFileService=Ce,this.enabled=!1,this.viewState={width:3,visibility:"always"},this.items=new Map,this.transientDisposables=this._register(new _.DisposableStore),this.stylesheet=(0,O.createStyleSheet)(),this._register((0,_.toDisposable)(()=>this.stylesheet.parentElement.removeChild(this.stylesheet)));const ve=A.Event.filter(be.onDidChangeConfiguration,de=>de.affectsConfiguration("scm.diffDecorations"));this._register(ve(this.onDidChangeConfiguration,this)),this.onDidChangeConfiguration(),A.Event.filter(be.onDidChangeConfiguration,de=>de.affectsConfiguration("scm.diffDecorationsGutterWidth"))(this.onDidChangeDiffWidthConfiguration,this),this.onDidChangeDiffWidthConfiguration(),A.Event.filter(be.onDidChangeConfiguration,de=>de.affectsConfiguration("scm.diffDecorationsGutterVisibility"))(this.onDidChangeDiffVisibiltiyConfiguration,this),this.onDidChangeDiffVisibiltiyConfiguration()}onDidChangeConfiguration(){this.configurationService.getValue("scm.diffDecorations")!=="none"?this.enable():this.disable()}onDidChangeDiffWidthConfiguration(){let pe=this.configurationService.getValue("scm.diffDecorationsGutterWidth");(isNaN(pe)||pe<=0||pe>5)&&(pe=3),this.setViewState({...this.viewState,width:pe})}onDidChangeDiffVisibiltiyConfiguration(){const pe=this.configurationService.getValue("scm.diffDecorationsGutterVisibility");this.setViewState({...this.viewState,visibility:pe})}setViewState(pe){this.viewState=pe,this.stylesheet.textContent=` .monaco-editor .dirty-diff-modified,.monaco-editor .dirty-diff-added{border-left-width:${pe.width}px;} .monaco-editor .dirty-diff-modified, .monaco-editor .dirty-diff-added, .monaco-editor .dirty-diff-deleted { opacity: ${pe.visibility==="always"?1:0}; } `}enable(){this.enabled&&this.disable(),this.transientDisposables.add(this.editorService.onDidVisibleEditorsChange(()=>this.onEditorsChanged())),this.onEditorsChanged(),this.enabled=!0}disable(){if(!!this.enabled){this.transientDisposables.clear();for(const[,pe]of this.items)pe.dispose();this.items.clear(),this.enabled=!1}}onEditorsChanged(){const pe=this.editorService.visibleTextEditorControls.filter(ve=>ve instanceof k.CodeEditorWidget).map(ve=>{const he=ve,ge=te.get(he);return ge&&(ge.modelRegistry=this),he.getModel()}).filter((ve,he,ge)=>!!ve&&!!ve.uri&&ge.indexOf(ve,he+1)===-1).map(ve=>this.textFileService.files.get(ve.uri)).filter(ve=>ve?.isResolved()),me=new Set(pe),be=pe.filter(ve=>!this.items.has(ve));[...this.items.keys()].filter(ve=>!me.has(ve)).forEach(ve=>this.onModelInvisible(ve)),be.forEach(ve=>this.onModelVisible(ve))}onModelVisible(pe){const me=this.instantiationService.createInstance(ae,pe),be=new se(pe.textEditorModel,me,this.configurationService);this.items.set(pe,new ue(me,be))}onModelInvisible(pe){this.items.get(pe).dispose(),this.items.delete(pe)}getModel(pe){for(const[me,be]of this.items)if(me.textEditorModel.id===pe.id)return be.model;return null}dispose(){this.disable(),super.dispose()}};oe=Ee([W(0,w.IEditorService),W(1,D.IInstantiationService),W(2,C.IConfigurationService),W(3,x.ITextFileService)],oe),e.DirtyDiffWorkbenchController=oe,(0,s.registerEditorContribution)(te.ID,te),(0,i.registerThemingParticipant)((fe,pe)=>{const me=fe.getColor(S.editorBackground),be=fe.getColor(e.editorGutterModifiedBackground),Ce=`-45deg, ${be} 25%, ${me} 25%, ${me} 50%, ${be} 50%, ${be} 75%, ${me} 75%, ${me}`;be&&pe.addRule(` .monaco-editor .dirty-diff-modified { background-size: 3px 4.5px; background-repeat-x: no-repeat; background-image: linear-gradient(${Ce}); transition: opacity 0.5s; } .monaco-editor .dirty-diff-modified:before { transform: translateX(3px); background-size: 3px 3px; background-image: linear-gradient(${Ce}); } .monaco-editor .margin:hover .dirty-diff-modified { opacity: 1; } `);const ve=fe.getColor(e.editorGutterAddedBackground);ve&&pe.addRule(` .monaco-editor .dirty-diff-added { border-left: 3px solid ${ve}; transition: opacity 0.5s; } .monaco-editor .dirty-diff-added:before { background: ${ve}; } .monaco-editor .margin:hover .dirty-diff-added { opacity: 1; } `);const he=fe.getColor(e.editorGutterDeletedBackground);he&&pe.addRule(` .monaco-editor .dirty-diff-deleted:after { border-left: 4px solid ${he}; transition: opacity 0.5s; } .monaco-editor .dirty-diff-deleted:before { background: ${he}; } .monaco-editor .margin:hover .dirty-diff-added { opacity: 1; } `)})}),define(ne[904],re([1,0,15,30,39,20,58,184,61,403,1598,7,5,67,627,215]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getModifiedRanges=void 0,(0,_.registerEditorAction)(class extends _.EditorAction{constructor(){super({id:"editor.action.formatChanges",label:v.localize(0,null),alias:"Format Modified Lines",precondition:C.ContextKeyExpr.and(k.EditorContextKeys.writable,k.EditorContextKeys.hasDocumentSelectionFormattingProvider)})}async run(r,p){const u=r.get(o.IInstantiationService);if(!p.hasModel())return;const a=await u.invokeFunction(s,p.getModel());if((0,t.isNonEmptyArray)(a))return u.invokeFunction(w.formatDocumentRangesWithSelectedProvider,p,a,1,c.Progress.None,f.CancellationToken.None)}});async function s(l,r){const p=l.get(S.ISCMService),u=l.get(D.IEditorWorkerService),a=l.get(I.ITextModelService),n=await(0,i.getOriginalResource)(p,r.uri);if(!n)return null;const h=[],g=await a.createModelReference(n);try{if(!u.canComputeDirtyDiff(n,r.uri))return;const d=await u.computeDirtyDiff(n,r.uri,!1);if(!(0,t.isNonEmptyArray)(d))return;for(let m of d)h.push(r.validateRange(new A.Range(m.modifiedStartLineNumber,1,m.modifiedEndLineNumber||m.modifiedStartLineNumber,Number.MAX_SAFE_INTEGER)))}finally{g.dispose()}return h}e.getModifiedRanges=s}),define(ne[2603],re([1,0,29,106,72,685,136,49,20,314,472,260,403,173,1465,8,5,67,83,2,47,17,904,62]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SaveParticipantsContribution=e.TrimFinalNewLinesParticipant=e.FinalNewLineParticipant=e.TrimWhitespaceParticipant=void 0;let g=class{constructor(x,F){this.configurationService=x,this.codeEditorService=F}async participate(x,F){!x.textEditorModel||this.configurationService.getValue("files.trimTrailingWhitespace",{overrideIdentifier:x.textEditorModel.getLanguageId(),resource:x.resource})&&this.doTrimTrailingWhitespace(x.textEditorModel,F.reason===2)}doTrimTrailingWhitespace(x,F){let L=[],M=[];const N=d(x,this.codeEditorService);if(N&&(L=N.getSelections(),F)){M=L.map(V=>V.getPosition());const P=c.SnippetController2.get(N)?.getSessionEnclosingRange();if(P)for(let V=P.startLineNumber;V<=P.endLineNumber;V++)M.push(new D.Position(V,x.getLineMaxColumn(V)))}const B=(0,A.trimTrailingWhitespace)(x,M);!B.length||x.pushEditOperations(L,B,P=>L)}};g=Ee([W(0,S.IConfigurationService),W(1,_.ICodeEditorService)],g),e.TrimWhitespaceParticipant=g;function d(O,x){let F=null;if(O.isAttachedToEditor()){for(const L of x.listCodeEditors())if(L.hasModel()&&L.getModel()===O){if(L.hasTextFocus())return L;F=L}}return F}let m=class{constructor(x,F){this.configurationService=x,this.codeEditorService=F}async participate(x,F){!x.textEditorModel||this.configurationService.getValue("files.insertFinalNewline",{overrideIdentifier:x.textEditorModel.getLanguageId(),resource:x.resource})&&this.doInsertFinalNewLine(x.textEditorModel)}doInsertFinalNewLine(x){const F=x.getLineCount(),L=x.getLineContent(F),M=t.lastNonWhitespaceIndex(L)===-1;if(!F||M)return;const N=[k.EditOperation.insert(new D.Position(F,x.getLineMaxColumn(F)),x.getEOL())],B=d(x,this.codeEditorService);B?B.executeEdits("insertFinalNewLine",N,B.getSelections()):x.pushEditOperations([],N,()=>null)}};m=Ee([W(0,S.IConfigurationService),W(1,_.ICodeEditorService)],m),e.FinalNewLineParticipant=m;let b=class{constructor(x,F){this.configurationService=x,this.codeEditorService=F}async participate(x,F){!x.textEditorModel||this.configurationService.getValue("files.trimFinalNewlines",{overrideIdentifier:x.textEditorModel.getLanguageId(),resource:x.resource})&&this.doTrimFinalNewLines(x.textEditorModel,F.reason===2)}findLastNonEmptyLine(x){for(let F=x.getLineCount();F>=1;F--)if(x.getLineContent(F).length>0)return F;return 0}doTrimFinalNewLines(x,F){const L=x.getLineCount();if(L===1)return;let M=[],N=0;const B=d(x,this.codeEditorService);if(B&&(M=B.getSelections(),F))for(let U=0,H=M.length;U<H;U++){const K=M[U].positionLineNumber;K>N&&(N=K)}const P=this.findLastNonEmptyLine(x),V=Math.max(P+1,N+1),z=x.validateRange(new I.Range(V,1,L,x.getLineMaxColumn(L)));z.isEmpty()||(x.pushEditOperations(M,[k.EditOperation.delete(z)],U=>M),B&&B.setSelections(M))}};b=Ee([W(0,S.IConfigurationService),W(1,_.ICodeEditorService)],b),e.TrimFinalNewLinesParticipant=b;let E=class{constructor(x,F,L){this.configurationService=x,this.codeEditorService=F,this.instantiationService=L}async participate(x,F,L,M){if(!x.textEditorModel||F.reason===2)return;const N=x.textEditorModel,B={overrideIdentifier:N.getLanguageId(),resource:N.uri},P=new l.Progress(H=>{L.report({message:(0,i.localize)(0,null,H.displayName||H.extensionId&&H.extensionId.value||"???","command:workbench.action.openSettings?%5B%22editor.formatOnSave%22%5D")})});if(!this.configurationService.getValue("editor.formatOnSave",B))return;const z=d(N,this.codeEditorService)||N,U=this.configurationService.getValue("editor.formatOnSaveMode",B);if(U==="file")await this.instantiationService.invokeFunction(o.formatDocumentWithSelectedProvider,z,2,P,M);else{const H=await this.instantiationService.invokeFunction(n.getModifiedRanges,(0,f.isCodeEditor)(z)?z.getModel():z);H===null&&U==="modificationsIfAvailable"?await this.instantiationService.invokeFunction(o.formatDocumentWithSelectedProvider,z,2,P,M):H&&await this.instantiationService.invokeFunction(o.formatDocumentRangesWithSelectedProvider,z,H,2,P,M)}}};E=Ee([W(0,S.IConfigurationService),W(1,_.ICodeEditorService),W(2,s.IInstantiationService)],E);let y=class{constructor(x,F,L){this.configurationService=x,this.instantiationService=F,this.languageFeaturesService=L}async participate(x,F,L,M){if(!x.textEditorModel||F.reason!==1)return;const N=x.textEditorModel,B={overrideIdentifier:N.getLanguageId(),resource:x.resource},P=this.configurationService.getValue("editor.codeActionsOnSave",B);if(!P)return;const V=Array.isArray(P)?P:Object.keys(P).filter(H=>P[H]),z=this.createCodeActionsOnSave(V);if(Array.isArray(P)||z.sort((H,K)=>C.CodeActionKind.SourceFixAll.contains(H)?C.CodeActionKind.SourceFixAll.contains(K)?0:-1:C.CodeActionKind.SourceFixAll.contains(K)?1:0),!z.length)return;const U=Array.isArray(P)?[]:Object.keys(P).filter(H=>P[H]===!1).map(H=>new C.CodeActionKind(H));L.report({message:(0,i.localize)(1,null)}),await this.applyOnSaveActions(N,z,U,L,M)}createCodeActionsOnSave(x){const F=x.map(L=>new C.CodeActionKind(L));return F.filter(L=>F.every(M=>M.equals(L)||!M.contains(L)))}async applyOnSaveActions(x,F,L,M,N){const B=new class{constructor(){this._names=new Set}_report(){M.report({message:(0,i.localize)(2,null,[...this._names].map(P=>`'${P}'`).join(", "),"command:workbench.action.openSettings?%5B%22editor.codeActionsOnSave%22%5D")})}report(P){P.displayName&&!this._names.has(P.displayName)&&(this._names.add(P.displayName),this._report())}};for(const P of F){const V=await this.getActionsToRun(x,P,L,B,N);try{for(const z of V.validActions)M.report({message:(0,i.localize)(3,null,z.action.title)}),await this.instantiationService.invokeFunction(v.applyCodeAction,z)}catch{}finally{V.dispose()}}}getActionsToRun(x,F,L,M,N){return(0,w.getCodeActions)(this.languageFeaturesService.codeActionProvider,x,x.getFullModelRange(),{type:2,filter:{include:F,excludes:L,includeSourceActions:!0}},M,N)}};y=Ee([W(0,S.IConfigurationService),W(1,s.IInstantiationService),W(2,h.ILanguageFeaturesService)],y);let T=class extends p.Disposable{constructor(x,F){super();this.instantiationService=x,this.textFileService=F,this.registerSaveParticipants()}registerSaveParticipants(){this._register(this.textFileService.files.addSaveParticipant(this.instantiationService.createInstance(g))),this._register(this.textFileService.files.addSaveParticipant(this.instantiationService.createInstance(y))),this._register(this.textFileService.files.addSaveParticipant(this.instantiationService.createInstance(E))),this._register(this.textFileService.files.addSaveParticipant(this.instantiationService.createInstance(m))),this._register(this.textFileService.files.addSaveParticipant(this.instantiationService.createInstance(b)))}};T=Ee([W(0,s.IInstantiationService),W(1,r.ITextFileService)],T),e.SaveParticipantsContribution=T,a.Registry.as(u.Extensions.Workbench).registerWorkbenchContribution(T,3)}),define(ne[2604],re([1,0,2422,2486,904]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),define(ne[2605],re([1,0,1710,18,2,417,21,52,42,335,61,5,93,83,140,20,136,45,19,11,44]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaceService=e.ReplacePreviewContentProvider=void 0;const a="replacePreview",n=b=>b.with({scheme:f.Schemas.internal,fragment:a,query:JSON.stringify({scheme:b.scheme})}),h=b=>b.with({scheme:JSON.parse(b.query).scheme,fragment:"",query:""});let g=class{constructor(E,y){this.instantiationService=E,this.textModelResolverService=y,this.textModelResolverService.registerTextModelContentProvider(f.Schemas.internal,this)}provideTextContent(E){return E.fragment===a?this.instantiationService.createInstance(d).resolve(E):null}};g=Ee([W(0,C.IInstantiationService),W(1,v.ITextModelService)],g),e.ReplacePreviewContentProvider=g;let d=class extends _.Disposable{constructor(E,y,T,R,O){super();this.modelService=E,this.languageService=y,this.textModelResolverService=T,this.replaceService=R,this.searchWorkbenchService=O}async resolve(E){const y=h(E),T=this.searchWorkbenchService.searchModel.searchResult.matches().filter(L=>L.resource.toString()===y.toString())[0],O=this._register(await this.textModelResolverService.createModelReference(y)).object.textEditorModel,x=O.getLanguageId(),F=this.modelService.createModel((0,o.createTextBufferFactoryFromSnapshot)(O.createSnapshot()),this.languageService.createById(x),E);return this._register(T.onChange(({forceUpdateModel:L})=>this.update(O,F,T,L))),this._register(this.searchWorkbenchService.searchModel.onReplaceTermChanged(()=>this.update(O,F,T))),this._register(T.onDispose(()=>F.dispose())),this._register(F.onWillDispose(()=>this.dispose())),this._register(O.onWillDispose(()=>this.dispose())),F}update(E,y,T,R=!1){!E.isDisposed()&&!y.isDisposed()&&this.replaceService.updateReplacePreview(T,R)}};d=Ee([W(0,D.IModelService),W(1,I.ILanguageService),W(2,v.ITextModelService),W(3,A.IReplaceService),W(4,w.ISearchWorkbenchService)],d);let m=class Ta{constructor(E,y,T,R,O){this.textFileService=E,this.editorService=y,this.textModelResolverService=T,this.bulkEditorService=R,this.labelService=O}async replace(E,y=void 0,T=null){const R=this.createEdits(E,T);return await this.bulkEditorService.apply(R,{progress:y}),p.Promises.settled(R.map(async O=>this.textFileService.files.get(O.resource)?.save({source:Ta.REPLACE_SAVE_SOURCE})))}async openReplacePreview(E,y,T,R){const O=E instanceof w.Match?E.parent():E,x=await this.editorService.openEditor({original:{resource:O.resource},modified:{resource:n(O.resource)},label:t.localize(1,null,O.name(),O.name()),description:this.labelService.getUriLabel((0,r.dirname)(O.resource),{relative:!0}),options:{preserveFocus:y,pinned:R,revealIfVisible:!0}}),F=x?.input,L=O.onDispose(()=>{F&&F.dispose(),L.dispose()});if(await this.updateReplacePreview(O),x){const M=x.getControl();E instanceof w.Match&&M&&M.revealLineInCenter(E.range().startLineNumber,1)}}async updateReplacePreview(E,y=!1){const T=n(E.resource),[R,O]=await Promise.all([this.textModelResolverService.createModelReference(E.resource),this.textModelResolverService.createModelReference(T)]),x=R.object.textEditorModel,F=O.object.textEditorModel;try{x&&F&&(y?F.setValue(x.getValue()):F.undo(),this.applyEditsToPreview(E,F))}finally{R.dispose(),O.dispose()}}applyEditsToPreview(E,y){const T=this.createEdits(E,y.uri),R=[];for(const O of T)R.push(s.EditOperation.replaceMove(S.Range.lift(O.textEdit.range),O.textEdit.text));y.pushEditOperations([],R.sort((O,x)=>S.Range.compareRangesUsingStarts(O.range,x.range)),()=>[])}createEdits(E,y=null){const T=[];if(E instanceof w.Match){const R=E;T.push(this.createEdit(R,R.replaceString,y))}return E instanceof w.FileMatch&&(E=[E]),E instanceof Array&&E.forEach(R=>{const O=R;O.count()>0&&T.push(...O.matches().map(x=>this.createEdit(x,x.replaceString,y)))}),T}createEdit(E,y,T=null){const R=E.parent();return new i.ResourceTextEdit(T??R.resource,{range:E.range(),text:y},void 0,void 0)}};m.REPLACE_SAVE_SOURCE=u.SaveSourceRegistry.registerSource("searchReplace.source",t.localize(0,null)),m=Ee([W(0,c.ITextFileService),W(1,k.IEditorService),W(2,v.ITextModelService),W(3,i.IBulkEditService),W(4,l.ILabelService)],m),e.ReplaceService=m}),define(ne[2606],re([1,0,35,417,2605,17,47]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerContributions=void 0;function D(){(0,t.registerSingleton)(f.IReplaceService,_.ReplaceService,!0),A.Registry.as(k.Extensions.Workbench).registerWorkbenchContribution(_.ReplacePreviewContentProvider,1)}e.registerContributions=D}),define(ne[505],re([1,0,15,20,1722,335,83,451]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseSerializedSearchEditor=e.parseSavedSearchEditor=e.serializeSearchResultForEditor=e.extractSearchQueryFromLines=e.defaultSearchConfig=e.extractSearchQueryFromModel=e.serializeSearchConfiguration=void 0;const D=` `,I=u=>a=>new f.Range(a.startLineNumber+u,a.startColumn,a.endLineNumber+u,a.endColumn),w=(u,a)=>{const n=d=>`${u.range().startLineNumber+d}`,h=u.fullPreviewLines(),g=[];return h.forEach((d,m)=>{const b=n(m),y=` ${" ".repeat(a-b.length)}${b}: `,T=y.length,R=y+(d.split(/\r?\n?$/,1)[0]||""),O=({start:M,end:N})=>new f.Range(1,(M??1)+T,1,(N??d.length+1)+T),x=u.rangeInPreview(),F=x.startLineNumber===x.endLineNumber;let L;F?L=O({start:x.startColumn,end:x.endColumn}):m===0?L=O({start:x.startColumn}):m===h.length-1?L=O({end:x.endColumn}):L=O({}),g.push({lineNumber:b,line:R,ranges:[L]})}),g};function v(u,a){const n=u.matches().sort(A.searchMatchComparer),h=n[n.length-1].range().endLineNumber.toString().length,d=[`${a(u.resource)}:`],m=[],b={},E=[];u.context.forEach((R,O)=>E.push({line:R,lineNumber:O})),E.sort((R,O)=>R.lineNumber-O.lineNumber);let y;const T=new Set;for(n.forEach(R=>{w(R,h).forEach(O=>{if(!T.has(O.lineNumber)){for(;E.length&&E[0].lineNumber<+O.lineNumber;){const{line:x,lineNumber:F}=E.shift();y!==void 0&&F!==y+1&&d.push(""),d.push(` ${" ".repeat(h-`${F}`.length)}${F} ${x}`),y=F}b[O.lineNumber]=d.length,T.add(O.lineNumber),d.push(O.line),y=+O.lineNumber}m.push(...O.ranges.map(I(b[O.lineNumber])))})});E.length;){const{line:R,lineNumber:O}=E.shift();d.push(` ${O} ${R}`)}return{text:d,matchRanges:m}}const C=(u,a,n,h)=>({query:u.contentPattern.pattern,isRegexp:!!u.contentPattern.isRegExp,isCaseSensitive:!!u.contentPattern.isCaseSensitive,matchWholeWord:!!u.contentPattern.isWordMatch,filesToExclude:n,filesToInclude:a,showIncludesExcludes:!!(a||n||u?.userDisabledExcludesAndIgnoreFiles),useExcludeSettingsAndIgnoreFiles:u?.userDisabledExcludesAndIgnoreFiles===void 0?!0:!u.userDisabledExcludesAndIgnoreFiles,contextLines:h,onlyOpenEditors:!!u.onlyOpenEditors}),o=u=>(h=>h.filter(g=>g!==!1&&g!==null&&g!==void 0))([`# Query: ${(h=>h.replace(/\\/g,"\\\\").replace(/\n/g,"\\n"))(u.query??"")}`,(u.isCaseSensitive||u.matchWholeWord||u.isRegexp||u.useExcludeSettingsAndIgnoreFiles===!1)&&`# Flags: ${(0,t.coalesce)([u.isCaseSensitive&&"CaseSensitive",u.matchWholeWord&&"WordMatch",u.isRegexp&&"RegExp",u.onlyOpenEditors&&"OpenEditors",u.useExcludeSettingsAndIgnoreFiles===!1&&"IgnoreExcludeSettings"]).join(" ")}`,u.filesToInclude?`# Including: ${u.filesToInclude}`:void 0,u.filesToExclude?`# Excluding: ${u.filesToExclude}`:void 0,u.contextLines?`# ContextLines: ${u.contextLines}`:void 0,""]).join(D);e.serializeSearchConfiguration=o;const c=u=>(0,e.extractSearchQueryFromLines)(u.getValueInRange(new f.Range(1,1,6,1)).split(D));e.extractSearchQueryFromModel=c;const i=()=>({query:"",filesToInclude:"",filesToExclude:"",isRegexp:!1,isCaseSensitive:!1,useExcludeSettingsAndIgnoreFiles:!0,matchWholeWord:!1,contextLines:0,showIncludesExcludes:!1,onlyOpenEditors:!1});e.defaultSearchConfig=i;const S=u=>{const a=(0,e.defaultSearchConfig)(),n=g=>{let d="";for(let m=0;m<g.length;m++)if(g[m]==="\\"){m++;const b=g[m];if(b==="n")d+=` `;else if(b==="\\")d+="\\";else throw Error((0,_.localize)(0,null))}else d+=g[m];return d},h=/^# ([^:]*): (.*)$/;for(const g of u){const d=h.exec(g);if(!d)continue;const[,m,b]=d;switch(m){case"Query":a.query=n(b);break;case"Including":a.filesToInclude=b;break;case"Excluding":a.filesToExclude=b;break;case"ContextLines":a.contextLines=+b;break;case"Flags":a.isRegexp=b.indexOf("RegExp")!==-1,a.isCaseSensitive=b.indexOf("CaseSensitive")!==-1,a.useExcludeSettingsAndIgnoreFiles=b.indexOf("IgnoreExcludeSettings")===-1,a.matchWholeWord=b.indexOf("WordMatch")!==-1,a.onlyOpenEditors=b.indexOf("OpenEditors")!==-1}}return a.showIncludesExcludes=!!(a.filesToInclude||a.filesToExclude||!a.useExcludeSettingsAndIgnoreFiles),a};e.extractSearchQueryFromLines=S;const s=(u,a,n,h,g,d,m)=>{if(!u.query)throw Error("Internal Error: Expected query, got null");const b=C(u.query,a,n,h),E=u.fileCount()>1?(0,_.localize)(1,null,u.fileCount()):(0,_.localize)(2,null),y=u.count()>1?(0,_.localize)(3,null,u.count()):(0,_.localize)(4,null),T=[u.count()?`${y} - ${E}`:(0,_.localize)(5,null)];m&&T.push((0,_.localize)(6,null)),T.push("");const R=(x,F)=>(0,A.searchMatchComparer)(x,F,d),O=l((0,t.flatten)(u.folderMatches().sort(R).map(x=>x.matches().sort(R).map(F=>v(F,g)))));return{matchRanges:O.matchRanges.map(I(T.length)),text:T.concat(O.text).join(D),config:b}};e.serializeSearchResultForEditor=s;const l=u=>{const a=[],n=[];return u.forEach(h=>{h.matchRanges.map(I(a.length)).forEach(g=>n.push(g)),h.text.forEach(g=>a.push(g)),a.push("")}),{text:a,matchRanges:n}},r=async(u,a)=>{const h=(await u.get(k.ITextFileService).read(a)).value;return(0,e.parseSerializedSearchEditor)(h)};e.parseSavedSearchEditor=r;const p=u=>{const a=[],n=[];let h=!0;for(const g of u.split(/\r?\n/g))h?(a.push(g),g===""&&(h=!1)):n.push(g);return{config:(0,e.extractSearchQueryFromLines)(a),text:n.join(` `)}};e.parseSerializedSearchEditor=p}),define(ne[2607],re([1,0,1723,28,85,42,48,16,41,9,291,53,34,23,83,157,19]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const l="workbench.action.openSnippets";var r;(function(n){function h(g){return!!g&&w.URI.isUri(g.filepath)}n.is=h})(r||(r={}));async function p(n,h,g){const d=[],m=[],b=new Set;for(const y of await n.getSnippetFiles())if(y.source!==3)if(y.isGlobalSnippets){await y.load();const T=new Set;e:for(const R of y.data)for(const O of R.scopes){const x=g.getLanguageName(O);if(x)if(T.size>=4){T.add(`${x}...`);break e}else T.add(x)}d.push({label:(0,s.basename)(y.location),filepath:y.location,description:T.size===0?t.localize(0,null):t.localize(1,null,[...T].join(", "))})}else{const T=(0,s.basename)(y.location).replace(/\.json$/,"");d.push({label:(0,s.basename)(y.location),description:`(${g.getLanguageName(T)})`,filepath:y.location}),b.add(T)}const E=h.snippetsHome;for(const y of g.getRegisteredLanguageIds()){const T=g.getLanguageName(y);T&&!b.has(y)&&m.push({label:y,description:`(${T})`,filepath:(0,s.joinPath)(E,`${y}.json`),hint:!0})}return d.sort((y,T)=>{let R=(0,k.extname)(y.filepath.path),O=(0,k.extname)(T.filepath.path);return R===O?y.label.localeCompare(T.label):R===".code-snippets"?-1:1}),m.sort((y,T)=>y.label.localeCompare(T.label)),{existing:d,future:m}}async function u(n,h,g,d,m,b){function E(R){const O=(0,k.extname)(R)!==".code-snippets"?`${R}.code-snippets`:R;return(0,s.joinPath)(h,O)}await d.createFolder(h);const y=await g.input({placeHolder:t.localize(2,null),async validateInput(R){if(!R)return t.localize(3,null);if(!(0,S.isValidBasename)(R))return t.localize(4,null,R);if(await d.exists(E(R)))return t.localize(5,null,R)}});if(!y)return;const T=E(y);await m.write(T,["{"," // Place your "+n+" snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and "," // description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope "," // is left empty or omitted, the snippet gets applied to all languages. The prefix is what is "," // used to trigger the snippet and the body will be expanded and inserted. Possible variables are: "," // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. "," // Placeholders with the same ids are connected."," // Example:",' // "Print to console": {',' // "scope": "javascript,typescript",',' // "prefix": "log",',' // "body": [',` // "console.log('$1');",`,' // "$2"'," // ],",' // "description": "Log output to console"'," // }","}"].join(` `)),await b.open(T)}async function a(n,h,g){if(await h.exists(n.filepath))return;const d=["{"," // Place your snippets for "+n.label+" here. Each snippet is defined under a snippet name and has a prefix, body and "," // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:"," // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the "," // same ids are connected."," // Example:",' // "Print to console": {',' // "prefix": "log",',' // "body": [',` // "console.log('$1');",`,' // "$2"'," // ],",' // "description": "Log output to console"'," // }","}"].join(` `);await g.write(n.filepath,d)}f.CommandsRegistry.registerCommand(l,async n=>{const h=n.get(v.ISnippetsService),g=n.get(C.IQuickInputService),d=n.get(I.IOpenerService),m=n.get(A.ILanguageService),b=n.get(_.IEnvironmentService),E=n.get(o.IWorkspaceContextService),y=n.get(c.IFileService),T=n.get(i.ITextFileService),R=await p(h,b,m),O=R.existing,x=[{scope:t.localize(6,null),label:t.localize(7,null),uri:b.snippetsHome}],F=[];for(const M of E.getWorkspace().folders)F.push({scope:t.localize(8,null,M.name),label:t.localize(9,null,M.name),uri:M.toResource(".vscode")});O.length>0?(O.unshift({type:"separator",label:t.localize(10,null)}),O.push({type:"separator",label:t.localize(11,null)})):O.push({type:"separator",label:t.localize(12,null)});const L=await g.pick([].concat(O,x,F,R.future),{placeHolder:t.localize(13,null),matchOnDescription:!0});if(x.indexOf(L)>=0)return u(L.scope,L.uri,g,y,T,d);if(F.indexOf(L)>=0)return u(L.scope,L.uri,g,y,T,d);if(r.is(L))return L.hint&&await a(L,y,T),d.open(L.filepath)}),D.MenuRegistry.appendMenuItem(D.MenuId.CommandPalette,{command:{id:l,title:{value:t.localize(14,null),original:"Configure User Snippets"},category:{value:t.localize(15,null),original:"Preferences"}}}),D.MenuRegistry.appendMenuItem(D.MenuId.MenubarPreferencesMenu,{group:"3_snippets",command:{id:l,title:t.localize(16,null)},order:1}),D.MenuRegistry.appendMenuItem(D.MenuId.GlobalActivity,{group:"3_snippets",command:{id:l,title:t.localize(17,null)},order:1})}),define(ne[905],re([1,0,2,19,29,42,211,1729,85,23,35,76,31,34,291,589,133,368,811,296,55,24,13,5,83,124]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getNonWhitespacePrefix=void 0;var m;(function(R){function O(x,F,L){if((0,_.isFalsyOrWhitespace)(F.path))return x.collector.error((0,D.localize)(0,null,x.description.name,String(F.path))),null;if((0,_.isFalsyOrWhitespace)(F.language)&&!F.path.endsWith(".code-snippets"))return x.collector.error((0,D.localize)(1,null,x.description.name,String(F.path))),null;if(!(0,_.isFalsyOrWhitespace)(F.language)&&!L.isRegisteredLanguageId(F.language))return x.collector.error((0,D.localize)(2,null,x.description.name,String(F.language))),null;const M=x.description.extensionLocation,N=f.joinPath(M,F.path);return f.isEqualOrParent(N,M)?{language:F.language,location:N}:(x.collector.error((0,D.localize)(3,null,x.description.name,N.path,M.path)),null)}R.toValidSnippet=O,R.snippetsContribution={description:(0,D.localize)(4,null),type:"array",defaultSnippets:[{body:[{language:"",path:""}]}],items:{type:"object",defaultSnippets:[{body:{language:"${1:id}",path:"./snippets/${2:id}.json."}}],properties:{language:{description:(0,D.localize)(5,null),type:"string"},path:{description:(0,D.localize)(6,null),type:"string"}}}},R.point=s.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"snippets",deps:[l.languagesExtPoint],jsonSchema:R.snippetsContribution})})(m||(m={}));function b(R,O,x){return(0,t.combinedDisposable)(R.watch(O),R.onDidFilesChange(F=>{F.affects(O)&&x()}))}let E=class jr{constructor(O){this._storageService=O;const x=O.get(jr._key,0,"");let F;try{F=JSON.parse(x)}catch{}this._ignored=(0,n.isStringArray)(F)?new Set(F):new Set}isIgnored(O){return this._ignored.has(O)}updateIgnored(O,x){let F=!1;this._ignored.has(O)&&!x?(this._ignored.delete(O),F=!0):!this._ignored.has(O)&&x&&(this._ignored.add(O),F=!0),F&&this._storageService.store(jr._key,JSON.stringify(Array.from(this._ignored)),0,0)}};E._key="snippets.ignoredSnippets",E=Ee([W(0,a.IStorageService)],E);let y=class{constructor(O,x,F,L,M,N,B,P,V,z){this._environmentService=O,this._contextService=x,this._languageService=F,this._logService=L,this._fileService=M,this._textfileService=N,this._extensionResourceLoaderService=B,this._disposables=new t.DisposableStore,this._pendingWork=[],this._files=new u.ResourceMap,this._pendingWork.push(Promise.resolve(P.when(3).then(()=>{this._initExtensionSnippets(),this._initUserSnippets(),this._initWorkspaceSnippets()}))),(0,k.setSnippetSuggestSupport)(new r.SnippetCompletionProvider(this._languageService,this,z)),this._enablement=V.createInstance(E)}dispose(){this._disposables.dispose()}isEnabled(O){return!O.snippetIdentifier||!this._enablement.isIgnored(O.snippetIdentifier)}updateEnablement(O,x){O.snippetIdentifier&&this._enablement.updateIgnored(O.snippetIdentifier,!x)}_joinSnippets(){const O=this._pendingWork.slice(0);return this._pendingWork.length=0,Promise.all(O)}async getSnippetFiles(){return await this._joinSnippets(),this._files.values()}async getSnippets(O,x){await this._joinSnippets();const F=[],L=[];if(this._languageService.isRegisteredLanguageId(O))for(const M of this._files.values())L.push(M.load().then(N=>N.select(O,F)).catch(N=>this._logService.error(N,M.location.toString())));return await Promise.all(L),this._filterSnippets(F,x)}getSnippetsSync(O,x){const F=[];if(this._languageService.isRegisteredLanguageId(O))for(const L of this._files.values())L.load().catch(M=>{}),L.select(O,F);return this._filterSnippets(F,x)}_filterSnippets(O,x){return O.filter(F=>(F.prefix||x?.includeNoPrefixSnippets)&&(this.isEnabled(F)||x?.includeDisabledSnippets))}_initExtensionSnippets(){m.point.setHandler(O=>{for(const[x,F]of this._files)F.source===3&&this._files.delete(x);for(const x of O)for(const F of x.value){const L=m.toValidSnippet(x,F,this._languageService);if(!L)continue;const M=this._files.get(L.location);if(M)M.defaultScopes?M.defaultScopes.push(L.language):M.defaultScopes=[];else{const N=new S.SnippetFile(3,L.location,L.language?[L.language]:void 0,x.description,this._fileService,this._extensionResourceLoaderService);this._files.set(N.location,N),this._environmentService.isExtensionDevelopment&&N.load().then(B=>{B.data.some(P=>P.isBogous)&&x.collector.warn((0,D.localize)(7,null,x.description.name))},B=>{x.collector.warn((0,D.localize)(8,null,N.location.toString()))})}}})}_initWorkspaceSnippets(){let O=new t.DisposableStore,x=()=>{O.clear(),this._pendingWork.push(this._initWorkspaceFolderSnippets(this._contextService.getWorkspace(),O))};this._disposables.add(O),this._disposables.add(this._contextService.onDidChangeWorkspaceFolders(x)),this._disposables.add(this._contextService.onDidChangeWorkbenchState(x)),x()}async _initWorkspaceFolderSnippets(O,x){const F=O.folders.map(async L=>{const M=L.toResource(".vscode");await this._fileService.exists(M)?this._initFolderSnippets(2,M,x):x.add(this._fileService.onDidFilesChange(B=>{B.contains(M,1)&&this._initFolderSnippets(2,M,x)}))});await Promise.all(F)}async _initUserSnippets(){const O=this._environmentService.snippetsHome;return await this._fileService.createFolder(O),await this._initFolderSnippets(1,O,this._disposables)}_initFolderSnippets(O,x,F){const L=new t.DisposableStore,M=async()=>{if(L.clear(),!!await this._fileService.exists(x))try{const N=await this._fileService.resolve(x);for(const B of N.children||[])L.add(this._addSnippetFile(B.resource,O))}catch(N){this._logService.error(`Failed snippets from folder '${x.toString()}'`,N)}};return F.add(this._textfileService.files.onDidSave(N=>{f.isEqualOrParent(N.model.resource,x)&&M()})),F.add(b(this._fileService,x,M)),F.add(L),M()}_addSnippetFile(O,x){const F=f.extname(O);if(x===1&&F===".json"){const L=f.basename(O).replace(/\.json/,"");this._files.set(O,new S.SnippetFile(x,O,[L],void 0,this._fileService,this._extensionResourceLoaderService))}else F===".code-snippets"&&this._files.set(O,new S.SnippetFile(x,O,void 0,void 0,this._fileService,this._extensionResourceLoaderService));return{dispose:()=>this._files.delete(O)}}};y=Ee([W(0,I.IEnvironmentService),W(1,c.IWorkspaceContextService),W(2,A.ILanguageService),W(3,o.ILogService),W(4,w.IFileService),W(5,g.ITextFileService),W(6,p.IExtensionResourceLoaderService),W(7,C.ILifecycleService),W(8,h.IInstantiationService),W(9,d.ILanguageConfigurationService)],y),(0,v.registerSingleton)(i.ISnippetsService,y,!0);function T(R,O){const x=100;let F=R.getLineContent(O.lineNumber).substr(0,O.column-1),L=Math.max(0,F.length-x);for(let M=F.length-1;M>=L;M--){let N=F.charAt(M);if(/\s/.test(N))return F.substr(M+1)}return L===0?F:""}e.getNonWhitespacePrefix=T}),define(ne[433],re([1,0,7,291,905,20,39,173,211,58,811,95,287,5]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TabCompletionController=void 0;let i=class Yr{constructor(l,r,p,u,a){this._editor=l,this._instantiationService=r,this._snippetService=p,this._clipboardService=u,this._activeSnippets=[],this._hasSnippets=Yr.ContextKey.bindTo(a),this._configListener=this._editor.onDidChangeConfiguration(n=>{n.hasChanged(111)&&this._update()}),this._update()}static get(l){return l.getContribution(Yr.ID)}dispose(){this._configListener.dispose(),this._selectionListener?.dispose()}_update(){const l=this._editor.getOption(111)==="onlySnippets";this._enabled!==l&&(this._enabled=l,this._enabled?(this._selectionListener=this._editor.onDidChangeCursorSelection(r=>this._updateSnippets()),this._editor.getModel()&&this._updateSnippets()):this._selectionListener?.dispose())}_updateSnippets(){if(this._activeSnippets=[],!this._editor.hasModel())return;const l=this._editor.getSelection(),r=this._editor.getModel();r.tokenizeIfCheap(l.positionLineNumber);const p=r.getLanguageIdAtPosition(l.positionLineNumber,l.positionColumn),u=this._snippetService.getSnippetsSync(p);if(!u){this._hasSnippets.set(!1);return}if(A.Range.isEmpty(l)){const a=(0,_.getNonWhitespacePrefix)(r,l.getPosition());if(a)for(const n of u)a.endsWith(n.prefix)&&this._activeSnippets.push(n)}else if(!A.Range.spansMultipleLines(l)&&r.getValueLengthInRange(l)<=100){const a=r.getValueInRange(l);if(a)for(const n of u)a===n.prefix&&this._activeSnippets.push(n)}this._hasSnippets.set(this._activeSnippets.length>0)}async performSnippetCompletions(){if(!!this._editor.hasModel()){if(this._activeSnippets.length===1){const[l]=this._activeSnippets;let r;if(l.needsClipboard){const p=new o.EditorState(this._editor,1|4);if(r=await this._clipboardService.readText(),!p.validate(this._editor))return}D.SnippetController2.get(this._editor)?.insert(l.codeSnippet,{overwriteBefore:l.prefix.length,overwriteAfter:0,clipboardText:r})}else if(this._activeSnippets.length>1){const l=this._editor.getPosition();this._instantiationService.invokeFunction(I.showSimpleSuggestions,this._editor,this._activeSnippets.map(r=>{const p=A.Range.fromPositions(l.delta(0,-r.prefix.length),l);return new v.SnippetCompletion(r,p)}))}}}};i.ID="editor.tabCompletionController",i.ContextKey=new t.RawContextKey("hasSnippetCompletions",void 0),i=Ee([W(1,c.IInstantiationService),W(2,f.ISnippetsService),W(3,C.IClipboardService),W(4,t.IContextKeyService)],i),e.TabCompletionController=i,(0,k.registerEditorContribution)(i.ID,i);const S=k.EditorCommand.bindToContribution(i.get);(0,k.registerEditorCommand)(new S({id:"insertSnippet",precondition:i.ContextKey,handler:s=>s.performSnippetCompletions(),kbOpts:{weight:100,kbExpr:t.ContextKeyExpr.and(w.EditorContextKeys.editorTextFocus,w.EditorContextKeys.tabDoesNotMoveFocus,D.SnippetController2.InSnippetMode.toNegated()),primary:2}}))}),define(ne[434],re([1,0,313,173,247,318,354,433,39]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSimpleCodeEditorWidgetOptions=e.getSimpleEditorOptions=void 0;function w(){return{wordWrap:"on",overviewRulerLanes:0,glyphMargin:!1,lineNumbers:"off",folding:!1,selectOnLineNumbers:!1,hideCursorInOverviewRuler:!0,selectionHighlight:!1,scrollbar:{horizontal:"hidden"},lineDecorationsWidth:0,overviewRulerBorder:!1,scrollBeyondLastLine:!1,renderLineHighlight:"none",fixedOverflowWidgets:!0,acceptSuggestionOnEnter:"smart",dragAndDrop:!1,revealHorizontalRightPadding:5,minimap:{enabled:!1},guides:{indentation:!1}}}e.getSimpleEditorOptions=w;function v(){return{isSimpleWidget:!0,contributions:I.EditorExtensionsRegistry.getSomeEditorContributions([A.MenuPreventer.ID,k.SelectionClipboardContributionID,t.ContextMenuController.ID,_.SuggestController.ID,f.SnippetController2.ID,D.TabCompletionController.ID])}}e.getSimpleCodeEditorWidgetOptions=v}),define(ne[628],re([1,0,10,138,6,51,14,9,165,136,49,20,52,313,173,247,7,5,32,68,12,318,434,354,39,483,379,236,155,62,1077]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextScopedSuggestEnabledInputWithHistory=e.SuggestEnabledInputWithHistory=e.SuggestEnabledInput=e.attachSuggestEnabledInputBoxStyler=void 0;function T(L,M,N){return(0,p.attachStyler)(M,{inputBackground:N?.inputBackground||r.inputBackground,inputForeground:N?.inputForeground||r.inputForeground,inputBorder:N?.inputBorder||r.inputBorder,inputPlaceholderForeground:N?.inputPlaceholderForeground||r.inputPlaceholderForeground},L)}e.attachSuggestEnabledInputBoxStyler=T;let R=class extends f.Widget{constructor(M,N,B,P,V,z,U,H,K,G){super();this._onShouldFocusResults=new _.Emitter,this.onShouldFocusResults=this._onShouldFocusResults.event,this._onEnter=new _.Emitter,this.onEnter=this._onEnter.event,this._onInputDidChange=new _.Emitter,this.onInputDidChange=this._onInputDidChange.event,this.stylingContainer=(0,t.append)(N,(0,t.$)(".suggest-input-container")),this.placeholderText=(0,t.append)(this.stylingContainer,(0,t.$)(".suggest-input-placeholder",void 0,z.placeholderText||""));const q=(0,A.mixin)((0,n.getSimpleEditorOptions)(),F(P)),Z=this.getScopedContextKeyService(K,N),j=Z?U.createChild(new E.ServiceCollection([s.IContextKeyService,Z])):U;this.inputWidget=j.createInstance(I.CodeEditorWidget,this.stylingContainer,q,{contributions:g.EditorExtensionsRegistry.getSomeEditorContributions([S.SuggestController.ID,i.SnippetController2.ID,c.ContextMenuController.ID,a.MenuPreventer.ID,h.SelectionClipboardContributionID]),isSimpleWidget:!0}),this._register(this.inputWidget);let X=D.URI.parse(V);this.inputModel=H.createModel("",null,X,!0),this._register(this.inputModel),this.inputWidget.setModel(this.inputModel),this._register(this.inputWidget.onDidPaste(()=>this.setValue(this.getValue()))),this._register(this.inputWidget.onDidFocusEditorText(()=>{z.focusContextKey&&z.focusContextKey.set(!0),this.stylingContainer.classList.add("synthetic-focus")})),this._register(this.inputWidget.onDidBlurEditorText(()=>{z.focusContextKey&&z.focusContextKey.set(!1),this.stylingContainer.classList.remove("synthetic-focus")}));const Y=_.Event.chain(this.inputWidget.onKeyDown);this._register(Y.filter(te=>te.keyCode===3).on(te=>{te.preventDefault(),this._onEnter.fire()},this)),this._register(Y.filter(te=>te.keyCode===18&&(k.isMacintosh?te.metaKey:te.ctrlKey)).on(()=>this._onShouldFocusResults.fire(),this));let $=this.getValue();const J=this.inputWidget.getModel();J&&this._register(J.onDidChangeContent(()=>{let te=this.getValue();this.placeholderText.style.visibility=te?"hidden":"visible",$.trim()!==te.trim()&&(this._onInputDidChange.fire(void 0),$=te)}));let ee={provideResults:B.provideResults,sortKey:B.sortKey||(te=>te),triggerCharacters:B.triggerCharacters||[]};this.setValue(z.value||""),this._register(G.completionProvider.register({scheme:X.scheme,pattern:"**/"+X.path,hasAccessToAllModels:!0},{triggerCharacters:ee.triggerCharacters,provideCompletionItems:(te,se,ie)=>{let ce=te.getValue();const le=se.column-1;let ae=ce.lastIndexOf(" ",le-1)+1,ue=le-ae;return ue>0&&ee.triggerCharacters.indexOf(ce[ae])===-1?{suggestions:[]}:{suggestions:B.provideResults(ce).map(oe=>{let fe,pe;return typeof oe=="string"?fe=oe:(fe=oe.label,pe=oe),{label:fe,insertText:fe,range:C.Range.fromPositions(se.delta(0,-ue),se),sortText:ee.sortKey(fe),kind:17,...pe}})}}}))}getScopedContextKeyService(M,N){}updateAriaLabel(M){this.inputWidget.updateOptions({ariaLabel:M})}get onFocus(){return this.inputWidget.onDidFocusEditorText}setValue(M){M=M.replace(/\s/g," ");const N=this.inputModel.getFullModelRange();this.inputWidget.executeEdits("suggestEnabledInput.setValue",[w.EditOperation.replace(N,M)]),this.inputWidget.setScrollTop(0),this.inputWidget.setPosition(new v.Position(1,M.length+1))}getValue(){return this.inputWidget.getValue()}style(M){this.stylingContainer.style.backgroundColor=M.inputBackground?M.inputBackground.toString():"",this.stylingContainer.style.color=M.inputForeground?M.inputForeground.toString():"",this.placeholderText.style.color=M.inputPlaceholderForeground?M.inputPlaceholderForeground.toString():"",this.stylingContainer.style.borderWidth="1px",this.stylingContainer.style.borderStyle="solid",this.stylingContainer.style.borderColor=M.inputBorder?M.inputBorder.toString():"transparent";const N=this.stylingContainer.getElementsByClassName("cursor")[0];N&&(N.style.backgroundColor=M.inputForeground?M.inputForeground.toString():"")}focus(M){this.inputWidget.focus(),M&&this.inputWidget.getValue()&&this.selectAll()}onHide(){this.inputWidget.onHide()}layout(M){this.inputWidget.layout(M),this.placeholderText.style.width=`${M.width-2}px`}selectAll(){this.inputWidget.setSelection(new C.Range(1,1,1,this.getValue().length+1))}};R=Ee([W(6,l.IInstantiationService),W(7,o.IModelService),W(8,s.IContextKeyService),W(9,y.ILanguageFeaturesService)],R),e.SuggestEnabledInput=R;let O=class extends R{constructor({id:M,parent:N,ariaLabel:B,suggestionProvider:P,resourceHandle:V,suggestOptions:z,history:U},H,K,G,q){super(M,N,P,B,V,z,H,K,G,q);this.history=new m.HistoryNavigator(U,100)}addToHistory(){const M=this.getValue();M&&M!==this.getCurrentValue()&&this.history.add(M)}getHistory(){return this.history.getHistory()}showNextValue(){this.history.has(this.getValue())||this.addToHistory();let M=this.getNextValue();M&&(M=M===this.getValue()?this.getNextValue():M),M&&this.setValue(M)}showPreviousValue(){this.history.has(this.getValue())||this.addToHistory();let M=this.getPreviousValue();M&&(M=M===this.getValue()?this.getPreviousValue():M),M&&(this.setValue(M),this.inputWidget.setPosition({lineNumber:0,column:0}))}clearHistory(){this.history.clear()}getCurrentValue(){let M=this.history.current();return M||(M=this.history.last(),this.history.next()),M}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()||this.history.last()}};O=Ee([W(1,l.IInstantiationService),W(2,o.IModelService),W(3,s.IContextKeyService),W(4,y.ILanguageFeaturesService)],O),e.SuggestEnabledInputWithHistory=O;let x=class extends O{constructor(M,N,B,P,V){super(M,N,B,P,V);const{historyNavigationBackwardsEnablement:z,historyNavigationForwardsEnablement:U}=this.historyContext;this._register(this.inputWidget.onDidChangeCursorPosition(({position:H})=>{const K=this.inputWidget._getViewModel(),G=K.getLineCount(),q=K.getLineContent(G).length+1,Z=K.coordinatesConverter.convertModelPositionToViewPosition(H);z.set(Z.lineNumber===1&&Z.column===1),U.set(Z.lineNumber===G&&Z.column===q)}))}getScopedContextKeyService(M,N){const B=this.historyContext=(0,b.createAndBindHistoryNavigationWidgetScopedContextKeyService)(M,{target:N,historyNavigator:this});return this._register(B.scopedContextKeyService),B.scopedContextKeyService}};x=Ee([W(1,l.IInstantiationService),W(2,o.IModelService),W(3,s.IContextKeyService),W(4,y.ILanguageFeaturesService)],x),e.ContextScopedSuggestEnabledInputWithHistory=x,(0,u.registerThemingParticipant)((L,M)=>{let N=L.getColor(r.selectionBackground);N?N=N.transparent(.4):N=L.getColor(r.editorSelectionBackground),N&&M.addRule(`.suggest-input-container .monaco-editor .focused .selected-text { background-color: ${N}; }`);const B=L.getColor(r.inputBackground);B&&M.addRule(`.suggest-input-container .monaco-editor .selected-text { background-color: ${B.transparent(.4)}; }`);const P=L.getColor(r.inputForeground);P&&M.addRule(`.suggest-input-container .monaco-editor .view-line span.inline-selected-text { color: ${P}; }`);const V=L.getColor(r.inputBackground);V&&M.addRule(`.suggest-input-container .monaco-editor-background { background-color: ${V}; } `)});function F(L){return{fontSize:13,lineHeight:20,wordWrap:"off",scrollbar:{vertical:"hidden"},roundedSelection:!1,guides:{indentation:!1},cursorWidth:1,fontFamily:d.DEFAULT_FONT_FAMILY,ariaLabel:L||"",snippetSuggestions:"none",suggest:{filterGraceful:!1,showIcons:!1},autoClosingBrackets:"never"}}}),define(ne[629],re([1,0,39,72,165,7,5,28,318,313,247,173,433,12,26,98,573,124,62]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleCommentEditor=e.ctxCommentEditorFocused=void 0,e.ctxCommentEditorFocused=new A.RawContextKey("commentEditorFocused",!1);let p=class extends _.CodeEditorWidget{constructor(a,n,h,g,d,m,b,E,y,T,R,O){const x={isSimpleWidget:!0,contributions:[{id:I.MenuPreventer.ID,ctor:I.MenuPreventer},{id:w.ContextMenuController.ID,ctor:w.ContextMenuController},{id:v.SuggestController.ID,ctor:v.SuggestController},{id:C.SnippetController2.ID,ctor:C.SnippetController2},{id:o.TabCompletionController.ID,ctor:o.TabCompletionController}]};super(a,n,x,g,d,m,b,E,y,T,R,O);this._commentEditorFocused=e.ctxCommentEditorFocused.bindTo(b),this._commentEditorEmpty=s.CommentContextKeys.commentIsEmpty.bindTo(b),this._commentEditorEmpty.set(!this.getValue()),this._parentThread=h,this._register(this.onDidFocusEditorWidget(F=>this._commentEditorFocused.set(!0))),this._register(this.onDidChangeModelContent(F=>this._commentEditorEmpty.set(!this.getValue()))),this._register(this.onDidBlurEditorWidget(F=>this._commentEditorFocused.reset()))}getParentThread(){return this._parentThread}_getActions(){return t.EditorExtensionsRegistry.getEditorActions()}static getEditorOptions(){return{wordWrap:"on",glyphMargin:!1,lineNumbers:"off",folding:!1,selectOnLineNumbers:!1,scrollbar:{vertical:"visible",verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1},overviewRulerLanes:2,lineDecorationsWidth:0,scrollBeyondLastLine:!1,renderLineHighlight:"none",fixedOverflowWidgets:!0,acceptSuggestionOnEnter:"smart",minimap:{enabled:!1},quickSuggestions:!1}}};p=Ee([W(3,k.IInstantiationService),W(4,f.ICodeEditorService),W(5,D.ICommandService),W(6,A.IContextKeyService),W(7,c.IThemeService),W(8,i.INotificationService),W(9,S.IAccessibilityService),W(10,l.ILanguageConfigurationService),W(11,r.ILanguageFeaturesService)],p),e.SimpleCommentEditor=p}),define(ne[2608],re([1,0,1477,10,86,78,36,2,9,52,42,5,12,249,629,84,6,26,163,37,2133,16,73,7,786,304,134,262,33,789,8]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentNode=void 0;let R=class extends D.Disposable{constructor(F,L,M,N,B,P,V,z,U,H,K,G,q,Z,j){super();this.commentThread=F,this.comment=L,this.owner=M,this.resource=N,this.parentThread=B,this.markdownRenderer=P,this.themeService=V,this.instantiationService=z,this.commentService=U,this.modelService=H,this.languageService=K,this.notificationService=G,this.contextMenuService=q,this.configurationService=j,this._editAction=null,this._commentEditContainer=null,this._commentEditor=null,this._commentEditorDisposables=[],this._commentEditorModel=null,this._commentFormActions=null,this._onDidClick=new s.Emitter,this.isEditing=!1,this._domNode=f.$("div.review-comment"),this._contextKeyService=Z.createScoped(this._domNode),this._commentContextValue=this._contextKeyService.createKey("comment",L.contextValue),this._domNode.tabIndex=-1;const X=f.append(this._domNode,f.$("div.avatar-container"));if(L.userIconPath){const Y=f.append(X,f.$("img.avatar"));Y.src=L.userIconPath.toString(),Y.onerror=$=>Y.remove()}this._commentDetailsContainer=f.append(this._domNode,f.$(".review-comment-contents")),this.createHeader(this._commentDetailsContainer),this._body=f.append(this._commentDetailsContainer,f.$(`div.comment-body.${d.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`)),this.updateCommentBody(this.comment.body),this.comment.commentReactions&&this.comment.commentReactions.length&&this.comment.commentReactions.filter(Y=>!!Y.count).length&&this.createReactionsContainer(this._commentDetailsContainer),this._domNode.setAttribute("aria-label",`${L.userName}, ${this.commentBodyValue}`),this._domNode.setAttribute("role","treeitem"),this._clearTimeout=null,this._register(f.addDisposableListener(this._domNode,f.EventType.CLICK,()=>this.isEditing||this._onDidClick.fire(this)))}get domNode(){return this._domNode}updateCommentBody(F){this._body.innerText="",this._md=void 0,typeof F=="string"?this._body.innerText=F:(this._md=this.markdownRenderer.render(F).element,this._body.appendChild(this._md))}get onDidClick(){return this._onDidClick.event}createTimestamp(F){this._timestamp=f.append(F,f.$("span.timestamp-container")),this.updateTimestamp(this.comment.timestamp)}updateTimestamp(F){if(!this._timestamp)return;const L=F!==void 0?new Date(F):void 0;L?this._timestampWidget?this._timestampWidget.setTimestamp(L):(this._timestampWidget=new y.TimestampWidget(this.configurationService,this._timestamp,L),this._register(this._timestampWidget)):this._timestampWidget?.dispose()}createHeader(F){const L=f.append(F,f.$(`div.comment-title.${d.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`)),M=f.append(L,f.$("strong.author"));M.innerText=this.comment.userName,this.createTimestamp(L),this._isPendingLabel=f.append(L,f.$("span.isPending")),this.comment.label?this._isPendingLabel.innerText=this.comment.label:this._isPendingLabel.innerText="",this._actionsToolbarContainer=f.append(L,f.$(".comment-actions.hidden")),this.createActionsToolbar()}getToolbarActions(F){const L=F.getActions({shouldForwardArgs:!0}),B={primary:[],secondary:[]};return O(L,B,!1,P=>/^inline/.test(P)),B}createToolbar(){this.toolbar=new r.ToolBar(this._actionsToolbarContainer,this.contextMenuService,{actionViewItemProvider:F=>F.id===u.ToggleReactionsAction.ID?new b.DropdownMenuActionViewItem(F,F.menuActions,this.contextMenuService,{actionViewItemProvider:L=>this.actionViewItemProvider(L),actionRunner:this.actionRunner,classNames:["toolbar-toggle-pickReactions",...E.Codicon.reactions.classNamesArray],anchorAlignmentProvider:()=>1}):this.actionViewItemProvider(F),orientation:0}),this.toolbar.context={thread:this.commentThread,commentUniqueId:this.comment.uniqueIdInThread,$mid:9},this.registerActionBarListeners(this._actionsToolbarContainer),this._register(this.toolbar)}createActionsToolbar(){const F=[];if(this.commentService.hasReactionHandler(this.owner)){let V=this.createReactionPicker(this.comment.commentReactions||[]);F.push(V)}const N=this.commentService.getCommentMenus(this.owner).getCommentTitleActions(this.comment,this._contextKeyService);this._register(N),this._register(N.onDidChange(V=>{const{primary:z,secondary:U}=this.getToolbarActions(N);!this.toolbar&&(z.length||U.length)&&this.createToolbar(),this.toolbar.setActions(z,U)}));const{primary:B,secondary:P}=this.getToolbarActions(N);F.push(...B),(F.length||P.length)&&(this.createToolbar(),this.toolbar.setActions(F,P))}actionViewItemProvider(F){let L={};return F.id===u.ToggleReactionsAction.ID?L={label:!1,icon:!0}:L={label:!1,icon:!0},F.id===u.ReactionAction.ID?new u.ReactionActionViewItem(F):F instanceof a.MenuItemAction?this.instantiationService.createInstance(n.MenuEntryActionViewItem,F,void 0):F instanceof a.SubmenuItemAction?this.instantiationService.createInstance(n.SubmenuEntryActionViewItem,F,void 0):new m.ActionViewItem({},F,L)}createReactionPicker(F){let L,M=this._register(new u.ToggleReactionsAction(()=>{L&&L.show()},t.localize(0,null))),N=[];return F&&F.length&&(N=F.map(B=>new k.Action(`reaction.command.${B.label}`,`${B.label}`,"",!0,async()=>{try{await this.commentService.toggleReaction(this.owner,this.resource,this.commentThread,this.comment,B)}catch(P){const V=P.message?t.localize(1,null,P.message):t.localize(2,null);this.notificationService.error(V)}}))),M.menuActions=N,L=new b.DropdownMenuActionViewItem(M,M.menuActions,this.contextMenuService,{actionViewItemProvider:B=>B.id===u.ToggleReactionsAction.ID?L:this.actionViewItemProvider(B),actionRunner:this.actionRunner,classNames:"toolbar-toggle-pickReactions",anchorAlignmentProvider:()=>1}),M}createReactionsContainer(F){this._reactionActionsContainer=f.append(F,f.$("div.comment-reactions")),this._reactionsActionBar=new A.ActionBar(this._reactionActionsContainer,{actionViewItemProvider:M=>M.id===u.ToggleReactionsAction.ID?new b.DropdownMenuActionViewItem(M,M.menuActions,this.contextMenuService,{actionViewItemProvider:N=>this.actionViewItemProvider(N),actionRunner:this.actionRunner,classNames:"toolbar-toggle-pickReactions",anchorAlignmentProvider:()=>1}):this.actionViewItemProvider(M)}),this._register(this._reactionsActionBar);let L=this.commentService.hasReactionHandler(this.owner);if(this.comment.commentReactions.filter(M=>!!M.count).map(M=>{let N=new u.ReactionAction(`reaction.${M.label}`,`${M.label}`,M.hasReacted&&(M.canEdit||L)?"active":"",M.canEdit||L,async()=>{try{await this.commentService.toggleReaction(this.owner,this.resource,this.commentThread,this.comment,M)}catch(B){let P;M.hasReacted?P=B.message?t.localize(3,null,B.message):t.localize(4,null):P=B.message?t.localize(5,null,B.message):t.localize(6,null),this.notificationService.error(P)}},M.iconPath,M.count);this._reactionsActionBar&&this._reactionsActionBar.push(N,{label:!0,icon:!0})}),L){let M=this.createReactionPicker(this.comment.commentReactions||[]);this._reactionsActionBar.push(M,{label:!1,icon:!0})}}get commentBodyValue(){return typeof this.comment.body=="string"?this.comment.body:this.comment.body.value}createCommentEditor(F){const L=f.append(F,f.$(".edit-textarea"));this._commentEditor=this.instantiationService.createInstance(i.SimpleCommentEditor,L,i.SimpleCommentEditor.getEditorOptions(),this.parentThread);const M=I.URI.parse(`comment:commentinput-${this.comment.uniqueIdInThread}-${Date.now()}.md`);this._commentEditorModel=this.modelService.createModel("",this.languageService.createByFilepathOrFirstLine(M),M,!1),this._commentEditor.setModel(this._commentEditorModel),this._commentEditor.setValue(this.commentBodyValue),this._commentEditor.layout({width:L.clientWidth-14,height:90}),this._commentEditor.focus(),f.scheduleAtNextAnimationFrame(()=>{this._commentEditor.layout({width:L.clientWidth-14,height:90}),this._commentEditor.focus()});const N=this._commentEditorModel.getLineCount(),B=this._commentEditorModel.getLineContent(N).length+1;this._commentEditor.setSelection(new S.Selection(N,B,N,B));let P=this.commentThread;P.input={uri:this._commentEditor.getModel().uri,value:this.commentBodyValue},this.commentService.setActiveCommentThread(P),this._commentEditorDisposables.push(this._commentEditor.onDidFocusEditorWidget(()=>{P.input={uri:this._commentEditor.getModel().uri,value:this.commentBodyValue},this.commentService.setActiveCommentThread(P)})),this._commentEditorDisposables.push(this._commentEditor.onDidChangeModelContent(V=>{if(P.input&&this._commentEditor&&this._commentEditor.getModel().uri===P.input.uri){let z=this._commentEditor.getValue();if(z!==P.input.value){let U=P.input;U.value=z,P.input=U,this.commentService.setActiveCommentThread(P)}}})),this._register(this._commentEditor),this._register(this._commentEditorModel)}removeCommentEditor(){this.isEditing=!1,this._editAction&&(this._editAction.enabled=!0),this._body.classList.remove("hidden"),this._commentEditorModel&&this._commentEditorModel.dispose(),this._commentEditorDisposables.forEach(F=>F.dispose()),this._commentEditorDisposables=[],this._commentEditor&&(this._commentEditor.dispose(),this._commentEditor=null),this._commentEditContainer.remove()}layout(){this._commentEditor?.layout()}switchToEditMode(){if(this.isEditing)return;this.isEditing=!0,this._body.classList.add("hidden"),this._commentEditContainer=f.append(this._commentDetailsContainer,f.$(".edit-container")),this.createCommentEditor(this._commentEditContainer);const F=f.append(this._commentEditContainer,f.$(".form-actions")),M=this.commentService.getCommentMenus(this.owner).getCommentActions(this.comment,this._contextKeyService);this._register(M),this._register(M.onDidChange(()=>{this._commentFormActions&&this._commentFormActions.setActions(M)})),this._commentFormActions=new g.CommentFormActions(F,N=>{let B=this._commentEditor.getValue();N.run({thread:this.commentThread,commentUniqueId:this.comment.uniqueIdInThread,text:B,$mid:10}),this.removeCommentEditor()},this.themeService),this._commentFormActions.setActions(M)}setFocus(F,L=!1){F?(this._domNode.focus(),this._actionsToolbarContainer.classList.remove("hidden"),this._actionsToolbarContainer.classList.add("tabfocused"),this._domNode.tabIndex=0,this.comment.mode===_.CommentMode.Editing&&this._commentEditor?.focus()):(this._actionsToolbarContainer.classList.contains("tabfocused")&&!this._actionsToolbarContainer.classList.contains("mouseover")&&(this._actionsToolbarContainer.classList.add("hidden"),this._domNode.tabIndex=-1),this._actionsToolbarContainer.classList.remove("tabfocused"))}registerActionBarListeners(F){this._register(f.addDisposableListener(this._domNode,"mouseenter",()=>{F.classList.remove("hidden"),F.classList.add("mouseover")})),this._register(f.addDisposableListener(this._domNode,"mouseleave",()=>{F.classList.contains("mouseover")&&!F.classList.contains("tabfocused")&&F.classList.add("hidden"),F.classList.remove("mouseover")}))}update(F){F.body!==this.comment.body&&this.updateCommentBody(F.body),F.mode!==void 0&&F.mode!==this.comment.mode&&(F.mode===_.CommentMode.Editing?this.switchToEditMode():this.removeCommentEditor()),this.comment=F,F.label?this._isPendingLabel.innerText=F.label:this._isPendingLabel.innerText="",this._reactionActionsContainer&&this._reactionActionsContainer.remove(),this._reactionsActionBar&&this._reactionsActionBar.clear(),this.comment.commentReactions&&this.comment.commentReactions.some(L=>!!L.count)&&this.createReactionsContainer(this._commentDetailsContainer),this.comment.contextValue?this._commentContextValue.set(this.comment.contextValue):this._commentContextValue.reset(),this.comment.timestamp&&this.updateTimestamp(this.comment.timestamp)}focus(){this.domNode.focus(),this._clearTimeout||(this.domNode.classList.add("focus"),this._clearTimeout=setTimeout(()=>{this.domNode.classList.remove("focus")},3e3))}};R=Ee([W(6,o.IThemeService),W(7,C.IInstantiationService),W(8,c.ICommentService),W(9,w.IModelService),W(10,v.ILanguageService),W(11,l.INotificationService),W(12,p.IContextMenuService),W(13,h.IContextKeyService),W(14,T.IConfigurationService)],R),e.CommentNode=R;function O(x,F,L,M=N=>N==="navigation"){for(let N of x){let[B,P]=N;if(L&&(P=P.map(V=>V instanceof a.MenuItemAction&&!!V.alt?V.alt:V)),M(B))(Array.isArray(F)?F:F.primary).unshift(...P);else{const V=Array.isArray(F)?F:F.secondary;V.length>0&&V.push(new k.Separator),V.push(...P)}}}}),define(ne[630],re([1,0,10,304,2,9,89,42,52,1478,32,12,786,249,573,629]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentReply=e.COMMENTEDITOR_DECORATION_KEY=void 0;const s="comment";let l=0;e.COMMENTEDITOR_DECORATION_KEY="commenteditordecoration";let r=class extends _.Disposable{constructor(u,a,n,h,g,d,m,b,E,y,T,R,O,x){super();this.owner=u,this._commentThread=n,this._scopedInstatiationService=h,this._contextKeyService=g,this._commentMenus=d,this._commentOptions=m,this._pendingComment=b,this._parentThread=E,this._actionRunDelegate=y,this.commentService=T,this.languageService=R,this.modelService=O,this.themeService=x,this._commentThreadDisposables=[],this.form=t.append(a,t.$(".comment-form")),this.commentEditor=this._register(this._scopedInstatiationService.createInstance(S.SimpleCommentEditor,this.form,S.SimpleCommentEditor.getEditorOptions(),this._parentThread)),this.commentEditorIsEmpty=i.CommentContextKeys.commentIsEmpty.bindTo(this._contextKeyService),this.commentEditorIsEmpty.set(!this._pendingComment);const F=this._commentThread.comments&&this._commentThread.comments.length>0,L=(0,k.generateUuid)()+"-"+(F?this._commentThread.threadId:++l),M=JSON.stringify({extensionId:this._commentThread.extensionId,commentThreadId:this._commentThread.threadId});let N=A.URI.parse(`${s}://${this._commentThread.extensionId}/commentinput-${L}.md?${M}`),B=this.commentService.getCommentController(u);B&&(N=N.with({authority:B.id}));const P=this.modelService.createModel(this._pendingComment||"",this.languageService.createByFilepathOrFirstLine(N),N,!1);this._register(P),this.commentEditor.setModel(P),this._register(this.commentEditor.getModel().onDidChangeContent(()=>{this.setCommentEditorDecorations(),this.commentEditorIsEmpty?.set(!this.commentEditor.getValue())})),this.createTextModelListener(this.commentEditor,this.form),this.setCommentEditorDecorations(),F?this.createReplyButton(this.commentEditor,this.form):this._commentThread.comments&&this._commentThread.comments.length===0&&this.expandReplyArea(),this._error=t.append(this.form,t.$(".validation-error.hidden")),this._formActions=t.append(this.form,t.$(".form-actions")),this.createCommentWidgetActions(this._formActions,P)}updateCommentThread(u){const a=this.commentEditor.hasTextFocus();this._reviewThreadReplyButton||this.createReplyButton(this.commentEditor,this.form),this._commentThread.comments&&this._commentThread.comments.length===0&&this.expandReplyArea(),a&&this.commentEditor.focus()}getPendingComment(){let u=this.commentEditor.getModel();return u&&u.getValueLength()>0?u.getValue():null}layout(u){this.commentEditor.layout({height:5*18,width:u-54})}focusIfNeeded(){!this._commentThread.comments||!this._commentThread.comments.length?this.commentEditor.focus():this.commentEditor.getModel().getValueLength()>0&&this.expandReplyArea()}focusCommentEditor(){this.commentEditor.focus()}getCommentModel(){return this.commentEditor.getModel()}updateCanReply(){this._commentThread.canReply?this.form.style.display="block":this.form.style.display="none"}async submitComment(){this._commentFormActions&&this._commentFormActions.triggerDefaultAction()}setCommentEditorDecorations(){const u=this.commentEditor.getModel();if(u){const a=u.getValueLength(),n=this._commentThread.comments&&this._commentThread.comments.length>0,h=a>0?"":n?this._commentOptions?.placeHolder||w.localize(0,null):this._commentOptions?.placeHolder||w.localize(1,null),g=[{range:{startLineNumber:0,endLineNumber:0,startColumn:0,endColumn:1},renderOptions:{after:{contentText:h,color:`${(0,v.resolveColorValue)(v.editorForeground,this.themeService.getColorTheme())?.transparent(.4)}`}}}];this.commentEditor.setDecorations("review-zone-widget",e.COMMENTEDITOR_DECORATION_KEY,g)}}createTextModelListener(u,a){this._commentThreadDisposables.push(u.onDidFocusEditorWidget(()=>{this._commentThread.input={uri:u.getModel().uri,value:u.getValue()},this.commentService.setActiveCommentThread(this._commentThread)})),this._commentThreadDisposables.push(u.getModel().onDidChangeContent(()=>{let n=u.getValue();if(this._commentThread.input&&this._commentThread.input.uri===u.getModel().uri&&this._commentThread.input.value!==n){let h=this._commentThread.input;h.value=n,this._commentThread.input=h}this.commentService.setActiveCommentThread(this._commentThread)})),this._commentThreadDisposables.push(this._commentThread.onDidChangeInput(n=>{let h=this._commentThread;h.input&&h.input.uri!==u.getModel().uri||!n||u.getValue()!==n.value&&(u.setValue(n.value),n.value===""&&(this._pendingComment="",a.classList.remove("expand"),u.getDomNode().style.outline="",this._error.textContent="",this._error.classList.add("hidden")))}))}createCommentWidgetActions(u,a){const n=this._commentMenus.getCommentThreadActions(this._contextKeyService);this._register(n),this._register(n.onDidChange(()=>{this._commentFormActions.setActions(n)})),this._commentFormActions=new o.CommentFormActions(u,async h=>{this._actionRunDelegate&&this._actionRunDelegate(),h.run({thread:this._commentThread,text:this.commentEditor.getValue(),$mid:8}),this.hideReplyArea()},this.themeService),this._commentFormActions.setActions(n)}expandReplyArea(){this.form.classList.contains("expand")||(this.form.classList.add("expand"),this.commentEditor.focus(),this.commentEditor.layout())}hideReplyArea(){this.commentEditor.setValue(""),this.commentEditor.getDomNode().style.outline="",this._pendingComment="",this.form.classList.remove("expand"),this._error.textContent="",this._error.classList.add("hidden")}createReplyButton(u,a){this._reviewThreadReplyButton=t.append(a,t.$(`button.review-thread-reply-button.${f.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`)),this._reviewThreadReplyButton.title=this._commentOptions?.prompt||w.localize(2,null),this._reviewThreadReplyButton.textContent=this._commentOptions?.prompt||w.localize(3,null),this._register(t.addDisposableListener(this._reviewThreadReplyButton,"click",n=>this.expandReplyArea())),this._register(t.addDisposableListener(this._reviewThreadReplyButton,"focus",n=>this.expandReplyArea())),u.onDidBlurEditorWidget(()=>{u.getModel().getValueLength()===0&&a.classList.contains("expand")&&a.classList.remove("expand")})}};r=Ee([W(10,c.ICommentService),W(11,D.ILanguageService),W(12,I.IModelService),W(13,C.IThemeService)],r),e.CommentReply=r}),define(ne[2609],re([1,0,10,1479,2,86,6,249,91,2608,186,41,42]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentThreadBody=void 0;let c=class extends _.Disposable{constructor(S,s,l,r,p,u,a,n,h,g){super();this.owner=S,this.parentResourceUri=s,this.container=l,this._options=r,this._commentThread=p,this._scopedInstatiationService=u,this._parentCommentThreadWidget=a,this.commentService=n,this.openerService=h,this.languageService=g,this._commentElements=[],this._focusedComment=void 0,this._onDidResize=new k.Emitter,this.onDidResize=this._onDidResize.event,this._commentDisposable=new Map,this._register(t.addDisposableListener(l,t.EventType.FOCUS_IN,d=>{this.commentService.setActiveCommentThread(this._commentThread)})),this._markdownRenderer=this._register(new v.MarkdownRenderer(this._options,this.languageService,this.openerService))}get length(){return this._commentThread.comments?this._commentThread.comments.length:0}get activeComment(){return this._commentElements.filter(S=>S.isEditing)[0]}focus(){this._commentsElement.focus()}display(){if(this._commentsElement=t.append(this.container,t.$("div.comments-container")),this._commentsElement.setAttribute("role","presentation"),this._commentsElement.tabIndex=0,this._updateAriaLabel(),this._register(t.addDisposableListener(this._commentsElement,t.EventType.KEY_DOWN,S=>{let s=new I.StandardKeyboardEvent(S);if(s.equals(16)||s.equals(18)){const l=r=>{if(this._focusedComment===void 0&&r>=0)return 0;if(this._focusedComment===void 0&&r<0)return this._commentElements.length-1;let p=this._focusedComment+r;return Math.min(Math.max(0,p),this._commentElements.length-1)};this._setFocusedComment(s.equals(16)?l(-1):l(1))}})),this._commentElements=[],this._commentThread.comments)for(const S of this._commentThread.comments){const s=this.createNewCommentNode(S);this._commentElements.push(s),this._commentsElement.appendChild(s.domNode),S.mode===A.CommentMode.Editing&&s.switchToEditMode()}this._resizeObserver=new MutationObserver(this._refresh.bind(this)),this._resizeObserver.observe(this.container,{attributes:!0,childList:!0,characterData:!0,subtree:!0})}_refresh(){let S=t.getClientArea(this.container);this._onDidResize.fire(S)}getDimensions(){return t.getClientArea(this.container)}layout(){this._commentElements.forEach(S=>{S.layout()})}getCommentCoords(S){let s=this._commentElements.filter(l=>l.comment.uniqueIdInThread===S);if(s&&s.length){const l=t.getDomNodePagePosition(this._commentElements[0].domNode),r=t.getDomNodePagePosition(s[0].domNode);return{thread:l,comment:r}}}updateCommentThread(S){const s=this._commentElements.length,l=S.comments?S.comments.length:0;let r=[],p=[];for(let h=0;h<s;h++){let g=this._commentElements[h].comment,d=S.comments?S.comments.filter(m=>m.uniqueIdInThread===g.uniqueIdInThread):[];d.length?this._commentElements[h].update(d[0]):(p.push(h),r.push(this._commentElements[h]))}for(let h=r.length-1;h>=0;h--){const g=r[h];this._commentDisposable.get(g)?.dispose(),this._commentDisposable.delete(g),this._commentElements.splice(p[h],1),this._commentsElement.removeChild(g.domNode)}let u=null,a=[],n=[];for(let h=l-1;h>=0;h--){let g=S.comments[h],d=this._commentElements.filter(m=>m.comment.uniqueIdInThread===g.uniqueIdInThread);if(d.length)u=d[0].domNode,a.unshift(d[0]);else{const m=this.createNewCommentNode(g);a.unshift(m),u?(this._commentsElement.insertBefore(m.domNode,u),u=m.domNode):(this._commentsElement.appendChild(m.domNode),u=m.domNode),g.mode===A.CommentMode.Editing&&(m.switchToEditMode(),n.push(m))}}if(this._commentThread=S,this._commentElements=a,n.length){const h=this._commentElements.indexOf(n[n.length-1]);this._focusedComment=h}this._updateAriaLabel(),this._setFocusedComment(this._focusedComment)}_updateAriaLabel(){this._commentsElement.ariaLabel=f.localize(0,null,this._commentThread.comments?.length,this._commentThread.label)}_setFocusedComment(S){this._focusedComment!==void 0&&this._commentElements[this._focusedComment]?.setFocus(!1),this._commentElements.length===0||S===void 0?this._focusedComment=void 0:(this._focusedComment=Math.min(S,this._commentElements.length-1),this._commentElements[this._focusedComment].setFocus(!0))}createNewCommentNode(S){let s=this._scopedInstatiationService.createInstance(w.CommentNode,this._commentThread,S,this.owner,this.parentResourceUri,this._parentCommentThreadWidget,this._markdownRenderer);return this._register(s),this._commentDisposable.set(s,s.onDidClick(l=>this._setFocusedComment(this._commentElements.findIndex(r=>r.comment.uniqueIdInThread===l.comment.uniqueIdInThread)))),s}dispose(){super.dispose(),this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null),this._commentDisposable.forEach(S=>S.dispose())}};c=Ee([W(7,D.ICommentService),W(8,C.IOpenerService),W(9,o.ILanguageService)],c),e.CommentThreadBody=c}),define(ne[906],re([1,0,10,6,2,630,249,2609,2132,573,574,32,82,785,678]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentThreadWidget=e.COMMENTEDITOR_DECORATION_KEY=void 0,e.COMMENTEDITOR_DECORATION_KEY="commenteditordecoration";let i=class extends _.Disposable{constructor(s,l,r,p,u,a,n,h,g,d,m){super();this.container=s,this._owner=l,this._parentResourceUri=r,this._contextKeyService=p,this._scopedInstatiationService=u,this._commentThread=a,this._pendingComment=n,this._markdownOptions=h,this._commentOptions=g,this._containerDelegate=d,this.commentService=m,this._commentThreadDisposables=[],this._onDidResize=new f.Emitter,this.onDidResize=this._onDidResize.event,this._threadIsEmpty=w.CommentContextKeys.commentThreadIsEmpty.bindTo(this._contextKeyService),this._threadIsEmpty.set(!a.comments||!a.comments.length),this._commentMenus=this.commentService.getCommentMenus(this._owner),this._header=new I.CommentThreadHeader(s,{collapse:this.collapse.bind(this)},this._commentMenus,this._commentThread,this._contextKeyService,this._scopedInstatiationService),this._header.updateCommentThread(this._commentThread);const b=t.$(".body");s.appendChild(b),this._body=this._scopedInstatiationService.createInstance(D.CommentThreadBody,this._owner,this._parentResourceUri,b,this._markdownOptions,this._commentThread,this._scopedInstatiationService,this),this._styleElement=t.createStyleSheet(this.container),this._commentThreadContextValue=this._contextKeyService.createKey("commentThread",void 0),this._commentThreadContextValue.set(a.contextValue);const E=this._contextKeyService.createKey("commentController",void 0),y=this.commentService.getCommentController(this._owner);y&&E.set(y.contextValue)}get commentThread(){return this._commentThread}updateCommentThread(s){this._commentThread!==s&&this._commentThreadDisposables.forEach(l=>l.dispose()),this._commentThread=s,this._commentThreadDisposables=[],this._bindCommentThreadListeners(),this._body.updateCommentThread(s),this._threadIsEmpty.set(!this._body.length),this._header.updateCommentThread(s),this._commentReply?.updateCommentThread(s),this._commentThread.contextValue?this._commentThreadContextValue.set(this._commentThread.contextValue):this._commentThreadContextValue.reset()}display(s){let l=Math.ceil(s*1.2);this._header.updateHeight(l),this._body.display(),this._commentThread.canReply&&this._createCommentForm(),this._register(this._body.onDidResize(r=>{this._refresh(r)})),this._commentThread.canReply&&this._commentReply&&this._commentReply?.focusIfNeeded(),this._bindCommentThreadListeners()}_refresh(s){this._body.layout(),this._onDidResize.fire(s)}_bindCommentThreadListeners(){this._commentThreadDisposables.push(this._commentThread.onDidChangeCanReply(()=>{this._commentReply?this._commentReply.updateCanReply():this._commentThread.canReply&&this._createCommentForm()})),this._commentThreadDisposables.push(this._commentThread.onDidChangeComments(async s=>{await this.updateCommentThread(this._commentThread)})),this._commentThreadDisposables.push(this._commentThread.onDidChangeLabel(s=>{this._header.createThreadLabel()}))}_createCommentForm(){this._commentReply=this._scopedInstatiationService.createInstance(A.CommentReply,this._owner,this._body.container,this._commentThread,this._scopedInstatiationService,this._contextKeyService,this._commentMenus,this._commentOptions,this._pendingComment,this,this._containerDelegate.actionRunner),this._register(this._commentReply)}getCommentCoords(s){return this._body.getCommentCoords(s)}getPendingComment(){return this._commentReply?this._commentReply.getPendingComment():null}getDimensions(){return this._body?.getDimensions()}layout(s){this._body.layout(),s!==void 0&&this._commentReply?.layout(s)}focusCommentEditor(){this._commentReply?.focusCommentEditor()}focus(){this._body.focus()}async submitComment(){const s=this._body.activeComment;s&&!(s instanceof v.CommentNode)&&this._commentReply?.submitComment()}collapse(){this._containerDelegate.collapse()}applyTheme(s,l){const r=[];r.push(`.monaco-editor .review-widget > .body { border-top: 1px solid var(${c.commentThreadStateColorVar}) }`);const p=s.getColor(C.textLinkForeground);p&&r.push(`.review-widget .body .comment-body a { color: ${p} }`);const u=s.getColor(C.textLinkActiveForeground);u&&r.push(`.review-widget .body .comment-body a:hover, a:active { color: ${u} }`);const a=s.getColor(C.focusBorder);a&&(r.push(`.review-widget .body .comment-body a:focus { outline: 1px solid ${a}; }`),r.push(`.review-widget .body .monaco-editor.focused { outline: 1px solid ${a}; }`));const n=s.getColor(C.textBlockQuoteBackground);n&&r.push(`.review-widget .body .review-comment blockquote { background: ${n}; }`);const h=s.getColor(C.textBlockQuoteBorder);h&&r.push(`.review-widget .body .review-comment blockquote { border-color: ${h}; }`);const g=s.getColor(o.PANEL_BORDER);g&&r.push(`.review-widget .body .review-comment .review-comment-contents .comment-reactions .action-item a.action-label { border-color: ${g}; }`);const d=s.getColor(C.contrastBorder);d&&(r.push(`.review-widget .body .comment-form .review-thread-reply-button { outline-color: ${d}; }`),r.push(`.review-widget .body .monaco-editor { outline: 1px solid ${d}; }`));const m=s.getColor(C.inputValidationErrorBorder);m&&r.push(`.review-widget .validation-error { border: 1px solid ${m}; }`);const b=s.getColor(C.inputValidationErrorBackground);b&&r.push(`.review-widget .validation-error { background: ${b}; }`);const E=s.getColor(C.inputValidationErrorForeground);E&&r.push(`.review-widget .body .comment-form .validation-error { color: ${E}; }`);const y="--comment-thread-editor-font-family",T="--comment-thread-editor-font-size",R="--comment-thread-editor-font-weight";this.container?.style.setProperty(y,l.fontFamily),this.container?.style.setProperty(T,`${l.fontSize}px`),this.container?.style.setProperty(R,l.fontWeight),r.push(`.review-widget .body code { font-family: var(${y}); font-weight: var(${R}); font-size: var(${T}); }`),this._styleElement.textContent=r.join(` `),this._commentReply?.setCommentEditorDecorations()}};i=Ee([W(10,k.ICommentService)],i),e.CommentThreadWidget=i}),define(ne[2610],re([1,0,66,6,2,13,20,86,477,7,5,12,787,249,155,906,785,172]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReviewZoneWidget=e.isMouseUpEventMatchMouseDown=e.parseMouseDownInfoFromEvent=e.getCommentThreadWidgetStateColor=void 0;function r(n,h){return(0,s.getCommentThreadStateColor)(n,h)??h.getColor(l.peekViewBorder)}e.getCommentThreadWidgetStateColor=r;function p(n){const h=n.target.range;if(!h||!n.event.leftButton||n.target.type!==4)return null;const g=n.target.detail;return g.offsetX-g.glyphMarginWidth-g.lineNumbersWidth-g.glyphMarginLeft>14?null:{lineNumber:h.startLineNumber}}e.parseMouseDownInfoFromEvent=p;function u(n,h){if(!n)return null;const{lineNumber:g}=n,d=h.target.range;return!d||d.startLineNumber!==g||h.target.type!==4?null:g}e.isMouseUpEventMatchMouseDown=u;let a=class extends I.ZoneWidget{constructor(h,g,d,m,b,E,y,T){super(h,{keepEditorSelection:!0});this._owner=g,this._commentThread=d,this._pendingComment=m,this.themeService=E,this.commentService=y,this._onDidClose=new f.Emitter,this._onDidCreateThread=new f.Emitter,this._globalToDispose=new _.DisposableStore,this._commentThreadDisposables=[],this.mouseDownInfo=null,this._contextKeyService=T.createScoped(this.domNode),this._scopedInstatiationService=b.createChild(new i.ServiceCollection([w.IContextKeyService,this._contextKeyService]));const R=this.commentService.getCommentController(this._owner);R&&(this._commentOptions=R.options),this._isExpanded=d.collapsibleState===D.CommentThreadCollapsibleState.Expanded,this._commentThreadDisposables=[],this.create(),this._globalToDispose.add(this.themeService.onDidColorThemeChange(this._applyTheme,this)),this._globalToDispose.add(this.editor.onDidChangeConfiguration(O=>{O.hasChanged(44)&&this._applyTheme(this.themeService.getColorTheme())})),this._applyTheme(this.themeService.getColorTheme())}get owner(){return this._owner}get commentThread(){return this._commentThread}get onDidClose(){return this._onDidClose.event}get onDidCreateThread(){return this._onDidCreateThread.event}getPosition(){if(this.position)return this.position;if(this._commentGlyph)return(0,A.withNullAsUndefined)(this._commentGlyph.getPosition().position)}revealLine(h){}reveal(h,g=!1){if(this._isExpanded||this.show({lineNumber:this._commentThread.range.startLineNumber,column:1},2),h!==void 0){let d=this.editor.getLayoutInfo().height;const m=this._commentThreadWidget.getCommentCoords(h);if(m){const b=m.thread,E=m.comment;this.editor.setScrollTop(this.editor.getTopForLineNumber(this._commentThread.range.startLineNumber)-d/2+E.top-b.top);return}}this.editor.revealRangeInCenter(this._commentThread.range),g&&this._commentThreadWidget.focus()}getPendingComment(){return this._commentThreadWidget.getPendingComment()}_fillContainer(h){this.setCssClass("review-widget"),this._commentThreadWidget=this._scopedInstatiationService.createInstance(S.CommentThreadWidget,h,this._owner,this.editor.getModel().uri,this._contextKeyService,this._scopedInstatiationService,this._commentThread,this._pendingComment,{editor:this.editor},this._commentOptions,{actionRunner:()=>{if(!this._commentThread.comments||!this._commentThread.comments.length){let g=this.getPosition();g&&this.commentService.updateCommentThreadTemplate(this.owner,this._commentThread.commentThreadHandle,new k.Range(g.lineNumber,1,g.lineNumber,1))}},collapse:()=>{this.collapse()}}),this._disposables.add(this._commentThreadWidget)}deleteCommentThread(){this.dispose(),this.commentService.disposeCommentThread(this.owner,this._commentThread.threadId)}collapse(){return this._commentThread.collapsibleState=D.CommentThreadCollapsibleState.Collapsed,this._commentThread.comments&&this._commentThread.comments.length===0?(this.deleteCommentThread(),Promise.resolve()):(this.hide(),Promise.resolve())}getGlyphPosition(){return this._commentGlyph?this._commentGlyph.getPosition().position.lineNumber:0}toggleExpand(h){this._isExpanded?(this._commentThread.collapsibleState=D.CommentThreadCollapsibleState.Collapsed,this.hide(),(!this._commentThread.comments||!this._commentThread.comments.length)&&this.deleteCommentThread()):(this._commentThread.collapsibleState=D.CommentThreadCollapsibleState.Expanded,this.show({lineNumber:h,column:1},2))}async update(h){this._commentThread!==h&&(this._commentThreadDisposables.forEach(m=>m.dispose()),this._commentThread=h,this._commentThreadDisposables=[],this.bindCommentThreadListeners()),this._commentThreadWidget.updateCommentThread(h);const g=this._commentThread.range.startLineNumber;let d=!1;this._commentGlyph&&this._commentGlyph.getPosition().position.lineNumber!==g&&(d=!0,this._commentGlyph.setLineNumber(g)),d&&this._isExpanded&&this.show({lineNumber:g,column:1},2),this._commentThread.collapsibleState===D.CommentThreadCollapsibleState.Expanded?this.show({lineNumber:g,column:1},2):this.hide()}_onWidth(h){this._commentThreadWidget.layout(h)}_doLayout(h,g){this._commentThreadWidget.layout(g)}display(h){this._commentGlyph=new o.CommentGlyphWidget(this.editor,h),this._disposables.add(this.editor.onMouseDown(g=>this.onEditorMouseDown(g))),this._disposables.add(this.editor.onMouseUp(g=>this.onEditorMouseUp(g))),this._commentThreadWidget.display(this.editor.getOption(59)),this._disposables.add(this._commentThreadWidget.onDidResize(g=>{this._refresh(g)})),this._commentThread.collapsibleState===D.CommentThreadCollapsibleState.Expanded&&this.show({lineNumber:h,column:1},2),this.bindCommentThreadListeners()}bindCommentThreadListeners(){this._commentThreadDisposables.push(this._commentThread.onDidChangeComments(async h=>{await this.update(this._commentThread)})),this._commentThreadDisposables.push(this._commentThread.onDidChangeRange(h=>{const g=this._commentThread.range.startLineNumber;let d=!1;this._commentGlyph&&this._commentGlyph.getPosition().position.lineNumber!==g&&(d=!0,this._commentGlyph.setLineNumber(g)),d&&this._isExpanded&&this.show({lineNumber:g,column:1},2)})),this._commentThreadDisposables.push(this._commentThread.onDidChangeCollasibleState(h=>{if(h===D.CommentThreadCollapsibleState.Expanded&&!this._isExpanded){const g=this._commentThread.range.startLineNumber;this.show({lineNumber:g,column:1},2);return}if(h===D.CommentThreadCollapsibleState.Collapsed&&this._isExpanded){this.hide();return}})),this._commentThreadDisposables.push(this._commentThread.onDidChangeState(()=>{const h=r(this._commentThread,this.themeService.getColorTheme())||t.Color.transparent;this.style({frameColor:h,arrowColor:h}),this.container?.style.setProperty(s.commentThreadStateColorVar,`${h}`)}))}async submitComment(){this._commentThreadWidget.submitComment()}_refresh(h){if(this._isExpanded&&h){this._commentThreadWidget.layout();const g=Math.ceil(this.editor.getOption(59)*1.2),d=this.editor.getOption(59),m=Math.round(d/3),b=Math.round(d/9)*2,E=Math.ceil((g+h.height+m+b+8)/d);if(this._viewZone?.heightInLines===E)return;let y=this.getPosition();this._viewZone&&y&&y.lineNumber!==this._viewZone.afterLineNumber&&(this._viewZone.afterLineNumber=y.lineNumber),(!this._commentThread.comments||!this._commentThread.comments.length)&&this._commentThreadWidget.focusCommentEditor(),this._relayout(E)}}onEditorMouseDown(h){this.mouseDownInfo=p(h)}onEditorMouseUp(h){const g=u(this.mouseDownInfo,h);this.mouseDownInfo=null,!(g===null||!h.target.element)&&(this._commentGlyph&&this._commentGlyph.getPosition().position.lineNumber!==g||h.target.element.className.indexOf("comment-thread")>=0&&this.toggleExpand(g))}_applyTheme(h){const g=r(this._commentThread,this.themeService.getColorTheme())||t.Color.transparent;this.style({arrowColor:g,frameColor:g});const d=this.editor.getOption(44);this._commentThreadWidget.applyTheme(h,d)}show(h,g){this._isExpanded=!0,super.show(h,g),this._refresh(this._commentThreadWidget.getDimensions())}hide(){this._isExpanded&&(this._isExpanded=!1,this.editor.hasWidgetFocus()&&this.editor.focus()),super.hide()}dispose(){super.dispose(),this._commentGlyph&&(this._commentGlyph.dispose(),this._commentGlyph=void 0),this._globalToDispose.dispose(),this._commentThreadDisposables.forEach(h=>h.dispose()),this._onDidClose.fire(void 0)}};a=Ee([W(4,v.IInstantiationService),W(5,C.IThemeService),W(6,c.ICommentService),W(7,w.IContextKeyService)],a),e.ReviewZoneWidget=a}),define(ne[907],re([1,0,10,36,15,11,22,2,106,39,72,20,93,86,172,1482,28,37,5,94,53,32,12,82,787,249,2610,629,21,229,43,575,8,788,630,6,16,7,58,678]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getActiveEditor=e.PreviousCommentThreadAction=e.NextCommentThreadAction=e.CommentController=e.ReviewViewZone=e.ID=void 0,e.ID="editor.contrib.review";class P{constructor(X,Y){this.afterLineNumber=X,this.callback=Y,this.domNode=(0,t.$)(".review-viewzone")}onDomNodeTop(X){this.callback(X)}}e.ReviewViewZone=P;class V{constructor(X,Y,$,J,ee,te,se,ie=!1){this._editor=X,this._ownerId=Y,this._extensionId=$,this._label=J,this._range=ee,this.options=te,this.commentingRangesInfo=se,this.isHover=ie,this._startLineNumber=ee.startLineNumber,this._endLineNumber=ee.endLineNumber}get id(){return this._decorationId}set id(X){this._decorationId=X}get range(){return{startLineNumber:this._startLineNumber,startColumn:1,endLineNumber:this._endLineNumber,endColumn:1}}getCommentAction(){return{extensionId:this._extensionId,label:this._label,ownerId:this._ownerId,commentingRangesInfo:this.commentingRangesInfo}}getOriginalRange(){return this._range}getActiveRange(){return this.id?this._editor.getModel().getDecorationRange(this.id):void 0}}class z{constructor(){this.commentingRangeDecorations=[],this.decorationIds=[],this._lastHover=-1,this._onDidChangeDecorationsCount=new L.Emitter,this.onDidChangeDecorationsCount=this._onDidChangeDecorationsCount.event;const X={description:z.description,isWholeLine:!0,linesDecorationsClassName:"comment-range-glyph comment-diff-added"};this.decorationOptions=o.ModelDecorationOptions.createDynamic(X);const Y={description:z.description,isWholeLine:!0,linesDecorationsClassName:"comment-range-glyph comment-diff-added line-hover"};this.hoverDecorationOptions=o.ModelDecorationOptions.createDynamic(Y)}updateHover(X){this._editor&&this._infos&&X!==this._lastHover&&this._doUpdate(this._editor,this._infos,X),this._lastHover=X??-1}update(X,Y){this._editor=X,this._infos=Y,this._doUpdate(X,Y)}_doUpdate(X,Y,$=-1){if(!X.getModel())return;let ee=[];for(const se of Y)se.commentingRanges.ranges.forEach(ie=>{if(ie.startLineNumber<=$&&ie.endLineNumber>=$){const ce=new C.Range(ie.startLineNumber,1,$,1),le=new C.Range($,1,$,1),ae=new C.Range($,1,ie.endLineNumber,1);ee.push(new V(X,se.owner,se.extensionId,se.label,ce,this.decorationOptions,se.commentingRanges,!0)),ee.push(new V(X,se.owner,se.extensionId,se.label,le,this.hoverDecorationOptions,se.commentingRanges,!0)),ee.push(new V(X,se.owner,se.extensionId,se.label,ae,this.decorationOptions,se.commentingRanges,!0))}else ee.push(new V(X,se.owner,se.extensionId,se.label,ie,this.decorationOptions,se.commentingRanges))});this.decorationIds=X.deltaDecorations(this.decorationIds,ee),ee.forEach((se,ie)=>se.id=this.decorationIds[ie]);const te=this.commentingRangeDecorations.length-ee.length;this.commentingRangeDecorations=ee,te&&this._onDidChangeDecorationsCount.fire(this.commentingRangeDecorations.length)}getMatchedCommentAction(X){const Y=new Map;let $=[];for(const J of this.commentingRangeDecorations){const ee=J.getActiveRange();if(ee&&ee.startLineNumber<=X&&X<=ee.endLineNumber){const te=J.getCommentAction();if(J.isHover){if(Y.get(te.ownerId)===te.commentingRangesInfo)continue;Y.set(te.ownerId,te.commentingRangesInfo)}$.push(te)}}return $}dispose(){this.commentingRangeDecorations=[]}}z.description="commenting-range-decorator";const U=new N.RawContextKey("activeCursorHasCommentingRange",!1,{description:S.localize(0,null),type:"boolean"});let H=class{constructor(X,Y,$,J,ee,te,se,ie,ce){this.commentService=Y,this.instantiationService=$,this.codeEditorService=J,this.contextMenuService=ee,this.quickInputService=te,this.viewsService=se,this.configurationService=ie,this.contextKeyService=ce,this.globalToDispose=new D.DisposableStore,this.localToDispose=new D.DisposableStore,this.mouseDownInfo=null,this._commentingRangeSpaceReserved=!1,this._emptyThreadsToAddQueue=[],this._commentInfos=[],this._commentWidgets=[],this._pendingCommentCache={},this._computePromise=null,this._activeCursorHasCommentingRange=U.bindTo(ce),!(X instanceof y.EmbeddedCodeEditorWidget)&&(this.editor=X,this._commentingRangeDecorator=new z,this.globalToDispose.add(this._commentingRangeDecorator.onDidChangeDecorationsCount(le=>{le===0?this.clearEditorListeners():this._editorDisposables||this.registerEditorListeners()})),this.globalToDispose.add(this.commentService.onDidDeleteDataProvider(le=>{delete this._pendingCommentCache[le],this.beginCompute()})),this.globalToDispose.add(this.commentService.onDidSetDataProvider(le=>this.beginCompute())),this.globalToDispose.add(this.commentService.onDidUpdateCommentingRanges(le=>this.beginCompute())),this.globalToDispose.add(this.commentService.onDidSetResourceCommentInfos(le=>{const ae=this.editor&&this.editor.hasModel()&&this.editor.getModel().uri;ae&&ae.toString()===le.resource.toString()&&this.setComments(le.commentInfos.filter(ue=>ue!==null))})),this.globalToDispose.add(this.editor.onDidChangeModel(le=>this.onModelChanged(le))),this.codeEditorService.registerDecorationType("comment-controller",F.COMMENTEDITOR_DECORATION_KEY,{}),this.beginCompute())}registerEditorListeners(){this._editorDisposables=[],this._editorDisposables.push(this.editor.onMouseMove(X=>this.onEditorMouseMove(X))),this._editorDisposables.push(this.editor.onDidChangeCursorPosition(X=>this.onEditorChangeCursorPosition(X.position))),this._editorDisposables.push(this.editor.onDidFocusEditorWidget(()=>this.onEditorChangeCursorPosition(this.editor.getPosition())))}clearEditorListeners(){this._editorDisposables?.forEach(X=>X.dispose()),this._editorDisposables=void 0}onEditorMouseMove(X){this._commentingRangeDecorator.updateHover(X.target.position?.lineNumber)}onEditorChangeCursorPosition(X){const Y=X?this.editor.getDecorationsInRange(C.Range.fromPositions(X,{column:-1,lineNumber:X.lineNumber})):void 0;let $=!1;if(Y)for(const J of Y)if(J.options.description===g.CommentGlyphWidget.description){$=!1;break}else J.options.description===z.description&&($=!0);this._activeCursorHasCommentingRange.set($)}beginCompute(){return this._computePromise=(0,A.createCancelablePromise)(X=>{const Y=this.editor&&this.editor.hasModel()&&this.editor.getModel().uri;return Y?this.commentService.getDocumentComments(Y):Promise.resolve([])}),this._computePromise.then(X=>{this.setComments((0,_.coalesce)(X)),this._computePromise=null},X=>console.log(X))}beginComputeCommentingRanges(){this._computeCommentingRangeScheduler&&(this._computeCommentingRangePromise&&(this._computeCommentingRangePromise.cancel(),this._computeCommentingRangePromise=null),this._computeCommentingRangeScheduler.trigger(()=>{const X=this.editor&&this.editor.hasModel()&&this.editor.getModel().uri;return X?this.commentService.getDocumentComments(X):Promise.resolve([])}).then(X=>{const Y=(0,_.coalesce)(X);this._commentingRangeDecorator.update(this.editor,Y)},X=>((0,k.onUnexpectedError)(X),null)))}static get(X){return X.getContribution(e.ID)}revealCommentThread(X,Y,$){const J=this._commentWidgets.filter(ee=>ee.commentThread.threadId===X);J.length===1?J[0].reveal(Y):$&&(this._computePromise?this._computePromise.then(ee=>{this.revealCommentThread(X,Y,!1)}):this.beginCompute().then(ee=>{this.revealCommentThread(X,Y,!1)}))}nextCommentThread(){this._findNearestCommentThread()}_findNearestCommentThread(X){if(!this._commentWidgets.length||!this.editor.hasModel())return;const Y=this.editor.getSelection().getEndPosition(),$=this._commentWidgets.sort((te,se)=>{if(X){const ie=te;te=se,se=ie}return te.commentThread.range.startLineNumber<se.commentThread.range.startLineNumber?-1:te.commentThread.range.startLineNumber>se.commentThread.range.startLineNumber?1:te.commentThread.range.startColumn<se.commentThread.range.startColumn?-1:te.commentThread.range.startColumn>se.commentThread.range.startColumn?1:0});let J=(0,_.findFirstInSorted)($,te=>{let se=X?Y.lineNumber:te.commentThread.range.startLineNumber,ie=X?te.commentThread.range.startLineNumber:Y.lineNumber,ce=X?Y.column:te.commentThread.range.startColumn,le=X?te.commentThread.range.startColumn:Y.column;return se>ie?!0:se<ie?!1:ce>le}),ee;J===this._commentWidgets.length?ee=this._commentWidgets[0]:ee=$[J],this.editor.setSelection(ee.commentThread.range),ee.reveal(void 0,!0)}previousCommentThread(){this._findNearestCommentThread(!0)}dispose(){this.globalToDispose.dispose(),this.localToDispose.dispose(),this._editorDisposables?.forEach(X=>X.dispose()),this._commentWidgets.forEach(X=>X.dispose()),this.editor=null}onModelChanged(X){this.localToDispose.clear(),this.removeCommentWidgetsAndStoreCache(),this.localToDispose.add(this.editor.onMouseDown(Y=>this.onEditorMouseDown(Y))),this.localToDispose.add(this.editor.onMouseUp(Y=>this.onEditorMouseUp(Y))),this._editorDisposables&&(this.clearEditorListeners(),this.registerEditorListeners()),this._computeCommentingRangeScheduler=new A.Delayer(200),this.localToDispose.add({dispose:()=>{this._computeCommentingRangeScheduler&&this._computeCommentingRangeScheduler.cancel(),this._computeCommentingRangeScheduler=null}}),this.localToDispose.add(this.editor.onDidChangeModelContent(async()=>{this.beginComputeCommentingRanges()})),this.localToDispose.add(this.commentService.onDidUpdateCommentThreads(async Y=>{const $=this.editor&&this.editor.hasModel()&&this.editor.getModel().uri;if(!$)return;this._computePromise&&await this._computePromise;let J=this._commentInfos.filter(ie=>ie.owner===Y.owner);if(!J||!J.length)return;let ee=Y.added.filter(ie=>ie.resource&&ie.resource.toString()===$.toString()),te=Y.removed.filter(ie=>ie.resource&&ie.resource.toString()===$.toString()),se=Y.changed.filter(ie=>ie.resource&&ie.resource.toString()===$.toString());te.forEach(ie=>{let ce=this._commentWidgets.filter(le=>le.owner===Y.owner&&le.commentThread.threadId===ie.threadId&&le.commentThread.threadId!=="");if(ce.length){let le=ce[0],ae=this._commentWidgets.indexOf(le);this._commentWidgets.splice(ae,1),le.dispose()}}),se.forEach(ie=>{let ce=this._commentWidgets.filter(le=>le.owner===Y.owner&&le.commentThread.threadId===ie.threadId);ce.length&&ce[0].update(ie)}),ee.forEach(ie=>{if(this._commentWidgets.filter(ue=>ue.owner===Y.owner&&ue.commentThread.threadId===ie.threadId).length)return;let le=this._commentWidgets.filter(ue=>ue.owner===Y.owner&&ue.commentThread.commentThreadHandle===-1&&C.Range.equalsRange(ue.commentThread.range,ie.range));if(le.length){le[0].update(ie);return}const ae=this._pendingCommentCache[Y.owner]&&this._pendingCommentCache[Y.owner][ie.threadId];this.displayCommentThread(Y.owner,ie,ae),this._commentInfos.filter(ue=>ue.owner===Y.owner)[0].threads.push(ie)})})),this.beginCompute().then(()=>{this._commentWidgets.length&&this.configurationService.getValue(x.COMMENTS_SECTION).openView==="file"&&this.viewsService.openView(R.COMMENTS_VIEW_ID)})}displayCommentThread(X,Y,$){const J=this.instantiationService.createInstance(m.ReviewZoneWidget,this.editor,X,Y,$);J.display(Y.range.startLineNumber),this._commentWidgets.push(J)}onEditorMouseDown(X){this.mouseDownInfo=(0,m.parseMouseDownInfoFromEvent)(X)}onEditorMouseUp(X){const Y=(0,m.isMouseUpEventMatchMouseDown)(this.mouseDownInfo,X);if(this.mouseDownInfo=null,!(Y===null||!X.target.element)&&X.target.element.className.indexOf("comment-diff-added")>=0){const $=X.target.position.lineNumber;this.addOrToggleCommentAtLine($,X)}}async addOrToggleCommentAtLine(X,Y){if(this._addInProgress)this._emptyThreadsToAddQueue.push([X,Y]);else{this._addInProgress=!0;const $=this._commentWidgets.filter(J=>J.getGlyphPosition()===X);if($.length){$.forEach(J=>J.toggleExpand(X)),this.processNextThreadToAdd();return}else this.addCommentAtLine(X,Y)}}processNextThreadToAdd(){this._addInProgress=!1;const X=this._emptyThreadsToAddQueue.shift();X&&this.addOrToggleCommentAtLine(X[0],X[1])}addCommentAtLine(X,Y){const $=this._commentingRangeDecorator.getMatchedCommentAction(X);if(!$.length||!this.editor.hasModel())return Promise.resolve();if($.length>1)if(Y){const J={x:Y.event.posx,y:Y.event.posy};return this.contextMenuService.showContextMenu({getAnchor:()=>J,getActions:()=>this.getContextMenuActions($,X),getActionsContext:()=>$.length?$[0]:void 0,onHide:()=>{this._addInProgress=!1}}),Promise.resolve()}else{const J=this.getCommentProvidersQuickPicks($);return this.quickInputService.pick(J,{placeHolder:S.localize(1,null),matchOnDescription:!0}).then(ee=>{if(!ee)return;const te=$.filter(se=>se.ownerId===ee.id);if(te.length){const{ownerId:se}=te[0];this.addCommentAtLine2(X,se)}}).then(()=>{this._addInProgress=!1})}else{const{ownerId:J}=$[0];this.addCommentAtLine2(X,J)}return Promise.resolve()}getCommentProvidersQuickPicks(X){return X.map($=>{const{ownerId:J,extensionId:ee,label:te}=$;return{label:te||ee,id:J}})}getContextMenuActions(X,Y){const $=[];return X.forEach(J=>{const{ownerId:ee,extensionId:te,label:se}=J;$.push(new f.Action("addCommentThread",`${se||te}`,void 0,!0,()=>(this.addCommentAtLine2(Y,ee),Promise.resolve())))}),$}addCommentAtLine2(X,Y){const $=new C.Range(X,1,X,1);this.commentService.createCommentThreadTemplate(Y,this.editor.getModel().uri,$),this.processNextThreadToAdd()}setComments(X){if(!this.editor)return;this._commentInfos=X;let Y=this.editor.getLayoutInfo().decorationsWidth;if(this._commentInfos.some($=>Boolean($.commentingRanges&&(Array.isArray($.commentingRanges)?$.commentingRanges:$.commentingRanges.ranges).length))&&!this._commentingRangeSpaceReserved){this._commentingRangeSpaceReserved=!0;let $=[];const J=this.editor.getRawOptions().extraEditorClassName;J&&($=J.split(" ")),this.editor.getOptions().get(37)&&(Y-=16),Y+=9,$.push("inline-comment"),this.editor.updateOptions({extraEditorClassName:$.join(" "),lineDecorationsWidth:Y});const te=this.editor.getLayoutInfo();this.editor.layout({width:te.width,height:te.height})}this.removeCommentWidgetsAndStoreCache(),this._commentInfos.forEach($=>{let J=this._pendingCommentCache[$.owner];$.threads=$.threads.filter(ee=>!ee.isDisposed),$.threads.forEach(ee=>{let te=null;J&&(te=J[ee.threadId]),te&&(ee.collapsibleState=c.CommentThreadCollapsibleState.Expanded),this.displayCommentThread($.owner,ee,te)})}),this._commentingRangeDecorator.update(this.editor,this._commentInfos)}closeWidget(){this._commentWidgets&&this._commentWidgets.forEach(X=>X.hide()),this.editor.focus(),this.editor.revealRangeInCenter(this.editor.getSelection())}removeCommentWidgetsAndStoreCache(){this._commentWidgets&&this._commentWidgets.forEach(X=>{let Y=X.getPendingComment(),$=this._pendingCommentCache[X.owner];Y?($||(this._pendingCommentCache[X.owner]={}),this._pendingCommentCache[X.owner][X.commentThread.threadId]=Y):$&&delete $[X.commentThread.threadId],X.dispose()}),this._commentWidgets=[]}hasComments(){return!!this._commentWidgets.length}};H=Ee([W(1,d.ICommentService),W(2,r.IInstantiationService),W(3,v.ICodeEditorService),W(4,l.IContextMenuService),W(5,u.IQuickInputService),W(6,T.IViewsService),W(7,O.IConfigurationService),W(8,N.IContextKeyService)],H),e.CommentController=H;class K extends w.EditorAction{constructor(){super({id:"editor.action.nextCommentThreadAction",label:S.localize(2,null),alias:"Go to Next Comment Thread",precondition:void 0,kbOpts:{kbExpr:B.EditorContextKeys.focus,primary:512|67,weight:100}})}run(X,Y){let $=H.get(Y);$&&$.nextCommentThread()}}e.NextCommentThreadAction=K;class G extends w.EditorAction{constructor(){super({id:"editor.action.previousCommentThreadAction",label:S.localize(3,null),alias:"Go to Previous Comment Thread",precondition:void 0,kbOpts:{kbExpr:B.EditorContextKeys.focus,primary:1024|512|67,weight:100}})}run(X,Y){let $=H.get(Y);$&&$.previousCommentThread()}}e.PreviousCommentThreadAction=G,(0,w.registerEditorContribution)(e.ID,H),(0,w.registerEditorAction)(K),(0,w.registerEditorAction)(G);const q="workbench.action.addComment";s.CommandsRegistry.registerCommand({id:q,handler:j=>{const X=Z(j);if(!X)return Promise.resolve();const Y=H.get(X);if(!Y)return Promise.resolve();const $=X.getPosition();return Y.addOrToggleCommentAtLine($.lineNumber,void 0)}}),M.MenuRegistry.appendMenuItem(M.MenuId.CommandPalette,{command:{id:q,title:S.localize(4,null),category:"Comments"},when:U}),p.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.submitComment",weight:100,primary:2048|3,when:b.ctxCommentEditorFocused,handler:(j,X)=>{const Y=j.get(v.ICodeEditorService).getFocusedCodeEditor();Y instanceof b.SimpleCommentEditor&&Y.getParentThread().submitComment()}}),p.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.hideComment",weight:100,primary:9,secondary:[1024|9],when:b.ctxCommentEditorFocused,handler:(j,X)=>{const Y=j.get(v.ICodeEditorService).getFocusedCodeEditor();Y instanceof b.SimpleCommentEditor&&Y.getParentThread().collapse()}});function Z(j){let X=j.get(E.IEditorService).activeTextEditorControl;return(0,I.isDiffEditor)(X)&&(X.getOriginalEditor().hasTextFocus()?X=X.getOriginalEditor():X=X.getModifiedEditor()),!(0,I.isCodeEditor)(X)||!X.hasModel()?null:X}e.getActiveEditor=Z,(0,n.registerThemingParticipant)((j,X)=>{const Y=j.getColor(i.peekViewResultsBackground);Y&&X.addRule(`.monaco-editor .review-widget,.monaco-editor .review-widget { background-color: ${Y};}`);const $=j.getColor(i.peekViewTitleBackground);$&&X.addRule(`.review-widget .body .comment-form .review-thread-reply-button { background-color: ${$}}`);const J=j.getColor(a.editorForeground);J&&X.addRule(`.review-widget .body .monaco-editor { color: ${J}}.review-widget .body .comment-form .review-thread-reply-button { color: ${J}; font-size: inherit}`);const ee=j.getColor(i.peekViewResultsSelectionBackground);ee&&X.addRule(`@keyframes monaco-review-widget-focus { 0% { background: ${ee}; } 100% { background: transparent; }}.review-widget .body .review-comment.focus { animation: monaco-review-widget-focus 3s ease 0s;}`);const te=j.getColor(g.overviewRulerCommentingRangeForeground);te&&X.addRule(` .monaco-editor .comment-diff-added { border-left: 3px solid ${te}; } .monaco-editor .comment-diff-added:before { background: ${te}; } .monaco-editor .comment-thread { border-left: 3px solid ${te}; } .monaco-editor .comment-thread:before { background: ${te}; } `);const se=j.getColor(h.STATUS_BAR_ITEM_HOVER_BACKGROUND);se&&X.addRule(`.review-widget .body .review-comment .review-comment-contents .comment-reactions .action-item a.action-label.active:hover { background-color: ${se};}`);const ie=j.getColor(h.STATUS_BAR_ITEM_ACTIVE_BACKGROUND);ie&&X.addRule(`.review-widget .body .review-comment .review-comment-contents .comment-reactions .action-item a.action-label:active { background-color: ${ie}; border: 1px solid transparent;}`)})}),define(ne[2611],re([1,0,1481,35,17,249,57,907]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),_.Registry.as(k.Extensions.Configuration).registerConfiguration({id:"comments",order:20,title:t.localize(0,null),type:"object",properties:{"comments.openPanel":{enum:["neverOpen","openOnSessionStart","openOnSessionStartWithComments"],default:"openOnSessionStartWithComments",description:t.localize(1,null),restricted:!1,markdownDeprecationMessage:t.localize(2,null)},"comments.openView":{enum:["never","file"],enumDescriptions:[t.localize(3,null),t.localize(4,null)],default:"file",description:t.localize(5,null),restricted:!1},"comments.useRelativeTime":{type:"boolean",default:!0,description:t.localize(6,null)}}}),(0,f.registerSingleton)(A.ICommentService,A.CommentService)}),define(ne[2612],re([1,0,1484,10,19,106,5,12,574,907,249,21,28,32,178,575,131,43,8,7,37,38,41,27,56,16,33,93,1078]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentsPanel=void 0;const E=new p.RawContextKey("commentsView.hasComments",!1);let y=class extends s.ViewPane{constructor(R,O,x,F,L,M,N,B,P,V,z,U,H){super(R,B,N,L,M,x,O,P,V,U);this.editorService=F,this.commentService=z,this.uriIdentityService=H,this.onDidChangeVisibility=this.onDidChangeBodyVisibility,this.hasCommentsContextKey=E.bindTo(M)}renderBody(R){super.renderBody(R),R.classList.add("comments-panel");let O=f.append(R,f.$(".comments-panel-container"));this.treeContainer=f.append(O,f.$(".tree-container")),this.treeContainer.classList.add("file-icon-themable-tree","show-file-icons"),this.commentsModel=new I.CommentsModel,this.createTree(),this.createMessageBox(O),this._register(this.commentService.onDidSetAllCommentThreads(this.onAllCommentsChanged,this)),this._register(this.commentService.onDidUpdateCommentThreads(this.onCommentsUpdated,this));const x=f.createStyleSheet(R);this.applyStyles(x),this._register(this.themeService.onDidColorThemeChange(F=>this.applyStyles(x))),this._register(this.onDidChangeBodyVisibility(F=>{F&&this.refresh()})),this.renderComments()}focus(){this.tree&&this.tree.getHTMLElement()===document.activeElement||(!this.commentsModel.hasCommentThreads()&&this.messageBoxContainer?this.messageBoxContainer.focus():this.tree&&this.tree.domFocus())}applyStyles(R){const O=[],x=this.themeService.getColorTheme(),F=x.getColor(c.textLinkForeground);F&&O.push(`.comments-panel .comments-panel-container a { color: ${F}; }`);const L=x.getColor(c.textLinkActiveForeground);L&&O.push(`.comments-panel .comments-panel-container a:hover, a:active { color: ${L}; }`);const M=x.getColor(c.focusBorder);M&&O.push(`.comments-panel .commenst-panel-container a:focus { outline-color: ${M}; }`);const N=x.getColor(c.textPreformatForeground);N&&O.push(`.comments-panel .comments-panel-container .text code { color: ${N}; }`),R.textContent=O.join(` `)}async renderComments(){this.treeContainer.classList.toggle("hidden",!this.commentsModel.hasCommentThreads()),this.renderMessage(),await this.tree.setInput(this.commentsModel)}collapseAll(){this.tree&&(this.tree.collapseAll(),this.tree.setSelection([]),this.tree.setFocus([]),this.tree.domFocus(),this.tree.focusFirst())}layoutBody(R,O){super.layoutBody(R,O),this.tree.layout(R,O)}getTitle(){return S.COMMENTS_VIEW_TITLE}createMessageBox(R){this.messageBoxContainer=f.append(R,f.$(".message-box-container")),this.messageBoxContainer.setAttribute("tabIndex","0")}renderMessage(){this.messageBoxContainer.textContent=this.commentsModel.getMessage(),this.messageBoxContainer.classList.toggle("hidden",this.commentsModel.hasCommentThreads())}createTree(){this.treeLabels=this._register(this.instantiationService.createInstance(i.ResourceLabels,this)),this.tree=this._register(this.instantiationService.createInstance(S.CommentsList,this.treeLabels,this.treeContainer,{overrideStyles:{listBackground:this.getBackgroundColor()},selectionNavigation:!0,accessibilityProvider:{getAriaLabel(R){return R instanceof I.CommentsModel?t.localize(0,null):R instanceof I.ResourceWithCommentThreads?t.localize(1,null,(0,_.basename)(R.resource),R.resource.fsPath):R instanceof I.CommentNode?t.localize(2,null,R.comment.userName,R.range.startLineNumber,R.range.startColumn,(0,_.basename)(R.resource),typeof R.comment.body=="string"?R.comment.body:R.comment.body.value):""},getWidgetAriaLabel(){return S.COMMENTS_VIEW_TITLE}}})),this._register(this.tree.onDidOpen(R=>{this.openFile(R.element,R.editorOptions.pinned,R.editorOptions.preserveFocus,R.sideBySide)}))}openFile(R,O,x,F){if(!R||!(R instanceof I.ResourceWithCommentThreads||R instanceof I.CommentNode))return!1;const L=R instanceof I.ResourceWithCommentThreads?R.commentThreads[0].range:R.range,M=this.editorService.activeTextEditorControl;let N=(0,A.isDiffEditor)(M)?[M.getOriginalEditor(),M.getModifiedEditor()]:M?[M]:[];for(const V of N){const z=V.getModel();if(z instanceof b.TextModel&&this.uriIdentityService.extUri.isEqual(R.resource,z.uri)){const U=R instanceof I.ResourceWithCommentThreads?R.commentThreads[0].threadId:R.threadId,H=R instanceof I.ResourceWithCommentThreads?R.commentThreads[0].comment.uniqueIdInThread:R.comment.uniqueIdInThread;return U&&(0,A.isCodeEditor)(V)&&w.CommentController.get(V)?.revealCommentThread(U,H,!1),!0}}const B=R instanceof I.ResourceWithCommentThreads?R.commentThreads[0].threadId:R.threadId,P=R instanceof I.ResourceWithCommentThreads?R.commentThreads[0].comment:R.comment;return this.editorService.openEditor({resource:R.resource,options:{pinned:O,preserveFocus:x,selection:L}},F?C.SIDE_GROUP:C.ACTIVE_GROUP).then(V=>{if(V){const z=V.getControl();B&&(0,A.isCodeEditor)(z)&&w.CommentController.get(z)?.revealCommentThread(B,P.uniqueIdInThread,!0)}}),!0}async refresh(){if(this.isVisible()&&(this.hasCommentsContextKey.set(this.commentsModel.hasCommentThreads()),this.treeContainer.classList.toggle("hidden",!this.commentsModel.hasCommentThreads()),this.renderMessage(),await this.tree.updateChildren(),this.tree.getSelection().length===0&&this.commentsModel.hasCommentThreads())){const R=this.commentsModel.resourceCommentThreads[0].commentThreads[0];R&&(this.tree.setFocus([R]),this.tree.setSelection([R]))}}onAllCommentsChanged(R){this.commentsModel.setCommentThreads(R.ownerId,R.commentThreads),this.refresh()}onCommentsUpdated(R){this.commentsModel.updateCommentThreads(R)&&this.refresh()}};y=Ee([W(1,k.IInstantiationService),W(2,l.IViewDescriptorService),W(3,C.IEditorService),W(4,r.IConfigurationService),W(5,p.IContextKeyService),W(6,u.IContextMenuService),W(7,a.IKeybindingService),W(8,n.IOpenerService),W(9,D.IThemeService),W(10,v.ICommentService),W(11,h.ITelemetryService),W(12,g.IUriIdentityService)],y),e.CommentsPanel=y,o.CommandsRegistry.registerCommand({id:"workbench.action.focusCommentsPanel",handler:async T=>{T.get(l.IViewsService).openView(S.COMMENTS_VIEW_ID,!0)}}),(0,d.registerAction2)(class extends s.ViewAction{constructor(){super({viewId:S.COMMENTS_VIEW_ID,id:"comments.collapse",title:t.localize(3,null),f1:!1,icon:m.Codicon.collapseAll,menu:{id:d.MenuId.ViewTitle,group:"navigation",when:p.ContextKeyExpr.and(p.ContextKeyExpr.equals("view",S.COMMENTS_VIEW_ID),E)}})}runInView(R,O){O.collapseAll()}})}),define(ne[2613],re([1,0,1491,389,2,10,49,477,37,90,68,12,5,7,39,58,52,9,211,72,32,155,165,434,20,22,8,126,62,1079]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BreakpointWidget=void 0;const y=A.$,T=(0,o.createDecorator)("privateBreakpointWidgetService"),R="breakpointwidgetdecoration";function O(N){const P=N.getModel().bracketPairs.findPrevBracket(N.getPosition());return!!(P&&P.isOpen)}function x(N,B){const P=N.getColor(u.editorForeground)?.transparent(.4);return[{range:{startLineNumber:0,endLineNumber:0,startColumn:0,endColumn:1},renderOptions:{after:{contentText:B,color:P?P.toString():void 0}}}]}let F=class extends D.ZoneWidget{constructor(B,P,V,z,U,H,K,G,q,Z,j,X,Y){super(B,{showFrame:!0,showArrow:!1,frameWidth:1,isAccessible:!0});this.lineNumber=P,this.column=V,this.contextViewService=U,this.debugService=H,this.themeService=K,this.contextKeyService=G,this.instantiationService=q,this.modelService=Z,this.codeEditorService=j,this._configurationService=X,this.languageFeaturesService=Y,this.conditionInput="",this.hitCountInput="",this.logMessageInput="",this.toDispose=[];const $=this.editor.getModel();if($){const J=$.uri,ee=this.debugService.getModel().getBreakpoints({lineNumber:this.lineNumber,column:this.column,uri:J});this.breakpoint=ee.length?ee[0]:void 0}z===void 0?this.breakpoint&&!this.breakpoint.condition&&!this.breakpoint.hitCondition&&this.breakpoint.logMessage?this.context=2:this.breakpoint&&!this.breakpoint.condition&&this.breakpoint.hitCondition?this.context=1:this.context=0:this.context=z,this.toDispose.push(this.debugService.getModel().onDidChangeBreakpoints(J=>{this.breakpoint&&J&&J.removed&&J.removed.indexOf(this.breakpoint)>=0&&this.dispose()})),this.codeEditorService.registerDecorationType("breakpoint-widget",R,{}),this.create()}get placeholder(){switch(this.context){case 2:return t.localize(0,null);case 1:return t.localize(1,null);default:return t.localize(2,null)}}getInputValue(B){switch(this.context){case 2:return B&&B.logMessage?B.logMessage:this.logMessageInput;case 1:return B&&B.hitCondition?B.hitCondition:this.hitCountInput;default:return B&&B.condition?B.condition:this.conditionInput}}rememberInput(){const B=this.input.getModel().getValue();switch(this.context){case 2:this.logMessageInput=B;break;case 1:this.hitCountInput=B;break;default:this.conditionInput=B}}setInputMode(){if(this.editor.hasModel()){const B=this.context===2?b.PLAINTEXT_LANGUAGE_ID:this.editor.getModel().getLanguageId();this.input.getModel().setMode(B)}}show(B){const P=this.input.getModel().getLineCount();super.show(B,P+1)}fitHeightToContent(){const B=this.input.getModel().getLineCount();this._relayout(B+1)}_fillContainer(B){this.setCssClass("breakpoint-widget");const P=new f.SelectBox([{text:t.localize(3,null)},{text:t.localize(4,null)},{text:t.localize(5,null)}],this.context,this.contextViewService,void 0,{ariaLabel:t.localize(6,null)});this.toDispose.push((0,v.attachSelectBoxStyler)(P,this.themeService)),this.selectContainer=y(".breakpoint-select-container"),P.render(A.append(B,this.selectContainer)),P.onDidSelect(V=>{this.rememberInput(),this.context=V.index,this.setInputMode();const z=this.getInputValue(this.breakpoint);this.input.getModel().setValue(z),this.input.focus()}),this.inputContainer=y(".inputContainer"),this.createBreakpointInput(A.append(B,this.inputContainer)),this.input.getModel().setValue(this.getInputValue(this.breakpoint)),this.toDispose.push(this.input.getModel().onDidChangeContent(()=>{this.fitHeightToContent()})),this.input.setPosition({lineNumber:1,column:this.input.getModel().getLineMaxColumn(1)}),setTimeout(()=>this.input.focus(),150)}_doLayout(B,P){this.heightInPx=B,this.input.layout({height:B,width:P-113}),this.centerInputVertically()}createBreakpointInput(B){const P=this.contextKeyService.createScoped(B);this.toDispose.push(P);const V=this.instantiationService.createChild(new a.ServiceCollection([c.IContextKeyService,P],[T,this])),z=this.createEditorOptions(),U=(0,h.getSimpleCodeEditorWidgetOptions)();this.input=V.createInstance(n.CodeEditorWidget,B,z,U),w.CONTEXT_IN_BREAKPOINT_WIDGET.bindTo(P).set(!0);const H=this.modelService.createModel("",null,l.URI.parse(`${w.DEBUG_SCHEME}:${this.editor.getId()}:breakpointinput`),!0);this.editor.hasModel()&&H.setMode(this.editor.getModel().getLanguageId()),this.input.setModel(H),this.setInputMode(),this.toDispose.push(H);const K=()=>{const q=this.input.getModel().getValue()?[]:x(this.themeService.getColorTheme(),this.placeholder);this.input.setDecorations("breakpoint-widget",R,q)};this.input.getModel().onDidChangeContent(()=>K()),this.themeService.onDidColorThemeChange(()=>K()),this.toDispose.push(this.languageFeaturesService.completionProvider.register({scheme:w.DEBUG_SCHEME,hasAccessToAllModels:!0},{provideCompletionItems:(G,q,Z,j)=>{let X;const Y=this.editor.getModel();return Y&&(this.context===0||this.context===2&&O(this.input))?X=(0,r.provideSuggestionItems)(this.languageFeaturesService.completionProvider,Y,new k.Position(this.lineNumber,1),new r.CompletionOptions(void 0,new Set().add(27)),Z,j).then($=>{let J=0;if(this.context===0)J=q.column-1;else{const ee=this.input.getModel().getValue();for(;q.column-2-J>=0&&ee[q.column-2-J]!=="{"&&ee[q.column-2-J]!==" ";)J++}return{suggestions:$.items.map(ee=>(ee.completion.range=g.Range.fromPositions(q.delta(0,-J),q),ee.completion))}}):X=Promise.resolve({suggestions:[]}),X}})),this.toDispose.push(this._configurationService.onDidChangeConfiguration(G=>{(G.affectsConfiguration("editor.fontSize")||G.affectsConfiguration("editor.lineHeight"))&&(this.input.updateOptions(this.createEditorOptions()),this.centerInputVertically())}))}createEditorOptions(){const B=this._configurationService.getValue("editor"),P=(0,h.getSimpleEditorOptions)();return P.fontSize=B.fontSize,P.fontFamily=B.fontFamily,P.lineHeight=B.lineHeight,P.fontLigatures=B.fontLigatures,P.ariaLabel=this.placeholder,P}centerInputVertically(){if(this.container&&typeof this.heightInPx=="number"){const B=this.input.getOption(59),P=this.input.getModel().getLineCount(),V=(this.heightInPx-P*B)/2;this.inputContainer.style.marginTop=V+"px"}}close(B){if(B){let P=this.breakpoint&&this.breakpoint.condition,V=this.breakpoint&&this.breakpoint.hitCondition,z=this.breakpoint&&this.breakpoint.logMessage;if(this.rememberInput(),(this.conditionInput||this.context===0)&&(P=this.conditionInput),(this.hitCountInput||this.context===1)&&(V=this.hitCountInput),(this.logMessageInput||this.context===2)&&(z=this.logMessageInput),this.breakpoint){const U=new Map;U.set(this.breakpoint.getId(),{condition:P,hitCondition:V,logMessage:z}),this.debugService.updateBreakpoints(this.breakpoint.uri,U,!1).then(void 0,d.onUnexpectedError)}else{const U=this.editor.getModel();U&&this.debugService.addBreakpoints(U.uri,[{lineNumber:this.lineNumber,column:this.column,enabled:!0,condition:P,hitCondition:V,logMessage:z}])}}this.dispose()}dispose(){super.dispose(),this.input.dispose(),_.dispose(this.toDispose),setTimeout(()=>this.editor.focus(),0)}};F=Ee([W(4,I.IContextViewService),W(5,w.IDebugService),W(6,C.IThemeService),W(7,c.IContextKeyService),W(8,o.IInstantiationService),W(9,s.IModelService),W(10,p.ICodeEditorService),W(11,m.IConfigurationService),W(12,E.ILanguageFeaturesService)],F),e.BreakpointWidget=F;class L extends i.EditorCommand{constructor(){super({id:"breakpointWidget.action.acceptInput",precondition:w.CONTEXT_BREAKPOINT_WIDGET_VISIBLE,kbOpts:{kbExpr:w.CONTEXT_IN_BREAKPOINT_WIDGET,primary:3,weight:100}})}runEditorCommand(B,P){B.get(T).close(!0)}}class M extends i.EditorCommand{constructor(){super({id:"closeBreakpointWidget",precondition:w.CONTEXT_BREAKPOINT_WIDGET_VISIBLE,kbOpts:{kbExpr:S.EditorContextKeys.textInputFocus,primary:9,secondary:[1024|9],weight:100}})}runEditorCommand(B,P,V){const z=P.getContribution(w.BREAKPOINT_EDITOR_CONTRIBUTION_ID);if(z)return z.closeBreakpointWidget();B.get(T).close(!1)}}(0,i.registerEditorCommand)(new L),(0,i.registerEditorCommand)(new M)}),define(ne[908],re([1,0,1490,14,10,81,36,20,122,5,7,37,90,54,2613,2,117,503,89,110,137,15,11,8,223,77,12,32,45,190,22,29]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BreakpointEditorContribution=e.createBreakpointDecorations=void 0;const O=_.$,x={description:"breakpoint-helper-decoration",glyphMarginClassName:m.ThemeIcon.asClassName(y.debugBreakpointHint),stickiness:1};function F(K,G,q,Z,j){const X=[];return G.forEach(Y=>{if(Y.lineNumber>K.getLineCount())return;const $=K.getLineFirstNonWhitespaceColumn(Y.lineNumber),J=K.validateRange(Y.column?new D.Range(Y.lineNumber,Y.column,Y.lineNumber,Y.column+1):new D.Range(Y.lineNumber,$,Y.lineNumber,$+1));X.push({options:L(K,Y,q,Z,j),range:J})}),X}e.createBreakpointDecorations=F;function L(K,G,q,Z,j){const{icon:X,message:Y}=(0,l.getBreakpointMessageAndIcon)(q,Z,G,void 0);let $;if(Y)if(G.condition||G.hitCondition){const te=K.getLanguageId();$=new s.MarkdownString().appendCodeblock(te,Y)}else $=new s.MarkdownString().appendText(Y);let J=null;j&&(J={color:(0,m.themeColorFromId)(P),position:I.OverviewRulerLane.Left});const ee=G.column&&G.column>K.getLineFirstNonWhitespaceColumn(G.lineNumber);return{description:"breakpoint-decoration",glyphMarginClassName:m.ThemeIcon.asClassName(X),glyphMarginHoverMessage:$,stickiness:1,before:ee?{content:R.noBreakWhitespace,inlineClassName:"debug-breakpoint-placeholder",inlineClassNameAffectsLetterSpacing:!0}:void 0,overviewRuler:J}}async function M(K,G,q){const Z=(0,a.distinct)(G.map(X=>X.range.startLineNumber)),j=[];return q.capabilities.supportsBreakpointLocationsRequest&&await Promise.all(Z.map(async X=>{try{const Y=await q.breakpointsLocations(K.uri,X);if(Y.length>1){const $=K.getLineFirstNonWhitespaceColumn(X),J=K.getLineLastNonWhitespaceColumn(X);Y.forEach(ee=>{const te=new D.Range(ee.lineNumber,ee.column,ee.lineNumber,ee.column+1);if(ee.column<=$||ee.column>J)return;const se=G.find(ie=>ie.range.equalsRange(te));se&&se.inlineWidget||j.push({range:te,options:{description:"breakpoint-placeholder-decoration",stickiness:1,before:se?void 0:{content:R.noBreakWhitespace,inlineClassName:"debug-breakpoint-placeholder",inlineClassNameAffectsLetterSpacing:!0}},breakpoint:se?se.breakpoint:void 0})})}}catch{}})),j}let N=class{constructor(G,q,Z,j,X,Y,$,J){this.editor=G,this.debugService=q,this.contextMenuService=Z,this.instantiationService=j,this.dialogService=Y,this.configurationService=$,this.labelService=J,this.breakpointHintDecoration=[],this.toDispose=[],this.ignoreDecorationsChangedEvent=!1,this.ignoreBreakpointsChangeEvent=!1,this.breakpointDecorations=[],this.candidateDecorations=[],this.breakpointWidgetVisible=o.CONTEXT_BREAKPOINT_WIDGET_VISIBLE.bindTo(X),this.setDecorationsScheduler=new n.RunOnceScheduler(()=>this.setDecorations(),30),this.registerListeners(),this.setDecorationsScheduler.schedule()}getContextMenuActionsAtPosition(G,q){if(!this.debugService.getAdapterManager().hasEnabledDebuggers())return[];if(!this.debugService.canSetBreakpointsIn(q))return[];const Z=this.debugService.getModel().getBreakpoints({lineNumber:G,uri:q.uri});return this.getContextMenuActions(Z,q.uri,G)}registerListeners(){this.toDispose.push(this.editor.onMouseDown(async G=>{if(!this.debugService.getAdapterManager().hasEnabledDebuggers())return;const q=this.editor.getModel();if(!G.target.position||!q||G.target.type!==2||G.target.detail.isAfterLines||!this.marginFreeFromNonDebugDecorations(G.target.position.lineNumber))return;const Z=this.debugService.canSetBreakpointsIn(q),j=G.target.position.lineNumber,X=q.uri;if(G.event.rightButton||f.isMacintosh&&G.event.leftButton&&G.event.ctrlKey){if(!Z)return;const Y={x:G.event.posx,y:G.event.posy},$=this.debugService.getModel().getBreakpoints({lineNumber:j,uri:X}),J=this.getContextMenuActions($,X,j);this.contextMenuService.showContextMenu({getAnchor:()=>Y,getActions:()=>J,getActionsContext:()=>$.length?$[0]:void 0,onHide:()=>(0,S.dispose)(J)})}else{const Y=this.debugService.getModel().getBreakpoints({uri:X,lineNumber:j});if(Y.length)if(!f.isLinux&&Y.some($=>!!$.condition||!!$.logMessage||!!$.hitCondition)){const $=Y.every(ce=>!!ce.logMessage),J=$?t.localize(0,null):t.localize(1,null),ee=Y.some(ce=>ce.enabled),te=t.localize(2,null,J.toLowerCase(),$?t.localize(3,null):t.localize(4,null)),se=t.localize(5,null,J.toLowerCase(),$?t.localize(6,null):t.localize(7,null)),{choice:ie}=await this.dialogService.show(A.default.Info,ee?se:te,[t.localize(8,null,J),t.localize(9,null,ee?t.localize(10,null):t.localize(11,null),J),t.localize(12,null)],{cancelId:2});ie===0&&Y.forEach(ce=>this.debugService.removeBreakpoints(ce.getId())),ie===1&&Y.forEach(ce=>this.debugService.enableOrDisableBreakpoints(!ee,ce))}else{const $=Y.some(J=>J.enabled);$?Y.forEach(J=>this.debugService.removeBreakpoints(J.getId())):Y.forEach(J=>this.debugService.enableOrDisableBreakpoints(!$,J))}else Z&&this.debugService.addBreakpoints(X,[{lineNumber:j}])}})),g.BrowserFeatures.pointerEvents&&d.isSafari||(this.toDispose.push(this.editor.onMouseMove(G=>{if(!this.debugService.getAdapterManager().hasEnabledDebuggers())return;let q=-1;const Z=this.editor.getModel();Z&&G.target.position&&(G.target.type===2||G.target.type===3)&&this.debugService.canSetBreakpointsIn(Z)&&this.marginFreeFromNonDebugDecorations(G.target.position.lineNumber)&&(G.target.detail.isAfterLines||(q=G.target.position.lineNumber)),this.ensureBreakpointHintDecoration(q)})),this.toDispose.push(this.editor.onMouseLeave(()=>{this.ensureBreakpointHintDecoration(-1)}))),this.toDispose.push(this.editor.onDidChangeModel(async()=>{this.closeBreakpointWidget(),await this.setDecorations()})),this.toDispose.push(this.debugService.getModel().onDidChangeBreakpoints(()=>{!this.ignoreBreakpointsChangeEvent&&!this.setDecorationsScheduler.isScheduled()&&this.setDecorationsScheduler.schedule()})),this.toDispose.push(this.debugService.onDidChangeState(()=>{this.setDecorationsScheduler.isScheduled()||this.setDecorationsScheduler.schedule()})),this.toDispose.push(this.editor.onDidChangeModelDecorations(()=>this.onModelDecorationsChanged())),this.toDispose.push(this.configurationService.onDidChangeConfiguration(async G=>{(G.affectsConfiguration("debug.showBreakpointsInOverviewRuler")||G.affectsConfiguration("debug.showInlineBreakpointCandidates"))&&await this.setDecorations()}))}getContextMenuActions(G,q,Z,j){const X=[];if(G.length===1){const Y=G[0].logMessage?t.localize(13,null):t.localize(14,null);X.push(new k.Action("debug.removeBreakpoint",t.localize(15,null,Y),void 0,!0,async()=>{await this.debugService.removeBreakpoints(G[0].getId())})),X.push(new k.Action("workbench.debug.action.editBreakpointAction",t.localize(16,null,Y),void 0,!0,()=>Promise.resolve(this.showBreakpointWidget(G[0].lineNumber,G[0].column)))),X.push(new k.Action("workbench.debug.viewlet.action.toggleBreakpoint",G[0].enabled?t.localize(17,null,Y):t.localize(18,null,Y),void 0,!0,()=>this.debugService.enableOrDisableBreakpoints(!G[0].enabled,G[0])))}else if(G.length>1){const Y=G.slice().sort(($,J)=>$.column&&J.column?$.column-J.column:1);X.push(new k.SubmenuAction("debug.removeBreakpoints",t.localize(19,null),Y.map($=>new k.Action("removeInlineBreakpoint",$.column?t.localize(20,null,$.column):t.localize(21,null),void 0,!0,()=>this.debugService.removeBreakpoints($.getId()))))),X.push(new k.SubmenuAction("debug.editBreakpoints",t.localize(22,null),Y.map($=>new k.Action("editBreakpoint",$.column?t.localize(23,null,$.column):t.localize(24,null),void 0,!0,()=>Promise.resolve(this.showBreakpointWidget($.lineNumber,$.column)))))),X.push(new k.SubmenuAction("debug.enableDisableBreakpoints",t.localize(25,null),Y.map($=>new k.Action($.enabled?"disableColumnBreakpoint":"enableColumnBreakpoint",$.enabled?$.column?t.localize(26,null,$.column):t.localize(27,null):$.column?t.localize(28,null,$.column):t.localize(29,null),void 0,!0,()=>this.debugService.enableOrDisableBreakpoints(!$.enabled,$)))))}else X.push(new k.Action("addBreakpoint",t.localize(30,null),void 0,!0,()=>this.debugService.addBreakpoints(q,[{lineNumber:Z,column:j}]))),X.push(new k.Action("addConditionalBreakpoint",t.localize(31,null),void 0,!0,()=>Promise.resolve(this.showBreakpointWidget(Z,j,0)))),X.push(new k.Action("addLogPoint",t.localize(32,null),void 0,!0,()=>Promise.resolve(this.showBreakpointWidget(Z,j,2))));return this.debugService.state===2&&(X.push(new k.Separator),X.push(new k.Action("runToLine",t.localize(33,null),void 0,!0,()=>this.debugService.runTo(q,Z).catch(T.onUnexpectedError)))),X}marginFreeFromNonDebugDecorations(G){const q=this.editor.getLineDecorations(G);if(q)for(const{options:Z}of q){const j=Z.glyphMarginClassName;if(j&&(!j.includes("codicon-")||j.includes("codicon-testing-")))return!1}return!0}ensureBreakpointHintDecoration(G){const q=[];G!==-1&&q.push({options:x,range:{startLineNumber:G,startColumn:1,endLineNumber:G,endColumn:1}}),this.breakpointHintDecoration=this.editor.deltaDecorations(this.breakpointHintDecoration,q)}async setDecorations(){if(!this.editor.hasModel())return;const G=this.editor,q=G.getModel(),Z=this.debugService.getModel().getBreakpoints({uri:q.uri}),j=this.configurationService.getValue("debug"),X=F(q,Z,this.debugService.state,this.debugService.getModel().areBreakpointsActivated(),j.showBreakpointsInOverviewRuler);try{this.ignoreDecorationsChangedEvent=!0;const ee=G.deltaDecorations(this.breakpointDecorations.map(te=>te.decorationId),X);this.breakpointDecorations.forEach(te=>{te.inlineWidget&&te.inlineWidget.dispose()}),this.breakpointDecorations=ee.map((te,se)=>{let ie;const ce=Z[se];if(X[se].options.before){const le=()=>this.getContextMenuActions([ce],G.getModel().uri,ce.lineNumber,ce.column);ie=new B(G,te,X[se].options.glyphMarginClassName,ce,this.debugService,this.contextMenuService,le)}return{decorationId:te,breakpoint:ce,range:X[se].range,inlineWidget:ie}})}finally{this.ignoreDecorationsChangedEvent=!1}const Y=this.debugService.getViewModel().focusedSession,$=j.showInlineBreakpointCandidates&&Y?await M(this.editor.getModel(),this.breakpointDecorations,Y):[],J=this.editor.deltaDecorations(this.candidateDecorations.map(ee=>ee.decorationId),$);this.candidateDecorations.forEach(ee=>{ee.inlineWidget.dispose()}),this.candidateDecorations=J.map((ee,te)=>{const se=$[te],ie=se.breakpoint?(0,l.getBreakpointMessageAndIcon)(this.debugService.state,this.debugService.getModel().areBreakpointsActivated(),se.breakpoint,this.labelService).icon:y.breakpoint.disabled,ce=()=>this.getContextMenuActions(se.breakpoint?[se.breakpoint]:[],G.getModel().uri,se.range.startLineNumber,se.range.startColumn),le=new B(G,ee,m.ThemeIcon.asClassName(ie),se.breakpoint,this.debugService,this.contextMenuService,ce);return{decorationId:ee,inlineWidget:le}})}async onModelDecorationsChanged(){if(this.breakpointDecorations.length===0||this.ignoreDecorationsChangedEvent||!this.editor.hasModel())return;let G=!1;const q=this.editor.getModel();if(this.breakpointDecorations.forEach(j=>{if(G)return;const X=q.getDecorationRange(j.decorationId);X&&!j.range.equalsRange(X)&&(G=!0,j.range=X)}),!G)return;const Z=new Map;for(let j=0,X=this.breakpointDecorations.length;j<X;j++){const Y=this.breakpointDecorations[j],$=q.getDecorationRange(Y.decorationId);$&&Y.breakpoint&&Z.set(Y.breakpoint.getId(),{lineNumber:$.startLineNumber,column:Y.breakpoint.column?$.startColumn:void 0})}try{this.ignoreBreakpointsChangeEvent=!0,await this.debugService.updateBreakpoints(q.uri,Z,!0)}finally{this.ignoreBreakpointsChangeEvent=!1}}showBreakpointWidget(G,q,Z){this.breakpointWidget&&this.breakpointWidget.dispose(),this.breakpointWidget=this.instantiationService.createInstance(i.BreakpointWidget,this.editor,G,q,Z),this.breakpointWidget.show({lineNumber:G,column:1}),this.breakpointWidgetVisible.set(!0)}closeBreakpointWidget(){this.breakpointWidget&&(this.breakpointWidget.dispose(),this.breakpointWidget=void 0,this.breakpointWidgetVisible.reset(),this.editor.focus())}dispose(){this.breakpointWidget&&this.breakpointWidget.dispose(),this.editor.deltaDecorations(this.breakpointDecorations.map(G=>G.decorationId),[]),(0,S.dispose)(this.toDispose)}};N=Ee([W(1,o.IDebugService),W(2,C.IContextMenuService),W(3,w.IInstantiationService),W(4,v.IContextKeyService),W(5,c.IDialogService),W(6,h.IConfigurationService),W(7,E.ILabelService)],N),e.BreakpointEditorContribution=N;class B{constructor(G,q,Z,j,X,Y,$){this.editor=G,this.decorationId=q,this.breakpoint=j,this.debugService=X,this.contextMenuService=Y,this.getContextMenuActions=$,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.toDispose=[],this.range=this.editor.getModel().getDecorationRange(q),this.toDispose.push(this.editor.onDidChangeModelDecorations(()=>{const ee=this.editor.getModel().getDecorationRange(this.decorationId);this.range&&!this.range.equalsRange(ee)&&(this.range=ee,this.editor.layoutContentWidget(this))})),this.create(Z),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(G){this.domNode=O(".inline-breakpoint-widget"),G&&this.domNode.classList.add(...G.split(" ")),this.toDispose.push(_.addDisposableListener(this.domNode,_.EventType.CLICK,async Z=>{this.breakpoint?await this.debugService.removeBreakpoints(this.breakpoint.getId()):await this.debugService.addBreakpoints(this.editor.getModel().uri,[{lineNumber:this.range.startLineNumber,column:this.range.startColumn}])})),this.toDispose.push(_.addDisposableListener(this.domNode,_.EventType.CONTEXT_MENU,Z=>{const j=new u.StandardMouseEvent(Z),X={x:j.posx,y:j.posy},Y=this.getContextMenuActions();this.contextMenuService.showContextMenu({getAnchor:()=>X,getActions:()=>Y,getActionsContext:()=>this.breakpoint,onHide:()=>(0,S.dispose)(Y)})}));const q=()=>{const Z=this.editor.getOption(59);this.domNode.style.height=`${Z}px`,this.domNode.style.width=`${Math.ceil(.8*Z)}px`,this.domNode.style.marginLeft="4px"};q(),this.toDispose.push(this.editor.onDidChangeConfiguration(Z=>{(Z.hasChanged(46)||Z.hasChanged(59))&&q()}))}getId(){return(0,r.generateUuid)()}getDomNode(){return this.domNode}getPosition(){return this.range?(this.domNode.classList.toggle("line-start",this.range.startColumn===1),{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn-1},preference:[0]}):null}dispose(){this.editor.removeContentWidget(this),(0,S.dispose)(this.toDispose)}}Ee([p.memoize],B.prototype,"getId",null),(0,m.registerThemingParticipant)((K,G)=>{const q=K.getColor(P);q&&G.addRule(` ${y.allBreakpoints.map($=>`.monaco-workbench ${m.ThemeIcon.asCSSSelector($.regular)}`).join(`, `)}, .monaco-workbench ${m.ThemeIcon.asCSSSelector(y.debugBreakpointUnsupported)}, .monaco-workbench ${m.ThemeIcon.asCSSSelector(y.debugBreakpointHint)}:not([class*='codicon-debug-breakpoint']):not([class*='codicon-debug-stackframe']), .monaco-workbench ${m.ThemeIcon.asCSSSelector(y.breakpoint.regular)}${m.ThemeIcon.asCSSSelector(y.debugStackframeFocused)}::after, .monaco-workbench ${m.ThemeIcon.asCSSSelector(y.breakpoint.regular)}${m.ThemeIcon.asCSSSelector(y.debugStackframe)}::after { color: ${q} !important; } `);const Z=K.getColor(V);Z&&G.addRule(` ${y.allBreakpoints.map($=>`.monaco-workbench ${m.ThemeIcon.asCSSSelector($.disabled)}`).join(`, `)} { color: ${Z}; } `);const j=K.getColor(z);j&&G.addRule(` ${y.allBreakpoints.map($=>`.monaco-workbench ${m.ThemeIcon.asCSSSelector($.unverified)}`).join(`, `)} { color: ${j}; } `);const X=K.getColor(U);X&&G.addRule(` .monaco-workbench ${m.ThemeIcon.asCSSSelector(y.debugStackframe)}, .monaco-editor .debug-top-stack-frame-column { color: ${X} !important; } `);const Y=K.getColor(H);Y&&G.addRule(` .monaco-workbench ${m.ThemeIcon.asCSSSelector(y.debugStackframeFocused)} { color: ${Y} !important; } `)});const P=(0,b.registerColor)("debugIcon.breakpointForeground",{dark:"#E51400",light:"#E51400",hcDark:"#E51400",hcLight:"#E51400"},t.localize(34,null)),V=(0,b.registerColor)("debugIcon.breakpointDisabledForeground",{dark:"#848484",light:"#848484",hcDark:"#848484",hcLight:"#848484"},t.localize(35,null)),z=(0,b.registerColor)("debugIcon.breakpointUnverifiedForeground",{dark:"#848484",light:"#848484",hcDark:"#848484",hcLight:"#848484"},t.localize(36,null)),U=(0,b.registerColor)("debugIcon.breakpointCurrentStackframeForeground",{dark:"#FFCC00",light:"#BE8700",hcDark:"#FFCC00",hcLight:"#BE8700"},t.localize(37,null)),H=(0,b.registerColor)("debugIcon.breakpointStackframeForeground",{dark:"#89D185",light:"#89D185",hcDark:"#89D185",hcLight:"#89D185"},t.localize(38,null))}),define(ne[909],re([1,0,10,112,304,11,110,379,2,29,9,106,39,72,165,123,20,58,86,62,52,113,247,1517,73,16,95,8,7,37,236,348,5,155,38,71,41,24,27,32,12,131,43,434,625,190,428,2592,2593,90,179,431,21,1085]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H,K,G,q,Z,j,X,Y,$,J){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Repl=void 0;const ee=t.$,te="debug.repl.history",se="debug.repl.filterHistory",ie="debug.repl.filterValue",ce="replinputdecoration",le="workbench.actions.treeView.repl.filter";function ae(ge){ge.scrollTop=ge.scrollHeight-ge.renderHeight}const ue=new Set,oe={getId:ge=>ge.getId()};let fe=class er extends z.ViewPane{constructor(de,Se,we,ye,ke,Ie,Te,De,_e,Re,Ne,xe,Ae,Le,Me,We,Ve,Ue){super(de,Le,Re,Ne,Te,_e,we,Me,ke,We);this.debugService=Se,this.storageService=ye,this.modelService=Ie,this.textResourcePropertiesService=xe,this.editorService=Ae,this.languageFeaturesService=Ue,this.previousTreeScrollHeight=0,this.replInputLineCount=1,this.modelChangeListener=I.Disposable.None,this.menu=Ve.createMenu(d.MenuId.DebugConsoleContext,Te),this._register(this.menu),this.history=new D.HistoryNavigator(JSON.parse(this.storageService.get(te,1,"[]")),50),this.filter=new Z.ReplFilter,this.filterState=new Z.ReplFilterState(this),this.filter.filterQuery=this.filterState.filterText=this.storageService.get(ie,1,""),this.multiSessionRepl=X.CONTEXT_MULTI_SESSION_REPL.bindTo(Te),De.registerDecorationType("repl-decoration",ce,{}),this.multiSessionRepl.set(this.isMultiSessionView),this.registerListeners()}registerListeners(){this.debugService.getViewModel().focusedSession&&this.onDidFocusSession(this.debugService.getViewModel().focusedSession),this._register(this.debugService.getViewModel().onDidFocusSession(async de=>this.onDidFocusSession(de))),this._register(this.debugService.getViewModel().onDidEvaluateLazyExpression(async de=>{de instanceof Y.Variable&&this.tree.hasNode(de)&&(await this.tree.updateChildren(de,!1,!0),await this.tree.expand(de))})),this._register(this.debugService.onWillNewSession(async de=>{const Se=this.tree.getInput();(!Se||Se.state===0)&&await this.selectSession(de),this.multiSessionRepl.set(this.isMultiSessionView)})),this._register(this.themeService.onDidColorThemeChange(()=>{this.refreshReplElements(!1),this.isVisible()&&this.updateInputDecoration()})),this._register(this.onDidChangeBodyVisibility(de=>{de&&(this.model||(this.model=this.modelService.getModel(er.URI)||this.modelService.createModel("",null,er.URI,!0)),this.setMode(),this.replInput.setModel(this.model),this.updateInputDecoration(),this.refreshReplElements(!0),this.layoutBody(this.dimension.height,this.dimension.width))})),this._register(this.configurationService.onDidChangeConfiguration(de=>{if(de.affectsConfiguration("debug.console.wordWrap")?(this.tree.dispose(),this.treeContainer.innerText="",t.clearNode(this.treeContainer),this.createReplTree()):(de.affectsConfiguration("debug.console.lineHeight")||de.affectsConfiguration("debug.console.fontSize")||de.affectsConfiguration("debug.console.fontFamily"))&&this.onDidStyleChange(),de.affectsConfiguration("debug.console.acceptSuggestionOnEnter")){const Se=this.configurationService.getValue("debug");this.replInput.updateOptions({acceptSuggestionOnEnter:Se.console.acceptSuggestionOnEnter==="on"?"on":"off"})}})),this._register(this.themeService.onDidColorThemeChange(de=>{this.onDidStyleChange()})),this._register(this.viewDescriptorService.onDidChangeLocation(de=>{de.views.some(Se=>Se.id===this.id)&&this.onDidStyleChange()})),this._register(this.editorService.onDidActiveEditorChange(()=>{this.setMode()})),this._register(this.filterState.onDidChange(()=>{this.filter.filterQuery=this.filterState.filterText,this.tree.refilter(),ae(this.tree)}))}async onDidFocusSession(de){de&&(ue.delete(de),this.completionItemProvider&&this.completionItemProvider.dispose(),de.capabilities.supportsCompletionsRequest&&(this.completionItemProvider=this.languageFeaturesService.completionProvider.register({scheme:X.DEBUG_SCHEME,pattern:"**/replinput",hasAccessToAllModels:!0},{triggerCharacters:de.capabilities.completionTriggerCharacters||["."],provideCompletionItems:async(Se,we,ye,ke)=>{this.setHistoryNavigationEnablement(!1);const Ie=this.replInput.getModel();if(Ie){const Te=Ie.getWordAtPosition(we),De=Te?Te.word.length:0,_e=Ie.getValue(),Re=this.debugService.getViewModel().focusedStackFrame,Ne=Re?Re.frameId:void 0,xe=await de.completions(Ne,Re?.thread.threadId||0,_e,we,De,ke),Ae=[],Le=Me=>s.Range.fromPositions(we.delta(0,-Me),we);return xe&&xe.body&&xe.body.targets&&xe.body.targets.forEach(Me=>{if(Me&&Me.label){let We,Ve=Me.text||Me.label;if(typeof Me.selectionStart=="number"){We=4;const Ue=typeof Me.selectionLength=="number"?Me.selectionLength:0,et=Ue>0?"${1:"+Ve.substring(Me.selectionStart,Me.selectionStart+Ue)+"}$0":"$0";Ve=Ve.substring(0,Me.selectionStart)+et+Ve.substring(Me.selectionStart+Ue)}Ae.push({label:Me.label,insertText:Ve,detail:Me.detail,kind:r.CompletionItemKinds.fromString(Me.type||"property"),filterText:Me.start&&Me.length?_e.substring(Me.start,Me.start+Me.length).concat(Me.label):void 0,range:Le(Me.length||De),sortText:Me.sortText,insertTextRules:We})}}),this.configurationService.getValue("debug").console.historySuggestions&&this.history.getHistory().forEach(We=>Ae.push({label:We,insertText:We,kind:18,range:Le(We.length),sortText:"ZZZ"})),{suggestions:Ae}}return Promise.resolve({suggestions:[]})}}))),await this.selectSession()}getFilterStats(){return{total:this.tree?.getNode().children.length??0,filtered:this.tree?.getNode().children.filter(de=>de.visible).length??0}}get isReadonly(){const de=this.tree.getInput();return!(de&&de.state!==0)}showPreviousValue(){this.isReadonly||this.navigateHistory(!0)}showNextValue(){this.isReadonly||this.navigateHistory(!1)}focusFilter(){this.filterActionViewItem?.focus()}setMode(){if(!this.isVisible())return;const de=this.editorService.activeTextEditorControl;(0,C.isCodeEditor)(de)&&(this.modelChangeListener.dispose(),this.modelChangeListener=de.onDidChangeModelLanguage(()=>this.setMode()),this.model&&de.hasModel()&&this.model.setMode(de.getModel().getLanguageId()))}onDidStyleChange(){if(this.styleElement){const de=this.configurationService.getValue("debug").console,Se=de.fontSize,we=de.fontFamily==="default"?"var(--monaco-monospace-font)":`${de.fontFamily}`,ye=de.lineHeight?`${de.lineHeight}px`:"1.4em",ke=this.themeService.getColorTheme().getColor(this.getBackgroundColor());this.replInput.updateOptions({fontSize:Se,lineHeight:de.lineHeight,fontFamily:de.fontFamily==="default"?S.EDITOR_FONT_DEFAULTS.fontFamily:de.fontFamily});const Ie=this.replInput.getOption(59);this.styleElement.textContent=` .repl .repl-input-wrapper .repl-input-chevron { line-height: ${Ie}px } .repl .repl-input-wrapper .monaco-editor .lines-content { background-color: ${ke}; } `,this.container.style.setProperty("--vscode-repl-font-family",we),this.container.style.setProperty("--vscode-repl-font-size",`${Se}px`),this.container.style.setProperty("--vscode-repl-font-size-for-twistie",`${Se*1.4/2-8}px`),this.container.style.setProperty("--vscode-repl-line-height",ye),this.tree.rerender(),this.dimension&&this.layoutBody(this.dimension.height,this.dimension.width)}}navigateHistory(de){const Se=de?this.history.previous():this.history.next();Se&&(this.replInput.setValue(Se),f.status(Se),this.replInput.setPosition({lineNumber:1,column:Se.length+1}),this.setHistoryNavigationEnablement(!0))}async selectSession(de){const Se=this.tree&&this.tree.getInput();if(!de){const we=this.debugService.getViewModel().focusedSession;we?de=we:(!Se||ue.has(Se))&&(de=this.debugService.getModel().getSessions(!0).find(ye=>!ue.has(ye)))}de&&(this.replElementsChangeListener&&this.replElementsChangeListener.dispose(),this.replElementsChangeListener=de.onDidChangeReplElements(()=>{this.refreshReplElements(de.getReplElements().length===0)}),this.tree&&Se!==de&&(await this.tree.setInput(de),ae(this.tree))),this.replInput?.updateOptions({readOnly:this.isReadonly}),this.updateInputDecoration()}async clearRepl(){const de=this.tree.getInput();de&&(de.removeReplExpressions(),de.state===0&&(ue.add(de),await this.selectSession(),this.multiSessionRepl.set(this.isMultiSessionView))),this.replInput.focus()}acceptReplInput(){const de=this.tree.getInput();if(de&&!this.isReadonly){de.addReplExpression(this.debugService.getViewModel().focusedStackFrame,this.replInput.getValue()),ae(this.tree),this.history.add(this.replInput.getValue()),this.replInput.setValue("");const Se=this.replInputLineCount>1;this.replInputLineCount=1,Se&&this.layoutBody(this.dimension.height,this.dimension.width)}}getVisibleContent(){let de="";if(this.model){const Se=this.textResourcePropertiesService.getEOL(this.model.uri),we=ye=>{ye.children.forEach(ke=>{ke.visible&&(de+=ke.element.toString().trimRight()+Se,!ke.collapsed&&ke.children.length&&we(ke))})};we(this.tree.getNode())}return(0,w.removeAnsiEscapeCodes)(de)}layoutBody(de,Se){super.layoutBody(de,Se),this.dimension=new t.Dimension(Se,de);const we=Math.min(this.replInput.getContentHeight(),de);if(this.tree){const ye=this.tree.scrollTop+this.tree.renderHeight>=this.tree.scrollHeight,ke=de-we;this.tree.getHTMLElement().style.height=`${ke}px`,this.tree.layout(ke,Se),ye&&ae(this.tree)}this.replInputContainer.style.height=`${we}px`,this.replInput.layout({width:Se-30,height:we})}collapseAll(){this.tree.collapseAll()}getReplInput(){return this.replInput}focus(){setTimeout(()=>this.replInput.focus(),0)}getActionViewItem(de){if(de.id===he){const Se=(this.tree?this.tree.getInput():void 0)??this.debugService.getViewModel().focusedSession;return this.instantiationService.createInstance(Ce,de,Se)}else if(de.id===le){const Se=JSON.parse(this.storageService.get(se,1,"[]"));return this.filterActionViewItem=this.instantiationService.createInstance(Z.ReplFilterActionViewItem,de,(0,h.localize)(0,null),this.filterState,Se,()=>(0,R.showHistoryKeybindingHint)(this.keybindingService)),this.filterActionViewItem}return super.getActionViewItem(de)}get isMultiSessionView(){return this.debugService.getModel().getSessions(!0).filter(de=>de.hasSeparateRepl()&&!ue.has(de)).length>1}get refreshScheduler(){const de=new Set;return new A.RunOnceScheduler(async()=>{if(!this.tree.getInput())return;await this.tree.updateChildren(void 0,!0,!1,{diffIdentityProvider:oe});const Se=this.tree.getInput();if(Se){const we=async ye=>{for(const ke of ye)ke instanceof $.ReplGroup&&(ke.autoExpand&&!de.has(ke.getId())&&(de.add(ke.getId()),await this.tree.expand(ke)),this.tree.isCollapsed(ke)||await we(ke.getChildren()))};await we(Se.getReplElements())}this.filterState.updateFilterStats()},er.REFRESH_DELAY)}renderBody(de){super.renderBody(de),this.container=t.append(de,ee(".repl")),this.treeContainer=t.append(this.container,ee(`.repl-tree.${_.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`)),this.createReplInput(this.container),this.createReplTree()}createReplTree(){this.replDelegate=new j.ReplDelegate(this.configurationService);const de=this.configurationService.getValue("debug").console.wordWrap;this.treeContainer.classList.toggle("word-wrap",de);const Se=this.instantiationService.createInstance(q.LinkDetector);this.tree=this.instantiationService.createInstance(L.WorkbenchAsyncDataTree,"DebugRepl",this.treeContainer,this.replDelegate,[this.instantiationService.createInstance(j.ReplVariablesRenderer,Se),this.instantiationService.createInstance(j.ReplSimpleElementsRenderer,Se),new j.ReplEvaluationInputsRenderer,this.instantiationService.createInstance(j.ReplGroupRenderer,Se),new j.ReplEvaluationResultsRenderer(Se),new j.ReplRawObjectsRenderer(Se)],new j.ReplDataSource,{filter:this.filter,accessibilityProvider:new j.ReplAccessibilityProvider,identityProvider:oe,mouseSupport:!1,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:ye=>ye.toString(!0)},horizontalScrolling:!de,setRowLineHeight:!1,supportDynamicHeights:de,overrideStyles:{listBackground:this.getBackgroundColor()}}),this._register(this.tree.onDidChangeContentHeight(()=>{this.tree.scrollHeight!==this.previousTreeScrollHeight&&this.tree.scrollTop+this.tree.renderHeight>=this.previousTreeScrollHeight&&setTimeout(()=>{ae(this.tree)},0),this.previousTreeScrollHeight=this.tree.scrollHeight})),this._register(this.tree.onContextMenu(ye=>this.onContextMenu(ye)));let we;this._register(this.tree.onMouseClick(()=>{const ye=window.getSelection();(!ye||ye.type!=="Range"||we===ye.toString())&&this.replInput.focus(),we=ye?ye.toString():""})),this.selectSession(),this.styleElement=t.createStyleSheet(this.container),this.onDidStyleChange()}createReplInput(de){this.replInputContainer=t.append(de,ee(".repl-input-wrapper")),t.append(this.replInputContainer,ee(".repl-input-chevron"+V.ThemeIcon.asCSSSelector(G.debugConsoleEvaluationPrompt)));const{scopedContextKeyService:Se,historyNavigationBackwardsEnablement:we,historyNavigationForwardsEnablement:ye}=(0,T.createAndBindHistoryNavigationWidgetScopedContextKeyService)(this.contextKeyService,{target:de,historyNavigator:this});this.setHistoryNavigationEnablement=Te=>{we.set(Te),ye.set(Te)},this._register(Se),X.CONTEXT_IN_DEBUG_REPL.bindTo(Se).set(!0),this.scopedInstantiationService=this.instantiationService.createChild(new x.ServiceCollection([E.IContextKeyService,Se]));const ke=(0,H.getSimpleEditorOptions)();ke.readOnly=!0,ke.suggest={showStatusBar:!0};const Ie=this.configurationService.getValue("debug");ke.acceptSuggestionOnEnter=Ie.console.acceptSuggestionOnEnter==="on"?"on":"off",ke.ariaLabel=(0,h.localize)(1,null),this.replInput=this.scopedInstantiationService.createInstance(i.CodeEditorWidget,this.replInputContainer,ke,(0,H.getSimpleCodeEditorWidgetOptions)()),this._register(this.replInput.onDidChangeModelContent(()=>{const Te=this.replInput.getModel();this.setHistoryNavigationEnablement(!!Te&&Te.getValue()==="");const De=Te?Math.min(10,Te.getLineCount()):1;De!==this.replInputLineCount&&(this.replInputLineCount=De,this.layoutBody(this.dimension.height,this.dimension.width))})),this._register(this.replInput.onDidFocusEditorText(()=>this.updateInputDecoration())),this._register(this.replInput.onDidBlurEditorText(()=>this.updateInputDecoration())),this._register(t.addStandardDisposableListener(this.replInputContainer,t.EventType.FOCUS,()=>this.replInputContainer.classList.add("synthetic-focus"))),this._register(t.addStandardDisposableListener(this.replInputContainer,t.EventType.BLUR,()=>this.replInputContainer.classList.remove("synthetic-focus")))}onContextMenu(de){const Se=[],we=(0,g.createAndFillInContextMenuActions)(this.menu,{arg:de.element,shouldForwardArgs:!1},Se);this.contextMenuService.showContextMenu({getAnchor:()=>de.anchor,getActions:()=>Se,getActionsContext:()=>de.element,onHide:()=>(0,I.dispose)(we)})}refreshReplElements(de){if(this.tree&&this.isVisible()){if(this.refreshScheduler.isScheduled())return;this.refreshScheduler.schedule(de?0:void 0)}}updateInputDecoration(){if(!this.replInput)return;const de=[];if(this.isReadonly&&this.replInput.hasTextFocus()&&!this.replInput.getValue()){const Se=(0,P.resolveColorValue)(P.editorForeground,this.themeService.getColorTheme())?.transparent(.4);de.push({range:{startLineNumber:0,endLineNumber:0,startColumn:0,endColumn:1},renderOptions:{after:{contentText:(0,h.localize)(2,null),color:Se?Se.toString():void 0}}})}this.replInput.setDecorations("repl-decoration",ce,de)}saveState(){const de=this.history.getHistory();if(de.length?this.storageService.store(te,JSON.stringify(de),1,0):this.storageService.remove(te,1),this.filterActionViewItem){const Se=this.filterActionViewItem.getHistory();Se.length?this.storageService.store(se,JSON.stringify(Se),1,0):this.storageService.remove(se,1);const we=this.filterState.filterText;we?this.storageService.store(ie,we,1,0):this.storageService.remove(ie,1)}super.saveState()}dispose(){this.replInput.dispose(),this.replElementsChangeListener&&this.replElementsChangeListener.dispose(),this.refreshScheduler.dispose(),this.modelChangeListener.dispose(),super.dispose()}};fe.REFRESH_DELAY=50,fe.URI=v.URI.parse(`${X.DEBUG_SCHEME}:replinput`),Ee([k.memoize],fe.prototype,"refreshScheduler",null),fe=Ee([W(1,X.IDebugService),W(2,O.IInstantiationService),W(3,N.IStorageService),W(4,V.IThemeService),W(5,u.IModelService),W(6,E.IContextKeyService),W(7,c.ICodeEditorService),W(8,U.IViewDescriptorService),W(9,y.IContextMenuService),W(10,b.IConfigurationService),W(11,a.ITextResourcePropertiesService),W(12,J.IEditorService),W(13,F.IKeybindingService),W(14,M.IOpenerService),W(15,B.ITelemetryService),W(16,d.IMenuService),W(17,p.ILanguageFeaturesService)],fe),e.Repl=fe;class pe extends o.EditorAction{constructor(){super({id:"repl.action.acceptInput",label:(0,h.localize)(3,null),alias:"REPL Accept Input",precondition:X.CONTEXT_IN_DEBUG_REPL,kbOpts:{kbExpr:l.EditorContextKeys.textInputFocus,primary:3,weight:100}})}run(de,Se){n.SuggestController.get(Se)?.cancelSuggestWidget(),ve(de.get(U.IViewsService))?.acceptReplInput()}}class me extends o.EditorAction{constructor(){super({id:"repl.action.filter",label:(0,h.localize)(4,null),alias:"REPL Filter",precondition:X.CONTEXT_IN_DEBUG_REPL,kbOpts:{kbExpr:l.EditorContextKeys.textInputFocus,primary:2048|36,weight:100}})}run(de,Se){ve(de.get(U.IViewsService))?.focusFilter()}}class be extends o.EditorAction{constructor(){super({id:"repl.action.copyAll",label:(0,h.localize)(5,null),alias:"Debug Console Copy All",precondition:X.CONTEXT_IN_DEBUG_REPL})}run(de,Se){const we=de.get(m.IClipboardService),ye=ve(de.get(U.IViewsService));if(ye)return we.writeText(ye.getVisibleContent())}}(0,o.registerEditorAction)(pe),(0,o.registerEditorAction)(be),(0,o.registerEditorAction)(me);class Ce extends K.FocusSessionActionViewItem{getSessions(){return this.debugService.getModel().getSessions(!0).filter(de=>de.hasSeparateRepl()&&!ue.has(de))}mapFocusedSessionToSelected(de){for(;de.parentSession&&!de.hasSeparateRepl();)de=de.parentSession;return de}}function ve(ge){return ge.getActiveViewWithId(X.REPL_VIEW_ID)??void 0}(0,d.registerAction2)(class extends d.Action2{constructor(){super({id:le,title:(0,h.localize)(6,null),f1:!1,menu:{id:d.MenuId.ViewTitle,group:"navigation",when:E.ContextKeyExpr.equals("view",X.REPL_VIEW_ID),order:10}})}run(ge){}});const he="workbench.action.debug.selectRepl";(0,d.registerAction2)(class extends z.ViewAction{constructor(){super({id:he,viewId:X.REPL_VIEW_ID,title:(0,h.localize)(7,null),f1:!1,menu:{id:d.MenuId.ViewTitle,group:"navigation",when:E.ContextKeyExpr.and(E.ContextKeyExpr.equals("view",X.REPL_VIEW_ID),X.CONTEXT_MULTI_SESSION_REPL),order:20}})}async runInView(ge,de,Se){const we=ge.get(X.IDebugService);if(Se&&Se.state!==0&&Se!==we.getViewModel().focusedSession){if(Se.state!==2){const ye=we.getModel().getSessions().find(ke=>ke.parentSession===Se&&ke.state===2);ye&&(Se=ye)}await we.focusStackFrame(void 0,void 0,Se,!0)}await de.selectSession(Se)}}),(0,d.registerAction2)(class extends z.ViewAction{constructor(){super({id:"workbench.debug.panel.action.clearReplAction",viewId:X.REPL_VIEW_ID,title:{value:(0,h.localize)(8,null),original:"Clear Console"},f1:!0,icon:G.debugConsoleClearAll,menu:[{id:d.MenuId.ViewTitle,group:"navigation",when:E.ContextKeyExpr.equals("view",X.REPL_VIEW_ID),order:30},{id:d.MenuId.DebugConsoleContext,group:"z_commands",order:20}]})}runInView(ge,de){de.clearRepl(),f.status((0,h.localize)(9,null))}}),(0,d.registerAction2)(class extends z.ViewAction{constructor(){super({id:"debug.collapseRepl",title:(0,h.localize)(10,null),viewId:X.REPL_VIEW_ID,menu:{id:d.MenuId.DebugConsoleContext,group:"z_commands",order:10}})}runInView(ge,de){de.collapseAll(),de.focus()}}),(0,d.registerAction2)(class extends z.ViewAction{constructor(){super({id:"debug.replPaste",title:(0,h.localize)(11,null),viewId:X.REPL_VIEW_ID,precondition:X.CONTEXT_DEBUG_STATE.notEqualsTo((0,X.getStateLabel)(0)),menu:{id:d.MenuId.DebugConsoleContext,group:"2_cutcopypaste",order:30}})}async runInView(ge,de){const we=await ge.get(m.IClipboardService).readText();if(we){const ye=de.getReplInput();ye.setValue(ye.getValue().concat(we)),de.focus();const ke=ye.getModel(),Ie=ke?ke.getLineCount():0,Te=ke?.getLineMaxColumn(Ie);typeof Ie=="number"&&typeof Te=="number"&&ye.setPosition({lineNumber:Ie,column:Te})}}}),(0,d.registerAction2)(class extends z.ViewAction{constructor(){super({id:"workbench.debug.action.copyAll",title:(0,h.localize)(12,null),viewId:X.REPL_VIEW_ID,menu:{id:d.MenuId.DebugConsoleContext,group:"2_cutcopypaste",order:20}})}async runInView(ge,de){await ge.get(m.IClipboardService).writeText(de.getVisibleContent())}}),(0,d.registerAction2)(class extends d.Action2{constructor(){super({id:"debug.replCopy",title:(0,h.localize)(13,null),menu:{id:d.MenuId.DebugConsoleContext,group:"2_cutcopypaste",order:10}})}async run(ge,de){const Se=ge.get(m.IClipboardService),ye=window.getSelection()?.toString();ye&&ye.length>0?await Se.writeText(ye):de&&await Se.writeText(de.toString())}})}),define(ne[2614],re([1,0,10,2,18,5,492,356,165,351,52,42,64,163,37,16,38,26,73,7,414,200,2191,39,313,173,247,791,318,354,433,181,61,8]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModifiedElement=e.InsertElement=e.DeletedElement=e.fixedDiffEditorOptions=e.getOptimizedNestedCodeEditorWidgetOptions=e.fixedEditorOptions=void 0;const F={top:12,bottom:12};e.fixedEditorOptions={padding:F,scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",vertical:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!1},renderLineHighlightOnlyWhenFocus:!0,overviewRulerLanes:0,overviewRulerBorder:!1,selectOnLineNumbers:!1,wordWrap:"off",lineNumbers:"off",lineDecorationsWidth:0,glyphMargin:!1,fixedOverflowWidgets:!0,minimap:{enabled:!1},renderValidationDecorations:"on",renderLineHighlight:"none",readOnly:!0};function L(){return{isSimpleWidget:!1,contributions:h.EditorExtensionsRegistry.getSomeEditorContributions([E.MenuPreventer.ID,y.SelectionClipboardContributionID,g.ContextMenuController.ID,m.SuggestController.ID,d.SnippetController2.ID,T.TabCompletionController.ID,b.AccessibilityHelpController.ID])}}e.getOptimizedNestedCodeEditorWidgetOptions=L,e.fixedDiffEditorOptions={...e.fixedEditorOptions,glyphMargin:!0,enableSplitViewResizing:!1,renderIndicators:!0,readOnly:!1,isInEmbeddedEditor:!0,renderOverviewRuler:!1};let M=class extends f.Disposable{constructor(H,K,G,q,Z,j,X,Y,$){super();this.cell=H,this.propertyHeaderContainer=K,this.notebookEditor=G,this.accessor=q,this.contextMenuService=Z,this.keybindingService=j,this.notificationService=X,this.menuService=Y,this.contextKeyService=$}buildHeader(){const H=this.accessor.checkIfModified(this.cell);this._foldingIndicator=t.append(this.propertyHeaderContainer,t.$(".property-folding-indicator")),this._foldingIndicator.classList.add(this.accessor.prefix),this._updateFoldingIcon();const K=t.append(this.propertyHeaderContainer,t.$("div.property-status"));this._statusSpan=t.append(K,t.$("span")),this._description=t.append(K,t.$("span.property-description")),H?(this._statusSpan.textContent=this.accessor.changedLabel,this._statusSpan.style.fontWeight="bold",H.reason&&(this._description.textContent=H.reason),this.propertyHeaderContainer.classList.add("modified")):(this._statusSpan.textContent=this.accessor.unChangedLabel,this._description.textContent="",this.propertyHeaderContainer.classList.remove("modified"));const G=t.append(this.propertyHeaderContainer,t.$("div.property-toolbar"));this._toolbar=new c.ToolBar(G,this.contextMenuService,{actionViewItemProvider:X=>{if(X instanceof S.MenuItemAction)return new u.CodiconActionViewItem(X,this.keybindingService,this.notificationService,this.contextKeyService)}}),this._register(this._toolbar),this._toolbar.context={cell:this.cell};const q=this.contextKeyService.createScoped(G);this._register(q),D.NOTEBOOK_DIFF_CELL_PROPERTY.bindTo(q).set(!!H),this._propertyExpanded=D.NOTEBOOK_DIFF_CELL_PROPERTY_EXPANDED.bindTo(q),this._menu=this.menuService.createMenu(this.accessor.menuId,q),this._register(this._menu);const j=[];(0,r.createAndFillInActionBarActions)(this._menu,{shouldForwardArgs:!0},j),this._toolbar.setActions(j),this._register(this._menu.onDidChange(()=>{const X=[];(0,r.createAndFillInActionBarActions)(this._menu,{shouldForwardArgs:!0},X),this._toolbar.setActions(X)})),this._register(this.notebookEditor.onMouseUp(X=>{if(!X.event.target)return;const Y=X.event.target;if(Y.classList.contains("codicon-notebook-collapsed")||Y.classList.contains("codicon-notebook-expanded")){const $=Y.parentElement;if(!$||!$.classList.contains(this.accessor.prefix)||!$.classList.contains("property-folding-indicator"))return;if(X.target===this.cell){const ee=this.accessor.getFoldingState(this.cell);this.accessor.updateFoldingState(this.cell,ee===k.PropertyFoldingState.Expanded?k.PropertyFoldingState.Collapsed:k.PropertyFoldingState.Expanded),this._updateFoldingIcon(),this.accessor.updateInfoRendering(this.cell.renderOutput)}}})),this._updateFoldingIcon(),this.accessor.updateInfoRendering(this.cell.renderOutput)}refresh(){const H=this.accessor.checkIfModified(this.cell);if(H){this._statusSpan.textContent=this.accessor.changedLabel,this._statusSpan.style.fontWeight="bold",H.reason&&(this._description.textContent=H.reason),this.propertyHeaderContainer.classList.add("modified");const K=[];(0,r.createAndFillInActionBarActions)(this._menu,void 0,K),this._toolbar.setActions(K)}else this._statusSpan.textContent=this.accessor.unChangedLabel,this._statusSpan.style.fontWeight="normal",this._description.textContent="",this.propertyHeaderContainer.classList.remove("modified"),this._toolbar.setActions([])}_updateFoldingIcon(){this.accessor.getFoldingState(this.cell)===k.PropertyFoldingState.Collapsed?(t.reset(this._foldingIndicator,(0,R.renderIcon)(a.collapsedIcon)),this._propertyExpanded?.set(!1)):(t.reset(this._foldingIndicator,(0,R.renderIcon)(a.expandedIcon)),this._propertyExpanded?.set(!0))}};M=Ee([W(4,i.IContextMenuService),W(5,s.IKeybindingService),W(6,l.INotificationService),W(7,S.IMenuService),W(8,p.IContextKeyService)],M);class N extends f.Disposable{constructor(H,K,G,q,Z,j,X,Y,$,J,ee,te,se,ie){super();this.notebookEditor=H,this.cell=K,this.templateData=G,this.style=q,this.instantiationService=Z,this.languageService=j,this.modelService=X,this.textModelService=Y,this.contextMenuService=$,this.keybindingService=J,this.notificationService=ee,this.menuService=te,this.contextKeyService=se,this.configurationService=ie,this._metadataLocalDisposable=this._register(new f.DisposableStore),this._outputLocalDisposable=this._register(new f.DisposableStore),this._ignoreMetadata=!1,this._ignoreOutputs=!1,this._isDisposed=!1,this._metadataEditorDisposeStore=this._register(new f.DisposableStore),this._outputEditorDisposeStore=this._register(new f.DisposableStore),this._register(K.onDidLayoutChange(ce=>this.layout(ce))),this._register(K.onDidLayoutChange(ce=>this.updateBorders())),this.init(),this.buildBody(),this._register(K.onDidStateChange(()=>{this.updateOutputRendering(this.cell.renderOutput)}))}buildBody(){const H=this.templateData.body;switch(this._diffEditorContainer=this.templateData.diffEditorContainer,H.classList.remove("left","right","full"),this.style){case"left":H.classList.add("left");break;case"right":H.classList.add("right");break;default:H.classList.add("full");break}this.styleContainer(this._diffEditorContainer),this.updateSourceEditor(),this._ignoreMetadata=this.configurationService.getValue("notebook.diff.ignoreMetadata"),this._ignoreMetadata?this._disposeMetadata():this._buildMetadata(),this._ignoreOutputs=this.configurationService.getValue("notebook.diff.ignoreOutputs")||!!this.notebookEditor.textModel?.transientOptions.transientOutputs,this._ignoreOutputs?this._disposeOutput():this._buildOutput(),this._register(this.configurationService.onDidChangeConfiguration(K=>{let G=!1,q=!1;if(K.affectsConfiguration("notebook.diff.ignoreMetadata")){const Z=this.configurationService.getValue("notebook.diff.ignoreMetadata");Z!==void 0&&this._ignoreMetadata!==Z&&(this._ignoreMetadata=Z,this._metadataLocalDisposable.clear(),this.configurationService.getValue("notebook.diff.ignoreMetadata")?this._disposeMetadata():(this.cell.metadataStatusHeight=25,this._buildMetadata(),this.updateMetadataRendering(),G=!0))}if(K.affectsConfiguration("notebook.diff.ignoreOutputs")){const Z=this.configurationService.getValue("notebook.diff.ignoreOutputs");Z!==void 0&&this._ignoreOutputs!==(Z||this.notebookEditor.textModel?.transientOptions.transientOutputs)&&(this._ignoreOutputs=Z||!!this.notebookEditor.textModel?.transientOptions.transientOutputs,this._outputLocalDisposable.clear(),this._ignoreOutputs?this._disposeOutput():(this.cell.outputStatusHeight=25,this._buildOutput(),q=!0))}this.layout({metadataHeight:G,outputTotalHeight:q})}))}updateMetadataRendering(){this.cell.metadataFoldingState===k.PropertyFoldingState.Expanded?(this._metadataInfoContainer.style.display="block",!this._metadataEditorContainer||!this._metadataEditor?(this._metadataEditorContainer=t.append(this._metadataInfoContainer,t.$(".metadata-editor-container")),this._buildMetadataEditor()):this.cell.metadataHeight=this._metadataEditor.getContentHeight()):(this._metadataInfoContainer.style.display="none",this.cell.metadataHeight=0)}updateOutputRendering(H){this.cell.outputFoldingState===k.PropertyFoldingState.Expanded?(this._outputInfoContainer.style.display="block",H?(this._hideOutputsRaw(),this._buildOutputRendererContainer(),this._showOutputsRenderer(),this._showOutputsEmptyView()):(this._hideOutputsRenderer(),this._buildOutputRawContainer(),this._showOutputsRaw())):(this._outputInfoContainer.style.display="none",this._hideOutputsRaw(),this._hideOutputsRenderer(),this._hideOutputsEmptyView())}_buildOutputRawContainer(){this._outputEditorContainer||(this._outputEditorContainer=t.append(this._outputInfoContainer,t.$(".output-editor-container")),this._buildOutputEditor())}_showOutputsRaw(){this._outputEditorContainer&&(this._outputEditorContainer.style.display="block",this.cell.rawOutputHeight=this._outputEditor.getContentHeight())}_showOutputsEmptyView(){this.cell.layoutChange()}_hideOutputsRaw(){this._outputEditorContainer&&(this._outputEditorContainer.style.display="none",this.cell.rawOutputHeight=0)}_hideOutputsEmptyView(){this.cell.layoutChange()}_applySanitizedMetadataChanges(H,K){const G={};try{const q=JSON.parse(K),Z=new Set([...Object.keys(q)]);for(const X of Z)switch(X){case"inputCollapsed":case"outputCollapsed":typeof q[X]=="boolean"?G[X]=q[X]:G[X]=H[X];break;default:G[X]=q[X];break}const j=this.notebookEditor.textModel.cells.indexOf(this.cell.modified.textModel);if(j<0)return;this.notebookEditor.textModel.applyEdits([{editType:3,index:j,metadata:G}],!0,void 0,()=>{},void 0)}catch{}}async _buildMetadataEditor(){if(this._metadataEditorDisposeStore.clear(),this.cell instanceof k.SideBySideDiffElementViewModel){this._metadataEditor=this.instantiationService.createInstance(w.DiffEditorWidget,this._metadataEditorContainer,{...e.fixedDiffEditorOptions,overflowWidgetsDomNode:this.notebookEditor.getOverflowContainerDomNode(),readOnly:!1,originalEditable:!1,ignoreTrimWhitespace:!1,automaticLayout:!1,dimension:{height:this.cell.layoutInfo.metadataHeight,width:this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(),!0,!0)}},{originalEditor:L(),modifiedEditor:L()}),this.layout({metadataHeight:!0}),this._metadataEditorDisposeStore.add(this._metadataEditor),this._metadataEditorContainer?.classList.add("diff");const H=await this.textModelService.createModelReference(o.CellUri.generateCellUri(this.cell.originalDocument.uri,this.cell.original.handle,_.Schemas.vscodeNotebookCellMetadata)),K=await this.textModelService.createModelReference(o.CellUri.generateCellUri(this.cell.modifiedDocument.uri,this.cell.modified.handle,_.Schemas.vscodeNotebookCellMetadata));this._metadataEditor.setModel({original:H.object.textEditorModel,modified:K.object.textEditorModel}),this._metadataEditorDisposeStore.add(H),this._metadataEditorDisposeStore.add(K),this.cell.metadataHeight=this._metadataEditor.getContentHeight(),this._metadataEditorDisposeStore.add(this._metadataEditor.onDidContentSizeChange(q=>{q.contentHeightChanged&&this.cell.metadataFoldingState===k.PropertyFoldingState.Expanded&&(this.cell.metadataHeight=q.contentHeight)}));let G=!1;this._metadataEditorDisposeStore.add(K.object.textEditorModel.onDidChangeContent(()=>{G=!0;const q=K.object.textEditorModel.getValue();this._applySanitizedMetadataChanges(this.cell.modified.metadata,q),this._metadataHeader.refresh(),G=!1})),this._metadataEditorDisposeStore.add(this.cell.modified.textModel.onDidChangeMetadata(()=>{if(G)return;const q=(0,k.getFormattedMetadataJSON)(this.notebookEditor.textModel,this.cell.modified?.metadata||{},this.cell.modified?.language);K.object.textEditorModel.setValue(q)}));return}else{this._metadataEditor=this.instantiationService.createInstance(I.CodeEditorWidget,this._metadataEditorContainer,{...e.fixedEditorOptions,dimension:{width:this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(),!1,!0),height:this.cell.layoutInfo.metadataHeight},overflowWidgetsDomNode:this.notebookEditor.getOverflowContainerDomNode(),readOnly:!1},{}),this.layout({metadataHeight:!0}),this._metadataEditorDisposeStore.add(this._metadataEditor);const H=this.languageService.createById("jsonc"),K=(0,k.getFormattedMetadataJSON)(this.notebookEditor.textModel,this.cell.type==="insert"?this.cell.modified.metadata||{}:this.cell.original.metadata||{}),G=this.cell.type==="insert"?this.cell.modified.uri:this.cell.original.uri,q=this.cell.type==="insert"?this.cell.modified.handle:this.cell.original.handle,Z=o.CellUri.generateCellUri(G,q,_.Schemas.vscodeNotebookCellMetadata),j=this.modelService.createModel(K,H,Z,!1);this._metadataEditor.setModel(j),this._metadataEditorDisposeStore.add(j),this.cell.metadataHeight=this._metadataEditor.getContentHeight(),this._metadataEditorDisposeStore.add(this._metadataEditor.onDidContentSizeChange(X=>{X.contentHeightChanged&&this.cell.metadataFoldingState===k.PropertyFoldingState.Expanded&&(this.cell.metadataHeight=X.contentHeight)}))}}_buildOutputEditor(){if(this._outputEditorDisposeStore.clear(),(this.cell.type==="modified"||this.cell.type==="unchanged")&&!this.notebookEditor.textModel.transientOptions.transientOutputs){const q=(0,k.getFormattedOutputJSON)(this.cell.original?.outputs||[]),Z=(0,k.getFormattedOutputJSON)(this.cell.modified?.outputs||[]);if(q!==Z){const j=this.languageService.createById("json"),X=this.modelService.createModel(q,j,void 0,!0),Y=this.modelService.createModel(Z,j,void 0,!0);this._outputEditorDisposeStore.add(X),this._outputEditorDisposeStore.add(Y);const $=this.notebookEditor.getLayoutInfo().fontInfo.lineHeight||17,J=Math.max(X.getLineCount(),Y.getLineCount());this._outputEditor=this.instantiationService.createInstance(w.DiffEditorWidget,this._outputEditorContainer,{...e.fixedDiffEditorOptions,overflowWidgetsDomNode:this.notebookEditor.getOverflowContainerDomNode(),readOnly:!0,ignoreTrimWhitespace:!1,automaticLayout:!1,dimension:{height:Math.min(k.OUTPUT_EDITOR_HEIGHT_MAGIC,this.cell.layoutInfo.rawOutputHeight||$*J),width:this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(),!1,!0)}},{originalEditor:L(),modifiedEditor:L()}),this._outputEditorDisposeStore.add(this._outputEditor),this._outputEditorContainer?.classList.add("diff"),this._outputEditor.setModel({original:X,modified:Y}),this._outputEditor.restoreViewState(this.cell.getOutputEditorViewState()),this.cell.rawOutputHeight=this._outputEditor.getContentHeight(),this._outputEditorDisposeStore.add(this._outputEditor.onDidContentSizeChange(ee=>{ee.contentHeightChanged&&this.cell.outputFoldingState===k.PropertyFoldingState.Expanded&&(this.cell.rawOutputHeight=ee.contentHeight)})),this._outputEditorDisposeStore.add(this.cell.modified.textModel.onDidChangeOutputs(()=>{const ee=(0,k.getFormattedOutputJSON)(this.cell.modified?.outputs||[]);Y.setValue(ee),this._outputHeader.refresh()}));return}}this._outputEditor=this.instantiationService.createInstance(I.CodeEditorWidget,this._outputEditorContainer,{...e.fixedEditorOptions,dimension:{width:Math.min(k.OUTPUT_EDITOR_HEIGHT_MAGIC,this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(),!1,this.cell.type==="unchanged"||this.cell.type==="modified")-32),height:this.cell.layoutInfo.rawOutputHeight},overflowWidgetsDomNode:this.notebookEditor.getOverflowContainerDomNode()},{}),this._outputEditorDisposeStore.add(this._outputEditor);const H=this.languageService.createById("json"),K=(0,k.getFormattedOutputJSON)(this.notebookEditor.textModel.transientOptions.transientOutputs?[]:this.cell.type==="insert"?this.cell.modified.outputs||[]:this.cell.original.outputs||[]),G=this.modelService.createModel(K,H,void 0,!0);this._outputEditorDisposeStore.add(G),this._outputEditor.setModel(G),this._outputEditor.restoreViewState(this.cell.getOutputEditorViewState()),this.cell.rawOutputHeight=this._outputEditor.getContentHeight(),this._outputEditorDisposeStore.add(this._outputEditor.onDidContentSizeChange(q=>{q.contentHeightChanged&&this.cell.outputFoldingState===k.PropertyFoldingState.Expanded&&(this.cell.rawOutputHeight=q.contentHeight)}))}layoutNotebookCell(){this.notebookEditor.layoutNotebookCell(this.cell,this.cell.layoutInfo.totalHeight)}updateBorders(){this.templateData.leftBorder.style.height=`${this.cell.layoutInfo.totalHeight-32}px`,this.templateData.rightBorder.style.height=`${this.cell.layoutInfo.totalHeight-32}px`,this.templateData.bottomBorder.style.top=`${this.cell.layoutInfo.totalHeight-32}px`}dispose(){this._outputEditor&&this.cell.saveOutputEditorViewState(this._outputEditor.saveViewState()),this._metadataEditor&&this.cell.saveMetadataEditorViewState(this._metadataEditor.saveViewState()),this._metadataEditorDisposeStore.dispose(),this._outputEditorDisposeStore.dispose(),this._isDisposed=!0,super.dispose()}}class B extends N{constructor(H,K,G,q,Z,j,X,Y,$,J,ee,te,se,ie){super(H,K,G,q,Z,j,X,Y,$,J,ee,te,se,ie);this.cell=K,this.templateData=G}init(){this._diagonalFill=this.templateData.diagonalFill}buildBody(){const H=this.templateData.body;switch(this._diffEditorContainer=this.templateData.diffEditorContainer,H.classList.remove("left","right","full"),this.style){case"left":H.classList.add("left");break;case"right":H.classList.add("right");break;default:H.classList.add("full");break}this.styleContainer(this._diffEditorContainer),this.updateSourceEditor(),this.configurationService.getValue("notebook.diff.ignoreMetadata")?this._disposeMetadata():this._buildMetadata(),this.configurationService.getValue("notebook.diff.ignoreOutputs")||this.notebookEditor.textModel?.transientOptions.transientOutputs?this._disposeOutput():this._buildOutput(),this._register(this.configurationService.onDidChangeConfiguration(K=>{let G=!1,q=!1;K.affectsConfiguration("notebook.diff.ignoreMetadata")&&(this._metadataLocalDisposable.clear(),this.configurationService.getValue("notebook.diff.ignoreMetadata")?this._disposeMetadata():(this.cell.metadataStatusHeight=25,this._buildMetadata(),this.updateMetadataRendering(),G=!0)),K.affectsConfiguration("notebook.diff.ignoreOutputs")&&(this._outputLocalDisposable.clear(),this.configurationService.getValue("notebook.diff.ignoreOutputs")||this.notebookEditor.textModel?.transientOptions.transientOutputs?this._disposeOutput():(this.cell.outputStatusHeight=25,this._buildOutput(),q=!0)),this.layout({metadataHeight:G,outputTotalHeight:q})}))}_disposeMetadata(){this.cell.metadataStatusHeight=0,this.cell.metadataHeight=0,this.templateData.metadataHeaderContainer.style.display="none",this.templateData.metadataInfoContainer.style.display="none",this._metadataEditor=void 0}_buildMetadata(){this._metadataHeaderContainer=this.templateData.metadataHeaderContainer,this._metadataInfoContainer=this.templateData.metadataInfoContainer,this._metadataHeaderContainer.style.display="flex",this._metadataInfoContainer.style.display="block",this._metadataHeaderContainer.innerText="",this._metadataInfoContainer.innerText="",this._metadataHeader=this.instantiationService.createInstance(M,this.cell,this._metadataHeaderContainer,this.notebookEditor,{updateInfoRendering:this.updateMetadataRendering.bind(this),checkIfModified:H=>H.checkMetadataIfModified(),getFoldingState:H=>H.metadataFoldingState,updateFoldingState:(H,K)=>{H.metadataFoldingState=K},unChangedLabel:"Metadata",changedLabel:"Metadata changed",prefix:"metadata",menuId:S.MenuId.NotebookDiffCellMetadataTitle}),this._metadataLocalDisposable.add(this._metadataHeader),this._metadataHeader.buildHeader()}_buildOutput(){this.templateData.outputHeaderContainer.style.display="flex",this.templateData.outputInfoContainer.style.display="block",this._outputHeaderContainer=this.templateData.outputHeaderContainer,this._outputInfoContainer=this.templateData.outputInfoContainer,this._outputHeaderContainer.innerText="",this._outputInfoContainer.innerText="",this._outputHeader=this.instantiationService.createInstance(M,this.cell,this._outputHeaderContainer,this.notebookEditor,{updateInfoRendering:this.updateOutputRendering.bind(this),checkIfModified:H=>H.checkIfOutputsModified(),getFoldingState:H=>H.outputFoldingState,updateFoldingState:(H,K)=>{H.outputFoldingState=K},unChangedLabel:"Outputs",changedLabel:"Outputs changed",prefix:"output",menuId:S.MenuId.NotebookDiffCellOutputsTitle}),this._outputLocalDisposable.add(this._outputHeader),this._outputHeader.buildHeader()}_disposeOutput(){this._hideOutputsRaw(),this._hideOutputsRenderer(),this._hideOutputsEmptyView(),this.cell.rawOutputHeight=0,this.cell.outputStatusHeight=0,this.templateData.outputHeaderContainer.style.display="none",this.templateData.outputInfoContainer.style.display="none",this._outputViewContainer=void 0}}let P=class extends B{constructor(H,K,G,q,Z,j,X,Y,$,J,ee,te,se){super(H,K,G,"left",X,q,Z,j,Y,$,J,ee,te,se)}styleContainer(H){H.classList.remove("inserted"),H.classList.add("removed")}updateSourceEditor(){const H=this.cell.original,K=H.textModel.textBuffer.getLineCount(),G=this.notebookEditor.getLayoutInfo().fontInfo.lineHeight||17,q=K*G+F.top+F.bottom;this._editor=this.templateData.sourceEditor,this._editor.layout({width:(this.notebookEditor.getLayoutInfo().width-2*D.DIFF_CELL_MARGIN)/2-18,height:q}),this.cell.editorHeight=q,this._register(this._editor.onDidContentSizeChange(Z=>{Z.contentHeightChanged&&this.cell.layoutInfo.editorHeight!==Z.contentHeight&&(this.cell.editorHeight=Z.contentHeight)})),this.textModelService.createModelReference(H.uri).then(Z=>{if(this._isDisposed)return;this._register(Z);const j=Z.object.textEditorModel;this._editor.setModel(j),this.cell.editorHeight=this._editor.getContentHeight()})}layout(H){t.scheduleAtNextAnimationFrame(()=>{(H.editorHeight||H.outerWidth)&&this._editor.layout({width:this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(),!1,!1),height:this.cell.layoutInfo.editorHeight}),(H.metadataHeight||H.outerWidth)&&this._metadataEditor?.layout({width:this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(),!1,!1),height:this.cell.layoutInfo.metadataHeight}),(H.outputTotalHeight||H.outerWidth)&&this._outputEditor?.layout({width:this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(),!1,!1),height:this.cell.layoutInfo.outputTotalHeight}),this._diagonalFill&&(this._diagonalFill.style.height=`${this.cell.layoutInfo.totalHeight-32}px`),this.layoutNotebookCell()})}_buildOutputRendererContainer(){if(!this._outputViewContainer){this._outputViewContainer=t.append(this._outputInfoContainer,t.$(".output-view-container")),this._outputEmptyElement=t.append(this._outputViewContainer,t.$(".output-empty-view"));const H=t.append(this._outputEmptyElement,t.$("span"));H.innerText="No outputs to render",this.cell.original.outputs.length===0?this._outputEmptyElement.style.display="block":this._outputEmptyElement.style.display="none",this.cell.layoutChange(),this._outputLeftView=this.instantiationService.createInstance(n.OutputContainer,this.notebookEditor,this.notebookEditor.textModel,this.cell,this.cell.original,D.DiffSide.Original,this._outputViewContainer),this._register(this._outputLeftView),this._outputLeftView.render();const K=this.notebookEditor.onDidDynamicOutputRendered(G=>{G.cell.uri.toString()===this.cell.original.uri.toString()&&(this.notebookEditor.deltaCellOutputContainerClassNames(D.DiffSide.Original,this.cell.original.id,["nb-cellDeleted"],[]),K.dispose())});this._register(K)}this._outputViewContainer.style.display="block"}_decorate(){this.notebookEditor.deltaCellOutputContainerClassNames(D.DiffSide.Original,this.cell.original.id,["nb-cellDeleted"],[])}_showOutputsRenderer(){this._outputViewContainer&&(this._outputViewContainer.style.display="block",this._outputLeftView?.showOutputs(),this._decorate())}_hideOutputsRenderer(){this._outputViewContainer&&(this._outputViewContainer.style.display="none",this._outputLeftView?.hideOutputs())}dispose(){this._editor&&this.cell.saveSpirceEditorViewState(this._editor.saveViewState()),super.dispose()}};P=Ee([W(3,C.ILanguageService),W(4,v.IModelService),W(5,O.ITextModelService),W(6,A.IInstantiationService),W(7,i.IContextMenuService),W(8,s.IKeybindingService),W(9,l.INotificationService),W(10,S.IMenuService),W(11,p.IContextKeyService),W(12,x.IConfigurationService)],P),e.DeletedElement=P;let V=class extends B{constructor(H,K,G,q,Z,j,X,Y,$,J,ee,te,se){super(H,K,G,"right",q,Z,j,X,Y,$,J,ee,te,se)}styleContainer(H){H.classList.remove("removed"),H.classList.add("inserted")}updateSourceEditor(){const H=this.cell.modified,K=H.textModel.textBuffer.getLineCount(),G=this.notebookEditor.getLayoutInfo().fontInfo.lineHeight||17,q=K*G+F.top+F.bottom;this._editor=this.templateData.sourceEditor,this._editor.layout({width:(this.notebookEditor.getLayoutInfo().width-2*D.DIFF_CELL_MARGIN)/2-18,height:q}),this._editor.updateOptions({readOnly:!1}),this.cell.editorHeight=q,this._register(this._editor.onDidContentSizeChange(Z=>{Z.contentHeightChanged&&this.cell.layoutInfo.editorHeight!==Z.contentHeight&&(this.cell.editorHeight=Z.contentHeight)})),this.textModelService.createModelReference(H.uri).then(Z=>{if(this._isDisposed)return;this._register(Z);const j=Z.object.textEditorModel;this._editor.setModel(j),this._editor.restoreViewState(this.cell.getSourceEditorViewState()),this.cell.editorHeight=this._editor.getContentHeight()})}_buildOutputRendererContainer(){if(!this._outputViewContainer){this._outputViewContainer=t.append(this._outputInfoContainer,t.$(".output-view-container")),this._outputEmptyElement=t.append(this._outputViewContainer,t.$(".output-empty-view")),this._outputEmptyElement.innerText="No outputs to render",this.cell.modified.outputs.length===0?this._outputEmptyElement.style.display="block":this._outputEmptyElement.style.display="none",this.cell.layoutChange(),this._outputRightView=this.instantiationService.createInstance(n.OutputContainer,this.notebookEditor,this.notebookEditor.textModel,this.cell,this.cell.modified,D.DiffSide.Modified,this._outputViewContainer),this._register(this._outputRightView),this._outputRightView.render();const H=this.notebookEditor.onDidDynamicOutputRendered(K=>{K.cell.uri.toString()===this.cell.modified.uri.toString()&&(this.notebookEditor.deltaCellOutputContainerClassNames(D.DiffSide.Modified,this.cell.modified.id,["nb-cellAdded"],[]),H.dispose())});this._register(H)}this._outputViewContainer.style.display="block"}_decorate(){this.notebookEditor.deltaCellOutputContainerClassNames(D.DiffSide.Modified,this.cell.modified.id,["nb-cellAdded"],[])}_showOutputsRenderer(){this._outputViewContainer&&(this._outputViewContainer.style.display="block",this._outputRightView?.showOutputs(),this._decorate())}_hideOutputsRenderer(){this._outputViewContainer&&(this._outputViewContainer.style.display="none",this._outputRightView?.hideOutputs())}layout(H){t.scheduleAtNextAnimationFrame(()=>{(H.editorHeight||H.outerWidth)&&this._editor.layout({width:this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(),!1,!1),height:this.cell.layoutInfo.editorHeight}),(H.metadataHeight||H.outerWidth)&&this._metadataEditor?.layout({width:this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(),!1,!0),height:this.cell.layoutInfo.metadataHeight}),(H.outputTotalHeight||H.outerWidth)&&this._outputEditor?.layout({width:this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(),!1,!1),height:this.cell.layoutInfo.outputTotalHeight}),this.layoutNotebookCell(),this._diagonalFill&&(this._diagonalFill.style.height=`${this.cell.layoutInfo.editorHeight+this.cell.layoutInfo.editorMargin+this.cell.layoutInfo.metadataStatusHeight+this.cell.layoutInfo.metadataHeight+this.cell.layoutInfo.outputTotalHeight+this.cell.layoutInfo.outputStatusHeight}px`)})}dispose(){this._editor&&this.cell.saveSpirceEditorViewState(this._editor.saveViewState()),super.dispose()}};V=Ee([W(3,A.IInstantiationService),W(4,C.ILanguageService),W(5,v.IModelService),W(6,O.ITextModelService),W(7,i.IContextMenuService),W(8,s.IKeybindingService),W(9,l.INotificationService),W(10,S.IMenuService),W(11,p.IContextKeyService),W(12,x.IConfigurationService)],V),e.InsertElement=V;let z=class extends N{constructor(H,K,G,q,Z,j,X,Y,$,J,ee,te,se){super(H,K,G,"full",q,Z,j,X,Y,$,J,ee,te,se);this.cell=K,this.templateData=G}init(){}styleContainer(H){H.classList.remove("inserted","removed")}_disposeMetadata(){this.cell.metadataStatusHeight=0,this.cell.metadataHeight=0,this.templateData.metadataHeaderContainer.style.display="none",this.templateData.metadataInfoContainer.style.display="none",this._metadataEditor=void 0}_buildMetadata(){this._metadataHeaderContainer=this.templateData.metadataHeaderContainer,this._metadataInfoContainer=this.templateData.metadataInfoContainer,this._metadataHeaderContainer.style.display="flex",this._metadataInfoContainer.style.display="block",this._metadataHeaderContainer.innerText="",this._metadataInfoContainer.innerText="",this._metadataHeader=this.instantiationService.createInstance(M,this.cell,this._metadataHeaderContainer,this.notebookEditor,{updateInfoRendering:this.updateMetadataRendering.bind(this),checkIfModified:H=>H.checkMetadataIfModified(),getFoldingState:H=>H.metadataFoldingState,updateFoldingState:(H,K)=>{H.metadataFoldingState=K},unChangedLabel:"Metadata",changedLabel:"Metadata changed",prefix:"metadata",menuId:S.MenuId.NotebookDiffCellMetadataTitle}),this._metadataLocalDisposable.add(this._metadataHeader),this._metadataHeader.buildHeader()}_disposeOutput(){this._hideOutputsRaw(),this._hideOutputsRenderer(),this._hideOutputsEmptyView(),this.cell.rawOutputHeight=0,this.cell.outputStatusHeight=0,this.templateData.outputHeaderContainer.style.display="none",this.templateData.outputInfoContainer.style.display="none",this._outputViewContainer=void 0}_buildOutput(){this.templateData.outputHeaderContainer.style.display="flex",this.templateData.outputInfoContainer.style.display="block",this._outputHeaderContainer=this.templateData.outputHeaderContainer,this._outputInfoContainer=this.templateData.outputInfoContainer,this._outputHeaderContainer.innerText="",this._outputInfoContainer.innerText="",this.cell.checkIfOutputsModified()?this._outputInfoContainer.classList.add("modified"):this._outputInfoContainer.classList.remove("modified"),this._outputHeader=this.instantiationService.createInstance(M,this.cell,this._outputHeaderContainer,this.notebookEditor,{updateInfoRendering:this.updateOutputRendering.bind(this),checkIfModified:H=>H.checkIfOutputsModified(),getFoldingState:H=>H.outputFoldingState,updateFoldingState:(H,K)=>{H.outputFoldingState=K},unChangedLabel:"Outputs",changedLabel:"Outputs changed",prefix:"output",menuId:S.MenuId.NotebookDiffCellOutputsTitle}),this._outputLocalDisposable.add(this._outputHeader),this._outputHeader.buildHeader()}_buildOutputRendererContainer(){if(!this._outputViewContainer){this._outputViewContainer=t.append(this._outputInfoContainer,t.$(".output-view-container")),this._outputEmptyElement=t.append(this._outputViewContainer,t.$(".output-empty-view")),this._outputEmptyElement.innerText="No outputs to render",!this.cell.checkIfOutputsModified()&&this.cell.modified.outputs.length===0?this._outputEmptyElement.style.display="block":this._outputEmptyElement.style.display="none",this.cell.layoutChange(),this._register(this.cell.modified.textModel.onDidChangeOutputs(()=>{!this.cell.checkIfOutputsModified()&&this.cell.modified.outputs.length===0?this._outputEmptyElement.style.display="block":this._outputEmptyElement.style.display="none"})),this._outputLeftContainer=t.append(this._outputViewContainer,t.$(".output-view-container-left")),this._outputRightContainer=t.append(this._outputViewContainer,t.$(".output-view-container-right")),this._outputMetadataContainer=t.append(this._outputViewContainer,t.$(".output-view-container-metadata"));const H=this.cell.checkIfOutputsModified(),K=H&&H.kind===1&&this.cell.original.outputs.length===1&&this.cell.modified.outputs.length===1&&(0,k.outputEqual)(this.cell.original.outputs[0],this.cell.modified.outputs[0])===1;if(H&&!K){const G=this.notebookEditor.onDidDynamicOutputRendered(Z=>{Z.cell.uri.toString()===this.cell.original.uri.toString()&&(this.notebookEditor.deltaCellOutputContainerClassNames(D.DiffSide.Original,this.cell.original.id,["nb-cellDeleted"],[]),G.dispose())}),q=this.notebookEditor.onDidDynamicOutputRendered(Z=>{Z.cell.uri.toString()===this.cell.modified.uri.toString()&&(this.notebookEditor.deltaCellOutputContainerClassNames(D.DiffSide.Modified,this.cell.modified.id,["nb-cellAdded"],[]),q.dispose())});this._register(G),this._register(q)}if(this._outputLeftView=this.instantiationService.createInstance(n.OutputContainer,this.notebookEditor,this.notebookEditor.textModel,this.cell,this.cell.original,D.DiffSide.Original,this._outputLeftContainer),this._outputLeftView.render(),this._register(this._outputLeftView),this._outputRightView=this.instantiationService.createInstance(n.OutputContainer,this.notebookEditor,this.notebookEditor.textModel,this.cell,this.cell.modified,D.DiffSide.Modified,this._outputRightContainer),this._outputRightView.render(),this._register(this._outputRightView),H&&!K&&this._decorate(),K){this._outputMetadataContainer.style.top=`${this.cell.layoutInfo.rawOutputHeight}px`,this._outputMetadataEditor=this.instantiationService.createInstance(w.DiffEditorWidget,this._outputMetadataContainer,{...e.fixedDiffEditorOptions,overflowWidgetsDomNode:this.notebookEditor.getOverflowContainerDomNode(),readOnly:!0,ignoreTrimWhitespace:!1,automaticLayout:!1,dimension:{height:k.OUTPUT_EDITOR_HEIGHT_MAGIC,width:this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(),!1,!0)}},{originalEditor:L(),modifiedEditor:L()}),this._register(this._outputMetadataEditor);const G=JSON.stringify(this.cell.original.outputs[0].metadata??{},void 0," "),q=JSON.stringify(this.cell.modified.outputs[0].metadata??{},void 0," "),Z=this.languageService.createById("json"),j=this.modelService.createModel(G,Z,void 0,!0),X=this.modelService.createModel(q,Z,void 0,!0);this._outputMetadataEditor.setModel({original:j,modified:X}),this.cell.outputMetadataHeight=this._outputMetadataEditor.getContentHeight(),this._register(this._outputMetadataEditor.onDidContentSizeChange(Y=>{this.cell.outputMetadataHeight=Y.contentHeight}))}}this._outputViewContainer.style.display="block"}_decorate(){this.cell.checkIfOutputsModified()&&(this.notebookEditor.deltaCellOutputContainerClassNames(D.DiffSide.Original,this.cell.original.id,["nb-cellDeleted"],[]),this.notebookEditor.deltaCellOutputContainerClassNames(D.DiffSide.Modified,this.cell.modified.id,["nb-cellAdded"],[]))}_showOutputsRenderer(){this._outputViewContainer&&(this._outputViewContainer.style.display="block",this._outputLeftView?.showOutputs(),this._outputRightView?.showOutputs(),this._outputMetadataEditor?.layout(),this._decorate())}_hideOutputsRenderer(){this._outputViewContainer&&(this._outputViewContainer.style.display="none",this._outputLeftView?.hideOutputs(),this._outputRightView?.hideOutputs())}updateSourceEditor(){const K=this.cell.modified.textModel.textBuffer.getLineCount(),G=this.notebookEditor.getLayoutInfo().fontInfo.lineHeight||17,q=this.cell.layoutInfo.editorHeight!==0?this.cell.layoutInfo.editorHeight:K*G+F.top+F.bottom;this._editorContainer=this.templateData.editorContainer,this._editor=this.templateData.sourceEditor,this._editorContainer.classList.add("diff"),this._editor.layout({width:this.notebookEditor.getLayoutInfo().width-2*D.DIFF_CELL_MARGIN,height:q}),this._editorContainer.style.height=`${q}px`,this._register(this._editor.onDidContentSizeChange(Y=>{Y.contentHeightChanged&&this.cell.layoutInfo.editorHeight!==Y.contentHeight&&(this.cell.editorHeight=Y.contentHeight)})),this._initializeSourceDiffEditor();const Z=this.contextKeyService.createScoped(this.templateData.inputToolbarContainer);this._register(Z);const j=D.NOTEBOOK_DIFF_CELL_INPUT.bindTo(Z);this._inputToolbarContainer=this.templateData.inputToolbarContainer,this._toolbar=this.templateData.toolbar,this._toolbar.context={cell:this.cell},this.cell.modified.textModel.getValue()!==this.cell.original.textModel.getValue()?(this._inputToolbarContainer.style.display="block",j.set(!0)):(this._inputToolbarContainer.style.display="none",j.set(!1)),this._register(this.cell.modified.textModel.onDidChangeContent(()=>{this.cell.modified.textModel.getValue()!==this.cell.original.textModel.getValue()?(this._inputToolbarContainer.style.display="block",j.set(!0)):(this._inputToolbarContainer.style.display="none",j.set(!1))})),this._menu=this.menuService.createMenu(S.MenuId.NotebookDiffCellInputTitle,Z),this._register(this._menu);const X=[];(0,r.createAndFillInActionBarActions)(this._menu,{shouldForwardArgs:!0},X),this._toolbar.setActions(X)}async _initializeSourceDiffEditor(){const H=this.cell.original,K=this.cell.modified,G=await this.textModelService.createModelReference(H.uri),q=await this.textModelService.createModelReference(K.uri);if(this._isDisposed)return;const Z=G.object.textEditorModel,j=q.object.textEditorModel;this._register(G),this._register(q),this._editor.setModel({original:Z,modified:j}),this._editor.restoreViewState(this.cell.getSourceEditorViewState());const X=this._editor.getContentHeight();this.cell.editorHeight=X}layout(H){t.scheduleAtNextAnimationFrame(()=>{H.editorHeight&&(this._editorContainer.style.height=`${this.cell.layoutInfo.editorHeight}px`,this._editor.layout({width:this._editor.getViewWidth(),height:this.cell.layoutInfo.editorHeight})),H.outerWidth&&(this._editorContainer.style.height=`${this.cell.layoutInfo.editorHeight}px`,this._editor.layout()),(H.metadataHeight||H.outerWidth)&&this._metadataEditorContainer&&(this._metadataEditorContainer.style.height=`${this.cell.layoutInfo.metadataHeight}px`,this._metadataEditor?.layout()),(H.outputTotalHeight||H.outerWidth)&&(this._outputEditorContainer&&(this._outputEditorContainer.style.height=`${this.cell.layoutInfo.outputTotalHeight}px`,this._outputEditor?.layout()),this._outputMetadataContainer&&(this._outputMetadataContainer.style.height=`${this.cell.layoutInfo.outputMetadataHeight}px`,this._outputMetadataContainer.style.top=`${this.cell.layoutInfo.outputTotalHeight-this.cell.layoutInfo.outputMetadataHeight}px`,this._outputMetadataEditor?.layout())),this.layoutNotebookCell()})}dispose(){this._editor&&this.cell.saveSpirceEditorViewState(this._editor.saveViewState()),super.dispose()}};z=Ee([W(3,A.IInstantiationService),W(4,C.ILanguageService),W(5,v.IModelService),W(6,O.ITextModelService),W(7,i.IContextMenuService),W(8,s.IKeybindingService),W(9,l.INotificationService),W(10,S.IMenuService),W(11,p.IContextKeyService),W(12,x.IConfigurationService)],z),e.ModifiedElement=z}),define(ne[2615],re([1,0,10,2,8,7,5,38,71,12,356,14,2614,165,351,163,16,37,26,414,263,77,1101]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookTextDiffList=e.CellDiffSideBySideRenderer=e.CellDiffSingleSideRenderer=e.NotebookCellTextDiffListDelegate=void 0;let n=class{constructor(b){this.configurationService=b;const E=this.configurationService.getValue("editor");this.lineHeight=u.BareFontInfo.createFromRawSettings(E,a.PixelRatio.value).lineHeight}getHeight(b){return b.getHeight(this.lineHeight)}hasDynamicHeight(b){return!1}getTemplateId(b){switch(b.type){case"delete":case"insert":return h.TEMPLATE_ID;case"modified":case"unchanged":return g.TEMPLATE_ID}}};n=Ee([W(0,_.IConfigurationService)],n),e.NotebookCellTextDiffListDelegate=n;let h=class ka{constructor(b,E){this.notebookEditor=b,this.instantiationService=E}get templateId(){return ka.TEMPLATE_ID}renderTemplate(b){const E=t.$(".cell-body");t.append(b,E);const y=t.$(".cell-diff-editor-container");t.append(E,y);const T=t.append(E,t.$(".diagonal-fill")),R=t.append(y,t.$(".source-container")),O=this._buildSourceEditor(R),x=t.append(y,t.$(".metadata-header-container")),F=t.append(y,t.$(".metadata-info-container")),L=t.append(y,t.$(".output-header-container")),M=t.append(y,t.$(".output-info-container")),N=t.append(E,t.$(".border-container")),B=t.append(N,t.$(".left-border")),P=t.append(N,t.$(".right-border")),V=t.append(N,t.$(".top-border")),z=t.append(N,t.$(".bottom-border"));return{body:E,container:b,diffEditorContainer:y,diagonalFill:T,sourceEditor:O,metadataHeaderContainer:x,metadataInfoContainer:F,outputHeaderContainer:L,outputInfoContainer:M,leftBorder:B,rightBorder:P,topBorder:V,bottomBorder:z,elementDisposables:new f.DisposableStore}}_buildSourceEditor(b){const E=t.append(b,t.$(".editor-container"));return this.instantiationService.createInstance(c.CodeEditorWidget,E,{...o.fixedEditorOptions,dimension:{width:(this.notebookEditor.getLayoutInfo().width-2*v.DIFF_CELL_MARGIN)/2-18,height:0},automaticLayout:!1,overflowWidgetsDomNode:this.notebookEditor.getOverflowContainerDomNode()},{})}renderElement(b,E,y,T){switch(y.body.classList.remove("left","right","full"),b.type){case"delete":y.elementDisposables.add(this.instantiationService.createInstance(o.DeletedElement,this.notebookEditor,b,y));return;case"insert":y.elementDisposables.add(this.instantiationService.createInstance(o.InsertElement,this.notebookEditor,b,y));return;default:break}}disposeTemplate(b){b.container.innerText="",b.sourceEditor.dispose()}disposeElement(b,E,y){y.elementDisposables.clear()}};h.TEMPLATE_ID="cell_diff_single",h=Ee([W(1,k.IInstantiationService)],h),e.CellDiffSingleSideRenderer=h;let g=class _a{constructor(b,E,y,T,R,O,x){this.notebookEditor=b,this.instantiationService=E,this.contextMenuService=y,this.keybindingService=T,this.menuService=R,this.contextKeyService=O,this.notificationService=x}get templateId(){return _a.TEMPLATE_ID}renderTemplate(b){const E=t.$(".cell-body");t.append(b,E);const y=t.$(".cell-diff-editor-container");t.append(E,y);const T=t.append(y,t.$(".source-container")),{editor:R,editorContainer:O}=this._buildSourceEditor(T),x=t.append(T,t.$(".editor-input-toolbar-container")),F=t.append(x,t.$("div.property-toolbar")),L=new S.ToolBar(F,this.contextMenuService,{actionViewItemProvider:G=>{if(G instanceof s.MenuItemAction)return new p.CodiconActionViewItem(G,this.keybindingService,this.notificationService,this.contextKeyService)}}),M=t.append(y,t.$(".metadata-header-container")),N=t.append(y,t.$(".metadata-info-container")),B=t.append(y,t.$(".output-header-container")),P=t.append(y,t.$(".output-info-container")),V=t.append(E,t.$(".border-container")),z=t.append(V,t.$(".left-border")),U=t.append(V,t.$(".right-border")),H=t.append(V,t.$(".top-border")),K=t.append(V,t.$(".bottom-border"));return{body:E,container:b,diffEditorContainer:y,sourceEditor:R,editorContainer:O,inputToolbarContainer:x,toolbar:L,metadataHeaderContainer:M,metadataInfoContainer:N,outputHeaderContainer:B,outputInfoContainer:P,leftBorder:z,rightBorder:U,topBorder:H,bottomBorder:K,elementDisposables:new f.DisposableStore}}_buildSourceEditor(b){const E=t.append(b,t.$(".editor-container"));return{editor:this.instantiationService.createInstance(i.DiffEditorWidget,E,{...o.fixedDiffEditorOptions,padding:{top:24,bottom:12},overflowWidgetsDomNode:this.notebookEditor.getOverflowContainerDomNode(),originalEditable:!1,ignoreTrimWhitespace:!1,automaticLayout:!1,dimension:{height:0,width:0}},{originalEditor:(0,o.getOptimizedNestedCodeEditorWidgetOptions)(),modifiedEditor:(0,o.getOptimizedNestedCodeEditorWidgetOptions)()}),editorContainer:E}}renderElement(b,E,y,T){switch(y.body.classList.remove("left","right","full"),b.type){case"unchanged":y.elementDisposables.add(this.instantiationService.createInstance(o.ModifiedElement,this.notebookEditor,b,y));return;case"modified":y.elementDisposables.add(this.instantiationService.createInstance(o.ModifiedElement,this.notebookEditor,b,y));return;default:break}}disposeTemplate(b){b.container.innerText="",b.sourceEditor.dispose(),b.toolbar?.dispose()}disposeElement(b,E,y){y.elementDisposables.clear()}};g.TEMPLATE_ID="cell_diff_side_by_side",g=Ee([W(1,k.IInstantiationService),W(2,l.IContextMenuService),W(3,D.IKeybindingService),W(4,s.IMenuService),W(5,A.IContextKeyService),W(6,r.INotificationService)],g),e.CellDiffSideBySideRenderer=g;let d=class extends I.WorkbenchList{constructor(b,E,y,T,R,O,x,F,L,M){super(b,E,y,T,O,R,x,F,L,M)}get rowsContainer(){return this.view.containerDomNode}getAbsoluteTopOfElement(b){const E=this.indexOf(b);return this.view.elementTop(E)}getScrollHeight(){return this.view.scrollHeight}triggerScrollFromMouseWheelEvent(b){this.view.triggerScrollFromMouseWheelEvent(b)}clear(){super.splice(0,this.length)}updateElementHeight2(b,E){const y=this.indexOf(b),T=this.getFocus();this.view.updateElementHeight(y,E,T.length?T[0]:null)}style(b){const E=this.view.domId;this.styleElement||(this.styleElement=t.createStyleSheet(this.view.domNode));const y=E&&`.${E}`,T=[];b.listBackground&&(b.listBackground.isOpaque()?T.push(`.monaco-list${y} > div.monaco-scrollable-element > .monaco-list-rows { background: ${b.listBackground}; }`):C.isMacintosh||console.warn(`List with id '${E}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`)),b.listFocusBackground&&(T.push(`.monaco-list${y}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { background-color: ${b.listFocusBackground}; }`),T.push(`.monaco-list${y}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused:hover { background-color: ${b.listFocusBackground}; }`)),b.listFocusForeground&&T.push(`.monaco-list${y}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { color: ${b.listFocusForeground}; }`),b.listActiveSelectionBackground&&(T.push(`.monaco-list${y}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { background-color: ${b.listActiveSelectionBackground}; }`),T.push(`.monaco-list${y}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected:hover { background-color: ${b.listActiveSelectionBackground}; }`)),b.listActiveSelectionForeground&&T.push(`.monaco-list${y}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { color: ${b.listActiveSelectionForeground}; }`),b.listFocusAndSelectionBackground&&T.push(` .monaco-drag-image, .monaco-list${y}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected.focused { background-color: ${b.listFocusAndSelectionBackground}; } `),b.listFocusAndSelectionForeground&&T.push(` .monaco-drag-image, .monaco-list${y}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected.focused { color: ${b.listFocusAndSelectionForeground}; } `),b.listInactiveFocusBackground&&(T.push(`.monaco-list${y} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { background-color: ${b.listInactiveFocusBackground}; }`),T.push(`.monaco-list${y} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused:hover { background-color: ${b.listInactiveFocusBackground}; }`)),b.listInactiveSelectionBackground&&(T.push(`.monaco-list${y} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { background-color: ${b.listInactiveSelectionBackground}; }`),T.push(`.monaco-list${y} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected:hover { background-color: ${b.listInactiveSelectionBackground}; }`)),b.listInactiveSelectionForeground&&T.push(`.monaco-list${y} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { color: ${b.listInactiveSelectionForeground}; }`),b.listHoverBackground&&T.push(`.monaco-list${y}:not(.drop-target) > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${b.listHoverBackground}; }`),b.listHoverForeground&&T.push(`.monaco-list${y} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row:hover:not(.selected):not(.focused) { color: ${b.listHoverForeground}; }`),b.listSelectionOutline&&T.push(`.monaco-list${y} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { outline: 1px dotted ${b.listSelectionOutline}; outline-offset: -1px; }`),b.listFocusOutline&&T.push(` .monaco-drag-image, .monaco-list${y}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { outline: 1px solid ${b.listFocusOutline}; outline-offset: -1px; } `),b.listInactiveFocusOutline&&T.push(`.monaco-list${y} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { outline: 1px dotted ${b.listInactiveFocusOutline}; outline-offset: -1px; }`),b.listHoverOutline&&T.push(`.monaco-list${y} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row:hover { outline: 1px dashed ${b.listHoverOutline}; outline-offset: -1px; }`),b.listDropBackground&&T.push(` .monaco-list${y}.drop-target, .monaco-list${y} > div.monaco-scrollable-element > .monaco-list-rows.drop-target, .monaco-list${y} > div.monaco-scrollable-element > .monaco-list-row.drop-target { background-color: ${b.listDropBackground} !important; color: inherit !important; } `),b.listFilterWidgetBackground&&T.push(`.monaco-list-type-filter { background-color: ${b.listFilterWidgetBackground} }`),b.listFilterWidgetOutline&&T.push(`.monaco-list-type-filter { border: 1px solid ${b.listFilterWidgetOutline}; }`),b.listFilterWidgetNoMatchesOutline&&T.push(`.monaco-list-type-filter.no-matches { border: 1px solid ${b.listFilterWidgetNoMatchesOutline}; }`),b.listMatchesShadow&&T.push(`.monaco-list-type-filter { box-shadow: 1px 1px 1px ${b.listMatchesShadow}; }`);const R=T.join(` `);R!==this.styleElement.textContent&&(this.styleElement.textContent=R)}};d=Ee([W(6,I.IListService),W(7,w.IThemeService),W(8,_.IConfigurationService),W(9,D.IKeybindingService)],d),e.NotebookTextDiffList=d}),define(ne[2616],re([1,0,10,7,5,175,64,906,2,12,249,15,172,8,123]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellComments=void 0;let S=class extends A.CellPart{constructor(l,r,p,u,a,n,h){super();this.notebookEditor=l,this.container=r,this.contextKeyService=p,this.themeService=u,this.commentService=a,this.configurationService=n,this.instantiationService=h,this._initialized=!1,this._commentThreadWidget=null,this.commentTheadDisposables=this._register(new I.DisposableStore),this.container.classList.add("review-widget"),this._register(this.themeService.onDidColorThemeChange(this._applyTheme,this)),this._applyTheme()}async initialize(l){if(this._initialized)return;this._initialized=!0;const r=await this._getCommentThreadForCell(l);r&&this._createCommentTheadWidget(r.owner,r.thread)}_createCommentTheadWidget(l,r){this._commentThreadWidget?.dispose(),this.commentTheadDisposables.clear(),this._commentThreadWidget=this.instantiationService.createInstance(D.CommentThreadWidget,this.container,l,this.notebookEditor.textModel.uri,this.contextKeyService,this.instantiationService,r,null,{codeBlockFontFamily:this.configurationService.getValue("editor").fontFamily||i.EDITOR_FONT_DEFAULTS.fontFamily},void 0,{actionRunner:()=>{},collapse:()=>{}});const p=this.notebookEditor.getLayoutInfo();this._commentThreadWidget.display(p.fontInfo.lineHeight),this._applyTheme(),this.commentTheadDisposables.add(this._commentThreadWidget.onDidResize(()=>{this.currentElement?.cellKind===k.CellKind.Code&&this._commentThreadWidget&&(this.currentElement.commentHeight=t.getClientArea(this._commentThreadWidget.container).height)}))}_bindListeners(){this.cellDisposables.add(this.commentService.onDidUpdateCommentThreads(async()=>{if(this.currentElement){const l=await this._getCommentThreadForCell(this.currentElement);if(!this._commentThreadWidget&&l){this._createCommentTheadWidget(l.owner,l.thread);const r=this.currentElement.layoutInfo;this.container.style.top=`${r.outputContainerOffset+r.outputTotalHeight}px`,this.currentElement.commentHeight=t.getClientArea(this._commentThreadWidget.container).height;return}this._commentThreadWidget&&(l?(this._commentThreadWidget.updateCommentThread(l.thread),this.currentElement.commentHeight=t.getClientArea(this._commentThreadWidget.container).height):(this._commentThreadWidget.dispose(),this.currentElement.commentHeight=0))}}))}async _getCommentThreadForCell(l){if(this.notebookEditor.hasModel()){const r=(0,C.coalesce)(await this.commentService.getNotebookComments(l.uri));if(r.length&&r[0].threads.length)return{owner:r[0].owner,thread:r[0].threads[0]}}return null}_applyTheme(){const l=this.themeService.getColorTheme(),r=this.notebookEditor.getLayoutInfo().fontInfo;this._commentThreadWidget?.applyTheme(l,r)}didRenderCell(l){l.cellKind===k.CellKind.Code&&(this.currentElement=l,this.initialize(l),this._bindListeners())}prepareLayout(){this.currentElement?.cellKind===k.CellKind.Code&&this._commentThreadWidget&&(this.currentElement.commentHeight=t.getClientArea(this._commentThreadWidget.container).height)}updateInternalLayoutNow(l){if(this.currentElement?.cellKind===k.CellKind.Code&&this._commentThreadWidget){const r=l.layoutInfo;this.container.style.top=`${r.outputContainerOffset+r.outputTotalHeight}px`}}};S=Ee([W(2,f.IContextKeyService),W(3,w.IThemeService),W(4,v.ICommentService),W(5,c.IConfigurationService),W(6,_.IInstantiationService)],S),e.CellComments=S,(0,w.registerThemingParticipant)((s,l)=>{const r=s.getColor(o.peekViewBorder);r&&(l.addRule(`.cell-comment-container.review-widget { border-left: 1px solid ${r}; border-right: 1px solid ${r}; }`),l.addRule(`.cell-comment-container.review-widget > .head { border-top: 1px solid ${r}; }`),l.addRule(`.cell-comment-container.review-widget > .body { border-bottom: 1px solid ${r}; }`));const p=s.getColor(o.peekViewResultsBackground);p&&l.addRule(`.cell-comment-container.review-widget { background-color: ${p};}`)})}),define(ne[2617],re([1,0,77,10,128,2,165,263,58,126,1661,16,8,7,37,5,155,38,26,2616,882,2159,806,2160,606,2161,2162,2173,2179,2439,2399,2490,2175,2163,2192,2278,2279,64]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeCellRenderer=e.MarkupCellRenderer=e.NotebookCellListDelegate=void 0;const B=f.$;let P=class extends A.Disposable{constructor(K){super();this.configurationService=K;const G=this.configurationService.getValue("editor");this.lineHeight=D.BareFontInfo.createFromRawSettings(G,t.PixelRatio.value).lineHeight}getHeight(K){return K.getHeight(this.lineHeight)}hasDynamicHeight(K){return K.hasDynamicHeight()}getDynamicHeight(K){return K.getDynamicHeight()}getTemplateId(K){return K.cellKind===N.CellKind.Markup?z.TEMPLATE_ID:U.TEMPLATE_ID}};P=Ee([W(0,o.IConfigurationService)],P),e.NotebookCellListDelegate=P;class V{constructor(K,G,q,Z,j,X,Y,$,J,ee){this.instantiationService=K,this.notebookEditor=G,this.contextMenuService=q,this.menuService=Z,this.keybindingService=X,this.notificationService=Y,this.contextKeyServiceProvider=$,this.dndController=ee,this.editorOptions=new g.CellEditorOptions(G,G.notebookOptions,j,J)}dispose(){this.editorOptions.dispose(),this.dndController=void 0}}let z=class Ra extends V{constructor(K,G,q,Z,j,X,Y,$,J,ee){super(X,K,Y,$,j,J,ee,Z,"markdown",G);this.renderedEditors=q}get templateId(){return Ra.TEMPLATE_ID}renderTemplate(K){K.classList.add("markdown-cell-row");const G=f.append(K,f.$(".cell-inner-container")),q=new A.DisposableStore,Z=q.add(this.contextKeyServiceProvider(G)),j=f.append(K,B(".cell-decoration")),X=f.append(G,B(".cell-title-toolbar")),Y=new _.FastDomNode(f.append(G,B(".cell-focus-indicator.cell-focus-indicator-top"))),$=new _.FastDomNode(f.append(G,f.$(".cell-focus-indicator.cell-focus-indicator-side.cell-focus-indicator-left"))),J=f.append($.domNode,f.$(".notebook-folding-indicator")),ee=new _.FastDomNode(f.append(G,f.$(".cell-focus-indicator.cell-focus-indicator-side.cell-focus-indicator-right"))),te=f.append(G,B(".cell.code")),se=f.append(te,B(".cell-editor-part")),ie=f.append(te,B(".input-collapse-container")),ce=f.append(se,B(".cell-editor-container"));se.style.display="none";const le=f.append(G,B(".cell-comment-container")),ae=f.append(G,B(".cell.markdown")),ue=f.append(G,B(".cell-bottom-toolbar-container")),oe=this.instantiationService.createChild(new s.ServiceCollection([c.IContextKeyService,Z])),fe={toggle:(ve,he)=>G.classList.toggle(ve,he)},pe=q.add(oe.createInstance(T.CellTitleToolbarPart,X,fe,this.notebookEditor.creationOptions.menuIds.cellTitleToolbar,this.notebookEditor)),me=new _.FastDomNode(f.append(G,B(".cell-focus-indicator.cell-focus-indicator-bottom"))),be=[pe,q.add(oe.createInstance(T.BetweenCellToolbar,this.notebookEditor,X,ue)),q.add(oe.createInstance(y.CellEditorStatusBar,this.notebookEditor,G,se,void 0)),q.add(new b.CellFocusIndicator(this.notebookEditor,pe,Y,$,ee,me)),q.add(oe.createInstance(L.FoldedCellHint,this.notebookEditor,f.append(G,B(".notebook-folded-hint")))),q.add(new a.CellDecorations(K,j)),q.add(oe.createInstance(p.CellComments,this.notebookEditor,le)),q.add(new x.CollapsedCellInput(this.notebookEditor,ie)),q.add(new m.CellFocusPart(G,void 0,this.notebookEditor)),q.add(new n.CellDragAndDropPart(G)),q.add(oe.createInstance(u.CellContextKeyPart,this.notebookEditor))];return{rootContainer:K,cellInputCollapsedContainer:ie,instantiationService:oe,container:G,cellContainer:ae,editorPart:se,editorContainer:ce,foldingIndicator:J,templateDisposables:q,elementDisposables:new A.DisposableStore,cellParts:be,toJSON:()=>({})}}renderElement(K,G,q,Z){if(!this.notebookEditor.hasModel())throw new Error("The notebook editor is not attached with view model yet.");q.currentRenderedCell=K,q.currentEditor=void 0,q.editorPart.style.display="none",q.cellContainer.innerText="",Z!==void 0&&q.elementDisposables.add(q.instantiationService.createInstance(M.StatefulMarkdownCell,this.notebookEditor,K,q,this.renderedEditors))}disposeTemplate(K){K.templateDisposables.clear()}disposeElement(K,G,q){q.elementDisposables.clear()}};z.TEMPLATE_ID="markdown_cell",z=Ee([W(4,o.IConfigurationService),W(5,S.IInstantiationService),W(6,i.IContextMenuService),W(7,C.IMenuService),W(8,l.IKeybindingService),W(9,r.INotificationService)],z),e.MarkupCellRenderer=z;let U=class Aa extends V{constructor(K,G,q,Z,j,X,Y,$,J,ee){super($,K,X,Y,j,J,ee,Z,w.PLAINTEXT_LANGUAGE_ID,q);this.renderedEditors=G}get templateId(){return Aa.TEMPLATE_ID}renderTemplate(K){K.classList.add("code-cell-row");const G=f.append(K,f.$(".cell-inner-container")),q=new A.DisposableStore,Z=q.add(this.contextKeyServiceProvider(G)),j=f.append(K,B(".cell-decoration")),X=new _.FastDomNode(f.append(G,B(".cell-focus-indicator.cell-focus-indicator-top"))),Y=f.append(G,B(".cell-title-toolbar")),$=new _.FastDomNode(f.append(G,f.$(".cell-focus-indicator.cell-focus-indicator-side.cell-focus-indicator-left"))),J=f.append(G,B(".cell.code")),ee=f.append(J,B(".run-button-container")),te=f.append(J,B(".input-collapse-container")),se=f.append($.domNode,B("div.execution-count-label"));se.title=(0,v.localize)(0,null);const ie=f.append(J,B(".cell-editor-part")),ce=f.append(ie,B(".cell-editor-container")),le=f.append(G,B(".cell-comment-container")),ae=q.add(this.contextKeyServiceProvider(ie)),ue=this.instantiationService.createChild(new s.ServiceCollection([c.IContextKeyService,ae]));I.EditorContextKeys.inCompositeEditor.bindTo(ae).set(!0);const oe=ue.createInstance(k.CodeEditorWidget,ce,{...this.editorOptions.getDefaultValue(),dimension:{width:0,height:0}},{contributions:this.notebookEditor.creationOptions.cellEditorContributions});q.add(oe);const fe=new _.FastDomNode(f.append(G,B(".output"))),pe=f.append(fe.domNode,B(".output-collapse-container")),me=new _.FastDomNode(f.append(G,B(".output-show-more-container"))),be=new _.FastDomNode(f.append(G,f.$(".cell-focus-indicator.cell-focus-indicator-side.cell-focus-indicator-right"))),Ce=f.append(G,B(".cell-editor-focus-sink"));Ce.setAttribute("tabindex","0");const ve=f.append(G,B(".cell-bottom-toolbar-container")),he=new _.FastDomNode(f.append(G,B(".cell-focus-indicator.cell-focus-indicator-bottom"))),ge=this.instantiationService.createChild(new s.ServiceCollection([c.IContextKeyService,Z])),de={toggle:(Te,De)=>G.classList.toggle(Te,De)},Se=q.add(ge.createInstance(T.CellTitleToolbarPart,Y,de,this.notebookEditor.creationOptions.menuIds.cellTitleToolbar,this.notebookEditor)),we=q.add(new b.CellFocusIndicator(this.notebookEditor,Se,X,$,be,he)),ye=[we,Se,q.add(ge.createInstance(T.BetweenCellToolbar,this.notebookEditor,Y,ve)),q.add(ge.createInstance(y.CellEditorStatusBar,this.notebookEditor,G,ie,oe)),q.add(ge.createInstance(E.CellProgressBar,ie,te)),q.add(ge.createInstance(O.RunToolbar,this.notebookEditor,Z,G,ee)),q.add(new a.CellDecorations(K,j)),q.add(ge.createInstance(p.CellComments,this.notebookEditor,le)),q.add(new d.CellExecutionPart(this.notebookEditor,se)),q.add(ge.createInstance(F.CollapsedCellOutput,this.notebookEditor,pe)),q.add(new x.CollapsedCellInput(this.notebookEditor,te)),q.add(new m.CellFocusPart(G,Ce,this.notebookEditor)),q.add(new n.CellDragAndDropPart(G)),q.add(ge.createInstance(u.CellContextKeyPart,this.notebookEditor))],ke={rootContainer:K,editorPart:ie,cellInputCollapsedContainer:te,cellOutputCollapsedContainer:pe,instantiationService:ge,container:G,cellContainer:J,focusSinkElement:Ce,outputContainer:fe,outputShowMoreContainer:me,editor:oe,templateDisposables:q,elementDisposables:new A.DisposableStore,cellParts:ye,toJSON:()=>({})},Ie=[$.domNode,we.codeFocusIndicator.domNode,we.outputFocusIndicator.domNode];return this.dndController?.registerDragHandle(ke,K,Ie,()=>new h.CodeCellDragImageRenderer().getDragImage(ke,ke.editor,"code")),ke}renderElement(K,G,q,Z){if(!this.notebookEditor.hasModel())throw new Error("The notebook editor is not attached with view model yet.");q.currentRenderedCell=K,Z!==void 0&&(q.outputContainer.domNode.innerText="",q.outputContainer.domNode.appendChild(q.cellOutputCollapsedContainer),q.elementDisposables.add(q.instantiationService.createInstance(R.CodeCell,this.notebookEditor,K,q)),this.renderedEditors.set(K,q.editor))}disposeTemplate(K){K.templateDisposables.clear()}disposeElement(K,G,q,Z){q.elementDisposables.clear(),this.renderedEditors.delete(K)}};U.TEMPLATE_ID="code_cell",U=Ee([W(4,o.IConfigurationService),W(5,i.IContextMenuService),W(6,C.IMenuService),W(7,S.IInstantiationService),W(8,l.IKeybindingService),W(9,r.INotificationService)],U),e.CodeCellRenderer=U}),define(ne[506],re([1,0,77,10,112,11,66,22,6,2,14,19,89,393,263,20,247,1648,73,16,8,7,37,5,155,185,1959,67,27,32,12,82,484,104,267,290,2158,488,882,806,883,884,2617,423,2167,424,2440,2168,2169,2280,2314,2170,2171,64,153,416,158,238,490,584,585,142,627,39,1102,1103,1104,1105,1106,1107]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H,K,G,q,Z,j,X,Y,$,J,ee,te,se,ie,ce,le,ae,ue,oe,fe,pe){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cellEditorBackground=e.cellSymbolHighlight=e.listScrollbarSliderActiveBackground=e.listScrollbarSliderHoverBackground=e.listScrollbarSliderBackground=e.cellInsertionIndicator=e.cellStatusBarItemHover=e.inactiveFocusedCellBorder=e.focusedCellBorder=e.inactiveSelectedCellBorder=e.selectedCellBorder=e.cellHoverBackground=e.selectedCellBackground=e.focusedCellBackground=e.CELL_TOOLBAR_SEPERATOR=e.notebookOutputContainerColor=e.notebookOutputContainerBorderColor=e.cellStatusIconRunning=e.cellStatusIconError=e.cellStatusIconSuccess=e.focusedEditorBorderColor=e.notebookCellBorder=e.NotebookEditorWidget=e.getDefaultNotebookCreationOptions=void 0;const me=f.$;function be(){const ve=["editor.contrib.review"],he=pe.EditorExtensionsRegistry.getEditorContributions().filter(ge=>ve.indexOf(ge.id)===-1);return{menuIds:{notebookToolbar:p.MenuId.NotebookToolbar,cellTitleToolbar:p.MenuId.NotebookCellTitle,cellInsertToolbar:p.MenuId.NotebookCellBetween,cellTopInsertToolbar:p.MenuId.NotebookCellListTop,cellExecuteToolbar:p.MenuId.NotebookCellExecute,cellExecutePrimary:p.MenuId.NotebookCellExecutePrimary},cellEditorContributions:he}}e.getDefaultNotebookCreationOptions=be;let Ce=class extends w.Disposable{constructor(he,ge,de,Se,we,ye,ke,Ie,Te,De,_e,Re,Ne,xe,Ae,Le){super();this.creationOptions=he,this.notebookRendererMessaging=de,this.notebookEditorService=Se,this.notebookKernelService=we,this._notebookService=ye,this.configurationService=ke,this.layoutService=Te,this.contextMenuService=De,this.menuService=_e,this.themeService=Re,this.telemetryService=Ne,this.notebookExecutionService=xe,this.editorProgressService=Le,this._onDidChangeCellState=this._register(new I.Emitter),this.onDidChangeCellState=this._onDidChangeCellState.event,this._onDidChangeViewCells=this._register(new I.Emitter),this.onDidChangeViewCells=this._onDidChangeViewCells.event,this._onDidChangeModel=this._register(new I.Emitter),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeOptions=this._register(new I.Emitter),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeDecorations=this._register(new I.Emitter),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidScroll=this._register(new I.Emitter),this.onDidScroll=this._onDidScroll.event,this._onDidChangeContentHeight=this._register(new I.Emitter),this.onDidChangeContentHeight=this._onDidChangeContentHeight.event,this._onDidChangeActiveCell=this._register(new I.Emitter),this.onDidChangeActiveCell=this._onDidChangeActiveCell.event,this._onDidChangeSelection=this._register(new I.Emitter),this.onDidChangeSelection=this._onDidChangeSelection.event,this._onDidChangeVisibleRanges=this._register(new I.Emitter),this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._onDidFocusEmitter=this._register(new I.Emitter),this.onDidFocusWidget=this._onDidFocusEmitter.event,this._onDidBlurEmitter=this._register(new I.Emitter),this.onDidBlurWidget=this._onDidBlurEmitter.event,this._onDidChangeActiveEditor=this._register(new I.Emitter),this.onDidChangeActiveEditor=this._onDidChangeActiveEditor.event,this._onDidChangeActiveKernel=this._register(new I.Emitter),this.onDidChangeActiveKernel=this._onDidChangeActiveKernel.event,this._onMouseUp=this._register(new I.Emitter),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new I.Emitter),this.onMouseDown=this._onMouseDown.event,this._onDidReceiveMessage=this._register(new I.Emitter),this.onDidReceiveMessage=this._onDidReceiveMessage.event,this._onDidRenderOutput=this._register(new I.Emitter),this.onDidRenderOutput=this._onDidRenderOutput.event,this._webview=null,this._webviewResolvePromise=null,this._webviewTransparentCover=null,this._listDelegate=null,this._dndController=null,this._listTopCellToolbar=null,this._renderedEditors=new Map,this._localStore=this._register(new w.DisposableStore),this._localCellStateListeners=[],this._dimension=null,this._shadowElementViewInfo=null,this._contributions=new Map,this._insetModifyQueueByOutputId=new A.SequencerByKey,this._cellContextKeyManager=null,this._isVisible=!1,this._uuid=(0,o.generateUuid)(),this._webviewFocused=!1,this._isDisposed=!1,this._cursorNavigationMode=!1,this._debugFlag=!1,this._isScheduled=!1,this._lastCellWithEditorFocus=null,this._editorStyleSheets=new Map,this._decorationRules=new Map,this._decortionKeyToIds=new Map,this._pendingLayouts=new WeakMap,this._pendingOutputHeightAcks=new Map,this.isEmbedded=he.isEmbedded??!1,this._readOnly=he.isReadOnly??!1,this._notebookOptions=he.options??new le.NotebookOptions(this.configurationService,Ae),this._register(this._notebookOptions),this._viewContext=new Z.ViewContext(this._notebookOptions,new K.NotebookEventDispatcher),this._register(this._viewContext.eventDispatcher.onDidChangeCellState(Ve=>{this._onDidChangeCellState.fire(Ve)})),this._overlayContainer=document.createElement("div"),this.scopedContextKeyService=Ie.createScoped(this._overlayContainer),this.instantiationService=ge.createChild(new g.ServiceCollection([a.IContextKeyService,this.scopedContextKeyService])),this._register(this.instantiationService.createInstance(Y.NotebookEditorContextKeys,this)),this._register(we.onDidChangeSelectedNotebooks(Ve=>{(0,C.isEqual)(Ve.notebook,this.viewModel?.uri)&&(this._loadKernelPreloads(),this._onDidChangeActiveKernel.fire())})),this._scrollBeyondLastLine=this.configurationService.getValue("editor.scrollBeyondLastLine"),this._register(this.configurationService.onDidChangeConfiguration(Ve=>{Ve.affectsConfiguration("editor.scrollBeyondLastLine")&&(this._scrollBeyondLastLine=this.configurationService.getValue("editor.scrollBeyondLastLine"),this._dimension&&this._isVisible&&this.layout(this._dimension))})),this._register(this._notebookOptions.onDidChangeOptions(Ve=>{(Ve.cellStatusBarVisibility||Ve.cellToolbarLocation||Ve.cellToolbarInteraction)&&this._updateForNotebookConfiguration(),(Ve.compactView||Ve.focusIndicator||Ve.insertToolbarPosition||Ve.cellToolbarLocation||Ve.dragAndDropEnabled||Ve.fontSize||Ve.markupFontSize||Ve.insertToolbarAlignment)&&(this._styleElement?.remove(),this._createLayoutStyles(),this._webview?.updateOptions({...this.notebookOptions.computeWebviewOptions(),fontFamily:this._generateFontFamily()})),this._dimension&&this._isVisible&&this.layout(this._dimension)})),this.notebookEditorService.addNotebookEditor(this);const Me=(0,o.generateUuid)();this._overlayContainer.id=`notebook-${Me}`,this._overlayContainer.className="notebookOverlay",this._overlayContainer.classList.add("notebook-editor"),this._overlayContainer.style.visibility="hidden",this.layoutService.container.appendChild(this._overlayContainer),this._createBody(this._overlayContainer),this._generateFontInfo(),this._isVisible=!0,this._editorFocus=te.NOTEBOOK_EDITOR_FOCUSED.bindTo(this.scopedContextKeyService),this._outputFocus=te.NOTEBOOK_OUTPUT_FOCUSED.bindTo(this.scopedContextKeyService),this._editorEditable=te.NOTEBOOK_EDITOR_EDITABLE.bindTo(this.scopedContextKeyService),this._editorEditable.set(!he.isReadOnly);let We;Array.isArray(this.creationOptions.contributions)?We=this.creationOptions.contributions:We=F.NotebookEditorExtensionsRegistry.getEditorContributions();for(const Ve of We){let Ue;try{Ue=this.instantiationService.createInstance(Ve.ctor,this)}catch(et){(0,D.onUnexpectedError)(et)}if(Ue)if(!this._contributions.has(Ve.id))this._contributions.set(Ve.id,Ue);else throw Ue.dispose(),new Error(`DUPLICATE notebook editor contribution: '${Ve.id}'`)}this._updateForNotebookConfiguration()}get isDisposed(){return this._isDisposed}set viewModel(he){this._notebookViewModel=he,this._onDidChangeModel.fire(he?.notebookDocument)}get viewModel(){return this._notebookViewModel}get textModel(){return this._notebookViewModel?.notebookDocument}get isReadOnly(){return this._notebookViewModel?.options.isReadOnly??!1}get activeCodeEditor(){if(this._isDisposed)return;const[he]=this._list.getFocusedElements();return this._renderedEditors.get(he)}get cursorNavigationMode(){return this._cursorNavigationMode}set cursorNavigationMode(he){this._cursorNavigationMode=he}get visibleRanges(){return this._list.visibleRanges||[]}get notebookOptions(){return this._notebookOptions}_debug(...he){!this._debugFlag||(0,M.notebookDebug)(...he)}getId(){return this._uuid}_getViewModel(){return this.viewModel}getLength(){return this.viewModel?.length??0}getSelections(){return this.viewModel?.getSelections()??[]}setSelections(he){if(!this.viewModel)return;const ge=this.viewModel.getFocus();this.viewModel.updateSelectionsState({kind:ee.SelectionStateType.Index,focus:ge,selections:he})}getFocus(){return this.viewModel?.getFocus()??{start:0,end:0}}setFocus(he){if(!this.viewModel)return;const ge=this.viewModel.getSelections();this.viewModel.updateSelectionsState({kind:ee.SelectionStateType.Index,focus:he,selections:ge})}getSelectionViewModels(){if(!this.viewModel)return[];const he=new Set;return this.viewModel.getSelections().map(ge=>this.viewModel.viewCells.slice(ge.start,ge.end)).reduce((ge,de)=>(de.forEach(Se=>{he.has(Se.handle)||(he.add(Se.handle),ge.push(Se))}),ge),[])}hasModel(){return!!this._notebookViewModel}showProgress(){this._currentProgress=this.editorProgressService.show(!0)}hideProgress(){this._currentProgress&&(this._currentProgress.done(),this._currentProgress=void 0)}_updateForNotebookConfiguration(){if(!this._overlayContainer)return;this._overlayContainer.classList.remove("cell-title-toolbar-left"),this._overlayContainer.classList.remove("cell-title-toolbar-right"),this._overlayContainer.classList.remove("cell-title-toolbar-hidden");const he=this._notebookOptions.computeCellToolbarLocation(this.viewModel?.viewType);this._overlayContainer.classList.add(`cell-title-toolbar-${he}`);const ge=this._notebookOptions.getLayoutConfiguration().cellToolbarInteraction;let de="hover";this._overlayContainer.classList.remove("cell-toolbar-hover"),this._overlayContainer.classList.remove("cell-toolbar-click"),(ge==="hover"||ge==="click")&&(de=ge),this._overlayContainer.classList.add(`cell-toolbar-${de}`)}_generateFontInfo(){const he=this.configurationService.getValue("editor");this._fontInfo=c.FontMeasurements.readFontInfo(i.BareFontInfo.createFromRawSettings(he,t.PixelRatio.value))}_createBody(he){this._notebookTopToolbarContainer=document.createElement("div"),this._notebookTopToolbarContainer.classList.add("notebook-toolbar-container"),this._notebookTopToolbarContainer.tabIndex=0,this._notebookTopToolbarContainer.style.display="none",f.append(he,this._notebookTopToolbarContainer),this._body=document.createElement("div"),f.append(he,this._body),this._body.classList.add("cell-list-container"),this._createLayoutStyles(),this._createCellList(),this._notebookOverviewRulerContainer=document.createElement("div"),this._notebookOverviewRulerContainer.classList.add("notebook-overview-ruler-container"),this._list.scrollableElement.appendChild(this._notebookOverviewRulerContainer),this._registerNotebookOverviewRuler(),this._overflowContainer=document.createElement("div"),this._overflowContainer.classList.add("notebook-overflow-widget-container","monaco-editor"),f.append(he,this._overflowContainer)}_generateFontFamily(){return this._fontInfo?.fontFamily??'"SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace'}_createLayoutStyles(){this._styleElement=f.createStyleSheet(this._body);const{cellRightMargin:he,cellTopMargin:ge,cellRunGutter:de,cellBottomMargin:Se,codeCellLeftMargin:we,markdownCellGutter:ye,markdownCellLeftMargin:ke,markdownCellBottomMargin:Ie,markdownCellTopMargin:Te,collapsedIndicatorHeight:De,compactView:_e,focusIndicator:Re,insertToolbarPosition:Ne,insertToolbarAlignment:xe,fontSize:Ae,focusIndicatorLeftMargin:Le,focusIndicatorGap:Me}=this._notebookOptions.getLayoutConfiguration(),{bottomToolbarGap:We,bottomToolbarHeight:Ve}=this._notebookOptions.computeBottomToolbarDimensions(this.viewModel?.viewType),Ue=[];this._fontInfo||this._generateFontInfo();const et=this._generateFontFamily();Ue.push(` :root { --notebook-cell-output-font-size: ${Ae}px; --notebook-cell-output-font-family: ${et}; --notebook-cell-input-preview-font-size: ${Ae}px; --notebook-cell-input-preview-font-family: ${et}; } `),_e?Ue.push(`.notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .markdown-cell-row div.cell.code { margin-left: ${we+de}px; }`):Ue.push(`.notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .markdown-cell-row div.cell.code { margin-left: ${we}px; }`),Re==="border"?(Ue.push(` .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row .cell-focus-indicator-top:before, .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row .cell-focus-indicator-bottom:before, .monaco-workbench .notebookOverlay .monaco-list .markdown-cell-row .cell-inner-container:before, .monaco-workbench .notebookOverlay .monaco-list .markdown-cell-row .cell-inner-container:after { content: ""; position: absolute; width: 100%; height: 1px; } .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row .cell-focus-indicator-left:before, .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row .cell-focus-indicator-right:before { content: ""; position: absolute; width: 1px; height: 100%; z-index: 10; } /* top border */ .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row .cell-focus-indicator-top:before { border-top: 1px solid transparent; } /* left border */ .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row .cell-focus-indicator-left:before { border-left: 1px solid transparent; } /* bottom border */ .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row .cell-focus-indicator-bottom:before { border-bottom: 1px solid transparent; } /* right border */ .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row .cell-focus-indicator-right:before { border-right: 1px solid transparent; } `),Ue.push(` .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row.code-cell-row.focused .cell-focus-indicator-left:before, .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row.code-cell-row.focused .cell-focus-indicator-right:before, .monaco-workbench .notebookOverlay .monaco-list.selection-multiple .monaco-list-row.code-cell-row.selected .cell-focus-indicator-left:before, .monaco-workbench .notebookOverlay .monaco-list.selection-multiple .monaco-list-row.code-cell-row.selected .cell-focus-indicator-right:before { top: -${ge}px; height: calc(100% + ${ge+Se}px) }`)):(Ue.push(` .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row .cell-focus-indicator-left .codeOutput-focus-indicator { border-left: 3px solid transparent; border-radius: 4px; width: 0px; margin-left: ${Le}px; border-color: var(--notebook-inactive-focused-cell-border-color) !important; } .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row.focused .cell-focus-indicator-left .codeOutput-focus-indicator-container, .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row .cell-output-hover .cell-focus-indicator-left .codeOutput-focus-indicator-container, .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row .markdown-cell-hover .cell-focus-indicator-left .codeOutput-focus-indicator-container, .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row:hover .cell-focus-indicator-left .codeOutput-focus-indicator-container { display: block; } .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row .cell-focus-indicator-left .codeOutput-focus-indicator-container:hover .codeOutput-focus-indicator { border-left: 5px solid transparent; margin-left: ${Le-1}px; } `),Ue.push(` .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row.focused .cell-inner-container.cell-output-focus .cell-focus-indicator-left .codeOutput-focus-indicator, .monaco-workbench .notebookOverlay .monaco-list:focus-within .monaco-list-row.focused .cell-inner-container .cell-focus-indicator-left .codeOutput-focus-indicator { border-color: var(--notebook-focused-cell-border-color) !important; } .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row .cell-inner-container .cell-focus-indicator-left .output-focus-indicator { margin-top: ${Me}px; } `)),Ne==="betweenCells"||Ne==="both"?(Ue.push(".monaco-workbench .notebookOverlay > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row .cell-bottom-toolbar-container { display: flex; }"),Ue.push(".monaco-workbench .notebookOverlay > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .cell-list-top-cell-toolbar-container { display: flex; }")):(Ue.push(".monaco-workbench .notebookOverlay > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row .cell-bottom-toolbar-container { display: none; }"),Ue.push(".monaco-workbench .notebookOverlay > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .cell-list-top-cell-toolbar-container { display: none; }")),xe==="left"&&(Ue.push(` .monaco-workbench .notebookOverlay .cell-list-top-cell-toolbar-container .action-item:first-child, .monaco-workbench .notebookOverlay .cell-list-top-cell-toolbar-container .action-item:first-child, .monaco-workbench .notebookOverlay > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row .cell-bottom-toolbar-container .action-item:first-child { margin-right: 0px !important; }`),Ue.push(` .monaco-workbench .notebookOverlay .cell-list-top-cell-toolbar-container .monaco-toolbar .action-label, .monaco-workbench .notebookOverlay .cell-list-top-cell-toolbar-container .monaco-toolbar .action-label, .monaco-workbench .notebookOverlay > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row .cell-bottom-toolbar-container .monaco-toolbar .action-label { padding: 0px !important; justify-content: center; border-radius: 4px; }`),Ue.push(` .monaco-workbench .notebookOverlay .cell-list-top-cell-toolbar-container, .monaco-workbench .notebookOverlay .cell-list-top-cell-toolbar-container, .monaco-workbench .notebookOverlay > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row .cell-bottom-toolbar-container { align-items: flex-start; justify-content: left; margin: 0 16px 0 ${8+we}px; }`),Ue.push(` .monaco-workbench .notebookOverlay .cell-list-top-cell-toolbar-container, .notebookOverlay .cell-bottom-toolbar-container .action-item { border: 0px; }`));const Ze=this._notebookOptions.computeTopInsertToolbarHeight(this.viewModel?.viewType);Ue.push(`.notebookOverlay .cell-list-top-cell-toolbar-container { top: -${Ze-3}px }`),Ue.push(`.notebookOverlay > .cell-list-container > .monaco-list > .monaco-scrollable-element, .notebookOverlay > .cell-list-container > .notebook-gutter > .monaco-list > .monaco-scrollable-element { padding-top: ${Ze}px !important; box-sizing: border-box; }`),Ue.push(`.notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .code-cell-row div.cell.code { margin-left: ${we+de}px; }`),Ue.push(`.notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row div.cell { margin-right: ${he}px; }`),Ue.push(`.notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row > .cell-inner-container { padding-top: ${ge}px; }`),Ue.push(`.notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .markdown-cell-row > .cell-inner-container { padding-bottom: ${Ie}px; padding-top: ${Te}px; }`),Ue.push(".notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .markdown-cell-row > .cell-inner-container.webview-backed-markdown-cell { padding: 0; }"),Ue.push(`.notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .markdown-cell-row > .webview-backed-markdown-cell.markdown-cell-edit-mode .cell.code { padding-bottom: ${Ie}px; padding-top: ${Te}px; }`),Ue.push(`.notebookOverlay .output { margin: 0px ${he}px 0px ${we+de}px; }`),Ue.push(`.notebookOverlay .output { width: calc(100% - ${we+de+he}px); }`),Ue.push(`.notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row .cell-comment-container { left: ${we+de}px; }`),Ue.push(`.notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row .cell-comment-container { width: calc(100% - ${we+de+he}px); }`),Ue.push(`.monaco-workbench .notebookOverlay .output .output-collapse-container .expandButton { left: -${de}px; }`),Ue.push(`.monaco-workbench .notebookOverlay .output .output-collapse-container .expandButton { position: absolute; width: ${de}px; padding: 6px 0px; }`),Ue.push(`.notebookOverlay .output-show-more-container { margin: 0px ${he}px 0px ${we+de}px; }`),Ue.push(`.notebookOverlay .output-show-more-container { width: calc(100% - ${we+de+he}px); }`),Ue.push(`.notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row div.cell.markdown { padding-left: ${de}px; }`),Ue.push(`.monaco-workbench .notebookOverlay > .cell-list-container .notebook-folding-indicator { left: ${(ye-20)/2+ke}px; }`),Ue.push(`.notebookOverlay > .cell-list-container .notebook-folded-hint { left: ${ye+ke+8}px; }`),Ue.push(`.notebookOverlay .monaco-list .monaco-list-row :not(.webview-backed-markdown-cell) .cell-focus-indicator-top { height: ${ge}px; }`),Ue.push(`.notebookOverlay .monaco-list .monaco-list-row .cell-focus-indicator-side { bottom: ${We}px; }`),Ue.push(`.notebookOverlay .monaco-list .monaco-list-row.code-cell-row .cell-focus-indicator-left { width: ${we+de}px; }`),Ue.push(`.notebookOverlay .monaco-list .monaco-list-row.markdown-cell-row .cell-focus-indicator-left { width: ${we}px; }`),Ue.push(`.notebookOverlay .monaco-list .monaco-list-row .cell-focus-indicator.cell-focus-indicator-right { width: ${he}px; }`),Ue.push(`.notebookOverlay .monaco-list .monaco-list-row .cell-focus-indicator-bottom { height: ${Se}px; }`),Ue.push(`.notebookOverlay .monaco-list .monaco-list-row .cell-shadow-container-bottom { top: ${Se}px; }`),Ue.push(` .monaco-workbench .notebookOverlay > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row .input-collapse-container .cell-collapse-preview { line-height: ${De}px; } .monaco-workbench .notebookOverlay > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row .input-collapse-container .cell-collapse-preview .monaco-tokenized-source { max-height: ${De}px; } `),Ue.push(`.monaco-workbench .notebookOverlay > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row .cell-bottom-toolbar-container .monaco-toolbar { height: ${Ve}px }`),Ue.push(`.monaco-workbench .notebookOverlay > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .cell-list-top-cell-toolbar-container .monaco-toolbar { height: ${Ve}px }`),Ue.push(`.monaco-workbench .notebookOverlay.cell-title-toolbar-right > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row .cell-title-toolbar { right: ${he+26}px; } .monaco-workbench .notebookOverlay.cell-title-toolbar-left > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row .cell-title-toolbar { left: ${we+de+16}px; } .monaco-workbench .notebookOverlay.cell-title-toolbar-hidden > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row .cell-title-toolbar { display: none; }`),Ue.push(` .monaco-workbench .notebookOverlay .output > div.foreground.output-inner-container { padding: ${le.OutputInnerContainerTopPadding}px 8px; } .monaco-workbench .notebookOverlay > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row .output-collapse-container { padding: ${le.OutputInnerContainerTopPadding}px 8px; } `),this._styleElement.textContent=Ue.join(` `)}_createCellList(){this._body.classList.add("cell-list-container"),this._dndController=this._register(new P.CellDragAndDropController(this,this._body));const he=de=>this._list.contextKeyService.createScoped(de),ge=[this.instantiationService.createInstance(U.CodeCellRenderer,this,this._renderedEditors,this._dndController,he),this.instantiationService.createInstance(U.MarkupCellRenderer,this,this._dndController,this._renderedEditors,he)];ge.forEach(de=>{this._register(de)}),this._listDelegate=this.instantiationService.createInstance(U.NotebookCellListDelegate),this._register(this._listDelegate),this._list=this.instantiationService.createInstance(V.NotebookCellList,"NotebookCellList",this._overlayContainer,this._body,this._viewContext,this._listDelegate,ge,this.scopedContextKeyService,{setRowLineHeight:!1,setRowHeight:!1,supportDynamicHeights:!0,horizontalScrolling:!1,keyboardSupport:!1,mouseSupport:!0,multipleSelectionSupport:!0,selectionNavigation:!0,enableKeyboardNavigation:!0,additionalScrollHeight:0,transformOptimization:!1,styleController:de=>this._list,overrideStyles:{listBackground:y.editorBackground,listActiveSelectionBackground:y.editorBackground,listActiveSelectionForeground:y.foreground,listFocusAndSelectionBackground:y.editorBackground,listFocusAndSelectionForeground:y.foreground,listFocusBackground:y.editorBackground,listFocusForeground:y.foreground,listHoverForeground:y.foreground,listHoverBackground:y.editorBackground,listHoverOutline:y.focusBorder,listFocusOutline:y.focusBorder,listInactiveSelectionBackground:y.editorBackground,listInactiveSelectionForeground:y.foreground,listInactiveFocusBackground:y.editorBackground,listInactiveFocusOutline:y.editorBackground},accessibilityProvider:{getAriaLabel:de=>{if(!this.viewModel)return"";const Se=this.viewModel.getCellIndex(de);return Se>=0?`Cell ${Se}, ${de.cellKind===ee.CellKind.Markup?"markdown":"code"} cell`:""},getWidgetAriaLabel(){return l.localize(0,null)}},focusNextPreviousDelegate:{onFocusNext:de=>this._updateForCursorNavigationMode(de),onFocusPrevious:de=>this._updateForCursorNavigationMode(de)}}),this._dndController.setList(this._list),this._register(this._list),this._listViewInfoAccessor=new V.ListViewInfoAccessor(this._list),this._register(this._listViewInfoAccessor),this._register((0,w.combinedDisposable)(...ge)),this._listTopCellToolbar=this._register(this.instantiationService.createInstance(J.ListTopCellToolbar,this,this.scopedContextKeyService,this._list.rowsContainer)),this._webviewTransparentCover=f.append(this._list.rowsContainer,me(".webview-cover")),this._webviewTransparentCover.style.display="none",this._register(f.addStandardDisposableGenericMouseDownListener(this._overlayContainer,de=>{de.target.classList.contains("slider")&&this._webviewTransparentCover&&(this._webviewTransparentCover.style.display="block")})),this._register(f.addStandardDisposableGenericMouseUpListener(this._overlayContainer,()=>{this._webviewTransparentCover&&(this._webviewTransparentCover.style.display="none")})),this._register(this._list.onMouseDown(de=>{de.element&&this._onMouseDown.fire({event:de.browserEvent,target:de.element})})),this._register(this._list.onMouseUp(de=>{de.element&&this._onMouseUp.fire({event:de.browserEvent,target:de.element})})),this._register(this._list.onDidChangeFocus(de=>{this._onDidChangeActiveEditor.fire(this),this._onDidChangeActiveCell.fire(),this._cursorNavigationMode=!1})),this._register(this._list.onContextMenu(de=>{this.showListContextMenu(de)})),this._register(this._list.onDidChangeVisibleRanges(()=>{this._onDidChangeVisibleRanges.fire()})),this._register(this._list.onDidScroll(de=>{this._onDidScroll.fire(),de.scrollTop!==de.oldScrollTop&&this._renderedEditors.forEach((Se,we)=>{this.getActiveCell()===we&&Se&&s.SuggestController.get(Se)?.cancelSuggestWidget()})})),this._focusTracker=this._register(f.trackFocus(this.getDomNode())),this._register(this._focusTracker.onDidBlur(()=>{this._editorFocus.set(!1),this.viewModel?.setEditorFocus(!1),this._onDidBlurEmitter.fire()})),this._register(this._focusTracker.onDidFocus(()=>{this._editorFocus.set(!0),this.viewModel?.setEditorFocus(!0),this._onDidFocusEmitter.fire()})),this._registerNotebookActionsToolbar()}showListContextMenu(he){this.contextMenuService.showContextMenu({getActions:()=>{const ge=[],de=this.menuService.createMenu(p.MenuId.NotebookCellTitle,this.scopedContextKeyService);return(0,r.createAndFillInContextMenuActions)(de,void 0,ge),de.dispose(),ge},getAnchor:()=>he.anchor})}_registerNotebookOverviewRuler(){this._notebookOverviewRuler=this._register(this.instantiationService.createInstance($.NotebookOverviewRuler,this,this._notebookOverviewRulerContainer))}_registerNotebookActionsToolbar(){this._notebookTopToolbar=this._register(this.instantiationService.createInstance(X.NotebookEditorToolbar,this,this.scopedContextKeyService,this._notebookOptions,this._notebookTopToolbarContainer)),this._register(this._notebookTopToolbar.onDidChangeState(()=>{this._dimension&&this._isVisible&&this.layout(this._dimension)}))}_updateForCursorNavigationMode(he){if(this._cursorNavigationMode){he();const ge=this._list.getFocusedElements()[0];ge.cellKind===ee.CellKind.Code||ge.getEditState()===x.CellEditState.Editing?this.focusNotebookCell(ge,"editor"):this._cursorNavigationMode=!0}else he()}getDomNode(){return this._overlayContainer}getOverflowContainerDomNode(){return this._overflowContainer}getInnerWebview(){return this._webview?.webview}setParentContextKeyService(he){this.scopedContextKeyService.updateParent(he)}async setModel(he,ge){if(this.viewModel===void 0||!this.viewModel.equal(he)){const de=this._notebookOptions.computeTopInsertToolbarHeight(this.viewModel?.viewType),Se=this._notebookOptions.computeBottomToolbarDimensions(this.viewModel?.viewType);this._detachModel(),await this._attachModel(he,ge);const we=this._notebookOptions.computeTopInsertToolbarHeight(this.viewModel?.viewType),ye=this._notebookOptions.computeBottomToolbarDimensions(this.viewModel?.viewType);(de!==we||Se.bottomToolbarGap!==ye.bottomToolbarGap||Se.bottomToolbarHeight!==ye.bottomToolbarHeight)&&(this._styleElement?.remove(),this._createLayoutStyles(),this._webview?.updateOptions({...this.notebookOptions.computeWebviewOptions(),fontFamily:this._generateFontFamily()})),this.telemetryService.publicLog2("notebook/editorOpened",{scheme:he.uri.scheme,ext:(0,C.extname)(he.uri),viewType:he.viewType})}else this.restoreListViewState(ge);this._loadKernelPreloads(),this._dndController?.clearGlobalDragState(),this._localStore.add(this._list.onDidChangeFocus(()=>{this.updateContextKeysOnFocusChange()})),this.updateContextKeysOnFocusChange(),this._backgroundMarkdownRendering()}_backgroundMarkdownRendering(){this._isScheduled||(0,A.runWhenIdle)(he=>{this._isScheduled=!1,this._backgroundMarkdownRenderingWithDeadline(he)})}_backgroundMarkdownRenderingWithDeadline(he){const ge=Date.now()+he.timeRemaining(),de=()=>{if(this._isDisposed||!this.viewModel)return;const Se=this.viewModel.viewCells.find(we=>we.cellKind===ee.CellKind.Markup&&!this._webview?.markupPreviewMapping.has(we.id));!Se||(this.createMarkupPreview(Se),Date.now()<ge?(0,v.setTimeout0)(de):this._backgroundMarkdownRendering())};de()}updateContextKeysOnFocusChange(){if(!this.viewModel)return;const he=this._list.getFocusedElements()[0];he&&(this._cellContextKeyManager||(this._cellContextKeyManager=this._localStore.add(this.instantiationService.createInstance(B.CellContextKeyManager,this,he))),this._cellContextKeyManager.updateForElement(he))}async setOptions(he){if(he?.isReadOnly!==void 0&&(this._readOnly=he?.isReadOnly),!!this.viewModel){if(this.viewModel.updateOptions({isReadOnly:this._readOnly}),he?.cellOptions){const ge=he.cellOptions,de=this.viewModel.viewCells.find(Se=>Se.uri.toString()===ge.resource.toString());if(de){this.focusElement(de);const Se=ge.options?.selection;Se?await this.revealLineInCenterIfOutsideViewportAsync(de,Se.startLineNumber):await this.revealInCenterIfOutsideViewportAsync(de);const we=this._renderedEditors.get(de);if(we){if(ge.options?.selection){const{selection:ye}=ge.options;we.setSelection({...ye,endLineNumber:ye.endLineNumber||ye.startLineNumber,endColumn:ye.endColumn||ye.startColumn}),we.revealPositionInCenterIfOutsideViewport({lineNumber:ye.startLineNumber,column:ye.startColumn}),await this.revealLineInCenterIfOutsideViewportAsync(de,ye.startLineNumber)}ge.options?.preserveFocus||we.focus()}}}if(he?.cellSelections){const ge=he.cellSelections[0].start,de=this.viewModel.cellAt(ge);de&&(this.viewModel.updateSelectionsState({kind:ee.SelectionStateType.Index,focus:{start:ge,end:ge+1},selections:he.cellSelections}),this.revealInCenterIfOutsideViewport(de))}this._updateForOptions(),this._onDidChangeOptions.fire()}}_detachModel(){this._localStore.clear(),(0,w.dispose)(this._localCellStateListeners),this._list.detachViewModel(),this.viewModel?.dispose(),this.viewModel=void 0,this._webview?.dispose(),this._webview?.element.remove(),this._webview=null,this._list.clear()}_updateForOptions(){!this.viewModel||(this._editorEditable.set(!this.viewModel.options.isReadOnly),this._overflowContainer.classList.toggle("notebook-editor-editable",!this.viewModel.options.isReadOnly),this.getDomNode().classList.toggle("notebook-editor-editable",!this.viewModel.options.isReadOnly))}async _resolveWebview(){return this.textModel?this._webviewResolvePromise?this._webviewResolvePromise:(this._webview||this._createWebview(this.getId(),this.textModel.uri),this._webviewResolvePromise=(async()=>{if(!this._webview)throw new Error("Notebook output webview object is not created successfully.");if(await this._webview.createWebview(),!this._webview.webview)throw new Error("Notebook output webview element was not created successfully.");return this._localStore.add(this._webview.webview.onDidBlur(()=>{this._outputFocus.set(!1),this.updateEditorFocus(),this._webviewFocused=!1})),this._localStore.add(this._webview.webview.onDidFocus(()=>{this._outputFocus.set(!0),this.updateEditorFocus(),this._webviewFocused=!0})),this._localStore.add(this._webview.onMessage(he=>{this._onDidReceiveMessage.fire(he)})),this._webview})(),this._webviewResolvePromise):null}async _createWebview(he,ge){const de=this;this._webview=this.instantiationService.createInstance(z.BackLayerWebView,{get creationOptions(){return de.creationOptions},setScrollTop(Se){de._listViewInfoAccessor.setScrollTop(Se)},triggerScroll(Se){de._listViewInfoAccessor.triggerScroll(Se)},getCellByInfo:de.getCellByInfo.bind(de),getCellById:de._getCellById.bind(de),toggleNotebookCellSelection:de._toggleNotebookCellSelection.bind(de),focusNotebookCell:de.focusNotebookCell.bind(de),focusNextNotebookCell:de.focusNextNotebookCell.bind(de),updateOutputHeight:de._updateOutputHeight.bind(de),scheduleOutputHeightAck:de._scheduleOutputHeightAck.bind(de),updateMarkupCellHeight:de._updateMarkupCellHeight.bind(de),setMarkupCellEditState:de._setMarkupCellEditState.bind(de),didStartDragMarkupCell:de._didStartDragMarkupCell.bind(de),didDragMarkupCell:de._didDragMarkupCell.bind(de),didDropMarkupCell:de._didDropMarkupCell.bind(de),didEndDragMarkupCell:de._didEndDragMarkupCell.bind(de)},he,ge,{...this._notebookOptions.computeWebviewOptions(),fontFamily:this._generateFontFamily()},this.notebookRendererMessaging.getScoped(this._uuid)),this._webview.element.style.width="100%",this._list.attachWebview(this._webview.element)}async _attachModel(he,ge){await this._createWebview(this.getId(),he.uri),this.viewModel=this.instantiationService.createInstance(q.NotebookViewModel,he.viewType,he,this._viewContext,this.getLayoutInfo(),{isReadOnly:this._readOnly}),this._viewContext.eventDispatcher.emit([new N.NotebookLayoutChangedEvent({width:!0,fontInfo:!0},this.getLayoutInfo())]),this._updateForOptions(),this._updateForNotebookConfiguration();{this.viewModel.restoreEditorViewState(ge);const Se=ge?.contributionsState||{};for(const[we,ye]of this._contributions)typeof ye.restoreViewState=="function"&&ye.restoreViewState(Se[we])}this._localStore.add(this.viewModel.onDidChangeViewCells(Se=>{this._onDidChangeViewCells.fire(Se)})),this._localStore.add(this.viewModel.onDidChangeSelection(()=>{this._onDidChangeSelection.fire(),this.updateSelectedMarkdownPreviews()})),this._localStore.add(this._list.onWillScroll(Se=>{this._webview?.isResolved()&&(this._webviewTransparentCover.style.transform=`translateY(${Se.scrollTop})`)}));let de=!1;if(this._localStore.add(this._list.onDidChangeContentHeight(()=>{de||(de=!0,f.scheduleAtNextAnimationFrame(()=>{de=!1,this._updateScrollHeight(),this._onDidChangeContentHeight.fire(this._list.getScrollHeight())},100))})),this._localStore.add(this._list.onDidRemoveOutputs(Se=>{Se.forEach(we=>this.removeInset(we))})),this._localStore.add(this._list.onDidHideOutputs(Se=>{Se.forEach(we=>this.hideInset(we))})),this._localStore.add(this._list.onDidRemoveCellsFromView(Se=>{const we=[],ye=[];for(const ke of Se)if(ke.cellKind===ee.CellKind.Markup){const Ie=ke;this.viewModel?.viewCells.find(Te=>Te.handle===Ie.handle)?we.push(Ie):ye.push(Ie)}this.hideMarkupPreviews(we),this.deleteMarkupPreviews(ye)})),await this._warmupWithMarkdownRenderer(this.viewModel,ge),(0,ae.mark)(he.uri,"customMarkdownLoaded"),this._localCellStateListeners=this.viewModel.viewCells.map(Se=>this._bindCellListener(Se)),this._lastCellWithEditorFocus=this.viewModel.viewCells.find(Se=>this.getActiveCell()===Se&&Se.focusMode===x.CellFocusMode.Editor)??null,this._localStore.add(this.viewModel.onDidChangeViewCells(Se=>{this._isDisposed||Se.splices.reverse().forEach(we=>{const[ye,ke,Ie]=we,Te=this._localCellStateListeners.splice(ye,ke,...Ie.map(De=>this._bindCellListener(De)));(0,w.dispose)(Te)})})),this._dimension){const Se=this._notebookOptions.computeTopInsertToolbarHeight(this.viewModel?.viewType);this._list.layout(this._dimension.height-Se,this._dimension.width)}else this._list.layout();this._dndController?.clearGlobalDragState(),this.restoreListViewState(ge)}_bindCellListener(he){const ge=new w.DisposableStore;return ge.add(he.onDidChangeLayout(de=>{(de.totalHeight!==void 0||de.outerWidth)&&this.layoutNotebookCell(he,he.layoutInfo.totalHeight,de.context)})),he.cellKind===ee.CellKind.Code&&ge.add(he.onDidRemoveOutputs(de=>{de.forEach(Se=>this.removeInset(Se))})),ge.add(he.onDidChangeState(de=>{de.inputCollapsedChanged&&he.isInputCollapsed&&he.cellKind===ee.CellKind.Markup&&this.hideMarkupPreviews([he]),de.outputCollapsedChanged&&he.isOutputCollapsed&&he.cellKind===ee.CellKind.Code&&he.outputsViewModels.forEach(Se=>this.hideInset(Se)),de.focusModeChanged&&this._validateCellFocusMode(he)})),ge}_validateCellFocusMode(he){he.focusMode===x.CellFocusMode.Editor&&(this._lastCellWithEditorFocus&&this._lastCellWithEditorFocus!==he&&(this._lastCellWithEditorFocus.focusMode=x.CellFocusMode.Container),this._lastCellWithEditorFocus=he)}async _warmupWithMarkdownRenderer(he,ge){await this._resolveWebview(),this._webview.element.style.visibility="hidden",await this._warmupViewport(he,ge),this._list.layout(0,0),this._list.attachViewModel(he),this._list.scrollTop=ge?.scrollPosition?.top??0,this._debug("finish initial viewport warmup and view state restore."),this._webview.element.style.visibility="visible"}async _warmupViewport(he,ge){if(ge&&ge.cellTotalHeights){const de=ge.cellTotalHeights,Se=ge.scrollPosition?.top??0,we=Se+Math.max(this._dimension?.height??0,1080);let ye=0;const ke=[];for(let Ie=0;Ie<he.length;Ie++){const Te=he.cellAt(Ie);if(ye+(de[Ie]??0)<Se){ye+=de?de[Ie]:0;continue}else Te.cellKind===ee.CellKind.Markup&&ke.push([Te,ye]);if(ye+=de?de[Ie]:0,ye>we)break}await this._webview.initializeMarkup(ke.map(([Ie,Te])=>this.createMarkupCellInitialization(Ie,Te)))}else{const de=he.viewCells.filter(ke=>ke.cellKind===ee.CellKind.Markup).slice(0,5).map(ke=>this.createMarkupCellInitialization(ke,-1e4));await this._webview.initializeMarkup(de);let Se=0;const we=[],ye=Math.max(this._dimension?.height??0,1080);for(const ke of he.viewCells)if(ke.cellKind===ee.CellKind.Markup&&we.push({id:ke.id,top:Se}),Se+=ke.getHeight(this.getLayoutInfo().fontInfo.lineHeight),Se>ye)break;this._webview?.updateScrollTops([],we)}}createMarkupCellInitialization(he,ge){return{mime:he.mime,cellId:he.id,cellHandle:he.handle,content:he.getText(),offset:ge,visible:!1}}restoreListViewState(he){if(!this.viewModel)return;he?.scrollPosition!==void 0?(this._list.scrollTop=he.scrollPosition.top,this._list.scrollLeft=he.scrollPosition.left):(this._list.scrollTop=0,this._list.scrollLeft=0);const ge=typeof he?.focus=="number"?he.focus:0;if(ge<this.viewModel.length){const de=this.viewModel.cellAt(ge);de&&this.viewModel?.updateSelectionsState({kind:ee.SelectionStateType.Handle,primary:de.handle,selections:[de.handle]})}else this._list.length>0&&this.viewModel.updateSelectionsState({kind:ee.SelectionStateType.Index,focus:{start:0,end:1},selections:[{start:0,end:1}]});if(he?.editorFocused){const de=this.viewModel.cellAt(ge);de&&(de.focusMode=x.CellFocusMode.Editor)}}getEditorViewState(){const he=this.viewModel?.getEditorViewState();if(!he)return{editingCells:{},editorViewStates:{},collapsedInputCells:{},collapsedOutputCells:{}};if(this._list){he.scrollPosition={left:this._list.scrollLeft,top:this._list.scrollTop};const de={};for(let Se=0;Se<this.viewModel.length;Se++){const we=this.viewModel.cellAt(Se);we.cellKind===ee.CellKind.Code,de[Se]=we.layoutInfo.totalHeight}if(he.cellTotalHeights=de,this.viewModel){const Se=this.viewModel.getFocus(),we=this.viewModel.cellAt(Se.start);if(we){const ye=this._list.domElementOfElement(we),ke=we.getEditState()===x.CellEditState.Editing&&!!(document.activeElement&&ye&&ye.contains(document.activeElement));he.editorFocused=ke,he.focus=Se.start}}}const ge={};for(const[de,Se]of this._contributions)typeof Se.saveViewState=="function"&&(ge[de]=Se.saveViewState());return he.contributionsState=ge,he}_allowScrollBeyondLastLine(){return this._scrollBeyondLastLine&&!this.isEmbedded}layout(he,ge){if(!ge&&this._shadowElementViewInfo===null){this._dimension=he;return}if(he.width<=0||he.height<=0){this.onWillHide();return}if(ge){const ke=ge.getBoundingClientRect();this._shadowElementViewInfo={height:ke.height,width:ke.width,top:ke.top,left:ke.left}}if(this._shadowElementViewInfo&&this._shadowElementViewInfo.width<=0&&this._shadowElementViewInfo.height<=0){this.onWillHide();return}this._dimension=new f.Dimension(he.width,he.height);const de=Math.max(he.height-(this._notebookTopToolbar?.useGlobalToolbar?26:0),0);f.size(this._body,he.width,de);const Se=this._notebookOptions.computeTopInsertToolbarHeight(this.viewModel?.viewType),we=Math.max(he.height-Se,0);this._list.getRenderHeight()<we?(this._list.updateOptions({additionalScrollHeight:this._allowScrollBeyondLastLine()?Math.max(0,we-50):Se}),this._list.layout(we,he.width)):(this._list.layout(we,he.width),this._list.updateOptions({additionalScrollHeight:this._allowScrollBeyondLastLine()?Math.max(0,we-50):Se})),this._overlayContainer.style.visibility="visible",this._overlayContainer.style.display="block",this._overlayContainer.style.position="absolute",this._overlayContainer.style.overflow="hidden";const ye=this._overlayContainer.parentElement?.getBoundingClientRect();this._overlayContainer.style.top=`${this._shadowElementViewInfo.top-(ye?.top||0)}px`,this._overlayContainer.style.left=`${this._shadowElementViewInfo.left-(ye?.left||0)}px`,this._overlayContainer.style.width=`${he?he.width:this._shadowElementViewInfo.width}px`,this._overlayContainer.style.height=`${he?he.height:this._shadowElementViewInfo.height}px`,this._webviewTransparentCover&&(this._webviewTransparentCover.style.height=`${he.height}px`,this._webviewTransparentCover.style.width=`${he.width}px`),this._notebookTopToolbar.layout(this._dimension),this._notebookOverviewRuler.layout(),this._viewContext?.eventDispatcher.emit([new N.NotebookLayoutChangedEvent({width:!0,fontInfo:!0},this.getLayoutInfo())])}focus(){if(this._isVisible=!0,this._editorFocus.set(!0),this._webviewFocused)this._webview?.focusWebview();else{if(this.viewModel){const he=this.viewModel.getFocus(),ge=this.viewModel.cellAt(he.start);if(ge&&ge.focusMode===x.CellFocusMode.Editor){ge.updateEditState(x.CellEditState.Editing,"editorWidget.focus"),ge.focusMode=x.CellFocusMode.Editor,this.focusEditor(ge);return}}this._list.domFocus()}this._currentProgress&&this.showProgress()}focusEditor(he){for(const[ge,de]of this._renderedEditors.entries())if(ge===he){de.focus();return}}focusContainer(){this._webviewFocused?this._webview?.focusWebview():this._list.focusContainer()}onWillHide(){this._isVisible=!1,this._editorFocus.set(!1),this._overlayContainer.style.visibility="hidden",this._overlayContainer.style.left="-50000px",this._notebookTopToolbarContainer.style.display="none"}editorHasDomFocus(){return f.isAncestor(document.activeElement,this.getDomNode())}updateEditorFocus(){this._focusTracker.refreshState();const he=this.editorHasDomFocus();this._editorFocus.set(he),this.viewModel?.setEditorFocus(he)}hasEditorFocus(){return this.updateEditorFocus(),this.editorHasDomFocus()}hasWebviewFocus(){return this._webviewFocused}hasOutputTextSelection(){if(!this.hasEditorFocus())return!1;const he=window.getSelection();if(he?.rangeCount!==1)return!1;const ge=he.getRangeAt(0);if(ge.startContainer===ge.endContainer&&ge.endOffset-ge.startOffset==0)return!1;let de=ge.commonAncestorContainer;if(!this._body.contains(de))return!1;for(;de&&de!==this._body;){if(de.classList&&de.classList.contains("output"))return!0;de=de.parentNode}return!1}focusElement(he){this.viewModel?.updateSelectionsState({kind:ee.SelectionStateType.Handle,primary:he.handle,selections:[he.handle]})}get scrollTop(){return this._list.scrollTop}getAbsoluteTopOfElement(he){return this._list.getAbsoluteTopOfElement(he)}isScrolledToBottom(){return this._listViewInfoAccessor.isScrolledToBottom()}scrollToBottom(){this._listViewInfoAccessor.scrollToBottom()}revealCellRangeInView(he){return this._listViewInfoAccessor.revealCellRangeInView(he)}revealInView(he){this._listViewInfoAccessor.revealInView(he)}revealInViewAtTop(he){this._listViewInfoAccessor.revealInViewAtTop(he)}revealInCenterIfOutsideViewport(he){this._listViewInfoAccessor.revealInCenterIfOutsideViewport(he)}async revealInCenterIfOutsideViewportAsync(he){return this._listViewInfoAccessor.revealInCenterIfOutsideViewportAsync(he)}revealInCenter(he){this._listViewInfoAccessor.revealInCenter(he)}async revealLineInViewAsync(he,ge){return this._listViewInfoAccessor.revealLineInViewAsync(he,ge)}async revealLineInCenterAsync(he,ge){return this._listViewInfoAccessor.revealLineInCenterAsync(he,ge)}async revealLineInCenterIfOutsideViewportAsync(he,ge){return this._listViewInfoAccessor.revealLineInCenterIfOutsideViewportAsync(he,ge)}async revealRangeInViewAsync(he,ge){return this._listViewInfoAccessor.revealRangeInViewAsync(he,ge)}async revealRangeInCenterAsync(he,ge){return this._listViewInfoAccessor.revealRangeInCenterAsync(he,ge)}async revealRangeInCenterIfOutsideViewportAsync(he,ge){return this._listViewInfoAccessor.revealRangeInCenterIfOutsideViewportAsync(he,ge)}async revealCellOffsetInCenterAsync(he,ge){return this._listViewInfoAccessor.revealCellOffsetInCenterAsync(he,ge)}getViewIndexByModelIndex(he){if(!this._listViewInfoAccessor)return-1;const ge=this.viewModel?.viewCells[he];return ge?this._listViewInfoAccessor.getViewIndex(ge):-1}getViewHeight(he){return this._listViewInfoAccessor?this._listViewInfoAccessor.getViewHeight(he):-1}getCellRangeFromViewRange(he,ge){return this._listViewInfoAccessor.getCellRangeFromViewRange(he,ge)}getCellsInRange(he){return this._listViewInfoAccessor.getCellsInRange(he)}setCellEditorSelection(he,ge){this._listViewInfoAccessor.setCellEditorSelection(he,ge)}setHiddenAreas(he){return this._listViewInfoAccessor.setHiddenAreas(he)}getVisibleRangesPlusViewportBelow(){return this._listViewInfoAccessor.getVisibleRangesPlusViewportBelow()}setScrollTop(he){this._listViewInfoAccessor.setScrollTop(he)}_registerDecorationType(he){const ge=this.notebookEditorService.resolveEditorDecorationOptions(he);if(ge){const de=f.createStyleSheet(this._body),Se=new j.NotebookRefCountedStyleSheet({removeEditorStyleSheets:we=>{this._editorStyleSheets.delete(we)}},he,de);this._editorStyleSheets.set(he,Se),this._decorationRules.set(he,new j.NotebookDecorationCSSRules(this.themeService,Se,{key:he,options:ge,styleSheet:Se}))}}setEditorDecorations(he,ge){if(!this.viewModel)return;this._editorStyleSheets.has(he)||this._registerDecorationType(he);const de=this._decorationRules.get(he);if(!de)return;const Se=this._decortionKeyToIds.get(he)||[],we=this.viewModel.getCellsInRange(ge).map(ye=>({handle:ye.handle,options:{className:de.className,outputClassName:de.className,topClassName:de.topClassName}}));this._decortionKeyToIds.set(he,this.deltaCellDecorations(Se,we))}removeEditorDecorations(he){this._decorationRules.has(he)&&this._decorationRules.get(he)?.dispose();const ge=this._decortionKeyToIds.get(he);this.deltaCellDecorations(ge||[],[])}deltaCellDecorations(he,ge){const de=this.viewModel?.deltaCellDecorations(he,ge)||[];return this._onDidChangeDecorations.fire(),de}deltaCellOutputContainerClassNames(he,ge,de){this._webview?.deltaCellOutputContainerClassNames(he,ge,de)}changeModelDecorations(he){return this.viewModel?.changeModelDecorations(he)||null}async _loadKernelPreloads(){if(!this.hasModel())return;const{selected:he}=this.notebookKernelService.getMatchingKernel(this.textModel);this._webview?.isResolved()||await this._resolveWebview(),this._webview?.updateKernelPreloads(he)}get activeKernel(){return this.textModel&&this.notebookKernelService.getSelectedOrSuggestedKernel(this.textModel)}async cancelNotebookCells(he){if(!(!this.viewModel||!this.hasModel()))return he||(he=this.viewModel.viewCells),this.notebookExecutionService.cancelNotebookCellHandles(this.textModel,Array.from(he).map(ge=>ge.handle))}async executeNotebookCells(he){if(!(!this.viewModel||!this.hasModel()))return he||(he=this.viewModel.viewCells),this.notebookExecutionService.executeNotebookCells(this.textModel,Array.from(he).map(ge=>ge.model))}async layoutNotebookCell(he,ge,de){if(this._debug("layout cell",he.handle,ge),this._list.getViewIndex(he)===void 0)return;const we=(Ie,Te)=>{this._isDisposed||this._list.updateElementHeight2(Ie,Te)};this._pendingLayouts?.has(he)&&this._pendingLayouts?.get(he).dispose();let ye=new A.DeferredPromise;const ke=()=>{this._isDisposed||this._list.elementHeight(he)!==ge&&(this._pendingLayouts?.delete(he),we(he,ge),ye.complete(void 0))};if(de===x.CellLayoutContext.Fold)ke();else{const Ie=f.scheduleAtNextAnimationFrame(ke);this._pendingLayouts?.set(he,(0,w.toDisposable)(()=>{Ie.dispose(),ye.complete(void 0)}))}return ye.p}getActiveCell(){const he=this._list.getFocusedElements();if(he&&he.length)return he[0]}_cellFocusAria(he,ge){const de=this._notebookViewModel?.getCellIndex(he);if(de!==void 0&&de>=0){let Se="";switch(ge){case"editor":Se=`the inner ${he.cellKind===ee.CellKind.Markup?"markdown":"code"} editor is focused, press escape to focus the cell container`;break;case"output":Se="the cell output is focused, press escape to focus the cell container";break;case"container":Se=`the ${he.cellKind===ee.CellKind.Markup?"markdown preview":"cell container"} is focused, press enter to focus the inner ${he.cellKind===ee.CellKind.Markup?"markdown":"code"} editor`;break;default:break}_.alert(`Cell ${this._notebookViewModel?.getCellIndex(he)}, ${Se} `)}}_toggleNotebookCellSelection(he,ge){const de=this._list.getSelectedElements(),Se=de.includes(he),we=ge?de[de.length-1]??he:he,ye=this._list.getViewIndex(he),ke=this._list.getViewIndex(we),Ie=this.getCellsInViewRange(ye,ke);Se?this._list.selectElements(de.filter(Te=>!Ie.includes(Te))):(this.focusElement(he),this._list.selectElements([...de.filter(Te=>!Ie.includes(Te)),...Ie]))}getCellsInViewRange(he,ge){const de=[];for(let Se=0;Se<this._list.length;++Se){const we=this._list.element(Se);we&&(Se>=he&&Se<=ge||Se>=ge&&Se<=he)&&de.push(we)}return de}focusNotebookCell(he,ge,de){if(!this._isDisposed)if(ge==="editor"){if(this.focusElement(he),this._cellFocusAria(he,ge),this._list.focusView(),he.updateEditState(x.CellEditState.Editing,"focusNotebookCell"),he.focusMode=x.CellFocusMode.Editor,!de?.skipReveal){const Se=he.getSelectionsStartPosition();if(Se?.length){const we=Se[0];this.revealRangeInCenterIfOutsideViewportAsync(he,S.Range.fromPositions(we,we))}else this.revealInCenterIfOutsideViewport(he)}}else if(ge==="output"){if(this.focusElement(he),this._cellFocusAria(he,ge),this._list.focusView(),!this._webview)return;this._webview.focusOutput(he.id),he.updateEditState(x.CellEditState.Preview,"focusNotebookCell"),he.focusMode=x.CellFocusMode.Container,de?.skipReveal||this.revealInCenterIfOutsideViewport(he)}else{const Se=this._list.domElementOfElement(he);document.activeElement&&Se&&Se.contains(document.activeElement)&&document.activeElement.blur(),he.updateEditState(x.CellEditState.Preview,"focusNotebookCell"),he.focusMode=x.CellFocusMode.Container,this.focusElement(he),this._cellFocusAria(he,ge),de?.skipReveal||this.revealInCenterIfOutsideViewport(he),this._list.focusView()}}focusNextNotebookCell(he,ge){const de=this.viewModel?.getCellIndex(he);if(typeof de!="number")return;const Se=this.viewModel?.cellAt(de+1);!Se||this.focusNotebookCell(Se,ge)}async _renderCell(he){if(he.isOutputCollapsed)return;const ge=he.outputsViewModels;for(let de of ge){const[Se,we]=de.resolveMimeTypes(this.textModel,void 0);if(!Se.find(Te=>Te.isTrusted)||Se.length===0)continue;const ye=Se[we];if(!ye)return;const ke=this._notebookService.getRendererInfo(ye.rendererId);if(!ke)return;const Ie={type:1,renderer:ke,source:de,mimeType:ye.mimeType};if(!this._webview?.insetMapping.has(Ie.source)){const Te=new Promise(De=>{this.onDidRenderOutput(_e=>{_e.model===Ie.source.model&&De()})});this.createOutput(he,Ie,0),await Te}return}}async _warmupAll(he){if(!this.hasModel()||!this.viewModel)return;const ge=this.viewModel.viewCells,de=[];for(let Se=0;Se<ge.length;Se++)ge[Se].cellKind===ee.CellKind.Markup&&!this._webview.markupPreviewMapping.has(ge[Se].id)&&de.push(this.createMarkupPreview(ge[Se]));if(he)for(let Se=0;Se<this.getLength();Se++){const we=this.cellAt(Se);we?.cellKind===ee.CellKind.Code&&de.push(this._renderCell(we))}return Promise.all(de)}async find(he,ge,de,Se=!1){if(!this._notebookViewModel)return[];const we=this._notebookViewModel.find(he,ge).filter(Ie=>Ie.matches.length>0);if(!ge.includeMarkupPreview&&!ge.includeOutput)return this._webview?.findStop(),we.filter(Ie=>Ie.cell.cellKind===ee.CellKind.Code&&ge.includeCodeInput||Ie.cell.cellKind===ee.CellKind.Markup&&ge.includeMarkupInput);const ye={};we.forEach(Ie=>{Ie.cell.cellKind===ee.CellKind.Code&&ge.includeCodeInput&&(ye[Ie.cell.id]=Ie),Ie.cell.cellKind===ee.CellKind.Markup&&ge.includeMarkupInput&&(ye[Ie.cell.id]=Ie)}),this._webview&&(await this._warmupAll(!!ge.includeOutput),(await this._webview.find(he,{caseSensitive:ge.caseSensitive,wholeWord:ge.wholeWord,includeMarkup:!!ge.includeMarkupPreview,includeOutput:!!ge.includeOutput})).forEach(Te=>{if(!ge.includeMarkupPreview&&Te.type==="preview"||!ge.includeOutput&&Te.type==="output")return;const De=ye[Te.cellId];De?De.matches.push(Te):ye[Te.cellId]={cell:this._notebookViewModel.viewCells.find(_e=>_e.id===Te.cellId),index:this._notebookViewModel.viewCells.findIndex(_e=>_e.id===Te.cellId),matches:[Te],modelMatchCount:0}}));const ke=[];return this._notebookViewModel.viewCells.forEach((Ie,Te)=>{ye[Ie.id]&&ke.push({cell:Ie,index:Te,matches:ye[Ie.id].matches,modelMatchCount:ye[Ie.id].modelMatchCount})}),ke}async highlightFind(he,ge){return this._webview?this._webview?.findHighlight(ge):0}async unHighlightFind(he){if(!!this._webview)return this._webview?.findUnHighlight(he)}findStop(){this._webview&&this._webview.findStop()}getLayoutInfo(){if(!this._list)throw new Error("Editor is not initalized successfully");return this._fontInfo||this._generateFontInfo(),{width:this._dimension?.width??0,height:this._dimension?.height??0,scrollHeight:this._list?.getScrollHeight()??0,fontInfo:this._fontInfo}}async createMarkupPreview(he){if(!this._webview||(this._webview.isResolved()||await this._resolveWebview(),!this._webview||!this._list.webviewElement)||!this.viewModel)return;const ge=this.viewModel.getCellIndex(he);if(!!this.viewModel.getHiddenRanges().some(Ie=>ge>=Ie.start&&ge<Ie.end))return;const we=parseInt(this._list.webviewElement.domNode.style.top,10),ye=we?0-we:0,ke=this._list.getAbsoluteTopOfElement(he);await this._webview.showMarkupPreview({mime:he.mime,cellHandle:he.handle,cellId:he.id,content:he.getText(),offset:ke+ye,visible:!0})}async unhideMarkupPreviews(he){!this._webview||(this._webview.isResolved()||await this._resolveWebview(),await this._webview?.unhideMarkupPreviews(he.map(ge=>ge.id)))}async hideMarkupPreviews(he){!this._webview||!he.length||(this._webview.isResolved()||await this._resolveWebview(),await this._webview?.hideMarkupPreviews(he.map(ge=>ge.id)))}async deleteMarkupPreviews(he){!this._webview||(this._webview.isResolved()||await this._resolveWebview(),await this._webview?.deleteMarkupPreviews(he.map(ge=>ge.id)))}async updateSelectedMarkdownPreviews(){if(!this._webview)return;this._webview.isResolved()||await this._resolveWebview();const he=this.getSelectionViewModels().map(ge=>ge.id);await this._webview?.updateMarkupPreviewSelections(he.length>1?he:[])}async createOutput(he,ge,de){this._insetModifyQueueByOutputId.queue(ge.source.model.outputId,async()=>{if(!this._webview||(this._webview.isResolved()||await this._resolveWebview(),!this._webview)||!this._list.webviewElement)return;ge.type===1&&this.notebookRendererMessaging.prepare(ge.renderer.id);const Se=parseInt(this._list.webviewElement.domNode.style.top,10),we=Se?0-Se:0,ye=this._list.getAbsoluteTopOfElement(he)+we;if(!this._webview.insetMapping.has(ge.source))await this._webview.createOutput({cellId:he.id,cellHandle:he.handle,cellUri:he.uri},ge,ye,de);else{const ke=he.outputsViewModels.indexOf(ge.source),Ie=he.getOutputOffset(ke);this._webview.updateScrollTops([{cell:he,output:ge.source,cellTop:ye,outputOffset:Ie,forceDisplay:!he.isOutputCollapsed}],[])}})}async updateOutput(he,ge,de){this._insetModifyQueueByOutputId.queue(ge.source.model.outputId,async()=>{if(!this._webview||(this._webview.isResolved()||await this._resolveWebview(),!this._webview||!this._list.webviewElement))return;if(!this._webview.insetMapping.has(ge.source))return this.createOutput(he,ge,de);ge.type===1&&this.notebookRendererMessaging.prepare(ge.renderer.id);const Se=parseInt(this._list.webviewElement.domNode.style.top,10),we=Se?0-Se:0,ye=this._list.getAbsoluteTopOfElement(he)+we;await this._webview.updateOutput({cellId:he.id,cellHandle:he.handle,cellUri:he.uri},ge,ye,de)})}removeInset(he){this._insetModifyQueueByOutputId.queue(he.model.outputId,async()=>{this._webview?.isResolved()&&this._webview.removeInsets([he])})}hideInset(he){this._insetModifyQueueByOutputId.queue(he.model.outputId,async()=>{this._webview?.isResolved()&&this._webview.hideInset(he)})}postMessage(he){this._webview?.isResolved()&&this._webview.postKernelMessage(he)}addClassName(he){this._overlayContainer.classList.add(he)}removeClassName(he){this._overlayContainer.classList.remove(he)}cellAt(he){return this.viewModel?.cellAt(he)}getCellByInfo(he){const{cellHandle:ge}=he;return this.viewModel?.viewCells.find(de=>de.handle===ge)}getCellByHandle(he){return this.viewModel?.getCellByHandle(he)}getCellIndex(he){return this.viewModel?.getCellIndexByHandle(he.handle)}getNextVisibleCellIndex(he){return this.viewModel?.getNextVisibleCellIndex(he)}getPreviousVisibleCellIndex(he){return this.viewModel?.getPreviousVisibleCellIndex(he)}_updateScrollHeight(){if(this._isDisposed||!this._webview?.isResolved()||!this._list.webviewElement)return;const he=this._list.scrollHeight;this._webview.element.style.height=`${he+V.NOTEBOOK_WEBVIEW_BOUNDARY*2}px`;const ge=parseInt(this._list.webviewElement.domNode.style.top,10),de=ge?0-ge:0,Se=[],we=[];this._webview?.insetMapping.forEach((ke,Ie)=>{const Te=this.viewModel?.getCellByHandle(ke.cellInfo.cellHandle);if(!Te||!(Te instanceof H.CodeCellViewModel)||(this.viewModel?.viewCells.find(xe=>xe.handle===ke.cellInfo.cellHandle),this._list.getViewIndex(Te)===void 0))return;Te.outputsViewModels.indexOf(Ie)<0&&we.push(Ie);const _e=this._list.getAbsoluteTopOfElement(Te),Re=Te.outputsViewModels.indexOf(Ie),Ne=Te.getOutputOffset(Re);Se.push({cell:Te,output:Ie,cellTop:_e+de,outputOffset:Ne,forceDisplay:!1})}),this._webview.removeInsets(we);const ye=[];for(const ke of this._webview.markupPreviewMapping.keys()){const Ie=this.viewModel?.viewCells.find(Te=>Te.id===ke);if(Ie){const Te=this._list.getAbsoluteTopOfElement(Ie);ye.push({id:ke,top:Te+de})}}(ye.length||Se.length)&&(this._debug("_list.onDidChangeContentHeight/markdown",ye),this._webview?.updateScrollTops(Se,ye))}_updateOutputHeight(he,ge,de,Se,we){const ye=this.viewModel?.viewCells.find(ke=>ke.handle===he.cellHandle);if(ye&&ye instanceof H.CodeCellViewModel){const ke=ye.outputsViewModels.indexOf(ge);de!==0&&ye.updateOutputMinHeight(0),this._debug("update cell output",ye.handle,de),ye.updateOutputHeight(ke,de,we),this.layoutNotebookCell(ye,ye.layoutInfo.totalHeight),Se&&this._onDidRenderOutput.fire(ge)}}_scheduleOutputHeightAck(he,ge,de){const Se=this._pendingOutputHeightAcks.size===0;this._pendingOutputHeightAcks.set(ge,{cellId:he.cellId,outputId:ge,height:de}),Se&&f.scheduleAtNextAnimationFrame(()=>{this._debug("ack height"),this._updateScrollHeight(),this._webview?.ackHeight([...this._pendingOutputHeightAcks.values()]),this._pendingOutputHeightAcks.clear()},-1)}_getCellById(he){return this.viewModel?.viewCells.find(ge=>ge.id===he)}_updateMarkupCellHeight(he,ge,de){const Se=this._getCellById(he);if(Se&&Se instanceof G.MarkupCellViewModel){const{bottomToolbarGap:we}=this._notebookOptions.computeBottomToolbarDimensions(this.viewModel?.viewType);this._debug("updateMarkdownCellHeight",Se.handle,ge+we,de),Se.renderedMarkdownHeight=ge}}_setMarkupCellEditState(he,ge){const de=this._getCellById(he);de instanceof G.MarkupCellViewModel&&(this.revealInView(de),de.updateEditState(ge,"setMarkdownCellEditState"))}_didStartDragMarkupCell(he,ge){const de=this._getCellById(he);if(de instanceof G.MarkupCellViewModel){const Se=this._list.webviewElement?-parseInt(this._list.webviewElement.domNode.style.top,10):0;this._dndController?.startExplicitDrag(de,ge.dragOffsetY-Se)}}_didDragMarkupCell(he,ge){const de=this._getCellById(he);if(de instanceof G.MarkupCellViewModel){const Se=this._list.webviewElement?-parseInt(this._list.webviewElement.domNode.style.top,10):0;this._dndController?.explicitDrag(de,ge.dragOffsetY-Se)}}_didDropMarkupCell(he,ge){const de=this._getCellById(he);if(de instanceof G.MarkupCellViewModel){const Se=this._list.webviewElement?-parseInt(this._list.webviewElement.domNode.style.top,10):0;ge.dragOffsetY-=Se,this._dndController?.explicitDrop(de,ge)}}_didEndDragMarkupCell(he){const ge=this._getCellById(he);ge instanceof G.MarkupCellViewModel&&this._dndController?.endExplicitDrag(ge)}getContribution(he){return this._contributions.get(he)||null}dispose(){this._isDisposed=!0,this._webview?.dispose(),this._webview=null,this.notebookEditorService.removeNotebookEditor(this),(0,w.dispose)(this._contributions.values()),this._contributions.clear(),this._localStore.clear(),(0,w.dispose)(this._localCellStateListeners),this._list.dispose(),this._listTopCellToolbar?.dispose(),this._overlayContainer.remove(),this.viewModel?.dispose(),this._webview=null,this._webviewResolvePromise=null,this._webviewTransparentCover=null,this._dndController=null,this._listTopCellToolbar=null,this._notebookViewModel=void 0,this._cellContextKeyManager=null,this._renderedEditors.clear(),this._pendingLayouts=null,this._listDelegate=null,super.dispose()}toJSON(){return{notebookUri:this.viewModel?.uri}}};Ce=Ee([W(1,h.IInstantiationService),W(2,ue.INotebookRendererMessagingService),W(3,L.INotebookEditorService),W(4,ce.INotebookKernelService),W(5,oe.INotebookService),W(6,u.IConfigurationService),W(7,a.IContextKeyService),W(8,d.ILayoutService),W(9,n.IContextMenuService),W(10,p.IMenuService),W(11,T.IThemeService),W(12,E.ITelemetryService),W(13,se.INotebookExecutionService),W(14,ie.INotebookExecutionStateService),W(15,b.IEditorProgressService)],Ce),e.NotebookEditorWidget=Ce,(0,m.registerZIndex)(m.ZIndex.Base,5,"notebook-progress-bar"),(0,m.registerZIndex)(m.ZIndex.Base,10,"notebook-list-insertion-indicator"),(0,m.registerZIndex)(m.ZIndex.Base,20,"notebook-cell-editor-outline"),(0,m.registerZIndex)(m.ZIndex.Base,25,"notebook-scrollbar"),(0,m.registerZIndex)(m.ZIndex.Base,26,"notebook-cell-status"),(0,m.registerZIndex)(m.ZIndex.Base,26,"notebook-folding-indicator"),(0,m.registerZIndex)(m.ZIndex.Base,27,"notebook-output"),(0,m.registerZIndex)(m.ZIndex.Base,28,"notebook-cell-bottom-toolbar-container"),(0,m.registerZIndex)(m.ZIndex.Base,29,"notebook-run-button-container"),(0,m.registerZIndex)(m.ZIndex.Base,29,"notebook-input-collapse-condicon"),(0,m.registerZIndex)(m.ZIndex.Base,30,"notebook-cell-output-toolbar"),(0,m.registerZIndex)(m.ZIndex.Sash,1,"notebook-cell-expand-part-button"),(0,m.registerZIndex)(m.ZIndex.Sash,2,"notebook-cell-toolbar"),(0,m.registerZIndex)(m.ZIndex.Sash,3,"notebook-cell-toolbar-dropdown-active"),e.notebookCellBorder=(0,y.registerColor)("notebook.cellBorderColor",{dark:(0,y.transparent)(y.listInactiveSelectionBackground,1),light:(0,y.transparent)(y.listInactiveSelectionBackground,1),hcDark:R.PANEL_BORDER,hcLight:R.PANEL_BORDER},l.localize(1,null)),e.focusedEditorBorderColor=(0,y.registerColor)("notebook.focusedEditorBorder",{light:y.focusBorder,dark:y.focusBorder,hcDark:y.focusBorder,hcLight:y.focusBorder},l.localize(2,null)),e.cellStatusIconSuccess=(0,y.registerColor)("notebookStatusSuccessIcon.foreground",{light:O.debugIconStartForeground,dark:O.debugIconStartForeground,hcDark:O.debugIconStartForeground,hcLight:O.debugIconStartForeground},l.localize(3,null)),e.cellStatusIconError=(0,y.registerColor)("notebookStatusErrorIcon.foreground",{light:y.errorForeground,dark:y.errorForeground,hcDark:y.errorForeground,hcLight:y.errorForeground},l.localize(4,null)),e.cellStatusIconRunning=(0,y.registerColor)("notebookStatusRunningIcon.foreground",{light:y.foreground,dark:y.foreground,hcDark:y.foreground,hcLight:y.foreground},l.localize(5,null)),e.notebookOutputContainerBorderColor=(0,y.registerColor)("notebook.outputContainerBorderColor",{dark:null,light:null,hcDark:null,hcLight:null},l.localize(6,null)),e.notebookOutputContainerColor=(0,y.registerColor)("notebook.outputContainerBackgroundColor",{dark:null,light:null,hcDark:null,hcLight:null},l.localize(7,null)),e.CELL_TOOLBAR_SEPERATOR=(0,y.registerColor)("notebook.cellToolbarSeparator",{dark:k.Color.fromHex("#808080").transparent(.35),light:k.Color.fromHex("#808080").transparent(.35),hcDark:y.contrastBorder,hcLight:y.contrastBorder},l.localize(8,null)),e.focusedCellBackground=(0,y.registerColor)("notebook.focusedCellBackground",{dark:null,light:null,hcDark:null,hcLight:null},l.localize(9,null)),e.selectedCellBackground=(0,y.registerColor)("notebook.selectedCellBackground",{dark:y.listInactiveSelectionBackground,light:y.listInactiveSelectionBackground,hcDark:null,hcLight:null},l.localize(10,null)),e.cellHoverBackground=(0,y.registerColor)("notebook.cellHoverBackground",{dark:(0,y.transparent)(e.focusedCellBackground,.5),light:(0,y.transparent)(e.focusedCellBackground,.7),hcDark:null,hcLight:null},l.localize(11,null)),e.selectedCellBorder=(0,y.registerColor)("notebook.selectedCellBorder",{dark:e.notebookCellBorder,light:e.notebookCellBorder,hcDark:y.contrastBorder,hcLight:y.contrastBorder},l.localize(12,null)),e.inactiveSelectedCellBorder=(0,y.registerColor)("notebook.inactiveSelectedCellBorder",{dark:null,light:null,hcDark:y.focusBorder,hcLight:y.focusBorder},l.localize(13,null)),e.focusedCellBorder=(0,y.registerColor)("notebook.focusedCellBorder",{dark:y.focusBorder,light:y.focusBorder,hcDark:y.focusBorder,hcLight:y.focusBorder},l.localize(14,null)),e.inactiveFocusedCellBorder=(0,y.registerColor)("notebook.inactiveFocusedCellBorder",{dark:e.notebookCellBorder,light:e.notebookCellBorder,hcDark:e.notebookCellBorder,hcLight:e.notebookCellBorder},l.localize(15,null)),e.cellStatusBarItemHover=(0,y.registerColor)("notebook.cellStatusBarItemHoverBackground",{light:new k.Color(new k.RGBA(0,0,0,.08)),dark:new k.Color(new k.RGBA(255,255,255,.15)),hcDark:new k.Color(new k.RGBA(255,255,255,.15)),hcLight:new k.Color(new k.RGBA(0,0,0,.08))},l.localize(16,null)),e.cellInsertionIndicator=(0,y.registerColor)("notebook.cellInsertionIndicator",{light:y.focusBorder,dark:y.focusBorder,hcDark:y.focusBorder,hcLight:y.focusBorder},l.localize(17,null)),e.listScrollbarSliderBackground=(0,y.registerColor)("notebookScrollbarSlider.background",{dark:y.scrollbarSliderBackground,light:y.scrollbarSliderBackground,hcDark:y.scrollbarSliderBackground,hcLight:y.scrollbarSliderBackground},l.localize(18,null)),e.listScrollbarSliderHoverBackground=(0,y.registerColor)("notebookScrollbarSlider.hoverBackground",{dark:y.scrollbarSliderHoverBackground,light:y.scrollbarSliderHoverBackground,hcDark:y.scrollbarSliderHoverBackground,hcLight:y.scrollbarSliderHoverBackground},l.localize(19,null)),e.listScrollbarSliderActiveBackground=(0,y.registerColor)("notebookScrollbarSlider.activeBackground",{dark:y.scrollbarSliderActiveBackground,light:y.scrollbarSliderActiveBackground,hcDark:y.scrollbarSliderActiveBackground,hcLight:y.scrollbarSliderActiveBackground},l.localize(20,null)),e.cellSymbolHighlight=(0,y.registerColor)("notebook.symbolHighlightBackground",{dark:k.Color.fromHex("#ffffff0b"),light:k.Color.fromHex("#fdff0033"),hcDark:null,hcLight:null},l.localize(21,null)),e.cellEditorBackground=(0,y.registerColor)("notebook.cellEditorBackground",{light:R.SIDE_BAR_BACKGROUND,dark:R.SIDE_BAR_BACKGROUND,hcDark:null,hcLight:null},l.localize(22,null)),(0,T.registerThemingParticipant)((ve,he)=>{const ge=ve.getColor(e.focusedCellBorder),de=ve.getColor(e.inactiveFocusedCellBorder),Se=ve.getColor(e.selectedCellBorder);he.addRule(` :root { --notebook-focused-cell-border-color: ${ge}; --notebook-inactive-focused-cell-border-color: ${de}; --notebook-selected-cell-border-color: ${Se}; } `);const we=ve.getColor(e.cellStatusIconSuccess),ye=ve.getColor(e.cellStatusIconError),ke=ve.getColor(e.cellStatusIconRunning);he.addRule(` :root { --notebook-cell-status-icon-success: ${we}; --notebook-cell-status-icon-error: ${ye}; --notebook-cell-status-icon-running: ${ke}; } `);const Ie=ve.getColor(y.textLinkForeground);Ie&&he.addRule(`.notebookOverlay .cell.markdown a, .notebookOverlay .output-show-more-container a, .notebookOverlay div.output-show-more a { color: ${Ie};} `);const Te=ve.getColor(y.textLinkActiveForeground);Te&&he.addRule(`.notebookOverlay .output-show-more-container a:active, .notebookOverlay .output-show-more a:active { color: ${Te}; }`);const De=ve.getColor(y.textPreformatForeground);De&&he.addRule(`.notebookOverlay code, .notebookOverlay .shortcut { color: ${De}; }`);const _e=ve.getColor(y.contrastBorder);_e&&he.addRule(`.notebookOverlay .monaco-editor { border-color: ${_e}; }`);const Re=ve.getColor(y.textBlockQuoteBackground);Re&&he.addRule(`.notebookOverlay blockquote { background: ${Re}; }`);const Ne=ve.getColor(y.textBlockQuoteBorder);Ne&&he.addRule(`.notebookOverlay blockquote { border-color: ${Ne}; }`);const xe=ve.getColor(e.notebookOutputContainerColor);xe&&(he.addRule(`.notebookOverlay .output { background-color: ${xe}; }`),he.addRule(`.notebookOverlay .output-element { background-color: ${xe}; }`),he.addRule(`.notebookOverlay .output-show-more-container { background-color: ${xe}; }`));const Ae=ve.getColor(e.notebookOutputContainerBorderColor);Ae&&he.addRule(`.notebookOverlay .output-element { border-top: none !important; border: 1px solid transparent; border-color: ${Ae} !important; }`);const Le=ve.getColor(y.editorBackground);Le&&(he.addRule(`.notebookOverlay .cell-drag-image .cell-editor-container > div { background: ${Le} !important; }`),he.addRule(`.notebookOverlay .monaco-list-row .cell-title-toolbar { background-color: ${Le}; }`),he.addRule(`.notebookOverlay .monaco-list-row.cell-drag-image { background-color: ${Le}; }`),he.addRule(`.notebookOverlay .cell-bottom-toolbar-container .action-item { background-color: ${Le} }`),he.addRule(`.notebookOverlay .cell-list-top-cell-toolbar-container .action-item { background-color: ${Le} }`));const Me=ve.getColor(e.cellEditorBackground)??ve.getColor(y.editorBackground);Me&&he.addRule(`.notebookOverlay .cell .monaco-editor-background, .notebookOverlay .cell .margin-view-overlays, .notebookOverlay .cell .cell-statusbar-container { background: ${Me}; }`);const We=ve.getColor(e.CELL_TOOLBAR_SEPERATOR);We&&(he.addRule(`.notebookOverlay .monaco-list-row .cell-title-toolbar { border: solid 1px ${We}; }`),he.addRule(`.notebookOverlay .cell-bottom-toolbar-container .action-item { border: solid 1px ${We} }`),he.addRule(`.notebookOverlay .cell-list-top-cell-toolbar-container .action-item { border: solid 1px ${We} }`),he.addRule(`.notebookOverlay .monaco-action-bar .action-item.verticalSeparator { background-color: ${We} }`),he.addRule(`.monaco-workbench .notebookOverlay > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row .input-collapse-container { border-bottom: solid 1px ${We} }`));const Ve=ve.getColor(e.focusedCellBackground);Ve&&(he.addRule(`.notebookOverlay .code-cell-row.focused .cell-focus-indicator { background-color: ${Ve} !important; }`),he.addRule(`.notebookOverlay .markdown-cell-row.focused { background-color: ${Ve} !important; }`),he.addRule(`.notebookOverlay .code-cell-row.focused .input-collapse-container { background-color: ${Ve} !important; }`));const Ue=ve.getColor(e.selectedCellBackground);e.selectedCellBackground&&(he.addRule(`.notebookOverlay .monaco-list.selection-multiple .markdown-cell-row.selected { background-color: ${Ue} !important; }`),he.addRule(`.notebookOverlay .monaco-list.selection-multiple .code-cell-row.selected .cell-focus-indicator-top { background-color: ${Ue} !important; }`),he.addRule(`.notebookOverlay .monaco-list.selection-multiple .code-cell-row.selected .cell-focus-indicator-left { background-color: ${Ue} !important; }`),he.addRule(`.notebookOverlay .monaco-list.selection-multiple .code-cell-row.selected .cell-focus-indicator-right { background-color: ${Ue} !important; }`),he.addRule(`.notebookOverlay .monaco-list.selection-multiple .code-cell-row.selected .cell-focus-indicator-bottom { background-color: ${Ue} !important; }`));const et=ve.getColor(e.inactiveSelectedCellBorder);he.addRule(` .notebookOverlay .monaco-list.selection-multiple:focus-within .monaco-list-row.selected .cell-focus-indicator-top:before, .notebookOverlay .monaco-list.selection-multiple:focus-within .monaco-list-row.selected .cell-focus-indicator-bottom:before, .notebookOverlay .monaco-list.selection-multiple:focus-within .monaco-list-row.selected .cell-inner-container:not(.cell-editor-focus) .cell-focus-indicator-left:before, .notebookOverlay .monaco-list.selection-multiple:focus-within .monaco-list-row.selected .cell-inner-container:not(.cell-editor-focus) .cell-focus-indicator-right:before { border-color: ${et} !important; } `);const Ze=ve.getColor(e.cellHoverBackground);Ze&&(he.addRule(`.notebookOverlay .code-cell-row:not(.focused):hover .cell-focus-indicator, .notebookOverlay .code-cell-row:not(.focused).cell-output-hover .cell-focus-indicator, .notebookOverlay .markdown-cell-row:not(.focused):hover { background-color: ${Ze} !important; }`),he.addRule(`.notebookOverlay .code-cell-row:not(.focused):hover .input-collapse-container, .notebookOverlay .code-cell-row:not(.focused).cell-output-hover .input-collapse-container { background-color: ${Ze}; }`));const Fe=ve.getColor(e.cellSymbolHighlight);Fe&&he.addRule(`.monaco-workbench .notebookOverlay .monaco-list .monaco-list-row.code-cell-row.nb-symbolHighlight .cell-focus-indicator, .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row.markdown-cell-row.nb-symbolHighlight { background-color: ${Fe} !important; }`);const Qe=ve.getColor(e.focusedEditorBorderColor);Qe&&he.addRule(`.notebookOverlay .monaco-list:focus-within .monaco-list-row.focused .cell-editor-focus .cell-editor-part:before { outline: solid 1px ${Qe}; }`);const qe=ve.getColor(e.notebookCellBorder);qe&&(he.addRule(`.notebookOverlay .cell.markdown h1 { border-color: ${qe}; }`),he.addRule(`.notebookOverlay .monaco-list-row .cell-editor-part:before { outline: solid 1px ${qe}; }`));const Be=ve.getColor(e.cellStatusBarItemHover);Be&&he.addRule(`.monaco-workbench .notebookOverlay .cell-statusbar-container .cell-language-picker:hover, .monaco-workbench .notebookOverlay .cell-statusbar-container .cell-status-item.cell-status-item-has-command:hover { background-color: ${Be}; }`);const Ke=ve.getColor(e.cellInsertionIndicator);Ke&&he.addRule(`.notebookOverlay > .cell-list-container > .cell-list-insertion-indicator { background-color: ${Ke}; }`);const Xe=ve.getColor(e.listScrollbarSliderBackground);Xe&&he.addRule(` .notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .scrollbar > .slider { background: ${Xe}; } `);const rt=ve.getColor(e.listScrollbarSliderHoverBackground);rt&&he.addRule(` .notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .scrollbar > .slider:hover { background: ${rt}; } `);const it=ve.getColor(e.listScrollbarSliderActiveBackground);it&&he.addRule(` .notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .scrollbar > .slider.active { background: ${it}; } `);const at=ve.getColor(y.toolbarHoverBackground);at&&he.addRule(` .monaco-workbench .notebookOverlay > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row .expandInputIcon:hover, .monaco-workbench .notebookOverlay > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row .expandOutputIcon:hover, .monaco-workbench .notebookOverlay > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row .cell-expand-part-button:hover { background-color: ${at}; } `);const ft=ve.getColor(fe.editorGutterModifiedBackground);ft&&he.addRule(` .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row.code-cell-row.nb-cell-modified .cell-focus-indicator { background-color: ${ft} !important; } .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row.markdown-cell-row.nb-cell-modified { background-color: ${ft} !important; }`);const vt=ve.getColor(y.diffInserted);vt&&he.addRule(` .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row.code-cell-row.nb-cell-added .cell-focus-indicator { background-color: ${vt} !important; } .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row.markdown-cell-row.nb-cell-added { background-color: ${vt} !important; }`);const Dt=ve.getColor(y.diffRemoved);Dt&&he.addRule(` .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row.code-cell-row.nb-cell-deleted .cell-focus-indicator { background-color: ${Dt} !important; } .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row.markdown-cell-row.nb-cell-deleted { background-color: ${Dt} !important; }`);const kt=ve.getColor(y.iconForeground);kt&&he.addRule(`.monaco-workbench .notebookOverlay .codicon-debug-continue { color: ${kt} !important; }`)})}),define(ne[910],re([1,0,11,2,1624,5,12,804,267,506,200,64,158]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TimerCellStatusBarContrib=e.ExecutionStateCellStatusBarContrib=e.NotebookStatusBarController=e.formatCellDuration=void 0;function c(p){const u=Math.floor(p/1e3/60),a=Math.floor(p/1e3)%60,n=String(p-u*60*1e3-a*1e3).charAt(0);return u>0?`${u}m ${a}.${n}s`:`${a}.${n}s`}e.formatCellDuration=c;class i extends f.Disposable{constructor(u,a){super();this._notebookEditor=u,this._itemFactory=a,this._visibleCells=new Map,this._observer=this._register(new D.NotebookVisibleCellObserver(this._notebookEditor)),this._register(this._observer.onDidChangeVisibleCells(this._updateVisibleCells,this)),this._updateEverything()}_updateEverything(){this._visibleCells.forEach(f.dispose),this._visibleCells.clear(),this._updateVisibleCells({added:this._observer.visibleCells,removed:[]})}_updateVisibleCells(u){const a=this._notebookEditor._getViewModel();if(!!a){for(const n of u.added)this._visibleCells.set(n.handle,this._itemFactory(a,n));for(const n of u.removed)this._visibleCells.get(n.handle)?.dispose(),this._visibleCells.delete(n.handle)}}dispose(){super.dispose(),this._visibleCells.forEach(f.dispose),this._visibleCells.clear()}}e.NotebookStatusBarController=i;let S=class extends f.Disposable{constructor(u,a){super();this._register(new i(u,(n,h)=>a.createInstance(s,n,h)))}};S.id="workbench.notebook.statusBar.execState",S=Ee([W(1,A.IInstantiationService)],S),e.ExecutionStateCellStatusBarContrib=S,(0,I.registerNotebookContribution)(S.id,S);let s=class La extends f.Disposable{constructor(u,a,n){super();this._notebookViewModel=u,this._cell=a,this._executionStateService=n,this._currentItemIds=[],this._update(),this._register(this._executionStateService.onDidChangeCellExecution(h=>{h.affectsCell(this._cell.uri)&&this._update()})),this._register(this._cell.model.onDidChangeInternalMetadata(()=>this._update()))}async _update(){const u=this._getItemsForCell();Array.isArray(u)&&(this._currentItemIds=this._notebookViewModel.deltaCellStatusBarItems(this._currentItemIds,[{handle:this._cell.handle,items:u}]))}_getItemsForCell(){const u=this._executionStateService.getCellExecution(this._cell.uri);if(this._currentExecutingStateTimer&&!u?.isPaused)return;const a=this._getItemForState(u,this._cell.internalMetadata);return u?.state===C.NotebookCellExecutionState.Executing&&(this._currentExecutingStateTimer=this._register((0,t.disposableTimeout)(()=>{const n=this._executionStateService.getCellExecution(this._cell.uri);this._currentExecutingStateTimer=void 0,n?.state!==C.NotebookCellExecutionState.Executing&&this._update()},La.MIN_SPINNER_TIME))),a?[a]:[]}_getItemForState(u,a){const n=u?.state,{lastRunSuccess:h}=a;if(!n&&h)return{text:`$(${v.successStateIcon.id})`,color:(0,k.themeColorFromId)(w.cellStatusIconSuccess),tooltip:(0,_.localize)(0,null),alignment:1,priority:Number.MAX_SAFE_INTEGER};if(!n&&h===!1)return{text:`$(${v.errorStateIcon.id})`,color:(0,k.themeColorFromId)(w.cellStatusIconError),tooltip:(0,_.localize)(1,null),alignment:1,priority:Number.MAX_SAFE_INTEGER};if(n===C.NotebookCellExecutionState.Pending||n===C.NotebookCellExecutionState.Unconfirmed)return{text:`$(${v.pendingStateIcon.id})`,tooltip:(0,_.localize)(2,null),alignment:1,priority:Number.MAX_SAFE_INTEGER};if(n===C.NotebookCellExecutionState.Executing)return{text:`$(${(u?.didPause?v.executingStateIcon:k.ThemeIcon.modify(v.executingStateIcon,"spin")).id})`,tooltip:(0,_.localize)(3,null),alignment:1,priority:Number.MAX_SAFE_INTEGER}}dispose(){super.dispose(),this._notebookViewModel.deltaCellStatusBarItems(this._currentItemIds,[{handle:this._cell.handle,items:[]}])}};s.MIN_SPINNER_TIME=500,s=Ee([W(2,o.INotebookExecutionStateService)],s);let l=class extends f.Disposable{constructor(u,a){super();this._register(new i(u,(n,h)=>a.createInstance(r,n,h)))}};l.id="workbench.notebook.statusBar.execTimer",l=Ee([W(1,A.IInstantiationService)],l),e.TimerCellStatusBarContrib=l,(0,I.registerNotebookContribution)(l.id,l);let r=class Ma extends f.Disposable{constructor(u,a,n){super();this._notebookViewModel=u,this._cell=a,this._executionStateService=n,this._currentItemIds=[],this._scheduler=this._register(new t.RunOnceScheduler(()=>this._update(),Ma.UPDATE_INTERVAL)),this._update(),this._register(this._cell.model.onDidChangeInternalMetadata(()=>this._update()))}async _update(){let u;const a=this._executionStateService.getCellExecution(this._cell.uri),n=a?.state;if(a?.didPause)u=void 0;else if(n===C.NotebookCellExecutionState.Executing){const g=this._cell.internalMetadata.runStartTime,d=this._cell.internalMetadata.runStartTimeAdjustment;typeof g=="number"&&(u=this._getTimeItem(g,Date.now(),d),this._scheduler.schedule())}else if(!n){const g=this._cell.internalMetadata.runStartTime,d=this._cell.internalMetadata.runEndTime;typeof g=="number"&&typeof d=="number"&&(u=this._getTimeItem(g,d))}const h=u?[u]:[];this._currentItemIds=this._notebookViewModel.deltaCellStatusBarItems(this._currentItemIds,[{handle:this._cell.handle,items:h}])}_getTimeItem(u,a,n=0){const h=a-u+n;return{text:c(h),alignment:1,priority:Number.MAX_SAFE_INTEGER-1}}dispose(){super.dispose(),this._notebookViewModel.deltaCellStatusBarItems(this._currentItemIds,[{handle:this._cell.handle,items:[]}])}};r.UPDATE_INTERVAL=100,r=Ee([W(2,o.INotebookExecutionStateService)],r)});var Ot=this&&this.__classPrivateFieldSet||function(Q,e,t,f,_){if(f==="m")throw new TypeError("Private method is not writable");if(f==="a"&&!_)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?Q!==e||!_:!e.has(Q))throw new TypeError("Cannot write private member to an object whose class did not declare it");return f==="a"?_.call(Q,t):_?_.value=t:e.set(Q,t),t},dt=this&&this.__classPrivateFieldGet||function(Q,e,t,f){if(t==="a"&&!f)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?Q!==e||!f:!e.has(Q))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?f:t==="a"?f.call(Q):f?f.value:e.get(Q)};define(ne[2618],re([1,0,1601,10,6,2,72,165,7,5,24,27,32,12,166,434,805,267,290,506,59,910,238,126,42,16,38,792,64,8,490,163,37,73,423,39,318,354,313,247,173,433,406,560,113,158,153,1095]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H,K,G,q){"use strict";var Z,j,X,Y,$,J,ee,te,se,ie,ce,le,ae,ue,oe,fe,pe,me,be,Ce,ve,he,ge,de,Se,we,ye,ke,Ie,Te,De,_e,Re,Ne,xe,Ae,Le,Me,We,Ve,Ue,et;Object.defineProperty(e,"__esModule",{value:!0}),e.InteractiveEditor=void 0;const Ze="interactiveInputDecoration",Fe="InteractiveEditorViewState";var Qe;(function(rt){rt[rt.Initial=0]="Initial",rt[rt.StickyToBottom=1]="StickyToBottom"})(Qe||(Qe={}));const qe=8,Be=10,Ke=8;let Xe=class Pa extends i.EditorPane{constructor(it,at,ft,vt,Dt,kt,At,St,He,ct,lt,ut,pt,Et,yt,mt){super(Pa.ID,it,at,ft);Z.add(this),j.set(this,void 0),X.set(this,void 0),Y.set(this,void 0),$.set(this,{value:void 0}),J.set(this,void 0),ee.set(this,void 0),te.set(this,void 0),se.set(this,void 0),ie.set(this,void 0),ce.set(this,void 0),le.set(this,void 0),ae.set(this,void 0),ue.set(this,void 0),oe.set(this,void 0),fe.set(this,void 0),pe.set(this,void 0),me.set(this,void 0),be.set(this,void 0),Ce.set(this,void 0),ve.set(this,this._register(new A.DisposableStore)),he.set(this,void 0),ge.set(this,void 0),de.set(this,void 0),Se.set(this,this._register(new A.DisposableStore)),we.set(this,this._register(new _.Emitter)),Re.set(this,void 0),Ne.set(this,new A.DisposableStore),xe.set(this,0),Ot(this,le,vt,"f"),Ot(this,ce,Dt,"f"),Ot(this,ue,kt,"f"),Ot(this,oe,St,"f"),Ot(this,ae,He,"f"),Ot(this,fe,ct,"f"),Ot(this,pe,ut,"f"),Ot(this,me,pt,"f"),Ot(this,be,Et,"f"),Ot(this,Ce,mt,"f"),Ot(this,ge,new T.NotebookOptions(lt,mt,{cellToolbarInteraction:"hover",globalToolbar:!0,defaultCellCollapseConfig:{codeCell:{inputCollapsed:!0}}}),"f"),Ot(this,de,this.getEditorMemento(Et,yt,Fe),"f"),At.registerDecorationType("interactive-decoration",Ze,{}),this._register(dt(this,fe,"f").onDidUpdateKeybindings(dt(this,Z,"m",et),this))}get onDidFocus(){return dt(this,we,"f").event}createEditor(it){Ot(this,j,f.append(it,f.$(".interactive-editor")),"f"),dt(this,j,"f").style.position="relative",Ot(this,Y,f.append(dt(this,j,"f"),f.$(".notebook-editor-container")),"f"),Ot(this,J,f.append(dt(this,j,"f"),f.$(".input-cell-container")),"f"),dt(this,J,"f").style.position="absolute",dt(this,J,"f").style.height=`${dt(this,Z,"a",ye)}px`,Ot(this,ee,f.append(dt(this,J,"f"),f.$(".input-focus-indicator")),"f"),Ot(this,te,f.append(dt(this,J,"f"),f.$(".run-button-container")),"f"),dt(this,Z,"m",Ie).call(this,dt(this,te,"f")),Ot(this,se,f.append(dt(this,J,"f"),f.$(".input-editor-container")),"f"),dt(this,Z,"m",Te).call(this)}saveState(){dt(this,Z,"m",De).call(this,this.input),super.saveState()}getViewState(){const it=this.input;if(it instanceof s.InteractiveEditorInput)return dt(this,Z,"m",De).call(this,it),dt(this,Z,"m",_e).call(this,it)}async setInput(it,at,ft,vt){const Dt=this.group,kt=it.notebookEditorInput;if(dt(this,$,"f").value&&dt(this,$,"f").value.onWillHide(),dt(this,ie,"f")&&dt(this,ie,"f").dispose(),dt(this,ve,"f").clear(),Ot(this,$,dt(this,le,"f").invokeFunction(dt(this,ce,"f").retrieveWidget,Dt,kt,{isEmbedded:!0,isReadOnly:!0,contributions:l.NotebookEditorExtensionsRegistry.getSomeEditorContributions([a.ExecutionStateCellStatusBarContrib.id,a.TimerCellStatusBarContrib.id]),menuIds:{notebookToolbar:d.MenuId.InteractiveToolbar,cellTitleToolbar:d.MenuId.InteractiveCellTitle,cellInsertToolbar:d.MenuId.NotebookCellBetween,cellTopInsertToolbar:d.MenuId.NotebookCellListTop,cellExecuteToolbar:d.MenuId.InteractiveCellExecute,cellExecutePrimary:void 0},cellEditorContributions:L.EditorExtensionsRegistry.getSomeEditorContributions([N.SelectionClipboardContributionID,B.ContextMenuController.ID,U.ModesHoverController.ID,H.MarkerController.ID]),options:dt(this,ge,"f")}),"f"),Ot(this,ie,dt(this,le,"f").createInstance(D.CodeEditorWidget,dt(this,se,"f"),{...(0,S.getSimpleEditorOptions)(),glyphMargin:!0,padding:{top:Ke,bottom:Ke},hover:{enabled:!0}},{isSimpleWidget:!1,contributions:L.EditorExtensionsRegistry.getSomeEditorContributions([M.MenuPreventer.ID,N.SelectionClipboardContributionID,B.ContextMenuController.ID,P.SuggestController.ID,V.SnippetController2.ID,z.TabCompletionController.ID,U.ModesHoverController.ID,H.MarkerController.ID])}),"f"),dt(this,he,"f")){dt(this,Y,"f").style.height=`${dt(this,he,"f").height-dt(this,Z,"a",ye)}px`,dt(this,$,"f").value.layout(dt(this,he,"f").with(dt(this,he,"f").width,dt(this,he,"f").height-dt(this,Z,"a",ye)),dt(this,Y,"f"));const{codeCellLeftMargin:lt,cellRunGutter:ut}=dt(this,ge,"f").getLayoutConfiguration(),pt=lt+ut,Et=Math.min(dt(this,he,"f").height/2,dt(this,Z,"a",ke));dt(this,ie,"f").layout(dt(this,Z,"m",Ue).call(this,dt(this,he,"f").width-pt-Be,Et)),dt(this,ee,"f").style.height=`${dt(this,Z,"a",ke)}px`,dt(this,J,"f").style.top=`${dt(this,he,"f").height-dt(this,Z,"a",ye)}px`,dt(this,J,"f").style.width=`${dt(this,he,"f").width}px`}await super.setInput(it,at,ft,vt);const At=await it.resolve();if(At===null)throw new Error("?");dt(this,$,"f").value?.setParentContextKeyService(dt(this,ue,"f"));const St=at?.viewState??dt(this,Z,"m",_e).call(this,it);await dt(this,$,"f").value.setModel(At.notebook,St?.notebook),At.notebook.setCellCollapseDefault(dt(this,ge,"f").getCellCollapseDefault()),dt(this,$,"f").value.setOptions({isReadOnly:!0}),dt(this,ve,"f").add(dt(this,$,"f").value.onDidFocusWidget(()=>dt(this,we,"f").fire())),dt(this,ve,"f").add(At.notebook.onDidChangeContent(()=>{At.setDirty(!1)})),dt(this,ve,"f").add(dt(this,ge,"f").onDidChangeOptions(lt=>{(lt.compactView||lt.focusIndicator)&&(dt(this,X,"f")?.remove(),dt(this,Z,"m",Te).call(this)),dt(this,he,"f")&&this.isVisible()&&this.layout(dt(this,he,"f")),lt.interactiveWindowCollapseCodeCells&&At.notebook.setCellCollapseDefault(dt(this,ge,"f").getCellCollapseDefault())}));const He=await it.resolveInput(dt(this,$,"f").value?.activeKernel?.supportedLanguages[0]??h.PLAINTEXT_LANGUAGE_ID);dt(this,ie,"f").setModel(He),St?.input&&dt(this,ie,"f").restoreViewState(St.input),dt(this,ve,"f").add(dt(this,ie,"f").onDidFocusEditorWidget(()=>dt(this,we,"f").fire())),dt(this,ve,"f").add(dt(this,ie,"f").onDidContentSizeChange(lt=>{!lt.contentHeightChanged||dt(this,he,"f")&&dt(this,Z,"m",Ve).call(this,dt(this,he,"f"))})),dt(this,ve,"f").add(dt(this,oe,"f").onDidChangeNotebookAffinity(dt(this,Z,"m",We),this)),dt(this,ve,"f").add(dt(this,oe,"f").onDidChangeSelectedNotebooks(dt(this,Z,"m",We),this)),dt(this,ve,"f").add(this.themeService.onDidColorThemeChange(()=>{this.isVisible()&&dt(this,Z,"m",et).call(this)})),dt(this,ve,"f").add(dt(this,ie,"f").onDidChangeModelContent(()=>{this.isVisible()&&dt(this,Z,"m",et).call(this)})),dt(this,$,"f").value?.hasModel()&&dt(this,Z,"m",Le).call(this,dt(this,$,"f").value);const ct=b.INTERACTIVE_INPUT_CURSOR_BOUNDARY.bindTo(dt(this,ue,"f"));it.resource&&it.historyService.has(it.resource)?ct.set("top"):ct.set("none"),dt(this,ve,"f").add(dt(this,ie,"f").onDidChangeCursorPosition(({position:lt})=>{const ut=dt(this,ie,"f")._getViewModel(),pt=ut.getLineCount(),Et=ut.getLineContent(pt).length+1,yt=ut.coordinatesConverter.convertModelPositionToViewPosition(lt),mt=yt.lineNumber===1&&yt.column===1,It=yt.lineNumber===pt&&yt.column===Et;mt?It?ct.set("both"):ct.set("top"):It?ct.set("bottom"):ct.set("none")})),dt(this,ve,"f").add(He.onDidChangeContent(()=>{const lt=He.getValue();this.input?.resource&<!==""&&this.input.historyService.replaceLast(this.input.resource,lt)})),dt(this,Z,"m",We).call(this)}layout(it){dt(this,j,"f").classList.toggle("mid-width",it.width<1e3&&it.width>=600),dt(this,j,"f").classList.toggle("narrow-width",it.width<600),Ot(this,he,it,"f"),!!dt(this,$,"f").value&&(dt(this,Y,"f").style.height=`${dt(this,he,"f").height-dt(this,Z,"a",ye)}px`,dt(this,Z,"m",Ve).call(this,it))}focus(){dt(this,ie,"f").focus()}focusHistory(){dt(this,$,"f").value.focus()}setEditorVisible(it,at){super.setEditorVisible(it,at),at&&(dt(this,Se,"f").clear(),dt(this,Se,"f").add(at.onWillCloseEditor(ft=>dt(this,Z,"m",De).call(this,ft.editor)))),it||(dt(this,Z,"m",De).call(this,this.input),this.input&&dt(this,$,"f").value&&dt(this,$,"f").value.onWillHide())}clearInput(){dt(this,$,"f").value&&(dt(this,Z,"m",De).call(this,this.input),dt(this,$,"f").value.onWillHide()),dt(this,ie,"f")&&dt(this,ie,"f").dispose(),Ot(this,$,{value:void 0},"f"),dt(this,ve,"f").clear(),super.clearInput()}getControl(){return{notebookEditor:dt(this,$,"f").value,codeEditor:dt(this,ie,"f")}}};j=new WeakMap,X=new WeakMap,Y=new WeakMap,$=new WeakMap,J=new WeakMap,ee=new WeakMap,te=new WeakMap,se=new WeakMap,ie=new WeakMap,ce=new WeakMap,le=new WeakMap,ae=new WeakMap,ue=new WeakMap,oe=new WeakMap,fe=new WeakMap,pe=new WeakMap,me=new WeakMap,be=new WeakMap,Ce=new WeakMap,ve=new WeakMap,he=new WeakMap,ge=new WeakMap,de=new WeakMap,Se=new WeakMap,we=new WeakMap,Re=new WeakMap,Ne=new WeakMap,xe=new WeakMap,Z=new WeakSet,ye=function(){return 19+2+qe*2+Ke*2},ke=function(){return 19+Ke*2},Ie=function(it){const at=this._register(dt(this,pe,"f").createMenu(d.MenuId.InteractiveInputExecute,dt(this,ue,"f"))),ft=this._register(new R.ToolBar(it,dt(this,me,"f"),{getKeyBinding:At=>dt(this,fe,"f").lookupKeybinding(At.id),actionViewItemProvider:At=>(0,x.createActionViewItem)(dt(this,le,"f"),At),renderDropdownAsChildElement:!0})),vt=[],Dt=[],kt={primary:vt,secondary:Dt};(0,x.createAndFillInActionBarActions)(at,{shouldForwardArgs:!0},kt),ft.setActions([...vt,...Dt])},Te=function(){Ot(this,X,f.createStyleSheet(dt(this,j,"f")),"f");const it=[],{focusIndicator:at,codeCellLeftMargin:ft,cellRunGutter:vt}=dt(this,ge,"f").getLayoutConfiguration(),Dt=ft+vt;it.push(` .interactive-editor .input-cell-container { padding: ${qe}px ${Be}px ${qe}px ${Dt}px; } `),at==="gutter"?it.push(` .interactive-editor .input-cell-container:focus-within .input-focus-indicator::before { border-color: var(--notebook-focused-cell-border-color) !important; } .interactive-editor .input-focus-indicator::before { border-color: var(--notebook-inactive-focused-cell-border-color) !important; } .interactive-editor .input-cell-container .input-focus-indicator { display: block; top: ${qe}px; } .interactive-editor .input-cell-container { border-top: 1px solid var(--notebook-inactive-focused-cell-border-color); } `):it.push(` .interactive-editor .input-cell-container { border-top: 1px solid var(--notebook-inactive-focused-cell-border-color); } .interactive-editor .input-cell-container .input-focus-indicator { display: none; } `),it.push(` .interactive-editor .input-cell-container .run-button-container { width: ${vt}px; left: ${ft}px; margin-top: ${Ke-2}px; } `),dt(this,X,"f").textContent=it.join(` `)},De=function(it){if(this.group&&dt(this,$,"f").value&&it instanceof s.InteractiveEditorInput){if(dt(this,$,"f").value.isDisposed)return;const at=dt(this,$,"f").value.getEditorViewState(),ft=dt(this,ie,"f").saveViewState();dt(this,de,"f").saveEditorState(this.group,it.notebookEditorInput.resource,{notebook:at,input:ft})}},_e=function(it){let at;if(this.group&&(at=dt(this,de,"f").loadEditorState(this.group,it.notebookEditorInput.resource)),at)return at;for(const ft of dt(this,be,"f").getGroups(1))if(ft.activeEditorPane!==this&&ft.activeEditorPane===this&&ft.activeEditor?.matches(it)){const vt=dt(this,$,"f").value?.getEditorViewState(),Dt=dt(this,ie,"f").saveViewState();return{notebook:vt,input:Dt}}},Ae=function(it,at){const ft=it.visibleRanges;return it.getCellIndex(at)===Math.max(...ft.map(Dt=>Dt.end))},Le=function(it){dt(this,ve,"f").add(it.textModel.onWillAddRemoveCells(at=>{const ft=it.cellAt(it.getLength()-1);ft&&dt(this,Z,"m",Ae).call(this,it,ft)?Ot(this,xe,1,"f"):Ot(this,xe,0,"f")})),dt(this,ve,"f").add(it.onDidScroll(()=>{const at=it.cellAt(it.getLength()-1);at&&dt(this,Z,"m",Ae).call(this,it,at)?Ot(this,xe,1,"f"):Ot(this,xe,0,"f")})),dt(this,ve,"f").add(it.textModel.onDidChangeContent(at=>{for(let ft=0;ft<at.rawEvents.length;ft++)if(at.rawEvents[ft].kind===E.NotebookCellsChangeType.ModelChange&&dt(this,$,"f").value?.hasModel()){const Dt=dt(this,$,"f").value.cellAt(dt(this,$,"f").value.getLength()-1);Dt!==dt(this,Re,"f")&&(dt(this,Ne,"f").clear(),Ot(this,Re,Dt,"f"),dt(this,Z,"m",Me).call(this))}}))},Me=function(){!dt(this,Re,"f")||dt(this,Ne,"f").add(dt(this,Re,"f").onDidChangeLayout(it=>{it.totalHeight!==void 0&&(dt(this,Re,"f")instanceof F.CodeCellViewModel&&it.outputHeight===void 0&&!dt(this,$,"f").value.isScrolledToBottom()||dt(this,xe,"f")===1&&(dt(this,Re,"f")&&dt(this,Ce,"f").getCellExecution(dt(this,Re,"f").uri)?.state===E.NotebookCellExecutionState.Executing||dt(this,Ne,"f").add(f.scheduleAtNextAnimationFrame(()=>{dt(this,xe,"f")===1&&dt(this,$,"f").value.scrollToBottom()}))))}))},We=function(){const it=dt(this,$,"f").value?.textModel,at=dt(this,ie,"f").getModel();if(it&&at){const ft=dt(this,oe,"f").getMatchingKernel(it),vt=ft.selected??ft.suggestions[0];if(vt){const Dt=vt.supportedLanguages[0],kt=Dt?dt(this,ae,"f").createById(Dt).languageId:h.PLAINTEXT_LANGUAGE_ID;at.setMode(kt),q.NOTEBOOK_KERNEL.bindTo(dt(this,ue,"f")).set(vt.id)}}dt(this,Z,"m",et).call(this)},Ve=function(it){const at=dt(this,ie,"f").hasModel()?dt(this,ie,"f").getContentHeight():dt(this,Z,"a",ke),ft=Math.min(it.height/2,at),{codeCellLeftMargin:vt,cellRunGutter:Dt}=dt(this,ge,"f").getLayoutConfiguration(),kt=vt+Dt,At=ft+qe*2;dt(this,Y,"f").style.height=`${it.height-At}px`,dt(this,$,"f").value.layout(it.with(it.width,it.height-At),dt(this,Y,"f")),dt(this,ie,"f").layout(dt(this,Z,"m",Ue).call(this,it.width-kt-Be,ft)),dt(this,ee,"f").style.height=`${at}px`,dt(this,J,"f").style.top=`${it.height-At}px`,dt(this,J,"f").style.width=`${it.width}px`},Ue=function(it,at){return new f.Dimension(Math.max(0,it),Math.max(0,at))},et=function(){if(!dt(this,ie,"f")||!dt(this,ie,"f").hasModel())return;const it=dt(this,ie,"f").getModel(),at=[];if(it?.getValueLength()===0){const ft=(0,o.resolveColorValue)(o.editorForeground,this.themeService.getColorTheme())?.transparent(.4),vt=it.getLanguageId(),Dt=dt(this,fe,"f").lookupKeybinding("interactive.execute",dt(this,ue,"f"))?.getLabel(),kt=t.localize(0,null,vt,Dt??"ctrl+enter");at.push({range:{startLineNumber:0,endLineNumber:0,startColumn:0,endColumn:1},renderOptions:{after:{contentText:kt,color:ft?ft.toString():void 0}}})}dt(this,ie,"f").setDecorations("interactive-decoration",Ze,at)},Xe.ID="workbench.editor.interactive",Xe=Ee([W(0,C.ITelemetryService),W(1,c.IThemeService),W(2,v.IStorageService),W(3,w.IInstantiationService),W(4,r.INotebookEditorService),W(5,I.IContextKeyService),W(6,k.ICodeEditorService),W(7,n.INotebookKernelService),W(8,g.ILanguageService),W(9,m.IKeybindingService),W(10,y.IConfigurationService),W(11,d.IMenuService),W(12,O.IContextMenuService),W(13,u.IEditorGroupsService),W(14,K.ITextResourceConfigurationService),W(15,G.INotebookExecutionStateService)],Xe),e.InteractiveEditor=Xe,(0,c.registerThemingParticipant)((rt,it)=>{it.addRule(` .interactive-editor .input-cell-container:focus-within .input-editor-container .monaco-editor { outline: solid 1px var(--notebook-focused-cell-border-color); } .interactive-editor .input-cell-container .input-editor-container .monaco-editor { outline: solid 1px var(--notebook-inactive-focused-cell-border-color); } .interactive-editor .input-cell-container .input-focus-indicator { top: ${qe}px; } `);const at=rt.getColor(p.cellEditorBackground)??rt.getColor(o.editorBackground);at&&it.addRule(`.interactive-editor .input-cell-container .monaco-editor-background, .interactive-editor .input-cell-container .margin-view-overlays { background: ${at}; }`)})}),define(ne[911],re([1,0,1644,10,24,27,12,506,30,492,5,2615,7,32,807,8,263,77,356,6,2,166,64,11,89,2185,884,797,393,490,158]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookTextDiffEditor=void 0;const R=f.$;let O=class mn extends a.EditorPane{constructor(F,L,M,N,B,P,V,z){super(mn.ID,P,L,V);this.instantiationService=F,this.contextKeyService=M,this.notebookEditorWorkerService=N,this.configurationService=B,this.creationOptions=(0,D.getDefaultNotebookCreationOptions)(),this._dimension=null,this._diffElementViewModels=[],this._modifiedWebview=null,this._originalWebview=null,this._webviewTransparentCover=null,this._onMouseUp=this._register(new p.Emitter),this.onMouseUp=this._onMouseUp.event,this._model=null,this._modifiedResourceDisposableStore=this._register(new u.DisposableStore),this._insetModifyQueueByOutputId=new h.SequencerByKey,this._onDidDynamicOutputRendered=this._register(new p.Emitter),this.onDidDynamicOutputRendered=this._onDidDynamicOutputRendered.event,this._localStore=this._register(new u.DisposableStore),this._isDisposed=!1,this.pendingLayouts=new WeakMap,this._notebookOptions=new y.NotebookOptions(this.configurationService,z),this._register(this._notebookOptions);const U=this.configurationService.getValue("editor");this._fontInfo=E.FontMeasurements.readFontInfo(s.BareFontInfo.createFromRawSettings(U,l.PixelRatio.value)),this._revealFirst=!0}get textModel(){return this._model?.modified.notebook}get notebookOptions(){return this._notebookOptions}get isDisposed(){return this._isDisposed}toggleNotebookCellSelection(F){}focusNotebookCell(F,L){}focusNextNotebookCell(F,L){}updateOutputHeight(F,L,M,N){const B=F.diffElement,P=this.getCellByInfo(F),V=P.outputsViewModels.indexOf(L);if(B instanceof w.SideBySideDiffElementViewModel){const z=n.CellUri.parse(F.cellUri);if(!z)return;B.updateOutputHeight(z.notebook.toString()===this._model?.original.resource.toString()?r.DiffSide.Original:r.DiffSide.Modified,V,M)}else B.updateOutputHeight(B.type==="insert"?r.DiffSide.Modified:r.DiffSide.Original,V,M);N&&this._onDidDynamicOutputRendered.fire({cell:P,output:L})}setMarkupCellEditState(F,L){}didStartDragMarkupCell(F,L){}didDragMarkupCell(F,L){}didEndDragMarkupCell(F){}didDropMarkupCell(F){}createEditor(F){this._rootElement=f.append(F,f.$(".notebook-text-diff-editor")),this._overflowContainer=document.createElement("div"),this._overflowContainer.classList.add("notebook-overflow-widget-container","monaco-editor"),f.append(F,this._overflowContainer);const L=[this.instantiationService.createInstance(C.CellDiffSingleSideRenderer,this),this.instantiationService.createInstance(C.CellDiffSideBySideRenderer,this)];this._list=this.instantiationService.createInstance(C.NotebookTextDiffList,"NotebookTextDiff",this._rootElement,this.instantiationService.createInstance(C.NotebookCellTextDiffListDelegate),L,this.contextKeyService,{setRowLineHeight:!1,setRowHeight:!1,supportDynamicHeights:!0,horizontalScrolling:!1,keyboardSupport:!1,mouseSupport:!0,multipleSelectionSupport:!1,enableKeyboardNavigation:!0,additionalScrollHeight:0,styleController:M=>this._list,overrideStyles:{listBackground:c.editorBackground,listActiveSelectionBackground:c.editorBackground,listActiveSelectionForeground:c.foreground,listFocusAndSelectionBackground:c.editorBackground,listFocusAndSelectionForeground:c.foreground,listFocusBackground:c.editorBackground,listFocusForeground:c.foreground,listHoverForeground:c.foreground,listHoverBackground:c.editorBackground,listHoverOutline:c.focusBorder,listFocusOutline:c.focusBorder,listInactiveSelectionBackground:c.editorBackground,listInactiveSelectionForeground:c.foreground,listInactiveFocusBackground:c.editorBackground,listInactiveFocusOutline:c.editorBackground},accessibilityProvider:{getAriaLabel(){return null},getWidgetAriaLabel(){return t.localize(0,null)}}}),this._register(this._list),this._register(this._list.onMouseUp(M=>{M.element&&this._onMouseUp.fire({event:M.browserEvent,target:M.element})})),this._webviewTransparentCover=f.append(this._list.rowsContainer,R(".webview-cover")),this._webviewTransparentCover.style.display="none",this._register(f.addStandardDisposableGenericMouseDownListener(this._overflowContainer,M=>{M.target.classList.contains("slider")&&this._webviewTransparentCover&&(this._webviewTransparentCover.style.display="block")})),this._register(f.addStandardDisposableGenericMouseUpListener(this._overflowContainer,()=>{this._webviewTransparentCover&&(this._webviewTransparentCover.style.display="none")})),this._register(this._list.onDidScroll(M=>{this._webviewTransparentCover.style.top=`${M.scrollTop}px`}))}_updateOutputsOffsetsInWebview(F,L,M,N,B){if(M.element.style.height=`${L}px`,M.insetMapping){const P=[],V=[];M.insetMapping.forEach((z,U)=>{const H=N(z.cellInfo.diffElement);if(!(!H||this._list.indexOf(z.cellInfo.diffElement)===void 0))if(H.outputsViewModels.indexOf(U)<0)V.push(U);else{const G=this._list.getAbsoluteTopOfElement(z.cellInfo.diffElement),q=H.outputsViewModels.indexOf(U),Z=z.cellInfo.diffElement.getOutputOffsetInCell(B,q);P.push({cell:H,output:U,cellTop:G,outputOffset:Z,forceDisplay:!1})}}),M.removeInsets(V),P.length&&M.updateScrollTops(P,[])}}async setInput(F,L,M,N){await super.setInput(F,L,M,N);const B=await F.resolve();this._model!==B&&(this._detachModel(),this._model=B,this._attachModel()),this._model=B,this._model!==null&&(this._revealFirst=!0,this._modifiedResourceDisposableStore.clear(),this._layoutCancellationTokenSource=new I.CancellationTokenSource,this._modifiedResourceDisposableStore.add(p.Event.any(this._model.original.notebook.onDidChangeContent,this._model.modified.notebook.onDidChangeContent)(P=>{this._model!==null&&(this._layoutCancellationTokenSource?.dispose(),this._layoutCancellationTokenSource=new I.CancellationTokenSource,this.updateLayout(this._layoutCancellationTokenSource.token))})),await this._createOriginalWebview((0,g.generateUuid)(),this._model.original.resource),this._originalWebview&&this._modifiedResourceDisposableStore.add(this._originalWebview),await this._createModifiedWebview((0,g.generateUuid)(),this._model.modified.resource),this._modifiedWebview&&this._modifiedResourceDisposableStore.add(this._modifiedWebview),await this.updateLayout(this._layoutCancellationTokenSource.token))}_detachModel(){this._localStore.clear(),this._originalWebview?.dispose(),this._originalWebview?.element.remove(),this._originalWebview=null,this._modifiedWebview?.dispose(),this._modifiedWebview?.element.remove(),this._modifiedWebview=null,this._modifiedResourceDisposableStore.clear(),this._list.clear()}_attachModel(){this._eventDispatcher=new b.NotebookDiffEditorEventDispatcher;const F=()=>{f.scheduleAtNextAnimationFrame(()=>{this._isDisposed||(this._modifiedWebview&&this._updateOutputsOffsetsInWebview(this._list.scrollTop,this._list.scrollHeight,this._modifiedWebview,L=>L.modified,r.DiffSide.Modified),this._originalWebview&&this._updateOutputsOffsetsInWebview(this._list.scrollTop,this._list.scrollHeight,this._originalWebview,L=>L.original,r.DiffSide.Original))})};this._localStore.add(this._list.onDidChangeContentHeight(()=>{F()})),this._localStore.add(this._eventDispatcher.onDidChangeCellLayout(()=>{F()}))}async _createModifiedWebview(F,L){this._modifiedWebview&&this._modifiedWebview.dispose(),this._modifiedWebview=this.instantiationService.createInstance(m.BackLayerWebView,this,F,L,{...this._notebookOptions.computeDiffWebviewOptions(),fontFamily:this._generateFontFamily()},void 0),this._list.rowsContainer.insertAdjacentElement("afterbegin",this._modifiedWebview.element),await this._modifiedWebview.createWebview(),this._modifiedWebview.element.style.width="calc(50% - 16px)",this._modifiedWebview.element.style.left="calc(50%)"}_generateFontFamily(){return this._fontInfo?.fontFamily??'"SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace'}async _createOriginalWebview(F,L){this._originalWebview&&this._originalWebview.dispose(),this._originalWebview=this.instantiationService.createInstance(m.BackLayerWebView,this,F,L,{...this._notebookOptions.computeDiffWebviewOptions(),fontFamily:this._generateFontFamily()},void 0),this._list.rowsContainer.insertAdjacentElement("afterbegin",this._originalWebview.element),await this._originalWebview.createWebview(),this._originalWebview.element.style.width="calc(50% - 16px)",this._originalWebview.element.style.left="16px"}async updateLayout(F){if(!this._model)return;const L=await this.notebookEditorWorkerService.computeDiff(this._model.original.resource,this._model.modified.resource);if(F.isCancellationRequested)return;mn.prettyChanges(this._model,L.cellsDiff);const{viewModels:M,firstChangeIndex:N}=mn.computeDiff(this.instantiationService,this.configurationService,this._model,this._eventDispatcher,L);this._isViewModelTheSame(M)||(this._originalWebview?.removeInsets([...this._originalWebview?.insetMapping.keys()]),this._modifiedWebview?.removeInsets([...this._modifiedWebview?.insetMapping.keys()]),this._setViewModel(M)),this._revealFirst&&N!==-1&&N<this._list.length&&(this._revealFirst=!1,this._list.setFocus([N]),this._list.reveal(N,.3))}_isViewModelTheSame(F){let L=!0;if(this._diffElementViewModels.length===F.length)for(let M=0;M<F.length;M++){const N=this._diffElementViewModels[M],B=F[M];if(N.original?.textModel.getHashValue()!==B.original?.textModel.getHashValue()||N.modified?.textModel.getHashValue()!==B.modified?.textModel.getHashValue()){L=!1;break}}else L=!1;return L}_setViewModel(F){this._diffElementViewModels=F,this._list.splice(0,this._list.length,this._diffElementViewModels)}static prettyChanges(F,L){const M=L.changes;for(let N=0;N<L.changes.length-1;N++){const B=M[N],P=M[N+1],V=B.originalStart,z=B.modifiedStart;B.originalLength===1&&B.modifiedLength===0&&P.originalStart===V+2&&P.originalLength===0&&P.modifiedStart===z+1&&P.modifiedLength===1&&F.original.notebook.cells[V].getHashValue()===F.modified.notebook.cells[z+1].getHashValue()&&F.original.notebook.cells[V+1].getHashValue()===F.modified.notebook.cells[z].getHashValue()&&(B.originalStart=V,B.originalLength=0,B.modifiedStart=z,B.modifiedLength=1,P.originalStart=V+1,P.originalLength=1,P.modifiedStart=z+2,P.modifiedLength=0,N++)}}static computeDiff(F,L,M,N,B){const P=B.cellsDiff.changes,V=[],z=M.original.notebook,U=M.modified.notebook;let H=0,K=0,G=-1;const q={metadataStatusHeight:L.getValue("notebook.diff.ignoreMetadata")?0:25,outputStatusHeight:L.getValue("notebook.diff.ignoreOutputs")||!!U.transientOptions.transientOutputs?0:25};for(let Z=0;Z<P.length;Z++){const j=P[Z];for(let Y=0;Y<j.originalStart-H;Y++){const $=z.cells[H+Y],J=U.cells[K+Y];$.getHashValue()===J.getHashValue()?V.push(new w.SideBySideDiffElementViewModel(M.modified.notebook,M.original.notebook,F.createInstance(d.DiffNestedCellViewModel,$),F.createInstance(d.DiffNestedCellViewModel,J),"unchanged",N,q)):(G===-1&&(G=V.length),V.push(new w.SideBySideDiffElementViewModel(M.modified.notebook,M.original.notebook,F.createInstance(d.DiffNestedCellViewModel,$),F.createInstance(d.DiffNestedCellViewModel,J),"modified",N,q)))}const X=mn.computeModifiedLCS(F,j,z,U,N,q);X.length&&G===-1&&(G=V.length),V.push(...X),H=j.originalStart+j.originalLength,K=j.modifiedStart+j.modifiedLength}for(let Z=H;Z<z.cells.length;Z++)V.push(new w.SideBySideDiffElementViewModel(M.modified.notebook,M.original.notebook,F.createInstance(d.DiffNestedCellViewModel,z.cells[Z]),F.createInstance(d.DiffNestedCellViewModel,U.cells[Z-H+K]),"unchanged",N,q));return{viewModels:V,firstChangeIndex:G}}static computeModifiedLCS(F,L,M,N,B,P){const V=[],z=Math.min(L.originalLength,L.modifiedLength);for(let U=0;U<z;U++){const H=M.cells[L.originalStart+U].equal(N.cells[L.modifiedStart+U]);V.push(new w.SideBySideDiffElementViewModel(N,M,F.createInstance(d.DiffNestedCellViewModel,M.cells[L.originalStart+U]),F.createInstance(d.DiffNestedCellViewModel,N.cells[L.modifiedStart+U]),H?"unchanged":"modified",B,P))}for(let U=z;U<L.originalLength;U++)V.push(new w.SingleSideDiffElementViewModel(M,N,F.createInstance(d.DiffNestedCellViewModel,M.cells[L.originalStart+U]),void 0,"delete",B,P));for(let U=z;U<L.modifiedLength;U++)V.push(new w.SingleSideDiffElementViewModel(N,M,void 0,F.createInstance(d.DiffNestedCellViewModel,N.cells[L.modifiedStart+U]),"insert",B,P));return V}scheduleOutputHeightAck(F,L,M){const N=F.diffElement;let B=r.DiffSide.Original;if(N instanceof w.SideBySideDiffElementViewModel){const V=n.CellUri.parse(F.cellUri);if(!V)return;B=V.notebook.toString()===this._model?.original.resource.toString()?r.DiffSide.Original:r.DiffSide.Modified}else B=N.type==="insert"?r.DiffSide.Modified:r.DiffSide.Original;const P=B===r.DiffSide.Modified?this._modifiedWebview:this._originalWebview;f.scheduleAtNextAnimationFrame(()=>{P?.ackHeight([{cellId:F.cellId,outputId:L,height:M}])},10)}layoutNotebookCell(F,L){const M=(P,V)=>{this._list.updateElementHeight2(P,V)};this.pendingLayouts.has(F)&&this.pendingLayouts.get(F).dispose();let N;const B=f.scheduleAtNextAnimationFrame(()=>{this.pendingLayouts.delete(F),M(F,L),N()});return this.pendingLayouts.set(F,(0,u.toDisposable)(()=>{B.dispose(),N()})),new Promise(P=>{N=P})}setScrollTop(F){this._list.scrollTop=F}triggerScroll(F){this._list.triggerScrollFromMouseWheelEvent(F)}createOutput(F,L,M,N,B){this._insetModifyQueueByOutputId.queue(M.source.model.outputId+(B===r.DiffSide.Modified?"-right":"left"),async()=>{const P=B===r.DiffSide.Modified?this._modifiedWebview:this._originalWebview;if(!!P)if(P.insetMapping.has(M.source)){const V=this._list.getAbsoluteTopOfElement(F),z=L.outputsViewModels.indexOf(M.source),U=F.getOutputOffsetInCell(B,z);P.updateScrollTops([{cell:L,output:M.source,cellTop:V,outputOffset:U,forceDisplay:!0}],[])}else{const V=this._list.getAbsoluteTopOfElement(F);await P.createOutput({diffElement:F,cellHandle:L.handle,cellId:L.id,cellUri:L.uri},M,V,N())}})}updateMarkupCellHeight(){}getCellByInfo(F){return F.diffElement.getCellByUri(F.cellUri)}getCellById(F){throw new Error("Not implemented")}removeInset(F,L,M,N){this._insetModifyQueueByOutputId.queue(M.model.outputId+(N===r.DiffSide.Modified?"-right":"left"),async()=>{const B=N===r.DiffSide.Modified?this._modifiedWebview:this._originalWebview;!B||!B.insetMapping.has(M)||B.removeInsets([M])})}showInset(F,L,M,N){this._insetModifyQueueByOutputId.queue(M.model.outputId+(N===r.DiffSide.Modified?"-right":"left"),async()=>{const B=N===r.DiffSide.Modified?this._modifiedWebview:this._originalWebview;if(!B||!B.insetMapping.has(M))return;const P=this._list.getAbsoluteTopOfElement(F),V=L.outputsViewModels.indexOf(M),z=F.getOutputOffsetInCell(N,V);B.updateScrollTops([{cell:L,output:M,cellTop:P,outputOffset:z,forceDisplay:!0}],[])})}hideInset(F,L,M){this._modifiedWebview?.hideInset(M),this._originalWebview?.hideInset(M)}getDomNode(){return this._rootElement}getOverflowContainerDomNode(){return this._overflowContainer}getControl(){}setEditorVisible(F,L){super.setEditorVisible(F,L)}focus(){super.focus()}clearInput(){super.clearInput(),this._modifiedResourceDisposableStore.clear(),this._list?.splice(0,this._list?.length||0),this._model=null,this._diffElementViewModels=[]}deltaCellOutputContainerClassNames(F,L,M,N){F===r.DiffSide.Original?this._originalWebview?.deltaCellOutputContainerClassNames(L,M,N):this._modifiedWebview?.deltaCellOutputContainerClassNames(L,M,N)}getLayoutInfo(){if(!this._list)throw new Error("Editor is not initalized successfully");return{width:this._dimension.width,height:this._dimension.height,fontInfo:this._fontInfo,scrollHeight:this._list?.getScrollHeight()??0}}getCellOutputLayoutInfo(F){if(!this._model)throw new Error("Editor is not attached to model yet");const L=n.CellUri.parse(F.uri);if(!L)throw new Error("Nested cell in the diff editor has wrong Uri");const M=this._model.original.notebook.uri.toString()===L.notebook.toString(),N=this._diffElementViewModels.find(B=>{const P=M?B.original:B.modified;return P?P.uri.toString()===F.uri.toString():!1});if(!N)throw new Error("Nested cell in the diff editor does not match any diff element");return N.type==="unchanged"?this.getLayoutInfo():N.type==="insert"||N.type==="delete"?{width:this._dimension.width/2,height:this._dimension.height/2,fontInfo:this._fontInfo}:N.checkIfOutputsModified()?{width:this._dimension.width/2,height:this._dimension.height/2,fontInfo:this._fontInfo}:this.getLayoutInfo()}layout(F){this._rootElement.classList.toggle("mid-width",F.width<1e3&&F.width>=600),this._rootElement.classList.toggle("narrow-width",F.width<600),this._dimension=F,this._rootElement.style.height=`${F.height}px`,this._list?.layout(this._dimension.height,this._dimension.width),this._modifiedWebview&&(this._modifiedWebview.element.style.width="calc(50% - 16px)",this._modifiedWebview.element.style.left="calc(50%)"),this._originalWebview&&(this._originalWebview.element.style.width="calc(50% - 16px)",this._originalWebview.element.style.left="16px"),this._webviewTransparentCover&&(this._webviewTransparentCover.style.height=`${F.height}px`,this._webviewTransparentCover.style.width=`${F.width}px`),this._eventDispatcher?.emit([new b.NotebookDiffLayoutChangedEvent({width:!0,fontInfo:!0},this.getLayoutInfo())])}dispose(){this._isDisposed=!0,this._layoutCancellationTokenSource?.dispose(),super.dispose()}};O.ID=n.NOTEBOOK_DIFF_EDITOR_ID,O=Ee([W(0,v.IInstantiationService),W(1,k.IThemeService),W(2,o.IContextKeyService),W(3,i.INotebookEditorWorkerService),W(4,S.IConfigurationService),W(5,A.ITelemetryService),W(6,_.IStorageService),W(7,T.INotebookExecutionStateService)],O),e.NotebookTextDiffEditor=O,(0,k.registerThemingParticipant)((x,F)=>{const L=x.getColor(D.notebookCellBorder);L&&(F.addRule(`.notebook-text-diff-editor .cell-body .border-container .top-border { border-top: 1px solid ${L};}`),F.addRule(`.notebook-text-diff-editor .cell-body .border-container .bottom-border { border-top: 1px solid ${L};}`),F.addRule(`.notebook-text-diff-editor .cell-body .border-container .left-border { border-left: 1px solid ${L};}`),F.addRule(`.notebook-text-diff-editor .cell-body .border-container .right-border { border-right: 1px solid ${L};}`),F.addRule(`.notebook-text-diff-editor .cell-diff-editor-container .output-header-container, .notebook-text-diff-editor .cell-diff-editor-container .metadata-header-container { border-top: 1px solid ${L}; }`));const M=x.getColor(c.diffDiagonalFill);F.addRule(` .notebook-text-diff-editor .diagonal-fill { background-image: linear-gradient( -45deg, ${M} 12.5%, #0000 12.5%, #0000 50%, ${M} 50%, ${M} 62.5%, #0000 62.5%, #0000 100% ); background-size: 8px 8px; } `);const N=x.getColor(D.cellEditorBackground)??x.getColor(c.editorBackground);N&&F.addRule(`.notebook-text-diff-editor .cell-body .cell-diff-editor-container .source-container .monaco-editor .margin, .notebook-text-diff-editor .cell-body .cell-diff-editor-container .source-container .monaco-editor .monaco-editor-background { background: ${N}; }`);const B=x.getColor(c.diffInserted);B&&(F.addRule(` .monaco-workbench .notebook-text-diff-editor .cell-body.full .output-info-container.modified .output-view-container .output-view-container-right div.foreground { background-color: ${B}; } .monaco-workbench .notebook-text-diff-editor .cell-body.right .output-info-container .output-view-container div.foreground { background-color: ${B}; } .monaco-workbench .notebook-text-diff-editor .cell-body.right .output-info-container .output-view-container div.output-empty-view { background-color: ${B}; } `),F.addRule(` .notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .source-container { background-color: ${B}; } .notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .source-container .monaco-editor .margin, .notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .source-container .monaco-editor .monaco-editor-background { background-color: ${B}; } `),F.addRule(` .notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .metadata-editor-container { background-color: ${B}; } .notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .metadata-editor-container .monaco-editor .margin, .notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .metadata-editor-container .monaco-editor .monaco-editor-background { background-color: ${B}; } `),F.addRule(` .notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .output-editor-container { background-color: ${B}; } .notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .output-editor-container .monaco-editor .margin, .notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .output-editor-container .monaco-editor .monaco-editor-background { background-color: ${B}; } `),F.addRule(` .notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .metadata-header-container { background-color: ${B}; } .notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .output-header-container { background-color: ${B}; } `));const P=x.getColor(c.diffRemoved);P&&(F.addRule(` .monaco-workbench .notebook-text-diff-editor .cell-body.full .output-info-container.modified .output-view-container .output-view-container-left div.foreground { background-color: ${P}; } .monaco-workbench .notebook-text-diff-editor .cell-body.left .output-info-container .output-view-container div.foreground { background-color: ${P}; } .monaco-workbench .notebook-text-diff-editor .cell-body.left .output-info-container .output-view-container div.output-empty-view { background-color: ${P}; } `),F.addRule(` .notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .source-container { background-color: ${P}; } .notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .source-container .monaco-editor .margin, .notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .source-container .monaco-editor .monaco-editor-background { background-color: ${P}; } `),F.addRule(` .notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .metadata-editor-container { background-color: ${P}; } .notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .metadata-editor-container .monaco-editor .margin, .notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .metadata-editor-container .monaco-editor .monaco-editor-background { background-color: ${P}; } `),F.addRule(` .notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .output-editor-container { background-color: ${P}; } .notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .output-editor-container .monaco-editor .margin, .notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .output-editor-container .monaco-editor .monaco-editor-background { background-color: ${P}; } `),F.addRule(` .notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .metadata-header-container { background-color: ${P}; } .notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .output-header-container { background-color: ${P}; } `)),F.addRule(`.notebook-text-diff-editor .cell-body { margin: ${r.DIFF_CELL_MARGIN}px; }`)})}),define(ne[2619],re([1,0,140,1643,16,8,7,74,253,356,911,200,59,21,17,57,132]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,_.registerAction2)(class extends _.Action2{constructor(){super({id:"notebook.diff.switchToText",icon:C.openAsTextIcon,title:{value:(0,f.localize)(0,null),original:"Open Text Diff Editor"},precondition:D.ActiveEditorContext.isEqualTo(v.NotebookTextDiffEditor.ID),menu:[{id:_.MenuId.EditorTitle,group:"navigation",when:D.ActiveEditorContext.isEqualTo(v.NotebookTextDiffEditor.ID)}]})}async run(r){const p=r.get(c.IEditorService),u=r.get(o.IEditorGroupsService),a=p.activeEditorPane;if(a&&a instanceof v.NotebookTextDiffEditor){const n=a.input;await p.openEditor({original:{resource:n.original.resource},modified:{resource:n.resource},label:n.getName(),options:{preserveFocus:!1,override:s.EditorResolution.DISABLED}},(0,I.columnToEditorGroup)(u,void 0))}}}),(0,_.registerAction2)(class extends _.Action2{constructor(){super({id:"notebook.diff.cell.revertMetadata",title:(0,f.localize)(1,null),icon:C.revertIcon,f1:!1,menu:{id:_.MenuId.NotebookDiffCellMetadataTitle,when:w.NOTEBOOK_DIFF_CELL_PROPERTY},precondition:w.NOTEBOOK_DIFF_CELL_PROPERTY})}run(r,p){if(!p)return;const u=p.cell.original,a=p.cell.modified;!u||!a||(a.textModel.metadata=u.metadata)}}),(0,_.registerAction2)(class extends _.Action2{constructor(){super({id:"notebook.diff.cell.switchOutputRenderingStyleToText",title:(0,f.localize)(2,null),icon:C.renderOutputIcon,f1:!1,menu:{id:_.MenuId.NotebookDiffCellOutputsTitle,when:w.NOTEBOOK_DIFF_CELL_PROPERTY_EXPANDED}})}run(r,p){!p||(p.cell.renderOutput=!p.cell.renderOutput)}}),(0,_.registerAction2)(class extends _.Action2{constructor(){super({id:"notebook.diff.cell.revertOutputs",title:(0,f.localize)(3,null),icon:C.revertIcon,f1:!1,menu:{id:_.MenuId.NotebookDiffCellOutputsTitle,when:w.NOTEBOOK_DIFF_CELL_PROPERTY},precondition:w.NOTEBOOK_DIFF_CELL_PROPERTY})}run(r,p){if(!p)return;const u=p.cell.original,a=p.cell.modified;!u||!a||a.textModel.spliceNotebookCellOutputs({start:0,deleteCount:a.outputs.length,newOutputs:u.outputs})}}),(0,_.registerAction2)(class extends _.Action2{constructor(){super({id:"notebook.diff.cell.revertInput",title:(0,f.localize)(4,null),icon:C.revertIcon,f1:!1,menu:{id:_.MenuId.NotebookDiffCellInputTitle,when:w.NOTEBOOK_DIFF_CELL_INPUT},precondition:w.NOTEBOOK_DIFF_CELL_INPUT})}run(r,p){if(!p)return;const u=p.cell.original,a=p.cell.modified;return!u||!a?void 0:r.get(t.IBulkEditService).apply([new t.ResourceTextEdit(a.uri,{range:a.textModel.getFullModelRange(),text:u.textModel.getValue()})],{quotableLabel:"Revert Notebook Cell Content Change"})}});class l extends _.Action2{constructor(p,u,a,n,h,g,d){super({id:p,title:u,precondition:a,menu:[{id:_.MenuId.EditorTitle,group:"notebook",when:a,order:h}],toggled:n});this.toggleOutputs=g,this.toggleMetadata=d}async run(p){const u=p.get(A.IConfigurationService);if(this.toggleOutputs!==void 0){const a=u.getValue("notebook.diff.ignoreOutputs");u.updateValue("notebook.diff.ignoreOutputs",!a)}if(this.toggleMetadata!==void 0){const a=u.getValue("notebook.diff.ignoreMetadata");u.updateValue("notebook.diff.ignoreMetadata",!a)}}}(0,_.registerAction2)(class extends l{constructor(){super("notebook.diff.showOutputs",{value:(0,f.localize)(5,null),original:"Show Outputs Differences"},D.ActiveEditorContext.isEqualTo(v.NotebookTextDiffEditor.ID),k.ContextKeyExpr.notEquals("config.notebook.diff.ignoreOutputs",!0),2,!0,void 0)}}),(0,_.registerAction2)(class extends l{constructor(){super("notebook.diff.showMetadata",{value:(0,f.localize)(6,null),original:"Show Metadata Differences"},D.ActiveEditorContext.isEqualTo(v.NotebookTextDiffEditor.ID),k.ContextKeyExpr.notEquals("config.notebook.diff.ignoreMetadata",!0),1,void 0,!0)}}),i.Registry.as(S.Extensions.Configuration).registerConfiguration({id:"notebook",order:100,type:"object",properties:{"notebook.diff.ignoreMetadata":{type:"boolean",default:!1,markdownDescription:(0,f.localize)(7,null)},"notebook.diff.ignoreOutputs":{type:"boolean",default:!1,markdownDescription:(0,f.localize)(8,null)}}})}),define(ne[2620],re([1,0,55,506,2,59,5,232,6]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookEditorWidgetService=void 0;let w=class{constructor(C){this._tokenPool=1,this._disposables=new _.DisposableStore,this._notebookEditors=new Map,this._decorationOptionProviders=new Map,this._onNotebookEditorAdd=new I.Emitter,this._onNotebookEditorsRemove=new I.Emitter,this.onDidAddNotebookEditor=this._onNotebookEditorAdd.event,this.onDidRemoveNotebookEditor=this._onNotebookEditorsRemove.event,this._borrowableEditors=new Map;const o=new Map,c=i=>{const{id:S}=i,s=[];s.push(i.onDidCloseEditor(l=>{const r=this._borrowableEditors.get(i.id);if(!r)return;(l.editor instanceof D.NotebookEditorInput?[l.editor]:(0,D.isCompositeNotebookEditorInput)(l.editor)?l.editor.editorInputs:[]).forEach(u=>{const a=r.get(u.resource);!a||(a.token=void 0,this._disposeWidget(a.widget),r.delete(u.resource),a.widget=void 0)})})),s.push(i.onWillMoveEditor(l=>{l.editor instanceof D.NotebookEditorInput&&this._freeWidget(l.editor,l.groupId,l.target),(0,D.isCompositeNotebookEditorInput)(l.editor)&&l.editor.editorInputs.forEach(r=>{this._freeWidget(r,l.groupId,l.target)})})),o.set(S,s)};this._disposables.add(C.onDidAddGroup(c)),C.whenReady.then(()=>C.groups.forEach(c)),this._disposables.add(C.onDidRemoveGroup(i=>{const S=o.get(i.id);S&&(S.forEach(l=>l.dispose()),o.delete(i.id));const s=this._borrowableEditors.get(i.id);if(this._borrowableEditors.delete(i.id),s)for(const l of s.values())l.token=void 0,this._disposeWidget(l.widget)}))}dispose(){this._disposables.dispose(),this._onNotebookEditorAdd.dispose(),this._onNotebookEditorsRemove.dispose()}_disposeWidget(C){C.onWillHide();const o=C.getDomNode();C.dispose(),o.remove()}_freeWidget(C,o,c){if(this._borrowableEditors.get(c)?.get(C.resource))return;const S=this._borrowableEditors.get(o)?.get(C.resource);if(!S)throw new Error("no widget at source group");this._borrowableEditors.get(o)?.delete(C.resource),S.token=void 0;let s=this._borrowableEditors.get(c);s||(s=new t.ResourceMap,this._borrowableEditors.set(c,s)),s.set(C.resource,S)}retrieveWidget(C,o,c,i){let S=this._borrowableEditors.get(o.id)?.get(c.resource);if(S)S.token=this._tokenPool++;else{const l=C.get(k.IInstantiationService).createInstance(f.NotebookEditorWidget,i??(0,f.getDefaultNotebookCreationOptions)()),r=this._tokenPool++;S={widget:l,token:r};let p=this._borrowableEditors.get(o.id);p||(p=new t.ResourceMap,this._borrowableEditors.set(o.id,p)),p.set(c.resource,S)}return this._createBorrowValue(S.token,S)}_createBorrowValue(C,o){return{get value(){return o.token===C?o.widget:void 0}}}addNotebookEditor(C){this._notebookEditors.set(C.getId(),C),this._onNotebookEditorAdd.fire(C)}removeNotebookEditor(C){this._notebookEditors.has(C.getId())&&(this._notebookEditors.delete(C.getId()),this._onNotebookEditorsRemove.fire(C))}getNotebookEditor(C){return this._notebookEditors.get(C)}listNotebookEditors(){return[...this._notebookEditors].map(C=>C[1])}registerEditorDecorationType(C,o){this._decorationOptionProviders.has(C)||this._decorationOptionProviders.set(C,o)}removeEditorDecorationType(C){this._decorationOptionProviders.delete(C),this.listNotebookEditors().forEach(o=>o.removeEditorDecorations(C))}resolveEditorDecorationOptions(C){return this._decorationOptionProviders.get(C)}};w=Ee([W(0,A.IEditorGroupsService)],w),e.NotebookEditorWidgetService=w}),define(ne[2621],re([1,0,1732,14,42,47,17,27,24,46,26,83,41,9,196,11,2,40]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class r extends s.Disposable{constructor(a,n,h,g,d,m,b,E){super();const y=`${a.surveyId}.sessionCount`,T=`${a.surveyId}.lastSessionDate`,R=`${a.surveyId}.skipVersion`,O=`${a.surveyId}.isCandidate`,x=`${a.surveyId}.editedCount`,F=`${a.surveyId}.editedDate`;if(n.get(R,0,""))return;const M=new Date().toDateString();if(n.getNumber(x,0,0)<a.editCount){const V=this._register(new S.RunOnceWorker(z=>{z.forEach(U=>{if(U.getLanguageId()===a.languageId&&M!==n.get(F,0)){const H=n.getNumber(x,0,0)+1;n.store(x,H,0,0),n.store(F,M,0,0)}})},250));this._register(m.files.onDidSave(z=>V.work(z.model)))}const N=n.get(T,0,new Date(0).toDateString());if(M===N)return;const B=n.getNumber(y,0,0)+1;if(n.store(T,M,0,0),n.store(y,B,0,0),B<9||n.getNumber(x,0,0)<a.editCount)return;const P=n.getBoolean(O,0,!1)||Math.random()<a.userProbability;if(n.store(O,P,0,0),!P){n.store(R,E.version,0,0);return}h.prompt(v.Severity.Info,(0,t.localize)(0,null,d.getLanguageName(a.languageId)??a.languageId),[{label:(0,t.localize)(1,null),run:()=>{g.publicLog(`${a.surveyId}.survey/takeShortSurvey`),g.getTelemetryInfo().then(V=>{b.open(c.URI.parse(`${a.surveyUrl}?o=${encodeURIComponent(i.platform)}&v=${encodeURIComponent(E.version)}&m=${encodeURIComponent(V.machineId)}`)),n.store(O,!1,0,0),n.store(R,E.version,0,0)})}},{label:(0,t.localize)(2,null),run:()=>{g.publicLog(`${a.surveyId}.survey/remindMeLater`),n.store(y,B-3,0,0)}},{label:(0,t.localize)(3,null),isSecondary:!0,run:()=>{g.publicLog(`${a.surveyId}.survey/dontShowAgain`),n.store(O,!1,0,0),n.store(R,E.version,0,0)}}],{sticky:!0})}}let p=class{constructor(a,n,h,g,d,m,b,E){this.storageService=a,this.notificationService=n,this.telemetryService=h,this.textFileService=g,this.openerService=d,this.productService=m,this.languageService=b,this.extensionService=E,this.handleSurveys()}async handleSurveys(){!this.productService.surveys||(await this.extensionService.whenInstalledExtensionsRegistered(),this.productService.surveys.filter(a=>a.surveyId&&a.editCount&&a.languageId&&a.surveyUrl&&a.userProbability).map(a=>new r(a,this.storageService,this.notificationService,this.telemetryService,this.languageService,this.textFileService,this.openerService,this.productService)))}};p=Ee([W(0,I.IStorageService),W(1,v.INotificationService),W(2,D.ITelemetryService),W(3,C.ITextFileService),W(4,o.IOpenerService),W(5,w.IProductService),W(6,_.ILanguageService),W(7,l.IExtensionService)],p),f.language==="en"&&k.Registry.as(A.Extensions.Workbench).registerWorkbenchContribution(p,3)}),define(ne[912],re([1,0,649,22,23,27,34,83,494,549,187,14,721,87,46]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceTags=e.getHashedRemotesFromConfig=void 0;async function S(l,r=!1){return Promise.all((0,o.getRemotes)(l,r).map(p=>(0,t.sha1Hex)(p)))}e.getHashedRemotesFromConfig=S;let s=class Oa{constructor(r,p,u,a,n,h,g,d,m){this.fileService=r,this.contextService=p,this.telemetryService=u,this.requestService=a,this.textFileService=n,this.workspaceTagsService=h,this.diagnosticsService=g,this.productService=d,this.nativeHostService=m,this.telemetryService.telemetryLevel===3&&this.report()}async report(){this.reportWindowsEdition(),this.workspaceTagsService.getTags().then(r=>this.reportWorkspaceTags(r),r=>(0,f.onUnexpectedError)(r)),this.reportCloudStats(),this.reportProxyStats(),this.getWorkspaceInformation().then(r=>this.diagnosticsService.reportWorkspaceStats(r))}async reportWindowsEdition(){if(!C.isWindows)return;let r=await this.nativeHostService.windowsGetStringRegKey("HKEY_LOCAL_MACHINE","SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion","EditionID");r===void 0&&(r="Unknown"),this.telemetryService.publicLog2("windowsEdition",{edition:r})}async getWorkspaceInformation(){const r=this.contextService.getWorkspace(),p=this.contextService.getWorkbenchState(),u=await this.workspaceTagsService.getTelemetryWorkspaceId(r,p);return this.telemetryService.getTelemetryInfo().then(a=>({id:r.id,telemetryId:u,rendererSessionId:a.sessionId,folders:r.folders,transient:r.transient,configuration:r.configuration}))}reportWorkspaceTags(r){this.telemetryService.publicLog("workspce.tags",r)}reportRemoteDomains(r){Promise.all(r.map(p=>{const u=p.path,a=p.with({path:`${u!=="/"?u:""}/.git/config`});return this.fileService.exists(a).then(n=>n?this.textFileService.read(a,{acceptTextOnly:!0}).then(h=>(0,o.getDomainsOfRemotes)(h.value,o.AllowedSecondLevelDomains),h=>[]):[])})).then(p=>{const u=p.reduce((n,h)=>h.reduce((g,d)=>g.add(d),n),new Set),a=[];u.forEach(n=>a.push(n)),this.telemetryService.publicLog("workspace.remotes",{domains:a.sort()})},f.onUnexpectedError)}reportRemotes(r){Promise.all(r.map(p=>this.workspaceTagsService.getHashedRemotesFromUri(p,!0))).then(()=>{},f.onUnexpectedError)}reportAzureNode(r,p){const u=r.map(a=>{const n=a.path;return a.with({path:`${n!=="/"?n:""}/node_modules`})});return this.fileService.resolveAll(u.map(a=>({resource:a}))).then(a=>{const n=[].concat(...a.map(g=>g.success?g.stat.children||[]:[])).map(g=>g.name);return Oa.searchArray(n,/azure/i)&&(p.node=!0),p},a=>p)}static searchArray(r,p){return r.some(u=>u.search(p)>-1)||void 0}reportAzureJava(r,p){return Promise.all(r.map(u=>{const a=u.path,n=u.with({path:`${a!=="/"?a:""}/pom.xml`});return this.fileService.exists(n).then(h=>h?this.textFileService.read(n,{acceptTextOnly:!0}).then(g=>!!g.value.match(/azure/i),g=>!1):!1)})).then(u=>(u.indexOf(!0)!==-1&&(p.java=!0),p))}reportAzure(r){const p=Object.create(null);this.reportAzureNode(r,p).then(u=>this.reportAzureJava(r,u)).then(u=>{Object.keys(u).length&&this.telemetryService.publicLog("workspace.azure",u)}).then(void 0,f.onUnexpectedError)}reportCloudStats(){const r=this.contextService.getWorkspace().folders.map(p=>p.uri);r.length&&this.fileService&&(this.reportRemoteDomains(r),this.reportRemotes(r),this.reportAzure(r))}reportProxyStats(){const r=this.productService.downloadUrl;!r||this.requestService.resolveProxy(r).then(p=>{let u=p?String(p).trim().split(/\s+/,1)[0]:"EMPTY";["DIRECT","PROXY","HTTPS","SOCKS","EMPTY"].indexOf(u)===-1&&(u="UNKNOWN")}).then(void 0,f.onUnexpectedError)}};s=Ee([W(0,_.IFileService),W(1,k.IWorkspaceContextService),W(2,A.ITelemetryService),W(3,v.IRequestService),W(4,D.ITextFileService),W(5,I.IWorkspaceTagsService),W(6,w.IDiagnosticsService),W(7,i.IProductService),W(8,c.INativeHostService)],s),e.WorkspaceTags=s}),define(ne[2622],re([1,0,17,47,912]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t.Registry.as(f.Extensions.Workbench).registerWorkbenchContribution(_.WorkspaceTags,4)}),define(ne[2623],re([1,0,649,23,34,50,83,9,18,35,494,912,46,29,2206]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceTagsService=void 0;const S=["@azure","@azure/ai","@azure/core","@azure/cosmos","@azure/event","@azure/identity","@azure/keyvault","@azure/search","@azure/storage"],s=["express","sails","koa","hapi","socket.io","restify","next","nuxt","@nestjs/core","strapi","gatsby","react","react-native","react-native-macos","react-native-windows","rnpm-plugin-windows","@angular/core","@ionic","vue","tns-core-modules","@nativescript/core","electron","aws-sdk","aws-amplify","azure","azure-storage","firebase","@google-cloud/common","heroku-cli","@microsoft/teams-js","@microsoft/office-js","@microsoft/office-js-helpers","@types/office-js","@types/office-runtime","office-ui-fabric-react","@uifabric/icons","@uifabric/merge-styles","@uifabric/styling","@uifabric/experiments","@uifabric/utilities","@microsoft/rush","lerna","just-task","beachball","playwright","playwright-cli","@playwright/test","playwright-core","playwright-chromium","playwright-firefox","playwright-webkit","cypress","nightwatch","protractor","puppeteer","selenium-webdriver","webdriverio","gherkin","@azure/app-configuration","@azure/cosmos-sign","@azure/cosmos-language-service","@azure/synapse-spark","@azure/synapse-monitoring","@azure/synapse-managed-private-endpoints","@azure/synapse-artifacts","@azure/synapse-access-control","@azure/ai-metrics-advisor","@azure/service-bus","@azure/keyvault-secrets","@azure/keyvault-keys","@azure/keyvault-certificates","@azure/keyvault-admin","@azure/digital-twins-core","@azure/cognitiveservices-anomalydetector","@azure/ai-anomaly-detector","@azure/core-xml","@azure/core-tracing","@azure/core-paging","@azure/core-https","@azure/core-client","@azure/core-asynciterator-polyfill","@azure/core-arm","@azure/amqp-common","@azure/core-lro","@azure/logger","@azure/core-http","@azure/core-auth","@azure/core-amqp","@azure/abort-controller","@azure/eventgrid","@azure/storage-file-datalake","@azure/search-documents","@azure/storage-file","@azure/storage-datalake","@azure/storage-queue","@azure/storage-file-share","@azure/storage-blob-changefeed","@azure/storage-blob","@azure/cognitiveservices-formrecognizer","@azure/ai-form-recognizer","@azure/cognitiveservices-textanalytics","@azure/ai-text-analytics","@azure/event-processor-host","@azure/schema-registry-avro","@azure/schema-registry","@azure/eventhubs-checkpointstore-blob","@azure/event-hubs","@azure/communication-signaling","@azure/communication-calling","@azure/communication-sms","@azure/communication-common","@azure/communication-chat","@azure/communication-administration","@azure/attestation","@azure/data-tables"],l=["azure-ai","azure-cognitiveservices","azure-core","azure-cosmos","azure-event","azure-identity","azure-keyvault","azure-mgmt","azure-ml","azure-search","azure-storage"],r=["azure","azure-appconfiguration","azure-loganalytics","azure-synapse-nspkg","azure-synapse-spark","azure-synapse-artifacts","azure-synapse-accesscontrol","azure-synapse","azure-cognitiveservices-vision-nspkg","azure-cognitiveservices-search-nspkg","azure-cognitiveservices-nspkg","azure-cognitiveservices-language-nspkg","azure-cognitiveservices-knowledge-nspkg","azure-monitor","azure-ai-metricsadvisor","azure-servicebus","azureml-sdk","azure-keyvault-nspkg","azure-keyvault-secrets","azure-keyvault-keys","azure-keyvault-certificates","azure-keyvault-administration","azure-digitaltwins-nspkg","azure-digitaltwins-core","azure-cognitiveservices-anomalydetector","azure-ai-anomalydetector","azure-applicationinsights","azure-core-tracing-opentelemetry","azure-core-tracing-opencensus","azure-nspkg","azure-common","azure-eventgrid","azure-storage-file-datalake","azure-search-nspkg","azure-search-documents","azure-storage-nspkg","azure-storage-file","azure-storage-common","azure-storage-queue","azure-storage-file-share","azure-storage-blob-changefeed","azure-storage-blob","azure-cognitiveservices-formrecognizer","azure-ai-formrecognizer","azure-ai-nspkg","azure-cognitiveservices-language-textanalytics","azure-ai-textanalytics","azure-schemaregistry-avroserializer","azure-schemaregistry","azure-eventhub-checkpointstoreblob-aio","azure-eventhub-checkpointstoreblob","azure-eventhub","azure-servicefabric","azure-communication-nspkg","azure-communication-sms","azure-communication-chat","azure-communication-administration","azure-security-attestation","azure-data-nspkg","azure-data-tables","azure-devtools","azure-elasticluster","azure-functions","azure-graphrbac","azure-iothub-device-client","azure-shell","azure-translator","adal","pydocumentdb","botbuilder-core","botbuilder-schema","botframework-connector","playwright"];let p=class{constructor(a,n,h,g,d){this.fileService=a,this.contextService=n,this.environmentService=h,this.productService=g,this.textFileService=d}async getTags(){return this._tags||(this._tags=await this.resolveWorkspaceTags()),this._tags}async getTelemetryWorkspaceId(a,n){function h(d){return(0,t.sha1Hex)(d.scheme===I.Schemas.file?d.fsPath:d.toString())}let g;switch(n){case 1:g=void 0;break;case 2:g=await h(a.folders[0].uri);break;case 3:a.configuration&&(g=await h(a.configuration))}return g}getHashedRemotesFromUri(a,n=!1){const h=a.path,g=a.with({path:`${h!=="/"?h:""}/.git/config`});return this.fileService.exists(g).then(d=>d?this.textFileService.read(g,{acceptTextOnly:!0}).then(m=>(0,C.getHashedRemotesFromConfig)(m.value,n),m=>[]):[])}async resolveWorkspaceTags(){const a=Object.create(null),n=this.contextService.getWorkbenchState(),h=this.contextService.getWorkspace();a["workspace.id"]=await this.getTelemetryWorkspaceId(h,n);const{filesToOpenOrCreate:g,filesToDiff:d}=this.environmentService;a["workbench.filesToOpenOrCreate"]=g&&g.length||0,a["workbench.filesToDiff"]=d&&d.length||0;const m=n===1;a["workspace.roots"]=m?0:h.folders.length,a["workspace.empty"]=m;const b=m?this.productService.quality!=="stable"&&this.findFolders():h.folders.map(E=>E.uri);return!b||!b.length?Promise.resolve(a):this.fileService.resolveAll(b.map(E=>({resource:E}))).then(E=>{const y=[].concat(...E.map(j=>j.success?j.stat.children||[]:[])).map(j=>j.name),T=y.reduce((j,X)=>j.add(X.toLowerCase()),new Set);a["workspace.grunt"]=T.has("gruntfile.js"),a["workspace.gulp"]=T.has("gulpfile.js"),a["workspace.jake"]=T.has("jakefile.js"),a["workspace.tsconfig"]=T.has("tsconfig.json"),a["workspace.jsconfig"]=T.has("jsconfig.json"),a["workspace.config.xml"]=T.has("config.xml"),a["workspace.vsc.extension"]=T.has("vsc-extension-quickstart.md"),a["workspace.ASP5"]=T.has("project.json")&&this.searchArray(y,/^.+\.cs$/i),a["workspace.sln"]=this.searchArray(y,/^.+\.sln$|^.+\.csproj$/i),a["workspace.unity"]=T.has("assets")&&T.has("library")&&T.has("projectsettings"),a["workspace.npm"]=T.has("package.json")||T.has("node_modules"),a["workspace.bower"]=T.has("bower.json")||T.has("bower_components"),a["workspace.java.pom"]=T.has("pom.xml"),a["workspace.java.gradle"]=T.has("build.gradle")||T.has("settings.gradle"),a["workspace.yeoman.code.ext"]=T.has("vsc-extension-quickstart.md"),a["workspace.py.requirements"]=T.has("requirements.txt"),a["workspace.py.requirements.star"]=this.searchArray(y,/^(.*)requirements(.*)\.txt$/i),a["workspace.py.Pipfile"]=T.has("pipfile"),a["workspace.py.conda"]=this.searchArray(y,/^environment(\.yml$|\.yaml$)/i);const R=T.has("mainactivity.cs")||T.has("mainactivity.fs"),O=T.has("appdelegate.cs")||T.has("appdelegate.fs"),x=T.has("androidmanifest.xml"),F=T.has("platforms"),L=T.has("plugins"),M=T.has("www"),N=T.has("properties"),B=T.has("resources"),P=T.has("jni");a["workspace.config.xml"]&&!a["workspace.language.cs"]&&!a["workspace.language.vb"]&&!a["workspace.language.aspx"]&&(F&&L&&M?a["workspace.cordova.high"]=!0:a["workspace.cordova.low"]=!0),a["workspace.config.xml"]&&!a["workspace.language.cs"]&&!a["workspace.language.vb"]&&!a["workspace.language.aspx"]&&T.has("ionic.config.json")&&(a["workspace.ionic"]=!0),R&&N&&B&&(a["workspace.xamarin.android"]=!0),O&&B&&(a["workspace.xamarin.ios"]=!0),x&&P&&(a["workspace.android.cpp"]=!0);function V(j,X,Y,$){return T.has(j)?b.map(J=>{const ee=J.with({path:`${J.path!=="/"?J.path:""}/${j}`});return X.exists(ee).then(te=>{if(!!te)return Y.read(ee,{acceptTextOnly:!0}).then($)},te=>{})}):[]}function z(j){r.indexOf(j)>-1&&(a["workspace.py."+j]=!0);for(const X of l)j.startsWith(X)&&(a["workspace.py."+X]=!0);a["workspace.py.any-azure"]||(a["workspace.py.any-azure"]=/azure/i.test(j))}const U=V("requirements.txt",this.fileService,this.textFileService,j=>{const X=(0,c.splitLines)(j.value);for(let Y of X){const $=Y.split("=="),J=Y.split(">="),ee=($.length===2?$[0]:J[0]).trim();z(ee)}}),H=V("pipfile",this.fileService,this.textFileService,j=>{let X=(0,c.splitLines)(j.value);X=X.slice(X.indexOf("[packages]")+1);for(let Y of X){if(Y.trim().indexOf("[")>-1)break;if(Y.indexOf("=")===-1)continue;const $=Y.split("=")[0].trim();z($)}}),K=V("package.json",this.fileService,this.textFileService,j=>{try{const X=JSON.parse(j.value);let Y=Object.keys(X.dependencies||{}).concat(Object.keys(X.devDependencies||{}));for(let $ of Y)if($.startsWith("react-native"))a["workspace.reactNative"]=!0;else if($==="tns-core-modules"||$==="@nativescript/core")a["workspace.nativescript"]=!0;else if(s.indexOf($)>-1)a["workspace.npm."+$]=!0;else for(const J of S)$.startsWith(J)&&(a["workspace.npm."+J]=!0)}catch{}}),G=V("pom.xml",this.fileService,this.textFileService,j=>{try{let X;for(;X=i.MavenDependenciesRegex.exec(j.value);){let Y;for(;Y=i.MavenDependencyRegex.exec(X[1]);){const $=i.MavenGroupIdRegex.exec(Y[1]),J=i.MavenArtifactIdRegex.exec(Y[1]);$&&J&&this.tagJavaDependency($[1],J[1],"workspace.pom.",a)}}}catch{}}),q=V("build.gradle",this.fileService,this.textFileService,j=>{try{this.processGradleDependencies(j.value,i.GradleDependencyLooseRegex,a),this.processGradleDependencies(j.value,i.GradleDependencyCompactRegex,a)}catch{}}),Z=b.map(j=>{const X=D.URI.joinPath(j,"/app/src/main/AndroidManifest.xml");return this.fileService.exists(X).then(Y=>{Y&&(a["workspace.java.android"]=!0)},Y=>{})});return Promise.all([...K,...U,...H,...G,...q,...Z]).then(()=>a)})}processGradleDependencies(a,n,h){let g;for(;g=n.exec(a);){const d=g[1],m=g[2];d&&m&&this.tagJavaDependency(d,m,"workspace.gradle.",h)}}tagJavaDependency(a,n,h,g){for(const d of i.JavaLibrariesToLookFor)if((a===d.groupId||new RegExp(d.groupId).test(a))&&(n===d.artifactId||new RegExp(d.artifactId).test(n))){g[h+d.tag]=!0;return}}findFolders(){const a=this.findFolder();return a&&[a]}findFolder(){const{filesToOpenOrCreate:a,filesToDiff:n}=this.environmentService;if(a&&a.length)return this.parentURI(a[0].fileUri);if(n&&n.length)return this.parentURI(n[0].fileUri)}parentURI(a){if(!a)return;const n=a.path,h=n.lastIndexOf("/");return h!==-1?a.with({path:n.substr(0,h)}):void 0}searchArray(a,n){return a.some(h=>h.search(n)>-1)||void 0}};p=Ee([W(0,f.IFileService),W(1,_.IWorkspaceContextService),W(2,A.IWorkbenchEnvironmentService),W(3,o.IProductService),W(4,k.ITextFileService)],p),e.WorkspaceTagsService=p,(0,w.registerSingleton)(v.IWorkspaceTagsService,p,!0)}),define(ne[913],re([1,0,1734,81,51,19,118,9,36,2,6,13,645,89,14,55,125,27,8,23,40,28,297,24,67,41,26,54,52,320,21,218,34,83,201,105,120,814,273,269,2209,2329,864,53,366,7,862,50,101,301,61,108,30,43,863,31,150,12,114,74,18,88]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H,K,G,q,Z,j,X,Y,$,J,ee,te,se,ie,ce,le,ae,ue,oe){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractTaskService=e.ConfigureTaskAction=void 0;const fe="task.quickOpen.history",pe="task.problemMatchers.neverPrompt",me="task.quickOpen.showAll";var be;(function(ge){ge.ID="workbench.action.tasks.configureTaskRunner",ge.TEXT=t.localize(0,null)})(be=e.ConfigureTaskAction||(e.ConfigureTaskAction={}));class Ce{constructor(de){this._outputChannel=de,this._validationStatus=new o.ValidationStatus}info(de){this._validationStatus.state=1,this._outputChannel.append(de+` `)}warn(de){this._validationStatus.state=2,this._outputChannel.append(de+` `)}error(de){this._validationStatus.state=3,this._outputChannel.append(de+` `)}fatal(de){this._validationStatus.state=4,this._outputChannel.append(de+` `)}get status(){return this._validationStatus}}class ve{constructor(){this._store=new Map}forEach(de){this._store.forEach(de)}static getKey(de){let Se;if(C.isString(de))Se=de;else{const we=(0,te.isWorkspaceFolder)(de)?de.uri:de.configuration;Se=we?we.toString():""}return Se}get(de){const Se=ve.getKey(de);let we=this._store.get(Se);return we||(we=[],this._store.set(Se,we)),we}add(de,...Se){const we=ve.getKey(de);let ye=this._store.get(we);ye||(ye=[],this._store.set(we,ye)),ye.push(...Se)}all(){let de=[];return this._store.forEach(Se=>de.push(...Se)),de}}let he=class ni extends w.Disposable{constructor(de,Se,we,ye,ke,Ie,Te,De,_e,Re,Ne,xe,Ae,Le,Me,We,Ve,Ue,et,Ze,Fe,Qe,qe,Be,Ke,Xe,rt,it,at,ft,vt,Dt){super();this.configurationService=de,this.markerService=Se,this.outputService=we,this.paneCompositeService=ye,this.viewsService=ke,this.commandService=Ie,this.editorService=Te,this.fileService=De,this.contextService=_e,this.telemetryService=Re,this.textFileService=Ne,this.modelService=xe,this.extensionService=Ae,this.quickInputService=Le,this.configurationResolverService=Me,this.terminalService=We,this.terminalGroupService=Ve,this.storageService=Ue,this.progressService=et,this.openerService=Ze,this.dialogService=Fe,this.notificationService=Qe,this.contextKeyService=qe,this.environmentService=Be,this.terminalProfileResolverService=Ke,this.pathService=Xe,this.textModelResolverService=rt,this.preferencesService=it,this.viewDescriptorService=at,this.workspaceTrustRequestService=ft,this.workspaceTrustManagementService=vt,this.logService=Dt,this._onDidRegisterSupportedExecutions=new v.Emitter,this._onDidChangeTaskSystemInfo=new v.Emitter,this.onDidChangeTaskSystemInfo=this._onDidChangeTaskSystemInfo.event,this._workspaceTasksPromise=void 0,this._taskSystem=void 0,this._taskSystemListener=void 0,this._outputChannel=this.outputService.getChannel(ni.OutputChannelId),this._providers=new Map,this._providerTypes=new Map,this._taskSystemInfos=new Map,this._register(this.contextService.onDidChangeWorkspaceFolders(()=>{let kt=this.computeWorkspaceFolderSetup();return this.executionEngine!==kt[2]&&(this.disposeTaskSystemListeners(),this._taskSystem=void 0),this.updateSetup(kt),this.updateWorkspaceTasks(2)})),this._register(this.configurationService.onDidChangeConfiguration(()=>{if(!(!this._taskSystem&&!this._workspaceTasksPromise))return(!this._taskSystem||this._taskSystem instanceof U.TerminalTaskSystem)&&this._outputChannel.clear(),this.setTaskLRUCacheLimit(),this.updateWorkspaceTasks(3)})),this._taskRunningState=B.TASK_RUNNING_STATE.bindTo(qe),this._onDidStateChange=this._register(new v.Emitter),this.registerCommands(),this.configurationResolverService.contributeVariable("defaultBuildTask",async()=>{let kt=await this.getTasksForGroup(B.TaskGroup.Build);if(kt.length>0){let{none:He,defaults:ct}=this.splitPerGroupType(kt);if(ct.length===1)return ct[0]._label;ct.length+He.length>0&&(kt=ct.concat(He))}let At;kt&&kt.length>0&&(At=await this.showQuickPick(kt,t.localize(2,null)));let St=At?At.task:void 0;if(!!St)return St._label}),this._waitForSupportedExecutions=new Promise(kt=>{(0,ie.once)(this._onDidRegisterSupportedExecutions.event)(()=>kt())}),this.upgrade()}registerSupportedExecutions(de,Se,we){de!==void 0&&P.CustomExecutionSupportedContext.bindTo(this.contextKeyService).set(de);const ye=!!ae.VirtualWorkspaceContext.getValue(this.contextKeyService);Se!==void 0&&P.ShellExecutionSupportedContext.bindTo(this.contextKeyService).set(Se&&!ye),we!==void 0&&P.ProcessExecutionSupportedContext.bindTo(this.contextKeyService).set(we&&!ye),this._onDidRegisterSupportedExecutions.fire()}get onDidStateChange(){return this._onDidStateChange.event}get supportsMultipleTaskExecutions(){return this.inTerminal()}registerCommands(){a.CommandsRegistry.registerCommand({id:"workbench.action.tasks.runTask",handler:async(de,Se)=>{await this.trust()&&this.runTaskCommand(Se)},description:{description:"Run Task",args:[{name:"args",schema:{type:"string"}}]}}),a.CommandsRegistry.registerCommand("workbench.action.tasks.reRunTask",async(de,Se)=>{await this.trust()&&this.reRunTaskCommand()}),a.CommandsRegistry.registerCommand("workbench.action.tasks.restartTask",async(de,Se)=>{await this.trust()&&this.runRestartTaskCommand(Se)}),a.CommandsRegistry.registerCommand("workbench.action.tasks.terminate",async(de,Se)=>{await this.trust()&&this.runTerminateCommand(Se)}),a.CommandsRegistry.registerCommand("workbench.action.tasks.showLog",()=>{!this.canRunCommand()||this.showOutput()}),a.CommandsRegistry.registerCommand("workbench.action.tasks.build",async()=>{!this.canRunCommand()||await this.trust()&&this.runBuildCommand()}),a.CommandsRegistry.registerCommand("workbench.action.tasks.test",async()=>{!this.canRunCommand()||await this.trust()&&this.runTestCommand()}),a.CommandsRegistry.registerCommand("workbench.action.tasks.configureTaskRunner",async()=>{await this.trust()&&this.runConfigureTasks()}),a.CommandsRegistry.registerCommand("workbench.action.tasks.configureDefaultBuildTask",async()=>{await this.trust()&&this.runConfigureDefaultBuildTask()}),a.CommandsRegistry.registerCommand("workbench.action.tasks.configureDefaultTestTask",async()=>{await this.trust()&&this.runConfigureDefaultTestTask()}),a.CommandsRegistry.registerCommand("workbench.action.tasks.showTasks",async()=>{if(await this.trust())return this.runShowTasks()}),a.CommandsRegistry.registerCommand("workbench.action.tasks.toggleProblems",()=>this.commandService.executeCommand(y.default.TOGGLE_MARKERS_VIEW_ACTION_ID)),a.CommandsRegistry.registerCommand("workbench.action.tasks.openUserTasks",async()=>{const de=this.getResourceForKind(B.TaskSourceKind.User);de&&this.openTaskFile(de,B.TaskSourceKind.User)}),a.CommandsRegistry.registerCommand("workbench.action.tasks.openWorkspaceFileTasks",async()=>{const de=this.getResourceForKind(B.TaskSourceKind.WorkspaceFile);de&&this.openTaskFile(de,B.TaskSourceKind.WorkspaceFile)})}get workspaceFolders(){return this._workspaceFolders||this.updateSetup(),this._workspaceFolders}get ignoredWorkspaceFolders(){return this._ignoredWorkspaceFolders||this.updateSetup(),this._ignoredWorkspaceFolders}get executionEngine(){return this._executionEngine===void 0&&this.updateSetup(),this._executionEngine}get schemaVersion(){return this._schemaVersion===void 0&&this.updateSetup(),this._schemaVersion}get showIgnoreMessage(){return this._showIgnoreMessage===void 0&&(this._showIgnoreMessage=!this.storageService.getBoolean(ni.IgnoreTask010DonotShowAgain_key,1,!1)),this._showIgnoreMessage}_getActivationEvents(de){const Se=[];if(Se.push("onCommand:workbench.action.tasks.runTask"),de)Se.push(`onTaskType:${de}`);else for(const we of K.TaskDefinitionRegistry.all())Se.push(`onTaskType:${we.taskType}`);return Se}async _activateTaskProviders(de){await this.extensionService.whenInstalledExtensionsRegistered(),await Promise.all(this._getActivationEvents(de).map(Se=>this.extensionService.activateByEvent(Se)))}updateSetup(de){if(de||(de=this.computeWorkspaceFolderSetup()),this._workspaceFolders=de[0],this._ignoredWorkspaceFolders)if(this._ignoredWorkspaceFolders.length!==de[1].length)this._showIgnoreMessage=void 0;else{let Se=new Set;this._ignoredWorkspaceFolders.forEach(we=>Se.add(we.uri.toString()));for(let we of de[1])if(!Se.has(we.uri.toString())){this._showIgnoreMessage=void 0;break}}this._ignoredWorkspaceFolders=de[1],this._executionEngine=de[2],this._schemaVersion=de[3],this._workspace=de[4]}showOutput(de=1){!ae.VirtualWorkspaceContext.getValue(this.contextKeyService)&&(de===1||de===3)&&this.notificationService.prompt(f.default.Warning,t.localize(3,null),[{label:t.localize(4,null),run:()=>{this.outputService.showChannel(this._outputChannel.id,!0)}}])}disposeTaskSystemListeners(){this._taskSystemListener&&this._taskSystemListener.dispose()}registerTaskProvider(de,Se){if(!de)return{dispose:()=>{}};let we=ni.nextHandle++;return this._providers.set(we,de),this._providerTypes.set(we,Se),{dispose:()=>{this._providers.delete(we),this._providerTypes.delete(we)}}}get hasTaskSystemInfo(){return this.environmentService.remoteAuthority?this._taskSystemInfos.size>1:this._taskSystemInfos.size>0}registerTaskSystem(de,Se){(!this._taskSystemInfos.has(de)||Se.platform!==0)&&(this._taskSystemInfos.set(de,Se),this.hasTaskSystemInfo&&this._onDidChangeTaskSystemInfo.fire())}getTaskSystemInfo(de){return this._taskSystemInfos.get(de)}extensionCallbackTaskComplete(de,Se){return this._taskSystem?this._taskSystem.customExecutionComplete(de,Se):Promise.resolve()}async _findWorkspaceTasks(de){const Se=[],we=await this.getWorkspaceTasks();for(const[,ye]of we){if(ye.configurations)for(const ke in ye.configurations.byIdentifier){const Ie=ye.configurations.byIdentifier[ke];de(Ie,ye.workspaceFolder)&&Se.push(Ie)}if(ye.set)for(const ke of ye.set.tasks)de(ke,ye.workspaceFolder)&&Se.push(ke)}return Se}async _findWorkspaceTasksInGroup(de,Se){return this._findWorkspaceTasks(we=>{const ye=we.configurationProperties.group;return ye&&typeof ye!="string"?ye._id===de._id&&(!Se||!!ye.isDefault):!1})}async getTask(de,Se,we=!1){if(!await this.trust())return;const ye=C.isString(de)?de:(0,te.isWorkspaceFolder)(de)?de.name:de.configuration?A.basename(de.configuration):void 0;if(this.ignoredWorkspaceFolders.some(De=>De.name===ye))return Promise.reject(new Error(t.localize(5,null,ye)));const ke=C.isString(Se)?Se:B.TaskDefinition.createTaskIdentifier(Se,console);if(ke===void 0)return Promise.resolve(void 0);const Ie=ve.getKey(de),Te=await this._findWorkspaceTasks((De,_e)=>{const Re=ve.getKey(_e);return Re!==Ie&&Re!==P.USER_TASKS_GROUP_KEY?!1:De.matches(ke,we)});if(Te.sort(De=>De._source.kind===B.TaskSourceKind.Extension?1:-1),Te.length>0){const De=Te[0];return B.ConfiguringTask.is(De)?this.tryResolveTask(De):De}return this.getGroupedTasks().then(De=>{let _e=De.get(de);if(_e=_e.concat(De.get(P.USER_TASKS_GROUP_KEY)),!!_e)return _e=_e.filter(Re=>Re.matches(ke,we)).sort(Re=>Re._source.kind===B.TaskSourceKind.Extension?1:-1),_e.length>0?_e[0]:void 0})}async tryResolveTask(de){if(!await this.trust())return;await this._activateTaskProviders(de.type);let Se,we=!1;for(const[ke,Ie]of this._providers){const Te=this._providerTypes.get(ke);if(de.type===Te){if(Te&&!this.isTaskProviderEnabled(Te)){we=!0;continue}Se=Ie;break}}if(!Se){we&&this._outputChannel.append(t.localize(6,null,de.configures.type));return}try{const ke=await Se.resolveTask(de);if(ke&&ke._id===de._id)return z.createCustomTask(ke,de)}catch{}const ye=await this.tasks({type:de.type});for(const ke of ye)if(ke._id===de._id)return z.createCustomTask(ke,de)}async tasks(de){return await this.trust()?this.versionAndEngineCompatible(de)?this.getGroupedTasks(de?de.type:void 0).then(Se=>{if(!de||!de.type)return Se.all();let we=[];return Se.forEach(ye=>{for(let ke of ye)if(B.ContributedTask.is(ke)&&(ke.defines.type===de.type||ke._source.label===de.type))we.push(ke);else if(B.CustomTask.is(ke))if(ke.type===de.type)we.push(ke);else{let Ie=ke.customizes();Ie&&Ie.type===de.type&&we.push(ke)}}),we}):Promise.resolve([]):[]}taskTypes(){const de=[];if(this.isProvideTasksEnabled())for(const Se of K.TaskDefinitionRegistry.all())this.isTaskProviderEnabled(Se.taskType)&&de.push(Se.taskType);return de}createSorter(){return new B.TaskSorter(this.contextService.getWorkspace()?this.contextService.getWorkspace().folders:[])}isActive(){return this._taskSystem?this._taskSystem.isActive():Promise.resolve(!1)}async getActiveTasks(){return this._taskSystem?this._taskSystem.getActiveTasks():[]}async getBusyTasks(){return this._taskSystem?this._taskSystem.getBusyTasks():[]}getRecentlyUsedTasksV1(){if(this._recentlyUsedTasksV1)return this._recentlyUsedTasksV1;const de=this.configurationService.getValue(fe);this._recentlyUsedTasksV1=new S.LRUCache(de);let Se=this.storageService.get(ni.RecentlyUsedTasks_Key,1);if(Se)try{let we=JSON.parse(Se);if(Array.isArray(we))for(let ye of we)this._recentlyUsedTasksV1.set(ye,ye)}catch{}return this._recentlyUsedTasksV1}getRecentlyUsedTasks(){if(this._recentlyUsedTasks)return this._recentlyUsedTasks;const de=this.configurationService.getValue(fe);this._recentlyUsedTasks=new S.LRUCache(de);let Se=this.storageService.get(ni.RecentlyUsedTasks_KeyV2,1);if(Se)try{let we=JSON.parse(Se);if(Array.isArray(we))for(let ye of we)this._recentlyUsedTasks.set(ye[0],ye[1])}catch{}return this._recentlyUsedTasks}getFolderFromTaskKey(de){const Se=JSON.parse(de);return{folder:Se.folder,isWorkspaceFile:Se.id?.endsWith(B.TaskSourceKind.WorkspaceFile)}}async readRecentTasks(){const de=Object.create(null);this.workspaceFolders.forEach(_e=>{de[_e.uri.toString()]=_e});const Se=new Map,we=new Map,ye=this.getRecentlyUsedTasks(),ke=[];function Ie(_e,Re,Ne){Re&&!_e.has(Re)&&_e.set(Re,[]),Re&&(de[Re]||Re===P.USER_TASKS_GROUP_KEY)&&Ne&&_e.get(Re).push(Ne)}for(const _e of ye.entries()){const Re=_e[0],Ne=JSON.parse(_e[1]),xe=this.getFolderFromTaskKey(Re);Ie(xe.isWorkspaceFile?we:Se,xe.folder,Ne)}const Te=new Map;async function De(_e,Re,Ne){for(const xe of Re.keys()){let Ae=[],Le=Object.create(null);const Me=de[xe]?Ne?z.TaskConfigSource.WorkspaceFile:z.TaskConfigSource.TasksJson:z.TaskConfigSource.User;await _e.computeTasksForSingleConfig(de[xe]??await _e.getAFolder(),{version:"2.0.0",tasks:Re.get(xe)},0,Ae,Le,Me,!0),Ae.forEach(We=>{const Ve=We.getRecentlyUsedKey();Ve&&Te.set(Ve,We)});for(const We in Le){const Ve=Le[We].getRecentlyUsedKey();Ve&&Te.set(Ve,Le[We])}}}await De(this,Se,!1),await De(this,we,!0);for(const _e of ye.keys())Te.has(_e)&&ke.push(Te.get(_e));return ke}removeRecentlyUsedTask(de){this.getRecentlyUsedTasks().has(de)&&(this.getRecentlyUsedTasks().delete(de),this.saveRecentlyUsedTasks())}setTaskLRUCacheLimit(){const de=this.configurationService.getValue(fe);this._recentlyUsedTasks&&(this._recentlyUsedTasks.limit=de)}async setRecentlyUsedTask(de){let Se=de.getRecentlyUsedKey();if(!B.InMemoryTask.is(de)&&Se){const we=this.createCustomizableTask(de);if(B.ContributedTask.is(de)&&we){let ye=[],ke=Object.create(null);await this.computeTasksForSingleConfig(de._source.workspaceFolder??this.workspaceFolders[0],{version:"2.0.0",tasks:[we]},0,ye,ke,z.TaskConfigSource.TasksJson,!0);for(const Ie in ke)Se=ke[Ie].getRecentlyUsedKey()}this.getRecentlyUsedTasks().set(Se,JSON.stringify(we)),this.saveRecentlyUsedTasks()}}saveRecentlyUsedTasks(){if(!this._recentlyUsedTasks)return;const de=this.configurationService.getValue(fe);if(de===0)return;let Se=[...this._recentlyUsedTasks.keys()];Se.length>de&&(Se=Se.slice(0,de));const we=[];for(const ye of Se)we.push([ye,this._recentlyUsedTasks.get(ye,0)]);this.storageService.store(ni.RecentlyUsedTasks_KeyV2,JSON.stringify(we),1,0)}openDocumentation(){this.openerService.open(D.URI.parse("https://code.visualstudio.com/docs/editor/tasks#_defining-a-problem-matcher"))}async _findSingleWorkspaceTaskOfGroup(de){const Se=await this._findWorkspaceTasksInGroup(de,!0);if(Se.length===1&&typeof Se[0].configurationProperties.group!="string"&&Se[0].configurationProperties.group?.isDefault){let we;if(B.ConfiguringTask.is(Se[0])?we=await this.tryResolveTask(Se[0]):we=Se[0],we)return this.run(we,void 0,1)}}async build(){const de=await this._findSingleWorkspaceTaskOfGroup(B.TaskGroup.Build);return de||this.getGroupedTasks().then(Se=>{let we=this.createRunnableTask(Se,B.TaskGroup.Build);if(!we||!we.task)throw this.schemaVersion===1?new N.TaskError(f.default.Info,t.localize(7,null),2):new N.TaskError(f.default.Info,t.localize(8,null),2);return this.executeTask(we.task,we.resolver,1)}).then(Se=>Se,Se=>(this.handleError(Se),Promise.reject(Se)))}async runTest(){const de=await this._findSingleWorkspaceTaskOfGroup(B.TaskGroup.Test);return de||this.getGroupedTasks().then(Se=>{let we=this.createRunnableTask(Se,B.TaskGroup.Test);if(!we||!we.task)throw this.schemaVersion===1?new N.TaskError(f.default.Info,t.localize(9,null),3):new N.TaskError(f.default.Info,t.localize(10,null),3);return this.executeTask(we.task,we.resolver,1)}).then(Se=>Se,Se=>(this.handleError(Se),Promise.reject(Se)))}async run(de,Se,we=0){if(!!await this.trust()){if(!de)throw new N.TaskError(f.default.Info,t.localize(11,null),5);return new Promise(ye=>{let ke=this.createResolver();Se&&Se.attachProblemMatcher&&this.shouldAttachProblemMatcher(de)&&!B.InMemoryTask.is(de)?this.attachProblemMatcher(de).then(Ie=>{ye(Ie?this.executeTask(Ie,ke,we):void 0)}):ye(this.executeTask(de,ke,we))}).then(ye=>(we===1&&this.getWorkspaceTasks().then(ke=>{q.RunAutomaticTasks.promptForPermission(this,this.storageService,this.notificationService,this.workspaceTrustManagementService,this.openerService,ke)}),ye),ye=>(this.handleError(ye),Promise.reject(ye)))}}isProvideTasksEnabled(){return this.configurationService.getValue("task.autoDetect")==="on"}isProblemMatcherPromptEnabled(de){const Se=this.configurationService.getValue(pe);return C.isBoolean(Se)?!Se:de===void 0?!0:!Se[de]}getTypeForTask(de){let Se;return B.CustomTask.is(de)?Se=de._source.config.element.type:Se=de.getDefinition().type,Se}shouldAttachProblemMatcher(de){return this.isProblemMatcherPromptEnabled(this.getTypeForTask(de))===!1||!this.canCustomize(de)||de.configurationProperties.group!==void 0&&de.configurationProperties.group!==B.TaskGroup.Build||de.configurationProperties.problemMatchers!==void 0&&de.configurationProperties.problemMatchers.length>0?!1:B.ContributedTask.is(de)?!de.hasDefinedMatchers&&!!de.configurationProperties.problemMatchers&&de.configurationProperties.problemMatchers.length===0:B.CustomTask.is(de)?de._source.config.element.problemMatcher===void 0&&!de.hasDefinedMatchers:!1}async updateNeverProblemMatcherSetting(de){const Se=this.configurationService.getValue(pe);if(Se===!0)return;let we;return Se!==!1?we=Se:we=Object.create(null),we[de]=!0,this.configurationService.updateValue(pe,we)}attachProblemMatcher(de){let Se=[];for(let we of n.ProblemMatcherRegistry.keys()){let ye=n.ProblemMatcherRegistry.get(we);ye.deprecated||(ye.name===ye.label?Se.push({label:ye.name,matcher:ye}):Se.push({label:ye.label,description:`$${ye.name}`,matcher:ye}))}if(Se.length>0){Se=Se.sort((ye,ke)=>ye.label&&ke.label?ye.label.localeCompare(ke.label):0),Se.unshift({type:"separator",label:t.localize(12,null)});let we;return B.CustomTask.is(de)?we=de._source.config.element.type:we=de.getDefinition().type,Se.unshift({label:t.localize(13,null),matcher:void 0},{label:t.localize(14,null),matcher:void 0,never:!0},{label:t.localize(15,null,we),matcher:void 0,setting:we},{label:t.localize(16,null),matcher:void 0,learnMore:!0}),this.quickInputService.pick(Se,{placeHolder:t.localize(17,null)}).then(async ye=>{if(ye)if(ye.learnMore){this.openDocumentation();return}else{if(ye.never)return this.customize(de,{problemMatcher:[]},!0),de;if(ye.matcher){let ke=de.clone(),Ie=`$${ye.matcher.name}`,Te={problemMatcher:[Ie]};ke.configurationProperties.problemMatchers=[Ie];let De=n.ProblemMatcherRegistry.get(ye.matcher.name);return De&&De.watching!==void 0&&(Te.isBackground=!0,ke.configurationProperties.isBackground=!0),this.customize(de,Te,!0),ke}else return ye.setting&&await this.updateNeverProblemMatcherSetting(ye.setting),de}else return})}return Promise.resolve(de)}getTasksForGroup(de){return this.getGroupedTasks().then(Se=>{let we=[];return Se.forEach(ye=>{for(let ke of ye)B.TaskGroup.from(ke.configurationProperties.group)?._id===de._id&&we.push(ke)}),we})}needsFolderQualification(){return this.contextService.getWorkbenchState()===3}canCustomize(de){return this.schemaVersion!==2?!1:B.CustomTask.is(de)?!0:B.ContributedTask.is(de)?!!de.getWorkspaceFolder():!1}async formatTaskForJson(de,Se){let we,ye="";try{we=await this.textModelResolverService.createModelReference(de);const ke=we.object.textEditorModel,{tabSize:Ie,insertSpaces:Te}=ke.getOptions(),De=ke.getEOL();let _e=(0,X.toFormattedString)(Se,{eol:De,tabSize:Ie,insertSpaces:Te});const Re=new RegExp(De+(Te?" ".repeat(Ie):"\\t"),"g");_e=_e.replace(Re,De+(Te?" ".repeat(Ie*3):" "));const Ne=Te?" ".repeat(Ie*2):" ";ye=Ne+_e.slice(0,_e.length-1)+Ne+_e.slice(_e.length-1)}finally{we&&we.dispose()}return ye}openEditorAtTask(de,Se,we=-1){if(de===void 0)return Promise.resolve(!1);let ye;return this.fileService.readFile(de).then(ke=>ke.value).then(async ke=>{if(!ke)return!1;if(Se){const Ie=ke.toString();let Te;if(we!==-1){const Ne=this.configurationService.getValue("tasks",{resource:de});Ne.tasks&&Ne.tasks.length>we&&(Te=await this.formatTaskForJson(de,Ne.tasks[we]))}Te||(typeof Se=="string"?Te=Se:Te=await this.formatTaskForJson(de,Se));const De=Ie.indexOf(Te);let _e=1;for(let Ne=0;Ne<De;Ne++)Ie.charAt(Ne)===` `&&_e++;let Re=_e;for(let Ne=0;Ne<Te.length;Ne++)Te.charAt(Ne)===` `&&Re++;ye=_e>1?{startLineNumber:_e,startColumn:_e===Re?4:3,endLineNumber:Re,endColumn:_e===Re?void 0:4}:void 0}return this.editorService.openEditor({resource:de,options:{pinned:!1,forceReload:!0,selection:ye,selectionRevealType:1}}).then(()=>!!ye)})}createCustomizableTask(de){let Se,we=B.CustomTask.is(de)||B.ConfiguringTask.is(de)?de._source.config:void 0;if(we&&we.element)Se={...we.element};else if(B.ContributedTask.is(de)){Se={};let ye=Object.assign(Object.create(null),de.defines);delete ye._key,Object.keys(ye).forEach(ke=>Se[ke]=ye[ke]),de.configurationProperties.problemMatchers&&de.configurationProperties.problemMatchers.length>0&&C.isStringArray(de.configurationProperties.problemMatchers)&&(Se.problemMatcher=de.configurationProperties.problemMatchers),de.configurationProperties.group&&(Se.group=z.GroupKind.to(de.configurationProperties.group))}if(!!Se)return(Se.problemMatcher===void 0&&de.configurationProperties.problemMatchers===void 0||de.configurationProperties.problemMatchers&&de.configurationProperties.problemMatchers.length===0)&&(Se.problemMatcher=[]),de._source.label!=="Workspace"?Se.label=de.configurationProperties.identifier:Se.label=de._label,Se.detail=de.configurationProperties.detail,Se}async customize(de,Se,we){if(!await this.trust())return;const ye=de.getWorkspaceFolder();if(!ye)return Promise.resolve(void 0);let ke=this.getConfiguration(ye,de._source.kind);if(ke.hasParseErrors)return this.notificationService.warn(t.localize(18,null)),Promise.resolve(void 0);let Ie=ke.config;const Te=this.createCustomizableTask(de);if(!Te)return Promise.resolve(void 0);const De=B.CustomTask.is(de)?de._source.config.index:void 0;if(Se)for(let Re of Object.getOwnPropertyNames(Se)){let Ne=Se[Re];Ne!=null&&(Te[Re]=Ne)}let _e;if(Ie)De===-1&&Se?Se.problemMatcher!==void 0?(Ie.problemMatcher=Se.problemMatcher,_e=this.writeConfiguration(ye,"tasks.problemMatchers",Ie.problemMatcher,de._source.kind)):Se.group!==void 0&&(Ie.group=Se.group,_e=this.writeConfiguration(ye,"tasks.group",Ie.group,de._source.kind)):(Array.isArray(Ie.tasks)||(Ie.tasks=[]),De===void 0?Ie.tasks.push(Te):Ie.tasks[De]=Te,_e=this.writeConfiguration(ye,"tasks.tasks",Ie.tasks,de._source.kind));else{let Re={version:"2.0.0",tasks:[Te]},Ne=["{",t.localize(19,null)].join(` `)+JSON.stringify(Re,null," ").substr(1),xe=this.configurationService.getValue();xe.editor.insertSpaces&&(Ne=Ne.replace(/(\n)(\t+)/g,(Ae,Le,Me)=>Le+" ".repeat(Me.length*xe.editor.tabSize))),_e=this.textFileService.create([{resource:ye.toResource(".vscode/tasks.json"),value:Ne}]).then(()=>{})}return _e?_e.then(()=>{we&&this.openEditorAtTask(this.getResourceForTask(de),Te)}):Promise.resolve(void 0)}writeConfiguration(de,Se,we,ye){let ke;switch(ye){case B.TaskSourceKind.User:ke=1;break;case B.TaskSourceKind.WorkspaceFile:ke=4;break;default:this.contextService.getWorkbenchState()===2?ke=4:this.contextService.getWorkbenchState()===3&&(ke=5)}if(ke)return this.configurationService.updateValue(Se,we,{resource:de.uri},ke)}getResourceForKind(de){switch(this.updateSetup(),de){case B.TaskSourceKind.User:return A.joinPath(A.dirname(this.preferencesService.userSettingsResource),"tasks.json");case B.TaskSourceKind.WorkspaceFile:if(this._workspace&&this._workspace.configuration)return this._workspace.configuration;default:return}}getResourceForTask(de){if(B.CustomTask.is(de)){let Se=this.getResourceForKind(de._source.kind);if(!Se){const we=de.getWorkspaceFolder();we?Se=we.toResource(de._source.config.file):Se=this.workspaceFolders[0].uri}return Se}else return de.getWorkspaceFolder().toResource(".vscode/tasks.json")}async openConfig(de){let Se;return de?Se=this.getResourceForTask(de):Se=this._workspaceFolders&&this._workspaceFolders.length>0?this._workspaceFolders[0].toResource(".vscode/tasks.json"):void 0,this.openEditorAtTask(Se,de?de._label:void 0,de?de._source.config.index:-1)}createRunnableTask(de,Se){let we=new Map,ye=[],ke=[];de.forEach((Te,De)=>{let _e=we.get(De);_e||(_e={id:new Map,label:new Map,identifier:new Map},we.set(De,_e));for(let Re of Te)_e.id.set(Re._id,Re),_e.label.set(Re._label,Re),Re.configurationProperties.identifier&&_e.identifier.set(Re.configurationProperties.identifier,Re),Se&&Re.configurationProperties.group===Se&&(Re._source.kind===B.TaskSourceKind.Workspace?ye.push(Re):ke.push(Re))});let Ie={resolve:async(Te,De)=>{let _e=we.get(typeof Te=="string"?Te:Te.toString());if(!!_e)return _e.id.get(De)||_e.label.get(De)||_e.identifier.get(De)}};if(ye.length>0)return ye.length>1&&this._outputChannel.append(t.localize(20,null)),{task:ye[0],resolver:Ie};if(ke.length!==0){if(ke.length===1)return{task:ke[0],resolver:Ie};{let Te=c.generateUuid();return{task:new B.InMemoryTask(Te,{kind:B.TaskSourceKind.InMemory,label:"inMemory"},Te,"inMemory",{reevaluateOnRerun:!0},{identifier:Te,dependsOn:ke.map(_e=>({uri:_e.getWorkspaceFolder().uri,task:_e._id})),name:Te}),resolver:Ie}}}}createResolver(de){let Se;async function we(Ie,Te,De){const _e=await Ie._findWorkspaceTasks(Ne=>{const xe=B.ConfiguringTask.is(Ne)||B.CustomTask.is(Ne)?Ne._source.config.workspaceFolder?.uri:void 0,Ae=typeof Te=="string"?Te:Te.toString();if(xe?.toString()!==Ae)return!1;if(C.isString(De))return Ne._label===De||Ne.configurationProperties.identifier===De;{const Le=Ne.getDefinition(!0),Me=B.TaskDefinition.createTaskIdentifier(De,console);return Me&&Le?Me._key===Le._key:!1}});if(_e.length===0)return;const Re=_e[0];return B.ConfiguringTask.is(Re)?Ie.tryResolveTask(Re):Re}async function ye(Ie){return Se===void 0&&(Se=new Map,(de||await Ie.getGroupedTasks()).forEach((Te,De)=>{let _e=Se.get(De);_e||(_e={label:new Map,identifier:new Map,taskIdentifier:new Map},Se.set(De,_e));for(let Re of Te){_e.label.set(Re._label,Re),Re.configurationProperties.identifier&&_e.identifier.set(Re.configurationProperties.identifier,Re);let Ne=Re.getDefinition(!0);Ne!==void 0&&_e.taskIdentifier.set(Ne._key,Re)}})),Se}async function ke(Ie,Te,De){let Re=(await ye(Ie)).get(typeof Te=="string"?Te:Te.toString());if(!!Re){if(C.isString(De))return Re.label.get(De)||Re.identifier.get(De);{let Ne=B.TaskDefinition.createTaskIdentifier(De,console);return Ne!==void 0?Re.taskIdentifier.get(Ne._key):void 0}}}return{resolve:async(Ie,Te)=>{if(!!Te)return Se===void 0&&de===void 0?await we(this,Ie,Te)??ke(this,Ie,Te):ke(this,Ie,Te)}}}async saveBeforeRun(){let de;(function(we){we.Always="always",we.Never="never",we.Prompt="prompt"})(de||(de={}));const Se=this.configurationService.getValue("task.saveBeforeRun");return Se===de.Never||Se===de.Prompt&&(await this.dialogService.show(f.default.Info,t.localize(21,null),[t.localize(22,null),t.localize(23,null)],{detail:t.localize(24,null),cancelId:1})).choice!==0?!1:(await this.editorService.saveAll({reason:2}),!0)}async executeTask(de,Se,we){let ye=de;if(await this.saveBeforeRun()){await this.configurationService.reloadConfiguration(),await this.updateWorkspaceTasks();const Ie=de.getWorkspaceFolder(),Te=de.configurationProperties.identifier;ye=(Ie&&Te&&we===1?await this.getTask(Ie,Te):de)??de}await n.ProblemMatcherRegistry.onReady();let ke=this.getTaskSystem().run(ye,Se);return this.handleExecuteResult(ke,we)}async handleExecuteResult(de,Se){if(Se===1&&await this.setRecentlyUsedTask(de.task),de.kind===2){let we=de.active;if(we&&we.same)if(this._taskSystem?.isTaskVisible(de.task)){const ye=t.localize(25,null,de.task.getQualifiedLabel());let ke=this.getTaskSystem().getLastInstance(de.task)??de.task;this.notificationService.prompt(f.default.Warning,ye,[{label:t.localize(26,null),run:()=>this.terminate(ke)},{label:t.localize(27,null),run:()=>this.restart(ke)}],{sticky:!0})}else this._taskSystem?.revealTask(de.task);else throw new N.TaskError(f.default.Warning,t.localize(28,null),1)}return de.promise}restart(de){!this._taskSystem||this._taskSystem.terminate(de).then(Se=>(Se.success?this.run(de).then(void 0,we=>{}):this.notificationService.warn(t.localize(29,null,C.isString(de)?de:de.configurationProperties.name)),Se))}async terminate(de){return await this.trust()?this._taskSystem?this._taskSystem.terminate(de):{success:!0,task:void 0}:{success:!0,task:void 0}}terminateAll(){return this._taskSystem?this._taskSystem.terminateAll():Promise.resolve([])}createTerminalTaskSystem(){return new U.TerminalTaskSystem(this.terminalService,this.terminalGroupService,this.outputService,this.paneCompositeService,this.viewsService,this.markerService,this.modelService,this.configurationResolverService,this.telemetryService,this.contextService,this.environmentService,ni.OutputChannelId,this.fileService,this.terminalProfileResolverService,this.pathService,this.viewDescriptorService,this.logService,this.configurationService,this.notificationService,this,de=>{if(de)return this.getTaskSystemInfo(de.uri.scheme);if(this._taskSystemInfos.size>0){const Se=Array.from(this._taskSystemInfos.entries()),we=Se.filter(ye=>ye[0]!==ue.Schemas.file);return we.length>0?we[0][1]:Se[0][1]}else return})}isTaskProviderEnabled(de){const Se=K.TaskDefinitionRegistry.get(de);return!Se||!Se.when||this.contextKeyService.contextMatchesRules(Se.when)}getGroupedTasks(de){const Se=this.needsRecentTasksMigration();return this._activateTaskProviders(de).then(()=>{let we=Object.create(null);return K.TaskDefinitionRegistry.all().forEach(ye=>we[ye.taskType]=!0),we.shell=!0,we.process=!0,new Promise(ye=>{let ke=[],Ie=0,Te=_e=>{_e&&ke.push(_e),--Ie==0&&ye(ke)},De=_e=>{try{_e&&C.isString(_e.message)?(this._outputChannel.append("Error: "),this._outputChannel.append(_e.message),this._outputChannel.append(` `),this.showOutput()):(this._outputChannel.append(`Unknown error received while collecting tasks from providers. `),this.showOutput())}finally{--Ie==0&&ye(ke)}};if(this.isProvideTasksEnabled()&&this.schemaVersion===2&&this._providers.size>0){let _e=!1;for(const[Re,Ne]of this._providers){const xe=this._providerTypes.get(Re);if(de===void 0||de===xe){if(xe&&!this.isTaskProviderEnabled(xe))continue;_e=!0,Ie++,Ne.provideTasks(we).then(Ae=>{for(const Le of Ae.tasks)if(Le.type!==this._providerTypes.get(Re)){this._outputChannel.append(t.localize(30,null,this._providerTypes.get(Re),Le.type)),Le.type!=="shell"&&Le.type!=="process"&&this.showOutput();break}return Te(Ae)},De)}}_e||ye(ke)}else ye(ke)})}).then(we=>{let ye=new ve,ke=new ve;for(let Ie of we)for(let Te of Ie.tasks){let De=Te.getWorkspaceFolder();De&&ke.add(De,Te)}return this.getWorkspaceTasks().then(async Ie=>{const De=Array.from(Ie).map(async([_e,Re])=>{let Ne=ke.get(_e);if(!Re.set){Ne&&ye.add(_e,...Ne);return}if(this.contextService.getWorkbenchState()===1)ye.add(_e,...Re.set.tasks);else{let xe=Re.configurations,Ae=Re.set?this.getLegacyTaskConfigurations(Re.set):void 0,Le=[];if(xe||Ae){let Me=new Set;xe&&Object.keys(xe.byIdentifier).forEach(Ue=>Me.add(Ue));for(let Ue of Ne)if(!!B.ContributedTask.is(Ue))if(xe){let et=xe.byIdentifier[Ue.defines._key];et?(Me.delete(Ue.defines._key),ye.add(_e,z.createCustomTask(Ue,et))):ye.add(_e,Ue)}else if(Ae){let et=Ae[Ue.defines._key];et?(ye.add(_e,z.createCustomTask(Ue,et)),Le.push(et)):ye.add(_e,Ue)}else ye.add(_e,Ue);if(Le.length>0){let Ue=Le.reduce((et,Ze)=>(et[Ze._id]=!0,et),Object.create(null));for(let et of Re.set.tasks)Ue[et._id]||ye.add(_e,et)}else ye.add(_e,...Re.set.tasks);const Ve=Array.from(Me).map(async Ue=>{let et=xe.byIdentifier[Ue];if(de&&de!==et.configures.type)return;let Ze=!1;for(const[Fe,Qe]of this._providers){const qe=this._providerTypes.get(Fe);if(et.type===qe){if(qe&&!this.isTaskProviderEnabled(qe)){Ze=!0;continue}try{const Be=await Qe.resolveTask(et);if(Be&&Be._id===et._id){ye.add(_e,z.createCustomTask(Be,et));return}}catch{}}}Ze?this._outputChannel.append(t.localize(31,null,et.configures.type)):(this._outputChannel.append(t.localize(32,null,et.configures.type,JSON.stringify(et._source.config.element,void 0,4))),this.showOutput())});await Promise.all(Ve)}else ye.add(_e,...Re.set.tasks),ye.add(_e,...Ne)}});return await Promise.all(De),Se&&await this.migrateRecentTasks(ye.all()),ye},()=>{let Ie=new ve;for(let Te of we)for(let De of Te.tasks){const _e=De.getWorkspaceFolder();_e&&Ie.add(_e,De)}return Ie})})}getLegacyTaskConfigurations(de){let Se;function we(){return Se||(Se=Object.create(null),Se)}for(let ye of de.tasks)if(B.CustomTask.is(ye)){let ke=ye.command&&ye.command.name;if(ke==="gulp"||ke==="grunt"||ke==="jake"){let Ie=B.KeyedTaskIdentifier.create({type:ke,task:ye.configurationProperties.name});we()[Ie._key]=ye}}return Se}async getWorkspaceTasks(de=1){return await this.trust()?(await this._waitForSupportedExecutions,this._workspaceTasksPromise?this._workspaceTasksPromise:this.updateWorkspaceTasks(de)):new Map}updateWorkspaceTasks(de=1){return this._workspaceTasksPromise=this.computeWorkspaceTasks(de),this._workspaceTasksPromise}async getAFolder(){let de=this.workspaceFolders.length>0?this.workspaceFolders[0]:void 0;if(!de){const Se=await this.pathService.userHome();de=new O.WorkspaceFolder({uri:Se,name:A.basename(Se),index:0})}return de}computeWorkspaceTasks(de=1){let Se=[];for(let we of this.workspaceFolders)Se.push(this.computeWorkspaceFolderTasks(we,de).then(ye=>ye,()=>{}));return Promise.all(Se).then(async we=>{let ye=new Map;for(let Te of we)Te&&ye.set(Te.workspaceFolder.uri.toString(),Te);const ke=await this.getAFolder();if(this.contextService.getWorkbenchState()!==1){const Te=await this.computeWorkspaceFileTasks(ke,de).then(De=>De,()=>{});Te&&this._workspace&&this._workspace.configuration&&ye.set(this._workspace.configuration.toString(),Te)}const Ie=await this.computeUserTasks(ke,de).then(Te=>Te,()=>{});return Ie&&ye.set(P.USER_TASKS_GROUP_KEY,Ie),ye})}get jsonTasksSupported(){return!!P.ShellExecutionSupportedContext.getValue(this.contextKeyService)&&!!P.ProcessExecutionSupportedContext.getValue(this.contextKeyService)}computeWorkspaceFolderTasks(de,Se=1){return(this.executionEngine===B.ExecutionEngine.Process?this.computeLegacyConfiguration(de):this.computeConfiguration(de)).then(we=>!we||!we.config||we.hasErrors?Promise.resolve({workspaceFolder:de,set:void 0,configurations:void 0,hasErrors:we?we.hasErrors:!1}):n.ProblemMatcherRegistry.onReady().then(async()=>{let ye=this.getTaskSystemInfo(de.uri.scheme),ke=new Ce(this._outputChannel),Ie=z.parse(de,void 0,ye?ye.platform:i.platform,we.config,ke,z.TaskConfigSource.TasksJson,this.contextKeyService),Te=!1;if(!Ie.validationStatus.isOK()&&Ie.validationStatus.state!==1&&(Te=!0,this.showOutput(Se)),ke.status.isFatal())return ke.fatal(t.localize(33,null)),{workspaceFolder:de,set:void 0,configurations:void 0,hasErrors:Te};let De;if(Ie.configured&&Ie.configured.length>0){De={byIdentifier:Object.create(null)};for(let _e of Ie.configured)De.byIdentifier[_e.configures._key]=_e}return!this.jsonTasksSupported&&Ie.custom.length>0&&console.warn("Custom workspace tasks are not supported."),{workspaceFolder:de,set:{tasks:this.jsonTasksSupported?Ie.custom:[]},configurations:De,hasErrors:Te}}))}testParseExternalConfig(de,Se){if(!de)return{config:void 0,hasParseErrors:!1};let we=de.$parseErrors;if(we){let ye=!1;for(const ke of we)if(/tasks\.json$/.test(ke)){ye=!0;break}if(ye)return this._outputChannel.append(t.localize(34,null,Se)),this.showOutput(),{config:de,hasParseErrors:!0}}return{config:de,hasParseErrors:!1}}async computeWorkspaceFileTasks(de,Se=1){if(this.executionEngine===B.ExecutionEngine.Process)return this.emptyWorkspaceTaskResults(de);const we=this.getConfiguration(de,B.TaskSourceKind.WorkspaceFile),ye=this.testParseExternalConfig(we.config,t.localize(35,null));let ke={byIdentifier:Object.create(null)};const Ie=[];return await this.computeTasksForSingleConfig(de,ye.config,Se,Ie,ke.byIdentifier,z.TaskConfigSource.WorkspaceFile),(ye.config?z.ExecutionEngine.from(ye.config):B.ExecutionEngine.Terminal)===B.ExecutionEngine.Process?(this.notificationService.warn(t.localize(36,null)),this.emptyWorkspaceTaskResults(de)):{workspaceFolder:de,set:{tasks:Ie},configurations:ke,hasErrors:ye.hasParseErrors}}async computeUserTasks(de,Se=1){if(this.executionEngine===B.ExecutionEngine.Process)return this.emptyWorkspaceTaskResults(de);const we=this.getConfiguration(de,B.TaskSourceKind.User),ye=this.testParseExternalConfig(we.config,t.localize(37,null));let ke={byIdentifier:Object.create(null)};const Ie=[];return await this.computeTasksForSingleConfig(de,ye.config,Se,Ie,ke.byIdentifier,z.TaskConfigSource.User),(ye.config?z.ExecutionEngine.from(ye.config):B.ExecutionEngine.Terminal)===B.ExecutionEngine.Process?(this.notificationService.warn(t.localize(38,null)),this.emptyWorkspaceTaskResults(de)):{workspaceFolder:de,set:{tasks:Ie},configurations:ke,hasErrors:ye.hasParseErrors}}emptyWorkspaceTaskResults(de){return{workspaceFolder:de,set:void 0,configurations:void 0,hasErrors:!1}}async computeTasksForSingleConfig(de,Se,we,ye,ke,Ie,Te=!1){if(!Se)return!1;let De=de?this.getTaskSystemInfo(de.uri.scheme):void 0,_e=new Ce(this._outputChannel),Re=z.parse(de,this._workspace,De?De.platform:i.platform,Se,_e,Ie,this.contextKeyService,Te),Ne=!1;if(!Re.validationStatus.isOK()&&Re.validationStatus.state!==1&&(this.showOutput(we),Ne=!0),_e.status.isFatal())return _e.fatal(t.localize(39,null)),Ne;if(Re.configured&&Re.configured.length>0)for(let xe of Re.configured)ke[xe.configures._key]=xe;if(!this.jsonTasksSupported&&Re.custom.length>0)console.warn("Custom workspace tasks are not supported.");else for(let xe of Re.custom)ye.push(xe);return Ne}computeConfiguration(de){let{config:Se,hasParseErrors:we}=this.getConfiguration(de);return Promise.resolve({workspaceFolder:de,config:Se,hasErrors:we})}computeWorkspaceFolderSetup(){let de=[],Se=[],we=B.ExecutionEngine.Terminal,ye=2,ke;if(this.contextService.getWorkbenchState()===2){let Ie=this.contextService.getWorkspace().folders[0];de.push(Ie),we=this.computeExecutionEngine(Ie);const Te={executionEngineVersion:we};this.telemetryService.publicLog("taskService.engineVersion",Te),ye=this.computeJsonSchemaVersion(Ie)}else if(this.contextService.getWorkbenchState()===3){ke=this.contextService.getWorkspace();for(let Ie of this.contextService.getWorkspace().folders)ye===this.computeJsonSchemaVersion(Ie)?de.push(Ie):(Se.push(Ie),this._outputChannel.append(t.localize(40,null,Ie.uri.fsPath)))}return[de,Se,we,ye,ke]}computeExecutionEngine(de){let{config:Se}=this.getConfiguration(de);return Se?z.ExecutionEngine.from(Se):B.ExecutionEngine._default}computeJsonSchemaVersion(de){let{config:Se}=this.getConfiguration(de);return Se?z.JsonSchemaVersion.from(Se):2}getConfiguration(de,Se){let we;if(Se!==B.TaskSourceKind.User&&this.contextService.getWorkbenchState()===1)we=void 0;else{const ke=this.configurationService.inspect("tasks",{resource:de.uri});switch(Se){case B.TaskSourceKind.User:{ke.userValue!==ke.workspaceFolderValue&&(we=_.deepClone(ke.userValue));break}case B.TaskSourceKind.Workspace:we=_.deepClone(ke.workspaceFolderValue);break;case B.TaskSourceKind.WorkspaceFile:{this.contextService.getWorkbenchState()===3&&ke.workspaceFolderValue!==ke.workspaceValue&&(we=_.deepClone(ke.workspaceValue));break}default:we=_.deepClone(ke.workspaceFolderValue)}}if(!we)return{config:void 0,hasParseErrors:!1};let ye=we.$parseErrors;if(ye){let ke=!1;for(const Ie of ye)if(/tasks\.json$/.test(Ie)){ke=!0;break}if(ke)return this._outputChannel.append(t.localize(41,null)),this.showOutput(),{config:void 0,hasParseErrors:!0}}return{config:we,hasParseErrors:!1}}inTerminal(){return this._taskSystem?this._taskSystem instanceof U.TerminalTaskSystem:this.executionEngine===B.ExecutionEngine.Terminal}configureAction(){const de=this;return new class extends I.Action{constructor(){super(be.ID,be.TEXT,void 0,!0,()=>(de.runConfigureTasks(),Promise.resolve(void 0)))}}}handleError(de){let Se=!0;if(de instanceof N.TaskError){let we=de,ye=we.code===0||we.code===2||we.code===3,ke=we.code===1;ye||ke?this.notificationService.prompt(we.severity,we.message,[{label:ye?be.TEXT:t.localize(42,null),run:()=>{ye?this.runConfigureTasks():this.runTerminateCommand()}}]):this.notificationService.notify({severity:we.severity,message:we.message})}else if(de instanceof Error){let we=de;this.notificationService.error(we.message),Se=!1}else C.isString(de)?this.notificationService.error(de):this.notificationService.error(t.localize(43,null));Se&&this.showOutput()}canRunCommand(){return!0}showDetail(){return this.configurationService.getValue(te.QUICKOPEN_DETAIL_CONFIG)}async createTaskQuickPickEntries(de,Se=!1,we=!1,ye,ke=!0){let Ie={};if(de==null||de.length===0)return[];const Te=Re=>{const Ne={label:Re._label,description:this.getTaskDescription(Re),task:Re,detail:this.showDetail()?Re.configurationProperties.detail:void 0};return Ie[Re._id]?(Ie[Re._id].length===1&&(Ie[Re._id][0].label+=" (1)"),Ne.label=Ne.label+" ("+(Ie[Re._id].length+1).toString()+")"):Ie[Re._id]=[],Ie[Re._id].push(Ne),Ne};function De(Re,Ne,xe){Ne.length&&Re.push({type:"separator",label:xe});for(let Ae of Ne){let Le=Te(Ae);Le.buttons=[{iconClass:ce.ThemeIcon.asClassName(te.configureTaskIcon),tooltip:t.localize(44,null)}],ye&&Ae===ye.task?Re.unshift(ye):Re.push(Le)}}let _e;if(Se)if(_e=[],de.length===1)_e.push(Te(de[0]));else{let Re=await this.readRecentTasks(),Ne=[],xe=new Set,Ae=[],Le=[],Me=Object.create(null);de.forEach(Ve=>{let Ue=Ve.getCommonTaskId();Ue&&(Me[Ue]=Ve)}),Re.reverse().forEach(Ve=>{const Ue=Ve.getCommonTaskId();if(Ue){xe.add(Ue);let et=Me[Ue];et&&Ne.push(et)}});for(let Ve of de){let Ue=Ve.getCommonTaskId();(!Ue||!xe.has(Ue))&&(Ve._source.kind===B.TaskSourceKind.Workspace||Ve._source.kind===B.TaskSourceKind.User?Ae.push(Ve):Le.push(Ve))}const We=this.createSorter();ke&&De(_e,Ne,t.localize(45,null)),Ae=Ae.sort((Ve,Ue)=>We.compare(Ve,Ue)),De(_e,Ae,t.localize(46,null)),Le=Le.sort((Ve,Ue)=>We.compare(Ve,Ue)),De(_e,Le,t.localize(47,null))}else{if(we){const Re=this.createSorter();de=de.sort((Ne,xe)=>Re.compare(Ne,xe))}_e=de.map(Re=>Te(Re))}return Ie={},_e}async showTwoLevelQuickPick(de,Se){return te.TaskQuickPick.show(this,this.configurationService,this.quickInputService,this.notificationService,this.dialogService,de,Se)}async showQuickPick(de,Se,we,ye=!1,ke=!1,Ie,Te){const De=new J.CancellationTokenSource,_e=De.token;let Re=new Promise(Le=>{Array.isArray(de)?Le(this.createTaskQuickPickEntries(de,ye,ke,Ie)):Le(de.then(Me=>this.createTaskQuickPickEntries(Me,ye,ke,Ie)))});if(!await Promise.race([new Promise(Le=>{Re.then(()=>Le(!1))}),new Promise(Le=>{const Me=setTimeout(()=>{clearTimeout(Me),Le(!0)},200)})])&&(await Re).length===1&&this.configurationService.getValue(te.QUICKOPEN_SKIP_CONFIG))return(await Re)[0];const xe=Re.then(Le=>(Le.length===1&&this.configurationService.getValue(te.QUICKOPEN_SKIP_CONFIG)?De.cancel():Le.length===0&&we?Le.push(we):Le.length>1&&Te&&Te.length>0&&(Le.push({type:"separator",label:""}),Le.push(Te[0])),Le)),Ae=this.quickInputService.createQuickPick();return Ae.placeholder=Se,Ae.matchOnDescription=!0,Ae.onDidTriggerItemButton(Le=>{let Me=Le.item.task;this.quickInputService.cancel(),B.ContributedTask.is(Me)?this.customize(Me,void 0,!0):B.CustomTask.is(Me)&&this.openConfig(Me)}),Ae.busy=!0,xe.then(Le=>{Ae.busy=!1,Ae.items=Le}),Ae.show(),new Promise(Le=>{this._register(Ae.onDidAccept(async()=>{let Me=Ae.selectedItems?Ae.selectedItems[0]:void 0;if(_e.isCancellationRequested){const We=(await xe)[0];We.task&&(Me=We)}Ae.dispose(),Me||Le(void 0),Le(Me)}))})}needsRecentTasksMigration(){return this.getRecentlyUsedTasksV1().size>0&&this.getRecentlyUsedTasks().size===0}async migrateRecentTasks(de){if(!this.needsRecentTasksMigration())return;let Se=this.getRecentlyUsedTasksV1(),we=Object.create(null);de.forEach(ke=>{let Ie=ke.getRecentlyUsedKey();Ie&&(we[Ie]=ke)});const ye=[...Se.keys()].reverse();for(const ke in ye){let Ie=we[ke];Ie&&await this.setRecentlyUsedTask(Ie)}this.storageService.remove(ni.RecentlyUsedTasks_Key,1)}showIgnoredFoldersMessage(){return this.ignoredWorkspaceFolders.length===0||!this.showIgnoreMessage||this.notificationService.prompt(f.default.Info,t.localize(48,null,this.ignoredWorkspaceFolders.map(de=>de.name).join(", ")),[{label:t.localize(49,null),isSecondary:!0,run:()=>{this.storageService.store(ni.IgnoreTask010DonotShowAgain_key,!0,1,0),this._showIgnoreMessage=!1}}]),Promise.resolve(void 0)}async trust(){return await this.workspaceTrustRequestService.requestWorkspaceTrust({message:t.localize(50,null)})===!0}runTaskCommand(de){if(!this.canRunCommand())return;let Se=this.getTaskIdentifier(de);Se!==void 0?this.getGroupedTasks().then(async we=>{let ye=this.createResolver(we),ke=this.contextService.getWorkspace().folders.map(Ie=>Ie.uri);this.contextService.getWorkbenchState()===3&&ke.push(this.contextService.getWorkspace().configuration),ke.push(P.USER_TASKS_GROUP_KEY);for(let Ie of ke){let Te=await ye.resolve(Ie,Se);if(Te){this.run(Te).then(void 0,De=>{});return}}this.doRunTaskCommand(we.all())},()=>{this.doRunTaskCommand()}):this.doRunTaskCommand()}tasksAndGroupedTasks(de){if(!this.versionAndEngineCompatible(de))return{tasks:Promise.resolve([]),grouped:Promise.resolve(new ve)};const Se=this.getGroupedTasks(de?de.type:void 0);return{tasks:Se.then(ye=>{if(!de||!de.type)return ye.all();let ke=[];return ye.forEach(Ie=>{for(let Te of Ie)if(B.ContributedTask.is(Te)&&Te.defines.type===de.type)ke.push(Te);else if(B.CustomTask.is(Te))if(Te.type===de.type)ke.push(Te);else{let De=Te.customizes();De&&De.type===de.type&&ke.push(Te)}}),ke}),grouped:Se}}doRunTaskCommand(de){const Se=ye=>{ye!==void 0&&(ye===null?this.runConfigureTasks():this.run(ye,{attachProblemMatcher:!0},1).then(void 0,ke=>{}))},we=t.localize(51,null);this.showIgnoredFoldersMessage().then(()=>{if(this.configurationService.getValue(me)){let ye;de||(ye=this.tasksAndGroupedTasks()),this.showQuickPick(de||ye.tasks,we,{label:t.localize(52,null),task:null},!0).then(ke=>Se(ke?ke.task:void 0))}else this.showTwoLevelQuickPick(we,{label:t.localize(53,null),task:null}).then(Se)})}reRunTaskCommand(){!this.canRunCommand()||n.ProblemMatcherRegistry.onReady().then(()=>this.editorService.saveAll({reason:2}).then(()=>{let de=this.getTaskSystem().rerun();return de?this.handleExecuteResult(de):(this.doRunTaskCommand(),Promise.resolve(void 0))}))}splitPerGroupType(de){let Se=[],we=[];for(let ye of de)ye.configurationProperties.group.isDefault?we.push(ye):Se.push(ye);return{none:Se,defaults:we}}runBuildCommand(){if(!this.canRunCommand())return;if(this.schemaVersion===1){this.build();return}let de={location:10,title:t.localize(54,null)},Se=(async()=>{const we=await this._findWorkspaceTasksInGroup(B.TaskGroup.Build,!1);async function ye(ke,Ie,Te){Te.run(ke,Ie,1).then(void 0,De=>{})}if(we.length===1){const ke=we[0];if(B.ConfiguringTask.is(ke))return this.tryResolveTask(ke).then(Ie=>{ye(Ie,void 0,this)});ye(ke,void 0,this);return}return this.getTasksForGroup(B.TaskGroup.Build).then(ke=>{if(ke.length>0){let{none:Ie,defaults:Te}=this.splitPerGroupType(ke);if(Te.length===1){ye(Te[0],void 0,this);return}else Te.length+Ie.length>0&&(ke=Te.concat(Ie))}this.showIgnoredFoldersMessage().then(()=>{this.showQuickPick(ke,t.localize(55,null),{label:t.localize(56,null),task:null},!0).then(Ie=>{let Te=Ie?Ie.task:void 0;if(Te!==void 0){if(Te===null){this.runConfigureDefaultBuildTask();return}ye(Te,{attachProblemMatcher:!0},this)}})})})})();this.progressService.withProgress(de,()=>Se)}runTestCommand(){if(!this.canRunCommand())return;if(this.schemaVersion===1){this.runTest();return}let de={location:10,title:t.localize(57,null)},Se=this.getTasksForGroup(B.TaskGroup.Test).then(we=>{if(we.length>0){let{none:ye,defaults:ke}=this.splitPerGroupType(we);if(ke.length===1){this.run(ke[0],void 0,1).then(void 0,Ie=>{});return}else ke.length+ye.length>0&&(we=ke.concat(ye))}this.showIgnoredFoldersMessage().then(()=>{this.showQuickPick(we,t.localize(58,null),{label:t.localize(59,null),task:null},!0).then(ye=>{let ke=ye?ye.task:void 0;if(ke!==void 0){if(ke===null){this.runConfigureTasks();return}this.run(ke,void 0,1).then(void 0,Ie=>{})}})})});this.progressService.withProgress(de,()=>Se)}runTerminateCommand(de){if(!this.canRunCommand())return;if(de==="terminateAll"){this.terminateAll();return}let Se=we=>{this.showQuickPick(we||this.getActiveTasks(),t.localize(60,null),{label:t.localize(61,null),task:void 0},!1,!0,void 0,[{label:t.localize(62,null),id:"terminateAll",task:void 0}]).then(ye=>{ye&&ye.id==="terminateAll"&&this.terminateAll();let ke=ye?ye.task:void 0;ke!=null&&this.terminate(ke)})};if(this.inTerminal()){let we=this.getTaskIdentifier(de),ye;we!==void 0?(ye=this.getActiveTasks(),ye.then(ke=>{for(let Ie of ke)if(Ie.matches(we)){this.terminate(Ie);return}Se(ye)})):Se()}else this.isActive().then(we=>{we&&this.terminateAll().then(ye=>{let ke=ye[0];ke.success||(ke.code&&ke.code===3?this.notificationService.error(t.localize(63,null)):this.notificationService.error(t.localize(64,null)))})})}runRestartTaskCommand(de){if(!this.canRunCommand())return;let Se=we=>{this.showQuickPick(we||this.getActiveTasks(),t.localize(65,null),{label:t.localize(66,null),task:null},!1,!0).then(ye=>{let ke=ye?ye.task:void 0;ke!=null&&this.restart(ke)})};if(this.inTerminal()){let we=this.getTaskIdentifier(de),ye;we!==void 0?(ye=this.getActiveTasks(),ye.then(ke=>{for(let Ie of ke)if(Ie.matches(we)){this.restart(Ie);return}Se(ye)})):Se()}else this.getActiveTasks().then(we=>{if(we.length===0)return;let ye=we[0];this.restart(ye)})}getTaskIdentifier(de){let Se;return C.isString(de)?Se=de:de&&C.isString(de.type)&&(Se=B.TaskDefinition.createTaskIdentifier(de,console)),Se}configHasTasks(de){return!!de&&!!de.tasks&&de.tasks.length>0}openTaskFile(de,Se){let we=!1;this.fileService.stat(de).then(ye=>ye,()=>{}).then(async ye=>{const ke=!!ye,Ie=this.configurationService.inspect("tasks");let Te,De;switch(Se){case B.TaskSourceKind.User:Te=this.configHasTasks(Ie.userValue),De=1;break;case B.TaskSourceKind.WorkspaceFile:Te=this.configHasTasks(Ie.workspaceValue),De=4;break;default:Te=this.configHasTasks(Ie.workspaceFolderValue),De=5}let _e;if(!Te){const Re=await this.quickInputService.pick((0,V.getTemplates)(),{placeHolder:t.localize(67,null)});if(!Re)return Promise.resolve(void 0);_e=Re.content;let Ne=this.configurationService.getValue();Ne.editor.insertSpaces&&(_e=_e.replace(/(\n)(\t+)/g,(xe,Ae,Le)=>Ae+" ".repeat(Le.length*Ne.editor.tabSize))),we=!0}if(!ke&&_e)return this.textFileService.create([{resource:de,value:_e}]).then(Re=>Re[0].resource);if(ke&&(Te||_e))return _e&&this.configurationService.updateValue("tasks",k.parse(_e),De),ye?.resource}).then(ye=>{!ye||this.editorService.openEditor({resource:ye,options:{pinned:we}})})}isTaskEntry(de){let Se=de;return Se&&!!Se.task}isSettingEntry(de){let Se=de;return Se&&!!Se.settingType}configureTask(de){B.ContributedTask.is(de)?this.customize(de,void 0,!0):B.CustomTask.is(de)?this.openConfig(de):B.ConfiguringTask.is(de)}handleSelection(de){if(!!de)if(this.isTaskEntry(de))this.configureTask(de.task);else if(this.isSettingEntry(de))new te.TaskQuickPick(this,this.configurationService,this.quickInputService,this.notificationService,this.dialogService).handleSettingOption(de.settingType);else if(de.folder&&this.contextService.getWorkbenchState()!==1)this.openTaskFile(de.folder.toResource(".vscode/tasks.json"),B.TaskSourceKind.Workspace);else{const Se=this.getResourceForKind(B.TaskSourceKind.User);Se&&this.openTaskFile(Se,B.TaskSourceKind.User)}}getTaskDescription(de){let Se;if(de._source.kind===B.TaskSourceKind.User)Se=t.localize(68,null);else if(de._source.kind===B.TaskSourceKind.WorkspaceFile)Se=de.getWorkspaceFileName();else if(this.needsFolderQualification()){let we=de.getWorkspaceFolder();we&&(Se=we.name)}return Se}async runConfigureTasks(){if(!await this.trust()||!this.canRunCommand())return;let de;this.schemaVersion===2?de=this.getGroupedTasks():de=Promise.resolve(new ve);let Se=this.contextService.getWorkspace().folders.map(Re=>this.fileService.stat(Re.toResource(".vscode/tasks.json")).then(Ne=>Ne,()=>{})),we=t.localize(69,null),ye=t.localize(70,null);const ke=new J.CancellationTokenSource,Ie=ke.token;let Te=Promise.all(Se).then(Re=>de.then(Ne=>{let xe=[],Ae=0,Le=Ne.all();if(Le.length>0){Le=Le.sort((We,Ve)=>We._label.localeCompare(Ve._label));for(let We of Le)xe.push({label:We._label,task:We,description:this.getTaskDescription(We),detail:this.showDetail()?We.configurationProperties.detail:void 0}),B.ContributedTask.is(We)||Ae++}const Me=Ae===0;if(Me||Ne.get(P.USER_TASKS_GROUP_KEY).length===Ae){let We=Re[0]!==void 0?ye:we;xe.length&&xe.push({type:"separator"}),xe.push({label:We,folder:this.contextService.getWorkspace().folders[0]})}return xe.length===1&&!Me&&ke.cancel(),xe}));if(!await Promise.race([new Promise(Re=>{Te.then(()=>Re(!1))}),new Promise(Re=>{const Ne=setTimeout(()=>{clearTimeout(Ne),Re(!0)},200)})])&&(await Te).length===1&&this.configurationService.getValue(te.QUICKOPEN_SKIP_CONFIG)){const Re=(await Te)[0];if(Re.task){this.handleSelection(Re);return}}const _e=Te.then(Re=>(Re.push(...te.TaskQuickPick.allSettingEntries(this.configurationService)),Re));this.quickInputService.pick(_e,{placeHolder:t.localize(71,null)},Ie).then(async Re=>{if(Ie.isCancellationRequested){const Ne=(await Te)[0];Ne.task&&(Re=Ne)}this.handleSelection(Re)})}runConfigureDefaultBuildTask(){!this.canRunCommand()||(this.schemaVersion===2?this.tasks().then(de=>{if(de.length===0){this.runConfigureTasks();return}let Se,we;for(let ye of de){let ke=B.TaskGroup.from(ye.configurationProperties.group);if(ke&&ke.isDefault&&ke._id===B.TaskGroup.Build._id){Se=ye;break}}Se&&(we={label:t.localize(72,null,Se.getQualifiedLabel()),task:Se,detail:this.showDetail()?Se.configurationProperties.detail:void 0}),this.showIgnoredFoldersMessage().then(()=>{this.showQuickPick(de,t.localize(73,null),void 0,!0,!1,we).then(ye=>{let ke=ye?ye.task:void 0;ke!=null&&(ke===Se&&B.CustomTask.is(ke)&&this.openConfig(ke),B.InMemoryTask.is(ke)||this.customize(ke,{group:{kind:"build",isDefault:!0}},!0).then(()=>{Se&&ke!==Se&&!B.InMemoryTask.is(Se)&&this.customize(Se,{group:"build"},!1)}))})})}):this.runConfigureTasks())}runConfigureDefaultTestTask(){!this.canRunCommand()||(this.schemaVersion===2?this.tasks().then(de=>{if(de.length===0){this.runConfigureTasks();return}let Se,we;for(let ye of de){let ke=B.TaskGroup.from(ye.configurationProperties.group);if(ke&&ke.isDefault&&ke._id===B.TaskGroup.Test._id){Se=ye;break}}Se&&(we={label:t.localize(74,null,Se.getQualifiedLabel()),task:Se,detail:this.showDetail()?Se.configurationProperties.detail:void 0}),this.showIgnoredFoldersMessage().then(()=>{this.showQuickPick(de,t.localize(75,null),void 0,!0,!1,we).then(ye=>{let ke=ye?ye.task:void 0;!ke||(ke===Se&&B.CustomTask.is(ke)&&this.openConfig(ke),B.InMemoryTask.is(ke)||this.customize(ke,{group:{kind:"test",isDefault:!0}},!0).then(()=>{Se&&ke!==Se&&!B.InMemoryTask.is(Se)&&this.customize(Se,{group:"test"},!1)}))})})}):this.runConfigureTasks())}async runShowTasks(){if(!this.canRunCommand())return;const de=this.getActiveTasks(),Se=await de;let we;Se.length===1?this._taskSystem.revealTask(Se[0]):Se.length&&Se.every(ye=>B.InMemoryTask.is(ye)?!1:(we||(we=ye.command.presentation?.group),ye.command.presentation?.group&&ye.command.presentation.group===we))?this._taskSystem.revealTask(Se[0]):this.showQuickPick(de,t.localize(76,null),{label:t.localize(77,null),task:null},!1,!0).then(ye=>{let ke=ye?ye.task:void 0;ke!=null&&this._taskSystem.revealTask(ke)})}async createTasksDotOld(de){const Se=de.toResource(".vscode/tasks.json");if(await this.fileService.exists(Se)){const we=Se.with({path:`${Se.path}.old`});return await this.fileService.copy(Se,we,!0),[we,Se]}}upgradeTask(de,Se,we){if(!B.CustomTask.is(de))return;const ye={label:de._label},ke=new Set(["gulp","jake","grunt"]);C.isString(de.command.name)&&ke.has(de.command.name)?(ye.type=de.command.name,ye.task=de.command.args[0]):(de.command.runtime===B.RuntimeType.Shell&&(ye.type=B.RuntimeType.toString(B.RuntimeType.Shell)),de.command.name&&!Se&&!we.windows?.command&&!we.osx?.command&&!we.linux?.command?ye.command=de.command.name:Se&&(ye.command=de._source.config.element.command),de.command.args&&(!C.isArray(de.command.args)||de.command.args.length>0)&&(!we.windows?.args&&!we.osx?.args&&!we.linux?.args?ye.args=de.command.args:ye.args=de._source.config.element.args)),de.configurationProperties.presentation&&(ye.presentation=de.configurationProperties.presentation),de.configurationProperties.isBackground&&(ye.isBackground=de.configurationProperties.isBackground),de.configurationProperties.problemMatchers&&(ye.problemMatcher=de._source.config.element.problemMatcher),de.configurationProperties.group&&(ye.group=de.configurationProperties.group),de._source.config.element=ye;const Ie=new B.CustomTask(de._id,de._source,de._label,de.type,de.command,de.hasDefinedMatchers,de.runOptions,de.configurationProperties),Te=this.createCustomizableTask(Ie);if(Te)return Te}async upgrade(){if(this.schemaVersion===2)return;if(!this.workspaceTrustManagementService.isWorkspaceTrusted()){this._register(v.Event.once(this.workspaceTrustManagementService.onDidChangeTrust)(we=>{we&&this.upgrade()}));return}const de=await this.getGroupedTasks(),Se=[];for(const we of this.workspaceFolders){const ye=await this.createTasksDotOld(we);if(ye&&Se.push(ye),!ye)continue;const ke=[],Ie=!!this.configurationService.getValue("tasks.suppressTaskName",{resource:we.uri}),Te={windows:this.configurationService.getValue("tasks.windows",{resource:we.uri}),osx:this.configurationService.getValue("tasks.osx",{resource:we.uri}),linux:this.configurationService.getValue("tasks.linux",{resource:we.uri})};de.get(we).forEach(De=>{const _e=this.upgradeTask(De,Ie,Te);_e&&ke.push(_e)}),this._taskSystem=void 0,this._workspaceTasksPromise=void 0,await this.writeConfiguration(we,"tasks.tasks",ke),await this.writeConfiguration(we,"tasks.version","2.0.0"),this.configurationService.getValue("tasks.showOutput",{resource:we.uri})&&await this.configurationService.updateValue("tasks.showOutput",void 0,{resource:we.uri}),this.configurationService.getValue("tasks.isShellCommand",{resource:we.uri})&&await this.configurationService.updateValue("tasks.isShellCommand",void 0,{resource:we.uri}),this.configurationService.getValue("tasks.suppressTaskName",{resource:we.uri})&&await this.configurationService.updateValue("tasks.suppressTaskName",void 0,{resource:we.uri})}this.updateSetup(),this.notificationService.prompt(f.default.Warning,Se.length===1?t.localize(78,null):t.localize(79,null),[{label:Se.length===1?t.localize(80,null):t.localize(81,null),run:async()=>{for(const we of Se)await this.editorService.openEditor({original:{resource:we[0]},modified:{resource:we[1]}})}}])}};he.RecentlyUsedTasks_Key="workbench.tasks.recentlyUsedTasks",he.RecentlyUsedTasks_KeyV2="workbench.tasks.recentlyUsedTasks2",he.IgnoreTask010DonotShowAgain_key="workbench.tasks.ignoreTask010Shown",he.OutputChannelId="tasks",he.OutputChannelLabel=t.localize(1,null),he.nextHandle=0,he=Ee([W(0,r.IConfigurationService),W(1,s.IMarkerService),W(2,F.IOutputService),W(3,oe.IPaneCompositePartService),W(4,ee.IViewsService),W(5,a.ICommandService),W(6,T.IEditorService),W(7,p.IFileService),W(8,O.IWorkspaceContextService),W(9,l.ITelemetryService),W(10,x.ITextFileService),W(11,E.IModelService),W(12,u.IExtensionService),W(13,H.IQuickInputService),W(14,R.IConfigurationResolverService),W(15,L.ITerminalService),W(16,L.ITerminalGroupService),W(17,h.IStorageService),W(18,g.IProgressService),W(19,d.IOpenerService),W(20,b.IDialogService),W(21,m.INotificationService),W(22,G.IContextKeyService),W(23,Z.IWorkbenchEnvironmentService),W(24,M.ITerminalProfileResolverService),W(25,j.IPathService),W(26,Y.ITextModelService),W(27,$.IPreferencesService),W(28,ee.IViewDescriptorService),W(29,le.IWorkspaceTrustRequestService),W(30,le.IWorkspaceTrustManagementService),W(31,se.ILogService)],he),e.AbstractTaskService=he}),define(ne[2624],re([1,0,1736,2,17,16,297,67,146,145,255,273,269,47,862,94,2325,2327,913,191,57,74,210,2328,7,366,13]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TaskStatusBarContributions=void 0;const b=g.ContextKeyExpr.or(o.ShellExecutionSupportedContext,o.ProcessExecutionSupportedContext),E=_.Registry.as(c.Extensions.Workbench);E.registerWorkbenchContribution(i.RunAutomaticTasks,4),(0,A.registerAction2)(i.ManageAutomaticTaskRunning),A.MenuRegistry.appendMenuItem(A.MenuId.CommandPalette,{command:{id:i.ManageAutomaticTaskRunning.ID,title:i.ManageAutomaticTaskRunning.LABEL,category:C.TASKS_CATEGORY},when:b});let y=class extends f.Disposable{constructor(N,B,P){super();this.taskService=N,this.statusbarService=B,this.progressService=P,this.activeTasksCount=0,this.registerListeners()}registerListeners(){let N,B;this.taskService.onDidStateChange(P=>{if(P.kind==="changed"&&this.updateRunningTasksStatus(),!this.ignoreEventForUpdateRunningTasksCount(P))switch(P.kind){case"active":this.activeTasksCount++,this.activeTasksCount===1&&(N||(N=new Promise(V=>{B=V})));break;case"inactive":this.activeTasksCount>0&&(this.activeTasksCount--,this.activeTasksCount===0&&N&&B&&B());break;case"terminated":this.activeTasksCount!==0&&(this.activeTasksCount=0,N&&B&&B());break}N&&P.kind==="active"&&this.activeTasksCount===1&&this.progressService.withProgress({location:10,command:"workbench.action.tasks.showTasks"},V=>(V.report({message:t.localize(0,null)}),N)).then(()=>{N=void 0})})}async updateRunningTasksStatus(){const N=await this.taskService.getActiveTasks();if(N.length===0)this.runningTasksStatusItem&&(this.runningTasksStatusItem.dispose(),this.runningTasksStatusItem=void 0);else{const B={name:t.localize(1,null),text:`$(tools) ${N.length}`,ariaLabel:t.localize(2,null,N.length),tooltip:t.localize(3,null),command:"workbench.action.tasks.showTasks"};this.runningTasksStatusItem?this.runningTasksStatusItem.update(B):this.runningTasksStatusItem=this.statusbarService.addEntry(B,"status.runningTasks",0,49)}}ignoreEventForUpdateRunningTasksCount(N){return this.taskService.inTerminal()?((0,m.isString)(N.group)?N.group:N.group?._id)!==C.TaskGroup.Build._id?!0:N.__task?N.__task.configurationProperties.problemMatchers===void 0||N.__task.configurationProperties.problemMatchers.length===0:!1:!1}};y=Ee([W(0,o.ITaskService),W(1,w.IStatusbarService),W(2,D.IProgressService)],y),e.TaskStatusBarContributions=y,E.registerWorkbenchContribution(y,3),A.MenuRegistry.appendMenuItem(A.MenuId.MenubarTerminalMenu,{group:"2_run",command:{id:"workbench.action.tasks.runTask",title:t.localize(4,null)},order:1,when:b}),A.MenuRegistry.appendMenuItem(A.MenuId.MenubarTerminalMenu,{group:"2_run",command:{id:"workbench.action.tasks.build",title:t.localize(5,null)},order:2,when:b}),A.MenuRegistry.appendMenuItem(A.MenuId.MenubarTerminalMenu,{group:"3_manage",command:{precondition:C.TASK_RUNNING_STATE,id:"workbench.action.tasks.showTasks",title:t.localize(6,null)},order:1,when:b}),A.MenuRegistry.appendMenuItem(A.MenuId.MenubarTerminalMenu,{group:"3_manage",command:{precondition:C.TASK_RUNNING_STATE,id:"workbench.action.tasks.restartTask",title:t.localize(7,null)},order:2,when:b}),A.MenuRegistry.appendMenuItem(A.MenuId.MenubarTerminalMenu,{group:"3_manage",command:{precondition:C.TASK_RUNNING_STATE,id:"workbench.action.tasks.terminate",title:t.localize(8,null)},order:3,when:b}),A.MenuRegistry.appendMenuItem(A.MenuId.MenubarTerminalMenu,{group:"4_configure",command:{id:"workbench.action.tasks.configureTaskRunner",title:t.localize(9,null)},order:1,when:b}),A.MenuRegistry.appendMenuItem(A.MenuId.MenubarTerminalMenu,{group:"4_configure",command:{id:"workbench.action.tasks.configureDefaultBuildTask",title:t.localize(10,null)},order:2,when:b}),A.MenuRegistry.appendMenuItem(A.MenuId.CommandPalette,{command:{id:"workbench.action.tasks.openWorkspaceFileTasks",title:{value:t.localize(11,null),original:"Open Workspace Tasks"},category:C.TASKS_CATEGORY},when:g.ContextKeyExpr.and(a.WorkbenchStateContext.isEqualTo("workspace"),b)}),A.MenuRegistry.appendMenuItem(A.MenuId.CommandPalette,{command:{id:r.ConfigureTaskAction.ID,title:{value:r.ConfigureTaskAction.TEXT,original:"Configure Task"},category:C.TASKS_CATEGORY},when:b}),A.MenuRegistry.appendMenuItem(A.MenuId.CommandPalette,{command:{id:"workbench.action.tasks.showLog",title:{value:t.localize(12,null),original:"Show Task Log"},category:C.TASKS_CATEGORY},when:b}),A.MenuRegistry.appendMenuItem(A.MenuId.CommandPalette,{command:{id:"workbench.action.tasks.runTask",title:{value:t.localize(13,null),original:"Run Task"},category:C.TASKS_CATEGORY}}),A.MenuRegistry.appendMenuItem(A.MenuId.CommandPalette,{command:{id:"workbench.action.tasks.reRunTask",title:{value:t.localize(14,null),original:"Rerun Last Task"},category:C.TASKS_CATEGORY},when:b}),A.MenuRegistry.appendMenuItem(A.MenuId.CommandPalette,{command:{id:"workbench.action.tasks.restartTask",title:{value:t.localize(15,null),original:"Restart Running Task"},category:C.TASKS_CATEGORY},when:b}),A.MenuRegistry.appendMenuItem(A.MenuId.CommandPalette,{command:{id:"workbench.action.tasks.showTasks",title:{value:t.localize(16,null),original:"Show Running Tasks"},category:C.TASKS_CATEGORY},when:b}),A.MenuRegistry.appendMenuItem(A.MenuId.CommandPalette,{command:{id:"workbench.action.tasks.terminate",title:{value:t.localize(17,null),original:"Terminate Task"},category:C.TASKS_CATEGORY},when:b}),A.MenuRegistry.appendMenuItem(A.MenuId.CommandPalette,{command:{id:"workbench.action.tasks.build",title:{value:t.localize(18,null),original:"Run Build Task"},category:C.TASKS_CATEGORY},when:b}),A.MenuRegistry.appendMenuItem(A.MenuId.CommandPalette,{command:{id:"workbench.action.tasks.test",title:{value:t.localize(19,null),original:"Run Test Task"},category:C.TASKS_CATEGORY},when:b}),A.MenuRegistry.appendMenuItem(A.MenuId.CommandPalette,{command:{id:"workbench.action.tasks.configureDefaultBuildTask",title:{value:t.localize(20,null),original:"Configure Default Build Task"},category:C.TASKS_CATEGORY},when:b}),A.MenuRegistry.appendMenuItem(A.MenuId.CommandPalette,{command:{id:"workbench.action.tasks.configureDefaultTestTask",title:{value:t.localize(21,null),original:"Configure Default Test Task"},category:C.TASKS_CATEGORY},when:b}),A.MenuRegistry.appendMenuItem(A.MenuId.CommandPalette,{command:{id:"workbench.action.tasks.openUserTasks",title:{value:t.localize(22,null),original:"Open User Tasks"},category:C.TASKS_CATEGORY},when:b}),S.KeybindingsRegistry.registerKeybindingRule({id:"workbench.action.tasks.build",weight:200,when:void 0,primary:2048|1024|32}),_.Registry.as(v.Extensions.OutputChannels).registerChannel({id:r.AbstractTaskService.OutputChannelId,label:r.AbstractTaskService.OutputChannelLabel,log:!1});const R=_.Registry.as(n.Extensions.Quickaccess),O="inTasksPicker";R.registerQuickAccessProvider({ctor:h.TasksQuickAccessProvider,prefix:h.TasksQuickAccessProvider.PREFIX,contextKey:O,placeholder:t.localize(23,null),helpEntries:[{description:t.localize(24,null),needsEditor:!1}]});let x={id:p.tasksSchemaId,description:"Task definition file",type:"object",allowTrailingCommas:!0,allowComments:!0,default:{version:"2.0.0",tasks:[{label:"My Task",command:"echo hello",type:"shell",args:[],problemMatcher:["$tsc"],presentation:{reveal:"always"},group:"build"}]}};x.definitions={...s.default.definitions,...l.default.definitions},x.oneOf=[...l.default.oneOf||[],...s.default.oneOf||[]];let F=_.Registry.as(I.Extensions.JSONContribution);F.registerSchema(p.tasksSchemaId,x),k.ProblemMatcherRegistry.onMatcherChanged(()=>{(0,l.updateProblemMatchers)(),F.notifySchemaChanged(p.tasksSchemaId)}),d.TaskDefinitionRegistry.onDefinitionsChanged(()=>{(0,l.updateTaskDefinitions)(),F.notifySchemaChanged(p.tasksSchemaId)}),_.Registry.as(u.Extensions.Configuration).registerConfiguration({id:"task",order:100,title:t.localize(25,null),type:"object",properties:{"task.problemMatchers.neverPrompt":{markdownDescription:t.localize(26,null),oneOf:[{type:"boolean",markdownDescription:t.localize(27,null)},{type:"object",patternProperties:{".*":{type:"boolean"}},markdownDescription:t.localize(28,null),default:{shell:!0}}],default:!1},"task.autoDetect":{markdownDescription:t.localize(29,null),type:"string",enum:["on","off"],default:"on"},"task.slowProviderWarning":{markdownDescription:t.localize(30,null),oneOf:[{type:"boolean",markdownDescription:t.localize(31,null)},{type:"array",items:{type:"string",markdownDescription:t.localize(32,null)}}],default:!0},"task.quickOpen.history":{markdownDescription:t.localize(33,null),type:"number",default:30,minimum:0,maximum:30},"task.quickOpen.detail":{markdownDescription:t.localize(34,null),type:"boolean",default:!0},"task.quickOpen.skip":{type:"boolean",description:t.localize(35,null),default:!1},"task.quickOpen.showAll":{type:"boolean",description:t.localize(36,null),default:!1},"task.saveBeforeRun":{markdownDescription:t.localize(37,null),type:"string",enum:["always","never","prompt"],enumDescriptions:[t.localize(38,null),t.localize(39,null),t.localize(40,null)],default:"always"}}})}),define(ne[2625],re([1,0,1750,401,34,273,913,269,35,864,54,52,61,28,8,7,23,31,125,26,41,67,53,24,27,43,201,105,218,21,50,40,76,101,108,83,114,120,88]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TaskService=void 0;let P=class extends k.AbstractTaskService{constructor(z,U,H,K,G,q,Z,j,X,Y,$,J,ee,te,se,ie,ce,le,ae,ue,oe,fe,pe,me,be,Ce,ve,he,ge,de,Se,we,ye){super(z,U,H,K,G,q,Z,j,X,Y,$,ee,te,se,ie,ce,le,ae,ue,oe,fe,pe,me,be,Ce,ve,he,ge,de,Se,we,ye);this._register(J.onBeforeShutdown(ke=>ke.veto(this.beforeShutdown(),"veto.tasks")))}getTaskSystem(){return this._taskSystem?this._taskSystem:(this._taskSystem=this.createTerminalTaskSystem(),this._taskSystemListener=this._taskSystem.onDidStateChange(z=>{this._taskSystem&&this._taskRunningState.set(this._taskSystem.isActiveSync()),this._onDidStateChange.fire(z)}),this._taskSystem)}computeLegacyConfiguration(z){let{config:U,hasParseErrors:H}=this.getConfiguration(z);return H?Promise.resolve({workspaceFolder:z,hasErrors:!0,config:void 0}):U?Promise.resolve({workspaceFolder:z,config:U,hasErrors:!1}):Promise.resolve({workspaceFolder:z,hasErrors:!0,config:void 0})}versionAndEngineCompatible(z){let U=z&&z.version?z.version:void 0,H=this.executionEngine;return U===void 0||f.satisfies("0.1.0",U)&&H===A.ExecutionEngine.Process||f.satisfies("2.0.0",U)&&H===A.ExecutionEngine.Terminal}beforeShutdown(){if(!this._taskSystem||!this._taskSystem.isActiveSync()||this._taskSystem instanceof w.TerminalTaskSystem)return!1;let z;return this._taskSystem.canAutoTerminate()?z=Promise.resolve({confirmed:!0}):z=this.dialogService.confirm({message:t.localize(0,null),primaryButton:t.localize(1,null),type:"question"}),z.then(U=>U.confirmed?this._taskSystem.terminateAll().then(H=>{let K=!0,G;for(let q of H)K=K&&q.success,G===void 0&&q.code!==void 0&&(G=q.code);return K?(this._taskSystem=void 0,this.disposeTaskSystemListeners(),!1):G&&G===3?this.dialogService.confirm({message:t.localize(2,null),primaryButton:t.localize(3,null),type:"info"}).then(q=>!q.confirmed):!0},H=>!0):!0)}};P=Ee([W(0,i.IConfigurationService),W(1,r.IMarkerService),W(2,m.IOutputService),W(3,B.IPaneCompositePartService),W(4,d.IViewsService),W(5,c.ICommandService),W(6,y.IEditorService),W(7,s.IFileService),W(8,_.IWorkspaceContextService),W(9,g.ITelemetryService),W(10,L.ITextFileService),W(11,O.ILifecycleService),W(12,C.IModelService),W(13,R.IExtensionService),W(14,n.IQuickInputService),W(15,E.IConfigurationResolverService),W(16,b.ITerminalService),W(17,b.ITerminalGroupService),W(18,h.IStorageService),W(19,a.IProgressService),W(20,u.IOpenerService),W(21,v.IDialogService),W(22,p.INotificationService),W(23,S.IContextKeyService),W(24,T.IWorkbenchEnvironmentService),W(25,N.ITerminalProfileResolverService),W(26,x.IPathService),W(27,o.ITextModelService),W(28,F.IPreferencesService),W(29,d.IViewDescriptorService),W(30,M.IWorkspaceTrustRequestService),W(31,M.IWorkspaceTrustManagementService),W(32,l.ILogService)],P),e.TaskService=P,(0,I.registerSingleton)(D.ITaskService,P,!0)}),define(ne[2626],re([1,0,10,78,134,262,36,11,92,1788,16,37,5,12,628,293,328,329,496,250]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestingExplorerFilter=void 0;const u={["@failed"]:(0,w.localize)(0,null),["@executed"]:(0,w.localize)(1,null),["@doc"]:(0,w.localize)(2,null),["@hidden"]:(0,w.localize)(3,null)};let a=class extends _.BaseActionViewItem{constructor(g,d,m,b,E){super(null,g);this.state=d,this.themeService=m,this.instantiationService=b,this.testService=E,this.history=this.instantiationService.createInstance(s.StoredValue,{key:"testing.filterHistory2",scope:1,target:0}),this.filtersAction=new k.Action("markersFiltersAction",(0,w.localize)(4,null),"testing-filter-button "+c.ThemeIcon.asClassName(S.testingFilterIcon)),this.updateFilterActiveState(),this._register(E.excluded.onTestExclusionsChanged(this.updateFilterActiveState,this))}render(g){g.classList.add("testing-filter-action-item");const d=this._register(new D.Delayer(400)),m=this.wrapper=t.$(".testing-filter-wrapper");g.appendChild(m);const b=this.input=this._register(this.instantiationService.createInstance(i.ContextScopedSuggestEnabledInputWithHistory,{id:"testing.explorer.filter",ariaLabel:(0,w.localize)(5,null),parent:m,suggestionProvider:{triggerCharacters:["@"],provideResults:()=>[...Object.entries(u).map(([y,T])=>({label:y,detail:T})),...I.Iterable.map(this.testService.collection.tags.values(),y=>{const{ctrlId:T,tagId:R}=(0,l.denamespaceTestTag)(y.id),O=`@${T}:${R}`;return{label:`@${T}:${R}`,detail:y.ctrlLabel,insertText:R.includes(" ")?`@${T}:"${R.replace(/(["\\])/g,"\\$1")}"`:O}})].filter(y=>!this.state.text.value.includes(y.label))},resourceHandle:"testing:filter",suggestOptions:{value:this.state.text.value,placeholderText:(0,w.localize)(6,null)},history:this.history.get([])}));this._register((0,i.attachSuggestEnabledInputBoxStyler)(b,this.themeService)),this._register(this.state.text.onDidChange(y=>{b.getValue()!==y&&b.setValue(y)})),this._register(this.state.onDidRequestInputFocus(()=>{b.focus()})),this._register(b.onInputDidChange(()=>d.trigger(()=>{b.addToHistory(),this.state.setText(b.getValue())}))),this._register(new f.ActionBar(g,{actionViewItemProvider:y=>{if(y.id===this.filtersAction.id)return this.instantiationService.createInstance(n,y,this.state,this.actionRunner)}})).push(this.filtersAction,{icon:!0,label:!1}),this.layout(this.wrapper.clientWidth)}layout(g){this.input.layout(new t.Dimension(g-24-8-22,27-4))}focus(){this.input.focus()}saveState(){const g=this.input.getHistory();g.length?this.history.store(g):this.history.delete()}dispose(){this.saveState(),super.dispose()}updateFilterActiveState(){this.filtersAction.checked=this.testService.excluded.hasAny}};a=Ee([W(1,r.ITestExplorerFilterState),W(2,c.IThemeService),W(3,o.IInstantiationService),W(4,p.ITestService)],a),e.TestingExplorerFilter=a;let n=class extends A.DropdownMenuActionViewItem{constructor(g,d,m,b,E){super(g,{getActions:()=>this.getActions()},b,{actionRunner:m,classNames:g.class,anchorAlignmentProvider:()=>1,menuAsChild:!0});this.filters=d,this.testService=E}render(g){super.render(g),this.updateChecked()}getActions(){return[...["@failed","@executed","@doc"].map(g=>({checked:this.filters.isFilteringFor(g),class:void 0,enabled:!0,id:g,label:u[g],run:()=>this.filters.toggleFilteringFor(g),tooltip:"",dispose:()=>null})),new k.Separator,{checked:this.filters.isFilteringFor("@hidden"),class:void 0,enabled:this.testService.excluded.hasAny,id:"showExcluded",label:(0,w.localize)(7,null),run:()=>this.filters.toggleFilteringFor("@hidden"),tooltip:"",dispose:()=>null},{checked:!1,class:void 0,enabled:this.testService.excluded.hasAny,id:"removeExcluded",label:(0,w.localize)(8,null),run:async()=>this.testService.excluded.clear(),tooltip:"",dispose:()=>null}]}updateChecked(){this.element.classList.toggle("checked",this._action.checked)}};n=Ee([W(3,C.IContextMenuService),W(4,p.ITestService)],n),(0,v.registerAction2)(class extends v.Action2{constructor(){super({id:"workbench.actions.treeView.testExplorer.filter",title:(0,w.localize)(9,null)})}async run(){}})}),define(ne[2627],re([1,0,10,78,162,208,390,36,11,66,6,2,29,13,186,1789,473,73,16,28,8,7,37,23,5,38,71,41,67,24,27,32,68,12,56,178,131,43,828,2237,495,595,293,2626,888,327,594,328,496,363,270,497,330,251,216,250,21,1125]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H,K,G,q,Z,j,X,Y,$,J,ee,te,se,ie){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestingExplorerViewModel=e.TestingExplorerView=void 0;let ce=class extends M.ViewPane{constructor(De,_e,Re,Ne,xe,Ae,Le,Me,We,Ve,Ue,et,Ze,Fe){super(De,Re,_e,Ne,Le,Ae,xe,Me,We,Ue);this.testService=Ve,this.testProgressService=et,this.testProfileService=Ze,this.commandService=Fe,this.filterActionBar=this._register(new C.MutableDisposable),this.discoveryProgress=this._register(new C.MutableDisposable),this.dimensions={width:0,height:0};const Qe=this._register(new I.RunOnceScheduler(()=>this.layoutBody(),1));this._register(this.onDidChangeViewWelcomeState(()=>{this.shouldShowWelcome()||Qe.schedule()})),this._register(Ve.collection.onBusyProvidersChange(qe=>{this.updateDiscoveryProgress(qe)})),this._register(Ze.onDidChange(()=>this.updateActions()))}shouldShowWelcome(){return this.viewModel?.welcomeExperience===1}getSelectedOrVisibleItems(De){const _e=this.viewModel.projection.value;if(!_e)return{include:[],exclude:[]};if(_e instanceof P.ByNameTestItemElement)return{include:[...this.testService.collection.rootItems],exclude:[]};const Re=[],Ne=[],xe=(Ae,Le)=>{if(!(Ae instanceof V.TestItemTreeElement)||!this.viewModel.tree.hasElement(Ae))return;const Me=this.viewModel.tree.getNode(Ae);if(!Me.visible){Le&&Ne.push(Ae.test);return}!Le&&(!De||(0,ee.canUseProfileWithTest)(De,Ae.test))&&(Me.children.length===0||Me.visibleChildrenCount*2>=Me.children.length)&&Me.visibleChildrenCount!==1&&(Re.push(Ae.test),Le=!0);for(const We of Ae.children)xe(We,Le)};for(const Ae of this.testService.collection.rootItems){const Le=_e.getElementByTestId(Ae.item.extId);if(!!Le&&!(De&&!(0,ee.canUseProfileWithTest)(De,Ae)))if(this.viewModel.tree.hasElement(Le))xe(Le,!1);else{const Me=[...Le.children].reduce((We,Ve)=>this.viewModel.tree.hasElement(Ve)&&this.viewModel.tree.getNode(Ve).visible?We+1:We,0);Le.children.size>0&&Me*2>=Le.children.size?(Re.push(Le.test),Le.children.forEach(We=>xe(We,!0))):Le.children.forEach(We=>xe(We,!1))}}return{include:Re,exclude:Ne}}renderBody(De){super.renderBody(De),this.container=t.append(De,t.$(".test-explorer")),this.treeHeader=t.append(this.container,t.$(".test-explorer-header")),this.filterActionBar.value=this.createFilterActionBar();const _e=t.append(this.treeHeader,t.$(".test-explorer-messages"));this._register(this.testProgressService.onTextChange(Ne=>{const xe=!!_e.innerText,Ae=!!Ne;_e.innerText=Ne,xe!==Ae&&this.layoutBody()}));const Re=t.append(this.container,t.$(".test-explorer-tree"));this.viewModel=this.instantiationService.createInstance(ae,Re,this.onDidChangeBodyVisibility),this._register(this.viewModel.onChangeWelcomeVisibility(()=>this._onDidChangeViewWelcomeState.fire())),this._register(this.viewModel),this._onDidChangeViewWelcomeState.fire()}getActionViewItem(De){switch(De.id){case"workbench.actions.treeView.testExplorer.filter":return this.filter=this.instantiationService.createInstance(H.TestingExplorerFilter,De);case"testing.runSelected":return this.getRunGroupDropdown(2,De);case"testing.debugSelected":return this.getRunGroupDropdown(4,De);default:return super.getActionViewItem(De)}}getTestConfigGroupActions(De){const _e=[];let Re=0,Ne=!1;const xe=this.testProfileService.getGroupDefaultProfiles(De);for(const{profiles:Le,controller:Me}of this.testProfileService.all()){let We=!1;for(const Ve of Le)Ve.group===De&&(We||(We=!0,Re++,_e.push(new D.Action(`${Me.id}.$root`,Me.label.value,void 0,!1))),Ne=Ne||Ve.hasConfigurationHandler,_e.push(new D.Action(`${Me.id}.${Ve.profileId}`,xe.includes(Ve)?(0,S.localize)(0,null,Ve.label):Ve.label,void 0,void 0,()=>{const{include:Ue,exclude:et}=this.getSelectedOrVisibleItems(Ve);this.testService.runResolvedTests({exclude:et.map(Ze=>Ze.item.extId),targets:[{profileGroup:Ve.group,profileId:Ve.profileId,controllerId:Ve.controllerId,testIds:Ue.map(Ze=>Ze.item.extId)}]})})))}Re===1&&_e.shift();let Ae=[];return _e.length>1&&Ae.push(new D.Action("selectDefaultTestConfigurations",(0,S.localize)(1,null),void 0,void 0,()=>this.commandService.executeCommand("testing.selectDefaultTestProfiles",De))),Ne&&Ae.push(new D.Action("configureTestProfiles",(0,S.localize)(2,null),void 0,void 0,()=>this.commandService.executeCommand("testing.configureProfile",De))),D.Separator.join(_e,Ae)}saveState(){this.filter?.saveState(),super.saveState()}getRunGroupDropdown(De,_e){const Re=this.getTestConfigGroupActions(De);if(Re.length<2)return super.getActionViewItem(_e);const Ne=this.instantiationService.createInstance(r.MenuItemAction,{id:_e.id,title:_e.label,icon:De===2?U.testingRunAllIcon:U.testingDebugAllIcon},void 0,void 0),xe=new D.Action("selectRunConfig","Select Configuration...","codicon-chevron-down",!0);return this.instantiationService.createInstance(s.DropdownWithPrimaryActionViewItem,Ne,xe,Re,"",this.contextMenuService,{})}createFilterActionBar(){const De=new f.ActionBar(this.treeHeader,{actionViewItemProvider:_e=>this.getActionViewItem(_e),triggerKeys:{keyDown:!1,keys:[]}});return De.push(new D.Action("workbench.actions.treeView.testExplorer.filter")),De.getContainer().classList.add("testing-filter-action-bar"),De}updateDiscoveryProgress(De){!De&&this.discoveryProgress?this.discoveryProgress.clear():De&&!this.discoveryProgress.value&&(this.discoveryProgress.value=this.instantiationService.createInstance(E.UnmanagedProgress,{location:this.getProgressLocation()}))}layoutBody(De=this.dimensions.height,_e=this.dimensions.width){super.layoutBody(De,_e),this.dimensions.height=De,this.dimensions.width=_e,this.container.style.height=`${De}px`,this.viewModel.layout(De-this.treeHeader.clientHeight,_e),this.filter?.layout(_e)}};ce=Ee([W(1,n.IContextMenuService),W(2,d.IKeybindingService),W(3,u.IConfigurationService),W(4,g.IInstantiationService),W(5,N.IViewDescriptorService),W(6,a.IContextKeyService),W(7,b.IOpenerService),W(8,x.IThemeService),W(9,se.ITestService),W(10,T.ITelemetryService),W(11,K.ITestingProgressUiService),W(12,ee.ITestProfileService),W(13,p.ICommandService)],ce),e.TestingExplorerView=ce;var le;(function(Te){Te[Te.None=0]="None",Te[Te.ForWorkspace=1]="ForWorkspace",Te[Te.ForDocument=2]="ForDocument"})(le||(le={}));let ae=class extends C.Disposable{constructor(De,_e,Re,Ne,xe,Ae,Le,Me,We,Ve,Ue,et,Ze,Fe){super();this.menuService=xe,this.contextMenuService=Ae,this.testService=Le,this.filterState=Me,this.instantiationService=We,this.storageService=Ve,this.contextKeyService=Ue,this.testResults=et,this.peekOpener=Ze,this.testProfileService=Fe,this.projection=this._register(new C.MutableDisposable),this.revealTimeout=new C.MutableDisposable,this._viewMode=Y.TestingContextKeys.viewMode.bindTo(this.contextKeyService),this._viewSorting=Y.TestingContextKeys.viewSorting.bindTo(this.contextKeyService),this.welcomeVisibilityEmitter=new v.Emitter,this.actionRunner=new be(()=>this.tree.getSelection().filter(c.isDefined)),this.lastViewState=new Z.StoredValue({key:"testing.treeState",scope:1,target:1},this.storageService),this.hasPendingReveal=!1,this.onChangeWelcomeVisibility=this.welcomeVisibilityEmitter.event,this.welcomeExperience=0,this.hasPendingReveal=!!Me.reveal.value,this.noTestForDocumentWidget=this._register(We.createInstance(me,De)),this._viewMode.set(this.storageService.get("testing.viewMode",1,"true")),this._viewSorting.set(this.storageService.get("testing.viewSorting",1,"location"));const Qe=this._register(We.createInstance(L.ResourceLabels,{onDidChangeVisibility:_e}));this.reevaluateWelcomeState(),this.filter=this.instantiationService.createInstance(fe,Le.collection),this.tree=We.createInstance(m.WorkbenchObjectTree,"Test Explorer List",De,new ge,[We.createInstance(ye,Qe,this.actionRunner),We.createInstance(Se)],{simpleKeyboardNavigation:!0,identityProvider:We.createInstance(de),hideTwistiesOfChildlessElements:!1,sorter:We.createInstance(pe,this),keyboardNavigationLabelProvider:We.createInstance(he),accessibilityProvider:We.createInstance(ve),filter:this.filter}),this._register(this.tree.onDidChangeCollapseState(Ke=>{Ke.node.element instanceof V.TestItemTreeElement&&this.projection.value?.expandElement(Ke.node.element,Ke.deep?1/0:0)})),this._register(_e(Ke=>{Ke&&this.ensureProjection()})),this._register(this.tree.onContextMenu(Ke=>this.onContextMenu(Ke))),this._register(v.Event.any(Me.text.onDidChange,Le.excluded.onTestExclusionsChanged)(this.tree.refilter,this.tree)),this._register(this.tree),this._register(this.onChangeWelcomeVisibility(Ke=>{this.noTestForDocumentWidget.setVisible(Ke===2)})),this._register(t.addStandardDisposableListener(this.tree.getHTMLElement(),"keydown",Ke=>{Ke.equals(3)?this.handleExecuteKeypress(Ke):A.DefaultKeyboardNavigationDelegate.mightProducePrintableCharacter(Ke)&&(Me.text.value=Ke.browserEvent.key,Me.focusInput())})),this._register(Me.reveal.onDidChange(Ke=>this.revealById(Ke,void 0,!1))),this._register(_e(Ke=>{Ke&&Me.focusInput()})),this._register(this.tree.onDidChangeSelection(Ke=>{if(Ke.browserEvent instanceof MouseEvent&&(Ke.browserEvent.altKey||Ke.browserEvent.shiftKey))return;const Xe=Ke.elements[0];Xe&&Ke.browserEvent&&Xe instanceof V.TestItemTreeElement&&Xe.children.size===0&&Xe.test.expand===0&&this.tryPeekError(Xe)}));let qe=(0,G.getTestingConfiguration)(Re,"testing.followRunningTest");this._register(Re.onDidChangeConfiguration(()=>{qe=(0,G.getTestingConfiguration)(Re,"testing.followRunningTest")})),this._register(et.onTestChanged(Ke=>{!qe||Ke.reason===3&&(Ke.item.ownComputedState!==2&&!(Ke.previousState===1&&(0,J.isStateWithResult)(Ke.item.ownComputedState))||this.revealById(Ke.item.item.extId,!1,!1))})),this._register(et.onResultsChanged(()=>{this.tree.resort(null)})),this._register(this.testProfileService.onDidChange(()=>{this.tree.rerender()}));const Be=()=>{this.filter.filterToDocumentUri(Ne.activeEditor?.resource),this.filterState.isFilteringFor("@doc")&&this.tree.refilter()};this._register(Ne.onDidActiveEditorChange(Be)),this._register(this.storageService.onWillSaveState(({reason:Ke})=>{Ke===y.WillSaveStateReason.SHUTDOWN&&this.lastViewState.store(this.tree.getViewState({getId:Xe=>Xe instanceof V.TestItemTreeElement?Xe.test.item.extId:""}))})),Be()}get viewMode(){return this._viewMode.get()??"true"}set viewMode(De){De!==this._viewMode.get()&&(this._viewMode.set(De),this.updatePreferredProjection(),this.storageService.store("testing.viewMode",De,1,0))}get viewSorting(){return this._viewSorting.get()??"status"}set viewSorting(De){De!==this._viewSorting.get()&&(this._viewSorting.set(De),this.tree.resort(null),this.storageService.store("testing.viewSorting",De,1,0))}layout(De,_e){this.tree.layout(De,_e)}revealById(De,_e=!0,Re=!0){if(!De){this.hasPendingReveal=!1;return}const Ne=this.ensureProjection();let xe=0;const Ae=[...X.TestId.fromString(De).idsFromRoot()];for(let Le=Ae.length-1;Le>=xe;Le--){const Me=Ne.getElementByTestId(Ae[Le].toString());if(!Me||!this.tree.hasElement(Me))continue;if(Le<Ae.length-1&&_e){this.tree.expand(Me),xe=Le+1,Le=Ae.length-1;continue}let We=Me;for(let Ve=Me;Ve instanceof V.TestItemTreeElement;Ve=Ve.parent){if(Ve.test&&this.testService.excluded.contains(Ve.test)){this.filterState.toggleFilteringFor("@hidden",!0);break}!_e&&this.tree.hasElement(Ve)&&this.tree.isCollapsed(Ve)&&(We=Ve)}this.filterState.reveal.value=void 0,this.hasPendingReveal=!1,Re&&this.tree.domFocus(),this.tree.getRelativeTop(We)===null&&this.tree.reveal(We,.5),this.revealTimeout.value=(0,I.disposableTimeout)(()=>{this.tree.setFocus([We]),this.tree.setSelection([We])},1);return}this.hasPendingReveal=!0}async collapseAll(){this.tree.collapseAll()}tryPeekError(De){const _e=De.test&&this.testResults.getStateById(De.test.item.extId);return _e&&_e[1].tasks.some(Re=>(0,J.isFailedState)(Re.state))?this.peekOpener.tryPeekFirstError(_e[0],_e[1],{preserveFocus:!0}):!1}onContextMenu(De){const _e=De.element;if(!(_e instanceof V.TestItemTreeElement))return;const Re=Ie(this.contextKeyService,this.menuService,this.testService,this.testProfileService,_e);this.contextMenuService.showContextMenu({getAnchor:()=>De.anchor,getActions:()=>Re.value.secondary,getActionsContext:()=>_e,onHide:()=>Re.dispose(),actionRunner:this.actionRunner})}handleExecuteKeypress(De){const _e=this.tree.getFocus(),Re=this.tree.getSelection();let Ne;_e.length===1&&Re.includes(_e[0])?(De.browserEvent?.preventDefault(),Ne=Re):Ne=_e;const xe=Ne.filter(Ae=>Ae instanceof V.TestItemTreeElement);xe.length&&this.testService.runTests({group:2,tests:xe.map(Ae=>Ae.test)})}reevaluateWelcomeState(){const _e=this.testService.collection.busyProviders===0&&(0,se.testCollectionIsEmpty)(this.testService.collection)?this.filterState.isFilteringFor("@doc")?2:1:0;_e!==this.welcomeExperience&&(this.welcomeExperience=_e,this.welcomeVisibilityEmitter.fire(_e))}ensureProjection(){return this.projection.value??this.updatePreferredProjection()}updatePreferredProjection(){this.projection.clear();const De=k.AbstractTreeViewState.lift(this.lastViewState.get()??k.AbstractTreeViewState.empty());this._viewMode.get()==="list"?this.projection.value=this.instantiationService.createInstance(P.HierarchicalByNameProjection,De):this.projection.value=this.instantiationService.createInstance(B.HierarchicalByLocationProjection,De);const _e=new I.RunOnceScheduler(()=>this.applyProjectionChanges(),200);return this.projection.value.onUpdate(()=>{_e.isScheduled()||_e.schedule()}),this.applyProjectionChanges(),this.projection.value}applyProjectionChanges(){this.reevaluateWelcomeState(),this.projection.value?.applyTo(this.tree),this.hasPendingReveal&&this.revealById(this.filterState.reveal.value)}getSelectedTests(){return this.tree.getSelection()}};ae=Ee([W(2,u.IConfigurationService),W(3,ie.IEditorService),W(4,r.IMenuService),W(5,n.IContextMenuService),W(6,se.ITestService),W(7,j.ITestExplorerFilterState),W(8,g.IInstantiationService),W(9,y.IStorageService),W(10,a.IContextKeyService),W(11,te.ITestResultService),W(12,$.ITestingPeekOpener),W(13,ee.ITestProfileService)],ae),e.TestingExplorerViewModel=ae;var ue;(function(Te){Te[Te.Exclude=0]="Exclude",Te[Te.Inherit=1]="Inherit",Te[Te.Include=2]="Include"})(ue||(ue={}));const oe=(Te,De,_e,Re)=>{const Ne=[Re?[Re]:Te.rootIds];for(;Ne.length;)for(const xe of Ne.pop()){const Ae=Te.getNodeById(xe);if(!!Ae&&!(!Ae.item.uri||!De.extUri.isEqualOrParent(_e,Ae.item.uri))){if(Ae.item.range||Ae.expand===1)return!0;Ne.push(Ae.children)}}return!1};let fe=class{constructor(De,_e,Re,Ne){this.collection=De,this.state=_e,this.testService=Re,this.uriIdentityService=Ne}filter(De){if(De instanceof V.TestTreeErrorMessage)return 1;if(De.test&&!this.state.isFilteringFor("@hidden")&&this.testService.excluded.contains(De.test))return 0;switch(Math.min(this.testFilterText(De),this.testLocation(De),this.testState(De),this.testTags(De))){case 0:return 0;case 2:return 1;default:return 2}}filterToDocumentUri(De){this.documentUri=De}testTags(De){return!this.state.includeTags.size&&!this.state.excludeTags.size||(this.state.includeTags.size?De.test.item.tags.some(_e=>this.state.includeTags.has(_e)):!0)&&De.test.item.tags.every(_e=>!this.state.excludeTags.has(_e))?2:1}testState(De){return this.state.isFilteringFor("@failed")?(0,J.isFailedState)(De.state)?2:1:this.state.isFilteringFor("@executed")?De.state!==0?2:1:2}testLocation(De){return!this.documentUri||!this.state.isFilteringFor("@doc")||!(De instanceof V.TestItemTreeElement)||oe(this.collection,this.uriIdentityService,this.documentUri,De.test.item.extId)?2:1}testFilterText(De){if(this.state.globList.length===0)return 2;for(let _e=De;_e;_e=_e.parent){let Re=this.state.globList[0].include===!1?2:1;const Ne=_e.label.toLowerCase();for(const{include:xe,text:Ae}of this.state.globList)(0,o.fuzzyContains)(Ne,Ae)&&(Re=xe?2:0);if(Re!==1)return Re}return 1}};fe=Ee([W(1,j.ITestExplorerFilterState),W(2,se.ITestService),W(3,F.IUriIdentityService)],fe);class pe{constructor(De){this.viewModel=De}compare(De,_e){if(De instanceof V.TestTreeErrorMessage||_e instanceof V.TestTreeErrorMessage)return(De instanceof V.TestTreeErrorMessage?-1:0)+(_e instanceof V.TestTreeErrorMessage?1:0);const Re=(_e.duration||0)-(De.duration||0);if(this.viewModel.viewSorting==="duration"&&Re!==0)return Re;const Ne=(0,J.cmpPriority)(De.state,_e.state);if(this.viewModel.viewSorting==="status"&&Ne!==0)return Ne;if(De instanceof V.TestItemTreeElement&&_e instanceof V.TestItemTreeElement&&De.test.item.uri&&_e.test.item.uri&&De.test.item.uri.toString()===_e.test.item.uri.toString()&&De.test.item.range&&_e.test.item.range){const xe=De.test.item.range.startLineNumber-_e.test.item.range.startLineNumber;if(xe!==0)return xe}return(De.sortText||De.label).localeCompare(_e.sortText||_e.label)}}let me=class extends C.Disposable{constructor(De,_e,Re){super();const Ne=this.el=t.append(De,t.$(".testing-no-test-placeholder")),xe=t.append(Ne,t.$("p"));xe.innerText=(0,S.localize)(3,null);const Ae=(0,S.localize)(4,null),Le=this._register(new _.Button(Ne,{title:Ae}));Le.label=Ae,this._register((0,O.attachButtonStyler)(Le,Re)),this._register(Le.onDidClick(()=>_e.toggleFilteringFor("@doc",!1)))}setVisible(De){this.el.classList.toggle("visible",De)}};me=Ee([W(1,j.ITestExplorerFilterState),W(2,x.IThemeService)],me);class be extends D.ActionRunner{constructor(De){super();this.getSelectedTests=De}async runAction(De,_e){if(!(De instanceof r.MenuItemAction))return super.runAction(De,_e);const Re=this.getSelectedTests(),Ae=(Re.some(Le=>Le===_e)?Re:[_e]).filter(Le=>Le instanceof V.TestItemTreeElement);await De.run(...Ae)}}const Ce=Te=>{let De=(0,q.labelForTestInState)(Te.label,Te.state);return Te instanceof V.TestItemTreeElement&&(Te.duration!==void 0&&(De=(0,S.localize)(5,null,De,ke(Te.duration))),Te.retired&&(De=(0,S.localize)(6,null,De,q.testStateNames[Te.state]))),De};class ve{getWidgetAriaLabel(){return(0,S.localize)(7,null)}getAriaLabel(De){return De instanceof V.TestTreeErrorMessage?De.description:Ce(De)}}class he{getKeyboardNavigationLabel(De){return De instanceof V.TestTreeErrorMessage?De.message:De.label}}class ge{getHeight(De){return 22}getTemplateId(De){return De instanceof V.TestTreeErrorMessage?Se.ID:ye.ID}}class de{getId(De){return De.treeId}}let Se=class Na{constructor(De){this.renderer=De.createInstance(i.MarkdownRenderer,{})}get templateId(){return Na.ID}renderTemplate(De){return{label:t.append(De,t.$(".error"))}}renderElement({element:De},_e,Re){if(typeof De.message=="string")Re.label.innerText=De.message;else{const Ne=this.renderer.render(De.message,{inline:!0});Re.label.appendChild(Ne.element)}Re.label.title=De.description}disposeTemplate(){}};Se.ID="error",Se=Ee([W(0,g.IInstantiationService)],Se);let we=class extends C.Disposable{constructor(De,_e,Re,Ne,xe,Ae,Le){super();this.labels=De,this.actionRunner=_e,this.menuService=Re,this.testService=Ne,this.profiles=xe,this.contextKeyService=Ae,this.instantiationService=Le}renderTemplate(De){const _e=t.append(De,t.$(".test-item")),Re=t.append(_e,t.$(".computed-state")),Ne=t.append(_e,t.$(".name")),xe=this.labels.create(Ne,{supportHighlights:!0});t.append(_e,t.$(x.ThemeIcon.asCSSSelector(U.testingHiddenIcon)));const Ae=new f.ActionBar(_e,{actionRunner:this.actionRunner,actionViewItemProvider:Le=>Le instanceof r.MenuItemAction?this.instantiationService.createInstance(l.MenuEntryActionViewItem,Le,void 0):void 0});return{wrapper:_e,label:xe,actionBar:Ae,icon:Re,elementDisposable:[],templateDisposable:[xe,Ae]}}renderElement({element:De},_e,Re){this.fillActionBar(De,Re)}disposeTemplate(De){(0,C.dispose)(De.templateDisposable),De.templateDisposable=[]}disposeElement(De,_e,Re){(0,C.dispose)(Re.elementDisposable),Re.elementDisposable=[]}fillActionBar(De,_e){const Re=Ie(this.contextKeyService,this.menuService,this.testService,this.profiles,De);_e.elementDisposable.push(Re),_e.actionBar.clear(),_e.actionBar.context=De,_e.actionBar.push(Re.value.primary,{icon:!0,label:!1})}};we=Ee([W(2,r.IMenuService),W(3,se.ITestService),W(4,ee.ITestProfileService),W(5,a.IContextKeyService),W(6,g.IInstantiationService)],we);class ye extends we{get templateId(){return ye.ID}renderElement(De,_e,Re){super.renderElement(De,_e,Re);const Ne={name:De.element.label},xe={};Re.label.setResource(Ne,xe);const Ae=this.testService.excluded.contains(De.element.test);Re.wrapper.classList.toggle("test-is-hidden",Ae);const Le=U.testingStatesToIcons.get(De.element.test.expand===2||De.element.test.item.busy?2:De.element.state);Re.icon.className="computed-state "+(Le?x.ThemeIcon.asClassName(Le):""),De.element.retired&&(Re.icon.className+=" retired"),Ne.resource=De.element.test.item.uri,xe.title=Ce(De.element),xe.fileKind=h.FileKind.FILE,Ne.description=De.element.description||void 0,De.element.duration!==void 0&&(Ne.description=Ne.description?`${Ne.description}: ${ke(De.element.duration)}`:ke(De.element.duration)),Re.label.setResource(Ne,xe)}}ye.ID="testItem";const ke=Te=>Te<10?`${Te.toFixed(1)}ms`:Te<1e3?`${Te.toFixed(0)}ms`:`${(Te/1e3).toFixed(1)}s`,Ie=(Te,De,_e,Re,Ne)=>{const xe=Ne instanceof V.TestItemTreeElement?Ne.test:void 0,Ae=(0,z.getTestItemContextOverlay)(xe,xe?Re.capabilitiesForTest(xe):0);Ae.push(["view","workbench.view.testing"]),xe&&(Ae.push([Y.TestingContextKeys.canRefreshTests.key,X.TestId.isRoot(xe.item.extId)&&_e.getTestController(xe.item.extId)?.canRefresh.value]),Ae.push([Y.TestingContextKeys.testItemIsHidden.key,_e.excluded.contains(xe)]));const Le=Te.createOverlay(Ae),Me=De.createMenu(r.MenuId.TestItem,Le);try{const Ue={primary:[],secondary:[]},et=(0,l.createAndFillInActionBarActions)(Me,{shouldForwardArgs:!0},Ue,"inline");return{value:Ue,dispose:()=>et.dispose}}finally{Me.dispose()}};(0,x.registerThemingParticipant)((Te,De)=>{if(Te.type==="dark"){const _e=Te.getColor(R.foreground);if(_e){const Re=new w.Color(new w.RGBA(_e.rgba.r,_e.rgba.g,_e.rgba.b,.65));De.addRule(`.test-explorer .test-explorer-messages { color: ${Re}; }`)}}})}),define(ne[2628],re([1,0,10,242,78,112,139,209,36,11,33,66,6,92,278,2,195,29,106,39,72,229,20,58,61,186,172,1790,73,16,28,8,7,37,5,71,24,32,12,178,70,265,823,595,293,596,593,327,362,328,496,270,330,597,251,419,216,250,21]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H,K,G,q,Z,j,X,Y,$,J,ee,te,se,ie,ce,le){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleTestingPeekHistory=e.OpenMessageInEditorAction=e.GoToPreviousMessageAction=e.GoToNextMessageAction=e.TestCaseElement=e.TestResultElement=e.CloseTestPeek=e.TestingOutputPeekController=e.TestingPeekOpener=void 0;class ae{constructor(Be,Ke,Xe,rt){this.resultId=Be,this.taskIndex=Xe,this.messageIndex=rt,this.test=Ke.item,this.messages=Ke.tasks[Xe].messages,this.messageIndex=rt;const it={messageIndex:rt,resultId:Be,taskIndex:Xe,testExtId:Ke.item.extId};this.expectedUri=(0,ee.buildTestUri)({...it,type:2}),this.actualUri=(0,ee.buildTestUri)({...it,type:1}),this.messageUri=(0,ee.buildTestUri)({...it,type:0});const at=this.messages[this.messageIndex];this.revealLocation=at.location??(Ke.item.uri&&Ke.item.range?{uri:Ke.item.uri,range:n.Range.lift(Ke.item.range)}:void 0)}get isDiffable(){const Be=this.messages[this.messageIndex];return Be.type===0&&ve(Be)}}function*ue(qe){for(const Be of qe)for(const Ke of Be.tests)for(let Xe=0;Xe<Ke.tasks.length;Xe++)for(let rt=0;rt<Ke.tasks[Xe].messages.length;rt++)yield{result:Be,test:Ke,taskIndex:Xe,messageIndex:rt}}let oe=class extends S.Disposable{constructor(Be,Ke,Xe,rt,it){super();this.configuration=Be,this.editorService=Ke,this.codeEditorService=Xe,this.testResults=rt,this.testService=it,this._register(rt.onTestChanged(this.openPeekOnFailure,this))}async open(){let Be;const Ke=this.editorService.activeTextEditorControl;if((0,r.isCodeEditor)(Ke)&&Ke.getModel()?.uri){const Xe=Ke.getModel()?.uri;Xe&&(Be=await this.getFileCandidateMessage(Xe,Ke.getPosition()))}return Be||(Be=this.lastUri),Be||(Be=this.getAnyCandidateMessage()),Be?this.showPeekFromUri(Be):!1}tryPeekFirstError(Be,Ke,Xe){const rt=this.getFailedCandidateMessage(Ke);if(!rt)return!1;const it=rt.message;return this.showPeekFromUri({type:0,documentUri:it.location.uri,taskIndex:rt.taskId,messageIndex:rt.index,resultId:Be.id,testExtId:Ke.item.extId},{selection:it.location.range,...Xe}),!0}peekUri(Be,Ke){const Xe=(0,ee.parseTestUri)(Be),rt=Xe&&this.testResults.getResult(Xe.resultId);if(!Xe||!rt)return!1;const it=rt.getStateById(Xe.testExtId)?.tasks[Xe.taskIndex].messages[Xe.messageIndex];return it?.location?(this.showPeekFromUri({type:0,documentUri:it.location.uri,taskIndex:Xe.taskIndex,messageIndex:Xe.messageIndex,resultId:rt.id,testExtId:Xe.testExtId},{selection:it.location.range,...Ke}),!0):!1}closeAllPeeks(){for(const Be of this.codeEditorService.listCodeEditors())pe.get(Be)?.removePeek()}async showPeekFromUri(Be,Ke){const rt=(await this.editorService.openEditor({resource:Be.documentUri,options:{revealIfOpened:!0,...Ke}}))?.getControl();return(0,r.isCodeEditor)(rt)?(this.lastUri=Be,pe.get(rt)?.show((0,ee.buildTestUri)(this.lastUri)),!0):!1}openPeekOnFailure(Be){if(Be.reason!==3||!this.getFailedCandidateMessage(Be.item)||Be.result.request.isAutoRun&&!(0,Z.getTestingConfiguration)(this.configuration,"testing.automaticallyOpenPeekViewDuringAutoRun"))return;const Xe=this.codeEditorService.listCodeEditors();switch((0,Z.getTestingConfiguration)(this.configuration,"testing.automaticallyOpenPeekView")){case"failureInVisibleDocument":{const at=new Set(Xe.map(ft=>ft.getModel()?.uri.toString()));if(!c.Iterable.some((0,se.resultItemParents)(Be.result,Be.item),ft=>ft.item.uri&&at.has(ft.item.uri.toString())))return;break}case"failureAnywhere":break;default:return}Xe.map(pe.get).some(at=>at?.isVisible)||this.tryPeekFirstError(Be.result,Be.item)}async getFileCandidateMessage(Be,Ke){let Xe,rt=1/0;const it=Be.toString();for(const at of this.testService.collection.all){const ft=this.testResults.getStateById(at.item.extId);!ft||fe(ft[1],(vt,Dt,kt,At)=>{if(!Dt.location||Dt.location.uri.toString()!==it)return;const St=Ke?Math.abs(Ke.lineNumber-Dt.location.range.startLineNumber):0;(!Xe||St<=rt)&&(rt=St,Xe={type:0,testExtId:ft[1].item.extId,resultId:ft[0].id,taskIndex:At,messageIndex:kt,documentUri:Be})})}return Xe}getAnyCandidateMessage(){const Be=new Set;for(const Ke of this.testResults.results)for(const Xe of Ke.tests){if(Be.has(Xe.item.extId))continue;Be.add(Xe.item.extId);const rt=fe(Xe,(it,at,ft,vt)=>at.location&&{type:0,testExtId:Xe.item.extId,resultId:Ke.id,taskIndex:vt,messageIndex:ft,documentUri:at.location.uri});if(rt)return rt}}getFailedCandidateMessage(Be){return fe(Be,(Ke,Xe,rt,it)=>(0,J.isFailedState)(Ke.state)&&Xe.location?{taskId:it,index:rt,message:Xe}:void 0)}};oe=Ee([W(0,R.IConfigurationService),W(1,le.IEditorService),W(2,u.ICodeEditorService),W(3,ie.ITestResultService),W(4,ce.ITestService)],oe),e.TestingPeekOpener=oe;const fe=(qe,Be)=>{for(let Ke=0;Ke<qe.tasks.length;Ke++){const Xe=qe.tasks[Ke];for(let rt=0;rt<Xe.messages.length;rt++){const it=Be(Xe,Xe.messages[rt],rt,Ke);if(it!==void 0)return it}}};let pe=class Xr extends S.Disposable{constructor(Be,Ke,Xe,rt,it,at,ft,vt){super();this.editor=Be,this.editorService=Ke,this.codeEditorService=Xe,this.instantiationService=rt,this.testResults=it,this.storageService=at,this.commandService=vt,this.peek=this._register(new S.MutableDisposable),this.historyVisible=j.MutableObservableValue.stored(new X.StoredValue({key:"testHistoryVisibleInPeek",scope:0,target:0},this.storageService),!0),this.visible=$.TestingContextKeys.isPeekVisible.bindTo(ft),this._register(Be.onDidChangeModel(()=>this.peek.clear())),this._register(it.onResultsChanged(this.closePeekOnCertainResultEvents,this)),this._register(it.onTestChanged(this.closePeekOnTestChange,this))}static get(Be){return Be.getContribution("editor.contrib.testingOutputPeek")}get isVisible(){return this.peek.value}toggle(Be){this.currentPeekUri?.toString()===Be.toString()?this.peek.clear():this.show(Be)}openCurrentInEditor(){const Be=this.peek.value?.current;if(!Be)return;const Ke={pinned:!1,revealIfOpened:!0},Xe=Be.messages[Be.messageIndex];Be.isDiffable?this.editorService.openEditor({original:{resource:Be.expectedUri},modified:{resource:Be.actualUri},options:Ke}):typeof Xe.message=="string"?this.editorService.openEditor({resource:Be.messageUri,options:Ke}):this.commandService.executeCommand("markdown.showPreview",Be.messageUri)}async show(Be){const Ke=this.retrieveTest(Be);if(!Ke)return;const Xe=Ke.messages[Ke.messageIndex];this.peek.value||(this.peek.value=this.instantiationService.createInstance(me,this.editor,this.historyVisible),this.peek.value.onDidClose(()=>{this.visible.set(!1),this.currentPeekUri=void 0,this.peek.value=void 0}),this.visible.set(!0),this.peek.value.create()),(0,A.alert)((0,f.renderStringAsPlaintext)(Xe.message)),this.peek.value.setModel(Ke),this.currentPeekUri=Be}async openAndShow(Be){const Ke=this.retrieveTest(Be);if(!Ke)return;if(!Ke.revealLocation||Ke.revealLocation.uri.toString()===this.editor.getModel()?.uri.toString())return this.show(Be);const Xe=await this.codeEditorService.openCodeEditor({resource:Ke.revealLocation.uri,options:{pinned:!1,revealIfOpened:!0}},this.editor);if(Xe)return Xr.get(Xe)?.removePeek(),Xr.get(Xe)?.show(Be)}removePeek(){this.peek.clear()}next(){const Be=this.peek.value?.current;if(!Be)return;let Ke=!1;for(const{messageIndex:Xe,taskIndex:rt,result:it,test:at}of ue(this.testResults.results))if(Ke){this.openAndShow((0,ee.buildTestUri)({type:0,messageIndex:Xe,taskIndex:rt,resultId:it.id,testExtId:at.item.extId}));return}else Be.test.extId===at.item.extId&&Be.messageIndex===Xe&&Be.taskIndex===rt&&Be.resultId===it.id&&(Ke=!0)}previous(){const Be=this.peek.value?.current;if(!Be)return;let Ke;for(const Xe of ue(this.testResults.results)){if(Be.test.extId===Xe.test.item.extId&&Be.messageIndex===Xe.messageIndex&&Be.taskIndex===Xe.taskIndex&&Be.resultId===Xe.result.id){if(!Ke)return;this.openAndShow((0,ee.buildTestUri)({type:0,messageIndex:Ke.messageIndex,taskIndex:Ke.taskIndex,resultId:Ke.result.id,testExtId:Ke.test.item.extId}));return}Ke=Xe}}removeIfPeekingForTest(Be){this.peek.value?.current?.test.extId===Be&&this.peek.clear()}closePeekOnTestChange(Be){Be.reason!==3||Be.previousState===Be.item.ownComputedState||this.removeIfPeekingForTest(Be.item.item.extId)}closePeekOnCertainResultEvents(Be){"started"in Be&&this.peek.clear(),"removed"in Be&&this.testResults.results.length===0&&this.peek.clear()}retrieveTest(Be){const Ke=(0,ee.parseTestUri)(Be);if(!Ke)return;const{resultId:Xe,testExtId:rt,taskIndex:it,messageIndex:at}=Ke,ft=this.testResults.getResult(Ke.resultId)?.getStateById(rt);if(!(!ft||!ft.tasks[Ke.taskIndex]))return new ae(Xe,ft,it,at)}};pe=Ee([W(1,le.IEditorService),W(2,u.ICodeEditorService),W(3,F.IInstantiationService),W(4,ie.ITestResultService),W(5,M.IStorageService),W(6,O.IContextKeyService),W(7,T.ICommandService)],pe),e.TestingOutputPeekController=pe;let me=class vn extends m.PeekViewWidget{constructor(Be,Ke,Xe,rt,it,at,ft,vt){super(Be,{showFrame:!0,frameWidth:1,showArrow:!0,isResizeable:!0,isAccessible:!0,className:"test-output-peek"},ft);this.historyVisible=Ke,this.contextKeyService=it,this.menuService=at,this.modelService=vt,this.visibilityChange=this._disposables.add(new o.Emitter),this.didReveal=this._disposables.add(new o.Emitter),$.TestingContextKeys.isInPeek.bindTo(it),this._disposables.add(Xe.onDidColorThemeChange(this.applyTheme,this)),this._disposables.add(this.onDidClose(()=>this.visibilityChange.fire(!1))),this.applyTheme(Xe.getColorTheme()),rt.addExclusiveWidget(Be,this)}applyTheme(Be){const Ke=Be.getColor(q.testingPeekBorder)||C.Color.transparent,Xe=Be.getColor(q.testingPeekHeaderBackground)||C.Color.transparent;this.style({arrowColor:Ke,frameColor:Ke,headerBackgroundColor:Xe,primaryHeadingColor:Be.getColor(m.peekViewTitleForeground),secondaryHeadingColor:Be.getColor(m.peekViewTitleInfoForeground)})}_fillHead(Be){super._fillHead(Be);const Ke=[],Xe=this.menuService.createMenu(y.MenuId.TestPeekTitle,this.contextKeyService);(0,E.createAndFillInActionBarActions)(Xe,void 0,Ke),this._actionbarWidget.push(Ke,{label:!1,icon:!0,index:0}),Xe.dispose()}_fillBody(Be){const Ke=vn.lastSplitWidth;this.splitView=new D.SplitView(Be,{orientation:1});const Xe=t.append(Be,t.$(".test-output-peek-message-container"));this.contentProviders=[this._disposables.add(this.instantiationService.createInstance(he,this.editor,Xe)),this._disposables.add(this.instantiationService.createInstance(de,Xe)),this._disposables.add(this.instantiationService.createInstance(Se,this.editor,Xe))];const rt=t.append(Be,t.$(".test-output-peek-tree")),it=this._disposables.add(this.instantiationService.createInstance(Le,this.editor,rt,this.visibilityChange.event,this.didReveal.event));this.splitView.addView({onDidChange:o.Event.None,element:Xe,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:ft=>{if(vn.lastSplitWidth=ft,this.dimension)for(const vt of this.contentProviders)vt.layout({height:this.dimension.height,width:ft})}},D.Sizing.Distribute),this.splitView.addView({onDidChange:o.Event.None,element:rt,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:ft=>{this.dimension&&it.layout(this.dimension.height,ft)}},D.Sizing.Distribute);const at=1;this.splitView.setViewVisible(at,this.historyVisible.value),this._disposables.add(this.historyVisible.onDidChange(ft=>{this.splitView.setViewVisible(at,ft)})),Ke&&queueMicrotask(()=>this.splitView.resizeView(0,Ke))}setModel(Be){const Ke=Be.messages[Be.messageIndex],Xe=this.current;return!Be.revealLocation&&!Xe?Promise.resolve():(this.current=Be,Be.revealLocation?(this.show(Be.revealLocation.range,vn.lastHeightInLines||we(Ke)),this.editor.revealPositionNearTop(Be.revealLocation.range.getStartPosition(),0),this.editor.focus(),this.showInPlace(Be)):this.showInPlace(Be))}async showInPlace(Be){const Ke=Be.messages[Be.messageIndex];this.setTitle(ye((0,f.renderStringAsPlaintext)(Ke.message)),Be.test.label),this.didReveal.fire(Be),this.visibilityChange.fire(!0),await Promise.all(this.contentProviders.map(Xe=>Xe.update(Be,Ke)))}_relayout(Be){super._relayout(Be),vn.lastHeightInLines=Be}_doLayoutBody(Be,Ke){super._doLayoutBody(Be,Ke),this.dimension=new t.Dimension(Ke,Be),this.splitView.layout(Ke)}_onWidth(Be){super._onWidth(Be),this.dimension&&(this.dimension=new t.Dimension(Be,this.dimension.height)),this.splitView.layout(Be)}};me=Ee([W(2,B.IThemeService),W(3,m.IPeekViewService),W(4,O.IContextKeyService),W(5,y.IMenuService),W(6,F.IInstantiationService),W(7,g.ITextModelService)],me);const be={scrollBeyondLastLine:!1,links:!0,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!1},fixedOverflowWidgets:!0,readOnly:!0,minimap:{enabled:!1},wordWrap:"on"},Ce={...be,enableSplitViewResizing:!0,isInEmbeddedEditor:!0,renderOverviewRuler:!1,ignoreTrimWhitespace:!1,renderSideBySide:!0,originalAriaLabel:(0,b.localize)(0,null),modifiedAriaLabel:(0,b.localize)(1,null)},ve=qe=>qe.type===0&&qe.actual!==void 0&&qe.expected!==void 0;let he=class extends S.Disposable{constructor(Be,Ke,Xe,rt){super();this.editor=Be,this.container=Ke,this.instantiationService=Xe,this.modelService=rt,this.widget=this._register(new S.MutableDisposable),this.model=this._register(new S.MutableDisposable)}async update({expectedUri:Be,actualUri:Ke},Xe){if(!ve(Xe))return this.clear();const[rt,it]=await Promise.all([this.modelService.createModelReference(Be),this.modelService.createModelReference(Ke)]),at=this.model.value=new Te(rt,it);this.widget.value||(this.widget.value=this.instantiationService.createInstance(a.EmbeddedDiffEditorWidget,this.container,Ce,this.editor),this.dimension&&this.widget.value.layout(this.dimension)),this.widget.value.setModel(at),this.widget.value.updateOptions(this.getOptions(ke(Xe.expected)||ke(Xe.actual)))}clear(){this.model.clear(),this.widget.clear()}layout(Be){this.dimension=Be,this.widget.value?.layout(Be)}getOptions(Be){return Be?{...Ce,lineNumbers:"on"}:{...Ce,lineNumbers:"off"}}};he=Ee([W(2,F.IInstantiationService),W(3,g.ITextModelService)],he);class ge extends S.Disposable{constructor(Be,Ke,Xe){super();const rt=this._register(Ke.render(Xe,{}));rt.element.style.height="100%",rt.element.style.userSelect="text",Be.appendChild(rt.element),this.scrollable=this._register(new k.DomScrollableElement(rt.element,{className:"preview-text"})),Be.appendChild(this.scrollable.getDomNode()),this._register((0,S.toDisposable)(()=>{Be.removeChild(this.scrollable.getDomNode())})),this.scrollable.scanDomNode()}layout(Be,Ke){this.scrollable.setScrollDimensions({width:Ke,height:Be})}}let de=class extends S.Disposable{constructor(Be,Ke){super();this.container=Be,this.instantiationService=Ke,this.markdown=new i.Lazy(()=>this._register(this.instantiationService.createInstance(d.MarkdownRenderer,{}))),this.textPreview=this._register(new S.MutableDisposable)}update(Be,Ke){if(ve(Ke)||typeof Ke.message=="string")return this.textPreview.clear();this.textPreview.value=new ge(this.container,this.markdown.getValue(),Ke.message)}layout(Be){this.textPreview.value?.layout(Be.height,Be.width)}};de=Ee([W(1,F.IInstantiationService)],de);let Se=class extends S.Disposable{constructor(Be,Ke,Xe,rt){super();this.editor=Be,this.container=Ke,this.instantiationService=Xe,this.modelService=rt,this.widget=this._register(new S.MutableDisposable),this.model=this._register(new S.MutableDisposable)}async update({messageUri:Be},Ke){if(ve(Ke)||typeof Ke.message!="string")return this.clear();const Xe=this.model.value=await this.modelService.createModelReference(Be);this.widget.value||(this.widget.value=this.instantiationService.createInstance(a.EmbeddedCodeEditorWidget,this.container,be,this.editor),this.dimension&&this.widget.value.layout(this.dimension)),this.widget.value.setModel(Xe.object.textEditorModel),this.widget.value.updateOptions(this.getOptions(ke(Ke.message)))}clear(){this.model.clear(),this.widget.clear()}layout(Be){this.dimension=Be,this.widget.value?.layout(Be)}getOptions(Be){return Be?{...Ce,lineNumbers:"on"}:{...Ce,lineNumbers:"off"}}};Se=Ee([W(2,F.IInstantiationService),W(3,g.ITextModelService)],Se);const we=qe=>ve(qe)?Math.max(Ie(qe.actual),Ie(qe.expected)):Ie(typeof qe.message=="string"?qe.message:qe.message.value),ye=qe=>{const Be=qe.indexOf(` `);return Be===-1?qe:qe.slice(0,Be)},ke=qe=>!!qe&&qe.includes(` `),Ie=qe=>(0,s.clamp)(qe?Math.max((0,l.count)(qe,` `),Math.ceil(qe.length/80))+3:0,14,24);class Te extends z.EditorModel{constructor(Be,Ke){super();this._original=Be,this._modified=Ke,this.original=this._original.object.textEditorModel,this.modified=this._modified.object.textEditorModel}dispose(){super.dispose(),this._original.dispose(),this._modified.dispose()}}function De(qe){const Be=qe.get(u.ICodeEditorService).listDiffEditors();for(const Ke of Be)if(Ke.hasTextFocus()&&Ke instanceof a.EmbeddedDiffEditorWidget)return Ke.getParentEditor();return(0,m.getOuterEditor)(qe)}class _e extends p.EditorAction2{constructor(){super({id:"editor.closeTestPeek",title:(0,b.localize)(2,null),icon:v.Codicon.close,precondition:O.ContextKeyExpr.and(O.ContextKeyExpr.or($.TestingContextKeys.isInPeek,$.TestingContextKeys.isPeekVisible),O.ContextKeyExpr.not("config.editor.stablePeek")),keybinding:{weight:100-101,primary:9}})}runEditorCommand(Be,Ke){const Xe=De(Be);pe.get(Xe??Ke)?.removePeek()}}e.CloseTestPeek=_e;class Re{constructor(Be){this.value=Be,this.type="result",this.context=this.value.id,this.id=this.value.id,this.label=this.value.name}get icon(){return K.testingStatesToIcons.get(this.value.completedAt===void 0?2:(0,se.maxCountPriority)(this.value.counts))}}e.TestResultElement=Re;class Ne{constructor(Be,Ke){this.results=Be,this.test=Ke,this.type="test",this.context=this.test.item.extId,this.id=`${this.results.id}/${this.test.item.extId}`,this.label=this.test.item.label;for(const Xe of(0,se.resultItemParents)(Be,Ke))Xe!==Ke&&(this.description=this.description?Xe.item.label+U.flatTestItemDelimiter+this.description:Xe.item.label)}get icon(){return K.testingStatesToIcons.get(this.test.computedState)}}e.TestCaseElement=Ne;class xe{constructor(Be,Ke,Xe){this.test=Ke,this.type="task",this.icon=void 0,this.id=`${Be.id}/${Ke.item.extId}/${Xe}`,this.task=Be.tasks[Xe],this.context=String(Xe),this.label=this.task.name??(0,b.localize)(3,null)}}class Ae{constructor(Be,Ke,Xe,rt){this.result=Be,this.test=Ke,this.taskIndex=Xe,this.messageIndex=rt,this.type="message";const{message:it,location:at}=Ke.tasks[Xe].messages[rt];this.location=at,this.uri=this.context=(0,ee.buildTestUri)({type:0,messageIndex:rt,resultId:Be.id,taskIndex:Xe,testExtId:Ke.item.extId}),this.id=this.uri.toString();const ft=(0,f.renderStringAsPlaintext)(it),vt=(0,l.count)(ft.trimRight(),` `);this.label=ye(ft),vt>0&&(this.description=vt>1?(0,b.localize)(4,null,vt):(0,b.localize)(5,null))}}let Le=class extends S.Disposable{constructor(Be,Ke,Xe,rt,it,at,ft,vt,Dt){super();this.contextMenuService=at,this.disposed=!1,this.treeActions=vt.createInstance(We);const kt=vt.createInstance(P.ResourceLabels,{onDidChangeVisibility:Xe}),At={getId(mt){return mt.id}};this.tree=this._register(vt.createInstance(L.WorkbenchCompressibleObjectTree,"Test Output Peek",Ke,{getHeight:()=>22,getTemplateId:()=>Me.ID},[vt.createInstance(Me,kt,this.treeActions)],{compressionEnabled:!0,hideTwistiesOfChildlessElements:!0,identityProvider:At,accessibilityProvider:{getAriaLabel(mt){return mt.ariaLabel||mt.label},getWidgetAriaLabel(){return(0,b.localize)(6,null)}}}));const St=new WeakMap,He=(mt,It)=>{const Rt=St.get(mt);if(Rt)return Rt;const $e=It();return St.set(mt,$e),$e},ct=(mt,It,Rt)=>c.Iterable.map(It.tasks[0].messages,($e,Pe)=>({element:He($e,()=>new Ae(mt,It,Rt,Pe)),incompressible:!0})),lt=(mt,It)=>{const Rt=c.Iterable.filter(It.tasks,$e=>$e.messages.length>0);return c.Iterable.map(Rt,($e,Pe)=>({element:He($e,()=>new xe(mt,It,Pe)),incompressible:!1,children:ct(mt,It,Pe)}))},ut=mt=>{const It=c.Iterable.filter(mt.tests,Rt=>Rt.tasks.some($e=>$e.messages.length>0));return c.Iterable.map(It,Rt=>({element:He(Rt,()=>new Ne(mt,Rt)),incompressible:!0,children:lt(mt,Rt)}))},pt=()=>ft.results.map(mt=>{const It=He(mt,()=>new Re(mt));return{element:It,incompressible:!0,collapsed:this.tree.hasElement(It)?this.tree.isCollapsed(It):!0,children:ut(mt)}}),Et=new Set,yt=this._register(new w.RunOnceScheduler(()=>{for(const mt of Et){const It=St.get(mt);It&&this.tree.hasElement(It)&&this.tree.setChildren(It,ut(mt),{diffIdentityProvider:At})}Et.clear()},300));this._register(ft.onTestChanged(mt=>{const It=St.get(mt.item);if(It&&this.tree.hasElement(It)){this.tree.setChildren(It,lt(mt.result,mt.item));return}const Rt=St.get(mt.result);if(Rt&&this.tree.hasElement(Rt)){yt.isScheduled||(Et.add(mt.result),yt.schedule());return}this.tree.setChildren(null,pt(),{diffIdentityProvider:At})})),this._register(ft.onResultsChanged(mt=>{if(!this.disposed){if("completed"in mt){const It=St.get(mt.completed);if(It&&this.tree.hasElement(It)){this.tree.setChildren(It,ut(mt.completed));return}}this.tree.setChildren(null,pt(),{diffIdentityProvider:At})}})),this._register(rt(mt=>{const It=St.get(mt.messages[mt.messageIndex]);if(!It||!this.tree.hasElement(It))return;const Rt=[];for(let $e=this.tree.getParentElement(It);$e;$e=this.tree.getParentElement($e))Rt.unshift($e);for(const $e of Rt)this.tree.expand($e);this.tree.getRelativeTop(It)===null&&this.tree.reveal(It,.5),this.tree.setFocus([It]),this.tree.setSelection([It])})),this._register(this.tree.onDidOpen(async mt=>{if(!(mt.element instanceof Ae))return;const It=new ae(mt.element.result.id,mt.element.test,mt.element.taskIndex,mt.element.messageIndex);It.revealLocation?pe.get(Be)?.openAndShow(It.messageUri):it.showInPlace(It)})),this._register(this.tree.onDidChangeSelection(mt=>{for(const It of mt.elements)if(It&&"test"in It){Dt.reveal.value=It.test.item.extId;break}})),this._register(this.tree.onContextMenu(mt=>this.onContextMenu(mt))),this.tree.setChildren(null,pt())}layout(Be,Ke){this.tree.layout(Be,Ke)}onContextMenu(Be){if(!Be.element)return;const Ke=this.treeActions.provideActionBar(Be.element);this.contextMenuService.showContextMenu({getAnchor:()=>Be.anchor,getActions:()=>Ke.value.secondary.length?[...Ke.value.primary,new I.Separator,...Ke.value.secondary]:Ke.value.primary,getActionsContext:()=>Be.element?.context,onHide:()=>Ke.dispose()})}dispose(){super.dispose(),this.disposed=!0}};Le=Ee([W(5,x.IContextMenuService),W(6,ie.ITestResultService),W(7,F.IInstantiationService),W(8,Y.ITestExplorerFilterState)],Le);let Me=class xa{constructor(Be,Ke,Xe){this.labels=Be,this.treeActions=Ke,this.instantiationService=Xe,this.templateId=xa.ID}renderCompressedElements(Be,Ke,Xe){const rt=Be.element.elements,it=rt[rt.length-1];it instanceof xe&&rt.length>=2?this.doRender(rt[rt.length-2],Xe):this.doRender(it,Xe)}renderTemplate(Be){const Ke=new S.DisposableStore,Xe=t.append(Be,t.$(".test-peek-item")),rt=t.append(Xe,t.$(".state")),it=t.append(Xe,t.$(".name")),at=this.labels.create(it,{supportHighlights:!0});Ke.add(at);const ft=new _.ActionBar(Xe,{actionViewItemProvider:vt=>vt instanceof y.MenuItemAction?this.instantiationService.createInstance(E.MenuEntryActionViewItem,vt,void 0):void 0});return Ke.add(ft),{icon:rt,label:at,actionBar:ft,elementDisposable:new S.DisposableStore,templateDisposable:Ke}}renderElement(Be,Ke,Xe){this.doRender(Be.element,Xe)}disposeTemplate(Be){Be.templateDisposable.dispose()}doRender(Be,Ke){Ke.elementDisposable.clear(),Ke.label.setLabel(Be.label,Be.description);const Xe=Be.icon;Ke.icon.className=`computed-state ${Xe?B.ThemeIcon.asClassName(Xe):""}`;const rt=this.treeActions.provideActionBar(Be);Ke.elementDisposable.add(rt),Ke.actionBar.clear(),Ke.actionBar.context=Be,Ke.actionBar.push(rt.value.primary,{icon:!0,label:!1})}};Me.ID="testRunElementRenderer",Me=Ee([W(2,F.IInstantiationService)],Me);let We=class{constructor(Be,Ke,Xe,rt,it){this.contextKeyService=Be,this.testTerminalService=Ke,this.menuService=Xe,this.commandService=rt,this.testProfileService=it}provideActionBar(Be){const Ke=Be instanceof Ne?Be.test:void 0,Xe=Ke?this.testProfileService.capabilitiesForTest(Ke):0,rt=this.contextKeyService.createOverlay([["peek","editor.contrib.testingOutputPeek"],[$.TestingContextKeys.peekItemType.key,Be.type],...(0,H.getTestItemContextOverlay)(Ke,Xe)]),it=this.menuService.createMenu(y.MenuId.TestPeekElement,rt);try{const at=[],ft=[];if(Be instanceof Re&&(at.push(new I.Action("testing.outputPeek.showResultOutput",(0,b.localize)(7,null),v.Codicon.terminal.classNames,void 0,()=>this.testTerminalService.open(Be.value))),at.push(new I.Action("testing.outputPeek.reRunLastRun",(0,b.localize)(8,null),B.ThemeIcon.asClassName(K.testingRunIcon),void 0,()=>this.commandService.executeCommand("testing.reRunLastRun",Be.value.id))),Xe&4&&at.push(new I.Action("testing.outputPeek.debugLastRun",(0,b.localize)(9,null),B.ThemeIcon.asClassName(K.testingDebugIcon),void 0,()=>this.commandService.executeCommand("testing.debugLastRun",Be.value.id)))),Be instanceof Ne||Be instanceof xe){const kt=Be.test.item.extId;at.push(new I.Action("testing.outputPeek.goToFile",(0,b.localize)(10,null),v.Codicon.goToFile.classNames,void 0,()=>this.commandService.executeCommand("vscode.revealTest",kt))),ft.push(new I.Action("testing.outputPeek.revealInExplorer",(0,b.localize)(11,null),v.Codicon.listTree.classNames,void 0,()=>this.commandService.executeCommand("_revealTestInExplorer",kt))),Xe&2&&at.push(new I.Action("testing.outputPeek.runTest",(0,b.localize)(12,null),B.ThemeIcon.asClassName(K.testingRunIcon),void 0,()=>this.commandService.executeCommand("vscode.runTestsById",2,kt))),Xe&4&&at.push(new I.Action("testing.outputPeek.debugTest",(0,b.localize)(13,null),B.ThemeIcon.asClassName(K.testingDebugIcon),void 0,()=>this.commandService.executeCommand("vscode.runTestsById",4,kt)))}const vt={primary:at,secondary:ft},Dt=(0,E.createAndFillInActionBarActions)(it,{shouldForwardArgs:!0},vt,"inline");return{value:vt,dispose:()=>Dt.dispose}}finally{it.dispose()}}};We=Ee([W(0,O.IContextKeyService),W(1,G.ITestingOutputTerminalService),W(2,y.IMenuService),W(3,T.ICommandService),W(4,te.ITestProfileService)],We),(0,B.registerThemingParticipant)((qe,Be)=>{const Ke=qe.getColor(m.peekViewResultsBackground);Ke&&Be.addRule(`.monaco-editor .test-output-peek .test-output-peek-tree { background-color: ${Ke}; }`);const Xe=qe.getColor(m.peekViewResultsMatchForeground);Xe&&Be.addRule(`.monaco-editor .test-output-peek .test-output-peek-tree { color: ${Xe}; }`);const rt=qe.getColor(m.peekViewResultsSelectionBackground);rt&&Be.addRule(`.monaco-editor .test-output-peek .test-output-peek-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { background-color: ${rt}; }`);const it=qe.getColor(m.peekViewResultsSelectionForeground);it&&Be.addRule(`.monaco-editor .test-output-peek .test-output-peek-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { color: ${it} !important; }`);const at=qe.getColor(N.textLinkForeground);at&&Be.addRule(`.monaco-editor .test-output-peek .test-output-peek-message-container a { color: ${at}; }`);const ft=qe.getColor(N.textLinkActiveForeground);ft&&Be.addRule(`.monaco-editor .test-output-peek .test-output-peek-message-container a :hover { color: ${ft}; }`)});const Ve=O.ContextKeyExpr.and(h.EditorContextKeys.focus,$.TestingContextKeys.isPeekVisible),Ue=(qe,Be)=>{if(pe.get(Be)?.isVisible)return Be;if(Be instanceof a.EmbeddedCodeEditorWidget)return Be.getParentEditor();const Ke=De(qe);return Ke||Be};class et extends p.EditorAction2{constructor(){super({id:et.ID,f1:!0,title:(0,b.localize)(14,null),icon:v.Codicon.arrowDown,category:V.CATEGORIES.Test,keybinding:{primary:512|66,weight:100+1,when:Ve},menu:[{id:y.MenuId.TestPeekTitle,group:"navigation",order:2},{id:y.MenuId.CommandPalette,when:Ve}]})}runEditorCommand(Be,Ke){pe.get(Ue(Be,Ke))?.next()}}e.GoToNextMessageAction=et,et.ID="testing.goToNextMessage";class Ze extends p.EditorAction2{constructor(){super({id:Ze.ID,f1:!0,title:(0,b.localize)(15,null),icon:v.Codicon.arrowUp,category:V.CATEGORIES.Test,keybinding:{primary:1024|512|66,weight:100+1,when:Ve},menu:[{id:y.MenuId.TestPeekTitle,group:"navigation",order:1},{id:y.MenuId.CommandPalette,when:Ve}]})}runEditorCommand(Be,Ke){pe.get(Ue(Be,Ke))?.previous()}}e.GoToPreviousMessageAction=Ze,Ze.ID="testing.goToPreviousMessage";class Fe extends p.EditorAction2{constructor(){super({id:Fe.ID,f1:!1,title:(0,b.localize)(16,null),icon:v.Codicon.linkExternal,category:V.CATEGORIES.Test,menu:[{id:y.MenuId.TestPeekTitle}]})}runEditorCommand(Be,Ke){pe.get(Ue(Be,Ke))?.openCurrentInEditor()}}e.OpenMessageInEditorAction=Fe,Fe.ID="testing.openMessageInEditor";class Qe extends p.EditorAction2{constructor(){super({id:Qe.ID,f1:!0,title:(0,b.localize)(17,null),icon:v.Codicon.history,category:V.CATEGORIES.Test,menu:[{id:y.MenuId.TestPeekTitle,group:"navigation",order:3}],keybinding:{weight:200,primary:512|38,when:$.TestingContextKeys.isPeekVisible.isEqualTo(!0)}})}runEditorCommand(Be,Ke){const Xe=pe.get(Ue(Be,Ke));Xe&&(Xe.historyVisible.value=!Xe.historyVisible.value)}}e.ToggleTestingPeekHistory=Qe,Qe.ID="testing.toggleTestingPeekHistory"}),define(ne[631],re([1,0,9,1809,46,24,21,271,23,83,34,233]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readStaticTrustedDomains=e.readAuthenticationTrustedDomains=e.readWorkspaceTrustedDomains=e.readTrustedDomains=e.extractGitHubRemotesFromGitConfig=e.configureOpenerTrustedDomainsHandler=e.manageTrustedDomainSettingsCommand=e.TRUSTED_DOMAINS_CONTENT_STORAGE_KEY=e.TRUSTED_DOMAINS_STORAGE_KEY=void 0;const o=t.URI.parse("trustedDomains:/Trusted Domains");e.TRUSTED_DOMAINS_STORAGE_KEY="http.linkProtectionTrustedDomains",e.TRUSTED_DOMAINS_CONTENT_STORAGE_KEY="http.linkProtectionTrustedDomainsContent",e.manageTrustedDomainSettingsCommand={id:"workbench.action.manageTrustedDomain",description:{description:(0,f.localize)(0,null),args:[]},handler:async u=>{u.get(k.IEditorService).openEditor({resource:o,languageId:"jsonc",options:{pinned:!0}})}};async function c(u,a,n,h,g,d,m){const b=t.URI.parse(a),E=b.authority.split("."),y=E.slice(E.length-2).join("."),T="*."+y,R=[];if(R.push({type:"item",label:(0,f.localize)(1,null,a),id:"trust",toTrust:a,picked:!0}),E.length===4&&E.every(F=>Number.isInteger(+F)||Number.isInteger(+F.split(":")[0]))){if(b.authority.includes(":")){const F=b.authority.split(":")[0];R.push({type:"item",label:(0,f.localize)(2,null,F),toTrust:F+":*",id:"trust"})}}else R.push({type:"item",label:(0,f.localize)(3,null,y),toTrust:T,id:"trust"});R.push({type:"item",label:(0,f.localize)(4,null),toTrust:"*",id:"trust"}),R.push({type:"item",label:(0,f.localize)(5,null),id:"manage"});const x=await h.pick(R,{activeItem:R[0]});if(x&&x.id)switch(x.id){case"manage":return await d.openEditor({resource:o.with({fragment:n.toString()}),languageId:"jsonc",options:{pinned:!0}}),u;case"trust":{const F=x.toTrust;if(u.indexOf(F)===-1)return g.remove(e.TRUSTED_DOMAINS_CONTENT_STORAGE_KEY,0),g.store(e.TRUSTED_DOMAINS_STORAGE_KEY,JSON.stringify([...u,F]),0,0),[...u,F]}}return[]}e.configureOpenerTrustedDomainsHandler=c;function i(u){const a=new Set;let n;const h=/^\s*url\s*=\s*(?:git@|https:\/\/)github\.com(?::|\/)(\S*)\s*$/mg;for(;n=h.exec(u);){const g=n[1].replace(/\.git$/,"");g&&a.add(`https://github.com/${g}/`)}return[...a]}e.extractGitHubRemotesFromGitConfig=i;async function S(u,a,n){const h=n.getWorkspace().folders.map(m=>m.uri);return[...(await Promise.race([new Promise(m=>setTimeout(()=>m([]),2e3)),Promise.all(h.map(async m=>{try{const b=m.path,E=m.with({path:`${b!=="/"?b:""}/.git/config`});if(!await u.exists(E))return[];const T=(await a.read(E,{acceptTextOnly:!0}).catch(()=>({value:""}))).value;return i(T)}catch{return[]}}))])).reduce((m,b)=>b.reduce((E,y)=>E.add(y),m),new Set)]}async function s(u){const{defaultTrustedDomains:a,trustedDomains:n}=p(u),[h,g]=await Promise.all([l(u),r(u)]);return{workspaceDomains:h,userDomains:g,defaultTrustedDomains:a,trustedDomains:n}}e.readTrustedDomains=s;async function l(u){const a=u.get(I.IFileService),n=u.get(w.ITextFileService),h=u.get(v.IWorkspaceContextService);return S(a,n,h)}e.readWorkspaceTrustedDomains=l;async function r(u){const a=u.get(D.IAuthenticationService);return a.isAuthenticationProviderRegistered("github")&&(await a.getSessions("github")??[]).length>0?["https://github.com"]:[]}e.readAuthenticationTrustedDomains=r;function p(u){const a=u.get(A.IStorageService),n=u.get(_.IProductService),h=u.get(C.IBrowserWorkbenchEnvironmentService),g=[...n.linkProtectionTrustedDomains??[],...h.options?.additionalTrustedDomains??[]];let d=[];try{const m=a.get(e.TRUSTED_DOMAINS_STORAGE_KEY,0);m&&(d=JSON.parse(m))}catch{}return{defaultTrustedDomains:g,trustedDomains:d}}e.readStaticTrustedDomains=p}),define(ne[2629],re([1,0,6,118,23,24,60,631,13,5]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TrustedDomainsFileSystemProvider=void 0;const v="trustedDomains",C={type:_.FileType.File,ctime:Date.now(),mtime:Date.now(),size:0},o=`// Links matching one or more entries in the list below can be opened without link protection. // The following examples show what entries can look like: // - "https://microsoft.com": Matches this specific domain using https // - "https://microsoft.com:8080": Matches this specific domain on this port using https // - "https://microsoft.com:*": Matches this specific domain on any port using https // - "https://microsoft.com/foo": Matches https://microsoft.com/foo and https://microsoft.com/foo/bar, // but not https://microsoft.com/foobar or https://microsoft.com/bar // - "https://*.microsoft.com": Match all domains ending in "microsoft.com" using https // - "microsoft.com": Match this specific domain using either http or https // - "*.microsoft.com": Match all domains ending in "microsoft.com" using either http or https // - "http://192.168.0.1: Matches this specific IP using http // - "http://192.168.0.*: Matches all IP's with this prefix using http // - "*": Match all domains using either http or https // `,c=`// // You can use the "Manage Trusted Domains" command to open this file. // Save this file to apply the trusted domains rules. `,i=`[ // "https://microsoft.com" ]`;function S(l,r,p,u,a){let n=o;return l.length>0?(n+=`// By default, VS Code trusts "localhost" as well as the following domains: `,l.forEach(h=>{n+=`// - "${h}" `})):n+=`// By default, VS Code trusts "localhost". `,p.length&&(n+=`// // Additionally, the following domains are trusted based on your logged-in Accounts: `,p.forEach(h=>{n+=`// - "${h}" `})),u.length&&(n+=`// // Further, the following domains are trusted based on your workspace configuration: `,u.forEach(h=>{n+=`// - "${h}" `})),n+=c,n+=a?` // Currently configuring trust for ${a} `:"",r.length===0?n+=i:n+=JSON.stringify(r,null,2),n}let s=class{constructor(r,p,u){this.fileService=r,this.storageService=p,this.instantiationService=u,this.capabilities=2,this.onDidChangeCapabilities=t.Event.None,this.onDidChangeFile=t.Event.None,this.fileService.registerProvider(v,this)}stat(r){return Promise.resolve(C)}async readFile(r){let p=this.storageService.get(D.TRUSTED_DOMAINS_CONTENT_STORAGE_KEY,0);const u=r.fragment,{defaultTrustedDomains:a,trustedDomains:n,userDomains:h,workspaceDomains:g}=await this.instantiationService.invokeFunction(D.readTrustedDomains);return(!p||p.indexOf(o)===-1||p.indexOf(c)===-1||p.indexOf(u??"")===-1||[...a,...n,...h,...g].some(m=>!(0,I.assertIsDefined)(p).includes(m)))&&(p=S(a,n,h,g,u)),k.VSBuffer.fromString(p).buffer}writeFile(r,p,u){try{const a=k.VSBuffer.wrap(p).toString(),n=(0,f.parse)(a);this.storageService.store(D.TRUSTED_DOMAINS_CONTENT_STORAGE_KEY,a,0,0),this.storageService.store(D.TRUSTED_DOMAINS_STORAGE_KEY,JSON.stringify(n)||"",0,0)}catch{}return Promise.resolve()}watch(r,p){return{dispose(){}}}mkdir(r){return Promise.resolve(void 0)}readdir(r){return Promise.resolve(void 0)}delete(r,p){return Promise.resolve(void 0)}rename(r,p,u){return Promise.resolve(void 0)}};s=Ee([W(0,_.IFileService),W(1,A.IStorageService),W(2,w.IInstantiationService)],s),e.TrustedDomainsFileSystemProvider=s}),define(ne[2630],re([1,0,18,81,9,1810,54,41,46,53,24,631,21,95,27,5,11,271,34,831,114,8]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isURLDomainTrusted=e.OpenerValidatorContributions=void 0;let n=class{constructor(y,T,R,O,x,F,L,M,N,B,P,V,z){this._openerService=y,this._storageService=T,this._dialogService=R,this._productService=O,this._quickInputService=x,this._editorService=F,this._clipboardService=L,this._telemetryService=M,this._instantiationService=N,this._authenticationService=B,this._workspaceContextService=P,this._configurationService=V,this._workspaceTrustService=z,this._openerService.registerValidator({shouldOpen:U=>this.validateLink(U)}),this._readAuthenticationTrustedDomainsResult=new s.IdleValue(()=>this._instantiationService.invokeFunction(C.readAuthenticationTrustedDomains)),this._authenticationService.onDidRegisterAuthenticationProvider(()=>{this._readAuthenticationTrustedDomainsResult?.dispose(),this._readAuthenticationTrustedDomainsResult=new s.IdleValue(()=>this._instantiationService.invokeFunction(C.readAuthenticationTrustedDomains))}),this._readWorkspaceTrustedDomainsResult=new s.IdleValue(()=>this._instantiationService.invokeFunction(C.readWorkspaceTrustedDomains)),this._workspaceContextService.onDidChangeWorkspaceFolders(()=>{this._readWorkspaceTrustedDomainsResult?.dispose(),this._readWorkspaceTrustedDomainsResult=new s.IdleValue(()=>this._instantiationService.invokeFunction(C.readWorkspaceTrustedDomains))})}async validateLink(y){if(!(0,D.matchesScheme)(y,t.Schemas.http)&&!(0,D.matchesScheme)(y,t.Schemas.https)||this._workspaceTrustService.isWorkspaceTrusted()&&!this._configurationService.getValue("workbench.trustedDomains.promptInTrustedWorkspace"))return!0;const T=y;typeof y=="string"&&(y=_.URI.parse(y));const{scheme:R,authority:O,path:x,query:F,fragment:L}=y,M=`${R}://${O}`,[N,B]=await Promise.all([this._readWorkspaceTrustedDomainsResult.value,this._readAuthenticationTrustedDomainsResult.value]),{defaultTrustedDomains:P,trustedDomains:V}=this._instantiationService.invokeFunction(C.readStaticTrustedDomains),z=[...P,...V,...B,...N];if(b(y,z))return!0;{let U=`${R}://${O}${x}`;const H=`${F?"?"+F:""}${L?"#"+L:""}`,K=Math.max(0,60-U.length),G=Math.min(Math.max(5,K),H.length);G===H.length?U+=H:U+=H.charAt(0)+"..."+H.substring(H.length-G+1);const{choice:q}=await this._dialogService.show(f.default.Info,(0,A.localize)(0,null,this._productService.nameShort),[(0,A.localize)(1,null),(0,A.localize)(2,null),(0,A.localize)(3,null),(0,A.localize)(4,null)],{detail:typeof T=="string"?T:U,cancelId:2});if(q===0)return!0;if(q===1)this._clipboardService.writeText(typeof T=="string"?T:y.toString(!0));else if(q===3){const Z=await(0,C.configureOpenerTrustedDomainsHandler)(V,M,y,this._quickInputService,this._storageService,this._editorService,this._telemetryService);return!!(Z.indexOf("*")!==-1||b(y,Z))}return!1}}};n=Ee([W(0,D.IOpenerService),W(1,v.IStorageService),W(2,k.IDialogService),W(3,I.IProductService),W(4,w.IQuickInputService),W(5,o.IEditorService),W(6,c.IClipboardService),W(7,i.ITelemetryService),W(8,S.IInstantiationService),W(9,l.IAuthenticationService),W(10,r.IWorkspaceContextService),W(11,a.IConfigurationService),W(12,u.IWorkspaceTrustManagementService)],n),e.OpenerValidatorContributions=n;const h=/^localhost(:\d+)?$/i,g=/^127.0.0.1(:\d+)?$/;function d(E){return h.test(E)||g.test(E)}function m(E){const y=["github.com"];try{const T=typeof E=="string"?_.URI.parse(E,!0):E;return y.includes(T.authority)?T.with({path:T.path.toLowerCase()}).toString(!0):T.toString(!0)}catch{return E.toString()}}function b(E,y){if(E=_.URI.parse(m(E)),y=y.map(m),d(E.authority))return!0;for(let T=0;T<y.length;T++)if(y[T]==="*"||(0,p.testUrlMatchesGlob)(E.toString(),y[T]))return!0;return!1}e.isURLDomainTrusted=b}),define(ne[2631],re([1,0,9,1811,16,28,53,17,407,47,2288,631,2629,2630,70,57,248]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class l extends _.Action2{constructor(){super({id:"workbench.action.url.openUrl",title:{value:(0,f.localize)(0,null),original:"Open URL"},category:i.CATEGORIES.Developer,f1:!0})}async run(u){const a=u.get(k.IQuickInputService),n=u.get(I.IURLService);return a.input({prompt:(0,f.localize)(1,null)}).then(h=>{if(h){const g=t.URI.parse(h);n.open(g,{originalUrl:h})}})}}(0,_.registerAction2)(l),A.CommandsRegistry.registerCommand(C.manageTrustedDomainSettingsCommand),_.MenuRegistry.appendMenuItem(_.MenuId.CommandPalette,{command:{id:C.manageTrustedDomainSettingsCommand.id,title:{value:C.manageTrustedDomainSettingsCommand.description.description,original:"Manage Trusted Domains"}}}),D.Registry.as(w.Extensions.Workbench).registerWorkbenchContribution(c.OpenerValidatorContributions,3),D.Registry.as(w.Extensions.Workbench).registerWorkbenchContribution(o.TrustedDomainsFileSystemProvider,2),D.Registry.as(w.Extensions.Workbench).registerWorkbenchContribution(v.ExternalUriResolverContribution,2),D.Registry.as(S.Extensions.Configuration).registerConfiguration({...s.workbenchConfigurationNodeBase,properties:{"workbench.trustedDomains.promptInTrustedWorkspace":{scope:1,type:"boolean",default:!1,description:(0,f.localize)(2,null)}}})}),define(ne[2632],re([1,0,1853,118,302,11,17,34,85,83,8,191,23,61,57,21,26,108,13,109,56,20,136,84]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationEditingService=e.EditableConfigurationTarget=e.ConfigurationEditingError=e.ConfigurationEditingErrorCode=void 0;var g;(function(E){E[E.ERROR_UNKNOWN_KEY=0]="ERROR_UNKNOWN_KEY",E[E.ERROR_INVALID_WORKSPACE_CONFIGURATION_APPLICATION=1]="ERROR_INVALID_WORKSPACE_CONFIGURATION_APPLICATION",E[E.ERROR_INVALID_WORKSPACE_CONFIGURATION_MACHINE=2]="ERROR_INVALID_WORKSPACE_CONFIGURATION_MACHINE",E[E.ERROR_INVALID_FOLDER_CONFIGURATION=3]="ERROR_INVALID_FOLDER_CONFIGURATION",E[E.ERROR_INVALID_USER_TARGET=4]="ERROR_INVALID_USER_TARGET",E[E.ERROR_INVALID_WORKSPACE_TARGET=5]="ERROR_INVALID_WORKSPACE_TARGET",E[E.ERROR_INVALID_FOLDER_TARGET=6]="ERROR_INVALID_FOLDER_TARGET",E[E.ERROR_INVALID_RESOURCE_LANGUAGE_CONFIGURATION=7]="ERROR_INVALID_RESOURCE_LANGUAGE_CONFIGURATION",E[E.ERROR_NO_WORKSPACE_OPENED=8]="ERROR_NO_WORKSPACE_OPENED",E[E.ERROR_CONFIGURATION_FILE_DIRTY=9]="ERROR_CONFIGURATION_FILE_DIRTY",E[E.ERROR_CONFIGURATION_FILE_MODIFIED_SINCE=10]="ERROR_CONFIGURATION_FILE_MODIFIED_SINCE",E[E.ERROR_INVALID_CONFIGURATION=11]="ERROR_INVALID_CONFIGURATION",E[E.ERROR_INTERNAL=12]="ERROR_INTERNAL"})(g=e.ConfigurationEditingErrorCode||(e.ConfigurationEditingErrorCode={}));class d extends Error{constructor(y,T){super(y);this.code=T}}e.ConfigurationEditingError=d;var m;(function(E){E[E.USER_LOCAL=1]="USER_LOCAL",E[E.USER_REMOTE=2]="USER_REMOTE",E[E.WORKSPACE=3]="WORKSPACE",E[E.WORKSPACE_FOLDER=4]="WORKSPACE_FOLDER"})(m=e.EditableConfigurationTarget||(e.EditableConfigurationTarget={}));let b=class{constructor(y,T,R,O,x,F,L,M,N,B,P){this.configurationService=y,this.contextService=T,this.environmentService=R,this.fileService=O,this.textModelResolverService=x,this.textFileService=F,this.notificationService=L,this.preferencesService=M,this.editorService=N,this.uriIdentityService=P,this.remoteSettingsResource=null,this.queue=new A.Queue,B.getEnvironment().then(V=>{V&&(this.remoteSettingsResource=V.settingsPath)})}async writeConfiguration(y,T,R={}){const O=this.getConfigurationEditOperation(y,T,R.scopes||{});return this.queue.queue(async()=>{try{await this.doWriteConfiguration(O,R)}catch(x){if(R.donotNotifyError)throw x;await this.onError(x,O,R.scopes)}})}async doWriteConfiguration(y,T){await this.validate(y.target,y,!T.handleDirtyFile,T.scopes||{});const R=y.resource,O=await this.resolveModelReference(R);try{const x=this.getFormattingOptions(O.object.textEditorModel);await this.updateConfiguration(y,O.object.textEditorModel,x,T)}finally{O.dispose()}}async updateConfiguration(y,T,R,O){if(this.hasParseErrors(T.getValue(),y))throw this.toConfigurationEditingError(11,y.target,y);if(this.textFileService.isDirty(T.uri)&&O.handleDirtyFile)switch(O.handleDirtyFile){case"save":await this.save(T,y);break;case"revert":await this.textFileService.revert(T.uri);break}const x=this.getEdits(y,T.getValue(),R)[0];x&&this.applyEditsToBuffer(x,T)&&await this.save(T,y)}async save(y,T){try{await this.textFileService.save(y.uri,{ignoreErrorHandler:!0})}catch(R){throw R.fileOperationResult===3?this.toConfigurationEditingError(10,T.target,T):this.toConfigurationEditingError(12,T.target,T)}}applyEditsToBuffer(y,T){const R=T.getPositionAt(y.offset),O=T.getPositionAt(y.offset+y.length),x=new a.Range(R.lineNumber,R.column,O.lineNumber,O.column);let F=T.getValueInRange(x);if(y.content!==F){const L=F?n.EditOperation.replace(x,y.content):n.EditOperation.insert(R,y.content);return T.pushEditOperations([new h.Selection(R.lineNumber,R.column,R.lineNumber,R.column)],[L],()=>[]),!0}return!1}getEdits({value:y,jsonPath:T},R,O){return T.length?(0,_.setProperty)(R,T,y,O):[{content:JSON.stringify(y,null,O.insertSpaces&&O.tabSize?" ".repeat(O.tabSize):" "),length:R.length,offset:0}]}getFormattingOptions(y){const{insertSpaces:T,tabSize:R}=y.getOptions(),O=y.getEOL();return{insertSpaces:T,tabSize:R,eol:O}}async onError(y,T,R){switch(y.code){case 11:this.onInvalidConfigurationError(y,T);break;case 9:this.onConfigurationFileDirtyError(y,T,R);break;case 10:return this.doWriteConfiguration(T,{scopes:R,handleDirtyFile:"revert"});default:this.notificationService.error(y.message)}}onInvalidConfigurationError(y,T){const R=T.workspaceStandAloneConfigurationKey===C.TASKS_CONFIGURATION_KEY?t.localize(0,null):T.workspaceStandAloneConfigurationKey===C.LAUNCH_CONFIGURATION_KEY?t.localize(1,null):null;R?this.notificationService.prompt(s.Severity.Error,y.message,[{label:R,run:()=>this.openFile(T.resource)}]):this.notificationService.prompt(s.Severity.Error,y.message,[{label:t.localize(2,null),run:()=>this.openSettings(T)}])}onConfigurationFileDirtyError(y,T,R){const O=T.workspaceStandAloneConfigurationKey===C.TASKS_CONFIGURATION_KEY?t.localize(3,null):T.workspaceStandAloneConfigurationKey===C.LAUNCH_CONFIGURATION_KEY?t.localize(4,null):null;O?this.notificationService.prompt(s.Severity.Error,y.message,[{label:t.localize(5,null),run:()=>{const x=T.key?`${T.workspaceStandAloneConfigurationKey}.${T.key}`:T.workspaceStandAloneConfigurationKey;this.writeConfiguration(T.target,{key:x,value:T.value},{handleDirtyFile:"save",scopes:R})}},{label:O,run:()=>this.openFile(T.resource)}]):this.notificationService.prompt(s.Severity.Error,y.message,[{label:t.localize(6,null),run:()=>this.writeConfiguration(T.target,{key:T.key,value:T.value},{handleDirtyFile:"save",scopes:R})},{label:t.localize(7,null),run:()=>this.openSettings(T)}])}openSettings(y){const T={jsonEditor:!0};switch(y.target){case 1:this.preferencesService.openUserSettings(T);break;case 2:this.preferencesService.openRemoteSettings(T);break;case 3:this.preferencesService.openWorkspaceSettings(T);break;case 4:if(y.resource){const R=this.contextService.getWorkspaceFolder(y.resource);R&&this.preferencesService.openFolderSettings({folderUri:R.uri,jsonEditor:!0})}break}}openFile(y){this.editorService.openEditor({resource:y,options:{pinned:!0}})}toConfigurationEditingError(y,T,R){const O=this.toErrorMessage(y,T,R);return new d(O,y)}toErrorMessage(y,T,R){switch(y){case 0:return t.localize(8,null,this.stringifyTarget(T),R.key);case 1:return t.localize(9,null,R.key);case 2:return t.localize(10,null,R.key);case 3:return t.localize(11,null,R.key);case 4:return t.localize(12,null,R.key);case 5:return t.localize(13,null,R.key);case 6:return t.localize(14,null);case 7:return t.localize(15,null,R.key);case 8:return t.localize(16,null,this.stringifyTarget(T));case 11:{if(R.workspaceStandAloneConfigurationKey===C.TASKS_CONFIGURATION_KEY)return t.localize(17,null);if(R.workspaceStandAloneConfigurationKey===C.LAUNCH_CONFIGURATION_KEY)return t.localize(18,null);switch(T){case 1:return t.localize(19,null);case 2:return t.localize(20,null);case 3:return t.localize(21,null);case 4:{let O="<<unknown>>";if(R.resource){const x=this.contextService.getWorkspaceFolder(R.resource);x&&(O=x.name)}return t.localize(22,null,O)}default:return""}}case 9:{if(R.workspaceStandAloneConfigurationKey===C.TASKS_CONFIGURATION_KEY)return t.localize(23,null);if(R.workspaceStandAloneConfigurationKey===C.LAUNCH_CONFIGURATION_KEY)return t.localize(24,null);switch(T){case 1:return t.localize(25,null);case 2:return t.localize(26,null);case 3:return t.localize(27,null);case 4:{let O="<<unknown>>";if(R.resource){const x=this.contextService.getWorkspaceFolder(R.resource);x&&(O=x.name)}return t.localize(28,null,O)}default:return""}}case 10:if(R.workspaceStandAloneConfigurationKey===C.TASKS_CONFIGURATION_KEY)return t.localize(29,null);if(R.workspaceStandAloneConfigurationKey===C.LAUNCH_CONFIGURATION_KEY)return t.localize(30,null);switch(T){case 1:return t.localize(31,null);case 2:return t.localize(32,null);case 3:return t.localize(33,null);case 4:return t.localize(34,null)}case 12:return t.localize(35,null,this.stringifyTarget(T))}}stringifyTarget(y){switch(y){case 1:return t.localize(36,null);case 2:return t.localize(37,null);case 3:return t.localize(38,null);case 4:return t.localize(39,null);default:return""}}defaultResourceValue(y){const T=this.uriIdentityService.extUri.basename(y);switch(T.substr(0,T.length-this.uriIdentityService.extUri.extname(y).length)){case C.TASKS_CONFIGURATION_KEY:return C.TASKS_DEFAULT;default:return"{}"}}async resolveModelReference(y){return await this.fileService.exists(y)||await this.textFileService.write(y,this.defaultResourceValue(y),{encoding:"utf8"}),this.textModelResolverService.createModelReference(y)}hasParseErrors(y,T){if(T.workspaceStandAloneConfigurationKey&&!T.key)return!1;const R=[];return f.parse(y,R,{allowTrailingComma:!0,allowEmptyContent:!0}),R.length>0}async validate(y,T,R,O){const F=k.Registry.as(i.Extensions.Configuration).getConfigurationProperties()[T.key]?.scope;if(!T.workspaceStandAloneConfigurationKey&&this.configurationService.keys().default.indexOf(T.key)<0&&!i.OVERRIDE_PROPERTY_REGEX.test(T.key)&&T.value!==void 0)throw this.toConfigurationEditingError(0,y,T);if(T.workspaceStandAloneConfigurationKey&&T.workspaceStandAloneConfigurationKey!==C.TASKS_CONFIGURATION_KEY&&(y===1||y===2))throw this.toConfigurationEditingError(4,y,T);if((y===3||y===4)&&this.contextService.getWorkbenchState()===1)throw this.toConfigurationEditingError(8,y,T);if(y===3&&!T.workspaceStandAloneConfigurationKey&&!i.OVERRIDE_PROPERTY_REGEX.test(T.key)){if(F===1)throw this.toConfigurationEditingError(1,y,T);if(F===2)throw this.toConfigurationEditingError(2,y,T)}if(y===4){if(!T.resource)throw this.toConfigurationEditingError(6,y,T);if(!T.workspaceStandAloneConfigurationKey&&!i.OVERRIDE_PROPERTY_REGEX.test(T.key)&&F!==void 0&&!C.FOLDER_SCOPES.includes(F))throw this.toConfigurationEditingError(3,y,T)}if(O.overrideIdentifiers?.length&&F!==5)throw this.toConfigurationEditingError(7,y,T);if(!T.resource)throw this.toConfigurationEditingError(6,y,T);if(R&&this.textFileService.isDirty(T.resource))throw this.toConfigurationEditingError(9,y,T)}getConfigurationEditOperation(y,T,R){if(T.key){const L=y===1?C.USER_STANDALONE_CONFIGURATIONS:C.WORKSPACE_STANDALONE_CONFIGURATIONS,M=Object.keys(L);for(const N of M){const B=this.getConfigurationFileResource(y,L[N],R.resource);if(T.key===N){const V=this.isWorkspaceConfigurationResource(B)?[N]:[];return{key:V[V.length-1],jsonPath:V,value:T.value,resource:(0,r.withNullAsUndefined)(B),workspaceStandAloneConfigurationKey:N,target:y}}const P=`${N}.`;if(T.key.indexOf(P)===0){const V=this.isWorkspaceConfigurationResource(B)?[N,T.key.substr(P.length)]:[T.key.substr(P.length)];return{key:V[V.length-1],jsonPath:V,value:T.value,resource:(0,r.withNullAsUndefined)(B),workspaceStandAloneConfigurationKey:N,target:y}}}}let O=T.key,x=R.overrideIdentifiers?.length?[(0,i.keyFromOverrideIdentifiers)(R.overrideIdentifiers),O]:[O];if(y===1||y===2)return{key:O,jsonPath:x,value:T.value,resource:(0,r.withNullAsUndefined)(this.getConfigurationFileResource(y,"",null)),target:y};const F=this.getConfigurationFileResource(y,C.FOLDER_SETTINGS_PATH,R.resource);return this.isWorkspaceConfigurationResource(F)&&(x=["settings",...x]),{key:O,jsonPath:x,value:T.value,resource:(0,r.withNullAsUndefined)(F),target:y}}isWorkspaceConfigurationResource(y){const T=this.contextService.getWorkspace();return!!(T.configuration&&y&&T.configuration.fsPath===y.fsPath)}getConfigurationFileResource(y,T,R){if(y===1)return T?this.uriIdentityService.extUri.joinPath(this.uriIdentityService.extUri.dirname(this.environmentService.settingsResource),T):this.environmentService.settingsResource;if(y===2)return this.remoteSettingsResource;const O=this.contextService.getWorkbenchState();if(O!==1){const x=this.contextService.getWorkspace();if(y===3){if(O===3)return(0,r.withUndefinedAsNull)(x.configuration);if(O===2)return x.folders[0].toResource(T)}if(y===4&&R){const F=this.contextService.getWorkspaceFolder(R);if(F)return F.toResource(T)}}return null}};b=Ee([W(0,v.IConfigurationService),W(1,D.IWorkspaceContextService),W(2,I.IEnvironmentService),W(3,o.IFileService),W(4,c.ITextModelService),W(5,w.ITextFileService),W(6,s.INotificationService),W(7,l.IPreferencesService),W(8,S.IEditorService),W(9,p.IRemoteAgentService),W(10,u.IUriIdentityService)],b),e.ConfigurationEditingService=b}),define(ne[914],re([1,0,1854,118,302,11,136,20,84,83,23,61,272,35]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JSONEditingService=void 0;let i=class{constructor(s,l,r){this.fileService=s,this.textModelResolverService=l,this.textFileService=r,this.queue=new A.Queue}write(s,l,r){return Promise.resolve(this.queue.queue(()=>this.doWriteConfiguration(s,l,r)))}async doWriteConfiguration(s,l,r){const p=await this.resolveAndValidate(s,r);try{await this.writeToBuffer(p.object.textEditorModel,l,r)}finally{p.dispose()}}async writeToBuffer(s,l,r){let p=!1;for(const u of l){const a=this.getEdits(s,u)[0];p=this.applyEditsToBuffer(a,s)}if(p&&r)return this.textFileService.save(s.uri)}applyEditsToBuffer(s,l){const r=l.getPositionAt(s.offset),p=l.getPositionAt(s.offset+s.length),u=new D.Range(r.lineNumber,r.column,p.lineNumber,p.column);let a=l.getValueInRange(u);if(s.content!==a){const n=a?k.EditOperation.replace(u,s.content):k.EditOperation.insert(r,s.content);return l.pushEditOperations([new I.Selection(r.lineNumber,r.column,r.lineNumber,r.column)],[n],()=>[]),!0}return!1}getEdits(s,l){const{tabSize:r,insertSpaces:p}=s.getOptions(),u=s.getEOL(),{path:a,value:n}=l;if(!a.length){const h=JSON.stringify(n,null,p?" ".repeat(r):" ");return[{content:h,length:h.length,offset:0}]}return(0,_.setProperty)(s.getValue(),a,n,{tabSize:r,insertSpaces:p,eol:u})}async resolveModelReference(s){return await this.fileService.exists(s)||await this.textFileService.write(s,"{}",{encoding:"utf8"}),this.textModelResolverService.createModelReference(s)}hasParseErrors(s){const l=[];return f.parse(s.getValue(),l,{allowTrailingComma:!0,allowEmptyContent:!0}),l.length>0}async resolveAndValidate(s,l){const r=await this.resolveModelReference(s),p=r.object.textEditorModel;return this.hasParseErrors(p)?(r.dispose(),this.reject(1)):l&&this.textFileService.isDirty(s)?(r.dispose(),this.reject(0)):r}reject(s){const l=this.toErrorMessage(s);return Promise.reject(new o.JSONEditingError(l,s))}toErrorMessage(s){switch(s){case 1:return t.localize(0,null);case 0:return t.localize(1,null)}}};i=Ee([W(0,v.IFileService),W(1,C.ITextModelService),W(2,w.ITextFileService)],i),e.JSONEditingService=i,(0,c.registerSingleton)(o.IJSONEditingService,i,!0)}),define(ne[2633],re([1,0,9,6,55,51,2,11,146,34,468,8,838,191,17,57,189,2632,2259,914,235,50,47,130,114,15,143,40,295,13,1852]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceService=void 0;class R extends w.Workspace{constructor(){super(...arguments);this.initialized=!1}}class O extends k.Disposable{constructor({remoteAuthority:B,configurationCache:P},V,z,U,H,K){super();if(this.initialized=!1,this.remoteUserConfiguration=null,this._onDidChangeConfiguration=this._register(new f.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onWillChangeWorkspaceFolders=this._register(new f.Emitter),this.onWillChangeWorkspaceFolders=this._onWillChangeWorkspaceFolders.event,this._onDidChangeWorkspaceFolders=this._register(new f.Emitter),this.onDidChangeWorkspaceFolders=this._onDidChangeWorkspaceFolders.event,this._onDidChangeWorkspaceName=this._register(new f.Emitter),this.onDidChangeWorkspaceName=this._onDidChangeWorkspaceName.event,this._onDidChangeWorkbenchState=this._register(new f.Emitter),this.onDidChangeWorkbenchState=this._onDidChangeWorkbenchState.event,this.isWorkspaceTrusted=!0,this._restrictedSettings={default:[]},this._onDidChangeRestrictedSettings=this._register(new f.Emitter),this.onDidChangeRestrictedSettings=this._onDidChangeRestrictedSettings.event,this.cyclicDependency=new Promise(G=>this.cyclicDependencyReady=G),this.configurationRegistry=i.Registry.as(S.Extensions.Configuration),this.initRemoteUserConfigurationBarrier=new D.Barrier,this.completeWorkspaceBarrier=new D.Barrier,this.defaultConfiguration=new r.DefaultConfiguration(P,V),this.configurationCache=P,this.fileService=z,this.uriIdentityService=H,this.logService=K,this._configuration=new o.Configuration(this.defaultConfiguration.configurationModel,new v.ConfigurationModel,new v.ConfigurationModel,new v.ConfigurationModel,new _.ResourceMap,new v.ConfigurationModel,new _.ResourceMap,this.workspace),this.cachedFolderConfigs=new _.ResourceMap,this.localUserConfiguration=this._register(new r.UserConfiguration(V.settingsResource,B?c.LOCAL_MACHINE_SCOPES:void 0,z,H,K)),this._register(this.localUserConfiguration.onDidChangeConfiguration(G=>this.onLocalUserConfigurationChanged(G))),B){const G=this.remoteUserConfiguration=this._register(new r.RemoteUserConfiguration(B,P,z,H,U));this._register(G.onDidInitialize(q=>{this._register(G.onDidChangeConfiguration(Z=>this.onRemoteUserConfigurationChanged(Z))),this.onRemoteUserConfigurationChanged(q),this.initRemoteUserConfigurationBarrier.open()}))}else this.initRemoteUserConfigurationBarrier.open();this.workspaceConfiguration=this._register(new r.WorkspaceConfiguration(P,z,H,K)),this._register(this.workspaceConfiguration.onDidUpdateConfiguration(G=>{this.onWorkspaceConfigurationChanged(G).then(()=>{this.workspace.initialized=this.workspaceConfiguration.initialized,this.checkAndMarkWorkspaceComplete(G)})})),this._register(this.defaultConfiguration.onDidChangeConfiguration(({properties:G,defaults:q})=>this.onDefaultConfigurationChanged(q,G))),this.workspaceEditingQueue=new D.Queue}get restrictedSettings(){return this._restrictedSettings}async getCompleteWorkspace(){return await this.completeWorkspaceBarrier.wait(),this.getWorkspace()}getWorkspace(){return this.workspace}getWorkbenchState(){return this.workspace.configuration?3:this.workspace.folders.length===1?2:1}getWorkspaceFolder(B){return this.workspace.getFolder(B)}addFolders(B,P){return this.updateFolders(B,[],P)}removeFolders(B){return this.updateFolders([],B)}async updateFolders(B,P,V){return await this.cyclicDependency,this.workspaceEditingQueue.queue(()=>this.doUpdateFolders(B,P,V))}isInsideWorkspace(B){return!!this.getWorkspaceFolder(B)}isCurrentWorkspace(B){switch(this.getWorkbenchState()){case 2:{let P;return t.URI.isUri(B)?P=B:(0,w.isSingleFolderWorkspaceIdentifier)(B)&&(P=B.uri),t.URI.isUri(P)&&this.uriIdentityService.extUri.isEqual(P,this.workspace.folders[0].uri)}case 3:return(0,w.isWorkspaceIdentifier)(B)&&this.workspace.id===B.id}return!1}async doUpdateFolders(B,P,V){if(this.getWorkbenchState()!==3||B.length+P.length===0)return Promise.resolve(void 0);let z=!1,U=this.getWorkspace().folders,H=U.map(G=>G.raw).filter((G,q)=>(0,s.isStoredWorkspaceFolder)(G)?!this.contains(P,U[q].uri):!0);const K=(0,s.useSlashForPath)(H);if(z=U.length!==H.length,B.length){const G=this.getWorkspace().configuration,q=this.uriIdentityService.extUri.dirname(G);U=(0,s.toWorkspaceFolders)(H,G,this.uriIdentityService.extUri);const Z=U.map(X=>X.uri),j=[];for(const X of B){const Y=X.uri;if(!this.contains(Z,Y)){try{if(!(await this.fileService.stat(Y)).isDirectory)continue}catch{}j.push((0,s.getStoredWorkspaceFolder)(Y,!1,X.name,q,K,this.uriIdentityService.extUri))}}j.length>0&&(z=!0,typeof V=="number"&&V>=0&&V<H.length?(H=H.slice(0),H.splice(V,0,...j)):H=[...H,...j])}return z?this.setFolders(H):Promise.resolve(void 0)}async setFolders(B){return await this.cyclicDependency,await this.workspaceConfiguration.setFolders(B,this.jsonEditingService),this.onWorkspaceConfigurationChanged(!1)}contains(B,P){return B.some(V=>this.uriIdentityService.extUri.isEqual(V,P))}getConfigurationData(){return this._configuration.toData()}getValue(B,P){const V=typeof B=="string"?B:void 0,z=(0,C.isConfigurationOverrides)(B)?B:(0,C.isConfigurationOverrides)(P)?P:void 0;return this._configuration.getValue(V,z)}async updateValue(B,P,V,z,U){await this.cyclicDependency;const H=(0,C.isConfigurationUpdateOverrides)(V)?V:(0,C.isConfigurationOverrides)(V)?{resource:V.resource,overrideIdentifiers:V.overrideIdentifier?[V.overrideIdentifier]:void 0}:void 0,K=H?z:V,G=K?[K]:[];if(H?.overrideIdentifiers&&(H.overrideIdentifiers=(0,d.distinct)(H.overrideIdentifiers),H.overrideIdentifiers=H.overrideIdentifiers.length?H.overrideIdentifiers:void 0),!G.length){if(H?.overrideIdentifiers&&H.overrideIdentifiers.length>1)throw new Error("Configuration Target is required while updating the value for multiple override identifiers");const q=this.inspect(B,{resource:H?.resource,overrideIdentifier:H?.overrideIdentifiers?H.overrideIdentifiers[0]:void 0});G.push(...this.deriveConfigurationTargets(B,P,q)),(0,A.equals)(P,q.defaultValue)&&G.length===1&&(G[0]===1||G[0]===2)&&(P=void 0)}await D.Promises.settled(G.map(q=>this.writeConfigurationValue(B,P,q,H,U)))}async reloadConfiguration(B){if(B===void 0){const{local:P,remote:V}=await this.reloadUserConfiguration();await this.reloadWorkspaceConfiguration(),await this.loadConfiguration(P,V);return}if((0,w.isWorkspaceFolder)(B)){await this.reloadWorkspaceFolderConfiguration(B);return}switch(B){case 6:await this.reloadDefaultConfiguration();return;case 1:{const{local:P,remote:V}=await this.reloadUserConfiguration();await this.loadConfiguration(P,V);return}case 2:await this.reloadLocalUserConfiguration();return;case 3:await this.reloadRemoteUserConfiguration();return;case 4:case 5:await this.reloadWorkspaceConfiguration();return}}inspect(B,P){return this._configuration.inspect(B,P)}keys(){return this._configuration.keys()}async whenRemoteConfigurationLoaded(){await this.initRemoteUserConfigurationBarrier.wait()}async initialize(B){(0,u.mark)("code/willInitWorkspaceService");const P=await this.createWorkspace(B);await this.updateWorkspaceAndInitializeConfiguration(P),this.checkAndMarkWorkspaceComplete(!1),(0,u.mark)("code/didInitWorkspaceService")}updateWorkspaceTrust(B){if(this.isWorkspaceTrusted!==B){this.isWorkspaceTrusted=B;const P=this._configuration.toData(),V=[];for(const U of this.workspace.folders){const H=this.cachedFolderConfigs.get(U.uri);let K;H&&(K=H.updateWorkspaceTrust(this.isWorkspaceTrusted),this._configuration.updateFolderConfiguration(U.uri,K)),V.push(K)}this.getWorkbenchState()===2?V[0]&&this._configuration.updateWorkspaceConfiguration(V[0]):this._configuration.updateWorkspaceConfiguration(this.workspaceConfiguration.updateWorkspaceTrust(this.isWorkspaceTrusted)),this.updateRestrictedSettings();let z=[];this.restrictedSettings.userLocal&&z.push(...this.restrictedSettings.userLocal),this.restrictedSettings.userRemote&&z.push(...this.restrictedSettings.userRemote),this.restrictedSettings.workspace&&z.push(...this.restrictedSettings.workspace),this.restrictedSettings.workspaceFolder&&this.restrictedSettings.workspaceFolder.forEach(U=>z.push(...U)),z=(0,d.distinct)(z),z.length&&this.triggerConfigurationChange({keys:z,overrides:[]},{data:P,workspace:this.workspace},4)}}acquireInstantiationService(B){this.configurationEditingService=B.createInstance(l.ConfigurationEditingService),this.jsonEditingService=B.createInstance(p.JSONEditingService),this.cyclicDependencyReady?this.cyclicDependencyReady():this.cyclicDependency=Promise.resolve(void 0)}async createWorkspace(B){return(0,w.isWorkspaceIdentifier)(B)?this.createMultiFolderWorkspace(B):(0,w.isSingleFolderWorkspaceIdentifier)(B)?this.createSingleFolderWorkspace(B):this.createEmptyWorkspace(B)}async createMultiFolderWorkspace(B){await this.workspaceConfiguration.initialize({id:B.id,configPath:B.configPath},this.isWorkspaceTrusted);const P=B.configPath,V=(0,s.toWorkspaceFolders)(this.workspaceConfiguration.getFolders(),P,this.uriIdentityService.extUri),z=B.id,U=new R(z,V,this.workspaceConfiguration.isTransient(),P,H=>this.uriIdentityService.extUri.ignorePathCasing(H));return U.initialized=this.workspaceConfiguration.initialized,U}createSingleFolderWorkspace(B){const P=new R(B.id,[(0,w.toWorkspaceFolder)(B.uri)],!1,null,V=>this.uriIdentityService.extUri.ignorePathCasing(V));return P.initialized=!0,P}createEmptyWorkspace(B){const P=new R(B.id,[],!1,null,V=>this.uriIdentityService.extUri.ignorePathCasing(V));return P.initialized=!0,Promise.resolve(P)}checkAndMarkWorkspaceComplete(B){!this.completeWorkspaceBarrier.isOpen()&&this.workspace.initialized&&(this.completeWorkspaceBarrier.open(),this.validateWorkspaceFoldersAndReload(B))}async updateWorkspaceAndInitializeConfiguration(B){const P=!!this.workspace;let V,z,U=[];if(P?(V=this.getWorkbenchState(),z=this.workspace.configuration?this.workspace.configuration.fsPath:void 0,U=this.workspace.folders,this.workspace.update(B)):this.workspace=B,await this.initializeConfiguration(),P){const H=this.getWorkbenchState();V&&H!==V&&this._onDidChangeWorkbenchState.fire(H);const K=this.workspace.configuration?this.workspace.configuration.fsPath:void 0;(z&&K!==z||H!==V)&&this._onDidChangeWorkspaceName.fire();const G=this.compareFolders(U,this.workspace.folders);G&&(G.added.length||G.removed.length||G.changed.length)&&(await this.handleWillChangeWorkspaceFolders(G,!1),this._onDidChangeWorkspaceFolders.fire(G))}this.localUserConfiguration.hasTasksLoaded||this._register((0,D.runWhenIdle)(()=>this.reloadLocalUserConfiguration(),5e3))}compareFolders(B,P){const V={added:[],removed:[],changed:[]};V.added=P.filter(z=>!B.some(U=>z.uri.toString()===U.uri.toString()));for(let z=0;z<B.length;z++){let U=B[z],H=0;for(H=0;H<P.length&&U.uri.toString()!==P[H].uri.toString();H++);H<P.length?(z!==H||U.name!==P[H].name)&&V.changed.push(U):V.removed.push(U)}return V}async initializeConfiguration(){await this.defaultConfiguration.initialize(),(0,u.mark)("code/willInitUserConfiguration");const{local:B,remote:P}=await this.initializeUserConfiguration();(0,u.mark)("code/didInitUserConfiguration"),(0,u.mark)("code/willInitWorkspaceConfiguration"),await this.loadConfiguration(B,P),(0,u.mark)("code/didInitWorkspaceConfiguration")}async initializeUserConfiguration(){const[B,P]=await Promise.all([this.localUserConfiguration.initialize(),this.remoteUserConfiguration?this.remoteUserConfiguration.initialize():Promise.resolve(new v.ConfigurationModel)]);return{local:B,remote:P}}async reloadDefaultConfiguration(){this.onDefaultConfigurationChanged(this.defaultConfiguration.reload())}async reloadUserConfiguration(){const[B,P]=await Promise.all([this.reloadLocalUserConfiguration(!0),this.reloadRemoteUserConfiguration(!0)]);return{local:B,remote:P}}async reloadLocalUserConfiguration(B){const P=await this.localUserConfiguration.reload();return B||this.onLocalUserConfigurationChanged(P),P}async reloadRemoteUserConfiguration(B){if(this.remoteUserConfiguration){const P=await this.remoteUserConfiguration.reload();return B||this.onRemoteUserConfigurationChanged(P),P}return new v.ConfigurationModel}async reloadWorkspaceConfiguration(){const B=this.getWorkbenchState();if(B===2)return this.onWorkspaceFolderConfigurationChanged(this.workspace.folders[0]);if(B===3)return this.workspaceConfiguration.reload().then(()=>this.onWorkspaceConfigurationChanged(!1))}reloadWorkspaceFolderConfiguration(B){return this.onWorkspaceFolderConfigurationChanged(B)}async loadConfiguration(B,P){this.cachedFolderConfigs=new _.ResourceMap;const V=this.workspace.folders,z=await this.loadFolderConfigurations(V);let U=this.getWorkspaceConfigurationModel(z);const H=new _.ResourceMap;z.forEach((G,q)=>H.set(V[q].uri,G));const K=this._configuration;if(this._configuration=new o.Configuration(this.defaultConfiguration.configurationModel,B,P,U,H,new v.ConfigurationModel,new _.ResourceMap,this.workspace),this.initialized){const G=this._configuration.compare(K);this.triggerConfigurationChange(G,{data:K.toData(),workspace:this.workspace},4)}else this._onDidChangeConfiguration.fire(new v.AllKeysConfigurationChangeEvent(this._configuration,this.workspace,4,this.getTargetConfiguration(4))),this.initialized=!0;this.updateRestrictedSettings()}getWorkspaceConfigurationModel(B){switch(this.getWorkbenchState()){case 2:return B[0];case 3:return this.workspaceConfiguration.getConfiguration();default:return new v.ConfigurationModel}}onDefaultConfigurationChanged(B,P){if(this.workspace){const V=this._configuration.toData(),z=this._configuration.compareAndUpdateDefaultConfiguration(B,P);if(this.remoteUserConfiguration&&(this._configuration.updateLocalUserConfiguration(this.localUserConfiguration.reparse()),this._configuration.updateRemoteUserConfiguration(this.remoteUserConfiguration.reparse())),this.getWorkbenchState()===2){const U=this.cachedFolderConfigs.get(this.workspace.folders[0].uri);U&&(this._configuration.updateWorkspaceConfiguration(U.reparse()),this._configuration.updateFolderConfiguration(this.workspace.folders[0].uri,U.reparse()))}else{this._configuration.updateWorkspaceConfiguration(this.workspaceConfiguration.reparseWorkspaceSettings());for(const U of this.workspace.folders){const H=this.cachedFolderConfigs.get(U.uri);H&&this._configuration.updateFolderConfiguration(U.uri,H.reparse())}}this.triggerConfigurationChange(z,{data:V,workspace:this.workspace},6),this.updateRestrictedSettings()}}onLocalUserConfigurationChanged(B){const P={data:this._configuration.toData(),workspace:this.workspace},V=this._configuration.compareAndUpdateLocalUserConfiguration(B);this.triggerConfigurationChange(V,P,1)}onRemoteUserConfigurationChanged(B){const P={data:this._configuration.toData(),workspace:this.workspace},V=this._configuration.compareAndUpdateRemoteUserConfiguration(B);this.triggerConfigurationChange(V,P,1)}async onWorkspaceConfigurationChanged(B){if(this.workspace&&this.workspace.configuration){let P=(0,s.toWorkspaceFolders)(this.workspaceConfiguration.getFolders(),this.workspace.configuration,this.uriIdentityService.extUri);if(this.workspace.initialized){const{added:V,removed:z,changed:U}=this.compareFolders(this.workspace.folders,P);V.length||z.length||U.length?P=await this.toValidWorkspaceFolders(P):P=this.workspace.folders}await this.updateWorkspaceConfiguration(P,this.workspaceConfiguration.getConfiguration(),B)}}updateRestrictedSettings(){const B=[],P=this.configurationRegistry.getConfigurationProperties(),V=Object.keys(P).filter(X=>P[X].restricted).sort((X,Y)=>X.localeCompare(Y)),z=(0,d.delta)(V,this._restrictedSettings.default,(X,Y)=>X.localeCompare(Y));B.push(...z.added,...z.removed);const U=this.localUserConfiguration.getRestrictedSettings().sort((X,Y)=>X.localeCompare(Y)),H=(0,d.delta)(U,this._restrictedSettings.userLocal||[],(X,Y)=>X.localeCompare(Y));B.push(...H.added,...H.removed);const K=(this.remoteUserConfiguration?.getRestrictedSettings()||[]).sort((X,Y)=>X.localeCompare(Y)),G=(0,d.delta)(K,this._restrictedSettings.userRemote||[],(X,Y)=>X.localeCompare(Y));B.push(...G.added,...G.removed);const q=new _.ResourceMap;for(const X of this.workspace.folders){const $=(this.cachedFolderConfigs.get(X.uri)?.getRestrictedSettings()||[]).sort((te,se)=>te.localeCompare(se));$.length&&q.set(X.uri,$);const J=this._restrictedSettings.workspaceFolder?.get(X.uri)||[],ee=(0,d.delta)($,J,(te,se)=>te.localeCompare(se));B.push(...ee.added,...ee.removed)}const Z=this.getWorkbenchState()===3?this.workspaceConfiguration.getRestrictedSettings().sort((X,Y)=>X.localeCompare(Y)):this.workspace.folders[0]?q.get(this.workspace.folders[0].uri)||[]:[],j=(0,d.delta)(Z,this._restrictedSettings.workspace||[],(X,Y)=>X.localeCompare(Y));B.push(...j.added,...j.removed),B.length&&(this._restrictedSettings={default:V,userLocal:U.length?U:void 0,userRemote:K.length?K:void 0,workspace:Z.length?Z:void 0,workspaceFolder:q.size?q:void 0},this._onDidChangeRestrictedSettings.fire(this.restrictedSettings))}async updateWorkspaceConfiguration(B,P,V){const z={data:this._configuration.toData(),workspace:this.workspace},U=this._configuration.compareAndUpdateWorkspaceConfiguration(P),H=this.compareFolders(this.workspace.folders,B);if(H.added.length||H.removed.length||H.changed.length){this.workspace.folders=B;const K=await this.onFoldersChanged();await this.handleWillChangeWorkspaceFolders(H,V),this.triggerConfigurationChange(K,z,5),this._onDidChangeWorkspaceFolders.fire(H)}else this.triggerConfigurationChange(U,z,4);this.updateRestrictedSettings()}async handleWillChangeWorkspaceFolders(B,P){const V=[];this._onWillChangeWorkspaceFolders.fire({join(z){V.push(z)},changes:B,fromCache:P});try{await D.Promises.settled(V)}catch{}}async onWorkspaceFolderConfigurationChanged(B){const[P]=await this.loadFolderConfigurations([B]),V={data:this._configuration.toData(),workspace:this.workspace},z=this._configuration.compareAndUpdateFolderConfiguration(B.uri,P);if(this.getWorkbenchState()===2){const U=this._configuration.compareAndUpdateWorkspaceConfiguration(P);this.triggerConfigurationChange((0,v.mergeChanges)(z,U),V,4)}else this.triggerConfigurationChange(z,V,5);this.updateRestrictedSettings()}async onFoldersChanged(){const B=[];for(const V of this.cachedFolderConfigs.keys())this.workspace.folders.filter(z=>z.uri.toString()===V.toString())[0]||(this.cachedFolderConfigs.get(V).dispose(),this.cachedFolderConfigs.delete(V),B.push(this._configuration.compareAndDeleteFolderConfiguration(V)));const P=this.workspace.folders.filter(V=>!this.cachedFolderConfigs.has(V.uri));return P.length&&(await this.loadFolderConfigurations(P)).forEach((z,U)=>{B.push(this._configuration.compareAndUpdateFolderConfiguration(P[U].uri,z))}),(0,v.mergeChanges)(...B)}loadFolderConfigurations(B){return Promise.all([...B.map(P=>{let V=this.cachedFolderConfigs.get(P.uri);return V||(V=new r.FolderConfiguration(!this.initialized,P,c.FOLDER_CONFIG_FOLDER_NAME,this.getWorkbenchState(),this.isWorkspaceTrusted,this.fileService,this.uriIdentityService,this.logService,this.configurationCache),this._register(V.onDidChange(()=>this.onWorkspaceFolderConfigurationChanged(P))),this.cachedFolderConfigs.set(P.uri,this._register(V))),V.loadConfiguration()})])}async validateWorkspaceFoldersAndReload(B){const P=await this.toValidWorkspaceFolders(this.workspace.folders),{removed:V}=this.compareFolders(this.workspace.folders,P);V.length&&await this.updateWorkspaceConfiguration(P,this.workspaceConfiguration.getConfiguration(),B)}async toValidWorkspaceFolders(B){const P=[];for(const V of B){try{if(!(await this.fileService.stat(V.uri)).isDirectory)continue}catch(z){this.logService.warn(`Ignoring the error while validating workspace folder ${V.uri.toString()} - ${(0,h.toErrorMessage)(z)}`)}P.push(V)}return P}async writeConfigurationValue(B,P,V,z,U){if(V===6)throw new Error("Invalid configuration target");if(V===7){const K={data:this._configuration.toData(),workspace:this.workspace};this._configuration.updateValue(B,P,z),this.triggerConfigurationChange({keys:z?.overrideIdentifiers?.length?[(0,S.keyFromOverrideIdentifiers)(z.overrideIdentifiers),B]:[B],overrides:z?.overrideIdentifiers?.length?z.overrideIdentifiers.map(G=>[G,[B]]):[]},K,V);return}const H=this.toEditableConfigurationTarget(V,B);if(!H)throw new Error("Invalid configuration target");if(H===2&&!this.remoteUserConfiguration)throw new Error("Invalid configuration target");switch(await this.configurationEditingService.writeConfiguration(H,{key:B,value:P},{scopes:z,donotNotifyError:U}),H){case 1:return this.reloadLocalUserConfiguration().then(()=>{});case 2:return this.reloadRemoteUserConfiguration().then(()=>{});case 3:return this.reloadWorkspaceConfiguration();case 4:{const K=z&&z.resource?this.workspace.getFolder(z.resource):null;if(K)return this.reloadWorkspaceFolderConfiguration(K)}}}deriveConfigurationTargets(B,P,V){if((0,A.equals)(P,V.value))return[];const z=[];return V.workspaceFolderValue!==void 0&&z.push(5),V.workspaceValue!==void 0&&z.push(4),V.userRemoteValue!==void 0&&z.push(3),V.userLocalValue!==void 0&&z.push(2),P===void 0?z:[z[0]||1]}triggerConfigurationChange(B,P,V){if(B.keys.length){V!==6&&this.logService.debug(`Configuration keys changed in ${(0,C.ConfigurationTargetToString)(V)} target`,...B.keys);const z=new v.ConfigurationChangeEvent(B,P,this._configuration,this.workspace);z.source=V,z.sourceConfig=this.getTargetConfiguration(V),this._onDidChangeConfiguration.fire(z)}}getTargetConfiguration(B){switch(B){case 6:return this._configuration.defaults.contents;case 1:return this._configuration.userConfiguration.contents;case 4:return this._configuration.workspaceConfiguration.contents}return{}}toEditableConfigurationTarget(B,P){if(B===1){if(this.remoteUserConfiguration){const V=this.configurationRegistry.getConfigurationProperties()[P]?.scope;if(V===2||V===6||this.inspect(P).userRemoteValue!==void 0)return 2}return 1}return B===2?1:B===3?2:B===4?3:B===5?4:null}}e.WorkspaceService=O;let x=class extends k.Disposable{constructor(B,P,V){super();this.workspaceContextService=B,this.environmentService=P,this.workspaceTrustManagementService=V,this.registerConfigurationSchemas();const z=i.Registry.as(S.Extensions.Configuration);this._register(z.onDidUpdateConfiguration(U=>this.registerConfigurationSchemas())),this._register(z.onDidSchemaChange(U=>this.registerConfigurationSchemas())),this._register(V.onDidChangeTrust(()=>this.registerConfigurationSchemas()))}registerConfigurationSchemas(){const B=i.Registry.as(I.Extensions.JSONContribution),P={properties:S.allSettings.properties,patternProperties:S.allSettings.patternProperties,additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},V=this.environmentService.remoteAuthority?{properties:{...S.applicationSettings.properties,...S.windowSettings.properties,...S.resourceSettings.properties},patternProperties:S.allSettings.patternProperties,additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0}:P,z={properties:{...S.machineSettings.properties,...S.machineOverridableSettings.properties,...S.windowSettings.properties,...S.resourceSettings.properties},patternProperties:S.allSettings.patternProperties,additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},U={properties:{...this.checkAndFilterPropertiesRequiringTrust(S.machineOverridableSettings.properties),...this.checkAndFilterPropertiesRequiringTrust(S.windowSettings.properties),...this.checkAndFilterPropertiesRequiringTrust(S.resourceSettings.properties)},patternProperties:S.allSettings.patternProperties,additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0};if(B.registerSchema(c.defaultSettingsSchemaId,{properties:Object.keys(S.allSettings.properties).reduce((H,K)=>(H[K]={...S.allSettings.properties[K],deprecationMessage:void 0},H),{}),patternProperties:Object.keys(S.allSettings.patternProperties).reduce((H,K)=>(H[K]={...S.allSettings.patternProperties[K],deprecationMessage:void 0},H),{}),additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0}),B.registerSchema(c.userSettingsSchemaId,V),B.registerSchema(c.machineSettingsSchemaId,z),this.workspaceContextService.getWorkbenchState()===3){const H={properties:{...this.checkAndFilterPropertiesRequiringTrust(S.machineOverridableSettings.properties),...this.checkAndFilterPropertiesRequiringTrust(S.resourceSettings.properties)},patternProperties:S.allSettings.patternProperties,additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0};B.registerSchema(c.workspaceSettingsSchemaId,U),B.registerSchema(c.folderSettingsSchemaId,H)}else B.registerSchema(c.workspaceSettingsSchemaId,U),B.registerSchema(c.folderSettingsSchemaId,U);B.registerSchema(S.configurationDefaultsSchemaId,{type:"object",description:(0,T.localize)(0,null),properties:{...S.machineOverridableSettings.properties,...S.windowSettings.properties,...S.resourceSettings.properties},patternProperties:{[S.OVERRIDE_PROPERTY_PATTERN]:{type:"object",default:{},$ref:S.resourceLanguageSettingsSchemaId}},additionalProperties:!1})}checkAndFilterPropertiesRequiringTrust(B){if(this.workspaceTrustManagementService.isWorkspaceTrusted())return B;const P={};return(0,m.forEach)(B,({key:V,value:z})=>{z.restricted||(P[V]=z)}),P}};x=Ee([W(0,w.IWorkspaceContextService),W(1,a.IWorkbenchEnvironmentService),W(2,g.IWorkspaceTrustManagementService)],x);let F=class extends k.Disposable{constructor(B,P){super();P.whenInstalledExtensionsRegistered().then(()=>B.reloadConfiguration(6))}};F=Ee([W(0,C.IConfigurationService),W(1,b.IExtensionService)],F);let L=class extends k.Disposable{constructor(B){super();this.workbenchAssignmentService=B,this.processedExperimentalSettings=new Set,this.configurationRegistry=i.Registry.as(S.Extensions.Configuration),this.processExperimentalSettings(Object.keys(this.configurationRegistry.getConfigurationProperties())),this._register(this.configurationRegistry.onDidUpdateConfiguration(({properties:P})=>this.processExperimentalSettings(P)))}async processExperimentalSettings(B){const P={},V=this.configurationRegistry.getConfigurationProperties();for(const z of B){const U=V[z];if(!!U?.tags?.includes("experimental")&&!this.processedExperimentalSettings.has(z)){this.processedExperimentalSettings.add(z);try{const H=await this.workbenchAssignmentService.getTreatment(`config.${z}`);!(0,y.isUndefined)(H)&&!(0,A.equals)(H,U.default)&&(P[z]=H)}catch{}}}Object.keys(P).length&&this.configurationRegistry.registerDefaultConfigurations([{overrides:P,source:(0,T.localize)(1,null)}])}};L=Ee([W(0,E.IWorkbenchAssignmentService)],L);const M=i.Registry.as(n.Extensions.Workbench);M.registerWorkbenchContribution(x,3),M.registerWorkbenchContribution(F,4),M.registerWorkbenchContribution(L,3)}),define(ne[915],re([1,0,1885,11,118,51,302,2,13,136,20,84,61,8,7,85,23,5,83,35]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingsEditingService=e.IKeybindingEditingService=void 0,e.IKeybindingEditingService=(0,l.createDecorator)("keybindingEditingService");let u=class extends D.Disposable{constructor(n,h,g,d,m){super();this.textModelResolverService=n,this.textFileService=h,this.fileService=g,this.configurationService=d,this.environmentService=m,this.resource=this.environmentService.keybindingsResource,this.queue=new f.Queue}addKeybinding(n,h,g){return this.queue.queue(()=>this.doEditKeybinding(n,h,g,!0))}editKeybinding(n,h,g){return this.queue.queue(()=>this.doEditKeybinding(n,h,g,!1))}resetKeybinding(n){return this.queue.queue(()=>this.doResetKeybinding(n))}removeKeybinding(n){return this.queue.queue(()=>this.doRemoveKeybinding(n))}async doEditKeybinding(n,h,g,d){const m=await this.resolveAndValidate(),b=m.object.textEditorModel;if(d)this.updateKeybinding(n,h,g,b,-1);else{const E=_.parse(b.getValue()),y=this.findUserKeybindingEntryIndex(n,E);this.updateKeybinding(n,h,g,b,y),n.isDefault&&n.resolvedKeybinding&&this.removeDefaultKeybinding(n,b)}try{await this.save()}finally{m.dispose()}}doRemoveKeybinding(n){return this.resolveAndValidate().then(h=>{const g=h.object.textEditorModel;return n.isDefault?this.removeDefaultKeybinding(n,g):this.removeUserKeybinding(n,g),this.save().finally(()=>h.dispose())})}doResetKeybinding(n){return this.resolveAndValidate().then(h=>{const g=h.object.textEditorModel;return n.isDefault||(this.removeUserKeybinding(n,g),this.removeUnassignedDefaultKeybinding(n,g)),this.save().finally(()=>h.dispose())})}save(){return this.textFileService.save(this.resource)}updateKeybinding(n,h,g,d,m){const{tabSize:b,insertSpaces:E}=d.getOptions(),y=d.getEOL();if(m!==-1){this.applyEditsToBuffer((0,k.setProperty)(d.getValue(),[m,"key"],h,{tabSize:b,insertSpaces:E,eol:y})[0],d);const T=(0,k.setProperty)(d.getValue(),[m,"when"],g,{tabSize:b,insertSpaces:E,eol:y});T.length>0&&this.applyEditsToBuffer(T[0],d)}else this.applyEditsToBuffer((0,k.setProperty)(d.getValue(),[-1],this.asObject(h,n.command,g,!1),{tabSize:b,insertSpaces:E,eol:y})[0],d)}removeUserKeybinding(n,h){const{tabSize:g,insertSpaces:d}=h.getOptions(),m=h.getEOL(),b=_.parse(h.getValue()),E=this.findUserKeybindingEntryIndex(n,b);E!==-1&&this.applyEditsToBuffer((0,k.setProperty)(h.getValue(),[E],void 0,{tabSize:g,insertSpaces:d,eol:m})[0],h)}removeDefaultKeybinding(n,h){const{tabSize:g,insertSpaces:d}=h.getOptions(),m=h.getEOL(),b=n.resolvedKeybinding?n.resolvedKeybinding.getUserSettingsLabel():null;if(b){const E=this.asObject(b,n.command,n.when?n.when.serialize():void 0,!0);_.parse(h.getValue()).every(T=>!this.areSame(T,E))&&this.applyEditsToBuffer((0,k.setProperty)(h.getValue(),[-1],E,{tabSize:g,insertSpaces:d,eol:m})[0],h)}}removeUnassignedDefaultKeybinding(n,h){const{tabSize:g,insertSpaces:d}=h.getOptions(),m=h.getEOL(),b=_.parse(h.getValue()),E=this.findUnassignedDefaultKeybindingEntryIndex(n,b).reverse();for(const y of E)this.applyEditsToBuffer((0,k.setProperty)(h.getValue(),[y],void 0,{tabSize:g,insertSpaces:d,eol:m})[0],h)}findUserKeybindingEntryIndex(n,h){for(let g=0;g<h.length;g++){const d=h[g];if(d.command===n.command){if(!d.when&&!n.when)return g;if(d.when&&n.when){const m=i.ContextKeyExpr.deserialize(d.when);if(m&&m.serialize()===n.when.serialize())return g}}}return-1}findUnassignedDefaultKeybindingEntryIndex(n,h){const g=[];for(let d=0;d<h.length;d++)h[d].command===`-${n.command}`&&g.push(d);return g}asObject(n,h,g,d){const m={key:n};return h&&(m.command=d?`-${h}`:h),g&&(m.when=g),m}areSame(n,h){if(n.command!==h.command||n.key!==h.key)return!1;const g=i.ContextKeyExpr.deserialize(n.when),d=i.ContextKeyExpr.deserialize(h.when);return!(g&&!d||!g&&d||g&&d&&!g.equals(d)||!A.equals(n.args,h.args))}applyEditsToBuffer(n,h){const g=h.getPositionAt(n.offset),d=h.getPositionAt(n.offset+n.length),m=new v.Range(g.lineNumber,g.column,d.lineNumber,d.column),E=h.getValueInRange(m)?w.EditOperation.replace(m,n.content):w.EditOperation.insert(g,n.content);h.pushEditOperations([new C.Selection(g.lineNumber,g.column,g.lineNumber,g.column)],[E],()=>[])}resolveModelReference(){return this.fileService.exists(this.resource).then(n=>{const h=this.configurationService.getValue("files",{overrideIdentifier:"json"}).eol;return(n?Promise.resolve(null):this.textFileService.write(this.resource,this.getEmptyContent(h),{encoding:"utf8"})).then(()=>this.textModelResolverService.createModelReference(this.resource))})}resolveAndValidate(){return this.textFileService.isDirty(this.resource)?Promise.reject(new Error((0,t.localize)(0,null))):this.resolveModelReference().then(n=>{const h=n.object.textEditorModel,g=h.getEOL();if(h.getValue()){const d=this.parse(h);if(d.parseErrors.length)return n.dispose(),Promise.reject(new Error((0,t.localize)(1,null)));if(d.result){if(!(0,I.isArray)(d.result))return n.dispose(),Promise.reject(new Error((0,t.localize)(2,null)))}else{const m=g+"[]";this.applyEditsToBuffer({content:m,length:m.length,offset:h.getValue().length},h)}}else{const d=this.getEmptyContent(g);this.applyEditsToBuffer({content:d,length:d.length,offset:0},h)}return n})}parse(n){const h=[];return{result:_.parse(n.getValue(),h,{allowTrailingComma:!0,allowEmptyContent:!0}),parseErrors:h}}getEmptyContent(n){return"// "+(0,t.localize)(3,null)+n+"[]"}};u=Ee([W(0,o.ITextModelService),W(1,r.ITextFileService),W(2,s.IFileService),W(3,c.IConfigurationService),W(4,S.IEnvironmentService)],u),e.KeybindingsEditingService=u,(0,p.registerSingleton)(e.IKeybindingEditingService,u,!0)}),define(ne[2634],re([1,0,1673,11,10,14,2,244,241,392,36,78,166,27,95,889,5,38,890,322,37,915,12,7,32,21,39,71,26,68,24,183,6,16,82,321,163,1112]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingsEditor=void 0;const N=_.$;class B extends D.ToggleActionViewItem{constructor(Y,$,J,ee){super(Y,$,J);this.themeService=ee}render(Y){super.render(Y),this._register((0,y.attachToggleStyler)(this.toggle,this.themeService))}}let P=class Fa extends o.EditorPane{constructor(Y,$,J,ee,te,se,ie,ce,le,ae,ue){super(Fa.ID,Y,$,ue);this.keybindingsService=J,this.contextMenuService=ee,this.keybindingEditingService=te,this.contextKeyService=se,this.notificationService=ie,this.clipboardService=ce,this.instantiationService=le,this.editorService=ae,this._onDefineWhenExpression=this._register(new O.Emitter),this.onDefineWhenExpression=this._onDefineWhenExpression.event,this._onLayout=this._register(new O.Emitter),this.onLayout=this._onLayout.event,this.keybindingsEditorModel=null,this.unAssignedKeybindingItemToRevealAndFocus=null,this.tableEntries=[],this.dimension=null,this.latestEmptyFilters=[],this.delayedFiltering=new f.Delayer(300),this._register(J.onDidUpdateKeybindings(()=>this.render(!!this.keybindingFocusContextKey.get()))),this.keybindingsEditorContextKey=p.CONTEXT_KEYBINDINGS_EDITOR.bindTo(this.contextKeyService),this.searchFocusContextKey=p.CONTEXT_KEYBINDINGS_SEARCH_FOCUS.bindTo(this.contextKeyService),this.keybindingFocusContextKey=p.CONTEXT_KEYBINDING_FOCUS.bindTo(this.contextKeyService),this.searchHistoryDelayer=new f.Delayer(500),this.recordKeysAction=new v.Action(p.KEYBINDINGS_EDITOR_COMMAND_RECORD_SEARCH_KEYS,(0,t.localize)(0,null),n.ThemeIcon.asClassName(L.keybindingsRecordKeysIcon)),this.recordKeysAction.checked=!1,this.sortByPrecedenceAction=new v.Action(p.KEYBINDINGS_EDITOR_COMMAND_SORTBY_PRECEDENCE,(0,t.localize)(1,null),n.ThemeIcon.asClassName(L.keybindingsSortIcon)),this.sortByPrecedenceAction.checked=!1}createEditor(Y){const $=_.append(Y,N("div",{class:"keybindings-editor"}));this.createAriaLabelElement($),this.createOverlayContainer($),this.createHeader($),this.createBody($)}setInput(Y,$,J,ee){return this.keybindingsEditorContextKey.set(!0),super.setInput(Y,$,J,ee).then(()=>this.render(!!($&&$.preserveFocus)))}clearInput(){super.clearInput(),this.keybindingsEditorContextKey.reset(),this.keybindingFocusContextKey.reset()}layout(Y){this.dimension=Y,this.layoutSearchWidget(Y),this.overlayContainer.style.width=Y.width+"px",this.overlayContainer.style.height=Y.height+"px",this.defineKeybindingWidget.layout(this.dimension),this.layoutKeybindingsTable(),this._onLayout.fire()}focus(){const Y=this.activeKeybindingEntry;Y?this.selectEntry(Y):A.isIOS||this.searchWidget.focus()}get activeKeybindingEntry(){const Y=this.keybindingsTable.getFocusedElements()[0];return Y&&Y.templateId===S.KEYBINDING_ENTRY_TEMPLATE_ID?Y:null}async defineKeybinding(Y,$){this.selectEntry(Y),this.showOverlayContainer();try{const J=await this.defineKeybindingWidget.define();J&&(this.reportKeybindingAction(p.KEYBINDINGS_EDITOR_COMMAND_DEFINE,Y.keybindingItem.command),await this.updateKeybinding(Y,J,Y.keybindingItem.when,$))}catch(J){this.onKeybindingEditingError(J)}finally{this.hideOverlayContainer(),this.selectEntry(Y)}}defineWhenExpression(Y){Y.keybindingItem.keybinding&&(this.selectEntry(Y),this._onDefineWhenExpression.fire(Y))}async updateKeybinding(Y,$,J,ee){((Y.keybindingItem.keybinding?Y.keybindingItem.keybinding.getUserSettingsLabel():"")!==$||Y.keybindingItem.when!==J)&&(ee?await this.keybindingEditingService.addKeybinding(Y.keybindingItem.keybindingItem,$,J||void 0):await this.keybindingEditingService.editKeybinding(Y.keybindingItem.keybindingItem,$,J||void 0),Y.keybindingItem.keybinding||(this.unAssignedKeybindingItemToRevealAndFocus=Y))}async removeKeybinding(Y){if(this.selectEntry(Y),Y.keybindingItem.keybinding){this.reportKeybindingAction(p.KEYBINDINGS_EDITOR_COMMAND_REMOVE,Y.keybindingItem.command);try{await this.keybindingEditingService.removeKeybinding(Y.keybindingItem.keybindingItem),this.focus()}catch($){this.onKeybindingEditingError($),this.selectEntry(Y)}}}async resetKeybinding(Y){this.selectEntry(Y),this.reportKeybindingAction(p.KEYBINDINGS_EDITOR_COMMAND_RESET,Y.keybindingItem.command);try{await this.keybindingEditingService.resetKeybinding(Y.keybindingItem.keybindingItem),Y.keybindingItem.keybinding||(this.unAssignedKeybindingItemToRevealAndFocus=Y),this.selectEntry(Y)}catch($){this.onKeybindingEditingError($),this.selectEntry(Y)}}async copyKeybinding(Y){this.selectEntry(Y),this.reportKeybindingAction(p.KEYBINDINGS_EDITOR_COMMAND_COPY,Y.keybindingItem.command);const $={key:Y.keybindingItem.keybinding&&Y.keybindingItem.keybinding.getUserSettingsLabel()||"",command:Y.keybindingItem.command};Y.keybindingItem.when&&($.when=Y.keybindingItem.when),await this.clipboardService.writeText(JSON.stringify($,null," "))}async copyKeybindingCommand(Y){this.selectEntry(Y),this.reportKeybindingAction(p.KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND,Y.keybindingItem.command),await this.clipboardService.writeText(Y.keybindingItem.command)}async copyKeybindingCommandTitle(Y){this.selectEntry(Y),this.reportKeybindingAction(p.KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND_TITLE,Y.keybindingItem.command),await this.clipboardService.writeText(Y.keybindingItem.commandLabel)}focusSearch(){this.searchWidget.focus()}search(Y){this.focusSearch(),this.searchWidget.setValue(Y),this.selectEntry(0)}clearSearchResults(){this.searchWidget.clear()}showSimilarKeybindings(Y){const $=`"${Y.keybindingItem.keybinding.getAriaLabel()}"`;$!==this.searchWidget.getValue()&&this.searchWidget.setValue($)}createAriaLabelElement(Y){this.ariaLabelElement=_.append(Y,_.$("")),this.ariaLabelElement.setAttribute("id","keybindings-editor-aria-label-element"),this.ariaLabelElement.setAttribute("aria-live","assertive")}createOverlayContainer(Y){this.overlayContainer=_.append(Y,N(".overlay-container")),this.overlayContainer.style.position="absolute",this.overlayContainer.style.zIndex="10",this.defineKeybindingWidget=this._register(this.instantiationService.createInstance(r.DefineKeybindingWidget,this.overlayContainer)),this._register(this.defineKeybindingWidget.onDidChange($=>this.defineKeybindingWidget.printExisting(this.keybindingsEditorModel.fetch(`"${$}"`).length))),this._register(this.defineKeybindingWidget.onShowExistingKeybidings($=>this.searchWidget.setValue(`"${$}"`))),this.hideOverlayContainer()}showOverlayContainer(){this.overlayContainer.style.display="block"}hideOverlayContainer(){this.overlayContainer.style.display="none"}createHeader(Y){this.headerContainer=_.append(Y,N(".keybindings-header"));const $=(0,t.localize)(2,null),J=(0,t.localize)(3,null),ee=new v.Action(p.KEYBINDINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS,(0,t.localize)(4,null),n.ThemeIcon.asClassName(L.preferencesClearInputIcon),!1,async()=>this.clearSearchResults()),te=_.append(this.headerContainer,N(".search-container"));this.searchWidget=this._register(this.instantiationService.createInstance(r.KeybindingsSearchWidget,te,{ariaLabel:$,placeholder:$,focusKey:this.searchFocusContextKey,ariaLabelledBy:"keybindings-editor-aria-label-element",recordEnter:!0,quoteRecordedKeys:!0,history:this.getMemento(0,0).searchHistory||[]})),this._register(this.searchWidget.onDidChange(le=>{ee.enabled=!!le,this.delayedFiltering.trigger(()=>this.filterKeybindings()),this.updateSearchOptions()})),this._register(this.searchWidget.onEscape(()=>this.recordKeysAction.checked=!1)),this.actionsContainer=_.append(te,_.$(".keybindings-search-actions-container"));const se=this.createRecordingBadge(this.actionsContainer);this._register(this.sortByPrecedenceAction.onDidChange(le=>{le.checked!==void 0&&this.renderKeybindingsEntries(!1),this.updateSearchOptions()})),this._register(this.recordKeysAction.onDidChange(le=>{le.checked!==void 0&&(se.classList.toggle("disabled",!le.checked),le.checked?(this.searchWidget.inputBox.setPlaceHolder(J),this.searchWidget.inputBox.setAriaLabel(J),this.searchWidget.startRecordingKeys(),this.searchWidget.focus()):(this.searchWidget.inputBox.setPlaceHolder($),this.searchWidget.inputBox.setAriaLabel($),this.searchWidget.stopRecordingKeys(),this.searchWidget.focus()),this.updateSearchOptions())}));const ie=[this.recordKeysAction,this.sortByPrecedenceAction,ee],ce=this._register(new M.ToolBar(this.actionsContainer,this.contextMenuService,{actionViewItemProvider:le=>{if(le.id===this.sortByPrecedenceAction.id||le.id===this.recordKeysAction.id)return new B(null,le,{keybinding:this.keybindingsService.lookupKeybinding(le.id)?.getLabel()},this.themeService)},getKeyBinding:le=>this.keybindingsService.lookupKeybinding(le.id)}));ce.setActions(ie),this._register(this.keybindingsService.onDidUpdateKeybindings(le=>ce.setActions(ie)))}updateSearchOptions(){const Y=this.input;Y&&(Y.searchOptions={searchValue:this.searchWidget.getValue(),recordKeybindings:!!this.recordKeysAction.checked,sortByPrecedence:!!this.sortByPrecedenceAction.checked})}createRecordingBadge(Y){const $=_.append(Y,_.$(".recording-badge.monaco-count-badge.long.disabled"));return $.textContent=(0,t.localize)(5,null),this._register((0,y.attachStylerCallback)(this.themeService,{badgeBackground:g.badgeBackground,contrastBorder:g.contrastBorder,badgeForeground:g.badgeForeground},J=>{const ee=J.badgeBackground?J.badgeBackground.toString():"",te=J.contrastBorder?J.contrastBorder.toString():"",se=J.badgeForeground?J.badgeForeground.toString():"";$.style.backgroundColor=ee,$.style.borderWidth=te?"1px":"",$.style.borderStyle=te?"solid":"",$.style.borderColor=te,$.style.color=se?se.toString():""})),$}layoutSearchWidget(Y){this.searchWidget.layout(Y),this.headerContainer.classList.toggle("small",Y.width<400),this.searchWidget.inputBox.inputElement.style.paddingRight=`${_.getTotalWidth(this.actionsContainer)+12}px`}createBody(Y){const $=_.append(Y,N(".keybindings-body"));this.createTable($)}createTable(Y){this.keybindingsTableContainer=_.append(Y,N(".keybindings-table-container")),this.keybindingsTable=this._register(this.instantiationService.createInstance(b.WorkbenchTable,"KeybindingsEditor",this.keybindingsTableContainer,new V,[{label:"",tooltip:"",weight:0,minimumWidth:40,maximumWidth:40,templateId:z.TEMPLATE_ID,project($){return $}},{label:(0,t.localize)(6,null),tooltip:"",weight:.3,templateId:U.TEMPLATE_ID,project($){return $}},{label:(0,t.localize)(7,null),tooltip:"",weight:.2,templateId:H.TEMPLATE_ID,project($){return $}},{label:(0,t.localize)(8,null),tooltip:"",weight:.4,templateId:G.TEMPLATE_ID,project($){return $}},{label:(0,t.localize)(9,null),tooltip:"",weight:.1,templateId:K.TEMPLATE_ID,project($){return $}}],[this.instantiationService.createInstance(z,this),this.instantiationService.createInstance(U),this.instantiationService.createInstance(H),this.instantiationService.createInstance(G,this),this.instantiationService.createInstance(K)],{identityProvider:{getId:$=>$.id},horizontalScrolling:!1,accessibilityProvider:new q,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:$=>$.keybindingItem.commandLabel||$.keybindingItem.command},overrideStyles:{listBackground:g.editorBackground},multipleSelectionSupport:!1,setRowLineHeight:!1,openOnSingleClick:!1})),this._register(this.keybindingsTable.onContextMenu($=>this.onContextMenu($))),this._register(this.keybindingsTable.onDidChangeFocus($=>this.onFocusChange())),this._register(this.keybindingsTable.onDidFocus(()=>{this.keybindingsTable.getHTMLElement().classList.add("focused"),this.onFocusChange()})),this._register(this.keybindingsTable.onDidBlur(()=>{this.keybindingsTable.getHTMLElement().classList.remove("focused"),this.keybindingFocusContextKey.reset()})),this._register(this.keybindingsTable.onDidOpen($=>{const J=this.activeKeybindingEntry;J&&this.defineKeybinding(J,!1)}))}async render(Y){if(this.input){const $=this.input;this.keybindingsEditorModel=await $.resolve(),await this.keybindingsEditorModel.resolve(this.getActionsLabels()),this.renderKeybindingsEntries(!1,Y),$.searchOptions?(this.recordKeysAction.checked=$.searchOptions.recordKeybindings,this.sortByPrecedenceAction.checked=$.searchOptions.sortByPrecedence,this.searchWidget.setValue($.searchOptions.searchValue)):this.updateSearchOptions()}}getActionsLabels(){const Y=new Map;m.EditorExtensionsRegistry.getEditorActions().forEach($=>Y.set($.id,$.label));for(const $ of x.MenuRegistry.getMenuItems(x.MenuId.CommandPalette))if((0,x.isIMenuItem)($)){const J=typeof $.command.title=="string"?$.command.title:$.command.title.value,ee=$.command.category?typeof $.command.category=="string"?$.command.category:$.command.category.value:void 0;Y.set($.command.id,ee?`${ee}: ${J}`:J)}return Y}filterKeybindings(){this.renderKeybindingsEntries(this.searchWidget.hasFocus()),this.searchHistoryDelayer.trigger(()=>{this.searchWidget.inputBox.addToHistory(),this.getMemento(0,0).searchHistory=this.searchWidget.inputBox.getHistory(),this.saveState()})}renderKeybindingsEntries(Y,$){if(this.keybindingsEditorModel){const J=this.searchWidget.getValue(),ee=this.keybindingsEditorModel.fetch(J,this.sortByPrecedenceAction.checked);this.ariaLabelElement.setAttribute("aria-label",this.getAriaLabel(ee)),ee.length===0&&this.latestEmptyFilters.push(J);const te=this.keybindingsTable.getSelection()[0];if(this.tableEntries=ee,this.keybindingsTable.splice(0,this.keybindingsTable.length,this.tableEntries),this.layoutKeybindingsTable(),Y)this.keybindingsTable.setSelection([]),this.keybindingsTable.setFocus([]);else if(this.unAssignedKeybindingItemToRevealAndFocus){const se=this.getNewIndexOfUnassignedKeybinding(this.unAssignedKeybindingItemToRevealAndFocus);se!==-1&&(this.keybindingsTable.reveal(se,.2),this.selectEntry(se)),this.unAssignedKeybindingItemToRevealAndFocus=null}else te!==-1&&te<this.tableEntries.length?this.selectEntry(te,$):this.editorService.activeEditorPane===this&&!$&&this.focus()}}getAriaLabel(Y){return this.sortByPrecedenceAction.checked?(0,t.localize)(10,null,Y.length):(0,t.localize)(11,null,Y.length)}layoutKeybindingsTable(){if(!this.dimension)return;const Y=this.dimension.height-(_.getDomNodePagePosition(this.headerContainer).height+12);this.keybindingsTableContainer.style.height=`${Y}px`,this.keybindingsTable.layout(Y)}getIndexOf(Y){const $=this.tableEntries.indexOf(Y);if($===-1){for(let J=0;J<this.tableEntries.length;J++)if(this.tableEntries[J].id===Y.id)return J}return $}getNewIndexOfUnassignedKeybinding(Y){for(let $=0;$<this.tableEntries.length;$++){const J=this.tableEntries[$];if(J.templateId===S.KEYBINDING_ENTRY_TEMPLATE_ID&&J.keybindingItem.command===Y.keybindingItem.command)return $}return-1}selectEntry(Y,$=!0){const J=typeof Y=="number"?Y:this.getIndexOf(Y);J!==-1&&J<this.keybindingsTable.length&&($&&(this.keybindingsTable.domFocus(),this.keybindingsTable.setFocus([J])),this.keybindingsTable.setSelection([J]))}focusKeybindings(){this.keybindingsTable.domFocus();const Y=this.keybindingsTable.getFocus();this.keybindingsTable.setFocus([Y.length?Y[0]:0])}selectKeybinding(Y){this.selectEntry(Y)}recordSearchKeys(){this.recordKeysAction.checked=!0}toggleSortByPrecedence(){this.sortByPrecedenceAction.checked=!this.sortByPrecedenceAction.checked}onContextMenu(Y){if(!!Y.element&&Y.element.templateId===S.KEYBINDING_ENTRY_TEMPLATE_ID){const $=Y.element;this.selectEntry($),this.contextMenuService.showContextMenu({getAnchor:()=>Y.anchor,getActions:()=>[this.createCopyAction($),this.createCopyCommandAction($),this.createCopyCommandTitleAction($),new v.Separator,...$.keybindingItem.keybinding?[this.createDefineKeybindingAction($),this.createAddKeybindingAction($)]:[this.createDefineKeybindingAction($)],new v.Separator,this.createRemoveAction($),this.createResetAction($),new v.Separator,this.createDefineWhenExpressionAction($),new v.Separator,this.createShowConflictsAction($)]})}}onFocusChange(){this.keybindingFocusContextKey.reset();const Y=this.keybindingsTable.getFocusedElements()[0];!Y||Y.templateId===S.KEYBINDING_ENTRY_TEMPLATE_ID&&this.keybindingFocusContextKey.set(!0)}createDefineKeybindingAction(Y){return{label:Y.keybindingItem.keybinding?(0,t.localize)(12,null):(0,t.localize)(13,null),enabled:!0,id:p.KEYBINDINGS_EDITOR_COMMAND_DEFINE,run:()=>this.defineKeybinding(Y,!1)}}createAddKeybindingAction(Y){return{label:(0,t.localize)(14,null),enabled:!0,id:p.KEYBINDINGS_EDITOR_COMMAND_ADD,run:()=>this.defineKeybinding(Y,!0)}}createDefineWhenExpressionAction(Y){return{label:(0,t.localize)(15,null),enabled:!!Y.keybindingItem.keybinding,id:p.KEYBINDINGS_EDITOR_COMMAND_DEFINE_WHEN,run:()=>this.defineWhenExpression(Y)}}createRemoveAction(Y){return{label:(0,t.localize)(16,null),enabled:!!Y.keybindingItem.keybinding,id:p.KEYBINDINGS_EDITOR_COMMAND_REMOVE,run:()=>this.removeKeybinding(Y)}}createResetAction(Y){return{label:(0,t.localize)(17,null),enabled:!Y.keybindingItem.keybindingItem.isDefault,id:p.KEYBINDINGS_EDITOR_COMMAND_RESET,run:()=>this.resetKeybinding(Y)}}createShowConflictsAction(Y){return{label:(0,t.localize)(18,null),enabled:!!Y.keybindingItem.keybinding,id:p.KEYBINDINGS_EDITOR_COMMAND_SHOW_SIMILAR,run:()=>this.showSimilarKeybindings(Y)}}createCopyAction(Y){return{label:(0,t.localize)(19,null),enabled:!0,id:p.KEYBINDINGS_EDITOR_COMMAND_COPY,run:()=>this.copyKeybinding(Y)}}createCopyCommandAction(Y){return{label:(0,t.localize)(20,null),enabled:!0,id:p.KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND,run:()=>this.copyKeybindingCommand(Y)}}createCopyCommandTitleAction(Y){return{label:(0,t.localize)(21,null),enabled:!!Y.keybindingItem.commandLabel,id:p.KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND_TITLE,run:()=>this.copyKeybindingCommandTitle(Y)}}reportKeybindingAction(Y,$){this.telemetryService.publicLog2("keybindingsEditor.action",{command:$,action:Y})}onKeybindingEditingError(Y){this.notificationService.error(typeof Y=="string"?Y:(0,t.localize)(22,null,`${Y}`))}};P.ID="workbench.editor.keybindings",P=Ee([W(0,c.ITelemetryService),W(1,n.IThemeService),W(2,l.IKeybindingService),W(3,u.IContextMenuService),W(4,a.IKeybindingEditingService),W(5,h.IContextKeyService),W(6,E.INotificationService),W(7,i.IClipboardService),W(8,s.IInstantiationService),W(9,d.IEditorService),W(10,T.IStorageService)],P),e.KeybindingsEditor=P;class V{constructor(){this.headerRowHeight=30}getHeight(Y){if(Y.templateId===S.KEYBINDING_ENTRY_TEMPLATE_ID){const $=Y.keybindingItem.commandLabel&&Y.commandIdMatches,J=!!Y.commandDefaultLabelMatches;if($&&J)return 60;if($||J)return 40}return 24}}let z=class Ba{constructor(Y,$){this.keybindingsEditor=Y,this.keybindingsService=$,this.templateId=Ba.TEMPLATE_ID}renderTemplate(Y){const $=_.append(Y,N(".actions"));return{actionBar:new C.ActionBar($,{animated:!1})}}renderElement(Y,$,J,ee){J.actionBar.clear();const te=[];Y.keybindingItem.keybinding?te.push(this.createEditAction(Y)):te.push(this.createAddAction(Y)),J.actionBar.push(te,{icon:!0})}createEditAction(Y){const $=this.keybindingsService.lookupKeybinding(p.KEYBINDINGS_EDITOR_COMMAND_DEFINE);return{class:n.ThemeIcon.asClassName(L.keybindingsEditIcon),enabled:!0,id:"editKeybinding",tooltip:$?(0,t.localize)(23,null,`(${$.getLabel()})`):(0,t.localize)(24,null),run:()=>this.keybindingsEditor.defineKeybinding(Y,!1)}}createAddAction(Y){const $=this.keybindingsService.lookupKeybinding(p.KEYBINDINGS_EDITOR_COMMAND_DEFINE);return{class:n.ThemeIcon.asClassName(L.keybindingsAddIcon),enabled:!0,id:"addKeybinding",tooltip:$?(0,t.localize)(25,null,`(${$.getLabel()})`):(0,t.localize)(26,null),run:()=>this.keybindingsEditor.defineKeybinding(Y,!1)}}disposeTemplate(Y){Y.actionBar.dispose()}};z.TEMPLATE_ID="actions",z=Ee([W(1,l.IKeybindingService)],z);class U{constructor(){this.templateId=U.TEMPLATE_ID}renderTemplate(Y){const $=_.append(Y,N(".command")),J=_.append($,N(".command-label")),ee=new I.HighlightedLabel(J),te=_.append($,N(".command-default-label")),se=new I.HighlightedLabel(te),ie=_.append($,N(".command-id.code")),ce=new I.HighlightedLabel(ie);return{commandColumn:$,commandLabelContainer:J,commandLabel:ee,commandDefaultLabelContainer:te,commandDefaultLabel:se,commandIdLabelContainer:ie,commandIdLabel:ce}}renderElement(Y,$,J,ee){const te=Y.keybindingItem,se=!!(te.commandLabel&&Y.commandIdMatches),ie=!!Y.commandDefaultLabelMatches;J.commandColumn.classList.toggle("vertical-align-column",se||ie),J.commandColumn.title=te.commandLabel?(0,t.localize)(27,null,te.commandLabel,te.command):te.command,te.commandLabel?(J.commandLabelContainer.classList.remove("hide"),J.commandLabel.set(te.commandLabel,Y.commandLabelMatches)):(J.commandLabelContainer.classList.add("hide"),J.commandLabel.set(void 0)),Y.commandDefaultLabelMatches?(J.commandDefaultLabelContainer.classList.remove("hide"),J.commandDefaultLabel.set(te.commandDefaultLabel,Y.commandDefaultLabelMatches)):(J.commandDefaultLabelContainer.classList.add("hide"),J.commandDefaultLabel.set(void 0)),Y.commandIdMatches||!te.commandLabel?(J.commandIdLabelContainer.classList.remove("hide"),J.commandIdLabel.set(te.command,Y.commandIdMatches)):(J.commandIdLabelContainer.classList.add("hide"),J.commandIdLabel.set(void 0))}disposeTemplate(Y){}}U.TEMPLATE_ID="commands";let H=class Wa{constructor(Y){this.themeService=Y,this.templateId=Wa.TEMPLATE_ID}renderTemplate(Y){const $=_.append(Y,N(".keybinding")),J=new w.KeybindingLabel(_.append($,N("div.keybinding-label")),A.OS),ee=(0,y.attachKeybindingLabelStyler)(J,this.themeService);return{keybindingLabel:J,keybindingLabelStyler:ee}}renderElement(Y,$,J,ee){Y.keybindingItem.keybinding?J.keybindingLabel.set(Y.keybindingItem.keybinding,Y.keybindingMatches):J.keybindingLabel.set(void 0,void 0)}disposeTemplate(Y){Y.keybindingLabelStyler.dispose()}};H.TEMPLATE_ID="keybindings",H=Ee([W(0,n.IThemeService)],H);class K{constructor(){this.templateId=K.TEMPLATE_ID}renderTemplate(Y){const $=_.append(Y,N(".source"));return{highlightedLabel:new I.HighlightedLabel($)}}renderElement(Y,$,J,ee){J.highlightedLabel.set(Y.keybindingItem.source,Y.sourceMatches)}disposeTemplate(Y){}}K.TEMPLATE_ID="source";let G=class Va{constructor(Y,$,J,ee){this.keybindingsEditor=Y,this.contextViewService=$,this.themeService=J,this.templateId=Va.TEMPLATE_ID,this.whenFocusContextKey=p.CONTEXT_WHEN_FOCUS.bindTo(ee)}renderTemplate(Y){const $=_.append(Y,N(".when")),J=_.append($,N("div.when-label")),ee=new I.HighlightedLabel(J),te=new R.InputBox($,this.contextViewService,{validationOptions:{validation:fe=>{try{h.ContextKeyExpr.deserialize(fe,!0)}catch(pe){return{content:pe.message,formatContent:!0,type:3}}return null}},ariaLabel:(0,t.localize)(28,null)}),se=new k.DisposableStore;se.add((0,y.attachInputBoxStyler)(te,this.themeService));const ie=se.add(new O.Emitter),ce=ie.event,le=se.add(new O.Emitter),ae=le.event,ue=()=>{$.classList.remove("input-mode"),Y.style.paddingLeft="10px"};se.add(_.addStandardDisposableListener(te.inputElement,_.EventType.KEY_DOWN,fe=>{let pe=!1;fe.equals(3)?(ue(),ie.fire(),pe=!0):fe.equals(9)&&(ue(),le.fire(),pe=!0),pe&&(fe.preventDefault(),fe.stopPropagation())})),se.add(_.addDisposableListener(te.inputElement,_.EventType.FOCUS,()=>{this.whenFocusContextKey.set(!0)})),se.add(_.addDisposableListener(te.inputElement,_.EventType.BLUR,()=>{this.whenFocusContextKey.set(!1),ue(),le.fire()}));const oe=se.add(new k.DisposableStore);return{element:$,whenContainer:J,whenLabel:ee,whenInput:te,onDidAccept:ce,onDidReject:ae,renderDisposables:oe,disposables:se}}renderElement(Y,$,J,ee){J.renderDisposables.clear(),J.renderDisposables.add(this.keybindingsEditor.onDefineWhenExpression(te=>{Y===te&&(J.element.classList.add("input-mode"),J.whenInput.focus(),J.whenInput.select(),J.element.parentElement.style.paddingLeft="0px")})),J.whenInput.value=Y.keybindingItem.when||"",J.whenContainer.classList.toggle("code",!!Y.keybindingItem.when),J.whenContainer.classList.toggle("empty",!Y.keybindingItem.when),Y.keybindingItem.when?(J.whenLabel.set(Y.keybindingItem.when,Y.whenMatches),J.whenLabel.element.title=Y.keybindingItem.when,J.element.title=Y.keybindingItem.when):(J.whenLabel.set("-"),J.whenLabel.element.title="",J.element.title=""),J.renderDisposables.add(J.onDidAccept(()=>{this.keybindingsEditor.updateKeybinding(Y,Y.keybindingItem.keybinding&&Y.keybindingItem.keybinding.getUserSettingsLabel()||"",J.whenInput.value),this.keybindingsEditor.selectKeybinding(Y)})),J.renderDisposables.add(J.onDidReject(()=>{J.whenInput.value=Y.keybindingItem.when||"",this.keybindingsEditor.selectKeybinding(Y)}))}disposeTemplate(Y){Y.disposables.dispose(),Y.renderDisposables.dispose()}};G.TEMPLATE_ID="when",G=Ee([W(1,u.IContextViewService),W(2,n.IThemeService),W(3,h.IContextKeyService)],G);class q{getWidgetAriaLabel(){return(0,t.localize)(29,null)}getAriaLabel(Y){let $=Y.keybindingItem.commandLabel?Y.keybindingItem.commandLabel:Y.keybindingItem.command;return $+=", "+(Y.keybindingItem.keybinding?.getAriaLabel()||(0,t.localize)(30,null)),$+=", "+Y.keybindingItem.source,$+=", "+Y.keybindingItem.when?Y.keybindingItem.when:(0,t.localize)(31,null),$}}const Z=(0,g.registerColor)("keybindingTable.headerBackground",{dark:g.tableOddRowsBackgroundColor,light:g.tableOddRowsBackgroundColor,hcDark:g.tableOddRowsBackgroundColor,hcLight:g.tableOddRowsBackgroundColor},"Background color for the keyboard shortcuts table header."),j=(0,g.registerColor)("keybindingTable.rowsBackground",{light:g.tableOddRowsBackgroundColor,dark:g.tableOddRowsBackgroundColor,hcDark:g.tableOddRowsBackgroundColor,hcLight:g.tableOddRowsBackgroundColor},"Background color for the keyboard shortcuts table alternating rows.");(0,n.registerThemingParticipant)((X,Y)=>{const $=X.getColor(Z);$&&Y.addRule(`.keybindings-editor > .keybindings-body > .keybindings-table-container .monaco-table .monaco-table-th { background-color: ${$}; }`);const J=X.getColor(j);J&&(Y.addRule(`.keybindings-editor > .keybindings-body > .keybindings-table-container .monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr { background-color: ${J}; }`),Y.addRule(`.keybindings-editor > .keybindings-body > .keybindings-table-container .monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr { background-color: ${J}; }`),Y.addRule(`.keybindings-editor > .keybindings-body > .keybindings-table-container .monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr { background-color: ${J}; }`));const ee=X.getColor(g.foreground);if(ee){const me=ee.transparent(.8).makeOpaque((0,F.WORKBENCH_BACKGROUND)(X));Y.addRule(`.keybindings-editor > .keybindings-body > .keybindings-table-container .monaco-table .monaco-table-tr .monaco-table-td .code { color: ${me}; }`)}const te=X.getColor(g.listActiveSelectionForeground),se=X.getColor(g.listActiveSelectionBackground);if(te&&se){const me=te.transparent(.8).makeOpaque(se);Y.addRule(`.keybindings-editor > .keybindings-body > .keybindings-table-container .monaco-table.focused .monaco-list-row.selected .monaco-table-tr .monaco-table-td .code { color: ${me}; }`)}const ie=X.getColor(g.listInactiveSelectionForeground),ce=X.getColor(g.listInactiveSelectionBackground);if(ie&&ce){const me=ie.transparent(.8).makeOpaque(ce);Y.addRule(`.keybindings-editor > .keybindings-body > .keybindings-table-container .monaco-table .monaco-list-row.selected .monaco-table-tr .monaco-table-td .code { color: ${me}; }`)}const le=X.getColor(g.listFocusForeground),ae=X.getColor(g.listFocusBackground);if(le&&ae){const me=le.transparent(.8).makeOpaque(ae);Y.addRule(`.keybindings-editor > .keybindings-body > .keybindings-table-container .monaco-table.focused .monaco-list-row.focused .monaco-table-tr .monaco-table-td .code { color: ${me}; }`)}const ue=X.getColor(g.listHoverForeground),oe=X.getColor(g.listHoverBackground);if(ue&&oe){const me=ue.transparent(.8).makeOpaque(oe);Y.addRule(`.keybindings-editor > .keybindings-body > .keybindings-table-container .monaco-table.focused .monaco-list-row:hover:not(.focused):not(.selected) .monaco-table-tr .monaco-table-td .code { color: ${me}; }`)}const fe=X.getColor(g.listHighlightForeground);fe&&Y.addRule(`.keybindings-editor > .keybindings-body > .keybindings-table-container .monaco-table .monaco-table-tr .monaco-table-td .highlight { color: ${fe}; }`),te&&(Y.addRule(`.keybindings-editor > .keybindings-body > .keybindings-table-container .monaco-table.focused .monaco-list-row.selected.focused .monaco-table-tr .monaco-table-td .monaco-keybinding-key { color: ${te}; }`),Y.addRule(`.keybindings-editor > .keybindings-body > .keybindings-table-container .monaco-table.focused .monaco-list-row.selected .monaco-table-tr .monaco-table-td .monaco-keybinding-key { color: ${te}; }`));const pe=X.getColor(g.listInactiveSelectionForeground);pe&&Y.addRule(`.keybindings-editor > .keybindings-body > .keybindings-table-container .monaco-table .monaco-list-row.selected .monaco-table-tr .monaco-table-td .monaco-keybinding-key { color: ${pe}; }`),ue&&Y.addRule(`.keybindings-editor > .keybindings-body > .keybindings-table-container .monaco-table .monaco-list-row:hover:not(.selected):not(.focused) .monaco-table-tr .monaco-table-td .monaco-keybinding-key { color: ${ue}; }`),le&&Y.addRule(`.keybindings-editor > .keybindings-body > .keybindings-table-container .monaco-table .monaco-list-row.focused .monaco-table-tr .monaco-table-td .monaco-keybinding-key { color: ${le}; }`)})}),define(ne[2635],re([1,0,8,113,14,18,24,50,35,109]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextResourcePropertiesService=void 0;let v=class{constructor(o,c,i,S){this.configurationService=o,this.environmentService=i,this.storageService=S,this.remoteEnvironment=null,c.getEnvironment().then(s=>this.remoteEnvironment=s)}getEOL(o,c){const i=this.configurationService.getValue("files.eol",{overrideIdentifier:c,resource:o});if(i&&typeof i=="string"&&i!=="auto")return i;const S=this.getOS(o);return S===3||S===2?` `:`\r `}getOS(o){let c=_.OS;const i=this.environmentService.remoteAuthority;if(i&&o&&o.scheme!==A.Schemas.file){const S=`resource.authority.os.${i}`;c=this.remoteEnvironment?this.remoteEnvironment.os:this.storageService.getNumber(S,1,_.OS),this.storageService.store(S,c,1,1)}return c}};v=Ee([W(0,t.IConfigurationService),W(1,w.IRemoteAgentService),W(2,D.IWorkbenchEnvironmentService),W(3,k.IStorageService)],v),e.TextResourcePropertiesService=v,(0,I.registerSingleton)(f.ITextResourcePropertiesService,v,!0)}),define(ne[2636],re([1,0,1907,133,32,66,17]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorExtensionPoint=void 0;const D=k.Registry.as(_.Extensions.ColorContribution),I=D.getColorReferenceSchema(),w="^\\w+[.\\w+]*$",v=f.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"colors",jsonSchema:{description:t.localize(0,null),type:"array",items:{type:"object",properties:{id:{type:"string",description:t.localize(1,null),pattern:w,patternErrorMessage:t.localize(2,null)},description:{type:"string",description:t.localize(3,null)},defaults:{type:"object",properties:{light:{description:t.localize(4,null),type:"string",anyOf:[I,{type:"string",format:"color-hex"}]},dark:{description:t.localize(5,null),type:"string",anyOf:[I,{type:"string",format:"color-hex"}]},highContrast:{description:t.localize(6,null),type:"string",anyOf:[I,{type:"string",format:"color-hex"}]},highContrastLight:{description:t.localize(7,null),type:"string",anyOf:[I,{type:"string",format:"color-hex"}]}},required:["light","dark"]}}}}});class C{constructor(){v.setHandler((c,i)=>{for(const S of i.added){const s=S.value,l=S.collector;if(!s||!Array.isArray(s)){l.error(t.localize(8,null));return}let r=(p,u)=>p.length>0?p[0]==="#"?A.Color.Format.CSS.parseHex(p):p:(l.error(t.localize(9,null,u)),A.Color.red);for(const p of s){if(typeof p.id!="string"||p.id.length===0){l.error(t.localize(10,null));return}if(!p.id.match(w)){l.error(t.localize(11,null));return}if(typeof p.description!="string"||p.id.length===0){l.error(t.localize(12,null));return}let u=p.defaults;if(!u||typeof u!="object"||typeof u.light!="string"||typeof u.dark!="string"){l.error(t.localize(13,null));return}if(u.highContrast&&typeof u.highContrast!="string"){l.error(t.localize(14,null));return}if(u.highContrastLight&&typeof u.highContrastLight!="string"){l.error(t.localize(15,null));return}D.registerColor(p.id,{light:r(u.light,"configuration.colors.defaults.light"),dark:r(u.dark,"configuration.colors.defaults.dark"),hcDark:r(u.highContrast??u.dark,"configuration.colors.defaults.highContrast"),hcLight:r(u.highContrastLight??u.light,"configuration.colors.defaults.highContrastLight")},p.description)}}for(const S of i.removed){const s=S.value;for(const l of s)D.deregisterColor(l.id)}})}}e.ColorExtensionPoint=C}),define(ne[632],re([1,0,1909,17,146,32,404]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerColorThemeSchemas=e.colorThemeSchemaId=e.textmateColorGroupSchemaId=e.textmateColorSettingsSchemaId=e.textmateColorsSchemaId=void 0;let D=["comment","comment.block","comment.block.documentation","comment.line","constant","constant.character","constant.character.escape","constant.numeric","constant.numeric.integer","constant.numeric.float","constant.numeric.hex","constant.numeric.octal","constant.other","constant.regexp","constant.rgb-value","emphasis","entity","entity.name","entity.name.class","entity.name.function","entity.name.method","entity.name.section","entity.name.selector","entity.name.tag","entity.name.type","entity.other","entity.other.attribute-name","entity.other.inherited-class","invalid","invalid.deprecated","invalid.illegal","keyword","keyword.control","keyword.operator","keyword.operator.new","keyword.operator.assignment","keyword.operator.arithmetic","keyword.operator.logical","keyword.other","markup","markup.bold","markup.changed","markup.deleted","markup.heading","markup.inline.raw","markup.inserted","markup.italic","markup.list","markup.list.numbered","markup.list.unnumbered","markup.other","markup.quote","markup.raw","markup.underline","markup.underline.link","meta","meta.block","meta.cast","meta.class","meta.function","meta.function-call","meta.preprocessor","meta.return-type","meta.selector","meta.tag","meta.type.annotation","meta.type","punctuation.definition.string.begin","punctuation.definition.string.end","punctuation.separator","punctuation.separator.continuation","punctuation.terminator","storage","storage.modifier","storage.type","string","string.interpolated","string.other","string.quoted","string.quoted.double","string.quoted.other","string.quoted.single","string.quoted.triple","string.regexp","string.unquoted","strong","support","support.class","support.constant","support.function","support.other","support.type","support.type.property-name","support.variable","variable","variable.language","variable.name","variable.other","variable.other.readwrite","variable.parameter"];e.textmateColorsSchemaId="vscode://schemas/textmate-colors",e.textmateColorSettingsSchemaId=`${e.textmateColorsSchemaId}#/definitions/settings`,e.textmateColorGroupSchemaId=`${e.textmateColorsSchemaId}#/definitions/colorGroup`;const I={type:"array",definitions:{colorGroup:{default:"#FF0000",anyOf:[{type:"string",format:"color-hex"},{$ref:"#/definitions/settings"}]},settings:{type:"object",description:t.localize(0,null),properties:{foreground:{type:"string",description:t.localize(1,null),format:"color-hex",default:"#ff0000"},background:{type:"string",deprecationMessage:t.localize(2,null)},fontStyle:{type:"string",description:t.localize(3,null),pattern:"^(\\s*\\b(italic|bold|underline|strikethrough))*\\s*$",patternErrorMessage:t.localize(4,null),defaultSnippets:[{label:t.localize(5,null),bodyText:'""'},{body:"italic"},{body:"bold"},{body:"underline"},{body:"strikethrough"},{body:"italic bold"},{body:"italic underline"},{body:"italic strikethrough"},{body:"bold underline"},{body:"bold strikethrough"},{body:"underline strikethrough"},{body:"italic bold underline"},{body:"italic bold strikethrough"},{body:"italic underline strikethrough"},{body:"bold underline strikethrough"},{body:"italic bold underline strikethrough"}]}},additionalProperties:!1,defaultSnippets:[{body:{foreground:"${1:#FF0000}",fontStyle:"${2:bold}"}}]}},items:{type:"object",defaultSnippets:[{body:{scope:"${1:keyword.operator}",settings:{foreground:"${2:#FF0000}"}}}],properties:{name:{type:"string",description:t.localize(6,null)},scope:{description:t.localize(7,null),anyOf:[{enum:D},{type:"string"},{type:"array",items:{enum:D}},{type:"array",items:{type:"string"}}]},settings:{$ref:"#/definitions/settings"}},required:["settings","scope"],additionalProperties:!1}};e.colorThemeSchemaId="vscode://schemas/color-theme";const w={type:"object",allowComments:!0,allowTrailingCommas:!0,properties:{colors:{description:t.localize(8,null),$ref:A.workbenchColorsSchemaId,additionalProperties:!1},tokenColors:{anyOf:[{type:"string",description:t.localize(9,null)},{description:t.localize(10,null),$ref:e.textmateColorsSchemaId}]},semanticHighlighting:{type:"boolean",description:t.localize(11,null)},semanticTokenColors:{type:"object",description:t.localize(12,null),$ref:k.tokenStylingSchemaId}}};function v(){let C=f.Registry.as(_.Extensions.JSONContribution);C.registerSchema(e.colorThemeSchemaId,w),C.registerSchema(e.textmateColorsSchemaId,I)}e.registerColorThemeSchemas=v}),define(ne[916],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IHostColorSchemeService=void 0,e.IHostColorSchemeService=(0,t.createDecorator)("hostColorSchemeService")}),define(ne[2637],re([1,0,1911,133,63,17,33,19,48]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IconExtensionPoint=void 0;const w=A.Registry.as(_.Extensions.IconContribution),v=w.getIconReferenceSchema(),C=`^${k.CSSIcon.iconNameSegment}(-${k.CSSIcon.iconNameSegment})+$`,o=f.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"icons",jsonSchema:{description:t.localize(0,null),type:"object",propertyNames:{pattern:C,description:t.localize(1,null),patternErrorMessage:t.localize(2,null)},additionalProperties:{type:"object",properties:{description:{type:"string",description:t.localize(3,null)},default:{anyOf:[v,{type:"object",properties:{fontPath:{description:t.localize(4,null),type:"string"},fontCharacter:{description:t.localize(5,null),type:"string"}},required:["fontPath","fontCharacter"],defaultSnippets:[{body:{fontPath:"${1:myiconfont.woff}",fontCharacter:"${2:\\\\E001}"}}]}],description:t.localize(6,null)}},required:["description","default"],defaultSnippets:[{body:{description:"${1:my icon}",default:{fontPath:"${2:myiconfont.woff}",fontCharacter:"${3:\\\\E001}"}}}]},defaultSnippets:[{body:{"${1:my-icon-id}":{description:"${2:my icon}",default:{fontPath:"${3:myiconfont.woff}",fontCharacter:"${4:\\\\E001}"}}}}]}});class c{constructor(){o.setHandler((s,l)=>{for(const r of l.added){const p=r.value,u=r.collector;if(!p||typeof p!="object"){u.error(t.localize(7,null));return}for(const a in p){if(!a.match(C)){u.error(t.localize(8,null));return}const n=p[a];if(typeof n.description!="string"||n.description.length===0){u.error(t.localize(9,null));return}let h=n.default;if(typeof h=="string")w.registerIcon(a,{id:h},n.description);else if(typeof h=="object"&&typeof h.fontPath=="string"&&typeof h.fontCharacter=="string"){const g=(0,I.extname)(h.fontPath).substring(1);if(["woff","woff2","ttf"].indexOf(g)===-1){u.warn(t.localize(10,null,g));return}const d=r.description.extensionLocation,m=D.joinPath(d,h.fontPath);if(!D.isEqualOrParent(m,d)){u.warn(t.localize(11,null,m.path,d.path));return}const b=i(r.description,h.fontPath),E=w.registerIconFont(b,{src:[{location:m,format:g}]});w.registerIcon(a,{fontCharacter:h.fontCharacter,font:{id:b,definition:E}},n.description)}else u.error(t.localize(12,null))}}for(const r of l.removed){const p=r.value;for(const u in p)w.deregisterIcon(u)}})}}e.IconExtensionPoint=c;function i(S,s){return I.posix.join(S.identifier.value,s)}}),define(ne[2638],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parse=e.parseWithLocation=void 0;var t;(function(D){D[D.BOM=65279]="BOM",D[D.SPACE=32]="SPACE",D[D.TAB=9]="TAB",D[D.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",D[D.LINE_FEED=10]="LINE_FEED",D[D.SLASH=47]="SLASH",D[D.LESS_THAN=60]="LESS_THAN",D[D.QUESTION_MARK=63]="QUESTION_MARK",D[D.EXCLAMATION_MARK=33]="EXCLAMATION_MARK"})(t||(t={}));var f;(function(D){D[D.ROOT_STATE=0]="ROOT_STATE",D[D.DICT_STATE=1]="DICT_STATE",D[D.ARR_STATE=2]="ARR_STATE"})(f||(f={}));function _(D,I,w){return k(D,I,w)}e.parseWithLocation=_;function A(D){return k(D,null,null)}e.parse=A;function k(D,I,w){const v=D.length;let C=0,o=1,c=0;v>0&&D.charCodeAt(0)===65279&&(C=1);function i(K){if(w===null)C=C+K;else for(;K>0;)D.charCodeAt(C)===10?(C++,o++,c=0):(C++,c++),K--}function S(K){w===null?C=K:i(K-C)}function s(){for(;C<v;){let K=D.charCodeAt(C);if(K!==32&&K!==9&&K!==13&&K!==10)break;i(1)}}function l(K){return D.substr(C,K.length)===K?(i(K.length),!0):!1}function r(K){let G=D.indexOf(K,C);S(G!==-1?G+K.length:v)}function p(K){let G=D.indexOf(K,C);if(G!==-1){let q=D.substring(C,G);return S(G+K.length),q}else{let q=D.substr(C);return S(v),q}}let u=0,a=null,n=[],h=[],g=null;function d(K,G){n.push(u),h.push(a),u=K,a=G}function m(){if(n.length===0)return b("illegal state stack");u=n.pop(),a=h.pop()}function b(K){throw new Error("Near offset "+C+": "+K+" ~~~"+D.substr(C,50)+"~~~")}const E={enterDict:function(){if(g===null)return b("missing <key>");let K={};w!==null&&(K[w]={filename:I,line:o,char:c}),a[g]=K,g=null,d(1,K)},enterArray:function(){if(g===null)return b("missing <key>");let K=[];a[g]=K,g=null,d(2,K)}},y={enterDict:function(){let K={};w!==null&&(K[w]={filename:I,line:o,char:c}),a.push(K),d(1,K)},enterArray:function(){let K=[];a.push(K),d(2,K)}};function T(){u===1?E.enterDict():u===2?y.enterDict():(a={},w!==null&&(a[w]={filename:I,line:o,char:c}),d(1,a))}function R(){if(u===1)m();else return b("unexpected </dict>")}function O(){u===1?E.enterArray():u===2?y.enterArray():(a=[],d(2,a))}function x(){if(u===1)return b("unexpected </array>");if(u===2)m();else return b("unexpected </array>")}function F(K){if(u===1){if(g!==null)return b("too many <key>");g=K}else return b("unexpected <key>")}function L(K){if(u===1){if(g===null)return b("missing <key>");a[g]=K,g=null}else u===2?a.push(K):a=K}function M(K){if(isNaN(K))return b("cannot parse float");if(u===1){if(g===null)return b("missing <key>");a[g]=K,g=null}else u===2?a.push(K):a=K}function N(K){if(isNaN(K))return b("cannot parse integer");if(u===1){if(g===null)return b("missing <key>");a[g]=K,g=null}else u===2?a.push(K):a=K}function B(K){if(u===1){if(g===null)return b("missing <key>");a[g]=K,g=null}else u===2?a.push(K):a=K}function P(K){if(u===1){if(g===null)return b("missing <key>");a[g]=K,g=null}else u===2?a.push(K):a=K}function V(K){if(u===1){if(g===null)return b("missing <key>");a[g]=K,g=null}else u===2?a.push(K):a=K}function z(K){return K.replace(/&#([0-9]+);/g,function(G,q){return String.fromCodePoint(parseInt(q,10))}).replace(/&#x([0-9a-f]+);/g,function(G,q){return String.fromCodePoint(parseInt(q,16))}).replace(/&|<|>|"|'/g,function(G){switch(G){case"&":return"&";case"<":return"<";case">":return">";case""":return'"';case"'":return"'"}return G})}function U(){let K=p(">"),G=!1;return K.charCodeAt(K.length-1)===47&&(G=!0,K=K.substring(0,K.length-1)),{name:K.trim(),isClosed:G}}function H(K){if(K.isClosed)return"";let G=p("</");return r(">"),z(G)}for(;C<v&&(s(),!(C>=v));){const K=D.charCodeAt(C);if(i(1),K!==60)return b("expected <");if(C>=v)return b("unexpected end of input");const G=D.charCodeAt(C);if(G===63){i(1),r("?>");continue}if(G===33){if(i(1),l("--")){r("-->");continue}r(">");continue}if(G===47){if(i(1),s(),l("plist")){r(">");continue}if(l("dict")){r(">"),R();continue}if(l("array")){r(">"),x();continue}return b("unexpected closed tag")}let q=U();switch(q.name){case"dict":T(),q.isClosed&&R();continue;case"array":O(),q.isClosed&&x();continue;case"key":F(H(q));continue;case"string":L(H(q));continue;case"real":M(parseFloat(H(q)));continue;case"integer":N(parseInt(H(q),10));continue;case"date":B(new Date(H(q)));continue;case"data":P(H(q));continue;case"true":H(q),V(!0);continue;case"false":H(q),V(!1);continue}if(!/^plist/.test(q.name))return b("unexpected opened tag "+q.name)}return a}}),define(ne[633],re([1,0,1912,17,146,63]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerProductIconThemeSchemas=e.fontFormatRegex=e.fontSizeRegex=e.fontWeightRegex=e.fontStyleRegex=e.fontIdRegex=void 0,e.fontIdRegex="^([\\w_-]+)$",e.fontStyleRegex="^(normal|italic|(oblique[ \\w\\s-]+))$",e.fontWeightRegex="^(normal|bold|lighter|bolder|(\\d{0-1000}))$",e.fontSizeRegex="^([\\w .%_-]+)$",e.fontFormatRegex="^woff|woff2|truetype|opentype|embedded-opentype|svg$";const k="vscode://schemas/product-icon-theme",D={type:"object",allowComments:!0,allowTrailingCommas:!0,properties:{fonts:{type:"array",items:{type:"object",properties:{id:{type:"string",description:t.localize(0,null),pattern:e.fontIdRegex,patternErrorMessage:t.localize(1,null)},src:{type:"array",description:t.localize(2,null),items:{type:"object",properties:{path:{type:"string",description:t.localize(3,null)},format:{type:"string",description:t.localize(4,null),enum:["woff","woff2","truetype","opentype","embedded-opentype","svg"]}},required:["path","format"]}},weight:{type:"string",description:t.localize(5,null),anyOf:[{enum:["normal","bold","lighter","bolder"]},{type:"string",pattern:e.fontWeightRegex}]},style:{type:"string",description:t.localize(6,null),anyOf:[{enum:["normal","italic","oblique"]},{type:"string",pattern:e.fontStyleRegex}]}},required:["id","src"]}},iconDefinitions:{description:t.localize(7,null),$ref:A.iconsSchemaId,additionalProperties:!1}}};function I(){f.Registry.as(_.Extensions.JSONContribution).registerSchema(k,D)}e.registerProductIconThemeSchemas=I}),define(ne[2639],re([1,0,1910,17,146,633]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerFileIconThemeSchemas=void 0;const k="vscode://schemas/icon-theme",D={type:"object",allowComments:!0,allowTrailingCommas:!0,definitions:{folderExpanded:{type:"string",description:t.localize(0,null)},folder:{type:"string",description:t.localize(1,null)},file:{type:"string",description:t.localize(2,null)},folderNames:{type:"object",description:t.localize(3,null),additionalProperties:{type:"string",description:t.localize(4,null)}},folderNamesExpanded:{type:"object",description:t.localize(5,null),additionalProperties:{type:"string",description:t.localize(6,null)}},fileExtensions:{type:"object",description:t.localize(7,null),additionalProperties:{type:"string",description:t.localize(8,null)}},fileNames:{type:"object",description:t.localize(9,null),additionalProperties:{type:"string",description:t.localize(10,null)}},languageIds:{type:"object",description:t.localize(11,null),additionalProperties:{type:"string",description:t.localize(12,null)}},associations:{type:"object",properties:{folderExpanded:{$ref:"#/definitions/folderExpanded"},folder:{$ref:"#/definitions/folder"},file:{$ref:"#/definitions/file"},folderNames:{$ref:"#/definitions/folderNames"},folderNamesExpanded:{$ref:"#/definitions/folderNamesExpanded"},fileExtensions:{$ref:"#/definitions/fileExtensions"},fileNames:{$ref:"#/definitions/fileNames"},languageIds:{$ref:"#/definitions/languageIds"}}}},properties:{fonts:{type:"array",description:t.localize(13,null),items:{type:"object",properties:{id:{type:"string",description:t.localize(14,null),pattern:A.fontIdRegex,patternErrorMessage:t.localize(15,null)},src:{type:"array",description:t.localize(16,null),items:{type:"object",properties:{path:{type:"string",description:t.localize(17,null)},format:{type:"string",description:t.localize(18,null),enum:["woff","woff2","truetype","opentype","embedded-opentype","svg"]}},required:["path","format"]}},weight:{type:"string",description:t.localize(19,null),pattern:A.fontWeightRegex},style:{type:"string",description:t.localize(20,null),pattern:A.fontStyleRegex},size:{type:"string",description:t.localize(21,null),pattern:A.fontSizeRegex}},required:["id","src"]}},iconDefinitions:{type:"object",description:t.localize(22,null),additionalProperties:{type:"object",description:t.localize(23,null),properties:{iconPath:{type:"string",description:t.localize(24,null)},fontCharacter:{type:"string",description:t.localize(25,null)},fontColor:{type:"string",format:"color-hex",description:t.localize(26,null)},fontSize:{type:"string",description:t.localize(27,null),pattern:A.fontSizeRegex},fontId:{type:"string",description:t.localize(28,null)}}}},folderExpanded:{$ref:"#/definitions/folderExpanded"},folder:{$ref:"#/definitions/folder"},file:{$ref:"#/definitions/file"},folderNames:{$ref:"#/definitions/folderNames"},folderNamesExpanded:{$ref:"#/definitions/folderNamesExpanded"},fileExtensions:{$ref:"#/definitions/fileExtensions"},fileNames:{$ref:"#/definitions/fileNames"},languageIds:{$ref:"#/definitions/languageIds"},light:{$ref:"#/definitions/associations",description:t.localize(29,null)},highContrast:{$ref:"#/definitions/associations",description:t.localize(30,null)},hidesExplorerArrows:{type:"boolean",description:t.localize(31,null)},showLanguageModeIcons:{type:"boolean",description:t.localize(32,null)}}};function I(){f.Registry.as(_.Extensions.JSONContribution).registerSchema(k,D)}e.registerFileIconThemeSchemas=I}),define(ne[2640],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMatchers=void 0;function t(A,k,D){const I=_(A);let w=I.next();for(;w!==null;){let c=0;if(w.length===2&&w.charAt(1)===":"){switch(w.charAt(0)){case"R":c=1;break;case"L":c=-1;break;default:console.log(`Unknown priority ${w} in scope selector`)}w=I.next()}let i=C();if(i&&D.push({matcher:i,priority:c}),w!==",")break;w=I.next()}function v(){if(w==="-"){w=I.next();const c=v();return c?i=>c(i)<0?0:-1:null}if(w==="("){w=I.next();const c=o();return w===")"&&(w=I.next()),c}if(f(w)){const c=[];do c.push(w),w=I.next();while(f(w));return i=>k(c,i)}return null}function C(){let c=v();if(!c)return null;const i=[];for(;c;)i.push(c),c=v();return S=>{let s=i[0](S);for(let l=1;s>=0&&l<i.length;l++)s=Math.min(s,i[l](S));return s}}function o(){let c=C();if(!c)return null;const i=[];for(;c&&(i.push(c),w==="|"||w===",");){do w=I.next();while(w==="|"||w===",");c=C()}return S=>{let s=i[0](S);for(let l=1;l<i.length;l++)s=Math.max(s,i[l](S));return s}}}e.createMatchers=t;function f(A){return!!A&&!!A.match(/[\w\.:]+/)}function _(A){let k=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,D=k.exec(A);return{next:()=>{if(!D)return null;const I=D[0];return D=k.exec(A),I}}}}),define(ne[2641],re([1,0,66,32,164]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.convertSettings=void 0;const A={};function k(w,v){let C=A[w];C||(A[w]=C=[]),C.push(v)}function D(w,v){for(let C of w)if(v.textMateRules.push(C),!C.scope){let o=C.settings;if(!o)C.settings={};else for(const c in o){const i=c;let S=A[i];if(S){let s=o[i];if(typeof s=="string"){let l=t.Color.fromHex(s);for(let r of S)v.colors[r]=l}}i!=="foreground"&&i!=="background"&&i!=="fontStyle"&&delete o[i]}}}e.convertSettings=D,k("background",f.editorBackground),k("foreground",f.editorForeground),k("selection",f.editorSelectionBackground),k("inactiveSelection",f.editorInactiveSelection),k("selectionHighlightColor",f.editorSelectionHighlight),k("findMatchHighlight",f.editorFindMatchHighlight),k("currentFindMatchHighlight",f.editorFindMatch),k("hoverHighlight",f.editorHoverHighlight),k("wordHighlight","editor.wordHighlightBackground"),k("wordHighlightStrong","editor.wordHighlightStrongBackground"),k("findRangeHighlight",f.editorFindRangeHighlight),k("findMatchHighlight","peekViewResult.matchHighlightBackground"),k("referenceHighlight","peekViewEditor.matchHighlightBackground"),k("lineHighlight",_.editorLineHighlight),k("rangeHighlight",_.editorRangeHighlight),k("caret",_.editorCursorForeground),k("invisibles",_.editorWhitespaces),k("guide",_.editorIndentGuides),k("activeGuide",_.editorActiveIndentGuides);const I=["ansiBlack","ansiRed","ansiGreen","ansiYellow","ansiBlue","ansiMagenta","ansiCyan","ansiWhite","ansiBrightBlack","ansiBrightRed","ansiBrightGreen","ansiBrightYellow","ansiBrightBlue","ansiBrightMagenta","ansiBrightCyan","ansiBrightWhite"];for(const w of I)k(w,"terminal."+w)}),define(ne[2642],re([1,0,1915,133,404]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenClassificationExtensionPoints=void 0;const A=(0,_.getTokenClassificationRegistry)(),k=f.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"semanticTokenTypes",jsonSchema:{description:t.localize(0,null),type:"array",items:{type:"object",properties:{id:{type:"string",description:t.localize(1,null),pattern:_.typeAndModifierIdPattern,patternErrorMessage:t.localize(2,null)},superType:{type:"string",description:t.localize(3,null),pattern:_.typeAndModifierIdPattern,patternErrorMessage:t.localize(4,null)},description:{type:"string",description:t.localize(5,null)}}}}}),D=f.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"semanticTokenModifiers",jsonSchema:{description:t.localize(6,null),type:"array",items:{type:"object",properties:{id:{type:"string",description:t.localize(7,null),pattern:_.typeAndModifierIdPattern,patternErrorMessage:t.localize(8,null)},description:{description:t.localize(9,null)}}}}}),I=f.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"semanticTokenScopes",jsonSchema:{description:t.localize(10,null),type:"array",items:{type:"object",properties:{language:{description:t.localize(11,null),type:"string"},scopes:{description:t.localize(12,null),type:"object",additionalProperties:{type:"array",items:{type:"string"}}}}}}});class w{constructor(){function C(o,c,i){if(typeof o.id!="string"||o.id.length===0)return i.error(t.localize(13,null,c)),!1;if(!o.id.match(_.typeAndModifierIdPattern))return i.error(t.localize(14,null,c)),!1;const S=o.superType;return S&&!S.match(_.typeAndModifierIdPattern)?(i.error(t.localize(15,null,c)),!1):typeof o.description!="string"||o.id.length===0?(i.error(t.localize(16,null,c)),!1):!0}k.setHandler((o,c)=>{for(const i of c.added){const S=i.value,s=i.collector;if(!S||!Array.isArray(S)){s.error(t.localize(17,null));return}for(const l of S)C(l,"semanticTokenType",s)&&A.registerTokenType(l.id,l.description,l.superType)}for(const i of c.removed){const S=i.value;for(const s of S)A.deregisterTokenType(s.id)}}),D.setHandler((o,c)=>{for(const i of c.added){const S=i.value,s=i.collector;if(!S||!Array.isArray(S)){s.error(t.localize(18,null));return}for(const l of S)C(l,"semanticTokenModifier",s)&&A.registerTokenModifier(l.id,l.description)}for(const i of c.removed){const S=i.value;for(const s of S)A.deregisterTokenModifier(s.id)}}),I.setHandler((o,c)=>{for(const i of c.added){const S=i.value,s=i.collector;if(!S||!Array.isArray(S)){s.error(t.localize(19,null));return}for(const l of S){if(l.language&&typeof l.language!="string"){s.error(t.localize(20,null));continue}if(!l.scopes||typeof l.scopes!="object"){s.error(t.localize(21,null));continue}for(let r in l.scopes){const p=l.scopes[r];if(!Array.isArray(p)||p.some(u=>typeof u!="string")){s.error(t.localize(22,null));continue}try{const u=A.parseTokenSelector(r,l.language);A.registerTokenStyleDefault(u,{scopesToProbe:p.map(a=>a.split(" "))})}catch{s.error(t.localize(23,null,r))}}}}for(const i of c.removed){const S=i.value;for(const s of S)for(let l in s.scopes){const r=s.scopes[l];try{const p=A.parseTokenSelector(l,s.language);A.registerTokenStyleDefault(p,{scopesToProbe:r.map(u=>u.split(" "))})}catch{}}}})}}e.TokenClassificationExtensionPoints=w}),define(ne[193],re([1,0,5,12,13]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionData=e.ThemeSettings=e.themeScopeRegex=e.THEME_SCOPE_WILDCARD=e.THEME_SCOPE_CLOSE_PAREN=e.THEME_SCOPE_OPEN_PAREN=e.VS_HC_LIGHT_THEME=e.VS_HC_THEME=e.VS_DARK_THEME=e.VS_LIGHT_THEME=e.IWorkbenchThemeService=void 0,e.IWorkbenchThemeService=(0,t.refineServiceDecorator)(f.IThemeService),e.VS_LIGHT_THEME="vs",e.VS_DARK_THEME="vs-dark",e.VS_HC_THEME="hc-black",e.VS_HC_LIGHT_THEME="hc-light",e.THEME_SCOPE_OPEN_PAREN="[",e.THEME_SCOPE_CLOSE_PAREN="]",e.THEME_SCOPE_WILDCARD="*",e.themeScopeRegex=/\[(.+?)\]/g;var A;(function(D){D.COLOR_THEME="workbench.colorTheme",D.FILE_ICON_THEME="workbench.iconTheme",D.PRODUCT_ICON_THEME="workbench.productIconTheme",D.COLOR_CUSTOMIZATIONS="workbench.colorCustomizations",D.TOKEN_COLOR_CUSTOMIZATIONS="editor.tokenColorCustomizations",D.SEMANTIC_TOKEN_COLOR_CUSTOMIZATIONS="editor.semanticTokenColorCustomizations",D.PREFERRED_DARK_THEME="workbench.preferredDarkColorTheme",D.PREFERRED_LIGHT_THEME="workbench.preferredLightColorTheme",D.PREFERRED_HC_DARK_THEME="workbench.preferredHighContrastColorTheme",D.PREFERRED_HC_LIGHT_THEME="workbench.preferredHighContrastLightColorTheme",D.DETECT_COLOR_SCHEME="window.autoDetectColorScheme",D.DETECT_HC="window.autoDetectHighContrast"})(A=e.ThemeSettings||(e.ThemeSettings={}));var k;(function(D){function I(C){return C&&{_extensionId:C.extensionId,_extensionIsBuiltin:C.extensionIsBuiltin,_extensionName:C.extensionName,_extensionPublisher:C.extensionPublisher}}D.toJSONObject=I;function w(C){if(C&&(0,_.isString)(C._extensionId)&&(0,_.isBoolean)(C._extensionIsBuiltin)&&(0,_.isString)(C._extensionName)&&(0,_.isString)(C._extensionPublisher))return{extensionId:C._extensionId,extensionIsBuiltin:C._extensionIsBuiltin,extensionName:C._extensionName,extensionPublisher:C._extensionPublisher}}D.fromJSONObject=w;function v(C,o,c=!1){return{extensionPublisher:C,extensionId:`${C}.${o}`,extensionName:o,extensionIsBuiltin:c}}D.fromName=v})(k=e.ExtensionData||(e.ExtensionData={}))}),define(ne[2643],re([1,0,1457,10,66,2,39,20,86,42,26,32,12,900,429,193,30,404,8,558,127,18,62,1075]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const h=f.$;let g=class za extends A.Disposable{constructor(y,T,R,O,x,F,L){super();this._editor=y,this._textMateService=T,this._themeService=O,this._languageService=R,this._notificationService=x,this._configurationService=F,this._languageFeaturesService=L,this._widget=null,this._register(this._editor.onDidChangeModel(M=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(M=>this.stop())),this._register(this._editor.onKeyUp(M=>M.keyCode===9&&this.stop()))}static get(y){return y.getContribution(za.ID)}dispose(){this.stop(),super.dispose()}launch(){this._widget||!this._editor.hasModel()||this._editor.getModel().uri.scheme!==a.Schemas.vscodeNotebookCell&&(this._widget=new b(this._editor,this._textMateService,this._languageService,this._themeService,this._notificationService,this._configurationService,this._languageFeaturesService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}toggle(){this._widget?this.stop():this.launch()}};g.ID="editor.contrib.inspectEditorTokens",g=Ee([W(1,i.ITextMateService),W(2,w.ILanguageService),W(3,S.IWorkbenchThemeService),W(4,v.INotificationService),W(5,r.IConfigurationService),W(6,n.ILanguageFeaturesService)],g);class d extends k.EditorAction{constructor(){super({id:"editor.action.inspectTMScopes",label:t.localize(0,null),alias:"Developer: Inspect Editor Tokens and Scopes",precondition:void 0})}run(y,T){let R=g.get(T);R&&R.toggle()}}function m(E){E.length>40&&(E=E.substr(0,20)+"\u2026"+E.substr(E.length-20));let y="";for(let T=0,R=E.length;T<R;T++){let O=E.charCodeAt(T);switch(O){case 9:y+="\u2192";break;case 32:y+="\xB7";break;default:y+=String.fromCharCode(O)}}return y}class b extends A.Disposable{constructor(y,T,R,O,x,F,L){super();this.allowEditorOverflow=!0,this._isDisposed=!1,this._editor=y,this._languageService=R,this._themeService=O,this._textMateService=T,this._notificationService=x,this._configurationService=F,this._languageFeaturesService=L,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="token-inspect-widget",this._currentRequestCancellationTokenSource=new s.CancellationTokenSource,this._beginCompute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(M=>this._beginCompute(this._editor.getPosition()))),this._register(O.onDidColorThemeChange(M=>this._beginCompute(this._editor.getPosition()))),this._register(F.onDidChangeConfiguration(M=>M.affectsConfiguration("editor.semanticHighlighting.enabled")&&this._beginCompute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._isDisposed=!0,this._editor.removeContentWidget(this),this._currentRequestCancellationTokenSource.cancel(),super.dispose()}getId(){return b._ID}_beginCompute(y){const T=this._textMateService.createGrammar(this._model.getLanguageId()),R=this._computeSemanticTokens(y);f.clearNode(this._domNode),this._domNode.appendChild(document.createTextNode(t.localize(1,null))),Promise.all([T,R]).then(([O,x])=>{this._isDisposed||(this._compute(O,x,y),this._domNode.style.maxWidth=`${Math.max(this._editor.getLayoutInfo().width*.66,500)}px`,this._editor.layoutContentWidget(this))},O=>{this._notificationService.warn(O),setTimeout(()=>{g.get(this._editor)?.stop()})})}_isSemanticColoringEnabled(){const y=this._configurationService.getValue(p.SEMANTIC_HIGHLIGHTING_SETTING_ID,{overrideIdentifier:this._model.getLanguageId(),resource:this._model.uri})?.enabled;return typeof y=="boolean"?y:this._themeService.getColorTheme().semanticHighlighting}_compute(y,T,R){const O=y&&this._getTokensAtPosition(y,R),x=T&&this._getSemanticTokenAtPosition(T,R);if(!O&&!x){f.reset(this._domNode,"No grammar or semantic tokens available.");return}let F=O?.metadata,L=x?.metadata;const M=x&&m(this._model.getValueInRange(x.range)),N=O&&m(this._model.getLineContent(R.lineNumber).substring(O.token.startIndex,O.token.endIndex)),B=M||N||"";if(f.reset(this._domNode,h("h2.tiw-token",void 0,B,h("span.tiw-token-length",void 0,`${B.length} ${B.length===1?"char":"chars"}`))),f.append(this._domNode,h("hr.tiw-metadata-separator",{style:"clear:both"})),f.append(this._domNode,h("table.tiw-metadata-table",void 0,h("tbody",void 0,h("tr",void 0,h("td.tiw-metadata-key",void 0,"language"),h("td.tiw-metadata-value",void 0,F?.languageId||"")),h("tr",void 0,h("td.tiw-metadata-key",void 0,"standard token type"),h("td.tiw-metadata-value",void 0,this._tokenTypeToString(F?.tokenType||0))),...this._formatMetadata(L,F)))),x){f.append(this._domNode,h("hr.tiw-metadata-separator"));const P=f.append(this._domNode,h("table.tiw-metadata-table",void 0)),V=f.append(P,h("tbody",void 0,h("tr",void 0,h("td.tiw-metadata-key",void 0,"semantic token type"),h("td.tiw-metadata-value",void 0,x.type))));if(x.modifiers.length&&f.append(V,h("tr",void 0,h("td.tiw-metadata-key",void 0,"modifiers"),h("td.tiw-metadata-value",void 0,x.modifiers.join(" ")))),x.metadata){const z=["foreground","bold","italic","underline","strikethrough"],U={},H=new Array;for(let K of z)if(x.metadata[K]!==void 0){const G=x.definitions[K],q=this._renderTokenStyleDefinition(G,K),Z=q.map(X=>X instanceof HTMLElement?X.outerHTML:X).join();let j=U[Z];j||(U[Z]=j=[],H.push([q,Z])),j.push(K)}for(const[K,G]of H)f.append(V,h("tr",void 0,h("td.tiw-metadata-key",void 0,U[G].join(", ")),h("td.tiw-metadata-value",void 0,...K)))}}if(O){let P=this._themeService.getColorTheme();f.append(this._domNode,h("hr.tiw-metadata-separator"));const V=f.append(this._domNode,h("table.tiw-metadata-table")),z=f.append(V,h("tbody"));N&&N!==B&&f.append(z,h("tr",void 0,h("td.tiw-metadata-key",void 0,"textmate token"),h("td.tiw-metadata-value",void 0,`${N} (${N.length})`)));const U=new Array;for(let G=O.token.scopes.length-1;G>=0;G--)U.push(O.token.scopes[G]),G>0&&U.push(h("br"));f.append(z,h("tr",void 0,h("td.tiw-metadata-key",void 0,"textmate scopes"),h("td.tiw-metadata-value.tiw-metadata-scopes",void 0,...U)));let H=(0,c.findMatchingThemeRule)(P,O.token.scopes,!1);const K=x?.metadata?.foreground;if(H){if(K!==O.metadata.foreground){let G=h("code.tiw-theme-selector",void 0,H.rawSelector,h("br"),JSON.stringify(H.settings,null," "));K&&(G=h("s",void 0,G)),f.append(z,h("tr",void 0,h("td.tiw-metadata-key",void 0,"foreground"),h("td.tiw-metadata-value",void 0,G)))}}else K||f.append(z,h("tr",void 0,h("td.tiw-metadata-key",void 0,"foreground"),h("td.tiw-metadata-value",void 0,"No theme selector")))}}_formatMetadata(y,T){const R=new Array;function O(N){let B=y?.[N]||T?.[N];if(B!==void 0){const P=y?.[N]?"tiw-metadata-semantic":"";R.push(h("tr",void 0,h("td.tiw-metadata-key",void 0,N),h(`td.tiw-metadata-value.${P}`,void 0,B)))}return B}const x=O("foreground"),F=O("background");if(x&&F){const N=_.Color.fromHex(F),B=_.Color.fromHex(x);N.isOpaque()?R.push(h("tr",void 0,h("td.tiw-metadata-key",void 0,"contrast ratio"),h("td.tiw-metadata-value",void 0,N.getContrastRatio(B.makeOpaque(N)).toFixed(2)))):R.push(h("tr",void 0,h("td.tiw-metadata-key",void 0,"Contrast ratio cannot be precise for background colors that use transparency"),h("td.tiw-metadata-value")))}const L=new Array;function M(N){let B;y&&y[N]?B=h("span.tiw-metadata-semantic",void 0,N):T&&T[N]&&(B=N),B&&(L.length&&L.push(" "),L.push(B))}return M("bold"),M("italic"),M("underline"),M("strikethrough"),L.length&&R.push(h("tr",void 0,h("td.tiw-metadata-key",void 0,"font style"),h("td.tiw-metadata-value",void 0,...L))),R}_decodeMetadata(y){let T=this._themeService.getColorTheme().tokenColorMap,R=I.TokenMetadata.getLanguageId(y),O=I.TokenMetadata.getTokenType(y),x=I.TokenMetadata.getFontStyle(y),F=I.TokenMetadata.getForeground(y),L=I.TokenMetadata.getBackground(y);return{languageId:this._languageService.languageIdCodec.decodeLanguageId(R),tokenType:O,bold:x&2?!0:void 0,italic:x&1?!0:void 0,underline:x&4?!0:void 0,strikethrough:x&8?!0:void 0,foreground:T[F],background:T[L]}}_tokenTypeToString(y){switch(y){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 3:return"RegEx";default:return"??"}}_getTokensAtPosition(y,T){const R=T.lineNumber;let O=this._getStateBeforeLine(y,R),x=y.tokenizeLine(this._model.getLineContent(R),O),F=y.tokenizeLine2(this._model.getLineContent(R),O),L=0;for(let N=x.tokens.length-1;N>=0;N--){let B=x.tokens[N];if(T.column-1>=B.startIndex){L=N;break}}let M=0;for(let N=F.tokens.length>>>1;N>=0;N--)if(T.column-1>=F.tokens[N<<1]){M=N;break}return{token:x.tokens[L],metadata:this._decodeMetadata(F.tokens[(M<<1)+1])}}_getStateBeforeLine(y,T){let R=null;for(let O=1;O<T;O++)R=y.tokenizeLine(this._model.getLineContent(O),R).ruleStack;return R}isSemanticTokens(y){return y&&y.data}async _computeSemanticTokens(y){if(!this._isSemanticColoringEnabled())return null;const T=this._languageFeaturesService.documentSemanticTokensProvider.ordered(this._model);if(T.length){const O=T[0],x=await Promise.resolve(O.provideDocumentSemanticTokens(this._model,null,this._currentRequestCancellationTokenSource.token));if(this.isSemanticTokens(x))return{tokens:x,legend:O.getLegend()}}const R=this._languageFeaturesService.documentRangeSemanticTokensProvider.ordered(this._model);if(R.length){const O=R[0],x=y.lineNumber,F=new D.Range(x,1,x,this._model.getLineMaxColumn(x)),L=await Promise.resolve(O.provideDocumentRangeSemanticTokens(this._model,F,this._currentRequestCancellationTokenSource.token));if(this.isSemanticTokens(L))return{tokens:L,legend:O.getLegend()}}return null}_getSemanticTokenAtPosition(y,T){const R=y.tokens.data,O=this._model.getLanguageId();let x=0,F=0;const L=T.lineNumber-1,M=T.column-1;for(let N=0;N<R.length;N+=5){const B=R[N],P=R[N+1],V=R[N+2],z=R[N+3],U=R[N+4],H=x+B,K=B===0?F+P:P;if(L===H&&K<=M&&M<K+V){const G=y.legend.tokenTypes[z]||"not in legend (ignored)",q=[];let Z=U;for(let te=0;Z>0&&te<y.legend.tokenModifiers.length;te++)Z&1&&q.push(y.legend.tokenModifiers[te]),Z=Z>>1;Z>0&&q.push("not in legend (ignored)");const j=new D.Range(H+1,K+1,H+1,K+1+V),X={},Y=this._themeService.getColorTheme().tokenColorMap,J=this._themeService.getColorTheme().getTokenStyleMetadata(G,q,O,!0,X);let ee;return J&&(ee={languageId:void 0,tokenType:0,bold:J?.bold,italic:J?.italic,underline:J?.underline,strikethrough:J?.strikethrough,foreground:Y[J?.foreground||0],background:void 0}),{type:G,modifiers:q,range:j,metadata:ee,definitions:X}}x=H,F=K}return null}_renderTokenStyleDefinition(y,T){const R=new Array;if(y===void 0)return R;const O=this._themeService.getColorTheme();if(Array.isArray(y)){const x={};O.resolveScopes(y,x);const F=x[T];if(F&&x.scope){const L=h("ul.tiw-metadata-values"),M=Array.isArray(F.scope)?F.scope:[String(F.scope)];for(let N of M)L.appendChild(h("li.tiw-metadata-value.tiw-metadata-scopes",void 0,N));return R.push(x.scope.join(" "),L,h("code.tiw-theme-selector",void 0,JSON.stringify(F.settings,null," "))),R}return R}else if(l.SemanticTokenRule.is(y)){const x=O.getTokenStylingRuleScope(y);return x==="setting"?(R.push(`User settings: ${y.selector.id} - ${this._renderStyleProperty(y.style,T)}`),R):(x==="theme"&&R.push(`Color theme: ${y.selector.id} - ${this._renderStyleProperty(y.style,T)}`),R)}else{const x=O.resolveTokenStyleValue(y);return R.push(`Default: ${x?this._renderStyleProperty(x,T):""}`),R}}_renderStyleProperty(y,T){switch(T){case"foreground":return y.foreground?_.Color.Format.CSS.formatHexA(y.foreground,!0):"";default:return y[T]!==void 0?String(y[T]):""}}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}}b._ID="editor.contrib.inspectEditorTokensWidget",(0,k.registerEditorContribution)(g.ID,g),(0,k.registerEditorAction)(d),(0,o.registerThemingParticipant)((E,y)=>{const T=E.getColor(C.editorHoverBorder);if(T){let O=(0,u.isHighContrast)(E.type)?2:1;y.addRule(`.monaco-editor .token-inspect-widget { border: ${O}px solid ${T}; }`),y.addRule(`.monaco-editor .token-inspect-widget .tiw-metadata-separator { background-color: ${T}; }`)}const R=E.getColor(C.editorHoverBackground);R&&y.addRule(`.monaco-editor .token-inspect-widget { background-color: ${R}; }`)})}),define(ne[2644],re([1,0,17,47,76,27,34,21,38,193,50,14,2,1991,199,8,83,19,18,350,116,88]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryContribution=void 0;let n=class Qr extends o.Disposable{constructor(g,d,m,b,E,y,T,R,O,x){super();this.telemetryService=g,this.contextService=d,this.environmentService=T;const{filesToOpenOrCreate:F,filesToDiff:L}=T,M=O.getActivePaneComposite(0);g.publicLog2("workspaceLoad",{userAgent:navigator.userAgent,windowSize:{innerHeight:window.innerHeight,innerWidth:window.innerWidth,outerHeight:window.outerHeight,outerWidth:window.outerWidth},emptyWorkbench:d.getWorkbenchState()===1,"workbench.filesToOpenOrCreate":F&&F.length||0,"workbench.filesToDiff":L&&L.length||0,customKeybindingsCount:E.customKeybindingsCount(),theme:y.getColorTheme().id,language:C.language,pinnedViewlets:O.getPinnedPaneCompositeIds(0),restoredViewlet:M?M.getId():void 0,restoredEditors:b.visibleEditors.length,startupKind:m.startupKind}),this._register(new c.default(g)),this._register((0,i.configurationTelemetry)(g,R)),this._register(x.files.onDidResolve(N=>this.onTextFileModelResolved(N))),this._register(x.files.onDidSave(N=>this.onTextFileModelSaved(N))),this._register(m.onDidShutdown(()=>this.dispose()))}onTextFileModelResolved(g){const d=this.getTypeIfSettings(g.model.resource);d?this.telemetryService.publicLog2("settingsRead",{settingsType:d}):this.telemetryService.publicLog2("fileGet",this.getTelemetryData(g.model.resource,g.reason))}onTextFileModelSaved(g){const d=this.getTypeIfSettings(g.model.resource);d?this.telemetryService.publicLog2("settingsWritten",{settingsType:d}):this.telemetryService.publicLog2("filePUT",this.getTelemetryData(g.model.resource,g.reason))}getTypeIfSettings(g){if((0,l.extname)(g)!==".json")return"";if((0,l.isEqual)(g,this.environmentService.settingsResource))return"global-settings";if((0,l.isEqual)(g,this.environmentService.keybindingsResource))return"keybindings";if((0,l.isEqualOrParent)(g,this.environmentService.snippetsHome))return"snippets";const d=this.contextService.getWorkspace().folders;for(const m of d)if((0,l.isEqualOrParent)(g,m.toResource(".vscode"))){const b=(0,l.basename)(g);if(Qr.ALLOWLIST_WORKSPACE_JSON.indexOf(b)>-1)return`.vscode/${b}`}return""}getTelemetryData(g,d){let m=(0,l.extname)(g);const b=m.indexOf("?");m=b!==-1?m.substr(0,b):m;const E=(0,l.basename)(g),y=g.scheme===r.Schemas.file?g.fsPath:g.path,T={mimeType:(0,p.getMimeTypes)(g).join(", "),ext:m,path:(0,u.hash)(y),reason:d,allowlistedjson:void 0};return m===".json"&&Qr.ALLOWLIST_JSON.indexOf(E)>-1&&(T.allowlistedjson=E),T}};n.ALLOWLIST_JSON=["package.json","package-lock.json","tsconfig.json","jsconfig.json","bower.json",".eslintrc.json","tslint.json","composer.json"],n.ALLOWLIST_WORKSPACE_JSON=["settings.json","extensions.json","tasks.json","launch.json"],n=Ee([W(0,A.ITelemetryService),W(1,k.IWorkspaceContextService),W(2,_.ILifecycleService),W(3,D.IEditorService),W(4,I.IKeybindingService),W(5,w.IWorkbenchThemeService),W(6,v.IWorkbenchEnvironmentService),W(7,S.IConfigurationService),W(8,a.IPaneCompositePartService),W(9,s.ITextFileService)],n),e.TelemetryContribution=n,t.Registry.as(f.Extensions.Workbench).registerWorkbenchContribution(n,3)}),define(ne[2645],re([1,0,9,42,28,5,193,21,44,429,86,900,66,23,19,18,29]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class l{constructor(u){this._theme=u,this._cache=Object.create(null),this._defaultColor="#000000";for(let a=0,n=this._theme.tokenColors.length;a<n;a++){let h=this._theme.tokenColors[a];h.scope||(this._defaultColor=h.settings.foreground)}}_generateExplanation(u,a){return`${u}: ${o.Color.Format.CSS.formatHexA(a,!0).toUpperCase()}`}explainTokenColor(u,a){let n=this._findMatchingThemeRule(u);if(!n){let g=o.Color.fromHex(this._defaultColor);if(!a.equals(g))throw new Error(`[${this._theme.label}]: Unexpected color ${o.Color.Format.CSS.formatHexA(a)} for ${u}. Expected default ${o.Color.Format.CSS.formatHexA(g)}`);return this._generateExplanation("default",a)}let h=o.Color.fromHex(n.settings.foreground);if(!a.equals(h))throw new Error(`[${this._theme.label}]: Unexpected color ${o.Color.Format.CSS.formatHexA(a)} for ${u}. Expected ${o.Color.Format.CSS.formatHexA(h)} coming in from ${n.rawSelector}`);return this._generateExplanation(n.rawSelector,a)}_findMatchingThemeRule(u){return this._cache[u]||(this._cache[u]=(0,C.findMatchingThemeRule)(this._theme,u.split(" "))),this._cache[u]}}let r=class{constructor(u,a,n){this.languageService=u,this.themeService=a,this.textMateService=n}_themedTokenize(u,a){let n=v.TokenizationRegistry.getColorMap(),h=null,g=[],d=0;for(let m=0,b=a.length;m<b;m++){let E=a[m],y=u.tokenizeLine2(E,h);for(let T=0,R=y.tokens.length>>>1;T<R;T++){let O=y.tokens[T<<1],x=y.tokens[(T<<1)+1],F=T+1<R?y.tokens[T+1<<1]:E.length,L=E.substring(O,F),M=v.TokenMetadata.getForeground(x);g[d++]={text:L,color:n[M]}}h=y.ruleStack}return g}_tokenize(u,a){let n=null,h=[],g=0;for(let d=0,m=a.length;d<m;d++){let b=a[d],E=u.tokenizeLine(b,n),y=null;for(let T=0,R=E.tokens.length;T<R;T++){let O=E.tokens[T],x=b.substring(O.startIndex,O.endIndex),F=O.scopes.join(" ");y===F?h[g-1].c+=x:(y=F,h[g++]={c:x,t:F,r:{dark_plus:void 0,light_plus:void 0,dark_vs:void 0,light_vs:void 0,hc_black:void 0}})}n=E.ruleStack}return h}async _getThemesResult(u,a){let n=this.themeService.getColorTheme(),h=b=>{let E="vscode-theme-defaults-themes-",y=b.indexOf(E);if(y!==-1)return b.substring(y+E.length,b.length-5)},g={},m=(await this.themeService.getColorThemes()).filter(b=>!!h(b.id));for(let b of m){let E=b.id;if(await this.themeService.setColorTheme(E,void 0)){let T=h(E);g[T]={document:new l(this.themeService.getColorTheme()),tokens:this._themedTokenize(u,a)}}}return await this.themeService.setColorTheme(n.id,void 0),g}_enrichResult(u,a){let n={},h=Object.keys(a);for(const g of h)n[g]=0;for(let g=0,d=u.length;g<d;g++){let m=u[g];for(const b of h){let E=a[b].tokens[n[b]];E.text=E.text.substr(m.c.length),m.r[b]=a[b].document.explainTokenColor(m.t,E.color),E.text.length===0&&n[b]++}}}captureSyntaxTokens(u,a){const n=this.languageService.guessLanguageIdByFilepathOrFirstLine(t.URI.file(u));return this.textMateService.createGrammar(n).then(h=>{if(!h)return[];let g=(0,s.splitLines)(a),d=this._tokenize(h,g);return this._getThemesResult(h,g).then(m=>(this._enrichResult(d,m),d.filter(b=>b.c.length>0)))})}};r=Ee([W(0,f.ILanguageService),W(1,k.IWorkbenchThemeService),W(2,w.ITextMateService)],r),_.CommandsRegistry.registerCommand("_workbench.captureSyntaxTokens",function(p,u){let a=n=>{let h=p.get(c.IFileService),g=(0,i.basename)(n),d=p.get(A.IInstantiationService).createInstance(r);return h.readFile(n).then(m=>d.captureSyntaxTokens(g,m.value.toString()))};if(u)return a(u);{const n=p.get(D.IEditorService),h=n.activeEditor?I.EditorResourceAccessor.getCanonicalUri(n.activeEditor,{filterByScheme:S.Schemas.file}):null;h?a(h).then(g=>{console.log(g)}):console.log("No file editor active")}})}),define(ne[2646],re([1,0,1899,10,66,22,6,19,13,15,86,532,387,42,31,26,899,193,2,8,2576,296,67,2577]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractTextMateService=void 0;let g=class Jr extends r.Disposable{constructor(b,E,y,T,R,O,x){super();this._languageService=b,this._themeService=E,this._extensionResourceLoaderService=y,this._notificationService=T,this._logService=R,this._configurationService=O,this._progressService=x,this._onDidEncounterLanguage=this._register(new k.Emitter),this.onDidEncounterLanguage=this._onDidEncounterLanguage.event,this._vscodeOniguruma=null,this._styleElement=f.createStyleSheet(),this._styleElement.className="vscode-tokens-styles",this._createdModes=[],this._encounteredLanguages=[],this._debugMode=!1,this._debugModePrintFunc=()=>{},this._grammarDefinitions=null,this._grammarFactory=null,this._tokenizersRegistrations=[],this._currentTheme=null,this._currentTokenColorMap=null,s.grammarsExtPoint.setHandler(F=>{this._grammarDefinitions=null,this._grammarFactory&&(this._grammarFactory.dispose(),this._grammarFactory=null,this._onDidDisposeGrammarFactory()),this._tokenizersRegistrations=(0,r.dispose)(this._tokenizersRegistrations),this._grammarDefinitions=[];for(const L of F){const M=L.value;for(const N of M){if(!this._validateGrammarExtensionPoint(L.description.extensionLocation,N,L.collector))continue;const B=D.joinPath(L.description.extensionLocation,N.path),P=Object.create(null);if(N.embeddedLanguages){let U=Object.keys(N.embeddedLanguages);for(let H=0,K=U.length;H<K;H++){let G=U[H],q=N.embeddedLanguages[G];typeof q=="string"&&this._languageService.isRegisteredLanguageId(q)&&(P[G]=this._languageService.languageIdCodec.encodeLanguageId(q))}}const V=Object.create(null);if(N.tokenTypes){const U=Object.keys(N.tokenTypes);for(const H of U)switch(N.tokenTypes[H]){case"string":V[H]=2;break;case"other":V[H]=0;break;case"comment":V[H]=1;break}}let z=null;N.language&&this._languageService.isRegisteredLanguageId(N.language)&&(z=N.language),this._grammarDefinitions.push({location:B,language:z||void 0,scopeName:N.scopeName,embeddedLanguages:P,tokenTypes:V,injectTo:N.injectTo}),z&&this._tokenizersRegistrations.push(v.TokenizationRegistry.registerFactory(z,this._createFactory(z)))}}for(const L of this._createdModes)v.TokenizationRegistry.getOrCreate(L)}),this._updateTheme(this._grammarFactory,this._themeService.getColorTheme(),!0),this._register(this._themeService.onDidColorThemeChange(()=>{this._updateTheme(this._grammarFactory,this._themeService.getColorTheme(),!1)})),this._languageService.onDidEncounterLanguage(F=>{this._createdModes.push(F)})}startDebugMode(b,E){if(this._debugMode){this._notificationService.error(t.localize(0,null));return}this._debugModePrintFunc=b,this._debugMode=!0,this._debugMode&&this._progressService.withProgress({location:15,buttons:[t.localize(1,null)]},y=>(y.report({message:t.localize(2,null)}),this._getVSCodeOniguruma().then(T=>(T.setDefaultDebugCall(!0),y.report({message:t.localize(3,null)}),new Promise((R,O)=>{})))),y=>{this._getVSCodeOniguruma().then(T=>{this._debugModePrintFunc=()=>{},this._debugMode=!1,T.setDefaultDebugCall(!1),E()})})}_canCreateGrammarFactory(){return!!this._grammarDefinitions}async _getOrCreateGrammarFactory(){if(this._grammarFactory)return this._grammarFactory;const[b,E]=await Promise.all([new Promise((T,R)=>{Q(["vscode-textmate"],T,R)}),this._getVSCodeOniguruma()]),y=Promise.resolve({createOnigScanner:T=>E.createOnigScanner(T),createOnigString:T=>E.createOnigString(T)});return this._grammarFactory?this._grammarFactory:(this._grammarFactory=new u.TMGrammarFactory({logTrace:T=>this._logService.trace(T),logError:(T,R)=>this._logService.error(T,R),readFile:T=>this._extensionResourceLoaderService.readExtensionResource(T)},this._grammarDefinitions||[],b,y),this._onDidCreateGrammarFactory(this._grammarDefinitions||[]),this._updateTheme(this._grammarFactory,this._themeService.getColorTheme(),!0),this._grammarFactory)}_createFactory(b){return{createTokenizationSupport:async()=>{if(!this._languageService.isRegisteredLanguageId(b)||!this._canCreateGrammarFactory())return null;const E=this._languageService.languageIdCodec.encodeLanguageId(b);try{const y=await this._getOrCreateGrammarFactory();if(!y.has(b))return null;const T=await y.createGrammar(b,E);if(!T.grammar)return null;const R=new h.TMTokenization(T.grammar,T.initialState,T.containsEmbeddedLanguages);return R.onDidEncounterLanguage(O=>{if(!this._encounteredLanguages[O]){const x=this._languageService.languageIdCodec.decodeLanguageId(O);this._encounteredLanguages[O]=!0,this._onDidEncounterLanguage.fire(x)}}),new d(b,E,R,this._configurationService)}catch(y){return y.message&&y.message===u.missingTMGrammarErrorMessage||(0,A.onUnexpectedError)(y),null}}}}static _toColorMap(b){let E=[null];for(let y=1,T=b.length;y<T;y++)E[y]=_.Color.fromHex(b[y]);return E}_updateTheme(b,E,y){!y&&this._currentTheme&&this._currentTokenColorMap&&Jr.equalsTokenRules(this._currentTheme.settings,E.tokenColors)&&(0,w.equals)(this._currentTokenColorMap,E.tokenColorMap)||(this._currentTheme={name:E.label,settings:E.tokenColors},this._currentTokenColorMap=E.tokenColorMap,this._doUpdateTheme(b,this._currentTheme,this._currentTokenColorMap))}_doUpdateTheme(b,E,y){b?.setTheme(E,y);let T=Jr._toColorMap(y),R=(0,o.generateTokensCSSForColorMap)(T);this._styleElement.textContent=R,v.TokenizationRegistry.setColorMap(T)}static equalsTokenRules(b,E){if(!E||!b||E.length!==b.length)return!1;for(let y=E.length-1;y>=0;y--){let T=E[y],R=b[y];if(T.scope!==R.scope)return!1;let O=T.settings,x=R.settings;if(O&&x){if(O.fontStyle!==x.fontStyle||O.foreground!==x.foreground||O.background!==x.background)return!1}else if(!O||!x)return!1}return!0}_validateGrammarExtensionPoint(b,E,y){if(E.language&&(typeof E.language!="string"||!this._languageService.isRegisteredLanguageId(E.language)))return y.error(t.localize(4,null,s.grammarsExtPoint.name,String(E.language))),!1;if(!E.scopeName||typeof E.scopeName!="string")return y.error(t.localize(5,null,s.grammarsExtPoint.name,String(E.scopeName))),!1;if(!E.path||typeof E.path!="string")return y.error(t.localize(6,null,s.grammarsExtPoint.name,String(E.path))),!1;if(E.injectTo&&(!Array.isArray(E.injectTo)||E.injectTo.some(R=>typeof R!="string")))return y.error(t.localize(7,null,s.grammarsExtPoint.name,JSON.stringify(E.injectTo))),!1;if(E.embeddedLanguages&&!I.isObject(E.embeddedLanguages))return y.error(t.localize(8,null,s.grammarsExtPoint.name,JSON.stringify(E.embeddedLanguages))),!1;if(E.tokenTypes&&!I.isObject(E.tokenTypes))return y.error(t.localize(9,null,s.grammarsExtPoint.name,JSON.stringify(E.tokenTypes))),!1;const T=D.joinPath(b,E.path);return D.isEqualOrParent(T,b)||y.warn(t.localize(10,null,s.grammarsExtPoint.name,T.path,b.path)),!0}async createGrammar(b){if(!this._languageService.isRegisteredLanguageId(b))return null;const E=await this._getOrCreateGrammarFactory();if(!E.has(b))return null;const y=this._languageService.languageIdCodec.encodeLanguageId(b),{grammar:T}=await E.createGrammar(b,y);return T}_onDidCreateGrammarFactory(b){}_onDidDisposeGrammarFactory(){}_getVSCodeOniguruma(){return this._vscodeOniguruma||(this._vscodeOniguruma=this._doGetVSCodeOniguruma()),this._vscodeOniguruma}async _doGetVSCodeOniguruma(){const[b,E]=await Promise.all([new Promise((T,R)=>{Q(["vscode-oniguruma"],T,R)}),this._loadVSCodeOnigurumWASM()]),y={data:E,print:T=>{this._debugModePrintFunc(T)}};return await b.loadWASM(y),b}};g=Ee([W(0,c.ILanguageService),W(1,l.IWorkbenchThemeService),W(2,a.IExtensionResourceLoaderService),W(3,S.INotificationService),W(4,i.ILogService),W(5,p.IConfigurationService),W(6,n.IProgressService)],g),e.AbstractTextMateService=g;let d=class{constructor(b,E,y,T){this._configurationService=T,this._languageId=b,this._encodedLanguageId=E,this._actual=y,this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}),this._configurationService.onDidChangeConfiguration(R=>{R.affectsConfiguration("editor.maxTokenizationLineLength")&&(this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}))})}getInitialState(){return this._actual.getInitialState()}tokenize(b,E,y){throw new Error("Not supported!")}tokenizeEncoded(b,E,y){return b.length>=this._maxTokenizationLineLength?(0,C.nullTokenizeEncoded)(this._encodedLanguageId,y):this._actual.tokenizeEncoded(b,E,y)}};d=Ee([W(3,p.IConfigurationService)],d)}),define(ne[2647],re([1,0,429,35,2646,42,193,26,31,8,737,52,2,9,702,296,50,67,18,124]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextMateService=e.TextMateWorkerHost=void 0;const u=!1;class a extends o.Disposable{constructor(d,m,b){super();this._pendingChanges=[],this._worker=d,this._languageIdCodec=m,this._model=b,this._isSynced=!1,this._register(this._model.onDidChangeAttached(()=>this._onDidChangeAttached())),this._onDidChangeAttached(),this._register(this._model.onDidChangeContent(E=>{this._isSynced&&(this._worker.acceptModelChanged(this._model.uri.toString(),E),this._pendingChanges.push(E))})),this._register(this._model.onDidChangeLanguage(E=>{if(this._isSynced){const y=this._model.getLanguageId(),T=this._languageIdCodec.encodeLanguageId(y);this._worker.acceptModelLanguageChanged(this._model.uri.toString(),y,T)}}))}_onDidChangeAttached(){this._model.isAttachedToEditor()?this._isSynced||this._beginSync():this._isSynced&&this._endSync()}_beginSync(){this._isSynced=!0;const d=this._model.getLanguageId(),m=this._languageIdCodec.encodeLanguageId(d);this._worker.acceptNewModel({uri:this._model.uri,versionId:this._model.getVersionId(),lines:this._model.getLinesContent(),EOL:this._model.getEOL(),languageId:d,encodedLanguageId:m})}_endSync(){this._isSynced=!1,this._worker.acceptRemovedModel(this._model.uri.toString())}dispose(){super.dispose(),this._endSync()}_confirm(d){for(;this._pendingChanges.length>0&&this._pendingChanges[0].versionId<=d;)this._pendingChanges.shift()}setTokens(d,m){this._confirm(d);const b=i.ContiguousMultilineTokensBuilder.deserialize(new Uint8Array(m));for(let E=0;E<this._pendingChanges.length;E++){const y=this._pendingChanges[E];for(let T=0;T<b.length;T++)for(let R=0;R<y.changes.length;R++)b[T].applyEdit(y.changes[R].range,y.changes[R].text)}this._model.setTokens(b)}}let n=class{constructor(d,m){this.textMateService=d,this._extensionResourceLoaderService=m}async readFile(d){const m=c.URI.revive(d);return this._extensionResourceLoaderService.readExtensionResource(m)}async setTokens(d,m,b){const E=c.URI.revive(d);this.textMateService.setTokens(E,m,b)}};n=Ee([W(1,S.IExtensionResourceLoaderService)],n),e.TextMateWorkerHost=n;let h=class extends _.AbstractTextMateService{constructor(d,m,b,E,y,T,R,O,x,F){super(d,m,b,E,y,T,R);this._modelService=O,this._environmentService=x,this._languageConfigurationService=F,this._worker=null,this._workerProxy=null,this._tokenizers=Object.create(null),this._register(this._modelService.onModelAdded(L=>this._onModelAdded(L))),this._register(this._modelService.onModelRemoved(L=>this._onModelRemoved(L))),this._modelService.getModels().forEach(L=>this._onModelAdded(L))}_onModelAdded(d){if(!this._workerProxy||d.isTooLargeForSyncing())return;const m=d.uri.toString(),b=new a(this._workerProxy,this._languageService.languageIdCodec,d);this._tokenizers[m]=b}_onModelRemoved(d){const m=d.uri.toString();this._tokenizers[m]&&(this._tokenizers[m].dispose(),delete this._tokenizers[m])}async _loadVSCodeOnigurumWASM(){return await fetch(this._environmentService.isBuilt?r.FileAccess.asBrowserUri("../../../../../../node_modules.asar.unpacked/vscode-oniguruma/release/onig.wasm",Q).toString(!0):r.FileAccess.asBrowserUri("../../../../../../node_modules/vscode-oniguruma/release/onig.wasm",Q).toString(!0))}_onDidCreateGrammarFactory(d){if(this._killWorker(),u){const m=new n(this,this._extensionResourceLoaderService),b=(0,v.createWebWorker)(this._modelService,this._languageConfigurationService,{createData:{grammarDefinitions:d},label:"textMateWorker",moduleId:"vs/workbench/services/textMate/browser/textMateWorker",host:m});this._worker=b,b.getProxy().then(E=>{this._worker===b&&(this._workerProxy=E,this._currentTheme&&this._currentTokenColorMap&&this._workerProxy.acceptTheme(this._currentTheme,this._currentTokenColorMap),this._modelService.getModels().forEach(y=>this._onModelAdded(y)))})}}_doUpdateTheme(d,m,b){super._doUpdateTheme(d,m,b),this._currentTheme&&this._currentTokenColorMap&&this._workerProxy&&this._workerProxy.acceptTheme(this._currentTheme,this._currentTokenColorMap)}_onDidDisposeGrammarFactory(){this._killWorker()}_killWorker(){for(let d of Object.keys(this._tokenizers))this._tokenizers[d].dispose();this._tokenizers=Object.create(null),this._worker&&(this._worker.dispose(),this._worker=null),this._workerProxy=null}setTokens(d,m,b){const E=d.toString();!this._tokenizers[E]||this._tokenizers[E].setTokens(m,b)}};h=Ee([W(0,A.ILanguageService),W(1,k.IWorkbenchThemeService),W(2,S.IExtensionResourceLoaderService),W(3,D.INotificationService),W(4,I.ILogService),W(5,w.IConfigurationService),W(6,l.IProgressService),W(7,C.IModelService),W(8,s.IWorkbenchEnvironmentService),W(9,p.ILanguageConfigurationService)],h),e.TextMateService=h,(0,f.registerSingleton)(t.ITextMateService,h)}),define(ne[917],re([1,0,1904,48,19,118,193,391,10]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileIconThemeLoader=e.FileIconThemeData=void 0;class w{constructor(i,S,s){this.id=i,this.label=S,this.settingsId=s,this.isLoaded=!1,this.hasFileIcons=!1,this.hasFolderIcons=!1,this.hidesExplorerArrows=!1}ensureLoaded(i){return this.isLoaded?Promise.resolve(this.styleSheetContent):this.load(i)}reload(i){return this.load(i)}load(i){return i.load(this)}static fromExtensionTheme(i,S,s){const l=s.extensionId+"-"+i.id,r=i.label||f.basename(i.path),p=i.id,u=new w(l,r,p);return u.description=i.description,u.location=S,u.extensionData=s,u.watch=i._watch,u.isLoaded=!1,u}static get noIconTheme(){let i=w._noIconTheme;return i||(i=w._noIconTheme=new w("","",null),i.hasFileIcons=!1,i.hasFolderIcons=!1,i.hidesExplorerArrows=!1,i.isLoaded=!0,i.extensionData=void 0,i.watch=!1),i}static createUnloadedTheme(i){const S=new w(i,"","__"+i);return S.isLoaded=!1,S.hasFileIcons=!1,S.hasFolderIcons=!1,S.hidesExplorerArrows=!1,S.extensionData=void 0,S.watch=!1,S}static fromStorageData(i){const S=i.get(w.STORAGE_KEY,0);if(!!S)try{const s=JSON.parse(S),l=new w("","",null);for(const r in s)switch(r){case"id":case"label":case"description":case"settingsId":case"styleSheetContent":case"hasFileIcons":case"hidesExplorerArrows":case"hasFolderIcons":case"watch":l[r]=s[r];break;case"location":break;case"extensionData":l.extensionData=k.ExtensionData.fromJSONObject(s.extensionData);break}return l}catch{return}}toStorage(i){const S=JSON.stringify({id:this.id,label:this.label,description:this.description,settingsId:this.settingsId,styleSheetContent:this.styleSheetContent,hasFileIcons:this.hasFileIcons,hasFolderIcons:this.hasFolderIcons,hidesExplorerArrows:this.hidesExplorerArrows,extensionData:k.ExtensionData.toJSONObject(this.extensionData),watch:this.watch});i.store(w.STORAGE_KEY,S,0,1)}}e.FileIconThemeData=w,w.STORAGE_KEY="iconThemeData",w._noIconTheme=null;class v{constructor(i,S){this.fileService=i,this.languageService=S}load(i){return i.location?this.loadIconThemeDocument(i.location).then(S=>{const s=this.processIconThemeDocument(i.id,i.location,S);return i.styleSheetContent=s.content,i.hasFileIcons=s.hasFileIcons,i.hasFolderIcons=s.hasFolderIcons,i.hidesExplorerArrows=s.hidesExplorerArrows,i.isLoaded=!0,i.styleSheetContent}):Promise.resolve(i.styleSheetContent)}loadIconThemeDocument(i){return this.fileService.readExtensionResource(i).then(S=>{const s=[],l=A.parse(S,s);return s.length>0?Promise.reject(new Error(t.localize(0,null,s.map(r=>(0,D.getParseErrorMessage)(r.error)).join(", ")))):A.getNodeType(l)!=="object"?Promise.reject(new Error(t.localize(1,null))):Promise.resolve(l)})}processIconThemeDocument(i,S,s){const l={content:"",hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!!s.hidesExplorerArrows};let r=!1;if(!s.iconDefinitions)return l;const p={},u={},a=_.dirname(S);function n(E){return _.joinPath(a,E)}function h(E,y){function T(R,O){if(O){let x=p[O];x||(x=p[O]=[]),x.push(R)}}if(E){let R=".show-file-icons";y&&(R=y+" "+R);const O=".monaco-tl-twistie.collapsible:not(.collapsed) + .monaco-tl-contents";E.folder&&(T(`${R} .folder-icon::before`,E.folder),l.hasFolderIcons=!0),E.folderExpanded&&(T(`${R} ${O} .folder-icon::before`,E.folderExpanded),l.hasFolderIcons=!0);const x=E.rootFolder||E.folder,F=E.rootFolderExpanded||E.folderExpanded;x&&(T(`${R} .rootfolder-icon::before`,x),l.hasFolderIcons=!0),F&&(T(`${R} ${O} .rootfolder-icon::before`,F),l.hasFolderIcons=!0),E.file&&(T(`${R} .file-icon::before`,E.file),l.hasFileIcons=!0);const L=E.folderNames;if(L)for(const V in L){const z=[],U=C(V.toLowerCase(),z);z.push(`.${o(U)}-name-folder-icon`),T(`${R} ${z.join("")}.folder-icon::before`,L[V]),l.hasFolderIcons=!0}const M=E.folderNamesExpanded;if(M)for(const V in M){const z=[],U=C(V.toLowerCase(),z);z.push(`.${o(U)}-name-folder-icon`),T(`${R} ${O} ${z.join("")}.folder-icon::before`,M[V]),l.hasFolderIcons=!0}const N=E.languageIds;if(N){!N.jsonc&&N.json&&(N.jsonc=N.json);for(const V in N)T(`${R} .${o(V)}-lang-file-icon.file-icon::before`,N[V]),l.hasFileIcons=!0,r=!0,u[V]=!0}const B=E.fileExtensions;if(B)for(const V in B){const z=[],H=C(V.toLowerCase(),z).split(".");if(H.length){for(let K=0;K<H.length;K++)z.push(`.${o(H.slice(K).join("."))}-ext-file-icon`);z.push(".ext-file-icon")}T(`${R} ${z.join("")}.file-icon::before`,B[V]),l.hasFileIcons=!0,r=!0}const P=E.fileNames;if(P)for(const V in P){const z=[],U=C(V.toLowerCase(),z);z.push(`.${o(U)}-name-file-icon`),z.push(".name-file-icon");const H=U.split(".");if(H.length){for(let K=1;K<H.length;K++)z.push(`.${o(H.slice(K).join("."))}-ext-file-icon`);z.push(".ext-file-icon")}T(`${R} ${z.join("")}.file-icon::before`,P[V]),l.hasFileIcons=!0,r=!0}}}if(h(s),h(s.light,".vs"),h(s.highContrast,".hc-black"),h(s.highContrast,".hc-light"),!l.hasFileIcons&&!l.hasFolderIcons)return l;const g=s.showLanguageModeIcons===!0||r&&s.showLanguageModeIcons!==!1,d=[],m=s.fonts,b=new Map;if(Array.isArray(m)){const E=m[0].size||"150%";m.forEach(y=>{const T=y.src.map(R=>`${(0,I.asCSSUrl)(n(R.path))} format('${R.format}')`).join(", ");d.push(`@font-face { src: ${T}; font-family: '${y.id}'; font-weight: ${y.weight}; font-style: ${y.style}; font-display: block; }`),y.size!==void 0&&y.size!==E&&b.set(y.id,y.size)}),d.push(`.show-file-icons .file-icon::before, .show-file-icons .folder-icon::before, .show-file-icons .rootfolder-icon::before { font-family: '${m[0].id}'; font-size: ${E}; }`)}for(const E in p){const y=p[E],T=s.iconDefinitions[E];if(T){if(T.iconPath)d.push(`${y.join(", ")} { content: ' '; background-image: ${(0,I.asCSSUrl)(n(T.iconPath))}; }`);else if(T.fontCharacter||T.fontColor){const R=[];T.fontColor&&R.push(`color: ${T.fontColor};`),T.fontCharacter&&R.push(`content: '${T.fontCharacter}';`);const O=T.fontSize??(T.fontId?b.get(T.fontId):void 0);O&&R.push(`font-size: ${O};`),T.fontId&&R.push(`font-family: ${T.fontId};`),g&&R.push("background-image: unset;"),d.push(`${y.join(", ")} { ${R.join(" ")} }`)}}}if(g){for(const E of this.languageService.getRegisteredLanguageIds())if(!u[E]){const y=this.languageService.getIcon(E);if(y){const T=`.show-file-icons .${o(E)}-lang-file-icon.file-icon::before`;d.push(`${T} { content: ' '; background-image: ${(0,I.asCSSUrl)(y.dark)}; }`),d.push(`.vs ${T} { content: ' '; background-image: ${(0,I.asCSSUrl)(y.light)}; }`)}}}return l.content=d.join(` `),l}}e.FileIconThemeLoader=v;function C(c,i){const S=c.lastIndexOf("/");if(S>=0){const s=c.substring(0,S);return i.push(`.${o(s)}-name-dir-icon`),c.substring(S+1)}return c}function o(c){return c=c.replace(/[\11\12\14\15\40]/g,"/"),window.CSS.escape(c)}}),define(ne[2648],re([1,0,48,118,66,193,2641,1908,13,19,32,12,17,391,2638,404,2640,127]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorThemeData=void 0;let r=o.Registry.as(v.Extensions.ColorContribution),p=(0,S.getTokenClassificationRegistry)();const u={comments:["comment","punctuation.definition.comment"],strings:["string","meta.embedded.assembly"],keywords:["keyword - keyword.operator","keyword.control","storage","storage.type"],numbers:["constant.numeric"],types:["entity.name.type","entity.name.class","support.type","support.class"],functions:["entity.name.function","support.function"],variables:["variable","entity.name.variable"]};class a{constructor(M,N,B){this.themeTokenColors=[],this.customTokenColors=[],this.colorMap={},this.customColorMap={},this.semanticTokenRules=[],this.customSemanticTokenRules=[],this.textMateThemingRules=void 0,this.tokenColorIndex=void 0,this.id=M,this.label=N,this.settingsId=B,this.isLoaded=!1}get semanticHighlighting(){return this.customSemanticHighlighting!==void 0?this.customSemanticHighlighting:this.customSemanticHighlightingDeprecated!==void 0?this.customSemanticHighlightingDeprecated:!!this.themeSemanticHighlighting}get tokenColors(){if(!this.textMateThemingRules){let V=function(z){z.scope&&z.settings&&(z.scope==="token.info-token"&&(P=!0),M.push({scope:z.scope,settings:{foreground:x(z.settings.foreground),background:x(z.settings.background),fontStyle:z.settings.fontStyle}}))};const M=[],N=this.getColor(v.editorForeground)||this.getDefault(v.editorForeground),B=this.getColor(v.editorBackground)||this.getDefault(v.editorBackground);M.push({settings:{foreground:x(N),background:x(B)}});let P=!1;this.themeTokenColors.forEach(V),this.customTokenColors.forEach(V),P||d[this.type].forEach(V),this.textMateThemingRules=M}return this.textMateThemingRules}getColor(M,N){let B=this.customColorMap[M];return B||(B=this.colorMap[M],N!==!1&&I.isUndefined(B)&&(B=this.getDefault(M)),B)}getTokenStyle(M,N,B,P=!0,V={}){let z={foreground:void 0,bold:void 0,underline:void 0,strikethrough:void 0,italic:void 0},U={foreground:-1,bold:-1,underline:-1,strikethrough:-1,italic:-1};function H(q,Z,j){Z.foreground&&U.foreground<=q&&(U.foreground=q,z.foreground=Z.foreground,V.foreground=j);for(let X of["bold","underline","strikethrough","italic"]){const Y=X,$=Z[Y];$!==void 0&&U[Y]<=q&&(U[Y]=q,z[Y]=$,V[Y]=j)}}function K(q){const Z=q.selector.match(M,N,B);Z>=0&&H(Z,q.style,q)}this.semanticTokenRules.forEach(K),this.customSemanticTokenRules.forEach(K);let G=!1;for(let q in U){const Z=q;U[Z]===-1?G=!0:U[Z]=Number.MAX_VALUE}if(G)for(const q of p.getTokenStylingDefaultRules()){const Z=q.selector.match(M,N,B);if(Z>=0){let j;if(q.defaults.scopesToProbe&&(j=this.resolveScopes(q.defaults.scopesToProbe),j&&H(Z,j,q.defaults.scopesToProbe)),!j&&P!==!1){const X=q.defaults[this.type];j=this.resolveTokenStyleValue(X),j&&H(Z,j,X)}}}return S.TokenStyle.fromData(z)}resolveTokenStyleValue(M){if(M!==void 0){if(typeof M=="string"){const{type:N,modifiers:B,language:P}=(0,S.parseClassifierString)(M,"");return this.getTokenStyle(N,B,P)}else if(typeof M=="object")return M}}getTokenColorIndex(){if(!this.tokenColorIndex){const M=new O;this.tokenColors.forEach(N=>{M.add(N.settings.foreground),M.add(N.settings.background)}),this.semanticTokenRules.forEach(N=>M.add(N.style.foreground)),p.getTokenStylingDefaultRules().forEach(N=>{const B=N.defaults[this.type];B&&typeof B=="object"&&M.add(B.foreground)}),this.customSemanticTokenRules.forEach(N=>M.add(N.style.foreground)),this.tokenColorIndex=M}return this.tokenColorIndex}get tokenColorMap(){return this.getTokenColorIndex().asArray()}getTokenStyleMetadata(M,N,B,P=!0,V={}){const{type:z,language:U}=(0,S.parseClassifierString)(M,B);let H=this.getTokenStyle(z,N,U,P,V);if(!!H)return{foreground:this.getTokenColorIndex().get(H.foreground),bold:H.bold,underline:H.underline,strikethrough:H.strikethrough,italic:H.italic}}getTokenStylingRuleScope(M){if(this.customSemanticTokenRules.indexOf(M)!==-1)return"setting";if(this.semanticTokenRules.indexOf(M)!==-1)return"theme"}getDefault(M){return r.resolveDefaultColor(M,this)}resolveScopes(M,N){this.themeTokenScopeMatchers||(this.themeTokenScopeMatchers=this.themeTokenColors.map(y)),this.customTokenScopeMatchers||(this.customTokenScopeMatchers=this.customTokenColors.map(y));for(let B of M){let G=function(q,Z){for(let j=0;j<q.length;j++){const X=q[j](B);if(X>=0){const Y=Z[j],$=Z[j].settings;X>=z&&$.foreground&&(P=$.foreground,z=X,K=Y),X>=U&&I.isString($.fontStyle)&&(V=$.fontStyle,U=X,H=Y)}}},P,V,z=-1,U=-1,H,K;if(G(this.themeTokenScopeMatchers,this.themeTokenColors),G(this.customTokenScopeMatchers,this.customTokenColors),P!==void 0||V!==void 0)return N&&(N.foreground=K,N.bold=N.italic=N.underline=N.strikethrough=H,N.scope=B),S.TokenStyle.fromSettings(P,V)}}defines(M){return this.customColorMap.hasOwnProperty(M)||this.colorMap.hasOwnProperty(M)}setCustomizations(M){this.setCustomColors(M.colorCustomizations),this.setCustomTokenColors(M.tokenColorCustomizations),this.setCustomSemanticTokenColors(M.semanticTokenColorCustomizations)}setCustomColors(M){this.customColorMap={},this.overwriteCustomColors(M);const N=this.getThemeSpecificColors(M);I.isObject(N)&&this.overwriteCustomColors(N),this.tokenColorIndex=void 0,this.textMateThemingRules=void 0,this.customTokenScopeMatchers=void 0}overwriteCustomColors(M){for(let N in M){let B=M[N];typeof B=="string"&&(this.customColorMap[N]=_.Color.fromHex(B))}}setCustomTokenColors(M){this.customTokenColors=[],this.customSemanticHighlightingDeprecated=void 0,this.addCustomTokenColors(M);const N=this.getThemeSpecificColors(M);I.isObject(N)&&this.addCustomTokenColors(N),this.tokenColorIndex=void 0,this.textMateThemingRules=void 0,this.customTokenScopeMatchers=void 0}setCustomSemanticTokenColors(M){if(this.customSemanticTokenRules=[],this.customSemanticHighlighting=void 0,M){this.customSemanticHighlighting=M.enabled,M.rules&&this.readSemanticTokenRules(M.rules);const N=this.getThemeSpecificColors(M);I.isObject(N)&&(N.enabled!==void 0&&(this.customSemanticHighlighting=N.enabled),N.rules&&this.readSemanticTokenRules(N.rules))}this.tokenColorIndex=void 0,this.textMateThemingRules=void 0}isThemeScope(M){return M.charAt(0)===A.THEME_SCOPE_OPEN_PAREN&&M.charAt(M.length-1)===A.THEME_SCOPE_CLOSE_PAREN}isThemeScopeMatch(M){const N=M.charAt(0),B=M.charAt(M.length-1),P=M.slice(0,-1),V=M.slice(1,-1),z=M.slice(1);return M===this.settingsId||this.settingsId.includes(V)&&N===A.THEME_SCOPE_WILDCARD&&B===A.THEME_SCOPE_WILDCARD||this.settingsId.startsWith(P)&&B===A.THEME_SCOPE_WILDCARD||this.settingsId.endsWith(z)&&N===A.THEME_SCOPE_WILDCARD}getThemeSpecificColors(M){let N;for(let B in M){const P=M[B];if(this.isThemeScope(B)&&P instanceof Object&&!I.isArray(P)){const V=B.match(A.themeScopeRegex)||[];for(let z of V){const U=z.substring(1,z.length-1);if(this.isThemeScopeMatch(U)){N||(N={});const H=P;for(let K in H){const G=N[K],q=H[K];I.isArray(G)&&I.isArray(q)?N[K]=G.concat(q):q&&(N[K]=q)}}}}}return N}readSemanticTokenRules(M){for(let N in M)if(!this.isThemeScope(N))try{const B=T(N,M[N]);B&&this.customSemanticTokenRules.push(B)}catch{}}addCustomTokenColors(M){for(let N in u){const B=N;let P=M[B];if(P){let V=typeof P=="string"?{foreground:P}:P,z=u[B];for(let U of z)this.customTokenColors.push({scope:U,settings:V})}}if(Array.isArray(M.textMateRules))for(let N of M.textMateRules)N.scope&&N.settings&&this.customTokenColors.push(N);M.semanticHighlighting!==void 0&&(this.customSemanticHighlightingDeprecated=M.semanticHighlighting)}ensureLoaded(M){return this.isLoaded?Promise.resolve(void 0):this.load(M)}reload(M){return this.load(M)}load(M){if(!this.location)return Promise.resolve(void 0);this.themeTokenColors=[],this.clearCaches();const N={colors:{},textMateRules:[],semanticTokenRules:[],semanticHighlighting:!1};return h(M,this.location,N).then(B=>{this.isLoaded=!0,this.semanticTokenRules=N.semanticTokenRules,this.colorMap=N.colors,this.themeTokenColors=N.textMateRules,this.themeSemanticHighlighting=N.semanticHighlighting})}clearCaches(){this.tokenColorIndex=void 0,this.textMateThemingRules=void 0,this.themeTokenScopeMatchers=void 0,this.customTokenScopeMatchers=void 0}toStorage(M){let N={};for(let P in this.colorMap)N[P]=_.Color.Format.CSS.formatHexA(this.colorMap[P],!0);const B=JSON.stringify({id:this.id,label:this.label,settingsId:this.settingsId,themeTokenColors:this.themeTokenColors.map(P=>({settings:P.settings,scope:P.scope})),semanticTokenRules:this.semanticTokenRules.map(S.SemanticTokenRule.toJSONObject),extensionData:A.ExtensionData.toJSONObject(this.extensionData),themeSemanticHighlighting:this.themeSemanticHighlighting,colorMap:N,watch:this.watch});M.store(a.STORAGE_KEY,B,0,0)}get baseTheme(){return this.classNames[0]}get classNames(){return this.id.split(" ")}get type(){switch(this.baseTheme){case A.VS_LIGHT_THEME:return l.ColorScheme.LIGHT;case A.VS_HC_THEME:return l.ColorScheme.HIGH_CONTRAST_DARK;case A.VS_HC_LIGHT_THEME:return l.ColorScheme.HIGH_CONTRAST_LIGHT;default:return l.ColorScheme.DARK}}static createUnloadedThemeForThemeType(M,N){return a.createUnloadedTheme((0,C.getThemeTypeSelector)(M),N)}static createUnloadedTheme(M,N){let B=new a(M,"","__"+M);if(B.isLoaded=!1,B.themeTokenColors=[],B.watch=!1,N)for(let P in N)B.colorMap[P]=_.Color.fromHex(N[P]);return B}static createLoadedEmptyTheme(M,N){let B=new a(M,"",N);return B.isLoaded=!0,B.themeTokenColors=[],B.watch=!1,B}static fromStorageData(M){const N=M.get(a.STORAGE_KEY,0);if(!!N)try{let B=JSON.parse(N),P=new a("","","");for(let V in B)switch(V){case"colorMap":{let z=B[V];for(let U in z)P.colorMap[U]=_.Color.fromHex(z[U]);break}case"themeTokenColors":case"id":case"label":case"settingsId":case"watch":case"themeSemanticHighlighting":P[V]=B[V];break;case"semanticTokenRules":{const z=B[V];if(Array.isArray(z))for(let U of z){const H=S.SemanticTokenRule.fromJSONObject(p,U);H&&P.semanticTokenRules.push(H)}break}case"location":break;case"extensionData":P.extensionData=A.ExtensionData.fromJSONObject(B.extensionData);break}return!P.id||!P.settingsId?void 0:P}catch{return}}static fromExtensionTheme(M,N,B){const P=M.uiTheme||"vs-dark",V=n(B.extensionId,M.path),z=`${P} ${V}`,U=M.label||(0,t.basename)(M.path),H=M.id||U,K=new a(z,U,H);return K.description=M.description,K.watch=M._watch===!0,K.location=N,K.extensionData=B,K.isLoaded=!1,K}}e.ColorThemeData=a,a.STORAGE_KEY="colorThemeData";function n(L,M){M.startsWith("./")&&(M=M.substr(2));let N=`${L}-${M}`;return N=N.replace(/[^_a-zA-Z0-9-]/g,"-"),N.charAt(0).match(/[0-9-]/)&&(N="_"+N),N}async function h(L,M,N){if(w.extname(M)===".json"){const B=await L.readExtensionResource(M);let P=[],V=f.parse(B,P);if(P.length>0)return Promise.reject(new Error(D.localize(0,null,P.map(K=>(0,c.getParseErrorMessage)(K.error)).join(", "))));if(f.getNodeType(V)!=="object")return Promise.reject(new Error(D.localize(1,null)));if(V.include&&await h(L,w.joinPath(w.dirname(M),V.include),N),Array.isArray(V.settings))return(0,k.convertSettings)(V.settings,N),null;N.semanticHighlighting=N.semanticHighlighting||V.semanticHighlighting;let z=V.colors;if(z){if(typeof z!="object")return Promise.reject(new Error(D.localize(2,null,M.toString())));for(let K in z)typeof z[K]=="string"&&(N.colors[K]=_.Color.fromHex(z[K]))}let U=V.tokenColors;if(U)if(Array.isArray(U))N.textMateRules.push(...U);else if(typeof U=="string")await g(L,w.joinPath(w.dirname(M),U),N);else return Promise.reject(new Error(D.localize(3,null,M.toString())));let H=V.semanticTokenColors;if(H&&typeof H=="object")for(let K in H)try{const G=T(K,H[K]);G&&N.semanticTokenRules.push(G)}catch{return Promise.reject(new Error(D.localize(4,null,M.toString())))}}else return g(L,M,N)}function g(L,M,N){return L.readExtensionResource(M).then(B=>{try{let V=(0,i.parse)(B).settings;return Array.isArray(V)?((0,k.convertSettings)(V,N),Promise.resolve(null)):Promise.reject(new Error(D.localize(5,null)))}catch(P){return Promise.reject(new Error(D.localize(6,null,P.message)))}},B=>Promise.reject(new Error(D.localize(7,null,M.toString(),B.message))))}let d={light:[{scope:"token.info-token",settings:{foreground:"#316bcd"}},{scope:"token.warn-token",settings:{foreground:"#cd9731"}},{scope:"token.error-token",settings:{foreground:"#cd3131"}},{scope:"token.debug-token",settings:{foreground:"#800080"}}],dark:[{scope:"token.info-token",settings:{foreground:"#6796e6"}},{scope:"token.warn-token",settings:{foreground:"#cd9731"}},{scope:"token.error-token",settings:{foreground:"#f44747"}},{scope:"token.debug-token",settings:{foreground:"#b267e6"}}],hcLight:[{scope:"token.info-token",settings:{foreground:"#316bcd"}},{scope:"token.warn-token",settings:{foreground:"#cd9731"}},{scope:"token.error-token",settings:{foreground:"#cd3131"}},{scope:"token.debug-token",settings:{foreground:"#800080"}}],hcDark:[{scope:"token.info-token",settings:{foreground:"#6796e6"}},{scope:"token.warn-token",settings:{foreground:"#008000"}},{scope:"token.error-token",settings:{foreground:"#FF0000"}},{scope:"token.debug-token",settings:{foreground:"#b267e6"}}]};const m=L=>-1;function b(L,M){function N(V,z){for(let U=z-1;U>=0;U--)if(E(V,L[U]))return U;return-1}if(M.length<L.length)return-1;let B=M.length-1,P=N(M[B--],L.length);if(P>=0){const V=(P+1)*65536+L[P].length;for(;B>=0;)if(P=N(M[B--],P),P===-1)return-1;return V}return-1}function E(L,M){if(!L)return!1;if(L===M)return!0;const N=M.length;return L.length>N&&L.substr(0,N)===M&&L[N]==="."}function y(L){const M=L.scope;if(!M||!L.settings)return m;const N=[];if(Array.isArray(M))for(let B of M)(0,s.createMatchers)(B,b,N);else(0,s.createMatchers)(M,b,N);return N.length===0?m:B=>{let P=N[0].matcher(B);for(let V=1;V<N.length;V++)P=Math.max(P,N[V].matcher(B));return P}}function T(L,M){const N=p.parseTokenSelector(L);let B;if(typeof M=="string"?B=S.TokenStyle.fromSettings(M,void 0):R(M)&&(B=S.TokenStyle.fromSettings(M.foreground,M.fontStyle,M.bold,M.underline,M.strikethrough,M.italic)),B)return{selector:N,style:B}}function R(L){return L&&(I.isString(L.foreground)||I.isString(L.fontStyle)||I.isBoolean(L.italic)||I.isBoolean(L.underline)||I.isBoolean(L.strikethrough)||I.isBoolean(L.bold))}class O{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null)}add(M){if(M=x(M),M===void 0)return 0;let N=this._color2id[M];return N||(N=++this._lastColorId,this._color2id[M]=N,this._id2color[N]=M,N)}get(M){if(M=x(M),M===void 0)return 0;let N=this._color2id[M];return N||(console.log(`Color ${M} not in index.`),0)}asArray(){return this._id2color.slice(0)}}function x(L){if(!L)return;typeof L!="string"&&(L=_.Color.Format.CSS.formatHexA(L,!0));const M=L.length;if(L.charCodeAt(0)!==35||M!==4&&M!==5&&M!==7&&M!==9)return;let N=[35];for(let B=1;B<M;B++){const P=F(L.charCodeAt(B));if(!P)return;N.push(P),(M===4||M===5)&&N.push(P)}return N.length===9&&N[7]===70&&N[8]===70&&(N.length=7),String.fromCharCode(...N)}function F(L){return L>=48&&L<=57||L>=65&&L<=70?L:L>=97&&L<=102?L-97+65:0}}),define(ne[918],re([1,0,1913,13,17,57,632,32,404,193,14]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ThemeConfiguration=e.updateProductIconThemeConfigurationSchemas=e.updateFileIconThemeConfigurationSchemas=e.updateColorThemeConfigurationSchemas=e.DEFAULT_PRODUCT_ICON_THEME_SETTING_VALUE=void 0;const C="Default Dark+",o="Default Light+",c="Default High Contrast",i="Default High Contrast Light",S="vs-seti";e.DEFAULT_PRODUCT_ICON_THEME_SETTING_VALUE="Default";const s=_.Registry.as(A.Extensions.Configuration),l=[],r=[],p=[],u={type:"string",description:t.localize(0,null),default:v.isWeb?o:C,enum:l,enumDescriptions:p,enumItemLabels:r,errorMessage:t.localize(1,null)},a={type:"string",markdownDescription:t.localize(2,null,w.ThemeSettings.DETECT_COLOR_SCHEME),default:C,enum:l,enumDescriptions:p,enumItemLabels:r,errorMessage:t.localize(3,null)},n={type:"string",markdownDescription:t.localize(4,null,w.ThemeSettings.DETECT_COLOR_SCHEME),default:o,enum:l,enumDescriptions:p,enumItemLabels:r,errorMessage:t.localize(5,null)},h={type:"string",markdownDescription:t.localize(6,null,w.ThemeSettings.DETECT_HC),default:c,enum:l,enumDescriptions:p,enumItemLabels:r,errorMessage:t.localize(7,null)},g={type:"string",markdownDescription:t.localize(8,null,w.ThemeSettings.DETECT_HC),default:i,enum:l,enumDescriptions:p,enumItemLabels:r,errorMessage:t.localize(9,null)},d={type:"boolean",markdownDescription:t.localize(10,null,w.ThemeSettings.PREFERRED_DARK_THEME,w.ThemeSettings.PREFERRED_LIGHT_THEME),default:!1},m={type:"object",description:t.localize(11,null),allOf:[{$ref:D.workbenchColorsSchemaId}],default:{},defaultSnippets:[{body:{}}]},b={type:["string","null"],default:S,description:t.localize(12,null),enum:[null],enumItemLabels:[t.localize(13,null)],enumDescriptions:[t.localize(14,null)],errorMessage:t.localize(15,null)},E={type:["string","null"],default:e.DEFAULT_PRODUCT_ICON_THEME_SETTING_VALUE,description:t.localize(16,null),enum:[e.DEFAULT_PRODUCT_ICON_THEME_SETTING_VALUE],enumItemLabels:[t.localize(17,null)],enumDescriptions:[t.localize(18,null)],errorMessage:t.localize(19,null)},y={type:"boolean",default:!0,markdownDescription:t.localize(20,null,w.ThemeSettings.PREFERRED_HC_DARK_THEME,w.ThemeSettings.PREFERRED_HC_LIGHT_THEME),scope:1},T={id:"workbench",order:7.1,type:"object",properties:{[w.ThemeSettings.COLOR_THEME]:u,[w.ThemeSettings.PREFERRED_DARK_THEME]:a,[w.ThemeSettings.PREFERRED_LIGHT_THEME]:n,[w.ThemeSettings.PREFERRED_HC_DARK_THEME]:h,[w.ThemeSettings.PREFERRED_HC_LIGHT_THEME]:g,[w.ThemeSettings.FILE_ICON_THEME]:b,[w.ThemeSettings.COLOR_CUSTOMIZATIONS]:m,[w.ThemeSettings.PRODUCT_ICON_THEME]:E}};s.registerConfiguration(T);const R={id:"window",order:8.1,type:"object",properties:{[w.ThemeSettings.DETECT_HC]:y,[w.ThemeSettings.DETECT_COLOR_SCHEME]:d}};s.registerConfiguration(R);function O(H){return{description:H,$ref:k.textmateColorGroupSchemaId}}const x="^\\[[^\\]]*(\\]\\s*\\[[^\\]]*)*\\]$",F={type:"object",properties:{comments:O(t.localize(21,null)),strings:O(t.localize(22,null)),keywords:O(t.localize(23,null)),numbers:O(t.localize(24,null)),types:O(t.localize(25,null)),functions:O(t.localize(26,null)),variables:O(t.localize(27,null)),textMateRules:{description:t.localize(28,null),$ref:k.textmateColorsSchemaId},semanticHighlighting:{description:t.localize(29,null),deprecationMessage:t.localize(30,null),markdownDeprecationMessage:t.localize(31,null),type:"boolean"}},additionalProperties:!1},L={description:t.localize(32,null),default:{},allOf:[{...F,patternProperties:{"^\\[":{}}}]},M={type:"object",properties:{enabled:{type:"boolean",description:t.localize(33,null),suggestSortText:"0_enabled"},rules:{$ref:I.tokenStylingSchemaId,description:t.localize(34,null),suggestSortText:"0_rules"}},additionalProperties:!1},N={description:t.localize(35,null),default:{},allOf:[{...M,patternProperties:{"^\\[":{}}}]},B={id:"editor",order:7.2,type:"object",properties:{[w.ThemeSettings.TOKEN_COLOR_CUSTOMIZATIONS]:L,[w.ThemeSettings.SEMANTIC_TOKEN_COLOR_CUSTOMIZATIONS]:N}};s.registerConfiguration(B);function P(H){l.splice(0,l.length,...H.map(X=>X.settingsId)),p.splice(0,p.length,...H.map(X=>X.description||"")),r.splice(0,r.length,...H.map(X=>X.label||""));const K={properties:{}},G={properties:{}},q={properties:{}},Z={$ref:D.workbenchColorsSchemaId,additionalProperties:!1},j={properties:F.properties,additionalProperties:!1};for(let X of H){const Y=`[${X.settingsId}]`;K.properties[Y]=Z,G.properties[Y]=j,q.properties[Y]=M}K.patternProperties={[x]:Z},G.patternProperties={[x]:j},q.patternProperties={[x]:M},m.allOf[1]=K,L.allOf[1]=G,N.allOf[1]=q,s.notifyConfigurationSchemaUpdated(T,B)}e.updateColorThemeConfigurationSchemas=P;function V(H){b.enum.splice(1,Number.MAX_VALUE,...H.map(K=>K.settingsId)),b.enumItemLabels.splice(1,Number.MAX_VALUE,...H.map(K=>K.label)),b.enumDescriptions.splice(1,Number.MAX_VALUE,...H.map(K=>K.description||"")),s.notifyConfigurationSchemaUpdated(T)}e.updateFileIconThemeConfigurationSchemas=V;function z(H){E.enum.splice(1,Number.MAX_VALUE,...H.map(K=>K.settingsId)),E.enumItemLabels.splice(1,Number.MAX_VALUE,...H.map(K=>K.label)),E.enumDescriptions.splice(1,Number.MAX_VALUE,...H.map(K=>K.description||"")),s.notifyConfigurationSchemaUpdated(T)}e.updateProductIconThemeConfigurationSchemas=z;class U{constructor(K){this.configurationService=K}get colorTheme(){return this.configurationService.getValue(w.ThemeSettings.COLOR_THEME)}get fileIconTheme(){return this.configurationService.getValue(w.ThemeSettings.FILE_ICON_THEME)}get productIconTheme(){return this.configurationService.getValue(w.ThemeSettings.PRODUCT_ICON_THEME)}get colorCustomizations(){return this.configurationService.getValue(w.ThemeSettings.COLOR_CUSTOMIZATIONS)||{}}get tokenColorCustomizations(){return this.configurationService.getValue(w.ThemeSettings.TOKEN_COLOR_CUSTOMIZATIONS)||{}}get semanticTokenColorCustomizations(){return this.configurationService.getValue(w.ThemeSettings.SEMANTIC_TOKEN_COLOR_CUSTOMIZATIONS)}async setColorTheme(K,G){return await this.writeConfiguration(w.ThemeSettings.COLOR_THEME,K.settingsId,G),K}async setFileIconTheme(K,G){return await this.writeConfiguration(w.ThemeSettings.FILE_ICON_THEME,K.settingsId,G),K}async setProductIconTheme(K,G){return await this.writeConfiguration(w.ThemeSettings.PRODUCT_ICON_THEME,K.settingsId,G),K}isDefaultColorTheme(){let K=this.configurationService.inspect(w.ThemeSettings.COLOR_THEME);return K&&K.default?.value===K.value}findAutoConfigurationTarget(K){let G=this.configurationService.inspect(K);if(f.isUndefined(G.workspaceFolderValue))if(f.isUndefined(G.workspaceValue)){if(!f.isUndefined(G.userRemote))return 3}else return 4;else return 5;return 1}async writeConfiguration(K,G,q){if(q===void 0||q==="preview")return;let Z=this.configurationService.inspect(K);if(q==="auto")return this.configurationService.updateValue(K,G);if(q===1){if(G===Z.userValue)return Promise.resolve(void 0);if(G===Z.defaultValue){if(f.isUndefined(Z.userValue))return Promise.resolve(void 0);G=void 0}}else if((q===4||q===5||q===3)&&G===Z.value)return Promise.resolve(void 0);return this.configurationService.updateValue(K,G,q)}}e.ThemeConfiguration=U}),define(ne[919],re([1,0,1905,48,19,118,193,391,918,633,13,63,12]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProductIconThemeData=e.DEFAULT_PRODUCT_ICON_THEME_ID=void 0,e.DEFAULT_PRODUCT_ICON_THEME_ID="";class c{constructor(r,p,u){this.iconThemeDocument={iconDefinitions:new Map},this.id=r,this.label=p,this.settingsId=u,this.isLoaded=!1}getIcon(r){return s(r,this.iconThemeDocument)}ensureLoaded(r,p){return this.isLoaded?Promise.resolve(this.styleSheetContent):this.load(r,p)}reload(r,p){return this.load(r,p)}async load(r,p){const u=this.location;if(!u)return Promise.resolve(this.styleSheetContent);const a=[];return this.iconThemeDocument=await i(r,u,a),this.isLoaded=!0,a.length&&p.error(t.localize(0,null,u.toString(),a.join(` `))),this.styleSheetContent}static fromExtensionTheme(r,p,u){const a=u.extensionId+"-"+r.id,n=r.label||f.basename(r.path),h=r.id,g=new c(a,n,h);return g.description=r.description,g.location=p,g.extensionData=u,g.watch=r._watch,g.isLoaded=!1,g}static createUnloadedTheme(r){const p=new c(r,"","__"+r);return p.isLoaded=!1,p.extensionData=void 0,p.watch=!1,p}static get defaultTheme(){let r=c._defaultProductIconTheme;return r||(r=c._defaultProductIconTheme=new c(e.DEFAULT_PRODUCT_ICON_THEME_ID,t.localize(1,null),I.DEFAULT_PRODUCT_ICON_THEME_SETTING_VALUE),r.isLoaded=!0,r.extensionData=void 0,r.watch=!1),r}static fromStorageData(r){const p=r.get(c.STORAGE_KEY,0);if(!!p)try{let u=JSON.parse(p);const a=new c("","","");for(let n in u)switch(n){case"id":case"label":case"description":case"settingsId":case"styleSheetContent":case"watch":a[n]=u[n];break;case"location":break;case"extensionData":a.extensionData=k.ExtensionData.fromJSONObject(u.extensionData);break}return a}catch{return}}toStorage(r){const p=JSON.stringify({id:this.id,label:this.label,description:this.description,settingsId:this.settingsId,styleSheetContent:this.styleSheetContent,watch:this.watch,extensionData:k.ExtensionData.toJSONObject(this.extensionData)});r.store(c.STORAGE_KEY,p,0,1)}}e.ProductIconThemeData=c,c.STORAGE_KEY="productIconThemeData",c._defaultProductIconTheme=null;function i(l,r,p){return l.readExtensionResource(r).then(u=>{const a=[];let n=A.parse(u,a);if(a.length>0)return Promise.reject(new Error(t.localize(2,null,a.map(b=>(0,D.getParseErrorMessage)(b.error)).join(", "))));if(A.getNodeType(n)!=="object")return Promise.reject(new Error(t.localize(3,null)));if(!n.iconDefinitions||!Array.isArray(n.fonts)||!n.fonts.length)return Promise.reject(new Error(t.localize(4,null)));const h=_.dirname(r),g=new Map;for(const b of n.fonts)if((0,v.isString)(b.id)&&b.id.match(w.fontIdRegex)){const E=b.id;let y;(0,v.isString)(b.weight)&&b.weight.match(w.fontWeightRegex)?y=b.weight:p.push(t.localize(5,null,b.id));let T;(0,v.isString)(b.style)&&b.style.match(w.fontStyleRegex)?T=b.style:p.push(t.localize(6,null,b.id));const R=[];if(Array.isArray(b.src))for(const O of b.src)if((0,v.isString)(O.path)&&(0,v.isString)(O.format)&&O.format.match(w.fontFormatRegex)){const x=_.joinPath(h,O.path);R.push({location:x,format:O.format})}else p.push(t.localize(7,null,b.id));R.length?g.set(E,{weight:y,style:T,src:R}):p.push(t.localize(8,null,b.id))}else p.push(t.localize(9,null,b.id));const d=new Map,m=n.fonts[0].id;for(const b in n.iconDefinitions){const E=n.iconDefinitions[b];if((0,v.isString)(E.fontCharacter)){const y=E.fontId??m,T=g.get(y);if(T){const R={id:`pi-${y}`,definition:T};d.set(b,{fontCharacter:E.fontCharacter,font:R})}else p.push(t.localize(10,null,b))}else p.push(t.localize(11,null,b))}return{iconDefinitions:d}})}const S=(0,C.getIconRegistry)();function s(l,r){const p=r.iconDefinitions;let u=p.get(l.id),a=l.defaults;for(;!u&&o.ThemeIcon.isThemeIcon(a);){const n=S.getIcon(a.id);if(n)u=p.get(n.id),a=n.defaults;else return}if(u)return u;if(!o.ThemeIcon.isThemeIcon(a))return a}}),define(ne[2649],re([1,0,1800,97,16,17,70,193,119,79,32,21,66,127,632,22,53,919,88,11,30,31,67,33,63,12,6,296,5,28,917]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.manageExtensionIcon=void 0,e.manageExtensionIcon=(0,g.registerIcon)("theme-selection-manage-extension",h.Codicon.gear,(0,t.localize)(0,null));let R=class{constructor(H,K,G,q,Z,j,X,Y){this.getMarketplaceColorThemes=H,this.marketplaceQuery=K,this.extensionGalleryService=G,this.extensionManagementService=q,this.quickInputService=Z,this.logService=j,this.progressService=X,this.paneCompositeService=Y,this._marketplaceExtensions=new Set,this._marketplaceThemes=[],this._searchOngoing=!1,this._onDidChange=new m.Emitter,this._queryDelayer=new p.ThrottledDelayer(200),this._installedExtensions=q.getInstalled().then($=>{const J=new Set;for(const ee of $)J.add(ee.identifier.id);return J})}get themes(){return this._marketplaceThemes}get isSearching(){return this._searchOngoing}get onDidChange(){return this._onDidChange.event}trigger(H){this._tokenSource&&(this._tokenSource.cancel(),this._tokenSource=void 0),this._queryDelayer.trigger(()=>(this._tokenSource=new u.CancellationTokenSource,this.doSearch(H,this._tokenSource.token)))}async doSearch(H,K){this._searchOngoing=!0,this._onDidChange.fire();try{const G=await this._installedExtensions,q={text:`${this.marketplaceQuery} ${H}`,pageSize:40},Z=await this.extensionGalleryService.query(q,K);for(let j=0;j<Z.total&&j<1&&!K.isCancellationRequested;j++){const X=this._marketplaceThemes.length,Y=await Z.getPage(j,K);for(let $=0;$<Y.length&&!K.isCancellationRequested;$++){const J=Y[$];if(!G.has(J.identifier.id)&&!this._marketplaceExtensions.has(J.identifier.id)){this._marketplaceExtensions.add(J.identifier.id);const ee=await this.getMarketplaceColorThemes(J.publisher,J.name,J.version);for(const te of ee)this._marketplaceThemes.push({id:te.id,theme:te,label:te.label,description:`${J.displayName} \xB7 ${J.publisherDisplayName}`,galleryExtension:J,buttons:[z]})}}X!==this._marketplaceThemes.length&&(this._marketplaceThemes.sort(($,J)=>$.label.localeCompare(J.label)),this._onDidChange.fire())}}catch(G){(0,S.isCancellationError)(G)||this.logService.error("Error while searching for themes:",G)}finally{this._searchOngoing=!1,this._onDidChange.fire()}}openQuickPick(H,K,G){let q;return new Promise((Z,j)=>{const X=this.quickInputService.createQuickPick();X.items=[],X.sortByLabel=!1,X.matchOnDescription=!0,X.buttons=[this.quickInputService.backButton],X.title="Marketplace Themes",X.placeholder=(0,t.localize)(1,null),X.canSelectMany=!1,X.onDidChangeValue(()=>this.trigger(X.value)),X.onDidAccept(async Y=>{let $=X.selectedItems[0];$?.galleryExtension&&(q="selected",X.hide(),await this.installExtension($.galleryExtension)&&G($.theme,!0))}),X.onDidTriggerItemButton(Y=>{if(B(Y.item)){const $=Y.item.theme?.extensionData?.extensionId;$?N(this.paneCompositeService,`@id:${$}`):N(this.paneCompositeService,`${this.marketplaceQuery} ${X.value}`)}}),X.onDidChangeActive(Y=>G(Y[0]?.theme,!1)),X.onDidHide(()=>{q===void 0&&(G(K,!0),q="cancelled"),X.dispose(),Z(q)}),X.onDidTriggerButton(Y=>{Y===this.quickInputService.backButton&&(q="back",X.hide())}),this.onDidChange(()=>{let Y=this.themes;this.isSearching&&(Y=Y.concat({label:"$(sync~spin) Searching for themes...",id:void 0,alwaysShow:!0}));const $=X.activeItems[0]?.id,J=$?Y.find(ee=>B(ee)&&ee.id===$):void 0;X.items=Y,J&&(X.activeItems=[J])}),this.trigger(H),X.show()})}async installExtension(H){try{return N(this.paneCompositeService,`@id:${H.identifier.id}`),await this.progressService.withProgress({location:15,title:(0,t.localize)(2,null,H.displayName)},async()=>{await this.extensionManagementService.installFromGallery(H)}),!0}catch(K){return this.logService.error(`Problem installing extension ${H.identifier.id}`,K),!1}}dispose(){this._tokenSource&&(this._tokenSource.cancel(),this._tokenSource=void 0),this._queryDelayer.dispose(),this._marketplaceExtensions.clear(),this._marketplaceThemes.length=0}};R=Ee([W(2,w.IExtensionGalleryService),W(3,w.IExtensionManagementService),W(4,s.IQuickInputService),W(5,a.ILogService),W(6,n.IProgressService),W(7,r.IPaneCompositePartService)],R);let O=class{constructor(H,K,G,q,Z,j,X,Y,$,J,ee){this.installMessage=H,this.browseMessage=K,this.placeholderMessage=G,this.marketplaceTag=q,this.setTheme=Z,this.getMarketplaceColorThemes=j,this.quickInputService=X,this.extensionGalleryService=Y,this.paneCompositeService=$,this.extensionResourceLoaderService=J,this.instantiationService=ee}async openQuickPick(H,K){let G;this.extensionGalleryService.isEnabled()&&(this.extensionResourceLoaderService.supportsExtensionGalleryResources&&this.browseMessage?(G=this.instantiationService.createInstance(R,this.getMarketplaceColorThemes.bind(this),this.marketplaceTag),H=[...M(this.browseMessage),...H]):H=[...H,...M(this.installMessage)]);let q;const Z=(X,Y)=>{q&&clearTimeout(q),q=window.setTimeout(()=>{q=void 0;const $=X??K;this.setTheme($,Y?"auto":"preview").then(void 0,J=>{(0,S.onUnexpectedError)(J),this.setTheme(K,void 0)})},Y?0:200)},j=X=>new Promise((Y,$)=>{let J=!1;const ee=H.findIndex(se=>B(se)&&se.id===X),te=this.quickInputService.createQuickPick();te.items=H,te.placeholder=this.placeholderMessage,te.activeItems=[H[ee]],te.canSelectMany=!1,te.onDidAccept(async se=>{J=!0;const ie=te.selectedItems[0];!ie||typeof ie.id=="undefined"?G?await G.openQuickPick(te.value,K,Z)==="back"&&await j(void 0):N(this.paneCompositeService,`${this.marketplaceTag} ${te.value}`):Z(ie.theme,!0),te.hide(),Y()}),te.onDidChangeActive(se=>Z(se[0]?.theme,!1)),te.onDidHide(()=>{J||(Z(K,!0),Y()),te.dispose()}),te.onDidTriggerItemButton(se=>{if(B(se.item)){const ie=se.item.theme?.extensionData?.extensionId;ie?N(this.paneCompositeService,`@id:${ie}`):N(this.paneCompositeService,`${this.marketplaceTag} ${te.value}`)}}),te.show()});await j(K.id),G?.dispose()}};O=Ee([W(6,s.IQuickInputService),W(7,w.IExtensionGalleryService),W(8,r.IPaneCompositePartService),W(9,b.IExtensionResourceLoaderService),W(10,E.IInstantiationService)],O);const x="workbench.action.selectTheme";(0,_.registerAction2)(class extends _.Action2{constructor(){super({id:x,title:{value:(0,t.localize)(3,null),original:"Color Theme"},category:k.CATEGORIES.Preferences,f1:!0,keybinding:{weight:200,primary:(0,f.KeyChord)(2048|41,2048|50)}})}async run(U){const H=U.get(D.IWorkbenchThemeService),K=(0,t.localize)(4,null),G="$(plus) "+(0,t.localize)(5,null),q=(0,t.localize)(6,null),Z="category:themes",j=(se,ie)=>H.setColorTheme(se,ie),X=(se,ie,ce)=>H.getMarketplaceColorThemes(se,ie,ce),$=U.get(E.IInstantiationService).createInstance(O,K,G,q,Z,j,X),J=await H.getColorThemes(),ee=H.getColorTheme(),te=[...V(J.filter(se=>se.type===c.ColorScheme.LIGHT),(0,t.localize)(7,null)),...V(J.filter(se=>se.type===c.ColorScheme.DARK),(0,t.localize)(8,null)),...V(J.filter(se=>(0,c.isHighContrast)(se.type)),(0,t.localize)(9,null))];await $.openQuickPick(te,ee)}});const F="workbench.action.selectIconTheme";(0,_.registerAction2)(class extends _.Action2{constructor(){super({id:F,title:{value:(0,t.localize)(10,null),original:"File Icon Theme"},category:k.CATEGORIES.Preferences,f1:!0})}async run(U){const H=U.get(D.IWorkbenchThemeService),K=(0,t.localize)(11,null),G=(0,t.localize)(12,null),q="tag:icon-theme",Z=(J,ee)=>H.setFileIconTheme(J,ee),j=(J,ee,te)=>H.getMarketplaceFileIconThemes(J,ee,te),Y=U.get(E.IInstantiationService).createInstance(O,K,void 0,G,q,Z,j),$=[{type:"separator",label:(0,t.localize)(13,null)},{id:"",theme:T.FileIconThemeData.noIconTheme,label:(0,t.localize)(14,null),description:(0,t.localize)(15,null)},...V(await H.getFileIconThemes())];await Y.openQuickPick($,H.getFileIconTheme())}});const L="workbench.action.selectProductIconTheme";(0,_.registerAction2)(class extends _.Action2{constructor(){super({id:L,title:{value:(0,t.localize)(16,null),original:"Product Icon Theme"},category:k.CATEGORIES.Preferences,f1:!0})}async run(U){const H=U.get(D.IWorkbenchThemeService),K=(0,t.localize)(17,null),G="$(plus) "+(0,t.localize)(18,null),q=(0,t.localize)(19,null),Z="tag:product-icon-theme",j=(ee,te)=>H.setProductIconTheme(ee,te),X=(ee,te,se)=>H.getMarketplaceProductIconThemes(ee,te,se),$=U.get(E.IInstantiationService).createInstance(O,K,G,q,Z,j,X),J=[{type:"separator",label:(0,t.localize)(20,null)},{id:l.DEFAULT_PRODUCT_ICON_THEME_ID,theme:l.ProductIconThemeData.defaultTheme,label:(0,t.localize)(21,null)},...V(await H.getProductIconThemes())];await $.openQuickPick(J,H.getProductIconTheme())}}),y.CommandsRegistry.registerCommand("workbench.action.previewColorTheme",async function(U,H,K){const G=U.get(D.IWorkbenchThemeService),q=await G.getMarketplaceColorThemes(H.publisher,H.name,H.version);for(const Z of q)if(!K||Z.settingsId===K)return await G.setColorTheme(Z,"preview"),Z.settingsId});function M(U){return[{type:"separator"},{id:void 0,label:U,alwaysShow:!0,buttons:[z]}]}function N(U,H){return U.openPaneComposite(I.VIEWLET_ID,0,!0).then(K=>{K&&(K?.getViewPaneContainer().search(H),K.focus())})}function B(U){return U.type!=="separator"}function P(U){const H={id:U.id,theme:U,label:U.label,description:U.description};return U.extensionData&&(H.buttons=[z]),H}function V(U,H){const K=(q,Z)=>q.label.localeCompare(Z.label);let G=U.map(P).sort(K);return G.length>0&&H&&G.unshift({type:"separator",label:H}),G}const z={iconClass:d.ThemeIcon.asClassName(e.manageExtensionIcon),tooltip:(0,t.localize)(22,null)};(0,_.registerAction2)(class extends _.Action2{constructor(){super({id:"workbench.action.generateColorTheme",title:{value:(0,t.localize)(23,null),original:"Generate Color Theme From Current Settings"},category:k.CATEGORIES.Developer,f1:!0})}run(U){const K=U.get(D.IWorkbenchThemeService).getColorTheme(),q=A.Registry.as(v.Extensions.ColorContribution).getColors().map(J=>J.id).sort(),Z={},j=[];for(const J of q){const ee=K.getColor(J,!1);ee?Z[J]=o.Color.Format.CSS.formatHexA(ee,!0):j.push(J)}const X=[];for(const J of j){const ee=K.getColor(J);ee?Z["__"+J]=o.Color.Format.CSS.formatHexA(ee,!0):X.push(J)}for(const J of X)Z["__"+J]=null;let Y=JSON.stringify({$schema:i.colorThemeSchemaId,type:K.type,colors:Z,tokenColors:K.tokenColors.filter(J=>!!J.scope)},null," ");return Y=Y.replace(/\"__/g,'//"'),U.get(C.IEditorService).openEditor({resource:void 0,contents:Y,languageId:"jsonc",options:{pinned:!0}})}}),_.MenuRegistry.appendMenuItem(_.MenuId.MenubarPreferencesMenu,{group:"4_themes",command:{id:x,title:(0,t.localize)(24,null)},order:1}),_.MenuRegistry.appendMenuItem(_.MenuId.MenubarPreferencesMenu,{group:"4_themes",command:{id:F,title:(0,t.localize)(25,null)},order:2}),_.MenuRegistry.appendMenuItem(_.MenuId.MenubarPreferencesMenu,{group:"4_themes",command:{id:L,title:(0,t.localize)(26,null)},order:3}),_.MenuRegistry.appendMenuItem(_.MenuId.GlobalActivity,{group:"4_themes",command:{id:x,title:(0,t.localize)(27,null)},order:1}),_.MenuRegistry.appendMenuItem(_.MenuId.GlobalActivity,{group:"4_themes",command:{id:F,title:(0,t.localize)(28,null)},order:2}),_.MenuRegistry.appendMenuItem(_.MenuId.GlobalActivity,{group:"4_themes",command:{id:L,title:(0,t.localize)(29,null)},order:3})}),define(ne[2650],re([1,0,1914,13,19,133,193,6]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ThemeRegistry=e.registerProductIconThemeExtensionPoint=e.registerFileIconThemeExtensionPoint=e.registerColorThemeExtensionPoint=void 0;function I(){return A.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"themes",jsonSchema:{description:t.localize(0,null),type:"array",items:{type:"object",defaultSnippets:[{body:{label:"${1:label}",id:"${2:id}",uiTheme:k.VS_DARK_THEME,path:"./themes/${3:id}.tmTheme."}}],properties:{id:{description:t.localize(1,null),type:"string"},label:{description:t.localize(2,null),type:"string"},uiTheme:{description:t.localize(3,null),enum:[k.VS_LIGHT_THEME,k.VS_DARK_THEME,k.VS_HC_THEME,k.VS_HC_LIGHT_THEME]},path:{description:t.localize(4,null),type:"string"}},required:["path","uiTheme"]}}})}e.registerColorThemeExtensionPoint=I;function w(){return A.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"iconThemes",jsonSchema:{description:t.localize(5,null),type:"array",items:{type:"object",defaultSnippets:[{body:{id:"${1:id}",label:"${2:label}",path:"./fileicons/${3:id}-icon-theme.json"}}],properties:{id:{description:t.localize(6,null),type:"string"},label:{description:t.localize(7,null),type:"string"},path:{description:t.localize(8,null),type:"string"}},required:["path","id"]}}})}e.registerFileIconThemeExtensionPoint=w;function v(){return A.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"productIconThemes",jsonSchema:{description:t.localize(9,null),type:"array",items:{type:"object",defaultSnippets:[{body:{id:"${1:id}",label:"${2:label}",path:"./producticons/${3:id}-product-icon-theme.json"}}],properties:{id:{description:t.localize(10,null),type:"string"},label:{description:t.localize(11,null),type:"string"},path:{description:t.localize(12,null),type:"string"}},required:["path","id"]}}})}e.registerProductIconThemeExtensionPoint=v;class C{constructor(c,i,S=!1,s=void 0){this.themesExtPoint=c,this.create=i,this.idRequired=S,this.builtInTheme=s,this.onDidChangeEmitter=new D.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.extensionThemes=[],this.initialize()}initialize(){this.themesExtPoint.setHandler((c,i)=>{const S={},s=[];for(const r of this.extensionThemes)S[r.id]=r;this.extensionThemes.length=0;for(const r of c){const p=k.ExtensionData.fromName(r.description.publisher,r.description.name,r.description.isBuiltin);this.onThemes(p,r.description.extensionLocation,r.value,this.extensionThemes,r.collector)}for(const r of this.extensionThemes)S[r.id]?delete S[r.id]:s.push(r);const l=Object.values(S);this.onDidChangeEmitter.fire({themes:this.extensionThemes,added:s,removed:l})})}onThemes(c,i,S,s=[],l){return Array.isArray(S)?(S.forEach(r=>{if(!r.path||!f.isString(r.path)){l?.error(t.localize(14,null,this.themesExtPoint.name,String(r.path)));return}if(this.idRequired&&(!r.id||!f.isString(r.id))){l?.error(t.localize(15,null,this.themesExtPoint.name,String(r.id)));return}const p=_.joinPath(i,r.path);_.isEqualOrParent(p,i)||l?.warn(t.localize(16,null,this.themesExtPoint.name,p.path,i.path));let u=this.create(r,p,c);s.push(u)}),s):(l?.error(t.localize(13,null,this.themesExtPoint.name)),s)}findThemeById(c,i){if(this.builtInTheme&&this.builtInTheme.id===c)return this.builtInTheme;const S=this.getThemes();let s;for(let l of S){if(l.id===c)return l;l.id===i&&(s=l)}return s}findThemeBySettingsId(c,i){if(this.builtInTheme&&this.builtInTheme.settingsId===c)return this.builtInTheme;const S=this.getThemes();let s;for(let l of S){if(l.settingsId===c)return l;l.id===i&&(s=l)}return s}findThemeByExtensionLocation(c){return c?this.getThemes().filter(i=>i.location&&_.isEqualOrParent(i.location,c)):[]}getThemes(){return this.extensionThemes}getMarketplaceThemes(c,i,S){const s=c?.contributes?.[this.themesExtPoint.name];return Array.isArray(s)?this.onThemes(S,i,s):[]}}e.ThemeRegistry=C}),define(ne[2651],re([1,0,6,87,35,2,916,121,24,13]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeHostColorSchemeService=void 0;let v=class Zr extends A.Disposable{constructor(o,c,i){super();this.nativeHostService=o,this.storageService=i,this._onDidChangeColorScheme=this._register(new t.Emitter),this.onDidChangeColorScheme=this._onDidChangeColorScheme.event,this._register(this.nativeHostService.onDidChangeColorScheme(s=>this.update(s)));const S=this.getStoredValue()??c.window.colorScheme;this.dark=S.dark,this.highContrast=S.highContrast,this.nativeHostService.getOSColorScheme().then(s=>this.update(s))}getStoredValue(){const o=this.storageService.get(Zr.STORAGE_KEY,0);if(o)try{const c=JSON.parse(o);if((0,w.isObject)(c)&&(0,w.isBoolean)(c.highContrast)&&(0,w.isBoolean)(c.dark))return c}catch{}}update({highContrast:o,dark:c}){(c!==this.dark||o!==this.highContrast)&&(this.dark=c,this.highContrast=o,this.storageService.store(Zr.STORAGE_KEY,JSON.stringify({highContrast:o,dark:c}),0,1),this._onDidChangeColorScheme.fire())}};v.STORAGE_KEY="HostColorSchemeData",v=Ee([W(0,f.INativeHostService),W(1,D.INativeWorkbenchEnvironmentService),W(2,I.IStorageService)],v),e.NativeHostColorSchemeService=v,(0,_.registerSingleton)(k.IHostColorSchemeService,v,!0)}),define(ne[435],re([1,0,235,5,34,40,264,76,21,98,27,11,80,88]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TimerService=e.AbstractTimerService=e.ITimerService=void 0,e.ITimerService=(0,f.createDecorator)("timerService");class i{constructor(){this._entries=[]}setMarks(r,p){this._entries.push([r,p])}getDuration(r,p){const u=this._findEntry(r);if(!u)return 0;const a=this._findEntry(p);return a?a.startTime-u.startTime:0}_findEntry(r){for(let[,p]of this._entries)for(let u=p.length-1;u>=0;u--)if(p[u].name===r)return p[u]}getEntries(){return this._entries.slice(0)}}let S=class{constructor(r,p,u,a,n,h,g,d,m){this._lifecycleService=r,this._contextService=p,this._extensionService=u,this._updateService=a,this._paneCompositeService=n,this._editorService=h,this._accessibilityService=g,this._telemetryService=d,this._barrier=new C.Barrier,this._marks=new i,Promise.all([this._extensionService.whenInstalledExtensionsRegistered(),r.when(3),m.whenRestored]).then(()=>(this.setPerformanceMarks("renderer",t.getMarks()),this._computeStartupMetrics())).then(b=>{this._startupMetrics=b,this._reportStartupTimes(b),this._barrier.open()})}whenReady(){return this._barrier.wait()}get startupMetrics(){if(!this._startupMetrics)throw new Error("illegal state, MUST NOT access startupMetrics before whenReady has resolved");return this._startupMetrics}setPerformanceMarks(r,p){this._marks.setMarks(r,p.filter(u=>u.name.startsWith("code/")))}getPerformanceMarks(){return this._marks.getEntries()}_reportStartupTimes(r){this._telemetryService.publicLog("startupTimeVaried",r);for(const[p,u]of this.getPerformanceMarks()){let a=u[0];for(const n of u){let h=n.startTime-a.startTime;this._telemetryService.publicLog2("startup.timer.mark",{source:p,name:n.name,relativeStartTime:h,startTime:n.startTime}),a=n}}}async _computeStartupMetrics(){const r=this._isInitialStartup(),p=r?"code/didStartMain":"code/willOpenNewWindow",u=this._paneCompositeService.getActivePaneComposite(0),a=this._paneCompositeService.getActivePaneComposite(1),n={version:2,ellapsed:this._marks.getDuration(p,"code/didStartWorkbench"),isLatestVersion:Boolean(await this._updateService.isLatestVersion()),didUseCachedData:this._didUseCachedData(),windowKind:this._lifecycleService.startupKind,windowCount:await this._getWindowCount(),viewletId:u?.getId(),editorIds:this._editorService.visibleEditors.map(h=>h.typeId),panelId:a?a.getId():void 0,timers:{ellapsedAppReady:r?this._marks.getDuration("code/didStartMain","code/mainAppReady"):void 0,ellapsedNlsGeneration:r?this._marks.getDuration("code/willGenerateNls","code/didGenerateNls"):void 0,ellapsedLoadMainBundle:r?this._marks.getDuration("code/willLoadMainBundle","code/didLoadMainBundle"):void 0,ellapsedCrashReporter:r?this._marks.getDuration("code/willStartCrashReporter","code/didStartCrashReporter"):void 0,ellapsedMainServer:r?this._marks.getDuration("code/willStartMainServer","code/didStartMainServer"):void 0,ellapsedWindowCreate:r?this._marks.getDuration("code/willCreateCodeWindow","code/didCreateCodeWindow"):void 0,ellapsedWindowRestoreState:r?this._marks.getDuration("code/willRestoreCodeWindowState","code/didRestoreCodeWindowState"):void 0,ellapsedBrowserWindowCreate:r?this._marks.getDuration("code/willCreateCodeBrowserWindow","code/didCreateCodeBrowserWindow"):void 0,ellapsedWindowMaximize:r?this._marks.getDuration("code/willMaximizeCodeWindow","code/didMaximizeCodeWindow"):void 0,ellapsedWindowLoad:r?this._marks.getDuration("code/mainAppReady","code/willOpenNewWindow"):void 0,ellapsedWindowLoadToRequire:this._marks.getDuration("code/willOpenNewWindow","code/willLoadWorkbenchMain"),ellapsedRequire:this._marks.getDuration("code/willLoadWorkbenchMain","code/didLoadWorkbenchMain"),ellapsedWaitForWindowConfig:this._marks.getDuration("code/willWaitForWindowConfig","code/didWaitForWindowConfig"),ellapsedStorageInit:this._marks.getDuration("code/willInitStorage","code/didInitStorage"),ellapsedSharedProcesConnected:this._marks.getDuration("code/willConnectSharedProcess","code/didConnectSharedProcess"),ellapsedWorkspaceServiceInit:this._marks.getDuration("code/willInitWorkspaceService","code/didInitWorkspaceService"),ellapsedRequiredUserDataInit:this._marks.getDuration("code/willInitRequiredUserData","code/didInitRequiredUserData"),ellapsedOtherUserDataInit:this._marks.getDuration("code/willInitOtherUserData","code/didInitOtherUserData"),ellapsedExtensions:this._marks.getDuration("code/willLoadExtensions","code/didLoadExtensions"),ellapsedEditorRestore:this._marks.getDuration("code/willRestoreEditors","code/didRestoreEditors"),ellapsedViewletRestore:this._marks.getDuration("code/willRestoreViewlet","code/didRestoreViewlet"),ellapsedPanelRestore:this._marks.getDuration("code/willRestorePanel","code/didRestorePanel"),ellapsedWorkbench:this._marks.getDuration("code/willStartWorkbench","code/didStartWorkbench"),ellapsedExtensionsReady:this._marks.getDuration(p,"code/didLoadExtensions"),ellapsedRenderer:this._marks.getDuration("code/didStartRenderer","code/didStartWorkbench")},platform:void 0,release:void 0,arch:void 0,totalmem:void 0,freemem:void 0,meminfo:void 0,cpus:void 0,loadavg:void 0,isVMLikelyhood:void 0,initialStartup:r,hasAccessibilitySupport:this._accessibilityService.isScreenReaderOptimized(),emptyWorkbench:this._contextService.getWorkbenchState()===1};return await this._extendStartupInfo(n),n}};S=Ee([W(0,D.ILifecycleService),W(1,_.IWorkspaceContextService),W(2,A.IExtensionService),W(3,k.IUpdateService),W(4,c.IPaneCompositePartService),W(5,I.IEditorService),W(6,w.IAccessibilityService),W(7,v.ITelemetryService),W(8,o.IWorkbenchLayoutService)],S),e.AbstractTimerService=S;class s extends S{_isInitialStartup(){return!1}_didUseCachedData(){return!1}async _getWindowCount(){return 1}async _extendStartupInfo(r){r.isVMLikelyhood=0,r.platform=navigator.userAgent,r.release=navigator.appVersion}}e.TimerService=s}),define(ne[2652],re([1,0,81,75,65,40,26,1356,36,115,100,69,119,30,435,50,28,9,18]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadExtensionService=void 0;let p=class{constructor(n,h,g,d,m,b,E,y,T){this._extensionService=h,this._notificationService=g,this._extensionsWorkbenchService=d,this._hostService=m,this._extensionEnablementService=b,this._timerService=E,this._commandService=y,this._environmentService=T,this._extensionHostKind=n.extensionHostKind;const R=n;this._internalExtensionService=R.internalExtensionService,R._setExtensionHostProxy(new u(n.getProxy(_.ExtHostContext.ExtHostExtensionService))),R._setAllMainProxyIdentifiers(Object.keys(_.MainContext).map(O=>_.MainContext[O]))}dispose(){}$activateExtension(n,h){return this._internalExtensionService._activateById(n,h)}async $onWillActivateExtension(n){this._internalExtensionService._onWillActivateExtension(n)}$onDidActivateExtension(n,h,g,d,m){this._internalExtensionService._onDidActivateExtension(n,h,g,d,m)}$onExtensionRuntimeError(n,h){const g=new Error;g.name=h.name,g.message=h.message,g.stack=h.stack,this._internalExtensionService._onExtensionRuntimeError(n,g),console.error(`[${n}]${g.message}`),console.error(g.stack)}async $onExtensionActivationError(n,h,g){const d=new Error;if(d.name=h.name,d.message=h.message,d.stack=h.stack,this._internalExtensionService._onDidActivateExtensionError(n,d),g){const b=await this._extensionService.getExtension(n.value);if(b){const y=(await this._extensionsWorkbenchService.queryLocal()).find(T=>(0,v.areSameExtensions)(T.identifier,{id:g.dependency}));if(y?.local){await this._handleMissingInstalledDependency(b,y.local);return}else{await this._handleMissingNotInstalledDependency(b,g.dependency);return}}}if(!this._environmentService.isBuilt||this._environmentService.isExtensionDevelopment){this._notificationService.error(d);return}console.error(d.message)}async _handleMissingInstalledDependency(n,h){const g=n.displayName||n.name;if(this._extensionEnablementService.isEnabled(h))this._notificationService.notify({severity:t.default.Error,message:(0,D.localize)(0,null,g,h.manifest.displayName||h.manifest.name),actions:{primary:[new I.Action("reload",(0,D.localize)(1,null),"",!0,()=>this._hostService.reload())]}});else{const d=this._extensionEnablementService.getEnablementState(h);d===4?this._notificationService.notify({severity:t.default.Error,message:(0,D.localize)(2,null,g,h.manifest.displayName||h.manifest.name)}):d===0?this._notificationService.notify({severity:t.default.Error,message:(0,D.localize)(3,null,g,h.manifest.displayName||h.manifest.name),actions:{primary:[new I.Action("manageWorkspaceTrust",(0,D.localize)(4,null),"",!0,()=>this._commandService.executeCommand("workbench.trust.manage"))]}}):this._extensionEnablementService.canChangeEnablement(h)?this._notificationService.notify({severity:t.default.Error,message:(0,D.localize)(5,null,g,h.manifest.displayName||h.manifest.name),actions:{primary:[new I.Action("enable",(0,D.localize)(6,null),"",!0,()=>this._extensionEnablementService.setEnablement([h],d===6?8:9).then(()=>this._hostService.reload(),m=>this._notificationService.error(m)))]}}):this._notificationService.notify({severity:t.default.Error,message:(0,D.localize)(7,null,g,h.manifest.displayName||h.manifest.name)})}}async _handleMissingNotInstalledDependency(n,h){const g=n.displayName||n.name;let d=null;try{d=(await this._extensionsWorkbenchService.getExtensions([{id:h}],c.CancellationToken.None))[0]}catch{}d?this._notificationService.notify({severity:t.default.Error,message:(0,D.localize)(8,null,g,d.displayName),actions:{primary:[new I.Action("install",(0,D.localize)(9,null),"",!0,()=>this._extensionsWorkbenchService.install(d).then(()=>this._hostService.reload(),m=>this._notificationService.error(m)))]}}):this._notificationService.error((0,D.localize)(10,null,g,h))}async $setPerformanceMarks(n){this._extensionHostKind===1?this._timerService.setPerformanceMarks("localExtHost",n):this._extensionHostKind===2?this._timerService.setPerformanceMarks("workerExtHost",n):this._timerService.setPerformanceMarks("remoteExtHost",n)}async $asBrowserUri(n){return r.FileAccess.asBrowserUri(l.URI.revive(n))}};p=Ee([(0,f.extHostNamedCustomer)(_.MainContext.MainThreadExtensionService),W(1,A.IExtensionService),W(2,k.INotificationService),W(3,o.IExtensionsWorkbenchService),W(4,C.IHostService),W(5,w.IWorkbenchExtensionEnablementService),W(6,i.ITimerService),W(7,s.ICommandService),W(8,S.IWorkbenchEnvironmentService)],p),e.MainThreadExtensionService=p;class u{constructor(n){this._actual=n}resolveAuthority(n,h){return this._actual.$resolveAuthority(n,h)}async getCanonicalURI(n,h){const g=await this._actual.$getCanonicalURI(n,h);return g&&l.URI.revive(g)}startExtensionHost(n){return this._actual.$startExtensionHost(n)}extensionTestsExecute(){return this._actual.$extensionTestsExecute()}extensionTestsExit(n){return this._actual.$extensionTestsExit(n)}activateByEvent(n,h){return this._actual.$activateByEvent(n,h)}activate(n,h){return this._actual.$activate(n,h)}setRemoteEnvironment(n){return this._actual.$setRemoteEnvironment(n)}updateRemoteConnectionData(n){return this._actual.$updateRemoteConnectionData(n)}deltaExtensions(n,h){return this._actual.$deltaExtensions(n,h)}test_latency(n){return this._actual.$test_latency(n)}test_up(n){return this._actual.$test_up(n)}test_down(n){return this._actual.$test_down(n)}}}),define(ne[920],re([1,0,1670,9,256,61,76,42,5,52,435,40,2,72,614,954,46,83,21,23,45,14]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PerfviewInput=e.PerfviewContrib=void 0;let n=class{constructor(b,E){this._registration=E.registerTextModelContentProvider("perf",b.createInstance(g))}dispose(){this._registration.dispose()}};n=Ee([W(0,I.IInstantiationService),W(1,A.ITextModelService)],n),e.PerfviewContrib=n;let h=class es extends _.TextResourceEditorInput{constructor(b,E,y,T,R){super(es.Uri,(0,t.localize)(0,null),void 0,void 0,void 0,b,E,y,T,R)}get typeId(){return es.Id}};h.Id="PerfviewInput",h.Uri=f.URI.from({scheme:"perf",path:"Startup Performance"}),h=Ee([W(0,A.ITextModelService),W(1,l.ITextFileService),W(2,r.IEditorService),W(3,p.IFileService),W(4,u.ILabelService)],h),e.PerfviewInput=h;let g=class{constructor(b,E,y,T,R,O,x){this._modelService=b,this._languageService=E,this._editorService=y,this._lifecycleService=T,this._timerService=R,this._extensionService=O,this._productService=x,this._modelDisposables=[]}provideTextContent(b){if(!this._model||this._model.isDisposed()){(0,o.dispose)(this._modelDisposables);const E=this._languageService.createById("markdown");this._model=this._modelService.getModel(b)||this._modelService.createModel("Loading...",E,b),this._modelDisposables.push(E.onDidChange(y=>{this._model&&this._model.setMode(y)})),this._modelDisposables.push(this._extensionService.onDidChangeExtensionsStatus(this._updateModel,this)),(0,i.writeTransientState)(this._model,{wordWrapOverride:"off"},this._editorService)}return this._updateModel(),Promise.resolve(this._model)}_updateModel(){Promise.all([this._timerService.whenReady(),this._lifecycleService.when(4),this._extensionService.whenInstalledExtensionsRegistered()]).then(()=>{if(this._model&&!this._model.isDisposed()){let b=S.LoaderStats.get(),E=new d;this._addSummary(E),E.blank(),this._addSummaryTable(E,b),E.blank(),this._addExtensionsTable(E),E.blank(),this._addRawPerfMarks(E),E.blank(),this._addCachedDataStats(E),this._model.setValue(E.value)}})}_addSummary(b){const E=this._timerService.startupMetrics;b.heading(2,"System Info"),b.li(`${this._productService.nameShort}: ${this._productService.version} (${this._productService.commit||"0000000"})`),b.li(`OS: ${E.platform}(${E.release})`),E.cpus&&b.li(`CPUs: ${E.cpus.model}(${E.cpus.count} x ${E.cpus.speed})`),typeof E.totalmem=="number"&&typeof E.freemem=="number"&&b.li(`Memory(System): ${(E.totalmem/p.ByteSize.GB).toFixed(2)} GB(${(E.freemem/p.ByteSize.GB).toFixed(2)}GB free)`),E.meminfo&&b.li(`Memory(Process): ${(E.meminfo.workingSetSize/p.ByteSize.KB).toFixed(2)} MB working set(${(E.meminfo.privateBytes/p.ByteSize.KB).toFixed(2)}MB private, ${(E.meminfo.sharedBytes/p.ByteSize.KB).toFixed(2)}MB shared)`),b.li(`VM(likelihood): ${E.isVMLikelyhood}%`),b.li(`Initial Startup: ${E.initialStartup}`),b.li(`Has ${E.windowCount-1} other windows`),b.li(`Screen Reader Active: ${E.hasAccessibilitySupport}`),b.li(`Empty Workspace: ${E.emptyWorkbench}`)}_addSummaryTable(b,E){const y=this._timerService.startupMetrics,T=[];T.push(["start => app.isReady",y.timers.ellapsedAppReady,"[main]",`initial startup: ${y.initialStartup}`]),T.push(["nls:start => nls:end",y.timers.ellapsedNlsGeneration,"[main]",`initial startup: ${y.initialStartup}`]),T.push(["require(main.bundle.js)",y.timers.ellapsedLoadMainBundle,"[main]",`initial startup: ${y.initialStartup}`]),T.push(["start crash reporter",y.timers.ellapsedCrashReporter,"[main]",`initial startup: ${y.initialStartup}`]),T.push(["serve main IPC handle",y.timers.ellapsedMainServer,"[main]",`initial startup: ${y.initialStartup}`]),T.push(["create window",y.timers.ellapsedWindowCreate,"[main]",`initial startup: ${y.initialStartup}, ${y.initialStartup?`state: ${y.timers.ellapsedWindowRestoreState}ms, widget: ${y.timers.ellapsedBrowserWindowCreate}ms, show: ${y.timers.ellapsedWindowMaximize}ms`:""}`]),T.push(["app.isReady => window.loadUrl()",y.timers.ellapsedWindowLoad,"[main]",`initial startup: ${y.initialStartup}`]),T.push(["window.loadUrl() => begin to require(workbench.desktop.main.js)",y.timers.ellapsedWindowLoadToRequire,"[main->renderer]",(0,k.StartupKindToString)(y.windowKind)]),T.push(["require(workbench.desktop.main.js)",y.timers.ellapsedRequire,"[renderer]",`cached data: ${y.didUseCachedData?"YES":"NO"}${E?`, node_modules took ${E.nodeRequireTotal}ms`:""}`]),T.push(["wait for window config",y.timers.ellapsedWaitForWindowConfig,"[renderer]",void 0]),T.push(["init storage (global & workspace)",y.timers.ellapsedStorageInit,"[renderer]",void 0]),T.push(["init workspace service",y.timers.ellapsedWorkspaceServiceInit,"[renderer]",void 0]),a.isWeb&&(T.push(["init settings and global state from settings sync service",y.timers.ellapsedRequiredUserDataInit,"[renderer]",void 0]),T.push(["init keybindings, snippets & extensions from settings sync service",y.timers.ellapsedOtherUserDataInit,"[renderer]",void 0])),T.push(["register extensions & spawn extension host",y.timers.ellapsedExtensions,"[renderer]",void 0]),T.push(["restore viewlet",y.timers.ellapsedViewletRestore,"[renderer]",y.viewletId]),T.push(["restore panel",y.timers.ellapsedPanelRestore,"[renderer]",y.panelId]),T.push(["restore & resolve visible editors",y.timers.ellapsedEditorRestore,"[renderer]",`${y.editorIds.length}: ${y.editorIds.join(", ")}`]),T.push(["overall workbench load",y.timers.ellapsedWorkbench,"[renderer]",void 0]),T.push(["workbench ready",y.ellapsed,"[main->renderer]",void 0]),T.push(["renderer ready",y.timers.ellapsedRenderer,"[renderer]",void 0]),T.push(["shared process connection ready",y.timers.ellapsedSharedProcesConnected,"[renderer->sharedprocess]",void 0]),T.push(["extensions registered",y.timers.ellapsedExtensionsReady,"[renderer]",void 0]),b.heading(2,"Performance Marks"),b.table(["What","Duration","Process","Info"],T)}_addExtensionsTable(b){const E=[],y=[];let T=this._extensionService.getExtensionsStatus();for(let O in T){const{activationTimes:x}=T[O];!x||(x.activationReason.startup?E.push([O,x.activationReason.startup,x.codeLoadingTime,x.activateCallTime,x.activateResolvedTime,x.activationReason.activationEvent,x.activationReason.extensionId.value]):y.push([O,x.activationReason.startup,x.codeLoadingTime,x.activateCallTime,x.activateResolvedTime,x.activationReason.activationEvent,x.activationReason.extensionId.value]))}const R=E.concat(y);R.length>0&&(b.heading(2,"Extension Activation Stats"),b.table(["Extension","Eager","Load Code","Call Activate","Finish Activate","Event","By"],R))}_addRawPerfMarks(b){for(let[E,y]of this._timerService.getPerformanceMarks()){b.heading(2,`Raw Perf Marks: ${E}`),b.value+="```\n",b.value+=`Name Timestamp Delta Total `;let T=-1,R=0;for(const{name:O,startTime:x}of y){let F=T!==-1?x-T:0;R+=F,b.value+=`${O} ${x} ${F} ${R} `,T=x}b.value+="```\n"}}_addCachedDataStats(b){const E=new Map;E.set(63,[]),E.set(60,[]),E.set(61,[]),E.set(62,[]);for(const T of Q.getStats())E.has(T.type)&&E.get(T.type).push(T.detail);const y=T=>{if(T){T.sort();for(const R of T)b.li(`${R}`);b.blank()}};b.heading(2,"Node Cached Data Stats"),b.blank(),b.heading(3,"cached data used"),y(E.get(60)),b.heading(3,"cached data missed"),y(E.get(61)),b.heading(3,"cached data rejected"),y(E.get(62)),b.heading(3,"cached data created (lazy, might need refreshes)"),y(E.get(63))}};g=Ee([W(0,w.IModelService),W(1,D.ILanguageService),W(2,c.ICodeEditorService),W(3,k.ILifecycleService),W(4,v.ITimerService),W(5,C.IExtensionService),W(6,s.IProductService)],g);class d{constructor(){this.value=""}heading(b,E){return this.value+=`${"#".repeat(b)} ${E} `,this}blank(){return this.value+=` `,this}li(b){return this.value+=`* ${b} `,this}table(b,E){this.value+=S.LoaderStats.toMarkdownTable(b,E)}}}),define(ne[2653],re([1,0,1669,16,5,17,70,47,44,920,21]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),A.Registry.as(D.Extensions.Workbench).registerWorkbenchContribution(w.PerfviewContrib,2),A.Registry.as(I.EditorExtensions.EditorFactory).registerEditorSerializer(w.PerfviewInput.Id,class{canSerialize(){return!0}serialize(){return""}deserialize(C){return C.createInstance(w.PerfviewInput)}}),(0,f.registerAction2)(class extends f.Action2{constructor(){super({id:"perfview.show",title:{value:(0,t.localize)(0,null),original:"Startup Performance"},category:k.CATEGORIES.Developer,f1:!0})}run(C){const o=C.get(v.IEditorService),c=C.get(_.IInstantiationService);return o.openEditor(c.createInstance(w.PerfviewInput),{pinned:!0})}})}),define(ne[2654],re([1,0,1671,19,61,54,121,76,920,40,95,9,41,87,46,23,45]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StartupProfiler=void 0;let l=class{constructor(p,u,a,n,h,g,d,m,b,E,y){this._dialogService=p,this._environmentService=u,this._textModelResolverService=a,this._clipboardService=n,this._openerService=d,this._nativeHostService=m,this._productService=b,this._fileService=E,this._labelService=y,Promise.all([h.when(4),g.whenInstalledExtensionsRegistered()]).then(()=>{this._stopProfiling()})}_stopProfiling(){if(!this._environmentService.args["prof-startup-prefix"])return;const p=C.URI.file(this._environmentService.args["prof-startup-prefix"]),u=(0,f.dirname)(p),a=(0,f.basename)(p),n=["--prof-startup"];this._fileService.readFile(p).then(g=>n.push(...g.toString().split("|"))).then(()=>this._fileService.del(p,{recursive:!0})).then(()=>new Promise(g=>{const d=()=>{this._fileService.exists(p).then(m=>{m?g():setTimeout(d,500)})};d()})).then(()=>this._fileService.del(p,{recursive:!0})).then(()=>this._fileService.resolve(u).then(g=>(g.children?g.children.filter(d=>d.resource.path.includes(a)):[]).map(d=>d.resource.path))).then(g=>{const d=g.reduce((m,b)=>`${m}${this._labelService.getUriLabel((0,f.joinPath)(u,b))} `,` `);return this._dialogService.confirm({type:"info",message:(0,t.localize)(0,null),detail:(0,t.localize)(1,null,d),primaryButton:(0,t.localize)(2,null),secondaryButton:(0,t.localize)(3,null)}).then(m=>{m.confirmed?Promise.all([this._nativeHostService.showItemInFolder(C.URI.joinPath(u,g[0]).fsPath),this._createPerfIssue(g)]).then(()=>this._dialogService.confirm({type:"info",message:(0,t.localize)(4,null),detail:(0,t.localize)(5,null,this._productService.nameLong),primaryButton:(0,t.localize)(6,null),secondaryButton:void 0}).then(()=>{this._nativeHostService.relaunch({removeArgs:n})})):this._nativeHostService.relaunch({removeArgs:n})})})}async _createPerfIssue(p){const u=this._productService.reportIssueUrl;if(!u)return;const a=await this._textModelResolverService.createModelReference(I.PerfviewInput.Uri);try{await this._clipboardService.writeText(a.object.textEditorModel.getValue())}finally{a.dispose()}const n=` 1. :warning: We have copied additional data to your clipboard. Make sure to **paste** here. :warning: 1. :warning: Make sure to **attach** these files from your *home*-directory: :warning: ${p.map(d=>`-\`${d}\``).join(` `)} `,h=u,g=h.indexOf("?")===-1?"?":"&";this._openerService.open(C.URI.parse(`${h}${g}body=${encodeURIComponent(n)}`))}};l=Ee([W(0,A.IDialogService),W(1,k.INativeWorkbenchEnvironmentService),W(2,_.ITextModelService),W(3,v.IClipboardService),W(4,D.ILifecycleService),W(5,w.IExtensionService),W(6,o.IOpenerService),W(7,c.INativeHostService),W(8,i.IProductService),W(9,S.IFileService),W(10,s.ILabelService)],l),e.StartupProfiler=l}),define(ne[921],re([1,0,87,121,34,40,264,76,21,98,435,27,207,35,80,46,24,88]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.didUseCachedData=e.TimerService=void 0;let r=class extends v.AbstractTimerService{constructor(h,g,d,m,b,E,y,T,R,O,x,F,L){super(d,m,b,E,y,T,R,O,x);this._nativeHostService=h,this._environmentService=g,this._productService=F,this._storageService=L,this.setPerformanceMarks("main",g.window.perfMarks)}_isInitialStartup(){return Boolean(this._environmentService.window.isInitialStartup)}_didUseCachedData(){return a(this._productService,this._storageService,this._environmentService)}_getWindowCount(){return this._nativeHostService.getWindowCount()}async _extendStartupInfo(h){try{const[g,d,m]=await Promise.all([this._nativeHostService.getOSProperties(),this._nativeHostService.getOSStatistics(),this._nativeHostService.getOSVirtualMachineHint()]);h.totalmem=d.totalmem,h.freemem=d.freemem,h.platform=g.platform,h.release=g.release,h.arch=g.arch,h.loadavg=d.loadavg;const b=await o.process.getProcessMemoryInfo();h.meminfo={workingSetSize:b.residentSet,privateBytes:b.private,sharedBytes:b.shared},h.isVMLikelyhood=Math.round(m*100);const E=g.cpus;E&&E.length>0&&(h.cpus={count:E.length,speed:E[0].speed,model:E[0].model})}catch{}}};r=Ee([W(0,t.INativeHostService),W(1,f.INativeWorkbenchEnvironmentService),W(2,D.ILifecycleService),W(3,_.IWorkspaceContextService),W(4,A.IExtensionService),W(5,k.IUpdateService),W(6,l.IPaneCompositePartService),W(7,I.IEditorService),W(8,w.IAccessibilityService),W(9,C.ITelemetryService),W(10,i.IWorkbenchLayoutService),W(11,S.IProductService),W(12,s.IStorageService)],r),e.TimerService=r,(0,c.registerSingleton)(v.ITimerService,r);const p="perf/lastRunningCommit";let u;function a(n,h,g){return typeof u!="boolean"&&(!g.window.isCodeCaching||!n.commit?u=!1:h.get(p,0)===n.commit?u=!0:(h.store(p,n.commit,0,1),u=!1)),u}e.didUseCachedData=a}),define(ne[2655],re([1,0,11,22,106,121,76,46,27,264,87,148,21,921,435,23,9,60,114,24,88]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StartupTimings=void 0;let a=class{constructor(h,g,d,m,b,E,y,T,R,O,x,F){this._fileService=h,this._timerService=g,this._nativeHostService=d,this._editorService=m,this._paneCompositeService=b,this._telemetryService=E,this._lifecycleService=y,this._updateService=T,this._environmentService=R,this._productService=O,this._workspaceTrustService=x,this._storageService=F,this._report().catch(f.onUnexpectedError)}async _report(){const h=await this._isStandardStartup();this._appendStartupTimes(h).catch(f.onUnexpectedError)}async _appendStartupTimes(h){const g=this._environmentService.args["prof-append-timers"];if(!g)return;const{sessionId:d}=await this._telemetryService.getTelemetryInfo();Promise.all([this._timerService.whenReady(),(0,t.timeout)(15e3)]).then(async()=>{const m=s.URI.file(g),b=[];await this._fileService.exists(m)&&b.push((await this._fileService.readFile(m)).value),b.push(l.VSBuffer.fromString(`${this._timerService.startupMetrics.ellapsed} ${this._productService.nameShort} ${(this._productService.commit||"").slice(0,10)||"0000000000"} ${d} ${h===void 0?"standard_start":"NO_standard_start : "+h} `)),await this._fileService.writeFile(m,l.VSBuffer.concat(b))}).then(()=>{this._nativeHostService.exit(0)}).catch(m=>{console.error(m),this._nativeHostService.exit(0)})}async _isStandardStartup(){if(this._lifecycleService.startupKind!==1)return(0,k.StartupKindToString)(this._lifecycleService.startupKind);if(!this._workspaceTrustService.isWorkspaceTrusted())return"Workspace not trusted";const h=await this._nativeHostService.getWindowCount();if(h!==1)return"Expected window count : 1, Actual : "+h;const g=this._paneCompositeService.getActivePaneComposite(0);if(!g||g.getId()!==C.VIEWLET_ID)return"Explorer viewlet not visible";const d=this._editorService.visibleEditorPanes;if(d.length!==1)return"Expected text editor count : 1, Actual : "+d.length;if(!(0,_.isCodeEditor)(d[0].getControl()))return"Active editor is not a text editor";const m=this._paneCompositeService.getActivePaneComposite(1);if(m)return"Current active panel : "+this._paneCompositeService.getPaneComposite(m.getId(),1)?.name;if(!this._environmentService.args["no-cached-data"]&&!(0,c.didUseCachedData)(this._productService,this._storageService,this._environmentService))return"Either cache data is rejected or not created";if(!await this._updateService.isLatestVersion())return"Not on latest version, updates available"}};a=Ee([W(0,S.IFileService),W(1,i.ITimerService),W(2,v.INativeHostService),W(3,o.IEditorService),W(4,u.IPaneCompositePartService),W(5,I.ITelemetryService),W(6,k.ILifecycleService),W(7,w.IUpdateService),W(8,A.INativeWorkbenchEnvironmentService),W(9,D.IProductService),W(10,r.IWorkspaceTrustManagementService),W(11,p.IStorageService)],a),e.StartupTimings=a}),define(ne[2656],re([1,0,17,47,2654,2655]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t.Registry.as(f.Extensions.Workbench).registerWorkbenchContribution(_.StartupProfiler,3),t.Registry.as(f.Extensions.Workbench).registerWorkbenchContribution(A.StartupTimings,4)}),define(ne[507],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITitleService=void 0,e.ITitleService=(0,t.createDecorator)("titleService")}),define(ne[2657],re([1,0,90,2,69,507]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugTitleContribution=void 0;let k=class{constructor(I,w,v){this.debugService=I,this.hostService=w,this.titleService=v,this.toDispose=[];const C=()=>{I.state===2&&!w.hasFocus?v.updateProperties({prefix:"\u{1F534}"}):v.updateProperties({prefix:""})};this.toDispose.push(I.onDidChangeState(C)),this.toDispose.push(w.onDidChangeFocus(C))}dispose(){(0,f.dispose)(this.toDispose)}};k=Ee([W(0,t.IDebugService),W(1,_.IHostService),W(2,A.ITitleService)],k),e.DebugTitleContribution=k}),define(ne[2658],re([1,0,35,2504,507]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerSingleton)(_.ITitleService,f.TitlebarPart)}),define(ne[2659],re([1,0,31,50,35,212,2,741,76,144,5]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TunnelService=void 0;let C=class extends k.Disposable{constructor(i,S,s,l,r,p,u,a,n){super();this._id=i,this._addressProvider=S,this.tunnelRemoteHost=s,this.tunnelRemotePort=l,this.tunnelLocalPort=r,this.localAddress=p,this._onBeforeDispose=u,this._sharedProcessTunnelService=a,this._remoteAuthorityResolverService=n,this.privacy=A.TunnelPrivacyId.Private,this.protocol=void 0,this._updateAddress(),this._register(this._remoteAuthorityResolverService.onDidChangeConnectionData(()=>this._updateAddress()))}_updateAddress(){this._addressProvider.getAddress().then(i=>{this._sharedProcessTunnelService.setAddress(this._id,i)})}async dispose(){this._onBeforeDispose(),super.dispose(),await this._sharedProcessTunnelService.destroyTunnel(this._id)}};C=Ee([W(7,D.ISharedProcessTunnelService),W(8,w.IRemoteAuthorityResolverService)],C);let o=class extends A.AbstractTunnelService{constructor(i,S,s,l,r){super(i);this._environmentService=S,this._sharedProcessTunnelService=s,this._instantiationService=l,this._activeSharedProcessTunnels=new Set,r.onDidShutdown(()=>{this._activeSharedProcessTunnels.forEach(p=>{this._sharedProcessTunnelService.destroyTunnel(p)})})}retainOrCreateTunnel(i,S,s,l,r,p,u){const a=this.getTunnelFromMap(S,s);if(a)return++a.refcount,a.value;if(this._tunnelProvider)return this.createWithProvider(this._tunnelProvider,S,s,l,r,p,u);{this.logService.trace(`ForwardedPorts: (TunnelService) Creating tunnel without provider ${S}:${s} on local port ${l}.`);const n=this._createSharedProcessTunnel(i,S,s,l,r);return this.logService.trace("ForwardedPorts: (TunnelService) Tunnel created without provider."),this.addTunnelToMap(S,s,n),n}}async _createSharedProcessTunnel(i,S,s,l,r){const{id:p}=await this._sharedProcessTunnelService.createTunnel();this._activeSharedProcessTunnels.add(p);const u=this._environmentService.remoteAuthority,a=await this._sharedProcessTunnelService.startTunnel(u,p,S,s,l,r);return this._instantiationService.createInstance(C,p,i,S,s,a.tunnelLocalPort,a.localAddress,()=>{this._activeSharedProcessTunnels.delete(p)})}canTunnel(i){return super.canTunnel(i)&&!!this._environmentService.remoteAuthority}};o=Ee([W(0,t.ILogService),W(1,f.IWorkbenchEnvironmentService),W(2,D.ISharedProcessTunnelService),W(3,v.IInstantiationService),W(4,I.ILifecycleService)],o),e.TunnelService=o,(0,_.registerSingleton)(A.ITunnelService,o)}),define(ne[372],re([1,0,44,256,83,45,21,23,19,50,101]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UntitledTextEditorInput=void 0;let C=class ts extends f.AbstractTextResourceEditorInput{constructor(c,i,S,s,l,r,p){super(c.resource,void 0,s,i,S,l);this.model=c,this.environmentService=r,this.pathService=p,this.modelResolve=void 0,this.registerModelListeners(c)}get typeId(){return ts.ID}get editorId(){return t.DEFAULT_EDITOR_ASSOCIATION.id}registerModelListeners(c){this._register(c.onDidChangeDirty(()=>this._onDidChangeDirty.fire())),this._register(c.onDidChangeName(()=>this._onDidChangeLabel.fire())),this._register(c.onDidRevert(()=>this.dispose()))}getName(){return this.model.name}getDescription(c=1){if(!this.model.hasAssociatedFilePath){const i=this.resource.path;return i!==this.getName()?i:void 0}return super.getDescription(c)}getTitle(c){if(!this.model.hasAssociatedFilePath){const i=this.getName(),S=this.getDescription();return S&&S!==i?`${i} \u2022 ${S}`:i}return super.getTitle(c)}isDirty(){return this.model.isDirty()}getEncoding(){return this.model.getEncoding()}setEncoding(c,i){return this.model.setEncoding(c)}setLanguageId(c){this.model.setLanguageId(c)}getLanguageId(){return this.model.getLanguageId()}async resolve(){return this.modelResolve||(this.modelResolve=this.model.resolve()),await this.modelResolve,this.model}toUntyped(c){const i={resource:this.model.hasAssociatedFilePath?(0,I.toLocalResource)(this.model.resource,this.environmentService.remoteAuthority,this.pathService.defaultUriScheme):this.resource,forceUntitled:!0,options:{override:this.editorId}};return typeof c?.preserveViewState=="number"&&(i.encoding=this.getEncoding(),i.languageId=this.getLanguageId(),i.contents=this.model.isDirty()?this.model.textEditorModel?.getValue():void 0,i.options.viewState=(0,t.findViewStateForEditor)(this,c.preserveViewState,this.editorService),typeof i.contents=="string"&&!this.model.hasAssociatedFilePath&&(i.resource=void 0)),i}matches(c){return super.matches(c)?!0:c instanceof ts?(0,I.isEqual)(c.resource,this.resource):!1}dispose(){this.modelResolve=void 0,super.dispose()}};C.ID="workbench.editors.untitledEditorInput",C=Ee([W(1,_.ITextFileService),W(2,A.ILabelService),W(3,k.IEditorService),W(4,D.IFileService),W(5,w.IWorkbenchEnvironmentService),W(6,v.IPathService)],C),e.UntitledTextEditorInput=C}),define(ne[922],re([1,0,1402,10,29,19,13,9,36,14,372,44,2,755,754,568,843,21,23,5,42,20,84,452,28,79,83,430,113,8,51,106,18,108,53,198,11,26,6,98,145,125,82,12,27,167,332,1058]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H,K,G,q){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ChangeEncodingAction=e.ChangeEOLAction=e.ChangeLanguageAction=e.ShowLanguageExtensionsAction=e.EditorStatus=void 0;class Z{constructor(ve,he){this.primary=ve,this.secondary=he}getEncoding(){return this.primary.getEncoding()}async setEncoding(ve,he){await M.Promises.settled([this.primary,this.secondary].map(ge=>ge.setEncoding(ve,he)))}}class j{constructor(ve,he){this.primary=ve,this.secondary=he}setLanguageId(ve){[this.primary,this.secondary].forEach(he=>he.setLanguageId(ve))}}function X(Ce){if(Ce instanceof v.UntitledTextEditorInput)return Ce;if(Ce instanceof G.SideBySideEditorInput){const he=X(Ce.primary),ge=X(Ce.secondary);return he&&ge?new Z(he,ge):he}const ve=Ce;return(0,k.areFunctions)(ve.setEncoding,ve.getEncoding)?ve:null}function Y(Ce){if(Ce instanceof v.UntitledTextEditorInput)return Ce;if(Ce instanceof G.SideBySideEditorInput){const he=Y(Ce.primary),ge=Y(Ce.secondary);return he&&ge?new j(he,ge):he}const ve=Ce;return typeof ve.setLanguageId=="function"?ve:null}class ${constructor(){this.indentation=!1,this.selectionStatus=!1,this.languageId=!1,this.languageStatus=!1,this.encoding=!1,this.EOL=!1,this.tabFocusMode=!1,this.columnSelectionMode=!1,this.screenReaderMode=!1,this.metadata=!1}combine(ve){this.indentation=this.indentation||ve.indentation,this.selectionStatus=this.selectionStatus||ve.selectionStatus,this.languageId=this.languageId||ve.languageId,this.languageStatus=this.languageStatus||ve.languageStatus,this.encoding=this.encoding||ve.encoding,this.EOL=this.EOL||ve.EOL,this.tabFocusMode=this.tabFocusMode||ve.tabFocusMode,this.columnSelectionMode=this.columnSelectionMode||ve.columnSelectionMode,this.screenReaderMode=this.screenReaderMode||ve.screenReaderMode,this.metadata=this.metadata||ve.metadata}hasChanges(){return this.indentation||this.selectionStatus||this.languageId||this.languageStatus||this.encoding||this.EOL||this.tabFocusMode||this.columnSelectionMode||this.screenReaderMode||this.metadata}}class J{get selectionStatus(){return this._selectionStatus}get languageId(){return this._languageId}get encoding(){return this._encoding}get EOL(){return this._EOL}get indentation(){return this._indentation}get tabFocusMode(){return this._tabFocusMode}get columnSelectionMode(){return this._columnSelectionMode}get screenReaderMode(){return this._screenReaderMode}get metadata(){return this._metadata}update(ve){const he=new $;return ve.type==="selectionStatus"&&this._selectionStatus!==ve.selectionStatus&&(this._selectionStatus=ve.selectionStatus,he.selectionStatus=!0),ve.type==="indentation"&&this._indentation!==ve.indentation&&(this._indentation=ve.indentation,he.indentation=!0),ve.type==="languageId"&&this._languageId!==ve.languageId&&(this._languageId=ve.languageId,he.languageId=!0),ve.type==="encoding"&&this._encoding!==ve.encoding&&(this._encoding=ve.encoding,he.encoding=!0),ve.type==="EOL"&&this._EOL!==ve.EOL&&(this._EOL=ve.EOL,he.EOL=!0),ve.type==="tabFocusMode"&&this._tabFocusMode!==ve.tabFocusMode&&(this._tabFocusMode=ve.tabFocusMode,he.tabFocusMode=!0),ve.type==="columnSelectionMode"&&this._columnSelectionMode!==ve.columnSelectionMode&&(this._columnSelectionMode=ve.columnSelectionMode,he.columnSelectionMode=!0),ve.type==="screenReaderMode"&&this._screenReaderMode!==ve.screenReaderMode&&(this._screenReaderMode=ve.screenReaderMode,he.screenReaderMode=!0),ve.type==="metadata"&&this._metadata!==ve.metadata&&(this._metadata=ve.metadata,he.metadata=!0),he}}const ee=(0,t.localize)(0,null),te=(0,t.localize)(1,null),se=(0,t.localize)(2,null),ie=(0,t.localize)(3,null),ce=(0,t.localize)(4,null),le=(0,t.localize)(5,null);let ae=class extends o.Disposable{constructor(ve,he,ge,de,Se,we,ye,ke,Ie){super();this.editorService=ve,this.quickInputService=he,this.languageService=ge,this.textFileService=de,this.configurationService=Se,this.notificationService=we,this.accessibilityService=ye,this.statusbarService=ke,this.instantiationService=Ie,this.tabFocusModeElement=this._register(new o.MutableDisposable),this.columnSelectionModeElement=this._register(new o.MutableDisposable),this.screenRedearModeElement=this._register(new o.MutableDisposable),this.indentationElement=this._register(new o.MutableDisposable),this.selectionElement=this._register(new o.MutableDisposable),this.encodingElement=this._register(new o.MutableDisposable),this.eolElement=this._register(new o.MutableDisposable),this.languageElement=this._register(new o.MutableDisposable),this.metadataElement=this._register(new o.MutableDisposable),this.currentProblemStatus=this._register(this.instantiationService.createInstance(ue)),this.state=new J,this.activeEditorListeners=this._register(new o.DisposableStore),this.delayedRender=this._register(new o.MutableDisposable),this.toRender=null,this.screenReaderNotification=null,this.promptedScreenReader=!1,this.registerCommands(),this.registerListeners()}registerListeners(){this._register(this.editorService.onDidActiveEditorChange(()=>this.updateStatusBar())),this._register(this.textFileService.untitled.onDidChangeEncoding(ve=>this.onResourceEncodingChange(ve.resource))),this._register(this.textFileService.files.onDidChangeEncoding(ve=>this.onResourceEncodingChange(ve.resource))),this._register(h.TabFocus.onDidChangeTabFocus(()=>this.onTabFocusModeChange()))}registerCommands(){g.CommandsRegistry.registerCommand({id:"showEditorScreenReaderNotification",handler:()=>this.showScreenReaderNotification()}),g.CommandsRegistry.registerCommand({id:"changeEditorIndentation",handler:()=>this.showIndentationPicker()})}showScreenReaderNotification(){this.screenReaderNotification||(this.screenReaderNotification=this.notificationService.prompt(N.Severity.Info,(0,t.localize)(6,null),[{label:(0,t.localize)(7,null),run:()=>{this.configurationService.updateValue("editor.accessibilitySupport","on")}},{label:(0,t.localize)(8,null),run:()=>{this.configurationService.updateValue("editor.accessibilitySupport","off")}}],{sticky:!0}),B.Event.once(this.screenReaderNotification.onDidClose)(()=>this.screenReaderNotification=null))}async showIndentationPicker(){const ve=(0,R.getCodeEditor)(this.editorService.activeTextEditorControl);if(!ve)return this.quickInputService.pick([{label:(0,t.localize)(9,null)}]);if(this.editorService.activeEditor?.hasCapability(2))return this.quickInputService.pick([{label:(0,t.localize)(10,null)}]);const he=[ve.getAction(i.IndentUsingSpaces.ID),ve.getAction(i.IndentUsingTabs.ID),ve.getAction(i.DetectIndentation.ID),ve.getAction(i.IndentationToSpacesAction.ID),ve.getAction(i.IndentationToTabsAction.ID),ve.getAction(c.TrimTrailingWhitespaceAction.ID)].map(de=>({id:de.id,label:de.label,detail:w.Language.isDefaultVariant()||de.label===de.alias?void 0:de.alias,run:()=>{ve.focus(),de.run()}}));return he.splice(3,0,{type:"separator",label:(0,t.localize)(11,null)}),he.unshift({type:"separator",label:(0,t.localize)(12,null)}),(await this.quickInputService.pick(he,{placeHolder:(0,t.localize)(13,null),matchOnDetail:!0}))?.run()}updateTabFocusModeElement(ve){if(ve){if(!this.tabFocusModeElement.value){const he=(0,t.localize)(14,null);this.tabFocusModeElement.value=this.statusbarService.addEntry({name:(0,t.localize)(15,null),text:he,ariaLabel:he,tooltip:(0,t.localize)(16,null),command:"editor.action.toggleTabFocusMode",backgroundColor:(0,H.themeColorFromId)(U.STATUS_BAR_PROMINENT_ITEM_BACKGROUND),color:(0,H.themeColorFromId)(U.STATUS_BAR_PROMINENT_ITEM_FOREGROUND)},"status.editor.tabFocusMode",1,100.7)}}else this.tabFocusModeElement.clear()}updateColumnSelectionModeElement(ve){if(ve){if(!this.columnSelectionModeElement.value){const he=(0,t.localize)(17,null);this.columnSelectionModeElement.value=this.statusbarService.addEntry({name:(0,t.localize)(18,null),text:he,ariaLabel:he,tooltip:(0,t.localize)(19,null),command:"editor.action.toggleColumnSelection",backgroundColor:(0,H.themeColorFromId)(U.STATUS_BAR_PROMINENT_ITEM_BACKGROUND),color:(0,H.themeColorFromId)(U.STATUS_BAR_PROMINENT_ITEM_FOREGROUND)},"status.editor.columnSelectionMode",1,100.8)}}else this.columnSelectionModeElement.clear()}updateScreenReaderModeElement(ve){if(ve){if(!this.screenRedearModeElement.value){const he=(0,t.localize)(20,null);this.screenRedearModeElement.value=this.statusbarService.addEntry({name:(0,t.localize)(21,null),text:he,ariaLabel:he,command:"showEditorScreenReaderNotification",backgroundColor:(0,H.themeColorFromId)(U.STATUS_BAR_PROMINENT_ITEM_BACKGROUND),color:(0,H.themeColorFromId)(U.STATUS_BAR_PROMINENT_ITEM_FOREGROUND)},"status.editor.screenReaderMode",1,100.6)}}else this.screenRedearModeElement.clear()}updateSelectionElement(ve){if(!ve){this.selectionElement.clear();return}const he={name:(0,t.localize)(22,null),text:ve,ariaLabel:ve,tooltip:(0,t.localize)(23,null),command:"workbench.action.gotoLine"};this.updateElement(this.selectionElement,he,"status.editor.selection",1,100.5)}updateIndentationElement(ve){if(!ve){this.indentationElement.clear();return}const he={name:(0,t.localize)(24,null),text:ve,ariaLabel:ve,tooltip:(0,t.localize)(25,null),command:"changeEditorIndentation"};this.updateElement(this.indentationElement,he,"status.editor.indentation",1,100.4)}updateEncodingElement(ve){if(!ve){this.encodingElement.clear();return}const he={name:(0,t.localize)(26,null),text:ve,ariaLabel:ve,tooltip:(0,t.localize)(27,null),command:"workbench.action.editor.changeEncoding"};this.updateElement(this.encodingElement,he,"status.editor.encoding",1,100.3)}updateEOLElement(ve){if(!ve){this.eolElement.clear();return}const he={name:(0,t.localize)(28,null),text:ve,ariaLabel:ve,tooltip:(0,t.localize)(29,null),command:"workbench.action.editor.changeEOL"};this.updateElement(this.eolElement,he,"status.editor.eol",1,100.2)}updateLanguageIdElement(ve){if(!ve){this.languageElement.clear();return}const he={name:(0,t.localize)(30,null),text:ve,ariaLabel:ve,tooltip:(0,t.localize)(31,null),command:"workbench.action.editor.changeLanguageMode"};this.updateElement(this.languageElement,he,"status.editor.mode",1,100.1)}updateMetadataElement(ve){if(!ve){this.metadataElement.clear();return}const he={name:(0,t.localize)(32,null),text:ve,ariaLabel:ve,tooltip:(0,t.localize)(33,null)};this.updateElement(this.metadataElement,he,"status.editor.info",1,100)}updateElement(ve,he,ge,de,Se){ve.value?ve.value.update(he):ve.value=this.statusbarService.addEntry(he,ge,de,Se)}updateState(ve){const he=this.state.update(ve);!he.hasChanges()||(this.toRender?this.toRender.combine(he):(this.toRender=he,this.delayedRender.value=(0,f.runAtThisOrScheduleAtNextAnimationFrame)(()=>{this.delayedRender.clear();const ge=this.toRender;this.toRender=null,ge&&this.doRenderNow(ge)})))}doRenderNow(ve){this.updateTabFocusModeElement(!!this.state.tabFocusMode),this.updateColumnSelectionModeElement(!!this.state.columnSelectionMode),this.updateScreenReaderModeElement(!!this.state.screenReaderMode),this.updateIndentationElement(this.state.indentation),this.updateSelectionElement(this.state.selectionStatus),this.updateEncodingElement(this.state.encoding),this.updateEOLElement(this.state.EOL?this.state.EOL===`\r `?le:ce:void 0),this.updateLanguageIdElement(this.state.languageId),this.updateMetadataElement(this.state.metadata)}getSelectionLabel(ve){if(!(!ve||!ve.selections)){if(ve.selections.length===1)return ve.charactersSelected?(0,_.format)(ee,ve.selections[0].positionLineNumber,ve.selections[0].positionColumn,ve.charactersSelected):(0,_.format)(te,ve.selections[0].positionLineNumber,ve.selections[0].positionColumn);if(ve.charactersSelected)return(0,_.format)(se,ve.selections.length,ve.charactersSelected);if(ve.selections.length>0)return(0,_.format)(ie,ve.selections.length)}}updateStatusBar(){const ve=this.editorService.activeEditor,he=this.editorService.activeEditorPane,ge=he?(0,k.withNullAsUndefined)((0,R.getCodeEditor)(he.getControl())):void 0;if(this.onColumnSelectionModeChange(ge),this.onScreenReaderModeChange(ge),this.onSelectionChange(ge),this.onLanguageChange(ge,ve),this.onEOLChange(ge),this.onEncodingChange(he,ge),this.onIndentationChange(ge),this.onMetadataChange(he),this.currentProblemStatus.update(ge),this.activeEditorListeners.clear(),he&&this.activeEditorListeners.add(he.onDidChangeControl(()=>{this.updateStatusBar()})),ge)this.activeEditorListeners.add(ge.onDidChangeConfiguration(de=>{de.hasChanged(18)&&this.onColumnSelectionModeChange(ge),de.hasChanged(2)&&this.onScreenReaderModeChange(ge)})),this.activeEditorListeners.add(ge.onDidChangeCursorPosition(()=>{this.onSelectionChange(ge),this.currentProblemStatus.update(ge)})),this.activeEditorListeners.add(ge.onDidChangeModelLanguage(()=>{this.onLanguageChange(ge,ve)})),this.activeEditorListeners.add(ge.onDidChangeModelContent(de=>{this.onEOLChange(ge),this.currentProblemStatus.update(ge);const Se=ge.getSelections();if(Se){for(const we of de.changes)if(Se.some(ye=>a.Range.areIntersecting(ye,we.range))){this.onSelectionChange(ge);break}}})),this.activeEditorListeners.add(ge.onDidChangeModelOptions(()=>{this.onIndentationChange(ge)}));else if(he instanceof S.BaseBinaryResourceEditor||he instanceof s.BinaryResourceDiffEditor){const de=[];if(he instanceof s.BinaryResourceDiffEditor){const Se=he.getPrimaryEditorPane();Se instanceof S.BaseBinaryResourceEditor&&de.push(Se);const we=he.getSecondaryEditorPane();we instanceof S.BaseBinaryResourceEditor&&de.push(we)}else de.push(he);for(const Se of de)this.activeEditorListeners.add(Se.onDidChangeMetadata(()=>{this.onMetadataChange(he)})),this.activeEditorListeners.add(Se.onDidOpenInPlace(()=>{this.updateStatusBar()}))}}onLanguageChange(ve,he){let ge={type:"languageId",languageId:void 0};if(ve&&he&&Y(he)){const de=ve.getModel();if(de){const Se=de.getLanguageId();ge.languageId=(0,k.withNullAsUndefined)(this.languageService.getLanguageName(Se))}}this.updateState(ge)}onIndentationChange(ve){const he={type:"indentation",indentation:void 0};if(ve){const ge=ve.getModel();if(ge){const de=ge.getOptions();he.indentation=de.insertSpaces?(0,t.localize)(34,null,de.indentSize):(0,t.localize)(35,null,de.tabSize)}}this.updateState(he)}onMetadataChange(ve){const he={type:"metadata",metadata:void 0};(ve instanceof S.BaseBinaryResourceEditor||ve instanceof s.BinaryResourceDiffEditor)&&(he.metadata=ve.getMetadata()),this.updateState(he)}onColumnSelectionModeChange(ve){const he={type:"columnSelectionMode",columnSelectionMode:!1};ve?.getOption(18)&&(he.columnSelectionMode=!0),this.updateState(he)}onScreenReaderModeChange(ve){let he=!1;ve&&(this.accessibilityService.isScreenReaderOptimized()&&this.configurationService.getValue("editor")?.accessibilitySupport==="auto"&&(this.promptedScreenReader||(this.promptedScreenReader=!0,setTimeout(()=>this.showScreenReaderNotification(),100))),he=ve.getOption(2)===2),he===!1&&this.screenReaderNotification&&this.screenReaderNotification.close(),this.updateState({type:"screenReaderMode",screenReaderMode:he})}onSelectionChange(ve){const he=Object.create(null);if(ve){he.selections=ve.getSelections()||[],he.charactersSelected=0;const ge=ve.getModel();if(ge)for(const de of he.selections)typeof he.charactersSelected!="number"&&(he.charactersSelected=0),he.charactersSelected+=ge.getCharacterCountInRange(de);if(he.selections.length===1){const de=ve.getPosition();let Se=new n.Selection(he.selections[0].selectionStartLineNumber,he.selections[0].selectionStartColumn,he.selections[0].positionLineNumber,de?ve.getStatusbarColumn(de):he.selections[0].positionColumn);he.selections[0]=Se}}this.updateState({type:"selectionStatus",selectionStatus:this.getSelectionLabel(he)})}onEOLChange(ve){const he={type:"EOL",EOL:void 0};if(ve&&!ve.getOption(81)){const ge=ve.getModel();ge&&(he.EOL=ge.getEOL())}this.updateState(he)}onEncodingChange(ve,he){if(ve&&!this.isActiveEditor(ve))return;const ge={type:"encoding",encoding:void 0};if(ve&&he?.hasModel()){const de=ve.input?X(ve.input):null;if(de){const Se=de.getEncoding(),we=typeof Se=="string"?b.SUPPORTED_ENCODINGS[Se]:void 0;we?ge.encoding=we.labelShort:ge.encoding=Se}}this.updateState(ge)}onResourceEncodingChange(ve){const he=this.editorService.activeEditorPane;if(he){const ge=C.EditorResourceAccessor.getCanonicalUri(he.input,{supportSideBySide:C.SideBySideEditor.PRIMARY});if(ge&&(0,A.isEqual)(ge,ve)){const de=(0,k.withNullAsUndefined)((0,R.getCodeEditor)(he.getControl()));return this.onEncodingChange(he,de)}}}onTabFocusModeChange(){const ve={type:"tabFocusMode",tabFocusMode:h.TabFocus.getTabFocusMode()};this.updateState(ve)}isActiveEditor(ve){const he=this.editorService.activeEditorPane;return!!he&&he===ve}};ae=Ee([W(0,l.IEditorService),W(1,F.IQuickInputService),W(2,u.ILanguageService),W(3,m.ITextFileService),W(4,y.IConfigurationService),W(5,N.INotificationService),W(6,P.IAccessibilityService),W(7,V.IStatusbarService),W(8,p.IInstantiationService)],ae),e.EditorStatus=ae;let ue=class extends o.Disposable{constructor(ve,he,ge){super();this.statusbarService=ve,this.markerService=he,this.configurationService=ge,this.editor=void 0,this.markers=[],this.currentMarker=null,this.statusBarEntryAccessor=this._register(new o.MutableDisposable),this._register(he.onMarkerChanged(de=>this.onMarkerChanged(de))),this._register(B.Event.filter(ge.onDidChangeConfiguration,de=>de.affectsConfiguration("problems.showCurrentInStatus"))(()=>this.updateStatus()))}update(ve){this.editor=ve,this.updateMarkers(),this.updateStatus()}updateStatus(){const ve=this.currentMarker;if(this.currentMarker=this.getMarker(),this.hasToUpdateStatus(ve,this.currentMarker))if(this.currentMarker){const he=(0,_.splitLines)(this.currentMarker.message)[0],ge=`${this.getType(this.currentMarker)} ${he}`;this.statusBarEntryAccessor.value||(this.statusBarEntryAccessor.value=this.statusbarService.addEntry({name:(0,t.localize)(36,null),text:"",ariaLabel:""},"statusbar.currentProblem",0)),this.statusBarEntryAccessor.value.update({name:(0,t.localize)(37,null),text:ge,ariaLabel:ge})}else this.statusBarEntryAccessor.clear()}hasToUpdateStatus(ve,he){return!he||!ve?!0:z.IMarkerData.makeKey(ve)!==z.IMarkerData.makeKey(he)}getType(ve){switch(ve.severity){case z.MarkerSeverity.Error:return"$(error)";case z.MarkerSeverity.Warning:return"$(warning)";case z.MarkerSeverity.Info:return"$(info)"}return""}getMarker(){if(!this.configurationService.getValue("problems.showCurrentInStatus")||!this.editor||!this.editor.getModel())return null;const he=this.editor.getPosition();return he&&this.markers.find(ge=>a.Range.containsPosition(ge,he))||null}onMarkerChanged(ve){if(!this.editor)return;const he=this.editor.getModel();!he||he&&!ve.some(ge=>(0,A.isEqual)(he.uri,ge))||this.updateMarkers()}updateMarkers(){if(!this.editor)return;const ve=this.editor.getModel();!ve||(ve?(this.markers=this.markerService.read({resource:ve.uri,severities:z.MarkerSeverity.Error|z.MarkerSeverity.Warning|z.MarkerSeverity.Info}),this.markers.sort(oe)):this.markers=[],this.updateStatus())}};ue=Ee([W(0,V.IStatusbarService),W(1,z.IMarkerService),W(2,y.IConfigurationService)],ue);function oe(Ce,ve){let he=(0,_.compare)(Ce.resource.toString(),ve.resource.toString());return he===0&&(he=z.MarkerSeverity.compare(Ce.severity,ve.severity)),he===0&&(he=a.Range.compareRangesUsingStarts(Ce,ve)),he}let fe=class Ua extends I.Action{constructor(ve,he,ge){super(Ua.ID,(0,t.localize)(38,null,ve));this.fileExtension=ve,this.commandService=he,this.enabled=ge.isEnabled()}async run(){await this.commandService.executeCommand("workbench.extensions.action.showExtensionsForLanguage",this.fileExtension)}};fe.ID="workbench.action.showLanguageExtensions",fe=Ee([W(1,g.ICommandService),W(2,d.IExtensionGalleryService)],fe),e.ShowLanguageExtensionsAction=fe;let pe=class extends I.Action{constructor(ve,he,ge,de,Se,we,ye,ke,Ie,Te,De){super(ve,he);this.languageService=ge,this.editorService=de,this.configurationService=Se,this.quickInputService=we,this.preferencesService=ye,this.instantiationService=ke,this.textFileService=Ie,this.telemetryService=Te,this.languageDetectionService=De}async run(ve,he){const ge=(0,R.getCodeEditor)(this.editorService.activeTextEditorControl);if(!ge){await this.quickInputService.pick([{label:(0,t.localize)(40,null)}]);return}const de=ge.getModel(),Se=C.EditorResourceAccessor.getOriginalUri(this.editorService.activeEditor,{supportSideBySide:C.SideBySideEditor.PRIMARY});let we,ye;de&&(ye=de.getLanguageId(),we=(0,k.withNullAsUndefined)(this.languageService.getLanguageName(ye)));let ke=!!Se;Se?.scheme===O.Schemas.untitled&&!this.textFileService.untitled.get(Se)?.hasAssociatedFilePath&&(ke=!1);const Te=this.languageService.getSortedRegisteredLanguageNames().map(({languageName:Le,languageId:Me})=>{const We=this.languageService.getExtensions(Me).join(" ");let Ve;return we===Le?Ve=(0,t.localize)(41,null,Me):Ve=(0,t.localize)(42,null,Me),{label:Le,meta:We,iconClasses:(0,L.getIconClassesForLanguageId)(Me),description:Ve}});Te.unshift({type:"separator",label:(0,t.localize)(43,null)});let De,_e,Re;if(ke&&Se){const Le=(0,A.extname)(Se)||(0,A.basename)(Se);Re=this.instantiationService.createInstance(fe,Le),Re.enabled&&Te.unshift(Re),_e={label:(0,t.localize)(44,null,we)},Te.unshift(_e),De={label:(0,t.localize)(45,null,Le)},Te.unshift(De)}const Ne={label:(0,t.localize)(46,null)};Te.unshift(Ne);const xe=await this.quickInputService.pick(Te,{placeHolder:(0,t.localize)(47,null),matchOnDescription:!0});if(!xe)return;if(xe===Re){Re.run();return}if(xe===De){Se&&this.configureFileAssociation(Se);return}if(xe===_e){this.preferencesService.openUserSettings({jsonEditor:!0,revealSetting:{key:`[${(0,k.withUndefinedAsNull)(ye)}]`,edit:!0}});return}const Ae=this.editorService.activeEditor;if(Ae){const Le=Y(Ae);if(Le){let Me,We;if(xe===Ne){if(de){const Ve=C.EditorResourceAccessor.getOriginalUri(Ae,{supportSideBySide:C.SideBySideEditor.PRIMARY});if(Ve){let Ue=(0,k.withNullAsUndefined)(this.languageService.guessLanguageIdByFilepathOrFirstLine(Ve,de.getLineContent(1)));Ue||(We=await this.languageDetectionService.detectLanguage(Ve),Ue=We),Ue&&(Me=this.languageService.createById(Ue))}}}else{const Ve=this.languageService.getLanguageIdByLanguageName(xe.label);Me=this.languageService.createById(Ve),Se&&this.languageDetectionService.detectLanguage(Se).then(Ue=>{const et=this.languageService.getLanguageIdByLanguageName(xe.label)||"unknown";if(Ue===ye&&ye!==et){const Ze=this.configurationService.getValue("workbench.editor.preferHistoryBasedLanguageDetection")?"history":"classic";this.telemetryService.publicLog2(q.AutomaticLanguageDetectionLikelyWrongId,{currentLanguageId:we??"unknown",nextLanguageId:xe.label,lineCount:de?.getLineCount()??-1,modelPreference:Ze})}})}if(typeof Me!="undefined"&&(Le.setLanguageId(Me.languageId),Se?.scheme===O.Schemas.untitled)){const Ve=this.configurationService.getValue("workbench.editor.preferHistoryBasedLanguageDetection")?"history":"classic";this.telemetryService.publicLog2("setUntitledDocumentLanguage",{to:Me.languageId,from:ye??"none",modelPreference:Ve})}}ge.focus()}}configureFileAssociation(ve){const he=(0,A.extname)(ve),ge=(0,A.basename)(ve),de=this.languageService.guessLanguageIdByFilepathOrFirstLine(D.URI.file(ge)),we=this.languageService.getSortedRegisteredLanguageNames().map(({languageName:ye,languageId:ke})=>({id:ke,label:ye,iconClasses:(0,L.getIconClassesForLanguageId)(ke),description:ke===de?(0,t.localize)(48,null):void 0}));setTimeout(async()=>{const ye=await this.quickInputService.pick(we,{placeHolder:(0,t.localize)(49,null,he||ge)});if(ye){const ke=this.configurationService.inspect(r.FILES_ASSOCIATIONS_CONFIG);let Ie;he&&ge[0]!=="."?Ie=`*${he}`:Ie=ge;let Te=1;ke.workspaceValue&&!!ke.workspaceValue[Ie]&&(Te=4);const De=(0,T.deepClone)(Te===4?ke.workspaceValue:ke.userValue)||Object.create(null);De[Ie]=ye.id,this.configurationService.updateValue(r.FILES_ASSOCIATIONS_CONFIG,De,Te)}},50)}};pe.ID="workbench.action.editor.changeLanguageMode",pe.LABEL=(0,t.localize)(39,null),pe=Ee([W(2,u.ILanguageService),W(3,l.IEditorService),W(4,y.IConfigurationService),W(5,F.IQuickInputService),W(6,x.IPreferencesService),W(7,p.IInstantiationService),W(8,m.ITextFileService),W(9,K.ITelemetryService),W(10,q.ILanguageDetectionService)],pe),e.ChangeLanguageAction=pe;let me=class extends I.Action{constructor(ve,he,ge,de){super(ve,he);this.editorService=ge,this.quickInputService=de}async run(){const ve=(0,R.getCodeEditor)(this.editorService.activeTextEditorControl);if(!ve){await this.quickInputService.pick([{label:(0,t.localize)(51,null)}]);return}if(this.editorService.activeEditor?.hasCapability(2)){await this.quickInputService.pick([{label:(0,t.localize)(52,null)}]);return}let he=ve.getModel();const ge=[{label:ce,eol:0},{label:le,eol:1}],de=he?.getEOL()===` `?0:1,Se=await this.quickInputService.pick(ge,{placeHolder:(0,t.localize)(53,null),activeItem:ge[de]});if(Se){const we=(0,R.getCodeEditor)(this.editorService.activeTextEditorControl);we?.hasModel()&&!this.editorService.activeEditor?.hasCapability(2)&&(he=we.getModel(),he.pushStackElement(),he.pushEOL(Se.eol),he.pushStackElement())}ve.focus()}};me.ID="workbench.action.editor.changeEOL",me.LABEL=(0,t.localize)(50,null),me=Ee([W(2,l.IEditorService),W(3,F.IQuickInputService)],me),e.ChangeEOLAction=me;let be=class extends I.Action{constructor(ve,he,ge,de,Se,we,ye){super(ve,he);this.editorService=ge,this.quickInputService=de,this.textResourceConfigurationService=Se,this.fileService=we,this.textFileService=ye}async run(){const ve=(0,R.getCodeEditor)(this.editorService.activeTextEditorControl);if(!ve){await this.quickInputService.pick([{label:(0,t.localize)(55,null)}]);return}const he=this.editorService.activeEditorPane;if(!he){await this.quickInputService.pick([{label:(0,t.localize)(56,null)}]);return}const ge=X(he.input);if(!ge){await this.quickInputService.pick([{label:(0,t.localize)(57,null)}]);return}const de={label:(0,t.localize)(58,null)},Se={label:(0,t.localize)(59,null)};if(!w.Language.isDefaultVariant()){const Le="Save with Encoding";Le!==de.label&&(de.detail=Le);const Me="Reopen with Encoding";Me!==Se.label&&(Se.detail=Me)}let we;if(ge instanceof v.UntitledTextEditorInput?we=de:he.input.hasCapability(2)?we=Se:we=await this.quickInputService.pick([Se,de],{placeHolder:(0,t.localize)(60,null),matchOnDetail:!0}),!we)return;await(0,M.timeout)(50);const ye=C.EditorResourceAccessor.getOriginalUri(he.input,{supportSideBySide:C.SideBySideEditor.PRIMARY});if(!ye||!this.fileService.hasProvider(ye)&&ye.scheme!==O.Schemas.untitled)return;let ke;this.fileService.hasProvider(ye)&&(ke=(await this.textFileService.readStream(ye,{autoGuessEncoding:!0})).encoding);const Ie=we===Se,Te=this.textResourceConfigurationService.getValue((0,k.withNullAsUndefined)(ye),"files.encoding");let De,_e;const Re=Object.keys(b.SUPPORTED_ENCODINGS).sort((Le,Me)=>Le===Te?-1:Me===Te?1:b.SUPPORTED_ENCODINGS[Le].order-b.SUPPORTED_ENCODINGS[Me].order).filter(Le=>Le===ke&&ke!==Te?!1:!Ie||!b.SUPPORTED_ENCODINGS[Le].encodeOnly).map((Le,Me)=>(Le===ge.getEncoding()?De=Me:b.SUPPORTED_ENCODINGS[Le].alias===ge.getEncoding()&&(_e=Me),{id:Le,label:b.SUPPORTED_ENCODINGS[Le].labelLong,description:Le})),Ne=Re.slice();ke&&Te!==ke&&b.SUPPORTED_ENCODINGS[ke]&&(Re.unshift({type:"separator"}),Re.unshift({id:ke,label:b.SUPPORTED_ENCODINGS[ke].labelLong,description:(0,t.localize)(61,null)}));const xe=await this.quickInputService.pick(Re,{placeHolder:Ie?(0,t.localize)(62,null):(0,t.localize)(63,null),activeItem:Ne[typeof De=="number"?De:typeof _e=="number"?_e:-1]});if(!xe||!this.editorService.activeEditorPane)return;const Ae=X(this.editorService.activeEditorPane.input);typeof xe.id!="undefined"&&Ae&&Ae.getEncoding()!==xe.id&&await Ae.setEncoding(xe.id,Ie?1:0),ve.focus()}};be.ID="workbench.action.editor.changeEncoding",be.LABEL=(0,t.localize)(54,null),be=Ee([W(2,l.IEditorService),W(3,F.IQuickInputService),W(4,E.ITextResourceConfigurationService),W(5,r.IFileService),W(6,m.ITextFileService)],be),e.ChangeEncodingAction=be}),define(ne[2660],re([1,0,10,2,1472,12,32,922,28,126,18,8,39,129,38]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UntitledTextEditorHintContribution=void 0;const S=t.$,s="workbench.editor.untitled.hint";let l=class{constructor(u,a,n,h){this.editor=u,this.commandService=a,this.configurationService=n,this.keybindingService=h,this.toDispose=[],this.toDispose.push(this.editor.onDidChangeModel(()=>this.update())),this.toDispose.push(this.editor.onDidChangeModelLanguage(()=>this.update())),this.toDispose.push(this.configurationService.onDidChangeConfiguration(g=>{g.affectsConfiguration(s)&&this.update()}))}update(){this.untitledTextHintContentWidget?.dispose();const u=this.configurationService.getValue(s),a=this.editor.getModel();a&&a.uri.scheme===v.Schemas.untitled&&a.getLanguageId()===w.PLAINTEXT_LANGUAGE_ID&&u==="text"&&(this.untitledTextHintContentWidget=new r(this.editor,this.commandService,this.configurationService,this.keybindingService))}dispose(){(0,f.dispose)(this.toDispose),this.untitledTextHintContentWidget?.dispose()}};l.ID="editor.contrib.untitledTextEditorHint",l=Ee([W(1,I.ICommandService),W(2,C.IConfigurationService),W(3,i.IKeybindingService)],l),e.UntitledTextEditorHintContribution=l;class r{constructor(u,a,n,h){this.editor=u,this.commandService=a,this.configurationService=n,this.keybindingService=h,this.toDispose=[],this.toDispose.push(u.onDidChangeModelContent(()=>this.onDidChangeModelContent())),this.toDispose.push(this.editor.onDidChangeConfiguration(g=>{this.domNode&&g.hasChanged(44)&&this.editor.applyFontInfo(this.domNode)})),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return r.ID}getDomNode(){if(!this.domNode){this.domNode=S(".untitled-hint"),this.domNode.style.width="max-content";const u=S("a.language-mode");u.style.cursor="pointer",u.innerText=(0,_.localize)(0,null);const n=this.keybindingService.lookupKeybinding(D.ChangeLanguageAction.ID)?.getLabel();n&&(u.title=(0,_.localize)(1,null,n)),this.domNode.appendChild(u);const h=S("span");h.innerText=(0,_.localize)(2,null),this.domNode.appendChild(h);const g=S("a");g.style.cursor="pointer",g.innerText=(0,_.localize)(3,null),this.domNode.appendChild(g);const d=S("span");d.innerText=(0,_.localize)(4,null),this.domNode.appendChild(d),this.toDispose.push(c.Gesture.addTarget(this.domNode));const m=async E=>{E.stopPropagation(),this.editor.focus(),await this.commandService.executeCommand(D.ChangeLanguageAction.ID,{from:"hint"}),this.editor.focus()};this.toDispose.push(t.addDisposableListener(u,"click",m)),this.toDispose.push(t.addDisposableListener(u,c.EventType.Tap,m)),this.toDispose.push(c.Gesture.addTarget(u));const b=()=>{this.configurationService.updateValue(s,"hidden"),this.dispose(),this.editor.focus()};this.toDispose.push(t.addDisposableListener(g,"click",b)),this.toDispose.push(t.addDisposableListener(g,c.EventType.Tap,b)),this.toDispose.push(c.Gesture.addTarget(g)),this.toDispose.push(t.addDisposableListener(this.domNode,"click",()=>{this.editor.focus()})),this.domNode.style.fontStyle="italic",this.domNode.style.paddingLeft="4px",this.editor.applyFontInfo(this.domNode)}return this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[0]}}dispose(){this.editor.removeContentWidget(this),(0,f.dispose)(this.toDispose)}}r.ID="editor.widget.untitledHint",(0,A.registerThemingParticipant)((p,u)=>{const a=p.getColor(k.inputPlaceholderForeground);a&&u.addRule(`.monaco-editor .contentWidgets .untitled-hint { color: ${a}; }`);const n=p.getColor(k.textLinkForeground);n&&u.addRule(`.monaco-editor .contentWidgets .untitled-hint a { color: ${n}; }`)}),(0,o.registerEditorContribution)(l.ID,l)}),define(ne[2661],re([1,0,318,791,2376,2409,2126,2643,2269,616,2603,2128,2410,2411,2412,2413,614,2660,2129]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),define(ne[2662],re([1,0,264,103,2086]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,f.registerMainProcessRemoteService)(t.IUpdateService,"update",{channelClientCtor:_.UpdateChannelClient})}),define(ne[2663],re([1,0,407,9,103,2088,41,46,35,171,87,2089]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RelayURLService=void 0;let o=class extends C.NativeURLService{constructor(i,S,s,l){super(l);this.nativeHostService=s,this.urlService=w.ProxyChannel.toService(i.getChannel("url")),i.registerChannel("urlHandler",new A.URLHandlerChannel(this)),S.registerOpener(this)}create(i){const S=super.create(i);let s=S.query;return s?s+=`&windowId=${encodeURIComponent(this.nativeHostService.windowId)}`:s=`windowId=${encodeURIComponent(this.nativeHostService.windowId)}`,S.with({query:s})}async open(i,S){return(0,k.matchesScheme)(i,this.productService.urlProtocol)?(typeof i=="string"&&(i=f.URI.parse(i)),await this.urlService.open(i,S)):!1}async handleURL(i,S){const s=await super.open(i,S);return s&&await this.nativeHostService.focusWindow({force:!0}),s}};o=Ee([W(0,_.IMainProcessService),W(1,k.IOpenerService),W(2,v.INativeHostService),W(3,D.IProductService)],o),e.RelayURLService=o,(0,I.registerSingleton)(t.IURLService,o)}),define(ne[2664],re([1,0,2099]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebUserDataSyncEnablementService=e.UserDataSyncEnablementService=void 0;class f extends t.UserDataSyncEnablementService{get workbenchEnvironmentService(){return this.environmentService}getResourceSyncStateVersion(k){return k==="extensions"?this.workbenchEnvironmentService.options?.settingsSyncOptions?.extensionsSyncStateVersion:void 0}}e.UserDataSyncEnablementService=f;class _ extends f{constructor(){super(...arguments);this.enabled=void 0}canToggleEnablement(){return this.isTrusted()&&super.canToggleEnablement()}isEnabled(){return this.isTrusted()?(this.enabled===void 0&&(this.enabled=this.workbenchEnvironmentService.options?.settingsSyncOptions?.enabled),this.enabled===void 0&&(this.enabled=super.isEnabled()),this.enabled):!1}setEnablement(k){k&&!this.canToggleEnablement()||this.enabled!==k&&(this.enabled=k,super.setEnablement(k),this.workbenchEnvironmentService.options?.settingsSyncOptions?.enablementHandler&&this.workbenchEnvironmentService.options.settingsSyncOptions.enablementHandler(this.enabled))}getResourceSyncStateVersion(k){return k==="extensions"?this.workbenchEnvironmentService.options?.settingsSyncOptions?.extensionsSyncStateVersion:void 0}isTrusted(){return!!this.workbenchEnvironmentService.options?.workspaceProvider?.trusted}}e.WebUserDataSyncEnablementService=_}),define(ne[257],re([1,0,5,7,1917,33,63]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SYNC_MERGES_VIEW_ID=e.SYNC_VIEW_CONTAINER_ID=e.SHOW_SYNC_LOG_COMMAND_ID=e.CONFIGURE_SYNC_COMMAND_ID=e.CONTEXT_ENABLE_SYNC_MERGES_VIEW=e.CONTEXT_ENABLE_ACTIVITY_VIEWS=e.CONTEXT_ACCOUNT_STATE=e.CONTEXT_SYNC_ENABLEMENT=e.CONTEXT_SYNC_STATE=e.SYNC_VIEW_ICON=e.SYNC_TITLE=e.AccountStatus=e.getSyncAreaLabel=e.IUserDataSyncWorkbenchService=void 0,e.IUserDataSyncWorkbenchService=(0,t.createDecorator)("IUserDataSyncWorkbenchService");function D(w){switch(w){case"settings":return(0,_.localize)(0,null);case"keybindings":return(0,_.localize)(1,null);case"snippets":return(0,_.localize)(2,null);case"tasks":return(0,_.localize)(3,null);case"extensions":return(0,_.localize)(4,null);case"globalState":return(0,_.localize)(5,null)}}e.getSyncAreaLabel=D;var I;(function(w){w.Uninitialized="uninitialized",w.Unavailable="unavailable",w.Available="available"})(I=e.AccountStatus||(e.AccountStatus={})),e.SYNC_TITLE=(0,_.localize)(6,null),e.SYNC_VIEW_ICON=(0,k.registerIcon)("settings-sync-view-icon",A.Codicon.sync,(0,_.localize)(7,null)),e.CONTEXT_SYNC_STATE=new f.RawContextKey("syncStatus","uninitialized"),e.CONTEXT_SYNC_ENABLEMENT=new f.RawContextKey("syncEnabled",!1),e.CONTEXT_ACCOUNT_STATE=new f.RawContextKey("userDataSyncAccountStatus","uninitialized"),e.CONTEXT_ENABLE_ACTIVITY_VIEWS=new f.RawContextKey("enableSyncActivityViews",!1),e.CONTEXT_ENABLE_SYNC_MERGES_VIEW=new f.RawContextKey("enableSyncMergesView",!1),e.CONFIGURE_SYNC_COMMAND_ID="workbench.userDataSync.actions.configure",e.SHOW_SYNC_LOG_COMMAND_ID="workbench.userDataSync.actions.showLog",e.SYNC_VIEW_CONTAINER_ID="workbench.view.sync",e.SYNC_MERGES_VIEW_ID="workbench.views.sync.merges"}),define(ne[2665],re([1,0,10,112,91,78,162,36,11,30,143,197,22,6,92,2,14,13,9,1680,28,7,5,31,24,27,32,68,12,96,166,628,619,808,892,620,2506,322,493,59,108,426,257,321,114,191,113,40,209,66,42,1114]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H,K,G,q,Z,j,X,Y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SettingsEditor2=e.createGroupIterator=e.SettingsFocusContext=void 0;var $;(function(le){le[le.Search=0]="Search",le[le.TableOfContents=1]="TableOfContents",le[le.SettingTree=2]="SettingTree",le[le.SettingControl=3]="SettingControl"})($=e.SettingsFocusContext||(e.SettingsFocusContext={}));function J(le){return i.Iterable.map(le.children,ae=>({element:ae,children:ae instanceof L.SettingsTreeGroupElement?J(ae):void 0}))}e.createGroupIterator=J;const ee=t.$,te=(0,p.localize)(0,null),se="settingsEditorState";let ie=class Vt extends T.EditorPane{constructor(ae,ue,oe,fe,pe,me,be,Ce,ve,he,ge,de,Se,we,ye,ke){super(Vt.ID,ae,fe,he);this.configurationService=ue,this.preferencesService=pe,this.instantiationService=me,this.preferencesSearchService=be,this.logService=Ce,this.storageService=he,this.editorGroupService=ge,this.userDataSyncWorkbenchService=de,this.userDataSyncEnablementService=Se,this.workspaceTrustManagementService=we,this.extensionService=ye,this.languageService=ke,this.searchInProgress=null,this.pendingSettingUpdate=null,this._searchResultModel=null,this.searchResultLabel=null,this.lastSyncedLabel=null,this._currentFocusContext=0,this.hasWarnedMissingSettings=!1,this.tocFocusedElement=null,this.treeFocusedElement=null,this.settingsTreeScrollTop=0,this.delayedFilterLogging=new I.Delayer(1e3),this.localSearchDelayer=new I.Delayer(300),this.remoteSearchThrottle=new I.ThrottledDelayer(200),this.viewState={settingsTarget:2},this.settingFastUpdateDelayer=new I.Delayer(Vt.SETTING_UPDATE_FAST_DEBOUNCE),this.settingSlowUpdateDelayer=new I.Delayer(Vt.SETTING_UPDATE_SLOW_DEBOUNCE),this.searchInputDelayer=new I.Delayer(Vt.SEARCH_DEBOUNCE),this.updatedConfigSchemaDelayer=new I.Delayer(Vt.CONFIG_SCHEMA_UPDATE_DELAYER),this.inSettingsEditorContextKey=N.CONTEXT_SETTINGS_EDITOR.bindTo(ve),this.searchFocusContextKey=N.CONTEXT_SETTINGS_SEARCH_FOCUS.bindTo(ve),this.tocRowFocused=N.CONTEXT_TOC_ROW_FOCUS.bindTo(ve),this.settingRowFocused=N.CONTEXT_SETTINGS_ROW_FOCUS.bindTo(ve),this.scheduledRefreshes=new Map,this.editorMemento=this.getEditorMemento(ge,oe,se),this._register(ue.onDidChangeConfiguration(Ie=>{Ie.source!==6&&this.onConfigUpdate(Ie.affectedKeys)})),this._register(we.onDidChangeTrust(()=>{this.searchResultModel&&this.searchResultModel.updateWorkspaceTrust(we.isWorkspaceTrusted()),this.settingsTreeModel&&(this.settingsTreeModel.updateWorkspaceTrust(we.isWorkspaceTrusted()),this.renderTree())})),this._register(ue.onDidChangeRestrictedSettings(Ie=>{Ie.default.length&&this.currentSettingsModel&&this.updateElementsByKey([...Ie.default])})),this.modelDisposables=this._register(new S.DisposableStore),N.ENABLE_LANGUAGE_FILTER&&!Vt.SUGGESTIONS.includes(`@${N.LANGUAGE_SETTING_TAG}`)&&Vt.SUGGESTIONS.push(`@${N.LANGUAGE_SETTING_TAG}`)}static shouldSettingUpdateFast(ae){return(0,l.isArray)(ae)?!1:ae===V.SettingValueType.Enum||ae===V.SettingValueType.Array||ae===V.SettingValueType.BooleanObject||ae===V.SettingValueType.Object||ae===V.SettingValueType.Complex||ae===V.SettingValueType.Boolean||ae===V.SettingValueType.Exclude}get minimumWidth(){return Vt.EDITOR_MIN_WIDTH}get maximumWidth(){return Number.POSITIVE_INFINITY}set minimumWidth(ae){}set maximumWidth(ae){}get currentSettingsModel(){return this.searchResultModel||this.settingsTreeModel}get searchResultModel(){return this._searchResultModel}set searchResultModel(ae){this._searchResultModel=ae,this.rootElement.classList.toggle("search-mode",!!this._searchResultModel)}get focusedSettingDOMElement(){const ae=this.settingsTree.getFocus()[0];if(ae instanceof L.SettingsTreeSettingElement)return this.settingRenderers.getDOMElementsForSettingKey(this.settingsTree.getHTMLElement(),ae.setting.key)[0]}get currentFocusContext(){return this._currentFocusContext}createEditor(ae){ae.setAttribute("tabindex","-1"),this.rootElement=t.append(ae,ee(".settings-editor",{tabindex:"-1"})),this.createHeader(this.rootElement),this.createBody(this.rootElement),this.addCtrlAInterceptor(this.rootElement),this.updateStyles()}async setInput(ae,ue,oe,fe){if(this.inSettingsEditorContextKey.set(!0),await super.setInput(ae,ue,oe,fe),await(0,I.timeout)(0),!this.input)return;const pe=await this.input.resolve();fe.isCancellationRequested||!(pe instanceof z.Settings2EditorModel)||(this.modelDisposables.clear(),this.modelDisposables.add(pe.onDidChangeGroups(()=>{this.updatedConfigSchemaDelayer.trigger(()=>{this.onConfigUpdate(void 0,!1,!0)})})),this.defaultSettingsEditorModel=pe,ue=ue||(0,V.validateSettingsEditorOptions)({}),this.viewState.settingsTarget||ue.target||(ue.target=2),this._setOptions(ue),this.onConfigUpdate(void 0,!0).then(()=>{this._register(ae.onWillDispose(()=>{this.searchWidget.setValue("")})),this.updateTreeScrollSync()}))}restoreCachedState(){const ae=this.group&&this.input&&this.editorMemento.loadEditorState(this.group,this.input);if(ae&&typeof ae.target=="object"&&(ae.target=r.URI.revive(ae.target)),ae){const ue=ae.target;this.settingsTargetsWidget.settingsTarget=ue,this.viewState.settingsTarget=ue,this.searchWidget.setValue(ae.searchQuery)}return this.input&&this.editorMemento.clearEditorState(this.input,this.group),(0,l.withUndefinedAsNull)(ae)}setOptions(ae){super.setOptions(ae),ae&&this._setOptions(ae)}_setOptions(ae){ae.focusSearch&&!s.isIOS&&this.focusSearch(),ae.query&&this.searchWidget.setValue(ae.query);const ue=ae.folderUri||ae.target;ue&&(this.settingsTargetsWidget.settingsTarget=ue,this.viewState.settingsTarget=ue)}clearInput(){this.inSettingsEditorContextKey.set(!1),super.clearInput()}layout(ae){if(this.dimension=ae,!this.isVisible())return;this.layoutSplitView(ae);const oe=Math.min(1e3,ae.width)-24*2-10-this.countElement.clientWidth-this.controlsElement.clientWidth-12;this.searchWidget.layout(new t.Dimension(oe,20)),this.rootElement.classList.toggle("mid-width",ae.width<Vt.MEDIUM_TOTAL_WIDTH&&ae.width>=Vt.NARROW_TOTAL_WIDTH),this.rootElement.classList.toggle("narrow-width",ae.width<Vt.NARROW_TOTAL_WIDTH)}focus(){if(this._currentFocusContext===0)s.isIOS||this.focusSearch();else if(this._currentFocusContext===3){const ae=this.focusedSettingDOMElement;if(ae){const ue=ae.querySelector(F.AbstractSettingRenderer.CONTROL_SELECTOR);if(ue){ue.focus();return}}}else this._currentFocusContext===2?this.settingsTree.domFocus():this._currentFocusContext===1&&this.tocTree.domFocus()}setEditorVisible(ae,ue){super.setEditorVisible(ae,ue),ae||setTimeout(()=>{this.searchWidget.onHide()},0)}focusSettings(ae=!1){if(this.settingsTree.getFocus().length||this.settingsTree.focusFirst(),this.settingsTree.domFocus(),ae){const oe=this.settingsTree.getHTMLElement().querySelector(`.focused ${F.AbstractSettingRenderer.CONTROL_SELECTOR}`);oe&&oe.focus()}}focusTOC(){this.tocTree.domFocus()}showContextMenu(){const ae=this.settingsTree.getFocus()[0],ue=this.focusedSettingDOMElement;ue&&ae instanceof L.SettingsTreeSettingElement&&this.settingRenderers.showContextMenu(ae,ue)}focusSearch(ae,ue=!0){ae&&this.searchWidget&&this.searchWidget.setValue(ae),this.searchWidget.focus(ue)}clearSearchResults(){this.searchWidget.setValue(""),this.focusSearch()}clearSearchFilters(){let ae=this.searchWidget.getValue();Vt.SUGGESTIONS.forEach(ue=>{ae=ae.replace(ue,"")}),this.searchWidget.setValue(ae.trim())}updateInputAriaLabel(){let ae=te;this.searchResultLabel&&(ae+=`. ${this.searchResultLabel}`),this.lastSyncedLabel&&(ae+=`. ${this.lastSyncedLabel}`),this.searchWidget.updateAriaLabel(ae)}createHeader(ae){this.headerContainer=t.append(ae,ee(".settings-header"));const ue=t.append(this.headerContainer,ee(".search-container")),oe=new D.Action(N.SETTINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS,(0,p.localize)(1,null),E.ThemeIcon.asClassName(H.preferencesClearInputIcon),!1,async()=>this.clearSearchResults());this.searchWidget=this._register(this.instantiationService.createInstance(R.SuggestEnabledInput,`${Vt.ID}.searchbox`,ue,{triggerCharacters:["@",":"],provideResults:be=>{const Ce=be.split(/\s/g);return Ce[Ce.length-1].startsWith(`@${N.LANGUAGE_SETTING_TAG}`)?this.languageService.getRegisteredLanguageIds().map(ve=>`@${N.LANGUAGE_SETTING_TAG}${ve} `).sort():Ce[Ce.length-1].startsWith("@")?Vt.SUGGESTIONS.filter(ve=>!be.includes(ve)).map(ve=>ve.endsWith(":")?ve:ve+" "):[]}},te,"settingseditor:searchinput"+Vt.NUM_INSTANCES++,{placeholderText:te,focusContextKey:this.searchFocusContextKey})),this._register(this.searchWidget.onFocus(()=>{this._currentFocusContext=0})),this._register((0,R.attachSuggestEnabledInputBoxStyler)(this.searchWidget,this.themeService,{inputBorder:B.settingsTextInputBorder})),this.countElement=t.append(ue,t.$(".settings-count-widget.monaco-count-badge.long")),this._register((0,b.attachStylerCallback)(this.themeService,{badgeBackground:m.badgeBackground,contrastBorder:m.contrastBorder,badgeForeground:m.badgeForeground},be=>{const Ce=be.badgeBackground?be.badgeBackground.toString():"",ve=be.contrastBorder?be.contrastBorder.toString():"",he=be.badgeForeground?be.badgeForeground.toString():"";this.countElement.style.backgroundColor=Ce,this.countElement.style.color=he,this.countElement.style.borderWidth=ve?"1px":"",this.countElement.style.borderStyle=ve?"solid":"",this.countElement.style.borderColor=ve})),this._register(this.searchWidget.onInputDidChange(()=>{const be=this.searchWidget.getValue();oe.enabled=!!be,this.searchInputDelayer.trigger(()=>this.onSearchInputChanged())}));const fe=t.append(this.headerContainer,ee(".settings-header-controls"));this._register((0,b.attachStylerCallback)(this.themeService,{settingsHeaderBorder:B.settingsHeaderBorder},be=>{const Ce=be.settingsHeaderBorder?be.settingsHeaderBorder.toString():"";fe.style.borderColor=Ce}));const pe=t.append(fe,ee(".settings-target-container"));if(this.settingsTargetsWidget=this._register(this.instantiationService.createInstance(O.SettingsTargetsWidget,pe,{enableRemoteSettings:!0})),this.settingsTargetsWidget.settingsTarget=2,this.settingsTargetsWidget.onDidTargetChange(be=>this.onDidSettingsTargetChange(be)),this._register(t.addDisposableListener(pe,t.EventType.KEY_DOWN,be=>{new _.StandardKeyboardEvent(be).keyCode===18&&this.focusSettings()})),this.userDataSyncWorkbenchService.enabled&&this.userDataSyncEnablementService.canToggleEnablement()){const be=this._register(this.instantiationService.createInstance(ce,fe));this._register(be.onDidChangeLastSyncedLabel(Ce=>{this.lastSyncedLabel=Ce,this.updateInputAriaLabel()}))}this.controlsElement=t.append(ue,t.$(".settings-clear-widget")),this._register(new A.ActionBar(this.controlsElement,{animated:!1,actionViewItemProvider:be=>{}})).push([oe],{label:!1,icon:!0})}onDidSettingsTargetChange(ae){this.viewState.settingsTarget=ae,this.onConfigUpdate(void 0,!0)}onDidClickSetting(ae,ue){const oe=this.currentSettingsModel.getElementsByName(ae.targetKey);if(oe&&oe[0]){let fe=.5;try{const me=this.settingsTree.getRelativeTop(ae.source);me!==null&&(fe=me)}catch{}this.settingsTree.reveal(oe[0],fe),setTimeout(()=>this.settingsTree.setFocus([oe[0]]),50);const pe=this.settingRenderers.getDOMElementsForSettingKey(this.settingsTree.getHTMLElement(),ae.targetKey);if(pe&&pe[0]){const me=pe[0].querySelector(F.AbstractSettingRenderer.CONTROL_SELECTOR);me&&me.focus()}}else ue||this.triggerSearch("").then(()=>{this.searchWidget.setValue(""),this.onDidClickSetting(ae,!0)})}switchToSettingsFile(){const ae=(0,L.parseQuery)(this.searchWidget.getValue()).query;return this.openSettingsFile({query:ae})}async openSettingsFile(ae){const ue=this.settingsTargetsWidget.settingsTarget,oe={jsonEditor:!0,...ae};if(ue===2)return this.preferencesService.openUserSettings(oe);if(ue===3)return this.preferencesService.openRemoteSettings(oe);if(ue===4)return this.preferencesService.openWorkspaceSettings(oe);if(r.URI.isUri(ue))return this.preferencesService.openFolderSettings({folderUri:ue,...oe})}createBody(ae){this.bodyContainer=t.append(ae,ee(".settings-body")),this.noResultsMessage=t.append(this.bodyContainer,ee(".no-results-message")),this.noResultsMessage.innerText=(0,p.localize)(2,null),this.clearFilterLinkContainer=ee("span.clear-search-filters"),this.clearFilterLinkContainer.textContent=" - ";const ue=t.append(this.clearFilterLinkContainer,ee("a.pointer.prominent",{tabindex:0},(0,p.localize)(3,null)));this._register(t.addDisposableListener(ue,t.EventType.CLICK,pe=>{t.EventHelper.stop(pe,!1),this.clearSearchFilters()})),t.append(this.noResultsMessage,this.clearFilterLinkContainer),this._register((0,b.attachStylerCallback)(this.themeService,{editorForeground:m.editorForeground},pe=>{this.noResultsMessage.style.color=pe.editorForeground?pe.editorForeground.toString():""})),this.tocTreeContainer=ee(".settings-toc-container"),this.settingsTreeContainer=ee(".settings-tree-container"),this.createTOC(this.tocTreeContainer),this.createSettingsTree(this.settingsTreeContainer),this.splitView=new j.SplitView(this.bodyContainer,{orientation:1,proportionalLayout:!0});const oe=this.storageService.getNumber("settingsEditor2.splitViewWidth",0,Vt.TOC_RESET_WIDTH);this.splitView.addView({onDidChange:c.Event.None,element:this.tocTreeContainer,minimumSize:Vt.TOC_MIN_WIDTH,maximumSize:Number.POSITIVE_INFINITY,layout:(pe,me,be)=>{this.tocTreeContainer.style.width=`${pe}px`,this.tocTree.layout(be,pe)}},oe,void 0,!0),this.splitView.addView({onDidChange:c.Event.None,element:this.settingsTreeContainer,minimumSize:Vt.EDITOR_MIN_WIDTH,maximumSize:Number.POSITIVE_INFINITY,layout:(pe,me,be)=>{this.settingsTreeContainer.style.width=`${pe}px`,this.settingsTree.layout(be,pe)}},j.Sizing.Distribute,void 0,!0),this._register(this.splitView.onDidSashReset(()=>{const pe=this.splitView.getViewSize(0)+this.splitView.getViewSize(1);this.splitView.resizeView(0,Vt.TOC_RESET_WIDTH),this.splitView.resizeView(1,pe-Vt.TOC_RESET_WIDTH)})),this._register(this.splitView.onDidSashChange(()=>{const pe=this.splitView.getViewSize(0);this.storageService.store("settingsEditor2.splitViewWidth",pe,0,0)}));const fe=this.theme.getColor(B.settingsSashBorder);this.splitView.style({separatorBorder:fe})}addCtrlAInterceptor(ae){this._register(t.addStandardDisposableListener(ae,t.EventType.KEY_DOWN,ue=>{ue.keyCode===31&&(s.isMacintosh?ue.metaKey:ue.ctrlKey)&&ue.target.tagName!=="TEXTAREA"&&ue.target.tagName!=="INPUT"&&(ue.browserEvent.stopPropagation(),ue.browserEvent.preventDefault())}))}createTOC(ae){this.tocTreeModel=this.instantiationService.createInstance(M.TOCTreeModel,this.viewState),this.tocTree=this._register(this.instantiationService.createInstance(M.TOCTree,t.append(ae,ee(".settings-toc-wrapper",{role:"navigation","aria-label":(0,p.localize)(4,null)})),this.viewState)),this._register(this.tocTree.onDidFocus(()=>{this._currentFocusContext=1})),this._register(this.tocTree.onDidChangeFocus(ue=>{const oe=ue.elements[0];this.tocFocusedElement!==oe&&(this.tocFocusedElement=oe,this.tocTree.setSelection(oe?[oe]:[]),this.searchResultModel?this.viewState.filterToCategory!==oe&&(this.viewState.filterToCategory=(0,l.withNullAsUndefined)(oe),this.renderTree(),this.settingsTree.scrollTop=0):oe&&(!ue.browserEvent||!ue.browserEvent.fromScroll)&&(this.settingsTree.reveal(oe,0),this.settingsTree.setFocus([oe])))})),this._register(this.tocTree.onDidFocus(()=>{this.tocRowFocused.set(!0)})),this._register(this.tocTree.onDidBlur(()=>{this.tocRowFocused.set(!1)}))}createSettingsTree(ae){this.settingRenderers=this.instantiationService.createInstance(F.SettingTreeRenderers),this._register(this.settingRenderers.onDidChangeSetting(ue=>this.onDidChangeSetting(ue.key,ue.value,ue.type,ue.manualReset))),this._register(this.settingRenderers.onDidOpenSettings(ue=>{this.openSettingsFile({revealSetting:{key:ue,edit:!0}})})),this._register(this.settingRenderers.onDidClickSettingLink(ue=>this.onDidClickSetting(ue))),this._register(this.settingRenderers.onDidFocusSetting(ue=>{this.settingsTree.setFocus([ue]),this._currentFocusContext=3,this.settingRowFocused.set(!1)})),this._register(this.settingRenderers.onDidClickOverrideElement(ue=>{ue.scope.toLowerCase()==="workspace"?this.settingsTargetsWidget.updateTarget(4):ue.scope.toLowerCase()==="user"?this.settingsTargetsWidget.updateTarget(2):ue.scope.toLowerCase()==="remote"&&this.settingsTargetsWidget.updateTarget(3),this.searchWidget.setValue(ue.targetKey)})),this._register(this.settingRenderers.onDidChangeSettingHeight(ue=>{const{element:oe,height:fe}=ue;try{this.settingsTree.updateElementHeight(oe,fe)}catch{}})),this._register(this.settingRenderers.onApplyLanguageFilter(ue=>{this.focusSearch(`@${N.LANGUAGE_SETTING_TAG}${ue}`)})),this.settingsTree=this._register(this.instantiationService.createInstance(F.SettingsTree,ae,this.viewState,this.settingRenderers.allRenderers)),this._register(this.settingsTree.onDidScroll(()=>{this.settingsTree.scrollTop!==this.settingsTreeScrollTop&&(this.settingsTreeScrollTop=this.settingsTree.scrollTop,setTimeout(()=>{this.updateTreeScrollSync()},0))})),this._register(this.settingsTree.onDidFocus(()=>{document.activeElement?.classList.contains("monaco-list")&&(this._currentFocusContext=2,this.settingRowFocused.set(!0))})),this._register(this.settingsTree.onDidBlur(()=>{this.settingRowFocused.set(!1)})),this._register(this.settingsTree.onDidChangeFocus(ue=>{const oe=ue.elements[0];this.treeFocusedElement!==oe&&(this.treeFocusedElement&&(this.treeFocusedElement.tabbable=!1),this.treeFocusedElement=oe,this.treeFocusedElement&&(this.treeFocusedElement.tabbable=!0),this.settingsTree.setSelection(oe?[oe]:[]))}))}onDidChangeSetting(ae,ue,oe,fe){const me=(0,L.parseQuery)(this.searchWidget.getValue()).languageFilter;this.pendingSettingUpdate&&this.pendingSettingUpdate.key!==ae&&this.updateChangedSetting(ae,ue,fe,me),this.pendingSettingUpdate={key:ae,value:ue,languageFilter:me},Vt.shouldSettingUpdateFast(oe)?this.settingFastUpdateDelayer.trigger(()=>this.updateChangedSetting(ae,ue,fe,me)):this.settingSlowUpdateDelayer.trigger(()=>this.updateChangedSetting(ae,ue,fe,me))}updateTreeScrollSync(){if(this.settingRenderers.cancelSuggesters(),this.searchResultModel||!this.tocTreeModel)return;const ae=this.settingsTree.firstVisibleElement,ue=ae instanceof L.SettingsTreeSettingElement?ae.parent:ae instanceof L.SettingsTreeGroupElement?ae:null;let oe=!0;try{this.tocTree.getNode(ue)}catch{oe=!1}if(!!oe&&ue&&this.tocTree.getSelection()[0]!==ue){const fe=this.getAncestors(ue);fe.forEach(be=>this.tocTree.expand(be)),this.tocTree.reveal(ue);const pe=this.tocTree.getRelativeTop(ue);if(typeof pe!="number")return;this.tocTree.collapseAll(),fe.forEach(be=>this.tocTree.expand(be)),pe<0||pe>1?this.tocTree.reveal(ue):this.tocTree.reveal(ue,pe),this.tocTree.expand(ue),this.tocTree.setSelection([ue]);const me=new KeyboardEvent("keydown");me.fromScroll=!0,this.tocTree.setFocus([ue],me)}}getAncestors(ae){const ue=[];for(;ae.parent;)ae.parent.id!=="root"&&ue.push(ae.parent),ae=ae.parent;return ue.reverse()}updateChangedSetting(ae,ue,oe,fe){const pe=this.settingsTargetsWidget.settingsTarget,me=r.URI.isUri(pe)?pe:void 0,be=me?5:pe,Ce={resource:me,overrideIdentifiers:fe?[fe]:void 0},he=be===4||be===5||!!fe,ge=he?oe:ue===void 0,de=this.configurationService.inspect(ae,Ce);return!he&&de.defaultValue===ue&&(ue=void 0),this.configurationService.updateValue(ae,ue,Ce,be).then(()=>{const Se=this.searchWidget.getValue();Se.includes(`@${N.MODIFIED_SETTING_TAG}`)&&this.refreshTOCTree(),this.renderTree(ae,ge);const we={key:ae,query:Se,searchResults:this.searchResultModel&&this.searchResultModel.getUniqueResults(),rawResults:this.searchResultModel&&this.searchResultModel.getRawResults(),showConfiguredOnly:!!this.viewState.tagFilters&&this.viewState.tagFilters.has(N.MODIFIED_SETTING_TAG),isReset:typeof ue=="undefined",settingsTarget:this.settingsTargetsWidget.settingsTarget};return this.reportModifiedSetting(we)})}reportModifiedSetting(ae){this.pendingSettingUpdate=null;let ue,oe,fe;if(ae.searchResults){const be=ae.searchResults[1],Ce=ae.searchResults[0],ve=Ce.filterMatches.findIndex(he=>he.setting.key===ae.key);if(ue=ve>=0?"local":"remote",fe=ve>=0?ve:be&&be.filterMatches.findIndex(he=>he.setting.key===ae.key)+Ce.filterMatches.length,this.searchResultModel){const he=this.searchResultModel.getRawResults();if(he[1]){const ge=he[1].filterMatches.findIndex(de=>de.setting.key===ae.key);oe=ge>=0?ge:void 0}}}const pe=ae.settingsTarget===2?"user":ae.settingsTarget===3?"user_remote":ae.settingsTarget===4?"workspace":"folder",me={key:ae.key,groupId:ue,nlpIndex:oe,displayIndex:fe,showConfiguredOnly:ae.showConfiguredOnly,isReset:ae.isReset,target:pe};this.telemetryService.publicLog("settingsEditor.settingModified",me)}onSearchModeToggled(){this.rootElement.classList.remove("no-toc-search"),this.configurationService.getValue("workbench.settings.settingsSearchTocBehavior")==="hide"&&this.rootElement.classList.toggle("no-toc-search",!!this.searchResultModel)}scheduleRefresh(ae,ue=""){if(ue&&this.scheduledRefreshes.has(ue))return;ue||((0,S.dispose)(this.scheduledRefreshes.values()),this.scheduledRefreshes.clear());const oe=t.trackFocus(ae);this.scheduledRefreshes.set(ue,oe),oe.onDidBlur(()=>{oe.dispose(),this.scheduledRefreshes.delete(ue),this.onConfigUpdate([ue])})}async onConfigUpdate(ae,ue=!1,oe=!1){if(ae&&this.settingsTreeModel)return this.updateElementsByKey(ae);const fe=this.defaultSettingsEditorModel.settingsGroups.slice(1),pe=v.groupBy(fe,ve=>ve.extensionInfo?"extension":"core"),me=(0,F.resolveSettingsTree)(x.tocData,pe.core,this.logService),be=me.tree;if(me.leftoverSettings.size&&!this.hasWarnedMissingSettings){const ve=[];me.leftoverSettings.forEach(he=>{ve.push(he.key)}),this.logService.warn(`SettingsEditor2: Settings not included in settingsLayout.ts: ${ve.join(", ")}`),this.hasWarnedMissingSettings=!0}const Ce=(0,F.resolveSettingsTree)(x.commonlyUsedData,pe.core,this.logService);if(be.children.unshift(Ce.tree),be.children.push(await(0,F.createTocTreeForExtensionSettings)(this.extensionService,pe.extension||[])),!this.workspaceTrustManagementService.isWorkspaceTrusted()&&(this.viewState.settingsTarget instanceof r.URI||this.viewState.settingsTarget===4)){const ve=(0,F.resolveConfiguredUntrustedSettings)(fe,this.viewState.settingsTarget,this.viewState.languageFilter,this.configurationService);ve.length&&be.children.unshift({id:"workspaceTrust",label:(0,p.localize)(5,null),settings:ve})}if(this.searchResultModel&&this.searchResultModel.updateChildren(),this.settingsTreeModel){if(this.settingsTreeModel.update(be),oe&&!!this.searchResultModel)return await this.onSearchInputChanged();this.refreshTOCTree(),this.renderTree(void 0,ue)}else{this.settingsTreeModel=this.instantiationService.createInstance(L.SettingsTreeModel,this.viewState,this.workspaceTrustManagementService.isWorkspaceTrusted()),this.settingsTreeModel.update(be),this.tocTreeModel.settingsTreeRoot=this.settingsTreeModel.root;const ve=this.restoreCachedState();ve&&ve.searchQuery||!!this.searchWidget.getValue()?await this.onSearchInputChanged():(this.refreshTOCTree(),this.refreshTree(),this.tocTree.collapseAll())}}updateElementsByKey(ae){if(ae.length)this.searchResultModel&&ae.forEach(ue=>this.searchResultModel.updateElementsByName(ue)),this.settingsTreeModel&&ae.forEach(ue=>this.settingsTreeModel.updateElementsByName(ue)),ae.forEach(ue=>this.renderTree(ue));else return this.renderTree()}getActiveControlInSettingsTree(){return document.activeElement&&t.isAncestor(document.activeElement,this.settingsTree.getHTMLElement())?document.activeElement:null}renderTree(ae,ue=!1){if(!ue&&ae&&this.scheduledRefreshes.has(ae)){this.updateModifiedLabelForKey(ae);return}if(this.contextViewFocused()){const pe=document.querySelector(".context-view");pe&&this.scheduleRefresh(pe,ae);return}const oe=this.getActiveControlInSettingsTree(),fe=oe&&this.settingRenderers.getSettingDOMElementForDOMElement(oe);if(fe&&!ue)if(ae){if(fe.getAttribute(F.AbstractSettingRenderer.SETTING_KEY_ATTR)===ae&&fe.parentElement&&!fe.parentElement.classList.contains("setting-item-list")){this.updateModifiedLabelForKey(ae),this.scheduleRefresh(fe,ae);return}}else{this.scheduleRefresh(fe);return}if(this.renderResultCountMessages(),ae){const pe=this.currentSettingsModel.getElementsByName(ae);if(pe&&pe.length)this.refreshTree();else return}else this.refreshTree()}contextViewFocused(){return!!t.findParentWithClass(document.activeElement,"context-view")}refreshTree(){this.isVisible()&&this.settingsTree.setChildren(null,J(this.currentSettingsModel.root))}refreshTOCTree(){this.isVisible()&&(this.tocTreeModel.update(),this.tocTree.setChildren(null,(0,M.createTOCIterator)(this.tocTreeModel,this.tocTree)))}updateModifiedLabelForKey(ae){const ue=this.currentSettingsModel.getElementsByName(ae),oe=ue&&ue[0]&&ue[0].isConfigured,fe=this.settingRenderers.getDOMElementsForSettingKey(this.settingsTree.getHTMLElement(),ae);fe&&fe[0]&&fe[0].classList.toggle("is-configured",!!oe)}async onSearchInputChanged(){if(!this.currentSettingsModel)return;const ae=this.searchWidget.getValue().trim();this.delayedFilterLogging.cancel(),await this.triggerSearch(ae.replace(/\u203A/g," ")),ae&&this.searchResultModel&&this.delayedFilterLogging.trigger(()=>this.reportFilteringUsed(ae,this.searchResultModel.getUniqueResults()))}parseSettingFromJSON(ae){const ue=ae.match(/"([a-zA-Z.]+)": /);return ue&&ue[1]}triggerSearch(ae){if(this.viewState.tagFilters=new Set,this.viewState.extensionFilters=new Set,this.viewState.featureFilters=new Set,this.viewState.idFilters=new Set,this.viewState.languageFilter=void 0,ae){const ue=(0,L.parseQuery)(ae);ae=ue.query,ue.tags.forEach(oe=>this.viewState.tagFilters.add(oe)),ue.extensionFilters.forEach(oe=>this.viewState.extensionFilters.add(oe)),ue.featureFilters.forEach(oe=>this.viewState.featureFilters.add(oe)),ue.idFilters.forEach(oe=>this.viewState.idFilters.add(oe)),this.viewState.languageFilter=ue.languageFilter}return ae&&ae!=="@"?(ae=this.parseSettingFromJSON(ae)||ae,this.triggerFilterPreferences(ae)):(this.viewState.tagFilters.size||this.viewState.extensionFilters.size||this.viewState.featureFilters.size||this.viewState.idFilters.size||this.viewState.languageFilter?this.searchResultModel=this.createFilterModel():this.searchResultModel=null,this.localSearchDelayer.cancel(),this.remoteSearchThrottle.cancel(),this.searchInProgress&&(this.searchInProgress.cancel(),this.searchInProgress.dispose(),this.searchInProgress=null),this.tocTree.setFocus([]),this.viewState.filterToCategory=void 0,this.tocTreeModel.currentSearchModel=this.searchResultModel,this.onSearchModeToggled(),this.searchResultModel?(this.tocTree.setSelection([]),this.tocTree.expandAll(),this.refreshTOCTree(),this.renderResultCountMessages(),this.refreshTree()):(this.tocTree.collapseAll(),this.refreshTOCTree(),this.renderResultCountMessages(),this.refreshTree()),Promise.resolve())}createFilterModel(){const ae=this.instantiationService.createInstance(L.SearchResultModel,this.viewState,this.workspaceTrustManagementService.isWorkspaceTrusted()),ue={filterMatches:[]};for(const oe of this.defaultSettingsEditorModel.settingsGroups.slice(1))for(const fe of oe.sections)for(const pe of fe.settings)ue.filterMatches.push({setting:pe,matches:[],matchType:V.SettingMatchType.None,score:0});return ae.setResult(0,ue),ae}reportFilteringUsed(ae,ue){const oe=ue[1],fe=oe?.metadata,pe={nlpResult:fe?.duration},me={},be=ue[0];be&&(me.filterResult=be.filterMatches.length),oe&&(me.nlpResult=oe.filterMatches.length);const Ce=fe?.requestCount,ve={durations:pe,counts:me,requestCount:Ce};this.telemetryService.publicLog("settingsEditor.filter",ve)}triggerFilterPreferences(ae){this.searchInProgress&&(this.searchInProgress.cancel(),this.searchInProgress=null);const ue=this.searchInProgress=new w.CancellationTokenSource;return this.localSearchDelayer.trigger(()=>ue&&!ue.token.isCancellationRequested?this.localFilterPreferences(ae).then(oe=>{oe&&!oe.exactMatch&&this.remoteSearchThrottle.trigger(()=>ue&&!ue.token.isCancellationRequested?this.remoteSearchPreferences(ae,this.searchInProgress.token):Promise.resolve())}):Promise.resolve())}localFilterPreferences(ae,ue){const oe=this.preferencesSearchService.getLocalSearchProvider(ae);return this.filterOrSearchPreferences(ae,0,oe,ue)}remoteSearchPreferences(ae,ue){const oe=this.preferencesSearchService.getRemoteSearchProvider(ae),fe=this.preferencesSearchService.getRemoteSearchProvider(ae,!0);return Promise.all([this.filterOrSearchPreferences(ae,1,oe,ue),this.filterOrSearchPreferences(ae,2,fe,ue)]).then(()=>{})}filterOrSearchPreferences(ae,ue,oe,fe){return this._filterOrSearchPreferencesModel(ae,this.defaultSettingsEditorModel,oe,fe).then(pe=>fe&&fe.isCancellationRequested?null:(this.searchResultModel?(this.searchResultModel.setResult(ue,pe),this.tocTreeModel.update()):(this.searchResultModel=this.instantiationService.createInstance(L.SearchResultModel,this.viewState,this.workspaceTrustManagementService.isWorkspaceTrusted()),this.searchResultModel.setResult(ue,pe),this.tocTreeModel.currentSearchModel=this.searchResultModel,this.onSearchModeToggled()),ue===0&&(this.tocTree.setFocus([]),this.viewState.filterToCategory=void 0,this.tocTree.expandAll()),this.settingsTree.scrollTop=0,this.refreshTOCTree(),this.renderTree(void 0,!0),pe))}renderResultCountMessages(){if(!!this.currentSettingsModel){if(this.clearFilterLinkContainer.style.display=this.viewState.tagFilters&&this.viewState.tagFilters.size>0?"initial":"none",!this.searchResultModel){this.countElement.style.display!=="none"&&(this.searchResultLabel=null,this.updateInputAriaLabel(),this.countElement.style.display="none",this.layout(this.dimension)),this.rootElement.classList.remove("no-results"),this.splitView.el.style.visibility="visible";return}if(this.tocTreeModel&&this.tocTreeModel.settingsTreeRoot){const ae=this.tocTreeModel.settingsTreeRoot.count;let ue;switch(ae){case 0:ue=(0,p.localize)(6,null);break;case 1:ue=(0,p.localize)(7,null);break;default:ue=(0,p.localize)(8,null,ae)}this.searchResultLabel=ue,this.updateInputAriaLabel(),this.countElement.innerText=ue,f.status(ue),this.countElement.style.display!=="block"&&(this.countElement.style.display="block",this.layout(this.dimension)),this.rootElement.classList.toggle("no-results",ae===0),this.splitView.el.style.visibility=ae===0?"hidden":"visible"}}}_filterOrSearchPreferencesModel(ae,ue,oe,fe){return(oe?oe.searchModel(ue,fe):Promise.resolve(null)).then(void 0,me=>{if((0,o.isCancellationError)(me))return Promise.reject(me);{const be=(0,o.getErrorMessage)(me).trim();return be&&be!=="Error"&&(this.telemetryService.publicLogError("settingsEditor.searchError",{message:be}),this.logService.info("Setting search error: "+be)),null}})}layoutSplitView(ae){const ue=ae.height-(72+11+14);this.splitView.el.style.height=`${ue}px`,this.splitView.layout(this.bodyContainer.clientWidth,ue);const oe=this.splitView.isViewVisible(0),fe=this.bodyContainer.clientWidth>=Vt.NARROW_TOTAL_WIDTH;this.splitView.setViewVisible(0,fe),!oe&&fe&&this.bodyContainer.clientWidth>=Vt.EDITOR_MIN_WIDTH+Vt.TOC_RESET_WIDTH&&this.splitView.resizeView(0,Vt.TOC_RESET_WIDTH),this.splitView.style({separatorBorder:fe?this.theme.getColor(B.settingsSashBorder)??X.Color.transparent:X.Color.transparent})}saveState(){if(this.isVisible()){const ae=this.searchWidget.getValue().trim(),ue=this.settingsTargetsWidget.settingsTarget;this.group&&this.input&&this.editorMemento.saveEditorState(this.group,this.input,{searchQuery:ae,target:ue})}else this.group&&this.input&&this.editorMemento.clearEditorState(this.input,this.group);super.saveState()}};ie.ID="workbench.editor.settings2",ie.NUM_INSTANCES=0,ie.SEARCH_DEBOUNCE=200,ie.SETTING_UPDATE_FAST_DEBOUNCE=200,ie.SETTING_UPDATE_SLOW_DEBOUNCE=1e3,ie.CONFIG_SCHEMA_UPDATE_DELAYER=500,ie.TOC_MIN_WIDTH=100,ie.TOC_RESET_WIDTH=200,ie.EDITOR_MIN_WIDTH=500,ie.NARROW_TOTAL_WIDTH=ie.TOC_RESET_WIDTH+ie.EDITOR_MIN_WIDTH,ie.MEDIUM_TOTAL_WIDTH=1e3,ie.SUGGESTIONS=[`@${N.MODIFIED_SETTING_TAG}`,"@tag:notebookLayout",`@tag:${N.REQUIRE_TRUSTED_WORKSPACE_SETTING_TAG}`,`@tag:${N.WORKSPACE_TRUST_SETTING_TAG}`,"@tag:sync","@tag:usesOnlineServices","@tag:telemetry",`@${N.ID_SETTING_TAG}`,`@${N.EXTENSION_SETTING_TAG}`,`@${N.FEATURE_SETTING_TAG}scm`,`@${N.FEATURE_SETTING_TAG}explorer`,`@${N.FEATURE_SETTING_TAG}search`,`@${N.FEATURE_SETTING_TAG}debug`,`@${N.FEATURE_SETTING_TAG}extensions`,`@${N.FEATURE_SETTING_TAG}terminal`,`@${N.FEATURE_SETTING_TAG}task`,`@${N.FEATURE_SETTING_TAG}problems`,`@${N.FEATURE_SETTING_TAG}output`,`@${N.FEATURE_SETTING_TAG}comments`,`@${N.FEATURE_SETTING_TAG}remote`,`@${N.FEATURE_SETTING_TAG}timeline`,`@${N.FEATURE_SETTING_TAG}notebook`],ie=Ee([W(0,d.ITelemetryService),W(1,G.IWorkbenchConfigurationService),W(2,q.ITextResourceConfigurationService),W(3,E.IThemeService),W(4,V.IPreferencesService),W(5,n.IInstantiationService),W(6,N.IPreferencesSearchService),W(7,h.ILogService),W(8,a.IContextKeyService),W(9,g.IStorageService),W(10,P.IEditorGroupsService),W(11,U.IUserDataSyncWorkbenchService),W(12,y.IUserDataSyncEnablementService),W(13,K.IWorkspaceTrustManagementService),W(14,Z.IExtensionService),W(15,Y.ILanguageService)],ie),e.SettingsEditor2=ie;let ce=class extends S.Disposable{constructor(ae,ue,oe,fe,pe){super();this.commandService=ue,this.userDataSyncService=oe,this.userDataSyncEnablementService=fe,this._onDidChangeLastSyncedLabel=this._register(new c.Emitter),this.onDidChangeLastSyncedLabel=this._onDidChangeLastSyncedLabel.event;const me=t.append(ae,ee(".settings-right-controls")),be=t.append(me,ee(".turn-on-sync"));this.turnOnSyncButton=this._register(new k.Button(be,{title:!0})),this._register((0,b.attachButtonStyler)(this.turnOnSyncButton,pe)),this.lastSyncedLabel=t.append(me,ee(".last-synced-label")),t.hide(this.lastSyncedLabel),this.turnOnSyncButton.enabled=!0,this.turnOnSyncButton.label=(0,p.localize)(9,null),t.hide(this.turnOnSyncButton.element),this._register(this.turnOnSyncButton.onDidClick(async()=>{await this.commandService.executeCommand("workbench.userDataSync.actions.turnOn")})),this.updateLastSyncedTime(),this._register(this.userDataSyncService.onDidChangeLastSyncTime(()=>{this.updateLastSyncedTime()})),this._register(new I.IntervalTimer).cancelAndSet(()=>this.updateLastSyncedTime(),60*1e3),this.update(),this._register(this.userDataSyncService.onDidChangeStatus(()=>{this.update()})),this._register(this.userDataSyncEnablementService.onDidChangeEnablement(()=>{this.update()}))}updateLastSyncedTime(){const ae=this.userDataSyncService.lastSyncTime;let ue;if(typeof ae=="number"){const oe=(0,C.fromNow)(ae,!0);ue=(0,p.localize)(10,null,oe)}else ue="";this.lastSyncedLabel.textContent=ue,this._onDidChangeLastSyncedLabel.fire(ue)}update(){this.userDataSyncService.status!=="uninitialized"&&(this.userDataSyncEnablementService.isEnabled()||this.userDataSyncService.status!=="idle"?(t.show(this.lastSyncedLabel),t.hide(this.turnOnSyncButton.element)):(t.hide(this.lastSyncedLabel),t.show(this.turnOnSyncButton.element)))}};ce=Ee([W(1,u.ICommandService),W(2,y.IUserDataSyncService),W(3,y.IUserDataSyncEnablementService),W(4,E.IThemeService)],ce)}),define(ne[2666],re([1,0,1807,81,36,2,9,217,5,41,24,264,26,54,233,2454,14,8,7,16,28,830,69,46,310,96,141,11,257,6]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CheckForVSCodeUpdateAction=e.SwitchProductQualityContribution=e.UpdateContribution=e.ProductContribution=e.ShowCurrentReleaseNotesAction=e.ShowReleaseNotesAction=e.AbstractShowReleaseNotesAction=e.OpenLatestReleaseNotesInBrowserAction=e.CONTEXT_UPDATE_STATE=void 0,e.CONTEXT_UPDATE_STATE=new r.RawContextKey("updateState","idle");let T;function R(U,H){return T||(T=U.createInstance(S.ReleaseNotesManager)),U.invokeFunction(K=>T.show(K,H))}let O=class extends _.Action{constructor(H,K){super("update.openLatestReleaseNotes",t.localize(0,null),void 0,!0);this.openerService=H,this.productService=K}async run(){if(this.productService.releaseNotesUrl){const H=k.URI.parse(this.productService.releaseNotesUrl);await this.openerService.open(H)}else throw new Error(t.localize(1,null,this.productService.nameLong))}};O=Ee([W(0,w.IOpenerService),W(1,h.IProductService)],O),e.OpenLatestReleaseNotesInBrowserAction=O;let x=class extends _.Action{constructor(H,K,G,q){super(H,K,void 0,!0);this.version=G,this.instantiationService=q}async run(){if(!!this.enabled){this.enabled=!1;try{await R(this.instantiationService,this.version)}catch(H){const K=this.instantiationService.createInstance(O);try{await K.run()}catch(G){throw new Error(`${H.message} and ${G.message}`)}}}}};x=Ee([W(3,I.IInstantiationService)],x),e.AbstractShowReleaseNotesAction=x;let F=class extends x{constructor(H,K){super("update.showReleaseNotes",t.localize(2,null),H,K)}};F=Ee([W(1,I.IInstantiationService)],F),e.ShowReleaseNotesAction=F;let L=class is extends x{constructor(H=is.ID,K=is.LABEL,G,q){super(H,K,q.version,G)}};L.ID=a.ShowCurrentReleaseNotesActionId,L.LABEL=t.localize(3,null),L.AVAILABE=!!g.default.releaseNotesUrl,L=Ee([W(2,I.IInstantiationService),W(3,h.IProductService)],L),e.ShowCurrentReleaseNotesAction=L;function M(U){const H=/([0-9]+)\.([0-9]+)\.([0-9]+)/.exec(U);if(!!H)return{major:parseInt(H[1]),minor:parseInt(H[2]),patch:parseInt(H[3])}}function N(U,H){return U.major<H.major||U.minor<H.minor}let B=class ns{constructor(H,K,G,q,Z,j,X,Y){X.hadLastFocus().then(async $=>{if(!$)return;const J=M(H.get(ns.KEY,0,"")),ee=M(Y.version),te=j.getValue("update.showReleaseNotes"),se=Y.releaseNotesUrl;te&&!q.skipReleaseNotes&&se&&J&&ee&&N(J,ee)&&R(K,Y.version).then(void 0,()=>{G.prompt(f.default.Info,t.localize(4,null,Y.nameLong,Y.version),[{label:t.localize(5,null),run:()=>{const ie=k.URI.parse(se);Z.open(ie)}}])}),H.store(ns.KEY,Y.version,0,1)})}};B.KEY="releaseNotes/lastVersion",B=Ee([W(0,v.IStorageService),W(1,I.IInstantiationService),W(2,o.INotificationService),W(3,i.IBrowserWorkbenchEnvironmentService),W(4,w.IOpenerService),W(5,l.IConfigurationService),W(6,n.IHostService),W(7,h.IProductService)],B),e.ProductContribution=B;let P=class extends A.Disposable{constructor(H,K,G,q,Z,j,X,Y,$){super();this.storageService=H,this.instantiationService=K,this.notificationService=G,this.dialogService=q,this.updateService=Z,this.activityService=j,this.contextKeyService=X,this.productService=Y,this.hostService=$,this.badgeDisposable=this._register(new A.MutableDisposable),this.state=Z.state,this.updateStateContextKey=e.CONTEXT_UPDATE_STATE.bindTo(this.contextKeyService),this._register(Z.onStateChange(this.onUpdateStateChange,this)),this.onUpdateStateChange(this.updateService.state);const J=this.productService.commit,ee=this.storageService.get("update/lastKnownVersion",0);J!==ee&&(this.storageService.remove("update/lastKnownVersion",0),this.storageService.remove("update/updateNotificationTime",0)),this.registerGlobalActivityActions()}async onUpdateStateChange(H){switch(this.updateStateContextKey.set(H.type),H.type){case"idle":H.error?this.onError(H.error):this.state.type==="checking for updates"&&this.state.explicit&&await this.hostService.hadLastFocus()&&this.onUpdateNotAvailable();break;case"available for download":this.onUpdateAvailable(H.update);break;case"downloaded":this.onUpdateDownloaded(H.update);break;case"ready":this.onUpdateReady(H.update);break}let K,G,q;H.type==="available for download"||H.type==="downloaded"||H.type==="ready"?K=new D.NumberBadge(1,()=>t.localize(6,null,this.productService.nameShort)):H.type==="checking for updates"?(K=new D.ProgressBadge(()=>t.localize(7,null)),G="progress-badge",q=1):H.type==="downloading"?(K=new D.ProgressBadge(()=>t.localize(8,null)),G="progress-badge",q=1):H.type==="updating"&&(K=new D.ProgressBadge(()=>t.localize(9,null)),G="progress-badge",q=1),this.badgeDisposable.clear(),K&&(this.badgeDisposable.value=this.activityService.showGlobalActivity({badge:K,clazz:G,priority:q})),this.state=H}onError(H){/The request timed out|The network connection was lost/i.test(H)||(H=H.replace(/See https:\/\/github\.com\/Squirrel\/Squirrel\.Mac\/issues\/182 for more information/,"This might mean the application was put on quarantine by macOS. See [this link](https://github.com/microsoft/vscode/issues/7426#issuecomment-425093469) for more information"),this.notificationService.notify({severity:o.Severity.Error,message:H,source:t.localize(10,null)}))}onUpdateNotAvailable(){this.dialogService.show(f.default.Info,t.localize(11,null))}onUpdateAvailable(H){!this.shouldShowNotification()||this.notificationService.prompt(f.default.Info,t.localize(12,null),[{label:t.localize(13,null),run:()=>this.updateService.downloadUpdate()},{label:t.localize(14,null),run:()=>{}},{label:t.localize(15,null),run:()=>{const K=this.instantiationService.createInstance(F,H.productVersion);K.run(),K.dispose()}}])}onUpdateDownloaded(H){!this.shouldShowNotification()||this.notificationService.prompt(f.default.Info,t.localize(16,null,this.productService.nameLong,H.productVersion),[{label:t.localize(17,null),run:()=>this.updateService.applyUpdate()},{label:t.localize(18,null),run:()=>{}},{label:t.localize(19,null),run:()=>{const K=this.instantiationService.createInstance(F,H.productVersion);K.run(),K.dispose()}}])}onUpdateReady(H){if(!(s.isWindows&&this.productService.target!=="user")&&!this.shouldShowNotification())return;const K=[{label:t.localize(20,null),run:()=>this.updateService.quitAndInstall()},{label:t.localize(21,null),run:()=>{}}];H.productVersion&&K.push({label:t.localize(22,null),run:()=>{const G=this.instantiationService.createInstance(F,H.productVersion);G.run(),G.dispose()}}),this.notificationService.prompt(f.default.Info,t.localize(23,null,this.productService.nameLong),K,{sticky:!0})}shouldShowNotification(){const H=this.productService.commit,K=new Date().getTime(),G=this.storageService.get("update/lastKnownVersion",0);H!==G&&(this.storageService.store("update/lastKnownVersion",H,0,1),this.storageService.store("update/updateNotificationTime",K,0,1));const q=this.storageService.getNumber("update/updateNotificationTime",0,K);return(K-q)/(1e3*60*60*24)>5}registerGlobalActivityActions(){u.CommandsRegistry.registerCommand("update.check",()=>this.updateService.checkForUpdates(!0)),p.MenuRegistry.appendMenuItem(p.MenuId.GlobalActivity,{group:"7_update",command:{id:"update.check",title:t.localize(24,null)},when:e.CONTEXT_UPDATE_STATE.isEqualTo("idle")}),u.CommandsRegistry.registerCommand("update.checking",()=>{}),p.MenuRegistry.appendMenuItem(p.MenuId.GlobalActivity,{group:"7_update",command:{id:"update.checking",title:t.localize(25,null),precondition:r.ContextKeyExpr.false()},when:e.CONTEXT_UPDATE_STATE.isEqualTo("checking for updates")}),u.CommandsRegistry.registerCommand("update.downloadNow",()=>this.updateService.downloadUpdate()),p.MenuRegistry.appendMenuItem(p.MenuId.GlobalActivity,{group:"7_update",command:{id:"update.downloadNow",title:t.localize(26,null)},when:e.CONTEXT_UPDATE_STATE.isEqualTo("available for download")}),u.CommandsRegistry.registerCommand("update.downloading",()=>{}),p.MenuRegistry.appendMenuItem(p.MenuId.GlobalActivity,{group:"7_update",command:{id:"update.downloading",title:t.localize(27,null),precondition:r.ContextKeyExpr.false()},when:e.CONTEXT_UPDATE_STATE.isEqualTo("downloading")}),u.CommandsRegistry.registerCommand("update.install",()=>this.updateService.applyUpdate()),p.MenuRegistry.appendMenuItem(p.MenuId.GlobalActivity,{group:"7_update",command:{id:"update.install",title:t.localize(28,null)},when:e.CONTEXT_UPDATE_STATE.isEqualTo("downloaded")}),u.CommandsRegistry.registerCommand("update.updating",()=>{}),p.MenuRegistry.appendMenuItem(p.MenuId.GlobalActivity,{group:"7_update",command:{id:"update.updating",title:t.localize(29,null),precondition:r.ContextKeyExpr.false()},when:e.CONTEXT_UPDATE_STATE.isEqualTo("updating")}),u.CommandsRegistry.registerCommand("update.restart",()=>this.updateService.quitAndInstall()),p.MenuRegistry.appendMenuItem(p.MenuId.GlobalActivity,{group:"7_update",command:{id:"update.restart",title:t.localize(30,null)},when:e.CONTEXT_UPDATE_STATE.isEqualTo("ready")})}};P=Ee([W(0,v.IStorageService),W(1,I.IInstantiationService),W(2,o.INotificationService),W(3,c.IDialogService),W(4,C.IUpdateService),W(5,D.IActivityService),W(6,r.IContextKeyService),W(7,h.IProductService),W(8,n.IHostService)],P),e.UpdateContribution=P;let V=class extends A.Disposable{constructor(H,K){super();this.productService=H,this.environmentService=K,this.registerGlobalActivityActions()}registerGlobalActivityActions(){const H=this.productService.quality,K=this.environmentService.options?.productQualityChangeHandler;if(K&&(H==="stable"||H==="insider")){const G=H==="stable"?"insider":"stable",q=`update.switchQuality.${G}`,Z=G==="insider";(0,p.registerAction2)(class extends p.Action2{constructor(){super({id:q,title:Z?t.localize(31,null):t.localize(32,null),precondition:m.IsWebContext,menu:{id:p.MenuId.GlobalActivity,when:m.IsWebContext,group:"7_update"}})}async run(X){const Y=X.get(c.IDialogService),$=X.get(d.IUserDataSyncEnablementService),J=X.get(d.IUserDataSyncStoreManagementService),ee=X.get(v.IStorageService),te=X.get(E.IUserDataSyncWorkbenchService),se=X.get(d.IUserDataSyncService),ie=X.get(o.INotificationService);try{const ce="switchQuality.selectSettingsSyncServiceDialogShown",le=J.userDataSyncStore;let ae;if(le&&Z&&$.isEnabled()&&!ee.getBoolean(ce,0,!1)){if(ae=await this.selectSettingsSyncService(Y),!ae)return;ee.store(ce,!0,0,0),ae==="stable"&&await J.switch(ae)}if((await Y.confirm({type:"info",message:t.localize(33,null),detail:G==="insider"?t.localize(34,null):t.localize(35,null),primaryButton:t.localize(36,null)})).confirmed){const oe=[];se.status==="syncing"&&oe.push(y.Event.toPromise(y.Event.filter(se.onDidChangeStatus,fe=>fe!=="syncing"))),Z&&ae&&oe.push(te.synchroniseUserDataSyncStoreType()),await b.Promises.settled(oe),K(G)}else ae&&ee.remove(ce,0)}catch(ce){ie.error(ce)}}async selectSettingsSyncService(X){const Y=await X.show(o.Severity.Info,t.localize(37,null),[t.localize(38,null),t.localize(39,null),t.localize(40,null)],{detail:t.localize(41,null),cancelId:2});return Y.choice===0?"insiders":Y.choice===1?"stable":void 0}})}}};V=Ee([W(0,h.IProductService),W(1,i.IBrowserWorkbenchEnvironmentService)],V),e.SwitchProductQualityContribution=V;let z=class extends _.Action{constructor(H,K,G){super(H,K,void 0,!0);this.updateService=G}run(){return this.updateService.checkForUpdates(!0)}};z.ID=a.CheckForVSCodeUpdateActionId,z.LABEL=t.localize(42,null),z=Ee([W(2,C.IUpdateService)],z),e.CheckForVSCodeUpdateAction=z}),define(ne[2667],re([1,0,1808,17,47,70,16,2666,310,264,2085]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const v=f.Registry.as(_.Extensions.Workbench);v.registerWorkbenchContribution(D.ProductContribution,3),v.registerWorkbenchContribution(D.UpdateContribution,3),v.registerWorkbenchContribution(D.SwitchProductQualityContribution,3);const C=f.Registry.as(A.Extensions.WorkbenchActions);C.registerWorkbenchAction(k.SyncActionDescriptor.from(D.ShowCurrentReleaseNotesAction),`${I.default.nameShort}: Show Release Notes`,I.default.nameShort),C.registerWorkbenchAction(k.SyncActionDescriptor.from(D.CheckForVSCodeUpdateAction),`${I.default.nameShort}: Check for Update`,I.default.nameShort,D.CONTEXT_UPDATE_STATE.isEqualTo("idle"));class o extends k.Action2{constructor(){super({id:"update.downloadUpdate",title:(0,t.localize)(0,null),category:I.default.nameShort,f1:!0,precondition:D.CONTEXT_UPDATE_STATE.isEqualTo("available for download")})}async run(s){await s.get(w.IUpdateService).downloadUpdate()}}class c extends k.Action2{constructor(){super({id:"update.installUpdate",title:(0,t.localize)(1,null),category:I.default.nameShort,f1:!0,precondition:D.CONTEXT_UPDATE_STATE.isEqualTo("downloaded")})}async run(s){await s.get(w.IUpdateService).applyUpdate()}}class i extends k.Action2{constructor(){super({id:"update.restartToUpdate",title:(0,t.localize)(2,null),category:I.default.nameShort,f1:!0,precondition:D.CONTEXT_UPDATE_STATE.isEqualTo("ready")})}async run(s){await s.get(w.IUpdateService).quitAndInstall()}}(0,k.registerAction2)(o),(0,k.registerAction2)(c),(0,k.registerAction2)(i),D.ShowCurrentReleaseNotesAction.AVAILABE&&k.MenuRegistry.appendMenuItem(k.MenuId.MenubarHelpMenu,{group:"1_welcome",command:{id:D.ShowCurrentReleaseNotesAction.ID,title:(0,t.localize)(3,null)},order:5})}),define(ne[2668],re([1,0,47,96,17,103,768,16,1816,85,23,87,26,257]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let i=class{constructor(l,r){r.registerChannel("userDataSyncUtil",new k.UserDataSycnUtilServiceChannel(l))}};i=Ee([W(0,f.IUserDataSyncUtilService),W(1,A.ISharedProcessService)],i),_.Registry.as(t.Extensions.Workbench).registerWorkbenchContribution(i,1),(0,D.registerAction2)(class extends D.Action2{constructor(){super({id:"workbench.userData.actions.openSyncBackupsFolder",title:{value:(0,I.localize)(0,null),original:"Open Local Backups Folder"},category:{value:c.SYNC_TITLE,original:"Settings Sync"},menu:{id:D.MenuId.CommandPalette,when:c.CONTEXT_SYNC_STATE.notEqualsTo("uninitialized")}})}async run(l){const r=l.get(w.IEnvironmentService).userDataSyncHome,p=l.get(C.INativeHostService),u=l.get(v.IFileService),a=l.get(o.INotificationService);if(await u.exists(r)){const n=await u.resolve(r),h=n.children&&n.children[0]?n.children[0].resource:r;return p.showItemInFolder(h.fsPath)}else a.info((0,I.localize)(1,null))}})}),define(ne[634],re([1,0,24,765,766,2095,2096,2097,50,23,5,31,480,46,187,96,427,257,47,17,14,11,79,85,40,100,235,408,2,19,30,56,311,349,2098]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataInitializationService=e.IUserDataInitializationService=void 0,e.IUserDataInitializationService=(0,v.createDecorator)("IUserDataInitializationService");let L=class{constructor(z,U,H,K,G,q,Z,j,X){this.environmentService=z,this.credentialsService=U,this.userDataSyncStoreManagementService=H,this.fileService=K,this.storageService=G,this.productService=q,this.requestService=Z,this.logService=j,this.uriIdentityService=X,this.initialized=[],this.initializationFinished=new a.Barrier,this.globalStateUserData=null,this.createUserDataSyncStoreClient().then(Y=>{Y||this.initializationFinished.open()})}createUserDataSyncStoreClient(){return this._userDataSyncStoreClientPromise||(this._userDataSyncStoreClientPromise=(async()=>{try{if(!u.isWeb){this.logService.trace("Skipping initializing user data in desktop");return}if(!this.storageService.isNew(0)){this.logService.trace("Skipping initializing user data as application was opened before");return}if(!this.storageService.isNew(1)){this.logService.trace("Skipping initializing user data as workspace was opened before");return}let z;try{z=await(0,s.getCurrentAuthenticationSessionInfo)(this.credentialsService,this.productService)}catch(G){this.logService.error(G)}if(!z){this.logService.trace("Skipping initializing user data as authentication session is not set");return}await this.initializeUserDataSyncStore(z);const U=this.userDataSyncStoreManagementService.userDataSyncStore;if(!U){this.logService.trace("Skipping initializing user data as sync service is not provided");return}const H=new o.UserDataSyncStoreClient(U.url,this.productService,this.requestService,this.logService,this.environmentService,this.fileService,this.storageService);if(H.setAuthToken(z.accessToken,z.providerId),await H.manifest(null)===null){H.dispose(),this.logService.trace("Skipping initializing user data as there is no data");return}return this.logService.info(`Using settings sync service ${U.url.toString()} for initialization`),H}catch(z){this.logService.error(z);return}})()),this._userDataSyncStoreClientPromise}async initializeUserDataSyncStore(z){const U=this.userDataSyncStoreManagementService.userDataSyncStore;if(!U?.canSwitch)return;const H=new E.DisposableStore;try{const K=H.add(new o.UserDataSyncStoreClient(U.url,this.productService,this.requestService,this.logService,this.environmentService,this.fileService,this.storageService));if(K.setAuthToken(z.accessToken,z.providerId),this.globalStateUserData=await K.read("globalState",null),this.globalStateUserData){const G=new _.UserDataSyncStoreTypeSynchronizer(K,this.storageService,this.environmentService,this.fileService,this.logService).getSyncStoreType(this.globalStateUserData);G&&(await this.userDataSyncStoreManagementService.switch(G),(0,y.isEqual)(U.url,this.userDataSyncStoreManagementService.userDataSyncStore?.url)||(this.logService.info("Switched settings sync store"),this.globalStateUserData=null))}}finally{H.dispose()}}async whenInitializationFinished(){await this.initializationFinished.wait()}async requiresInitialization(){return this.logService.trace("UserDataInitializationService#requiresInitialization"),!!await this.createUserDataSyncStoreClient()}async initializeRequiredResources(){return this.logService.trace("UserDataInitializationService#initializeRequiredResources"),this.initialize(["settings","globalState"])}async initializeOtherResources(z){try{this.logService.trace("UserDataInitializationService#initializeOtherResources"),await Promise.allSettled([this.initialize(["keybindings","snippets","tasks"]),this.initializeExtensions(z)])}finally{this.initializationFinished.open()}}async initializeExtensions(z){try{await Promise.all([this.initializeInstalledExtensions(z),this.initializeNewExtensions(z)])}finally{this.initialized.push("extensions")}}async initializeInstalledExtensions(z){return this.initializeInstalledExtensionsPromise||(this.initializeInstalledExtensionsPromise=(async()=>{this.logService.trace("UserDataInitializationService#initializeInstalledExtensions");const U=await this.getExtensionsPreviewInitializer(z);U&&await z.createInstance(N,U).initialize()})()),this.initializeInstalledExtensionsPromise}async initializeNewExtensions(z){return this.initializeNewExtensionsPromise||(this.initializeNewExtensionsPromise=(async()=>{this.logService.trace("UserDataInitializationService#initializeNewExtensions");const U=await this.getExtensionsPreviewInitializer(z);U&&await z.createInstance(B,U).initialize()})()),this.initializeNewExtensionsPromise}getExtensionsPreviewInitializer(z){return this.extensionsPreviewInitializerPromise||(this.extensionsPreviewInitializerPromise=(async()=>{const U=await this.createUserDataSyncStoreClient();if(!U)return null;const H=await U.read("extensions",null);return z.createInstance(M,H)})()),this.extensionsPreviewInitializerPromise}async initialize(z){const U=await this.createUserDataSyncStoreClient();!U||await a.Promises.settled(z.map(async H=>{try{if(this.initialized.includes(H)){this.logService.info(`${(0,l.getSyncAreaLabel)(H)} initialized already.`);return}this.initialized.push(H),this.logService.trace(`Initializing ${(0,l.getSyncAreaLabel)(H)}`);const K=this.createSyncResourceInitializer(H),G=await U.read(H,H==="globalState"?this.globalStateUserData:null);await K.initialize(G),this.logService.info(`Initialized ${(0,l.getSyncAreaLabel)(H)}`)}catch(K){this.logService.info(`Error while initializing ${(0,l.getSyncAreaLabel)(H)}`),this.logService.error(K)}}))}createSyncResourceInitializer(z){switch(z){case"settings":return new k.SettingsInitializer(this.fileService,this.environmentService,this.logService,this.uriIdentityService);case"keybindings":return new A.KeybindingsInitializer(this.fileService,this.environmentService,this.logService,this.uriIdentityService);case"tasks":return new F.TasksInitializer(this.fileService,this.environmentService,this.logService,this.uriIdentityService);case"snippets":return new D.SnippetsInitializer(this.fileService,this.environmentService,this.logService,this.uriIdentityService);case"globalState":return new _.GlobalStateInitializer(this.storageService,this.fileService,this.environmentService,this.logService,this.uriIdentityService)}throw new Error(`Cannot create initializer for ${z}`)}};L=Ee([W(0,I.IWorkbenchEnvironmentService),W(1,x.ICredentialsService),W(2,S.IUserDataSyncStoreManagementService),W(3,w.IFileService),W(4,t.IStorageService),W(5,c.IProductService),W(6,i.IRequestService),W(7,C.ILogService),W(8,R.IUriIdentityService)],L),e.UserDataInitializationService=L;let M=class extends f.AbstractExtensionsInitializer{constructor(z,U,H,K,G,q,Z){super(U,H,K,G,q,Z);this.extensionsData=z,this.preview=null}getPreview(){return this.previewPromise||(this.previewPromise=super.initialize(this.extensionsData).then(()=>this.preview)),this.previewPromise}initialize(){throw new Error("should not be called directly")}async doInitialize(z){const U=await this.parseExtensions(z);if(!U){this.logService.info("Skipping initializing extensions because remote extensions does not exist.");return}const H=await this.extensionManagementService.getInstalled();this.preview=this.generatePreview(U,H)}};M=Ee([W(1,n.IExtensionManagementService),W(2,b.IIgnoredExtensionsManagementService),W(3,w.IFileService),W(4,h.IEnvironmentService),W(5,S.IUserDataSyncLogService),W(6,R.IUriIdentityService)],M);let N=class{constructor(z,U,H,K){this.extensionsPreviewInitializer=z,this.extensionEnablementService=U,this.extensionStorageService=H,this.logService=K}async initialize(){const z=await this.extensionsPreviewInitializer.getPreview();if(!!z){for(const U of z.installedExtensions){const H=z.remoteExtensions.find(({identifier:K})=>(0,d.areSameExtensions)(K,U.identifier));if(H?.state){const K=this.extensionStorageService.getExtensionState(U,!0)||{};Object.keys(H.state).forEach(G=>K[G]=H.state[G]),this.extensionStorageService.setExtensionState(U,K,!0)}}if(z.disabledExtensions.length)for(const U of z.disabledExtensions)this.logService.trace("Disabling extension...",U.id),await this.extensionEnablementService.disableExtension(U),this.logService.info("Disabling extension",U.id)}}};N=Ee([W(1,n.IGlobalExtensionEnablementService),W(2,O.IExtensionStorageService),W(3,S.IUserDataSyncLogService)],N);let B=class{constructor(z,U,H,K,G,q){this.extensionsPreviewInitializer=z,this.extensionService=U,this.extensionStorageService=H,this.galleryService=K,this.extensionManagementService=G,this.logService=q}async initialize(){const z=await this.extensionsPreviewInitializer.getPreview();if(!z)return;const U=[],H=await this.extensionManagementService.getTargetPlatform(),K=await this.galleryService.getExtensions(z.newExtensions,{targetPlatform:H,compatible:!0},T.CancellationToken.None);for(const q of K)try{const Z=z.remoteExtensions.find(({identifier:X})=>(0,d.areSameExtensions)(X,q.identifier));if(!Z)continue;Z.state&&this.extensionStorageService.setExtensionState(q,Z.state,!0),this.logService.trace("Installing extension...",q.identifier.id);const j=await this.extensionManagementService.installFromGallery(q,{isMachineScoped:!1,donotIncludePackAndDependencies:!0,installPreReleaseVersion:Z.preRelease});z.disabledExtensions.some(X=>(0,d.areSameExtensions)(X,q.identifier))||U.push(j),this.logService.info("Installed extension.",q.identifier.id)}catch(Z){this.logService.error(Z)}const G=U.filter(q=>this.extensionService.canAddExtension((0,g.toExtensionDescription)(q)));await this.areExtensionsRunning(G)||await new Promise((q,Z)=>{const j=this.extensionService.onDidChangeExtensions(async()=>{try{await this.areExtensionsRunning(G)&&(j.dispose(),q())}catch(X){Z(X)}})})}async areExtensionsRunning(z){const U=await this.extensionService.getExtensions();return z.every(H=>U.some(K=>(0,d.areSameExtensions)({id:K.identifier.value},H.identifier)))}};B=Ee([W(1,g.IExtensionService),W(2,O.IExtensionStorageService),W(3,n.IExtensionGalleryService),W(4,n.IExtensionManagementService),W(5,S.IUserDataSyncLogService)],B);let P=class{constructor(z,U,H){H.whenInstalledExtensionsRegistered().then(()=>this.initializeOtherResource(z,U))}async initializeOtherResource(z,U){await z.requiresInitialization()&&((0,m.mark)("code/willInitOtherUserData"),await z.initializeOtherResources(U),(0,m.mark)("code/didInitOtherUserData"))}};P=Ee([W(0,e.IUserDataInitializationService),W(1,v.IInstantiationService),W(2,g.IExtensionService)],P),u.isWeb&&p.Registry.as(r.Extensions.Workbench).registerWorkbenchContribution(P,3)}),define(ne[2669],re([1,0,1906,13,40,193,24,27,17,22,8,2648,12,6,2639,2,917,10,233,23,19,632,35,246,80,296,2650,918,919,633,31,14,127,916,11,634,2060,32,42]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkbenchThemeService=void 0;const P="vs-dark vscode-theme-defaults-themes-dark_plus-json",V="vs vscode-theme-defaults-themes-light_plus-json",z="osColorScheme",U="vscode-theme-defaults",H="vscode.vscode-theme-seti-vs-seti",K="file-icons-enabled",G="contributedColorTheme",q="contributedFileIconTheme",Z="contributedProductIconTheme",j=I.Registry.as(o.Extensions.ThemingContribution);function X(ie){switch(ie){case A.VS_LIGHT_THEME:return`vs ${U}-themes-light_vs-json`;case A.VS_DARK_THEME:return`vs-dark ${U}-themes-dark_vs-json`;case A.VS_HC_THEME:return`hc-black ${U}-themes-hc_black-json`;case A.VS_HC_LIGHT_THEME:return`hc-light ${U}-themes-hc_light-json`}return ie}const Y=(0,m.registerColorThemeExtensionPoint)(),$=(0,m.registerFileIconThemeExtensionPoint)(),J=(0,m.registerProductIconThemeExtensionPoint)();let ee=class{constructor(ce,le,ae,ue,oe,fe,pe,me,be,Ce,ve,he){this.storageService=le,this.configurationService=ae,this.telemetryService=ue,this.environmentService=oe,this.extensionResourceLoaderService=pe,this.layoutService=me,this.logService=be,this.hostColorService=Ce,this.userDataInitializationService=ve,this.languageService=he,this.themeExtensionsActivated=new Map,this.container=me.container,this.settings=new b.ThemeConfiguration(ae),this.colorThemeRegistry=new m.ThemeRegistry(Y,C.ColorThemeData.fromExtensionTheme),this.colorThemeWatcher=new te(fe,oe,this.reloadCurrentColorTheme.bind(this)),this.onColorThemeChange=new c.Emitter({leakWarningThreshold:400}),this.currentColorTheme=C.ColorThemeData.createUnloadedTheme(""),this.colorThemeSequencer=new F.Sequencer,this.fileIconThemeWatcher=new te(fe,oe,this.reloadCurrentFileIconTheme.bind(this)),this.fileIconThemeRegistry=new m.ThemeRegistry($,s.FileIconThemeData.fromExtensionTheme,!0,s.FileIconThemeData.noIconTheme),this.fileIconThemeLoader=new s.FileIconThemeLoader(pe,he),this.onFileIconThemeChange=new c.Emitter,this.currentFileIconTheme=s.FileIconThemeData.createUnloadedTheme(""),this.fileIconThemeSequencer=new F.Sequencer,this.productIconThemeWatcher=new te(fe,oe,this.reloadCurrentProductIconTheme.bind(this)),this.productIconThemeRegistry=new m.ThemeRegistry(J,E.ProductIconThemeData.fromExtensionTheme,!0,E.ProductIconThemeData.defaultTheme),this.onProductIconThemeChange=new c.Emitter,this.currentProductIconTheme=E.ProductIconThemeData.createUnloadedTheme(""),this.productIconThemeSequencer=new F.Sequencer;let ge=C.ColorThemeData.fromStorageData(this.storageService);ge&&this.settings.colorTheme!==ge.settingsId&&this.settings.isDefaultColorTheme()&&(ge=void 0);const de=this.getPreferredColorScheme();if(de&&ge?.type!==de&&this.storageService.get(z,0)!==de&&(ge=C.ColorThemeData.createUnloadedThemeForThemeType(de)),!ge){const De=oe.options?.initialColorTheme;De&&(ge=C.ColorThemeData.createUnloadedThemeForThemeType(De.themeType,De.colors))}ge||(ge=C.ColorThemeData.createUnloadedThemeForThemeType(R.isWeb?O.ColorScheme.LIGHT:O.ColorScheme.DARK)),ge.setCustomizations(this.settings),this.applyTheme(ge,void 0,!0);const Se=s.FileIconThemeData.fromStorageData(this.storageService);Se&&this.applyAndSetFileIconTheme(Se,!0);const we=E.ProductIconThemeData.fromStorageData(this.storageService);we&&this.applyAndSetProductIconTheme(we,!0),Promise.all([ce.whenInstalledExtensionsRegistered(),ve.whenInitializationFinished()]).then(De=>{this.installConfigurationListener(),this.installPreferredSchemeListener(),this.installRegistryListeners(),this.initialize().catch(w.onUnexpectedError)});const ye=(0,l.createStyleSheet)();ye.id="codiconStyles";const ke=(0,M.getIconsStyleSheet)(this);function Ie(){ye.textContent=ke.getCSS()}const Te=new F.RunOnceScheduler(Ie,0);ke.onDidChange(()=>Te.schedule()),Te.schedule()}initialize(){const ce=this.environmentService.extensionDevelopmentLocationURI,le=ce&&ce.length===1?ce[0]:void 0,ae=async()=>{const fe=this.colorThemeRegistry.findThemeByExtensionLocation(le);if(fe.length)return this.setColorTheme(fe[0].id,7);const pe=this.currentColorTheme.type===O.ColorScheme.LIGHT?V:P,me=this.colorThemeRegistry.findThemeBySettingsId(this.settings.colorTheme,pe),be=this.getPreferredColorScheme(),Ce=this.storageService.get(z,0);return be!==Ce&&(this.storageService.store(z,be,0,0),be&&me?.type!==be)?this.applyPreferredColorTheme(be):this.setColorTheme(me&&me.id,void 0)},ue=async()=>{const fe=this.fileIconThemeRegistry.findThemeByExtensionLocation(le);if(fe.length)return this.setFileIconTheme(fe[0].id,7);const pe=this.fileIconThemeRegistry.findThemeBySettingsId(this.settings.fileIconTheme);return this.setFileIconTheme(pe?pe.id:H,void 0)},oe=async()=>{const fe=this.productIconThemeRegistry.findThemeByExtensionLocation(le);if(fe.length)return this.setProductIconTheme(fe[0].id,7);const pe=this.productIconThemeRegistry.findThemeBySettingsId(this.settings.productIconTheme);return this.setProductIconTheme(pe?pe.id:E.DEFAULT_PRODUCT_ICON_THEME_ID,void 0)};return Promise.all([ae(),ue(),oe()])}installConfigurationListener(){this.configurationService.onDidChangeConfiguration(ce=>{let le=null;const ae=()=>(le===null&&(le=this.getPreferredColorScheme()),le);if(ce.affectsConfiguration(A.ThemeSettings.COLOR_THEME)&&this.restoreColorTheme(),(ce.affectsConfiguration(A.ThemeSettings.DETECT_COLOR_SCHEME)||ce.affectsConfiguration(A.ThemeSettings.DETECT_HC))&&this.handlePreferredSchemeUpdated(),ce.affectsConfiguration(A.ThemeSettings.PREFERRED_DARK_THEME)&&ae()===O.ColorScheme.DARK&&this.applyPreferredColorTheme(O.ColorScheme.DARK),ce.affectsConfiguration(A.ThemeSettings.PREFERRED_LIGHT_THEME)&&ae()===O.ColorScheme.LIGHT&&this.applyPreferredColorTheme(O.ColorScheme.LIGHT),ce.affectsConfiguration(A.ThemeSettings.PREFERRED_HC_DARK_THEME)&&ae()===O.ColorScheme.HIGH_CONTRAST_DARK&&this.applyPreferredColorTheme(O.ColorScheme.HIGH_CONTRAST_DARK),ce.affectsConfiguration(A.ThemeSettings.PREFERRED_HC_LIGHT_THEME)&&ae()===O.ColorScheme.HIGH_CONTRAST_LIGHT&&this.applyPreferredColorTheme(O.ColorScheme.HIGH_CONTRAST_LIGHT),ce.affectsConfiguration(A.ThemeSettings.FILE_ICON_THEME)&&this.restoreFileIconTheme(),ce.affectsConfiguration(A.ThemeSettings.PRODUCT_ICON_THEME)&&this.restoreProductIconTheme(),this.currentColorTheme){let ue=!1;ce.affectsConfiguration(A.ThemeSettings.COLOR_CUSTOMIZATIONS)&&(this.currentColorTheme.setCustomColors(this.settings.colorCustomizations),ue=!0),ce.affectsConfiguration(A.ThemeSettings.TOKEN_COLOR_CUSTOMIZATIONS)&&(this.currentColorTheme.setCustomTokenColors(this.settings.tokenColorCustomizations),ue=!0),ce.affectsConfiguration(A.ThemeSettings.SEMANTIC_TOKEN_COLOR_CUSTOMIZATIONS)&&(this.currentColorTheme.setCustomSemanticTokenColors(this.settings.semanticTokenColorCustomizations),ue=!0),ue&&(this.updateDynamicCSSRules(this.currentColorTheme),this.onColorThemeChange.fire(this.currentColorTheme))}})}installRegistryListeners(){let ce;this.colorThemeRegistry.onDidChange(async ue=>{(0,b.updateColorThemeConfigurationSchemas)(ue.themes),await this.restoreColorTheme()?this.currentColorTheme.id===P&&!f.isUndefined(ce)&&await this.colorThemeRegistry.findThemeById(ce)?(await this.setColorTheme(ce,"auto"),ce=void 0):ue.added.some(oe=>oe.settingsId===this.currentColorTheme.settingsId)&&await this.reloadCurrentColorTheme():ue.removed.some(oe=>oe.settingsId===this.currentColorTheme.settingsId)&&(ce=this.currentColorTheme.id,await this.setColorTheme(P,"auto"))});let le;this.fileIconThemeRegistry.onDidChange(async ue=>{(0,b.updateFileIconThemeConfigurationSchemas)(ue.themes),await this.restoreFileIconTheme()?this.currentFileIconTheme.id===H&&!f.isUndefined(le)&&this.fileIconThemeRegistry.findThemeById(le)?(await this.setFileIconTheme(le,"auto"),le=void 0):ue.added.some(oe=>oe.settingsId===this.currentFileIconTheme.settingsId)&&await this.reloadCurrentFileIconTheme():ue.removed.some(oe=>oe.settingsId===this.currentFileIconTheme.settingsId)&&(le=this.currentFileIconTheme.id,await this.setFileIconTheme(H,"auto"))});let ae;return this.productIconThemeRegistry.onDidChange(async ue=>{(0,b.updateProductIconThemeConfigurationSchemas)(ue.themes),await this.restoreProductIconTheme()?this.currentProductIconTheme.id===E.DEFAULT_PRODUCT_ICON_THEME_ID&&!f.isUndefined(ae)&&this.productIconThemeRegistry.findThemeById(ae)?(await this.setProductIconTheme(ae,"auto"),ae=void 0):ue.added.some(oe=>oe.settingsId===this.currentProductIconTheme.settingsId)&&await this.reloadCurrentProductIconTheme():ue.removed.some(oe=>oe.settingsId===this.currentProductIconTheme.settingsId)&&(ae=this.currentProductIconTheme.id,await this.setProductIconTheme(E.DEFAULT_PRODUCT_ICON_THEME_ID,"auto"))}),Promise.all([this.getColorThemes(),this.getFileIconThemes(),this.getProductIconThemes()]).then(([ue,oe,fe])=>{(0,b.updateColorThemeConfigurationSchemas)(ue),(0,b.updateFileIconThemeConfigurationSchemas)(oe),(0,b.updateProductIconThemeConfigurationSchemas)(fe)})}installPreferredSchemeListener(){this.hostColorService.onDidChangeColorScheme(()=>this.handlePreferredSchemeUpdated())}async handlePreferredSchemeUpdated(){const ce=this.getPreferredColorScheme(),le=this.storageService.get(z,0);if(ce!==le){if(this.storageService.store(z,ce,0,1),ce)return le||(this.themeSettingIdBeforeSchemeSwitch=this.settings.colorTheme),this.applyPreferredColorTheme(ce);if(le&&this.themeSettingIdBeforeSchemeSwitch){const ae=this.colorThemeRegistry.findThemeBySettingsId(this.themeSettingIdBeforeSchemeSwitch,void 0);ae&&this.setColorTheme(ae.id,"auto")}}}getPreferredColorScheme(){if(this.configurationService.getValue(A.ThemeSettings.DETECT_HC)&&this.hostColorService.highContrast)return this.hostColorService.dark?O.ColorScheme.HIGH_CONTRAST_DARK:O.ColorScheme.HIGH_CONTRAST_LIGHT;if(this.configurationService.getValue(A.ThemeSettings.DETECT_COLOR_SCHEME))return this.hostColorService.dark?O.ColorScheme.DARK:O.ColorScheme.LIGHT}async applyPreferredColorTheme(ce){let le;switch(ce){case O.ColorScheme.LIGHT:le=A.ThemeSettings.PREFERRED_LIGHT_THEME;break;case O.ColorScheme.HIGH_CONTRAST_DARK:le=A.ThemeSettings.PREFERRED_HC_DARK_THEME;break;case O.ColorScheme.HIGH_CONTRAST_LIGHT:le=A.ThemeSettings.PREFERRED_HC_LIGHT_THEME;break;default:le=A.ThemeSettings.PREFERRED_DARK_THEME}const ae=this.configurationService.getValue(le);if(ae&&typeof ae=="string"){const ue=this.colorThemeRegistry.findThemeBySettingsId(ae,void 0);if(ue){const oe=this.settings.findAutoConfigurationTarget(le);return this.setColorTheme(ue.id,oe)}}return null}getColorTheme(){return this.currentColorTheme}async getColorThemes(){return this.colorThemeRegistry.getThemes()}async getMarketplaceColorThemes(ce,le,ae){const ue=this.extensionResourceLoaderService.getExtensionGalleryResourceURL({publisher:ce,name:le,version:ae},"extension");if(ue)try{const oe=await this.extensionResourceLoaderService.readExtensionResource(u.joinPath(ue,"package.json"));return this.colorThemeRegistry.getMarketplaceThemes(JSON.parse(oe),ue,A.ExtensionData.fromName(ce,le))}catch(oe){this.logService.error("Problem loading themes from marketplace",oe)}return[]}get onDidColorThemeChange(){return this.onColorThemeChange.event}setColorTheme(ce,le){return this.colorThemeSequencer.queue(async()=>this.internalSetColorTheme(ce,le))}async internalSetColorTheme(ce,le){if(!ce)return null;const ae=f.isString(ce)?X(ce):ce.id;if(this.currentColorTheme.isLoaded&&ae===this.currentColorTheme.id)return le!=="preview"&&this.currentColorTheme.toStorage(this.storageService),this.settings.setColorTheme(this.currentColorTheme,le);let ue=this.colorThemeRegistry.findThemeById(ae);if(!ue)if(ce instanceof C.ColorThemeData)ue=ce;else return null;try{return await ue.ensureLoaded(this.extensionResourceLoaderService),ue.setCustomizations(this.settings),this.applyTheme(ue,le)}catch(oe){throw new Error(t.localize(0,null,ue.location?.toString(),oe.message))}}reloadCurrentColorTheme(){return this.colorThemeSequencer.queue(async()=>{try{const ce=this.colorThemeRegistry.findThemeBySettingsId(this.currentColorTheme.settingsId)||this.currentColorTheme;await ce.reload(this.extensionResourceLoaderService),ce.setCustomizations(this.settings),await this.applyTheme(ce,void 0,!1)}catch{this.logService.info("Unable to reload {0}: {1}",this.currentColorTheme.location?.toString())}})}async restoreColorTheme(){return this.colorThemeSequencer.queue(async()=>{const ce=this.settings.colorTheme,le=this.colorThemeRegistry.findThemeBySettingsId(ce);return le?(ce!==this.currentColorTheme.settingsId?await this.internalSetColorTheme(le.id,void 0):le!==this.currentColorTheme&&(await le.ensureLoaded(this.extensionResourceLoaderService),le.setCustomizations(this.settings),await this.applyTheme(le,void 0,!0)),!0):!1})}updateDynamicCSSRules(ce){const le=new Set,ae={addRule:oe=>{le.has(oe)||le.add(oe)}};ae.addRule(".monaco-workbench { forced-color-adjust: none; }"),j.getThemingParticipants().forEach(oe=>oe(ce,ae,this.environmentService));const ue=[];for(const oe of(0,N.getColorRegistry)().getColors()){const fe=ce.getColor(oe.id,!0);fe&&ue.push(`${(0,N.asCssVariableName)(oe.id)}: ${fe.toString()};`)}ae.addRule(`.monaco-workbench { ${ue.join(` `)} }`),se([...le].join(` `),G)}applyTheme(ce,le,ae=!1){return this.updateDynamicCSSRules(ce),this.currentColorTheme.id?this.container.classList.remove(...this.currentColorTheme.classNames):this.container.classList.remove(A.VS_DARK_THEME,A.VS_LIGHT_THEME,A.VS_HC_THEME,A.VS_HC_LIGHT_THEME),this.container.classList.add(...ce.classNames),this.currentColorTheme.clearCaches(),this.currentColorTheme=ce,this.colorThemingParticipantChangeListener||(this.colorThemingParticipantChangeListener=j.onThemingParticipantAdded(ue=>this.updateDynamicCSSRules(this.currentColorTheme))),this.colorThemeWatcher.update(ce),this.sendTelemetry(ce.id,ce.extensionData,"color"),ae?Promise.resolve(null):(this.onColorThemeChange.fire(this.currentColorTheme),ce.isLoaded&&le!=="preview"&&ce.toStorage(this.storageService),this.settings.setColorTheme(this.currentColorTheme,le))}sendTelemetry(ce,le,ae){if(le){const ue=ae+le.extensionId;this.themeExtensionsActivated.get(ue)||(this.telemetryService.publicLog2("activatePlugin",{id:le.extensionId,name:le.extensionName,isBuiltin:le.extensionIsBuiltin,publisherDisplayName:le.extensionPublisher,themeId:ce}),this.themeExtensionsActivated.set(ue,!0))}}async getFileIconThemes(){return this.fileIconThemeRegistry.getThemes()}getFileIconTheme(){return this.currentFileIconTheme}get onDidFileIconThemeChange(){return this.onFileIconThemeChange.event}async setFileIconTheme(ce,le){return this.fileIconThemeSequencer.queue(async()=>this.internalSetFileIconTheme(ce,le))}async internalSetFileIconTheme(ce,le){ce===void 0&&(ce="");const ae=f.isString(ce)?ce:ce.id;if(ae!==this.currentFileIconTheme.id||!this.currentFileIconTheme.isLoaded){let oe=this.fileIconThemeRegistry.findThemeById(ae);!oe&&ce instanceof s.FileIconThemeData&&(oe=ce),oe||(oe=s.FileIconThemeData.noIconTheme),await oe.ensureLoaded(this.fileIconThemeLoader),this.applyAndSetFileIconTheme(oe)}const ue=this.currentFileIconTheme;return ue.isLoaded&&le!=="preview"&&(!ue.location||!(0,h.getRemoteAuthority)(ue.location))&&ue.toStorage(this.storageService),await this.settings.setFileIconTheme(this.currentFileIconTheme,le),ue}async getMarketplaceFileIconThemes(ce,le,ae){const ue=this.extensionResourceLoaderService.getExtensionGalleryResourceURL({publisher:ce,name:le,version:ae},"extension");if(ue)try{const oe=await this.extensionResourceLoaderService.readExtensionResource(u.joinPath(ue,"package.json"));return this.fileIconThemeRegistry.getMarketplaceThemes(JSON.parse(oe),ue,A.ExtensionData.fromName(ce,le))}catch(oe){this.logService.error("Problem loading themes from marketplace",oe)}return[]}async reloadCurrentFileIconTheme(){return this.fileIconThemeSequencer.queue(async()=>{await this.currentFileIconTheme.reload(this.fileIconThemeLoader),this.applyAndSetFileIconTheme(this.currentFileIconTheme)})}async restoreFileIconTheme(){return this.fileIconThemeSequencer.queue(async()=>{const ce=this.settings.fileIconTheme,le=this.fileIconThemeRegistry.findThemeBySettingsId(ce);return le?(ce!==this.currentFileIconTheme.settingsId?await this.internalSetFileIconTheme(le.id,void 0):le!==this.currentFileIconTheme&&(await le.ensureLoaded(this.fileIconThemeLoader),this.applyAndSetFileIconTheme(le,!0)),!0):!1})}applyAndSetFileIconTheme(ce,le=!1){this.currentFileIconTheme=ce,se(ce.styleSheetContent,q),ce.id?this.container.classList.add(K):this.container.classList.remove(K),this.fileIconThemeWatcher.update(ce),ce.id&&this.sendTelemetry(ce.id,ce.extensionData,"fileIcon"),le||this.onFileIconThemeChange.fire(this.currentFileIconTheme)}async getProductIconThemes(){return this.productIconThemeRegistry.getThemes()}getProductIconTheme(){return this.currentProductIconTheme}get onDidProductIconThemeChange(){return this.onProductIconThemeChange.event}async setProductIconTheme(ce,le){return this.productIconThemeSequencer.queue(async()=>this.internalSetProductIconTheme(ce,le))}async internalSetProductIconTheme(ce,le){ce===void 0&&(ce="");const ae=f.isString(ce)?ce:ce.id;if(ae!==this.currentProductIconTheme.id||!this.currentProductIconTheme.isLoaded){let oe=this.productIconThemeRegistry.findThemeById(ae);!oe&&ce instanceof E.ProductIconThemeData&&(oe=ce),oe||(oe=E.ProductIconThemeData.defaultTheme),await oe.ensureLoaded(this.extensionResourceLoaderService,this.logService),this.applyAndSetProductIconTheme(oe)}const ue=this.currentProductIconTheme;return ue.isLoaded&&le!=="preview"&&(!ue.location||!(0,h.getRemoteAuthority)(ue.location))&&ue.toStorage(this.storageService),await this.settings.setProductIconTheme(this.currentProductIconTheme,le),ue}async getMarketplaceProductIconThemes(ce,le,ae){const ue=this.extensionResourceLoaderService.getExtensionGalleryResourceURL({publisher:ce,name:le,version:ae},"extension");if(ue)try{const oe=await this.extensionResourceLoaderService.readExtensionResource(u.joinPath(ue,"package.json"));return this.productIconThemeRegistry.getMarketplaceThemes(JSON.parse(oe),ue,A.ExtensionData.fromName(ce,le))}catch(oe){this.logService.error("Problem loading themes from marketplace",oe)}return[]}async reloadCurrentProductIconTheme(){return this.productIconThemeSequencer.queue(async()=>{await this.currentProductIconTheme.reload(this.extensionResourceLoaderService,this.logService),this.applyAndSetProductIconTheme(this.currentProductIconTheme)})}async restoreProductIconTheme(){return this.productIconThemeSequencer.queue(async()=>{const ce=this.settings.productIconTheme,le=this.productIconThemeRegistry.findThemeBySettingsId(ce);return le?(ce!==this.currentProductIconTheme.settingsId?await this.internalSetProductIconTheme(le.id,void 0):le!==this.currentProductIconTheme&&(await le.ensureLoaded(this.extensionResourceLoaderService,this.logService),this.applyAndSetProductIconTheme(le,!0)),!0):!1})}applyAndSetProductIconTheme(ce,le=!1){this.currentProductIconTheme=ce,se(ce.styleSheetContent,Z),this.productIconThemeWatcher.update(ce),ce.id&&this.sendTelemetry(ce.id,ce.extensionData,"productIcon"),le||this.onProductIconThemeChange.fire(this.currentProductIconTheme)}};ee=Ee([W(0,_.IExtensionService),W(1,k.IStorageService),W(2,v.IConfigurationService),W(3,D.ITelemetryService),W(4,r.IBrowserWorkbenchEnvironmentService),W(5,p.IFileService),W(6,d.IExtensionResourceLoaderService),W(7,g.IWorkbenchLayoutService),W(8,T.ILogService),W(9,x.IHostColorSchemeService),W(10,L.IUserDataInitializationService),W(11,B.ILanguageService)],ee),e.WorkbenchThemeService=ee;class te{constructor(ce,le,ae){this.fileService=ce,this.environmentService=le,this.onUpdate=ae}update(ce){u.isEqual(ce.location,this.watchedLocation)||(this.dispose(),ce.location&&(ce.watch||this.environmentService.isExtensionDevelopment)&&(this.watchedLocation=ce.location,this.watcherDisposable=this.fileService.watch(ce.location),this.fileService.onDidFilesChange(le=>{this.watchedLocation&&le.contains(this.watchedLocation,0)&&this.onUpdate()})))}dispose(){this.watcherDisposable=(0,S.dispose)(this.watcherDisposable),this.fileChangeListener=(0,S.dispose)(this.fileChangeListener),this.watchedLocation=void 0}}function se(ie,ce){const le=document.head.getElementsByClassName(ce);if(le.length===0){const ae=document.createElement("style");ae.type="text/css",ae.className=ce,ae.textContent=ie,document.head.appendChild(ae)}else le[0].textContent=ie}(0,a.registerColorThemeSchemas)(),(0,i.registerFileIconThemeSchemas)(),(0,y.registerProductIconThemeSchemas)(),(0,n.registerSingleton)(A.IWorkbenchThemeService,ee)}),define(ne[2670],re([1,0,96,27,35,257,2,6,15,427,271,479,53,24,31,46,40,50,1916,22,26,54,7,36,67,19,43,76,14,5,480,766,349]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataSyncWorkbenchService=void 0;class x{constructor(N,B){this.authenticationProviderId=N,this.session=B}get sessionId(){return this.session.id}get accountName(){return this.session.account.label}get accountId(){return this.session.account.id}get token(){return this.session.idToken||this.session.accessToken}}let F=class Ai extends k.Disposable{constructor(N,B,P,V,z,U,H,K,G,q,Z,j,X,Y,$,J,ee,te,se,ie,ce,le){super();this.userDataSyncService=N,this.authenticationService=B,this.userDataSyncAccountService=P,this.quickInputService=V,this.storageService=z,this.userDataSyncEnablementService=U,this.userDataAutoSyncService=H,this.telemetryService=K,this.logService=G,this.productService=q,this.extensionService=Z,this.environmentService=j,this.credentialsService=X,this.notificationService=Y,this.progressService=$,this.dialogService=J,this.viewsService=te,this.viewDescriptorService=se,this.userDataSyncStoreManagementService=ie,this.lifecycleService=ce,this.instantiationService=le,this._authenticationProviders=[],this._accountStatus="uninitialized",this._onDidChangeAccountStatus=this._register(new D.Emitter),this.onDidChangeAccountStatus=this._onDidChangeAccountStatus.event,this._all=new Map,this.userDataSyncPreview=this._register(new L(this.userDataSyncService)),this._cachedCurrentSessionId=null,this.syncEnablementContext=A.CONTEXT_SYNC_ENABLEMENT.bindTo(ee),this.syncStatusContext=A.CONTEXT_SYNC_STATE.bindTo(ee),this.accountStatusContext=A.CONTEXT_ACCOUNT_STATE.bindTo(ee),this.activityViewsEnablementContext=A.CONTEXT_ENABLE_ACTIVITY_VIEWS.bindTo(ee),this.mergesViewEnablementContext=A.CONTEXT_ENABLE_SYNC_MERGES_VIEW.bindTo(ee),this.userDataSyncStoreManagementService.userDataSyncStore&&(this.syncStatusContext.set(this.userDataSyncService.status),this._register(N.onDidChangeStatus(ae=>this.syncStatusContext.set(ae))),this.syncEnablementContext.set(U.isEnabled()),this._register(U.onDidChangeEnablement(ae=>this.syncEnablementContext.set(ae))),this.waitAndInitialize())}get enabled(){return!!this.userDataSyncStoreManagementService.userDataSyncStore}get authenticationProviders(){return this._authenticationProviders}get accountStatus(){return this._accountStatus}get all(){return(0,I.flatten)([...this._all.values()])}get current(){return this.all.filter(N=>this.isCurrentAccount(N))[0]}updateAuthenticationProviders(){this._authenticationProviders=(this.userDataSyncStoreManagementService.userDataSyncStore?.authenticationProviders||[]).filter(({id:N})=>this.authenticationService.declaredProviders.some(B=>B.id===N))}isSupportedAuthenticationProviderId(N){return this.authenticationProviders.some(({id:B})=>B===N)}async waitAndInitialize(){await this.extensionService.whenInstalledExtensionsRegistered();try{this.logService.trace("Settings Sync: Initializing accounts"),await this.initialize()}catch(N){this.environmentService.extensionTestsLocationURI||this.logService.error(N)}this.accountStatus==="uninitialized"?this.environmentService.extensionTestsLocationURI||this.logService.warn("Settings Sync: Accounts are not initialized"):this.logService.trace("Settings Sync: Accounts are initialized")}async initialize(){const N=await(0,w.getCurrentAuthenticationSessionInfo)(this.credentialsService,this.productService);this.currentSessionId===void 0&&this.useWorkbenchSessionId&&N?.id&&(this.currentSessionId=N?.id,this.useWorkbenchSessionId=!1),await this.update(),this._register(this.authenticationService.onDidChangeDeclaredProviders(()=>this.updateAuthenticationProviders())),this._register(D.Event.any(D.Event.filter(D.Event.any(this.authenticationService.onDidRegisterAuthenticationProvider,this.authenticationService.onDidUnregisterAuthenticationProvider),B=>this.isSupportedAuthenticationProviderId(B.id)),D.Event.filter(this.userDataSyncAccountService.onTokenFailed,B=>!B))(()=>this.update())),this._register(D.Event.filter(this.authenticationService.onDidChangeSessions,B=>this.isSupportedAuthenticationProviderId(B.providerId))(({event:B})=>this.onDidChangeSessions(B))),this._register(this.storageService.onDidChangeValue(B=>this.onDidChangeStorage(B))),this._register(D.Event.filter(this.userDataSyncAccountService.onTokenFailed,B=>B)(()=>this.onDidSuccessiveAuthFailures()))}async update(){this.updateAuthenticationProviders();const N=new Map;for(const{id:P,scopes:V}of this.authenticationProviders){this.logService.trace("Settings Sync: Getting accounts for",P);const z=await this.getAccounts(P,V);N.set(P,z),this.logService.trace("Settings Sync: Updated accounts for",P)}this._all=N;const B=this.current;await this.updateToken(B),this.updateAccountStatus(B?"available":"unavailable")}async getAccounts(N,B){let P=new Map,V=null;const z=await this.authenticationService.getSessions(N,B)||[];for(const U of z){const H=new x(N,U);P.set(H.accountName,H),this.isCurrentAccount(H)&&(V=H)}return V&&P.set(V.accountName,V),[...P.values()]}async updateToken(N){let B;if(N)try{this.logService.trace("Settings Sync: Updating the token for the account",N.accountName);const P=N.token;this.logService.trace("Settings Sync: Token updated for the account",N.accountName),B={token:P,authenticationProviderId:N.authenticationProviderId}}catch(P){this.logService.error(P)}await this.userDataSyncAccountService.updateAccount(B)}updateAccountStatus(N){if(this._accountStatus!==N){const B=this._accountStatus;this.logService.trace(`Settings Sync: Account status changed from ${B} to ${N}`),this._accountStatus=N,this.accountStatusContext.set(N),this._onDidChangeAccountStatus.fire(N)}}async turnOn(){if(!this.authenticationProviders.length)throw new Error((0,r.localize)(0,null));if(this.userDataSyncEnablementService.isEnabled())return;if(this.userDataSyncService.status!=="idle")throw new Error("Cannot turn on sync while syncing");if(!await this.pick())throw(0,p.canceled)();if(this.accountStatus!=="available")throw new Error((0,r.localize)(1,null));await this.turnOnUsingCurrentAccount()}async turnOnUsingCurrentAccount(){if(this.userDataSyncEnablementService.isEnabled())return;if(this.userDataSyncService.status!=="idle")throw new Error("Cannot turn on sync while syncing");if(this.accountStatus!=="available")throw new Error((0,r.localize)(2,null));const B=`${A.SYNC_TITLE} [(${(0,r.localize)(3,null)})](command:${A.SHOW_SYNC_LOG_COMMAND_ID})`,P=await this.userDataSyncService.createManualSyncTask(),V=E.isWeb?k.Disposable.None:this.lifecycleService.onBeforeShutdown(z=>z.veto(this.onBeforeShutdown(P),"veto.settingsSync"));try{await this.syncBeforeTurningOn(B,P)}finally{V.dispose()}await this.userDataAutoSyncService.turnOn(),this.userDataSyncStoreManagementService.userDataSyncStore?.canSwitch&&await this.synchroniseUserDataSyncStoreType(),this.notificationService.info((0,r.localize)(4,null,B))}turnoff(N){return this.userDataAutoSyncService.turnOff(N)}async synchroniseUserDataSyncStoreType(){if(!this.userDataSyncAccountService.account)throw new Error("Cannot update because you are signed out from settings sync. Please sign in and try again.");if(!E.isWeb||!this.userDataSyncStoreManagementService.userDataSyncStore)return;const N=this.userDataSyncStoreManagementService.userDataSyncStore.type==="insiders"?this.userDataSyncStoreManagementService.userDataSyncStore.stableUrl:this.userDataSyncStoreManagementService.userDataSyncStore.insidersUrl,B=this.instantiationService.createInstance(T.UserDataSyncStoreClient,N);B.setAuthToken(this.userDataSyncAccountService.account.token,this.userDataSyncAccountService.account.authenticationProviderId),await this.instantiationService.createInstance(R.UserDataSyncStoreTypeSynchronizer,B).sync(this.userDataSyncStoreManagementService.userDataSyncStore.type)}syncNow(){return this.userDataAutoSyncService.triggerSync(["Sync Now"],!1,!0)}async onBeforeShutdown(N){const B=await this.dialogService.confirm({type:"warning",message:(0,r.localize)(5,null),title:(0,r.localize)(6,null),primaryButton:(0,r.localize)(7,null),secondaryButton:(0,r.localize)(8,null)});return B.confirmed&&await N.stop(),!B.confirmed}async syncBeforeTurningOn(N,B){try{let P="manual";await this.progressService.withProgress({location:15,title:N,delay:500},async V=>{V.report({message:(0,r.localize)(9,null)});const z=await B.preview(),U=B.manifest!==null,H=await this.userDataSyncService.hasLocalData(),K=z.some(([q,{isLastSyncFromCurrentMachine:Z,resourcePreviews:j}])=>q!=="globalState"&&!Z&&j.some(X=>X.localChange!==0||X.remoteChange!==0));P=await this.getFirstTimeSyncAction(U,H,K);const G=B.onSynchronizeResources(q=>q.length?V.report({message:(0,r.localize)(10,null,(0,A.getSyncAreaLabel)(q[0][0]))}):void 0);try{switch(P){case"merge":await B.merge(),B.status!=="hasConflicts"&&await B.apply();return;case"pull":return await B.pull();case"push":return await B.push();case"manual":return}}finally{G.dispose()}}),B.status==="hasConflicts"&&(await this.dialogService.show(u.Severity.Warning,(0,r.localize)(11,null),[(0,r.localize)(12,null)],{detail:(0,r.localize)(13,null)}),await B.discardConflicts(),P="manual"),P==="manual"&&await this.syncManually(B)}catch(P){throw await B.stop(),P}finally{B.dispose()}}async getFirstTimeSyncAction(N,B,P){if(!B||!N||!P)return"merge";switch((await this.dialogService.show(u.Severity.Info,(0,r.localize)(14,null),[(0,r.localize)(15,null),(0,r.localize)(16,null),(0,r.localize)(17,null),(0,r.localize)(18,null)],{cancelId:3,detail:(0,r.localize)(19,null)})).choice){case 0:return this.telemetryService.publicLog2("sync/firstTimeSync",{action:"merge"}),"merge";case 1:return this.telemetryService.publicLog2("sync/firstTimeSync",{action:"pull"}),"pull";case 2:return this.telemetryService.publicLog2("sync/firstTimeSync",{action:"manual"}),"manual"}throw this.telemetryService.publicLog2("sync/firstTimeSync",{action:"cancelled"}),(0,p.canceled)()}async syncManually(N){const B=this.viewsService.getVisibleViewContainer(0),P=await N.preview();this.userDataSyncPreview.setManualSyncPreview(N,P),this.mergesViewEnablementContext.set(!0),await this.waitForActiveSyncViews(),await this.viewsService.openView(A.SYNC_MERGES_VIEW_ID);const V=await D.Event.toPromise(this.userDataSyncPreview.onDidCompleteManualSync);if(this.userDataSyncPreview.unsetManualSyncPreview(),this.mergesViewEnablementContext.set(!1),B)this.viewsService.openViewContainer(B.id);else{const z=this.viewDescriptorService.getViewContainerByViewId(A.SYNC_MERGES_VIEW_ID);this.viewsService.closeViewContainer(z.id)}if(V)throw V}async resetSyncedData(){(await this.dialogService.confirm({message:(0,r.localize)(20,null),title:(0,r.localize)(21,null),type:"info",primaryButton:(0,r.localize)(22,null)})).confirmed&&await this.userDataSyncService.resetRemote()}async showSyncActivity(){this.activityViewsEnablementContext.set(!0),await this.waitForActiveSyncViews(),await this.viewsService.openViewContainer(A.SYNC_VIEW_CONTAINER_ID)}async waitForActiveSyncViews(){const N=this.viewDescriptorService.getViewContainerById(A.SYNC_VIEW_CONTAINER_ID);if(N){const B=this.viewDescriptorService.getViewContainerModel(N);B.activeViewDescriptors.length||await D.Event.toPromise(D.Event.filter(B.onDidChangeActiveViewDescriptors,P=>B.activeViewDescriptors.length>0))}}isCurrentAccount(N){return N.sessionId===this.currentSessionId}async signIn(){await this.pick()}async pick(){const N=await this.doPick();if(!N)return!1;let B,P,V,z;if((0,t.isAuthenticationProvider)(N)){const U=await this.authenticationService.createSession(N.id,N.scopes);B=U.id,P=U.account.label,V=U.account.id,z=N.id}else B=N.sessionId,P=N.accountName,V=N.accountId,z=N.authenticationProviderId;return await this.switch(B,P,V,z),!0}async doPick(){if(this.authenticationProviders.length!==0)return await this.update(),this.authenticationProviders.length===1&&!this.all.length?this.authenticationProviders[0]:new Promise(N=>{let B;const P=new k.DisposableStore,V=this.quickInputService.createQuickPick();P.add(V),V.title=A.SYNC_TITLE,V.ok=!1,V.placeholder=(0,r.localize)(23,null),V.ignoreFocusOut=!0,V.items=this.createQuickpickItems(),P.add(V.onDidAccept(()=>{B=V.selectedItems[0]?.account?V.selectedItems[0]?.account:V.selectedItems[0]?.authenticationProvider,V.hide()})),P.add(V.onDidHide(()=>{P.dispose(),N(B)})),V.show()})}createQuickpickItems(){const N=[];if(this.all.length){const B=[...this.authenticationProviders].sort(({id:P})=>P===this.current?.authenticationProviderId?-1:1);N.push({type:"separator",label:(0,r.localize)(24,null)});for(const P of B){const V=(this._all.get(P.id)||[]).sort(({sessionId:U})=>U===this.current?.sessionId?-1:1),z=this.authenticationService.getLabel(P.id);for(const U of V)N.push({label:`${U.accountName} (${z})`,description:U.sessionId===this.current?.sessionId?(0,r.localize)(25,null):void 0,account:U,authenticationProvider:P})}N.push({type:"separator",label:(0,r.localize)(26,null)})}for(const B of this.authenticationProviders)if(!this.all.some(V=>V.authenticationProviderId===B.id)||this.authenticationService.supportsMultipleAccounts(B.id)){const V=this.authenticationService.getLabel(B.id);N.push({label:(0,r.localize)(27,null,V),authenticationProvider:B})}return N}async switch(N,B,P,V){const z=this.current;this.userDataSyncEnablementService.isEnabled()&&z&&z.accountName!==B,this.currentSessionId=N,this.telemetryService.publicLog2("sync.userAccount",{id:P,providerId:V}),await this.update()}async onDidSuccessiveAuthFailures(){this.telemetryService.publicLog2("sync/successiveAuthFailures"),this.currentSessionId=void 0,await this.update(),this.userDataSyncEnablementService.isEnabled()&&this.notificationService.notify({severity:u.Severity.Error,message:(0,r.localize)(28,null),actions:{primary:[new h.Action("sign in",(0,r.localize)(29,null),void 0,!0,()=>this.signIn())]}})}onDidChangeSessions(N){this.currentSessionId&&N.removed.find(B=>B.id===this.currentSessionId)&&(this.currentSessionId=void 0),this.update()}onDidChangeStorage(N){N.key===Ai.CACHED_SESSION_STORAGE_KEY&&N.scope===0&&this.currentSessionId!==this.getStoredCachedSessionId()&&(this._cachedCurrentSessionId=null,this.update())}get currentSessionId(){return this._cachedCurrentSessionId===null&&(this._cachedCurrentSessionId=this.getStoredCachedSessionId()),this._cachedCurrentSessionId}set currentSessionId(N){this._cachedCurrentSessionId!==N&&(this._cachedCurrentSessionId=N,N===void 0?(this.logService.info("Settings Sync: Reset current session"),this.storageService.remove(Ai.CACHED_SESSION_STORAGE_KEY,0)):(this.logService.info("Settings Sync: Updated current session",N),this.storageService.store(Ai.CACHED_SESSION_STORAGE_KEY,N,0,1)))}getStoredCachedSessionId(){return this.storageService.get(Ai.CACHED_SESSION_STORAGE_KEY,0)}get useWorkbenchSessionId(){return!this.storageService.getBoolean(Ai.DONOT_USE_WORKBENCH_SESSION_STORAGE_KEY,0,!1)}set useWorkbenchSessionId(N){this.storageService.store(Ai.DONOT_USE_WORKBENCH_SESSION_STORAGE_KEY,!N,0,1)}};F.DONOT_USE_WORKBENCH_SESSION_STORAGE_KEY="userDataSyncAccount.donotUseWorkbenchSession",F.CACHED_SESSION_STORAGE_KEY="userDataSyncAccountPreference",F=Ee([W(0,t.IUserDataSyncService),W(1,v.IAuthenticationService),W(2,C.IUserDataSyncAccountService),W(3,o.IQuickInputService),W(4,c.IStorageService),W(5,t.IUserDataSyncEnablementService),W(6,t.IUserDataAutoSyncService),W(7,f.ITelemetryService),W(8,i.ILogService),W(9,S.IProductService),W(10,s.IExtensionService),W(11,l.IWorkbenchEnvironmentService),W(12,O.ICredentialsService),W(13,u.INotificationService),W(14,g.IProgressService),W(15,a.IDialogService),W(16,n.IContextKeyService),W(17,m.IViewsService),W(18,m.IViewDescriptorService),W(19,t.IUserDataSyncStoreManagementService),W(20,b.ILifecycleService),W(21,y.IInstantiationService)],F),e.UserDataSyncWorkbenchService=F;class L extends k.Disposable{constructor(N){super();this.userDataSyncService=N,this._resources=[],this._onDidChangeResources=this._register(new D.Emitter),this.onDidChangeResources=this._onDidChangeResources.event,this._conflicts=[],this._onDidChangeConflicts=this._register(new D.Emitter),this.onDidChangeConflicts=this._onDidChangeConflicts.event,this._onDidCompleteManualSync=this._register(new D.Emitter),this.onDidCompleteManualSync=this._onDidCompleteManualSync.event,this.updateConflicts(N.conflicts),this._register(N.onDidChangeConflicts(B=>this.updateConflicts(B)))}get resources(){return Object.freeze(this._resources)}get conflicts(){return Object.freeze(this._conflicts)}setManualSyncPreview(N,B){const P=new k.DisposableStore;this.manualSync={task:N,preview:B,disposables:P},this.updateResources()}unsetManualSyncPreview(){this.manualSync&&(this.manualSync.disposables.dispose(),this.manualSync=void 0),this.updateResources()}async accept(N,B,P){if(this.manualSync){const V=await this.manualSync.task.accept(B,P);this.updatePreview(V)}else await this.userDataSyncService.accept(N,B,P,!1)}async merge(N){if(!this.manualSync)throw new Error("Can merge only while syncing manually");const B=await this.manualSync.task.merge(N);this.updatePreview(B)}async discard(N){if(!this.manualSync)throw new Error("Can discard only while syncing manually");const B=await this.manualSync.task.discard(N);this.updatePreview(B)}async apply(){if(!this.manualSync)throw new Error("Can apply only while syncing manually");try{const N=await this.manualSync.task.apply();this.updatePreview(N),this._resources.length||this._onDidCompleteManualSync.fire(void 0)}catch(N){await this.manualSync.task.stop(),this.updatePreview([]),this._onDidCompleteManualSync.fire(N)}}async cancel(){if(!this.manualSync)throw new Error("Can cancel only while syncing manually");await this.manualSync.task.stop(),this.updatePreview([]),this._onDidCompleteManualSync.fire((0,p.canceled)())}async pull(){if(!this.manualSync)throw new Error("Can pull only while syncing manually");await this.manualSync.task.pull(),this.updatePreview([])}async push(){if(!this.manualSync)throw new Error("Can push only while syncing manually");await this.manualSync.task.push(),this.updatePreview([])}updatePreview(N){this.manualSync&&(this.manualSync.preview=N,this.updateResources())}updateConflicts(N){const B=this.toUserDataSyncResourceGroups(N);(0,I.equals)(B,this._conflicts,(P,V)=>(0,d.isEqual)(P.local,V.local))||(this._conflicts=B,this._onDidChangeConflicts.fire(this.conflicts))}updateResources(){const N=this.toUserDataSyncResourceGroups((this.manualSync?.preview||[]).map(([B,P])=>[B,P.resourcePreviews]));(0,I.equals)(N,this._resources,(B,P)=>(0,d.isEqual)(B.local,P.local)&&B.mergeState===P.mergeState)||(this._resources=N,this._onDidChangeResources.fire(this.resources))}toUserDataSyncResourceGroups(N){return(0,I.flatten)(N.map(([B,P])=>P.map(({localResource:V,remoteResource:z,previewResource:U,acceptedResource:H,localChange:K,remoteChange:G,mergeState:q})=>({syncResource:B,local:V,remote:z,merged:U,accepted:H,localChange:K,remoteChange:G,mergeState:q}))))}}(0,_.registerSingleton)(A.IUserDataSyncWorkbenchService,F)}),define(ne[2671],re([1,0,38,96,35,61,113]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let D=class{constructor(w,v,C,o){this.keybindingsService=w,this.textModelService=v,this.textResourcePropertiesService=C,this.textResourceConfigurationService=o}async resolveDefaultIgnoredSettings(){return(0,f.getDefaultIgnoredSettings)()}async resolveUserBindings(w){const v={};for(const C of w)v[C]=this.keybindingsService.resolveUserBinding(C).map(o=>o.getUserSettingsLabel()).join(" ");return v}async resolveFormattingOptions(w){try{const v=await this.textModelService.createModelReference(w),{insertSpaces:C,tabSize:o}=v.object.textEditorModel.getOptions(),c=v.object.textEditorModel.getEOL();return v.dispose(),{eol:c,insertSpaces:C,tabSize:o}}catch{}return{eol:this.textResourcePropertiesService.getEOL(w),insertSpaces:!!this.textResourceConfigurationService.getValue(w,"editor.insertSpaces"),tabSize:this.textResourceConfigurationService.getValue(w,"editor.tabSize")}}};D=Ee([W(0,t.IKeybindingService),W(1,A.ITextModelService),W(2,k.ITextResourcePropertiesService),W(3,k.ITextResourceConfigurationService)],D),(0,_.registerSingleton)(f.IUserDataSyncUtilService,D)}),define(ne[2672],re([1,0,96,103,6,35]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let k=class{constructor(I){this.channel=I.getChannel("userDataAutoSync")}get onError(){return _.Event.map(this.channel.listen("onError"),I=>t.UserDataSyncError.toUserDataSyncError(I))}triggerSync(I,w,v){return this.channel.call("triggerSync",[I,w,v])}turnOn(){return this.channel.call("turnOn")}turnOff(I){return this.channel.call("turnOff",[I])}};k=Ee([W(0,f.ISharedProcessService)],k),(0,A.registerSingleton)(t.IUserDataAutoSyncService,k)}),define(ne[2673],re([1,0,103,35,2,6,479]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataSyncAccountService=void 0;let D=class extends _.Disposable{constructor(w){super();this._onDidChangeAccount=this._register(new A.Emitter),this.onDidChangeAccount=this._onDidChangeAccount.event,this.channel=w.getChannel("userDataSyncAccount"),this.channel.call("_getInitialData").then(v=>{this._account=v,this._register(this.channel.listen("onDidChangeAccount")(C=>{this._account=C,this._onDidChangeAccount.fire(C)}))})}get account(){return this._account}get onTokenFailed(){return this.channel.listen("onTokenFailed")}updateAccount(w){return this.channel.call("updateAccount",w)}};D=Ee([W(0,t.ISharedProcessService)],D),e.UserDataSyncAccountService=D,(0,f.registerSingleton)(k.IUserDataSyncAccountService,D)}),define(ne[2674],re([1,0,103,2,35,769]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let k=class extends f.Disposable{constructor(I){super();this.channel=I.getChannel("userDataSyncMachines")}get onDidChange(){return this.channel.listen("onDidChange")}getMachines(){return this.channel.call("getMachines")}addCurrentMachine(){return this.channel.call("addCurrentMachine")}removeCurrentMachine(){return this.channel.call("removeCurrentMachine")}renameMachine(I,w){return this.channel.call("renameMachine",[I,w])}setEnablements(I){return this.channel.call("setEnablements",I)}};k=Ee([W(0,t.ISharedProcessService)],k),(0,_.registerSingleton)(A.IUserDataSyncMachinesService,k)}),define(ne[2675],re([1,0,96,103,2101]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,f.registerSharedProcessRemoteService)(t.IUserDataSyncService,"userDataSync",{channelClientCtor:_.UserDataSyncChannelClient})}),define(ne[2676],re([1,0,96,103,24,480,46,8,35,768]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let v=class extends A.AbstractUserDataSyncStoreManagementService{constructor(o,c,i,S){super(o,c,i);this.channelClient=this._register(new w.UserDataSyncStoreManagementServiceChannelClient(S.getChannel("userDataSyncStoreManagement"))),this._register(this.channelClient.onDidChangeUserDataSyncStore(()=>this.updateUserDataSyncStore()))}async switch(o){return this.channelClient.switch(o)}async getPreviousUserDataSyncStore(){return this.channelClient.getPreviousUserDataSyncStore()}};v=Ee([W(0,k.IProductService),W(1,D.IConfigurationService),W(2,_.IStorageService),W(3,f.ISharedProcessService)],v),(0,I.registerSingleton)(t.IUserDataSyncStoreManagementService,v)}),define(ne[2677],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TreeviewsService=void 0;class t{constructor(){this._dragOperations=new Map,this._renderedElements=new Map}removeDragOperationTransfer(_){if(_&&this._dragOperations.has(_)){const A=this._dragOperations.get(_);return this._dragOperations.delete(_),A}}addDragOperationTransfer(_,A){this._dragOperations.set(_,A)}getRenderedTreeElement(_){if(this._renderedElements.has(_))return this._renderedElements.get(_)}addRenderedTreeItemElement(_,A){this._renderedElements.set(_,A)}removeRenderedTreeItemElement(_){this._renderedElements.has(_)&&this._renderedElements.delete(_)}}e.TreeviewsService=t}),define(ne[508],re([1,0,35,5,2677]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITreeViewsService=void 0,e.ITreeViewsService=(0,f.createDecorator)("treeViewsService"),(0,t.registerSingleton)(e.ITreeViewsService,_.TreeviewsService)}),define(ne[2678],re([1,0,43,7,24,17,2,6,5,9,15,13,19,12]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewContainerModel=e.getViewsStateStorageId=void 0;function i(r){return`${r}.hidden`}e.getViewsStateStorageId=i;class S{constructor(){this.map=new Map}add(p){return this.map.set(p,(this.map.get(p)||0)+1),this}delete(p){let u=this.map.get(p)||0;return u===0?!1:(u--,u===0?this.map.delete(p):this.map.set(p,u),!0)}has(p){return this.map.has(p)}}let s=class extends k.Disposable{constructor(p,u){super();this.storageService=u,this._onDidChangeStoredState=this._register(new D.Emitter),this.onDidChangeStoredState=this._onDidChangeStoredState.event,this.globalViewsStateStorageId=i(p),this.workspaceViewsStateStorageId=p,this._register(this.storageService.onDidChangeValue(a=>this.onDidStorageChange(a))),this.state=this.initialize()}set(p,u){this.state.set(p,u)}get(p){return this.state.get(p)}updateState(p){this.updateWorkspaceState(p),this.updateGlobalState(p)}updateWorkspaceState(p){const u=this.getStoredWorkspaceState();for(const a of p){const n=this.get(a.id);n&&(u[a.id]={collapsed:!!n.collapsed,isHidden:!n.visibleWorkspace,size:n.size,order:a.workspace&&n?n.order:void 0})}Object.keys(u).length>0?this.storageService.store(this.workspaceViewsStateStorageId,JSON.stringify(u),1,1):this.storageService.remove(this.workspaceViewsStateStorageId,1)}updateGlobalState(p){const u=this.getStoredGlobalState();for(const a of p){const n=this.get(a.id);u.set(a.id,{id:a.id,isHidden:n&&a.canToggleVisibility?!n.visibleGlobal:!1,order:!a.workspace&&n?n.order:void 0})}this.setStoredGlobalState(u)}onDidStorageChange(p){if(p.key===this.globalViewsStateStorageId&&p.scope===0&&this.globalViewsStatesValue!==this.getStoredGlobalViewsStatesValue()){this._globalViewsStatesValue=void 0;const u=this.getStoredGlobalState(),a=this.getStoredWorkspaceState(),n=[];for(const[h,g]of u){const d=this.get(h);if(d)d.visibleGlobal!==!g.isHidden&&n.push({id:h,visible:!g.isHidden});else{const m=a[h];this.set(h,{active:!1,visibleGlobal:!g.isHidden,visibleWorkspace:(0,C.isUndefined)(m?.isHidden)?void 0:!m?.isHidden,collapsed:m?.collapsed,order:m?.order,size:m?.size})}}n.length&&this._onDidChangeStoredState.fire(n)}}initialize(){const p=new Map,u=this.getStoredWorkspaceState();for(const d of Object.keys(u)){const m=u[d];p.set(d,{active:!1,visibleGlobal:void 0,visibleWorkspace:(0,C.isUndefined)(m.isHidden)?void 0:!m.isHidden,collapsed:m.collapsed,order:m.order,size:m.size})}const a=this.storageService.get(this.globalViewsStateStorageId,1,"[]"),{state:n}=this.parseStoredGlobalState(a);if(n.size>0){for(const{id:d,isHidden:m}of n.values()){let b=p.get(d);b?(0,C.isUndefined)(b.visibleWorkspace)&&(b.visibleWorkspace=!m):p.set(d,{active:!1,collapsed:void 0,visibleGlobal:void 0,visibleWorkspace:!m})}this.storageService.remove(this.globalViewsStateStorageId,1)}const{state:h,hasDuplicates:g}=this.parseStoredGlobalState(this.globalViewsStatesValue);g&&this.setStoredGlobalState(h);for(const{id:d,isHidden:m,order:b}of h.values()){let E=p.get(d);E?(E.visibleGlobal=!m,(0,C.isUndefined)(b)||(E.order=b)):p.set(d,{active:!1,visibleGlobal:!m,order:b,collapsed:void 0,visibleWorkspace:void 0})}return p}getStoredWorkspaceState(){return JSON.parse(this.storageService.get(this.workspaceViewsStateStorageId,1,"{}"))}getStoredGlobalState(){return this.parseStoredGlobalState(this.globalViewsStatesValue).state}setStoredGlobalState(p){this.globalViewsStatesValue=JSON.stringify([...p.values()])}parseStoredGlobalState(p){const u=JSON.parse(p);let a=!1;return{state:u.reduce((h,g)=>(typeof g=="string"?(a=a||h.has(g),h.set(g,{id:g,isHidden:!0})):(a=a||h.has(g.id),h.set(g.id,g)),h),new Map),hasDuplicates:a}}get globalViewsStatesValue(){return this._globalViewsStatesValue||(this._globalViewsStatesValue=this.getStoredGlobalViewsStatesValue()),this._globalViewsStatesValue}set globalViewsStatesValue(p){this.globalViewsStatesValue!==p&&(this._globalViewsStatesValue=p,this.setStoredGlobalViewsStatesValue(p))}getStoredGlobalViewsStatesValue(){return this.storageService.get(this.globalViewsStateStorageId,0,"[]")}setStoredGlobalViewsStatesValue(p){this.storageService.store(this.globalViewsStateStorageId,p,0,0)}};s=Ee([W(1,_.IStorageService)],s);let l=class extends k.Disposable{constructor(p,u,a){super();this.viewContainer=p,this.contextKeyService=a,this.contextKeys=new S,this.viewDescriptorItems=[],this._onDidChangeContainerInfo=this._register(new D.Emitter),this.onDidChangeContainerInfo=this._onDidChangeContainerInfo.event,this._onDidChangeAllViewDescriptors=this._register(new D.Emitter),this.onDidChangeAllViewDescriptors=this._onDidChangeAllViewDescriptors.event,this._onDidChangeActiveViewDescriptors=this._register(new D.Emitter),this.onDidChangeActiveViewDescriptors=this._onDidChangeActiveViewDescriptors.event,this._onDidAddVisibleViewDescriptors=this._register(new D.Emitter),this.onDidAddVisibleViewDescriptors=this._onDidAddVisibleViewDescriptors.event,this._onDidRemoveVisibleViewDescriptors=this._register(new D.Emitter),this.onDidRemoveVisibleViewDescriptors=this._onDidRemoveVisibleViewDescriptors.event,this._onDidMoveVisibleViewDescriptors=this._register(new D.Emitter),this.onDidMoveVisibleViewDescriptors=this._onDidMoveVisibleViewDescriptors.event,this._register(D.Event.filter(a.onDidChangeContext,n=>n.affectsSome(this.contextKeys))(()=>this.onDidChangeContext())),this.viewDescriptorsState=this._register(u.createInstance(s,p.storageId||`${p.id}.state`)),this._register(this.viewDescriptorsState.onDidChangeStoredState(n=>this.updateVisibility(n))),this._register(D.Event.any(this.onDidAddVisibleViewDescriptors,this.onDidRemoveVisibleViewDescriptors,this.onDidMoveVisibleViewDescriptors)(()=>{this.viewDescriptorsState.updateState(this.allViewDescriptors),this.updateContainerInfo()})),this.updateContainerInfo()}get title(){return this._title}get icon(){return this._icon}get keybindingId(){return this._keybindingId}get allViewDescriptors(){return this.viewDescriptorItems.map(p=>p.viewDescriptor)}get activeViewDescriptors(){return this.viewDescriptorItems.filter(p=>p.state.active).map(p=>p.viewDescriptor)}get visibleViewDescriptors(){return this.viewDescriptorItems.filter(p=>this.isViewDescriptorVisible(p)).map(p=>p.viewDescriptor)}updateContainerInfo(){const p=this.viewContainer.alwaysUseContainerInfo||this.visibleViewDescriptors.length===0||this.visibleViewDescriptors.some(m=>A.Registry.as(t.Extensions.ViewsRegistry).getViewContainer(m.id)===this.viewContainer),u=p?this.viewContainer.title:this.visibleViewDescriptors[0]?.containerTitle||this.visibleViewDescriptors[0]?.name||"";let a=!1;this._title!==u&&(this._title=u,a=!0);const n=p?this.viewContainer.icon:this.visibleViewDescriptors[0]?.containerIcon||t.defaultViewIcon;let h=!1;this.isEqualIcon(n)||(this._icon=n,h=!0);const g=this.viewContainer.openCommandActionDescriptor?.id??this.activeViewDescriptors.find(m=>m.openCommandActionDescriptor)?.openCommandActionDescriptor?.id;let d=!1;this._keybindingId!==g&&(this._keybindingId=g,d=!0),(a||h||d)&&this._onDidChangeContainerInfo.fire({title:a,icon:h,keybindingId:d})}isEqualIcon(p){return w.URI.isUri(p)?w.URI.isUri(this._icon)&&(0,o.isEqual)(p,this._icon):c.ThemeIcon.isThemeIcon(p)?c.ThemeIcon.isThemeIcon(this._icon)&&c.ThemeIcon.isEqual(p,this._icon):p===this._icon}isVisible(p){const u=this.viewDescriptorItems.find(a=>a.viewDescriptor.id===p);if(!u)throw new Error(`Unknown view ${p}`);return this.isViewDescriptorVisible(u)}setVisible(p,u){this.updateVisibility([{id:p,visible:u}])}updateVisibility(p){const u=(0,v.coalesce)(p.filter(({visible:h})=>!h).map(({id:h})=>this.findAndIgnoreIfNotFound(h))),a=[];for(const{viewDescriptorItem:h,visibleIndex:g}of u)this.updateViewDescriptorItemVisibility(h,!1)&&a.push({viewDescriptor:h.viewDescriptor,index:g});a.length&&this.broadCastRemovedVisibleViewDescriptors(a);const n=[];for(const{id:h,visible:g}of p){if(!g)continue;const d=this.findAndIgnoreIfNotFound(h);if(!d)continue;const{viewDescriptorItem:m,visibleIndex:b}=d;this.updateViewDescriptorItemVisibility(m,!0)&&n.push({index:b,viewDescriptor:m.viewDescriptor,size:m.state.size,collapsed:!!m.state.collapsed})}n.length&&this.broadCastAddedVisibleViewDescriptors(n)}updateViewDescriptorItemVisibility(p,u){return!p.viewDescriptor.canToggleVisibility||this.isViewDescriptorVisibleWhenActive(p)===u?!1:(p.viewDescriptor.workspace?p.state.visibleWorkspace=u:p.state.visibleGlobal=u,this.isViewDescriptorVisible(p)===u)}isCollapsed(p){return!!this.find(p).viewDescriptorItem.state.collapsed}setCollapsed(p,u){const{viewDescriptorItem:a}=this.find(p);a.state.collapsed!==u&&(a.state.collapsed=u),this.viewDescriptorsState.updateState(this.allViewDescriptors)}getSize(p){return this.find(p).viewDescriptorItem.state.size}setSizes(p){for(const{id:u,size:a}of p){const{viewDescriptorItem:n}=this.find(u);n.state.size!==a&&(n.state.size=a)}this.viewDescriptorsState.updateState(this.allViewDescriptors)}move(p,u){const a=this.viewDescriptorItems.findIndex(d=>d.viewDescriptor.id===p),n=this.viewDescriptorItems.findIndex(d=>d.viewDescriptor.id===u),h=this.viewDescriptorItems[a],g=this.viewDescriptorItems[n];(0,v.move)(this.viewDescriptorItems,a,n);for(let d=0;d<this.viewDescriptorItems.length;d++)this.viewDescriptorItems[d].state.order=d;this._onDidMoveVisibleViewDescriptors.fire({from:{index:a,viewDescriptor:h.viewDescriptor},to:{index:n,viewDescriptor:g.viewDescriptor}})}add(p){const u=[];for(const h of p){const g=h.viewDescriptor;if(g.when)for(const m of g.when.keys())this.contextKeys.add(m);let d=this.viewDescriptorsState.get(g.id);d?(g.workspace?d.visibleWorkspace=(0,C.isUndefinedOrNull)(h.visible)?(0,C.isUndefinedOrNull)(d.visibleWorkspace)?!g.hideByDefault:d.visibleWorkspace:h.visible:d.visibleGlobal=(0,C.isUndefinedOrNull)(h.visible)?(0,C.isUndefinedOrNull)(d.visibleGlobal)?!g.hideByDefault:d.visibleGlobal:h.visible,d.collapsed=(0,C.isUndefinedOrNull)(h.collapsed)?(0,C.isUndefinedOrNull)(d.collapsed)?!!g.collapsed:d.collapsed:h.collapsed):d={active:!1,visibleGlobal:(0,C.isUndefinedOrNull)(h.visible)?!g.hideByDefault:h.visible,visibleWorkspace:(0,C.isUndefinedOrNull)(h.visible)?!g.hideByDefault:h.visible,collapsed:(0,C.isUndefinedOrNull)(h.collapsed)?!!g.collapsed:h.collapsed},this.viewDescriptorsState.set(g.id,d),d.active=this.contextKeyService.contextMatchesRules(g.when),u.push({viewDescriptor:g,state:d})}this.viewDescriptorItems.push(...u),this.viewDescriptorItems.sort(this.compareViewDescriptors.bind(this)),this._onDidChangeAllViewDescriptors.fire({added:u.map(({viewDescriptor:h})=>h),removed:[]});const a=[];for(const h of u)h.state.active&&a.push({viewDescriptorItem:h,visible:this.isViewDescriptorVisible(h)});a.length&&this._onDidChangeActiveViewDescriptors.fire({added:a.map(({viewDescriptorItem:h})=>h.viewDescriptor),removed:[]});const n=[];for(const{viewDescriptorItem:h,visible:g}of a)if(g&&this.isViewDescriptorVisible(h)){const{visibleIndex:d}=this.find(h.viewDescriptor.id);n.push({index:d,viewDescriptor:h.viewDescriptor,size:h.state.size,collapsed:!!h.state.collapsed})}this.broadCastAddedVisibleViewDescriptors(n)}remove(p){const u=[],a=[],n=[],h=[];for(const g of p){if(g.when)for(const m of g.when.keys())this.contextKeys.delete(m);const d=this.viewDescriptorItems.findIndex(m=>m.viewDescriptor.id===g.id);if(d!==-1){u.push(g);const m=this.viewDescriptorItems[d];if(m.state.active&&n.push(m.viewDescriptor),this.isViewDescriptorVisible(m)){const{visibleIndex:b}=this.find(m.viewDescriptor.id);h.push({index:b,viewDescriptor:m.viewDescriptor})}a.push(m)}}a.forEach(g=>this.viewDescriptorItems.splice(this.viewDescriptorItems.indexOf(g),1)),this.broadCastRemovedVisibleViewDescriptors(h),n.length&&this._onDidChangeActiveViewDescriptors.fire({added:[],removed:n}),u.length&&this._onDidChangeAllViewDescriptors.fire({added:[],removed:u})}onDidChangeContext(){const p=[],u=[];for(const h of this.viewDescriptorItems){const g=h.state.active,d=this.contextKeyService.contextMatchesRules(h.viewDescriptor.when);g!==d&&(d?p.push({item:h,visibleWhenActive:this.isViewDescriptorVisibleWhenActive(h)}):u.push(h))}const a=[];for(const h of u)if(this.isViewDescriptorVisible(h)){const{visibleIndex:g}=this.find(h.viewDescriptor.id);a.push({index:g,viewDescriptor:h.viewDescriptor})}u.forEach(h=>h.state.active=!1),p.forEach(({item:h})=>h.state.active=!0),this.broadCastRemovedVisibleViewDescriptors(a),(p.length||u.length)&&this._onDidChangeActiveViewDescriptors.fire({added:p.map(({item:h})=>h.viewDescriptor),removed:u.map(h=>h.viewDescriptor)});const n=[];for(const{item:h,visibleWhenActive:g}of p)if(g&&this.isViewDescriptorVisible(h)){const{visibleIndex:d}=this.find(h.viewDescriptor.id);n.push({index:d,viewDescriptor:h.viewDescriptor,size:h.state.size,collapsed:!!h.state.collapsed})}this.broadCastAddedVisibleViewDescriptors(n)}broadCastAddedVisibleViewDescriptors(p){p.length&&this._onDidAddVisibleViewDescriptors.fire(p.sort((u,a)=>u.index-a.index))}broadCastRemovedVisibleViewDescriptors(p){p.length&&this._onDidRemoveVisibleViewDescriptors.fire(p.sort((u,a)=>a.index-u.index))}isViewDescriptorVisible(p){return p.state.active?this.isViewDescriptorVisibleWhenActive(p):!1}isViewDescriptorVisibleWhenActive(p){return p.viewDescriptor.workspace?!!p.state.visibleWorkspace:!!p.state.visibleGlobal}find(p){const u=this.findAndIgnoreIfNotFound(p);if(u)return u;throw new Error(`view descriptor ${p} not found`)}findAndIgnoreIfNotFound(p){for(let u=0,a=0;u<this.viewDescriptorItems.length;u++){const n=this.viewDescriptorItems[u];if(n.viewDescriptor.id===p)return{index:u,visibleIndex:a,viewDescriptorItem:n};this.isViewDescriptorVisible(n)&&a++}}compareViewDescriptors(p,u){return p.viewDescriptor.id===u.viewDescriptor.id?0:this.getViewOrder(p)-this.getViewOrder(u)||this.getGroupOrderResult(p.viewDescriptor,u.viewDescriptor)}getViewOrder(p){const u=typeof p.state.order=="number"?p.state.order:p.viewDescriptor.order;return typeof u=="number"?u:Number.MAX_VALUE}getGroupOrderResult(p,u){return!p.group||!u.group||p.group===u.group?0:p.group<u.group?-1:1}};l=Ee([W(1,I.IInstantiationService),W(2,f.IContextKeyService)],l),e.ViewContainerModel=l}),define(ne[923],re([1,0,11,6,2,23]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceWorkingCopy=void 0;let k=class extends _.Disposable{constructor(I,w){super();this.resource=I,this.fileService=w,this._onDidChangeOrphaned=this._register(new f.Emitter),this.onDidChangeOrphaned=this._onDidChangeOrphaned.event,this.orphaned=!1,this._onWillDispose=this._register(new f.Emitter),this.onWillDispose=this._onWillDispose.event,this.disposed=!1,this._register(this.fileService.onDidFilesChange(v=>this.onDidFilesChange(v)))}isOrphaned(){return this.orphaned}async onDidFilesChange(I){let w=!1,v;if(this.orphaned?I.contains(this.resource,1)&&(v=!1,w=!0):I.contains(this.resource,2)&&(v=!0,w=!0),w&&this.orphaned!==v){let C=!1;v&&(await(0,t.timeout)(100),this.isDisposed()?C=!0:C=!await this.fileService.exists(this.resource)),this.orphaned!==C&&!this.isDisposed()&&this.setOrphaned(C)}}setOrphaned(I){this.orphaned!==I&&(this.orphaned=I,this._onDidChangeOrphaned.fire())}isDisposed(){return this.disposed}dispose(){this.disposed=!0,this.orphaned=!1,this._onWillDispose.fire(),super.dispose()}};k=Ee([W(1,A.IFileService)],k),e.ResourceWorkingCopy=k}),define(ne[2679],re([1,0,1921,11,30,31,67,2,15]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StoredFileWorkingCopySaveParticipant=void 0;let w=class extends D.Disposable{constructor(C,o){super();this.progressService=C,this.logService=o,this.saveParticipants=[]}get length(){return this.saveParticipants.length}addSaveParticipant(C){const o=(0,I.insert)(this.saveParticipants,C);return(0,D.toDisposable)(()=>o())}participate(C,o,c){const i=new _.CancellationTokenSource(c);return this.progressService.withProgress({title:(0,t.localize)(0,null,C.name),location:15,cancellable:!0,delay:C.isDirty()?3e3:5e3},async S=>{C.model?.pushStackElement();for(const s of this.saveParticipants){if(i.token.isCancellationRequested||C.isDisposed())break;try{const l=s.participate(C,o,S,i.token);await(0,f.raceCancellation)(l,i.token)}catch(l){this.logService.warn(l)}}C.model?.pushStackElement()},()=>{i.dispose(!0)})}dispose(){this.saveParticipants.splice(0,this.saveParticipants.length)}};w=Ee([W(0,k.IProgressService),W(1,A.ILogService)],w),e.StoredFileWorkingCopySaveParticipant=w}),define(ne[336],re([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NO_TYPE_ID=e.WorkingCopyCapabilities=void 0;var t;(function(f){f[f.None=0]="None",f[f.Untitled=2]="Untitled"})(t=e.WorkingCopyCapabilities||(e.WorkingCopyCapabilities={})),e.NO_TYPE_ID=""}),define(ne[160],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWorkingCopyBackupService=void 0,e.IWorkingCopyBackupService=(0,t.createDecorator)("workingCopyBackupService")}),define(ne[2680],re([1,0,52,42,5,505,160,13,93,324,6,55]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.searchEditorModelFactory=e.SearchEditorModel=e.SearchConfigurationModel=void 0;class o{constructor(s){this.config=s,this._onConfigDidUpdate=new v.Emitter,this.onConfigDidUpdate=this._onConfigDidUpdate.event}updateConfig(s){this.config=s,this._onConfigDidUpdate.fire(s)}}e.SearchConfigurationModel=o;let c=class{constructor(s,l){this.resource=s,this.workingCopyBackupService=l}async resolve(){return(0,D.assertIsDefined)(e.searchEditorModelFactory.models.get(this.resource)).resolve()}};c=Ee([W(1,k.IWorkingCopyBackupService)],c),e.SearchEditorModel=c;class i{constructor(){this.models=new C.ResourceMap}initializeModelFromExistingModel(s,l,r){if(this.models.has(l))throw Error("Unable to contruct model for resource that already exists");const p=s.get(f.ILanguageService),u=s.get(t.IModelService),a=s.get(_.IInstantiationService),n=s.get(k.IWorkingCopyBackupService);let h;this.models.set(l,{resolve:()=>(h||(h=(async()=>{const g=await this.tryFetchModelFromBackupService(l,p,u,n,a);return g||Promise.resolve({resultsModel:u.getModel(l)??u.createModel("",p.createById("search-result"),l),configurationModel:new o(r)})})()),h)})}initializeModelFromRawData(s,l,r,p){if(this.models.has(l))throw Error("Unable to contruct model for resource that already exists");const u=s.get(f.ILanguageService),a=s.get(t.IModelService),n=s.get(_.IInstantiationService),h=s.get(k.IWorkingCopyBackupService);let g;this.models.set(l,{resolve:()=>(g||(g=(async()=>{const d=await this.tryFetchModelFromBackupService(l,u,a,h,n);return d||Promise.resolve({resultsModel:a.createModel(p??"",u.createById("search-result"),l),configurationModel:new o(r)})})()),g)})}initializeModelFromExistingFile(s,l,r){if(this.models.has(l))throw Error("Unable to contruct model for resource that already exists");const p=s.get(f.ILanguageService),u=s.get(t.IModelService),a=s.get(_.IInstantiationService),n=s.get(k.IWorkingCopyBackupService);let h;this.models.set(l,{resolve:async()=>(h||(h=(async()=>{const g=await this.tryFetchModelFromBackupService(l,p,u,n,a);if(g)return g;const{text:d,config:m}=await a.invokeFunction(A.parseSavedSearchEditor,r);return{resultsModel:u.createModel(d??"",p.createById("search-result"),l),configurationModel:new o(m)}})()),h)})}async tryFetchModelFromBackupService(s,l,r,p,u){const a=await p.resolve({resource:s,typeId:w.SearchEditorWorkingCopyTypeId});let n=r.getModel(s);if(!n&&a){const h=await(0,I.createTextBufferFactoryFromStream)(a.value);n=r.createModel(h,l.createById("search-result"),s)}if(n){const h=n.getValue(),{text:g,config:d}=(0,A.parseSerializedSearchEditor)(h);return r.destroyModel(s),{resultsModel:r.createModel(g??"",l.createById("search-result"),s),configurationModel:new o(d)}}else return}}e.searchEditorModelFactory=new i}),define(ne[924],re([1,0,28,15,5,21,22,34,8,160,76,23,19,80,600,50,24,199,46]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StartupPageContribution=e.restoreWalkthroughsConfigurationKey=void 0,e.restoreWalkthroughsConfigurationKey="workbench.welcomePage.restorableWalkthroughs";const p="workbench.startupEditor",u="workbench.welcome.enabled",a="workbench.telemetryOptOutShown";let n=class{constructor(d,m,b,E,y,T,R,O,x,F,L,M){this.instantiationService=d,this.configurationService=m,this.editorService=b,this.workingCopyBackupService=E,this.fileService=y,this.contextService=T,this.lifecycleService=R,this.layoutService=O,this.productService=x,this.commandService=F,this.environmentService=L,this.storageService=M,this.run().then(void 0,k.onUnexpectedError)}async run(){if(this.productService.enableTelemetry&&this.productService.showTelemetryOptOut&&(0,l.getTelemetryLevel)(this.configurationService)!==0&&!this.environmentService.skipWelcome&&!this.storageService.get(a,0)){this.storageService.store(a,!0,0,0),await this.openGettingStarted(!0);return}if(this.tryOpenWalkthroughForFolder())return;if(h(this.configurationService,this.contextService,this.environmentService)&&this.lifecycleService.startupKind!==3){if(await this.workingCopyBackupService.hasBackups())return;if(!this.editorService.activeEditor||this.layoutService.openedDefaultEditors){const b=this.configurationService.inspect(p);b.value==="readme"&&(b.userValue==="readme"||b.defaultValue==="readme")?await this.openReadme():await this.openGettingStarted()}}}tryOpenWalkthroughForFolder(){const d=this.storageService.get(e.restoreWalkthroughsConfigurationKey,0);if(d){const m=JSON.parse(d),b=this.contextService.getWorkspace();if(m.folder===b.folders[0].uri.toString())return this.editorService.openEditor(this.instantiationService.createInstance(i.GettingStartedInput,{selectedCategory:m.category,selectedStep:m.step}),{pinned:!1}),this.storageService.remove(e.restoreWalkthroughsConfigurationKey,0),!0}else return!1;return!1}async openReadme(){const d=f.coalesce(await Promise.all(this.contextService.getWorkspace().folders.map(async m=>{const b=m.uri,E=await this.fileService.resolve(b).catch(k.onUnexpectedError),y=E?.children?E.children.map(R=>R.name).sort():[],T=y.find(R=>R.toLowerCase()==="readme.md")||y.find(R=>R.toLowerCase().startsWith("readme"));if(T)return(0,o.joinPath)(b,T)})));if(!this.editorService.activeEditor)if(d.length){const m=b=>b.path.toLowerCase().endsWith(".md");await Promise.all([this.commandService.executeCommand("markdown.showPreview",null,d.filter(m),{locked:!0}),this.editorService.openEditors(d.filter(b=>!m(b)).map(b=>({resource:b})))])}else await this.openGettingStarted()}async openGettingStarted(d){const m=i.gettingStartedInputTypeId,b=this.editorService.activeEditor;if(b?.typeId===m||this.editorService.editors.some(y=>y.typeId===m))return;const E=b?{pinned:!1,index:0}:{pinned:!1};m===i.gettingStartedInputTypeId&&this.editorService.openEditor(this.instantiationService.createInstance(i.GettingStartedInput,{showTelemetryNotice:d}),E)}};n=Ee([W(0,_.IInstantiationService),W(1,I.IConfigurationService),W(2,A.IEditorService),W(3,w.IWorkingCopyBackupService),W(4,C.IFileService),W(5,D.IWorkspaceContextService),W(6,v.ILifecycleService),W(7,c.IWorkbenchLayoutService),W(8,r.IProductService),W(9,t.ICommandService),W(10,S.IWorkbenchEnvironmentService),W(11,s.IStorageService)],n),e.StartupPageContribution=n;function h(g,d,m){if(m.skipWelcome)return!1;const b=g.inspect(p);if(!b.userValue&&!b.workspaceValue){const E=g.inspect(u);if(E.value!==void 0&&E.value!==null)return E.value}return b.value==="readme"&&b.userValue!=="readme"&&b.defaultValue!=="readme"&&console.error(`Warning: 'workbench.startupEditor: readme' setting ignored due to being set somewhere other than user or default settings (user=${b.userValue}, default=${b.defaultValue})`),b.value==="welcomePage"||b.value==="readme"&&(b.userValue==="readme"||b.defaultValue==="readme")||d.getWorkbenchState()===1&&b.value==="welcomePageInEmptyWorkbench"}}),define(ne[925],re([1,0,6,2,55,11,23,31,160]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseFileWorkingCopyManager=void 0;let w=class extends f.Disposable{constructor(C,o,c){super();this.fileService=C,this.logService=o,this.workingCopyBackupService=c,this._onDidCreate=this._register(new t.Emitter),this.onDidCreate=this._onDidCreate.event,this.mapResourceToWorkingCopy=new _.ResourceMap,this.mapResourceToDisposeListener=new _.ResourceMap}has(C){return this.mapResourceToWorkingCopy.has(C)}add(C,o){this.get(C)!==o&&(this.mapResourceToWorkingCopy.set(C,o),this.mapResourceToDisposeListener.get(C)?.dispose(),this.mapResourceToDisposeListener.set(C,o.onWillDispose(()=>this.remove(C))),this._onDidCreate.fire(o))}remove(C){const o=this.mapResourceToDisposeListener.get(C);return o&&((0,f.dispose)(o),this.mapResourceToDisposeListener.delete(C)),this.mapResourceToWorkingCopy.delete(C)}get workingCopies(){return[...this.mapResourceToWorkingCopy.values()]}get(C){return this.mapResourceToWorkingCopy.get(C)}dispose(){super.dispose(),this.mapResourceToWorkingCopy.clear(),(0,f.dispose)(this.mapResourceToDisposeListener.values()),this.mapResourceToDisposeListener.clear()}async destroy(){try{await A.Promises.settled(this.workingCopies.map(async C=>{C.isDirty()&&await this.saveWithFallback(C)}))}catch(C){this.logService.error(C)}(0,f.dispose)(this.mapResourceToWorkingCopy.values()),this.dispose()}async saveWithFallback(C){let o=!1;try{o=await C.save()}catch{}if(!o||C.isDirty()){const c=await this.workingCopyBackupService.resolve(C);c&&await this.fileService.writeFile(C.resource,c.value,{unlock:!0})}}};w=Ee([W(0,k.IFileService),W(1,D.ILogService),W(2,I.IWorkingCopyBackupService)],w),e.BaseFileWorkingCopyManager=w}),define(ne[926],re([1,0,19,9,15,51,11,23,55,206,60,2,31,18,116,13,336]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hashIdentifier=e.InMemoryWorkingCopyBackupService=e.WorkingCopyBackupService=e.WorkingCopyBackupsModel=void 0;class l{constructor(d,m){this.backupRoot=d,this.fileService=m,this.cache=new I.ResourceMap}static async create(d,m){const b=new l(d,m);return await b.resolve(),b}async resolve(){try{const d=await this.fileService.resolve(this.backupRoot);d.children&&await k.Promises.settled(d.children.filter(m=>m.isDirectory).map(async m=>{const b=await this.fileService.resolve(m.resource);if(b.children)for(const E of b.children)E.isDirectory||this.add(E.resource)}))}catch{}}add(d,m=0,b){this.cache.set(d,{versionId:m,meta:(0,A.deepClone)(b)})}update(d,m){const b=this.cache.get(d);b&&(b.meta=(0,A.deepClone)(m))}count(){return this.cache.size}has(d,m,b){const E=this.cache.get(d);return!(!E||typeof m=="number"&&m!==E.versionId||b&&!(0,A.equals)(b,E.meta))}get(){return Array.from(this.cache.keys())}remove(d){this.cache.delete(d)}move(d,m){const b=this.cache.get(d);b&&(this.cache.delete(d),this.cache.set(m,b))}clear(){this.cache.clear()}}e.WorkingCopyBackupsModel=l;let r=class{constructor(d,m,b){this.fileService=m,this.logService=b,this.impl=this.initialize(d)}initialize(d){return d?new p(d,this.fileService,this.logService):new u}reinitialize(d){this.impl instanceof p&&(d?this.impl.initialize(d):this.impl=new u)}hasBackups(){return this.impl.hasBackups()}hasBackupSync(d,m,b){return this.impl.hasBackupSync(d,m,b)}backup(d,m,b,E,y){return this.impl.backup(d,m,b,E,y)}discardBackup(d,m){return this.impl.discardBackup(d,m)}discardBackups(d){return this.impl.discardBackups(d)}getBackups(){return this.impl.getBackups()}resolve(d){return this.impl.resolve(d)}toBackupResource(d){return this.impl.toBackupResource(d)}joinBackups(){return this.impl.joinBackups()}};r=Ee([W(1,D.IFileService),W(2,o.ILogService)],r),e.WorkingCopyBackupService=r;let p=class hi extends C.Disposable{constructor(d,m,b){super();this.backupWorkspaceHome=d,this.fileService=m,this.logService=b,this.ioOperationQueues=this._register(new k.ResourceQueue),this.model=void 0,this.initialize(d)}initialize(d){this.backupWorkspaceHome=d,this.ready=this.doInitialize()}async doInitialize(){this.model=await l.create(this.backupWorkspaceHome,this.fileService);for(const d of this.model.get())if((0,t.basename)(d).length===32)try{const m=await this.resolveIdentifier(d,this.model);if(!m){this.logService.warn(`Backup: Unable to read target URI of backup ${d} for migration to new hash.`);continue}const b=this.toBackupResource(m);(0,t.isEqual)(b,d)||(await this.fileService.move(d,b,!0),this.model.move(d,b))}catch{this.logService.error(`Backup: Unable to migrate backup ${d} to new hash.`)}return this.model}async hasBackups(){return(await this.ready).count()>0}hasBackupSync(d,m,b){if(!this.model)return!1;const E=this.toBackupResource(d);return this.model.has(E,m,b)}async backup(d,m,b,E,y){const T=await this.ready;if(y?.isCancellationRequested)return;const R=this.toBackupResource(d);if(!T.has(R,b,E))return this.ioOperationQueues.queueFor(R).queue(async()=>{if(y?.isCancellationRequested||T.has(R,b,E))return;let O=this.createPreamble(d,E);O.length>=hi.PREAMBLE_MAX_LENGTH&&(O=this.createPreamble(d));const x=v.VSBuffer.fromString(O);let F;(0,w.isReadableStream)(m)?F=(0,v.prefixedBufferStream)(x,m):m?F=(0,v.prefixedBufferReadable)(x,m):F=v.VSBuffer.concat([x,v.VSBuffer.fromString("")]),await this.fileService.writeFile(R,F),T.add(R,b,E)})}createPreamble(d,m){return`${d.resource.toString()}${hi.PREAMBLE_META_SEPARATOR}${JSON.stringify({...m,typeId:d.typeId})}${hi.PREAMBLE_END_MARKER}`}async discardBackups(d){const m=await this.ready,b=d?.except;if(Array.isArray(b)&&b.length>0){const E=new I.ResourceMap;for(const y of b)E.set(this.toBackupResource(y),!0);await k.Promises.settled(m.get().map(async y=>{E.has(y)||await this.doDiscardBackup(y)}))}else await this.deleteIgnoreFileNotFound(this.backupWorkspaceHome),m.clear()}discardBackup(d,m){const b=this.toBackupResource(d);return this.doDiscardBackup(b,m)}async doDiscardBackup(d,m){const b=await this.ready;if(!m?.isCancellationRequested)return this.ioOperationQueues.queueFor(d).queue(async()=>{m?.isCancellationRequested||(await this.deleteIgnoreFileNotFound(d),b.remove(d))})}async deleteIgnoreFileNotFound(d){try{await this.fileService.del(d,{recursive:!0})}catch(m){if(m.fileOperationResult!==1)throw m}}async getBackups(){const d=await this.ready,m=await Promise.all(d.get().map(b=>this.resolveIdentifier(b,d)));return(0,_.coalesce)(m)}async resolveIdentifier(d,m){const b=await this.readToMatchingString(d,hi.PREAMBLE_END_MARKER,hi.PREAMBLE_MAX_LENGTH);if(!b)return;const E=b.indexOf(hi.PREAMBLE_META_SEPARATOR);let y,T;E>0?(y=b.substring(0,E),T=b.substr(E+1)):(y=b,T=void 0);const{typeId:R,meta:O}=this.parsePreambleMeta(T);return m.update(d,O),{typeId:R??s.NO_TYPE_ID,resource:f.URI.parse(y)}}async readToMatchingString(d,m,b){const E=(await this.fileService.readFile(d,{length:b})).value.toString(),y=E.indexOf(m);if(y>=0)return E.substr(0,y)}async resolve(d){const m=this.toBackupResource(d),b=await this.ready;if(!b.has(m))return;const E=await this.fileService.readFileStream(m),y=await(0,w.peekStream)(E.value,1),T=v.VSBuffer.concat(y.buffer),R=T.buffer.indexOf(hi.PREAMBLE_END_MARKER_CHARCODE);if(R===-1){this.logService.trace(`Backup: Could not find meta end marker in ${m}. The file is probably corrupt (filesize: ${E.size}).`);return}const O=T.slice(0,R).toString();let x;const F=O.indexOf(hi.PREAMBLE_META_SEPARATOR);F!==-1&&(x=this.parsePreambleMeta(O.substr(F+1)).meta),b.update(m,x);const L=T.slice(R+1);let M;return y.ended?M=(0,v.bufferToStream)(L):M=(0,v.prefixedBufferStream)(L,y.stream),{value:M,meta:x}}parsePreambleMeta(d){let m,b;if(d)try{b=JSON.parse(d),m=b?.typeId,typeof b?.typeId=="string"&&(delete b.typeId,(0,S.isEmptyObject)(b)&&(b=void 0))}catch{}return{typeId:m,meta:b}}toBackupResource(d){return(0,t.joinPath)(this.backupWorkspaceHome,d.resource.scheme,a(d))}joinBackups(){return this.ioOperationQueues.whenDrained()}};p.PREAMBLE_END_MARKER=` `,p.PREAMBLE_END_MARKER_CHARCODE=` `.charCodeAt(0),p.PREAMBLE_META_SEPARATOR=" ",p.PREAMBLE_MAX_LENGTH=1e4,p=Ee([W(1,D.IFileService),W(2,o.ILogService)],p);class u{constructor(){this.backups=new I.ResourceMap}async hasBackups(){return this.backups.size>0}hasBackupSync(d,m){const b=this.toBackupResource(d);return this.backups.has(b)}async backup(d,m,b,E,y){const T=this.toBackupResource(d);this.backups.set(T,{typeId:d.typeId,content:m instanceof v.VSBuffer?m:m?(0,w.isReadableStream)(m)?await(0,v.streamToBuffer)(m):(0,v.readableToBuffer)(m):v.VSBuffer.fromString(""),meta:E})}async resolve(d){const m=this.toBackupResource(d),b=this.backups.get(m);if(b)return{value:(0,v.bufferToStream)(b.content),meta:b.meta}}async getBackups(){return Array.from(this.backups.entries()).map(([d,m])=>({typeId:m.typeId,resource:d}))}async discardBackup(d){this.backups.delete(this.toBackupResource(d))}async discardBackups(d){const m=d?.except;if(Array.isArray(m)&&m.length>0){const b=new I.ResourceMap;for(const E of m)b.set(this.toBackupResource(E),!0);for(const E of await this.getBackups())b.has(this.toBackupResource(E))||await this.discardBackup(E)}else this.backups.clear()}toBackupResource(d){return f.URI.from({scheme:c.Schemas.inMemory,path:a(d)})}async joinBackups(){}}e.InMemoryWorkingCopyBackupService=u;function a(g){let d;if(g.typeId.length>0){const m=h(g.typeId);g.resource.path?d=(0,t.joinPath)(g.resource,m):d=g.resource.with({path:m})}else d=g.resource;return n(d)}e.hashIdentifier=a;function n(g){const d=g.scheme===c.Schemas.file||g.scheme===c.Schemas.untitled?g.fsPath:g.toString();return h(d)}function h(g){return(0,i.hash)(g).toString(16)}}),define(ne[2681],re([1,0,2,30,11,132]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkingCopyBackupTracker=void 0;class k extends t.Disposable{constructor(I,w,v,C,o,c,i,S){super();this.workingCopyBackupService=I,this.workingCopyService=w,this.logService=v,this.lifecycleService=C,this.filesConfigurationService=o,this.workingCopyEditorService=c,this.editorService=i,this.editorGroupService=S,this.mapWorkingCopyToContentVersion=new Map,this.pendingBackupOperations=new Map,this.suspended=!1,this.unrestoredBackups=new Set,this.whenReady=this.resolveBackupsToRestore(),this._isReady=!1;for(const s of this.workingCopyService.dirtyWorkingCopies)this.onDidRegister(s);this.registerListeners()}registerListeners(){this._register(this.workingCopyService.onDidRegister(I=>this.onDidRegister(I))),this._register(this.workingCopyService.onDidUnregister(I=>this.onDidUnregister(I))),this._register(this.workingCopyService.onDidChangeDirty(I=>this.onDidChangeDirty(I))),this._register(this.workingCopyService.onDidChangeContent(I=>this.onDidChangeContent(I))),this.lifecycleService.onBeforeShutdown(I=>I.finalVeto(()=>this.onFinalBeforeShutdown(I.reason),"veto.backups")),this.lifecycleService.onWillShutdown(()=>this.onWillShutdown()),this._register(this.workingCopyEditorService.onDidRegisterHandler(I=>this.restoreBackups(I)))}onWillShutdown(){this.cancelBackupOperations(),this.suspendBackupOperations()}onDidRegister(I){if(this.suspended){this.logService.warn("[backup tracker] suspended, ignoring register event",I.resource.toString(),I.typeId);return}I.isDirty()&&this.scheduleBackup(I)}onDidUnregister(I){if(this.mapWorkingCopyToContentVersion.delete(I),this.suspended){this.logService.warn("[backup tracker] suspended, ignoring unregister event",I.resource.toString(),I.typeId);return}this.discardBackup(I)}onDidChangeDirty(I){if(this.suspended){this.logService.warn("[backup tracker] suspended, ignoring dirty change event",I.resource.toString(),I.typeId);return}I.isDirty()?this.scheduleBackup(I):this.discardBackup(I)}onDidChangeContent(I){const w=this.getContentVersion(I);if(this.mapWorkingCopyToContentVersion.set(I,w+1),this.suspended){this.logService.warn("[backup tracker] suspended, ignoring content change event",I.resource.toString(),I.typeId);return}I.isDirty()&&this.scheduleBackup(I)}scheduleBackup(I){this.cancelBackupOperation(I),this.logService.trace("[backup tracker] scheduling backup",I.resource.toString(),I.typeId);const w=new f.CancellationTokenSource,v=setTimeout(async()=>{if(!w.token.isCancellationRequested){if(I.isDirty()){this.logService.trace("[backup tracker] creating backup",I.resource.toString(),I.typeId);try{const C=await I.backup(w.token);if(w.token.isCancellationRequested)return;I.isDirty()&&(this.logService.trace("[backup tracker] storing backup",I.resource.toString(),I.typeId),await this.workingCopyBackupService.backup(I,C.content,this.getContentVersion(I),C.meta,w.token))}catch(C){this.logService.error(C)}}w.token.isCancellationRequested||this.pendingBackupOperations.delete(I)}},this.getBackupScheduleDelay(I));this.pendingBackupOperations.set(I,(0,t.toDisposable)(()=>{this.logService.trace("[backup tracker] clearing pending backup creation",I.resource.toString(),I.typeId),w.dispose(!0),clearTimeout(v)}))}getBackupScheduleDelay(I){let w=this.filesConfigurationService.getAutoSaveMode();return I.capabilities&2&&(w=0),k.BACKUP_SCHEDULE_DELAYS[w]}getContentVersion(I){return this.mapWorkingCopyToContentVersion.get(I)||0}discardBackup(I){this.cancelBackupOperation(I);const w=new f.CancellationTokenSource;(async()=>{this.logService.trace("[backup tracker] discarding backup",I.resource.toString(),I.typeId);try{await this.workingCopyBackupService.discardBackup(I,w.token)}catch(v){this.logService.error(v)}w.token.isCancellationRequested||this.pendingBackupOperations.delete(I)})(),this.pendingBackupOperations.set(I,(0,t.toDisposable)(()=>{this.logService.trace("[backup tracker] clearing pending backup discard",I.resource.toString(),I.typeId),w.dispose(!0)}))}cancelBackupOperation(I){(0,t.dispose)(this.pendingBackupOperations.get(I)),this.pendingBackupOperations.delete(I)}cancelBackupOperations(){for(const[,I]of this.pendingBackupOperations)(0,t.dispose)(I);this.pendingBackupOperations.clear()}suspendBackupOperations(){return this.suspended=!0,{resume:()=>this.suspended=!1}}get isReady(){return this._isReady}async resolveBackupsToRestore(){await this.lifecycleService.when(3);for(const I of await this.workingCopyBackupService.getBackups())this.unrestoredBackups.add(I);this._isReady=!0}async restoreBackups(I){await this.whenReady;const w=new Set,v=new Set,C=new Set;for(const o of this.unrestoredBackups){if(!I.handles(o))continue;let i=!1;for(const{editor:S}of this.editorService.getEditors(0))I.isOpen(o,S)&&(w.add(S),i=!0);i||v.add(await I.createEditor(o)),C.add(o)}if(v.size>0){await this.editorGroupService.activeGroup.openEditors([...v].map(o=>({editor:o,options:{pinned:!0,preserveFocus:!0,inactive:!0,override:A.EditorResolution.DISABLED}})));for(const o of v)w.add(o)}await _.Promises.settled([...w].map(async o=>{if(!this.editorService.isVisible(o))return o.resolve()}));for(const o of C)this.unrestoredBackups.delete(o)}}e.WorkingCopyBackupTracker=k,k.BACKUP_SCHEDULE_DELAYS={[0]:1e3,[3]:1e3,[4]:1e3,[1]:2e3,[2]:1e3}}),define(ne[240],re([1,0,6,5,35,2,21]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkingCopyEditorService=e.IWorkingCopyEditorService=void 0,e.IWorkingCopyEditorService=(0,f.createDecorator)("workingCopyEditorService");let D=class extends A.Disposable{constructor(w){super();this.editorService=w,this._onDidRegisterHandler=this._register(new t.Emitter),this.onDidRegisterHandler=this._onDidRegisterHandler.event,this.handlers=new Set}registerHandler(w){return this.handlers.add(w),this._onDidRegisterHandler.fire(w),(0,A.toDisposable)(()=>this.handlers.delete(w))}findEditor(w){for(const v of this.editorService.getEditors(0))if(this.isOpen(w,v.editor))return v}isOpen(w,v){for(const C of this.handlers)if(C.handles(w)&&C.isOpen(w,v))return!0;return!1}};D=Ee([W(0,k.IEditorService)],D),e.WorkingCopyEditorService=D,(0,_.registerSingleton)(e.IWorkingCopyEditorService,D)}),define(ne[2682],re([1,0,83,76,2,15,69,21,11,72,154,148,18,372,240,44]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextFileEditorTracker=void 0;let s=class extends _.Disposable{constructor(r,p,u,a,n,h,g){super();this.editorService=r,this.textFileService=p,this.lifecycleService=u,this.hostService=a,this.codeEditorService=n,this.filesConfigurationService=h,this.workingCopyEditorService=g,this.ensureDirtyFilesAreOpenedWorker=this._register(new I.RunOnceWorker(d=>this.ensureDirtyTextFilesAreOpened(d),this.getDirtyTextFileTrackerDelay())),this.registerListeners()}registerListeners(){this._register(this.textFileService.files.onDidChangeDirty(r=>this.ensureDirtyFilesAreOpenedWorker.work(r.resource))),this._register(this.textFileService.files.onDidSaveError(r=>this.ensureDirtyFilesAreOpenedWorker.work(r.resource))),this._register(this.textFileService.untitled.onDidChangeDirty(r=>this.ensureDirtyFilesAreOpenedWorker.work(r.resource))),this._register(this.hostService.onDidChangeFocus(r=>r?this.reloadVisibleTextFileEditors():void 0)),this.lifecycleService.onDidShutdown(()=>this.dispose())}getDirtyTextFileTrackerDelay(){return 800}ensureDirtyTextFilesAreOpened(r){this.doEnsureDirtyTextFilesAreOpened((0,A.distinct)(r.filter(p=>{if(!this.textFileService.isDirty(p))return!1;const u=this.textFileService.files.get(p);if(u?.hasState(2)||this.filesConfigurationService.getAutoSaveMode()===1&&!u?.hasState(5)||this.editorService.isOpened({resource:p,typeId:p.scheme===o.Schemas.untitled?c.UntitledTextEditorInput.ID:C.FILE_EDITOR_INPUT_ID,editorId:S.DEFAULT_EDITOR_ASSOCIATION.id}))return!1;const a=u??this.textFileService.untitled.get(p);return!(a&&this.workingCopyEditorService.findEditor(a))}),p=>p.toString()))}doEnsureDirtyTextFilesAreOpened(r){!r.length||this.editorService.openEditors(r.map(p=>({resource:p,options:{inactive:!0,pinned:!0,preserveFocus:!0}})))}reloadVisibleTextFileEditors(){(0,A.distinct)((0,A.coalesce)(this.codeEditorService.listCodeEditors().map(r=>{const p=r.getModel()?.uri;if(!p)return;const u=this.textFileService.files.get(p);if(!(!u||u.isDirty()||!u.isResolved()))return u})),r=>r.resource.toString()).forEach(r=>this.textFileService.files.resolve(r.resource,{reload:{async:!0}}))}};s=Ee([W(0,D.IEditorService),W(1,t.ITextFileService),W(2,f.ILifecycleService),W(3,k.IHostService),W(4,w.ICodeEditorService),W(5,v.IFilesConfigurationService),W(6,i.IWorkingCopyEditorService)],s),e.TextFileEditorTracker=s}),define(ne[2683],re([1,0,31,2,8,194]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkingCopyFileOperationParticipant=void 0;let k=class extends f.Disposable{constructor(I,w){super();this.logService=I,this.configurationService=w,this.participants=new A.LinkedList}addFileOperationParticipant(I){const w=this.participants.push(I);return(0,f.toDisposable)(()=>w())}async participate(I,w,v,C){const o=this.configurationService.getValue("files.participants.timeout");if(!(typeof o!="number"||o<=0))for(const c of this.participants)try{await c.participate(I,w,v,o,C)}catch(i){this.logService.warn(i)}}dispose(){this.participants.clear()}};k=Ee([W(0,t.ILogService),W(1,_.IConfigurationService)],k),e.WorkingCopyFileOperationParticipant=k}),define(ne[373],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MAX_PARALLEL_HISTORY_IO_OPS=e.IWorkingCopyHistoryService=void 0,e.IWorkingCopyHistoryService=(0,t.createDecorator)("workingCopyHistoryService"),e.MAX_PARALLEL_HISTORY_IO_OPS=20}),define(ne[135],re([1,0,5,35,6,9,2,55]),function(Q,e,t,f,_,A,k,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkingCopyService=e.IWorkingCopyService=void 0,e.IWorkingCopyService=(0,t.createDecorator)("workingCopyService");class I extends k.Disposable{constructor(){super(...arguments);this._onDidRegister=this._register(new _.Emitter),this.onDidRegister=this._onDidRegister.event,this._onDidUnregister=this._register(new _.Emitter),this.onDidUnregister=this._onDidUnregister.event,this._onDidChangeDirty=this._register(new _.Emitter),this.onDidChangeDirty=this._onDidChangeDirty.event,this._onDidChangeContent=this._register(new _.Emitter),this.onDidChangeContent=this._onDidChangeContent.event,this._onDidSave=this._register(new _.Emitter),this.onDidSave=this._onDidSave.event,this._workingCopies=new Set,this.mapResourceToWorkingCopies=new D.ResourceMap}get workingCopies(){return Array.from(this._workingCopies.values())}registerWorkingCopy(v){let C=this.mapResourceToWorkingCopies.get(v.resource);if(C?.has(v.typeId))throw new Error(`Cannot register more than one working copy with the same resource ${v.resource.toString()} and type ${v.typeId}.`);this._workingCopies.add(v),C||(C=new Map,this.mapResourceToWorkingCopies.set(v.resource,C)),C.set(v.typeId,v);const o=new k.DisposableStore;return o.add(v.onDidChangeContent(()=>this._onDidChangeContent.fire(v))),o.add(v.onDidChangeDirty(()=>this._onDidChangeDirty.fire(v))),o.add(v.onDidSave(c=>this._onDidSave.fire({workingCopy:v,...c}))),this._onDidRegister.fire(v),v.isDirty()&&this._onDidChangeDirty.fire(v),(0,k.toDisposable)(()=>{this.unregisterWorkingCopy(v),(0,k.dispose)(o),this._onDidUnregister.fire(v)})}unregisterWorkingCopy(v){this._workingCopies.delete(v);const C=this.mapResourceToWorkingCopies.get(v.resource);C?.delete(v.typeId)&&C.size===0&&this.mapResourceToWorkingCopies.delete(v.resource),v.isDirty()&&this._onDidChangeDirty.fire(v)}has(v){return A.URI.isUri(v)?this.mapResourceToWorkingCopies.has(v):this.mapResourceToWorkingCopies.get(v.resource)?.has(v.typeId)??!1}get(v){return this.mapResourceToWorkingCopies.get(v.resource)?.get(v.typeId)}getAll(v){const C=this.mapResourceToWorkingCopies.get(v);if(!!C)return Array.from(C.values())}get hasDirty(){for(const v of this._workingCopies)if(v.isDirty())return!0;return!1}get dirtyCount(){let v=0;for(const C of this._workingCopies)C.isDirty()&&v++;return v}get dirtyWorkingCopies(){return this.workingCopies.filter(v=>v.isDirty())}isDirty(v,C){const o=this.mapResourceToWorkingCopies.get(v);if(o){if(typeof C=="string")return o.get(C)?.isDirty()??!1;for(const[,c]of o)if(c.isDirty())return!0}return!1}}e.WorkingCopyService=I,(0,f.registerSingleton)(e.IWorkingCopyService,I,!0)}),define(ne[2684],re([1,0,1369,38,224,66,6,2,10,8,7,91,11,185,17,16,24,195,57,31,135,70,160,1046]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class h extends S.Action2{constructor(){super({id:"workbench.action.inspectContextKeys",title:{value:(0,t.localize)(0,null),original:"Inspect Context Keys"},category:a.CATEGORIES.Developer,f1:!0})}run(y){const T=y.get(v.IContextKeyService),R=new D.DisposableStore,O=(0,I.createStyleSheet)();R.add((0,D.toDisposable)(()=>{O.parentNode&&O.parentNode.removeChild(O)})),(0,I.createCSSRule)("*","cursor: crosshair !important;",O);const x=document.createElement("div");document.body.appendChild(x),R.add((0,D.toDisposable)(()=>document.body.removeChild(x))),x.style.position="absolute",x.style.pointerEvents="none",x.style.backgroundColor="rgba(255, 0, 0, 0.5)",x.style.zIndex="1000";const F=R.add(new _.DomEmitter(document.body,"mousemove",!0));R.add(F.event(N=>{const B=N.target,P=(0,I.getDomNodePagePosition)(B);x.style.top=`${P.top}px`,x.style.left=`${P.left}px`,x.style.width=`${P.width}px`,x.style.height=`${P.height}px`}));const L=R.add(new _.DomEmitter(document.body,"mousedown",!0));k.Event.once(L.event)(N=>{N.preventDefault(),N.stopPropagation()},null,R);const M=R.add(new _.DomEmitter(document.body,"mouseup",!0));k.Event.once(M.event)(N=>{N.preventDefault(),N.stopPropagation();const B=T.getContext(N.target);console.log(B.collectAllValues()),(0,D.dispose)(R)},null,R)}}class g extends S.Action2{constructor(){super({id:"workbench.action.toggleScreencastMode",title:{value:(0,t.localize)(1,null),original:"Toggle Screencast Mode"},category:a.CATEGORIES.Developer,f1:!0})}run(y){if(g.disposable){g.disposable.dispose(),g.disposable=void 0;return}const T=y.get(c.ILayoutService),R=y.get(w.IConfigurationService),O=y.get(f.IKeybindingService),x=new D.DisposableStore,F=T.container,L=(0,I.append)(F,(0,I.$)(".screencast-mouse"));x.add((0,D.toDisposable)(()=>L.remove()));const M=x.add(new _.DomEmitter(F,"mousedown",!0)),N=x.add(new _.DomEmitter(F,"mouseup",!0)),B=x.add(new _.DomEmitter(F,"mousemove",!0)),P=()=>{L.style.borderColor=A.Color.fromHex(R.getValue("screencastMode.mouseIndicatorColor")).toString()};let V;const z=()=>{V=(0,l.clamp)(R.getValue("screencastMode.mouseIndicatorSize")||20,20,100),L.style.height=`${V}px`,L.style.width=`${V}px`};P(),z(),x.add(M.event(Y=>{L.style.top=`${Y.clientY-V/2}px`,L.style.left=`${Y.clientX-V/2}px`,L.style.display="block";const $=B.event(J=>{L.style.top=`${J.clientY-V/2}px`,L.style.left=`${J.clientX-V/2}px`});k.Event.once(N.event)(()=>{L.style.display="none",$.dispose()})}));const U=(0,I.append)(F,(0,I.$)(".screencast-keyboard"));x.add((0,D.toDisposable)(()=>U.remove()));const H=()=>{U.style.fontSize=`${(0,l.clamp)(R.getValue("screencastMode.fontSize")||56,20,100)}px`},K=()=>{U.style.bottom=`${(0,l.clamp)(R.getValue("screencastMode.verticalOffset")||0,0,90)}%`};let G;const q=()=>{G=(0,l.clamp)(R.getValue("screencastMode.keyboardOverlayTimeout")||800,500,5e3)};H(),K(),q(),x.add(R.onDidChangeConfiguration(Y=>{Y.affectsConfiguration("screencastMode.verticalOffset")&&K(),Y.affectsConfiguration("screencastMode.fontSize")&&H(),Y.affectsConfiguration("screencastMode.keyboardOverlayTimeout")&&q(),Y.affectsConfiguration("screencastMode.mouseIndicatorColor")&&P(),Y.affectsConfiguration("screencastMode.mouseIndicatorSize")&&z()}));const Z=x.add(new _.DomEmitter(window,"keydown",!0));let j=D.Disposable.None,X=0;x.add(Z.event(Y=>{j.dispose();const $=new C.StandardKeyboardEvent(Y),J=O.softDispatch($,$.target);if(J?.commandId||!R.getValue("screencastMode.onlyKeyboardShortcuts")){($.ctrlKey||$.altKey||$.metaKey||$.shiftKey||X>20||$.keyCode===1||$.keyCode===9)&&(U.innerText="",X=0);const te=R.getValue("screencastMode.keyboardShortcutsFormat"),se=O.resolveKeyboardEvent($),ie=J?.commandId?S.MenuRegistry.getCommand(J.commandId):null;let ce="",le=se.getLabel();if(ie&&(ce=typeof ie.title=="string"?ie.title:ie.title.value,(te==="commandWithGroup"||te==="commandWithGroupAndKeys")&&ie.category&&(ce=`${typeof ie.category=="string"?ie.category:ie.category.value}: ${ce} `),J?.commandId)){const ae=O.lookupKeybinding(J.commandId);ae&&(le=ae.getLabel())}te!=="keys"&&ce&&(0,I.append)(U,(0,I.$)("span.title",{},`${ce} `)),(!R.getValue("screencastMode.onlyKeyboardShortcuts")||!ce||J?.commandId&&(te==="keys"||te==="commandAndKeys"||te==="commandWithGroupAndKeys"))&&(0,I.append)(U,(0,I.$)("span.key",{},le||"")),X++}const ee=(0,o.timeout)(G);j=(0,D.toDisposable)(()=>ee.cancel()),ee.then(()=>{U.textContent="",X=0})})),g.disposable=x}}class d extends S.Action2{constructor(){super({id:"workbench.action.logStorage",title:{value:(0,t.localize)(2,null),original:"Log Storage Database Contents"},category:a.CATEGORIES.Developer,f1:!0})}run(y){y.get(s.IStorageService).logStorage()}}class m extends S.Action2{constructor(){super({id:"workbench.action.logWorkingCopies",title:{value:(0,t.localize)(3,null),original:"Log Working Copies"},category:a.CATEGORIES.Developer,f1:!0})}async run(y){const T=y.get(u.IWorkingCopyService),R=y.get(n.IWorkingCopyBackupService),O=y.get(p.ILogService),x=await R.getBackups(),F=["","[Working Copies]",...T.workingCopies.length>0?T.workingCopies.map(L=>`${L.isDirty()?"\u25CF ":""}${L.resource.toString(!0)} (typeId: ${L.typeId||"<no typeId>"})`):["<none>"],"","[Backups]",...x.length>0?x.map(L=>`${L.resource.toString(!0)} (typeId: ${L.typeId||"<no typeId>"})`):["<none>"]];O.info(F.join(` `))}}(0,S.registerAction2)(h),(0,S.registerAction2)(g),(0,S.registerAction2)(d),(0,S.registerAction2)(m),i.Registry.as(r.Extensions.Configuration).registerConfiguration({id:"screencastMode",order:9,title:(0,t.localize)(4,null),type:"object",properties:{"screencastMode.verticalOffset":{type:"number",default:20,minimum:0,maximum:90,description:(0,t.localize)(5,null)},"screencastMode.fontSize":{type:"number",default:56,minimum:20,maximum:100,description:(0,t.localize)(6,null)},"screencastMode.keyboardShortcutsFormat":{enum:["keys","command","commandWithGroup","commandAndKeys","commandWithGroupAndKeys"],enumDescriptions:[(0,t.localize)(7,null),(0,t.localize)(8,null),(0,t.localize)(9,null),(0,t.localize)(10,null),(0,t.localize)(11,null)],description:(0,t.localize)(12,null),default:"commandAndKeys"},"screencastMode.onlyKeyboardShortcuts":{type:"boolean",description:(0,t.localize)(13,null),default:!1},"screencastMode.keyboardOverlayTimeout":{type:"number",default:800,minimum:500,maximum:5e3,description:(0,t.localize)(14,null)},"screencastMode.mouseIndicatorColor":{type:"string",format:"color-hex",default:"#FF0000",description:(0,t.localize)(15,null)},"screencastMode.mouseIndicatorSize":{type:"number",default:20,minimum:20,maximum:100,description:(0,t.localize)(16,null)}}})}),define(ne[2685],re([1,0,6,2,7,141,74,44,10,59,8,50,21,34,80,246,230,135,14,159,88,18,396]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkbenchContextKeysHandler=void 0;let h=class extends f.Disposable{constructor(d,m,b,E,y,T,R,O,x,F){super();this.contextKeyService=d,this.contextService=m,this.configurationService=b,this.environmentService=E,this.editorService=y,this.editorResolverService=T,this.editorGroupService=R,this.layoutService=O,this.paneCompositeService=x,this.workingCopyService=F,A.IsMacContext.bindTo(this.contextKeyService),A.IsLinuxContext.bindTo(this.contextKeyService),A.IsWindowsContext.bindTo(this.contextKeyService),A.IsWebContext.bindTo(this.contextKeyService),A.IsMacNativeContext.bindTo(this.contextKeyService),A.IsIOSContext.bindTo(this.contextKeyService),k.RemoteNameContext.bindTo(this.contextKeyService).set((0,S.getRemoteName)(this.environmentService.remoteAuthority)||""),this.virtualWorkspaceContext=k.VirtualWorkspaceContext.bindTo(this.contextKeyService),this.updateVirtualWorkspaceContextKey(),k.HasWebFileSystemAccess.bindTo(this.contextKeyService).set(n.WebFileSystemAccess.supported(window)),A.IsDevelopmentContext.bindTo(this.contextKeyService).set(!this.environmentService.isBuilt||this.environmentService.isExtensionDevelopment),this.activeEditorContext=k.ActiveEditorContext.bindTo(this.contextKeyService),this.activeEditorIsReadonly=k.ActiveEditorReadonlyContext.bindTo(this.contextKeyService),this.activeEditorCanRevert=k.ActiveEditorCanRevertContext.bindTo(this.contextKeyService),this.activeEditorCanSplitInGroup=k.ActiveEditorCanSplitInGroupContext.bindTo(this.contextKeyService),this.activeEditorAvailableEditorIds=k.ActiveEditorAvailableEditorIdsContext.bindTo(this.contextKeyService),this.editorsVisibleContext=k.EditorsVisibleContext.bindTo(this.contextKeyService),this.textCompareEditorVisibleContext=k.TextCompareEditorVisibleContext.bindTo(this.contextKeyService),this.textCompareEditorActiveContext=k.TextCompareEditorActiveContext.bindTo(this.contextKeyService),this.sideBySideEditorActiveContext=k.SideBySideEditorActiveContext.bindTo(this.contextKeyService),this.activeEditorGroupEmpty=k.ActiveEditorGroupEmptyContext.bindTo(this.contextKeyService),this.activeEditorGroupIndex=k.ActiveEditorGroupIndexContext.bindTo(this.contextKeyService),this.activeEditorGroupLast=k.ActiveEditorGroupLastContext.bindTo(this.contextKeyService),this.activeEditorGroupLocked=k.ActiveEditorGroupLockedContext.bindTo(this.contextKeyService),this.multipleEditorGroupsContext=k.MultipleEditorGroupsContext.bindTo(this.contextKeyService),this.dirtyWorkingCopiesContext=k.DirtyWorkingCopiesContext.bindTo(this.contextKeyService),this.dirtyWorkingCopiesContext.set(this.workingCopyService.hasDirty),this.inputFocusedContext=A.InputFocusedContext.bindTo(this.contextKeyService),this.workbenchStateContext=k.WorkbenchStateContext.bindTo(this.contextKeyService),this.updateWorkbenchStateContextKey(),this.workspaceFolderCountContext=k.WorkspaceFolderCountContext.bindTo(this.contextKeyService),this.updateWorkspaceFolderCountContextKey(),this.openFolderWorkspaceSupportContext=k.OpenFolderWorkspaceSupportContext.bindTo(this.contextKeyService),this.openFolderWorkspaceSupportContext.set(r.isNative||typeof this.environmentService.remoteAuthority=="string"),this.emptyWorkspaceSupportContext=k.EmptyWorkspaceSupportContext.bindTo(this.contextKeyService),this.emptyWorkspaceSupportContext.set(r.isNative||typeof this.environmentService.remoteAuthority=="string"),this.enterMultiRootWorkspaceSupportContext=k.EnterMultiRootWorkspaceSupportContext.bindTo(this.contextKeyService),this.enterMultiRootWorkspaceSupportContext.set(r.isNative||typeof this.environmentService.remoteAuthority=="string"),this.splitEditorsVerticallyContext=k.SplitEditorsVertically.bindTo(this.contextKeyService),this.updateSplitEditorsVerticallyContext(),this.isFullscreenContext=k.IsFullscreenContext.bindTo(this.contextKeyService),this.inZenModeContext=k.InEditorZenModeContext.bindTo(this.contextKeyService),this.isCenteredLayoutContext=k.IsCenteredLayoutContext.bindTo(this.contextKeyService),this.editorAreaVisibleContext=k.EditorAreaVisibleContext.bindTo(this.contextKeyService),this.editorTabsVisibleContext=k.EditorTabsVisibleContext.bindTo(this.contextKeyService),this.sideBarVisibleContext=k.SideBarVisibleContext.bindTo(this.contextKeyService),this.panelPositionContext=k.PanelPositionContext.bindTo(this.contextKeyService),this.panelPositionContext.set((0,i.positionToString)(this.layoutService.getPanelPosition())),this.panelVisibleContext=k.PanelVisibleContext.bindTo(this.contextKeyService),this.panelVisibleContext.set(this.layoutService.isVisible("workbench.parts.panel")),this.panelMaximizedContext=k.PanelMaximizedContext.bindTo(this.contextKeyService),this.panelMaximizedContext.set(this.layoutService.isPanelMaximized()),this.panelAlignmentContext=k.PanelAlignmentContext.bindTo(this.contextKeyService),this.panelAlignmentContext.set(this.layoutService.getPanelAlignment()),this.auxiliaryBarVisibleContext=k.AuxiliaryBarVisibleContext.bindTo(this.contextKeyService),this.auxiliaryBarVisibleContext.set(this.layoutService.isVisible("workbench.parts.auxiliarybar")),this.registerListeners()}registerListeners(){this.editorGroupService.whenReady.then(()=>{this.updateEditorAreaContextKeys(),this.updateEditorContextKeys()}),this._register(this.editorService.onDidActiveEditorChange(()=>this.updateEditorContextKeys())),this._register(this.editorService.onDidVisibleEditorsChange(()=>this.updateEditorContextKeys())),this._register(this.editorGroupService.onDidAddGroup(()=>this.updateEditorContextKeys())),this._register(this.editorGroupService.onDidRemoveGroup(()=>this.updateEditorContextKeys())),this._register(this.editorGroupService.onDidChangeGroupIndex(()=>this.updateEditorContextKeys())),this._register(this.editorGroupService.onDidChangeActiveGroup(()=>this.updateEditorGroupContextKeys())),this._register(this.editorGroupService.onDidChangeGroupLocked(()=>this.updateEditorGroupContextKeys())),this._register(this.editorGroupService.onDidChangeEditorPartOptions(()=>this.updateEditorAreaContextKeys())),this._register((0,I.addDisposableListener)(window,I.EventType.FOCUS_IN,()=>this.updateInputContextKeys(),!0)),this._register(this.contextService.onDidChangeWorkbenchState(()=>this.updateWorkbenchStateContextKey())),this._register(this.contextService.onDidChangeWorkspaceFolders(()=>{this.updateWorkspaceFolderCountContextKey(),this.updateVirtualWorkspaceContextKey()})),this._register(this.configurationService.onDidChangeConfiguration(d=>{d.affectsConfiguration("workbench.editor.openSideBySideDirection")&&this.updateSplitEditorsVerticallyContext()})),this._register(this.layoutService.onDidChangeZenMode(d=>this.inZenModeContext.set(d))),this._register(this.layoutService.onDidChangeFullscreen(d=>this.isFullscreenContext.set(d))),this._register(this.layoutService.onDidChangeCenteredLayout(d=>this.isCenteredLayoutContext.set(d))),this._register(this.layoutService.onDidChangePanelPosition(d=>this.panelPositionContext.set(d))),this._register(this.layoutService.onDidChangePanelAlignment(d=>this.panelAlignmentContext.set(d))),this._register(this.paneCompositeService.onDidPaneCompositeClose(()=>this.updateSideBarContextKeys())),this._register(this.paneCompositeService.onDidPaneCompositeOpen(()=>this.updateSideBarContextKeys())),this._register(this.layoutService.onDidChangePartVisibility(()=>{this.editorAreaVisibleContext.set(this.layoutService.isVisible("workbench.parts.editor")),this.panelVisibleContext.set(this.layoutService.isVisible("workbench.parts.panel")),this.panelMaximizedContext.set(this.layoutService.isPanelMaximized()),this.auxiliaryBarVisibleContext.set(this.layoutService.isVisible("workbench.parts.auxiliarybar"))})),this._register(this.workingCopyService.onDidChangeDirty(d=>this.dirtyWorkingCopiesContext.set(d.isDirty()||this.workingCopyService.hasDirty)))}updateEditorAreaContextKeys(){this.editorTabsVisibleContext.set(!!this.editorGroupService.partOptions.showTabs)}updateEditorContextKeys(){const d=this.editorService.activeEditorPane,m=this.editorService.visibleEditorPanes;if(this.textCompareEditorActiveContext.set(d?.getId()===D.TEXT_DIFF_EDITOR_ID),this.textCompareEditorVisibleContext.set(m.some(b=>b.getId()===D.TEXT_DIFF_EDITOR_ID)),this.sideBySideEditorActiveContext.set(d?.getId()===D.SIDE_BY_SIDE_EDITOR_ID),m.length>0?this.editorsVisibleContext.set(!0):this.editorsVisibleContext.reset(),this.editorService.activeEditor?this.activeEditorGroupEmpty.reset():this.activeEditorGroupEmpty.set(!0),this.updateEditorGroupContextKeys(),d){this.activeEditorContext.set(d.getId()),this.activeEditorIsReadonly.set(d.input.hasCapability(2)),this.activeEditorCanRevert.set(!d.input.hasCapability(4)),this.activeEditorCanSplitInGroup.set(d.input.hasCapability(32));const b=d.input.resource,E=b?this.editorResolverService.getEditors(b).map(y=>y.id):[];b?.scheme===a.Schemas.untitled&&d.input.editorId!==D.DEFAULT_EDITOR_ASSOCIATION.id?this.activeEditorAvailableEditorIds.set(""):this.activeEditorAvailableEditorIds.set(E.join(","))}else this.activeEditorContext.reset(),this.activeEditorIsReadonly.reset(),this.activeEditorCanRevert.reset(),this.activeEditorCanSplitInGroup.reset(),this.activeEditorAvailableEditorIds.reset()}updateEditorGroupContextKeys(){const d=this.editorGroupService.count;d>1?this.multipleEditorGroupsContext.set(!0):this.multipleEditorGroupsContext.reset();const m=this.editorGroupService.activeGroup;this.activeEditorGroupIndex.set(m.index+1),this.activeEditorGroupLast.set(m.index===d-1),this.activeEditorGroupLocked.set(m.isLocked)}updateInputContextKeys(){function d(){return!!document.activeElement&&(document.activeElement.tagName==="INPUT"||document.activeElement.tagName==="TEXTAREA")}const m=d();if(this.inputFocusedContext.set(m),m){const b=(0,I.trackFocus)(document.activeElement);t.Event.once(b.onDidBlur)(()=>{this.inputFocusedContext.set(d()),b.dispose()})}}updateWorkbenchStateContextKey(){this.workbenchStateContext.set(this.getWorkbenchStateString())}updateWorkspaceFolderCountContextKey(){this.workspaceFolderCountContext.set(this.contextService.getWorkspace().folders.length)}updateSplitEditorsVerticallyContext(){const d=(0,w.preferredSideBySideGroupDirection)(this.configurationService);this.splitEditorsVerticallyContext.set(d===1)}getWorkbenchStateString(){switch(this.contextService.getWorkbenchState()){case 1:return"empty";case 2:return"folder";case 3:return"workspace"}}updateSideBarContextKeys(){this.sideBarVisibleContext.set(this.layoutService.isVisible("workbench.parts.sidebar"))}updateVirtualWorkspaceContextKey(){this.virtualWorkspaceContext.set((0,s.getVirtualWorkspaceScheme)(this.contextService.getWorkspace())||"")}};h=Ee([W(0,_.IContextKeyService),W(1,c.IWorkspaceContextService),W(2,v.IConfigurationService),W(3,C.IWorkbenchEnvironmentService),W(4,o.IEditorService),W(5,p.IEditorResolverService),W(6,w.IEditorGroupsService),W(7,i.IWorkbenchLayoutService),W(8,u.IPaneCompositePartService),W(9,l.IWorkingCopyService)],h),e.WorkbenchContextKeysHandler=h}),define(ne[149],re([1,0,1380,44,17,15,2,11,21,56,135,18]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeEditorAriaLabel=e.whenEditorClosed=e.EditorPaneRegistry=e.EditorPaneDescriptor=void 0;class o{constructor(l,r,p){this.ctor=l,this.typeId=r,this.name=p}static create(l,r,p){return new o(l,r,p)}instantiate(l){return l.createInstance(this.ctor)}describes(l){return l.getId()===this.typeId}}e.EditorPaneDescriptor=o;class c{constructor(){this.editorPanes=[],this.mapEditorPanesToEditors=new Map}registerEditorPane(l,r){this.mapEditorPanesToEditors.set(l,r);const p=(0,A.insert)(this.editorPanes,l);return(0,k.toDisposable)(()=>{this.mapEditorPanesToEditors.delete(l),p()})}getEditorPane(l){const r=this.findEditorPaneDescriptors(l);if(r.length!==0)return r.length===1?r[0]:l.prefersEditorPane(r)}findEditorPaneDescriptors(l,r){const p=[];for(const u of this.editorPanes){const a=this.mapEditorPanesToEditors.get(u)||[];for(const n of a){const h=n.ctor;if(!r&&l.constructor===h){p.push(u);break}else if(r&&l instanceof h){p.push(u);break}}}return!r&&p.length===0?this.findEditorPaneDescriptors(l,!0):p}getEditorPaneByType(l){return this.editorPanes.find(r=>r.typeId===l)}getEditorPanes(){return this.editorPanes.slice(0)}getEditors(){const l=[];for(const r of this.editorPanes){const p=this.mapEditorPanesToEditors.get(r);p&&l.push(...p.map(u=>u.ctor))}return l}}e.EditorPaneRegistry=c,_.Registry.add(f.EditorExtensions.EditorPane,new c);function i(s,l){const r=s.get(I.IEditorService),p=s.get(w.IUriIdentityService),u=s.get(v.IWorkingCopyService);return new Promise(a=>{let n=[...l];const h=r.onDidCloseEditor(async g=>{if(g.context===f.EditorCloseContext.MOVE)return;let d=f.EditorResourceAccessor.getOriginalUri(g.editor,{supportSideBySide:f.SideBySideEditor.PRIMARY}),m=f.EditorResourceAccessor.getOriginalUri(g.editor,{supportSideBySide:f.SideBySideEditor.SECONDARY});if(g.context===f.EditorCloseContext.REPLACE){const b=f.EditorResourceAccessor.getOriginalUri(r.activeEditor,{supportSideBySide:f.SideBySideEditor.PRIMARY}),E=f.EditorResourceAccessor.getOriginalUri(r.activeEditor,{supportSideBySide:f.SideBySideEditor.SECONDARY});p.extUri.isEqual(d,b)&&(d=void 0),p.extUri.isEqual(m,E)&&(m=void 0)}if(n=n.filter(b=>!(p.extUri.isEqual(b,d)||p.extUri.isEqual(b,m)||g.context!==f.EditorCloseContext.REPLACE&&(d?.scheme===C.Schemas.untitled&&p.extUri.isEqual(b,d.with({scheme:b.scheme}))||m?.scheme===C.Schemas.untitled&&p.extUri.isEqual(b,m.with({scheme:b.scheme}))))),n.length===0){const b=l.filter(E=>u.isDirty(E));return b.length>0&&await D.Promises.settled(b.map(async E=>await new Promise(y=>{if(!u.isDirty(E))return y();const T=u.onDidChangeDirty(R=>{if(!R.isDirty()&&p.extUri.isEqual(E,R.resource))return T.dispose(),y()})}))),h.dispose(),a()}})})}e.whenEditorClosed=i;function S(s,l,r,p){let u=s.getAriaLabel();return r&&!r.isPinned(s)&&(u=(0,t.localize)(0,null,u)),r?.isSticky(l??s)&&(u=(0,t.localize)(1,null,u)),r&&p>1&&(u=`${u}, ${r.ariaLabel}`),u}e.computeEditorAriaLabel=S}),define(ne[2686],re([1,0,2,154,69,21,59,13,135,31]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorAutoSave=void 0;let v=class extends t.Disposable{constructor(o,c,i,S,s,l){super();this.filesConfigurationService=o,this.hostService=c,this.editorService=i,this.editorGroupService=S,this.workingCopyService=s,this.logService=l,this.pendingAutoSavesAfterDelay=new Map,this.lastActiveEditor=void 0,this.lastActiveGroupId=void 0,this.lastActiveEditorControlDisposable=this._register(new t.DisposableStore),this.onAutoSaveConfigurationChange(o.getAutoSaveConfiguration(),!1);for(const r of this.workingCopyService.dirtyWorkingCopies)this.onDidRegister(r);this.registerListeners()}registerListeners(){this._register(this.hostService.onDidChangeFocus(o=>this.onWindowFocusChange(o))),this._register(this.editorService.onDidActiveEditorChange(()=>this.onDidActiveEditorChange())),this._register(this.filesConfigurationService.onAutoSaveConfigurationChange(o=>this.onAutoSaveConfigurationChange(o,!0))),this._register(this.workingCopyService.onDidRegister(o=>this.onDidRegister(o))),this._register(this.workingCopyService.onDidUnregister(o=>this.onDidUnregister(o))),this._register(this.workingCopyService.onDidChangeDirty(o=>this.onDidChangeDirty(o))),this._register(this.workingCopyService.onDidChangeContent(o=>this.onDidChangeContent(o)))}onWindowFocusChange(o){o||this.maybeTriggerAutoSave(4)}onDidActiveEditorChange(){this.lastActiveEditor&&typeof this.lastActiveGroupId=="number"&&this.maybeTriggerAutoSave(3,{groupId:this.lastActiveGroupId,editor:this.lastActiveEditor});const o=this.editorGroupService.activeGroup,c=this.lastActiveEditor=(0,D.withNullAsUndefined)(o.activeEditor);this.lastActiveGroupId=o.id,this.lastActiveEditorControlDisposable.clear();const i=this.editorService.activeEditorPane;c&&i&&this.lastActiveEditorControlDisposable.add(i.onDidBlur(()=>{this.maybeTriggerAutoSave(3,{groupId:o.id,editor:c})}))}maybeTriggerAutoSave(o,c){if(c?.editor.hasCapability(2)||c?.editor.hasCapability(4))return;const i=this.filesConfigurationService.getAutoSaveMode();(o===4&&(i===3||i===4)||o===3&&i===3)&&(this.logService.trace(`[editor auto save] triggering auto save with reason ${o}`),c?this.editorService.save(c,{reason:o}):this.saveAllDirty({reason:o}))}onAutoSaveConfigurationChange(o,c){if(this.autoSaveAfterDelay=typeof o.autoSaveDelay=="number"&&o.autoSaveDelay>=0?o.autoSaveDelay:void 0,c){let i;switch(this.filesConfigurationService.getAutoSaveMode()){case 3:i=3;break;case 4:i=4;break;case 1:case 2:i=2;break}i&&this.saveAllDirty({reason:i})}}saveAllDirty(o){for(const c of this.workingCopyService.dirtyWorkingCopies)c.capabilities&2||c.save(o)}onDidRegister(o){o.isDirty()&&this.scheduleAutoSave(o)}onDidUnregister(o){this.discardAutoSave(o)}onDidChangeDirty(o){o.isDirty()?this.scheduleAutoSave(o):this.discardAutoSave(o)}onDidChangeContent(o){o.isDirty()&&this.scheduleAutoSave(o)}scheduleAutoSave(o){if(typeof this.autoSaveAfterDelay!="number"||o.capabilities&2)return;this.discardAutoSave(o),this.logService.trace(`[editor auto save] scheduling auto save after ${this.autoSaveAfterDelay}ms`,o.resource.toString(),o.typeId);const c=setTimeout(()=>{this.pendingAutoSavesAfterDelay.delete(o),o.isDirty()&&(this.logService.trace("[editor auto save] running auto save",o.resource.toString(),o.typeId),o.save({reason:2}))},this.autoSaveAfterDelay);this.pendingAutoSavesAfterDelay.set(o,(0,t.toDisposable)(()=>{this.logService.trace("[editor auto save] clearing pending auto save",o.resource.toString(),o.typeId),clearTimeout(c)}))}discardAutoSave(o){(0,t.dispose)(this.pendingAutoSavesAfterDelay.get(o)),this.pendingAutoSavesAfterDelay.delete(o)}};v=Ee([W(0,f.IFilesConfigurationService),W(1,_.IHostService),W(2,A.IEditorService),W(3,k.IEditorGroupsService),W(4,I.IWorkingCopyService),W(5,w.ILogService)],v),e.EditorAutoSave=v}),define(ne[2687],re([1,0,1400,166,27,139,12,10,2,24,13,28,34,132,149,5,237,1056]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnavailableResourceErrorEditor=e.UnknownErrorEditor=e.WorkspaceTrustRequiredEditor=void 0;let l=class extends f.EditorPane{constructor(h,g,d,m,b){super(h,d,m,b);this.title=g,this.inputDisposable=this._register(new I.MutableDisposable)}getTitle(){return this.title}createEditor(h){this.container=document.createElement("div"),this.container.className="monaco-editor-pane-placeholder",this.container.style.outline="none",this.container.tabIndex=0,this.scrollbar=this._register(new A.DomScrollableElement(this.container,{horizontal:1,vertical:1})),h.appendChild(this.scrollbar.getDomNode())}async setInput(h,g,d,m){await super.setInput(h,g,d,m),!m.isCancellationRequested&&(this.inputDisposable.value=this.renderInput())}renderInput(){const[h,g]=(0,v.assertAllDefined)(this.container,this.scrollbar);(0,D.clearNode)(h);const d=new I.DisposableStore;return this.renderBody(h,d),g.scanDomNode(),d}clearInput(){this.container&&(0,D.clearNode)(this.container),this.inputDisposable.clear(),super.clearInput()}layout(h){const[g,d]=(0,v.assertAllDefined)(this.container,this.scrollbar);(0,D.size)(g,h.width,h.height),d.scanDomNode()}focus(){(0,v.assertIsDefined)(this.container).focus()}dispose(){this.container?.remove(),super.dispose()}};l=Ee([W(2,_.ITelemetryService),W(3,k.IThemeService),W(4,w.IStorageService)],l);let r=class rs extends l{constructor(h,g,d,m,b,E){super(rs.ID,rs.LABEL,h,g,b);this.commandService=d,this.workspaceService=m,this.instantiationService=E}renderBody(h,g){const d=h.appendChild(document.createElement("p"));d.textContent=(0,o.isSingleFolderWorkspaceIdentifier)((0,o.toWorkspaceIdentifier)(this.workspaceService.getWorkspace()))?(0,t.localize)(1,null):(0,t.localize)(2,null),g.add(this.instantiationService.createInstance(s.Link,d,{label:(0,t.localize)(3,null),href:""},{opener:()=>this.commandService.executeCommand("workbench.trust.manage")}))}};r.ID="workbench.editors.workspaceTrustRequiredEditor",r.LABEL=(0,t.localize)(0,null),r.DESCRIPTOR=i.EditorPaneDescriptor.create(r,r.ID,r.LABEL),r=Ee([W(0,_.ITelemetryService),W(1,k.IThemeService),W(2,C.ICommandService),W(3,o.IWorkspaceContextService),W(4,w.IStorageService),W(5,S.IInstantiationService)],r),e.WorkspaceTrustRequiredEditor=r;let p=class extends l{constructor(h,g,d,m,b,E){super(h,g,d,m,b);this.instantiationService=E}renderBody(h,g){const d=h.appendChild(document.createElement("p"));d.textContent=this.getErrorMessage();const m=this.group,b=this.input;m&&b&&g.add(this.instantiationService.createInstance(s.Link,d,{label:(0,t.localize)(4,null),href:""},{opener:()=>m.openEditor(b,{...this.options,source:c.EditorOpenSource.USER})}))}};p=Ee([W(2,_.ITelemetryService),W(3,k.IThemeService),W(4,w.IStorageService),W(5,S.IInstantiationService)],p);let u=class ss extends p{constructor(h,g,d,m){super(ss.ID,ss.LABEL,h,g,d,m)}getErrorMessage(){return(0,t.localize)(6,null)}};u.ID="workbench.editors.unknownErrorEditor",u.LABEL=(0,t.localize)(5,null),u.DESCRIPTOR=i.EditorPaneDescriptor.create(u,u.ID,u.LABEL),u=Ee([W(0,_.ITelemetryService),W(1,k.IThemeService),W(2,w.IStorageService),W(3,S.IInstantiationService)],u),e.UnknownErrorEditor=u;let a=class os extends p{constructor(h,g,d,m){super(os.ID,os.LABEL,h,g,d,m)}getErrorMessage(){return(0,t.localize)(8,null)}};a.ID="workbench.editors.unavailableResourceErrorEditor",a.LABEL=(0,t.localize)(7,null),a.DESCRIPTOR=i.EditorPaneDescriptor.create(a,a.ID,a.LABEL),a=Ee([W(0,_.ITelemetryService),W(1,k.IThemeService),W(2,w.IStorageService),W(3,S.IInstantiationService)],a),e.UnavailableResourceErrorEditor=a}),define(ne[2688],re([1,0,2,44,10,17,80,5,67,316,6,13,114,2687]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorPanes=void 0;let i=class extends t.Disposable{constructor(s,l,r,p,u,a){super();this.parent=s,this.groupView=l,this.layoutService=r,this.instantiationService=p,this.editorProgressService=u,this.workspaceTrustService=a,this._onDidFocus=this._register(new v.Emitter),this.onDidFocus=this._onDidFocus.event,this._onDidChangeSizeConstraints=this._register(new v.Emitter),this.onDidChangeSizeConstraints=this._onDidChangeSizeConstraints.event,this._activeEditorPane=null,this.editorPanes=[],this.activeEditorPaneDisposables=this._register(new t.DisposableStore),this.editorOperation=this._register(new I.LongRunningOperation(this.editorProgressService)),this.editorPanesRegistry=A.Registry.as(f.EditorExtensions.EditorPane),this.registerListeners()}get minimumWidth(){return this._activeEditorPane?.minimumWidth??w.DEFAULT_EDITOR_MIN_DIMENSIONS.width}get minimumHeight(){return this._activeEditorPane?.minimumHeight??w.DEFAULT_EDITOR_MIN_DIMENSIONS.height}get maximumWidth(){return this._activeEditorPane?.maximumWidth??w.DEFAULT_EDITOR_MAX_DIMENSIONS.width}get maximumHeight(){return this._activeEditorPane?.maximumHeight??w.DEFAULT_EDITOR_MAX_DIMENSIONS.height}get activeEditorPane(){return this._activeEditorPane}registerListeners(){this._register(this.workspaceTrustService.onDidChangeTrust(()=>this.onDidChangeWorkspaceTrust()))}onDidChangeWorkspaceTrust(){const s=this._activeEditorPane?.input,l=this._activeEditorPane?.options;s?.hasCapability(16)&&this.groupView.openEditor(s,l)}async openEditor(s,l,r=Object.create(null)){try{return await this.doOpenEditor(this.getEditorPaneDescriptor(s),s,l,r)}catch(p){if(!r.newInGroup){const a=p.fileOperationResult===1?c.UnavailableResourceErrorEditor.DESCRIPTOR:c.UnknownErrorEditor.DESCRIPTOR;return{...await this.doOpenEditor(a,s,l,r),error:p}}return{error:p}}}async doOpenEditor(s,l,r,p=Object.create(null)){const u=this.doShowEditorPane(s),{changed:a,cancelled:n}=await this.doSetInput(u,l,r,p);return n||(!r||!r.preserveFocus)&&u.focus(),{pane:u,changed:a,cancelled:n}}getEditorPaneDescriptor(s){return s.hasCapability(16)&&!this.workspaceTrustService.isWorkspaceTrusted()?c.WorkspaceTrustRequiredEditor.DESCRIPTOR:(0,C.assertIsDefined)(this.editorPanesRegistry.getEditorPane(s))}doShowEditorPane(s){if(this._activeEditorPane&&s.describes(this._activeEditorPane))return this._activeEditorPane;this.doHideActiveEditorPane();const l=this.doCreateEditorPane(s);this.doSetActiveEditorPane(l);const r=(0,C.assertIsDefined)(l.getContainer());return this.parent.appendChild(r),(0,_.show)(r),l.setVisible(!0,this.groupView),this.dimension&&l.layout(this.dimension),l}doCreateEditorPane(s){const l=this.doInstantiateEditorPane(s);if(!l.getContainer()){const r=document.createElement("div");r.classList.add("editor-instance"),l.create(r)}return l}doInstantiateEditorPane(s){const l=this.editorPanes.find(p=>s.describes(p));if(l)return l;const r=this._register(s.instantiate(this.instantiationService));return this.editorPanes.push(r),r}doSetActiveEditorPane(s){this._activeEditorPane=s,this.activeEditorPaneDisposables.clear(),s&&(this.activeEditorPaneDisposables.add(s.onDidChangeSizeConstraints(l=>this._onDidChangeSizeConstraints.fire(l))),this.activeEditorPaneDisposables.add(s.onDidFocus(()=>this._onDidFocus.fire()))),this._onDidChangeSizeConstraints.fire(void 0)}async doSetInput(s,l,r,p){const u=s.input?.matches(l);if(u&&!r?.forceReload)return s.setOptions(r),{changed:!1,cancelled:!1};const a=this.editorOperation.start(this.layoutService.isRestored()?800:3200);let n=!1;try{s.clearInput(),await s.setInput(l,r,p,a.token),a.isCurrent()||(n=!0)}finally{a.stop()}return{changed:!u,cancelled:n}}doHideActiveEditorPane(){if(!this._activeEditorPane)return;this.editorOperation.stop(),this._activeEditorPane.clearInput(),this._activeEditorPane.setVisible(!1,this.groupView);const s=this._activeEditorPane.getContainer();s&&(this.parent.removeChild(s),(0,_.hide)(s)),this.doSetActiveEditorPane(null)}closeEditor(s){this._activeEditorPane?.input&&s.matches(this._activeEditorPane.input)&&this.doHideActiveEditorPane()}setVisible(s){this._activeEditorPane?.setVisible(s,this.groupView)}layout(s){this.dimension=s,this._activeEditorPane?.layout(s)}};i=Ee([W(2,k.IWorkbenchLayoutService),W(3,D.IInstantiationService),W(4,I.IEditorProgressService),W(5,o.IWorkspaceTrustManagementService)],i),e.EditorPanes=i}),define(ne[436],re([1,0,1406,51,6,13,165,409,149,842,24,5,27,12,113,106,59,21,7,19]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextEditorPaneSelection=e.BaseTextEditor=void 0;let u=class Ha extends w.AbstractEditorWithViewState{constructor(h,g,d,m,b,E,y,T){super(h,Ha.VIEW_STATE_PREFERENCE_KEY,g,d,m,b,E,y,T);this._onDidChangeSelection=this._register(new _.Emitter),this.onDidChangeSelection=this._onDidChangeSelection.event,this._register(this.textResourceConfigurationService.onDidChangeConfiguration(()=>{const R=this.getActiveResource(),O=R?this.textResourceConfigurationService.getValue(R):void 0;return this.handleConfigurationChangeEvent(O)})),this._register(_.Event.any(this.editorGroupService.onDidAddGroup,this.editorGroupService.onDidRemoveGroup)(()=>{const R=this.computeAriaLabel();this.editorContainer?.setAttribute("aria-label",R),this.editorControl?.updateOptions({ariaLabel:R})}))}get scopedContextKeyService(){return(0,S.isCodeEditor)(this.editorControl)?this.editorControl.invokeWithinContext(h=>h.get(r.IContextKeyService)):void 0}handleConfigurationChangeEvent(h){this.isVisible()?this.updateEditorConfiguration(h):this.hasPendingConfigurationChange=!0}consumePendingConfigurationChangeEvent(){this.hasPendingConfigurationChange&&(this.updateEditorConfiguration(),this.hasPendingConfigurationChange=!1)}computeConfiguration(h){const g=(0,A.isObject)(h.editor)?(0,f.deepClone)(h.editor):Object.create(null);return Object.assign(g,this.getConfigurationOverrides()),g.ariaLabel=this.computeAriaLabel(),g}computeAriaLabel(){return this._input?(0,I.computeEditorAriaLabel)(this._input,void 0,this.group,this.editorGroupService.count):(0,t.localize)(0,null)}getConfigurationOverrides(){return{overviewRulerLanes:3,lineNumbersMinChars:3,fixedOverflowWidgets:!0,readOnly:this.input?.hasCapability(2),renderValidationDecorations:"on"}}createEditor(h){this.editorContainer=h,this.editorControl=this._register(this.createEditorControl(h,this.computeConfiguration(this.textResourceConfigurationService.getValue(this.getActiveResource())))),this.registerCodeEditorListeners()}registerCodeEditorListeners(){const h=(0,S.getCodeEditor)(this.editorControl);h&&(this._register(h.onDidChangeModelLanguage(()=>this.updateEditorConfiguration())),this._register(h.onDidChangeModel(()=>this.updateEditorConfiguration())),this._register(h.onDidChangeCursorPosition(g=>this._onDidChangeSelection.fire({reason:this.toEditorPaneSelectionChangeReason(g)}))),this._register(h.onDidChangeModelContent(()=>this._onDidChangeSelection.fire({reason:3}))))}toEditorPaneSelectionChangeReason(h){switch(h.source){case"api":return 1;case"code.navigation":return 4;case"code.jump":return 5;default:return 2}}getSelection(){const h=(0,S.getCodeEditor)(this.editorControl);if(h){const g=h.getSelection();if(g)return new a(g)}}createEditorControl(h,g){return this.instantiationService.createInstance(k.CodeEditorWidget,h,{enableDropIntoEditor:!0,...g},{})}async setInput(h,g,d,m){await super.setInput(h,g,d,m),this.updateEditorConfiguration(),(0,A.assertIsDefined)(this.editorContainer).setAttribute("aria-label",this.computeAriaLabel())}setOptions(h){super.setOptions(h),h&&(0,D.applyTextEditorOptions)(h,(0,A.assertIsDefined)(this.getControl()),0)}setEditorVisible(h,g){const d=(0,A.assertIsDefined)(this.editorControl);h?(this.consumePendingConfigurationChangeEvent(),d.onVisible()):d.onHide(),super.setEditorVisible(h,g)}focus(){(0,A.assertIsDefined)(this.editorControl).focus()}hasFocus(){return this.editorControl?.hasTextFocus()?!0:super.hasFocus()}layout(h){(0,A.assertIsDefined)(this.editorControl).layout(h)}getControl(){return this.editorControl}toEditorViewStateResource(h){return h.resource}computeEditorViewState(h){const g=this.getControl();if(!(0,S.isCodeEditor)(g))return;const d=g.getModel();if(!d)return;const m=d.uri;if(!!m&&!!(0,p.isEqual)(m,h))return(0,A.withNullAsUndefined)(g.saveViewState())}updateEditorConfiguration(h){if(!h){const m=this.getActiveResource();m&&(h=this.textResourceConfigurationService.getValue(m))}if(!this.editorControl||!h)return;const g=this.computeConfiguration(h);let d=g;this.lastAppliedEditorOptions&&(d=(0,f.distinct)(this.lastAppliedEditorOptions,d)),Object.keys(d).length>0&&(this.lastAppliedEditorOptions=g,this.editorControl.updateOptions(d))}getActiveResource(){const h=(0,S.getCodeEditor)(this.editorControl);if(h){const g=h.getModel();if(g)return g.uri}if(this.input)return this.input.resource}dispose(){this.lastAppliedEditorOptions=void 0,super.dispose()}};u.VIEW_STATE_PREFERENCE_KEY="textEditorViewState",u=Ee([W(1,o.ITelemetryService),W(2,C.IInstantiationService),W(3,v.IStorageService),W(4,i.ITextResourceConfigurationService),W(5,c.IThemeService),W(6,l.IEditorService),W(7,s.IEditorGroupsService)],u),e.BaseTextEditor=u;class a{constructor(h){this.textSelection=h}compare(h){if(!(h instanceof a))return 3;const g=Math.min(this.textSelection.selectionStartLineNumber,this.textSelection.positionLineNumber),d=Math.min(h.textSelection.selectionStartLineNumber,h.textSelection.positionLineNumber);return g===d?1:Math.abs(g-d)<a.TEXT_EDITOR_SELECTION_THRESHOLD?2:3}restore(h){return{...h,selection:this.textSelection,selectionRevealType:1}}log(){return`line: ${this.textSelection.startLineNumber}-${this.textSelection.endLineNumber}, col: ${this.textSelection.startColumn}-${this.textSelection.endColumn}`}}e.TextEditorPaneSelection=a,a.TEXT_EDITOR_SELECTION_THRESHOLD=10}),define(ne[927],re([1,0,1405,51,13,106,436,44,409,203,684,351,780,27,24,113,5,12,2,17,9,59,21,132,7,19,10,23]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextDiffEditor=void 0;let E=class Ka extends k.BaseTextEditor{constructor(T,R,O,x,F,L,M,N){super(Ka.ID,T,R,O,x,L,F,M);this.fileService=N,this.diffNavigatorDisposables=this._register(new r.DisposableStore),this.inputListener=this._register(new r.MutableDisposable),this._register(this.fileService.onDidChangeFileSystemProviderCapabilities(B=>this.onDidChangeFileSystemProvider(B.scheme))),this._register(this.fileService.onDidChangeFileSystemProviderRegistrations(B=>this.onDidChangeFileSystemProvider(B.scheme)))}get scopedContextKeyService(){const T=this.getControl();if(!T)return;const R=T.getOriginalEditor(),O=T.getModifiedEditor();return(R.hasTextFocus()?R:O).invokeWithinContext(x=>x.get(g.IContextKeyService))}onDidChangeFileSystemProvider(T){this.input instanceof w.DiffEditorInput&&(this.input.original.resource?.scheme===T||this.input.modified.resource?.scheme===T)&&this.updateReadonly(this.input)}onDidChangeInputCapabilities(T){this.input===T&&this.updateReadonly(T)}updateReadonly(T){const R=this.getControl();R&&R.updateOptions({readOnly:T.modified.hasCapability(2),originalEditable:!T.original.hasCapability(2)})}getTitle(){return this.input?this.input.getName():(0,t.localize)(0,null)}createEditorControl(T,R){return this.instantiationService.createInstance(C.DiffEditorWidget,T,R,{})}async setInput(T,R,O,x){this.inputListener.value=T.onDidChangeCapabilities(()=>this.onDidChangeInputCapabilities(T)),this.diffNavigatorDisposables.clear(),await super.setInput(T,R,O,x);try{const F=await T.resolve();if(x.isCancellationRequested)return;if(!(F instanceof o.TextDiffEditorModel)){this.openAsBinary(T,R);return}const L=(0,_.assertIsDefined)(this.getControl()),M=F;L.setModel((0,_.withUndefinedAsNull)(M.textDiffEditorModel));let N=!1;(0,D.isTextEditorViewState)(R?.viewState)||(N=this.restoreTextDiffEditorViewState(T,R,O,L));let B=!1;R&&(B=(0,I.applyTextEditorOptions)(R,L,1)),this.diffNavigator=new v.DiffNavigator(L,{alwaysRevealFirst:!B&&!N}),this.diffNavigatorDisposables.add(this.diffNavigator),L.updateOptions({readOnly:M.modifiedModel?.isReadonly(),originalEditable:!M.originalModel?.isReadonly()})}catch(F){if(this.isFileBinaryError(F)){this.openAsBinary(T,R);return}throw F}}restoreTextDiffEditorViewState(T,R,O,x){const F=this.loadEditorViewState(T,O);return F?(R?.selection&&F.modified&&(F.modified.cursorState=[]),x.restoreViewState(F),!0):!1}openAsBinary(T,R){const O=T.original,x=T.modified,F=this.instantiationService.createInstance(w.DiffEditorInput,T.getName(),T.getDescription(),O,x,!0),L=p.Registry.as(D.EditorExtensions.EditorFactory).getFileEditorFactory();L.isFileEditor(O)&&O.setForceOpenAsBinary(),L.isFileEditor(x)&&x.setForceOpenAsBinary(),(this.group??this.editorGroupService.activeGroup).replaceEditors([{editor:T,replacement:F,options:{...R,activation:h.EditorActivation.PRESERVE,pinned:this.group?.isPinned(T),sticky:this.group?.isSticky(T)}}])}computeConfiguration(T){const R=super.computeConfiguration(T);if((0,_.isObject)(T.diffEditor)){const O=(0,f.deepClone)(T.diffEditor);O.diffCodeLens=O.codeLens,delete O.codeLens,O.diffWordWrap=O.wordWrap,delete O.wordWrap,Object.assign(R,O)}return R}getConfigurationOverrides(){const T=super.getConfigurationOverrides();return T.readOnly=this.input instanceof w.DiffEditorInput&&this.input.modified.hasCapability(2),T.originalEditable=this.input instanceof w.DiffEditorInput&&!this.input.original.hasCapability(2),T.lineDecorationsWidth="2ch",T}isFileBinaryError(T){return(0,_.isArray)(T)?T.some(O=>this.isFileBinaryError(O)):T.textFileOperationResult===0}clearInput(){super.clearInput(),this.inputListener.clear(),this.diffNavigatorDisposables.clear(),this.getControl()?.setModel(null)}getDiffNavigator(){return this.diffNavigator}getControl(){return super.getControl()}tracksEditorViewState(T){return T instanceof w.DiffEditorInput}computeEditorViewState(T){const R=this.getControl();if(!(0,A.isDiffEditor)(R))return;const O=R.getModel();if(!O||!O.modified||!O.original)return;const x=this.toEditorViewStateResource(O);if(!!x&&!!(0,d.isEqual)(x,T))return(0,_.withNullAsUndefined)(R.saveViewState())}toEditorViewStateResource(T){let R,O;if(T instanceof w.DiffEditorInput?(R=T.original.resource,O=T.modified.resource):(0,D.isEditorInput)(T)||(R=T.original.uri,O=T.modified.uri),!(!R||!O))return u.URI.from({scheme:"diff",path:`${(0,m.multibyteAwareBtoa)(R.toString())}${(0,m.multibyteAwareBtoa)(O.toString())}`})}};E.ID=D.TEXT_DIFF_EDITOR_ID,E=Ee([W(0,c.ITelemetryService),W(1,s.IInstantiationService),W(2,i.IStorageService),W(3,S.ITextResourceConfigurationService),W(4,n.IEditorService),W(5,l.IThemeService),W(6,a.IEditorGroupsService),W(7,b.IFileService)],E),e.TextDiffEditor=E}),define(ne[204],re([1,0,1397,13,5,94,44,74,253,21,58,927,97,9,53,71,208,15,59,7,8,28,16,70,604,41,132,18,167,605,159,101,27,19]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setup=e.getMultiSelectedEditorContexts=e.splitEditor=e.API_OPEN_WITH_EDITOR_COMMAND_ID=e.API_OPEN_DIFF_EDITOR_COMMAND_ID=e.API_OPEN_EDITOR_COMMAND_ID=e.OPEN_EDITOR_AT_INDEX_COMMAND_ID=e.FOCUS_BELOW_GROUP_WITHOUT_WRAP_COMMAND_ID=e.FOCUS_ABOVE_GROUP_WITHOUT_WRAP_COMMAND_ID=e.FOCUS_RIGHT_GROUP_WITHOUT_WRAP_COMMAND_ID=e.FOCUS_LEFT_GROUP_WITHOUT_WRAP_COMMAND_ID=e.FOCUS_OTHER_SIDE_EDITOR=e.FOCUS_SECOND_SIDE_EDITOR=e.FOCUS_FIRST_SIDE_EDITOR=e.TOGGLE_SPLIT_EDITOR_IN_GROUP_LAYOUT=e.JOIN_EDITOR_IN_GROUP=e.TOGGLE_SPLIT_EDITOR_IN_GROUP=e.SPLIT_EDITOR_IN_GROUP=e.SPLIT_EDITOR_RIGHT=e.SPLIT_EDITOR_LEFT=e.SPLIT_EDITOR_DOWN=e.SPLIT_EDITOR_UP=e.TOGGLE_DIFF_IGNORE_TRIM_WHITESPACE=e.DIFF_FOCUS_OTHER_SIDE=e.DIFF_FOCUS_SECONDARY_SIDE=e.DIFF_FOCUS_PRIMARY_SIDE=e.GOTO_PREVIOUS_CHANGE=e.GOTO_NEXT_CHANGE=e.TOGGLE_DIFF_SIDE_BY_SIDE=e.UNPIN_EDITOR_COMMAND_ID=e.PIN_EDITOR_COMMAND_ID=e.REOPEN_WITH_COMMAND_ID=e.SHOW_EDITORS_IN_GROUP=e.UNLOCK_GROUP_COMMAND_ID=e.LOCK_GROUP_COMMAND_ID=e.TOGGLE_LOCK_GROUP_COMMAND_ID=e.TOGGLE_KEEP_EDITORS_COMMAND_ID=e.KEEP_EDITOR_COMMAND_ID=e.LAYOUT_EDITOR_GROUPS_COMMAND_ID=e.COPY_ACTIVE_EDITOR_COMMAND_ID=e.MOVE_ACTIVE_EDITOR_COMMAND_ID=e.CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID=e.CLOSE_EDITOR_GROUP_COMMAND_ID=e.CLOSE_PINNED_EDITOR_COMMAND_ID=e.CLOSE_EDITOR_COMMAND_ID=e.CLOSE_EDITORS_TO_THE_RIGHT_COMMAND_ID=e.CLOSE_EDITORS_AND_GROUP_COMMAND_ID=e.CLOSE_EDITORS_IN_GROUP_COMMAND_ID=e.CLOSE_SAVED_EDITORS_COMMAND_ID=void 0,e.CLOSE_SAVED_EDITORS_COMMAND_ID="workbench.action.closeUnmodifiedEditors",e.CLOSE_EDITORS_IN_GROUP_COMMAND_ID="workbench.action.closeEditorsInGroup",e.CLOSE_EDITORS_AND_GROUP_COMMAND_ID="workbench.action.closeEditorsAndGroup",e.CLOSE_EDITORS_TO_THE_RIGHT_COMMAND_ID="workbench.action.closeEditorsToTheRight",e.CLOSE_EDITOR_COMMAND_ID="workbench.action.closeActiveEditor",e.CLOSE_PINNED_EDITOR_COMMAND_ID="workbench.action.closeActivePinnedEditor",e.CLOSE_EDITOR_GROUP_COMMAND_ID="workbench.action.closeGroup",e.CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID="workbench.action.closeOtherEditors",e.MOVE_ACTIVE_EDITOR_COMMAND_ID="moveActiveEditor",e.COPY_ACTIVE_EDITOR_COMMAND_ID="copyActiveEditor",e.LAYOUT_EDITOR_GROUPS_COMMAND_ID="layoutEditorGroups",e.KEEP_EDITOR_COMMAND_ID="workbench.action.keepEditor",e.TOGGLE_KEEP_EDITORS_COMMAND_ID="workbench.action.toggleKeepEditors",e.TOGGLE_LOCK_GROUP_COMMAND_ID="workbench.action.toggleEditorGroupLock",e.LOCK_GROUP_COMMAND_ID="workbench.action.lockEditorGroup",e.UNLOCK_GROUP_COMMAND_ID="workbench.action.unlockEditorGroup",e.SHOW_EDITORS_IN_GROUP="workbench.action.showEditorsInGroup",e.REOPEN_WITH_COMMAND_ID="workbench.action.reopenWithEditor",e.PIN_EDITOR_COMMAND_ID="workbench.action.pinEditor",e.UNPIN_EDITOR_COMMAND_ID="workbench.action.unpinEditor",e.TOGGLE_DIFF_SIDE_BY_SIDE="toggle.diff.renderSideBySide",e.GOTO_NEXT_CHANGE="workbench.action.compareEditor.nextChange",e.GOTO_PREVIOUS_CHANGE="workbench.action.compareEditor.previousChange",e.DIFF_FOCUS_PRIMARY_SIDE="workbench.action.compareEditor.focusPrimarySide",e.DIFF_FOCUS_SECONDARY_SIDE="workbench.action.compareEditor.focusSecondarySide",e.DIFF_FOCUS_OTHER_SIDE="workbench.action.compareEditor.focusOtherSide",e.TOGGLE_DIFF_IGNORE_TRIM_WHITESPACE="toggle.diff.ignoreTrimWhitespace",e.SPLIT_EDITOR_UP="workbench.action.splitEditorUp",e.SPLIT_EDITOR_DOWN="workbench.action.splitEditorDown",e.SPLIT_EDITOR_LEFT="workbench.action.splitEditorLeft",e.SPLIT_EDITOR_RIGHT="workbench.action.splitEditorRight",e.SPLIT_EDITOR_IN_GROUP="workbench.action.splitEditorInGroup",e.TOGGLE_SPLIT_EDITOR_IN_GROUP="workbench.action.toggleSplitEditorInGroup",e.JOIN_EDITOR_IN_GROUP="workbench.action.joinEditorInGroup",e.TOGGLE_SPLIT_EDITOR_IN_GROUP_LAYOUT="workbench.action.toggleSplitEditorInGroupLayout",e.FOCUS_FIRST_SIDE_EDITOR="workbench.action.focusFirstSideEditor",e.FOCUS_SECOND_SIDE_EDITOR="workbench.action.focusSecondSideEditor",e.FOCUS_OTHER_SIDE_EDITOR="workbench.action.focusOtherSideEditor",e.FOCUS_LEFT_GROUP_WITHOUT_WRAP_COMMAND_ID="workbench.action.focusLeftGroupWithoutWrap",e.FOCUS_RIGHT_GROUP_WITHOUT_WRAP_COMMAND_ID="workbench.action.focusRightGroupWithoutWrap",e.FOCUS_ABOVE_GROUP_WITHOUT_WRAP_COMMAND_ID="workbench.action.focusAboveGroupWithoutWrap",e.FOCUS_BELOW_GROUP_WITHOUT_WRAP_COMMAND_ID="workbench.action.focusBelowGroupWithoutWrap",e.OPEN_EDITOR_AT_INDEX_COMMAND_ID="workbench.action.openEditorAtIndex",e.API_OPEN_EDITOR_COMMAND_ID="_workbench.open",e.API_OPEN_DIFF_EDITOR_COMMAND_ID="_workbench.diff",e.API_OPEN_WITH_EDITOR_COMMAND_ID="_workbench.openWith";const F=function(ee){return!(!(0,f.isObject)(ee)||!(0,f.isString)(ee.to)||!(0,f.isUndefined)(ee.by)&&!(0,f.isString)(ee.by)||!(0,f.isUndefined)(ee.value)&&!(0,f.isNumber)(ee.value))};function L(){const ee={type:"object",required:["to"],properties:{to:{type:"string",enum:["left","right"]},by:{type:"string",enum:["tab","group"]},value:{type:"number"}}};A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.MOVE_ACTIVE_EDITOR_COMMAND_ID,weight:200,when:v.EditorContextKeys.editorTextFocus,primary:0,handler:(ce,le)=>te(!0,le,ce),description:{description:(0,t.localize)(0,null),args:[{name:(0,t.localize)(1,null),description:(0,t.localize)(2,null),constraint:F,schema:ee}]}}),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.COPY_ACTIVE_EDITOR_COMMAND_ID,weight:200,when:v.EditorContextKeys.editorTextFocus,primary:0,handler:(ce,le)=>te(!1,le,ce),description:{description:(0,t.localize)(3,null),args:[{name:(0,t.localize)(4,null),description:(0,t.localize)(5,null),constraint:F,schema:ee}]}});function te(ce,le=Object.create(null),ae){le.to=le.to||"right",le.by=le.by||"tab",le.value=typeof le.value=="number"?le.value:1;const ue=ae.get(w.IEditorService).activeEditorPane;if(ue)switch(le.by){case"tab":if(ce)return se(le,ue);break;case"group":return ie(ce,le,ue,ae)}}function se(ce,le){const ae=le.group;let ue=ae.getIndexOfEditor(le.input);switch(ce.to){case"first":ue=0;break;case"last":ue=ae.count-1;break;case"left":ue=ue-ce.value;break;case"right":ue=ue+ce.value;break;case"center":ue=Math.round(ae.count/2)-1;break;case"position":ue=ce.value-1;break}ue=ue<0?0:ue>=ae.count?ae.count-1:ue,ae.moveEditor(le.input,ae,{index:ue})}function ie(ce,le,ae,ue){const oe=ue.get(r.IEditorGroupsService),fe=ue.get(u.IConfigurationService),pe=ae.group;let me;switch(le.to){case"left":me=oe.findGroup({direction:2},pe),me||(me=oe.addGroup(pe,2));break;case"right":me=oe.findGroup({direction:3},pe),me||(me=oe.addGroup(pe,3));break;case"up":me=oe.findGroup({direction:0},pe),me||(me=oe.addGroup(pe,0));break;case"down":me=oe.findGroup({direction:1},pe),me||(me=oe.addGroup(pe,1));break;case"first":me=oe.findGroup({location:0},pe);break;case"last":me=oe.findGroup({location:1},pe);break;case"previous":me=oe.findGroup({location:3},pe);break;case"next":me=oe.findGroup({location:2},pe),me||(me=oe.addGroup(pe,(0,r.preferredSideBySideGroupDirection)(fe)));break;case"center":me=oe.getGroups(2)[oe.count/2-1];break;case"position":me=oe.getGroups(2)[le.value-1];break}me&&(ce?pe.moveEditor(ae.input,me):pe.id!==me.id&&pe.copyEditor(ae.input,me),me.focus())}}function M(){function ee(te,se){if(!se||typeof se!="object")return;te.get(r.IEditorGroupsService).applyLayout(se)}a.CommandsRegistry.registerCommand(e.LAYOUT_EDITOR_GROUPS_COMMAND_ID,(te,se)=>{ee(te,se)}),a.CommandsRegistry.registerCommand({id:"vscode.setEditorLayout",handler:(te,se)=>ee(te,se),description:{description:"Set Editor Layout",args:[{name:"args",schema:{type:"object",required:["groups"],properties:{orientation:{type:"number",default:0,enum:[0,1]},groups:{$ref:"#/definitions/editorGroupsSchema",default:[{},{}]}}}}]}})}function N(){A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.GOTO_NEXT_CHANGE,weight:200,when:D.TextCompareEditorVisibleContext,primary:512|63,handler:ae=>te(ae,!0)}),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.GOTO_PREVIOUS_CHANGE,weight:200,when:D.TextCompareEditorVisibleContext,primary:512|1024|63,handler:ae=>te(ae,!1)});function ee(ae){const ue=ae.get(w.IEditorService);for(const oe of[ue.activeEditorPane,...ue.visibleEditorPanes])if(oe instanceof C.TextDiffEditor)return oe}function te(ae,ue){const oe=ee(ae);if(oe){const fe=oe.getDiffNavigator();fe&&(ue?fe.next():fe.previous())}}let se;(function(ae){ae[ae.Original=0]="Original",ae[ae.Modified=1]="Modified",ae[ae.Toggle=2]="Toggle"})(se||(se={}));function ie(ae,ue){const oe=ee(ae);if(oe)switch(ue){case se.Original:oe.getControl()?.getOriginalEditor().focus();break;case se.Modified:oe.getControl()?.getModifiedEditor().focus();break;case se.Toggle:return oe.getControl()?.getModifiedEditor().hasWidgetFocus()?ie(ae,se.Original):ie(ae,se.Modified)}}function ce(ae){const ue=ae.get(u.IConfigurationService),oe=!ue.getValue("diffEditor.renderSideBySide");ue.updateValue("diffEditor.renderSideBySide",oe)}function le(ae){const ue=ae.get(u.IConfigurationService),oe=!ue.getValue("diffEditor.ignoreTrimWhitespace");ue.updateValue("diffEditor.ignoreTrimWhitespace",oe)}A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.TOGGLE_DIFF_SIDE_BY_SIDE,weight:200,when:void 0,primary:void 0,handler:ae=>ce(ae)}),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.DIFF_FOCUS_PRIMARY_SIDE,weight:200,when:void 0,primary:void 0,handler:ae=>ie(ae,se.Modified)}),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.DIFF_FOCUS_SECONDARY_SIDE,weight:200,when:void 0,primary:void 0,handler:ae=>ie(ae,se.Original)}),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.DIFF_FOCUS_OTHER_SIDE,weight:200,when:void 0,primary:void 0,handler:ae=>ie(ae,se.Toggle)}),n.MenuRegistry.appendMenuItem(n.MenuId.CommandPalette,{command:{id:e.TOGGLE_DIFF_SIDE_BY_SIDE,title:{value:(0,t.localize)(6,null),original:"Compare: Toggle Inline View"},category:(0,t.localize)(7,null)},when:D.TextCompareEditorActiveContext}),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.TOGGLE_DIFF_IGNORE_TRIM_WHITESPACE,weight:200,when:void 0,primary:void 0,handler:ae=>le(ae)})}function B(){function ee(te,se,ie){return te?[{...te.editorOptions,...se??Object.create(null)},te.sideBySide?w.SIDE_GROUP:ie]:[se,ie]}a.CommandsRegistry.registerCommand({id:"vscode.open",handler:(te,se)=>{te.get(a.ICommandService).executeCommand(e.API_OPEN_EDITOR_COMMAND_ID,se)},description:{description:"Opens the provided resource in the editor.",args:[{name:"Uri"}]}}),a.CommandsRegistry.registerCommand(e.API_OPEN_EDITOR_COMMAND_ID,async function(te,se,ie,ce,le){const ae=te.get(w.IEditorService),ue=te.get(r.IEditorGroupsService),oe=te.get(d.IOpenerService),fe=te.get(R.IPathService),pe=typeof se=="string"?se:c.URI.revive(se),[me,be]=ie??[];if(be||typeof me=="number"||(0,d.matchesScheme)(pe,b.Schemas.untitled)){const[Ce,ve]=ee(le,be,me),he=c.URI.isUri(pe)?pe:c.URI.parse(pe);let ge;(0,d.matchesScheme)(he,b.Schemas.untitled)&&he.path.length>1?ge={resource:he.with({scheme:fe.defaultUriScheme}),forceUntitled:!0,options:Ce,label:ce}:ge={resource:he,options:Ce,label:ce},await ae.openEditor(ge,(0,I.columnToEditorGroup)(ue,ve))}else{if((0,d.matchesScheme)(pe,b.Schemas.command))return;await oe.open(pe,{openToSide:le?.sideBySide,editorOptions:le?.editorOptions})}}),a.CommandsRegistry.registerCommand({id:"vscode.diff",handler:(te,se,ie,ce)=>{te.get(a.ICommandService).executeCommand(e.API_OPEN_DIFF_EDITOR_COMMAND_ID,se,ie,ce)},description:{description:"Opens the provided resources in the diff editor to compare their contents.",args:[{name:"left",description:"Left-hand side resource of the diff editor"},{name:"right",description:"Right-hand side resource of the diff editor"},{name:"title",description:"Human readable title for the diff editor"}]}}),a.CommandsRegistry.registerCommand(e.API_OPEN_DIFF_EDITOR_COMMAND_ID,async function(te,se,ie,ce,le,ae){const ue=te.get(w.IEditorService),oe=te.get(r.IEditorGroupsService),[fe,pe]=le??[],[me,be]=ee(ae,pe,fe);let Ce,ve;typeof ce=="string"?Ce=ce:ce&&(Ce=ce.label,ve=ce.description),await ue.openEditor({original:{resource:c.URI.revive(se)},modified:{resource:c.URI.revive(ie)},label:Ce,description:ve,options:me},(0,I.columnToEditorGroup)(oe,be))}),a.CommandsRegistry.registerCommand(e.API_OPEN_WITH_EDITOR_COMMAND_ID,(te,se,ie,ce)=>{const le=te.get(w.IEditorService),ae=te.get(r.IEditorGroupsService),ue=te.get(u.IConfigurationService),[oe,fe]=ce??[];let pe;if(oe===w.SIDE_GROUP){const me=(0,r.preferredSideBySideGroupDirection)(ue);let be=ae.findGroup({direction:me});be||(be=ae.addGroup(ae.activeGroup,me)),pe=be}else pe=(0,I.columnToEditorGroup)(ae,oe);return le.openEditor({resource:c.URI.revive(se),options:{...fe,pinned:!0,override:ie}},pe)})}function P(){const ee=(se,ie)=>{const ce=se.get(w.IEditorService),le=ce.activeEditorPane;if(le){const ae=le.group.getEditorByIndex(ie);ae&&ce.openEditor(ae)}};a.CommandsRegistry.registerCommand({id:e.OPEN_EDITOR_AT_INDEX_COMMAND_ID,handler:ee});for(let se=0;se<9;se++){const ie=se,ce=se+1;A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.OPEN_EDITOR_AT_INDEX_COMMAND_ID+ce,weight:200,when:void 0,primary:512|te(ce),mac:{primary:256|te(ce)},handler:le=>ee(le,ie)})}function te(se){switch(se){case 0:return 21;case 1:return 22;case 2:return 23;case 3:return 24;case 4:return 25;case 5:return 26;case 6:return 27;case 7:return 28;case 8:return 29;case 9:return 30}throw new Error("invalid index")}}function V(){for(let se=1;se<8;se++)A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:ee(se),weight:200,when:void 0,primary:2048|te(se),handler:ie=>{const ce=ie.get(r.IEditorGroupsService),le=ie.get(u.IConfigurationService);if(se>ce.count)return;const ae=ce.getGroups(2);if(ae[se])return ae[se].focus();const ue=(0,r.preferredSideBySideGroupDirection)(le),oe=ce.findGroup({location:1});if(!oe)return;ce.addGroup(oe,ue).focus()}});function ee(se){switch(se){case 1:return"workbench.action.focusSecondEditorGroup";case 2:return"workbench.action.focusThirdEditorGroup";case 3:return"workbench.action.focusFourthEditorGroup";case 4:return"workbench.action.focusFifthEditorGroup";case 5:return"workbench.action.focusSixthEditorGroup";case 6:return"workbench.action.focusSeventhEditorGroup";case 7:return"workbench.action.focusEighthEditorGroup"}throw new Error("Invalid index")}function te(se){switch(se){case 1:return 23;case 2:return 24;case 3:return 25;case 4:return 26;case 5:return 27;case 6:return 28;case 7:return 29}throw new Error("Invalid index")}}function z(ee,te,se){let ie;if(se&&typeof se.groupId=="number"?ie=ee.getGroup(se.groupId):ie=ee.activeGroup,!ie)return;const ce=ee.addGroup(ie,te);let le;se&&typeof se.editorIndex=="number"?le=ie.getEditorByIndex(se.editorIndex):le=(0,f.withNullAsUndefined)(ie.activeEditor),le&&!le.hasCapability(8)&&ie.copyEditor(le,ce,{preserveFocus:se?.preserveFocus}),ce.focus()}e.splitEditor=z;function U(){[{id:e.SPLIT_EDITOR_UP,direction:0},{id:e.SPLIT_EDITOR_DOWN,direction:1},{id:e.SPLIT_EDITOR_LEFT,direction:2},{id:e.SPLIT_EDITOR_RIGHT,direction:3}].forEach(({id:ee,direction:te})=>{a.CommandsRegistry.registerCommand(ee,function(se,ie,ce){z(se.get(r.IEditorGroupsService),te,X(ie,ce))})})}function H(){function ee(te,se,ie,ce){const le=te.get(r.IEditorGroupsService),ae=te.get(w.IEditorService);let ue=!0;if((se||ie||ce)&&(ue=!1),ue&&!ie&&!ce){const pe=le.activeGroup,me=pe.activeEditor;if(me&&pe.isSticky(me)){const be=pe.getEditors(0,{excludeSticky:!0})[0];if(be)return pe.openEditor(be);const Ce=ae.getEditors(0,{excludeSticky:!0})[0];if(Ce)return Promise.resolve(le.getGroup(Ce.groupId)?.openEditor(Ce.editor))}}const{editors:oe,groups:fe}=j(te,ie,ce);return Promise.all(fe.map(async pe=>{if(pe){const me=(0,l.coalesce)(oe.filter(be=>be.groupId===pe.id).map(be=>typeof be.editorIndex=="number"?pe.getEditorByIndex(be.editorIndex):pe.activeEditor)).filter(be=>!ue||!pe.isSticky(be));return pe.closeEditors(me,{preserveFocus:ce?.preserveFocus})}}))}A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.CLOSE_EDITOR_COMMAND_ID,weight:200,when:void 0,primary:2048|53,win:{primary:2048|62,secondary:[2048|53]},handler:(te,se,ie)=>ee(te,!1,se,ie)}),a.CommandsRegistry.registerCommand(e.CLOSE_PINNED_EDITOR_COMMAND_ID,(te,se,ie)=>ee(te,!0,se,ie)),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.CLOSE_EDITORS_IN_GROUP_COMMAND_ID,weight:200,when:void 0,primary:(0,o.KeyChord)(2048|41,53),handler:(te,se,ie)=>Promise.all(j(te,se,ie).groups.map(async ce=>{if(ce)return ce.closeAllEditors({excludeSticky:!0})}))}),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.CLOSE_EDITOR_GROUP_COMMAND_ID,weight:200,when:p.ContextKeyExpr.and(D.ActiveEditorGroupEmptyContext,D.MultipleEditorGroupsContext),primary:2048|53,win:{primary:2048|62,secondary:[2048|53]},handler:(te,se,ie)=>{const ce=te.get(r.IEditorGroupsService),le=X(se,ie);let ae;le&&typeof le.groupId=="number"?ae=ce.getGroup(le.groupId):ae=ce.activeGroup,ae&&ce.removeGroup(ae)}}),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.CLOSE_SAVED_EDITORS_COMMAND_ID,weight:200,when:void 0,primary:(0,o.KeyChord)(2048|41,51),handler:(te,se,ie)=>Promise.all(j(te,se,ie).groups.map(async ce=>{if(ce)return ce.closeEditors({savedOnly:!0,excludeSticky:!0},{preserveFocus:ie?.preserveFocus})}))}),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID,weight:200,when:void 0,primary:void 0,mac:{primary:2048|512|50},handler:(te,se,ie)=>{const{editors:ce,groups:le}=j(te,se,ie);return Promise.all(le.map(async ae=>{if(ae){const ue=ce.filter(fe=>fe.groupId===ae.id).map(fe=>typeof fe.editorIndex=="number"?ae.getEditorByIndex(fe.editorIndex):ae.activeEditor),oe=ae.getEditors(1,{excludeSticky:!0}).filter(fe=>!ue.includes(fe));for(const fe of ue)fe&&ae.pinEditor(fe);return ae.closeEditors(oe,{preserveFocus:ie?.preserveFocus})}}))}}),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.CLOSE_EDITORS_TO_THE_RIGHT_COMMAND_ID,weight:200,when:void 0,primary:void 0,handler:async(te,se,ie)=>{const ce=te.get(r.IEditorGroupsService),{group:le,editor:ae}=Y(ce,X(se,ie));if(le&&ae)return le.activeEditor&&le.pinEditor(le.activeEditor),le.closeEditors({direction:1,except:ae,excludeSticky:!0},{preserveFocus:ie?.preserveFocus})}}),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.REOPEN_WITH_COMMAND_ID,weight:200,when:void 0,primary:void 0,handler:async(te,se,ie)=>{const ce=te.get(r.IEditorGroupsService),le=te.get(w.IEditorService),ae=te.get(T.IEditorResolverService),ue=te.get(O.ITelemetryService),{group:oe,editor:fe}=Y(ce,X(se,ie));if(!fe)return;const pe=await ae.resolveEditor({editor:fe,options:{...le.activeEditorPane?.options,override:m.EditorResolution.PICK}},oe);!(0,k.isEditorInputWithOptionsAndGroup)(pe)||(await pe.group.replaceEditors([{editor:fe,replacement:pe.editor,forceReplaceDirty:fe.resource?.scheme===b.Schemas.untitled,options:pe.options}]),ue.publicLog2("workbenchEditorReopen",{scheme:fe.resource?.scheme??"",ext:fe.resource?(0,x.extname)(fe.resource):"",from:fe.editorId??"",to:pe.editor.editorId??""}),await pe.group.openEditor(pe.editor))}}),a.CommandsRegistry.registerCommand(e.CLOSE_EDITORS_AND_GROUP_COMMAND_ID,async(te,se,ie)=>{const ce=te.get(r.IEditorGroupsService),{group:le}=Y(ce,X(se,ie));le&&(await le.closeAllEditors(),le.count===0&&ce.getGroup(le.id)&&ce.removeGroup(le))})}function K(){const ee=[{id:e.FOCUS_LEFT_GROUP_WITHOUT_WRAP_COMMAND_ID,direction:2},{id:e.FOCUS_RIGHT_GROUP_WITHOUT_WRAP_COMMAND_ID,direction:3},{id:e.FOCUS_ABOVE_GROUP_WITHOUT_WRAP_COMMAND_ID,direction:0},{id:e.FOCUS_BELOW_GROUP_WITHOUT_WRAP_COMMAND_ID,direction:1}];for(const te of ee)a.CommandsRegistry.registerCommand(te.id,async se=>{const ie=se.get(r.IEditorGroupsService),ce=ie.findGroup({direction:te.direction},ie.activeGroup,!1);ce&&ce.focus()})}function G(){async function ee(se,ie,ce){const le=se.get(r.IEditorGroupsService),ae=se.get(_.IInstantiationService),{group:ue,editor:oe}=Y(le,X(ie,ce));!oe||await ue.replaceEditors([{editor:oe,replacement:ae.createInstance(E.SideBySideEditorInput,void 0,void 0,oe,oe),forceReplaceDirty:!0}])}(0,n.registerAction2)(class extends n.Action2{constructor(){super({id:e.SPLIT_EDITOR_IN_GROUP,title:{value:(0,t.localize)(8,null),original:"Split Editor in Group"},category:h.CATEGORIES.View,precondition:D.ActiveEditorCanSplitInGroupContext,f1:!0,keybinding:{weight:200,when:D.ActiveEditorCanSplitInGroupContext,primary:(0,o.KeyChord)(2048|41,2048|1024|88)}})}run(se,ie,ce){return ee(se,ie,ce)}});async function te(se,ie,ce){const le=se.get(r.IEditorGroupsService),{group:ae,editor:ue}=Y(le,X(ie,ce));if(!(ue instanceof E.SideBySideEditorInput))return;let oe;const fe=ae.activeEditorPane;if(fe instanceof y.SideBySideEditor&&ae.activeEditor===ue){for(const pe of[fe.getPrimaryEditorPane(),fe.getSecondaryEditorPane()])if(pe?.hasFocus()){oe={viewState:pe.getViewState()};break}}await ae.replaceEditors([{editor:ue,replacement:ue.primary,options:oe}])}(0,n.registerAction2)(class extends n.Action2{constructor(){super({id:e.JOIN_EDITOR_IN_GROUP,title:{value:(0,t.localize)(9,null),original:"Join Editor in Group"},category:h.CATEGORIES.View,precondition:D.SideBySideEditorActiveContext,f1:!0,keybinding:{weight:200,when:D.SideBySideEditorActiveContext,primary:(0,o.KeyChord)(2048|41,2048|1024|88)}})}run(se,ie,ce){return te(se,ie,ce)}}),(0,n.registerAction2)(class extends n.Action2{constructor(){super({id:e.TOGGLE_SPLIT_EDITOR_IN_GROUP,title:{value:(0,t.localize)(10,null),original:"Toggle Split Editor in Group"},category:h.CATEGORIES.View,precondition:p.ContextKeyExpr.or(D.ActiveEditorCanSplitInGroupContext,D.SideBySideEditorActiveContext),f1:!0})}async run(se,ie,ce){const le=se.get(r.IEditorGroupsService),{editor:ae}=Y(le,X(ie,ce));ae instanceof E.SideBySideEditorInput?await te(se,ie,ce):ae&&await ee(se,ie,ce)}}),(0,n.registerAction2)(class extends n.Action2{constructor(){super({id:e.TOGGLE_SPLIT_EDITOR_IN_GROUP_LAYOUT,title:{value:(0,t.localize)(11,null),original:"Toggle Split Editor in Group Layout"},category:h.CATEGORIES.View,precondition:D.SideBySideEditorActiveContext,f1:!0})}async run(se){const ie=se.get(u.IConfigurationService),ce=ie.getValue(y.SideBySideEditor.SIDE_BY_SIDE_LAYOUT_SETTING);let le;return ce!=="horizontal"?le="horizontal":le="vertical",ie.updateValue(y.SideBySideEditor.SIDE_BY_SIDE_LAYOUT_SETTING,le)}})}function q(){(0,n.registerAction2)(class extends n.Action2{constructor(){super({id:e.FOCUS_FIRST_SIDE_EDITOR,title:{value:(0,t.localize)(12,null),original:"Focus First Side in Active Editor"},category:h.CATEGORIES.View,precondition:p.ContextKeyExpr.or(D.SideBySideEditorActiveContext,D.TextCompareEditorActiveContext),f1:!0})}async run(ee){const te=ee.get(w.IEditorService),se=ee.get(a.ICommandService),ie=te.activeEditorPane;ie instanceof y.SideBySideEditor?ie.getSecondaryEditorPane()?.focus():ie instanceof C.TextDiffEditor&&await se.executeCommand(e.DIFF_FOCUS_SECONDARY_SIDE)}}),(0,n.registerAction2)(class extends n.Action2{constructor(){super({id:e.FOCUS_SECOND_SIDE_EDITOR,title:{value:(0,t.localize)(13,null),original:"Focus Second Side in Active Editor"},category:h.CATEGORIES.View,precondition:p.ContextKeyExpr.or(D.SideBySideEditorActiveContext,D.TextCompareEditorActiveContext),f1:!0})}async run(ee){const te=ee.get(w.IEditorService),se=ee.get(a.ICommandService),ie=te.activeEditorPane;ie instanceof y.SideBySideEditor?ie.getPrimaryEditorPane()?.focus():ie instanceof C.TextDiffEditor&&await se.executeCommand(e.DIFF_FOCUS_PRIMARY_SIDE)}}),(0,n.registerAction2)(class extends n.Action2{constructor(){super({id:e.FOCUS_OTHER_SIDE_EDITOR,title:{value:(0,t.localize)(14,null),original:"Focus Other Side in Active Editor"},category:h.CATEGORIES.View,precondition:p.ContextKeyExpr.or(D.SideBySideEditorActiveContext,D.TextCompareEditorActiveContext),f1:!0})}async run(ee){const te=ee.get(w.IEditorService),se=ee.get(a.ICommandService),ie=te.activeEditorPane;ie instanceof y.SideBySideEditor?ie.getPrimaryEditorPane()?.hasFocus()?ie.getSecondaryEditorPane()?.focus():ie.getPrimaryEditorPane()?.focus():ie instanceof C.TextDiffEditor&&await se.executeCommand(e.DIFF_FOCUS_OTHER_SIDE)}})}function Z(){A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.KEEP_EDITOR_COMMAND_ID,weight:200,when:void 0,primary:(0,o.KeyChord)(2048|41,3),handler:async(te,se,ie)=>{const ce=te.get(r.IEditorGroupsService),{group:le,editor:ae}=Y(ce,X(se,ie));if(le&&ae)return le.pinEditor(ae)}}),a.CommandsRegistry.registerCommand({id:e.TOGGLE_KEEP_EDITORS_COMMAND_ID,handler:te=>{const se=te.get(u.IConfigurationService),ce=se.getValue("workbench.editor.enablePreview")!==!0;se.updateValue("workbench.editor.enablePreview",ce)}});function ee(te,se,ie,ce){const le=te.get(r.IEditorGroupsService),{group:ae}=Y(le,X(se,ie));ae&&ae.lock(ce??!ae.isLocked)}(0,n.registerAction2)(class extends n.Action2{constructor(){super({id:e.TOGGLE_LOCK_GROUP_COMMAND_ID,title:{value:(0,t.localize)(15,null),original:"Toggle Editor Group Lock"},category:h.CATEGORIES.View,precondition:D.MultipleEditorGroupsContext,f1:!0})}async run(te,se,ie){ee(te,se,ie)}}),(0,n.registerAction2)(class extends n.Action2{constructor(){super({id:e.LOCK_GROUP_COMMAND_ID,title:{value:(0,t.localize)(16,null),original:"Lock Editor Group"},category:h.CATEGORIES.View,precondition:p.ContextKeyExpr.and(D.MultipleEditorGroupsContext,D.ActiveEditorGroupLockedContext.toNegated()),f1:!0})}async run(te,se,ie){ee(te,se,ie,!0)}}),(0,n.registerAction2)(class extends n.Action2{constructor(){super({id:e.UNLOCK_GROUP_COMMAND_ID,title:{value:(0,t.localize)(17,null),original:"Unlock Editor Group"},precondition:p.ContextKeyExpr.and(D.MultipleEditorGroupsContext,D.ActiveEditorGroupLockedContext),category:h.CATEGORIES.View,f1:!0})}async run(te,se,ie){ee(te,se,ie,!1)}}),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.PIN_EDITOR_COMMAND_ID,weight:200,when:D.ActiveEditorStickyContext.toNegated(),primary:(0,o.KeyChord)(2048|41,1024|3),handler:async(te,se,ie)=>{const ce=te.get(r.IEditorGroupsService),{group:le,editor:ae}=Y(ce,X(se,ie));if(le&&ae)return le.stickEditor(ae)}}),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.UNPIN_EDITOR_COMMAND_ID,weight:200,when:D.ActiveEditorStickyContext,primary:(0,o.KeyChord)(2048|41,1024|3),handler:async(te,se,ie)=>{const ce=te.get(r.IEditorGroupsService),{group:le,editor:ae}=Y(ce,X(se,ie));if(le&&ae)return le.unstickEditor(ae)}}),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.SHOW_EDITORS_IN_GROUP,weight:200,when:void 0,primary:void 0,handler:(te,se,ie)=>{const ce=te.get(r.IEditorGroupsService),le=te.get(i.IQuickInputService),ae=X(se,ie);if(ae&&typeof ae.groupId=="number"){const ue=ce.getGroup(ae.groupId);ue&&ce.activateGroup(ue)}return le.quickAccess.show(g.ActiveGroupEditorsByMostRecentlyUsedQuickAccess.PREFIX)}})}function j(ee,te,se){const ie=ee.get(r.IEditorGroupsService),ce=ee.get(S.IListService),le=$(X(te,se),ce,ie),ae=ie.activeGroup;return le.length===0&&ae.activeEditor&&le.push({groupId:ae.id,editorIndex:ae.getIndexOfEditor(ae.activeEditor)}),{editors:le,groups:(0,l.distinct)(le.map(ue=>ue.groupId)).map(ue=>ie.getGroup(ue))}}function X(ee,te){if(c.URI.isUri(ee))return te;if(ee&&typeof ee.groupId=="number")return ee;if(te&&typeof te.groupId=="number")return te}function Y(ee,te){let se=te&&typeof te.groupId=="number"?ee.getGroup(te.groupId):void 0,ie=se&&te&&typeof te.editorIndex=="number"?(0,f.withNullAsUndefined)(se.getEditorByIndex(te.editorIndex)):void 0;return se||(se=ee.activeGroup),ie||(ie=(0,f.withNullAsUndefined)(se.activeEditor)),{group:se,editor:ie}}function $(ee,te,se){const ie=te.lastFocusedList;if(ie instanceof s.List&&ie.getHTMLElement()===document.activeElement){const ce=oe=>{if((0,r.isEditorGroup)(oe))return{groupId:oe.id,editorIndex:void 0};const fe=se.getGroup(oe.groupId);return{groupId:oe.groupId,editorIndex:fe?fe.getIndexOfEditor(oe.editor):-1}},le=oe=>(0,r.isEditorGroup)(oe)||(0,k.isEditorIdentifier)(oe),ae=ie.getFocusedElements().filter(le),ue=ee||(ae.length?ae.map(ce)[0]:void 0);if(ue){const oe=ie.getSelectedElements().filter(le);return oe?.some(fe=>{if((0,r.isEditorGroup)(fe))return fe.id===ue.groupId;const pe=se.getGroup(fe.groupId);return fe.groupId===ue.groupId&&(pe?pe.getIndexOfEditor(fe.editor):-1)===ue.editorIndex})?oe.map(ce):[ue]}}return ee?[ee]:[]}e.getMultiSelectedEditorContexts=$;function J(){L(),M(),N(),B(),P(),H(),Z(),G(),q(),V(),U(),K()}e.setup=J}),define(ne[635],re([1,0,1396,36,15,44,167,80,177,38,28,204,59,21,8,2,189,54,53,604,33,154,159,14]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReOpenInTextEditorAction=e.ToggleEditorTypeAction=e.NewEditorGroupBelowAction=e.NewEditorGroupAboveAction=e.NewEditorGroupRightAction=e.NewEditorGroupLeftAction=e.EditorLayoutTwoRowsRightAction=e.EditorLayoutTwoColumnsBottomAction=e.EditorLayoutTwoByTwoGridAction=e.EditorLayoutThreeRowsAction=e.EditorLayoutTwoRowsAction=e.EditorLayoutThreeColumnsAction=e.EditorLayoutTwoColumnsAction=e.EditorLayoutSingleAction=e.SplitEditorToLastGroupAction=e.SplitEditorToFirstGroupAction=e.SplitEditorToRightGroupAction=e.SplitEditorToLeftGroupAction=e.SplitEditorToBelowGroupAction=e.SplitEditorToAboveGroupAction=e.SplitEditorToNextGroupAction=e.SplitEditorToPreviousGroupAction=e.MoveEditorToLastGroupAction=e.MoveEditorToFirstGroupAction=e.MoveEditorToRightGroupAction=e.MoveEditorToLeftGroupAction=e.MoveEditorToBelowGroupAction=e.MoveEditorToAboveGroupAction=e.MoveEditorToNextGroupAction=e.MoveEditorToPreviousGroupAction=e.MoveEditorRightInGroupAction=e.MoveEditorLeftInGroupAction=e.ClearEditorHistoryAction=e.OpenPreviousRecentlyUsedEditorInGroupAction=e.OpenNextRecentlyUsedEditorInGroupAction=e.OpenPreviousRecentlyUsedEditorAction=e.OpenNextRecentlyUsedEditorAction=e.QuickAccessPreviousEditorFromHistoryAction=e.QuickAccessLeastRecentlyUsedEditorInGroupAction=e.QuickAccessPreviousRecentlyUsedEditorInGroupAction=e.QuickAccessLeastRecentlyUsedEditorAction=e.QuickAccessPreviousRecentlyUsedEditorAction=e.ShowAllEditorsByMostRecentlyUsedAction=e.ShowAllEditorsByAppearanceAction=e.ShowEditorsInActiveGroupByMostRecentlyUsedAction=e.ClearRecentFilesAction=e.ReopenClosedEditorAction=e.NavigateToLastNavigationLocationAction=e.NavigatePreviousInNavigationsAction=e.NavigateBackwardsInNavigationsAction=e.NavigateForwardInNavigationsAction=e.NavigateToLastEditLocationAction=e.NavigatePreviousInEditsAction=e.NavigateBackwardsInEditsAction=e.NavigateForwardInEditsAction=e.NavigatePreviousAction=e.NavigateBackwardsAction=e.NavigateForwardAction=e.OpenLastEditorInGroup=e.OpenFirstEditorInGroup=e.OpenPreviousEditorInGroup=e.OpenNextEditorInGroup=e.OpenPreviousEditor=e.OpenNextEditor=e.MaximizeGroupAction=e.ToggleGroupSizesAction=e.ResetGroupSizesAction=e.MinimizeOtherGroupsAction=e.DuplicateGroupDownAction=e.DuplicateGroupUpAction=e.DuplicateGroupRightAction=e.DuplicateGroupLeftAction=e.MoveGroupDownAction=e.MoveGroupUpAction=e.MoveGroupRightAction=e.MoveGroupLeftAction=e.CloseEditorInAllGroupsAction=e.CloseEditorsInOtherGroupsAction=e.CloseAllEditorGroupsAction=e.CloseAllEditorsAction=e.CloseLeftEditorsInGroupAction=e.RevertAndCloseEditorAction=e.CloseOneEditorAction=e.UnpinEditorAction=e.CloseEditorAction=e.FocusBelowGroup=e.FocusAboveGroup=e.FocusRightGroup=e.FocusLeftGroup=e.FocusPreviousGroup=e.FocusNextGroup=e.FocusLastGroupAction=e.FocusFirstGroupAction=e.FocusActiveGroupAction=e.NavigateBetweenGroupsAction=e.JoinAllGroupsAction=e.JoinTwoGroupsAction=e.SplitEditorDownAction=e.SplitEditorUpAction=e.SplitEditorRightAction=e.SplitEditorLeftAction=e.SplitEditorOrthogonalAction=e.SplitEditorAction=e.ExecuteCommandAction=void 0;class g extends f.Action{constructor(tt,nt,st,Tt,Mt){super(tt,nt);this.commandId=st,this.commandService=Tt,this.commandArgs=Mt}run(){return this.commandService.executeCommand(this.commandId,this.commandArgs)}}e.ExecuteCommandAction=g;class d extends f.Action{constructor(tt,nt,st,Tt){super(tt,nt);this.editorGroupService=st,this.configurationService=Tt,this.toDispose=this._register(new S.DisposableStore),this.direction=this.getDirection(),this.registerListeners()}getDirection(){return(0,o.preferredSideBySideGroupDirection)(this.configurationService)}registerListeners(){this.toDispose.add(this.configurationService.onDidChangeConfiguration(tt=>{tt.affectsConfiguration("workbench.editor.openSideBySideDirection")&&(this.direction=(0,o.preferredSideBySideGroupDirection)(this.configurationService))}))}async run(tt){(0,C.splitEditor)(this.editorGroupService,this.direction,tt)}}let m=class extends d{constructor(tt,nt,st,Tt){super(tt,nt,st,Tt)}};m.ID="workbench.action.splitEditor",m.LABEL=(0,t.localize)(0,null),m=Ee([W(2,o.IEditorGroupsService),W(3,i.IConfigurationService)],m),e.SplitEditorAction=m;let b=class extends d{constructor(tt,nt,st,Tt){super(tt,nt,st,Tt)}getDirection(){return(0,o.preferredSideBySideGroupDirection)(this.configurationService)===3?1:3}};b.ID="workbench.action.splitEditorOrthogonal",b.LABEL=(0,t.localize)(1,null),b=Ee([W(2,o.IEditorGroupsService),W(3,i.IConfigurationService)],b),e.SplitEditorOrthogonalAction=b;let E=class extends g{constructor(tt,nt,st){super(tt,nt,C.SPLIT_EDITOR_LEFT,st)}};E.ID=C.SPLIT_EDITOR_LEFT,E.LABEL=(0,t.localize)(2,null),E=Ee([W(2,v.ICommandService)],E),e.SplitEditorLeftAction=E;let y=class extends g{constructor(tt,nt,st){super(tt,nt,C.SPLIT_EDITOR_RIGHT,st)}};y.ID=C.SPLIT_EDITOR_RIGHT,y.LABEL=(0,t.localize)(3,null),y=Ee([W(2,v.ICommandService)],y),e.SplitEditorRightAction=y;let T=class extends g{constructor(tt,nt,st){super(tt,nt,C.SPLIT_EDITOR_UP,st)}};T.ID=C.SPLIT_EDITOR_UP,T.LABEL=(0,t.localize)(4,null),T=Ee([W(2,v.ICommandService)],T),e.SplitEditorUpAction=T;let R=class extends g{constructor(tt,nt,st){super(tt,nt,C.SPLIT_EDITOR_DOWN,st)}};R.ID=C.SPLIT_EDITOR_DOWN,R.LABEL=(0,t.localize)(5,null),R=Ee([W(2,v.ICommandService)],R),e.SplitEditorDownAction=R;let O=class extends f.Action{constructor(tt,nt,st){super(tt,nt);this.editorGroupService=st}async run(tt){let nt;if(tt&&typeof tt.groupId=="number"?nt=this.editorGroupService.getGroup(tt.groupId):nt=this.editorGroupService.activeGroup,nt){const st=[3,1,2,0];for(const Tt of st){const Mt=this.editorGroupService.findGroup({direction:Tt},nt);if(Mt&&nt!==Mt){this.editorGroupService.mergeGroup(nt,Mt);break}}}}};O.ID="workbench.action.joinTwoGroups",O.LABEL=(0,t.localize)(6,null),O=Ee([W(2,o.IEditorGroupsService)],O),e.JoinTwoGroupsAction=O;let x=class extends f.Action{constructor(tt,nt,st){super(tt,nt);this.editorGroupService=st}async run(){this.editorGroupService.mergeAllGroups()}};x.ID="workbench.action.joinAllGroups",x.LABEL=(0,t.localize)(7,null),x=Ee([W(2,o.IEditorGroupsService)],x),e.JoinAllGroupsAction=x;let F=class extends f.Action{constructor(tt,nt,st){super(tt,nt);this.editorGroupService=st}async run(){this.editorGroupService.findGroup({location:2},this.editorGroupService.activeGroup,!0)?.focus()}};F.ID="workbench.action.navigateEditorGroups",F.LABEL=(0,t.localize)(8,null),F=Ee([W(2,o.IEditorGroupsService)],F),e.NavigateBetweenGroupsAction=F;let L=class extends f.Action{constructor(tt,nt,st){super(tt,nt);this.editorGroupService=st}async run(){this.editorGroupService.activeGroup.focus()}};L.ID="workbench.action.focusActiveEditorGroup",L.LABEL=(0,t.localize)(9,null),L=Ee([W(2,o.IEditorGroupsService)],L),e.FocusActiveGroupAction=L;let M=class extends f.Action{constructor(tt,nt,st,Tt){super(tt,nt);this.scope=st,this.editorGroupService=Tt}async run(){const tt=this.editorGroupService.findGroup(this.scope,this.editorGroupService.activeGroup,!0);tt&&tt.focus()}};M=Ee([W(3,o.IEditorGroupsService)],M);let N=class extends M{constructor(tt,nt,st){super(tt,nt,{location:0},st)}};N.ID="workbench.action.focusFirstEditorGroup",N.LABEL=(0,t.localize)(10,null),N=Ee([W(2,o.IEditorGroupsService)],N),e.FocusFirstGroupAction=N;let B=class extends M{constructor(tt,nt,st){super(tt,nt,{location:1},st)}};B.ID="workbench.action.focusLastEditorGroup",B.LABEL=(0,t.localize)(11,null),B=Ee([W(2,o.IEditorGroupsService)],B),e.FocusLastGroupAction=B;let P=class extends M{constructor(tt,nt,st){super(tt,nt,{location:2},st)}};P.ID="workbench.action.focusNextGroup",P.LABEL=(0,t.localize)(12,null),P=Ee([W(2,o.IEditorGroupsService)],P),e.FocusNextGroup=P;let V=class extends M{constructor(tt,nt,st){super(tt,nt,{location:3},st)}};V.ID="workbench.action.focusPreviousGroup",V.LABEL=(0,t.localize)(13,null),V=Ee([W(2,o.IEditorGroupsService)],V),e.FocusPreviousGroup=V;let z=class extends M{constructor(tt,nt,st){super(tt,nt,{direction:2},st)}};z.ID="workbench.action.focusLeftGroup",z.LABEL=(0,t.localize)(14,null),z=Ee([W(2,o.IEditorGroupsService)],z),e.FocusLeftGroup=z;let U=class extends M{constructor(tt,nt,st){super(tt,nt,{direction:3},st)}};U.ID="workbench.action.focusRightGroup",U.LABEL=(0,t.localize)(15,null),U=Ee([W(2,o.IEditorGroupsService)],U),e.FocusRightGroup=U;let H=class extends M{constructor(tt,nt,st){super(tt,nt,{direction:0},st)}};H.ID="workbench.action.focusAboveGroup",H.LABEL=(0,t.localize)(16,null),H=Ee([W(2,o.IEditorGroupsService)],H),e.FocusAboveGroup=H;let K=class extends M{constructor(tt,nt,st){super(tt,nt,{direction:1},st)}};K.ID="workbench.action.focusBelowGroup",K.LABEL=(0,t.localize)(17,null),K=Ee([W(2,o.IEditorGroupsService)],K),e.FocusBelowGroup=K;let G=class extends f.Action{constructor(tt,nt,st){super(tt,nt,u.Codicon.close.classNames);this.commandService=st}run(tt){return this.commandService.executeCommand(C.CLOSE_EDITOR_COMMAND_ID,void 0,tt)}};G.ID="workbench.action.closeActiveEditor",G.LABEL=(0,t.localize)(18,null),G=Ee([W(2,v.ICommandService)],G),e.CloseEditorAction=G;let q=class extends f.Action{constructor(tt,nt,st){super(tt,nt,u.Codicon.pinned.classNames);this.commandService=st}run(tt){return this.commandService.executeCommand(C.UNPIN_EDITOR_COMMAND_ID,void 0,tt)}};q.ID="workbench.action.unpinActiveEditor",q.LABEL=(0,t.localize)(19,null),q=Ee([W(2,v.ICommandService)],q),e.UnpinEditorAction=q;let Z=class extends f.Action{constructor(tt,nt,st){super(tt,nt,u.Codicon.close.classNames);this.editorGroupService=st}async run(tt){let nt,st;if(tt&&(nt=this.editorGroupService.getGroup(tt.groupId),nt&&(st=tt.editorIndex)),nt||(nt=this.editorGroupService.activeGroup),typeof st=="number"){const Tt=nt.getEditorByIndex(st);if(Tt){await nt.closeEditor(Tt,{preserveFocus:tt?.preserveFocus});return}}if(nt.activeEditor){await nt.closeEditor(nt.activeEditor,{preserveFocus:tt?.preserveFocus});return}}};Z.ID="workbench.action.closeActiveEditor",Z.LABEL=(0,t.localize)(20,null),Z=Ee([W(2,o.IEditorGroupsService)],Z),e.CloseOneEditorAction=Z;let j=class extends f.Action{constructor(tt,nt,st){super(tt,nt);this.editorService=st}async run(){const tt=this.editorService.activeEditorPane;if(tt){const nt=tt.input,st=tt.group;try{await this.editorService.revert({editor:nt,groupId:st.id})}catch{await this.editorService.revert({editor:nt,groupId:st.id},{soft:!0})}await st.closeEditor(nt)}}};j.ID="workbench.action.revertAndCloseActiveEditor",j.LABEL=(0,t.localize)(21,null),j=Ee([W(2,c.IEditorService)],j),e.RevertAndCloseEditorAction=j;let X=class extends f.Action{constructor(tt,nt,st){super(tt,nt);this.editorGroupService=st}async run(tt){const{group:nt,editor:st}=this.getTarget(tt);if(nt&&st)return nt.closeEditors({direction:0,except:st,excludeSticky:!0})}getTarget(tt){return tt?{editor:tt.editor,group:this.editorGroupService.getGroup(tt.groupId)}:{group:this.editorGroupService.activeGroup,editor:this.editorGroupService.activeGroup.activeEditor}}};X.ID="workbench.action.closeEditorsToTheLeft",X.LABEL=(0,t.localize)(22,null),X=Ee([W(2,o.IEditorGroupsService)],X),e.CloseLeftEditorsInGroupAction=X;class Y extends f.Action{constructor(tt,nt,st,Tt,Mt,zt,Qt){super(tt,nt,st);this.fileDialogService=Tt,this.editorGroupService=Mt,this.editorService=zt,this.filesConfigurationService=Qt}get groupsToClose(){const tt=[],nt=this.editorGroupService.getGroups(2);for(let st=nt.length-1;st>=0;st--)tt.push(nt[st]);return tt}async run(){const tt=new Set,nt=new Set,st=new Set,Tt=new Map;for(const{editor:Mt,groupId:zt}of this.editorService.getEditors(1,{excludeSticky:this.excludeSticky}))if(!(!Mt.isDirty()||Mt.isSaving()))if(typeof Mt.confirm=="function"){let Qt=Tt.get(Mt.typeId);Qt||(Qt=new Set,Tt.set(Mt.typeId,Qt)),Qt.add({editor:Mt,groupId:zt})}else this.filesConfigurationService.getAutoSaveMode()===3&&!Mt.hasCapability(4)?nt.add({editor:Mt,groupId:zt}):h.isNative&&(h.isWindows||h.isLinux)&&this.filesConfigurationService.getAutoSaveMode()===4&&!Mt.hasCapability(4)?st.add({editor:Mt,groupId:zt}):tt.add({editor:Mt,groupId:zt});if(tt.size>0){const Mt=Array.from(tt.values());switch(await this.revealDirtyEditors(Mt),await this.fileDialogService.showSaveConfirm(Mt.map(({editor:Qt})=>Qt instanceof k.SideBySideEditorInput?Qt.primary.getName():Qt.getName()))){case 2:return;case 1:await this.editorService.revert(Mt,{soft:!0});break;case 0:await this.editorService.save(Mt,{reason:1});break}}for(const[,Mt]of Tt){const zt=Array.from(Mt.values());await this.revealDirtyEditors(zt);const Qt=await(0,_.firstOrDefault)(zt)?.editor.confirm?.(zt);if(typeof Qt=="number")switch(Qt){case 2:return;case 1:await this.editorService.revert(zt,{soft:!0});break;case 0:await this.editorService.save(zt,{reason:1});break}}if(nt.size>0){const Mt=Array.from(nt.values());await this.editorService.save(Mt,{reason:3})}if(st.size>0){const Mt=Array.from(st.values());await this.editorService.save(Mt,{reason:4})}return this.doCloseAll()}async revealDirtyEditors(tt){try{const nt=new Set;for(const{editor:st,groupId:Tt}of tt){if(nt.has(Tt))continue;nt.add(Tt),await this.editorGroupService.getGroup(Tt)?.openEditor(st)}}catch{}}async doCloseAll(){await Promise.all(this.groupsToClose.map(tt=>tt.closeAllEditors({excludeSticky:this.excludeSticky})))}}let $=class extends Y{constructor(tt,nt,st,Tt,Mt,zt){super(tt,nt,u.Codicon.closeAll.classNames,st,Tt,Mt,zt)}get excludeSticky(){return!0}};$.ID="workbench.action.closeAllEditors",$.LABEL=(0,t.localize)(23,null),$=Ee([W(2,l.IFileDialogService),W(3,o.IEditorGroupsService),W(4,c.IEditorService),W(5,a.IFilesConfigurationService)],$),e.CloseAllEditorsAction=$;let J=class extends Y{constructor(tt,nt,st,Tt,Mt,zt){super(tt,nt,void 0,st,Tt,Mt,zt)}get excludeSticky(){return!1}async doCloseAll(){await super.doCloseAll();for(const tt of this.groupsToClose)this.editorGroupService.removeGroup(tt)}};J.ID="workbench.action.closeAllGroups",J.LABEL=(0,t.localize)(24,null),J=Ee([W(2,l.IFileDialogService),W(3,o.IEditorGroupsService),W(4,c.IEditorService),W(5,a.IFilesConfigurationService)],J),e.CloseAllEditorGroupsAction=J;let ee=class extends f.Action{constructor(tt,nt,st){super(tt,nt);this.editorGroupService=st}async run(tt){const nt=tt?this.editorGroupService.getGroup(tt.groupId):this.editorGroupService.activeGroup;await Promise.all(this.editorGroupService.getGroups(1).map(async st=>{if(!(nt&&st.id===nt.id))return st.closeAllEditors({excludeSticky:!0})}))}};ee.ID="workbench.action.closeEditorsInOtherGroups",ee.LABEL=(0,t.localize)(25,null),ee=Ee([W(2,o.IEditorGroupsService)],ee),e.CloseEditorsInOtherGroupsAction=ee;let te=class extends f.Action{constructor(tt,nt,st,Tt){super(tt,nt);this.editorGroupService=st,this.editorService=Tt}async run(){const tt=this.editorService.activeEditor;tt&&await Promise.all(this.editorGroupService.getGroups(1).map(nt=>nt.closeEditor(tt)))}};te.ID="workbench.action.closeEditorInAllGroups",te.LABEL=(0,t.localize)(26,null),te=Ee([W(2,o.IEditorGroupsService),W(3,c.IEditorService)],te),e.CloseEditorInAllGroupsAction=te;class se extends f.Action{constructor(tt,nt,st,Tt,Mt){super(tt,nt);this.direction=st,this.isMove=Tt,this.editorGroupService=Mt}async run(tt){let nt;if(tt&&typeof tt.groupId=="number"?nt=this.editorGroupService.getGroup(tt.groupId):nt=this.editorGroupService.activeGroup,nt){let st;if(this.isMove){const Tt=this.findTargetGroup(nt);Tt&&(st=this.editorGroupService.moveGroup(nt,Tt,this.direction))}else st=this.editorGroupService.copyGroup(nt,nt,this.direction);st&&this.editorGroupService.activateGroup(st)}}findTargetGroup(tt){const nt=[this.direction];switch(this.direction){case 2:case 3:nt.push(0,1);break;case 0:case 1:nt.push(2,3);break}for(const st of nt){const Tt=this.editorGroupService.findGroup({direction:st},tt);if(Tt)return Tt}}}class ie extends se{constructor(tt,nt,st,Tt){super(tt,nt,st,!0,Tt)}}let ce=class extends ie{constructor(tt,nt,st){super(tt,nt,2,st)}};ce.ID="workbench.action.moveActiveEditorGroupLeft",ce.LABEL=(0,t.localize)(27,null),ce=Ee([W(2,o.IEditorGroupsService)],ce),e.MoveGroupLeftAction=ce;let le=class extends ie{constructor(tt,nt,st){super(tt,nt,3,st)}};le.ID="workbench.action.moveActiveEditorGroupRight",le.LABEL=(0,t.localize)(28,null),le=Ee([W(2,o.IEditorGroupsService)],le),e.MoveGroupRightAction=le;let ae=class extends ie{constructor(tt,nt,st){super(tt,nt,0,st)}};ae.ID="workbench.action.moveActiveEditorGroupUp",ae.LABEL=(0,t.localize)(29,null),ae=Ee([W(2,o.IEditorGroupsService)],ae),e.MoveGroupUpAction=ae;let ue=class extends ie{constructor(tt,nt,st){super(tt,nt,1,st)}};ue.ID="workbench.action.moveActiveEditorGroupDown",ue.LABEL=(0,t.localize)(30,null),ue=Ee([W(2,o.IEditorGroupsService)],ue),e.MoveGroupDownAction=ue;class oe extends se{constructor(tt,nt,st,Tt){super(tt,nt,st,!1,Tt)}}let fe=class extends oe{constructor(tt,nt,st){super(tt,nt,2,st)}};fe.ID="workbench.action.duplicateActiveEditorGroupLeft",fe.LABEL=(0,t.localize)(31,null),fe=Ee([W(2,o.IEditorGroupsService)],fe),e.DuplicateGroupLeftAction=fe;let pe=class extends oe{constructor(tt,nt,st){super(tt,nt,3,st)}};pe.ID="workbench.action.duplicateActiveEditorGroupRight",pe.LABEL=(0,t.localize)(32,null),pe=Ee([W(2,o.IEditorGroupsService)],pe),e.DuplicateGroupRightAction=pe;let me=class extends oe{constructor(tt,nt,st){super(tt,nt,0,st)}};me.ID="workbench.action.duplicateActiveEditorGroupUp",me.LABEL=(0,t.localize)(33,null),me=Ee([W(2,o.IEditorGroupsService)],me),e.DuplicateGroupUpAction=me;let be=class extends oe{constructor(tt,nt,st){super(tt,nt,1,st)}};be.ID="workbench.action.duplicateActiveEditorGroupDown",be.LABEL=(0,t.localize)(34,null),be=Ee([W(2,o.IEditorGroupsService)],be),e.DuplicateGroupDownAction=be;let Ce=class extends f.Action{constructor(tt,nt,st){super(tt,nt);this.editorGroupService=st}async run(){this.editorGroupService.arrangeGroups(0)}};Ce.ID="workbench.action.minimizeOtherEditors",Ce.LABEL=(0,t.localize)(35,null),Ce=Ee([W(2,o.IEditorGroupsService)],Ce),e.MinimizeOtherGroupsAction=Ce;let ve=class extends f.Action{constructor(tt,nt,st){super(tt,nt);this.editorGroupService=st}async run(){this.editorGroupService.arrangeGroups(1)}};ve.ID="workbench.action.evenEditorWidths",ve.LABEL=(0,t.localize)(36,null),ve=Ee([W(2,o.IEditorGroupsService)],ve),e.ResetGroupSizesAction=ve;let he=class extends f.Action{constructor(tt,nt,st){super(tt,nt);this.editorGroupService=st}async run(){this.editorGroupService.arrangeGroups(2)}};he.ID="workbench.action.toggleEditorWidths",he.LABEL=(0,t.localize)(37,null),he=Ee([W(2,o.IEditorGroupsService)],he),e.ToggleGroupSizesAction=he;let ge=class extends f.Action{constructor(tt,nt,st,Tt,Mt){super(tt,nt);this.editorService=st,this.editorGroupService=Tt,this.layoutService=Mt}async run(){this.editorService.activeEditor&&(this.layoutService.setPartHidden(!0,"workbench.parts.sidebar"),this.layoutService.setPartHidden(!0,"workbench.parts.auxiliarybar"),this.editorGroupService.arrangeGroups(0))}};ge.ID="workbench.action.maximizeEditor",ge.LABEL=(0,t.localize)(38,null),ge=Ee([W(2,c.IEditorService),W(3,o.IEditorGroupsService),W(4,D.IWorkbenchLayoutService)],ge),e.MaximizeGroupAction=ge;class de extends f.Action{constructor(tt,nt,st,Tt){super(tt,nt);this.editorGroupService=st,this.editorService=Tt}async run(){const tt=this.navigate();if(!tt)return;const{groupId:nt,editor:st}=tt;if(!st)return;const Tt=this.editorGroupService.getGroup(nt);Tt&&await Tt.openEditor(st)}}let Se=class extends de{constructor(tt,nt,st,Tt){super(tt,nt,st,Tt)}navigate(){const tt=this.editorGroupService.activeGroup,nt=tt.getEditors(1),st=tt.activeEditor?nt.indexOf(tt.activeEditor):-1;if(st+1<nt.length)return{editor:nt[st+1],groupId:tt.id};const Tt=this.editorGroupService.findGroup({location:2},this.editorGroupService.activeGroup,!0);if(Tt)return{editor:Tt.getEditors(1)[0],groupId:Tt.id}}};Se.ID="workbench.action.nextEditor",Se.LABEL=(0,t.localize)(39,null),Se=Ee([W(2,o.IEditorGroupsService),W(3,c.IEditorService)],Se),e.OpenNextEditor=Se;let we=class extends de{constructor(tt,nt,st,Tt){super(tt,nt,st,Tt)}navigate(){const tt=this.editorGroupService.activeGroup,nt=tt.getEditors(1),st=tt.activeEditor?nt.indexOf(tt.activeEditor):-1;if(st>0)return{editor:nt[st-1],groupId:tt.id};const Tt=this.editorGroupService.findGroup({location:3},this.editorGroupService.activeGroup,!0);if(Tt){const Mt=Tt.getEditors(1);return{editor:Mt[Mt.length-1],groupId:Tt.id}}}};we.ID="workbench.action.previousEditor",we.LABEL=(0,t.localize)(40,null),we=Ee([W(2,o.IEditorGroupsService),W(3,c.IEditorService)],we),e.OpenPreviousEditor=we;let ye=class extends de{constructor(tt,nt,st,Tt){super(tt,nt,st,Tt)}navigate(){const tt=this.editorGroupService.activeGroup,nt=tt.getEditors(1),st=tt.activeEditor?nt.indexOf(tt.activeEditor):-1;return{editor:st+1<nt.length?nt[st+1]:nt[0],groupId:tt.id}}};ye.ID="workbench.action.nextEditorInGroup",ye.LABEL=(0,t.localize)(41,null),ye=Ee([W(2,o.IEditorGroupsService),W(3,c.IEditorService)],ye),e.OpenNextEditorInGroup=ye;let ke=class extends de{constructor(tt,nt,st,Tt){super(tt,nt,st,Tt)}navigate(){const tt=this.editorGroupService.activeGroup,nt=tt.getEditors(1),st=tt.activeEditor?nt.indexOf(tt.activeEditor):-1;return{editor:st>0?nt[st-1]:nt[nt.length-1],groupId:tt.id}}};ke.ID="workbench.action.previousEditorInGroup",ke.LABEL=(0,t.localize)(42,null),ke=Ee([W(2,o.IEditorGroupsService),W(3,c.IEditorService)],ke),e.OpenPreviousEditorInGroup=ke;let Ie=class extends de{constructor(tt,nt,st,Tt){super(tt,nt,st,Tt)}navigate(){const tt=this.editorGroupService.activeGroup;return{editor:tt.getEditors(1)[0],groupId:tt.id}}};Ie.ID="workbench.action.firstEditorInGroup",Ie.LABEL=(0,t.localize)(43,null),Ie=Ee([W(2,o.IEditorGroupsService),W(3,c.IEditorService)],Ie),e.OpenFirstEditorInGroup=Ie;let Te=class extends de{constructor(tt,nt,st,Tt){super(tt,nt,st,Tt)}navigate(){const tt=this.editorGroupService.activeGroup,nt=tt.getEditors(1);return{editor:nt[nt.length-1],groupId:tt.id}}};Te.ID="workbench.action.lastEditorInGroup",Te.LABEL=(0,t.localize)(44,null),Te=Ee([W(2,o.IEditorGroupsService),W(3,c.IEditorService)],Te),e.OpenLastEditorInGroup=Te;let De=class extends f.Action{constructor(tt,nt,st){super(tt,nt);this.historyService=st}async run(){await this.historyService.goForward(0)}};De.ID="workbench.action.navigateForward",De.LABEL=(0,t.localize)(45,null),De=Ee([W(2,I.IHistoryService)],De),e.NavigateForwardAction=De;let _e=class extends f.Action{constructor(tt,nt,st){super(tt,nt);this.historyService=st}async run(){await this.historyService.goBack(0)}};_e.ID="workbench.action.navigateBack",_e.LABEL=(0,t.localize)(46,null),_e=Ee([W(2,I.IHistoryService)],_e),e.NavigateBackwardsAction=_e;let Re=class extends f.Action{constructor(tt,nt,st){super(tt,nt);this.historyService=st}async run(){await this.historyService.goPrevious(0)}};Re.ID="workbench.action.navigateLast",Re.LABEL=(0,t.localize)(47,null),Re=Ee([W(2,I.IHistoryService)],Re),e.NavigatePreviousAction=Re;let Ne=class extends f.Action{constructor(tt,nt,st){super(tt,nt);this.historyService=st}async run(){await this.historyService.goForward(1)}};Ne.ID="workbench.action.navigateForwardInEditLocations",Ne.LABEL=(0,t.localize)(48,null),Ne=Ee([W(2,I.IHistoryService)],Ne),e.NavigateForwardInEditsAction=Ne;let xe=class extends f.Action{constructor(tt,nt,st){super(tt,nt);this.historyService=st}async run(){await this.historyService.goBack(1)}};xe.ID="workbench.action.navigateBackInEditLocations",xe.LABEL=(0,t.localize)(49,null),xe=Ee([W(2,I.IHistoryService)],xe),e.NavigateBackwardsInEditsAction=xe;let Ae=class extends f.Action{constructor(tt,nt,st){super(tt,nt);this.historyService=st}async run(){await this.historyService.goPrevious(1)}};Ae.ID="workbench.action.navigatePreviousInEditLocations",Ae.LABEL=(0,t.localize)(50,null),Ae=Ee([W(2,I.IHistoryService)],Ae),e.NavigatePreviousInEditsAction=Ae;let Le=class extends f.Action{constructor(tt,nt,st){super(tt,nt);this.historyService=st}async run(){await this.historyService.goLast(1)}};Le.ID="workbench.action.navigateToLastEditLocation",Le.LABEL=(0,t.localize)(51,null),Le=Ee([W(2,I.IHistoryService)],Le),e.NavigateToLastEditLocationAction=Le;let Me=class extends f.Action{constructor(tt,nt,st){super(tt,nt);this.historyService=st}async run(){await this.historyService.goForward(2)}};Me.ID="workbench.action.navigateForwardInNavigationLocations",Me.LABEL=(0,t.localize)(52,null),Me=Ee([W(2,I.IHistoryService)],Me),e.NavigateForwardInNavigationsAction=Me;let We=class extends f.Action{constructor(tt,nt,st){super(tt,nt);this.historyService=st}async run(){await this.historyService.goBack(2)}};We.ID="workbench.action.navigateBackInNavigationLocations",We.LABEL=(0,t.localize)(53,null),We=Ee([W(2,I.IHistoryService)],We),e.NavigateBackwardsInNavigationsAction=We;let Ve=class extends f.Action{constructor(tt,nt,st){super(tt,nt);this.historyService=st}async run(){await this.historyService.goPrevious(2)}};Ve.ID="workbench.action.navigatePreviousInNavigationLocations",Ve.LABEL=(0,t.localize)(54,null),Ve=Ee([W(2,I.IHistoryService)],Ve),e.NavigatePreviousInNavigationsAction=Ve;let Ue=class extends f.Action{constructor(tt,nt,st){super(tt,nt);this.historyService=st}async run(){await this.historyService.goLast(2)}};Ue.ID="workbench.action.navigateToLastNavigationLocation",Ue.LABEL=(0,t.localize)(55,null),Ue=Ee([W(2,I.IHistoryService)],Ue),e.NavigateToLastNavigationLocationAction=Ue;let et=class extends f.Action{constructor(tt,nt,st){super(tt,nt);this.historyService=st}async run(){await this.historyService.reopenLastClosedEditor()}};et.ID="workbench.action.reopenClosedEditor",et.LABEL=(0,t.localize)(56,null),et=Ee([W(2,I.IHistoryService)],et),e.ReopenClosedEditorAction=et;let Ze=class extends f.Action{constructor(tt,nt,st,Tt){super(tt,nt);this.workspacesService=st,this.historyService=Tt}async run(){this.workspacesService.clearRecentlyOpened(),this.historyService.clearRecentlyOpened()}};Ze.ID="workbench.action.clearRecentFiles",Ze.LABEL=(0,t.localize)(57,null),Ze=Ee([W(2,s.IWorkspacesService),W(3,I.IHistoryService)],Ze),e.ClearRecentFilesAction=Ze;let Fe=class extends f.Action{constructor(tt,nt,st){super(tt,nt);this.quickInputService=st}async run(){this.quickInputService.quickAccess.show(p.ActiveGroupEditorsByMostRecentlyUsedQuickAccess.PREFIX)}};Fe.ID="workbench.action.showEditorsInActiveGroup",Fe.LABEL=(0,t.localize)(58,null),Fe=Ee([W(2,r.IQuickInputService)],Fe),e.ShowEditorsInActiveGroupByMostRecentlyUsedAction=Fe;let Qe=class extends f.Action{constructor(tt,nt,st){super(tt,nt);this.quickInputService=st}async run(){this.quickInputService.quickAccess.show(p.AllEditorsByAppearanceQuickAccess.PREFIX)}};Qe.ID="workbench.action.showAllEditors",Qe.LABEL=(0,t.localize)(59,null),Qe=Ee([W(2,r.IQuickInputService)],Qe),e.ShowAllEditorsByAppearanceAction=Qe;let qe=class extends f.Action{constructor(tt,nt,st){super(tt,nt);this.quickInputService=st}async run(){this.quickInputService.quickAccess.show(p.AllEditorsByMostRecentlyUsedQuickAccess.PREFIX)}};qe.ID="workbench.action.showAllEditorsByMostRecentlyUsed",qe.LABEL=(0,t.localize)(60,null),qe=Ee([W(2,r.IQuickInputService)],qe),e.ShowAllEditorsByMostRecentlyUsedAction=qe;let Be=class extends f.Action{constructor(tt,nt,st,Tt,Mt,zt){super(tt,nt);this.prefix=st,this.itemActivation=Tt,this.quickInputService=Mt,this.keybindingService=zt}async run(){const tt=this.keybindingService.lookupKeybindings(this.id);this.quickInputService.quickAccess.show(this.prefix,{quickNavigateConfiguration:{keybindings:tt},itemActivation:this.itemActivation})}};Be=Ee([W(4,r.IQuickInputService),W(5,w.IKeybindingService)],Be);let Ke=class extends Be{constructor(tt,nt,st,Tt){super(tt,nt,p.AllEditorsByMostRecentlyUsedQuickAccess.PREFIX,void 0,st,Tt)}};Ke.ID="workbench.action.quickOpenPreviousRecentlyUsedEditor",Ke.LABEL=(0,t.localize)(61,null),Ke=Ee([W(2,r.IQuickInputService),W(3,w.IKeybindingService)],Ke),e.QuickAccessPreviousRecentlyUsedEditorAction=Ke;let Xe=class extends Be{constructor(tt,nt,st,Tt){super(tt,nt,p.AllEditorsByMostRecentlyUsedQuickAccess.PREFIX,void 0,st,Tt)}};Xe.ID="workbench.action.quickOpenLeastRecentlyUsedEditor",Xe.LABEL=(0,t.localize)(62,null),Xe=Ee([W(2,r.IQuickInputService),W(3,w.IKeybindingService)],Xe),e.QuickAccessLeastRecentlyUsedEditorAction=Xe;let rt=class extends Be{constructor(tt,nt,st,Tt){super(tt,nt,p.ActiveGroupEditorsByMostRecentlyUsedQuickAccess.PREFIX,void 0,st,Tt)}};rt.ID="workbench.action.quickOpenPreviousRecentlyUsedEditorInGroup",rt.LABEL=(0,t.localize)(63,null),rt=Ee([W(2,r.IQuickInputService),W(3,w.IKeybindingService)],rt),e.QuickAccessPreviousRecentlyUsedEditorInGroupAction=rt;let it=class extends Be{constructor(tt,nt,st,Tt){super(tt,nt,p.ActiveGroupEditorsByMostRecentlyUsedQuickAccess.PREFIX,r.ItemActivation.LAST,st,Tt)}};it.ID="workbench.action.quickOpenLeastRecentlyUsedEditorInGroup",it.LABEL=(0,t.localize)(64,null),it=Ee([W(2,r.IQuickInputService),W(3,w.IKeybindingService)],it),e.QuickAccessLeastRecentlyUsedEditorInGroupAction=it;let at=class extends f.Action{constructor(tt,nt,st,Tt,Mt){super(tt,nt);this.quickInputService=st,this.keybindingService=Tt,this.editorGroupService=Mt}async run(){const tt=this.keybindingService.lookupKeybindings(this.id);let nt;this.editorGroupService.activeGroup.count===0&&(nt=r.ItemActivation.FIRST),this.quickInputService.quickAccess.show("",{quickNavigateConfiguration:{keybindings:tt},itemActivation:nt})}};at.ID="workbench.action.openPreviousEditorFromHistory",at.LABEL=(0,t.localize)(65,null),at=Ee([W(2,r.IQuickInputService),W(3,w.IKeybindingService),W(4,o.IEditorGroupsService)],at),e.QuickAccessPreviousEditorFromHistoryAction=at;let ft=class extends f.Action{constructor(tt,nt,st){super(tt,nt);this.historyService=st}async run(){this.historyService.openNextRecentlyUsedEditor()}};ft.ID="workbench.action.openNextRecentlyUsedEditor",ft.LABEL=(0,t.localize)(66,null),ft=Ee([W(2,I.IHistoryService)],ft),e.OpenNextRecentlyUsedEditorAction=ft;let vt=class extends f.Action{constructor(tt,nt,st){super(tt,nt);this.historyService=st}async run(){this.historyService.openPreviouslyUsedEditor()}};vt.ID="workbench.action.openPreviousRecentlyUsedEditor",vt.LABEL=(0,t.localize)(67,null),vt=Ee([W(2,I.IHistoryService)],vt),e.OpenPreviousRecentlyUsedEditorAction=vt;let Dt=class extends f.Action{constructor(tt,nt,st,Tt){super(tt,nt);this.historyService=st,this.editorGroupsService=Tt}async run(){this.historyService.openNextRecentlyUsedEditor(this.editorGroupsService.activeGroup.id)}};Dt.ID="workbench.action.openNextRecentlyUsedEditorInGroup",Dt.LABEL=(0,t.localize)(68,null),Dt=Ee([W(2,I.IHistoryService),W(3,o.IEditorGroupsService)],Dt),e.OpenNextRecentlyUsedEditorInGroupAction=Dt;let kt=class extends f.Action{constructor(tt,nt,st,Tt){super(tt,nt);this.historyService=st,this.editorGroupsService=Tt}async run(){this.historyService.openPreviouslyUsedEditor(this.editorGroupsService.activeGroup.id)}};kt.ID="workbench.action.openPreviousRecentlyUsedEditorInGroup",kt.LABEL=(0,t.localize)(69,null),kt=Ee([W(2,I.IHistoryService),W(3,o.IEditorGroupsService)],kt),e.OpenPreviousRecentlyUsedEditorInGroupAction=kt;let At=class extends f.Action{constructor(tt,nt,st){super(tt,nt);this.historyService=st}async run(){this.historyService.clear()}};At.ID="workbench.action.clearEditorHistory",At.LABEL=(0,t.localize)(70,null),At=Ee([W(2,I.IHistoryService)],At),e.ClearEditorHistoryAction=At;let St=class extends g{constructor(tt,nt,st){super(tt,nt,C.MOVE_ACTIVE_EDITOR_COMMAND_ID,st,{to:"left"})}};St.ID="workbench.action.moveEditorLeftInGroup",St.LABEL=(0,t.localize)(71,null),St=Ee([W(2,v.ICommandService)],St),e.MoveEditorLeftInGroupAction=St;let He=class extends g{constructor(tt,nt,st){super(tt,nt,C.MOVE_ACTIVE_EDITOR_COMMAND_ID,st,{to:"right"})}};He.ID="workbench.action.moveEditorRightInGroup",He.LABEL=(0,t.localize)(72,null),He=Ee([W(2,v.ICommandService)],He),e.MoveEditorRightInGroupAction=He;let ct=class extends g{constructor(tt,nt,st){super(tt,nt,C.MOVE_ACTIVE_EDITOR_COMMAND_ID,st,{to:"previous",by:"group"})}};ct.ID="workbench.action.moveEditorToPreviousGroup",ct.LABEL=(0,t.localize)(73,null),ct=Ee([W(2,v.ICommandService)],ct),e.MoveEditorToPreviousGroupAction=ct;let lt=class extends g{constructor(tt,nt,st){super(tt,nt,C.MOVE_ACTIVE_EDITOR_COMMAND_ID,st,{to:"next",by:"group"})}};lt.ID="workbench.action.moveEditorToNextGroup",lt.LABEL=(0,t.localize)(74,null),lt=Ee([W(2,v.ICommandService)],lt),e.MoveEditorToNextGroupAction=lt;let ut=class extends g{constructor(tt,nt,st){super(tt,nt,C.MOVE_ACTIVE_EDITOR_COMMAND_ID,st,{to:"up",by:"group"})}};ut.ID="workbench.action.moveEditorToAboveGroup",ut.LABEL=(0,t.localize)(75,null),ut=Ee([W(2,v.ICommandService)],ut),e.MoveEditorToAboveGroupAction=ut;let pt=class extends g{constructor(tt,nt,st){super(tt,nt,C.MOVE_ACTIVE_EDITOR_COMMAND_ID,st,{to:"down",by:"group"})}};pt.ID="workbench.action.moveEditorToBelowGroup",pt.LABEL=(0,t.localize)(76,null),pt=Ee([W(2,v.ICommandService)],pt),e.MoveEditorToBelowGroupAction=pt;let Et=class extends g{constructor(tt,nt,st){super(tt,nt,C.MOVE_ACTIVE_EDITOR_COMMAND_ID,st,{to:"left",by:"group"})}};Et.ID="workbench.action.moveEditorToLeftGroup",Et.LABEL=(0,t.localize)(77,null),Et=Ee([W(2,v.ICommandService)],Et),e.MoveEditorToLeftGroupAction=Et;let yt=class extends g{constructor(tt,nt,st){super(tt,nt,C.MOVE_ACTIVE_EDITOR_COMMAND_ID,st,{to:"right",by:"group"})}};yt.ID="workbench.action.moveEditorToRightGroup",yt.LABEL=(0,t.localize)(78,null),yt=Ee([W(2,v.ICommandService)],yt),e.MoveEditorToRightGroupAction=yt;let mt=class extends g{constructor(tt,nt,st){super(tt,nt,C.MOVE_ACTIVE_EDITOR_COMMAND_ID,st,{to:"first",by:"group"})}};mt.ID="workbench.action.moveEditorToFirstGroup",mt.LABEL=(0,t.localize)(79,null),mt=Ee([W(2,v.ICommandService)],mt),e.MoveEditorToFirstGroupAction=mt;let It=class extends g{constructor(tt,nt,st){super(tt,nt,C.MOVE_ACTIVE_EDITOR_COMMAND_ID,st,{to:"last",by:"group"})}};It.ID="workbench.action.moveEditorToLastGroup",It.LABEL=(0,t.localize)(80,null),It=Ee([W(2,v.ICommandService)],It),e.MoveEditorToLastGroupAction=It;let Rt=class extends g{constructor(tt,nt,st){super(tt,nt,C.COPY_ACTIVE_EDITOR_COMMAND_ID,st,{to:"previous",by:"group"})}};Rt.ID="workbench.action.splitEditorToPreviousGroup",Rt.LABEL=(0,t.localize)(81,null),Rt=Ee([W(2,v.ICommandService)],Rt),e.SplitEditorToPreviousGroupAction=Rt;let $e=class extends g{constructor(tt,nt,st){super(tt,nt,C.COPY_ACTIVE_EDITOR_COMMAND_ID,st,{to:"next",by:"group"})}};$e.ID="workbench.action.splitEditorToNextGroup",$e.LABEL=(0,t.localize)(82,null),$e=Ee([W(2,v.ICommandService)],$e),e.SplitEditorToNextGroupAction=$e;let Pe=class extends g{constructor(tt,nt,st){super(tt,nt,C.COPY_ACTIVE_EDITOR_COMMAND_ID,st,{to:"up",by:"group"})}};Pe.ID="workbench.action.splitEditorToAboveGroup",Pe.LABEL=(0,t.localize)(83,null),Pe=Ee([W(2,v.ICommandService)],Pe),e.SplitEditorToAboveGroupAction=Pe;let Ge=class extends g{constructor(tt,nt,st){super(tt,nt,C.COPY_ACTIVE_EDITOR_COMMAND_ID,st,{to:"down",by:"group"})}};Ge.ID="workbench.action.splitEditorToBelowGroup",Ge.LABEL=(0,t.localize)(84,null),Ge=Ee([W(2,v.ICommandService)],Ge),e.SplitEditorToBelowGroupAction=Ge;let Ye=class extends g{constructor(tt,nt,st){super(tt,nt,C.COPY_ACTIVE_EDITOR_COMMAND_ID,st,{to:"left",by:"group"})}};Ye.ID="workbench.action.splitEditorToLeftGroup",Ye.LABEL=(0,t.localize)(85,null),Ye=Ee([W(2,v.ICommandService)],Ye),e.SplitEditorToLeftGroupAction=Ye;let je=class extends g{constructor(tt,nt,st){super(tt,nt,C.COPY_ACTIVE_EDITOR_COMMAND_ID,st,{to:"right",by:"group"})}};je.ID="workbench.action.splitEditorToRightGroup",je.LABEL=(0,t.localize)(86,null),je=Ee([W(2,v.ICommandService)],je),e.SplitEditorToRightGroupAction=je;let Oe=class extends g{constructor(tt,nt,st){super(tt,nt,C.COPY_ACTIVE_EDITOR_COMMAND_ID,st,{to:"first",by:"group"})}};Oe.ID="workbench.action.splitEditorToFirstGroup",Oe.LABEL=(0,t.localize)(87,null),Oe=Ee([W(2,v.ICommandService)],Oe),e.SplitEditorToFirstGroupAction=Oe;let ze=class extends g{constructor(tt,nt,st){super(tt,nt,C.COPY_ACTIVE_EDITOR_COMMAND_ID,st,{to:"last",by:"group"})}};ze.ID="workbench.action.splitEditorToLastGroup",ze.LABEL=(0,t.localize)(88,null),ze=Ee([W(2,v.ICommandService)],ze),e.SplitEditorToLastGroupAction=ze;let Je=class extends g{constructor(tt,nt,st){super(tt,nt,C.LAYOUT_EDITOR_GROUPS_COMMAND_ID,st,{groups:[{}]})}};Je.ID="workbench.action.editorLayoutSingle",Je.LABEL=(0,t.localize)(89,null),Je=Ee([W(2,v.ICommandService)],Je),e.EditorLayoutSingleAction=Je;let ot=class extends g{constructor(tt,nt,st){super(tt,nt,C.LAYOUT_EDITOR_GROUPS_COMMAND_ID,st,{groups:[{},{}],orientation:0})}};ot.ID="workbench.action.editorLayoutTwoColumns",ot.LABEL=(0,t.localize)(90,null),ot=Ee([W(2,v.ICommandService)],ot),e.EditorLayoutTwoColumnsAction=ot;let ht=class extends g{constructor(tt,nt,st){super(tt,nt,C.LAYOUT_EDITOR_GROUPS_COMMAND_ID,st,{groups:[{},{},{}],orientation:0})}};ht.ID="workbench.action.editorLayoutThreeColumns",ht.LABEL=(0,t.localize)(91,null),ht=Ee([W(2,v.ICommandService)],ht),e.EditorLayoutThreeColumnsAction=ht;let gt=class extends g{constructor(tt,nt,st){super(tt,nt,C.LAYOUT_EDITOR_GROUPS_COMMAND_ID,st,{groups:[{},{}],orientation:1})}};gt.ID="workbench.action.editorLayoutTwoRows",gt.LABEL=(0,t.localize)(92,null),gt=Ee([W(2,v.ICommandService)],gt),e.EditorLayoutTwoRowsAction=gt;let bt=class extends g{constructor(tt,nt,st){super(tt,nt,C.LAYOUT_EDITOR_GROUPS_COMMAND_ID,st,{groups:[{},{},{}],orientation:1})}};bt.ID="workbench.action.editorLayoutThreeRows",bt.LABEL=(0,t.localize)(93,null),bt=Ee([W(2,v.ICommandService)],bt),e.EditorLayoutThreeRowsAction=bt;let Ct=class extends g{constructor(tt,nt,st){super(tt,nt,C.LAYOUT_EDITOR_GROUPS_COMMAND_ID,st,{groups:[{groups:[{},{}]},{groups:[{},{}]}]})}};Ct.ID="workbench.action.editorLayoutTwoByTwoGrid",Ct.LABEL=(0,t.localize)(94,null),Ct=Ee([W(2,v.ICommandService)],Ct),e.EditorLayoutTwoByTwoGridAction=Ct;let _t=class extends g{constructor(tt,nt,st){super(tt,nt,C.LAYOUT_EDITOR_GROUPS_COMMAND_ID,st,{groups:[{},{groups:[{},{}]}],orientation:1})}};_t.ID="workbench.action.editorLayoutTwoColumnsBottom",_t.LABEL=(0,t.localize)(95,null),_t=Ee([W(2,v.ICommandService)],_t),e.EditorLayoutTwoColumnsBottomAction=_t;let Lt=class extends g{constructor(tt,nt,st){super(tt,nt,C.LAYOUT_EDITOR_GROUPS_COMMAND_ID,st,{groups:[{},{groups:[{},{}]}],orientation:0})}};Lt.ID="workbench.action.editorLayoutTwoRowsRight",Lt.LABEL=(0,t.localize)(96,null),Lt=Ee([W(2,v.ICommandService)],Lt),e.EditorLayoutTwoRowsRightAction=Lt;class Pt extends f.Action{constructor(tt,nt,st,Tt){super(tt,nt);this.direction=st,this.editorGroupService=Tt}async run(){this.editorGroupService.addGroup(this.editorGroupService.activeGroup,this.direction,{activate:!0})}}let Nt=class extends Pt{constructor(tt,nt,st){super(tt,nt,2,st)}};Nt.ID="workbench.action.newGroupLeft",Nt.LABEL=(0,t.localize)(97,null),Nt=Ee([W(2,o.IEditorGroupsService)],Nt),e.NewEditorGroupLeftAction=Nt;let Ft=class extends Pt{constructor(tt,nt,st){super(tt,nt,3,st)}};Ft.ID="workbench.action.newGroupRight",Ft.LABEL=(0,t.localize)(98,null),Ft=Ee([W(2,o.IEditorGroupsService)],Ft),e.NewEditorGroupRightAction=Ft;let Bt=class extends Pt{constructor(tt,nt,st){super(tt,nt,0,st)}};Bt.ID="workbench.action.newGroupAbove",Bt.LABEL=(0,t.localize)(99,null),Bt=Ee([W(2,o.IEditorGroupsService)],Bt),e.NewEditorGroupAboveAction=Bt;let Yt=class extends Pt{constructor(tt,nt,st){super(tt,nt,1,st)}};Yt.ID="workbench.action.newGroupBelow",Yt.LABEL=(0,t.localize)(100,null),Yt=Ee([W(2,o.IEditorGroupsService)],Yt),e.NewEditorGroupBelowAction=Yt;let Kt=class extends f.Action{constructor(tt,nt,st,Tt){super(tt,nt);this.editorService=st,this.editorResolverService=Tt}async run(){const tt=this.editorService.activeEditorPane;if(!tt)return;const nt=A.EditorResourceAccessor.getCanonicalUri(tt.input);if(!nt)return;const st=this.editorResolverService.getEditors(nt).map(Tt=>Tt.id).filter(Tt=>Tt!==tt.input.editorId);st.length!==0&&await this.editorService.replaceEditors([{editor:tt.input,replacement:{resource:nt,options:{override:st[0]}}}],tt.group)}};Kt.ID="workbench.action.toggleEditorType",Kt.LABEL=(0,t.localize)(101,null),Kt=Ee([W(2,c.IEditorService),W(3,n.IEditorResolverService)],Kt),e.ToggleEditorTypeAction=Kt;let Gt=class extends f.Action{constructor(tt,nt,st){super(tt,nt);this.editorService=st}async run(){const tt=this.editorService.activeEditorPane;if(!tt)return;const nt=A.EditorResourceAccessor.getCanonicalUri(tt.input);!nt||await this.editorService.replaceEditors([{editor:tt.input,replacement:{resource:nt,options:{override:A.DEFAULT_EDITOR_ASSOCIATION.id}}}],tt.group)}};Gt.ID="workbench.action.reopenTextEditor",Gt.LABEL=(0,t.localize)(102,null),Gt=Ee([W(2,c.IEditorService)],Gt),e.ReOpenInTextEditorAction=Gt}),define(ne[636],re([1,0,1407,13,106,44,409,256,369,372,436,27,24,113,5,12,59,21,52,42,126]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextResourceEditor=e.AbstractTextResourceEditor=void 0;let a=class extends v.BaseTextEditor{constructor(g,d,m,b,E,y,T,R){super(g,d,m,b,E,y,R,T)}getTitle(){return this.input?this.input.getName():(0,t.localize)(0,null)}async setInput(g,d,m,b){await super.setInput(g,d,m,b);const E=await g.resolve();if(b.isCancellationRequested)return;if(!(E instanceof I.BaseTextEditorModel))throw new Error("Unable to open file as text");const y=(0,f.assertIsDefined)(this.getControl()),T=E.textEditorModel;if(y.setModel(T),!(0,A.isTextEditorViewState)(d?.viewState)){const R=this.loadEditorViewState(g,m);R&&(d?.selection&&(R.cursorState=[]),y.restoreViewState(R))}d&&(0,k.applyTextEditorOptions)(d,y,1),y.updateOptions({readOnly:E.isReadonly()})}revealLastLine(){const g=this.getControl(),d=g.getModel();if(d){const m=d.getLineCount();g.revealPosition({lineNumber:m,column:d.getLineMaxColumn(m)},0)}}clearInput(){super.clearInput();const g=this.getControl();g&&g.setModel(null)}tracksEditorViewState(g){return g instanceof w.UntitledTextEditorInput||g instanceof D.TextResourceEditorInput}};a=Ee([W(1,C.ITelemetryService),W(2,i.IInstantiationService),W(3,o.IStorageService),W(4,c.ITextResourceConfigurationService),W(5,S.IThemeService),W(6,s.IEditorGroupsService),W(7,l.IEditorService)],a),e.AbstractTextResourceEditor=a;let n=class Ga extends a{constructor(g,d,m,b,E,y,T,R,O){super(Ga.ID,g,d,m,b,E,T,y);this.modelService=R,this.languageService=O}createEditorControl(g,d){const m=super.createEditorControl(g,d),b=(0,_.getCodeEditor)(m);return b&&this._register(b.onDidPaste(E=>this.onDidEditorPaste(E,b))),m}onDidEditorPaste(g,d){if(this.input instanceof w.UntitledTextEditorInput&&this.input.model.hasLanguageSetExplicitly||g.range.startLineNumber!==1||g.range.startColumn!==1||d.getOption(81))return;const m=d.getModel();if(!m||!(m.getLineCount()===g.range.endLineNumber&&m.getLineMaxColumn(g.range.endLineNumber)===g.range.endColumn)||m.getLanguageId()!==u.PLAINTEXT_LANGUAGE_ID)return;let y;if(g.languageId)y={id:g.languageId,source:"event"};else{const T=(0,f.withNullAsUndefined)(this.languageService.guessLanguageIdByFilepathOrFirstLine(m.uri,m.getLineContent(1).substr(0,1e3)));T&&(y={id:T,source:"guess"})}y&&y.id!==u.PLAINTEXT_LANGUAGE_ID&&(this.input instanceof w.UntitledTextEditorInput&&y.source==="event"?this.input.model.setLanguageId(y.id):this.modelService.setMode(m,this.languageService.createById(y.id)))}};n.ID="workbench.editors.textResourceEditor",n=Ee([W(0,C.ITelemetryService),W(1,i.IInstantiationService),W(2,o.IStorageService),W(3,c.ITextResourceConfigurationService),W(4,S.IThemeService),W(5,l.IEditorService),W(6,s.IEditorGroupsService),W(7,r.IModelService),W(8,p.ILanguageService)],n),e.TextResourceEditor=n}),define(ne[2689],re([1,0,1576,13,101,36,148,83,436,44,409,566,432,23,27,34,24,113,5,12,21,59,132,56,220,2,88,8]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextFileEditor=void 0;let E=class $a extends I.BaseTextEditor{constructor(T,R,O,x,F,L,M,N,B,P,V,z,U,H,K){super($a.ID,T,x,L,M,B,N,P);this.fileService=R,this.paneCompositeService=O,this.contextService=F,this.textFileService=V,this.explorerService=z,this.uriIdentityService=U,this.pathService=H,this.configurationService=K,this.inputListener=this._register(new d.MutableDisposable),this._register(this.fileService.onDidFilesChange(G=>this.onDidFilesChange(G))),this._register(this.fileService.onDidRunOperation(G=>this.onDidRunOperation(G))),this._register(this.fileService.onDidChangeFileSystemProviderCapabilities(G=>this.onDidChangeFileSystemProvider(G.scheme))),this._register(this.fileService.onDidChangeFileSystemProviderRegistrations(G=>this.onDidChangeFileSystemProvider(G.scheme)))}onDidFilesChange(T){for(const R of T.rawDeleted)this.clearEditorViewState(R)}onDidRunOperation(T){T.operation===2&&T.target&&this.moveEditorViewState(T.resource,T.target.resource,this.uriIdentityService.extUri)}onDidChangeFileSystemProvider(T){this.input?.resource.scheme===T&&this.updateReadonly(this.input)}onDidChangeInputCapabilities(T){this.input===T&&this.updateReadonly(T)}updateReadonly(T){const R=this.getControl();R&&R.updateOptions({readOnly:T.hasCapability(2)})}getTitle(){return this.input?this.input.getName():(0,t.localize)(0,null)}get input(){return this._input}async setInput(T,R,O,x){this.inputListener.value=T.onDidChangeCapabilities(()=>this.onDidChangeInputCapabilities(T)),await super.setInput(T,R,O,x);try{const F=await T.resolve();if(x.isCancellationRequested)return;if(F instanceof C.BinaryEditorModel)return this.openAsBinary(T,R);const L=F,M=(0,f.assertIsDefined)(this.getControl());if(M.setModel(L.textEditorModel),!(0,w.isTextEditorViewState)(R?.viewState)){const N=this.loadEditorViewState(T,O);N&&(R?.selection&&(N.cursorState=[]),M.restoreViewState(N))}R&&(0,v.applyTextEditorOptions)(R,M,1),M.updateOptions({readOnly:L.isReadonly()})}catch(F){await this.handleSetInputError(F,T,R)}}async handleSetInputError(T,R,O){if(T.textFileOperationResult===0)return this.openAsBinary(R,O);if(T.fileOperationResult===0)throw this.openAsFolder(R),new Error((0,t.localize)(1,null));if(T.fileOperationResult===1&&await this.pathService.hasValidBasename(R.preferredResource)){const x=new c.FileOperationError((0,t.localize)(2,null),1);throw x.actions=[(0,A.toAction)({id:"workbench.files.action.createMissingFile",label:(0,t.localize)(3,null),run:async()=>(await this.textFileService.create([{resource:R.preferredResource}]),this.editorService.openEditor({resource:R.preferredResource,options:{pinned:!0}}))})],x}throw T}openAsBinary(T,R){const O=this.configurationService.getValue("workbench.editor.defaultBinaryEditor"),x=this.group??this.editorGroupService.activeGroup,F={...R,activation:n.EditorActivation.PRESERVE};O&&O!==""?this.editorService.replaceEditors([{editor:T,replacement:{resource:T.resource,options:{...F,override:O}}}],x):(T.setForceOpenAsBinary(),x.openEditor(T,F))}async openAsFolder(T){!this.group||(await this.group.closeEditor(this.input),this.contextService.isInsideWorkspace(T.preferredResource)&&(await this.paneCompositeService.openPaneComposite(k.VIEWLET_ID,0),this.explorerService.select(T.preferredResource,!0)))}clearInput(){super.clearInput(),this.inputListener.clear();const T=this.getControl();T&&T.setModel(null)}tracksEditorViewState(T){return T instanceof o.FileEditorInput}tracksDisposedEditorViewState(){return!0}};E.ID=k.TEXT_FILE_EDITOR_ID,E=Ee([W(0,i.ITelemetryService),W(1,c.IFileService),W(2,m.IPaneCompositePartService),W(3,r.IInstantiationService),W(4,S.IWorkspaceContextService),W(5,s.IStorageService),W(6,l.ITextResourceConfigurationService),W(7,u.IEditorService),W(8,p.IThemeService),W(9,a.IEditorGroupsService),W(10,D.ITextFileService),W(11,g.IExplorerService),W(12,h.IUriIdentityService),W(13,_.IPathService),W(14,b.IConfigurationService)],E),e.TextFileEditor=E}),define(ne[2690],re([1,0,1591,148,76,2,217,135,154]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DirtyFilesIndicator=void 0;let w=class extends A.Disposable{constructor(C,o,c,i){super();this.lifecycleService=C,this.activityService=o,this.workingCopyService=c,this.filesConfigurationService=i,this.badgeHandle=this._register(new A.MutableDisposable),this.lastKnownDirtyCount=0,this.updateActivityBadge(),this.registerListeners()}registerListeners(){this._register(this.workingCopyService.onDidChangeDirty(C=>this.onWorkingCopyDidChangeDirty(C))),this.lifecycleService.onDidShutdown(()=>this.dispose())}onWorkingCopyDidChangeDirty(C){const o=C.isDirty();o&&!(C.capabilities&2)&&this.filesConfigurationService.getAutoSaveMode()===1||(o||this.lastKnownDirtyCount>0)&&this.updateActivityBadge()}updateActivityBadge(){const C=this.lastKnownDirtyCount=this.workingCopyService.dirtyCount;C>0?this.badgeHandle.value=this.activityService.showViewContainerActivity(f.VIEWLET_ID,{badge:new k.NumberBadge(C,o=>o===1?t.localize(0,null):t.localize(1,null,C)),clazz:"explorer-viewlet-label"}):this.badgeHandle.clear()}};w=Ee([W(0,_.ILifecycleService),W(1,k.IActivityService),W(2,D.IWorkingCopyService),W(3,I.IFilesConfigurationService)],w),e.DirtyFilesIndicator=w}),define(ne[2691],re([1,0,1595,2689,23,130,36,27,5,34,24,113,21,12,59,83,108,87,56,220,46,88,101,8]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeTextFileEditor=void 0;let g=class extends f.TextFileEditor{constructor(m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H){super(m,b,E,y,T,R,O,x,F,L,M,P,V,U,H);this.nativeHostService=N,this.preferencesService=B,this.productService=z}handleSetInputError(m,b,E){if(m.fileOperationResult===9){const y=Math.max(_.MIN_MAX_MEMORY_SIZE_MB,+this.textResourceConfigurationService.getValue(void 0,"files.maxMemoryForLargeFilesMB")||_.FALLBACK_MAX_MEMORY_SIZE_MB);throw(0,A.createErrorWithActions)((0,t.localize)(0,null,this.productService.nameShort),{actions:[(0,k.toAction)({id:"workbench.window.action.relaunchWithIncreasedMemoryLimit",label:(0,t.localize)(1,null,y),run:()=>this.nativeHostService.relaunch({addArgs:[`--max-memory=${y}`]})}),(0,k.toAction)({id:"workbench.window.action.configureMemoryLimit",label:(0,t.localize)(2,null),run:()=>this.preferencesService.openUserSettings({query:"files.maxMemoryForLargeFilesMB"})})]})}return super.handleSetInputError(m,b,E)}};g=Ee([W(0,D.ITelemetryService),W(1,_.IFileService),W(2,a.IPaneCompositePartService),W(3,I.IInstantiationService),W(4,w.IWorkspaceContextService),W(5,v.IStorageService),W(6,C.ITextResourceConfigurationService),W(7,o.IEditorService),W(8,c.IThemeService),W(9,i.IEditorGroupsService),W(10,S.ITextFileService),W(11,l.INativeHostService),W(12,s.IPreferencesService),W(13,p.IExplorerService),W(14,r.IUriIdentityService),W(15,u.IProductService),W(16,n.IPathService),W(17,h.IConfigurationService)],g),e.NativeTextFileEditor=g}),define(ne[2692],re([1,0,1594,17,44,432,99,149,2691]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),f.Registry.as(_.EditorExtensions.EditorPane).registerEditorPane(D.EditorPaneDescriptor.create(I.NativeTextFileEditor,I.NativeTextFileEditor.ID,t.localize(0,null)),[new k.SyncDescriptor(A.FileEditorInput)])}),define(ne[2693],re([1,0,60,2,180,18,29,13,9,140,136,126,52,61,172,211,1600,16,7,132,107,99,35,5,17,32,12,149,47,44,82,358,792,579,2618,805,793,168,200,64,238,142,253,59,159,21]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H,K,G){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InteractiveEditorSerializer=e.InteractiveDocumentContribution=void 0,g.Registry.as(y.EditorExtensions.EditorPane).registerEditorPane(b.EditorPaneDescriptor.create(F.InteractiveEditor,F.InteractiveEditor.ID,"Interactive Window"),[new a.SyncDescriptor(L.InteractiveEditorInput)]);let q=class extends f.Disposable{constructor($,J,ee){super();const te={transientOutputs:!0,transientCellMetadata:{},transientDocumentMetadata:{}},se={get options(){return te},set options(ce){te.transientCellMetadata=ce.transientCellMetadata,te.transientDocumentMetadata=ce.transientDocumentMetadata,te.transientOutputs=ce.transientOutputs},open:async(ce,le,ae,ue)=>{if(le instanceof t.VSBuffer){const oe=le.toString();try{const fe=JSON.parse(oe);return{data:{metadata:{},cells:fe.cells.map(pe=>({source:pe.content,language:pe.language,cellKind:pe.kind,mime:pe.mime,outputs:pe.outputs?pe.outputs.map(me=>({outputId:me.outputId,outputs:me.outputs.map(be=>({mime:be.mime,data:be.data}))})):[],metadata:pe.metadata}))},transientOptions:te}}catch{}}return{data:{metadata:{},cells:[]},transientOptions:te}},save:async ce=>!1,saveAs:async(ce,le,ae)=>!1,backup:async(ce,le)=>{const ae=$.listNotebookDocuments().find(ue=>ue.uri.toString()===ce.toString());if(ae){const ue=ae.cells.map(fe=>({kind:fe.cellKind,language:fe.language,metadata:fe.metadata,mine:fe.mime,outputs:fe.outputs.map(pe=>({outputId:pe.outputId,outputs:pe.outputs.map(me=>({mime:me.mime,data:me.data}))})),content:fe.getValue()}));return t.VSBuffer.fromString(JSON.stringify({cells:ue}))}else return""}};this._register($.registerNotebookController("interactive",{id:new u.ExtensionIdentifier("interactive.builtin"),location:void 0},se));const ie=$.getContributedNotebookType("interactive");ie?ie.update({selectors:["*.interactive"]}):this._register($.registerContributedNotebookType("interactive",{providerDisplayName:"Interactive Notebook",displayName:"Interactive",filenamePattern:["*.interactive"],exclusive:!0})),J.registerEditor(`${A.Schemas.vscodeInteractiveInput}:/**`,{id:L.InteractiveEditorInput.ID,label:"Interactive Editor",priority:K.RegisteredEditorPriority.exclusive},{canSupportResource:ce=>ce.scheme===A.Schemas.vscodeInteractiveInput,singlePerResource:!0},({resource:ce})=>ee.getEditors(1).find(ae=>ae.editor instanceof L.InteractiveEditorInput&&ae.editor.inputResource.toString()===ce.toString())),J.registerEditor("*.interactive",{id:L.InteractiveEditorInput.ID,label:"Interactive Editor",priority:K.RegisteredEditorPriority.exclusive},{canSupportResource:ce=>ce.scheme===A.Schemas.vscodeInteractive,singlePerResource:!0},({resource:ce})=>ee.getEditors(1).find(ae=>ae.editor instanceof L.InteractiveEditorInput&&ae.editor.resource?.toString()===ce.toString()))}};q=Ee([W(0,z.INotebookService),W(1,K.IEditorResolverService),W(2,G.IEditorService)],q),e.InteractiveDocumentContribution=q;let Z=class{constructor($,J){this._modelService=J,this._registration=$.registerTextModelContentProvider(A.Schemas.vscodeInteractiveInput,this)}dispose(){this._registration.dispose()}async provideTextContent($){const J=this._modelService.getModel($);return J||this._modelService.createModel("",null,$,!1)}};Z=Ee([W(0,c.ITextModelService),W(1,o.IModelService)],Z);const j=g.Registry.as(E.Extensions.Workbench);j.registerWorkbenchContribution(q,1),j.registerWorkbenchContribution(Z,1);class X{canSerialize(){return!0}serialize($){return(0,D.assertType)($ instanceof L.InteractiveEditorInput),JSON.stringify({resource:$.primary.resource,inputResource:$.inputResource})}deserialize($,J){const ee=(0,_.parse)(J);if(!ee)return;const{resource:te,inputResource:se}=ee;return!ee||!I.URI.isUri(te)||!I.URI.isUri(se)?void 0:L.InteractiveEditorInput.create($,te,se)}}e.InteractiveEditorSerializer=X,(0,n.registerSingleton)(M.IInteractiveHistoryService,M.InteractiveHistoryService),(0,n.registerSingleton)(x.IInteractiveDocumentService,x.InteractiveDocumentService),(0,l.registerAction2)(class extends l.Action2{constructor(){super({id:"_interactive.open",title:{value:(0,s.localize)(0,null),original:"Open Interactive Window"},f1:!1,category:"Interactive",description:{description:(0,s.localize)(1,null),args:[{name:"showOptions",description:"Show Options",schema:{type:"object",properties:{viewColumn:{type:"number",default:-1},preserveFocus:{type:"boolean",default:!0}}}},{name:"resource",description:"Interactive resource Uri",isOptional:!0},{name:"controllerId",description:"Notebook controller Id",isOptional:!0},{name:"title",description:"Notebook editor title",isOptional:!0}]}})}async run(Y,$,J,ee,te){const se=Y.get(G.IEditorService),ie=Y.get(H.IEditorGroupsService),ce=Y.get(M.IInteractiveHistoryService),le=Y.get(V.INotebookKernelService),ae=(0,U.columnToEditorGroup)(ie,typeof $=="number"?$:$?.viewColumn),ue={activation:p.EditorActivation.PRESERVE,preserveFocus:typeof $!="number"?$?.preserveFocus??!1:!1};if(J&&J.scheme===A.Schemas.vscodeInteractive){const he=I.URI.revive(J),ge=se.findEditors(he).filter(de=>de.editor instanceof L.InteractiveEditorInput&&de.editor.resource?.toString()===he.toString());if(ge.length){const de=ge[0].editor,Se=ge[0].groupId,ye=(await se.openEditor(de,ue,Se))?.getControl();return{notebookUri:de.resource,inputUri:de.inputResource,notebookEditorId:ye?.notebookEditor?.getId()}}}const oe=new Set;se.getEditors(1).forEach(he=>{he.editor.resource&&oe.add(he.editor.resource.toString())});let fe,pe,me=1;do fe=I.URI.from({scheme:A.Schemas.vscodeInteractive,path:`Interactive-${me}.interactive`}),pe=I.URI.from({scheme:A.Schemas.vscodeInteractiveInput,path:`/InteractiveInput-${me}`}),me++;while(oe.has(fe.toString()));if(ee){const ge=le.getMatchingKernel({uri:fe,viewType:"interactive"}).all.find(de=>de.id===ee);ge&&le.preselectKernelForNotebook(ge,{uri:fe,viewType:"interactive"})}const be=L.InteractiveEditorInput.create(Y.get(h.IInstantiationService),fe,pe,te);ce.clearHistory(fe);const ve=(await se.openEditor(be,ue,ae))?.getControl();return{notebookUri:fe,inputUri:pe,notebookEditorId:ve?.notebookEditor?.getId()}}}),(0,l.registerAction2)(class extends l.Action2{constructor(){super({id:"interactive.execute",title:{value:(0,s.localize)(2,null),original:"Execute Code"},category:"Interactive",keybinding:{when:r.ContextKeyExpr.equals("resourceScheme",A.Schemas.vscodeInteractive),primary:256|3,win:{primary:2048|3},weight:N.NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT},menu:[{id:l.MenuId.InteractiveInputExecute}],icon:B.executeIcon,f1:!1})}async run(Y){const $=Y.get(G.IEditorService),J=Y.get(w.IBulkEditService),ee=Y.get(M.IInteractiveHistoryService),te=$.activeEditorPane?.getControl();if(te&&te.notebookEditor&&te.codeEditor){const se=te.notebookEditor.textModel,ie=te.codeEditor.getModel(),le=te.notebookEditor.activeKernel?.supportedLanguages[0]??C.PLAINTEXT_LANGUAGE_ID;if(se&&ie){const ae=se.length,ue=ie.getValue();if((0,k.isFalsyOrWhitespace)(ue))return;ee.addToHistory(se.uri,""),ie.setValue("");const oe=te.notebookEditor.notebookOptions.getLayoutConfiguration().interactiveWindowCollapseCodeCells==="fromEditor"?{inputCollapsed:!1,outputCollapsed:!1}:void 0;await J.apply([new R.ResourceNotebookCellEdit(se.uri,{editType:1,index:ae,count:0,cells:[{cellKind:P.CellKind.Code,mime:void 0,language:le,source:ue,outputs:[],metadata:{},collapseState:oe}]})]),te.notebookEditor.revealCellRangeInView({start:ae,end:ae+1}),await te.notebookEditor.executeNotebookCells(te.notebookEditor.getCellsInRange({start:ae,end:ae+1}))}}}}),(0,l.registerAction2)(class extends l.Action2{constructor(){super({id:"interactive.input.clear",title:{value:(0,s.localize)(3,null),original:"Clear the interactive window input editor contents"},category:"Interactive",f1:!1})}async run(Y){const J=Y.get(G.IEditorService).activeEditorPane?.getControl();if(J&&J.notebookEditor&&J.codeEditor){const ee=J.notebookEditor.textModel,te=J.codeEditor.getModel(),se=J.codeEditor.getModel()?.getFullModelRange();ee&&te&&se&&J.codeEditor.executeEdits("",[v.EditOperation.replace(se,null)])}}}),(0,l.registerAction2)(class extends l.Action2{constructor(){super({id:"interactive.history.previous",title:{value:(0,s.localize)(4,null),original:"Previous value in history"},category:"Interactive",f1:!1,keybinding:{when:r.ContextKeyExpr.and(r.ContextKeyExpr.equals("resourceScheme",A.Schemas.vscodeInteractive),O.INTERACTIVE_INPUT_CURSOR_BOUNDARY.notEqualsTo("bottom"),O.INTERACTIVE_INPUT_CURSOR_BOUNDARY.notEqualsTo("none"),S.Context.Visible.toNegated()),primary:16,weight:200}})}async run(Y){const $=Y.get(G.IEditorService),J=Y.get(M.IInteractiveHistoryService),ee=$.activeEditorPane?.getControl();if(ee&&ee.notebookEditor&&ee.codeEditor){const te=ee.notebookEditor.textModel,se=ee.codeEditor.getModel();if(te&&se){const ie=J.getPreviousValue(te.uri);ie&&se.setValue(ie)}}}}),(0,l.registerAction2)(class extends l.Action2{constructor(){super({id:"interactive.history.next",title:{value:(0,s.localize)(5,null),original:"Next value in history"},category:"Interactive",f1:!1,keybinding:{when:r.ContextKeyExpr.and(r.ContextKeyExpr.equals("resourceScheme",A.Schemas.vscodeInteractive),O.INTERACTIVE_INPUT_CURSOR_BOUNDARY.notEqualsTo("top"),O.INTERACTIVE_INPUT_CURSOR_BOUNDARY.notEqualsTo("none"),S.Context.Visible.toNegated()),primary:18,weight:200}})}async run(Y){const $=Y.get(G.IEditorService),J=Y.get(M.IInteractiveHistoryService),ee=$.activeEditorPane?.getControl();if(ee&&ee.notebookEditor&&ee.codeEditor){const te=ee.notebookEditor.textModel,se=ee.codeEditor.getModel();if(te&&se){const ie=J.getNextValue(te.uri);ie&&se.setValue(ie)}}}}),(0,l.registerAction2)(class extends l.Action2{constructor(){super({id:"interactive.scrollToTop",title:(0,s.localize)(6,null),keybinding:{when:r.ContextKeyExpr.equals("resourceScheme",A.Schemas.vscodeInteractive),primary:2048|14,mac:{primary:2048|16},weight:200},category:"Interactive"})}async run(Y){const J=Y.get(G.IEditorService).activeEditorPane?.getControl();if(J&&J.notebookEditor&&J.codeEditor){if(J.notebookEditor.getLength()===0)return;J.notebookEditor.revealCellRangeInView({start:0,end:1})}}}),(0,l.registerAction2)(class extends l.Action2{constructor(){super({id:"interactive.scrollToBottom",title:(0,s.localize)(7,null),keybinding:{when:r.ContextKeyExpr.equals("resourceScheme",A.Schemas.vscodeInteractive),primary:2048|13,mac:{primary:2048|18},weight:200},category:"Interactive"})}async run(Y){const J=Y.get(G.IEditorService).activeEditorPane?.getControl();if(J&&J.notebookEditor&&J.codeEditor){if(J.notebookEditor.getLength()===0)return;const ee=J.notebookEditor.getLength();J.notebookEditor.revealCellRangeInView({start:ee-1,end:ee})}}}),(0,l.registerAction2)(class extends l.Action2{constructor(){super({id:"interactive.input.focus",title:{value:(0,s.localize)(8,null),original:"Focus input editor in the interactive window"},category:"Interactive",f1:!1})}async run(Y){const $=Y.get(G.IEditorService),J=$.activeEditorPane?.getControl();J&&J.notebookEditor&&J.codeEditor&&$.activeEditorPane?.focus()}}),(0,l.registerAction2)(class extends l.Action2{constructor(){super({id:"interactive.history.focus",title:{value:(0,s.localize)(9,null),original:"Focus input editor in the interactive window"},category:"Interactive",f1:!1})}async run(Y){const J=Y.get(G.IEditorService).activeEditorPane?.getControl();J&&J.notebookEditor&&J.codeEditor&&J.notebookEditor.focus()}}),(0,m.registerThemingParticipant)(Y=>{(0,d.registerColor)("interactive.activeCodeBorder",{dark:Y.getColor(i.peekViewBorder)??"#007acc",light:Y.getColor(i.peekViewBorder)??"#007acc",hcDark:d.contrastBorder,hcLight:d.contrastBorder},(0,s.localize)(10,null)),(0,d.registerColor)("interactive.inactiveCodeBorder",{dark:Y.getColor(d.listInactiveSelectionBackground)??(0,d.transparent)(d.listInactiveSelectionBackground,1),light:Y.getColor(d.listInactiveSelectionBackground)??(0,d.transparent)(d.listInactiveSelectionBackground,1),hcDark:T.PANEL_BORDER,hcLight:T.PANEL_BORDER},(0,s.localize)(11,null))})}),define(ne[637],re([1,0,1607,9,6,18,30,373,204,794,7,16,19,28,44,23,135,54,21,74,53,198,52,42,45,15,580,101]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.findLocalHistoryEntry=e.toDiffEditorArguments=e.COMPARE_WITH_FILE_LABEL=void 0;const E={value:(0,t.localize)(0,null),original:"Local History"};e.COMPARE_WITH_FILE_LABEL={value:(0,t.localize)(1,null),original:"Compare with File"},(0,C.registerAction2)(class extends C.Action2{constructor(){super({id:"workbench.action.localHistory.compareWithFile",title:e.COMPARE_WITH_FILE_LABEL,menu:{id:C.MenuId.TimelineItemContext,group:"1_compare",order:1,when:m.LOCAL_HISTORY_MENU_CONTEXT_KEY}})}async run(V,z){const U=V.get(c.ICommandService),H=V.get(D.IWorkingCopyHistoryService),{entry:K}=await N(H,z);if(K)return U.executeCommand(I.API_OPEN_DIFF_EDITOR_COMMAND_ID,...M(K,K.workingCopy.resource))}}),(0,C.registerAction2)(class extends C.Action2{constructor(){super({id:"workbench.action.localHistory.compareWithPrevious",title:{value:(0,t.localize)(2,null),original:"Compare with Previous"},menu:{id:C.MenuId.TimelineItemContext,group:"1_compare",order:2,when:m.LOCAL_HISTORY_MENU_CONTEXT_KEY}})}async run(V,z){const U=V.get(c.ICommandService),H=V.get(D.IWorkingCopyHistoryService),K=V.get(r.IEditorService),{entry:G,previous:q}=await N(H,z);if(G)return q?U.executeCommand(I.API_OPEN_DIFF_EDITOR_COMMAND_ID,...M(q,G)):F(G,K)}});let y;const T=new v.RawContextKey("localHistoryItemSelectedForCompare",!1,!0);(0,C.registerAction2)(class extends C.Action2{constructor(){super({id:"workbench.action.localHistory.selectForCompare",title:{value:(0,t.localize)(3,null),original:"Select for Compare"},menu:{id:C.MenuId.TimelineItemContext,group:"2_compare_with",order:2,when:m.LOCAL_HISTORY_MENU_CONTEXT_KEY}})}async run(V,z){const U=V.get(D.IWorkingCopyHistoryService),H=V.get(v.IContextKeyService),{entry:K}=await N(U,z);K&&(y=z,T.bindTo(H).set(!0))}}),(0,C.registerAction2)(class extends C.Action2{constructor(){super({id:"workbench.action.localHistory.compareWithSelected",title:{value:(0,t.localize)(4,null),original:"Compare with Selected"},menu:{id:C.MenuId.TimelineItemContext,group:"2_compare_with",order:1,when:v.ContextKeyExpr.and(m.LOCAL_HISTORY_MENU_CONTEXT_KEY,T)}})}async run(V,z){const U=V.get(D.IWorkingCopyHistoryService),H=V.get(c.ICommandService);if(!y)return;const K=(await N(U,y)).entry;if(!K)return;const{entry:G}=await N(U,z);if(G)return H.executeCommand(I.API_OPEN_DIFF_EDITOR_COMMAND_ID,...M(K,G))}}),(0,C.registerAction2)(class extends C.Action2{constructor(){super({id:"workbench.action.localHistory.open",title:{value:(0,t.localize)(5,null),original:"Show Contents"},menu:{id:C.MenuId.TimelineItemContext,group:"3_contents",order:1,when:m.LOCAL_HISTORY_MENU_CONTEXT_KEY}})}async run(V,z){const U=V.get(D.IWorkingCopyHistoryService),H=V.get(r.IEditorService),{entry:K}=await N(U,z);if(K)return F(K,H)}});const R={value:(0,t.localize)(6,null),original:"Restore Contents"};(0,C.registerAction2)(class extends C.Action2{constructor(){super({id:"workbench.action.localHistory.restoreViaEditor",title:R,menu:{id:C.MenuId.EditorTitle,group:"navigation",order:-10,when:p.ResourceContextKey.Scheme.isEqualTo(w.LocalHistoryFileSystemProvider.SCHEMA)},icon:m.LOCAL_HISTORY_ICON_RESTORE})}async run(V,z){const{associatedResource:U,location:H}=w.LocalHistoryFileSystemProvider.fromLocalHistoryFileSystem(z);return x(V,{uri:U,handle:(0,o.basenameOrAuthority)(H)})}}),(0,C.registerAction2)(class extends C.Action2{constructor(){super({id:"workbench.action.localHistory.restore",title:R,menu:{id:C.MenuId.TimelineItemContext,group:"3_contents",order:2,when:m.LOCAL_HISTORY_MENU_CONTEXT_KEY}})}async run(V,z){return x(V,z)}});const O=i.SaveSourceRegistry.registerSource("localHistoryRestore.source",(0,t.localize)(7,null));async function x(V,z){const U=V.get(S.IFileService),H=V.get(l.IDialogService),K=V.get(s.IWorkingCopyService),G=V.get(D.IWorkingCopyHistoryService),q=V.get(r.IEditorService),{entry:Z}=await N(G,z);if(Z){const{confirmed:j}=await H.confirm({message:(0,t.localize)(8,null,(0,o.basename)(Z.workingCopy.resource)),detail:(0,t.localize)(9,null),primaryButton:(0,t.localize)(10,null),type:"warning"});if(!j)return;const X=K.getAll(Z.workingCopy.resource);if(X)for(const Y of X)Y.isDirty()&&await Y.revert({soft:!0});if(await U.cloneFile(Z.location,Z.workingCopy.resource),X)for(const Y of X)await Y.revert({force:!0});await q.openEditor({resource:Z.workingCopy.resource}),await G.addEntry({resource:Z.workingCopy.resource,source:O},k.CancellationToken.None),await L(Z,q)}}(0,C.registerAction2)(class extends C.Action2{constructor(){super({id:"workbench.action.localHistory.restoreViaPicker",title:{value:(0,t.localize)(11,null),original:"Find Entry to Restore"},f1:!0,category:E})}async run(V){const z=V.get(D.IWorkingCopyHistoryService),U=V.get(u.IQuickInputService),H=V.get(n.IModelService),K=V.get(h.ILanguageService),G=V.get(g.ILabelService),q=V.get(r.IEditorService),Z=V.get(S.IFileService),j=V.get(c.ICommandService),X=U.createQuickPick();let Y=new k.CancellationTokenSource;X.onDidHide(()=>Y.dispose(!0)),X.busy=!0,X.show();const $=await z.getAll(Y.token);X.busy=!1,X.placeholder=(0,t.localize)(12,null),X.matchOnLabel=!0,X.matchOnDescription=!0,X.items=$.map(ce=>({resource:ce,label:(0,o.basenameOrAuthority)(ce),description:G.getUriLabel((0,o.dirname)(ce),{relative:!0}),iconClasses:(0,a.getIconClasses)(H,K,ce)})).sort((ce,le)=>ce.resource.fsPath<le.resource.fsPath?-1:1),await _.Event.toPromise(X.onDidAccept),X.dispose();const J=(0,d.firstOrDefault)(X.selectedItems)?.resource;if(!J)return;const ee=U.createQuickPick();Y=new k.CancellationTokenSource,ee.onDidHide(()=>Y.dispose(!0)),ee.busy=!0,ee.show();const te=await z.getEntries(J,Y.token);ee.busy=!1,ee.placeholder=(0,t.localize)(13,null),ee.matchOnLabel=!0,ee.matchOnDescription=!0,ee.items=Array.from(te).reverse().map(ce=>({entry:ce,label:`$(circle-outline) ${i.SaveSourceRegistry.getSourceLabel(ce.source)}`,description:P(ce.timestamp)})),await _.Event.toPromise(ee.onDidAccept),ee.dispose();const se=(0,d.firstOrDefault)(ee.selectedItems);return se?await Z.exists(se.entry.workingCopy.resource)?j.executeCommand(I.API_OPEN_DIFF_EDITOR_COMMAND_ID,...M(se.entry,se.entry.workingCopy.resource)):F(se.entry,q):void 0}}),(0,C.registerAction2)(class extends C.Action2{constructor(){super({id:"workbench.action.localHistory.rename",title:{value:(0,t.localize)(14,null),original:"Rename"},menu:{id:C.MenuId.TimelineItemContext,group:"5_edit",order:1,when:m.LOCAL_HISTORY_MENU_CONTEXT_KEY}})}async run(V,z){const U=V.get(D.IWorkingCopyHistoryService),H=V.get(u.IQuickInputService),{entry:K}=await N(U,z);if(K){const G=H.createInputBox();G.title=(0,t.localize)(15,null),G.ignoreFocusOut=!0,G.placeholder=(0,t.localize)(16,null),G.value=i.SaveSourceRegistry.getSourceLabel(K.source),G.show(),G.onDidAccept(()=>{G.value&&U.updateEntry(K,{source:G.value},k.CancellationToken.None),G.dispose()})}}}),(0,C.registerAction2)(class extends C.Action2{constructor(){super({id:"workbench.action.localHistory.delete",title:{value:(0,t.localize)(17,null),original:"Delete"},menu:{id:C.MenuId.TimelineItemContext,group:"5_edit",order:2,when:m.LOCAL_HISTORY_MENU_CONTEXT_KEY}})}async run(V,z){const U=V.get(D.IWorkingCopyHistoryService),H=V.get(r.IEditorService),K=V.get(l.IDialogService),{entry:G}=await N(U,z);if(G){const{confirmed:q}=await K.confirm({message:(0,t.localize)(18,null,G.workingCopy.name,P(G.timestamp)),detail:(0,t.localize)(19,null),primaryButton:(0,t.localize)(20,null),type:"warning"});if(!q)return;await U.removeEntry(G,k.CancellationToken.None),await L(G,H)}}}),(0,C.registerAction2)(class extends C.Action2{constructor(){super({id:"workbench.action.localHistory.deleteAll",title:{value:(0,t.localize)(21,null),original:"Delete All"},f1:!0,category:E})}async run(V){const z=V.get(l.IDialogService),U=V.get(D.IWorkingCopyHistoryService),{confirmed:H}=await z.confirm({message:(0,t.localize)(22,null),detail:(0,t.localize)(23,null),primaryButton:(0,t.localize)(24,null),type:"warning"});!H||await U.removeAll(k.CancellationToken.None)}}),(0,C.registerAction2)(class extends C.Action2{constructor(){super({id:"workbench.action.localHistory.create",title:{value:(0,t.localize)(25,null),original:"Create Entry"},f1:!0,category:E,precondition:p.ActiveEditorContext})}async run(V){const z=V.get(D.IWorkingCopyHistoryService),U=V.get(u.IQuickInputService),H=V.get(r.IEditorService),K=V.get(g.ILabelService),G=V.get(b.IPathService),q=i.EditorResourceAccessor.getOriginalUri(H.activeEditor,{supportSideBySide:i.SideBySideEditor.PRIMARY});if(q?.scheme!==G.defaultUriScheme&&q?.scheme!==A.Schemas.vscodeUserData)return;const Z=U.createInputBox();Z.title=(0,t.localize)(26,null),Z.ignoreFocusOut=!0,Z.placeholder=(0,t.localize)(27,null,K.getUriBasenameLabel(q)),Z.show(),Z.onDidAccept(async()=>{let j=Z.value;Z.dispose(),j&&await z.addEntry({resource:q,source:Z.value},k.CancellationToken.None)})}});async function F(V,z){const U=w.LocalHistoryFileSystemProvider.toLocalHistoryFileSystem({location:V.location,associatedResource:V.workingCopy.resource});await z.openEditor({resource:U,label:(0,t.localize)(28,null,V.workingCopy.name,i.SaveSourceRegistry.getSourceLabel(V.source),P(V.timestamp))})}async function L(V,z){const U=w.LocalHistoryFileSystemProvider.toLocalHistoryFileSystem({location:V.location,associatedResource:V.workingCopy.resource}),H=z.findEditors(U,{supportSideBySide:i.SideBySideEditor.ANY});await z.closeEditors(H,{preserveFocus:!0})}function M(V,z){const U=w.LocalHistoryFileSystemProvider.toLocalHistoryFileSystem({location:V.location,associatedResource:V.workingCopy.resource});let H,K;if(f.URI.isUri(z))K=z,H=(0,t.localize)(29,null,V.workingCopy.name,i.SaveSourceRegistry.getSourceLabel(V.source),P(V.timestamp),V.workingCopy.name);else{const G=z;K=w.LocalHistoryFileSystemProvider.toLocalHistoryFileSystem({location:G.location,associatedResource:G.workingCopy.resource}),H=(0,t.localize)(30,null,V.workingCopy.name,i.SaveSourceRegistry.getSourceLabel(V.source),P(V.timestamp),G.workingCopy.name,i.SaveSourceRegistry.getSourceLabel(G.source),P(G.timestamp))}return[U,K,H,void 0]}e.toDiffEditorArguments=M;async function N(V,z){const U=await V.getEntries(z.uri,k.CancellationToken.None);let H,K;for(let G=0;G<U.length;G++){const q=U[G];if(q.id===z.handle){H=q,K=U[G-1];break}}return{entry:H,previous:K}}e.findLocalHistoryEntry=N;const B=/\//g;function P(V){return`${m.LOCAL_HISTORY_DATE_FORMATTER.format(V).replace(B,"-")}`}}),define(ne[2694],re([1,0,1608,6,2,420,373,9,101,204,23,794,50,44,8,637,117,580,18,34,230]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LocalHistoryTimeline=void 0;let a=class Li extends _.Disposable{constructor(h,g,d,m,b,E,y){super();this.timelineService=h,this.workingCopyHistoryService=g,this.pathService=d,this.fileService=m,this.environmentService=b,this.configurationService=E,this.contextService=y,this.id=Li.ID,this.label=(0,t.localize)(0,null),this.scheme="*",this._onDidChange=this._register(new f.Emitter),this.onDidChange=this._onDidChange.event,this.timelineProviderDisposable=this._register(new _.MutableDisposable),this.registerComponents(),this.registerListeners()}registerComponents(){this.updateTimelineRegistration(),this._register(this.fileService.registerProvider(C.LocalHistoryFileSystemProvider.SCHEMA,new C.LocalHistoryFileSystemProvider(this.fileService)))}updateTimelineRegistration(){this.configurationService.getValue(Li.LOCAL_HISTORY_ENABLED_SETTINGS_KEY)?this.timelineProviderDisposable.value=this.timelineService.registerTimelineProvider(this):this.timelineProviderDisposable.clear()}registerListeners(){this._register(this.workingCopyHistoryService.onDidAddEntry(h=>this.onDidChangeWorkingCopyHistoryEntry(h.entry))),this._register(this.workingCopyHistoryService.onDidChangeEntry(h=>this.onDidChangeWorkingCopyHistoryEntry(h.entry))),this._register(this.workingCopyHistoryService.onDidReplaceEntry(h=>this.onDidChangeWorkingCopyHistoryEntry(h.entry))),this._register(this.workingCopyHistoryService.onDidRemoveEntry(h=>this.onDidChangeWorkingCopyHistoryEntry(h.entry))),this._register(this.workingCopyHistoryService.onDidRemoveEntries(()=>this.onDidChangeWorkingCopyHistoryEntry(void 0))),this._register(this.workingCopyHistoryService.onDidMoveEntries(()=>this.onDidChangeWorkingCopyHistoryEntry(void 0))),this._register(this.configurationService.onDidChangeConfiguration(h=>{h.affectsConfiguration(Li.LOCAL_HISTORY_ENABLED_SETTINGS_KEY)&&this.updateTimelineRegistration()}))}onDidChangeWorkingCopyHistoryEntry(h){this._onDidChange.fire({id:Li.ID,uri:h?.workingCopy.resource,reset:!0})}async provideTimeline(h,g,d,m){const b=[];let E;if(h.scheme===C.LocalHistoryFileSystemProvider.SCHEMA?E=C.LocalHistoryFileSystemProvider.fromLocalHistoryFileSystem(h).associatedResource:h.scheme===this.pathService.defaultUriScheme||h.scheme===r.Schemas.vscodeUserData?E=h:this.fileService.hasProvider(h)&&(E=D.URI.from({scheme:this.pathService.defaultUriScheme,authority:this.environmentService.remoteAuthority??(0,u.getVirtualWorkspaceAuthority)(this.contextService.getWorkspace()),path:h.path})),E){const y=await this.workingCopyHistoryService.getEntries(E,d);for(const T of y)b.push(this.toTimelineItem(T))}return{source:Li.ID,items:b}}toTimelineItem(h){return{handle:h.id,label:c.SaveSourceRegistry.getSourceLabel(h.source),tooltip:new s.MarkdownString(`$(history) ${l.LOCAL_HISTORY_DATE_FORMATTER.format(h.timestamp)} ${c.SaveSourceRegistry.getSourceLabel(h.source)}`,{supportThemeIcons:!0}),source:Li.ID,timestamp:h.timestamp,themeIcon:l.LOCAL_HISTORY_ICON_ENTRY,contextValue:l.LOCAL_HISTORY_MENU_CONTEXT_VALUE,command:{id:w.API_OPEN_DIFF_EDITOR_COMMAND_ID,title:S.COMPARE_WITH_FILE_LABEL.value,arguments:(0,S.toDiffEditorArguments)(h,h.workingCopy.resource)}}}};a.ID="timeline.localHistory",a.LOCAL_HISTORY_ENABLED_SETTINGS_KEY="workbench.localHistory.enabled",a=Ee([W(0,A.ITimelineService),W(1,k.IWorkingCopyHistoryService),W(2,I.IPathService),W(3,v.IFileService),W(4,o.IWorkbenchEnvironmentService),W(5,i.IConfigurationService),W(6,p.IWorkspaceContextService)],a),e.LocalHistoryTimeline=a}),define(ne[2695],re([1,0,17,47,2694,637]),function(Q,e,t,f,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t.Registry.as(f.Extensions.Workbench).registerWorkbenchContribution(_.LocalHistoryTimeline,2)}),define(ne[2696],re([1,0,1609,373,16,580,637,14,87,7,18,74]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,_.registerAction2)(class extends _.Action2{constructor(){super({id:"workbench.action.localHistory.revealInOS",title:{value:D.isWindows?(0,t.localize)(0,null):D.isMacintosh?(0,t.localize)(1,null):(0,t.localize)(2,null),original:D.isWindows?"Reveal in File Explorer":D.isMacintosh?"Reveal in Finder":"Open Containing Folder"},menu:{id:_.MenuId.TimelineItemContext,group:"4_reveal",order:1,when:w.ContextKeyExpr.and(A.LOCAL_HISTORY_MENU_CONTEXT_KEY,C.ResourceContextKey.Scheme.isEqualTo(v.Schemas.file))}})}async run(o,c){const i=o.get(f.IWorkingCopyHistoryService),S=o.get(I.INativeHostService),{entry:s}=await(0,k.findLocalHistoryEntry)(i,c);s&&await S.showItemInFolder(s.location.fsPath)}})}),define(ne[2697],re([1,0,2696]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),define(ne[2698],re([1,0,1666,48,27,24,113,5,636,12,256,9,61,201,59,21,83,23,45]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LogViewer=e.LogViewerInput=void 0;let p=class qa extends v.TextResourceEditorInput{constructor(n,h,g,d,m,b){super(C.URI.from({scheme:c.LOG_SCHEME,path:n.id}),(0,f.basename)(n.file.path),(0,f.dirname)(n.file.path),void 0,void 0,h,g,d,m,b)}get typeId(){return qa.ID}};p.ID="workbench.editorinputs.output",p=Ee([W(1,o.ITextModelService),W(2,s.ITextFileService),W(3,S.IEditorService),W(4,l.IFileService),W(5,r.ILabelService)],p),e.LogViewerInput=p;let u=class ja extends I.AbstractTextResourceEditor{constructor(n,h,g,d,m,b,E){super(ja.LOG_VIEWER_EDITOR_ID,n,h,g,d,m,b,E)}getConfigurationOverrides(){const n=super.getConfigurationOverrides();return n.wordWrap="off",n.folding=!1,n.scrollBeyondLastLine=!1,n.renderValidationDecorations="editable",n}getAriaLabel(){return(0,t.localize)(0,null)}};u.LOG_VIEWER_EDITOR_ID="workbench.editors.logViewer",u=Ee([W(0,_.ITelemetryService),W(1,D.IInstantiationService),W(2,A.IStorageService),W(3,k.ITextResourceConfigurationService),W(4,w.IThemeService),W(5,i.IEditorGroupsService),W(6,S.IEditorService)],u),e.LogViewer=u}),define(ne[928],re([1,0,1668,27,24,113,5,7,636,201,12,8,59,21,131,38,37,43,256,41,255,17,68,15,82,32,134,10,11]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutputEditor=e.OutputViewPane=void 0;let y=class extends i.ViewPane{constructor(x,F,L,M,N,B,P,V,z,U,H){super(x,F,L,M,N,B,P,z,U,H);this.outputService=V,this.editorPromise=null,this.scrollLockContextKey=w.CONTEXT_OUTPUT_SCROLL_LOCK.bindTo(this.contextKeyService),this.editor=P.createInstance(T),this._register(this.editor.onTitleAreaUpdate(()=>{this.updateTitle(this.editor.getTitle()),this.updateActions()})),this._register(this.onDidChangeBodyVisibility(()=>this.onDidChangeVisibility(this.isBodyVisible())))}get scrollLock(){return!!this.scrollLockContextKey.get()}set scrollLock(x){this.scrollLockContextKey.set(x)}showChannel(x,F){this.channelId!==x.id&&this.setInput(x),F||this.focus()}focus(){super.focus(),this.editorPromise&&this.editorPromise.then(()=>this.editor.focus())}renderBody(x){super.renderBody(x),this.editor.create(x),x.classList.add("output-view");const F=this.editor.getControl();F.setAriaOptions({role:"document",activeDescendant:void 0}),this._register(F.onDidChangeModelContent(()=>{this.outputService.getActiveChannel()&&!this.scrollLock&&this.editor.revealLastLine()})),this._register(F.onDidChangeCursorPosition(L=>{if(L.reason!==3||!this.configurationService.getValue("output.smartScroll.enabled"))return;const M=F.getModel();if(M){const N=L.position.lineNumber,B=M.getLineCount();this.scrollLock=B!==N}}))}layoutBody(x,F){super.layoutBody(x,F),this.editor.layout(new b.Dimension(F,x))}getActionViewItem(x){return x.id==="workbench.output.action.switchBetweenOutputs"?this.instantiationService.createInstance(R,x):super.getActionViewItem(x)}onDidChangeVisibility(x){this.editor.setVisible(x);let F;x&&(F=this.channelId?this.outputService.getChannel(this.channelId):this.outputService.getActiveChannel()),F?this.setInput(F):this.clearInput()}setInput(x){this.channelId=x.id;const F=this.outputService.getChannelDescriptor(x.id);w.CONTEXT_ACTIVE_LOG_OUTPUT.bindTo(this.contextKeyService).set(!!F?.file&&F?.log);const L=this.createInput(x);(!this.editor.input||!L.matches(this.editor.input))&&(this.editorPromise&&this.editorPromise.cancel(),this.editorPromise=(0,E.createCancelablePromise)(M=>this.editor.setInput(this.createInput(x),{preserveFocus:!0},Object.create(null),M).then(()=>this.editor)))}clearInput(){w.CONTEXT_ACTIVE_LOG_OUTPUT.bindTo(this.contextKeyService).set(!1),this.editor.clearInput(),this.editorPromise=null}createInput(x){return this.instantiationService.createInstance(r.TextResourceEditorInput,x.uri,t.localize(0,null,x.label),t.localize(1,null,x.label),void 0,void 0)}};y=Ee([W(1,S.IKeybindingService),W(2,s.IContextMenuService),W(3,C.IConfigurationService),W(4,D.IContextKeyService),W(5,l.IViewDescriptorService),W(6,k.IInstantiationService),W(7,w.IOutputService),W(8,p.IOpenerService),W(9,v.IThemeService),W(10,f.ITelemetryService)],y),e.OutputViewPane=y;let T=class extends I.AbstractTextResourceEditor{constructor(x,F,L,M,N,B,P,V,z){super(w.OUTPUT_VIEW_ID,x,F,L,N,B,V,z);this.configurationService=M,this.outputService=P}getId(){return w.OUTPUT_VIEW_ID}getTitle(){return t.localize(2,null)}getConfigurationOverrides(){const x=super.getConfigurationOverrides();x.wordWrap="on",x.lineNumbers="off",x.glyphMargin=!1,x.lineDecorationsWidth=20,x.rulers=[],x.folding=!1,x.scrollBeyondLastLine=!1,x.renderLineHighlight="none",x.minimap={enabled:!1},x.renderValidationDecorations="editable",x.padding=void 0,x.readOnly=!0,x.domReadOnly=!0,x.unicodeHighlight={nonBasicASCII:!1,invisibleCharacters:!1,ambiguousCharacters:!1};const F=this.configurationService.getValue("[Log]");return F&&(F["editor.minimap.enabled"]&&(x.minimap={enabled:!0}),"editor.wordWrap"in F&&(x.wordWrap=F["editor.wordWrap"])),x}getAriaLabel(){const x=this.outputService.getActiveChannel();return x?t.localize(3,null,x.label):t.localize(4,null)}async setInput(x,F,L,M){const N=!(F&&F.preserveFocus);this.input&&x.matches(this.input)||(this.input&&this.input.dispose(),await super.setInput(x,F,L,M),N&&this.focus(),this.revealLastLine())}clearInput(){this.input&&this.input.dispose(),super.clearInput()}createEditor(x){x.setAttribute("role","document"),super.createEditor(x);const F=this.scopedContextKeyService;F&&w.CONTEXT_IN_OUTPUT.bindTo(F).set(!0)}};T=Ee([W(0,f.ITelemetryService),W(1,k.IInstantiationService),W(2,_.IStorageService),W(3,C.IConfigurationService),W(4,A.ITextResourceConfigurationService),W(5,v.IThemeService),W(6,w.IOutputService),W(7,o.IEditorGroupsService),W(8,c.IEditorService)],T),e.OutputEditor=T;let R=class Ya extends m.SelectActionViewItem{constructor(x,F,L,M){super(null,x,[],0,M,{ariaLabel:t.localize(5,null),optionsAsChildren:!0});this.outputService=F,this.themeService=L,this.outputChannels=[],this.logChannels=[];let N=a.Registry.as(u.Extensions.OutputChannels);this._register(N.onDidRegisterChannel(()=>this.updateOptions())),this._register(N.onDidRemoveChannel(()=>this.updateOptions())),this._register(this.outputService.onActiveOutputChannel(()=>this.updateOptions())),this._register((0,n.attachSelectBoxStyler)(this.selectBox,L)),this.updateOptions()}render(x){super.render(x),x.classList.add("switch-output"),this._register((0,n.attachStylerCallback)(this.themeService,{selectBorder:d.selectBorder},F=>{x.style.borderColor=F.selectBorder?`${F.selectBorder}`:""}))}getActionContext(x,F){const L=F<this.outputChannels.length?this.outputChannels[F]:this.logChannels[F-this.outputChannels.length-1];return L?L.id:x}updateOptions(){const x=(0,h.groupBy)(this.outputService.getChannelDescriptors(),(P,V)=>!P.log&&V.log?-1:P.log&&!V.log?1:0);this.outputChannels=x[0]||[],this.logChannels=x[1]||[];const F=this.outputChannels.length&&this.logChannels.length,L=F?this.outputChannels.length:-1,M=[...this.outputChannels.map(P=>P.label),...F?[Ya.SEPARATOR]:[],...this.logChannels.map(P=>t.localize(6,null,P.label))];let N=0;const B=this.outputService.getActiveChannel();if(B&&(N=this.outputChannels.map(P=>P.id).indexOf(B.id),N===-1)){const P=this.logChannels.map(V=>V.id).indexOf(B.id);N=P!==-1?L+1+P:0}this.setOptions(M.map((P,V)=>({text:P,isDisabled:V===L})),Math.max(0,N))}};R.SEPARATOR="\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",R=Ee([W(1,w.IOutputService),W(2,v.IThemeService),W(3,s.IContextViewService)],R),(0,v.registerThemingParticipant)((O,x)=>{const F=O.getColor(g.SIDE_BAR_BACKGROUND);F&&F!==O.getColor(d.editorBackground)&&x.addRule(` .monaco-workbench .part.sidebar .output-view .monaco-editor, .monaco-workbench .part.sidebar .output-view .monaco-editor .margin, .monaco-workbench .part.sidebar .output-view .monaco-editor .monaco-editor-background { background-color: ${F}; } `)})}),define(ne[2699],re([1,0,6,19,2,131,10,215,178,258,21,5,37,7,28,38,16,36,78,12,587,68,71,8,11,967,92,9,23,279,102,43,1706,15,110,24,44,82,165,434,52,39,318,354,313,14,29,32,247,173,18,155,406,559,762,41,27,42,45,483,33,809,127,56,204,73,34,186,162,26,383]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H,K,G,q,Z,j,X,Y,$,J,ee,te,se,ie,ce,le,ae,ue,oe,fe,pe,me,be,Ce,ve,he,ge){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SCMActionButton=e.scmProviderSeparatorBorderColor=e.SCMViewPane=e.SCMAccessibilityProvider=e.SCMTreeKeyboardNavigationLabelProvider=e.SCMTreeSorter=void 0;let de=class Xa{constructor(He,ct,lt){this.commandService=He,this.themeService=ct,this.notificationService=lt}get templateId(){return Xa.TEMPLATE_ID}renderTemplate(He){He.parentElement.parentElement.querySelector(".monaco-tl-twistie").classList.add("force-no-twistie"),He.parentElement.parentElement.classList.add("force-no-hover");const ct=(0,k.append)(He,(0,k.$)(".button-container")),lt=new At(ct,this.commandService,this.themeService,this.notificationService);return{actionButton:lt,disposable:_.Disposable.None,templateDisposable:lt}}renderElement(He,ct,lt,ut){lt.disposable.dispose(),lt.actionButton.setButton(He.element.button)}renderCompressedElements(){throw new Error("Should never happen since node is incompressible")}disposeElement(He,ct,lt){lt.disposable.dispose()}disposeTemplate(He){He.disposable.dispose(),He.templateDisposable.dispose()}};de.DEFAULT_HEIGHT=30,de.TEMPLATE_ID="actionButton",de=Ee([W(0,i.ICommandService),W(1,p.IThemeService),W(2,ge.INotificationService)],de);let Se=class as{constructor(He,ct,lt,ut){this.outerLayout=He,this.overflowWidgetsDomNode=ct,this.updateHeight=lt,this.instantiationService=ut,this.inputWidgets=new Map,this.contentHeights=new WeakMap,this.editorSelections=new WeakMap}get templateId(){return as.TEMPLATE_ID}renderTemplate(He){He.parentElement.parentElement.querySelector(".monaco-tl-twistie").classList.add("force-no-twistie"),He.parentElement.parentElement.classList.add("force-no-hover");const ct=new _.DisposableStore,lt=(0,k.append)(He,(0,k.$)(".scm-input")),ut=this.instantiationService.createInstance(Dt,lt,this.overflowWidgetsDomNode);return ct.add(ut),{inputWidget:ut,disposable:_.Disposable.None,templateDisposable:ct}}renderElement(He,ct,lt){lt.disposable.dispose();const ut=new _.DisposableStore,pt=He.element;lt.inputWidget.input=pt,this.inputWidgets.set(pt,lt.inputWidget),ut.add({dispose:()=>this.inputWidgets.delete(pt)});const Et=this.editorSelections.get(pt);Et&&(lt.inputWidget.selections=Et),ut.add((0,_.toDisposable)(()=>{const $e=lt.inputWidget.selections;$e&&this.editorSelections.set(pt,$e)}));const yt=()=>{const $e=lt.inputWidget.getContentHeight(),Pe=this.contentHeights.get(pt);this.contentHeights.set(pt,$e),Pe!==$e&&(this.updateHeight(pt,$e+10),lt.inputWidget.layout())},mt=()=>{ut.add(lt.inputWidget.onDidChangeContentHeight(yt)),yt()},It=(0,g.disposableTimeout)(mt,0);ut.add(It);const Rt=()=>lt.inputWidget.layout();ut.add(this.outerLayout.onDidChange(Rt)),Rt(),lt.disposable=ut}renderCompressedElements(){throw new Error("Should never happen since node is incompressible")}disposeElement(He,ct,lt){lt.disposable.dispose()}disposeTemplate(He){He.disposable.dispose(),He.templateDisposable.dispose()}getHeight(He){return(this.contentHeights.get(He)??as.DEFAULT_HEIGHT)+10}getRenderedInputWidget(He){return this.inputWidgets.get(He)}getFocusedInput(){for(const[He,ct]of this.inputWidgets)if(ct.hasFocus())return He}clearValidation(){for(const[,He]of this.inputWidgets)He.clearValidation()}};Se.DEFAULT_HEIGHT=26,Se.TEMPLATE_ID="input",Se=Ee([W(3,C.IInstantiationService)],Se);let we=class Qa{constructor(He,ct,lt){this.actionViewItemProvider=He,this.scmViewService=ct,this.themeService=lt}get templateId(){return Qa.TEMPLATE_ID}renderTemplate(He){He.parentElement.parentElement.querySelector(".monaco-tl-twistie").classList.add("force-twistie");const ct=(0,k.append)(He,(0,k.$)(".resource-group")),lt=(0,k.append)(ct,(0,k.$)(".name")),ut=(0,k.append)(ct,(0,k.$)(".actions")),pt=new r.ActionBar(ut,{actionViewItemProvider:this.actionViewItemProvider}),Et=(0,k.append)(ct,(0,k.$)(".count")),yt=new w.CountBadge(Et),mt=(0,a.attachBadgeStyler)(yt,this.themeService),It=_.Disposable.None,Rt=(0,_.combinedDisposable)(pt,mt);return{name:lt,count:yt,actionBar:pt,elementDisposables:It,disposables:Rt}}renderElement(He,ct,lt){lt.elementDisposables.dispose();const ut=He.element;lt.name.textContent=ut.label,lt.actionBar.clear(),lt.actionBar.context=ut,lt.count.setCount(ut.elements.length);const pt=new _.DisposableStore,Et=this.scmViewService.menus.getRepositoryMenus(ut.provider);pt.add((0,u.connectPrimaryMenuToInlineActionBar)(Et.getResourceGroupMenu(ut),lt.actionBar)),lt.elementDisposables=pt}renderCompressedElements(He,ct,lt,ut){throw new Error("Should never happen since node is incompressible")}disposeElement(He,ct,lt){lt.elementDisposables.dispose()}disposeTemplate(He){He.elementDisposables.dispose(),He.disposables.dispose()}};we.TEMPLATE_ID="resource group",we=Ee([W(1,D.ISCMViewService),W(2,p.IThemeService)],we);class ye extends l.ActionRunner{constructor(He){super();this.getSelectedResources=He}async runAction(He,ct){if(!(He instanceof s.MenuItemAction))return super.runAction(He,ct);const lt=this.getSelectedResources(),pt=lt.some(yt=>yt===ct)?lt:[ct],Et=(0,x.flatten)(pt.map(yt=>d.ResourceTree.isResourceNode(yt)?d.ResourceTree.collect(yt):[yt]));await He.run(...Et)}}let ke=class Ja{constructor(He,ct,lt,ut,pt,Et,yt){this.viewModelProvider=He,this.labels=ct,this.actionViewItemProvider=lt,this.actionRunner=ut,this.labelService=pt,this.scmViewService=Et,this.themeService=yt,this.disposables=new _.DisposableStore,this.renderedResources=new Map,yt.onDidColorThemeChange(this.onDidColorThemeChange,this,this.disposables)}get templateId(){return Ja.TEMPLATE_ID}renderTemplate(He){const ct=(0,k.append)(He,(0,k.$)(".resource")),lt=(0,k.append)(ct,(0,k.$)(".name")),ut=this.labels.create(lt,{supportDescriptionHighlights:!0,supportHighlights:!0}),pt=(0,k.append)(ut.element,(0,k.$)(".actions")),Et=new r.ActionBar(pt,{actionViewItemProvider:this.actionViewItemProvider,actionRunner:this.actionRunner}),yt=(0,k.append)(ct,(0,k.$)(".decoration-icon")),mt=(0,_.combinedDisposable)(Et,ut);return{element:ct,name:lt,fileLabel:ut,decorationIcon:yt,actionBar:Et,elementDisposables:_.Disposable.None,disposables:mt}}renderElement(He,ct,lt){lt.elementDisposables.dispose();const ut=new _.DisposableStore,pt=He.element,Et=d.ResourceTree.isResourceNode(pt)?pt.element:pt,yt=d.ResourceTree.isResourceNode(pt)?pt.uri:pt.sourceUri,mt=d.ResourceTree.isResourceNode(pt)?E.FileKind.FOLDER:E.FileKind.FILE,It=this.viewModelProvider(),Rt=!d.ResourceTree.isResourceNode(pt)&&pt.decorations.tooltip||"";lt.actionBar.clear(),lt.actionBar.context=pt;let $e,Pe,Ge;if(d.ResourceTree.isResourceNode(pt))if(pt.element){const je=this.scmViewService.menus.getRepositoryMenus(pt.element.resourceGroup.provider);ut.add((0,u.connectPrimaryMenuToInlineActionBar)(je.getResourceMenu(pt.element),lt.actionBar)),lt.element.classList.toggle("faded",pt.element.decorations.faded),Ge=pt.element.decorations.strikeThrough}else{$e=(0,T.createMatches)(He.filterData);const je=this.scmViewService.menus.getRepositoryMenus(pt.context.provider);ut.add((0,u.connectPrimaryMenuToInlineActionBar)(je.getResourceFolderMenu(pt.context),lt.actionBar)),lt.element.classList.remove("faded")}else{[$e,Pe]=this._processFilterData(yt,He.filterData);const je=this.scmViewService.menus.getRepositoryMenus(pt.resourceGroup.provider);ut.add((0,u.connectPrimaryMenuToInlineActionBar)(je.getResourceMenu(pt),lt.actionBar)),lt.element.classList.toggle("faded",pt.decorations.faded),Ge=pt.decorations.strikeThrough}const Ye={tooltip:Rt,uri:yt,fileLabelOptions:{hidePath:It.mode==="tree",fileKind:mt,matches:$e,descriptionMatches:Pe,strikethrough:Ge},iconResource:Et};this.renderIcon(lt,Ye),this.renderedResources.set(lt,Ye),ut.add((0,_.toDisposable)(()=>this.renderedResources.delete(lt))),lt.element.setAttribute("data-tooltip",Rt),lt.elementDisposables=ut}disposeElement(He,ct,lt){lt.elementDisposables.dispose()}renderCompressedElements(He,ct,lt,ut){lt.elementDisposables.dispose();const pt=new _.DisposableStore,Et=He.element,yt=Et.elements[Et.elements.length-1],mt=Et.elements.map(Pe=>Pe.name),It=E.FileKind.FOLDER,Rt=(0,T.createMatches)(He.filterData);lt.fileLabel.setResource({resource:yt.uri,name:mt},{fileDecorations:{colors:!1,badges:!0},fileKind:It,matches:Rt,separator:this.labelService.getSeparator(yt.uri.scheme)}),lt.actionBar.clear(),lt.actionBar.context=yt;const $e=this.scmViewService.menus.getRepositoryMenus(yt.context.provider);pt.add((0,u.connectPrimaryMenuToInlineActionBar)($e.getResourceFolderMenu(yt.context),lt.actionBar)),lt.name.classList.remove("strike-through"),lt.element.classList.remove("faded"),lt.decorationIcon.style.display="none",lt.decorationIcon.style.backgroundImage="",lt.element.setAttribute("data-tooltip",""),lt.elementDisposables=pt}disposeCompressedElements(He,ct,lt,ut){lt.elementDisposables.dispose()}disposeTemplate(He){He.elementDisposables.dispose(),He.disposables.dispose()}_processFilterData(He,ct){if(!ct)return[void 0,void 0];if(!ct.label)return[(0,T.createMatches)(ct),void 0];const lt=(0,f.basename)(He),ut=ct.label,pt=ut.length-lt.length,Et=(0,T.createMatches)(ct.score);if(ut===lt)return[Et,void 0];let yt=[],mt=[];for(const It of Et)It.start>pt?yt.push({start:It.start-pt,end:It.end-pt}):It.end<pt?mt.push(It):(yt.push({start:0,end:It.end-pt}),mt.push({start:It.start,end:pt}));return[yt,mt]}onDidColorThemeChange(){for(const[He,ct]of this.renderedResources)this.renderIcon(He,ct)}renderIcon(He,ct){const lt=this.themeService.getColorTheme(),ut=lt.type===fe.ColorScheme.LIGHT?ct.iconResource?.decorations.icon:ct.iconResource?.decorations.iconDark;He.fileLabel.setFile(ct.uri,{...ct.fileLabelOptions,fileDecorations:{colors:!1,badges:!ut}}),ut?(p.ThemeIcon.isThemeIcon(ut)?(He.decorationIcon.className=`decoration-icon ${p.ThemeIcon.asClassName(ut)}`,ut.color&&(He.decorationIcon.style.color=lt.getColor(ut.color.id)?.toString()??""),He.decorationIcon.style.display="",He.decorationIcon.style.backgroundImage=""):(He.decorationIcon.className="decoration-icon",He.decorationIcon.style.color="",He.decorationIcon.style.display="",He.decorationIcon.style.backgroundImage=(0,k.asCSSUrl)(ut)),He.decorationIcon.title=ct.tooltip):(He.decorationIcon.className="decoration-icon",He.decorationIcon.style.color="",He.decorationIcon.style.display="none",He.decorationIcon.style.backgroundImage="",He.decorationIcon.title="")}dispose(){this.disposables.dispose()}};ke.TEMPLATE_ID="resource",ke=Ee([W(4,le.ILabelService),W(5,D.ISCMViewService),W(6,p.IThemeService)],ke);class Ie{constructor(He){this.inputRenderer=He}getHeight(He){return(0,u.isSCMInput)(He)?this.inputRenderer.getHeight(He):(0,u.isSCMActionButton)(He)?de.DEFAULT_HEIGHT+10:22}getTemplateId(He){return(0,u.isSCMRepository)(He)?oe.RepositoryRenderer.TEMPLATE_ID:(0,u.isSCMInput)(He)?Se.TEMPLATE_ID:(0,u.isSCMActionButton)(He)?de.TEMPLATE_ID:d.ResourceTree.isResourceNode(He)||(0,u.isSCMResource)(He)?ke.TEMPLATE_ID:we.TEMPLATE_ID}}class Te{filter(He){return d.ResourceTree.isResourceNode(He)?!0:(0,u.isSCMResourceGroup)(He)?He.elements.length>0||!He.hideWhenEmpty:!0}}class De{constructor(He){this.viewModelProvider=He}get viewModel(){return this.viewModelProvider()}compare(He,ct){if((0,u.isSCMRepository)(He)){if(!(0,u.isSCMRepository)(ct))throw new Error("Invalid comparison");return 0}if((0,u.isSCMInput)(He))return-1;if((0,u.isSCMInput)(ct))return 1;if((0,u.isSCMActionButton)(He))return-1;if((0,u.isSCMActionButton)(ct))return 1;if((0,u.isSCMResourceGroup)(He)){if(!(0,u.isSCMResourceGroup)(ct))throw new Error("Invalid comparison");return 0}if(this.viewModel.mode==="list"){if(this.viewModel.sortKey==="name"){const It=(0,f.basename)(He.sourceUri),Rt=(0,f.basename)(ct.sourceUri);return(0,y.compareFileNames)(It,Rt)}if(this.viewModel.sortKey==="status"){const It=He.decorations.tooltip??"",Rt=ct.decorations.tooltip??"";if(It!==Rt)return(0,q.compare)(It,Rt)}const yt=He.sourceUri.fsPath,mt=ct.sourceUri.fsPath;return(0,y.comparePaths)(yt,mt)}const lt=d.ResourceTree.isResourceNode(He),ut=d.ResourceTree.isResourceNode(ct);if(lt!==ut)return lt?-1:1;const pt=d.ResourceTree.isResourceNode(He)?He.name:(0,f.basename)(He.sourceUri),Et=d.ResourceTree.isResourceNode(ct)?ct.name:(0,f.basename)(ct.sourceUri);return(0,y.compareFileNames)(pt,Et)}}Ee([F.memoize],De.prototype,"viewModel",null),e.SCMTreeSorter=De;let _e=class{constructor(He,ct){this.viewModelProvider=He,this.labelService=ct}getKeyboardNavigationLabel(He){if(d.ResourceTree.isResourceNode(He))return He.name;if((0,u.isSCMRepository)(He)||(0,u.isSCMInput)(He)||(0,u.isSCMActionButton)(He))return;if((0,u.isSCMResourceGroup)(He))return He.label;if(this.viewModelProvider().mode==="list"){const lt=(0,f.basename)(He.sourceUri),ut=this.labelService.getUriLabel(He.sourceUri,{relative:!0});return[lt,ut]}else return(0,f.basename)(He.sourceUri)}getCompressedNodeKeyboardNavigationLabel(He){return He.map(lt=>lt.name).join("/")}};_e=Ee([W(1,le.ILabelService)],_e),e.SCMTreeKeyboardNavigationLabelProvider=_e;function Re(St){if(d.ResourceTree.isResourceNode(St)){const He=St.context;return`folder:${He.provider.id}/${He.id}/$FOLDER/${St.uri.toString()}`}else{if((0,u.isSCMRepository)(St))return`repo:${St.provider.id}`;if((0,u.isSCMInput)(St))return`input:${St.repository.provider.id}`;if((0,u.isSCMActionButton)(St))return`actionButton:${St.repository.provider.id}`;if((0,u.isSCMResource)(St)){const He=St.resourceGroup;return`resource:${He.provider.id}/${He.id}/${St.sourceUri.toString()}`}else return`group:${St.provider.id}/${St.id}`}}class Ne{getId(He){return Re(He)}}let xe=class{constructor(He,ct){this.labelService=He,this.workspaceContextService=ct}getWidgetAriaLabel(){return(0,O.localize)(0,null)}getAriaLabel(He){if(d.ResourceTree.isResourceNode(He))return this.labelService.getUriLabel(He.uri,{relative:!0,noPrefix:!0})||He.name;if((0,u.isSCMRepository)(He)){let ct="";if(He.provider.rootUri){const lt=this.workspaceContextService.getWorkspaceFolder(He.provider.rootUri);lt?.uri.toString()===He.provider.rootUri.toString()?ct=lt.name:ct=(0,f.basename)(He.provider.rootUri)}return`${ct} ${He.provider.label}`}else{if((0,u.isSCMInput)(He))return(0,O.localize)(1,null);if((0,u.isSCMActionButton)(He))return He.button?.command.title??"";if((0,u.isSCMResourceGroup)(He))return He.label;{const ct=[];ct.push((0,f.basename)(He.sourceUri)),He.decorations.tooltip&&ct.push(He.decorations.tooltip);const lt=this.labelService.getUriLabel((0,f.dirname)(He.sourceUri),{relative:!0,noPrefix:!0});return lt&&ct.push(lt),ct.join(", ")}}}};xe=Ee([W(0,le.ILabelService),W(1,Ce.IWorkspaceContextService)],xe),e.SCMAccessibilityProvider=xe;function Ae(St){return Array.isArray(St.groupItems)}function Le(St,He,ct){const lt=St.childrenCount===0&&St.element?St.element:St,ut=ct?ct.collapsed.indexOf(Re(lt))>-1:!1;return{element:lt,children:m.Iterable.map(St.children,pt=>Le(pt,!1,ct)),incompressible:!!St.element||He,collapsed:ut,collapsible:St.childrenCount>0}}var Me;(function(St){St.List="list",St.Tree="tree"})(Me||(Me={}));var We;(function(St){St.Path="path",St.Name="name",St.Status="status"})(We||(We={}));const Ve={ViewSort:new s.MenuId("SCMViewSort"),Repositories:new s.MenuId("SCMRepositories")},Ue={ViewModelMode:new c.RawContextKey("scmViewModelMode","list"),ViewModelSortKey:new c.RawContextKey("scmViewModelSortKey","path"),ViewModelAreAllRepositoriesCollapsed:new c.RawContextKey("scmViewModelAreAllRepositoriesCollapsed",!1),ViewModelIsAnyRepositoryCollapsible:new c.RawContextKey("scmViewModelIsAnyRepositoryCollapsible",!1),SCMProvider:new c.RawContextKey("scmProvider",void 0),SCMProviderRootUri:new c.RawContextKey("scmProviderRootUri",void 0),SCMProviderHasRootUri:new c.RawContextKey("scmProviderHasRootUri",void 0),RepositoryCount:new c.RawContextKey("scmRepositoryCount",0),RepositoryVisibilityCount:new c.RawContextKey("scmRepositoryVisibleCount",0),RepositoryVisibility(St){return new c.RawContextKey(`scmRepositoryVisible:${St.provider.id}`,!1)}};s.MenuRegistry.appendMenuItem(s.MenuId.SCMTitle,{title:(0,O.localize)(2,null),submenu:Ve.ViewSort,when:c.ContextKeyExpr.and(c.ContextKeyExpr.equals("view",D.VIEW_PANE_ID),Ue.RepositoryCount.notEqualsTo(0)),group:"0_view&sort"}),s.MenuRegistry.appendMenuItem(Ve.ViewSort,{title:(0,O.localize)(3,null),submenu:Ve.Repositories,group:"0_repositories"});class et extends s.Action2{constructor(He){const ct=He.provider.rootUri?(0,f.basename)(He.provider.rootUri):He.provider.label;super({id:`workbench.scm.action.toggleRepositoryVisibility.${He.provider.id}`,title:ct,f1:!1,precondition:c.ContextKeyExpr.or(Ue.RepositoryVisibilityCount.notEqualsTo(1),Ue.RepositoryVisibility(He).isEqualTo(!1)),toggled:Ue.RepositoryVisibility(He).isEqualTo(!0),menu:{id:Ve.Repositories}});this.repository=He}run(He){He.get(D.ISCMViewService).toggleVisibility(this.repository)}}let Ze=class{constructor(He,ct,lt){this.scmViewService=He,this.contextKeyService=lt,this.items=new Map,this.disposables=new _.DisposableStore,this.repositoryCountContextKey=Ue.RepositoryCount.bindTo(lt),this.repositoryVisibilityCountContextKey=Ue.RepositoryVisibilityCount.bindTo(lt),He.onDidChangeVisibleRepositories(this.onDidChangeVisibleRepositories,this,this.disposables),ct.onDidAddRepository(this.onDidAddRepository,this,this.disposables),ct.onDidRemoveRepository(this.onDidRemoveRepository,this,this.disposables);for(const ut of ct.repositories)this.onDidAddRepository(ut)}onDidAddRepository(He){const ct=(0,s.registerAction2)(class extends et{constructor(){super(He)}}),lt=Ue.RepositoryVisibility(He).bindTo(this.contextKeyService);lt.set(this.scmViewService.isVisible(He)),this.items.set(He,{contextKey:lt,dispose(){lt.reset(),ct.dispose()}}),this.updateRepositoriesCounts()}onDidRemoveRepository(He){this.items.get(He)?.dispose(),this.items.delete(He),this.updateRepositoriesCounts()}onDidChangeVisibleRepositories(){let He=0;for(const[ct,lt]of this.items){const ut=this.scmViewService.isVisible(ct);lt.contextKey.set(ut),ut&&He++}this.repositoryCountContextKey.set(this.items.size),this.repositoryVisibilityCountContextKey.set(He)}updateRepositoriesCounts(){this.repositoryCountContextKey.set(this.items.size),this.repositoryVisibilityCountContextKey.set(m.Iterable.reduce(this.items.keys(),(He,ct)=>He+(this.scmViewService.isVisible(ct)?1:0),0))}dispose(){this.disposables.dispose(),(0,_.dispose)(this.items.values()),this.items.clear()}};Ze=Ee([W(0,D.ISCMViewService),W(1,D.ISCMService),W(2,c.IContextKeyService)],Ze);let Fe=class{constructor(He,ct,lt,ut,pt,Et,yt,mt,It,Rt,$e){this.tree=He,this.inputRenderer=ct,this._mode=lt,this._sortKey=ut,this._treeViewState=pt,this.instantiationService=Et,this.editorService=yt,this.configurationService=mt,this.scmViewService=It,this.uriIdentityService=Rt,this._onDidChangeMode=new t.Emitter,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeSortKey=new t.Emitter,this.onDidChangeSortKey=this._onDidChangeSortKey.event,this.visible=!1,this._treeViewStateIsStale=!1,this.items=new Map,this.visibilityDisposables=new _.DisposableStore,this.alwaysShowRepositories=!1,this.showActionButton=!1,this.firstVisible=!0,this.disposables=new _.DisposableStore,this.modeContextKey=Ue.ViewModelMode.bindTo($e),this.modeContextKey.set(lt),this.sortKeyContextKey=Ue.ViewModelSortKey.bindTo($e),this.sortKeyContextKey.set(ut),this.areAllRepositoriesCollapsedContextKey=Ue.ViewModelAreAllRepositoriesCollapsed.bindTo($e),this.isAnyRepositoryCollapsibleContextKey=Ue.ViewModelIsAnyRepositoryCollapsible.bindTo($e),this.scmProviderContextKey=Ue.SCMProvider.bindTo($e),this.scmProviderRootUriContextKey=Ue.SCMProviderRootUri.bindTo($e),this.scmProviderHasRootUriContextKey=Ue.SCMProviderHasRootUri.bindTo($e),mt.onDidChangeConfiguration(this.onDidChangeConfiguration,this,this.disposables),this.onDidChangeConfiguration(),t.Event.filter(this.tree.onDidChangeCollapseState,Pe=>(0,u.isSCMRepository)(Pe.node.element))(this.updateRepositoryCollapseAllContextKeys,this,this.disposables),this.disposables.add(this.tree.onDidChangeCollapseState(()=>this._treeViewStateIsStale=!0))}get mode(){return this._mode}set mode(He){if(this._mode!==He){this._mode=He;for(const[,ct]of this.items)for(const lt of ct.groupItems)if(lt.tree.clear(),He==="tree")for(const ut of lt.resources)lt.tree.add(ut.sourceUri,ut);this.refresh(),this._onDidChangeMode.fire(He),this.modeContextKey.set(He)}}get sortKey(){return this._sortKey}set sortKey(He){this._sortKey!==He&&(this._sortKey=He,this.refresh(),this._onDidChangeSortKey.fire(He),this.sortKeyContextKey.set(He))}get treeViewState(){return this.visible&&this._treeViewStateIsStale&&(this.updateViewState(),this._treeViewStateIsStale=!1),this._treeViewState}onDidChangeConfiguration(He){(!He||He.affectsConfiguration("scm.alwaysShowRepositories")||He.affectsConfiguration("scm.showActionButton"))&&(this.alwaysShowRepositories=this.configurationService.getValue("scm.alwaysShowRepositories"),this.showActionButton=this.configurationService.getValue("scm.showActionButton"),this.refresh())}_onDidChangeVisibleRepositories({added:He,removed:ct}){for(const lt of He){const ut=(0,_.combinedDisposable)(lt.provider.groups.onDidSplice(yt=>this._onDidSpliceGroups(Et,yt)),lt.input.onDidChangeVisibility(()=>this.refresh(Et)),lt.provider.onDidChange(()=>{this.showActionButton&&this.refresh(Et)})),pt=lt.provider.groups.elements.map(yt=>this.createGroupItem(yt)),Et={element:lt,groupItems:pt,dispose(){(0,_.dispose)(this.groupItems),ut.dispose()}};this.items.set(lt,Et)}for(const lt of ct)this.items.get(lt).dispose(),this.items.delete(lt);this.refresh()}_onDidSpliceGroups(He,{start:ct,deleteCount:lt,toInsert:ut}){const pt=ut.map(yt=>this.createGroupItem(yt)),Et=He.groupItems.splice(ct,lt,...pt);for(const yt of Et)yt.dispose();this.refresh()}createGroupItem(He){const ct=new d.ResourceTree(He,He.provider.rootUri||b.URI.file("/"),this.uriIdentityService.extUri),lt=[...He.elements],ut=(0,_.combinedDisposable)(He.onDidChange(()=>this.tree.refilter()),He.onDidSplice(Et=>this._onDidSpliceGroup(pt,Et))),pt={element:He,resources:lt,tree:ct,dispose(){ut.dispose()}};if(this._mode==="tree")for(const Et of lt)pt.tree.add(Et.sourceUri,Et);return pt}_onDidSpliceGroup(He,{start:ct,deleteCount:lt,toInsert:ut}){const pt=He.resources.length,Et=He.resources.splice(ct,lt,...ut),yt=He.resources.length;if(this._mode==="tree"){for(const mt of Et)He.tree.delete(mt.sourceUri);for(const mt of ut)He.tree.add(mt.sourceUri,mt)}pt!==yt&&(pt===0||yt===0)?this.refresh():this.refresh(He)}setVisible(He){He?(this.visibilityDisposables=new _.DisposableStore,this.scmViewService.onDidChangeVisibleRepositories(this._onDidChangeVisibleRepositories,this,this.visibilityDisposables),this._onDidChangeVisibleRepositories({added:this.scmViewService.visibleRepositories,removed:m.Iterable.empty()}),typeof this.scrollTop=="number"&&(this.tree.scrollTop=this.scrollTop,this.scrollTop=void 0),this.editorService.onDidActiveEditorChange(this.onDidActiveEditorChange,this,this.visibilityDisposables),this.onDidActiveEditorChange()):(this.updateViewState(),this.visibilityDisposables.dispose(),this._onDidChangeVisibleRepositories({added:m.Iterable.empty(),removed:[...this.items.keys()]}),this.scrollTop=this.tree.scrollTop),this.visible=He,this.updateRepositoryCollapseAllContextKeys()}refresh(He){if(!this.alwaysShowRepositories&&this.items.size===1){const lt=m.Iterable.first(this.items.values()).element.provider;this.scmProviderContextKey.set(lt.contextValue),this.scmProviderRootUriContextKey.set(lt.rootUri?.toString()),this.scmProviderHasRootUriContextKey.set(!!lt.rootUri)}else this.scmProviderContextKey.set(void 0),this.scmProviderRootUriContextKey.set(void 0),this.scmProviderHasRootUriContextKey.set(!1);const ct=this.inputRenderer.getFocusedInput();if(!this.alwaysShowRepositories&&this.items.size===1&&(!He||Ae(He))){const lt=m.Iterable.first(this.items.values());this.tree.setChildren(null,this.render(lt,this.treeViewState).children)}else if(He)this.tree.setChildren(He.element,this.render(He,this.treeViewState).children);else{const lt=(0,x.coalesce)(this.scmViewService.visibleRepositories.map(ut=>this.items.get(ut)));this.tree.setChildren(null,lt.map(ut=>this.render(ut,this.treeViewState)))}ct&&this.inputRenderer.getRenderedInputWidget(ct)?.focus(),this.updateRepositoryCollapseAllContextKeys()}render(He,ct){if(Ae(He)){const lt=[],ut=He.groupItems.some(Et=>Et.element.elements.length>0);if(He.element.input.visible&<.push({element:He.element.input,incompressible:!0,collapsible:!1}),(ut||this.items.size===1&&(!this.showActionButton||!He.element.provider.actionButton))&<.push(...He.groupItems.map(Et=>this.render(Et,ct))),this.showActionButton&&He.element.provider.actionButton){const Et={element:{type:"actionButton",repository:He.element,button:He.element.provider.actionButton},incompressible:!0,collapsible:!1};lt.push(Et)}const pt=ct?ct.collapsed.indexOf(Re(He.element))>-1:!1;return{element:He.element,children:lt,incompressible:!0,collapsed:pt,collapsible:!0}}else{const lt=this.mode==="list"?m.Iterable.map(He.resources,pt=>({element:pt,incompressible:!0})):m.Iterable.map(He.tree.root.children,pt=>Le(pt,!0,ct)),ut=ct?ct.collapsed.indexOf(Re(He.element))>-1:!1;return{element:He.element,children:lt,incompressible:!0,collapsed:ut,collapsible:!0}}}updateViewState(){const He=[],ct=lt=>{lt.element&<.collapsible&<.collapsed&&He.push(Re(lt.element));for(const ut of lt.children)ct(ut)};ct(this.tree.getNode()),this._treeViewState={collapsed:He}}onDidActiveEditorChange(){if(!this.configurationService.getValue("scm.autoReveal"))return;if(this.firstVisible){this.firstVisible=!1,this.visibilityDisposables.add((0,g.disposableTimeout)(()=>this.onDidActiveEditorChange(),250));return}const He=M.EditorResourceAccessor.getOriginalUri(this.editorService.activeEditor,{supportSideBySide:M.SideBySideEditor.PRIMARY});if(!!He)for(const ct of this.scmViewService.visibleRepositories){const lt=this.items.get(ct);if(!!lt)for(let ut=lt.groupItems.length-1;ut>=0;ut--){const pt=lt.groupItems[ut],Et=this.mode==="tree"?pt.tree.getNode(He)?.element:pt.resources.find(yt=>this.uriIdentityService.extUri.isEqual(yt.sourceUri,He));if(Et){this.tree.reveal(Et),this.tree.setSelection([Et]),this.tree.setFocus([Et]);return}}}}focus(){if(this.tree.getFocus().length===0)for(const He of this.scmViewService.visibleRepositories){const ct=this.inputRenderer.getRenderedInputWidget(He.input);if(ct){ct.focus();return}}this.tree.domFocus()}updateRepositoryCollapseAllContextKeys(){if(!this.visible||this.scmViewService.visibleRepositories.length===1){this.isAnyRepositoryCollapsibleContextKey.set(!1),this.areAllRepositoriesCollapsedContextKey.set(!1);return}this.isAnyRepositoryCollapsibleContextKey.set(this.scmViewService.visibleRepositories.some(He=>this.tree.hasElement(He)&&this.tree.isCollapsible(He))),this.areAllRepositoriesCollapsedContextKey.set(this.scmViewService.visibleRepositories.every(He=>this.tree.hasElement(He)&&(!this.tree.isCollapsible(He)||this.tree.isCollapsed(He))))}collapseAllRepositories(){for(const He of this.scmViewService.visibleRepositories)this.tree.isCollapsible(He)&&this.tree.collapse(He)}expandAllRepositories(){for(const He of this.scmViewService.visibleRepositories)this.tree.isCollapsible(He)&&this.tree.expand(He)}dispose(){this.visibilityDisposables.dispose(),this.disposables.dispose(),(0,_.dispose)(this.items.values()),this.items.clear()}};Fe=Ee([W(5,C.IInstantiationService),W(6,v.IEditorService),W(7,h.IConfigurationService),W(8,D.ISCMViewService),W(9,pe.IUriIdentityService),W(10,c.IContextKeyService)],Fe);class Qe extends A.ViewAction{constructor(He={}){super({id:"workbench.scm.action.setListViewMode",title:(0,O.localize)(4,null),viewId:D.VIEW_PANE_ID,f1:!1,icon:ue.Codicon.listFlat,toggled:Ue.ViewModelMode.isEqualTo("list"),menu:{id:Ve.ViewSort,group:"1_viewmode",...He}})}async runInView(He,ct){ct.viewModel.mode="list"}}class qe extends Qe{constructor(){super({id:s.MenuId.SCMTitle,when:c.ContextKeyExpr.and(c.ContextKeyExpr.equals("view",D.VIEW_PANE_ID),Ue.RepositoryCount.notEqualsTo(0),Ue.ViewModelMode.isEqualTo("tree")),group:"navigation",order:-1e3})}}class Be extends A.ViewAction{constructor(He={}){super({id:"workbench.scm.action.setTreeViewMode",title:(0,O.localize)(5,null),viewId:D.VIEW_PANE_ID,f1:!1,icon:ue.Codicon.listTree,toggled:Ue.ViewModelMode.isEqualTo("tree"),menu:{id:Ve.ViewSort,group:"1_viewmode",...He}})}async runInView(He,ct){ct.viewModel.mode="tree"}}class Ke extends Be{constructor(){super({id:s.MenuId.SCMTitle,when:c.ContextKeyExpr.and(c.ContextKeyExpr.equals("view",D.VIEW_PANE_ID),Ue.RepositoryCount.notEqualsTo(0),Ue.ViewModelMode.isEqualTo("list")),group:"navigation",order:-1e3})}}(0,s.registerAction2)(Qe),(0,s.registerAction2)(Be),(0,s.registerAction2)(qe),(0,s.registerAction2)(Ke);class Xe extends A.ViewAction{constructor(He,ct){super({id:`workbench.scm.action.setSortKey.${He}`,title:ct,viewId:D.VIEW_PANE_ID,f1:!1,toggled:Ue.ViewModelSortKey.isEqualTo(He),menu:{id:Ve.ViewSort,group:"2_sort"}});this.sortKey=He}async runInView(He,ct){ct.viewModel.sortKey=this.sortKey}}class rt extends Xe{constructor(){super("name",(0,O.localize)(6,null))}}class it extends Xe{constructor(){super("path",(0,O.localize)(7,null))}}class at extends Xe{constructor(){super("status",(0,O.localize)(8,null))}}(0,s.registerAction2)(rt),(0,s.registerAction2)(it),(0,s.registerAction2)(at);class ft extends A.ViewAction{constructor(){super({id:"workbench.scm.action.collapseAllRepositories",title:(0,O.localize)(9,null),viewId:D.VIEW_PANE_ID,f1:!1,icon:ue.Codicon.collapseAll,menu:{id:s.MenuId.SCMTitle,group:"navigation",when:c.ContextKeyExpr.and(c.ContextKeyExpr.equals("view",D.VIEW_PANE_ID),Ue.ViewModelIsAnyRepositoryCollapsible.isEqualTo(!0),Ue.ViewModelAreAllRepositoriesCollapsed.isEqualTo(!1))}})}async runInView(He,ct){ct.viewModel.collapseAllRepositories()}}class vt extends A.ViewAction{constructor(){super({id:"workbench.scm.action.expandAllRepositories",title:(0,O.localize)(10,null),viewId:D.VIEW_PANE_ID,f1:!1,icon:ue.Codicon.expandAll,menu:{id:s.MenuId.SCMTitle,group:"navigation",when:c.ContextKeyExpr.and(c.ContextKeyExpr.equals("view",D.VIEW_PANE_ID),Ue.ViewModelIsAnyRepositoryCollapsible.isEqualTo(!0),Ue.ViewModelAreAllRepositoriesCollapsed.isEqualTo(!0))}})}async runInView(He,ct){ct.viewModel.expandAllRepositories()}}(0,s.registerAction2)(ft),(0,s.registerAction2)(vt);let Dt=class Za extends _.Disposable{constructor(He,ct,lt,ut,pt,Et,yt,mt,It,Rt,$e){super();this.modelService=ut,this.languageService=pt,this.keybindingService=Et,this.configurationService=yt,this.instantiationService=mt,this.scmViewService=It,this.contextViewService=Rt,this.openerService=$e,this.defaultInputFontFamily=ae.DEFAULT_FONT_FAMILY,this.repositoryDisposables=new _.DisposableStore,this.validationDisposable=_.Disposable.None,this.validationHasFocus=!1,this.lastLayoutWasTrash=!1,this.shouldFocusAfterLayout=!1,this.element=(0,k.append)(He,(0,k.$)(".scm-editor")),this.editorContainer=(0,k.append)(this.element,(0,k.$)(".scm-editor-container")),this.placeholderTextContainer=(0,k.append)(this.editorContainer,(0,k.$)(".scm-editor-placeholder"));const Pe=this.getInputEditorFontFamily(),Ge=this.getInputEditorFontSize(),Ye=this.computeLineHeight(Ge);this.setPlaceholderFontStyles(Pe,Ge,Ye);const je=lt.createScoped(this.element);this.repositoryContextKey=je.createKey("scmRepository",void 0);const Oe={...(0,P.getSimpleEditorOptions)(),lineDecorationsWidth:4,dragAndDrop:!1,cursorWidth:1,fontSize:Ge,lineHeight:Ye,fontFamily:Pe,wrappingStrategy:"advanced",wrappingIndent:"none",padding:{top:3,bottom:3},quickSuggestions:!1,scrollbar:{alwaysConsumeMouseWheel:!1},overflowWidgetsDomNode:ct,renderWhitespace:"none"},ze={isSimpleWidget:!0,contributions:z.EditorExtensionsRegistry.getSomeEditorContributions([j.SuggestController.ID,X.SnippetController2.ID,U.MenuPreventer.ID,H.SelectionClipboardContributionID,K.ContextMenuController.ID,ee.ColorDetector.ID,J.ModesHoverController.ID,te.LinkDetector.ID])},Je=new $.ServiceCollection([c.IContextKeyService,je]),ot=mt.createChild(Je);this.inputEditor=ot.createInstance(B.CodeEditorWidget,this.editorContainer,Oe,ze),this._register(this.inputEditor),this._register(this.inputEditor.onDidFocusEditorText(()=>{this.input?.repository&&this.scmViewService.focus(this.input.repository),this.editorContainer.classList.add("synthetic-focus"),this.renderValidation()})),this._register(this.inputEditor.onDidBlurEditorText(()=>{this.editorContainer.classList.remove("synthetic-focus"),setTimeout(()=>{(!this.validation||!this.validationHasFocus)&&this.clearValidation()},0)}));const ht=je.createKey("scmInputIsInFirstPosition",!1),gt=je.createKey("scmInputIsInLastPosition",!1);this._register(this.inputEditor.onDidChangeCursorPosition(({position:Ct})=>{const _t=this.inputEditor._getViewModel(),Lt=_t.getLineCount(),Pt=_t.getLineContent(Lt).length+1,Nt=_t.coordinatesConverter.convertModelPositionToViewPosition(Ct);ht.set(Nt.lineNumber===1&&Nt.column===1),gt.set(Nt.lineNumber===Lt&&Nt.column===Pt)}));const bt=t.Event.filter(this.configurationService.onDidChangeConfiguration,Ct=>Ct.affectsConfiguration("scm.inputFontFamily")||Ct.affectsConfiguration("scm.inputFontSize"));this._register(bt(()=>{const Ct=this.getInputEditorFontFamily(),_t=this.getInputEditorFontSize(),Lt=this.computeLineHeight(_t);this.inputEditor.updateOptions({fontFamily:Ct,fontSize:_t,lineHeight:Lt}),this.setPlaceholderFontStyles(Ct,_t,Lt)})),this.onDidChangeContentHeight=t.Event.signal(t.Event.filter(this.inputEditor.onDidContentSizeChange,Ct=>Ct.contentHeightChanged))}get input(){return this.model?.input}set input(He){if(He===this.input)return;if(this.clearValidation(),this.editorContainer.classList.remove("synthetic-focus"),this.repositoryDisposables.dispose(),this.repositoryDisposables=new _.DisposableStore,this.repositoryContextKey.set(He?.repository),!He){this.model?.textModel.dispose(),this.inputEditor.setModel(void 0),this.model=void 0;return}let ct;He.repository.provider.rootUri&&(ct=`rootUri=${encodeURIComponent(He.repository.provider.rootUri.toString())}`);const lt=b.URI.from({scheme:Y.Schemas.vscode,path:`scm/${He.repository.provider.contextValue}/${He.repository.provider.id}/input`,query:ct});this.configurationService.getValue("editor.wordBasedSuggestions",{resource:lt})!==!1&&this.configurationService.updateValue("editor.wordBasedSuggestions",!1,{resource:lt},7);const ut=this.modelService.getModel(lt)??this.modelService.createModel("",this.languageService.createById("scminput"),lt);this.inputEditor.setModel(ut);const pt=new g.ThrottledDelayer(200),Et=async()=>{const Ye=this.inputEditor.getSelection()?.getStartPosition(),je=Ye&&ut.getOffsetAt(Ye),Oe=ut.getValue();this.setValidation(await He.validateInput(Oe,je||0))},yt=()=>pt.trigger(Et);this.repositoryDisposables.add(pt),this.repositoryDisposables.add(this.inputEditor.onDidChangeCursorPosition(yt));const mt=this.modelService.getCreationOptions(ut.getLanguageId(),ut.uri,ut.isForSimpleWidget),It=t.Event.filter(this.inputEditor.onKeyDown,Ye=>Ye.keyCode===3);this.repositoryDisposables.add(It(()=>ut.detectIndentation(mt.insertSpaces,mt.tabSize))),ut.setValue(He.value),this.repositoryDisposables.add(He.onDidChange(({value:Ye,reason:je})=>{if(Ye===ut.getValue())return;ut.setValue(Ye);const Oe=je===D.SCMInputChangeReason.HistoryPrevious?ut.getFullModelRange().getStartPosition():ut.getFullModelRange().getEndPosition();this.inputEditor.setPosition(Oe),this.inputEditor.revealPositionInCenterIfOutsideViewport(Oe)})),this.repositoryDisposables.add(He.onDidChangeFocus(()=>this.focus())),this.repositoryDisposables.add(He.onDidChangeValidationMessage(Ye=>this.setValidation(Ye,{focus:!0,timeout:!0}))),this.repositoryDisposables.add(He.onDidChangeValidateInput(Ye=>yt()));const Rt=()=>this.placeholderTextContainer.classList.toggle("hidden",ut.getValueLength()>0);this.repositoryDisposables.add(ut.onDidChangeContent(()=>{He.setValue(ut.getValue(),!0),Rt(),yt()})),Rt();const $e=()=>{const Ye=this.keybindingService.lookupKeybinding("scm.acceptInput"),je=Ye?Ye.getLabel():G.isMacintosh?"Cmd+Enter":"Ctrl+Enter",Oe=(0,q.format)(He.placeholder,je);this.inputEditor.updateOptions({ariaLabel:Oe}),this.placeholderTextContainer.textContent=Oe};this.repositoryDisposables.add(He.onDidChangePlaceholder($e)),this.repositoryDisposables.add(this.keybindingService.onDidUpdateKeybindings($e)),$e();let Pe="";const Ge=()=>{if(typeof He.repository.provider.commitTemplate=="undefined"||!He.visible)return;const Ye=Pe;Pe=He.repository.provider.commitTemplate;const je=ut.getValue();je&&je!==Ye||ut.setValue(Pe)};this.repositoryDisposables.add(He.repository.provider.onDidChangeCommitTemplate(Ge,this)),Ge(),this.model={input:He,textModel:ut}}get selections(){return this.inputEditor.getSelections()}set selections(He){He&&this.inputEditor.setSelections(He)}setValidation(He,ct){this._validationTimer&&(clearTimeout(this._validationTimer),this._validationTimer=0),this.validation=He,this.renderValidation(),ct?.focus&&!this.hasFocus()&&this.focus(),He&&ct?.timeout&&(this._validationTimer=setTimeout(()=>this.setValidation(void 0),Za.ValidationTimeouts[He.type]))}getContentHeight(){const He=this.inputEditor.getContentHeight();return Math.min(He,134)}layout(){const He=this.getContentHeight(),ct=new k.Dimension(this.element.clientWidth-2,He);if(ct.width<0){this.lastLayoutWasTrash=!0;return}this.lastLayoutWasTrash=!1,this.inputEditor.layout(ct),this.renderValidation(),this.shouldFocusAfterLayout&&(this.shouldFocusAfterLayout=!1,this.focus())}focus(){if(this.lastLayoutWasTrash){this.lastLayoutWasTrash=!1,this.shouldFocusAfterLayout=!0;return}this.inputEditor.focus(),this.editorContainer.classList.add("synthetic-focus")}hasFocus(){return this.inputEditor.hasTextFocus()}renderValidation(){if(this.clearValidation(),this.editorContainer.classList.toggle("validation-info",this.validation?.type===2),this.editorContainer.classList.toggle("validation-warning",this.validation?.type===1),this.editorContainer.classList.toggle("validation-error",this.validation?.type===0),!this.validation||!this.inputEditor.hasTextFocus())return;const He=new _.DisposableStore;this.validationDisposable=this.contextViewService.showContextView({getAnchor:()=>this.editorContainer,render:ct=>{const lt=(0,k.append)(ct,(0,k.$)(".scm-editor-validation"));lt.classList.toggle("validation-info",this.validation.type===2),lt.classList.toggle("validation-warning",this.validation.type===1),lt.classList.toggle("validation-error",this.validation.type===0),lt.style.width=`${this.editorContainer.clientWidth}px`;const ut=this.validation.message;if(typeof ut=="string")lt.textContent=ut;else{const pt=(0,k.trackFocus)(lt);He.add(pt),He.add(pt.onDidFocus(()=>this.validationHasFocus=!0)),He.add(pt.onDidBlur(()=>{this.validationHasFocus=!1,this.contextViewService.hideContextView()}));const{element:Et}=this.instantiationService.createInstance(ve.MarkdownRenderer,{}).render(ut,{actionHandler:{callback:yt=>{this.openerService.open(yt,{allowCommands:typeof ut!="string"&&ut.isTrusted}),this.contextViewService.hideContextView()},disposables:He}});lt.appendChild(Et)}return _.Disposable.None},onHide:()=>{this.validationHasFocus=!1,He.dispose()},anchorAlignment:0})}getInputEditorFontFamily(){const He=this.configurationService.getValue("scm.inputFontFamily").trim();return He.toLowerCase()==="editor"?this.configurationService.getValue("editor.fontFamily").trim():He.length!==0&&He.toLowerCase()!=="default"?He:this.defaultInputFontFamily}getInputEditorFontSize(){return this.configurationService.getValue("scm.inputFontSize")}computeLineHeight(He){return Math.round(He*1.5)}setPlaceholderFontStyles(He,ct,lt){this.placeholderTextContainer.style.fontFamily=He,this.placeholderTextContainer.style.fontSize=`${ct}px`,this.placeholderTextContainer.style.lineHeight=`${lt}px`}clearValidation(){this.validationDisposable.dispose(),this.validationHasFocus=!1}dispose(){this.input=void 0,this.repositoryDisposables.dispose(),this.clearValidation(),super.dispose()}};Dt.ValidationTimeouts={[2]:5e3,[1]:8e3,[0]:1e4},Dt=Ee([W(2,c.IContextKeyService),W(3,V.IModelService),W(4,ce.ILanguageService),W(5,S.IKeybindingService),W(6,h.IConfigurationService),W(7,C.IInstantiationService),W(8,D.ISCMViewService),W(9,o.IContextViewService),W(10,se.IOpenerService)],Dt),(0,p.registerThemingParticipant)((St,He)=>{const ct=St.getColor(Z.textLinkForeground);ct&&He.addRule(`.scm-editor-validation a { color: ${ct}; }`);const lt=St.getColor(Z.textLinkActiveForeground);lt&&He.addRule(`.scm-editor-validation a:active, .scm-editor-validation a:hover { color: ${lt}; }`)});let kt=class extends A.ViewPane{constructor(He,ct,lt,ut,pt,Et,yt,mt,It,Rt,$e,Pe,Ge,Ye,je,Oe){super({...He,titleMenuId:s.MenuId.SCMTitle},ut,Et,$e,Pe,Rt,It,je,pt,Oe);this.scmService=ct,this.scmViewService=lt,this.commandService=yt,this.editorService=mt,this.menuService=Ge,this.storageService=Ye,this._onDidLayout=new t.Emitter,this.layoutCache={height:void 0,width:void 0,onDidChange:this._onDidLayout.event},this._register(t.Event.any(this.scmService.onDidAddRepository,this.scmService.onDidRemoveRepository)(()=>this._onDidChangeViewWelcomeState.fire()))}get viewModel(){return this._viewModel}renderBody(He){super.renderBody(He),this.listContainer=(0,k.append)(He,(0,k.$)(".scm-view.show-file-icons"));const ct=(0,k.$)(".scm-overflow-widgets-container.monaco-editor"),lt=()=>this.listContainer.classList.toggle("show-actions",this.configurationService.getValue("scm.alwaysShowActions"));this._register(t.Event.filter(this.configurationService.onDidChangeConfiguration,ot=>ot.affectsConfiguration("scm.alwaysShowActions"))(lt)),lt();const ut=()=>{const ot=this.configurationService.getValue("scm.providerCountBadge");this.listContainer.classList.toggle("hide-provider-counts",ot==="hidden"),this.listContainer.classList.toggle("auto-provider-counts",ot==="auto")};this._register(t.Event.filter(this.configurationService.onDidChangeConfiguration,ot=>ot.affectsConfiguration("scm.providerCountBadge"))(ut)),ut(),this.inputRenderer=this.instantiationService.createInstance(Se,this.layoutCache,ct,(ot,ht)=>this.tree.updateElementHeight(ot,ht));const pt=new Ie(this.inputRenderer);this.listLabels=this.instantiationService.createInstance(I.ResourceLabels,{onDidChangeVisibility:this.onDidChangeBodyVisibility}),this._register(this.listLabels);const Et=new ye(()=>this.getSelectedResources());this._register(Et),this._register(Et.onBeforeRun(()=>this.tree.domFocus()));const yt=[this.instantiationService.createInstance(oe.RepositoryRenderer,(0,u.getActionViewItemProvider)(this.instantiationService)),this.inputRenderer,this.instantiationService.createInstance(de),this.instantiationService.createInstance(we,(0,u.getActionViewItemProvider)(this.instantiationService)),this._register(this.instantiationService.createInstance(ke,()=>this._viewModel,this.listLabels,(0,u.getActionViewItemProvider)(this.instantiationService),Et))],mt=new Te,It=new De(()=>this._viewModel),Rt=this.instantiationService.createInstance(_e,()=>this._viewModel),$e=new Ne;this.tree=this.instantiationService.createInstance(n.WorkbenchCompressibleObjectTree,"SCM Tree Repo",this.listContainer,pt,yt,{transformOptimization:!1,identityProvider:$e,horizontalScrolling:!1,setRowLineHeight:!1,filter:mt,sorter:It,keyboardNavigationLabelProvider:Rt,overrideStyles:{listBackground:this.viewDescriptorService.getViewLocationById(this.id)===1?N.PANEL_BACKGROUND:N.SIDE_BAR_BACKGROUND},accessibilityProvider:this.instantiationService.createInstance(xe)}),this._register(this.tree.onDidOpen(this.open,this)),this._register(this.tree.onContextMenu(this.onListContextMenu,this)),this._register(this.tree.onDidScroll(this.inputRenderer.clearValidation,this.inputRenderer)),this._register(this.tree),(0,k.append)(this.listContainer,ct);let Pe=this.configurationService.getValue("scm.defaultViewMode")==="list"?"list":"tree";const Ge=this.storageService.get("scm.viewMode",1);typeof Ge=="string"&&(Pe=Ge);let Ye;switch(this.configurationService.getValue("scm.defaultViewSortKey")){case"name":Ye="name";break;case"status":Ye="status";break;default:Ye="path";break}const Oe=this.storageService.get("scm.viewSortKey",1);typeof Oe=="string"&&(Ye=Oe);let ze;const Je=this.storageService.get("scm.viewState",1);if(Je)try{ze=JSON.parse(Je)}catch{}this._register(this.instantiationService.createInstance(Ze)),this._viewModel=this.instantiationService.createInstance(Fe,this.tree,this.inputRenderer,Pe,Ye,ze),this._register(this._viewModel),this.listContainer.classList.add("file-icon-themable-tree"),this.listContainer.classList.add("show-file-icons"),this.updateIndentStyles(this.themeService.getFileIconTheme()),this._register(this.themeService.onDidFileIconThemeChange(this.updateIndentStyles,this)),this._register(this._viewModel.onDidChangeMode(this.onDidChangeMode,this)),this._register(this._viewModel.onDidChangeSortKey(this.onDidChangeSortKey,this)),this._register(this.onDidChangeBodyVisibility(this._viewModel.setVisible,this._viewModel)),this._register(t.Event.filter(this.configurationService.onDidChangeConfiguration,ot=>ot.affectsConfiguration("scm.alwaysShowRepositories"))(this.updateActions,this)),this.updateActions(),this._register(this.storageService.onWillSaveState(ot=>{ot.reason===L.WillSaveStateReason.SHUTDOWN&&this.storageService.store("scm.viewState",JSON.stringify(this._viewModel.treeViewState),1,1)}))}updateIndentStyles(He){this.listContainer.classList.toggle("list-view-mode",this._viewModel.mode==="list"),this.listContainer.classList.toggle("tree-view-mode",this._viewModel.mode==="tree"),this.listContainer.classList.toggle("align-icons-and-twisties",this._viewModel.mode==="list"&&He.hasFileIcons||He.hasFileIcons&&!He.hasFolderIcons),this.listContainer.classList.toggle("hide-arrows",this._viewModel.mode==="tree"&&He.hidesExplorerArrows===!0)}onDidChangeMode(){this.updateIndentStyles(this.themeService.getFileIconTheme()),this.storageService.store("scm.viewMode",this._viewModel.mode,1,0)}onDidChangeSortKey(){this.storageService.store("scm.viewSortKey",this._viewModel.sortKey,1,0)}layoutBody(He=this.layoutCache.height,ct=this.layoutCache.width){He!==void 0&&(ct!==void 0&&super.layoutBody(He,ct),this.layoutCache.height=He,this.layoutCache.width=ct,this._onDidLayout.fire(),this.listContainer.style.height=`${He}px`,this.tree.layout(He,ct))}focus(){super.focus(),this.isExpanded()&&this._viewModel.focus()}async open(He){if(He.element){if((0,u.isSCMRepository)(He.element)){this.scmViewService.focus(He.element);return}else if((0,u.isSCMResourceGroup)(He.element)){const ut=He.element.provider,pt=this.scmService.repositories.find(Et=>Et.provider===ut);pt&&this.scmViewService.focus(pt);return}else if(d.ResourceTree.isResourceNode(He.element)){const ut=He.element.context.provider,pt=this.scmService.repositories.find(Et=>Et.provider===ut);pt&&this.scmViewService.focus(pt);return}else if((0,u.isSCMInput)(He.element)){this.scmViewService.focus(He.element.repository);const ut=this.inputRenderer.getRenderedInputWidget(He.element);if(ut){ut.focus();const pt=this.tree.getSelection();pt.length===1&&pt[0]===He.element&&setTimeout(()=>this.tree.setSelection([]))}return}else if((0,u.isSCMActionButton)(He.element)){this.scmViewService.focus(He.element.repository);return}}else return;if(He.element.command?.id===me.API_OPEN_EDITOR_COMMAND_ID||He.element.command?.id===me.API_OPEN_DIFF_EDITOR_COMMAND_ID)await this.commandService.executeCommand(He.element.command.id,...He.element.command.arguments||[],He);else if(await He.element.open(!!He.editorOptions.preserveFocus),He.editorOptions.pinned){const ut=this.editorService.activeEditorPane;ut&&ut.group.pinEditor(ut.input)}const ct=He.element.resourceGroup.provider,lt=this.scmService.repositories.find(ut=>ut.provider===ct);lt&&this.scmViewService.focus(lt)}onListContextMenu(He){if(!He.element){const yt=this.menuService.createMenu(Ve.ViewSort,this.contextKeyService),mt=[],It=(0,be.createAndFillInContextMenuActions)(yt,void 0,mt);return this.contextMenuService.showContextMenu({getAnchor:()=>He.anchor,getActions:()=>mt,onHide:()=>{It.dispose(),yt.dispose()}})}const ct=He.element;let lt=ct,ut=[],pt=_.Disposable.None;if((0,u.isSCMRepository)(ct)){const mt=this.scmViewService.menus.getRepositoryMenus(ct.provider).repositoryMenu;lt=ct.provider,[ut,pt]=(0,u.collectContextMenuActions)(mt)}else if(!((0,u.isSCMInput)(ct)||(0,u.isSCMActionButton)(ct)))if((0,u.isSCMResourceGroup)(ct)){const mt=this.scmViewService.menus.getRepositoryMenus(ct.provider).getResourceGroupMenu(ct);[ut,pt]=(0,u.collectContextMenuActions)(mt)}else if(d.ResourceTree.isResourceNode(ct))if(ct.element){const mt=this.scmViewService.menus.getRepositoryMenus(ct.element.resourceGroup.provider).getResourceMenu(ct.element);[ut,pt]=(0,u.collectContextMenuActions)(mt)}else{const mt=this.scmViewService.menus.getRepositoryMenus(ct.context.provider).getResourceFolderMenu(ct.context);[ut,pt]=(0,u.collectContextMenuActions)(mt)}else{const mt=this.scmViewService.menus.getRepositoryMenus(ct.resourceGroup.provider).getResourceMenu(ct);[ut,pt]=(0,u.collectContextMenuActions)(mt)}const Et=new ye(()=>this.getSelectedResources());Et.onBeforeRun(()=>this.tree.domFocus()),this.contextMenuService.showContextMenu({getAnchor:()=>He.anchor,getActions:()=>ut,getActionsContext:()=>lt,actionRunner:Et,onHide(){pt.dispose()}})}getSelectedResources(){return this.tree.getSelection().filter(He=>!!He&&!(0,u.isSCMResourceGroup)(He))}shouldShowWelcome(){return this.scmService.repositories.length===0}};kt=Ee([W(1,D.ISCMService),W(2,D.ISCMViewService),W(3,S.IKeybindingService),W(4,p.IThemeService),W(5,o.IContextMenuService),W(6,i.ICommandService),W(7,v.IEditorService),W(8,C.IInstantiationService),W(9,R.IViewDescriptorService),W(10,h.IConfigurationService),W(11,c.IContextKeyService),W(12,s.IMenuService),W(13,L.IStorageService),W(14,se.IOpenerService),W(15,ie.ITelemetryService)],kt),e.SCMViewPane=kt,e.scmProviderSeparatorBorderColor=(0,Z.registerColor)("scm.providerBorder",{dark:"#454545",light:"#C8C8C8",hcDark:Z.contrastBorder,hcLight:Z.contrastBorder},(0,O.localize)(11,null)),(0,p.registerThemingParticipant)((St,He)=>{const ct=St.getColor(Z.inputBackground);ct&&He.addRule(`.scm-view .scm-editor-container .monaco-editor-background, .scm-view .scm-editor-container .monaco-editor, .scm-view .scm-editor-container .monaco-editor .margin { background-color: ${ct} !important; }`);const lt=St.getColor(Z.selectionBackground)??St.getColor(Z.editorSelectionBackground);lt&&He.addRule(`.scm-view .scm-editor-container .monaco-editor .focused .selected-text { background-color: ${lt}; }`);const ut=St.getColor(Z.inputForeground);ut&&He.addRule(`.scm-view .scm-editor-container .mtk1 { color: ${ut}; }`);const pt=St.getColor(Z.inputBorder);pt&&He.addRule(`.scm-view .scm-editor-container { outline: 1px solid ${pt}; }`);const Et=St.getColor(N.PANEL_INPUT_BORDER);Et&&He.addRule(`.monaco-workbench .part.panel .scm-view .scm-editor-container { outline: 1px solid ${Et}; }`);const yt=St.getColor(Z.focusBorder);yt&&He.addRule(`.scm-view .scm-editor-container.synthetic-focus { outline: 1px solid ${yt}; }`);const mt=St.getColor(Z.inputPlaceholderForeground);mt&&He.addRule(`.scm-view .scm-editor-placeholder { color: ${mt}; }`);const It=St.getColor(Z.inputValidationInfoBorder);It&&(He.addRule(`.scm-view .scm-editor-container.validation-info { outline: 1px solid ${It} !important; }`),He.addRule(`.scm-editor-validation.validation-info { border-color: ${It}; }`));const Rt=St.getColor(Z.inputValidationInfoBackground);Rt&&He.addRule(`.scm-editor-validation.validation-info { background-color: ${Rt}; }`);const $e=St.getColor(Z.inputValidationInfoForeground);$e&&He.addRule(`.scm-editor-validation.validation-info { color: ${$e}; }`);const Pe=St.getColor(Z.inputValidationWarningBorder);Pe&&(He.addRule(`.scm-view .scm-editor-container.validation-warning { outline: 1px solid ${Pe} !important; }`),He.addRule(`.scm-editor-validation.validation-warning { border-color: ${Pe}; }`));const Ge=St.getColor(Z.inputValidationWarningBackground);Ge&&He.addRule(`.scm-editor-validation.validation-warning { background-color: ${Ge}; }`);const Ye=St.getColor(Z.inputValidationWarningForeground);Ye&&He.addRule(`.scm-editor-validation.validation-warning { color: ${Ye}; }`);const je=St.getColor(Z.inputValidationErrorBorder);je&&(He.addRule(`.scm-view .scm-editor-container.validation-error { outline: 1px solid ${je} !important; }`),He.addRule(`.scm-editor-validation.validation-error { border-color: ${je}; }`));const Oe=St.getColor(Z.inputValidationErrorBackground);Oe&&He.addRule(`.scm-editor-validation.validation-error { background-color: ${Oe}; }`);const ze=St.getColor(Z.inputValidationErrorForeground);ze&&He.addRule(`.scm-editor-validation.validation-error { color: ${ze}; }`);const Je=St.getColor(N.SIDE_BAR_BORDER);Je&&He.addRule(`.scm-view .scm-provider > .status > .monaco-action-bar > .actions-container { border-color: ${Je}; }`)});class At{constructor(He,ct,lt,ut){this.container=He,this.commandService=ct,this.themeService=lt,this.notificationService=ut,this.disposables=new _.MutableDisposable}dispose(){this.disposables?.dispose()}setButton(He){this.clear(),!!He&&(He.description?(this.button=new he.ButtonWithDescription(this.container,{supportIcons:!0,title:He.command.tooltip}),this.button.description=He.description):this.button=new he.Button(this.container,{supportIcons:!0}),this.button.label=He.command.title,this.button.onDidClick(async()=>{try{await this.commandService.executeCommand(He.command.id,...He.command.arguments||[])}catch(ct){this.notificationService.error(ct)}},null,this.disposables.value),this.disposables.value.add(this.button),this.disposables.value.add((0,a.attachButtonStyler)(this.button,this.themeService)))}clear(){this.disposables.value=new _.DisposableStore,this.button=void 0,(0,k.clearNode)(this.container)}}e.SCMActionButton=At}),define(ne[2700],re([1,0,53,245,382,334,5,365,192,34,111,101,9,19,50,23,2,45,198,52,42,1708,135,8,44,21,20,11,15,2203,177,18,154,55,849,210,616,61,150,106,13,33,56,225,1119]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AnythingQuickAccessProvider=void 0;function K(q){const Z=q;return!!Z?.range&&!!Z.resource}let G=class vi extends f.PickerQuickAccessProvider{constructor(Z,j,X,Y,$,J,ee,te,se,ie,ce,le,ae,ue,oe,fe){super(vi.PREFIX,{canAcceptInBackground:!0,noResultsPick:vi.NO_RESULTS_PICK});this.instantiationService=Z,this.searchService=j,this.contextService=X,this.pathService=Y,this.environmentService=$,this.fileService=J,this.labelService=ee,this.modelService=te,this.languageService=se,this.workingCopyService=ie,this.configurationService=ce,this.editorService=le,this.historyService=ae,this.filesConfigurationService=ue,this.textModelService=oe,this.uriIdentityService=fe,this.pickState=new class{constructor(pe,me){this.provider=pe,this.editorService=me,this.picker=void 0,this.editorViewState=void 0,this.scorerCache=Object.create(null),this.fileQueryCache=void 0,this.lastOriginalFilter=void 0,this.lastFilter=void 0,this.lastRange=void 0,this.lastGlobalPicks=void 0,this.isQuickNavigating=void 0}set(pe){this.picker=pe,(0,B.once)(pe.onDispose)(()=>{pe===this.picker&&(this.picker=void 0)});const me=!!pe.quickNavigate;me||(this.fileQueryCache=this.provider.createFileQueryCache(),this.scorerCache=Object.create(null)),this.isQuickNavigating=me,this.lastOriginalFilter=void 0,this.lastFilter=void 0,this.lastRange=void 0,this.lastGlobalPicks=void 0,this.editorViewState=void 0}rememberEditorViewState(){if(this.editorViewState)return;const pe=this.editorService.activeEditorPane;pe&&(this.editorViewState={group:pe.group,editor:pe.input,state:(0,V.withNullAsUndefined)((0,P.getIEditor)(pe.getControl())?.saveViewState())})}async restoreEditorViewState(){if(this.editorViewState){const pe={viewState:this.editorViewState.state,preserveFocus:!0};await this.editorViewState.group.openEditor(this.editorViewState.editor,pe)}}}(this,this.editorService),this.labelOnlyEditorHistoryPickAccessor=new t.QuickPickItemScorerAccessor({skipDescription:!0}),this.fileQueryDelayer=this._register(new b.ThrottledDelayer(vi.TYPING_SEARCH_DELAY)),this.fileQueryBuilder=this.instantiationService.createInstance(A.QueryBuilder),this.workspaceSymbolsQuickAccess=this._register(this.instantiationService.createInstance(F.SymbolsQuickAccessProvider)),this.editorSymbolsQuickAccess=this.instantiationService.createInstance(M.GotoSymbolQuickAccessProvider)}get defaultFilterValue(){if(this.configuration.preserveInput)return L.DefaultQuickAccessFilterValue.LAST}get configuration(){const Z=this.configurationService.getValue().workbench?.editor,j=this.configurationService.getValue().search,X=this.configurationService.getValue().workbench.quickOpen;return{openEditorPinned:!Z?.enablePreviewFromQuickOpen||!Z?.enablePreview,openSideBySideDirection:Z?.openSideBySideDirection,includeSymbols:j?.quickOpen.includeSymbols,includeHistory:j?.quickOpen.includeHistory,historyFilterSortOrder:j?.quickOpen.history.filterSortOrder,shortAutoSaveDelay:this.filesConfigurationService.getAutoSaveMode()===1,preserveInput:X.preserveInput}}provide(Z,j){const X=new s.DisposableStore;this.pickState.set(Z);const Y=X.add(new s.MutableDisposable);return X.add(Z.onDidChangeActive(()=>{Y.value=void 0;const[$]=Z.activeItems;K($)&&(Y.value=this.decorateAndRevealSymbolRange($))})),X.add((0,B.once)(Z.onDidHide)(({reason:$})=>{$===t.QuickInputHideReason.Gesture&&this.pickState.restoreEditorViewState()})),X.add(super.provide(Z,j)),X}decorateAndRevealSymbolRange(Z){const j=this.editorService.activeEditor;if(!this.uriIdentityService.extUri.isEqual(Z.resource,j?.resource))return s.Disposable.None;const X=this.editorService.activeTextEditorControl;return X?(this.pickState.rememberEditorViewState(),X.revealRangeInCenter(Z.range.selection,0),this.addDecorations(X,Z.range.decoration),(0,s.toDisposable)(()=>this.clearDecorations(X))):s.Disposable.None}_getPicks(Z,j,X){const Y=(0,D.extractRangeFromFilter)(Z,[M.GotoSymbolQuickAccessProvider.PREFIX]);let $;if(Y?$=Y.filter:$=Z,this.pickState.lastRange=Y?.range,Z!==this.pickState.lastOriginalFilter&&$===this.pickState.lastFilter)return null;const J=!!this.pickState.lastOriginalFilter;this.pickState.lastOriginalFilter=Z,this.pickState.lastFilter=$;const ee=this.pickState.picker?.items,te=this.pickState.picker?.activeItems[0];if(ee&&te){const se=K(te),ie=te===vi.NO_RESULTS_PICK&&$.indexOf(M.GotoSymbolQuickAccessProvider.PREFIX)>=0;!se&&!ie&&(this.pickState.lastGlobalPicks={items:ee,active:te})}return this.doGetPicks($,{enableEditorSymbolSearch:J},j,X)}doGetPicks(Z,j,X,Y){const $=(0,_.prepareQuery)(Z);if(j.enableEditorSymbolSearch){const te=this.getEditorSymbolPicks($,X,Y);if(te)return te}const J=this.pickState.picker?.activeItems[0];if(K(J)&&this.pickState.lastGlobalPicks)return this.pickState.lastGlobalPicks;const ee=this.getEditorHistoryPicks($);return{picks:this.pickState.isQuickNavigating||ee.length===0?ee:[{type:"separator",label:(0,a.localize)(1,null)},...ee],additionalPicks:(async()=>{const te=new x.ResourceMap;for(const ie of ee)ie.resource&&te.set(ie.resource,!0);const se=await this.getAdditionalPicks($,te,Y);return Y.isCancellationRequested?[]:se.length>0?[{type:"separator",label:this.configuration.includeSymbols?(0,a.localize)(2,null):(0,a.localize)(3,null)},...se]:[]})()}}async getAdditionalPicks(Z,j,X){const[Y,$]=await Promise.all([this.getFilePicks(Z,j,X),this.getWorkspaceSymbolPicks(Z,X)]);if(X.isCancellationRequested)return[];const J=(0,E.top)([...Y,...$],(te,se)=>(0,_.compareItemsByFuzzyScore)(te,se,Z,!0,t.quickPickItemScorerAccessor,this.pickState.scorerCache),vi.MAX_RESULTS),ee=[];for(const te of J)if(te.highlights)ee.push(te);else{const{score:se,labelMatch:ie,descriptionMatch:ce}=(0,_.scoreItemFuzzy)(te,Z,!0,t.quickPickItemScorerAccessor,this.pickState.scorerCache);if(!se)continue;te.highlights={label:ie,description:ce},ee.push(te)}return ee}getEditorHistoryPicks(Z){const j=this.configuration;if(!Z.normalized)return this.historyService.getHistory().map($=>this.createAnythingPick($,j));if(!this.configuration.includeHistory)return[];const X=Z.containsPathSeparator?t.quickPickItemScorerAccessor:this.labelOnlyEditorHistoryPickAccessor,Y=[];for(const $ of this.historyService.getHistory()){const J=$.resource;if(!J||!this.fileService.hasProvider(J)&&J.scheme!==R.Schemas.untitled&&J.scheme!==R.Schemas.vscodeTerminal)continue;const ee=this.createAnythingPick($,j),{score:te,labelMatch:se,descriptionMatch:ie}=(0,_.scoreItemFuzzy)(ee,Z,!1,X,this.pickState.scorerCache);!te||(ee.highlights={label:se,description:ie},Y.push(ee))}return this.configuration.historyFilterSortOrder==="recency"?Y:Y.sort(($,J)=>(0,_.compareItemsByFuzzyScore)($,J,Z,!1,X,this.pickState.scorerCache))}createFileQueryCache(){return new y.FileQueryCacheState(Z=>this.fileQueryBuilder.file(this.contextService.getWorkspace().folders,this.getFileQueryOptions({cacheKey:Z})),Z=>this.searchService.fileSearch(Z),Z=>this.searchService.clearCache(Z),this.pickState.fileQueryCache).load()}async getFilePicks(Z,j,X){if(!Z.normalized)return[];const Y=await this.getAbsolutePathFileResult(Z,X);if(X.isCancellationRequested)return[];let $;if(Y){if(j.has(Y))return[];const ee=this.createAnythingPick(Y,this.configuration);return ee.highlights={label:[{start:0,end:ee.label.length}],description:ee.description?[{start:0,end:ee.description.length}]:void 0},[ee]}if(this.pickState.fileQueryCache?.isLoaded?$=await this.doFileSearch(Z,X):$=await this.fileQueryDelayer.trigger(async()=>X.isCancellationRequested?[]:this.doFileSearch(Z,X)),X.isCancellationRequested)return[];const J=this.configuration;return $.filter(ee=>!j.has(ee)).map(ee=>this.createAnythingPick(ee,J))}async doFileSearch(Z,j){const[X,Y]=await Promise.all([this.getFileSearchResults(Z,j),this.getRelativePathFileResults(Z,j)]);if(j.isCancellationRequested)return[];if(!Y)return X;const $=new x.ResourceMap;for(const J of Y)$.set(J,!0);return[...X.filter(J=>!$.has(J)),...Y]}async getFileSearchResults(Z,j){let X="";Z.values&&Z.values.length>1?X=Z.values[0].original:X=Z.original;const Y=await this.doGetFileSearchResults(X,j);if(j.isCancellationRequested)return[];if(Y.limitHit&&Z.values&&Z.values.length>1){const $=await this.doGetFileSearchResults(Z.original,j);if(j.isCancellationRequested)return[];const J=new x.ResourceMap;for(const ee of Y.results)J.set(ee.resource,!0);for(const ee of $.results)J.has(ee.resource)||Y.results.push(ee)}return Y.results.map($=>$.resource)}doGetFileSearchResults(Z,j){return this.searchService.fileSearch(this.fileQueryBuilder.file(this.contextService.getWorkspace().folders,this.getFileQueryOptions({filePattern:Z,cacheKey:this.pickState.fileQueryCache?.cacheKey,maxResults:vi.MAX_RESULTS})),j)}getFileQueryOptions(Z){return{_reason:"openFileHandler",extraFileResources:this.instantiationService.invokeFunction(D.getOutOfWorkspaceEditorResources),filePattern:Z.filePattern||"",cacheKey:Z.cacheKey,maxResults:Z.maxResults||0,sortByScore:!0}}async getAbsolutePathFileResult(Z,j){if(!Z.containsPathSeparator)return;const X=await this.pathService.userHome(),Y=(0,v.untildify)(Z.original,X.scheme===R.Schemas.file?X.fsPath:X.path);if(j.isCancellationRequested)return;const $=(await this.pathService.path).isAbsolute(Y);if(!j.isCancellationRequested&&$){const J=(0,c.toLocalResource)(await this.pathService.fileURI(Y),this.environmentService.remoteAuthority,this.pathService.defaultUriScheme);if(j.isCancellationRequested)return;try{if((await this.fileService.stat(J)).isFile)return J}catch{}}}async getRelativePathFileResults(Z,j){if(!Z.containsPathSeparator)return;if(!(await this.pathService.path).isAbsolute(Z.original)){const Y=[];for(const $ of this.contextService.getWorkspace().folders){if(j.isCancellationRequested)break;const J=(0,c.toLocalResource)($.toResource(Z.original),this.environmentService.remoteAuthority,this.pathService.defaultUriScheme);try{(await this.fileService.stat(J)).isFile&&Y.push(J)}catch{}}return Y}}async getWorkspaceSymbolPicks(Z,j){const X=this.configuration;return!Z.normalized||!X.includeSymbols||this.pickState.lastRange?[]:this.workspaceSymbolsQuickAccess.getSymbolPicks(Z.original,{skipLocal:!0,skipSorting:!0,delay:vi.TYPING_SEARCH_DELAY},j)}getEditorSymbolPicks(Z,j,X){const Y=Z.original.split(M.GotoSymbolQuickAccessProvider.PREFIX),$=Y.length>1?Y[Y.length-1].trim():void 0;if(typeof $!="string")return null;const J=this.pickState.lastGlobalPicks?.active;if(!J)return null;const ee=J.resource;return!ee||!this.fileService.hasProvider(ee)&&ee.scheme!==R.Schemas.untitled||(J.label.includes(M.GotoSymbolQuickAccessProvider.PREFIX)||J.description?.includes(M.GotoSymbolQuickAccessProvider.PREFIX))&&Y.length<3?null:this.doGetEditorSymbolPicks(J,ee,$,j,X)}async doGetEditorSymbolPicks(Z,j,X,Y,$){try{this.pickState.rememberEditorViewState(),await this.editorService.openEditor({resource:j,options:{preserveFocus:!0,revealIfOpened:!0,ignoreError:!0}})}catch{return[]}if($.isCancellationRequested)return[];let J=this.modelService.getModel(j);if(!J)try{const te=Y.add(await this.textModelService.createModelReference(j));if($.isCancellationRequested)return[];J=te.object.textEditorModel}catch{return[]}const ee=await this.editorSymbolsQuickAccess.getSymbolPicks(J,X,{extraContainerLabel:(0,H.stripIcons)(Z.label)},Y,$);return $.isCancellationRequested?[]:ee.map(te=>te.type==="separator"?te:{...te,resource:j,description:te.description,trigger:(se,ie)=>(this.openAnything(j,{keyMods:ie,range:te.range?.selection,forceOpenSideBySide:!0}),f.TriggerAction.CLOSE_PICKER),accept:(se,ie)=>this.openAnything(j,{keyMods:se,range:te.range?.selection,preserveFocus:ie.inBackground,forcePinned:ie.inBackground})})}addDecorations(Z,j){this.editorSymbolsQuickAccess.addDecorations(Z,j)}clearDecorations(Z){this.editorSymbolsQuickAccess.clearDecorations(Z)}createAnythingPick(Z,j){const X=!o.URI.isUri(Z);let Y,$,J,ee,te;(0,g.isEditorInput)(Z)?(Y=g.EditorResourceAccessor.getOriginalUri(Z),$=Z.getName(),J=Z.getDescription(),ee=Z.isDirty()&&!Z.isSaving(),te=Z.getLabelExtraClasses()):(Y=o.URI.isUri(Z)?Z:Z.resource,$=(0,c.basenameOrAuthority)(Y),J=this.labelService.getUriLabel((0,c.dirname)(Y),{relative:!0}),ee=this.workingCopyService.isDirty(Y)&&!j.shortAutoSaveDelay,te=[]);const se=J?`${$} ${J}`:$;return{resource:Y,label:$,ariaLabel:ee?(0,a.localize)(4,null,se):se,description:J,iconClasses:(0,r.getIconClasses)(this.modelService,this.languageService,Y).concat(te),buttons:(()=>{const ie=j.openSideBySideDirection,ce=[];return ce.push({iconClass:ie==="right"?z.Codicon.splitHorizontal.classNames:z.Codicon.splitVertical.classNames,tooltip:ie==="right"?(0,a.localize)(5,null):(0,a.localize)(6,null)}),X&&ce.push({iconClass:ee?"dirty-anything "+z.Codicon.circleFilled.classNames:z.Codicon.close.classNames,tooltip:(0,a.localize)(7,null),alwaysVisible:ee}),ce})(),trigger:(ie,ce)=>{switch(ie){case 0:return this.openAnything(Z,{keyMods:ce,range:this.pickState.lastRange,forceOpenSideBySide:!0}),f.TriggerAction.CLOSE_PICKER;case 1:if(!o.URI.isUri(Z))return this.historyService.removeFromHistory(Z),f.TriggerAction.REMOVE_ITEM}return f.TriggerAction.NO_ACTION},accept:(ie,ce)=>this.openAnything(Z,{keyMods:ie,range:this.pickState.lastRange,preserveFocus:ce.inBackground,forcePinned:ce.inBackground})}}async openAnything(Z,j){const X={preserveFocus:j.preserveFocus,pinned:j.keyMods?.ctrlCmd||j.forcePinned||this.configuration.openEditorPinned,selection:j.range?m.Range.collapseToStart(j.range):void 0},Y=j.keyMods?.alt||this.configuration.openEditorPinned&&j.keyMods?.ctrlCmd||j.forceOpenSideBySide?d.SIDE_GROUP:d.ACTIVE_GROUP;if(Y===d.SIDE_GROUP&&await this.pickState.restoreEditorViewState(),(0,g.isEditorInput)(Z))await this.editorService.openEditor(Z,X,Y);else{let $;o.URI.isUri(Z)?$={resource:Z,options:X}:$={...Z,options:{...Z.options,...X}},await this.editorService.openEditor($,Y)}}};G.PREFIX="",G.NO_RESULTS_PICK={label:(0,a.localize)(0,null)},G.MAX_RESULTS=512,G.TYPING_SEARCH_DELAY=200,G=Ee([W(0,k.IInstantiationService),W(1,I.ISearchService),W(2,w.IWorkspaceContextService),W(3,C.IPathService),W(4,i.IWorkbenchEnvironmentService),W(5,S.IFileService),W(6,l.ILabelService),W(7,p.IModelService),W(8,u.ILanguageService),W(9,n.IWorkingCopyService),W(10,h.IConfigurationService),W(11,d.IEditorService),W(12,T.IHistoryService),W(13,O.IFilesConfigurationService),W(14,N.ITextModelService),W(15,U.IUriIdentityService)],G),e.AnythingQuickAccessProvider=G}),define(ne[638],re([1,0,6,48,19,9,52,1721,54,5,24,27,44,214,324,2680,505,101,83,135,8,60,174,451]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getOrMakeSearchEditorInput=e.SearchEditorInput=e.SEARCH_EDITOR_EXT=void 0,e.SEARCH_EDITOR_EXT=".code-search";let h=class Sn extends n.EditorInput{constructor(m,b,E,y,T,R,O,x,F,L){super();if(this.modelUri=m,this.backingUri=b,this.modelService=E,this.textFileService=y,this.fileDialogService=T,this.instantiationService=R,this.workingCopyService=O,this.telemetryService=x,this.pathService=F,this.dirty=!1,this._onDidChangeContent=this._register(new t.Emitter),this.onDidChangeContent=this._onDidChangeContent.event,this._onDidSave=this._register(new t.Emitter),this.onDidSave=this._onDidSave.event,this.oldDecorationsIDs=[],this.model=R.createInstance(S.SearchEditorModel,m),this.modelUri.scheme!==i.SearchEditorScheme)throw Error("SearchEditorInput must be invoked with a SearchEditorScheme uri");this.memento=new c.Memento(Sn.ID,L),L.onWillSaveState(()=>this.memento.saveMemento());const M=this,N=new class{constructor(){this.typeId=i.SearchEditorWorkingCopyTypeId,this.resource=M.modelUri,this.capabilities=M.hasCapability(4)?2:0,this.onDidChangeDirty=M.onDidChangeDirty,this.onDidChangeContent=M.onDidChangeContent,this.onDidSave=M.onDidSave}get name(){return M.getName()}isDirty(){return M.isDirty()}backup(B){return M.backup(B)}save(B){return M.save(0,B).then(P=>!!P)}revert(B){return M.revert(0,B)}};this._register(this.workingCopyService.registerWorkingCopy(N))}get typeId(){return Sn.ID}get editorId(){return this.typeId}get capabilities(){let m=8;return this.backingUri||(m|=4),m}get resource(){return this.backingUri||this.modelUri}async save(m,b){if(!(await this.resolveModels()).resultsModel.isDisposed())return this.backingUri?(await this.textFileService.write(this.backingUri,await this.serializeForDisk(),b),this.setDirty(!1),this._onDidSave.fire({reason:b?.reason,source:b?.source}),this):this.saveAs(m,b)}tryReadConfigSync(){return this._cachedConfigurationModel?.config}async serializeForDisk(){const{configurationModel:m,resultsModel:b}=await this.resolveModels();return(0,s.serializeSearchConfiguration)(m.config)+` `+b.getValue()}registerConfigChangeListeners(m){this.configChangeListenerDisposable?.dispose(),this.isDisposed()||(this.configChangeListenerDisposable=m.onConfigDidUpdate(()=>{this.getName()!==this.getName()&&this._onDidChangeLabel.fire(),this.memento.getMemento(1,1).searchConfig=m.config}),this._register(this.configChangeListenerDisposable))}async resolveModels(){return this.model.resolve().then(m=>{const b=this.getName();return this._cachedResultsModel=m.resultsModel,this._cachedConfigurationModel=m.configurationModel,b!==this.getName()&&this._onDidChangeLabel.fire(),this.registerConfigChangeListeners(m.configurationModel),m})}async saveAs(m,b){const E=await this.fileDialogService.pickFileToSave(await this.suggestFileName(),b?.availableFileSystems);if(E){this.telemetryService.publicLog2("searchEditor/saveSearchResults");const y=await this.serializeForDisk();if(await this.textFileService.create([{resource:E,value:y,options:{overwrite:!0}}])){if(this.setDirty(!1),!(0,_.isEqual)(E,this.modelUri)){const T=this.instantiationService.invokeFunction(e.getOrMakeSearchEditorInput,{fileUri:E,from:"existingFile"});return T.setMatchRanges(this.getMatchRanges()),T}return this}}}getName(m=12){const b=y=>y.length<m?y:`${y.slice(0,m-3)}...`;if(this.backingUri){const y=o.EditorResourceAccessor.getOriginalUri(this);return(0,D.localize)(0,null,(0,f.basename)((y??this.backingUri).path,e.SEARCH_EDITOR_EXT))}const E=this._cachedConfigurationModel?.config?.query?.trim();return E?(0,D.localize)(1,null,b(E)):(0,D.localize)(2,null)}setDirty(m){const b=this.dirty;this.dirty=m,b!==m&&this._onDidChangeDirty.fire()}isDirty(){return this.dirty}async rename(m,b){if((0,_.extname)(b)===e.SEARCH_EDITOR_EXT)return{editor:this.instantiationService.invokeFunction(e.getOrMakeSearchEditorInput,{from:"existingFile",fileUri:b})}}dispose(){this.modelService.destroyModel(this.modelUri),super.dispose()}matches(m){return super.matches(m)?!0:m instanceof Sn?!!(m.modelUri.fragment&&m.modelUri.fragment===this.modelUri.fragment)||!!(m.backingUri&&(0,_.isEqual)(m.backingUri,this.backingUri)):!1}getMatchRanges(){return(this._cachedResultsModel?.getAllDecorations()??[]).filter(m=>m.options.className===i.SearchEditorFindMatchClass).filter(({range:m})=>!(m.startColumn===1&&m.endColumn===1)).map(({range:m})=>m)}async setMatchRanges(m){this.oldDecorationsIDs=(await this.resolveModels()).resultsModel.deltaDecorations(this.oldDecorationsIDs,m.map(b=>({range:b,options:{description:"search-editor-find-match",className:i.SearchEditorFindMatchClass,stickiness:1}})))}async revert(m,b){if(b?.soft){this.setDirty(!1);return}if(this.backingUri){const{config:E,text:y}=await this.instantiationService.invokeFunction(s.parseSavedSearchEditor,this.backingUri),{resultsModel:T,configurationModel:R}=await this.resolveModels();T.setValue(y),R.updateConfig(E)}else(await this.resolveModels()).resultsModel.setValue("");super.revert(m,b),this.setDirty(!1)}async backup(m){const b=await this.serializeForDisk();return m.isCancellationRequested?{}:{content:(0,a.bufferToReadable)(a.VSBuffer.fromString(b))}}async suggestFileName(){const b=((await this.resolveModels()).configurationModel.config.query.replace(/[^\w \-_]+/g,"_")||"Search")+e.SEARCH_EDITOR_EXT;return(0,_.joinPath)(await this.fileDialogService.defaultFilePath(this.pathService.defaultUriScheme),b)}toUntyped(){if(!this.hasCapability(4))return{resource:this.resource,options:{override:Sn.ID}}}};h.ID=i.SearchEditorInputTypeId,h=Ee([W(2,k.IModelService),W(3,r.ITextFileService),W(4,I.IFileDialogService),W(5,w.IInstantiationService),W(6,p.IWorkingCopyService),W(7,C.ITelemetryService),W(8,l.IPathService),W(9,v.IStorageService)],h),e.SearchEditorInput=h;const g=(d,m)=>{const b=d.get(v.IStorageService),E=d.get(u.IConfigurationService),y=d.get(w.IInstantiationService),T=m.from==="model"?m.modelUri:A.URI.from({scheme:i.SearchEditorScheme,fragment:`${Math.random()}`});if(!S.searchEditorModelFactory.models.has(T))if(m.from==="existingFile")y.invokeFunction(R=>S.searchEditorModelFactory.initializeModelFromExistingFile(R,T,m.fileUri));else{const R=E.getValue("search").searchEditor,O=R.reusePriorSearchConfiguration,x=R.defaultNumberOfContextLines,F=O?new c.Memento(h.ID,b).getMemento(1,1).searchConfig:{},M={...(0,s.defaultSearchConfig)(),...F,...m.config};x!=null&&(M.contextLines=m?.config?.contextLines??x),m.from==="rawData"?(m.resultsContents&&(M.contextLines=0),y.invokeFunction(N=>S.searchEditorModelFactory.initializeModelFromRawData(N,T,M,m.resultsContents))):y.invokeFunction(N=>S.searchEditorModelFactory.initializeModelFromExistingModel(N,T,M))}return y.createInstance(h,T,m.from==="existingFile"?m.fileUri:m.from==="model"?m.backupOf:void 0)};e.getOrMakeSearchEditorInput=g}),define(ne[337],re([1,0,10,36,222,14,1712,95,28,8,38,45,71,12,43,360,323,417,588,335,324,638,21,192,56]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.focusSearchListCommand=e.clearHistoryCommand=e.copyAllCommand=e.copyMatchCommand=e.copyPathCommand=e.ReplaceAction=e.ReplaceAllInFolderAction=e.ReplaceAllAction=e.RemoveAction=e.AbstractSearchAndReplaceAction=e.FocusPreviousSearchResultAction=e.FocusNextSearchResultAction=e.collapseDeepestExpandedLevel=e.refreshSearch=e.cancelSearch=e.clearSearchResults=e.expandAll=e.ToggleSearchOnTypeAction=e.CloseReplaceAction=e.ReplaceInFilesAction=e.FindInFilesCommand=e.FindOrReplaceInFilesAction=e.FocusPreviousInputAction=e.FocusNextInputAction=e.togglePreserveCaseCommand=e.toggleRegexCommand=e.toggleWholeWordCommand=e.toggleCaseSensitiveCommand=e.getSearchView=e.openSearchView=e.appendKeyBindingLabel=e.isSearchViewFocused=void 0;function d(be){const Ce=E(be),ve=document.activeElement;return!!(Ce&&ve&&t.isAncestor(ve,Ce.getContainer()))}e.isSearchViewFocused=d;function m(be,Ce,ve){if(typeof Ce=="number"){const he=(0,_.createKeybinding)(Ce,A.OS);if(he){const ge=ve.resolveKeybinding(he);return y(be,ge.length>0?ge[0]:void 0)}return y(be,void 0)}else return y(be,Ce)}e.appendKeyBindingLabel=m;function b(be,Ce){return be.openView(h.VIEW_ID,Ce).then(ve=>ve??void 0)}e.openSearchView=b;function E(be){return be.getActiveViewWithId(h.VIEW_ID)??void 0}e.getSearchView=E;function y(be,Ce){return Ce?be+" ("+Ce.getLabel()+")":be}const T=be=>{const Ce=E(be.get(i.IViewsService));Ce&&Ce.toggleCaseSensitive()};e.toggleCaseSensitiveCommand=T;const R=be=>{const Ce=E(be.get(i.IViewsService));Ce&&Ce.toggleWholeWords()};e.toggleWholeWordCommand=R;const O=be=>{const Ce=E(be.get(i.IViewsService));Ce&&Ce.toggleRegex()};e.toggleRegexCommand=O;const x=be=>{const Ce=E(be.get(i.IViewsService));Ce&&Ce.togglePreserveCase()};e.togglePreserveCaseCommand=x;let F=class extends f.Action{constructor(Ce,ve,he,ge){super(Ce,ve);this.viewsService=he,this.editorService=ge}async run(){this.editorService.activeEditor instanceof a.SearchEditorInput&&this.editorService.activeEditorPane.focusNextInput();const ve=E(this.viewsService);ve&&ve.focusNextInputBox()}};F.ID="search.focus.nextInputBox",F=Ee([W(2,i.IViewsService),W(3,n.IEditorService)],F),e.FocusNextInputAction=F;let L=class extends f.Action{constructor(Ce,ve,he,ge){super(Ce,ve);this.viewsService=he,this.editorService=ge}async run(){this.editorService.activeEditor instanceof a.SearchEditorInput&&this.editorService.activeEditorPane.focusPrevInput();const ve=E(this.viewsService);ve&&ve.focusPreviousInputBox()}};L.ID="search.focus.previousInputBox",L=Ee([W(2,i.IViewsService),W(3,n.IEditorService)],L),e.FocusPreviousInputAction=L;class M extends f.Action{constructor(Ce,ve,he,ge){super(Ce,ve);this.viewsService=he,this.expandSearchReplaceWidget=ge}run(){return b(this.viewsService,!1).then(Ce=>{if(Ce){Ce.searchAndReplaceWidget.toggleReplace(this.expandSearchReplaceWidget);const he=Ce.updateTextFromFindWidgetOrSelection({allowUnselectedWord:!this.expandSearchReplaceWidget});Ce.searchAndReplaceWidget.focus(void 0,he,he)}})}}e.FindOrReplaceInFilesAction=M;const N=(be,Ce={})=>{const he=be.get(w.IConfigurationService).getValue().search.mode;if(he==="view"){const ge=be.get(i.IViewsService);b(ge,!1).then(de=>{if(de){de.searchAndReplaceWidget.toggleReplace(typeof Ce.replace=="string");let we=!1;typeof Ce.query=="string"?de.setSearchParameters(Ce):we=de.updateTextFromFindWidgetOrSelection({allowUnselectedWord:typeof Ce.replace!="string"}),de.searchAndReplaceWidget.focus(void 0,we,we)}})}else{const ge=de=>({location:he==="newEditor"?"new":"reuse",query:de.query,filesToInclude:de.filesToInclude,filesToExclude:de.filesToExclude,matchWholeWord:de.matchWholeWord,isCaseSensitive:de.isCaseSensitive,isRegexp:de.isRegex,useExcludeSettingsAndIgnoreFiles:de.useExcludeSettingsAndIgnoreFiles,onlyOpenEditors:de.onlyOpenEditors,showIncludesExcludes:!!(de.filesToExclude||de.filesToExclude||!de.useExcludeSettingsAndIgnoreFiles)});be.get(I.ICommandService).executeCommand(u.OpenEditorCommandId,ge(Ce))}};e.FindInFilesCommand=N;let B=class extends M{constructor(Ce,ve,he){super(Ce,ve,he,!0)}};B.ID="workbench.action.replaceInFiles",B.LABEL=k.localize(0,null),B=Ee([W(2,i.IViewsService)],B),e.ReplaceInFilesAction=B;let P=class extends f.Action{constructor(Ce,ve,he){super(Ce,ve);this.viewsService=he}run(){const Ce=E(this.viewsService);return Ce&&(Ce.searchAndReplaceWidget.toggleReplace(!1),Ce.searchAndReplaceWidget.focus()),Promise.resolve(null)}};P=Ee([W(2,i.IViewsService)],P),e.CloseReplaceAction=P;let V=class ls extends f.Action{constructor(Ce,ve,he){super(Ce,ve);this.configurationService=he}run(){const Ce=this.configurationService.getValue(ls.searchOnTypeKey);return this.configurationService.updateValue(ls.searchOnTypeKey,!Ce)}};V.ID="workbench.action.toggleSearchOnType",V.LABEL=k.localize(1,null),V.searchOnTypeKey="search.searchOnType",V=Ee([W(2,w.IConfigurationService)],V),e.ToggleSearchOnTypeAction=V;function z(be){const Ce=be.get(i.IViewsService),ve=E(Ce);if(ve){const he=ve.getControl();he.expandAll(),he.domFocus(),he.focusFirst()}}e.expandAll=z;function U(be){const Ce=be.get(i.IViewsService),ve=E(Ce);ve&&ve.clearSearchResults()}e.clearSearchResults=U;function H(be){const Ce=be.get(i.IViewsService),ve=E(Ce);ve&&ve.cancelSearch()}e.cancelSearch=H;function K(be){const Ce=be.get(i.IViewsService),ve=E(Ce);ve&&ve.triggerQueryChange({preserveFocus:!1})}e.refreshSearch=K;function G(be){const Ce=be.get(i.IViewsService),ve=E(Ce);if(ve){const he=ve.getControl(),ge=he.navigate();let de=ge.first(),Se=!1;if(de instanceof p.FolderMatch){for(;de=ge.next();)if(de instanceof p.Match){Se=!0;break}}if(Se){de=ge.first();do de instanceof p.FileMatch&&he.collapse(de);while(de=ge.next())}else he.collapseAll();he.domFocus(),he.focusFirst()}}e.collapseDeepestExpandedLevel=G;let q=class extends f.Action{constructor(Ce,ve,he,ge){super(Ce,ve);this.viewsService=he,this.editorService=ge}async run(){return this.editorService.activeEditor instanceof a.SearchEditorInput?this.editorService.activeEditorPane.focusNextResult():b(this.viewsService).then(ve=>{ve&&ve.selectNextMatch()})}};q.ID="search.action.focusNextSearchResult",q.LABEL=k.localize(2,null),q=Ee([W(2,i.IViewsService),W(3,n.IEditorService)],q),e.FocusNextSearchResultAction=q;let Z=class extends f.Action{constructor(Ce,ve,he,ge){super(Ce,ve);this.viewsService=he,this.editorService=ge}async run(){return this.editorService.activeEditor instanceof a.SearchEditorInput?this.editorService.activeEditorPane.focusPreviousResult():b(this.viewsService).then(ve=>{ve&&ve.selectPreviousMatch()})}};Z.ID="search.action.focusPreviousSearchResult",Z.LABEL=k.localize(3,null),Z=Ee([W(2,i.IViewsService),W(3,n.IEditorService)],Z),e.FocusPreviousSearchResultAction=Z;class j extends f.Action{getElementToFocusAfterRemoved(Ce,ve){return this.getNextElementAfterRemoved(Ce,ve)||this.getPreviousElementAfterRemoved(Ce,ve)}getNextElementAfterRemoved(Ce,ve){const he=Ce.navigate(ve);if(ve instanceof p.FolderMatch)for(;!!he.next()&&!(he.current()instanceof p.FolderMatch););else if(ve instanceof p.FileMatch)for(;!!he.next()&&!(he.current()instanceof p.FileMatch););else for(;he.next()&&!(he.current()instanceof p.Match);)Ce.expand(he.current());return he.current()}getPreviousElementAfterRemoved(Ce,ve){const he=Ce.navigate(ve);let ge=he.previous();const de=ve.parent();return de===ge&&(ge=he.previous()),de instanceof p.FileMatch&&de.parent()===ge&&(ge=he.previous()),ve instanceof p.Match&&ge&&ge instanceof p.FolderMatch&&(he.next(),Ce.expand(ge),ge=he.previous()),ve instanceof p.Match&&ge&&ge instanceof p.FileMatch&&(he.next(),Ce.expand(ge),ge=he.previous()),ge}}e.AbstractSearchAndReplaceAction=j;let X=class el extends j{constructor(Ce,ve,he){super(s.RemoveActionId,m(el.LABEL,he.lookupKeybinding(s.RemoveActionId),he),c.ThemeIcon.asClassName(S.searchRemoveIcon));this.viewer=Ce,this.element=ve}run(){const Ce=this.viewer.getFocus()[0],ve=!Ce||Ce instanceof p.SearchResult||Y(Ce,this.element)?this.getElementToFocusAfterRemoved(this.viewer,this.element):null;return ve&&(this.viewer.reveal(ve),this.viewer.setFocus([ve],(0,o.getSelectionKeyboardEvent)()),this.viewer.setSelection([ve],(0,o.getSelectionKeyboardEvent)())),this.element.parent().remove(this.element),this.viewer.domFocus(),Promise.resolve()}};X.LABEL=k.localize(4,null),X=Ee([W(2,v.IKeybindingService)],X),e.RemoveAction=X;function Y(be,Ce){do if(be===Ce)return!0;while(!(be.parent()instanceof p.SearchResult)&&(be=be.parent()));return!1}let $=class tl extends j{constructor(Ce,ve,he){super(s.ReplaceAllInFileActionId,m(tl.LABEL,he.lookupKeybinding(s.ReplaceAllInFileActionId),he),c.ThemeIcon.asClassName(S.searchReplaceAllIcon));this.viewlet=Ce,this.fileMatch=ve}run(){const Ce=this.viewlet.getControl(),ve=this.getElementToFocusAfterRemoved(Ce,this.fileMatch);return this.fileMatch.parent().replace(this.fileMatch).then(()=>{ve&&(Ce.setFocus([ve],(0,o.getSelectionKeyboardEvent)()),Ce.setSelection([ve],(0,o.getSelectionKeyboardEvent)())),Ce.domFocus(),this.viewlet.open(this.fileMatch,!0)})}};$.LABEL=k.localize(5,null),$=Ee([W(2,v.IKeybindingService)],$),e.ReplaceAllAction=$;let J=class il extends j{constructor(Ce,ve,he){super(s.ReplaceAllInFolderActionId,m(il.LABEL,he.lookupKeybinding(s.ReplaceAllInFolderActionId),he),c.ThemeIcon.asClassName(S.searchReplaceAllIcon));this.viewer=Ce,this.folderMatch=ve}run(){const Ce=this.getElementToFocusAfterRemoved(this.viewer,this.folderMatch);return this.folderMatch.replaceAll().then(()=>{Ce&&(this.viewer.setFocus([Ce],(0,o.getSelectionKeyboardEvent)()),this.viewer.setSelection([Ce],(0,o.getSelectionKeyboardEvent)())),this.viewer.domFocus()})}};J.LABEL=k.localize(6,null),J=Ee([W(2,v.IKeybindingService)],J),e.ReplaceAllInFolderAction=J;let ee=class nl extends j{constructor(Ce,ve,he,ge,de,Se,we,ye){super(s.ReplaceActionId,m(nl.LABEL,de.lookupKeybinding(s.ReplaceActionId),de),c.ThemeIcon.asClassName(S.searchReplaceIcon));this.viewer=Ce,this.element=ve,this.viewlet=he,this.replaceService=ge,this.editorService=Se,this.configurationService=we,this.uriIdentityService=ye}async run(){this.enabled=!1,await this.element.parent().replace(this.element);const Ce=this.getElementToFocusAfterReplace();Ce&&(this.viewer.setFocus([Ce],(0,o.getSelectionKeyboardEvent)()),this.viewer.setSelection([Ce],(0,o.getSelectionKeyboardEvent)()));const ve=this.getElementToShowReplacePreview(Ce);this.viewer.domFocus(),!this.configurationService.getValue().search.useReplacePreview||!ve||this.hasToOpenFile()?this.viewlet.open(this.element,!0):this.replaceService.openReplacePreview(ve,!0)}getElementToFocusAfterReplace(){const Ce=this.viewer.navigate();let ve=!1,he=null;do if(he=Ce.current(),he instanceof p.Match){if(he.parent().id()===this.element.parent().id()){if(ve=!0,this.element.range().getStartPosition().isBeforeOrEqual(he.range().getStartPosition()))break}else if(ve)break}else if(ve&&this.viewer.isCollapsed(he))break;while(Ce.next());return he}getElementToShowReplacePreview(Ce){if(this.hasSameParent(Ce))return Ce;const ve=this.getPreviousElementAfterRemoved(this.viewer,this.element);return this.hasSameParent(ve)?ve:null}hasSameParent(Ce){return Ce&&Ce instanceof p.Match&&this.uriIdentityService.extUri.isEqual(Ce.parent().resource,this.element.parent().resource)}hasToOpenFile(){const ve=this.editorService.activeEditor?.resource;return ve?this.uriIdentityService.extUri.isEqual(ve,this.element.parent().resource):!1}};ee.LABEL=k.localize(7,null),ee.runQ=Promise.resolve(),ee=Ee([W(3,l.IReplaceService),W(4,v.IKeybindingService),W(5,n.IEditorService),W(6,w.IConfigurationService),W(7,g.IUriIdentityService)],ee),e.ReplaceAction=ee;const te=async(be,Ce)=>{if(!Ce){const de=oe(be);if(!(de instanceof p.FileMatch||de instanceof p.FolderMatchWithResource))return;Ce=de}const ve=be.get(D.IClipboardService),ge=be.get(C.ILabelService).getUriLabel(Ce.resource,{noPrefix:!0});await ve.writeText(ge)};e.copyPathCommand=te;function se(be,Ce=0){const ve=()=>`${be.range().startLineNumber},${be.range().startColumn}`,he=we=>be.range().startLineNumber+we+"",ge=be.fullPreviewLines(),de=ge.reduce((we,ye,ke)=>{const Ie=ke===0?ve().length:he(ke).length;return Math.max(Ie,we)},0);return ge.map((we,ye)=>{const ke=ye===0?ve():he(ye),Ie=" ".repeat(de-ke.length);return`${" ".repeat(Ce)}${ke}: ${Ie}${we}`}).join(` `)}const ie=A.isWindows?`\r `:` `;function ce(be,Ce){const ve=be.matches().sort(p.searchMatchComparer).map(ge=>se(ge,2));return{text:`${Ce.getUriLabel(be.resource,{noPrefix:!0})}${ie}${ve.join(ie)}`,count:ve.length}}function le(be,Ce){const ve=[];let he=0;return be.matches().sort(p.searchMatchComparer).forEach(de=>{const Se=ce(de,Ce);he+=Se.count,ve.push(Se.text)}),{text:ve.join(ie+ie),count:he}}const ae=async(be,Ce)=>{if(!Ce){const de=oe(be);if(!de)return;Ce=de}const ve=be.get(D.IClipboardService),he=be.get(C.ILabelService);let ge;Ce instanceof p.Match?ge=se(Ce):Ce instanceof p.FileMatch?ge=ce(Ce,he).text:Ce instanceof p.FolderMatch&&(ge=le(Ce,he).text),ge&&await ve.writeText(ge)};e.copyMatchCommand=ae;function ue(be,Ce){const ve=[];be=be.sort(p.searchMatchComparer);for(let he=0;he<be.length;he++){const ge=le(be[he],Ce);ge.count&&ve.push(ge.text)}return ve.join(ie+ie)}function oe(be){const Ce=be.get(i.IViewsService);return E(Ce)?.getControl().getSelection()[0]}const fe=async be=>{const Ce=be.get(i.IViewsService),ve=be.get(D.IClipboardService),he=be.get(C.ILabelService),ge=E(Ce);if(ge){const de=ge.searchResult,Se=ue(de.folderMatches(),he);await ve.writeText(Se)}};e.copyAllCommand=fe;const pe=be=>{be.get(r.ISearchHistoryService).clearHistory()};e.clearHistoryCommand=pe;const me=be=>{const Ce=be.get(i.IViewsService);b(Ce).then(ve=>{ve&&ve.moveFocusToResults()})};e.focusSearchListCommand=me}),define(ne[2701],re([1,0,10,78,258,2,48,1715,8,23,5,45,68,12,34,337,335,19]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SearchAccessibilityProvider=e.MatchRenderer=e.FileMatchRenderer=e.FolderMatchRenderer=e.SearchDelegate=void 0;class r{getHeight(g){return 22}getTemplateId(g){if(g instanceof s.FolderMatch)return p.TEMPLATE_ID;if(g instanceof s.FileMatch)return u.TEMPLATE_ID;if(g instanceof s.Match)return a.TEMPLATE_ID;throw console.error("Invalid search tree element",g),new Error("Invalid search tree element")}}e.SearchDelegate=r;let p=class rl extends A.Disposable{constructor(g,d,m,b,E,y){super();this.searchModel=g,this.searchView=d,this.labels=m,this.instantiationService=b,this.themeService=E,this.contextService=y,this.templateId=rl.TEMPLATE_ID}renderTemplate(g){const d=[],m=t.append(g,t.$(".foldermatch")),b=this.labels.create(m);d.push(b);const E=new _.CountBadge(t.append(m,t.$(".badge")));d.push((0,o.attachBadgeStyler)(E,this.themeService));const y=t.append(m,t.$(".actionBarContainer")),T=new f.ActionBar(y,{animated:!1});return d.push(T),{label:b,badge:E,actions:T,disposables:d}}renderElement(g,d,m){const b=g.element;if(b.resource){const T=this.contextService.getWorkspaceFolder(b.resource);T&&(0,l.isEqual)(T.uri,b.resource)?m.label.setFile(b.resource,{fileKind:w.FileKind.ROOT_FOLDER,hidePath:!0}):m.label.setFile(b.resource,{fileKind:w.FileKind.FOLDER})}else m.label.setLabel(D.localize(0,null));const E=b.fileCount();m.badge.setCount(E),m.badge.setTitleFormat(E>1?D.localize(1,null,E):D.localize(2,null,E)),m.actions.clear();const y=[];this.searchModel.isReplaceActive()&&E>0&&y.push(this.instantiationService.createInstance(S.ReplaceAllInFolderAction,this.searchView.getControl(),b)),y.push(this.instantiationService.createInstance(S.RemoveAction,this.searchView.getControl(),b)),m.actions.push(y,{icon:!0,label:!1})}disposeElement(g,d,m){}disposeTemplate(g){(0,A.dispose)(g.disposables)}};p.TEMPLATE_ID="folderMatch",p=Ee([W(3,v.IInstantiationService),W(4,c.IThemeService),W(5,i.IWorkspaceContextService)],p),e.FolderMatchRenderer=p;let u=class sl extends A.Disposable{constructor(g,d,m,b,E,y){super();this.searchModel=g,this.searchView=d,this.labels=m,this.instantiationService=b,this.themeService=E,this.contextService=y,this.templateId=sl.TEMPLATE_ID}renderTemplate(g){const d=[],m=t.append(g,t.$(".filematch")),b=this.labels.create(m);d.push(b);const E=new _.CountBadge(t.append(m,t.$(".badge")));d.push((0,o.attachBadgeStyler)(E,this.themeService));const y=t.append(m,t.$(".actionBarContainer")),T=new f.ActionBar(y,{animated:!1});return d.push(T),{el:m,label:b,badge:E,actions:T,disposables:d}}renderElement(g,d,m){const b=g.element;m.el.setAttribute("data-resource",b.resource.toString()),m.label.setFile(b.resource,{hideIcon:!1});const E=b.count();m.badge.setCount(E),m.badge.setTitleFormat(E>1?D.localize(3,null,E):D.localize(4,null,E)),m.actions.clear();const y=[];this.searchModel.isReplaceActive()&&E>0&&y.push(this.instantiationService.createInstance(S.ReplaceAllAction,this.searchView,b)),y.push(this.instantiationService.createInstance(S.RemoveAction,this.searchView.getControl(),b)),m.actions.push(y,{icon:!0,label:!1})}disposeElement(g,d,m){}disposeTemplate(g){(0,A.dispose)(g.disposables)}};u.TEMPLATE_ID="fileMatch",u=Ee([W(3,v.IInstantiationService),W(4,c.IThemeService),W(5,i.IWorkspaceContextService)],u),e.FileMatchRenderer=u;let a=class ol extends A.Disposable{constructor(g,d,m,b,E){super();this.searchModel=g,this.searchView=d,this.instantiationService=m,this.contextService=b,this.configurationService=E,this.templateId=ol.TEMPLATE_ID}renderTemplate(g){g.classList.add("linematch");const d=t.append(g,t.$("a.plain.match")),m=t.append(d,t.$("span")),b=t.append(d,t.$("span.findInFileMatch")),E=t.append(d,t.$("span.replaceMatch")),y=t.append(d,t.$("span")),T=t.append(g,t.$("span.matchLineNum")),R=t.append(g,t.$("span.actionBarContainer")),O=new f.ActionBar(R,{animated:!1});return{parent:d,before:m,match:b,replace:E,after:y,lineNumber:T,actions:O}}renderElement(g,d,m){const b=g.element,E=b.preview(),y=this.searchModel.isReplaceActive()&&!!this.searchModel.replaceString;m.before.textContent=E.before,m.match.textContent=E.inside,m.match.classList.toggle("replace",y),m.replace.textContent=y?b.replaceString:"",m.after.textContent=E.after,m.parent.title=(E.before+(y?b.replaceString:E.inside)+E.after).trim().substr(0,999);const T=b.range().endLineNumber-b.range().startLineNumber,R=T>0?`+${T}`:"",O=this.configurationService.getValue("search").showLineNumbers,x=O?`:${b.range().startLineNumber}`:"";m.lineNumber.classList.toggle("show",T>0||O),m.lineNumber.textContent=x+R,m.lineNumber.setAttribute("title",this.getMatchTitle(b,O)),m.actions.clear(),this.searchModel.isReplaceActive()?m.actions.push([this.instantiationService.createInstance(S.ReplaceAction,this.searchView.getControl(),b,this.searchView),this.instantiationService.createInstance(S.RemoveAction,this.searchView.getControl(),b)],{icon:!0,label:!1}):m.actions.push([this.instantiationService.createInstance(S.RemoveAction,this.searchView.getControl(),b)],{icon:!0,label:!1})}disposeElement(g,d,m){}disposeTemplate(g){g.actions.dispose()}getMatchTitle(g,d){const m=g.range().startLineNumber,b=g.range().endLineNumber-g.range().startLineNumber,E=d?D.localize(5,null,m,b)+" ":"",y=b>0?"+ "+D.localize(6,null,b):"";return E+y}};a.TEMPLATE_ID="match",a=Ee([W(2,v.IInstantiationService),W(3,i.IWorkspaceContextService),W(4,I.IConfigurationService)],a),e.MatchRenderer=a;let n=class{constructor(g,d){this.searchModel=g,this.labelService=d}getWidgetAriaLabel(){return D.localize(7,null)}getAriaLabel(g){if(g instanceof s.FolderMatch)return g.resource?D.localize(8,null,g.count(),g.name()):D.localize(9,null,g.count());if(g instanceof s.FileMatch){const d=this.labelService.getUriLabel(g.resource,{relative:!0})||g.resource.fsPath;return D.localize(10,null,g.count(),g.name(),k.dirname(d))}if(g instanceof s.Match){const d=g,m=this.searchModel,b=m.isReplaceActive()&&!!m.replaceString,E=d.getMatchString(),y=d.range(),T=d.text().substr(0,y.endColumn+150);return b?D.localize(11,null,E,d.replaceString,y.startColumn+1,T):D.localize(12,null,E,y.startColumn+1,T)}return null}};n=Ee([W(1,C.ILabelService)],n),e.SearchAccessibilityProvider=n}),define(ne[639],re([1,0,10,78,162,183,138,36,11,6,288,1717,95,8,7,37,38,94,68,12,236,337,323,98,14,244,43,360,324,348]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerContributions=e.SearchWidget=e.SingleLineInputHeight=void 0,e.SingleLineInputHeight=24;class T extends D.Action{constructor(N){super(T.ID,"",p.ThemeIcon.asClassName(b.searchReplaceAllIcon),!1);this._searchWidget=N}set searchWidget(N){this._searchWidget=N}run(){return this._searchWidget?this._searchWidget.triggerReplaceAll():Promise.resolve(null)}}T.ID="search.action.replaceAll";const R=g.isMacintosh?256:2048;function O(M,N,B){const P=!!N.match(/\n/);if(B&&(P||B.clientHeight>e.SingleLineInputHeight)&&B.selectionStart>0){M.stopPropagation();return}}function x(M,N,B){const P=!!N.match(/\n/);if(B&&(P||B.clientHeight>e.SingleLineInputHeight)&&B.selectionEnd<B.value.length){M.stopPropagation();return}}let F=class qi extends k.Widget{constructor(N,B,P,V,z,U,H,K,G){super();this.contextViewService=P,this.themeService=V,this.contextKeyService=z,this.keybindingService=U,this.clipboardServce=H,this.configurationService=K,this.accessibilityService=G,this.ignoreGlobalFindBufferOnNextFocus=!1,this.previousGlobalFindBufferValue=null,this._onSearchSubmit=this._register(new w.Emitter),this.onSearchSubmit=this._onSearchSubmit.event,this._onSearchCancel=this._register(new w.Emitter),this.onSearchCancel=this._onSearchCancel.event,this._onReplaceToggled=this._register(new w.Emitter),this.onReplaceToggled=this._onReplaceToggled.event,this._onReplaceStateChange=this._register(new w.Emitter),this.onReplaceStateChange=this._onReplaceStateChange.event,this._onPreserveCaseChange=this._register(new w.Emitter),this.onPreserveCaseChange=this._onPreserveCaseChange.event,this._onReplaceValueChanged=this._register(new w.Emitter),this.onReplaceValueChanged=this._onReplaceValueChanged.event,this._onReplaceAll=this._register(new w.Emitter),this.onReplaceAll=this._onReplaceAll.event,this._onBlur=this._register(new w.Emitter),this.onBlur=this._onBlur.event,this._onDidHeightChange=this._register(new w.Emitter),this.onDidHeightChange=this._onDidHeightChange.event,this._onDidToggleContext=new w.Emitter,this.onDidToggleContext=this._onDidToggleContext.event,this.replaceActive=n.ReplaceActiveKey.bindTo(this.contextKeyService),this.searchInputBoxFocused=n.SearchInputBoxFocusedKey.bindTo(this.contextKeyService),this.replaceInputBoxFocused=n.ReplaceInputBoxFocusedKey.bindTo(this.contextKeyService),this._replaceHistoryDelayer=new I.Delayer(500),this.render(N,B),this.configurationService.onDidChangeConfiguration(q=>{q.affectsConfiguration("editor.accessibilitySupport")&&this.updateAccessibilitySupport()}),this.accessibilityService.onDidChangeScreenReaderOptimized(()=>this.updateAccessibilitySupport()),this.updateAccessibilitySupport()}focus(N=!0,B=!1,P=!1){this.ignoreGlobalFindBufferOnNextFocus=P,B&&this.isReplaceShown()?(this.replaceInput.focus(),N&&this.replaceInput.select()):(this.searchInput.focus(),N&&this.searchInput.select())}setWidth(N){this.searchInput.inputBox.layout(),this.replaceInput.width=N-28,this.replaceInput.inputBox.layout()}clear(){this.searchInput.clear(),this.replaceInput.setValue(""),this.setReplaceAllActionState(!1)}isReplaceShown(){return!this.replaceContainer.classList.contains("disabled")}isReplaceActive(){return!!this.replaceActive.get()}getReplaceValue(){return this.replaceInput.getValue()}toggleReplace(N){(N===void 0||N!==this.isReplaceShown())&&this.onToggleReplaceButton()}getSearchHistory(){return this.searchInput.inputBox.getHistory()}getReplaceHistory(){return this.replaceInput.inputBox.getHistory()}clearHistory(){this.searchInput.inputBox.clearHistory(),this.replaceInput.inputBox.clearHistory()}showNextSearchTerm(){this.searchInput.inputBox.showNextValue()}showPreviousSearchTerm(){this.searchInput.inputBox.showPreviousValue()}showNextReplaceTerm(){this.replaceInput.inputBox.showNextValue()}showPreviousReplaceTerm(){this.replaceInput.inputBox.showPreviousValue()}searchInputHasFocus(){return!!this.searchInputBoxFocused.get()}replaceInputHasFocus(){return this.replaceInput.inputBox.hasFocus()}focusReplaceAllAction(){this.replaceActionBar.focus(!0)}focusRegexAction(){this.searchInput.focusOnRegex()}render(N,B){this.domNode=t.append(N,t.$(".search-widget")),this.domNode.style.position="relative",B._hideReplaceToggle||this.renderToggleReplaceButton(this.domNode),this.renderSearchInput(this.domNode,B),this.renderReplaceInput(this.domNode,B)}updateAccessibilitySupport(){this.searchInput.setFocusInputOnOptionClick(!this.accessibilityService.isScreenReaderOptimized())}renderToggleReplaceButton(N){const B={buttonBackground:void 0,buttonBorder:void 0,buttonForeground:void 0,buttonHoverBackground:void 0};this.toggleReplaceButton=this._register(new _.Button(N,B)),this.toggleReplaceButton.element.setAttribute("aria-expanded","false"),this.toggleReplaceButton.element.classList.add("toggle-replace-button"),this.toggleReplaceButton.icon=b.searchHideReplaceIcon,this.toggleReplaceButton.onDidClick(()=>this.onToggleReplaceButton()),this.toggleReplaceButton.element.title=C.localize(2,null)}renderSearchInput(N,B){const P={label:C.localize(3,null),validation:z=>this.validateSearchInput(z),placeholder:C.localize(4,null),appendCaseSensitiveLabel:(0,a.appendKeyBindingLabel)("",this.keybindingService.lookupKeybinding(n.ToggleCaseSensitiveCommandId),this.keybindingService),appendWholeWordsLabel:(0,a.appendKeyBindingLabel)("",this.keybindingService.lookupKeybinding(n.ToggleWholeWordCommandId),this.keybindingService),appendRegexLabel:(0,a.appendKeyBindingLabel)("",this.keybindingService.lookupKeybinding(n.ToggleRegexCommandId),this.keybindingService),history:B.searchHistory,showHistoryHint:()=>(0,y.showHistoryKeybindingHint)(this.keybindingService),flexibleHeight:!0,flexibleMaxHeight:qi.INPUT_MAX_HEIGHT},V=t.append(N,t.$(".search-container.input-box"));this.searchInput=this._register(new u.ContextScopedFindInput(V,this.contextViewService,P,this.contextKeyService,!0)),this._register((0,r.attachFindReplaceInputBoxStyler)(this.searchInput,this.themeService)),this.searchInput.onKeyDown(z=>this.onSearchInputKeyDown(z)),this.searchInput.setValue(B.value||""),this.searchInput.setRegex(!!B.isRegex),this.searchInput.setCaseSensitive(!!B.isCaseSensitive),this.searchInput.setWholeWords(!!B.isWholeWords),this._register(this.searchInput.onCaseSensitiveKeyDown(z=>this.onCaseSensitiveKeyDown(z))),this._register(this.searchInput.onRegexKeyDown(z=>this.onRegexKeyDown(z))),this._register(this.searchInput.inputBox.onDidChange(()=>this.onSearchInputChanged())),this._register(this.searchInput.inputBox.onDidHeightChange(()=>this._onDidHeightChange.fire())),this._register(this.onReplaceValueChanged(()=>{this._replaceHistoryDelayer.trigger(()=>this.replaceInput.inputBox.addToHistory())})),this.searchInputFocusTracker=this._register(t.trackFocus(this.searchInput.inputBox.inputElement)),this._register(this.searchInputFocusTracker.onDidFocus(async()=>{this.searchInputBoxFocused.set(!0);const z=this.searchConfiguration.globalFindClipboard;if(!this.ignoreGlobalFindBufferOnNextFocus&&z){const U=await this.clipboardServce.readFindText();U&&this.previousGlobalFindBufferValue!==U&&(this.searchInput.inputBox.addToHistory(),this.searchInput.setValue(U),this.searchInput.select()),this.previousGlobalFindBufferValue=U}this.ignoreGlobalFindBufferOnNextFocus=!1})),this._register(this.searchInputFocusTracker.onDidBlur(()=>this.searchInputBoxFocused.set(!1))),this.showContextToggle=new d.Toggle({isChecked:!1,title:(0,a.appendKeyBindingLabel)(C.localize(5,null),this.keybindingService.lookupKeybinding(E.ToggleSearchEditorContextLinesCommandId),this.keybindingService),icon:b.searchShowContextIcon}),this._register(this.showContextToggle.onChange(()=>this.onContextLinesChanged())),B.showContextToggle&&(this.contextLinesInput=new A.InputBox(V,this.contextViewService,{type:"number"}),this.contextLinesInput.element.classList.add("context-lines-input"),this.contextLinesInput.value=""+(this.configurationService.getValue("search").searchEditor.defaultNumberOfContextLines??1),this._register(this.contextLinesInput.onDidChange(()=>this.onContextLinesChanged())),this._register((0,r.attachInputBoxStyler)(this.contextLinesInput,this.themeService)),t.append(V,this.showContextToggle.domNode))}onContextLinesChanged(){this._onDidToggleContext.fire(),this.contextLinesInput.value.includes("-")&&(this.contextLinesInput.value="0"),this._onDidToggleContext.fire()}setContextLines(N){!this.contextLinesInput||(N===0?this.showContextToggle.checked=!1:(this.showContextToggle.checked=!0,this.contextLinesInput.value=""+N))}renderReplaceInput(N,B){this.replaceContainer=t.append(N,t.$(".replace-container.disabled"));const P=t.append(this.replaceContainer,t.$(".replace-input"));this.replaceInput=this._register(new u.ContextScopedReplaceInput(P,this.contextViewService,{label:C.localize(6,null),placeholder:C.localize(7,null),appendPreserveCaseLabel:(0,a.appendKeyBindingLabel)("",this.keybindingService.lookupKeybinding(n.TogglePreserveCaseId),this.keybindingService),history:B.replaceHistory,showHistoryHint:()=>(0,y.showHistoryKeybindingHint)(this.keybindingService),flexibleHeight:!0,flexibleMaxHeight:qi.INPUT_MAX_HEIGHT},this.contextKeyService,!0)),this._register(this.replaceInput.onDidOptionChange(V=>{V||this._onPreserveCaseChange.fire(this.replaceInput.getPreserveCase())})),this._register((0,r.attachFindReplaceInputBoxStyler)(this.replaceInput,this.themeService)),this.replaceInput.onKeyDown(V=>this.onReplaceInputKeyDown(V)),this.replaceInput.setValue(B.replaceValue||""),this._register(this.replaceInput.inputBox.onDidChange(()=>this._onReplaceValueChanged.fire())),this._register(this.replaceInput.inputBox.onDidHeightChange(()=>this._onDidHeightChange.fire())),this.replaceAllAction=new T(this),this.replaceAllAction.label=qi.REPLACE_ALL_DISABLED_LABEL,this.replaceActionBar=this._register(new f.ActionBar(this.replaceContainer)),this.replaceActionBar.push([this.replaceAllAction],{icon:!0,label:!1}),this.onkeydown(this.replaceActionBar.domNode,V=>this.onReplaceActionbarKeyDown(V)),this.replaceInputFocusTracker=this._register(t.trackFocus(this.replaceInput.inputBox.inputElement)),this._register(this.replaceInputFocusTracker.onDidFocus(()=>this.replaceInputBoxFocused.set(!0))),this._register(this.replaceInputFocusTracker.onDidBlur(()=>this.replaceInputBoxFocused.set(!1))),this._register(this.replaceInput.onPreserveCaseKeyDown(V=>this.onPreserveCaseKeyDown(V)))}triggerReplaceAll(){return this._onReplaceAll.fire(),Promise.resolve(null)}onToggleReplaceButton(){this.replaceContainer.classList.toggle("disabled"),this.isReplaceShown()?(this.toggleReplaceButton.element.classList.remove(...p.ThemeIcon.asClassNameArray(b.searchHideReplaceIcon)),this.toggleReplaceButton.element.classList.add(...p.ThemeIcon.asClassNameArray(b.searchShowReplaceIcon))):(this.toggleReplaceButton.element.classList.remove(...p.ThemeIcon.asClassNameArray(b.searchShowReplaceIcon)),this.toggleReplaceButton.element.classList.add(...p.ThemeIcon.asClassNameArray(b.searchHideReplaceIcon))),this.toggleReplaceButton.element.setAttribute("aria-expanded",this.isReplaceShown()?"true":"false"),this.updateReplaceActiveState(),this._onReplaceToggled.fire()}setValue(N){this.searchInput.setValue(N)}setReplaceAllActionState(N){this.replaceAllAction.enabled!==N&&(this.replaceAllAction.enabled=N,this.replaceAllAction.label=N?qi.REPLACE_ALL_ENABLED_LABEL(this.keybindingService):qi.REPLACE_ALL_DISABLED_LABEL,this.updateReplaceActiveState())}updateReplaceActiveState(){const N=this.isReplaceActive(),B=this.isReplaceShown()&&this.replaceAllAction.enabled;N!==B&&(this.replaceActive.set(B),this._onReplaceStateChange.fire(B),this.replaceInput.inputBox.layout())}validateSearchInput(N){if(N.length===0||!this.searchInput.getRegex())return null;try{new RegExp(N,"u")}catch(B){return{content:B.message}}return null}onSearchInputChanged(){if(this.searchInput.clearMessage(),this.setReplaceAllActionState(!1),this.searchConfiguration.searchOnType)if(this.searchInput.getRegex())try{const N=new RegExp(this.searchInput.getValue(),"ug"),B=` ~!@#$%^&*()_+ \`1234567890-= qwertyuiop[]\\ QWERTYUIOP{}| asdfghjkl;' ASDFGHJKL:" zxcvbnm,./ ZXCVBNM<>? `.match(N)?.length??0,P=B<50?1:B<100?5:10;this.submitSearch(!0,this.searchConfiguration.searchOnTypeDebouncePeriod*P)}catch{}else this.submitSearch(!0,this.searchConfiguration.searchOnTypeDebouncePeriod)}onSearchInputKeyDown(N){N.equals(R|3)&&(this.searchInput.inputBox.insertAtCursor(` `),N.preventDefault()),N.equals(3)?(this.searchInput.onSearchSubmit(),this.submitSearch(),N.preventDefault()):N.equals(9)?(this._onSearchCancel.fire({focus:!0}),N.preventDefault()):N.equals(2)?(this.isReplaceShown()?this.replaceInput.focus():this.searchInput.focusOnCaseSensitive(),N.preventDefault()):N.equals(16)?O(N,this.searchInput.getValue(),this.searchInput.domNode.querySelector("textarea")):N.equals(18)&&x(N,this.searchInput.getValue(),this.searchInput.domNode.querySelector("textarea"))}onCaseSensitiveKeyDown(N){N.equals(1024|2)&&this.isReplaceShown()&&(this.replaceInput.focus(),N.preventDefault())}onRegexKeyDown(N){N.equals(2)&&this.isReplaceShown()&&(this.replaceInput.focusOnPreserve(),N.preventDefault())}onPreserveCaseKeyDown(N){N.equals(2)?(this.isReplaceActive()?this.focusReplaceAllAction():this._onBlur.fire(),N.preventDefault()):N.equals(1024|2)&&(this.focusRegexAction(),N.preventDefault())}onReplaceInputKeyDown(N){N.equals(R|3)&&(this.replaceInput.inputBox.insertAtCursor(` `),N.preventDefault()),N.equals(3)?(this.submitSearch(),N.preventDefault()):N.equals(2)?(this.searchInput.focusOnCaseSensitive(),N.preventDefault()):N.equals(1024|2)?(this.searchInput.focus(),N.preventDefault()):N.equals(16)?O(N,this.replaceInput.getValue(),this.replaceInput.domNode.querySelector("textarea")):N.equals(18)&&x(N,this.replaceInput.getValue(),this.replaceInput.domNode.querySelector("textarea"))}onReplaceActionbarKeyDown(N){N.equals(1024|2)&&(this.focusRegexAction(),N.preventDefault())}async submitSearch(N=!1,B=0){if(this.searchInput.validate(),!this.searchInput.inputBox.isInputValid())return;const P=this.searchInput.getValue(),V=this.searchConfiguration.globalFindClipboard;P&&V&&await this.clipboardServce.writeFindText(P),this._onSearchSubmit.fire({triggeredOnType:N,delay:B})}getContextLines(){return this.showContextToggle.checked?+this.contextLinesInput.value:0}modifyContextLines(N){const P=+this.contextLinesInput.value+(N?1:-1);this.showContextToggle.checked=P!==0,this.contextLinesInput.value=""+P}toggleContextLines(){this.showContextToggle.checked=!this.showContextToggle.checked,this.onContextLinesChanged()}dispose(){this.setReplaceAllActionState(!1),super.dispose()}get searchConfiguration(){return this.configurationService.getValue("search")}};F.INPUT_MAX_HEIGHT=134,F.REPLACE_ALL_DISABLED_LABEL=C.localize(0,null),F.REPLACE_ALL_ENABLED_LABEL=M=>{const N=M.lookupKeybinding(T.ID);return(0,a.appendKeyBindingLabel)(C.localize(1,null),N,M)},F=Ee([W(2,S.IContextViewService),W(3,p.IThemeService),W(4,i.IContextKeyService),W(5,s.IKeybindingService),W(6,o.IClipboardService),W(7,c.IConfigurationService),W(8,h.IAccessibilityService)],F),e.SearchWidget=F;function L(){l.KeybindingsRegistry.registerCommandAndKeybindingRule({id:T.ID,weight:200,when:i.ContextKeyExpr.and(n.SearchViewVisibleKey,n.ReplaceActiveKey,v.CONTEXT_FIND_WIDGET_NOT_VISIBLE),primary:512|2048|3,handler:M=>{const N=M.get(m.IViewsService);if((0,a.isSearchViewFocused)(N)){const B=(0,a.getSearchView)(N);B&&new T(B.searchAndReplaceWidget).run()}}})}e.registerContributions=L}),define(ne[2702],re([1,0,10,91,112,11,2,13,165,49,20,84,52,113,561,1719,28,8,7,37,5,155,45,67,24,27,32,68,12,34,436,810,639,323,334,365,335,324,505,59,21,360,23,41,26,896,39,757,127,451]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H,K,G,q,Z,j){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.searchEditorTextInputBorder=e.SearchEditor=void 0;const X=/^(\s+)(\d+)(: | )(\s*)(.*)$/,Y=/^(\S.*):$/;let $=class al extends T.BaseTextEditor{constructor(se,ie,ce,le,ae,ue,oe,fe,pe,me,be,Ce,ve,he,ge,de,Se,we){super(al.ID,se,oe,ce,he,ie,de,ge);this.modelService=le,this.contextService=ae,this.labelService=ue,this.contextViewService=fe,this.commandService=pe,this.contextKeyService=me,this.openerService=be,this.notificationService=Ce,this.progressService=ve,this.configurationService=Se,this.fileService=we,this.runSearchDelayer=new A.Delayer(0),this.pauseSearching=!1,this.showingIncludesExcludes=!1,this.ongoingOperations=0,this.updatingModelForSearch=!1,this.container=t.$(".search-editor"),this.searchOperation=this._register(new h.LongRunningOperation(ve)),this._register(this.messageDisposables=new k.DisposableStore),this.searchHistoryDelayer=new A.Delayer(2e3),this.searchModel=this._register(this.instantiationService.createInstance(M.SearchModel))}createEditor(se){t.append(se,this.container),this.queryEditorContainer=t.append(this.container,t.$(".query-container"));const ie=t.append(this.container,t.$(".search-results"));super.createEditor(ie),this.registerEditorListeners();const ce=(0,D.assertIsDefined)(this.scopedContextKeyService);N.InSearchEditor.bindTo(ce).set(!0),this.createQueryEditor(this.queryEditorContainer,this.instantiationService.createChild(new a.ServiceCollection([r.IContextKeyService,ce])),x.InputBoxFocusedKey.bindTo(ce))}createQueryEditor(se,ie,ce){this.queryEditorWidget=this._register(ie.createInstance(O.SearchWidget,se,{_hideReplaceToggle:!0,showContextToggle:!0})),this._register(this.queryEditorWidget.onReplaceToggled(()=>this.reLayout())),this._register(this.queryEditorWidget.onDidHeightChange(()=>this.reLayout())),this._register(this.queryEditorWidget.onSearchSubmit(({delay:fe})=>this.triggerSearch({delay:fe}))),this._register(this.queryEditorWidget.searchInput.onDidOptionChange(()=>this.triggerSearch({resetCursor:!1}))),this._register(this.queryEditorWidget.onDidToggleContext(()=>this.triggerSearch({resetCursor:!1}))),this.includesExcludesContainer=t.append(se,t.$(".includes-excludes")),this.toggleQueryDetailsButton=t.append(this.includesExcludesContainer,t.$(".expand"+E.ThemeIcon.asCSSSelector(z.searchDetailsIcon),{tabindex:0,role:"button",title:(0,S.localize)(0,null)})),this._register(t.addDisposableListener(this.toggleQueryDetailsButton,t.EventType.CLICK,fe=>{t.EventHelper.stop(fe),this.toggleIncludesExcludes()})),this._register(t.addDisposableListener(this.toggleQueryDetailsButton,t.EventType.KEY_UP,fe=>{const pe=new f.StandardKeyboardEvent(fe);(pe.equals(3)||pe.equals(10))&&(t.EventHelper.stop(fe),this.toggleIncludesExcludes())})),this._register(t.addDisposableListener(this.toggleQueryDetailsButton,t.EventType.KEY_DOWN,fe=>{new f.StandardKeyboardEvent(fe).equals(1024|2)&&(this.queryEditorWidget.isReplaceActive()?this.queryEditorWidget.focusReplaceAllAction():this.queryEditorWidget.isReplaceShown()?this.queryEditorWidget.replaceInput.focusOnPreserve():this.queryEditorWidget.focusRegexAction(),t.EventHelper.stop(fe))}));const le=t.append(this.includesExcludesContainer,t.$(".file-types.includes")),ae=(0,S.localize)(1,null);t.append(le,t.$("h4",void 0,ae)),this.inputPatternIncludes=this._register(ie.createInstance(R.IncludePatternInputWidget,le,this.contextViewService,{ariaLabel:(0,S.localize)(2,null)})),this.inputPatternIncludes.onSubmit(fe=>this.triggerSearch({resetCursor:!1,delay:fe?this.searchConfig.searchOnTypeDebouncePeriod:0})),this._register(this.inputPatternIncludes.onChangeSearchInEditorsBox(()=>this.triggerSearch()));const ue=t.append(this.includesExcludesContainer,t.$(".file-types.excludes")),oe=(0,S.localize)(3,null);t.append(ue,t.$("h4",void 0,oe)),this.inputPatternExcludes=this._register(ie.createInstance(R.ExcludePatternInputWidget,ue,this.contextViewService,{ariaLabel:(0,S.localize)(4,null)})),this.inputPatternExcludes.onSubmit(fe=>this.triggerSearch({resetCursor:!1,delay:fe?this.searchConfig.searchOnTypeDebouncePeriod:0})),this._register(this.inputPatternExcludes.onChangeIgnoreBox(()=>this.triggerSearch())),[this.queryEditorWidget.searchInput,this.inputPatternIncludes,this.inputPatternExcludes,this.queryEditorWidget.contextLinesInput].map(fe=>this._register((0,b.attachInputBoxStyler)(fe,this.themeService,{inputBorder:e.searchEditorTextInputBorder}))),this.messageBox=t.append(se,t.$(".messages.text-search-provider-messages")),[this.queryEditorWidget.searchInputFocusTracker,this.queryEditorWidget.replaceInputFocusTracker,this.inputPatternExcludes.inputFocusTracker,this.inputPatternIncludes.inputFocusTracker].forEach(fe=>{this._register(fe.onDidFocus(()=>setTimeout(()=>ce.set(!0),0))),this._register(fe.onDidBlur(()=>ce.set(!1)))})}toggleRunAgainMessage(se){if(t.clearNode(this.messageBox),this.messageDisposables.clear(),se){const ie=t.append(this.messageBox,t.$("a.pointer.prominent.message",{},(0,S.localize)(5,null)));this.messageDisposables.add(t.addDisposableListener(ie,t.EventType.CLICK,async()=>{await this.triggerSearch(),this.searchResultEditor.focus()}))}}_getContributions(){const se=[Z.UnusualLineTerminatorsDetector.ID];return q.EditorExtensionsRegistry.getEditorContributions().filter(ie=>se.indexOf(ie.id)===-1)}createEditorControl(se,ie){return this.instantiationService.createInstance(I.CodeEditorWidget,se,ie,{contributions:this._getContributions()})}registerEditorListeners(){this.searchResultEditor=super.getControl(),this.searchResultEditor.onMouseUp(se=>{if(se.event.detail===2){const ie=this.searchConfig.searchEditor.doubleClickBehaviour,ce=se.target.position;if(ce&&ie!=="selectWord"){const le=this.searchResultEditor.getModel()?.getLineContent(ce.lineNumber)??"";le.match(X)?(this.searchResultEditor.setSelection(v.Range.fromPositions(ce)),this.commandService.executeCommand(ie==="goToLocation"?"editor.action.goToDeclaration":"editor.action.openDeclarationToTheSide")):le.match(Y)&&(this.searchResultEditor.setSelection(v.Range.fromPositions(ce)),this.commandService.executeCommand("editor.action.peekDefinition"))}}}),this._register(this.searchResultEditor.onDidChangeModelContent(()=>{this.updatingModelForSearch||this.getInput()?.setDirty(!0)}))}getControl(){return this.searchResultEditor}focus(){const se=this.loadEditorViewState(this.getInput());se&&se.focused==="editor"?this.searchResultEditor.focus():this.queryEditorWidget.focus()}focusSearchInput(){this.queryEditorWidget.searchInput.focus()}focusNextInput(){this.queryEditorWidget.searchInputHasFocus()?this.showingIncludesExcludes?this.inputPatternIncludes.focus():this.searchResultEditor.focus():this.inputPatternIncludes.inputHasFocus()?this.inputPatternExcludes.focus():this.inputPatternExcludes.inputHasFocus()?this.searchResultEditor.focus():this.searchResultEditor.hasWidgetFocus()}focusPrevInput(){this.queryEditorWidget.searchInputHasFocus()?this.searchResultEditor.focus():this.inputPatternIncludes.inputHasFocus()?this.queryEditorWidget.searchInput.focus():this.inputPatternExcludes.inputHasFocus()?this.inputPatternIncludes.focus():this.searchResultEditor.hasWidgetFocus()}setQuery(se){this.queryEditorWidget.searchInput.setValue(se)}selectQuery(){this.queryEditorWidget.searchInput.select()}toggleWholeWords(){this.queryEditorWidget.searchInput.setWholeWords(!this.queryEditorWidget.searchInput.getWholeWords()),this.triggerSearch({resetCursor:!1})}toggleRegex(){this.queryEditorWidget.searchInput.setRegex(!this.queryEditorWidget.searchInput.getRegex()),this.triggerSearch({resetCursor:!1})}toggleCaseSensitive(){this.queryEditorWidget.searchInput.setCaseSensitive(!this.queryEditorWidget.searchInput.getCaseSensitive()),this.triggerSearch({resetCursor:!1})}toggleContextLines(){this.queryEditorWidget.toggleContextLines()}modifyContextLines(se){this.queryEditorWidget.modifyContextLines(se)}toggleQueryDetails(){this.toggleIncludesExcludes()}deleteResultBlock(){const se=new Set,ie=this.searchResultEditor.getSelections(),ce=this.searchResultEditor.getModel();if(!(ie&&ce))return;const le=ce.getLineCount(),ae=1,ue=me=>{for(let be=me;be>=ae;be--){const Ce=ce.getLineContent(be);if(se.add(be),Ce[0]!==void 0&&Ce[0]!==" ")break}},oe=me=>{se.add(me);for(let be=me+1;be<=le;be++){const Ce=ce.getLineContent(be);if(Ce[0]!==void 0&&Ce[0]!==" ")return be;se.add(be)}},fe=[];for(const me of ie){const be=me.startLineNumber;fe.push(oe(be)),ue(be);for(let Ce=me.startLineNumber;Ce<=me.endLineNumber;Ce++)se.add(Ce)}fe.length===0&&fe.push(1);const pe=me=>me!==void 0;ce.pushEditOperations(this.searchResultEditor.getSelections(),[...se].map(me=>({range:new v.Range(me,1,me+1,1),text:""})),()=>fe.filter(pe).map(me=>new C.Selection(me,1,me,1)))}cleanState(){this.getInput()?.setDirty(!1)}get searchConfig(){return this.configurationService.getValue("search")}iterateThroughMatches(se){const ie=this.searchResultEditor.getModel();if(!ie)return;const ce=ie.getLineCount()??1,le=ie.getLineLength(ce),ae=se?new w.Position(ce,le):new w.Position(1,1),ue=this.searchResultEditor.getSelection()?.getStartPosition()??ae,oe=this.getInput()?.getMatchRanges();if(!oe)return;const fe=(se?ee:J)(oe,ue);this.searchResultEditor.setSelection(fe),this.searchResultEditor.revealLineInCenterIfOutsideViewport(fe.startLineNumber),this.searchResultEditor.focus();const pe=ie.getLineContent(fe.startLineNumber),me=ie.getValueInRange(fe);let be="";for(let Ce=fe.startLineNumber;Ce>=1;Ce--)if(ie.getValueInRange(new v.Range(Ce,1,Ce,2))!==" "){be=ie.getLineContent(Ce);break}(0,_.alert)((0,S.localize)(6,null,me,pe,be.slice(0,be.length-1)))}focusNextResult(){this.iterateThroughMatches(!1)}focusPreviousResult(){this.iterateThroughMatches(!0)}focusAllResults(){this.searchResultEditor.setSelections((this.getInput()?.getMatchRanges()??[]).map(se=>new C.Selection(se.startLineNumber,se.startColumn,se.endLineNumber,se.endColumn))),this.searchResultEditor.focus()}async triggerSearch(se){const ie={resetCursor:!0,delay:0,...se};this.pauseSearching||await this.runSearchDelayer.trigger(async()=>{this.toggleRunAgainMessage(!1),await this.doRunSearch(),ie.resetCursor&&(this.searchResultEditor.setPosition(new w.Position(1,1)),this.searchResultEditor.setScrollPosition({scrollTop:0,scrollLeft:0})),ie.focusResults&&this.searchResultEditor.focus()},ie.delay)}readConfigFromWidget(){return{isCaseSensitive:this.queryEditorWidget.searchInput.getCaseSensitive(),contextLines:this.queryEditorWidget.getContextLines(),filesToExclude:this.inputPatternExcludes.getValue(),filesToInclude:this.inputPatternIncludes.getValue(),query:this.queryEditorWidget.searchInput.getValue(),isRegexp:this.queryEditorWidget.searchInput.getRegex(),matchWholeWord:this.queryEditorWidget.searchInput.getWholeWords(),useExcludeSettingsAndIgnoreFiles:this.inputPatternExcludes.useExcludesAndIgnoreFiles(),onlyOpenEditors:this.inputPatternIncludes.onlySearchInOpenEditors(),showIncludesExcludes:this.showingIncludesExcludes}}async doRunSearch(){this.searchModel.cancelSearch(!0);const se=this.getInput();if(!se)return;this.searchHistoryDelayer.trigger(()=>{this.queryEditorWidget.searchInput.onSearchSubmit(),this.inputPatternExcludes.onSearchSubmit(),this.inputPatternIncludes.onSearchSubmit()});const ie=this.readConfigFromWidget();if(!ie.query)return;const ce={pattern:ie.query,isRegExp:ie.isRegexp,isCaseSensitive:ie.isCaseSensitive,isWordMatch:ie.matchWholeWord},le={_reason:"searchEditor",extraFileResources:this.instantiationService.invokeFunction(L.getOutOfWorkspaceEditorResources),maxResults:(0,D.withNullAsUndefined)(this.searchConfig.maxResults),disregardIgnoreFiles:!ie.useExcludeSettingsAndIgnoreFiles||void 0,disregardExcludeSettings:!ie.useExcludeSettingsAndIgnoreFiles||void 0,excludePattern:ie.filesToExclude,includePattern:ie.filesToInclude,onlyOpenEditors:ie.onlyOpenEditors,previewOptions:{matchLines:1,charsPerLine:1e3},afterContext:ie.contextLines,beforeContext:ie.contextLines,isSmartCase:this.searchConfig.smartCase,expandPatterns:!0},ae=this.contextService.getWorkspace().folders;let ue;try{ue=this.instantiationService.createInstance(F.QueryBuilder).text(ce,ae.map(me=>me.uri),le)}catch{return}this.searchOperation.start(500),this.ongoingOperations++;const{configurationModel:oe}=await se.resolveModels();oe.updateConfig(ie),se.ongoingSearchOperation=this.searchModel.search(ue).finally(()=>{this.ongoingOperations--,this.ongoingOperations===0&&this.searchOperation.stop()});const fe=await se.ongoingSearchOperation;await this.onSearchComplete(fe,ie,se)}async onSearchComplete(se,ie,ce){const le=this.getInput();if(!le||le!==ce||JSON.stringify(ie)!==JSON.stringify(this.readConfigFromWidget()))return;le.ongoingSearchOperation=void 0;const ae=this.searchConfig.sortOrder;ae==="modified"&&await this.retrieveFileStats(this.searchModel.searchResult),i.ReferencesController.get(this.searchResultEditor)?.closeWidget(!1);const oe=me=>this.labelService.getUriLabel(me,{relative:!0}),fe=(0,B.serializeSearchResultForEditor)(this.searchModel.searchResult,ie.filesToInclude,ie.filesToExclude,ie.contextLines,oe,ae,se?.limitHit),{resultsModel:pe}=await le.resolveModels();if(this.updatingModelForSearch=!0,this.modelService.updateModel(pe,fe.text),this.updatingModelForSearch=!1,se&&se.messages)for(const me of se.messages)this.addMessage(me);this.reLayout(),le.setDirty(!le.hasCapability(4)),le.setMatchRanges(fe.matchRanges)}addMessage(se){let ie;this.messageBox.firstChild?ie=this.messageBox.firstChild:ie=t.append(this.messageBox,t.$(".message")),t.append(ie,(0,G.renderSearchMessage)(se,this.instantiationService,this.notificationService,this.openerService,this.commandService,this.messageDisposables,()=>this.triggerSearch()))}async retrieveFileStats(se){const ie=se.matches().filter(ce=>!ce.fileStat).map(ce=>ce.resolveFileStat(this.fileService));await Promise.all(ie)}layout(se){this.dimension=se,this.reLayout()}getSelected(){const se=this.searchResultEditor.getSelection();return se?this.searchResultEditor.getModel()?.getValueInRange(se)??"":""}reLayout(){this.dimension&&(this.queryEditorWidget.setWidth(this.dimension.width-28),this.searchResultEditor.layout({height:this.dimension.height-t.getTotalHeight(this.queryEditorContainer),width:this.dimension.width}),this.inputPatternExcludes.setWidth(this.dimension.width-28),this.inputPatternIncludes.setWidth(this.dimension.width-28))}getInput(){return this._input}setSearchConfig(se){this.priorConfig=se,se.query!==void 0&&this.queryEditorWidget.setValue(se.query),se.isCaseSensitive!==void 0&&this.queryEditorWidget.searchInput.setCaseSensitive(se.isCaseSensitive),se.isRegexp!==void 0&&this.queryEditorWidget.searchInput.setRegex(se.isRegexp),se.matchWholeWord!==void 0&&this.queryEditorWidget.searchInput.setWholeWords(se.matchWholeWord),se.contextLines!==void 0&&this.queryEditorWidget.setContextLines(se.contextLines),se.filesToExclude!==void 0&&this.inputPatternExcludes.setValue(se.filesToExclude),se.filesToInclude!==void 0&&this.inputPatternIncludes.setValue(se.filesToInclude),se.onlyOpenEditors!==void 0&&this.inputPatternIncludes.setOnlySearchInOpenEditors(se.onlyOpenEditors),se.useExcludeSettingsAndIgnoreFiles!==void 0&&this.inputPatternExcludes.setUseExcludesAndIgnoreFiles(se.useExcludeSettingsAndIgnoreFiles),se.showIncludesExcludes!==void 0&&this.toggleIncludesExcludes(se.showIncludesExcludes)}async setInput(se,ie,ce,le){if(await super.setInput(se,ie,ce,le),le.isCancellationRequested)return;const{configurationModel:ae,resultsModel:ue}=await se.resolveModels();if(!le.isCancellationRequested&&(this.searchResultEditor.setModel(ue),this.pauseSearching=!0,this.toggleRunAgainMessage(!se.ongoingSearchOperation&&ue.getLineCount()===1&&ue.getValue()===""&&ae.config.query!==""),this.setSearchConfig(ae.config),this._register(ae.onConfigDidUpdate(oe=>{oe!==this.priorConfig&&(this.pauseSearching=!0,this.setSearchConfig(oe),this.pauseSearching=!1)})),this.restoreViewState(ce),ie?.preserveFocus||this.focus(),this.pauseSearching=!1,se.ongoingSearchOperation)){const oe=this.readConfigFromWidget();se.ongoingSearchOperation.then(fe=>{this.onSearchComplete(fe,oe,se)})}}toggleIncludesExcludes(se){const ie="expanded";se??!this.includesExcludesContainer.classList.contains(ie)?(this.toggleQueryDetailsButton.setAttribute("aria-expanded","true"),this.includesExcludesContainer.classList.add(ie)):(this.toggleQueryDetailsButton.setAttribute("aria-expanded","false"),this.includesExcludesContainer.classList.remove(ie)),this.showingIncludesExcludes=this.includesExcludesContainer.classList.contains(ie),this.reLayout()}toEditorViewStateResource(se){if(se.typeId===N.SearchEditorInputTypeId)return se.modelUri}computeEditorViewState(se){const ce=this.getControl().saveViewState();if(!!ce&&se.toString()===this.getInput()?.modelUri.toString())return{...ce,focused:this.searchResultEditor.hasWidgetFocus()?"editor":"input"}}tracksEditorViewState(se){return se.typeId===N.SearchEditorInputTypeId}restoreViewState(se){const ie=this.loadEditorViewState(this.getInput(),se);ie&&this.searchResultEditor.restoreViewState(ie)}getAriaLabel(){return this.getInput()?.getName()??(0,S.localize)(7,null)}};$.ID=N.SearchEditorID,$.SEARCH_EDITOR_VIEW_STATE_PREFERENCE_KEY="searchEditorViewState",$=Ee([W(0,d.ITelemetryService),W(1,E.IThemeService),W(2,g.IStorageService),W(3,o.IModelService),W(4,y.IWorkspaceContextService),W(5,n.ILabelService),W(6,u.IInstantiationService),W(7,p.IContextViewService),W(8,s.ICommandService),W(9,r.IContextKeyService),W(10,H.IOpenerService),W(11,K.INotificationService),W(12,h.IEditorProgressService),W(13,c.ITextResourceConfigurationService),W(14,P.IEditorGroupsService),W(15,V.IEditorService),W(16,l.IConfigurationService),W(17,U.IFileService)],$),e.SearchEditor=$,(0,E.registerThemingParticipant)((te,se)=>{se.addRule(`.monaco-editor .${N.SearchEditorFindMatchClass} { background-color: ${te.getColor(m.searchEditorFindMatch)}; }`);const ie=te.getColor(m.searchEditorFindMatchBorder);ie&&se.addRule(`.monaco-editor .${N.SearchEditorFindMatchClass} { border: 1px ${(0,j.isHighContrast)(te.type)?"dotted":"solid"} ${ie}; box-sizing: border-box; }`)}),e.searchEditorTextInputBorder=(0,m.registerColor)("searchEditor.textInputBorder",{dark:m.inputBorder,light:m.inputBorder,hcDark:m.inputBorder,hcLight:m.inputBorder},(0,S.localize)(8,null));function J(te,se){for(const ie of te)if(w.Position.isBefore(se,ie.getStartPosition()))return ie;return te[0]}function ee(te,se){for(let ie=te.length-1;ie>=0;ie--){const ce=te[ie];if(w.Position.isBefore(ce.getStartPosition(),se))return ce}return te[te.length-1]}}),define(ne[929],re([1,0,18,13,106,8,132,5,45,27,34,43,337,638,505,218,21,177,451]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createEditorFromSearchResult=e.openNewSearchEditor=e.openSearchEditor=e.selectAllSearchEditorMatchesCommand=e.modifySearchEditorContextLinesCommand=e.toggleSearchEditorContextLinesCommand=e.toggleSearchEditorRegexCommand=e.toggleSearchEditorWholeWordCommand=e.toggleSearchEditorCaseSensitiveCommand=void 0;const r=b=>{const E=b.get(s.IEditorService);E.activeEditor instanceof c.SearchEditorInput&&E.activeEditorPane.toggleCaseSensitive()};e.toggleSearchEditorCaseSensitiveCommand=r;const p=b=>{const E=b.get(s.IEditorService);E.activeEditor instanceof c.SearchEditorInput&&E.activeEditorPane.toggleWholeWords()};e.toggleSearchEditorWholeWordCommand=p;const u=b=>{const E=b.get(s.IEditorService);E.activeEditor instanceof c.SearchEditorInput&&E.activeEditorPane.toggleRegex()};e.toggleSearchEditorRegexCommand=u;const a=b=>{const E=b.get(s.IEditorService);E.activeEditor instanceof c.SearchEditorInput&&E.activeEditorPane.toggleContextLines()};e.toggleSearchEditorContextLinesCommand=a;const n=(b,E)=>{const y=b.get(s.IEditorService);y.activeEditor instanceof c.SearchEditorInput&&y.activeEditorPane.modifyContextLines(E)};e.modifySearchEditorContextLinesCommand=n;const h=b=>{const E=b.get(s.IEditorService);E.activeEditor instanceof c.SearchEditorInput&&E.activeEditorPane.focusAllResults()};e.selectAllSearchEditorMatchesCommand=h;async function g(b){const E=b.get(C.IViewsService),y=b.get(D.IInstantiationService),T=(0,o.getSearchView)(E);T?await y.invokeFunction(e.openNewSearchEditor,{filesToInclude:T.searchIncludePattern.getValue(),onlyOpenEditors:T.searchIncludePattern.onlySearchInOpenEditors(),filesToExclude:T.searchExcludePattern.getValue(),isRegexp:T.searchAndReplaceWidget.searchInput.getRegex(),isCaseSensitive:T.searchAndReplaceWidget.searchInput.getCaseSensitive(),matchWholeWord:T.searchAndReplaceWidget.searchInput.getWholeWords(),useExcludeSettingsAndIgnoreFiles:T.searchExcludePattern.useExcludesAndIgnoreFiles(),showIncludesExcludes:!!(T.searchIncludePattern.getValue()||T.searchExcludePattern.getValue()||!T.searchExcludePattern.useExcludesAndIgnoreFiles())}):await y.invokeFunction(e.openNewSearchEditor)}e.openSearchEditor=g;const d=async(b,E={},y=!1)=>{const T=b.get(s.IEditorService),R=b.get(w.ITelemetryService),O=b.get(D.IInstantiationService),x=b.get(A.IConfigurationService),F=b.get(S.IConfigurationResolverService),L=b.get(v.IWorkspaceContextService),N=b.get(l.IHistoryService).getLastActiveWorkspaceRoot(t.Schemas.file),B=N?(0,f.withNullAsUndefined)(L.getWorkspaceFolder(N)):void 0,P=T.activeTextEditorControl;let V,z="";if(P){(0,_.isDiffEditor)(P)?P.getOriginalEditor().hasTextFocus()?V=P.getOriginalEditor():V=P.getModifiedEditor():V=P;const Z=V?.getSelection();if(z=(Z&&V?.getModel()?.getValueInRange(Z))??"",Z?.isEmpty()&&x.getValue("search").seedWithNearestWord){const j=V.getModel()?.getWordAtPosition(Z.getStartPosition());j&&(z=j.word)}}else T.activeEditor instanceof c.SearchEditorInput&&(z=T.activeEditorPane.getSelected());R.publicLog2("searchEditor/openNewSearchEditor");const H={query:E.location==="new"||x.getValue("editor").find.seedSearchStringFromSelection?z:void 0};for(const Z of Object.entries(E)){const j=Z[0],X=Z[1];X!==void 0&&(H[j]=typeof X=="string"?await F.resolveAsync(B,X):X)}const K=T.getEditors(0).find(Z=>Z.editor.typeId===c.SearchEditorInput.ID);let G;if(K&&H.location==="reuse"){const Z=K.editor;G=await T.openEditor(Z,{override:k.EditorResolution.DISABLED},K.groupId),z?G.setQuery(z):G.selectQuery(),G.setSearchConfig(H)}else{const Z=O.invokeFunction(c.getOrMakeSearchEditorInput,{config:H,resultsContents:"",from:"rawData"});G=await T.openEditor(Z,{pinned:!0},y?s.SIDE_GROUP:s.ACTIVE_GROUP)}const q=x.getValue("search").searchOnType;(H.triggerSearch===!0||H.triggerSearch!==!1&&q&&H.query)&&G.triggerSearch({focusResults:H.focusResults}),H.focusResults||G.focusSearchInput()};e.openNewSearchEditor=d;const m=async(b,E,y,T,R)=>{if(!E.query){console.error("Expected searchResult.query to be defined. Got",E);return}const O=b.get(s.IEditorService),x=b.get(w.ITelemetryService),F=b.get(D.IInstantiationService),L=b.get(I.ILabelService),M=b.get(A.IConfigurationService),N=M.getValue("search").sortOrder;x.publicLog2("searchEditor/createEditorFromSearchResult");const B=H=>L.getUriLabel(H,{relative:!0}),{text:P,matchRanges:V,config:z}=(0,i.serializeSearchResultForEditor)(E,y,T,0,B,N);z.onlyOpenEditors=R;const U=M.getValue("search").searchEditor.defaultNumberOfContextLines;if(E.isDirty||U===0||U===null){const H=F.invokeFunction(c.getOrMakeSearchEditorInput,{resultsContents:P,config:z,from:"rawData"});await O.openEditor(H,{pinned:!0}),H.setMatchRanges(V)}else{const H=F.invokeFunction(c.getOrMakeSearchEditorInput,{from:"rawData",resultsContents:"",config:{...z,contextLines:U}});(await O.openEditor(H,{pinned:!0})).triggerSearch({focusResults:!0})}};e.createEditorFromSearchResult=m}),define(ne[2703],re([1,0,19,9,288,1720,16,28,7,99,5,17,27,149,47,44,74,43,337,360,323,324,2702,929,638,21,192,159,240,2]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const T="search.action.openInEditor",R="search.action.openNewEditorToSide",O="search.action.focusQueryEditorWidget",x="toggleSearchEditorCaseSensitive",F="toggleSearchEditorWholeWord",L="toggleSearchEditorRegex",M="increaseSearchEditorContextLines",N="decreaseSearchEditorContextLines",B="rerunSearchEditorSearch",P="cleanSearchEditorState",V="selectAllSearchEditorMatches";C.Registry.as(S.EditorExtensions.EditorPane).registerEditorPane(c.EditorPaneDescriptor.create(n.SearchEditor,n.SearchEditor.ID,(0,A.localize)(0,null)),[new w.SyncDescriptor(g.SearchEditorInput)]);let z=class{constructor(X,Y,$,J){this.editorResolverService=X,this.instantiationService=Y,this.telemetryService=$,this.contextKeyService=J,this.editorResolverService.registerEditor("*"+g.SEARCH_EDITOR_EXT,{id:g.SearchEditorInput.ID,label:(0,A.localize)(1,null),detail:S.DEFAULT_EDITOR_ASSOCIATION.providerDisplayName,priority:b.RegisteredEditorPriority.default},{singlePerResource:!0,canHandleDiff:!1,canSupportResource:ee=>(0,t.extname)(ee)===g.SEARCH_EDITOR_EXT},({resource:ee})=>({editor:Y.invokeFunction(g.getOrMakeSearchEditorInput,{from:"existingFile",fileUri:ee})}))}};z=Ee([W(0,b.IEditorResolverService),W(1,v.IInstantiationService),W(2,o.ITelemetryService),W(3,I.IContextKeyService)],z);const U=C.Registry.as(i.Extensions.Workbench);U.registerWorkbenchContribution(z,1);class H{canSerialize(X){return!!X.tryReadConfigSync()}serialize(X){if(X.isDisposed())return JSON.stringify({modelUri:void 0,dirty:!1,config:X.tryReadConfigSync(),name:X.getName(),matchRanges:[],backingUri:X.backingUri?.toString()});let Y;(X.modelUri.path||X.modelUri.fragment&&X.isDirty())&&(Y=X.modelUri.toString());const $=X.tryReadConfigSync(),J=X.isDirty(),ee=X.getMatchRanges(),te=X.backingUri;return JSON.stringify({modelUri:Y,dirty:J,config:$,name:X.getName(),matchRanges:ee,backingUri:te?.toString()})}deserialize(X,Y){const{modelUri:$,dirty:J,config:ee,matchRanges:te,backingUri:se}=JSON.parse(Y);if(ee&&ee.query!==void 0)if($){const ie=X.invokeFunction(g.getOrMakeSearchEditorInput,{from:"model",modelUri:f.URI.parse($),config:ee,backupOf:se?f.URI.parse(se):void 0});return ie.setDirty(J),ie.setMatchRanges(te),ie}else return se?X.invokeFunction(g.getOrMakeSearchEditorInput,{from:"existingFile",fileUri:f.URI.parse(se)}):X.invokeFunction(g.getOrMakeSearchEditorInput,{from:"rawData",resultsContents:"",config:ee})}}C.Registry.as(S.EditorExtensions.EditorFactory).registerEditorSerializer(g.SearchEditorInput.ID,H),D.CommandsRegistry.registerCommand(P,j=>{const X=j.get(d.IEditorService).activeEditorPane;X instanceof n.SearchEditor&&X.cleanState()});const K={value:(0,A.localize)(2,null),original:"Search Editor"},G=(j={})=>{const X={},Y={includes:"filesToInclude",excludes:"filesToExclude",wholeWord:"matchWholeWord",caseSensitive:"isCaseSensitive",regexp:"isRegexp",useIgnores:"useExcludeSettingsAndIgnoreFiles"};return Object.entries(j).forEach(([$,J])=>{X[Y[$]??$]=J}),X},q={description:"Open a new search editor. Arguments passed can include variables like ${relativeFileDirname}.",args:[{name:"Open new Search Editor args",schema:{properties:{query:{type:"string"},filesToInclude:{type:"string"},filesToExclude:{type:"string"},contextLines:{type:"number"},matchWholeWord:{type:"boolean"},isCaseSensitive:{type:"boolean"},isRegexp:{type:"boolean"},useExcludeSettingsAndIgnoreFiles:{type:"boolean"},showIncludesExcludes:{type:"boolean"},triggerSearch:{type:"boolean"},focusResults:{type:"boolean"},onlyOpenEditors:{type:"boolean"}}}}]};(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:"search.searchEditor.action.deleteFileResults",title:{value:(0,A.localize)(3,null),original:"Delete File Results"},keybinding:{weight:100,primary:2048|1024|1},precondition:a.InSearchEditor,category:K,f1:!0})}async run(j){j.get(I.IContextKeyService).getContext(document.activeElement).getValue(a.InSearchEditor.serialize())&&j.get(d.IEditorService).activeEditorPane.deleteResultBlock()}}),(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:a.OpenNewEditorCommandId,title:{value:(0,A.localize)(4,null),original:"New Search Editor"},category:K,f1:!0,description:q})}async run(j,X){await j.get(v.IInstantiationService).invokeFunction(h.openNewSearchEditor,G({location:"new",...X}))}}),(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:a.OpenEditorCommandId,title:{value:(0,A.localize)(5,null),original:"Open Search Editor"},category:K,f1:!0,description:q})}async run(j,X){await j.get(v.IInstantiationService).invokeFunction(h.openNewSearchEditor,G({location:"reuse",...X}))}}),(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:R,title:{value:(0,A.localize)(6,null),original:"Open new Search Editor to the Side"},category:K,f1:!0,description:q})}async run(j,X){await j.get(v.IInstantiationService).invokeFunction(h.openNewSearchEditor,G(X),!0)}}),(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:T,title:{value:(0,A.localize)(7,null),original:"Open Results in Editor"},category:K,f1:!0,keybinding:{primary:512|3,when:I.ContextKeyExpr.and(u.HasSearchResults,u.SearchViewFocusedKey),weight:200,mac:{primary:2048|3}}})}async run(j){const X=j.get(l.IViewsService),Y=j.get(v.IInstantiationService),$=(0,r.getSearchView)(X);$&&await Y.invokeFunction(h.createEditorFromSearchResult,$.searchResult,$.searchIncludePattern.getValue(),$.searchExcludePattern.getValue(),$.searchIncludePattern.onlySearchInOpenEditors())}}),(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:B,title:{value:(0,A.localize)(8,null),original:"Search Again"},category:K,keybinding:{primary:2048|1024|48,when:a.InSearchEditor,weight:100},icon:p.searchRefreshIcon,menu:[{id:k.MenuId.EditorTitle,group:"navigation",when:s.ActiveEditorContext.isEqualTo(a.SearchEditorID)},{id:k.MenuId.CommandPalette,when:s.ActiveEditorContext.isEqualTo(a.SearchEditorID)}]})}async run(j){const X=j.get(d.IEditorService);X.activeEditor instanceof g.SearchEditorInput&&X.activeEditorPane.triggerSearch({resetCursor:!1})}}),(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:O,title:{value:(0,A.localize)(9,null),original:"Focus Search Editor Input"},category:K,f1:!0,precondition:a.InSearchEditor,keybinding:{primary:9,weight:100}})}async run(j){const X=j.get(d.IEditorService);X.activeEditor instanceof g.SearchEditorInput&&X.activeEditorPane.focusSearchInput()}}),(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:x,title:{value:(0,A.localize)(10,null),original:"Toggle Match Case"},category:K,f1:!0,precondition:a.InSearchEditor,keybinding:Object.assign({weight:200,when:u.SearchInputBoxFocusedKey},_.ToggleCaseSensitiveKeybinding)})}run(j){(0,h.toggleSearchEditorCaseSensitiveCommand)(j)}}),(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:F,title:{value:(0,A.localize)(11,null),original:"Toggle Match Whole Word"},category:K,f1:!0,precondition:a.InSearchEditor,keybinding:Object.assign({weight:200,when:u.SearchInputBoxFocusedKey},_.ToggleWholeWordKeybinding)})}run(j){(0,h.toggleSearchEditorWholeWordCommand)(j)}}),(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:L,title:{value:(0,A.localize)(12,null),original:'Toggle Use Regular Expression"'},category:K,f1:!0,precondition:a.InSearchEditor,keybinding:Object.assign({weight:200,when:u.SearchInputBoxFocusedKey},_.ToggleRegexKeybinding)})}run(j){(0,h.toggleSearchEditorRegexCommand)(j)}}),(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:a.ToggleSearchEditorContextLinesCommandId,title:{value:(0,A.localize)(13,null),original:'Toggle Context Lines"'},category:K,f1:!0,precondition:a.InSearchEditor,keybinding:{weight:200,primary:512|42,mac:{primary:2048|512|42}}})}run(j){(0,h.toggleSearchEditorContextLinesCommand)(j)}}),(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:M,title:{original:"Increase Context Lines",value:(0,A.localize)(14,null)},category:K,f1:!0,precondition:a.InSearchEditor,keybinding:{weight:200,primary:512|81}})}run(j){(0,h.modifySearchEditorContextLinesCommand)(j,!0)}}),(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:N,title:{original:"Decrease Context Lines",value:(0,A.localize)(15,null)},category:K,f1:!0,precondition:a.InSearchEditor,keybinding:{weight:200,primary:512|83}})}run(j){(0,h.modifySearchEditorContextLinesCommand)(j,!1)}}),(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:V,title:{original:"Select All Matches",value:(0,A.localize)(16,null)},category:K,f1:!0,precondition:a.InSearchEditor,keybinding:{weight:200,primary:2048|1024|42}})}run(j){(0,h.selectAllSearchEditorMatchesCommand)(j)}}),(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:"search.action.openNewEditorFromView",title:(0,A.localize)(17,null),category:K,icon:p.searchNewEditorIcon,menu:[{id:k.MenuId.ViewTitle,group:"navigation",order:2,when:I.ContextKeyExpr.equals("view",m.VIEW_ID)}]})}run(X,...Y){return(0,h.openSearchEditor)(X)}});let Z=class extends y.Disposable{constructor(X,Y){super();this.instantiationService=X,this.workingCopyEditorService=Y,this.installHandler()}installHandler(){this._register(this.workingCopyEditorService.registerHandler({handles:X=>X.resource.scheme===a.SearchEditorScheme,isOpen:(X,Y)=>Y instanceof g.SearchEditorInput&&(0,t.isEqual)(X.resource,Y.modelUri),createEditor:X=>{const Y=this.instantiationService.invokeFunction(g.getOrMakeSearchEditorInput,{from:"model",modelUri:X.resource});return Y.setDirty(!0),Y}}))}};Z=Ee([W(0,v.IInstantiationService),W(1,E.IWorkingCopyEditorService)],Z),U.registerWorkbenchContribution(Z,2)}),define(ne[2704],re([1,0,1802,10,36,30,197,110,6,102,92,2,18,45,29,9,234,131,71,38,37,7,8,5,420,21,44,28,12,43,67,41,78,73,16,27,134,127,33,63,204,13,242,219,56,1126]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H,K){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TimelineListVirtualDelegate=e.TimelineKeyboardNavigationLabelProvider=e.TimelineIdentityProvider=e.TimelineElementTemplate=e.TimelinePane=e.TimelineFollowActiveEditorContext=void 0;const G=22;function q(fe){return fe instanceof Y}function Z(fe){return!fe?.handle.startsWith("vscode-command:")}function j(fe,pe){return fe.relativeTime=Z(fe)?(0,k.fromNow)(fe.timestamp):void 0,pe===void 0||fe.relativeTime!==pe?(pe=fe.relativeTime,fe.hideRelativeTime=!1):fe.hideRelativeTime=!0,pe}class X{constructor(pe){this._stale=!1,this._requiresReset=!1,this.source=pe.source,this.items=pe.items,this._cursor=pe.paging?.cursor,this.lastRenderedIndex=-1}get cursor(){return this._cursor}get more(){return this._cursor!==void 0}get newest(){return this.items[0]}get oldest(){return this.items[this.items.length-1]}add(pe,me){let be=!1;if(pe.items.length!==0&&this.items.length!==0){be=!0;const Ce=new Set,ve=new Set;for(const de of pe.items)de.id===void 0?ve.add(de.timestamp):Ce.add(de.id);let he=this.items.length,ge;for(;he--;)ge=this.items[he],(ge.id!==void 0&&Ce.has(ge.id)||ve.has(ge.timestamp))&&this.items.splice(he,1);(pe.items[pe.items.length-1]?.timestamp??0)>=(this.newest?.timestamp??0)?this.items.splice(0,0,...pe.items):this.items.push(...pe.items)}else pe.items.length!==0&&(be=!0,this.items.push(...pe.items));return(me.cursor!==void 0||typeof me.limit!="object")&&(this._cursor=pe.paging?.cursor),be&&this.items.sort((Ce,ve)=>ve.timestamp-Ce.timestamp||(Ce.source===void 0?ve.source===void 0?0:1:ve.source===void 0?-1:ve.source.localeCompare(Ce.source,void 0,{numeric:!0,sensitivity:"base"}))),be}get stale(){return this._stale}get requiresReset(){return this._requiresReset}invalidate(pe){this._stale=!0,this._requiresReset=pe}}class Y{constructor(pe){this.handle="vscode-command:loadMore",this.timestamp=0,this.description=void 0,this.tooltip=void 0,this.contextValue=void 0,this.id=void 0,this.icon=void 0,this.iconDark=void 0,this.source=void 0,this.relativeTime=void 0,this.hideRelativeTime=void 0,this._loading=!1,this._loading=pe}get loading(){return this._loading}set loading(pe){this._loading=pe}get ariaLabel(){return this.label}get label(){return this.loading?(0,t.localize)(0,null):(0,t.localize)(1,null)}get themeIcon(){}}e.TimelineFollowActiveEditorContext=new a.RawContextKey("timelineFollowActiveEditor",!0,!0);let $=class extends l.ViewPane{constructor(pe,me,be,Ce,ve,he,ge,de,Se,we,ye,ke,Ie,Te,De,_e){super({...pe,titleMenuId:F.MenuId.TimelineTitle},me,be,ve,Ce,he,ge,ke,Ie,Te);this.editorService=de,this.commandService=Se,this.progressService=we,this.timelineService=ye,this.labelService=De,this.uriIdentityService=_e,this.pendingRequests=new Map,this.timelinesBySource=new Map,this._followActiveEditor=!0,this._isEmpty=!0,this._maxItemCount=0,this._visibleItemCount=0,this._pendingRefresh=!1,this.commands=this._register(this.instantiationService.createInstance(oe,this)),this.followActiveEditorContext=e.TimelineFollowActiveEditorContext.bindTo(this.contextKeyService),this.excludedSources=new Set(ve.getValue("timeline.excludeSources")),this._register(ve.onDidChangeConfiguration(this.onConfigurationChanged,this)),this._register(ye.onDidChangeProviders(this.onProvidersChanged,this)),this._register(ye.onDidChangeTimeline(this.onTimelineChanged,this)),this._register(ye.onDidChangeUri(Re=>this.setUri(Re),this))}get followActiveEditor(){return this._followActiveEditor}set followActiveEditor(pe){this._followActiveEditor!==pe&&(this._followActiveEditor=pe,this.followActiveEditorContext.set(pe),this.updateFilename(this._filename),pe&&this.onActiveEditorChanged())}get pageOnScroll(){return this._pageOnScroll===void 0&&(this._pageOnScroll=this.configurationService.getValue("timeline.pageOnScroll")??!1),this._pageOnScroll}get pageSize(){let pe=this.configurationService.getValue("timeline.pageSize");return pe==null&&(pe=Math.max(20,Math.floor(this.tree.renderHeight/G+(this.pageOnScroll?1:-1)))),pe}reset(){this.loadTimeline(!0)}setUri(pe){this.setUriCore(pe,!0)}setUriCore(pe,me){me&&(this.followActiveEditor=!1),this.uri=pe,this.updateFilename(pe?this.labelService.getUriBasenameLabel(pe):void 0),this.treeRenderer?.setUri(pe),this.loadTimeline(!0)}onConfigurationChanged(pe){if(pe.affectsConfiguration("timeline.pageOnScroll")&&(this._pageOnScroll=void 0),pe.affectsConfiguration("timeline.excludeSources")){this.excludedSources=new Set(this.configurationService.getValue("timeline.excludeSources"));const me=this.timelineService.getSources().filter(({id:be})=>!this.excludedSources.has(be)&&!this.timelinesBySource.has(be));me.length!==0?this.loadTimeline(!0,me.map(({id:be})=>be)):this.refresh()}}onActiveEditorChanged(){if(!this.followActiveEditor)return;const pe=m.EditorResourceAccessor.getOriginalUri(this.editorService.activeEditor,{supportSideBySide:m.SideBySideEditor.PRIMARY});if(this.uriIdentityService.extUri.isEqual(pe,this.uri)&&pe!==void 0||pe?.fsPath===this.uri?.fsPath&&(pe?.scheme===o.Schemas.file||pe?.scheme==="git")&&(this.uri?.scheme===o.Schemas.file||this.uri?.scheme==="git")){for(const me of this.timelineService.getSources()){if(this.excludedSources.has(me.id))continue;const be=this.timelinesBySource.get(me.id);be!==void 0&&!be.stale||(be!==void 0?this.updateTimeline(be,be.requiresReset):this.loadTimelineForSource(me.id,pe,!0))}return}this.setUriCore(pe,!1)}onProvidersChanged(pe){if(pe.removed){for(const me of pe.removed)this.timelinesBySource.delete(me);this.refresh()}pe.added&&this.loadTimeline(!0,pe.added)}onTimelineChanged(pe){if(pe?.uri===void 0||this.uriIdentityService.extUri.isEqual(pe.uri,this.uri)){const me=this.timelinesBySource.get(pe.id);if(me===void 0)return;this.isBodyVisible()?this.updateTimeline(me,pe.reset):me.invalidate(pe.reset)}}updateFilename(pe){this._filename=pe,this.followActiveEditor||!pe?this.updateTitleDescription(pe):this.updateTitleDescription(`${pe} (pinned)`)}get message(){return this._message}set message(pe){this._message=pe,this.updateMessage()}updateMessage(){this._message!==void 0?this.showMessage(this._message):this.hideMessage()}showMessage(pe){this.$message.classList.remove("hide"),this.resetMessageElement(),this.$message.textContent=pe}hideMessage(){this.resetMessageElement(),this.$message.classList.add("hide")}resetMessageElement(){f.clearNode(this.$message)}get hasVisibleItems(){return this._visibleItemCount>0}clear(pe){if(this._visibleItemCount=0,this._maxItemCount=this.pageSize,this.timelinesBySource.clear(),pe){for(const{tokenSource:me}of this.pendingRequests.values())me.dispose(!0);this.pendingRequests.clear(),this.isBodyVisible()||(this.tree.setChildren(null,void 0),this._isEmpty=!0)}}async loadTimeline(pe,me){if(me===void 0){if(pe&&this.clear(!0),this.uri?.scheme===o.Schemas.vscodeSettings||this.uri?.scheme===o.Schemas.webviewPanel||this.uri?.scheme===o.Schemas.walkThrough){this.uri=void 0,this.clear(!1),this.refresh();return}this._isEmpty&&this.uri!==void 0&&this.setLoadingUriMessage()}if(this.uri===void 0){this.clear(!1),this.refresh();return}if(!this.isBodyVisible())return;let be=!1;for(const Ce of me??this.timelineService.getSources().map(ve=>ve.id))this.loadTimelineForSource(Ce,this.uri,pe)&&(be=!0);be?this._isEmpty&&this.setLoadingUriMessage():this.refresh()}loadTimelineForSource(pe,me,be,Ce){if(this.excludedSources.has(pe))return!1;const ve=this.timelinesBySource.get(pe);if(!be&&Ce?.cursor!==void 0&&ve!==void 0&&(!ve?.more||ve.items.length>ve.lastRenderedIndex+this.pageSize))return!1;Ce===void 0&&(Ce={cursor:be?void 0:ve?.cursor,limit:this.pageSize});let he=this.pendingRequests.get(pe);return he!==void 0&&(Ce.cursor=he.options.cursor,typeof Ce.limit=="number"&&(typeof he.options.limit=="number"?Ce.limit+=he.options.limit:Ce.limit=he.options.limit)),he?.tokenSource.dispose(!0),he=this.timelineService.getTimeline(pe,me,Ce,new A.CancellationTokenSource,{cacheResults:!0,resetCache:be}),he===void 0?!1:(this.pendingRequests.set(pe,he),he.tokenSource.token.onCancellationRequested(()=>this.pendingRequests.delete(pe)),this.handleRequest(he),!0)}updateTimeline(pe,me){if(me){this.timelinesBySource.delete(pe.source);const{oldest:be}=pe;this.loadTimelineForSource(pe.source,this.uri,!0,be!==void 0?{limit:{timestamp:be.timestamp,id:be.id}}:void 0)}else{const{newest:be}=pe;this.loadTimelineForSource(pe.source,this.uri,!1,be!==void 0?{limit:{timestamp:be.timestamp,id:be.id}}:{limit:this.pageSize})}}async handleRequest(pe){let me;try{me=await this.progressService.withProgress({location:this.id},()=>pe.result)}finally{this.pendingRequests.delete(pe.source)}if(me===void 0||pe.tokenSource.token.isCancellationRequested||pe.uri!==this.uri){this.pendingRequests.size===0&&this._pendingRefresh&&this.refresh();return}const be=pe.source;let Ce=!1;const ve=this.timelinesBySource.get(be);ve===void 0?(this.timelinesBySource.set(be,new X(me)),Ce=!0):Ce=ve.add(me,pe.options),Ce?(this._pendingRefresh=!0,this.hasVisibleItems&&this.pendingRequests.size!==0?this.refreshDebounced():this.refresh()):this.pendingRequests.size===0&&(this._pendingRefresh?this.refresh():this.tree.rerender())}*getItems(){let pe=!1;if(this.uri===void 0||this.timelinesBySource.size===0){this._visibleItemCount=0;return}const me=this._maxItemCount;let be=0;if(this.timelinesBySource.size===1){const[Ce,ve]=v.Iterable.first(this.timelinesBySource);if(ve.lastRenderedIndex=-1,this.excludedSources.has(Ce)){this._visibleItemCount=0;return}ve.items.length!==0&&(this._visibleItemCount=1),pe=ve.more;let he;for(const ge of ve.items){if(ge.relativeTime=void 0,ge.hideRelativeTime=void 0,be++,be>me){pe=!0;break}he=j(ge,he),yield{element:ge}}ve.lastRenderedIndex=be-1}else{let ge=function(){return Ce.filter(we=>!we.nextItem.done).reduce((we,ye)=>we===void 0||ye.nextItem.value.timestamp>=we.nextItem.value.timestamp?ye:we,void 0)};const Ce=[];let ve=!1,he=0;for(const[we,ye]of this.timelinesBySource){if(ye.lastRenderedIndex=-1,this.excludedSources.has(we)||ye.stale)continue;if(ye.items.length!==0&&(ve=!0),ye.more){pe=!0;const Ie=ye.items[Math.min(me,ye.items.length-1)];Ie.timestamp>he&&(he=Ie.timestamp)}const ke=ye.items[Symbol.iterator]();Ce.push({timeline:ye,iterator:ke,nextItem:ke.next()})}this._visibleItemCount=ve?1:0;let de,Se;for(;Se=ge();){Se.timeline.lastRenderedIndex++;const we=Se.nextItem.value;if(we.relativeTime=void 0,we.hideRelativeTime=void 0,we.timestamp>=he){if(be++,be>me){pe=!0;break}de=j(we,de),yield{element:we}}Se.nextItem=Se.iterator.next()}}this._visibleItemCount=be,be>0&&(pe?yield{element:new Y(this.pendingRequests.size!==0)}:this.pendingRequests.size!==0&&(yield{element:new Y(!0)}))}refresh(){!this.isBodyVisible()||(this.tree.setChildren(null,this.getItems()),this._isEmpty=!this.hasVisibleItems,this.uri===void 0?(this.updateFilename(void 0),this.message=(0,t.localize)(3,null)):this._isEmpty?this.pendingRequests.size!==0?this.setLoadingUriMessage():(this.updateFilename(this.labelService.getUriBasenameLabel(this.uri)),this.message=(0,t.localize)(4,null)):(this.updateFilename(this.labelService.getUriBasenameLabel(this.uri)),this.message=void 0),this._pendingRefresh=!1)}refreshDebounced(){this.refresh()}focus(){super.focus(),this.tree.domFocus()}setExpanded(pe){const me=super.setExpanded(pe);return me&&this.isBodyVisible()&&(this.followActiveEditor?this.onActiveEditorChanged():this.setUriCore(this.uri,!0)),me}setVisible(pe){pe?(this.visibilityDisposables=new C.DisposableStore,this.editorService.onDidActiveEditorChange(this.onActiveEditorChanged,this,this.visibilityDisposables),this.onDidFocus(()=>this.refreshDebounced(),this,this.visibilityDisposables),super.setVisible(pe),this.onActiveEditorChanged()):(this.visibilityDisposables?.dispose(),super.setVisible(pe))}layoutBody(pe,me){super.layoutBody(pe,me),this.tree.layout(pe,me)}renderHeaderTitle(pe){super.renderHeaderTitle(pe,this.title),pe.classList.add("timeline-view")}renderBody(pe){super.renderBody(pe),this.$container=pe,pe.classList.add("tree-explorer-viewlet-tree-view","timeline-tree-view"),this.$message=f.append(this.$container,f.$(".message")),this.$message.classList.add("timeline-subtle"),this.message=(0,t.localize)(5,null),this.$tree=document.createElement("div"),this.$tree.classList.add("customview-tree","file-icon-themable-tree","hide-arrows"),pe.appendChild(this.$tree),this.treeRenderer=this.instantiationService.createInstance(ce,this.commands),this.treeRenderer.onDidScrollToEnd(me=>{this.pageOnScroll&&this.loadMore(me)}),this.tree=this.instantiationService.createInstance(r.WorkbenchObjectTree,"TimelinePane",this.$tree,new ie,[this.treeRenderer],{identityProvider:new ee,accessibilityProvider:{getAriaLabel(me){return q(me)?me.ariaLabel:me.accessibilityInformation?me.accessibilityInformation.label:(0,t.localize)(6,null,me.relativeTime??"",me.label)},getRole(me){return q(me)?"treeitem":me.accessibilityInformation&&me.accessibilityInformation.role?me.accessibilityInformation.role:"treeitem"},getWidgetAriaLabel(){return(0,t.localize)(7,null)}},keyboardNavigationLabelProvider:new se,multipleSelectionSupport:!1,overrideStyles:{listBackground:this.getBackgroundColor()}}),this._register(this.tree.onContextMenu(me=>this.onContextMenu(this.commands,me))),this._register(this.tree.onDidChangeSelection(me=>this.ensureValidItems())),this._register(this.tree.onDidOpen(me=>{if(!me.browserEvent||!this.ensureValidItems())return;const be=this.tree.getSelection();let Ce;if(be.length===1&&(Ce=be[0]),Ce!==null)if(Z(Ce)){if(Ce.command){let ve=Ce.command.arguments??[];(Ce.command.id===V.API_OPEN_EDITOR_COMMAND_ID||Ce.command.id===V.API_OPEN_DIFF_EDITOR_COMMAND_ID)&&(ve=[...ve,me]),this.commandService.executeCommand(Ce.command.id,...ve)}}else q(Ce)&&this.loadMore(Ce)}))}loadMore(pe){pe.loading||(pe.loading=!0,this.tree.rerender(pe),this.pendingRequests.size===0&&(this._maxItemCount=this._visibleItemCount+this.pageSize,this.loadTimeline(!1)))}ensureValidItems(){return!this.hasVisibleItems||!this.timelineService.getSources().some(({id:pe})=>!this.excludedSources.has(pe)&&this.timelinesBySource.has(pe))?(this.tree.setChildren(null,void 0),this._isEmpty=!0,this.setLoadingUriMessage(),!1):!0}setLoadingUriMessage(){const pe=this.uri&&this.labelService.getUriBasenameLabel(this.uri);this.updateFilename(pe),this.message=pe?(0,t.localize)(8,null,pe):""}onContextMenu(pe,me){const be=me.element;if(be===null)return;const Ce=me.browserEvent;if(Ce.preventDefault(),Ce.stopPropagation(),!this.ensureValidItems())return;this.tree.setFocus([be]);const ve=pe.getItemContextActions(be);!ve.length||this.contextMenuService.showContextMenu({getAnchor:()=>me.anchor,getActions:()=>ve,getActionViewItem:he=>{const ge=this.keybindingService.lookupKeybinding(he.id);if(ge)return new M.ActionViewItem(he,he,{label:!0,keybinding:ge.getLabel()})},onHide:he=>{he&&this.tree.domFocus()},getActionsContext:()=>({uri:this.uri,item:be}),actionRunner:new te})}};$.TITLE=(0,t.localize)(2,null),Ee([(0,D.debounce)(500)],$.prototype,"refreshDebounced",null),$=Ee([W(1,p.IKeybindingService),W(2,u.IContextMenuService),W(3,a.IContextKeyService),W(4,n.IConfigurationService),W(5,y.IViewDescriptorService),W(6,h.IInstantiationService),W(7,d.IEditorService),W(8,b.ICommandService),W(9,T.IProgressService),W(10,g.ITimelineService),W(11,R.IOpenerService),W(12,E.IThemeService),W(13,L.ITelemetryService),W(14,c.ILabelService),W(15,K.IUriIdentityService)],$),e.TimelinePane=$;class J{constructor(pe,me,be){this.container=pe,this.hoverDelegate=be,pe.classList.add("custom-view-tree-node-item"),this.icon=f.append(pe,f.$(".custom-view-tree-node-item-icon")),this.iconLabel=new s.IconLabel(pe,{supportHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate});const Ce=f.append(this.iconLabel.element,f.$(".timeline-timestamp-container"));this.timestamp=f.append(Ce,f.$("span.timeline-timestamp"));const ve=f.append(this.iconLabel.element,f.$(".actions"));this.actionBar=new O.ActionBar(ve,{actionViewItemProvider:me})}dispose(){this.iconLabel.dispose(),this.actionBar.dispose()}reset(){this.icon.className="",this.icon.style.backgroundImage="",this.actionBar.clear()}}e.TimelineElementTemplate=J,J.id="TimelineElementTemplate";class ee{getId(pe){return pe.handle}}e.TimelineIdentityProvider=ee;class te extends _.ActionRunner{async runAction(pe,{uri:me,item:be}){if(!Z(be)){await pe.run();return}await pe.run({$mid:11,handle:be.handle,source:be.source,uri:me},me,be.source)}}class se{getKeyboardNavigationLabel(pe){return pe.label}}e.TimelineKeyboardNavigationLabelProvider=se;class ie{getHeight(pe){return G}getTemplateId(pe){return J.id}}e.TimelineListVirtualDelegate=ie;let ce=class{constructor(pe,me,be,Ce,ve){this.commands=pe,this.instantiationService=me,this.themeService=be,this.hoverService=Ce,this.configurationService=ve,this._onDidScrollToEnd=new I.Emitter,this.onDidScrollToEnd=this._onDidScrollToEnd.event,this.templateId=J.id,this.actionViewItemProvider=x.createActionViewItem.bind(void 0,this.instantiationService),this._hoverDelegate={showHover:he=>this.hoverService.showHover(he),delay:this.configurationService.getValue("workbench.hover.delay")}}setUri(pe){this.uri=pe}renderTemplate(pe){return new J(pe,this.actionViewItemProvider,this._hoverDelegate)}renderElement(pe,me,be,Ce){be.reset();const{element:ve}=pe,he=this.themeService.getColorTheme(),ge=he.type===N.ColorScheme.LIGHT?ve.icon:ve.iconDark,de=ge?S.URI.revive(ge):null;de?(be.icon.className="custom-view-tree-node-item-icon",be.icon.style.backgroundImage=f.asCSSUrl(de),be.icon.style.color=""):ve.themeIcon?(be.icon.className=`custom-view-tree-node-item-icon ${E.ThemeIcon.asClassName(ve.themeIcon)}`,ve.themeIcon.color&&(be.icon.style.color=he.getColor(ve.themeIcon.color.id)?.toString()??""),be.icon.style.backgroundImage=""):(be.icon.className="custom-view-tree-node-item-icon",be.icon.style.backgroundImage="",be.icon.style.color="");const Se=ve.tooltip?(0,z.isString)(ve.tooltip)?ve.tooltip:{markdown:ve.tooltip,markdownNotSupportedFallback:(0,U.renderMarkdownAsPlaintext)(ve.tooltip)}:void 0;be.iconLabel.setLabel(ve.label,ve.description,{title:Se,matches:(0,w.createMatches)(pe.filterData)}),be.timestamp.textContent=ve.relativeTime??"",be.timestamp.parentElement.classList.toggle("timeline-timestamp--duplicate",Z(ve)&&ve.hideRelativeTime),be.actionBar.context={uri:this.uri,item:ve},be.actionBar.actionRunner=new te,be.actionBar.push(this.commands.getItemActions(ve),{icon:!0,label:!1}),q(ve)&&setTimeout(()=>this._onDidScrollToEnd.fire(ve),0)}disposeTemplate(pe){pe.iconLabel.dispose()}};ce=Ee([W(1,h.IInstantiationService),W(2,E.IThemeService),W(3,H.IHoverService),W(4,n.IConfigurationService)],ce);const le=(0,P.registerIcon)("timeline-refresh",B.Codicon.refresh,(0,t.localize)(9,null)),ae=(0,P.registerIcon)("timeline-pin",B.Codicon.pin,(0,t.localize)(10,null)),ue=(0,P.registerIcon)("timeline-unpin",B.Codicon.pinned,(0,t.localize)(11,null));let oe=class extends C.Disposable{constructor(pe,me,be,Ce,ve){super();this.pane=pe,this.timelineService=me,this.configurationService=be,this.contextKeyService=Ce,this.menuService=ve,this._register(this.sourceDisposables=new C.DisposableStore),this._register((0,F.registerAction2)(class extends F.Action2{constructor(){super({id:"timeline.refresh",title:{value:(0,t.localize)(12,null),original:"Refresh"},icon:le,category:{value:(0,t.localize)(13,null),original:"Timeline"},menu:{id:F.MenuId.TimelineTitle,group:"navigation",order:99}})}run(he,...ge){pe.reset()}})),this._register(b.CommandsRegistry.registerCommand("timeline.toggleFollowActiveEditor",(he,...ge)=>pe.followActiveEditor=!pe.followActiveEditor)),this._register(F.MenuRegistry.appendMenuItem(F.MenuId.TimelineTitle,{command:{id:"timeline.toggleFollowActiveEditor",title:{value:(0,t.localize)(14,null),original:"Pin the Current Timeline"},icon:ae,category:{value:(0,t.localize)(15,null),original:"Timeline"}},group:"navigation",order:98,when:e.TimelineFollowActiveEditorContext})),this._register(F.MenuRegistry.appendMenuItem(F.MenuId.TimelineTitle,{command:{id:"timeline.toggleFollowActiveEditor",title:{value:(0,t.localize)(16,null),original:"Unpin the Current Timeline"},icon:ue,category:{value:(0,t.localize)(17,null),original:"Timeline"}},group:"navigation",order:98,when:e.TimelineFollowActiveEditorContext.toNegated()})),this._register(me.onDidChangeProviders(()=>this.updateTimelineSourceFilters())),this.updateTimelineSourceFilters()}getItemActions(pe){return this.getActions(F.MenuId.TimelineItemContext,{key:"timelineItem",value:pe.contextValue}).primary}getItemContextActions(pe){return this.getActions(F.MenuId.TimelineItemContext,{key:"timelineItem",value:pe.contextValue}).secondary}getActions(pe,me){const be=this.contextKeyService.createOverlay([["view",this.pane.id],[me.key,me.value]]),Ce=this.menuService.createMenu(pe,be),ge={primary:[],secondary:[]};return(0,x.createAndFillInContextMenuActions)(Ce,{shouldForwardArgs:!0},ge,"inline"),Ce.dispose(),ge}updateTimelineSourceFilters(){this.sourceDisposables.clear();const pe=new Set(this.configurationService.getValue("timeline.excludeSources")??[]);for(const me of this.timelineService.getSources())this.sourceDisposables.add((0,F.registerAction2)(class extends F.Action2{constructor(){super({id:`timeline.toggleExcludeSource:${me.id}`,title:me.label,menu:{id:F.MenuId.TimelineFilterSubMenu,group:"navigation"},toggled:a.ContextKeyExpr.regex("config.timeline.excludeSources",new RegExp(`\\b${(0,i.escapeRegExpCharacters)(me.id)}\\b`)).negate()})}run(be,...Ce){pe.has(me.id)?pe.delete(me.id):pe.add(me.id),be.get(n.IConfigurationService).updateValue("timeline.excludeSources",[...pe.keys()])}}))}};oe=Ee([W(1,g.ITimelineService),W(2,n.IConfigurationService),W(3,a.IContextKeyService),W(4,F.IMenuService)],oe)}),define(ne[2705],re([1,0,6,2,1822,16,99,35,17,149,47,44,59,2451,613,294,885,333]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),I.Registry.as(C.EditorExtensions.EditorPane).registerEditorPane(w.EditorPaneDescriptor.create(i.WebviewEditor,i.WebviewEditor.ID,(0,_.localize)(0,null)),[new k.SyncDescriptor(S.WebviewInput)]);let r=class extends f.Disposable{constructor(a){super();this.editorGroupService=a,this.editorGroupService.whenReady.then(()=>this.editorGroupService.groups.forEach(n=>{this.registerGroupListener(n)})),this._register(this.editorGroupService.onDidAddGroup(n=>this.registerGroupListener(n)))}registerGroupListener(a){const n=a.onWillOpenEditor(h=>this.onEditorOpening(h.editor,a));t.Event.once(a.onWillDispose)(()=>{n.dispose()})}onEditorOpening(a,n){if(!(a instanceof S.WebviewInput)||a.typeId!==S.WebviewInput.typeId||n.contains(a))return;let h;const g=this.editorGroupService.groups;for(const d of g)if(d.contains(a)){h=d;break}!h||h.closeEditor(a)}};r=Ee([W(0,o.IEditorGroupsService)],r),I.Registry.as(v.Extensions.Workbench).registerWorkbenchContribution(r,1),I.Registry.as(C.EditorExtensions.EditorFactory).registerEditorSerializer(s.WebviewEditorInputSerializer.ID,s.WebviewEditorInputSerializer),(0,D.registerSingleton)(l.IWebviewWorkbenchService,l.WebviewEditorService,!0),(0,A.registerAction2)(c.ShowWebViewEditorFindWidgetAction),(0,A.registerAction2)(c.HideWebViewEditorFindCommand),(0,A.registerAction2)(c.WebViewEditorFindNextCommand),(0,A.registerAction2)(c.WebViewEditorFindPreviousCommand),(0,A.registerAction2)(c.ReloadWebviewAction)}),define(ne[2706],re([1,0,1838,601,857,2319,836,2296,17,44,99,70,16,47,149,94]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),I.Registry.as(w.EditorExtensions.EditorPane).registerEditorPane(i.EditorPaneDescriptor.create(_.WalkThroughPart,_.WalkThroughPart.ID,(0,t.localize)(0,null)),[new v.SyncDescriptor(f.WalkThroughInput)]),I.Registry.as(C.Extensions.WorkbenchActions).registerWorkbenchAction(o.SyncActionDescriptor.from(D.EditorWalkThroughAction),"Help: Interactive Editor Playground",C.CATEGORIES.Help.value),I.Registry.as(w.EditorExtensions.EditorFactory).registerEditorSerializer(D.EditorWalkThroughInputSerializer.ID,D.EditorWalkThroughInputSerializer),I.Registry.as(c.Extensions.Workbench).registerWorkbenchContribution(k.WalkThroughSnippetContentProvider,1),S.KeybindingsRegistry.registerCommandAndKeybindingRule(A.WalkThroughArrowUp),S.KeybindingsRegistry.registerCommandAndKeybindingRule(A.WalkThroughArrowDown),S.KeybindingsRegistry.registerCommandAndKeybindingRule(A.WalkThroughPageUp),S.KeybindingsRegistry.registerCommandAndKeybindingRule(A.WalkThroughPageDown),o.MenuRegistry.appendMenuItem(o.MenuId.MenubarHelpMenu,{group:"1_welcome",command:{id:"workbench.action.showInteractivePlayground",title:(0,t.localize)(1,null)},order:3})}),define(ne[930],re([1,0,6,13,83,369,160,23,42,52,11,31,48,135,336,154,45,30,430,93,332,101,19,98,126,40]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextFileEditorModel=void 0;let m=class ji extends A.BaseTextEditorModel{constructor(E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H){super(O,R,V,z);this.resource=E,this.preferredEncoding=y,this.preferredLanguageId=T,this.fileService=x,this.textFileService=F,this.workingCopyBackupService=L,this.logService=M,this.workingCopyService=N,this.filesConfigurationService=B,this.labelService=P,this.pathService=U,this.extensionService=H,this._onDidChangeContent=this._register(new t.Emitter),this.onDidChangeContent=this._onDidChangeContent.event,this._onDidResolve=this._register(new t.Emitter),this.onDidResolve=this._onDidResolve.event,this._onDidChangeDirty=this._register(new t.Emitter),this.onDidChangeDirty=this._onDidChangeDirty.event,this._onDidSaveError=this._register(new t.Emitter),this.onDidSaveError=this._onDidSaveError.event,this._onDidSave=this._register(new t.Emitter),this.onDidSave=this._onDidSave.event,this._onDidRevert=this._register(new t.Emitter),this.onDidRevert=this._onDidRevert.event,this._onDidChangeEncoding=this._register(new t.Emitter),this.onDidChangeEncoding=this._onDidChangeEncoding.event,this._onDidChangeOrphaned=this._register(new t.Emitter),this.onDidChangeOrphaned=this._onDidChangeOrphaned.event,this._onDidChangeReadonly=this._register(new t.Emitter),this.onDidChangeReadonly=this._onDidChangeReadonly.event,this.typeId=i.NO_TYPE_ID,this.capabilities=0,this.name=(0,o.basename)(this.labelService.getUriLabel(this.resource)),this.resourceHasExtension=!!n.extUri.extname(this.resource),this.versionId=0,this.ignoreDirtyOnModelContentChange=!1,this.lastModelContentChangeFromUndoRedo=void 0,this.saveSequentializer=new v.TaskSequentializer,this.dirty=!1,this.inConflictMode=!1,this.inOrphanMode=!1,this.inErrorMode=!1,this._register(this.workingCopyService.registerWorkingCopy(this)),this.registerListeners()}registerListeners(){this._register(this.fileService.onDidFilesChange(E=>this.onDidFilesChange(E))),this._register(this.filesConfigurationService.onFilesAssociationChange(E=>this.onFilesAssociationChange()))}async onDidFilesChange(E){let y=!1,T;if(this.inOrphanMode?E.contains(this.resource,1)&&(T=!1,y=!0):E.contains(this.resource,2)&&(T=!0,y=!0),y&&this.inOrphanMode!==T){let R=!1;T&&(await(0,v.timeout)(100),this.isDisposed()?R=!0:R=!await this.fileService.exists(this.resource)),this.inOrphanMode!==R&&!this.isDisposed()&&this.setOrphaned(R)}}setOrphaned(E){this.inOrphanMode!==E&&(this.inOrphanMode=E,this._onDidChangeOrphaned.fire())}onFilesAssociationChange(){if(!this.isResolved())return;const E=this.getFirstLineText(this.textEditorModel),y=this.getOrCreateLanguage(this.resource,this.languageService,this.preferredLanguageId,E);this.modelService.setMode(this.textEditorModel,y)}setLanguageId(E){super.setLanguageId(E),this.preferredLanguageId=E}async backup(E){let y;this.lastResolvedFileStat&&(y={mtime:this.lastResolvedFileStat.mtime,ctime:this.lastResolvedFileStat.ctime,size:this.lastResolvedFileStat.size,etag:this.lastResolvedFileStat.etag,orphaned:this.inOrphanMode});const T=await this.textFileService.getEncodedReadable(this.resource,(0,f.withNullAsUndefined)(this.createSnapshot()),{encoding:r.UTF8});return{meta:y,content:T}}async revert(E){if(!this.isResolved())return;const y=this.dirty,T=this.doSetDirty(!1);if(!E?.soft)try{await this.resolve({forceReadFromFile:!0})}catch(O){if(O.fileOperationResult!==1)throw T(),O}this._onDidRevert.fire(),y&&this._onDidChangeDirty.fire()}async resolve(E){if(this.trace("[text file model] resolve() - enter"),this.isDisposed()){this.trace("[text file model] resolve() - exit - without resolving because model is disposed");return}if(!E?.contents&&(this.dirty||this.saveSequentializer.hasPending())){this.trace("[text file model] resolve() - exit - without resolving because model is dirty or being saved");return}return this.doResolve(E)}async doResolve(E){if(E?.contents)return this.resolveFromBuffer(E.contents,E);if(!(!this.isResolved()&&await this.resolveFromBackup(E)))return this.resolveFromFile(E)}async resolveFromBuffer(E,y){this.trace("[text file model] resolveFromBuffer()");let T,R,O,x;try{const L=await this.fileService.stat(this.resource);T=L.mtime,R=L.ctime,O=L.size,x=L.etag,this.setOrphaned(!1)}catch(L){T=Date.now(),R=Date.now(),O=0,x=D.ETAG_DISABLED,this.setOrphaned(L.fileOperationResult===1)}const F=await this.textFileService.encoding.getPreferredWriteEncoding(this.resource,this.preferredEncoding);this.resolveFromContent({resource:this.resource,name:this.name,mtime:T,ctime:R,size:O,etag:x,value:E,encoding:F.encoding,readonly:!1},!0,y)}async resolveFromBackup(E){const y=await this.workingCopyBackupService.resolve(this);let T=r.UTF8;return y&&(T=(await this.textFileService.encoding.getPreferredWriteEncoding(this.resource,this.preferredEncoding)).encoding),!this.isResolved()?y?(await this.doResolveFromBackup(y,T,E),!0):!1:(this.trace("[text file model] resolveFromBackup() - exit - without resolving because previously new model got created meanwhile"),!0)}async doResolveFromBackup(E,y,T){this.trace("[text file model] doResolveFromBackup()"),this.resolveFromContent({resource:this.resource,name:this.name,mtime:E.meta?E.meta.mtime:Date.now(),ctime:E.meta?E.meta.ctime:Date.now(),size:E.meta?E.meta.size:0,etag:E.meta?E.meta.etag:D.ETAG_DISABLED,value:await(0,p.createTextBufferFactoryFromStream)(await this.textFileService.getDecodedStream(this.resource,E.value,{encoding:r.UTF8})),encoding:y,readonly:!1},!0,T),E.meta?.orphaned&&this.setOrphaned(!0)}async resolveFromFile(E){this.trace("[text file model] resolveFromFile()");const y=E?.forceReadFromFile,T=this.isResolved()||E?.allowBinary;let R;y?R=D.ETAG_DISABLED:this.lastResolvedFileStat&&(R=this.lastResolvedFileStat.etag);const O=this.versionId;try{const x=await this.textFileService.readStream(this.resource,{acceptTextOnly:!T,etag:R,encoding:this.preferredEncoding});if(this.setOrphaned(!1),O!==this.versionId){this.trace("[text file model] resolveFromFile() - exit - without resolving because model content changed");return}return this.resolveFromContent(x,!1,E)}catch(x){const F=x.fileOperationResult;if(this.setOrphaned(F===1),this.isResolved()&&F===2){x instanceof D.NotModifiedSinceFileOperationError&&this.updateLastResolvedFileStat(x.stat);return}if(this.isResolved()&&F===1&&!y)return;throw x}}resolveFromContent(E,y,T){if(this.trace("[text file model] resolveFromContent() - enter"),this.isDisposed()){this.trace("[text file model] resolveFromContent() - exit - because model is disposed");return}this.updateLastResolvedFileStat({resource:this.resource,name:E.name,mtime:E.mtime,ctime:E.ctime,size:E.size,etag:E.etag,readonly:E.readonly,isFile:!0,isDirectory:!1,isSymbolicLink:!1,children:void 0});const R=this.contentEncoding;this.contentEncoding=E.encoding,this.preferredEncoding?this.updatePreferredEncoding(this.contentEncoding):R!==this.contentEncoding&&this._onDidChangeEncoding.fire(),this.textEditorModel?this.doUpdateTextModel(E.value):this.doCreateTextModel(E.resource,E.value),this.setDirty(!!y),this._onDidResolve.fire(T?.reason??3)}doCreateTextModel(E,y){this.trace("[text file model] doCreateTextModel()");const T=this.createTextEditorModel(y,E,this.preferredLanguageId);this.installModelListeners(T),this.autoDetectLanguage()}doUpdateTextModel(E){this.trace("[text file model] doUpdateTextModel()"),this.ignoreDirtyOnModelContentChange=!0;try{this.updateTextEditorModel(E,this.preferredLanguageId)}finally{this.ignoreDirtyOnModelContentChange=!1}}installModelListeners(E){this._register(E.onDidChangeContent(y=>this.onModelContentChanged(E,y.isUndoing||y.isRedoing)))}onModelContentChanged(E,y){if(this.trace("[text file model] onModelContentChanged() - enter"),this.versionId++,this.trace(`[text file model] onModelContentChanged() - new versionId ${this.versionId}`),y&&(this.lastModelContentChangeFromUndoRedo=Date.now()),!this.ignoreDirtyOnModelContentChange&&!this.isReadonly())if(E.getAlternativeVersionId()===this.bufferSavedVersionId){this.trace("[text file model] onModelContentChanged() - model content changed back to last saved version");const T=this.dirty;this.setDirty(!1),T&&this._onDidRevert.fire()}else this.trace("[text file model] onModelContentChanged() - model content changed and marked as dirty"),this.setDirty(!0);this._onDidChangeContent.fire(),this.autoDetectLanguage()}whenReadyToDetectLanguage(){return ji._whenReadyToDetectLanguage===void 0&&(ji._whenReadyToDetectLanguage=this.extensionService.whenInstalledExtensionsRegistered()),ji._whenReadyToDetectLanguage}async autoDetectLanguage(){await this.whenReadyToDetectLanguage();const E=this.getLanguageId();if(this.resource.scheme===this.pathService.defaultUriScheme&&(!E||E===g.PLAINTEXT_LANGUAGE_ID)&&!this.resourceHasExtension)return super.autoDetectLanguage()}isDirty(){return this.dirty}setDirty(E){if(!this.isResolved())return;const y=this.dirty;this.doSetDirty(E),E!==y&&this._onDidChangeDirty.fire()}doSetDirty(E){const y=this.dirty,T=this.inConflictMode,R=this.inErrorMode,O=this.bufferSavedVersionId;return E?this.dirty=!0:(this.dirty=!1,this.inConflictMode=!1,this.inErrorMode=!1,this.updateSavedVersionId()),()=>{this.dirty=y,this.inConflictMode=T,this.inErrorMode=R,this.bufferSavedVersionId=O}}async save(E=Object.create(null)){return this.isResolved()?this.isReadonly()?(this.trace("[text file model] save() - ignoring request for readonly resource"),!1):(this.hasState(3)||this.hasState(5))&&(E.reason===2||E.reason===3||E.reason===4)?(this.trace("[text file model] save() - ignoring auto save request for model that is in conflict or error"),!1):(this.trace("[text file model] save() - enter"),await this.doSave(E),this.trace("[text file model] save() - exit"),this.hasState(0)):!1}async doSave(E){typeof E.reason!="number"&&(E.reason=1);let y=this.versionId;if(this.trace(`[text file model] doSave(${y}) - enter with versionId ${y}`),this.saveSequentializer.hasPending(y))return this.trace(`[text file model] doSave(${y}) - exit - found a pending save for versionId ${y}`),this.saveSequentializer.pending;if(!E.force&&!this.dirty){this.trace(`[text file model] doSave(${y}) - exit - because not dirty and/or versionId is different (this.isDirty: ${this.dirty}, this.versionId: ${this.versionId})`);return}if(this.saveSequentializer.hasPending())return this.trace(`[text file model] doSave(${y}) - exit - because busy saving`),this.saveSequentializer.cancelPending(),this.saveSequentializer.setNext(()=>this.doSave(E));this.isResolved()&&this.textEditorModel.pushStackElement();const T=new l.CancellationTokenSource;return this.saveSequentializer.setPending(y,(async()=>{if(this.isResolved()&&!E.skipSaveParticipants)try{if(E.reason===2&&typeof this.lastModelContentChangeFromUndoRedo=="number"){const x=Date.now()-this.lastModelContentChangeFromUndoRedo;x<ji.UNDO_REDO_SAVE_PARTICIPANTS_AUTO_SAVE_THROTTLE_THRESHOLD&&await(0,v.timeout)(ji.UNDO_REDO_SAVE_PARTICIPANTS_AUTO_SAVE_THROTTLE_THRESHOLD-x)}T.token.isCancellationRequested||await this.textFileService.files.runSaveParticipants(this,{reason:E.reason??1},T.token)}catch(x){this.logService.error(`[text file model] runSaveParticipants(${y}) - resulted in an error: ${x.toString()}`,this.resource.toString())}if(T.token.isCancellationRequested||(T.dispose(),this.isDisposed())||!this.isResolved())return;y=this.versionId,this.inErrorMode=!1,this.trace(`[text file model] doSave(${y}) - before write()`);const R=(0,f.assertIsDefined)(this.lastResolvedFileStat),O=this;return this.saveSequentializer.setPending(y,(async()=>{try{const x=await this.textFileService.write(R.resource,O.createSnapshot(),{mtime:R.mtime,encoding:this.getEncoding(),etag:E.ignoreModifiedSince||!this.filesConfigurationService.preventSaveConflicts(R.resource,O.getLanguageId())?D.ETAG_DISABLED:R.etag,unlock:E.writeUnlock,writeElevated:E.writeElevated});this.handleSaveSuccess(x,y,E)}catch(x){this.handleSaveError(x,y,E)}})())})(),()=>T.cancel())}handleSaveSuccess(E,y,T){this.updateLastResolvedFileStat(E),y===this.versionId?(this.trace(`[text file model] handleSaveSuccess(${y}) - setting dirty to false because versionId did not change`),this.setDirty(!1)):this.trace(`[text file model] handleSaveSuccess(${y}) - not setting dirty to false because versionId did change meanwhile`),this.setOrphaned(!1),this._onDidSave.fire({reason:T.reason,stat:E,source:T.source})}handleSaveError(E,y,T){if((T.ignoreErrorHandler?this.logService.trace:this.logService.error).apply(this.logService,[`[text file model] handleSaveError(${y}) - exit - resulted in a save error: ${E.toString()}`,this.resource.toString()]),T.ignoreErrorHandler)throw E;this.setDirty(!0),this.inErrorMode=!0,E.fileOperationResult===3&&(this.inConflictMode=!0),this.textFileService.files.saveErrorHandler.onSaveError(E,this),this._onDidSaveError.fire()}updateSavedVersionId(){this.isResolved()&&(this.bufferSavedVersionId=this.textEditorModel.getAlternativeVersionId())}updateLastResolvedFileStat(E){const y=this.isReadonly();this.lastResolvedFileStat?this.lastResolvedFileStat.mtime<=E.mtime&&(this.lastResolvedFileStat=E):this.lastResolvedFileStat=E,this.isReadonly()!==y&&this._onDidChangeReadonly.fire()}hasState(E){switch(E){case 3:return this.inConflictMode;case 1:return this.dirty;case 5:return this.inErrorMode;case 4:return this.inOrphanMode;case 2:return this.saveSequentializer.hasPending();case 0:return!this.dirty}}async joinState(E){return this.saveSequentializer.pending}getLanguageId(){return this.textEditorModel?this.textEditorModel.getLanguageId():this.preferredLanguageId}getEncoding(){return this.preferredEncoding||this.contentEncoding}async setEncoding(E,y){!this.isNewEncoding(E)||(y===0?(this.updatePreferredEncoding(E),this.isDirty()||(this.versionId++,this.setDirty(!0)),this.inConflictMode||await this.save()):(this.isDirty()&&await this.save(),this.updatePreferredEncoding(E),await this.resolve({forceReadFromFile:!0})))}updatePreferredEncoding(E){!this.isNewEncoding(E)||(this.preferredEncoding=E,this._onDidChangeEncoding.fire())}isNewEncoding(E){return!(this.preferredEncoding===E||!this.preferredEncoding&&this.contentEncoding===E)}trace(E){this.logService.trace(E,this.resource.toString())}isResolved(){return!!this.textEditorModel}isReadonly(){return this.lastResolvedFileStat?.readonly||this.fileService.hasCapability(this.resource,2048)}dispose(){this.trace("[text file model] dispose()"),this.inConflictMode=!1,this.inOrphanMode=!1,this.inErrorMode=!1,super.dispose()}};m.UNDO_REDO_SAVE_PARTICIPANTS_AUTO_SAVE_THROTTLE_THRESHOLD=500,m=Ee([W(3,I.ILanguageService),W(4,w.IModelService),W(5,D.IFileService),W(6,_.ITextFileService),W(7,k.IWorkingCopyBackupService),W(8,C.ILogService),W(9,c.IWorkingCopyService),W(10,S.IFilesConfigurationService),W(11,s.ILabelService),W(12,u.ILanguageDetectionService),W(13,h.IAccessibilityService),W(14,a.IPathService),W(15,d.IExtensionService)],m),e.TextFileEditorModel=m}),define(ne[2707],re([1,0,9,5,2,52,875,83,18,61,930,23,35,147,2061,56]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextModelResolverService=void 0;let s=class extends _.ReferenceCollection{constructor(p,u,a,n){super();this.instantiationService=p,this.textFileService=u,this.fileService=a,this.modelService=n,this.providers=new Map,this.modelsToDispose=new Set}createReferencedObject(p){return this.doCreateReferencedObject(p)}async doCreateReferencedObject(p,u){this.modelsToDispose.delete(p);const a=t.URI.parse(p);if(a.scheme===I.Schemas.inMemory){if(!this.modelService.getModel(a))throw new Error(`Unable to resolve inMemory resource ${p}`);return this.instantiationService.createInstance(k.TextResourceEditorModel,a)}if(a.scheme===I.Schemas.untitled)return this.textFileService.untitled.resolve({untitledResource:a});if(this.fileService.hasProvider(a))return this.textFileService.files.resolve(a,{reason:2});if(this.providers.has(a.scheme))return await this.resolveTextModelContent(p),this.instantiationService.createInstance(k.TextResourceEditorModel,a);if(!u)return await this.fileService.activateProvider(a.scheme),this.doCreateReferencedObject(p,!0);throw new Error(`Unable to resolve resource ${p}`)}destroyReferencedObject(p,u){const a=t.URI.parse(p);a.scheme===I.Schemas.untitled||a.scheme===I.Schemas.inMemory||(this.modelsToDispose.add(p),(async()=>{try{const n=await u;if(!this.modelsToDispose.has(p)||(n instanceof v.TextFileEditorModel&&await this.textFileService.files.canDispose(n),!this.modelsToDispose.has(p)))return;n.dispose()}catch{}finally{this.modelsToDispose.delete(p)}})())}registerTextModelContentProvider(p,u){let a=this.providers.get(p);return a||(a=[],this.providers.set(p,a)),a.unshift(u),(0,_.toDisposable)(()=>{const n=this.providers.get(p);if(!n)return;const h=n.indexOf(u);h!==-1&&(n.splice(h,1),n.length===0&&this.providers.delete(p))})}hasTextModelContentProvider(p){return this.providers.get(p)!==void 0}async resolveTextModelContent(p){const u=t.URI.parse(p),a=this.providers.get(u.scheme)||[];for(const n of a){const h=await n.provideTextContent(u);if(h)return h}throw new Error(`Unable to resolve text model content for resource ${p}`)}};s=Ee([W(0,f.IInstantiationService),W(1,D.ITextFileService),W(2,C.IFileService),W(3,A.IModelService)],s);let l=class extends _.Disposable{constructor(p,u,a,n,h){super();this.instantiationService=p,this.fileService=u,this.undoRedoService=a,this.modelService=n,this.uriIdentityService=h,this.resourceModelCollection=this.instantiationService.createInstance(s),this.asyncModelCollection=new _.AsyncReferenceCollection(this.resourceModelCollection),this._register(new i.ModelUndoRedoParticipant(this.modelService,this,this.undoRedoService))}async createModelReference(p){return p=this.uriIdentityService.asCanonicalUri(p),await this.asyncModelCollection.acquire(p.toString())}registerTextModelContentProvider(p,u){return this.resourceModelCollection.registerTextModelContentProvider(p,u)}canHandleResource(p){return this.fileService.hasProvider(p)||p.scheme===I.Schemas.untitled||p.scheme===I.Schemas.inMemory?!0:this.resourceModelCollection.hasTextModelContentProvider(p.scheme)}};l=Ee([W(0,f.IInstantiationService),W(1,C.IFileService),W(2,c.IUndoRedoService),W(3,A.IModelService),W(4,S.IUriIdentityService)],l),e.TextModelResolverService=l,(0,o.registerSingleton)(w.ITextModelService,l,!0)}),define(ne[931],re([1,0,369,42,52,6,160,113,93,135,336,83,13,45,283,21,29,430,60,332,98]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UntitledTextEditorModel=void 0;let a=class bn extends t.BaseTextEditorModel{constructor(h,g,d,m,b,E,y,T,R,O,x,F,L,M,N){super(y,E,M,N);this.resource=h,this.hasAssociatedFilePath=g,this.initialValue=d,this.preferredLanguageId=m,this.preferredEncoding=b,this.workingCopyBackupService=T,this.textResourceConfigurationService=R,this.workingCopyService=O,this.textFileService=x,this.labelService=F,this.editorService=L,this._onDidChangeContent=this._register(new A.Emitter),this.onDidChangeContent=this._onDidChangeContent.event,this._onDidChangeName=this._register(new A.Emitter),this.onDidChangeName=this._onDidChangeName.event,this._onDidChangeDirty=this._register(new A.Emitter),this.onDidChangeDirty=this._onDidChangeDirty.event,this._onDidChangeEncoding=this._register(new A.Emitter),this.onDidChangeEncoding=this._onDidChangeEncoding.event,this._onDidSave=this._register(new A.Emitter),this.onDidSave=this._onDidSave.event,this._onDidRevert=this._register(new A.Emitter),this.onDidRevert=this._onDidRevert.event,this.typeId=v.NO_TYPE_ID,this.capabilities=2,this.configuredLabelFormat="content",this.cachedModelFirstLineWords=void 0,this.dirty=this.hasAssociatedFilePath||!!this.initialValue,this._register(this.workingCopyService.registerWorkingCopy(this)),m&&this.setLanguageId(m),this.onConfigurationChange(!1),this.registerListeners()}get name(){return this.configuredLabelFormat==="content"&&!this.hasAssociatedFilePath&&this.cachedModelFirstLineWords?this.cachedModelFirstLineWords:this.labelService.getUriBasenameLabel(this.resource)}registerListeners(){this._register(this.textResourceConfigurationService.onDidChangeConfiguration(()=>this.onConfigurationChange(!0)))}onConfigurationChange(h){const g=this.textResourceConfigurationService.getValue(this.resource,"files.encoding");this.configuredEncoding!==g&&typeof g=="string"&&(this.configuredEncoding=g,h&&!this.preferredEncoding&&this._onDidChangeEncoding.fire());const d=this.textResourceConfigurationService.getValue(this.resource,"workbench.editor.untitled.labelFormat");this.configuredLabelFormat!==d&&(d==="content"||d==="name")&&(this.configuredLabelFormat=d,h&&this._onDidChangeName.fire())}setLanguageId(h){let g=h===bn.ACTIVE_EDITOR_LANGUAGE_ID?this.editorService.activeTextEditorLanguageId:h;this.preferredLanguageId=g,g&&super.setLanguageId(g)}getLanguageId(){return this.textEditorModel?this.textEditorModel.getLanguageId():this.preferredLanguageId}getEncoding(){return this.preferredEncoding||this.configuredEncoding}async setEncoding(h){const g=this.getEncoding();this.preferredEncoding=h,g!==this.preferredEncoding&&this._onDidChangeEncoding.fire()}isDirty(){return this.dirty}setDirty(h){this.dirty!==h&&(this.dirty=h,this._onDidChangeDirty.fire())}async save(h){const g=await this.textFileService.save(this.resource,h);return g&&this._onDidSave.fire({reason:h?.reason,source:h?.source}),!!g}async revert(){this.setDirty(!1),this._onDidRevert.fire(),this.dispose()}async backup(h){let g;return this.isResolved()?g=await this.textFileService.getEncodedReadable(this.resource,(0,o.withNullAsUndefined)(this.createSnapshot()),{encoding:l.UTF8}):typeof this.initialValue=="string"&&(g=(0,r.bufferToReadable)(r.VSBuffer.fromString(this.initialValue))),{content:g}}async resolve(){let h=!1,g=!1;if(this.textEditorModel)this.updateTextEditorModel(void 0,this.preferredLanguageId);else{let m;const b=await this.workingCopyBackupService.resolve(this);b?(m=b.value,g=!0):m=(0,r.bufferToStream)(r.VSBuffer.fromString(this.initialValue||""));const E=await(0,I.createTextBufferFactoryFromStream)(await this.textFileService.getDecodedStream(this.resource,m,{encoding:l.UTF8}));this.createTextEditorModel(E,this.resource,this.preferredLanguageId),h=!0}const d=(0,o.assertIsDefined)(this.textEditorModel);return this._register(d.onDidChangeContent(m=>this.onModelContentChanged(d,m))),this._register(d.onDidChangeLanguage(()=>this.onConfigurationChange(!0))),h&&((g||this.initialValue)&&this.updateNameFromFirstLine(d),this.setDirty(this.hasAssociatedFilePath||!!g||!!this.initialValue),(g||this.initialValue)&&this._onDidChangeContent.fire()),super.resolve()}onModelContentChanged(h,g){!this.hasAssociatedFilePath&&h.getLineCount()===1&&h.getLineContent(1)===""?this.setDirty(!1):this.setDirty(!0),g.changes.some(d=>(d.range.startLineNumber===1||d.range.endLineNumber===1)&&d.range.startColumn<=bn.FIRST_LINE_NAME_CANDIDATE_MAX_LENGTH)&&this.updateNameFromFirstLine(h),this._onDidChangeContent.fire(),this.autoDetectLanguage()}updateNameFromFirstLine(h){if(this.hasAssociatedFilePath)return;let g,d=h.getValueInRange({startLineNumber:1,endLineNumber:1,startColumn:1,endColumn:bn.FIRST_LINE_NAME_CANDIDATE_MAX_LENGTH+1}).trim().replace(/\s+/g," ");d=d.substr(0,(0,s.getCharContainingOffset)(d,bn.FIRST_LINE_NAME_MAX_LENGTH)[0]),d&&(0,i.ensureValidWordDefinition)().exec(d)&&(g=d),g!==this.cachedModelFirstLineWords&&(this.cachedModelFirstLineWords=g,this._onDidChangeName.fire())}isReadonly(){return!1}};a.FIRST_LINE_NAME_MAX_LENGTH=40,a.FIRST_LINE_NAME_CANDIDATE_MAX_LENGTH=a.FIRST_LINE_NAME_MAX_LENGTH*10,a.ACTIVE_EDITOR_LANGUAGE_ID="${activeEditorLanguage}",a=Ee([W(5,f.ILanguageService),W(6,_.IModelService),W(7,k.IWorkingCopyBackupService),W(8,D.ITextResourceConfigurationService),W(9,w.IWorkingCopyService),W(10,C.ITextFileService),W(11,c.ILabelService),W(12,S.IEditorService),W(13,p.ILanguageDetectionService),W(14,u.IAccessibilityService)],a),e.UntitledTextEditorModel=a}),define(ne[374],re([1,0,9,5,931,8,6,55,18,2,35]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UntitledTextEditorService=e.IUntitledTextEditorService=void 0,e.IUntitledTextEditorService=(0,f.createDecorator)("untitledTextEditorService");let C=class extends w.Disposable{constructor(c,i){super();this.instantiationService=c,this.configurationService=i,this._onDidChangeDirty=this._register(new k.Emitter),this.onDidChangeDirty=this._onDidChangeDirty.event,this._onDidChangeEncoding=this._register(new k.Emitter),this.onDidChangeEncoding=this._onDidChangeEncoding.event,this._onWillDispose=this._register(new k.Emitter),this.onWillDispose=this._onWillDispose.event,this._onDidChangeLabel=this._register(new k.Emitter),this.onDidChangeLabel=this._onDidChangeLabel.event,this.mapResourceToModel=new D.ResourceMap}get(c){return this.mapResourceToModel.get(c)}getValue(c){return this.get(c)?.textEditorModel?.getValue()}async resolve(c){const i=this.doCreateOrGet(c);return await i.resolve(),i}create(c){return this.doCreateOrGet(c)}doCreateOrGet(c=Object.create(null)){const i=this.massageOptions(c);return i.untitledResource&&this.mapResourceToModel.has(i.untitledResource)?this.mapResourceToModel.get(i.untitledResource):this.doCreate(i)}massageOptions(c){const i=Object.create(null);if(c.associatedResource?(i.untitledResource=t.URI.from({scheme:I.Schemas.untitled,authority:c.associatedResource.authority,fragment:c.associatedResource.fragment,path:c.associatedResource.path,query:c.associatedResource.query}),i.associatedResource=c.associatedResource):c.untitledResource?.scheme===I.Schemas.untitled&&(i.untitledResource=c.untitledResource),c.languageId)i.languageId=c.languageId;else if(!i.associatedResource){const S=this.configurationService.getValue();S.files?.defaultLanguage&&(i.languageId=S.files.defaultLanguage)}return i.encoding=c.encoding,i.initialValue=c.initialValue,i}doCreate(c){let i=c.untitledResource;if(!i){let s=1;do i=t.URI.from({scheme:I.Schemas.untitled,path:`Untitled-${s}`}),s++;while(this.mapResourceToModel.has(i))}const S=this._register(this.instantiationService.createInstance(_.UntitledTextEditorModel,i,!!c.associatedResource,c.initialValue,c.languageId,c.encoding));return this.registerModel(S),S}registerModel(c){const i=new w.DisposableStore;i.add(c.onDidChangeDirty(()=>this._onDidChangeDirty.fire(c))),i.add(c.onDidChangeName(()=>this._onDidChangeLabel.fire(c))),i.add(c.onDidChangeEncoding(()=>this._onDidChangeEncoding.fire(c))),i.add(c.onWillDispose(()=>this._onWillDispose.fire(c))),k.Event.once(c.onWillDispose)(()=>{this.mapResourceToModel.delete(c.resource),i.dispose()}),this.mapResourceToModel.set(c.resource,c),c.isDirty()&&this._onDidChangeDirty.fire(c)}};C=Ee([W(0,f.IInstantiationService),W(1,A.IConfigurationService)],C),e.UntitledTextEditorService=C,(0,v.registerSingleton)(e.IUntitledTextEditorService,C,!0)}),define(ne[437],re([1,0,60,18,48,19,13,89,54,23,5,45,147,364,202,333,374]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomEditorInput=void 0;let l=class Cn extends S.LazilyResolvedWebviewEditorInput{constructor(p,u,a,n,h,g,d,m,b,E,y,T){super(a,u,"",n,g);this.instantiationService=d,this.labelService=m,this.customEditorService=b,this.fileDialogService=E,this.undoRedoService=y,this.fileService=T,this._shortDescription=void 0,this._mediumDescription=void 0,this._longDescription=void 0,this._shortTitle=void 0,this._mediumTitle=void 0,this._longTitle=void 0,this._editorResource=p,this.oldResource=h.oldResource,this._defaultDirtyState=h.startsDirty,this._backupId=h.backupId,this._untitledDocumentData=h.untitledDocumentData,this.registerListeners()}static create(p,u,a,n,h){return p.invokeFunction(g=>{const d=g.get(s.IUntitledTextEditorService).getValue(u);let m=d?t.VSBuffer.fromString(d):void 0;const b=(0,D.generateUuid)(),E=g.get(i.IWebviewService).createWebviewOverlay(b,{customClasses:h?.customClasses},{},void 0),y=p.createInstance(Cn,u,a,b,E,{untitledDocumentData:m,oldResource:h?.oldResource});return typeof n!="undefined"&&y.updateGroup(n),y})}get resource(){return this._editorResource}registerListeners(){this._register(this.labelService.onDidChangeFormatters(p=>this.onLabelEvent(p.scheme))),this._register(this.fileService.onDidChangeFileSystemProviderRegistrations(p=>this.onLabelEvent(p.scheme))),this._register(this.fileService.onDidChangeFileSystemProviderCapabilities(p=>this.onLabelEvent(p.scheme)))}onLabelEvent(p){p===this.resource.scheme&&this.updateLabel()}updateLabel(){this._shortDescription=void 0,this._mediumDescription=void 0,this._longDescription=void 0,this._shortTitle=void 0,this._mediumTitle=void 0,this._longTitle=void 0,this._onDidChangeLabel.fire()}get typeId(){return Cn.typeId}get editorId(){return this.viewType}get capabilities(){let p=0;return this.customEditorService.getCustomEditorCapabilities(this.viewType)?.supportsMultipleEditorsPerDocument||(p|=8),this._modelRef?this._modelRef.object.isReadonly()&&(p|=2):this.fileService.hasCapability(this.resource,2048)&&(p|=2),this.resource.scheme===f.Schemas.untitled&&(p|=4),p}getName(){return(0,_.basename)(this.labelService.getUriLabel(this.resource))}getDescription(p=1){switch(p){case 0:return this.shortDescription;case 2:return this.longDescription;case 1:default:return this.mediumDescription}}get shortDescription(){return typeof this._shortDescription!="string"&&(this._shortDescription=this.labelService.getUriBasenameLabel((0,A.dirname)(this.resource))),this._shortDescription}get mediumDescription(){return typeof this._mediumDescription!="string"&&(this._mediumDescription=this.labelService.getUriLabel((0,A.dirname)(this.resource),{relative:!0})),this._mediumDescription}get longDescription(){return typeof this._longDescription!="string"&&(this._longDescription=this.labelService.getUriLabel((0,A.dirname)(this.resource))),this._longDescription}get shortTitle(){return typeof this._shortTitle!="string"&&(this._shortTitle=this.getName()),this._shortTitle}get mediumTitle(){return typeof this._mediumTitle!="string"&&(this._mediumTitle=this.labelService.getUriLabel(this.resource,{relative:!0})),this._mediumTitle}get longTitle(){return typeof this._longTitle!="string"&&(this._longTitle=this.labelService.getUriLabel(this.resource)),this._longTitle}getTitle(p){switch(p){case 0:return this.shortTitle;case 2:return this.longTitle;default:case 1:return this.mediumTitle}}matches(p){return super.matches(p)?!0:this===p||p instanceof Cn&&this.viewType===p.viewType&&(0,A.isEqual)(this.resource,p.resource)}copy(){return Cn.create(this.instantiationService,this.resource,this.viewType,this.group,this.webview.options)}isDirty(){return this._modelRef?this._modelRef.object.isDirty():!!this._defaultDirtyState}async save(p,u){if(!this._modelRef)return;const a=await this._modelRef.object.saveCustomEditor(u);if(!!a)return(0,A.isEqual)(a,this.resource)?this:{resource:a}}async saveAs(p,u){if(!this._modelRef)return;const a=this._editorResource,n=await this.fileDialogService.pickFileToSave(a,u?.availableFileSystems);if(!!n&&!!await this._modelRef.object.saveCustomEditorAs(this._editorResource,n,u))return(await this.rename(p,n))?.editor}async revert(p,u){if(this._modelRef)return this._modelRef.object.revert(u);this._defaultDirtyState=!1,this._onDidChangeDirty.fire()}async resolve(){if(await super.resolve(),this.isDisposed())return null;if(!this._modelRef){const p=this.capabilities;this._modelRef=this._register((0,k.assertIsDefined)(await this.customEditorService.models.tryRetain(this.resource,this.viewType))),this._register(this._modelRef.object.onDidChangeDirty(()=>this._onDidChangeDirty.fire())),this._register(this._modelRef.object.onDidChangeReadonly(()=>this._onDidChangeCapabilities.fire())),this._untitledDocumentData&&(this._defaultDirtyState=!0),this.isDirty()&&this._onDidChangeDirty.fire(),this.capabilities!==p&&this._onDidChangeCapabilities.fire()}return null}async rename(p,u){return{editor:{resource:u}}}undo(){return(0,k.assertIsDefined)(this._modelRef),this.undoRedoService.undo(this.resource)}redo(){return(0,k.assertIsDefined)(this._modelRef),this.undoRedoService.redo(this.resource)}onMove(p){this._moveHandler=p}transfer(p){if(!!super.transfer(p))return p._moveHandler=this._moveHandler,this._moveHandler=void 0,p}get backupId(){return this._modelRef?this._modelRef.object.backupId:this._backupId}get untitledDocumentData(){return this._untitledDocumentData}toUntyped(){return{resource:this.resource,options:{override:this.viewType}}}};l.typeId="workbench.editors.webviewEditor",l=Ee([W(5,S.IWebviewWorkbenchService),W(6,v.IInstantiationService),W(7,C.ILabelService),W(8,c.ICustomEditorService),W(9,I.IFileDialogService),W(10,o.IUndoRedoService),W(11,w.IFileService)],l),e.CustomEditorInput=l}),define(ne[2708],re([1,0,2,65,75,44,203,253,59,21,256,232,437,9,294,425,8]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadEditorTabs=void 0;let l=class{constructor(p,u,a,n){this._editorGroupsService=u,this._configurationService=a,this._dispoables=new t.DisposableStore,this._tabGroupModel=[],this._groupLookup=new Map,this._tabInfoLookup=new Map,this._proxy=p.getProxy(f.ExtHostContext.ExtHostEditorTabs),this._dispoables.add(n.onDidEditorsChange(h=>this._updateTabsModel(h))),this._dispoables.add(this._editorGroupsService.onDidAddGroup(()=>this._createTabsModel())),this._dispoables.add(this._editorGroupsService.onDidRemoveGroup(()=>this._createTabsModel())),this._editorGroupsService.whenReady.then(()=>this._createTabsModel())}dispose(){this._groupLookup.clear(),this._tabInfoLookup.clear(),this._dispoables.dispose()}_buildTabObject(p,u,a){const n=u.editorId;return{id:this._generateTabId(u,p.id),label:u.getName(),editorId:n,input:this._editorInputToDto(u),isPinned:p.isSticky(a),isPreview:!p.isPinned(a),isActive:p.isActive(u),isDirty:u.isDirty()}}_editorInputToDto(p){if(p instanceof v.AbstractTextResourceEditorInput)return{kind:1,uri:p.resource};if(p instanceof C.NotebookEditorInput)return{kind:3,notebookType:p.viewType,uri:p.resource};if(p instanceof o.CustomEditorInput)return{kind:5,viewType:p.viewType,uri:p.resource};if(p instanceof i.WebviewInput)return{kind:6,viewType:p.viewType};if(p instanceof S.TerminalEditorInput)return{kind:7};if(p instanceof k.DiffEditorInput){if(p.modified instanceof v.AbstractTextResourceEditorInput&&p.original instanceof v.AbstractTextResourceEditorInput)return{kind:2,modified:p.modified.resource,original:p.original.resource};if(p.modified instanceof C.NotebookEditorInput&&p.original instanceof C.NotebookEditorInput)return{kind:4,notebookType:p.original.viewType,modified:p.modified.resource,original:p.original.resource}}return{kind:0}}_generateTabId(p,u){let a;const n=A.EditorResourceAccessor.getOriginalUri(p,{supportSideBySide:A.SideBySideEditor.BOTH});return n instanceof c.URI?a=n.toString():a=`${n?.primary?.toString()}-${n?.secondary?.toString()}`,`${u}~${p.editorId}-${p.typeId}-${a} `}_onDidGroupActivate(){const p=this._editorGroupsService.activeGroup.id,u=this._groupLookup.get(p);u&&(u.isActive=!0,this._proxy.$acceptTabGroupUpdate(u))}_onDidTabLabelChange(p,u){const a=this._generateTabId(u,p),n=this._tabInfoLookup.get(a);n?(n.tab.label=u.getName(),this._proxy.$acceptTabUpdate(p,n.tab)):(console.error("Invalid model for label change, rebuilding"),this._createTabsModel())}_onDidTabOpen(p,u,a){const n=this._editorGroupsService.getGroup(p),h=this._groupLookup.get(p)!==void 0;if(!n||!h){this._createTabsModel();return}const g=this._groupLookup.get(p)?.tabs;if(g){const d=this._buildTabObject(n,u,a);g.splice(a,0,d),this._tabInfoLookup.set(this._generateTabId(u,p),{group:n,editorInput:u,tab:d})}this._proxy.$acceptEditorTabModel(this._tabGroupModel)}_onDidTabClose(p,u){const a=this._editorGroupsService.getGroup(p),n=this._groupLookup.get(p)?.tabs;if(!a||!n){this._createTabsModel();return}const h=n.splice(u,1);this._tabInfoLookup.delete(h[0]?.id??""),this._proxy.$acceptEditorTabModel(this._tabGroupModel)}_onDidTabActiveChange(p,u){const a=this._groupLookup.get(p)?.tabs;if(!a)return;const n=a[u];n.isActive=!0,this._proxy.$acceptTabUpdate(p,n)}_onDidTabDirty(p,u,a){const n=this._groupLookup.get(p)?.tabs[u];if(!n){console.error("Invalid model for dirty change, rebuilding"),this._createTabsModel();return}n.isDirty=a.isDirty(),this._proxy.$acceptTabUpdate(p,n)}_onDidTabPinChange(p,u,a){const n=this._generateTabId(a,p),h=this._tabInfoLookup.get(n),g=h?.group,d=h?.tab;if(!g||!d){console.error("Invalid model for sticky change, rebuilding"),this._createTabsModel();return}d.isPinned=g.isSticky(u),this._proxy.$acceptTabUpdate(p,d)}_onDidTabPreviewChange(p,u,a){const n=this._generateTabId(a,p),h=this._tabInfoLookup.get(n),g=h?.group,d=h?.tab;if(!g||!d){console.error("Invalid model for sticky change, rebuilding"),this._createTabsModel();return}d.isPreview=!g.isPinned(u),this._proxy.$acceptTabUpdate(p,d)}_createTabsModel(){this._tabGroupModel=[],this._groupLookup.clear(),this._tabInfoLookup.clear();let p=[];for(const u of this._editorGroupsService.groups){const a={groupId:u.id,isActive:u.id===this._editorGroupsService.activeGroup.id,viewColumn:(0,D.editorGroupToColumn)(this._editorGroupsService,u),tabs:[]};u.editors.forEach((n,h)=>{const g=this._buildTabObject(u,n,h);p.push(g),this._tabInfoLookup.set(this._generateTabId(n,u.id),{group:u,tab:g,editorInput:n})}),a.tabs=p,this._tabGroupModel.push(a),this._groupLookup.set(u.id,a),p=[]}this._proxy.$acceptEditorTabModel(this._tabGroupModel)}_updateTabsModel(p){switch(p.kind){case 0:if(p.groupId===this._editorGroupsService.activeGroup.id){this._onDidGroupActivate();break}else return;case 7:if(p.editor!==void 0){this._onDidTabLabelChange(p.groupId,p.editor);break}case 3:if(p.editor!==void 0&&p.editorIndex!==void 0){this._onDidTabOpen(p.groupId,p.editor,p.editorIndex);break}case 4:if(p.editorIndex!==void 0){this._onDidTabClose(p.groupId,p.editorIndex);break}case 6:if(p.editorIndex!==void 0){this._onDidTabActiveChange(p.groupId,p.editorIndex);break}case 11:if(p.editorIndex!==void 0&&p.editor!==void 0){this._onDidTabDirty(p.groupId,p.editorIndex,p.editor);break}case 10:if(p.editorIndex!==void 0&&p.editor!==void 0){this._onDidTabPinChange(p.groupId,p.editorIndex,p.editor);break}case 9:if(p.editorIndex!==void 0&&p.editor!==void 0){this._onDidTabPreviewChange(p.groupId,p.editorIndex,p.editor);break}default:this._createTabsModel()}}$moveTab(p,u,a,n){const h=(0,D.columnToEditorGroup)(this._editorGroupsService,a),g=this._tabInfoLookup.get(p);if(!g?.tab)throw new Error(`Attempted to close tab with id ${p} which does not exist`);let m;const b=this._editorGroupsService.getGroup(g.group.id);if(!b)return;if(this._groupLookup.get(h)===void 0){let y=3;a===w.SIDE_GROUP&&(y=(0,I.preferredSideBySideGroupDirection)(this._configurationService)),m=this._editorGroupsService.addGroup(this._editorGroupsService.groups[this._editorGroupsService.groups.length-1],y,void 0)}else m=this._editorGroupsService.getGroup(h);if(!m)return;(u<0||u>m.editors.length)&&(u=m.editors.length);const E=g?.editorInput;!E||b.moveEditor(E,m,{index:u,preserveFocus:n})}async $closeTab(p,u){const a=new Map;for(const n of p){const h=this._tabInfoLookup.get(n),g=h?.tab,d=h?.group,m=h?.editorInput;if(!d||!g||!h||!m)continue;const b=a.get(d);b?b.push(m):a.set(d,[m])}for(const[n,h]of a)await n.closeEditors(h,{preserveFocus:u})}};l=Ee([(0,_.extHostNamedCustomer)(f.MainContext.MainThreadEditorTabs),W(1,I.IEditorGroupsService),W(2,s.IConfigurationService),W(3,w.IEditorService)],l),e.MainThreadEditorTabs=l}),define(ne[2709],re([1,0,2,18,19,9,5,437,364,232,202,885,333,159,160,240]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComplexCustomWorkingCopyEditorHandler=e.CustomEditorInputSerializer=void 0;let s=class extends C.WebviewEditorInputSerializer{constructor(u,a,n,h){super(u);this._instantiationService=a,this._webviewService=n,this._editorResolverService=h}serialize(u){const a=u.isDirty(),n={...this.toJson(u),editorResource:u.resource.toJSON(),dirty:a,backupId:a?u.backupId:void 0};try{return JSON.stringify(n)}catch{return}}fromJson(u){return{...super.fromJson(u),editorResource:A.URI.from(u.editorResource),dirty:u.dirty}}deserialize(u,a){const n=this.fromJson(JSON.parse(a));if(n.viewType==="jupyter.notebook.ipynb"&&!this._editorResolverService.getAssociationsForResource(n.editorResource).find(m=>m.viewType==="jupyter.notebook.ipynb"))return w.NotebookEditorInput.create(this._instantiationService,n.editorResource,"jupyter-notebook",{_backupId:n.backupId,startDirty:n.dirty});const h=l(this._webviewService,n),g=this._instantiationService.createInstance(D.CustomEditorInput,n.editorResource,n.viewType,n.id,h,{startsDirty:n.dirty,backupId:n.backupId});return typeof n.group=="number"&&g.updateGroup(n.group),g}};s.ID=D.CustomEditorInput.typeId,s=Ee([W(0,o.IWebviewWorkbenchService),W(1,k.IInstantiationService),W(2,v.IWebviewService),W(3,c.IEditorResolverService)],s),e.CustomEditorInputSerializer=s;function l(p,u){const a=p.createWebviewOverlay(u.id,{purpose:"customEditor",enableFindWidget:u.webviewOptions.enableFindWidget,retainContextWhenHidden:u.webviewOptions.retainContextWhenHidden},u.contentOptions,u.extension);return a.state=u.state,a}let r=class extends t.Disposable{constructor(u,a,n,h,g,d){super();this._instantiationService=u,this._workingCopyEditorService=a,this._workingCopyBackupService=n,this._editorResolverService=h,this._webviewService=g,this._installHandler()}_installHandler(){this._register(this._workingCopyEditorService.registerHandler({handles:u=>u.resource.scheme===f.Schemas.vscodeCustomEditor,isOpen:(u,a)=>{if(u.resource.authority==="jupyter-notebook-ipynb"&&a instanceof w.NotebookEditorInput)try{const n=JSON.parse(u.resource.query),h=A.URI.from(n);return(0,_.isEqual)(h,a.resource)}catch{return!1}if(!(a instanceof D.CustomEditorInput)||u.resource.authority!==a.viewType.replace(/[^a-z0-9\-_]/gi,"-").toLowerCase())return!1;try{const n=JSON.parse(u.resource.query),h=A.URI.from(n);return(0,_.isEqual)(h,a.resource)}catch{return!1}},createEditor:async u=>{const a=await this._workingCopyBackupService.resolve(u);if(!a?.meta)throw new Error(`No backup found for custom editor: ${u.resource}`);const n=a.meta;if(n.viewType==="jupyter.notebook.ipynb"&&!this._editorResolverService.getAssociationsForResource(A.URI.revive(n.editorResource)).find(E=>E.viewType==="jupyter.notebook.ipynb"))return w.NotebookEditorInput.create(this._instantiationService,A.URI.revive(n.editorResource),"jupyter-notebook",{startDirty:!!n.backupId,_backupId:n.backupId,_workingCopy:u});const h=n.webview.id,g=(0,C.reviveWebviewExtensionDescription)(n.extension?.id,n.extension?.location),d=l(this._webviewService,{id:h,webviewOptions:(0,C.restoreWebviewOptions)(n.webview.options),contentOptions:(0,C.restoreWebviewContentOptions)(n.webview.options),state:n.webview.state,extension:g}),m=this._instantiationService.createInstance(D.CustomEditorInput,A.URI.revive(n.editorResource),n.viewType,h,d,{backupId:n.backupId});return m.updateGroup(0),m}}))}};r=Ee([W(0,k.IInstantiationService),W(1,S.IWorkingCopyEditorService),W(2,i.IWorkingCopyBackupService),W(3,c.IEditorResolverService),W(4,v.IWebviewService),W(5,I.ICustomEditorService)],r),e.ComplexCustomWorkingCopyEditorHandler=r}),define(ne[2710],re([1,0,15,6,2,18,19,13,9,39,7,23,5,17,24,32,12,56,44,203,364,2134,59,159,21,2397,437]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomEditorService=void 0;let b=class extends _.Disposable{constructor(y,T,R,O,x,F,L,M){super();this.editorService=O,this.editorGroupService=x,this.instantiationService=F,this.uriIdentityService=L,this.editorResolverService=M,this._untitledCounter=0,this._editorResolverDisposables=this._register(new _.DisposableStore),this._editorCapabilities=new Map,this._models=new a.CustomEditorModelManager,this._onDidChangeEditorTypes=this._register(new f.Emitter),this.onDidChangeEditorTypes=this._onDidChangeEditorTypes.event,this._fileEditorFactory=c.Registry.as(r.EditorExtensions.EditorFactory).getFileEditorFactory(),this._activeCustomEditorId=u.CONTEXT_ACTIVE_CUSTOM_EDITOR_ID.bindTo(y),this._focusedCustomEditorIsEditable=u.CONTEXT_FOCUSED_CUSTOM_EDITOR_IS_EDITABLE.bindTo(y),this._contributedEditors=this._register(new d.ContributedCustomEditors(R)),this.registerContributionPoints(),this._register(this._contributedEditors.onChange(()=>{this.registerContributionPoints(),this.updateContexts(),this._onDidChangeEditorTypes.fire()})),this._register(this.editorService.onDidActiveEditorChange(()=>this.updateContexts())),this._register(T.onDidRunOperation(B=>{B.isOperation(2)&&this.handleMovedFileInOpenedFileEditors(B.resource,this.uriIdentityService.asCanonicalUri(B.target.resource))}));const N=105;this._register(w.UndoCommand.addImplementation(N,"custom-editor",()=>this.withActiveCustomEditor(B=>B.undo()))),this._register(w.RedoCommand.addImplementation(N,"custom-editor",()=>this.withActiveCustomEditor(B=>B.redo()))),this.updateContexts()}getEditorTypes(){return[...this._contributedEditors]}withActiveCustomEditor(y){const T=this.editorService.activeEditor;if(T instanceof m.CustomEditorInput){const R=y(T);return R||!0}return!1}registerContributionPoints(){this._editorResolverDisposables.clear();for(const y of this._contributedEditors)for(const T of y.selector)!T.filenamePattern||this._editorResolverDisposables.add(this.editorResolverService.registerEditor(T.filenamePattern,{id:y.id,label:y.displayName,detail:y.providerDisplayName,priority:y.priority},{singlePerResource:()=>!this.getCustomEditorCapabilities(y.id)?.supportsMultipleEditorsPerDocument},({resource:R},O)=>({editor:m.CustomEditorInput.create(this.instantiationService,R,y.id,O.id)}),({resource:R},O)=>({editor:m.CustomEditorInput.create(this.instantiationService,R??I.URI.from({scheme:A.Schemas.untitled,authority:`Untitled-${this._untitledCounter++}`}),y.id,O.id)}),(R,O)=>({editor:this.createDiffEditorInput(R,y.id,O)})))}createDiffEditorInput(y,T,R){const O=m.CustomEditorInput.create(this.instantiationService,(0,D.assertIsDefined)(y.modified.resource),T,R.id,{customClasses:"modified"}),x=m.CustomEditorInput.create(this.instantiationService,(0,D.assertIsDefined)(y.original.resource),T,R.id,{customClasses:"original"});return this.instantiationService.createInstance(p.DiffEditorInput,y.label,y.description,x,O,!0)}get models(){return this._models}getCustomEditor(y){return this._contributedEditors.get(y)}getContributedCustomEditors(y){return new u.CustomEditorInfoCollection(this._contributedEditors.getContributedEditors(y))}getUserConfiguredCustomEditors(y){const T=this.editorResolverService.getAssociationsForResource(y);return new u.CustomEditorInfoCollection((0,t.coalesce)(T.map(R=>this._contributedEditors.get(R.viewType))))}getAllCustomEditors(y){return new u.CustomEditorInfoCollection([...this.getUserConfiguredCustomEditors(y).allEditors,...this.getContributedCustomEditors(y).allEditors])}registerCustomEditorCapabilities(y,T){if(this._editorCapabilities.has(y))throw new Error(`Capabilities for ${y} already set`);return this._editorCapabilities.set(y,T),(0,_.toDisposable)(()=>{this._editorCapabilities.delete(y)})}getCustomEditorCapabilities(y){return this._editorCapabilities.get(y)}updateContexts(){const y=this.editorService.activeEditorPane;if(!y?.input?.resource){this._activeCustomEditorId.reset(),this._focusedCustomEditorIsEditable.reset();return}this._activeCustomEditorId.set(y?.input instanceof m.CustomEditorInput?y.input.viewType:""),this._focusedCustomEditorIsEditable.set(y?.input instanceof m.CustomEditorInput)}async handleMovedFileInOpenedFileEditors(y,T){if((0,k.extname)(y).toLowerCase()===(0,k.extname)(T).toLowerCase())return;const R=this.getAllCustomEditors(T);if(!R.allEditors.some(x=>x.priority!==h.RegisteredEditorPriority.option))return;const O=new Map;for(const x of this.editorGroupService.groups)for(const F of x.editors)if(this._fileEditorFactory.isFileEditor(F)&&!(F instanceof m.CustomEditorInput)&&(0,k.isEqual)(F.resource,T)){let L=O.get(x.id);L||(L=[],O.set(x.id,L)),L.push(F)}if(!!O.size)for(const[x,F]of O)this.editorService.replaceEditors(F.map(L=>{let M;if(R.defaultEditor){const N=R.defaultEditor.id;M=m.CustomEditorInput.create(this.instantiationService,T,N,x)}else M={resource:T,options:{override:r.DEFAULT_EDITOR_ASSOCIATION.id}};return{editor:L,replacement:M,options:{preserveFocus:!0}}}),x)}};b=Ee([W(0,v.IContextKeyService),W(1,C.IFileService),W(2,i.IStorageService),W(3,g.IEditorService),W(4,n.IEditorGroupsService),W(5,o.IInstantiationService),W(6,l.IUriIdentityService),W(7,h.IEditorResolverService)],b),e.CustomEditorService=b,(0,s.registerThemingParticipant)((E,y)=>{const T=E.getColor(S.scrollbarShadow);T&&y.addRule(`.webview.modified { box-shadow: -6px 0 5px -5px ${T}; }`)})}),define(ne[2711],re([1,0,99,35,17,149,47,44,2709,364,613,437,2710]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,f.registerSingleton)(w.ICustomEditorService,o.CustomEditorService),_.Registry.as(D.EditorExtensions.EditorPane).registerEditorPane(A.EditorPaneDescriptor.create(v.WebviewEditor,v.WebviewEditor.ID,"Webview Editor"),[new t.SyncDescriptor(C.CustomEditorInput)]),_.Registry.as(D.EditorExtensions.EditorFactory).registerEditorSerializer(I.CustomEditorInputSerializer.ID,I.CustomEditorInputSerializer),_.Registry.as(k.Extensions.Workbench).registerWorkbenchContribution(I.ComplexCustomWorkingCopyEditorHandler,1)}),define(ne[2712],re([1,0,1663,265,6,64,142,9,135,336,30,160,18,23,26,45,31,11,60,13,374,2,22,232,5,51]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookFileWorkingCopyModelFactory=e.NotebookFileWorkingCopyModel=e.SimpleNotebookEditorModel=e.ComplexNotebookEditorModel=void 0;let m=class extends f.EditorModel{constructor(R,O,x,F,L,M,N,B,P,V,z,U){super();this.resource=R,this.viewType=O,this._contentProvider=x,this._instantiationService=F,this._notebookService=L,this._workingCopyService=M,this._workingCopyBackupService=N,this._fileService=B,this._notificationService=P,this._logService=V,this.untitledTextEditorService=z,this._onDidSave=this._register(new _.Emitter),this._onDidChangeDirty=this._register(new _.Emitter),this._onDidChangeContent=this._register(new _.Emitter),this.onDidSave=this._onDidSave.event,this.onDidChangeDirty=this._onDidChangeDirty.event,this.onDidChangeOrphaned=_.Event.None,this.onDidChangeReadonly=_.Event.None,this._saveSequentializer=new l.TaskSequentializer,this._dirty=!1,this._name=U.getUriBasenameLabel(R);const H=this;this._workingCopyIdentifier={typeId:w.NO_TYPE_ID,resource:D.URI.from({scheme:o.Schemas.vscodeNotebook,path:R.toString()})};const K=new class{constructor(){this.typeId=H._workingCopyIdentifier.typeId,this.resource=H._workingCopyIdentifier.resource,this.capabilities=H._isUntitled()?2:0,this.onDidChangeDirty=H.onDidChangeDirty,this.onDidChangeContent=H._onDidChangeContent.event,this.onDidSave=H.onDidSave}get name(){return H._name}isDirty(){return H.isDirty()}backup(G){return H.backup(G)}save(){return H.save()}revert(G){return H.revert(G)}};this._register(this._workingCopyService.registerWorkingCopy(K)),this._register(this._fileService.onDidFilesChange(async G=>{if(this.isDirty()||!this.isResolved()||this._saveSequentializer.hasPending()||!G.affects(this.resource,0))return;const q=await this._resolveStats(this.resource);q&&this._lastResolvedFileStat&&q.etag!==this._lastResolvedFileStat.etag&&(this._logService.debug("[notebook editor model] trigger load after file event"),this.load({forceReadFromFile:!0}))}))}isResolved(){return this.notebook!==void 0}isDirty(){return this._dirty}isReadonly(){return!!this._fileService.hasCapability(this.resource,2048)}isOrphaned(){return!1}hasAssociatedFilePath(){return!1}_isUntitled(){return this.resource.scheme===o.Schemas.untitled}get notebook(){const R=this._notebookService.getNotebookTextModel(this.resource);return R&&R.viewType===this.viewType?R:void 0}setDirty(R){this._dirty!==R&&(this._dirty=R,this._onDidChangeDirty.fire())}async backup(R){if(!this.isResolved())return{};const O=await this._contentProvider.backup(this.resource,R);if(R.isCancellationRequested)return{};const x=await this._resolveStats(this.resource);return O instanceof r.VSBuffer?{content:(0,r.bufferToReadable)(O)}:{meta:{mtime:x?.mtime??Date.now(),viewType:this.notebook.viewType,backupId:O}}}async revert(R){if(R?.soft){this.setDirty(!1);return}await this.load({forceReadFromFile:!0});const O=await this._resolveStats(this.resource);this._lastResolvedFileStat=O,this.setDirty(!1),this._onDidChangeDirty.fire()}async load(R){if(R?.forceReadFromFile)return this._logService.debug("[notebook editor model] load from provider (forceRead)",this.resource.toString()),this._loadFromProvider(void 0),(0,p.assertType)(this.isResolved()),this;if(this.isResolved())return this;let O;try{O=await this._workingCopyBackupService.resolve(this._workingCopyIdentifier)}catch{}return this.isResolved()?this:(this._logService.debug("[notebook editor model] load from provider",this.resource.toString()),await this._loadFromProvider(O),(0,p.assertType)(this.isResolved()),this)}async getUntitledDocumentData(R){const O=this.untitledTextEditorService.getValue(R);return O?r.VSBuffer.fromString(O):void 0}async _loadFromProvider(R){const O=await this.getUntitledDocumentData(this.resource);O&&this._onDidChangeDirty.fire();const x=await this._contentProvider.open(this.resource,R?.meta?.backupId??(R?.value?await(0,r.streamToBuffer)(R?.value):void 0),O,v.CancellationToken.None);if(this._lastResolvedFileStat=await this._resolveStats(this.resource),!this.isDisposed()){if(this.notebook)this._logService.debug("[notebook editor model] loading onto EXISTING notebook",this.resource.toString()),this.notebook.reset(x.data.cells,x.data.metadata,x.transientOptions);else{this._logService.debug("[notebook editor model] loading NEW notebook",this.resource.toString());const F=this._notebookService.getNotebookTextModel(this.resource);F&&(this._logService.warn("DISPOSING conflicting notebook with same URI but different view type",this.resource.toString(),this.viewType),F.dispose());const L=this._notebookService.createNotebookTextModel(this.viewType,this.resource,x.data,x.transientOptions);this._register(L),this._register(L.onDidChangeContent(M=>{let N=!1;for(let B=0;B<M.rawEvents.length;B++)M.rawEvents[B].kind!==A.NotebookCellsChangeType.Initialize&&(this._onDidChangeContent.fire(),N=N||!M.rawEvents[B].transient);N&&this.setDirty(!0)}))}R?this.setDirty(!0):this.setDirty(!1)}}async _assertStat(){this._logService.debug("[notebook editor model] start assert stat");const R=await this._resolveStats(this.resource);return this._lastResolvedFileStat&&R&&R.mtime>this._lastResolvedFileStat.mtime?(this._logService.debug(`[notebook editor model] noteboook file on disk is newer: LastResolvedStat: ${this._lastResolvedFileStat?JSON.stringify(this._lastResolvedFileStat):void 0}. Current stat: ${JSON.stringify(R)}`),this._lastResolvedFileStat=R,new Promise(O=>{const x=this._notificationService.prompt(i.Severity.Info,t.localize(0,null),[{label:t.localize(1,null),run:()=>{O("revert")}},{label:t.localize(2,null),run:()=>{O("overwrite")}}],{sticky:!0});_.Event.once(x.onDidClose)(()=>{O("none")})})):(!this._lastResolvedFileStat&&R&&(this._lastResolvedFileStat=R),"overwrite")}async save(){if(!this.isResolved())return!1;const R=this.notebook.versionId;return this._logService.debug(`[notebook editor model] save(${R}) - enter with versionId ${R}`,this.resource.toString(!0)),this._saveSequentializer.hasPending(R)?(this._logService.debug(`[notebook editor model] save(${R}) - exit - found a pending save for versionId ${R}`,this.resource.toString(!0)),this._saveSequentializer.pending.then(()=>!0)):this._saveSequentializer.hasPending()?this._saveSequentializer.setNext(async()=>{await this.save()}).then(()=>!0):this._saveSequentializer.setPending(R,(async()=>{const O=await this._assertStat();if(O==="none")return;if(O==="revert"){await this.revert();return}if(!this.isResolved())return;const x=await this._contentProvider.save(this.notebook.uri,v.CancellationToken.None);this._logService.debug(`[notebook editor model] save(${R}) - document saved saved, start updating file stats`,this.resource.toString(!0),x),this._lastResolvedFileStat=await this._resolveStats(this.resource),x&&(this.setDirty(!1),this._onDidSave.fire({}))})()).then(()=>!0)}async saveAs(R){if(!this.isResolved())return;this._logService.debug("[notebook editor model] saveAs - enter",this.resource.toString(!0));const O=await this._assertStat();if(O==="none")return;if(O==="revert"){await this.revert();return}const x=await this._contentProvider.saveAs(this.notebook.uri,R,v.CancellationToken.None);if(this._logService.debug("[notebook editor model] saveAs - document saved, start updating file stats",this.resource.toString(!0),x),this._lastResolvedFileStat=await this._resolveStats(this.resource),!!x)return this.setDirty(!1),this._onDidSave.fire({}),this._instantiationService.createInstance(h.NotebookEditorInput,R,this.viewType,{})}async _resolveStats(R){if(R.scheme!==o.Schemas.untitled)try{this._logService.debug("[notebook editor model] _resolveStats",this.resource.toString(!0));const O=await this._fileService.stat(this.resource);return this._logService.debug(`[notebook editor model] _resolveStats - latest file stats: ${JSON.stringify(O)}`,this.resource.toString(!0)),O}catch{return}}};m=Ee([W(3,g.IInstantiationService),W(4,k.INotebookService),W(5,I.IWorkingCopyService),W(6,C.IWorkingCopyBackupService),W(7,c.IFileService),W(8,i.INotificationService),W(9,s.ILogService),W(10,u.IUntitledTextEditorService),W(11,S.ILabelService)],m),e.ComplexNotebookEditorModel=m;let b=class tr extends f.EditorModel{constructor(R,O,x,F,L,M){super();this.resource=R,this._hasAssociatedFilePath=O,this.viewType=x,this._workingCopyManager=F,this._instantiationService=L,this._fileService=M,this._onDidChangeDirty=this._register(new _.Emitter),this._onDidSave=this._register(new _.Emitter),this._onDidChangeOrphaned=this._register(new _.Emitter),this._onDidChangeReadonly=this._register(new _.Emitter),this.onDidChangeDirty=this._onDidChangeDirty.event,this.onDidSave=this._onDidSave.event,this.onDidChangeOrphaned=this._onDidChangeOrphaned.event,this.onDidChangeReadonly=this._onDidChangeReadonly.event,this._workingCopyListeners=this._register(new a.DisposableStore)}dispose(){this._workingCopy?.dispose(),super.dispose()}get notebook(){return this._workingCopy?.model?.notebookModel}isResolved(){return Boolean(this._workingCopy)}isDirty(){return this._workingCopy?.isDirty()??!1}isOrphaned(){return tr._isStoredFileWorkingCopy(this._workingCopy)&&this._workingCopy.hasState(4)}hasAssociatedFilePath(){return!tr._isStoredFileWorkingCopy(this._workingCopy)&&!!this._workingCopy?.hasAssociatedFilePath}isReadonly(){return tr._isStoredFileWorkingCopy(this._workingCopy)?this._workingCopy.isReadonly():!!this._fileService.hasCapability(this.resource,2048)}revert(R){return(0,p.assertType)(this.isResolved()),this._workingCopy.revert(R)}save(R){return(0,p.assertType)(this.isResolved()),this._workingCopy.save(R)}async load(R){return this._workingCopy?await this._workingCopyManager.resolve(this.resource,{reload:{async:!R?.forceReadFromFile,force:R?.forceReadFromFile}}):(this.resource.scheme===o.Schemas.untitled?this._hasAssociatedFilePath?this._workingCopy=await this._workingCopyManager.resolve({associatedResource:this.resource}):this._workingCopy=await this._workingCopyManager.resolve({untitledResource:this.resource}):(this._workingCopy=await this._workingCopyManager.resolve(this.resource,R?.forceReadFromFile?{reload:{async:!1,force:!0}}:void 0),this._workingCopyListeners.add(this._workingCopy.onDidSave(O=>this._onDidSave.fire(O))),this._workingCopyListeners.add(this._workingCopy.onDidChangeOrphaned(()=>this._onDidChangeOrphaned.fire())),this._workingCopyListeners.add(this._workingCopy.onDidChangeReadonly(()=>this._onDidChangeReadonly.fire()))),this._workingCopy.onDidChangeDirty(()=>this._onDidChangeDirty.fire(),void 0,this._workingCopyListeners),this._workingCopyListeners.add(this._workingCopy.onWillDispose(()=>{this._workingCopyListeners.clear(),this._workingCopy?.model?.dispose()}))),(0,p.assertType)(this.isResolved()),this}async saveAs(R){const O=await this._workingCopyManager.saveAs(this.resource,R);if(!!O)return this._instantiationService.createInstance(h.NotebookEditorInput,O.resource,this.viewType,{})}static _isStoredFileWorkingCopy(R){return!(R&&R.capabilities&2)}};b=Ee([W(4,g.IInstantiationService),W(5,c.IFileService)],b),e.SimpleNotebookEditorModel=b;class E extends a.Disposable{constructor(R,O){super();this._notebookModel=R,this._notebookSerializer=O,this._onDidChangeContent=this._register(new _.Emitter),this.onDidChangeContent=this._onDidChangeContent.event,this.onWillDispose=R.onWillDispose.bind(R),this._register(R.onDidChangeContent(x=>{for(const F of x.rawEvents)if(F.kind!==A.NotebookCellsChangeType.Initialize&&!F.transient){this._onDidChangeContent.fire({isRedoing:!1,isUndoing:!1,isInitial:!1});break}}))}dispose(){this._notebookModel.dispose(),super.dispose()}get notebookModel(){return this._notebookModel}async snapshot(R){const O={metadata:(0,d.filter)(this._notebookModel.metadata,F=>!this._notebookSerializer.options.transientDocumentMetadata[F]),cells:[]};for(const F of this._notebookModel.cells){const L={cellKind:F.cellKind,language:F.language,mime:F.mime,source:F.getValue(),outputs:[],internalMetadata:F.internalMetadata};L.outputs=this._notebookSerializer.options.transientOutputs?[]:F.outputs,L.metadata=(0,d.filter)(F.metadata,M=>!this._notebookSerializer.options.transientCellMetadata[M]),O.cells.push(L)}const x=await this._notebookSerializer.notebookToData(O);if(R.isCancellationRequested)throw(0,n.canceled)();return(0,r.bufferToStream)(x)}async update(R,O){const x=await(0,r.streamToBuffer)(R),F=await this._notebookSerializer.dataToNotebook(x);if(O.isCancellationRequested)throw(0,n.canceled)();this._notebookModel.reset(F.cells,F.metadata,this._notebookSerializer.options)}get versionId(){return this._notebookModel.alternativeVersionId}pushStackElement(){this._notebookModel.pushStackElement("save",void 0,void 0)}}e.NotebookFileWorkingCopyModel=E;let y=class{constructor(R,O){this._viewType=R,this._notebookService=O}async createModel(R,O,x){const F=await this._notebookService.withNotebookDataProvider(R,this._viewType);if(!(F instanceof k.SimpleNotebookProviderInfo))throw new Error("CANNOT open file notebook with this provider");const L=await(0,r.streamToBuffer)(O),M=await F.serializer.dataToNotebook(L);if(x.isCancellationRequested)throw(0,n.canceled)();const N=this._notebookService.createNotebookTextModel(F.viewType,R,M,F.serializer.options);return new E(N,F.serializer)}};y=Ee([W(1,k.INotebookService)],y),e.NotebookFileWorkingCopyModelFactory=y}),define(ne[375],re([1,0,6,17,55,5,44,374,18,203,167,256,372,19,9,56,23,159,2,35]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextEditorService=e.ITextEditorService=void 0,e.ITextEditorService=(0,A.createDecorator)("textEditorService");let u=class extends r.Disposable{constructor(n,h,g,d,m){super();this.untitledTextEditorService=n,this.instantiationService=h,this.uriIdentityService=g,this.fileService=d,this.editorResolverService=m,this.editorInputCache=new _.ResourceMap,this.fileEditorFactory=f.Registry.as(k.EditorExtensions.EditorFactory).getFileEditorFactory(),this.registerDefaultEditor()}registerDefaultEditor(){this._register(this.editorResolverService.registerEditor("*",{id:k.DEFAULT_EDITOR_ASSOCIATION.id,label:k.DEFAULT_EDITOR_ASSOCIATION.displayName,detail:k.DEFAULT_EDITOR_ASSOCIATION.providerDisplayName,priority:l.RegisteredEditorPriority.builtin},{},n=>({editor:this.createTextEditor(n)}),n=>({editor:this.createTextEditor(n)}),n=>({editor:this.createTextEditor(n)})))}createTextEditor(n){if((0,k.isResourceDiffEditorInput)(n)){const d=this.createTextEditor({...n.original}),m=this.createTextEditor({...n.modified});return this.instantiationService.createInstance(w.DiffEditorInput,n.label,n.description,d,m,void 0)}if((0,k.isResourceSideBySideEditorInput)(n)){const d=this.createTextEditor({...n.primary}),m=this.createTextEditor({...n.secondary});return this.instantiationService.createInstance(v.SideBySideEditorInput,n.label,n.description,m,d)}const h=n;if(h.forceUntitled||!h.resource||h.resource.scheme===I.Schemas.untitled){const d={languageId:h.languageId,initialValue:h.contents,encoding:h.encoding};let m;return h.resource?.scheme===I.Schemas.untitled?m=this.untitledTextEditorService.create({untitledResource:h.resource,...d}):m=this.untitledTextEditorService.create({associatedResource:h.resource,...d}),this.createOrGetCached(m.resource,()=>{const b=this.instantiationService.createInstance(o.UntitledTextEditorInput,m);return t.Event.once(b.onWillDispose)(()=>m.dispose()),b})}const g=n;if(g.resource instanceof i.URI){const d=g.label||(0,c.basename)(g.resource),m=g.resource,b=this.uriIdentityService.asCanonicalUri(m);return this.createOrGetCached(b,()=>g.forceFile||this.fileService.hasProvider(b)?this.fileEditorFactory.createFileEditor(b,m,g.label,g.description,g.encoding,g.languageId,g.contents,this.instantiationService):this.instantiationService.createInstance(C.TextResourceEditorInput,b,g.label,g.description,g.languageId,g.contents),E=>{E instanceof o.UntitledTextEditorInput||(E instanceof C.TextResourceEditorInput?(d&&E.setName(d),g.description&&E.setDescription(g.description),g.languageId&&E.setPreferredLanguageId(g.languageId),typeof g.contents=="string"&&E.setPreferredContents(g.contents)):(E.setPreferredResource(m),g.label&&E.setPreferredName(g.label),g.description&&E.setPreferredDescription(g.description),g.encoding&&E.setPreferredEncoding(g.encoding),g.languageId&&E.setPreferredLanguageId(g.languageId),typeof g.contents=="string"&&E.setPreferredContents(g.contents)))})}throw new Error(`ITextEditorService: Unable to create texteditor from ${JSON.stringify(n)}`)}createOrGetCached(n,h,g){let d=this.editorInputCache.get(n);return d?(g&&g(d),d):(d=h(),this.editorInputCache.set(n,d),t.Event.once(d.onWillDispose)(()=>this.editorInputCache.delete(n)),d)}};u=Ee([W(0,D.IUntitledTextEditorService),W(1,A.IInstantiationService),W(2,S.IUriIdentityService),W(3,s.IFileService),W(4,l.IEditorResolverService)],u),e.TextEditorService=u,(0,p.registerSingleton)(e.ITextEditorService,u,!1)}),define(ne[2713],re([1,0,2,9,375,19,336,240,23]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileEditorWorkingCopyEditorHandler=e.FileEditorInputSerializer=void 0;class w{canSerialize(o){return!0}serialize(o){const c=o,i=c.resource,S=c.preferredResource,s={resourceJSON:i.toJSON(),preferredResourceJSON:(0,A.isEqual)(i,S)?void 0:S,name:c.getPreferredName(),description:c.getPreferredDescription(),encoding:c.getEncoding(),modeId:c.getPreferredLanguageId()};return JSON.stringify(s)}deserialize(o,c){return o.invokeFunction(i=>{const S=JSON.parse(c),s=f.URI.revive(S.resourceJSON),l=f.URI.revive(S.preferredResourceJSON),r=S.name,p=S.description,u=S.encoding,a=S.modeId,n=i.get(_.ITextEditorService).createTextEditor({resource:s,label:r,description:p,encoding:u,languageId:a,forceFile:!0});return l&&n.setPreferredResource(l),n})}}e.FileEditorInputSerializer=w;let v=class extends t.Disposable{constructor(o,c,i){super();this.workingCopyEditorService=o,this.textEditorService=c,this.fileService=i,this.installHandler()}installHandler(){this._register(this.workingCopyEditorService.registerHandler({handles:o=>o.typeId===k.NO_TYPE_ID&&this.fileService.hasProvider(o.resource),isOpen:(o,c)=>(0,A.isEqual)(o.resource,c.resource),createEditor:o=>this.textEditorService.createTextEditor({resource:o.resource,forceFile:!0})}))}};v=Ee([W(0,D.IWorkingCopyEditorService),W(1,_.ITextEditorService),W(2,I.IFileService)],v),e.FileEditorWorkingCopyEditorHandler=v}),define(ne[2714],re([1,0,2,19,52,42,61,1686,8,57,85,146,17,34,248,167,159,375,108]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PreferencesContribution=void 0;const p=o.Registry.as(C.Extensions.JSONContribution);let u=class{constructor(h,g,d,m,b,E,y,T,R){this.modelService=h,this.textModelResolverService=g,this.preferencesService=d,this.languageService=m,this.environmentService=b,this.workspaceService=E,this.configurationService=y,this.editorResolverService=T,this.textEditorService=R,this.settingsListener=this.configurationService.onDidChangeConfiguration(O=>{(O.affectsConfiguration(r.USE_SPLIT_JSON_SETTING)||O.affectsConfiguration(r.DEFAULT_SETTINGS_EDITOR_SETTING))&&this.handleSettingsEditorRegistration()}),this.handleSettingsEditorRegistration(),this.start()}handleSettingsEditorRegistration(){(0,t.dispose)(this.editorOpeningListener),(!!this.configurationService.getValue(r.USE_SPLIT_JSON_SETTING)||!!this.configurationService.getValue(r.DEFAULT_SETTINGS_EDITOR_SETTING))&&(this.editorOpeningListener=this.editorResolverService.registerEditor("**/settings.json",{id:S.SideBySideEditorInput.ID,label:D.localize(0,null),priority:s.RegisteredEditorPriority.builtin},{canHandleDiff:!1},({resource:h,options:g})=>{if((0,f.isEqual)(h,this.environmentService.settingsResource))return{editor:this.preferencesService.createSplitJsonEditorInput(2,h),options:g};const d=this.workspaceService.getWorkbenchState();if(d===2){const m=this.workspaceService.getWorkspace().folders;if((0,f.isEqual)(h,m[0].toResource(r.FOLDER_SETTINGS_PATH)))return{editor:this.preferencesService.createSplitJsonEditorInput(4,h),options:g}}else if(d===3){const m=this.workspaceService.getWorkspace().folders;for(const b of m)if((0,f.isEqual)(h,b.toResource(r.FOLDER_SETTINGS_PATH)))return{editor:this.preferencesService.createSplitJsonEditorInput(5,h),options:g}}return{editor:this.textEditorService.createTextEditor({resource:h}),options:g}}))}start(){this.textModelResolverService.registerTextModelContentProvider("vscode",{provideTextContent:h=>{if(h.scheme!=="vscode")return null;if(h.authority==="schemas"){const g=this.getSchemaModel(h);if(g)return Promise.resolve(g)}return Promise.resolve(this.preferencesService.resolveModel(h))}})}getSchemaModel(h){let g=p.getSchemaContributions().schemas[h.toString()];if(g){const d=JSON.stringify(g),m=this.languageService.createById("jsonc"),b=this.modelService.createModel(d,m,h),E=new t.DisposableStore;return E.add(p.onDidChangeSchema(y=>{y===h.toString()&&(g=p.getSchemaContributions().schemas[h.toString()],b.setValue(JSON.stringify(g)))})),E.add(b.onWillDispose(()=>E.dispose())),b}return null}dispose(){(0,t.dispose)(this.editorOpeningListener),(0,t.dispose)(this.settingsListener)}};u=Ee([W(0,_.IModelService),W(1,k.ITextModelService),W(2,r.IPreferencesService),W(3,A.ILanguageService),W(4,v.IEnvironmentService),W(5,c.IWorkspaceContextService),W(6,I.IConfigurationService),W(7,s.IEditorResolverService),W(8,l.ITextEditorService)],u),e.PreferencesContribution=u,o.Registry.as(w.Extensions.Configuration).registerConfiguration({...i.workbenchConfigurationNodeBase,properties:{"workbench.settings.enableNaturalLanguageSearch":{type:"boolean",description:D.localize(1,null),default:!0,scope:3,tags:["usesOnlineServices"]},"workbench.settings.settingsSearchTocBehavior":{type:"string",enum:["hide","filter"],enumDescriptions:[D.localize(2,null),D.localize(3,null)],description:D.localize(4,null),default:"filter",scope:3}}})}),define(ne[2715],re([1,0,5,132,44,174,167,55,23,6,9,19,203,59,21,8,2,15,106,35,13,2265,11,34,157,56,159,135,114,69,608,375]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorService=void 0;let O=class extends s.Disposable{constructor(F,L,M,N,B,P,V,z,U,H,K){super();this.editorGroupService=F,this.instantiationService=L,this.fileService=M,this.configurationService=N,this.contextService=B,this.uriIdentityService=P,this.editorResolverService=V,this.workingCopyService=z,this.workspaceTrustRequestService=U,this.hostService=H,this.textEditorService=K,this._onDidActiveEditorChange=this._register(new w.Emitter),this.onDidActiveEditorChange=this._onDidActiveEditorChange.event,this._onDidVisibleEditorsChange=this._register(new w.Emitter),this.onDidVisibleEditorsChange=this._onDidVisibleEditorsChange.event,this._onDidEditorsChange=this._register(new w.Emitter),this.onDidEditorsChange=this._onDidEditorsChange.event,this._onDidCloseEditor=this._register(new w.Emitter),this.onDidCloseEditor=this._onDidCloseEditor.event,this._onDidOpenEditorFail=this._register(new w.Emitter),this.onDidOpenEditorFail=this._onDidOpenEditorFail.event,this._onDidMostRecentlyActiveEditorsChange=this._register(new w.Emitter),this.onDidMostRecentlyActiveEditorsChange=this._onDidMostRecentlyActiveEditorsChange.event,this.lastActiveEditor=void 0,this.activeOutOfWorkspaceWatchers=new D.ResourceMap,this.closeOnFileDelete=!1,this.editorsObserver=this._register(this.instantiationService.createInstance(a.EditorsObserver)),this.onConfigurationUpdated(N.getValue()),this.registerListeners()}registerListeners(){this.editorGroupService.whenReady.then(()=>this.onEditorGroupsReady()),this.editorGroupService.onDidChangeActiveGroup(F=>this.handleActiveEditorChange(F)),this.editorGroupService.onDidAddGroup(F=>this.registerGroupListeners(F)),this.editorsObserver.onDidMostRecentlyActiveEditorsChange(()=>this._onDidMostRecentlyActiveEditorsChange.fire()),this._register(this.onDidVisibleEditorsChange(()=>this.handleVisibleEditorsChange())),this._register(this.fileService.onDidRunOperation(F=>this.onDidRunFileOperation(F))),this._register(this.fileService.onDidFilesChange(F=>this.onDidFilesChange(F))),this._register(this.configurationService.onDidChangeConfiguration(F=>this.onConfigurationUpdated(this.configurationService.getValue())))}onEditorGroupsReady(){for(const F of this.editorGroupService.groups)this.registerGroupListeners(F);this.activeEditor&&(this.doHandleActiveEditorChangeEvent(),this._onDidVisibleEditorsChange.fire())}handleActiveEditorChange(F){F===this.editorGroupService.activeGroup&&(!this.lastActiveEditor&&!F.activeEditor||this.doHandleActiveEditorChangeEvent())}doHandleActiveEditorChangeEvent(){const F=this.editorGroupService.activeGroup;this.lastActiveEditor=(0,u.withNullAsUndefined)(F.activeEditor),this._onDidActiveEditorChange.fire()}registerGroupListeners(F){const L=new s.DisposableStore;L.add(F.onDidModelChange(M=>{this._onDidEditorsChange.fire({groupId:F.id,...M})})),L.add(F.onDidActiveEditorChange(()=>{this.handleActiveEditorChange(F),this._onDidVisibleEditorsChange.fire()})),L.add(F.onDidCloseEditor(M=>{this._onDidCloseEditor.fire(M)})),L.add(F.onDidOpenEditorFail(M=>{this._onDidOpenEditorFail.fire({editor:M,groupId:F.id})})),w.Event.once(F.onWillDispose)(()=>{(0,s.dispose)(L)})}handleVisibleEditorsChange(){const F=new D.ResourceMap;for(const L of this.visibleEditors){const M=(0,l.distinct)((0,l.coalesce)([_.EditorResourceAccessor.getCanonicalUri(L,{supportSideBySide:_.SideBySideEditor.PRIMARY}),_.EditorResourceAccessor.getCanonicalUri(L,{supportSideBySide:_.SideBySideEditor.SECONDARY})]),N=>N.toString());for(const N of M)this.fileService.hasProvider(N)&&!this.contextService.isInsideWorkspace(N)&&F.set(N,N)}for(const L of this.activeOutOfWorkspaceWatchers.keys())F.get(L)||((0,s.dispose)(this.activeOutOfWorkspaceWatchers.get(L)),this.activeOutOfWorkspaceWatchers.delete(L));for(const L of F.keys())if(!this.activeOutOfWorkspaceWatchers.get(L)){const M=this.fileService.watch(L);this.activeOutOfWorkspaceWatchers.set(L,M)}}async onDidRunFileOperation(F){F.isOperation(2)&&this.handleMovedFile(F.resource,F.target.resource),(F.isOperation(1)||F.isOperation(2))&&this.handleDeletedFile(F.resource,!1,F.target?F.target.resource:void 0)}onDidFilesChange(F){F.gotDeleted()&&this.handleDeletedFile(F,!0)}async handleMovedFile(F,L){for(const M of this.editorGroupService.groups){let N=[];for(const B of M.editors){const P=B.resource;if(!P||!this.uriIdentityService.extUri.isEqualOrParent(P,F))continue;let V;if(this.uriIdentityService.extUri.isEqual(F,P))V=L;else{const H=(0,g.indexOfPath)(P.path,F.path,this.uriIdentityService.extUri.ignorePathCasing(P));V=(0,C.joinPath)(L,P.path.substr(H+F.path.length+1))}const z=await B.rename(M.id,V);if(!z)return;const U={preserveFocus:!0,pinned:M.isPinned(B),sticky:M.isSticky(B),index:M.getIndexOfEditor(B),inactive:!M.isActive(B)};(0,_.isEditorInput)(z.editor)?N.push({editor:B,replacement:z.editor,options:{...z.options,...U}}):N.push({editor:B,replacement:{...z.editor,options:{...z.editor.options,...U}}})}N.length&&this.replaceEditors(N,M)}}onConfigurationUpdated(F){typeof F.workbench?.editor?.closeOnFileDelete=="boolean"?this.closeOnFileDelete=F.workbench.editor.closeOnFileDelete:this.closeOnFileDelete=!1}handleDeletedFile(F,L,M){for(const N of this.getAllNonDirtyEditors({includeUntitled:!1,supportSideBySide:!0}))(async()=>{const B=N.resource;if(!!B&&(this.closeOnFileDelete||!L||!this.workingCopyService.has(B))){if(M&&this.uriIdentityService.extUri.isEqualOrParent(B,M))return;let P=!1;if(F instanceof I.FileChangesEvent?P=F.contains(B,2):P=this.uriIdentityService.extUri.isEqualOrParent(B,F),!P)return;let V=!1;L&&this.fileService.hasProvider(B)&&(await(0,n.timeout)(100),V=await this.fileService.exists(B)),!V&&!N.isDisposed()&&N.dispose()}})()}getAllNonDirtyEditors(F){const L=[];function M(N){N.hasCapability(4)&&!F.includeUntitled||N.isDirty()||L.push(N)}for(const N of this.editors)F.supportSideBySide&&N instanceof k.SideBySideEditorInput?(M(N.primary),M(N.secondary)):M(N);return L}get activeEditorPane(){return this.editorGroupService.activeGroup?.activeEditorPane}get activeTextEditorControl(){const F=this.activeEditorPane;if(F){const L=F.getControl();if((0,r.isCodeEditor)(L)||(0,r.isDiffEditor)(L))return L;if((0,r.isCompositeEditor)(L)&&(0,r.isCodeEditor)(L.activeCodeEditor))return L.activeCodeEditor}}get activeTextEditorLanguageId(){let F;const L=this.activeTextEditorControl;return(0,r.isDiffEditor)(L)?F=L.getModifiedEditor():F=L,F?.getModel()?.getLanguageId()}get count(){return this.editorsObserver.count}get editors(){return this.getEditors(1).map(({editor:F})=>F)}getEditors(F,L){switch(F){case 0:return L?.excludeSticky?this.editorsObserver.editors.filter(({groupId:M,editor:N})=>!this.editorGroupService.getGroup(M)?.isSticky(N)):this.editorsObserver.editors;case 1:{const M=[];for(const N of this.editorGroupService.getGroups(2))M.push(...N.getEditors(1,L).map(B=>({editor:B,groupId:N.id})));return M}}}get activeEditor(){const F=this.editorGroupService.activeGroup;return F?(0,u.withNullAsUndefined)(F.activeEditor):void 0}get visibleEditorPanes(){return(0,l.coalesce)(this.editorGroupService.groups.map(F=>F.activeEditorPane))}get visibleTextEditorControls(){const F=[];for(const L of this.visibleEditorPanes){const M=L.getControl();((0,r.isCodeEditor)(M)||(0,r.isDiffEditor)(M))&&F.push(M)}return F}get visibleEditors(){return(0,l.coalesce)(this.editorGroupService.groups.map(F=>F.activeEditor))}async openEditor(F,L,M){let N,B=(0,_.isEditorInput)(F)?L:F.options,P;if((0,i.isPreferredGroup)(L)&&(M=L),B?.override!==f.EditorResolution.DISABLED){const V=await this.editorResolverService.resolveEditor((0,_.isEditorInput)(F)?{editor:F,options:B}:F,M);if(V===1)return;(0,_.isEditorInputWithOptionsAndGroup)(V)&&(N=V.editor,B=V.options,P=V.group)}if(N||(N=(0,_.isEditorInput)(F)?F:this.textEditorService.createTextEditor(F)),!P){let V;[P,V]=this.instantiationService.invokeFunction(T.findGroup,{editor:N,options:B},M),V&&(B={...B,activation:V})}return P.openEditor(N,B)}async openEditors(F,L,M){if(M?.validateTrust&&!await this.handleWorkspaceTrust(F))return[];const N=new Map;for(const P of F){let V,z;if(P.options?.override!==f.EditorResolution.DISABLED){const H=await this.editorResolverService.resolveEditor(P,L);if(H===1)continue;(0,_.isEditorInputWithOptionsAndGroup)(H)&&(V=H,z=H.group)}V||(V=(0,_.isEditorInputWithOptions)(P)?P:{editor:this.textEditorService.createTextEditor(P),options:P.options}),z||([z]=this.instantiationService.invokeFunction(T.findGroup,V,L));let U=N.get(z);U||(U=[],N.set(z,U)),U.push(V)}const B=[];for(const[P,V]of N)B.push(P.openEditors(V));return(0,l.coalesce)(await n.Promises.settled(B))}async handleWorkspaceTrust(F){const{resources:L,diffMode:M}=this.extractEditorResources(F);switch(await this.workspaceTrustRequestService.requestOpenFilesTrust(L)){case 1:return!0;case 2:return await this.hostService.openWindow(L.map(B=>({fileUri:B})),{forceNewWindow:!0,diffMode:M}),!1;case 3:return!1}}extractEditorResources(F){const L=new D.ResourceMap;let M=!1;for(const N of F)if((0,_.isEditorInputWithOptions)(N)){const B=_.EditorResourceAccessor.getOriginalUri(N.editor,{supportSideBySide:_.SideBySideEditor.BOTH});v.URI.isUri(B)?L.set(B,!0):B&&(B.primary&&L.set(B.primary,!0),B.secondary&&L.set(B.secondary,!0),M=N.editor instanceof o.DiffEditorInput)}else if((0,_.isResourceDiffEditorInput)(N)){const B=N.original;v.URI.isUri(B.resource)&&L.set(B.resource,!0);const P=N.modified;v.URI.isUri(P.resource)&&L.set(P.resource,!0),M=!0}else(0,_.isResourceEditorInput)(N)&&L.set(N.resource,!0);return{resources:Array.from(L.keys()),diffMode:M}}isOpened(F){return this.editorsObserver.hasEditor({resource:this.uriIdentityService.asCanonicalUri(F.resource),typeId:F.typeId,editorId:F.editorId})}isVisible(F){for(const L of this.editorGroupService.groups)if(L.activeEditor?.matches(F))return!0;return!1}async closeEditor({editor:F,groupId:L},M){await this.editorGroupService.getGroup(L)?.closeEditor(F,M)}async closeEditors(F,L){const M=new Map;for(const{editor:N,groupId:B}of F){const P=this.editorGroupService.getGroup(B);if(!P)continue;let V=M.get(P);V||(V=[],M.set(P,V)),V.push(N)}for(const[N,B]of M)await N.closeEditors(B,L)}findEditors(F,L,M){const N=v.URI.isUri(F)?F:F.resource,B=v.URI.isUri(F)?void 0:F.typeId;if(L?.supportSideBySide!==_.SideBySideEditor.ANY&&L?.supportSideBySide!==_.SideBySideEditor.SECONDARY&&!this.editorsObserver.hasEditors(N))return v.URI.isUri(F)||(0,u.isUndefined)(M)?[]:void 0;if((0,u.isUndefined)(M)){const P=[];for(const V of this.editorGroupService.getGroups(1)){const z=[];if(v.URI.isUri(F))z.push(...this.findEditors(F,L,V));else{const U=this.findEditors(F,L,V);U&&z.push(U)}P.push(...z.map(U=>({editor:U,groupId:V.id})))}return P}else{const P=typeof M=="number"?this.editorGroupService.getGroup(M):M;if(v.URI.isUri(F))return P?P.findEditors(N,L):[];{if(!P)return;const V=P.findEditors(N,L);for(const z of V)if(z.typeId===B)return z;return}}}async replaceEditors(F,L){const M=typeof L=="number"?this.editorGroupService.getGroup(L):L,N=[];for(const B of F){let P,V;if((0,c.isEditorReplacement)(B)?V=B.options?.override:V=B.replacement.options?.override,V!==f.EditorResolution.DISABLED){const z=await this.editorResolverService.resolveEditor((0,c.isEditorReplacement)(B)?{editor:B.replacement,options:B.options}:B.replacement,M);if(z===1)continue;(0,_.isEditorInputWithOptionsAndGroup)(z)&&(P={editor:B.editor,replacement:z.editor,options:z.options,forceReplaceDirty:B.forceReplaceDirty})}P||(P={editor:B.editor,replacement:(0,c.isEditorReplacement)(B)?B.replacement:this.textEditorService.createTextEditor(B.replacement),options:(0,c.isEditorReplacement)(B)?B.options:B.replacement.options,forceReplaceDirty:B.forceReplaceDirty}),N.push(P)}return M?.replaceEditors(N)}async save(F,L){Array.isArray(F)||(F=[F]);const M=this.getUniqueEditors(F),N=[],B=[];if(L?.saveAs)B.push(...M);else for(const{groupId:V,editor:z}of M)z.hasCapability(4)?B.push({groupId:V,editor:z}):N.push({groupId:V,editor:z});const P=await n.Promises.settled(N.map(({groupId:V,editor:z})=>(L?.reason===1&&this.editorGroupService.getGroup(V)?.pinEditor(z),z.save(V,L))));for(const{groupId:V,editor:z}of B){if(z.isDisposed())continue;const U=await this.openEditor(z,V),H={pinned:!0,viewState:U?.getViewState()},K=L?.saveAs?await z.saveAs(V,L):await z.save(V,L);if(P.push(K),!K)break;if(!z.matches(K)){const G=z.hasCapability(4)?this.editorGroupService.groups.map(q=>q.id):[V];for(const q of G)K instanceof A.EditorInput?await this.replaceEditors([{editor:z,replacement:K,options:H}],q):await this.replaceEditors([{editor:z,replacement:{...K,options:H}}],q)}}return P.every(V=>!!V)}saveAll(F){return this.save(this.getAllDirtyEditors(F),F)}async revert(F,L){Array.isArray(F)||(F=[F]);const M=this.getUniqueEditors(F);return await n.Promises.settled(M.map(async({groupId:N,editor:B})=>(this.editorGroupService.getGroup(N)?.pinEditor(B),B.revert(N,L)))),!M.some(({editor:N})=>N.isDirty())}async revertAll(F){return this.revert(this.getAllDirtyEditors(F),F)}getAllDirtyEditors(F){const L=[];for(const M of this.editorGroupService.getGroups(1))for(const N of M.getEditors(0))!N.isDirty()||!F?.includeUntitled&&N.hasCapability(4)||F?.excludeSticky&&M.isSticky(N)||L.push({groupId:M.id,editor:N});return L}getUniqueEditors(F){const L=[];for(const{editor:M,groupId:N}of F)L.some(B=>B.editor.matches(M))||L.push({editor:M,groupId:N});return L}dispose(){super.dispose(),this.activeOutOfWorkspaceWatchers.forEach(F=>(0,s.dispose)(F)),this.activeOutOfWorkspaceWatchers.clear()}};O=Ee([W(0,c.IEditorGroupsService),W(1,t.IInstantiationService),W(2,I.IFileService),W(3,S.IConfigurationService),W(4,h.IWorkspaceContextService),W(5,d.IUriIdentityService),W(6,m.IEditorResolverService),W(7,b.IWorkingCopyService),W(8,E.IWorkspaceTrustRequestService),W(9,y.IHostService),W(10,R.ITextEditorService)],O),e.EditorService=O,(0,p.registerSingleton)(i.IEditorService,O)}),define(ne[2716],re([1,0,22,6,118,2,18,9,312,106,52,42,61,1891,28,8,57,132,85,35,5,38,45,26,17,27,34,167,256,272,59,21,617,108,622,426,109,375,83,13]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PreferencesService=void 0;const V=`{ }`;let z=class extends A.Disposable{constructor(H,K,G,q,Z,j,X,Y,$,J,ee,te,se,ie,ce,le,ae,ue){super();this.editorService=H,this.editorGroupService=K,this.textFileService=G,this.configurationService=q,this.notificationService=Z,this.contextService=j,this.instantiationService=X,this.environmentService=Y,this.telemetryService=$,this.textModelResolverService=J,this.modelService=te,this.jsonEditingService=se,this.languageService=ie,this.labelService=ce,this.remoteAgentService=le,this.commandService=ae,this.textEditorService=ue,this._onDispose=this._register(new f.Emitter),this.defaultKeybindingsResource=D.URI.from({scheme:k.Schemas.vscode,authority:"defaultsettings",path:"/keybindings.json"}),this.defaultSettingsRawResource=D.URI.from({scheme:k.Schemas.vscode,authority:"defaultsettings",path:"/defaultSettings.json"}),this._register(ee.onDidUpdateKeybindings(()=>{const oe=te.getModel(this.defaultKeybindingsResource);!oe||te.updateModel(oe,(0,L.defaultKeybindingsContents)(ee))}))}get userSettingsResource(){return this.environmentService.settingsResource}get workspaceSettingsResource(){if(this.contextService.getWorkbenchState()===1)return null;const H=this.contextService.getWorkspace();return H.configuration||H.folders[0].toResource(x.FOLDER_SETTINGS_PATH)}get settingsEditor2Input(){return this.instantiationService.createInstance(F.SettingsEditor2Input)}getFolderSettingsResource(H){const K=this.contextService.getWorkspaceFolder(H);return K?K.toResource(x.FOLDER_SETTINGS_PATH):null}resolveModel(H){if(this.isDefaultSettingsResource(H)){const K=this.getConfigurationTargetFromDefaultSettingsResource(H),G=this.languageService.createById("jsonc"),q=this._register(this.modelService.createModel("",G,H));let Z;return this.configurationService.onDidChangeConfiguration(j=>{if(j.source===6){const X=this.modelService.getModel(H);if(!X)return;Z=this.getDefaultSettings(K),this.modelService.updateModel(X,Z.getContentWithoutMostCommonlyUsed(!0)),Z._onDidChange.fire()}}),Z||(Z=this.getDefaultSettings(K),this.modelService.updateModel(q,Z.getContentWithoutMostCommonlyUsed(!0))),q}if(this.defaultSettingsRawResource.toString()===H.toString()){const K=this.instantiationService.createInstance(L.DefaultRawSettingsEditorModel,this.getDefaultSettings(2)),G=this.languageService.createById("jsonc");return this._register(this.modelService.createModel(K.content,G,H))}if(this.defaultKeybindingsResource.toString()===H.toString()){const K=this.instantiationService.createInstance(L.DefaultKeybindingsEditorModel,H),G=this.languageService.createById("jsonc");return this._register(this.modelService.createModel(K.content,G,H))}return null}async createPreferencesEditorModel(H){if(this.isDefaultSettingsResource(H))return this.createDefaultSettingsEditorModel(H);if(this.userSettingsResource.toString()===H.toString())return this.createEditableSettingsEditorModel(2,H);const K=await this.getEditableSettingsURI(4);if(K&&K.toString()===H.toString())return this.createEditableSettingsEditorModel(4,K);if(this.contextService.getWorkbenchState()===3){const Z=await this.getEditableSettingsURI(5,H);if(Z&&Z.toString()===H.toString())return this.createEditableSettingsEditorModel(5,H)}const G=await this.remoteAgentService.getEnvironment(),q=G?G.settingsPath:null;return q&&q.toString()===H.toString()?this.createEditableSettingsEditorModel(3,H):null}openRawDefaultSettings(){return this.editorService.openEditor({resource:this.defaultSettingsRawResource})}openRawUserSettings(){return this.editorService.openEditor({resource:this.userSettingsResource})}shouldOpenJsonByDefault(){return this.configurationService.getValue("workbench.settings.editor")==="json"}openSettings(H={}){return H={...H,target:2},H.query&&(H.jsonEditor=!1),this.open(this.userSettingsResource,H)}openLanguageSpecificSettings(H,K={}){return this.shouldOpenJsonByDefault()?(K.query=void 0,K.revealSetting={key:`[${H}]`,edit:!0}):K.query=`@lang:${H}${K.query?` ${K.query}`:""}`,K.target=K.target??2,this.open(this.userSettingsResource,K)}open(H,K){return K={...K,jsonEditor:K.jsonEditor??this.shouldOpenJsonByDefault()},K.jsonEditor?this.openSettingsJson(H,K):this.openSettings2(K)}async openSettings2(H){const K=this.settingsEditor2Input;return H={...H,focusSearch:!0},await this.editorService.openEditor(K,(0,x.validateSettingsEditorOptions)(H),H.openToSide?R.SIDE_GROUP:void 0),this.editorGroupService.activeGroup.activeEditorPane}openUserSettings(H={}){return H={...H,target:2},this.open(this.userSettingsResource,H)}async openRemoteSettings(H={}){const K=await this.remoteAgentService.getEnvironment();K&&(H={...H,target:3},this.open(K.settingsPath,H))}openWorkspaceSettings(H={}){return this.workspaceSettingsResource?(H={...H,target:4},this.open(this.workspaceSettingsResource,H)):(this.notificationService.info(c.localize(0,null)),Promise.reject(null))}async openFolderSettings(H={}){if(H={...H,target:5},!H.folderUri)throw new Error("Missing folder URI");const K=await this.getEditableSettingsURI(5,H.folderUri);if(!K)throw new Error(`Invalid folder URI - ${H.folderUri.toString()}`);return this.open(K,H)}async openGlobalKeybindingSettings(H,K){if(this.telemetryService.publicLog2("openKeybindings",{textual:H}),K={pinned:!0,revealIfOpened:!0,...K},H){const G="// "+c.localize(1,null)+` [ ]`,q=this.environmentService.keybindingsResource,Z=!!this.configurationService.getValue("workbench.settings.openDefaultKeybindings");if(await this.createIfNotExists(q,G),Z){const j=this.editorGroupService.activeGroup,X=this.editorGroupService.addGroup(j.id,3);await Promise.all([this.editorService.openEditor({resource:this.defaultKeybindingsResource,options:{pinned:!0,preserveFocus:!0,revealIfOpened:!0,override:l.EditorResolution.DISABLED},label:c.localize(2,null),description:""}),this.editorService.openEditor({resource:q,options:K},X.id)])}else await this.editorService.openEditor({resource:q,options:K})}else{const G=await this.editorService.openEditor(this.instantiationService.createInstance(O.KeybindingsEditorInput),{...K,override:l.EditorResolution.DISABLED});K.query&&G.search(K.query)}}openDefaultKeybindingsFile(){return this.editorService.openEditor({resource:this.defaultKeybindingsResource,label:c.localize(3,null)})}async openSettingsJson(H,K){const G=K?.openToSide?R.SIDE_GROUP:void 0,q=await this.doOpenSettingsJson(H,K,G);return q&&K?.revealSetting&&await this.revealSetting(K.revealSetting.key,!!K.revealSetting.edit,q,H),q}async doOpenSettingsJson(H,K,G){const q=!!this.configurationService.getValue(x.USE_SPLIT_JSON_SETTING),Z=!!this.configurationService.getValue(x.DEFAULT_SETTINGS_EDITOR_SETTING);if(q||Z)return this.doOpenSplitJSON(H,K,G);const j=K?.target??1,X=await this.getOrCreateEditableSettingsEditorInput(j,H);return K={...K,pinned:!0},await this.editorService.openEditor(X,(0,x.validateSettingsEditorOptions)(K),G)}async doOpenSplitJSON(H,K={},G){const q=K.target??1;await this.createSettingsIfNotExists(q,H);const Z=this.createSplitJsonEditorInput(q,H);return K={...K,pinned:!0},this.editorService.openEditor(Z,(0,x.validateSettingsEditorOptions)(K),G)}createSplitJsonEditorInput(H,K){const G=this.textEditorService.createTextEditor({resource:K}),q=this.instantiationService.createInstance(E.TextResourceEditorInput,this.getDefaultSettingsResource(H),void 0,void 0,void 0,void 0);return this.instantiationService.createInstance(b.SideBySideEditorInput,G.getName(),void 0,q,G)}createSettings2EditorModel(){return this.instantiationService.createInstance(L.Settings2EditorModel,this.getDefaultSettings(2))}getConfigurationTargetFromDefaultSettingsResource(H){return this.isDefaultWorkspaceSettingsResource(H)?4:this.isDefaultFolderSettingsResource(H)?5:2}isDefaultSettingsResource(H){return this.isDefaultUserSettingsResource(H)||this.isDefaultWorkspaceSettingsResource(H)||this.isDefaultFolderSettingsResource(H)}isDefaultUserSettingsResource(H){return H.authority==="defaultsettings"&&H.scheme===k.Schemas.vscode&&!!H.path.match(/\/(\d+\/)?settings\.json$/)}isDefaultWorkspaceSettingsResource(H){return H.authority==="defaultsettings"&&H.scheme===k.Schemas.vscode&&!!H.path.match(/\/(\d+\/)?workspaceSettings\.json$/)}isDefaultFolderSettingsResource(H){return H.authority==="defaultsettings"&&H.scheme===k.Schemas.vscode&&!!H.path.match(/\/(\d+\/)?resourceSettings\.json$/)}getDefaultSettingsResource(H){switch(H){case 4:return D.URI.from({scheme:k.Schemas.vscode,authority:"defaultsettings",path:"/workspaceSettings.json"});case 5:return D.URI.from({scheme:k.Schemas.vscode,authority:"defaultsettings",path:"/resourceSettings.json"})}return D.URI.from({scheme:k.Schemas.vscode,authority:"defaultsettings",path:"/settings.json"})}async getOrCreateEditableSettingsEditorInput(H,K){return await this.createSettingsIfNotExists(H,K),this.textEditorService.createTextEditor({resource:K})}async createEditableSettingsEditorModel(H,K){const G=this.contextService.getWorkspace();if(G.configuration&&G.configuration.toString()===K.toString()){const Z=await this.textModelResolverService.createModelReference(K);return this.instantiationService.createInstance(L.WorkspaceConfigurationEditorModel,Z,H)}const q=await this.textModelResolverService.createModelReference(K);return this.instantiationService.createInstance(L.SettingsEditorModel,q,H)}async createDefaultSettingsEditorModel(H){const K=await this.textModelResolverService.createModelReference(H),G=this.getConfigurationTargetFromDefaultSettingsResource(H);return this.instantiationService.createInstance(L.DefaultSettingsEditorModel,H,K,this.getDefaultSettings(G))}getDefaultSettings(H){return H===4?(this._defaultWorkspaceSettingsContentModel||(this._defaultWorkspaceSettingsContentModel=new L.DefaultSettings(this.getMostCommonlyUsedSettings(),H)),this._defaultWorkspaceSettingsContentModel):H===5?(this._defaultFolderSettingsContentModel||(this._defaultFolderSettingsContentModel=new L.DefaultSettings(this.getMostCommonlyUsedSettings(),H)),this._defaultFolderSettingsContentModel):(this._defaultUserSettingsContentModel||(this._defaultUserSettingsContentModel=new L.DefaultSettings(this.getMostCommonlyUsedSettings(),H)),this._defaultUserSettingsContentModel)}async getEditableSettingsURI(H,K){switch(H){case 1:case 2:return this.userSettingsResource;case 3:{const G=await this.remoteAgentService.getEnvironment();return G?G.settingsPath:null}case 4:return this.workspaceSettingsResource;case 5:if(K)return this.getFolderSettingsResource(K)}return null}async createSettingsIfNotExists(H,K){if(this.contextService.getWorkbenchState()===3&&H===4){const G=this.contextService.getWorkspace().configuration;if(!G)return;const q=await this.textFileService.read(G);Object.keys((0,_.parse)(q.value)).indexOf("settings")===-1&&await this.jsonEditingService.write(K,[{path:["settings"],value:{}}],!0);return}await this.createIfNotExists(K,V)}async createIfNotExists(H,K){try{await this.textFileService.read(H,{acceptTextOnly:!0})}catch(G){if(G.fileOperationResult===1)try{await this.textFileService.write(H,K);return}catch(q){throw new Error(c.localize(4,null,this.labelService.getUriLabel(H,{relative:!0}),(0,t.getErrorMessage)(q)))}else throw G}}getMostCommonlyUsedSettings(){return["files.autoSave","editor.fontSize","editor.fontFamily","editor.tabSize","editor.renderWhitespace","editor.cursorStyle","editor.multiCursorModifier","editor.insertSpaces","editor.wordWrap","files.exclude","files.associations","workbench.editor.enablePreview"]}async revealSetting(H,K,G,q){const Z=G?(0,w.getCodeEditor)(G.getControl()):null;if(!Z)return;const j=await this.createPreferencesEditorModel(q);if(!j)return;const X=await this.getPositionToReveal(H,K,j,Z);X&&(Z.setPosition(X),Z.revealPositionNearTop(X),Z.focus(),K&&await this.commandService.executeCommand("editor.action.triggerSuggest"))}async getPositionToReveal(H,K,G,q){const Z=q.getModel();if(!Z)return null;const j=g.Registry.as(s.Extensions.Configuration).getConfigurationProperties()[H],X=s.OVERRIDE_PROPERTY_REGEX.test(H);if(!j&&!X)return null;let Y=null;const $=j?.type??"object";let J=G.getPreference(H);if(!J&&K){let ee=$==="object"||$==="array"?this.configurationService.inspect(H).defaultValue:(0,s.getDefaultValue)($);if(ee=ee===void 0&&X?{}:ee,ee!==void 0){const te=G instanceof L.WorkspaceConfigurationEditorModel?["settings",H]:[H];await this.jsonEditingService.write(G.uri,[{path:te,value:ee}],!1),J=G.getPreference(H)}}if(J)if(K)if((0,P.isObject)(J.value)||(0,P.isArray)(J.value)){Y={lineNumber:J.valueRange.startLineNumber,column:J.valueRange.startColumn+1},q.setPosition(Y),await I.CoreEditingCommands.LineBreakInsert.runEditorCommand(null,q,null),Y={lineNumber:Y.lineNumber+1,column:Z.getLineMaxColumn(Y.lineNumber+1)};const ee=Z.getLineFirstNonWhitespaceColumn(Y.lineNumber);ee&&(q.setPosition({lineNumber:Y.lineNumber,column:ee}),await I.CoreEditingCommands.LineBreakInsert.runEditorCommand(null,q,null),Y={lineNumber:Y.lineNumber,column:Z.getLineMaxColumn(Y.lineNumber)})}else Y={lineNumber:J.valueRange.startLineNumber,column:J.valueRange.endColumn};else Y={lineNumber:J.keyRange.startLineNumber,column:J.keyRange.startColumn};return Y}dispose(){this._onDispose.fire(),super.dispose()}};z=Ee([W(0,R.IEditorService),W(1,T.IEditorGroupsService),W(2,B.ITextFileService),W(3,S.IConfigurationService),W(4,h.INotificationService),W(5,m.IWorkspaceContextService),W(6,u.IInstantiationService),W(7,r.IEnvironmentService),W(8,d.ITelemetryService),W(9,o.ITextModelService),W(10,a.IKeybindingService),W(11,v.IModelService),W(12,y.IJSONEditingService),W(13,C.ILanguageService),W(14,n.ILabelService),W(15,M.IRemoteAgentService),W(16,i.ICommandService),W(17,N.ITextEditorService)],z),e.PreferencesService=z,(0,p.registerSingleton)(x.IPreferencesService,z)}),define(ne[2717],re([1,0,18,2,9,375,19,126,50,154,101,372,336,240]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UntitledTextEditorWorkingCopyEditorHandler=e.UntitledTextEditorInputSerializer=void 0;let i=class{constructor(l,r,p){this.filesConfigurationService=l,this.environmentService=r,this.pathService=p}canSerialize(l){return this.filesConfigurationService.isHotExitEnabled&&!l.isDisposed()}serialize(l){if(!this.filesConfigurationService.isHotExitEnabled||l.isDisposed())return;const r=l;let p=r.resource;r.model.hasAssociatedFilePath&&(p=(0,k.toLocalResource)(p,this.environmentService.remoteAuthority,this.pathService.defaultUriScheme));let u;const a=r.getLanguageId();(a!==D.PLAINTEXT_LANGUAGE_ID||r.model.hasLanguageSetExplicitly)&&(u=a);const n={resourceJSON:p.toJSON(),modeId:u,encoding:r.getEncoding()};return JSON.stringify(n)}deserialize(l,r){return l.invokeFunction(p=>{const u=JSON.parse(r),a=_.URI.revive(u.resourceJSON),n=u.modeId,h=u.encoding;return p.get(A.ITextEditorService).createTextEditor({resource:a,languageId:n,encoding:h,forceUntitled:!0})})}};i=Ee([W(0,w.IFilesConfigurationService),W(1,I.IWorkbenchEnvironmentService),W(2,v.IPathService)],i),e.UntitledTextEditorInputSerializer=i;let S=class ll extends f.Disposable{constructor(l,r,p,u){super();this.workingCopyEditorService=l,this.environmentService=r,this.pathService=p,this.textEditorService=u,this.installHandler()}installHandler(){this._register(this.workingCopyEditorService.registerHandler({handles:l=>l.resource.scheme===t.Schemas.untitled&&l.typeId===o.NO_TYPE_ID,isOpen:(l,r)=>r instanceof C.UntitledTextEditorInput&&(0,k.isEqual)(l.resource,r.resource),createEditor:l=>{let r;return ll.UNTITLED_REGEX.test(l.resource.path)?r=l.resource:r=(0,k.toLocalResource)(l.resource,this.environmentService.remoteAuthority,this.pathService.defaultUriScheme),this.textEditorService.createTextEditor({resource:r,forceUntitled:!0})}}))}};S.UNTITLED_REGEX=/Untitled-\d+/,S=Ee([W(0,c.IWorkingCopyEditorService),W(1,I.IWorkbenchEnvironmentService),W(2,v.IPathService),W(3,A.ITextEditorService)],S),e.UntitledTextEditorWorkingCopyEditorHandler=S}),define(ne[2718],re([1,0,17,1395,149,44,74,167,636,605,203,372,256,927,843,922,70,16,99,97,635,204,317,94,7,14,39,298,47,2686,12,210,604,18,33,63,2717,2308]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t.Registry.as(A.EditorExtensions.EditorPane).registerEditorPane(_.EditorPaneDescriptor.create(I.TextResourceEditor,I.TextResourceEditor.ID,(0,f.localize)(0,null)),[new r.SyncDescriptor(C.UntitledTextEditorInput),new r.SyncDescriptor(o.TextResourceEditorInput)]),t.Registry.as(A.EditorExtensions.EditorPane).registerEditorPane(_.EditorPaneDescriptor.create(c.TextDiffEditor,c.TextDiffEditor.ID,(0,f.localize)(1,null)),[new r.SyncDescriptor(v.DiffEditorInput)]),t.Registry.as(A.EditorExtensions.EditorPane).registerEditorPane(_.EditorPaneDescriptor.create(i.BinaryResourceDiffEditor,i.BinaryResourceDiffEditor.ID,(0,f.localize)(2,null)),[new r.SyncDescriptor(v.DiffEditorInput)]),t.Registry.as(A.EditorExtensions.EditorPane).registerEditorPane(_.EditorPaneDescriptor.create(w.SideBySideEditor,w.SideBySideEditor.ID,(0,f.localize)(3,null)),[new r.SyncDescriptor(D.SideBySideEditorInput)]),t.Registry.as(A.EditorExtensions.EditorFactory).registerEditorSerializer(C.UntitledTextEditorInput.ID,M.UntitledTextEditorInputSerializer),t.Registry.as(A.EditorExtensions.EditorFactory).registerEditorSerializer(D.SideBySideEditorInput.ID,D.SideBySideEditorInputSerializer),t.Registry.as(A.EditorExtensions.EditorFactory).registerEditorSerializer(v.DiffEditorInput.ID,v.DiffEditorInputSerializer),t.Registry.as(E.Extensions.Workbench).registerWorkbenchContribution(y.EditorAutoSave,2),t.Registry.as(E.Extensions.Workbench).registerWorkbenchContribution(S.EditorStatus,2),t.Registry.as(E.Extensions.Workbench).registerWorkbenchContribution(M.UntitledTextEditorWorkingCopyEditorHandler,2),t.Registry.as(E.Extensions.Workbench).registerWorkbenchContribution(N.DynamicEditorResolverConfigurations,2),(0,m.registerEditorContribution)(b.OpenWorkspaceButtonContribution.ID,b.OpenWorkspaceButtonContribution);const B=t.Registry.as(R.Extensions.Quickaccess),P="inEditorsPicker",V=g.ContextKeyExpr.and(n.inQuickPickContext,g.ContextKeyExpr.has(P));B.registerQuickAccessProvider({ctor:O.ActiveGroupEditorsByMostRecentlyUsedQuickAccess,prefix:O.ActiveGroupEditorsByMostRecentlyUsedQuickAccess.PREFIX,contextKey:P,placeholder:(0,f.localize)(4,null),helpEntries:[{description:(0,f.localize)(5,null),needsEditor:!1}]}),B.registerQuickAccessProvider({ctor:O.AllEditorsByAppearanceQuickAccess,prefix:O.AllEditorsByAppearanceQuickAccess.PREFIX,contextKey:P,placeholder:(0,f.localize)(6,null),helpEntries:[{description:(0,f.localize)(7,null),needsEditor:!1}]}),B.registerQuickAccessProvider({ctor:O.AllEditorsByMostRecentlyUsedQuickAccess,prefix:O.AllEditorsByMostRecentlyUsedQuickAccess.PREFIX,contextKey:P,placeholder:(0,f.localize)(8,null),helpEntries:[{description:(0,f.localize)(9,null),needsEditor:!1}]});const z=t.Registry.as(s.Extensions.WorkbenchActions);z.registerWorkbenchAction(l.SyncActionDescriptor.from(S.ChangeLanguageAction,{primary:(0,p.KeyChord)(2048|41,43)}),"Change Language Mode",void 0,g.ContextKeyExpr.not("notebookEditorFocused")),z.registerWorkbenchAction(l.SyncActionDescriptor.from(S.ChangeEOLAction),"Change End of Line Sequence"),z.registerWorkbenchAction(l.SyncActionDescriptor.from(S.ChangeEncodingAction),"Change File Encoding"),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.OpenNextEditor,{primary:2048|12,mac:{primary:2048|512|17,secondary:[2048|1024|89]}}),"View: Open Next Editor",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.OpenPreviousEditor,{primary:2048|11,mac:{primary:2048|512|15,secondary:[2048|1024|87]}}),"View: Open Previous Editor",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.OpenNextEditorInGroup,{primary:(0,p.KeyChord)(2048|41,2048|12),mac:{primary:(0,p.KeyChord)(2048|41,2048|512|17)}}),"View: Open Next Editor in Group",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.OpenPreviousEditorInGroup,{primary:(0,p.KeyChord)(2048|41,2048|11),mac:{primary:(0,p.KeyChord)(2048|41,2048|512|15)}}),"View: Open Previous Editor in Group",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.OpenNextRecentlyUsedEditorAction),"View: Open Next Recently Used Editor",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.OpenPreviousRecentlyUsedEditorAction),"View: Open Previous Recently Used Editor",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.OpenNextRecentlyUsedEditorInGroupAction),"View: Open Next Recently Used Editor In Group",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.OpenPreviousRecentlyUsedEditorInGroupAction),"View: Open Previous Recently Used Editor In Group",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.OpenFirstEditorInGroup),"View: Open First Editor in Group",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.OpenLastEditorInGroup,{primary:512|21,secondary:[2048|30],mac:{primary:256|21,secondary:[2048|30]}}),"View: Open Last Editor in Group",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.ReopenClosedEditorAction,{primary:2048|1024|50}),"View: Reopen Closed Editor",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.ShowAllEditorsByAppearanceAction,{primary:(0,p.KeyChord)(2048|41,2048|46),mac:{primary:2048|512|2}}),"View: Show All Editors By Appearance",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.ShowAllEditorsByMostRecentlyUsedAction),"View: Show All Editors By Most Recently Used",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.ShowEditorsInActiveGroupByMostRecentlyUsedAction),"View: Show Editors in Active Group By Most Recently Used",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.ClearRecentFilesAction),"File: Clear Recently Opened",(0,f.localize)(10,null)),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.CloseAllEditorsAction,{primary:(0,p.KeyChord)(2048|41,2048|53)}),"View: Close All Editors",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.CloseAllEditorGroupsAction,{primary:(0,p.KeyChord)(2048|41,2048|1024|53)}),"View: Close All Editor Groups",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.CloseLeftEditorsInGroupAction),"View: Close Editors to the Left in Group",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.CloseEditorsInOtherGroupsAction),"View: Close Editors in Other Groups",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.CloseEditorInAllGroupsAction),"View: Close Editor in All Groups",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.SplitEditorAction,{primary:2048|88}),"View: Split Editor",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.SplitEditorOrthogonalAction,{primary:(0,p.KeyChord)(2048|41,2048|88)}),"View: Split Editor Orthogonal",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.SplitEditorLeftAction),"View: Split Editor Left",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.SplitEditorRightAction),"View: Split Editor Right",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.SplitEditorUpAction),"View: Split Editor Up",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.SplitEditorDownAction),"View: Split Editor Down",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.JoinTwoGroupsAction),"View: Join Editor Group with Next Group",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.JoinAllGroupsAction),"View: Join All Editor Groups",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.NavigateBetweenGroupsAction),"View: Navigate Between Editor Groups",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.ResetGroupSizesAction),"View: Reset Editor Group Sizes",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.ToggleGroupSizesAction),"View: Toggle Editor Group Sizes",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.MaximizeGroupAction),"View: Maximize Editor Group and Hide Side Bars",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.MinimizeOtherGroupsAction),"View: Maximize Editor Group",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.MoveEditorLeftInGroupAction,{primary:2048|1024|11,mac:{primary:(0,p.KeyChord)(2048|41,2048|1024|15)}}),"View: Move Editor Left",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.MoveEditorRightInGroupAction,{primary:2048|1024|12,mac:{primary:(0,p.KeyChord)(2048|41,2048|1024|17)}}),"View: Move Editor Right",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.MoveGroupLeftAction,{primary:(0,p.KeyChord)(2048|41,15)}),"View: Move Editor Group Left",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.MoveGroupRightAction,{primary:(0,p.KeyChord)(2048|41,17)}),"View: Move Editor Group Right",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.MoveGroupUpAction,{primary:(0,p.KeyChord)(2048|41,16)}),"View: Move Editor Group Up",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.MoveGroupDownAction,{primary:(0,p.KeyChord)(2048|41,18)}),"View: Move Editor Group Down",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.DuplicateGroupLeftAction),"View: Duplicate Editor Group Left",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.DuplicateGroupRightAction),"View: Duplicate Editor Group Right",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.DuplicateGroupUpAction),"View: Duplicate Editor Group Up",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.DuplicateGroupDownAction),"View: Duplicate Editor Group Down",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.MoveEditorToPreviousGroupAction,{primary:2048|512|15,mac:{primary:2048|256|15}}),"View: Move Editor into Previous Group",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.MoveEditorToNextGroupAction,{primary:2048|512|17,mac:{primary:2048|256|17}}),"View: Move Editor into Next Group",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.MoveEditorToFirstGroupAction,{primary:1024|512|22,mac:{primary:2048|256|22}}),"View: Move Editor into First Group",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.MoveEditorToLastGroupAction,{primary:1024|512|30,mac:{primary:2048|256|30}}),"View: Move Editor into Last Group",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.MoveEditorToLeftGroupAction),"View: Move Editor into Left Group",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.MoveEditorToRightGroupAction),"View: Move Editor into Right Group",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.MoveEditorToAboveGroupAction),"View: Move Editor into Group Above",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.MoveEditorToBelowGroupAction),"View: Move Editor into Group Below",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.SplitEditorToPreviousGroupAction),"View: Split Editor into Previous Group",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.SplitEditorToNextGroupAction),"View: Split Editor into Next Group",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.SplitEditorToFirstGroupAction),"View: Split Editor into First Group",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.SplitEditorToLastGroupAction),"View: Split Editor into Last Group",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.SplitEditorToLeftGroupAction),"View: Split Editor into Left Group",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.SplitEditorToRightGroupAction),"View: Split Editor into Right Group",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.SplitEditorToAboveGroupAction),"View: Split Editor into Group Above",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.SplitEditorToBelowGroupAction),"View: Split Editor into Group Below",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.FocusActiveGroupAction),"View: Focus Active Editor Group",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.FocusFirstGroupAction,{primary:2048|22}),"View: Focus First Editor Group",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.FocusLastGroupAction),"View: Focus Last Editor Group",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.FocusPreviousGroup),"View: Focus Previous Editor Group",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.FocusNextGroup),"View: Focus Next Editor Group",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.FocusLeftGroup,{primary:(0,p.KeyChord)(2048|41,2048|15)}),"View: Focus Left Editor Group",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.FocusRightGroup,{primary:(0,p.KeyChord)(2048|41,2048|17)}),"View: Focus Right Editor Group",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.FocusAboveGroup,{primary:(0,p.KeyChord)(2048|41,2048|16)}),"View: Focus Editor Group Above",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.FocusBelowGroup,{primary:(0,p.KeyChord)(2048|41,2048|18)}),"View: Focus Editor Group Below",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.NewEditorGroupLeftAction),"View: New Editor Group to the Left",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.NewEditorGroupRightAction),"View: New Editor Group to the Right",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.NewEditorGroupAboveAction),"View: New Editor Group Above",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.NewEditorGroupBelowAction),"View: New Editor Group Below",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.NavigateForwardAction,{primary:0,win:{primary:512|17},mac:{primary:256|1024|83},linux:{primary:2048|1024|83}}),"Go Forward"),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.NavigateBackwardsAction,{primary:0,win:{primary:512|15},mac:{primary:256|83},linux:{primary:2048|512|83}}),"Go Back"),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.NavigatePreviousAction),"Go Previous"),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.NavigateForwardInEditsAction),"Go Forward in Edit Locations"),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.NavigateBackwardsInEditsAction),"Go Back in Edit Locations"),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.NavigatePreviousInEditsAction),"Go Previous in Edit Locations"),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.NavigateToLastEditLocationAction,{primary:(0,p.KeyChord)(2048|41,2048|47)}),"Go to Last Edit Location"),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.NavigateForwardInNavigationsAction),"Go Forward in Navigation Locations"),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.NavigateBackwardsInNavigationsAction),"Go Back in Navigation Locations"),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.NavigatePreviousInNavigationsAction),"Go Previous in Navigation Locations"),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.NavigateToLastNavigationLocationAction),"Go to Last Navigation Location"),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.ClearEditorHistoryAction),"Clear Editor History"),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.RevertAndCloseEditorAction),"View: Revert and Close Editor",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.EditorLayoutSingleAction),"View: Single Column Editor Layout",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.EditorLayoutTwoColumnsAction),"View: Two Columns Editor Layout",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.EditorLayoutThreeColumnsAction),"View: Three Columns Editor Layout",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.EditorLayoutTwoRowsAction),"View: Two Rows Editor Layout",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.EditorLayoutThreeRowsAction),"View: Three Rows Editor Layout",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.EditorLayoutTwoByTwoGridAction),"View: Grid Editor Layout (2x2)",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.EditorLayoutTwoRowsRightAction),"View: Two Rows Right Editor Layout",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.EditorLayoutTwoColumnsBottomAction),"View: Two Columns Bottom Editor Layout",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.ToggleEditorTypeAction),"View: Toggle Editor Type",s.CATEGORIES.View.value,k.ActiveEditorAvailableEditorIdsContext),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.ReOpenInTextEditorAction),"View: Reopen Editor With Text Editor",s.CATEGORIES.View.value,k.ActiveEditorAvailableEditorIdsContext),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.QuickAccessPreviousRecentlyUsedEditorAction),"View: Quick Open Previous Recently Used Editor",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.QuickAccessLeastRecentlyUsedEditorAction),"View: Quick Open Least Recently Used Editor",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.QuickAccessPreviousRecentlyUsedEditorInGroupAction,{primary:2048|2,mac:{primary:256|2}},k.ActiveEditorGroupEmptyContext.toNegated()),"View: Quick Open Previous Recently Used Editor in Group",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.QuickAccessLeastRecentlyUsedEditorInGroupAction,{primary:2048|1024|2,mac:{primary:256|1024|2}},k.ActiveEditorGroupEmptyContext.toNegated()),"View: Quick Open Least Recently Used Editor in Group",s.CATEGORIES.View.value),z.registerWorkbenchAction(l.SyncActionDescriptor.from(u.QuickAccessPreviousEditorFromHistoryAction),"Quick Open Previous Editor from History");const U="workbench.action.quickOpenNavigateNextInEditorPicker";h.KeybindingsRegistry.registerCommandAndKeybindingRule({id:U,weight:200+50,handler:(0,n.getQuickNavigateHandler)(U,!0),when:V,primary:2048|2,mac:{primary:256|2}});const H="workbench.action.quickOpenNavigatePreviousInEditorPicker";h.KeybindingsRegistry.registerCommandAndKeybindingRule({id:H,weight:200+50,handler:(0,n.getQuickNavigateHandler)(H,!1),when:V,primary:2048|1024|2,mac:{primary:256|1024|2}}),(0,a.setup)(),d.isMacintosh&&(l.MenuRegistry.appendMenuItem(l.MenuId.TouchBarContext,{command:{id:u.NavigateBackwardsAction.ID,title:u.NavigateBackwardsAction.LABEL,icon:{dark:x.FileAccess.asFileUri("vs/workbench/browser/parts/editor/media/back-tb.png",Q)}},group:"navigation",order:0}),l.MenuRegistry.appendMenuItem(l.MenuId.TouchBarContext,{command:{id:u.NavigateForwardAction.ID,title:u.NavigateForwardAction.LABEL,icon:{dark:x.FileAccess.asFileUri("vs/workbench/browser/parts/editor/media/forward-tb.png",Q)}},group:"navigation",order:1})),l.MenuRegistry.appendMenuItem(l.MenuId.EmptyEditorGroup,{command:{id:a.UNLOCK_GROUP_COMMAND_ID,title:(0,f.localize)(11,null),icon:F.Codicon.lock},group:"navigation",order:10,when:k.ActiveEditorGroupLockedContext}),l.MenuRegistry.appendMenuItem(l.MenuId.EmptyEditorGroup,{command:{id:a.CLOSE_EDITOR_GROUP_COMMAND_ID,title:(0,f.localize)(12,null),icon:F.Codicon.close},group:"navigation",order:20}),l.MenuRegistry.appendMenuItem(l.MenuId.EmptyEditorGroupContext,{command:{id:a.SPLIT_EDITOR_UP,title:(0,f.localize)(13,null)},group:"2_split",order:10}),l.MenuRegistry.appendMenuItem(l.MenuId.EmptyEditorGroupContext,{command:{id:a.SPLIT_EDITOR_DOWN,title:(0,f.localize)(14,null)},group:"2_split",order:20}),l.MenuRegistry.appendMenuItem(l.MenuId.EmptyEditorGroupContext,{command:{id:a.SPLIT_EDITOR_LEFT,title:(0,f.localize)(15,null)},group:"2_split",order:30}),l.MenuRegistry.appendMenuItem(l.MenuId.EmptyEditorGroupContext,{command:{id:a.SPLIT_EDITOR_RIGHT,title:(0,f.localize)(16,null)},group:"2_split",order:40}),l.MenuRegistry.appendMenuItem(l.MenuId.EmptyEditorGroupContext,{command:{id:a.TOGGLE_LOCK_GROUP_COMMAND_ID,title:(0,f.localize)(17,null),toggled:k.ActiveEditorGroupLockedContext},group:"3_lock",order:10,when:k.MultipleEditorGroupsContext}),l.MenuRegistry.appendMenuItem(l.MenuId.EmptyEditorGroupContext,{command:{id:a.CLOSE_EDITOR_GROUP_COMMAND_ID,title:(0,f.localize)(18,null)},group:"4_close",order:10,when:k.MultipleEditorGroupsContext}),l.MenuRegistry.appendMenuItem(l.MenuId.EditorTitleContext,{command:{id:a.CLOSE_EDITOR_COMMAND_ID,title:(0,f.localize)(19,null)},group:"1_close",order:10}),l.MenuRegistry.appendMenuItem(l.MenuId.EditorTitleContext,{command:{id:a.CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID,title:(0,f.localize)(20,null),precondition:k.EditorGroupEditorsCountContext.notEqualsTo("1")},group:"1_close",order:20}),l.MenuRegistry.appendMenuItem(l.MenuId.EditorTitleContext,{command:{id:a.CLOSE_EDITORS_TO_THE_RIGHT_COMMAND_ID,title:(0,f.localize)(21,null),precondition:k.ActiveEditorLastInGroupContext.toNegated()},group:"1_close",order:30,when:k.EditorTabsVisibleContext}),l.MenuRegistry.appendMenuItem(l.MenuId.EditorTitleContext,{command:{id:a.CLOSE_SAVED_EDITORS_COMMAND_ID,title:(0,f.localize)(22,null)},group:"1_close",order:40}),l.MenuRegistry.appendMenuItem(l.MenuId.EditorTitleContext,{command:{id:a.CLOSE_EDITORS_IN_GROUP_COMMAND_ID,title:(0,f.localize)(23,null)},group:"1_close",order:50}),l.MenuRegistry.appendMenuItem(l.MenuId.EditorTitleContext,{command:{id:a.REOPEN_WITH_COMMAND_ID,title:(0,f.localize)(24,null)},group:"1_open",order:10,when:k.ActiveEditorAvailableEditorIdsContext}),l.MenuRegistry.appendMenuItem(l.MenuId.EditorTitleContext,{command:{id:a.KEEP_EDITOR_COMMAND_ID,title:(0,f.localize)(25,null),precondition:k.ActiveEditorPinnedContext.toNegated()},group:"3_preview",order:10,when:g.ContextKeyExpr.has("config.workbench.editor.enablePreview")}),l.MenuRegistry.appendMenuItem(l.MenuId.EditorTitleContext,{command:{id:a.PIN_EDITOR_COMMAND_ID,title:(0,f.localize)(26,null)},group:"3_preview",order:20,when:k.ActiveEditorStickyContext.toNegated()}),l.MenuRegistry.appendMenuItem(l.MenuId.EditorTitleContext,{command:{id:a.UNPIN_EDITOR_COMMAND_ID,title:(0,f.localize)(27,null)},group:"3_preview",order:20,when:k.ActiveEditorStickyContext}),l.MenuRegistry.appendMenuItem(l.MenuId.EditorTitleContext,{command:{id:a.SPLIT_EDITOR_UP,title:(0,f.localize)(28,null)},group:"5_split",order:10}),l.MenuRegistry.appendMenuItem(l.MenuId.EditorTitleContext,{command:{id:a.SPLIT_EDITOR_DOWN,title:(0,f.localize)(29,null)},group:"5_split",order:20}),l.MenuRegistry.appendMenuItem(l.MenuId.EditorTitleContext,{command:{id:a.SPLIT_EDITOR_LEFT,title:(0,f.localize)(30,null)},group:"5_split",order:30}),l.MenuRegistry.appendMenuItem(l.MenuId.EditorTitleContext,{command:{id:a.SPLIT_EDITOR_RIGHT,title:(0,f.localize)(31,null)},group:"5_split",order:40}),l.MenuRegistry.appendMenuItem(l.MenuId.EditorTitleContext,{command:{id:a.SPLIT_EDITOR_IN_GROUP,title:(0,f.localize)(32,null)},group:"6_split_in_group",order:10,when:k.ActiveEditorCanSplitInGroupContext}),l.MenuRegistry.appendMenuItem(l.MenuId.EditorTitleContext,{command:{id:a.JOIN_EDITOR_IN_GROUP,title:(0,f.localize)(33,null)},group:"6_split_in_group",order:10,when:k.SideBySideEditorActiveContext}),l.MenuRegistry.appendMenuItem(l.MenuId.EditorTitle,{command:{id:a.TOGGLE_DIFF_SIDE_BY_SIDE,title:(0,f.localize)(34,null),toggled:g.ContextKeyExpr.equals("config.diffEditor.renderSideBySide",!1)},group:"1_diff",order:10,when:g.ContextKeyExpr.has("isInDiffEditor")}),l.MenuRegistry.appendMenuItem(l.MenuId.EditorTitle,{command:{id:a.SHOW_EDITORS_IN_GROUP,title:(0,f.localize)(35,null)},group:"3_open",order:10}),l.MenuRegistry.appendMenuItem(l.MenuId.EditorTitle,{command:{id:a.CLOSE_EDITORS_IN_GROUP_COMMAND_ID,title:(0,f.localize)(36,null)},group:"5_close",order:10}),l.MenuRegistry.appendMenuItem(l.MenuId.EditorTitle,{command:{id:a.CLOSE_SAVED_EDITORS_COMMAND_ID,title:(0,f.localize)(37,null)},group:"5_close",order:20}),l.MenuRegistry.appendMenuItem(l.MenuId.EditorTitle,{command:{id:a.TOGGLE_KEEP_EDITORS_COMMAND_ID,title:(0,f.localize)(38,null),toggled:g.ContextKeyExpr.not("config.workbench.editor.enablePreview")},group:"7_settings",order:10}),l.MenuRegistry.appendMenuItem(l.MenuId.EditorTitle,{command:{id:a.TOGGLE_LOCK_GROUP_COMMAND_ID,title:(0,f.localize)(39,null),toggled:k.ActiveEditorGroupLockedContext},group:"8_lock",order:10,when:k.MultipleEditorGroupsContext});function K(Y,$,J,ee,te){const se={command:{id:Y.id,title:Y.title,icon:Y.icon,precondition:te},group:"navigation",when:$,order:J};ee&&(se.alt={id:ee.id,title:ee.title,icon:ee.icon}),l.MenuRegistry.appendMenuItem(l.MenuId.EditorTitle,se)}const G=1e5,q=1e6;K({id:u.SplitEditorAction.ID,title:(0,f.localize)(40,null),icon:F.Codicon.splitHorizontal},g.ContextKeyExpr.not("splitEditorsVertically"),G,{id:a.SPLIT_EDITOR_DOWN,title:(0,f.localize)(41,null),icon:F.Codicon.splitVertical}),K({id:u.SplitEditorAction.ID,title:(0,f.localize)(42,null),icon:F.Codicon.splitVertical},g.ContextKeyExpr.has("splitEditorsVertically"),G,{id:a.SPLIT_EDITOR_RIGHT,title:(0,f.localize)(43,null),icon:F.Codicon.splitHorizontal}),K({id:a.TOGGLE_SPLIT_EDITOR_IN_GROUP_LAYOUT,title:(0,f.localize)(44,null),icon:F.Codicon.editorLayout},k.SideBySideEditorActiveContext,G-1),K({id:a.CLOSE_EDITOR_COMMAND_ID,title:(0,f.localize)(45,null),icon:F.Codicon.close},g.ContextKeyExpr.and(k.EditorTabsVisibleContext.toNegated(),k.ActiveEditorDirtyContext.toNegated(),k.ActiveEditorStickyContext.toNegated()),q,{id:a.CLOSE_EDITORS_IN_GROUP_COMMAND_ID,title:(0,f.localize)(46,null),icon:F.Codicon.closeAll}),K({id:a.CLOSE_EDITOR_COMMAND_ID,title:(0,f.localize)(47,null),icon:F.Codicon.closeDirty},g.ContextKeyExpr.and(k.EditorTabsVisibleContext.toNegated(),k.ActiveEditorDirtyContext,k.ActiveEditorStickyContext.toNegated()),q,{id:a.CLOSE_EDITORS_IN_GROUP_COMMAND_ID,title:(0,f.localize)(48,null),icon:F.Codicon.closeAll}),K({id:a.UNPIN_EDITOR_COMMAND_ID,title:(0,f.localize)(49,null),icon:F.Codicon.pinned},g.ContextKeyExpr.and(k.EditorTabsVisibleContext.toNegated(),k.ActiveEditorDirtyContext.toNegated(),k.ActiveEditorStickyContext),q,{id:a.CLOSE_EDITOR_COMMAND_ID,title:(0,f.localize)(50,null),icon:F.Codicon.close}),K({id:a.UNPIN_EDITOR_COMMAND_ID,title:(0,f.localize)(51,null),icon:F.Codicon.pinnedDirty},g.ContextKeyExpr.and(k.EditorTabsVisibleContext.toNegated(),k.ActiveEditorDirtyContext,k.ActiveEditorStickyContext),q,{id:a.CLOSE_EDITOR_COMMAND_ID,title:(0,f.localize)(52,null),icon:F.Codicon.close}),K({id:a.UNLOCK_GROUP_COMMAND_ID,title:(0,f.localize)(53,null),icon:F.Codicon.lock},k.ActiveEditorGroupLockedContext,q-1);const Z=(0,L.registerIcon)("diff-editor-previous-change",F.Codicon.arrowUp,(0,f.localize)(54,null)),j=(0,L.registerIcon)("diff-editor-next-change",F.Codicon.arrowDown,(0,f.localize)(55,null)),X=(0,L.registerIcon)("diff-editor-toggle-whitespace",F.Codicon.whitespace,(0,f.localize)(56,null));K({id:a.GOTO_PREVIOUS_CHANGE,title:(0,f.localize)(57,null),icon:Z},k.TextCompareEditorActiveContext,10),K({id:a.GOTO_NEXT_CHANGE,title:(0,f.localize)(58,null),icon:j},k.TextCompareEditorActiveContext,11),K({id:a.TOGGLE_DIFF_IGNORE_TRIM_WHITESPACE,title:(0,f.localize)(59,null),icon:X},g.ContextKeyExpr.and(k.TextCompareEditorActiveContext,g.ContextKeyExpr.notEquals("config.diffEditor.ignoreTrimWhitespace",!0)),20),K({id:a.TOGGLE_DIFF_IGNORE_TRIM_WHITESPACE,title:(0,f.localize)(60,null),icon:T.ThemeIcon.modify(X,"disabled")},g.ContextKeyExpr.and(k.TextCompareEditorActiveContext,g.ContextKeyExpr.notEquals("config.diffEditor.ignoreTrimWhitespace",!1)),20),l.MenuRegistry.appendMenuItem(l.MenuId.CommandPalette,{command:{id:a.KEEP_EDITOR_COMMAND_ID,title:{value:(0,f.localize)(61,null),original:"Keep Editor"},category:s.CATEGORIES.View},when:g.ContextKeyExpr.has("config.workbench.editor.enablePreview")}),l.MenuRegistry.appendMenuItem(l.MenuId.CommandPalette,{command:{id:a.PIN_EDITOR_COMMAND_ID,title:{value:(0,f.localize)(62,null),original:"Pin Editor"},category:s.CATEGORIES.View}}),l.MenuRegistry.appendMenuItem(l.MenuId.CommandPalette,{command:{id:a.UNPIN_EDITOR_COMMAND_ID,title:{value:(0,f.localize)(63,null),original:"Unpin Editor"},category:s.CATEGORIES.View}}),l.MenuRegistry.appendMenuItem(l.MenuId.CommandPalette,{command:{id:a.CLOSE_EDITOR_COMMAND_ID,title:{value:(0,f.localize)(64,null),original:"Close Editor"},category:s.CATEGORIES.View}}),l.MenuRegistry.appendMenuItem(l.MenuId.CommandPalette,{command:{id:a.CLOSE_PINNED_EDITOR_COMMAND_ID,title:{value:(0,f.localize)(65,null),original:"Close Pinned Editor"},category:s.CATEGORIES.View}}),l.MenuRegistry.appendMenuItem(l.MenuId.CommandPalette,{command:{id:a.CLOSE_EDITORS_IN_GROUP_COMMAND_ID,title:{value:(0,f.localize)(66,null),original:"Close All Editors in Group"},category:s.CATEGORIES.View}}),l.MenuRegistry.appendMenuItem(l.MenuId.CommandPalette,{command:{id:a.CLOSE_SAVED_EDITORS_COMMAND_ID,title:{value:(0,f.localize)(67,null),original:"Close Saved Editors in Group"},category:s.CATEGORIES.View}}),l.MenuRegistry.appendMenuItem(l.MenuId.CommandPalette,{command:{id:a.CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID,title:{value:(0,f.localize)(68,null),original:"Close Other Editors in Group"},category:s.CATEGORIES.View}}),l.MenuRegistry.appendMenuItem(l.MenuId.CommandPalette,{command:{id:a.CLOSE_EDITORS_TO_THE_RIGHT_COMMAND_ID,title:{value:(0,f.localize)(69,null),original:"Close Editors to the Right in Group"},category:s.CATEGORIES.View},when:k.ActiveEditorLastInGroupContext.toNegated()}),l.MenuRegistry.appendMenuItem(l.MenuId.CommandPalette,{command:{id:a.CLOSE_EDITORS_AND_GROUP_COMMAND_ID,title:{value:(0,f.localize)(70,null),original:"Close Editor Group"},category:s.CATEGORIES.View},when:k.MultipleEditorGroupsContext}),l.MenuRegistry.appendMenuItem(l.MenuId.CommandPalette,{command:{id:a.REOPEN_WITH_COMMAND_ID,title:{value:(0,f.localize)(71,null),original:"Reopen Editor With..."},category:s.CATEGORIES.View},when:k.ActiveEditorAvailableEditorIdsContext}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarRecentMenu,{group:"1_editor",command:{id:u.ReopenClosedEditorAction.ID,title:(0,f.localize)(72,null),precondition:g.ContextKeyExpr.has("canReopenClosedEditor")},order:1}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarRecentMenu,{group:"z_clear",command:{id:u.ClearRecentFilesAction.ID,title:(0,f.localize)(73,null)},order:1}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarViewMenu,{group:"2_appearance",title:(0,f.localize)(74,null),submenu:l.MenuId.MenubarLayoutMenu,order:2}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarLayoutMenu,{group:"1_split",command:{id:a.SPLIT_EDITOR_UP,title:{original:"Split Up",value:(0,f.localize)(75,null),mnemonicTitle:(0,f.localize)(76,null)}},order:1}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarLayoutMenu,{group:"1_split",command:{id:a.SPLIT_EDITOR_DOWN,title:{original:"Split Down",value:(0,f.localize)(77,null),mnemonicTitle:(0,f.localize)(78,null)}},order:2}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarLayoutMenu,{group:"1_split",command:{id:a.SPLIT_EDITOR_LEFT,title:{original:"Split Left",value:(0,f.localize)(79,null),mnemonicTitle:(0,f.localize)(80,null)}},order:3}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarLayoutMenu,{group:"1_split",command:{id:a.SPLIT_EDITOR_RIGHT,title:{original:"Split Right",value:(0,f.localize)(81,null),mnemonicTitle:(0,f.localize)(82,null)}},order:4}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarLayoutMenu,{group:"2_split_in_group",command:{id:a.SPLIT_EDITOR_IN_GROUP,title:{original:"Split in Group",value:(0,f.localize)(83,null),mnemonicTitle:(0,f.localize)(84,null)}},when:k.ActiveEditorCanSplitInGroupContext,order:1}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarLayoutMenu,{group:"2_split_in_group",command:{id:a.JOIN_EDITOR_IN_GROUP,title:{original:"Join in Group",value:(0,f.localize)(85,null),mnemonicTitle:(0,f.localize)(86,null)}},when:k.SideBySideEditorActiveContext,order:1}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarLayoutMenu,{group:"3_layouts",command:{id:u.EditorLayoutSingleAction.ID,title:{original:"Single",value:(0,f.localize)(87,null),mnemonicTitle:(0,f.localize)(88,null)}},order:1}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarLayoutMenu,{group:"3_layouts",command:{id:u.EditorLayoutTwoColumnsAction.ID,title:{original:"Two Columns",value:(0,f.localize)(89,null),mnemonicTitle:(0,f.localize)(90,null)}},order:3}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarLayoutMenu,{group:"3_layouts",command:{id:u.EditorLayoutThreeColumnsAction.ID,title:{original:"Three Columns",value:(0,f.localize)(91,null),mnemonicTitle:(0,f.localize)(92,null)}},order:4}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarLayoutMenu,{group:"3_layouts",command:{id:u.EditorLayoutTwoRowsAction.ID,title:{original:"Two Rows",value:(0,f.localize)(93,null),mnemonicTitle:(0,f.localize)(94,null)}},order:5}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarLayoutMenu,{group:"3_layouts",command:{id:u.EditorLayoutThreeRowsAction.ID,title:{original:"Three Rows",value:(0,f.localize)(95,null),mnemonicTitle:(0,f.localize)(96,null)}},order:6}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarLayoutMenu,{group:"3_layouts",command:{id:u.EditorLayoutTwoByTwoGridAction.ID,title:{original:"Grid (2x2)",value:(0,f.localize)(97,null),mnemonicTitle:(0,f.localize)(98,null)}},order:7}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarLayoutMenu,{group:"3_layouts",command:{id:u.EditorLayoutTwoRowsRightAction.ID,title:{original:"Two Rows Right",value:(0,f.localize)(99,null),mnemonicTitle:(0,f.localize)(100,null)}},order:8}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarLayoutMenu,{group:"3_layouts",command:{id:u.EditorLayoutTwoColumnsBottomAction.ID,title:{original:"Two Columns Bottom",value:(0,f.localize)(101,null),mnemonicTitle:(0,f.localize)(102,null)}},order:9}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarGoMenu,{group:"1_history_nav",command:{id:"workbench.action.navigateBack",title:(0,f.localize)(103,null),precondition:g.ContextKeyExpr.has("canNavigateBack")},order:1}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarGoMenu,{group:"1_history_nav",command:{id:"workbench.action.navigateForward",title:(0,f.localize)(104,null),precondition:g.ContextKeyExpr.has("canNavigateForward")},order:2}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarGoMenu,{group:"1_history_nav",command:{id:"workbench.action.navigateToLastEditLocation",title:(0,f.localize)(105,null),precondition:g.ContextKeyExpr.has("canNavigateToLastEditLocation")},order:3}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarSwitchEditorMenu,{group:"1_sideBySide",command:{id:a.FOCUS_FIRST_SIDE_EDITOR,title:(0,f.localize)(106,null)},when:g.ContextKeyExpr.or(k.SideBySideEditorActiveContext,k.TextCompareEditorActiveContext),order:1}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarSwitchEditorMenu,{group:"1_sideBySide",command:{id:a.FOCUS_SECOND_SIDE_EDITOR,title:(0,f.localize)(107,null)},when:g.ContextKeyExpr.or(k.SideBySideEditorActiveContext,k.TextCompareEditorActiveContext),order:2}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarSwitchEditorMenu,{group:"2_any",command:{id:"workbench.action.nextEditor",title:(0,f.localize)(108,null)},order:1}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarSwitchEditorMenu,{group:"2_any",command:{id:"workbench.action.previousEditor",title:(0,f.localize)(109,null)},order:2}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarSwitchEditorMenu,{group:"3_any_used",command:{id:"workbench.action.openNextRecentlyUsedEditor",title:(0,f.localize)(110,null)},order:1}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarSwitchEditorMenu,{group:"3_any_used",command:{id:"workbench.action.openPreviousRecentlyUsedEditor",title:(0,f.localize)(111,null)},order:2}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarSwitchEditorMenu,{group:"4_group",command:{id:"workbench.action.nextEditorInGroup",title:(0,f.localize)(112,null)},order:1}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarSwitchEditorMenu,{group:"4_group",command:{id:"workbench.action.previousEditorInGroup",title:(0,f.localize)(113,null)},order:2}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarSwitchEditorMenu,{group:"5_group_used",command:{id:"workbench.action.openNextRecentlyUsedEditorInGroup",title:(0,f.localize)(114,null)},order:1}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarSwitchEditorMenu,{group:"5_group_used",command:{id:"workbench.action.openPreviousRecentlyUsedEditorInGroup",title:(0,f.localize)(115,null)},order:2}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarGoMenu,{group:"2_editor_nav",title:(0,f.localize)(116,null),submenu:l.MenuId.MenubarSwitchEditorMenu,order:1}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarSwitchGroupMenu,{group:"1_focus_index",command:{id:"workbench.action.focusFirstEditorGroup",title:(0,f.localize)(117,null)},order:1}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarSwitchGroupMenu,{group:"1_focus_index",command:{id:"workbench.action.focusSecondEditorGroup",title:(0,f.localize)(118,null)},order:2}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarSwitchGroupMenu,{group:"1_focus_index",command:{id:"workbench.action.focusThirdEditorGroup",title:(0,f.localize)(119,null),precondition:k.MultipleEditorGroupsContext},order:3}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarSwitchGroupMenu,{group:"1_focus_index",command:{id:"workbench.action.focusFourthEditorGroup",title:(0,f.localize)(120,null),precondition:k.MultipleEditorGroupsContext},order:4}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarSwitchGroupMenu,{group:"1_focus_index",command:{id:"workbench.action.focusFifthEditorGroup",title:(0,f.localize)(121,null),precondition:k.MultipleEditorGroupsContext},order:5}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarSwitchGroupMenu,{group:"2_next_prev",command:{id:"workbench.action.focusNextGroup",title:(0,f.localize)(122,null),precondition:k.MultipleEditorGroupsContext},order:1}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarSwitchGroupMenu,{group:"2_next_prev",command:{id:"workbench.action.focusPreviousGroup",title:(0,f.localize)(123,null),precondition:k.MultipleEditorGroupsContext},order:2}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarSwitchGroupMenu,{group:"3_directional",command:{id:"workbench.action.focusLeftGroup",title:(0,f.localize)(124,null),precondition:k.MultipleEditorGroupsContext},order:1}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarSwitchGroupMenu,{group:"3_directional",command:{id:"workbench.action.focusRightGroup",title:(0,f.localize)(125,null),precondition:k.MultipleEditorGroupsContext},order:2}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarSwitchGroupMenu,{group:"3_directional",command:{id:"workbench.action.focusAboveGroup",title:(0,f.localize)(126,null),precondition:k.MultipleEditorGroupsContext},order:3}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarSwitchGroupMenu,{group:"3_directional",command:{id:"workbench.action.focusBelowGroup",title:(0,f.localize)(127,null),precondition:k.MultipleEditorGroupsContext},order:4}),l.MenuRegistry.appendMenuItem(l.MenuId.MenubarGoMenu,{group:"2_editor_nav",title:(0,f.localize)(128,null),submenu:l.MenuId.MenubarSwitchGroupMenu,order:2})}),define(ne[932],re([1,0,6,2,135,30,11,31,160,206]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UntitledFileWorkingCopy=void 0;let v=class extends f.Disposable{constructor(o,c,i,S,s,l,r,p,u,a){super();this.typeId=o,this.resource=c,this.name=i,this.hasAssociatedFilePath=S,this.initialContents=s,this.modelFactory=l,this.saveDelegate=r,this.workingCopyBackupService=u,this.logService=a,this.capabilities=2,this._model=void 0,this._onDidChangeContent=this._register(new t.Emitter),this.onDidChangeContent=this._onDidChangeContent.event,this._onDidChangeDirty=this._register(new t.Emitter),this.onDidChangeDirty=this._onDidChangeDirty.event,this._onDidSave=this._register(new t.Emitter),this.onDidSave=this._onDidSave.event,this._onDidRevert=this._register(new t.Emitter),this.onDidRevert=this._onDidRevert.event,this._onWillDispose=this._register(new t.Emitter),this.onWillDispose=this._onWillDispose.event,this.dirty=this.hasAssociatedFilePath||Boolean(this.initialContents&&this.initialContents.markDirty!==!1),this._register(p.registerWorkingCopy(this))}get model(){return this._model}isDirty(){return this.dirty}setDirty(o){this.dirty!==o&&(this.dirty=o,this._onDidChangeDirty.fire())}async resolve(){if(this.trace("[untitled file working copy] resolve()"),this.isResolved()){this.trace("[untitled file working copy] resolve() - exit (already resolved)");return}let o;const c=await this.workingCopyBackupService.resolve(this);c?(this.trace("[untitled file working copy] resolve() - with backup"),o=c.value):this.initialContents?.value?(this.trace("[untitled file working copy] resolve() - with initial contents"),o=this.initialContents.value):(this.trace("[untitled file working copy] resolve() - empty"),o=(0,w.emptyStream)()),await this.doCreateModel(o),this.setDirty(this.hasAssociatedFilePath||!!c||Boolean(this.initialContents&&this.initialContents.markDirty!==!1)),(!!c||this.initialContents)&&this._onDidChangeContent.fire()}async doCreateModel(o){this.trace("[untitled file working copy] doCreateModel()"),this._model=this._register(await this.modelFactory.createModel(this.resource,o,A.CancellationToken.None)),this.installModelListeners(this._model)}installModelListeners(o){this._register(o.onDidChangeContent(c=>this.onModelContentChanged(c))),this._register(o.onWillDispose(()=>this.dispose()))}onModelContentChanged(o){!this.hasAssociatedFilePath&&o.isInitial?this.setDirty(!1):this.setDirty(!0),this._onDidChangeContent.fire()}isResolved(){return!!this.model}async backup(o){let c;return this.isResolved()?c=await(0,k.raceCancellation)(this.model.snapshot(o),o):this.initialContents&&(c=this.initialContents.value),{content:c}}async save(o){this.trace("[untitled file working copy] save()");const c=await this.saveDelegate(this,o);return c&&this._onDidSave.fire({reason:o?.reason,source:o?.source}),c}async revert(){this.trace("[untitled file working copy] revert()"),this.setDirty(!1),this._onDidRevert.fire(),this.dispose()}dispose(){this.trace("[untitled file working copy] dispose()"),this._onWillDispose.fire(),super.dispose()}trace(o){this.logService.trace(o,this.resource.toString(),this.typeId)}};v=Ee([W(7,_.IWorkingCopyService),W(8,I.IWorkingCopyBackupService),W(9,D.ILogService)],v),e.UntitledFileWorkingCopy=v}),define(ne[2719],re([1,0,2,9,932,6,18,135,45,31,160,23,925,55]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UntitledFileWorkingCopyManager=void 0;let i=class extends o.BaseFileWorkingCopyManager{constructor(s,l,r,p,u,a,n,h){super(p,a,n);this.workingCopyTypeId=s,this.modelFactory=l,this.saveDelegate=r,this.labelService=u,this.workingCopyService=h,this._onDidChangeDirty=this._register(new A.Emitter),this.onDidChangeDirty=this._onDidChangeDirty.event,this._onWillDispose=this._register(new A.Emitter),this.onWillDispose=this._onWillDispose.event,this.mapResourceToWorkingCopyListeners=new c.ResourceMap}async resolve(s){const l=this.doCreateOrGet(s);return await l.resolve(),l}doCreateOrGet(s=Object.create(null)){const l=this.massageOptions(s);if(l.untitledResource){const r=this.get(l.untitledResource);if(r)return r}return this.doCreate(l)}massageOptions(s){const l=Object.create(null);return s.associatedResource?(l.untitledResource=f.URI.from({scheme:k.Schemas.untitled,authority:s.associatedResource.authority,fragment:s.associatedResource.fragment,path:s.associatedResource.path,query:s.associatedResource.query}),l.associatedResource=s.associatedResource):s.untitledResource?.scheme===k.Schemas.untitled&&(l.untitledResource=s.untitledResource),l.contents=s.contents,l}doCreate(s){let l=s.untitledResource;if(!l){let p=1;do l=f.URI.from({scheme:k.Schemas.untitled,path:`Untitled-${p}`,query:this.workingCopyTypeId?`typeId=${this.workingCopyTypeId}`:void 0}),p++;while(this.has(l))}const r=new _.UntitledFileWorkingCopy(this.workingCopyTypeId,l,this.labelService.getUriBasenameLabel(l),!!s.associatedResource,s.contents,this.modelFactory,this.saveDelegate,this.workingCopyService,this.workingCopyBackupService,this.logService);return this.registerWorkingCopy(r),r}registerWorkingCopy(s){const l=new t.DisposableStore;l.add(s.onDidChangeDirty(()=>this._onDidChangeDirty.fire(s))),l.add(s.onWillDispose(()=>this._onWillDispose.fire(s))),this.mapResourceToWorkingCopyListeners.set(s.resource,l),this.add(s.resource,s),s.isDirty()&&this._onDidChangeDirty.fire(s)}remove(s){const l=super.remove(s),r=this.mapResourceToWorkingCopyListeners.get(s);return r&&((0,t.dispose)(r),this.mapResourceToWorkingCopyListeners.delete(s)),l}dispose(){super.dispose(),(0,t.dispose)(this.mapResourceToWorkingCopyListeners.values()),this.mapResourceToWorkingCopyListeners.clear()}};i=Ee([W(3,C.IFileService),W(4,I.ILabelService),W(5,w.ILogService),W(6,v.IWorkingCopyBackupService),W(7,D.IWorkingCopyService)],i),e.UntitledFileWorkingCopyManager=i}),define(ne[221],re([1,0,5,35,6,11,15,2,23,30,135,56,2683,2679]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkingCopyFileService=e.IWorkingCopyFileService=void 0,e.IWorkingCopyFileService=(0,t.createDecorator)("workingCopyFileService");let i=class extends D.Disposable{constructor(s,l,r,p){super();this.fileService=s,this.workingCopyService=l,this.instantiationService=r,this.uriIdentityService=p,this._onWillRunWorkingCopyFileOperation=this._register(new _.AsyncEmitter),this.onWillRunWorkingCopyFileOperation=this._onWillRunWorkingCopyFileOperation.event,this._onDidFailWorkingCopyFileOperation=this._register(new _.AsyncEmitter),this.onDidFailWorkingCopyFileOperation=this._onDidFailWorkingCopyFileOperation.event,this._onDidRunWorkingCopyFileOperation=this._register(new _.AsyncEmitter),this.onDidRunWorkingCopyFileOperation=this._onDidRunWorkingCopyFileOperation.event,this.correlationIds=0,this.fileOperationParticipants=this._register(this.instantiationService.createInstance(o.WorkingCopyFileOperationParticipant)),this.saveParticipants=this._register(this.instantiationService.createInstance(c.StoredFileWorkingCopySaveParticipant)),this.workingCopyProviders=[],this._register(this.registerWorkingCopyProvider(u=>this.workingCopyService.workingCopies.filter(a=>this.fileService.hasProvider(u)?this.uriIdentityService.extUri.isEqualOrParent(a.resource,u):this.uriIdentityService.extUri.isEqual(a.resource,u))))}create(s,l,r){return this.doCreateFileOrFolder(s,!0,l,r)}createFolder(s,l,r){return this.doCreateFileOrFolder(s,!1,l,r)}async doCreateFileOrFolder(s,l,r,p){if(s.length===0)return[];if(l){const g=(await A.Promises.settled(s.map(d=>this.fileService.canCreateFile(d.resource,{overwrite:d.overwrite})))).find(d=>d instanceof Error);if(g instanceof Error)throw g}const u=s.map(h=>({target:h.resource}));await this.runFileOperationParticipants(u,0,p,r);const a={correlationId:this.correlationIds++,operation:0,files:u};await this._onWillRunWorkingCopyFileOperation.fireAsync(a,w.CancellationToken.None);let n;try{l?n=await A.Promises.settled(s.map(h=>this.fileService.createFile(h.resource,h.contents,{overwrite:h.overwrite}))):n=await A.Promises.settled(s.map(h=>this.fileService.createFolder(h.resource)))}catch(h){throw await this._onDidFailWorkingCopyFileOperation.fireAsync(a,w.CancellationToken.None),h}return await this._onDidRunWorkingCopyFileOperation.fireAsync(a,w.CancellationToken.None),n}async move(s,l,r){return this.doMoveOrCopy(s,!0,l,r)}async copy(s,l,r){return this.doMoveOrCopy(s,!1,l,r)}async doMoveOrCopy(s,l,r,p){const u=[];for(const{file:{source:h,target:g},overwrite:d}of s){const m=await(l?this.fileService.canMove(h,g,d):this.fileService.canCopy(h,g,d));if(m instanceof Error)throw m}const a=s.map(h=>h.file);await this.runFileOperationParticipants(a,l?2:3,p,r);const n={correlationId:this.correlationIds++,operation:l?2:3,files:a};await this._onWillRunWorkingCopyFileOperation.fireAsync(n,w.CancellationToken.None);try{for(const{file:{source:h,target:g},overwrite:d}of s){if(!this.uriIdentityService.extUri.isEqual(h,g)){const m=l?[...this.getDirty(h),...this.getDirty(g)]:this.getDirty(g);await A.Promises.settled(m.map(b=>b.revert({soft:!0})))}l?u.push(await this.fileService.move(h,g,d)):u.push(await this.fileService.copy(h,g,d))}}catch(h){throw await this._onDidFailWorkingCopyFileOperation.fireAsync(n,w.CancellationToken.None),h}return await this._onDidRunWorkingCopyFileOperation.fireAsync(n,w.CancellationToken.None),u}async delete(s,l,r){for(const a of s){const n=await this.fileService.canDelete(a.resource,{recursive:a.recursive,useTrash:a.useTrash});if(n instanceof Error)throw n}const p=s.map(a=>({target:a.resource}));await this.runFileOperationParticipants(p,1,r,l);const u={correlationId:this.correlationIds++,operation:1,files:p};await this._onWillRunWorkingCopyFileOperation.fireAsync(u,w.CancellationToken.None);for(const a of s){const n=this.getDirty(a.resource);await A.Promises.settled(n.map(h=>h.revert({soft:!0})))}try{for(const a of s)await this.fileService.del(a.resource,{recursive:a.recursive,useTrash:a.useTrash})}catch(a){throw await this._onDidFailWorkingCopyFileOperation.fireAsync(u,w.CancellationToken.None),a}await this._onDidRunWorkingCopyFileOperation.fireAsync(u,w.CancellationToken.None)}addFileOperationParticipant(s){return this.fileOperationParticipants.addFileOperationParticipant(s)}runFileOperationParticipants(s,l,r,p){return this.fileOperationParticipants.participate(s,l,r,p)}get hasSaveParticipants(){return this.saveParticipants.length>0}addSaveParticipant(s){return this.saveParticipants.addSaveParticipant(s)}runSaveParticipants(s,l,r){return this.saveParticipants.participate(s,l,r)}registerWorkingCopyProvider(s){const l=(0,k.insert)(this.workingCopyProviders,s);return(0,D.toDisposable)(l)}getDirty(s){const l=new Set;for(const r of this.workingCopyProviders)for(const p of r(s))p.isDirty()&&l.add(p);return Array.from(l)}};i=Ee([W(0,I.IFileService),W(1,v.IWorkingCopyService),W(2,t.IInstantiationService),W(3,C.IUriIdentityService)],i),e.WorkingCopyFileService=i,(0,f.registerSingleton)(e.IWorkingCopyFileService,i,!0)}),define(ne[2720],re([1,0,10,11,30,22,6,2,18,48,19,9,1355,54,23,5,45,147,422,65,253,437,364,2582,333,59,50,40,101,221,135,336,923]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadCustomEditors=void 0;var x;(function(N){N[N.Custom=0]="Custom",N[N.Text=1]="Text"})(x||(x={}));let F=class extends D.Disposable{constructor(B,P,V,z,U,H,K,G,q,Z){super();this.mainThreadWebview=P,this.mainThreadWebviewPanels=V,this._customEditorService=K,this._editorGroupService=G,this._webviewWorkbenchService=q,this._instantiationService=Z,this._editorProviders=new Map,this._editorRenameBackups=new Map,this._proxyCustomEditors=B.getProxy(p.ExtHostContext.ExtHostCustomEditors),this._register(H.registerWorkingCopyProvider(j=>{const X=[];for(const Y of U.workingCopies)Y instanceof M&&(0,v.isEqualOrParent)(j,Y.editorResource)&&X.push(Y);return X})),this._register(q.registerResolver({canResolve:j=>(j instanceof a.CustomEditorInput&&z.activateByEvent(`onCustomEditor:${j.viewType}`),!1),resolveWebview:()=>{throw new Error("not implemented")}})),this._register(H.onWillRunWorkingCopyFileOperation(async j=>this.onWillRunWorkingCopyFileOperation(j)))}dispose(){super.dispose(),(0,D.dispose)(this._editorProviders.values()),this._editorProviders.clear()}$registerTextEditorProvider(B,P,V,z,U){this.registerEditorProvider(1,(0,r.reviveWebviewExtension)(B),P,V,z,!0,U)}$registerCustomEditorProvider(B,P,V,z,U){this.registerEditorProvider(0,(0,r.reviveWebviewExtension)(B),P,V,{},z,U)}registerEditorProvider(B,P,V,z,U,H,K){if(this._editorProviders.has(V))throw new Error(`Provider for ${V} already registered`);const G=new D.DisposableStore;G.add(this._customEditorService.registerCustomEditorCapabilities(V,{supportsMultipleEditorsPerDocument:H})),G.add(this._webviewWorkbenchService.registerResolver({canResolve:q=>q instanceof a.CustomEditorInput&&q.viewType===V,resolveWebview:async(q,Z)=>{const j=q.id,X=q.resource;this.mainThreadWebviewPanels.addWebviewInput(j,q,{serializeBuffersForPostMessage:K}),q.webview.options=z,q.webview.extension=P;let Y=q.backupId;q.oldResource&&!q.backupId&&(Y=this._editorRenameBackups.get(q.oldResource.toString())?.backupId,this._editorRenameBackups.delete(q.oldResource.toString()));let $;try{$=await this.getOrCreateCustomEditorModel(B,X,V,{backupId:Y},Z)}catch(J){(0,A.onUnexpectedError)(J),q.webview.html=this.mainThreadWebview.getWebviewResolvedFailedContent(V);return}if(Z.isCancellationRequested){$.dispose();return}q.webview.onDidDispose(()=>{if($.object.isDirty()){const J=$.object.onDidChangeDirty(()=>{$.object.isDirty()||(J.dispose(),$.dispose())});return}$.dispose()}),U.supportsMove&&q.onMove(async J=>{const ee=$;$=await this.getOrCreateCustomEditorModel(B,J,V,{},_.CancellationToken.None),this._proxyCustomEditors.$onMoveCustomEditor(j,J,V),ee.dispose()});try{await this._proxyCustomEditors.$resolveWebviewEditor(X,j,V,{title:q.getTitle(),webviewOptions:q.webview.contentOptions,panelOptions:q.webview.options},(0,u.editorGroupToColumn)(this._editorGroupService,q.group||0),Z)}catch(J){(0,A.onUnexpectedError)(J),q.webview.html=this.mainThreadWebview.getWebviewResolvedFailedContent(V),$.dispose();return}}})),this._editorProviders.set(V,G)}$unregisterEditorProvider(B){const P=this._editorProviders.get(B);if(!P)throw new Error(`No provider for ${B} registered`);P.dispose(),this._editorProviders.delete(B),this._customEditorService.models.disposeAllModelsForView(B)}async getOrCreateCustomEditorModel(B,P,V,z,U){const H=this._customEditorService.models.tryRetain(P,V);if(H)return H;switch(B){case 1:{const K=h.CustomTextEditorModel.create(this._instantiationService,V,P);return this._customEditorService.models.add(P,V,K)}case 0:{const K=M.create(this._instantiationService,this._proxyCustomEditors,V,P,z,()=>Array.from(this.mainThreadWebviewPanels.webviewInputs).filter(G=>G instanceof a.CustomEditorInput&&(0,v.isEqual)(G.resource,P)),U);return this._customEditorService.models.add(P,V,K)}}}async $onDidEdit(B,P,V,z){(await this.getCustomEditorModel(B,P)).pushEdit(V,z)}async $onContentChange(B,P){(await this.getCustomEditorModel(B,P)).changeContent()}async getCustomEditorModel(B,P){const V=C.URI.revive(B),z=await this._customEditorService.models.get(V,P);if(!z||!(z instanceof M))throw new Error("Could not find model for webview editor");return z}async onWillRunWorkingCopyFileOperation(B){B.operation===2&&B.waitUntil((async()=>{const P=[];for(const V of B.files)V.source&&P.push(...await this._customEditorService.models.getAllModels(V.source));for(const V of P)if(V instanceof M&&V.isDirty()){const z=await V.backup(_.CancellationToken.None);z.meta&&this._editorRenameBackups.set(V.editorResource.toString(),z.meta)}})())}};F=Ee([W(3,b.IExtensionService),W(4,T.IWorkingCopyService),W(5,y.IWorkingCopyFileService),W(6,n.ICustomEditorService),W(7,d.IEditorGroupsService),W(8,g.IWebviewWorkbenchService),W(9,S.IInstantiationService)],F),e.MainThreadCustomEditors=F;var L;(function(N){let B;(function(V){V[V.Allowed=0]="Allowed",V[V.NotAllowed=1]="NotAllowed",V[V.Pending=2]="Pending"})(B=N.Type||(N.Type={})),N.Allowed=Object.freeze({type:0}),N.NotAllowed=Object.freeze({type:1});class P{constructor(z){this.operation=z,this.type=2}}N.Pending=P})(L||(L={}));let M=class cs extends O.ResourceWorkingCopy{constructor(B,P,V,z,U,H,K,G,q,Z,j,X,Y,$){super(cs.toWorkingCopyResource(P,V),q);this._proxy=B,this._viewType=P,this._editorResource=V,this._editable=U,this._getEditors=K,this._fileDialogService=G,this._labelService=Z,this._undoService=j,this._environmentService=X,this._pathService=$,this._fromBackup=!1,this._hotExitState=L.Allowed,this._currentEditIndex=-1,this._savePoint=-1,this._edits=[],this._isDirtyFromContentChange=!1,this.typeId=R.NO_TYPE_ID,this._onDidChangeDirty=this._register(new k.Emitter),this.onDidChangeDirty=this._onDidChangeDirty.event,this._onDidChangeContent=this._register(new k.Emitter),this.onDidChangeContent=this._onDidChangeContent.event,this._onDidSave=this._register(new k.Emitter),this.onDidSave=this._onDidSave.event,this.onDidChangeReadonly=k.Event.None,this._fromBackup=z,U&&this._register(Y.registerWorkingCopy(this)),H&&(this._isDirtyFromContentChange=!0)}static async create(B,P,V,z,U,H,K){const G=H();let q;G.length!==0&&(q=G[0].untitledDocumentData);const{editable:Z}=await P.$createCustomDocument(z,V,U.backupId,q,K);return B.createInstance(cs,P,V,z,!!U.backupId,Z,!!q,H)}get editorResource(){return this._editorResource}dispose(){this._editable&&this._undoService.removeElements(this._editorResource),this._proxy.$disposeCustomDocument(this._editorResource,this._viewType),super.dispose()}static toWorkingCopyResource(B,P){const V=B.replace(/[^a-z0-9\-_]/gi,"-"),z=`/${(0,t.multibyteAwareBtoa)(P.with({query:null,fragment:null}).toString(!0))}`;return C.URI.from({scheme:I.Schemas.vscodeCustomEditor,authority:V,path:z,query:JSON.stringify(P.toJSON())})}get name(){return(0,w.basename)(this._labelService.getUriLabel(this._editorResource))}get capabilities(){return this.isUntitled()?2:0}isDirty(){return this._isDirtyFromContentChange?!0:this._edits.length>0?this._savePoint!==this._currentEditIndex:this._fromBackup}isUntitled(){return this._editorResource.scheme===I.Schemas.untitled}isReadonly(){return!this._editable}get viewType(){return this._viewType}get backupId(){return this._backupId}pushEdit(B,P){if(!this._editable)throw new Error("Document is not editable");this.change(()=>{this.spliceEdits(B),this._currentEditIndex=this._edits.length-1}),this._undoService.pushElement({type:0,resource:this._editorResource,label:P??(0,o.localize)(0,null),code:"undoredo.customEditorEdit",undo:()=>this.undo(),redo:()=>this.redo()})}changeContent(){this.change(()=>{this._isDirtyFromContentChange=!0})}async undo(){if(!this._editable||this._currentEditIndex<0)return;const B=this._edits[this._currentEditIndex];this.change(()=>{--this._currentEditIndex}),await this._proxy.$undo(this._editorResource,this.viewType,B,this.isDirty())}async redo(){if(!this._editable||this._currentEditIndex>=this._edits.length-1)return;const B=this._edits[this._currentEditIndex+1];this.change(()=>{++this._currentEditIndex}),await this._proxy.$redo(this._editorResource,this.viewType,B,this.isDirty())}spliceEdits(B){const P=this._currentEditIndex+1,V=this._edits.length-this._currentEditIndex,z=typeof B=="number"?this._edits.splice(P,V,B):this._edits.splice(P,V);z.length&&this._proxy.$disposeEdits(this._editorResource,this._viewType,z)}change(B){const P=this.isDirty();B(),this._onDidChangeContent.fire(),this.isDirty()!==P&&this._onDidChangeDirty.fire()}async revert(B){!this._editable||this._currentEditIndex===this._savePoint&&!this._isDirtyFromContentChange&&!this._fromBackup||(B?.soft||this._proxy.$revert(this._editorResource,this.viewType,_.CancellationToken.None),this.change(()=>{this._isDirtyFromContentChange=!1,this._fromBackup=!1,this._currentEditIndex=this._savePoint,this.spliceEdits()}))}async save(B){const P=!!await this.saveCustomEditor(B);return P&&this._onDidSave.fire({reason:B?.reason,source:B?.source}),P}async saveCustomEditor(B){if(!this._editable)return;if(this.isUntitled()){const V=await this.suggestUntitledSavePath(B);return V?(await this.saveCustomEditorAs(this._editorResource,V,B),V):void 0}const P=(0,f.createCancelablePromise)(V=>this._proxy.$onSave(this._editorResource,this.viewType,V));this._ongoingSave?.cancel(),this._ongoingSave=P;try{await P,this._ongoingSave===P&&this.change(()=>{this._isDirtyFromContentChange=!1,this._savePoint=this._currentEditIndex,this._fromBackup=!1})}finally{this._ongoingSave===P&&(this._ongoingSave=void 0)}return this._editorResource}suggestUntitledSavePath(B){if(!this.isUntitled())throw new Error("Resource is not untitled");const P=this._environmentService.remoteAuthority,V=(0,v.toLocalResource)(this._editorResource,P,this._pathService.defaultUriScheme);return this._fileDialogService.pickFileToSave(V,B?.availableFileSystems)}async saveCustomEditorAs(B,P,V){return this._editable?(await(0,f.createCancelablePromise)(z=>this._proxy.$onSaveAs(this._editorResource,this.viewType,P,z)),this.change(()=>{this._savePoint=this._currentEditIndex}),!0):(await this.fileService.copy(B,P,!1),!0)}async backup(B){const P=this._getEditors();if(!P.length)throw new Error("No editors found for resource, cannot back up");const V=P[0],U={meta:{viewType:this.viewType,editorResource:this._editorResource,backupId:"",extension:V.extension?{id:V.extension.id.value,location:V.extension.location}:void 0,webview:{id:V.id,options:V.webview.options,state:V.webview.state}}};if(!this._editable)return U;this._hotExitState.type===2&&this._hotExitState.operation.cancel();const H=new L.Pending((0,f.createCancelablePromise)(G=>this._proxy.$backup(this._editorResource.toJSON(),this.viewType,G)));this._hotExitState=H,B.onCancellationRequested(()=>{H.operation.cancel()});let K="";try{const G=await H.operation;this._hotExitState===H&&(this._hotExitState=L.Allowed,U.meta.backupId=G,this._backupId=G)}catch(G){if((0,A.isCancellationError)(G))throw G;this._hotExitState===H&&(this._hotExitState=L.NotAllowed),G.message&&(K=G.message)}if(this._hotExitState===L.Allowed)return U;throw new Error(`Cannot back up in this state: ${K}`)}};M=Ee([W(7,c.IFileDialogService),W(8,i.IFileService),W(9,s.ILabelService),W(10,l.IUndoRedoService),W(11,m.IWorkbenchEnvironmentService),W(12,T.IWorkingCopyService),W(13,E.IPathService)],M)}),define(ne[640],re([1,0,130,2,18,9,122,52,61,23,65,83,50,19,221,56,6,101,55]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadDocuments=e.BoundModelReferenceCollection=void 0;class p{constructor(h,g=1e3*60*3,d=1024*1024*80,m=50){this._extUri=h,this._maxAge=g,this._maxLength=d,this._maxSize=m,this._data=new Array,this._length=0}dispose(){this._data=(0,f.dispose)(this._data)}remove(h){for(const g of[...this._data])this._extUri.isEqualOrParent(g.uri,h)&&g.dispose()}add(h,g,d=0){let m,b;const E=()=>{const y=this._data.indexOf(b);y>=0&&(this._length-=d,g.dispose(),clearTimeout(m),this._data.splice(y,1))};m=setTimeout(E,this._maxAge),b={uri:h,length:d,dispose:E},this._data.push(b),this._length+=d,this._cleanup()}_cleanup(){for(;this._length>this._maxLength;)this._data[0].dispose();const h=Math.ceil(this._maxSize*1.2);this._data.length>=h&&(0,f.dispose)(this._data.slice(0,h-this._maxSize))}}e.BoundModelReferenceCollection=p;class u extends f.Disposable{constructor(h,g,d,m){super();this._model=h,this._onIsCaughtUpWithContentChanges=g,this._proxy=d,this._textFileService=m,this._knownVersionId=this._model.getVersionId(),this._store.add(this._model.onDidChangeContent(b=>{this._knownVersionId=b.versionId,this._proxy.$acceptModelChanged(this._model.uri,b,this._textFileService.isDirty(this._model.uri)),this.isCaughtUpWithContentChanges()&&this._onIsCaughtUpWithContentChanges.fire(this._model.uri)}))}isCaughtUpWithContentChanges(){return this._model.getVersionId()===this._knownVersionId}}let a=class extends f.Disposable{constructor(h,g,d,m,b,E,y,T,R){super();this._modelService=g,this._textFileService=d,this._fileService=m,this._textModelResolverService=b,this._environmentService=E,this._uriIdentityService=y,this._pathService=R,this._onIsCaughtUpWithContentChanges=this._store.add(new s.Emitter),this.onIsCaughtUpWithContentChanges=this._onIsCaughtUpWithContentChanges.event,this._modelTrackers=new r.ResourceMap,this._modelReferenceCollection=this._store.add(new p(y.extUri)),this._proxy=h.getProxy(v.ExtHostContext.ExtHostDocuments),this._store.add(g.onModelLanguageChanged(this._onModelModeChanged,this)),this._store.add(d.files.onDidSave(O=>{this._shouldHandleFileEvent(O.model.resource)&&this._proxy.$acceptModelSaved(O.model.resource)})),this._store.add(d.files.onDidChangeDirty(O=>{this._shouldHandleFileEvent(O.resource)&&this._proxy.$acceptDirtyStateChanged(O.resource,O.isDirty())})),this._store.add(T.onDidRunWorkingCopyFileOperation(O=>{const x=O.operation===2;if(x||O.operation===1)for(const F of O.files){const L=x?F.source:F.target;L&&this._modelReferenceCollection.remove(L)}}))}dispose(){(0,f.dispose)(this._modelTrackers.values()),this._modelTrackers.clear(),super.dispose()}isCaughtUpWithContentChanges(h){const g=this._modelTrackers.get(h);return g?g.isCaughtUpWithContentChanges():!0}_shouldHandleFileEvent(h){const g=this._modelService.getModel(h);return!!g&&(0,k.shouldSynchronizeModel)(g)}handleModelAdded(h){!(0,k.shouldSynchronizeModel)(h)||this._modelTrackers.set(h.uri,new u(h,this._onIsCaughtUpWithContentChanges,this._proxy,this._textFileService))}_onModelModeChanged(h){let{model:g}=h;!this._modelTrackers.has(g.uri)||this._proxy.$acceptModelLanguageChanged(g.uri,g.getLanguageId())}handleModelRemoved(h){!this._modelTrackers.has(h)||(this._modelTrackers.get(h).dispose(),this._modelTrackers.delete(h))}async $trySaveDocument(h){const g=await this._textFileService.save(A.URI.revive(h));return Boolean(g)}async $tryOpenDocument(h){const g=A.URI.revive(h);if(!g.scheme||!(g.fsPath||g.authority))throw new Error("Invalid uri. Scheme and authority or path must be set.");const d=this._uriIdentityService.asCanonicalUri(g);let m;switch(d.scheme){case _.Schemas.untitled:m=this._handleUntitledScheme(d);break;case _.Schemas.file:default:m=this._handleAsResourceInput(d);break}let b;try{b=await m}catch(E){throw new Error(`cannot open ${d.toString()}. Detail: ${(0,t.toErrorMessage)(E)}`)}if(b)if(c.extUri.isEqual(b,d)){if(this._modelTrackers.has(d))return d;throw new Error(`cannot open ${d.toString()}. Detail: Files above 50MB cannot be synchronized with extensions.`)}else throw new Error(`cannot open ${d.toString()}. Detail: Actual document opened as ${b.toString()}`);else throw new Error(`cannot open ${d.toString()}`)}$tryCreateDocument(h){return this._doCreateUntitled(void 0,h?h.language:void 0,h?h.content:void 0)}async _handleAsResourceInput(h){const g=await this._textModelResolverService.createModelReference(h);return this._modelReferenceCollection.add(h,g,g.object.textEditorModel.getValueLength()),g.object.textEditorModel.uri}async _handleUntitledScheme(h){const g=(0,c.toLocalResource)(h,this._environmentService.remoteAuthority,this._pathService.defaultUriScheme);return await this._fileService.exists(g)?Promise.reject(new Error("file already exists")):await this._doCreateUntitled(Boolean(h.path)?h:void 0)}async _doCreateUntitled(h,g,d){const b=(await this._textFileService.untitled.resolve({associatedResource:h,languageId:g,initialValue:d})).resource;if(!this._modelTrackers.has(b))throw new Error(`expected URI ${b.toString()} to have come to LIFE`);return this._proxy.$acceptDirtyStateChanged(b,!0),b}};a=Ee([W(1,D.IModelService),W(2,C.ITextFileService),W(3,w.IFileService),W(4,I.ITextModelService),W(5,o.IWorkbenchEnvironmentService),W(6,S.IUriIdentityService),W(7,i.IWorkingCopyFileService),W(8,l.IPathService)],a),e.MainThreadDocuments=a}),define(ne[2721],re([1,0,2,55,9,640,64,415,56,65,359,331]),function(Q,e,t,f,_,A,k,D,I,w,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadNotebookDocuments=void 0;let o=class{constructor(i,S,s){this._notebookEditorModelResolverService=S,this._uriIdentityService=s,this._disposables=new t.DisposableStore,this._documentEventListenersMapping=new f.ResourceMap,this._proxy=i.getProxy(w.ExtHostContext.ExtHostNotebookDocuments),this._modelReferenceCollection=new A.BoundModelReferenceCollection(this._uriIdentityService.extUri),this._disposables.add(this._notebookEditorModelResolverService.onDidChangeDirty(l=>this._proxy.$acceptDirtyStateChanged(l.resource,l.isDirty()))),this._disposables.add(this._notebookEditorModelResolverService.onDidSaveNotebook(l=>this._proxy.$acceptModelSaved(l)))}dispose(){this._disposables.dispose(),this._modelReferenceCollection.dispose(),(0,t.dispose)(this._documentEventListenersMapping.values())}handleNotebooksAdded(i){for(const S of i){const s=new t.DisposableStore;s.add(S.onDidChangeContent(l=>{const r={versionId:l.versionId,rawEvents:[]};for(const u of l.rawEvents)switch(u.kind){case k.NotebookCellsChangeType.ModelChange:r.rawEvents.push({kind:u.kind,changes:u.changes.map(a=>[a[0],a[1],a[2].map(n=>v.NotebookDto.toNotebookCellDto(n))])});break;case k.NotebookCellsChangeType.Move:r.rawEvents.push({kind:u.kind,index:u.index,length:u.length,newIdx:u.newIdx});break;case k.NotebookCellsChangeType.Output:r.rawEvents.push({kind:u.kind,index:u.index,outputs:u.outputs.map(v.NotebookDto.toNotebookOutputDto)});break;case k.NotebookCellsChangeType.OutputItem:r.rawEvents.push({kind:u.kind,index:u.index,outputId:u.outputId,outputItems:u.outputItems.map(v.NotebookDto.toNotebookOutputItemDto),append:u.append});break;case k.NotebookCellsChangeType.ChangeLanguage:case k.NotebookCellsChangeType.ChangeCellContent:case k.NotebookCellsChangeType.ChangeCellMetadata:case k.NotebookCellsChangeType.ChangeCellInternalMetadata:r.rawEvents.push(u);break}const p=l.rawEvents.find(u=>u.kind===k.NotebookCellsChangeType.ChangeDocumentMetadata);this._proxy.$acceptModelChanged(S.uri,new C.SerializableObjectWithBuffers(r),this._notebookEditorModelResolverService.isDirty(S.uri),p?S.metadata:void 0),p&&this._proxy.$acceptDocumentPropertiesChanged(S.uri,{metadata:S.metadata})})),this._documentEventListenersMapping.set(S.uri,s)}}handleNotebooksRemoved(i){for(const S of i)this._documentEventListenersMapping.get(S)?.dispose(),this._documentEventListenersMapping.delete(S)}async $tryCreateNotebook(i){const S=await this._notebookEditorModelResolverService.resolve({untitledResource:void 0},i.viewType);if(S.object.notebook.onWillDispose(()=>{S.dispose()}),this._proxy.$acceptDirtyStateChanged(S.object.resource,!0),i.content){const s=v.NotebookDto.fromNotebookDataDto(i.content);S.object.notebook.reset(s.cells,s.metadata,S.object.notebook.transientOptions)}return S.object.resource}async $tryOpenNotebook(i){const S=_.URI.revive(i),s=await this._notebookEditorModelResolverService.resolve(S,void 0);return this._modelReferenceCollection.add(S,s),S}async $trySaveNotebook(i){const S=_.URI.revive(i),s=await this._notebookEditorModelResolverService.resolve(S),l=await s.object.save();return s.dispose(),l}};o=Ee([W(1,D.INotebookEditorModelResolverService),W(2,I.IUriIdentityService)],o),e.MainThreadNotebookDocuments=o}),define(ne[2722],re([1,0,143,2,5,2721,359,2350,75,253,104,290,142,59,21,65,331]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s){"use strict";var l;Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadNotebooksAndEditors=void 0;class r{constructor(a,n,h,g){this.documents=a,this.textEditors=n,this.activeEditor=h,this.visibleEditors=g}static delta(a,n){if(!a)return{addedDocuments:[...n.documents],removedDocuments:[],addedEditors:[...n.textEditors.values()],removedEditors:[],visibleEditors:[...n.visibleEditors].map(b=>b[0])};const h=(0,t.diffSets)(a.documents,n.documents),g=(0,t.diffMaps)(a.textEditors,n.textEditors),d=a.activeEditor!==n.activeEditor?n.activeEditor:void 0,m=(0,t.diffMaps)(a.visibleEditors,n.visibleEditors);return{addedDocuments:h.added,removedDocuments:h.removed.map(b=>b.uri),addedEditors:g.added,removedEditors:g.removed.map(b=>b.getId()),newActiveEditor:d,visibleEditors:m.added.length===0&&m.removed.length===0?void 0:[...n.visibleEditors].map(b=>b[0])}}}let p=l=class{constructor(a,n,h,g,d,m){this._notebookService=h,this._notebookEditorService=g,this._editorService=d,this._editorGroupService=m,this._disposables=new f.DisposableStore,this._editorListeners=new Map,this._proxy=a.getProxy(S.ExtHostContext.ExtHostNotebook),this._mainThreadNotebooks=n.createInstance(A.MainThreadNotebookDocuments,a),this._mainThreadEditors=n.createInstance(D.MainThreadNotebookEditors,a),a.set(S.MainContext.MainThreadNotebookDocuments,this._mainThreadNotebooks),a.set(S.MainContext.MainThreadNotebookEditors,this._mainThreadEditors),this._notebookService.onWillAddNotebookDocument(()=>this._updateState(),this,this._disposables),this._notebookService.onDidRemoveNotebookDocument(()=>this._updateState(),this,this._disposables),this._editorService.onDidActiveEditorChange(()=>this._updateState(),this,this._disposables),this._editorService.onDidVisibleEditorsChange(()=>this._updateState(),this,this._disposables),this._notebookEditorService.onDidAddNotebookEditor(this._handleEditorAdd,this,this._disposables),this._notebookEditorService.onDidRemoveNotebookEditor(this._handleEditorRemove,this,this._disposables),this._updateState()}dispose(){this._mainThreadNotebooks.dispose(),this._mainThreadEditors.dispose(),this._disposables.dispose()}_handleEditorAdd(a){this._editorListeners.set(a.getId(),(0,f.combinedDisposable)(a.onDidChangeModel(()=>this._updateState()),a.onDidFocusWidget(()=>this._updateState(a)))),this._updateState()}_handleEditorRemove(a){this._editorListeners.get(a.getId())?.dispose(),this._editorListeners.delete(a.getId()),this._updateState()}_updateState(a){const n=new Map,h=new Map;for(const b of this._notebookEditorService.listNotebookEditors())b.hasModel()&&n.set(b.getId(),b);const g=(0,v.getNotebookEditorFromEditorPane)(this._editorService.activeEditorPane);let d=null;g?d=g.getId():a?.textModel&&(d=a.getId()),d&&!n.has(d)&&(d=null);for(const b of this._editorService.visibleEditorPanes){const E=(0,v.getNotebookEditorFromEditorPane)(b);E?.hasModel()&&n.has(E.getId())&&h.set(E.getId(),E)}const m=new r(new Set(this._notebookService.listNotebookDocuments()),n,d,h);this._onDelta(r.delta(this._currentState,m)),this._currentState=m}_onDelta(a){if(l._isDeltaEmpty(a))return;const n={removedDocuments:a.removedDocuments,removedEditors:a.removedEditors,newActiveEditor:a.newActiveEditor,visibleEditors:a.visibleEditors,addedDocuments:a.addedDocuments.map(l._asModelAddData),addedEditors:a.addedEditors.map(this._asEditorAddData,this)};this._proxy.$acceptDocumentAndEditorsDelta(new s.SerializableObjectWithBuffers(n)),this._mainThreadEditors.handleEditorsRemoved(a.removedEditors),this._mainThreadNotebooks.handleNotebooksRemoved(a.removedDocuments),this._mainThreadNotebooks.handleNotebooksAdded(a.addedDocuments),this._mainThreadEditors.handleEditorsAdded(a.addedEditors)}static _isDeltaEmpty(a){return!(a.addedDocuments!==void 0&&a.addedDocuments.length>0||a.removedDocuments!==void 0&&a.removedDocuments.length>0||a.addedEditors!==void 0&&a.addedEditors.length>0||a.removedEditors!==void 0&&a.removedEditors.length>0||a.visibleEditors!==void 0&&a.visibleEditors.length>0||a.newActiveEditor!==void 0)}static _asModelAddData(a){return{viewType:a.viewType,uri:a.uri,metadata:a.metadata,versionId:a.versionId,cells:a.cells.map(k.NotebookDto.toNotebookCellDto)}}_asEditorAddData(a){const n=this._editorService.visibleEditorPanes.find(h=>(0,v.getNotebookEditorFromEditorPane)(h)===a);return{id:a.getId(),documentUri:a.textModel.uri,selections:a.getSelections(),visibleRanges:a.visibleRanges,viewColumn:n&&(0,w.editorGroupToColumn)(this._editorGroupService,n.group)}}};p=l=Ee([I.extHostCustomer,W(1,_.IInstantiationService),W(2,o.INotebookService),W(3,C.INotebookEditorService),W(4,i.IEditorService),W(5,c.IEditorGroupsService)],p),e.MainThreadNotebooksAndEditors=p}),define(ne[2723],re([1,0,2,5,2720,2453,422,2366,65,75]),function(Q,e,t,f,_,A,k,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadWebviewManager=void 0;let v=class extends t.Disposable{constructor(o,c){super();const i=this._register(c.createInstance(k.MainThreadWebviews,o));o.set(I.MainContext.MainThreadWebviews,i);const S=this._register(c.createInstance(A.MainThreadWebviewPanels,o,i));o.set(I.MainContext.MainThreadWebviewPanels,S);const s=this._register(c.createInstance(_.MainThreadCustomEditors,o,i,S));o.set(I.MainContext.MainThreadCustomEditors,s);const l=this._register(c.createInstance(D.MainThreadWebviewsViews,o,i));o.set(I.MainContext.MainThreadWebviewViews,l)}};v=Ee([w.extHostCustomer,W(1,f.IInstantiationService)],v),e.MainThreadWebviewManager=v}),define(ne[2724],re([1,0,23,8,221,147,5,31,30,15,83]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BulkFileEdits=void 0;class C{constructor(){this.uris=[]}async perform(){return this}toString(){return"(noop)"}}class o{constructor(h,g,d){this.newUri=h,this.oldUri=g,this.options=d,this.type="rename"}}let c=class cl{constructor(h,g,d,m){this._edits=h,this._undoRedoInfo=g,this._workingCopyFileService=d,this._fileService=m}get uris(){return(0,w.flatten)(this._edits.map(h=>[h.newUri,h.oldUri]))}async perform(h){const g=[],d=[];for(const m of this._edits)m.options.overwrite===void 0&&m.options.ignoreIfExists&&await this._fileService.exists(m.newUri)||(g.push({file:{source:m.oldUri,target:m.newUri},overwrite:m.options.overwrite}),d.push(new o(m.oldUri,m.newUri,m.options)));return g.length===0?new C:(await this._workingCopyFileService.move(g,h,this._undoRedoInfo),new cl(d,{isUndoing:!0},this._workingCopyFileService,this._fileService))}toString(){return`(rename ${this._edits.map(h=>`${h.oldUri} to ${h.newUri}`).join(", ")})`}};c=Ee([W(2,_.IWorkingCopyFileService),W(3,t.IFileService)],c);class i{constructor(h,g,d){this.newUri=h,this.oldUri=g,this.options=d,this.type="copy"}}let S=class{constructor(h,g,d,m,b){this._edits=h,this._undoRedoInfo=g,this._workingCopyFileService=d,this._fileService=m,this._instaService=b}get uris(){return(0,w.flatten)(this._edits.map(h=>[h.newUri,h.oldUri]))}async perform(h){const g=[];for(const b of this._edits)b.options.overwrite===void 0&&b.options.ignoreIfExists&&await this._fileService.exists(b.newUri)||g.push({file:{source:b.oldUri,target:b.newUri},overwrite:b.options.overwrite});if(g.length===0)return new C;const d=await this._workingCopyFileService.copy(g,h,this._undoRedoInfo),m=[];for(let b=0;b<d.length;b++){const E=d[b],y=this._edits[b];m.push(new r(E.resource,{recursive:!0,folder:this._edits[b].options.folder||E.isDirectory,...y.options},!1))}return this._instaService.createInstance(p,m,{isUndoing:!0})}toString(){return`(copy ${this._edits.map(h=>`${h.oldUri} to ${h.newUri}`).join(", ")})`}};S=Ee([W(2,_.IWorkingCopyFileService),W(3,t.IFileService),W(4,k.IInstantiationService)],S);class s{constructor(h,g,d){this.newUri=h,this.options=g,this.contents=d,this.type="create"}}let l=class{constructor(h,g,d,m,b,E){this._edits=h,this._undoRedoInfo=g,this._fileService=d,this._workingCopyFileService=m,this._instaService=b,this._textFileService=E}get uris(){return this._edits.map(h=>h.newUri)}async perform(h){const g=[],d=[],m=[];for(const b of this._edits)if(!(b.options.overwrite===void 0&&b.options.ignoreIfExists&&await this._fileService.exists(b.newUri))){if(b.options.folder)g.push({resource:b.newUri});else{const E=typeof b.contents!="undefined"?b.contents:await this._textFileService.getEncodedReadable(b.newUri);d.push({resource:b.newUri,contents:E,overwrite:b.options.overwrite})}m.push(new r(b.newUri,b.options,!b.options.folder&&!b.contents))}return g.length===0&&d.length===0?new C:(await this._workingCopyFileService.createFolder(g,h,this._undoRedoInfo),await this._workingCopyFileService.create(d,h,this._undoRedoInfo),this._instaService.createInstance(p,m,{isUndoing:!0}))}toString(){return`(create ${this._edits.map(h=>h.options.folder?`folder ${h.newUri}`:`file ${h.newUri} with ${h.contents?.byteLength||0} bytes`).join(", ")})`}};l=Ee([W(2,t.IFileService),W(3,_.IWorkingCopyFileService),W(4,k.IInstantiationService),W(5,v.ITextFileService)],l);class r{constructor(h,g,d){this.oldUri=h,this.options=g,this.undoesCreate=d,this.type="delete"}}let p=class{constructor(h,g,d,m,b,E,y){this._edits=h,this._undoRedoInfo=g,this._workingCopyFileService=d,this._fileService=m,this._configurationService=b,this._instaService=E,this._logService=y}get uris(){return this._edits.map(h=>h.oldUri)}async perform(h){const g=[],d=[];for(const m of this._edits){let b;try{b=await this._fileService.resolve(m.oldUri,{resolveMetadata:!0})}catch{if(!m.options.ignoreIfNotExists)throw new Error(`${m.oldUri} does not exist and can not be deleted`);continue}g.push({resource:m.oldUri,recursive:m.options.recursive,useTrash:!m.options.skipTrashBin&&this._fileService.hasCapability(m.oldUri,4096)&&this._configurationService.getValue("files.enableTrash")});let E;if(!m.undoesCreate&&!m.options.folder&&!(typeof m.options.maxSize=="number"&&b.size>m.options.maxSize))try{E=await this._fileService.readFile(m.oldUri)}catch(y){this._logService.critical(y)}E!==void 0&&d.push(new s(m.oldUri,m.options,E.value))}return g.length===0?new C:(await this._workingCopyFileService.delete(g,h,this._undoRedoInfo),d.length===0?new C:this._instaService.createInstance(l,d,{isUndoing:!0}))}toString(){return`(delete ${this._edits.map(h=>h.oldUri).join(", ")})`}};p=Ee([W(2,_.IWorkingCopyFileService),W(3,t.IFileService),W(4,f.IConfigurationService),W(5,k.IInstantiationService),W(6,D.ILogService)],p);class u{constructor(h,g,d,m){this.label=h,this.code=g,this.operations=d,this.confirmBeforeUndo=m,this.type=1,this.resources=[].concat(...d.map(b=>b.uris))}async undo(){await this._reverse()}async redo(){await this._reverse()}async _reverse(){for(let h=0;h<this.operations.length;h++){const d=await this.operations[h].perform(I.CancellationToken.None);this.operations[h]=d}}toString(){return this.operations.map(h=>String(h)).join(", ")}}let a=class{constructor(h,g,d,m,b,E,y,T,R,O){this._label=h,this._code=g,this._undoRedoGroup=d,this._undoRedoSource=m,this._confirmBeforeUndo=b,this._progress=E,this._token=y,this._edits=T,this._instaService=R,this._undoRedoService=O}async apply(){const h=[],g={undoRedoGroupId:this._undoRedoGroup.id},d=[];for(const b of this._edits)b.newResource&&b.oldResource&&!b.options?.copy?d.push(new o(b.newResource,b.oldResource,b.options??{})):b.newResource&&b.oldResource&&b.options?.copy?d.push(new i(b.newResource,b.oldResource,b.options??{})):!b.newResource&&b.oldResource?d.push(new r(b.oldResource,b.options??{},!1)):b.newResource&&!b.oldResource&&d.push(new s(b.newResource,b.options??{},void 0));if(d.length===0)return;const m=[];m[0]=[d[0]];for(let b=1;b<d.length;b++){const E=d[b],y=(0,w.tail)(m);y[0].type===E.type?y.push(E):m.push([E])}for(let b of m){if(this._token.isCancellationRequested)break;let E;switch(b[0].type){case"rename":E=this._instaService.createInstance(c,b,g);break;case"copy":E=this._instaService.createInstance(S,b,g);break;case"delete":E=this._instaService.createInstance(p,b,g);break;case"create":E=this._instaService.createInstance(l,b,g);break}if(E){const y=await E.perform(this._token);h.push(y)}this._progress.report(void 0)}this._undoRedoService.pushElement(new u(this._label,this._code,h,this._confirmBeforeUndo),this._undoRedoGroup,this._undoRedoSource)}};a=Ee([W(8,k.IInstantiationService),W(9,A.IUndoRedoService)],a),e.BulkFileEdits=a}),define(ne[2725],re([1,0,1443,2,106,140,35,31,67,21,5,2122,2724,358,147,194,30,76,54,55]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BulkEditService=void 0;let u=class{constructor(h,g,d,m,b,E,y,T,R,O,x){this._label=h,this._code=g,this._editor=d,this._progress=m,this._token=b,this._edits=E,this._undoRedoGroup=y,this._undoRedoSource=T,this._confirmBeforeUndo=R,this._instaService=O,this._logService=x}ariaMessage(){let h=new p.ResourceMap,g=new p.ResourceMap,d=0;for(let m of this._edits)m instanceof A.ResourceTextEdit?(d+=1,g.set(m.resource,!0)):m instanceof A.ResourceFileEdit&&h.set(m.oldResource??m.newResource,!0);return this._edits.length===0?(0,t.localize)(0,null):h.size===0?d>1&&g.size>1?(0,t.localize)(1,null,d,g.size):(0,t.localize)(2,null,d):(0,t.localize)(3,null,d,g.size,h.size)}async perform(){if(this._edits.length===0)return;const h=[1];for(let b=1;b<this._edits.length;b++)Object.getPrototypeOf(this._edits[b-1])===Object.getPrototypeOf(this._edits[b])?h[h.length-1]++:h.push(1);const g=this._edits.length>1?0:void 0;this._progress.report({increment:g,total:100});const d={report:b=>this._progress.report({increment:100/this._edits.length})};let m=0;for(let b of h){if(this._token.isCancellationRequested)break;const E=this._edits.slice(m,m+b);E[0]instanceof A.ResourceFileEdit?await this._performFileEdits(E,this._undoRedoGroup,this._undoRedoSource,this._confirmBeforeUndo,d):E[0]instanceof A.ResourceTextEdit?await this._performTextEdits(E,this._undoRedoGroup,this._undoRedoSource,d):E[0]instanceof c.ResourceNotebookCellEdit?await this._performCellEdits(E,this._undoRedoGroup,this._undoRedoSource,d):console.log("UNKNOWN EDIT"),m=m+b}}async _performFileEdits(h,g,d,m,b){this._logService.debug("_performFileEdits",JSON.stringify(h)),await this._instaService.createInstance(o.BulkFileEdits,this._label||(0,t.localize)(4,null),this._code||"undoredo.workspaceEdit",g,d,m,b,this._token,h).apply()}async _performTextEdits(h,g,d,m){this._logService.debug("_performTextEdits",JSON.stringify(h)),await this._instaService.createInstance(C.BulkTextEdits,this._label||(0,t.localize)(5,null),this._code||"undoredo.workspaceEdit",this._editor,g,d,m,this._token,h).apply()}async _performCellEdits(h,g,d,m){this._logService.debug("_performCellEdits",JSON.stringify(h)),await this._instaService.createInstance(c.BulkCellEdits,g,d,m,this._token,h).apply()}};u=Ee([W(9,v.IInstantiationService),W(10,D.ILogService)],u);let a=class{constructor(h,g,d,m,b){this._instaService=h,this._logService=g,this._editorService=d,this._lifecycleService=m,this._dialogService=b,this._activeUndoRedoGroups=new S.LinkedList}setPreviewHandler(h){return this._previewHandler=h,(0,f.toDisposable)(()=>{this._previewHandler===h&&(this._previewHandler=void 0)})}hasPreviewHandler(){return Boolean(this._previewHandler)}async apply(h,g){if(h.length===0)return{ariaSummary:(0,t.localize)(6,null)};this._previewHandler&&(g?.showPreview||h.some(R=>R.metadata?.needsConfirmation))&&(h=await this._previewHandler(h,g));let d=g?.editor;if(!d){let R=this._editorService.activeTextEditorControl;(0,_.isCodeEditor)(R)&&(d=R)}d&&d.getOption(81)&&(d=void 0);let m,b=()=>{};if(typeof g?.undoRedoGroupId=="number"){for(let R of this._activeUndoRedoGroups)if(R.id===g.undoRedoGroupId){m=R;break}}m||(m=new i.UndoRedoGroup,b=this._activeUndoRedoGroups.push(m));const E=g?.quotableLabel||g?.label,y=this._instaService.createInstance(u,E,g?.code,d,g?.progress??I.Progress.None,g?.token??s.CancellationToken.None,h,m,g?.undoRedoSource,!!g?.confirmBeforeUndo);let T;try{return T=this._lifecycleService.onBeforeShutdown(R=>R.veto(this.shouldVeto(E,R.reason),"veto.blukEditService")),await y.perform(),{ariaSummary:y.ariaMessage()}}catch(R){throw this._logService.error(R),R}finally{T?.dispose(),b()}}async shouldVeto(h,g){h=h||(0,t.localize)(7,null);const d=g===1?(0,t.localize)(8,null):g===4?(0,t.localize)(9,null):g===3?(0,t.localize)(10,null):(0,t.localize)(11,null);return!(await this._dialogService.confirm({message:(0,t.localize)(12,null,d.toLowerCase(),h),primaryButton:d})).confirmed}};a=Ee([W(0,v.IInstantiationService),W(1,D.ILogService),W(2,w.IEditorService),W(3,l.ILifecycleService),W(4,r.IDialogService)],a),e.BulkEditService=a,(0,k.registerSingleton)(A.IBulkEditService,a,!0)}),define(ne[2726],re([1,0,1902,130,6,9,930,2,5,55,23,11,22,2578,26,221,19,93,126,56]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextFileEditorModelManager=void 0;let u=class extends D.Disposable{constructor(n,h,g,d,m){super();this.instantiationService=n,this.fileService=h,this.notificationService=g,this.workingCopyFileService=d,this.uriIdentityService=m,this._onDidCreate=this._register(new _.Emitter),this.onDidCreate=this._onDidCreate.event,this._onDidResolve=this._register(new _.Emitter),this.onDidResolve=this._onDidResolve.event,this._onDidRemove=this._register(new _.Emitter),this.onDidRemove=this._onDidRemove.event,this._onDidChangeDirty=this._register(new _.Emitter),this.onDidChangeDirty=this._onDidChangeDirty.event,this._onDidChangeReadonly=this._register(new _.Emitter),this.onDidChangeReadonly=this._onDidChangeReadonly.event,this._onDidChangeOrphaned=this._register(new _.Emitter),this.onDidChangeOrphaned=this._onDidChangeOrphaned.event,this._onDidSaveError=this._register(new _.Emitter),this.onDidSaveError=this._onDidSaveError.event,this._onDidSave=this._register(new _.Emitter),this.onDidSave=this._onDidSave.event,this._onDidRevert=this._register(new _.Emitter),this.onDidRevert=this._onDidRevert.event,this._onDidChangeEncoding=this._register(new _.Emitter),this.onDidChangeEncoding=this._onDidChangeEncoding.event,this.mapResourceToModel=new w.ResourceMap,this.mapResourceToModelListeners=new w.ResourceMap,this.mapResourceToDisposeListener=new w.ResourceMap,this.mapResourceToPendingModelResolvers=new w.ResourceMap,this.modelResolveQueue=this._register(new C.ResourceQueue),this.saveErrorHandler=(()=>{const b=this.notificationService;return{onSaveError(E,y){b.error((0,t.localize)(0,null,y.name,(0,f.toErrorMessage)(E,!1)))}}})(),this.mapCorrelationIdToModelsToRestore=new Map,this.saveParticipants=this._register(this.instantiationService.createInstance(c.TextFileSaveParticipant)),this.registerListeners()}get models(){return[...this.mapResourceToModel.values()]}registerListeners(){this._register(this.fileService.onDidFilesChange(n=>this.onDidFilesChange(n))),this._register(this.fileService.onDidChangeFileSystemProviderCapabilities(n=>this.onDidChangeFileSystemProviderCapabilities(n))),this._register(this.fileService.onDidChangeFileSystemProviderRegistrations(n=>this.onDidChangeFileSystemProviderRegistrations(n))),this._register(this.workingCopyFileService.onWillRunWorkingCopyFileOperation(n=>this.onWillRunWorkingCopyFileOperation(n))),this._register(this.workingCopyFileService.onDidFailWorkingCopyFileOperation(n=>this.onDidFailWorkingCopyFileOperation(n))),this._register(this.workingCopyFileService.onDidRunWorkingCopyFileOperation(n=>this.onDidRunWorkingCopyFileOperation(n)))}onDidFilesChange(n){for(const h of this.models)h.isDirty()||n.contains(h.resource,0,1)&&this.queueModelReload(h)}onDidChangeFileSystemProviderCapabilities(n){this.queueModelReloads(n.scheme)}onDidChangeFileSystemProviderRegistrations(n){!n.added||this.queueModelReloads(n.scheme)}queueModelReloads(n){for(const h of this.models)h.isDirty()||n===h.resource.scheme&&this.queueModelReload(h)}queueModelReload(n){const h=this.modelResolveQueue.queueFor(n.resource);h.size<=1&&h.queue(async()=>{try{await this.reload(n)}catch(g){(0,o.onUnexpectedError)(g)}})}onWillRunWorkingCopyFileOperation(n){if(n.operation===2||n.operation===3){const h=[];for(const{source:g,target:d}of n.files)if(g){if(this.uriIdentityService.extUri.isEqual(g,d))continue;const m=[];for(const b of this.models)this.uriIdentityService.extUri.isEqualOrParent(b.resource,g)&&m.push(b);for(const b of m){const E=b.resource;let y;this.uriIdentityService.extUri.isEqual(E,g)?y=d:y=(0,s.joinPath)(d,E.path.substr(g.path.length+1)),h.push({source:E,target:y,languageId:b.getLanguageId(),encoding:b.getEncoding(),snapshot:b.isDirty()?b.createSnapshot():void 0})}}this.mapCorrelationIdToModelsToRestore.set(n.correlationId,h)}}onDidFailWorkingCopyFileOperation(n){if(n.operation===2||n.operation===3){const h=this.mapCorrelationIdToModelsToRestore.get(n.correlationId);h&&(this.mapCorrelationIdToModelsToRestore.delete(n.correlationId),h.forEach(g=>{g.snapshot&&this.get(g.source)?.setDirty(!0)}))}}onDidRunWorkingCopyFileOperation(n){switch(n.operation){case 0:n.waitUntil((async()=>{for(const{target:h}of n.files){const g=this.get(h);g&&!g.isDisposed()&&await g.revert()}})());break;case 2:case 3:n.waitUntil((async()=>{const h=this.mapCorrelationIdToModelsToRestore.get(n.correlationId);h&&(this.mapCorrelationIdToModelsToRestore.delete(n.correlationId),await C.Promises.settled(h.map(async g=>{const d=await this.resolve(g.target,{reload:{async:!1},contents:g.snapshot?(0,l.createTextBufferFactoryFromSnapshot)(g.snapshot):void 0,encoding:g.encoding});g.languageId&&g.languageId!==r.PLAINTEXT_LANGUAGE_ID&&d.getLanguageId()===r.PLAINTEXT_LANGUAGE_ID&&(0,s.extname)(g.target)!==r.PLAINTEXT_EXTENSION&&d.updateTextEditorModel(void 0,g.languageId)})))})());break}}get(n){return this.mapResourceToModel.get(n)}has(n){return this.mapResourceToModel.has(n)}async reload(n){await this.joinPendingResolves(n.resource),!(n.isDirty()||n.isDisposed()||!this.has(n.resource))&&await this.doResolve(n,{reload:{async:!1}})}async resolve(n,h){const g=this.joinPendingResolves(n);return g&&await g,this.doResolve(n,h)}async doResolve(n,h){let g,d;A.URI.isUri(n)?(d=n,g=this.get(d)):(d=n.resource,g=n);let m,b=!1;if(g)h?.contents?m=g.resolve(h):h?.reload?h.reload.async?(m=Promise.resolve(),(async()=>{try{await g.resolve(h)}catch(E){(0,o.onUnexpectedError)(E)}})()):m=g.resolve(h):m=Promise.resolve();else{b=!0;const E=g=this.instantiationService.createInstance(k.TextFileEditorModel,d,h?h.encoding:void 0,h?h.languageId:void 0);m=g.resolve(h),this.registerModel(E)}this.mapResourceToPendingModelResolvers.set(d,m),this.add(d,g),b&&(this._onDidCreate.fire(g),g.isDirty()&&this._onDidChangeDirty.fire(g));try{await m}catch(E){throw b&&g.dispose(),E}finally{this.mapResourceToPendingModelResolvers.delete(d)}return h?.languageId&&g.setLanguageId(h.languageId),b&&g.isDirty()&&this._onDidChangeDirty.fire(g),g}joinPendingResolves(n){if(!!this.mapResourceToPendingModelResolvers.get(n))return this.doJoinPendingResolves(n)}async doJoinPendingResolves(n){let h;for(;this.mapResourceToPendingModelResolvers.has(n);){const g=this.mapResourceToPendingModelResolvers.get(n);if(g===h)return;h=g;try{await g}catch{}}}registerModel(n){const h=new D.DisposableStore;h.add(n.onDidResolve(g=>this._onDidResolve.fire({model:n,reason:g}))),h.add(n.onDidChangeDirty(()=>this._onDidChangeDirty.fire(n))),h.add(n.onDidChangeReadonly(()=>this._onDidChangeReadonly.fire(n))),h.add(n.onDidChangeOrphaned(()=>this._onDidChangeOrphaned.fire(n))),h.add(n.onDidSaveError(()=>this._onDidSaveError.fire(n))),h.add(n.onDidSave(g=>this._onDidSave.fire({model:n,...g}))),h.add(n.onDidRevert(()=>this._onDidRevert.fire(n))),h.add(n.onDidChangeEncoding(()=>this._onDidChangeEncoding.fire(n))),this.mapResourceToModelListeners.set(n.resource,h)}add(n,h){if(this.mapResourceToModel.get(n)===h)return;const d=this.mapResourceToDisposeListener.get(n);d&&d.dispose(),this.mapResourceToModel.set(n,h),this.mapResourceToDisposeListener.set(n,h.onWillDispose(()=>this.remove(n)))}remove(n){const h=this.mapResourceToModel.delete(n),g=this.mapResourceToDisposeListener.get(n);g&&((0,D.dispose)(g),this.mapResourceToDisposeListener.delete(n));const d=this.mapResourceToModelListeners.get(n);d&&((0,D.dispose)(d),this.mapResourceToModelListeners.delete(n)),h&&this._onDidRemove.fire(n)}addSaveParticipant(n){return this.saveParticipants.addSaveParticipant(n)}runSaveParticipants(n,h,g){return this.saveParticipants.participate(n,h,g)}canDispose(n){return n.isDisposed()||!this.mapResourceToPendingModelResolvers.has(n.resource)&&!n.isDirty()?!0:this.doCanDispose(n)}async doCanDispose(n){const h=this.joinPendingResolves(n.resource);return h?(await h,this.canDispose(n)):n.isDirty()?(await _.Event.toPromise(n.onDidChangeDirty),this.canDispose(n)):!0}dispose(){super.dispose(),this.mapResourceToModel.clear(),this.mapResourceToPendingModelResolvers.clear(),(0,D.dispose)(this.mapResourceToDisposeListener.values()),this.mapResourceToDisposeListener.clear(),(0,D.dispose)(this.mapResourceToModelListeners.values()),this.mapResourceToModelListeners.clear()}};u=Ee([W(0,I.IInstantiationService),W(1,v.IFileService),W(2,i.INotificationService),W(3,S.IWorkingCopyFileService),W(4,p.IUriIdentityService)],u),e.TextFileEditorModelManager=u}),define(ne[2727],re([1,0,1901,83,44,76,23,2,50,374,931,2726,5,18,93,52,19,54,60,113,126,154,61,369,72,101,221,56,34,430,206,42,31,30,367,252,6,33,32]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EncodingOracle=e.AbstractTextFileService=void 0;let P=class ds extends D.Disposable{constructor(U,H,K,G,q,Z,j,X,Y,$,J,ee,te,se,ie,ce,le,ae,ue){super();this.fileService=U,this.untitledTextEditorService=H,this.lifecycleService=K,this.instantiationService=G,this.modelService=q,this.environmentService=Z,this.dialogService=j,this.fileDialogService=X,this.textResourceConfigurationService=Y,this.filesConfigurationService=$,this.textModelService=J,this.codeEditorService=ee,this.pathService=te,this.workingCopyFileService=se,this.uriIdentityService=ie,this.languageService=ce,this.logService=le,this.elevatedFileService=ae,this.decorationsService=ue,this.files=this._register(this.instantiationService.createInstance(C.TextFileEditorModelManager)),this.untitled=this.untitledTextEditorService,this.provideDecorations()}provideDecorations(){this.decorationsService.registerDecorationsProvider(new class extends D.Disposable{constructor(U){super();this.files=U,this.label=(0,t.localize)(2,null),this._onDidChange=this._register(new M.Emitter),this.onDidChange=this._onDidChange.event,this.registerListeners()}registerListeners(){this._register(this.files.onDidResolve(({model:U})=>{(U.isReadonly()||U.hasState(4))&&this._onDidChange.fire([U.resource])})),this._register(this.files.onDidRemove(U=>this._onDidChange.fire([U]))),this._register(this.files.onDidChangeReadonly(U=>this._onDidChange.fire([U.resource]))),this._register(this.files.onDidChangeOrphaned(U=>this._onDidChange.fire([U.resource])))}provideDecorations(U){const H=this.files.get(U);if(!H||H.isDisposed())return;const K=H.isReadonly(),G=H.hasState(4);if(K&&G)return{color:B.listErrorForeground,letter:N.Codicon.lockSmall,strikethrough:!0,tooltip:(0,t.localize)(3,null)};if(K)return{letter:N.Codicon.lockSmall,tooltip:(0,t.localize)(4,null)};if(G)return{color:B.listErrorForeground,strikethrough:!0,tooltip:(0,t.localize)(5,null)}}}(this.files))}get encoding(){return this._encoding||(this._encoding=this._register(this.instantiationService.createInstance(V))),this._encoding}async read(U,H){const[K,G]=await this.doRead(U,{...H,preferUnbuffered:!0});return{...K,encoding:G.detected.encoding||y.UTF8,value:await(0,T.consumeStream)(G.stream,q=>q.join(""))}}async readStream(U,H){const[K,G]=await this.doRead(U,H);return{...K,encoding:G.detected.encoding||y.UTF8,value:await(0,i.createTextBufferFactoryFromStream)(G.stream)}}async doRead(U,H){const K=new x.CancellationTokenSource;let G;if(H?.preferUnbuffered){const q=await this.fileService.readFile(U,H,K.token);G={...q,value:(0,r.bufferToStream)(q.value)}}else G=await this.fileService.readFileStream(U,H,K.token);try{const q=await this.doGetDecodedStream(U,G.value,H);return[G,q]}catch(q){throw K.dispose(!0),q.decodeStreamErrorKind===1?new f.TextFileOperationError((0,t.localize)(6,null),0,H):q}}async create(U,H){const K=await Promise.all(U.map(async G=>{const q=await this.getEncodedReadable(G.resource,G.value);return{resource:G.resource,contents:q,overwrite:G.options?.overwrite}}));return this.workingCopyFileService.create(K,x.CancellationToken.None,H)}async write(U,H,K){const G=await this.getEncodedReadable(U,H,K);return K?.writeElevated&&this.elevatedFileService.isSupported(U)?this.elevatedFileService.writeFileElevated(U,G,K):this.fileService.writeFile(U,G,K)}async getEncodedReadable(U,H,K){const{encoding:G,addBOM:q}=await this.encoding.getWriteEncoding(U,K);if(G===y.UTF8&&!q)return typeof H=="undefined"?void 0:(0,f.toBufferOrReadable)(H);H=H||"";const Z=typeof H=="string"?(0,f.stringToSnapshot)(H):H;return(0,y.toEncodeReadable)(Z,G,{addBOM:q})}async getDecodedStream(U,H,K){return(await this.doGetDecodedStream(U,H,K)).stream}doGetDecodedStream(U,H,K){return(0,y.toDecodeStream)(H,{acceptTextOnly:K?.acceptTextOnly??!1,guessEncoding:K?.autoGuessEncoding||this.textResourceConfigurationService.getValue(U,"files.autoGuessEncoding"),overwriteEncoding:G=>this.encoding.getReadEncoding(U,K,G)})}async save(U,H){if(U.scheme===c.Schemas.untitled){const K=this.untitled.get(U);if(K){let G;if(K.hasAssociatedFilePath?G=await this.suggestSavePath(U):G=await this.fileDialogService.pickFileToSave(await this.suggestSavePath(U),H?.availableFileSystems),G)return this.saveAs(U,G,H)}}else{const K=this.files.get(U);if(K)return await K.save(H)?U:void 0}}async saveAs(U,H,K){if(H||(H=await this.fileDialogService.pickFileToSave(await this.suggestSavePath(K?.suggestedTarget??U),K?.availableFileSystems)),!!H)return(0,s.isEqual)(U,H)?this.save(U,{...K,force:!0}):this.fileService.hasProvider(U)&&this.uriIdentityService.extUri.isEqual(U,H)&&await this.fileService.exists(U)?(await this.workingCopyFileService.move([{file:{source:U,target:H}}],x.CancellationToken.None),await this.save(U,K)||await this.save(H,K),H):this.doSaveAs(U,H,K)}async doSaveAs(U,H,K){let G=!1;const q=this.files.get(U);if(q?.isResolved())G=await this.doSaveAsTextFile(q,U,H,K);else if(this.fileService.hasProvider(U))await this.fileService.copy(U,H,!0),G=!0;else if(this.textModelService.canHandleResource(U)){const Z=await this.textModelService.createModelReference(U);try{G=await this.doSaveAsTextFile(Z.object,U,H,K)}finally{Z.dispose()}}else{const Z=this.modelService.getModel(U);Z&&(G=await this.doSaveAsTextFile(Z,U,H,K))}if(!!G)return await this.revert(U),H}async doSaveAsTextFile(U,H,K,G){let q;const Z=U;typeof Z.getEncoding=="function"&&(q=Z.getEncoding());let j=!1,X=this.files.get(K);if(X?.isResolved())j=!0;else{j=await this.fileService.exists(K),j||await this.create([{resource:K,value:""}]);try{X=await this.files.resolve(K,{encoding:q})}catch(ee){if(j&&(ee.textFileOperationResult===0||ee.fileOperationResult===7))return await this.fileService.del(K),this.doSaveAsTextFile(U,H,K,G);throw ee}}let Y;if(U instanceof v.UntitledTextEditorModel&&U.hasAssociatedFilePath&&j&&this.uriIdentityService.extUri.isEqual(K,(0,s.toLocalResource)(U.resource,this.environmentService.remoteAuthority,this.pathService.defaultUriScheme))?Y=await this.confirmOverwrite(K):Y=!0,!Y)return!1;let $;U instanceof h.BaseTextEditorModel?U.isResolved()&&($=U.textEditorModel):$=U;let J;if(X.isResolved()&&(J=X.textEditorModel),$&&J){X.updatePreferredEncoding(q),this.modelService.updateModel(J,(0,i.createTextBufferFactoryFromSnapshot)($.createSnapshot()));const ee=$.getLanguageId(),te=J.getLanguageId();ee!==u.PLAINTEXT_LANGUAGE_ID&&te===u.PLAINTEXT_LANGUAGE_ID&&J.setMode(ee);const se=this.codeEditorService.getTransientModelProperties($);if(se)for(const[ie,ce]of se)this.codeEditorService.setTransientModelProperty(J,ie,ce)}return G?.source||(G={...G,source:j?ds.TEXTFILE_SAVE_REPLACE_SOURCE:ds.TEXTFILE_SAVE_CREATE_SOURCE}),X.save(G)}async confirmOverwrite(U){const H={message:(0,t.localize)(7,null,(0,s.basename)(U)),detail:(0,t.localize)(8,null,(0,s.basename)(U),(0,s.basename)((0,s.dirname)(U))),primaryButton:(0,t.localize)(9,null),type:"warning"};return(await this.dialogService.confirm(H)).confirmed}async suggestSavePath(U){if(this.fileService.hasProvider(U))return U;const H=this.environmentService.remoteAuthority,K=await this.fileDialogService.defaultFilePath();let G;if(U.scheme===c.Schemas.untitled){const q=this.untitled.get(U);if(q){if(q.hasAssociatedFilePath)return(0,s.toLocalResource)(U,H,this.pathService.defaultUriScheme);let Z=q.name;await this.pathService.hasValidBasename((0,s.joinPath)(K,Z),Z)||(Z=(0,s.basename)(U));const j=q.getLanguageId();j&&j!==u.PLAINTEXT_LANGUAGE_ID?G=this.suggestFilename(j,Z):G=Z}}return G||(G=(0,s.basename)(U)),(0,s.joinPath)(K,G)}suggestFilename(U,H){if(!this.languageService.getLanguageName(U))return H;const G=this.languageService.getExtensions(U)[0];return G&&!H.endsWith(G)?H+G:this.languageService.getFilenames(U)[0]||H}async revert(U,H){if(U.scheme===c.Schemas.untitled){const K=this.untitled.get(U);if(K)return K.revert(H)}else{const K=this.files.get(U);if(K&&(K.isDirty()||H?.force))return K.revert(H)}}isDirty(U){const H=U.scheme===c.Schemas.untitled?this.untitled.get(U):this.files.get(U);return H?H.isDirty():!1}};P.TEXTFILE_SAVE_CREATE_SOURCE=_.SaveSourceRegistry.registerSource("textFileCreate.source",(0,t.localize)(0,null)),P.TEXTFILE_SAVE_REPLACE_SOURCE=_.SaveSourceRegistry.registerSource("textFileOverwrite.source",(0,t.localize)(1,null)),P=Ee([W(0,k.IFileService),W(1,w.IUntitledTextEditorService),W(2,A.ILifecycleService),W(3,o.IInstantiationService),W(4,S.IModelService),W(5,I.IWorkbenchEnvironmentService),W(6,l.IDialogService),W(7,l.IFileDialogService),W(8,p.ITextResourceConfigurationService),W(9,a.IFilesConfigurationService),W(10,n.ITextModelService),W(11,g.ICodeEditorService),W(12,d.IPathService),W(13,m.IWorkingCopyFileService),W(14,b.IUriIdentityService),W(15,R.ILanguageService),W(16,O.ILogService),W(17,F.IElevatedFileService),W(18,L.IDecorationsService)],P),e.AbstractTextFileService=P;let V=class extends D.Disposable{constructor(U,H,K,G){super();this.textResourceConfigurationService=U,this.environmentService=H,this.contextService=K,this.uriIdentityService=G,this._encodingOverrides=this.getDefaultEncodingOverrides(),this.registerListeners()}get encodingOverrides(){return this._encodingOverrides}set encodingOverrides(U){this._encodingOverrides=U}registerListeners(){this._register(this.contextService.onDidChangeWorkspaceFolders(()=>this.encodingOverrides=this.getDefaultEncodingOverrides()))}getDefaultEncodingOverrides(){const U=[];return U.push({parent:this.environmentService.userRoamingDataHome,encoding:y.UTF8}),U.push({extension:E.WORKSPACE_EXTENSION,encoding:y.UTF8}),U.push({parent:this.environmentService.untitledWorkspacesHome,encoding:y.UTF8}),this.contextService.getWorkspace().folders.forEach(H=>{U.push({parent:(0,s.joinPath)(H.uri,".vscode"),encoding:y.UTF8})}),U}async getWriteEncoding(U,H){const{encoding:K,hasBOM:G}=await this.getPreferredWriteEncoding(U,H?H.encoding:void 0);return{encoding:K,addBOM:G}}async getPreferredWriteEncoding(U,H){const K=await this.getEncodingForResource(U,H);return{encoding:K,hasBOM:K===y.UTF16be||K===y.UTF16le||K===y.UTF8_with_bom}}getReadEncoding(U,H,K){let G;return H?.encoding?K===y.UTF8_with_bom&&H.encoding===y.UTF8?G=y.UTF8_with_bom:G=H.encoding:K?G=K:this.textResourceConfigurationService.getValue(U,"files.encoding")===y.UTF8_with_bom&&(G=y.UTF8),this.getEncodingForResource(U,G)}async getEncodingForResource(U,H){let K;const G=this.getEncodingOverride(U);return G?K=G:H?K=H:K=this.textResourceConfigurationService.getValue(U,"files.encoding"),K!==y.UTF8&&(!K||!await(0,y.encodingExists)(K))&&(K=y.UTF8),K}getEncodingOverride(U){if(this.encodingOverrides?.length){for(const H of this.encodingOverrides)if(H.parent&&this.uriIdentityService.extUri.isEqualOrParent(U,H.parent)||H.extension&&(0,s.extname)(U)===`.${H.extension}`)return H.encoding}}};V=Ee([W(0,p.ITextResourceConfigurationService),W(1,I.IWorkbenchEnvironmentService),W(2,E.IWorkspaceContextService),W(3,b.IUriIdentityService)],V),e.EncodingOracle=V}),define(ne[2728],re([1,0,207,2727,83,35,23,113,374,76,5,52,121,54,154,61,72,101,221,56,42,367,31,11,252]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeTextFileService=void 0;let d=class extends f.AbstractTextFileService{constructor(b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H,K,G){super(b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,K,H,G);this.environmentService=O,this.registerListeners()}registerListeners(){this.lifecycleService.onWillShutdown(b=>b.join(this.onWillShutdown(),"join.textFiles"))}async onWillShutdown(){let b;for(;(b=this.files.models.filter(E=>E.hasState(2))).length>0;)await h.Promises.settled(b.map(E=>E.joinState(2)))}async read(b,E){return E=this.ensureLimits(E),super.read(b,E)}async readStream(b,E){return E=this.ensureLimits(E),super.readStream(b,E)}ensureLimits(b){let E;b?E=b:E=Object.create(null);let y;if(E.limits?y=E.limits:(y=Object.create(null),E.limits=y),typeof y.size!="number"&&(y.size=(0,k.getPlatformLimits)(t.process.arch==="ia32"?0:1).maxFileSize),typeof y.memory!="number"){const T=this.environmentService.args["max-memory"];y.memory=Math.max(typeof T=="string"&&parseInt(T)*k.ByteSize.MB||0,(0,k.getPlatformLimits)(t.process.arch==="ia32"?0:1).maxHeapSize)}return E}};d=Ee([W(0,k.IFileService),W(1,I.IUntitledTextEditorService),W(2,w.ILifecycleService),W(3,v.IInstantiationService),W(4,C.IModelService),W(5,o.INativeWorkbenchEnvironmentService),W(6,c.IDialogService),W(7,c.IFileDialogService),W(8,D.ITextResourceConfigurationService),W(9,i.IFilesConfigurationService),W(10,S.ITextModelService),W(11,s.ICodeEditorService),W(12,l.IPathService),W(13,r.IWorkingCopyFileService),W(14,p.IUriIdentityService),W(15,u.ILanguageService),W(16,a.IElevatedFileService),W(17,n.ILogService),W(18,g.IDecorationsService)],d),e.NativeTextFileService=d,(0,A.registerSingleton)(_.ITextFileService,d)}),define(ne[933],re([1,0,1920,6,30,23,135,11,31,13,221,154,160,26,116,130,36,14,240,21,367,923]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StoredFileWorkingCopy=e.isStoredFileWorkingCopySaveEvent=e.StoredFileWorkingCopyState=void 0;var n;(function(d){d[d.SAVED=0]="SAVED",d[d.DIRTY=1]="DIRTY",d[d.PENDING_SAVE=2]="PENDING_SAVE",d[d.CONFLICT=3]="CONFLICT",d[d.ORPHAN=4]="ORPHAN",d[d.ERROR=5]="ERROR"})(n=e.StoredFileWorkingCopyState||(e.StoredFileWorkingCopyState={}));function h(d){return!!d.stat}e.isStoredFileWorkingCopySaveEvent=h;let g=class us extends a.ResourceWorkingCopy{constructor(m,b,E,y,T,R,O,x,F,L,M,N,B,P){super(b,T);this.typeId=m,this.name=E,this.modelFactory=y,this.logService=R,this.workingCopyFileService=O,this.filesConfigurationService=x,this.workingCopyBackupService=F,this.notificationService=M,this.workingCopyEditorService=N,this.editorService=B,this.elevatedFileService=P,this.capabilities=0,this._model=void 0,this._onDidChangeContent=this._register(new f.Emitter),this.onDidChangeContent=this._onDidChangeContent.event,this._onDidResolve=this._register(new f.Emitter),this.onDidResolve=this._onDidResolve.event,this._onDidChangeDirty=this._register(new f.Emitter),this.onDidChangeDirty=this._onDidChangeDirty.event,this._onDidSaveError=this._register(new f.Emitter),this.onDidSaveError=this._onDidSaveError.event,this._onDidSave=this._register(new f.Emitter),this.onDidSave=this._onDidSave.event,this._onDidRevert=this._register(new f.Emitter),this.onDidRevert=this._onDidRevert.event,this._onDidChangeReadonly=this._register(new f.Emitter),this.onDidChangeReadonly=this._onDidChangeReadonly.event,this.dirty=!1,this.ignoreDirtyOnModelContentChange=!1,this.versionId=0,this.lastContentChangeFromUndoRedo=void 0,this.saveSequentializer=new D.TaskSequentializer,this.inConflictMode=!1,this.inErrorMode=!1,this._register(L.registerWorkingCopy(this))}get model(){return this._model}isDirty(){return this.dirty}markDirty(){this.setDirty(!0)}setDirty(m){if(!this.isResolved())return;const b=this.dirty;this.doSetDirty(m),m!==b&&this._onDidChangeDirty.fire()}doSetDirty(m){const b=this.dirty,E=this.inConflictMode,y=this.inErrorMode,T=this.savedVersionId;return m?this.dirty=!0:(this.dirty=!1,this.inConflictMode=!1,this.inErrorMode=!1,this.isResolved()&&(this.savedVersionId=this.model.versionId)),()=>{this.dirty=b,this.inConflictMode=E,this.inErrorMode=y,this.savedVersionId=T}}isResolved(){return!!this.model}async resolve(m){if(this.trace("[stored file working copy] resolve() - enter"),this.isDisposed()){this.trace("[stored file working copy] resolve() - exit - without resolving because file working copy is disposed");return}if(!m?.contents&&(this.dirty||this.saveSequentializer.hasPending())){this.trace("[stored file working copy] resolve() - exit - without resolving because file working copy is dirty or being saved");return}return this.doResolve(m)}async doResolve(m){if(m?.contents)return this.resolveFromBuffer(m.contents);if(!(!this.isResolved()&&await this.resolveFromBackup()))return this.resolveFromFile(m)}async resolveFromBuffer(m){this.trace("[stored file working copy] resolveFromBuffer()");let b,E,y,T;try{const R=await this.fileService.stat(this.resource);b=R.mtime,E=R.ctime,y=R.size,T=R.etag,this.setOrphaned(!1)}catch(R){b=Date.now(),E=Date.now(),y=0,T=A.ETAG_DISABLED,this.setOrphaned(R.fileOperationResult===1)}return this.resolveFromContent({resource:this.resource,name:this.name,mtime:b,ctime:E,size:y,etag:T,value:m,readonly:!1},!0)}async resolveFromBackup(){const m=await this.workingCopyBackupService.resolve(this);return this.isResolved()?(this.trace("[stored file working copy] resolveFromBackup() - exit - withoutresolving because previously new file working copy got created meanwhile"),!0):m?(await this.doResolveFromBackup(m),!0):!1}async doResolveFromBackup(m){this.trace("[stored file working copy] doResolveFromBackup()"),await this.resolveFromContent({resource:this.resource,name:this.name,mtime:m.meta?m.meta.mtime:Date.now(),ctime:m.meta?m.meta.ctime:Date.now(),size:m.meta?m.meta.size:0,etag:m.meta?m.meta.etag:A.ETAG_DISABLED,value:m.value,readonly:!1},!0),m.meta&&m.meta.orphaned&&this.setOrphaned(!0)}async resolveFromFile(m){this.trace("[stored file working copy] resolveFromFile()");const b=m?.forceReadFromFile;let E;b?E=A.ETAG_DISABLED:this.lastResolvedFileStat&&(E=this.lastResolvedFileStat.etag);const y=this.versionId;try{const T=await this.fileService.readFileStream(this.resource,{etag:E});if(this.setOrphaned(!1),y!==this.versionId){this.trace("[stored file working copy] resolveFromFile() - exit - without resolving because file working copy content changed");return}await this.resolveFromContent(T,!1)}catch(T){const R=T.fileOperationResult;if(this.setOrphaned(R===1),this.isResolved()&&R===2){T instanceof A.NotModifiedSinceFileOperationError&&this.updateLastResolvedFileStat(T.stat);return}if(this.isResolved()&&R===1&&!b)return;throw T}}async resolveFromContent(m,b){if(this.trace("[stored file working copy] resolveFromContent() - enter"),this.isDisposed()){this.trace("[stored file working copy] resolveFromContent() - exit - because working copy is disposed");return}this.updateLastResolvedFileStat({resource:this.resource,name:m.name,mtime:m.mtime,ctime:m.ctime,size:m.size,etag:m.etag,readonly:m.readonly,isFile:!0,isDirectory:!1,isSymbolicLink:!1,children:void 0}),this.isResolved()?await this.doUpdateModel(m.value):await this.doCreateModel(m.value),this.setDirty(!!b),this._onDidResolve.fire()}async doCreateModel(m){this.trace("[stored file working copy] doCreateModel()"),this._model=this._register(await this.modelFactory.createModel(this.resource,m,_.CancellationToken.None)),this.installModelListeners(this._model)}async doUpdateModel(m){this.trace("[stored file working copy] doUpdateModel()"),this.ignoreDirtyOnModelContentChange=!0;try{await this.model?.update(m,_.CancellationToken.None)}finally{this.ignoreDirtyOnModelContentChange=!1}}installModelListeners(m){this._register(m.onDidChangeContent(b=>this.onModelContentChanged(m,b.isUndoing||b.isRedoing))),this._register(m.onWillDispose(()=>this.dispose()))}onModelContentChanged(m,b){if(this.trace("[stored file working copy] onModelContentChanged() - enter"),this.versionId++,this.trace(`[stored file working copy] onModelContentChanged() - new versionId ${this.versionId}`),b&&(this.lastContentChangeFromUndoRedo=Date.now()),!this.ignoreDirtyOnModelContentChange&&!this.isReadonly())if(m.versionId===this.savedVersionId){this.trace("[stored file working copy] onModelContentChanged() - model content changed back to last saved version");const E=this.dirty;this.setDirty(!1),E&&this._onDidRevert.fire()}else this.trace("[stored file working copy] onModelContentChanged() - model content changed and marked as dirty"),this.setDirty(!0);this._onDidChangeContent.fire()}async backup(m){let b;this.lastResolvedFileStat&&(b={mtime:this.lastResolvedFileStat.mtime,ctime:this.lastResolvedFileStat.ctime,size:this.lastResolvedFileStat.size,etag:this.lastResolvedFileStat.etag,orphaned:this.isOrphaned()});let E;return this.isResolved()&&(E=await(0,D.raceCancellation)(this.model.snapshot(m),m)),{meta:b,content:E}}async save(m=Object.create(null)){return this.isResolved()?this.isReadonly()?(this.trace("[stored file working copy] save() - ignoring request for readonly resource"),!1):(this.hasState(3)||this.hasState(5))&&(m.reason===2||m.reason===3||m.reason===4)?(this.trace("[stored file working copy] save() - ignoring auto save request for file working copy that is in conflict or error"),!1):(this.trace("[stored file working copy] save() - enter"),await this.doSave(m),this.trace("[stored file working copy] save() - exit"),this.hasState(0)):!1}async doSave(m){typeof m.reason!="number"&&(m.reason=1);let b=this.versionId;if(this.trace(`[stored file working copy] doSave(${b}) - enter with versionId ${b}`),this.saveSequentializer.hasPending(b))return this.trace(`[stored file working copy] doSave(${b}) - exit - found a pending save for versionId ${b}`),this.saveSequentializer.pending;if(!m.force&&!this.dirty){this.trace(`[stored file working copy] doSave(${b}) - exit - because not dirty and/or versionId is different (this.isDirty: ${this.dirty}, this.versionId: ${this.versionId})`);return}if(this.saveSequentializer.hasPending())return this.trace(`[stored file working copy] doSave(${b}) - exit - because busy saving`),this.saveSequentializer.cancelPending(),this.saveSequentializer.setNext(()=>this.doSave(m));this.isResolved()&&this.model.pushStackElement();const E=new _.CancellationTokenSource;return this.saveSequentializer.setPending(b,(async()=>{if(this.isResolved()&&!m.skipSaveParticipants&&this.workingCopyFileService.hasSaveParticipants)try{if(m.reason===2&&typeof this.lastContentChangeFromUndoRedo=="number"){const R=Date.now()-this.lastContentChangeFromUndoRedo;R<us.UNDO_REDO_SAVE_PARTICIPANTS_AUTO_SAVE_THROTTLE_THRESHOLD&&await(0,D.timeout)(us.UNDO_REDO_SAVE_PARTICIPANTS_AUTO_SAVE_THROTTLE_THRESHOLD-R)}E.token.isCancellationRequested||await this.workingCopyFileService.runSaveParticipants(this,{reason:m.reason??1},E.token)}catch(R){this.logService.error(`[stored file working copy] runSaveParticipants(${b}) - resulted in an error: ${R.toString()}`,this.resource.toString(),this.typeId)}if(E.token.isCancellationRequested||this.isDisposed()||!this.isResolved())return;b=this.versionId,this.inErrorMode=!1,this.trace(`[stored file working copy] doSave(${b}) - before write()`);const y=(0,w.assertIsDefined)(this.lastResolvedFileStat),T=this;return this.saveSequentializer.setPending(b,(async()=>{try{const R=await(0,D.raceCancellation)(T.model.snapshot(E.token),E.token);if(E.token.isCancellationRequested)return;E.dispose();const O={mtime:y.mtime,etag:m.ignoreModifiedSince||!this.filesConfigurationService.preventSaveConflicts(y.resource)?A.ETAG_DISABLED:y.etag,unlock:m.writeUnlock};let x;m?.writeElevated&&this.elevatedFileService.isSupported(y.resource)?x=await this.elevatedFileService.writeFileElevated(y.resource,(0,w.assertIsDefined)(R),O):x=await this.fileService.writeFile(y.resource,(0,w.assertIsDefined)(R),O),this.handleSaveSuccess(x,b,m)}catch(R){this.handleSaveError(R,b,m)}})(),()=>E.cancel())})(),()=>E.cancel())}handleSaveSuccess(m,b,E){this.updateLastResolvedFileStat(m),b===this.versionId?(this.trace(`[stored file working copy] handleSaveSuccess(${b}) - setting dirty to false because versionId did not change`),this.setDirty(!1)):this.trace(`[stored file working copy] handleSaveSuccess(${b}) - not setting dirty to false because versionId did change meanwhile`),this.setOrphaned(!1),this._onDidSave.fire({reason:E.reason,stat:m,source:E.source})}handleSaveError(m,b,E){if((E.ignoreErrorHandler?this.logService.trace:this.logService.error)(`[stored file working copy] handleSaveError(${b}) - exit - resulted in a save error: ${m.toString()}`,this.resource.toString(),this.typeId),E.ignoreErrorHandler)throw m;this.setDirty(!0),this.inErrorMode=!0,m.fileOperationResult===3&&(this.inConflictMode=!0),this.doHandleSaveError(m),this._onDidSaveError.fire()}doHandleSaveError(m){const b=m,E=[];let y;if(b.fileOperationResult===3)y=(0,t.localize)(0,null,this.name),E.push((0,s.toAction)({id:"fileWorkingCopy.overwrite",label:(0,t.localize)(1,null),run:()=>this.save({ignoreModifiedSince:!0})})),E.push((0,s.toAction)({id:"fileWorkingCopy.revert",label:(0,t.localize)(2,null),run:()=>this.revert()}));else{const O=b.fileOperationResult===5,x=O&&b.options?.unlock,F=b.fileOperationResult===6,L=this.elevatedFileService.isSupported(this.resource);L&&(F||x)?E.push((0,s.toAction)({id:"fileWorkingCopy.saveElevated",label:x?l.isWindows?(0,t.localize)(3,null):(0,t.localize)(4,null):l.isWindows?(0,t.localize)(5,null):(0,t.localize)(6,null),run:()=>{this.save({writeElevated:!0,writeUnlock:x,reason:1})}})):O?E.push((0,s.toAction)({id:"fileWorkingCopy.unlock",label:(0,t.localize)(7,null),run:()=>this.save({writeUnlock:!0,reason:1})})):E.push((0,s.toAction)({id:"fileWorkingCopy.retry",label:(0,t.localize)(8,null),run:()=>this.save({reason:1})})),E.push((0,s.toAction)({id:"fileWorkingCopy.saveAs",label:(0,t.localize)(9,null),run:()=>{const M=this.workingCopyEditorService.findEditor(this);M&&this.editorService.save(M,{saveAs:!0,reason:1})}})),E.push((0,s.toAction)({id:"fileWorkingCopy.revert",label:(0,t.localize)(10,null),run:()=>this.revert()})),O?x&&L?y=l.isWindows?(0,t.localize)(11,null,this.name):(0,t.localize)(12,null,this.name):y=(0,t.localize)(13,null,this.name):L&&F?y=l.isWindows?(0,t.localize)(14,null,this.name):(0,t.localize)(15,null,this.name):y=(0,t.localize)(16,null,this.name,(0,S.toErrorMessage)(m,!1))}const T=this.notificationService.notify({id:`${(0,i.hash)(this.resource.toString())}`,severity:c.Severity.Error,message:y,actions:{primary:E}}),R=f.Event.once(f.Event.any(this.onDidSave,this.onDidRevert))(()=>T.close());f.Event.once(T.onDidClose)(()=>R.dispose())}updateLastResolvedFileStat(m){const b=this.isReadonly();this.lastResolvedFileStat?this.lastResolvedFileStat.mtime<=m.mtime&&(this.lastResolvedFileStat=m):this.lastResolvedFileStat=m,this.isReadonly()!==b&&this._onDidChangeReadonly.fire()}async revert(m){if(!this.isResolved()||!this.dirty&&!m?.force)return;this.trace("[stored file working copy] revert()");const b=this.dirty,E=this.doSetDirty(!1);if(!m?.soft)try{await this.resolve({forceReadFromFile:!0})}catch(T){if(T.fileOperationResult!==1)throw E(),T}this._onDidRevert.fire(),b&&this._onDidChangeDirty.fire()}hasState(m){switch(m){case 3:return this.inConflictMode;case 1:return this.dirty;case 5:return this.inErrorMode;case 4:return this.isOrphaned();case 2:return this.saveSequentializer.hasPending();case 0:return!this.dirty}}async joinState(m){return this.saveSequentializer.pending}isReadonly(){return this.lastResolvedFileStat?.readonly||this.fileService.hasCapability(this.resource,2048)}trace(m){this.logService.trace(m,this.resource.toString(),this.typeId)}dispose(){this.trace("[stored file working copy] dispose()"),this.inConflictMode=!1,this.inErrorMode=!1,super.dispose()}};g.UNDO_REDO_SAVE_PARTICIPANTS_AUTO_SAVE_THROTTLE_THRESHOLD=500,g=Ee([W(4,A.IFileService),W(5,I.ILogService),W(6,v.IWorkingCopyFileService),W(7,C.IFilesConfigurationService),W(8,o.IWorkingCopyBackupService),W(9,k.IWorkingCopyService),W(10,c.INotificationService),W(11,r.IWorkingCopyEditorService),W(12,p.IEditorService),W(13,u.IElevatedFileService)],g),e.StoredFileWorkingCopy=g}),define(ne[2729],re([1,0,2,6,933,55,11,23,76,9,45,31,19,221,56,30,160,925,26,21,367,154,240,135,14,22]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StoredFileWorkingCopyManager=void 0;let m=class extends l.BaseFileWorkingCopyManager{constructor(E,y,T,R,O,x,F,L,M,N,B,P,V,z,U){super(T,x,L);this.workingCopyTypeId=E,this.modelFactory=y,this.lifecycleService=R,this.labelService=O,this.workingCopyFileService=F,this.uriIdentityService=M,this.filesConfigurationService=N,this.workingCopyService=B,this.notificationService=P,this.workingCopyEditorService=V,this.editorService=z,this.elevatedFileService=U,this._onDidResolve=this._register(new f.Emitter),this.onDidResolve=this._onDidResolve.event,this._onDidChangeDirty=this._register(new f.Emitter),this.onDidChangeDirty=this._onDidChangeDirty.event,this._onDidChangeReadonly=this._register(new f.Emitter),this.onDidChangeReadonly=this._onDidChangeReadonly.event,this._onDidChangeOrphaned=this._register(new f.Emitter),this.onDidChangeOrphaned=this._onDidChangeOrphaned.event,this._onDidSaveError=this._register(new f.Emitter),this.onDidSaveError=this._onDidSaveError.event,this._onDidSave=this._register(new f.Emitter),this.onDidSave=this._onDidSave.event,this._onDidRevert=this._register(new f.Emitter),this.onDidRevert=this._onDidRevert.event,this._onDidRemove=this._register(new f.Emitter),this.onDidRemove=this._onDidRemove.event,this.mapResourceToWorkingCopyListeners=new A.ResourceMap,this.mapResourceToPendingWorkingCopyResolve=new A.ResourceMap,this.workingCopyResolveQueue=this._register(new k.ResourceQueue),this.mapCorrelationIdToWorkingCopiesToRestore=new Map,this.registerListeners()}registerListeners(){this._register(this.fileService.onDidFilesChange(E=>this.onDidFilesChange(E))),this._register(this.fileService.onDidChangeFileSystemProviderCapabilities(E=>this.onDidChangeFileSystemProviderCapabilities(E))),this._register(this.fileService.onDidChangeFileSystemProviderRegistrations(E=>this.onDidChangeFileSystemProviderRegistrations(E))),this._register(this.workingCopyFileService.onWillRunWorkingCopyFileOperation(E=>this.onWillRunWorkingCopyFileOperation(E))),this._register(this.workingCopyFileService.onDidFailWorkingCopyFileOperation(E=>this.onDidFailWorkingCopyFileOperation(E))),this._register(this.workingCopyFileService.onDidRunWorkingCopyFileOperation(E=>this.onDidRunWorkingCopyFileOperation(E))),this.lifecycleService.onBeforeShutdown(E=>E.veto(this.onBeforeShutdown(),"veto.fileWorkingCopyManager")),this.lifecycleService.onWillShutdown(E=>E.join(this.onWillShutdown(),"join.fileWorkingCopyManager"))}onBeforeShutdown(){return!!(g.isWeb&&this.workingCopies.some(E=>E.hasState(2)))}async onWillShutdown(){let E;for(;(E=this.workingCopies.filter(y=>y.hasState(2))).length>0;)await k.Promises.settled(E.map(y=>y.joinState(2)))}onDidChangeFileSystemProviderCapabilities(E){this.queueWorkingCopyReloads(E.scheme)}onDidChangeFileSystemProviderRegistrations(E){!E.added||this.queueWorkingCopyReloads(E.scheme)}onDidFilesChange(E){this.queueWorkingCopyReloads(E)}queueWorkingCopyReloads(E){for(const y of this.workingCopies){if(y.isDirty())continue;let T=!1;typeof E=="string"?T=E===y.resource.scheme:T=E.contains(y.resource,0,1),T&&this.queueWorkingCopyReload(y)}}queueWorkingCopyReload(E){const y=this.workingCopyResolveQueue.queueFor(E.resource);y.size<=1&&y.queue(async()=>{try{await this.reload(E)}catch(T){this.logService.error(T)}})}onWillRunWorkingCopyFileOperation(E){(E.operation===2||E.operation===3)&&E.waitUntil((async()=>{const y=[];for(const{source:T,target:R}of E.files)if(T){if(this.uriIdentityService.extUri.isEqual(T,R))continue;const O=[];for(const x of this.workingCopies)this.uriIdentityService.extUri.isEqualOrParent(x.resource,T)&&O.push(x);for(const x of O){const F=x.resource;let L;this.uriIdentityService.extUri.isEqual(F,T)?L=R:L=(0,o.joinPath)(R,F.path.substr(T.path.length+1)),y.push({source:F,target:L,snapshot:x.isDirty()?await x.model?.snapshot(S.CancellationToken.None):void 0})}}this.mapCorrelationIdToWorkingCopiesToRestore.set(E.correlationId,y)})())}onDidFailWorkingCopyFileOperation(E){if(E.operation===2||E.operation===3){const y=this.mapCorrelationIdToWorkingCopiesToRestore.get(E.correlationId);y&&(this.mapCorrelationIdToWorkingCopiesToRestore.delete(E.correlationId),y.forEach(T=>{T.snapshot&&this.get(T.source)?.markDirty()}))}}onDidRunWorkingCopyFileOperation(E){switch(E.operation){case 0:E.waitUntil((async()=>{for(const{target:y}of E.files){const T=this.get(y);T&&!T.isDisposed()&&await T.revert()}})());break;case 2:case 3:E.waitUntil((async()=>{const y=this.mapCorrelationIdToWorkingCopiesToRestore.get(E.correlationId);y&&(this.mapCorrelationIdToWorkingCopiesToRestore.delete(E.correlationId),await k.Promises.settled(y.map(async T=>{await this.resolve(T.target,{reload:{async:!1},contents:T.snapshot})})))})());break}}async reload(E){await this.joinPendingResolves(E.resource),!(E.isDirty()||E.isDisposed()||!this.has(E.resource))&&await this.doResolve(E,{reload:{async:!1}})}async resolve(E,y){const T=this.joinPendingResolves(E);return T&&await T,this.doResolve(E,y)}async doResolve(E,y){let T,R;w.URI.isUri(E)?(R=E,T=this.get(R)):(R=E.resource,T=E);let O,x=!1;const F={contents:y?.contents,forceReadFromFile:y?.reload?.force};T?y?.contents?O=T.resolve(F):y?.reload?y.reload.async?(O=Promise.resolve(),(async()=>{try{await T.resolve(F)}catch(L){(0,d.onUnexpectedError)(L)}})()):O=T.resolve(F):O=Promise.resolve():(x=!0,T=new _.StoredFileWorkingCopy(this.workingCopyTypeId,R,this.labelService.getUriBasenameLabel(R),this.modelFactory,this.fileService,this.logService,this.workingCopyFileService,this.filesConfigurationService,this.workingCopyBackupService,this.workingCopyService,this.notificationService,this.workingCopyEditorService,this.editorService,this.elevatedFileService),O=T.resolve(F),this.registerWorkingCopy(T)),this.mapResourceToPendingWorkingCopyResolve.set(R,O),this.add(R,T),x&&T.isDirty()&&this._onDidChangeDirty.fire(T);try{await O}catch(L){throw x&&T.dispose(),L}finally{this.mapResourceToPendingWorkingCopyResolve.delete(R)}return x&&T.isDirty()&&this._onDidChangeDirty.fire(T),T}joinPendingResolves(E){if(!!this.mapResourceToPendingWorkingCopyResolve.get(E))return this.doJoinPendingResolves(E)}async doJoinPendingResolves(E){let y;for(;this.mapResourceToPendingWorkingCopyResolve.has(E);){const T=this.mapResourceToPendingWorkingCopyResolve.get(E);if(T===y)return;y=T;try{await T}catch{}}}registerWorkingCopy(E){const y=new t.DisposableStore;y.add(E.onDidResolve(()=>this._onDidResolve.fire(E))),y.add(E.onDidChangeDirty(()=>this._onDidChangeDirty.fire(E))),y.add(E.onDidChangeReadonly(()=>this._onDidChangeReadonly.fire(E))),y.add(E.onDidChangeOrphaned(()=>this._onDidChangeOrphaned.fire(E))),y.add(E.onDidSaveError(()=>this._onDidSaveError.fire(E))),y.add(E.onDidSave(T=>this._onDidSave.fire({workingCopy:E,...T}))),y.add(E.onDidRevert(()=>this._onDidRevert.fire(E))),this.mapResourceToWorkingCopyListeners.set(E.resource,y)}remove(E){const y=super.remove(E),T=this.mapResourceToWorkingCopyListeners.get(E);return T&&((0,t.dispose)(T),this.mapResourceToWorkingCopyListeners.delete(E)),y&&this._onDidRemove.fire(E),y}canDispose(E){return E.isDisposed()||!this.mapResourceToPendingWorkingCopyResolve.has(E.resource)&&!E.isDirty()?!0:this.doCanDispose(E)}async doCanDispose(E){const y=this.joinPendingResolves(E.resource);return y?(await y,this.canDispose(E)):E.isDirty()?(await f.Event.toPromise(E.onDidChangeDirty),this.canDispose(E)):!0}dispose(){super.dispose(),this.mapResourceToPendingWorkingCopyResolve.clear(),(0,t.dispose)(this.mapResourceToWorkingCopyListeners.values()),this.mapResourceToWorkingCopyListeners.clear()}};m=Ee([W(2,D.IFileService),W(3,I.ILifecycleService),W(4,v.ILabelService),W(5,C.ILogService),W(6,c.IWorkingCopyFileService),W(7,s.IWorkingCopyBackupService),W(8,i.IUriIdentityService),W(9,a.IFilesConfigurationService),W(10,h.IWorkingCopyService),W(11,r.INotificationService),W(12,n.IWorkingCopyEditorService),W(13,p.IEditorService),W(14,u.IElevatedFileService)],m),e.StoredFileWorkingCopyManager=m}),define(ne[2730],re([1,0,1919,6,11,30,2,19,9,54,23,44,50,101,56,2729,932,2719,221,45,31,26,21,367,154,76,160,240,135,18,252,33,32]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileWorkingCopyManager=void 0;let x=class hs extends k.Disposable{constructor(L,M,N,B,P,V,z,U,H,K,G,q,Z,j,X,Y,$,J,ee,te,se){super();this.workingCopyTypeId=L,this.storedWorkingCopyModelFactory=M,this.untitledWorkingCopyModelFactory=N,this.fileService=B,this.workingCopyFileService=U,this.uriIdentityService=K,this.fileDialogService=G,this.pathService=J,this.environmentService=ee,this.dialogService=te,this.decorationsService=se,this.stored=this._register(new S.StoredFileWorkingCopyManager(this.workingCopyTypeId,this.storedWorkingCopyModelFactory,B,P,V,z,U,H,K,q,Z,j,X,Y,$)),this.untitled=this._register(new l.UntitledFileWorkingCopyManager(this.workingCopyTypeId,this.untitledWorkingCopyModelFactory,async(ie,ce)=>!!await this.saveAs(ie.resource,void 0,ce),B,V,z,H,Z)),this.onDidCreate=f.Event.any(this.stored.onDidCreate,this.untitled.onDidCreate),this.provideDecorations()}provideDecorations(){this.decorationsService.registerDecorationsProvider(new class extends k.Disposable{constructor(L){super();this.stored=L,this.label=(0,t.localize)(2,null),this._onDidChange=this._register(new f.Emitter),this.onDidChange=this._onDidChange.event,this.registerListeners()}registerListeners(){this._register(this.stored.onDidResolve(L=>{(L.isReadonly()||L.hasState(4))&&this._onDidChange.fire([L.resource])})),this._register(this.stored.onDidRemove(L=>this._onDidChange.fire([L]))),this._register(this.stored.onDidChangeReadonly(L=>this._onDidChange.fire([L.resource]))),this._register(this.stored.onDidChangeOrphaned(L=>this._onDidChange.fire([L.resource])))}provideDecorations(L){const M=this.stored.get(L);if(!M||M.isDisposed())return;const N=M.isReadonly(),B=M.hasState(4);if(N&&B)return{color:O.listErrorForeground,letter:R.Codicon.lockSmall,strikethrough:!0,tooltip:(0,t.localize)(3,null)};if(N)return{letter:R.Codicon.lockSmall,tooltip:(0,t.localize)(4,null)};if(B)return{color:O.listErrorForeground,strikethrough:!0,tooltip:(0,t.localize)(5,null)}}}(this.stored))}get workingCopies(){return[...this.stored.workingCopies,...this.untitled.workingCopies]}get(L){return this.stored.get(L)??this.untitled.get(L)}resolve(L,M){return I.URI.isUri(L)?L.scheme===y.Schemas.untitled?this.untitled.resolve({untitledResource:L}):this.stored.resolve(L,M):this.untitled.resolve(L)}async saveAs(L,M,N){if(!M){const B=this.get(L);B instanceof s.UntitledFileWorkingCopy&&B.hasAssociatedFilePath?M=await this.suggestSavePath(L):M=await this.fileDialogService.pickFileToSave(await this.suggestSavePath(N?.suggestedTarget??L),N?.availableFileSystems)}if(!!M)return this.fileService.hasProvider(L)&&(0,D.isEqual)(L,M)?this.doSave(L,{...N,force:!0}):this.fileService.hasProvider(L)&&this.uriIdentityService.extUri.isEqual(L,M)&&await this.fileService.exists(L)?(await this.workingCopyFileService.move([{file:{source:L,target:M}}],A.CancellationToken.None),await this.doSave(L,N)??await this.doSave(M,N)):this.doSaveAs(L,M,N)}async doSave(L,M){const N=this.stored.get(L);if(N&&await N.save(M))return N}async doSaveAs(L,M,N){let B;const P=this.get(L);P?.isResolved()?B=await P.model.snapshot(A.CancellationToken.None):B=(await this.fileService.readFileStream(L)).value;const{targetFileExists:V,targetStoredFileWorkingCopy:z}=await this.doResolveSaveTarget(L,M);if(!(P instanceof s.UntitledFileWorkingCopy&&P.hasAssociatedFilePath&&V&&this.uriIdentityService.extUri.isEqual(M,(0,D.toLocalResource)(P.resource,this.environmentService.remoteAuthority,this.pathService.defaultUriScheme))&&!await this.confirmOverwrite(M)||(await z.model?.update(B,A.CancellationToken.None),N?.source||(N={...N,source:V?hs.FILE_WORKING_COPY_SAVE_REPLACE_SOURCE:hs.FILE_WORKING_COPY_SAVE_CREATE_SOURCE}),!await z.save({...N,force:!0}))))return await P?.revert(),z}async doResolveSaveTarget(L,M){let N=!1,B=this.stored.get(M);return B?.isResolved()?N=!0:(N=await this.fileService.exists(M),N||await this.workingCopyFileService.create([{resource:M}],A.CancellationToken.None),this.uriIdentityService.extUri.isEqual(L,M)&&this.get(L)?B=await this.stored.resolve(L):B=await this.stored.resolve(M)),{targetFileExists:N,targetStoredFileWorkingCopy:B}}async confirmOverwrite(L){const M={message:(0,t.localize)(6,null,(0,D.basename)(L)),detail:(0,t.localize)(7,null,(0,D.basename)(L),(0,D.basename)((0,D.dirname)(L))),primaryButton:(0,t.localize)(8,null),type:"warning"};return(await this.dialogService.confirm(M)).confirmed}async suggestSavePath(L){if(this.fileService.hasProvider(L))return L;const M=this.get(L);if(M instanceof s.UntitledFileWorkingCopy&&M.hasAssociatedFilePath)return(0,D.toLocalResource)(L,this.environmentService.remoteAuthority,this.pathService.defaultUriScheme);const N=await this.fileDialogService.defaultFilePath();if(M){const B=(0,D.joinPath)(N,M.name);if(await this.pathService.hasValidBasename(B,M.name))return B}return(0,D.joinPath)(N,(0,D.basename)(L))}async destroy(){await _.Promises.settled([this.stored.destroy(),this.untitled.destroy()])}};x.FILE_WORKING_COPY_SAVE_CREATE_SOURCE=C.SaveSourceRegistry.registerSource("fileWorkingCopyCreate.source",(0,t.localize)(0,null)),x.FILE_WORKING_COPY_SAVE_REPLACE_SOURCE=C.SaveSourceRegistry.registerSource("fileWorkingCopyReplace.source",(0,t.localize)(1,null)),x=Ee([W(3,v.IFileService),W(4,d.ILifecycleService),W(5,p.ILabelService),W(6,u.ILogService),W(7,r.IWorkingCopyFileService),W(8,m.IWorkingCopyBackupService),W(9,i.IUriIdentityService),W(10,w.IFileDialogService),W(11,g.IFilesConfigurationService),W(12,E.IWorkingCopyService),W(13,a.INotificationService),W(14,b.IWorkingCopyEditorService),W(15,n.IEditorService),W(16,h.IElevatedFileService),W(17,c.IPathService),W(18,o.IWorkbenchEnvironmentService),W(19,w.IDialogService),W(20,T.IDecorationsService)],x),e.FileWorkingCopyManager=x}),define(ne[2731],re([1,0,5,9,64,2712,2,142,31,6,40,56,55,2730,18,803,13]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookModelResolverServiceImpl=void 0;let l=class extends k.ReferenceCollection{constructor(u,a,n){super();this._instantiationService=u,this._notebookService=a,this._logService=n,this._disposables=new k.DisposableStore,this._workingCopyManagers=new Map,this._modelListener=new Map,this._onDidSaveNotebook=new w.Emitter,this.onDidSaveNotebook=this._onDidSaveNotebook.event,this._onDidChangeDirty=new w.Emitter,this.onDidChangeDirty=this._onDidChangeDirty.event,this._dirtyStates=new o.ResourceMap,this._disposables.add(a.onWillRemoveViewType(h=>{this._workingCopyManagers.get(_.NotebookWorkingCopyTypeIdentifier.create(h))?.destroy().catch(d=>n.error(d))}))}dispose(){this._disposables.dispose(),this._onDidSaveNotebook.dispose(),this._onDidChangeDirty.dispose(),(0,k.dispose)(this._modelListener.values()),(0,k.dispose)(this._workingCopyManagers.values())}isDirty(u){return this._dirtyStates.get(u)??!1}async createReferencedObject(u,a,n){const h=f.URI.parse(u),g=await this._notebookService.withNotebookDataProvider(h,a);let d;if(g instanceof D.ComplexNotebookProviderInfo)d=await this._instantiationService.createInstance(A.ComplexNotebookEditorModel,h,a,g.controller).load();else if(g instanceof D.SimpleNotebookProviderInfo){const b=_.NotebookWorkingCopyTypeIdentifier.create(a);let E=this._workingCopyManagers.get(b);if(!E){const T=new A.NotebookFileWorkingCopyModelFactory(a,this._notebookService);E=this._instantiationService.createInstance(c.FileWorkingCopyManager,b,T,T),this._workingCopyManagers.set(b,E)}d=await this._instantiationService.createInstance(A.SimpleNotebookEditorModel,h,n,a,E).load()}else throw new Error(`CANNOT open ${u}, no provider found`);let m;return this._modelListener.set(d,(0,k.combinedDisposable)(d.onDidSave(()=>this._onDidSaveNotebook.fire(d.resource)),d.onDidChangeDirty(()=>{const b=d.isDirty();this._dirtyStates.set(d.resource,b),b&&!m?m=this.acquire(u,a):m&&(m.dispose(),m=void 0),this._onDidChangeDirty.fire(d)}),(0,k.toDisposable)(()=>m?.dispose()))),d}destroyReferencedObject(u,a){a.then(n=>{this._modelListener.get(n)?.dispose(),this._modelListener.delete(n),n.dispose()}).catch(n=>{this._logService.critical("FAILED to destory notebook",n)})}};l=Ee([W(0,t.IInstantiationService),W(1,D.INotebookService),W(2,I.ILogService)],l);let r=class{constructor(u,a,n,h){this._notebookService=a,this._extensionService=n,this._uriIdentService=h,this._data=u.createInstance(l),this.onDidSaveNotebook=this._data.onDidSaveNotebook,this.onDidChangeDirty=this._data.onDidChangeDirty}dispose(){this._data.dispose()}isDirty(u){return this._data.isDirty(u)}async resolve(u,a){let n,h=!1;if(f.URI.isUri(u))n=u;else if(u.untitledResource)u.untitledResource.scheme===i.Schemas.untitled?n=u.untitledResource:(n=u.untitledResource.with({scheme:i.Schemas.untitled}),h=!0);else{const m=this._notebookService.getContributedNotebookType((0,s.assertIsDefined)(a));if(!m)throw new Error("UNKNOWN view type: "+a);const b=S.NotebookProviderInfo.possibleFileEnding(m.selectors)??"";for(let E=1;;E++){const y=f.URI.from({scheme:i.Schemas.untitled,path:`Untitled-${E}${b}`,query:a});if(!this._notebookService.getNotebookTextModel(y)){n=y;break}}}if(n.scheme===_.CellUri.scheme)throw new Error(`CANNOT open a cell-uri as notebook. Tried with ${n.toString()}`);n=this._uriIdentService.asCanonicalUri(n);const g=this._notebookService.getNotebookTextModel(n)?.viewType;if(!a)if(g)a=g;else{await this._extensionService.whenInstalledExtensionsRegistered();const m=this._notebookService.getContributedNotebookTypes(n);a=m.find(E=>E.exclusive)?.id||m[0]?.id}if(!a)throw new Error(`Missing viewType for '${n}'`);if(g&&g!==a)throw new Error(`A notebook with view type '${g}' already exists for '${n}', CANNOT create another notebook with view type ${a}`);const d=this._data.acquire(n.toString(),a,h);try{return{object:await d.object,dispose(){d.dispose()}}}catch(m){throw d.dispose(),m}}};r=Ee([W(0,t.IInstantiationService),W(1,D.INotebookService),W(2,v.IExtensionService),W(3,C.IUriIdentityService)],r),e.NotebookModelResolverServiceImpl=r}),define(ne[2732],re([1,0,18,2,180,19,13,9,301,52,42,61,1646,57,99,35,5,17,149,47,44,848,232,142,2398,64,21,147,415,877,911,807,2188,357,2157,290,2620,146,6,492,2731,238,2187,40,240,8,45,160,59,2313,585,123,2186,2277,416,802,2438,126,158,62,630,72,168,2276,2275,2498,876,2184,847,2432,2271,2273,2433,2274,2434,846,2475,2435,2431,2182,910,2563,2437,2272,2190,2436,2430,2178,2619]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H,K,G,q,Z,j,X,Y,$,J,ee,te,se,ie,ce,le,ae,ue,oe){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookContribution=void 0,l.Registry.as(u.EditorExtensions.EditorPane).registerEditorPane(r.EditorPaneDescriptor.create(a.NotebookEditor,a.NotebookEditor.ID,"Notebook Editor"),[new i.SyncDescriptor(n.NotebookEditorInput)]),l.Registry.as(u.EditorExtensions.EditorPane).registerEditorPane(r.EditorPaneDescriptor.create(T.NotebookTextDiffEditor,T.NotebookTextDiffEditor.ID,"Notebook Diff Editor"),[new i.SyncDescriptor(y.NotebookDiffEditorInput)]);class fe{canSerialize(){return!0}serialize(_e){return(0,k.assertType)(_e instanceof y.NotebookDiffEditorInput),JSON.stringify({resource:_e.resource,originalResource:_e.original.resource,name:_e.getName(),originalName:_e.original.getName(),textDiffName:_e.getName(),viewType:_e.viewType})}deserialize(_e,Re){const Ne=(0,_.parse)(Re);if(!Ne)return;const{resource:xe,originalResource:Ae,name:Le,viewType:Me}=Ne;return!Ne||!D.URI.isUri(xe)||!D.URI.isUri(Ae)||typeof Le!="string"||typeof Me!="string"?void 0:y.NotebookDiffEditorInput.create(_e,xe,Le,void 0,Ae,Me)}static canResolveBackup(_e,Re){return!1}}class pe{canSerialize(){return!0}serialize(_e){(0,k.assertType)(_e instanceof n.NotebookEditorInput);const Re={resource:_e.resource,viewType:_e.viewType,options:_e.options};return JSON.stringify(Re)}deserialize(_e,Re){const Ne=(0,_.parse)(Re);if(!Ne)return;const{resource:xe,viewType:Ae,options:Le}=Ne;return!Ne||!D.URI.isUri(xe)||typeof Ae!="string"?void 0:n.NotebookEditorInput.create(_e,xe,Ae,Le)}}l.Registry.as(u.EditorExtensions.EditorFactory).registerEditorSerializer(n.NotebookEditorInput.ID,pe),l.Registry.as(u.EditorExtensions.EditorFactory).registerEditorSerializer(y.NotebookDiffEditorInput.ID,fe);let me=class dl extends f.Disposable{constructor(_e,Re,Ne){super();this.codeEditorService=Ne,this.updateCellUndoRedoComparisonKey(Re,_e),this._register(Re.onDidChangeConfiguration(xe=>{xe.affectsConfiguration(d.NotebookSetting.undoRedoPerCell)&&this.updateCellUndoRedoComparisonKey(Re,_e)})),this.codeEditorService.registerDecorationType("comment-controller",ue.COMMENTEDITOR_DECORATION_KEY,{})}updateCellUndoRedoComparisonKey(_e,Re){const Ne=_e.getValue(d.NotebookSetting.undoRedoPerCell);Ne?(this._uriComparisonKeyComputer?.dispose(),this._uriComparisonKeyComputer=void 0):this._uriComparisonKeyComputer||(this._uriComparisonKeyComputer=Re.registerUriComparisonKeyComputer(d.CellUri.scheme,{getComparisonKey:xe=>Ne?xe.toString():dl._getCellUndoRedoComparisonKey(xe)}))}static _getCellUndoRedoComparisonKey(_e){const Re=d.CellUri.parse(_e);return Re?Re.notebook.toString():_e.toString()}dispose(){super.dispose(),this._uriComparisonKeyComputer?.dispose()}};me=Ee([W(0,b.IUndoRedoService),W(1,G.IConfigurationService),W(2,oe.ICodeEditorService)],me),e.NotebookContribution=me;let be=class{constructor(_e,Re,Ne,xe){this._modelService=Re,this._languageService=Ne,this._notebookModelResolverService=xe,this._registration=_e.registerTextModelContentProvider(d.CellUri.scheme,this)}dispose(){this._registration.dispose()}async provideTextContent(_e){const Re=this._modelService.getModel(_e);if(Re)return Re;const Ne=d.CellUri.parse(_e);if(!Ne)return null;const xe=await this._notebookModelResolverService.resolve(Ne.notebook);let Ae=null;for(const Le of xe.object.notebook.cells)if(Le.uri.toString()===_e.toString()){const Me={create:Ue=>{const et=Ue===2?`\r `:` `;return Le.textBuffer.setEOL(et),{textBuffer:Le.textBuffer,disposable:f.Disposable.None}},getFirstLineText:Ue=>Le.textBuffer.getLineContent(1).substring(0,Ue)},We=this._languageService.getLanguageIdByLanguageName(Le.language),Ve=We?this._languageService.createById(We):Le.cellKind===d.CellKind.Markup?this._languageService.createById("markdown"):this._languageService.createByFilepathOrFirstLine(_e,Le.textBuffer.getLineContent(1));Ae=this._modelService.createModel(Me,Ve,_e);break}if(Ae){const Le=B.Event.any(Ae.onWillDispose,xe.object.notebook.onWillDispose)(()=>{Le.dispose(),xe.dispose()})}return Ae}};be=Ee([W(0,C.ITextModelService),W(1,w.IModelService),W(2,v.ILanguageService),W(3,E.INotebookEditorModelResolverService)],be);let Ce=class{constructor(_e,Re,Ne,xe,Ae){this._modelService=Re,this._languageService=Ne,this._labelService=xe,this._notebookModelResolverService=Ae,this._disposables=[],this._disposables.push(_e.registerTextModelContentProvider(t.Schemas.vscodeNotebookCellMetadata,{provideTextContent:this.provideMetadataTextContent.bind(this)})),this._disposables.push(_e.registerTextModelContentProvider(t.Schemas.vscodeNotebookCellOutput,{provideTextContent:this.provideOutputTextContent.bind(this)})),this._disposables.push(this._labelService.registerFormatter({scheme:t.Schemas.vscodeNotebookCellMetadata,formatting:{label:"${path} (metadata)",separator:"/"}})),this._disposables.push(this._labelService.registerFormatter({scheme:t.Schemas.vscodeNotebookCellOutput,formatting:{label:"${path} (output)",separator:"/"}}))}dispose(){(0,f.dispose)(this._disposables)}async provideMetadataTextContent(_e){const Re=this._modelService.getModel(_e);if(Re)return Re;const Ne=d.CellUri.parseCellUri(_e,t.Schemas.vscodeNotebookCellMetadata);if(!Ne)return null;const xe=await this._notebookModelResolverService.resolve(Ne.notebook);let Ae=null;const Le=this._languageService.createById("json");for(const Me of xe.object.notebook.cells)if(Me.handle===Ne.handle){const We=(0,P.getFormattedMetadataJSON)(xe.object.notebook,Me.metadata,Me.language);Ae=this._modelService.createModel(We,Le,_e);break}if(Ae){const Me=Ae.onWillDispose(()=>{Me.dispose(),xe.dispose()})}return Ae}parseStreamOutput(_e){if(!_e)return;const Re=(0,P.getStreamOutputData)(_e.outputs);if(Re)return{content:Re,mode:this._languageService.createById(ce.PLAINTEXT_LANGUAGE_ID)}}_getResult(_e,Re){let Ne;const xe=this._languageService.createById("json"),Ae=Re.outputs.find(Ve=>Ve.outputId===_e.outputId),Le=this.parseStreamOutput(Ae);if(Le)return Ne=Le,Ne;const Me=Re.outputs.map(Ve=>({metadata:Ve.metadata,outputItems:Ve.outputs.map(Ue=>({mimeType:Ue.mime,data:Ue.data.toString()}))}));return Ne={content:(0,I.toFormattedString)(Me,{}),mode:xe},Ne}async provideOutputTextContent(_e){const Re=this._modelService.getModel(_e);if(Re)return Re;const Ne=d.CellUri.parseCellOutputUri(_e);if(!Ne)return null;const xe=await this._notebookModelResolverService.resolve(Ne.notebook),Ae=xe.object.notebook.cells.find(Me=>!!Me.outputs.find(We=>We.outputId===Ne.outputId));if(!Ae)return null;const Le=this._getResult(Ne,Ae);if(Le){const Me=this._modelService.createModel(Le.content,Le.mode,_e),We=B.Event.any(Ae.onDidChangeOutputs,Ae.onDidChangeOutputItems)(()=>{const Ue=this._getResult(Ne,Ae);!Ue||(Me.setValue(Ue.content),Me.setMode(Ue.mode.languageId))}),Ve=Me.onWillDispose(()=>{Ve.dispose(),We.dispose(),xe.dispose()});return Me}return null}};Ce=Ee([W(0,C.ITextModelService),W(1,w.IModelService),W(2,v.ILanguageService),W(3,q.ILabelService),W(4,E.INotebookEditorModelResolverService)],Ce);class ve extends f.Disposable{constructor(){super();this.registerMetadataSchemas()}registerMetadataSchemas(){const _e=l.Registry.as(N.Extensions.JSONContribution),Re={properties:{language:{type:"string",description:"The language for the cell"}},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0};_e.registerSchema("vscode://schemas/notebook/cellmetadata",Re)}}let he=class{constructor(_e,Re,Ne,xe){this._editorService=_e,this._notebookEditorModelService=Re,this._disposables=new f.DisposableStore,this._disposables.add(B.Event.debounce(this._notebookEditorModelService.onDidChangeDirty,(Ae,Le)=>Ae?[...Ae,Le]:[Le],100)(this._openMissingDirtyNotebookEditors,this)),this._disposables.add(Ne.onWillRemoveViewType(Ae=>{for(const Le of xe.groups){const Me=Le.editors.filter(We=>We instanceof n.NotebookEditorInput&&We.viewType===Ae);Le.closeEditors(Me)}}))}dispose(){this._disposables.dispose()}_openMissingDirtyNotebookEditors(_e){const Re=[];for(const Ne of _e)Ne.isDirty()&&!this._editorService.isOpened({resource:Ne.resource,typeId:n.NotebookEditorInput.ID,editorId:Ne.viewType})&&Ne.resource.scheme!==t.Schemas.vscodeInteractive&&Re.push({resource:Ne.resource,options:{inactive:!0,preserveFocus:!0,pinned:!0,override:Ne.viewType}});Re.length>0&&this._editorService.openEditors(Re)}};he=Ee([W(0,m.IEditorService),W(1,E.INotebookEditorModelResolverService),W(2,h.INotebookService),W(3,j.IEditorGroupsService)],he);let ge=class extends f.Disposable{constructor(_e,Re,Ne){super();this._instantiationService=_e,this._workingCopyEditorService=Re,this._extensionService=Ne,this._installHandler()}async _installHandler(){await this._extensionService.whenInstalledExtensionsRegistered(),this._register(this._workingCopyEditorService.registerHandler({handles:_e=>typeof this._getViewType(_e)=="string",isOpen:(_e,Re)=>Re instanceof n.NotebookEditorInput&&Re.viewType===this._getViewType(_e)&&(0,A.isEqual)(_e.resource,Re.resource),createEditor:_e=>n.NotebookEditorInput.create(this._instantiationService,_e.resource,this._getViewType(_e))}))}_getViewType(_e){return d.NotebookWorkingCopyTypeIdentifier.parse(_e.typeId)}};ge=Ee([W(0,s.IInstantiationService),W(1,K.IWorkingCopyEditorService),W(2,H.IExtensionService)],ge);let de=class extends f.Disposable{constructor(_e,Re,Ne,xe){super();this._instantiationService=_e,this._workingCopyEditorService=Re,this._extensionService=Ne,this._workingCopyBackupService=xe,this._installHandler()}async _installHandler(){await this._extensionService.whenInstalledExtensionsRegistered(),this._register(this._workingCopyEditorService.registerHandler({handles:_e=>_e.resource.scheme===t.Schemas.vscodeNotebook,isOpen:(_e,Re)=>(0,n.isCompositeNotebookEditorInput)(Re)?!!Re.editorInputs.find(Ne=>(0,A.isEqual)(D.URI.from({scheme:t.Schemas.vscodeNotebook,path:Ne.resource.toString()}),_e.resource)):Re instanceof n.NotebookEditorInput&&(0,A.isEqual)(D.URI.from({scheme:t.Schemas.vscodeNotebook,path:Re.resource.toString()}),_e.resource),createEditor:async _e=>{const Re=await this._workingCopyBackupService.resolve(_e);if(!Re?.meta)throw new Error(`No backup found for Notebook editor: ${_e.resource}`);return n.NotebookEditorInput.create(this._instantiationService,_e.resource,Re.meta.viewType,{startDirty:!0})}}))}};de=Ee([W(0,s.IInstantiationService),W(1,K.IWorkingCopyEditorService),W(2,H.IExtensionService),W(3,Z.IWorkingCopyBackupService)],de);let Se=class{constructor(_e,Re){this._notebookService=_e,Re.setNotebookTypeResolver(this._getNotebookInfo.bind(this))}_getNotebookInfo(_e){const Re=d.CellUri.parse(_e);if(!Re)return;const Ne=this._notebookService.getNotebookTextModel(Re.notebook);if(!!Ne)return{uri:Ne.uri,type:Ne.viewType}}};Se=Ee([W(0,h.INotebookService),W(1,ae.ILanguageFeaturesService)],Se);const we=l.Registry.as(p.Extensions.Workbench);we.registerWorkbenchContribution(me,1),we.registerWorkbenchContribution(be,1),we.registerWorkbenchContribution(Ce,1),we.registerWorkbenchContribution(ve,1),we.registerWorkbenchContribution(he,2),we.registerWorkbenchContribution(Se,2),we.registerWorkbenchContribution(ge,2),we.registerWorkbenchContribution(de,2),(0,S.registerSingleton)(h.INotebookService,g.NotebookService),(0,S.registerSingleton)(R.INotebookEditorWorkerService,O.NotebookEditorWorkerServiceImpl),(0,S.registerSingleton)(E.INotebookEditorModelResolverService,V.NotebookModelResolverServiceImpl,!0),(0,S.registerSingleton)(x.INotebookCellStatusBarService,F.NotebookCellStatusBarService,!0),(0,S.registerSingleton)(L.INotebookEditorService,M.NotebookEditorWidgetService,!0),(0,S.registerSingleton)(z.INotebookKernelService,U.NotebookKernelService,!0),(0,S.registerSingleton)(te.INotebookExecutionService,ee.NotebookExecutionService,!0),(0,S.registerSingleton)(le.INotebookExecutionStateService,J.NotebookExecutionStateService,!0),(0,S.registerSingleton)(Y.INotebookRendererMessagingService,X.NotebookRendererMessagingService,!0),(0,S.registerSingleton)(se.INotebookKeymapService,ie.NotebookKeymapService,!0);const ye={};function ke(De){return typeof De.type!="undefined"||typeof De.anyOf!="undefined"}for(const De of $.editorOptionsRegistry){const _e=De.schema;if(_e)if(ke(_e))ye[`editor.${De.name}`]=_e;else for(const Re in _e)Object.hasOwnProperty.call(_e,Re)&&(ye[Re]=_e[Re])}const Ie={description:o.localize(0,null),default:{},allOf:[{properties:ye}],tags:["notebookLayout"]};l.Registry.as(c.Extensions.Configuration).registerConfiguration({id:"notebook",order:100,title:o.localize(1,null),type:"object",properties:{[d.NotebookSetting.displayOrder]:{description:o.localize(2,null),type:"array",items:{type:"string"},default:[]},[d.NotebookSetting.cellToolbarLocation]:{description:o.localize(3,null),type:"object",additionalProperties:{markdownDescription:o.localize(4,null),type:"string",enum:["left","right","hidden"]},default:{default:"right"},tags:["notebookLayout"]},[d.NotebookSetting.showCellStatusBar]:{description:o.localize(5,null),type:"string",enum:["hidden","visible","visibleAfterExecute"],enumDescriptions:[o.localize(6,null),o.localize(7,null),o.localize(8,null)],default:"visible",tags:["notebookLayout"]},[d.NotebookSetting.textDiffEditorPreview]:{description:o.localize(9,null),type:"boolean",default:!0,tags:["notebookLayout"]},[d.NotebookSetting.cellToolbarVisibility]:{markdownDescription:o.localize(10,null),type:"string",enum:["hover","click"],default:"click",tags:["notebookLayout"]},[d.NotebookSetting.undoRedoPerCell]:{description:o.localize(11,null),type:"boolean",default:!0,tags:["notebookLayout"]},[d.NotebookSetting.compactView]:{description:o.localize(12,null),type:"boolean",default:!0,tags:["notebookLayout"]},[d.NotebookSetting.focusIndicator]:{description:o.localize(13,null),type:"string",enum:["border","gutter"],default:"gutter",tags:["notebookLayout"]},[d.NotebookSetting.insertToolbarLocation]:{description:o.localize(14,null),type:"string",enum:["betweenCells","notebookToolbar","both","hidden"],enumDescriptions:[o.localize(15,null),o.localize(16,null),o.localize(17,null),o.localize(18,null)],default:"both",tags:["notebookLayout"]},[d.NotebookSetting.globalToolbar]:{description:o.localize(19,null),type:"boolean",default:!0,tags:["notebookLayout"]},[d.NotebookSetting.consolidatedOutputButton]:{description:o.localize(20,null),type:"boolean",default:!0,tags:["notebookLayout"]},[d.NotebookSetting.showFoldingControls]:{description:o.localize(21,null),type:"string",enum:["always","mouseover"],enumDescriptions:[o.localize(22,null),o.localize(23,null)],default:"mouseover",tags:["notebookLayout"]},[d.NotebookSetting.dragAndDropEnabled]:{description:o.localize(24,null),type:"boolean",default:!0,tags:["notebookLayout"]},[d.NotebookSetting.consolidatedRunButton]:{description:o.localize(25,null),type:"boolean",default:!1,tags:["notebookLayout"]},[d.NotebookSetting.globalToolbarShowLabel]:{description:o.localize(26,null),type:"string",enum:["always","never","dynamic"],default:"always",tags:["notebookLayout"]},[d.NotebookSetting.textOutputLineLimit]:{description:o.localize(27,null),type:"number",default:30,tags:["notebookLayout"]},[d.NotebookSetting.markupFontSize]:{markdownDescription:o.localize(28,null),type:"number",default:0,tags:["notebookLayout"]},[d.NotebookSetting.cellEditorOptionsCustomizations]:Ie,[d.NotebookSetting.interactiveWindowCollapseCodeCells]:{markdownDescription:o.localize(29,null),type:"string",enum:["always","never","fromEditor"],default:"fromEditor"}}})}),define(ne[2733],re([1,0,1923,11,30,2,55,8,147,56,44,101,933,373,135,18,782,34,23]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkingCopyHistoryTracker=void 0;let p=class Yi extends A.Disposable{constructor(a,n,h,g,d,m,b,E){super();this.workingCopyService=a,this.workingCopyHistoryService=n,this.uriIdentityService=h,this.pathService=g,this.configurationService=d,this.undoRedoService=m,this.contextService=b,this.fileService=E,this.limiter=this._register(new f.Limiter(c.MAX_PARALLEL_HISTORY_IO_OPS)),this.resourceExcludeMatcher=this._register(new f.IdleValue(()=>this._register(new s.ResourceGlobMatcher(T=>this.configurationService.getValue(Yi.SETTINGS.EXCLUDES,{resource:T}),T=>T.affectsConfiguration(Yi.SETTINGS.EXCLUDES),this.contextService,this.configurationService)))),this.pendingAddHistoryEntryOperations=new k.ResourceMap(y=>this.uriIdentityService.extUri.getComparisonKey(y)),this.workingCopyContentVersion=new k.ResourceMap(y=>this.uriIdentityService.extUri.getComparisonKey(y)),this.historyEntryContentVersion=new k.ResourceMap(y=>this.uriIdentityService.extUri.getComparisonKey(y)),this.registerListeners()}registerListeners(){this._register(this.fileService.onDidRunOperation(a=>this.onDidRunFileOperation(a))),this._register(this.workingCopyService.onDidChangeContent(a=>this.onDidChangeContent(a))),this._register(this.workingCopyService.onDidSave(a=>this.onDidSave(a)))}async onDidRunFileOperation(a){if(!this.shouldTrackHistoryFromFileOperationEvent(a))return;const n=a.resource,h=a.target.resource,g=await this.workingCopyHistoryService.moveEntries(n,h);for(const d of g){const m=this.getContentVersion(d);this.historyEntryContentVersion.set(d,m)}}onDidChangeContent(a){const n=this.getContentVersion(a.resource);this.workingCopyContentVersion.set(a.resource,n+1)}getContentVersion(a){return this.workingCopyContentVersion.get(a)||0}onDidSave(a){if(!this.shouldTrackHistoryFromSaveEvent(a))return;const n=this.getContentVersion(a.workingCopy.resource);if(this.historyEntryContentVersion.get(a.workingCopy.resource)===n)return;this.pendingAddHistoryEntryOperations.get(a.workingCopy.resource)?.dispose(!0);const h=new _.CancellationTokenSource;this.pendingAddHistoryEntryOperations.set(a.workingCopy.resource,h),this.limiter.queue(async()=>{if(h.token.isCancellationRequested)return;const g=this.getContentVersion(a.workingCopy.resource);let d=a.source;a.source||(d=this.resolveSourceFromUndoRedo(a)),await this.workingCopyHistoryService.addEntry({resource:a.workingCopy.resource,source:d,timestamp:a.stat.mtime},h.token),this.historyEntryContentVersion.set(a.workingCopy.resource,g),!h.token.isCancellationRequested&&this.pendingAddHistoryEntryOperations.delete(a.workingCopy.resource)})}resolveSourceFromUndoRedo(a){const n=this.undoRedoService.getLastElement(a.workingCopy.resource);if(n)return n.code==="undoredo.textBufferEdit"?void 0:n.label;const h=this.undoRedoService.getElements(a.workingCopy.resource);if(h.future.length>0||h.past.length>0)return Yi.UNDO_REDO_SAVE_SOURCE}shouldTrackHistoryFromSaveEvent(a){return(0,o.isStoredFileWorkingCopySaveEvent)(a)?this.shouldTrackHistory(a.workingCopy.resource,a.stat):!1}shouldTrackHistoryFromFileOperationEvent(a){return a.isOperation(2)?this.shouldTrackHistory(a.target.resource,a.target):!1}shouldTrackHistory(a,n){if(a.scheme!==this.pathService.defaultUriScheme&&a.scheme!==S.Schemas.vscodeUserData)return!1;const h=1024*this.configurationService.getValue(Yi.SETTINGS.SIZE_LIMIT,{resource:a});return n.size>h||this.configurationService.getValue(Yi.SETTINGS.ENABLED,{resource:a})===!1?!1:!this.resourceExcludeMatcher.value.matches(a)}};p.SETTINGS={ENABLED:"workbench.localHistory.enabled",SIZE_LIMIT:"workbench.localHistory.maxFileSize",EXCLUDES:"workbench.localHistory.exclude"},p.UNDO_REDO_SAVE_SOURCE=v.SaveSourceRegistry.registerSource("undoRedo.source",(0,t.localize)(0,null)),p=Ee([W(0,i.IWorkingCopyService),W(1,c.IWorkingCopyHistoryService),W(2,w.IUriIdentityService),W(3,C.IPathService),W(4,D.IConfigurationService),W(5,I.IUndoRedoService),W(6,l.IWorkspaceContextService),W(7,r.IFileService)],p),e.WorkingCopyHistoryTracker=p}),define(ne[2734],re([1,0,1922,6,13,17,47,2733,2,373,23,109,9,11,19,85,116,157,30,55,56,45,60,31,44,8,15]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkingCopyHistoryService=e.WorkingCopyHistoryModel=void 0;class b{constructor(T,R,O,x,F,L,M,N,B,P){this.historyHome=R,this.entryAddedEmitter=O,this.entryChangedEmitter=x,this.entryReplacedEmitter=F,this.entryRemovedEmitter=L,this.fileService=M,this.labelService=N,this.logService=B,this.configurationService=P,this.entries=[],this.whenResolved=void 0,this.workingCopyResource=void 0,this.workingCopyName=void 0,this.historyEntriesFolder=void 0,this.historyEntriesListingFile=void 0,this.historyEntriesNameMatcher=void 0,this.shouldStore=!1,this.setWorkingCopy(T)}setWorkingCopy(T){this.workingCopyResource=T,this.workingCopyName=this.labelService.getUriBasenameLabel(T),this.historyEntriesNameMatcher=new RegExp(`[A-Za-z0-9]{4}${(0,i.extname)(T)}`),this.historyEntriesFolder=this.toHistoryEntriesFolder(this.historyHome,T),this.historyEntriesListingFile=(0,i.joinPath)(this.historyEntriesFolder,b.ENTRIES_FILE),this.entries=[],this.whenResolved=void 0}toHistoryEntriesFolder(T,R){return(0,i.joinPath)(T,(0,s.hash)(R.toString()).toString(16))}async addEntry(T=b.FILE_SAVED_SOURCE,R=Date.now(),O){let x;const F=(0,m.lastOrDefault)(this.entries);if(F&&F.source===T){const L=this.configurationService.getValue(b.SETTINGS.MERGE_PERIOD,{resource:this.workingCopyResource});R-F.timestamp<=L*1e3&&(x=F)}return x?this.doReplaceEntry(x,R,O):this.doAddEntry(T,R,O)}async doAddEntry(T,R,O){const x=(0,_.assertIsDefined)(this.workingCopyResource),F=(0,_.assertIsDefined)(this.workingCopyName),L=(0,_.assertIsDefined)(this.historyEntriesFolder),M=`${(0,l.randomPath)(void 0,void 0,4)}${(0,i.extname)(x)}`,N=(0,i.joinPath)(L,M);await this.fileService.cloneFile(x,N);const B={id:M,workingCopy:{resource:x,name:F},location:N,timestamp:R,source:T};return this.entries.push(B),this.shouldStore=!0,this.entryAddedEmitter.fire({entry:B}),B}async doReplaceEntry(T,R,O){const x=(0,_.assertIsDefined)(this.workingCopyResource);return await this.fileService.cloneFile(x,T.location),T.timestamp=R,this.shouldStore=!0,this.entryReplacedEmitter.fire({entry:T}),T}async removeEntry(T,R){if(await this.resolveEntriesOnce(),R.isCancellationRequested)return!1;const O=this.entries.indexOf(T);return O===-1?!1:(await this.deleteEntry(T),this.entries.splice(O,1),this.shouldStore=!0,this.entryRemovedEmitter.fire({entry:T}),!0)}async updateEntry(T,R,O){await this.resolveEntriesOnce(),!(O.isCancellationRequested||this.entries.indexOf(T)===-1)&&(T.source=R.source,this.shouldStore=!0,this.entryChangedEmitter.fire({entry:T}))}async getEntries(){await this.resolveEntriesOnce();const T=this.configurationService.getValue(b.SETTINGS.MAX_ENTRIES,{resource:this.workingCopyResource});return this.entries.length>T?this.entries.slice(this.entries.length-T):this.entries}async hasEntries(T){return T||await this.resolveEntriesOnce(),this.entries.length>0}resolveEntriesOnce(){return this.whenResolved||(this.whenResolved=this.doResolveEntries()),this.whenResolved}async doResolveEntries(){const T=await this.resolveEntriesFromDisk();for(const R of this.entries)T.set(R.id,R);this.entries=Array.from(T.values()).sort((R,O)=>R.timestamp-O.timestamp)}async resolveEntriesFromDisk(){const T=(0,_.assertIsDefined)(this.workingCopyResource),R=(0,_.assertIsDefined)(this.workingCopyName),[O,x]=await Promise.all([this.readEntriesFile(),this.readEntriesFolder()]),F=new Map;if(x)for(const L of x)F.set(L.name,{id:L.name,workingCopy:{resource:T,name:R},location:L.resource,timestamp:L.mtime,source:b.FILE_SAVED_SOURCE});if(O)for(const L of O.entries){const M=F.get(L.id);M&&F.set(L.id,{...M,timestamp:L.timestamp,source:L.source??M.source})}return F}async moveEntries(T,R,O){if(await this.store(O),O.isCancellationRequested)return;const x=(0,_.assertIsDefined)(this.historyEntriesFolder),F=this.toHistoryEntriesFolder(this.historyHome,T);try{await this.fileService.move(x,F,!0)}catch(L){L instanceof v.FileOperationError&&L.fileOperationResult===1||this.traceError(L)}this.setWorkingCopy(T),await this.addEntry(R,void 0,O),await this.store(O)}async store(T){const R=(0,_.assertIsDefined)(this.historyEntriesFolder);if(!!this.shouldStore&&(await this.resolveEntriesOnce(),!T.isCancellationRequested)){if(await this.cleanUpEntries(),this.entries.length===0)try{await this.fileService.del(R,{recursive:!0})}catch(O){this.traceError(O)}else await this.writeEntriesFile();this.shouldStore=!1}}async cleanUpEntries(){const T=this.configurationService.getValue(b.SETTINGS.MAX_ENTRIES,{resource:this.workingCopyResource});if(this.entries.length<=T)return;const R=this.entries.slice(0,this.entries.length-T),O=this.entries.slice(this.entries.length-T);for(const x of R)await this.deleteEntry(x);this.entries=O;for(const x of R)this.entryRemovedEmitter.fire({entry:x})}async deleteEntry(T){try{await this.fileService.del(T.location)}catch(R){this.traceError(R)}}async writeEntriesFile(){const T=(0,_.assertIsDefined)(this.workingCopyResource),R=(0,_.assertIsDefined)(this.historyEntriesListingFile),O={version:1,resource:T.toString(),entries:this.entries.map(x=>({id:x.id,source:x.source!==b.FILE_SAVED_SOURCE?x.source:void 0,timestamp:x.timestamp}))};await this.fileService.writeFile(R,n.VSBuffer.fromString(JSON.stringify(O)))}async readEntriesFile(){const T=(0,_.assertIsDefined)(this.historyEntriesListingFile);let R;try{R=JSON.parse((await this.fileService.readFile(T)).value.toString())}catch(O){O instanceof v.FileOperationError&&O.fileOperationResult===1||this.traceError(O)}return R}async readEntriesFolder(){const T=(0,_.assertIsDefined)(this.historyEntriesFolder),R=(0,_.assertIsDefined)(this.historyEntriesNameMatcher);let O;try{O=(await this.fileService.resolve(T,{resolveMetadata:!0})).children}catch(x){x instanceof v.FileOperationError&&x.fileOperationResult===1||this.traceError(x)}if(!!O)return O.filter(x=>!(0,i.isEqual)(x.resource,this.historyEntriesListingFile)&&R.test(x.name))}traceError(T){this.logService.trace("[Working Copy History Service]",T)}}e.WorkingCopyHistoryModel=b,b.ENTRIES_FILE="entries.json",b.FILE_SAVED_SOURCE=g.SaveSourceRegistry.registerSource("default.source",(0,t.localize)(0,null)),b.SETTINGS={MAX_ENTRIES:"workbench.localHistory.maxFileEntries",MERGE_PERIOD:"workbench.localHistory.mergeWindow"};let E=class gs extends I.Disposable{constructor(T,R,O,x,F,L,M){super();this.fileService=T,this.remoteAgentService=R,this.environmentService=O,this.uriIdentityService=x,this.labelService=F,this.logService=L,this.configurationService=M,this._onDidAddEntry=this._register(new f.Emitter),this.onDidAddEntry=this._onDidAddEntry.event,this._onDidChangeEntry=this._register(new f.Emitter),this.onDidChangeEntry=this._onDidChangeEntry.event,this._onDidReplaceEntry=this._register(new f.Emitter),this.onDidReplaceEntry=this._onDidReplaceEntry.event,this._onDidMoveEntries=this._register(new f.Emitter),this.onDidMoveEntries=this._onDidMoveEntries.event,this._onDidRemoveEntry=this._register(new f.Emitter),this.onDidRemoveEntry=this._onDidRemoveEntry.event,this._onDidRemoveEntries=this._register(new f.Emitter),this.onDidRemoveEntries=this._onDidRemoveEntries.event,this.localHistoryHome=new c.DeferredPromise,this.models=new p.ResourceMap(N=>this.uriIdentityService.extUri.getComparisonKey(N)),this.resolveLocalHistoryHome()}async resolveLocalHistoryHome(){let T;try{const R=await this.remoteAgentService.getEnvironment();R&&(T=R.localHistoryHome)}catch(R){this.logService.trace(R)}T||(T=this.environmentService.localHistoryHome),this.localHistoryHome.complete(T)}async moveEntries(T,R){const O=new c.Limiter(w.MAX_PARALLEL_HISTORY_IO_OPS),x=[];for(const[L,M]of this.models){if(!this.uriIdentityService.extUri.isEqualOrParent(L,T))continue;let N;if(this.uriIdentityService.extUri.isEqual(T,L))N=R;else{const P=(0,l.indexOfPath)(L.path,T.path);N=(0,i.joinPath)(R,L.path.substr(P+T.path.length+1))}let B;this.uriIdentityService.extUri.isEqual((0,i.dirname)(L),(0,i.dirname)(N))?B=gs.FILE_RENAMED_SOURCE:B=gs.FILE_MOVED_SOURCE,x.push(O.queue(()=>this.doMoveEntries(M,B,L,N)))}if(!x.length)return[];const F=await Promise.all(x);return this._onDidMoveEntries.fire(),F}async doMoveEntries(T,R,O,x){return await T.moveEntries(x,R,r.CancellationToken.None),this.models.delete(O),this.models.set(x,T),x}async addEntry({resource:T,source:R,timestamp:O},x){if(!this.fileService.hasProvider(T))return;const F=await this.getModel(T);if(!x.isCancellationRequested)return F.addEntry(R,O,x)}async updateEntry(T,R,O){const x=await this.getModel(T.workingCopy.resource);if(!O.isCancellationRequested)return x.updateEntry(T,R,O)}async removeEntry(T,R){const O=await this.getModel(T.workingCopy.resource);return R.isCancellationRequested?!1:O.removeEntry(T,R)}async removeAll(T){const R=await this.localHistoryHome.p;T.isCancellationRequested||(this.models.clear(),await this.fileService.del(R,{recursive:!0}),this._onDidRemoveEntries.fire())}async getEntries(T,R){const O=await this.getModel(T);return R.isCancellationRequested?[]:await O.getEntries()??[]}async getAll(T){const R=await this.localHistoryHome.p;if(T.isCancellationRequested)return[];const O=new p.ResourceMap;for(const[x,F]of this.models)await F.hasEntries(!0)&&O.set(x,!0);try{const x=await this.fileService.resolve(R);if(x.children){const F=new c.Limiter(w.MAX_PARALLEL_HISTORY_IO_OPS),L=[];for(const M of x.children)L.push(F.queue(async()=>{if(!T.isCancellationRequested)try{const N=JSON.parse((await this.fileService.readFile((0,i.joinPath)(M.resource,b.ENTRIES_FILE))).value.toString());N.entries.length>0&&O.set(o.URI.parse(N.resource),!0)}catch{}}));await Promise.all(L)}}catch{}return Array.from(O.keys())}async getModel(T){const R=await this.localHistoryHome.p;let O=this.models.get(T);return O||(O=this.createModel(T,R),this.models.set(T,O)),O}createModel(T,R){return new b(T,R,this._onDidAddEntry,this._onDidChangeEntry,this._onDidReplaceEntry,this._onDidRemoveEntry,this.fileService,this.labelService,this.logService,this.configurationService)}};E.FILE_MOVED_SOURCE=g.SaveSourceRegistry.registerSource("moved.source",(0,t.localize)(1,null)),E.FILE_RENAMED_SOURCE=g.SaveSourceRegistry.registerSource("renamed.source",(0,t.localize)(2,null)),E=Ee([W(0,v.IFileService),W(1,C.IRemoteAgentService),W(2,S.IEnvironmentService),W(3,u.IUriIdentityService),W(4,a.ILabelService),W(5,h.ILogService),W(6,d.IConfigurationService)],E),e.WorkingCopyHistoryService=E,A.Registry.as(k.Extensions.Workbench).registerWorkbenchContribution(D.WorkingCopyHistoryTracker,3)}),define(ne[2735],re([1,0,1924,160,154,135,76,54,81,34,14,23,87,2681,31,21,85,30,67,11,240,59]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeWorkingCopyBackupTracker=void 0;let n=class extends c.WorkingCopyBackupTracker{constructor(g,d,m,b,E,y,T,R,O,x,F,L,M,N){super(g,m,O,b,d,L,M,N);this.fileDialogService=E,this.dialogService=y,this.contextService=T,this.nativeHostService=R,this.environmentService=x,this.progressService=F}async onFinalBeforeShutdown(g){this.cancelBackupOperations();const{resume:d}=this.suspendBackupOperations();try{const m=this.workingCopyService.dirtyWorkingCopies;return m.length?await this.onBeforeShutdownWithDirty(g,m):await this.onBeforeShutdownWithoutDirty()}finally{d()}}async onBeforeShutdownWithDirty(g,d){if(this.filesConfigurationService.getAutoSaveMode()!==0){try{await this.doSaveAllBeforeShutdown(!1,2)}catch(b){this.logService.error(`[backup tracker] error saving dirty working copies: ${b}`)}const m=this.workingCopyService.dirtyWorkingCopies;return m.length?this.handleDirtyBeforeShutdown(m,g):!1}return this.handleDirtyBeforeShutdown(d,g)}async handleDirtyBeforeShutdown(g,d){let m=[],b;if(await this.shouldBackupBeforeShutdown(d))try{const T=await this.backupBeforeShutdown(g);if(m=T.backups,b=T.error,m.length===g.length)return!1}catch(T){b=T}const y=g.filter(T=>!m.includes(T));if(b)return this.environmentService.isExtensionDevelopment?(this.logService.error(`[backup tracker] error creating backups: ${b}`),!1):(this.showErrorDialog((0,t.localize)(0,null),y,b),!0);try{return await this.confirmBeforeShutdown(y)}catch(T){return this.environmentService.isExtensionDevelopment?(this.logService.error(`[backup tracker] error saving or reverting dirty working copies: ${T}`),!1):(this.showErrorDialog((0,t.localize)(1,null),y,T),!0)}}async shouldBackupBeforeShutdown(g){let d;if(!this.filesConfigurationService.isHotExitEnabled)d=!1;else if(this.environmentService.isExtensionDevelopment)d=!0;else switch(g){case 1:this.contextService.getWorkbenchState()!==1&&this.filesConfigurationService.hotExitConfiguration===C.HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE?d=!0:await this.nativeHostService.getWindowCount()>1||v.isMacintosh?d=!1:d=!0;break;case 2:d=!0;break;case 3:d=!0;break;case 4:this.contextService.getWorkbenchState()!==1&&this.filesConfigurationService.hotExitConfiguration===C.HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE?d=!0:d=!1;break}return d}showErrorDialog(g,d,m){const b=d.filter(T=>T.isDirty()),E=(0,t.localize)(2,null),y=b.length?(0,D.getFileNamesMessage)(b.map(T=>T.name))+` `+E:E;this.dialogService.show(I.default.Error,g,void 0,{detail:y}),this.logService.error(m?`[backup tracker] ${g}: ${m}`:`[backup tracker] ${g}`)}async backupBeforeShutdown(g){const d=[];let m;return await this.withProgressAndCancellation(async b=>{try{await p.Promises.settled(g.map(async E=>{const y=this.getContentVersion(E);if(this.workingCopyBackupService.hasBackupSync(E,y))d.push(E);else{const T=await E.backup(b);if(b.isCancellationRequested||(await this.workingCopyBackupService.backup(E,T.content,y,T.meta,b),b.isCancellationRequested))return;d.push(E)}}))}catch(E){m=E}},(0,t.localize)(3,null),(0,t.localize)(4,null)),{backups:d,error:m}}async confirmBeforeShutdown(g){const d=await this.fileDialogService.showSaveConfirm(g.map(m=>m.name));if(d===0){const m=this.workingCopyService.dirtyCount;try{await this.doSaveAllBeforeShutdown(g,1)}catch(E){this.logService.error(`[backup tracker] error saving dirty working copies: ${E}`)}return m-this.workingCopyService.dirtyCount<g.length?!0:this.noVeto(g)}else if(d===1){try{await this.doRevertAllBeforeShutdown(g)}catch(m){this.logService.error(`[backup tracker] error reverting dirty working copies: ${m}`)}return this.noVeto(g)}return!0}doSaveAllBeforeShutdown(g,d){const m=Array.isArray(g)?g:this.workingCopyService.dirtyWorkingCopies.filter(b=>!(g===!1&&b.capabilities&2));return this.withProgressAndCancellation(async()=>{const b={skipSaveParticipants:!0,reason:d};let E;(typeof g=="boolean"||m.length===this.workingCopyService.dirtyCount)&&(E=await this.editorService.saveAll({includeUntitled:typeof g=="boolean"?g:!0,...b})),E!==!1&&await p.Promises.settled(m.map(y=>y.isDirty()?y.save(b):Promise.resolve(!0)))},(0,t.localize)(5,null))}doRevertAllBeforeShutdown(g){return this.withProgressAndCancellation(async()=>{const d={soft:!0};g.length===this.workingCopyService.dirtyCount&&await this.editorService.revertAll(d),await p.Promises.settled(g.map(m=>m.isDirty()?m.revert(d):Promise.resolve()))},(0,t.localize)(6,null))}async noVeto(g){return await this.discardBackupsBeforeShutdown(g),!1}async onBeforeShutdownWithoutDirty(){return await this.discardBackupsBeforeShutdown({except:this.contextService.getWorkbenchState()===1?[]:Array.from(this.unrestoredBackups)}),!1}async discardBackupsBeforeShutdown(g){!this.isReady||await this.withProgressAndCancellation(async()=>{try{Array.isArray(g)?await p.Promises.settled(g.map(d=>this.workingCopyBackupService.discardBackup(d))):await this.workingCopyBackupService.discardBackups(g)}catch(d){this.logService.error(`[backup tracker] error discarding backups: ${d}`)}},(0,t.localize)(7,null))}withProgressAndCancellation(g,d,m){const b=new l.CancellationTokenSource;return this.progressService.withProgress({location:20,cancellable:!0,delay:800,title:d,detail:m},()=>(0,p.raceCancellation)(g(b.token),b.token),()=>b.dispose(!0))}};n=Ee([W(0,f.IWorkingCopyBackupService),W(1,_.IFilesConfigurationService),W(2,A.IWorkingCopyService),W(3,k.ILifecycleService),W(4,D.IFileDialogService),W(5,D.IDialogService),W(6,w.IWorkspaceContextService),W(7,o.INativeHostService),W(8,i.ILogService),W(9,s.IEnvironmentService),W(10,r.IProgressService),W(11,u.IWorkingCopyEditorService),W(12,S.IEditorService),W(13,a.IEditorGroupsService)],n),e.NativeWorkingCopyBackupTracker=n}),define(ne[2736],re([1,0,926,9,35,160,23,31,121,17,47,76,2735]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeWorkingCopyBackupService=void 0;let c=class extends t.WorkingCopyBackupService{constructor(S,s,l,r){super(S.backupPath?f.URI.file(S.backupPath).with({scheme:S.userRoamingDataHome.scheme}):void 0,s,l);this.lifecycleService=r,this.registerListeners()}registerListeners(){this.lifecycleService.onWillShutdown(S=>S.join(this.joinBackups(),"join.workingCopyBackups"))}};c=Ee([W(0,I.INativeWorkbenchEnvironmentService),W(1,k.IFileService),W(2,D.ILogService),W(3,C.ILifecycleService)],c),e.NativeWorkingCopyBackupService=c,(0,_.registerSingleton)(A.IWorkingCopyBackupService,c),w.Registry.as(v.Extensions.Workbench).registerWorkbenchContribution(o.NativeWorkingCopyBackupTracker,1)}),define(ne[2737],re([1,0,11,76,23,109,85,56,45,31,8,2734,35,373]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeWorkingCopyHistoryService=void 0;let i=class extends C.WorkingCopyHistoryService{constructor(s,l,r,p,u,a,n,h){super(s,l,r,p,u,n,h);this.lifecycleService=a,this.lifecycleService.onWillShutdown(g=>this.onWillShutdown(g))}onWillShutdown(s){s.join((async()=>{const l=new t.Limiter(c.MAX_PARALLEL_HISTORY_IO_OPS),r=[],p=Array.from(this.models.values());for(const u of p)r.push(l.queue(async()=>{if(!s.token.isCancellationRequested)try{await u.store(s.token)}catch(a){this.logService.trace(a)}}));await Promise.all(r)})(),"join.workingCopyHistory")}};i=Ee([W(0,_.IFileService),W(1,A.IRemoteAgentService),W(2,k.IEnvironmentService),W(3,D.IUriIdentityService),W(4,I.ILabelService),W(5,f.ILifecycleService),W(6,w.ILogService),W(7,v.IConfigurationService)],i),e.NativeWorkingCopyHistoryService=i,(0,o.registerSingleton)(c.IWorkingCopyHistoryService,i,!0)}),define(ne[2738],re([1,0,1925,34,272,189,57,17,28,15,19,26,23,50,54,111,8,83,69,18,56,114]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractWorkspaceEditingService=void 0;let n=class{constructor(g,d,m,b,E,y,T,R,O,x,F,L,M,N){this.jsonEditingService=g,this.contextService=d,this.configurationService=m,this.notificationService=b,this.commandService=E,this.fileService=y,this.textFileService=T,this.workspacesService=R,this.environmentService=O,this.fileDialogService=x,this.dialogService=F,this.hostService=L,this.uriIdentityService=M,this.workspaceTrustManagementService=N}async pickNewWorkspacePath(){const g=[p.Schemas.file];this.environmentService.remoteAuthority&&g.unshift(p.Schemas.vscodeRemote);let d=await this.fileDialogService.showSaveDialog({saveLabel:(0,S.mnemonicButtonLabel)((0,t.localize)(0,null)),title:(0,t.localize)(1,null),filters:f.WORKSPACE_FILTER,defaultUri:await this.fileDialogService.defaultWorkspacePath(void 0,this.getNewWorkspaceName()),availableFileSystems:g});if(!!d)return(0,f.hasWorkspaceFileExtension)(d)||(d=d.with({path:`${d.path}.${f.WORKSPACE_EXTENSION}`})),d}getNewWorkspaceName(){switch(this.contextService.getWorkbenchState()){case 2:{const g=(0,w.firstOrDefault)(this.contextService.getWorkspace().folders);if(g)return`${(0,v.basename)(g.uri)}.${f.WORKSPACE_EXTENSION}`;break}case 3:{const g=this.getCurrentWorkspaceIdentifier()?.configPath;if(g&&(0,f.isSavedWorkspace)(g,this.environmentService))return(0,v.basename)(g);break}}return`workspace.${f.WORKSPACE_EXTENSION}`}async updateFolders(g,d,m,b){const E=this.contextService.getWorkspace().folders;let y=[];typeof d=="number"&&(y=E.slice(g,g+d).map(x=>x.uri));let T=[];Array.isArray(m)&&(T=m.map(x=>({uri:(0,v.removeTrailingPathSeparator)(x.uri),name:x.name})));const R=y.length>0,O=T.length>0;if(!(!O&&!R))return O&&!R?this.doAddFolders(T,g,b):R&&!O?this.removeFolders(y):this.includesSingleFolderWorkspace(y)?this.createAndEnterWorkspace(T):this.contextService.getWorkbenchState()!==3?this.doAddFolders(T,g,b):this.doUpdateFolders(T,y,g,b)}async doUpdateFolders(g,d,m,b=!1){try{await this.contextService.updateFolders(g,d,m)}catch(E){if(b)throw E;this.handleWorkspaceConfigurationEditingError(E)}}addFolders(g,d=!1){const m=g.map(b=>({uri:(0,v.removeTrailingPathSeparator)(b.uri),name:b.name}));return this.doAddFolders(m,void 0,d)}async doAddFolders(g,d,m=!1){const b=this.contextService.getWorkbenchState(),E=this.environmentService.remoteAuthority;if(E&&(g=g.filter(y=>y.uri.scheme!==p.Schemas.file&&(y.uri.scheme!==p.Schemas.vscodeRemote||(0,v.isEqualAuthority)(y.uri.authority,E)))),b!==3){let y=this.contextService.getWorkspace().folders.map(T=>({uri:T.uri}));return y.splice(typeof d=="number"?d:y.length,0,...g),y=(0,w.distinct)(y,T=>this.uriIdentityService.extUri.getComparisonKey(T.uri)),b===1&&y.length===0||b===2&&y.length===1?void 0:this.createAndEnterWorkspace(y)}try{await this.contextService.addFolders(g,d)}catch(y){if(m)throw y;this.handleWorkspaceConfigurationEditingError(y)}}async removeFolders(g,d=!1){if(this.includesSingleFolderWorkspace(g))return this.createAndEnterWorkspace([]);try{await this.contextService.removeFolders(g)}catch(m){if(d)throw m;this.handleWorkspaceConfigurationEditingError(m)}}includesSingleFolderWorkspace(g){if(this.contextService.getWorkbenchState()===2){const d=this.contextService.getWorkspace().folders[0];return g.some(m=>this.uriIdentityService.extUri.isEqual(m,d.uri))}return!1}async createAndEnterWorkspace(g,d){if(d&&!await this.isValidTargetWorkspacePath(d))return;const m=this.environmentService.remoteAuthority,b=await this.workspacesService.createUntitledWorkspace(g,m);if(d)try{await this.saveWorkspaceAs(b,d)}finally{await this.workspacesService.deleteUntitledWorkspace(b)}else d=b.configPath;return this.enterWorkspace(d)}async saveAndEnterWorkspace(g){const d=this.getCurrentWorkspaceIdentifier();if(!!d){if((0,v.isEqual)(d.configPath,g))return this.saveWorkspace(d);if(!!await this.isValidTargetWorkspacePath(g))return await this.saveWorkspaceAs(d,g),this.enterWorkspace(g)}}async isValidTargetWorkspacePath(g){return!0}async saveWorkspaceAs(g,d){const m=g.configPath;if(this.uriIdentityService.extUri.isEqual(m,d))return;const b=(0,f.isUntitledWorkspace)(m,this.environmentService),E=await this.fileService.readFile(m),y=(0,A.rewriteWorkspaceFileForNewLocation)(E.value.toString(),m,b,d,this.uriIdentityService.extUri);await this.textFileService.create([{resource:d,value:y,options:{overwrite:!0}}]),await this.trustWorkspaceConfiguration(d)}async saveWorkspace(g){const d=g.configPath,m=this.textFileService.files.get(d);if(m){await m.save({force:!0,reason:1});return}if(await this.fileService.exists(d))return;const E={folders:[]},y=(0,A.rewriteWorkspaceFileForNewLocation)(JSON.stringify(E,null," "),d,!1,d,this.uriIdentityService.extUri);await this.textFileService.create([{resource:d,value:y}])}handleWorkspaceConfigurationEditingError(g){switch(g.code){case 1:this.onInvalidWorkspaceConfigurationFileError();break;case 0:this.onWorkspaceConfigurationFileDirtyError();break;default:this.notificationService.error(g.message)}}onInvalidWorkspaceConfigurationFileError(){const g=(0,t.localize)(2,null);this.askToOpenWorkspaceConfigurationFile(g)}onWorkspaceConfigurationFileDirtyError(){const g=(0,t.localize)(3,null);this.askToOpenWorkspaceConfigurationFile(g)}askToOpenWorkspaceConfigurationFile(g){this.notificationService.prompt(C.Severity.Error,g,[{label:(0,t.localize)(4,null),run:()=>this.commandService.executeCommand("workbench.action.openWorkspaceConfigFile")}])}async doEnterWorkspace(g){if(this.environmentService.extensionTestsLocationURI)throw new Error("Entering a new workspace is not possible in tests.");const d=await this.workspacesService.getWorkspaceIdentifier(g);return this.contextService.getWorkbenchState()===2&&await this.migrateWorkspaceSettings(d),await this.contextService.initialize(d),this.workspacesService.enterWorkspace(g)}migrateWorkspaceSettings(g){return this.doCopyWorkspaceSettings(g,d=>d.scope===3)}copyWorkspaceSettings(g){return this.doCopyWorkspaceSettings(g)}doCopyWorkspaceSettings(g,d){const m=D.Registry.as(k.Extensions.Configuration).getConfigurationProperties(),b={};for(const E of this.configurationService.keys().workspace)if(m[E]){if(d&&!d(m[E]))continue;b[E]=this.configurationService.inspect(E).workspaceValue}return this.jsonEditingService.write(g.configPath,[{path:["settings"],value:b}],!0)}async trustWorkspaceConfiguration(g){this.contextService.getWorkbenchState()!==1&&this.workspaceTrustManagementService.isWorkspaceTrusted()&&await this.workspaceTrustManagementService.setUrisTrust([g],!0)}getCurrentWorkspaceIdentifier(){const g=this.contextService.getWorkspace();if(g?.configuration)return{id:g.id,configPath:g.configuration}}};n=Ee([W(0,_.IJSONEditingService),W(1,f.IWorkspaceContextService),W(2,s.IConfigurationService),W(3,C.INotificationService),W(4,I.ICommandService),W(5,o.IFileService),W(6,l.ITextFileService),W(7,A.IWorkspacesService),W(8,c.IWorkbenchEnvironmentService),W(9,i.IFileDialogService),W(10,i.IDialogService),W(11,r.IHostService),W(12,u.IUriIdentityService),W(13,a.IWorkspaceTrustManagementService)],n),e.AbstractWorkspaceEditingService=n}),define(ne[2739],re([1,0,18,9,1926,174]),function(Q,e,t,f,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceTrustEditorInput=void 0;class k extends A.EditorInput{constructor(){super(...arguments);this.resource=f.URI.from({scheme:t.Schemas.vscodeWorkspaceTrust,path:"workspaceTrustEditor"})}get capabilities(){return 2|8}get typeId(){return k.ID}matches(I){return super.matches(I)||I instanceof k}getName(){return(0,_.localize)(0,null)}}e.WorkspaceTrustEditorInput=k,k.ID="workbench.input.workspaceTrust"}),define(ne[276],re([1,0,5]),function(Q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWorkspaceEditingService=void 0,e.IWorkspaceEditingService=(0,t.createDecorator)("workspaceEditingService")}),define(ne[2740],re([1,0,22,2,14,13,9,1365,85,23,5,45,26,187,114,34,75,624,334,21,192,276,65]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadWorkspace=void 0;let h=class{constructor(d,m,b,E,y,T,R,O,x,F,L,M,N){this._searchService=m,this._contextService=b,this._editorService=E,this._workspaceEditingService=y,this._notificationService=T,this._requestService=R,this._instantiationService=O,this._labelService=x,this._environmentService=F,this._workspaceTrustManagementService=M,this._workspaceTrustRequestService=N,this._toDispose=new f.DisposableStore,this._activeCancelTokens=Object.create(null),this._queryBuilder=this._instantiationService.createInstance(r.QueryBuilder),this._proxy=d.getProxy(n.ExtHostContext.ExtHostWorkspace);const B=this._contextService.getWorkspace();B.configuration&&!_.isNative&&!L.hasProvider(B.configuration)?this._proxy.$initializeWorkspace(this.getWorkspaceData(B),this.isWorkspaceTrusted()):this._contextService.getCompleteWorkspace().then(P=>this._proxy.$initializeWorkspace(this.getWorkspaceData(P),this.isWorkspaceTrusted())),this._contextService.onDidChangeWorkspaceFolders(this._onDidChangeWorkspace,this,this._toDispose),this._contextService.onDidChangeWorkbenchState(this._onDidChangeWorkspace,this,this._toDispose),this._workspaceTrustManagementService.onDidChangeTrust(this._onDidGrantWorkspaceTrust,this,this._toDispose)}dispose(){this._toDispose.dispose();for(let d in this._activeCancelTokens)this._activeCancelTokens[d].cancel()}$updateWorkspaceFolders(d,m,b,E){const y=E.map(T=>({uri:k.URI.revive(T.uri),name:T.name}));return this._notificationService.status(this.getStatusMessage(d,y.length,b),{hideAfter:10*1e3}),this._workspaceEditingService.updateFolders(m,b,y,!0)}getStatusMessage(d,m,b){let E;const y=m>0,T=b>0;return y&&!T?m===1?E=(0,D.localize)(0,null,d):E=(0,D.localize)(1,null,d,m):T&&!y?b===1?E=(0,D.localize)(2,null,d):E=(0,D.localize)(3,null,d,b):E=(0,D.localize)(4,null,d),E}_onDidChangeWorkspace(){this._proxy.$acceptWorkspaceData(this.getWorkspaceData(this._contextService.getWorkspace()))}getWorkspaceData(d){return this._contextService.getWorkbenchState()===1?null:{configuration:d.configuration||void 0,isUntitled:d.configuration?(0,S.isUntitledWorkspace)(d.configuration,this._environmentService):!1,folders:d.folders,id:d.id,name:this._labelService.getWorkspaceLabel(d),transient:d.transient}}$startFileSearch(d,m,b,E,y){const T=k.URI.revive(m),R=this._contextService.getWorkspace();if(!R.folders.length)return Promise.resolve(null);const O=this._queryBuilder.file(T?[T]:R.folders,{maxResults:(0,A.withNullAsUndefined)(E),disregardExcludeSettings:b===!1||void 0,disregardSearchExcludeSettings:!0,disregardIgnoreFiles:!0,includePattern:(0,A.withNullAsUndefined)(d),excludePattern:typeof b=="string"?b:void 0,_reason:"startFileSearch"});return this._searchService.fileSearch(O,y).then(x=>x.results.map(F=>F.resource),x=>(0,t.isCancellationError)(x)?null:Promise.reject(x))}$startTextSearch(d,m,b,E,y){const T=k.URI.revive(m),R=this._contextService.getWorkspace(),O=T?[T]:R.folders.map(M=>M.uri),x=this._queryBuilder.text(d,O,b);x._reason="startTextSearch";const F=M=>{M.results&&this._proxy.$handleTextSearchResult(M,E)};return this._searchService.textSearch(x,y,F).then(M=>({limitHit:M.limitHit}),M=>(0,t.isCancellationError)(M)?null:Promise.reject(M))}$checkExists(d,m,b){return this._instantiationService.invokeFunction(E=>(0,l.checkGlobFileExists)(E,d,m,b))}$saveAll(d){return this._editorService.saveAll({includeUntitled:d})}$resolveProxy(d){return this._requestService.resolveProxy(d)}$requestWorkspaceTrust(d){return this._workspaceTrustRequestService.requestWorkspaceTrust(d)}isWorkspaceTrusted(){return this._workspaceTrustManagementService.isWorkspaceTrusted()}_onDidGrantWorkspaceTrust(){this._proxy.$onDidGrantWorkspaceTrust()}};h=Ee([(0,s.extHostNamedCustomer)(n.MainContext.MainThreadWorkspace),W(1,u.ISearchService),W(2,S.IWorkspaceContextService),W(3,p.IEditorService),W(4,a.IWorkspaceEditingService),W(5,o.INotificationService),W(6,c.IRequestService),W(7,v.IInstantiationService),W(8,C.ILabelService),W(9,I.IEnvironmentService),W(10,w.IFileService),W(11,i.IWorkspaceTrustManagementService),W(12,i.IWorkspaceTrustRequestService)],h),e.MainThreadWorkspace=h}),define(ne[376],re([1,0,1377,34,276,19,30,111,28,23,45,53,198,52,42,54,9,18,189,101]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PICK_WORKSPACE_FOLDER_COMMAND_ID=e.SET_ROOT_FOLDER_COMMAND_ID=e.ADD_ROOT_FOLDER_LABEL=e.ADD_ROOT_FOLDER_COMMAND_ID=void 0,e.ADD_ROOT_FOLDER_COMMAND_ID="addRootFolder",e.ADD_ROOT_FOLDER_LABEL={value:(0,t.localize)(0,null),original:"Add Folder to Workspace..."},e.SET_ROOT_FOLDER_COMMAND_ID="setRootFolder",e.PICK_WORKSPACE_FOLDER_COMMAND_ID="_workbench.pickWorkspaceFolder",I.CommandsRegistry.registerCommand({id:"workbench.action.files.openFileFolderInNewWindow",handler:a=>a.get(S.IFileDialogService).pickFileFolderAndOpen({forceNewWindow:!0})}),I.CommandsRegistry.registerCommand({id:"_files.pickFolderAndOpen",handler:(a,n)=>a.get(S.IFileDialogService).pickFolderAndOpen(n)}),I.CommandsRegistry.registerCommand({id:"workbench.action.files.openFolderInNewWindow",handler:a=>a.get(S.IFileDialogService).pickFolderAndOpen({forceNewWindow:!0})}),I.CommandsRegistry.registerCommand({id:"workbench.action.files.openFileInNewWindow",handler:a=>a.get(S.IFileDialogService).pickFileAndOpen({forceNewWindow:!0})}),I.CommandsRegistry.registerCommand({id:"workbench.action.openWorkspaceInNewWindow",handler:a=>a.get(S.IFileDialogService).pickWorkspaceAndOpen({forceNewWindow:!0})}),I.CommandsRegistry.registerCommand({id:e.ADD_ROOT_FOLDER_COMMAND_ID,handler:async a=>{const n=a.get(_.IWorkspaceEditingService),h=await u(a);!h||!h.length||await n.addFolders(h.map(g=>({uri:g})))}}),I.CommandsRegistry.registerCommand({id:e.SET_ROOT_FOLDER_COMMAND_ID,handler:async a=>{const n=a.get(_.IWorkspaceEditingService),h=a.get(f.IWorkspaceContextService),g=await u(a);!g||!g.length||await n.updateFolders(0,h.getWorkspace().folders.length,g.map(d=>({uri:d})))}});async function u(a){const n=a.get(S.IFileDialogService),h=a.get(p.IPathService);return await n.showOpenDialog({openLabel:(0,D.mnemonicButtonLabel)((0,t.localize)(1,null)),title:(0,t.localize)(2,null),canSelectFolders:!0,canSelectMany:!0,defaultUri:await n.defaultFolderPath(),availableFileSystems:[h.defaultUriScheme]})}I.CommandsRegistry.registerCommand(e.PICK_WORKSPACE_FOLDER_COMMAND_ID,async function(a,n){const h=a.get(C.IQuickInputService),g=a.get(v.ILabelService),d=a.get(f.IWorkspaceContextService),m=a.get(c.IModelService),b=a.get(i.ILanguageService),E=d.getWorkspace().folders;if(!E.length)return;const y=E.map(x=>({label:x.name,description:g.getUriLabel((0,A.dirname)(x.uri),{relative:!0}),folder:x,iconClasses:(0,o.getIconClasses)(m,b,x.uri,w.FileKind.ROOT_FOLDER)})),T=(n?n[0]:void 0)||Object.create(null);T.activeItem||(T.activeItem=y[0]),T.placeHolder||(T.placeHolder=(0,t.localize)(3,null)),typeof T.matchOnDescription!="boolean"&&(T.matchOnDescription=!0);const R=(n?n[1]:void 0)||k.CancellationToken.None,O=await h.pick(y,T,R);if(O)return E[y.indexOf(O)]}),I.CommandsRegistry.registerCommand({id:"vscode.openFolder",handler:(a,n,h)=>{const g=a.get(I.ICommandService);if(typeof h=="boolean"&&(h={forceNewWindow:h}),!n){const b={forceNewWindow:h?.forceNewWindow};return h?.forceLocalWindow&&(b.remoteAuthority=null,b.availableFileSystems=["file"]),g.executeCommand("_files.pickFolderAndOpen",b)}n=s.URI.revive(n);const d={forceNewWindow:h?.forceNewWindow,forceReuseWindow:h?.forceReuseWindow,noRecentEntry:h?.noRecentEntry,remoteAuthority:h?.forceLocalWindow?null:void 0},m=(0,f.hasWorkspaceFileExtension)(n)||n.scheme===l.Schemas.untitled?{workspaceUri:n}:{folderUri:n};return g.executeCommand("_files.windowOpen",[m],d)},description:{description:"Open a folder or workspace in the current window or new window depending on the newWindow argument. Note that opening in the same window will shutdown the current extension host process and start a new one on the given folder/workspace unless the newWindow parameter is set to true.",args:[{name:"uri",description:"(optional) Uri of the folder or workspace file to open. If not provided, a native dialog will ask the user for the folder",constraint:a=>a==null||a instanceof s.URI},{name:"options",description:"(optional) Options. Object with the following properties: `forceNewWindow`: Whether to open the folder/workspace in a new window or the same. Defaults to opening in the same window. `forceReuseWindow`: Whether to force opening the folder/workspace in the same window. Defaults to false. `noRecentEntry`: Whether the opened URI will appear in the 'Open Recent' list. Defaults to false. Note, for backward compatibility, options can also be of type boolean, representing the `forceNewWindow` setting.",constraint:a=>a===void 0||typeof a=="object"||typeof a=="boolean"}]}}),I.CommandsRegistry.registerCommand({id:"vscode.newWindow",handler:(a,n)=>{const h=a.get(I.ICommandService),g={forceReuseWindow:n&&n.reuseWindow,remoteAuthority:n&&n.remoteAuthority};return h.executeCommand("_files.newWindow",g)},description:{description:"Opens an new window depending on the newWindow argument.",args:[{name:"options",description:"(optional) Options. Object with the following properties: `reuseWindow`: Whether to open a new window or the same. Defaults to opening in a new window. ",constraint:a=>a===void 0||typeof a=="object"}]}}),I.CommandsRegistry.registerCommand("_workbench.removeFromRecentlyOpened",function(a,n){return a.get(r.IWorkspacesService).removeRecentlyOpened([n])}),I.CommandsRegistry.registerCommand({id:"vscode.removeFromRecentlyOpened",handler:(a,n)=>{const h=a.get(r.IWorkspacesService);return typeof n=="string"?n=n.match(/^[^:/?#]+:\/\//)?s.URI.parse(n):s.URI.file(n):n=s.URI.revive(n),h.removeRecentlyOpened([n])},description:{description:"Removes an entry with the given path from the recently opened list.",args:[{name:"path",description:"URI or URI string to remove from recently opened.",constraint:a=>typeof a=="string"||a instanceof s.URI}]}}),I.CommandsRegistry.registerCommand("_workbench.addToRecentlyOpened",async function(a,n){const h=a.get(r.IWorkspacesService),g=n.uri,d=n.label,m=n.remoteAuthority;let b;return n.type==="workspace"?b={workspace:await h.getWorkspaceIdentifier(g),label:d,remoteAuthority:m}:n.type==="folder"?b={folderUri:g,label:d,remoteAuthority:m}:b={fileUri:g,label:d,remoteAuthority:m},h.addRecentlyOpened([b])}),I.CommandsRegistry.registerCommand("_workbench.getRecentlyOpened",async function(a){return a.get(r.IWorkspacesService).getRecentlyOpened()})}),define(ne[377],re([1,0,1376,34,276,21,28,376,54,16,74,69,97,7,50,189,141]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AddRootFolderAction=e.OpenFileFolderAction=e.OpenFolderViaWorkspaceAction=e.OpenFolderAction=e.OpenFileAction=void 0;const l={value:(0,t.localize)(0,null),original:"Workspaces"},r={value:(0,t.localize)(1,null),original:"File"};class p extends w.Action2{constructor(){super({id:p.ID,title:{value:(0,t.localize)(2,null),original:"Open File..."},category:r,f1:!0,precondition:s.IsMacNativeContext.toNegated(),keybinding:{weight:200,primary:2048|45}})}async run(R,O){return R.get(I.IFileDialogService).pickFileAndOpen({forceNewWindow:!1,telemetryExtraData:O})}}e.OpenFileAction=p,p.ID="workbench.action.files.openFile";class u extends w.Action2{constructor(){super({id:u.ID,title:{value:(0,t.localize)(3,null),original:"Open Folder..."},category:r,f1:!0,precondition:v.OpenFolderWorkspaceSupportContext,keybinding:{weight:200,primary:void 0,linux:{primary:(0,o.KeyChord)(2048|41,2048|45)},win:{primary:(0,o.KeyChord)(2048|41,2048|45)}}})}async run(R,O){return R.get(I.IFileDialogService).pickFolderAndOpen({forceNewWindow:!1,telemetryExtraData:O})}}e.OpenFolderAction=u,u.ID="workbench.action.files.openFolder";class a extends w.Action2{constructor(){super({id:a.ID,title:{value:(0,t.localize)(4,null),original:"Open Folder..."},category:r,f1:!0,precondition:c.ContextKeyExpr.and(v.OpenFolderWorkspaceSupportContext.toNegated(),v.WorkbenchStateContext.isEqualTo("workspace")),keybinding:{weight:200,primary:2048|45}})}run(R){return R.get(k.ICommandService).executeCommand(D.SET_ROOT_FOLDER_COMMAND_ID)}}e.OpenFolderViaWorkspaceAction=a,a.ID="workbench.action.files.openFolderViaWorkspace";class n extends w.Action2{constructor(){super({id:n.ID,title:n.LABEL,category:r,f1:!0,precondition:c.ContextKeyExpr.and(s.IsMacNativeContext,v.OpenFolderWorkspaceSupportContext),keybinding:{weight:200,primary:2048|45}})}async run(R,O){return R.get(I.IFileDialogService).pickFileFolderAndOpen({forceNewWindow:!1,telemetryExtraData:O})}}e.OpenFileFolderAction=n,n.ID="workbench.action.files.openFileFolder",n.LABEL={value:(0,t.localize)(5,null),original:"Open..."};class h extends w.Action2{constructor(){super({id:h.ID,title:{value:(0,t.localize)(6,null),original:"Open Workspace from File..."},category:r,f1:!0,precondition:v.EnterMultiRootWorkspaceSupportContext})}async run(R,O){return R.get(I.IFileDialogService).pickWorkspaceAndOpen({telemetryExtraData:O})}}h.ID="workbench.action.openWorkspace";class g extends w.Action2{constructor(){super({id:g.ID,title:{value:(0,t.localize)(7,null),original:"Close Workspace"},category:l,f1:!0,precondition:c.ContextKeyExpr.and(v.WorkbenchStateContext.notEqualsTo("empty"),v.EmptyWorkspaceSupportContext),keybinding:{weight:200,primary:(0,o.KeyChord)(2048|41,36)}})}async run(R){const O=R.get(C.IHostService),x=R.get(i.IWorkbenchEnvironmentService);return O.openWindow({forceReuseWindow:!0,remoteAuthority:x.remoteAuthority})}}g.ID="workbench.action.closeFolder";class d extends w.Action2{constructor(){super({id:d.ID,title:{value:(0,t.localize)(8,null),original:"Open Workspace Configuration File"},category:l,f1:!0,precondition:v.WorkbenchStateContext.isEqualTo("workspace")})}async run(R){const O=R.get(f.IWorkspaceContextService),x=R.get(A.IEditorService),F=O.getWorkspace().configuration;F&&await x.openEditor({resource:F,options:{pinned:!0}})}}d.ID="workbench.action.openWorkspaceConfigFile";class m extends w.Action2{constructor(){super({id:m.ID,title:D.ADD_ROOT_FOLDER_LABEL,category:l,f1:!0,precondition:c.ContextKeyExpr.or(v.EnterMultiRootWorkspaceSupportContext,v.WorkbenchStateContext.isEqualTo("workspace"))})}run(R){return R.get(k.ICommandService).executeCommand(D.ADD_ROOT_FOLDER_COMMAND_ID)}}e.AddRootFolderAction=m,m.ID="workbench.action.addRootFolder";class b extends w.Action2{constructor(){super({id:b.ID,title:{value:(0,t.localize)(9,null),original:"Remove Folder from Workspace..."},category:l,f1:!0,precondition:c.ContextKeyExpr.and(v.WorkspaceFolderCountContext.notEqualsTo("0"),c.ContextKeyExpr.or(v.EnterMultiRootWorkspaceSupportContext,v.WorkbenchStateContext.isEqualTo("workspace")))})}async run(R){const O=R.get(k.ICommandService),x=R.get(_.IWorkspaceEditingService),F=await O.executeCommand(D.PICK_WORKSPACE_FOLDER_COMMAND_ID);F&&await x.removeFolders([F.uri])}}b.ID="workbench.action.removeRootFolder";class E extends w.Action2{constructor(){super({id:E.ID,title:{value:(0,t.localize)(10,null),original:"Save Workspace As..."},category:l,f1:!0,precondition:v.EnterMultiRootWorkspaceSupportContext})}async run(R){const O=R.get(_.IWorkspaceEditingService),x=R.get(f.IWorkspaceContextService),F=await O.pickNewWorkspacePath();if(F&&(0,f.hasWorkspaceFileExtension)(F))switch(x.getWorkbenchState()){case 1:case 2:{const L=x.getWorkspace().folders.map(M=>({uri:M.uri}));return O.createAndEnterWorkspace(L,F)}case 3:return O.saveAndEnterWorkspace(F)}}}E.ID="workbench.action.saveWorkspaceAs";class y extends w.Action2{constructor(){super({id:y.ID,title:{value:(0,t.localize)(11,null),original:"Duplicate As Workspace in New Window"},category:l,f1:!0,precondition:v.EnterMultiRootWorkspaceSupportContext})}async run(R){const O=R.get(f.IWorkspaceContextService),x=R.get(_.IWorkspaceEditingService),F=R.get(C.IHostService),L=R.get(S.IWorkspacesService),M=R.get(i.IWorkbenchEnvironmentService),N=O.getWorkspace().folders,B=M.remoteAuthority,P=await L.createUntitledWorkspace(N,B);return await x.copyWorkspaceSettings(P),F.openWindow([{workspaceUri:P.configPath}],{forceNewWindow:!0,remoteAuthority:B})}}y.ID="workbench.action.duplicateWorkspaceInNewWindow",(0,w.registerAction2)(m),(0,w.registerAction2)(b),(0,w.registerAction2)(p),(0,w.registerAction2)(u),(0,w.registerAction2)(a),(0,w.registerAction2)(n),(0,w.registerAction2)(h),(0,w.registerAction2)(d),(0,w.registerAction2)(g),(0,w.registerAction2)(E),(0,w.registerAction2)(y),w.MenuRegistry.appendMenuItem(w.MenuId.MenubarFileMenu,{group:"2_open",command:{id:p.ID,title:(0,t.localize)(12,null)},order:1,when:s.IsMacNativeContext.toNegated()}),w.MenuRegistry.appendMenuItem(w.MenuId.MenubarFileMenu,{group:"2_open",command:{id:u.ID,title:(0,t.localize)(13,null)},order:2,when:v.OpenFolderWorkspaceSupportContext}),w.MenuRegistry.appendMenuItem(w.MenuId.MenubarFileMenu,{group:"2_open",command:{id:a.ID,title:(0,t.localize)(14,null)},order:2,when:c.ContextKeyExpr.and(v.OpenFolderWorkspaceSupportContext.toNegated(),v.WorkbenchStateContext.isEqualTo("workspace"))}),w.MenuRegistry.appendMenuItem(w.MenuId.MenubarFileMenu,{group:"2_open",command:{id:n.ID,title:(0,t.localize)(15,null)},order:1,when:c.ContextKeyExpr.and(s.IsMacNativeContext,v.OpenFolderWorkspaceSupportContext)}),w.MenuRegistry.appendMenuItem(w.MenuId.MenubarFileMenu,{group:"2_open",command:{id:h.ID,title:(0,t.localize)(16,null)},order:3,when:v.EnterMultiRootWorkspaceSupportContext}),w.MenuRegistry.appendMenuItem(w.MenuId.MenubarFileMenu,{group:"3_workspace",command:{id:D.ADD_ROOT_FOLDER_COMMAND_ID,title:(0,t.localize)(17,null)},when:c.ContextKeyExpr.or(v.EnterMultiRootWorkspaceSupportContext,v.WorkbenchStateContext.isEqualTo("workspace")),order:1}),w.MenuRegistry.appendMenuItem(w.MenuId.MenubarFileMenu,{group:"3_workspace",command:{id:E.ID,title:(0,t.localize)(18,null)},order:2,when:v.EnterMultiRootWorkspaceSupportContext}),w.MenuRegistry.appendMenuItem(w.MenuId.MenubarFileMenu,{group:"3_workspace",command:{id:y.ID,title:(0,t.localize)(19,null)},order:3,when:v.EnterMultiRootWorkspaceSupportContext}),w.MenuRegistry.appendMenuItem(w.MenuId.MenubarFileMenu,{group:"6_close",command:{id:g.ID,title:(0,t.localize)(20,null)},order:3,when:c.ContextKeyExpr.and(v.WorkbenchStateContext.isEqualTo("folder"),v.EmptyWorkspaceSupportContext)}),w.MenuRegistry.appendMenuItem(w.MenuId.MenubarFileMenu,{group:"6_close",command:{id:g.ID,title:(0,t.localize)(21,null)},order:3,when:c.ContextKeyExpr.and(v.WorkbenchStateContext.isEqualTo("workspace"),v.EmptyWorkspaceSupportContext)})}),define(ne[156],re([1,0,1379,54,60,81,189,19,23,9,83,18,170,169,14,5,44,21,2,10,276,69,6,15,180,45,34,13,41,396,1946,11]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceListDnDHandler=e.toggleDropEffect=e.CompositeDragAndDropObserver=e.DraggedViewIdentifier=e.DraggedCompositeIdentifier=e.CompositeDragAndDropData=e.containsDragType=e.LocalSelectionTransfer=e.fillEditorsDragData=e.ResourcesDropHandler=e.extractFileListData=e.convertResourceUrlsToUriList=e.extractTreeDropData=e.extractEditorsDropData=e.CodeDataTransfers=e.DraggedTreeItemsIdentifier=e.DraggedEditorGroupIdentifier=e.DraggedEditorIdentifier=void 0;class O{constructor(ee){this.identifier=ee}}e.DraggedEditorIdentifier=O;class x{constructor(ee){this.identifier=ee}}e.DraggedEditorGroupIdentifier=x;class F{constructor(ee){this.identifier=ee}}e.DraggedTreeItemsIdentifier=F,e.CodeDataTransfers={EDITORS:"CodeEditors",FILES:"CodeFiles"};async function L(J,ee){const te=[];if(ee.dataTransfer&&ee.dataTransfer.types.length>0){const se=ee.dataTransfer.getData(e.CodeDataTransfers.EDITORS);if(se)try{te.push(...(0,g.parse)(se))}catch{}else try{const le=ee.dataTransfer.getData(o.DataTransfers.RESOURCES);te.push(...M(le))}catch{}if(ee.dataTransfer?.files)for(let le=0;le<ee.dataTransfer.files.length;le++){const ae=ee.dataTransfer.files[le];if(ae?.path)try{te.push({resource:w.URI.file(ae.path),isExternal:!0,allowWorkspaceOpen:!0})}catch{}}const ie=ee.dataTransfer.getData(e.CodeDataTransfers.FILES);if(ie)try{const le=JSON.parse(ie);for(const ae of le)te.push({resource:w.URI.file(ae),isExternal:!0,allowWorkspaceOpen:!0})}catch{}const ce=ee.dataTransfer.getData(o.DataTransfers.TERMINALS);if(ce)try{const le=JSON.parse(ce);for(const ae of le)te.push({resource:w.URI.parse(ae)})}catch{}if(i.isWeb&&G(ee,o.DataTransfers.FILES)&&ee.dataTransfer.items){const ue=await J.get(S.IInstantiationService).invokeFunction(oe=>P(oe,ee));for(const oe of ue)te.push({resource:oe.resource,contents:oe.contents?.toString(),isExternal:!0,allowWorkspaceOpen:oe.isDirectory})}}return te}e.extractEditorsDropData=L;function M(J){const ee=[];if(J){const te=JSON.parse(J);for(const se of te)if(se.indexOf(":")>0){const{selection:ie,uri:ce}=(0,E.extractSelection)(w.URI.parse(se));ee.push({resource:ce,options:{selection:ie}})}}return ee}async function N(J){const ee=[],te=c.Mimes.uriList.toLowerCase();if(J.has(te))try{const se=await J.get(te)?.asString(),ie=JSON.stringify(se?.split("\\n").filter(ce=>!ce.startsWith("#")));ee.push(...M(ie))}catch{}return ee}e.extractTreeDropData=N;function B(J){return JSON.parse(J).map(te=>te.toString()).join(` `)}e.convertResourceUrlsToUriList=B;async function P(J,ee){if(y.WebFileSystemAccess.supported(window)){const se=ee.dataTransfer?.items;if(se)return V(J,se)}const te=ee.dataTransfer?.files;return te?z(J,te):[]}async function V(J,ee){const te=J.get(I.IFileService).getProvider(C.Schemas.file);if(!(te instanceof T.HTMLFileSystemProvider))return[];const se=[];for(let ie=0;ie<ee.length;ie++){const ce=ee[ie];if(ce){const le=new R.DeferredPromise;se.push(le),(async()=>{try{const ae=await ce.getAsFileSystemHandle();if(!ae){le.complete(void 0);return}y.WebFileSystemAccess.isFileSystemFileHandle(ae)?le.complete({resource:await te.registerFileHandle(ae),isDirectory:!1}):y.WebFileSystemAccess.isFileSystemDirectoryHandle(ae)?le.complete({resource:await te.registerDirectoryHandle(ae),isDirectory:!0}):le.complete(void 0)}catch{le.complete(void 0)}})()}}return(0,h.coalesce)(await Promise.all(se.map(ie=>ie.p)))}async function z(J,ee){const te=J.get(f.IDialogService),se=[];for(let ie=0;ie<ee.length;ie++){const ce=ee.item(ie);if(ce){if(ce.size>100*I.ByteSize.MB){te.show(A.default.Warning,(0,t.localize)(0,null));continue}const le=new R.DeferredPromise;se.push(le);const ae=new FileReader;ae.onerror=()=>le.complete(void 0),ae.onabort=()=>le.complete(void 0),ae.onload=async ue=>{const oe=ce.name,fe=(0,b.withNullAsUndefined)(ue.target?.result);if(typeof oe!="string"||typeof fe=="undefined"){le.complete(void 0);return}le.complete({resource:w.URI.from({scheme:C.Schemas.untitled,path:oe}),contents:typeof fe=="string"?_.VSBuffer.fromString(fe):_.VSBuffer.wrap(new Uint8Array(fe))})},ae.readAsArrayBuffer(ce)}}return(0,h.coalesce)(await Promise.all(se.map(ie=>ie.p)))}e.extractFileListData=z;let U=class{constructor(ee,te,se,ie,ce,le,ae,ue){this.options=ee,this.fileService=te,this.workspacesService=se,this.editorService=ie,this.workspaceEditingService=ce,this.hostService=le,this.contextService=ae,this.instantiationService=ue}async handleDrop(ee,te,se,ie){const ce=await this.instantiationService.invokeFunction(ue=>L(ue,ee));if(!ce.length)return;if(await this.hostService.focus(),this.options.allowWorkspaceOpen){const ue=(0,h.coalesce)(ce.filter(oe=>oe.allowWorkspaceOpen&&oe.resource?.scheme===C.Schemas.file).map(oe=>oe.resource));if(ue.length>0&&await this.handleWorkspaceDrop(ue))return}const le=(0,h.coalesce)(ce.filter(ue=>ue.isExternal&&ue.resource?.scheme===C.Schemas.file).map(ue=>ue.resource));le.length&&this.workspacesService.addRecentlyOpened(le.filter(ue=>!this.contextService.isInsideWorkspace(ue)).map(ue=>({fileUri:ue})));const ae=te();await this.editorService.openEditors(ce.map(ue=>({...ue,resource:ue.resource,options:{...ue.options,pinned:!0,index:ie}})),ae,{validateTrust:!0}),se(ae)}async handleWorkspaceDrop(ee){const te=[],se=[];return await Promise.all(ee.map(async ie=>{if((0,m.hasWorkspaceFileExtension)(ie)){te.push({workspaceUri:ie});return}try{const ce=await this.fileService.stat(ie);ce.isDirectory&&(te.push({folderUri:ce.resource}),se.push({uri:ce.resource}))}catch{}})),te.length===0?!1:(this.hostService.focus(),te.length>se.length||se.length===1?await this.hostService.openWindow(te):(0,m.isTemporaryWorkspace)(this.contextService.getWorkspace())?await this.workspaceEditingService.addFolders(se):await this.workspaceEditingService.createAndEnterWorkspace(se),!0)}};U=Ee([W(1,I.IFileService),W(2,k.IWorkspacesService),W(3,l.IEditorService),W(4,u.IWorkspaceEditingService),W(5,a.IHostService),W(6,m.IWorkspaceContextService),W(7,S.IInstantiationService)],U),e.ResourcesDropHandler=U;function H(J,ee,te){if(ee.length===0||!te.dataTransfer)return;const se=J.get(v.ITextFileService),ie=J.get(l.IEditorService),ce=J.get(I.IFileService),le=J.get(d.ILabelService),ae=(0,h.coalesce)(ee.map(Ce=>w.URI.isUri(Ce)?{resource:Ce}:(0,s.isEditorIdentifier)(Ce)?w.URI.isUri(Ce.editor.resource)?{resource:Ce.editor.resource}:void 0:Ce)),ue=ae.filter(({resource:Ce})=>ce.hasProvider(Ce)),oe=i.isWindows?`\r `:` `;te.dataTransfer.setData(o.DataTransfers.TEXT,ue.map(({resource:Ce})=>le.getUriLabel(Ce,{noPrefix:!0})).join(oe));const fe=ue.find(({isDirectory:Ce})=>!Ce);if(fe){const Ce=C.FileAccess.asFileUri(fe.resource);Ce.scheme===C.Schemas.file&&te.dataTransfer.setData(o.DataTransfers.DOWNLOAD_URL,[c.Mimes.binary,(0,D.basename)(fe.resource),Ce.toString()].join(":"))}const pe=ue.filter(({isDirectory:Ce})=>!Ce);pe.length&&te.dataTransfer.setData(o.DataTransfers.RESOURCES,JSON.stringify(pe.map(({resource:Ce})=>Ce.toString())));const me=ae.filter(({resource:Ce})=>Ce.scheme===C.Schemas.vscodeTerminal);me.length&&te.dataTransfer.setData(o.DataTransfers.TERMINALS,JSON.stringify(me.map(({resource:Ce})=>Ce.toString())));const be=[];for(const Ce of ee){let ve;if((0,s.isEditorIdentifier)(Ce)){const he=Ce.editor.toUntyped({preserveViewState:Ce.groupId});he&&(ve={...he,resource:s.EditorResourceAccessor.getCanonicalUri(he)})}else if(w.URI.isUri(Ce)){const{selection:he,uri:ge}=(0,E.extractSelection)(Ce);ve={resource:ge,options:he?{selection:he}:void 0}}else Ce.isDirectory||(ve={resource:Ce.resource});if(!!ve){{const he=ve.resource;if(he){const ge=se.files.get(he);ge&&(typeof ve.languageId!="string"&&(ve.languageId=ge.getLanguageId()),typeof ve.encoding!="string"&&(ve.encoding=ge.getEncoding()),typeof ve.contents!="string"&&ge.isDirty()&&(ve.contents=ge.textEditorModel.getValue())),ve.options?.viewState||(ve.options={...ve.options,viewState:(()=>{for(const de of ie.visibleEditorPanes)if((0,D.isEqual)(de.input.resource,he)){const Se=de.getViewState();if(Se)return Se}})()})}}be.push(ve)}}be.length&&te.dataTransfer.setData(e.CodeDataTransfers.EDITORS,(0,g.stringify)(be))}e.fillEditorsDragData=H;class K{constructor(){}static getInstance(){return K.INSTANCE}hasData(ee){return ee&&ee===this.proto}clearData(ee){this.hasData(ee)&&(this.proto=void 0,this.data=void 0)}getData(ee){if(this.hasData(ee))return this.data}setData(ee,te){te&&(this.data=ee,this.proto=te)}}e.LocalSelectionTransfer=K,K.INSTANCE=new K;function G(J,...ee){if(!J.dataTransfer)return!1;const te=J.dataTransfer.types,se=[];for(let ie=0;ie<te.length;ie++)se.push(te[ie].toLowerCase());for(const ie of ee)if(se.indexOf(ie.toLowerCase())>=0)return!0;return!1}e.containsDragType=G;class q{constructor(ee,te){this.type=ee,this.id=te}update(ee){}getData(){return{type:this.type,id:this.id}}}e.CompositeDragAndDropData=q;class Z{constructor(ee){this.compositeId=ee}get id(){return this.compositeId}}e.DraggedCompositeIdentifier=Z;class j{constructor(ee){this.viewId=ee}get id(){return this.viewId}}e.DraggedViewIdentifier=j;class X extends r.Disposable{constructor(){super();this.transferData=K.getInstance(),this.onDragStart=this._register(new n.Emitter),this.onDragEnd=this._register(new n.Emitter),this._register(this.onDragEnd.event(ee=>{const te=ee.dragAndDropData.getData().id,se=ee.dragAndDropData.getData().type;this.readDragData(se)?.getData().id===te&&this.transferData.clearData(se==="view"?j.prototype:Z.prototype)}))}static get INSTANCE(){return X.instance||(X.instance=new X),X.instance}readDragData(ee){if(this.transferData.hasData(ee==="view"?j.prototype:Z.prototype)){const te=this.transferData.getData(ee==="view"?j.prototype:Z.prototype);if(te&&te[0])return new q(ee,te[0].id)}}writeDragData(ee,te){this.transferData.setData([te==="view"?new j(ee):new Z(ee)],te==="view"?j.prototype:Z.prototype)}registerTarget(ee,te){const se=new r.DisposableStore;return se.add(new p.DragAndDropObserver(ee,{onDragEnd:ie=>{},onDragEnter:ie=>{if(ie.preventDefault(),te.onDragEnter){const ce=this.readDragData("composite")||this.readDragData("view");ce&&te.onDragEnter({eventData:ie,dragAndDropData:ce})}},onDragLeave:ie=>{const ce=this.readDragData("composite")||this.readDragData("view");te.onDragLeave&&ce&&te.onDragLeave({eventData:ie,dragAndDropData:ce})},onDrop:ie=>{if(te.onDrop){const ce=this.readDragData("composite")||this.readDragData("view");if(!ce)return;te.onDrop({eventData:ie,dragAndDropData:ce}),this.onDragEnd.fire({eventData:ie,dragAndDropData:ce})}},onDragOver:ie=>{if(ie.preventDefault(),te.onDragOver){const ce=this.readDragData("composite")||this.readDragData("view");if(!ce)return;te.onDragOver({eventData:ie,dragAndDropData:ce})}}})),te.onDragStart&&this.onDragStart.event(ie=>{te.onDragStart(ie)},this,se),te.onDragEnd&&this.onDragEnd.event(ie=>{te.onDragEnd(ie)}),this._register(se)}registerDraggable(ee,te,se){ee.draggable=!0;const ie=new r.DisposableStore;return ie.add((0,p.addDisposableListener)(ee,p.EventType.DRAG_START,ce=>{const{id:le,type:ae}=te();this.writeDragData(le,ae),ce.dataTransfer?.setDragImage(ee,0,0),this.onDragStart.fire({eventData:ce,dragAndDropData:this.readDragData(ae)})})),ie.add(new p.DragAndDropObserver(ee,{onDragEnd:ce=>{const{type:le}=te(),ae=this.readDragData(le);!ae||this.onDragEnd.fire({eventData:ce,dragAndDropData:ae})},onDragEnter:ce=>{if(se.onDragEnter){const le=this.readDragData("composite")||this.readDragData("view");if(!le)return;le&&se.onDragEnter({eventData:ce,dragAndDropData:le})}},onDragLeave:ce=>{const le=this.readDragData("composite")||this.readDragData("view");!le||se.onDragLeave&&se.onDragLeave({eventData:ce,dragAndDropData:le})},onDrop:ce=>{if(se.onDrop){const le=this.readDragData("composite")||this.readDragData("view");if(!le)return;se.onDrop({eventData:ce,dragAndDropData:le}),this.onDragEnd.fire({eventData:ce,dragAndDropData:le})}},onDragOver:ce=>{if(se.onDragOver){const le=this.readDragData("composite")||this.readDragData("view");if(!le)return;se.onDragOver({eventData:ce,dragAndDropData:le})}}})),se.onDragStart&&this.onDragStart.event(ce=>{se.onDragStart(ce)},this,ie),se.onDragEnd&&this.onDragEnd.event(ce=>{se.onDragEnd(ce)},this,ie),this._register(ie)}}e.CompositeDragAndDropObserver=X;function Y(J,ee,te){!J||(J.dropEffect=te?ee:"none")}e.toggleDropEffect=Y;let $=class{constructor(ee,te){this.toResource=ee,this.instantiationService=te}getDragURI(ee){const te=this.toResource(ee);return te?te.toString():null}getDragLabel(ee){const te=(0,h.coalesce)(ee.map(this.toResource));return te.length===1?(0,D.basename)(te[0]):te.length>1?String(te.length):void 0}onDragStart(ee,te){const se=[];for(const ie of ee.elements){const ce=this.toResource(ie);ce&&se.push(ce)}se.length&&this.instantiationService.invokeFunction(ie=>H(ie,se,te))}onDragOver(ee,te,se,ie){return!1}drop(ee,te,se,ie){}};$=Ee([W(1,S.IInstantiationService)],$),e.ResourceListDnDHandler=$}),define(ne[509],re([1,0,22,2,51,9,140,72,28,132,5,65,253,21,59,85,135,180,358,359,774,156,169,15]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadTextEditors=e.reviveWorkspaceEditDto2=void 0;function g(m){if(!m?.edits)return[];const b=[];for(let E of(0,l.revive)(m).edits)E._type===1?b.push(new k.ResourceFileEdit(E.oldUri,E.newUri,E.options,E.metadata)):E._type===2?b.push(new k.ResourceTextEdit(E.resource,E.edit,E.modelVersionId,E.metadata)):E._type===3&&b.push(new r.ResourceNotebookCellEdit(E.resource,p.NotebookDto.fromCellEditOperationDto(E.edit),E.notebookVersionId,E.metadata));return b}e.reviveWorkspaceEditDto2=g;let d=class ul{constructor(b,E,y,T,R,O,x){this._editorLocator=b,this._codeEditorService=y,this._bulkEditService=T,this._editorService=R,this._editorGroupService=O,this._instantiationService=x,this._toDispose=new f.DisposableStore,this._dropIntoEditorListeners=new Map,this._instanceId=String(++ul.INSTANCE_COUNT),this._proxy=E.getProxy(C.ExtHostContext.ExtHostEditors),this._textEditorsListenersMap=Object.create(null),this._editorPositionData=null,this._toDispose.add(this._editorService.onDidVisibleEditorsChange(()=>this._updateActiveAndVisibleTextEditors())),this._toDispose.add(this._editorGroupService.onDidRemoveGroup(()=>this._updateActiveAndVisibleTextEditors())),this._toDispose.add(this._editorGroupService.onDidMoveGroup(()=>this._updateActiveAndVisibleTextEditors()));const F=L=>{this._dropIntoEditorListeners.get(L)?.dispose(),this._dropIntoEditorListeners.set(L,L.onDropIntoEditor(M=>this.onDropIntoEditor(L,M.position,M.event)))};this._toDispose.add(y.onCodeEditorAdd(F)),this._toDispose.add(y.onCodeEditorRemove(L=>{this._dropIntoEditorListeners.get(L)?.dispose()}));for(const L of this._codeEditorService.listCodeEditors())F(L);this._registeredDecorationTypes=Object.create(null)}dispose(){Object.keys(this._textEditorsListenersMap).forEach(b=>{(0,f.dispose)(this._textEditorsListenersMap[b])}),this._textEditorsListenersMap=Object.create(null),this._toDispose.dispose();for(let b in this._registeredDecorationTypes)this._codeEditorService.removeDecorationType(b);(0,f.dispose)(this._dropIntoEditorListeners.values()),this._dropIntoEditorListeners.clear(),this._registeredDecorationTypes=Object.create(null)}handleTextEditorAdded(b){const E=b.getId(),y=[];y.push(b.onPropertiesChanged(T=>{this._proxy.$acceptEditorPropertiesChanged(E,T)})),this._textEditorsListenersMap[E]=y}handleTextEditorRemoved(b){(0,f.dispose)(this._textEditorsListenersMap[b]),delete this._textEditorsListenersMap[b]}_updateActiveAndVisibleTextEditors(){const b=this._getTextEditorPositionData();(0,_.equals)(this._editorPositionData,b)||(this._editorPositionData=b,this._proxy.$acceptEditorPositionData(this._editorPositionData))}_getTextEditorPositionData(){const b=Object.create(null);for(let E of this._editorService.visibleEditorPanes){const y=this._editorLocator.findTextEditorIdFor(E);y&&(b[y]=(0,o.editorGroupToColumn)(this._editorGroupService,E.group))}return b}async onDropIntoEditor(b,E,y){if(!y.dataTransfer)return;const T=this._editorLocator.getIdOfCodeEditor(b);if(typeof T!="string")return;const R=new Map;for(const O of y.dataTransfer.items)if(O.kind==="string"){const x=O.type,F=new Promise(L=>O.getAsString(L));R.set(x,{asString:()=>F,value:void 0})}if(!R.has(n.Mimes.uriList.toLowerCase())){const O=(await this._instantiationService.invokeFunction(a.extractEditorsDropData,y)).filter(x=>x.resource).map(x=>x.resource.toString());if(O.length){const x=(0,h.distinct)(O).join(` `);R.set(n.Mimes.uriList.toLowerCase(),{asString:()=>Promise.resolve(x),value:void 0})}}if(R.size>0){const O=await u.DataTransferConverter.toDataTransferDTO(R);return this._proxy.$textEditorHandleDrop(T,E,O)}}async $tryShowTextDocument(b,E){const y=A.URI.revive(b),T={preserveFocus:E.preserveFocus,pinned:E.pinned,selection:E.selection,activation:E.preserveFocus?w.EditorActivation.RESTORE:void 0,override:w.EditorResolution.DISABLED},R={resource:y,options:T},O=await this._editorService.openEditor(R,(0,o.columnToEditorGroup)(this._editorGroupService,E.position));if(!!O)return this._editorLocator.findTextEditorIdFor(O)}async $tryShowEditor(b,E){const y=this._editorLocator.getEditor(b);if(y){const T=y.getModel();await this._editorService.openEditor({resource:T.uri,options:{preserveFocus:!1}},(0,o.columnToEditorGroup)(this._editorGroupService,E));return}}async $tryHideEditor(b){const E=this._editorLocator.getEditor(b);if(E){const y=this._editorService.visibleEditorPanes;for(let T of y)if(E.matches(T)){await T.group.closeEditor(T.input);return}}}$trySetSelections(b,E){const y=this._editorLocator.getEditor(b);return y?(y.setSelections(E),Promise.resolve(void 0)):Promise.reject((0,t.disposed)(`TextEditor(${b})`))}$trySetDecorations(b,E,y){E=`${this._instanceId}-${E}`;const T=this._editorLocator.getEditor(b);return T?(T.setDecorations(E,y),Promise.resolve(void 0)):Promise.reject((0,t.disposed)(`TextEditor(${b})`))}$trySetDecorationsFast(b,E,y){E=`${this._instanceId}-${E}`;const T=this._editorLocator.getEditor(b);return T?(T.setDecorationsFast(E,y),Promise.resolve(void 0)):Promise.reject((0,t.disposed)(`TextEditor(${b})`))}$tryRevealRange(b,E,y){const T=this._editorLocator.getEditor(b);return T?(T.revealRange(E,y),Promise.resolve()):Promise.reject((0,t.disposed)(`TextEditor(${b})`))}$trySetOptions(b,E){const y=this._editorLocator.getEditor(b);return y?(y.setConfiguration(E),Promise.resolve(void 0)):Promise.reject((0,t.disposed)(`TextEditor(${b})`))}$tryApplyEdits(b,E,y,T){const R=this._editorLocator.getEditor(b);return R?Promise.resolve(R.applyEdits(E,y,T)):Promise.reject((0,t.disposed)(`TextEditor(${b})`))}$tryApplyWorkspaceEdit(b){const E=g(b);return this._bulkEditService.apply(E).then(()=>!0,y=>!1)}$tryInsertSnippet(b,E,y,T){const R=this._editorLocator.getEditor(b);return R?Promise.resolve(R.insertSnippet(E,y,T)):Promise.reject((0,t.disposed)(`TextEditor(${b})`))}$registerTextEditorDecorationType(b,E,y){E=`${this._instanceId}-${E}`,this._registeredDecorationTypes[E]=!0,this._codeEditorService.registerDecorationType(`exthost-api-${b}`,E,y)}$removeTextEditorDecorationType(b){b=`${this._instanceId}-${b}`,delete this._registeredDecorationTypes[b],this._codeEditorService.removeDecorationType(b)}$getDiffInformation(b){const E=this._editorLocator.getEditor(b);if(!E)return Promise.reject(new Error("No such TextEditor"));const y=E.getCodeEditor();if(!y)return Promise.reject(new Error("No such CodeEditor"));const T=y.getId(),R=this._codeEditorService.listDiffEditors(),[O]=R.filter(F=>F.getOriginalEditor().getId()===T||F.getModifiedEditor().getId()===T);if(O)return Promise.resolve(O.getLineChanges()||[]);const x=y.getContribution("editor.contrib.dirtydiff");return x?Promise.resolve(x.getChanges()):Promise.resolve([])}};d.INSTANCE_COUNT=0,d=Ee([W(2,D.ICodeEditorService),W(3,k.IBulkEditService),W(4,c.IEditorService),W(5,i.IEditorGroupsService),W(6,v.IInstantiationService)],d),e.MainThreadTextEditors=d,I.CommandsRegistry.registerCommand("_workbench.revertAllDirty",async function(m){if(!m.get(S.IEnvironmentService).extensionTestsLocationURI)throw new Error("Command is only available when running extension tests.");const E=m.get(s.IWorkingCopyService);for(const y of E.dirtyWorkingCopies)await y.revert({soft:!0})})}),define(ne[2741],re([1,0,140,65,75,509,31]),function(Q,e,t,f,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadBulkEdits=void 0;let D=class{constructor(w,v,C){this._bulkEditService=v,this._logService=C}dispose(){}$tryApplyWorkspaceEdit(w,v){const C=(0,A.reviveWorkspaceEditDto2)(w);return this._bulkEditService.apply(C,{undoRedoGroupId:v}).then(()=>!0,o=>(this._logService.warn("IGNORING workspace edit",o),!1))}};D=Ee([(0,_.extHostNamedCustomer)(f.MainContext.MainThreadBulkEdits),W(1,t.IBulkEditService),W(2,k.ILogService)],D),e.MainThreadBulkEdits=D}),define(ne[2742],re([1,0,6,2,106,140,72,122,52,61,23,75,640,868,509,65,436,253,21,59,83,50,221,56,95,101,143,88,5]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadDocumentsAndEditors=void 0;class y{constructor(M){this.editor=M,this.id=`${M.getId()},${M.getModel().id}`}}class T{constructor(M,N,B,P,V,z){this.removedDocuments=M,this.addedDocuments=N,this.removedEditors=B,this.addedEditors=P,this.oldActiveEditor=V,this.newActiveEditor=z,this.isEmpty=this.removedDocuments.length===0&&this.addedDocuments.length===0&&this.removedEditors.length===0&&this.addedEditors.length===0&&V===z}toString(){let M=`DocumentAndEditorStateDelta `;return M+=` Removed Documents: [${this.removedDocuments.map(N=>N.uri.toString(!0)).join(", ")}] `,M+=` Added Documents: [${this.addedDocuments.map(N=>N.uri.toString(!0)).join(", ")}] `,M+=` Removed Editors: [${this.removedEditors.map(N=>N.id).join(", ")}] `,M+=` Added Editors: [${this.addedEditors.map(N=>N.id).join(", ")}] `,M+=` New Active Editor: ${this.newActiveEditor} `,M}}class R{constructor(M,N,B){this.documents=M,this.textEditors=N,this.activeEditor=B}static compute(M,N){if(!M)return new T([],[...N.documents.values()],[],[...N.textEditors.values()],void 0,N.activeEditor);const B=(0,m.diffSets)(M.documents,N.documents),P=(0,m.diffMaps)(M.textEditors,N.textEditors),V=M.activeEditor!==N.activeEditor?M.activeEditor:void 0,z=M.activeEditor!==N.activeEditor?N.activeEditor:void 0;return new T(B.removed,B.added,P.removed,P.added,V,z)}}var O;(function(L){L[L.Editor=0]="Editor",L[L.Panel=1]="Panel"})(O||(O={}));let x=class{constructor(M,N,B,P,V){this._onDidChangeState=M,this._modelService=N,this._codeEditorService=B,this._editorService=P,this._paneCompositeService=V,this._toDispose=new f.DisposableStore,this._toDisposeOnEditorRemove=new Map,this._activeEditorOrder=0,this._modelService.onModelAdded(this._updateStateOnModelAdd,this,this._toDispose),this._modelService.onModelRemoved(z=>this._updateState(),this,this._toDispose),this._editorService.onDidActiveEditorChange(z=>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),t.Event.filter(this._paneCompositeService.onDidPaneCompositeOpen,z=>z.viewContainerLocation===1)(z=>this._activeEditorOrder=1,void 0,this._toDispose),t.Event.filter(this._paneCompositeService.onDidPaneCompositeClose,z=>z.viewContainerLocation===1)(z=>this._activeEditorOrder=0,void 0,this._toDispose),this._editorService.onDidVisibleEditorsChange(z=>this._activeEditorOrder=0,void 0,this._toDispose),this._updateState()}dispose(){this._toDispose.dispose()}_onDidAddEditor(M){this._toDisposeOnEditorRemove.set(M.getId(),(0,f.combinedDisposable)(M.onDidChangeModel(()=>this._updateState()),M.onDidFocusEditorText(()=>this._updateState()),M.onDidFocusEditorWidget(()=>this._updateState(M)))),this._updateState()}_onDidRemoveEditor(M){const N=this._toDisposeOnEditorRemove.get(M.getId());N&&(this._toDisposeOnEditorRemove.delete(M.getId()),N.dispose(),this._updateState())}_updateStateOnModelAdd(M){if(!!(0,D.shouldSynchronizeModel)(M)){if(!this._currentState){this._updateState();return}this._currentState=new R(this._currentState.documents.add(M),this._currentState.textEditors,this._currentState.activeEditor),this._onDidChangeState(new T([],[M],[],[],void 0,void 0))}}_updateState(M){const N=new Set;for(const U of this._modelService.getModels())(0,D.shouldSynchronizeModel)(U)&&N.add(U);const B=new Map;let P=null;for(const U of this._codeEditorService.listCodeEditors()){if(U.isSimpleWidget)continue;const H=U.getModel();if(U.hasModel()&&H&&(0,D.shouldSynchronizeModel)(H)&&!H.isDisposed()&&Boolean(this._modelService.getModel(H.uri))){const K=new y(U);B.set(K.id,K),(U.hasTextFocus()||M===U&&U.hasWidgetFocus())&&(P=K.id)}}if(!P){let U;if(this._activeEditorOrder===0?U=this._getActiveEditorFromEditorPart()||this._getActiveEditorFromPanel():U=this._getActiveEditorFromPanel()||this._getActiveEditorFromEditorPart(),U)for(const H of B.values())U===H.editor&&(P=H.id)}const V=new R(N,B,P),z=R.compute(this._currentState,V);z.isEmpty||(this._currentState=V,this._onDidChangeState(z))}_getActiveEditorFromPanel(){const M=this._paneCompositeService.getActivePaneComposite(1);if(M instanceof s.BaseTextEditor){const N=M.getControl();if((0,_.isCodeEditor)(N))return N}}_getActiveEditorFromEditorPart(){let M=this._editorService.activeTextEditorControl;return(0,_.isDiffEditor)(M)&&(M=M.getModifiedEditor()),M}};x=Ee([W(1,I.IModelService),W(2,k.ICodeEditorService),W(3,r.IEditorService),W(4,b.IPaneCompositePartService)],x);let F=class{constructor(M,N,B,P,V,z,U,H,K,G,q,Z,j,X,Y,$){this._modelService=N,this._textFileService=B,this._editorService=P,this._editorGroupService=H,this._clipboardService=X,this._toDispose=new f.DisposableStore,this._textEditors=new Map,this._proxy=M.getProxy(S.ExtHostContext.ExtHostDocumentsAndEditors),this._mainThreadDocuments=this._toDispose.add(new o.MainThreadDocuments(M,this._modelService,this._textFileService,z,U,q,j,Z,Y)),M.set(S.MainContext.MainThreadDocuments,this._mainThreadDocuments),this._mainThreadEditors=this._toDispose.add(new i.MainThreadTextEditors(this,M,V,K,this._editorService,this._editorGroupService,$)),M.set(S.MainContext.MainThreadTextEditors,this._mainThreadEditors),this._toDispose.add(new x(J=>this._onDelta(J),N,V,this._editorService,G))}dispose(){this._toDispose.dispose()}_onDelta(M){let N;const B=[],P=[];N=M.removedDocuments.map(U=>U.uri);for(const U of M.addedEditors){const H=new c.MainThreadTextEditor(U.id,U.editor.getModel(),U.editor,{onGainedFocus(){},onLostFocus(){}},this._mainThreadDocuments,this._modelService,this._clipboardService);this._textEditors.set(U.id,H),P.push(H)}for(const{id:U}of M.removedEditors){const H=this._textEditors.get(U);H&&(H.dispose(),this._textEditors.delete(U),B.push(U))}const V=Object.create(null);let z=!0;M.newActiveEditor!==void 0&&(z=!1,V.newActiveEditor=M.newActiveEditor),N.length>0&&(z=!1,V.removedDocuments=N),B.length>0&&(z=!1,V.removedEditors=B),M.addedDocuments.length>0&&(z=!1,V.addedDocuments=M.addedDocuments.map(U=>this._toModelAddData(U))),M.addedEditors.length>0&&(z=!1,V.addedEditors=P.map(U=>this._toTextEditorAddData(U))),z||(this._proxy.$acceptDocumentsAndEditorsDelta(V),N.forEach(this._mainThreadDocuments.handleModelRemoved,this._mainThreadDocuments),M.addedDocuments.forEach(this._mainThreadDocuments.handleModelAdded,this._mainThreadDocuments),B.forEach(this._mainThreadEditors.handleTextEditorRemoved,this._mainThreadEditors),P.forEach(this._mainThreadEditors.handleTextEditorAdded,this._mainThreadEditors))}_toModelAddData(M){return{uri:M.uri,versionId:M.getVersionId(),lines:M.getLinesContent(),EOL:M.getEOL(),languageId:M.getLanguageId(),isDirty:this._textFileService.isDirty(M.uri)}}_toTextEditorAddData(M){const N=M.getProperties();return{id:M.getId(),documentUri:M.getModel().uri,options:N.options,selections:N.selections,visibleRanges:N.visibleRanges,editorPosition:this._findEditorPosition(M)}}_findEditorPosition(M){for(const N of this._editorService.visibleEditorPanes)if(M.matches(N))return(0,l.editorGroupToColumn)(this._editorGroupService,N.group)}findTextEditorIdFor(M){for(const[N,B]of this._textEditors)if(B.matches(M))return N}getIdOfCodeEditor(M){for(const[N,B]of this._textEditors)if(B.getCodeEditor()===M)return N}getEditor(M){return this._textEditors.get(M)}};F=Ee([C.extHostCustomer,W(1,I.IModelService),W(2,u.ITextFileService),W(3,r.IEditorService),W(4,k.ICodeEditorService),W(5,v.IFileService),W(6,w.ITextModelService),W(7,p.IEditorGroupsService),W(8,A.IBulkEditService),W(9,b.IPaneCompositePartService),W(10,a.IWorkbenchEnvironmentService),W(11,n.IWorkingCopyFileService),W(12,h.IUriIdentityService),W(13,g.IClipboardService),W(14,d.IPathService),W(15,E.IInstantiationService)],F),e.MainThreadDocumentsAndEditors=F}),define(ne[2743],re([1,0,2,23,75,65,1357,57,17,221,509,140,67,11,30,54,81,24,16,31,85]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u){"use strict";var a;Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadFileSystemEventService=void 0;let n=a=class{constructor(g,d,m,b,E,y,T,R,O){this._listener=new t.DisposableStore;const x=g.getProxy(A.ExtHostContext.ExtHostFileSystemEventService);this._listener.add(d.onDidFilesChange(L=>{x.$onFileEvent({created:L.rawAdded,changed:L.rawUpdated,deleted:L.rawDeleted})}));const F=new class{async participate(L,M,N,B,P){if(N?.isUndoing)return;const V=new i.CancellationTokenSource(P),z=setTimeout(()=>V.cancel(),B),U=await E.withProgress({location:15,title:this._progressLabel(M),cancellable:!0,delay:Math.min(B/2,3e3)},()=>{const G=x.$onWillRunFileOperation(M,L,B,V.token);return(0,c.raceCancellation)(G,V.token)},()=>{V.cancel()}).finally(()=>{V.dispose(),clearTimeout(z)});if(!U||U.edit.edits.length===0)return;const H=U.edit.edits.some(G=>G.metadata?.needsConfirmation);let K=T.getBoolean(a.MementoKeyAdditionalEdits,0);if(O.extensionTestsLocationURI&&(K=!1),K===void 0){let G;if(U.extensionNames.length===1?M===0?G=(0,k.localize)(0,null,U.extensionNames[0]):M===3?G=(0,k.localize)(1,null,U.extensionNames[0]):M===2?G=(0,k.localize)(2,null,U.extensionNames[0]):G=(0,k.localize)(3,null,U.extensionNames[0]):M===0?G=(0,k.localize)(4,null,U.extensionNames.length):M===3?G=(0,k.localize)(5,null,U.extensionNames.length):M===2?G=(0,k.localize)(6,null,U.extensionNames.length):G=(0,k.localize)(7,null,U.extensionNames.length),H){const q=await y.show(s.default.Info,G,[(0,k.localize)(8,null),(0,k.localize)(9,null)],{cancelId:1});if(K=!0,q.choice===1)return}else{const q=await y.show(s.default.Info,G,[(0,k.localize)(10,null),(0,k.localize)(11,null),(0,k.localize)(12,null)],{cancelId:2,checkbox:{label:(0,k.localize)(13,null)}});if(q.choice===2)return;K=q.choice===1,q.checkboxChecked&&T.store(a.MementoKeyAdditionalEdits,K,0,0)}}R.info("[onWill-handler] applying additional workspace edit from extensions",U.extensionNames),await b.apply((0,v.reviveWorkspaceEditDto2)(U.edit),{undoRedoGroupId:N?.undoRedoGroupId,showPreview:K})}_progressLabel(L){switch(L){case 0:return(0,k.localize)(14,null);case 2:return(0,k.localize)(15,null);case 3:return(0,k.localize)(16,null);case 1:return(0,k.localize)(17,null);case 4:return(0,k.localize)(18,null)}}};this._listener.add(m.addFileOperationParticipant(F)),this._listener.add(m.onDidRunWorkingCopyFileOperation(L=>x.$onDidRunFileOperation(L.operation,L.files)))}dispose(){this._listener.dispose()}};n.MementoKeyAdditionalEdits="file.particpants.additionalEdits",n=a=Ee([_.extHostCustomer,W(1,f.IFileService),W(2,w.IWorkingCopyFileService),W(3,C.IBulkEditService),W(4,o.IProgressService),W(5,S.IDialogService),W(6,l.IStorageService),W(7,p.ILogService),W(8,u.IEnvironmentService)],n),e.MainThreadFileSystemEventService=n,(0,r.registerAction2)(class extends r.Action2{constructor(){super({id:"files.participants.resetChoice",title:(0,k.localize)(19,null),f1:!0})}run(g){g.get(l.IStorageService).remove(n.MementoKeyAdditionalEdits,0)}}),I.Registry.as(D.Extensions.Configuration).registerConfiguration({id:"files",properties:{"files.participants.timeout":{type:"number",default:6e4,markdownDescription:(0,k.localize)(20,null)}}})}),define(ne[438],re([1,0,1387,36,10,28,2,37,12,217,5,32,170,38,6,156,134,33,219,11,8]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleCompositePinnedAction=e.CompositeActionViewItem=e.CompositeOverflowActivityActionViewItem=e.CompositeOverflowActivityAction=e.ActivityActionViewItem=e.ActivityAction=void 0;class a extends f.Action{constructor(y){super(y.id,y.name,y.cssClass);this._activity=y,this._onDidChangeActivity=this._register(new i.Emitter),this.onDidChangeActivity=this._onDidChangeActivity.event,this._onDidChangeBadge=this._register(new i.Emitter),this.onDidChangeBadge=this._onDidChangeBadge.event}get activity(){return this._activity}set activity(y){this._label=y.name,this._activity=y,this._onDidChangeActivity.fire(this)}activate(){this.checked||this._setChecked(!0)}deactivate(){this.checked&&this._setChecked(!1)}getBadge(){return this.badge}getClass(){return this.clazz}setBadge(y,T){this.badge=y,this.clazz=T,this._onDidChangeBadge.fire(this)}dispose(){this._onDidChangeActivity.dispose(),this._onDidChangeBadge.dispose(),super.dispose()}}e.ActivityAction=a;let n=class fs extends s.BaseActionViewItem{constructor(y,T,R,O,x,F){super(null,y,T);this.themeService=R,this.hoverService=O,this.configurationService=x,this.keybindingService=F,this.badgeDisposable=this._register(new k.MutableDisposable),this.hoverDisposables=this._register(new k.DisposableStore),this.hover=this._register(new k.MutableDisposable),this.showHoverScheduler=new p.RunOnceScheduler(()=>this.showHover(),0),this.options=T,this._register(this.themeService.onDidColorThemeChange(this.onThemeChange,this)),this._register(y.onDidChangeActivity(this.updateActivity,this)),this._register(i.Event.filter(F.onDidUpdateKeybindings,()=>this.keybindingLabel!==this.computeKeybindingLabel())(()=>this.updateTitle())),this._register(y.onDidChangeBadge(this.updateBadge,this)),this._register((0,k.toDisposable)(()=>this.showHoverScheduler.cancel()))}get activity(){return this._action.activity}updateStyles(){const y=this.themeService.getColorTheme(),T=this.options.colors(y);if(this.label){if(this.options.icon){const R=this._action.checked?T.activeForegroundColor:T.inactiveForegroundColor;this.activity.iconUrl?(this.label.style.backgroundColor=R?R.toString():"",this.label.style.color=""):(this.label.style.color=R?R.toString():"",this.label.style.backgroundColor="")}else{const R=this._action.checked?T.activeForegroundColor:T.inactiveForegroundColor,O=this._action.checked?T.activeBorderBottomColor:null;this.label.style.color=R?R.toString():"",this.label.style.borderBottomColor=O?O.toString():""}this.container.style.setProperty("--insert-border-color",T.dragAndDropBorder?T.dragAndDropBorder.toString():"")}if(this.badgeContent){const R=T.badgeForeground,O=T.badgeBackground,x=y.getColor(C.contrastBorder);this.badgeContent.style.color=R?R.toString():"",this.badgeContent.style.backgroundColor=O?O.toString():"",this.badgeContent.style.borderStyle=x?"solid":"",this.badgeContent.style.borderWidth=x?"1px":"",this.badgeContent.style.borderColor=x?x.toString():""}}render(y){super.render(y),this.container=y,this.options.icon&&this.container.classList.add("icon"),this.options.hasPopup?(this.container.setAttribute("role","button"),this.container.setAttribute("aria-haspopup","true")):this.container.setAttribute("role","tab"),this._register((0,_.addDisposableListener)(this.container,_.EventType.MOUSE_DOWN,()=>{this.container.classList.add("clicked")})),this._register((0,_.addDisposableListener)(this.container,_.EventType.MOUSE_UP,()=>{this.mouseUpTimeout&&clearTimeout(this.mouseUpTimeout),this.mouseUpTimeout=setTimeout(()=>{this.container.classList.remove("clicked")},800)})),this.label=(0,_.append)(y,(0,_.$)("a")),this.badge=(0,_.append)(y,(0,_.$)(".badge")),this.badgeContent=(0,_.append)(this.badge,(0,_.$)(".badge-content")),(0,_.append)(y,(0,_.$)(".active-item-indicator")),(0,_.hide)(this.badge),this.updateActivity(),this.updateStyles(),this.updateHover()}onThemeChange(y){this.updateStyles()}updateActivity(){this.updateLabel(),this.updateTitle(),this.updateBadge(),this.updateStyles()}updateBadge(){const y=this.getAction();if(!this.badge||!this.badgeContent||!(y instanceof a))return;const T=y.getBadge(),R=y.getClass();if(this.badgeDisposable.clear(),(0,_.clearNode)(this.badgeContent),(0,_.hide)(this.badge),T){if(T instanceof w.NumberBadge){if(T.number){let O=T.number.toString();if(T.number>999){const x=T.number/1e3,F=Math.floor(x);x>F?O=`${F}K+`:O=`${x}K`}this.badgeContent.textContent=O,(0,_.show)(this.badge)}}else if(T instanceof w.TextBadge)this.badgeContent.textContent=T.text,(0,_.show)(this.badge);else if(T instanceof w.IconBadge){const O=I.ThemeIcon.asClassNameArray(T.icon);this.badgeContent.classList.add(...O),(0,_.show)(this.badge)}else T instanceof w.ProgressBadge&&(0,_.show)(this.badge);if(R){const O=R.split(" ");this.badge.classList.add(...O),this.badgeDisposable.value=(0,k.toDisposable)(()=>this.badge.classList.remove(...O))}}this.updateTitle()}updateLabel(){this.label.className="action-label",this.activity.cssClass&&this.label.classList.add(...this.activity.cssClass.split(" ")),this.options.icon&&!this.activity.iconUrl&&this.label.classList.add("codicon"),this.options.icon||(this.label.textContent=this.getAction().label)}updateTitle(){const y=this.computeTitle();[this.label,this.badge,this.container].forEach(T=>{T&&(T.setAttribute("aria-label",y),T.setAttribute("title",""),T.removeAttribute("title"))})}computeTitle(){this.keybindingLabel=this.computeKeybindingLabel();let y=this.keybindingLabel?(0,t.localize)(0,null,this.activity.name,this.keybindingLabel):this.activity.name;const T=this.getAction().getBadge();return T?.getDescription()&&(y=(0,t.localize)(1,null,y,T.getDescription())),y}computeKeybindingLabel(){return(this.activity.keybindingId?this.keybindingService.lookupKeybinding(this.activity.keybindingId):null)?.getLabel()}updateHover(){this.hoverDisposables.clear(),this.updateTitle(),this.hoverDisposables.add((0,_.addDisposableListener)(this.container,_.EventType.MOUSE_OVER,()=>{this.showHoverScheduler.isScheduled()||(Date.now()-fs._hoverLeaveTime<200?this.showHover(!0):this.showHoverScheduler.schedule(this.configurationService.getValue("workbench.hover.delay")))},!0)),this.hoverDisposables.add((0,_.addDisposableListener)(this.container,_.EventType.MOUSE_LEAVE,()=>{fs._hoverLeaveTime=Date.now(),this.hover.value=void 0,this.showHoverScheduler.cancel()},!0)),this.hoverDisposables.add((0,k.toDisposable)(()=>{this.hover.value=void 0,this.showHoverScheduler.cancel()}))}showHover(y=!1){if(this.hover.value)return;const T=this.options.hoverOptions.position();this.hover.value=this.hoverService.showHover({target:this.container,hoverPosition:T,content:this.computeTitle(),showPointer:!0,compact:!0,hideOnKeyDown:!0,skipFadeInAnimation:y})}dispose(){super.dispose(),this.mouseUpTimeout&&clearTimeout(this.mouseUpTimeout),this.badge.remove()}};n._hoverLeaveTime=0,n=Ee([W(2,I.IThemeService),W(3,r.IHoverService),W(4,u.IConfigurationService),W(5,c.IKeybindingService)],n),e.ActivityActionViewItem=n;class h extends a{constructor(y){super({id:"additionalComposites.action",name:(0,t.localize)(2,null),cssClass:l.Codicon.more.classNames});this.showMenu=y}async run(){this.showMenu()}}e.CompositeOverflowActivityAction=h;let g=class extends n{constructor(y,T,R,O,x,F,L,M,N,B,P,V){super(y,{icon:!0,colors:F,hasPopup:!0,hoverOptions:L},N,B,P,V);this.getOverflowingComposites=T,this.getActiveCompositeId=R,this.getBadge=O,this.getCompositeOpenAction=x,this.contextMenuService=M,this.actions=[]}showMenu(){this.actions&&(0,k.dispose)(this.actions),this.actions=this.getActions(),this.contextMenuService.showContextMenu({getAnchor:()=>this.container,getActions:()=>this.actions,getCheckedActionsRepresentation:()=>"radio",onHide:()=>(0,k.dispose)(this.actions)})}getActions(){return this.getOverflowingComposites().map(y=>{const T=this.getCompositeOpenAction(y.id);T.checked=this.getActiveCompositeId()===T.id;const R=this.getBadge(y.id);let O;return R instanceof w.NumberBadge?O=R.number:R instanceof w.TextBadge&&(O=R.text),O?T.label=(0,t.localize)(3,null,y.name,O):T.label=y.name||"",T})}dispose(){super.dispose(),this.actions&&(this.actions=(0,k.dispose)(this.actions))}};g=Ee([W(7,D.IContextMenuService),W(8,I.IThemeService),W(9,r.IHoverService),W(10,u.IConfigurationService),W(11,c.IKeybindingService)],g),e.CompositeOverflowActivityActionViewItem=g;let d=class extends f.Action{constructor(y){super("activitybar.manage.extension",(0,t.localize)(4,null));this.commandService=y}run(y){return this.commandService.executeCommand("_extensions.manage",y)}};d=Ee([W(0,A.ICommandService)],d);let m=class ir extends n{constructor(y,T,R,O,x,F,L,M,N,B,P,V,z){super(T,y,P,V,z,N);this.compositeActivityAction=T,this.toggleCompositePinnedAction=R,this.compositeContextMenuActionsProvider=O,this.contextMenuActionsProvider=x,this.dndHandler=F,this.compositeBar=L,this.contextMenuService=M,ir.manageExtensionAction||(ir.manageExtensionAction=B.createInstance(d))}render(y){super.render(y),this.updateChecked(),this.updateEnabled(),this._register((0,_.addDisposableListener)(this.container,_.EventType.CONTEXT_MENU,R=>{_.EventHelper.stop(R,!0),this.showContextMenu(y)}));let T;this._register(S.CompositeDragAndDropObserver.INSTANCE.registerDraggable(this.container,()=>({type:"composite",id:this.activity.id}),{onDragOver:R=>{const O=R.dragAndDropData.getData().id!==this.activity.id&&this.dndHandler.onDragOver(R.dragAndDropData,this.activity.id,R.eventData);(0,S.toggleDropEffect)(R.eventData.dataTransfer,"move",O),T=this.updateFromDragging(y,O,R.eventData)},onDragLeave:R=>{T=this.updateFromDragging(y,!1,R.eventData)},onDragEnd:R=>{T=this.updateFromDragging(y,!1,R.eventData)},onDrop:R=>{_.EventHelper.stop(R.eventData,!0),this.dndHandler.drop(R.dragAndDropData,this.activity.id,R.eventData,T),T=this.updateFromDragging(y,!1,R.eventData)},onDragStart:R=>{R.dragAndDropData.getData().id===this.activity.id&&(R.eventData.dataTransfer&&(R.eventData.dataTransfer.effectAllowed="move"),this.blur())}})),[this.badge,this.label].forEach(R=>this._register(new o.DelayedDragHandler(R,()=>{this.getAction().checked||this.getAction().run()}))),this.updateStyles()}updateFromDragging(y,T,R){const O=y.getBoundingClientRect(),x=R.clientX,F=R.clientY,L=O.bottom-O.top,M=O.right-O.left,N=F<=O.top+L*.4,B=F>O.bottom-L*.4,P=F<=O.top+L*.5,V=x<=O.left+M*.4,z=x>O.right-M*.4,U=x<=O.left+M*.5,H=y.classList,K={vertical:H.contains("top")?"top":H.contains("bottom")?"bottom":void 0,horizontal:H.contains("left")?"left":H.contains("right")?"right":void 0},G=N||P&&!K.vertical||!B&&K.vertical==="top",q=B||!P&&!K.vertical||!N&&K.vertical==="bottom",Z=V||U&&!K.horizontal||!z&&K.horizontal==="left",j=z||!U&&!K.horizontal||!V&&K.horizontal==="right";if(y.classList.toggle("top",T&&G),y.classList.toggle("bottom",T&&q),y.classList.toggle("left",T&&Z),y.classList.toggle("right",T&&j),!!T)return{verticallyBefore:G,horizontallyBefore:Z}}showContextMenu(y){const T=[this.toggleCompositePinnedAction],R=this.compositeContextMenuActionsProvider(this.activity.id);R.length&&T.push(...R),this.compositeActivityAction.activity.extensionId&&(T.push(new f.Separator),T.push(ir.manageExtensionAction)),this.compositeBar.isPinned(this.activity.id)?(this.toggleCompositePinnedAction.label=(0,t.localize)(5,null,this.activity.name),this.toggleCompositePinnedAction.checked=!1):this.toggleCompositePinnedAction.label=(0,t.localize)(6,null,this.activity.name);const x=this.contextMenuActionsProvider();x.length&&(T.push(new f.Separator),T.push(...x));const F=(0,_.getDomNodePagePosition)(y),L={x:Math.floor(F.left+F.width/2),y:F.top+F.height};this.contextMenuService.showContextMenu({getAnchor:()=>L,getActions:()=>T,getActionsContext:()=>this.activity.id})}updateChecked(){this.getAction().checked?(this.container.classList.add("checked"),this.container.setAttribute("aria-label",this.container.title),this.container.setAttribute("aria-expanded","true"),this.container.setAttribute("aria-selected","true")):(this.container.classList.remove("checked"),this.container.setAttribute("aria-label",this.container.title),this.container.setAttribute("aria-expanded","false"),this.container.setAttribute("aria-selected","false")),this.updateStyles()}updateEnabled(){!this.element||(this.getAction().enabled?this.element.classList.remove("disabled"):this.element.classList.add("disabled"))}dispose(){super.dispose(),this.label.remove()}};m=Ee([W(7,D.IContextMenuService),W(8,c.IKeybindingService),W(9,v.IInstantiationService),W(10,I.IThemeService),W(11,r.IHoverService),W(12,u.IConfigurationService)],m),e.CompositeActionViewItem=m;class b extends f.Action{constructor(y,T){super("show.toggleCompositePinned",y?y.name:(0,t.localize)(7,null));this.activity=y,this.compositeBar=T,this.checked=!!this.activity&&this.compositeBar.isPinned(this.activity.id)}async run(y){const T=this.activity?this.activity.id:y;this.compositeBar.isPinned(T)?this.compositeBar.unpin(T):this.compositeBar.pin(T)}}e.ToggleCompositePinnedAction=b}),define(ne[2744],re([1,0,1381,10,91,129,36,2,16,37,27,32,12,438,70,82,80,7,73,14,427,271,50,8,46,213,24,219,38,88,349,1049]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PlaceHolderToggleCompositePinnedAction=e.PlaceHolderViewContainerActivityAction=e.GlobalActivityActionViewItem=e.AccountsActivityActionViewItem=e.ViewContainerActivityAction=void 0;let R=class hl extends c.ActivityAction{constructor(P,V,z,U,H){super(P);this.paneCompositePart=V,this.layoutService=z,this.telemetryService=U,this.configurationService=H,this.lastRun=0}updateActivity(P){this.activity=P}async run(P){if(P instanceof MouseEvent&&P.button===2)return;const V=Date.now();if(V>this.lastRun&&V-this.lastRun<hl.preventDoubleClickDelay)return;this.lastRun=V;const z=this.layoutService.isVisible("workbench.parts.sidebar"),U=this.paneCompositePart.getActivePaneComposite(),H=this.configurationService.getValue("workbench.activityBar.iconClickBehavior"),K=P&&"preserveFocus"in P?!P.preserveFocus:!0;if(z&&U?.getId()===this.activity.id){switch(H){case"focus":this.logAction("refocus"),this.paneCompositePart.openPaneComposite(this.activity.id,K);break;case"toggle":default:this.logAction("hide"),this.layoutService.setPartHidden(!0,"workbench.parts.sidebar");break}return}return this.logAction("show"),await this.paneCompositePart.openPaneComposite(this.activity.id,K),this.activate()}logAction(P){this.telemetryService.publicLog2("activityBarAction",{viewletId:this.activity.id,action:P})}};R.preventDoubleClickDelay=300,R=Ee([W(2,s.IWorkbenchLayoutService),W(3,v.ITelemetryService),W(4,h.IConfigurationService)],R),e.ViewContainerActivityAction=R;let O=class extends c.ActivityActionViewItem{constructor(P,V,z,U,H,K,G,q,Z,j,X,Y,$){super(V,{draggable:!1,colors:U,icon:!0,hasPopup:!0,hoverOptions:H},K,G,X,$);this.menuId=P,this.contextMenuActionsProvider=z,this.menuService=q,this.contextMenuService=Z,this.contextKeyService=j,this.environmentService=Y}render(P){super.render(P),this._register((0,f.addDisposableListener)(this.container,f.EventType.MOUSE_DOWN,V=>{f.EventHelper.stop(V,!0),this.showContextMenu(V)})),this._register((0,f.addDisposableListener)(this.container,f.EventType.KEY_UP,V=>{let z=new _.StandardKeyboardEvent(V);(z.equals(3)||z.equals(10))&&(f.EventHelper.stop(V,!0),this.showContextMenu())})),this._register((0,f.addDisposableListener)(this.container,A.EventType.Tap,V=>{f.EventHelper.stop(V,!0),this.showContextMenu()}))}async showContextMenu(P){const V=new D.DisposableStore;let z;if(P?.button!==2){const K=V.add(this.menuService.createMenu(this.menuId,this.contextKeyService));z=await this.resolveMainMenuActions(K,V)}else z=await this.resolveContextMenuActions(V);const U=p.isWeb||(0,d.getTitleBarStyle)(this.configurationService)!=="native"&&!p.isMacintosh,H=this.configurationService.getValue("workbench.sideBar.location");this.contextMenuService.showContextMenu({getAnchor:()=>U?this.container:P||this.container,anchorAlignment:U?H==="left"?1:0:void 0,anchorAxisAlignment:U?1:0,getActions:()=>z,onHide:()=>V.dispose()})}async resolveMainMenuActions(P,V){const z=[];return V.add((0,r.createAndFillInActionBarActions)(P,void 0,{primary:[],secondary:z})),z}async resolveContextMenuActions(P){return this.contextMenuActionsProvider()}};O=Ee([W(5,o.IThemeService),W(6,b.IHoverService),W(7,I.IMenuService),W(8,w.IContextMenuService),W(9,l.IContextKeyService),W(10,h.IConfigurationService),W(11,n.IWorkbenchEnvironmentService),W(12,E.IKeybindingService)],O);let x=class gl extends O{constructor(P,V,z,U,H,K,G,q,Z,j,X,Y,$,J,ee,te){super(I.MenuId.AccountsContext,P,V,z,U,H,K,q,G,Z,$,X,ee);this.authenticationService=j,this.productService=Y,this.storageService=J,this.credentialsService=te}async resolveMainMenuActions(P,V){await super.resolveMainMenuActions(P,V);const z=P.getActions(),U=this.authenticationService.getProviderIds(),H=U.map(async Z=>{try{const j=await this.authenticationService.getSessions(Z),X={};return j.forEach(Y=>{X[Y.account.label]?X[Y.account.label].push(Y):X[Y.account.label]=[Y]}),{providerId:Z,sessions:X}}catch{return{providerId:Z}}}),K=await Promise.all(H);let G=[];const q=await(0,u.getCurrentAuthenticationSessionInfo)(this.credentialsService,this.productService);if(K.forEach(Z=>{const j=this.authenticationService.getLabel(Z.providerId);if(Z.sessions)Object.keys(Z.sessions).forEach(X=>{const Y=V.add(new k.Action(`configureSessions${X}`,(0,t.localize)(0,null),"",!0,()=>this.authenticationService.manageTrustedExtensionsForAccount(Z.providerId,X))),$=V.add(new k.Action("signOut",(0,t.localize)(1,null),"",!0,()=>this.authenticationService.removeAccountSessions(Z.providerId,X,Z.sessions[X]))),J=[Y];(!Z.sessions[X].some(se=>se.id===q?.id)||q?.canSignOut)&&J.push($);const te=V.add(new k.SubmenuAction("activitybar.submenu",`${X} (${j})`,J));G.push(te)});else{const X=V.add(new k.Action("providerUnavailable",(0,t.localize)(2,null,j)));G.push(X)}}),U.length&&!G.length){const Z=V.add(new k.Action("noAccountsAvailable",(0,t.localize)(3,null),void 0,!1));G.push(Z)}return G.length&&z.length&&G.push(V.add(new k.Separator)),z.forEach((Z,j)=>{const X=Z[1];G=G.concat(X),j!==z.length-1&&G.push(V.add(new k.Separator))}),G}async resolveContextMenuActions(P){const V=await super.resolveContextMenuActions(P);return V.unshift((0,k.toAction)({id:"hideAccounts",label:(0,t.localize)(4,null),run:()=>this.storageService.store(gl.ACCOUNTS_VISIBILITY_PREFERENCE_KEY,!1,0,0)}),new k.Separator),V}};x.ACCOUNTS_VISIBILITY_PREFERENCE_KEY="workbench.activity.showAccounts",x=Ee([W(4,o.IThemeService),W(5,b.IHoverService),W(6,w.IContextMenuService),W(7,I.IMenuService),W(8,l.IContextKeyService),W(9,a.IAuthenticationService),W(10,n.IWorkbenchEnvironmentService),W(11,g.IProductService),W(12,h.IConfigurationService),W(13,m.IStorageService),W(14,E.IKeybindingService),W(15,T.ICredentialsService)],x),e.AccountsActivityActionViewItem=x;let F=class extends O{constructor(P,V,z,U,H,K,G,q,Z,j,X,Y){super(I.MenuId.GlobalActivity,P,V,z,U,H,K,G,q,Z,j,X,Y)}};F=Ee([W(4,o.IThemeService),W(5,b.IHoverService),W(6,I.IMenuService),W(7,w.IContextMenuService),W(8,l.IContextKeyService),W(9,h.IConfigurationService),W(10,n.IWorkbenchEnvironmentService),W(11,E.IKeybindingService)],F),e.GlobalActivityActionViewItem=F;class L extends R{}e.PlaceHolderViewContainerActivityAction=L;class M extends c.ToggleCompositePinnedAction{constructor(P,V){super({id:P,name:P,cssClass:void 0},V)}setActivity(P){this.label=P.name}}e.PlaceHolderToggleCompositePinnedAction=M;class N extends I.Action2{constructor(P,V){super(P);this.offset=V}async run(P){const V=P.get(y.IPaneCompositePartService),z=V.getVisiblePaneCompositeIds(0),U=V.getActivePaneComposite(0);if(!U)return;let H;for(let K=0;K<z.length;K++)if(z[K]===U.getId()){H=z[(K+z.length+this.offset)%z.length];break}await V.openPaneComposite(H,0,!0)}}(0,I.registerAction2)(class extends N{constructor(){super({id:"workbench.action.previousSideBarView",title:{value:(0,t.localize)(5,null),original:"Previous Primary Side Bar View"},category:i.CATEGORIES.View,f1:!0},-1)}}),(0,I.registerAction2)(class extends N{constructor(){super({id:"workbench.action.nextSideBarView",title:{value:(0,t.localize)(6,null),original:"Next Primary Side Bar View"},category:i.CATEGORIES.View,f1:!0},1)}}),(0,I.registerAction2)(class extends I.Action2{constructor(){super({id:"workbench.action.focusActivityBar",title:{value:(0,t.localize)(7,null),original:"Focus Activity Bar"},category:i.CATEGORIES.View,f1:!0})}async run(P){const V=P.get(s.IWorkbenchLayoutService);V.setPartHidden(!1,"workbench.parts.activitybar"),V.focusPart("workbench.parts.activitybar")}}),(0,o.registerThemingParticipant)((B,P)=>{const V=B.getColor(S.ACTIVITY_BAR_FOREGROUND);V&&P.addRule(` .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.active .action-label:not(.codicon), .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:focus .action-label:not(.codicon), .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:hover .action-label:not(.codicon) { background-color: ${V} !important; } .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.active .action-label.codicon, .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:focus .action-label.codicon, .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:hover .action-label.codicon { color: ${V} !important; } `);const z=B.getColor(S.ACTIVITY_BAR_ACTIVE_BORDER);z&&P.addRule(` .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked .active-item-indicator:before { border-left-color: ${z}; } `);const U=B.getColor(S.ACTIVITY_BAR_ACTIVE_FOCUS_BORDER);U&&P.addRule(` .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked:focus::before { visibility: hidden; } .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked:focus .active-item-indicator:before { visibility: visible; border-left-color: ${U}; } `);const H=B.getColor(S.ACTIVITY_BAR_ACTIVE_BACKGROUND);H&&P.addRule(` .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked .active-item-indicator { z-index: 0; background-color: ${H}; } `);const K=B.getColor(C.activeContrastBorder);if(K)P.addRule(` .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:before { content: ""; position: absolute; top: 8px; left: 8px; height: 32px; width: 32px; z-index: 1; } .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.active:before, .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.active:hover:before, .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked:before, .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked:hover:before { outline: 1px solid; } .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:hover:before { outline: 1px dashed; } .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:focus .active-item-indicator:before { border-left-color: ${K}; } .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.active:before, .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.active:hover:before, .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked:before, .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked:hover:before, .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:hover:before { outline-color: ${K}; } `);else{const G=B.getColor(C.focusBorder);G&&P.addRule(` .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:focus .active-item-indicator:before { border-left-color: ${G}; } `)}})}),define(ne[934],re([1,0,1386,36,22,2,5,78,438,10,137,37,138,13,6,156,129]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositeBar=e.CompositeDragAndDrop=void 0;class l{constructor(a,n,h,g,d){this.viewDescriptorService=a,this.targetContainerLocation=n,this.openComposite=h,this.moveComposite=g,this.getItems=d}drop(a,n,h,g){const d=a.getData();if(d.type==="composite"){const m=this.viewDescriptorService.getViewContainerById(d.id);if(this.viewDescriptorService.getViewContainerLocation(m)===this.targetContainerLocation)n&&this.moveComposite(d.id,n,g);else{if(this.viewDescriptorService.getViewContainerModel(m).allViewDescriptors.some(y=>!y.canMoveView))return;this.viewDescriptorService.moveViewContainerToLocation(m,this.targetContainerLocation,this.getTargetIndex(n,g))}}if(d.type==="view"){const m=this.viewDescriptorService.getViewDescriptorById(d.id);if(m&&m.canMoveView){this.viewDescriptorService.moveViewToLocation(m,this.targetContainerLocation);const b=this.viewDescriptorService.getViewContainerByViewId(m.id);n&&this.moveComposite(b.id,n,g),this.openComposite(b.id,!0).then(E=>{E&&E.openView(m.id,!0)})}}}onDragEnter(a,n,h){return this.canDrop(a,n)}onDragOver(a,n,h){return this.canDrop(a,n)}getTargetIndex(a,n){if(!a)return;const h=this.getItems(),g=this.targetContainerLocation===1?n?.horizontallyBefore:n?.verticallyBefore;return h.filter(d=>d.visible).findIndex(d=>d.id===a)+(g?0:1)}canDrop(a,n){const h=a.getData();if(h.type==="composite"){const g=this.viewDescriptorService.getViewContainerById(h.id);return this.viewDescriptorService.getViewContainerLocation(g)===this.targetContainerLocation?h.id!==n:!this.viewDescriptorService.getViewContainerModel(g).allViewDescriptors.some(b=>!b.canMoveView)}else{const g=this.viewDescriptorService.getViewDescriptorById(h.id);return!(!g||!g.canMoveView)}}}e.CompositeDragAndDrop=l;let r=class extends o.Widget{constructor(a,n,h,g){super();this.options=n,this.instantiationService=h,this.contextMenuService=g,this._onDidChange=this._register(new i.Emitter),this.onDidChange=this._onDidChange.event,this.model=new p(a,n),this.visibleComposites=[],this.compositeSizeInBar=new Map,this.computeSizes(this.model.visibleItems)}getCompositeBarItems(){return[...this.model.items]}setCompositeBarItems(a){this.model.setItems(a)&&this.updateCompositeSwitcher()}getPinnedComposites(){return this.model.pinnedItems}getVisibleComposites(){return this.model.visibleItems}create(a){const n=a.appendChild((0,w.$)(".composite-bar"));this.compositeSwitcherBar=this._register(new D.ActionBar(n,{actionViewItemProvider:g=>{if(g instanceof I.CompositeOverflowActivityAction)return this.compositeOverflowActionViewItem;const d=this.model.findItem(g.id);return d&&this.instantiationService.createInstance(I.CompositeActionViewItem,{draggable:!0,colors:this.options.colors,icon:this.options.icon,hoverOptions:this.options.activityHoverOptions},g,d.pinnedAction,m=>this.options.getContextMenuActionsForComposite(m),()=>this.getContextMenuActions(),this.options.dndHandler,this)},orientation:this.options.orientation,ariaLabel:(0,t.localize)(0,null),animated:!1,preventLoopNavigation:this.options.preventLoopNavigation,triggerKeys:{keyDown:!0}})),this._register((0,w.addDisposableListener)(a,w.EventType.CONTEXT_MENU,g=>this.showContextMenu(g))),this._register(s.Gesture.addTarget(a)),this._register((0,w.addDisposableListener)(a,s.EventType.Contextmenu,g=>this.showContextMenu(g)));let h;return this._register(S.CompositeDragAndDropObserver.INSTANCE.registerTarget(a,{onDragOver:g=>{const d=this.getVisibleComposites();if(!d.length||g.eventData.target&&(0,w.isAncestor)(g.eventData.target,n)){h=this.updateFromDragging(a,!1,!1,!0);return}const m=this.insertAtFront(n,g.eventData),b=m?d[0]:d[d.length-1],E=this.options.dndHandler.onDragOver(g.dragAndDropData,b.id,g.eventData);(0,S.toggleDropEffect)(g.eventData.dataTransfer,"move",E),h=this.updateFromDragging(a,E,m,!0)},onDragLeave:g=>{h=this.updateFromDragging(a,!1,!1,!1)},onDragEnd:g=>{h=this.updateFromDragging(a,!1,!1,!1)},onDrop:g=>{const d=this.getVisibleComposites();if(d.length){const m=this.insertAtFront(n,g.eventData)?d[0]:d[d.length-1];this.options.dndHandler.drop(g.dragAndDropData,m.id,g.eventData,h)}h=this.updateFromDragging(a,!1,!1,!1)}})),n}insertAtFront(a,n){const h=a.getBoundingClientRect(),g=n.clientX,d=n.clientY;switch(this.options.orientation){case 0:return g<h.left;case 1:return d<h.top}}updateFromDragging(a,n,h,g){if(a.classList.toggle("dragged-over",g),a.classList.toggle("dragged-over-head",n&&h),a.classList.toggle("dragged-over-tail",n&&!h),!!n)return{verticallyBefore:h,horizontallyBefore:h}}focus(a){this.compositeSwitcherBar&&this.compositeSwitcherBar.focus(a)}recomputeSizes(){this.computeSizes(this.model.visibleItems)}layout(a){this.dimension=a,!(a.height===0||a.width===0)&&(this.compositeSizeInBar.size===0&&this.computeSizes(this.model.visibleItems),this.updateCompositeSwitcher())}addComposite({id:a,name:n,order:h,requestedIndex:g}){this.model.add(a,n,h,g)&&(this.computeSizes([this.model.findItem(a)]),this.updateCompositeSwitcher())}removeComposite(a){this.isPinned(a)&&this.unpin(a),this.model.remove(a)&&this.updateCompositeSwitcher()}hideComposite(a){this.model.hide(a)&&(this.resetActiveComposite(a),this.updateCompositeSwitcher())}activateComposite(a){const n=this.model.activeItem;this.model.activate(a)&&(this.visibleComposites.indexOf(a)===-1||!!this.model.activeItem&&!this.model.activeItem.pinned||n&&!n.pinned)&&this.updateCompositeSwitcher()}deactivateComposite(a){const n=this.model.activeItem;this.model.deactivate()&&n&&!n.pinned&&this.updateCompositeSwitcher()}showActivity(a,n,h,g){if(!n)throw(0,_.illegalArgument)("badge");typeof g!="number"&&(g=0);const d={badge:n,clazz:h,priority:g};return this.model.addActivity(a,d),(0,A.toDisposable)(()=>this.model.removeActivity(a,d))}async pin(a,n){this.model.setPinned(a,!0)&&(this.updateCompositeSwitcher(),n&&(await this.options.openComposite(a),this.activateComposite(a)))}unpin(a){this.model.setPinned(a,!1)&&(this.updateCompositeSwitcher(),this.resetActiveComposite(a))}resetActiveComposite(a){const n=this.options.getDefaultCompositeId();!this.model.activeItem||this.model.activeItem.id!==a||(this.deactivateComposite(a),n&&n!==a&&this.isPinned(n)?this.options.openComposite(n,!0):this.visibleComposites.length<=1?this.options.hidePart():this.options.openComposite(this.visibleComposites.filter(h=>h!==a)[0]))}isPinned(a){return this.model.findItem(a)?.pinned}move(a,n,h){if(h!==void 0){const g=this.model.items.findIndex(m=>m.id===a);let d=this.model.items.findIndex(m=>m.id===n);g>=0&&d>=0&&(!h&&g>d&&d++,h&&g<d&&d--,d<this.model.items.length&&d>=0&&d!==g&&this.model.move(this.model.items[g].id,this.model.items[d].id)&&setTimeout(()=>this.updateCompositeSwitcher(),0))}else this.model.move(a,n)&&setTimeout(()=>this.updateCompositeSwitcher(),0)}getAction(a){return this.model.findItem(a)?.activityAction}computeSizes(a){const n=this.options.compositeSize;if(n)a.forEach(h=>this.compositeSizeInBar.set(h.id,n));else{const h=this.compositeSwitcherBar;if(h&&this.dimension&&this.dimension.height!==0&&this.dimension.width!==0){const g=h.viewItems.length;h.push(a.map(d=>d.activityAction)),a.map((d,m)=>this.compositeSizeInBar.set(d.id,this.options.orientation===1?h.getHeight(g+m):h.getWidth(g+m))),a.forEach(()=>h.pull(h.viewItems.length-1))}}}updateCompositeSwitcher(){const a=this.compositeSwitcherBar;if(!a||!this.dimension)return;let n=this.model.visibleItems.filter(E=>E.pinned||this.model.activeItem&&this.model.activeItem.id===E.id).map(E=>E.id),h=n.length,g=n.length,d=0;const m=this.options.orientation===1?this.dimension.height:this.dimension.width;for(let E=0;E<n.length;E++){const y=this.compositeSizeInBar.get(n[E]);if(d+y>m){h=E;break}d+=y}for(g>h&&(n=n.slice(0,h)),this.model.activeItem&&n.every(E=>!!this.model.activeItem&&E!==this.model.activeItem.id)&&(d+=this.compositeSizeInBar.get(this.model.activeItem.id),n.push(this.model.activeItem.id));d>m&&n.length;){const E=n.length>1?n.splice(n.length-2,1)[0]:n.pop();d-=this.compositeSizeInBar.get(E)}for(g>n.length&&(d+=this.options.overflowActionSize);d>m&&n.length;){const E=n.length>1&&n[n.length-1]===this.model.activeItem?.id?n.splice(n.length-2,1)[0]:n.pop();d-=this.compositeSizeInBar.get(E)}g===n.length&&this.compositeOverflowAction&&(a.pull(a.length()-1),this.compositeOverflowAction.dispose(),this.compositeOverflowAction=void 0,this.compositeOverflowActionViewItem&&this.compositeOverflowActionViewItem.dispose(),this.compositeOverflowActionViewItem=void 0);const b=[];this.visibleComposites.forEach((E,y)=>{n.includes(E)||b.push(y)}),b.reverse().forEach(E=>{const y=a.viewItems[E];a.pull(E),y.dispose(),this.visibleComposites.splice(E,1)}),n.forEach((E,y)=>{const T=this.visibleComposites.indexOf(E);if(y!==T){if(T!==-1){const R=a.viewItems[T];a.pull(T),R.dispose(),this.visibleComposites.splice(T,1)}a.push(this.model.findItem(E).activityAction,{label:!0,icon:this.options.icon,index:y}),this.visibleComposites.splice(y,0,E)}}),g>n.length&&!this.compositeOverflowAction&&(this.compositeOverflowAction=this.instantiationService.createInstance(I.CompositeOverflowActivityAction,()=>{this.compositeOverflowActionViewItem&&this.compositeOverflowActionViewItem.showMenu()}),this.compositeOverflowActionViewItem=this.instantiationService.createInstance(I.CompositeOverflowActivityActionViewItem,this.compositeOverflowAction,()=>this.getOverflowingComposites(),()=>this.model.activeItem?this.model.activeItem.id:void 0,E=>this.model.findItem(E)?.activity[0]?.badge,this.options.getOnCompositeClickAction,this.options.colors,this.options.activityHoverOptions),a.push(this.compositeOverflowAction,{label:!1,icon:!0})),this._onDidChange.fire()}getOverflowingComposites(){let a=this.model.visibleItems.filter(n=>n.pinned).map(n=>n.id);return this.model.activeItem&&!this.model.activeItem.pinned&&a.push(this.model.activeItem.id),a=a.filter(n=>!this.visibleComposites.includes(n)),this.model.visibleItems.filter(n=>a.includes(n.id)).map(n=>({id:n.id,name:this.getAction(n.id)?.label||n.name}))}showContextMenu(a){w.EventHelper.stop(a,!0);const n=new v.StandardMouseEvent(a);this.contextMenuService.showContextMenu({getAnchor:()=>({x:n.posx,y:n.posy}),getActions:()=>this.getContextMenuActions(a)})}getContextMenuActions(a){const n=this.model.visibleItems.map(({id:h,name:g,activityAction:d})=>(0,f.toAction)({id:h,label:this.getAction(h).label||g||h,checked:this.isPinned(h),enabled:d.enabled,run:()=>{this.isPinned(h)?this.unpin(h):this.pin(h,!0)}}));return this.options.fillExtraContextMenuActions(n,a),n}};r=Ee([W(2,k.IInstantiationService),W(3,C.IContextMenuService)],r),e.CompositeBar=r;class p{constructor(a,n){this._items=[],this.options=n,this.setItems(a)}get items(){return this._items}setItems(a){const n=[];let h=!1;if(!this.items||this.items.length===0)this._items=a.map(g=>this.createCompositeBarItem(g.id,g.name,g.order,g.pinned,g.visible)),h=!0;else{const g=this.items;for(let d=0;d<a.length;d++){const m=a[d],b=g.filter(({id:E})=>E===m.id)[0];b?b.pinned!==m.pinned||d!==g.indexOf(b)?(b.pinned=m.pinned,n.push(b),h=!0):n.push(b):(n.push(this.createCompositeBarItem(m.id,m.name,m.order,m.pinned,m.visible)),h=!0)}this._items=n}return h}get visibleItems(){return this.items.filter(a=>a.visible)}get pinnedItems(){return this.items.filter(a=>a.visible&&a.pinned)}createCompositeBarItem(a,n,h,g,d){const m=this.options;return{id:a,name:n,pinned:g,order:h,visible:d,activity:[],get activityAction(){return m.getActivityAction(a)},get pinnedAction(){return m.getCompositePinnedAction(a)}}}add(a,n,h,g){const d=this.findItem(a);if(d){let m=!1;return d.name=n,(0,c.isUndefinedOrNull)(h)||(m=d.order!==h,d.order=h),d.visible||(d.visible=!0,m=!0),m}else{const m=this.createCompositeBarItem(a,n,h,!0,!0);if((0,c.isUndefinedOrNull)(g))if((0,c.isUndefinedOrNull)(h))this.items.push(m);else{let b=0;for(;b<this.items.length&&typeof this.items[b].order=="number"&&this.items[b].order<h;)b++;this.items.splice(b,0,m)}else{let b=0,E=g;for(;E>0&&b<this.items.length;)this.items[b++].visible&&E--;this.items.splice(b,0,m)}return!0}}remove(a){for(let n=0;n<this.items.length;n++)if(this.items[n].id===a)return this.items.splice(n,1),!0;return!1}hide(a){for(const n of this.items)if(n.id===a)return n.visible?(n.visible=!1,!0):!1;return!1}move(a,n){const h=this.findIndex(a),g=this.findIndex(n);if(h===-1||g===-1)return!1;const d=this.items.splice(h,1)[0];return this.items.splice(g,0,d),d.pinned=!0,!0}setPinned(a,n){for(const h of this.items)if(h.id===a)return h.pinned!==n?(h.pinned=n,!0):!1;return!1}addActivity(a,n){const h=this.findItem(a);if(h){const g=h.activity;for(let d=0;d<=g.length;d++)if(d===g.length){g.push(n);break}else if(g[d].priority<=n.priority){g.splice(d,0,n);break}return this.updateActivity(a),!0}return!1}removeActivity(a,n){const h=this.findItem(a);if(h){const g=h.activity.indexOf(n);if(g!==-1)return h.activity.splice(g,1),this.updateActivity(a),!0}return!1}updateActivity(a){const n=this.findItem(a);if(n)if(n.activity.length){const[{badge:h,clazz:g}]=n.activity;n.activityAction.setBadge(h,g)}else n.activityAction.setBadge(void 0)}activate(a){if(!this.activeItem||this.activeItem.id!==a){this.activeItem&&this.deactivate();for(const n of this.items)if(n.id===a)return this.activeItem=n,this.activeItem.activityAction.activate(),!0}return!1}deactivate(){return this.activeItem?(this.activeItem.activityAction.deactivate(),this.activeItem=void 0,!0):!1}findItem(a){return this.items.filter(n=>n.id===a)[0]}findIndex(a){for(let n=0;n<this.items.length;n++)if(this.items[n].id===a)return n;return-1}}}),define(ne[2745],re([1,0,156,10,316,82,12,32,14,59,2,5,11,170,21,13,508,34,8,1054]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorDropTarget=void 0;function p(n,h){return n.getValue("workbench.experimental.editor.dragAndDropIntoEditor.enabled")?h.shiftKey:!1}let u=class fl extends k.Themable{constructor(h,g,d,m,b,E,y,T,R){super(d);this.accessor=h,this.groupView=g,this.configurationService=m,this.instantiationService=b,this.editorService=E,this.editorGroupService=y,this.treeViewsDragAndDropService=T,this.contextService=R,this.editorTransfer=t.LocalSelectionTransfer.getInstance(),this.groupTransfer=t.LocalSelectionTransfer.getInstance(),this.treeItemsTransfer=t.LocalSelectionTransfer.getInstance(),this.cleanupOverlayScheduler=this._register(new o.RunOnceScheduler(()=>this.dispose(),300)),this.create()}get disposed(){return!!this._disposed}create(){const h=this.getOverlayOffsetHeight(),g=this.container=document.createElement("div");g.id=fl.OVERLAY_ID,g.style.top=`${h}px`,this.groupView.element.appendChild(g),this.groupView.element.classList.add("dragged-over"),this._register((0,v.toDisposable)(()=>{this.groupView.element.removeChild(g),this.groupView.element.classList.remove("dragged-over")})),this.overlay=document.createElement("div"),this.overlay.classList.add("editor-group-overlay-indicator"),g.appendChild(this.overlay),this.registerListeners(g),this.updateStyles()}updateStyles(){const h=(0,S.assertIsDefined)(this.overlay);h.style.backgroundColor=this.getColor(A.EDITOR_DRAG_AND_DROP_BACKGROUND)||"";const g=this.getColor(D.activeContrastBorder);h.style.outlineColor=g||"",h.style.outlineOffset=g?"-2px":"",h.style.outlineStyle=g?"dashed":"",h.style.outlineWidth=g?"2px":""}registerListeners(h){this._register(new f.DragAndDropObserver(h,{onDragEnter:g=>{},onDragOver:g=>{if(p(this.configurationService,g)){this.dispose();return}const d=this.groupTransfer.hasData(t.DraggedEditorGroupIdentifier.prototype),m=this.editorTransfer.hasData(t.DraggedEditorIdentifier.prototype);!m&&!d&&g.dataTransfer&&(g.dataTransfer.dropEffect="copy");let b=!0;if(d)b=this.isCopyOperation(g);else if(m){const y=this.editorTransfer.getData(t.DraggedEditorIdentifier.prototype);Array.isArray(y)&&(b=this.isCopyOperation(g,y[0].identifier))}if(!b){const y=this.findSourceGroupView();if(y===this.groupView&&(d||m&&y.count<2)){this.hideOverlay();return}}let E=!!this.editorGroupService.partOptions.splitOnDragAndDrop;this.isToggleSplitOperation(g)&&(E=!E),this.positionOverlay(g.offsetX,g.offsetY,d,E),this.cleanupOverlayScheduler.isScheduled()&&this.cleanupOverlayScheduler.cancel()},onDragLeave:g=>this.dispose(),onDragEnd:g=>this.dispose(),onDrop:g=>{f.EventHelper.stop(g,!0),this.dispose(),this.currentDropOperation&&this.handleDrop(g,this.currentDropOperation.splitDirection)}})),this._register((0,f.addDisposableListener)(h,f.EventType.MOUSE_OVER,()=>{this.cleanupOverlayScheduler.isScheduled()||this.cleanupOverlayScheduler.schedule()}))}findSourceGroupView(){if(this.groupTransfer.hasData(t.DraggedEditorGroupIdentifier.prototype)){const h=this.groupTransfer.getData(t.DraggedEditorGroupIdentifier.prototype);if(Array.isArray(h))return this.accessor.getGroup(h[0].identifier)}else if(this.editorTransfer.hasData(t.DraggedEditorIdentifier.prototype)){const h=this.editorTransfer.getData(t.DraggedEditorIdentifier.prototype);if(Array.isArray(h))return this.accessor.getGroup(h[0].identifier.groupId)}}async handleDrop(h,g){const d=()=>{let m;return typeof g=="number"?m=this.accessor.addGroup(this.groupView,g):m=this.groupView,m};if(this.groupTransfer.hasData(t.DraggedEditorGroupIdentifier.prototype)){const m=this.groupTransfer.getData(t.DraggedEditorGroupIdentifier.prototype);if(Array.isArray(m)){const b=this.accessor.getGroup(m[0].identifier);if(b){if(typeof g!="number"&&b===this.groupView)return;let E;if(typeof g=="number")this.isCopyOperation(h)?E=this.accessor.copyGroup(b,this.groupView,g):E=this.accessor.moveGroup(b,this.groupView,g);else{let y;this.isCopyOperation(h)&&(y={mode:0}),this.accessor.mergeGroup(b,this.groupView,y)}E&&this.accessor.activateGroup(E)}this.groupTransfer.clearData(t.DraggedEditorGroupIdentifier.prototype)}}else if(this.editorTransfer.hasData(t.DraggedEditorIdentifier.prototype)){const m=this.editorTransfer.getData(t.DraggedEditorIdentifier.prototype);if(Array.isArray(m)){const b=m[0].identifier,E=d(),y=this.accessor.getGroup(b.groupId);if(y){if(y===E)return;const T=(0,_.fillActiveEditorViewState)(y,b.editor,{pinned:!0,sticky:y.isSticky(b.editor)});this.isCopyOperation(h,b)?y.copyEditor(b.editor,E,T):y.moveEditor(b.editor,E,T),E.focus()}this.editorTransfer.clearData(t.DraggedEditorIdentifier.prototype)}}else if(this.treeItemsTransfer.hasData(t.DraggedTreeItemsIdentifier.prototype)){const m=this.treeItemsTransfer.getData(t.DraggedTreeItemsIdentifier.prototype);if(Array.isArray(m)){const b=[];for(const E of m){const y=await this.treeViewsDragAndDropService.removeDragOperationTransfer(E.identifier);if(y){const T=await(0,t.extractTreeDropData)(y);b.push(...T.map(R=>({...R,options:{...R.options,pinned:!0}})))}}this.editorService.openEditors(b,d(),{validateTrust:!0})}this.treeItemsTransfer.clearData(t.DraggedTreeItemsIdentifier.prototype)}else this.instantiationService.createInstance(t.ResourcesDropHandler,{allowWorkspaceOpen:!I.isWeb||(0,l.isTemporaryWorkspace)(this.contextService.getWorkspace())}).handleDrop(h,()=>d(),b=>b?.focus())}isCopyOperation(h,g){return g?.editor.hasCapability(8)?!1:h.ctrlKey&&!I.isMacintosh||h.altKey&&I.isMacintosh}isToggleSplitOperation(h){return h.altKey&&!I.isMacintosh||h.shiftKey&&I.isMacintosh}positionOverlay(h,g,d,m){const b=this.accessor.partOptions.openSideBySideDirection==="right",E=this.groupView.element.clientWidth,y=this.groupView.element.clientHeight-this.getOverlayOffsetHeight();let T,R;m?(d?T=b?.3:.1:T=.1,d?R=b?.1:.3:R=.1):(T=0,R=0);const O=E*T,x=y*R,F=E/3,L=y/3;let M;switch(h>O&&h<E-O&&g>x&&g<y-x?M=void 0:b?h<F?M=2:h>F*2?M=3:g<y/2?M=0:M=1:g<L?M=0:g>L*2?M=1:h<E/2?M=2:M=3,M){case 0:this.doPositionOverlay({top:"0",left:"0",width:"100%",height:"50%"});break;case 1:this.doPositionOverlay({top:"50%",left:"0",width:"100%",height:"50%"});break;case 2:this.doPositionOverlay({top:"0",left:"0",width:"50%",height:"100%"});break;case 3:this.doPositionOverlay({top:"0",left:"50%",width:"50%",height:"100%"});break;default:this.doPositionOverlay({top:"0",left:"0",width:"100%",height:"100%"})}const N=(0,S.assertIsDefined)(this.overlay);N.style.opacity="1",setTimeout(()=>N.classList.add("overlay-move-transition"),0),this.currentDropOperation={splitDirection:M}}doPositionOverlay(h){const[g,d]=(0,S.assertAllDefined)(this.container,this.overlay),m=this.getOverlayOffsetHeight();m?g.style.height=`calc(100% - ${m}px)`:g.style.height="100%",d.style.top=h.top,d.style.left=h.left,d.style.width=h.width,d.style.height=h.height}getOverlayOffsetHeight(){return!this.groupView.isEmpty&&this.accessor.partOptions.showTabs?this.groupView.titleHeight.offset:0}hideOverlay(){const h=(0,S.assertIsDefined)(this.overlay);this.doPositionOverlay({top:"0",left:"0",width:"100%",height:"100%"}),h.style.opacity="0",h.classList.remove("overlay-move-transition"),this.currentDropOperation=void 0}contains(h){return h===this.container||h===this.overlay}dispose(){super.dispose(),this._disposed=!0}};u.OVERLAY_ID="monaco-workbench-editor-drop-overlay",u=Ee([W(2,k.IThemeService),W(3,r.IConfigurationService),W(4,C.IInstantiationService),W(5,i.IEditorService),W(6,w.IEditorGroupsService),W(7,s.ITreeViewsService),W(8,l.IWorkspaceContextService)],u);let a=class extends k.Themable{constructor(h,g,d,m,b,E){super(m);this.accessor=h,this.container=g,this.delegate=d,this.configurationService=b,this.instantiationService=E,this.counter=0,this.editorTransfer=t.LocalSelectionTransfer.getInstance(),this.groupTransfer=t.LocalSelectionTransfer.getInstance(),this.registerListeners()}get overlay(){if(this._overlay&&!this._overlay.disposed)return this._overlay}registerListeners(){this._register((0,f.addDisposableListener)(this.container,f.EventType.DRAG_ENTER,h=>this.onDragEnter(h))),this._register((0,f.addDisposableListener)(this.container,f.EventType.DRAG_LEAVE,()=>this.onDragLeave())),[this.container,window].forEach(h=>this._register((0,f.addDisposableListener)(h,f.EventType.DRAG_END,()=>this.onDragEnd())))}onDragEnter(h){if(p(this.configurationService,h))return;if(this.counter++,!this.editorTransfer.hasData(t.DraggedEditorIdentifier.prototype)&&!this.groupTransfer.hasData(t.DraggedEditorGroupIdentifier.prototype)&&h.dataTransfer&&!(0,t.containsDragType)(h,c.DataTransfers.FILES,t.CodeDataTransfers.FILES,c.DataTransfers.RESOURCES,c.DataTransfers.TERMINALS,t.CodeDataTransfers.EDITORS)){h.dataTransfer.dropEffect="none";return}this.updateContainer(!0);const g=h.target;if(g&&(this.overlay&&!this.overlay.contains(g)&&this.disposeOverlay(),!this.overlay)){const d=this.findTargetGroupView(g);d&&(this._overlay=this.instantiationService.createInstance(u,this.accessor,d))}}onDragLeave(){this.counter--,this.counter===0&&this.updateContainer(!1)}onDragEnd(){this.counter=0,this.updateContainer(!1),this.disposeOverlay()}findTargetGroupView(h){return this.accessor.groups.find(d=>(0,f.isAncestor)(h,d.element)||this.delegate.containsGroup?.(d))}updateContainer(h){this.container.classList.toggle("dragged-over",h)}dispose(){super.dispose(),this.disposeOverlay()}disposeOverlay(){this.overlay&&(this.overlay.dispose(),this._overlay=void 0)}};a=Ee([W(3,k.IThemeService),W(4,r.IConfigurationService),W(5,C.IInstantiationService)],a),e.EditorDropTarget=a}),define(ne[935],re([1,0,1408,170,10,137,78,163,36,2,73,16,8,7,37,5,38,26,53,27,32,12,156,166,481,901,44,74,23,13,77,22,167,1062]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TitleControl=e.EditorCommandsContextActionRunner=void 0;class x extends I.ActionRunner{constructor(M){super();this.context=M}run(M,N){let B=this.context;return N?.preserveFocus&&(B={...this.context,preserveFocus:!0}),super.run(M,B)}}e.EditorCommandsContextActionRunner=x;let F=class extends a.Themable{constructor(M,N,B,P,V,z,U,H,K,G,q,Z,j,X){super(Z);this.accessor=N,this.group=B,this.contextMenuService=P,this.instantiationService=V,this.contextKeyService=z,this.keybindingService=U,this.telemetryService=H,this.notificationService=K,this.menuService=G,this.quickInputService=q,this.configurationService=j,this.fileService=X,this.editorTransfer=n.LocalSelectionTransfer.getInstance(),this.groupTransfer=n.LocalSelectionTransfer.getInstance(),this.treeItemsTransfer=n.LocalSelectionTransfer.getInstance(),this.breadcrumbsControl=void 0,this.editorToolBarMenuDisposables=this._register(new w.DisposableStore),this.resourceContext=this._register(V.createInstance(b.ResourceContextKey)),this.editorPinnedContext=b.ActiveEditorPinnedContext.bindTo(z),this.editorIsFirstContext=b.ActiveEditorFirstInGroupContext.bindTo(z),this.editorIsLastContext=b.ActiveEditorLastInGroupContext.bindTo(z),this.editorStickyContext=b.ActiveEditorStickyContext.bindTo(z),this.editorCanSplitInGroupContext=b.ActiveEditorCanSplitInGroupContext.bindTo(z),this.sideBySideEditorContext=b.SideBySideEditorActiveContext.bindTo(z),this.groupLockedContext=b.ActiveEditorGroupLockedContext.bindTo(z),this.contextMenu=this._register(this.menuService.createMenu(C.MenuId.EditorTitleContext,this.contextKeyService)),this.renderDropdownAsChildElement=!1,this.create(M)}createBreadcrumbsControl(M,N){const B=this._register(g.BreadcrumbsConfig.IsEnabled.bindTo(this.configurationService));this._register(B.onDidChange(()=>{const P=B.getValue();!P&&this.breadcrumbsControl?(this.breadcrumbsControl.dispose(),this.breadcrumbsControl=void 0,this.handleBreadcrumbsEnablementChange()):P&&!this.breadcrumbsControl&&(this.breadcrumbsControl=this.instantiationService.createInstance(d.BreadcrumbsControl,M,N,this.group),this.breadcrumbsControl.update(),this.handleBreadcrumbsEnablementChange())})),B.getValue()&&(this.breadcrumbsControl=this.instantiationService.createInstance(d.BreadcrumbsControl,M,N,this.group)),this._register(this.fileService.onDidChangeFileSystemProviderRegistrations(()=>{this.breadcrumbsControl?.update()&&this.handleBreadcrumbsEnablementChange()}))}createEditorActionsToolBar(M){const N={groupId:this.group.id};this.editorActionsToolbar=this._register(new D.ToolBar(M,this.contextMenuService,{actionViewItemProvider:B=>this.actionViewItemProvider(B),orientation:0,ariaLabel:(0,t.localize)(0,null),getKeyBinding:B=>this.getKeybinding(B),actionRunner:this._register(new x(N)),anchorAlignmentProvider:()=>1,renderDropdownAsChildElement:this.renderDropdownAsChildElement})),this.editorActionsToolbar.context=N,this._register(this.editorActionsToolbar.actionRunner.onDidRun(B=>{B.error&&!(0,R.isCancellationError)(B.error)&&this.notificationService.error(B.error),this.telemetryService.publicLog2("workbenchActionExecuted",{id:B.action.id,from:"editorPart"})}))}actionViewItemProvider(M){const N=this.group.activeEditorPane;if(N instanceof h.EditorPane){const B=N.getActionViewItem(M);if(B)return B}return(0,v.createActionViewItem)(this.instantiationService,M,{menuAsChild:this.renderDropdownAsChildElement})}updateEditorActionsToolbar(){const{primary:M,secondary:N}=this.prepareEditorActions(this.getEditorActions());(0,y.assertIsDefined)(this.editorActionsToolbar).setActions((0,k.prepareActions)(M),(0,k.prepareActions)(N))}getEditorActions(){const M=[],N=[];this.editorToolBarMenuDisposables.clear(),this.contextKeyService.bufferChangeEvents(()=>{const P=this.group.activeEditor;this.resourceContext.set((0,y.withUndefinedAsNull)(m.EditorResourceAccessor.getOriginalUri(P,{supportSideBySide:m.SideBySideEditor.PRIMARY}))),this.editorPinnedContext.set(P?this.group.isPinned(P):!1),this.editorIsFirstContext.set(P?this.group.isFirst(P):!1),this.editorIsLastContext.set(P?this.group.isLast(P):!1),this.editorStickyContext.set(P?this.group.isSticky(P):!1),this.editorCanSplitInGroupContext.set(P?P.hasCapability(32):!1),this.sideBySideEditorContext.set(P?.typeId===O.SideBySideEditorInput.ID),this.groupLockedContext.set(this.group.isLocked)});const B=this.group.activeEditorPane;if(B instanceof h.EditorPane){const P=B.scopedContextKeyService??this.contextKeyService,V=this.menuService.createMenu(C.MenuId.EditorTitle,P,{emitEventsForSubmenuChanges:!0,eventDebounceDelay:0});this.editorToolBarMenuDisposables.add(V),this.editorToolBarMenuDisposables.add(V.onDidChange(()=>{this.updateEditorActionsToolbar()}));const z=(U,H)=>H==="navigation"&&U.actions.length<=1;this.editorToolBarMenuDisposables.add((0,v.createAndFillInActionBarActions)(V,{arg:this.resourceContext.get(),shouldForwardArgs:!0},{primary:M,secondary:N},"navigation",9,z))}return{primary:M,secondary:N}}clearEditorActionsToolbar(){this.editorActionsToolbar?.setActions([],[])}enableGroupDragging(M){this._register((0,_.addDisposableListener)(M,_.EventType.DRAG_START,N=>{if(N.target!==M)return;this.groupTransfer.setData([new n.DraggedEditorGroupIdentifier(this.group.id)],n.DraggedEditorGroupIdentifier.prototype),N.dataTransfer&&(N.dataTransfer.effectAllowed="copyMove");let B=!1;if(this.accessor.partOptions.showTabs?B=this.doFillResourceDataTransfers(this.group.getEditors(1),N):this.group.activeEditor&&(B=this.doFillResourceDataTransfers([this.group.activeEditor],N)),!B&&T.isFirefox&&N.dataTransfer?.setData(f.DataTransfers.TEXT,String(this.group.label)),this.group.activeEditor){let P=this.group.activeEditor.getName();this.accessor.partOptions.showTabs&&this.group.count>1&&(P=(0,t.localize)(1,null,P,this.group.count-1)),(0,f.applyDragImage)(N,P,"monaco-editor-group-drag-image")}})),this._register((0,_.addDisposableListener)(M,_.EventType.DRAG_END,()=>{this.groupTransfer.clearData(n.DraggedEditorGroupIdentifier.prototype)}))}doFillResourceDataTransfers(M,N){return M.length?(this.instantiationService.invokeFunction(n.fillEditorsDragData,M.map(B=>({editor:B,groupId:this.group.id})),N),!0):!1}onContextMenu(M,N,B){const P=this.resourceContext.get();this.resourceContext.set((0,y.withUndefinedAsNull)(m.EditorResourceAccessor.getOriginalUri(M,{supportSideBySide:m.SideBySideEditor.PRIMARY})));const V=!!this.editorPinnedContext.get();this.editorPinnedContext.set(this.group.isPinned(M));const z=!!this.editorIsFirstContext.get();this.editorIsFirstContext.set(this.group.isFirst(M));const U=!!this.editorIsLastContext.get();this.editorIsLastContext.set(this.group.isLast(M));const H=!!this.editorStickyContext.get();this.editorStickyContext.set(this.group.isSticky(M));const K=!!this.groupLockedContext.get();this.groupLockedContext.set(this.group.isLocked);const G=!!this.editorCanSplitInGroupContext.get();this.editorCanSplitInGroupContext.set(M.hasCapability(32));const q=!!this.sideBySideEditorContext.get();this.sideBySideEditorContext.set(M.typeId===O.SideBySideEditorInput.ID);let Z=B;if(N instanceof MouseEvent){const Y=new A.StandardMouseEvent(N);Z={x:Y.posx,y:Y.posy}}const j=[],X=(0,v.createAndFillInContextMenuActions)(this.contextMenu,{shouldForwardArgs:!0,arg:this.resourceContext.get()},j);this.contextMenuService.showContextMenu({getAnchor:()=>Z,getActions:()=>j,getActionsContext:()=>({groupId:this.group.id,editorIndex:this.group.getIndexOfEditor(M)}),getKeyBinding:Y=>this.getKeybinding(Y),onHide:()=>{this.resourceContext.set(P||null),this.editorPinnedContext.set(V),this.editorIsFirstContext.set(z),this.editorIsLastContext.set(U),this.editorStickyContext.set(H),this.groupLockedContext.set(K),this.editorCanSplitInGroupContext.set(G),this.sideBySideEditorContext.set(q),this.accessor.activeGroup.focus(),(0,w.dispose)(X)}})}getKeybinding(M){return this.keybindingService.lookupKeybinding(M.id)}getKeybindingLabel(M){const N=this.getKeybinding(M);return N?(0,y.withNullAsUndefined)(N.getLabel()):void 0}dispose(){(0,w.dispose)(this.breadcrumbsControl),this.breadcrumbsControl=void 0,super.dispose()}};F=Ee([W(3,i.IContextMenuService),W(4,S.IInstantiationService),W(5,c.IContextKeyService),W(6,s.IKeybindingService),W(7,p.ITelemetryService),W(8,l.INotificationService),W(9,C.IMenuService),W(10,r.IQuickInputService),W(11,a.IThemeService),W(12,o.IConfigurationService),W(13,E.IFileService)],F),e.TitleControl=F,(0,a.registerThemingParticipant)((L,M)=>{const N=L.getColor(u.listActiveSelectionBackground),B=L.getColor(u.listActiveSelectionForeground);M.addRule(` .monaco-editor-group-drag-image { background: ${N}; color: ${B}; } `)})}),define(ne[2746],re([1,0,44,935,178,82,129,10,204,66,13,51,2,1059]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoTabsTitleControl=void 0;class c extends f.TitleControl{constructor(){super(...arguments);this.activeLabel=Object.create(null)}create(S){const s=this.titleContainer=S;s.draggable=!0,this.registerContainerListeners(s),this._register(k.Gesture.addTarget(s));const l=document.createElement("div");l.classList.add("label-container"),s.appendChild(l),this.editorLabel=this._register(this.instantiationService.createInstance(_.ResourceLabel,l,void 0)).element,this._register((0,D.addDisposableListener)(this.editorLabel.element,D.EventType.CLICK,p=>this.onTitleLabelClick(p))),this.createBreadcrumbsControl(l,{showFileIcons:!1,showSymbolIcons:!0,showDecorationColors:!1,breadcrumbsBackground:w.Color.transparent.toString(),showPlaceholder:!1}),s.classList.toggle("breadcrumbs",Boolean(this.breadcrumbsControl)),this._register((0,o.toDisposable)(()=>s.classList.remove("breadcrumbs")));const r=document.createElement("div");r.classList.add("title-actions"),s.appendChild(r),this.createEditorActionsToolBar(r)}registerContainerListeners(S){this.enableGroupDragging(S),this._register((0,D.addDisposableListener)(S,D.EventType.DBLCLICK,s=>this.onTitleDoubleClick(s))),this._register((0,D.addDisposableListener)(S,D.EventType.AUXCLICK,s=>this.onTitleAuxClick(s))),this._register((0,D.addDisposableListener)(S,k.EventType.Tap,s=>this.onTitleTap(s)));for(const s of[D.EventType.CONTEXT_MENU,k.EventType.Contextmenu])this._register((0,D.addDisposableListener)(S,s,l=>{this.group.activeEditor&&this.onContextMenu(this.group.activeEditor,l,S)}))}onTitleLabelClick(S){D.EventHelper.stop(S,!1),setTimeout(()=>this.quickInputService.quickAccess.show())}onTitleDoubleClick(S){D.EventHelper.stop(S),this.group.pinEditor()}onTitleAuxClick(S){S.button===1&&this.group.activeEditor&&(D.EventHelper.stop(S,!0),this.group.closeEditor(this.group.activeEditor))}onTitleTap(S){const s=S.initialTarget;!(s instanceof HTMLElement)||!this.editorLabel||!(0,D.isAncestor)(s,this.editorLabel.element)||setTimeout(()=>this.quickInputService.quickAccess.show(),50)}openEditor(S){this.doHandleOpenEditor()}openEditors(S){this.doHandleOpenEditor()}doHandleOpenEditor(){this.ifActiveEditorChanged(()=>this.redraw())||this.ifActiveEditorPropertiesChanged(()=>this.redraw())}closeEditor(S,s){this.ifActiveEditorChanged(()=>this.redraw())}closeEditors(S){this.ifActiveEditorChanged(()=>this.redraw())}moveEditor(S,s,l){this.ifActiveEditorChanged(()=>this.redraw())}pinEditor(S){this.ifEditorIsActive(S,()=>this.redraw())}stickEditor(S){}unstickEditor(S){}setActive(S){this.redraw()}updateEditorLabel(S){this.ifEditorIsActive(S,()=>this.redraw())}updateEditorDirty(S){this.ifEditorIsActive(S,()=>{const s=(0,v.assertIsDefined)(this.titleContainer);S.isDirty()&&!S.isSaving()?s.classList.add("dirty"):s.classList.remove("dirty")})}updateOptions(S,s){(S.labelFormat!==s.labelFormat||!(0,C.equals)(S.decorations,s.decorations))&&this.redraw()}updateStyles(){this.redraw()}handleBreadcrumbsEnablementChange(){(0,v.assertIsDefined)(this.titleContainer).classList.toggle("breadcrumbs",Boolean(this.breadcrumbsControl)),this.redraw()}ifActiveEditorChanged(S){return!this.activeLabel.editor&&this.group.activeEditor||this.activeLabel.editor&&!this.group.activeEditor||!this.activeLabel.editor||!this.group.isActive(this.activeLabel.editor)?(S(),!0):!1}ifActiveEditorPropertiesChanged(S){!this.activeLabel.editor||!this.group.activeEditor||this.activeLabel.pinned!==this.group.isPinned(this.group.activeEditor)&&S()}ifEditorIsActive(S,s){this.group.isActive(S)&&s()}redraw(){const S=(0,v.withNullAsUndefined)(this.group.activeEditor),s=this.accessor.partOptions,l=S?this.group.isPinned(S):!1,r=this.accessor.activeGroup===this.group;this.activeLabel={editor:S,pinned:l},this.breadcrumbsControl&&(r?(this.breadcrumbsControl.update(),this.breadcrumbsControl.domNode.classList.toggle("preview",!l)):this.breadcrumbsControl.hide());const[p,u]=(0,v.assertAllDefined)(this.titleContainer,this.editorLabel);if(!S)p.classList.remove("dirty"),u.clear(),this.clearEditorActionsToolbar();else{this.updateEditorDirty(S);const{labelFormat:a}=this.accessor.partOptions;let n;this.breadcrumbsControl&&!this.breadcrumbsControl.isHidden()||a==="default"&&!r?n="":n=S.getDescription(this.getVerbosity(a))||"";let h=S.getTitle(2);n===h&&(h=""),u.setResource({resource:t.EditorResourceAccessor.getOriginalUri(S,{supportSideBySide:t.SideBySideEditor.BOTH}),name:S.getName(),description:n},{title:h,italic:!l,extraClasses:["no-tabs","title-label"].concat(S.getLabelExtraClasses()),fileDecorations:{colors:Boolean(s.decorations?.colors),badges:Boolean(s.decorations?.badges)}}),r?p.style.color=this.getColor(A.TAB_ACTIVE_FOREGROUND)||"":p.style.color=this.getColor(A.TAB_UNFOCUSED_ACTIVE_FOREGROUND)||"",this.updateEditorActionsToolbar()}}getVerbosity(S){switch(S){case"short":return 0;case"long":return 2;default:return 1}}prepareEditorActions(S){return this.accessor.activeGroup===this.group?S:{primary:S.primary.filter(l=>l.id===I.CLOSE_EDITOR_COMMAND_ID||l.id===I.UNLOCK_GROUP_COMMAND_ID),secondary:S.secondary}}getHeight(){return{total:c.HEIGHT,offset:0}}layout(S){return this.breadcrumbsControl?.layout(void 0),new D.Dimension(S.container.width,this.getHeight().total)}}e.NoTabsTitleControl=c,c.HEIGHT=35}),define(ne[2747],re([1,0,14,111,44,149,91,129,178,78,37,27,5,38,7,16,935,53,2,139,55,12,82,32,156,26,59,10,1404,635,8,901,23,13,21,19,11,101,48,15,127,77,51,132,204,508,1061]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H,K,G){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TabsTitleControl=void 0;let q=class Jt extends s.TitleControl{constructor(j,X,Y,$,J,ee,te,se,ie,ce,le,ae,ue,oe,fe,pe,me,be){super(j,X,Y,$,J,ee,te,se,ie,ce,le,ae,ue,oe);this.editorService=fe,this.pathService=pe,this.editorGroupService=me,this.treeViewsDragAndDropService=be,this.closeEditorAction=this._register(this.instantiationService.createInstance(y.CloseOneEditorAction,y.CloseOneEditorAction.ID,y.CloseOneEditorAction.LABEL)),this.unpinEditorAction=this._register(this.instantiationService.createInstance(y.UnpinEditorAction,y.UnpinEditorAction.ID,y.UnpinEditorAction.LABEL)),this.tabResourceLabels=this._register(this.instantiationService.createInstance(I.ResourceLabels,I.DEFAULT_LABELS_CONTAINER)),this.tabLabels=[],this.tabActionBars=[],this.tabDisposables=[],this.dimensions={container:b.Dimension.None,available:b.Dimension.None},this.layoutScheduler=this._register(new r.MutableDisposable),this.path=t.isWindows?B.win32:B.posix,this.lastMouseWheelEventTime=0,this.updateEditorLabelScheduler=this._register(new M.RunOnceScheduler(()=>this.doUpdateEditorLabels(),0)),(async()=>this.path=await this.pathService.path)(),this._register(this.tabResourceLabels.onDidChangeDecorations(()=>this.doHandleDecorationsChange()))}create(j){this.titleContainer=j,this.tabsAndActionsContainer=document.createElement("div"),this.tabsAndActionsContainer.classList.add("tabs-and-actions-container"),this.titleContainer.appendChild(this.tabsAndActionsContainer),this.tabsContainer=document.createElement("div"),this.tabsContainer.setAttribute("role","tablist"),this.tabsContainer.draggable=!0,this.tabsContainer.classList.add("tabs-container"),this._register(D.Gesture.addTarget(this.tabsContainer)),this.tabsScrollbar=this._register(this.createTabsScrollbar(this.tabsContainer)),this.tabsAndActionsContainer.appendChild(this.tabsScrollbar.getDomNode()),this.registerTabsContainerListeners(this.tabsContainer,this.tabsScrollbar),this.editorToolbarContainer=document.createElement("div"),this.editorToolbarContainer.classList.add("editor-actions"),this.tabsAndActionsContainer.appendChild(this.editorToolbarContainer),this.createEditorActionsToolBar(this.editorToolbarContainer);const X=document.createElement("div");X.classList.add("tabs-breadcrumbs"),this.titleContainer.appendChild(X),this.createBreadcrumbsControl(X,{showFileIcons:!0,showSymbolIcons:!0,showDecorationColors:!1,showPlaceholder:!0,breadcrumbsBackground:h.breadcrumbsBackground})}createTabsScrollbar(j){const X=new p.ScrollableElement(j,{horizontal:1,horizontalScrollbarSize:this.getTabsScrollbarSizing(),vertical:2,scrollYToX:!0,useShadows:!1});return X.onScroll(Y=>{j.scrollLeft=Y.scrollLeft}),X}updateTabsScrollbarSizing(){this.tabsScrollbar?.updateOptions({horizontalScrollbarSize:this.getTabsScrollbarSizing()})}getTabsScrollbarSizing(){return this.accessor.partOptions.titleScrollbarSizing!=="large"?Jt.SCROLLBAR_SIZES.default:Jt.SCROLLBAR_SIZES.large}registerTabsContainerListeners(j,X){this.enableGroupDragging(j),this._register((0,b.addDisposableListener)(j,b.EventType.SCROLL,()=>{j.classList.contains("scroll")&&X.setScrollPosition({scrollLeft:j.scrollLeft})}));for(const Y of[D.EventType.Tap,b.EventType.DBLCLICK])this._register((0,b.addDisposableListener)(j,Y,$=>{if(Y===b.EventType.DBLCLICK){if($.target!==j)return}else if($.tapCount!==2||$.initialTarget!==j)return;b.EventHelper.stop($),this.editorService.openEditor({resource:void 0,options:{pinned:!0,index:this.group.count,override:_.DEFAULT_EDITOR_ASSOCIATION.id}},this.group.id)}));this._register((0,b.addDisposableListener)(j,b.EventType.MOUSE_DOWN,Y=>{Y.button===1&&Y.preventDefault()})),this._register(new b.DragAndDropObserver(j,{onDragEnter:Y=>{if(j.classList.add("scroll"),Y.target!==j){this.updateDropFeedback(j,!1);return}if(!this.isSupportedDropTransfer(Y)){Y.dataTransfer&&(Y.dataTransfer.dropEffect="none");return}let $=!1;if(this.editorTransfer.hasData(g.DraggedEditorIdentifier.prototype)){$=!0;const J=this.editorTransfer.getData(g.DraggedEditorIdentifier.prototype);if(Array.isArray(J)){const ee=J[0].identifier;if(this.group.id===ee.groupId&&this.group.getIndexOfEditor(ee.editor)===this.group.count-1){Y.dataTransfer&&(Y.dataTransfer.dropEffect="none");return}}}$||Y.dataTransfer&&(Y.dataTransfer.dropEffect="copy"),this.updateDropFeedback(j,!0)},onDragLeave:Y=>{this.updateDropFeedback(j,!1),j.classList.remove("scroll")},onDragEnd:Y=>{this.updateDropFeedback(j,!1),j.classList.remove("scroll")},onDrop:Y=>{this.updateDropFeedback(j,!1),j.classList.remove("scroll"),Y.target===j&&this.onDrop(Y,this.group.count,j)}})),this._register((0,b.addDisposableListener)(j,b.EventType.MOUSE_WHEEL,Y=>{const $=this.group.activeEditor;if(!$||this.group.count<2)return;if(this.accessor.partOptions.scrollToSwitchTabs===!0){if(Y.shiftKey)return}else if(!Y.shiftKey)return;const J=Date.now();if(J-this.lastMouseWheelEventTime<Jt.MOUSE_WHEEL_EVENT_THRESHOLD-2*(Math.abs(Y.deltaX)+Math.abs(Y.deltaY)))return;this.lastMouseWheelEventTime=J;let ee;if(Y.deltaX+Y.deltaY<-Jt.MOUSE_WHEEL_DISTANCE_THRESHOLD)ee=-1;else if(Y.deltaX+Y.deltaY>Jt.MOUSE_WHEEL_DISTANCE_THRESHOLD)ee=1;else return;const te=this.group.getEditorByIndex(this.group.getIndexOfEditor($)+ee);!te||(this.group.openEditor(te),b.EventHelper.stop(Y,!0))}))}doHandleDecorationsChange(){this.layout(this.dimensions)}updateEditorActionsToolbar(){super.updateEditorActionsToolbar(),this.layout(this.dimensions)}openEditor(j){this.handleOpenedEditors()}openEditors(j){this.handleOpenedEditors()}handleOpenedEditors(){const[j,X]=(0,x.assertAllDefined)(this.tabsContainer,this.tabsScrollbar);for(let Y=j.children.length;Y<this.group.count;Y++)j.appendChild(this.createTab(Y,j,X));this.computeTabLabels(),this.redraw({forceRevealActiveTab:!0}),this.breadcrumbsControl?.update()}closeEditor(j,X){this.handleClosedEditors(X)}closeEditors(j){this.handleClosedEditors()}handleClosedEditors(j){if(this.group.activeEditor){const X=(0,x.assertIsDefined)(this.tabsContainer);for(;X.children.length>this.group.count;)X.lastChild?.remove(),(0,r.dispose)(this.tabDisposables.pop());this.computeTabLabels(),this.redraw({forceRevealActiveTab:!0})}else this.tabsContainer&&(0,b.clearNode)(this.tabsContainer),this.tabDisposables=(0,r.dispose)(this.tabDisposables),this.tabResourceLabels.clear(),this.tabLabels=[],this.tabActionBars=[],this.clearEditorActionsToolbar(),this.breadcrumbsControl?.update()}moveEditor(j,X,Y){const $=this.tabLabels[X];this.tabLabels.splice(X,1),this.tabLabels.splice(Y,0,$),this.forEachTab((J,ee,te,se,ie,ce)=>{this.redrawTab(J,ee,te,se,ie,ce)},Math.min(X,Y),Math.max(X,Y)),this.layout(this.dimensions,{forceRevealActiveTab:!0})}pinEditor(j){this.withTab(j,(X,Y,$,J,ee)=>this.redrawTabLabel(X,Y,$,J,ee))}stickEditor(j){this.doHandleStickyEditorChange(j)}unstickEditor(j){this.doHandleStickyEditorChange(j)}doHandleStickyEditorChange(j){this.withTab(j,(X,Y,$,J,ee,te)=>this.redrawTab(X,Y,$,J,ee,te)),this.forEachTab((X,Y,$,J,ee)=>{this.redrawTabBorders(Y,$)}),this.layout(this.dimensions,{forceRevealActiveTab:!0})}setActive(j){this.forEachTab((X,Y,$,J,ee,te)=>{this.redrawTabActiveAndDirty(j,X,$,te)}),this.updateEditorActionsToolbar(),this.layout(this.dimensions,{forceRevealActiveTab:!0})}updateEditorLabel(j){this.updateEditorLabelScheduler.schedule()}doUpdateEditorLabels(){this.computeTabLabels(),this.forEachTab((j,X,Y,$,J)=>{this.redrawTabLabel(j,X,Y,$,J)}),this.layout(this.dimensions)}updateEditorDirty(j){this.withTab(j,(X,Y,$,J,ee,te)=>this.redrawTabActiveAndDirty(this.accessor.activeGroup===this.group,X,$,te))}updateOptions(j,X){j.labelFormat!==X.labelFormat&&this.computeTabLabels(),j.titleScrollbarSizing!==X.titleScrollbarSizing&&this.updateTabsScrollbarSizing(),(j.labelFormat!==X.labelFormat||j.tabCloseButton!==X.tabCloseButton||j.tabSizing!==X.tabSizing||j.pinnedTabSizing!==X.pinnedTabSizing||j.showIcons!==X.showIcons||j.hasIcons!==X.hasIcons||j.highlightModifiedTabs!==X.highlightModifiedTabs||j.wrapTabs!==X.wrapTabs||!(0,U.equals)(j.decorations,X.decorations))&&this.redraw()}updateStyles(){this.redraw()}forEachTab(j,X,Y){this.group.editors.forEach(($,J)=>{typeof X=="number"&&X>J||typeof Y=="number"&&Y<J||this.doWithTab(J,$,j)})}withTab(j,X){this.doWithTab(this.group.getIndexOfEditor(j),j,X)}doWithTab(j,X,Y){const J=(0,x.assertIsDefined)(this.tabsContainer).children[j],ee=this.tabResourceLabels.get(j),te=this.tabLabels[j],se=this.tabActionBars[j];J&&ee&&te&&Y(X,j,J,ee,te,se)}createTab(j,X,Y){const $=document.createElement("div");$.draggable=!0,$.setAttribute("role","tab"),$.classList.add("tab"),this._register(D.Gesture.addTarget($));const J=document.createElement("div");J.classList.add("tab-border-top-container"),$.appendChild(J);const ee=this.tabResourceLabels.create($),te=document.createElement("div");te.classList.add("tab-actions"),$.appendChild(te);const se=new s.EditorCommandsContextActionRunner({groupId:this.group.id,editorIndex:j}),ie=new w.ActionBar(te,{ariaLabel:(0,E.localize)(0,null),actionRunner:se});ie.onBeforeRun(ue=>{ue.action.id===this.closeEditorAction.id&&this.blockRevealActiveTabOnce()});const ce=(0,r.combinedDisposable)(ie,(0,r.toDisposable)((0,P.insert)(this.tabActionBars,ie))),le=document.createElement("div");le.classList.add("tab-border-bottom-container"),$.appendChild(le);const ae=this.registerTabListeners($,j,X,Y);return this.tabDisposables.push((0,r.combinedDisposable)(ae,ce,se,ee)),$}registerTabListeners(j,X,Y,$){const J=new r.DisposableStore,ee=(se,ie)=>{if(j.blur(),se instanceof MouseEvent&&se.button!==0){se.button===1&&se.preventDefault();return}if(this.originatesFromTabActionBar(se))return;const ce=this.group.getEditorByIndex(X);ce&&this.group.openEditor(ce,{preserveFocus:ie,activation:H.EditorActivation.ACTIVATE})},te=se=>{b.EventHelper.stop(se);const ie=this.group.getEditorByIndex(X);ie&&this.onContextMenu(ie,se,j)};J.add((0,b.addDisposableListener)(j,b.EventType.MOUSE_DOWN,se=>ee(se,!1))),J.add((0,b.addDisposableListener)(j,D.EventType.Tap,se=>ee(se,!0))),J.add((0,b.addDisposableListener)(j,D.EventType.Change,se=>{$.setScrollPosition({scrollLeft:$.getScrollPosition().scrollLeft-se.translationX})})),J.add((0,b.addDisposableListener)(j,b.EventType.MOUSE_UP,se=>{b.EventHelper.stop(se),j.blur()})),J.add((0,b.addDisposableListener)(j,b.EventType.AUXCLICK,se=>{se.button===1&&(b.EventHelper.stop(se,!0),this.blockRevealActiveTabOnce(),this.closeEditorAction.run({groupId:this.group.id,editorIndex:X}))})),J.add((0,b.addDisposableListener)(j,b.EventType.KEY_DOWN,se=>{const ie=new k.StandardKeyboardEvent(se);ie.shiftKey&&ie.keyCode===68&&te(se)})),J.add((0,b.addDisposableListener)(j,D.EventType.Contextmenu,se=>{te(se)})),J.add((0,b.addDisposableListener)(j,b.EventType.KEY_UP,se=>{const ie=new k.StandardKeyboardEvent(se);let ce=!1;if(ie.equals(3)||ie.equals(10)){ce=!0;const le=this.group.getEditorByIndex(X);le&&this.group.openEditor(le)}else if([15,17,16,18,14,13].some(le=>ie.equals(le))){let le;ie.equals(15)||ie.equals(16)?le=X-1:ie.equals(17)||ie.equals(18)?le=X+1:ie.equals(14)?le=0:le=this.group.count-1;const ae=this.group.getEditorByIndex(le);ae&&(ce=!0,this.group.openEditor(ae,{preserveFocus:!0}),Y.childNodes[le].focus())}ce&&b.EventHelper.stop(se,!0),$.setScrollPosition({scrollLeft:Y.scrollLeft})}));for(const se of[D.EventType.Tap,b.EventType.DBLCLICK])J.add((0,b.addDisposableListener)(j,se,ie=>{if(se===b.EventType.DBLCLICK)b.EventHelper.stop(ie);else if(ie.tapCount!==2)return;const ce=this.group.getEditorByIndex(X);ce&&this.group.isPinned(ce)?this.accessor.arrangeGroups(2,this.group):this.group.pinEditor(ce)}));return J.add((0,b.addDisposableListener)(j,b.EventType.CONTEXT_MENU,se=>{b.EventHelper.stop(se,!0);const ie=this.group.getEditorByIndex(X);ie&&this.onContextMenu(ie,se,j)},!0)),J.add((0,b.addDisposableListener)(j,b.EventType.DRAG_START,se=>{const ie=this.group.getEditorByIndex(X);!ie||(this.editorTransfer.setData([new g.DraggedEditorIdentifier({editor:ie,groupId:this.group.id})],g.DraggedEditorIdentifier.prototype),se.dataTransfer&&(se.dataTransfer.effectAllowed="copyMove"),this.doFillResourceDataTransfers([ie],se),j.classList.add("dragged"),(0,b.scheduleAtNextAnimationFrame)(()=>j.classList.remove("dragged")))})),J.add(new b.DragAndDropObserver(j,{onDragEnter:se=>{if(j.classList.add("dragged-over"),!this.isSupportedDropTransfer(se)){se.dataTransfer&&(se.dataTransfer.dropEffect="none");return}let ie=!1;if(this.editorTransfer.hasData(g.DraggedEditorIdentifier.prototype)){ie=!0;const ce=this.editorTransfer.getData(g.DraggedEditorIdentifier.prototype);if(Array.isArray(ce)){const le=ce[0].identifier;if(le.editor===this.group.getEditorByIndex(X)&&le.groupId===this.group.id){se.dataTransfer&&(se.dataTransfer.dropEffect="none");return}}}ie||se.dataTransfer&&(se.dataTransfer.dropEffect="copy"),this.updateDropFeedback(j,!0,X)},onDragLeave:()=>{j.classList.remove("dragged-over"),this.updateDropFeedback(j,!1,X)},onDragEnd:()=>{j.classList.remove("dragged-over"),this.updateDropFeedback(j,!1,X),this.editorTransfer.clearData(g.DraggedEditorIdentifier.prototype)},onDrop:se=>{j.classList.remove("dragged-over"),this.updateDropFeedback(j,!1,X),this.onDrop(se,X,Y)}})),J}isSupportedDropTransfer(j){if(this.groupTransfer.hasData(g.DraggedEditorGroupIdentifier.prototype)){const X=this.groupTransfer.getData(g.DraggedEditorGroupIdentifier.prototype);return!(Array.isArray(X)&&X[0].identifier===this.group.id)}return!!(this.editorTransfer.hasData(g.DraggedEditorIdentifier.prototype)||j.dataTransfer&&j.dataTransfer.types.length>0)}updateDropFeedback(j,X,Y){const $=typeof Y=="number",J=typeof Y=="number"?this.group.getEditorByIndex(Y):void 0,ee=$&&!!J&&this.group.isActive(J),te=$?this.getColor(ee?n.TAB_ACTIVE_BACKGROUND:n.TAB_INACTIVE_BACKGROUND):"";j.style.backgroundColor=(X?this.getColor(n.EDITOR_DRAG_AND_DROP_BACKGROUND):te)||"";const se=this.getColor(h.activeContrastBorder);se&&X?(j.style.outlineWidth="2px",j.style.outlineStyle="dashed",j.style.outlineColor=se,j.style.outlineOffset=$?"-5px":"-3px"):(j.style.outlineWidth="",j.style.outlineStyle="",j.style.outlineColor=se||"",j.style.outlineOffset="")}computeTabLabels(){const{labelFormat:j}=this.accessor.partOptions,{verbosity:X,shortenDuplicates:Y}=this.getLabelConfigFlags(j),$=this.group.editors.map((J,ee)=>({editor:J,name:J.getName(),description:J.getDescription(X),forceDescription:J.hasCapability(64),title:J.getTitle(2),ariaLabel:(0,A.computeEditorAriaLabel)(J,ee,this.group,this.editorGroupService.count)}));Y&&this.shortenTabLabels($),this.tabLabels=$}shortenTabLabels(j){const X=new Map;for(const Y of j)typeof Y.description=="string"?(0,u.getOrSet)(X,Y.name,[]).push(Y):Y.description="";for(const[,Y]of X){if(Y.length===1&&!Y[0].forceDescription){Y[0].description="";continue}const $=new Map;for(const se of Y)(0,u.getOrSet)($,se.description,[]).push(se);let J=!1;for(const[,se]of $)if(!J&&se.length>1){const[ie,...ce]=se.map(({editor:le})=>le.getDescription(2));J=ce.some(le=>le!==ie)}if(J){$.clear();for(const se of Y)se.description=se.editor.getDescription(2),(0,u.getOrSet)($,se.description,[]).push(se)}const ee=[];for(const[se]of $)ee.push(se);if(ee.length===1){for(const se of $.get(ee[0])||[])se.forceDescription||(se.description="");continue}const te=(0,f.shorten)(ee,this.path.sep);ee.forEach((se,ie)=>{for(const ce of $.get(se)||[])ce.description=te[ie]})}}getLabelConfigFlags(j){switch(j){case"short":return{verbosity:0,shortenDuplicates:!1};case"medium":return{verbosity:1,shortenDuplicates:!1};case"long":return{verbosity:2,shortenDuplicates:!1};default:return{verbosity:1,shortenDuplicates:!0}}}redraw(j){const X=this.getColor(n.EDITOR_GROUP_HEADER_TABS_BORDER);this.tabsAndActionsContainer&&(X?(this.tabsAndActionsContainer.classList.add("tabs-border-bottom"),this.tabsAndActionsContainer.style.setProperty("--tabs-border-bottom-color",X.toString())):(this.tabsAndActionsContainer.classList.remove("tabs-border-bottom"),this.tabsAndActionsContainer.style.removeProperty("--tabs-border-bottom-color"))),this.forEachTab((Y,$,J,ee,te,se)=>{this.redrawTab(Y,$,J,ee,te,se)}),this.updateEditorActionsToolbar(),this.layout(this.dimensions,j)}redrawTab(j,X,Y,$,J,ee){const te=this.group.isSticky(X),se=this.accessor.partOptions;this.redrawTabLabel(j,X,Y,$,J);const ie=te?this.unpinEditorAction:this.closeEditorAction;ee.hasAction(ie)||(ee.isEmpty()||ee.clear(),ee.push(ie,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(ie)}));const ce=te&&se.pinnedTabSizing==="compact"?"off":se.tabCloseButton;for(const ae of["off","left","right"])Y.classList.toggle(`tab-actions-${ae}`,ce===ae);const le=te&&se.pinnedTabSizing==="shrink"?"shrink":se.tabSizing;for(const ae of["fit","shrink"])Y.classList.toggle(`sizing-${ae}`,le===ae);Y.classList.toggle("has-icon",se.showIcons&&se.hasIcons),Y.classList.toggle("sticky",te);for(const ae of["normal","compact","shrink"])Y.classList.toggle(`sticky-${ae}`,te&&se.pinnedTabSizing===ae);if(te&&se.pinnedTabSizing!=="normal"){let ae=0;switch(se.pinnedTabSizing){case"compact":ae=Jt.TAB_WIDTH.compact;break;case"shrink":ae=Jt.TAB_WIDTH.shrink;break}Y.style.left=`${X*ae}px`}else Y.style.left="auto";this.redrawTabBorders(X,Y),this.redrawTabActiveAndDirty(this.accessor.activeGroup===this.group,j,Y,ee)}redrawTabLabel(j,X,Y,$,J){const ee=this.accessor.partOptions;let te,se=!1,ie=Boolean(ee.decorations?.badges),ce;ee.pinnedTabSizing==="compact"&&this.group.isSticky(X)?(te=ee.showIcons&&ee.hasIcons?"":J.name?.charAt(0).toUpperCase(),ce="",se=!0,ie=!1):(te=J.name,ce=J.description||""),J.ariaLabel&&(Y.setAttribute("aria-label",J.ariaLabel),Y.setAttribute("aria-description",""));const le=J.title||"";Y.title=le,$.setResource({name:te,description:ce,resource:_.EditorResourceAccessor.getOriginalUri(j,{supportSideBySide:_.SideBySideEditor.BOTH})},{title:le,extraClasses:(0,P.coalesce)(["tab-label",ie?"tab-label-has-badge":void 0].concat(j.getLabelExtraClasses())),italic:!this.group.isPinned(j),forceLabel:se,fileDecorations:{colors:Boolean(ee.decorations?.colors),badges:ie}});const ae=_.EditorResourceAccessor.getOriginalUri(j,{supportSideBySide:_.SideBySideEditor.PRIMARY});ae?Y.setAttribute("data-resource-name",(0,L.basenameOrAuthority)(ae)):Y.removeAttribute("data-resource-name")}redrawTabActiveAndDirty(j,X,Y,$){const J=this.group.isActive(X),ee=this.doRedrawTabDirty(j,J,X,Y);this.doRedrawTabActive(j,!ee,X,Y,$)}doRedrawTabActive(j,X,Y,$,J){if(this.group.isActive(Y)){$.classList.add("active"),$.setAttribute("aria-selected","true"),$.tabIndex=0,$.style.backgroundColor=this.getColor(j?n.TAB_ACTIVE_BACKGROUND:n.TAB_UNFOCUSED_ACTIVE_BACKGROUND)||"";const ee=this.getColor(j?n.TAB_ACTIVE_BORDER:n.TAB_UNFOCUSED_ACTIVE_BORDER);ee?($.classList.add("tab-border-bottom"),$.style.setProperty("--tab-border-bottom-color",ee.toString())):($.classList.remove("tab-border-bottom"),$.style.removeProperty("--tab-border-bottom-color"));const te=X?this.getColor(j?n.TAB_ACTIVE_BORDER_TOP:n.TAB_UNFOCUSED_ACTIVE_BORDER_TOP):void 0;te?($.classList.add("tab-border-top"),$.style.setProperty("--tab-border-top-color",te.toString())):($.classList.remove("tab-border-top"),$.style.removeProperty("--tab-border-top-color")),$.style.color=this.getColor(j?n.TAB_ACTIVE_FOREGROUND:n.TAB_UNFOCUSED_ACTIVE_FOREGROUND)||"",J.setFocusable(!0)}else $.classList.remove("active"),$.setAttribute("aria-selected","false"),$.tabIndex=-1,$.style.backgroundColor=this.getColor(j?n.TAB_INACTIVE_BACKGROUND:n.TAB_UNFOCUSED_INACTIVE_BACKGROUND)||"",$.style.boxShadow="",$.style.color=this.getColor(j?n.TAB_INACTIVE_FOREGROUND:n.TAB_UNFOCUSED_INACTIVE_FOREGROUND)||"",J.setFocusable(!1)}doRedrawTabDirty(j,X,Y,$){let J=!1;if(Y.isDirty()&&!Y.isSaving())if($.classList.add("dirty"),this.accessor.partOptions.highlightModifiedTabs){let ee;j&&X?ee=this.getColor(n.TAB_ACTIVE_MODIFIED_BORDER):j&&!X?ee=this.getColor(n.TAB_INACTIVE_MODIFIED_BORDER):!j&&X?ee=this.getColor(n.TAB_UNFOCUSED_ACTIVE_MODIFIED_BORDER):ee=this.getColor(n.TAB_UNFOCUSED_INACTIVE_MODIFIED_BORDER),ee&&(J=!0,$.classList.add("dirty-border-top"),$.style.setProperty("--tab-dirty-border-top-color",ee))}else $.classList.remove("dirty-border-top"),$.style.removeProperty("--tab-dirty-border-top-color");else $.classList.remove("dirty","dirty-border-top"),$.style.removeProperty("--tab-dirty-border-top-color");return J}redrawTabBorders(j,X){const J=(this.group.isSticky(j)&&this.group.stickyCount===j+1?this.getColor(n.TAB_LAST_PINNED_BORDER):void 0)||this.getColor(n.TAB_BORDER)||this.getColor(h.contrastBorder);X.style.borderRight=J?`1px solid ${J}`:"",X.style.outlineColor=this.getColor(h.activeContrastBorder)||""}prepareEditorActions(j){return this.accessor.activeGroup===this.group?j:{primary:j.primary.filter(Y=>Y.id===K.UNLOCK_GROUP_COMMAND_ID),secondary:j.secondary}}getHeight(){const j=this.breadcrumbsControl&&!this.breadcrumbsControl.isHidden();return this.dimensions.used?{total:this.dimensions.used.height,offset:j?this.dimensions.used.height-R.BreadcrumbsControl.HEIGHT:this.dimensions.used.height}:this.computeHeight()}computeHeight(){let j;this.accessor.partOptions.wrapTabs&&this.tabsAndActionsContainer?.classList.contains("wrapping")?j=this.tabsAndActionsContainer.offsetHeight:j=Jt.TAB_HEIGHT;const X=j;return this.breadcrumbsControl&&!this.breadcrumbsControl.isHidden()&&(j+=R.BreadcrumbsControl.HEIGHT),{total:j,offset:X}}layout(j,X){if(Object.assign(this.dimensions,j),!this.layoutScheduler.value){const Y=(0,b.scheduleAtNextAnimationFrame)(()=>{this.doLayout(this.dimensions,this.layoutScheduler.value?.options),this.layoutScheduler.clear()});this.layoutScheduler.value={options:X,dispose:()=>Y.dispose()}}return X?.forceRevealActiveTab&&(this.layoutScheduler.value.options={...this.layoutScheduler.value.options,forceRevealActiveTab:!0}),this.dimensions.used||(this.dimensions.used=new b.Dimension(j.container.width,this.computeHeight().total)),this.dimensions.used}doLayout(j,X){const Y=this.group.activeEditor?this.getTabAndIndex(this.group.activeEditor):void 0;if(Y&&j.container!==b.Dimension.None&&j.available!==b.Dimension.None){this.doLayoutBreadcrumbs(j);const[ee,te]=Y;this.doLayoutTabs(ee,te,j,X)}const $=this.dimensions.used,J=this.dimensions.used=new b.Dimension(j.container.width,this.computeHeight().total);$&&$.height!==J.height&&this.group.relayout()}handleBreadcrumbsEnablementChange(){this.group.relayout()}doLayoutBreadcrumbs(j){this.breadcrumbsControl&&!this.breadcrumbsControl.isHidden()&&this.breadcrumbsControl.layout(new b.Dimension(j.container.width,R.BreadcrumbsControl.HEIGHT))}doLayoutTabs(j,X,Y,$){this.doLayoutTabsWrapping(Y)||this.doLayoutTabsNonWrapping(j,X,$)}doLayoutTabsWrapping(j){const[X,Y,$,J]=(0,x.assertAllDefined)(this.tabsAndActionsContainer,this.tabsContainer,this.editorToolbarContainer,this.tabsScrollbar),ee=X.classList.contains("wrapping");let te=ee;function se(ie){te=ie,X.classList.toggle("wrapping",te),Y.style.setProperty("--last-tab-margin-right",te?`${$.offsetWidth}px`:"0")}if(this.accessor.partOptions.wrapTabs){const ie=Y.offsetWidth,ce=Y.scrollWidth,le=()=>{const ae=this.getLastTab();return ae?!(ae.offsetWidth+$.offsetWidth-j.available.width>1):!0};(te||ce>ie&&le())&&se(!0),te&&(Y.offsetHeight>j.available.height||ce===ie&&Y.offsetHeight===Jt.TAB_HEIGHT||!le())&&se(!1)}else ee&&se(!1);if(te&&!ee){const ie=Y.offsetWidth;J.setScrollDimensions({width:ie,scrollWidth:ie})}if(te){const ie=new Map;let ce,le;for(const ae of Y.children){const ue=ae,oe=ue.offsetTop;oe!==ce&&(ce=oe,le&&ie.set(le,!0)),le=ue,ie.set(ue,!1)}le&&ie.set(le,!0);for(const[ae,ue]of ie)ae.classList.toggle("last-in-row",ue)}return te}doLayoutTabsNonWrapping(j,X,Y){const[$,J]=(0,x.assertAllDefined)(this.tabsContainer,this.tabsScrollbar),ee=$.offsetWidth,te=$.scrollWidth;let se=0;if(this.group.stickyCount>0){let Ce=0;switch(this.accessor.partOptions.pinnedTabSizing){case"compact":Ce=Jt.TAB_WIDTH.compact;break;case"shrink":Ce=Jt.TAB_WIDTH.shrink;break}se=this.group.stickyCount*Ce}let ie=this.accessor.partOptions.pinnedTabSizing!=="normal"&&this.group.isSticky(X),ce=ee-se;this.group.stickyCount>0&&ce<Jt.TAB_WIDTH.fit?($.classList.add("disable-sticky-tabs"),ce=ee,se=0,ie=!1):$.classList.remove("disable-sticky-tabs");let le,ae;this.blockRevealActiveTab||(le=j.offsetLeft,ae=j.offsetWidth);const{width:ue,scrollWidth:oe}=J.getScrollDimensions();J.setScrollDimensions({width:ee,scrollWidth:te});const fe=ue!==ee||oe!==te;if(this.blockRevealActiveTab||typeof le!="number"||typeof ae!="number"||ie||!fe&&!Y?.forceRevealActiveTab){this.blockRevealActiveTab=!1;return}const pe=J.getScrollPosition().scrollLeft,me=ae<=ce,be=le-se;me&&pe+ce<be+ae?J.setScrollPosition({scrollLeft:pe+(be+ae-(pe+ce))}):(pe>be||!me)&&J.setScrollPosition({scrollLeft:be})}getTabAndIndex(j){const X=this.group.getIndexOfEditor(j),Y=this.getTabAtIndex(X);if(Y)return[Y,X]}getTabAtIndex(j){if(j>=0)return(0,x.assertIsDefined)(this.tabsContainer).children[j]}getLastTab(){return this.getTabAtIndex(this.group.count-1)}blockRevealActiveTabOnce(){this.blockRevealActiveTab=!0}originatesFromTabActionBar(j){let X;return j instanceof MouseEvent?X=j.target||j.srcElement:X=j.initialTarget,!!(0,b.findParentWithClass)(X,"action-item","tab")}async onDrop(j,X,Y){if(b.EventHelper.stop(j,!0),this.updateDropFeedback(Y,!1),Y.classList.remove("scroll"),this.groupTransfer.hasData(g.DraggedEditorGroupIdentifier.prototype)){const $=this.groupTransfer.getData(g.DraggedEditorGroupIdentifier.prototype);if(Array.isArray($)){const J=this.accessor.getGroup($[0].identifier);if(J){const ee={index:X};this.isMoveOperation(j,J.id)||(ee.mode=0),this.accessor.mergeGroup(J,this.group,ee)}this.group.focus(),this.groupTransfer.clearData(g.DraggedEditorGroupIdentifier.prototype)}}else if(this.editorTransfer.hasData(g.DraggedEditorIdentifier.prototype)){const $=this.editorTransfer.getData(g.DraggedEditorIdentifier.prototype);if(Array.isArray($)){const J=$[0].identifier,ee=this.accessor.getGroup(J.groupId);ee&&(this.isMoveOperation(j,J.groupId,J.editor)?ee.moveEditor(J.editor,this.group,{index:X}):ee.copyEditor(J.editor,this.group,{index:X})),this.group.focus(),this.editorTransfer.clearData(g.DraggedEditorIdentifier.prototype)}}else if(this.treeItemsTransfer.hasData(g.DraggedTreeItemsIdentifier.prototype)){const $=this.treeItemsTransfer.getData(g.DraggedTreeItemsIdentifier.prototype);if(Array.isArray($)){const J=[];for(const ee of $){const te=await this.treeViewsDragAndDropService.removeDragOperationTransfer(ee.identifier);if(te){const se=await(0,g.extractTreeDropData)(te);J.push(...se.map(ie=>({...ie,options:{...ie.options,pinned:!0,index:X}})))}}this.editorService.openEditors(J,this.group,{validateTrust:!0})}this.treeItemsTransfer.clearData(g.DraggedTreeItemsIdentifier.prototype)}else this.instantiationService.createInstance(g.ResourcesDropHandler,{allowWorkspaceOpen:!1}).handleDrop(j,()=>this.group,()=>this.group.focus(),X)}isMoveOperation(j,X,Y){return Y?.hasCapability(8)?!0:!(j.ctrlKey&&!t.isMacintosh||j.altKey&&t.isMacintosh)||X===this.group.id}dispose(){super.dispose(),this.tabDisposables=(0,r.dispose)(this.tabDisposables)}};q.SCROLLBAR_SIZES={default:3,large:10},q.TAB_WIDTH={compact:38,shrink:80,fit:120},q.TAB_HEIGHT=35,q.MOUSE_WHEEL_EVENT_THRESHOLD=150,q.MOUSE_WHEEL_DISTANCE_THRESHOLD=1.5,q=Ee([W(3,v.IContextMenuService),W(4,o.IInstantiationService),W(5,i.IContextKeyService),W(6,c.IKeybindingService),W(7,C.ITelemetryService),W(8,d.INotificationService),W(9,S.IMenuService),W(10,l.IQuickInputService),W(11,a.IThemeService),W(12,T.IConfigurationService),W(13,O.IFileService),W(14,F.IEditorService),W(15,N.IPathService),W(16,m.IEditorGroupsService),W(17,G.ITreeViewsService)],q),e.TabsTitleControl=q,(0,a.registerThemingParticipant)((Z,j)=>{if((0,V.isHighContrast)(Z.type)){const le=Z.getColor(n.TAB_BORDER)||Z.getColor(h.contrastBorder);le&&j.addRule(` .monaco-workbench .part.editor > .content .editor-group-container > .title > .tabs-and-actions-container { border-bottom: 1px solid ${le}; } `)}const X=Z.getColor(n.TAB_BORDER);X&&j.addRule(` .monaco-workbench .part.editor > .content .editor-group-container > .title > .tabs-and-actions-container.wrapping .tabs-container > .tab { border-bottom: 1px solid ${X}; } `);const Y=Z.getColor(h.activeContrastBorder);Y&&j.addRule(` .monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.active, .monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.active:hover { outline: 1px solid; outline-offset: -5px; } .monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab:hover { outline: 1px dashed; outline-offset: -5px; } .monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.active > .tab-actions .action-label, .monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.active:hover > .tab-actions .action-label, .monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.dirty > .tab-actions .action-label, .monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sticky > .tab-actions .action-label, .monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab:hover > .tab-actions .action-label { opacity: 1 !important; } `);const $=Z.getColor(h.contrastBorder);$&&j.addRule(` .monaco-workbench .part.editor > .content .editor-group-container > .title .editor-actions { outline: 1px solid ${$} } `);const J=Z.getColor(n.TAB_HOVER_BACKGROUND);J&&j.addRule(` .monaco-workbench .part.editor > .content .editor-group-container.active > .title .tabs-container > .tab:hover { background-color: ${J} !important; } `);const ee=Z.getColor(n.TAB_UNFOCUSED_HOVER_BACKGROUND);ee&&j.addRule(` .monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab:hover { background-color: ${ee} !important; } `);const te=Z.getColor(n.TAB_HOVER_FOREGROUND);te&&j.addRule(` .monaco-workbench .part.editor > .content .editor-group-container.active > .title .tabs-container > .tab:hover { color: ${te} !important; } `);const se=Z.getColor(n.TAB_UNFOCUSED_HOVER_FOREGROUND);se&&j.addRule(` .monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab:hover { color: ${se} !important; } `);const ie=Z.getColor(n.TAB_HOVER_BORDER);ie&&j.addRule(` .monaco-workbench .part.editor > .content .editor-group-container.active > .title .tabs-container > .tab:hover > .tab-border-bottom-container { display: block; position: absolute; left: 0; pointer-events: none; width: 100%; z-index: 10; bottom: 0; height: 1px; background-color: ${ie}; } `);const ce=Z.getColor(n.TAB_UNFOCUSED_HOVER_BORDER);if(ce&&j.addRule(` .monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab:hover > .tab-border-bottom-container { display: block; position: absolute; left: 0; pointer-events: none; width: 100%; z-index: 10; bottom: 0; height: 1px; background-color: ${ce}; } `),(0,V.isHighContrast)(Z.type)&&!z.isSafari&&!Y){const le=(0,n.WORKBENCH_BACKGROUND)(Z),ae=Z.getColor(h.editorBackground),ue=Z.getColor(n.EDITOR_GROUP_HEADER_TABS_BACKGROUND),oe=Z.getColor(n.EDITOR_DRAG_AND_DROP_BACKGROUND);let fe;ue&&ae&&(fe=ue.flatten(ae,ae,le));let pe;ue&&ae&&oe&&ae&&(pe=ue.flatten(ae,oe,ae,le));const me=(de,Se,we=!1)=>` .monaco-workbench .part.editor > .content:not(.dragged-over) .editor-group-container${we?".active":""} > .title .tabs-container > .tab.sizing-shrink:not(.dragged):not(.sticky-compact):hover > .tab-label > .monaco-icon-label-container::after { background: linear-gradient(to left, ${de}, transparent) !important; } .monaco-workbench .part.editor > .content.dragged-over .editor-group-container${we?".active":""} > .title .tabs-container > .tab.sizing-shrink:not(.dragged):not(.sticky-compact):hover > .tab-label > .monaco-icon-label-container::after { background: linear-gradient(to left, ${Se}, transparent) !important; } `;if(J&&fe&&pe){const de=J.flatten(fe),Se=J.flatten(pe);j.addRule(me(de,Se,!0))}if(ee&&fe&&pe){const de=ee.flatten(fe),Se=ee.flatten(pe);j.addRule(me(de,Se))}if(oe&&pe){const de=oe.flatten(pe);j.addRule(` .monaco-workbench .part.editor > .content.dragged-over .editor-group-container.active > .title .tabs-container > .tab.sizing-shrink.dragged-over:not(.active):not(.dragged):not(.sticky-compact) > .tab-label > .monaco-icon-label-container::after, .monaco-workbench .part.editor > .content.dragged-over .editor-group-container:not(.active) > .title .tabs-container > .tab.sizing-shrink.dragged-over:not(.dragged):not(.sticky-compact) > .tab-label > .monaco-icon-label-container::after { background: linear-gradient(to left, ${de}, transparent) !important; } `)}const be=(de,Se,we,ye)=>` .monaco-workbench .part.editor > .content:not(.dragged-over) .editor-group-container${we?".active":":not(.active)"} > .title .tabs-container > .tab.sizing-shrink${ye?".active":""}:not(.dragged):not(.sticky-compact) > .tab-label > .monaco-icon-label-container::after { background: linear-gradient(to left, ${de}, transparent); } .monaco-workbench .part.editor > .content.dragged-over .editor-group-container${we?".active":":not(.active)"} > .title .tabs-container > .tab.sizing-shrink${ye?".active":""}:not(.dragged):not(.sticky-compact) > .tab-label > .monaco-icon-label-container::after { background: linear-gradient(to left, ${Se}, transparent); } `,Ce=Z.getColor(n.TAB_ACTIVE_BACKGROUND);if(Ce&&fe&&pe){const de=Ce.flatten(fe),Se=Ce.flatten(pe);j.addRule(be(de,Se,!0,!0))}const ve=Z.getColor(n.TAB_UNFOCUSED_ACTIVE_BACKGROUND);if(ve&&fe&&pe){const de=ve.flatten(fe),Se=ve.flatten(pe);j.addRule(be(de,Se,!1,!0))}const he=Z.getColor(n.TAB_INACTIVE_BACKGROUND);if(he&&fe&&pe){const de=he.flatten(fe),Se=he.flatten(pe);j.addRule(be(de,Se,!0,!1))}const ge=Z.getColor(n.TAB_UNFOCUSED_INACTIVE_BACKGROUND);if(ge&&fe&&pe){const de=ge.flatten(fe),Se=ge.flatten(pe);j.addRule(be(de,Se,!1,!1))}}})}),define(ne[2748],re([1,0,844,44,74,167,6,5,10,155,7,280,68,12,32,82,2747,2688,67,623,1399,15,22,2,26,130,27,11,129,316,78,38,2746,16,137,73,37,21,116,350,19,18,132,54,31,154,13,56,14,1055]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H,K,G,q,Z,j){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorGroupView=void 0;let X=class Mi extends c.Themable{constructor($,J,ee,te,se,ie,ce,le,ae,ue,oe,fe,pe,me,be,Ce,ve){super(ie);this.accessor=$,this._index=ee,this.instantiationService=te,this.contextKeyService=se,this.notificationService=ce,this.dialogService=le,this.telemetryService=ae,this.keybindingService=ue,this.menuService=oe,this.contextMenuService=fe,this.fileDialogService=pe,this.logService=me,this.editorService=be,this.filesConfigurationService=Ce,this.uriIdentityService=ve,this._onDidFocus=this._register(new k.Emitter),this.onDidFocus=this._onDidFocus.event,this._onWillDispose=this._register(new k.Emitter),this.onWillDispose=this._onWillDispose.event,this._onDidModelChange=this._register(new k.Emitter),this.onDidModelChange=this._onDidModelChange.event,this._onDidActiveEditorChange=this._register(new k.Emitter),this.onDidActiveEditorChange=this._onDidActiveEditorChange.event,this._onDidOpenEditorFail=this._register(new k.Emitter),this.onDidOpenEditorFail=this._onDidOpenEditorFail.event,this._onWillCloseEditor=this._register(new k.Emitter),this.onWillCloseEditor=this._onWillCloseEditor.event,this._onDidCloseEditor=this._register(new k.Emitter),this.onDidCloseEditor=this._onDidCloseEditor.event,this._onWillMoveEditor=this._register(new k.Emitter),this.onWillMoveEditor=this._onWillMoveEditor.event,this._onWillOpenEditor=this._register(new k.Emitter),this.onWillOpenEditor=this._onWillOpenEditor.event,this.disposedEditorsWorker=this._register(new b.RunOnceWorker(ge=>this.handleDisposedEditors(ge),0)),this.mapEditorToPendingConfirmation=new Map,this.containerToolBarMenuDisposable=this._register(new h.MutableDisposable),this.whenRestoredPromise=new b.DeferredPromise,this.whenRestored=this.whenRestoredPromise.p,this.isRestored=!1,this._disposed=!1,this.element=document.createElement("div"),this._onDidChange=this._register(new k.Relay),this.onDidChange=this._onDidChange.event,J instanceof Mi?this.model=this._register(J.model.clone()):(0,t.isSerializedEditorGroupModel)(J)?this.model=this._register(te.createInstance(t.EditorGroupModel,J)):this.model=this._register(te.createInstance(t.EditorGroupModel,void 0));{this.scopedContextKeyService=this._register(this.contextKeyService.createScoped(this.element)),this.element.classList.add("editor-group-container"),this.registerContainerListeners(),this.createContainerToolbar(),this.createContainerContextMenu();const ge=document.createElement("div");ge.classList.add("editor-group-letterpress"),this.element.appendChild(ge),this.progressBar=this._register(new C.ProgressBar(this.element)),this._register((0,o.attachProgressBarStyler)(this.progressBar,this.themeService)),this.progressBar.hide(),this.scopedInstantiationService=this.instantiationService.createChild(new w.ServiceCollection([v.IContextKeyService,this.scopedContextKeyService],[r.IEditorProgressService,this._register(new p.EditorProgressIndicator(this.progressBar,this))])),this.handleGroupContextKeys(),this.titleContainer=document.createElement("div"),this.titleContainer.classList.add("title"),this.element.appendChild(this.titleContainer),this.titleAreaControl=this.createTitleAreaControl(),this.editorContainer=document.createElement("div"),this.editorContainer.classList.add("editor-container"),this.element.appendChild(this.editorContainer),this.editorPane=this._register(this.scopedInstantiationService.createInstance(l.EditorPanes,this.editorContainer,this)),this._onDidChange.input=this.editorPane.onDidChangeSizeConstraints,this.doTrackFocus(),this.updateTitleContainer(),this.updateContainer(),this.updateStyles()}(this.restoreEditors(J)??Promise.resolve()).finally(()=>{this.isRestored=!0,this.whenRestoredPromise.complete()}),this.registerListeners()}static createNew($,J,ee){return ee.createInstance(Mi,$,null,J)}static createFromSerialized($,J,ee,te){return te.createInstance(Mi,J,$,ee)}static createCopy($,J,ee,te){return te.createInstance(Mi,J,$,ee)}handleGroupContextKeys(){const $=_.ActiveEditorDirtyContext.bindTo(this.scopedContextKeyService),J=_.ActiveEditorPinnedContext.bindTo(this.scopedContextKeyService),ee=_.ActiveEditorFirstInGroupContext.bindTo(this.scopedContextKeyService),te=_.ActiveEditorLastInGroupContext.bindTo(this.scopedContextKeyService),se=_.ActiveEditorStickyContext.bindTo(this.scopedContextKeyService),ie=_.EditorGroupEditorsCountContext.bindTo(this.scopedContextKeyService),ce=_.ActiveEditorGroupLockedContext.bindTo(this.scopedContextKeyService),le=new h.MutableDisposable,ae=()=>{le.clear();const ue=this.model.activeEditor;ue?($.set(ue.isDirty()&&!ue.isSaving()),le.value=ue.onDidChangeDirty(()=>{$.set(ue.isDirty()&&!ue.isSaving())})):$.set(!1)};this._register(this.onDidModelChange(ue=>{switch(ue.kind){case 2:ce.set(this.isLocked);break;case 6:case 4:case 3:case 5:ee.set(this.model.isFirst(this.model.activeEditor)),te.set(this.model.isLast(this.model.activeEditor));break;case 9:ue.editor&&ue.editor===this.model.activeEditor&&J.set(this.model.isPinned(this.model.activeEditor));break;case 10:ue.editor&&ue.editor===this.model.activeEditor&&se.set(this.model.isSticky(this.model.activeEditor));break}ie.set(this.count)})),this._register(this.onDidActiveEditorChange(()=>{ae()})),ae()}registerContainerListeners(){this._register((0,I.addDisposableListener)(this.element,I.EventType.DBLCLICK,$=>{this.isEmpty&&(I.EventHelper.stop($),this.editorService.openEditor({resource:void 0,options:{pinned:!0,override:f.DEFAULT_EDITOR_ASSOCIATION.id}},this.id))})),this._register((0,I.addDisposableListener)(this.element,I.EventType.AUXCLICK,$=>{this.isEmpty&&$.button===1&&(I.EventHelper.stop($,!0),this.accessor.removeGroup(this))}))}createContainerToolbar(){const $=document.createElement("div");$.classList.add("editor-group-container-toolbar"),this.element.appendChild($);const J=this._register(new T.ActionBar($,{ariaLabel:(0,u.localize)(0,null)})),ee=this._register(this.menuService.createMenu(x.MenuId.EmptyEditorGroup,this.scopedContextKeyService)),te=()=>{const se={primary:[],secondary:[]};this.containerToolBarMenuDisposable.value=(0,h.combinedDisposable)((0,h.toDisposable)(()=>J.clear()),(0,L.createAndFillInActionBarActions)(ee,{arg:{groupId:this.id},shouldForwardArgs:!0},se,"navigation"));for(const ie of[...se.primary,...se.secondary]){const ce=this.keybindingService.lookupKeybinding(ie.id);J.push(ie,{icon:!0,label:!1,keybinding:ce?.getLabel()})}};te(),this._register(ee.onDidChange(te))}createContainerContextMenu(){const $=this._register(this.menuService.createMenu(x.MenuId.EmptyEditorGroupContext,this.contextKeyService));this._register((0,I.addDisposableListener)(this.element,I.EventType.CONTEXT_MENU,J=>this.onShowContainerContextMenu($,J))),this._register((0,I.addDisposableListener)(this.element,E.EventType.Contextmenu,()=>this.onShowContainerContextMenu($)))}onShowContainerContextMenu($,J){if(!this.isEmpty)return;let ee=this.element;if(J instanceof MouseEvent){const ie=new F.StandardMouseEvent(J);ee={x:ie.posx,y:ie.posy}}const te=[],se=(0,L.createAndFillInContextMenuActions)($,void 0,te);this.contextMenuService.showContextMenu({getAnchor:()=>ee,getActions:()=>te,onHide:()=>{this.focus(),(0,h.dispose)(se)}})}doTrackFocus(){const $=this._register((0,I.trackFocus)(this.element));this._register($.onDidFocus(()=>{this.isEmpty&&this._onDidFocus.fire()}));const J=ee=>{let te;if(ee instanceof MouseEvent){if(ee.button!==0)return;te=ee.target}else te=ee.initialTarget;(0,I.findParentWithClass)(te,"monaco-action-bar",this.titleContainer)||(0,I.findParentWithClass)(te,"monaco-breadcrumb-item",this.titleContainer)||setTimeout(()=>{this.focus()})};this._register((0,I.addDisposableListener)(this.titleContainer,I.EventType.MOUSE_DOWN,ee=>J(ee))),this._register((0,I.addDisposableListener)(this.titleContainer,E.EventType.Tap,ee=>J(ee))),this._register(this.editorPane.onDidFocus(()=>{this._onDidFocus.fire()}))}updateContainer(){this.isEmpty?(this.element.classList.add("empty"),this.element.tabIndex=0,this.element.setAttribute("aria-label",(0,u.localize)(1,null,this.label))):(this.element.classList.remove("empty"),this.element.removeAttribute("tabIndex"),this.element.removeAttribute("aria-label")),this.updateStyles()}updateTitleContainer(){this.titleContainer.classList.toggle("tabs",this.accessor.partOptions.showTabs),this.titleContainer.classList.toggle("show-file-icons",this.accessor.partOptions.showIcons)}createTitleAreaControl(){return this.titleAreaControl&&(this.titleAreaControl.dispose(),(0,I.clearNode)(this.titleContainer)),this.accessor.partOptions.showTabs?this.titleAreaControl=this.scopedInstantiationService.createInstance(s.TabsTitleControl,this.titleContainer,this.accessor,this):this.titleAreaControl=this.scopedInstantiationService.createInstance(O.NoTabsTitleControl,this.titleContainer,this.accessor,this),this.titleAreaControl}restoreEditors($){if(this.count===0)return;let J;$ instanceof Mi?J=(0,y.fillActiveEditorViewState)($):J=Object.create(null);const ee=this.model.activeEditor;if(!ee)return;J.pinned=this.model.isPinned(ee),J.sticky=this.model.isSticky(ee),J.preserveFocus=!0;const te=document.activeElement;return this.doShowEditor(ee,{active:!0,isNew:!1},J).then(()=>{this.accessor.activeGroup===this&&te===document.activeElement&&this.focus()})}registerListeners(){this._register(this.model.onDidModelChange($=>this.onDidGroupModelChange($))),this._register(this.accessor.onDidChangeEditorPartOptions($=>this.onDidChangeEditorPartOptions($))),this._register(this.accessor.onDidVisibilityChange($=>this.onDidVisibilityChange($)))}onDidGroupModelChange($){if(this._onDidModelChange.fire($),!!$.editor)switch($.kind){case 3:(0,t.isGroupEditorOpenEvent)($)&&this.onDidOpenEditor($.editor,$.editorIndex);break;case 4:(0,t.isGroupEditorCloseEvent)($)&&this.handleOnDidCloseEditor($.editor,$.editorIndex,$.context,$.sticky);break;case 12:this.onWillDisposeEditor($.editor);break;case 11:this.onDidChangeEditorDirty($.editor);break;case 7:this.onDidChangeEditorLabel($.editor);break}}onDidOpenEditor($,J){this.telemetryService.publicLog("editorOpened",this.toEditorTelemetryDescriptor($)),this.updateContainer()}handleOnDidCloseEditor($,J,ee,te){this._onWillCloseEditor.fire({groupId:this.id,editor:$,context:ee,index:J,sticky:te});const se=[$];$ instanceof A.SideBySideEditorInput&&se.push($.primary,$.secondary);for(const ie of se)this.canDispose(ie)&&ie.dispose();this.telemetryService.publicLog("editorClosed",this.toEditorTelemetryDescriptor($)),this.updateContainer(),this._onDidCloseEditor.fire({groupId:this.id,editor:$,context:ee,index:J,sticky:te})}canDispose($){for(const J of this.accessor.groups)if(J instanceof Mi&&J.model.contains($,{strictEquals:!0,supportSideBySide:f.SideBySideEditor.ANY}))return!1;return!0}toEditorTelemetryDescriptor($){const J=$.getTelemetryDescriptor(),ee=f.EditorResourceAccessor.getOriginalUri($),te=ee?ee.scheme===z.Schemas.file?ee.fsPath:ee.path:void 0;if(ee&&te){let se=(0,V.extname)(ee);const ie=se.indexOf("?");return se=ie!==-1?se.substr(0,ie):se,J.resource={mimeType:(0,P.getMimeTypes)(ee).join(", "),scheme:ee.scheme,ext:se,path:(0,B.hash)(te)},J}return J}onWillDisposeEditor($){this.disposedEditorsWorker.work($)}handleDisposedEditors($){let J;const ee=[];for(const te of $)this.model.isActive(te)?J=te:this.model.contains(te)&&ee.push(te);for(const te of ee)this.doCloseEditor(te,!1);J&&this.doCloseEditor(J,!1)}onDidChangeEditorPartOptions($){this.updateTitleContainer(),$.oldPartOptions.showTabs!==$.newPartOptions.showTabs?(this.createTitleAreaControl(),this.relayout(),this.model.activeEditor&&this.titleAreaControl.openEditor(this.model.activeEditor)):this.titleAreaControl.updateOptions($.oldPartOptions,$.newPartOptions),this.updateStyles(),$.oldPartOptions.enablePreview&&!$.newPartOptions.enablePreview&&this.model.previewEditor&&this.pinEditor(this.model.previewEditor)}onDidChangeEditorDirty($){this.pinEditor($),this.titleAreaControl.updateEditorDirty($)}onDidChangeEditorLabel($){this.titleAreaControl.updateEditorLabel($)}onDidVisibilityChange($){this.editorPane.setVisible($)}get index(){return this._index}get label(){return(0,u.localize)(2,null,this._index+1)}get ariaLabel(){return(0,u.localize)(3,null,this._index+1)}get disposed(){return this._disposed}get isEmpty(){return this.count===0}get titleHeight(){return this.titleAreaControl.getHeight()}get isMinimized(){return this.dimension?this.dimension.width===this.minimumWidth||this.dimension.height===this.minimumHeight:!1}notifyIndexChanged($){this._index!==$&&(this._index=$,this.model.setIndex($))}setActive($){this.active=$,this.element.classList.toggle("active",$),this.element.classList.toggle("inactive",!$),this.titleAreaControl.setActive($),this.updateStyles(),this.model.setActive(void 0)}get id(){return this.model.id}get editors(){return this.model.getEditors(1)}get count(){return this.model.count}get stickyCount(){return this.model.stickyCount}get activeEditorPane(){return this.editorPane?(0,q.withNullAsUndefined)(this.editorPane.activeEditorPane):void 0}get activeEditor(){return this.model.activeEditor}get previewEditor(){return this.model.previewEditor}isPinned($){return this.model.isPinned($)}isSticky($){return this.model.isSticky($)}isActive($){return this.model.isActive($)}contains($,J){return this.model.contains($,J)}getEditors($,J){return this.model.getEditors($,J)}findEditors($,J){const ee=this.uriIdentityService.asCanonicalUri($);return this.getEditors(1).filter(te=>{if(te.resource&&(0,V.isEqual)(te.resource,ee))return!0;if(J?.supportSideBySide===f.SideBySideEditor.PRIMARY||J?.supportSideBySide===f.SideBySideEditor.ANY){const se=f.EditorResourceAccessor.getCanonicalUri(te,{supportSideBySide:f.SideBySideEditor.PRIMARY});if(se&&(0,V.isEqual)(se,ee))return!0}if(J?.supportSideBySide===f.SideBySideEditor.SECONDARY||J?.supportSideBySide===f.SideBySideEditor.ANY){const se=f.EditorResourceAccessor.getCanonicalUri(te,{supportSideBySide:f.SideBySideEditor.SECONDARY});if(se&&(0,V.isEqual)(se,ee))return!0}return!1})}getEditorByIndex($){return this.model.getEditorByIndex($)}getIndexOfEditor($){return this.model.indexOf($)}isFirst($){return this.model.isFirst($)}isLast($){return this.model.isLast($)}focus(){this.activeEditorPane?this.activeEditorPane.focus():this.element.focus(),this._onDidFocus.fire()}pinEditor($=this.activeEditor||void 0){if($&&!this.model.isPinned($)){const J=this.model.pin($);J&&this.titleAreaControl.pinEditor(J)}}stickEditor($=this.activeEditor||void 0){this.doStickEditor($,!0)}unstickEditor($=this.activeEditor||void 0){this.doStickEditor($,!1)}doStickEditor($,J){if($&&this.model.isSticky($)!==J){const ee=this.getIndexOfEditor($),te=J?this.model.stick($):this.model.unstick($);if(!te)return;const se=this.getIndexOfEditor(te);se!==ee&&this.titleAreaControl.moveEditor(te,ee,se),J?this.titleAreaControl.stickEditor(te):this.titleAreaControl.unstickEditor(te)}}async openEditor($,J){return this.doOpenEditor($,J,{supportSideBySide:f.SideBySideEditor.BOTH})}async doOpenEditor($,J,ee){if(!$||$.isDisposed())return;this._onWillOpenEditor.fire({editor:$,groupId:this.id});const te={index:J?J.index:void 0,pinned:J?.sticky||!this.accessor.partOptions.enablePreview||$.isDirty()||(J?.pinned??typeof J?.index=="number")||typeof J?.index=="number"&&this.model.isSticky(J.index),sticky:J?.sticky||typeof J?.index=="number"&&this.model.isSticky(J.index),active:this.count===0||!J||!J.inactive,supportSideBySide:ee?.supportSideBySide};J?.sticky&&typeof J?.index=="number"&&!this.model.isSticky(J.index)&&(te.sticky=!1),!te.active&&!te.pinned&&this.model.activeEditor&&!this.model.isPinned(this.model.activeEditor)&&(te.active=!0);let se=!1,ie=!1;if(J?.activation===U.EditorActivation.ACTIVATE?se=!0:J?.activation===U.EditorActivation.RESTORE?ie=!0:J?.activation===U.EditorActivation.PRESERVE?(se=!1,ie=!1):te.active&&(se=!J||!J.preserveFocus,ie=!se),typeof te.index=="number"){const ue=this.model.indexOf($);ue!==-1&&ue!==te.index&&this.doMoveEditorInsideGroup($,te)}const{editor:ce,isNew:le}=this.model.openEditor($,te);le&&this.count===1&&this.accessor.groups.length>1&&ce.editorId&&this.accessor.partOptions.autoLockGroups?.has(ce.editorId)&&this.lock(!0);const ae=this.doShowEditor(ce,{active:!!te.active,isNew:le},J,ee);return se?this.accessor.activateGroup(this):ie&&this.accessor.restoreGroup(this),ae}doShowEditor($,J,ee,te){let se;return J.active?se=(async()=>{const{pane:ie,changed:ce,cancelled:le,error:ae}=await this.editorPane.openEditor($,ee,{newInGroup:J.isNew});if(!le){if(ce&&this._onDidActiveEditorChange.fire({editor:$}),ae&&await this.doHandleOpenEditorError(ae,$,ee),!ie&&this.activeEditor===$){const ue=!ee||!ee.preserveFocus;this.doCloseEditor($,ue,{fromError:!0})}return ie}})():se=Promise.resolve(void 0),te?.skipTitleUpdate||this.titleAreaControl.openEditor($),se}async doHandleOpenEditorError($,J,ee){if(!(0,n.isCancellationError)($)&&(!ee||!ee.ignoreError)&&(this.logService.error($),this.isRestored)){let te;if((0,d.isErrorWithActions)($)&&(te=$.actions),ee?.source===U.EditorOpenSource.USER){const se=[];if(Array.isArray(te)&&te.length>0)for(const le of te)se.push(le.label);else se.push((0,u.localize)(4,null));let ie;se.length===1&&(se.push((0,u.localize)(5,null)),ie=1);const ce=await this.dialogService.show(g.Severity.Error,(0,u.localize)(6,null,J.getName()),se,{detail:(0,d.toErrorMessage)($),cancelId:ie});if(ce.choice!==ie&&Array.isArray(te)){const le=te[ce.choice];le&&le.run()}}else{const se={primary:[]};Array.isArray(te)&&(se.primary=te);const ie=this.notificationService.notify({id:`${(0,B.hash)(J.resource?.toString())}`,severity:g.Severity.Error,message:(0,u.localize)(7,null,J.getName(),(0,d.toErrorMessage)($)),actions:se});k.Event.once(ie.onDidClose)(()=>se.primary&&(0,h.dispose)(se.primary))}}this._onDidOpenEditorFail.fire(J)}async openEditors($){const J=(0,a.coalesce)($).filter(({editor:ce})=>!ce.isDisposed()),ee=(0,a.firstOrDefault)(J);if(!ee)return;const te={supportSideBySide:f.SideBySideEditor.BOTH};await this.doOpenEditor(ee.editor,ee.options,te);const se=J.slice(1),ie=this.getIndexOfEditor(ee.editor)+1;return await b.Promises.settled(se.map(({editor:ce,options:le},ae)=>this.doOpenEditor(ce,{...le,inactive:!0,pinned:!0,index:ie+ae},{...te,skipTitleUpdate:!0}))),this.titleAreaControl.openEditors(se.map(({editor:ce})=>ce)),(0,q.withNullAsUndefined)(this.editorPane.activeEditorPane)}moveEditors($,J){const ee={skipTitleUpdate:this!==J};for(const{editor:te,options:se}of $)this.moveEditor(te,J,se,ee);if(ee.skipTitleUpdate){const te=$.map(({editor:se})=>se);J.titleAreaControl.openEditors(te),this.titleAreaControl.closeEditors(te)}}moveEditor($,J,ee,te){this===J?this.doMoveEditorInsideGroup($,ee):this.doMoveOrCopyEditorAcrossGroups($,J,ee,{...te,keepCopy:!1})}doMoveEditorInsideGroup($,J){const ee=J?J.index:void 0;if(typeof ee!="number")return;const te=this.model.indexOf($);if(te===-1||te===ee)return;const se=this.model.getEditorByIndex(te);!se||(this.model.moveEditor(se,ee),this.model.pin(se),this.titleAreaControl.moveEditor(se,te,ee),this.titleAreaControl.pinEditor(se))}doMoveOrCopyEditorAcrossGroups($,J,ee,te){const se=te?.keepCopy,ie=(0,y.fillActiveEditorViewState)(this,$,{...ee,pinned:!0,sticky:!se&&this.model.isSticky($)});se||this._onWillMoveEditor.fire({groupId:this.id,editor:$,target:J.id}),J.doOpenEditor(se?$.copy():$,ie,te),se||this.doCloseEditor($,!1,{...te,context:f.EditorCloseContext.MOVE})}copyEditors($,J){const ee={skipTitleUpdate:this!==J};for(const{editor:te,options:se}of $)this.copyEditor(te,J,se,ee);if(ee.skipTitleUpdate){const te=$.map(({editor:se})=>se);J.titleAreaControl.openEditors(te)}}copyEditor($,J,ee,te){this===J?this.doMoveEditorInsideGroup($,ee):this.doMoveOrCopyEditorAcrossGroups($,J,ee,{...te,keepCopy:!0})}async closeEditor($=this.activeEditor||void 0,J){return this.doCloseEditorWithDirtyHandling($,J)}async doCloseEditorWithDirtyHandling($=this.activeEditor||void 0,J,ee){return!$||await this.handleDirtyClosing([$])?!1:(this.doCloseEditor($,J?.preserveFocus?!1:void 0,ee),!0)}doCloseEditor($,J=this.accessor.activeGroup===this,ee){let te;this.model.isActive($)?te=this.doCloseActiveEditor(J,ee):te=this.doCloseInactiveEditor($,ee),ee?.skipTitleUpdate||this.titleAreaControl.closeEditor($,te)}doCloseActiveEditor($=this.accessor.activeGroup===this,J){const ee=this.activeEditor,te=this.shouldRestoreFocus(this.element),se=this.accessor.partOptions.closeEmptyGroups;if(se&&this.active&&this.count===1){const ae=this.accessor.getGroups(1)[1];ae&&(te?ae.focus():this.accessor.activateGroup(ae))}let ie;ee&&(ie=this.model.closeEditor(ee,J?.context)?.editorIndex);const ce=this.model.activeEditor;if(ce){const le=!$;let ae;le&&this.accessor.activeGroup!==this&&(ae=U.EditorActivation.PRESERVE);const ue={preserveFocus:le,activation:ae,ignoreError:J?.fromError};this.doOpenEditor(ce,ue)}else ee&&this.editorPane.closeEditor(ee),te&&!se&&this.focus(),this._onDidActiveEditorChange.fire({editor:void 0}),se&&this.accessor.removeGroup(this);return ie}shouldRestoreFocus($){const J=document.activeElement;return J===document.body?!0:(0,I.isAncestor)(J,$)}doCloseInactiveEditor($,J){return this.model.closeEditor($,J?.context)?.editorIndex}async handleDirtyClosing($){if(!$.length)return!1;const J=$.shift();let ee=this.mapEditorToPendingConfirmation.get(J);ee||(ee=this.doHandleDirtyClosing(J),this.mapEditorToPendingConfirmation.set(J,ee));let te;try{te=await ee}finally{this.mapEditorToPendingConfirmation.delete(J)}return te||this.handleDirtyClosing($)}async doHandleDirtyClosing($,J){if(!$.isDirty()||$.isSaving()||$ instanceof A.SideBySideEditorInput&&this.model.contains($.primary)||this.accessor.groups.some(ie=>{if(ie===this)return!1;const ce=ie;return!!(ce.contains($,{supportSideBySide:f.SideBySideEditor.BOTH})||$ instanceof A.SideBySideEditorInput&&ce.contains($.primary))}))return!1;let ee=2,te=1,se=!1;if(!$.hasCapability(4)&&!J?.skipAutoSave&&(this.filesConfigurationService.getAutoSaveMode()===3?(se=!0,ee=0,te=3):j.isNative&&(j.isWindows||j.isLinux)&&this.filesConfigurationService.getAutoSaveMode()===4&&(se=!0,ee=0,te=4)),!se)if(await this.doOpenEditor($),typeof $.confirm=="function")ee=await $.confirm();else{let ie;$ instanceof A.SideBySideEditorInput?ie=$.primary.getName():ie=$.getName(),ee=await this.fileDialogService.showSaveConfirm([ie])}if(!$.isDirty()||$.isSaving())return ee===2;switch(ee){case 0:return!await $.save(this.id,{reason:te})&&se?this.doHandleDirtyClosing($,{skipAutoSave:!0}):$.isDirty();case 1:try{return await $.revert(this.id),$.isDirty()}catch{return await $.revert(this.id,{soft:!0}),$.isDirty()}case 2:return!0}}async closeEditors($,J){if(this.isEmpty)return;const ee=this.doGetEditorsToClose($);await this.handleDirtyClosing(ee.slice(0))||this.doCloseEditors(ee,J)}doGetEditorsToClose($){if(Array.isArray($))return $;const J=$,ee=typeof J.direction=="number";let te=this.model.getEditors(ee?1:0,J);return J.savedOnly?te=te.filter(se=>!se.isDirty()||se.isSaving()):ee&&J.except?te=J.direction===0?te.slice(0,this.model.indexOf(J.except,te)):te.slice(this.model.indexOf(J.except,te)+1):J.except&&(te=te.filter(se=>J.except&&!se.matches(J.except))),te}doCloseEditors($,J){let ee=!1;for(const te of $)this.isActive(te)?ee=!0:this.doCloseInactiveEditor(te);ee&&this.doCloseActiveEditor(J?.preserveFocus?!1:void 0),$.length&&this.titleAreaControl.closeEditors($)}async closeAllEditors($){if(this.isEmpty){this.accessor.partOptions.closeEmptyGroups&&this.accessor.removeGroup(this);return}await this.handleDirtyClosing(this.model.getEditors(0,$))||this.doCloseAllEditors($)}doCloseAllEditors($){const J=[];for(const ee of this.model.getEditors(1,$))this.isActive(ee)||this.doCloseInactiveEditor(ee),J.push(ee);this.activeEditor&&J.includes(this.activeEditor)&&this.doCloseActiveEditor(),J.length&&this.titleAreaControl.closeEditors(J)}async replaceEditors($){let J;const ee=[];for(let{editor:te,replacement:se,forceReplaceDirty:ie,options:ce}of $){const le=this.getIndexOfEditor(te);if(le>=0){const ae=this.isActive(te);ce?ce.index=le:ce={index:le},ce.inactive=!ae,ce.pinned=ce.pinned??!0;const ue={editor:te,replacement:se,forceReplaceDirty:ie,options:ce};ae?J=ue:ee.push(ue)}}for(const{editor:te,replacement:se,forceReplaceDirty:ie,options:ce}of ee)if(await this.doOpenEditor(se,ce),!te.matches(se)){let le=!1;if(ie?(this.doCloseEditor(te,!1,{context:f.EditorCloseContext.REPLACE}),le=!0):le=await this.doCloseEditorWithDirtyHandling(te,{preserveFocus:!0},{context:f.EditorCloseContext.REPLACE}),!le)return}if(J){const te=this.doOpenEditor(J.replacement,J.options);J.editor.matches(J.replacement)||(J.forceReplaceDirty?this.doCloseEditor(J.editor,!1,{context:f.EditorCloseContext.REPLACE}):await this.doCloseEditorWithDirtyHandling(J.editor,{preserveFocus:!0},{context:f.EditorCloseContext.REPLACE})),await te}}get isLocked(){return this.accessor.groups.length===1?!1:this.model.isLocked}lock($){this.accessor.groups.length===1&&($=!1),this.model.lock($)}updateStyles(){const $=this.isEmpty;$?this.element.style.backgroundColor=this.getColor(S.EDITOR_GROUP_EMPTY_BACKGROUND)||"":this.element.style.backgroundColor="";const J=this.getColor(S.EDITOR_GROUP_HEADER_BORDER)||this.getColor(i.contrastBorder);!$&&J?(this.titleContainer.classList.add("title-border-bottom"),this.titleContainer.style.setProperty("--title-border-bottom-color",J.toString())):(this.titleContainer.classList.remove("title-border-bottom"),this.titleContainer.style.removeProperty("--title-border-bottom-color"));const{showTabs:ee}=this.accessor.partOptions;this.titleContainer.style.backgroundColor=this.getColor(ee?S.EDITOR_GROUP_HEADER_TABS_BACKGROUND:S.EDITOR_GROUP_HEADER_NO_TABS_BACKGROUND)||"",this.editorContainer.style.backgroundColor=this.getColor(i.editorBackground)||""}get minimumWidth(){return this.editorPane.minimumWidth}get minimumHeight(){return this.editorPane.minimumHeight}get maximumWidth(){return this.editorPane.maximumWidth}get maximumHeight(){return this.editorPane.maximumHeight}layout($,J){this.dimension=new I.Dimension($,J);const ee=this.titleAreaControl.layout({container:this.dimension,available:new I.Dimension($,J-this.editorPane.minimumHeight)}),te=Math.max(0,J-ee.height);this.editorContainer.style.height=`${te}px`,this.editorPane.layout(new I.Dimension($,te))}relayout(){if(this.dimension){const{width:$,height:J}=this.dimension;this.layout($,J)}}toJSON(){return this.model.serialize()}dispose(){this._disposed=!0,this._onWillDispose.fire(),this.titleAreaControl.dispose(),super.dispose()}};X=Ee([W(3,D.IInstantiationService),W(4,v.IContextKeyService),W(5,c.IThemeService),W(6,g.INotificationService),W(7,H.IDialogService),W(8,m.ITelemetryService),W(9,R.IKeybindingService),W(10,x.IMenuService),W(11,M.IContextMenuService),W(12,H.IFileDialogService),W(13,K.ILogService),W(14,N.IEditorService),W(15,G.IFilesConfigurationService),W(16,Z.IUriIdentityService)],X),e.EditorGroupView=X,(0,c.registerThemingParticipant)((Y,$)=>{const J=`./media/letterpress-${Y.type}.svg`;$.addRule(` .monaco-workbench .part.editor > .content .editor-group-container.empty .editor-group-letterpress { background-image: ${(0,I.asCSSUrl)(z.FileAccess.asBrowserUri(J,Q))} } `);const ee=Y.getColor(S.EDITOR_GROUP_FOCUSED_EMPTY_BORDER);ee?$.addRule(` .monaco-workbench .part.editor > .content:not(.empty) .editor-group-container.empty.active:focus { outline-width: 1px; outline-color: ${ee}; outline-offset: -2px; outline-style: solid; } .monaco-workbench .part.editor > .content.empty .editor-group-container.empty.active:focus { outline: none; /* never show outline for empty group if it is the last */ } `):$.addRule(` .monaco-workbench .part.editor > .content .editor-group-container.empty.active:focus { outline: none; /* disable focus outline unless active empty group border is defined */ } `)})}),define(ne[2749],re([1,0,12,353,10,6,32,59,5,670,82,15,316,2748,8,2,24,844,2745,603,66,999,22,80,35,13,156,11,608,21]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorPart=void 0;class T{constructor(){this.element=(0,_.$)(".grid-view-container"),this._onDidChange=new A.Relay,this.onDidChange=this._onDidChange.event}get minimumWidth(){return this.gridWidget?this.gridWidget.minimumWidth:0}get maximumWidth(){return this.gridWidget?this.gridWidget.maximumWidth:Number.POSITIVE_INFINITY}get minimumHeight(){return this.gridWidget?this.gridWidget.minimumHeight:0}get maximumHeight(){return this.gridWidget?this.gridWidget.maximumHeight:Number.POSITIVE_INFINITY}get gridWidget(){return this._gridWidget}set gridWidget(F){this.element.innerText="",F?(this.element.appendChild(F.element),this._onDidChange.input=F.onDidChange):this._onDidChange.input=A.Event.None,this._gridWidget=F}layout(F,L,M,N){this.gridWidget&&this.gridWidget.layout(F,L,M,N)}dispose(){this._onDidChange.dispose()}}let R=class Si extends f.Part{constructor(F,L,M,N,B){super("workbench.parts.editor",{hasTitle:!1},L,N,B);this.instantiationService=F,this.configurationService=M,this._onDidLayout=this._register(new A.Emitter),this.onDidLayout=this._onDidLayout.event,this._onDidChangeActiveGroup=this._register(new A.Emitter),this.onDidChangeActiveGroup=this._onDidChangeActiveGroup.event,this._onDidChangeGroupIndex=this._register(new A.Emitter),this.onDidChangeGroupIndex=this._onDidChangeGroupIndex.event,this._onDidChangeGroupLocked=this._register(new A.Emitter),this.onDidChangeGroupLocked=this._onDidChangeGroupLocked.event,this._onDidActivateGroup=this._register(new A.Emitter),this.onDidActivateGroup=this._onDidActivateGroup.event,this._onDidAddGroup=this._register(new A.Emitter),this.onDidAddGroup=this._onDidAddGroup.event,this._onDidRemoveGroup=this._register(new A.Emitter),this.onDidRemoveGroup=this._onDidRemoveGroup.event,this._onDidMoveGroup=this._register(new A.Emitter),this.onDidMoveGroup=this._onDidMoveGroup.event,this.onDidSetGridWidget=this._register(new A.Emitter),this._onDidChangeSizeConstraints=this._register(new A.Relay),this.onDidChangeSizeConstraints=A.Event.any(this.onDidSetGridWidget.event,this._onDidChangeSizeConstraints.event),this._onDidChangeEditorPartOptions=this._register(new A.Emitter),this.onDidChangeEditorPartOptions=this._onDidChangeEditorPartOptions.event,this.workspaceMemento=this.getMemento(1,1),this.globalMemento=this.getMemento(0,1),this.groupViews=new Map,this.mostRecentActiveGroups=[],this.gridWidgetView=this._register(new T),this.enforcedPartOptions=[],this._partOptions=(0,o.getEditorPartOptions)(this.configurationService,this.themeService),this.sideGroup={openEditor:(P,V)=>{const[z]=this.instantiationService.invokeFunction(U=>(0,E.findGroup)(U,{editor:P,options:V},y.SIDE_GROUP));return z.openEditor(P,V)}},this._isReady=!1,this.whenReadyPromise=new b.DeferredPromise,this.whenReady=this.whenReadyPromise.p,this.whenRestoredPromise=new b.DeferredPromise,this.whenRestored=this.whenRestoredPromise.p,this.priority=2,this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(F=>this.onConfigurationUpdated(F))),this._register(this.themeService.onDidFileIconThemeChange(()=>this.handleChangedPartOptions()))}onConfigurationUpdated(F){(0,o.impactsEditorPartOptions)(F)&&this.handleChangedPartOptions()}handleChangedPartOptions(){const F=this._partOptions,L=(0,o.getEditorPartOptions)(this.configurationService,this.themeService);for(const M of this.enforcedPartOptions)Object.assign(L,M);this._partOptions=L,this._onDidChangeEditorPartOptions.fire({oldPartOptions:F,newPartOptions:L})}get partOptions(){return this._partOptions}enforcePartOptions(F){return this.enforcedPartOptions.push(F),this.handleChangedPartOptions(),(0,S.toDisposable)(()=>{this.enforcedPartOptions.splice(this.enforcedPartOptions.indexOf(F),1),this.handleChangedPartOptions()})}get contentDimension(){return this._contentDimension}get activeGroup(){return this._activeGroup}get groups(){return Array.from(this.groupViews.values())}get count(){return this.groupViews.size}get orientation(){return this.gridWidget&&this.gridWidget.orientation===0?1:0}get isReady(){return this._isReady}get hasRestorableState(){return!!this.workspaceMemento[Si.EDITOR_PART_UI_STATE_STORAGE_KEY]}getGroups(F=0){switch(F){case 0:return this.groups;case 1:{const L=(0,C.coalesce)(this.mostRecentActiveGroups.map(M=>this.getGroup(M)));return(0,C.distinct)([...L,...this.groups])}case 2:{const L=[];return this.gridWidget&&this.fillGridNodes(L,this.gridWidget.getViews()),L}}}fillGridNodes(F,L){(0,w.isGridBranchNode)(L)?L.children.forEach(M=>this.fillGridNodes(F,M)):F.push(L.view)}getGroup(F){return this.groupViews.get(F)}findGroup(F,L=this.activeGroup,M){if(typeof F.direction=="number")return this.doFindGroupByDirection(F.direction,L,M);if(typeof F.location=="number")return this.doFindGroupByLocation(F.location,L,M);throw new Error("invalid arguments")}doFindGroupByDirection(F,L,M){const N=this.assertGroupView(L),B=this.gridWidget.getNeighborViews(N,this.toGridViewDirection(F),M);return B.sort((P,V)=>this.mostRecentActiveGroups.indexOf(P.id)-this.mostRecentActiveGroups.indexOf(V.id)),B[0]}doFindGroupByLocation(F,L,M){const N=this.assertGroupView(L),B=this.getGroups(2),P=B.indexOf(N);switch(F){case 0:return B[0];case 1:return B[B.length-1];case 2:{let V=B[P+1];return!V&&M&&(V=this.doFindGroupByLocation(0,L)),V}case 3:{let V=B[P-1];return!V&&M&&(V=this.doFindGroupByLocation(1,L)),V}}}activateGroup(F){const L=this.assertGroupView(F);return this.doSetGroupActive(L),this._onDidActivateGroup.fire(L),L}restoreGroup(F){const L=this.assertGroupView(F);return this.doRestoreGroup(L),L}getSize(F){const L=this.assertGroupView(F);return this.gridWidget.getViewSize(L)}setSize(F,L){const M=this.assertGroupView(F);this.gridWidget.resizeView(M,L)}arrangeGroups(F,L=this.activeGroup){if(!(this.count<2)&&!!this.gridWidget)switch(F){case 1:this.gridWidget.distributeViewSizes();break;case 0:this.gridWidget.maximizeViewSize(L);break;case 2:this.isGroupMaximized(L)?this.arrangeGroups(1):this.arrangeGroups(0);break}}isGroupMaximized(F){for(const L of this.groups)if(L!==F&&!L.isMinimized)return!1;return!0}setGroupOrientation(F){if(!this.gridWidget)return;const L=F===0?1:0;this.gridWidget.orientation!==L&&(this.gridWidget.orientation=L)}applyLayout(F){const L=this.shouldRestoreFocus(this.container);let M=0;function N(z){for(const U of z)Array.isArray(U.groups)?N(U.groups):M++}N(F.groups);let B=this.getGroups(2);if(M<B.length){const z=B[M-1];B.forEach((U,H)=>{H>=M&&this.mergeGroup(U,z)}),B=this.getGroups(2)}const P=this.activeGroup,V=(0,w.createSerializedGrid)({orientation:this.toGridViewOrientation(F.orientation,this.isTwoDimensionalGrid()?this.gridWidget.orientation:(0,w.orthogonal)(this.gridWidget.orientation)),groups:F.groups});this.doCreateGridControlWithState(V,P.id,B),this.doLayout(this._contentDimension,0,0),this.updateContainer();for(const z of this.getGroups(2))B.includes(z)||this._onDidAddGroup.fire(z);this.notifyGroupIndexChange(),L&&this._activeGroup.focus()}shouldRestoreFocus(F){if(!F)return!1;const L=document.activeElement;return L===document.body?!0:(0,_.isAncestor)(L,F)}isTwoDimensionalGrid(){const F=this.gridWidget.getViews();return(0,w.isGridBranchNode)(F)?F.children.some(L=>(0,w.isGridBranchNode)(L)):!1}addGroup(F,L,M){const N=this.assertGroupView(F),B=this.doAddGroup(N,L);return M?.activate&&this.doSetGroupActive(B),B}doAddGroup(F,L,M){const N=this.doCreateGroupView(M);return this.gridWidget.addView(N,this.getSplitSizingStyle(),F,this.toGridViewDirection(L)),this.updateContainer(),this._onDidAddGroup.fire(N),this.notifyGroupIndexChange(),N}getSplitSizingStyle(){return this._partOptions.splitSizing==="split"?w.Sizing.Split:w.Sizing.Distribute}doCreateGroupView(F){let L;F instanceof c.EditorGroupView?L=c.EditorGroupView.createCopy(F,this,this.count,this.instantiationService):(0,l.isSerializedEditorGroupModel)(F)?L=c.EditorGroupView.createFromSerialized(F,this,this.count,this.instantiationService):L=c.EditorGroupView.createNew(this,this.count,this.instantiationService),this.groupViews.set(L.id,L);const M=new S.DisposableStore;return M.add(L.onDidFocus(()=>{this.doSetGroupActive(L)})),M.add(L.onDidModelChange(N=>{switch(N.kind){case 2:this._onDidChangeGroupLocked.fire(L);break;case 1:this._onDidChangeGroupIndex.fire(L);break}})),M.add(L.onDidActiveEditorChange(()=>{this.updateContainer()})),A.Event.once(L.onWillDispose)(()=>{(0,S.dispose)(M),this.groupViews.delete(L.id),this.doUpdateMostRecentActive(L)}),L}doSetGroupActive(F){if(this._activeGroup===F)return;const L=this._activeGroup;this._activeGroup=F,this.doUpdateMostRecentActive(F,!0),L&&L.setActive(!1),F.setActive(!0),this.doRestoreGroup(F),this._onDidChangeActiveGroup.fire(F)}doRestoreGroup(F){if(this.gridWidget){const L=this.gridWidget.getViewSize(F);(L.width===F.minimumWidth||L.height===F.minimumHeight)&&this.arrangeGroups(0,F)}}doUpdateMostRecentActive(F,L){const M=this.mostRecentActiveGroups.indexOf(F.id);M!==-1&&this.mostRecentActiveGroups.splice(M,1),L&&this.mostRecentActiveGroups.unshift(F.id)}toGridViewDirection(F){switch(F){case 0:return 0;case 1:return 1;case 2:return 2;case 3:return 3}}toGridViewOrientation(F,L){return typeof F=="number"?F===0?1:0:L}removeGroup(F){const L=this.assertGroupView(F);if(this.count!==1){if(L.isEmpty)return this.doRemoveEmptyGroup(L);this.doRemoveGroupWithEditors(L)}}doRemoveGroupWithEditors(F){const L=this.getGroups(1);let M;this._activeGroup===F?M=L[1]:M=L[0],this.mergeGroup(F,M)}doRemoveEmptyGroup(F){const L=this.shouldRestoreFocus(this.container);if(this._activeGroup===F){const N=this.getGroups(1)[1];this.activateGroup(N)}this.gridWidget.removeView(F,this.getSplitSizingStyle()),F.dispose(),L&&this._activeGroup.focus(),this.notifyGroupIndexChange(),this.updateContainer(),this.count===1&&(0,C.firstOrDefault)(this.groups)?.lock(!1),this._onDidRemoveGroup.fire(F)}moveGroup(F,L,M){const N=this.assertGroupView(F),B=this.assertGroupView(L);if(N.id===B.id)throw new Error("Cannot move group into its own");const P=this.shouldRestoreFocus(N.element);return this.gridWidget.moveView(N,this.getSplitSizingStyle(),B,this.toGridViewDirection(M)),P&&N.focus(),this._onDidMoveGroup.fire(N),this.notifyGroupIndexChange(),N}copyGroup(F,L,M){const N=this.assertGroupView(F),B=this.assertGroupView(L),P=this.shouldRestoreFocus(N.element),V=this.doAddGroup(B,M,N);return P&&V.focus(),V}mergeGroup(F,L,M){const N=this.assertGroupView(F),B=this.assertGroupView(L),P=[];let V=M&&typeof M.index=="number"?M.index:B.count;for(const z of N.editors){const U=!N.isActive(z)||this._activeGroup!==N,K={index:N.isSticky(z)?void 0:V,inactive:U,preserveFocus:U};P.push({editor:z,options:K}),V++}return M?.mode===0?N.copyEditors(P,B):N.moveEditors(P,B),N.isEmpty&&!N.disposed&&this.removeGroup(N),B}mergeAllGroups(F=this.activeGroup){for(const L of this.getGroups(1))L!==F&&this.mergeGroup(L,F);return F}assertGroupView(F){let L;if(typeof F=="number"?L=this.getGroup(F):L=F,!L)throw new Error("Invalid editor group provided!");return L}createEditorDropTarget(F,L){return this.instantiationService.createInstance(r.EditorDropTarget,this,F,L)}get minimumWidth(){return Math.min(this.centeredLayoutWidget.minimumWidth,this.layoutService.getMaximumEditorDimensions().width)}get maximumWidth(){return this.centeredLayoutWidget.maximumWidth}get minimumHeight(){return Math.min(this.centeredLayoutWidget.minimumHeight,this.layoutService.getMaximumEditorDimensions().height)}get maximumHeight(){return this.centeredLayoutWidget.maximumHeight}get snap(){return this.layoutService.getPanelAlignment()==="center"}get onDidChange(){return A.Event.any(this.centeredLayoutWidget.onDidChange,this.onDidSetGridWidget.event)}get gridSeparatorBorder(){return this.theme.getColor(v.EDITOR_GROUP_BORDER)||this.theme.getColor(k.contrastBorder)||u.Color.transparent}updateStyles(){const F=(0,d.assertIsDefined)(this.container);F.style.backgroundColor=this.getColor(k.editorBackground)||"";const L={separatorBorder:this.gridSeparatorBorder,background:this.theme.getColor(v.EDITOR_PANE_BACKGROUND)||u.Color.transparent};this.gridWidget.style(L),this.centeredLayoutWidget.styles(L)}createContentArea(F,L){return this.element=F,this.container=document.createElement("div"),this.container.classList.add("content"),F.appendChild(this.container),this.doCreateGridControl(L),this.centeredLayoutWidget=this._register(new a.CenteredViewLayout(this.container,this.gridWidgetView,this.globalMemento[Si.EDITOR_PART_CENTERED_VIEW_STORAGE_KEY])),this.setupDragAndDropSupport(F,this.container),this.whenReadyPromise.complete(),this._isReady=!0,b.Promises.settled(this.groups.map(M=>M.whenRestored)).finally(()=>{this.whenRestoredPromise.complete()}),this.container}setupDragAndDropSupport(F,L){this._register(this.createEditorDropTarget(L,Object.create(null)));const M=document.createElement("div");M.classList.add("drop-block-overlay"),F.appendChild(M),this._register((0,_.addDisposableGenericMouseDownListener)(M,()=>M.classList.remove("visible"))),this._register(m.CompositeDragAndDropObserver.INSTANCE.registerTarget(this.element,{onDragStart:H=>M.classList.add("visible"),onDragEnd:H=>M.classList.remove("visible")}));let N,B,P,V;const z=H=>{!this.layoutService.isVisible("workbench.parts.panel")&&H===this.layoutService.getPanelPosition()?this.layoutService.setPartHidden(!1,"workbench.parts.panel"):!this.layoutService.isVisible("workbench.parts.auxiliarybar")&&H===(this.layoutService.getSideBarPosition()===1?0:1)&&this.layoutService.setPartHidden(!1,"workbench.parts.auxiliarybar")},U=()=>{N&&(clearTimeout(N),N=void 0),B&&(clearTimeout(B),B=void 0)};this._register(m.CompositeDragAndDropObserver.INSTANCE.registerTarget(M,{onDragOver:H=>{_.EventHelper.stop(H.eventData,!0),H.eventData.dataTransfer&&(H.eventData.dataTransfer.dropEffect="none");const K=M.getBoundingClientRect();let G,q;const Z=100;H.eventData.clientX<K.left+Z&&(G=0),H.eventData.clientX>K.right-Z&&(G=1),H.eventData.clientY>K.bottom-Z&&(q=2),N&&G!==P&&(clearTimeout(N),N=void 0),B&&q!==V&&(clearTimeout(B),B=void 0),!N&&G!==void 0&&(P=G,N=setTimeout(()=>z(G),200)),!B&&q!==void 0&&(V=q,B=setTimeout(()=>z(q),200))},onDragLeave:()=>U(),onDragEnd:()=>U(),onDrop:()=>U()}))}centerLayout(F){this.centeredLayoutWidget.activate(F),this._activeGroup.focus()}isLayoutCentered(){return this.centeredLayoutWidget?this.centeredLayoutWidget.isActive():!1}doCreateGridControl(F){let L=!1;if((!F||F.restorePreviousState)&&(L=!this.doCreateGridControlWithPreviousState()),!this.gridWidget||L){const M=this.doCreateGroupView();this.doSetGridWidget(new w.SerializableGrid(M)),this.doSetGroupActive(M)}this.updateContainer(),this.notifyGroupIndexChange()}doCreateGridControlWithPreviousState(){const F=this.workspaceMemento[Si.EDITOR_PART_UI_STATE_STORAGE_KEY];if(F?.serializedGrid)try{this.mostRecentActiveGroups=F.mostRecentActiveGroups,this.doCreateGridControlWithState(F.serializedGrid,F.activeGroup),this._activeGroup.focus()}catch(L){return(0,n.onUnexpectedError)(new Error(`Error restoring editor grid widget: ${L} (with state: ${JSON.stringify(F)})`)),this.groupViews.forEach(M=>M.dispose()),this.groupViews.clear(),this.mostRecentActiveGroups=[],!1}return!0}doCreateGridControlWithState(F,L,M){let N;M?N=M.slice(0):N=[];const B=[],P=w.SerializableGrid.deserialize(F,{fromJSON:V=>{let z;return N.length>0?z=N.shift():z=this.doCreateGroupView(V),B.push(z),z.id===L&&this.doSetGroupActive(z),z}},{styles:{separatorBorder:this.gridSeparatorBorder}});this._activeGroup||this.doSetGroupActive(B[0]),this.mostRecentActiveGroups.some(V=>!this.getGroup(V))&&(this.mostRecentActiveGroups=B.map(V=>V.id)),this.doSetGridWidget(P)}doSetGridWidget(F){let L={};this.gridWidget&&(L=this.gridWidget.boundarySashes,this.gridWidget.dispose()),this.gridWidget=F,this.gridWidget.boundarySashes=L,this.gridWidgetView.gridWidget=F,this._onDidChangeSizeConstraints.input=F.onDidChange,this.onDidSetGridWidget.fire(void 0)}updateContainer(){(0,d.assertIsDefined)(this.container).classList.toggle("empty",this.isEmpty)}notifyGroupIndexChange(){this.getGroups(2).forEach((F,L)=>F.notifyIndexChanged(L))}get isEmpty(){return this.count===1&&this._activeGroup.isEmpty}setBoundarySashes(F){this.gridWidget.boundarySashes=F,this.centeredLayoutWidget.boundarySashes=F}layout(F,L,M,N){const B=super.layoutContents(F,L).contentSize;this.doLayout(_.Dimension.lift(B),M,N)}doLayout(F,L,M){this._contentDimension=F,this.centeredLayoutWidget.layout(this._contentDimension.width,this._contentDimension.height,L,M),this._onDidLayout.fire(F)}saveState(){if(this.gridWidget){const F={serializedGrid:this.gridWidget.serialize(),activeGroup:this._activeGroup.id,mostRecentActiveGroups:this.mostRecentActiveGroups};this.isEmpty?delete this.workspaceMemento[Si.EDITOR_PART_UI_STATE_STORAGE_KEY]:this.workspaceMemento[Si.EDITOR_PART_UI_STATE_STORAGE_KEY]=F}if(this.centeredLayoutWidget){const F=this.centeredLayoutWidget.state;this.centeredLayoutWidget.isDefault(F)?delete this.globalMemento[Si.EDITOR_PART_CENTERED_VIEW_STORAGE_KEY]:this.globalMemento[Si.EDITOR_PART_CENTERED_VIEW_STORAGE_KEY]=F}super.saveState()}toJSON(){return{type:"workbench.parts.editor"}}dispose(){this.groupViews.forEach(F=>F.dispose()),this.groupViews.clear(),this.gridWidget?.dispose(),super.dispose()}};R.EDITOR_PART_UI_STATE_STORAGE_KEY="editorpart.state",R.EDITOR_PART_CENTERED_VIEW_STORAGE_KEY="editorpart.centeredview",R=Ee([W(0,I.IInstantiationService),W(1,t.IThemeService),W(2,i.IConfigurationService),W(3,s.IStorageService),W(4,h.IWorkbenchLayoutService)],R),e.EditorPart=R;let O=class{constructor(F){this.editorPart=F}createEditorDropTarget(F,L){return this.editorPart.createEditorDropTarget(F,L)}};O=Ee([W(0,D.IEditorGroupsService)],O),(0,g.registerSingleton)(D.IEditorGroupsService,R),(0,g.registerSingleton)(p.IEditorDropService,O)}),define(ne[936],re([1,0,1417,36,17,16,70,80,438,74,7,33,63,43,88,26,675]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveSecondarySideBarToPanelAction=e.MovePanelToSecondarySideBarAction=e.NextPanelViewAction=e.PreviousPanelViewAction=e.SwitchPanelViewAction=e.PlaceHolderToggleCompositePinnedAction=e.PlaceHolderPanelActivityAction=e.PanelActivityAction=e.SetPanelPositionAction=e.PositionPanelActionConfigs=e.TogglePanelAction=void 0;const s=(0,o.registerIcon)("panel-maximize",C.Codicon.chevronUp,(0,t.localize)(0,null)),l=(0,o.registerIcon)("panel-restore",C.Codicon.chevronDown,(0,t.localize)(1,null)),r=(0,o.registerIcon)("panel-close",C.Codicon.close,(0,t.localize)(2,null)),p=(0,o.registerIcon)("panel-layout-icon",C.Codicon.layoutPanel,(0,t.localize)(3,null));let u=class extends f.Action{constructor(H,K,G){super(H,K,G.isVisible("workbench.parts.panel")?"panel expanded":"panel");this.layoutService=G}async run(){this.layoutService.setPartHidden(this.layoutService.isVisible("workbench.parts.panel"),"workbench.parts.panel")}};u.ID="workbench.action.togglePanel",u.LABEL=(0,t.localize)(4,null),u=Ee([W(2,D.IWorkbenchLayoutService)],u),e.TogglePanelAction=u;let a=class extends f.Action{constructor(H,K,G,q){super(H,K);this.paneCompositeService=G,this.layoutService=q}async run(){this.layoutService.isVisible("workbench.parts.panel")||this.layoutService.setPartHidden(!1,"workbench.parts.panel");let H=this.paneCompositeService.getActivePaneComposite(1);H&&H.focus()}};a.ID="workbench.action.focusPanel",a.LABEL=(0,t.localize)(5,null),a=Ee([W(2,i.IPaneCompositePartService),W(3,D.IWorkbenchLayoutService)],a);const n={LEFT:"workbench.action.positionPanelLeft",RIGHT:"workbench.action.positionPanelRight",BOTTOM:"workbench.action.positionPanelBottom"},h={LEFT:"workbench.action.alignPanelLeft",RIGHT:"workbench.action.alignPanelRight",CENTER:"workbench.action.alignPanelCenter",JUSTIFY:"workbench.action.alignPanelJustify"};function g(U,H,K,G,q){return{id:U,title:H,shortLabel:K,value:G,when:q}}function d(U,H,K,G){return g(U,H,K,G,w.PanelPositionContext.notEqualsTo((0,D.positionToString)(G)))}function m(U,H,K,G){return g(U,H,K,G,w.PanelAlignmentContext.notEqualsTo(G))}e.PositionPanelActionConfigs=[d(n.LEFT,{value:(0,t.localize)(6,null),original:"Move Panel Left"},(0,t.localize)(7,null),0),d(n.RIGHT,{value:(0,t.localize)(8,null),original:"Move Panel Right"},(0,t.localize)(9,null),1),d(n.BOTTOM,{value:(0,t.localize)(10,null),original:"Move Panel To Bottom"},(0,t.localize)(11,null),2)];const b=[m(h.LEFT,{value:(0,t.localize)(12,null),original:"Set Panel Alignment to Left"},(0,t.localize)(13,null),"left"),m(h.RIGHT,{value:(0,t.localize)(14,null),original:"Set Panel Alignment to Right"},(0,t.localize)(15,null),"right"),m(h.CENTER,{value:(0,t.localize)(16,null),original:"Set Panel Alignment to Center"},(0,t.localize)(17,null),"center"),m(h.JUSTIFY,{value:(0,t.localize)(18,null),original:"Set Panel Alignment to Justify"},(0,t.localize)(19,null),"justify")],E=new Map(e.PositionPanelActionConfigs.map(U=>[U.id,U.value]));let y=class extends f.Action{constructor(H,K,G){super(H,K);this.layoutService=G}async run(){const H=E.get(this.id);this.layoutService.setPanelPosition(H===void 0?2:H)}};y=Ee([W(2,D.IWorkbenchLayoutService)],y),e.SetPanelPositionAction=y,A.MenuRegistry.appendMenuItem(A.MenuId.MenubarAppearanceMenu,{submenu:A.MenuId.MenubarPanelPositionMenu,title:(0,t.localize)(20,null),group:"3_workbench_layout_move",order:4}),e.PositionPanelActionConfigs.forEach(U=>{const{id:H,title:K,shortLabel:G,value:q,when:Z}=U;(0,A.registerAction2)(class extends A.Action2{constructor(){super({id:H,title:K,category:k.CATEGORIES.View,f1:!0})}run(j){j.get(D.IWorkbenchLayoutService).setPanelPosition(q===void 0?2:q)}}),A.MenuRegistry.appendMenuItem(A.MenuId.MenubarPanelPositionMenu,{command:{id:H,title:G,toggled:Z.negate()},order:5})}),A.MenuRegistry.appendMenuItem(A.MenuId.MenubarAppearanceMenu,{submenu:A.MenuId.MenubarPanelAlignmentMenu,title:(0,t.localize)(21,null),group:"3_workbench_layout_move",order:5}),b.forEach(U=>{const{id:H,title:K,shortLabel:G,value:q,when:Z}=U;(0,A.registerAction2)(class extends A.Action2{constructor(){super({id:H,title:K,category:k.CATEGORIES.View,toggled:Z.negate(),f1:!0})}run(j){j.get(D.IWorkbenchLayoutService).setPanelAlignment(q===void 0?"center":q)}}),A.MenuRegistry.appendMenuItem(A.MenuId.MenubarPanelAlignmentMenu,{command:{id:H,title:G,toggled:Z.negate()},order:5})});let T=class extends I.ActivityAction{constructor(H,K,G){super(H);this.viewContainerLocation=K,this.paneCompositeService=G}async run(){await this.paneCompositeService.openPaneComposite(this.activity.id,this.viewContainerLocation,!0),this.activate()}setActivity(H){this.activity=H}};T=Ee([W(2,i.IPaneCompositePartService)],T),e.PanelActivityAction=T;let R=class extends T{constructor(H,K,G){super({id:H,name:H},K,G)}};R=Ee([W(2,i.IPaneCompositePartService)],R),e.PlaceHolderPanelActivityAction=R;class O extends I.ToggleCompositePinnedAction{constructor(H,K){super({id:H,name:H,cssClass:void 0},K)}setActivity(H){this.label=H.name}}e.PlaceHolderToggleCompositePinnedAction=O;let x=class extends f.Action{constructor(H,K,G){super(H,K);this.paneCompositeService=G}async run(H){const K=this.paneCompositeService.getPinnedPaneCompositeIds(1),G=this.paneCompositeService.getActivePaneComposite(1);if(!G)return;let q;for(let Z=0;Z<K.length;Z++)if(K[Z]===G.getId()){q=K[(Z+K.length+H)%K.length];break}typeof q=="string"&&await this.paneCompositeService.openPaneComposite(q,1,!0)}};x=Ee([W(2,i.IPaneCompositePartService)],x),e.SwitchPanelViewAction=x;let F=class extends x{constructor(H,K,G){super(H,K,G)}run(){return super.run(-1)}};F.ID="workbench.action.previousPanelView",F.LABEL=(0,t.localize)(22,null),F=Ee([W(2,i.IPaneCompositePartService)],F),e.PreviousPanelViewAction=F;let L=class extends x{constructor(H,K,G){super(H,K,G)}run(){return super.run(1)}};L.ID="workbench.action.nextPanelView",L.LABEL=(0,t.localize)(23,null),L=Ee([W(2,i.IPaneCompositePartService)],L),e.NextPanelViewAction=L;const M=_.Registry.as(k.Extensions.WorkbenchActions);M.registerWorkbenchAction(A.SyncActionDescriptor.from(u,{primary:2048|40}),"View: Toggle Panel Visibility",k.CATEGORIES.View.value),M.registerWorkbenchAction(A.SyncActionDescriptor.from(a),"View: Focus into Panel",k.CATEGORIES.View.value),M.registerWorkbenchAction(A.SyncActionDescriptor.from(F),"View: Previous Panel View",k.CATEGORIES.View.value),M.registerWorkbenchAction(A.SyncActionDescriptor.from(L),"View: Next Panel View",k.CATEGORIES.View.value),(0,A.registerAction2)(class extends A.Action2{constructor(){super({id:"workbench.action.toggleMaximizedPanel",title:{value:(0,t.localize)(24,null),original:"Toggle Maximized Panel"},tooltip:(0,t.localize)(25,null),category:k.CATEGORIES.View,f1:!0,icon:s,precondition:v.ContextKeyExpr.or(w.PanelAlignmentContext.isEqualTo("center"),w.PanelPositionContext.notEqualsTo("bottom")),toggled:{condition:w.PanelMaximizedContext,icon:l,tooltip:(0,t.localize)(26,null)},menu:[{id:A.MenuId.PanelTitle,group:"navigation",order:1,when:v.ContextKeyExpr.or(w.PanelAlignmentContext.isEqualTo("center"),w.PanelPositionContext.notEqualsTo("bottom"))}]})}run(U){const H=U.get(D.IWorkbenchLayoutService),K=U.get(S.INotificationService);if(H.getPanelAlignment()!=="center"&&H.getPanelPosition()===2){K.warn((0,t.localize)(27,null));return}H.isVisible("workbench.parts.panel")?H.toggleMaximizedPanel():(H.setPartHidden(!1,"workbench.parts.panel"),H.isPanelMaximized()||H.toggleMaximizedPanel())}}),(0,A.registerAction2)(class extends A.Action2{constructor(){super({id:"workbench.action.closePanel",title:{value:(0,t.localize)(28,null),original:"Close Panel"},category:k.CATEGORIES.View,icon:r,menu:[{id:A.MenuId.CommandPalette,when:w.PanelVisibleContext},{id:A.MenuId.PanelTitle,group:"navigation",order:2}]})}run(U){U.get(D.IWorkbenchLayoutService).setPartHidden(!0,"workbench.parts.panel")}}),(0,A.registerAction2)(class extends A.Action2{constructor(){super({id:"workbench.action.closeAuxiliaryBar",title:{value:(0,t.localize)(29,null),original:"Close Secondary Side Bar"},category:k.CATEGORIES.View,icon:r,menu:[{id:A.MenuId.CommandPalette,when:w.AuxiliaryBarVisibleContext},{id:A.MenuId.AuxiliaryBarTitle,group:"navigation",order:2}]})}run(U){U.get(D.IWorkbenchLayoutService).setPartHidden(!0,"workbench.parts.auxiliarybar")}}),A.MenuRegistry.appendMenuItems([{id:A.MenuId.MenubarAppearanceMenu,item:{group:"2_workbench_layout",command:{id:u.ID,title:(0,t.localize)(30,null),toggled:w.PanelVisibleContext},order:5}},{id:A.MenuId.LayoutControlMenuSubmenu,item:{group:"0_workbench_layout",command:{id:u.ID,title:(0,t.localize)(31,null),toggled:w.PanelVisibleContext},order:4}},{id:A.MenuId.LayoutControlMenu,item:{group:"0_workbench_toggles",command:{id:u.ID,title:(0,t.localize)(32,null),icon:p,toggled:w.PanelVisibleContext},when:v.ContextKeyExpr.or(v.ContextKeyExpr.equals("config.workbench.layoutControl.type","toggles"),v.ContextKeyExpr.equals("config.workbench.layoutControl.type","both")),order:1}},{id:A.MenuId.ViewTitleContext,item:{group:"3_workbench_layout_move",command:{id:u.ID,title:{value:(0,t.localize)(33,null),original:"Hide Panel"}},when:v.ContextKeyExpr.and(w.PanelVisibleContext,v.ContextKeyExpr.equals("viewLocation",(0,c.ViewContainerLocationToString)(1))),order:2}}]);class N extends A.Action2{constructor(H,K,G){super(G);this.source=H,this.destination=K}run(H,...K){const G=H.get(c.IViewDescriptorService),q=H.get(D.IWorkbenchLayoutService),Z=H.get(c.IViewsService),j=G.getViewContainersByLocation(this.source),X=G.getViewContainersByLocation(this.destination);if(j.length){const Y=Z.getVisibleViewContainer(this.source);j.forEach($=>G.moveViewContainerToLocation($,this.destination)),q.setPartHidden(!1,this.destination===1?"workbench.parts.panel":"workbench.parts.auxiliarybar"),Y&&X.length===0&&Z.openViewContainer(Y.id,!0)}}}class B extends N{constructor(){super(1,2,{id:B.ID,title:{value:(0,t.localize)(34,null),original:"Move Panel Views To Secondary Side Bar"},category:k.CATEGORIES.View,f1:!1})}}B.ID="workbench.action.movePanelToSidePanel";class P extends N{constructor(){super(1,2,{id:P.ID,title:{value:(0,t.localize)(35,null),original:"Move Panel Views To Secondary Side Bar"},category:k.CATEGORIES.View,f1:!0})}}e.MovePanelToSecondarySideBarAction=P,P.ID="workbench.action.movePanelToSecondarySideBar",(0,A.registerAction2)(B),(0,A.registerAction2)(P);class V extends N{constructor(){super(2,1,{id:V.ID,title:{value:(0,t.localize)(36,null),original:"Move Secondary Side Bar Views To Panel"},category:k.CATEGORIES.View,f1:!1})}}V.ID="workbench.action.moveSidePanelToPanel";class z extends N{constructor(){super(2,1,{id:z.ID,title:{value:(0,t.localize)(37,null),original:"Move Secondary Side Bar Views To Panel"},category:k.CATEGORIES.View,f1:!0})}}e.MoveSecondarySideBarToPanelAction=z,z.ID="workbench.action.moveSecondarySideBarToPanel",(0,A.registerAction2)(V),(0,A.registerAction2)(z)}),define(ne[510],re([1,0,1371,81,16,70,8,80,5,97,14,141,94,7,43,53,54,88,887,936,28,74,33,2,63]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleStatusbarVisibilityAction=e.ToggleSidebarPositionAction=e.ToggleActivityBarVisibilityAction=void 0;const d=(0,g.registerIcon)("menuBar",n.Codicon.layoutMenubar,(0,t.localize)(0,null)),m=(0,g.registerIcon)("activity-bar-left",n.Codicon.layoutActivitybarLeft,(0,t.localize)(1,null)),b=(0,g.registerIcon)("activity-bar-right",n.Codicon.layoutActivitybarRight,(0,t.localize)(2,null)),E=(0,g.registerIcon)("panel-left",n.Codicon.layoutSidebarLeft,(0,t.localize)(3,null)),y=(0,g.registerIcon)("panel-right",n.Codicon.layoutSidebarRight,(0,t.localize)(4,null)),T=(0,g.registerIcon)("panel-bottom",n.Codicon.layoutPanel,(0,t.localize)(5,null)),R=(0,g.registerIcon)("statusBar",n.Codicon.layoutStatusbar,(0,t.localize)(6,null)),O=(0,g.registerIcon)("panel-align-left",n.Codicon.layoutPanelLeft,(0,t.localize)(7,null)),x=(0,g.registerIcon)("panel-align-right",n.Codicon.layoutPanelRight,(0,t.localize)(8,null)),F=(0,g.registerIcon)("panel-align-center",n.Codicon.layoutPanelCenter,(0,t.localize)(9,null)),L=(0,g.registerIcon)("panel-align-justify",n.Codicon.layoutPanelJustify,(0,t.localize)(10,null)),M=(0,g.registerIcon)("fullscreen",n.Codicon.screenFull,(0,t.localize)(11,null)),N=(0,g.registerIcon)("centerLayoutIcon",n.Codicon.layoutCentered,(0,t.localize)(12,null)),B=(0,g.registerIcon)("zenMode",n.Codicon.target,(0,t.localize)(13,null));(0,_.registerAction2)(class extends _.Action2{constructor(){super({id:"workbench.action.closeSidebar",title:{value:(0,t.localize)(14,null),original:"Close Primary Side Bar"},category:A.CATEGORIES.View,f1:!0})}run(be){be.get(D.IWorkbenchLayoutService).setPartHidden(!0,"workbench.parts.sidebar")}});class P extends _.Action2{constructor(){super({id:P.ID,title:{value:(0,t.localize)(15,null),mnemonicTitle:(0,t.localize)(16,null),original:"Toggle Activity Bar Visibility"},category:A.CATEGORIES.View,f1:!0,toggled:c.ContextKeyExpr.equals("config.workbench.activityBar.visible",!0),menu:[{id:_.MenuId.MenubarAppearanceMenu,group:"2_workbench_layout",order:4}]})}run(Ce){const ve=Ce.get(D.IWorkbenchLayoutService),he=Ce.get(k.IConfigurationService),de=!ve.isVisible("workbench.parts.activitybar");he.updateValue(P.activityBarVisibleKey,de)}}e.ToggleActivityBarVisibilityAction=P,P.ID="workbench.action.toggleActivityBarVisibility",P.activityBarVisibleKey="workbench.activityBar.visible",(0,_.registerAction2)(P),(0,_.registerAction2)(class extends _.Action2{constructor(){super({id:"workbench.action.toggleCenteredLayout",title:{value:(0,t.localize)(17,null),mnemonicTitle:(0,t.localize)(18,null),original:"Toggle Centered Layout"},category:A.CATEGORIES.View,f1:!0,toggled:a.IsCenteredLayoutContext,menu:[{id:_.MenuId.MenubarAppearanceMenu,group:"1_toggle_view",order:3}]})}run(be){const Ce=be.get(D.IWorkbenchLayoutService);Ce.centerEditorLayout(!Ce.isEditorLayoutCentered())}});const V="workbench.sideBar.location";class z extends _.Action2{constructor(Ce,ve,he){super({id:Ce,title:ve,f1:!1});this.position=he}async run(Ce){const ve=Ce.get(D.IWorkbenchLayoutService),he=Ce.get(k.IConfigurationService);if(ve.getSideBarPosition()!==this.position)return he.updateValue(V,(0,D.positionToString)(this.position))}}class U extends z{constructor(){super(U.ID,{value:(0,t.localize)(19,null),original:"Move Primary Side Bar Right"},1)}}U.ID="workbench.action.moveSideBarRight";class H extends z{constructor(){super(H.ID,{value:(0,t.localize)(20,null),original:"Move Primary Side Bar Left"},0)}}H.ID="workbench.action.moveSideBarLeft",(0,_.registerAction2)(U),(0,_.registerAction2)(H);class K extends _.Action2{constructor(){super({id:K.ID,title:{value:(0,t.localize)(24,null),original:"Toggle Primary Side Bar Position"},category:A.CATEGORIES.View,f1:!0})}static getLabel(Ce){return Ce.getSideBarPosition()===0?(0,t.localize)(22,null):(0,t.localize)(23,null)}run(Ce){const ve=Ce.get(D.IWorkbenchLayoutService),he=Ce.get(k.IConfigurationService),de=ve.getSideBarPosition()===0?"right":"left";return he.updateValue(V,de)}}e.ToggleSidebarPositionAction=K,K.ID="workbench.action.toggleSidebarPosition",K.LABEL=(0,t.localize)(21,null),(0,_.registerAction2)(K);const G=(0,g.registerIcon)("configure-layout-icon",n.Codicon.layout,(0,t.localize)(25,null));_.MenuRegistry.appendMenuItem(_.MenuId.LayoutControlMenu,{submenu:_.MenuId.LayoutControlMenuSubmenu,title:(0,t.localize)(26,null),icon:G,group:"1_workbench_layout",when:c.ContextKeyExpr.equals("config.workbench.layoutControl.type","menu")}),_.MenuRegistry.appendMenuItems([{id:_.MenuId.ViewContainerTitleContext,item:{group:"3_workbench_layout_move",command:{id:K.ID,title:(0,t.localize)(27,null)},when:c.ContextKeyExpr.and(c.ContextKeyExpr.notEquals("config.workbench.sideBar.location","right"),c.ContextKeyExpr.equals("viewContainerLocation",(0,i.ViewContainerLocationToString)(0))),order:1}},{id:_.MenuId.ViewTitleContext,item:{group:"3_workbench_layout_move",command:{id:K.ID,title:(0,t.localize)(28,null)},when:c.ContextKeyExpr.and(c.ContextKeyExpr.notEquals("config.workbench.sideBar.location","right"),c.ContextKeyExpr.equals("viewLocation",(0,i.ViewContainerLocationToString)(0))),order:1}},{id:_.MenuId.ViewContainerTitleContext,item:{group:"3_workbench_layout_move",command:{id:K.ID,title:(0,t.localize)(29,null)},when:c.ContextKeyExpr.and(c.ContextKeyExpr.equals("config.workbench.sideBar.location","right"),c.ContextKeyExpr.equals("viewContainerLocation",(0,i.ViewContainerLocationToString)(0))),order:1}},{id:_.MenuId.ViewTitleContext,item:{group:"3_workbench_layout_move",command:{id:K.ID,title:(0,t.localize)(30,null)},when:c.ContextKeyExpr.and(c.ContextKeyExpr.equals("config.workbench.sideBar.location","right"),c.ContextKeyExpr.equals("viewLocation",(0,i.ViewContainerLocationToString)(0))),order:1}},{id:_.MenuId.ViewTitleContext,item:{group:"3_workbench_layout_move",command:{id:K.ID,title:(0,t.localize)(31,null)},when:c.ContextKeyExpr.and(c.ContextKeyExpr.notEquals("config.workbench.sideBar.location","right"),c.ContextKeyExpr.equals("viewLocation",(0,i.ViewContainerLocationToString)(2))),order:1}},{id:_.MenuId.ViewTitleContext,item:{group:"3_workbench_layout_move",command:{id:K.ID,title:(0,t.localize)(32,null)},when:c.ContextKeyExpr.and(c.ContextKeyExpr.equals("config.workbench.sideBar.location","right"),c.ContextKeyExpr.equals("viewLocation",(0,i.ViewContainerLocationToString)(2))),order:1}}]),_.MenuRegistry.appendMenuItem(_.MenuId.MenubarAppearanceMenu,{group:"3_workbench_layout_move",command:{id:K.ID,title:(0,t.localize)(33,null)},when:c.ContextKeyExpr.notEquals("config.workbench.sideBar.location","right"),order:2}),_.MenuRegistry.appendMenuItem(_.MenuId.MenubarAppearanceMenu,{group:"3_workbench_layout_move",command:{id:K.ID,title:(0,t.localize)(34,null)},when:c.ContextKeyExpr.equals("config.workbench.sideBar.location","right"),order:2}),(0,_.registerAction2)(class extends _.Action2{constructor(){super({id:"workbench.action.toggleEditorVisibility",title:{value:(0,t.localize)(35,null),mnemonicTitle:(0,t.localize)(36,null),original:"Toggle Editor Area Visibility"},category:A.CATEGORIES.View,f1:!0,toggled:a.EditorAreaVisibleContext})}run(be){be.get(D.IWorkbenchLayoutService).toggleMaximizedPanel()}}),_.MenuRegistry.appendMenuItem(_.MenuId.MenubarViewMenu,{group:"2_appearance",title:(0,t.localize)(37,null),submenu:_.MenuId.MenubarAppearanceMenu,order:1});class q extends _.Action2{constructor(){super({id:q.ID,title:{value:(0,t.localize)(38,null),original:"Toggle Primary Side Bar Visibility"},category:A.CATEGORIES.View,f1:!0,keybinding:{weight:200,primary:2048|32}})}run(Ce){const ve=Ce.get(D.IWorkbenchLayoutService);ve.setPartHidden(ve.isVisible("workbench.parts.sidebar"),"workbench.parts.sidebar")}}q.ID="workbench.action.toggleSidebarVisibility",(0,_.registerAction2)(q),_.MenuRegistry.appendMenuItems([{id:_.MenuId.ViewContainerTitleContext,item:{group:"3_workbench_layout_move",command:{id:q.ID,title:(0,t.localize)(39,null)},when:c.ContextKeyExpr.and(a.SideBarVisibleContext,c.ContextKeyExpr.equals("viewContainerLocation",(0,i.ViewContainerLocationToString)(0))),order:2}},{id:_.MenuId.ViewTitleContext,item:{group:"3_workbench_layout_move",command:{id:q.ID,title:(0,t.localize)(40,null)},when:c.ContextKeyExpr.and(a.SideBarVisibleContext,c.ContextKeyExpr.equals("viewLocation",(0,i.ViewContainerLocationToString)(0))),order:2}},{id:_.MenuId.MenubarAppearanceMenu,item:{group:"2_workbench_layout",command:{id:q.ID,title:(0,t.localize)(41,null),toggled:a.SideBarVisibleContext},order:1}},{id:_.MenuId.LayoutControlMenuSubmenu,item:{group:"0_workbench_layout",command:{id:q.ID,title:(0,t.localize)(42,null),toggled:a.SideBarVisibleContext},order:0}},{id:_.MenuId.LayoutControlMenu,item:{group:"0_workbench_toggles",command:{id:q.ID,title:(0,t.localize)(43,null),icon:E,toggled:a.SideBarVisibleContext},when:c.ContextKeyExpr.and(c.ContextKeyExpr.or(c.ContextKeyExpr.equals("config.workbench.layoutControl.type","toggles"),c.ContextKeyExpr.equals("config.workbench.layoutControl.type","both")),c.ContextKeyExpr.equals("config.workbench.sideBar.location","left")),order:0}},{id:_.MenuId.LayoutControlMenu,item:{group:"0_workbench_toggles",command:{id:q.ID,title:(0,t.localize)(44,null),icon:y,toggled:a.SideBarVisibleContext},when:c.ContextKeyExpr.and(c.ContextKeyExpr.or(c.ContextKeyExpr.equals("config.workbench.layoutControl.type","toggles"),c.ContextKeyExpr.equals("config.workbench.layoutControl.type","both")),c.ContextKeyExpr.equals("config.workbench.sideBar.location","right")),order:2}}]);class Z extends _.Action2{constructor(){super({id:Z.ID,title:{value:(0,t.localize)(45,null),mnemonicTitle:(0,t.localize)(46,null),original:"Toggle Status Bar Visibility"},category:A.CATEGORIES.View,f1:!0,toggled:c.ContextKeyExpr.equals("config.workbench.statusBar.visible",!0),menu:[{id:_.MenuId.MenubarAppearanceMenu,group:"2_workbench_layout",order:3}]})}run(Ce){const ve=Ce.get(D.IWorkbenchLayoutService),he=Ce.get(k.IConfigurationService),de=!ve.isVisible("workbench.parts.statusbar");return he.updateValue(Z.statusbarVisibleKey,de)}}e.ToggleStatusbarVisibilityAction=Z,Z.ID="workbench.action.toggleStatusbarVisibility",Z.statusbarVisibleKey="workbench.statusBar.visible",(0,_.registerAction2)(Z),(0,_.registerAction2)(class extends _.Action2{constructor(){super({id:"workbench.action.toggleTabsVisibility",title:{value:(0,t.localize)(47,null),original:"Toggle Tab Visibility"},category:A.CATEGORIES.View,f1:!0,keybinding:{weight:200,primary:void 0,mac:{primary:2048|256|53},linux:{primary:2048|256|53}}})}run(be){const Ce=be.get(k.IConfigurationService),he=!Ce.getValue("workbench.editor.showTabs");return Ce.updateValue("workbench.editor.showTabs",he)}}),(0,_.registerAction2)(class extends _.Action2{constructor(){super({id:"workbench.action.toggleZenMode",title:{value:(0,t.localize)(48,null),mnemonicTitle:(0,t.localize)(49,null),original:"Toggle Zen Mode"},category:A.CATEGORIES.View,f1:!0,keybinding:{weight:200,primary:(0,w.KeyChord)(2048|41,56)},toggled:a.InEditorZenModeContext,menu:[{id:_.MenuId.MenubarAppearanceMenu,group:"1_toggle_view",order:2}]})}run(be){return be.get(D.IWorkbenchLayoutService).toggleZenMode()}}),o.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.exitZenMode",weight:100-1e3,handler(be){const Ce=be.get(D.IWorkbenchLayoutService),ve=be.get(c.IContextKeyService);a.InEditorZenModeContext.getValue(ve)&&Ce.toggleZenMode()},when:a.InEditorZenModeContext,primary:(0,w.KeyChord)(9,9)}),(v.isWindows||v.isLinux||v.isWeb)&&(0,_.registerAction2)(class extends _.Action2{constructor(){super({id:"workbench.action.toggleMenuBar",title:{value:(0,t.localize)(50,null),mnemonicTitle:(0,t.localize)(51,null),original:"Toggle Menu Bar"},category:A.CATEGORIES.View,f1:!0,toggled:c.ContextKeyExpr.and(C.IsMacNativeContext.toNegated(),c.ContextKeyExpr.notEquals("config.window.menuBarVisibility","hidden"),c.ContextKeyExpr.notEquals("config.window.menuBarVisibility","toggle"),c.ContextKeyExpr.notEquals("config.window.menuBarVisibility","compact")),menu:[{id:_.MenuId.MenubarAppearanceMenu,group:"2_workbench_layout",order:0}]})}run(Ce){return Ce.get(D.IWorkbenchLayoutService).toggleMenuBar()}}),(0,_.registerAction2)(class extends _.Action2{constructor(){super({id:"workbench.action.resetViewLocations",title:{value:(0,t.localize)(52,null),original:"Reset View Locations"},category:A.CATEGORIES.View,f1:!0})}run(be){return be.get(i.IViewDescriptorService).reset()}}),(0,_.registerAction2)(class extends _.Action2{constructor(){super({id:"workbench.action.moveView",title:{value:(0,t.localize)(53,null),original:"Move View"},category:A.CATEGORIES.View,f1:!0})}async run(be){const Ce=be.get(i.IViewDescriptorService),ve=be.get(I.IInstantiationService),he=be.get(S.IQuickInputService),ge=be.get(c.IContextKeyService),de=be.get(l.IPaneCompositePartService),Se=a.FocusedViewContext.getValue(ge);let we;Se&&Ce.getViewDescriptorById(Se)?.canMoveView&&(we=Se);try{if(we=await this.getView(he,Ce,de,we),!we)return;const ye=new j;ve.invokeFunction(ke=>ye.run(ke,we))}catch{}}getViewItems(be,Ce){const ve=[];return Ce.getVisiblePaneCompositeIds(0).forEach(Se=>{const we=be.getViewContainerById(Se),ye=be.getViewContainerModel(we);let ke=!1;ye.visibleViewDescriptors.forEach(Ie=>{Ie.canMoveView&&(ke||(ve.push({type:"separator",label:(0,t.localize)(54,null,ye.title)}),ke=!0),ve.push({id:Ie.id,label:Ie.name}))})}),Ce.getPinnedPaneCompositeIds(1).forEach(Se=>{const we=be.getViewContainerById(Se),ye=be.getViewContainerModel(we);let ke=!1;ye.visibleViewDescriptors.forEach(Ie=>{Ie.canMoveView&&(ke||(ve.push({type:"separator",label:(0,t.localize)(55,null,ye.title)}),ke=!0),ve.push({id:Ie.id,label:Ie.name}))})}),Ce.getPinnedPaneCompositeIds(2).forEach(Se=>{const we=be.getViewContainerById(Se),ye=be.getViewContainerModel(we);let ke=!1;ye.visibleViewDescriptors.forEach(Ie=>{Ie.canMoveView&&(ke||(ve.push({type:"separator",label:(0,t.localize)(56,null,ye.title)}),ke=!0),ve.push({id:Ie.id,label:Ie.name}))})}),ve}async getView(be,Ce,ve,he){const ge=be.createQuickPick();return ge.placeholder=(0,t.localize)(57,null),ge.items=this.getViewItems(Ce,ve),ge.selectedItems=ge.items.filter(de=>de.id===he),new Promise((de,Se)=>{ge.onDidAccept(()=>{const we=ge.selectedItems[0];we.id?de(we.id):Se(),ge.hide()}),ge.onDidHide(()=>Se()),ge.show()})}});class j extends _.Action2{constructor(){super({id:"workbench.action.moveFocusedView",title:{value:(0,t.localize)(58,null),original:"Move Focused View"},category:A.CATEGORIES.View,precondition:a.FocusedViewContext.notEqualsTo(""),f1:!0})}run(Ce,ve){const he=Ce.get(i.IViewDescriptorService),ge=Ce.get(i.IViewsService),de=Ce.get(S.IQuickInputService),Se=Ce.get(c.IContextKeyService),we=Ce.get(s.IDialogService),ye=Ce.get(l.IPaneCompositePartService),ke=ve||a.FocusedViewContext.getValue(Se);if(ke===void 0||ke.trim()===""){we.show(f.default.Error,(0,t.localize)(59,null));return}const Ie=he.getViewDescriptorById(ke);if(!Ie||!Ie.canMoveView){we.show(f.default.Error,(0,t.localize)(60,null));return}const Te=de.createQuickPick();Te.placeholder=(0,t.localize)(61,null),Te.title=(0,t.localize)(62,null,Ie.name);const De=[],_e=he.getViewContainerByViewId(ke),Re=he.getViewLocationById(ke),Ne=he.getViewContainerModel(_e).allViewDescriptors.length===1;Ne&&Re===1||De.push({id:"_.panel.newcontainer",label:(0,t.localize)(63,null)}),Ne&&Re===0||De.push({id:"_.sidebar.newcontainer",label:(0,t.localize)(64,null)}),Ne&&Re===2||De.push({id:"_.auxiliarybar.newcontainer",label:(0,t.localize)(65,null)}),De.push({type:"separator",label:(0,t.localize)(66,null)});const xe=ye.getVisiblePaneCompositeIds(0);De.push(...xe.filter(Me=>Me===he.getViewContainerByViewId(ke).id?!1:!he.getViewContainerById(Me).rejectAddedViews).map(Me=>({id:Me,label:he.getViewContainerModel(he.getViewContainerById(Me)).title}))),De.push({type:"separator",label:(0,t.localize)(67,null)});const Ae=ye.getPinnedPaneCompositeIds(1);De.push(...Ae.filter(Me=>Me===he.getViewContainerByViewId(ke).id?!1:!he.getViewContainerById(Me).rejectAddedViews).map(Me=>({id:Me,label:he.getViewContainerModel(he.getViewContainerById(Me)).title}))),De.push({type:"separator",label:(0,t.localize)(68,null)});const Le=ye.getPinnedPaneCompositeIds(2);De.push(...Le.filter(Me=>Me===he.getViewContainerByViewId(ke).id?!1:!he.getViewContainerById(Me).rejectAddedViews).map(Me=>({id:Me,label:he.getViewContainerModel(he.getViewContainerById(Me)).title}))),Te.items=De,Te.onDidAccept(()=>{const Me=Te.selectedItems[0];Me.id==="_.panel.newcontainer"?(he.moveViewToLocation(Ie,1),ge.openView(ke,!0)):Me.id==="_.sidebar.newcontainer"?(he.moveViewToLocation(Ie,0),ge.openView(ke,!0)):Me.id==="_.auxiliarybar.newcontainer"?(he.moveViewToLocation(Ie,2),ge.openView(ke,!0)):Me.id&&(he.moveViewsToContainer([Ie],he.getViewContainerById(Me.id)),ge.openView(ke,!0)),Te.hide()}),Te.show()}}(0,_.registerAction2)(j),(0,_.registerAction2)(class extends _.Action2{constructor(){super({id:"workbench.action.resetFocusedViewLocation",title:{value:(0,t.localize)(69,null),original:"Reset Focused View Location"},category:A.CATEGORIES.View,f1:!0,precondition:a.FocusedViewContext.notEqualsTo("")})}run(be){const Ce=be.get(i.IViewDescriptorService),ve=be.get(c.IContextKeyService),he=be.get(s.IDialogService),ge=be.get(i.IViewsService),de=a.FocusedViewContext.getValue(ve);let Se=null;if(de!==void 0&&de.trim()!==""&&(Se=Ce.getViewDescriptorById(de)),!Se){he.show(f.default.Error,(0,t.localize)(70,null));return}const we=Ce.getDefaultContainerById(Se.id);!we||we===Ce.getViewContainerByViewId(Se.id)||(Ce.moveViewsToContainer([Se],we),ge.openView(Se.id,!0))}});class X extends _.Action2{resizePart(Ce,ve,he,ge){let de;if(ge===void 0){const Se=he.hasFocus("workbench.parts.editor"),we=he.hasFocus("workbench.parts.sidebar"),ye=he.hasFocus("workbench.parts.panel"),ke=he.hasFocus("workbench.parts.auxiliarybar");we?de="workbench.parts.sidebar":ye?de="workbench.parts.panel":Se?de="workbench.parts.editor":ke&&(de="workbench.parts.auxiliarybar")}else de=ge;de&&he.resizePart(de,Ce,ve)}}X.RESIZE_INCREMENT=6.5;class Y extends X{constructor(){super({id:"workbench.action.increaseViewSize",title:{value:(0,t.localize)(71,null),original:"Increase Current View Size"},f1:!0})}run(Ce){this.resizePart(X.RESIZE_INCREMENT,X.RESIZE_INCREMENT,Ce.get(D.IWorkbenchLayoutService))}}class $ extends X{constructor(){super({id:"workbench.action.increaseViewWidth",title:{value:(0,t.localize)(72,null),original:"Increase Editor Width"},f1:!0})}run(Ce){this.resizePart(X.RESIZE_INCREMENT,0,Ce.get(D.IWorkbenchLayoutService),"workbench.parts.editor")}}class J extends X{constructor(){super({id:"workbench.action.increaseViewHeight",title:{value:(0,t.localize)(73,null),original:"Increase Editor Height"},f1:!0})}run(Ce){this.resizePart(0,X.RESIZE_INCREMENT,Ce.get(D.IWorkbenchLayoutService),"workbench.parts.editor")}}class ee extends X{constructor(){super({id:"workbench.action.decreaseViewSize",title:{value:(0,t.localize)(74,null),original:"Decrease Current View Size"},f1:!0})}run(Ce){this.resizePart(-X.RESIZE_INCREMENT,-X.RESIZE_INCREMENT,Ce.get(D.IWorkbenchLayoutService))}}class te extends X{constructor(){super({id:"workbench.action.decreaseViewWidth",title:{value:(0,t.localize)(75,null),original:"Decrease Editor Width"},f1:!0})}run(Ce){this.resizePart(-X.RESIZE_INCREMENT,0,Ce.get(D.IWorkbenchLayoutService),"workbench.parts.editor")}}class se extends X{constructor(){super({id:"workbench.action.decreaseViewHeight",title:{value:(0,t.localize)(76,null),original:"Decrease Editor Height"},f1:!0})}run(Ce){this.resizePart(0,-X.RESIZE_INCREMENT,Ce.get(D.IWorkbenchLayoutService),"workbench.parts.editor")}}(0,_.registerAction2)(Y),(0,_.registerAction2)($),(0,_.registerAction2)(J),(0,_.registerAction2)(ee),(0,_.registerAction2)(te),(0,_.registerAction2)(se);function ie(be){return be.iconA!==void 0}const ce=(be,Ce,ve,he)=>({id:be,active:Ce,label:ve,visualIcon:he,activeIcon:n.Codicon.eye,inactiveIcon:n.Codicon.eyeClosed,activeAriaLabel:(0,t.localize)(77,null),inactiveAriaLabel:(0,t.localize)(78,null),useButtons:!0}),le=(be,Ce,ve,he)=>({id:be,active:Ce,label:ve,visualIcon:he,activeIcon:n.Codicon.check,activeAriaLabel:(0,t.localize)(79,null),useButtons:!1}),ae=c.ContextKeyExpr.and(C.IsMacNativeContext.toNegated(),c.ContextKeyExpr.notEquals("config.window.menuBarVisibility","hidden"),c.ContextKeyExpr.notEquals("config.window.menuBarVisibility","toggle"),c.ContextKeyExpr.notEquals("config.window.menuBarVisibility","compact")),ue=[];(!v.isMacintosh||!v.isNative)&&ue.push(ce("workbench.action.toggleMenuBar",ae,(0,t.localize)(80,null),d)),ue.push(ce(P.ID,c.ContextKeyExpr.equals("config.workbench.activityBar.visible",!0),(0,t.localize)(81,null),{whenA:c.ContextKeyExpr.equals("config.workbench.sideBar.location","left"),iconA:m,iconB:b}),ce(q.ID,a.SideBarVisibleContext,(0,t.localize)(82,null),{whenA:c.ContextKeyExpr.equals("config.workbench.sideBar.location","left"),iconA:E,iconB:y}),ce(r.ToggleAuxiliaryBarAction.ID,a.AuxiliaryBarVisibleContext,(0,t.localize)(83,null),{whenA:c.ContextKeyExpr.equals("config.workbench.sideBar.location","left"),iconA:y,iconB:E}),ce(p.TogglePanelAction.ID,a.PanelVisibleContext,(0,t.localize)(84,null),T),ce(Z.ID,c.ContextKeyExpr.equals("config.workbench.statusBar.visible",!0),(0,t.localize)(85,null),R));const oe=[le(H.ID,c.ContextKeyExpr.equals("config.workbench.sideBar.location","left"),(0,t.localize)(86,null),E),le(U.ID,c.ContextKeyExpr.equals("config.workbench.sideBar.location","right"),(0,t.localize)(87,null),y)],fe=[le("workbench.action.alignPanelLeft",a.PanelAlignmentContext.isEqualTo("left"),(0,t.localize)(88,null),O),le("workbench.action.alignPanelRight",a.PanelAlignmentContext.isEqualTo("right"),(0,t.localize)(89,null),x),le("workbench.action.alignPanelCenter",a.PanelAlignmentContext.isEqualTo("center"),(0,t.localize)(90,null),F),le("workbench.action.alignPanelJustify",a.PanelAlignmentContext.isEqualTo("justify"),(0,t.localize)(91,null),L)],pe=[le("workbench.action.toggleFullScreen",a.IsFullscreenContext,(0,t.localize)(92,null),M),le("workbench.action.toggleZenMode",a.InEditorZenModeContext,(0,t.localize)(93,null),B),le("workbench.action.toggleCenteredLayout",a.IsCenteredLayoutContext,(0,t.localize)(94,null),N)],me=new Set;for(const{active:be}of[...ue,...oe,...fe,...pe])for(const Ce of be.keys())me.add(Ce);(0,_.registerAction2)(class extends _.Action2{constructor(){super({id:"workbench.action.customizeLayout",title:(0,t.localize)(95,null),f1:!0,icon:G,menu:[{id:_.MenuId.LayoutControlMenuSubmenu,group:"z_end"},{id:_.MenuId.LayoutControlMenu,when:c.ContextKeyExpr.equals("config.workbench.layoutControl.type","both"),group:"z_end"}]})}getItems(Ce){const ve=he=>{const ge=he.active.evaluate(Ce.getContext(null));let de=he.useButtons?he.label:he.label+(ge&&he.activeIcon?` $(${he.activeIcon.id})`:!ge&&he.inactiveIcon?` $(${he.inactiveIcon.id})`:"");const Se=he.label+(ge&&he.activeAriaLabel?` (${he.activeAriaLabel})`:!ge&&he.inactiveAriaLabel?` (${he.inactiveAriaLabel})`:"");if(he.visualIcon){let we=he.visualIcon;ie(we)&&(we=we.whenA.evaluate(Ce.getContext(null))?we.iconA:we.iconB),de=`$(${we.id}) ${de}`}return{type:"item",id:he.id,label:de,ariaLabel:Se,buttons:he.useButtons?[{alwaysVisible:!1,tooltip:Se,iconClass:ge?he.activeIcon.classNames:he.inactiveIcon?.classNames}]:void 0}};return[{type:"separator",label:(0,t.localize)(96,null)},...ue.map(ve),{type:"separator",label:(0,t.localize)(97,null)},...oe.map(ve),{type:"separator",label:(0,t.localize)(98,null)},...fe.map(ve),{type:"separator",label:(0,t.localize)(99,null)},...pe.map(ve)]}run(Ce){const ve=Ce.get(c.IContextKeyService),he=Ce.get(u.ICommandService),ge=Ce.get(S.IQuickInputService),de=ge.createQuickPick();de.items=this.getItems(ve),de.ignoreFocusOut=!0,de.hideInput=!0,de.title=(0,t.localize)(100,null),de.buttons=[{alwaysVisible:!0,iconClass:n.Codicon.close.classNames,tooltip:(0,t.localize)(101,null)}];const Se=new h.DisposableStore;let we;Se.add(ve.onDidChangeContext(ye=>{ye.affectsSome(me)&&(de.items=this.getItems(ve),we&&(de.activeItems=de.items.filter(ke=>ke.id===we?.id)),setTimeout(()=>ge.focus(),0))})),de.onDidAccept(ye=>{de.selectedItems.length&&(we=de.selectedItems[0],he.executeCommand(we.id))}),de.onDidTriggerItemButton(ye=>{ye.item&&(we=ye.item,he.executeCommand(we.id))}),de.onDidTriggerButton(()=>{de.hide()}),de.onDispose(()=>Se.dispose()),de.show()}})}),define(ne[2750],re([1,0,1382,78,777,353,2744,217,80,5,2,510,12,82,32,934,10,24,40,9,438,43,74,7,13,50,618,8,213,14,33,36,91,63,116,1050]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActivitybarPart=void 0;let L=class jt extends A.Part{constructor(N,B,P,V,z,U,H,K,G,q){super("workbench.parts.activitybar",{hasTitle:!1},V,z,P);this.paneCompositePart=N,this.instantiationService=B,this.storageService=z,this.extensionService=U,this.viewDescriptorService=H,this.contextKeyService=K,this.configurationService=G,this.environmentService=q,this.minimumWidth=48,this.maximumWidth=48,this.minimumHeight=0,this.maximumHeight=Number.POSITIVE_INFINITY,this.globalActivity=[],this.accountsActivity=[],this.compositeActions=new Map,this.viewContainerDisposables=new Map,this.keyboardNavigationDisposables=this._register(new v.DisposableStore),this.location=0,this.hasExtensionsRegistered=!1,this.enabledViewContainersContextKeys=new Map,this._cachedViewContainers=void 0;for(const Z of this.cachedViewContainers)Z.visible=!this.shouldBeHidden(Z.id,Z);this.compositeBar=this.createCompositeBar(),this.onDidRegisterViewContainers(this.getViewContainers()),this.registerListeners()}createCompositeBar(){const N=this.cachedViewContainers.map(B=>({id:B.id,name:B.name,visible:B.visible,order:B.order,pinned:B.pinned}));return this._register(this.instantiationService.createInstance(S.CompositeBar,N,{icon:!0,orientation:1,activityHoverOptions:this.getActivityHoverOptions(),preventLoopNavigation:!0,openComposite:async(B,P)=>await this.paneCompositePart.openPaneComposite(B,!P)??null,getActivityAction:B=>this.getCompositeActions(B).activityAction,getCompositePinnedAction:B=>this.getCompositeActions(B).pinnedAction,getOnCompositeClickAction:B=>(0,R.toAction)({id:B,label:"",run:async()=>this.paneCompositePart.getActivePaneComposite()?.getId()===B?this.paneCompositePart.hideActivePaneComposite():this.paneCompositePart.openPaneComposite(B)}),fillExtraContextMenuActions:(B,P)=>{const V=(0,E.getMenuBarVisibility)(this.configurationService);(V==="compact"||V==="hidden"||V==="toggle")&&B.unshift((0,R.toAction)({id:"toggleMenuVisibility",label:(0,t.localize)(2,null),checked:V==="compact",run:()=>this.configurationService.updateValue("window.menuBarVisibility",V==="compact"?"toggle":"compact")}),new R.Separator),V==="compact"&&this.menuBarContainer&&P?.target&&(0,s.isAncestor)(P.target,this.menuBarContainer)&&B.unshift((0,R.toAction)({id:"hideCompactMenu",label:(0,t.localize)(3,null),run:()=>this.configurationService.updateValue("window.menuBarVisibility","toggle")}),new R.Separator),B.push(new R.Separator),B.push((0,R.toAction)({id:"toggleAccountsVisibility",label:(0,t.localize)(4,null),checked:this.accountsVisibilityPreference,run:()=>this.accountsVisibilityPreference=!this.accountsVisibilityPreference})),B.push(new R.Separator),B.push((0,R.toAction)({id:C.ToggleSidebarPositionAction.ID,label:C.ToggleSidebarPositionAction.getLabel(this.layoutService),run:()=>this.instantiationService.invokeFunction(z=>new C.ToggleSidebarPositionAction().run(z))})),B.push((0,R.toAction)({id:C.ToggleActivityBarVisibilityAction.ID,label:(0,t.localize)(5,null),run:()=>this.instantiationService.invokeFunction(z=>new C.ToggleActivityBarVisibilityAction().run(z))}))},getContextMenuActionsForComposite:B=>this.getContextMenuActionsForComposite(B),getDefaultCompositeId:()=>this.viewDescriptorService.getDefaultViewContainer(this.location)?.id,hidePart:()=>this.layoutService.setPartHidden(!0,"workbench.parts.sidebar"),dndHandler:new S.CompositeDragAndDrop(this.viewDescriptorService,0,async(B,P)=>await this.paneCompositePart.openPaneComposite(B,P)??null,(B,P,V)=>this.compositeBar.move(B,P,V?.verticallyBefore),()=>this.compositeBar.getCompositeBarItems()),compositeSize:52,colors:B=>this.getActivitybarItemColors(B),overflowActionSize:jt.ACTION_HEIGHT}))}getActivityHoverOptions(){return{position:()=>this.layoutService.getSideBarPosition()===0?1:0}}getContextMenuActionsForComposite(N){const B=[],P=this.viewDescriptorService.getViewContainerById(N),V=this.viewDescriptorService.getDefaultViewContainerLocation(P);if(V!==this.viewDescriptorService.getViewContainerLocation(P))B.push((0,R.toAction)({id:"resetLocationAction",label:(0,t.localize)(6,null),run:()=>this.viewDescriptorService.moveViewContainerToLocation(P,V)}));else{const z=this.viewDescriptorService.getViewContainerModel(P);if(z.allViewDescriptors.length===1){const U=z.allViewDescriptors[0],H=this.viewDescriptorService.getDefaultContainerById(U.id);H!==P&&B.push((0,R.toAction)({id:"resetLocationAction",label:(0,t.localize)(7,null),run:()=>this.viewDescriptorService.moveViewsToContainer([U],H)}))}}return B}registerListeners(){this._register(this.viewDescriptorService.onDidChangeViewContainers(({added:B,removed:P})=>this.onDidChangeViewContainers(B,P))),this._register(this.viewDescriptorService.onDidChangeContainerLocation(({viewContainer:B,from:P,to:V})=>this.onDidChangeViewContainerLocation(B,P,V))),this.paneCompositePart.onDidPaneCompositeOpen(B=>this.onDidChangeViewContainerVisibility(B.getId(),!0)),this.paneCompositePart.onDidPaneCompositeClose(B=>this.onDidChangeViewContainerVisibility(B.getId(),!1));let N=this._register(new v.DisposableStore);this._register(this.extensionService.onDidRegisterExtensions(()=>{N.clear(),this.onDidRegisterExtensions(),this.compositeBar.onDidChange(()=>this.saveCachedViewContainers(),this,N),this.storageService.onDidChangeValue(B=>this.onDidStorageValueChange(B),this,N)})),this._register(this.configurationService.onDidChangeConfiguration(B=>{B.affectsConfiguration("window.menuBarVisibility")&&((0,E.getMenuBarVisibility)(this.configurationService)==="compact"?this.installMenubar():this.uninstallMenubar())}))}onDidChangeViewContainers(N,B){B.filter(({location:P})=>P===0).forEach(({container:P})=>this.onDidDeregisterViewContainer(P)),this.onDidRegisterViewContainers(N.filter(({location:P})=>P===0).map(({container:P})=>P))}onDidChangeViewContainerLocation(N,B,P){B===this.location&&this.onDidDeregisterViewContainer(N),P===this.location&&this.onDidRegisterViewContainers([N])}onDidChangeViewContainerVisibility(N,B){B?this.onDidViewContainerVisible(N):this.compositeBar.deactivateComposite(N)}onDidRegisterExtensions(){this.hasExtensionsRegistered=!0;for(const{id:N}of this.cachedViewContainers){const B=this.getViewContainer(N);B?this.showOrHideViewContainer(B):this.viewDescriptorService.isViewContainerRemovedPermanently(N)?this.removeComposite(N):this.hideComposite(N)}this.saveCachedViewContainers()}onDidViewContainerVisible(N){const B=this.getViewContainer(N);B&&(this.addComposite(B),this.compositeBar.activateComposite(B.id),this.shouldBeHidden(B)&&this.viewDescriptorService.getViewContainerModel(B).activeViewDescriptors.length===0&&this.hideComposite(B.id))}showActivity(N,B,P,V){return this.getViewContainer(N)?this.compositeBar.showActivity(N,B,P,V):N===_.GLOBAL_ACTIVITY_ID?this.showGlobalActivity(_.GLOBAL_ACTIVITY_ID,B,P,V):N===_.ACCOUNTS_ACTIVITY_ID?this.showGlobalActivity(_.ACCOUNTS_ACTIVITY_ID,B,P,V):v.Disposable.None}showGlobalActivity(N,B,P,V){typeof V!="number"&&(V=0);const z={badge:B,clazz:P,priority:V},U=N===_.GLOBAL_ACTIVITY_ID?this.globalActivity:this.accountsActivity;for(let H=0;H<=U.length;H++)if(H===U.length){U.push(z);break}else if(U[H].priority<=V){U.splice(H,0,z);break}return this.updateGlobalActivity(N),(0,v.toDisposable)(()=>this.removeGlobalActivity(N,z))}removeGlobalActivity(N,B){const P=N===_.GLOBAL_ACTIVITY_ID?this.globalActivity:this.accountsActivity,V=P.indexOf(B);V!==-1&&(P.splice(V,1),this.updateGlobalActivity(N))}updateGlobalActivity(N){const B=N===_.GLOBAL_ACTIVITY_ID?this.globalActivityAction:this.accountsActivityAction;if(!B)return;const P=N===_.GLOBAL_ACTIVITY_ID?this.globalActivity:this.accountsActivity;if(P.length){const[{badge:V,clazz:z,priority:U}]=P;if(V instanceof D.NumberBadge&&P.length>1){const H=this.getCumulativeNumberBadge(P,U);B.setBadge(H)}else B.setBadge(V,z)}else B.setBadge(void 0)}getCumulativeNumberBadge(N,B){const P=N.filter(U=>U.badge instanceof D.NumberBadge&&U.priority===B),V=P.reduce((U,H)=>U+H.badge.number,0),z=()=>P.reduce((U,H,K)=>(U=U+H.badge.getDescription(),K<P.length-1&&(U=`${U} `),U),"");return new D.NumberBadge(V,z)}uninstallMenubar(){this.menuBar&&(this.menuBar.dispose(),this.menuBar=void 0),this.menuBarContainer&&(this.menuBarContainer.remove(),this.menuBarContainer=void 0,this.registerKeyboardNavigationListeners())}installMenubar(){if(this.menuBar)return;this.menuBarContainer=document.createElement("div"),this.menuBarContainer.classList.add("menubar"),(0,g.assertIsDefined)(this.content).prepend(this.menuBarContainer),this.menuBar=this._register(this.instantiationService.createInstance(m.CustomMenubarControl)),this.menuBar.create(this.menuBarContainer),this.registerKeyboardNavigationListeners()}createContentArea(N){return this.element=N,this.content=document.createElement("div"),this.content.classList.add("content"),N.appendChild(this.content),(0,E.getMenuBarVisibility)(this.configurationService)==="compact"&&this.installMenubar(),this.compositeBarContainer=this.compositeBar.create(this.content),this.globalActivitiesContainer=document.createElement("div"),this.content.appendChild(this.globalActivitiesContainer),this.createGlobalActivityActionBar(this.globalActivitiesContainer),this.registerKeyboardNavigationListeners(),this.content}registerKeyboardNavigationListeners(){this.keyboardNavigationDisposables.clear(),this.menuBarContainer&&this.keyboardNavigationDisposables.add((0,s.addDisposableListener)(this.menuBarContainer,s.EventType.KEY_DOWN,N=>{const B=new O.StandardKeyboardEvent(N);(B.equals(18)||B.equals(17))&&this.compositeBar&&this.compositeBar.focus()})),this.compositeBarContainer&&this.keyboardNavigationDisposables.add((0,s.addDisposableListener)(this.compositeBarContainer,s.EventType.KEY_DOWN,N=>{const B=new O.StandardKeyboardEvent(N);B.equals(18)||B.equals(17)?this.globalActivityActionBar&&this.globalActivityActionBar.focus(!0):(B.equals(16)||B.equals(15))&&this.menuBar&&this.menuBar.toggleFocus()})),this.globalActivitiesContainer&&this.keyboardNavigationDisposables.add((0,s.addDisposableListener)(this.globalActivitiesContainer,s.EventType.KEY_DOWN,N=>{const B=new O.StandardKeyboardEvent(N);(B.equals(16)||B.equals(15))&&this.compositeBar&&this.compositeBar.focus(this.getVisiblePaneCompositeIds().length-1)}))}createGlobalActivityActionBar(N){this.globalActivityActionBar=this._register(new f.ActionBar(N,{actionViewItemProvider:B=>{if(B.id==="workbench.actions.manage")return this.instantiationService.createInstance(k.GlobalActivityActionViewItem,B,()=>this.compositeBar.getContextMenuActions(),P=>this.getActivitybarItemColors(P),this.getActivityHoverOptions());if(B.id==="workbench.actions.accounts")return this.instantiationService.createInstance(k.AccountsActivityActionViewItem,B,()=>this.compositeBar.getContextMenuActions(),P=>this.getActivitybarItemColors(P),this.getActivityHoverOptions());throw new Error(`No view item for action '${B.id}'`)},orientation:1,ariaLabel:(0,t.localize)(8,null),animated:!1,preventLoopNavigation:!0})),this.globalActivityAction=this._register(new u.ActivityAction({id:"workbench.actions.manage",name:(0,t.localize)(9,null),cssClass:o.ThemeIcon.asClassName(jt.GEAR_ICON)})),this.accountsVisibilityPreference&&(this.accountsActivityAction=this._register(new u.ActivityAction({id:"workbench.actions.accounts",name:(0,t.localize)(10,null),cssClass:o.ThemeIcon.asClassName(jt.ACCOUNTS_ICON)})),this.globalActivityActionBar.push(this.accountsActivityAction,{index:jt.ACCOUNTS_ACTION_INDEX})),this.globalActivityActionBar.push(this.globalActivityAction)}toggleAccountsActivity(){this.globalActivityActionBar&&(this.accountsActivityAction?(this.globalActivityActionBar.pull(jt.ACCOUNTS_ACTION_INDEX),this.accountsActivityAction=void 0):(this.accountsActivityAction=this._register(new u.ActivityAction({id:"workbench.actions.accounts",name:(0,t.localize)(11,null),cssClass:T.Codicon.account.classNames})),this.globalActivityActionBar.push(this.accountsActivityAction,{index:jt.ACCOUNTS_ACTION_INDEX}))),this.updateGlobalActivity(_.ACCOUNTS_ACTIVITY_ID)}getCompositeActions(N){let B=this.compositeActions.get(N);if(!B){const P=this.getViewContainer(N);if(P){const V=this.viewDescriptorService.getViewContainerModel(P);B={activityAction:this.instantiationService.createInstance(k.ViewContainerActivityAction,this.toActivity(V),this.paneCompositePart),pinnedAction:new u.ToggleCompositePinnedAction(this.toActivity(V),this.compositeBar)}}else{const V=this.cachedViewContainers.filter(z=>z.id===N)[0];B={activityAction:this.instantiationService.createInstance(k.PlaceHolderViewContainerActivityAction,jt.toActivity(N,N,V?.icon,void 0),this.paneCompositePart),pinnedAction:new k.PlaceHolderToggleCompositePinnedAction(N,this.compositeBar)}}this.compositeActions.set(N,B)}return B}onDidRegisterViewContainers(N){for(const B of N){this.addComposite(B),this.cachedViewContainers.filter(({id:H})=>H===B.id)[0]||this.compositeBar.pin(B.id),this.paneCompositePart.getActivePaneComposite()?.getId()===B.id&&this.compositeBar.activateComposite(B.id);const z=this.viewDescriptorService.getViewContainerModel(B);this.updateActivity(B,z),this.showOrHideViewContainer(B);const U=new v.DisposableStore;U.add(z.onDidChangeContainerInfo(()=>this.updateActivity(B,z))),U.add(z.onDidChangeActiveViewDescriptors(()=>this.showOrHideViewContainer(B))),this.viewContainerDisposables.set(B.id,U)}}onDidDeregisterViewContainer(N){const B=this.viewContainerDisposables.get(N.id);B&&B.dispose(),this.viewContainerDisposables.delete(N.id),this.removeComposite(N.id)}updateActivity(N,B){const P=this.toActivity(B),{activityAction:V,pinnedAction:z}=this.getCompositeActions(N.id);V.updateActivity(P),z instanceof k.PlaceHolderToggleCompositePinnedAction&&z.setActivity(P),this.saveCachedViewContainers()}toActivity(N){return jt.toActivity(N.viewContainer.id,N.title,N.icon,N.keybindingId)}static toActivity(N,B,P,V){let z,U;if(p.URI.isUri(P)){U=P;const H=(0,s.asCSSUrl)(P),K=new F.StringSHA1;K.update(H),z=`activity-${N.replace(/\./g,"-")}-${K.digest()}`;const G=`.monaco-workbench .activitybar .monaco-action-bar .action-label.${z}`;(0,s.createCSSRule)(G,` mask: ${H} no-repeat 50% 50%; mask-size: 24px; -webkit-mask: ${H} no-repeat 50% 50%; -webkit-mask-size: 24px; `)}else o.ThemeIcon.isThemeIcon(P)&&(z=o.ThemeIcon.asClassName(P));return{id:N,name:B,cssClass:z,iconUrl:U,keybindingId:V}}showOrHideViewContainer(N){let B=this.enabledViewContainersContextKeys.get(N.id);B||(B=this.contextKeyService.createKey((0,n.getEnabledViewContainerContextKey)(N.id),!1),this.enabledViewContainersContextKeys.set(N.id,B)),this.shouldBeHidden(N)?(B.set(!1),this.hideComposite(N.id)):(B.set(!0),this.addComposite(N))}shouldBeHidden(N,B){const P=(0,g.isString)(N)?this.getViewContainer(N):N,V=(0,g.isString)(N)?N:N.id;if(P)if(P.hideIfEmpty){if(this.viewDescriptorService.getViewContainerModel(P).activeViewDescriptors.length>0)return!1}else return!1;if(!this.hasExtensionsRegistered&&!(this.environmentService.remoteAuthority&&y.isNative)){if(B=B||this.cachedViewContainers.find(({id:z})=>z===V),!P&&B?.isBuiltin)return!1;if(B?.views?.length)return B.views.every(({when:z})=>!!z&&!this.contextKeyService.contextMatchesRules(h.ContextKeyExpr.deserialize(z)))}return!0}addComposite(N){this.compositeBar.addComposite({id:N.id,name:N.title,order:N.order,requestedIndex:N.requestedIndex})}hideComposite(N){this.compositeBar.hideComposite(N);const B=this.compositeActions.get(N);B&&(B.activityAction.dispose(),B.pinnedAction.dispose(),this.compositeActions.delete(N))}removeComposite(N){this.compositeBar.removeComposite(N);const B=this.compositeActions.get(N);B&&(B.activityAction.dispose(),B.pinnedAction.dispose(),this.compositeActions.delete(N))}getPinnedPaneCompositeIds(){const N=this.compositeBar.getPinnedComposites().map(B=>B.id);return this.getViewContainers().filter(B=>this.compositeBar.isPinned(B.id)).sort((B,P)=>N.indexOf(B.id)-N.indexOf(P.id)).map(B=>B.id)}getVisiblePaneCompositeIds(){return this.compositeBar.getVisibleComposites().filter(N=>this.paneCompositePart.getActivePaneComposite()?.getId()===N.id||this.compositeBar.isPinned(N.id)).map(N=>N.id)}focus(){this.compositeBar.focus()}updateStyles(){super.updateStyles();const N=(0,g.assertIsDefined)(this.getContainer()),B=this.getColor(c.ACTIVITY_BAR_BACKGROUND)||"";N.style.backgroundColor=B;const P=this.getColor(c.ACTIVITY_BAR_BORDER)||this.getColor(i.contrastBorder)||"";N.classList.toggle("bordered",!!P),N.style.borderColor=P||""}getActivitybarItemColors(N){return{activeForegroundColor:N.getColor(c.ACTIVITY_BAR_FOREGROUND),inactiveForegroundColor:N.getColor(c.ACTIVITY_BAR_INACTIVE_FOREGROUND),activeBorderColor:N.getColor(c.ACTIVITY_BAR_ACTIVE_BORDER),activeBackground:N.getColor(c.ACTIVITY_BAR_ACTIVE_BACKGROUND),badgeBackground:N.getColor(c.ACTIVITY_BAR_BADGE_BACKGROUND),badgeForeground:N.getColor(c.ACTIVITY_BAR_BADGE_FOREGROUND),dragAndDropBorder:N.getColor(c.ACTIVITY_BAR_DRAG_AND_DROP_BORDER),activeBackgroundColor:void 0,inactiveBackgroundColor:void 0,activeBorderBottomColor:void 0}}layout(N,B){if(!this.layoutService.isVisible("workbench.parts.activitybar"))return;let V=super.layoutContents(N,B).contentSize.height;this.menuBarContainer&&(V-=this.menuBarContainer.clientHeight),this.globalActivityActionBar&&(V-=this.globalActivityActionBar.viewItems.length*jt.ACTION_HEIGHT),this.compositeBar.layout(new s.Dimension(N,V))}getViewContainer(N){const B=this.viewDescriptorService.getViewContainerById(N);return B&&this.viewDescriptorService.getViewContainerLocation(B)===this.location?B:void 0}getViewContainers(){return this.viewDescriptorService.getViewContainersByLocation(this.location)}onDidStorageValueChange(N){if(N.key===jt.PINNED_VIEW_CONTAINERS&&N.scope===0&&this.pinnedViewContainersValue!==this.getStoredPinnedViewContainersValue()){this._pinnedViewContainersValue=void 0,this._cachedViewContainers=void 0;const B=[],P=this.compositeBar.getCompositeBarItems();for(const V of this.cachedViewContainers)B.push({id:V.id,name:V.name,order:V.order,pinned:V.pinned,visible:!!P.find(({id:z})=>z===V.id)});for(let V=0;V<P.length;V++)B.some(({id:z})=>z===P[V].id)||B.splice(V,0,P[V]);this.compositeBar.setCompositeBarItems(B)}N.key===k.AccountsActivityActionViewItem.ACCOUNTS_VISIBILITY_PREFERENCE_KEY&&N.scope===0&&this.toggleAccountsActivity()}saveCachedViewContainers(){const N=[],B=this.compositeBar.getCompositeBarItems();for(const P of B){const V=this.getViewContainer(P.id);if(V){const z=this.viewDescriptorService.getViewContainerModel(V),U=[];for(const{when:H}of z.allViewDescriptors)U.push({when:H?H.serialize():void 0});N.push({id:P.id,name:z.title,icon:p.URI.isUri(z.icon)&&this.environmentService.remoteAuthority&&y.isNative?void 0:z.icon,views:U,pinned:P.pinned,order:P.order,visible:P.visible,isBuiltin:!V.extensionId})}else N.push({id:P.id,pinned:P.pinned,order:P.order,visible:!1,isBuiltin:!1})}this.storeCachedViewContainersState(N)}get cachedViewContainers(){if(this._cachedViewContainers===void 0){this._cachedViewContainers=this.getPinnedViewContainers();for(const N of this.getPlaceholderViewContainers()){const B=this._cachedViewContainers.filter(P=>P.id===N.id)[0];B&&(B.name=N.name,B.icon=N.themeIcon?N.themeIcon:N.iconUrl?p.URI.revive(N.iconUrl):void 0,B.views=N.views,B.isBuiltin=N.isBuiltin)}}return this._cachedViewContainers}storeCachedViewContainersState(N){this.setPinnedViewContainers(N.map(({id:B,pinned:P,visible:V,order:z})=>({id:B,pinned:P,visible:V,order:z}))),this.setPlaceholderViewContainers(N.map(({id:B,icon:P,name:V,views:z,isBuiltin:U})=>({id:B,iconUrl:p.URI.isUri(P)?P:void 0,themeIcon:o.ThemeIcon.isThemeIcon(P)?P:void 0,name:V,isBuiltin:U,views:z})))}getPinnedViewContainers(){return JSON.parse(this.pinnedViewContainersValue)}setPinnedViewContainers(N){this.pinnedViewContainersValue=JSON.stringify(N)}get pinnedViewContainersValue(){return this._pinnedViewContainersValue||(this._pinnedViewContainersValue=this.getStoredPinnedViewContainersValue()),this._pinnedViewContainersValue}set pinnedViewContainersValue(N){this.pinnedViewContainersValue!==N&&(this._pinnedViewContainersValue=N,this.setStoredPinnedViewContainersValue(N))}getStoredPinnedViewContainersValue(){return this.storageService.get(jt.PINNED_VIEW_CONTAINERS,0,"[]")}setStoredPinnedViewContainersValue(N){this.storageService.store(jt.PINNED_VIEW_CONTAINERS,N,0,0)}getPlaceholderViewContainers(){return JSON.parse(this.placeholderViewContainersValue)}setPlaceholderViewContainers(N){this.placeholderViewContainersValue=JSON.stringify(N)}get placeholderViewContainersValue(){return this._placeholderViewContainersValue||(this._placeholderViewContainersValue=this.getStoredPlaceholderViewContainersValue()),this._placeholderViewContainersValue}set placeholderViewContainersValue(N){this.placeholderViewContainersValue!==N&&(this._placeholderViewContainersValue=N,this.setStoredPlaceholderViewContainersValue(N))}getStoredPlaceholderViewContainersValue(){return this.storageService.get(jt.PLACEHOLDER_VIEW_CONTAINERS,0,"[]")}setStoredPlaceholderViewContainersValue(N){this.storageService.store(jt.PLACEHOLDER_VIEW_CONTAINERS,N,0,1)}get accountsVisibilityPreference(){return this.storageService.getBoolean(k.AccountsActivityActionViewItem.ACCOUNTS_VISIBILITY_PREFERENCE_KEY,0,!0)}set accountsVisibilityPreference(N){this.storageService.store(k.AccountsActivityActionViewItem.ACCOUNTS_VISIBILITY_PREFERENCE_KEY,N,0,0)}toJSON(){return{type:"workbench.parts.activitybar"}}};L.PINNED_VIEW_CONTAINERS="workbench.activity.pinnedViewlets2",L.PLACEHOLDER_VIEW_CONTAINERS="workbench.activity.placeholderViewlets",L.ACTION_HEIGHT=48,L.ACCOUNTS_ACTION_INDEX=0,L.GEAR_ICON=(0,x.registerIcon)("settings-view-bar-icon",T.Codicon.settingsGear,(0,t.localize)(0,null)),L.ACCOUNTS_ICON=(0,x.registerIcon)("accounts-view-bar-icon",T.Codicon.account,(0,t.localize)(1,null)),L=Ee([W(1,w.IInstantiationService),W(2,I.IWorkbenchLayoutService),W(3,o.IThemeService),W(4,l.IStorageService),W(5,r.IExtensionService),W(6,a.IViewDescriptorService),W(7,h.IContextKeyService),W(8,b.IConfigurationService),W(9,d.IWorkbenchEnvironmentService)],L),e.ActivitybarPart=L}),define(ne[2751],re([1,0,1421,2,353,129,5,145,37,36,12,82,34,32,10,24,80,35,15,137,510,13,7,127,116,219,8,2553,2555,2554,74,1068]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StatusbarPart=void 0;let R=class extends _.Part{constructor(x,F,L,M,N,B,P,V,z){super("workbench.parts.statusbar",{hasTitle:!1},F,M,N);this.instantiationService=x,this.contextService=L,this.storageService=M,this.contextMenuService=B,this.contextKeyService=P,this.hoverService=V,this.configurationService=z,this.minimumWidth=0,this.maximumWidth=Number.POSITIVE_INFINITY,this.minimumHeight=22,this.maximumHeight=22,this.pendingEntries=[],this.viewModel=this._register(new E.StatusbarViewModel(this.storageService)),this.onDidChangeEntryVisibility=this.viewModel.onDidChangeEntryVisibility,this.hoverDelegate=new class{constructor(U,H){this.configurationService=U,this.hoverService=H,this.lastHoverHideTime=0,this.placement="element"}get delay(){return Date.now()-this.lastHoverHideTime<200?0:this.configurationService.getValue("workbench.hover.delay")}showHover(U,H){return this.hoverService.showHover({...U,hideOnKeyDown:!0},H)}onDidHideHover(){this.lastHoverHideTime=Date.now()}}(this.configurationService,this.hoverService),this.compactEntriesDisposable=this._register(new f.MutableDisposable),this.styleOverrides=new Set,this.registerListeners()}registerListeners(){this._register(this.onDidChangeEntryVisibility(()=>this.updateCompactEntries())),this._register(this.contextService.onDidChangeWorkbenchState(()=>this.updateStyles()))}addEntry(x,F,L,M=0){const N={primary:M,secondary:(0,g.hash)(F)};return this.element?this.doAddEntry(x,F,L,N):this.doAddPendingEntry(x,F,L,N)}doAddPendingEntry(x,F,L,M){const N={entry:x,id:F,alignment:L,priority:M};return this.pendingEntries.push(N),{update:P=>{N.accessor?N.accessor.update(P):N.entry=P},dispose:()=>{N.accessor?N.accessor.dispose():this.pendingEntries=this.pendingEntries.filter(P=>P!==N)}}}doAddEntry(x,F,L,M){const N=this.doCreateStatusItem(F,L,...(0,r.coalesce)([x.showBeak?"has-beak":void 0])),B=this.instantiationService.createInstance(y.StatusbarEntryItem,N,x,this.hoverDelegate),P=new class{constructor(){this.id=F,this.alignment=L,this.priority=M,this.container=N,this.labelContainer=B.labelContainer}get name(){return B.name}get hasCommand(){return B.hasCommand}},{needsFullRefresh:V}=this.doAddOrRemoveModelEntry(P,!0);return V?this.appendStatusbarEntries():this.appendStatusbarEntry(P),{update:z=>{B.update(z)},dispose:()=>{const{needsFullRefresh:z}=this.doAddOrRemoveModelEntry(P,!1);z?this.appendStatusbarEntries():N.remove(),(0,f.dispose)(B)}}}doCreateStatusItem(x,F,...L){const M=document.createElement("div");return M.id=x,M.classList.add("statusbar-item"),L&&M.classList.add(...L),F===1?M.classList.add("right"):M.classList.add("left"),M}doAddOrRemoveModelEntry(x,F){const L=this.viewModel.entries;F?this.viewModel.add(x):this.viewModel.remove(x);const M=this.viewModel.entries;return F?L.splice(M.indexOf(x),0,x):L.splice(L.indexOf(x),1),{needsFullRefresh:!(0,r.equals)(L,M)}}isEntryVisible(x){return!this.viewModel.isHidden(x)}updateEntryVisibility(x,F){F?this.viewModel.show(x):this.viewModel.hide(x)}focusNextEntry(){this.viewModel.focusNextEntry()}focusPreviousEntry(){this.viewModel.focusPreviousEntry()}isEntryFocused(){return this.viewModel.isEntryFocused()}focus(x=!0){this.getContainer()?.focus();const F=this.viewModel.lastFocusedEntry;x&&F&&setTimeout(()=>F.labelContainer.focus(),0)}createContentArea(x){this.element=x;const F=this.contextKeyService.createScoped(this.element);return T.StatusBarFocused.bindTo(F).set(!0),this.leftItemsContainer=document.createElement("div"),this.leftItemsContainer.classList.add("left-items","items-container"),this.element.appendChild(this.leftItemsContainer),this.element.tabIndex=0,this.rightItemsContainer=document.createElement("div"),this.rightItemsContainer.classList.add("right-items","items-container"),this.element.appendChild(this.rightItemsContainer),this._register((0,i.addDisposableListener)(x,i.EventType.CONTEXT_MENU,L=>this.showContextMenu(L))),this._register(A.Gesture.addTarget(x)),this._register((0,i.addDisposableListener)(x,A.EventType.Contextmenu,L=>this.showContextMenu(L))),this.createInitialStatusbarEntries(),this.element}createInitialStatusbarEntries(){for(this.appendStatusbarEntries();this.pendingEntries.length;){const x=this.pendingEntries.shift();x&&(x.accessor=this.addEntry(x.entry,x.id,x.alignment,x.priority.primary))}}appendStatusbarEntries(){const x=(0,a.assertIsDefined)(this.leftItemsContainer),F=(0,a.assertIsDefined)(this.rightItemsContainer);(0,i.clearNode)(x),(0,i.clearNode)(F);for(const L of[...this.viewModel.getEntries(0),...this.viewModel.getEntries(1).reverse()])(L.alignment===0?x:F).appendChild(L.container);this.updateCompactEntries()}appendStatusbarEntry(x){const F=this.viewModel.getEntries(x.alignment);x.alignment===1&&F.reverse();const L=(0,a.assertIsDefined)(x.alignment===0?this.leftItemsContainer:this.rightItemsContainer),M=F.indexOf(x);M+1===F.length?L.appendChild(x.container):L.insertBefore(x.container,F[M+1].container),this.updateCompactEntries()}updateCompactEntries(){const x=this.viewModel.entries,F=new Map;for(const B of x)this.viewModel.isHidden(B.id)||F.set(B.id,B),B.container.classList.remove("compact-left","compact-right");const L=new Map;for(const B of F.values())if((0,D.isStatusbarEntryLocation)(B.priority.primary)&&B.priority.primary.compact){const P=B.priority.primary.id,V=F.get(P);if(!V)continue;let z=L.get(P);z?z.add(B):(z=new Set([B,V]),L.set(P,z)),B.priority.primary.alignment===0?(V.container.classList.add("compact-left"),B.container.classList.add("compact-right")):(V.container.classList.add("compact-right"),B.container.classList.add("compact-left"))}const M=this.getColor(C.STATUS_BAR_ITEM_HOVER_BACKGROUND)?.toString(),N=this.getColor(C.STATUS_BAR_ITEM_COMPACT_HOVER_BACKGROUND)?.toString();if(this.compactEntriesDisposable.value=new f.DisposableStore,M&&N&&!(0,h.isHighContrast)(this.theme.type))for(const[,B]of L)for(const P of B)!P.hasCommand||(this.compactEntriesDisposable.value.add((0,i.addDisposableListener)(P.labelContainer,i.EventType.MOUSE_OVER,()=>{B.forEach(V=>V.labelContainer.style.backgroundColor=M),P.labelContainer.style.backgroundColor=N})),this.compactEntriesDisposable.value.add((0,i.addDisposableListener)(P.labelContainer,i.EventType.MOUSE_OUT,()=>{B.forEach(V=>V.labelContainer.style.backgroundColor="")})))}showContextMenu(x){i.EventHelper.stop(x,!0);const F=new p.StandardMouseEvent(x);let L;this.contextMenuService.showContextMenu({getAnchor:()=>({x:F.posx,y:F.posy}),getActions:()=>(L=this.getContextMenuActions(F),L),onHide:()=>{L&&(0,f.dispose)(L)}})}getContextMenuActions(x){const F=[];F.push((0,w.toAction)({id:u.ToggleStatusbarVisibilityAction.ID,label:(0,t.localize)(0,null),run:()=>this.instantiationService.invokeFunction(N=>new u.ToggleStatusbarVisibilityAction().run(N))})),F.push(new w.Separator);const L=new Set;for(const N of this.viewModel.entries)L.has(N.id)||(F.push(new b.ToggleStatusbarEntryVisibilityAction(N.id,N.name,this.viewModel)),L.add(N.id));let M;for(let N=x.target;N;N=N.parentElement){const B=this.viewModel.findEntry(N);if(B){M=B;break}}return M&&(F.push(new w.Separator),F.push(new b.HideStatusbarEntryAction(M.id,M.name,this.viewModel))),F}updateStyles(){super.updateStyles();const x=(0,a.assertIsDefined)(this.getContainer()),F=[...this.styleOverrides].sort((V,z)=>V.priority-z.priority)[0],L=this.getColor(F?.background??(this.contextService.getWorkbenchState()!==1?C.STATUS_BAR_BACKGROUND:C.STATUS_BAR_NO_FOLDER_BACKGROUND))||"";x.style.backgroundColor=L;const M=this.getColor(F?.foreground??(this.contextService.getWorkbenchState()!==1?C.STATUS_BAR_FOREGROUND:C.STATUS_BAR_NO_FOLDER_FOREGROUND))||"";x.style.color=M;const N=this.getColor(C.STATUS_BAR_ITEM_FOCUS_BORDER),B=this.getColor(F?.border??(this.contextService.getWorkbenchState()!==1?C.STATUS_BAR_BORDER:C.STATUS_BAR_NO_FOLDER_BORDER))||this.getColor(c.contrastBorder);B?(x.classList.add("status-border-top"),x.style.setProperty("--status-border-top-color",B.toString())):(x.classList.remove("status-border-top"),x.style.removeProperty("--status-border-top-color"));const P=this.getColor(C.STATUS_BAR_FOCUS_BORDER);this.styleElement||(this.styleElement=(0,i.createStyleSheet)(x)),this.styleElement.textContent=` /* Status bar focus outline */ .monaco-workbench .part.statusbar:focus { outline-color: ${P}; } /* Status bar item focus outline */ .monaco-workbench .part.statusbar > .items-container > .statusbar-item a:focus-visible:not(.disabled) { outline: 1px solid ${this.getColor(c.activeContrastBorder)??N}; outline-offset: ${B?"-2px":"-1px"}; } /* Notification Beak */ .monaco-workbench .part.statusbar > .items-container > .statusbar-item.has-beak:before { border-bottom-color: ${L}; } `}layout(x,F,L,M){super.layout(x,F,L,M),super.layoutContents(x,F)}overrideStyle(x){return this.styleOverrides.add(x),this.updateStyles(),(0,f.toDisposable)(()=>{this.styleOverrides.delete(x),this.updateStyles()})}toJSON(){return{type:"workbench.parts.statusbar"}}};R=Ee([W(0,k.IInstantiationService),W(1,v.IThemeService),W(2,o.IWorkspaceContextService),W(3,S.IStorageService),W(4,s.IWorkbenchLayoutService),W(5,I.IContextMenuService),W(6,n.IContextKeyService),W(7,d.IHoverService),W(8,m.IConfigurationService)],R),e.StatusbarPart=R,(0,v.registerThemingParticipant)((O,x)=>{if(!(0,h.isHighContrast)(O.type)){const B=O.getColor(C.STATUS_BAR_ITEM_HOVER_BACKGROUND);B&&x.addRule(`.monaco-workbench .part.statusbar > .items-container > .statusbar-item a:hover:not(.disabled) { background-color: ${B}; }`);const P=O.getColor(C.STATUS_BAR_ITEM_ACTIVE_BACKGROUND);P&&x.addRule(`.monaco-workbench .part.statusbar > .items-container > .statusbar-item a:active:not(.disabled) { background-color: ${P} !important; }`)}const F=O.getColor(c.activeContrastBorder);F&&(x.addRule(` .monaco-workbench .part.statusbar > .items-container > .statusbar-item a:active:not(.disabled) { outline: 1px solid ${F} !important; outline-offset: -1px; } `),x.addRule(` .monaco-workbench .part.statusbar > .items-container > .statusbar-item a:hover:not(.disabled) { outline: 1px dashed ${F}; outline-offset: -1px; } `));const L=O.getColor(C.STATUS_BAR_PROMINENT_ITEM_FOREGROUND);L&&x.addRule(`.monaco-workbench .part.statusbar > .items-container > .statusbar-item .status-bar-info { color: ${L}; }`);const M=O.getColor(C.STATUS_BAR_PROMINENT_ITEM_BACKGROUND);M&&x.addRule(`.monaco-workbench .part.statusbar > .items-container > .statusbar-item .status-bar-info { background-color: ${M}; }`);const N=O.getColor(C.STATUS_BAR_PROMINENT_ITEM_HOVER_BACKGROUND);N&&x.addRule(`.monaco-workbench .part.statusbar > .items-container > .statusbar-item a.status-bar-info:hover:not(.disabled) { background-color: ${N}; }`)}),(0,l.registerSingleton)(D.IStatusbarService,R)}),define(ne[641],re([1,0,2,5,38,37,16,7,43,8,12,131,17,41,27,6,36,73,26,67,40,28,10,178,78,9,19,23,71,1424,11,32,13,45,170,102,1220,29,82,219,134,127,242,204,33,30,22,156,18,508,89,31,169,1070]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H,K,G,q,Z,j,X,Y,$,J){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomTreeViewDragAndDrop=e.TreeView=e.CustomTreeView=e.RawCustomTreeViewContextKey=e.TreeViewPane=void 0;let ee=class extends C.ViewPane{constructor(de,Se,we,ye,ke,Ie,Te,De,_e,Re){super({...de,titleMenuId:k.MenuId.ViewTitle,donotForwardArgs:!0},Se,we,ye,ke,Ie,Te,De,_e,Re);const{treeView:Ne}=o.Registry.as(I.Extensions.ViewsRegistry).getView(de.id);this.treeView=Ne,this._register(this.treeView.onDidChangeActions(()=>this.updateActions(),this)),this._register(this.treeView.onDidChangeTitle(xe=>this.updateTitle(xe))),this._register(this.treeView.onDidChangeDescription(xe=>this.updateTitleDescription(xe))),this._register((0,t.toDisposable)(()=>{this._container&&this.treeView.container&&this._container===this.treeView.container&&this.treeView.setVisibility(!1)})),this._register(this.onDidChangeBodyVisibility(()=>this.updateTreeVisibility())),this._register(this.treeView.onDidChangeWelcomeState(()=>this._onDidChangeViewWelcomeState.fire())),de.title!==this.treeView.title&&this.updateTitle(this.treeView.title),de.titleDescription!==this.treeView.description&&this.updateTitleDescription(this.treeView.description),this.updateTreeVisibility()}focus(){super.focus(),this.treeView.focus()}renderBody(de){this._container=de,super.renderBody(de),this.renderTreeView(de)}shouldShowWelcome(){return(this.treeView.dataProvider===void 0||!!this.treeView.dataProvider.isTreeEmpty)&&this.treeView.message===void 0}layoutBody(de,Se){super.layoutBody(de,Se),this.layoutTreeView(de,Se)}getOptimalWidth(){return this.treeView.getOptimalWidth()}renderTreeView(de){this.treeView.show(de)}layoutTreeView(de,Se){this.treeView.layout(de,Se)}updateTreeVisibility(){this.treeView.setVisibility(this.isBodyVisible())}};ee=Ee([W(1,_.IKeybindingService),W(2,A.IContextMenuService),W(3,w.IConfigurationService),W(4,D.IContextKeyService),W(5,I.IViewDescriptorService),W(6,f.IInstantiationService),W(7,c.IOpenerService),W(8,v.IThemeService),W(9,i.ITelemetryService)],ee),e.TreeViewPane=ee;class te{constructor(){this.label={label:"root"},this.handle="0",this.parentHandle=void 0,this.collapsibleState=I.TreeItemCollapsibleState.Expanded,this.children=void 0}}const se=(0,y.localize)(0,null);e.RawCustomTreeViewContextKey=new D.RawContextKey("customTreeView",!1);class ie extends E.WorkbenchAsyncDataTree{}let ce=class extends t.Disposable{constructor(de,Se,we,ye,ke,Ie,Te,De,_e,Re,Ne,xe,Ae){super();this.id=de,this._title=Se,this.themeService=we,this.instantiationService=ye,this.commandService=ke,this.configurationService=Ie,this.progressService=Te,this.contextMenuService=De,this.keybindingService=_e,this.notificationService=Re,this.viewDescriptorService=Ne,this.hoverService=xe,this.isVisible=!1,this._hasIconForParentNode=!1,this._hasIconForLeafNode=!1,this.focused=!1,this._canSelectMany=!1,this.elementsToRefresh=[],this._onDidExpandItem=this._register(new S.Emitter),this.onDidExpandItem=this._onDidExpandItem.event,this._onDidCollapseItem=this._register(new S.Emitter),this.onDidCollapseItem=this._onDidCollapseItem.event,this._onDidChangeSelection=this._register(new S.Emitter),this.onDidChangeSelection=this._onDidChangeSelection.event,this._onDidChangeVisibility=this._register(new S.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._onDidChangeActions=this._register(new S.Emitter),this.onDidChangeActions=this._onDidChangeActions.event,this._onDidChangeWelcomeState=this._register(new S.Emitter),this.onDidChangeWelcomeState=this._onDidChangeWelcomeState.event,this._onDidChangeTitle=this._register(new S.Emitter),this.onDidChangeTitle=this._onDidChangeTitle.event,this._onDidChangeDescription=this._register(new S.Emitter),this.onDidChangeDescription=this._onDidChangeDescription.event,this._onDidCompleteRefresh=this._register(new S.Emitter),this._height=0,this._width=0,this.refreshing=!1,this.root=new te,this.collapseAllContextKey=new D.RawContextKey(`treeView.${this.id}.enableCollapseAll`,!1,(0,y.localize)(1,null,this.id)),this.collapseAllContext=this.collapseAllContextKey.bindTo(Ae),this.collapseAllToggleContextKey=new D.RawContextKey(`treeView.${this.id}.toggleCollapseAll`,!1,(0,y.localize)(2,null,this.id)),this.collapseAllToggleContext=this.collapseAllToggleContextKey.bindTo(Ae),this.refreshContextKey=new D.RawContextKey(`treeView.${this.id}.enableRefresh`,!1,(0,y.localize)(3,null,this.id)),this.refreshContext=this.refreshContextKey.bindTo(Ae),this.treeViewDnd=this.instantiationService.createInstance(he,this.id),this._register(this.themeService.onDidFileIconThemeChange(()=>this.doRefresh([this.root]))),this._register(this.themeService.onDidColorThemeChange(()=>this.doRefresh([this.root]))),this._register(this.configurationService.onDidChangeConfiguration(Le=>{Le.affectsConfiguration("explorer.decorations")&&this.doRefresh([this.root])})),this._register(this.viewDescriptorService.onDidChangeLocation(({views:Le,from:Me,to:We})=>{Le.some(Ve=>Ve.id===this.id)&&this.tree?.updateOptions({overrideStyles:{listBackground:this.viewLocation===1?B.PANEL_BACKGROUND:B.SIDE_BAR_BACKGROUND}})})),this.registerActions(),this.create()}get viewContainer(){return this.viewDescriptorService.getViewContainerByViewId(this.id)}get viewLocation(){return this.viewDescriptorService.getViewLocationById(this.id)}get dragAndDropController(){return this._dragAndDropController}set dragAndDropController(de){this._dragAndDropController=de,this.treeViewDnd.controller=de}get dataProvider(){return this._dataProvider}set dataProvider(de){if(de){const Se=this;this._dataProvider=new class{constructor(){this._isEmpty=!0,this._onDidChangeEmpty=new S.Emitter,this.onDidChangeEmpty=this._onDidChangeEmpty.event}get isTreeEmpty(){return this._isEmpty}async getChildren(we){let ye;if(we&&we.children?ye=we.children:(we=we??Se.root,we.children=await(we instanceof te?de.getChildren():de.getChildren(we)),ye=we.children??[]),we instanceof te){const ke=this._isEmpty;this._isEmpty=ye.length===0,ke!==this._isEmpty&&this._onDidChangeEmpty.fire()}return ye}},this._dataProvider.onDidChangeEmpty&&this._register(this._dataProvider.onDidChangeEmpty(()=>{this.updateCollapseAllToggle(),this._onDidChangeWelcomeState.fire()})),this.updateMessage(),this.refresh()}else this._dataProvider=void 0,this.updateMessage();this._onDidChangeWelcomeState.fire()}get message(){return this._message}set message(de){this._message=de,this.updateMessage(),this._onDidChangeWelcomeState.fire()}get title(){return this._title}set title(de){this._title=de,this._onDidChangeTitle.fire(this._title)}get description(){return this._description}set description(de){this._description=de,this._onDidChangeDescription.fire(this._description)}get canSelectMany(){return this._canSelectMany}set canSelectMany(de){const Se=this._canSelectMany;this._canSelectMany=de,this._canSelectMany!==Se&&this.tree?.updateOptions({multipleSelectionSupport:this.canSelectMany})}get hasIconForParentNode(){return this._hasIconForParentNode}get hasIconForLeafNode(){return this._hasIconForLeafNode}get visible(){return this.isVisible}get showCollapseAllAction(){return!!this.collapseAllContext.get()}set showCollapseAllAction(de){this.collapseAllContext.set(de)}get showRefreshAction(){return!!this.refreshContext.get()}set showRefreshAction(de){this.refreshContext.set(de)}registerActions(){const de=this;this._register((0,k.registerAction2)(class extends k.Action2{constructor(){super({id:`workbench.actions.treeView.${de.id}.refresh`,title:(0,y.localize)(4,null),menu:{id:k.MenuId.ViewTitle,when:D.ContextKeyExpr.and(D.ContextKeyExpr.equals("view",de.id),de.refreshContextKey),group:"navigation",order:Number.MAX_SAFE_INTEGER-1},icon:K.Codicon.refresh})}async run(){return de.refresh()}})),this._register((0,k.registerAction2)(class extends k.Action2{constructor(){super({id:`workbench.actions.treeView.${de.id}.collapseAll`,title:(0,y.localize)(5,null),menu:{id:k.MenuId.ViewTitle,when:D.ContextKeyExpr.and(D.ContextKeyExpr.equals("view",de.id),de.collapseAllContextKey),group:"navigation",order:Number.MAX_SAFE_INTEGER},precondition:de.collapseAllToggleContextKey,icon:K.Codicon.collapseAll})}async run(){if(de.tree)return new M.CollapseAllAction(de.tree,!0).run()}}))}setVisibility(de){de=!!de,this.isVisible!==de&&(this.isVisible=de,this.tree&&(this.isVisible?n.show(this.tree.getHTMLElement()):n.hide(this.tree.getHTMLElement()),this.isVisible&&this.elementsToRefresh.length&&(this.doRefresh(this.elementsToRefresh),this.elementsToRefresh=[])),this._onDidChangeVisibility.fire(this.isVisible),this.visible&&this.activate())}focus(de=!0){if(this.tree&&this.root.children&&this.root.children.length>0){const Se=this.tree.getSelection()[0];Se&&de&&this.tree.reveal(Se,.5),this.tree.domFocus()}else this.tree?this.tree.domFocus():this.domNode.focus()}show(de){this._container=de,n.append(de,this.domNode)}create(){this.domNode=n.$(".tree-explorer-viewlet-tree-view"),this.messageElement=n.append(this.domNode,n.$(".message")),this.treeContainer=n.append(this.domNode,n.$(".customview-tree")),this.treeContainer.classList.add("file-icon-themable-tree","show-file-icons");const de=this._register(n.trackFocus(this.domNode));this._register(de.onDidFocus(()=>this.focused=!0)),this._register(de.onDidBlur(()=>this.focused=!1))}createTree(){const de=l.createActionViewItem.bind(void 0,this.instantiationService),Se=this._register(this.instantiationService.createInstance(me,this.id));this.treeLabels=this._register(this.instantiationService.createInstance(h.ResourceLabels,this));const we=this.instantiationService.createInstance(ue,this,_e=>this.progressService.withProgress({location:this.id},()=>_e)),ye=new fe(this.themeService),ke=this.instantiationService.createInstance(oe,this.id,Se,this.treeLabels,de,ye),Ie=this._title;this.tree=this._register(this.instantiationService.createInstance(ie,this.id,this.treeContainer,new ae,[ke],we,{identityProvider:new le,accessibilityProvider:{getAriaLabel(_e){if(_e.accessibilityInformation)return _e.accessibilityInformation.label;if((0,O.isString)(_e.tooltip))return _e.tooltip;{if(_e.resourceUri&&!_e.label)return null;let Re="";return _e.label&&(Re+=_e.label.label+" "),_e.description&&(Re+=_e.description),Re}},getRole(_e){return _e.accessibilityInformation?.role??"treeitem"},getWidgetAriaLabel(){return Ie}},keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:_e=>_e.label?_e.label.label:_e.resourceUri?(0,m.basename)(d.URI.revive(_e.resourceUri)):void 0},expandOnlyOnTwistieClick:_e=>!!_e.command,collapseByDefault:_e=>_e.collapsibleState!==I.TreeItemCollapsibleState.Expanded,multipleSelectionSupport:this.canSelectMany,dnd:this.treeViewDnd,overrideStyles:{listBackground:this.viewLocation===1?B.PANEL_BACKGROUND:B.SIDE_BAR_BACKGROUND}})),Se.setContextKeyService(this.tree.contextKeyService),ye.tree=this.tree;const Te=new pe(this.notificationService,()=>this.tree.getSelection());ke.actionRunner=Te,this.tree.contextKeyService.createKey(this.id,!0),e.RawCustomTreeViewContextKey.bindTo(this.tree.contextKeyService).set(!0),this._register(this.tree.onContextMenu(_e=>this.onContextMenu(Se,_e,Te))),this._register(this.tree.onDidChangeSelection(_e=>this._onDidChangeSelection.fire(_e.elements))),this._register(this.tree.onDidChangeCollapseState(_e=>{if(!_e.node.element)return;const Re=Array.isArray(_e.node.element.element)?_e.node.element.element[0]:_e.node.element.element;_e.node.collapsed?this._onDidCollapseItem.fire(Re):this._onDidExpandItem.fire(Re)})),this.tree.setInput(this.root).then(()=>this.updateContentAreas()),this._register(this.tree.onDidOpen(async _e=>{if(!_e.browserEvent)return;const Re=this.tree.getSelection(),Ne=await this.resolveCommand(Re.length===1?Re[0]:void 0);if(Ne){let xe=Ne.arguments||[];(Ne.id===H.API_OPEN_EDITOR_COMMAND_ID||Ne.id===H.API_OPEN_DIFF_EDITOR_COMMAND_ID)&&(xe=[...xe,_e]),this.commandService.executeCommand(Ne.id,...xe)}})),this._register(Se.onDidChange(_e=>this.tree?.rerender(_e)))}async resolveCommand(de){let Se=de?.command;return de&&!Se&&de instanceof I.ResolvableTreeItem&&de.hasResolve&&(await de.resolve(new G.CancellationTokenSource().token),Se=de.command),Se}onContextMenu(de,Se,we){this.hoverService.hideHover();const ye=Se.element;if(ye===null)return;const ke=Se.browserEvent;ke.preventDefault(),ke.stopPropagation(),this.tree.setFocus([ye]);const Ie=de.getResourceContextActions(ye);!Ie.length||this.contextMenuService.showContextMenu({getAnchor:()=>Se.anchor,getActions:()=>Ie,getActionViewItem:Te=>{const De=this.keybindingService.lookupKeybinding(Te.id);if(De)return new V.ActionViewItem(Te,Te,{label:!0,keybinding:De.getLabel()})},onHide:Te=>{Te&&this.tree.domFocus()},getActionsContext:()=>({$treeViewId:this.id,$treeItemHandle:ye.handle}),actionRunner:we})}updateMessage(){this._message?this.showMessage(this._message):this.dataProvider?this.hideMessage():this.showMessage(se),this.updateContentAreas()}showMessage(de){this.messageElement.classList.remove("hide"),this.resetMessageElement(),this._messageValue=de,(0,N.isFalsyOrWhitespace)(this._message)||(this.messageElement.textContent=this._messageValue),this.layout(this._height,this._width)}hideMessage(){this.resetMessageElement(),this.messageElement.classList.add("hide"),this.layout(this._height,this._width)}resetMessageElement(){n.clearNode(this.messageElement)}layout(de,Se){if(de&&Se){this._height=de,this._width=Se;const we=de-n.getTotalHeight(this.messageElement);this.treeContainer.style.height=we+"px",this.tree&&this.tree.layout(we,Se)}}getOptimalWidth(){if(this.tree){const de=this.tree.getHTMLElement(),Se=[].slice.call(de.querySelectorAll(".outline-item-label > a"));return n.getLargestChildWidth(de,Se)}return 0}async refresh(de){if(this.dataProvider&&this.tree){this.refreshing&&await S.Event.toPromise(this._onDidCompleteRefresh.event),de||(de=[this.root],this.elementsToRefresh=[]);for(const Se of de)Se.children=void 0;if(this.isVisible)return this.doRefresh(de);if(this.elementsToRefresh.length){const Se=new Set;this.elementsToRefresh.forEach(we=>Se.add(we.handle));for(const we of de)Se.has(we.handle)||this.elementsToRefresh.push(we)}else this.elementsToRefresh.push(...de)}}async expand(de){const Se=this.tree;Se&&(de=Array.isArray(de)?de:[de],await Promise.all(de.map(we=>Se.expand(we,!1))))}setSelection(de){this.tree&&this.tree.setSelection(de)}setFocus(de){this.tree&&(this.focus(),this.tree.setFocus([de]))}async reveal(de){if(this.tree)return this.tree.reveal(de)}async doRefresh(de){const Se=this.tree;Se&&this.visible&&(this.refreshing=!0,await Promise.all(de.map(we=>Se.updateChildren(we,!0,!0))),this.refreshing=!1,this._onDidCompleteRefresh.fire(),this.updateContentAreas(),this.focused&&this.focus(!1),this.updateCollapseAllToggle())}updateCollapseAllToggle(){this.showCollapseAllAction&&this.collapseAllToggleContext.set(!!this.root.children&&this.root.children.length>0&&this.root.children.some(de=>de.collapsibleState!==I.TreeItemCollapsibleState.None))}updateContentAreas(){const de=!this.root.children||this.root.children.length===0;this._messageValue&&de&&!this.refreshing?(this.treeContainer.classList.add("hide"),this.domNode.setAttribute("tabindex","0")):(this.treeContainer.classList.remove("hide"),this.domNode.removeAttribute("tabindex"))}get container(){return this._container}};ce=Ee([W(2,v.IThemeService),W(3,f.IInstantiationService),W(4,a.ICommandService),W(5,w.IConfigurationService),W(6,p.IProgressService),W(7,A.IContextMenuService),W(8,_.IKeybindingService),W(9,r.INotificationService),W(10,I.IViewDescriptorService),W(11,P.IHoverService),W(12,D.IContextKeyService)],ce);class le{getId(de){return de.handle}}class ae{getHeight(de){return oe.ITEM_HEIGHT}getTemplateId(de){return oe.TREE_TEMPLATE_ID}}class ue{constructor(de,Se){this.treeView=de,this.withProgress=Se}hasChildren(de){return!!this.treeView.dataProvider&&de.collapsibleState!==I.TreeItemCollapsibleState.None}async getChildren(de){let Se=[];if(this.treeView.dataProvider)try{Se=await this.withProgress(this.treeView.dataProvider.getChildren(de))??[]}catch(we){if(!we.message.startsWith("Bad progress location:"))throw we}return Se}}(0,v.registerThemingParticipant)((ge,de)=>{const Se=ge.getColor(R.listFilterMatchHighlight);Se&&(de.addRule(`.file-icon-themable-tree .monaco-list-row .content .monaco-highlighted-label .highlight { color: unset !important; background-color: ${Se}; }`),de.addRule(`.monaco-tl-contents .monaco-highlighted-label .highlight { color: unset !important; background-color: ${Se}; }`));const we=ge.getColor(R.listFilterMatchHighlightBorder);we&&(de.addRule(`.file-icon-themable-tree .monaco-list-row .content .monaco-highlighted-label .highlight { color: unset !important; border: 1px dotted ${we}; box-sizing: border-box; }`),de.addRule(`.monaco-tl-contents .monaco-highlighted-label .highlight { color: unset !important; border: 1px dotted ${we}; box-sizing: border-box; }`));const ye=ge.getColor(R.textLinkForeground);ye&&de.addRule(`.tree-explorer-viewlet-tree-view > .message a { color: ${ye}; }`);const ke=ge.getColor(R.focusBorder);ke&&de.addRule(`.tree-explorer-viewlet-tree-view > .message a:focus { outline: 1px solid ${ke}; outline-offset: -1px; }`);const Ie=ge.getColor(R.textCodeBlockBackground);Ie&&de.addRule(`.tree-explorer-viewlet-tree-view > .message code { background-color: ${Ie}; }`)});let oe=class pl extends t.Disposable{constructor(de,Se,we,ye,ke,Ie,Te,De,_e,Re){super();this.treeViewId=de,this.menus=Se,this.labels=we,this.actionViewItemProvider=ye,this.aligner=ke,this.themeService=Ie,this.configurationService=Te,this.labelService=De,this.hoverService=_e,this.treeViewsService=Re,this._hoverDelegate={showHover:Ne=>this.hoverService.showHover(Ne),delay:this.configurationService.getValue("workbench.hover.delay")}}get templateId(){return pl.TREE_TEMPLATE_ID}set actionRunner(de){this._actionRunner=de}renderTemplate(de){de.classList.add("custom-view-tree-node-item");const Se=n.append(de,n.$(".custom-view-tree-node-item-icon")),we=this.labels.create(de,{supportHighlights:!0,hoverDelegate:this._hoverDelegate}),ye=n.append(we.element,n.$(".actions")),ke=new g.ActionBar(ye,{actionViewItemProvider:this.actionViewItemProvider});return{resourceLabel:we,icon:Se,actionBar:ke,container:de,elementDisposable:t.Disposable.None}}getHover(de,Se,we){return!(we instanceof I.ResolvableTreeItem)||!we.hasResolve?Se&&!we.tooltip?void 0:we.tooltip?(0,O.isString)(we.tooltip)?we.tooltip:{markdown:we.tooltip,markdownNotSupportedFallback:Se?void 0:(0,U.renderMarkdownAsPlaintext)(we.tooltip)}:de:{markdown:ye=>new Promise(ke=>{we.resolve(ye).then(()=>ke(we.tooltip))}),markdownNotSupportedFallback:Se?void 0:de??""}}renderElement(de,Se,we){we.elementDisposable.dispose();const ye=de.element,ke=ye.resourceUri?d.URI.revive(ye.resourceUri):null,Ie=ye.label?ye.label:ke?{label:(0,m.basename)(ke)}:void 0,Te=(0,O.isString)(ye.description)?ye.description:ke&&ye.description===!0?this.labelService.getUriLabel((0,m.dirname)(ke),{relative:!0}):void 0,De=Ie?Ie.label:void 0,_e=Ie&&Ie.highlights&&De?Ie.highlights.map(([Me,We])=>{if(Me<0&&(Me=De.length+Me),We<0&&(We=De.length+We),Me>=De.length||We>De.length)return{start:0,end:0};if(Me>We){const Ve=Me;Me=We,We=Ve}return{start:Me,end:We}}):void 0,Re=this.themeService.getColorTheme().type===z.ColorScheme.LIGHT?ye.icon:ye.iconDark,Ne=Re?d.URI.revive(Re):null,xe=this.getHover(De,ke,ye);if(we.actionBar.clear(),we.icon.style.color="",ke||this.isFileKindThemeIcon(ye.themeIcon)){const Me=this.configurationService.getValue("explorer.decorations"),We=ke||d.URI.parse("missing:_icon_resource");we.resourceLabel.setResource({name:De,description:Te,resource:We},{fileKind:this.getFileKind(ye),title:xe,hideIcon:!!Ne||!!ye.themeIcon&&!this.isFileKindThemeIcon(ye.themeIcon),fileDecorations:Me,extraClasses:["custom-view-tree-node-item-resourceLabel"],matches:_e||(0,L.createMatches)(de.filterData),strikethrough:Ie?.strikethrough})}else we.resourceLabel.setResource({name:De,description:Te},{title:xe,hideIcon:!0,extraClasses:["custom-view-tree-node-item-resourceLabel"],matches:_e||(0,L.createMatches)(de.filterData),strikethrough:Ie?.strikethrough});if(Ne)we.icon.className="custom-view-tree-node-item-icon",we.icon.style.backgroundImage=n.asCSSUrl(Ne);else{let Me;ye.themeIcon&&!this.isFileKindThemeIcon(ye.themeIcon)&&(Me=v.ThemeIcon.asClassName(ye.themeIcon),ye.themeIcon.color&&(we.icon.style.color=this.themeService.getColorTheme().getColor(ye.themeIcon.color.id)?.toString()??"")),we.icon.className=Me?`custom-view-tree-node-item-icon ${Me}`:"",we.icon.style.backgroundImage=""}we.actionBar.context={$treeViewId:this.treeViewId,$treeItemHandle:ye.handle};const Ae=new t.DisposableStore;we.elementDisposable=Ae;const Le=this.menus.getResourceActions(ye);Le.menu&&Ae.add(Le.menu),we.actionBar.push(Le.actions,{icon:!0,label:!1}),this._actionRunner&&(we.actionBar.actionRunner=this._actionRunner),this.setAlignment(we.container,ye),Ae.add(this.themeService.onDidFileIconThemeChange(()=>this.setAlignment(we.container,ye))),this.treeViewsService.addRenderedTreeItemElement(ye,we.container),Ae.add((0,t.toDisposable)(()=>this.treeViewsService.removeRenderedTreeItemElement(ye)))}setAlignment(de,Se){de.parentElement.classList.toggle("align-icon-with-twisty",this.aligner.alignIconWithTwisty(Se))}isFileKindThemeIcon(de){return de?de.id===v.FileThemeIcon.id||de.id===v.FolderThemeIcon.id:!1}getFileKind(de){if(de.themeIcon)switch(de.themeIcon.id){case v.FileThemeIcon.id:return b.FileKind.FILE;case v.FolderThemeIcon.id:return b.FileKind.FOLDER}return de.collapsibleState===I.TreeItemCollapsibleState.Collapsed||de.collapsibleState===I.TreeItemCollapsibleState.Expanded?b.FileKind.FOLDER:b.FileKind.FILE}disposeElement(de,Se,we){we.elementDisposable.dispose()}disposeTemplate(de){de.resourceLabel.dispose(),de.actionBar.dispose(),de.elementDisposable.dispose()}};oe.ITEM_HEIGHT=22,oe.TREE_TEMPLATE_ID="treeExplorer",oe=Ee([W(5,v.IThemeService),W(6,w.IConfigurationService),W(7,x.ILabelService),W(8,P.IHoverService),W(9,X.ITreeViewsService)],oe);class fe extends t.Disposable{constructor(de){super();this.themeService=de}set tree(de){this._tree=de}alignIconWithTwisty(de){if(de.collapsibleState!==I.TreeItemCollapsibleState.None||!this.hasIcon(de))return!1;if(this._tree){const Se=this._tree.getParentElement(de)||this._tree.getInput();return this.hasIcon(Se)?!!Se.children&&Se.children.some(we=>we.collapsibleState!==I.TreeItemCollapsibleState.None&&!this.hasIcon(we)):!!Se.children&&Se.children.every(we=>we.collapsibleState===I.TreeItemCollapsibleState.None||!this.hasIcon(we))}else return!1}hasIcon(de){if(this.themeService.getColorTheme().type===z.ColorScheme.LIGHT?de.icon:de.iconDark)return!0;if(de.resourceUri||de.themeIcon){const we=this.themeService.getFileIconTheme();return(de.themeIcon?de.themeIcon.id===v.FolderThemeIcon.id:de.collapsibleState!==I.TreeItemCollapsibleState.None)?we.hasFileIcons&&we.hasFolderIcons:we.hasFileIcons}return!1}}class pe extends s.ActionRunner{constructor(de,Se){super();this.getSelectedResources=Se,this._register(this.onDidRun(we=>{we.error&&!(0,q.isCancellationError)(we.error)&&de.error((0,y.localize)(6,null,we.error.message,we.action.id))}))}async runAction(de,Se){const we=this.getSelectedResources();let ye,ke=!1;we.length>1&&(ye=we.map(Ie=>(Ie.handle===Se.$treeItemHandle&&(ke=!0),{$treeViewId:Se.$treeViewId,$treeItemHandle:Ie.handle}))),ke||(ye=void 0),await de.run(Se,ye)}}let me=class extends t.Disposable{constructor(de,Se){super();this.id=de,this.menuService=Se,this._onDidChange=new S.Emitter,this.onDidChange=this._onDidChange.event}getResourceActions(de){const Se=this.getActions(k.MenuId.ViewItemContext,de,!0);return{menu:Se.menu,actions:Se.primary}}getResourceContextActions(de){return this.getActions(k.MenuId.ViewItemContext,de).secondary}setContextKeyService(de){this.contextKeyService=de}getActions(de,Se,we=!1){if(!this.contextKeyService)return{primary:[],secondary:[]};const ye=this.contextKeyService.createOverlay([["view",this.id],["viewItem",Se.contextValue]]),ke=this.menuService.createMenu(de,ye),De={primary:[],secondary:[],menu:ke};return(0,l.createAndFillInContextMenuActions)(ke,{shouldForwardArgs:!0},De,"inline"),we?this._register(ke.onDidChange(()=>this._onDidChange.fire(Se))):ke.dispose(),De}};me=Ee([W(1,k.IMenuService)],me);let be=class extends ce{constructor(de,Se,we,ye,ke,Ie,Te,De,_e,Re,Ne,xe,Ae,Le){super(de,Se,we,ye,ke,Ie,Te,De,_e,Re,Ne,Ae,xe);this.extensionService=Le,this.activated=!1}activate(){this.activated||(this.createTree(),this.progressService.withProgress({location:this.id},()=>this.extensionService.activateByEvent(`onView:${this.id}`)).then(()=>(0,T.timeout)(2e3)).then(()=>{this.updateMessage()}),this.activated=!0)}};be=Ee([W(2,v.IThemeService),W(3,f.IInstantiationService),W(4,a.ICommandService),W(5,w.IConfigurationService),W(6,p.IProgressService),W(7,A.IContextMenuService),W(8,_.IKeybindingService),W(9,r.INotificationService),W(10,I.IViewDescriptorService),W(11,D.IContextKeyService),W(12,P.IHoverService),W(13,u.IExtensionService)],be),e.CustomTreeView=be;class Ce extends ce{constructor(){super(...arguments);this.activated=!1}activate(){this.activated||(this.createTree(),this.activated=!0)}}e.TreeView=Ce;const ve=[Z.CodeDataTransfers.EDITORS.toLowerCase(),Z.CodeDataTransfers.FILES.toLowerCase()];let he=class{constructor(de,Se,we,ye,ke){this.treeId=de,this.labelService=Se,this.instantiationService=we,this.treeViewsDragAndDropService=ye,this.logService=ke,this.treeItemsTransfer=Z.LocalSelectionTransfer.getInstance(),this.treeMimeType=`application/vnd.code.tree.${de.toLowerCase()}`}set controller(de){this.dndController=de}handleDragAndLog(de,Se,we,ye){return de.handleDrag(Se,we,ye).then(ke=>{if(ke){const Ie=[];for(const Te of ke.entries())Te[0]!==this.treeMimeType&&de.dragMimeTypes.findIndex(De=>De===Te[0])<0&&Ie.push(Te[0]);Ie.length&&this.logService.warn(`Drag and drop controller for tree ${this.treeId} adds the following data transfer types but does not declare them in dragMimeTypes: ${Ie.join(", ")}`)}return ke})}addExtensionProvidedTransferTypes(de,Se){if(!de.dataTransfer||!this.dndController)return;const we=(0,Y.generateUuid)();this.dragCancellationToken=new G.CancellationTokenSource,this.treeViewsDragAndDropService.addDragOperationTransfer(we,this.handleDragAndLog(this.dndController,Se,we,this.dragCancellationToken.token)),this.treeItemsTransfer.setData([new Z.DraggedTreeItemsIdentifier(we)],Z.DraggedTreeItemsIdentifier.prototype),this.dndController.dragMimeTypes.find(ye=>ye===J.Mimes.uriList)&&de.dataTransfer?.setData(F.DataTransfers.RESOURCES,""),this.dndController.dragMimeTypes.forEach(ye=>{de.dataTransfer?.setData(ye,"")})}addResourceInfoToTransfer(de,Se){if(Se.length&&de.dataTransfer){this.instantiationService.invokeFunction(ye=>(0,Z.fillEditorsDragData)(ye,Se,de));const we=Se.filter(ye=>ye.scheme===j.Schemas.file).map(ye=>ye.fsPath);we.length&&de.dataTransfer.setData(Z.CodeDataTransfers.FILES,JSON.stringify(we))}}onDragStart(de,Se){if(Se.dataTransfer){const we=de.getData(),ye=[],ke={id:this.treeId,itemHandles:[]};we.forEach(Ie=>{ke.itemHandles.push(Ie.handle),Ie.resourceUri&&ye.push(d.URI.revive(Ie.resourceUri))}),this.addResourceInfoToTransfer(Se,ye),this.addExtensionProvidedTransferTypes(Se,ke.itemHandles),Se.dataTransfer.setData(this.treeMimeType,JSON.stringify(ke))}}debugLog(de){const Se=new Set;de.dataTransfer?.types.forEach((we,ye)=>{de.dataTransfer?.items[ye].kind==="string"&&ve.indexOf(we)<0&&Se.add(this.convertKnownMimes(we).type)}),Se.size?this.logService.debug(`TreeView dragged mime types: ${Array.from(Se).join(", ")}`):this.logService.debug("TreeView dragged with no supported mime types.")}onDragOver(de,Se,we,ye){this.debugLog(ye);const ke=this.dndController;return!ke||!ye.dataTransfer||ke.dropMimeTypes.length===0?!1:ye.dataTransfer.types.some((Te,De)=>Te===this.treeMimeType?!0:ke.dropMimeTypes.indexOf(Te)>=0)?{accept:!0,bubble:0,autoExpand:!0}:!1}getDragURI(de){return this.dndController?de.resourceUri?d.URI.revive(de.resourceUri).toString():de.handle:null}getDragLabel(de){if(!this.dndController)return;if(de.length>1)return String(de.length);const Se=de[0];return Se.label?Se.label.label:Se.resourceUri?this.labelService.getUriLabel(d.URI.revive(Se.resourceUri)):void 0}convertKnownMimes(de,Se){let we=Se,ye=de;switch(de){case F.DataTransfers.RESOURCES.toLowerCase():{we=Se?(0,Z.convertResourceUrlsToUriList)(Se):void 0,ye=J.Mimes.uriList;break}}return{type:ye,value:we}}async drop(de,Se,we,ye){const ke=this.dndController;if(!ye.dataTransfer||!ke)return;const Ie=new Map;let Te=Array.from(ye.dataTransfer.items).reduce((Ne,xe)=>xe.kind==="string"?Ne+1:Ne,0),De,_e;this.treeItemsTransfer.hasData(Z.DraggedTreeItemsIdentifier.prototype)&&(_e=this.treeItemsTransfer.getData(Z.DraggedTreeItemsIdentifier.prototype)[0].identifier),await new Promise(Ne=>{function xe(){Te--,Te===0&&Ne()}if(!!ye.dataTransfer)for(const Ae of ye.dataTransfer.items){const Le=Ae.type,Me=this.convertKnownMimes(Le).type;Ae.kind==="string"&&(Me===this.treeMimeType||ke.dropMimeTypes.indexOf(Me)>=0?Ae.getAsString(We=>{if(Me===this.treeMimeType&&(De=JSON.parse(We)),We&&ve.indexOf(Me)<0&&(Me===this.treeMimeType||ke.dropMimeTypes.indexOf(Me)>=0)){const Ve=this.convertKnownMimes(Le,We);Ie.set(Ve.type,{asString:()=>Promise.resolve(Ve.value),value:void 0})}xe()}):xe())}});const Re=this.treeViewsDragAndDropService.removeDragOperationTransfer(_e);return Re?Re.then(Ne=>{if(Ne)for(const xe of Ne.entries())Ie.set(xe[0],xe[1]);return ke.handleDrop(Ie,Se,new G.CancellationTokenSource().token,_e,De?.id,De?.itemHandles)}):ke.handleDrop(Ie,Se,new G.CancellationTokenSource().token,_e,De?.id,De?.itemHandles)}onDragEnd(de){de.dataTransfer?.dropEffect==="none"&&this.dragCancellationToken?.cancel()}};he=Ee([W(1,x.ILabelService),W(2,f.IInstantiationService),W(3,X.ITreeViewsService),W(4,$.ILogService)],he),e.CustomTreeViewDragAndDrop=he}),define(ne[161],re([1,0,10,137,129,715,11,6,97,2,13,1426,73,16,8,7,37,5,24,27,32,68,12,34,565,156,567,82,43,74,40,80,677]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewPaneContainerAction=e.ViewPaneContainer=e.ViewsSubMenu=void 0,e.ViewsSubMenu=new c.MenuId("Views"),c.MenuRegistry.appendMenuItem(c.MenuId.ViewContainerTitle,{submenu:e.ViewsSubMenu,title:C.localize(0,null),order:1,when:S.ContextKeyExpr.equals("viewContainerLocation",(0,E.ViewContainerLocationToString)(0))});var O;(function(B){B[B.UP=0]="UP",B[B.DOWN=1]="DOWN",B[B.LEFT=2]="LEFT",B[B.RIGHT=3]="RIGHT"})(O||(O={}));class x extends n.Themable{constructor(P,V,z,U,H){super(H);this.paneElement=P,this.orientation=V,this.bounds=z,this.location=U,this.cleanupOverlayScheduler=this._register(new k.RunOnceScheduler(()=>this.dispose(),300)),this.create()}get currentDropOperation(){return this._currentDropOperation}get disposed(){return!!this._disposed}create(){this.container=document.createElement("div"),this.container.id=x.OVERLAY_ID,this.container.style.top="0px",this.paneElement.appendChild(this.container),this.paneElement.classList.add("dragged-over"),this._register((0,w.toDisposable)(()=>{this.paneElement.removeChild(this.container),this.paneElement.classList.remove("dragged-over")})),this.overlay=document.createElement("div"),this.overlay.classList.add("pane-overlay-indicator"),this.container.appendChild(this.overlay),this.registerListeners(),this.updateStyles()}updateStyles(){this.overlay.style.backgroundColor=this.getColor(this.location===1?b.PANEL_SECTION_DRAG_AND_DROP_BACKGROUND:b.SIDE_BAR_DRAG_AND_DROP_BACKGROUND)||"";const P=this.getColor(u.activeContrastBorder);this.overlay.style.outlineColor=P||"",this.overlay.style.outlineOffset=P?"-2px":"",this.overlay.style.outlineStyle=P?"dashed":"",this.overlay.style.outlineWidth=P?"2px":"",this.overlay.style.borderColor=P||"",this.overlay.style.borderStyle="solid",this.overlay.style.borderWidth="0px"}registerListeners(){this._register(new t.DragAndDropObserver(this.container,{onDragEnter:P=>{},onDragOver:P=>{this.positionOverlay(P.offsetX,P.offsetY),this.cleanupOverlayScheduler.isScheduled()&&this.cleanupOverlayScheduler.cancel()},onDragLeave:P=>this.dispose(),onDragEnd:P=>this.dispose(),onDrop:P=>{this.dispose()}})),this._register((0,t.addDisposableListener)(this.container,t.EventType.MOUSE_OVER,()=>{this.cleanupOverlayScheduler.isScheduled()||this.cleanupOverlayScheduler.schedule()}))}positionOverlay(P,V){const z=this.paneElement.clientWidth,U=this.paneElement.clientHeight,H=z/2,K=U/2;let G;switch(this.orientation===0?V<K?G=0:V>=K&&(G=1):this.orientation===1&&(P<H?G=2:P>=H&&(G=3)),G){case 0:this.doPositionOverlay({top:"0",left:"0",width:"100%",height:"50%"});break;case 1:this.doPositionOverlay({bottom:"0",left:"0",width:"100%",height:"50%"});break;case 2:this.doPositionOverlay({top:"0",left:"0",width:"50%",height:"100%"});break;case 3:this.doPositionOverlay({top:"0",right:"0",width:"50%",height:"100%"});break;default:{let q="0",Z="0",j="100%",X="100%";if(this.bounds){const Y=this.container.getBoundingClientRect();q=`${this.bounds.top-Y.top}px`,Z=`${this.bounds.left-Y.left}px`,X=`${this.bounds.bottom-this.bounds.top}px`,j=`${this.bounds.right-this.bounds.left}px`}this.doPositionOverlay({top:q,left:Z,width:j,height:X})}}this.orientation===0&&U<=25||this.orientation===1&&z<=25?this.doUpdateOverlayBorder(G):this.doUpdateOverlayBorder(void 0),this.overlay.style.opacity="1",setTimeout(()=>this.overlay.classList.add("overlay-move-transition"),0),this._currentDropOperation=G}doUpdateOverlayBorder(P){this.overlay.style.borderTopWidth=P===0?"2px":"0px",this.overlay.style.borderLeftWidth=P===2?"2px":"0px",this.overlay.style.borderBottomWidth=P===1?"2px":"0px",this.overlay.style.borderRightWidth=P===3?"2px":"0px"}doPositionOverlay(P){this.container.style.height="100%",this.overlay.style.top=P.top||"",this.overlay.style.left=P.left||"",this.overlay.style.bottom=P.bottom||"",this.overlay.style.right=P.right||"",this.overlay.style.width=P.width,this.overlay.style.height=P.height}contains(P){return P===this.container||P===this.overlay}dispose(){super.dispose(),this._disposed=!0}}x.OVERLAY_ID="monaco-pane-drop-overlay";let F=class extends g.CompositeMenuActions{constructor(P,V,z,U,H){const K=U.createScoped(P);K.createKey("viewContainer",V.id);const G=K.createKey("viewContainerLocation",(0,E.ViewContainerLocationToString)(z.getViewContainerLocation(V)));super(c.MenuId.ViewContainerTitle,c.MenuId.ViewContainerTitleContext,{shouldForwardArgs:!0},K,H);this._register(K),this._register(D.Event.filter(z.onDidChangeContainerLocation,q=>q.viewContainer===V)(()=>G.set((0,E.ViewContainerLocationToString)(z.getViewContainerLocation(V)))))}};F=Ee([W(2,E.IViewDescriptorService),W(3,S.IContextKeyService),W(4,c.IMenuService)],F);let L=class extends m.Component{constructor(P,V,z,U,H,K,G,q,Z,j,X,Y){super(P,Z,j);this.options=V,this.instantiationService=z,this.configurationService=U,this.layoutService=H,this.contextMenuService=K,this.telemetryService=G,this.extensionService=q,this.storageService=j,this.contextService=X,this.viewDescriptorService=Y,this.paneItems=[],this.visible=!1,this.areExtensionsReady=!1,this.didLayout=!1,this.viewDisposables=[],this._onTitleAreaUpdate=this._register(new D.Emitter),this.onTitleAreaUpdate=this._onTitleAreaUpdate.event,this._onDidChangeVisibility=this._register(new D.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._onDidAddViews=this._register(new D.Emitter),this.onDidAddViews=this._onDidAddViews.event,this._onDidRemoveViews=this._register(new D.Emitter),this.onDidRemoveViews=this._onDidRemoveViews.event,this._onDidChangeViewVisibility=this._register(new D.Emitter),this.onDidChangeViewVisibility=this._onDidChangeViewVisibility.event,this._onDidFocusView=this._register(new D.Emitter),this.onDidFocusView=this._onDidFocusView.event,this._onDidBlurView=this._register(new D.Emitter),this.onDidBlurView=this._onDidBlurView.event;const $=this.viewDescriptorService.getViewContainerById(P);if(!$)throw new Error("Could not find container");this.viewContainer=$,this.visibleViewsStorageId=`${P}.numberOfVisibleViews`,this.visibleViewsCountFromCache=this.storageService.getNumber(this.visibleViewsStorageId,1,void 0),this._register((0,w.toDisposable)(()=>this.viewDisposables=(0,w.dispose)(this.viewDisposables))),this.viewContainerModel=this.viewDescriptorService.getViewContainerModel($)}get onDidSashChange(){return(0,v.assertIsDefined)(this.paneview).onDidSashChange}get panes(){return this.paneItems.map(P=>P.pane)}get views(){return this.panes}get length(){return this.paneItems.length}get menuActions(){return this._menuActions}create(P){const V=this.options;V.orientation=this.orientation,this.paneview=this._register(new A.PaneView(P,this.options)),this._register(this.paneview.onDidDrop(({from:q,to:Z})=>this.movePane(q,Z))),this._register(this.paneview.onDidScroll(q=>this.onDidScrollPane())),this._register(this.paneview.onDidSashReset(q=>this.onDidSashReset(q))),this._register((0,t.addDisposableListener)(P,t.EventType.CONTEXT_MENU,q=>this.showContextMenu(new f.StandardMouseEvent(q)))),this._register(_.Gesture.addTarget(P)),this._register((0,t.addDisposableListener)(P,_.EventType.Contextmenu,q=>this.showContextMenu(new f.StandardMouseEvent(q)))),this._menuActions=this._register(this.instantiationService.createInstance(F,this.paneview.element,this.viewContainer)),this._register(this._menuActions.onDidChange(()=>this.updateTitleArea()));let z;const U=()=>{const q=P.getBoundingClientRect(),Z=this.panes[this.panes.length-1].element.getBoundingClientRect(),j=this.orientation===0?Z.bottom:q.top,X=this.orientation===1?Z.right:q.left;return{top:j,bottom:q.bottom,left:X,right:q.right}},H=(q,Z)=>Z.x>=q.left&&Z.x<=q.right&&Z.y>=q.top&&Z.y<=q.bottom;let K;this._register(d.CompositeDragAndDropObserver.INSTANCE.registerTarget(P,{onDragEnter:q=>{if(K=U(),z&&z.disposed&&(z=void 0),!z&&H(K,q.eventData)){const Z=q.dragAndDropData.getData();if(Z.type==="view"){const j=this.viewDescriptorService.getViewContainerByViewId(Z.id),X=this.viewDescriptorService.getViewDescriptorById(Z.id);if(j!==this.viewContainer&&(!X||!X.canMoveView||this.viewContainer.rejectAddedViews))return;z=new x(P,void 0,K,this.viewDescriptorService.getViewContainerLocation(this.viewContainer),this.themeService)}if(Z.type==="composite"&&Z.id!==this.viewContainer.id){const j=this.viewDescriptorService.getViewContainerById(Z.id),X=this.viewDescriptorService.getViewContainerModel(j).allViewDescriptors;!X.some(Y=>!Y.canMoveView)&&X.length>0&&(z=new x(P,void 0,K,this.viewDescriptorService.getViewContainerLocation(this.viewContainer),this.themeService))}}},onDragOver:q=>{z&&z.disposed&&(z=void 0),z&&!H(K,q.eventData)&&(z.dispose(),z=void 0),H(K,q.eventData)&&(0,d.toggleDropEffect)(q.eventData.dataTransfer,"move",z!==void 0)},onDragLeave:q=>{z?.dispose(),z=void 0},onDrop:q=>{if(z){const Z=q.dragAndDropData.getData(),j=[];if(Z.type==="composite"&&Z.id!==this.viewContainer.id){const Y=this.viewDescriptorService.getViewContainerById(Z.id),$=this.viewDescriptorService.getViewContainerModel(Y).allViewDescriptors;$.some(J=>!J.canMoveView)||j.push(...$)}else if(Z.type==="view"){const Y=this.viewDescriptorService.getViewContainerByViewId(Z.id),$=this.viewDescriptorService.getViewDescriptorById(Z.id);Y!==this.viewContainer&&$&&$.canMoveView&&this.viewDescriptorService.moveViewsToContainer([$],this.viewContainer)}const X=this.panes.length;if(j.length>0&&this.viewDescriptorService.moveViewsToContainer(j,this.viewContainer),X>0)for(const Y of j){const $=this.panes.find(J=>J.id===Y.id);$&&this.movePane($,this.panes[this.panes.length-1])}}z?.dispose(),z=void 0}})),this._register(this.onDidSashChange(()=>this.saveViewSizes())),this._register(this.viewContainerModel.onDidAddVisibleViewDescriptors(q=>this.onDidAddViewDescriptors(q))),this._register(this.viewContainerModel.onDidRemoveVisibleViewDescriptors(q=>this.onDidRemoveViewDescriptors(q)));const G=this.viewContainerModel.visibleViewDescriptors.map((q,Z)=>{const j=this.viewContainerModel.getSize(q.id),X=this.viewContainerModel.isCollapsed(q.id);return{viewDescriptor:q,index:Z,size:j,collapsed:X}});G.length&&this.onDidAddViewDescriptors(G),this.extensionService.whenInstalledExtensionsRegistered().then(()=>{this.areExtensionsReady=!0,this.panes.length&&(this.updateTitleArea(),this.updateViewHeaders())}),this._register(this.viewContainerModel.onDidChangeActiveViewDescriptors(()=>this._onTitleAreaUpdate.fire()))}getTitle(){const P=this.viewContainerModel.title;if(this.isViewMergedWithContainer()){const V=this.paneItems[0].pane.title;return P===V?this.paneItems[0].pane.title:V?`${P}: ${V}`:P}return P}showContextMenu(P){for(const z of this.paneItems)if((0,t.isAncestor)(P.target,z.pane.element))return;P.stopPropagation(),P.preventDefault();let V={x:P.posx,y:P.posy};this.contextMenuService.showContextMenu({getAnchor:()=>V,getActions:()=>this.menuActions?.getContextMenuActions()??[]})}getActionsContext(){}getActionViewItem(P){return this.isViewMergedWithContainer()?this.paneItems[0].pane.getActionViewItem(P):(0,o.createActionViewItem)(this.instantiationService,P)}focus(){if(this.lastFocusedPane)this.lastFocusedPane.focus();else if(this.paneItems.length>0){for(const{pane:P}of this.paneItems)if(P.isExpanded()){P.focus();return}}}get orientation(){switch(this.viewDescriptorService.getViewContainerLocation(this.viewContainer)){case 0:case 2:return 0;case 1:return this.layoutService.getPanelPosition()===2?1:0}return 0}layout(P){this.paneview&&(this.paneview.orientation!==this.orientation&&this.paneview.flipOrientation(P.height,P.width),this.paneview.layout(P.height,P.width)),this.dimension=P,this.didLayout?this.saveViewSizes():(this.didLayout=!0,this.restoreViewSizes())}getOptimalWidth(){const P=16;return Math.max(...this.panes.map(z=>z.getOptimalWidth()||0))+P}addPanes(P){const V=this.isViewMergedWithContainer();for(const{pane:z,size:U,index:H}of P)this.addPane(z,U,H);this.updateViewHeaders(),this.isViewMergedWithContainer()!==V&&this.updateTitleArea(),this._onDidAddViews.fire(P.map(({pane:z})=>z))}setVisible(P){this.visible!==!!P&&(this.visible=P,this._onDidChangeVisibility.fire(P)),this.panes.filter(V=>V.isVisible()!==P).map(V=>V.setVisible(P))}isVisible(){return this.visible}updateTitleArea(){this._onTitleAreaUpdate.fire()}createView(P,V){return this.instantiationService.createInstance(P.ctorDescriptor.ctor,...P.ctorDescriptor.staticArguments||[],V)}getView(P){return this.panes.filter(V=>V.id===P)[0]}saveViewSizes(){this.didLayout&&this.viewContainerModel.setSizes(this.panes.map(P=>({id:P.id,size:this.getPaneSize(P)})))}restoreViewSizes(){if(this.didLayout){let P;for(let V=0;V<this.viewContainerModel.visibleViewDescriptors.length;V++){const z=this.panes[V],U=this.viewContainerModel.visibleViewDescriptors[V],H=this.viewContainerModel.getSize(U.id);typeof H=="number"?this.resizePane(z,H):(P=P||this.computeInitialSizes(),this.resizePane(z,P.get(z.id)||200))}}}computeInitialSizes(){const P=new Map;if(this.dimension){const V=this.viewContainerModel.visibleViewDescriptors.reduce((z,{weight:U})=>z+(U||20),0);for(const z of this.viewContainerModel.visibleViewDescriptors)this.orientation===0?P.set(z.id,this.dimension.height*(z.weight||20)/V):P.set(z.id,this.dimension.width*(z.weight||20)/V)}return P}saveState(){this.panes.forEach(P=>P.saveState()),this.storageService.store(this.visibleViewsStorageId,this.length,1,0)}onContextMenu(P,V){P.stopPropagation(),P.preventDefault();const z=V.menuActions.getContextMenuActions();let U={x:P.posx,y:P.posy};this.contextMenuService.showContextMenu({getAnchor:()=>U,getActions:()=>z})}openView(P,V){let z=this.getView(P);return z||this.toggleViewVisibility(P),z=this.getView(P),z&&(z.setExpanded(!0),V&&z.focus()),z}onDidAddViewDescriptors(P){const V=[];for(const{viewDescriptor:U,collapsed:H,index:K,size:G}of P){const q=this.createView(U,{id:U.id,title:U.name,fromExtensionId:U.extensionId,expanded:!H});q.render();const Z=(0,t.addDisposableListener)(q.draggableElement,"contextmenu",X=>{X.stopPropagation(),X.preventDefault(),this.onContextMenu(new f.StandardMouseEvent(X),q)}),j=D.Event.latch(D.Event.map(q.onDidChange,()=>!q.isExpanded()))(X=>{this.viewContainerModel.setCollapsed(U.id,X)});this.viewDisposables.splice(K,0,(0,w.combinedDisposable)(Z,j)),V.push({pane:q,size:G||q.minimumSize,index:K})}this.addPanes(V),this.restoreViewSizes();const z=[];for(const{pane:U}of V)U.setVisible(this.isVisible()),z.push(U);return z}onDidRemoveViewDescriptors(P){P=P.sort((z,U)=>U.index-z.index);const V=[];for(const{index:z}of P){const[U]=this.viewDisposables.splice(z,1);U.dispose(),V.push(this.panes[z])}this.removePanes(V);for(const z of V)z.setVisible(!1)}toggleViewVisibility(P){if(this.viewContainerModel.activeViewDescriptors.some(V=>V.id===P)){const V=!this.viewContainerModel.isVisible(P);this.telemetryService.publicLog2("views.toggleVisibility",{viewId:P,visible:V}),this.viewContainerModel.setVisible(P,V)}}addPane(P,V,z=this.paneItems.length-1){const U=P.onDidFocus(()=>{this._onDidFocusView.fire(P),this.lastFocusedPane=P}),H=P.onDidBlur(()=>this._onDidBlurView.fire(P)),K=P.onDidChangeTitleArea(()=>{this.isViewMergedWithContainer()&&this.updateTitleArea()}),G=P.onDidChangeBodyVisibility(()=>this._onDidChangeViewVisibility.fire(P)),q=P.onDidChange(()=>{P===this.lastFocusedPane&&!P.isExpanded()&&(this.lastFocusedPane=void 0)}),Z=this.viewDescriptorService.getViewContainerLocation(this.viewContainer)===1,j=(0,a.attachStyler)(this.themeService,{headerForeground:Z?b.PANEL_SECTION_HEADER_FOREGROUND:b.SIDE_BAR_SECTION_HEADER_FOREGROUND,headerBackground:Z?b.PANEL_SECTION_HEADER_BACKGROUND:b.SIDE_BAR_SECTION_HEADER_BACKGROUND,headerBorder:Z?b.PANEL_SECTION_HEADER_BORDER:b.SIDE_BAR_SECTION_HEADER_BORDER,dropBackground:Z?b.PANEL_SECTION_DRAG_AND_DROP_BACKGROUND:b.SIDE_BAR_DRAG_AND_DROP_BACKGROUND,leftBorder:Z?b.PANEL_SECTION_BORDER:void 0},P),X=(0,w.combinedDisposable)(P,U,H,K,j,q,G),Y={pane:P,disposable:X};this.paneItems.splice(z,0,Y),(0,v.assertIsDefined)(this.paneview).addPane(P,V,z);let $;this._register(d.CompositeDragAndDropObserver.INSTANCE.registerDraggable(P.draggableElement,()=>({type:"view",id:P.id}),{})),this._register(d.CompositeDragAndDropObserver.INSTANCE.registerTarget(P.dropTargetElement,{onDragEnter:J=>{if(!$){const ee=J.dragAndDropData.getData();if(ee.type==="view"&&ee.id!==P.id){const te=this.viewDescriptorService.getViewContainerByViewId(ee.id),se=this.viewDescriptorService.getViewDescriptorById(ee.id);if(te!==this.viewContainer&&(!se||!se.canMoveView||this.viewContainer.rejectAddedViews))return;$=new x(P.dropTargetElement,this.orientation??0,void 0,this.viewDescriptorService.getViewContainerLocation(this.viewContainer),this.themeService)}if(ee.type==="composite"&&ee.id!==this.viewContainer.id&&!this.viewContainer.rejectAddedViews){const te=this.viewDescriptorService.getViewContainerById(ee.id),se=this.viewDescriptorService.getViewContainerModel(te).allViewDescriptors;!se.some(ie=>!ie.canMoveView)&&se.length>0&&($=new x(P.dropTargetElement,this.orientation??0,void 0,this.viewDescriptorService.getViewContainerLocation(this.viewContainer),this.themeService))}}},onDragOver:J=>{(0,d.toggleDropEffect)(J.eventData.dataTransfer,"move",$!==void 0)},onDragLeave:J=>{$?.dispose(),$=void 0},onDrop:J=>{if($){const ee=J.dragAndDropData.getData(),te=[];let se;if(ee.type==="composite"&&ee.id!==this.viewContainer.id&&!this.viewContainer.rejectAddedViews){const ie=this.viewDescriptorService.getViewContainerById(ee.id),ce=this.viewDescriptorService.getViewContainerModel(ie).allViewDescriptors;ce.length>0&&!ce.some(le=>!le.canMoveView)&&(te.push(...ce),se=ce[0])}else if(ee.type==="view"){const ie=this.viewDescriptorService.getViewContainerByViewId(ee.id),ce=this.viewDescriptorService.getViewDescriptorById(ee.id);ie!==this.viewContainer&&ce&&ce.canMoveView&&!this.viewContainer.rejectAddedViews&&te.push(ce),ce&&(se=ce)}if(te&&this.viewDescriptorService.moveViewsToContainer(te,this.viewContainer),se){if($.currentDropOperation===1||$.currentDropOperation===3){const ie=this.panes.findIndex(le=>le.id===se.id);let ce=this.panes.findIndex(le=>le.id===P.id);ie>=0&&ce>=0&&(ie>ce&&ce++,ce<this.panes.length&&ce!==ie&&this.movePane(this.panes[ie],this.panes[ce]))}if($.currentDropOperation===0||$.currentDropOperation===2){const ie=this.panes.findIndex(le=>le.id===se.id);let ce=this.panes.findIndex(le=>le.id===P.id);ie>=0&&ce>=0&&(ie<ce&&ce--,ce>=0&&ce!==ie&&this.movePane(this.panes[ie],this.panes[ce]))}te.length>1&&te.slice(1).forEach(ie=>{let ce=this.panes.findIndex(ae=>ae.id===se.id),le=this.panes.findIndex(ae=>ae.id===ie.id);le>=0&&ce>=0&&(le>ce&&ce++,ce<this.panes.length&&ce!==le&&(this.movePane(this.panes[le],this.panes[ce]),se=ie))})}}$?.dispose(),$=void 0}}))}removePanes(P){const V=this.isViewMergedWithContainer();P.forEach(z=>this.removePane(z)),this.updateViewHeaders(),V!==this.isViewMergedWithContainer()&&this.updateTitleArea(),this._onDidRemoveViews.fire(P)}removePane(P){const V=this.paneItems.findIndex(U=>U.pane===P);if(V===-1)return;this.lastFocusedPane===P&&(this.lastFocusedPane=void 0),(0,v.assertIsDefined)(this.paneview).removePane(P);const[z]=this.paneItems.splice(V,1);z.disposable.dispose()}movePane(P,V){const z=this.paneItems.findIndex(q=>q.pane===P),U=this.paneItems.findIndex(q=>q.pane===V),H=this.viewContainerModel.visibleViewDescriptors[z],K=this.viewContainerModel.visibleViewDescriptors[U];if(z<0||z>=this.paneItems.length||U<0||U>=this.paneItems.length)return;const[G]=this.paneItems.splice(z,1);this.paneItems.splice(U,0,G),(0,v.assertIsDefined)(this.paneview).movePane(P,V),this.viewContainerModel.move(H.id,K.id),this.updateTitleArea()}resizePane(P,V){(0,v.assertIsDefined)(this.paneview).resizePane(P,V)}getPaneSize(P){return(0,v.assertIsDefined)(this.paneview).getPaneSize(P)}updateViewHeaders(){this.isViewMergedWithContainer()?(this.paneItems[0].pane.isExpanded()?this.lastMergedCollapsedPane=void 0:(this.lastMergedCollapsedPane=this.paneItems[0].pane,this.paneItems[0].pane.setExpanded(!0)),this.paneItems[0].pane.headerVisible=!1):(this.paneItems.forEach(P=>{P.pane.headerVisible=!0,P.pane===this.lastMergedCollapsedPane&&P.pane.setExpanded(!1)}),this.lastMergedCollapsedPane=void 0)}isViewMergedWithContainer(){return this.options.mergeViewWithContainerWhenSingleView&&this.paneItems.length===1?this.areExtensionsReady?!0:this.visibleViewsCountFromCache===void 0?this.viewDescriptorService.getViewContainerLocation(this.viewContainer)===1:this.visibleViewsCountFromCache===1:!1}onDidScrollPane(){for(const P of this.panes)P.onDidScrollRoot()}onDidSashReset(P){let V,z;for(let U=P;U>=0;U--)if(this.paneItems[U].pane?.isVisible()&&this.paneItems[U]?.pane.isExpanded()){V=this.paneItems[U].pane;break}for(let U=P+1;U<this.paneItems.length;U++)if(this.paneItems[U].pane?.isVisible()&&this.paneItems[U]?.pane.isExpanded()){z=this.paneItems[U].pane;break}if(V&&z){const U=this.getPaneSize(V),H=this.getPaneSize(z),K=Math.ceil((U+H)/2),G=Math.floor((U+H)/2);U>H?(this.resizePane(V,K),this.resizePane(z,G)):(this.resizePane(z,G),this.resizePane(V,K))}}dispose(){super.dispose(),this.paneItems.forEach(P=>P.disposable.dispose()),this.paneview&&this.paneview.dispose()}};L=Ee([W(2,l.IInstantiationService),W(3,i.IConfigurationService),W(4,R.IWorkbenchLayoutService),W(5,s.IContextMenuService),W(6,p.ITelemetryService),W(7,T.IExtensionService),W(8,n.IThemeService),W(9,r.IStorageService),W(10,h.IWorkspaceContextService),W(11,E.IViewDescriptorService)],L),e.ViewPaneContainer=L;class M extends c.Action2{constructor(P){super(P);this.desc=P}run(P,...V){const z=P.get(E.IViewsService).getActiveViewPaneContainerWithId(this.desc.viewPaneContainerId);if(z)return this.runInViewPaneContainer(P,z,...V)}}e.ViewPaneContainerAction=M;class N extends c.Action2{constructor(P,V){super(P);this.offset=V}async run(P){const V=P.get(E.IViewDescriptorService),z=P.get(S.IContextKeyService),U=y.FocusedViewContext.getValue(z);if(U===void 0)return;const H=V.getViewContainerByViewId(U),K=V.getViewContainerModel(H),G=K.visibleViewDescriptors.find(j=>j.id===U),q=K.visibleViewDescriptors.indexOf(G);if(q+this.offset<0||q+this.offset>=K.visibleViewDescriptors.length)return;const Z=K.visibleViewDescriptors[q+this.offset];K.move(G.id,Z.id)}}(0,c.registerAction2)(class extends N{constructor(){super({id:"views.moveViewUp",title:C.localize(1,null),keybinding:{primary:(0,I.KeyChord)(2048+41,16),weight:200+1,when:y.FocusedViewContext.notEqualsTo("")}},-1)}}),(0,c.registerAction2)(class extends N{constructor(){super({id:"views.moveViewLeft",title:C.localize(2,null),keybinding:{primary:(0,I.KeyChord)(2048+41,15),weight:200+1,when:y.FocusedViewContext.notEqualsTo("")}},-1)}}),(0,c.registerAction2)(class extends N{constructor(){super({id:"views.moveViewDown",title:C.localize(3,null),keybinding:{primary:(0,I.KeyChord)(2048+41,18),weight:200+1,when:y.FocusedViewContext.notEqualsTo("")}},1)}}),(0,c.registerAction2)(class extends N{constructor(){super({id:"views.moveViewRight",title:C.localize(4,null),keybinding:{primary:(0,I.KeyChord)(2048+41,17),weight:200+1,when:y.FocusedViewContext.notEqualsTo("")}},1)}}),(0,c.registerAction2)(class extends c.Action2{constructor(){super({id:"vscode.moveViews",title:C.localize(5,null)})}async run(P,V){if(!Array.isArray(V?.viewIds)||typeof V?.destinationId!="string")return Promise.reject("Invalid arguments");const z=P.get(E.IViewDescriptorService),U=z.getViewContainerById(V.destinationId);if(!!U){for(const H of V.viewIds){const K=z.getViewDescriptorById(H);K?.canMoveView&&z.moveViewsToContainer([K],U,E.ViewVisibilityState.Default)}await P.get(E.IViewsService).openViewContainer(U.id,!0)}}})}),define(ne[2752],re([1,0,6,2,9,89,20,17,75,249,2612,65,575,43,99,161,33,63,1354,18]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadComments=e.MainThreadCommentController=e.MainThreadCommentThread=void 0;class u{constructor(d,m,b,E,y,T,R){this.commentThreadHandle=d,this.controllerHandle=m,this.extensionId=b,this.threadId=E,this.resource=y,this._range=T,this._canReply=R,this._onDidChangeInput=new t.Emitter,this._onDidChangeLabel=new t.Emitter,this.onDidChangeLabel=this._onDidChangeLabel.event,this._onDidChangeComments=new t.Emitter,this._onDidChangeCanReply=new t.Emitter,this._onDidChangeRange=new t.Emitter,this.onDidChangeRange=this._onDidChangeRange.event,this._onDidChangeCollasibleState=new t.Emitter,this.onDidChangeCollasibleState=this._onDidChangeCollasibleState.event,this._onDidChangeState=new t.Emitter,this.onDidChangeState=this._onDidChangeState.event,this._isDisposed=!1}get input(){return this._input}set input(d){this._input=d,this._onDidChangeInput.fire(d)}get onDidChangeInput(){return this._onDidChangeInput.event}get label(){return this._label}set label(d){this._label=d,this._onDidChangeLabel.fire(this._label)}get contextValue(){return this._contextValue}set contextValue(d){this._contextValue=d}get comments(){return this._comments}set comments(d){this._comments=d,this._onDidChangeComments.fire(this._comments)}get onDidChangeComments(){return this._onDidChangeComments.event}set range(d){this._range=d,this._onDidChangeRange.fire(this._range)}get range(){return this._range}get onDidChangeCanReply(){return this._onDidChangeCanReply.event}set canReply(d){this._canReply=d,this._onDidChangeCanReply.fire(this._canReply)}get canReply(){return this._canReply}get collapsibleState(){return this._collapsibleState}set collapsibleState(d){this._collapsibleState=d,this._onDidChangeCollasibleState.fire(this._collapsibleState)}get isDisposed(){return this._isDisposed}isDocumentCommentThread(){return k.Range.isIRange(this._range)}get state(){return this._state}set state(d){this._state=d,this._onDidChangeState.fire(this._state)}batchUpdate(d){const m=b=>Object.prototype.hasOwnProperty.call(d,b);m("range")&&(this._range=d.range),m("label")&&(this._label=d.label),m("contextValue")&&(this._contextValue=d.contextValue===null?void 0:d.contextValue),m("comments")&&(this._comments=d.comments),m("collapseState")&&(this._collapsibleState=d.collapseState),m("canReply")&&(this.canReply=d.canReply),m("state")&&(this.state=d.state)}dispose(){this._isDisposed=!0,this._onDidChangeCollasibleState.dispose(),this._onDidChangeComments.dispose(),this._onDidChangeInput.dispose(),this._onDidChangeLabel.dispose(),this._onDidChangeRange.dispose(),this._onDidChangeState.dispose()}toJSON(){return{$mid:7,commentControlHandle:this.controllerHandle,commentThreadHandle:this.commentThreadHandle}}}e.MainThreadCommentThread=u;class a{constructor(d,m,b,E,y,T,R){this._proxy=d,this._commentService=m,this._handle=b,this._uniqueId=E,this._id=y,this._label=T,this._features=R,this._threads=new Map}get handle(){return this._handle}get id(){return this._id}get contextValue(){return this._id}get proxy(){return this._proxy}get label(){return this._label}get reactions(){return this._reactions}set reactions(d){this._reactions=d}get options(){return this._features.options}get features(){return this._features}updateFeatures(d){this._features=d}createCommentThread(d,m,b,E,y){let T=new u(m,this.handle,d,b,_.URI.revive(E).toString(),y,!0);return this._threads.set(m,T),T.isDocumentCommentThread()?this._commentService.updateComments(this._uniqueId,{added:[T],removed:[],changed:[]}):this._commentService.updateNotebookComments(this._uniqueId,{added:[T],removed:[],changed:[]}),T}updateCommentThread(d,m,b,E){let y=this.getKnownThread(d);y.batchUpdate(E),y.isDocumentCommentThread()?this._commentService.updateComments(this._uniqueId,{added:[],removed:[],changed:[y]}):this._commentService.updateNotebookComments(this._uniqueId,{added:[],removed:[],changed:[y]})}deleteCommentThread(d){let m=this.getKnownThread(d);this._threads.delete(d),m.isDocumentCommentThread()?this._commentService.updateComments(this._uniqueId,{added:[],removed:[m],changed:[]}):this._commentService.updateNotebookComments(this._uniqueId,{added:[],removed:[m],changed:[]}),m.dispose()}deleteCommentThreadMain(d){this._threads.forEach(m=>{m.threadId===d&&this._proxy.$deleteCommentThread(this._handle,m.commentThreadHandle)})}updateInput(d){let m=this.activeCommentThread;if(m&&m.input){let b=m.input;b.value=d,m.input=b}}updateCommentingRanges(){this._commentService.updateCommentingRanges(this._uniqueId)}getKnownThread(d){const m=this._threads.get(d);if(!m)throw new Error("unknown thread");return m}async getDocumentComments(d,m){if(d.scheme===p.Schemas.vscodeNotebookCell)return{owner:this._uniqueId,label:this.label,threads:[],commentingRanges:{resource:d,ranges:[]}};let b=[];for(let y of[...this._threads.keys()]){const T=this._threads.get(y);T.resource===d.toString()&&b.push(T)}let E=await this._proxy.$provideCommentingRanges(this.handle,d,m);return{owner:this._uniqueId,label:this.label,threads:b,commentingRanges:{resource:d,ranges:E||[]}}}async getNotebookComments(d,m){if(d.scheme!==p.Schemas.vscodeNotebookCell)return{owner:this._uniqueId,label:this.label,threads:[]};let b=[];for(let E of[...this._threads.keys()]){const y=this._threads.get(E);y.resource===d.toString()&&b.push(y)}return{owner:this._uniqueId,label:this.label,threads:b}}async getCommentingRanges(d,m){return await this._proxy.$provideCommentingRanges(this.handle,d,m)||[]}async toggleReaction(d,m,b,E,y){return this._proxy.$toggleReaction(this._handle,m.commentThreadHandle,d,b,E)}getAllComments(){let d=[];for(let m of[...this._threads.keys()])d.push(this._threads.get(m));return d}createCommentThreadTemplate(d,m){this._proxy.$createCommentThreadTemplate(this.handle,d,m)}async updateCommentThreadTemplate(d,m){await this._proxy.$updateCommentThreadTemplate(this.handle,d,m)}toJSON(){return{$mid:6,handle:this.handle}}}e.MainThreadCommentController=a;const n=(0,l.registerIcon)("comments-view-icon",s.Codicon.commentDiscussion,(0,r.localize)(0,null));let h=class extends f.Disposable{constructor(d,m,b,E){super();this._commentService=m,this._viewsService=b,this._viewDescriptorService=E,this._documentProviders=new Map,this._workspaceProviders=new Map,this._handlers=new Map,this._commentControllers=new Map,this._activeCommentThreadDisposables=this._register(new f.DisposableStore),this._openViewListener=null,this._proxy=d.getProxy(C.ExtHostContext.ExtHostComments),this._register(this._commentService.onDidChangeActiveCommentThread(async y=>{let T=y.controllerHandle,R=this._commentControllers.get(T);!R||(this._activeCommentThreadDisposables.clear(),this._activeCommentThread=y,R.activeCommentThread=this._activeCommentThread)}))}$registerCommentController(d,m,b){const E=(0,A.generateUuid)();this._handlers.set(d,E);const y=new a(this._proxy,this._commentService,d,E,m,b,{});this._commentService.registerCommentController(E,y),this._commentControllers.set(d,y);const T=!!this._viewDescriptorService.getViewDescriptorById(o.COMMENTS_VIEW_ID);T||this.registerView(T),this.registerViewListeners(T),this._commentService.setWorkspaceComments(String(d),[])}$unregisterCommentController(d){const m=this._handlers.get(d);this._handlers.delete(d),this._commentControllers.delete(d),typeof m=="string"&&this._commentService.unregisterCommentController(m)}$updateCommentControllerFeatures(d,m){let b=this._commentControllers.get(d);!b||b.updateFeatures(m)}$createCommentThread(d,m,b,E,y,T){let R=this._commentControllers.get(d);if(!!R)return R.createCommentThread(T.value,m,b,E,y)}$updateCommentThread(d,m,b,E,y){let T=this._commentControllers.get(d);if(!!T)return T.updateCommentThread(m,b,E,y)}$deleteCommentThread(d,m){let b=this._commentControllers.get(d);if(!!b)return b.deleteCommentThread(m)}$updateCommentingRanges(d){let m=this._commentControllers.get(d);!m||m.updateCommentingRanges()}registerView(d){if(!d){const m=D.Registry.as(c.Extensions.ViewContainersRegistry).registerViewContainer({id:o.COMMENTS_VIEW_ID,title:o.COMMENTS_VIEW_TITLE,ctorDescriptor:new i.SyncDescriptor(S.ViewPaneContainer,[o.COMMENTS_VIEW_ID,{mergeViewWithContainerWhenSingleView:!0,donotShowContainerTitleWhenMergedWithContainer:!0}]),storageId:o.COMMENTS_VIEW_TITLE,hideIfEmpty:!0,icon:n,order:10},1);D.Registry.as(c.Extensions.ViewsRegistry).registerViews([{id:o.COMMENTS_VIEW_ID,name:o.COMMENTS_VIEW_TITLE,canToggleVisibility:!1,ctorDescriptor:new i.SyncDescriptor(v.CommentsPanel),canMoveView:!0,containerIcon:n,focusCommand:{id:"workbench.action.focusCommentsPanel"}}],m)}}setComments(){[...this._commentControllers.keys()].forEach(d=>{let m=this._commentControllers.get(d).getAllComments();if(m.length){const b=this.getHandler(d);this._commentService.setWorkspaceComments(b,m)}})}registerViewOpenedListener(){this._openViewListener||(this._openViewListener=this._viewsService.onDidChangeViewVisibility(d=>{d.id===o.COMMENTS_VIEW_ID&&d.visible&&(this.setComments(),this._openViewListener&&(this._openViewListener.dispose(),this._openViewListener=null))}))}registerViewListeners(d){d||this.registerViewOpenedListener(),this._register(this._viewDescriptorService.onDidChangeContainer(m=>{m.views.find(b=>b.id===o.COMMENTS_VIEW_ID)&&(this.setComments(),this.registerViewOpenedListener())})),this._register(this._viewDescriptorService.onDidChangeContainerLocation(m=>{const b=this._viewDescriptorService.getViewContainerByViewId(o.COMMENTS_VIEW_ID);m.viewContainer.id===b?.id&&(this.setComments(),this.registerViewOpenedListener())}))}getHandler(d){if(!this._handlers.has(d))throw new Error("Unknown handler");return this._handlers.get(d)}dispose(){super.dispose(),this._workspaceProviders.forEach(d=>(0,f.dispose)(d)),this._workspaceProviders.clear(),this._documentProviders.forEach(d=>(0,f.dispose)(d)),this._documentProviders.clear()}};h=Ee([(0,I.extHostNamedCustomer)(C.MainContext.MainThreadComments),W(1,w.ICommentService),W(2,c.IViewsService),W(3,c.IViewDescriptorService)],h),e.MainThreadComments=h}),define(ne[439],re([1,0,17,781,5,36,16,37,24,27,12,34,161,40]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PaneCompositeRegistry=e.Extensions=e.PaneCompositeDescriptor=e.PaneComposite=void 0;let i=class extends f.Composite{constructor(r,p,u,a,n,h,g,d){super(r,p,n,u);this.storageService=u,this.instantiationService=a,this.contextMenuService=h,this.extensionService=g,this.contextService=d}create(r){this.viewPaneContainer=this._register(this.createViewPaneContainer(r)),this._register(this.viewPaneContainer.onTitleAreaUpdate(()=>this.updateTitleArea())),this.viewPaneContainer.create(r)}setVisible(r){super.setVisible(r),this.viewPaneContainer?.setVisible(r)}layout(r){this.viewPaneContainer?.layout(r)}getOptimalWidth(){return this.viewPaneContainer?.getOptimalWidth()??0}openView(r,p){return this.viewPaneContainer?.openView(r,p)}getViewPaneContainer(){return this.viewPaneContainer}getActionsContext(){return this.getViewPaneContainer()?.getActionsContext()}getContextMenuActions(){return this.viewPaneContainer?.menuActions?.getContextMenuActions()??[]}getActions(){const r=[];return this.viewPaneContainer?.menuActions&&(r.push(...this.viewPaneContainer.menuActions.getPrimaryActions()),this.viewPaneContainer.isViewMergedWithContainer()&&r.push(...this.viewPaneContainer.panes[0].menuActions.getPrimaryActions())),r}getSecondaryActions(){if(!this.viewPaneContainer?.menuActions)return[];const r=this.viewPaneContainer.isViewMergedWithContainer()?this.viewPaneContainer.panes[0].menuActions.getSecondaryActions():[];let p=this.viewPaneContainer.menuActions.getSecondaryActions();const u=p.findIndex(a=>a instanceof k.SubmenuItemAction&&a.item.submenu===o.ViewsSubMenu);if(u!==-1){const a=p[u];a.actions.some(({enabled:n})=>n)?p.length===1&&r.length===0?p=a.actions.slice():u!==0&&(p=[a,...p.slice(0,u),...p.slice(u+1)]):p.splice(u,1)}return p.length&&r.length?[...p,new A.Separator,...r]:p.length?p:r}getActionViewItem(r){return this.viewPaneContainer?.getActionViewItem(r)}getTitle(){return this.viewPaneContainer?.getTitle()??""}saveState(){super.saveState()}focus(){this.viewPaneContainer?.focus()}};i=Ee([W(1,w.ITelemetryService),W(2,I.IStorageService),W(3,_.IInstantiationService),W(4,v.IThemeService),W(5,D.IContextMenuService),W(6,c.IExtensionService),W(7,C.IWorkspaceContextService)],i),e.PaneComposite=i;class S extends f.CompositeDescriptor{constructor(r,p,u,a,n,h,g){super(r,p,u,a,n,h);this.iconUrl=g}static create(r,p,u,a,n,h,g){return new S(r,p,u,a,n,h,g)}}e.PaneCompositeDescriptor=S,e.Extensions={Viewlets:"workbench.contributions.viewlets",Panels:"workbench.contributions.panels",Auxiliary:"workbench.contributions.auxiliary"};class s extends f.CompositeRegistry{registerPaneComposite(r){super.registerComposite(r)}deregisterPaneComposite(r){super.deregisterComposite(r)}getPaneComposite(r){return this.getComposite(r)}getPaneComposites(){return this.getComposites()}}e.PaneCompositeRegistry=s,t.Registry.add(e.Extensions.Viewlets,new s),t.Registry.add(e.Extensions.Panels,new s),t.Registry.add(e.Extensions.Auxiliary,new s)}),define(ne[642],re([1,0,1418,36,6,17,78,74,893,80,24,37,27,38,5,936,12,82,32,934,438,26,10,2,7,13,40,43,156,439,163,565,16,116,9,1067,675]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PanelPart=e.BasePanelPart=void 0;let L=class ps extends I.CompositePart{constructor(B,P,V,z,U,H,K,G,q,Z,j,X,Y,$,J,ee,te,se,ie,ce,le){super(B,P,V,z,U,H,K,G,A.Registry.as(ee),Y,q.getDefaultViewContainer(se)?.id||"","panel","panel",void 0,X,le);this.viewDescriptorService=q,this.contextKeyService=Z,this.extensionService=j,this.partId=X,this.pinnedPanelsKey=$,this.placeholdeViewContainersKey=J,this.backgroundColor=te,this.viewContainerLocation=se,this.activePanelContextKey=ie,this.panelFocusContextKey=ce,this.panelOptions=le,this.minimumWidth=300,this.maximumWidth=Number.POSITIVE_INFINITY,this.minimumHeight=77,this.maximumHeight=Number.POSITIVE_INFINITY,this.snap=!0,this.onDidPaneCompositeClose=this.onDidCompositeClose.event,this.compositeActions=new Map,this.panelDisposables=new Map,this.blockOpeningPanel=!1,this.extensionsRegistered=!1,this.enabledViewContainersContextKeys=new Map,this.panelRegistry=A.Registry.as(ee),this.dndHandler=new p.CompositeDragAndDrop(this.viewDescriptorService,this.viewContainerLocation,(ae,ue)=>this.openPaneComposite(ae,ue).then(oe=>oe||null),(ae,ue,oe)=>this.compositeBar.move(ae,ue,oe?.horizontallyBefore),()=>this.compositeBar.getCompositeBarItems()),this.compositeBar=this._register(this.instantiationService.createInstance(p.CompositeBar,this.getCachedPanels(),{icon:!!this.panelOptions.useIcons,orientation:0,activityHoverOptions:this.getActivityHoverOptions(),openComposite:(ae,ue)=>this.openPaneComposite(ae,!ue).then(oe=>oe||null),getActivityAction:ae=>this.getCompositeActions(ae).activityAction,getCompositePinnedAction:ae=>this.getCompositeActions(ae).pinnedAction,getOnCompositeClickAction:ae=>this.instantiationService.createInstance(S.PanelActivityAction,(0,d.assertIsDefined)(this.getPaneComposite(ae)),this.viewContainerLocation),fillExtraContextMenuActions:ae=>this.fillExtraContextMenuActions(ae),getContextMenuActionsForComposite:ae=>this.getContextMenuActionsForComposite(ae),getDefaultCompositeId:()=>q.getDefaultViewContainer(this.viewContainerLocation)?.id,hidePart:()=>this.layoutService.setPartHidden(!0,this.partId),dndHandler:this.dndHandler,compositeSize:0,overflowActionSize:44,colors:ae=>({activeBackgroundColor:ae.getColor(this.backgroundColor),inactiveBackgroundColor:ae.getColor(this.backgroundColor),activeBorderBottomColor:ae.getColor(l.PANEL_ACTIVE_TITLE_BORDER),activeForegroundColor:ae.getColor(l.PANEL_ACTIVE_TITLE_FOREGROUND),inactiveForegroundColor:ae.getColor(l.PANEL_INACTIVE_TITLE_FOREGROUND),badgeBackground:ae.getColor(r.badgeBackground),badgeForeground:ae.getColor(r.badgeForeground),dragAndDropBorder:ae.getColor(l.PANEL_DRAG_AND_DROP_BORDER)})})),this.registerListeners(),this.onDidRegisterPanels([...this.getPaneComposites()]),this.globalActions=this._register(this.instantiationService.createInstance(R.CompositeMenuActions,X==="workbench.parts.panel"?O.MenuId.PanelTitle:O.MenuId.AuxiliaryBarTitle,void 0,void 0)),this._register(this.globalActions.onDidChange(()=>this.updateGlobalToolbarActions()))}get preferredHeight(){return this.layoutService.dimension.height*.4}get preferredWidth(){const B=this.getActivePaneComposite();if(!B)return;const P=B.getOptimalWidth();if(typeof P=="number")return Math.max(P,300)}get onDidPaneCompositeOpen(){return _.Event.map(this.onDidCompositeOpen.event,B=>B.composite)}getContextMenuActionsForComposite(B){const P=[],V=this.viewDescriptorService.getViewContainerById(B),z=this.viewDescriptorService.getDefaultViewContainerLocation(V);if(z!==this.viewDescriptorService.getViewContainerLocation(V))P.push((0,f.toAction)({id:"resetLocationAction",label:(0,t.localize)(0,null),run:()=>this.viewDescriptorService.moveViewContainerToLocation(V,z)}));else{const U=this.viewDescriptorService.getViewContainerModel(V);if(U.allViewDescriptors.length===1){const H=U.allViewDescriptors[0],K=this.viewDescriptorService.getDefaultContainerById(H.id);K!==V&&P.push((0,f.toAction)({id:"resetLocationAction",label:(0,t.localize)(1,null),run:()=>this.viewDescriptorService.moveViewsToContainer([H],K)}))}}return P}onDidRegisterPanels(B){const P=this.getCachedPanels();for(const V of B){const z=P.filter(({id:K})=>K===V.id)[0],U=this.getActivePaneComposite(),H=U?.getId()===V.id||this.extensionsRegistered&&this.compositeBar.getVisibleComposites().length===0;if(H||!this.shouldBeHidden(V.id,z)){const K={id:V.id,name:V.name,order:V.order,requestedIndex:V.requestedIndex};this.compositeBar.addComposite(K),z||this.compositeBar.pin(V.id),H&&(this.compositeBar.activateComposite(V.id),!U&&this.element&&this.layoutService.isVisible(this.partId)&&this.doOpenPanel(V.id))}}for(const V of B){const z=this.getViewContainer(V.id),U=this.viewDescriptorService.getViewContainerModel(z);this.updateActivity(z,U),this.showOrHideViewContainer(z,U);const H=new h.DisposableStore;H.add(U.onDidChangeActiveViewDescriptors(()=>this.showOrHideViewContainer(z,U))),H.add(U.onDidChangeContainerInfo(()=>this.updateActivity(z,U))),this.panelDisposables.set(V.id,H)}}async onDidDeregisterPanel(B){const P=this.panelDisposables.get(B);P&&P.dispose(),this.panelDisposables.delete(B);const V=this.viewDescriptorService.getViewContainersByLocation(this.viewContainerLocation).filter(z=>this.viewDescriptorService.getViewContainerModel(z).activeViewDescriptors.length>0);if(V.length){if(this.getActivePaneComposite()?.getId()===B){const z=this.viewDescriptorService.getDefaultViewContainer(this.viewContainerLocation)?.id,U=V.filter(H=>H.id===z)[0]||V[0];await this.openPaneComposite(U.id)}}else this.layoutService.setPartHidden(!0,this.partId);this.removeComposite(B)}updateActivity(B,P){const V=this.getPlaceholderViewContainers().filter(K=>K.id===B.id)[0]?.name,z={id:B.id,name:this.extensionsRegistered||V===void 0?P.title:V,keybindingId:P.keybindingId},{activityAction:U,pinnedAction:H}=this.getCompositeActions(B.id);U.setActivity(this.toActivity(P)),H instanceof S.PlaceHolderToggleCompositePinnedAction&&H.setActivity(z),this.compositeBar.recomputeSizes(),this.layoutCompositeBar(),this.extensionsRegistered&&this.saveCachedPanels()}toActivity(B){return ps.toActivity(B.viewContainer.id,B.title,this.panelOptions.useIcons?B.icon:void 0,B.keybindingId)}static toActivity(B,P,V,z){let U,H;if(F.URI.isUri(V)){H=V;const K=(0,n.asCSSUrl)(V),G=new x.StringSHA1;G.update(K),U=`activity-${B.replace(/\./g,"-")}-${G.digest()}`;const q=`.monaco-workbench .basepanel .monaco-action-bar .action-label.${U}`;(0,n.createCSSRule)(q,` mask: ${K} no-repeat 50% 50%; mask-size: 16px; -webkit-mask: ${K} no-repeat 50% 50%; -webkit-mask-size: 16px; mask-origin: padding; -webkit-mask-origin: padding; `)}else s.ThemeIcon.isThemeIcon(V)&&(U=s.ThemeIcon.asClassName(V));return{id:B,name:P,cssClass:U,iconUrl:H,keybindingId:z}}showOrHideViewContainer(B,P){let V=this.enabledViewContainersContextKeys.get(B.id);V||(V=this.contextKeyService.createKey((0,D.getEnabledViewContainerContextKey)(B.id),!1),this.enabledViewContainersContextKeys.set(B.id,V)),P.activeViewDescriptors.length?(V.set(!0),this.compositeBar.addComposite({id:B.id,name:B.title,order:B.order,requestedIndex:B.requestedIndex})):B.hideIfEmpty&&(V.set(!1),this.hideComposite(B.id))}shouldBeHidden(B,P){const V=this.getViewContainer(B);return!V||!V.hideIfEmpty?!1:P?.views&&P.views.length?P.views.every(({when:z})=>!!z&&!this.contextKeyService.contextMatchesRules(g.ContextKeyExpr.deserialize(z))):!1}registerListeners(){this._register(this.registry.onDidRegister(P=>this.onDidRegisterPanels([P]))),this._register(this.registry.onDidDeregister(P=>this.onDidDeregisterPanel(P.id))),this._register(this.onDidPaneCompositeOpen(P=>this.onPanelOpen(P))),this._register(this.onDidPaneCompositeClose(this.onPanelClose,this));let B=this._register(new h.DisposableStore);this._register(this.extensionService.onDidRegisterExtensions(()=>{B.clear(),this.onDidRegisterExtensions(),this.compositeBar.onDidChange(()=>this.saveCachedPanels(),this,B),this.storageService.onDidChangeValue(P=>this.onDidStorageValueChange(P),this,B)}))}onDidRegisterExtensions(){this.extensionsRegistered=!0,this.removeNotExistingComposites(),this.saveCachedPanels()}removeNotExistingComposites(){const B=this.getPaneComposites();for(const{id:P}of this.getCachedPanels())B.every(V=>V.id!==P)&&this.hideComposite(P)}hideComposite(B){this.compositeBar.hideComposite(B);const P=this.compositeActions.get(B);P&&(P.activityAction.dispose(),P.pinnedAction.dispose(),this.compositeActions.delete(B))}onPanelOpen(B){this.activePanelContextKey.set(B.getId());const P=this.panelRegistry.getPaneComposite(B.getId());P&&this.compositeBar.addComposite(P),this.compositeBar.activateComposite(B.getId());const V=this.panelRegistry.getPaneComposite(B.getId());if(V){const z=this.getViewContainer(V.id);z?.hideIfEmpty&&this.viewDescriptorService.getViewContainerModel(z).activeViewDescriptors.length===0&&this.hideComposite(V.id)}this.layoutCompositeBar(),this.layoutEmptyMessage()}onPanelClose(B){const P=B.getId();this.activePanelContextKey.get()===P&&this.activePanelContextKey.reset(),this.compositeBar.deactivateComposite(B.getId()),this.layoutEmptyMessage()}create(B){this.element=B,super.create(B),this.createEmptyPanelMessage();const P=this._register((0,n.trackFocus)(B));this._register(P.onDidFocus(()=>this.panelFocusContextKey.set(!0))),this._register(P.onDidBlur(()=>this.panelFocusContextKey.set(!1)))}createEmptyPanelMessage(){const B=this.getContentArea();this.emptyPanelMessageElement=document.createElement("div"),this.emptyPanelMessageElement.classList.add("empty-panel-message-area");const P=document.createElement("div");P.classList.add("empty-panel-message"),P.innerText=(0,t.localize)(2,null),this.emptyPanelMessageElement.appendChild(P),B.appendChild(this.emptyPanelMessageElement),this._register(E.CompositeDragAndDropObserver.INSTANCE.registerTarget(this.emptyPanelMessageElement,{onDragOver:V=>{n.EventHelper.stop(V.eventData,!0);const z=this.dndHandler.onDragEnter(V.dragAndDropData,void 0,V.eventData);(0,E.toggleDropEffect)(V.eventData.dataTransfer,"move",z)},onDragEnter:V=>{n.EventHelper.stop(V.eventData,!0);const z=this.dndHandler.onDragEnter(V.dragAndDropData,void 0,V.eventData);this.emptyPanelMessageElement.style.backgroundColor=z&&this.theme.getColor(l.EDITOR_DRAG_AND_DROP_BACKGROUND)?.toString()||""},onDragLeave:V=>{n.EventHelper.stop(V.eventData,!0),this.emptyPanelMessageElement.style.backgroundColor=""},onDragEnd:V=>{n.EventHelper.stop(V.eventData,!0),this.emptyPanelMessageElement.style.backgroundColor=""},onDrop:V=>{n.EventHelper.stop(V.eventData,!0),this.emptyPanelMessageElement.style.backgroundColor="",this.dndHandler.drop(V.dragAndDropData,void 0,V.eventData)}}))}createTitleArea(B){const P=super.createTitleArea(B),V=P.appendChild((0,n.$)(".global-actions"));return this.globalToolBar=this._register(new T.ToolBar(V,this.contextMenuService,{actionViewItemProvider:z=>this.actionViewItemProvider(z),orientation:0,getKeyBinding:z=>this.keybindingService.lookupKeybinding(z.id),anchorAlignmentProvider:()=>this.getTitleAreaDropDownAnchorAlignment(),toggleMenuTitle:(0,t.localize)(3,null)})),this.updateGlobalToolbarActions(),P}updateStyles(){super.updateStyles();const B=(0,d.assertIsDefined)(this.getContainer());B.style.backgroundColor=this.getColor(this.backgroundColor)||"";const P=this.getColor(r.contrastBorder)||"";B.style.borderLeftColor=P,B.style.borderRightColor=P;const V=this.getTitleArea();V&&(V.style.borderTopColor=this.getColor(r.contrastBorder)||"")}doOpenPanel(B,P){if(!this.blockOpeningPanel){if(!this.layoutService.isVisible(this.partId))try{this.blockOpeningPanel=!0,this.layoutService.setPartHidden(!1,this.partId)}finally{this.blockOpeningPanel=!1}return this.openComposite(B,P)}}async openPaneComposite(B,P){if(typeof B=="string"&&this.getPaneComposite(B))return this.doOpenPanel(B,P);if(await this.extensionService.whenInstalledExtensionsRegistered(),typeof B=="string"&&this.getPaneComposite(B))return this.doOpenPanel(B,P)}showActivity(B,P,V){return this.compositeBar.showActivity(B,P,V)}getPaneComposite(B){return this.panelRegistry.getPaneComposite(B)}getPaneComposites(){return this.panelRegistry.getPaneComposites().sort((B,P)=>typeof B.order!="number"?1:typeof P.order!="number"?-1:B.order-P.order)}getPinnedPaneCompositeIds(){const B=this.compositeBar.getPinnedComposites().map(P=>P.id);return this.getPaneComposites().filter(P=>B.includes(P.id)).sort((P,V)=>B.indexOf(P.id)-B.indexOf(V.id)).map(P=>P.id)}getVisiblePaneCompositeIds(){return this.compositeBar.getVisibleComposites().filter(B=>this.getActivePaneComposite()?.getId()===B.id||this.compositeBar.isPinned(B.id)).map(B=>B.id)}getActivePaneComposite(){return this.getActiveComposite()}getLastActivePaneCompositeId(){return this.getLastActiveCompositetId()}hideActivePaneComposite(){this.layoutService.isVisible(this.partId)&&this.layoutService.setPartHidden(!0,this.partId),this.hideActiveComposite()}createTitleLabel(B){return this.compositeBar.create(B).classList.add("panel-switcher-container"),{updateTitle:(V,z,U)=>{const H=this.compositeBar.getAction(V);H&&(H.label=z)},updateStyles:()=>{}}}onTitleAreaUpdate(B){super.onTitleAreaUpdate(B),this.layoutCompositeBar()}layout(B,P,V,z){!this.layoutService.isVisible(this.partId)||(this.contentDimension=new n.Dimension(B,P),super.layout(this.contentDimension.width,this.contentDimension.height,V,z),this.layoutCompositeBar(),this.layoutEmptyMessage())}layoutCompositeBar(){if(this.contentDimension&&this.dimension){let B=this.contentDimension.width-40;this.toolBar&&(B=Math.max(ps.MIN_COMPOSITE_BAR_WIDTH,B-this.getToolbarWidth())),this.compositeBar.layout(new n.Dimension(B,this.dimension.height))}}layoutEmptyMessage(){this.emptyPanelMessageElement&&this.emptyPanelMessageElement.classList.toggle("visible",this.compositeBar.getVisibleComposites().length===0)}getViewContainer(B){const P=this.viewDescriptorService.getViewContainerById(B);return P&&this.viewDescriptorService.getViewContainerLocation(P)===this.viewContainerLocation?P:void 0}updateGlobalToolbarActions(){const B=this.globalActions.getPrimaryActions(),P=this.globalActions.getSecondaryActions();this.globalToolBar&&this.globalToolBar.setActions((0,k.prepareActions)(B),(0,k.prepareActions)(P))}getCompositeActions(B){let P=this.compositeActions.get(B);if(!P){const V=this.getViewContainer(B);if(V){const z=this.viewDescriptorService.getViewContainerModel(V);P={activityAction:this.instantiationService.createInstance(S.PanelActivityAction,this.toActivity(z),this.viewContainerLocation),pinnedAction:new u.ToggleCompositePinnedAction(this.toActivity(z),this.compositeBar)}}else P={activityAction:this.instantiationService.createInstance(S.PlaceHolderPanelActivityAction,B,this.viewContainerLocation),pinnedAction:new S.PlaceHolderToggleCompositePinnedAction(B,this.compositeBar)};this.compositeActions.set(B,P)}return P}removeComposite(B){if(super.removeComposite(B)){this.compositeBar.removeComposite(B);const P=this.compositeActions.get(B);return P&&(P.activityAction.dispose(),P.pinnedAction.dispose(),this.compositeActions.delete(B)),!0}return!1}getToolbarWidth(){return!this.getActivePaneComposite()||!this.toolBar?0:this.toolBar.getItemsWidth()+(this.globalToolBar?.getItemsWidth()??0)}onDidStorageValueChange(B){if(B.key===this.pinnedPanelsKey&&B.scope===0&&this.cachedPanelsValue!==this.getStoredCachedPanelsValue()){this._cachedPanelsValue=void 0;const P=[],V=this.compositeBar.getCompositeBarItems(),z=this.getCachedPanels();for(const U of z)P.push({id:U.id,name:U.name,order:U.order,pinned:U.pinned,visible:!!V.find(({id:H})=>H===U.id)});for(let U=0;U<V.length;U++)P.some(({id:H})=>H===V[U].id)||P.splice(U,0,V[U]);this.compositeBar.setCompositeBarItems(P)}}saveCachedPanels(){const B=[],P=[],V=this.compositeBar.getCompositeBarItems();for(const z of V){const U=this.getViewContainer(z.id);if(U){const H=this.viewDescriptorService.getViewContainerModel(U);B.push({id:z.id,name:H.title,pinned:z.pinned,order:z.order,visible:z.visible}),P.push({id:z.id,name:this.getCompositeActions(z.id).activityAction.label})}}this.cachedPanelsValue=JSON.stringify(B),this.setPlaceholderViewContainers(P)}getCachedPanels(){const B=this.getPaneComposites(),V=JSON.parse(this.cachedPanelsValue).map(z=>{const U=typeof z=="string"?{id:z,pinned:!0,order:void 0,visible:!0}:z,H=B.some(K=>K.id===U.id);return U.visible=H?(0,d.isUndefinedOrNull)(U.visible)?!0:U.visible:!1,U});for(const z of this.getPlaceholderViewContainers()){const U=V.filter(H=>H.id===z.id)[0];U&&(U.name=z.name)}return V}get cachedPanelsValue(){return this._cachedPanelsValue||(this._cachedPanelsValue=this.getStoredCachedPanelsValue()),this._cachedPanelsValue}set cachedPanelsValue(B){this.cachedPanelsValue!==B&&(this._cachedPanelsValue=B,this.setStoredCachedViewletsValue(B))}getStoredCachedPanelsValue(){return this.storageService.get(this.pinnedPanelsKey,0,"[]")}setStoredCachedViewletsValue(B){this.storageService.store(this.pinnedPanelsKey,B,0,0)}getPlaceholderViewContainers(){return JSON.parse(this.placeholderViewContainersValue)}setPlaceholderViewContainers(B){this.placeholderViewContainersValue=JSON.stringify(B)}get placeholderViewContainersValue(){return this._placeholderViewContainersValue||(this._placeholderViewContainersValue=this.getStoredPlaceholderViewContainersValue()),this._placeholderViewContainersValue}set placeholderViewContainersValue(B){this.placeholderViewContainersValue!==B&&(this._placeholderViewContainersValue=B,this.setStoredPlaceholderViewContainersValue(B))}getStoredPlaceholderViewContainersValue(){return this.storageService.get(this.placeholdeViewContainersKey,1,"[]")}setStoredPlaceholderViewContainersValue(B){this.storageService.store(this.placeholdeViewContainersKey,B,1,1)}};L.MIN_COMPOSITE_BAR_WIDTH=50,L=Ee([W(0,a.INotificationService),W(1,v.IStorageService),W(2,o.ITelemetryService),W(3,C.IContextMenuService),W(4,w.IWorkbenchLayoutService),W(5,c.IKeybindingService),W(6,i.IInstantiationService),W(7,s.IThemeService),W(8,b.IViewDescriptorService),W(9,g.IContextKeyService),W(10,m.IExtensionService)],L),e.BasePanelPart=L;let M=class nr extends L{constructor(B,P,V,z,U,H,K,G,q,Z,j){super(B,P,V,z,U,H,K,G,q,Z,j,"workbench.parts.panel",nr.activePanelSettingsKey,nr.pinnedPanelsKey,nr.placeholdeViewContainersKey,y.Extensions.Panels,l.PANEL_BACKGROUND,1,D.ActivePanelContext.bindTo(Z),D.PanelFocusContext.bindTo(Z),{useIcons:!1,hasTitle:!0})}updateStyles(){super.updateStyles();const B=(0,d.assertIsDefined)(this.getContainer()),P=this.getColor(l.PANEL_BORDER)||this.getColor(r.contrastBorder)||"";B.style.borderLeftColor=P,B.style.borderRightColor=P;const V=this.getTitleArea();V&&(V.style.borderTopColor=this.getColor(l.PANEL_BORDER)||this.getColor(r.contrastBorder)||"")}getActivityHoverOptions(){return{position:()=>this.layoutService.getPanelPosition()===2&&!this.layoutService.isPanelMaximized()?3:2}}fillExtraContextMenuActions(B){B.push(new f.Separator,...S.PositionPanelActionConfigs.filter(({when:P})=>this.contextKeyService.contextMatchesRules(P)).map(({id:P,title:V})=>this.instantiationService.createInstance(S.SetPanelPositionAction,P,V.value)),this.instantiationService.createInstance(S.TogglePanelAction,S.TogglePanelAction.ID,(0,t.localize)(4,null)))}layout(B,P,V,z){let U;this.layoutService.getPanelPosition()===1?U=new n.Dimension(B-1,P):U=new n.Dimension(B,P),super.layout(U.width,U.height,V,z)}toJSON(){return{type:"workbench.parts.panel"}}};M.activePanelSettingsKey="workbench.panelpart.activepanelid",M.pinnedPanelsKey="workbench.panel.pinnedPanels",M.placeholdeViewContainersKey="workbench.panel.placeholderPanels",M=Ee([W(0,a.INotificationService),W(1,v.IStorageService),W(2,o.ITelemetryService),W(3,C.IContextMenuService),W(4,w.IWorkbenchLayoutService),W(5,c.IKeybindingService),W(6,i.IInstantiationService),W(7,s.IThemeService),W(8,b.IViewDescriptorService),W(9,g.IContextKeyService),W(10,m.IExtensionService)],M),e.PanelPart=M,(0,s.registerThemingParticipant)((N,B)=>{const P=N.getColor(l.PANEL_BACKGROUND);P&&P!==N.getColor(r.editorBackground)&&B.addRule(` .monaco-workbench .part.panel > .content .monaco-editor, .monaco-workbench .part.panel > .content .monaco-editor .margin, .monaco-workbench .part.panel > .content .monaco-editor .monaco-editor-background { background-color: ${P}; } `);const V=N.getColor(l.PANEL_ACTIVE_TITLE_FOREGROUND);V&&(B.addRule(` .monaco-workbench .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item:hover .action-label { color: ${V} !important; } `),B.addRule(` .monaco-workbench .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item:focus .action-label { color: ${V} !important; } `));const z=N.getColor(l.PANEL_INPUT_BORDER);z&&B.addRule(` .monaco-workbench .part.panel .monaco-inputbox { border-color: ${z} } `);const U=N.getColor(r.focusBorder);U&&(B.addRule(` .monaco-workbench .part.basepanel > .title > .panel-switcher-container > .monaco-action-bar .action-item:focus .active-item-indicator:before { border-top-color: ${U}; } `),B.addRule(` .monaco-workbench .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item:focus { outline: none; } `));const H=N.getColor(l.PANEL_ACTIVE_TITLE_BORDER);H&&B.addRule(` .monaco-workbench .part.basepanel > .title > .panel-switcher-container > .monaco-action-bar .action-item.checked:not(:focus) .active-item-indicator:before, .monaco-workbench .part.basepanel > .title > .panel-switcher-container > .monaco-action-bar .action-item.checked.clicked:focus .active-item-indicator:before { border-top-color: ${H}; } `);const K=N.getColor(r.activeContrastBorder);K&&B.addRule(` .monaco-workbench .part.basepanel > .title > .panel-switcher-container > .monaco-action-bar .action-item.checked .action-label, .monaco-workbench .part.basepanel > .title > .panel-switcher-container > .monaco-action-bar .action-item:hover .action-label { outline-color: ${K}; outline-width: 1px; outline-style: solid; border-bottom: none; outline-offset: -2px; } .monaco-workbench .part.basepanel > .title > .panel-switcher-container > .monaco-action-bar .action-item:not(.checked):hover .action-label { outline-style: dashed; } `)})}),define(ne[937],re([1,0,1384,7,37,5,38,26,24,27,32,12,439,642,74,82,43,40,80,36,887,13,510,28,1051]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AuxiliaryBarPart=void 0;let g=class rr extends c.BasePanelPart{constructor(m,b,E,y,T,R,O,x,F,L,M,N){super(m,b,E,y,T,R,O,x,F,L,M,"workbench.parts.auxiliarybar",rr.activePanelSettingsKey,rr.pinnedPanelsKey,rr.placeholdeViewContainersKey,o.Extensions.Auxiliary,S.SIDE_BAR_BACKGROUND,2,i.ActiveAuxiliaryContext.bindTo(L),i.AuxiliaryBarFocusContext.bindTo(L),{useIcons:!0,hasTitle:!0,borderWidth:()=>this.getColor(S.SIDE_BAR_BORDER)||this.getColor(v.contrastBorder)?1:0});this.commandService=N,this.minimumWidth=170,this.maximumWidth=Number.POSITIVE_INFINITY,this.minimumHeight=0,this.maximumHeight=Number.POSITIVE_INFINITY,this.priority=1}updateStyles(){super.updateStyles();const m=(0,a.assertIsDefined)(this.getContainer()),b=this.getColor(S.SIDE_BAR_BORDER)||this.getColor(v.contrastBorder),E=this.layoutService.getSideBarPosition()===1;m.style.borderLeftColor=b??"",m.style.borderRightColor=b??"",m.style.borderLeftStyle=b&&!E?"solid":"none",m.style.borderRightStyle=b&&E?"solid":"none",m.style.borderLeftWidth=b&&!E?"1px":"0px",m.style.borderRightWidth=b&&E?"1px":"0px"}getActivityHoverOptions(){return{position:()=>2}}fillExtraContextMenuActions(m){const b=this.layoutService.getSideBarPosition()===0;m.push(new p.Separator,(0,p.toAction)({id:n.ToggleSidebarPositionAction.ID,label:b?(0,t.localize)(0,null):(0,t.localize)(1,null),run:()=>this.commandService.executeCommand(n.ToggleSidebarPositionAction.ID)}),this.instantiationService.createInstance(u.ToggleAuxiliaryBarAction,u.ToggleAuxiliaryBarAction.ID,(0,t.localize)(2,null)))}toJSON(){return{type:"workbench.parts.auxiliarybar"}}};g.activePanelSettingsKey="workbench.auxiliarybar.activepanelid",g.pinnedPanelsKey="workbench.auxiliarybar.pinnedPanels",g.placeholdeViewContainersKey="workbench.auxiliarybar.placeholderPanels",g=Ee([W(0,D.INotificationService),W(1,I.IStorageService),W(2,w.ITelemetryService),W(3,_.IContextMenuService),W(4,r.IWorkbenchLayoutService),W(5,k.IKeybindingService),W(6,A.IInstantiationService),W(7,C.IThemeService),W(8,s.IViewDescriptorService),W(9,f.IContextKeyService),W(10,l.IExtensionService),W(11,h.ICommandService)],g),e.AuxiliaryBarPart=g,(0,C.registerThemingParticipant)((d,m)=>{const b=d.getColor(S.SIDE_BAR_BACKGROUND);b&&b!==d.getColor(v.editorBackground)&&m.addRule(` .monaco-workbench .part.auxiliarybar > .content .monaco-editor, .monaco-workbench .part.auxiliarybar > .content .monaco-editor .margin, .monaco-workbench .part.auxiliarybar > .content .monaco-editor .monaco-editor-background { background-color: ${b}; } `);const E=d.getColor(S.SIDE_BAR_TITLE_FOREGROUND);E&&(m.addRule(` .monaco-workbench .part.auxiliarybar > .title > .panel-switcher-container > .monaco-action-bar .action-item:hover .action-label { color: ${E} !important; } `),m.addRule(` .monaco-workbench .part.auxiliarybar > .title > .panel-switcher-container > .monaco-action-bar .action-item:focus .action-label { color: ${E} !important; } `));const y=d.getColor(v.activeContrastBorder);y&&m.addRule(` .monaco-workbench .part.auxiliarybar > .title > .panel-switcher-container > .monaco-action-bar .action-item.checked .action-label, .monaco-workbench .part.auxiliarybar > .title > .panel-switcher-container > .monaco-action-bar .action-item:hover .action-label { outline-color: ${y}; outline-width: 1px; outline-style: solid; border-bottom: none; outline-offset: -2px; } .monaco-workbench .part.auxiliarybar > .title > .panel-switcher-container > .monaco-action-bar .action-item:not(.checked):hover .action-label { outline-style: dashed; } `)})}),define(ne[938],re([1,0,17,893,439,80,74,24,37,27,38,5,6,12,32,82,26,10,137,7,40,13,156,43,129,676,2483]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SidebarPart=void 0;let d=class ml extends f.CompositePart{constructor(b,E,y,T,R,O,x,F,L,M,N){super(b,E,y,T,R,O,x,F,t.Registry.as(_.Extensions.Viewlets),ml.activeViewletSettingsKey,L.getDefaultViewContainer(0).id,"sideBar","viewlet",S.SIDE_BAR_TITLE_FOREGROUND,"workbench.parts.sidebar",{hasTitle:!0,borderWidth:()=>this.getColor(S.SIDE_BAR_BORDER)||this.getColor(i.contrastBorder)?1:0});this.viewDescriptorService=L,this.contextKeyService=M,this.extensionService=N,this.minimumWidth=170,this.maximumWidth=Number.POSITIVE_INFINITY,this.minimumHeight=0,this.maximumHeight=Number.POSITIVE_INFINITY,this.priority=1,this.snap=!0,this._onDidViewletDeregister=this._register(new o.Emitter),this.onDidPaneCompositeDeregister=this._onDidViewletDeregister.event,this.viewletRegistry=t.Registry.as(_.Extensions.Viewlets),this.sideBarFocusContextKey=k.SidebarFocusContext.bindTo(this.contextKeyService),this.activeViewletContextKey=k.ActiveViewletContext.bindTo(this.contextKeyService),this.blockOpeningViewlet=!1,this.registerListeners()}get preferredWidth(){const b=this.getActivePaneComposite();if(!b)return;const E=b.getOptimalWidth();if(typeof E=="number")return Math.max(E,300)}get onDidPaneCompositeRegister(){return this.viewletRegistry.onDidRegister}get onDidPaneCompositeOpen(){return o.Event.map(this.onDidCompositeOpen.event,b=>b.composite)}get onDidPaneCompositeClose(){return this.onDidCompositeClose.event}registerListeners(){this._register(this.onDidPaneCompositeOpen(b=>{this.activeViewletContextKey.set(b.getId())})),this._register(this.onDidPaneCompositeClose(b=>{this.activeViewletContextKey.get()===b.getId()&&this.activeViewletContextKey.reset()})),this._register(this.registry.onDidDeregister(async b=>{const E=this.viewDescriptorService.getViewContainersByLocation(0).filter(y=>this.viewDescriptorService.getViewContainerModel(y).activeViewDescriptors.length>0);if(E.length){if(this.getActiveComposite()?.getId()===b.id){const y=this.viewDescriptorService.getDefaultViewContainer(0)?.id,T=E.filter(R=>R.id===y)[0]||E[0];await this.openPaneComposite(T.id)}}else this.layoutService.setPartHidden(!0,"workbench.parts.sidebar");this.removeComposite(b.id),this._onDidViewletDeregister.fire(b)}))}create(b){this.element=b,super.create(b);const E=this._register((0,l.trackFocus)(b));this._register(E.onDidFocus(()=>this.sideBarFocusContextKey.set(!0))),this._register(E.onDidBlur(()=>this.sideBarFocusContextKey.set(!1)))}createTitleArea(b){const E=super.createTitleArea(b);this._register((0,l.addDisposableListener)(E,l.EventType.CONTEXT_MENU,T=>{this.onTitleAreaContextMenu(new r.StandardMouseEvent(T))})),this._register(g.Gesture.addTarget(E)),this._register((0,l.addDisposableListener)(E,g.EventType.Contextmenu,T=>{this.onTitleAreaContextMenu(new r.StandardMouseEvent(T))})),this.titleLabelElement.draggable=!0;const y=()=>{const T=this.getActivePaneComposite();return{type:"composite",id:T.getId()}};return this._register(n.CompositeDragAndDropObserver.INSTANCE.registerDraggable(this.titleLabelElement,y,{})),E}updateStyles(){super.updateStyles();const b=(0,a.assertIsDefined)(this.getContainer());b.style.backgroundColor=this.getColor(S.SIDE_BAR_BACKGROUND)||"",b.style.color=this.getColor(S.SIDE_BAR_FOREGROUND)||"";const E=this.getColor(S.SIDE_BAR_BORDER)||this.getColor(i.contrastBorder),y=this.layoutService.getSideBarPosition()===0;b.style.borderRightWidth=E&&y?"1px":"",b.style.borderRightStyle=E&&y?"solid":"",b.style.borderRightColor=y&&E||"",b.style.borderLeftWidth=E&&!y?"1px":"",b.style.borderLeftStyle=E&&!y?"solid":"",b.style.borderLeftColor=y?"":E||"",b.style.outlineColor=this.getColor(S.SIDE_BAR_DRAG_AND_DROP_BACKGROUND)??""}layout(b,E,y,T){!this.layoutService.isVisible("workbench.parts.sidebar")||super.layout(b,E,y,T)}getActivePaneComposite(){return this.getActiveComposite()}getLastActivePaneCompositeId(){return this.getLastActiveCompositetId()}hideActivePaneComposite(){this.hideActiveComposite()}async openPaneComposite(b,E){if(typeof b=="string"&&this.getPaneComposite(b))return this.doOpenViewlet(b,E);if(await this.extensionService.whenInstalledExtensionsRegistered(),typeof b=="string"&&this.getPaneComposite(b))return this.doOpenViewlet(b,E)}getPaneComposites(){return this.viewletRegistry.getPaneComposites().sort((b,E)=>typeof b.order!="number"?-1:typeof E.order!="number"?1:b.order-E.order)}getPaneComposite(b){return this.getPaneComposites().filter(E=>E.id===b)[0]}doOpenViewlet(b,E){if(!this.blockOpeningViewlet){if(!this.layoutService.isVisible("workbench.parts.sidebar"))try{this.blockOpeningViewlet=!0,this.layoutService.setPartHidden(!1,"workbench.parts.sidebar")}finally{this.blockOpeningViewlet=!1}return this.openComposite(b,E)}}getTitleAreaDropDownAnchorAlignment(){return this.layoutService.getSideBarPosition()===0?0:1}onTitleAreaContextMenu(b){const E=this.getActivePaneComposite();if(E){const y=E?E.getContextMenuActions():[];if(y.length){const T={x:b.posx,y:b.posy};this.contextMenuService.showContextMenu({getAnchor:()=>T,getActions:()=>y.slice(),getActionViewItem:R=>this.actionViewItemProvider(R),actionRunner:E.getActionRunner()})}}}toJSON(){return{type:"workbench.parts.sidebar"}}};d.activeViewletSettingsKey="workbench.sidebar.activeviewletid",d=Ee([W(0,s.INotificationService),W(1,D.IStorageService),W(2,w.ITelemetryService),W(3,I.IContextMenuService),W(4,A.IWorkbenchLayoutService),W(5,v.IKeybindingService),W(6,C.IInstantiationService),W(7,c.IThemeService),W(8,h.IViewDescriptorService),W(9,p.IContextKeyService),W(10,u.IExtensionService)],d),e.SidebarPart=d}),define(ne[2753],re([1,0,2,6,10,77,160,14,44,167,938,642,80,34,24,8,507,76,213,69,233,21,59,670,145,23,106,15,13,26,12,82,9,43,203,235,40,31,11,602,88,937,27,2402]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Layout=void 0;var K;(function(Z){Z.SIDEBAR_HIDDEN="nosidebar",Z.EDITOR_HIDDEN="noeditorarea",Z.PANEL_HIDDEN="nopanel",Z.AUXILIARYBAR_HIDDEN="noauxiliarybar",Z.STATUSBAR_HIDDEN="nostatusbar",Z.FULLSCREEN="fullscreen",Z.MAXIMIZED="maximized",Z.WINDOW_BORDER="border"})(K||(K={}));class G extends t.Disposable{constructor(j){super();this.parent=j,this._onDidChangeZenMode=this._register(new f.Emitter),this.onDidChangeZenMode=this._onDidChangeZenMode.event,this._onDidChangeFullscreen=this._register(new f.Emitter),this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this._onDidChangeCenteredLayout=this._register(new f.Emitter),this.onDidChangeCenteredLayout=this._onDidChangeCenteredLayout.event,this._onDidChangePanelAlignment=this._register(new f.Emitter),this.onDidChangePanelAlignment=this._onDidChangePanelAlignment.event,this._onDidChangeWindowMaximized=this._register(new f.Emitter),this.onDidChangeWindowMaximized=this._onDidChangeWindowMaximized.event,this._onDidChangePanelPosition=this._register(new f.Emitter),this.onDidChangePanelPosition=this._onDidChangePanelPosition.event,this._onDidChangePartVisibility=this._register(new f.Emitter),this.onDidChangePartVisibility=this._onDidChangePartVisibility.event,this._onDidChangeNotificationsVisibility=this._register(new f.Emitter),this.onDidChangeNotificationsVisibility=this._onDidChangeNotificationsVisibility.event,this._onDidLayout=this._register(new f.Emitter),this.onDidLayout=this._onDidLayout.event,this.hasContainer=!0,this.container=document.createElement("div"),this.parts=new Map,this.initialized=!1,this.disposed=!1,this._openedDefaultEditors=!1,this.whenReadyPromise=new B.DeferredPromise,this.whenReady=this.whenReadyPromise.p,this.whenRestoredPromise=new B.DeferredPromise,this.whenRestored=this.whenRestoredPromise.p,this.restored=!1}get dimension(){return this._dimension}get offset(){return{top:(()=>{let j=0;return this.isVisible("workbench.parts.titlebar")&&(j=this.getPart("workbench.parts.titlebar").maximumHeight),j})()}}initLayout(j){this.environmentService=j.get(u.IBrowserWorkbenchEnvironmentService),this.configurationService=j.get(S.IConfigurationService),this.hostService=j.get(p.IHostService),this.contextService=j.get(c.IWorkspaceContextService),this.storageService=j.get(i.IStorageService),this.workingCopyBackupService=j.get(k.IWorkingCopyBackupService),this.themeService=j.get(T.IThemeService),this.extensionService=j.get(M.IExtensionService),this.logService=j.get(N.ILogService),this.telemetryService=j.get(U.ITelemetryService),this.editorService=j.get(a.IEditorService),this.editorGroupService=j.get(n.IEditorGroupsService),this.paneCompositeService=j.get(V.IPaneCompositePartService),this.viewDescriptorService=j.get(x.IViewDescriptorService),this.titleService=j.get(s.ITitleService),this.notificationService=j.get(y.INotificationService),this.statusBarService=j.get(g.IStatusbarService),j.get(P.IBannerService),this.registerLayoutListeners(),this.initLayoutState(j.get(l.ILifecycleService),j.get(d.IFileService))}registerLayoutListeners(){const j=()=>{this.isVisible("workbench.parts.editor")||this.toggleMaximizedPanel()};this.editorGroupService.whenRestored.then(()=>{this._register(this.editorService.onDidVisibleEditorsChange(j)),this._register(this.editorGroupService.onDidActivateGroup(j))}),this._register(this.editorService.onDidActiveEditorChange(()=>this.centerEditorLayout(this.stateModel.getRuntimeValue(H.LayoutStateKeys.EDITOR_CENTERED)))),this._register(this.configurationService.onDidChangeConfiguration(()=>this.doUpdateLayoutConfiguration())),this._register((0,A.onDidChangeFullscreen)(()=>this.onFullscreenChanged())),this._register(this.editorGroupService.onDidAddGroup(()=>this.centerEditorLayout(this.stateModel.getRuntimeValue(H.LayoutStateKeys.EDITOR_CENTERED)))),this._register(this.editorGroupService.onDidRemoveGroup(()=>this.centerEditorLayout(this.stateModel.getRuntimeValue(H.LayoutStateKeys.EDITOR_CENTERED)))),this._register((0,_.addDisposableListener)(this.container,_.EventType.SCROLL,()=>this.container.scrollTop=0)),(D.isWindows||D.isLinux||D.isWeb)&&(0,r.getTitleBarStyle)(this.configurationService)==="custom"&&this._register(this.titleService.onMenubarVisibilityChange(X=>this.onMenubarToggled(X))),this._register(this.themeService.onDidColorThemeChange(()=>this.updateStyles())),this._register(this.hostService.onDidChangeFocus(X=>this.onWindowFocusChanged(X)))}onMenubarToggled(j){if(j!==this.windowState.runtime.menuBar.toggled){this.windowState.runtime.menuBar.toggled=j;const X=(0,r.getMenuBarVisibility)(this.configurationService);D.isWeb&&X==="toggle"?this.workbenchGrid.setViewVisible(this.titleBarPartView,this.shouldShowTitleBar()):this.windowState.runtime.fullscreen&&(X==="toggle"||X==="classic")&&this.workbenchGrid.setViewVisible(this.titleBarPartView,this.shouldShowTitleBar()),this._onDidLayout.fire(this._dimension)}}onFullscreenChanged(){if(this.windowState.runtime.fullscreen=(0,A.isFullscreen)(),this.windowState.runtime.fullscreen)this.container.classList.add(K.FULLSCREEN);else{this.container.classList.remove(K.FULLSCREEN);const j=this.stateModel.getRuntimeValue(H.LayoutStateKeys.ZEN_MODE_EXIT_INFO),X=this.stateModel.getRuntimeValue(H.LayoutStateKeys.ZEN_MODE_ACTIVE);j.transitionedToFullScreen&&X&&this.toggleZenMode()}this.workbenchGrid.edgeSnapping=this.windowState.runtime.fullscreen,(0,r.getTitleBarStyle)(this.configurationService)==="custom"&&(this.workbenchGrid.setViewVisible(this.titleBarPartView,this.shouldShowTitleBar()),this.updateWindowBorder(!0)),this._onDidChangeFullscreen.fire(this.windowState.runtime.fullscreen)}onWindowFocusChanged(j){this.windowState.runtime.hasFocus!==j&&(this.windowState.runtime.hasFocus=j,this.updateWindowBorder())}doUpdateLayoutConfiguration(j){this.updateMenubarVisibility(!!j),this.centerEditorLayout(this.stateModel.getRuntimeValue(H.LayoutStateKeys.EDITOR_CENTERED),j)}setSideBarPosition(j){const X=this.getPart("workbench.parts.activitybar"),Y=this.getPart("workbench.parts.sidebar"),$=this.getPart("workbench.parts.auxiliarybar"),J=j===0?"left":"right",ee=j===1?"left":"right",te=this.getPanelAlignment(),se=this.getPanelPosition();this.stateModel.setRuntimeValue(H.LayoutStateKeys.SIDEBAR_POSITON,j);const ie=(0,E.assertIsDefined)(X.getContainer()),ce=(0,E.assertIsDefined)(Y.getContainer()),le=(0,E.assertIsDefined)($.getContainer());ie.classList.remove(ee),ce.classList.remove(ee),ie.classList.add(J),ce.classList.add(J),le.classList.remove(J),le.classList.add(ee),X.updateStyles(),Y.updateStyles(),$.updateStyles(),this.adjustPartPositions(j,te,se)}updateWindowBorder(j=!1){if(D.isWeb||(0,r.getTitleBarStyle)(this.configurationService)!=="custom")return;const X=this.themeService.getColorTheme(),Y=X.getColor(R.WINDOW_ACTIVE_BORDER),$=X.getColor(R.WINDOW_INACTIVE_BORDER);let J=!1;if(!this.windowState.runtime.fullscreen&&!this.windowState.runtime.maximized&&(Y||$)){J=!0;const ee=this.windowState.runtime.hasFocus?Y:$??Y;this.container.style.setProperty("--window-border-color",ee?.toString()??"transparent")}J!==this.windowState.runtime.windowBorder&&(this.windowState.runtime.windowBorder=J,this.container.classList.toggle(K.WINDOW_BORDER,J),j||this.layout())}updateStyles(){this.updateWindowBorder()}initLayoutState(j,X){this.stateModel=new H.LayoutStateModel(this.storageService,this.configurationService,this.contextService,this.parent),this.stateModel.load(),this.stateModel.getRuntimeValue(H.LayoutStateKeys.PANEL_HIDDEN)&&this.stateModel.getRuntimeValue(H.LayoutStateKeys.EDITOR_HIDDEN)&&this.stateModel.setRuntimeValue(H.LayoutStateKeys.EDITOR_HIDDEN,!1),this.stateModel.onDidChangeState(ee=>{ee.key===H.LayoutStateKeys.ACTIVITYBAR_HIDDEN&&this.setActivityBarHidden(ee.value),ee.key===H.LayoutStateKeys.STATUSBAR_HIDDEN&&this.setStatusBarHidden(ee.value),ee.key===H.LayoutStateKeys.SIDEBAR_POSITON&&this.setSideBarPosition(ee.value),ee.key===H.LayoutStateKeys.PANEL_POSITION&&this.setPanelPosition(ee.value),ee.key===H.LayoutStateKeys.PANEL_ALIGNMENT&&this.setPanelAlignment(ee.value),this.doUpdateLayoutConfiguration()});const Y=this.getInitialFilesToOpen(),$={editor:{restoreEditors:this.shouldRestoreEditors(this.contextService,Y),editorsToOpen:this.resolveEditorsToOpen(X,Y)},views:{defaults:this.getDefaultLayoutViews(this.environmentService,this.storageService),containerToRestore:{}}},J={fullscreen:(0,A.isFullscreen)(),hasFocus:this.hostService.hasFocus,maximized:!1,windowBorder:!1,menuBar:{toggled:!1},zenMode:{transitionDisposables:new t.DisposableStore}};if(this.windowState={initialization:$,runtime:J},this.isVisible("workbench.parts.sidebar")){let ee;!this.environmentService.isBuilt||j.startupKind===3||D.isWeb?ee=this.storageService.get(v.SidebarPart.activeViewletSettingsKey,1,this.viewDescriptorService.getDefaultViewContainer(0)?.id):ee=this.viewDescriptorService.getDefaultViewContainer(0)?.id,ee?this.windowState.initialization.views.containerToRestore.sideBar=ee:this.stateModel.setRuntimeValue(H.LayoutStateKeys.SIDEBAR_HIDDEN,!0)}if(this.isVisible("workbench.parts.panel")){let ee=this.storageService.get(C.PanelPart.activePanelSettingsKey,1,this.viewDescriptorService.getDefaultViewContainer(1)?.id);ee?this.windowState.initialization.views.containerToRestore.panel=ee:this.stateModel.setRuntimeValue(H.LayoutStateKeys.PANEL_HIDDEN,!0)}if(this.isVisible("workbench.parts.auxiliarybar")){let ee=this.storageService.get(z.AuxiliaryBarPart.activePanelSettingsKey,1,this.viewDescriptorService.getDefaultViewContainer(2)?.id);ee?this.windowState.initialization.views.containerToRestore.auxiliaryBar=ee:this.stateModel.setRuntimeValue(H.LayoutStateKeys.AUXILIARYBAR_HIDDEN,!0)}this.updateWindowBorder(!0)}getDefaultLayoutViews(j,X){const Y=j.options?.defaultLayout;if(!Y||!Y.force&&!X.isNew(1))return;const{views:$}=Y;if($?.length)return $.map(J=>J.id)}shouldRestoreEditors(j,X){return(0,c.isTemporaryWorkspace)(j.getWorkspace())?!1:!!(this.configurationService.getValue("window.restoreWindows")==="preserve")||X===void 0}willRestoreEditors(){return this.windowState.initialization.editor.restoreEditors}resolveEditorsToOpen(j,X){return X?(0,I.pathsToEditors)(X.filesToDiff,j).then(Y=>Y.length===2?[{original:{resource:Y[0].resource},modified:{resource:Y[1].resource},options:{pinned:!0}}]:(0,I.pathsToEditors)(X.filesToOpenOrCreate,j)):this.contextService.getWorkbenchState()===1&&this.configurationService.getValue("workbench.startupEditor")==="newUntitledFile"?this.editorGroupService.hasRestorableState?[]:this.workingCopyBackupService.hasBackups().then(Y=>Y?[]:[{resource:void 0}]):[]}get openedDefaultEditors(){return this._openedDefaultEditors}getInitialFilesToOpen(){const j=this.environmentService.options?.defaultLayout;if(j?.editors?.length&&(j.force||this.storageService.isNew(1)))return this._openedDefaultEditors=!0,{filesToOpenOrCreate:j.editors.map($=>({fileUri:O.URI.revive($.uri),selection:$.selection&&$.selection.start&&(0,E.isNumber)($.selection.start.line)?{startLineNumber:$.selection.start.line,startColumn:(0,E.isNumber)($.selection.start.column)?$.selection.start.column:1,endLineNumber:(0,E.isNumber)($.selection.end.line)?$.selection.end.line:void 0,endColumn:(0,E.isNumber)($.selection.end.line)?(0,E.isNumber)($.selection.end.column)?$.selection.end.column:1:void 0}:void 0,openOnlyIfExists:$.openOnlyIfExists,editorOverrideId:$.openWith}))};const{filesToOpenOrCreate:X,filesToDiff:Y}=this.environmentService;if(X||Y)return{filesToOpenOrCreate:X,filesToDiff:Y}}isRestored(){return this.restored}restoreParts(){const j=[],X=[];j.push((async()=>{(0,L.mark)("code/willRestoreEditors"),await this.editorGroupService.whenReady;let ee;Array.isArray(this.windowState.initialization.editor.editorsToOpen)?ee=this.windowState.initialization.editor.editorsToOpen:ee=await this.windowState.initialization.editor.editorsToOpen;let te;ee.length&&(te=this.editorService.openEditors(ee,void 0,{validateTrust:!0})),X.push(Promise.all([te,this.editorGroupService.whenRestored]).finally(()=>{(0,L.mark)("code/didRestoreEditors")}))})());const Y=(async()=>{if(this.windowState.initialization.views.defaults?.length){(0,L.mark)("code/willOpenDefaultViews");const ee=[],te=ce=>{const le=this.viewDescriptorService.getViewLocationById(ce.id);if(le!==null){const ae=this.viewDescriptorService.getViewContainerByViewId(ce.id);if(ae){ce.order>=(ee?.[le]?.order??0)&&(ee[le]={id:ae.id,order:ce.order});const ue=this.viewDescriptorService.getViewContainerModel(ae);return ue.setCollapsed(ce.id,!1),ue.setVisible(ce.id,!0),!0}}return!1},se=[...this.windowState.initialization.views.defaults].reverse().map((ce,le)=>({id:ce,order:le}));let ie=se.length;for(;ie;)ie--,te(se[ie])&&se.splice(ie,1);if(se.length){await this.extensionService.whenInstalledExtensionsRegistered();let ce=se.length;for(;ce;)ce--,te(se[ce])&&se.splice(ce,1)}ee[0]&&(this.windowState.initialization.views.containerToRestore.sideBar=ee[0].id),ee[1]&&(this.windowState.initialization.views.containerToRestore.panel=ee[1].id),ee[2]&&(this.windowState.initialization.views.containerToRestore.auxiliaryBar=ee[2].id),(0,L.mark)("code/didOpenDefaultViews")}})();j.push(Y),j.push((async()=>{if(await Y,!this.windowState.initialization.views.containerToRestore.sideBar)return;(0,L.mark)("code/willRestoreViewlet"),await this.paneCompositeService.openPaneComposite(this.windowState.initialization.views.containerToRestore.sideBar,0)||await this.paneCompositeService.openPaneComposite(this.viewDescriptorService.getDefaultViewContainer(0)?.id,0),(0,L.mark)("code/didRestoreViewlet")})()),j.push((async()=>{if(await Y,!this.windowState.initialization.views.containerToRestore.panel)return;(0,L.mark)("code/willRestorePanel"),await this.paneCompositeService.openPaneComposite(this.windowState.initialization.views.containerToRestore.panel,1)||await this.paneCompositeService.openPaneComposite(this.viewDescriptorService.getDefaultViewContainer(1)?.id,1),(0,L.mark)("code/didRestorePanel")})()),j.push((async()=>{if(await Y,!this.windowState.initialization.views.containerToRestore.auxiliaryBar)return;(0,L.mark)("code/willRestoreAuxiliaryBar"),await this.paneCompositeService.openPaneComposite(this.windowState.initialization.views.containerToRestore.auxiliaryBar,2)||await this.paneCompositeService.openPaneComposite(this.viewDescriptorService.getDefaultViewContainer(2)?.id,2),(0,L.mark)("code/didRestoreAuxiliaryBar")})());const $=this.stateModel.getRuntimeValue(H.LayoutStateKeys.ZEN_MODE_ACTIVE),J=q(this.configurationService).restore;$&&(this.stateModel.setRuntimeValue(H.LayoutStateKeys.ZEN_MODE_ACTIVE,!J),this.toggleZenMode(!1,!0)),this.stateModel.getRuntimeValue(H.LayoutStateKeys.EDITOR_CENTERED)&&this.centerEditorLayout(!0,!0),B.Promises.settled(j).finally(()=>{this.whenReadyPromise.complete(),B.Promises.settled(X).finally(()=>{this.restored=!0,this.whenRestoredPromise.complete()})})}registerPart(j){this.parts.set(j.getId(),j)}getPart(j){const X=this.parts.get(j);if(!X)throw new Error(`Unknown part ${j}`);return X}registerNotifications(j){this._register(j.onDidChangeNotificationsVisibility(X=>this._onDidChangeNotificationsVisibility.fire(X)))}hasFocus(j){const X=document.activeElement;if(!X)return!1;const Y=this.getContainer(j);return!!Y&&(0,_.isAncestorUsingFlowTo)(X,Y)}focusPart(j){switch(j){case"workbench.parts.editor":this.editorGroupService.activeGroup.focus();break;case"workbench.parts.panel":{const X=this.paneCompositeService.getActivePaneComposite(1);X&&X.focus();break}case"workbench.parts.sidebar":{const X=this.paneCompositeService.getActivePaneComposite(0);X&&X.focus();break}case"workbench.parts.activitybar":this.getPart("workbench.parts.activitybar").focus();break;case"workbench.parts.statusbar":this.statusBarService.focus();default:{const X=this.getContainer(j);X&&X.focus()}}}getContainer(j){if(!!this.parts.get(j))return this.getPart(j).getContainer()}isVisible(j){if(this.initialized)switch(j){case"workbench.parts.titlebar":return this.workbenchGrid.isViewVisible(this.titleBarPartView);case"workbench.parts.sidebar":return!this.stateModel.getRuntimeValue(H.LayoutStateKeys.SIDEBAR_HIDDEN);case"workbench.parts.panel":return!this.stateModel.getRuntimeValue(H.LayoutStateKeys.PANEL_HIDDEN);case"workbench.parts.auxiliarybar":return!this.stateModel.getRuntimeValue(H.LayoutStateKeys.AUXILIARYBAR_HIDDEN);case"workbench.parts.statusbar":return!this.stateModel.getRuntimeValue(H.LayoutStateKeys.STATUSBAR_HIDDEN);case"workbench.parts.activitybar":return!this.stateModel.getRuntimeValue(H.LayoutStateKeys.ACTIVITYBAR_HIDDEN);case"workbench.parts.editor":return!this.stateModel.getRuntimeValue(H.LayoutStateKeys.EDITOR_HIDDEN);default:return!1}switch(j){case"workbench.parts.titlebar":return this.shouldShowTitleBar();case"workbench.parts.sidebar":return!this.stateModel.getRuntimeValue(H.LayoutStateKeys.SIDEBAR_HIDDEN);case"workbench.parts.panel":return!this.stateModel.getRuntimeValue(H.LayoutStateKeys.PANEL_HIDDEN);case"workbench.parts.auxiliarybar":return!this.stateModel.getRuntimeValue(H.LayoutStateKeys.AUXILIARYBAR_HIDDEN);case"workbench.parts.statusbar":return!this.stateModel.getRuntimeValue(H.LayoutStateKeys.STATUSBAR_HIDDEN);case"workbench.parts.activitybar":return!this.stateModel.getRuntimeValue(H.LayoutStateKeys.ACTIVITYBAR_HIDDEN);case"workbench.parts.editor":return!this.stateModel.getRuntimeValue(H.LayoutStateKeys.EDITOR_HIDDEN);default:return!1}}shouldShowTitleBar(){if((0,r.getTitleBarStyle)(this.configurationService)==="native")return!1;if(D.isMacintosh&&D.isNative)return!this.windowState.runtime.fullscreen;if(D.isNative&&!this.windowState.runtime.fullscreen)return!0;switch((0,r.getMenuBarVisibility)(this.configurationService)){case"classic":return!this.windowState.runtime.fullscreen||this.windowState.runtime.menuBar.toggled;case"compact":case"hidden":return!1;case"toggle":return this.windowState.runtime.menuBar.toggled;case"visible":return!0;default:return D.isWeb?!1:!this.windowState.runtime.fullscreen||this.windowState.runtime.menuBar.toggled}}focus(){this.focusPart("workbench.parts.editor")}getDimension(j){return this.getPart(j).dimension}getMaximumEditorDimensions(){const j=this.getPanelPosition(),X=j===1||j===0,Y=(this.isVisible("workbench.parts.activitybar")?this.activityBarPartView.minimumWidth:0)+(this.isVisible("workbench.parts.sidebar")?this.sideBarPartView.minimumWidth:0)+(this.isVisible("workbench.parts.panel")&&X?this.panelPartView.minimumWidth:0)+(this.isVisible("workbench.parts.auxiliarybar")?this.auxiliaryBarPartView.minimumWidth:0),$=(this.isVisible("workbench.parts.titlebar")?this.titleBarPartView.minimumHeight:0)+(this.isVisible("workbench.parts.statusbar")?this.statusBarPartView.minimumHeight:0)+(this.isVisible("workbench.parts.panel")&&!X?this.panelPartView.minimumHeight:0),J=this.dimension.width-Y,ee=this.dimension.height-$;return new _.Dimension(J,ee)}toggleZenMode(j,X=!1){this.stateModel.setRuntimeValue(H.LayoutStateKeys.ZEN_MODE_ACTIVE,!this.stateModel.getRuntimeValue(H.LayoutStateKeys.ZEN_MODE_ACTIVE)),this.windowState.runtime.zenMode.transitionDisposables.clear();const Y=te=>{const se=ie=>{if(!te&&(0,m.isCodeEditor)(ie)&&ie.hasModel()){const ce=ie.getModel();te=this.configurationService.getValue("editor.lineNumbers",{resource:ce.uri,overrideIdentifier:ce.getLanguageId()})}te||(te=this.configurationService.getValue("editor.lineNumbers")),ie.updateOptions({lineNumbers:te})};if(te)for(const ie of this.editorService.visibleTextEditorControls)se(ie);else for(const ie of this.editorService.visibleTextEditorControls)se(ie)};let $=!1;const J=q(this.configurationService),ee=this.stateModel.getRuntimeValue(H.LayoutStateKeys.ZEN_MODE_EXIT_INFO);this.stateModel.getRuntimeValue(H.LayoutStateKeys.ZEN_MODE_ACTIVE)?($=!this.windowState.runtime.fullscreen&&J.fullScreen&&!D.isIOS,X||(ee.transitionedToFullScreen=$,ee.transitionedToCenteredEditorLayout=!this.isEditorLayoutCentered()&&J.centerLayout,ee.wasVisible.sideBar=this.isVisible("workbench.parts.sidebar"),ee.wasVisible.panel=this.isVisible("workbench.parts.panel"),ee.wasVisible.auxiliaryBar=this.isVisible("workbench.parts.auxiliarybar"),this.stateModel.setRuntimeValue(H.LayoutStateKeys.ZEN_MODE_EXIT_INFO,ee)),this.setPanelHidden(!0,!0),this.setAuxiliaryBarHidden(!0,!0),this.setSideBarHidden(!0,!0),J.hideActivityBar&&this.setActivityBarHidden(!0,!0),J.hideStatusBar&&this.setStatusBarHidden(!0,!0),J.hideLineNumbers&&(Y("off"),this.windowState.runtime.zenMode.transitionDisposables.add(this.editorService.onDidVisibleEditorsChange(()=>Y("off")))),J.hideTabs&&this.editorGroupService.partOptions.showTabs&&this.windowState.runtime.zenMode.transitionDisposables.add(this.editorGroupService.enforcePartOptions({showTabs:!1})),J.silentNotifications&&this.notificationService.setFilter(y.NotificationsFilter.ERROR),this.windowState.runtime.zenMode.transitionDisposables.add(this.configurationService.onDidChangeConfiguration(te=>{if(te.affectsConfiguration(H.WorkbenchLayoutSettings.ZEN_MODE_SILENT_NOTIFICATIONS)){const se=this.configurationService.getValue(H.WorkbenchLayoutSettings.ZEN_MODE_SILENT_NOTIFICATIONS)?y.NotificationsFilter.ERROR:y.NotificationsFilter.OFF;this.notificationService.setFilter(se)}})),J.centerLayout&&this.centerEditorLayout(!0,!0)):(ee.wasVisible.panel&&this.setPanelHidden(!1,!0),ee.wasVisible.auxiliaryBar&&this.setAuxiliaryBarHidden(!1,!0),ee.wasVisible.sideBar&&this.setSideBarHidden(!1,!0),this.stateModel.getRuntimeValue(H.LayoutStateKeys.ACTIVITYBAR_HIDDEN,!0)||this.setActivityBarHidden(!1,!0),this.stateModel.getRuntimeValue(H.LayoutStateKeys.STATUSBAR_HIDDEN,!0)||this.setStatusBarHidden(!1,!0),ee.transitionedToCenteredEditorLayout&&this.centerEditorLayout(!1,!0),Y(),this.focus(),this.notificationService.setFilter(y.NotificationsFilter.OFF),$=ee.transitionedToFullScreen&&this.windowState.runtime.fullscreen),j||this.layout(),$&&this.hostService.toggleFullScreen(),this._onDidChangeZenMode.fire(this.stateModel.getRuntimeValue(H.LayoutStateKeys.ZEN_MODE_ACTIVE))}setStatusBarHidden(j,X){this.stateModel.setRuntimeValue(H.LayoutStateKeys.STATUSBAR_HIDDEN,j),j?this.container.classList.add(K.STATUSBAR_HIDDEN):this.container.classList.remove(K.STATUSBAR_HIDDEN),this.workbenchGrid.setViewVisible(this.statusBarPartView,!j)}createWorkbenchLayout(){const j=this.getPart("workbench.parts.titlebar"),X=this.getPart("workbench.parts.banner"),Y=this.getPart("workbench.parts.editor"),$=this.getPart("workbench.parts.activitybar"),J=this.getPart("workbench.parts.panel"),ee=this.getPart("workbench.parts.auxiliarybar"),te=this.getPart("workbench.parts.sidebar"),se=this.getPart("workbench.parts.statusbar");this.titleBarPartView=j,this.bannerPartView=X,this.sideBarPartView=te,this.activityBarPartView=$,this.editorPartView=Y,this.panelPartView=J,this.auxiliaryBarPartView=ee,this.statusBarPartView=se;const ie={["workbench.parts.activitybar"]:this.activityBarPartView,["workbench.parts.banner"]:this.bannerPartView,["workbench.parts.titlebar"]:this.titleBarPartView,["workbench.parts.editor"]:this.editorPartView,["workbench.parts.panel"]:this.panelPartView,["workbench.parts.sidebar"]:this.sideBarPartView,["workbench.parts.statusbar"]:this.statusBarPartView,["workbench.parts.auxiliarybar"]:this.auxiliaryBarPartView},ce=({type:ae})=>ie[ae],le=h.SerializableGrid.deserialize(this.createGridDescriptor(),{fromJSON:ce},{proportionalLayout:!1});this.container.prepend(le.element),this.container.setAttribute("role","application"),this.workbenchGrid=le,this.workbenchGrid.edgeSnapping=this.windowState.runtime.fullscreen;for(const ae of[j,Y,$,J,te,se,ee])this._register(ae.onDidVisibilityChange(ue=>{ae===te?this.setSideBarHidden(!ue,!0):ae===J?this.setPanelHidden(!ue,!0):ae===ee?this.setAuxiliaryBarHidden(!ue,!0):ae===Y&&this.setEditorHidden(!ue,!0),this._onDidChangePartVisibility.fire()}));this._register(this.storageService.onWillSaveState(ae=>{if(ae.reason===i.WillSaveStateReason.SHUTDOWN){const ue=this.stateModel.getRuntimeValue(H.LayoutStateKeys.SIDEBAR_HIDDEN)?this.workbenchGrid.getViewCachedVisibleSize(this.sideBarPartView):this.workbenchGrid.getViewSize(this.sideBarPartView).width;this.stateModel.setInitializationValue(H.LayoutStateKeys.SIDEBAR_SIZE,ue);const oe=this.stateModel.getRuntimeValue(H.LayoutStateKeys.PANEL_HIDDEN)?this.workbenchGrid.getViewCachedVisibleSize(this.panelPartView):this.stateModel.getRuntimeValue(H.LayoutStateKeys.PANEL_POSITION)===2?this.workbenchGrid.getViewSize(this.panelPartView).height:this.workbenchGrid.getViewSize(this.panelPartView).width;this.stateModel.setInitializationValue(H.LayoutStateKeys.PANEL_SIZE,oe);const fe=this.stateModel.getRuntimeValue(H.LayoutStateKeys.AUXILIARYBAR_HIDDEN)?this.workbenchGrid.getViewCachedVisibleSize(this.auxiliaryBarPartView):this.workbenchGrid.getViewSize(this.auxiliaryBarPartView).width;this.stateModel.setInitializationValue(H.LayoutStateKeys.AUXILIARYBAR_SIZE,fe),this.stateModel.save(!0,!0)}}))}getClientArea(){return(0,_.getClientArea)(this.parent)}layout(){this.disposed||(this._dimension=this.getClientArea(),this.logService.trace(`Layout#layout, height: ${this._dimension.height}, width: ${this._dimension.width}`),(0,_.position)(this.container,0,0,0,0,"relative"),(0,_.size)(this.container,this._dimension.width,this._dimension.height),this.workbenchGrid.layout(this._dimension.width,this._dimension.height),this.initialized=!0,this._onDidLayout.fire(this._dimension))}isEditorLayoutCentered(){return this.stateModel.getRuntimeValue(H.LayoutStateKeys.EDITOR_CENTERED)}centerEditorLayout(j,X){this.stateModel.setRuntimeValue(H.LayoutStateKeys.EDITOR_CENTERED,j);let Y=j;const $=this.editorService.activeEditor;let J=!1;$ instanceof F.DiffEditorInput?J=this.configurationService.getValue("diffEditor.renderSideBySide"):$ instanceof w.SideBySideEditorInput&&(J=!0),this.configurationService.getValue("workbench.editor.centeredLayoutAutoResize")&&(this.editorGroupService.groups.length>1||J)&&(Y=!1),this.editorGroupService.isLayoutCentered()!==Y&&(this.editorGroupService.centerLayout(Y),X||this.layout()),this._onDidChangeCenteredLayout.fire(this.stateModel.getRuntimeValue(H.LayoutStateKeys.EDITOR_CENTERED))}resizePart(j,X,Y){const $=this.workbenchGrid.width*X/100,J=this.workbenchGrid.height*Y/100;let ee;switch(j){case"workbench.parts.sidebar":ee=this.workbenchGrid.getViewSize(this.sideBarPartView),this.workbenchGrid.resizeView(this.sideBarPartView,{width:ee.width+$,height:ee.height});break;case"workbench.parts.panel":ee=this.workbenchGrid.getViewSize(this.panelPartView),this.workbenchGrid.resizeView(this.panelPartView,{width:ee.width+(this.getPanelPosition()!==2?$:0),height:ee.height+(this.getPanelPosition()!==2?0:J)});break;case"workbench.parts.auxiliarybar":ee=this.workbenchGrid.getViewSize(this.auxiliaryBarPartView),this.workbenchGrid.resizeView(this.auxiliaryBarPartView,{width:ee.width+$,height:ee.height});break;case"workbench.parts.editor":if(ee=this.workbenchGrid.getViewSize(this.editorPartView),this.editorGroupService.count===1)this.workbenchGrid.resizeView(this.editorPartView,{width:ee.width+$,height:ee.height+J});else{const te=this.editorGroupService.activeGroup,{width:se,height:ie}=this.editorGroupService.getSize(te);this.editorGroupService.setSize(te,{width:se+$,height:ie+J});const{width:ce,height:le}=this.editorGroupService.getSize(te);(J&&ie===le||$&&se===ce)&&this.workbenchGrid.resizeView(this.editorPartView,{width:ee.width+($&&se===ce?$:0),height:ee.height+(J&&ie===le?J:0)})}break;default:return}}setActivityBarHidden(j,X){this.stateModel.setRuntimeValue(H.LayoutStateKeys.ACTIVITYBAR_HIDDEN,j),this.workbenchGrid.setViewVisible(this.activityBarPartView,!j)}setBannerHidden(j){this.workbenchGrid.setViewVisible(this.bannerPartView,!j)}setEditorHidden(j,X){this.stateModel.setRuntimeValue(H.LayoutStateKeys.EDITOR_HIDDEN,j),j?this.container.classList.add(K.EDITOR_HIDDEN):this.container.classList.remove(K.EDITOR_HIDDEN),this.workbenchGrid.setViewVisible(this.editorPartView,!j),j&&!this.isVisible("workbench.parts.panel")&&this.setPanelHidden(!1,!0)}getLayoutClasses(){return(0,b.coalesce)([this.isVisible("workbench.parts.sidebar")?void 0:K.SIDEBAR_HIDDEN,this.isVisible("workbench.parts.editor")?void 0:K.EDITOR_HIDDEN,this.isVisible("workbench.parts.panel")?void 0:K.PANEL_HIDDEN,this.isVisible("workbench.parts.auxiliarybar")?void 0:K.AUXILIARYBAR_HIDDEN,this.isVisible("workbench.parts.statusbar")?void 0:K.STATUSBAR_HIDDEN,this.windowState.runtime.fullscreen?K.FULLSCREEN:void 0])}setSideBarHidden(j,X){if(this.stateModel.setRuntimeValue(H.LayoutStateKeys.SIDEBAR_HIDDEN,j),j?this.container.classList.add(K.SIDEBAR_HIDDEN):this.container.classList.remove(K.SIDEBAR_HIDDEN),j&&this.paneCompositeService.getActivePaneComposite(0)){this.paneCompositeService.hideActivePaneComposite(0);const Y=this.paneCompositeService.getActivePaneComposite(1);this.hasFocus("workbench.parts.panel")&&Y?Y.focus():this.focus()}else if(!j&&!this.paneCompositeService.getActivePaneComposite(0)){const Y=this.paneCompositeService.getLastActivePaneCompositeId(0);Y&&(this.paneCompositeService.openPaneComposite(Y,0,!0)||this.paneCompositeService.openPaneComposite(this.viewDescriptorService.getDefaultViewContainer(0)?.id,0,!0))}this.workbenchGrid.setViewVisible(this.sideBarPartView,!j)}hasViews(j){const X=this.viewDescriptorService.getViewContainerById(j);if(!X)return!1;const Y=this.viewDescriptorService.getViewContainerModel(X);return Y?Y.activeViewDescriptors.length>=1:!1}adjustPartPositions(j,X,Y){const $=Y!==2||!(X==="center"||j===0&&X==="right"||j===1&&X==="left"),J=Y!==2||!(X==="center"||j===1&&X==="right"||j===0&&X==="left"),ee=this.isVisible("workbench.parts.panel")?this.workbenchGrid.getViewSize(this.panelPartView).width:h.Sizing.Invisible(this.workbenchGrid.getViewCachedVisibleSize(this.panelPartView)??this.panelPartView.minimumWidth),te=this.isVisible("workbench.parts.panel")?this.workbenchGrid.getViewSize(this.panelPartView).height:h.Sizing.Invisible(this.workbenchGrid.getViewCachedVisibleSize(this.panelPartView)??this.panelPartView.minimumHeight),se=this.isVisible("workbench.parts.sidebar")?this.workbenchGrid.getViewSize(this.sideBarPartView).width:h.Sizing.Invisible(this.workbenchGrid.getViewCachedVisibleSize(this.sideBarPartView)??this.sideBarPartView.minimumWidth),ie=this.isVisible("workbench.parts.auxiliarybar")?this.workbenchGrid.getViewSize(this.auxiliaryBarPartView).width:h.Sizing.Invisible(this.workbenchGrid.getViewCachedVisibleSize(this.auxiliaryBarPartView)??this.auxiliaryBarPartView.minimumWidth);j===0?(this.workbenchGrid.moveViewTo(this.activityBarPartView,[2,0]),this.workbenchGrid.moveView(this.sideBarPartView,se,$?this.editorPartView:this.activityBarPartView,$?2:3),J?this.workbenchGrid.moveView(this.auxiliaryBarPartView,ie,this.editorPartView,3):this.workbenchGrid.moveViewTo(this.auxiliaryBarPartView,[2,-1])):(this.workbenchGrid.moveViewTo(this.activityBarPartView,[2,-1]),this.workbenchGrid.moveView(this.sideBarPartView,se,$?this.editorPartView:this.activityBarPartView,$?3:2),J?this.workbenchGrid.moveView(this.auxiliaryBarPartView,ie,this.editorPartView,2):this.workbenchGrid.moveViewTo(this.auxiliaryBarPartView,[2,0])),Y!==2&&(this.workbenchGrid.moveView(this.panelPartView,ee,this.editorPartView,Y===0?2:3),this.workbenchGrid.resizeView(this.panelPartView,{height:te,width:ee})),this.isVisible("workbench.parts.sidebar")&&this.workbenchGrid.resizeView(this.sideBarPartView,{height:this.workbenchGrid.getViewSize(this.sideBarPartView).height,width:se}),this.isVisible("workbench.parts.auxiliarybar")&&this.workbenchGrid.resizeView(this.auxiliaryBarPartView,{height:this.workbenchGrid.getViewSize(this.auxiliaryBarPartView).height,width:ie})}setPanelAlignment(j,X){this.getPanelPosition()!==2&&this.setPanelPosition(2),j!=="center"&&this.isPanelMaximized()&&this.toggleMaximizedPanel(),this.stateModel.setRuntimeValue(H.LayoutStateKeys.PANEL_ALIGNMENT,j),this.adjustPartPositions(this.getSideBarPosition(),j,this.getPanelPosition()),this._onDidChangePanelAlignment.fire(j)}setPanelHidden(j,X){if(!this.workbenchGrid)return;const Y=!this.isVisible("workbench.parts.panel");this.stateModel.setRuntimeValue(H.LayoutStateKeys.PANEL_HIDDEN,j);const $=this.isPanelMaximized(),J=this.panelOpensMaximized();j?this.container.classList.add(K.PANEL_HIDDEN):this.container.classList.remove(K.PANEL_HIDDEN);let ee=!1;if(j&&this.paneCompositeService.getActivePaneComposite(1))this.paneCompositeService.hideActivePaneComposite(1),ee=!D.isIOS;else if(!j&&!this.paneCompositeService.getActivePaneComposite(1)){let te=this.paneCompositeService.getLastActivePaneCompositeId(1);if((!te||!this.hasViews(te))&&(te=this.viewDescriptorService.getViewContainersByLocation(1).find(se=>this.hasViews(se.id))?.id),te){const se=!X;this.paneCompositeService.openPaneComposite(te,1,se)}}j&&$&&this.toggleMaximizedPanel(),Y!==j&&(this.workbenchGrid.setViewVisible(this.panelPartView,!j),j?this.stateModel.setRuntimeValue(H.LayoutStateKeys.PANEL_WAS_LAST_MAXIMIZED,$):!X&&$!==J&&this.toggleMaximizedPanel(),ee&&this.editorGroupService.activeGroup.focus())}toggleMaximizedPanel(){const j=this.workbenchGrid.getViewSize(this.panelPartView),X=this.getPanelPosition(),Y=this.isPanelMaximized();Y?(this.setEditorHidden(!1),this.workbenchGrid.resizeView(this.panelPartView,{width:X===2?j.width:this.stateModel.getRuntimeValue(H.LayoutStateKeys.PANEL_LAST_NON_MAXIMIZED_WIDTH),height:X===2?this.stateModel.getRuntimeValue(H.LayoutStateKeys.PANEL_LAST_NON_MAXIMIZED_HEIGHT):j.height})):(this.isVisible("workbench.parts.panel")&&(X===2?this.stateModel.setRuntimeValue(H.LayoutStateKeys.PANEL_LAST_NON_MAXIMIZED_HEIGHT,j.height):this.stateModel.setRuntimeValue(H.LayoutStateKeys.PANEL_LAST_NON_MAXIMIZED_WIDTH,j.width)),this.setEditorHidden(!0)),this.stateModel.setRuntimeValue(H.LayoutStateKeys.PANEL_WAS_LAST_MAXIMIZED,!Y)}panelOpensMaximized(){if(this.getPanelAlignment()!=="center"&&this.getPanelPosition()===2)return!1;const j=(0,o.panelOpensMaximizedFromString)(this.configurationService.getValue(H.WorkbenchLayoutSettings.PANEL_OPENS_MAXIMIZED)),X=this.stateModel.getRuntimeValue(H.LayoutStateKeys.PANEL_WAS_LAST_MAXIMIZED);return j===0||j===2&&X}setAuxiliaryBarHidden(j,X){if(this.stateModel.setRuntimeValue(H.LayoutStateKeys.AUXILIARYBAR_HIDDEN,j),j?this.container.classList.add(K.AUXILIARYBAR_HIDDEN):this.container.classList.remove(K.AUXILIARYBAR_HIDDEN),j&&this.paneCompositeService.getActivePaneComposite(2)){this.paneCompositeService.hideActivePaneComposite(2);const Y=this.paneCompositeService.getActivePaneComposite(1);this.hasFocus("workbench.parts.panel")&&Y?Y.focus():this.focus()}else if(!j&&!this.paneCompositeService.getActivePaneComposite(2)){let Y=this.paneCompositeService.getLastActivePaneCompositeId(2);if((!Y||!this.hasViews(Y))&&(Y=this.viewDescriptorService.getViewContainersByLocation(2).find($=>this.hasViews($.id))?.id),Y){const $=!X;this.paneCompositeService.openPaneComposite(Y,2,$)}}this.workbenchGrid.setViewVisible(this.auxiliaryBarPartView,!j)}setPartHidden(j,X){switch(X){case"workbench.parts.activitybar":return this.setActivityBarHidden(j);case"workbench.parts.sidebar":return this.setSideBarHidden(j);case"workbench.parts.editor":return this.setEditorHidden(j);case"workbench.parts.banner":return this.setBannerHidden(j);case"workbench.parts.auxiliarybar":return this.setAuxiliaryBarHidden(j);case"workbench.parts.panel":return this.setPanelHidden(j)}}hasWindowBorder(){return this.windowState.runtime.windowBorder}getWindowBorderWidth(){return this.windowState.runtime.windowBorder?2:0}getWindowBorderRadius(){return this.windowState.runtime.windowBorder&&D.isMacintosh?"5px":void 0}isPanelMaximized(){return(this.getPanelAlignment()==="center"||this.getPanelPosition()!==2)&&!this.isVisible("workbench.parts.editor")}getSideBarPosition(){return this.stateModel.getRuntimeValue(H.LayoutStateKeys.SIDEBAR_POSITON)}getPanelAlignment(){return this.stateModel.getRuntimeValue(H.LayoutStateKeys.PANEL_ALIGNMENT)}updateMenubarVisibility(j){const X=this.shouldShowTitleBar();!j&&this.workbenchGrid&&X!==this.isVisible("workbench.parts.titlebar")&&this.workbenchGrid.setViewVisible(this.titleBarPartView,X)}toggleMenuBar(){let j=(0,r.getMenuBarVisibility)(this.configurationService);typeof j!="string"&&(j="classic");let X;j==="visible"||j==="classic"?X=(0,r.getTitleBarStyle)(this.configurationService)==="native"?"toggle":"compact":X="classic",this.configurationService.updateValue("window.menuBarVisibility",X)}getPanelPosition(){return this.stateModel.getRuntimeValue(H.LayoutStateKeys.PANEL_POSITION)}setPanelPosition(j){this.isVisible("workbench.parts.panel")||this.setPanelHidden(!1);const X=this.getPart("workbench.parts.panel"),Y=(0,o.positionToString)(this.getPanelPosition()),$=(0,o.positionToString)(j),J=(0,E.assertIsDefined)(X.getContainer());J.classList.remove(Y),J.classList.add($),X.updateStyles();const ee=this.workbenchGrid.getViewSize(this.panelPartView),te=this.workbenchGrid.getViewSize(this.sideBarPartView),se=this.workbenchGrid.getViewSize(this.auxiliaryBarPartView);let ie=!this.isVisible("workbench.parts.editor");$!==Y&&!ie&&(j===2?this.stateModel.setRuntimeValue(H.LayoutStateKeys.PANEL_LAST_NON_MAXIMIZED_WIDTH,ee.width):(0,o.positionFromString)(Y)===2&&this.stateModel.setRuntimeValue(H.LayoutStateKeys.PANEL_LAST_NON_MAXIMIZED_HEIGHT,ee.height)),j===2&&this.getPanelAlignment()!=="center"&&ie&&(this.toggleMaximizedPanel(),ie=!1),this.stateModel.setRuntimeValue(H.LayoutStateKeys.PANEL_POSITION,j);const ce=this.isVisible("workbench.parts.sidebar"),le=this.isVisible("workbench.parts.auxiliarybar");j===2?this.workbenchGrid.moveView(this.panelPartView,ie?ee.height:this.stateModel.getRuntimeValue(H.LayoutStateKeys.PANEL_LAST_NON_MAXIMIZED_HEIGHT),this.editorPartView,1):j===1?this.workbenchGrid.moveView(this.panelPartView,ie?ee.width:this.stateModel.getRuntimeValue(H.LayoutStateKeys.PANEL_LAST_NON_MAXIMIZED_WIDTH),this.editorPartView,3):this.workbenchGrid.moveView(this.panelPartView,ie?ee.width:this.stateModel.getRuntimeValue(H.LayoutStateKeys.PANEL_LAST_NON_MAXIMIZED_WIDTH),this.editorPartView,2),this.workbenchGrid.resizeView(this.sideBarPartView,te),ce||this.setSideBarHidden(!0),this.workbenchGrid.resizeView(this.auxiliaryBarPartView,se),le||this.setAuxiliaryBarHidden(!0),j===2&&this.adjustPartPositions(this.getSideBarPosition(),this.getPanelAlignment(),j),this._onDidChangePanelPosition.fire($)}isWindowMaximized(){return this.windowState.runtime.maximized}updateWindowMaximizedState(j){this.container.classList.toggle(K.MAXIMIZED,j),this.windowState.runtime.maximized!==j&&(this.windowState.runtime.maximized=j,this.updateWindowBorder(),this._onDidChangeWindowMaximized.fire(j))}getVisibleNeighborPart(j,X){if(!this.workbenchGrid||!this.isVisible(j))return;const Y=this.workbenchGrid.getNeighborViews(this.getPart(j),X,!1);if(!!Y)for(const $ of Y){const J=["workbench.parts.activitybar","workbench.parts.editor","workbench.parts.panel","workbench.parts.auxiliarybar","workbench.parts.sidebar","workbench.parts.statusbar","workbench.parts.titlebar"].find(ee=>this.getPart(ee)===$&&this.isVisible(ee));if(J!==void 0)return J}}arrangeEditorNodes(j,X,Y){if(!j.sideBar&&!j.auxiliaryBar)return j.editor.size=X,j.editor;const $=[j.editor];return j.editor.size=Y,j.sideBar&&(this.stateModel.getRuntimeValue(H.LayoutStateKeys.SIDEBAR_POSITON)===0?$.splice(0,0,j.sideBar):$.push(j.sideBar),j.editor.size-=this.stateModel.getRuntimeValue(H.LayoutStateKeys.SIDEBAR_HIDDEN)?0:j.sideBar.size),j.auxiliaryBar&&(this.stateModel.getRuntimeValue(H.LayoutStateKeys.SIDEBAR_POSITON)===1?$.splice(0,0,j.auxiliaryBar):$.push(j.auxiliaryBar),j.editor.size-=this.stateModel.getRuntimeValue(H.LayoutStateKeys.AUXILIARYBAR_HIDDEN)?0:j.auxiliaryBar.size),{type:"branch",data:$,size:X}}arrangeMiddleSectionNodes(j,X,Y){const $=this.stateModel.getRuntimeValue(H.LayoutStateKeys.ACTIVITYBAR_HIDDEN)?0:j.activityBar.size,J=this.stateModel.getRuntimeValue(H.LayoutStateKeys.SIDEBAR_HIDDEN)?0:j.sideBar.size,ee=this.stateModel.getRuntimeValue(H.LayoutStateKeys.AUXILIARYBAR_HIDDEN)?0:j.auxiliaryBar.size,te=this.stateModel.getInitializationValue(H.LayoutStateKeys.PANEL_SIZE)?0:j.panel.size,se=[];if(this.stateModel.getRuntimeValue(H.LayoutStateKeys.PANEL_POSITION)!==2)se.push(j.editor),j.editor.size=X-$-J-te-ee,this.stateModel.getRuntimeValue(H.LayoutStateKeys.PANEL_POSITION)===1?se.push(j.panel):se.splice(0,0,j.panel),this.stateModel.getRuntimeValue(H.LayoutStateKeys.SIDEBAR_POSITON)===0?(se.push(j.auxiliaryBar),se.splice(0,0,j.sideBar),se.splice(0,0,j.activityBar)):(se.splice(0,0,j.auxiliaryBar),se.push(j.sideBar),se.push(j.activityBar));else{const ie=this.stateModel.getRuntimeValue(H.LayoutStateKeys.PANEL_ALIGNMENT),ce=this.stateModel.getRuntimeValue(H.LayoutStateKeys.SIDEBAR_POSITON),le=!(ie==="center"||ce===0&&ie==="right"||ce===1&&ie==="left"),ae=!(ie==="center"||ce===1&&ie==="right"||ce===0&&ie==="left"),ue=X-$-(le?0:J)-(ae?0:ee);se.push({type:"branch",data:[this.arrangeEditorNodes({editor:j.editor,sideBar:le?j.sideBar:void 0,auxiliaryBar:ae?j.auxiliaryBar:void 0},Y-te,ue),j.panel],size:ue}),le||(ce===0?se.splice(0,0,j.sideBar):se.push(j.sideBar)),ae||(ce===1?se.splice(0,0,j.auxiliaryBar):se.push(j.auxiliaryBar)),ce===0?se.splice(0,0,j.activityBar):se.push(j.activityBar)}return se}createGridDescriptor(){const{width:j,height:X}=this.stateModel.getInitializationValue(H.LayoutStateKeys.GRID_SIZE),Y=this.stateModel.getInitializationValue(H.LayoutStateKeys.SIDEBAR_SIZE),$=this.stateModel.getInitializationValue(H.LayoutStateKeys.AUXILIARYBAR_SIZE),J=this.stateModel.getInitializationValue(H.LayoutStateKeys.PANEL_SIZE),ee=this.titleBarPartView.minimumHeight,te=this.bannerPartView.minimumHeight,se=this.statusBarPartView.minimumHeight,ie=this.activityBarPartView.minimumWidth,ce=X-ee-se,le={type:"leaf",data:{type:"workbench.parts.activitybar"},size:ie,visible:!this.stateModel.getRuntimeValue(H.LayoutStateKeys.ACTIVITYBAR_HIDDEN)},ae={type:"leaf",data:{type:"workbench.parts.sidebar"},size:Y,visible:!this.stateModel.getRuntimeValue(H.LayoutStateKeys.SIDEBAR_HIDDEN)},ue={type:"leaf",data:{type:"workbench.parts.auxiliarybar"},size:$,visible:this.isVisible("workbench.parts.auxiliarybar")},oe={type:"leaf",data:{type:"workbench.parts.editor"},size:0,visible:!this.stateModel.getRuntimeValue(H.LayoutStateKeys.EDITOR_HIDDEN)},fe={type:"leaf",data:{type:"workbench.parts.panel"},size:J,visible:!this.stateModel.getRuntimeValue(H.LayoutStateKeys.PANEL_HIDDEN)},pe=this.arrangeMiddleSectionNodes({activityBar:le,auxiliaryBar:ue,editor:oe,panel:fe,sideBar:ae},j,ce),me={root:{type:"branch",size:j,data:[{type:"leaf",data:{type:"workbench.parts.titlebar"},size:ee,visible:this.isVisible("workbench.parts.titlebar")},{type:"leaf",data:{type:"workbench.parts.banner"},size:te,visible:!1},{type:"branch",data:pe,size:ce},{type:"leaf",data:{type:"workbench.parts.statusbar"},size:se,visible:!this.stateModel.getRuntimeValue(H.LayoutStateKeys.STATUSBAR_HIDDEN)}]},orientation:0,width:j,height:X},be={activityBarVisible:!this.stateModel.getRuntimeValue(H.LayoutStateKeys.ACTIVITYBAR_HIDDEN),sideBarVisible:!this.stateModel.getRuntimeValue(H.LayoutStateKeys.SIDEBAR_HIDDEN),auxiliaryBarVisible:!this.stateModel.getRuntimeValue(H.LayoutStateKeys.AUXILIARYBAR_HIDDEN),panelVisible:!this.stateModel.getRuntimeValue(H.LayoutStateKeys.PANEL_HIDDEN),statusbarVisible:!this.stateModel.getRuntimeValue(H.LayoutStateKeys.STATUSBAR_HIDDEN),sideBarPosition:(0,o.positionToString)(this.stateModel.getRuntimeValue(H.LayoutStateKeys.SIDEBAR_POSITON)),panelPosition:(0,o.positionToString)(this.stateModel.getRuntimeValue(H.LayoutStateKeys.PANEL_POSITION))};return this.telemetryService.publicLog2("startupLayout",be),me}dispose(){super.dispose(),this.disposed=!0}}e.Layout=G;function q(Z){return Z.getValue(H.WorkbenchLayoutSettings.ZEN_MODE_CONFIG)}}),define(ne[2754],re([1,0,6,13,35,5,2750,937,642,938,43,88,2]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PaneCompositeParts=void 0;let c=class extends o.Disposable{constructor(S){super();this.paneCompositeParts=new Map,this.paneCompositeSelectorParts=new Map;const s=S.createInstance(I.PanelPart),l=S.createInstance(w.SidebarPart),r=S.createInstance(D.AuxiliaryBarPart),p=S.createInstance(k.ActivitybarPart,l);this.paneCompositeParts.set(1,s),this.paneCompositeParts.set(0,l),this.paneCompositeParts.set(2,r),this.paneCompositeSelectorParts.set(1,s),this.paneCompositeSelectorParts.set(0,p),this.paneCompositeSelectorParts.set(2,r);const u=this._register(new o.DisposableStore);this.onDidPaneCompositeOpen=t.Event.any(...v.ViewContainerLocations.map(a=>t.Event.map(this.paneCompositeParts.get(a).onDidPaneCompositeOpen,n=>({composite:n,viewContainerLocation:a}),u))),this.onDidPaneCompositeClose=t.Event.any(...v.ViewContainerLocations.map(a=>t.Event.map(this.paneCompositeParts.get(a).onDidPaneCompositeClose,n=>({composite:n,viewContainerLocation:a}),u)))}openPaneComposite(S,s,l){return this.getPartByLocation(s).openPaneComposite(S,l)}getActivePaneComposite(S){return this.getPartByLocation(S).getActivePaneComposite()}getPaneComposite(S,s){return this.getPartByLocation(s).getPaneComposite(S)}getPaneComposites(S){return this.getPartByLocation(S).getPaneComposites()}getPinnedPaneCompositeIds(S){return this.getSelectorPartByLocation(S).getPinnedPaneCompositeIds()}getVisiblePaneCompositeIds(S){return this.getSelectorPartByLocation(S).getVisiblePaneCompositeIds()}getProgressIndicator(S,s){return this.getPartByLocation(s).getProgressIndicator(S)}hideActivePaneComposite(S){this.getPartByLocation(S).hideActivePaneComposite()}getLastActivePaneCompositeId(S){return this.getPartByLocation(S).getLastActivePaneCompositeId()}showActivity(S,s,l,r,p){return this.getSelectorPartByLocation(s).showActivity(S,l,r,p)}getPartByLocation(S){return(0,f.assertIsDefined)(this.paneCompositeParts.get(S))}getSelectorPartByLocation(S){return(0,f.assertIsDefined)(this.paneCompositeSelectorParts.get(S))}};c=Ee([W(0,A.IInstantiationService)],c),e.PaneCompositeParts=c,(0,_.registerSingleton)(C.IPaneCompositePartService,c)}),define(ne[939],re([1,0,40,37,43,27,12,5,24,34,161,8,80]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FilterViewPaneContainer=void 0;let c=class extends v.ViewPaneContainer{constructor(S,s,l,r,p,u,a,n,h,g,d,m){super(S,{mergeViewWithContainerWhenSingleView:!1},a,l,r,h,p,g,n,u,d,m);this.constantViewDescriptors=new Map,this.allViews=new Map,this._register(s(b=>{this.filterValue=b,this.onFilterChanged(b)})),this._register(this.onDidChangeViewVisibility(b=>{const E=Array.from(this.allViews.entries()).find(y=>y[1].has(b.id));E&&!this.filterValue?.includes(E[0])&&this.setFilter(E[1].get(b.id))})),this._register(this.viewContainerModel.onDidChangeActiveViewDescriptors(()=>{this.updateAllViews(this.viewContainerModel.activeViewDescriptors)}))}updateAllViews(S){S.forEach(s=>{let l=this.getFilterOn(s);!l||(this.allViews.has(l)||this.allViews.set(l,new Map),this.allViews.get(l).set(s.id,s),this.filterValue&&!this.filterValue.includes(l)&&this.panes.find(r=>r.id===s.id)&&this.viewContainerModel.setVisible(s.id,!1))})}addConstantViewDescriptors(S){S.forEach(s=>this.constantViewDescriptors.set(s.id,s))}onFilterChanged(S){this.allViews.size===0&&this.updateAllViews(this.viewContainerModel.activeViewDescriptors),this.getViewsNotForTarget(S).forEach(s=>this.viewContainerModel.setVisible(s.id,!1)),this.getViewsForTarget(S).forEach(s=>this.viewContainerModel.setVisible(s.id,!0))}getViewsForTarget(S){const s=[];for(let l=0;l<S.length;l++)this.allViews.has(S[l])&&s.push(...Array.from(this.allViews.get(S[l]).values()));return s}getViewsNotForTarget(S){const s=this.allViews.keys();let l=s.next(),r=[];for(;!l.done;){let p=!1;S.forEach(u=>{l.value===u&&(p=!0)}),p||(r=r.concat(this.getViewsForTarget([l.value]))),l=s.next()}return r}onDidAddViewDescriptors(S){const s=super.onDidAddViewDescriptors(S);for(let l=0;l<S.length;l++)this.constantViewDescriptors.has(S[l].viewDescriptor.id)&&s[l].setExpanded(!1);return this.allViews.size===0&&this.updateAllViews(this.viewContainerModel.activeViewDescriptors),s}};c=Ee([W(2,C.IConfigurationService),W(3,o.IWorkbenchLayoutService),W(4,A.ITelemetryService),W(5,I.IStorageService),W(6,D.IInstantiationService),W(7,k.IThemeService),W(8,f.IContextMenuService),W(9,t.IExtensionService),W(10,w.IWorkspaceContextService),W(11,_.IViewDescriptorService)],c),e.FilterViewPaneContainer=c}),define(ne[940],re([1,0,2,43,74,17,24,7,6,13,16,1427,35,5,27,12,37,40,34,439,80,9,70,59,939,88]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getPartByLocation=e.ViewsService=void 0;let m=class extends t.Disposable{constructor(T,R,O,x){super();this.viewDescriptorService=T,this.paneCompositeService=R,this.contextKeyService=O,this.layoutService=x,this._onDidChangeViewVisibility=this._register(new I.Emitter),this.onDidChangeViewVisibility=this._onDidChangeViewVisibility.event,this._onDidChangeViewContainerVisibility=this._register(new I.Emitter),this.onDidChangeViewContainerVisibility=this._onDidChangeViewContainerVisibility.event,this.viewDisposable=new Map,this.visibleViewContextKeys=new Map,this.viewPaneContainers=new Map,this._register((0,t.toDisposable)(()=>{this.viewDisposable.forEach(F=>F.dispose()),this.viewDisposable.clear()})),this.viewDescriptorService.viewContainers.forEach(F=>this.onDidRegisterViewContainer(F,this.viewDescriptorService.getViewContainerLocation(F))),this._register(this.viewDescriptorService.onDidChangeViewContainers(({added:F,removed:L})=>this.onDidChangeContainers(F,L))),this._register(this.viewDescriptorService.onDidChangeContainerLocation(({viewContainer:F,from:L,to:M})=>this.onDidChangeContainerLocation(F,L,M))),this._register(this.paneCompositeService.onDidPaneCompositeOpen(F=>this._onDidChangeViewContainerVisibility.fire({id:F.composite.getId(),visible:!0,location:F.viewContainerLocation}))),this._register(this.paneCompositeService.onDidPaneCompositeClose(F=>this._onDidChangeViewContainerVisibility.fire({id:F.composite.getId(),visible:!1,location:F.viewContainerLocation}))),this.focusedViewContextKey=_.FocusedViewContext.bindTo(O)}onViewsAdded(T){for(const R of T)this.onViewsVisibilityChanged(R,R.isBodyVisible())}onViewsVisibilityChanged(T,R){this.getOrCreateActiveViewContextKey(T).set(R),this._onDidChangeViewVisibility.fire({id:T.id,visible:R})}onViewsRemoved(T){for(const R of T)this.onViewsVisibilityChanged(R,!1)}getOrCreateActiveViewContextKey(T){const R=(0,_.getVisbileViewContextKey)(T.id);let O=this.visibleViewContextKeys.get(R);return O||(O=new D.RawContextKey(R,!1).bindTo(this.contextKeyService),this.visibleViewContextKeys.set(R,O)),O}onDidChangeContainers(T,R){for(const{container:O,location:x}of R)this.deregisterPaneComposite(O,x);for(const{container:O,location:x}of T)this.onDidRegisterViewContainer(O,x)}onDidRegisterViewContainer(T,R){this.registerPaneComposite(T,R);const O=this.viewDescriptorService.getViewContainerModel(T);this.onViewDescriptorsAdded(O.allViewDescriptors,T),this._register(O.onDidChangeAllViewDescriptors(({added:x,removed:F})=>{this.onViewDescriptorsAdded(x,T),this.onViewDescriptorsRemoved(F)})),this._register(this.registerOpenViewContainerAction(T))}onDidChangeContainerLocation(T,R,O){this.deregisterPaneComposite(T,R),this.registerPaneComposite(T,O)}onViewDescriptorsAdded(T,R){const O=this.viewDescriptorService.getViewContainerLocation(R);if(O===null)return;const x=this.getComposite(R.id,O);for(const F of T){const L=new t.DisposableStore;L.add(this.registerOpenViewAction(F)),L.add(this.registerFocusViewAction(F,x?.name&&x.name!==x.id?x.name:n.CATEGORIES.View)),L.add(this.registerResetViewLocationAction(F)),this.viewDisposable.set(F,L)}}onViewDescriptorsRemoved(T){for(const R of T){const O=this.viewDisposable.get(R);O&&(O.dispose(),this.viewDisposable.delete(R))}}async openComposite(T,R,O){return this.paneCompositeService.openPaneComposite(T,R,O)}getComposite(T,R){return this.paneCompositeService.getPaneComposite(T,R)}isViewContainerVisible(T){const R=this.viewDescriptorService.getViewContainerById(T);if(R){const O=this.viewDescriptorService.getViewContainerLocation(R);if(O!==null)return this.paneCompositeService.getActivePaneComposite(O)?.getId()===T}return!1}getVisibleViewContainer(T){const R=this.paneCompositeService.getActivePaneComposite(T)?.getId();return R?this.viewDescriptorService.getViewContainerById(R):null}getActiveViewPaneContainerWithId(T){const R=this.viewDescriptorService.getViewContainerById(T);return R?this.getActiveViewPaneContainer(R):null}async openViewContainer(T,R){const O=this.viewDescriptorService.getViewContainerById(T);if(O){const x=this.viewDescriptorService.getViewContainerLocation(O);if(x!==null)return await this.paneCompositeService.openPaneComposite(T,x,R)||null}return null}async closeViewContainer(T){const R=this.viewDescriptorService.getViewContainerById(T);if(R){const O=this.viewDescriptorService.getViewContainerLocation(R),x=O!==null&&this.paneCompositeService.getActivePaneComposite(O);if(O!==null)return x?this.layoutService.setPartHidden(!0,E(O)):void 0}}isViewVisible(T){return this.getActiveViewWithId(T)?.isBodyVisible()||!1}getActiveViewWithId(T){const R=this.viewDescriptorService.getViewContainerByViewId(T);if(R){const O=this.getActiveViewPaneContainer(R);if(O)return O.getView(T)}return null}getViewWithId(T){const R=this.viewDescriptorService.getViewContainerByViewId(T);if(R){const O=this.viewPaneContainers.get(R.id);if(O)return O.getView(T)}return null}async openView(T,R){const O=this.viewDescriptorService.getViewContainerByViewId(T);if(!O||!this.viewDescriptorService.getViewContainerModel(O).activeViewDescriptors.some(L=>L.id===T))return null;const x=this.viewDescriptorService.getViewContainerLocation(O),F=this.getComposite(O.id,x);if(F){const L=await this.openComposite(F.id,x);if(L&&L.openView)return L.openView(T,R)||null;R&&L?.focus()}return null}closeView(T){const R=this.viewDescriptorService.getViewContainerByViewId(T);if(R){const O=this.getActiveViewPaneContainer(R);if(O){const x=O.getView(T);if(x)if(O.views.length===1){const F=this.viewDescriptorService.getViewContainerLocation(R);F===0?this.layoutService.setPartHidden(!0,"workbench.parts.sidebar"):(F===1||F===2)&&this.paneCompositeService.hideActivePaneComposite(F),this.focusedViewContextKey.get()===T&&this.focusedViewContextKey.reset()}else x.setExpanded(!1)}}}getActiveViewPaneContainer(T){const R=this.viewDescriptorService.getViewContainerLocation(T);if(R===null)return null;const O=this.paneCompositeService.getActivePaneComposite(R);return O?.getId()===T.id&&O.getViewPaneContainer()||null}getViewProgressIndicator(T){const R=this.viewDescriptorService.getViewContainerByViewId(T);if(!R)return;const O=this.viewPaneContainers.get(R.id);if(!O)return;const x=O.getView(T);if(!!x)return O.isViewMergedWithContainer()?this.getViewContainerProgressIndicator(R):x.getProgressIndicator()}getViewContainerProgressIndicator(T){const R=this.viewDescriptorService.getViewContainerLocation(T);if(R!==null)return this.paneCompositeService.getProgressIndicator(T.id,R)}registerOpenViewContainerAction(T){const R=new t.DisposableStore;if(T.openCommandActionDescriptor){let{id:O,title:x,mnemonicTitle:F,keybindings:L,order:M}=T.openCommandActionDescriptor??{id:T.id};x=x??T.title;const N=this;if(R.add((0,v.registerAction2)(class extends v.Action2{constructor(){super({id:O,get title(){return N.viewDescriptorService.getViewContainerLocation(T)===0?{value:(0,C.localize)(0,null,x),original:`Show ${x}`}:{value:(0,C.localize)(1,null,x),original:`Toggle ${x}`}},category:n.CATEGORIES.View,precondition:D.ContextKeyExpr.has((0,_.getEnabledViewContainerContextKey)(T.id)),keybinding:L?{...L,weight:200}:void 0,f1:!0})}async run(P){const V=P.get(h.IEditorGroupsService),z=P.get(f.IViewDescriptorService),U=P.get(u.IWorkbenchLayoutService),H=P.get(f.IViewsService);switch(z.getViewContainerLocation(T)){case 0:!H.isViewContainerVisible(T.id)||!U.hasFocus("workbench.parts.sidebar")?await H.openViewContainer(T.id,!0):V.activeGroup.focus();break;case 1:!H.isViewContainerVisible(T.id)||!U.hasFocus("workbench.parts.panel")?await H.openViewContainer(T.id,!0):H.closeViewContainer(T.id);break}}})),F){const B=this.viewDescriptorService.getDefaultViewContainerLocation(T);R.add(v.MenuRegistry.appendMenuItem(v.MenuId.MenubarViewMenu,{command:{id:O,title:F},group:B===0?"3_views":"4_panels",when:D.ContextKeyExpr.has((0,_.getEnabledViewContainerContextKey)(T.id)),order:M??Number.MAX_VALUE}))}}return R}registerOpenViewAction(T){const R=new t.DisposableStore;if(T.openCommandActionDescriptor){const O=T.openCommandActionDescriptor.title??T.name,x=T.openCommandActionDescriptor.id,F=this;if(R.add((0,v.registerAction2)(class extends v.Action2{constructor(){super({id:x,get title(){return F.viewDescriptorService.getViewLocationById(T.id)===0?{value:(0,C.localize)(2,null,O),original:`Show ${O}`}:{value:(0,C.localize)(3,null,O),original:`Toggle ${O}`}},category:n.CATEGORIES.View,precondition:D.ContextKeyExpr.has(`${T.id}.active`),keybinding:T.openCommandActionDescriptor.keybindings?{...T.openCommandActionDescriptor.keybindings,weight:200}:void 0,f1:!0})}async run(M){const N=M.get(h.IEditorGroupsService),B=M.get(f.IViewDescriptorService),P=M.get(u.IWorkbenchLayoutService),V=M.get(f.IViewsService),z=M.get(D.IContextKeyService);if(_.FocusedViewContext.getValue(z)===T.id){const H=B.getViewLocationById(T.id);B.getViewLocationById(T.id)===0?N.activeGroup.focus():H!==null&&P.setPartHidden(!0,E(H))}else V.openView(T.id,!0)}})),T.openCommandActionDescriptor.mnemonicTitle){const L=this.viewDescriptorService.getDefaultContainerById(T.id);if(L){const M=this.viewDescriptorService.getDefaultViewContainerLocation(L);R.add(v.MenuRegistry.appendMenuItem(v.MenuId.MenubarViewMenu,{command:{id:x,title:T.openCommandActionDescriptor.mnemonicTitle},group:M===0?"3_views":"4_panels",when:D.ContextKeyExpr.has(`${T.id}.active`),order:T.openCommandActionDescriptor.order??Number.MAX_VALUE}))}}}return R}registerFocusViewAction(T,R){return(0,v.registerAction2)(class extends v.Action2{constructor(){const x=(0,C.localize)(4,null,T.name);super({id:T.focusCommand?T.focusCommand.id:`${T.id}.focus`,title:{original:`Focus on ${T.name} View`,value:x},category:R,menu:[{id:v.MenuId.CommandPalette,when:T.when}],keybinding:{when:D.ContextKeyExpr.has(`${T.id}.active`),weight:200,primary:T.focusCommand?.keybindings?.primary,secondary:T.focusCommand?.keybindings?.secondary,linux:T.focusCommand?.keybindings?.linux,mac:T.focusCommand?.keybindings?.mac,win:T.focusCommand?.keybindings?.win},description:{description:x,args:[{name:"focusOptions",description:"Focus Options",schema:{type:"object",properties:{preserveFocus:{type:"boolean",default:!1}}}}]}})}run(x,F){x.get(f.IViewsService).openView(T.id,!F?.preserveFocus)}})}registerResetViewLocationAction(T){return(0,v.registerAction2)(class extends v.Action2{constructor(){super({id:`${T.id}.resetViewLocation`,title:{original:"Reset Location",value:(0,C.localize)(5,null)},menu:[{id:v.MenuId.ViewTitleContext,when:D.ContextKeyExpr.or(D.ContextKeyExpr.and(D.ContextKeyExpr.equals("view",T.id),D.ContextKeyExpr.equals(`${T.id}.defaultViewLocation`,!1))),group:"1_hide",order:2}]})}run(O){const x=O.get(f.IViewDescriptorService),F=x.getDefaultContainerById(T.id),L=x.getViewContainerModel(F);if(F.hideIfEmpty&&L.visibleViewDescriptors.length===0){const M=x.getDefaultViewContainerLocation(F);x.moveViewContainerToLocation(F,M)}x.moveViewsToContainer([T],x.getDefaultContainerById(T.id)),O.get(f.IViewsService).openView(T.id,!0)}})}registerPaneComposite(T,R){const O=this;let x=class extends p.PaneComposite{constructor(L,M,N,B,P,V,z){super(T.id,L,N,B,P,V,z,M)}createViewPaneContainer(L){const M=this._register(new t.DisposableStore),N=O.createViewPaneContainer(L,T,R,M,this.instantiationService);return N instanceof g.FilterViewPaneContainer||M.add(I.Event.any(N.onDidAddViews,N.onDidRemoveViews,N.onTitleAreaUpdate)(()=>{this.updateTitleArea()})),N}};x=Ee([W(0,i.ITelemetryService),W(1,r.IWorkspaceContextService),W(2,k.IStorageService),W(3,c.IInstantiationService),W(4,S.IThemeService),W(5,s.IContextMenuService),W(6,l.IExtensionService)],x),A.Registry.as(b(R)).registerPaneComposite(p.PaneCompositeDescriptor.create(x,T.id,T.title,(0,w.isString)(T.icon)?T.icon:void 0,T.order,T.requestedIndex,T.icon instanceof a.URI?T.icon:void 0))}deregisterPaneComposite(T,R){A.Registry.as(b(R)).deregisterPaneComposite(T.id)}createViewPaneContainer(T,R,O,x,F){const L=F.createInstance(R.ctorDescriptor.ctor,...R.ctorDescriptor.staticArguments||[]);return this.viewPaneContainers.set(L.getId(),L),x.add((0,t.toDisposable)(()=>this.viewPaneContainers.delete(L.getId()))),x.add(L.onDidAddViews(M=>this.onViewsAdded(M))),x.add(L.onDidChangeViewVisibility(M=>this.onViewsVisibilityChanged(M,M.isBodyVisible()))),x.add(L.onDidRemoveViews(M=>this.onViewsRemoved(M))),x.add(L.onDidFocusView(M=>this.focusedViewContextKey.set(M.id))),x.add(L.onDidBlurView(M=>{this.focusedViewContextKey.get()===M.id&&this.focusedViewContextKey.reset()})),L}};m=Ee([W(0,f.IViewDescriptorService),W(1,d.IPaneCompositePartService),W(2,D.IContextKeyService),W(3,u.IWorkbenchLayoutService)],m),e.ViewsService=m;function b(y){switch(y){case 2:return p.Extensions.Auxiliary;case 1:return p.Extensions.Panels;case 0:default:return p.Extensions.Viewlets}}function E(y){switch(y){case 2:return"workbench.parts.auxiliarybar";case 1:return"workbench.parts.panel";case 0:default:return"workbench.parts.sidebar"}}e.getPartByLocation=E,(0,o.registerSingleton)(f.IViewsService,m)}),define(ne[2755],re([1,0,1429,6,11,77,235,22,17,14,47,44,35,80,24,8,76,26,2403,2117,2552,775,482,2404,112,393,263,130,2685,15,1948,2753,69,54,483]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Workbench=void 0;class F extends R.Layout{constructor(M,N,B,P){super(M);this.options=N,this.serviceCollection=B,this._onWillShutdown=this._register(new f.Emitter),this.onWillShutdown=this._onWillShutdown.event,this._onDidShutdown=this._register(new f.Emitter),this.onDidShutdown=this._onDidShutdown.event,this.previousUnexpectedError={message:void 0,time:0},(0,k.mark)("code/willStartWorkbench"),this.registerErrorHandler(P)}registerErrorHandler(M){window.addEventListener("unhandledrejection",N=>{(0,D.onUnexpectedError)(N.reason),N.preventDefault()}),(0,D.setUnexpectedErrorHandler)(N=>this.handleUnexpectedError(N,M)),window.require.config({onError:N=>{N.phase==="loading"&&(0,D.onUnexpectedError)(new Error((0,t.localize)(0,null,JSON.stringify(N)))),console.error(N)}})}handleUnexpectedError(M,N){const B=(0,b.toErrorMessage)(M,!0);if(!B)return;const P=Date.now();B===this.previousUnexpectedError.message&&P-this.previousUnexpectedError.time<=1e3||(this.previousUnexpectedError.time=P,this.previousUnexpectedError.message=B,N.error(B))}startup(){try{(0,f.setGlobalLeakWarningThreshold)(175);const M=this.initServices(this.serviceCollection);return M.invokeFunction(N=>{const B=N.get(s.ILifecycleService),P=N.get(i.IStorageService),V=N.get(S.IConfigurationService),z=N.get(O.IHostService),U=N.get(x.IDialogService);this.initLayout(N),I.Registry.as(v.Extensions.Workbench).start(N),I.Registry.as(C.EditorExtensions.EditorFactory).start(N),this._register(M.createInstance(E.WorkbenchContextKeysHandler)),this.registerListeners(B,P,V,z,U),this.renderWorkbench(M,N.get(l.INotificationService),P,V),this.createWorkbenchLayout(),this.layout(),this.restore(B)}),M}catch(M){throw(0,D.onUnexpectedError)(M),M}}initServices(M){M.set(c.IWorkbenchLayoutService,this);const N=(0,o.getSingletonServiceDescriptors)();for(let[P,V]of N)M.set(P,V);const B=new T.InstantiationService(M,!0);return B.invokeFunction(P=>{const V=P.get(s.ILifecycleService),z=P.get(S.IConfigurationService);typeof z.acquireInstantiationService=="function"&&z.acquireInstantiationService(B),V.phase=2}),B}registerListeners(M,N,B,P,V){this._register(B.onDidChangeConfiguration(()=>this.setFontAliasing(B))),w.isNative?this._register(N.onWillSaveState(z=>{z.reason===i.WillSaveStateReason.SHUTDOWN&&this.storeFontInfo(N)})):this._register(M.onWillShutdown(()=>this.storeFontInfo(N))),this._register(M.onWillShutdown(z=>this._onWillShutdown.fire(z))),this._register(M.onDidShutdown(()=>{this._onDidShutdown.fire(),this.dispose()})),this._register(P.onDidChangeFocus(z=>{z||N.flush()})),this._register(V.onWillShowDialog(()=>this.container.classList.add("modal-dialog-visible"))),this._register(V.onDidShowDialog(()=>this.container.classList.remove("modal-dialog-visible")))}setFontAliasing(M){if(!w.isMacintosh)return;const N=M.getValue("workbench.fontAliasing");if(this.fontAliasing===N)return;this.fontAliasing=N;const B=["antialiased","none","auto"];this.container.classList.remove(...B.map(P=>`monaco-font-aliasing-${P}`)),B.some(P=>P===N)&&this.container.classList.add(`monaco-font-aliasing-${N}`)}restoreFontInfo(M,N){const B=M.get("editorFontInfo",0);if(B)try{const P=JSON.parse(B);Array.isArray(P)&&d.FontMeasurements.restoreFontInfo(P)}catch{}d.FontMeasurements.readFontInfo(m.BareFontInfo.createFromRawSettings(N.getValue("editor"),A.PixelRatio.value))}storeFontInfo(M){const N=d.FontMeasurements.serializeFontInfo();N&&M.store("editorFontInfo",JSON.stringify(N),0,1)}renderWorkbench(M,N,B,P){(0,g.setARIAContainer)(this.container);const V=w.isWindows?"windows":w.isLinux?"linux":"mac",z=(0,y.coalesce)(["monaco-workbench",V,w.isWeb?"web":void 0,A.isChrome?"chromium":A.isFirefox?"firefox":A.isSafari?"safari":void 0,...this.getLayoutClasses(),...this.options?.extraClasses?this.options.extraClasses:[]]);this.container.classList.add(...z),document.body.classList.add(V),w.isWeb&&document.body.classList.add("web"),this.setFontAliasing(P),this.restoreFontInfo(B,P),[{id:"workbench.parts.titlebar",role:"contentinfo",classes:["titlebar"]},{id:"workbench.parts.banner",role:"banner",classes:["banner"]},{id:"workbench.parts.activitybar",role:"none",classes:["activitybar",this.getSideBarPosition()===0?"left":"right"]},{id:"workbench.parts.sidebar",role:"none",classes:["sidebar",this.getSideBarPosition()===0?"left":"right"]},{id:"workbench.parts.editor",role:"main",classes:["editor"],options:{restorePreviousState:this.willRestoreEditors()}},{id:"workbench.parts.panel",role:"none",classes:["panel","basepanel",(0,c.positionToString)(this.getPanelPosition())]},{id:"workbench.parts.auxiliarybar",role:"none",classes:["auxiliarybar","basepanel",this.getSideBarPosition()===0?"right":"left"]},{id:"workbench.parts.statusbar",role:"status",classes:["statusbar"]}].forEach(({id:U,role:H,classes:K,options:G})=>{const q=this.createPart(U,H,K);this.getPart(U).create(q,G)}),this.createNotificationsHandlers(M,N),this.parent.appendChild(this.container)}createPart(M,N,B){const P=document.createElement(N==="status"?"footer":"div");return P.classList.add("part",...B),P.id=M,P.setAttribute("role",N),N==="status"&&P.setAttribute("aria-live","off"),P}createNotificationsHandlers(M,N){const B=this._register(M.createInstance(r.NotificationsCenter,this.container,N.model)),P=this._register(M.createInstance(h.NotificationsToasts,this.container,N.model));this._register(M.createInstance(p.NotificationsAlerts,N.model));const V=M.createInstance(u.NotificationsStatus,N.model);this._register(M.createInstance(a.NotificationsTelemetry)),this._register(B.onDidChangeVisibility(()=>{V.update(B.isVisible,P.isVisible),P.update(B.isVisible)})),this._register(P.onDidChangeVisibility(()=>{V.update(B.isVisible,P.isVisible)})),(0,n.registerNotificationCommands)(B,P,N.model),this.registerNotifications({onDidChangeNotificationsVisibility:f.Event.map(f.Event.any(P.onDidChangeVisibility,B.onDidChangeVisibility),()=>P.isVisible||B.isVisible)})}restore(M){try{this.restoreParts()}catch(N){(0,D.onUnexpectedError)(N)}this.whenReady.finally(()=>Promise.race([this.whenRestored,(0,_.timeout)(2e3)]).finally(()=>{M.phase=3,this._register(new _.RunOnceScheduler(()=>{this._register((0,_.runWhenIdle)(()=>M.phase=4,2500))},2500)).schedule();function B(){(0,k.mark)("code/didStartWorkbench"),performance.measure("perf: workbench create & restore","code/didLoadWorkbenchMain","code/didStartWorkbench")}this.isRestored()?B():this.whenRestored.finally(()=>B())}))}}e.Workbench=F}),define(ne[2756],re([1,0,17,47,140,2581,43,74,1444,161,7,59,583,71,99,16,44,30,54,81,33,63,88]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});async function h(y){const T=await y.openView(A.BulkEditPane.ID,!0);if(T instanceof A.BulkEditPane)return T}let g=class{constructor(T,R){this._paneCompositeService=T,this._editorGroupsService=R,this._activePanel=T.getActivePaneComposite(1)?.getId()}async restore(T,R){if(T&&(typeof this._activePanel=="string"?await this._paneCompositeService.openPaneComposite(this._activePanel,1):this._paneCompositeService.hideActivePaneComposite(1)),R)for(let O of this._editorGroupsService.groups){let x=[];for(let F of O.editors)s.EditorResourceAccessor.getCanonicalUri(F,{supportSideBySide:s.SideBySideEditor.PRIMARY})?.scheme===o.BulkEditPreviewProvider.Schema&&x.push(F);x.length&&O.closeEditors(x,{preserveFocus:!0})}}};g=Ee([W(0,n.IPaneCompositePartService),W(1,C.IEditorGroupsService)],g);class d{constructor(T,R=new l.CancellationTokenSource){this.uxState=T,this.cts=R}}let m=class vl{constructor(T,R,O,x,F,L){this._paneCompositeService=T,this._viewsService=R,this._editorGroupsService=O,this._dialogService=x,F.setPreviewHandler(M=>this._previewEdit(M)),this._ctxEnabled=vl.ctxEnabled.bindTo(L)}async _previewEdit(T){this._ctxEnabled.set(!0);const R=this._activeSession?.uxState??new g(this._paneCompositeService,this._editorGroupsService),O=await h(this._viewsService);if(!O)return this._ctxEnabled.set(!1),T;if(O.hasInput()&&(await this._dialogService.show(p.default.Info,(0,I.localize)(0,null),[(0,I.localize)(1,null),(0,I.localize)(2,null)],{detail:(0,I.localize)(3,null)})).choice===0)return[];let x;this._activeSession?(await this._activeSession.uxState.restore(!1,!0),this._activeSession.cts.dispose(!0),x=new d(R)):x=new d(R),this._activeSession=x;try{return await O.setInput(T,x.cts.token)??[]}finally{this._activeSession===x&&(await this._activeSession.uxState.restore(!0,!0),this._activeSession.cts.dispose(),this._ctxEnabled.set(!1),this._activeSession=void 0)}}};m.ctxEnabled=new v.RawContextKey("refactorPreview.enabled",!1),m=Ee([W(0,n.IPaneCompositePartService),W(1,k.IViewsService),W(2,C.IEditorGroupsService),W(3,r.IDialogService),W(4,_.IBulkEditService),W(5,v.IContextKeyService)],m),(0,S.registerAction2)(class extends S.Action2{constructor(){super({id:"refactorPreview.apply",title:{value:(0,I.localize)(4,null),original:"Apply Refactoring"},category:{value:(0,I.localize)(5,null),original:"Refactor Preview"},icon:u.Codicon.check,precondition:v.ContextKeyExpr.and(m.ctxEnabled,A.BulkEditPane.ctxHasCheckedChanges),menu:[{id:S.MenuId.BulkEditContext,order:1}],keybinding:{weight:100-10,when:v.ContextKeyExpr.and(m.ctxEnabled,D.FocusedViewContext.isEqualTo(A.BulkEditPane.ID)),primary:1024+3}})}async run(T){const R=T.get(k.IViewsService),O=await h(R);O&&O.accept()}}),(0,S.registerAction2)(class extends S.Action2{constructor(){super({id:"refactorPreview.discard",title:{value:(0,I.localize)(6,null),original:"Discard Refactoring"},category:{value:(0,I.localize)(7,null),original:"Refactor Preview"},icon:u.Codicon.clearAll,precondition:m.ctxEnabled,menu:[{id:S.MenuId.BulkEditContext,order:2}]})}async run(T){const R=T.get(k.IViewsService),O=await h(R);O&&O.discard()}}),(0,S.registerAction2)(class extends S.Action2{constructor(){super({id:"refactorPreview.toggleCheckedState",title:{value:(0,I.localize)(8,null),original:"Toggle Change"},category:{value:(0,I.localize)(9,null),original:"Refactor Preview"},precondition:m.ctxEnabled,keybinding:{weight:200,when:c.WorkbenchListFocusContextKey,primary:10},menu:{id:S.MenuId.BulkEditContext,group:"navigation"}})}async run(T){const R=T.get(k.IViewsService),O=await h(R);O&&O.toggleChecked()}}),(0,S.registerAction2)(class extends S.Action2{constructor(){super({id:"refactorPreview.groupByFile",title:{value:(0,I.localize)(10,null),original:"Group Changes By File"},category:{value:(0,I.localize)(11,null),original:"Refactor Preview"},icon:u.Codicon.ungroupByRefType,precondition:v.ContextKeyExpr.and(A.BulkEditPane.ctxHasCategories,A.BulkEditPane.ctxGroupByFile.negate(),m.ctxEnabled),menu:[{id:S.MenuId.BulkEditTitle,when:v.ContextKeyExpr.and(A.BulkEditPane.ctxHasCategories,A.BulkEditPane.ctxGroupByFile.negate()),group:"navigation",order:3}]})}async run(T){const R=T.get(k.IViewsService),O=await h(R);O&&O.groupByFile()}}),(0,S.registerAction2)(class extends S.Action2{constructor(){super({id:"refactorPreview.groupByType",title:{value:(0,I.localize)(12,null),original:"Group Changes By Type"},category:{value:(0,I.localize)(13,null),original:"Refactor Preview"},icon:u.Codicon.groupByRefType,precondition:v.ContextKeyExpr.and(A.BulkEditPane.ctxHasCategories,A.BulkEditPane.ctxGroupByFile,m.ctxEnabled),menu:[{id:S.MenuId.BulkEditTitle,when:v.ContextKeyExpr.and(A.BulkEditPane.ctxHasCategories,A.BulkEditPane.ctxGroupByFile),group:"navigation",order:3}]})}async run(T){const R=T.get(k.IViewsService),O=await h(R);O&&O.groupByType()}}),(0,S.registerAction2)(class extends S.Action2{constructor(){super({id:"refactorPreview.toggleGrouping",title:{value:(0,I.localize)(14,null),original:"Group Changes By Type"},category:{value:(0,I.localize)(15,null),original:"Refactor Preview"},icon:u.Codicon.listTree,toggled:A.BulkEditPane.ctxGroupByFile.negate(),precondition:v.ContextKeyExpr.and(A.BulkEditPane.ctxHasCategories,m.ctxEnabled),menu:[{id:S.MenuId.BulkEditContext,order:3}]})}async run(T){const R=T.get(k.IViewsService),O=await h(R);O&&O.toggleGrouping()}}),t.Registry.as(f.Extensions.Workbench).registerWorkbenchContribution(m,2);const b=(0,a.registerIcon)("refactor-preview-view-icon",u.Codicon.lightbulb,(0,I.localize)(16,null)),E=t.Registry.as(k.Extensions.ViewContainersRegistry).registerViewContainer({id:A.BulkEditPane.ID,title:(0,I.localize)(17,null),hideIfEmpty:!0,ctorDescriptor:new i.SyncDescriptor(w.ViewPaneContainer,[A.BulkEditPane.ID,{mergeViewWithContainerWhenSingleView:!0,donotShowContainerTitleWhenMergedWithContainer:!0}]),icon:b,storageId:A.BulkEditPane.ID},1);t.Registry.as(k.Extensions.ViewsRegistry).registerViews([{id:A.BulkEditPane.ID,name:(0,I.localize)(18,null),when:m.ctxEnabled,ctorDescriptor:new i.SyncDescriptor(A.BulkEditPane),containerIcon:b}],E)}),define(ne[941],re([1,0,12,38,37,8,7,1523,90,21,131,5,43,17,41,74,377,14,106,24,27,2,275]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WelcomeView=void 0;const h="debugStartLanguage",g=new k.RawContextKey(h,void 0),d=new k.RawContextKey("debuggerInterestedInActiveEditor",!1);let m=class extends v.ViewPane{constructor(T,R,O,x,F,L,M,N,B,P,V,z,U){super(T,O,x,F,L,P,B,V,R,U);this.debugService=M,this.editorService=N,this.debugStartLanguageContext=g.bindTo(L),this.debuggerInterestedContext=d.bindTo(L);const H=z.get(h,1);this.debugStartLanguageContext.set(H);const K=()=>{const Z=this.editorService.activeTextEditorControl;if((0,r.isCodeEditor)(Z)){const j=Z.getModel(),X=j?j.getLanguageId():void 0;if(X&&this.debugService.getAdapterManager().isDebuggerInterestedInLanguage(X)){this.debugStartLanguageContext.set(X),this.debuggerInterestedContext.set(!0),z.store(h,X,1,1);return}}this.debuggerInterestedContext.set(!1)},G=new a.DisposableStore;this._register(G),this._register(N.onDidActiveEditorChange(()=>{G.clear();const Z=this.editorService.activeTextEditorControl;(0,r.isCodeEditor)(Z)&&G.add(Z.onDidChangeModelLanguage(K)),K()})),this._register(this.debugService.getAdapterManager().onDidRegisterDebugger(K)),this._register(this.onDidChangeBodyVisibility(Z=>{Z&&K()})),K();const q=this.keybindingService.lookupKeybinding(n.DEBUG_START_COMMAND_ID);E=q?` (${q.getLabel()})`:""}shouldShowWelcome(){return!0}};m.ID="workbench.debug.welcome",m.LABEL=(0,D.localize)(0,null),m=Ee([W(1,t.IThemeService),W(2,f.IKeybindingService),W(3,_.IContextMenuService),W(4,A.IConfigurationService),W(5,k.IContextKeyService),W(6,I.IDebugService),W(7,w.IEditorService),W(8,C.IInstantiationService),W(9,o.IViewDescriptorService),W(10,i.IOpenerService),W(11,p.IStorageService),W(12,u.ITelemetryService)],m),e.WelcomeView=m;const b=c.Registry.as(o.Extensions.ViewsRegistry);b.registerViewWelcomeContent(m.ID,{content:(0,D.localize)(1,null,l.isMacintosh&&!l.isWeb?s.OpenFileFolderAction.ID:s.OpenFileAction.ID),when:k.ContextKeyExpr.and(I.CONTEXT_DEBUGGERS_AVAILABLE,d.toNegated()),group:o.ViewContentGroups.Open});let E="";b.registerViewWelcomeContent(m.ID,{content:(0,D.localize)(2,null,E,n.DEBUG_START_COMMAND_ID),when:I.CONTEXT_DEBUGGERS_AVAILABLE,group:o.ViewContentGroups.Debug}),b.registerViewWelcomeContent(m.ID,{content:(0,D.localize)(3,null,n.SELECT_AND_START_ID),when:I.CONTEXT_DEBUGGERS_AVAILABLE,group:o.ViewContentGroups.Debug,order:10}),b.registerViewWelcomeContent(m.ID,{content:(0,D.localize)(4,null,n.DEBUG_CONFIGURE_COMMAND_ID),when:k.ContextKeyExpr.and(I.CONTEXT_DEBUGGERS_AVAILABLE,S.WorkbenchStateContext.notEqualsTo("empty")),group:o.ViewContentGroups.Debug}),b.registerViewWelcomeContent(m.ID,{content:(0,D.localize)(5,null,l.isMacintosh&&!l.isWeb?s.OpenFileFolderAction.ID:s.OpenFolderAction.ID),when:k.ContextKeyExpr.and(I.CONTEXT_DEBUGGERS_AVAILABLE,S.WorkbenchStateContext.isEqualTo("empty")),group:o.ViewContentGroups.Debug}),b.registerViewWelcomeContent(m.ID,{content:(0,D.localize)(6,null),when:I.CONTEXT_DEBUG_EXTENSION_AVAILABLE.toNegated(),group:o.ViewContentGroups.Debug})}),define(ne[942],re([1,0,1511,90,625,5,40,67,34,27,24,12,37,2,80,8,161,16,7,73,43,941,190,74,53,275,1083]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugViewPaneContainer=void 0;let m=class extends s.ViewPaneContainer{constructor(E,y,T,R,O,x,F,L,M,N,B,P,V,z){super(f.VIEWLET_ID,{mergeViewWithContainerWhenSingleView:!0},O,B,E,M,y,N,L,F,x,z);this.progressService=T,this.debugService=R,this.contextViewService=P,this.contextKeyService=V,this.paneListeners=new Map,this._register(this.debugService.onDidChangeState(U=>this.onDebugServiceStateChange(U))),this._register(this.contextKeyService.onDidChangeContext(U=>{U.affectsSome(new Set([f.CONTEXT_DEBUG_UX_KEY]))&&this.updateTitleArea()})),this._register(this.contextService.onDidChangeWorkbenchState(()=>this.updateTitleArea())),this._register(this.configurationService.onDidChangeConfiguration(U=>{U.affectsConfiguration("debug.toolBarLocation")&&this.updateTitleArea()}))}create(E){super.create(E),E.classList.add("debug-viewlet")}focus(){super.focus(),this.startDebugActionViewItem?this.startDebugActionViewItem.focus():this.focusView(a.WelcomeView.ID)}getActionViewItem(E){return E.id===d.DEBUG_START_COMMAND_ID?(this.startDebugActionViewItem=this.instantiationService.createInstance(_.StartDebugActionViewItem,null,E),this.startDebugActionViewItem):E.id===d.FOCUS_SESSION_ID?new _.FocusSessionActionViewItem(E,void 0,this.debugService,this.themeService,this.contextViewService,this.configurationService):(0,p.createActionViewItem)(this.instantiationService,E)}focusView(E){const y=this.getView(E);y&&y.focus()}onDebugServiceStateChange(E){this.progressResolve&&(this.progressResolve(),this.progressResolve=void 0),E===1&&this.progressService.withProgress({location:f.VIEWLET_ID},y=>new Promise(T=>this.progressResolve=T))}addPanes(E){super.addPanes(E);for(const{pane:y}of E)y.id===f.BREAKPOINTS_VIEW_ID?(this.breakpointView=y,this.updateBreakpointsMaxSize()):this.paneListeners.set(y.id,y.onDidChange(()=>this.updateBreakpointsMaxSize()))}removePanes(E){super.removePanes(E);for(const y of E)(0,c.dispose)(this.paneListeners.get(y.id)),this.paneListeners.delete(y.id)}updateBreakpointsMaxSize(){if(this.breakpointView){const E=this.panes.every(y=>!y.isExpanded()||y===this.breakpointView);this.breakpointView.maximumBodySize=E?Number.POSITIVE_INFINITY:this.breakpointView.minimumBodySize}}};m=Ee([W(0,i.IWorkbenchLayoutService),W(1,w.ITelemetryService),W(2,D.IProgressService),W(3,f.IDebugService),W(4,A.IInstantiationService),W(5,I.IWorkspaceContextService),W(6,v.IStorageService),W(7,C.IThemeService),W(8,o.IContextMenuService),W(9,k.IExtensionService),W(10,S.IConfigurationService),W(11,o.IContextViewService),W(12,r.IContextKeyService),W(13,u.IViewDescriptorService)],m),e.DebugViewPaneContainer=m,l.MenuRegistry.appendMenuItem(l.MenuId.ViewContainerTitle,{when:r.ContextKeyExpr.and(r.ContextKeyExpr.equals("viewContainer",f.VIEWLET_ID),f.CONTEXT_DEBUG_UX.notEqualsTo("simple"),h.WorkbenchStateContext.notEqualsTo("empty"),r.ContextKeyExpr.or(f.CONTEXT_DEBUG_STATE.isEqualTo("inactive"),r.ContextKeyExpr.notEquals("config.debug.toolBarLocation","docked"))),order:10,group:"navigation",command:{precondition:f.CONTEXT_DEBUG_STATE.notEqualsTo((0,f.getStateLabel)(1)),id:d.DEBUG_START_COMMAND_ID,title:d.DEBUG_START_LABEL}}),(0,l.registerAction2)(class extends l.Action2{constructor(){super({id:d.DEBUG_CONFIGURE_COMMAND_ID,title:{value:d.DEBUG_CONFIGURE_LABEL,original:"Open 'launch.json'",mnemonicTitle:t.localize(0,null)},f1:!0,icon:n.debugConfigure,precondition:f.CONTEXT_DEBUG_UX.notEqualsTo("simple"),menu:[{id:l.MenuId.ViewContainerTitle,group:"navigation",order:20,when:r.ContextKeyExpr.and(r.ContextKeyExpr.equals("viewContainer",f.VIEWLET_ID),f.CONTEXT_DEBUG_UX.notEqualsTo("simple"),h.WorkbenchStateContext.notEqualsTo("empty"),r.ContextKeyExpr.or(f.CONTEXT_DEBUG_STATE.isEqualTo("inactive"),r.ContextKeyExpr.notEquals("config.debug.toolBarLocation","docked")))},{id:l.MenuId.ViewContainerTitle,order:20,when:r.ContextKeyExpr.and(r.ContextKeyExpr.equals("viewContainer",f.VIEWLET_ID),f.CONTEXT_DEBUG_STATE.notEqualsTo("inactive"),r.ContextKeyExpr.equals("config.debug.toolBarLocation","docked"))},{id:l.MenuId.MenubarDebugMenu,group:"2_configuration",order:1,when:f.CONTEXT_DEBUGGERS_AVAILABLE}]})}async run(b){const E=b.get(f.IDebugService),y=b.get(g.IQuickInputService),T=E.getConfigurationManager();let R;if(T.selectedConfiguration.name)R=T.selectedConfiguration.launch;else{const O=T.getLaunches().filter(x=>!x.hidden);if(O.length===1)R=O[0];else{const x=O.map(L=>({label:L.name,launch:L})),F=await y.pick(x,{activeItem:x[0],placeHolder:t.localize(1,null)});F&&(R=F.launch)}}R&&await R.openConfigFile(!1)}}),(0,l.registerAction2)(class extends l.Action2{constructor(){super({id:"debug.toggleReplIgnoreFocus",title:t.localize(2,null),toggled:r.ContextKeyExpr.has(`view.${f.REPL_VIEW_ID}.visible`),menu:[{id:s.ViewsSubMenu,group:"3_toggleRepl",order:30,when:r.ContextKeyExpr.and(r.ContextKeyExpr.equals("viewContainer",f.VIEWLET_ID))}]})}async run(b){const E=b.get(u.IViewsService);E.isViewVisible(f.REPL_VIEW_ID)?E.closeView(f.REPL_VIEW_ID):await E.openView(f.REPL_VIEW_ID)}}),l.MenuRegistry.appendMenuItem(l.MenuId.ViewContainerTitle,{when:r.ContextKeyExpr.and(r.ContextKeyExpr.equals("viewContainer",f.VIEWLET_ID),f.CONTEXT_DEBUG_STATE.notEqualsTo("inactive"),r.ContextKeyExpr.equals("config.debug.toolBarLocation","docked")),order:10,command:{id:d.SELECT_AND_START_ID,title:t.localize(3,null)}})}),define(ne[2757],re([1,0,1495,16,17,35,57,503,2589,47,90,2586,2600,275,2557,43,14,7,2556,191,2591,2584,2595,626,909,845,941,942,39,576,908,99,161,210,2585,2138,2657,484,902,18,190,44,2587,149,412,2420,1080,1081]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H,K,G){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const q=t.localize(0,null);(0,N.registerColors)(),(0,A.registerSingleton)(v.IDebugService,o.DebugService,!0),_.Registry.as(w.Extensions.Workbench).registerWorkbenchContribution(r.DebugStatusContribution,4),_.Registry.as(w.Extensions.Workbench).registerWorkbenchContribution(L.DebugProgressContribution,4),s.isWeb&&_.Registry.as(w.Extensions.Workbench).registerWorkbenchContribution(M.DebugTitleContribution,4),_.Registry.as(w.Extensions.Workbench).registerWorkbenchContribution(C.DebugToolBar,3),_.Registry.as(w.Extensions.Workbench).registerWorkbenchContribution(d.DebugContentProvider,4),_.Registry.as(w.Extensions.Workbench).registerWorkbenchContribution(i.StatusBarColorProvider,4),_.Registry.as(w.Extensions.Workbench).registerWorkbenchContribution(U.DisassemblyViewContribution,4),_.Registry.as(w.Extensions.Workbench).registerWorkbenchContribution(G.DebugLifecycle,4),_.Registry.as(x.Extensions.Quickaccess).registerQuickAccessProvider({ctor:F.StartDebugQuickAccessProvider,prefix:F.StartDebugQuickAccessProvider.PREFIX,contextKey:"inLaunchConfigurationsPicker",placeholder:t.localize(1,null),helpEntries:[{description:t.localize(2,null),needsEditor:!1}]}),(0,E.registerEditorContribution)("editor.contrib.callStack",y.CallStackEditorContribution),(0,E.registerEditorContribution)(v.BREAKPOINT_EDITOR_CONTRIBUTION_ID,T.BreakpointEditorContribution),(0,E.registerEditorContribution)(v.EDITOR_CONTRIBUTION_ID,B.DebugEditorContribution);const Z=(ee,te,se,ie)=>{f.MenuRegistry.appendMenuItem(f.MenuId.CommandPalette,{when:l.ContextKeyExpr.and(v.CONTEXT_DEBUGGERS_AVAILABLE,se),group:q,command:{id:ee,title:`Debug: ${te}`,precondition:ie}})};Z(c.RESTART_SESSION_ID,c.RESTART_LABEL),Z(c.TERMINATE_THREAD_ID,t.localize(3,null),v.CONTEXT_IN_DEBUG_MODE),Z(c.STEP_OVER_ID,c.STEP_OVER_LABEL,v.CONTEXT_IN_DEBUG_MODE,v.CONTEXT_DEBUG_STATE.isEqualTo("stopped")),Z(c.STEP_INTO_ID,c.STEP_INTO_LABEL,v.CONTEXT_IN_DEBUG_MODE,v.CONTEXT_DEBUG_STATE.isEqualTo("stopped")),Z(c.STEP_OUT_ID,c.STEP_OUT_LABEL,v.CONTEXT_IN_DEBUG_MODE,v.CONTEXT_DEBUG_STATE.isEqualTo("stopped")),Z(c.PAUSE_ID,c.PAUSE_LABEL,v.CONTEXT_IN_DEBUG_MODE,v.CONTEXT_DEBUG_STATE.isEqualTo("running")),Z(c.DISCONNECT_ID,c.DISCONNECT_LABEL,v.CONTEXT_IN_DEBUG_MODE,l.ContextKeyExpr.or(v.CONTEXT_FOCUSED_SESSION_IS_ATTACH,v.CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED)),Z(c.STOP_ID,c.STOP_LABEL,v.CONTEXT_IN_DEBUG_MODE,l.ContextKeyExpr.or(v.CONTEXT_FOCUSED_SESSION_IS_ATTACH.toNegated(),v.CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED)),Z(c.CONTINUE_ID,c.CONTINUE_LABEL,v.CONTEXT_IN_DEBUG_MODE,v.CONTEXT_DEBUG_STATE.isEqualTo("stopped")),Z(c.FOCUS_REPL_ID,t.localize(4,null)),Z(c.JUMP_TO_CURSOR_ID,t.localize(5,null),v.CONTEXT_JUMP_TO_CURSOR_SUPPORTED),Z(c.JUMP_TO_CURSOR_ID,t.localize(6,null),v.CONTEXT_JUMP_TO_CURSOR_SUPPORTED),Z(a.RunToCursorAction.ID,a.RunToCursorAction.LABEL,l.ContextKeyExpr.and(v.CONTEXT_IN_DEBUG_MODE,v.CONTEXT_DEBUG_STATE.isEqualTo("stopped"))),Z(c.TOGGLE_INLINE_BREAKPOINT_ID,t.localize(7,null)),Z(c.DEBUG_START_COMMAND_ID,c.DEBUG_START_LABEL,l.ContextKeyExpr.and(v.CONTEXT_DEBUGGERS_AVAILABLE,v.CONTEXT_DEBUG_STATE.notEqualsTo((0,v.getStateLabel)(1)))),Z(c.DEBUG_RUN_COMMAND_ID,c.DEBUG_RUN_LABEL,l.ContextKeyExpr.and(v.CONTEXT_DEBUGGERS_AVAILABLE,v.CONTEXT_DEBUG_STATE.notEqualsTo((0,v.getStateLabel)(1)))),Z(c.SELECT_AND_START_ID,c.SELECT_AND_START_LABEL,l.ContextKeyExpr.and(v.CONTEXT_DEBUGGERS_AVAILABLE,v.CONTEXT_DEBUG_STATE.notEqualsTo((0,v.getStateLabel)(1))));const j=(ee,te,se,ie,ce,le,ae="navigation",ue)=>{f.MenuRegistry.appendMenuItem(ee,{group:ae,when:ce,order:ie,icon:ue,command:{id:te,title:se,icon:ue,precondition:le}})};if(j(f.MenuId.DebugCallStackContext,c.RESTART_SESSION_ID,c.RESTART_LABEL,10,v.CONTEXT_CALLSTACK_ITEM_TYPE.isEqualTo("session"),void 0,"3_modification"),j(f.MenuId.DebugCallStackContext,c.DISCONNECT_ID,c.DISCONNECT_LABEL,20,v.CONTEXT_CALLSTACK_ITEM_TYPE.isEqualTo("session"),void 0,"3_modification"),j(f.MenuId.DebugCallStackContext,c.STOP_ID,c.STOP_LABEL,30,v.CONTEXT_CALLSTACK_ITEM_TYPE.isEqualTo("session"),void 0,"3_modification"),j(f.MenuId.DebugCallStackContext,c.PAUSE_ID,c.PAUSE_LABEL,10,l.ContextKeyExpr.and(v.CONTEXT_CALLSTACK_ITEM_TYPE.isEqualTo("thread"),v.CONTEXT_DEBUG_STATE.isEqualTo("running"))),j(f.MenuId.DebugCallStackContext,c.CONTINUE_ID,c.CONTINUE_LABEL,10,l.ContextKeyExpr.and(v.CONTEXT_CALLSTACK_ITEM_TYPE.isEqualTo("thread"),v.CONTEXT_DEBUG_STATE.isEqualTo("stopped"))),j(f.MenuId.DebugCallStackContext,c.STEP_OVER_ID,c.STEP_OVER_LABEL,20,v.CONTEXT_CALLSTACK_ITEM_TYPE.isEqualTo("thread"),v.CONTEXT_DEBUG_STATE.isEqualTo("stopped")),j(f.MenuId.DebugCallStackContext,c.STEP_INTO_ID,c.STEP_INTO_LABEL,30,v.CONTEXT_CALLSTACK_ITEM_TYPE.isEqualTo("thread"),v.CONTEXT_DEBUG_STATE.isEqualTo("stopped")),j(f.MenuId.DebugCallStackContext,c.STEP_OUT_ID,c.STEP_OUT_LABEL,40,v.CONTEXT_CALLSTACK_ITEM_TYPE.isEqualTo("thread"),v.CONTEXT_DEBUG_STATE.isEqualTo("stopped")),j(f.MenuId.DebugCallStackContext,c.TERMINATE_THREAD_ID,t.localize(8,null),10,v.CONTEXT_CALLSTACK_ITEM_TYPE.isEqualTo("thread"),void 0,"termination"),j(f.MenuId.DebugCallStackContext,c.RESTART_FRAME_ID,t.localize(9,null),10,l.ContextKeyExpr.and(v.CONTEXT_CALLSTACK_ITEM_TYPE.isEqualTo("stackFrame"),v.CONTEXT_RESTART_FRAME_SUPPORTED),v.CONTEXT_STACK_FRAME_SUPPORTS_RESTART),j(f.MenuId.DebugCallStackContext,c.COPY_STACK_TRACE_ID,t.localize(10,null),20,v.CONTEXT_CALLSTACK_ITEM_TYPE.isEqualTo("stackFrame"),void 0,"3_modification"),j(f.MenuId.DebugVariablesContext,h.VIEW_MEMORY_ID,t.localize(11,null),15,v.CONTEXT_CAN_VIEW_MEMORY,v.CONTEXT_IN_DEBUG_MODE,"inline",V.debugInspectMemory),j(f.MenuId.DebugVariablesContext,h.SET_VARIABLE_ID,t.localize(12,null),10,l.ContextKeyExpr.or(v.CONTEXT_SET_VARIABLE_SUPPORTED,l.ContextKeyExpr.and(v.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT,v.CONTEXT_SET_EXPRESSION_SUPPORTED)),v.CONTEXT_VARIABLE_IS_READONLY.toNegated(),"3_modification"),j(f.MenuId.DebugVariablesContext,h.COPY_VALUE_ID,t.localize(13,null),10,void 0,void 0,"5_cutcopypaste"),j(f.MenuId.DebugVariablesContext,h.COPY_EVALUATE_PATH_ID,t.localize(14,null),20,v.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT,void 0,"5_cutcopypaste"),j(f.MenuId.DebugVariablesContext,h.ADD_TO_WATCH_ID,t.localize(15,null),100,v.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT,void 0,"z_commands"),j(f.MenuId.DebugVariablesContext,h.BREAK_WHEN_VALUE_IS_READ_ID,t.localize(16,null),200,v.CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED,void 0,"z_commands"),j(f.MenuId.DebugVariablesContext,h.BREAK_WHEN_VALUE_CHANGES_ID,t.localize(17,null),210,v.CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED,void 0,"z_commands"),j(f.MenuId.DebugVariablesContext,h.BREAK_WHEN_VALUE_IS_ACCESSED_ID,t.localize(18,null),220,v.CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED,void 0,"z_commands"),j(f.MenuId.DebugWatchContext,n.ADD_WATCH_ID,n.ADD_WATCH_LABEL,10,void 0,void 0,"3_modification"),j(f.MenuId.DebugWatchContext,c.EDIT_EXPRESSION_COMMAND_ID,t.localize(19,null),20,v.CONTEXT_WATCH_ITEM_TYPE.isEqualTo("expression"),void 0,"3_modification"),j(f.MenuId.DebugWatchContext,c.SET_EXPRESSION_COMMAND_ID,t.localize(20,null),30,l.ContextKeyExpr.or(l.ContextKeyExpr.and(v.CONTEXT_WATCH_ITEM_TYPE.isEqualTo("expression"),v.CONTEXT_SET_EXPRESSION_SUPPORTED),l.ContextKeyExpr.and(v.CONTEXT_WATCH_ITEM_TYPE.isEqualTo("variable"),v.CONTEXT_SET_VARIABLE_SUPPORTED)),v.CONTEXT_VARIABLE_IS_READONLY.toNegated(),"3_modification"),j(f.MenuId.DebugWatchContext,h.COPY_VALUE_ID,t.localize(21,null),40,l.ContextKeyExpr.or(v.CONTEXT_WATCH_ITEM_TYPE.isEqualTo("expression"),v.CONTEXT_WATCH_ITEM_TYPE.isEqualTo("variable")),v.CONTEXT_IN_DEBUG_MODE,"3_modification"),j(f.MenuId.DebugWatchContext,h.VIEW_MEMORY_ID,t.localize(22,null),50,v.CONTEXT_CAN_VIEW_MEMORY,v.CONTEXT_IN_DEBUG_MODE,"3_modification"),j(f.MenuId.DebugWatchContext,c.REMOVE_EXPRESSION_COMMAND_ID,t.localize(23,null),10,v.CONTEXT_WATCH_ITEM_TYPE.isEqualTo("expression"),void 0,"z_commands"),j(f.MenuId.DebugWatchContext,n.REMOVE_WATCH_EXPRESSIONS_COMMAND_ID,n.REMOVE_WATCH_EXPRESSIONS_LABEL,20,void 0,void 0,"z_commands"),s.isMacintosh){const ee=(te,se,ie,ce,le)=>{f.MenuRegistry.appendMenuItem(f.MenuId.TouchBarContext,{command:{id:te,title:se,icon:{dark:le}},when:l.ContextKeyExpr.and(v.CONTEXT_DEBUGGERS_AVAILABLE,ce),group:"9_debug",order:ie})};ee(c.DEBUG_RUN_COMMAND_ID,c.DEBUG_RUN_LABEL,0,v.CONTEXT_IN_DEBUG_MODE.toNegated(),P.FileAccess.asFileUri("vs/workbench/contrib/debug/browser/media/continue-tb.png",Q)),ee(c.DEBUG_START_COMMAND_ID,c.DEBUG_START_LABEL,1,v.CONTEXT_IN_DEBUG_MODE.toNegated(),P.FileAccess.asFileUri("vs/workbench/contrib/debug/browser/media/run-with-debugging-tb.png",Q)),ee(c.CONTINUE_ID,c.CONTINUE_LABEL,0,v.CONTEXT_DEBUG_STATE.isEqualTo("stopped"),P.FileAccess.asFileUri("vs/workbench/contrib/debug/browser/media/continue-tb.png",Q)),ee(c.PAUSE_ID,c.PAUSE_LABEL,1,l.ContextKeyExpr.and(v.CONTEXT_IN_DEBUG_MODE,l.ContextKeyExpr.notEquals("debugState","stopped")),P.FileAccess.asFileUri("vs/workbench/contrib/debug/browser/media/pause-tb.png",Q)),ee(c.STEP_OVER_ID,c.STEP_OVER_LABEL,2,v.CONTEXT_IN_DEBUG_MODE,P.FileAccess.asFileUri("vs/workbench/contrib/debug/browser/media/stepover-tb.png",Q)),ee(c.STEP_INTO_ID,c.STEP_INTO_LABEL,3,v.CONTEXT_IN_DEBUG_MODE,P.FileAccess.asFileUri("vs/workbench/contrib/debug/browser/media/stepinto-tb.png",Q)),ee(c.STEP_OUT_ID,c.STEP_OUT_LABEL,4,v.CONTEXT_IN_DEBUG_MODE,P.FileAccess.asFileUri("vs/workbench/contrib/debug/browser/media/stepout-tb.png",Q)),ee(c.RESTART_SESSION_ID,c.RESTART_LABEL,5,v.CONTEXT_IN_DEBUG_MODE,P.FileAccess.asFileUri("vs/workbench/contrib/debug/browser/media/restart-tb.png",Q)),ee(c.STOP_ID,c.STOP_LABEL,6,v.CONTEXT_IN_DEBUG_MODE,P.FileAccess.asFileUri("vs/workbench/contrib/debug/browser/media/stop-tb.png",Q))}f.MenuRegistry.appendMenuItem(f.MenuId.EditorTitle,{submenu:f.MenuId.EditorTitleRun,rememberDefaultAction:!0,title:{value:t.localize(24,null),original:"Run or Debug..."},icon:V.debugRun,group:"navigation",order:-1}),f.MenuRegistry.appendMenuItem(f.MenuId.MenubarMainMenu,{submenu:f.MenuId.MenubarDebugMenu,title:{value:"Run",original:"Run",mnemonicTitle:t.localize(25,null)},when:l.ContextKeyExpr.or(v.CONTEXT_DEBUGGERS_AVAILABLE),order:6}),f.MenuRegistry.appendMenuItem(f.MenuId.MenubarDebugMenu,{group:"1_debug",command:{id:c.DEBUG_START_COMMAND_ID,title:t.localize(26,null)},order:1,when:v.CONTEXT_DEBUGGERS_AVAILABLE}),f.MenuRegistry.appendMenuItem(f.MenuId.MenubarDebugMenu,{group:"1_debug",command:{id:c.DEBUG_RUN_COMMAND_ID,title:t.localize(27,null)},order:2,when:v.CONTEXT_DEBUGGERS_AVAILABLE}),f.MenuRegistry.appendMenuItem(f.MenuId.MenubarDebugMenu,{group:"1_debug",command:{id:c.STOP_ID,title:t.localize(28,null),precondition:v.CONTEXT_IN_DEBUG_MODE},order:3,when:v.CONTEXT_DEBUGGERS_AVAILABLE}),f.MenuRegistry.appendMenuItem(f.MenuId.MenubarDebugMenu,{group:"1_debug",command:{id:c.RESTART_SESSION_ID,title:t.localize(29,null),precondition:v.CONTEXT_IN_DEBUG_MODE},order:4,when:v.CONTEXT_DEBUGGERS_AVAILABLE}),f.MenuRegistry.appendMenuItem(f.MenuId.MenubarDebugMenu,{group:"2_configuration",command:{id:c.ADD_CONFIGURATION_ID,title:t.localize(30,null)},order:2,when:v.CONTEXT_DEBUGGERS_AVAILABLE}),f.MenuRegistry.appendMenuItem(f.MenuId.MenubarDebugMenu,{group:"3_step",command:{id:c.STEP_OVER_ID,title:t.localize(31,null),precondition:v.CONTEXT_DEBUG_STATE.isEqualTo("stopped")},order:1,when:v.CONTEXT_DEBUGGERS_AVAILABLE}),f.MenuRegistry.appendMenuItem(f.MenuId.MenubarDebugMenu,{group:"3_step",command:{id:c.STEP_INTO_ID,title:t.localize(32,null),precondition:v.CONTEXT_DEBUG_STATE.isEqualTo("stopped")},order:2,when:v.CONTEXT_DEBUGGERS_AVAILABLE}),f.MenuRegistry.appendMenuItem(f.MenuId.MenubarDebugMenu,{group:"3_step",command:{id:c.STEP_OUT_ID,title:t.localize(33,null),precondition:v.CONTEXT_DEBUG_STATE.isEqualTo("stopped")},order:3,when:v.CONTEXT_DEBUGGERS_AVAILABLE}),f.MenuRegistry.appendMenuItem(f.MenuId.MenubarDebugMenu,{group:"3_step",command:{id:c.CONTINUE_ID,title:t.localize(34,null),precondition:v.CONTEXT_DEBUG_STATE.isEqualTo("stopped")},order:4,when:v.CONTEXT_DEBUGGERS_AVAILABLE}),f.MenuRegistry.appendMenuItem(f.MenuId.MenubarNewBreakpointMenu,{group:"1_breakpoints",command:{id:c.TOGGLE_INLINE_BREAKPOINT_ID,title:t.localize(35,null)},order:2,when:v.CONTEXT_DEBUGGERS_AVAILABLE}),f.MenuRegistry.appendMenuItem(f.MenuId.MenubarDebugMenu,{group:"4_new_breakpoint",title:t.localize(36,null),submenu:f.MenuId.MenubarNewBreakpointMenu,order:2,when:v.CONTEXT_DEBUGGERS_AVAILABLE}),f.MenuRegistry.appendMenuItem(f.MenuId.MenubarDebugMenu,{group:"z_install",command:{id:"debug.installAdditionalDebuggers",title:t.localize(37,null)},when:v.CONTEXT_DEBUGGERS_AVAILABLE,order:1});const X=_.Registry.as(S.Extensions.ViewContainersRegistry).registerViewContainer({id:v.DEBUG_PANEL_ID,title:t.localize(38,null),icon:V.debugConsoleViewIcon,ctorDescriptor:new R.SyncDescriptor(O.ViewPaneContainer,[v.DEBUG_PANEL_ID,{mergeViewWithContainerWhenSingleView:!0,donotShowContainerTitleWhenMergedWithContainer:!0}]),storageId:v.DEBUG_PANEL_ID,hideIfEmpty:!0,order:2},1,{donotRegisterOpenCommand:!0});_.Registry.as(S.Extensions.ViewsRegistry).registerViews([{id:v.REPL_VIEW_ID,name:t.localize(39,null),containerIcon:V.debugConsoleViewIcon,canToggleVisibility:!1,canMoveView:!0,when:v.CONTEXT_DEBUGGERS_AVAILABLE,ctorDescriptor:new R.SyncDescriptor(g.Repl),openCommandActionDescriptor:{id:"workbench.debug.action.toggleRepl",mnemonicTitle:t.localize(40,null),keybindings:{primary:2048|1024|55},order:2}}],X);const Y=_.Registry.as(S.Extensions.ViewContainersRegistry).registerViewContainer({id:v.VIEWLET_ID,title:t.localize(41,null),openCommandActionDescriptor:{id:v.VIEWLET_ID,mnemonicTitle:t.localize(42,null),keybindings:{primary:2048|1024|34},order:3},ctorDescriptor:new R.SyncDescriptor(b.DebugViewPaneContainer),icon:V.runViewIcon,alwaysUseContainerInfo:!0,order:3},0),$=_.Registry.as(S.Extensions.ViewsRegistry);$.registerViews([{id:v.VARIABLES_VIEW_ID,name:t.localize(43,null),containerIcon:V.variablesViewIcon,ctorDescriptor:new R.SyncDescriptor(h.VariablesView),order:10,weight:40,canToggleVisibility:!0,canMoveView:!0,focusCommand:{id:"workbench.debug.action.focusVariablesView"},when:v.CONTEXT_DEBUG_UX.isEqualTo("default")}],Y),$.registerViews([{id:v.WATCH_VIEW_ID,name:t.localize(44,null),containerIcon:V.watchViewIcon,ctorDescriptor:new R.SyncDescriptor(n.WatchExpressionsView),order:20,weight:10,canToggleVisibility:!0,canMoveView:!0,focusCommand:{id:"workbench.debug.action.focusWatchView"},when:v.CONTEXT_DEBUG_UX.isEqualTo("default")}],Y),$.registerViews([{id:v.CALLSTACK_VIEW_ID,name:t.localize(45,null),containerIcon:V.callStackViewIcon,ctorDescriptor:new R.SyncDescriptor(I.CallStackView),order:30,weight:30,canToggleVisibility:!0,canMoveView:!0,focusCommand:{id:"workbench.debug.action.focusCallStackView"},when:v.CONTEXT_DEBUG_UX.isEqualTo("default")}],Y),$.registerViews([{id:v.BREAKPOINTS_VIEW_ID,name:t.localize(46,null),containerIcon:V.breakpointsViewIcon,ctorDescriptor:new R.SyncDescriptor(D.BreakpointsView),order:40,weight:20,canToggleVisibility:!0,canMoveView:!0,focusCommand:{id:"workbench.debug.action.focusBreakpointsView"},when:l.ContextKeyExpr.or(v.CONTEXT_BREAKPOINTS_EXIST,v.CONTEXT_DEBUG_UX.isEqualTo("default"))}],Y),$.registerViews([{id:m.WelcomeView.ID,name:m.WelcomeView.LABEL,containerIcon:V.runViewIcon,ctorDescriptor:new R.SyncDescriptor(m.WelcomeView),order:1,weight:40,canToggleVisibility:!0,when:v.CONTEXT_DEBUG_UX.isEqualTo("simple")}],Y),$.registerViews([{id:v.LOADED_SCRIPTS_VIEW_ID,name:t.localize(47,null),containerIcon:V.loadedScriptsViewIcon,ctorDescriptor:new R.SyncDescriptor(u.LoadedScriptsView),order:35,weight:5,canToggleVisibility:!0,canMoveView:!0,collapsed:!0,when:l.ContextKeyExpr.and(v.CONTEXT_LOADED_SCRIPTS_SUPPORTED,v.CONTEXT_DEBUG_UX.isEqualTo("default"))}],Y),_.Registry.as(z.EditorExtensions.EditorPane).registerEditorPane(H.EditorPaneDescriptor.create(U.DisassemblyView,v.DISASSEMBLY_VIEW_ID,t.localize(48,null)),[new R.SyncDescriptor(K.DisassemblyViewInput)]),_.Registry.as(k.Extensions.Configuration).registerConfiguration({id:"debug",order:20,title:t.localize(49,null),type:"object",properties:{"debug.allowBreakpointsEverywhere":{type:"boolean",description:t.localize(50,null),default:!1},"debug.openExplorerOnEnd":{type:"boolean",description:t.localize(51,null),default:!1},"debug.inlineValues":{type:["boolean","string"],enum:[!0,!1,"auto"],description:t.localize(52,null),enumDescriptions:[t.localize(53,null),t.localize(54,null),t.localize(55,null)],default:"auto"},"debug.toolBarLocation":{enum:["floating","docked","hidden"],markdownDescription:t.localize(56,null),default:"floating"},"debug.showInStatusBar":{enum:["never","always","onFirstSessionStart"],enumDescriptions:[t.localize(57,null),t.localize(58,null),t.localize(59,null)],description:t.localize(60,null),default:"onFirstSessionStart"},"debug.internalConsoleOptions":v.INTERNAL_CONSOLE_OPTIONS_SCHEMA,"debug.console.closeOnEnd":{type:"boolean",description:t.localize(61,null),default:!1},"debug.terminal.clearBeforeReusing":{type:"boolean",description:t.localize(62,null),default:!1},"debug.openDebug":{enum:["neverOpen","openOnSessionStart","openOnFirstSessionStart","openOnDebugBreak"],default:"openOnDebugBreak",description:t.localize(63,null)},"debug.showSubSessionsInToolBar":{type:"boolean",description:t.localize(64,null),default:!1},"debug.console.fontSize":{type:"number",description:t.localize(65,null),default:s.isMacintosh?12:14},"debug.console.fontFamily":{type:"string",description:t.localize(66,null),default:"default"},"debug.console.lineHeight":{type:"number",description:t.localize(67,null),default:0},"debug.console.wordWrap":{type:"boolean",description:t.localize(68,null),default:!0},"debug.console.historySuggestions":{type:"boolean",description:t.localize(69,null),default:!0},"debug.console.collapseIdenticalLines":{type:"boolean",description:t.localize(70,null),default:!0},"debug.console.acceptSuggestionOnEnter":{enum:["off","on"],description:t.localize(71,null),default:"off"},launch:{type:"object",description:t.localize(72,null),default:{configurations:[],compounds:[]},$ref:p.launchSchemaId},"debug.focusWindowOnBreak":{type:"boolean",description:t.localize(73,null),default:!0},"debug.onTaskErrors":{enum:["debugAnyway","showErrors","prompt","abort"],enumDescriptions:[t.localize(74,null),t.localize(75,null),t.localize(76,null),t.localize(77,null)],description:t.localize(78,null),default:"prompt"},"debug.showBreakpointsInOverviewRuler":{type:"boolean",description:t.localize(79,null),default:!1},"debug.showInlineBreakpointCandidates":{type:"boolean",description:t.localize(80,null),default:!0},"debug.saveBeforeStart":{description:t.localize(81,null),enum:["allEditorsInActiveGroup","nonUntitledEditorsInActiveGroup","none"],enumDescriptions:[t.localize(82,null),t.localize(83,null),t.localize(84,null)],default:"allEditorsInActiveGroup",scope:5},"debug.confirmOnExit":{description:t.localize(85,null),type:"string",enum:["never","always"],enumDescriptions:[t.localize(86,null),t.localize(87,null)],default:"never"},"debug.disassemblyView.showSourceCode":{type:"boolean",default:!0,description:t.localize(88,null)}}})}),define(ne[2758],re([1,0,1581,44,167,213,69,5,34,148,95,130,71,28,7,23,94,97,14,61,220,276,204,18,26,58,21,59,45,19,2,85,15,72,229,83,56,22,36,132,116,8,88,289]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.newWindowCommand=e.openWindowCommand=void 0;const K=(te,se,ie)=>{if(Array.isArray(se)){const ce=te.get(k.IHostService),le=te.get(R.IEnvironmentService);se=se.map(ae=>(0,A.isWorkspaceToOpen)(ae)&&ae.workspaceUri.scheme===h.Schemas.untitled?{workspaceUri:(0,y.joinPath)(le.untitledWorkspacesHome,ae.workspaceUri.path,I.UNTITLED_WORKSPACE_NAME)}:ae),ce.openWindow(se,ie)}};e.openWindowCommand=K;const G=(te,se)=>{te.get(k.IHostService).openWindow(se)};e.newWindowCommand=G,s.KeybindingsRegistry.registerCommandAndKeybindingRule({weight:200,when:w.ExplorerFocusCondition,primary:2048|3,mac:{primary:256|3},id:H.OPEN_TO_SIDE_COMMAND_ID,handler:async(te,se)=>{const ie=te.get(m.IEditorService),ce=te.get(o.IListService),le=te.get(S.IFileService),ae=te.get(u.IExplorerService),ue=(0,u.getMultiSelectedResources)(se,ce,ie,ae);if(ue.length){const oe=ue.filter(Ce=>Ce.scheme===h.Schemas.untitled),fe=ue.filter(Ce=>Ce.scheme!==h.Schemas.untitled),be=(await Promise.all(fe.map(async Ce=>{const ve=ae.findClosest(Ce);return ve||await le.stat(Ce)}))).filter(Ce=>!Ce.isDirectory).map(Ce=>({resource:Ce.resource,options:{pinned:!0}})).concat(...oe.map(Ce=>({resource:Ce,options:{pinned:!0}})));await ie.openEditors(be,m.SIDE_GROUP)}}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({weight:200+10,when:i.ContextKeyExpr.and(w.FilesExplorerFocusCondition,w.ExplorerFolderContext.toNegated()),primary:3,mac:{primary:2048|18},id:"explorer.openAndPassFocus",handler:async(te,se)=>{const ie=te.get(m.IEditorService),le=te.get(u.IExplorerService).getContext(!0);le.length&&await ie.openEditors(le.map(ae=>({resource:ae.resource,options:{preserveFocus:!1,pinned:!0}})))}});const q="showModifications";let Z=[];s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:H.COMPARE_WITH_SAVED_COMMAND_ID,when:void 0,weight:200,primary:(0,l.KeyChord)(2048|41,34),handler:async(te,se)=>{const ie=te.get(D.IInstantiationService),ce=te.get(p.ITextModelService),le=te.get(m.IEditorService),ae=te.get(S.IFileService);let ue=!1;if(Z.length===0){ue=!0;const fe=ie.createInstance(w.TextFileContentProvider);Z.push(fe),Z.push(ce.registerTextModelContentProvider(q,fe))}const oe=(0,u.getResourceForCommand)(se,te.get(o.IListService),le);if(oe&&ae.hasProvider(oe)){const fe=(0,y.basename)(oe),pe=t.localize(0,null,fe,fe);try{await w.TextFileContentProvider.open(oe,q,pe,le,{pinned:!0}),ue&&Z.push(le.onDidVisibleEditorsChange(()=>{le.editors.some(me=>!!f.EditorResourceAccessor.getCanonicalUri(me,{supportSideBySide:f.SideBySideEditor.SECONDARY,filterByScheme:q}))||(Z=(0,T.dispose)(Z))}))}catch{Z=(0,T.dispose)(Z)}}}});let j,X;c.CommandsRegistry.registerCommand({id:H.SELECT_FOR_COMPARE_COMMAND_ID,handler:(te,se)=>{const ie=te.get(o.IListService);j=(0,u.getResourceForCommand)(se,ie,te.get(m.IEditorService)),X||(X=H.ResourceSelectedForCompareContext.bindTo(te.get(i.IContextKeyService))),X.set(!0)}}),c.CommandsRegistry.registerCommand({id:H.COMPARE_SELECTED_COMMAND_ID,handler:async(te,se)=>{const ie=te.get(m.IEditorService),ce=te.get(u.IExplorerService),le=(0,u.getMultiSelectedResources)(se,te.get(o.IListService),ie,ce);return le.length===2?ie.openEditor({original:{resource:le[0]},modified:{resource:le[1]},options:{pinned:!0}}):!0}}),c.CommandsRegistry.registerCommand({id:H.COMPARE_RESOURCE_COMMAND_ID,handler:(te,se)=>{const ie=te.get(m.IEditorService),ce=te.get(o.IListService),le=(0,u.getResourceForCommand)(se,ce,ie);j&&le&&ie.openEditor({original:{resource:j},modified:{resource:le},options:{pinned:!0}})}});async function Y(te,se,ie,ce,le){if(te.length){const ae=r.isWindows?`\r `:` `;let ue;if(se){const fe=le.getValue("explorer.copyRelativePathSeparator");(fe==="/"||fe==="\\")&&(ue=fe)}const oe=te.map(fe=>ce.getUriLabel(fe,{relative:se,noPrefix:!0,separator:ue})).join(ae);await ie.writeText(oe)}}s.KeybindingsRegistry.registerCommandAndKeybindingRule({weight:200,when:d.EditorContextKeys.focus.toNegated(),primary:2048|512|33,win:{primary:1024|512|33},id:H.COPY_PATH_COMMAND_ID,handler:async(te,se)=>{const ie=(0,u.getMultiSelectedResources)(se,te.get(o.IListService),te.get(m.IEditorService),te.get(u.IExplorerService));await Y(ie,!1,te.get(v.IClipboardService),te.get(E.ILabelService),te.get(z.IConfigurationService))}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({weight:200,when:d.EditorContextKeys.focus.toNegated(),primary:2048|1024|512|33,win:{primary:(0,l.KeyChord)(2048|41,2048|1024|33)},id:H.COPY_RELATIVE_PATH_COMMAND_ID,handler:async(te,se)=>{const ie=(0,u.getMultiSelectedResources)(se,te.get(o.IListService),te.get(m.IEditorService),te.get(u.IExplorerService));await Y(ie,!0,te.get(v.IClipboardService),te.get(E.ILabelService),te.get(z.IConfigurationService))}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({weight:200,when:void 0,primary:(0,l.KeyChord)(2048|41,46),id:"workbench.action.files.copyPathOfActiveFile",handler:async te=>{const ie=te.get(m.IEditorService).activeEditor,ce=f.EditorResourceAccessor.getOriginalUri(ie,{supportSideBySide:f.SideBySideEditor.PRIMARY});await Y(ce?[ce]:[],!1,te.get(v.IClipboardService),te.get(E.ILabelService),te.get(z.IConfigurationService))}}),c.CommandsRegistry.registerCommand({id:H.REVEAL_IN_EXPLORER_COMMAND_ID,handler:async(te,se)=>{const ie=te.get(U.IPaneCompositePartService),ce=te.get(I.IWorkspaceContextService),le=te.get(u.IExplorerService),ae=(0,u.getResourceForCommand)(se,te.get(o.IListService),te.get(m.IEditorService)),ue=(await ie.openPaneComposite(w.VIEWLET_ID,0,!1))?.getViewPaneContainer();if(ae&&ce.isInsideWorkspace(ae)){const oe=ue.getExplorerView();oe&&(oe.setExpanded(!0),await le.select(ae,!0),oe.focus())}else{const oe=ue.getOpenEditorsView();oe&&(oe.setExpanded(!0),oe.focus())}}}),c.CommandsRegistry.registerCommand({id:H.OPEN_WITH_EXPLORER_COMMAND_ID,handler:async(te,se)=>{const ie=te.get(m.IEditorService),ce=(0,u.getResourceForCommand)(se,te.get(o.IListService),te.get(m.IEditorService));if(ce)return ie.openEditor({resource:ce,options:{override:P.EditorResolution.PICK,source:P.EditorOpenSource.USER}})}});async function $(te,se){const ie=te.get(o.IListService),ce=te.get(b.IEditorGroupsService),le=te.get(x.ICodeEditorService),ae=te.get(L.ITextFileService);let ue=(0,u.getOpenEditorsViewMultiSelection)(ie,ce);if(!ue){const fe=ce.activeGroup;fe.activeEditor&&(ue=[],fe.activeEditor instanceof _.SideBySideEditorInput&&!se?.saveAs&&!(fe.activeEditor.primary.hasCapability(4)||fe.activeEditor.secondary.hasCapability(4))?(ue.push({groupId:fe.id,editor:fe.activeEditor.primary}),ue.push({groupId:fe.id,editor:fe.activeEditor.secondary})):ue.push({groupId:fe.id,editor:fe.activeEditor}))}if(!ue||ue.length===0)return;await ee(te,ue,se);const oe=le.getFocusedCodeEditor();if(oe instanceof F.EmbeddedCodeEditorWidget){const fe=oe.getModel()?.uri;fe&&!ue.some(({editor:pe})=>(0,y.isEqual)(f.EditorResourceAccessor.getCanonicalUri(pe,{supportSideBySide:f.SideBySideEditor.PRIMARY}),fe))&&(ae.files.get(fe)?.isReadonly()||await ae.save(fe,se))}}function J(te,se,ie){const ce=[];for(const le of se)for(const ae of le.getEditors(0))ae.isDirty()&&ce.push({groupId:le.id,editor:ae});return ee(te,ce,ie)}async function ee(te,se,ie){const ce=te.get(m.IEditorService),le=te.get(g.INotificationService),ae=te.get(D.IInstantiationService);try{await ce.save(se,ie)}catch(ue){(0,N.isCancellationError)(ue)||le.notify({id:se.map(({editor:oe})=>(0,V.hash)(oe.resource?.toString())).join(),severity:g.Severity.Error,message:t.localize(1,null,se.map(({editor:oe})=>oe.getName()).join(", "),(0,C.toErrorMessage)(ue,!1)),actions:{primary:[(0,B.toAction)({id:"workbench.action.files.saveEditors",label:t.localize(2,null),run:()=>ae.invokeFunction(oe=>ee(oe,se,ie))}),(0,B.toAction)({id:"workbench.action.files.revertEditors",label:t.localize(3,null),run:()=>ce.revert(se)})]}})}}s.KeybindingsRegistry.registerCommandAndKeybindingRule({when:void 0,weight:200,primary:2048|49,id:H.SAVE_FILE_COMMAND_ID,handler:te=>$(te,{reason:1,force:!0})}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({when:void 0,weight:200,primary:(0,l.KeyChord)(2048|41,49),win:{primary:(0,l.KeyChord)(2048|41,2048|1024|49)},id:H.SAVE_FILE_WITHOUT_FORMATTING_COMMAND_ID,handler:te=>$(te,{reason:1,force:!0,skipSaveParticipants:!0})}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:H.SAVE_FILE_AS_COMMAND_ID,weight:200,when:void 0,primary:2048|1024|49,handler:te=>$(te,{reason:1,saveAs:!0})}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({when:void 0,weight:200,primary:void 0,mac:{primary:2048|512|49},win:{primary:(0,l.KeyChord)(2048|41,49)},id:H.SAVE_ALL_COMMAND_ID,handler:te=>J(te,te.get(b.IEditorGroupsService).getGroups(1),{reason:1})}),c.CommandsRegistry.registerCommand({id:H.SAVE_ALL_IN_GROUP_COMMAND_ID,handler:(te,se,ie)=>{const ce=te.get(b.IEditorGroupsService),le=(0,n.getMultiSelectedEditorContexts)(ie,te.get(o.IListService),te.get(b.IEditorGroupsService));let ae;return le.length?ae=(0,O.coalesce)(le.map(ue=>ce.getGroup(ue.groupId))):ae=ce.getGroups(1),J(te,ae,{reason:1})}}),c.CommandsRegistry.registerCommand({id:H.SAVE_FILES_COMMAND_ID,handler:te=>te.get(m.IEditorService).saveAll({includeUntitled:!1,reason:1})}),c.CommandsRegistry.registerCommand({id:H.REVERT_FILE_COMMAND_ID,handler:async te=>{const se=te.get(g.INotificationService),ie=te.get(o.IListService),ce=te.get(b.IEditorGroupsService),le=te.get(m.IEditorService);let ae=(0,u.getOpenEditorsViewMultiSelection)(ie,ce);if(!ae){const ue=ce.activeGroup;ue.activeEditor&&(ae=[{groupId:ue.id,editor:ue.activeEditor}])}if(!(!ae||ae.length===0))try{await le.revert(ae.filter(({editor:ue})=>!ue.hasCapability(4)),{force:!0})}catch(ue){se.error(t.localize(4,null,ae.map(({editor:oe})=>oe.getName()).join(", "),(0,C.toErrorMessage)(ue,!1)))}}}),c.CommandsRegistry.registerCommand({id:H.REMOVE_ROOT_FOLDER_COMMAND_ID,handler:(te,se)=>{const ie=te.get(a.IWorkspaceEditingService),ce=te.get(I.IWorkspaceContextService),le=te.get(M.IUriIdentityService),ae=ce.getWorkspace(),ue=(0,u.getMultiSelectedResources)(se,te.get(o.IListService),te.get(m.IEditorService),te.get(u.IExplorerService)).filter(oe=>ae.folders.some(fe=>le.extUri.isEqual(fe.uri,oe)));return ie.removeFolders(ue)}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({weight:200+10,when:i.ContextKeyExpr.and(w.FilesExplorerFocusCondition,w.ExplorerCompressedFocusContext,w.ExplorerCompressedFirstFocusContext.negate()),primary:15,id:H.PREVIOUS_COMPRESSED_FOLDER,handler:te=>{const ie=te.get(U.IPaneCompositePartService).getActivePaneComposite(0);if(ie?.getId()!==w.VIEWLET_ID)return;ie.getViewPaneContainer().getExplorerView().previousCompressedStat()}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({weight:200+10,when:i.ContextKeyExpr.and(w.FilesExplorerFocusCondition,w.ExplorerCompressedFocusContext,w.ExplorerCompressedLastFocusContext.negate()),primary:17,id:H.NEXT_COMPRESSED_FOLDER,handler:te=>{const ie=te.get(U.IPaneCompositePartService).getActivePaneComposite(0);if(ie?.getId()!==w.VIEWLET_ID)return;ie.getViewPaneContainer().getExplorerView().nextCompressedStat()}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({weight:200+10,when:i.ContextKeyExpr.and(w.FilesExplorerFocusCondition,w.ExplorerCompressedFocusContext,w.ExplorerCompressedFirstFocusContext.negate()),primary:14,id:H.FIRST_COMPRESSED_FOLDER,handler:te=>{const ie=te.get(U.IPaneCompositePartService).getActivePaneComposite(0);if(ie?.getId()!==w.VIEWLET_ID)return;ie.getViewPaneContainer().getExplorerView().firstCompressedStat()}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({weight:200+10,when:i.ContextKeyExpr.and(w.FilesExplorerFocusCondition,w.ExplorerCompressedFocusContext,w.ExplorerCompressedLastFocusContext.negate()),primary:13,id:H.LAST_COMPRESSED_FOLDER,handler:te=>{const ie=te.get(U.IPaneCompositePartService).getActivePaneComposite(0);if(ie?.getId()!==w.VIEWLET_ID)return;ie.getViewPaneContainer().getExplorerView().lastCompressedStat()}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({weight:200,when:null,primary:r.isWeb?r.isWindows?(0,l.KeyChord)(2048|41,44):2048|512|44:2048|44,secondary:r.isWeb?[2048|44]:void 0,id:H.NEW_UNTITLED_FILE_COMMAND_ID,description:{description:H.NEW_UNTITLED_FILE_LABEL,args:[{isOptional:!0,name:"viewType",description:"The editor view type",schema:{type:"object",required:["viewType"],properties:{viewType:{type:"string"}}}}]},handler:async(te,se)=>{await te.get(m.IEditorService).openEditor({resource:void 0,options:{override:se?.viewType,pinned:!0}})}})}),define(ne[943],re([1,0,1583,30,54,23,26,67,220,148,21,11,60,19,140,355,69,34,156,276,14,10,31,18,111,206,2,150,15,22,8,396,5]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMultipleFilesOverwriteConfirm=e.getFileOverwriteConfirm=e.FileDownload=e.ExternalFileImport=e.BrowserFileUpload=void 0;let x=class ms{constructor(P,V,z,U,H){this.progressService=P,this.dialogService=V,this.explorerService=z,this.editorService=U,this.fileService=H}upload(P,V){const z=new f.CancellationTokenSource,U=this.progressService.withProgress({location:10,delay:800,cancellable:!0,title:(0,t.localize)(0,null)},async H=>this.doUpload(P,this.toTransfer(V),H,z.token),()=>z.dispose(!0));return this.progressService.withProgress({location:w.VIEW_ID,delay:500},()=>U),U}toTransfer(P){if(P instanceof DragEvent)return P.dataTransfer;const V={items:[]};for(const z of P)V.items.push({webkitGetAsEntry:()=>({name:z.name,isDirectory:!1,isFile:!0,createReader:()=>{throw new Error("Unsupported for files")},file:U=>U(z)})});return V}async doUpload(P,V,z,U){const H=V.items,K=[];for(const X of H)K.push(X.webkitGetAsEntry());const G=[],q={startTime:Date.now(),progressScheduler:new C.RunOnceWorker(X=>{z.report(X[X.length-1])},1e3),filesTotal:K.length,filesUploaded:0,totalBytesUploaded:0},Z=new C.Limiter(ms.MAX_PARALLEL_UPLOADS);await C.Promises.settled(K.map(X=>Z.queue(async()=>{if(U.isCancellationRequested)return;if(P&&X.name&&P.getChild(X.name)){const{confirmed:$}=await this.dialogService.confirm(M(X.name));if(!$||(await this.explorerService.applyBulkEdit([new i.ResourceFileEdit((0,c.joinPath)(P.resource,X.name),void 0,{recursive:!0,folder:P.getChild(X.name)?.isDirectory})],{undoLabel:(0,t.localize)(1,null,X.name),progressLabel:(0,t.localize)(2,null,X.name)}),U.isCancellationRequested))return}const Y=await this.doUploadEntry(X,P.resource,P,z,q,U);Y&&G.push(Y)}))),q.progressScheduler.dispose();const j=G[0];!U.isCancellationRequested&&j?.isFile&&await this.editorService.openEditor({resource:j.resource,options:{pinned:!0}})}async doUploadEntry(P,V,z,U,H,K){if(K.isCancellationRequested||!P.name||!P.isFile&&!P.isDirectory)return;let G=0;const q=(j,X)=>{G+=X,H.totalBytesUploaded+=X;const Y=H.totalBytesUploaded/((Date.now()-H.startTime)/1e3);let $;j<A.ByteSize.MB?H.filesTotal===1?$=`${P.name}`:$=(0,t.localize)(3,null,H.filesUploaded,H.filesTotal,A.ByteSize.formatSize(Y)):$=(0,t.localize)(4,null,P.name,A.ByteSize.formatSize(G),A.ByteSize.formatSize(j),A.ByteSize.formatSize(Y)),H.progressScheduler.work({message:$})};H.filesUploaded++,q(0,0);const Z=(0,c.joinPath)(V,P.name);if(P.isFile){const j=await new Promise((X,Y)=>P.file(X,Y));return K.isCancellationRequested?void 0:(typeof j.stream=="function"&&j.size>A.ByteSize.MB?await this.doUploadFileBuffered(Z,j,q,K):await this.doUploadFileUnbuffered(Z,j,q),{isFile:!0,resource:Z})}else{if(await this.fileService.createFolder(Z),K.isCancellationRequested)return;const j=P.createReader(),X=[];let Y=!1;do{const se=await new Promise((ie,ce)=>j.readEntries(ie,ce));se.length>0?X.push(...se):Y=!0}while(!Y&&!K.isCancellationRequested);H.filesTotal+=X.length;const $=z&&z.getChild(P.name)||void 0,J=[],ee=[];for(const se of X)se.isFile?J.push(se):se.isDirectory&&ee.push(se);const te=new C.Limiter(ms.MAX_PARALLEL_UPLOADS);await C.Promises.settled(J.map(se=>te.queue(()=>this.doUploadEntry(se,Z,$,U,H,K))));for(const se of ee)await this.doUploadEntry(se,Z,$,U,H,K);return{isFile:!1,resource:Z}}}async doUploadFileBuffered(P,V,z,U){const H=(0,o.newWriteableBufferStream)({highWaterMark:10}),K=this.fileService.writeFile(P,H);try{const G=V.stream().getReader();let q=await G.read();for(;!q.done&&!U.isCancellationRequested;){const Z=o.VSBuffer.wrap(q.value);if(await H.write(Z),U.isCancellationRequested)break;z(V.size,Z.byteLength),q=await G.read()}H.end(void 0)}catch(G){H.error(G),H.end()}U.isCancellationRequested||await K}doUploadFileUnbuffered(P,V,z){return new Promise((U,H)=>{const K=new FileReader;K.onload=async G=>{try{if(G.target?.result instanceof ArrayBuffer){const q=o.VSBuffer.wrap(new Uint8Array(G.target.result));await this.fileService.writeFile(P,q),z(V.size,q.byteLength)}else throw new Error("Could not read from dropped file.");U()}catch(q){H(q)}},K.readAsArrayBuffer(V)})}};x.MAX_PARALLEL_UPLOADS=20,x=Ee([W(0,D.IProgressService),W(1,_.IDialogService),W(2,I.IExplorerService),W(3,v.IEditorService),W(4,A.IFileService)],x),e.BrowserFileUpload=x;let F=class{constructor(P,V,z,U,H,K,G,q,Z,j,X){this.fileService=P,this.hostService=V,this.contextService=z,this.configurationService=U,this.dialogService=H,this.workspaceEditingService=K,this.explorerService=G,this.editorService=q,this.progressService=Z,this.notificationService=j,this.instantiationService=X}async import(P,V){const z=new f.CancellationTokenSource,U=this.progressService.withProgress({location:10,delay:800,cancellable:!0,title:(0,t.localize)(5,null)},async()=>await this.doImport(P,V,z.token),()=>z.dispose(!0));return this.progressService.withProgress({location:w.VIEW_ID,delay:500},()=>U),U}async doImport(P,V,z){const U=(0,E.coalesce)((await this.instantiationService.invokeFunction(q=>(0,r.extractEditorsDropData)(q,V))).map(q=>q.resource));await Promise.all(U.map(q=>this.fileService.activateProvider(q.scheme)));const H=(0,E.coalesce)(U.filter(q=>this.fileService.hasProvider(q))),K=await this.fileService.resolveAll(H.map(q=>({resource:q})));if(z.isCancellationRequested)return;this.hostService.focus();const G=K.filter(q=>q.success&&q.stat?.isDirectory).map(q=>({uri:q.stat.resource}));if(G.length>0&&P.isRoot){const q=[G.length>1?(0,t.localize)(6,null):(0,t.localize)(7,null),(0,t.localize)(8,null)];let Z;const j=this.contextService.getWorkspace().folders.map(Y=>Y.uri.scheme);G.some(Y=>j.indexOf(Y.uri.scheme)>=0)?(q.unshift(G.length>1?(0,t.localize)(9,null):(0,t.localize)(10,null)),Z=G.length>1?(0,t.localize)(11,null):(0,t.localize)(12,null,(0,c.basename)(G[0].uri))):Z=G.length>1?(0,t.localize)(13,null):(0,t.localize)(14,null,(0,c.basename)(G[0].uri));const{choice:X}=await this.dialogService.show(k.Severity.Info,Z,q);if(X===q.length-3)return this.workspaceEditingService.addFolders(G);if(X===q.length-2)return this.importResources(P,H,z)}else if(P instanceof S.ExplorerItem)return this.importResources(P,H,z)}async importResources(P,V,z){if(V&&V.length>0){const U=await this.fileService.resolve(P.resource);if(z.isCancellationRequested)return;const H=new Set,K=this.fileService.hasCapability(P.resource,1024);U.children&&U.children.forEach(X=>{H.add(K?X.name:X.name.toLowerCase())});let G=0;const q=(0,E.coalesce)(await C.Promises.settled(V.map(async X=>{if(!await this.fileService.exists(X)){G++;return}if(!(H.has(K?(0,c.basename)(X):(0,c.basename)(X).toLowerCase())&&!(await this.dialogService.confirm(M((0,c.basename)(X)))).confirmed))return X})));G>0&&this.notificationService.error(G>1?(0,t.localize)(15,null):(0,t.localize)(16,null));const Z=q.map(X=>{const Y=(0,c.basename)(X),$=(0,c.joinPath)(P.resource,Y);return new i.ResourceFileEdit(X,$,{overwrite:!0,copy:!0})}),j=this.configurationService.getValue().explorer.confirmUndo;if(await this.explorerService.applyBulkEdit(Z,{undoLabel:q.length===1?(0,t.localize)(17,null,(0,c.basename)(q[0])):(0,t.localize)(18,null,q.length),progressLabel:q.length===1?(0,t.localize)(19,null,(0,c.basename)(q[0])):(0,t.localize)(20,null,q.length),progressLocation:10,confirmBeforeUndo:j==="verbose"||j==="default"}),Z.length===1){const X=this.explorerService.findClosest(Z[0].newResource);X&&!X.isDirectory&&this.editorService.openEditor({resource:X.resource,options:{pinned:!0}})}}}};F=Ee([W(0,A.IFileService),W(1,s.IHostService),W(2,l.IWorkspaceContextService),W(3,T.IConfigurationService),W(4,_.IDialogService),W(5,p.IWorkspaceEditingService),W(6,I.IExplorerService),W(7,v.IEditorService),W(8,D.IProgressService),W(9,k.INotificationService),W(10,O.IInstantiationService)],F),e.ExternalFileImport=F;let L=class{constructor(P,V,z,U,H){this.fileService=P,this.explorerService=V,this.progressService=z,this.logService=U,this.fileDialogService=H}download(P){const V=new f.CancellationTokenSource,z=this.progressService.withProgress({location:10,delay:800,cancellable:u.isWeb,title:(0,t.localize)(21,null)},async U=>this.doDownload(P,U,V),()=>V.dispose(!0));return this.progressService.withProgress({location:w.VIEW_ID,delay:500},()=>z),z}async doDownload(P,V,z){for(const U of P){if(z.token.isCancellationRequested)return;u.isWeb?await this.doDownloadBrowser(U.resource,V,z):await this.doDownloadNative(U,V,z)}}async doDownloadBrowser(P,V,z){const U=await this.fileService.resolve(P,{resolveMetadata:!0});if(z.token.isCancellationRequested)return;const H=32*A.ByteSize.MB;if((U.isDirectory||U.size>H)&&R.WebFileSystemAccess.supported(window))try{const G=await window.showDirectoryPicker(),q={startTime:Date.now(),progressScheduler:new C.RunOnceWorker(Z=>{V.report(Z[Z.length-1])},1e3),filesTotal:U.isDirectory?0:1,filesDownloaded:0,totalBytesDownloaded:0,fileBytesDownloaded:0};if(U.isDirectory){const Z=await G.getDirectoryHandle(U.name,{create:!0});await this.downloadFolderBrowser(U,Z,q,z.token)}else await this.downloadFileBrowser(G,U,q,z.token);q.progressScheduler.dispose()}catch(G){this.logService.warn(G),z.cancel()}else if(U.isFile){let G;try{G=(await this.fileService.readFile(U.resource,{limits:{size:H}},z.token)).value.buffer}catch{G=h.FileAccess.asBrowserUri(U.resource)}z.token.isCancellationRequested||(0,a.triggerDownload)(G,U.name)}}async downloadFileBufferedBrowser(P,V,z,U){const H=await this.fileService.readFileStream(P,void 0,U);if(U.isCancellationRequested){V.close();return}return new Promise((K,G)=>{const q=H.value,Z=new m.DisposableStore;Z.add((0,m.toDisposable)(()=>V.close())),Z.add((0,b.once)(U.onCancellationRequested)(()=>{Z.dispose(),G((0,y.canceled)())})),Z.add((0,d.listenStream)(q,{onData:j=>{V.write(j.buffer),this.reportProgress(H.name,H.size,j.byteLength,z)},onError:j=>{Z.dispose(),G(j)},onEnd:()=>{Z.dispose(),K()}}))})}async downloadFileUnbufferedBrowser(P,V,z,U){const H=await this.fileService.readFile(P,void 0,U);U.isCancellationRequested||(V.write(H.value.buffer),this.reportProgress(H.name,H.size,H.value.byteLength,z)),V.close()}async downloadFileBrowser(P,V,z,U){z.filesDownloaded++,z.fileBytesDownloaded=0,this.reportProgress(V.name,0,0,z);const K=await(await P.getFileHandle(V.name,{create:!0})).createWritable();return V.size>A.ByteSize.MB?this.downloadFileBufferedBrowser(V.resource,K,z,U):this.downloadFileUnbufferedBrowser(V.resource,K,z,U)}async downloadFolderBrowser(P,V,z,U){if(P.children){z.filesTotal+=P.children.map(H=>H.isFile).length;for(const H of P.children){if(U.isCancellationRequested)return;if(H.isFile)await this.downloadFileBrowser(V,H,z,U);else{const K=await V.getDirectoryHandle(H.name,{create:!0}),G=await this.fileService.resolve(H.resource,{resolveMetadata:!0});await this.downloadFolderBrowser(G,K,z,U)}}}}reportProgress(P,V,z,U){U.fileBytesDownloaded+=z,U.totalBytesDownloaded+=z;const H=U.totalBytesDownloaded/((Date.now()-U.startTime)/1e3);let K;V<A.ByteSize.MB?U.filesTotal===1?K=P:K=(0,t.localize)(22,null,U.filesDownloaded,U.filesTotal,A.ByteSize.formatSize(H)):K=(0,t.localize)(23,null,P,A.ByteSize.formatSize(U.fileBytesDownloaded),A.ByteSize.formatSize(V),A.ByteSize.formatSize(H)),U.progressScheduler.work({message:K})}async doDownloadNative(P,V,z){V.report({message:P.name});const U=(0,c.joinPath)(P.isDirectory?await this.fileDialogService.defaultFolderPath(h.Schemas.file):await this.fileDialogService.defaultFilePath(h.Schemas.file),P.name),H=await this.fileDialogService.showSaveDialog({availableFileSystems:[h.Schemas.file],saveLabel:(0,g.mnemonicButtonLabel)((0,t.localize)(24,null)),title:(0,t.localize)(25,null),defaultUri:U});H?await this.explorerService.applyBulkEdit([new i.ResourceFileEdit(P.resource,H,{overwrite:!0,copy:!0})],{undoLabel:(0,t.localize)(26,null,P.name),progressLabel:(0,t.localize)(27,null,P.name),progressLocation:10}):z.cancel()}};L=Ee([W(0,A.IFileService),W(1,I.IExplorerService),W(2,D.IProgressService),W(3,n.ILogService),W(4,_.IFileDialogService)],L),e.FileDownload=L;function M(B){return{message:(0,t.localize)(28,null,B),detail:(0,t.localize)(29,null),primaryButton:(0,t.localize)(30,null),type:"warning"}}e.getFileOverwriteConfirm=M;function N(B){return B.length>1?{message:(0,t.localize)(31,null,B.length),detail:(0,_.getFileNamesMessage)(B)+` `+(0,t.localize)(32,null),primaryButton:(0,t.localize)(33,null),type:"warning"}:M((0,c.basename)(B[0]))}e.getMultipleFilesOverwriteConfirm=N}),define(ne[511],re([1,0,1579,14,48,19,9,130,36,2,148,23,44,53,5,69,289,61,8,95,42,52,28,7,18,54,26,21,204,15,355,22,10,154,135,11,221,33,43,29,56,140,220,943,88,109,101]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H,K,G,q){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.openFilePreserveFocusHandler=e.pasteFileHandler=e.cutFileHandler=e.copyFileHandler=e.deleteFileHandler=e.moveFileToTrashHandler=e.renameHandler=e.CompareWithClipboardAction=e.validateFileName=e.ShowOpenedFileInNewWindow=e.ShowActiveFileInExplorer=e.FocusFilesExplorer=e.CloseGroupAction=e.SaveAllInGroupAction=e.BaseSaveAllAction=e.ToggleAutoSaveAction=e.GlobalCompareResourcesAction=e.incrementFileName=e.findValidPasteFileTarget=e.UPLOAD_LABEL=e.UPLOAD_COMMAND_ID=e.DOWNLOAD_LABEL=e.DOWNLOAD_COMMAND_ID=e.FileCopiedContext=e.PASTE_FILE_LABEL=e.COPY_FILE_LABEL=e.MOVE_FILE_TO_TRASH_LABEL=e.TRIGGER_RENAME_LABEL=e.NEW_FOLDER_LABEL=e.NEW_FOLDER_COMMAND_ID=e.NEW_FILE_LABEL=e.NEW_FILE_COMMAND_ID=void 0,e.NEW_FILE_COMMAND_ID="explorer.newFile",e.NEW_FILE_LABEL=t.localize(0,null),e.NEW_FOLDER_COMMAND_ID="explorer.newFolder",e.NEW_FOLDER_LABEL=t.localize(1,null),e.TRIGGER_RENAME_LABEL=t.localize(2,null),e.MOVE_FILE_TO_TRASH_LABEL=t.localize(3,null),e.COPY_FILE_LABEL=t.localize(4,null),e.PASTE_FILE_LABEL=t.localize(5,null),e.FileCopiedContext=new h.RawContextKey("fileCopied",!1),e.DOWNLOAD_COMMAND_ID="explorer.download",e.DOWNLOAD_LABEL=t.localize(6,null),e.UPLOAD_COMMAND_ID="explorer.upload",e.UPLOAD_LABEL=t.localize(7,null);const Z="explorer.confirmDelete",j=5e6;function X(Ae,Le){Le.message==="string"&&(Le=Le.message),Ae.error((0,D.toErrorMessage)(Le,!1))}async function Y(Ae,Le){Ae&&(Ae.indexOf("/")>=0||Ae.indexOf("\\")>=0)&&await Le.refresh()}async function $(Ae,Le,Me,We,Ve,Ue,et=!1,Ze=!1){let Fe;Ue?Fe=f.isWindows?t.localize(8,null):t.localize(9,null):Fe=t.localize(10,null);const Qe=A.distinctParents(Ve,rt=>rt.resource),qe=new Set;for(const rt of Qe)for(const it of Le.getDirty(rt.resource))qe.add(it);let Be=!0;if(qe.size){let rt;Qe.length>1?rt=t.localize(11,null):Qe[0].isDirectory?qe.size===1?rt=t.localize(12,null,Qe[0].name):rt=t.localize(13,null,Qe[0].name,qe.size):rt=t.localize(14,null,Qe[0].name),(await Me.confirm({message:rt,type:"warning",detail:t.localize(15,null),primaryButton:Fe})).confirmed?et=!0:Be=!1}if(!Be)return;let Ke;const Xe=Qe.some(rt=>rt.isDirectory)?t.localize(16,null):Qe.length>1?t.localize(17,null):t.localize(18,null);if(et||Ue&&We.getValue(Z)===!1)Ke={confirmed:!0};else if(Ue){let{message:rt,detail:it}=J(Qe);it+=it?` `:"",f.isWindows?it+=Qe.length>1?t.localize(19,null):t.localize(20,null):it+=Qe.length>1?t.localize(21,null):t.localize(22,null),Ke=await Me.confirm({message:rt,detail:it,primaryButton:Fe,checkbox:{label:t.localize(23,null)},type:"question"})}else{let{message:rt,detail:it}=ee(Qe);it+=it?` `:"",it+=Xe,Ke=await Me.confirm({message:rt,detail:it,primaryButton:Fe,type:"warning"})}if(Ke.confirmed&&Ke.checkboxChecked===!0&&await We.updateValue(Z,!1),!!Ke.confirmed)try{const rt=Qe.map(at=>new z.ResourceFileEdit(at.resource,void 0,{recursive:!0,folder:at.isDirectory,ignoreIfNotExists:Ze,skipTrashBin:!Ue,maxSize:j})),it={undoLabel:Qe.length>1?t.localize(24,null,Qe.length):t.localize(25,null,Qe[0].name),progressLabel:Qe.length>1?t.localize(26,null,Qe.length):t.localize(27,null,Qe[0].name)};await Ae.applyBulkEdit(rt,it)}catch(rt){let it,at,ft;if(Ue?(it=f.isWindows?t.localize(28,null):t.localize(29,null),at=Xe,ft=t.localize(30,null)):(it=(0,D.toErrorMessage)(rt,!1),ft=t.localize(31,null)),(await Me.confirm({message:it,detail:at,type:"warning",primaryButton:ft})).confirmed)return Ue&&(Ue=!1),et=!0,Ze=!0,$(Ae,Le,Me,We,Ve,Ue,et,Ze)}}function J(Ae){return te(Ae)?{message:t.localize(32,null,Ae.length),detail:(0,d.getFileNamesMessage)(Ae.map(Le=>Le.resource))}:Ae.length>1?Ae[0].isDirectory?{message:t.localize(33,null,Ae.length),detail:(0,d.getFileNamesMessage)(Ae.map(Le=>Le.resource))}:{message:t.localize(34,null,Ae.length),detail:(0,d.getFileNamesMessage)(Ae.map(Le=>Le.resource))}:Ae[0].isDirectory&&!Ae[0].isSymbolicLink?{message:t.localize(35,null,Ae[0].name),detail:""}:{message:t.localize(36,null,Ae[0].name),detail:""}}function ee(Ae){return te(Ae)?{message:t.localize(37,null,Ae.length),detail:(0,d.getFileNamesMessage)(Ae.map(Le=>Le.resource))}:Ae.length>1?Ae[0].isDirectory?{message:t.localize(38,null,Ae.length),detail:(0,d.getFileNamesMessage)(Ae.map(Le=>Le.resource))}:{message:t.localize(39,null,Ae.length),detail:(0,d.getFileNamesMessage)(Ae.map(Le=>Le.resource))}:Ae[0].isDirectory?{message:t.localize(40,null,Ae[0].name),detail:""}:{message:t.localize(41,null,Ae[0].name),detail:""}}function te(Ae){const Le=Ae.find(We=>We.isDirectory),Me=Ae.find(We=>!We.isDirectory);return!!Le&&!!Me}function se(Ae,Le,Me,We){let Ve=A.basenameOrAuthority(Me.resource),Ue=A.joinPath(Le.resource,Ve);for(;!Me.allowOverwrite&&Ae.findClosest(Ue);)Ve=ie(Ve,!!Me.isDirectory,We),Ue=A.joinPath(Le.resource,Ve);return Ue}e.findValidPasteFileTarget=se;function ie(Ae,Le,Me){if(Me==="simple"){let Be=Ae,Ke="";Le||(Ke=(0,_.extname)(Ae),Be=(0,_.basename)(Ae,Ke));const Xe=/^(.+ copy)( \d+)?$/;return Xe.test(Be)?Be.replace(Xe,(rt,it,at)=>{let ft=at?parseInt(at):1;return ft===0?`${it}`:ft<1073741824?`${it} ${ft+1}`:`${it}${at} copy`})+Ke:`${Be} copy${Ke}`}const We="[\\.\\-_]",Ve=1073741824;let Ue=RegExp("(.*"+We+")(\\d+)(\\..*)$");if(!Le&&Ae.match(Ue))return Ae.replace(Ue,(Be,Ke,Xe,rt)=>{let it=parseInt(Xe);return it<Ve?Ke+String(it+1).padStart(Xe.length,"0")+rt:`${Ke}${Xe}.1${rt}`});let et=RegExp("(\\d+)("+We+".*)(\\..*)$");if(!Le&&Ae.match(et))return Ae.replace(et,(Be,Ke,Xe,rt)=>{let it=parseInt(Ke);return it<Ve?String(it+1).padStart(Ke.length,"0")+Xe+rt:`${Ke}${Xe}.1${rt}`});let Ze=RegExp("(\\d+)(\\..*)$");if(!Le&&Ae.match(Ze))return Ae.replace(Ze,(Be,Ke,Xe)=>{let rt=parseInt(Ke);return rt<Ve?String(rt+1).padStart(Ke.length,"0")+Xe:`${Ke}.1${Xe}`});const Fe=Ae.lastIndexOf(".");if(!Le&&Fe>=0)return`${Ae.substr(0,Fe)}.1${Ae.substr(Fe)}`;let Qe=RegExp("(\\d+)$");if(!Le&&Fe===-1&&Ae.match(Qe))return Ae.replace(Qe,(Be,Ke)=>{let Xe=parseInt(Ke);return Xe<Ve?String(Xe+1).padStart(Ke.length,"0"):`${Ke}.1`});let qe=RegExp("(.*)(\\d*)$");return!Le&&Fe===-1&&Ae.match(qe)?Ae.replace(qe,(Be,Ke,Xe)=>{let rt=parseInt(Xe);return isNaN(rt)&&(rt=0),rt<Ve?Ke+String(rt+1).padStart(Xe.length,"0"):`${Ke}${Xe}.1`}):Le&&Ae.match(/(\d+)$/)?Ae.replace(/(\d+)$/,(Be,...Ke)=>{let Xe=parseInt(Ke[0]);return Xe<Ve?String(Xe+1).padStart(Ke[0].length,"0"):`${Ke[0]}.1`}):Le&&Ae.match(/^(\d+)/)?Ae.replace(/^(\d+)(.*)$/,(Be,...Ke)=>{let Xe=parseInt(Ke[0]);return Xe<Ve?String(Xe+1).padStart(Ke[0].length,"0")+Ke[1]:`${Ke[0]}${Ke[1]}.1`}):`${Ae}.1`}e.incrementFileName=ie;let ce=class extends I.Action{constructor(Le,Me,We,Ve,Ue){super(Le,Me);this.quickInputService=We,this.editorService=Ve,this.textModelService=Ue}async run(){const Le=this.editorService.activeEditor,Me=o.EditorResourceAccessor.getOriginalUri(Le);if(Me&&this.textModelService.canHandleResource(Me)){const We=await this.quickInputService.quickAccess.pick("",{itemActivation:c.ItemActivation.SECOND});if(We?.length===1){const Ve=We[0].resource;k.URI.isUri(Ve)&&this.textModelService.canHandleResource(Ve)&&this.editorService.openEditor({original:{resource:Me},modified:{resource:Ve},options:{pinned:!0}})}}}};ce.ID="workbench.files.action.compareFileWith",ce.LABEL=t.localize(42,null),ce=Ee([W(2,c.IQuickInputService),W(3,b.IEditorService),W(4,l.ITextModelService)],ce),e.GlobalCompareResourcesAction=ce;let le=class extends I.Action{constructor(Le,Me,We){super(Le,Me);this.filesConfigurationService=We}run(){return this.filesConfigurationService.toggleAutoSave()}};le.ID="workbench.action.toggleAutoSave",le.LABEL=t.localize(43,null),le=Ee([W(2,x.IFilesConfigurationService)],le),e.ToggleAutoSaveAction=le;let ae=class extends I.Action{constructor(Le,Me,We,Ve,Ue){super(Le,Me);this.commandService=We,this.notificationService=Ve,this.workingCopyService=Ue,this.lastDirtyState=this.workingCopyService.hasDirty,this.enabled=this.lastDirtyState,this.registerListeners()}registerListeners(){this._register(this.workingCopyService.onDidChangeDirty(Le=>this.updateEnablement(Le)))}updateEnablement(Le){const Me=Le.isDirty()||this.workingCopyService.hasDirty;this.lastDirtyState!==Me&&(this.enabled=Me,this.lastDirtyState=this.enabled)}async run(Le){try{await this.doRun(Le)}catch(Me){X(this.notificationService,Me)}}};ae=Ee([W(2,n.ICommandService),W(3,m.INotificationService),W(4,F.IWorkingCopyService)],ae),e.BaseSaveAllAction=ae;class ue extends ae{get class(){return"explorer-action "+N.Codicon.saveAll.classNames}doRun(Le){return this.commandService.executeCommand(s.SAVE_ALL_IN_GROUP_COMMAND_ID,{},Le)}}e.SaveAllInGroupAction=ue,ue.ID="workbench.files.action.saveAllInGroup",ue.LABEL=t.localize(44,null);let oe=class extends I.Action{constructor(Le,Me,We){super(Le,Me,N.Codicon.closeAll.classNames);this.commandService=We}run(Le){return this.commandService.executeCommand(E.CLOSE_EDITORS_AND_GROUP_COMMAND_ID,{},Le)}};oe.ID="workbench.files.action.closeGroup",oe.LABEL=t.localize(45,null),oe=Ee([W(2,n.ICommandService)],oe),e.CloseGroupAction=oe;let fe=class extends I.Action{constructor(Le,Me,We){super(Le,Me);this.paneCompositeService=We}async run(){await this.paneCompositeService.openPaneComposite(v.VIEWLET_ID,0,!0)}};fe.ID="workbench.files.action.focusFilesExplorer",fe.LABEL=t.localize(46,null),fe=Ee([W(2,K.IPaneCompositePartService)],fe),e.FocusFilesExplorer=fe;let pe=class extends I.Action{constructor(Le,Me,We,Ve){super(Le,Me);this.editorService=We,this.commandService=Ve}async run(){const Le=o.EditorResourceAccessor.getOriginalUri(this.editorService.activeEditor,{supportSideBySide:o.SideBySideEditor.PRIMARY});Le&&this.commandService.executeCommand(s.REVEAL_IN_EXPLORER_COMMAND_ID,Le)}};pe.ID="workbench.files.action.showActiveFileInExplorer",pe.LABEL=t.localize(47,null),pe=Ee([W(2,b.IEditorService),W(3,n.ICommandService)],pe),e.ShowActiveFileInExplorer=pe;let me=class extends I.Action{constructor(Le,Me,We,Ve,Ue,et){super(Le,Me);this.editorService=We,this.hostService=Ve,this.dialogService=Ue,this.fileService=et}async run(){const Le=o.EditorResourceAccessor.getOriginalUri(this.editorService.activeEditor,{supportSideBySide:o.SideBySideEditor.PRIMARY});Le&&(this.fileService.hasProvider(Le)?this.hostService.openWindow([{fileUri:Le}],{forceNewWindow:!0}):this.dialogService.show(m.Severity.Error,t.localize(49,null)))}};me.ID="workbench.action.files.showOpenedFileInNewWindow",me.LABEL=t.localize(48,null),me=Ee([W(2,b.IEditorService),W(3,S.IHostService),W(4,d.IDialogService),W(5,C.IFileService)],me),e.ShowOpenedFileInNewWindow=me;function be(Ae,Le,Me,We){if(Me=ve(Me),!Me||Me.length===0||/^\s+$/.test(Me))return{content:t.localize(50,null),severity:m.Severity.Error};if(Me[0]==="/"||Me[0]==="\\")return{content:t.localize(51,null),severity:m.Severity.Error};const Ve=(0,y.coalesce)(Me.split(/[\\/]/)),Ue=Le.parent;if(Me!==Le.name){const et=Ue?.getChild(Me);if(et&&et!==Le)return{content:t.localize(52,null,Me),severity:m.Severity.Error}}return Ve.some(et=>!Ae.hasValidBasename(Le.resource,We,et))?{content:t.localize(53,null,Ce(Me)),severity:m.Severity.Error}:Ve.some(et=>/^\s|\s$/.test(et))?{content:t.localize(54,null),severity:m.Severity.Warning}:null}e.validateFileName=be;function Ce(Ae){return Ae?.length>255?`${Ae.substr(0,255)}...`:Ae}function ve(Ae){return Ae&&(Ae=(0,P.trim)(Ae," "),Ae=(0,P.rtrim)(Ae,"/"),Ae=(0,P.rtrim)(Ae,"\\"),Ae)}let he=class Sl extends I.Action{constructor(Le,Me,We,Ve,Ue,et){super(Le,Me);this.editorService=We,this.instantiationService=Ve,this.textModelService=Ue,this.fileService=et,this.enabled=!0}async run(){const Le=o.EditorResourceAccessor.getOriginalUri(this.editorService.activeEditor,{supportSideBySide:o.SideBySideEditor.PRIMARY}),Me=`clipboardCompare${Sl.SCHEME_COUNTER++}`;if(Le&&(this.fileService.hasProvider(Le)||Le.scheme===g.Schemas.untitled)){if(!this.registrationDisposal){const Ue=this.instantiationService.createInstance(ge);this.registrationDisposal=this.textModelService.registerTextModelContentProvider(Me,Ue)}const We=A.basename(Le),Ve=t.localize(56,null,We);await this.editorService.openEditor({original:{resource:Le.with({scheme:Me})},modified:{resource:Le},label:Ve,options:{pinned:!0}}).finally(()=>{(0,w.dispose)(this.registrationDisposal),this.registrationDisposal=void 0})}}dispose(){super.dispose(),(0,w.dispose)(this.registrationDisposal),this.registrationDisposal=void 0}};he.ID="workbench.files.action.compareWithClipboard",he.LABEL=t.localize(55,null),he.SCHEME_COUNTER=0,he=Ee([W(2,b.IEditorService),W(3,i.IInstantiationService),W(4,l.ITextModelService),W(5,C.IFileService)],he),e.CompareWithClipboardAction=he;let ge=class{constructor(Le,Me,We){this.clipboardService=Le,this.languageService=Me,this.modelService=We}async provideTextContent(Le){const Me=await this.clipboardService.readText();return this.modelService.createModel(Me,this.languageService.createByFilepathOrFirstLine(Le),Le)}};ge=Ee([W(0,p.IClipboardService),W(1,u.ILanguageService),W(2,a.IModelService)],ge);function de(Ae,Le,Me){Ae.prompt(m.Severity.Error,(0,D.toErrorMessage)(Le,!1),[{label:t.localize(57,null),run:()=>Me()}])}async function Se(Ae,Le){const Me=Ae.get(U.IExplorerService),We=Ae.get(C.IFileService),Ve=Ae.get(r.IConfigurationService),Ue=Ae.get(b.IEditorService),et=Ae.get(B.IViewsService),Ze=Ae.get(m.INotificationService),Fe=Ae.get(G.IRemoteAgentService),Qe=Ae.get(n.ICommandService),qe=Ae.get(q.IPathService),Be=!et.isViewVisible(v.VIEW_ID),Ke=await et.openView(v.VIEW_ID,!0);if(Be&&await(0,L.timeout)(500),!Ke){if(Le)throw new Error("Open a folder or workspace first.");return Qe.executeCommand(s.NEW_UNTITLED_FILE_COMMAND_ID)}const Xe=Me.getContext(!1),rt=Xe.length>0?Xe[0]:void 0;let it;if(rt?it=rt.isDirectory?rt:rt.parent||Me.roots[0]:it=Me.roots[0],it.isReadonly)throw new Error("Parent folder is readonly.");const at=new T.NewExplorerItem(We,Ve,it,Le);it.addChild(at);const ft=async Dt=>{try{const kt=A.joinPath(it.resource,Dt);await Me.applyBulkEdit([new z.ResourceFileEdit(void 0,kt,{folder:Le})],{undoLabel:t.localize(58,null,Dt),progressLabel:t.localize(59,null,Dt),confirmBeforeUndo:!0}),await Y(Dt,Me),Le?await Me.select(kt,!0):await Ue.openEditor({resource:kt,options:{pinned:!0}})}catch(kt){de(Ze,kt,()=>ft(Dt))}},vt=(await Fe.getEnvironment())?.os??f.OS;await Me.setEditable(at,{validationMessage:Dt=>be(qe,at,Dt,vt),onFinish:async(Dt,kt)=>{it.removeChild(at),await Me.setEditable(at,null),kt&&ft(Dt)}})}n.CommandsRegistry.registerCommand({id:e.NEW_FILE_COMMAND_ID,handler:async Ae=>{await Se(Ae,!1)}}),n.CommandsRegistry.registerCommand({id:e.NEW_FOLDER_COMMAND_ID,handler:async Ae=>{await Se(Ae,!0)}});const we=async Ae=>{const Le=Ae.get(U.IExplorerService),Me=Ae.get(m.INotificationService),We=Ae.get(G.IRemoteAgentService),Ve=Ae.get(q.IPathService),Ue=Ae.get(r.IConfigurationService),et=Le.getContext(!1),Ze=et.length>0?et[0]:void 0;if(!Ze)return;const Fe=(await We.getEnvironment())?.os??f.OS;await Le.setEditable(Ze,{validationMessage:Qe=>be(Ve,Ze,Qe,Fe),onFinish:async(Qe,qe)=>{if(qe){const Be=Ze.parent.resource,Ke=A.joinPath(Be,Qe);if(Ze.resource.toString()!==Ke.toString())try{await Le.applyBulkEdit([new z.ResourceFileEdit(Ze.resource,Ke)],{confirmBeforeUndo:Ue.getValue().explorer.confirmUndo==="verbose",undoLabel:t.localize(60,null,Ze.name,Qe),progressLabel:t.localize(61,null,Ze.name,Qe)}),await Y(Qe,Le)}catch(Xe){Me.error(Xe)}}await Le.setEditable(Ze,null)}})};e.renameHandler=we;const ye=async Ae=>{const Le=Ae.get(U.IExplorerService),We=Ae.get(r.IConfigurationService).getValue().explorer.experimental.fileNesting.operateAsGroup,Ve=Le.getContext(!0,We).filter(Ue=>!Ue.isRoot);Ve.length&&await $(Ae.get(U.IExplorerService),Ae.get(M.IWorkingCopyFileService),Ae.get(d.IDialogService),Ae.get(r.IConfigurationService),Ve,!0)};e.moveFileToTrashHandler=ye;const ke=async Ae=>{const Le=Ae.get(U.IExplorerService),We=Ae.get(r.IConfigurationService).getValue().explorer.experimental.fileNesting.operateAsGroup,Ve=Le.getContext(!0,We).filter(Ue=>!Ue.isRoot);Ve.length&&await $(Ae.get(U.IExplorerService),Ae.get(M.IWorkingCopyFileService),Ae.get(d.IDialogService),Ae.get(r.IConfigurationService),Ve,!1)};e.deleteFileHandler=ke;let Ie=!1;const Te=async Ae=>{const Le=Ae.get(U.IExplorerService),We=Ae.get(r.IConfigurationService).getValue().explorer.experimental.fileNesting.operateAsGroup,Ve=Le.getContext(!0,We);Ve.length>0&&(await Le.setToCopy(Ve,!1),Ie=!1)};e.copyFileHandler=Te;const De=async Ae=>{const Le=Ae.get(U.IExplorerService),We=Ae.get(r.IConfigurationService).getValue().explorer.experimental.fileNesting.operateAsGroup,Ve=Le.getContext(!0,We);Ve.length>0&&(await Le.setToCopy(Ve,!0),Ie=!0)};e.cutFileHandler=De;const _e=async Ae=>{const Le=Ae.get(U.IExplorerService),Me=Ae.get(m.INotificationService),We=Ae.get(i.IInstantiationService),Ve=Le.getContext(!0),Ue=Ve.length?Ve:Le.roots,et=We.createInstance(H.FileDownload);try{await et.download(Ue)}catch(Ze){throw Me.error(Ze),Ze}};n.CommandsRegistry.registerCommand({id:e.DOWNLOAD_COMMAND_ID,handler:_e});const Re=async Ae=>{const Le=Ae.get(U.IExplorerService),Me=Ae.get(m.INotificationService),We=Ae.get(i.IInstantiationService),Ve=Le.getContext(!0),Ue=Ve.length?Ve[0]:Le.roots[0];try{const et=await(0,O.triggerUpload)();et&&await We.createInstance(H.BrowserFileUpload).upload(Ue,et)}catch(et){throw Me.error(et),et}};n.CommandsRegistry.registerCommand({id:e.UPLOAD_COMMAND_ID,handler:Re});const Ne=async Ae=>{const Le=Ae.get(p.IClipboardService),Me=Ae.get(U.IExplorerService),We=Ae.get(C.IFileService),Ve=Ae.get(m.INotificationService),Ue=Ae.get(b.IEditorService),et=Ae.get(r.IConfigurationService),Ze=Ae.get(V.IUriIdentityService),Fe=Me.getContext(!0),Qe=A.distinctParents(await Le.readResources(),Be=>Be),qe=Fe.length?Fe[0]:Me.roots[0];try{const Be=await Promise.all(Qe.map(async Ke=>{if(qe.resource.toString()!==Ke.toString()&&A.isEqualOrParent(qe.resource,Ke))throw new Error(t.localize(62,null));const Xe=await We.stat(Ke);let rt;Ze.extUri.isEqual(qe.resource,Ke)?rt=qe.parent:rt=qe.isDirectory?qe:qe.parent;const it=et.getValue().explorer.incrementalNaming,at=se(Me,rt,{resource:Ke,isDirectory:Xe.isDirectory,allowOverwrite:Ie},it);return{source:Ke,target:at}}));if(Be.length>=1){if(Ie){const Xe=Be.map(it=>new z.ResourceFileEdit(it.source,it.target)),rt={confirmBeforeUndo:et.getValue().explorer.confirmUndo==="verbose",progressLabel:Be.length>1?t.localize(63,null,Be.length):t.localize(64,null,A.basenameOrAuthority(Be[0].target)),undoLabel:Be.length>1?t.localize(65,null,Be.length):t.localize(66,null,A.basenameOrAuthority(Be[0].target))};await Me.applyBulkEdit(Xe,rt)}else{const Xe=Be.map(at=>new z.ResourceFileEdit(at.source,at.target,{copy:!0})),rt=et.getValue().explorer.confirmUndo,it={confirmBeforeUndo:rt==="default"||rt==="verbose",progressLabel:Be.length>1?t.localize(67,null,Be.length):t.localize(68,null,A.basenameOrAuthority(Be[0].target)),undoLabel:Be.length>1?t.localize(69,null,Be.length):t.localize(70,null,A.basenameOrAuthority(Be[0].target))};await Me.applyBulkEdit(Xe,it)}const Ke=Be[0];if(await Me.select(Ke.target),Be.length===1){const Xe=Me.findClosest(Ke.target);Xe&&!Xe.isDirectory&&await Ue.openEditor({resource:Xe.resource,options:{pinned:!0,preserveFocus:!0}})}}}catch(Be){X(Ve,new Error(t.localize(71,null,(0,R.getErrorMessage)(Be))))}finally{Ie&&(await Me.setToCopy([],!1),Ie=!1)}};e.pasteFileHandler=Ne;const xe=async Ae=>{const Le=Ae.get(b.IEditorService),We=Ae.get(U.IExplorerService).getContext(!0);await Le.openEditors(We.filter(Ve=>!Ve.isDirectory).map(Ve=>({resource:Ve.resource,options:{preserveFocus:!0}})))};e.openFilePreserveFocusHandler=xe}),define(ne[944],re([1,0,1580,17,511,903,16,70,97,2758,289,28,7,94,148,376,204,154,71,18,74,141,220,33]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.appendToCommandPalette=e.appendEditorTitleContextMenuItem=void 0;const g={value:t.localize(0,null),original:"File"},d=f.Registry.as(D.Extensions.WorkbenchActions);d.registerWorkbenchAction(k.SyncActionDescriptor.from(_.GlobalCompareResourcesAction),"File: Compare Active File With...",g.value,u.ActiveEditorContext),d.registerWorkbenchAction(k.SyncActionDescriptor.from(_.FocusFilesExplorer),"File: Focus on Files Explorer",g.value),d.registerWorkbenchAction(k.SyncActionDescriptor.from(_.ShowActiveFileInExplorer),"File: Reveal Active File in Explorer View",g.value),d.registerWorkbenchAction(k.SyncActionDescriptor.from(_.CompareWithClipboardAction,{primary:(0,I.KeyChord)(2048|41,33)}),"File: Compare Active File with Clipboard",g.value),d.registerWorkbenchAction(k.SyncActionDescriptor.from(_.ToggleAutoSaveAction),"File: Toggle Auto Save",g.value),d.registerWorkbenchAction(k.SyncActionDescriptor.from(_.ShowOpenedFileInNewWindow,{primary:(0,I.KeyChord)(2048|41,45)}),"File: Open Active File in New Window",g.value,u.EmptyWorkspaceSupportContext),C.CommandsRegistry.registerCommand("_files.windowOpen",w.openWindowCommand),C.CommandsRegistry.registerCommand("_files.newWindow",w.newWindowCommand);const m=10,b="renameFile";c.KeybindingsRegistry.registerCommandAndKeybindingRule({id:b,weight:200+m,when:o.ContextKeyExpr.and(i.FilesExplorerFocusCondition,i.ExplorerRootContext.toNegated(),i.ExplorerResourceNotReadonlyContext),primary:60,mac:{primary:3},handler:_.renameHandler});const E="moveFileToTrash";c.KeybindingsRegistry.registerCommandAndKeybindingRule({id:E,weight:200+m,when:o.ContextKeyExpr.and(i.FilesExplorerFocusCondition,i.ExplorerResourceNotReadonlyContext,i.ExplorerResourceMoveableToTrash),primary:20,mac:{primary:2048|1,secondary:[20]},handler:_.moveFileToTrashHandler});const y="deleteFile";c.KeybindingsRegistry.registerCommandAndKeybindingRule({id:y,weight:200+m,when:o.ContextKeyExpr.and(i.FilesExplorerFocusCondition,i.ExplorerResourceNotReadonlyContext),primary:1024|20,mac:{primary:2048|512|1},handler:_.deleteFileHandler}),c.KeybindingsRegistry.registerCommandAndKeybindingRule({id:y,weight:200+m,when:o.ContextKeyExpr.and(i.FilesExplorerFocusCondition,i.ExplorerResourceNotReadonlyContext,i.ExplorerResourceMoveableToTrash.toNegated()),primary:20,mac:{primary:2048|1},handler:_.deleteFileHandler});const T="filesExplorer.cut";c.KeybindingsRegistry.registerCommandAndKeybindingRule({id:T,weight:200+m,when:o.ContextKeyExpr.and(i.FilesExplorerFocusCondition,i.ExplorerRootContext.toNegated(),i.ExplorerResourceNotReadonlyContext),primary:2048|54,handler:_.cutFileHandler});const R="filesExplorer.copy";c.KeybindingsRegistry.registerCommandAndKeybindingRule({id:R,weight:200+m,when:o.ContextKeyExpr.and(i.FilesExplorerFocusCondition,i.ExplorerRootContext.toNegated()),primary:2048|33,handler:_.copyFileHandler});const O="filesExplorer.paste";c.KeybindingsRegistry.registerCommandAndKeybindingRule({id:O,weight:200+m,when:o.ContextKeyExpr.and(i.FilesExplorerFocusCondition,i.ExplorerResourceNotReadonlyContext),primary:2048|52,handler:_.pasteFileHandler}),c.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"filesExplorer.cancelCut",weight:200+m,when:o.ContextKeyExpr.and(i.FilesExplorerFocusCondition,i.ExplorerResourceCut),primary:9,handler:async H=>{await H.get(n.IExplorerService).setToCopy([],!0)}}),c.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"filesExplorer.openFilePreserveFocus",weight:200+m,when:o.ContextKeyExpr.and(i.FilesExplorerFocusCondition,i.ExplorerFolderContext.toNegated()),primary:10,handler:_.openFilePreserveFocusHandler});const x={id:v.COPY_PATH_COMMAND_ID,title:t.localize(1,null)},F={id:v.COPY_RELATIVE_PATH_COMMAND_ID,title:t.localize(2,null)};L(v.COPY_PATH_COMMAND_ID,x.title,u.ResourceContextKey.IsFileSystemResource,"1_cutcopypaste"),L(v.COPY_RELATIVE_PATH_COMMAND_ID,F.title,u.ResourceContextKey.IsFileSystemResource,"1_cutcopypaste"),L(v.REVEAL_IN_EXPLORER_COMMAND_ID,t.localize(3,null),u.ResourceContextKey.IsFileSystemResource);function L(H,K,G,q){k.MenuRegistry.appendMenuItem(k.MenuId.EditorTitleContext,{command:{id:H,title:K},when:G,group:q||"2_files"})}e.appendEditorTitleContextMenuItem=L,M("workbench.files.action.acceptLocalChanges",t.localize(4,null),h.Codicon.check,-10,A.acceptLocalChangesCommand),M("workbench.files.action.revertLocalChanges",t.localize(5,null),h.Codicon.discard,-9,A.revertLocalChangesCommand);function M(H,K,G,q,Z){C.CommandsRegistry.registerCommand(H,Z),k.MenuRegistry.appendMenuItem(k.MenuId.EditorTitle,{command:{id:H,title:K,icon:G},when:o.ContextKeyExpr.equals(A.CONFLICT_RESOLUTION_CONTEXT,!0),group:"navigation",order:q})}function N(H,K,G,q){k.MenuRegistry.appendMenuItem(k.MenuId.CommandPalette,{command:{id:H,title:K,category:G},when:q})}e.appendToCommandPalette=N,N(v.COPY_PATH_COMMAND_ID,{value:t.localize(6,null),original:"Copy Path of Active File"},g),N(v.COPY_RELATIVE_PATH_COMMAND_ID,{value:t.localize(7,null),original:"Copy Relative Path of Active File"},g),N(v.SAVE_FILE_COMMAND_ID,{value:v.SAVE_FILE_LABEL,original:"Save"},g),N(v.SAVE_FILE_WITHOUT_FORMATTING_COMMAND_ID,{value:v.SAVE_FILE_WITHOUT_FORMATTING_LABEL,original:"Save without Formatting"},g),N(v.SAVE_ALL_IN_GROUP_COMMAND_ID,{value:t.localize(8,null),original:"Save All in Group"},g),N(v.SAVE_FILES_COMMAND_ID,{value:t.localize(9,null),original:"Save All Files"},g),N(v.REVERT_FILE_COMMAND_ID,{value:t.localize(10,null),original:"Revert File"},g),N(v.COMPARE_WITH_SAVED_COMMAND_ID,{value:t.localize(11,null),original:"Compare Active File with Saved"},g),N(v.SAVE_FILE_AS_COMMAND_ID,{value:v.SAVE_FILE_AS_LABEL,original:"Save As..."},g),N(_.NEW_FILE_COMMAND_ID,{value:_.NEW_FILE_LABEL,original:"New File"},g,u.WorkspaceFolderCountContext.notEqualsTo("0")),N(_.NEW_FOLDER_COMMAND_ID,{value:_.NEW_FOLDER_LABEL,original:"New Folder"},g,u.WorkspaceFolderCountContext.notEqualsTo("0")),N(v.NEW_UNTITLED_FILE_COMMAND_ID,{value:v.NEW_UNTITLED_FILE_LABEL,original:"New Untitled File"},g);const B=o.ContextKeyExpr.or(u.ResourceContextKey.IsFileSystemResource,u.ResourceContextKey.Scheme.isEqualTo(p.Schemas.untitled)),P={id:v.OPEN_TO_SIDE_COMMAND_ID,title:t.localize(12,null)};k.MenuRegistry.appendMenuItem(k.MenuId.OpenEditorsContext,{group:"navigation",order:10,command:P,when:B}),k.MenuRegistry.appendMenuItem(k.MenuId.OpenEditorsContext,{group:"1_cutcopypaste",order:10,command:x,when:u.ResourceContextKey.IsFileSystemResource}),k.MenuRegistry.appendMenuItem(k.MenuId.OpenEditorsContext,{group:"1_cutcopypaste",order:20,command:F,when:u.ResourceContextKey.IsFileSystemResource}),k.MenuRegistry.appendMenuItem(k.MenuId.OpenEditorsContext,{group:"2_save",order:10,command:{id:v.SAVE_FILE_COMMAND_ID,title:v.SAVE_FILE_LABEL,precondition:v.OpenEditorsDirtyEditorContext},when:o.ContextKeyExpr.or(u.ResourceContextKey.Scheme.isEqualTo(p.Schemas.untitled),o.ContextKeyExpr.and(v.OpenEditorsGroupContext.toNegated(),v.OpenEditorsReadonlyEditorContext.toNegated(),l.AutoSaveAfterShortDelayContext.toNegated()))}),k.MenuRegistry.appendMenuItem(k.MenuId.OpenEditorsContext,{group:"2_save",order:20,command:{id:v.REVERT_FILE_COMMAND_ID,title:t.localize(13,null),precondition:v.OpenEditorsDirtyEditorContext},when:o.ContextKeyExpr.and(v.OpenEditorsGroupContext.toNegated(),v.OpenEditorsReadonlyEditorContext.toNegated(),u.ResourceContextKey.Scheme.notEqualsTo(p.Schemas.untitled),l.AutoSaveAfterShortDelayContext.toNegated())}),k.MenuRegistry.appendMenuItem(k.MenuId.OpenEditorsContext,{group:"2_save",order:30,command:{id:v.SAVE_ALL_IN_GROUP_COMMAND_ID,title:t.localize(14,null),precondition:u.DirtyWorkingCopiesContext},when:v.OpenEditorsGroupContext}),k.MenuRegistry.appendMenuItem(k.MenuId.OpenEditorsContext,{group:"3_compare",order:10,command:{id:v.COMPARE_WITH_SAVED_COMMAND_ID,title:t.localize(15,null),precondition:v.OpenEditorsDirtyEditorContext},when:o.ContextKeyExpr.and(u.ResourceContextKey.IsFileSystemResource,l.AutoSaveAfterShortDelayContext.toNegated(),r.WorkbenchListDoubleSelection.toNegated())});const V={id:v.COMPARE_RESOURCE_COMMAND_ID,title:t.localize(16,null)};k.MenuRegistry.appendMenuItem(k.MenuId.OpenEditorsContext,{group:"3_compare",order:20,command:V,when:o.ContextKeyExpr.and(u.ResourceContextKey.HasResource,v.ResourceSelectedForCompareContext,B,r.WorkbenchListDoubleSelection.toNegated())});const z={id:v.SELECT_FOR_COMPARE_COMMAND_ID,title:t.localize(17,null)};k.MenuRegistry.appendMenuItem(k.MenuId.OpenEditorsContext,{group:"3_compare",order:30,command:z,when:o.ContextKeyExpr.and(u.ResourceContextKey.HasResource,B,r.WorkbenchListDoubleSelection.toNegated())});const U={id:v.COMPARE_SELECTED_COMMAND_ID,title:t.localize(18,null)};k.MenuRegistry.appendMenuItem(k.MenuId.OpenEditorsContext,{group:"3_compare",order:30,command:U,when:o.ContextKeyExpr.and(u.ResourceContextKey.HasResource,r.WorkbenchListDoubleSelection,B)}),k.MenuRegistry.appendMenuItem(k.MenuId.OpenEditorsContext,{group:"4_close",order:10,command:{id:s.CLOSE_EDITOR_COMMAND_ID,title:t.localize(19,null)},when:v.OpenEditorsGroupContext.toNegated()}),k.MenuRegistry.appendMenuItem(k.MenuId.OpenEditorsContext,{group:"4_close",order:20,command:{id:s.CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID,title:t.localize(20,null)},when:v.OpenEditorsGroupContext.toNegated()}),k.MenuRegistry.appendMenuItem(k.MenuId.OpenEditorsContext,{group:"4_close",order:30,command:{id:s.CLOSE_SAVED_EDITORS_COMMAND_ID,title:t.localize(21,null)}}),k.MenuRegistry.appendMenuItem(k.MenuId.OpenEditorsContext,{group:"4_close",order:40,command:{id:s.CLOSE_EDITORS_IN_GROUP_COMMAND_ID,title:t.localize(22,null)}}),k.MenuRegistry.appendMenuItem(k.MenuId.ExplorerContext,{group:"navigation",order:4,command:{id:_.NEW_FILE_COMMAND_ID,title:_.NEW_FILE_LABEL,precondition:i.ExplorerResourceNotReadonlyContext},when:i.ExplorerFolderContext}),k.MenuRegistry.appendMenuItem(k.MenuId.ExplorerContext,{group:"navigation",order:6,command:{id:_.NEW_FOLDER_COMMAND_ID,title:_.NEW_FOLDER_LABEL,precondition:i.ExplorerResourceNotReadonlyContext},when:i.ExplorerFolderContext}),k.MenuRegistry.appendMenuItem(k.MenuId.ExplorerContext,{group:"navigation",order:10,command:P,when:o.ContextKeyExpr.and(i.ExplorerFolderContext.toNegated(),u.ResourceContextKey.HasResource)}),k.MenuRegistry.appendMenuItem(k.MenuId.ExplorerContext,{group:"navigation",order:20,command:{id:v.OPEN_WITH_EXPLORER_COMMAND_ID,title:t.localize(23,null)},when:o.ContextKeyExpr.and(i.ExplorerFolderContext.toNegated(),i.ExplorerResourceAvailableEditorIdsContext)}),k.MenuRegistry.appendMenuItem(k.MenuId.ExplorerContext,{group:"3_compare",order:20,command:V,when:o.ContextKeyExpr.and(i.ExplorerFolderContext.toNegated(),u.ResourceContextKey.HasResource,v.ResourceSelectedForCompareContext,r.WorkbenchListDoubleSelection.toNegated())}),k.MenuRegistry.appendMenuItem(k.MenuId.ExplorerContext,{group:"3_compare",order:30,command:z,when:o.ContextKeyExpr.and(i.ExplorerFolderContext.toNegated(),u.ResourceContextKey.HasResource,r.WorkbenchListDoubleSelection.toNegated())}),k.MenuRegistry.appendMenuItem(k.MenuId.ExplorerContext,{group:"3_compare",order:30,command:U,when:o.ContextKeyExpr.and(i.ExplorerFolderContext.toNegated(),u.ResourceContextKey.HasResource,r.WorkbenchListDoubleSelection)}),k.MenuRegistry.appendMenuItem(k.MenuId.ExplorerContext,{group:"5_cutcopypaste",order:8,command:{id:T,title:t.localize(24,null)},when:o.ContextKeyExpr.and(i.ExplorerRootContext.toNegated(),i.ExplorerResourceNotReadonlyContext)}),k.MenuRegistry.appendMenuItem(k.MenuId.ExplorerContext,{group:"5_cutcopypaste",order:10,command:{id:R,title:_.COPY_FILE_LABEL},when:i.ExplorerRootContext.toNegated()}),k.MenuRegistry.appendMenuItem(k.MenuId.ExplorerContext,{group:"5_cutcopypaste",order:20,command:{id:O,title:_.PASTE_FILE_LABEL,precondition:o.ContextKeyExpr.and(i.ExplorerResourceNotReadonlyContext,_.FileCopiedContext)},when:i.ExplorerFolderContext}),k.MenuRegistry.appendMenuItem(k.MenuId.ExplorerContext,{group:"5b_importexport",order:10,command:{id:_.DOWNLOAD_COMMAND_ID,title:_.DOWNLOAD_LABEL},when:o.ContextKeyExpr.or(o.ContextKeyExpr.and(a.IsWebContext.toNegated(),u.ResourceContextKey.Scheme.notEqualsTo(p.Schemas.file)),o.ContextKeyExpr.and(a.IsWebContext,i.ExplorerFolderContext.toNegated(),i.ExplorerRootContext.toNegated()),o.ContextKeyExpr.and(a.IsWebContext,u.HasWebFileSystemAccess))}),k.MenuRegistry.appendMenuItem(k.MenuId.ExplorerContext,{group:"5b_importexport",order:20,command:{id:_.UPLOAD_COMMAND_ID,title:_.UPLOAD_LABEL},when:o.ContextKeyExpr.and(a.IsWebContext,i.ExplorerFolderContext,i.ExplorerResourceNotReadonlyContext)}),k.MenuRegistry.appendMenuItem(k.MenuId.ExplorerContext,{group:"6_copypath",order:10,command:x,when:u.ResourceContextKey.IsFileSystemResource}),k.MenuRegistry.appendMenuItem(k.MenuId.ExplorerContext,{group:"6_copypath",order:20,command:F,when:u.ResourceContextKey.IsFileSystemResource}),k.MenuRegistry.appendMenuItem(k.MenuId.ExplorerContext,{group:"2_workspace",order:10,command:{id:S.ADD_ROOT_FOLDER_COMMAND_ID,title:S.ADD_ROOT_FOLDER_LABEL},when:o.ContextKeyExpr.and(i.ExplorerRootContext,o.ContextKeyExpr.or(u.EnterMultiRootWorkspaceSupportContext,u.WorkbenchStateContext.isEqualTo("workspace")))}),k.MenuRegistry.appendMenuItem(k.MenuId.ExplorerContext,{group:"2_workspace",order:30,command:{id:v.REMOVE_ROOT_FOLDER_COMMAND_ID,title:v.REMOVE_ROOT_FOLDER_LABEL},when:o.ContextKeyExpr.and(i.ExplorerRootContext,i.ExplorerFolderContext,o.ContextKeyExpr.and(u.WorkspaceFolderCountContext.notEqualsTo("0"),o.ContextKeyExpr.or(u.EnterMultiRootWorkspaceSupportContext,u.WorkbenchStateContext.isEqualTo("workspace"))))}),k.MenuRegistry.appendMenuItem(k.MenuId.ExplorerContext,{group:"7_modification",order:10,command:{id:b,title:_.TRIGGER_RENAME_LABEL,precondition:i.ExplorerResourceNotReadonlyContext},when:i.ExplorerRootContext.toNegated()}),k.MenuRegistry.appendMenuItem(k.MenuId.ExplorerContext,{group:"7_modification",order:20,command:{id:E,title:_.MOVE_FILE_TO_TRASH_LABEL,precondition:i.ExplorerResourceNotReadonlyContext},alt:{id:y,title:t.localize(25,null),precondition:i.ExplorerResourceNotReadonlyContext},when:o.ContextKeyExpr.and(i.ExplorerRootContext.toNegated(),i.ExplorerResourceMoveableToTrash)}),k.MenuRegistry.appendMenuItem(k.MenuId.ExplorerContext,{group:"7_modification",order:20,command:{id:y,title:t.localize(26,null),precondition:i.ExplorerResourceNotReadonlyContext},when:o.ContextKeyExpr.and(i.ExplorerRootContext.toNegated(),i.ExplorerResourceMoveableToTrash.toNegated())}),k.MenuRegistry.appendMenuItem(k.MenuId.EmptyEditorGroupContext,{command:{id:v.NEW_UNTITLED_FILE_COMMAND_ID,title:t.localize(27,null)},group:"1_file",order:10}),k.MenuRegistry.appendMenuItem(k.MenuId.EmptyEditorGroupContext,{command:{id:"workbench.action.quickOpen",title:t.localize(28,null)},group:"1_file",order:20}),k.MenuRegistry.appendMenuItem(k.MenuId.MenubarFileMenu,{group:"1_new",command:{id:v.NEW_UNTITLED_FILE_COMMAND_ID,title:t.localize(29,null)},order:1}),k.MenuRegistry.appendMenuItem(k.MenuId.MenubarFileMenu,{group:"4_save",command:{id:v.SAVE_FILE_COMMAND_ID,title:t.localize(30,null),precondition:o.ContextKeyExpr.or(u.ActiveEditorContext,o.ContextKeyExpr.and(i.ExplorerViewletVisibleContext,u.SidebarFocusContext))},order:1}),k.MenuRegistry.appendMenuItem(k.MenuId.MenubarFileMenu,{group:"4_save",command:{id:v.SAVE_FILE_AS_COMMAND_ID,title:t.localize(31,null),precondition:o.ContextKeyExpr.or(u.ActiveEditorContext,o.ContextKeyExpr.and(i.ExplorerViewletVisibleContext,u.SidebarFocusContext))},order:2}),k.MenuRegistry.appendMenuItem(k.MenuId.MenubarFileMenu,{group:"4_save",command:{id:v.SAVE_ALL_COMMAND_ID,title:t.localize(32,null),precondition:u.DirtyWorkingCopiesContext},order:3}),k.MenuRegistry.appendMenuItem(k.MenuId.MenubarFileMenu,{group:"5_autosave",command:{id:_.ToggleAutoSaveAction.ID,title:t.localize(33,null),toggled:o.ContextKeyExpr.notEquals("config.files.autoSave","off")},order:1}),k.MenuRegistry.appendMenuItem(k.MenuId.MenubarFileMenu,{group:"6_close",command:{id:v.REVERT_FILE_COMMAND_ID,title:t.localize(34,null),precondition:o.ContextKeyExpr.or(o.ContextKeyExpr.and(u.ActiveEditorCanRevertContext),o.ContextKeyExpr.and(u.ResourceContextKey.Scheme.notEqualsTo(p.Schemas.untitled),i.ExplorerViewletVisibleContext,u.SidebarFocusContext))},order:1}),k.MenuRegistry.appendMenuItem(k.MenuId.MenubarFileMenu,{group:"6_close",command:{id:s.CLOSE_EDITOR_COMMAND_ID,title:t.localize(35,null),precondition:o.ContextKeyExpr.or(u.ActiveEditorContext,o.ContextKeyExpr.and(i.ExplorerViewletVisibleContext,u.SidebarFocusContext))},order:2}),k.MenuRegistry.appendMenuItem(k.MenuId.MenubarGoMenu,{group:"3_global_nav",command:{id:"workbench.action.quickOpen",title:t.localize(36,null)},order:1})}),define(ne[2759],re([1,0,1585,5,12,38,37,34,8,131,156,32,45,7,43,41,27,14,10]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EmptyView=void 0;let p=class bl extends w.ViewPane{constructor(a,n,h,g,d,m,b,E,y,T,R,O){super(a,d,m,E,T,h,g,R,n,O);this.contextService=b,this.labelService=y,this._register(this.contextService.onDidChangeWorkbenchState(()=>this.refreshTitle())),this._register(this.labelService.onDidChangeFormatters(()=>this.refreshTitle()))}shouldShowWelcome(){return!0}renderBody(a){super.renderBody(a),this._register(new r.DragAndDropObserver(a,{onDrop:n=>{a.style.backgroundColor="",this.instantiationService.createInstance(v.ResourcesDropHandler,{allowWorkspaceOpen:!l.isWeb||(0,D.isTemporaryWorkspace)(this.contextService.getWorkspace())}).handleDrop(n,()=>{},()=>{})},onDragEnter:()=>{const n=this.themeService.getColorTheme().getColor(C.listDropBackground);a.style.backgroundColor=n?n.toString():""},onDragEnd:()=>{a.style.backgroundColor=""},onDragLeave:()=>{a.style.backgroundColor=""},onDragOver:n=>{n.dataTransfer&&(n.dataTransfer.dropEffect="copy")}})),this.refreshTitle()}refreshTitle(){this.contextService.getWorkbenchState()===3?this.updateTitle(bl.NAME):this.updateTitle(this.title)}};p.ID="workbench.explorer.emptyView",p.NAME=t.localize(0,null),p=Ee([W(1,_.IThemeService),W(2,i.IViewDescriptorService),W(3,f.IInstantiationService),W(4,A.IKeybindingService),W(5,k.IContextMenuService),W(6,D.IWorkspaceContextService),W(7,I.IConfigurationService),W(8,o.ILabelService),W(9,c.IContextKeyService),W(10,S.IOpenerService),W(11,s.ITelemetryService)],p),e.EmptyView=p}),define(ne[945],re([1,0,10,152,67,26,23,80,34,2,37,12,8,19,183,1588,68,150,51,48,355,279,156,5,170,18,305,14,54,276,21,511,102,6,45,13,56,140,220,943,130,396]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExplorerCompressionDelegate=e.isCompressedFolderName=e.FileDragAndDrop=e.FileSorter=e.FilesFilter=e.FilesRenderer=e.CompressedNavigationController=e.ExplorerDataSource=e.explorerRootErrorEmitter=e.ExplorerDelegate=void 0;class U{getHeight(te){return U.ITEM_HEIGHT}getTemplateId(te){return G.ID}}e.ExplorerDelegate=U,U.ITEM_HEIGHT=22,e.explorerRootErrorEmitter=new x.Emitter;let H=class{constructor(te,se,ie,ce,le,ae,ue){this.progressService=te,this.configService=se,this.notificationService=ie,this.layoutService=ce,this.fileService=le,this.explorerService=ae,this.contextService=ue}hasChildren(te){return Array.isArray(te)||te.hasChildren}getChildren(te){if(Array.isArray(te))return te;const se=te.isError,ie=this.explorerService.sortOrderConfiguration.sortOrder,ce=te.fetchChildren(ie);if(Array.isArray(ce))return ce;const le=ce.then(ae=>(te instanceof u.ExplorerItem&&te.isRoot&&!te.isError&&se&&this.contextService.getWorkbenchState()!==2&&e.explorerRootErrorEmitter.fire(te.resource),ae),ae=>{if(te instanceof u.ExplorerItem&&te.isRoot)if(this.contextService.getWorkbenchState()===2){const ue=new u.ExplorerItem(te.resource,this.fileService,this.configService,void 0,void 0,!1);return ue.isError=!0,[ue]}else e.explorerRootErrorEmitter.fire(te.resource);else this.notificationService.error(ae);return[]});return this.progressService.withProgress({location:1,delay:this.layoutService.isRestored()?800:1500},ae=>le),le}};H=Ee([W(0,_.IProgressService),W(1,o.IConfigurationService),W(2,A.INotificationService),W(3,D.IWorkbenchLayoutService),W(4,k.IFileService),W(5,B.IExplorerService),W(6,I.IWorkspaceContextService)],H),e.ExplorerDataSource=H;class K{constructor(te,se,ie,ce,le){this.id=te,this.items=se,this.depth=ce,this.collapsed=le,this._onDidChange=new x.Emitter,this.onDidChange=this._onDidChange.event,this._index=se.length-1,this.updateLabels(ie),this._updateLabelDisposable=ie.label.onDidRender(()=>this.updateLabels(ie))}get index(){return this._index}get count(){return this.items.length}get current(){return this.items[this._index]}get currentId(){return`${this.id}_${this.index}`}get labels(){return this._labels}updateLabels(te){this._labels=Array.from(te.container.querySelectorAll(".label-name"));let se="";for(let ie=0;ie<this.labels.length;ie++){const ce=se.length?`${this.items[ie].name}, compact, ${se}`:this.items[ie].name;this.labels[ie].setAttribute("aria-label",ce),this.labels[ie].setAttribute("aria-level",`${this.depth+ie}`),se=se.length?`${this.items[ie].name} ${se}`:this.items[ie].name}this.updateCollapsed(this.collapsed),this._index<this.labels.length&&this.labels[this._index].classList.add("active")}previous(){this._index<=0||this.setIndex(this._index-1)}next(){this._index>=this.items.length-1||this.setIndex(this._index+1)}first(){this._index!==0&&this.setIndex(0)}last(){this._index!==this.items.length-1&&this.setIndex(this.items.length-1)}setIndex(te){te<0||te>=this.items.length||(this.labels[this._index].classList.remove("active"),this._index=te,this.labels[this._index].classList.add("active"),this._onDidChange.fire())}updateCollapsed(te){this.collapsed=te;for(let se=0;se<this.labels.length;se++)this.labels[se].setAttribute("aria-expanded",te?"false":"true")}dispose(){this._onDidChange.dispose(),this._updateLabelDisposable.dispose()}}e.CompressedNavigationController=K,K.ID=0;let G=class Cl{constructor(te,se,ie,ce,le,ae,ue,oe){this.labels=te,this.updateWidth=se,this.contextViewService=ie,this.themeService=ce,this.configurationService=le,this.explorerService=ae,this.labelService=ue,this.contextService=oe,this.compressedNavigationControllers=new Map,this._onDidChangeActiveDescendant=new x.EventMultiplexer,this.onDidChangeActiveDescendant=this._onDidChangeActiveDescendant.event,this.config=this.configurationService.getValue(),this.styler=t.createStyleSheet();const fe=()=>{const pe=this.configurationService.getValue("workbench.tree.indent"),be=`.explorer-viewlet .explorer-item.align-nest-icon-with-parent-icon { margin-left: ${Math.max(22-pe,0)}px }`;this.styler.innerText!==be&&(this.styler.innerText=be)};this.configListener=this.configurationService.onDidChangeConfiguration(pe=>{pe.affectsConfiguration("explorer")&&(this.config=this.configurationService.getValue()),pe.affectsConfiguration("workbench.tree.indent")&&fe()}),fe()}getWidgetAriaLabel(){return(0,S.localize)(0,null)}get templateId(){return Cl.ID}renderTemplate(te){const se=w.Disposable.None,ie=this.labels.create(te,{supportHighlights:!0});return{elementDisposable:se,label:ie,container:te}}renderElement(te,se,ie){ie.elementDisposable.dispose();const ce=te.element,le=this.explorerService.getEditableData(ce);ie.label.element.classList.remove("compressed"),le?(ie.label.element.style.display="none",ie.elementDisposable=this.renderInputBox(ie.container,ce,le)):(ie.label.element.style.display="flex",ie.elementDisposable=this.renderStat(ce,ce.name,void 0,te.filterData,ie))}renderCompressedElements(te,se,ie,ce){ie.elementDisposable.dispose();const le=te.element.elements[te.element.elements.length-1],ae=te.element.elements.filter(oe=>this.explorerService.isEditable(oe)),ue=ae.length===0?void 0:this.explorerService.getEditableData(ae[0]);if(ue)ie.label.element.classList.remove("compressed"),ie.label.element.style.display="none",ie.elementDisposable=this.renderInputBox(ie.container,ae[0],ue);else{ie.label.element.classList.add("compressed"),ie.label.element.style.display="flex";const oe=new w.DisposableStore,fe=`compressed-explorer_${K.ID++}`,pe=te.element.elements.map(be=>be.name);oe.add(this.renderStat(le,pe,fe,te.filterData,ie));const me=new K(fe,te.element.elements,ie,te.depth,te.collapsed);oe.add(me),this.compressedNavigationControllers.set(le,me),oe.add(this._onDidChangeActiveDescendant.add(me.onDidChange)),oe.add(t.addDisposableListener(ie.container,"mousedown",be=>{const Ce=X(be.target);Ce&&me.setIndex(Ce.index)})),oe.add((0,w.toDisposable)(()=>this.compressedNavigationControllers.delete(le))),ie.elementDisposable=oe}}renderStat(te,se,ie,ce,le){const ae=new w.DisposableStore;le.label.element.style.display="flex";const ue=["explorer-item"];this.explorerService.isCut(te)&&ue.push("cut");const oe=()=>{const fe=this.themeService.getFileIconTheme(),pe=le.container.parentElement?.parentElement?.querySelector(".monaco-tl-twistie");pe&&(te.hasNests&&fe.hidesExplorerArrows?pe.classList.add("force-twistie"):pe.classList.remove("force-twistie"));const me=fe.hasFileIcons&&(fe.hidesExplorerArrows||!fe.hasFolderIcons),be=te.nestedParent&&me;le.label.setResource({resource:te.resource,name:se},{fileKind:te.isRoot?k.FileKind.ROOT_FOLDER:te.isDirectory?k.FileKind.FOLDER:k.FileKind.FILE,extraClasses:be?[...ue,"align-nest-icon-with-parent-icon"]:ue,fileDecorations:this.config.explorer.decorations,matches:(0,O.createMatches)(ce),separator:this.labelService.getSeparator(te.resource.scheme,te.resource.authority),domId:ie})};return ae.add(this.themeService.onDidFileIconThemeChange(()=>oe())),oe(),ae.add(le.label.onDidRender(()=>{try{this.updateWidth(te)}catch{}})),ae}renderInputBox(te,se,ie){const ce=this.labels.create(te),le=["explorer-item","explorer-item-edited"],ae=se.isRoot?k.FileKind.ROOT_FOLDER:se.isDirectory?k.FileKind.FOLDER:k.FileKind.FILE,ue=this.themeService.getFileIconTheme(),oe=ue.hasFileIcons&&(ue.hidesExplorerArrows||!ue.hasFolderIcons),fe=se.nestedParent&&oe,pe={hidePath:!0,hideLabel:!0,fileKind:ae,extraClasses:fe?[...le,"align-nest-icon-with-parent-icon"]:le},me=se.name?(0,c.dirname)(se.resource):se.resource,be=se.name||"";ce.setFile((0,c.joinPath)(me,be||" "),pe),ce.element.firstElementChild.style.display="none";const Ce=new i.InputBox(ce.element,this.contextViewService,{validationOptions:{validation:we=>{const ye=ie.validationMessage(we);return!ye||ye.severity!==A.Severity.Error?null:{content:ye.content,formatContent:!0,type:3}}},ariaLabel:(0,S.localize)(1,null)}),ve=(0,s.attachInputBoxStyler)(Ce,this.themeService),he=be.lastIndexOf(".");Ce.value=be,Ce.focus(),Ce.select({start:0,end:he>0&&!se.isDirectory?he:be.length});const ge=(0,l.once)((we,ye)=>{ce.element.style.display="none";const ke=Ce.value;(0,w.dispose)(Se),ce.element.remove(),ye&&ie.onFinish(ke,we)}),de=()=>{if(Ce.isInputValid()){const we=ie.validationMessage(Ce.value);we?Ce.showMessage({content:we.content,formatContent:!0,type:we.severity===A.Severity.Info?1:we.severity===A.Severity.Warning?2:3}):Ce.hideMessage()}};de();const Se=[Ce,Ce.onDidChange(we=>{ce.setFile((0,c.joinPath)(me,we||" "),pe)}),t.addStandardDisposableListener(Ce.inputElement,t.EventType.KEY_DOWN,we=>{we.equals(3)?Ce.validate()||ge(!0,!0):we.equals(9)&&ge(!1,!0)}),t.addStandardDisposableListener(Ce.inputElement,t.EventType.KEY_UP,we=>{de()}),t.addDisposableListener(Ce.inputElement,t.EventType.BLUR,()=>{ge(Ce.isInputValid(),!0)}),ce,ve];return(0,w.toDisposable)(()=>{ge(!1,!1)})}disposeElement(te,se,ie){ie.elementDisposable.dispose()}disposeCompressedElements(te,se,ie){ie.elementDisposable.dispose()}disposeTemplate(te){te.elementDisposable.dispose(),te.label.dispose()}getCompressedNavigationController(te){return this.compressedNavigationControllers.get(te)}getAriaLabel(te){return te.name}getAriaLevel(te){let se=0,ie=te.parent;for(;ie;)ie=ie.parent,se++;return this.contextService.getWorkbenchState()===3&&(se=se+1),se}getActiveDescendantId(te){return this.compressedNavigationControllers.get(te)?.currentId}dispose(){this.configListener.dispose(),this.styler.innerText=""}};G.ID="file",G=Ee([W(2,v.IContextViewService),W(3,C.IThemeService),W(4,o.IConfigurationService),W(5,B.IExplorerService),W(6,F.ILabelService),W(7,I.IWorkspaceContextService)],G),e.FilesRenderer=G;let q=class{constructor(te,se,ie,ce,le){this.contextService=te,this.configurationService=se,this.explorerService=ie,this.editorService=ce,this.uriIdentityService=le,this.hiddenExpressionPerRoot=new Map,this.editorsAffectingFilter=new Set,this._onDidChange=new x.Emitter,this.toDispose=[],this.toDispose.push(this.contextService.onDidChangeWorkspaceFolders(()=>this.updateConfiguration())),this.toDispose.push(this.configurationService.onDidChangeConfiguration(ae=>{ae.affectsConfiguration("files.exclude")&&this.updateConfiguration()})),this.toDispose.push(this.editorService.onDidVisibleEditorsChange(()=>{const ae=this.editorService.visibleEditors;let ue=!1;for(const oe of ae){if(!oe.resource)continue;const fe=this.explorerService.findClosest(oe.resource);if(fe&&fe.isExcluded){ue=!0;break}}for(const oe of this.editorsAffectingFilter)if(!ae.includes(oe)){ue=!0;break}ue&&(this.editorsAffectingFilter.clear(),this._onDidChange.fire())})),this.updateConfiguration()}get onDidChange(){return this._onDidChange.event}updateConfiguration(){let te=!1;this.contextService.getWorkspace().folders.forEach(se=>{const ce=this.configurationService.getValue({resource:se.uri})?.files?.exclude||Object.create(null);if(!te){const ae=this.hiddenExpressionPerRoot.get(se.uri.toString());te=!ae||!(0,r.equals)(ae.original,ce)}const le=(0,r.deepClone)(ce);this.hiddenExpressionPerRoot.set(se.uri.toString(),{original:le,parsed:f.parse(le)})}),te&&(this.editorsAffectingFilter.clear(),this._onDidChange.fire())}filter(te,se){return this.isVisible(te,se)}isVisible(te,se){if(te.isExcluded=!1,se===0)return te.isExcluded=!0,!1;if(this.explorerService.getEditableData(te))return!0;const ie=this.hiddenExpressionPerRoot.get(te.root.resource.toString());if(ie&&ie.parsed(p.relative(te.root.resource.path,te.resource.path),te.name,ce=>!!(te.parent&&te.parent.getChild(ce)))||te.parent?.isExcluded){te.isExcluded=!0;const le=this.editorService.visibleEditors.find(ae=>ae.resource&&this.uriIdentityService.extUri.isEqualOrParent(ae.resource,te.resource));return le&&te.root===this.explorerService.findClosestRoot(te.resource)?(this.editorsAffectingFilter.add(le),!0):!1}return!0}dispose(){(0,w.dispose)(this.toDispose)}};q=Ee([W(0,I.IWorkspaceContextService),W(1,o.IConfigurationService),W(2,B.IExplorerService),W(3,T.IEditorService),W(4,M.IUriIdentityService)],q),e.FilesFilter=q;let Z=class{constructor(te,se){this.explorerService=te,this.contextService=se}compare(te,se){if(te.isRoot){if(se.isRoot){const ue=this.contextService.getWorkspaceFolder(te.resource),oe=this.contextService.getWorkspaceFolder(se.resource);return ue&&oe?ue.index-oe.index:-1}return-1}if(se.isRoot)return 1;const ie=this.explorerService.sortOrderConfiguration.sortOrder,ce=this.explorerService.sortOrderConfiguration.lexicographicOptions;let le,ae;switch(ce){case"upper":le=a.compareFileNamesUpper,ae=a.compareFileExtensionsUpper;break;case"lower":le=a.compareFileNamesLower,ae=a.compareFileExtensionsLower;break;case"unicode":le=a.compareFileNamesUnicode,ae=a.compareFileExtensionsUnicode;break;default:le=a.compareFileNamesDefault,ae=a.compareFileExtensionsDefault}switch(ie){case"type":if(te.isDirectory&&!se.isDirectory)return-1;if(se.isDirectory&&!te.isDirectory)return 1;if(te.isDirectory&&se.isDirectory)return le(te.name,se.name);break;case"filesFirst":if(te.isDirectory&&!se.isDirectory)return 1;if(se.isDirectory&&!te.isDirectory)return-1;break;case"foldersNestsFiles":if(te.isDirectory&&!se.isDirectory)return-1;if(se.isDirectory&&!te.isDirectory)return 1;if(te.hasNests&&!se.hasNests)return-1;if(se.hasNests&&!te.hasNests)return 1;break;case"mixed":break;default:if(te.isDirectory&&!se.isDirectory)return-1;if(se.isDirectory&&!te.isDirectory)return 1;break}switch(ie){case"type":return ae(te.name,se.name);case"modified":return te.mtime!==se.mtime?te.mtime&&se.mtime&&te.mtime<se.mtime?1:-1:le(te.name,se.name);default:return le(te.name,se.name)}}};Z=Ee([W(0,B.IExplorerService),W(1,I.IWorkspaceContextService)],Z),e.FileSorter=Z;let j=class ri{constructor(te,se,ie,ce,le,ae,ue,oe,fe){this.explorerService=te,this.editorService=se,this.dialogService=ie,this.contextService=ce,this.fileService=le,this.configurationService=ae,this.instantiationService=ue,this.workspaceEditingService=oe,this.uriIdentityService=fe,this.compressedDropTargetDisposable=w.Disposable.None,this.dropEnabled=!1,this.toDispose=[];const pe=()=>{this.dropEnabled=this.configurationService.getValue("explorer.enableDragAndDrop")};pe(),this.toDispose.push(this.configurationService.onDidChangeConfiguration(me=>pe()))}onDragOver(te,se,ie,ce){if(!this.dropEnabled)return!1;if(se){const le=ri.getCompressedStatFromDragEvent(se,ce);if(le){const ae=X(ce.target);if(ae&&ae.index<ae.count-1){const ue=this.handleDragOver(te,le,ie,ce);return ue?(ae.element!==this.compressedDragOverElement&&(this.compressedDragOverElement=ae.element,this.compressedDropTargetDisposable.dispose(),this.compressedDropTargetDisposable=(0,w.toDisposable)(()=>{ae.element.classList.remove("drop-target"),this.compressedDragOverElement=void 0}),ae.element.classList.add("drop-target")),typeof ue=="boolean"?ue:{...ue,feedback:[]}):(this.compressedDropTargetDisposable.dispose(),!1)}}}return this.compressedDropTargetDisposable.dispose(),this.handleDragOver(te,se,ie,ce)}handleDragOver(te,se,ie,ce){const le=ce&&(ce.ctrlKey&&!b.isMacintosh||ce.altKey&&b.isMacintosh),ae=te instanceof m.NativeDragAndDropData,ue=ae||le?0:1;if(ae){if(!(0,n.containsDragType)(ce,g.DataTransfers.FILES,n.CodeDataTransfers.FILES,g.DataTransfers.RESOURCES))return!1}else{if(te instanceof m.ExternalElementsDragAndDropData)return!1;{const oe=ri.getStatsFromDragAndDropData(te);if(!se)return!le&&oe.every(fe=>!!fe.parent&&fe.parent.isRoot)?!1:{accept:!0,bubble:0,effect:ue,autoExpand:!1};if(!Array.isArray(oe)||oe.some(fe=>fe.isRoot&&se instanceof u.ExplorerItem&&!se.isRoot||this.uriIdentityService.extUri.isEqual(fe.resource,se.resource)?!0:fe.isRoot&&se instanceof u.ExplorerItem&&se.isRoot?!1:!!(!le&&this.uriIdentityService.extUri.isEqual((0,c.dirname)(fe.resource),se.resource)||this.uriIdentityService.extUri.isEqualOrParent(se.resource,fe.resource))))return!1}}if(se){if(se.isDirectory)return se.isReadonly?!1:{accept:!0,bubble:0,effect:ue,autoExpand:!0};if(this.contextService.getWorkspace().folders.every(oe=>oe.uri.toString()!==se.resource.toString()))return{accept:!0,bubble:1,effect:ue}}else return{accept:!0,bubble:0,effect:ue};return!1}getDragURI(te){return this.explorerService.isEditable(te)?null:te.resource.toString()}getDragLabel(te,se){return te.length===1?ri.getCompressedStatFromDragEvent(te[0],se).name:String(te.length)}onDragStart(te,se){const ie=ri.getStatsFromDragAndDropData(te,se);if(ie&&ie.length&&se.dataTransfer){this.instantiationService.invokeFunction(le=>(0,n.fillEditorsDragData)(le,ie,se));const ce=ie.filter(le=>le.resource.scheme===d.Schemas.file).map(le=>le.resource.fsPath);ce.length&&se.dataTransfer.setData(n.CodeDataTransfers.FILES,JSON.stringify(ce))}}async drop(te,se,ie,ce){if(this.compressedDropTargetDisposable.dispose(),se){const ae=ri.getCompressedStatFromDragEvent(se,ce);ae&&(se=ae)}if(se||(se=this.explorerService.roots[this.explorerService.roots.length-1]),!se.isDirectory&&se.parent&&(se=se.parent),se.isReadonly)return;const le=se;if(!!le)try{te instanceof m.NativeDragAndDropData?!b.isWeb||(0,I.isTemporaryWorkspace)(this.contextService.getWorkspace())&&z.WebFileSystemAccess.supported(window)?await this.instantiationService.createInstance(P.ExternalFileImport).import(le,ce):await this.instantiationService.createInstance(P.BrowserFileUpload).upload(se,ce):await this.handleExplorerDrop(te,le,ce)}catch(ae){this.dialogService.show(A.Severity.Error,(0,V.toErrorMessage)(ae))}}async handleExplorerDrop(te,se,ie){const ce=ri.getStatsFromDragAndDropData(te),le=new Set(ce);if(this.configurationService.getValue().explorer.experimental.fileNesting.operateAsGroup)for(const pe of le){const me=pe.nestedChildren;if(me)for(const be of me)le.add(be)}const ae=(0,c.distinctParents)([...le],pe=>pe.resource),ue=ie.ctrlKey&&!b.isMacintosh||ie.altKey&&b.isMacintosh;if(!ue&&this.configurationService.getValue(ri.CONFIRM_DND_SETTING_KEY)){const pe=ae.length>1&&ae.every(Ce=>Ce.isRoot)?(0,S.localize)(2,null):ae.length>1?(0,S.localize)(3,null,ae.length,se.name):ae[0].isRoot?(0,S.localize)(4,null,ae[0].name):(0,S.localize)(5,null,ae[0].name,se.name),me=ae.length>1&&!ae.every(Ce=>Ce.isRoot)?(0,E.getFileNamesMessage)(ae.map(Ce=>Ce.resource)):void 0,be=await this.dialogService.confirm({message:pe,detail:me,checkbox:{label:(0,S.localize)(6,null)},type:"question",primaryButton:(0,S.localize)(7,null)});if(!be.confirmed)return;be.checkboxChecked===!0&&await this.configurationService.updateValue(ri.CONFIRM_DND_SETTING_KEY,!1)}await this.doHandleRootDrop(ae.filter(pe=>pe.isRoot),se);const fe=ae.filter(pe=>!pe.isRoot);return ue?this.doHandleExplorerDropOnCopy(fe,se):this.doHandleExplorerDropOnMove(fe,se)}async doHandleRootDrop(te,se){if(te.length===0)return;const ie=this.contextService.getWorkspace().folders;let ce;const le=[],ae=[];for(let ue=0;ue<ie.length;ue++){const oe={uri:ie[ue].uri,name:ie[ue].name};se instanceof u.ExplorerItem&&this.uriIdentityService.extUri.isEqual(ie[ue].uri,se.resource)&&(ce=ue),te.every(fe=>fe.resource.toString()!==ie[ue].uri.toString())?le.push(oe):ae.push(oe)}return ce===void 0&&(ce=le.length),le.splice(ce,0,...ae),this.workspaceEditingService.updateFolders(0,le.length,le)}async doHandleExplorerDropOnCopy(te,se){const ie=this.configurationService.getValue().explorer,ce=te.map(({resource:ue,isDirectory:oe})=>new N.ResourceFileEdit(ue,(0,R.findValidPasteFileTarget)(this.explorerService,se,{resource:ue,isDirectory:oe,allowOverwrite:!1},ie.incrementalNaming),{copy:!0})),le=J(te);await this.explorerService.applyBulkEdit(ce,{confirmBeforeUndo:ie.confirmUndo==="default"||ie.confirmUndo==="verbose",undoLabel:(0,S.localize)(8,null,le),progressLabel:(0,S.localize)(9,null,le)});const ae=ce.filter(ue=>{const oe=ue.newResource?this.explorerService.findClosest(ue.newResource):void 0;return oe&&!oe.isDirectory}).map(ue=>({resource:ue.newResource,options:{pinned:!0}}));await this.editorService.openEditors(ae)}async doHandleExplorerDropOnMove(te,se){const ie=te.filter(ae=>!ae.isReadonly).map(ae=>new N.ResourceFileEdit(ae.resource,(0,c.joinPath)(se.resource,ae.name))),ce=J(te),le={confirmBeforeUndo:this.configurationService.getValue().explorer.confirmUndo==="verbose",undoLabel:(0,S.localize)(10,null,ce),progressLabel:(0,S.localize)(11,null,ce)};try{await this.explorerService.applyBulkEdit(ie,le)}catch(ae){if(ae.fileOperationResult===4){const ue=[];for(const pe of ie)pe.newResource&&await this.fileService.exists(pe.newResource)&&ue.push(pe.newResource);const oe=(0,P.getMultipleFilesOverwriteConfirm)(ue),{confirmed:fe}=await this.dialogService.confirm(oe);fe&&await this.explorerService.applyBulkEdit(ie.map(pe=>new N.ResourceFileEdit(pe.oldResource,pe.newResource,{overwrite:!0})),le)}else throw ae}}static getStatsFromDragAndDropData(te,se){return te.context?te.context:se&&te.elements.length===1?(te.context=[ri.getCompressedStatFromDragEvent(te.elements[0],se)],te.context):te.elements}static getCompressedStatFromDragEvent(te,se){const ie=document.elementFromPoint(se.clientX,se.clientY),ce=X(ie);if(ce){const{count:le,index:ae}=ce;let ue=le-1;for(;ue>ae&&te.parent;)te=te.parent,ue--;return te}return te}onDragEnd(){this.compressedDropTargetDisposable.dispose()}};j.CONFIRM_DND_SETTING_KEY="explorer.confirmDragAndDrop",j=Ee([W(0,B.IExplorerService),W(1,T.IEditorService),W(2,E.IDialogService),W(3,I.IWorkspaceContextService),W(4,k.IFileService),W(5,o.IConfigurationService),W(6,h.IInstantiationService),W(7,y.IWorkspaceEditingService),W(8,M.IUriIdentityService)],j),e.FileDragAndDrop=j;function X(ee){if(!(ee instanceof HTMLElement))return null;let te=ee;for(;te&&!te.classList.contains("monaco-list-row");){if(te.classList.contains("label-name")&&te.hasAttribute("data-icon-label-count")){const se=Number(te.getAttribute("data-icon-label-count")),ie=Number(te.getAttribute("data-icon-label-index"));if((0,L.isNumber)(se)&&(0,L.isNumber)(ie))return{element:te,count:se,index:ie}}te=te.parentElement}return null}function Y(ee){return!!X(ee)}e.isCompressedFolderName=Y;class ${isIncompressible(te){return te.isRoot||!te.isDirectory||te instanceof u.NewExplorerItem||!te.parent||te.parent.isRoot}}e.ExplorerCompressionDelegate=$;function J(ee){return ee.length===1?ee[0].name:ee.every(te=>te.isDirectory)?(0,S.localize)(12,null,ee.length):ee.every(te=>!te.isDirectory)?(0,S.localize)(13,null,ee.length):`${ee.length} files and folders`}}),define(ne[2760],re([1,0,6,1586,34,32,2,945,220]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExplorerDecorationsProvider=e.provideDecorations=void 0;function w(C){if(C.isRoot&&C.isError)return{tooltip:(0,f.localize)(0,null),letter:"!",color:A.listInvalidItemForeground};if(C.isSymbolicLink)return{tooltip:(0,f.localize)(1,null),letter:"\u2937"};if(C.isUnknown)return{tooltip:(0,f.localize)(2,null),letter:"?"};if(C.isExcluded)return{color:A.listDeemphasizedForeground}}e.provideDecorations=w;let v=class{constructor(o,c){this.explorerService=o,this.label=(0,f.localize)(3,null),this._onDidChange=new t.Emitter,this.toDispose=new k.DisposableStore,this.toDispose.add(this._onDidChange),this.toDispose.add(c.onDidChangeWorkspaceFolders(i=>{this._onDidChange.fire(i.changed.concat(i.added).map(S=>S.uri))})),this.toDispose.add(D.explorerRootErrorEmitter.event(i=>{this._onDidChange.fire([i])}))}get onDidChange(){return this._onDidChange.event}provideDecorations(o){const c=this.explorerService.findClosest(o);if(!!c)return w(c)}dispose(){this.toDispose.dispose()}};v=Ee([W(0,I.IExplorerService),W(1,_.IWorkspaceContextService)],v),e.ExplorerDecorationsProvider=v}),define(ne[2761],re([1,0,1587,235,110,148,511,10,80,2760,34,8,38,5,67,37,7,74,252,71,170,21,131,45,945,12,16,73,27,355,178,24,95,23,2,6,68,32,82,43,41,56,44,220,33,28,159,88,26,132,55]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H,K,G,q,Z,j,X,Y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExplorerView=e.getContext=void 0;function $(ie,ce){for(const le of ce)if(ie.hasNode(le)&&!ie.isCollapsed(le)){for(const[,ae]of le.children.entries())if(ie.hasNode(ae)&&ie.isCollapsible(ae)&&!ie.isCollapsed(ae))return!0}return!1}const J={getId:ie=>ie instanceof y.NewExplorerItem?`new:${ie.resource}`:ie.resource};function ee(ie,ce,le,ae){let ue;ue=ie.length?ie[0]:void 0;const oe=ue&&ae.getCompressedNavigationController(ue);ue=oe?oe.current:ue;const fe=[];for(const pe of ce){const me=ae.getCompressedNavigationController(pe);if(me&&ue&&me===oe){pe===ue&&fe.push(pe);continue}me?fe.push(...me.items):fe.push(pe)}return ue?le&&fe.indexOf(ue)>=0?fe:[ue]:le?fe:[]}e.getContext=ee;let te=class vs extends n.ViewPane{constructor(ce,le,ae,ue,oe,fe,pe,me,be,Ce,ve,he,ge,de,Se,we,ye,ke,Ie,Te,De,_e,Re,Ne,xe,Ae){super(ce,ve,ae,ge,he,ue,oe,Ae,we,ke);this.delegate=le,this.contextService=fe,this.progressService=pe,this.editorService=me,this.editorResolverService=be,this.layoutService=Ce,this.decorationService=de,this.labelService=Se,this.menuService=ye,this.explorerService=Ie,this.notificationService=Te,this.storageService=De,this.clipboardService=_e,this.fileService=Re,this.uriIdentityService=Ne,this.commandService=xe,this.autoReveal=!1,this.resourceContext=oe.createInstance(l.ResourceContextKey),this._register(this.resourceContext),this.folderContext=A.ExplorerFolderContext.bindTo(he),this.readonlyContext=A.ExplorerResourceReadonlyContext.bindTo(he),this.availableEditorIdsContext=A.ExplorerResourceAvailableEditorIdsContext.bindTo(he),this.rootContext=A.ExplorerRootContext.bindTo(he),this.resourceMoveableToTrash=A.ExplorerResourceMoveableToTrash.bindTo(he),this.compressedFocusContext=A.ExplorerCompressedFocusContext.bindTo(he),this.compressedFocusFirstContext=A.ExplorerCompressedFirstFocusContext.bindTo(he),this.compressedFocusLastContext=A.ExplorerCompressedLastFocusContext.bindTo(he),this.explorerService.registerView(this)}get name(){return this.labelService.getWorkspaceLabel(this.contextService.getWorkspace())}get title(){return this.name}set title(ce){}get contributedContextMenu(){const ce=this.menuService.createMenu(m.MenuId.ExplorerContext,this.tree.contextKeyService);return this._register(ce),ce}get fileCopiedContextKey(){return k.FileCopiedContext.bindTo(this.contextKeyService)}get resourceCutContextKey(){return A.ExplorerResourceCut.bindTo(this.contextKeyService)}renderHeader(ce){super.renderHeader(ce),this.dragHandler=new u.DelayedDragHandler(ce,()=>this.setExpanded(!0));const le=ce.querySelector(".title"),ae=()=>{const oe=this.contextService.getWorkspace().folders.map(fe=>fe.name).join();le.textContent=this.name,le.title=oe,le.setAttribute("aria-label",t.localize(0,null,this.name))};this._register(this.contextService.onDidChangeWorkspaceName(ae)),this._register(this.labelService.onDidChangeFormatters(ae)),ae()}layoutBody(ce,le){super.layoutBody(ce,le),this.tree.layout(ce,le)}renderBody(ce){super.renderBody(ce),this.container=ce,this.treeContainer=D.append(ce,D.$(".explorer-folders-view")),this.styleElement=D.createStyleSheet(this.treeContainer),(0,M.attachStyler)(this.themeService,{listDropBackground:N.listDropBackground},this.styleListDropBackground.bind(this)),this.createTree(this.treeContainer),this._register(this.labelService.onDidChangeFormatters(()=>{this._onDidChangeTitleArea.fire()}));const le=this.configurationService.getValue();this.onConfigurationUpdated(le),this._register(this.editorService.onDidActiveEditorChange(()=>{this.selectActiveFile()})),this._register(this.configurationService.onDidChangeConfiguration(ae=>this.onConfigurationUpdated(this.configurationService.getValue(),ae))),this._register(this.onDidChangeBodyVisibility(async ae=>{ae&&(await this.setTreeInput(),this.selectActiveFile(!0))}))}focus(){this.tree.domFocus();const ce=this.tree.getFocus();ce.length===1&&this.autoReveal&&this.tree.reveal(ce[0],.5)}hasFocus(){return D.isAncestor(document.activeElement,this.container)}getContext(ce){return ee(this.tree.getFocus(),this.tree.getSelection(),ce,this.renderer)}isItemVisible(ce){return this.filter.filter(ce,1)}async setEditable(ce,le){le?(this.horizontalScrolling=this.tree.options.horizontalScrolling,this.horizontalScrolling&&this.tree.updateOptions({horizontalScrolling:!1}),await this.tree.expand(ce.parent)):(this.horizontalScrolling!==void 0&&this.tree.updateOptions({horizontalScrolling:this.horizontalScrolling}),this.horizontalScrolling=void 0,this.treeContainer.classList.remove("highlight")),await this.refresh(!1,ce.parent,!1),le?(this.treeContainer.classList.add("highlight"),this.tree.reveal(ce)):this.tree.domFocus()}selectActiveFile(ce=this.autoReveal){if(this.autoReveal){const le=U.EditorResourceAccessor.getCanonicalUri(this.editorService.activeEditor,{supportSideBySide:U.SideBySideEditor.PRIMARY});if(le){const ae=this.tree.getFocus(),ue=this.tree.getSelection();if(ae.length===1&&this.uriIdentityService.extUri.isEqual(ae[0].resource,le)&&ue.length===1&&this.uriIdentityService.extUri.isEqual(ue[0].resource,le))return;this.explorerService.select(le,ce)}}}createTree(ce){this.filter=this.instantiationService.createInstance(g.FilesFilter),this._register(this.filter),this._register(this.filter.onDidChange(()=>this.refresh(!0)));const le=this.instantiationService.createInstance(T.ResourceLabels,{onDidChangeVisibility:this.onDidChangeBodyVisibility});this._register(le);const ae=pe=>this.tree.updateWidth(pe);this.renderer=this.instantiationService.createInstance(g.FilesRenderer,le,ae),this._register(this.renderer),this._register(se(ce,this.themeService));const ue=()=>this.configurationService.getValue("explorer.compactFolders"),oe=pe=>this.configurationService.getValue({resource:pe?.root.resource}).explorer.experimental.fileNesting;this.tree=this.instantiationService.createInstance(p.WorkbenchCompressibleAsyncDataTree,"FileExplorer",ce,new g.ExplorerDelegate,new g.ExplorerCompressionDelegate,[this.renderer],this.instantiationService.createInstance(g.ExplorerDataSource),{compressionEnabled:ue(),accessibilityProvider:this.renderer,identityProvider:J,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:pe=>{if(!this.explorerService.isEditable(pe))return pe.name},getCompressedNodeKeyboardNavigationLabel:pe=>{if(!pe.some(me=>this.explorerService.isEditable(me)))return pe.map(me=>me.name).join("/")}},multipleSelectionSupport:!0,filter:this.filter,sorter:this.instantiationService.createInstance(g.FileSorter),dnd:this.instantiationService.createInstance(g.FileDragAndDrop),collapseByDefault:pe=>!(pe instanceof y.ExplorerItem&&pe.hasNests&&oe(pe).expand),autoExpandSingleChildren:!0,expandOnlyOnTwistieClick:pe=>{if(pe instanceof y.ExplorerItem){if(pe.hasNests)return!0;if(this.configurationService.getValue("workbench.tree.expandMode")==="doubleClick")return!0}return!1},additionalScrollHeight:g.ExplorerDelegate.ITEM_HEIGHT,overrideStyles:{listBackground:B.SIDE_BAR_BACKGROUND}}),this._register(this.tree);const fe=L.Event.filter(this.configurationService.onDidChangeConfiguration,pe=>pe.affectsConfiguration("explorer.compactFolders"));this._register(fe(pe=>this.tree.updateOptions({compressionEnabled:ue()}))),A.FilesExplorerFocusedContext.bindTo(this.tree.contextKeyService),A.ExplorerFocusedContext.bindTo(this.tree.contextKeyService),this._register(this.tree.onDidChangeFocus(pe=>this.onFocusChanged(pe.elements))),this.onFocusChanged([]),this._register(this.tree.onDidOpen(async pe=>{const me=pe.element;if(!me)return;if(!(pe.browserEvent instanceof KeyboardEvent&&pe.browserEvent.shiftKey)){if(me.isDirectory||this.explorerService.isEditable(void 0))return;this.telemetryService.publicLog2("workbenchActionExecuted",{id:"workbench.files.openFile",from:"explorer"});try{this.delegate.willOpenElement(pe.browserEvent),await this.editorService.openEditor({resource:me.resource,options:{preserveFocus:pe.editorOptions.preserveFocus,pinned:pe.editorOptions.pinned,source:X.EditorOpenSource.USER}},pe.sideBySide?a.SIDE_GROUP:a.ACTIVE_GROUP)}finally{this.delegate.didOpenElement()}}})),this._register(this.tree.onContextMenu(pe=>this.onContextMenu(pe))),this._register(this.tree.onDidScroll(async pe=>{let me=this.explorerService.getEditable();pe.scrollTopChanged&&me&&this.tree.getRelativeTop(me.stat)===null&&await me.data.onFinish("",!1)})),this._register(this.tree.onDidChangeCollapseState(pe=>{const me=pe.node.element?.element;if(me){const be=this.renderer.getCompressedNavigationController(me instanceof Array?me[0]:me);be&&be.updateCollapsed(pe.node.collapsed)}})),this._register(this.tree.onMouseDblClick(pe=>{pe.element===null&&this.commandService.executeCommand(k.NEW_FILE_COMMAND_ID)})),this._register(this.storageService.onWillSaveState(()=>{this.storageService.store(vs.TREE_VIEW_STATE_STORAGE_KEY,JSON.stringify(this.tree.getViewState()),1,1)}))}onConfigurationUpdated(ce,le){this.autoReveal=ce?.explorer?.autoReveal,le&&(le.affectsConfiguration("explorer.decorations.colors")||le.affectsConfiguration("explorer.decorations.badges"))&&this.refresh(!0)}setContextKeys(ce){const le=this.contextService.getWorkspace().folders,ae=ce?ce.resource:le[le.length-1].uri;if(ce=ce||this.explorerService.findClosest(ae),this.resourceContext.set(ae),this.folderContext.set(!!ce&&ce.isDirectory),this.readonlyContext.set(!!ce&&ce.isReadonly),this.rootContext.set(!!ce&&ce.isRoot),ae){const ue=ae?this.editorResolverService.getEditors(ae).map(oe=>oe.id):[];this.availableEditorIdsContext.set(ue.join(","))}else this.availableEditorIdsContext.reset()}async onContextMenu(ce){const le=new F.DisposableStore;let ae=ce.element,ue=ce.anchor;if(ae){const be=this.renderer.getCompressedNavigationController(ae);be&&(ce.browserEvent instanceof KeyboardEvent||(0,g.isCompressedFolderName)(ce.browserEvent.target)?ue=be.labels[be.index]:be.last())}this.fileCopiedContextKey.set(await this.clipboardService.hasResources()),this.setContextKeys(ae);const oe=this.tree.getSelection(),fe=[],pe=this.explorerService.roots;let me;if(ae instanceof y.ExplorerItem){const be=this.renderer.getCompressedNavigationController(ae);me=be?be.current.resource:ae.resource}else me=pe.length===1?pe[0].resource:{};le.add((0,b.createAndFillInContextMenuActions)(this.contributedContextMenu,{arg:me,shouldForwardArgs:!0},fe)),this.contextMenuService.showContextMenu({getAnchor:()=>ue,getActions:()=>fe,onHide:be=>{be&&this.tree.domFocus(),le.dispose()},getActionsContext:()=>ae&&oe&&oe.indexOf(ae)>=0?oe.map(be=>be.resource):ae instanceof y.ExplorerItem?[ae.resource]:[]})}onFocusChanged(ce){const le=ce&&ce.length?ce[0]:void 0;if(this.setContextKeys(le),le){const ue=this.configurationService.getValue().files.enableTrash,oe=this.fileService.hasCapability(le.resource,4096);this.resourceMoveableToTrash.set(ue&&oe)}else this.resourceMoveableToTrash.reset();const ae=le&&this.renderer.getCompressedNavigationController(le);if(!ae){this.compressedFocusContext.set(!1);return}this.compressedFocusContext.set(!0),this.updateCompressedNavigationContextKeys(ae)}refresh(ce,le,ae=!0){if(!this.tree||!this.isBodyVisible()||le&&!this.tree.hasNode(le))return Promise.resolve(void 0);ae&&this.explorerService.isEditable(void 0)&&this.tree.domFocus();const ue=le||this.tree.getInput();return this.configurationService.getValue({resource:le?.root.resource}).explorer.experimental.fileNesting.enabled?(async()=>{try{await this.tree.updateChildren(ue,ce,!1,{diffIdentityProvider:J})}catch(oe){this.notificationService.error("Internal error in file explorer. This may be due to experimental file nesting."),console.error("Unepxected error",oe,"in refreshing explorer. This may be due to experimental file nesting.");return}})():this.tree.updateChildren(ue,ce,!1,{diffIdentityProvider:J})}getOptimalWidth(){const ce=this.tree.getHTMLElement(),le=[].slice.call(ce.querySelectorAll(".explorer-item .label-name"));return D.getLargestChildWidth(ce,le)}async setTreeInput(){if(!this.isBodyVisible())return Promise.resolve(void 0);const ce=!this.tree.getInput();ce&&f.mark("code/willResolveExplorer");const le=this.explorerService.roots;let ae=le[0];(this.contextService.getWorkbenchState()!==2||le[0].isError)&&(ae=le);let ue;if(this.tree&&this.tree.getInput())ue=this.tree.getViewState();else{const pe=this.storageService.get(vs.TREE_VIEW_STATE_STORAGE_KEY,1);pe&&(ue=JSON.parse(pe))}const oe=this.tree.getInput(),fe=this.tree.setInput(ae,ue).then(async()=>{if(Array.isArray(ae)&&((!ue||oe instanceof y.ExplorerItem)&&await Promise.all(ae.map(async pe=>{try{await this.tree.expand(pe)}catch{}})),!oe&&ae.length===1&&this.configurationService.getValue().explorer.expandSingleFolderWorkspaces&&await this.tree.expand(ae[0]).catch(()=>{}),Array.isArray(oe))){const pe=new Y.ResourceMap;oe.forEach(me=>pe.set(me.resource,!0)),await Promise.all(ae.map(async me=>{if(!pe.has(me.resource))try{await this.tree.expand(me)}catch{}}))}ce&&f.mark("code/didResolveExplorer")});this.progressService.withProgress({location:1,delay:this.layoutService.isRestored()?800:1500},pe=>fe),await fe,this.decorationsProvider||(this.decorationsProvider=new w.ExplorerDecorationsProvider(this.explorerService,this.contextService),this._register(this.decorationService.registerDecorationsProvider(this.decorationsProvider)))}async selectResource(ce,le=this.autoReveal,ae=0){if(ae===2||!ce||!this.isBodyVisible())return;let ue=this.explorerService.findClosestRoot(ce);for(;ue&&ue.resource.toString()!==ce.toString();){try{await this.tree.expand(ue)}catch{return this.selectResource(ce,le,ae+1)}for(let oe of ue.children.values()){if(this.uriIdentityService.extUri.isEqualOrParent(ce,oe.resource)){ue=oe;break}ue=null}}if(ue){if(ue===this.tree.getInput()){this.tree.setFocus([]),this.tree.setSelection([]);return}try{le===!0&&this.tree.getRelativeTop(ue)===null&&this.tree.reveal(ue,.5),this.tree.setFocus([ue]),this.tree.setSelection([ue])}catch{return this.selectResource(ce,le,ae+1)}}}itemsCopied(ce,le,ae){this.fileCopiedContextKey.set(ce.length>0),this.resourceCutContextKey.set(le&&ce.length>0),ae&&ae.forEach(ue=>this.tree.rerender(ue)),le&&ce.forEach(ue=>this.tree.rerender(ue))}collapseAll(){this.explorerService.isEditable(void 0)&&this.tree.domFocus();const ce=this.tree.getInput();if(Array.isArray(ce)&&$(this.tree,ce)){ce.forEach(le=>{le.children.forEach(ae=>this.tree.hasNode(ae)&&this.tree.collapse(ae,!0))});return}this.tree.collapseAll()}previousCompressedStat(){const ce=this.tree.getFocus();if(!ce.length)return;const le=this.renderer.getCompressedNavigationController(ce[0]);le.previous(),this.updateCompressedNavigationContextKeys(le)}nextCompressedStat(){const ce=this.tree.getFocus();if(!ce.length)return;const le=this.renderer.getCompressedNavigationController(ce[0]);le.next(),this.updateCompressedNavigationContextKeys(le)}firstCompressedStat(){const ce=this.tree.getFocus();if(!ce.length)return;const le=this.renderer.getCompressedNavigationController(ce[0]);le.first(),this.updateCompressedNavigationContextKeys(le)}lastCompressedStat(){const ce=this.tree.getFocus();if(!ce.length)return;const le=this.renderer.getCompressedNavigationController(ce[0]);le.last(),this.updateCompressedNavigationContextKeys(le)}updateCompressedNavigationContextKeys(ce){this.compressedFocusFirstContext.set(ce.index===0),this.compressedFocusLastContext.set(ce.index===ce.count-1)}styleListDropBackground(ce){const le=[];ce.listDropBackground&&le.push(`.explorer-viewlet .explorer-item .monaco-icon-name-container.multiple > .label-name.drop-target > .monaco-highlighted-label { background-color: ${ce.listDropBackground}; }`);const ae=le.join(` `);ae!==this.styleElement.textContent&&(this.styleElement.textContent=ae)}dispose(){this.dragHandler&&this.dragHandler.dispose(),super.dispose()}};te.TREE_VIEW_STATE_STORAGE_KEY="workbench.explorer.treeViewState",Ee([_.memoize],te.prototype,"contributedContextMenu",null),Ee([_.memoize],te.prototype,"fileCopiedContextKey",null),Ee([_.memoize],te.prototype,"resourceCutContextKey",null),te=Ee([W(2,S.IContextMenuService),W(3,P.IViewDescriptorService),W(4,c.IInstantiationService),W(5,v.IWorkspaceContextService),W(6,i.IProgressService),W(7,a.IEditorService),W(8,q.IEditorResolverService),W(9,I.IWorkbenchLayoutService),W(10,o.IKeybindingService),W(11,s.IContextKeyService),W(12,C.IConfigurationService),W(13,r.IDecorationsService),W(14,h.ILabelService),W(15,d.IThemeService),W(16,m.IMenuService),W(17,E.ITelemetryService),W(18,H.IExplorerService),W(19,j.INotificationService),W(20,R.IStorageService),W(21,O.IClipboardService),W(22,x.IFileService),W(23,z.IUriIdentityService),W(24,G.ICommandService),W(25,V.IOpenerService)],te),e.ExplorerView=te;function se(ie,ce){ie.classList.add("file-icon-themable-tree"),ie.classList.add("show-file-icons");const le=ae=>{ie.classList.toggle("align-icons-and-twisties",ae.hasFileIcons&&!ae.hasFolderIcons),ie.classList.toggle("hide-arrows",ae.hidesExplorerArrows===!0)};return le(ce.getFileIconTheme()),ce.onDidFileIconThemeChange(le)}(0,m.registerAction2)(class extends m.Action2{constructor(){super({id:"workbench.files.action.createFileFromExplorer",title:t.localize(1,null),f1:!1,icon:K.Codicon.newFile,precondition:A.ExplorerResourceNotReadonlyContext,menu:{id:m.MenuId.ViewTitle,group:"navigation",when:s.ContextKeyExpr.equals("view",A.VIEW_ID),order:10}})}run(ie){ie.get(G.ICommandService).executeCommand(k.NEW_FILE_COMMAND_ID)}}),(0,m.registerAction2)(class extends m.Action2{constructor(){super({id:"workbench.files.action.createFolderFromExplorer",title:t.localize(2,null),f1:!1,icon:K.Codicon.newFolder,precondition:A.ExplorerResourceNotReadonlyContext,menu:{id:m.MenuId.ViewTitle,group:"navigation",when:s.ContextKeyExpr.equals("view",A.VIEW_ID),order:20}})}run(ie){ie.get(G.ICommandService).executeCommand(k.NEW_FOLDER_COMMAND_ID)}}),(0,m.registerAction2)(class extends m.Action2{constructor(){super({id:"workbench.files.action.refreshFilesExplorer",title:{value:t.localize(3,null),original:"Refresh Explorer"},f1:!0,icon:K.Codicon.refresh,menu:{id:m.MenuId.ViewTitle,group:"navigation",when:s.ContextKeyExpr.equals("view",A.VIEW_ID),order:30}})}async run(ie){const ce=ie.get(Z.IPaneCompositePartService),le=ie.get(H.IExplorerService);await ce.openPaneComposite(A.VIEWLET_ID,0),await le.refresh()}}),(0,m.registerAction2)(class extends m.Action2{constructor(){super({id:"workbench.files.action.collapseExplorerFolders",title:{value:t.localize(4,null),original:"Collapse Folders in Explorer"},f1:!0,icon:K.Codicon.collapseAll,menu:{id:m.MenuId.ViewTitle,group:"navigation",when:s.ContextKeyExpr.equals("view",A.VIEW_ID),order:40}})}run(ie){ie.get(P.IViewsService).getViewWithId(A.VIEW_ID).collapseAll()}})}),define(ne[2762],re([1,0,1589,11,36,10,37,5,59,8,38,44,511,148,635,7,68,12,32,71,178,78,27,2,73,16,289,74,156,131,170,110,305,13,135,154,43,41,279,33,28,18,19,1094]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenEditorsView=void 0;const H=A.$;let K=class Ss extends y.ViewPane{constructor(ee,te,se,ie,ce,le,ae,ue,oe,fe,pe,me,be,Ce){super(ee,ae,ie,le,ue,se,te,Ce,oe,fe);this.editorGroupService=ce,this.menuService=pe,this.workingCopyService=me,this.filesConfigurationService=be,this.needsRefresh=!1,this.elements=[],this.structuralRefreshDelay=0;let ve=[];this.listRefreshScheduler=new f.RunOnceScheduler(()=>{ve=(0,h.dispose)(ve);const he=this.list.length,ge=this.getElements();this.list.splice(0,this.list.length,ge),this.focusActiveEditor(),he!==this.list.length&&this.updateSize(),this.needsRefresh=!1,(this.sortOrder==="alphabetical"||this.sortOrder==="fullPath")&&ge.forEach(de=>{de instanceof c.OpenEditor&&ve.push(de.editor.onDidChangeLabel(()=>this.listRefreshScheduler.schedule()))})},this.structuralRefreshDelay),this.sortOrder=le.getValue("explorer.openEditors.sortOrder"),this.registerUpdateEvents(),this._register(this.configurationService.onDidChangeConfiguration(he=>this.onConfigurationChange(he))),this._register(this.workingCopyService.onDidChangeDirty(he=>this.updateDirtyIndicator(he)))}registerUpdateEvents(){const ee=()=>{if(!this.isBodyVisible()||!this.list){this.needsRefresh=!0;return}this.listRefreshScheduler.schedule(this.structuralRefreshDelay)},te=new Map,se=ie=>{const ce=ie.onDidModelChange(le=>{if(this.listRefreshScheduler.isScheduled())return;if(!this.isBodyVisible()||!this.list){this.needsRefresh=!0;return}const ae=this.getIndex(ie,le.editor);switch(le.kind){case 6:case 0:this.focusActiveEditor();break;case 1:ae>=0&&this.list.splice(ae,1,[ie]);break;case 11:case 10:case 8:case 9:case 7:this.list.splice(ae,1,[new c.OpenEditor(le.editor,ie)]),this.focusActiveEditor();break;case 3:case 5:case 4:ee();break}});te.set(ie.id,ce),this._register(te.get(ie.id))};this.editorGroupService.groups.forEach(ie=>se(ie)),this._register(this.editorGroupService.onDidAddGroup(ie=>{se(ie),ee()})),this._register(this.editorGroupService.onDidMoveGroup(()=>ee())),this._register(this.editorGroupService.onDidRemoveGroup(ie=>{(0,h.dispose)(te.get(ie.id)),ee()}))}renderHeaderTitle(ee){super.renderHeaderTitle(ee,this.title);const te=A.append(ee,H(".count"));this.dirtyCountElement=A.append(te,H(".dirty-count.monaco-count-badge.long")),this._register((0,s.attachStylerCallback)(this.themeService,{badgeBackground:r.badgeBackground,badgeForeground:r.badgeForeground,contrastBorder:r.contrastBorder},se=>{const ie=se.badgeBackground?se.badgeBackground.toString():"",ce=se.badgeForeground?se.badgeForeground.toString():"",le=se.contrastBorder?se.contrastBorder.toString():"";this.dirtyCountElement.style.backgroundColor=ie,this.dirtyCountElement.style.color=ce,this.dirtyCountElement.style.borderWidth=le?"1px":"",this.dirtyCountElement.style.borderStyle=le?"solid":"",this.dirtyCountElement.style.borderColor=le})),this.updateDirtyIndicator()}renderBody(ee){super.renderBody(ee),ee.classList.add("open-editors"),ee.classList.add("show-file-icons");const te=new q;this.list&&this.list.dispose(),this.listLabels&&this.listLabels.clear(),this.listLabels=this.instantiationService.createInstance(u.ResourceLabels,{onDidChangeVisibility:this.onDidChangeBodyVisibility}),this.list=this.instantiationService.createInstance(p.WorkbenchList,"OpenEditors",ee,te,[new Z(this.keybindingService,this.instantiationService),new j(this.listLabels,this.instantiationService,this.keybindingService,this.configurationService)],{identityProvider:{getId:ie=>ie instanceof c.OpenEditor?ie.getId():ie.id.toString()},dnd:new X(this.instantiationService,this.editorGroupService),overrideStyles:{listBackground:this.getBackgroundColor()},accessibilityProvider:new Y}),this._register(this.list),this._register(this.listLabels),this.contributedContextMenu=this.menuService.createMenu(d.MenuId.OpenEditorsContext,this.list.contextKeyService),this._register(this.contributedContextMenu),this.updateSize(),c.OpenEditorsFocusedContext.bindTo(this.list.contextKeyService),c.ExplorerFocusedContext.bindTo(this.list.contextKeyService),this.resourceContext=this.instantiationService.createInstance(b.ResourceContextKey),this._register(this.resourceContext),this.groupFocusedContext=m.OpenEditorsGroupContext.bindTo(this.contextKeyService),this.dirtyEditorFocusedContext=m.OpenEditorsDirtyEditorContext.bindTo(this.contextKeyService),this.readonlyEditorFocusedContext=m.OpenEditorsReadonlyEditorContext.bindTo(this.contextKeyService),this._register(this.list.onContextMenu(ie=>this.onListContextMenu(ie))),this.list.onDidChangeFocus(ie=>{this.resourceContext.reset(),this.groupFocusedContext.reset(),this.dirtyEditorFocusedContext.reset(),this.readonlyEditorFocusedContext.reset();const ce=ie.elements.length?ie.elements[0]:void 0;if(ce instanceof c.OpenEditor){const le=ce.getResource();this.dirtyEditorFocusedContext.set(ce.editor.isDirty()&&!ce.editor.isSaving()),this.readonlyEditorFocusedContext.set(ce.editor.hasCapability(2)),this.resourceContext.set((0,x.withUndefinedAsNull)(le))}else ce&&this.groupFocusedContext.set(!0)}),this._register(this.list.onMouseMiddleClick(ie=>{ie&&ie.element instanceof c.OpenEditor&&ie.element.group.closeEditor(ie.element.editor,{preserveFocus:!0})})),this._register(this.list.onDidOpen(ie=>{if(ie.element)if(ie.element instanceof c.OpenEditor){if(ie.browserEvent instanceof MouseEvent&&ie.browserEvent.button===1)return;this.openEditor(ie.element,{preserveFocus:ie.editorOptions.preserveFocus,pinned:ie.editorOptions.pinned,sideBySide:ie.sideBySide})}else this.editorGroupService.activateGroup(ie.element);else return})),this.listRefreshScheduler.schedule(0),this._register(this.onDidChangeBodyVisibility(ie=>{ie&&this.needsRefresh&&this.listRefreshScheduler.schedule(0)}));const se=this.viewDescriptorService.getViewContainerModel(this.viewDescriptorService.getViewContainerByViewId(this.id));this._register(se.onDidChangeAllViewDescriptors(()=>{this.updateSize()}))}focus(){super.focus(),this.list.domFocus()}getList(){return this.list}layoutBody(ee,te){super.layoutBody(ee,te),this.list&&this.list.layout(ee,te)}get showGroups(){return this.editorGroupService.groups.length>1}getElements(){return this.elements=[],this.editorGroupService.getGroups(2).forEach(ee=>{this.showGroups&&this.elements.push(ee);let te=ee.editors.map(se=>new c.OpenEditor(se,ee));this.sortOrder==="alphabetical"?te=te.sort((se,ie)=>(0,B.compareFileNamesDefault)(se.editor.getName(),ie.editor.getName())):this.sortOrder==="fullPath"&&(te=te.sort((se,ie)=>{const ce=se.editor.resource,le=ie.editor.resource;if(ce===void 0&&le===void 0)return(0,B.compareFileNamesDefault)(se.editor.getName(),ie.editor.getName());if(ce===void 0)return-1;if(le===void 0)return 1;{const ae=ce.scheme,ue=le.scheme;return ae!==z.Schemas.file&&ue!==z.Schemas.file?U.extUriIgnorePathCase.compare(ce,le):ae!==z.Schemas.file?-1:ue!==z.Schemas.file?1:U.extUriIgnorePathCase.compare(ce,le)}})),this.elements.push(...te)}),this.elements}getIndex(ee,te){return te?this.elements.findIndex(se=>se instanceof c.OpenEditor&&se.editor===te&&se.group.id===ee.id):this.elements.findIndex(se=>!(se instanceof c.OpenEditor)&&se.id===ee.id)}openEditor(ee,te){ee&&(this.telemetryService.publicLog2("workbenchActionExecuted",{id:"workbench.files.openFile",from:"openEditors"}),te.sideBySide&&te.preserveFocus||this.editorGroupService.activateGroup(ee.group),(te.sideBySide?this.editorGroupService.sideGroup:this.editorGroupService.activeGroup).openEditor(ee.editor,te))}onListContextMenu(ee){if(!ee.element)return;const te=ee.element,se=[],ie=(0,g.createAndFillInContextMenuActions)(this.contributedContextMenu,{shouldForwardArgs:!0,arg:te instanceof c.OpenEditor?C.EditorResourceAccessor.getOriginalUri(te.editor):{}},se);this.contextMenuService.showContextMenu({getAnchor:()=>ee.anchor,getActions:()=>se,getActionsContext:()=>te instanceof c.OpenEditor?{groupId:te.groupId,editorIndex:te.group.getIndexOfEditor(te.editor)}:{groupId:te.id},onHide:()=>(0,h.dispose)(ie)})}focusActiveEditor(){if(this.list.length&&this.editorGroupService.activeGroup){const ee=this.getIndex(this.editorGroupService.activeGroup,this.editorGroupService.activeGroup.activeEditor);if(ee>=0){try{this.list.setFocus([ee]),this.list.setSelection([ee]),this.list.reveal(ee)}catch{}return}}this.list.setFocus([]),this.list.setSelection([])}onConfigurationChange(ee){ee.affectsConfiguration("explorer.openEditors")&&this.updateSize(),(ee.affectsConfiguration("explorer.decorations")||ee.affectsConfiguration("explorer.openEditors.sortOrder"))&&(this.sortOrder=this.configurationService.getValue("explorer.openEditors.sortOrder"),this.listRefreshScheduler.schedule())}updateSize(){this.minimumBodySize=this.orientation===0?this.getMinExpandedBodySize():170,this.maximumBodySize=this.orientation===0?this.getMaxExpandedBodySize():Number.POSITIVE_INFINITY}updateDirtyIndicator(ee){if(ee&&ee.isDirty()&&!(ee.capabilities&2)&&this.filesConfigurationService.getAutoSaveMode()===1)return;let te=this.workingCopyService.dirtyCount;te===0?this.dirtyCountElement.classList.add("hidden"):(this.dirtyCountElement.textContent=t.localize(1,null,te),this.dirtyCountElement.classList.remove("hidden"))}get elementCount(){return this.editorGroupService.groups.map(ee=>ee.count).reduce((ee,te)=>ee+te,this.showGroups?this.editorGroupService.groups.length:0)}getMaxExpandedBodySize(){return this.viewDescriptorService.getViewContainerModel(this.viewDescriptorService.getViewContainerByViewId(this.id)).visibleViewDescriptors.length<=1?Number.POSITIVE_INFINITY:this.elementCount*q.ITEM_HEIGHT}getMinExpandedBodySize(){let ee=this.configurationService.getValue("explorer.openEditors.visible");return typeof ee!="number"&&(ee=Ss.DEFAULT_VISIBLE_OPEN_EDITORS),this.computeMinExpandedBodySize(ee)}computeMinExpandedBodySize(ee=Ss.DEFAULT_VISIBLE_OPEN_EDITORS){return Math.min(Math.max(ee,1),this.elementCount)*q.ITEM_HEIGHT}setStructuralRefreshDelay(ee){this.structuralRefreshDelay=ee}getOptimalWidth(){let ee=this.list.getHTMLElement(),te=[].slice.call(ee.querySelectorAll(".open-editor > a"));return A.getLargestChildWidth(ee,te)}};K.DEFAULT_VISIBLE_OPEN_EDITORS=9,K.ID="workbench.explorer.openEditorsView",K.NAME=t.localize(0,null),K=Ee([W(1,D.IInstantiationService),W(2,M.IViewDescriptorService),W(3,k.IContextMenuService),W(4,I.IEditorGroupsService),W(5,w.IConfigurationService),W(6,v.IKeybindingService),W(7,S.IContextKeyService),W(8,l.IThemeService),W(9,n.ITelemetryService),W(10,d.IMenuService),W(11,F.IWorkingCopyService),W(12,L.IFilesConfigurationService),W(13,N.IOpenerService)],K),e.OpenEditorsView=K;class G extends _.ActionRunner{async run(ee){if(!!this.editor)return super.run(ee,{groupId:this.editor.groupId,editorIndex:this.editor.group.getIndexOfEditor(this.editor.editor)})}}class q{getHeight(ee){return q.ITEM_HEIGHT}getTemplateId(ee){return ee instanceof c.OpenEditor?j.ID:Z.ID}}q.ITEM_HEIGHT=22;class Z{constructor(ee,te){this.keybindingService=ee,this.instantiationService=te}get templateId(){return Z.ID}renderTemplate(ee){const te=Object.create(null);te.root=A.append(ee,H(".editor-group")),te.name=A.append(te.root,H("span.name")),te.actionBar=new a.ActionBar(ee);const se=this.instantiationService.createInstance(o.SaveAllInGroupAction,o.SaveAllInGroupAction.ID,o.SaveAllInGroupAction.LABEL),ie=this.keybindingService.lookupKeybinding(se.id);te.actionBar.push(se,{icon:!0,label:!1,keybinding:ie?ie.getLabel():void 0});const ce=this.instantiationService.createInstance(o.CloseGroupAction,o.CloseGroupAction.ID,o.CloseGroupAction.LABEL),le=this.keybindingService.lookupKeybinding(ce.id);return te.actionBar.push(ce,{icon:!0,label:!1,keybinding:le?le.getLabel():void 0}),te}renderElement(ee,te,se){se.editorGroup=ee,se.name.textContent=ee.label,se.actionBar.context={groupId:ee.id}}disposeTemplate(ee){ee.actionBar.dispose()}}Z.ID="editorgroup";class j{constructor(ee,te,se,ie){this.labels=ee,this.instantiationService=te,this.keybindingService=se,this.configurationService=ie,this.closeEditorAction=this.instantiationService.createInstance(i.CloseEditorAction,i.CloseEditorAction.ID,i.CloseEditorAction.LABEL),this.unpinEditorAction=this.instantiationService.createInstance(i.UnpinEditorAction,i.UnpinEditorAction.ID,i.UnpinEditorAction.LABEL)}get templateId(){return j.ID}renderTemplate(ee){const te=Object.create(null);return te.container=ee,te.actionRunner=new G,te.actionBar=new a.ActionBar(ee,{actionRunner:te.actionRunner}),te.root=this.labels.create(ee),te}renderElement(ee,te,se){const ie=ee.editor;se.actionRunner.editor=ee,se.container.classList.toggle("dirty",ie.isDirty()&&!ie.isSaving()),se.container.classList.toggle("sticky",ee.isSticky()),se.root.setResource({resource:C.EditorResourceAccessor.getOriginalUri(ie,{supportSideBySide:C.SideBySideEditor.BOTH}),name:ie.getName(),description:ie.getDescription(1)},{italic:ee.isPreview(),extraClasses:["open-editor"].concat(ee.editor.getLabelExtraClasses()),fileDecorations:this.configurationService.getValue().explorer.decorations,title:ie.getTitle(2)});const ce=ee.isSticky()?this.unpinEditorAction:this.closeEditorAction;se.actionBar.hasAction(ce)||(se.actionBar.isEmpty()||se.actionBar.clear(),se.actionBar.push(ce,{icon:!0,label:!1,keybinding:this.keybindingService.lookupKeybinding(ce.id)?.getLabel()}))}disposeTemplate(ee){ee.actionBar.dispose(),ee.root.dispose(),ee.actionRunner.dispose()}}j.ID="openeditor";class X{constructor(ee,te){this.instantiationService=ee,this.editorGroupService=te}get dropHandler(){return this.instantiationService.createInstance(E.ResourcesDropHandler,{allowWorkspaceOpen:!1})}getDragURI(ee){if(ee instanceof c.OpenEditor){const te=ee.getResource();if(te)return te.toString()}return null}getDragLabel(ee){if(ee.length>1)return String(ee.length);const te=ee[0];return te instanceof c.OpenEditor?te.editor.getName():te.label}onDragStart(ee,te){const se=ee.elements,ie=[];if(se)for(const ce of se)ce instanceof c.OpenEditor&&ie.push(ce);ie.length&&this.instantiationService.invokeFunction(E.fillEditorsDragData,ie,te)}onDragOver(ee,te,se,ie){return ee instanceof O.NativeDragAndDropData?(0,E.containsDragType)(ie,T.DataTransfers.FILES,E.CodeDataTransfers.FILES):!0}drop(ee,te,se,ie){const ce=te instanceof c.OpenEditor?te.group:te||this.editorGroupService.groups[this.editorGroupService.count-1],le=te instanceof c.OpenEditor?te.group.getIndexOfEditor(te.editor):0;ee instanceof O.ElementsDragAndDropData?(ee.elements.forEach((ue,oe)=>{ue.group.moveEditor(ue.editor,ce,{index:le+oe,preserveFocus:!0})}),this.editorGroupService.activateGroup(ce)):this.dropHandler.handleDrop(ie,()=>ce,()=>ce.focus(),le)}}Ee([R.memoize],X.prototype,"dropHandler",null);class Y{getWidgetAriaLabel(){return t.localize(2,null)}getAriaLabel(ee){return ee instanceof c.OpenEditor?`${ee.editor.getName()}, ${ee.editor.getDescription()}`:ee.ariaLabel}}const $="workbench.action.toggleEditorGroupLayout";(0,d.registerAction2)(class extends d.Action2{constructor(){super({id:"workbench.action.toggleEditorGroupLayout",title:{value:t.localize(3,null),original:"Toggle Vertical/Horizontal Editor Layout"},f1:!0,keybinding:{primary:1024|512|21,mac:{primary:2048|512|21},weight:200},icon:P.Codicon.editorLayout,menu:{id:d.MenuId.ViewTitle,group:"navigation",when:S.ContextKeyExpr.equals("view",K.ID),order:10}})}async run(J){const ee=J.get(I.IEditorGroupsService),te=ee.orientation===1?0:1;ee.setGroupOrientation(te)}}),d.MenuRegistry.appendMenuItem(d.MenuId.MenubarLayoutMenu,{group:"4_flip",command:{id:$,title:{original:"Flip Layout",value:t.localize(4,null),mnemonicTitle:t.localize(5,null)}},order:1}),(0,d.registerAction2)(class extends d.Action2{constructor(){super({id:"workbench.action.files.saveAll",title:{value:m.SAVE_ALL_LABEL,original:"Save All"},f1:!0,icon:P.Codicon.saveAll,menu:{id:d.MenuId.ViewTitle,group:"navigation",when:S.ContextKeyExpr.equals("view",K.ID),order:20}})}async run(J){await J.get(V.ICommandService).executeCommand(m.SAVE_ALL_COMMAND_ID)}}),(0,d.registerAction2)(class extends d.Action2{constructor(){super({id:"openEditors.closeAll",title:i.CloseAllEditorsAction.LABEL,f1:!1,icon:P.Codicon.closeAll,menu:{id:d.MenuId.ViewTitle,group:"navigation",when:S.ContextKeyExpr.equals("view",K.ID),order:30}})}async run(J){await J.get(D.IInstantiationService).createInstance(i.CloseAllEditorsAction,i.CloseAllEditorsAction.ID,i.CloseAllEditorsAction.LABEL).run()}}),(0,d.registerAction2)(class extends d.Action2{constructor(){super({id:"openEditors.newUntitledFile",title:{value:t.localize(6,null),original:"New Untitled File"},f1:!1,icon:P.Codicon.newFile,menu:{id:d.MenuId.ViewTitle,group:"navigation",when:S.ContextKeyExpr.equals("view",K.ID),order:5}})}async run(J){await J.get(V.ICommandService).executeCommand(m.NEW_UNTITLED_FILE_COMMAND_ID)}})}),define(ne[512],re([1,0,1578,148,8,2761,2759,2762,24,5,40,34,27,7,12,43,37,2,80,161,97,17,67,99,74,141,377,299,14,33,63,1093]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VIEW_CONTAINER=e.ExplorerViewPaneContainer=e.ExplorerViewletViewsContribution=void 0;const R=(0,T.registerIcon)("explorer-view-icon",y.Codicon.files,(0,t.localize)(0,null)),O=(0,T.registerIcon)("open-editors-view-icon",y.Codicon.book,(0,t.localize)(1,null));let x=class extends l.Disposable{constructor(q,Z,j,X){super();this.workspaceContextService=q,this.configurationService=Z,X.withProgress({location:1},()=>q.getCompleteWorkspace()).finally(()=>{this.registerViews(),this.openEditorsVisibleContextKey=f.OpenEditorsVisibleContext.bindTo(j),this.updateOpenEditorsVisibility(),this._register(q.onDidChangeWorkbenchState(()=>this.registerViews())),this._register(q.onDidChangeWorkspaceFolders(()=>this.registerViews())),this._register(this.configurationService.onDidChangeConfiguration(Y=>this.onConfigurationUpdated(Y)))})}registerViews(){const q=K.getViews(e.VIEW_CONTAINER);let Z=[],j=[];const X=this.createOpenEditorsViewDescriptor();q.some(te=>te.id===X.id)||Z.push(X);const Y=this.createExplorerViewDescriptor(),$=q.find(te=>te.id===Y.id),J=this.createEmptyViewDescriptor(),ee=q.find(te=>te.id===J.id);this.workspaceContextService.getWorkbenchState()===1||this.workspaceContextService.getWorkspace().folders.length===0?($&&j.push($),ee||Z.push(J)):(ee&&j.push(ee),$||Z.push(Y)),Z.length&&K.registerViews(Z,e.VIEW_CONTAINER),j.length&&K.deregisterViews(j,e.VIEW_CONTAINER)}createOpenEditorsViewDescriptor(){return{id:D.OpenEditorsView.ID,name:D.OpenEditorsView.NAME,ctorDescriptor:new h.SyncDescriptor(D.OpenEditorsView),containerIcon:O,order:0,when:f.OpenEditorsVisibleContext,canToggleVisibility:!0,canMoveView:!0,collapsed:!1,hideByDefault:!0,focusCommand:{id:"workbench.files.action.focusOpenEditorsView",keybindings:{primary:(0,u.KeyChord)(2048|41,35)}}}}createEmptyViewDescriptor(){return{id:k.EmptyView.ID,name:k.EmptyView.NAME,containerIcon:R,ctorDescriptor:new h.SyncDescriptor(k.EmptyView),order:1,canToggleVisibility:!0,focusCommand:{id:"workbench.explorer.fileView.focus"}}}createExplorerViewDescriptor(){return{id:f.VIEW_ID,name:(0,t.localize)(2,null),containerIcon:R,ctorDescriptor:new h.SyncDescriptor(A.ExplorerView),order:1,canToggleVisibility:!1,focusCommand:{id:"workbench.explorer.fileView.focus"}}}onConfigurationUpdated(q){q.affectsConfiguration("explorer.openEditors.visible")&&this.updateOpenEditorsVisibility()}updateOpenEditorsVisibility(){this.openEditorsVisibleContextKey.set(this.workspaceContextService.getWorkbenchState()===1||this.configurationService.getValue("explorer.openEditors.visible")!==0)}};x=Ee([W(0,C.IWorkspaceContextService),W(1,_.IConfigurationService),W(2,c.IContextKeyService),W(3,n.IProgressService)],x),e.ExplorerViewletViewsContribution=x;let F=class extends p.ViewPaneContainer{constructor(q,Z,j,X,Y,$,J,ee,te,se,ie){super(f.VIEWLET_ID,{mergeViewWithContainerWhenSingleView:!0},$,Y,q,te,Z,se,ee,X,j,ie);this.viewletVisibleContextKey=f.ExplorerViewletVisibleContext.bindTo(J),this._register(this.contextService.onDidChangeWorkspaceName(ce=>this.updateTitleArea()))}create(q){super.create(q),q.classList.add("explorer-viewlet")}createView(q,Z){return q.id===f.VIEW_ID?this.instantiationService.createInstance(A.ExplorerView,Z,{willOpenElement:j=>{if(!(j instanceof MouseEvent))return;const X=this.getOpenEditorsView();if(X){let Y=0;this.configurationService.getValue().workbench?.editor?.enablePreview&&(Y=250),X.setStructuralRefreshDelay(Y)}},didOpenElement:j=>{if(!(j instanceof MouseEvent))return;const X=this.getOpenEditorsView();X&&X.setStructuralRefreshDelay(0)}}):super.createView(q,Z)}getExplorerView(){return this.getView(f.VIEW_ID)}getOpenEditorsView(){return this.getView(D.OpenEditorsView.ID)}setVisible(q){this.viewletVisibleContextKey.set(q),super.setVisible(q)}focus(){const q=this.getView(f.VIEW_ID);q&&this.panes.every(Z=>!Z.isExpanded())&&q.setExpanded(!0),q?.isExpanded()?q.focus():super.focus()}};F=Ee([W(0,r.IWorkbenchLayoutService),W(1,o.ITelemetryService),W(2,C.IWorkspaceContextService),W(3,I.IStorageService),W(4,_.IConfigurationService),W(5,w.IInstantiationService),W(6,c.IContextKeyService),W(7,i.IThemeService),W(8,s.IContextMenuService),W(9,v.IExtensionService),W(10,S.IViewDescriptorService)],F),e.ExplorerViewPaneContainer=F;const L=a.Registry.as(S.Extensions.ViewContainersRegistry);e.VIEW_CONTAINER=L.registerViewContainer({id:f.VIEWLET_ID,title:(0,t.localize)(3,null),ctorDescriptor:new h.SyncDescriptor(F),storageId:"workbench.explorer.views.state",icon:R,alwaysUseContainerInfo:!0,order:0,openCommandActionDescriptor:{id:f.VIEWLET_ID,title:(0,t.localize)(4,null),mnemonicTitle:(0,t.localize)(5,null),keybindings:{primary:2048|1024|35},order:0}},0,{isDefault:!0});const M=(0,t.localize)(6,null),N=(0,t.localize)(7,null),B=(0,t.localize)(8,null),P=`[${M}](command:${m.AddRootFolderAction.ID})`,V=`[${N}](command:${m.AddRootFolderAction.ID})`,z=`[${M}](command:${E.isMacintosh&&!E.isWeb?m.OpenFileFolderAction.ID:m.OpenFolderAction.ID})`,U=`[${M}](command:${m.OpenFolderViaWorkspaceAction.ID})`,H=`[${B}](command:${b.OpenRecentAction.ID})`,K=a.Registry.as(S.Extensions.ViewsRegistry);K.registerViewWelcomeContent(k.EmptyView.ID,{content:(0,t.localize)(9,null,P),when:c.ContextKeyExpr.and(g.WorkbenchStateContext.isEqualTo("workspace"),g.OpenFolderWorkspaceSupportContext),group:S.ViewContentGroups.Open,order:1}),K.registerViewWelcomeContent(k.EmptyView.ID,{content:(0,t.localize)(10,null,U,H),when:c.ContextKeyExpr.and(g.WorkbenchStateContext.isEqualTo("workspace"),g.OpenFolderWorkspaceSupportContext.toNegated()),group:S.ViewContentGroups.Open,order:1}),K.registerViewWelcomeContent(k.EmptyView.ID,{content:(0,t.localize)(11,null,z),when:c.ContextKeyExpr.and(g.WorkbenchStateContext.notEqualsTo("workspace"),g.RemoteNameContext.notEqualsTo(""),d.IsWebContext.toNegated()),group:S.ViewContentGroups.Open,order:1}),K.registerViewWelcomeContent(k.EmptyView.ID,{content:(0,t.localize)(12,null,z,V),when:c.ContextKeyExpr.and(c.ContextKeyExpr.has("editorIsOpen"),c.ContextKeyExpr.or(c.ContextKeyExpr.and(g.WorkbenchStateContext.notEqualsTo("workspace"),g.RemoteNameContext.isEqualTo("")),c.ContextKeyExpr.and(g.WorkbenchStateContext.notEqualsTo("workspace"),d.IsWebContext))),group:S.ViewContentGroups.Open,order:1}),K.registerViewWelcomeContent(k.EmptyView.ID,{content:(0,t.localize)(13,null,z),when:c.ContextKeyExpr.and(c.ContextKeyExpr.has("editorIsOpen")?.negate(),c.ContextKeyExpr.or(c.ContextKeyExpr.and(g.WorkbenchStateContext.notEqualsTo("workspace"),g.RemoteNameContext.isEqualTo("")),c.ContextKeyExpr.and(g.WorkbenchStateContext.notEqualsTo("workspace"),d.IsWebContext))),group:S.ViewContentGroups.Open,order:1})}),define(ne[2763],re([1,0,1584,48,17,57,47,44,23,148,2682,903,432,2601,99,14,512,149,45,35,2379,430,18,2380,553,2690,39,147,220,2713,126,8]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let O=class{constructor(M){M.registerFormatter({scheme:n.Schemas.file,formatting:{label:"${authority}${path}",separator:f.sep,tildify:!S.isWindows,normalizeDriveLetter:S.isWindows,authorityPrefix:f.sep+f.sep,workspaceSuffix:""}})}};O=Ee([W(0,r.ILabelService)],O),(0,p.registerSingleton)(E.IExplorerService,u.ExplorerService,!0),_.Registry.as(D.EditorExtensions.EditorPane).registerEditorPane(l.EditorPaneDescriptor.create(c.BinaryFileEditor,c.BinaryFileEditor.ID,t.localize(0,null)),[new i.SyncDescriptor(o.FileEditorInput)]),_.Registry.as(D.EditorExtensions.EditorFactory).registerFileEditorFactory({typeId:w.FILE_EDITOR_INPUT_ID,createFileEditor:(L,M,N,B,P,V,z,U)=>U.createInstance(o.FileEditorInput,L,M,N,B,P,V,z),isFileEditor:L=>L instanceof o.FileEditorInput}),_.Registry.as(D.EditorExtensions.EditorFactory).registerEditorSerializer(w.FILE_EDITOR_INPUT_ID,y.FileEditorInputSerializer),_.Registry.as(k.Extensions.Workbench).registerWorkbenchContribution(y.FileEditorWorkingCopyEditorHandler,2),_.Registry.as(k.Extensions.Workbench).registerWorkbenchContribution(s.ExplorerViewletViewsContribution,1),_.Registry.as(k.Extensions.Workbench).registerWorkbenchContribution(v.TextFileEditorTracker,1),_.Registry.as(k.Extensions.Workbench).registerWorkbenchContribution(C.TextFileSaveErrorHandler,1),_.Registry.as(k.Extensions.Workbench).registerWorkbenchContribution(O,1),_.Registry.as(k.Extensions.Workbench).registerWorkbenchContribution(h.WorkspaceWatcher,3),_.Registry.as(k.Extensions.Workbench).registerWorkbenchContribution(d.DirtyFilesIndicator,1);const x=_.Registry.as(A.Extensions.Configuration),F=S.isNative?{type:"string",scope:1,enum:[I.HotExitConfiguration.OFF,I.HotExitConfiguration.ON_EXIT,I.HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE],default:I.HotExitConfiguration.ON_EXIT,markdownEnumDescriptions:[t.localize(1,null),t.localize(2,null),t.localize(3,null)],description:t.localize(4,null,I.HotExitConfiguration.ON_EXIT,I.HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE)}:{type:"string",scope:1,enum:[I.HotExitConfiguration.OFF,I.HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE],default:I.HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE,markdownEnumDescriptions:[t.localize(5,null),t.localize(6,null)],description:t.localize(7,null,I.HotExitConfiguration.ON_EXIT,I.HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE)};x.registerConfiguration({id:"files",order:9,title:t.localize(8,null),type:"object",properties:{[I.FILES_EXCLUDE_CONFIG]:{type:"object",markdownDescription:t.localize(9,null),default:{"**/.git":!0,"**/.svn":!0,"**/.hg":!0,"**/CVS":!0,"**/.DS_Store":!0,"**/Thumbs.db":!0,...S.isWeb?{"**/*.crswap":!0}:void 0},scope:4,additionalProperties:{anyOf:[{type:"boolean",description:t.localize(10,null)},{type:"object",properties:{when:{type:"string",pattern:"\\w*\\$\\(basename\\)\\w*",default:"$(basename).ext",markdownDescription:t.localize(11,null)}}}]}},[I.FILES_ASSOCIATIONS_CONFIG]:{type:"object",markdownDescription:t.localize(12,null),additionalProperties:{type:"string"}},"files.encoding":{type:"string",enum:Object.keys(a.SUPPORTED_ENCODINGS),default:"utf8",description:t.localize(13,null),scope:5,enumDescriptions:Object.keys(a.SUPPORTED_ENCODINGS).map(L=>a.SUPPORTED_ENCODINGS[L].labelLong),enumItemLabels:Object.keys(a.SUPPORTED_ENCODINGS).map(L=>a.SUPPORTED_ENCODINGS[L].labelLong)},"files.autoGuessEncoding":{type:"boolean",default:!1,markdownDescription:t.localize(14,null),scope:5},"files.eol":{type:"string",enum:[` `,`\r `,"auto"],enumDescriptions:[t.localize(15,null),t.localize(16,null),t.localize(17,null)],default:"auto",description:t.localize(18,null),scope:5},"files.enableTrash":{type:"boolean",default:!0,description:t.localize(19,null)},"files.trimTrailingWhitespace":{type:"boolean",default:!1,description:t.localize(20,null),scope:5},"files.insertFinalNewline":{type:"boolean",default:!1,description:t.localize(21,null),scope:5},"files.trimFinalNewlines":{type:"boolean",default:!1,description:t.localize(22,null),scope:5},"files.autoSave":{type:"string",enum:[I.AutoSaveConfiguration.OFF,I.AutoSaveConfiguration.AFTER_DELAY,I.AutoSaveConfiguration.ON_FOCUS_CHANGE,I.AutoSaveConfiguration.ON_WINDOW_CHANGE],markdownEnumDescriptions:[t.localize(23,null),t.localize(24,null),t.localize(25,null),t.localize(26,null)],default:S.isWeb?I.AutoSaveConfiguration.AFTER_DELAY:I.AutoSaveConfiguration.OFF,markdownDescription:t.localize(27,null,I.AutoSaveConfiguration.OFF,I.AutoSaveConfiguration.AFTER_DELAY,I.AutoSaveConfiguration.ON_FOCUS_CHANGE,I.AutoSaveConfiguration.ON_WINDOW_CHANGE,I.AutoSaveConfiguration.AFTER_DELAY)},"files.autoSaveDelay":{type:"number",default:1e3,minimum:0,markdownDescription:t.localize(28,null,I.AutoSaveConfiguration.AFTER_DELAY)},"files.watcherExclude":{type:"object",default:{"**/.git/objects/**":!0,"**/.git/subtree-cache/**":!0,"**/node_modules/*/**":!0,"**/.hg/store/**":!0},markdownDescription:t.localize(29,null),scope:4},"files.watcherInclude":{type:"array",items:{type:"string"},default:[],description:t.localize(30,null),scope:4},"files.hotExit":F,"files.defaultLanguage":{type:"string",markdownDescription:t.localize(31,null)},"files.maxMemoryForLargeFilesMB":{type:"number",default:4096,minimum:0,markdownDescription:t.localize(32,null),included:S.isNative},"files.restoreUndoStack":{type:"boolean",description:t.localize(33,null),default:!0},"files.saveConflictResolution":{type:"string",enum:["askUser","overwriteFileOnDisk"],enumDescriptions:[t.localize(34,null),t.localize(35,null)],description:t.localize(36,null),default:"askUser",scope:5},"files.simpleDialog.enable":{type:"boolean",description:t.localize(37,null),default:!1}}}),x.registerConfiguration({...g.editorConfigurationBaseNode,properties:{"editor.formatOnSave":{type:"boolean",description:t.localize(38,null),scope:5},"editor.formatOnSaveMode":{type:"string",default:"file",enum:["file","modifications","modificationsIfAvailable"],enumDescriptions:[t.localize(39,null),t.localize(40,null),t.localize(41,null)],markdownDescription:t.localize(42,null),scope:5}}}),x.registerConfiguration({id:"explorer",order:10,title:t.localize(43,null),type:"object",properties:{"explorer.openEditors.visible":{type:"number",description:t.localize(44,null),default:9,minimum:0},"explorer.openEditors.sortOrder":{type:"string",enum:["editorOrder","alphabetical","fullPath"],description:t.localize(45,null),enumDescriptions:[t.localize(46,null),t.localize(47,null),t.localize(48,null)],default:"editorOrder"},"explorer.autoReveal":{type:["boolean","string"],enum:[!0,!1,"focusNoScroll"],default:!0,enumDescriptions:[t.localize(49,null),t.localize(50,null),t.localize(51,null)],description:t.localize(52,null)},"explorer.enableDragAndDrop":{type:"boolean",description:t.localize(53,null),default:!0},"explorer.confirmDragAndDrop":{type:"boolean",description:t.localize(54,null),default:!0},"explorer.confirmDelete":{type:"boolean",description:t.localize(55,null),default:!0},"explorer.enableUndo":{type:"boolean",description:t.localize(56,null),default:!0},"explorer.confirmUndo":{type:"string",enum:["verbose","default","light"],description:t.localize(57,null),default:"default",enumDescriptions:[t.localize(58,null),t.localize(59,null),t.localize(60,null)]},"explorer.expandSingleFolderWorkspaces":{type:"boolean",description:t.localize(61,null),default:!0},"explorer.sortOrder":{type:"string",enum:["default","mixed","filesFirst","type","modified","foldersNestsFiles"],default:"default",enumDescriptions:[t.localize(62,null),t.localize(63,null),t.localize(64,null),t.localize(65,null),t.localize(66,null),t.localize(67,null)],markdownDescription:t.localize(68,null)},"explorer.sortOrderLexicographicOptions":{type:"string",enum:["default","upper","lower","unicode"],default:"default",enumDescriptions:[t.localize(69,null),t.localize(70,null),t.localize(71,null),t.localize(72,null)],description:t.localize(73,null)},"explorer.decorations.colors":{type:"boolean",description:t.localize(74,null),default:!0},"explorer.decorations.badges":{type:"boolean",description:t.localize(75,null),default:!0},"explorer.incrementalNaming":{type:"string",enum:["simple","smart"],enumDescriptions:[t.localize(76,null),t.localize(77,null)],description:t.localize(78,null),default:"simple"},"explorer.compactFolders":{type:"boolean",description:t.localize(79,null),default:!0},"explorer.copyRelativePathSeparator":{type:"string",enum:["/","\\","auto"],enumDescriptions:[t.localize(80,null),t.localize(81,null),t.localize(82,null)],description:t.localize(83,null),default:"auto"},"explorer.experimental.fileNesting.enabled":{type:"boolean",scope:4,markdownDescription:t.localize(84,null),default:!1},"explorer.experimental.fileNesting.expand":{type:"boolean",markdownDescription:t.localize(85,null),default:!0},"explorer.experimental.fileNesting.operateAsGroup":{type:"boolean",markdownDescription:t.localize(86,null),default:!0},"explorer.experimental.fileNesting.patterns":{type:"object",scope:4,markdownDescription:t.localize(87,null),patternProperties:{"^[^*]*\\*?[^*]*$":{markdownDescription:t.localize(88,null),type:"string",pattern:"^([^,*]*\\*?[^,*]*)(, ?[^,*]*\\*?[^,*]*)*$"}},additionalProperties:!1,default:{"*.ts":"${capture}.js","*.js":"${capture}.js.map, ${capture}.min.js, ${capture}.d.ts","*.jsx":"${capture}.js","*.tsx":"${capture}.ts","tsconfig.json":"tsconfig.*.json","package.json":"package-lock.json, yarn.lock"}}}}),m.UndoCommand.addImplementation(110,"explorer",L=>{const M=L.get(b.IUndoRedoService),N=L.get(E.IExplorerService),P=L.get(R.IConfigurationService).getValue().explorer.enableUndo;return N.hasViewFocus()&&M.canUndo(u.UNDO_REDO_SOURCE)&&P?(M.undo(u.UNDO_REDO_SOURCE),!0):!1}),m.RedoCommand.addImplementation(110,"explorer",L=>{const M=L.get(b.IUndoRedoService),N=L.get(E.IExplorerService),P=L.get(R.IConfigurationService).getValue().explorer.enableUndo;return N.hasViewFocus()&&M.canRedo(u.UNDO_REDO_SOURCE)&&P?(M.redo(u.UNDO_REDO_SOURCE),!0):!1}),T.ModesRegistry.registerLanguage({id:w.BINARY_TEXT_FILE_MODE,aliases:["Binary"],mimetypes:["text/x-code-binary"]})}),define(ne[2764],re([1,0,1593,34,14,18,87,94,58,97,220,71,21,2151,16,74,944,44,7]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const p="revealFileInOS",u=_.isWindows?t.localize(0,null):_.isMacintosh?t.localize(1,null):t.localize(2,null),a=r.ContextKeyExpr.or(S.ResourceContextKey.Scheme.isEqualTo(A.Schemas.file),S.ResourceContextKey.Scheme.isEqualTo(A.Schemas.vscodeUserData));D.KeybindingsRegistry.registerCommandAndKeybindingRule({id:p,weight:200,when:I.EditorContextKeys.focus.toNegated(),primary:2048|512|48,win:{primary:1024|512|48},handler:(d,m)=>{const b=(0,v.getMultiSelectedResources)(m,d.get(C.IListService),d.get(o.IEditorService),d.get(v.IExplorerService));(0,c.revealResourcesInOS)(b,d.get(k.INativeHostService),d.get(f.IWorkspaceContextService))}});const n="workbench.action.files.revealActiveFileInWindows";D.KeybindingsRegistry.registerCommandAndKeybindingRule({weight:200,when:void 0,primary:(0,w.KeyChord)(2048|41,48),id:n,handler:d=>{const b=d.get(o.IEditorService).activeEditor,E=l.EditorResourceAccessor.getOriginalUri(b,{filterByScheme:A.Schemas.file,supportSideBySide:l.SideBySideEditor.PRIMARY}),y=E?[E]:[];(0,c.revealResourcesInOS)(y,d.get(k.INativeHostService),d.get(f.IWorkspaceContextService))}}),(0,s.appendEditorTitleContextMenuItem)(p,u,a);const h={id:p,title:u};i.MenuRegistry.appendMenuItem(i.MenuId.OpenEditorsContext,{group:"navigation",order:20,command:h,when:a}),i.MenuRegistry.appendMenuItem(i.MenuId.ExplorerContext,{group:"navigation",order:20,command:h,when:a});const g={value:t.localize(3,null),original:"File"};(0,s.appendToCommandPalette)(p,{value:u,original:_.isWindows?"Reveal in File Explorer":_.isMacintosh?"Reveal in Finder":"Open Containing Folder"},g,a)}),define(ne[2765],re([1,0,10,36,27,21,320,582,5,796,8,487,298,12,24,1620,7,92,6,71,795,51,34,2270,37,78,16,38,91,178,125,13,214,98,32,131,43,41,33,134,56,2,15,55,44,73,156,1097]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H,K,G,q){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkersView=void 0;function Z(Y){return l.Iterable.map(Y.markers,$=>{const J=l.Iterable.from($.relatedInformation),ee=l.Iterable.map(J,te=>({element:te}));return{element:$,children:ee}})}let j=class extends L.ViewPane{constructor($,J,ee,te,se,ie,ce,le,ae,ue,oe,fe,pe,me,be,Ce){super($,pe,ue,se,le,ee,J,be,Ce,ie);this.editorService=te,this.markerService=ce,this.workspaceContextService=ae,this.menuService=oe,this.uriIdentityService=fe,this.lastSelectedRelativeTop=0,this.currentActiveResource=null,this.onVisibleDisposables=this._register(new z.DisposableStore),this._onDidChangeFilterStats=this._register(new r.Emitter),this.onDidChangeFilterStats=this._onDidChangeFilterStats.event,this.cachedFilterStats=void 0,this.currentResourceGotAddedToMarkersData=!1,this.onDidChangeVisibility=this.onDidChangeBodyVisibility,this._onDidFocusFilter=this._register(new r.Emitter),this.onDidFocusFilter=this._onDidFocusFilter.event,this._onDidClearFilterText=this._register(new r.Emitter),this.onDidClearFilterText=this._onDidClearFilterText.event,this.smallLayoutContextKey=k.default.MarkersViewSmallLayoutContextKey.bindTo(this.contextKeyService),this.panelState=new O.Memento(k.default.MARKERS_VIEW_STORAGE_ID,me).getMemento(1,0),this.markersModel=this._register(J.createInstance(D.MarkersModel)),this.markersViewModel=this._register(J.createInstance(h.MarkersViewModel,this.panelState.multiline)),this._register(this.onDidChangeVisibility(ve=>this.onDidChangeMarkersViewVisibility(ve))),this.setCurrentActiveEditor(),this.filter=new h.Filter(u.FilterOptions.EMPTY(fe)),this.rangeHighlightDecorations=this._register(this.instantiationService.createInstance(o.RangeHighlightDecorations)),this.filters=this._register(new w.MarkersFilters({filterText:this.panelState.filter||"",filterHistory:this.panelState.filterHistory||[],showErrors:this.panelState.showErrors!==!1,showWarnings:this.panelState.showWarnings!==!1,showInfos:this.panelState.showInfos!==!1,excludedFiles:!!this.panelState.useFilesExclude,activeFile:!!this.panelState.activeFile,layout:new t.Dimension(0,0)}))}get smallLayout(){return!!this.smallLayoutContextKey.get()}set smallLayout($){this.smallLayoutContextKey.set($)}renderBody($){super.renderBody($),$.classList.add("markers-panel");const J=t.append($,t.$(".markers-panel-container"));this.createFilterActionBar(J),this.createArialLabelElement(J),this.createMessageBox(J),this.createTree(J),this.updateFilter(),this.filterActionBar.push(new f.Action(`workbench.actions.treeView.${this.id}.filter`)),this.renderContent()}getTitle(){return C.default.MARKERS_PANEL_TITLE_PROBLEMS}layoutBody($,J){super.layoutBody($,J);const ee=this.smallLayout;this.smallLayout=J<600&&$>100,this.smallLayout!==ee&&this.filterActionBar&&this.filterActionBar.getContainer().classList.toggle("hide",!this.smallLayout);const te=this.smallLayout?$-44:$;this.tree&&this.tree.layout(te,J),this.messageBoxContainer&&(this.messageBoxContainer.style.height=`${te}px`),this.filters.layout=new t.Dimension(this.smallLayout?J:J-200,$)}focus(){this.tree&&this.tree.getHTMLElement()===document.activeElement||(this.hasNoProblems()&&this.messageBoxContainer?this.messageBoxContainer.focus():this.tree&&(this.tree.domFocus(),this.setTreeSelection()))}focusFilter(){this._onDidFocusFilter.fire()}clearFilterText(){this._onDidClearFilterText.fire()}showQuickFixes($){const J=this.markersViewModel.getViewModel($);J&&J.quickFixAction.run()}openFileAtElement($,J,ee,te){const{resource:se,selection:ie}=$ instanceof D.Marker?{resource:$.resource,selection:$.range}:$ instanceof D.RelatedInformation?{resource:$.raw.resource,selection:$.raw}:{resource:null,selection:null};return se&&ie?(this.editorService.openEditor({resource:se,options:{selection:ie,preserveFocus:J,pinned:te,revealIfVisible:!0}},ee?A.SIDE_GROUP:A.ACTIVE_GROUP).then(ce=>{ce&&J?this.rangeHighlightDecorations.highlightRange({resource:se,range:ie},ce.getControl()):this.rangeHighlightDecorations.removeHighlightRange()}),!0):(this.rangeHighlightDecorations.removeHighlightRange(),!1)}refreshPanel($){if(this.isVisible()&&this.tree){const J=this.tree.getSelection().length>0;if(this.cachedFilterStats=void 0,$)if($ instanceof D.Marker)this.tree.rerender($);else if($.added.size||$.removed.size)this.resetTree();else for(const se of $.updated)this.tree.setChildren(se,Z(se),{diffIdentityProvider:{getId(ie){return ie.id}}}),this.tree.rerender(se);else this.resetTree();const{total:ee,filtered:te}=this.getFilterStats();this.tree.toggleVisibility(ee===0||te===0),this.renderMessage(),this._onDidChangeFilterStats.fire(this.getFilterStats()),J&&this.setTreeSelection()}}setTreeSelection(){if(this.tree&&this.tree.isVisible()&&this.tree.getSelection().length===0){const $=this.tree.firstVisibleElement,J=$?$ instanceof D.ResourceMarkers?$.markers[0]:$ instanceof D.Marker?$:void 0:void 0;J&&(this.tree.setFocus([J]),this.tree.setSelection([J]))}}onDidChangeViewState($){this.refreshPanel($)}resetTree(){if(!this.tree)return;let $=[];if(this.filters.activeFile){if(this.currentActiveResource){const J=this.markersModel.getResourceMarkers(this.currentActiveResource);J&&($=[J])}}else $=this.markersModel.resourceMarkers;this.tree.setChildren(null,l.Iterable.map($,J=>({element:J,children:Z(J)})))}updateFilter(){this.cachedFilterStats=void 0,this.filter.options=new u.FilterOptions(this.filters.filterText,this.getFilesExcludeExpressions(),this.filters.showWarnings,this.filters.showErrors,this.filters.showInfos,this.uriIdentityService),this.tree&&this.tree.refilter(),this._onDidChangeFilterStats.fire(this.getFilterStats());const{total:$,filtered:J}=this.getFilterStats();this.tree&&this.tree.toggleVisibility($===0||J===0),this.renderMessage()}getFilesExcludeExpressions(){if(!this.filters.excludedFiles)return[];const $=this.workspaceContextService.getWorkspace().folders;return $.length?$.map(J=>({root:J.uri,expression:this.getFilesExclude(J.uri)})):this.getFilesExclude()}getFilesExclude($){return(0,a.deepClone)(this.configurationService.getValue("files.exclude",{resource:$}))||{}}createFilterActionBar($){this.filterActionBar=this._register(new d.ActionBar($,{actionViewItemProvider:J=>this.getActionViewItem(J)})),this.filterActionBar.getContainer().classList.add("markers-panel-filter-container"),this.filterActionBar.getContainer().classList.toggle("hide",!this.smallLayout)}createMessageBox($){this.messageBoxContainer=t.append($,t.$(".message-box-container")),this.messageBoxContainer.setAttribute("aria-labelledby","markers-panel-arialabel")}createArialLabelElement($){this.ariaLabelElement=t.append($,t.$("")),this.ariaLabelElement.setAttribute("id","markers-panel-arialabel")}createTree($){const J=new r.Relay,ee=this._register(this.instantiationService.createInstance(y.ResourceLabels,this)),te=new h.VirtualDelegate(this.markersViewModel),se=[this.instantiationService.createInstance(h.ResourceMarkersRenderer,ee,J.event),this.instantiationService.createInstance(h.MarkerRenderer,this.markersViewModel),this.instantiationService.createInstance(h.RelatedInformationRenderer)],ie=this.instantiationService.createInstance(h.MarkersTreeAccessibilityProvider),ce={getId(ue){return ue.id}};this.tree=this._register(this.instantiationService.createInstance(X,"MarkersView",t.append($,t.$(".tree-container.show-file-icons")),te,se,{filter:this.filter,accessibilityProvider:ie,identityProvider:ce,dnd:this.instantiationService.createInstance(q.ResourceListDnDHandler,ue=>ue instanceof D.ResourceMarkers?ue.resource:ue instanceof D.Marker?(0,N.withSelection)(ue.resource,ue.range):ue instanceof D.RelatedInformation?(0,N.withSelection)(ue.raw.resource,ue.raw):null),expandOnlyOnTwistieClick:ue=>ue instanceof D.Marker&&ue.relatedInformation.length>0,overrideStyles:{listBackground:this.getBackgroundColor()},selectionNavigation:!0,multipleSelectionSupport:!0})),J.input=this.tree.onDidChangeRenderNodeCount;const le=k.default.MarkerFocusContextKey.bindTo(this.tree.contextKeyService),ae=k.default.RelatedInformationFocusContextKey.bindTo(this.tree.contextKeyService);this._register(this.tree.onDidChangeFocus(ue=>{le.set(ue.elements.some(oe=>oe instanceof D.Marker)),ae.set(ue.elements.some(oe=>oe instanceof D.RelatedInformation))})),this._register(r.Event.debounce(this.tree.onDidOpen,(ue,oe)=>oe,75,!0)(ue=>{this.openFileAtElement(ue.element,!!ue.editorOptions.preserveFocus,ue.sideBySide,!!ue.editorOptions.pinned)})),this._register(this.tree.onContextMenu(this.onContextMenu,this)),this._register(this.configurationService.onDidChangeConfiguration(ue=>{this.filters.excludedFiles&&ue.affectsConfiguration("files.exclude")&&this.updateFilter()})),this._register(t.addDisposableListener($,"keydown",ue=>{this.keybindingService.mightProducePrintableCharacter(new E.StandardKeyboardEvent(ue))&&this.focusFilter()})),this._register(r.Event.any(this.tree.onDidChangeSelection,this.tree.onDidChangeFocus)(()=>{const ue=[...this.tree.getSelection(),...this.tree.getFocus()];for(const oe of ue)if(oe instanceof D.Marker){const fe=this.markersViewModel.getViewModel(oe);fe&&fe.showLightBulb()}})),this._register(this.tree.onDidChangeSelection(()=>this.onSelected()))}collapseAll(){this.tree&&(this.tree.collapseAll(),this.tree.setSelection([]),this.tree.setFocus([]),this.tree.getHTMLElement().focus(),this.tree.focusFirst())}setMultiline($){this.markersViewModel.multiline=$}onDidChangeMarkersViewVisibility($){if(this.onVisibleDisposables.clear(),$){for(const J of this.reInitialize())this.onVisibleDisposables.add(J);this.refreshPanel()}else this.tree&&this.tree.toggleVisibility(!0)}reInitialize(){const $=[],J=ee=>this.markerService.read({resource:ee,severities:T.MarkerSeverity.Error|T.MarkerSeverity.Warning|T.MarkerSeverity.Info});return this.markersModel.setResourceMarkers((0,U.groupBy)(J(),D.compareMarkersByUri).map(ee=>[ee[0].resource,ee])),$.push(r.Event.debounce(this.markerService.onMarkerChanged,(ee,te)=>(ee=ee||new H.ResourceMap,te.forEach(se=>ee.set(se,se)),ee),64)(ee=>{this.markersModel.setResourceMarkers([...ee.values()].map(te=>[te,J(te)]))})),$.push(r.Event.any(this.markersModel.onDidChange,this.editorService.onDidActiveEditorChange)(ee=>{ee?this.onDidChangeModel(ee):this.onActiveEditorChanged()})),$.push((0,z.toDisposable)(()=>this.markersModel.reset())),this.markersModel.resourceMarkers.forEach(ee=>ee.markers.forEach(te=>this.markersViewModel.add(te))),$.push(this.markersViewModel.onDidChange(ee=>this.onDidChangeViewState(ee))),$.push((0,z.toDisposable)(()=>this.markersModel.resourceMarkers.forEach(ee=>this.markersViewModel.remove(ee.resource)))),$.push(this.filters.onDidChange(ee=>{ee.activeFile?this.refreshPanel():(ee.filterText||ee.excludedFiles||ee.showWarnings||ee.showErrors||ee.showInfos)&&this.updateFilter()})),$.push((0,z.toDisposable)(()=>{this.cachedFilterStats=void 0})),$.push((0,z.toDisposable)(()=>this.rangeHighlightDecorations.removeHighlightRange())),$}onDidChangeModel($){const J=[...$.added,...$.removed,...$.updated],ee=[];for(const{resource:te}of J){this.markersViewModel.remove(te);const se=this.markersModel.getResourceMarkers(te);if(se)for(const ie of se.markers)this.markersViewModel.add(ie);ee.push(te)}this.currentResourceGotAddedToMarkersData=this.currentResourceGotAddedToMarkersData||this.isCurrentResourceGotAddedToMarkersData(ee),this.refreshPanel($),this.updateRangeHighlights(),this.currentResourceGotAddedToMarkersData&&(this.autoReveal(),this.currentResourceGotAddedToMarkersData=!1)}isCurrentResourceGotAddedToMarkersData($){const J=this.currentActiveResource;return!J||this.getResourceForCurrentActiveResource()?!1:$.some(te=>te.toString()===J.toString())}onActiveEditorChanged(){this.setCurrentActiveEditor(),this.filters.activeFile&&this.refreshPanel(),this.autoReveal()}setCurrentActiveEditor(){const $=this.editorService.activeEditor;this.currentActiveResource=$?(0,R.withUndefinedAsNull)(K.EditorResourceAccessor.getOriginalUri($,{supportSideBySide:K.SideBySideEditor.PRIMARY})):null}onSelected(){if(this.tree){let $=this.tree.getSelection();$&&$.length>0&&(this.lastSelectedRelativeTop=this.tree.getRelativeTop($[0])||0)}}hasNoProblems(){const{total:$,filtered:J}=this.getFilterStats();return $===0||J===0}renderContent(){this.cachedFilterStats=void 0,this.resetTree(),this.tree&&this.tree.toggleVisibility(this.hasNoProblems()),this.renderMessage()}renderMessage(){if(!this.messageBoxContainer||!this.ariaLabelElement)return;t.clearNode(this.messageBoxContainer);const{total:$,filtered:J}=this.getFilterStats();J===0?(this.messageBoxContainer.style.display="block",this.messageBoxContainer.setAttribute("tabIndex","0"),this.filters.activeFile?this.renderFilterMessageForActiveFile(this.messageBoxContainer):$>0?this.renderFilteredByFilterMessage(this.messageBoxContainer):this.renderNoProblemsMessage(this.messageBoxContainer)):(this.messageBoxContainer.style.display="none",J===$?this.setAriaLabel((0,S.localize)(0,null,$)):this.setAriaLabel((0,S.localize)(1,null,J,$)),this.messageBoxContainer.removeAttribute("tabIndex"))}renderFilterMessageForActiveFile($){this.currentActiveResource&&this.markersModel.getResourceMarkers(this.currentActiveResource)?this.renderFilteredByFilterMessage($):this.renderNoProblemsMessageForActiveFile($)}renderFilteredByFilterMessage($){const J=t.append($,t.$("span"));J.textContent=C.default.MARKERS_PANEL_NO_PROBLEMS_FILTERS;const ee=t.append($,t.$("a.messageAction"));ee.textContent=(0,S.localize)(2,null),ee.setAttribute("tabIndex","0");const te=t.append($,t.$("span"));te.textContent=".",t.addStandardDisposableListener(ee,t.EventType.CLICK,()=>this.clearFilters()),t.addStandardDisposableListener(ee,t.EventType.KEY_DOWN,se=>{(se.equals(3)||se.equals(10))&&(this.clearFilters(),se.stopPropagation())}),this.setAriaLabel(C.default.MARKERS_PANEL_NO_PROBLEMS_FILTERS)}renderNoProblemsMessageForActiveFile($){const J=t.append($,t.$("span"));J.textContent=C.default.MARKERS_PANEL_NO_PROBLEMS_ACTIVE_FILE_BUILT,this.setAriaLabel(C.default.MARKERS_PANEL_NO_PROBLEMS_ACTIVE_FILE_BUILT)}renderNoProblemsMessage($){const J=t.append($,t.$("span"));J.textContent=C.default.MARKERS_PANEL_NO_PROBLEMS_BUILT,this.setAriaLabel(C.default.MARKERS_PANEL_NO_PROBLEMS_BUILT)}setAriaLabel($){this.tree&&(this.tree.ariaLabel=$),this.ariaLabelElement.setAttribute("aria-label",$)}clearFilters(){this.filters.filterText="",this.filters.excludedFiles=!1,this.filters.showErrors=!0,this.filters.showWarnings=!0,this.filters.showInfos=!0}autoReveal($=!1){if(this.filters.activeFile||!this.tree)return;let J=this.configurationService.getValue("problems.autoReveal");if(typeof J=="boolean"&&J){let ee=this.getResourceForCurrentActiveResource();ee?this.tree.hasElement(ee)&&(!this.tree.isCollapsed(ee)&&this.hasSelectedMarkerFor(ee)?(this.tree.reveal(this.tree.getSelection()[0],this.lastSelectedRelativeTop),$&&this.tree.setFocus(this.tree.getSelection())):(this.tree.expand(ee),this.tree.reveal(ee,0),$&&(this.tree.setFocus([ee]),this.tree.setSelection([ee])))):$&&(this.tree.setSelection([]),this.tree.focusFirst())}}getResourceForCurrentActiveResource(){return this.currentActiveResource?this.markersModel.getResourceMarkers(this.currentActiveResource):null}hasSelectedMarkerFor($){if(this.tree){let J=this.tree.getSelection();if(J&&J.length>0&&J[0]instanceof D.Marker&&$.has(J[0].marker.resource))return!0}return!1}updateRangeHighlights(){this.rangeHighlightDecorations.removeHighlightRange(),this.tree&&this.tree.getHTMLElement()===document.activeElement&&this.highlightCurrentSelectedMarkerRange()}highlightCurrentSelectedMarkerRange(){const $=this.tree?this.tree.getSelection():[];if($.length!==1)return;const J=$[0];J instanceof D.Marker&&this.rangeHighlightDecorations.highlightRange(J)}onContextMenu($){$.browserEvent.preventDefault(),$.browserEvent.stopPropagation(),this.contextMenuService.showContextMenu({getAnchor:()=>$.anchor,getActions:()=>this.getMenuActions($.element),getActionViewItem:J=>{const ee=this.keybindingService.lookupKeybinding(J.id);if(ee)return new P.ActionViewItem(J,J,{label:!0,keybinding:ee.getLabel()})},onHide:J=>{J&&this.tree.domFocus()}})}getMenuActions($){const J=[];if($ instanceof D.Marker){const te=this.markersViewModel.getViewModel($);if(te){const se=te.quickFixAction.quickFixes;se.length&&(J.push(...se),J.push(new f.Separator))}}const ee=this.menuService.createMenu(m.MenuId.ProblemsPanelContext,this.tree.contextKeyService);return(0,G.createAndFillInContextMenuActions)(ee,void 0,J),ee.dispose(),J}getFocusElement(){return this.tree?.getFocus()[0]||void 0}getFocusedSelectedElements(){const $=this.getFocusElement();if(!$)return null;const J=this.tree.getSelection();if(J.includes($)){const ee=[];for(const te of J)te&&ee.push(te);return ee}else return[$]}getAllResourceMarkers(){return this.markersModel.resourceMarkers}getActionViewItem($){return $.id===`workbench.actions.treeView.${this.id}.filter`?this.instantiationService.createInstance(w.MarkersFilterActionViewItem,$,this):super.getActionViewItem($)}getFilterStats(){return this.cachedFilterStats||(this.cachedFilterStats=this.computeFilterStats()),this.cachedFilterStats}computeFilterStats(){let $=0;if(this.tree){const J=this.tree.getNode();for(const ee of J.children)for(const te of ee.children)ee.visible&&te.visible&&$++}return{total:this.markersModel.total,filtered:$}}saveState(){this.panelState.filter=this.filters.filterText,this.panelState.filterHistory=this.filters.filterHistory,this.panelState.showErrors=this.filters.showErrors,this.panelState.showWarnings=this.filters.showWarnings,this.panelState.showInfos=this.filters.showInfos,this.panelState.useFilesExclude=this.filters.excludedFiles,this.panelState.activeFile=this.filters.activeFile,this.panelState.multiline=this.markersViewModel.multiline,super.saveState()}dispose(){super.dispose()}};j=Ee([W(1,I.IInstantiationService),W(2,M.IViewDescriptorService),W(3,A.IEditorService),W(4,v.IConfigurationService),W(5,_.ITelemetryService),W(6,T.IMarkerService),W(7,s.IContextKeyService),W(8,n.IWorkspaceContextService),W(9,g.IContextMenuService),W(10,m.IMenuService),W(11,V.IUriIdentityService),W(12,b.IKeybindingService),W(13,i.IStorageService),W(14,N.IOpenerService),W(15,c.IThemeService)],j),e.MarkersView=j;let X=class extends p.WorkbenchObjectTree{constructor($,J,ee,te,se,ie,ce,le,ae,ue,oe){super($,J,ee,te,se,ie,ce,le,ae,ue,oe);this.container=J,this.visibilityContextKey=k.default.MarkersTreeVisibilityContextKey.bindTo(ie)}layout($,J){this.container.style.height=`${$}px`,super.layout($,J)}toggleVisibility($){this.visibilityContextKey.set(!$),this.container.classList.toggle("hidden",$)}isVisible(){return!this.container.classList.contains("hidden")}};X=Ee([W(5,s.IContextKeyService),W(6,p.IListService),W(7,c.IThemeService),W(8,v.IConfigurationService),W(9,b.IKeybindingService),W(10,x.IAccessibilityService)],X),(0,c.registerThemingParticipant)((Y,$)=>{const J=Y.getColor(F.editorLightBulbForeground);J&&$.addRule(` .monaco-workbench .markers-panel-container ${B.Codicon.lightBulb.cssSelector} { color: ${J}; }`);const ee=Y.getColor(F.editorLightBulbAutoFixForeground);ee&&$.addRule(` .monaco-workbench .markers-panel-container ${B.Codicon.lightbulbAutofix.cssSelector} { color: ${ee}; }`)})}),define(ne[2766],re([1,0,7,57,70,94,1617,582,2765,16,17,320,487,47,2255,95,2,145,125,43,74,161,99,33,63,131,2429]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:C.default.MARKER_OPEN_ACTION_ID,weight:200,when:t.ContextKeyExpr.and(C.default.MarkerFocusContextKey),primary:3,mac:{primary:3,secondary:[2048|18]},handler:(T,R)=>{const O=T.get(p.IViewsService).getActiveViewWithId(C.default.MARKERS_VIEW_ID);O.openFileAtElement(O.getFocusElement(),!1,!1,!0)}}),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:C.default.MARKER_OPEN_SIDE_ACTION_ID,weight:200,when:t.ContextKeyExpr.and(C.default.MarkerFocusContextKey),primary:2048|3,mac:{primary:256|3},handler:(T,R)=>{const O=T.get(p.IViewsService).getActiveViewWithId(C.default.MARKERS_VIEW_ID);O.openFileAtElement(O.getFocusElement(),!1,!0,!0)}}),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:C.default.MARKER_SHOW_PANEL_ID,weight:200,when:void 0,primary:void 0,handler:async(T,R)=>{await T.get(p.IViewsService).openView(C.default.MARKERS_VIEW_ID)}}),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:C.default.MARKER_SHOW_QUICK_FIX,weight:200,when:C.default.MarkerFocusContextKey,primary:2048|84,handler:(T,R)=>{const O=T.get(p.IViewsService).getActiveViewWithId(C.default.MARKERS_VIEW_ID),x=O.getFocusElement();x instanceof D.Marker&&O.showQuickFixes(x)}}),v.Registry.as(f.Extensions.Configuration).registerConfiguration({id:"problems",order:101,title:o.default.PROBLEMS_PANEL_CONFIGURATION_TITLE,type:"object",properties:{"problems.autoReveal":{description:o.default.PROBLEMS_PANEL_CONFIGURATION_AUTO_REVEAL,type:"boolean",default:!0},"problems.showCurrentInStatus":{description:o.default.PROBLEMS_PANEL_CONFIGURATION_SHOW_CURRENT_STATUS,type:"boolean",default:!1},"problems.sortOrder":{description:o.default.PROBLEMS_PANEL_CONFIGURATION_COMPARE_ORDER,type:"string",default:"severity",enum:["severity","position"],enumDescriptions:[o.default.PROBLEMS_PANEL_CONFIGURATION_COMPARE_ORDER_SEVERITY,o.default.PROBLEMS_PANEL_CONFIGURATION_COMPARE_ORDER_POSITION]}}});const m=(0,g.registerIcon)("markers-view-icon",h.Codicon.warning,(0,k.localize)(0,null)),b=v.Registry.as(p.Extensions.ViewContainersRegistry).registerViewContainer({id:C.default.MARKERS_CONTAINER_ID,title:o.default.MARKERS_PANEL_TITLE_PROBLEMS,icon:m,hideIfEmpty:!0,order:0,ctorDescriptor:new n.SyncDescriptor(a.ViewPaneContainer,[C.default.MARKERS_CONTAINER_ID,{mergeViewWithContainerWhenSingleView:!0,donotShowContainerTitleWhenMergedWithContainer:!0}]),storageId:C.default.MARKERS_VIEW_STORAGE_ID},1,{donotRegisterOpenCommand:!0});v.Registry.as(p.Extensions.ViewsRegistry).registerViews([{id:C.default.MARKERS_VIEW_ID,containerIcon:m,name:o.default.MARKERS_PANEL_TITLE_PROBLEMS,canToggleVisibility:!1,canMoveView:!0,ctorDescriptor:new n.SyncDescriptor(I.MarkersView),openCommandActionDescriptor:{id:"workbench.actions.view.problems",mnemonicTitle:(0,k.localize)(1,null),keybindings:{primary:2048|1024|43},order:0}}],b);const E=v.Registry.as(c.Extensions.Workbench);E.registerWorkbenchContribution(i.ActivityUpdater,3),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:"workbench.action.problems.focus",title:{value:o.default.MARKERS_PANEL_SHOW_LABEL,original:"Focus Problems (Errors, Warnings, Infos)"},category:_.CATEGORIES.View,f1:!0})}async run(T){T.get(p.IViewsService).openView(C.default.MARKERS_VIEW_ID,!0)}}),(0,w.registerAction2)(class extends d.ViewAction{constructor(){const T=t.ContextKeyExpr.and(u.FocusedViewContext.isEqualTo(C.default.MARKERS_VIEW_ID),C.default.MarkersTreeVisibilityContextKey,C.default.RelatedInformationFocusContextKey.toNegated());super({id:C.default.MARKER_COPY_ACTION_ID,title:{value:(0,k.localize)(2,null),original:"Copy"},menu:{id:w.MenuId.ProblemsPanelContext,when:T,group:"navigation"},keybinding:{weight:200,primary:2048|33,when:T},viewId:C.default.MARKERS_VIEW_ID})}async runInView(T,R){const O=T.get(S.IClipboardService),x=R.getFocusedSelectedElements()||R.getAllResourceMarkers(),F=[],L=M=>{F.includes(M)||F.push(M)};for(const M of x)M instanceof D.ResourceMarkers?M.markers.forEach(L):M instanceof D.Marker&&L(M);F.length&&await O.writeText(`[${F}]`)}}),(0,w.registerAction2)(class extends d.ViewAction{constructor(){super({id:C.default.MARKER_COPY_MESSAGE_ACTION_ID,title:{value:(0,k.localize)(3,null),original:"Copy Message"},menu:{id:w.MenuId.ProblemsPanelContext,when:C.default.MarkerFocusContextKey,group:"navigation"},viewId:C.default.MARKERS_VIEW_ID})}async runInView(T,R){const O=T.get(S.IClipboardService),x=R.getFocusElement();x instanceof D.Marker&&await O.writeText(x.marker.message)}}),(0,w.registerAction2)(class extends d.ViewAction{constructor(){super({id:C.default.RELATED_INFORMATION_COPY_MESSAGE_ACTION_ID,title:{value:(0,k.localize)(4,null),original:"Copy Message"},menu:{id:w.MenuId.ProblemsPanelContext,when:C.default.RelatedInformationFocusContextKey,group:"navigation"},viewId:C.default.MARKERS_VIEW_ID})}async runInView(T,R){const O=T.get(S.IClipboardService),x=R.getFocusElement();x instanceof D.RelatedInformation&&await O.writeText(x.raw.message)}}),(0,w.registerAction2)(class extends d.ViewAction{constructor(){super({id:C.default.FOCUS_PROBLEMS_FROM_FILTER,title:(0,k.localize)(5,null),keybinding:{when:C.default.MarkerViewFilterFocusContextKey,weight:200,primary:2048|18},viewId:C.default.MARKERS_VIEW_ID})}async runInView(T,R){R.focus()}}),(0,w.registerAction2)(class extends d.ViewAction{constructor(){super({id:C.default.MARKERS_VIEW_FOCUS_FILTER,title:(0,k.localize)(6,null),keybinding:{when:u.FocusedViewContext.isEqualTo(C.default.MARKERS_VIEW_ID),weight:200,primary:2048|36},viewId:C.default.MARKERS_VIEW_ID})}async runInView(T,R){R.focusFilter()}}),(0,w.registerAction2)(class extends d.ViewAction{constructor(){super({id:C.default.MARKERS_VIEW_SHOW_MULTILINE_MESSAGE,title:{value:(0,k.localize)(7,null),original:"Problems: Show message in multiple lines"},category:(0,k.localize)(8,null),menu:{id:w.MenuId.CommandPalette,when:t.ContextKeyExpr.has((0,u.getVisbileViewContextKey)(C.default.MARKERS_VIEW_ID))},viewId:C.default.MARKERS_VIEW_ID})}async runInView(T,R){R.setMultiline(!0)}}),(0,w.registerAction2)(class extends d.ViewAction{constructor(){super({id:C.default.MARKERS_VIEW_SHOW_SINGLELINE_MESSAGE,title:{value:(0,k.localize)(9,null),original:"Problems: Show message in single line"},category:(0,k.localize)(10,null),menu:{id:w.MenuId.CommandPalette,when:t.ContextKeyExpr.has((0,u.getVisbileViewContextKey)(C.default.MARKERS_VIEW_ID))},viewId:C.default.MARKERS_VIEW_ID})}async runInView(T,R){R.setMultiline(!1)}}),(0,w.registerAction2)(class extends d.ViewAction{constructor(){super({id:C.default.MARKERS_VIEW_CLEAR_FILTER_TEXT,title:(0,k.localize)(11,null),category:(0,k.localize)(12,null),keybinding:{when:C.default.MarkerViewFilterFocusContextKey,weight:200,primary:9},viewId:C.default.MARKERS_VIEW_ID})}async runInView(T,R){R.clearFilterText()}}),(0,w.registerAction2)(class extends d.ViewAction{constructor(){super({id:`workbench.actions.treeView.${C.default.MARKERS_VIEW_ID}.collapseAll`,title:(0,k.localize)(13,null),menu:{id:w.MenuId.ViewTitle,when:t.ContextKeyExpr.equals("view",C.default.MARKERS_VIEW_ID),group:"navigation",order:2},icon:h.Codicon.collapseAll,viewId:C.default.MARKERS_VIEW_ID})}async runInView(T,R){return R.collapseAll()}}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:`workbench.actions.treeView.${C.default.MARKERS_VIEW_ID}.filter`,title:(0,k.localize)(14,null),menu:{id:w.MenuId.ViewTitle,when:t.ContextKeyExpr.and(t.ContextKeyExpr.equals("view",C.default.MARKERS_VIEW_ID),C.default.MarkersViewSmallLayoutContextKey.negate()),group:"navigation",order:1}})}async run(){}}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:C.default.TOGGLE_MARKERS_VIEW_ACTION_ID,title:o.default.MARKERS_PANEL_TOGGLE_LABEL})}async run(T){const R=T.get(p.IViewsService);R.isViewVisible(C.default.MARKERS_VIEW_ID)?R.closeView(C.default.MARKERS_VIEW_ID):R.openView(C.default.MARKERS_VIEW_ID,!0)}});let y=class extends s.Disposable{constructor(R,O){super();this.markerService=R,this.statusbarService=O,this.markersStatusItem=this._register(this.statusbarService.addEntry(this.getMarkersItem(),"status.problems",0,50)),this.markerService.onMarkerChanged(()=>this.markersStatusItem.update(this.getMarkersItem()))}getMarkersItem(){const R=this.markerService.getStatistics(),O=this.getMarkersTooltip(R);return{name:(0,k.localize)(15,null),text:this.getMarkersText(R),ariaLabel:O,tooltip:O,command:"workbench.actions.view.toggleProblems"}}getMarkersTooltip(R){const O=M=>(0,k.localize)(16,null,M),x=M=>(0,k.localize)(17,null,M),F=M=>(0,k.localize)(18,null,M),L=[];return R.errors>0&&L.push(O(R.errors)),R.warnings>0&&L.push(x(R.warnings)),R.infos>0&&L.push(F(R.infos)),L.length===0?(0,k.localize)(19,null):L.join(", ")}getMarkersText(R){const O=[];return O.push("$(error) "+this.packNumber(R.errors)),O.push("$(warning) "+this.packNumber(R.warnings)),R.infos>0&&O.push("$(info) "+this.packNumber(R.infos)),O.join(" ")}packNumber(R){const O=(0,k.localize)(20,null);return R>9999?O:R>999?R.toString().charAt(0)+"K":R.toString()}};y=Ee([W(0,r.IMarkerService),W(1,l.IStatusbarService)],y),E.registerWorkbenchContribution(y,3)}),define(ne[2767],re([1,0,1664,43,2510,17,57,512,99,33,63]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const C=(0,v.registerIcon)("outline-view-icon",w.Codicon.symbolClass,(0,t.localize)(0,null)),o={id:_.OutlinePane.Id,name:(0,t.localize)(1,null),containerIcon:C,ctorDescriptor:new I.SyncDescriptor(_.OutlinePane),canToggleVisibility:!0,canMoveView:!0,hideByDefault:!1,collapsed:!0,order:2,weight:30,focusCommand:{id:"outline.focus"}};A.Registry.as(f.Extensions.ViewsRegistry).registerViews([o],D.VIEW_CONTAINER),A.Registry.as(k.Extensions.Configuration).registerConfiguration({id:"outline",order:117,title:(0,t.localize)(2,null),type:"object",properties:{["outline.icons"]:{description:(0,t.localize)(3,null),type:"boolean",default:!0},["outline.problems.enabled"]:{description:(0,t.localize)(4,null),type:"boolean",default:!0},["outline.problems.colors"]:{description:(0,t.localize)(5,null),type:"boolean",default:!0},["outline.problems.badges"]:{description:(0,t.localize)(6,null),type:"boolean",default:!0},"outline.showFiles":{type:"boolean",scope:5,default:!0,markdownDescription:(0,t.localize)(7,null)},"outline.showModules":{type:"boolean",scope:5,default:!0,markdownDescription:(0,t.localize)(8,null)},"outline.showNamespaces":{type:"boolean",default:!0,scope:5,markdownDescription:(0,t.localize)(9,null)},"outline.showPackages":{type:"boolean",default:!0,scope:5,markdownDescription:(0,t.localize)(10,null)},"outline.showClasses":{type:"boolean",default:!0,scope:5,markdownDescription:(0,t.localize)(11,null)},"outline.showMethods":{type:"boolean",default:!0,scope:5,markdownDescription:(0,t.localize)(12,null)},"outline.showProperties":{type:"boolean",default:!0,scope:5,markdownDescription:(0,t.localize)(13,null)},"outline.showFields":{type:"boolean",default:!0,scope:5,markdownDescription:(0,t.localize)(14,null)},"outline.showConstructors":{type:"boolean",default:!0,scope:5,markdownDescription:(0,t.localize)(15,null)},"outline.showEnums":{type:"boolean",default:!0,scope:5,markdownDescription:(0,t.localize)(16,null)},"outline.showInterfaces":{type:"boolean",default:!0,scope:5,markdownDescription:(0,t.localize)(17,null)},"outline.showFunctions":{type:"boolean",default:!0,scope:5,markdownDescription:(0,t.localize)(18,null)},"outline.showVariables":{type:"boolean",default:!0,scope:5,markdownDescription:(0,t.localize)(19,null)},"outline.showConstants":{type:"boolean",default:!0,scope:5,markdownDescription:(0,t.localize)(20,null)},"outline.showStrings":{type:"boolean",default:!0,scope:5,markdownDescription:(0,t.localize)(21,null)},"outline.showNumbers":{type:"boolean",default:!0,scope:5,markdownDescription:(0,t.localize)(22,null)},"outline.showBooleans":{type:"boolean",scope:5,default:!0,markdownDescription:(0,t.localize)(23,null)},"outline.showArrays":{type:"boolean",default:!0,scope:5,markdownDescription:(0,t.localize)(24,null)},"outline.showObjects":{type:"boolean",default:!0,scope:5,markdownDescription:(0,t.localize)(25,null)},"outline.showKeys":{type:"boolean",default:!0,scope:5,markdownDescription:(0,t.localize)(26,null)},"outline.showNull":{type:"boolean",default:!0,scope:5,markdownDescription:(0,t.localize)(27,null)},"outline.showEnumMembers":{type:"boolean",default:!0,scope:5,markdownDescription:(0,t.localize)(28,null)},"outline.showStructs":{type:"boolean",default:!0,scope:5,markdownDescription:(0,t.localize)(29,null)},"outline.showEvents":{type:"boolean",default:!0,scope:5,markdownDescription:(0,t.localize)(30,null)},"outline.showOperators":{type:"boolean",default:!0,scope:5,markdownDescription:(0,t.localize)(31,null)},"outline.showTypeParameters":{type:"boolean",default:!0,scope:5,markdownDescription:(0,t.localize)(32,null)}}})}),define(ne[2768],re([1,0,1667,112,97,126,17,16,35,2479,201,928,149,2698,99,47,5,61,43,161,57,53,21,13,7,33,63,70,44,1110]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,I.registerSingleton)(v.IOutputService,w.OutputService),A.ModesRegistry.registerLanguage({id:v.OUTPUT_MODE_ID,extensions:[],mimetypes:[v.OUTPUT_MIME]}),A.ModesRegistry.registerLanguage({id:v.LOG_MODE_ID,extensions:[],mimetypes:[v.LOG_MIME]});const y=(0,m.registerIcon)("output-view-icon",d.Codicon.output,t.localize(0,null)),T=k.Registry.as(r.Extensions.ViewContainersRegistry).registerViewContainer({id:v.OUTPUT_VIEW_ID,title:t.localize(1,null),icon:y,order:1,ctorDescriptor:new i.SyncDescriptor(p.ViewPaneContainer,[v.OUTPUT_VIEW_ID,{mergeViewWithContainerWhenSingleView:!0,donotShowContainerTitleWhenMergedWithContainer:!0}]),storageId:v.OUTPUT_VIEW_ID,hideIfEmpty:!0},1,{donotRegisterOpenCommand:!0});k.Registry.as(r.Extensions.ViewsRegistry).registerViews([{id:v.OUTPUT_VIEW_ID,name:t.localize(2,null),containerIcon:y,canMoveView:!0,canToggleVisibility:!1,ctorDescriptor:new i.SyncDescriptor(C.OutputViewPane),openCommandActionDescriptor:{id:"workbench.action.output.toggleOutput",mnemonicTitle:t.localize(3,null),keybindings:{primary:2048|1024|51,linux:{primary:(0,_.KeyChord)(2048|41,2048|38)}},order:1}}],T),k.Registry.as(E.EditorExtensions.EditorPane).registerEditorPane(o.EditorPaneDescriptor.create(c.LogViewer,c.LogViewer.LOG_VIEWER_EDITOR_ID,t.localize(4,null)),[new i.SyncDescriptor(c.LogViewerInput)]);let R=class{constructor(x,F){F.registerTextModelContentProvider(v.LOG_SCHEME,x.createInstance(w.LogContentProvider))}};R=Ee([W(0,s.IInstantiationService),W(1,l.ITextModelService)],R),k.Registry.as(S.Extensions.Workbench).registerWorkbenchContribution(R,3),(0,D.registerAction2)(class extends D.Action2{constructor(){super({id:"workbench.output.action.switchBetweenOutputs",title:t.localize(5,null),menu:{id:D.MenuId.ViewTitle,when:g.ContextKeyExpr.equals("view",v.OUTPUT_VIEW_ID),group:"navigation",order:1}})}async run(O,x){typeof x=="string"&&O.get(v.IOutputService).showChannel(x,!0)}}),(0,D.registerAction2)(class extends D.Action2{constructor(){super({id:"workbench.output.action.clearOutput",title:{value:t.localize(6,null),original:"Clear Output"},category:b.CATEGORIES.View,menu:[{id:D.MenuId.ViewTitle,when:g.ContextKeyExpr.equals("view",v.OUTPUT_VIEW_ID),group:"navigation",order:2},{id:D.MenuId.CommandPalette},{id:D.MenuId.EditorContext,when:v.CONTEXT_IN_OUTPUT}],icon:d.Codicon.clearAll})}async run(O){const F=O.get(v.IOutputService).getActiveChannel();F&&(F.clear(),f.status(t.localize(7,null)))}}),(0,D.registerAction2)(class extends D.Action2{constructor(){super({id:"workbench.output.action.toggleAutoScroll",title:{value:t.localize(8,null),original:"Toggle Auto Scrolling"},tooltip:t.localize(9,null),menu:{id:D.MenuId.ViewTitle,when:g.ContextKeyExpr.and(g.ContextKeyExpr.equals("view",v.OUTPUT_VIEW_ID)),group:"navigation",order:3},icon:d.Codicon.unlock,toggled:{condition:v.CONTEXT_OUTPUT_SCROLL_LOCK,icon:d.Codicon.lock,tooltip:t.localize(10,null)}})}async run(O){const x=O.get(r.IViewsService).getActiveViewWithId(v.OUTPUT_VIEW_ID);x.scrollLock=!x.scrollLock}}),(0,D.registerAction2)(class extends D.Action2{constructor(){super({id:"workbench.action.openActiveLogOutputFile",title:{value:t.localize(11,null),original:"Open Log Output File"},menu:[{id:D.MenuId.ViewTitle,when:g.ContextKeyExpr.equals("view",v.OUTPUT_VIEW_ID),group:"navigation",order:4},{id:D.MenuId.CommandPalette,when:v.CONTEXT_ACTIVE_LOG_OUTPUT}],icon:d.Codicon.goToFile,precondition:v.CONTEXT_ACTIVE_LOG_OUTPUT})}async run(O){const x=O.get(v.IOutputService),F=O.get(n.IEditorService),L=O.get(s.IInstantiationService),M=this.getLogFileOutputChannelDescriptor(x);M&&await F.openEditor(L.createInstance(c.LogViewerInput,M),{pinned:!0})}getLogFileOutputChannelDescriptor(O){const x=O.getActiveChannel();if(x){const F=O.getChannelDescriptors().filter(L=>L.id===x.id)[0];if(F&&F.file&&F.log)return F}return null}}),(0,D.registerAction2)(class extends D.Action2{constructor(){super({id:"workbench.action.showLogs",title:{value:t.localize(12,null),original:"Show Logs..."},category:b.CATEGORIES.Developer,menu:{id:D.MenuId.CommandPalette}})}async run(O){const x=O.get(v.IOutputService),F=O.get(a.IQuickInputService),L=x.getChannelDescriptors().filter(N=>N.file&&N.log).map(({id:N,label:B})=>({id:N,label:B})),M=await F.pick(L,{placeHolder:t.localize(13,null)});if(M)return x.showChannel(M.id)}}),(0,D.registerAction2)(class extends D.Action2{constructor(){super({id:"workbench.action.openLogFile",title:{value:t.localize(14,null),original:"Open Log File..."},category:b.CATEGORIES.Developer,menu:{id:D.MenuId.CommandPalette}})}async run(O){const x=O.get(v.IOutputService),F=O.get(a.IQuickInputService),L=O.get(s.IInstantiationService),M=O.get(n.IEditorService),N=x.getChannelDescriptors().filter(P=>P.file&&P.log).map(P=>({id:P.id,label:P.label,channel:P})),B=await F.pick(N,{placeHolder:t.localize(15,null)});B&&((0,h.assertIsDefined)(B.channel.file),await M.openEditor(L.createInstance(c.LogViewerInput,B.channel),{pinned:!0}))}}),k.Registry.as(u.Extensions.Configuration).registerConfiguration({id:"output",order:30,title:t.localize(16,null),type:"object",properties:{"output.smartScroll.enabled":{type:"boolean",description:t.localize(17,null),default:!0,scope:3,tags:["output"]}}})}),define(ne[2769],re([1,0,97,2,18,13,39,211,1675,16,28,7,141,99,5,94,45,17,34,376,149,47,44,74,148,2634,2499,2508,321,2665,322,2714,21,50,40,617,108,622,1113]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const B="settings.action.search",P="settings.action.focusSettingsFile",V="settings.action.focusSettingsFromSearch",z="settings.action.focusSettingsList",U="settings.action.focusTOC",H="settings.action.focusSettingControl",K="settings.action.focusLevelUp",G="settings.switchToJSON",q="settings.filterByModified",Z="settings.filterByOnline",j="settings.filterByTelemetry",X="settings.filterUntrusted",Y="workbench.action.openSettings";l.Registry.as(n.EditorExtensions.EditorPane).registerEditorPane(u.EditorPaneDescriptor.create(y.SettingsEditor2,y.SettingsEditor2.ID,I.localize(0,null)),[new c.SyncDescriptor(N.SettingsEditor2Input)]),l.Registry.as(n.EditorExtensions.EditorPane).registerEditorPane(u.EditorPaneDescriptor.create(d.KeybindingsEditor,d.KeybindingsEditor.ID,I.localize(1,null)),[new c.SyncDescriptor(L.KeybindingsEditorInput)]);class ${canSerialize(ae){return!0}serialize(ae){return""}deserialize(ae){return ae.createInstance(L.KeybindingsEditorInput)}}class J{canSerialize(ae){return!0}serialize(ae){return""}deserialize(ae){return ae.createInstance(N.SettingsEditor2Input)}}l.Registry.as(n.EditorExtensions.EditorFactory).registerEditorSerializer(L.KeybindingsEditorInput.ID,$),l.Registry.as(n.EditorExtensions.EditorFactory).registerEditorSerializer(N.SettingsEditor2Input.ID,J);const ee={value:I.localize(2,null),original:"Open Settings (UI)"},te={value:I.localize(3,null),original:"Preferences"};function se(le){return(0,A.isObject)(le)||(le={}),{openToSide:le.openToSide,query:le.query}}let ie=class extends f.Disposable{constructor(ae,ue,oe,fe,pe){super();this.environmentService=ae,this.preferencesService=ue,this.workspaceContextService=oe,this.labelService=fe,this.extensionService=pe,this.registerSettingsActions(),this.registerKeybindingsActions(),this.updatePreferencesEditorMenuItem(),this._register(oe.onDidChangeWorkbenchState(()=>this.updatePreferencesEditorMenuItem())),this._register(oe.onDidChangeWorkspaceFolders(()=>this.updatePreferencesEditorMenuItemForWorkspaceFolders()))}registerSettingsActions(){const ae=this;(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:Y,title:I.localize(4,null),keybinding:{weight:200,when:null,primary:2048|82},menu:{id:w.MenuId.GlobalActivity,group:"2_configuration",order:1}})}run(ue,oe){const fe=typeof oe=="string"?{query:oe}:se(oe);return ue.get(M.IPreferencesService).openSettings(fe)}}),w.MenuRegistry.appendMenuItem(w.MenuId.MenubarPreferencesMenu,{group:"1_settings",command:{id:Y,title:I.localize(5,null)},order:1}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:"workbench.action.openSettings2",title:{value:I.localize(6,null),original:"Open Settings (UI)"},category:te,f1:!0})}run(ue,oe){return oe=se(oe),ue.get(M.IPreferencesService).openSettings({jsonEditor:!1,...oe})}}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:"workbench.action.openSettingsJson",title:{value:I.localize(7,null),original:"Open Settings (JSON)"},category:te,f1:!0})}run(ue,oe){return oe=se(oe),ue.get(M.IPreferencesService).openSettings({jsonEditor:!0,...oe})}}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:"workbench.action.openGlobalSettings",title:{value:I.localize(8,null),original:"Open User Settings"},category:te,f1:!0})}run(ue,oe){return oe=se(oe),ue.get(M.IPreferencesService).openUserSettings(oe)}}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:"workbench.action.openRawDefaultSettings",title:{value:I.localize(9,null),original:"Open Default Settings (JSON)"},category:te,f1:!0})}run(ue){return ue.get(M.IPreferencesService).openRawDefaultSettings()}}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:"_workbench.openUserSettingsEditor",title:ee,icon:E.preferencesOpenSettingsIcon,menu:[{id:w.MenuId.EditorTitle,when:C.ContextKeyExpr.and(h.ResourceContextKey.Resource.isEqualTo(ae.environmentService.settingsResource.toString()),C.ContextKeyExpr.not("isInDiffEditor")),group:"navigation",order:1}]})}run(ue,oe){return oe=se(oe),ue.get(M.IPreferencesService).openUserSettings({jsonEditor:!1,...oe})}}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:G,title:{value:I.localize(10,null),original:"Open Settings (JSON)"},icon:E.preferencesOpenSettingsIcon,menu:[{id:w.MenuId.EditorTitle,when:C.ContextKeyExpr.and(T.CONTEXT_SETTINGS_EDITOR,T.CONTEXT_SETTINGS_JSON_EDITOR.toNegated()),group:"navigation",order:1}]})}run(ue){const oe=ue.get(O.IEditorService).activeEditorPane;return oe instanceof y.SettingsEditor2?oe.switchToSettingsFile():null}}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:m.ConfigureLanguageBasedSettingsAction.ID,title:m.ConfigureLanguageBasedSettingsAction.LABEL,category:te,f1:!0})}run(ue){return ue.get(i.IInstantiationService).createInstance(m.ConfigureLanguageBasedSettingsAction,m.ConfigureLanguageBasedSettingsAction.ID,m.ConfigureLanguageBasedSettingsAction.LABEL.value).run()}}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:"workbench.action.openWorkspaceSettings",title:{value:I.localize(11,null),original:"Open Workspace Settings"},category:te,menu:{id:w.MenuId.CommandPalette,when:h.WorkbenchStateContext.notEqualsTo("empty")}})}run(ue,oe){return oe=se(oe),ue.get(M.IPreferencesService).openWorkspaceSettings(oe)}}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:"workbench.action.openWorkspaceSettingsFile",title:{value:I.localize(12,null),original:"Open Workspace Settings (JSON)"},category:te,menu:{id:w.MenuId.CommandPalette,when:h.WorkbenchStateContext.notEqualsTo("empty")}})}run(ue,oe){return oe=se(oe),ue.get(M.IPreferencesService).openWorkspaceSettings({jsonEditor:!0,...oe})}}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:"workbench.action.openFolderSettings",title:{value:I.localize(13,null),original:"Open Folder Settings"},category:te,menu:{id:w.MenuId.CommandPalette,when:h.WorkbenchStateContext.isEqualTo("workspace")}})}async run(ue,oe){const fe=ue.get(v.ICommandService),pe=ue.get(M.IPreferencesService),me=await fe.executeCommand(p.PICK_WORKSPACE_FOLDER_COMMAND_ID);me&&(oe=se(oe),await pe.openFolderSettings({folderUri:me.uri,...oe}))}}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:"workbench.action.openFolderSettingsFile",title:{value:I.localize(14,null),original:"Open Folder Settings (JSON)"},category:te,menu:{id:w.MenuId.CommandPalette,when:h.WorkbenchStateContext.isEqualTo("workspace")}})}async run(ue,oe){const fe=ue.get(v.ICommandService),pe=ue.get(M.IPreferencesService),me=await fe.executeCommand(p.PICK_WORKSPACE_FOLDER_COMMAND_ID);me&&(oe=se(oe),await pe.openFolderSettings({folderUri:me.uri,jsonEditor:!0,...oe}))}}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:"_workbench.action.openFolderSettings",title:{value:I.localize(15,null),original:"Open Folder Settings"},category:te,menu:{id:w.MenuId.ExplorerContext,group:"2_workspace",order:20,when:C.ContextKeyExpr.and(g.ExplorerRootContext,g.ExplorerFolderContext)}})}run(ue,oe){return ue.get(M.IPreferencesService).openFolderSettings({folderUri:oe})}}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:q,title:{value:I.localize(16,null),original:"Show modified settings"},menu:{id:w.MenuId.EditorTitle,group:"1_filter",order:1,when:C.ContextKeyExpr.and(T.CONTEXT_SETTINGS_EDITOR,T.CONTEXT_SETTINGS_JSON_EDITOR.toNegated())}})}run(ue,oe){const fe=ue.get(O.IEditorService).activeEditorPane;fe instanceof y.SettingsEditor2&&fe.focusSearch(`@${T.MODIFIED_SETTING_TAG}`)}}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:Z,title:{value:I.localize(17,null),original:"Show settings for online services"},menu:{id:w.MenuId.EditorTitle,group:"1_filter",order:2,when:C.ContextKeyExpr.and(T.CONTEXT_SETTINGS_EDITOR,T.CONTEXT_SETTINGS_JSON_EDITOR.toNegated())}})}run(ue){const oe=ue.get(O.IEditorService).activeEditorPane;oe instanceof y.SettingsEditor2?oe.focusSearch("@tag:usesOnlineServices"):ue.get(M.IPreferencesService).openSettings({jsonEditor:!1,query:"@tag:usesOnlineServices"})}}),w.MenuRegistry.appendMenuItem(w.MenuId.MenubarPreferencesMenu,{group:"1_settings",command:{id:Z,title:I.localize(18,null)},order:2}),w.MenuRegistry.appendMenuItem(w.MenuId.GlobalActivity,{group:"2_configuration",command:{id:Z,title:I.localize(19,null)},order:2}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:j,title:{value:I.localize(20,null),original:"Telemetry Settings"},menu:{id:w.MenuId.MenubarPreferencesMenu,group:"1_settings",order:3}})}run(ue){const oe=ue.get(O.IEditorService).activeEditorPane;oe instanceof y.SettingsEditor2?oe.focusSearch("@tag:telemetry"):ue.get(M.IPreferencesService).openSettings({jsonEditor:!1,query:"@tag:telemetry"})}}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:X,title:{value:I.localize(21,null),original:"Show untrusted workspace settings"}})}run(ue){ue.get(M.IPreferencesService).openWorkspaceSettings({jsonEditor:!1,query:`@tag:${T.REQUIRE_TRUSTED_WORKSPACE_SETTING_TAG}`})}}),this.registerSettingsEditorActions(),this.extensionService.whenInstalledExtensionsRegistered().then(()=>{const ue=this.environmentService.remoteAuthority,oe=this.labelService.getHostLabel(_.Schemas.vscodeRemote,ue)||ue,fe=I.localize(22,null,oe);(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:"workbench.action.openRemoteSettings",title:{value:fe,original:`Open Remote Settings (${oe})`},category:te,menu:{id:w.MenuId.CommandPalette,when:h.RemoteNameContext.notEqualsTo("")}})}run(me,be){return be=se(be),me.get(M.IPreferencesService).openRemoteSettings(be)}});const pe=I.localize(23,null,oe);(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:"workbench.action.openRemoteSettingsFile",title:{value:pe,original:`Open Remote Settings (JSON) (${oe})`},category:te,menu:{id:w.MenuId.CommandPalette,when:h.RemoteNameContext.notEqualsTo("")}})}run(me,be){return be=se(be),me.get(M.IPreferencesService).openRemoteSettings({jsonEditor:!0,...be})}})})}registerSettingsEditorActions(){function ae(oe){const fe=oe.get(O.IEditorService).activeEditorPane;return fe instanceof y.SettingsEditor2?fe:null}function ue(oe){const fe=ae(oe);fe&&fe.focusSearch()}(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:B,precondition:T.CONTEXT_SETTINGS_EDITOR,keybinding:{primary:2048|36,weight:100,when:null},category:te,f1:!0,title:{value:I.localize(24,null),original:"Focus Settings Search"}})}run(oe){ue(oe)}}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:T.SETTINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS,precondition:T.CONTEXT_SETTINGS_EDITOR,keybinding:{primary:9,weight:100,when:T.CONTEXT_SETTINGS_SEARCH_FOCUS},category:te,f1:!0,title:{value:I.localize(25,null),original:"Clear Settings Search Results"}})}run(oe){const fe=ae(oe);fe&&fe.clearSearchResults()}}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:P,precondition:C.ContextKeyExpr.and(T.CONTEXT_SETTINGS_SEARCH_FOCUS,D.Context.Visible.toNegated()),keybinding:{primary:18,weight:100,when:null},title:I.localize(26,null)})}run(oe,fe){ae(oe)?.focusSettings()}}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:V,precondition:C.ContextKeyExpr.and(T.CONTEXT_SETTINGS_SEARCH_FOCUS,D.Context.Visible.toNegated()),keybinding:{primary:18,weight:200,when:null},title:I.localize(27,null)})}run(oe,fe){ae(oe)?.focusSettings()}}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:z,precondition:C.ContextKeyExpr.and(T.CONTEXT_SETTINGS_EDITOR,T.CONTEXT_TOC_ROW_FOCUS),keybinding:{primary:3,weight:200,when:null},title:I.localize(28,null)})}run(oe){const fe=ae(oe);fe instanceof y.SettingsEditor2&&fe.focusSettings()}}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:U,precondition:T.CONTEXT_SETTINGS_EDITOR,f1:!0,keybinding:[{primary:15,weight:200,when:T.CONTEXT_SETTINGS_ROW_FOCUS}],category:te,title:{value:I.localize(29,null),original:"Focus Settings Table of Contents"}})}run(oe){const fe=ae(oe);fe instanceof y.SettingsEditor2&&fe.focusTOC()}}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:H,precondition:T.CONTEXT_SETTINGS_ROW_FOCUS,keybinding:{primary:3,weight:200},title:I.localize(30,null)})}run(oe){const fe=ae(oe);fe instanceof y.SettingsEditor2&&document.activeElement?.classList.contains("monaco-list")&&fe.focusSettings(!0)}}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:T.SETTINGS_EDITOR_COMMAND_SHOW_CONTEXT_MENU,precondition:T.CONTEXT_SETTINGS_EDITOR,keybinding:{primary:1024|67,weight:200,when:null},f1:!0,category:te,title:{value:I.localize(31,null),original:"Show Setting Context Menu"}})}run(oe){const fe=ae(oe);fe instanceof y.SettingsEditor2&&fe.showContextMenu()}}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:K,precondition:C.ContextKeyExpr.and(T.CONTEXT_SETTINGS_EDITOR,T.CONTEXT_SETTINGS_SEARCH_FOCUS.toNegated(),T.CONTEXT_SETTINGS_JSON_EDITOR.toNegated()),keybinding:{primary:9,weight:200,when:null},f1:!0,category:te,title:{value:I.localize(32,null),original:"Move Focus Up One Level"}})}run(oe){const fe=ae(oe);fe instanceof y.SettingsEditor2&&(fe.currentFocusContext===3?fe.focusSettings():fe.currentFocusContext===2?fe.focusTOC():fe.currentFocusContext===1&&fe.focusSearch())}})}registerKeybindingsActions(){const ae=this,ue={value:I.localize(33,null),original:"Preferences"};(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:"workbench.action.openGlobalKeybindings",title:{value:I.localize(34,null),original:"Open Keyboard Shortcuts"},category:ue,icon:E.preferencesOpenSettingsIcon,keybinding:{when:null,weight:200,primary:(0,t.KeyChord)(2048|41,2048|49)},menu:[{id:w.MenuId.CommandPalette},{id:w.MenuId.EditorTitle,when:h.ResourceContextKey.Resource.isEqualTo(ae.environmentService.keybindingsResource.toString()),group:"navigation",order:1}]})}run(oe,fe){const pe=typeof fe=="string"?fe:void 0;return oe.get(M.IPreferencesService).openGlobalKeybindingSettings(!1,{query:pe})}}),w.MenuRegistry.appendMenuItem(w.MenuId.GlobalActivity,{command:{id:"workbench.action.openGlobalKeybindings",title:{value:I.localize(35,null),original:"Keyboard Shortcuts"}},group:"2_keybindings",order:1}),w.MenuRegistry.appendMenuItem(w.MenuId.MenubarPreferencesMenu,{command:{id:"workbench.action.openGlobalKeybindings",title:{value:I.localize(36,null),original:"Keyboard Shortcuts"}},group:"2_keybindings",order:1}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:"workbench.action.openDefaultKeybindingsFile",title:{value:I.localize(37,null),original:"Open Default Keyboard Shortcuts (JSON)"},category:ue,menu:{id:w.MenuId.CommandPalette}})}run(oe){return oe.get(M.IPreferencesService).openDefaultKeybindingsFile()}}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:"workbench.action.openGlobalKeybindingsFile",title:{value:I.localize(38,null),original:"Open Keyboard Shortcuts (JSON)"},category:ue,icon:E.preferencesOpenSettingsIcon,menu:[{id:w.MenuId.CommandPalette},{id:w.MenuId.EditorTitle,when:C.ContextKeyExpr.and(T.CONTEXT_KEYBINDINGS_EDITOR),group:"navigation"}]})}run(oe){return oe.get(M.IPreferencesService).openGlobalKeybindingSettings(!0)}}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:T.KEYBINDINGS_EDITOR_SHOW_DEFAULT_KEYBINDINGS,title:{value:I.localize(39,null),original:"Show Default Keybindings"},menu:[{id:w.MenuId.EditorTitle,when:C.ContextKeyExpr.and(T.CONTEXT_KEYBINDINGS_EDITOR),group:"1_keyboard_preferences_actions"}]})}run(oe){const fe=oe.get(O.IEditorService).activeEditorPane;fe instanceof d.KeybindingsEditor&&fe.search("@source:default")}}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:T.KEYBINDINGS_EDITOR_SHOW_EXTENSION_KEYBINDINGS,title:{value:I.localize(40,null),original:"Show Extension Keybindings"},menu:[{id:w.MenuId.EditorTitle,when:C.ContextKeyExpr.and(T.CONTEXT_KEYBINDINGS_EDITOR),group:"1_keyboard_preferences_actions"}]})}run(oe){const fe=oe.get(O.IEditorService).activeEditorPane;fe instanceof d.KeybindingsEditor&&fe.search("@source:extension")}}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:T.KEYBINDINGS_EDITOR_SHOW_USER_KEYBINDINGS,title:{value:I.localize(41,null),original:"Show User Keybindings"},menu:[{id:w.MenuId.EditorTitle,when:C.ContextKeyExpr.and(T.CONTEXT_KEYBINDINGS_EDITOR),group:"1_keyboard_preferences_actions"}]})}run(oe){const fe=oe.get(O.IEditorService).activeEditorPane;fe instanceof d.KeybindingsEditor&&fe.search("@source:user")}}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:T.KEYBINDINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS,title:I.localize(42,null),keybinding:{weight:200,when:C.ContextKeyExpr.and(T.CONTEXT_KEYBINDINGS_EDITOR,T.CONTEXT_KEYBINDINGS_SEARCH_FOCUS),primary:9}})}run(oe){const fe=oe.get(O.IEditorService).activeEditorPane;fe instanceof d.KeybindingsEditor&&fe.clearSearchResults()}}),this.registerKeybindingEditorActions()}registerKeybindingEditorActions(){S.KeybindingsRegistry.registerCommandAndKeybindingRule({id:T.KEYBINDINGS_EDITOR_COMMAND_DEFINE,weight:200,when:C.ContextKeyExpr.and(T.CONTEXT_KEYBINDINGS_EDITOR,T.CONTEXT_KEYBINDING_FOCUS),primary:3,handler:(ae,ue)=>{const oe=ae.get(O.IEditorService).activeEditorPane;oe instanceof d.KeybindingsEditor&&oe.defineKeybinding(oe.activeKeybindingEntry,!1)}}),S.KeybindingsRegistry.registerCommandAndKeybindingRule({id:T.KEYBINDINGS_EDITOR_COMMAND_ADD,weight:200,when:C.ContextKeyExpr.and(T.CONTEXT_KEYBINDINGS_EDITOR,T.CONTEXT_KEYBINDING_FOCUS),primary:(0,t.KeyChord)(2048|41,2048|31),handler:(ae,ue)=>{const oe=ae.get(O.IEditorService).activeEditorPane;oe instanceof d.KeybindingsEditor&&oe.defineKeybinding(oe.activeKeybindingEntry,!0)}}),S.KeybindingsRegistry.registerCommandAndKeybindingRule({id:T.KEYBINDINGS_EDITOR_COMMAND_DEFINE_WHEN,weight:200,when:C.ContextKeyExpr.and(T.CONTEXT_KEYBINDINGS_EDITOR,T.CONTEXT_KEYBINDING_FOCUS),primary:(0,t.KeyChord)(2048|41,2048|35),handler:(ae,ue)=>{const oe=ae.get(O.IEditorService).activeEditorPane;oe instanceof d.KeybindingsEditor&&oe.activeKeybindingEntry.keybindingItem.keybinding&&oe.defineWhenExpression(oe.activeKeybindingEntry)}}),S.KeybindingsRegistry.registerCommandAndKeybindingRule({id:T.KEYBINDINGS_EDITOR_COMMAND_REMOVE,weight:200,when:C.ContextKeyExpr.and(T.CONTEXT_KEYBINDINGS_EDITOR,T.CONTEXT_KEYBINDING_FOCUS,o.InputFocusedContext.toNegated()),primary:20,mac:{primary:2048|1},handler:(ae,ue)=>{const oe=ae.get(O.IEditorService).activeEditorPane;oe instanceof d.KeybindingsEditor&&oe.removeKeybinding(oe.activeKeybindingEntry)}}),S.KeybindingsRegistry.registerCommandAndKeybindingRule({id:T.KEYBINDINGS_EDITOR_COMMAND_RESET,weight:200,when:C.ContextKeyExpr.and(T.CONTEXT_KEYBINDINGS_EDITOR,T.CONTEXT_KEYBINDING_FOCUS),primary:0,handler:(ae,ue)=>{const oe=ae.get(O.IEditorService).activeEditorPane;oe instanceof d.KeybindingsEditor&&oe.resetKeybinding(oe.activeKeybindingEntry)}}),S.KeybindingsRegistry.registerCommandAndKeybindingRule({id:T.KEYBINDINGS_EDITOR_COMMAND_SEARCH,weight:200,when:C.ContextKeyExpr.and(T.CONTEXT_KEYBINDINGS_EDITOR),primary:2048|36,handler:(ae,ue)=>{const oe=ae.get(O.IEditorService).activeEditorPane;oe instanceof d.KeybindingsEditor&&oe.focusSearch()}}),S.KeybindingsRegistry.registerCommandAndKeybindingRule({id:T.KEYBINDINGS_EDITOR_COMMAND_RECORD_SEARCH_KEYS,weight:200,when:C.ContextKeyExpr.and(T.CONTEXT_KEYBINDINGS_EDITOR,T.CONTEXT_KEYBINDINGS_SEARCH_FOCUS),primary:512|41,mac:{primary:2048|512|41},handler:(ae,ue)=>{const oe=ae.get(O.IEditorService).activeEditorPane;oe instanceof d.KeybindingsEditor&&oe.recordSearchKeys()}}),S.KeybindingsRegistry.registerCommandAndKeybindingRule({id:T.KEYBINDINGS_EDITOR_COMMAND_SORTBY_PRECEDENCE,weight:200,when:C.ContextKeyExpr.and(T.CONTEXT_KEYBINDINGS_EDITOR),primary:512|46,mac:{primary:2048|512|46},handler:(ae,ue)=>{const oe=ae.get(O.IEditorService).activeEditorPane;oe instanceof d.KeybindingsEditor&&oe.toggleSortByPrecedence()}}),S.KeybindingsRegistry.registerCommandAndKeybindingRule({id:T.KEYBINDINGS_EDITOR_COMMAND_SHOW_SIMILAR,weight:200,when:C.ContextKeyExpr.and(T.CONTEXT_KEYBINDINGS_EDITOR,T.CONTEXT_KEYBINDING_FOCUS),primary:0,handler:(ae,ue)=>{const oe=ae.get(O.IEditorService).activeEditorPane;oe instanceof d.KeybindingsEditor&&oe.showSimilarKeybindings(oe.activeKeybindingEntry)}}),S.KeybindingsRegistry.registerCommandAndKeybindingRule({id:T.KEYBINDINGS_EDITOR_COMMAND_COPY,weight:200,when:C.ContextKeyExpr.and(T.CONTEXT_KEYBINDINGS_EDITOR,T.CONTEXT_KEYBINDING_FOCUS,T.CONTEXT_WHEN_FOCUS.negate()),primary:2048|33,handler:async(ae,ue)=>{const oe=ae.get(O.IEditorService).activeEditorPane;oe instanceof d.KeybindingsEditor&&await oe.copyKeybinding(oe.activeKeybindingEntry)}}),S.KeybindingsRegistry.registerCommandAndKeybindingRule({id:T.KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND,weight:200,when:C.ContextKeyExpr.and(T.CONTEXT_KEYBINDINGS_EDITOR,T.CONTEXT_KEYBINDING_FOCUS),primary:0,handler:async(ae,ue)=>{const oe=ae.get(O.IEditorService).activeEditorPane;oe instanceof d.KeybindingsEditor&&await oe.copyKeybindingCommand(oe.activeKeybindingEntry)}}),S.KeybindingsRegistry.registerCommandAndKeybindingRule({id:T.KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND_TITLE,weight:200,when:C.ContextKeyExpr.and(T.CONTEXT_KEYBINDINGS_EDITOR,T.CONTEXT_KEYBINDING_FOCUS),primary:0,handler:async(ae,ue)=>{const oe=ae.get(O.IEditorService).activeEditorPane;oe instanceof d.KeybindingsEditor&&await oe.copyKeybindingCommandTitle(oe.activeKeybindingEntry)}}),S.KeybindingsRegistry.registerCommandAndKeybindingRule({id:T.KEYBINDINGS_EDITOR_COMMAND_FOCUS_KEYBINDINGS,weight:200,when:C.ContextKeyExpr.and(T.CONTEXT_KEYBINDINGS_EDITOR,T.CONTEXT_KEYBINDINGS_SEARCH_FOCUS),primary:2048|18,handler:(ae,ue)=>{const oe=ae.get(O.IEditorService).activeEditorPane;oe instanceof d.KeybindingsEditor&&oe.focusKeybindings()}})}updatePreferencesEditorMenuItem(){const ae="_workbench.openWorkspaceSettingsEditor";this.workspaceContextService.getWorkbenchState()===3&&!v.CommandsRegistry.getCommand(ae)&&(v.CommandsRegistry.registerCommand(ae,()=>this.preferencesService.openWorkspaceSettings({jsonEditor:!1})),w.MenuRegistry.appendMenuItem(w.MenuId.EditorTitle,{command:{id:ae,title:ee,icon:E.preferencesOpenSettingsIcon},when:C.ContextKeyExpr.and(h.ResourceContextKey.Resource.isEqualTo(this.preferencesService.workspaceSettingsResource.toString()),h.WorkbenchStateContext.isEqualTo("workspace"),C.ContextKeyExpr.not("isInDiffEditor")),group:"navigation",order:1})),this.updatePreferencesEditorMenuItemForWorkspaceFolders()}updatePreferencesEditorMenuItemForWorkspaceFolders(){for(const ae of this.workspaceContextService.getWorkspace().folders){const ue=`_workbench.openFolderSettings.${ae.uri.toString()}`;v.CommandsRegistry.getCommand(ue)||(v.CommandsRegistry.registerCommand(ue,()=>this.workspaceContextService.getWorkbenchState()===2?this.preferencesService.openWorkspaceSettings({jsonEditor:!1}):this.preferencesService.openFolderSettings({folderUri:ae.uri,jsonEditor:!1})),w.MenuRegistry.appendMenuItem(w.MenuId.EditorTitle,{command:{id:ue,title:ee,icon:E.preferencesOpenSettingsIcon},when:C.ContextKeyExpr.and(h.ResourceContextKey.Resource.isEqualTo(this.preferencesService.getFolderSettingsResource(ae.uri).toString()),C.ContextKeyExpr.not("isInDiffEditor")),group:"navigation",order:1}))}}};ie=Ee([W(0,x.IWorkbenchEnvironmentService),W(1,M.IPreferencesService),W(2,r.IWorkspaceContextService),W(3,s.ILabelService),W(4,F.IExtensionService)],ie);const ce=l.Registry.as(a.Extensions.Workbench);ce.registerWorkbenchContribution(ie,1),ce.registerWorkbenchContribution(R.PreferencesContribution,1),(0,k.registerEditorContribution)(b.SettingsEditorContribution.ID,b.SettingsEditorContribution),w.MenuRegistry.appendMenuItem(w.MenuId.MenubarFileMenu,{title:I.localize(43,null),submenu:w.MenuId.MenubarPreferencesMenu,group:"5_autosave",order:2,when:o.IsMacNativeContext.toNegated()})}),define(ne[513],re([1,0,1694,2,43,274,2538,7,50,17,145,2198,81,8,26,41,105,90,109,14,212,99,161,217,586,6,502,69,57,31]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutomaticPortForwarding=e.PortRestore=e.ForwardedPortsView=e.VIEWLET_ID=void 0,e.VIEWLET_ID="workbench.view.remote";let T=class extends f.Disposable{constructor(N,B,P,V,z,U){super();this.contextKeyService=N,this.environmentService=B,this.remoteExplorerService=P,this.tunnelService=V,this.activityService=z,this.statusbarService=U,this._register(w.Registry.as(_.Extensions.ViewsRegistry).registerViewWelcomeContent(A.TUNNEL_VIEW_ID,{content:`No forwarded ports. Forward a port to access your running services locally. [Forward a Port](command:${k.ForwardPortAction.INLINE_ID})`})),this.enableBadgeAndStatusBar(),this.enableForwardedPortsView()}async getViewContainer(){return w.Registry.as(_.Extensions.ViewContainersRegistry).registerViewContainer({id:A.TUNNEL_VIEW_CONTAINER_ID,title:t.localize(0,null),icon:g.portsViewIcon,ctorDescriptor:new a.SyncDescriptor(n.ViewPaneContainer,[A.TUNNEL_VIEW_CONTAINER_ID,{mergeViewWithContainerWhenSingleView:!0,donotShowContainerTitleWhenMergedWithContainer:!0}]),storageId:A.TUNNEL_VIEW_CONTAINER_ID,hideIfEmpty:!0,order:5},1)}async enableForwardedPortsView(){this.contextKeyListener&&(this.contextKeyListener.dispose(),this.contextKeyListener=void 0);const N=!!k.forwardedPortsViewEnabled.getValue(this.contextKeyService);if(this.environmentService.remoteAuthority&&N){const B=await this.getViewContainer(),P=new k.TunnelPanelDescriptor(new k.TunnelViewModel(this.remoteExplorerService,this.tunnelService),this.environmentService),V=w.Registry.as(_.Extensions.ViewsRegistry);B&&(this.remoteExplorerService.enablePortsFeatures(),V.registerViews([P],B))}else this.environmentService.remoteAuthority&&(this.contextKeyListener=this.contextKeyService.onDidChangeContext(B=>{B.affectsSome(new Set(k.forwardedPortsViewEnabled.keys()))&&this.enableForwardedPortsView()}))}enableBadgeAndStatusBar(){const N=w.Registry.as(_.Extensions.ViewsRegistry).onViewsRegistered(B=>{B.find(P=>P.views.find(V=>V.id===A.TUNNEL_VIEW_ID))&&(this._register(d.Event.debounce(this.remoteExplorerService.tunnelModel.onForwardPort,(P,V)=>V,50)(()=>{this.updateActivityBadge(),this.updateStatusBar()})),this._register(d.Event.debounce(this.remoteExplorerService.tunnelModel.onClosePort,(P,V)=>V,50)(()=>{this.updateActivityBadge(),this.updateStatusBar()})),this.updateActivityBadge(),this.updateStatusBar(),N.dispose())})}async updateActivityBadge(){this._activityBadge&&this._activityBadge.dispose(),this.remoteExplorerService.tunnelModel.forwarded.size>0&&(this._activityBadge=this.activityService.showViewActivity(A.TUNNEL_VIEW_ID,{badge:new h.NumberBadge(this.remoteExplorerService.tunnelModel.forwarded.size,N=>N===1?t.localize(1,null):t.localize(2,null,N))}))}updateStatusBar(){this.entryAccessor?this.entryAccessor.update(this.entry):this._register(this.entryAccessor=this.statusbarService.addEntry(this.entry,"status.forwardedPorts",0,40))}get entry(){let N,B;const P=this.remoteExplorerService.tunnelModel.forwarded.size+this.remoteExplorerService.tunnelModel.detected.size;if(N=`${P}`,P===0)B=t.localize(3,null);else{const V=Array.from(this.remoteExplorerService.tunnelModel.forwarded.values());V.push(...Array.from(this.remoteExplorerService.tunnelModel.detected.values())),B=t.localize(4,null,V.map(z=>z.remotePort).join(", "))}return{name:t.localize(5,null),text:`$(radio-tower) ${N}`,ariaLabel:B,tooltip:B,command:`${A.TUNNEL_VIEW_ID}.focus`}}};T=Ee([W(0,D.IContextKeyService),W(1,I.IWorkbenchEnvironmentService),W(2,A.IRemoteExplorerService),W(3,u.ITunnelService),W(4,h.IActivityService),W(5,v.IStatusbarService)],T),e.ForwardedPortsView=T;let R=class{constructor(N,B){this.remoteExplorerService=N,this.logService=B,this.remoteExplorerService.tunnelModel.environmentTunnelsSet?this.restore():d.Event.once(this.remoteExplorerService.tunnelModel.onEnvironmentTunnelsSet)(async()=>{await this.restore()})}async restore(){return this.logService.trace("ForwardedPorts: Doing first restore."),this.remoteExplorerService.restore()}};R=Ee([W(0,A.IRemoteExplorerService),W(1,y.ILogService)],R),e.PortRestore=R;let O=class extends f.Disposable{constructor(N,B,P,V,z,U,H,K,G,q,Z,j,X,Y){super();this.terminalService=N,this.notificationService=B,this.openerService=P,this.externalOpenerService=V,this.viewsService=z,this.remoteExplorerService=U,this.environmentService=H,this.contextKeyService=K,this.configurationService=G,this.debugService=q,this.remoteAgentService=Z,this.tunnelService=j,this.hostService=X,this.logService=Y,!!this.environmentService.remoteAuthority&&Z.getEnvironment().then($=>{if($?.os!==3)w.Registry.as(E.Extensions.Configuration).registerDefaultConfigurations([{overrides:{"remote.autoForwardPortsSource":A.PORT_AUTO_SOURCE_SETTING_OUTPUT}}]),this._register(new F(N,B,P,V,U,G,q,j,Z,X,Y,()=>!1));else{const J=()=>this.configurationService.getValue(A.PORT_AUTO_SOURCE_SETTING)===A.PORT_AUTO_SOURCE_SETTING_PROCESS;J()&&this._register(new L(G,U,B,P,V,j,X,Y)),this._register(new F(N,B,P,V,U,G,q,j,Z,X,Y,J))}})}};O=Ee([W(0,s.ITerminalService),W(1,i.INotificationService),W(2,S.IOpenerService),W(3,m.IExternalUriOpenerService),W(4,_.IViewsService),W(5,A.IRemoteExplorerService),W(6,I.IWorkbenchEnvironmentService),W(7,D.IContextKeyService),W(8,c.IConfigurationService),W(9,l.IDebugService),W(10,r.IRemoteAgentService),W(11,u.ITunnelService),W(12,b.IHostService),W(13,y.ILogService)],O),e.AutomaticPortForwarding=O;class x extends f.Disposable{constructor(N,B,P,V,z,U,H){super();this.notificationService=N,this.remoteExplorerService=B,this.openerService=P,this.externalOpenerService=V,this.tunnelService=z,this.hostService=U,this.logService=H,this.alreadyOpenedOnce=new Set,this.lastNotifyTime=new Date,this.lastNotifyTime.setFullYear(this.lastNotifyTime.getFullYear()-1)}async doAction(N){this.logService.trace(`ForwardedPorts: (OnAutoForwardedAction) Starting action for ${N[0]?.tunnelRemotePort}`),this.doActionTunnels=N;const B=await this.portNumberHeuristicDelay();if(this.logService.trace(`ForwardedPorts: (OnAutoForwardedAction) Heuristic chose ${B?.tunnelRemotePort}`),B){const V=(await this.remoteExplorerService.tunnelModel.getAttributes([{port:B.tunnelRemotePort,host:B.tunnelRemoteHost}]))?.get(B.tunnelRemotePort)?.onAutoForward;switch(this.logService.trace(`ForwardedPorts: (OnAutoForwardedAction) onAutoForward action is ${V}`),V){case A.OnPortForward.OpenBrowserOnce:{if(this.alreadyOpenedOnce.has(B.localAddress))break;this.alreadyOpenedOnce.add(B.localAddress)}case A.OnPortForward.OpenBrowser:{const z=(0,A.makeAddress)(B.tunnelRemoteHost,B.tunnelRemotePort);await k.OpenPortInBrowserAction.run(this.remoteExplorerService.tunnelModel,this.openerService,z);break}case A.OnPortForward.OpenPreview:{const z=(0,A.makeAddress)(B.tunnelRemoteHost,B.tunnelRemotePort);await k.OpenPortInPreviewAction.run(this.remoteExplorerService.tunnelModel,this.openerService,this.externalOpenerService,z);break}case A.OnPortForward.Silent:break;default:{const z=new Date().getTime()-this.lastNotifyTime.getTime();this.logService.trace(`ForwardedPorts: (OnAutoForwardedAction) time elapsed since last notification ${z} ms`),z>x.NOTIFY_COOL_DOWN&&await this.showNotification(B)}}}}hide(N){this.doActionTunnels&&(this.doActionTunnels=this.doActionTunnels.filter(B=>!N.includes(B.tunnelRemotePort))),this.lastShownPort&&N.indexOf(this.lastShownPort)>=0&&this.lastNotification?.close()}async portNumberHeuristicDelay(){if(this.logService.trace("ForwardedPorts: (OnAutoForwardedAction) Starting heuristic delay"),!this.doActionTunnels||this.doActionTunnels.length===0)return;this.doActionTunnels=this.doActionTunnels.sort((B,P)=>B.tunnelRemotePort-P.tunnelRemotePort);const N=this.doActionTunnels.shift();return N.tunnelRemotePort%1e3==0?(this.logService.trace(`ForwardedPorts: (OnAutoForwardedAction) Heuristic chose tunnel because % 1000: ${N.tunnelRemotePort}`),this.newerTunnel=N,N):N.tunnelRemotePort<1e4&&N.tunnelRemotePort!==9229?(this.logService.trace(`ForwardedPorts: (OnAutoForwardedAction) Heuristic chose tunnel because < 10000: ${N.tunnelRemotePort}`),this.newerTunnel=N,N):(this.logService.trace(`ForwardedPorts: (OnAutoForwardedAction) Waiting for "better" tunnel than ${N.tunnelRemotePort}`),this.newerTunnel=void 0,new Promise(B=>{setTimeout(()=>{this.newerTunnel?B(void 0):this.doActionTunnels?.includes(N)?B(N):B(void 0)},3e3)}))}basicMessage(N){return t.localize(6,null,N.tunnelRemotePort)}linkMessage(){return t.localize(7,null,`command:${k.TunnelPanel.ID}.focus`)}async showNotification(N){if(!await this.hostService.hadLastFocus())return;this.lastNotification&&this.lastNotification.close();let B=this.basicMessage(N);const P=[this.openBrowserChoice(N)];p.isWeb||P.push(this.openPreviewChoice(N)),N.tunnelLocalPort!==N.tunnelRemotePort&&this.tunnelService.canElevate&&(0,u.isPortPrivileged)(N.tunnelRemotePort)&&(B+=t.localize(8,null,N.tunnelRemotePort),P.unshift(this.elevateChoice(N))),B+=this.linkMessage(),this.lastNotification=this.notificationService.prompt(o.default.Info,B,P,{neverShowAgain:{id:"remote.tunnelsView.autoForwardNeverShow",isSecondary:!0}}),this.lastShownPort=N.tunnelRemotePort,this.lastNotifyTime=new Date,this.lastNotification.onDidClose(()=>{this.lastNotification=void 0,this.lastShownPort=void 0})}openBrowserChoice(N){const B=(0,A.makeAddress)(N.tunnelRemoteHost,N.tunnelRemotePort);return{label:k.OpenPortInBrowserAction.LABEL,run:()=>k.OpenPortInBrowserAction.run(this.remoteExplorerService.tunnelModel,this.openerService,B)}}openPreviewChoice(N){const B=(0,A.makeAddress)(N.tunnelRemoteHost,N.tunnelRemotePort);return{label:k.OpenPortInPreviewAction.LABEL,run:()=>k.OpenPortInPreviewAction.run(this.remoteExplorerService.tunnelModel,this.openerService,this.externalOpenerService,B)}}elevateChoice(N){return{label:t.localize(9,null,N.tunnelRemotePort),run:async()=>{await this.remoteExplorerService.close({host:N.tunnelRemoteHost,port:N.tunnelRemotePort});const B=await this.remoteExplorerService.forward({remote:{host:N.tunnelRemoteHost,port:N.tunnelRemotePort},local:N.tunnelRemotePort,elevateIfNeeded:!0,source:A.AutoTunnelSource});!B||(this.lastNotification&&this.lastNotification.close(),this.lastShownPort=B.tunnelRemotePort,this.lastNotification=this.notificationService.prompt(o.default.Info,this.basicMessage(B)+this.linkMessage(),[this.openBrowserChoice(B),this.openPreviewChoice(N)],{neverShowAgain:{id:"remote.tunnelsView.autoForwardNeverShow",isSecondary:!0}}),this.lastNotification.onDidClose(()=>{this.lastNotification=void 0,this.lastShownPort=void 0}))}}}}x.NOTIFY_COOL_DOWN=5e3;class F extends f.Disposable{constructor(N,B,P,V,z,U,H,K,G,q,Z,j){super();this.terminalService=N,this.notificationService=B,this.openerService=P,this.externalOpenerService=V,this.remoteExplorerService=z,this.configurationService=U,this.debugService=H,this.tunnelService=K,this.remoteAgentService=G,this.hostService=q,this.logService=Z,this.privilegedOnly=j,this.notifier=new x(B,z,P,V,K,q,Z),this._register(U.onDidChangeConfiguration(X=>{X.affectsConfiguration(A.PORT_AUTO_FORWARD_SETTING)&&this.tryStartStopUrlFinder()})),this.portsFeatures=this._register(this.remoteExplorerService.onEnabledPortsFeatures(()=>{this.tryStartStopUrlFinder()})),this.tryStartStopUrlFinder()}tryStartStopUrlFinder(){this.configurationService.getValue(A.PORT_AUTO_FORWARD_SETTING)?this.startUrlFinder():this.stopUrlFinder()}startUrlFinder(){!this.urlFinder&&!this.remoteExplorerService.portsFeaturesEnabled||(this.portsFeatures&&this.portsFeatures.dispose(),this.urlFinder=this._register(new C.UrlFinder(this.terminalService,this.debugService)),this._register(this.urlFinder.onDidMatchLocalUrl(async N=>{if((0,A.mapHasAddressLocalhostOrAllInterfaces)(this.remoteExplorerService.tunnelModel.detected,N.host,N.port))return;const B=(await this.remoteExplorerService.tunnelModel.getAttributes([N]))?.get(N.port);if(B?.onAutoForward===A.OnPortForward.Ignore||this.privilegedOnly()&&!(0,u.isPortPrivileged)(N.port,(await this.remoteAgentService.getEnvironment())?.os))return;const P=await this.remoteExplorerService.forward({remote:N,source:A.AutoTunnelSource},B??null);P&&this.notifier.doAction([P])})))}stopUrlFinder(){this.urlFinder&&(this.urlFinder.dispose(),this.urlFinder=void 0)}}class L extends f.Disposable{constructor(N,B,P,V,z,U,H,K){super();this.configurationService=N,this.remoteExplorerService=B,this.notificationService=P,this.openerService=V,this.externalOpenerService=z,this.tunnelService=U,this.hostService=H,this.logService=K,this.autoForwarded=new Set,this.notifiedOnly=new Set,this.initialCandidates=new Set,this.notifier=new x(P,B,V,z,U,H,K),this.initialize()}async initialize(){this.remoteExplorerService.tunnelModel.environmentTunnelsSet||await new Promise(N=>this.remoteExplorerService.tunnelModel.onEnvironmentTunnelsSet(()=>N())),this._register(this.configurationService.onDidChangeConfiguration(async N=>{N.affectsConfiguration(A.PORT_AUTO_FORWARD_SETTING)&&await this.startStopCandidateListener()})),this.portsFeatures=this._register(this.remoteExplorerService.onEnabledPortsFeatures(async()=>{await this.startStopCandidateListener()})),this.startStopCandidateListener()}async startStopCandidateListener(){this.configurationService.getValue(A.PORT_AUTO_FORWARD_SETTING)?await this.startCandidateListener():this.stopCandidateListener()}stopCandidateListener(){this.candidateListener&&(this.candidateListener.dispose(),this.candidateListener=void 0)}async startCandidateListener(){this.candidateListener||!this.remoteExplorerService.portsFeaturesEnabled||(this.portsFeatures&&this.portsFeatures.dispose(),await this.setInitialCandidates(),this.configurationService.getValue(A.PORT_AUTO_FORWARD_SETTING)&&(this.candidateListener=this._register(this.remoteExplorerService.tunnelModel.onCandidatesChanged(this.handleCandidateUpdate,this))))}async setInitialCandidates(){let N=this.remoteExplorerService.tunnelModel.candidatesOrUndefined;N||(await new Promise(B=>this.remoteExplorerService.tunnelModel.onCandidatesChanged(()=>B())),N=this.remoteExplorerService.tunnelModel.candidates);for(const B of N)this.initialCandidates.add((0,A.makeAddress)(B.host,B.port))}async forwardCandidates(){let N;const B=[];for(const P of this.remoteExplorerService.tunnelModel.candidates){if(!P.detail)continue;const V=(0,A.makeAddress)(P.host,P.port);if(this.initialCandidates.has(V)||this.notifiedOnly.has(V)||this.autoForwarded.has(V))continue;const z=(0,A.mapHasAddressLocalhostOrAllInterfaces)(this.remoteExplorerService.tunnelModel.forwarded,P.host,P.port);if((0,A.mapHasAddressLocalhostOrAllInterfaces)(this.remoteExplorerService.tunnelModel.detected,P.host,P.port))continue;N||(N=await this.remoteExplorerService.tunnelModel.getAttributes(this.remoteExplorerService.tunnelModel.candidates));const U=N?.get(P.port);if(U?.onAutoForward===A.OnPortForward.Ignore)continue;const H=await this.remoteExplorerService.forward({remote:P,source:A.AutoTunnelSource},U??null);!z&&H?this.autoForwarded.add(V):H&&this.notifiedOnly.add(V),H&&B.push(H)}if(B.length!==0)return B}async handleCandidateUpdate(N){const B=[];for(const V of N){const z=V[0],U=V[1];this.autoForwarded.has(z)?(await this.remoteExplorerService.close(U),this.autoForwarded.delete(z),B.push(U.port)):this.notifiedOnly.has(z)?(this.notifiedOnly.delete(z),B.push(U.port)):this.initialCandidates.has(z)&&this.initialCandidates.delete(z)}B.length>0&&await this.notifier.hide(B);const P=await this.forwardCandidates();P&&await this.notifier.doAction(P)}}}),define(ne[2770],re([1,0,15,143,19,29,1366,7,107,99,5,17,12,439,641,161,47,43,90,148,513,215,2513,40,133,94,97,71,219,30,463,508]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.viewsContainersContribution=void 0;const O={type:"object",properties:{id:{description:(0,k.localize)(0,null),type:"string",pattern:"^[a-zA-Z0-9_-]+$"},title:{description:(0,k.localize)(1,null),type:"string"},icon:{description:(0,k.localize)(2,null),type:"string"}},required:["id","title","icon"]};e.viewsContainersContribution={description:(0,k.localize)(3,null),type:"object",properties:{activitybar:{description:(0,k.localize)(4,null),type:"array",items:O},panel:{description:(0,k.localize)(5,null),type:"array",items:O}}};var x;(function(H){H.Tree="tree",H.Webview="webview"})(x||(x={}));var F;(function(H){H.Visible="visible",H.Hidden="hidden",H.Collapsed="collapsed"})(F||(F={}));const L={type:"object",required:["id","name"],defaultSnippets:[{body:{id:"${1:id}",name:"${2:name}"}}],properties:{type:{markdownDescription:(0,k.localize)(6,null),type:"string",enum:["tree","webview"],markdownEnumDescriptions:[(0,k.localize)(7,null),(0,k.localize)(8,null)]},id:{markdownDescription:(0,k.localize)(9,null),type:"string"},name:{description:(0,k.localize)(10,null),type:"string"},when:{description:(0,k.localize)(11,null),type:"string"},icon:{description:(0,k.localize)(12,null),type:"string"},contextualTitle:{description:(0,k.localize)(13,null),type:"string"},visibility:{description:(0,k.localize)(14,null),type:"string",enum:["visible","hidden","collapsed"],default:"visible",enumDescriptions:[(0,k.localize)(15,null),(0,k.localize)(16,null),(0,k.localize)(17,null)]}}},M={type:"object",required:["id","name"],properties:{id:{description:(0,k.localize)(18,null),type:"string"},name:{description:(0,k.localize)(19,null),type:"string"},when:{description:(0,k.localize)(20,null),type:"string"},group:{description:(0,k.localize)(21,null),type:"string"},remoteName:{description:(0,k.localize)(22,null),type:["string","array"],items:{type:"string"}}}},N={description:(0,k.localize)(23,null),type:"object",properties:{explorer:{description:(0,k.localize)(24,null),type:"array",items:L,default:[]},debug:{description:(0,k.localize)(25,null),type:"array",items:L,default:[]},scm:{description:(0,k.localize)(26,null),type:"array",items:L,default:[]},test:{description:(0,k.localize)(27,null),type:"array",items:L,default:[]},remote:{description:(0,k.localize)(28,null),type:"array",items:M,default:[]}},additionalProperties:{description:(0,k.localize)(29,null),type:"array",items:L,default:[]}},B=g.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"viewsContainers",jsonSchema:e.viewsContainersContribution}),P=g.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"views",deps:[B],jsonSchema:N}),V=7;let z=class{constructor(K){this.instantiationService=K,this.viewContainersRegistry=C.Registry.as(l.Extensions.ViewContainersRegistry),this.viewsRegistry=C.Registry.as(l.Extensions.ViewsRegistry),this.handleAndRegisterCustomViewContainers(),this.handleAndRegisterCustomViews();let G=new y.CancellationTokenSource;d.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.showTreeHover",handler:async(q,...Z)=>{G.cancel(),G=new y.CancellationTokenSource;const j=q.get(b.IListService),X=q.get(R.ITreeViewsService),Y=q.get(E.IHoverService),$=j.lastFocusedList;if(!($ instanceof T.AsyncDataTree))return;const J=$.getFocus();if(!J||J.length===0)return;const ee=J[0];if(ee instanceof l.ResolvableTreeItem&&await ee.resolve(G.token),!ee.tooltip)return;const te=X.getRenderedTreeElement(ee);!te||Y.showHover({content:ee.tooltip,target:te,hoverPosition:2,hideOnHover:!1},!0)},weight:200,primary:(0,m.KeyChord)(2048|41,2048|39),when:D.ContextKeyExpr.and(i.RawCustomTreeViewContextKey,b.WorkbenchListFocusContextKey)})}handleAndRegisterCustomViewContainers(){B.setHandler((K,{added:G,removed:q})=>{q.length&&this.removeCustomViewContainers(q),G.length&&this.addCustomViewContainers(G,this.viewContainersRegistry.all)})}addCustomViewContainers(K,G){const q=C.Registry.as(l.Extensions.ViewContainersRegistry);let Z=V+q.all.filter(X=>!!X.extensionId&&q.getViewContainerLocation(X)===0).length,j=5+q.all.filter(X=>!!X.extensionId&&q.getViewContainerLocation(X)===1).length+1;for(let{value:X,collector:Y,description:$}of K)(0,f.forEach)(X,J=>{if(!!this.isValidViewsContainer(J.value,Y))switch(J.key){case"activitybar":Z=this.registerCustomViewContainers(J.value,$,Z,G,0);break;case"panel":j=this.registerCustomViewContainers(J.value,$,j,G,1);break}})}removeCustomViewContainers(K){const G=C.Registry.as(l.Extensions.ViewContainersRegistry),q=K.reduce((Z,j)=>(Z.add(I.ExtensionIdentifier.toKey(j.description.identifier)),Z),new Set);for(const Z of G.all)if(Z.extensionId&&q.has(I.ExtensionIdentifier.toKey(Z.extensionId))){const j=this.viewsRegistry.getViews(Z);j.length&&this.viewsRegistry.moveViews(j,this.getDefaultViewContainer()),this.deregisterCustomViewContainer(Z)}}isValidViewsContainer(K,G){if(!Array.isArray(K))return G.error((0,k.localize)(30,null)),!1;for(let q of K){if(typeof q.id!="string"&&(0,A.isFalsyOrWhitespace)(q.id))return G.error((0,k.localize)(31,null,"id")),!1;if(!/^[a-z0-9_-]+$/i.test(q.id))return G.error((0,k.localize)(32,null,"id")),!1;if(typeof q.title!="string")return G.error((0,k.localize)(33,null,"title")),!1;if(typeof q.icon!="string")return G.error((0,k.localize)(34,null,"icon")),!1;if((0,A.isFalsyOrWhitespace)(q.title))return G.warn((0,k.localize)(35,null,"title")),!0}return!0}registerCustomViewContainers(K,G,q,Z,j){return K.forEach(X=>{const $=o.ThemeIcon.fromString(X.icon)||_.joinPath(G.extensionLocation,X.icon),J=`workbench.view.extension.${X.id}`,ee=X.title||J,te=this.registerCustomViewContainer(J,ee,$,q++,G.identifier,j);if(Z.length){const se=[];for(const ie of Z)te!==ie&&se.push(...this.viewsRegistry.getViews(ie).filter(ce=>ce.originalContainerId===X.id));se.length&&this.viewsRegistry.moveViews(se,te)}}),q}registerCustomViewContainer(K,G,q,Z,j,X){let Y=this.viewContainersRegistry.get(K);return Y||(Y=this.viewContainersRegistry.registerViewContainer({id:K,title:G,extensionId:j,ctorDescriptor:new w.SyncDescriptor(S.ViewPaneContainer,[K,{mergeViewWithContainerWhenSingleView:!0}]),hideIfEmpty:!0,order:Z,icon:q},X)),Y}deregisterCustomViewContainer(K){this.viewContainersRegistry.deregisterViewContainer(K),C.Registry.as(c.Extensions.Viewlets).deregisterPaneComposite(K.id)}handleAndRegisterCustomViews(){P.setHandler((K,{added:G,removed:q})=>{q.length&&this.removeViews(q),G.length&&this.addViews(G)})}addViews(K){const G=new Set,q=[];for(const Z of K){const{value:j,collector:X}=Z;(0,f.forEach)(j,Y=>{if(!this.isValidViewDescriptors(Y.value,X))return;if(Y.key==="remote"&&!(0,h.isProposedApiEnabled)(Z.description,"contribViewsRemote")){X.warn((0,k.localize)(36,null,Y.key));return}const $=this.getViewContainer(Y.key);$||X.warn((0,k.localize)(37,null,Y.key));const J=$||this.getDefaultViewContainer(),ee=(0,t.coalesce)(Y.value.map((te,se)=>{if(G.has(te.id))return X.error((0,k.localize)(38,null,te.id)),null;if(this.viewsRegistry.getView(te.id)!==null)return X.error((0,k.localize)(39,null,te.id)),null;const ie=I.ExtensionIdentifier.equals(Z.description.identifier,J.extensionId)?se+1:J.viewOrderDelegate?J.viewOrderDelegate.getOrder(te.group):void 0;let ce;typeof te.icon=="string"&&(ce=o.ThemeIcon.fromString(te.icon)||_.joinPath(Z.description.extensionLocation,te.icon));const le=this.convertInitialVisibility(te.visibility),ae=this.getViewType(te.type);if(!ae)return X.error((0,k.localize)(40,null,te.type)),null;const ue={type:ae,ctorDescriptor:ae===x.Tree?new w.SyncDescriptor(i.TreeViewPane):new w.SyncDescriptor(n.WebviewViewPane),id:te.id,name:te.name,when:D.ContextKeyExpr.deserialize(te.when),containerIcon:ce||$?.icon,containerTitle:te.contextualTitle||$?.title,canToggleVisibility:!0,canMoveView:$?.id!==u.VIEWLET_ID,treeView:ae===x.Tree?this.instantiationService.createInstance(i.CustomTreeView,te.id,te.name):void 0,collapsed:this.showCollapsed(J)||le===F.Collapsed,order:ie,extensionId:Z.description.identifier,originalContainerId:Y.key,group:te.group,remoteAuthority:te.remoteName||te.remoteAuthority,hideByDefault:le===F.Hidden,workspace:$?.id===u.VIEWLET_ID?!0:void 0};return G.add(ue.id),ue}));q.push({viewContainer:J,views:ee})})}this.viewsRegistry.registerViews2(q)}getViewType(K){if(K===x.Webview)return x.Webview;if(!K||K===x.Tree)return x.Tree}getDefaultViewContainer(){return this.viewContainersRegistry.get(p.VIEWLET_ID)}removeViews(K){const G=K.reduce((q,Z)=>(q.add(I.ExtensionIdentifier.toKey(Z.description.identifier)),q),new Set);for(const q of this.viewContainersRegistry.all){const Z=this.viewsRegistry.getViews(q).filter(j=>j.extensionId&&G.has(I.ExtensionIdentifier.toKey(j.extensionId)));Z.length&&this.viewsRegistry.deregisterViews(Z,q)}}convertInitialVisibility(K){if(Object.values(F).includes(K))return K}isValidViewDescriptors(K,G){if(!Array.isArray(K))return G.error((0,k.localize)(41,null)),!1;for(let q of K){if(typeof q.id!="string")return G.error((0,k.localize)(42,null,"id")),!1;if(typeof q.name!="string")return G.error((0,k.localize)(43,null,"name")),!1;if(q.when&&typeof q.when!="string")return G.error((0,k.localize)(44,null,"when")),!1;if(q.icon&&typeof q.icon!="string")return G.error((0,k.localize)(45,null,"icon")),!1;if(q.contextualTitle&&typeof q.contextualTitle!="string")return G.error((0,k.localize)(46,null,"contextualTitle")),!1;if(q.visibility&&!this.convertInitialVisibility(q.visibility))return G.error((0,k.localize)(47,null,"visibility",Object.values(F).join(", "))),!1}return!0}getViewContainer(K){switch(K){case"explorer":return this.viewContainersRegistry.get(p.VIEWLET_ID);case"debug":return this.viewContainersRegistry.get(r.VIEWLET_ID);case"scm":return this.viewContainersRegistry.get(a.VIEWLET_ID);case"remote":return this.viewContainersRegistry.get(u.VIEWLET_ID);default:return this.viewContainersRegistry.get(`workbench.view.extension.${K}`)}}showCollapsed(K){switch(K.id){case p.VIEWLET_ID:case a.VIEWLET_ID:case r.VIEWLET_ID:return!0}return!1}};z=Ee([W(0,v.IInstantiationService)],z),C.Registry.as(s.Extensions.Workbench).registerWorkbenchContribution(z,1)}),define(ne[2771],re([1,0,1692,12,68,37,274,13,50,24,7,134,16,513]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SwitchRemoteAction=e.SwitchRemoteViewItem=void 0;let i=class extends C.SelectActionViewItem{constructor(l,r,p,u,a,n,h){super(null,l,r,0,u,{ariaLabel:t.localize(0,null)});this.optionsItems=r,this.remoteExplorerService=a,this.environmentService=n,this.storageService=h,this._register((0,_.attachSelectBoxStyler)(this.selectBox,p))}setSelectionForConnection(){let l=!1;if(this.optionsItems.length>0){let r=0;const p=this.environmentService.remoteAuthority;l=!0;const u=p?[p.split("+")[0]]:this.storageService.get(k.REMOTE_EXPLORER_TYPE_KEY,1)?.split(",")??this.storageService.get(k.REMOTE_EXPLORER_TYPE_KEY,0)?.split(",");u!==void 0&&(r=this.getOptionIndexForExplorerType(u)),this.select(r),this.remoteExplorerService.targetType=this.optionsItems[r].authority}return l}setSelection(){const l=this.getOptionIndexForExplorerType(this.remoteExplorerService.targetType);this.select(l)}getOptionIndexForExplorerType(l){let r=0;for(let p=0;p<this.optionsItems.length&&r===0;p++)for(let u=0;u<this.optionsItems[p].authority.length;u++)for(let a=0;a<l.length;a++)if(this.optionsItems[p].authority[u]===l[a]){r=p;break}return r}render(l){this.optionsItems.length>1&&(super.render(l),l.classList.add("switch-remote"))}getActionContext(l,r){return this.optionsItems[r]}static createOptionItems(l,r){let p=[];return l.forEach(u=>{u.group&&u.group.startsWith("targets")&&u.remoteAuthority&&(!u.when||r.contextMatchesRules(u.when))&&p.push({text:u.name,authority:(0,D.isStringArray)(u.remoteAuthority)?u.remoteAuthority:[u.remoteAuthority]})}),p}};i=Ee([W(2,f.IThemeService),W(3,A.IContextViewService),W(4,k.IRemoteExplorerService),W(5,I.IWorkbenchEnvironmentService),W(6,w.IStorageService)],i),e.SwitchRemoteViewItem=i;class S extends o.Action2{constructor(){super({id:S.ID,title:S.LABEL,menu:[{id:o.MenuId.ViewContainerTitle,when:v.ContextKeyExpr.equals("viewContainer",c.VIEWLET_ID),group:"navigation",order:1}]})}async run(l,r){l.get(k.IRemoteExplorerService).targetType=r.authority}}e.SwitchRemoteAction=S,S.ID="remote.explorer.switch",S.LABEL=t.localize(1,null)}),define(ne[2772],re([1,0,1693,10,9,80,27,34,24,8,5,12,37,40,939,513,7,43,17,41,53,28,16,67,109,54,81,299,2,2771,13,274,50,131,71,38,6,133,99,586,31,435,246,1116]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteAgentConnectionStatusListener=e.RemoteMarkers=e.RemoteViewPaneContainer=void 0;const H=N.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"remoteHelp",jsonSchema:{description:t.localize(0,null),type:"object",properties:{getStarted:{description:t.localize(1,null),type:"string"},documentation:{description:t.localize(2,null),type:"string"},feedback:{description:t.localize(3,null),type:"string"},issues:{description:t.localize(4,null),type:"string"}}}});class K{getHeight(oe){return 22}getTemplateId(oe){return"HelpItemTemplate"}}class G{constructor(){this.templateId="HelpItemTemplate"}renderTemplate(oe){oe.classList.add("remote-help-tree-node-item");const fe=f.append(oe,f.$(".remote-help-tree-node-item-icon")),pe=Object.create(null);return pe.parent=oe,pe.icon=fe,pe}renderElement(oe,fe,pe,me){const be=pe.parent;f.append(be,pe.icon),pe.icon.classList.add(...oe.element.iconClasses);const Ce=f.append(be,f.$(".help-item-label"));Ce.innerText=oe.element.label}disposeTemplate(oe){}}class q{hasChildren(oe){return oe instanceof Z}getChildren(oe){return oe instanceof Z&&oe.items?oe.items:[]}}class Z{constructor(oe,fe,pe,me,be,Ce){let ve=[];const he=oe.helpInformation.filter(we=>we.getStarted);he.length&&ve.push(new Y(P.getStartedIcon,t.localize(5,null),he.map(we=>new j(me,we.extensionDescription,typeof we.remoteName=="string"?[we.remoteName]:we.remoteName,we.getStarted)),pe,Ce,fe,be));const ge=oe.helpInformation.filter(we=>we.documentation);ge.length&&ve.push(new Y(P.documentationIcon,t.localize(6,null),ge.map(we=>new j(me,we.extensionDescription,typeof we.remoteName=="string"?[we.remoteName]:we.remoteName,we.documentation)),pe,Ce,fe,be));const de=oe.helpInformation.filter(we=>we.feedback);de.length&&ve.push(new Y(P.feedbackIcon,t.localize(7,null),de.map(we=>new j(me,we.extensionDescription,typeof we.remoteName=="string"?[we.remoteName]:we.remoteName,we.feedback)),pe,Ce,fe,be));const Se=oe.helpInformation.filter(we=>we.issues);Se.length&&ve.push(new Y(P.reviewIssuesIcon,t.localize(8,null),Se.map(we=>new j(me,we.extensionDescription,typeof we.remoteName=="string"?[we.remoteName]:we.remoteName,we.issues)),pe,Ce,fe,be)),ve.length&&ve.push(new $(P.reportIssuesIcon,t.localize(9,null),oe.helpInformation.map(we=>new j(me,we.extensionDescription,typeof we.remoteName=="string"?[we.remoteName]:we.remoteName)),pe,Ce,me,be)),ve.length&&(this.items=ve)}}class j{constructor(oe,fe,pe,me){this.commandService=oe,this.extensionDescription=fe,this.remoteAuthority=pe,this.urlOrCommand=me}get url(){return this.getUrl()}async getUrl(){if(this._url===void 0&&this.urlOrCommand)if(_.URI.parse(this.urlOrCommand).authority)this._url=this.urlOrCommand;else{const fe=this.commandService.executeCommand(this.urlOrCommand),pe=new Promise(me=>setTimeout(()=>me(""),500));this._url=await Promise.race([fe,pe])}return this._url===void 0&&(this._url=""),this._url}}class X{constructor(oe,fe,pe,me,be,Ce){this.icon=oe,this.label=fe,this.values=pe,this.quickInputService=me,this.environmentService=be,this.remoteExplorerService=Ce,this.iconClasses=[],this.iconClasses.push(...C.ThemeIcon.asClassNameArray(oe)),this.iconClasses.push("remote-help-tree-node-item-icon")}async handleClick(){const oe=this.environmentService.remoteAuthority;if(oe){for(let fe=0;fe<this.remoteExplorerService.targetType.length;fe++)if(oe.startsWith(this.remoteExplorerService.targetType[fe])){for(let pe of this.values)if(pe.remoteAuthority){for(let me of pe.remoteAuthority)if(oe.startsWith(me)){await this.takeAction(pe.extensionDescription,await pe.url);return}}}}if(this.values.length>1){let fe=(await Promise.all(this.values.map(async pe=>({label:pe.extensionDescription.displayName||pe.extensionDescription.identifier.value,description:await pe.url,extensionDescription:pe.extensionDescription})))).filter(pe=>pe.description);if(fe.length){const pe=await this.quickInputService.pick(fe,{placeHolder:t.localize(10,null)});pe&&await this.takeAction(pe.extensionDescription,pe.description)}}await this.takeAction(this.values[0].extensionDescription,await this.values[0].url)}}class Y extends X{constructor(oe,fe,pe,me,be,Ce,ve){super(oe,fe,pe,me,be,ve);this.openerService=Ce}async takeAction(oe,fe){await this.openerService.open(_.URI.parse(fe),{allowCommands:!0})}}class $ extends X{constructor(oe,fe,pe,me,be,Ce,ve){super(oe,fe,pe,me,be,ve);this.commandService=Ce}async takeAction(oe){await this.commandService.executeCommand("workbench.action.openIssueReporter",[oe.identifier.value])}}let J=class extends x.ViewPane{constructor(oe,fe,pe,me,be,Ce,ve,he,ge,de,Se,we,ye,ke,Ie){super(fe,pe,me,Ce,be,he,ve,ge,ke,Ie);this.viewModel=oe,this.quickInputService=de,this.commandService=Se,this.remoteExplorerService=we,this.environmentService=ye}renderBody(oe){super.renderBody(oe),oe.classList.add("remote-help");const fe=document.createElement("div");fe.classList.add("remote-help-content"),oe.appendChild(fe),this.tree=this.instantiationService.createInstance(F.WorkbenchAsyncDataTree,"RemoteHelp",fe,new K,[new G],new q,{accessibilityProvider:{getAriaLabel:me=>me.label,getWidgetAriaLabel:()=>t.localize(12,null)}});const pe=new Z(this.viewModel,this.openerService,this.quickInputService,this.commandService,this.remoteExplorerService,this.environmentService);this.tree.setInput(pe),this._register(M.Event.debounce(this.tree.onDidOpen,(me,be)=>be,75,!0)(me=>{me.element?.handleClick()}))}layoutBody(oe,fe){super.layoutBody(oe,fe),this.tree.layout(oe,fe)}};J.ID="~remote.helpPanel",J.TITLE=t.localize(11,null),J=Ee([W(2,L.IKeybindingService),W(3,o.IContextMenuService),W(4,s.IContextKeyService),W(5,w.IConfigurationService),W(6,v.IInstantiationService),W(7,l.IViewDescriptorService),W(8,p.IOpenerService),W(9,u.IQuickInputService),W(10,a.ICommandService),W(11,R.IRemoteExplorerService),W(12,O.IWorkbenchEnvironmentService),W(13,C.IThemeService),W(14,k.ITelemetryService)],J);class ee{constructor(oe){this.id=J.ID,this.name=J.TITLE,this.canToggleVisibility=!0,this.hideByDefault=!1,this.group="help@50",this.order=-10,this.ctorDescriptor=new B.SyncDescriptor(J,[oe])}}let te=class extends i.FilterViewPaneContainer{constructor(oe,fe,pe,me,be,Ce,ve,he,ge,de,Se,we,ye){super(S.VIEWLET_ID,de.onDidChangeTargetType,be,oe,fe,me,Ce,ve,he,ge,pe,ye);this.remoteExplorerService=de,this.environmentService=Se,this.contextKeyService=we,this.helpPanelDescriptor=new ee(this),this.helpInformation=[],this.hasSetSwitchForConnection=!1,this.addConstantViewDescriptors([this.helpPanelDescriptor]),H.setHandler(ke=>{let Ie=[];for(let De of ke)this._handleRemoteInfoExtensionPoint(De,Ie);this.helpInformation=Ie;const Te=r.Registry.as(l.Extensions.ViewsRegistry);this.helpInformation.length?Te.registerViews([this.helpPanelDescriptor],this.viewContainer):Te.deregisterViews([this.helpPanelDescriptor],this.viewContainer)})}_handleRemoteInfoExtensionPoint(oe,fe){!(0,c.isProposedApiEnabled)(oe.description,"contribRemoteHelp")||!oe.value.documentation&&!oe.value.feedback&&!oe.value.getStarted&&!oe.value.issues||fe.push({extensionDescription:oe.description,getStarted:oe.value.getStarted,documentation:oe.value.documentation,feedback:oe.value.feedback,issues:oe.value.issues,remoteName:oe.value.remoteName})}getFilterOn(oe){return(0,T.isStringArray)(oe.remoteAuthority)?oe.remoteAuthority[0]:oe.remoteAuthority}setFilter(oe){this.remoteExplorerService.targetType=(0,T.isStringArray)(oe.remoteAuthority)?oe.remoteAuthority:[oe.remoteAuthority]}getActionViewItem(oe){if(oe.id===y.SwitchRemoteAction.ID){const fe=y.SwitchRemoteViewItem.createOptionItems(r.Registry.as(l.Extensions.ViewsRegistry).getViews(this.viewContainer),this.contextKeyService),pe=this.instantiationService.createInstance(y.SwitchRemoteViewItem,oe,fe);return this.hasSetSwitchForConnection?pe.setSelection():this.hasSetSwitchForConnection=pe.setSelectionForConnection(),pe}return super.getActionViewItem(oe)}getTitle(){return t.localize(13,null)}};te=Ee([W(0,A.IWorkbenchLayoutService),W(1,k.ITelemetryService),W(2,D.IWorkspaceContextService),W(3,I.IStorageService),W(4,w.IConfigurationService),W(5,v.IInstantiationService),W(6,C.IThemeService),W(7,o.IContextMenuService),W(8,c.IExtensionService),W(9,R.IRemoteExplorerService),W(10,O.IWorkbenchEnvironmentService),W(11,s.IContextKeyService),W(12,l.IViewDescriptorService)],te),e.RemoteViewPaneContainer=te,(0,n.registerAction2)(y.SwitchRemoteAction),r.Registry.as(l.Extensions.ViewContainersRegistry).registerViewContainer({id:S.VIEWLET_ID,title:t.localize(14,null),ctorDescriptor:new B.SyncDescriptor(te),hideIfEmpty:!0,viewOrderDelegate:{getOrder:ue=>{if(!ue)return;let oe=/^targets@(\d+)$/.exec(ue);if(oe)return-1e3;if(oe=/^details(@(\d+))?$/.exec(ue),oe)return-500+Number(oe[2]);if(oe=/^help(@(\d+))?$/.exec(ue),oe)return-10}},icon:P.remoteExplorerViewIcon,order:4},0);let se=class{constructor(oe,fe){oe.getEnvironment().then(pe=>{pe&&fe.setPerformanceMarks("server",pe.marks)})}};se=Ee([W(0,g.IRemoteAgentService),W(1,z.ITimerService)],se),e.RemoteMarkers=se;class ie{constructor(oe,fe,pe,me,be){this.location=fe,this._isDisposed=!1,this._lastReport=pe,this._currentProgressPromiseResolve=null,this._currentProgress=null,this._currentTimer=null;const Ce=new Promise(ve=>this._currentProgressPromiseResolve=ve);oe.withProgress({location:fe,buttons:me},ve=>(this._isDisposed||(this._currentProgress=ve),Ce),ve=>be(ve,this._lastReport)),this._lastReport&&this.report()}get lastReport(){return this._lastReport}dispose(){this._isDisposed=!0,this._currentProgressPromiseResolve&&(this._currentProgressPromiseResolve(),this._currentProgressPromiseResolve=null),this._currentProgress=null,this._currentTimer&&(this._currentTimer.dispose(),this._currentTimer=null)}report(oe){oe&&(this._lastReport=oe),this._lastReport&&this._currentProgress&&this._currentProgress.report({message:this._lastReport})}startTimer(oe){this.stopTimer(),this._currentTimer=new ce(this,oe)}stopTimer(){this._currentTimer&&(this._currentTimer.dispose(),this._currentTimer=null)}}class ce{constructor(oe,fe){this._parent=oe,this._completionTime=fe,this._token=setInterval(()=>this._render(),1e3),this._render()}dispose(){clearInterval(this._token)}_render(){const oe=this._completionTime-Date.now();if(oe<0)return;const fe=Math.ceil(oe/1e3);fe===1?this._parent.report(t.localize(15,null,fe)):this._parent.report(t.localize(16,null,fe))}}const le=40*1e3;let ae=class extends E.Disposable{constructor(oe,fe,pe,me,be,Ce,ve,he){super();this._reloadWindowShown=!1;const ge=oe.getConnection();if(ge){let ke=function(xe,Ae,Le=null){return Se&&(Se.dispose(),Se=null),xe||(xe=de?15:20),new ie(fe,xe,Le,Ae.map(Me=>Me.label),(Me,We)=>{typeof Me!="undefined"&&Ae[Me]?Ae[Me].callback():xe===20?Se=ke(15,Ae,We):Ie()})},Ie=function(){Se&&(Se.dispose(),Se=null)},de=!1;be.onShow(()=>de=!0),be.onHide(()=>de=!1);let Se=null,we=null,ye=null,Te="",De=0,_e=0;const Re={label:t.localize(17,null),callback:()=>{we&&we.skipWait()}},Ne={label:t.localize(18,null),callback:()=>{he.publicLog2("remoteReconnectionReload",{remoteName:(0,U.getRemoteName)(ve.remoteAuthority),reconnectionToken:Te,millisSinceLastIncomingData:Date.now()-De,attempt:_e}),me.executeCommand(b.ReloadWindowAction.ID)}};ge.onDidStateChange(xe=>{switch(Se&&Se.stopTimer(),ye&&(ye.dispose(),ye=null),xe.type){case 0:Te=xe.reconnectionToken,De=Date.now()-xe.millisSinceLastIncomingData,_e=0,he.publicLog2("remoteConnectionLost",{remoteName:(0,U.getRemoteName)(ve.remoteAuthority),reconnectionToken:xe.reconnectionToken}),(Se||xe.millisSinceLastIncomingData>le)&&(Se||(Se=ke(null,[Re,Ne])),Se.report(t.localize(19,null)));break;case 1:Se&&(we=xe,Se=ke(null,[Re,Ne]),Se.startTimer(Date.now()+1e3*xe.durationSeconds));break;case 2:Te=xe.reconnectionToken,De=Date.now()-xe.millisSinceLastIncomingData,_e=xe.attempt,he.publicLog2("remoteReconnectionRunning",{remoteName:(0,U.getRemoteName)(ve.remoteAuthority),reconnectionToken:xe.reconnectionToken,millisSinceLastIncomingData:xe.millisSinceLastIncomingData,attempt:xe.attempt}),(Se||xe.millisSinceLastIncomingData>le)&&(Se=ke(null,[Ne]),Se.report(t.localize(20,null)),ye=be.onShow(()=>{Se&&Se.location===20&&(Se=ke(15,[Ne],Se.lastReport))}));break;case 3:Te=xe.reconnectionToken,De=Date.now()-xe.millisSinceLastIncomingData,_e=xe.attempt,he.publicLog2("remoteReconnectionPermanentFailure",{remoteName:(0,U.getRemoteName)(ve.remoteAuthority),reconnectionToken:xe.reconnectionToken,millisSinceLastIncomingData:xe.millisSinceLastIncomingData,attempt:xe.attempt,handled:xe.handled}),Ie(),xe.handled?(Ce.info("Error handled: Not showing a notification for the error."),console.log("Error handled: Not showing a notification for the error.")):this._reloadWindowShown||(this._reloadWindowShown=!0,pe.show(m.default.Error,t.localize(21,null),[t.localize(22,null),t.localize(23,null)],{cancelId:1,custom:!0}).then(Ae=>{Ae.choice===0&&me.executeCommand(b.ReloadWindowAction.ID)}));break;case 4:Te=xe.reconnectionToken,De=Date.now()-xe.millisSinceLastIncomingData,_e=xe.attempt,he.publicLog2("remoteConnectionGain",{remoteName:(0,U.getRemoteName)(ve.remoteAuthority),reconnectionToken:xe.reconnectionToken,millisSinceLastIncomingData:xe.millisSinceLastIncomingData,attempt:xe.attempt}),Ie();break}})}}};ae=Ee([W(0,g.IRemoteAgentService),W(1,h.IProgressService),W(2,d.IDialogService),W(3,a.ICommandService),W(4,u.IQuickInputService),W(5,V.ILogService),W(6,O.IWorkbenchEnvironmentService),W(7,k.ITelemetryService)],ae),e.RemoteAgentConnectionStatusListener=ae}),define(ne[2773],re([1,0,47,17,2536,2537,2772,2564,513]),function(Q,e,t,f,_,A,k,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const w=f.Registry.as(t.Extensions.Workbench);w.registerWorkbenchContribution(_.ShowCandidateContribution,2),w.registerWorkbenchContribution(A.TunnelFactoryContribution,2),w.registerWorkbenchContribution(k.RemoteAgentConnectionStatusListener,4),w.registerWorkbenchContribution(D.RemoteStatusIndicator,1),w.registerWorkbenchContribution(I.ForwardedPortsView,4),w.registerWorkbenchContribution(I.PortRestore,4),w.registerWorkbenchContribution(I.AutomaticPortForwarding,4),w.registerWorkbenchContribution(k.RemoteMarkers,4)}),define(ne[2774],re([1,0,1707,27,215,5,37,12,24,8,80,40,34,43,161,383]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SCMViewPaneContainer=void 0;let S=class extends i.ViewPaneContainer{constructor(l,r,p,u,a,n,h,g,d,m){super(_.VIEWLET_ID,{mergeViewWithContainerWhenSingleView:!0},p,h,l,u,r,g,a,n,d,m)}create(l){super.create(l),l.classList.add("scm-viewlet")}getOptimalWidth(){return 400}getTitle(){return(0,t.localize)(0,null)}};S=Ee([W(0,v.IWorkbenchLayoutService),W(1,f.ITelemetryService),W(2,A.IInstantiationService),W(3,k.IContextMenuService),W(4,D.IThemeService),W(5,I.IStorageService),W(6,w.IConfigurationService),W(7,C.IExtensionService),W(8,o.IWorkspaceContextService),W(9,c.IViewDescriptorService)],S),e.SCMViewPaneContainer=S}),define(ne[2775],re([1,0,1704,17,47,627,215,16,2565,57,7,28,94,35,2202,43,2774,99,126,33,63,2699,2201,2511,211,837]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),r.ModesRegistry.registerLanguage({id:"scminput",extensions:[],aliases:[],mimetypes:["text/x-scm-input"]}),f.Registry.as(_.Extensions.Workbench).registerWorkbenchContribution(A.DirtyDiffWorkbenchController,3);const m=(0,u.registerIcon)("source-control-view-icon",p.Codicon.sourceControl,(0,t.localize)(0,null)),b=f.Registry.as(S.Extensions.ViewContainersRegistry).registerViewContainer({id:k.VIEWLET_ID,title:(0,t.localize)(1,null),ctorDescriptor:new l.SyncDescriptor(s.SCMViewPaneContainer),storageId:"workbench.scm.views.state",icon:m,alwaysUseContainerInfo:!0,order:2,hideIfEmpty:!0},0,{donotRegisterOpenCommand:!0}),E=f.Registry.as(S.Extensions.ViewsRegistry);E.registerViewWelcomeContent(k.VIEW_PANE_ID,{content:(0,t.localize)(2,null),when:"default"}),E.registerViewWelcomeContent(k.VIEW_PANE_ID,{content:(0,t.localize)(3,null),when:v.ContextKeyExpr.and(v.ContextKeyExpr.equals("scm.providerCount",0),d.WorkspaceTrustContext.IsEnabled,d.WorkspaceTrustContext.IsTrusted.toNegated())}),E.registerViewWelcomeContent(k.VIEW_PANE_ID,{content:`[${(0,t.localize)(4,null)}](command:${d.MANAGE_TRUST_COMMAND_ID})`,when:v.ContextKeyExpr.and(v.ContextKeyExpr.equals("scm.providerCount",0),d.WorkspaceTrustContext.IsEnabled,d.WorkspaceTrustContext.IsTrusted.toNegated())}),E.registerViews([{id:k.VIEW_PANE_ID,name:(0,t.localize)(5,null),ctorDescriptor:new l.SyncDescriptor(a.SCMViewPane),canToggleVisibility:!0,workspace:!0,canMoveView:!0,weight:80,order:-999,containerIcon:m,openCommandActionDescriptor:{id:b.id,mnemonicTitle:(0,t.localize)(6,null),keybindings:{primary:0,win:{primary:2048|1024|37},linux:{primary:2048|1024|37},mac:{primary:256|1024|37}},order:2}}],b),E.registerViews([{id:k.REPOSITORIES_VIEW_PANE_ID,name:(0,t.localize)(7,null),ctorDescriptor:new l.SyncDescriptor(h.SCMRepositoriesViewPane),canToggleVisibility:!0,hideByDefault:!0,workspace:!0,canMoveView:!0,weight:20,order:-1e3,when:v.ContextKeyExpr.and(v.ContextKeyExpr.has("scm.providerCount"),v.ContextKeyExpr.notEquals("scm.providerCount",0)),containerIcon:m}],b),f.Registry.as(_.Extensions.Workbench).registerWorkbenchContribution(I.SCMActiveResourceContextKeyController,3),f.Registry.as(_.Extensions.Workbench).registerWorkbenchContribution(I.SCMStatusController,3),f.Registry.as(w.Extensions.Configuration).registerConfiguration({id:"scm",order:5,title:(0,t.localize)(8,null),type:"object",scope:4,properties:{"scm.diffDecorations":{type:"string",enum:["all","gutter","overview","minimap","none"],enumDescriptions:[(0,t.localize)(9,null),(0,t.localize)(10,null),(0,t.localize)(11,null),(0,t.localize)(12,null),(0,t.localize)(13,null)],default:"all",description:(0,t.localize)(14,null)},"scm.diffDecorationsGutterWidth":{type:"number",enum:[1,2,3,4,5],default:3,description:(0,t.localize)(15,null)},"scm.diffDecorationsGutterVisibility":{type:"string",enum:["always","hover"],enumDescriptions:[(0,t.localize)(16,null),(0,t.localize)(17,null)],description:(0,t.localize)(18,null),default:"always"},"scm.diffDecorationsGutterAction":{type:"string",enum:["diff","none"],enumDescriptions:[(0,t.localize)(19,null),(0,t.localize)(20,null)],description:(0,t.localize)(21,null),default:"diff"},"scm.diffDecorationsIgnoreTrimWhitespace":{type:"string",enum:["true","false","inherit"],enumDescriptions:[(0,t.localize)(22,null),(0,t.localize)(23,null),(0,t.localize)(24,null)],description:(0,t.localize)(25,null),default:"false"},"scm.alwaysShowActions":{type:"boolean",description:(0,t.localize)(26,null),default:!1},"scm.countBadge":{type:"string",enum:["all","focused","off"],enumDescriptions:[(0,t.localize)(27,null),(0,t.localize)(28,null),(0,t.localize)(29,null)],description:(0,t.localize)(30,null),default:"all"},"scm.providerCountBadge":{type:"string",enum:["hidden","auto","visible"],enumDescriptions:[(0,t.localize)(31,null),(0,t.localize)(32,null),(0,t.localize)(33,null)],description:(0,t.localize)(34,null),default:"hidden"},"scm.defaultViewMode":{type:"string",enum:["tree","list"],enumDescriptions:[(0,t.localize)(35,null),(0,t.localize)(36,null)],description:(0,t.localize)(37,null),default:"list"},"scm.defaultViewSortKey":{type:"string",enum:["name","path","status"],enumDescriptions:[(0,t.localize)(38,null),(0,t.localize)(39,null),(0,t.localize)(40,null)],description:(0,t.localize)(41,null),default:"path"},"scm.autoReveal":{type:"boolean",description:(0,t.localize)(42,null),default:!0},"scm.inputFontFamily":{type:"string",markdownDescription:(0,t.localize)(43,null),default:"default"},"scm.inputFontSize":{type:"number",markdownDescription:(0,t.localize)(44,null),default:13},"scm.alwaysShowRepositories":{type:"boolean",markdownDescription:(0,t.localize)(45,null),default:!1},"scm.repositories.visible":{type:"number",description:(0,t.localize)(46,null),default:10},"scm.showActionButton":{type:"boolean",markdownDescription:(0,t.localize)(47,null),default:!0}}}),o.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"scm.acceptInput",description:{description:(0,t.localize)(48,null),args:[]},weight:200,when:v.ContextKeyExpr.has("scmRepository"),primary:2048|3,handler:R=>{const F=R.get(v.IContextKeyService).getContext(document.activeElement).getValue("scmRepository");if(!F||!F.provider.acceptInputCommand)return Promise.resolve(null);const L=F.provider.acceptInputCommand.id,M=F.provider.acceptInputCommand.arguments;return R.get(C.ICommandService).executeCommand(L,...M||[])}});const y={description:{description:(0,t.localize)(49,null),args:[]},weight:200,handler:R=>{R.get(v.IContextKeyService).getContext(document.activeElement).getValue("scmRepository")?.input.showNextHistoryValue()}},T={description:{description:(0,t.localize)(50,null),args:[]},weight:200,handler:R=>{R.get(v.IContextKeyService).getContext(document.activeElement).getValue("scmRepository")?.input.showPreviousHistoryValue()}};o.KeybindingsRegistry.registerCommandAndKeybindingRule({...y,id:"scm.viewNextCommit",when:v.ContextKeyExpr.and(v.ContextKeyExpr.has("scmRepository"),v.ContextKeyExpr.has("scmInputIsInLastPosition"),g.Context.Visible.toNegated()),primary:18}),o.KeybindingsRegistry.registerCommandAndKeybindingRule({...T,id:"scm.viewPreviousCommit",when:v.ContextKeyExpr.and(v.ContextKeyExpr.has("scmRepository"),v.ContextKeyExpr.has("scmInputIsInFirstPosition"),g.Context.Visible.toNegated()),primary:16}),o.KeybindingsRegistry.registerCommandAndKeybindingRule({...y,id:"scm.forceViewNextCommit",when:v.ContextKeyExpr.has("scmRepository"),primary:512|18}),o.KeybindingsRegistry.registerCommandAndKeybindingRule({...T,id:"scm.forceViewPreviousCommit",when:v.ContextKeyExpr.has("scmRepository"),primary:512|16}),C.CommandsRegistry.registerCommand("scm.openInTerminal",async(R,O)=>{if(!O||!O.rootUri)return;await R.get(C.ICommandService).executeCommand("openInTerminal",O.rootUri)}),D.MenuRegistry.appendMenuItem(D.MenuId.SCMSourceControl,{group:"100_end",command:{id:"scm.openInTerminal",title:(0,t.localize)(51,null)},when:v.ContextKeyExpr.equals("scmProviderHasRootUri",!0)}),(0,c.registerSingleton)(k.ISCMService,i.SCMService),(0,c.registerSingleton)(k.ISCMViewService,n.SCMViewService)}),define(ne[946],re([1,0,10,91,112,11,66,22,6,92,2,14,29,13,9,106,72,229,84,405,763,1716,98,73,16,28,8,7,37,54,23,5,155,38,71,26,41,67,24,27,32,12,34,377,178,131,214,43,810,337,360,896,2701,639,323,334,417,365,588,335,929,21,108,192,83,156,127,1120]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H,K,G,q,Z,j,X,Y,$,J,ee,te,se,ie,ce,le,ae,ue,oe,fe,pe,me,be,Ce){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SearchView=e.SearchViewPosition=void 0;const ve=t.$;var he;(function(we){we[we.SideBar=0]="SideBar",we[we.Panel=1]="Panel"})(he=e.SearchViewPosition||(e.SearchViewPosition={}));const ge=a.localize(0,null);let de=class wl extends G.ViewPane{constructor(ye,ke,Ie,Te,De,_e,Re,Ne,xe,Ae,Le,Me,We,Ve,Ue,et,Ze,Fe,Qe,qe,Be,Ke,Xe,rt,it,at,ft){super(ye,rt,Be,Me,Ue,Le,Ae,at,Qe,ft);this.fileService=ke,this.editorService=Ie,this.codeEditorService=Te,this.progressService=De,this.notificationService=_e,this.dialogService=Re,this.commandService=Ne,this.contextViewService=xe,this.contextService=We,this.searchWorkbenchService=Ve,this.replaceService=et,this.textFileService=Ze,this.preferencesService=Fe,this.searchHistoryService=qe,this.menuService=Ke,this.accessibilityService=Xe,this.isDisposed=!1,this.lastFocusState="input",this.contextMenu=null,this.messageDisposables=new v.DisposableStore,this.changedWhileHidden=!1,this.currentSearchQ=Promise.resolve(),this.pauseSearching=!1,this.container=t.$(".search-view"),this.viewletVisible=te.SearchViewVisibleKey.bindTo(this.contextKeyService),this.firstMatchFocused=te.FirstMatchFocusKey.bindTo(this.contextKeyService),this.fileMatchOrMatchFocused=te.FileMatchOrMatchFocusKey.bindTo(this.contextKeyService),this.fileMatchOrFolderMatchFocus=te.FileMatchOrFolderMatchFocusKey.bindTo(this.contextKeyService),this.fileMatchOrFolderMatchWithResourceFocus=te.FileMatchOrFolderMatchWithResourceFocusKey.bindTo(this.contextKeyService),this.fileMatchFocused=te.FileFocusKey.bindTo(this.contextKeyService),this.folderMatchFocused=te.FolderFocusKey.bindTo(this.contextKeyService),this.hasSearchResultsKey=te.HasSearchResults.bindTo(this.contextKeyService),this.matchFocused=te.MatchFocusKey.bindTo(this.contextKeyService),this.searchStateKey=ce.SearchStateKey.bindTo(this.contextKeyService),this.hasSearchPatternKey=te.ViewHasSearchPatternKey.bindTo(this.contextKeyService),this.hasReplacePatternKey=te.ViewHasReplacePatternKey.bindTo(this.contextKeyService),this.hasFilePatternKey=te.ViewHasFilePatternKey.bindTo(this.contextKeyService),this.hasSomeCollapsibleResultKey=te.ViewHasSomeCollapsibleKey.bindTo(this.contextKeyService),this.contextKeyService=this._register(this.contextKeyService.createScoped(this.container)),te.SearchViewFocusedKey.bindTo(this.contextKeyService).set(!0),this.inputBoxFocused=te.InputBoxFocusedKey.bindTo(this.contextKeyService),this.inputPatternIncludesFocused=te.PatternIncludesFocusedKey.bindTo(this.contextKeyService),this.inputPatternExclusionsFocused=te.PatternExcludesFocusedKey.bindTo(this.contextKeyService),this.instantiationService=this.instantiationService.createChild(new O.ServiceCollection([b.IContextKeyService,this.contextKeyService])),this.configurationService.onDidChangeConfiguration(vt=>{vt.affectsConfiguration("search.sortOrder")&&(this.searchConfig.sortOrder==="modified"&&this.removeFileStats(),this.refreshTree())}),this.viewModel=this._register(this.searchWorkbenchService.searchModel),this.queryBuilder=this.instantiationService.createInstance(se.QueryBuilder),this.memento=new q.Memento(this.id,it),this.viewletState=this.memento.getMemento(1,0),this._register(this.fileService.onDidFilesChange(vt=>this.onFilesChanged(vt))),this._register(this.textFileService.untitled.onWillDispose(vt=>this.onUntitledDidDispose(vt.resource))),this._register(this.contextService.onDidChangeWorkbenchState(()=>this.onDidChangeWorkbenchState())),this._register(this.searchHistoryService.onDidClearHistory(()=>this.clearHistory())),this.delayedRefresh=this._register(new A.Delayer(250)),this.addToSearchHistoryDelayer=this._register(new A.Delayer(2e3)),this.toggleCollapseStateDelayer=this._register(new A.Delayer(100)),this.triggerQueryDelayer=this._register(new A.Delayer(0)),this.treeAccessibilityProvider=this.instantiationService.createInstance(J.SearchAccessibilityProvider,this.viewModel)}get state(){return this.searchStateKey.get()??ce.SearchUIState.Idle}set state(ye){this.searchStateKey.set(ye)}getContainer(){return this.container}get searchResult(){return this.viewModel&&this.viewModel.searchResult}onDidChangeWorkbenchState(){this.contextService.getWorkbenchState()!==1&&this.searchWithoutFolderMessageElement&&t.hide(this.searchWithoutFolderMessageElement)}renderBody(ye){super.renderBody(ye),this.container=t.append(ye,t.$(".search-view")),this.searchWidgetsContainerElement=t.append(this.container,ve(".search-widgets-container")),this.createSearchWidget(this.searchWidgetsContainerElement);const ke=this.searchHistoryService.load(),Ie=this.viewletState["query.filePatterns"]||"",Te=this.viewletState["query.folderExclusions"]||"",De=ke.exclude||[],_e=this.viewletState["query.folderIncludes"]||"",Re=ke.include||[],Ne=this.viewletState["query.onlyOpenEditors"]||!1,xe=this.viewletState["query.queryDetailsExpanded"]||"",Ae=typeof this.viewletState["query.useExcludesAndIgnoreFiles"]=="boolean"?this.viewletState["query.useExcludesAndIgnoreFiles"]:!0;this.queryDetails=t.append(this.searchWidgetsContainerElement,ve(".query-details")),this.toggleQueryDetailsButton=t.append(this.queryDetails,ve(".more"+z.ThemeIcon.asCSSSelector(Y.searchDetailsIcon),{tabindex:0,role:"button",title:a.localize(1,null)})),this._register(t.addDisposableListener(this.toggleQueryDetailsButton,t.EventType.CLICK,Ze=>{t.EventHelper.stop(Ze),this.toggleQueryDetails(!this.accessibilityService.isScreenReaderOptimized())})),this._register(t.addDisposableListener(this.toggleQueryDetailsButton,t.EventType.KEY_UP,Ze=>{const Fe=new f.StandardKeyboardEvent(Ze);(Fe.equals(3)||Fe.equals(10))&&(t.EventHelper.stop(Ze),this.toggleQueryDetails(!1))})),this._register(t.addDisposableListener(this.toggleQueryDetailsButton,t.EventType.KEY_DOWN,Ze=>{new f.StandardKeyboardEvent(Ze).equals(1024|2)&&(this.searchWidget.isReplaceActive()?this.searchWidget.focusReplaceAllAction():this.searchWidget.isReplaceShown()?this.searchWidget.replaceInput.focusOnPreserve():this.searchWidget.focusRegexAction(),t.EventHelper.stop(Ze))}));const Le=t.append(this.queryDetails,ve(".file-types.includes")),Me=a.localize(2,null);t.append(Le,ve("h4",void 0,Me)),this.inputPatternIncludes=this._register(this.instantiationService.createInstance(j.IncludePatternInputWidget,Le,this.contextViewService,{ariaLabel:Me,placeholder:a.localize(3,null),showPlaceholderOnFocus:!0,history:Re})),this.inputPatternIncludes.setValue(_e),this.inputPatternIncludes.setOnlySearchInOpenEditors(Ne),this._register(this.inputPatternIncludes.onCancel(()=>this.cancelSearch(!1))),this._register(this.inputPatternIncludes.onChangeSearchInEditorsBox(()=>this.triggerQueryChange())),this.trackInputBox(this.inputPatternIncludes.inputFocusTracker,this.inputPatternIncludesFocused);const We=t.append(this.queryDetails,ve(".file-types.excludes")),Ve=a.localize(4,null);t.append(We,ve("h4",void 0,Ve)),this.inputPatternExcludes=this._register(this.instantiationService.createInstance(j.ExcludePatternInputWidget,We,this.contextViewService,{ariaLabel:Ve,placeholder:a.localize(5,null),showPlaceholderOnFocus:!0,history:De})),this.inputPatternExcludes.setValue(Te),this.inputPatternExcludes.setUseExcludesAndIgnoreFiles(Ae),this._register(this.inputPatternExcludes.onCancel(()=>this.cancelSearch(!1))),this._register(this.inputPatternExcludes.onChangeIgnoreBox(()=>this.triggerQueryChange())),this.trackInputBox(this.inputPatternExcludes.inputFocusTracker,this.inputPatternExclusionsFocused);const Ue=()=>this.hasFilePatternKey.set(this.inputPatternIncludes.getValue().length>0||this.inputPatternExcludes.getValue().length>0);Ue();const et=Ze=>{this.triggerQueryChange({triggeredOnType:Ze,delay:this.searchConfig.searchOnTypeDebouncePeriod}),Ze&&Ue()};this._register(this.inputPatternIncludes.onSubmit(et)),this._register(this.inputPatternExcludes.onSubmit(et)),this.messagesElement=t.append(this.container,ve(".messages.text-search-provider-messages")),this.contextService.getWorkbenchState()===1&&this.showSearchWithoutFolderMessage(),this.createSearchResultsView(this.container),(Ie!==""||Te!==""||_e!==""||xe!==""||!Ae)&&this.toggleQueryDetails(!0,!0,!0),this._register(this.viewModel.searchResult.onChange(Ze=>this.onSearchResultsChanged(Ze))),this._register(this.onDidChangeBodyVisibility(Ze=>this.onVisibilityChanged(Ze)))}onVisibilityChanged(ye){this.viewletVisible.set(ye),ye?this.changedWhileHidden&&(this.refreshAndUpdateCount(),this.changedWhileHidden=!1):this.lastFocusState="input",this.viewModel&&this.viewModel.searchResult.toggleHighlights(ye)}get searchAndReplaceWidget(){return this.searchWidget}get searchIncludePattern(){return this.inputPatternIncludes}get searchExcludePattern(){return this.inputPatternExcludes}createSearchWidget(ye){const ke=this.viewletState["query.contentPattern"]||"",Ie=this.viewletState["query.replaceText"]||"",Te=this.viewletState["query.regex"]===!0,De=this.viewletState["query.wholeWords"]===!0,_e=this.viewletState["query.caseSensitive"]===!0,Re=this.searchHistoryService.load(),Ne=Re.search||this.viewletState["query.searchHistory"]||[],xe=Re.replace||this.viewletState["query.replaceHistory"]||[],Ae=typeof this.viewletState["view.showReplace"]=="boolean"?this.viewletState["view.showReplace"]:!0,Le=this.viewletState["query.preserveCase"]===!0;this.searchWidget=this._register(this.instantiationService.createInstance(ee.SearchWidget,ye,{value:ke,replaceValue:Ie,isRegex:Te,isCaseSensitive:_e,isWholeWords:De,searchHistory:Ne,replaceHistory:xe,preserveCase:Le})),Ae&&this.searchWidget.toggleReplace(!0),this._register(this.searchWidget.onSearchSubmit(Ve=>this.triggerQueryChange(Ve))),this._register(this.searchWidget.onSearchCancel(({focus:Ve})=>this.cancelSearch(Ve))),this._register(this.searchWidget.searchInput.onDidOptionChange(()=>this.triggerQueryChange()));const Me=()=>this.hasSearchPatternKey.set(this.searchWidget.searchInput.getValue().length>0);Me(),this._register(this.searchWidget.searchInput.onDidChange(()=>Me()));const We=()=>this.hasReplacePatternKey.set(this.searchWidget.getReplaceValue().length>0);We(),this._register(this.searchWidget.replaceInput.inputBox.onDidChange(()=>We())),this._register(this.searchWidget.onDidHeightChange(()=>this.reLayout())),this._register(this.searchWidget.onReplaceToggled(()=>this.reLayout())),this._register(this.searchWidget.onReplaceStateChange(Ve=>{this.viewModel.replaceActive=Ve,this.refreshTree()})),this._register(this.searchWidget.onPreserveCaseChange(Ve=>{this.viewModel.preserveCase=Ve,this.refreshTree()})),this._register(this.searchWidget.onReplaceValueChanged(()=>{this.viewModel.replaceString=this.searchWidget.getReplaceValue(),this.delayedRefresh.trigger(()=>this.refreshTree())})),this._register(this.searchWidget.onBlur(()=>{this.toggleQueryDetailsButton.focus()})),this._register(this.searchWidget.onReplaceAll(()=>this.replaceAll())),this.trackInputBox(this.searchWidget.searchInputFocusTracker),this.trackInputBox(this.searchWidget.replaceInputFocusTracker)}trackInputBox(ye,ke){this._register(ye.onDidFocus(()=>{this.lastFocusState="input",this.inputBoxFocused.set(!0),ke&&ke.set(!0)})),this._register(ye.onDidBlur(()=>{this.inputBoxFocused.set(this.searchWidget.searchInputHasFocus()||this.searchWidget.replaceInputHasFocus()||this.inputPatternIncludes.inputHasFocus()||this.inputPatternExcludes.inputHasFocus()),ke&&ke.set(!1)}))}onSearchResultsChanged(ye){if(this.isVisible())return this.refreshAndUpdateCount(ye);this.changedWhileHidden=!0}refreshAndUpdateCount(ye){return this.searchWidget.setReplaceAllActionState(!this.viewModel.searchResult.isEmpty()),this.updateSearchResultCount(this.viewModel.searchResult.query.userDisabledExcludesAndIgnoreFiles,this.viewModel.searchResult.query?.onlyOpenEditors),this.refreshTree(ye)}refreshTree(ye){const ke=this.searchConfig.collapseResults;!ye||ye.added||ye.removed?this.searchConfig.sortOrder==="modified"?this.retrieveFileStats().then(()=>this.tree.setChildren(null,this.createResultIterator(ke))):this.tree.setChildren(null,this.createResultIterator(ke)):this.searchConfig.sortOrder==="countAscending"||this.searchConfig.sortOrder==="countDescending"?this.tree.setChildren(null,this.createResultIterator(ke)):ye.elements.forEach(Ie=>{this.tree.setChildren(Ie,this.createIterator(Ie,ke)),this.tree.rerender(Ie)})}createResultIterator(ye){const ke=this.searchResult.folderMatches().filter(Ie=>!Ie.isEmpty()).sort(ae.searchMatchComparer);return ke.length===1?this.createFolderIterator(ke[0],ye):w.Iterable.map(ke,Ie=>{const Te=this.createFolderIterator(Ie,ye);return{element:Ie,children:Te}})}createFolderIterator(ye,ke){const Ie=this.searchConfig.sortOrder,Te=ye.matches().sort((De,_e)=>(0,ae.searchMatchComparer)(De,_e,Ie));return w.Iterable.map(Te,De=>{const _e=this.createFileIterator(De);let Re=!0;try{this.tree.getNode(De)}catch{Re=!1}const Ne=Re?void 0:ke==="alwaysCollapse"||De.matches().length>10&&ke!=="alwaysExpand";return{element:De,children:_e,collapsed:Ne}})}createFileIterator(ye){const ke=ye.matches().sort(ae.searchMatchComparer);return w.Iterable.map(ke,Ie=>({element:Ie}))}createIterator(ye,ke){return ye instanceof ae.SearchResult?this.createResultIterator(ke):ye instanceof ae.FolderMatch?this.createFolderIterator(ye,ke):this.createFileIterator(ye)}replaceAll(){if(this.viewModel.searchResult.count()===0)return;const ye=this.viewModel.searchResult.count(),ke=this.viewModel.searchResult.fileCount(),Ie=this.searchWidget.getReplaceValue()||"",Te=this.buildAfterReplaceAllMessage(ye,ke,Ie);let De,_e;this.progressService.withProgress({location:this.getProgressLocation(),delay:100,total:ye},Ne=>(_e=Ne,new Promise(xe=>De=xe)));const Re={title:a.localize(6,null),message:this.buildReplaceAllConfirmationMessage(ye,ke,Ie),primaryButton:a.localize(7,null),type:"question"};this.dialogService.confirm(Re).then(Ne=>{Ne.confirmed&&(this.searchWidget.setReplaceAllActionState(!1),this.viewModel.searchResult.replaceAll(_e).then(()=>{De();const xe=this.clearMessage();t.append(xe,Te),this.reLayout()},xe=>{De(),D.isCancellationError(xe),this.notificationService.error(xe)}))})}buildAfterReplaceAllMessage(ye,ke,Ie){return ye===1?ke===1?Ie?a.localize(8,null,ye,ke,Ie):a.localize(9,null,ye,ke):Ie?a.localize(10,null,ye,ke,Ie):a.localize(11,null,ye,ke):ke===1?Ie?a.localize(12,null,ye,ke,Ie):a.localize(13,null,ye,ke):Ie?a.localize(14,null,ye,ke,Ie):a.localize(15,null,ye,ke)}buildReplaceAllConfirmationMessage(ye,ke,Ie){return ye===1?ke===1?Ie?a.localize(16,null,ye,ke,Ie):a.localize(17,null,ye,ke):Ie?a.localize(18,null,ye,ke,Ie):a.localize(19,null,ye,ke):ke===1?Ie?a.localize(20,null,ye,ke,Ie):a.localize(21,null,ye,ke):Ie?a.localize(22,null,ye,ke,Ie):a.localize(23,null,ye,ke)}clearMessage(){this.searchWithoutFolderMessageElement=void 0;const ye=this.messagesElement.style.display==="none";t.clearNode(this.messagesElement),t.show(this.messagesElement),this.messageDisposables.clear();const ke=t.append(this.messagesElement,ve(".message"));return ye&&this.reLayout(),ke}createSearchResultsView(ye){this.resultsElement=t.append(ye,ve(".results.show-file-icons"));const ke=this.instantiationService.createInstance(J.SearchDelegate),Ie={getId(De){return De.id()}};this.treeLabels=this._register(this.instantiationService.createInstance(K.ResourceLabels,{onDidChangeVisibility:this.onDidChangeBodyVisibility})),this.tree=this._register(this.instantiationService.createInstance(F.WorkbenchObjectTree,"SearchView",this.resultsElement,ke,[this._register(this.instantiationService.createInstance(J.FolderMatchRenderer,this.viewModel,this,this.treeLabels)),this._register(this.instantiationService.createInstance(J.FileMatchRenderer,this.viewModel,this,this.treeLabels)),this._register(this.instantiationService.createInstance(J.MatchRenderer,this.viewModel,this))],{identityProvider:Ie,accessibilityProvider:this.treeAccessibilityProvider,dnd:this.instantiationService.createInstance(be.ResourceListDnDHandler,De=>De instanceof ae.FileMatch?De.resource:De instanceof ae.Match?(0,M.withSelection)(De.parent().resource,De.range()):null),multipleSelectionSupport:!1,selectionNavigation:!0,overrideStyles:{listBackground:this.getBackgroundColor()}})),this._register(this.tree.onContextMenu(De=>this.onContextMenu(De)));const Te=()=>this.toggleCollapseStateDelayer.trigger(()=>this.hasSomeCollapsibleResultKey.set(this.hasSomeCollapsible()));Te(),this._register(this.viewModel.searchResult.onChange(()=>Te())),this._register(this.tree.onDidChangeCollapseState(()=>Te())),this._register(I.Event.debounce(this.tree.onDidOpen,(De,_e)=>_e,75,!0)(De=>{if(De.element instanceof ae.Match){const _e=De.element;this.currentSelectedFileMatch&&this.currentSelectedFileMatch.setSelectedMatch(null),this.currentSelectedFileMatch=_e.parent(),this.currentSelectedFileMatch.setSelectedMatch(_e),this.onFocus(_e,De.editorOptions.preserveFocus,De.sideBySide,De.editorOptions.pinned)}})),this._register(I.Event.any(this.tree.onDidFocus,this.tree.onDidChangeFocus)(()=>{if(this.tree.isDOMFocused()){const De=this.tree.getFocus()[0];this.firstMatchFocused.set(this.tree.navigate().first()===De),this.fileMatchOrMatchFocused.set(!!De),this.fileMatchFocused.set(De instanceof ae.FileMatch),this.folderMatchFocused.set(De instanceof ae.FolderMatch),this.matchFocused.set(De instanceof ae.Match),this.fileMatchOrFolderMatchFocus.set(De instanceof ae.FileMatch||De instanceof ae.FolderMatch),this.fileMatchOrFolderMatchWithResourceFocus.set(De instanceof ae.FileMatch||De instanceof ae.FolderMatchWithResource),this.lastFocusState="tree"}})),this._register(this.tree.onDidBlur(()=>{this.firstMatchFocused.reset(),this.fileMatchOrMatchFocused.reset(),this.fileMatchFocused.reset(),this.folderMatchFocused.reset(),this.matchFocused.reset(),this.fileMatchOrFolderMatchFocus.reset(),this.fileMatchOrFolderMatchWithResourceFocus.reset()}))}onContextMenu(ye){this.contextMenu||(this.contextMenu=this._register(this.menuService.createMenu(g.MenuId.SearchContext,this.contextKeyService))),ye.browserEvent.preventDefault(),ye.browserEvent.stopPropagation();const ke=[],Ie=(0,h.createAndFillInContextMenuActions)(this.contextMenu,{shouldForwardArgs:!0},ke);this.contextMenuService.showContextMenu({getAnchor:()=>ye.anchor,getActions:()=>ke,getActionsContext:()=>ye.element,onHide:()=>(0,v.dispose)(Ie)})}hasSomeCollapsible(){const ye=this.getControl(),ke=ye.navigate();let Ie=ke.first();do if(!ye.isCollapsed(Ie))return!0;while(Ie=ke.next());return!1}selectNextMatch(){if(!this.hasSearchResults())return;const[ye]=this.tree.getSelection();ye&&!(ye instanceof ae.Match)&&this.tree.isCollapsed(ye)&&this.tree.expand(ye);const ke=this.tree.navigate(ye);let Ie=ke.next();for(Ie||(Ie=ke.first());Ie&&!(Ie instanceof ae.Match);)this.tree.isCollapsed(Ie)&&this.tree.expand(Ie),Ie=ke.next();if(Ie){Ie===ye&&this.tree.setFocus([]);const Te=(0,F.getSelectionKeyboardEvent)(void 0,!1,!1);this.tree.setFocus([Ie],Te),this.tree.setSelection([Ie],Te),this.tree.reveal(Ie);const De=this.treeAccessibilityProvider.getAriaLabel(Ie);De&&_.alert(De)}}selectPreviousMatch(){if(!this.hasSearchResults())return;const[ye]=this.tree.getSelection();let ke=this.tree.navigate(ye),Ie=ke.previous();for(;!Ie||!(Ie instanceof ae.Match)&&!this.tree.isCollapsed(Ie);){const Te=Ie?ke.previous():ke.last();if(!Ie&&!Te)return;Ie=Te}for(;!(Ie instanceof ae.Match);){const Te=ke.next();this.tree.expand(Ie),ke=this.tree.navigate(Te),Ie=Te?ke.previous():ke.last()}if(Ie){Ie===ye&&this.tree.setFocus([]);const Te=(0,F.getSelectionKeyboardEvent)(void 0,!1,!1);this.tree.setFocus([Ie],Te),this.tree.setSelection([Ie],Te),this.tree.reveal(Ie);const De=this.treeAccessibilityProvider.getAriaLabel(Ie);De&&_.alert(De)}}moveFocusToResults(){this.tree.domFocus()}focus(){if(super.focus(),this.lastFocusState==="input"||!this.hasSearchResults()){const ye=this.searchConfig.seedOnFocus?this.updateTextFromSelection({allowSearchOnType:!1}):!1;this.searchWidget.focus(void 0,void 0,ye)}else this.tree.domFocus()}updateTextFromFindWidgetOrSelection({allowUnselectedWord:ye=!0,allowSearchOnType:ke=!0}){let Ie=this.editorService.activeTextEditorControl;if((0,S.isCodeEditor)(Ie)&&!Ie?.hasTextFocus()){const Te=p.CommonFindController.get(Ie);if(Te&&Te.isFindInputFocused())return this.updateTextFromFindWidget(Te,{allowSearchOnType:ke});Ie=this.codeEditorService.listCodeEditors().find(_e=>_e instanceof l.EmbeddedCodeEditorWidget&&_e.getParentEditor()===Ie&&_e.hasTextFocus())??Ie}return this.updateTextFromSelection({allowUnselectedWord:ye,allowSearchOnType:ke},Ie)}updateTextFromFindWidget(ye,{allowSearchOnType:ke=!0}){if(!this.searchConfig.seedWithNearestWord&&(window.getSelection()?.toString()??"")==="")return!1;const Ie=ye.getState().searchString;return Ie===""?!1:(this.searchWidget.searchInput.setCaseSensitive(ye.getState().matchCase),this.searchWidget.searchInput.setWholeWords(ye.getState().wholeWord),this.searchWidget.searchInput.setRegex(ye.getState().isRegex),this.updateText(Ie,ke),!0)}updateTextFromSelection({allowUnselectedWord:ye=!0,allowSearchOnType:ke=!0},Ie){if(!this.configurationService.getValue("editor").find.seedSearchStringFromSelection)return!1;let De=this.getSearchTextFromEditor(ye,Ie);return De===null?!1:(this.searchWidget.searchInput.getRegex()&&(De=o.escapeRegExpCharacters(De)),this.updateText(De,ke),!0)}updateText(ye,ke=!0){ke&&!this.viewModel.searchResult.isDirty?this.searchWidget.setValue(ye):(this.pauseSearching=!0,this.searchWidget.setValue(ye),this.pauseSearching=!1)}focusNextInputBox(){if(this.searchWidget.searchInputHasFocus()){this.searchWidget.isReplaceShown()?this.searchWidget.focus(!0,!0):this.moveFocusFromSearchOrReplace();return}if(this.searchWidget.replaceInputHasFocus()){this.moveFocusFromSearchOrReplace();return}if(this.inputPatternIncludes.inputHasFocus()){this.inputPatternExcludes.focus(),this.inputPatternExcludes.select();return}if(this.inputPatternExcludes.inputHasFocus()){this.selectTreeIfNotSelected();return}}moveFocusFromSearchOrReplace(){this.showsFileTypes()?this.toggleQueryDetails(!0,this.showsFileTypes()):this.selectTreeIfNotSelected()}focusPreviousInputBox(){if(!this.searchWidget.searchInputHasFocus()){if(this.searchWidget.replaceInputHasFocus()){this.searchWidget.focus(!0);return}if(this.inputPatternIncludes.inputHasFocus()){this.searchWidget.focus(!0,!0);return}if(this.inputPatternExcludes.inputHasFocus()){this.inputPatternIncludes.focus(),this.inputPatternIncludes.select();return}if(this.tree.isDOMFocused()){this.moveFocusFromResults();return}}}moveFocusFromResults(){this.showsFileTypes()?this.toggleQueryDetails(!0,!0,!1,!0):this.searchWidget.focus(!0,!0)}reLayout(){if(this.isDisposed||!this.size)return;const ye=this.searchConfig.actionsPosition;this.getContainer().classList.toggle(wl.ACTIONS_RIGHT_CLASS_NAME,ye==="right"),this.searchWidget.setWidth(this.size.width-28),this.inputPatternExcludes.setWidth(this.size.width-28),this.inputPatternIncludes.setWidth(this.size.width-28),this.tree.layout()}layoutBody(ye,ke){super.layoutBody(ye,ke),this.size=new t.Dimension(ke,ye),this.reLayout()}getControl(){return this.tree}allSearchFieldsClear(){return this.searchWidget.getReplaceValue()===""&&this.searchWidget.searchInput.getValue()===""}allFilePatternFieldsClear(){return this.searchExcludePattern.getValue()===""&&this.searchIncludePattern.getValue()===""}hasSearchResults(){return!this.viewModel.searchResult.isEmpty()}clearSearchResults(ye=!0){this.viewModel.searchResult.clear(),this.showEmptyStage(!0),this.contextService.getWorkbenchState()===1&&this.showSearchWithoutFolderMessage(),ye&&(this.allSearchFieldsClear()&&this.clearFilePatternFields(),this.searchWidget.clear()),this.viewModel.cancelSearch(),this.tree.ariaLabel=a.localize(24,null),_.status(a.localize(25,null)),this.reLayout()}clearFilePatternFields(){this.searchExcludePattern.clear(),this.searchIncludePattern.clear()}cancelSearch(ye=!0){return this.viewModel.cancelSearch()?(ye&&this.searchWidget.focus(),!0):!1}selectTreeIfNotSelected(){if(this.tree.getNode(null)&&(this.tree.domFocus(),this.tree.getSelection().length===0)){const ke=(0,F.getSelectionKeyboardEvent)();this.tree.focusNext(void 0,void 0,ke),this.tree.setSelection(this.tree.getFocus(),ke)}}getSearchTextFromEditor(ye,ke){if(t.isAncestor(document.activeElement,this.getContainer())||(ke=ke??this.editorService.activeTextEditorControl,(0,S.isDiffEditor)(ke)&&(ke.getOriginalEditor().hasTextFocus()?ke=ke.getOriginalEditor():ke=ke.getModifiedEditor()),!(0,S.isCodeEditor)(ke)||!ke.hasModel()))return null;const Ie=ke.getSelection();if(!Ie)return null;if(Ie.isEmpty()&&this.searchConfig.seedWithNearestWord&&ye){const Te=ke.getModel().getWordAtPosition(Ie.getStartPosition());if(Te)return Te.word}if(!Ie.isEmpty()){let Te="";for(let De=Ie.startLineNumber;De<=Ie.endLineNumber;De++){let _e=ke.getModel().getLineContent(De);De===Ie.endLineNumber&&(_e=_e.substring(0,Ie.endColumn-1)),De===Ie.startLineNumber&&(_e=_e.substring(Ie.startColumn-1)),De!==Ie.startLineNumber&&(_e=` `+_e),Te+=_e}return Te}return null}showsFileTypes(){return this.queryDetails.classList.contains("more")}toggleCaseSensitive(){this.searchWidget.searchInput.setCaseSensitive(!this.searchWidget.searchInput.getCaseSensitive()),this.triggerQueryChange()}toggleWholeWords(){this.searchWidget.searchInput.setWholeWords(!this.searchWidget.searchInput.getWholeWords()),this.triggerQueryChange()}toggleRegex(){this.searchWidget.searchInput.setRegex(!this.searchWidget.searchInput.getRegex()),this.triggerQueryChange()}togglePreserveCase(){this.searchWidget.replaceInput.setPreserveCase(!this.searchWidget.replaceInput.getPreserveCase()),this.triggerQueryChange()}setSearchParameters(ye={}){typeof ye.isCaseSensitive=="boolean"&&this.searchWidget.searchInput.setCaseSensitive(ye.isCaseSensitive),typeof ye.matchWholeWord=="boolean"&&this.searchWidget.searchInput.setWholeWords(ye.matchWholeWord),typeof ye.isRegex=="boolean"&&this.searchWidget.searchInput.setRegex(ye.isRegex),typeof ye.filesToInclude=="string"&&this.searchIncludePattern.setValue(String(ye.filesToInclude)),typeof ye.filesToExclude=="string"&&this.searchExcludePattern.setValue(String(ye.filesToExclude)),typeof ye.query=="string"&&this.searchWidget.searchInput.setValue(ye.query),typeof ye.replace=="string"?this.searchWidget.replaceInput.setValue(ye.replace):this.searchWidget.replaceInput.getValue()!==""&&this.searchWidget.replaceInput.setValue(""),typeof ye.triggerSearch=="boolean"&&ye.triggerSearch&&this.triggerQueryChange(),typeof ye.preserveCase=="boolean"&&this.searchWidget.replaceInput.setPreserveCase(ye.preserveCase),typeof ye.useExcludeSettingsAndIgnoreFiles=="boolean"&&this.inputPatternExcludes.setUseExcludesAndIgnoreFiles(ye.useExcludeSettingsAndIgnoreFiles),typeof ye.onlyOpenEditors=="boolean"&&this.searchIncludePattern.setOnlySearchInOpenEditors(ye.onlyOpenEditors)}toggleQueryDetails(ye=!0,ke,Ie,Te){const De="more";ke=typeof ke=="undefined"?!this.queryDetails.classList.contains(De):Boolean(ke),this.viewletState["query.queryDetailsExpanded"]=ke,Ie=Boolean(Ie),ke?(this.toggleQueryDetailsButton.setAttribute("aria-expanded","true"),this.queryDetails.classList.add(De),ye&&(Te?(this.inputPatternExcludes.focus(),this.inputPatternExcludes.select()):(this.inputPatternIncludes.focus(),this.inputPatternIncludes.select()))):(this.toggleQueryDetailsButton.setAttribute("aria-expanded","false"),this.queryDetails.classList.remove(De),ye&&this.searchWidget.focus()),!Ie&&this.size&&this.layout(this._orientation===0?this.size.height:this.size.width)}searchInFolders(ye=[]){if(!ye.length||ye.some(ke=>ke===".")){this.inputPatternIncludes.setValue(""),this.searchWidget.focus();return}this.showsFileTypes()||this.toggleQueryDetails(!0,!0),this.inputPatternIncludes.setValue(ye.join(", ")),this.searchWidget.focus(!1)}triggerQueryChange(ye){const ke={preserveFocus:!0,triggeredOnType:!1,delay:0,...ye};ke.triggeredOnType&&!this.searchConfig.searchOnType||this.pauseSearching||this.triggerQueryDelayer.trigger(()=>{this._onQueryChanged(ke.preserveFocus,ke.triggeredOnType)},ke.delay)}_onQueryChanged(ye,ke=!1){if(!this.searchWidget.searchInput.inputBox.isInputValid())return;const Ie=this.searchWidget.searchInput.getRegex(),Te=this.searchWidget.searchInput.getWholeWords(),De=this.searchWidget.searchInput.getCaseSensitive(),_e=this.searchWidget.searchInput.getValue(),Re=this.inputPatternExcludes.getValue().trim(),Ne=this.inputPatternIncludes.getValue().trim(),xe=this.inputPatternExcludes.useExcludesAndIgnoreFiles(),Ae=this.inputPatternIncludes.onlySearchInOpenEditors();if(_e.length===0){this.clearSearchResults(!1),this.clearMessage();return}const Le={pattern:_e,isRegExp:Ie,isCaseSensitive:De,isWordMatch:Te},Me=this.inputPatternExcludes.getValue(),We=this.inputPatternIncludes.getValue(),Ve=Le.isRegExp?1e4:1e3,Ue={_reason:"searchView",extraFileResources:this.instantiationService.invokeFunction(ce.getOutOfWorkspaceEditorResources),maxResults:(0,c.withNullAsUndefined)(this.searchConfig.maxResults),disregardIgnoreFiles:!xe||void 0,disregardExcludeSettings:!xe||void 0,onlyOpenEditors:Ae,excludePattern:Me,includePattern:We,previewOptions:{matchLines:1,charsPerLine:Ve},isSmartCase:this.searchConfig.smartCase,expandPatterns:!0},et=this.contextService.getWorkspace().folders,Ze=Qe=>{this.searchWidget.searchInput.showMessage({content:Qe.message,type:3}),this.viewModel.searchResult.clear()};let Fe;try{Fe=this.queryBuilder.text(Le,et.map(Qe=>Qe.uri),Ue)}catch(Qe){Ze(Qe);return}this.validateQuery(Fe).then(()=>{this.onQueryTriggered(Fe,Ue,Re,Ne,ke),ye||this.searchWidget.focus(!1,void 0,!0)},Ze)}validateQuery(ye){const ke=ye.folderQueries.map(Ie=>this.fileService.exists(Ie.folder).catch(()=>!1));return Promise.all(ke).then(Ie=>{const Te=ye.folderQueries.filter((De,_e)=>Ie[_e]);if(!ye.folderQueries.length||Te.length)ye.folderQueries=Te;else{const De=ye.folderQueries[0].folder.fsPath,_e=a.localize(26,null,De);return Promise.reject(new Error(_e))}})}onQueryTriggered(ye,ke,Ie,Te,De){this.addToSearchHistoryDelayer.trigger(()=>{this.searchWidget.searchInput.onSearchSubmit(),this.inputPatternExcludes.onSearchSubmit(),this.inputPatternIncludes.onSearchSubmit()}),this.viewModel.cancelSearch(!0),this.currentSearchQ=this.currentSearchQ.then(()=>this.doSearch(ye,Ie,Te,De)).then(()=>{},()=>{})}doSearch(ye,ke,Ie,Te){let De;this.progressService.withProgress({location:this.getProgressLocation(),delay:Te?300:0},Le=>new Promise(Me=>De=Me)),this.searchWidget.searchInput.clearMessage(),this.state=ce.SearchUIState.Searching,this.showEmptyStage();const _e=setTimeout(()=>{this.state=ce.SearchUIState.SlowSearch},2e3),Re=Le=>{if(clearTimeout(_e),this.state=ce.SearchUIState.Idle,De(),this.onSearchResultsChanged(),this.searchConfig.collapseResults!=="alwaysCollapse"&&this.viewModel.searchResult.matches().length===1){const Ve=this.viewModel.searchResult.matches()[0];Ve.count()<50&&this.tree.expand(Ve)}this.viewModel.replaceString=this.searchWidget.getReplaceValue();const We=!this.viewModel.searchResult.isEmpty();if(Le?.exit!==1){if(We)this.viewModel.searchResult.toggleHighlights(this.isVisible()),_.status(a.localize(39,null,this.viewModel.searchResult.count(),this.viewModel.searchResult.fileCount()));else{const Ve=!!ke,Ue=!!Ie;let et;Le?this.inputPatternIncludes.onlySearchInOpenEditors()?Ue&&Ve?et=a.localize(27,null,Ie,ke):Ue?et=a.localize(28,null,Ie):Ve?et=a.localize(29,null,ke):et=a.localize(30,null):Ue&&Ve?et=a.localize(31,null,Ie,ke):Ue?et=a.localize(32,null,Ie):Ve?et=a.localize(33,null,ke):et=a.localize(34,null):et=ge,_.status(et);const Ze=this.clearMessage();if(t.append(Ze,et),Le)if(Ue||Ve){const Fe=this.messageDisposables.add(new Se(a.localize(36,null),this.onSearchAgain.bind(this)));t.append(Ze,Fe.element)}else{const Fe=this.messageDisposables.add(new Se(a.localize(37,null),this.onOpenSettings.bind(this)));t.append(Ze,Fe.element)}else{const Fe=this.messageDisposables.add(new Se(a.localize(35,null),()=>this.triggerQueryChange({preserveFocus:!1})));t.append(Ze,Fe.element)}if(Le){t.append(Ze,ve("span",void 0," - "));const Fe=this.messageDisposables.add(new Se(a.localize(38,null),this.onLearnMore.bind(this)));t.append(Ze,Fe.element)}this.contextService.getWorkbenchState()===1&&this.showSearchWithoutFolderMessage(),this.reLayout()}if(Le&&Le.limitHit&&Le.messages.push({type:pe.TextSearchCompleteMessageType.Warning,text:a.localize(40,null)}),Le&&Le.messages)for(const Ve of Le.messages)this.addMessage(Ve);this.reLayout()}},Ne=Le=>(clearTimeout(_e),this.state=ce.SearchUIState.Idle,D.isCancellationError(Le)?Re(void 0):(De(),this.searchWidget.searchInput.showMessage({content:Le.message,type:3}),this.viewModel.searchResult.clear(),Promise.resolve()));let xe=0;const Ae=setInterval(()=>{if(this.state===ce.SearchUIState.Idle){window.clearInterval(Ae);return}const Le=this.viewModel.searchResult.fileCount();xe!==Le&&(xe=Le,this.refreshAndUpdateCount())},100);return this.searchWidget.setReplaceAllActionState(!1),this.tree.setSelection([]),this.viewModel.search(ye).then(Re,Ne)}onOpenSettings(ye){t.EventHelper.stop(ye,!1),this.openSettings("@id:files.exclude,search.exclude,search.useParentIgnoreFiles,search.useGlobalIgnoreFiles,search.useIgnoreFiles")}openSettings(ye){const ke={query:ye};return this.contextService.getWorkbenchState()!==1?this.preferencesService.openWorkspaceSettings(ke):this.preferencesService.openUserSettings(ke)}onLearnMore(){this.openerService.open(i.URI.parse("https://go.microsoft.com/fwlink/?linkid=853977"))}onSearchAgain(){this.inputPatternExcludes.setValue(""),this.inputPatternIncludes.setValue(""),this.inputPatternIncludes.setOnlySearchInOpenEditors(!1),this.triggerQueryChange({preserveFocus:!1})}onEnableExcludes(){this.toggleQueryDetails(!1,!0),this.searchExcludePattern.setUseExcludesAndIgnoreFiles(!0)}onDisableSearchInOpenEditors(){this.toggleQueryDetails(!1,!0),this.inputPatternIncludes.setOnlySearchInOpenEditors(!1)}updateSearchResultCount(ye,ke){const Ie=this.viewModel.searchResult.fileCount();this.hasSearchResultsKey.set(Ie>0);const Te=this.messagesElement.style.display==="none",De=this.clearMessage(),_e=this.buildResultCountMessage(this.viewModel.searchResult.count(),Ie);if(this.tree.ariaLabel=_e+a.localize(41,null,this.searchResult.query?.contentPattern.pattern??""),t.append(De,_e),Ie>0){if(ye){const xe=" - "+a.localize(42,null)+" ",Ae=this.messageDisposables.add(new Se(a.localize(43,null),this.onEnableExcludes.bind(this),a.localize(44,null)));t.append(De,ve("span",void 0,xe,"(",Ae.element,")"))}if(ke){const xe=" - "+a.localize(45,null)+" ",Ae=this.messageDisposables.add(new Se(a.localize(46,null),this.onDisableSearchInOpenEditors.bind(this),a.localize(47,null)));t.append(De,ve("span",void 0,xe,"(",Ae.element,")"))}t.append(De," - ");const Re=(0,X.appendKeyBindingLabel)(a.localize(48,null),this.keybindingService.lookupKeybinding(te.OpenInEditorCommandId),this.keybindingService),Ne=this.messageDisposables.add(new Se(a.localize(49,null),()=>this.instantiationService.invokeFunction(ue.createEditorFromSearchResult,this.searchResult,this.searchIncludePattern.getValue(),this.searchExcludePattern.getValue(),this.searchIncludePattern.onlySearchInOpenEditors()),Re));t.append(De,Ne.element),this.reLayout()}else Te||t.hide(this.messagesElement)}addMessage(ye){const ke=this.messagesElement.firstChild;!ke||t.append(ke,(0,$.renderSearchMessage)(ye,this.instantiationService,this.notificationService,this.openerService,this.commandService,this.messageDisposables,()=>this.triggerQueryChange()))}buildResultCountMessage(ye,ke){return ye===1&&ke===1?a.localize(50,null,ye,ke):ye===1?a.localize(51,null,ye,ke):ke===1?a.localize(52,null,ye,ke):a.localize(53,null,ye,ke)}showSearchWithoutFolderMessage(){this.searchWithoutFolderMessageElement=this.clearMessage();const ye=t.append(this.searchWithoutFolderMessageElement,ve("p",void 0,a.localize(54,null))),ke=this.messageDisposables.add(new Se(a.localize(55,null),()=>{this.commandService.executeCommand(C.isMacintosh&&C.isNative?H.OpenFileFolderAction.ID:H.OpenFolderAction.ID).catch(Ie=>D.onUnexpectedError(Ie))}));t.append(ye,ke.element)}showEmptyStage(ye=!1){((this.messagesElement.firstChild?.textContent?.indexOf(ge)??-1)>-1||ye||!this.configurationService.getValue().search.searchOnType)&&t.hide(this.messagesElement),t.show(this.resultsElement),this.currentSelectedFileMatch=void 0}onFocus(ye,ke,Ie,Te){return this.configurationService.getValue().search.useReplacePreview&&this.viewModel.isReplaceActive()&&!!this.viewModel.replaceString?this.replaceService.openReplacePreview(ye,ke,Ie,Te):this.open(ye,ke,Ie,Te)}open(ye,ke,Ie,Te){const De=this.getSelectionFrom(ye),_e=ye instanceof ae.Match?ye.parent().resource:ye.resource;return this.editorService.openEditor({resource:_e,options:{preserveFocus:ke,pinned:Te,selection:De,revealIfVisible:!0}},Ie?oe.SIDE_GROUP:oe.ACTIVE_GROUP).then(Re=>{const Ne=Re?.getControl();ye instanceof ae.Match&&ke&&(0,S.isCodeEditor)(Ne)?this.viewModel.searchResult.rangeHighlightDecorations.highlightRange(Ne.getModel(),ye.range()):this.viewModel.searchResult.rangeHighlightDecorations.removeHighlightRange()},D.onUnexpectedError)}openEditorWithMultiCursor(ye){const ke=ye instanceof ae.Match?ye.parent().resource:ye.resource;return this.editorService.openEditor({resource:ke,options:{preserveFocus:!1,pinned:!0,revealIfVisible:!0}}).then(Ie=>{if(Ie){let Te=null;if(ye instanceof ae.FileMatch?Te=ye:ye instanceof ae.Match&&(Te=ye.parent()),Te){const De=Te.matches().map(Re=>new r.Selection(Re.range().startLineNumber,Re.range().startColumn,Re.range().endLineNumber,Re.range().endColumn)),_e=(0,S.getCodeEditor)(Ie.getControl());_e&&u.MultiCursorSelectionController.get(_e)?.selectAllUsingSelections(De)}}this.viewModel.searchResult.rangeHighlightDecorations.removeHighlightRange()},D.onUnexpectedError)}getSelectionFrom(ye){let ke=null;if(ye instanceof ae.Match&&(ke=ye),ye instanceof ae.FileMatch&&ye.count()>0&&(ke=ye.matches()[ye.matches().length-1]),ke){const Ie=ke.range();if(this.viewModel.isReplaceActive()&&!!this.viewModel.replaceString){const Te=ke.replaceString;return{startLineNumber:Ie.startLineNumber,startColumn:Ie.startColumn,endLineNumber:Ie.startLineNumber,endColumn:Ie.startColumn+Te.length}}return Ie}}onUntitledDidDispose(ye){if(!this.viewModel)return;const ke=this.viewModel.searchResult.matches();for(let Ie=0,Te=ke.length;Ie<Te;Ie++)ye.toString()===ke[Ie].resource.toString()&&this.viewModel.searchResult.remove(ke[Ie])}onFilesChanged(ye){if(!this.viewModel||this.searchConfig.sortOrder!=="modified"&&!ye.gotDeleted())return;const ke=this.viewModel.searchResult.matches();if(ye.gotDeleted()){const Ie=ke.filter(Te=>ye.contains(Te.resource,2));this.viewModel.searchResult.remove(Ie)}else{const Ie=ke.filter(Te=>ye.contains(Te.resource));Ie.length&&this.searchConfig.sortOrder==="modified"&&this.updateFileStats(Ie).then(()=>this.refreshTree())}}get searchConfig(){return this.configurationService.getValue("search")}clearHistory(){this.searchWidget.clearHistory(),this.inputPatternExcludes.clearHistory(),this.inputPatternIncludes.clearHistory()}saveState(){const ye=this.searchWidget.searchInput.getRegex(),ke=this.searchWidget.searchInput.getWholeWords(),Ie=this.searchWidget.searchInput.getCaseSensitive(),Te=this.searchWidget.searchInput.getValue(),De=this.inputPatternExcludes.getValue().trim(),_e=this.inputPatternIncludes.getValue().trim(),Re=this.inputPatternIncludes.onlySearchInOpenEditors(),Ne=this.inputPatternExcludes.useExcludesAndIgnoreFiles(),xe=this.viewModel.preserveCase;this.viewletState["query.contentPattern"]=Te,this.viewletState["query.regex"]=ye,this.viewletState["query.wholeWords"]=ke,this.viewletState["query.caseSensitive"]=Ie,this.viewletState["query.folderExclusions"]=De,this.viewletState["query.folderIncludes"]=_e,this.viewletState["query.useExcludesAndIgnoreFiles"]=Ne,this.viewletState["query.preserveCase"]=xe,this.viewletState["query.onlyOpenEditors"]=Re;const Ae=this.searchAndReplaceWidget.isReplaceShown();this.viewletState["view.showReplace"]=Ae,this.viewletState["query.replaceText"]=Ae&&this.searchWidget.getReplaceValue();const Le=Object.create(null),Me=this.searchWidget.getSearchHistory();Me&&Me.length&&(Le.search=Me);const We=this.searchWidget.getReplaceHistory();We&&We.length&&(Le.replace=We);const Ve=this.inputPatternExcludes.getHistory();Ve&&Ve.length&&(Le.exclude=Ve);const Ue=this.inputPatternIncludes.getHistory();Ue&&Ue.length&&(Le.include=Ue),this.searchHistoryService.save(Le),this.memento.saveMemento(),super.saveState()}async retrieveFileStats(){const ye=this.searchResult.matches().filter(ke=>!ke.fileStat).map(ke=>ke.resolveFileStat(this.fileService));await Promise.all(ye)}async updateFileStats(ye){const ke=ye.map(Ie=>Ie.resolveFileStat(this.fileService));await Promise.all(ke)}removeFileStats(){for(const ye of this.searchResult.matches())ye.fileStat=void 0}dispose(){this.isDisposed=!0,this.saveState(),super.dispose()}};de.ACTIONS_RIGHT_CLASS_NAME="actions-right",de=Ee([W(1,T.IFileService),W(2,oe.IEditorService),W(3,s.ICodeEditorService),W(4,N.IProgressService),W(5,L.INotificationService),W(6,y.IDialogService),W(7,d.ICommandService),W(8,E.IContextViewService),W(9,R.IInstantiationService),W(10,Z.IViewDescriptorService),W(11,m.IConfigurationService),W(12,U.IWorkspaceContextService),W(13,ae.ISearchWorkbenchService),W(14,b.IContextKeyService),W(15,ie.IReplaceService),W(16,me.ITextFileService),W(17,fe.IPreferencesService),W(18,z.IThemeService),W(19,le.ISearchHistoryService),W(20,E.IContextMenuService),W(21,g.IMenuService),W(22,n.IAccessibilityService),W(23,x.IKeybindingService),W(24,B.IStorageService),W(25,M.IOpenerService),W(26,P.ITelemetryService)],de),e.SearchView=de,(0,z.registerThemingParticipant)((we,ye)=>{const ke=we.getColor(V.editorFindMatchHighlight);ke&&ye.addRule(`.monaco-workbench .search-view .findInFileMatch { background-color: ${ke}; }`);const Ie=we.getColor(V.diffInserted);Ie&&ye.addRule(`.monaco-workbench .search-view .replaceMatch { background-color: ${Ie}; }`);const Te=we.getColor(V.diffRemoved);Te&&ye.addRule(`.monaco-workbench .search-view .replace.findInFileMatch { background-color: ${Te}; }`);const De=we.getColor(V.diffInsertedOutline);De&&ye.addRule(`.monaco-workbench .search-view .replaceMatch:not(:empty) { border: 1px ${(0,Ce.isHighContrast)(we.type)?"dashed":"solid"} ${De}; }`);const _e=we.getColor(V.diffRemovedOutline);_e&&ye.addRule(`.monaco-workbench .search-view .replace.findInFileMatch { border: 1px ${(0,Ce.isHighContrast)(we.type)?"dashed":"solid"} ${_e}; }`);const Re=we.getColor(V.editorFindMatchHighlightBorder);Re&&ye.addRule(`.monaco-workbench .search-view .findInFileMatch { border: 1px ${(0,Ce.isHighContrast)(we.type)?"dashed":"solid"} ${Re}; }`);const Ne=we.getColor(V.listActiveSelectionForeground);if(Ne&&ye.addRule(`.monaco-workbench .search-view .monaco-list.element-focused .monaco-list-row.focused.selected:not(.highlighted) .action-label:focus { outline-color: ${Ne} }`),we.type==="dark"){const We=we.getColor(V.foreground);if(We){const Ve=new k.Color(new k.RGBA(We.rgba.r,We.rgba.g,We.rgba.b,.65));ye.addRule(`.search-view .message { color: ${Ve}; }`)}}const xe=we.getColor(V.textLinkForeground);xe&&ye.addRule(`.monaco-workbench .search-view .message a { color: ${xe}; }`);const Ae=we.getColor(V.textLinkActiveForeground);Ae&&ye.addRule(`.monaco-workbench .search-view .message a:hover, .monaco-workbench .search-view .message a:active { color: ${Ae}; }`);const Le=we.getColor(V.toolbarHoverBackground);Le&&ye.addRule(`.monaco-workbench .search-view .search-widget .toggle-replace-button:hover { background-color: ${Le} }`);const Me=we.getColor(V.toolbarActiveBackground);Me&&ye.addRule(`.monaco-workbench .search-view .search-widget .toggle-replace-button:active { background-color: ${Me} }`)});class Se extends v.Disposable{constructor(ye,ke,Ie){super();this.element=ve("a.pointer",{tabindex:0,title:Ie},ye),this.addEventHandlers(ke)}addEventHandlers(ye){const ke=Ie=>{t.EventHelper.stop(Ie,!1),ye(Ie)};this._register(t.addDisposableListener(this.element,t.EventType.CLICK,ke)),this._register(t.addDisposableListener(this.element,t.EventType.KEY_DOWN,Ie=>{const Te=new f.StandardKeyboardEvent(Ie);(Te.equals(10)||Te.equals(3))&&(ke(Ie),Te.preventDefault(),Te.stopPropagation())}))}}}),define(ne[2776],re([1,0,36,22,14,19,13,288,750,1711,16,28,8,57,7,23,99,35,5,94,71,210,53,17,34,161,317,70,47,43,616,220,148,2700,2606,337,360,946,639,849,323,334,365,588,335,324,21,88,192]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H,K,G,q,Z,j){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,l.registerSingleton)(K.ISearchWorkbenchService,K.SearchWorkbenchService,!0),(0,l.registerSingleton)(H.ISearchHistoryService,H.SearchHistoryService,!0),(0,F.registerContributions)(),(0,B.registerContributions)();const X={value:w.localize(0,null),original:"Search"};p.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.search.toggleQueryDetails",weight:200,when:i.ContextKeyExpr.or(V.SearchViewFocusedKey,G.InSearchEditor),primary:2048|1024|40,handler:me=>{const be=me.get(i.IContextKeyService).getContext(document.activeElement);if(be.getValue(G.InSearchEditor.serialize()))me.get(q.IEditorService).activeEditorPane.toggleQueryDetails();else if(be.getValue(V.SearchViewFocusedKey.serialize())){const Ce=(0,L.getSearchView)(me.get(y.IViewsService));(0,k.assertIsDefined)(Ce).toggleQueryDetails()}}}),p.KeybindingsRegistry.registerCommandAndKeybindingRule({id:V.FocusSearchFromResults,weight:200,when:i.ContextKeyExpr.and(V.SearchViewVisibleKey,V.FirstMatchFocusKey),primary:2048|16,handler:(me,be)=>{const Ce=(0,L.getSearchView)(me.get(y.IViewsService));Ce&&Ce.focusPreviousInputBox()}}),p.KeybindingsRegistry.registerCommandAndKeybindingRule({id:V.OpenMatch,weight:200,when:i.ContextKeyExpr.and(V.SearchViewVisibleKey,V.FileMatchOrMatchFocusKey),primary:3,mac:{primary:3,secondary:[2048|18]},handler:me=>{const be=(0,L.getSearchView)(me.get(y.IViewsService));if(be){const Ce=be.getControl();be.open(Ce.getFocus()[0],!1,!1,!0)}}}),p.KeybindingsRegistry.registerCommandAndKeybindingRule({id:V.OpenMatchToSide,weight:200,when:i.ContextKeyExpr.and(V.SearchViewVisibleKey,V.FileMatchOrMatchFocusKey),primary:2048|3,mac:{primary:256|3},handler:(me,be)=>{const Ce=(0,L.getSearchView)(me.get(y.IViewsService));if(Ce){const ve=Ce.getControl();Ce.open(ve.getFocus()[0],!1,!0,!0)}}}),p.KeybindingsRegistry.registerCommandAndKeybindingRule({id:V.RemoveActionId,weight:200,when:i.ContextKeyExpr.and(V.SearchViewVisibleKey,V.FileMatchOrMatchFocusKey),primary:20,mac:{primary:2048|1},handler:(me,be)=>{const Ce=(0,L.getSearchView)(me.get(y.IViewsService));if(Ce){const ve=Ce.getControl();me.get(r.IInstantiationService).createInstance(L.RemoveAction,ve,ve.getFocus()[0]).run()}}}),p.KeybindingsRegistry.registerCommandAndKeybindingRule({id:V.ReplaceActionId,weight:200,when:i.ContextKeyExpr.and(V.SearchViewVisibleKey,V.ReplaceActiveKey,V.MatchFocusKey),primary:1024|2048|22,handler:(me,be)=>{const Ce=(0,L.getSearchView)(me.get(y.IViewsService));if(Ce){const ve=Ce.getControl();me.get(r.IInstantiationService).createInstance(L.ReplaceAction,ve,ve.getFocus()[0],Ce).run()}}}),p.KeybindingsRegistry.registerCommandAndKeybindingRule({id:V.ReplaceAllInFileActionId,weight:200,when:i.ContextKeyExpr.and(V.SearchViewVisibleKey,V.ReplaceActiveKey,V.FileFocusKey),primary:1024|2048|22,secondary:[2048|1024|3],handler:(me,be)=>{const Ce=(0,L.getSearchView)(me.get(y.IViewsService));if(Ce){const ve=Ce.getControl();me.get(r.IInstantiationService).createInstance(L.ReplaceAllAction,Ce,ve.getFocus()[0]).run()}}}),p.KeybindingsRegistry.registerCommandAndKeybindingRule({id:V.ReplaceAllInFolderActionId,weight:200,when:i.ContextKeyExpr.and(V.SearchViewVisibleKey,V.ReplaceActiveKey,V.FolderFocusKey),primary:1024|2048|22,secondary:[2048|1024|3],handler:(me,be)=>{const Ce=(0,L.getSearchView)(me.get(y.IViewsService));if(Ce){const ve=Ce.getControl();me.get(r.IInstantiationService).createInstance(L.ReplaceAllInFolderAction,ve,ve.getFocus()[0]).run()}}}),p.KeybindingsRegistry.registerCommandAndKeybindingRule({id:V.CloseReplaceWidgetActionId,weight:200,when:i.ContextKeyExpr.and(V.SearchViewVisibleKey,V.ReplaceInputBoxFocusedKey),primary:9,handler:(me,be)=>{me.get(r.IInstantiationService).createInstance(L.CloseReplaceAction,V.CloseReplaceWidgetActionId,"").run()}}),p.KeybindingsRegistry.registerCommandAndKeybindingRule({id:L.FocusNextInputAction.ID,weight:200,when:i.ContextKeyExpr.or(i.ContextKeyExpr.and(G.InSearchEditor,V.InputBoxFocusedKey),i.ContextKeyExpr.and(V.SearchViewVisibleKey,V.InputBoxFocusedKey)),primary:2048|18,handler:(me,be)=>{me.get(r.IInstantiationService).createInstance(L.FocusNextInputAction,L.FocusNextInputAction.ID,"").run()}}),p.KeybindingsRegistry.registerCommandAndKeybindingRule({id:L.FocusPreviousInputAction.ID,weight:200,when:i.ContextKeyExpr.or(i.ContextKeyExpr.and(G.InSearchEditor,V.InputBoxFocusedKey),i.ContextKeyExpr.and(V.SearchViewVisibleKey,V.InputBoxFocusedKey,V.SearchInputBoxFocusedKey.toNegated())),primary:2048|16,handler:(me,be)=>{me.get(r.IInstantiationService).createInstance(L.FocusPreviousInputAction,L.FocusPreviousInputAction.ID,"").run()}}),v.MenuRegistry.appendMenuItem(v.MenuId.SearchContext,{command:{id:V.ReplaceActionId,title:L.ReplaceAction.LABEL},when:i.ContextKeyExpr.and(V.ReplaceActiveKey,V.MatchFocusKey),group:"search",order:1}),v.MenuRegistry.appendMenuItem(v.MenuId.SearchContext,{command:{id:V.ReplaceAllInFolderActionId,title:L.ReplaceAllInFolderAction.LABEL},when:i.ContextKeyExpr.and(V.ReplaceActiveKey,V.FolderFocusKey),group:"search",order:1}),v.MenuRegistry.appendMenuItem(v.MenuId.SearchContext,{command:{id:V.ReplaceAllInFileActionId,title:L.ReplaceAllAction.LABEL},when:i.ContextKeyExpr.and(V.ReplaceActiveKey,V.FileFocusKey),group:"search",order:1}),v.MenuRegistry.appendMenuItem(v.MenuId.SearchContext,{command:{id:V.RemoveActionId,title:L.RemoveAction.LABEL},when:V.FileMatchOrMatchFocusKey,group:"search",order:2}),p.KeybindingsRegistry.registerCommandAndKeybindingRule({id:V.CopyMatchCommandId,weight:200,when:V.FileMatchOrMatchFocusKey,primary:2048|33,handler:L.copyMatchCommand}),v.MenuRegistry.appendMenuItem(v.MenuId.SearchContext,{command:{id:V.CopyMatchCommandId,title:w.localize(1,null)},when:V.FileMatchOrMatchFocusKey,group:"search_2",order:1}),p.KeybindingsRegistry.registerCommandAndKeybindingRule({id:V.CopyPathCommandId,weight:200,when:V.FileMatchOrFolderMatchWithResourceFocusKey,primary:2048|512|33,win:{primary:1024|512|33},handler:L.copyPathCommand}),v.MenuRegistry.appendMenuItem(v.MenuId.SearchContext,{command:{id:V.CopyPathCommandId,title:w.localize(2,null)},when:V.FileMatchOrFolderMatchWithResourceFocusKey,group:"search_2",order:2}),v.MenuRegistry.appendMenuItem(v.MenuId.SearchContext,{command:{id:V.CopyAllCommandId,title:w.localize(3,null)},when:V.HasSearchResults,group:"search_2",order:3}),C.CommandsRegistry.registerCommand({id:V.CopyAllCommandId,handler:L.copyAllCommand}),C.CommandsRegistry.registerCommand({id:V.ClearSearchHistoryCommandId,handler:L.clearHistoryCommand}),C.CommandsRegistry.registerCommand({id:V.RevealInSideBarForSearchResults,handler:(me,be)=>{const Ce=me.get(Z.IPaneCompositePartService),ve=me.get(R.IExplorerService),he=me.get(g.IWorkspaceContextService),ge=(0,L.getSearchView)(me.get(y.IViewsService));if(!ge)return;let de;if(be instanceof K.FileMatch||(be=ge.getControl().getFocus()[0]),be instanceof K.FileMatch)de=be;else return;Ce.openPaneComposite(O.VIEWLET_ID,0,!1).then(Se=>{if(!Se)return;const we=Se.getViewPaneContainer(),ye=de.resource;if(ye&&he.isInsideWorkspace(ye)){const ke=we.getExplorerView();ke.setExpanded(!0),ve.select(ye,!0).then(()=>ke.focus(),f.onUnexpectedError)}})}}),(0,v.registerAction2)(class extends v.Action2{constructor(){super({id:"search.action.cancel",title:w.localize(4,null),icon:M.searchStopIcon,category:X,f1:!0,precondition:U.SearchStateKey.isEqualTo(U.SearchUIState.Idle).negate(),keybinding:{weight:200,when:i.ContextKeyExpr.and(V.SearchViewVisibleKey,u.WorkbenchListFocusContextKey),primary:9},menu:[{id:v.MenuId.ViewTitle,group:"navigation",order:0,when:i.ContextKeyExpr.and(i.ContextKeyExpr.equals("view",j.VIEW_ID),U.SearchStateKey.isEqualTo(U.SearchUIState.SlowSearch))}]})}run(be,...Ce){return(0,L.cancelSearch)(be)}}),(0,v.registerAction2)(class extends v.Action2{constructor(){super({id:"search.action.refreshSearchResults",title:w.localize(5,null),icon:M.searchRefreshIcon,precondition:V.ViewHasSearchPatternKey,category:X,f1:!0,menu:[{id:v.MenuId.ViewTitle,group:"navigation",order:0,when:i.ContextKeyExpr.and(i.ContextKeyExpr.equals("view",j.VIEW_ID),U.SearchStateKey.isEqualTo(U.SearchUIState.SlowSearch).negate())}]})}run(be,...Ce){return(0,L.refreshSearch)(be)}}),(0,v.registerAction2)(class extends v.Action2{constructor(){super({id:"search.action.collapseSearchResults",title:w.localize(6,null),category:X,icon:M.searchCollapseAllIcon,f1:!0,precondition:i.ContextKeyExpr.and(V.HasSearchResults,V.ViewHasSomeCollapsibleKey),menu:[{id:v.MenuId.ViewTitle,group:"navigation",order:3,when:i.ContextKeyExpr.and(i.ContextKeyExpr.equals("view",j.VIEW_ID),i.ContextKeyExpr.or(V.HasSearchResults.negate(),V.ViewHasSomeCollapsibleKey))}]})}run(be,...Ce){return(0,L.collapseDeepestExpandedLevel)(be)}}),(0,v.registerAction2)(class extends v.Action2{constructor(){super({id:"search.action.expandSearchResults",title:w.localize(7,null),category:X,icon:M.searchExpandAllIcon,f1:!0,precondition:i.ContextKeyExpr.and(V.HasSearchResults,V.ViewHasSomeCollapsibleKey.toNegated()),menu:[{id:v.MenuId.ViewTitle,group:"navigation",order:3,when:i.ContextKeyExpr.and(i.ContextKeyExpr.equals("view",j.VIEW_ID),V.HasSearchResults,V.ViewHasSomeCollapsibleKey.toNegated())}]})}run(be,...Ce){return(0,L.expandAll)(be)}}),(0,v.registerAction2)(class extends v.Action2{constructor(){super({id:"search.action.clearSearchResults",title:w.localize(8,null),category:X,icon:M.searchClearIcon,f1:!0,precondition:i.ContextKeyExpr.or(V.HasSearchResults,V.ViewHasSearchPatternKey,V.ViewHasReplacePatternKey,V.ViewHasFilePatternKey),menu:[{id:v.MenuId.ViewTitle,group:"navigation",order:1,when:i.ContextKeyExpr.equals("view",j.VIEW_ID)}]})}run(be,...Ce){return(0,L.clearSearchResults)(be)}});const Y={id:V.RevealInSideBarForSearchResults,title:w.localize(9,null)};v.MenuRegistry.appendMenuItem(v.MenuId.SearchContext,{command:Y,when:i.ContextKeyExpr.and(V.FileFocusKey,V.HasSearchResults),group:"search_3",order:1});const $={id:V.ClearSearchHistoryCommandId,title:{value:w.localize(10,null),original:"Clear Search History"},category:X};v.MenuRegistry.addCommand($),C.CommandsRegistry.registerCommand({id:V.FocusSearchListCommandID,handler:L.focusSearchListCommand});const J={id:V.FocusSearchListCommandID,title:{value:w.localize(11,null),original:"Focus List"},category:X};v.MenuRegistry.addCommand(J);const ee=async(me,be)=>{const Ce=me.get(u.IListService),ve=me.get(S.IFileService),he=me.get(y.IViewsService),ge=me.get(g.IWorkspaceContextService),de=me.get(C.ICommandService),Se=(0,R.getMultiSelectedResources)(be,Ce,me.get(q.IEditorService),me.get(R.IExplorerService)),ye=me.get(o.IConfigurationService).getValue().search.mode,ke=ve.resolveAll(Se.map(Ie=>({resource:Ie}))).then(Ie=>{const Te=[];return Ie.forEach(De=>{De.success&&De.stat&&Te.push(De.stat.isDirectory?De.stat.resource:(0,A.dirname)(De.stat.resource))}),(0,z.resolveResourcesForSearchIncludes)(Te,ge)});if(ye==="view"){const Ie=await(0,L.openSearchView)(he,!0);Se&&Se.length&&Ie&&Ie.searchInFolders(await ke);return}else return de.executeCommand(G.OpenEditorCommandId,{filesToInclude:(await ke).join(", "),showIncludesExcludes:!0,location:ye==="newEditor"?"new":"reuse"})},te="filesExplorer.findInFolder";p.KeybindingsRegistry.registerCommandAndKeybindingRule({id:te,weight:200,when:i.ContextKeyExpr.and(O.FilesExplorerFocusCondition,O.ExplorerFolderContext),primary:1024|512|36,handler:ee});const se="filesExplorer.findInWorkspace";C.CommandsRegistry.registerCommand({id:se,handler:async me=>{const Ce=me.get(o.IConfigurationService).getValue().search.mode;if(Ce==="view"){const ve=await(0,L.openSearchView)(me.get(y.IViewsService),!0);ve&&ve.searchInFolders()}else return me.get(C.ICommandService).executeCommand(G.OpenEditorCommandId,{location:Ce==="newEditor"?"new":"reuse",filesToInclude:""})}}),v.MenuRegistry.appendMenuItem(v.MenuId.ExplorerContext,{group:"4_search",order:10,command:{id:te,title:w.localize(12,null)},when:i.ContextKeyExpr.and(O.ExplorerFolderContext)}),v.MenuRegistry.appendMenuItem(v.MenuId.ExplorerContext,{group:"4_search",order:10,command:{id:se,title:w.localize(13,null)},when:i.ContextKeyExpr.and(O.ExplorerRootContext,O.ExplorerFolderContext.toNegated())});let ie=class El extends t.Action{constructor(be,Ce,ve){super(be,Ce);this.quickInputService=ve}async run(){this.quickInputService.quickAccess.show(El.ALL_SYMBOLS_PREFIX)}};ie.ID="workbench.action.showAllSymbols",ie.LABEL=w.localize(14,null),ie.ALL_SYMBOLS_PREFIX="#",ie=Ee([W(2,n.IQuickInputService)],ie);const ce="search.mode",le=h.Registry.as(y.Extensions.ViewContainersRegistry).registerViewContainer({id:j.VIEWLET_ID,title:w.localize(15,null),ctorDescriptor:new s.SyncDescriptor(d.ViewPaneContainer,[j.VIEWLET_ID,{mergeViewWithContainerWhenSingleView:!0,donotShowContainerTitleWhenMergedWithContainer:!0}]),hideIfEmpty:!0,icon:M.searchViewIcon,order:1},0,{donotRegisterOpenCommand:!0}),ae={id:j.VIEW_ID,containerIcon:M.searchViewIcon,name:w.localize(16,null),ctorDescriptor:new s.SyncDescriptor(N.SearchView),canToggleVisibility:!1,canMoveView:!0,openCommandActionDescriptor:{id:le.id,mnemonicTitle:w.localize(17,null),keybindings:{primary:2048|1024|36,when:i.ContextKeyExpr.regex("neverMatch",/doesNotMatch/)},order:1}};h.Registry.as(y.Extensions.ViewsRegistry).registerViews([ae],le);let ue=class{constructor(be,Ce){const ve=be.inspect("search.location");ve.value==="panel"&&Ce.moveViewToLocation(ae,1),ve.userValue&&be.updateValue("search.location",void 0,1),ve.userLocalValue&&be.updateValue("search.location",void 0,2),ve.userRemoteValue&&be.updateValue("search.location",void 0,3),ve.workspaceFolderValue&&be.updateValue("search.location",void 0,5),ve.workspaceValue&&be.updateValue("search.location",void 0,4)}};ue=Ee([W(0,o.IConfigurationService),W(1,y.IViewDescriptorService)],ue),h.Registry.as(E.Extensions.Workbench).registerWorkbenchContribution(ue,1);const oe=h.Registry.as(b.Extensions.WorkbenchActions);p.KeybindingsRegistry.registerCommandAndKeybindingRule({description:{description:w.localize(18,null),args:[{name:w.localize(19,null),schema:{type:"object",properties:{query:{type:"string"},replace:{type:"string"},preserveCase:{type:"boolean"},triggerSearch:{type:"boolean"},filesToInclude:{type:"string"},filesToExclude:{type:"string"},isRegex:{type:"boolean"},isCaseSensitive:{type:"boolean"},matchWholeWord:{type:"boolean"},useExcludeSettingsAndIgnoreFiles:{type:"boolean"},onlyOpenEditors:{type:"boolean"}}}}]},id:V.FindInFilesActionId,weight:200,when:null,primary:2048|1024|36,handler:L.FindInFilesCommand}),v.MenuRegistry.appendMenuItem(v.MenuId.CommandPalette,{command:{id:V.FindInFilesActionId,title:{value:w.localize(20,null),original:"Find in Files"},category:X}}),v.MenuRegistry.appendMenuItem(v.MenuId.MenubarEditMenu,{group:"4_find_global",command:{id:V.FindInFilesActionId,title:w.localize(21,null)},order:1}),oe.registerWorkbenchAction(v.SyncActionDescriptor.from(L.FocusNextSearchResultAction,{primary:62}),"Search: Focus Next Search Result",X.value,i.ContextKeyExpr.or(V.HasSearchResults,G.InSearchEditor)),oe.registerWorkbenchAction(v.SyncActionDescriptor.from(L.FocusPreviousSearchResultAction,{primary:1024|62}),"Search: Focus Previous Search Result",X.value,i.ContextKeyExpr.or(V.HasSearchResults,G.InSearchEditor)),oe.registerWorkbenchAction(v.SyncActionDescriptor.from(L.ReplaceInFilesAction,{primary:2048|1024|38}),"Search: Replace in Files",X.value),v.MenuRegistry.appendMenuItem(v.MenuId.MenubarEditMenu,{group:"4_find_global",command:{id:L.ReplaceInFilesAction.ID,title:w.localize(22,null)},order:2}),_.isMacintosh?p.KeybindingsRegistry.registerCommandAndKeybindingRule(Object.assign({id:V.ToggleCaseSensitiveCommandId,weight:200,when:i.ContextKeyExpr.and(V.SearchViewFocusedKey,V.FileMatchOrFolderMatchFocusKey.toNegated()),handler:L.toggleCaseSensitiveCommand},D.ToggleCaseSensitiveKeybinding)):p.KeybindingsRegistry.registerCommandAndKeybindingRule(Object.assign({id:V.ToggleCaseSensitiveCommandId,weight:200,when:V.SearchViewFocusedKey,handler:L.toggleCaseSensitiveCommand},D.ToggleCaseSensitiveKeybinding)),p.KeybindingsRegistry.registerCommandAndKeybindingRule(Object.assign({id:V.ToggleWholeWordCommandId,weight:200,when:V.SearchViewFocusedKey,handler:L.toggleWholeWordCommand},D.ToggleWholeWordKeybinding)),p.KeybindingsRegistry.registerCommandAndKeybindingRule(Object.assign({id:V.ToggleRegexCommandId,weight:200,when:V.SearchViewFocusedKey,handler:L.toggleRegexCommand},D.ToggleRegexKeybinding)),p.KeybindingsRegistry.registerCommandAndKeybindingRule(Object.assign({id:V.TogglePreserveCaseId,weight:200,when:V.SearchViewFocusedKey,handler:L.togglePreserveCaseCommand},D.TogglePreserveCaseKeybinding)),p.KeybindingsRegistry.registerCommandAndKeybindingRule({id:V.AddCursorsAtSearchResults,weight:200,when:i.ContextKeyExpr.and(V.SearchViewVisibleKey,V.FileMatchOrMatchFocusKey),primary:2048|1024|42,handler:(me,be)=>{const Ce=(0,L.getSearchView)(me.get(y.IViewsService));if(Ce){const ve=Ce.getControl();Ce.openEditorWithMultiCursor(ve.getFocus()[0])}}}),oe.registerWorkbenchAction(v.SyncActionDescriptor.from(ie,{primary:2048|50}),"Go to Symbol in Workspace..."),oe.registerWorkbenchAction(v.SyncActionDescriptor.from(L.ToggleSearchOnTypeAction),"Search: Toggle Search on Type",X.value);const fe=h.Registry.as(a.Extensions.Quickaccess);fe.registerQuickAccessProvider({ctor:x.AnythingQuickAccessProvider,prefix:x.AnythingQuickAccessProvider.PREFIX,placeholder:w.localize(23,null,I.AbstractGotoLineQuickAccessProvider.PREFIX,T.GotoSymbolQuickAccessProvider.PREFIX),contextKey:m.defaultQuickAccessContextKeyValue,helpEntries:[{description:w.localize(24,null),needsEditor:!1}]}),fe.registerQuickAccessProvider({ctor:P.SymbolsQuickAccessProvider,prefix:P.SymbolsQuickAccessProvider.PREFIX,placeholder:w.localize(25,null),contextKey:"inWorkspaceSymbolsPicker",helpEntries:[{description:w.localize(26,null),needsEditor:!1}]}),h.Registry.as(c.Extensions.Configuration).registerConfiguration({id:"search",order:13,title:w.localize(27,null),type:"object",properties:{[j.SEARCH_EXCLUDE_CONFIG]:{type:"object",markdownDescription:w.localize(28,null),default:{"**/node_modules":!0,"**/bower_components":!0,"**/*.code-search":!0},additionalProperties:{anyOf:[{type:"boolean",description:w.localize(29,null)},{type:"object",properties:{when:{type:"string",pattern:"\\w*\\$\\(basename\\)\\w*",default:"$(basename).ext",markdownDescription:w.localize(30,null)}}}]},scope:4},[ce]:{type:"string",enum:["view","reuseEditor","newEditor"],default:"view",markdownDescription:w.localize(31,null),enumDescriptions:[w.localize(32,null),w.localize(33,null),w.localize(34,null)]},"search.useRipgrep":{type:"boolean",description:w.localize(35,null),deprecationMessage:w.localize(36,null),default:!0},"search.maintainFileSearchCache":{type:"boolean",deprecationMessage:w.localize(37,null),description:w.localize(38,null),default:!1},"search.useIgnoreFiles":{type:"boolean",markdownDescription:w.localize(39,null),default:!0,scope:4},"search.useGlobalIgnoreFiles":{type:"boolean",markdownDescription:w.localize(40,null),default:!1,scope:4},"search.useParentIgnoreFiles":{type:"boolean",markdownDescription:w.localize(41,null),default:!1,scope:4},"search.quickOpen.includeSymbols":{type:"boolean",description:w.localize(42,null),default:!1},"search.quickOpen.includeHistory":{type:"boolean",description:w.localize(43,null),default:!0},"search.quickOpen.history.filterSortOrder":{type:"string",enum:["default","recency"],default:"default",enumDescriptions:[w.localize(44,null),w.localize(45,null)],description:w.localize(46,null)},"search.followSymlinks":{type:"boolean",description:w.localize(47,null),default:!0},"search.smartCase":{type:"boolean",description:w.localize(48,null),default:!1},"search.globalFindClipboard":{type:"boolean",default:!1,description:w.localize(49,null),included:_.isMacintosh},"search.location":{type:"string",enum:["sidebar","panel"],default:"sidebar",description:w.localize(50,null),deprecationMessage:w.localize(51,null)},"search.maxResults":{type:["number","null"],default:2e4,markdownDescription:w.localize(52,null)},"search.collapseResults":{type:"string",enum:["auto","alwaysCollapse","alwaysExpand"],enumDescriptions:[w.localize(53,null),"",""],default:"alwaysExpand",description:w.localize(54,null)},"search.useReplacePreview":{type:"boolean",default:!0,description:w.localize(55,null)},"search.showLineNumbers":{type:"boolean",default:!1,description:w.localize(56,null)},"search.usePCRE2":{type:"boolean",default:!1,description:w.localize(57,null),deprecationMessage:w.localize(58,null)},"search.actionsPosition":{type:"string",enum:["auto","right"],enumDescriptions:[w.localize(59,null),w.localize(60,null)],default:"right",description:w.localize(61,null)},"search.searchOnType":{type:"boolean",default:!0,description:w.localize(62,null)},"search.seedWithNearestWord":{type:"boolean",default:!1,description:w.localize(63,null)},"search.seedOnFocus":{type:"boolean",default:!1,markdownDescription:w.localize(64,null)},"search.searchOnTypeDebouncePeriod":{type:"number",default:300,markdownDescription:w.localize(65,null)},"search.searchEditor.doubleClickBehaviour":{type:"string",enum:["selectWord","goToLocation","openLocationToSide"],default:"goToLocation",enumDescriptions:[w.localize(66,null),w.localize(67,null),w.localize(68,null)],markdownDescription:w.localize(69,null)},"search.searchEditor.reusePriorSearchConfiguration":{type:"boolean",default:!1,markdownDescription:w.localize(70,null)},"search.searchEditor.defaultNumberOfContextLines":{type:["number","null"],default:1,markdownDescription:w.localize(71,null)},"search.sortOrder":{type:"string",enum:["default","fileNames","type","modified","countDescending","countAscending"],default:"default",enumDescriptions:[w.localize(72,null),w.localize(73,null),w.localize(74,null),w.localize(75,null),w.localize(76,null),w.localize(77,null)],description:w.localize(78,null)}}}),C.CommandsRegistry.registerCommand("_executeWorkspaceSymbolProvider",async function(me,...be){const[Ce]=be;return(0,k.assertType)(typeof Ce=="string"),(await(0,U.getWorkspaceSymbols)(Ce)).map(he=>he.symbol)}),v.MenuRegistry.appendMenuItem(v.MenuId.MenubarGoMenu,{group:"3_global_nav",command:{id:"workbench.action.showAllSymbols",title:w.localize(79,null)},order:2})}),define(ne[440],re([1,0,223,36,33,18,14,13,9,72,1759,98,16,28,8,7,45,71,26,41,53,188,34,376,204,74,337,105,851,120,176,475,239,218,50,177,108,109,21,48,841,12,292,820]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.refreshTerminalActions=e.validateTerminalName=e.registerTerminalActions=e.TerminalLaunchHelpAction=e.terminalSendSequenceCommand=e.getCwdForSplit=e.switchTerminalShowTabsTitle=e.switchTerminalActionViewItemSeparator=void 0,e.switchTerminalActionViewItemSeparator="\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",e.switchTerminalShowTabsTitle=(0,v.localize)(0,null);async function K(ie,ce,le,ae){switch(ie.config.splitCwd){case"workspaceRoot":if(le!==void 0&&ae!==void 0){if(le.length===1)return le[0].uri;if(le.length>1){const ue={placeHolder:(0,v.localize)(1,null)},oe=await ae.executeCommand(h.PICK_WORKSPACE_FOLDER_COMMAND_ID,[ue]);return oe?Promise.resolve(oe.uri):void 0}}return"";case"initial":return ce.getInitialCwd();case"inherited":return ce.getCwd()}}e.getCwdForSplit=K;const G=(ie,ce)=>{ie.get(b.ITerminalService).doWithActiveInstance(async le=>{if(!ce?.text)return;const ae=ie.get(x.IConfigurationResolverService),ue=ie.get(n.IWorkspaceContextService),fe=ie.get(L.IHistoryService).getLastActiveWorkspaceRoot(le.isRemote?A.Schemas.vscodeRemote:A.Schemas.file),pe=fe?(0,D.withNullAsUndefined)(ue.getWorkspaceFolder(fe)):void 0,me=await ae.resolveAsync(pe,ce.text);le.sendText(me,!1)})};e.terminalSendSequenceCommand=G;const q=/^([0-9]+): /;let Z=class extends f.Action{constructor(ce){super("workbench.action.terminal.launchHelp",(0,v.localize)(2,null));this._openerService=ce}async run(){this._openerService.open("https://aka.ms/vscode-troubleshoot-terminal-launch")}};Z=Ee([W(0,p.IOpenerService)],Z),e.TerminalLaunchHelpAction=Z;function j(){const ie={value:y.TERMINAL_ACTION_CATEGORY,original:"Terminal"};(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.newInActiveWorkspace",title:{value:(0,v.localize)(3,null),original:"Create New Terminal (In Active Workspace)"},f1:!0,category:ie,precondition:T.TerminalContextKeys.processSupported})}async run(le){const ae=le.get(b.ITerminalService),ue=le.get(b.ITerminalGroupService);if(ae.isProcessSupportRegistered){const oe=await ae.createTerminal({location:ae.defaultLocation});if(!oe)return;ae.setActiveInstance(oe)}await ue.showPanel(!0)}}),te([]),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.createTerminalEditor",title:{value:(0,v.localize)(4,null),original:"Create New Terminal in Editor Area"},f1:!0,category:ie,precondition:T.TerminalContextKeys.processSupported})}async run(le,ae){const ue=le.get(b.ITerminalService),oe=typeof ae=="object"&&ae&&"location"in ae?ae:{location:a.TerminalLocation.Editor};(await ue.createTerminal(oe)).focusWhenReady()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.createTerminalEditorSide",title:{value:(0,v.localize)(5,null),original:"Create New Terminal in Editor Area to the Side"},f1:!0,category:ie,precondition:T.TerminalContextKeys.processSupported})}async run(le){(await le.get(b.ITerminalService).createTerminal({location:{viewColumn:B.SIDE_GROUP}})).focusWhenReady()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.moveToEditor",title:O.terminalStrings.moveToEditor,f1:!0,category:ie,precondition:S.ContextKeyExpr.and(S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated),T.TerminalContextKeys.terminalEditorActive.toNegated(),T.TerminalContextKeys.viewShowing)})}async run(le){const ae=le.get(b.ITerminalService);ae.doWithActiveInstance(ue=>ae.moveToEditor(ue))}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.moveToEditorInstance",title:O.terminalStrings.moveToEditor,f1:!1,category:ie,precondition:S.ContextKeyExpr.and(S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated),T.TerminalContextKeys.isOpen)})}async run(le){const ae=X(le);if(!ae||ae.length===0)return;const ue=le.get(b.ITerminalService);for(const oe of ae)ue.moveToEditor(oe);ae[ae.length-1].focus()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.moveToTerminalPanel",title:O.terminalStrings.moveToTerminalPanel,f1:!0,category:ie,precondition:S.ContextKeyExpr.and(S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated),T.TerminalContextKeys.terminalEditorActive)})}async run(le,ae){const ue=I.URI.isUri(ae)?ae:void 0;await le.get(b.ITerminalService).moveToTerminalView(ue)}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.showTabs",title:{value:(0,v.localize)(6,null),original:"Show Tabs"},f1:!1,category:ie,precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}async run(le){le.get(b.ITerminalGroupService).showTabs()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.focusPreviousPane",title:{value:(0,v.localize)(7,null),original:"Focus Previous Terminal in Terminal Group"},f1:!0,category:ie,keybinding:{primary:512|15,secondary:[512|16],mac:{primary:512|2048|15,secondary:[512|2048|16]},when:T.TerminalContextKeys.focus,weight:200},precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}async run(le){const ae=le.get(b.ITerminalGroupService);ae.activeGroup?.focusPreviousPane(),await ae.showPanel(!0)}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.focusNextPane",title:{value:(0,v.localize)(8,null),original:"Focus Next Terminal in Terminal Group"},f1:!0,category:ie,keybinding:{primary:512|17,secondary:[512|18],mac:{primary:512|2048|17,secondary:[512|2048|18]},when:T.TerminalContextKeys.focus,weight:200},precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}async run(le){const ae=le.get(b.ITerminalGroupService);ae.activeGroup?.focusNextPane(),await ae.showPanel(!0)}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.runRecentCommand",title:{value:(0,v.localize)(9,null),original:"Run Recent Command"},f1:!0,category:ie,precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}async run(le){const ae=le.get(b.ITerminalGroupService),ue=le.get(b.ITerminalEditorService),oe=le.get(b.ITerminalService).activeInstance;oe&&(await oe.runRecent("command"),oe?.target===a.TerminalLocation.Editor?ue.revealActiveEditor():ae.showPanel(!1))}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.goToRecentDirectory",title:{value:(0,v.localize)(10,null),original:"Go to Recent Directory"},f1:!0,category:ie,precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}async run(le){const ae=le.get(b.ITerminalGroupService),ue=le.get(b.ITerminalEditorService),oe=le.get(b.ITerminalService).activeInstance;oe&&(await oe.runRecent("cwd"),oe?.target===a.TerminalLocation.Editor?ue.revealActiveEditor():ae.showPanel(!1))}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.resizePaneLeft",title:{value:(0,v.localize)(11,null),original:"Resize Terminal Left"},f1:!0,category:ie,keybinding:{linux:{primary:2048|1024|15},mac:{primary:2048|256|15},when:T.TerminalContextKeys.focus,weight:200},precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}async run(le){le.get(b.ITerminalGroupService).activeGroup?.resizePane(0)}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.resizePaneRight",title:{value:(0,v.localize)(12,null),original:"Resize Terminal Right"},f1:!0,category:ie,keybinding:{linux:{primary:2048|1024|17},mac:{primary:2048|256|17},when:T.TerminalContextKeys.focus,weight:200},precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}async run(le){le.get(b.ITerminalGroupService).activeGroup?.resizePane(1)}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.resizePaneUp",title:{value:(0,v.localize)(13,null),original:"Resize Terminal Up"},f1:!0,category:ie,keybinding:{mac:{primary:2048|256|16},when:T.TerminalContextKeys.focus,weight:200},precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}async run(le){le.get(b.ITerminalGroupService).activeGroup?.resizePane(2)}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.resizePaneDown",title:{value:(0,v.localize)(14,null),original:"Resize Terminal Down"},f1:!0,category:ie,keybinding:{mac:{primary:2048|256|18},when:T.TerminalContextKeys.focus,weight:200},precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}async run(le){le.get(b.ITerminalGroupService).activeGroup?.resizePane(3)}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.focus",title:O.terminalStrings.focus,f1:!0,category:ie,precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}async run(le){const ae=le.get(b.ITerminalService),ue=le.get(b.ITerminalGroupService),oe=ae.activeInstance||await ae.createTerminal({location:a.TerminalLocation.Panel});if(!!oe)return ae.setActiveInstance(oe),ue.showPanel(!0)}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.focusTabs",title:{value:(0,v.localize)(15,null),original:"Focus Terminal Tabs View"},f1:!0,category:ie,keybinding:{primary:2048|1024|88,weight:200,when:S.ContextKeyExpr.or(T.TerminalContextKeys.tabsFocus,T.TerminalContextKeys.focus)},precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}async run(le){le.get(b.ITerminalGroupService).focusTabs()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.focusNext",title:{value:(0,v.localize)(16,null),original:"Focus Next Terminal Group"},f1:!0,category:ie,precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated),keybinding:{primary:2048|12,mac:{primary:2048|1024|89},when:S.ContextKeyExpr.and(T.TerminalContextKeys.focus,T.TerminalContextKeys.editorFocus.negate()),weight:200}})}async run(le){const ae=le.get(b.ITerminalGroupService);ae.setActiveGroupToNext(),await ae.showPanel(!0)}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.focusPrevious",title:{value:(0,v.localize)(17,null),original:"Focus Previous Terminal Group"},f1:!0,category:ie,precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated),keybinding:{primary:2048|11,mac:{primary:2048|1024|87},when:S.ContextKeyExpr.and(T.TerminalContextKeys.focus,T.TerminalContextKeys.editorFocus.negate()),weight:200}})}async run(le){const ae=le.get(b.ITerminalGroupService);ae.setActiveGroupToPrevious(),await ae.showPanel(!0)}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.runSelectedText",title:{value:(0,v.localize)(18,null),original:"Run Selected Text In Active Terminal"},f1:!0,category:ie,precondition:T.TerminalContextKeys.processSupported})}async run(le){const ae=le.get(b.ITerminalService),ue=le.get(b.ITerminalGroupService),oe=le.get(w.ICodeEditorService),fe=await ae.getActiveOrCreateInstance(),pe=oe.getActiveCodeEditor();if(!pe||!pe.hasModel())return;const me=pe.getSelection();let be;if(me.isEmpty())be=pe.getModel().getLineContent(me.selectionStartLineNumber).trim();else{const Ce=k.isWindows?1:2;be=pe.getModel().getValueInRange(me,Ce)}return fe.sendText(be,!0),ue.showPanel()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.runActiveFile",title:{value:(0,v.localize)(19,null),original:"Run Active File In Active Terminal"},f1:!0,category:ie,precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}async run(le){const ae=le.get(b.ITerminalService),ue=le.get(b.ITerminalGroupService),oe=le.get(w.ICodeEditorService),fe=le.get(r.INotificationService),pe=le.get(F.IWorkbenchEnvironmentService),me=oe.getActiveCodeEditor();if(!me||!me.hasModel())return;let be=ae.activeInstance;const Ce=be?be.isRemote:!!pe.remoteAuthority,ve=me.getModel().uri;if(!Ce&&ve.scheme!==A.Schemas.file||Ce&&ve.scheme!==A.Schemas.vscodeRemote){fe.warn((0,v.localize)(20,null));return}return be||(be=await ae.getActiveOrCreateInstance()),await be.sendPath(ve.fsPath,!0),ue.showPanel()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.scrollDown",title:{value:(0,v.localize)(21,null),original:"Scroll Down (Line)"},f1:!0,category:ie,keybinding:{primary:2048|512|12,linux:{primary:2048|1024|18},when:S.ContextKeyExpr.and(T.TerminalContextKeys.focus,T.TerminalContextKeys.altBufferActive.negate()),weight:200},precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}run(le){le.get(b.ITerminalService).activeInstance?.scrollDownLine()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.scrollDownPage",title:{value:(0,v.localize)(22,null),original:"Scroll Down (Page)"},f1:!0,category:ie,keybinding:{primary:1024|12,mac:{primary:12},when:S.ContextKeyExpr.and(T.TerminalContextKeys.focus,T.TerminalContextKeys.altBufferActive.negate()),weight:200},precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}run(le){le.get(b.ITerminalService).activeInstance?.scrollDownPage()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.scrollToBottom",title:{value:(0,v.localize)(23,null),original:"Scroll to Bottom"},f1:!0,category:ie,keybinding:{primary:2048|13,linux:{primary:1024|13},when:S.ContextKeyExpr.and(T.TerminalContextKeys.focus,T.TerminalContextKeys.altBufferActive.negate()),weight:200},precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}run(le){le.get(b.ITerminalService).activeInstance?.scrollToBottom()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.scrollUp",title:{value:(0,v.localize)(24,null),original:"Scroll Up (Line)"},f1:!0,category:ie,keybinding:{primary:2048|512|11,linux:{primary:2048|1024|16},when:S.ContextKeyExpr.and(T.TerminalContextKeys.focus,T.TerminalContextKeys.altBufferActive.negate()),weight:200},precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}run(le){le.get(b.ITerminalService).activeInstance?.scrollUpLine()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.scrollUpPage",title:{value:(0,v.localize)(25,null),original:"Scroll Up (Page)"},f1:!0,category:ie,keybinding:{primary:1024|11,mac:{primary:11},when:S.ContextKeyExpr.and(T.TerminalContextKeys.focus,T.TerminalContextKeys.altBufferActive.negate()),weight:200},precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}run(le){le.get(b.ITerminalService).activeInstance?.scrollUpPage()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.scrollToTop",title:{value:(0,v.localize)(26,null),original:"Scroll to Top"},f1:!0,category:ie,keybinding:{primary:2048|14,linux:{primary:1024|14},when:S.ContextKeyExpr.and(T.TerminalContextKeys.focus,T.TerminalContextKeys.altBufferActive.negate()),weight:200},precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}run(le){le.get(b.ITerminalService).activeInstance?.scrollToTop()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.navigationModeExit",title:{value:(0,v.localize)(27,null),original:"Exit Navigation Mode"},f1:!0,category:ie,keybinding:{primary:9,when:S.ContextKeyExpr.and(T.TerminalContextKeys.a11yTreeFocus,C.CONTEXT_ACCESSIBILITY_MODE_ENABLED),weight:200},precondition:T.TerminalContextKeys.processSupported})}run(le){le.get(b.ITerminalService).activeInstance?.navigationMode?.exitNavigationMode()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.navigationModeFocusPrevious",title:{value:(0,v.localize)(28,null),original:"Focus Previous Line (Navigation Mode)"},f1:!0,category:ie,keybinding:{primary:2048|16,when:S.ContextKeyExpr.or(S.ContextKeyExpr.and(T.TerminalContextKeys.a11yTreeFocus,C.CONTEXT_ACCESSIBILITY_MODE_ENABLED),S.ContextKeyExpr.and(T.TerminalContextKeys.focus,C.CONTEXT_ACCESSIBILITY_MODE_ENABLED)),weight:200},precondition:T.TerminalContextKeys.processSupported})}run(le){le.get(b.ITerminalService).activeInstance?.navigationMode?.focusPreviousLine()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.navigationModeFocusNext",title:{value:(0,v.localize)(29,null),original:"Focus Next Line (Navigation Mode)"},f1:!0,category:ie,keybinding:{primary:2048|18,when:S.ContextKeyExpr.or(S.ContextKeyExpr.and(T.TerminalContextKeys.a11yTreeFocus,C.CONTEXT_ACCESSIBILITY_MODE_ENABLED),S.ContextKeyExpr.and(T.TerminalContextKeys.focus,C.CONTEXT_ACCESSIBILITY_MODE_ENABLED)),weight:200},precondition:T.TerminalContextKeys.processSupported})}run(le){le.get(b.ITerminalService).activeInstance?.navigationMode?.focusNextLine()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.clearSelection",title:{value:(0,v.localize)(30,null),original:"Clear Selection"},f1:!0,category:ie,keybinding:{primary:9,when:S.ContextKeyExpr.and(T.TerminalContextKeys.focus,T.TerminalContextKeys.textSelected,T.TerminalContextKeys.notFindVisible),weight:200},precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}run(le){const ae=le.get(b.ITerminalService).activeInstance;ae&&ae.hasSelection()&&ae.clearSelection()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.changeIcon",title:O.terminalStrings.changeIcon,f1:!0,category:ie,precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}async run(le,ae){se(le,ae)?.changeIcon()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.changeIconPanel",title:O.terminalStrings.changeIcon,f1:!1,category:ie,precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}async run(le){return le.get(b.ITerminalGroupService).activeInstance?.changeIcon()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.changeIconInstance",title:O.terminalStrings.changeIcon,f1:!1,category:ie,precondition:S.ContextKeyExpr.and(S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated),T.TerminalContextKeys.tabsSingularSelection)})}async run(le){return X(le)?.[0].changeIcon()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.changeColor",title:O.terminalStrings.changeColor,f1:!0,category:ie,precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}async run(le,ae){se(le,ae)?.changeColor()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.changeColorPanel",title:O.terminalStrings.changeColor,f1:!1,category:ie,precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}async run(le){return le.get(b.ITerminalGroupService).activeInstance?.changeColor()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.changeColorInstance",title:O.terminalStrings.changeColor,f1:!1,category:ie,precondition:S.ContextKeyExpr.and(S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated),T.TerminalContextKeys.tabsSingularSelection)})}async run(le){return X(le)?.[0].changeColor()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.rename",title:O.terminalStrings.rename,f1:!0,category:ie,precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}async run(le,ae){se(le,ae)?.rename("triggerQuickpick")}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.renamePanel",title:O.terminalStrings.rename,f1:!1,category:ie,precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}async run(le){return le.get(b.ITerminalGroupService).activeInstance?.rename("triggerQuickpick")}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.renameInstance",title:O.terminalStrings.rename,f1:!1,category:ie,keybinding:{primary:60,mac:{primary:3},when:S.ContextKeyExpr.and(T.TerminalContextKeys.tabsFocus),weight:200},precondition:S.ContextKeyExpr.and(S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated),T.TerminalContextKeys.tabsSingularSelection)})}async run(le){const ae=le.get(b.ITerminalService),ue=le.get(r.INotificationService),oe=X(le)?.[0];!oe||ae.setEditable(oe,{validationMessage:fe=>$(fe),onFinish:async(fe,pe)=>{if(ae.setEditable(oe,null),pe)try{await oe.rename(fe)}catch(me){ue.error(me)}}})}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.focusFind",title:{value:(0,v.localize)(31,null),original:"Focus Find"},f1:!0,category:ie,keybinding:{primary:2048|36,when:S.ContextKeyExpr.or(T.TerminalContextKeys.findFocus,T.TerminalContextKeys.focus),weight:200},precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}run(le){le.get(b.ITerminalService).getFindHost().focusFindWidget()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.hideFind",title:{value:(0,v.localize)(32,null),original:"Hide Find"},f1:!0,category:ie,keybinding:{primary:9,secondary:[1024|9],when:S.ContextKeyExpr.and(T.TerminalContextKeys.focus,T.TerminalContextKeys.findVisible),weight:200},precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}run(le){le.get(b.ITerminalService).getFindHost().hideFindWidget()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.detachSession",title:{value:(0,v.localize)(33,null),original:"Detach Session"},f1:!0,category:ie,precondition:T.TerminalContextKeys.processSupported})}async run(le){await le.get(b.ITerminalService).activeInstance?.detachFromProcess()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.attachToSession",title:{value:(0,v.localize)(34,null),original:"Attach to Session"},f1:!0,category:ie,precondition:T.TerminalContextKeys.processSupported})}async run(le){const ae=le.get(u.IQuickInputService),ue=le.get(b.ITerminalService),oe=le.get(s.ILabelService),fe=le.get(N.IRemoteAgentService),pe=le.get(r.INotificationService),me=le.get(b.ITerminalGroupService),be=fe.getConnection()?.remoteAuthority??void 0,Ce=le.get(b.ITerminalInstanceService).getBackend(be);if(!Ce)throw new Error(`No backend registered for remote authority '${be}'`);const ve=await Ce.listProcesses();Ce.reduceConnectionGraceTime();const ge=ve.filter(Se=>!ue.isAttachedToTerminal(Se)).map(Se=>{const we=oe.getUriLabel(I.URI.file(Se.cwd));return{label:Se.title,detail:Se.workspaceName?`${Se.workspaceName} \u2E31 ${we}`:we,description:Se.pid?String(Se.pid):"",term:Se}});if(ge.length===0){pe.info((0,v.localize)(35,null));return}const de=await ae.pick(ge,{canPickMany:!1});if(de){const Se=await ue.createTerminal({config:{attachPersistentProcess:de.term}});ue.setActiveInstance(Se),Se.target===a.TerminalLocation.Editor?await Se.focusWhenReady(!0):me.showPanel(!0)}}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.quickOpenTerm",title:{value:(0,v.localize)(36,null),original:"Switch Active Terminal"},f1:!0,category:ie,precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}run(le){le.get(u.IQuickInputService).quickAccess.show(E.TerminalQuickAccessProvider.PREFIX)}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.scrollToPreviousCommand",title:{value:(0,v.localize)(37,null),original:"Scroll To Previous Command"},f1:!0,category:ie,keybinding:{primary:2048|16,when:S.ContextKeyExpr.and(T.TerminalContextKeys.focus,C.CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()),weight:200},precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}run(le){le.get(b.ITerminalService).doWithActiveInstance(ae=>{ae.xterm?.commandTracker.scrollToPreviousCommand(),ae.focus()})}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.scrollToNextCommand",title:{value:(0,v.localize)(38,null),original:"Scroll To Next Command"},f1:!0,category:ie,keybinding:{primary:2048|18,when:S.ContextKeyExpr.and(T.TerminalContextKeys.focus,C.CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()),weight:200},precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}run(le){le.get(b.ITerminalService).doWithActiveInstance(ae=>{ae.xterm?.commandTracker.scrollToNextCommand(),ae.focus()})}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.selectToPreviousCommand",title:{value:(0,v.localize)(39,null),original:"Select To Previous Command"},f1:!0,category:ie,keybinding:{primary:2048|1024|16,when:T.TerminalContextKeys.focus,weight:200},precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}run(le){le.get(b.ITerminalService).doWithActiveInstance(ae=>{ae.xterm?.commandTracker.selectToPreviousCommand(),ae.focus()})}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.selectToNextCommand",title:{value:(0,v.localize)(40,null),original:"Select To Next Command"},f1:!0,category:ie,keybinding:{primary:2048|1024|18,when:T.TerminalContextKeys.focus,weight:200},precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}run(le){le.get(b.ITerminalService).doWithActiveInstance(ae=>{ae.xterm?.commandTracker.selectToNextCommand(),ae.focus()})}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.selectToPreviousLine",title:{value:(0,v.localize)(41,null),original:"Select To Previous Line"},f1:!0,category:ie,precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}run(le){le.get(b.ITerminalService).doWithActiveInstance(ae=>{ae.xterm?.commandTracker.selectToPreviousLine(),ae.focus()})}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.selectToNextLine",title:{value:(0,v.localize)(42,null),original:"Select To Next Line"},f1:!0,category:ie,precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}run(le){le.get(b.ITerminalService).doWithActiveInstance(ae=>{ae.xterm?.commandTracker.selectToNextLine(),ae.focus()})}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"toggleEscapeSequenceLogging",title:{value:(0,v.localize)(43,null),original:"Toggle Escape Sequence Logging"},f1:!0,category:ie,precondition:T.TerminalContextKeys.processSupported})}async run(le){await le.get(b.ITerminalService).toggleEscapeSequenceLogging()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){const le=(0,v.localize)(44,null);super({id:"workbench.action.terminal.sendSequence",title:{value:le,original:"Send Custom Sequence To Terminal"},category:ie,description:{description:le,args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]},precondition:T.TerminalContextKeys.processSupported})}run(le,ae){(0,e.terminalSendSequenceCommand)(le,ae)}}),(0,o.registerAction2)(class extends o.Action2{constructor(){const le=(0,v.localize)(45,null);super({id:"workbench.action.terminal.newWithCwd",title:{value:le,original:"Create New Terminal Starting in a Custom Working Directory"},category:ie,description:{description:le,args:[{name:"args",schema:{type:"object",required:["cwd"],properties:{cwd:{description:(0,v.localize)(46,null),type:"string"}}}}]},precondition:T.TerminalContextKeys.processSupported})}async run(le,ae){const ue=le.get(b.ITerminalService),oe=le.get(b.ITerminalGroupService);if(ue.isProcessSupportRegistered){const fe=await ue.createTerminal({cwd:ae?.cwd});if(!fe)return;if(ue.setActiveInstance(fe),fe.target===a.TerminalLocation.Editor)await fe.focusWhenReady(!0);else return oe.showPanel(!0)}}}),(0,o.registerAction2)(class extends o.Action2{constructor(){const le=(0,v.localize)(47,null);super({id:"workbench.action.terminal.renameWithArg",title:{value:le,original:"Rename the Currently Active Terminal"},category:ie,description:{description:le,args:[{name:"args",schema:{type:"object",required:["name"],properties:{name:{description:(0,v.localize)(48,null),type:"string",minLength:1}}}}]},precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}run(le,ae){const ue=le.get(r.INotificationService);if(!ae?.name){ue.warn((0,v.localize)(49,null));return}le.get(b.ITerminalService).activeInstance?.refreshTabLabels(ae.name,a.TitleEventSource.Api)}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.toggleFindRegex",title:{value:(0,v.localize)(50,null),original:"Toggle Find Using Regex"},f1:!0,category:ie,keybinding:{primary:512|48,mac:{primary:2048|512|48},when:S.ContextKeyExpr.or(T.TerminalContextKeys.focus,T.TerminalContextKeys.findFocus),weight:200},precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}run(le){const oe=le.get(b.ITerminalService).getFindHost().getFindState();oe.change({isRegex:!oe.isRegex},!1)}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.toggleFindWholeWord",title:{value:(0,v.localize)(51,null),original:"Toggle Find Using Whole Word"},f1:!0,category:ie,keybinding:{primary:512|53,mac:{primary:2048|512|53},when:S.ContextKeyExpr.or(T.TerminalContextKeys.focus,T.TerminalContextKeys.findFocus),weight:200},precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}run(le){const oe=le.get(b.ITerminalService).getFindHost().getFindState();oe.change({wholeWord:!oe.wholeWord},!1)}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.toggleFindCaseSensitive",title:{value:(0,v.localize)(52,null),original:"Toggle Find Using Case Sensitive"},f1:!0,category:ie,keybinding:{primary:512|33,mac:{primary:2048|512|33},when:S.ContextKeyExpr.or(T.TerminalContextKeys.focus,T.TerminalContextKeys.findFocus),weight:200},precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}run(le){const oe=le.get(b.ITerminalService).getFindHost().getFindState();oe.change({matchCase:!oe.matchCase},!1)}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.findNext",title:{value:(0,v.localize)(53,null),original:"Find Next"},f1:!0,category:ie,keybinding:[{primary:61,mac:{primary:2048|37,secondary:[61]},when:S.ContextKeyExpr.or(T.TerminalContextKeys.focus,T.TerminalContextKeys.findFocus),weight:200},{primary:1024|3,when:T.TerminalContextKeys.findInputFocus,weight:200}],precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}run(le){le.get(b.ITerminalService).getFindHost().findNext()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.findPrevious",title:{value:(0,v.localize)(54,null),original:"Find Previous"},f1:!0,category:ie,keybinding:[{primary:1024|61,mac:{primary:2048|1024|37,secondary:[1024|61]},when:S.ContextKeyExpr.or(T.TerminalContextKeys.focus,T.TerminalContextKeys.findFocus),weight:200},{primary:3,when:T.TerminalContextKeys.findInputFocus,weight:200}],precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}run(le){le.get(b.ITerminalService).getFindHost().findPrevious()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.searchWorkspace",title:{value:(0,v.localize)(55,null),original:"Search Workspace"},f1:!0,category:ie,keybinding:[{primary:2048|1024|36,when:S.ContextKeyExpr.and(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.focus,T.TerminalContextKeys.textSelected),weight:200+50}],precondition:T.TerminalContextKeys.processSupported})}run(le){const ae=le.get(b.ITerminalService).activeInstance?.selection;(0,m.FindInFilesCommand)(le,{query:ae})}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.relaunch",title:{value:(0,v.localize)(56,null),original:"Relaunch Active Terminal"},f1:!0,category:ie,precondition:T.TerminalContextKeys.processSupported})}run(le){le.get(b.ITerminalService).activeInstance?.relaunch()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.showEnvironmentInformation",title:{value:(0,v.localize)(57,null),original:"Show Environment Information"},f1:!0,category:ie,precondition:T.TerminalContextKeys.processSupported})}run(le){le.get(b.ITerminalService).activeInstance?.showEnvironmentInfoHover()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.split",title:O.terminalStrings.split,f1:!0,category:ie,precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.webExtensionContributedProfile),keybinding:{primary:2048|1024|26,weight:200,mac:{primary:2048|88,secondary:[256|1024|26]},when:T.TerminalContextKeys.focus},icon:_.Codicon.splitHorizontal,description:{description:"workbench.action.terminal.split",args:[{name:"profile",schema:{type:"object"}}]}})}async run(le,ae){const ue=le.get(c.ICommandService),oe=le.get(b.ITerminalGroupService),fe=le.get(b.ITerminalService),pe=le.get(n.IWorkspaceContextService),me=J(ae),be=fe.getInstanceHost(me?.location).activeInstance;if(!be)return;const Ce=await K(fe.configHelper,be,pe.getWorkspace().folders,ue);if(Ce===void 0)return;const ve=await fe.createTerminal({location:{parentTerminal:be},config:me?.config,cwd:Ce});if(ve)if(ve.target===a.TerminalLocation.Editor)ve.focusWhenReady();else return oe.showPanel(!0)}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.splitInstance",title:O.terminalStrings.split,f1:!1,category:ie,precondition:T.TerminalContextKeys.processSupported,keybinding:{primary:2048|1024|26,mac:{primary:2048|88,secondary:[256|1024|26]},weight:200,when:T.TerminalContextKeys.tabsFocus}})}async run(le){const ae=le.get(b.ITerminalService),ue=le.get(b.ITerminalGroupService),oe=X(le);if(oe)for(const fe of oe)ae.setActiveInstance(fe),ae.doWithActiveInstance(async pe=>{await ae.createTerminal({location:{parentTerminal:pe}}),await ue.showPanel(!0)})}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.unsplit",title:O.terminalStrings.unsplit,f1:!0,category:ie,precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}async run(le){await le.get(b.ITerminalService).doWithActiveInstance(async ae=>le.get(b.ITerminalGroupService).unsplitInstance(ae))}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.unsplitInstance",title:O.terminalStrings.unsplit,f1:!1,category:ie,precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}async run(le){const ae=le.get(b.ITerminalGroupService),ue=X(le);if(ue?.length===1){const oe=ae.getGroupForInstance(ue[0]);oe&&oe?.terminalInstances.length>1&&ae.unsplitInstance(ue[0])}}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.joinInstance",title:{value:(0,v.localize)(58,null),original:"Join Terminals"},category:ie,precondition:S.ContextKeyExpr.and(S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated),T.TerminalContextKeys.tabsSingularSelection.toNegated())})}async run(le){const ae=X(le);ae&&ae.length>1&&le.get(b.ITerminalGroupService).joinInstances(ae)}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.join",title:{value:(0,v.localize)(59,null),original:"Join Terminals"},category:ie,f1:!0,precondition:S.ContextKeyExpr.and(S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated))})}async run(le){const ae=le.get(z.IThemeService),ue=le.get(b.ITerminalGroupService),oe=le.get(r.INotificationService),fe=[];if(ue.instances.length<=1){oe.warn((0,v.localize)(60,null));return}const pe=ue.instances.filter(be=>be.instanceId!==ue.activeInstance?.instanceId);for(const be of pe)if(ue.getGroupForInstance(be)?.terminalInstances.length===1){const he=`$(${(0,U.getIconId)(be)}): ${be.title}`,ge=[],de=(0,U.getColorClass)(be);de&&ge.push(de);const Se=(0,U.getUriClasses)(be,ae.getColorTheme().type);Se&&ge.push(...Se),fe.push({terminal:be,label:he,iconClasses:ge})}if(fe.length===0){oe.warn((0,v.localize)(61,null));return}const me=await le.get(u.IQuickInputService).pick(fe,{});me&&ue.joinInstances([me.terminal,ue.activeInstance])}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.splitInActiveWorkspace",title:{value:(0,v.localize)(62,null),original:"Split Terminal (In Active Workspace)"},f1:!0,category:ie,precondition:T.TerminalContextKeys.processSupported})}async run(le){const ae=le.get(b.ITerminalService),ue=le.get(b.ITerminalGroupService);await ae.doWithActiveInstance(async oe=>{(await ae.createTerminal({location:{parentTerminal:oe}}))?.target!==a.TerminalLocation.Editor&&await ue.showPanel(!0)})}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.selectAll",title:{value:(0,v.localize)(63,null),original:"Select All"},f1:!0,category:ie,precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated),keybinding:[{primary:0,mac:{primary:2048|31},weight:200,when:T.TerminalContextKeys.focus}]})}run(le){le.get(b.ITerminalService).activeInstance?.selectAll()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.new",title:{value:(0,v.localize)(64,null),original:"Create New Terminal"},f1:!0,category:ie,precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.webExtensionContributedProfile),icon:_.Codicon.plus,keybinding:{primary:2048|1024|86,mac:{primary:256|1024|86},weight:200},description:{description:"workbench.action.terminal.new",args:[{name:"eventOrOptions",schema:{type:"object"}}]}})}async run(le,ae){const ue=le.get(b.ITerminalService),oe=le.get(b.ITerminalGroupService),fe=le.get(n.IWorkspaceContextService),pe=le.get(c.ICommandService),me=le.get(i.IConfigurationService),be=le.get(x.IConfigurationResolverService),Ce=fe.getWorkspace().folders;if(ae&&ae instanceof MouseEvent&&(ae.altKey||ae.ctrlKey)){await ue.createTerminal({location:{splitActiveTerminal:!0}});return}if(ue.isProcessSupportRegistered){ae=!ae||ae instanceof MouseEvent?{}:ae;let ve;if(Ce.length<=1)ve=await ue.createTerminal(ae);else{const he={placeHolder:(0,v.localize)(65,null)},ge=await pe.executeCommand(h.PICK_WORKSPACE_FOLDER_COMMAND_ID,[he]);if(!ge)return;ae.cwd=ge.uri;const de=me.getValue("terminal.integrated.cwd",{resource:ge.uri});if(typeof de=="string"&&de.length>0){const Se=await be.resolveAsync(ge,de);(0,P.isAbsolute)(Se)||Se.startsWith(V.AbstractVariableResolverService.VARIABLE_LHS)?ae.cwd=I.URI.from({scheme:ge.uri.scheme,path:Se}):ae.cwd=I.URI.joinPath(ge.uri,Se)}ve=await ue.createTerminal(ae)}ue.setActiveInstance(ve),ve.target===a.TerminalLocation.Editor?await ve.focusWhenReady(!0):await oe.showPanel(!0)}else T.TerminalContextKeys.webExtensionContributedProfile&&pe.executeCommand("workbench.action.terminal.newWithProfile")}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.kill",title:{value:(0,v.localize)(66,null),original:"Kill the Active Terminal Instance"},f1:!0,category:ie,precondition:S.ContextKeyExpr.or(S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated),T.TerminalContextKeys.isOpen),icon:_.Codicon.trash})}async run(le){const ae=le.get(b.ITerminalGroupService),ue=le.get(b.ITerminalService),oe=ae.activeInstance;!oe||(await ue.safeDisposeTerminal(oe),ae.instances.length>0&&await ae.showPanel(!0))}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.killAll",title:{value:(0,v.localize)(67,null),original:"Kill All Terminals"},f1:!0,category:ie,precondition:S.ContextKeyExpr.or(S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated),T.TerminalContextKeys.isOpen),icon:_.Codicon.trash})}async run(le){const ae=le.get(b.ITerminalService),ue=[];for(const oe of ae.instances)ue.push(ae.safeDisposeTerminal(oe));await Promise.all(ue)}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.killEditor",title:{value:(0,v.localize)(68,null),original:"Kill the Active Terminal in Editor Area"},f1:!0,category:ie,precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated),keybinding:{primary:2048|53,win:{primary:2048|62,secondary:[2048|53]},weight:200,when:S.ContextKeyExpr.and(T.TerminalContextKeys.focus,d.ResourceContextKey.Scheme.isEqualTo(A.Schemas.vscodeTerminal),T.TerminalContextKeys.editorFocus)}})}async run(le){le.get(c.ICommandService).executeCommand(g.CLOSE_EDITOR_COMMAND_ID)}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.killInstance",title:O.terminalStrings.kill,f1:!1,category:ie,precondition:S.ContextKeyExpr.or(S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated),T.TerminalContextKeys.isOpen),keybinding:{primary:20,mac:{primary:2048|1,secondary:[20]},weight:200,when:T.TerminalContextKeys.tabsFocus}})}async run(le){const ae=X(le);if(!ae)return;const ue=le.get(b.ITerminalService),oe=[];for(const fe of ae)oe.push(ue.safeDisposeTerminal(fe));await Promise.all(oe),ue.instances.length>0&&(le.get(b.ITerminalGroupService).focusTabs(),Y(le))}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.clear",title:{value:(0,v.localize)(69,null),original:"Clear"},f1:!0,category:ie,precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated),keybinding:[{primary:0,mac:{primary:2048|41},weight:200+1,when:T.TerminalContextKeys.focus}]})}run(le){le.get(b.ITerminalService).doWithActiveInstance(ae=>ae.clearBuffer())}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.openDetectedLink",title:{value:(0,v.localize)(70,null),original:"Open Detected Link..."},f1:!0,category:ie,precondition:T.TerminalContextKeys.terminalHasBeenCreated})}run(le){le.get(b.ITerminalService).doWithActiveInstance(ae=>ae.showLinkQuickpick())}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.openUrlLink",title:{value:(0,v.localize)(71,null),original:"Open Last Url Link"},f1:!0,category:ie,precondition:T.TerminalContextKeys.terminalHasBeenCreated})}run(le){le.get(b.ITerminalService).doWithActiveInstance(ae=>ae.openRecentLink("url"))}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.openFileLink",title:{value:(0,v.localize)(72,null),original:"Open Last Local File Link"},f1:!0,category:ie,precondition:T.TerminalContextKeys.terminalHasBeenCreated})}run(le){le.get(b.ITerminalService).doWithActiveInstance(ae=>ae.openRecentLink("localFile"))}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.selectDefaultShell",title:{value:(0,v.localize)(73,null),original:"Select Default Profile"},f1:!0,category:ie,precondition:T.TerminalContextKeys.processSupported})}async run(le){await le.get(b.ITerminalService).showProfileQuickPick("setDefault")}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.createProfileButton",title:"workbench.action.terminal.createProfileButton",f1:!1,category:ie,precondition:T.TerminalContextKeys.processSupported})}async run(le){}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.openSettings",title:{value:(0,v.localize)(74,null),original:"Configure Terminal Settings"},f1:!0,category:ie,precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}async run(le){await le.get(M.IPreferencesService).openSettings({jsonEditor:!1,query:"@feature:terminal"})}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.setDimensions",title:{value:(0,v.localize)(75,null),original:"Set Fixed Dimensions"},f1:!0,category:ie,precondition:S.ContextKeyExpr.and(S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated),T.TerminalContextKeys.isOpen)})}async run(le){await le.get(b.ITerminalService).doWithActiveInstance(ae=>ae.setFixedDimensions())}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.sizeToContentWidth",title:{value:(0,v.localize)(76,null),original:"Toggle Size to Content Width"},f1:!0,category:ie,precondition:S.ContextKeyExpr.and(S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated),T.TerminalContextKeys.isOpen,T.TerminalContextKeys.focus),keybinding:{primary:512|56,weight:200}})}async run(le){await le.get(b.ITerminalService).doWithActiveInstance(ae=>ae.toggleSizeToContentWidth())}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.sizeToContentWidthInstance",title:O.terminalStrings.toggleSizeToContentWidth,f1:!1,category:ie,precondition:S.ContextKeyExpr.and(S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated),T.TerminalContextKeys.focus)})}async run(le){return X(le)?.[0].toggleSizeToContentWidth()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.clearCommandHistory",title:{value:(0,v.localize)(77,null),original:"Clear Command History"},f1:!0,category:ie,precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}run(le){(0,H.getCommandHistory)(le).clear()}}),t.BrowserFeatures.clipboard.writeText&&((0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.copySelection",title:{value:(0,v.localize)(78,null),original:"Copy Selection"},f1:!0,category:ie,precondition:S.ContextKeyExpr.and(S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated),T.TerminalContextKeys.textSelected),keybinding:[{primary:2048|33,win:{primary:2048|33,secondary:[2048|1024|33]},linux:{primary:2048|1024|33},weight:200,when:S.ContextKeyExpr.and(T.TerminalContextKeys.textSelected,T.TerminalContextKeys.focus)}]})}async run(le){await le.get(b.ITerminalService).activeInstance?.copySelection()}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.copySelectionAsHtml",title:{value:(0,v.localize)(79,null),original:"Copy Selection as HTML"},f1:!0,category:ie,precondition:S.ContextKeyExpr.and(S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated),T.TerminalContextKeys.textSelected)})}async run(le){await le.get(b.ITerminalService).activeInstance?.copySelection(!0)}})),t.BrowserFeatures.clipboard.readText&&(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.paste",title:{value:(0,v.localize)(80,null),original:"Paste into Active Terminal"},f1:!0,category:ie,precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated),keybinding:[{primary:2048|52,win:{primary:2048|52,secondary:[2048|1024|52]},linux:{primary:2048|1024|52},weight:200,when:T.TerminalContextKeys.focus}]})}async run(le){await le.get(b.ITerminalService).activeInstance?.paste()}}),t.BrowserFeatures.clipboard.readText&&k.isLinux&&(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.pasteSelection",title:{value:(0,v.localize)(81,null),original:"Paste Selection into Active Terminal"},f1:!0,category:ie,precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated),keybinding:[{linux:{primary:1024|19},weight:200,when:T.TerminalContextKeys.focus}]})}async run(le){await le.get(b.ITerminalService).activeInstance?.pasteSelection()}});const ce={value:(0,v.localize)(82,null),original:"Switch Terminal"};(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.switchTerminal",title:ce,f1:!1,category:ie,precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.terminalHasBeenCreated)})}async run(le,ae){const ue=le.get(b.ITerminalService),oe=le.get(y.ITerminalProfileService),fe=le.get(b.ITerminalGroupService);if(!ae||!ae.split)return Promise.resolve(null);if(ae===e.switchTerminalActionViewItemSeparator)return ue.refreshActiveGroup(),Promise.resolve(null);if(ae===e.switchTerminalShowTabsTitle){le.get(i.IConfigurationService).updateValue("terminal.integrated.tabs.enabled",!0);return}const pe=q.exec(ae);if(pe)return fe.setActiveGroupByIndex(Number(pe[1])-1),fe.showPanel(!0);const me=oe.availableProfiles,be=ae.substring(4);if(me){const Ce=me.find(ve=>ve.profileName===be);if(Ce){const ve=await ue.createTerminal({config:Ce});ue.setActiveInstance(ve)}else console.warn(`No profile with name "${be}"`)}else console.warn(`Unmatched terminal item: "${ae}"`);return Promise.resolve()}})}e.registerTerminalActions=j;function X(ie){const ce=ie.get(l.IListService),le=ie.get(b.ITerminalService);if(!ce.lastFocusedList?.getSelection())return;const ae=ce.lastFocusedList.getSelection(),ue=ce.lastFocusedList.getFocus(),oe=[];if(ue.length===1&&!ae.includes(ue[0]))return oe.push(le.getInstanceFromIndex(ue[0])),oe;for(const fe of ae)oe.push(le.getInstanceFromIndex(fe));return oe}function Y(ie){ie.get(l.IListService).lastFocusedList?.focusNext()}function $(ie){return!ie||ie.trim().length===0?{content:(0,v.localize)(83,null),severity:r.Severity.Info}:null}e.validateTerminalName=$;function J(ie){return typeof ie=="object"&&"profileName"in ie?{config:ie,location:ie.location}:ie}let ee;function te(ie){const ce=(0,R.createProfileSchemaEnums)(ie),le={value:y.TERMINAL_ACTION_CATEGORY,original:"Terminal"};ee?.dispose(),ee=(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.terminal.newWithProfile",title:{value:(0,v.localize)(84,null),original:"Create New Terminal (With Profile)"},f1:!0,category:le,precondition:S.ContextKeyExpr.or(T.TerminalContextKeys.processSupported,T.TerminalContextKeys.webExtensionContributedProfile),description:{description:"workbench.action.terminal.newWithProfile",args:[{name:"args",schema:{type:"object",required:["profileName"],properties:{profileName:{description:(0,v.localize)(85,null),type:"string",enum:ce.values,markdownEnumDescriptions:ce.markdownDescriptions}}}}]}})}async run(ae,ue,oe){const fe=ae.get(b.ITerminalService),pe=ae.get(y.ITerminalProfileService),me=ae.get(b.ITerminalGroupService),be=ae.get(n.IWorkspaceContextService),Ce=ae.get(c.ICommandService);let ve,he,ge,de;if(typeof ue=="object"&&ue&&"profileName"in ue){const we=pe.availableProfiles.find(ye=>ye.profileName===ue.profileName);if(!we)throw new Error(`Could not find terminal profile "${ue.profileName}"`);he={config:we}}else ue instanceof MouseEvent||ue instanceof PointerEvent||ue instanceof KeyboardEvent?(ve=ue,he=oe?{config:oe}:void 0):he=J(ue);if(ve&&(ve.altKey||ve.ctrlKey)){const we=fe.activeInstance;if(we){await fe.createTerminal({location:{parentTerminal:we},config:he?.config});return}}if(be.getWorkspace().folders.length>1){const we={placeHolder:(0,v.localize)(86,null)},ye=await Ce.executeCommand(h.PICK_WORKSPACE_FOLDER_COMMAND_ID,[we]);if(!ye)return;de=ye.uri}he?(he.cwd=de,ge=await fe.createTerminal(he)):ge=await fe.showProfileQuickPick("createInstance",de),ge&&(fe.setActiveInstance(ge),ge.target===a.TerminalLocation.Editor?await ge.focusWhenReady(!0):await me.showPanel(!0))}})}e.refreshTerminalActions=te;function se(ie,ce){const le=ie.get(b.ITerminalService),ae=I.URI.isUri(ce)?ce:void 0;return le.getInstanceFromResource(ae)||le.activeInstance}}),define(ne[2777],re([1,0,120,6,2,209,80,5,105,43,940]),function(Q,e,t,f,_,A,k,D,I,w,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalGroup=void 0;const C=120;let o=class extends _.Disposable{constructor(s,l,r){super();this._container=s,this.orientation=l,this._layoutService=r,this._splitViewDisposables=this._register(new _.DisposableStore),this._children=[],this._terminalToPane=new Map,this._onDidChange=f.Event.None,this._width=this._container.offsetWidth,this._height=this._container.offsetHeight,this._createSplitView(),this._splitView.layout(this.orientation===1?this._width:this._height)}get onDidChange(){return this._onDidChange}_createSplitView(){this._splitView=new A.SplitView(this._container,{orientation:this.orientation}),this._splitViewDisposables.clear(),this._splitViewDisposables.add(this._splitView.onDidSashReset(()=>this._splitView.distributeViewSizes()))}split(s,l){this._addChild(s,l)}resizePane(s,l,r,p){const u=l===0||l===1;if(u&&this.orientation!==1||!u&&this.orientation!==0){(this.orientation===1&&l===3||this.orientation===0&&l===1)&&(r*=-1),this._layoutService.resizePart(p,r,r);return}if(this._children.length<=1)return;const a=[];for(let g=0;g<this._splitView.length;g++)a.push(this._splitView.getViewSize(g));const n=s!==this._children.length-1,h=n?s+1:s-1;(n&&l===0||!n&&l===1||n&&l===2||!n&&l===3)&&(r*=-1),a[s]+r<C?r=C-a[s]:a[h]-r<C&&(r=a[h]-C),a[s]+=r,a[h]-=r;for(let g=0;g<this._splitView.length-1;g++)this._splitView.resizeView(g,a[g])}resizePanes(s){if(this._children.length<=1)return;s[s.length-1]+=1-s.reduce((r,p)=>r+p,0);let l=0;for(let r=0;r<this._splitView.length;r++)l+=this._splitView.getViewSize(r);for(let r=0;r<this._splitView.length;r++)this._splitView.resizeView(r,l*s[r])}getRelativePaneSize(s){const l=this._terminalToPane.get(s);return l?(this.orientation===1?l.element.clientWidth:l.element.clientHeight)/(this.orientation===1?this._width:this._height):0}_addChild(s,l){const r=new c(s,this.orientation===1?this._height:this._width);r.orientation=this.orientation,typeof l=="number"?this._children.splice(l,0,r):this._children.push(r),this._terminalToPane.set(s,this._children[this._children.indexOf(r)]),this._withDisabledLayout(()=>this._splitView.addView(r,A.Sizing.Distribute,l)),this.layout(this._width,this._height),this._onDidChange=f.Event.any(...this._children.map(p=>p.onDidChange))}remove(s){let l=null;for(let r=0;r<this._children.length;r++)this._children[r].instance===s&&(l=r);l!==null&&(this._children.splice(l,1),this._terminalToPane.delete(s),this._splitView.removeView(l,A.Sizing.Distribute),s.detachFromElement())}layout(s,l){this._width=s,this._height=l,this.orientation===1?(this._children.forEach(r=>r.orthogonalLayout(l)),this._splitView.layout(s)):(this._children.forEach(r=>r.orthogonalLayout(s)),this._splitView.layout(l))}setOrientation(s){if(this.orientation!==s){for(this.orientation=s;this._container.children.length>0;)this._container.removeChild(this._container.children[0]);this._splitViewDisposables.clear(),this._splitView.dispose(),this._createSplitView(),this._withDisabledLayout(()=>{this._children.forEach(l=>{l.orientation=s,this._splitView.addView(l,1)})})}}_withDisabledLayout(s){this._children.forEach(l=>l.instance.disableLayout=!0),s(),this._children.forEach(l=>l.instance.disableLayout=!1)}};o=Ee([W(2,k.IWorkbenchLayoutService)],o);class c{constructor(s,l){this.instance=s,this.orthogonalSize=l,this.minimumSize=C,this.maximumSize=Number.MAX_VALUE,this._onDidChange=f.Event.None,this.element=document.createElement("div"),this.element.className="terminal-split-pane",this.instance.attachToElement(this.element)}get onDidChange(){return this._onDidChange}layout(s){!s||!this.orthogonalSize||(this.orientation===0?this.instance.layout({width:this.orthogonalSize,height:s}):this.instance.layout({width:s,height:this.orthogonalSize}))}orthogonalLayout(s){this.orthogonalSize=s}}let i=class extends _.Disposable{constructor(s,l,r,p,u,a,n){super();this._container=s,this._terminalService=r,this._terminalInstanceService=p,this._layoutService=u,this._viewDescriptorService=a,this._instantiationService=n,this._terminalInstances=[],this._panelPosition=2,this._terminalLocation=1,this._instanceDisposables=new Map,this._activeInstanceIndex=-1,this._isVisible=!1,this._onDidDisposeInstance=this._register(new f.Emitter),this.onDidDisposeInstance=this._onDidDisposeInstance.event,this._onDidFocusInstance=this._register(new f.Emitter),this.onDidFocusInstance=this._onDidFocusInstance.event,this._onDidChangeInstanceCapability=this._register(new f.Emitter),this.onDidChangeInstanceCapability=this._onDidChangeInstanceCapability.event,this._onDisposed=this._register(new f.Emitter),this.onDisposed=this._onDisposed.event,this._onInstancesChanged=this._register(new f.Emitter),this.onInstancesChanged=this._onInstancesChanged.event,this._onDidChangeActiveInstance=new f.Emitter,this.onDidChangeActiveInstance=this._onDidChangeActiveInstance.event,this._onPanelOrientationChanged=new f.Emitter,this.onPanelOrientationChanged=this._onPanelOrientationChanged.event,l&&this.addInstance(l),this._container&&this.attachToElement(this._container),this._onPanelOrientationChanged.fire(this._terminalLocation===1&&this._panelPosition===2?1:0)}get terminalInstances(){return this._terminalInstances}addInstance(s,l){let r;const p=l?this._terminalInstances.findIndex(u=>u.instanceId===l):this._activeInstanceIndex;"instanceId"in s?r=s:r=this._terminalInstanceService.createInstance(s),this._terminalInstances.length===0?(this._terminalInstances.push(r),this._activeInstanceIndex=0):this._terminalInstances.splice(p+1,0,r),this._initInstanceListeners(r),this._splitPaneContainer&&this._splitPaneContainer.split(r,p+1),r.setVisible(this._isVisible),this._onInstancesChanged.fire()}dispose(){super.dispose(),this._container&&this._groupElement&&(this._container.removeChild(this._groupElement),this._groupElement=void 0),this._terminalInstances=[],this._onInstancesChanged.fire()}get activeInstance(){if(this._terminalInstances.length!==0)return this._terminalInstances[this._activeInstanceIndex]}getLayoutInfo(s){const l=this.terminalInstances.filter(r=>typeof r.persistentProcessId=="number"&&r.shouldPersist);return{isActive:s,activePersistentProcessId:this.activeInstance?this.activeInstance.persistentProcessId:void 0,terminals:l.map(r=>({relativeSize:this._splitPaneContainer?.getRelativePaneSize(r)||0,terminal:r.persistentProcessId||0}))}}_initInstanceListeners(s){this._instanceDisposables.set(s.instanceId,[s.onDisposed(l=>{this._onDidDisposeInstance.fire(l),this._handleOnDidDisposeInstance(l)}),s.onDidFocus(l=>{this._setActiveInstance(l),this._onDidFocusInstance.fire(l)}),s.capabilities.onDidAddCapability(()=>this._onDidChangeInstanceCapability.fire(s)),s.capabilities.onDidRemoveCapability(()=>this._onDidChangeInstanceCapability.fire(s))])}_handleOnDidDisposeInstance(s){this._removeInstance(s)}removeInstance(s){this._removeInstance(s);const l=this._instanceDisposables.get(s.instanceId);l&&((0,_.dispose)(l),this._instanceDisposables.delete(s.instanceId))}_removeInstance(s){const l=this._terminalInstances.indexOf(s);if(l===-1)return;const r=s===this.activeInstance;if(this._terminalInstances.splice(l,1),r&&this._terminalInstances.length>0){const p=l<this._terminalInstances.length?l:this._terminalInstances.length-1;this.setActiveInstanceByIndex(p),this.activeInstance&&this.activeInstance.focus(!0)}else l<this._activeInstanceIndex&&this._activeInstanceIndex--;this._splitPaneContainer?.remove(s),this._terminalInstances.length===0?(this._onDisposed.fire(this),this.dispose()):this._onInstancesChanged.fire()}moveInstance(s,l){const r=this.terminalInstances.indexOf(s);r!==-1&&(this._terminalInstances.splice(r,1),this._terminalInstances.splice(l,0,s),this._splitPaneContainer&&(this._splitPaneContainer.remove(s),this._splitPaneContainer.split(s,l)),this._onInstancesChanged.fire())}_setActiveInstance(s){this.setActiveInstanceByIndex(this._getIndexFromId(s.instanceId))}_getIndexFromId(s){let l=-1;if(this.terminalInstances.forEach((r,p)=>{r.instanceId===s&&(l=p)}),l===-1)throw new Error(`Terminal with ID ${s} does not exist (has it already been disposed?)`);return l}setActiveInstanceByIndex(s,l){if(s<0||s>=this._terminalInstances.length)return;const r=this.activeInstance;this._activeInstanceIndex=s,(r!==this.activeInstance||l)&&(this._onInstancesChanged.fire(),this._onDidChangeActiveInstance.fire(this.activeInstance))}attachToElement(s){if(this._container=s,this._groupElement||(this._groupElement=document.createElement("div"),this._groupElement.classList.add("terminal-group")),this._container.appendChild(this._groupElement),!this._splitPaneContainer){this._panelPosition=this._layoutService.getPanelPosition(),this._terminalLocation=this._viewDescriptorService.getViewLocationById(t.TERMINAL_VIEW_ID);const l=this._terminalLocation===1&&this._panelPosition===2?1:0;this._splitPaneContainer=this._instantiationService.createInstance(o,this._groupElement,l),this.terminalInstances.forEach(r=>this._splitPaneContainer.split(r,this._activeInstanceIndex+1)),this._initialRelativeSizes&&(this.resizePanes(this._initialRelativeSizes),this._initialRelativeSizes=void 0)}this.setVisible(this._isVisible)}get title(){if(this._terminalInstances.length===0)return"";let s=this.terminalInstances[0].title+this._getBellTitle(this.terminalInstances[0]);this.terminalInstances[0].description&&(s+=` (${this.terminalInstances[0].description})`);for(let l=1;l<this.terminalInstances.length;l++){const r=this.terminalInstances[l];r.title&&(s+=`, ${r.title+this._getBellTitle(r)}`,r.description&&(s+=` (${r.description})`))}return s}_getBellTitle(s){return this._terminalService.configHelper.config.enableBell&&s.statusList.statuses.find(l=>l.id==="bell")?"*":""}setVisible(s){this._isVisible=s,this._groupElement&&(this._groupElement.style.display=s?"":"none"),this.terminalInstances.forEach(l=>l.setVisible(s))}split(s){const l=this._terminalInstanceService.createInstance(s);return this.addInstance(l,s.parentTerminalId),this._setActiveInstance(l),l}addDisposable(s){this._register(s)}layout(s,l){if(this._splitPaneContainer){const r=this._layoutService.getPanelPosition(),p=this._viewDescriptorService.getViewLocationById(t.TERMINAL_VIEW_ID);if(r!==this._panelPosition||p!==this._terminalLocation){const a=p===1&&r===2?1:0;this._splitPaneContainer.setOrientation(a),this._panelPosition=r,this._terminalLocation=p,this._onPanelOrientationChanged.fire(this._splitPaneContainer.orientation)}this._splitPaneContainer.layout(s,l)}}focusPreviousPane(){const s=this._activeInstanceIndex===0?this._terminalInstances.length-1:this._activeInstanceIndex-1;this.setActiveInstanceByIndex(s)}focusNextPane(){const s=this._activeInstanceIndex===this._terminalInstances.length-1?0:this._activeInstanceIndex+1;this.setActiveInstanceByIndex(s)}resizePane(s){if(!this._splitPaneContainer)return;const l=s===0||s===1,r=this._terminalService.configHelper.getFont(),p=l?r.charWidth:r.charHeight;p&&this._splitPaneContainer.resizePane(this._activeInstanceIndex,s,p,(0,v.getPartByLocation)(this._terminalLocation))}resizePanes(s){if(!this._splitPaneContainer){this._initialRelativeSizes=s;return}this._splitPaneContainer.resizePanes(s)}};i=Ee([W(2,I.ITerminalService),W(3,I.ITerminalInstanceService),W(4,k.IWorkbenchLayoutService),W(5,w.IViewDescriptorService),W(6,D.IInstantiationService)],i),e.TerminalGroup=i}),define(ne[2778],re([1,0,11,6,2,315,8,7,5,43,2777,418,120,176]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalGroupService=void 0;let i=class extends _.Disposable{constructor(s,l,r,p,u){super();this._contextKeyService=s,this._instantiationService=l,this._viewsService=r,this._viewDescriptorService=p,this._configurationService=u,this.groups=[],this.activeGroupIndex=-1,this._onDidChangeActiveGroup=new f.Emitter,this.onDidChangeActiveGroup=this._onDidChangeActiveGroup.event,this._onDidDisposeGroup=new f.Emitter,this.onDidDisposeGroup=this._onDidDisposeGroup.event,this._onDidChangeGroups=new f.Emitter,this.onDidChangeGroups=this._onDidChangeGroups.event,this._onDidShow=new f.Emitter,this.onDidShow=this._onDidShow.event,this._onDidDisposeInstance=new f.Emitter,this.onDidDisposeInstance=this._onDidDisposeInstance.event,this._onDidFocusInstance=new f.Emitter,this.onDidFocusInstance=this._onDidFocusInstance.event,this._onDidChangeActiveInstance=new f.Emitter,this.onDidChangeActiveInstance=this._onDidChangeActiveInstance.event,this._onDidChangeInstances=new f.Emitter,this.onDidChangeInstances=this._onDidChangeInstances.event,this._onDidChangeInstanceCapability=new f.Emitter,this.onDidChangeInstanceCapability=this._onDidChangeInstanceCapability.event,this._onDidChangePanelOrientation=new f.Emitter,this.onDidChangePanelOrientation=this._onDidChangePanelOrientation.event,this.onDidDisposeGroup(a=>this._removeGroup(a)),this._terminalGroupCountContextKey=c.TerminalContextKeys.groupCount.bindTo(this._contextKeyService),this.onDidChangeGroups(()=>this._terminalGroupCountContextKey.set(this.groups.length)),this._findState=new A.FindReplaceState}get instances(){return this.groups.reduce((s,l)=>s.concat(l.terminalInstances),[])}hidePanel(){const s=this._viewDescriptorService.getViewContainerByViewId(o.TERMINAL_VIEW_ID);s&&this._viewDescriptorService.getViewContainerModel(s).activeViewDescriptors.length===1&&(this._viewsService.closeView(o.TERMINAL_VIEW_ID),c.TerminalContextKeys.tabsMouse.bindTo(this._contextKeyService).set(!1))}showTabs(){this._configurationService.updateValue("terminal.integrated.tabs.enabled",!0)}get activeGroup(){if(!(this.activeGroupIndex<0||this.activeGroupIndex>=this.groups.length))return this.groups[this.activeGroupIndex]}set activeGroup(s){if(s===void 0)return;const l=this.groups.findIndex(r=>r===s);this.setActiveGroupByIndex(l)}get activeInstance(){return this.activeGroup?.activeInstance}setActiveInstance(s){this.setActiveInstanceByIndex(this._getIndexFromId(s.instanceId))}_getIndexFromId(s){let l=this.instances.findIndex(r=>r.instanceId===s);if(l===-1)throw new Error(`Terminal with ID ${s} does not exist (has it already been disposed?)`);return l}setContainer(s){this._container=s,this.groups.forEach(l=>l.attachToElement(s))}async focusTabs(){if(this.instances.length===0)return;await this.showPanel(!0),this._viewsService.getActiveViewWithId(o.TERMINAL_VIEW_ID)?.terminalTabbedView?.focusTabs()}createGroup(s){const l=this._instantiationService.createInstance(v.TerminalGroup,this._container,s);return l.onPanelOrientationChanged(r=>this._onDidChangePanelOrientation.fire(r)),this.groups.push(l),l.addDisposable(l.onDidDisposeInstance(this._onDidDisposeInstance.fire,this._onDidDisposeInstance)),l.addDisposable(l.onDidFocusInstance(this._onDidFocusInstance.fire,this._onDidFocusInstance)),l.addDisposable(l.onDidChangeActiveInstance(r=>{l===this.activeGroup&&this._onDidChangeActiveInstance.fire(r)})),l.addDisposable(l.onDidChangeInstanceCapability(this._onDidChangeInstanceCapability.fire,this._onDidChangeInstanceCapability)),l.addDisposable(l.onInstancesChanged(this._onDidChangeInstances.fire,this._onDidChangeInstances)),l.addDisposable(l.onDisposed(this._onDidDisposeGroup.fire,this._onDidDisposeGroup)),l.terminalInstances.length>0&&this._onDidChangeInstances.fire(),this.instances.length===1&&this.setActiveInstanceByIndex(0),this._onDidChangeGroups.fire(),l}async showPanel(s){if((this._viewsService.getActiveViewWithId(o.TERMINAL_VIEW_ID)??await this._viewsService.openView(o.TERMINAL_VIEW_ID,s))?.setExpanded(!0),s){await(0,t.timeout)(0);const r=this.activeInstance;r&&(await r.focusWhenReady(!0),r.setVisible(!0))}this._onDidShow.fire()}getInstanceFromResource(s){return(0,C.getInstanceFromResource)(this.instances,s)}findNext(){const s=this._viewsService.getActiveViewWithId(o.TERMINAL_VIEW_ID);s?.terminalTabbedView&&(s.terminalTabbedView.showFindWidget(),s.terminalTabbedView.getFindWidget().find(!1))}findPrevious(){const s=this._viewsService.getActiveViewWithId(o.TERMINAL_VIEW_ID);s?.terminalTabbedView&&(s.terminalTabbedView.showFindWidget(),s.terminalTabbedView.getFindWidget().find(!0))}getFindState(){return this._findState}async focusFindWidget(){await this.showPanel(!1),this._viewsService.getActiveViewWithId(o.TERMINAL_VIEW_ID)?.terminalTabbedView?.focusFindWidget()}hideFindWidget(){this._viewsService.getActiveViewWithId(o.TERMINAL_VIEW_ID)?.terminalTabbedView?.hideFindWidget()}_removeGroup(s){const l=this.activeGroup,r=s===l,p=this.groups.indexOf(s);if(p!==-1&&(this.groups.splice(p,1),this._onDidChangeGroups.fire()),r&&this.groups.length>0){const u=p<this.groups.length?p:this.groups.length-1;this.setActiveGroupByIndex(u,!0),this.activeInstance?.focus(!0)}else if(this.activeGroupIndex>=this.groups.length){const u=this.groups.length-1;this.setActiveGroupByIndex(u)}this._onDidChangeInstances.fire(),this._onDidChangeGroups.fire(),r&&(this._onDidChangeActiveGroup.fire(this.activeGroup),this._onDidChangeActiveInstance.fire(this.activeInstance))}setActiveGroupByIndex(s,l){if(s===-1&&this.groups.length===0){this.activeGroupIndex!==-1&&(this.activeGroupIndex=-1,this._onDidChangeActiveGroup.fire(this.activeGroup),this._onDidChangeActiveInstance.fire(this.activeInstance));return}if(s<0||s>=this.groups.length)return;const r=this.activeGroup;this.activeGroupIndex=s,(l||r!==this.activeGroup)&&(this.groups.forEach((p,u)=>p.setVisible(u===this.activeGroupIndex)),this._onDidChangeActiveGroup.fire(this.activeGroup),this._onDidChangeActiveInstance.fire(this.activeInstance))}_getInstanceLocation(s){let l=0;for(;s>=0&&l<this.groups.length;){const r=this.groups[l],p=r.terminalInstances.length;if(s<p)return{group:r,groupIndex:l,instance:r.terminalInstances[s],instanceIndex:s};s-=p,l++}}setActiveInstanceByIndex(s){const l=this.activeInstance,r=this._getInstanceLocation(s),p=r?.group.terminalInstances[r.instanceIndex];if(!r||l===p)return;const u=r.instanceIndex;this.activeGroupIndex=r.groupIndex,this._onDidChangeActiveGroup.fire(this.activeGroup),r.group.setActiveInstanceByIndex(u,!0),this.groups.forEach((a,n)=>a.setVisible(n===r.groupIndex))}setActiveGroupToNext(){if(this.groups.length<=1)return;let s=this.activeGroupIndex+1;s>=this.groups.length&&(s=0),this.setActiveGroupByIndex(s)}setActiveGroupToPrevious(){if(this.groups.length<=1)return;let s=this.activeGroupIndex-1;s<0&&(s=this.groups.length-1),this.setActiveGroupByIndex(s)}moveGroup(s,l){const r=this.getGroupForInstance(s),p=this.getGroupForInstance(l);if(!r||!p)return;if(r===p){const n=r.terminalInstances.indexOf(l);n!==-1&&r.moveInstance(s,n);return}const u=this.groups.indexOf(r),a=this.groups.indexOf(p);this.groups.splice(u,1),this.groups.splice(a,0,r),this._onDidChangeInstances.fire()}moveGroupToEnd(s){const l=this.getGroupForInstance(s);if(!l)return;const r=this.groups.indexOf(l);this.groups.splice(r,1),this.groups.push(l),this._onDidChangeInstances.fire()}moveInstance(s,l,r){const p=this.getGroupForInstance(s),u=this.getGroupForInstance(l);if(!p||!u)return;p!==u&&(p.removeInstance(s),u.addInstance(s));const a=u.terminalInstances.indexOf(l)+(r==="after"?1:0);u.moveInstance(s,a)}unsplitInstance(s){const l=this.getGroupForInstance(s);!l||l.terminalInstances.length<2||(l.removeInstance(s),this.createGroup(s))}joinInstances(s){const l=this.getGroupForInstance(s[0]);if(l){let a=!0;for(let n=1;n<l.terminalInstances.length;n++)if(l.terminalInstances.includes(s[n])){a=!1;break}if(!a)return}let r,p;for(const a of s){const n=this.getGroupForInstance(a);if(n?.terminalInstances.length===1){r=a,p=n;break}}p||(p=this.createGroup());const u=this.activeGroup===p;for(const a of s){if(a===r)continue;const n=this.getGroupForInstance(a);!n||(n.removeInstance(a),p.addInstance(a))}this.setActiveInstance(s[0]),this._onDidChangeInstances.fire(),u||this._onDidChangeActiveGroup.fire(this.activeGroup)}instanceIsSplit(s){const l=this.getGroupForInstance(s);return l?l.terminalInstances.length>1:!1}getGroupForInstance(s){return this.groups.find(l=>l.terminalInstances.indexOf(s)!==-1)}getGroupLabels(){return this.groups.filter(s=>s.terminalInstances.length>0).map((s,l)=>`${l+1}: ${s.title?s.title:""}`)}};i=Ee([W(0,D.IContextKeyService),W(1,I.IInstantiationService),W(2,w.IViewsService),W(3,w.IViewDescriptorService),W(4,k.IConfigurationService)],i),e.TerminalGroupService=i}),define(ne[2779],re([1,0,77,223,170,10,91,139,11,33,197,110,22,6,111,2,18,48,14,13,9,452,52,61,1764,98,95,8,7,54,5,38,31,26,46,53,24,188,2004,32,12,34,114,156,43,2546,2215,440,425,292,2526,591,2225,418,2383,2219,2220,2221,2386,555,820,120,176,239,21,50,177,80,101,108]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H,K,G,q,Z,j,X,Y,$,J,ee,te,se,ie,ce,le,ae,ue,oe,fe,pe,me,be,Ce,ve,he,ge){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseExitResult=e.TerminalLabelComputer=e.TerminalInstance=void 0;var de;(function(xe){xe[xe.WaitForContainerThreshold=100]="WaitForContainerThreshold",xe[xe.DefaultCols=80]="DefaultCols",xe[xe.DefaultRows=30]="DefaultRows",xe[xe.MaxSupportedCols=5e3]="MaxSupportedCols",xe[xe.MaxCanvasWidth=8e3]="MaxCanvasWidth"})(de||(de={}));let Se;function we(){return Se||(Se=I.Promises.withAsyncBody(async xe=>{const Ae=(await new Promise((Le,Me)=>{Q(["xterm"],Le,Me)})).Terminal;Ae.strings.promptLabel=g.localize(0,null),Ae.strings.tooMuchOutput=g.localize(1,null),xe(Ae)}),Se)}const ye=5;let ke=class yl{constructor(Ae,Le){this._modelService=Le,Ae.registerTextModelContentProvider(yl.scheme,this)}async provideTextContent(Ae){const Le=this._modelService.getModel(Ae);return Le&&!Le.isDisposed()?Le:this._modelService.createModel(Ae.fragment,null,Ae,!1)}};ke.scheme="TERMINAL_OUTPUT",ke=Ee([W(0,h.ITextModelService),W(1,n.IModelService)],ke);let Ie=class bi extends S.Disposable{constructor(Ae,Le,Me,We,Ve,Ue,et,Ze,Fe,Qe,qe,Be,Ke,Xe,rt,it,at,ft,vt,Dt,kt,At,St,He,ct,lt,ut,pt,Et){super();if(this._terminalFocusContextKey=Ae,this._terminalHasFixedWidth=Le,this._terminalShellTypeContextKey=Me,this._terminalAltBufferActiveContextKey=We,this._configHelper=Ve,this._shellLaunchConfig=Ue,this._terminalProfileResolverService=Ze,this._pathService=Fe,this._contextKeyService=Qe,this._keybindingService=qe,this._notificationService=Be,this._preferencesService=Ke,this._viewsService=Xe,this._instantiationService=rt,this._clipboardService=it,this._themeService=at,this._configurationService=ft,this._logService=vt,this._dialogService=Dt,this._storageService=kt,this._accessibilityService=At,this._productService=St,this._quickInputService=He,this._workspaceContextService=lt,this._editorService=ut,this._workspaceTrustRequestService=pt,this._historyService=Et,this._latestXtermWriteData=0,this._latestXtermParseData=0,this._title="",this._titleSource=N.TitleEventSource.Process,this._cols=0,this._rows=0,this._cwd=void 0,this._initialCwd=void 0,this._layoutSettingsChanged=!0,this._areLinksReady=!1,this._initialDataEvents=[],this._widgetManager=this._instantiationService.createInstance(se.TerminalWidgetManager),this._processName="",this.capabilities=new ae.TerminalCapabilityStoreMultiplexer,this.disableLayout=!1,this._onExit=new c.Emitter,this.onExit=this._onExit.event,this._onDisposed=this._register(new c.Emitter),this.onDisposed=this._onDisposed.event,this._onProcessIdReady=this._register(new c.Emitter),this.onProcessIdReady=this._onProcessIdReady.event,this._onLinksReady=this._register(new c.Emitter),this.onLinksReady=this._onLinksReady.event,this._onTitleChanged=this._register(new c.Emitter),this.onTitleChanged=this._onTitleChanged.event,this._onIconChanged=this._register(new c.Emitter),this.onIconChanged=this._onIconChanged.event,this._onData=this._register(new c.Emitter),this.onData=this._onData.event,this._onBinary=this._register(new c.Emitter),this.onBinary=this._onBinary.event,this._onLineData=this._register(new c.Emitter),this.onLineData=this._onLineData.event,this._onRequestExtHostProcess=this._register(new c.Emitter),this.onRequestExtHostProcess=this._onRequestExtHostProcess.event,this._onDimensionsChanged=this._register(new c.Emitter),this.onDimensionsChanged=this._onDimensionsChanged.event,this._onMaximumDimensionsChanged=this._register(new c.Emitter),this.onMaximumDimensionsChanged=this._onMaximumDimensionsChanged.event,this._onDidFocus=this._register(new c.Emitter),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new c.Emitter),this.onDidBlur=this._onDidBlur.event,this._onDidInputData=this._register(new c.Emitter),this.onDidInputData=this._onDidInputData.event,this._onRequestAddInstanceToGroup=this._register(new c.Emitter),this.onRequestAddInstanceToGroup=this._onRequestAddInstanceToGroup.event,this._onDidChangeHasChildProcesses=this._register(new c.Emitter),this.onDidChangeHasChildProcesses=this._onDidChangeHasChildProcesses.event,this._skipTerminalCommands=[],this._isExiting=!1,this._hadFocusOnExit=!1,this._isVisible=!1,this._isDisposed=!1,this._instanceId=bi._instanceIdCounter++,this._hasHadInput=!1,this._titleReadyPromise=new Promise(mt=>{this._titleReadyComplete=mt}),this._fixedRows=Ue.attachPersistentProcess?.fixedDimensions?.rows,this._fixedCols=Ue.attachPersistentProcess?.fixedDimensions?.cols,this._icon=Ue.attachPersistentProcess?.icon||Ue.icon,this._resource=et||(0,ee.getTerminalUri)(this._workspaceContextService.getWorkspace().id,this.instanceId,this.title),this.shellLaunchConfig.cwd){const mt=typeof this._shellLaunchConfig.cwd=="string"?u.URI.from({scheme:s.Schemas.file,path:this._shellLaunchConfig.cwd}):this._shellLaunchConfig.cwd;mt&&(this._workspaceFolder=(0,p.withNullAsUndefined)(this._workspaceContextService.getWorkspaceFolder(mt)))}if(!this._workspaceFolder){const mt=this._historyService.getLastActiveWorkspaceRoot();this._workspaceFolder=mt?(0,p.withNullAsUndefined)(this._workspaceContextService.getWorkspaceFolder(mt)):void 0}this._terminalHasTextContextKey=fe.TerminalContextKeys.textSelected.bindTo(this._contextKeyService),this._terminalA11yTreeFocusContextKey=fe.TerminalContextKeys.a11yTreeFocus.bindTo(this._contextKeyService),this._terminalAltBufferActiveContextKey=fe.TerminalContextKeys.altBufferActive.bindTo(this._contextKeyService),this._logService.trace(`terminalInstance#ctor (instanceId: ${this.instanceId})`,this._shellLaunchConfig),this._register(this.capabilities.onDidAddCapability(mt=>{this._logService.debug("terminalInstance added capability",mt),mt===0?this.capabilities.get(0)?.onDidChangeCwd(It=>{this._cwd=It,this._xtermOnKey?.dispose(),this.refreshTabLabels(this.title,N.TitleEventSource.Config),this._instantiationService.invokeFunction(ue.getDirectoryHistory)?.add(It,{remoteAuthority:this.remoteAuthority})}):mt===2&&this.capabilities.get(2)?.onCommandFinished(It=>{It.command.trim().length>0&&this._instantiationService.invokeFunction(ue.getCommandHistory)?.add(It.command,{shellType:this._shellType})})})),this._register(this.capabilities.onDidRemoveCapability(mt=>this._logService.debug("terminalInstance removed capability",mt))),!this.shellLaunchConfig.executable&&!ct.remoteAuthority&&this._terminalProfileResolverService.resolveIcon(this._shellLaunchConfig,r.OS),this.shellLaunchConfig.customPtyImplementation&&this.refreshTabLabels(this._shellLaunchConfig.name,N.TitleEventSource.Api),this.statusList=this._instantiationService.createInstance($.TerminalStatusList),this._initDimensions(),this._processManager=this._createProcessManager(),this._register((0,S.toDisposable)(()=>this._dndObserver?.dispose())),this._containerReadyBarrier=new I.AutoOpenBarrier(100),this._attachBarrier=new I.AutoOpenBarrier(1e3),this._xtermReadyPromise=this._createXterm(),this._xtermReadyPromise.then(async()=>{if(await this._containerReadyBarrier.wait(),this._configHelper.config.shellIntegration?.enabled&&!this.shellLaunchConfig.executable){const mt=await this._processManager.getBackendOS();this.shellLaunchConfig.executable=(await this._terminalProfileResolverService.getDefaultProfile({remoteAuthority:this.remoteAuthority,os:mt})).path}await this._createProcess(),this.shellLaunchConfig.attachPersistentProcess&&this.refreshTabLabels(this.shellLaunchConfig.attachPersistentProcess.title,this.shellLaunchConfig.attachPersistentProcess.titleSource),this._fixedCols&&await this._addScrollbar()}).catch(mt=>{if(!this._isDisposed)throw mt}),this.addDisposable(this._configurationService.onDidChangeConfiguration(async mt=>{mt.affectsConfiguration("terminal.integrated")&&(this.updateConfig(),this.setVisible(this._isVisible)),["terminal.integrated.fontSize","terminal.integrated.fontFamily","terminal.integrated.fontWeight","terminal.integrated.fontWeightBold","terminal.integrated.letterSpacing","terminal.integrated.lineHeight","editor.fontFamily"].some(Rt=>mt.affectsConfiguration(Rt))&&(this._layoutSettingsChanged=!0,await this._resize()),mt.affectsConfiguration("terminal.integrated.unicodeVersion")&&this._updateUnicodeVersion(),mt.affectsConfiguration("editor.accessibilitySupport")&&this.updateAccessibilitySupport(),(mt.affectsConfiguration("terminal.integrated.tabs.title")||mt.affectsConfiguration("terminal.integrated.tabs.separator")||mt.affectsConfiguration("terminal.integrated.tabs.description"))&&this._labelComputer?.refreshLabel()})),this._workspaceContextService.onDidChangeWorkspaceFolders(()=>this._labelComputer?.refreshLabel());let yt=window.setTimeout(()=>{yt=void 0,this._initialDataEvents=void 0},1e4);this._register((0,S.toDisposable)(()=>{yt&&window.clearTimeout(yt)}))}get target(){return this._target}set target(Ae){this.xterm&&(this.xterm.target=Ae),this._target=Ae}get instanceId(){return this._instanceId}get resource(){return this._resource}get cols(){return this._fixedCols!==void 0?this._fixedCols:this._dimensionsOverride&&this._dimensionsOverride.cols?this._dimensionsOverride.forceExactSize?this._dimensionsOverride.cols:Math.min(Math.max(this._dimensionsOverride.cols,2),this._cols):this._cols}get rows(){return this._fixedRows!==void 0?this._fixedRows:this._dimensionsOverride&&this._dimensionsOverride.rows?this._dimensionsOverride.forceExactSize?this._dimensionsOverride.rows:Math.min(Math.max(this._dimensionsOverride.rows,2),this._rows):this._rows}get isDisposed(){return this._isDisposed}get fixedCols(){return this._fixedCols}get fixedRows(){return this._fixedRows}get maxCols(){return this._cols}get maxRows(){return this._rows}get processId(){return this._processManager.shellProcessId}get processReady(){return this._processManager.ptyProcessReady}get hasChildProcesses(){return this.shellLaunchConfig.attachPersistentProcess?.hasChildProcesses||this._processManager.hasChildProcesses}get areLinksReady(){return this._areLinksReady}get initialDataEvents(){return this._initialDataEvents}get exitCode(){return this._exitCode}get hadFocusOnExit(){return this._hadFocusOnExit}get isTitleSetByProcess(){return!!this._messageTitleDisposable}get shellLaunchConfig(){return this._shellLaunchConfig}get shellType(){return this._shellType}get navigationMode(){return this._navigationModeAddon}get isDisconnected(){return this._processManager.isDisconnected}get isRemote(){return this._processManager.remoteAuthority!==void 0}get remoteAuthority(){return this._processManager.remoteAuthority}get hasFocus(){return this._wrapperElement?.contains(document.activeElement)??!1}get title(){return this._title}get titleSource(){return this._titleSource}get icon(){return this._getIcon()}get color(){return this._getColor()}get processName(){return this._processName}get sequence(){return this._sequence}get staticTitle(){return this._staticTitle}get workspaceFolder(){return this._workspaceFolder}get cwd(){return this._cwd}get initialCwd(){return this._initialCwd}get description(){if(this._description)return this._description;if(this._shellLaunchConfig.type)return this._shellLaunchConfig.type==="Task"?g.localize(2,null):g.localize(3,null)}get userHome(){return this._userHome}_getIcon(){return this._icon||(this._icon=this._processManager.processState>=2?w.Codicon.terminal:void 0),this._icon}_getColor(){if(this.shellLaunchConfig.color)return this.shellLaunchConfig.color;if(this.shellLaunchConfig?.attachPersistentProcess?.color)return this.shellLaunchConfig.attachPersistentProcess.color;!(this._processManager.processState>=2)}addDisposable(Ae){this._register(Ae)}_initDimensions(){if(!this._container){this._cols=80,this._rows=30;return}const Ae=window.getComputedStyle(this._container),Le=parseInt(Ae.width),Me=parseInt(Ae.height);this._evaluateColsAndRows(Le,Me)}_evaluateColsAndRows(Ae,Le){if(!Ae||!Le)return this._setLastKnownColsAndRows(),null;const Me=this._getDimension(Ae,Le);if(!Me)return this._setLastKnownColsAndRows(),null;const We=this.xterm?this.xterm.getFont():this._configHelper.getFont();if(!We.charWidth||!We.charHeight)return this._setLastKnownColsAndRows(),null;const Ve=Me.width*window.devicePixelRatio,Ue=We.charWidth*window.devicePixelRatio+We.letterSpacing,et=Math.max(Math.floor(Ve/Ue),1),Ze=Me.height*window.devicePixelRatio,Fe=Math.ceil(We.charHeight*window.devicePixelRatio),Qe=Math.floor(Fe*We.lineHeight),qe=Math.max(Math.floor(Ze/Qe),1);return(this._cols!==et||this._rows!==qe)&&(this._cols=et,this._rows=qe,this._fireMaximumDimensionsChanged()),Me.width}_setLastKnownColsAndRows(){bi._lastKnownGridDimensions&&(this._cols=bi._lastKnownGridDimensions.cols,this._rows=bi._lastKnownGridDimensions.rows)}_fireMaximumDimensionsChanged(){this._onMaximumDimensionsChanged.fire()}_getDimension(Ae,Le){const Me=this.xterm?this.xterm.getFont():this._configHelper.getFont();if(!Me||!Me.charWidth||!Me.charHeight||!this._wrapperElement||!this.xterm?.raw.element)return;const We=window.getComputedStyle(this.xterm.raw.element),Ve=parseInt(We.paddingLeft)+parseInt(We.paddingRight),Ue=parseInt(We.paddingTop)+parseInt(We.paddingBottom);return bi._lastKnownCanvasDimensions=new A.Dimension(Math.min(8e3,Ae-Ve),Le+(this._hasScrollBar&&!this._horizontalScrollbar?-ye:0)-2-Ue),bi._lastKnownCanvasDimensions}get persistentProcessId(){return this._processManager.persistentProcessId}get shouldPersist(){return this._processManager.shouldPersist&&!this.shellLaunchConfig.isTransient}async _createXterm(){const Ae=await we();if(this._isDisposed)throw new o.ErrorNoTelemetry("Terminal disposed of during xterm.js creation");const Le=this._instantiationService.createInstance(le.XtermTerminal,Ae,this._configHelper,this._cols,this._rows,this.target||N.TerminalLocation.Panel,this.capabilities);this.xterm=Le;const Me=new ie.LineDataEventAddon;return this.xterm.raw.loadAddon(Me),this.updateAccessibilitySupport(),this.xterm.onDidRequestRunCommand(We=>this.sendText(We,!0)),this._shellLaunchConfig.initialText?this.xterm.raw.writeln(this._shellLaunchConfig.initialText,()=>{Me.onLineData(We=>this._onLineData.fire(We))}):Me.onLineData(We=>this._onLineData.fire(We)),setTimeout(()=>{Le.raw.onBell(()=>{this._configHelper.config.enableBell&&this.statusList.add({id:"bell",severity:x.Severity.Warning,icon:w.Codicon.bell,tooltip:g.localize(4,null)},this._configHelper.config.bellDuration)})},1e3),this._xtermOnKey=Le.raw.onKey(We=>this._onKey(We.key,We.domEvent)),Le.raw.onSelectionChange(async()=>this._onSelectionChange()),Le.raw.buffer.onBufferChange(()=>this._refreshAltBufferContextKey()),this._processManager.onProcessData(We=>this._onProcessData(We)),Le.raw.onData(async We=>{await this._processManager.write(We),this._onDidInputData.fire(this)}),Le.raw.onBinary(We=>this._processManager.processBinary(We)),this.processReady.then(async()=>{this._linkManager&&(this._linkManager.processCwd=await this._processManager.getInitialCwd())}),this._processManager.onProcessReady(async We=>{this._areLinksReady||(this._processManager.os&&Me.setOperatingSystem(this._processManager.os),this._processManager.os===1&&(Le.raw.options.windowsMode=We.requiresWindowsMode||!1),this._linkManager=this._instantiationService.createInstance(G.TerminalLinkManager,Le.raw,this._processManager,this.capabilities),this._areLinksReady=!0,this._onLinksReady.fire(this))}),this._processManager.onRestoreCommands(We=>this.xterm?.shellIntegration.deserialize(We)),this._loadTypeAheadAddon(Le),this._configurationService.onDidChangeConfiguration(We=>{We.affectsConfiguration("terminal.integrated.localEchoEnabled")&&this._loadTypeAheadAddon(Le)}),this._pathService.userHome().then(We=>{this._userHome=We.fsPath}),Le}_loadTypeAheadAddon(Ae){const Le=this._configHelper.config.localEchoEnabled,Me=!!this.remoteAuthority;if(Le==="off"||Le==="auto"&&!Me)return this._xtermTypeAheadAddon?.dispose();this._xtermTypeAheadAddon||(Le==="on"||Le==="auto"&&Me)&&(this._xtermTypeAheadAddon=this._register(this._instantiationService.createInstance(J.TypeAheadAddon,this._processManager,this._configHelper)),Ae.raw.loadAddon(this._xtermTypeAheadAddon))}async showLinkQuickpick(){this._terminalLinkQuickpick||(this._terminalLinkQuickpick=this._instantiationService.createInstance(q.TerminalLinkQuickpick));const Ae=await this._getLinks();if(!!Ae)return await this._terminalLinkQuickpick.show(Ae)}async _getLinks(){if(!this.areLinksReady||!this._linkManager)throw new Error("terminal links are not ready, cannot generate link quick pick");if(!this.xterm)throw new Error("no xterm");return this._linkManager.getLinks()}async openRecentLink(Ae){if(!this.areLinksReady||!this._linkManager)throw new Error("terminal links are not ready, cannot open a link");if(!this.xterm)throw new Error("no xterm");this._linkManager.openRecentLink(Ae)}async runRecent(Ae){if(!this.xterm)return;let Le=[];const Me=new Set,We={iconClass:V.ThemeIcon.asClassName(w.Codicon.close),tooltip:g.localize(5,null)};if(Ae==="command"){const et=this.capabilities.get(2),Ze=et?.commands,Fe=et?.executingCommand;if(Fe&&Me.add(Fe),Ze&&Ze.length>0){for(const Be of Ze){const Ke=Be.command.trim();if(Ke.length===0||Me.has(Ke))continue;let Xe=`${Be.cwd}`;Be.exitCode&&(Be.exitCode===-1?Xe+=" failed":Xe+=` exitCode: ${Be.exitCode}`),Xe=Xe.trim();const it=[{iconClass:V.ThemeIcon.asClassName(w.Codicon.output),tooltip:g.localize(6,null),alwaysVisible:!1}],at=Le.length>0?Le[Le.length-1]:void 0;if(at?.type!=="separator"&&at?.label===Ke){at.id=Be.timestamp.toString(),at.description=Xe;continue}Le.push({label:Ke,description:Xe,id:Be.timestamp.toString(),command:Be,buttons:Be.hasOutput?it:void 0}),Me.add(Ke)}Le=Le.reverse()}Fe&&Le.unshift({label:Fe,description:et.cwd}),Le.length>0&&Le.unshift({type:"separator",label:pe.terminalStrings.currentSessionCategory});const Qe=this._instantiationService.invokeFunction(ue.getCommandHistory),qe=[];for(const[Be,Ke]of Qe.entries)!Me.has(Be)&&Ke.shellType===this.shellType&&qe.unshift({label:Be,buttons:[We]});qe.length>0&&Le.push({type:"separator",label:pe.terminalStrings.previousSessionCategory},...qe)}else{const et=this.capabilities.get(0)?.cwds||[];if(et&&et.length>0){for(const Qe of et)Le.push({label:Qe});Le=Le.reverse(),Le.unshift({type:"separator",label:pe.terminalStrings.currentSessionCategory})}const Ze=this._instantiationService.invokeFunction(ue.getDirectoryHistory),Fe=[];for(const[Qe,qe]of Ze.entries)(qe===null||qe.remoteAuthority===this.remoteAuthority)&&!et.includes(Qe)&&Fe.unshift({label:Qe,buttons:[We]});Fe.length>0&&Le.push({type:"separator",label:pe.terminalStrings.previousSessionCategory},...Fe)}if(Le.length===0)return;const Ve=this._instantiationService.createInstance(ke),Ue=this._quickInputService.createQuickPick();return Ue.items=Le,new Promise(et=>{Ue.onDidTriggerItemButton(async Ze=>{if(Ze.button===We)Ae==="command"?this._instantiationService.invokeFunction(ue.getCommandHistory)?.remove(Ze.item.label):this._instantiationService.invokeFunction(ue.getDirectoryHistory)?.remove(Ze.item.label);else{const Fe=Ze.item.command,Qe=Fe?.getOutput();if(Qe&&Fe?.command){const qe=await Ve.provideTextContent(u.URI.from({scheme:ke.scheme,path:`${Fe.command}... ${(0,v.fromNow)(Fe.timestamp,!0)}`,fragment:Qe,query:`terminal-output-${Fe.timestamp}-${this.instanceId}`}));qe&&await this._editorService.openEditor({resource:qe.uri})}}Ue.hide()}),Ue.onDidAccept(Ze=>{const Fe=Ue.activeItems[0];this.sendText(Ae==="cwd"?`cd ${Fe.label}`:Fe.label,!0),Ue.hide()}),Ue.show(),Ue.onDidHide(()=>et())})}detachFromElement(){this._wrapperElement?.remove(),this._container=void 0}attachToElement(Ae){if(this._container!==Ae){if(this._attachBarrier.open(),!this._wrapperElement)return this._attachToElement(Ae);this.xterm?.attachToElement(this._wrapperElement),this._container=Ae,this._container.appendChild(this._wrapperElement),setTimeout(()=>this._initDragAndDrop(Ae))}}async _attachToElement(Ae){if(this._wrapperElement)throw new Error("The terminal instance has already been attached to a container");this._container=Ae,this._wrapperElement=document.createElement("div"),this._wrapperElement.classList.add("terminal-wrapper");const Le=document.createElement("div");this._wrapperElement.appendChild(Le),this._container.appendChild(this._wrapperElement);const Me=await this._xtermReadyPromise;this._wrapperElement.xterm=Me.raw;const We=Me.attachToElement(Le);if(!Me.raw.element||!Me.raw.textarea)throw new Error("xterm elements not set after open");this._setAriaLabel(Me.raw,this._instanceId,this._title),Me.raw.attachCustomKeyEventHandler(Ve=>{if(this._isExiting)return!1;const Ue=new k.StandardKeyboardEvent(Ve),et=this._keybindingService.softDispatch(Ue,Ue.target),Ze=et?.enterChord&&this._configHelper.config.allowChords&&Ve.key!=="Escape";if(this._keybindingService.inChordMode||Ze)return Ve.preventDefault(),!1;const Fe="terminal.integrated.showTerminalConfigPrompt",Qe=["RightArrow","LeftArrow","UpArrow","DownArrow","Space","Meta","Control","Shift","Alt","","Delete","Backspace","Tab"];return this._storageService.getBoolean(Fe,0,!0)&&!Qe.includes(Ve.key)&&!Ve.ctrlKey&&!Ve.shiftKey&&!Ve.altKey&&(this._hasHadInput=!0),et&&et.commandId&&this._skipTerminalCommands.some(qe=>qe===et.commandId)&&!this._configHelper.config.sendKeybindingsToShell?(this._storageService.getBoolean(Fe,0,!0)&&this._hasHadInput&&!oe.TERMINAL_CREATION_COMMANDS.includes(et.commandId)&&(this._notificationService.prompt(x.Severity.Info,g.localize(7,null,this._productService.nameLong),[{label:g.localize(8,null),run:()=>{this._preferencesService.openSettings({jsonEditor:!1,query:"@id:terminal.integrated.commandsToSkipShell,terminal.integrated.sendKeybindingsToShell,terminal.integrated.allowChords"})}}]),this._storageService.store(Fe,!1,0,0)),Ve.preventDefault(),!1):!(this._configHelper.config.allowMnemonics&&!r.isMacintosh&&Ve.altKey||a.TabFocus.getTabFocusMode()&&Ve.keyCode===9||r.isWindows&&Ve.altKey&&Ve.key==="F4"&&!Ve.ctrlKey||!f.BrowserFeatures.clipboard.readText&&Ve.key==="v"&&Ve.ctrlKey)}),this._register(A.addDisposableListener(Me.raw.element,"mousedown",()=>{const Ve=A.addDisposableListener(document,"mouseup",()=>{setTimeout(()=>this._refreshSelectionContextKey(),0),Ve.dispose()})})),this._register(A.addDisposableListener(Me.raw.element,"touchstart",()=>{Me.raw.focus()})),this._register(A.addDisposableListener(Me.raw.element,"keyup",()=>{setTimeout(()=>this._refreshSelectionContextKey(),0)})),this._register(A.addDisposableListener(Me.raw.textarea,"focus",()=>{this._terminalFocusContextKey.set(!0),this.shellType?this._terminalShellTypeContextKey.set(this.shellType.toString()):this._terminalShellTypeContextKey.reset(),this._onDidFocus.fire(this)})),this._register(A.addDisposableListener(Me.raw.textarea,"blur",()=>{this._terminalFocusContextKey.reset(),this._onDidBlur.fire(this),this._refreshSelectionContextKey()})),this._initDragAndDrop(Ae),this._widgetManager.attachToElement(We),this._processManager.onProcessReady(Ve=>{this._linkManager?.setWidgetManager(this._widgetManager)}),this._lastLayoutDimensions&&this.layout(this._lastLayoutDimensions),this.setVisible(this._isVisible),this.updateConfig(),Me.raw.getOption("disableStdin")&&this._attachPressAnyKeyToCloseListener(Me.raw)}_initDragAndDrop(Ae){this._dndObserver?.dispose();const Le=this._instantiationService.createInstance(Te,Ae);Le.onDropTerminal(Me=>this._onRequestAddInstanceToGroup.fire(Me)),Le.onDropFile(async Me=>{this.focus(),await this.sendPath(Me,!1)}),this._dndObserver=new A.DragAndDropObserver(Ae,Le)}hasSelection(){return this.xterm?this.xterm.raw.hasSelection():!1}async copySelection(Ae){const Le=await this._xtermReadyPromise;if(this.hasSelection())if(Ae){let We=function(Ve){Ve.clipboardData.setData("text/html",Me),Ve.preventDefault()};const Me=await Le.getSelectionAsHtml();document.addEventListener("copy",We),document.execCommand("copy"),document.removeEventListener("copy",We)}else await this._clipboardService.writeText(Le.raw.getSelection());else this._notificationService.warn(g.localize(9,null))}get selection(){return this.xterm&&this.hasSelection()?this.xterm.raw.getSelection():void 0}clearSelection(){this.xterm?.raw.clearSelection()}selectAll(){this.xterm?.raw.focus(),this.xterm?.raw.selectAll()}notifyFindWidgetFocusChanged(Ae){if(!this.xterm)return;const Le=!Ae&&(document.activeElement===this.xterm.raw.textarea||document.activeElement===this.xterm.raw.element);this._terminalFocusContextKey.set(Le)}_refreshAltBufferContextKey(){this._terminalAltBufferActiveContextKey.set(!!(this.xterm&&this.xterm.raw.buffer.active===this.xterm.raw.buffer.alternate))}async _shouldPasteText(Ae){if(this.xterm?.raw.modes.bracketedPasteMode)return!0;const Le=Ae.split(/\r?\n/);if(Le.length===2&&Le[1].trim().length===0||Le.length===1||!this._configurationService.getValue("terminal.integrated.enableMultiLinePasteWarning"))return!0;const Me=3,We=30;let Ve=g.localize(10,null);for(let et=0;et<Math.min(Le.length,Me);et++){const Ze=Le[et];Ve+=` ${Ze.length>We?`${Ze.slice(0,We)}\u2026`:Ze}`}Le.length>Me&&(Ve+=` \u2026`);const Ue=await this._dialogService.confirm({type:"question",message:g.localize(11,null,Le.length),detail:Ve,primaryButton:g.localize(12,null),checkbox:{label:g.localize(13,null)}});return Ue.confirmed&&Ue.checkboxChecked&&await this._configurationService.updateValue("terminal.integrated.enableMultiLinePasteWarning",!1),Ue.confirmed}dispose(Ae){this._logService.trace(`terminalInstance#dispose (instanceId: ${this.instanceId})`),(0,S.dispose)(this._linkManager),this._linkManager=void 0,(0,S.dispose)(this._widgetManager),this.xterm?.raw.element&&(this._hadFocusOnExit=this.hasFocus),this._wrapperElement&&(this._wrapperElement.xterm&&(this._wrapperElement.xterm=void 0),this._horizontalScrollbar&&(this._horizontalScrollbar.dispose(),this._horizontalScrollbar=void 0)),this.xterm?.dispose(),t.isFirefox&&(this._terminalFocusContextKey.reset(),this._terminalHasTextContextKey.reset(),this._onDidBlur.fire(this)),this._pressAnyKeyToCloseListener&&(this._pressAnyKeyToCloseListener.dispose(),this._pressAnyKeyToCloseListener=void 0),this._processManager.dispose(Ae),this._onProcessExit(void 0),this._isDisposed||(this._isDisposed=!0,this._onDisposed.fire(this)),super.dispose()}async detachFromProcess(){await this._processManager.detachFromProcess(),this.dispose()}focus(Ae){if(this._refreshAltBufferContextKey(),!this.xterm)return;const Le=window.getSelection();if(!Le)return;(!Le.toString()||Ae)&&this.xterm.raw.focus()}async focusWhenReady(Ae){await this._xtermReadyPromise,await this._attachBarrier.wait(),this.focus(Ae)}async paste(){if(!this.xterm)return;let Ae=await this._clipboardService.readText();!await this._shouldPasteText(Ae)||(this.focus(),this.xterm.raw.paste(Ae))}async pasteSelection(){if(!this.xterm)return;let Ae=await this._clipboardService.readText("selection");!await this._shouldPasteText(Ae)||(this.focus(),this.xterm.raw.paste(Ae))}async sendText(Ae,Le){Ae=Ae.replace(/\r?\n/g,"\r"),Le&&Ae.substr(Ae.length-1)!=="\r"&&(Ae+="\r"),await this._processManager.write(Ae),this._onDidInputData.fire(this)}async sendPath(Ae,Le){const Me=await Ne(Ae,this.shellLaunchConfig.executable,this.title,this.shellType,this._processManager.backend,this._processManager.os);return this.sendText(Me,Le)}setVisible(Ae){this._isVisible=Ae,this._wrapperElement&&this._wrapperElement.classList.toggle("active",Ae),Ae&&this.xterm&&(this._resize(),this.xterm.forceRefresh())}scrollDownLine(){this.xterm?.scrollDownLine()}scrollDownPage(){this.xterm?.scrollDownPage()}scrollToBottom(){this.xterm?.scrollToBottom()}scrollUpLine(){this.xterm?.scrollUpLine()}scrollUpPage(){this.xterm?.scrollUpPage()}scrollToTop(){this.xterm?.scrollToTop()}clearBuffer(){this.xterm?.clearBuffer()}_refreshSelectionContextKey(){const Ae=!!this._viewsService.getActiveViewWithId(oe.TERMINAL_VIEW_ID);let Le=!1;const Me=this._editorService.activeEditor;Me&&(Le=Me instanceof j.TerminalEditorInput),this._terminalHasTextContextKey.set((Ae||Le)&&this.hasSelection())}_createProcessManager(){const Ae=this._instantiationService.createInstance(Y.TerminalProcessManager,this._instanceId,this._configHelper,this.shellLaunchConfig?.cwd);return this.capabilities.add(Ae.capabilities),Ae.onProcessReady(async Le=>{this._onProcessIdReady.fire(this),this._initialCwd=await this.getInitialCwd(),this._labelComputer||(this._labelComputer=this._register(new _e(this._configHelper,this,this._workspaceContextService)),this._labelComputer.onDidChangeLabel(Me=>{this._title=Me.title,this._description=Me.description,this._onTitleChanged.fire(this)})),this._shellLaunchConfig.name?this.refreshTabLabels(this._shellLaunchConfig.name,N.TitleEventSource.Api):(setTimeout(()=>{this._xtermReadyPromise.then(Me=>{this._messageTitleDisposable=Me.raw.onTitleChange(We=>this._onTitleChange(We))})}),this.refreshTabLabels(this._shellLaunchConfig.executable,N.TitleEventSource.Process))}),Ae.onProcessExit(Le=>this._onProcessExit(Le)),Ae.onDidChangeProperty(({type:Le,value:Me})=>{switch(Le){case"cwd":this._cwd=Me,this._labelComputer?.refreshLabel();break;case"initialCwd":this._initialCwd=Me,this._cwd=this._initialCwd,this.refreshTabLabels(this.title,N.TitleEventSource.Config);break;case"title":this.refreshTabLabels(Me||"",N.TitleEventSource.Process);break;case"overrideDimensions":this.setOverrideDimensions(Me,!0);break;case"resolvedShellLaunchConfig":this._setResolvedShellLaunchConfig(Me);break;case"shellType":this.setShellType(Me);break;case"hasChildProcesses":this._onDidChangeHasChildProcesses.fire(Me);break}}),Ae.onProcessData(Le=>{this._initialDataEvents?.push(Le.data),this._onData.fire(Le.data)}),Ae.onEnvironmentVariableInfoChanged(Le=>this._onEnvironmentVariableInfoChanged(Le)),Ae.onPtyDisconnect(()=>{this.xterm&&(this.xterm.raw.options.disableStdin=!0),this.statusList.add({id:"disconnected",severity:x.Severity.Error,icon:w.Codicon.debugDisconnect,tooltip:g.localize(14,null)})}),Ae.onPtyReconnect(()=>{this.xterm&&(this.xterm.raw.options.disableStdin=!1),this.statusList.remove("disconnected")}),Ae}async _createProcess(){if(this._isDisposed)return;this._historyService.getLastActiveWorkspaceRoot(s.Schemas.file)?await this._trust()||this._onProcessExit({message:g.localize(15,null)}):this._cwd&&this._userHome&&this._cwd!==this._userHome&&this._onProcessExit({message:g.localize(16,null,this._cwd,this._userHome)}),this._container&&this._cols===0&&this._rows===0&&(this._initDimensions(),this.xterm?.raw.resize(this._cols||80,this._rows||30));const Le=!!this.shellLaunchConfig.icon;await this._processManager.createProcess(this._shellLaunchConfig,this._cols||80,this._rows||30,this._accessibilityService.isScreenReaderOptimized()).then(Me=>{Me&&this._onProcessExit(Me,Me.code===oe.ShellIntegrationExitCode)}),this.xterm?.shellIntegration&&this.capabilities.add(this.xterm?.shellIntegration.capabilities),(!Le&&this.shellLaunchConfig.icon||this.shellLaunchConfig.color)&&this._onIconChanged.fire(this)}_onProcessData(Ae){const Le=++this._latestXtermWriteData;Ae.trackCommit?Ae.writePromise=new Promise(Me=>{this.xterm?.raw.write(Ae.data,()=>{this._latestXtermParseData=Le,this._processManager.acknowledgeDataEvent(Ae.data.length),Me()})}):this.xterm?.raw.write(Ae.data,()=>{this._latestXtermParseData=Le,this._processManager.acknowledgeDataEvent(Ae.data.length)})}async _onProcessExit(Ae,Le){if(this._isExiting)return;this._isExiting=!0,await this._flushXtermData(),this._logService.debug(`Terminal process exit (instanceId: ${this.instanceId}) with code ${this._exitCode}`);const Me=Re(Ae,this.shellLaunchConfig,this._processManager.processState,this._initialCwd,Le);this._exitCode=Me?.code;const We=Me?.message;this._logService.debug(`Terminal process exit (instanceId: ${this.instanceId}) state ${this._processManager.processState}`),this._shellLaunchConfig.waitOnExit&&this._processManager.processState!==5?this._xtermReadyPromise.then(Ve=>{We&&Ve.raw.writeln(We),typeof this._shellLaunchConfig.waitOnExit=="string"&&Ve.raw.write((0,pe.formatMessageForTerminal)(this._shellLaunchConfig.waitOnExit)),Ve.raw.options.disableStdin=!0,Ve.raw.textarea&&this._attachPressAnyKeyToCloseListener(Ve.raw)}):(this.dispose(),We&&(this._processManager.processState===4||this._configHelper.config.showExitAlert?this._notificationService.notify({message:We,severity:x.Severity.Error,actions:{primary:[this._instantiationService.createInstance(Z.TerminalLaunchHelpAction)]}}):this._logService.warn(We))),this._onExit.fire(Ae),this._isDisposed&&this._onExit.dispose()}_flushXtermData(){if(this._latestXtermWriteData===this._latestXtermParseData)return Promise.resolve();let Ae=0;return new Promise(Le=>{const Me=setInterval(()=>{(this._latestXtermWriteData===this._latestXtermParseData||++Ae==5)&&(clearInterval(Me),Le())},20)})}_attachPressAnyKeyToCloseListener(Ae){Ae.textarea&&!this._pressAnyKeyToCloseListener&&(this._pressAnyKeyToCloseListener=A.addDisposableListener(Ae.textarea,"keypress",Le=>{this._pressAnyKeyToCloseListener&&(this._pressAnyKeyToCloseListener.dispose(),this._pressAnyKeyToCloseListener=void 0,this.dispose(),Le.preventDefault())}))}async reuseTerminal(Ae,Le=!1){this._pressAnyKeyToCloseListener?.dispose(),this._pressAnyKeyToCloseListener=void 0,this.xterm&&(Le||await new Promise(Me=>this.xterm.raw.write(` [G`,Me)),Ae.initialText&&await new Promise(Me=>this.xterm.raw.writeln(Ae.initialText,Me)),this._isExiting&&this._shellLaunchConfig.waitOnExit&&(this.xterm.raw.options.disableStdin=!1,this._isExiting=!1)),this.statusList.remove("relaunch-needed"),this._environmentInfo?.disposable.dispose(),this._environmentInfo=void 0,Le||(Ae.initialText=" "),this._shellLaunchConfig=Ae,await this._processManager.relaunch(this._shellLaunchConfig,this._cols||80,this._rows||30,this._accessibilityService.isScreenReaderOptimized(),Le).then(Me=>{Me&&this._onProcessExit(Me)}),this._xtermTypeAheadAddon?.reset()}async setEscapeSequenceLogging(Ae){const Le=await this._xtermReadyPromise;Le.raw.options.logLevel=Ae?"debug":"info"}relaunch(){this.reuseTerminal(this._shellLaunchConfig,!0)}_onTitleChange(Ae){this.isTitleSetByProcess&&this.refreshTabLabels(Ae,N.TitleEventSource.Sequence)}async _trust(){return await this._workspaceTrustRequestService.requestWorkspaceTrust({message:g.localize(17,null)})===!0}_onKey(Ae,Le){new k.StandardKeyboardEvent(Le).equals(3)&&this._updateProcessCwd()}async _onSelectionChange(){this._configurationService.getValue("terminal.integrated.copyOnSelection")&&this.hasSelection()&&await this.copySelection()}async _updateProcessCwd(){if(!this._isDisposed)try{const Ae=await this.refreshProperty("cwd");if(typeof Ae!="string")throw new Error(`cwd is not a string ${Ae}`)}catch(Ae){if(Ae instanceof Error&&Ae.message==="Cannot refresh property when process is not set")return;throw Ae}}updateConfig(){this._setCommandsToSkipShell(this._configHelper.config.commandsToSkipShell),this._refreshEnvironmentVariableInfoWidgetState(this._processManager.environmentVariableInfo)}async _updateUnicodeVersion(){this._processManager.setUnicodeVersion(this._configHelper.config.unicodeVersion)}updateAccessibilitySupport(){const Ae=this._accessibilityService.isScreenReaderOptimized();Ae?(this._navigationModeAddon=new ce.NavigationModeAddon(this._terminalA11yTreeFocusContextKey),this.xterm.raw.loadAddon(this._navigationModeAddon)):(this._navigationModeAddon?.dispose(),this._navigationModeAddon=void 0),this.xterm.raw.options.screenReaderMode=Ae}_setCommandsToSkipShell(Ae){const Le=Ae.filter(Me=>Me[0]==="-").map(Me=>Me.slice(1));this._skipTerminalCommands=oe.DEFAULT_COMMANDS_TO_SKIP_SHELL.filter(Me=>Le.indexOf(Me)===-1).concat(Ae)}layout(Ae){this._lastLayoutDimensions=Ae,!(this.disableLayout||Ae.width<=0||Ae.height<=0||!this._evaluateColsAndRows(Ae.width,Ae.height))&&(this._resize(),this._containerReadyBarrier.open())}async _resize(){this._resizeNow(!1)}async _resizeNow(Ae){let Le=this.cols,Me=this.rows;if(this.xterm){if(this._isVisible&&this._layoutSettingsChanged){const We=this.xterm.getFont(),Ve=this._configHelper.config;this.xterm.raw.options.letterSpacing=We.letterSpacing,this.xterm.raw.options.lineHeight=We.lineHeight,this.xterm.raw.options.fontSize=We.fontSize,this.xterm.raw.options.fontFamily=We.fontFamily,this.xterm.raw.options.fontWeight=Ve.fontWeight,this.xterm.raw.options.fontWeightBold=Ve.fontWeightBold,this._initDimensions(),Le=this.cols,Me=this.rows,this._layoutSettingsChanged=!1}if(isNaN(Le)||isNaN(Me))return;(Le!==this.xterm.raw.cols||Me!==this.xterm.raw.rows)&&((this._fixedRows||this._fixedCols)&&await this.updateProperty("fixedDimensions",{cols:this._fixedCols,rows:this._fixedRows}),this._onDimensionsChanged.fire()),this.xterm.raw.resize(Le,Me),bi._lastKnownGridDimensions={cols:Le,rows:Me},this._isVisible&&this.xterm.forceUnpause()}Ae?this._processManager.setDimensions(Le,Me,!0):await this._processManager.setDimensions(Le,Me)}setShellType(Ae){this._shellType=Ae}_setAriaLabel(Ae,Le,Me){if(Ae&&Ae.textarea){let We;Me&&Me.length>0?We=g.localize(18,null,Le,Me):We=g.localize(19,null,Le);const Ve=this._keybindingService.lookupKeybinding("workbench.action.terminal.navigationModeFocusPrevious")?.getLabel(),Ue=this._keybindingService.lookupKeybinding("workbench.action.terminal.navigationModeFocusNext")?.getLabel();Ve&&Ue&&(We+=` ${g.localize(20,null,Ve,Ue)}`),Ae.textarea.setAttribute("aria-label",We)}}refreshTabLabels(Ae,Le){const Me=!Ae;Ae=this._updateTitleProperties(Ae,Le);const We=Ae!==this._title;this._title=Ae,this._labelComputer?.refreshLabel(Me),this._setAriaLabel(this.xterm?.raw,this._instanceId,this._title),this._titleReadyComplete&&(this._titleReadyComplete(Ae),this._titleReadyComplete=void 0),We&&this._onTitleChanged.fire(this)}_updateTitleProperties(Ae,Le){if(!Ae)return this._processName;switch(Le){case N.TitleEventSource.Process:if(this._processManager.os===1)Ae=l.win32.parse(Ae).name;else{const Me=Ae.indexOf(" ");Ae.startsWith("/")?Ae=l.basename(Ae):Me>-1&&(Ae=Ae.substring(0,Me))}this._processName=Ae;break;case N.TitleEventSource.Api:this._staticTitle=Ae,(0,S.dispose)(this._messageTitleDisposable),this._messageTitleDisposable=void 0;break;case N.TitleEventSource.Sequence:this._sequence=Ae,this._processManager.os===1&&(Ae.match(/^[a-zA-Z]:\\.+\.[a-zA-Z]{1,3}/)?(Ae=l.win32.parse(Ae).name,this._sequence=Ae):this._sequence=void 0);break}return this._titleSource=Le,Ae}waitForTitle(){return this._titleReadyPromise}setOverrideDimensions(Ae,Le=!1){this._dimensionsOverride&&this._dimensionsOverride.forceExactSize&&!Ae&&this._rows===0&&this._cols===0&&(this._cols=this._dimensionsOverride.cols,this._rows=this._dimensionsOverride.rows),this._dimensionsOverride=Ae,Le?this._resizeNow(!0):this._resize()}async setFixedDimensions(){const Ae=await this._quickInputService.input({title:g.localize(21,null),placeHolder:"Enter a number of columns or leave empty for automatic width",validateInput:async Me=>Me.length>0&&!Me.match(/^\d+$/)?{content:"Enter a number or leave empty size automatically",severity:x.Severity.Error}:void 0});if(Ae===void 0)return;this._fixedCols=this._parseFixedDimension(Ae),this._labelComputer?.refreshLabel(),this._terminalHasFixedWidth.set(!!this._fixedCols);const Le=await this._quickInputService.input({title:g.localize(22,null),placeHolder:"Enter a number of rows or leave empty for automatic height",validateInput:async Me=>Me.length>0&&!Me.match(/^\d+$/)?{content:"Enter a number or leave empty size automatically",severity:x.Severity.Error}:void 0});Le!==void 0&&(this._fixedRows=this._parseFixedDimension(Le),this._labelComputer?.refreshLabel(),await this._refreshScrollbar(),this._resize(),this.focus())}_parseFixedDimension(Ae){if(Ae==="")return;const Le=parseInt(Ae);if(Le<=0)throw new Error(`Could not parse dimension "${Ae}"`);return Le}async toggleSizeToContentWidth(){if(!!this.xterm?.raw.buffer.active){if(this._hasScrollBar)this._terminalHasFixedWidth.set(!1),this._fixedCols=void 0,this._fixedRows=void 0,this._hasScrollBar=!1,this._initDimensions(),await this._resize();else{const Ae=Math.max(this.maxCols,Math.min(this.xterm.getLongestViewportWrappedLineLength(),5e3));Ae>this.xterm.raw.cols&&(this._fixedCols=Ae)}await this._refreshScrollbar(),this._labelComputer?.refreshLabel(),this.focus()}}_refreshScrollbar(){return this._fixedCols||this._fixedRows?this._addScrollbar():this._removeScrollbar()}async _addScrollbar(){const Ae=(this.xterm?this.xterm.getFont():this._configHelper.getFont()).charWidth;if(!(!this.xterm?.raw.element||!this._wrapperElement||!this._container||!Ae||!this._fixedCols)&&(this._wrapperElement.classList.add("fixed-dims"),this._hasScrollBar=!0,this._initDimensions(),this._fixedRows=this._rows-1,await this._resize(),this._terminalHasFixedWidth.set(!0),this._horizontalScrollbar||(this._horizontalScrollbar=this._register(new D.DomScrollableElement(this._wrapperElement,{vertical:2,horizontal:1,useShadows:!1,scrollYToX:!1,consumeMouseWheelIfScrollbarIsNeeded:!1})),this._container.appendChild(this._horizontalScrollbar.getDomNode())),this._horizontalScrollbar.setScrollDimensions({width:this.xterm.raw.element.clientWidth,scrollWidth:this._fixedCols*Ae+40}),this._horizontalScrollbar.getDomNode().style.paddingBottom="16px",r.isWindows))for(let Le=this.xterm.raw.buffer.active.viewportY;Le<this.xterm.raw.buffer.active.length;Le++){let Me=this.xterm.raw.buffer.active.getLine(Le);Me._line.isWrapped=!1}}async _removeScrollbar(){!this._container||!this._wrapperElement||!this._horizontalScrollbar||(this._horizontalScrollbar.getDomNode().remove(),this._horizontalScrollbar.dispose(),this._horizontalScrollbar=void 0,this._wrapperElement.remove(),this._wrapperElement.classList.remove("fixed-dims"),this._container.appendChild(this._wrapperElement))}_setResolvedShellLaunchConfig(Ae){this._shellLaunchConfig.args=Ae.args,this._shellLaunchConfig.cwd=Ae.cwd,this._shellLaunchConfig.executable=Ae.executable,this._shellLaunchConfig.env=Ae.env}showEnvironmentInfoHover(){this._environmentInfo&&this._environmentInfo.widget.focus()}_onEnvironmentVariableInfoChanged(Ae){Ae.requiresAction&&this.xterm?.raw.textarea?.setAttribute("aria-label",g.localize(23,null,this._instanceId)),this._refreshEnvironmentVariableInfoWidgetState(Ae)}_refreshEnvironmentVariableInfoWidgetState(Ae){if(!Ae||this._configHelper.config.environmentChangesIndicator==="off"||this._configHelper.config.environmentChangesIndicator==="warnonly"&&!Ae.requiresAction){this.statusList.remove("relaunch-needed"),this._environmentInfo?.disposable.dispose(),this._environmentInfo=void 0;return}if(Ae.requiresAction&&this._configHelper.config.environmentChangesRelaunch&&!this._processManager.hasWrittenData&&!this._shellLaunchConfig.isFeatureTerminal&&!this._shellLaunchConfig.customPtyImplementation&&!this._shellLaunchConfig.isExtensionOwnedTerminal&&!this._shellLaunchConfig.attachPersistentProcess){this.relaunch();return}this._environmentInfo?.disposable.dispose();const Le=this._instantiationService.createInstance(te.EnvironmentVariableInfoWidget,Ae),Me=this._widgetManager.attachWidget(Le);Ae.requiresAction&&this.statusList.add({id:"relaunch-needed",severity:x.Severity.Warning,icon:w.Codicon.warning,tooltip:Ae.getInfo(),hoverActions:Ae.getActions?Ae.getActions():void 0}),Me&&(this._environmentInfo={widget:Le,disposable:Me})}async toggleEscapeSequenceLogging(){const Ae=await this._xtermReadyPromise;return Ae.raw.options.logLevel=Ae.raw.options.logLevel==="debug"?"info":"debug",Ae.raw.options.logLevel==="debug"}async getInitialCwd(){return this._initialCwd||(this._initialCwd=await this._processManager.getInitialCwd()),this._initialCwd}async getCwd(){return this.capabilities.has(0)?this.capabilities.get(0).getCwd():this.capabilities.has(1)?this.capabilities.get(1).getCwd():await this._processManager.getInitialCwd()}async refreshProperty(Ae){return await this.processReady,this._processManager.refreshProperty(Ae)}async updateProperty(Ae,Le){return this._processManager.updateProperty(Ae,Le)}registerLinkProvider(Ae){if(!this._linkManager)throw new Error("TerminalInstance.registerLinkProvider before link manager was ready");return this._linkManager.registerExternalLinkProvider(Ae.provideLinks.bind(Ae,this))}async rename(Ae){Ae==="triggerQuickpick"&&(Ae=await this._quickInputService.input({value:this.title,prompt:g.localize(24,null)})),this.refreshTabLabels(Ae,N.TitleEventSource.Api)}async changeIcon(){const Ae=[];for(const Me of w.Codicon.getAll())Ae.push({label:`$(${Me.id})`,description:`${Me.id}`,icon:Me});const Le=await this._quickInputService.pick(Ae,{matchOnDescription:!0});Le&&(this._icon=Le.icon,this._onIconChanged.fire(this))}async changeColor(){if(!this._getIcon())return;const Le=this._themeService.getColorTheme(),Me=(0,X.getStandardColors)(Le),We=(0,X.getColorStyleElement)(Le),Ve=[];for(const Qe of Me){const qe=(0,X.getColorClass)(Qe);Ve.push({label:`$(${w.Codicon.circleFilled.id}) ${Qe.replace("terminal.ansi","")}`,id:Qe,description:Qe,iconClasses:[qe]})}Ve.push({type:"separator"});const Ue={label:"Reset to default"};Ve.push(Ue),document.body.appendChild(We);const et=this._quickInputService.createQuickPick();et.items=Ve,et.matchOnDescription=!0,et.show();const Ze=[],Fe=await new Promise(Qe=>{Ze.push(et.onDidHide(()=>Qe(void 0))),Ze.push(et.onDidAccept(()=>Qe(et.selectedItems[0])))});(0,S.dispose)(Ze),Fe&&(this.shellLaunchConfig.color=Fe.id,this._onIconChanged.fire(this)),et.hide(),document.body.removeChild(We)}};Ie._instanceIdCounter=1,Ee([(0,C.debounce)(50)],Ie.prototype,"_fireMaximumDimensionsChanged",null),Ee([(0,C.debounce)(1e3)],Ie.prototype,"relaunch",null),Ee([(0,C.debounce)(2e3)],Ie.prototype,"_updateProcessCwd",null),Ee([(0,C.debounce)(50)],Ie.prototype,"_resize",null),Ie=Ee([W(7,oe.ITerminalProfileResolverService),W(8,he.IPathService),W(9,E.IContextKeyService),W(10,R.IKeybindingService),W(11,x.INotificationService),W(12,ge.IPreferencesService),W(13,K.IViewsService),W(14,T.IInstantiationService),W(15,m.IClipboardService),W(16,V.IThemeService),W(17,b.IConfigurationService),W(18,O.ILogService),W(19,y.IDialogService),W(20,M.IStorageService),W(21,d.IAccessibilityService),W(22,F.IProductService),W(23,L.IQuickInputService),W(24,be.IWorkbenchEnvironmentService),W(25,z.IWorkspaceContextService),W(26,me.IEditorService),W(27,U.IWorkspaceTrustRequestService),W(28,Ce.IHistoryService)],Ie),e.TerminalInstance=Ie;let Te=class extends S.Disposable{constructor(Ae,Le,Me){super();this._container=Ae,this._layoutService=Le,this._viewDescriptorService=Me,this._onDropFile=new c.Emitter,this._onDropTerminal=new c.Emitter,this._register((0,S.toDisposable)(()=>this._clearDropOverlay()))}get onDropFile(){return this._onDropFile.event}get onDropTerminal(){return this._onDropTerminal.event}_clearDropOverlay(){this._dropOverlay&&this._dropOverlay.parentElement&&this._dropOverlay.parentElement.removeChild(this._dropOverlay),this._dropOverlay=void 0}onDragEnter(Ae){if(!!(0,H.containsDragType)(Ae,_.DataTransfers.FILES,_.DataTransfers.RESOURCES,_.DataTransfers.TERMINALS,H.CodeDataTransfers.FILES)){if(this._dropOverlay||(this._dropOverlay=document.createElement("div"),this._dropOverlay.classList.add("terminal-drop-overlay")),(0,H.containsDragType)(Ae,_.DataTransfers.TERMINALS)){const Le=this._getDropSide(Ae);this._dropOverlay.classList.toggle("drop-before",Le==="before"),this._dropOverlay.classList.toggle("drop-after",Le==="after")}this._dropOverlay.parentElement||this._container.appendChild(this._dropOverlay)}}onDragLeave(Ae){this._clearDropOverlay()}onDragEnd(Ae){this._clearDropOverlay()}onDragOver(Ae){if(!(!Ae.dataTransfer||!this._dropOverlay)){if((0,H.containsDragType)(Ae,_.DataTransfers.TERMINALS)){const Le=this._getDropSide(Ae);this._dropOverlay.classList.toggle("drop-before",Le==="before"),this._dropOverlay.classList.toggle("drop-after",Le==="after")}this._dropOverlay.style.opacity="1"}}async onDrop(Ae){if(this._clearDropOverlay(),!Ae.dataTransfer)return;const Le=(0,ee.getTerminalResourcesFromDragEvent)(Ae);if(Le){for(const Ue of Le){const et=this._getDropSide(Ae);this._onDropTerminal.fire({uri:Ue,side:et})}return}let Me;const We=Ae.dataTransfer.getData(_.DataTransfers.RESOURCES);We&&(Me=u.URI.parse(JSON.parse(We)[0]).fsPath);const Ve=Ae.dataTransfer.getData(H.CodeDataTransfers.FILES);!Me&&Ve&&(Me=u.URI.file(JSON.parse(Ve)[0]).fsPath),!Me&&Ae.dataTransfer.files.length>0&&Ae.dataTransfer.files[0].path&&(Me=u.URI.file(Ae.dataTransfer.files[0].path).fsPath),!!Me&&this._onDropFile.fire(Me)}_getDropSide(Ae){const Le=this._container;if(!Le)return"after";const Me=Le.getBoundingClientRect();return this._getViewOrientation()===1?Ae.clientX-Me.left<Me.width/2?"before":"after":Ae.clientY-Me.top<Me.height/2?"before":"after"}_getViewOrientation(){const Ae=this._layoutService.getPanelPosition();return this._viewDescriptorService.getViewLocationById(oe.TERMINAL_VIEW_ID)===1&&Ae===2?1:0}};Te=Ee([W(1,ve.IWorkbenchLayoutService),W(2,K.IViewDescriptorService)],Te),(0,V.registerThemingParticipant)((xe,Ae)=>{const Le=xe.getColor(P.activeContrastBorder);Le&&Ae.addRule(` .monaco-workbench.hc-black .editor-instance .xterm.focus::before, .monaco-workbench.hc-black .pane-body.integrated-terminal .xterm.focus::before, .monaco-workbench.hc-black .editor-instance .xterm:focus::before, .monaco-workbench.hc-black .pane-body.integrated-terminal .xterm:focus::before, .monaco-workbench.hc-light .editor-instance .xterm.focus::before, .monaco-workbench.hc-light .pane-body.integrated-terminal .xterm.focus::before, .monaco-workbench.hc-light .editor-instance .xterm:focus::before, .monaco-workbench.hc-light .pane-body.integrated-terminal .xterm:focus::before { border-color: ${Le}; }`);const Me=xe.getColor(P.scrollbarSliderBackground);Me&&Ae.addRule(` .monaco-workbench .editor-instance .find-focused .xterm .xterm-viewport, .monaco-workbench .pane-body.integrated-terminal .find-focused .xterm .xterm-viewport, .monaco-workbench .editor-instance .xterm.focus .xterm-viewport, .monaco-workbench .pane-body.integrated-terminal .xterm.focus .xterm-viewport, .monaco-workbench .editor-instance .xterm:focus .xterm-viewport, .monaco-workbench .pane-body.integrated-terminal .xterm:focus .xterm-viewport, .monaco-workbench .editor-instance .xterm:hover .xterm-viewport, .monaco-workbench .pane-body.integrated-terminal .xterm:hover .xterm-viewport { background-color: ${Me} !important; } .monaco-workbench .editor-instance .xterm-viewport, .monaco-workbench .pane-body.integrated-terminal .xterm-viewport { scrollbar-color: ${Me} transparent; } `);const We=xe.getColor(P.scrollbarSliderHoverBackground);We&&Ae.addRule(` .monaco-workbench .editor-instance .xterm .xterm-viewport::-webkit-scrollbar-thumb:hover, .monaco-workbench .pane-body.integrated-terminal .xterm .xterm-viewport::-webkit-scrollbar-thumb:hover { background-color: ${We}; } .monaco-workbench .editor-instance .xterm-viewport:hover, .monaco-workbench .pane-body.integrated-terminal .xterm-viewport:hover { scrollbar-color: ${We} transparent; } `);const Ve=xe.getColor(P.scrollbarSliderActiveBackground);Ve&&Ae.addRule(` .monaco-workbench .editor-instance .xterm .xterm-viewport::-webkit-scrollbar-thumb:active, .monaco-workbench .pane-body.integrated-terminal .xterm .xterm-viewport::-webkit-scrollbar-thumb:active { background-color: ${Ve}; } `)});var De;(function(xe){xe.Title="title",xe.Description="description"})(De||(De={}));let _e=class extends S.Disposable{constructor(Ae,Le,Me){super();this._configHelper=Ae,this._instance=Le,this._workspaceContextService=Me,this._title="",this._description="",this._onDidChangeLabel=this._register(new c.Emitter),this.onDidChangeLabel=this._onDidChangeLabel.event}get title(){return this._title}get description(){return this._description}refreshLabel(Ae){this._title=this.computeLabel(this._configHelper.config.tabs.title,"title",Ae),this._description=this.computeLabel(this._configHelper.config.tabs.description,"description"),(this._title!==this._instance.title||this._description!==this._instance.description||Ae)&&this._onDidChangeLabel.fire({title:this._title,description:this._description})}computeLabel(Ae,Le,Me){const We={cwd:this._instance.cwd||this._instance.initialCwd||"",cwdFolder:"",workspaceFolder:this._instance.workspaceFolder?l.basename(this._instance.workspaceFolder.uri.fsPath):void 0,local:this._instance.shellLaunchConfig.type==="Local"?this._instance.shellLaunchConfig.type:void 0,process:this._instance.processName,sequence:this._instance.sequence,task:this._instance.shellLaunchConfig.type==="Task"?this._instance.shellLaunchConfig.type:void 0,fixedDimensions:this._instance.fixedCols?this._instance.fixedRows?`\u2194${this._instance.fixedCols} \u2195${this._instance.fixedRows}`:`\u2194${this._instance.fixedCols}`:this._instance.fixedRows?`\u2195${this._instance.fixedRows}`:"",separator:{label:this._configHelper.config.tabs.separator}};if(Ae=Ae.trim(),!Ae)return Le==="title"&&this._instance.processName||"";if(!Me&&this._instance.staticTitle&&Le==="title")return this._instance.staticTitle.replace(/[\n\r\t]/g,"")||We.process?.replace(/[\n\r\t]/g,"")||"";const Ve=this._instance.capabilities.has(0)||this._instance.capabilities.has(1),et=this._workspaceContextService.getWorkspace().folders.length>1;if(We.cwd&&Ve&&(!this._instance.shellLaunchConfig.isFeatureTerminal||Le==="title")){const Fe=u.URI.from({scheme:this._instance.workspaceFolder?.uri.scheme||s.Schemas.file,path:this._instance.cwd});(et||Fe.fsPath!==this._instance.workspaceFolder?.uri.fsPath)&&(We.cwdFolder=l.basename(We.cwd))}let Ze=(0,i.template)(Ae,We).replace(/[\n\r\t]/g,"").trim();return Ze===""&&Le==="title"?this._instance.processName||"":Ze}pathsEqual(Ae,Le){if(!Ae&&!Le)return!0;if(!Ae||!Le)return!1;if(Ae===Le)return!0;const Me=Ae.includes("/")?Ae.split("/"):Ae.split("\\"),We=Le.includes("/")?Le.split("/"):Le.split("\\");if(Me.length!==We.length)return!1;for(let Ve=0;Ve<Me.length;Ve++)if(Me[Ve]!==We[Ve])return!1;return!0}};_e=Ee([W(2,z.IWorkspaceContextService)],_e),e.TerminalLabelComputer=_e;function Re(xe,Ae,Le,Me,We){if(xe===void 0||xe===0)return{code:xe,message:void 0};const Ve=typeof xe=="number"?xe:xe.code;let Ue;switch(typeof xe){case"number":{let et;Ae.executable&&(et=Ae.executable,typeof Ae.args=="string"?et+=` ${Ae.args}`:Ae.args&&Ae.args.length&&(et+=Ae.args.map(Ze=>` '${Ze}'`).join())),We?et?Ue=g.localize(25,null,et,Ve):Ue=g.localize(26,null,Ve):Le===4?et?Ue=g.localize(27,null,et,Ve):Ue=g.localize(28,null,Ve):et?Ue=g.localize(29,null,et,Ve):Ue=g.localize(30,null,Ve);break}case"object":{if(xe.message.toString().includes("Could not find pty with id"))break;let et=xe.message;const Ze=xe.message.match(/.*error code:\s*(\d+).*$/);if(Ze)switch(Ze.length>1?parseInt(Ze[1]):void 0){case 5:et=`Access was denied to the path containing your executable "${Ae.executable}". Manage and change your permissions to get this to work`;break;case 267:et=`Invalid starting directory "${Me}", review your terminal.integrated.cwd setting`;break;case 1260:et="Windows cannot open this program because it has been prevented by a software restriction policy. For more information, open Event Viewer or contact your system Administrator";break}Ue=g.localize(31,null,et);break}}return{code:Ve,message:Ue}}e.parseExitResult=Re;async function Ne(xe,Ae,Le,Me,We,Ve){return new Promise(Ue=>{if(!Ae){Ue(xe);return}const et=xe.indexOf(" ")!==-1,Ze=xe.indexOf("(")!==-1||xe.indexOf(")")!==-1,Fe=l.basename(Ae,".exe"),Qe=Fe==="pwsh"||Le==="pwsh"||Fe==="powershell"||Le==="powershell";if(Qe&&(et||xe.indexOf("'")!==-1)){Ue(`& '${xe.replace(/'/g,"''")}'`);return}if(Ze&&Qe){Ue(`& '${xe}'`);return}if(Ve===1){if(Me!==void 0)Ue(Me==="gitbash"?xe.replace(/\\/g,"/"):Me==="wsl"?We?.getWslPath(xe)||xe:et?'"'+xe+'"':xe);else{const qe=Ae.toLowerCase();qe.indexOf("wsl")!==-1||qe.indexOf("bash.exe")!==-1&&qe.toLowerCase().indexOf("git")===-1?Ue(We?.getWslPath(xe)||xe):Ue(et?'"'+xe+'"':xe)}return}Ue((0,B.escapeNonWindowsPath)(xe))})}}),define(ne[2780],re([1,0,15,11,110,6,2,14,8,7,759,475,105,440,176,865,50,40,109]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalProfileService=void 0;let p=class{constructor(h,g,d,m,b,E,y){this._contextKeyService=h,this._configurationService=g,this._terminalContributionService=d,this._extensionService=m,this._remoteAgentService=b,this._environmentService=E,this._terminalInstanceService=y,this._contributedProfiles=[],this._platformConfigJustRefreshed=!1,this._profileProviders=new Map,this._onDidChangeAvailableProfiles=new A.Emitter,this._extensionService.onDidChangeExtensions(()=>this.refreshAvailableProfiles()),this._webExtensionContributedProfileContextKey=i.TerminalContextKeys.webExtensionContributedProfile.bindTo(this._contextKeyService),this._updateWebContextKey(),this._profilesReadyBarrier=new f.AutoOpenBarrier(5e3),this.refreshAvailableProfiles(),this._setupConfigListener()}get onDidChangeAvailableProfiles(){return this._onDidChangeAvailableProfiles.event}get profilesReady(){return this._profilesReadyBarrier.wait().then(()=>{})}get availableProfiles(){return this._platformConfigJustRefreshed||this.refreshAvailableProfiles(),this._availableProfiles||[]}get contributedProfiles(){return this._contributedProfiles||[]}async _setupConfigListener(){const h=await this.getPlatformKey();this._configurationService.onDidChangeConfiguration(async g=>{(g.affectsConfiguration("terminal.integrated.defaultProfile."+h)||g.affectsConfiguration("terminal.integrated.profiles."+h)||g.affectsConfiguration("terminal.integrated.useWslProfiles"))&&(g.source!==6?(this.refreshAvailableProfiles(),this._platformConfigJustRefreshed=!1):this._platformConfigJustRefreshed=!0)})}getDefaultProfileName(){return this._defaultProfileName}refreshAvailableProfiles(){this._refreshAvailableProfilesNow()}async _refreshAvailableProfilesNow(){const h=await this._detectProfiles(!0),g=!(0,t.equals)(h,this._availableProfiles,u),d=await this._updateContributedProfiles();(g||d)&&(this._availableProfiles=h,this._onDidChangeAvailableProfiles.fire(this._availableProfiles),this._profilesReadyBarrier.open(),this._updateWebContextKey(),await this._refreshPlatformConfig(this._availableProfiles))}async _updateContributedProfiles(){const h=await this.getPlatformKey(),g=[],d=this._configurationService.getValue("terminal.integrated.profiles."+h);for(const[E,y]of Object.entries(d))y===null&&g.push(E);const m=Array.from(this._terminalContributionService.terminalProfiles.filter(E=>!g.includes(E.title))),b=!(0,t.equals)(m,this._contributedProfiles,a);return this._contributedProfiles=m,b}getContributedProfileProvider(h,g){return this._profileProviders.get(h)?.get(g)}async _detectProfiles(h){const g=this._terminalInstanceService.getBackend(this._environmentService.remoteAuthority);if(!g)return this._availableProfiles||[];const d=await this.getPlatformKey();return this._defaultProfileName=this._configurationService.getValue(`terminal.integrated.defaultProfile.${d}`)??void 0,g.getProfiles(this._configurationService.getValue(`terminal.integrated.profiles.${d}`),this._defaultProfileName,h)}_updateWebContextKey(){this._webExtensionContributedProfileContextKey.set(D.isWeb&&this._contributedProfiles.length>0)}async _refreshPlatformConfig(h){const g=await this._remoteAgentService.getEnvironment();(0,v.registerTerminalDefaultProfileConfiguration)({os:g?.os||D.OS,profiles:h},this._contributedProfiles),(0,c.refreshTerminalActions)(h)}async getPlatformKey(){const h=await this._remoteAgentService.getEnvironment();return h?h.os===1?"windows":h.os===2?"osx":"linux":D.isWindows?"windows":D.isMacintosh?"osx":"linux"}registerTerminalProfileProvider(h,g,d){let m=this._profileProviders.get(h);return m||(m=new Map,this._profileProviders.set(h,m)),m.set(g,d),(0,k.toDisposable)(()=>this._profileProviders.delete(g))}async registerContributedProfile(h){const g=await this.getPlatformKey(),d=await this._configurationService.getValue(`terminal.integrated.profiles.${g}`);if(typeof d=="object"){const m={extensionIdentifier:h.extensionIdentifier,icon:h.options.icon,id:h.id,title:h.title,color:h.options.color};d[h.title]=m}await this._configurationService.updateValue(`terminal.integrated.profiles.${g}`,d,1)}async getContributedDefaultProfile(h){if(h&&!h.extHostTerminalId&&!("executable"in h)){const g=await this.getPlatformKey(),d=this._configurationService.getValue(`terminal.integrated.defaultProfile.${g}`);return this.contributedProfiles.find(b=>b.title===d)}}};Ee([(0,_.throttle)(2e3)],p.prototype,"refreshAvailableProfiles",null),p=Ee([W(0,w.IContextKeyService),W(1,I.IConfigurationService),W(2,S.ITerminalContributionService),W(3,l.IExtensionService),W(4,r.IRemoteAgentService),W(5,s.IWorkbenchEnvironmentService),W(6,o.ITerminalInstanceService)],p),e.TerminalProfileService=p;function u(n,h){return n.profileName===h.profileName&&(0,C.terminalProfileArgsMatch)(n.args,h.args)&&n.color===h.color&&(0,C.terminalIconsEqual)(n.icon,h.icon)&&n.isAutoDetected===h.isAutoDetected&&n.isDefault===h.isDefault&&n.overrideName===h.overrideName&&n.path===h.path}function a(n,h){return n.extensionIdentifier===h.extensionIdentifier&&n.color===h.color&&n.icon===h.icon&&n.id===h.id&&n.title===h.title}}),define(ne[2781],re([1,0,71,8,7,38,12,105,1772,10,5,78,16,73,188,33,36,117,2218,178,252,219,81,2,170,11,305,9,292,37,183,150,68,156,239,76,176,418,819]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalTabList=e.TerminalTabsListSizes=void 0;const P=w.$;var V;(function(G){G[G.TabHeight=22]="TabHeight",G[G.NarrowViewWidth=46]="NarrowViewWidth",G[G.WideViewMinimumWidth=80]="WideViewMinimumWidth",G[G.DefaultWidth=120]="DefaultWidth",G[G.MidpointViewWidth=63]="MidpointViewWidth",G[G.ActionbarMinimumWidth=105]="ActionbarMinimumWidth",G[G.MaximumWidth=500]="MaximumWidth"})(V=e.TerminalTabsListSizes||(e.TerminalTabsListSizes={}));let z=class extends t.WorkbenchList{constructor(q,Z,j,X,Y,$,J,ee,te,se,ie,ce){super("TerminalTabsList",q,{getHeight:()=>22,getTemplateId:()=>"terminal.tabs"},[te.createInstance(U,q,te.createInstance(p.ResourceLabels,p.DEFAULT_LABELS_CONTAINER),()=>this.getSelectedElements())],{horizontalScrolling:!1,supportDynamicHeights:!1,selectionNavigation:!0,identityProvider:{getId:ae=>ae?.instanceId},accessibilityProvider:te.createInstance(H),smoothScrolling:Y.getValue("workbench.list.smoothScrolling"),multipleSelectionSupport:!0,additionalScrollHeight:22,dnd:te.createInstance(K),openOnSingleClick:!0},Z,j,X,Y,$);this._configurationService=Y,this._terminalService=J,this._terminalGroupService=ee,this._themeService=ie;const le=[this._terminalGroupService.onDidChangeInstances(()=>this.refresh()),this._terminalGroupService.onDidChangeGroups(()=>this.refresh()),this._terminalGroupService.onDidShow(()=>this.refresh()),this._terminalGroupService.onDidChangeInstanceCapability(()=>this.refresh()),this._terminalService.onDidChangeInstanceTitle(()=>this.refresh()),this._terminalService.onDidChangeInstanceIcon(()=>this.refresh()),this._terminalService.onDidChangeInstancePrimaryStatus(()=>this.refresh()),this._terminalService.onDidChangeConnectionState(()=>this.refresh()),this._themeService.onDidColorThemeChange(()=>this.refresh()),this._terminalGroupService.onDidChangeActiveInstance(ae=>{if(ae){const ue=this._terminalGroupService.instances.indexOf(ae);this.setSelection([ue]),this.reveal(ue)}this.refresh()})];ce.onWillShutdown(ae=>{(0,h.dispose)(le)}),this.onMouseDblClick(async ae=>{if(this.getFocus().length===0){const oe=await this._terminalService.createTerminal({location:i.TerminalLocation.Panel});this._terminalGroupService.setActiveInstance(oe),await oe.focusWhenReady()}this._getFocusMode()==="doubleClick"&&this.getFocus().length===1&&ae.element?.focus(!0)}),this.onMouseClick(async ae=>{ae.browserEvent.altKey&&ae.element?await this._terminalService.createTerminal({location:{parentTerminal:ae.element}}):this._getFocusMode()==="singleClick"&&this.getSelection().length<=1&&ae.element?.focus(!0)}),this.onContextMenu(ae=>{if(!ae.element){this.setSelection([]);return}const ue=this.getSelectedElements();(!ue||!ue.find(oe=>ae.element===oe))&&this.setFocus(ae.index!==void 0?[ae.index]:[])}),this._terminalTabsSingleSelectedContextKey=M.TerminalContextKeys.tabsSingularSelection.bindTo(Z),this._isSplitContextKey=M.TerminalContextKeys.splitTerminal.bindTo(Z),this.onDidChangeSelection(ae=>this._updateContextKey()),this.onDidChangeFocus(()=>this._updateContextKey()),this.onDidOpen(async ae=>{const ue=ae.element;!ue||(this._terminalGroupService.setActiveInstance(ue),ae.editorOptions.preserveFocus||await ue.focusWhenReady())}),this._decorationsProvider||(this._decorationsProvider=te.createInstance(r.TerminalDecorationsProvider),se.registerDecorationsProvider(this._decorationsProvider)),this.refresh()}_getFocusMode(){return this._configurationService.getValue("terminal.integrated.tabs.focusMode")}refresh(q=!0){q&&this._terminalService.isEditable(void 0)&&this.domFocus(),this.splice(0,this.length,this._terminalGroupService.instances.slice())}_updateContextKey(){this._terminalTabsSingleSelectedContextKey.set(this.getSelectedElements().length===1);const q=this.getFocusedElements();this._isSplitContextKey.set(q.length>0&&this._terminalGroupService.instanceIsSplit(q[0]))}};z=Ee([W(1,_.IContextKeyService),W(2,t.IListService),W(3,k.IThemeService),W(4,f.IConfigurationService),W(5,A.IKeybindingService),W(6,D.ITerminalService),W(7,D.ITerminalGroupService),W(8,v.IInstantiationService),W(9,u.IDecorationsService),W(10,k.IThemeService),W(11,L.ILifecycleService)],z),e.TerminalTabList=z;let U=class{constructor(q,Z,j,X,Y,$,J,ee,te,se,ie,ce){this._container=q,this._labels=Z,this._getSelection=j,this._instantiationService=X,this._terminalService=Y,this._terminalGroupService=$,this._hoverService=J,this._configurationService=ee,this._keybindingService=te,this._listService=se,this._themeService=ie,this._contextViewService=ce,this.templateId="terminal.tabs"}renderTemplate(q){const Z=w.append(q,P(".terminal-tabs-entry")),j={},X=this._labels.create(Z,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0,hoverDelegate:{delay:this._configurationService.getValue("workbench.hover.delay"),showHover:J=>this._hoverService.showHover({...J,actions:j.hoverActions,hideOnHover:!0})}}),Y=w.append(X.element,P(".actions")),$=new C.ActionBar(Y,{actionViewItemProvider:J=>J instanceof o.MenuItemAction?this._instantiationService.createInstance(c.MenuEntryActionViewItem,J,void 0):void 0});return{element:Z,label:X,actionBar:$,context:j}}shouldHideText(){return this._container?this._container.clientWidth<63:!1}shouldHideActionBar(){return this._container?this._container.clientWidth<=105:!1}renderElement(q,Z,j){const X=!this.shouldHideText(),Y=this._terminalGroupService.getGroupForInstance(q);if(!Y)throw new Error(`Could not find group for instance "${q.instanceId}"`);j.element.classList.toggle("has-text",X),j.element.classList.toggle("is-active",this._terminalGroupService.activeInstance===q);let $="";if(Y.terminalInstances.length>1){const fe=Y.terminalInstances.indexOf(q);fe===0?$="\u250C ":fe===Y.terminalInstances.length-1?$="\u2514 ":$="\u251C "}let J="";const ee=q.statusList.statuses;j.context.hoverActions=[];for(const fe of ee)J+=` --- ${fe.icon?`$(${fe.icon?.id}) `:""}${fe.tooltip||fe.id}`,fe.hoverActions&&j.context.hoverActions.push(...fe.hoverActions);const te=(0,B.getShellIntegrationTooltip)(q,!0),se=(0,E.getIconId)(q),ie=!this.shouldHideActionBar();let ce="";if(X)this.fillActionBar(q,j),ce=$,q.icon&&(ce+=`$(${se}) ${q.title}`);else{const fe=q.statusList.primary;fe&&fe.severity>n.default.Ignore?ce=`${$}$(${fe.icon?.id||se})`:ce=`${$}$(${se})`}ie||j.actionBar.clear(),j.elementDisposables||(j.elementDisposables=new h.DisposableStore),j.elementDisposables.add(w.addDisposableListener(j.element,w.EventType.AUXCLICK,fe=>{fe.stopImmediatePropagation(),fe.button===1&&this._terminalService.safeDisposeTerminal(q)}));const le=[],ae=(0,E.getColorClass)(q);ae&&le.push(ae);const ue=(0,E.getUriClasses)(q,this._themeService.getColorTheme().type);ue&&le.push(...ue),j.label.setResource({resource:q.resource,name:ce,description:X?q.description:void 0},{fileDecorations:{colors:!0,badges:X},title:{markdown:new l.MarkdownString(q.title+te+J,{supportThemeIcons:!0}),markdownNotSupportedFallback:void 0},extraClasses:le});const oe=this._terminalService.getEditableData(q);j.label.element.classList.toggle("editable-tab",!!oe),oe&&(j.elementDisposables.add(this._renderInputBox(j.label.element.querySelector(".monaco-icon-label-container"),q,oe)),j.actionBar.clear())}_renderInputBox(q,Z,j){const X=Z.title||"",Y=new T.InputBox(q,this._contextViewService,{validationOptions:{validation:se=>{const ie=j.validationMessage(se);return!ie||ie.severity!==n.default.Error?null:{content:ie.content,formatContent:!0,type:3}}},ariaLabel:(0,I.localize)(0,null)}),$=(0,O.attachInputBoxStyler)(Y,this._themeService);Y.element.style.height="22px",Y.value=X,Y.focus(),Y.select({start:0,end:X.length});const J=(0,R.once)((se,ie)=>{Y.element.style.display="none";const ce=Y.value;(0,h.dispose)(te),Y.element.remove(),ie&&j.onFinish(ce,se)}),ee=()=>{if(Y.isInputValid()){const se=j.validationMessage(Y.value);se?Y.showMessage({content:se.content,formatContent:!0,type:se.severity===n.default.Info?1:se.severity===n.default.Warning?2:3}):Y.hideMessage()}};ee();const te=[Y,w.addStandardDisposableListener(Y.inputElement,w.EventType.KEY_DOWN,se=>{se.stopPropagation(),se.equals(3)?J(Y.isInputValid(),!0):se.equals(9)&&J(!1,!0)}),w.addStandardDisposableListener(Y.inputElement,w.EventType.KEY_UP,se=>{ee()}),w.addDisposableListener(Y.inputElement,w.EventType.BLUR,()=>{J(Y.isInputValid(),!0)}),$];return(0,h.toDisposable)(()=>{J(!1,!1)})}disposeElement(q,Z,j){j.elementDisposables?.dispose(),j.elementDisposables=void 0}disposeTemplate(q){q.elementDisposables?.dispose(),q.elementDisposables=void 0,q.label.dispose()}fillActionBar(q,Z){const j=[new s.Action("workbench.action.terminal.splitInstance",F.terminalStrings.split.short,k.ThemeIcon.asClassName(S.Codicon.splitHorizontal),!0,async()=>{this._runForSelectionOrInstance(q,async X=>{this._terminalService.createTerminal({location:{parentTerminal:X}})})}),new s.Action("workbench.action.terminal.killInstance",F.terminalStrings.kill.short,k.ThemeIcon.asClassName(S.Codicon.trashcan),!0,async()=>{this._runForSelectionOrInstance(q,X=>this._terminalService.safeDisposeTerminal(X))})];Z.actionBar.clear();for(const X of j)Z.actionBar.push(X,{icon:!0,label:!1,keybinding:this._keybindingService.lookupKeybinding(X.id)?.getLabel()})}_runForSelectionOrInstance(q,Z){const j=this._getSelection();if(j.includes(q))for(const X of j)X&&Z(X);else Z(q);this._terminalGroupService.focusTabs(),this._listService.lastFocusedList?.focusNext()}};U=Ee([W(3,v.IInstantiationService),W(4,D.ITerminalService),W(5,D.ITerminalGroupService),W(6,a.IHoverService),W(7,f.IConfigurationService),W(8,A.IKeybindingService),W(9,t.IListService),W(10,k.IThemeService),W(11,y.IContextViewService)],U);let H=class{constructor(q){this._terminalGroupService=q}getWidgetAriaLabel(){return(0,I.localize)(1,null)}getAriaLabel(q){let Z="";const j=this._terminalGroupService.getGroupForInstance(q);if(j&&j.terminalInstances?.length>1){const X=j.terminalInstances.indexOf(q);Z=(0,I.localize)(2,null,q.instanceId,q.title,X+1,j.terminalInstances.length)}else Z=(0,I.localize)(3,null,q.instanceId,q.title);return Z}};H=Ee([W(0,D.ITerminalGroupService)],H);let K=class{constructor(q,Z){this._terminalService=q,this._terminalGroupService=Z,this._autoFocusDisposable=h.Disposable.None,this._primaryBackend=this._terminalService.getPrimaryBackend()}getDragURI(q){return q.resource.toString()}getDragLabel(q,Z){return q.length===1?q[0].title:void 0}onDragLeave(){this._autoFocusInstance=void 0,this._autoFocusDisposable.dispose(),this._autoFocusDisposable=h.Disposable.None}onDragStart(q,Z){if(!Z.dataTransfer)return;const j=q.getData();if(!Array.isArray(j))return;const X=j.filter(Y=>"instanceId"in Y);X.length>0&&Z.dataTransfer.setData(g.DataTransfers.TERMINALS,JSON.stringify(X.map(Y=>Y.resource.toString())))}onDragOver(q,Z,j,X){if(q instanceof m.NativeDragAndDropData&&!(0,x.containsDragType)(X,g.DataTransfers.FILES,g.DataTransfers.RESOURCES,g.DataTransfers.TERMINALS,x.CodeDataTransfers.FILES))return!1;const Y=this._autoFocusInstance!==Z;return Y&&(this._autoFocusDisposable.dispose(),this._autoFocusInstance=Z),!Z&&!(0,x.containsDragType)(X,g.DataTransfers.TERMINALS)?q instanceof m.ElementsDragAndDropData:(Y&&Z&&(this._autoFocusDisposable=(0,d.disposableTimeout)(()=>{this._terminalService.setActiveInstance(Z),this._autoFocusInstance=void 0},500)),{feedback:j?[j]:void 0,accept:!0,effect:1})}async drop(q,Z,j,X){this._autoFocusDisposable.dispose(),this._autoFocusInstance=void 0;let Y,$=[];const J=(0,N.getTerminalResourcesFromDragEvent)(X);if(J)for(const te of J){const se=this._terminalService.getInstanceFromResource(te);if(se)Y=[se],this._terminalService.moveToTerminalView(se);else if(this._primaryBackend){const ie=(0,N.parseTerminalUri)(te);ie.instanceId&&$.push(this._primaryBackend.requestDetachInstance(ie.workspaceId,ie.instanceId))}}if($.length){let te=await Promise.all($);te=te.filter(ie=>ie!==void 0);let se;for(const ie of te)se=await this._terminalService.createTerminal({config:{attachPersistentProcess:ie}});se&&this._terminalService.setActiveInstance(se);return}if(Y===void 0){if(!(q instanceof m.ElementsDragAndDropData)){this._handleExternalDrop(Z,X);return}const te=q.getData();if(!te||!Array.isArray(te))return;Y=[];for(const se of te)"instanceId"in se&&Y.push(se)}if(!Z){this._terminalGroupService.moveGroupToEnd(Y[0]);return}let ee=!1;for(const te of Y)this._terminalGroupService.moveGroup(te,Z),ee||(this._terminalService.setActiveInstance(te),ee=!0)}async _handleExternalDrop(q,Z){if(!q||!Z.dataTransfer)return;let j;const X=Z.dataTransfer.getData(g.DataTransfers.RESOURCES);X&&(j=b.URI.parse(JSON.parse(X)[0]).fsPath);const Y=Z.dataTransfer.getData(x.CodeDataTransfers.FILES);!j&&Y&&(j=b.URI.file(JSON.parse(Y)[0]).fsPath),!j&&Z.dataTransfer.files.length>0&&Z.dataTransfer.files[0].path&&(j=b.URI.file(Z.dataTransfer.files[0].path).fsPath),!!j&&(this._terminalService.setActiveInstance(q),q.focus(),await q.sendPath(j,!1))}};K=Ee([W(0,D.ITerminalService),W(1,D.ITerminalGroupService)],K)}),define(ne[2782],re([1,0,209,2,8,5,105,821,2781,12,14,10,223,26,36,16,7,37,24,1771,817,176]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalTabbedView=void 0;const n=C.$;var h;(function(m){m.ViewIsVertical="terminal-side-view",m.FindFocus="find-focused"})(h||(h={}));var g;(function(m){m[m.StatusIcon=30]="StatusIcon",m[m.SplitAnnotation=30]="SplitAnnotation"})(g||(g={}));let d=class extends f.Disposable{constructor(b,E,y,T,R,O,x,F,L,M,N){super();this._terminalService=E,this._terminalGroupService=y,this._instantiationService=T,this._notificationService=R,this._contextMenuService=O,this._themeService=x,this._configurationService=F,this._storageService=M,this._cancelContextMenu=!1,this._parentElement=b,this._tabContainer=n(".tabs-container");const B=n(".tabs-list-container");this._tabListElement=n(".tabs-list"),B.appendChild(this._tabListElement),this._tabContainer.appendChild(B),this._instanceMenu=this._register(L.createMenu(S.MenuId.TerminalInstanceContext,N)),this._tabsListMenu=this._register(L.createMenu(S.MenuId.TerminalTabContext,N)),this._tabsListEmptyMenu=this._register(L.createMenu(S.MenuId.TerminalTabEmptyAreaContext,N)),this._tabList=this._register(this._instantiationService.createInstance(I.TerminalTabList,this._tabListElement));const P=n(".terminal-outer-container");this._terminalContainer=n(".terminal-groups-container"),P.appendChild(this._terminalContainer),this._findWidget=this._register(this._instantiationService.createInstance(D.TerminalFindWidget,this._terminalGroupService.getFindState())),P.appendChild(this._findWidget.getDomNode()),this._terminalService.setContainers(b,this._terminalContainer),this._terminalIsTabsNarrowContextKey=a.TerminalContextKeys.tabsNarrow.bindTo(N),this._terminalTabsFocusContextKey=a.TerminalContextKeys.tabsFocus.bindTo(N),this._terminalTabsMouseContextKey=a.TerminalContextKeys.tabsMouse.bindTo(N),this._tabTreeIndex=this._terminalService.configHelper.config.tabs.location==="left"?0:1,this._terminalContainerIndex=this._terminalService.configHelper.config.tabs.location==="left"?1:0,F.onDidChangeConfiguration(V=>{V.affectsConfiguration("terminal.integrated.tabs.enabled")||V.affectsConfiguration("terminal.integrated.tabs.hideCondition")?this._refreshShowTabs():V.affectsConfiguration("terminal.integrated.tabs.location")&&(this._tabTreeIndex=this._terminalService.configHelper.config.tabs.location==="left"?0:1,this._terminalContainerIndex=this._terminalService.configHelper.config.tabs.location==="left"?1:0,this._shouldShowTabs()&&(this._splitView.swapViews(0,1),this._removeSashListener(),this._addSashListener(),this._splitView.resizeView(this._tabTreeIndex,this._getLastListWidth())))}),this._register(this._terminalGroupService.onDidChangeInstances(()=>this._refreshShowTabs())),this._register(this._terminalGroupService.onDidChangeGroups(()=>this._refreshShowTabs())),this._register(this._themeService.onDidColorThemeChange(V=>this._updateTheme(V))),this._updateTheme(),this._findWidget.focusTracker.onDidFocus(()=>this._terminalContainer.classList.add("find-focused")),this._findWidget.focusTracker.onDidBlur(()=>this._terminalContainer.classList.remove("find-focused")),this._attachEventListeners(b,this._terminalContainer),this._terminalGroupService.onDidChangePanelOrientation(V=>{this._panelOrientation=V,this._panelOrientation===0?this._terminalContainer.classList.add("terminal-side-view"):this._terminalContainer.classList.remove("terminal-side-view")}),this._splitView=new t.SplitView(b,{orientation:1,proportionalLayout:!1}),this._setupSplitView(P)}_shouldShowTabs(){const b=this._terminalService.configHelper.config.tabs.enabled,E=this._terminalService.configHelper.config.tabs.hideCondition;return b?E==="never"||E==="singleTerminal"&&this._terminalGroupService.instances.length>1||E==="singleGroup"&&this._terminalGroupService.groups.length>1:!1}_refreshShowTabs(){this._shouldShowTabs()?this._splitView.length===1&&(this._addTabTree(),this._addSashListener(),this._splitView.resizeView(this._tabTreeIndex,this._getLastListWidth()),this.rerenderTabs()):this._splitView.length===2&&!this._terminalTabsMouseContextKey.get()&&(this._splitView.removeView(this._tabTreeIndex),this._plusButton&&this._tabContainer.removeChild(this._plusButton),this._removeSashListener())}_getLastListWidth(){const b=this._panelOrientation===0?"tabs-list-width-vertical":"tabs-list-width-horizontal",E=this._storageService.get(b,0);return!E||!parseInt(E)?this._panelOrientation===0?46:120:parseInt(E)}_handleOnDidSashReset(){let b=80;const E=document.createElement("canvas");E.width=1,E.height=1;const y=E.getContext("2d");if(y){const R=window.getComputedStyle(this._tabListElement);y.font=`${R.fontStyle} ${R.fontSize} ${R.fontFamily}`;const O=this._terminalGroupService.instances.reduce((x,F)=>Math.max(x,y.measureText(F.title+(F.description||"")).width+this._getAdditionalWidth(F)),0);b=Math.ceil(Math.max(O,80))}Math.ceil(this._splitView.getViewSize(this._tabTreeIndex))===b&&(b=46),this._splitView.resizeView(this._tabTreeIndex,b),this._updateListWidth(b)}_getAdditionalWidth(b){const E=40,y=b.statusList.statuses.length>0?30:0,T=(this._terminalGroupService.getGroupForInstance(b)?.terminalInstances.length||0)>1?30:0;return E+T+y}_handleOnDidSashChange(){const b=this._splitView.getViewSize(this._tabTreeIndex);!this._width||b<=0||this._updateListWidth(b)}_updateListWidth(b){b<63&&b>=46?(b=46,this._splitView.resizeView(this._tabTreeIndex,b)):b>=63&&b<80&&(b=80,this._splitView.resizeView(this._tabTreeIndex,b)),this.rerenderTabs();const E=this._panelOrientation===0?"tabs-list-width-vertical":"tabs-list-width-horizontal";this._storageService.store(E,b,0,0)}_setupSplitView(b){this._register(this._splitView.onDidSashReset(()=>this._handleOnDidSashReset())),this._register(this._splitView.onDidSashChange(()=>this._handleOnDidSashChange())),this._shouldShowTabs()&&this._addTabTree(),this._splitView.addView({element:b,layout:E=>this._terminalGroupService.groups.forEach(y=>y.layout(E,this._height||0)),minimumSize:120,maximumSize:Number.POSITIVE_INFINITY,onDidChange:()=>f.Disposable.None,priority:2},t.Sizing.Distribute,this._terminalContainerIndex),this._shouldShowTabs()&&this._addSashListener()}_addTabTree(){this._splitView.addView({element:this._tabContainer,layout:b=>this._tabList.layout(this._height||0,b),minimumSize:46,maximumSize:500,onDidChange:()=>f.Disposable.None,priority:1},t.Sizing.Distribute,this._tabTreeIndex),this.rerenderTabs()}rerenderTabs(){this._updateHasText(),this._tabList.refresh()}_addSashListener(){let b;this._sashDisposables=[this._splitView.sashes[0].onDidStart(E=>{b=window.setInterval(()=>{this.rerenderTabs()},100)}),this._splitView.sashes[0].onDidEnd(E=>{window.clearInterval(b),b=0})]}_removeSashListener(){this._sashDisposables&&((0,f.dispose)(this._sashDisposables),this._sashDisposables=void 0)}_updateHasText(){const b=this._tabListElement.clientWidth>63;this._tabContainer.classList.toggle("has-text",b),this._terminalIsTabsNarrowContextKey.set(!b)}layout(b,E){this._height=E,this._width=b,this._splitView.layout(b),this._shouldShowTabs()&&this._splitView.resizeView(this._tabTreeIndex,this._getLastListWidth()),this._updateHasText()}_updateTheme(b){b||(b=this._themeService.getColorTheme()),this._findWidget?.updateTheme(b)}_attachEventListeners(b,E){this._register(C.addDisposableListener(this._tabContainer,"mouseleave",async y=>{this._terminalTabsMouseContextKey.set(!1),this._refreshShowTabs(),y.stopPropagation()})),this._register(C.addDisposableListener(this._tabContainer,"mouseenter",async y=>{this._terminalTabsMouseContextKey.set(!0),y.stopPropagation()})),this._register(C.addDisposableListener(E,"mousedown",async y=>{const T=this._terminalGroupService.activeInstance;if(this._terminalGroupService.instances.length===0||!T){this._cancelContextMenu=!0;return}if(y.which===2&&v.isLinux)T.focus();else if(y.which===3){const R=this._terminalService.configHelper.config.rightClickBehavior;if(R==="nothing"){y.shiftKey||(this._cancelContextMenu=!0);return}else if(R==="copyPaste"||R==="paste"){if(R==="copyPaste"&&y.shiftKey){(0,u.openContextMenu)(y,this._parentElement,this._instanceMenu,this._contextMenuService);return}R==="copyPaste"&&T.hasSelection()?(await T.copySelection(),T.clearSelection()):o.BrowserFeatures.clipboard.readText?T.paste():this._notificationService.info(`This browser doesn't support the clipboard.readText API needed to trigger a paste, try ${v.isMacintosh?"\u2318":"Ctrl"}+V instead.`),v.isMacintosh&&setTimeout(()=>{T.clearSelection()},0),this._cancelContextMenu=!0}}})),this._register(C.addDisposableListener(E,"contextmenu",y=>{this._terminalService.configHelper.config.rightClickBehavior==="nothing"&&!y.shiftKey&&(this._cancelContextMenu=!0),this._cancelContextMenu||(0,u.openContextMenu)(y,this._parentElement,this._instanceMenu,this._contextMenuService),y.preventDefault(),y.stopImmediatePropagation(),this._cancelContextMenu=!1})),this._register(C.addDisposableListener(this._tabContainer,"contextmenu",y=>{if(this._terminalService.configHelper.config.rightClickBehavior==="nothing"&&!y.shiftKey&&(this._cancelContextMenu=!0),!this._cancelContextMenu){const R=this._tabList.getFocus().length===0;(0,u.openContextMenu)(y,this._parentElement,R?this._tabsListEmptyMenu:this._tabsListMenu,this._contextMenuService,R?this._getTabActions():void 0)}y.preventDefault(),y.stopImmediatePropagation(),this._cancelContextMenu=!1})),this._register(C.addDisposableListener(document,"keydown",y=>{E.classList.toggle("alt-active",!!y.altKey)})),this._register(C.addDisposableListener(document,"keyup",y=>{E.classList.toggle("alt-active",!!y.altKey)})),this._register(C.addDisposableListener(b,"keyup",y=>{y.keyCode===27&&y.stopPropagation()})),this._register(C.addDisposableListener(this._tabContainer,C.EventType.FOCUS_IN,()=>{this._terminalTabsFocusContextKey.set(!0)})),this._register(C.addDisposableListener(this._tabContainer,C.EventType.FOCUS_OUT,()=>{this._terminalTabsFocusContextKey.set(!1)}))}_getTabActions(){return[new i.Separator,this._configurationService.inspect("terminal.integrated.tabs.location").userValue==="left"?new i.Action("moveRight",(0,p.localize)(0,null),void 0,void 0,async()=>{this._configurationService.updateValue("terminal.integrated.tabs.location","right")}):new i.Action("moveLeft",(0,p.localize)(1,null),void 0,void 0,async()=>{this._configurationService.updateValue("terminal.integrated.tabs.location","left")}),new i.Action("hideTabs",(0,p.localize)(2,null),void 0,void 0,async()=>{this._configurationService.updateValue("terminal.integrated.tabs.enabled",!1)})]}setEditable(b){b||this._tabList.domFocus(),this._tabList.refresh(!1)}focusTabs(){if(!this._shouldShowTabs())return;this._terminalTabsFocusContextKey.set(!0);const b=this._tabList.getSelection();this._tabList.domFocus(),b&&this._tabList.setFocus(b)}focusFindWidget(){const b=this._terminalGroupService.activeInstance;b&&b.hasSelection()&&b.selection.indexOf(` `)===-1?this._findWidget.reveal(b.selection):this._findWidget.reveal()}hideFindWidget(){this.focus(),this._findWidget.hide()}showFindWidget(){const b=this._terminalGroupService.activeInstance;b&&b.hasSelection()&&b.selection.indexOf(` `)===-1?this._findWidget.show(b.selection):this._findWidget.show()}getFindWidget(){return this._findWidget}focus(){if(this._terminalService.connectionState===0){const b=document.activeElement;this._register(this._terminalService.onDidChangeConnectionState(()=>{document.activeElement===b&&this._focus()}));return}this._focus()}_focus(){this._terminalGroupService.activeInstance?.focusWhenReady()}};d=Ee([W(1,k.ITerminalService),W(2,k.ITerminalGroupService),W(3,A.IInstantiationService),W(4,c.INotificationService),W(5,l.IContextMenuService),W(6,w.IThemeService),W(7,_.IConfigurationService),W(8,S.IMenuService),W(9,r.IStorageService),W(10,s.IContextKeyService)],d),e.TerminalTabbedView=d}),define(ne[947],re([1,0,1774,10,8,37,5,27,12,440,326,26,105,131,38,7,43,41,82,16,120,188,134,68,32,2782,33,28,181,591,73,473,2,9,127,292,239,13,170,607,176,819]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalViewPane=void 0;let U=class extends c.ViewPane{constructor($,J,ee,te,se,ie,ce,le,ae,ue,oe,fe,pe,me,be,Ce,ve,he){super($,J,ie,se,ee,te,ce,me,ue,oe);this._contextKeyService=ee,this._contextMenuService=ie,this._instantiationService=ce,this._terminalService=le,this._terminalGroupService=ae,this._notificationService=fe,this._keybindingService=pe,this._menuService=be,this._commandService=Ce,this._terminalProfileService=ve,this._terminalProfileResolverService=he,this._terminalsInitialized=!1,this._isWelcomeShowing=!1,this._register(this._terminalService.onDidRegisterProcessSupport(()=>{if(this._actions)for(const ge of this._actions)ge.enabled=!0;this._onDidChangeViewWelcomeState.fire()})),this._register(this._terminalService.onDidChangeInstances(()=>{!this._isWelcomeShowing||(this._isWelcomeShowing=!0,this._onDidChangeViewWelcomeState.fire(),!this._terminalTabbedView&&this._parentDomElement&&(this._createTabsView(),this.layoutBody(this._parentDomElement.offsetHeight,this._parentDomElement.offsetWidth)))})),this._dropdownMenu=this._register(this._menuService.createMenu(p.MenuId.TerminalNewDropdownContext,this._contextKeyService)),this._singleTabMenu=this._register(this._menuService.createMenu(p.MenuId.TerminalInlineTabContext,this._contextKeyService)),this._register(this._terminalProfileService.onDidChangeAvailableProfiles(ge=>this._updateTabActionBar(ge))),this._viewShowing=V.TerminalContextKeys.viewShowing.bindTo(this._contextKeyService),this._register(this.onDidChangeBodyVisibility(ge=>{ge&&this._terminalTabbedView?.rerenderTabs()})),se.onDidChangeConfiguration(ge=>{ge.affectsConfiguration("terminal.integrated.shellIntegration.decorationsEnabled")&&!se.getValue("terminal.integrated.shellIntegration.decorationsEnabled")||ge.affectsConfiguration("terminal.integrated.shellIntegration.enabled")&&!se.getValue("terminal.integrated.shellIntegration.enabled")?this._parentDomElement?.classList.remove("shell-integration"):se.getValue("terminal.integrated.shellIntegration.decorationsEnabled")&&se.getValue("terminal.integrated.shellIntegration.enabled")&&this._parentDomElement?.classList.add("shell-integration")}),se.getValue("terminal.integrated.shellIntegration.decorationsEnabled")&&se.getValue("terminal.integrated.shellIntegration.enabled")&&this._parentDomElement?.classList.add("shell-integration")}get terminalTabbedView(){return this._terminalTabbedView}renderBody($){super.renderBody($),this._parentDomElement=$,this._parentDomElement.classList.add("integrated-terminal"),this._fontStyleElement=document.createElement("style"),this._instantiationService.createInstance(X,this._parentDomElement),this.shouldShowWelcome()||this._createTabsView(),this._parentDomElement.appendChild(this._fontStyleElement),this._register(this.configurationService.onDidChangeConfiguration(J=>{if((J.affectsConfiguration("terminal.integrated.fontFamily")||J.affectsConfiguration("editor.fontFamily"))&&!this._terminalService.configHelper.configFontIsMonospace()){const te=[{label:t.localize(0,null),run:()=>this.configurationService.updateValue("terminal.integrated.fontFamily","monospace")}];this._notificationService.prompt(C.Severity.Warning,t.localize(1,null),te)}})),this._register(this.onDidChangeBodyVisibility(J=>{if(this._viewShowing.set(J),J){const ee=!!this._terminalGroupService.groups.length;this._terminalService.isProcessSupportRegistered?this._terminalsInitialized?ee||this._terminalService.createTerminal({location:a.TerminalLocation.Panel}):(this._terminalsInitialized=!0,this._terminalService.initializeTerminals()):this._onDidChangeViewWelcomeState.fire(),this._terminalGroupService.showPanel(!1),ee&&this._terminalGroupService.activeGroup?.setVisible(J)}else this._terminalGroupService.activeGroup?.setVisible(!1)})),this.layoutBody(this._parentDomElement.offsetHeight,this._parentDomElement.offsetWidth)}_createTabsView(){!this._parentDomElement||(this._terminalTabbedView=this.instantiationService.createInstance(d.TerminalTabbedView,this._parentDomElement))}layoutBody($,J){super.layoutBody($,J),this._terminalTabbedView?.layout(J,$)}getActionViewItem($){switch($.id){case"workbench.action.terminal.split":{const J={id:$.id,checked:$.checked,class:$.class,enabled:$.enabled,label:$.label,dispose:$.dispose.bind($),tooltip:$.tooltip,run:async()=>{const ee=this._terminalGroupService.activeInstance;if(ee)return(await this._terminalService.createTerminal({location:{parentTerminal:ee}}))?.focusWhenReady()}};return new n.ActionViewItem($,J,{icon:!0,label:!1,keybinding:this._getKeybindingLabel($)})}case"workbench.action.terminal.switchTerminal":return this._instantiationService.createInstance(H,$);case"workbench.action.terminal.focus":{const J=[];return(0,T.createAndFillInContextMenuActions)(this._singleTabMenu,void 0,J),this._instantiationService.createInstance(G,$,J)}case"workbench.action.terminal.createProfileButton":{this._tabButtons&&this._tabButtons.dispose();const J=(0,P.getTerminalActionBarArgs)(a.TerminalLocation.Panel,this._terminalProfileService.availableProfiles,this._getDefaultProfileName(),this._terminalProfileService.contributedProfiles,this._instantiationService,this._terminalService,this._contextKeyService,this._commandService,this._dropdownMenu);return this._tabButtons=new R.DropdownWithPrimaryActionViewItem(J.primaryAction,J.dropdownAction,J.dropdownMenuActions,J.className,this._contextMenuService,{},this._keybindingService,this._notificationService,this._contextKeyService),this._updateTabActionBar(this._terminalProfileService.availableProfiles),this._tabButtons}}return super.getActionViewItem($)}_getDefaultProfileName(){let $;try{$=this._terminalProfileService.getDefaultProfileName()}catch{$=this._terminalProfileResolverService.defaultProfileName}return $}_getKeybindingLabel($){return(0,N.withNullAsUndefined)(this._keybindingService.lookupKeybinding($.id)?.getLabel())}_updateTabActionBar($){const J=(0,P.getTerminalActionBarArgs)(a.TerminalLocation.Panel,$,this._getDefaultProfileName(),this._terminalProfileService.contributedProfiles,this._instantiationService,this._terminalService,this._contextKeyService,this._commandService,this._dropdownMenu);this._tabButtons?.update(J.dropdownAction,J.dropdownMenuActions)}focus(){if(this._terminalService.connectionState===0){const $=document.activeElement;this._register(this._terminalService.onDidChangeConnectionState(()=>{document.activeElement===$&&this._terminalGroupService.showPanel(!0)}));return}this._terminalGroupService.showPanel(!0)}shouldShowWelcome(){return this._isWelcomeShowing=!this._terminalService.isProcessSupportRegistered&&this._terminalService.instances.length===0,this._isWelcomeShowing}};U=Ee([W(1,i.IKeybindingService),W(2,S.IContextKeyService),W(3,s.IViewDescriptorService),W(4,_.IConfigurationService),W(5,A.IContextMenuService),W(6,k.IInstantiationService),W(7,o.ITerminalService),W(8,o.ITerminalGroupService),W(9,I.IThemeService),W(10,D.ITelemetryService),W(11,C.INotificationService),W(12,i.IKeybindingService),W(13,l.IOpenerService),W(14,p.IMenuService),W(15,b.ICommandService),W(16,u.ITerminalProfileService),W(17,u.ITerminalProfileResolverService)],U),e.TerminalViewPane=U,(0,I.registerThemingParticipant)((Y,$)=>{const J=Y.getColor(v.TERMINAL_BACKGROUND_COLOR)||Y.getColor(r.PANEL_BACKGROUND);$.addRule(`.monaco-workbench .part.panel .pane-body.integrated-terminal .terminal-outer-container { background-color: ${J?J.toString():""}; }`);const ee=Y.getColor(v.TERMINAL_BACKGROUND_COLOR)||Y.getColor(r.SIDE_BAR_BACKGROUND);$.addRule(`.monaco-workbench .part.sidebar .pane-body.integrated-terminal .terminal-outer-container { background-color: ${ee?ee.toString():""}; }`),$.addRule(`.monaco-workbench .part.auxiliarybar .pane-body.integrated-terminal .terminal-outer-container { background-color: ${ee?ee.toString():""}; }`);const te=Y.getColor(v.TERMINAL_BORDER_COLOR);te&&($.addRule(`.monaco-workbench .pane-body.integrated-terminal .split-view-view:not(:first-child) { border-color: ${te.toString()}; }`),$.addRule(`.monaco-workbench .pane-body.integrated-terminal .tabs-container { border-color: ${te.toString()}; }`));const se=Y.getColor(v.TERMINAL_DRAG_AND_DROP_BACKGROUND)||Y.getColor(r.EDITOR_DRAG_AND_DROP_BACKGROUND);se&&$.addRule(`.monaco-workbench .pane-body.integrated-terminal .terminal-drop-overlay { background-color: ${se.toString()}; }`);const ie=Y.getColor(v.TERMINAL_TAB_ACTIVE_BORDER);ie&&$.addRule(`.monaco-workbench .pane-body.integrated-terminal .terminal-tabs-entry.is-active::before { background-color: ${ie.toString()}; }`)});let H=class extends n.SelectActionViewItem{constructor($,J,ee,te,se,ie){super(null,$,K(J,ee),ee.activeGroupIndex,se,{ariaLabel:t.localize(2,null),optionsAsChildren:!0});this._terminalService=J,this._terminalGroupService=ee,this._themeService=te,this._register(J.onDidChangeInstances(()=>this._updateItems(),this)),this._register(J.onDidChangeActiveGroup(()=>this._updateItems(),this)),this._register(J.onDidChangeActiveInstance(()=>this._updateItems(),this)),this._register(J.onDidChangeInstanceTitle(()=>this._updateItems(),this)),this._register(ee.onDidChangeGroups(()=>this._updateItems(),this)),this._register(J.onDidChangeConnectionState(()=>this._updateItems(),this)),this._register(ie.onDidChangeAvailableProfiles(()=>this._updateItems(),this)),this._register(J.onDidChangeInstancePrimaryStatus(()=>this._updateItems(),this)),this._register((0,h.attachSelectBoxStyler)(this.selectBox,this._themeService))}render($){super.render($),$.classList.add("switch-terminal"),this._register((0,h.attachStylerCallback)(this._themeService,{selectBorder:g.selectBorder},J=>{$.style.borderColor=J.selectBorder?`${J.selectBorder}`:""}))}_updateItems(){const $=K(this._terminalService,this._terminalGroupService);this.setOptions($,this._terminalGroupService.activeGroupIndex)}};H=Ee([W(1,o.ITerminalService),W(2,o.ITerminalGroupService),W(3,I.IThemeService),W(4,A.IContextViewService),W(5,u.ITerminalProfileService)],H);function K(Y,$){let J;return Y.connectionState===1?J=$.getGroupLabels().map(ee=>({text:ee})):J=[{text:t.localize(3,null)}],J.push({text:w.switchTerminalActionViewItemSeparator,isDisabled:!0}),J.push({text:w.switchTerminalShowTabsTitle}),J}let G=class extends T.MenuEntryActionViewItem{constructor($,J,ee,te,se,ie,ce,le,ae,ue){super(new p.MenuItemAction({id:$.id,title:q(ce.activeInstance,ie.configHelper.config.tabs.separator),tooltip:Z(ce.activeInstance,ie.configHelper.config.tabs.separator)},{id:"workbench.action.terminal.split",title:M.terminalStrings.split.value,icon:m.Codicon.splitHorizontal},void 0,se,ue),{draggable:!0},ee,te,se);this._actions=J,this._terminalService=ie,this._terminalGroupService=ce,this._themeService=le,this._contextMenuService=ae,this._commandService=ue,this._elementDisposables=[],this._register(this._terminalService.onDidChangeInstancePrimaryStatus(oe=>this.updateLabel(oe))),this._register(this._terminalGroupService.onDidChangeActiveInstance(()=>this.updateLabel())),this._register(this._terminalService.onDidChangeInstanceIcon(oe=>this.updateLabel(oe))),this._register(this._terminalService.onDidChangeInstanceColor(oe=>this.updateLabel(oe))),this._register(this._terminalService.onDidChangeInstanceTitle(oe=>{oe===this._terminalGroupService.activeInstance&&(this._action.tooltip=Z(oe,this._terminalService.configHelper.config.tabs.separator),this.updateLabel())})),this._register(this._terminalService.onDidChangeInstanceCapability(oe=>{this._action.tooltip=Z(oe,this._terminalService.configHelper.config.tabs.separator),this.updateLabel(oe)})),this._register((0,O.toDisposable)(()=>(0,O.dispose)(this._elementDisposables)))}async onClick($){$.altKey&&this._menuItemAction.alt?this._commandService.executeCommand(this._menuItemAction.alt.id,{target:a.TerminalLocation.Panel}):this._openContextMenu()}updateLabel($){if(!($&&$!==this._terminalGroupService.activeInstance)&&(this._elementDisposables.length===0&&this.element&&this.label&&(this._elementDisposables.push(f.addDisposableListener(this.element,f.EventType.CONTEXT_MENU,J=>{J.button===2&&(this._openContextMenu(),J.preventDefault())})),this._elementDisposables.push(f.addDisposableListener(this.element,f.EventType.AUXCLICK,J=>{if(J.button===1){const ee=this._terminalGroupService.activeInstance;ee&&this._terminalService.safeDisposeTerminal(ee),J.preventDefault()}})),this._elementDisposables.push(f.addDisposableListener(this.element,f.EventType.DRAG_START,J=>{const ee=this._terminalGroupService.activeInstance;J.dataTransfer&&ee&&J.dataTransfer.setData(B.DataTransfers.TERMINALS,JSON.stringify([ee.resource.toString()]))}))),this.label)){const J=this.label,ee=this._terminalGroupService.activeInstance;if(!ee){f.reset(J,"");return}J.classList.add("single-terminal-tab");let te="";const se=ee.statusList.primary;if(se){const le=(0,y.getColorForSeverity)(se.severity);this._themeService.getColorTheme();const ae=this._themeService.getColorTheme().getColor(le);ae&&(te=ae.toString())}J.style.color=te,f.reset(J,...(0,E.renderLabelWithIcons)(q(ee,this._terminalService.configHelper.config.tabs.separator,I.ThemeIcon.isThemeIcon(this._commandAction.item.icon)?this._commandAction.item.icon:void 0))),this._altCommand&&(J.classList.remove(this._altCommand),this._altCommand=void 0),this._color&&(J.classList.remove(this._color),this._color=void 0),this._class&&(J.classList.remove(this._class),J.classList.remove("terminal-uri-icon"),this._class=void 0);const ie=(0,L.getColorClass)(ee);ie&&(this._color=ie,J.classList.add(ie));const ce=(0,L.getUriClasses)(ee,this._themeService.getColorTheme().type);ce&&(this._class=ce?.[0],J.classList.add(...ce)),this._commandAction.item.icon&&(this._altCommand="alt-command",J.classList.add(this._altCommand)),this.updateTooltip()}}_openContextMenu(){this._contextMenuService.showContextMenu({getAnchor:()=>this.element,getActions:()=>this._actions,getActionsContext:()=>this.label})}};G=Ee([W(2,i.IKeybindingService),W(3,C.INotificationService),W(4,S.IContextKeyService),W(5,o.ITerminalService),W(6,o.ITerminalGroupService),W(7,I.IThemeService),W(8,A.IContextMenuService),W(9,b.ICommandService)],G);function q(Y,$,J){if(!Y||!Y.title)return"";let ee=I.ThemeIcon.isThemeIcon(Y.icon)?Y.icon?.id:m.Codicon.terminal.id;const te=`$(${J?.id||ee}) ${j(Y,$)}`,se=Y.statusList.primary;return se?.icon?`${te} $(${se.icon.id})`:te}function Z(Y,$){if(!Y)return"";const J=(0,z.getShellIntegrationTooltip)(Y),ee=j(Y,$);return J?ee+J:ee}function j(Y,$){return Y?Y.description?`${Y.title} ${$} ${Y.description}`:Y.title:""}let X=class extends I.Themable{constructor($,J,ee,te){super(J);this._themeService=J,this._terminalService=ee,this._terminalGroupService=te,this._registerListeners(),this._styleElement=document.createElement("style"),$.appendChild(this._styleElement),this._register((0,O.toDisposable)(()=>$.removeChild(this._styleElement))),this.updateStyles()}_registerListeners(){this._register(this._terminalService.onDidChangeInstanceIcon(()=>this.updateStyles())),this._register(this._terminalService.onDidChangeInstanceColor(()=>this.updateStyles())),this._register(this._terminalService.onDidChangeInstances(()=>this.updateStyles())),this._register(this._terminalGroupService.onDidChangeGroups(()=>this.updateStyles()))}updateStyles(){super.updateStyles();const $=this._themeService.getColorTheme();let J="";for(const ee of this._terminalService.instances){const te=ee.icon;if(!te)continue;let se;te instanceof x.URI?se=te:te instanceof Object&&"light"in te&&"dark"in te&&(se=$.type===F.ColorScheme.LIGHT?te.light:te.dark);const ie=(0,L.getUriClasses)(ee,$.type);se instanceof x.URI&&ie&&ie.length>1&&(J+=`.monaco-workbench .${ie[0]} .monaco-highlighted-label .codicon, .monaco-action-bar .terminal-uri-icon.single-terminal-tab.action-label:not(.alt-command) .codicon{background-image: ${f.asCSSUrl(se)};}`)}for(const ee of this._terminalService.instances){const te=(0,L.getColorClass)(ee);if(!te||!ee.color)continue;const se=$.getColor(ee.color);se&&(J+=`.monaco-workbench .${te} .codicon:first-child:not(.codicon-split-horizontal):not(.codicon-trashcan):not(.file-icon){ color: ${se} !important; }`)}this._styleElement.textContent=J}};X=Ee([W(1,I.IThemeService),W(2,o.ITerminalService),W(3,o.ITerminalGroupService)],X)}),define(ne[2783],re([1,0,1793,8,37,5,24,27,12,34,161,43,40,80]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestingViewPaneContainer=void 0;let i=class extends v.ViewPaneContainer{constructor(s,l,r,p,u,a,n,h,g,d){super("workbench.view.extension.test",{mergeViewWithContainerWhenSingleView:!0},r,n,s,p,l,h,u,a,g,d)}create(s){super.create(s),s.classList.add("testing-view-pane")}getOptimalWidth(){return 400}getTitle(){return(0,t.localize)(0,null)}};i=Ee([W(0,c.IWorkbenchLayoutService),W(1,D.ITelemetryService),W(2,A.IInstantiationService),W(3,_.IContextMenuService),W(4,I.IThemeService),W(5,k.IStorageService),W(6,f.IConfigurationService),W(7,o.IExtensionService),W(8,w.IWorkspaceContextService),W(9,C.IViewDescriptorService)],i),e.TestingViewPaneContainer=i}),define(ne[2784],re([1,0,39,1785,16,28,57,7,23,99,35,41,67,17,47,43,289,293,2238,2627,2628,596,888,2783,327,496,363,829,2239,270,825,497,251,216,827,250,2282,2512,2236]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,v.registerSingleton)(L.ITestService,M.TestService,!0),(0,v.registerSingleton)(F.ITestResultStorage,F.TestResultStorage,!0),(0,v.registerSingleton)(O.ITestProfileService,O.TestProfileService,!0),(0,v.registerSingleton)(x.ITestResultService,x.TestResultService,!0),(0,v.registerSingleton)(d.ITestExplorerFilterState,d.TestExplorerFilterState,!0),(0,v.registerSingleton)(b.ITestingAutoRun,b.TestingAutoRun,!0),(0,v.registerSingleton)(a.ITestingOutputTerminalService,a.TestingOutputTerminalService,!0),(0,v.registerSingleton)(R.ITestingPeekOpener,u.TestingPeekOpener,!0),(0,v.registerSingleton)(n.ITestingProgressUiService,n.TestingProgressUiService,!0),(0,v.registerSingleton)(T.ITestingDecorationsService,r.TestingDecorationService,!0);const B=c.Registry.as(S.Extensions.ViewContainersRegistry).registerViewContainer({id:"workbench.view.extension.test",title:(0,f.localize)(0,null),ctorDescriptor:new w.SyncDescriptor(h.TestingViewPaneContainer),icon:l.testingViewIcon,alwaysUseContainerInfo:!0,order:6,openCommandActionDescriptor:{id:"workbench.view.extension.test",mnemonicTitle:(0,f.localize)(1,null),order:4},hideIfEmpty:!0},0),P=c.Registry.as(S.Extensions.ViewsRegistry);P.registerViewWelcomeContent("workbench.view.testing",{content:(0,f.localize)(2,null)}),P.registerViewWelcomeContent("workbench.view.testing",{content:"["+(0,f.localize)(3,null)+"](command:testing.searchForTestExtension)",order:10}),P.registerViews([{id:"workbench.view.testing",name:(0,f.localize)(4,null),ctorDescriptor:new w.SyncDescriptor(p.TestingExplorerView),canToggleVisibility:!0,workspace:!0,canMoveView:!0,weight:80,order:-999,containerIcon:l.testingViewIcon,when:D.ContextKeyExpr.greater(y.TestingContextKeys.providerCount.key,0)}],B),N.allTestActions.forEach(_.registerAction2),(0,_.registerAction2)(u.OpenMessageInEditorAction),(0,_.registerAction2)(u.GoToPreviousMessageAction),(0,_.registerAction2)(u.GoToNextMessageAction),(0,_.registerAction2)(u.CloseTestPeek),(0,_.registerAction2)(u.ToggleTestingPeekHistory),c.Registry.as(i.Extensions.Workbench).registerWorkbenchContribution(E.TestingContentProvider,3),c.Registry.as(i.Extensions.Workbench).registerWorkbenchContribution(u.TestingPeekOpener,4),c.Registry.as(i.Extensions.Workbench).registerWorkbenchContribution(n.TestingProgressTrigger,4),(0,t.registerEditorContribution)("editor.contrib.testingOutputPeek",u.TestingOutputPeekController),(0,t.registerEditorContribution)("editor.contrib.testingDecorations",r.TestingDecorations),A.CommandsRegistry.registerCommand({id:"_revealTestInExplorer",handler:async(V,z,U)=>{V.get(d.ITestExplorerFilterState).reveal.value=typeof z=="string"?z:z.extId,V.get(S.IViewsService).openView("workbench.view.testing",U)}}),A.CommandsRegistry.registerCommand({id:"vscode.peekTestError",handler:async(V,z)=>{const U=V.get(x.ITestResultService).getStateById(z);if(!U)return!1;const[H,K]=U,G=V.get(R.ITestingPeekOpener);if(G.tryPeekFirstError(H,K))return!0;for(const q of H.tests)if(m.TestId.compare(K.item.extId,q.item.extId)===2&&G.tryPeekFirstError(H,q))return!0;return!1}}),A.CommandsRegistry.registerCommand({id:"vscode.revealTest",handler:async(V,z)=>{const U=V.get(L.ITestService).collection.getNodeById(z);if(!U)return;const H=V.get(A.ICommandService),K=V.get(I.IFileService),G=V.get(C.IOpenerService);let{range:q,uri:Z}=U.item;if(!Z)return;q=V.get(T.ITestingDecorationsService).getDecoratedRangeForTest(Z,z)||q,V.get(d.ITestExplorerFilterState).reveal.value=z,V.get(R.ITestingPeekOpener).closeAllPeeks();let j=!0;try{(await K.stat(Z)).isFile||(j=!1)}catch{}if(!j){await H.executeCommand(s.REVEAL_IN_EXPLORER_COMMAND_ID,Z);return}await G.open(q?Z.with({fragment:`L${q.startLineNumber}:${q.startColumn}`}):Z)}}),A.CommandsRegistry.registerCommand({id:"vscode.runTestsById",handler:async(V,z,...U)=>{const H=V.get(L.ITestService);await(0,N.discoverAndRunTests)(V.get(L.ITestService).collection,V.get(o.IProgressService),U,K=>H.runTests({group:z,tests:K}))}}),c.Registry.as(k.Extensions.Configuration).registerConfiguration(g.testingConfiguation)}),define(ne[2785],re([1,0,1801,99,35,17,43,512,420,2240,2704,57,7,16,28,148,74,33,63]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TimelinePaneDescriptor=void 0;const p=(0,r.registerIcon)("timeline-view-icon",l.Codicon.history,(0,t.localize)(0,null)),u=(0,r.registerIcon)("timeline-open",l.Codicon.history,(0,t.localize)(1,null));class a{constructor(){this.id=I.TimelinePaneId,this.name=v.TimelinePane.TITLE,this.containerIcon=p,this.ctorDescriptor=new f.SyncDescriptor(v.TimelinePane),this.order=2,this.weight=30,this.collapsed=!0,this.canToggleVisibility=!0,this.hideByDefault=!1,this.canMoveView=!0,this.when=w.TimelineHasProviderContext,this.focusCommand={id:"timeline.focus"}}}e.TimelinePaneDescriptor=a,A.Registry.as(C.Extensions.Configuration).registerConfiguration({id:"timeline",order:1001,title:(0,t.localize)(2,null),type:"object",properties:{"timeline.excludeSources":{type:["array","null"],default:null,description:(0,t.localize)(3,null)},"timeline.pageSize":{type:["number","null"],default:null,markdownDescription:(0,t.localize)(4,null)},"timeline.pageOnScroll":{type:"boolean",default:!1,description:(0,t.localize)(5,null)}}}),A.Registry.as(k.Extensions.ViewsRegistry).registerViews([new a],D.VIEW_CONTAINER);var h;(function(d){d.ID="files.openTimeline",d.LABEL=(0,t.localize)(6,null);function m(){return(b,E)=>b.get(I.ITimelineService).setUri(E)}d.handler=m})(h||(h={})),i.CommandsRegistry.registerCommand(h.ID,h.handler()),c.MenuRegistry.appendMenuItem(c.MenuId.ExplorerContext,{group:"4_timeline",order:1,command:{id:h.ID,title:h.LABEL,icon:u},when:o.ContextKeyExpr.and(S.ExplorerFolderContext.toNegated(),s.ResourceContextKey.HasResource,w.TimelineHasProviderContext)});const g=(0,r.registerIcon)("timeline-filter",l.Codicon.filter,(0,t.localize)(7,null));c.MenuRegistry.appendMenuItem(c.MenuId.TimelineTitle,{submenu:c.MenuId.TimelineFilterSubMenu,title:(0,t.localize)(8,null),group:"navigation",order:100,icon:g}),(0,_.registerSingleton)(I.ITimelineService,w.TimelineService,!0)}),define(ne[2786],re([1,0,43,1814,641,5,96,16,7,9,21,6,2,33,257,19,252,67,32,10,162,38,37,8,41,12,27,68,203,298,39,26,54,132,1129]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataSyncMergesViewPane=void 0;let F=class extends _.TreeViewPane{constructor(B,P,V,z,U,H,K,G,q,Z,j,X,Y,$,J){super(B,K,G,q,Z,j,X,Y,$,J);this.editorService=P,this.dialogService=V,this.progressService=z,this.treeItems=new Map,this.userDataSyncPreview=U.userDataSyncPreview,this._register(this.userDataSyncPreview.onDidChangeResources(()=>this.updateSyncButtonEnablement())),this._register(this.userDataSyncPreview.onDidChangeResources(()=>this.treeView.refresh())),this._register(this.userDataSyncPreview.onDidChangeResources(()=>this.closeDiffEditors())),this._register(H.registerDecorationsProvider(this._register(new L(this.userDataSyncPreview)))),this.registerActions()}renderTreeView(B){super.renderTreeView(p.append(B,p.$(""))),this.createButtons(B);const P=this;this.treeView.message=(0,f.localize)(0,null),this.treeView.dataProvider={getChildren(){return P.getTreeItems()}}}createButtons(B){this.buttonsContainer=p.append(B,p.$(".manual-sync-buttons-container")),this.syncButton=this._register(new u.Button(this.buttonsContainer)),this.syncButton.label=(0,f.localize)(1,null),this.updateSyncButtonEnablement(),this._register((0,b.attachButtonStyler)(this.syncButton,this.themeService)),this._register(this.syncButton.onDidClick(()=>this.apply())),this.cancelButton=this._register(new u.Button(this.buttonsContainer,{secondary:!0})),this.cancelButton.label=(0,f.localize)(2,null),this._register((0,b.attachButtonStyler)(this.cancelButton,this.themeService)),this._register(this.cancelButton.onDidClick(()=>this.cancel()))}layoutTreeView(B,P){const V=78;this.buttonsContainer.style.height=`${V}px`,this.buttonsContainer.style.width=`${P}px`;const z=this.userDataSyncPreview.resources.filter(H=>H.syncResource!=="globalState"&&(H.localChange!==0||H.remoteChange!==0)).length,U=66;super.layoutTreeView(Math.min(B-V,22*z+U),P)}updateSyncButtonEnablement(){this.syncButton.enabled=this.userDataSyncPreview.resources.every(B=>B.syncResource==="globalState"||B.mergeState==="accepted")}async getTreeItems(){this.treeItems.clear();const B=[];for(const P of this.userDataSyncPreview.resources)if(P.syncResource!=="globalState"&&(P.localChange!==0||P.remoteChange!==0)){const V=JSON.stringify(P),z={handle:V,resourceUri:P.remote,label:{label:(0,S.basename)(P.remote),strikethrough:P.mergeState==="accepted"&&(P.localChange===3||P.remoteChange===3)},description:(0,i.getSyncAreaLabel)(P.syncResource),collapsibleState:t.TreeItemCollapsibleState.None,command:{id:"workbench.actions.sync.showChanges",title:"",arguments:[{$treeViewId:"",$treeItemHandle:V}]},contextValue:`sync-resource-${P.mergeState}`};this.treeItems.set(V,z),B.push(z)}return B}toUserDataSyncResourceGroup(B){const P=JSON.parse(B);return{syncResource:P.syncResource,local:w.URI.revive(P.local),remote:w.URI.revive(P.remote),merged:w.URI.revive(P.merged),accepted:w.URI.revive(P.accepted),localChange:P.localChange,remoteChange:P.remoteChange,mergeState:P.mergeState}}registerActions(){const B=this;this._register((0,D.registerAction2)(class extends D.Action2{constructor(){super({id:"workbench.actions.sync.acceptRemote",title:(0,f.localize)(3,null),icon:c.Codicon.cloudDownload,menu:{id:D.MenuId.ViewItemContext,when:I.ContextKeyExpr.and(I.ContextKeyExpr.equals("view",i.SYNC_MERGES_VIEW_ID),I.ContextKeyExpr.equals("viewItem","sync-resource-preview")),group:"inline",order:1}})}async run(P,V){return B.acceptRemote(B.toUserDataSyncResourceGroup(V.$treeItemHandle))}})),this._register((0,D.registerAction2)(class extends D.Action2{constructor(){super({id:"workbench.actions.sync.acceptLocal",title:(0,f.localize)(4,null),icon:c.Codicon.cloudUpload,menu:{id:D.MenuId.ViewItemContext,when:I.ContextKeyExpr.and(I.ContextKeyExpr.equals("view",i.SYNC_MERGES_VIEW_ID),I.ContextKeyExpr.equals("viewItem","sync-resource-preview")),group:"inline",order:2}})}async run(P,V){return B.acceptLocal(B.toUserDataSyncResourceGroup(V.$treeItemHandle))}})),this._register((0,D.registerAction2)(class extends D.Action2{constructor(){super({id:"workbench.actions.sync.merge",title:(0,f.localize)(5,null),icon:c.Codicon.merge,menu:{id:D.MenuId.ViewItemContext,when:I.ContextKeyExpr.and(I.ContextKeyExpr.equals("view",i.SYNC_MERGES_VIEW_ID),I.ContextKeyExpr.equals("viewItem","sync-resource-preview")),group:"inline",order:3}})}async run(P,V){return B.mergeResource(B.toUserDataSyncResourceGroup(V.$treeItemHandle))}})),this._register((0,D.registerAction2)(class extends D.Action2{constructor(){super({id:"workbench.actions.sync.undo",title:(0,f.localize)(6,null),icon:c.Codicon.discard,menu:{id:D.MenuId.ViewItemContext,when:I.ContextKeyExpr.and(I.ContextKeyExpr.equals("view",i.SYNC_MERGES_VIEW_ID),I.ContextKeyExpr.or(I.ContextKeyExpr.equals("viewItem","sync-resource-accepted"),I.ContextKeyExpr.equals("viewItem","sync-resource-conflict"))),group:"inline",order:3}})}async run(P,V){return B.discardResource(B.toUserDataSyncResourceGroup(V.$treeItemHandle))}})),this._register((0,D.registerAction2)(class extends D.Action2{constructor(){super({id:"workbench.actions.sync.showChanges",title:(0,f.localize)(7,null)})}async run(P,V){const z=B.toUserDataSyncResourceGroup(V.$treeItemHandle);return B.open(z)}}))}async acceptLocal(B){await this.withProgress(async()=>{await this.userDataSyncPreview.accept(B.syncResource,B.local)}),await this.reopen(B)}async acceptRemote(B){await this.withProgress(async()=>{await this.userDataSyncPreview.accept(B.syncResource,B.remote)}),await this.reopen(B)}async mergeResource(B){await this.withProgress(()=>this.userDataSyncPreview.merge(B.merged)),B=this.userDataSyncPreview.resources.find(({local:P})=>(0,S.isEqual)(P,B.local)),await this.reopen(B),B.mergeState==="conflict"&&await this.dialogService.show(R.Severity.Warning,(0,f.localize)(8,null),void 0,{detail:(0,f.localize)(9,null)})}async discardResource(B){return this.close(B),this.withProgress(()=>this.userDataSyncPreview.discard(B.merged))}async apply(){this.closeAll(),this.syncButton.label=(0,f.localize)(10,null),this.syncButton.enabled=!1,this.cancelButton.enabled=!1;try{await this.withProgress(async()=>this.userDataSyncPreview.apply())}catch{this.syncButton.enabled=!1,this.cancelButton.enabled=!0}}async cancel(){for(const B of this.userDataSyncPreview.resources)this.close(B);await this.userDataSyncPreview.cancel()}async open(B){if(B.mergeState==="accepted")B.localChange!==3&&B.remoteChange!==3&&await this.editorService.openEditor({resource:B.accepted,label:(0,f.localize)(11,null,(0,S.basename)(B.accepted)),options:{pinned:!0}});else{const P=B.remote,V=B.mergeState==="conflict"?B.merged:B.local,z=(0,f.localize)(12,null,(0,S.basename)(P)),U=B.mergeState==="conflict"?(0,f.localize)(13,null,(0,S.basename)(V)):(0,f.localize)(14,null,(0,S.basename)(V));await this.editorService.openEditor({original:{resource:P},modified:{resource:V},label:(0,f.localize)(15,null,z,U),description:(0,f.localize)(16,null),options:{preserveFocus:!0,revealIfVisible:!0,pinned:!0,override:x.EditorResolution.DISABLED}})}}async reopen(B){this.close(B);const P=this.userDataSyncPreview.resources.find(({local:V})=>(0,S.isEqual)(V,B.local));P&&(await this.treeView.refresh(),this.treeView.setSelection([this.treeItems.get(JSON.stringify(P))]),await this.open(P))}close(B){for(const P of this.editorService.editors)P instanceof E.DiffEditorInput?(0,S.isEqual)(B.remote,P.secondary.resource)&&P.dispose():(0,S.isEqual)(B.accepted,P.resource)&&P.dispose()}closeDiffEditors(){for(const B of this.userDataSyncPreview.resources)if(B.mergeState==="accepted")for(const P of this.editorService.editors)P instanceof E.DiffEditorInput&&(0,S.isEqual)(B.remote,P.secondary.resource)&&((0,S.isEqual)(B.merged,P.primary.resource)||(0,S.isEqual)(B.local,P.primary.resource))&&P.dispose()}closeAll(){for(const B of this.userDataSyncPreview.resources)this.close(B)}withProgress(B){return this.progressService.withProgress({location:i.SYNC_MERGES_VIEW_ID,delay:500},B)}};F=Ee([W(1,v.IEditorService),W(2,O.IDialogService),W(3,l.IProgressService),W(4,i.IUserDataSyncWorkbenchService),W(5,s.IDecorationsService),W(6,a.IKeybindingService),W(7,n.IContextMenuService),W(8,h.IConfigurationService),W(9,I.IContextKeyService),W(10,t.IViewDescriptorService),W(11,A.IInstantiationService),W(12,g.IOpenerService),W(13,d.IThemeService),W(14,m.ITelemetryService)],F),e.UserDataSyncMergesViewPane=F;class L extends o.Disposable{constructor(B){super();this.userDataSyncPreview=B,this.label=(0,f.localize)(17,null),this._onDidChange=this._register(new C.Emitter),this.onDidChange=this._onDidChange.event,this._register(B.onDidChangeResources(P=>this._onDidChange.fire(P.map(({remote:V})=>V))))}provideDecorations(B){const P=this.userDataSyncPreview.resources.find(V=>(0,S.isEqual)(V.remote,B));if(P)switch(P.mergeState){case"conflict":return{letter:"\u26A0",color:r.listWarningForeground,tooltip:(0,f.localize)(18,null)};case"accepted":return{letter:"\u2713",color:r.listDeemphasizedForeground,tooltip:(0,f.localize)(19,null)}}}}let M=class Il extends o.Disposable{constructor(B,P,V,z,U){super();this.editor=B,this.instantiationService=P,this.userDataSyncService=V,this.configurationService=z,this.userDataSyncWorkbenchService=U,this.update(),this.registerListeners()}static get(B){return B.getContribution(Il.ID)}registerListeners(){this._register(this.editor.onDidChangeModel(()=>this.update())),this._register(this.userDataSyncService.onDidChangeConflicts(()=>this.update())),this._register(C.Event.filter(this.configurationService.onDidChangeConfiguration,B=>B.affectsConfiguration("diffEditor.renderSideBySide"))(()=>this.update()))}update(){if(!this.shouldShowButton(this.editor)){this.disposeAcceptChangesWidgetRenderer();return}this.createAcceptChangesWidgetRenderer()}shouldShowButton(B){const P=B.getModel();if(!P)return!1;const V=this.getUserDataSyncResource(P.uri);return V?this.configurationService.getValue("diffEditor.renderSideBySide")?!0:(0,S.isEqual)(V.merged,P.uri):!1}createAcceptChangesWidgetRenderer(){if(!this.acceptChangesButton){const B=this.editor.getModel().uri,P=this.getUserDataSyncResource(B),V=(0,S.isEqual)(P.remote,B),z=(0,S.isEqual)(P.local,B),U=V?(0,f.localize)(20,null):z?(0,f.localize)(21,null):(0,f.localize)(22,null);this.acceptChangesButton=this.instantiationService.createInstance(y.FloatingClickWidget,this.editor,U,null),this._register(this.acceptChangesButton.onClick(async()=>{const H=this.editor.getModel();H&&await this.userDataSyncWorkbenchService.userDataSyncPreview.accept(P.syncResource,H.uri,H.getValue())})),this.acceptChangesButton.render()}}getUserDataSyncResource(B){return this.userDataSyncWorkbenchService.userDataSyncPreview.resources.find(P=>(0,S.isEqual)(B,P.local)||(0,S.isEqual)(B,P.remote)||(0,S.isEqual)(B,P.merged))}disposeAcceptChangesWidgetRenderer(){(0,o.dispose)(this.acceptChangesButton),this.acceptChangesButton=void 0}dispose(){this.disposeAcceptChangesWidgetRenderer(),super.dispose()}};M.ID="editor.contrib.acceptChangesButton2",M=Ee([W(1,A.IInstantiationService),W(2,k.IUserDataSyncService),W(3,h.IConfigurationService),W(4,i.IUserDataSyncWorkbenchService)],M),(0,T.registerEditorContribution)(M.ID,M)}),define(ne[2787],re([1,0,17,43,1815,99,641,5,96,16,7,9,21,12,197,54,6,2,33,36,257,769,53,26,15,2786,19,204,23,85,56,28]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataSyncDataViews=void 0;let O=class extends l.Disposable{constructor(P,V,z,U,H){super();this.instantiationService=V,this.userDataSyncEnablementService=z,this.userDataSyncMachinesService=U,this.userDataSyncService=H,this.registerViews(P)}registerViews(P){this.registerMergesView(P),this.registerActivityView(P,!0),this.registerMachinesView(P),this.registerActivityView(P,!1),this.registerTroubleShootView(P)}registerMergesView(P){const V=t.Registry.as(f.Extensions.ViewsRegistry),z=(0,_.localize)(0,null);V.registerViews([{id:u.SYNC_MERGES_VIEW_ID,name:z,ctorDescriptor:new A.SyncDescriptor(d.UserDataSyncMergesViewPane),when:u.CONTEXT_ENABLE_SYNC_MERGES_VIEW,canToggleVisibility:!1,canMoveView:!1,treeView:this.instantiationService.createInstance(k.TreeView,u.SYNC_MERGES_VIEW_ID,z),collapsed:!1,order:100}],P)}registerMachinesView(P){const V="workbench.views.sync.machines",z=(0,_.localize)(1,null),U=this.instantiationService.createInstance(k.TreeView,V,z),H=this.instantiationService.createInstance(M,U);U.showRefreshAction=!0,U.canSelectMany=!0;const K=U.onDidChangeVisibility(q=>{q&&!U.dataProvider&&(K.dispose(),U.dataProvider=H)});this._register(s.Event.any(this.userDataSyncMachinesService.onDidChange,this.userDataSyncService.onDidResetRemote)(()=>U.refresh())),t.Registry.as(f.Extensions.ViewsRegistry).registerViews([{id:V,name:z,ctorDescriptor:new A.SyncDescriptor(k.TreeViewPane),when:v.ContextKeyExpr.and(u.CONTEXT_SYNC_STATE.notEqualsTo("uninitialized"),u.CONTEXT_ACCOUNT_STATE.isEqualTo("available"),u.CONTEXT_ENABLE_ACTIVITY_VIEWS),canToggleVisibility:!0,canMoveView:!1,treeView:U,collapsed:!1,order:300}],P),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:"workbench.actions.sync.editMachineName",title:(0,_.localize)(2,null),icon:r.Codicon.edit,menu:{id:w.MenuId.ViewItemContext,when:v.ContextKeyExpr.and(v.ContextKeyExpr.equals("view",V)),group:"inline"}})}async run(q,Z){await H.rename(Z.$treeItemHandle)&&await U.refresh()}}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:"workbench.actions.sync.turnOffSyncOnMachine",title:(0,_.localize)(3,null),menu:{id:w.MenuId.ViewItemContext,when:v.ContextKeyExpr.and(v.ContextKeyExpr.equals("view",V),v.ContextKeyExpr.equals("viewItem","sync-machine"))}})}async run(q,Z,j){await H.disable((j||[Z]).map(X=>X.$treeItemHandle))&&await U.refresh()}})}registerActivityView(P,V){const z=`workbench.views.sync.${V?"remote":"local"}Activity`,U=V?(0,_.localize)(4,null):(0,_.localize)(5,null),H=this.instantiationService.createInstance(k.TreeView,z,U);H.showCollapseAllAction=!0,H.showRefreshAction=!0;const K=H.onDidChangeVisibility(q=>{q&&!H.dataProvider&&(K.dispose(),H.dataProvider=V?this.instantiationService.createInstance(L):this.instantiationService.createInstance(F))});this._register(s.Event.any(this.userDataSyncEnablementService.onDidChangeResourceEnablement,this.userDataSyncEnablementService.onDidChangeEnablement,this.userDataSyncService.onDidResetLocal,this.userDataSyncService.onDidResetRemote)(()=>H.refresh())),t.Registry.as(f.Extensions.ViewsRegistry).registerViews([{id:z,name:U,ctorDescriptor:new A.SyncDescriptor(k.TreeViewPane),when:v.ContextKeyExpr.and(u.CONTEXT_SYNC_STATE.notEqualsTo("uninitialized"),u.CONTEXT_ACCOUNT_STATE.isEqualTo("available"),u.CONTEXT_ENABLE_ACTIVITY_VIEWS),canToggleVisibility:!0,canMoveView:!1,treeView:H,collapsed:!1,order:V?200:400,hideByDefault:!V}],P),this.registerDataViewActions(z)}registerDataViewActions(P){(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:"workbench.actions.sync.resolveResource",title:(0,_.localize)(6,null),menu:{id:w.MenuId.ViewItemContext,when:v.ContextKeyExpr.and(v.ContextKeyExpr.equals("view",P),v.ContextKeyExpr.regex("viewItem",/sync-resource-.*/i))}})}async run(V,z){const{resource:U}=JSON.parse(z.$treeItemHandle);await V.get(o.IEditorService).openEditor({resource:C.URI.parse(U),options:{pinned:!0}})}}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:"workbench.actions.sync.compareWithLocal",title:(0,_.localize)(7,null),menu:{id:w.MenuId.ViewItemContext,when:v.ContextKeyExpr.and(v.ContextKeyExpr.equals("view",P),v.ContextKeyExpr.regex("viewItem",/sync-associatedResource-.*/i))}})}async run(V,z){const U=V.get(R.ICommandService),{resource:H,comparableResource:K}=JSON.parse(z.$treeItemHandle),G=C.URI.parse(H),q=C.URI.parse(K);return U.executeCommand(b.API_OPEN_DIFF_EDITOR_COMMAND_ID,G,q,(0,_.localize)(8,null,(0,_.localize)(9,null,(0,m.basename)(G)),(0,_.localize)(10,null,(0,m.basename)(q))),void 0)}}),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:"workbench.actions.sync.replaceCurrent",title:(0,_.localize)(11,null),icon:r.Codicon.discard,menu:{id:w.MenuId.ViewItemContext,when:v.ContextKeyExpr.and(v.ContextKeyExpr.equals("view",P),v.ContextKeyExpr.regex("viewItem",/sync-resource-.*/i)),group:"inline"}})}async run(V,z){const U=V.get(S.IDialogService),H=V.get(I.IUserDataSyncService),{resource:K,syncResource:G}=JSON.parse(z.$treeItemHandle);if((await U.confirm({message:(0,_.localize)(12,null,(0,u.getSyncAreaLabel)(G)),type:"info",title:u.SYNC_TITLE})).confirmed)return H.replace(C.URI.parse(K))}})}registerTroubleShootView(P){const V="workbench.views.sync.troubleshoot",z=(0,_.localize)(13,null),U=this.instantiationService.createInstance(k.TreeView,V,z),H=this.instantiationService.createInstance(N);U.showRefreshAction=!0;const K=U.onDidChangeVisibility(q=>{q&&!U.dataProvider&&(K.dispose(),U.dataProvider=H)});t.Registry.as(f.Extensions.ViewsRegistry).registerViews([{id:V,name:z,ctorDescriptor:new A.SyncDescriptor(k.TreeViewPane),when:u.CONTEXT_ENABLE_ACTIVITY_VIEWS,canToggleVisibility:!0,canMoveView:!1,treeView:U,collapsed:!1,order:500,hideByDefault:!0}],P)}};O=Ee([W(1,D.IInstantiationService),W(2,I.IUserDataSyncEnablementService),W(3,a.IUserDataSyncMachinesService),W(4,I.IUserDataSyncService)],O),e.UserDataSyncDataViews=O;let x=class{constructor(P,V,z,U){this.userDataSyncService=P,this.userDataAutoSyncService=V,this.userDataSyncWorkbenchService=z,this.notificationService=U}async getChildren(P){try{return P?P.syncResourceHandle?await this.getChildrenForSyncResourceTreeItem(P):[]:await this.getRoots()}catch(V){throw V instanceof I.UserDataSyncError||(V=I.UserDataSyncError.toUserDataSyncError(V)),V instanceof I.UserDataSyncError&&V.code==="IncompatibleRemoteContent"?this.notificationService.notify({severity:h.Severity.Error,message:V.message,actions:{primary:[new p.Action("reset",(0,_.localize)(14,null),void 0,!0,()=>this.userDataSyncWorkbenchService.resetSyncedData())]}}):this.notificationService.error(V),V}}async getRoots(){return this.syncResourceHandlesPromise=void 0,(await this.getSyncResourceHandles()).map(V=>({handle:JSON.stringify({resource:V.uri.toString(),syncResource:V.syncResource}),collapsibleState:f.TreeItemCollapsibleState.Collapsed,label:{label:(0,u.getSyncAreaLabel)(V.syncResource)},description:(0,i.fromNow)(V.created,!0),themeIcon:c.FolderThemeIcon,syncResourceHandle:V,contextValue:`sync-resource-${V.syncResource}`}))}async getChildrenForSyncResourceTreeItem(P){const V=P.syncResourceHandle,z=await this.userDataSyncService.getAssociatedResources(V.syncResource,V),U=V.previous?await this.userDataSyncService.getAssociatedResources(V.syncResource,V.previous):[];return z.map(({resource:H,comparableResource:K})=>{const G=JSON.stringify({resource:H.toString(),comparableResource:K.toString()}),q=U.find(Z=>(0,m.basename)(Z.resource)===(0,m.basename)(H))?.resource;return{handle:G,collapsibleState:f.TreeItemCollapsibleState.None,resourceUri:H,command:q?{id:b.API_OPEN_DIFF_EDITOR_COMMAND_ID,title:"",arguments:[q,H,(0,_.localize)(15,null,`${(0,m.basename)(H)} (${(0,i.fromNow)(V.previous.created,!0)})`,`${(0,m.basename)(H)} (${(0,i.fromNow)(V.created,!0)})`),void 0]}:{id:b.API_OPEN_EDITOR_COMMAND_ID,title:"",arguments:[H,void 0,void 0]},contextValue:`sync-associatedResource-${V.syncResource}`}})}getSyncResourceHandles(){return this.syncResourceHandlesPromise===void 0&&(this.syncResourceHandlesPromise=Promise.all(I.ALL_SYNC_RESOURCES.map(async P=>{const V=await this.getResourceHandles(P);return V.sort((z,U)=>U.created-z.created),V.map((z,U)=>({...z,syncResource:P,previous:V[U+1]}))})).then(P=>(0,g.flatten)(P).sort((V,z)=>z.created-V.created))),this.syncResourceHandlesPromise}};x=Ee([W(0,I.IUserDataSyncService),W(1,I.IUserDataAutoSyncService),W(2,u.IUserDataSyncWorkbenchService),W(3,h.INotificationService)],x);class F extends x{getResourceHandles(P){return this.userDataSyncService.getLocalSyncResourceHandles(P)}}let L=class extends x{constructor(P,V,z,U,H){super(P,V,U,H);this.userDataSyncMachinesService=z}async getChildren(P){return P||(this.machinesPromise=void 0),super.getChildren(P)}getMachines(){return this.machinesPromise===void 0&&(this.machinesPromise=this.userDataSyncMachinesService.getMachines()),this.machinesPromise}getResourceHandles(P){return this.userDataSyncService.getRemoteSyncResourceHandles(P)}async getChildrenForSyncResourceTreeItem(P){const V=await super.getChildrenForSyncResourceTreeItem(P);if(V.length){const z=await this.userDataSyncService.getMachineId(P.syncResourceHandle.syncResource,P.syncResourceHandle);if(z){const H=(await this.getMachines()).find(({id:K})=>K===z);V[0].description=H?.isCurrent?(0,_.localize)(16,null):H?.name}}return V}};L=Ee([W(0,I.IUserDataSyncService),W(1,I.IUserDataAutoSyncService),W(2,a.IUserDataSyncMachinesService),W(3,u.IUserDataSyncWorkbenchService),W(4,h.INotificationService)],L);let M=class{constructor(P,V,z,U,H,K){this.treeView=P,this.userDataSyncMachinesService=V,this.quickInputService=z,this.notificationService=U,this.dialogService=H,this.userDataSyncWorkbenchService=K}async getChildren(P){P||(this.machinesPromise=void 0);try{let V=await this.getMachines();return V=V.filter(z=>!z.disabled).sort((z,U)=>z.isCurrent?-1:1),this.treeView.message=V.length?void 0:(0,_.localize)(17,null),V.map(({id:z,name:U,isCurrent:H,platform:K})=>({handle:z,collapsibleState:f.TreeItemCollapsibleState.None,label:{label:U},description:H?(0,_.localize)(18,null):void 0,themeIcon:K&&(0,a.isWebPlatform)(K)?r.Codicon.globe:r.Codicon.vm,contextValue:"sync-machine"}))}catch(V){return this.notificationService.error(V),[]}}getMachines(){return this.machinesPromise===void 0&&(this.machinesPromise=this.userDataSyncMachinesService.getMachines()),this.machinesPromise}async disable(P){const z=(await this.getMachines()).filter(({id:K})=>P.includes(K));if(!z.length)throw new Error((0,_.localize)(19,null,P.join(",")));if(!(await this.dialogService.confirm({type:"info",message:z.length>1?(0,_.localize)(20,null):(0,_.localize)(21,null,z[0].name),primaryButton:(0,_.localize)(22,null)})).confirmed)return!1;z.some(K=>K.isCurrent)&&await this.userDataSyncWorkbenchService.turnoff(!1);const H=z.filter(K=>!K.isCurrent).map(K=>[K.id,!1]);return H.length&&await this.userDataSyncMachinesService.setEnablements(H),!0}async rename(P){const V=new l.DisposableStore,z=V.add(this.quickInputService.createInputBox());z.placeholder=(0,_.localize)(23,null),z.busy=!0,z.show();const U=await this.getMachines(),H=U.find(({id:G})=>G===P);if(!H)throw z.hide(),V.dispose(),new Error((0,_.localize)(24,null,P));z.busy=!1,z.value=H.name;const K=G=>(G=G.trim(),G&&!U.some(q=>q.id!==P&&q.name===G)?G:null);return V.add(z.onDidChangeValue(()=>z.validationMessage=K(z.value)?"":(0,_.localize)(25,null))),new Promise((G,q)=>{V.add(z.onDidAccept(async()=>{const Z=K(z.value);if(V.dispose(),Z&&Z!==H.name)try{await this.userDataSyncMachinesService.renameMachine(P,Z),G(!0)}catch(j){q(j)}else G(!1)}))})}};M=Ee([W(1,a.IUserDataSyncMachinesService),W(2,n.IQuickInputService),W(3,h.INotificationService),W(4,S.IDialogService),W(5,u.IUserDataSyncWorkbenchService)],M);let N=class{constructor(P,V,z){this.fileService=P,this.environmentService=V,this.uriIdentityService=z}async getChildren(P){return P?P.handle==="LAST_SYNC_STATES"?this.getLastSyncStates():P.handle==="SYNC_LOGS"?this.getSyncLogs():[]:[{handle:"SYNC_LOGS",collapsibleState:f.TreeItemCollapsibleState.Collapsed,label:{label:(0,_.localize)(26,null)},themeIcon:r.Codicon.folder},{handle:"LAST_SYNC_STATES",collapsibleState:f.TreeItemCollapsibleState.Collapsed,label:{label:(0,_.localize)(27,null)},themeIcon:r.Codicon.folder}]}async getLastSyncStates(){const P=[];for(const V of I.ALL_SYNC_RESOURCES){const z=(0,I.getLastSyncResourceUri)(V,this.environmentService,this.uriIdentityService.extUri);await this.fileService.exists(z)&&P.push({handle:z.toString(),label:{label:(0,u.getSyncAreaLabel)(V)},collapsibleState:f.TreeItemCollapsibleState.None,resourceUri:z,command:{id:b.API_OPEN_EDITOR_COMMAND_ID,title:"",arguments:[z,void 0,void 0]}})}return P}async getSyncLogs(){const P=[],V=await this.fileService.resolve(this.uriIdentityService.extUri.dirname(this.uriIdentityService.extUri.dirname(this.environmentService.userDataSyncLogResource)));V.children&&P.push(...V.children.filter(U=>U.isDirectory&&/^\d{8}T\d{6}$/.test(U.name)).sort().reverse().map(U=>U.resource));const z=[];for(const U of P){const H=this.uriIdentityService.extUri.joinPath(U,this.uriIdentityService.extUri.basename(this.environmentService.userDataSyncLogResource));await this.fileService.exists(H)&&z.push({handle:H.toString(),collapsibleState:f.TreeItemCollapsibleState.None,resourceUri:H,label:{label:this.uriIdentityService.extUri.basename(U)},description:this.uriIdentityService.extUri.isEqual(H,this.environmentService.userDataSyncLogResource)?(0,_.localize)(28,null):void 0,command:{id:b.API_OPEN_EDITOR_COMMAND_ID,title:"",arguments:[H,void 0,void 0]}})}return z}};N=Ee([W(0,E.IFileService),W(1,y.IEnvironmentService),W(2,T.IUriIdentityService)],N)}),define(ne[2788],re([1,0,36,22,6,2,19,9,39,52,42,61,1812,16,28,8,7,54,5,26,53,27,96,298,44,203,413,201,217,21,50,108,479,197,46,24,41,271,17,99,43,2787,257,33,161,132,70,634,117,69]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H,K,G,q,Z,j,X){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataSyncWorkbenchContribution=void 0;const Y=new s.RawContextKey("conflictsSources",""),$={id:"workbench.userDataSync.actions.turnOn",title:(0,o.localize)(0,null,U.SYNC_TITLE)},J={id:"workbench.userDataSync.actions.turnOff",title:(0,o.localize)(1,null,U.SYNC_TITLE)},ee={id:U.CONFIGURE_SYNC_COMMAND_ID,title:(0,o.localize)(2,null,U.SYNC_TITLE)},te={id:"workbench.userDataSync.actions.resolveSettingsConflicts",title:(0,o.localize)(3,null,U.SYNC_TITLE)},se={id:"workbench.userDataSync.actions.resolveKeybindingsConflicts",title:(0,o.localize)(4,null,U.SYNC_TITLE)},ie={id:"workbench.userDataSync.actions.resolveSnippetsConflicts",title:(0,o.localize)(5,null,U.SYNC_TITLE)},ce={id:"workbench.userDataSync.actions.resolveTasksConflicts",title:(0,o.localize)(6,null,U.SYNC_TITLE)},le={id:"workbench.userDataSync.actions.syncNow",title:(0,o.localize)(7,null,U.SYNC_TITLE),description(Ce){if(Ce.status==="syncing")return(0,o.localize)(8,null);if(Ce.lastSyncTime)return(0,o.localize)(9,null,(0,x.fromNow)(Ce.lastSyncTime,!0))}},ae={id:"workbench.userDataSync.actions.settings",title:(0,o.localize)(10,null,U.SYNC_TITLE)},ue={id:"workbench.userDataSync.actions.showSyncedData",title:(0,o.localize)(11,null,U.SYNC_TITLE)},oe=new s.RawContextKey("syncAfterInitialization",!1),fe=new s.RawContextKey("userDataSyncTurningOn",!1);let pe=class extends A.Disposable{constructor(ve,he,ge,de,Se,we,ye,ke,Ie,Te,De,_e,Re,Ne,xe,Ae,Le,Me,We,Ve,Ue,et,Ze,Fe,Qe){super();this.userDataSyncEnablementService=ve,this.userDataSyncService=he,this.userDataSyncWorkbenchService=ge,this.activityService=Se,this.notificationService=we,this.editorService=ye,this.environmentService=ke,this.dialogService=Ie,this.quickInputService=Te,this.instantiationService=De,this.outputService=_e,this.authTokenService=Re,this.preferencesService=Ae,this.telemetryService=Le,this.productService=Me,this.storageService=We,this.openerService=Ve,this.authenticationService=Ue,this.userDataSyncStoreManagementService=et,this.configurationService=Ze,this.userDataInitializationService=Fe,this.hostService=Qe,this.globalActivityBadgeDisposable=this._register(new A.MutableDisposable),this.accountBadgeDisposable=this._register(new A.MutableDisposable),this.conflictsDisposables=new Map,this.invalidContentErrorDisposables=new Map,this._snippetsConflictsActionsDisposable=new A.DisposableStore,this.syncAfterInitializationContext=oe.bindTo(de),this.turningOnSyncContext=fe.bindTo(de),this.conflictsSources=Y.bindTo(de),ge.enabled&&((0,n.registerConfiguration)(),this.initializeSyncAfterInitializationContext(),this.updateAccountBadge(),this.updateGlobalActivityBadge(),this.onDidChangeConflicts(this.userDataSyncService.conflicts),this._register(_.Event.any(_.Event.debounce(he.onDidChangeStatus,()=>{},500),this.userDataSyncEnablementService.onDidChangeEnablement,this.userDataSyncWorkbenchService.onDidChangeAccountStatus)(()=>{this.updateAccountBadge(),this.updateGlobalActivityBadge()})),this._register(he.onDidChangeConflicts(()=>this.onDidChangeConflicts(this.userDataSyncService.conflicts))),this._register(ve.onDidChangeEnablement(()=>this.onDidChangeConflicts(this.userDataSyncService.conflicts))),this._register(he.onSyncErrors(qe=>this.onSynchronizerErrors(qe))),this._register(Ne.onError(qe=>this.onAutoSyncError(qe))),this.registerActions(),this.registerViews(),xe.registerTextModelContentProvider(n.USER_DATA_SYNC_SCHEME,De.createInstance(me)),(0,I.registerEditorContribution)(be.ID,be),this._register(_.Event.any(he.onDidChangeStatus,ve.onDidChangeEnablement)(()=>this.turningOnSync=!ve.isEnabled()&&he.status!=="idle")))}get turningOnSync(){return!!this.turningOnSyncContext.get()}set turningOnSync(ve){this.turningOnSyncContext.set(ve),this.updateGlobalActivityBadge()}async initializeSyncAfterInitializationContext(){await this.userDataInitializationService.requiresInitialization()&&!this.userDataSyncEnablementService.isEnabled()?this.updateSyncAfterInitializationContext(!0):this.updateSyncAfterInitializationContext(this.storageService.getBoolean(oe.key,0,!1));const he=this._register(this.userDataSyncEnablementService.onDidChangeEnablement(()=>{this.userDataSyncEnablementService.isEnabled()&&(this.updateSyncAfterInitializationContext(!1),he.dispose())}))}async updateSyncAfterInitializationContext(ve){this.storageService.store(oe.key,ve,0,1),this.syncAfterInitializationContext.set(ve),this.updateGlobalActivityBadge()}onDidChangeConflicts(ve){if(!!this.userDataSyncEnablementService.isEnabled())if(this.updateGlobalActivityBadge(),ve.length){const he=ve.map(([ge])=>ge);this.conflictsSources.set(he.join(",")),he.indexOf("snippets")!==-1&&this.registerShowSnippetsConflictsAction(),this.conflictsDisposables.forEach((ge,de)=>{he.indexOf(de)===-1&&(ge.dispose(),this.conflictsDisposables.delete(de))});for(const[ge,de]of this.userDataSyncService.conflicts){const Se=this.getConflictsEditorInputs(ge);if(Se.length)Se.forEach(we=>{de.some(({previewResource:ye})=>(0,k.isEqual)(ye,we.primary.resource))||we.dispose()});else if(!this.conflictsDisposables.has(ge)){const we=(0,U.getSyncAreaLabel)(ge),ye=this.notificationService.prompt(p.Severity.Warning,(0,o.localize)(12,null,we.toLowerCase()),[{label:(0,o.localize)(13,null),run:()=>{this.telemetryService.publicLog2("sync/handleConflicts",{source:ge,action:"acceptLocal"}),this.acceptLocal(ge,de)}},{label:(0,o.localize)(14,null),run:()=>{this.telemetryService.publicLog2("sync/handleConflicts",{source:ge,action:"acceptRemote"}),this.acceptRemote(ge,de)}},{label:(0,o.localize)(15,null),run:()=>{this.telemetryService.publicLog2("sync/showConflicts",{source:ge}),this.handleConflicts([ge,de])}}],{sticky:!0});this.conflictsDisposables.set(ge,(0,A.toDisposable)(()=>{ye.close();const ke=this.getConflictsEditorInputs(ge);ke.length&&ke.forEach(Ie=>Ie.dispose()),this.conflictsDisposables.delete(ge)}))}}}else this.conflictsSources.reset(),this.getAllConflictsEditorInputs().forEach(he=>he.dispose()),this.conflictsDisposables.forEach(he=>he.dispose()),this.conflictsDisposables.clear()}async acceptRemote(ve,he){try{for(const ge of he)await this.userDataSyncService.accept(ve,ge.remoteResource,void 0,this.userDataSyncEnablementService.isEnabled())}catch{this.notificationService.error((0,o.localize)(16,null,`command:${U.SHOW_SYNC_LOG_COMMAND_ID}`))}}async acceptLocal(ve,he){try{for(const ge of he)await this.userDataSyncService.accept(ve,ge.localResource,void 0,this.userDataSyncEnablementService.isEnabled())}catch{this.notificationService.error((0,o.localize)(17,null,`command:${U.SHOW_SYNC_LOG_COMMAND_ID}`))}}onAutoSyncError(ve){switch(ve.code){case"SessionExpired":this.notificationService.notify({severity:p.Severity.Info,message:(0,o.localize)(18,null),actions:{primary:[new t.Action("turn on sync",(0,o.localize)(19,null),void 0,!0,()=>this.turnOn())]}});break;case"TurnedOff":this.notificationService.notify({severity:p.Severity.Info,message:(0,o.localize)(20,null),actions:{primary:[new t.Action("turn on sync",(0,o.localize)(21,null),void 0,!0,()=>this.turnOn())]}});break;case"TooLarge":if(ve.resource==="keybindings"||ve.resource==="settings"||ve.resource==="tasks"){this.disableSync(ve.resource);const he=(0,U.getSyncAreaLabel)(ve.resource);this.handleTooLargeError(ve.resource,(0,o.localize)(22,null,he.toLowerCase(),he.toLowerCase(),"100kb"),ve)}break;case"IncompatibleLocalContent":case"Gone":case"UpgradeRequired":{const he=(0,o.localize)(23,null,this.productService.version,this.productService.commit),ge=ve.operationId?(0,o.localize)(24,null,ve.operationId):void 0;this.notificationService.notify({severity:p.Severity.Error,message:ge?`${he} ${ge}`:he});break}case"IncompatibleRemoteContent":this.notificationService.notify({severity:p.Severity.Error,message:(0,o.localize)(25,null),actions:{primary:[new t.Action("reset",(0,o.localize)(26,null),void 0,!0,()=>this.userDataSyncWorkbenchService.resetSyncedData()),new t.Action("show synced data",(0,o.localize)(27,null),void 0,!0,()=>this.userDataSyncWorkbenchService.showSyncActivity())]}});return;case"ServiceChanged":this.notificationService.notify({severity:p.Severity.Info,message:this.userDataSyncStoreManagementService.userDataSyncStore?.type==="insiders"?(0,o.localize)(28,null):(0,o.localize)(29,null)});return;case"DefaultServiceChanged":this.userDataSyncEnablementService.isEnabled()?this.notificationService.notify({severity:p.Severity.Info,message:(0,o.localize)(30,null)}):this.notificationService.notify({severity:p.Severity.Info,message:(0,o.localize)(31,null,this.productService.nameLong),actions:{primary:[new t.Action("turn on sync",(0,o.localize)(32,null),void 0,!0,()=>this.turnOn())]}});return}}handleTooLargeError(ve,he,ge){const de=ge.operationId?(0,o.localize)(33,null,ge.operationId):void 0;this.notificationService.notify({severity:p.Severity.Error,message:de?`${he} ${de}`:he,actions:{primary:[new t.Action("open sync file",(0,o.localize)(34,null,(0,U.getSyncAreaLabel)(ve)),void 0,!0,()=>ve==="settings"?this.preferencesService.openUserSettings({jsonEditor:!0}):this.preferencesService.openGlobalKeybindingSettings(!0))]}})}onSynchronizerErrors(ve){if(ve.length)for(const[he,ge]of ve)switch(ge.code){case"LocalInvalidContent":this.handleInvalidContentError(he);break;default:{const de=this.invalidContentErrorDisposables.get(he);de&&(de.dispose(),this.invalidContentErrorDisposables.delete(he))}}else this.invalidContentErrorDisposables.forEach(he=>he.dispose()),this.invalidContentErrorDisposables.clear()}handleInvalidContentError(ve){if(this.invalidContentErrorDisposables.has(ve)||ve!=="settings"&&ve!=="keybindings"&&ve!=="tasks"||!this.hostService.hasFocus)return;const he=ve==="settings"?this.environmentService.settingsResource:this.environmentService.keybindingsResource;if((0,k.isEqual)(he,g.EditorResourceAccessor.getCanonicalUri(this.editorService.activeEditor,{supportSideBySide:g.SideBySideEditor.PRIMARY})))return;const ge=(0,U.getSyncAreaLabel)(ve),de=this.notificationService.notify({severity:p.Severity.Error,message:(0,o.localize)(35,null,ge.toLowerCase()),actions:{primary:[new t.Action("open sync file",(0,o.localize)(36,null,ge),void 0,!0,()=>ve==="settings"?this.preferencesService.openUserSettings({jsonEditor:!0}):this.preferencesService.openGlobalKeybindingSettings(!0))]}});this.invalidContentErrorDisposables.set(ve,(0,A.toDisposable)(()=>{de.close(),this.invalidContentErrorDisposables.delete(ve)}))}async updateGlobalActivityBadge(){this.globalActivityBadgeDisposable.clear();let ve,he,ge;this.userDataSyncService.conflicts.length&&this.userDataSyncEnablementService.isEnabled()?ve=new E.NumberBadge(this.userDataSyncService.conflicts.reduce((de,[,Se])=>de+Se.length,0),()=>(0,o.localize)(37,null,U.SYNC_TITLE)):this.turningOnSync?(ve=new E.ProgressBadge(()=>(0,o.localize)(38,null)),he="progress-badge",ge=1):this.userDataSyncWorkbenchService.accountStatus==="available"&&this.syncAfterInitializationContext.get()&&!this.userDataSyncEnablementService.isEnabled()&&(ve=new E.NumberBadge(1,()=>(0,o.localize)(39,null,U.SYNC_TITLE))),ve&&(this.globalActivityBadgeDisposable.value=this.activityService.showGlobalActivity({badge:ve,clazz:he,priority:ge}))}async updateAccountBadge(){this.accountBadgeDisposable.clear();let ve;this.userDataSyncService.status!=="uninitialized"&&this.userDataSyncEnablementService.isEnabled()&&this.userDataSyncWorkbenchService.accountStatus==="unavailable"&&(ve=new E.NumberBadge(1,()=>(0,o.localize)(40,null))),ve&&(this.accountBadgeDisposable.value=this.activityService.showAccountsActivity({badge:ve,clazz:void 0,priority:void 0}))}async turnOnSyncAfterInitialization(){this.updateSyncAfterInitializationContext(!1),(await this.dialogService.show(p.Severity.Info,(0,o.localize)(41,null),[(0,o.localize)(42,null),(0,o.localize)(43,null)],{cancelId:1,custom:{markdownDetails:[{markdown:new j.MarkdownString(`${(0,o.localize)(44,null)}`,{isTrusted:!0})},{markdown:new j.MarkdownString(`${(0,o.localize)(45,null)} [${(0,o.localize)(46,null)}](https://aka.ms/vscode-settings-sync-help).`,{isTrusted:!0})}]}})).choice===0&&await this.userDataSyncWorkbenchService.turnOnUsingCurrentAccount()}async turnOn(){try{if(!this.userDataSyncWorkbenchService.authenticationProviders.length)throw new Error((0,o.localize)(47,null));if(!await this.askToConfigure())return;this.userDataSyncStoreManagementService.userDataSyncStore?.canSwitch&&await this.selectSettingsSyncService(this.userDataSyncStoreManagementService.userDataSyncStore),await this.userDataSyncWorkbenchService.turnOn()}catch(ve){if((0,f.isCancellationError)(ve))return;if(ve instanceof n.UserDataSyncError){switch(ve.code){case"TooLarge":if(ve.resource==="keybindings"||ve.resource==="settings"||ve.resource==="tasks"){this.handleTooLargeError(ve.resource,(0,o.localize)(48,null,(0,U.getSyncAreaLabel)(ve.resource).toLowerCase(),"100kb"),ve);return}break;case"IncompatibleLocalContent":case"Gone":case"UpgradeRequired":{const he=(0,o.localize)(49,null,this.productService.version,this.productService.commit),ge=ve.operationId?(0,o.localize)(50,null,ve.operationId):void 0;this.notificationService.notify({severity:p.Severity.Error,message:ge?`${he} ${ge}`:he});return}case"IncompatibleRemoteContent":this.notificationService.notify({severity:p.Severity.Error,message:(0,o.localize)(51,null),actions:{primary:[new t.Action("reset",(0,o.localize)(52,null),void 0,!0,()=>this.userDataSyncWorkbenchService.resetSyncedData()),new t.Action("show synced data",(0,o.localize)(53,null),void 0,!0,()=>this.userDataSyncWorkbenchService.showSyncActivity())]}});return;case"Unauthorized":this.notificationService.error((0,o.localize)(54,null));return}this.notificationService.error((0,o.localize)(55,null,`command:${U.SHOW_SYNC_LOG_COMMAND_ID}`))}else this.notificationService.error((0,o.localize)(56,null,(0,f.getErrorMessage)(ve)))}}async askToConfigure(){return new Promise((ve,he)=>{const ge=new A.DisposableStore,de=this.quickInputService.createQuickPick();ge.add(de),de.title=U.SYNC_TITLE,de.ok=!1,de.customButton=!0,de.customLabel=(0,o.localize)(57,null),de.description=(0,o.localize)(58,null),de.canSelectMany=!0,de.ignoreFocusOut=!0,de.hideInput=!0,de.hideCheckAll=!0;const Se=this.getConfigureSyncQuickPickItems();de.items=Se,de.selectedItems=Se.filter(ye=>this.userDataSyncEnablementService.isResourceEnabled(ye.id));let we=!1;ge.add(_.Event.any(de.onDidAccept,de.onDidCustom)(()=>{we=!0,de.hide()})),ge.add(de.onDidHide(()=>{try{we&&this.updateConfiguration(Se,de.selectedItems),ve(we)}catch(ye){he(ye)}finally{ge.dispose()}})),de.show()})}getConfigureSyncQuickPickItems(){return[{id:"settings",label:(0,U.getSyncAreaLabel)("settings")},{id:"keybindings",label:(0,U.getSyncAreaLabel)("keybindings"),description:this.configurationService.getValue("settingsSync.keybindingsPerPlatform")?(0,o.localize)(59,null):void 0},{id:"snippets",label:(0,U.getSyncAreaLabel)("snippets")},{id:"tasks",label:(0,U.getSyncAreaLabel)("tasks")},{id:"extensions",label:(0,U.getSyncAreaLabel)("extensions")},{id:"globalState",label:(0,U.getSyncAreaLabel)("globalState")}]}updateConfiguration(ve,he){for(const ge of ve){const de=this.userDataSyncEnablementService.isResourceEnabled(ge.id),Se=!!he.filter(we=>we.id===ge.id)[0];de!==Se&&this.userDataSyncEnablementService.setResourceEnablement(ge.id,Se)}}async configureSyncOptions(){return new Promise((ve,he)=>{const ge=new A.DisposableStore,de=this.quickInputService.createQuickPick();ge.add(de),de.title=(0,o.localize)(60,null,U.SYNC_TITLE),de.placeholder=(0,o.localize)(61,null),de.canSelectMany=!0,de.ignoreFocusOut=!0,de.ok=!0;const Se=this.getConfigureSyncQuickPickItems();de.items=Se,de.selectedItems=Se.filter(we=>this.userDataSyncEnablementService.isResourceEnabled(we.id)),ge.add(de.onDidAccept(async()=>{de.selectedItems.length&&(this.updateConfiguration(Se,de.selectedItems),de.hide())})),ge.add(de.onDidHide(()=>{ge.dispose(),ve()})),de.show()})}async turnOff(){const ve=await this.dialogService.confirm({type:"info",message:(0,o.localize)(62,null),detail:(0,o.localize)(63,null),primaryButton:(0,o.localize)(64,null),checkbox:this.userDataSyncWorkbenchService.accountStatus==="available"?{label:(0,o.localize)(65,null)}:void 0});if(ve.confirmed)return this.userDataSyncWorkbenchService.turnoff(!!ve.checkboxChecked)}disableSync(ve){switch(ve){case"settings":return this.userDataSyncEnablementService.setResourceEnablement("settings",!1);case"keybindings":return this.userDataSyncEnablementService.setResourceEnablement("keybindings",!1);case"snippets":return this.userDataSyncEnablementService.setResourceEnablement("snippets",!1);case"tasks":return this.userDataSyncEnablementService.setResourceEnablement("tasks",!1);case"extensions":return this.userDataSyncEnablementService.setResourceEnablement("extensions",!1);case"globalState":return this.userDataSyncEnablementService.setResourceEnablement("globalState",!1)}}getConflictsEditorInputs(ve){return this.editorService.editors.filter(he=>{const ge=he instanceof d.DiffEditorInput?he.primary.resource:he.resource;return ge&&(0,n.getSyncResourceFromLocalPreview)(ge,this.environmentService)===ve})}getAllConflictsEditorInputs(){return this.editorService.editors.filter(ve=>{const he=ve instanceof d.DiffEditorInput?ve.primary.resource:ve.resource;return he&&(0,n.getSyncResourceFromLocalPreview)(he,this.environmentService)!==void 0})}async handleSyncResourceConflicts(ve){const he=this.userDataSyncService.conflicts.filter(([ge])=>ge===ve)[0];he&&this.handleConflicts(he)}async handleConflicts([ve,he]){for(const ge of he){const de=(0,o.localize)(66,null,(0,k.basename)(ge.remoteResource)),Se=(0,o.localize)(67,null,(0,k.basename)(ge.previewResource));await this.editorService.openEditor({original:{resource:ge.remoteResource},modified:{resource:ge.previewResource},label:(0,o.localize)(68,null,de,Se),description:(0,o.localize)(69,null),options:{preserveFocus:!1,pinned:!0,revealIfVisible:!0,override:G.EditorResolution.DISABLED}})}}showSyncActivity(){return this.outputService.showChannel(m.userDataSyncLogChannelId)}async selectSettingsSyncService(ve){return new Promise((he,ge)=>{const de=new A.DisposableStore,Se=de.add(this.quickInputService.createQuickPick());Se.title=(0,o.localize)(70,null,U.SYNC_TITLE),Se.description=(0,o.localize)(71,null),Se.hideInput=!0,Se.ignoreFocusOut=!0;const we=ye=>{if((0,k.isEqual)(ye,ve.defaultUrl))return(0,o.localize)(72,null)};Se.items=[{id:"insiders",label:(0,o.localize)(73,null),description:we(ve.insidersUrl)},{id:"stable",label:(0,o.localize)(74,null),description:we(ve.stableUrl)}],de.add(Se.onDidAccept(async()=>{try{await this.userDataSyncStoreManagementService.switch(Se.selectedItems[0].id),he()}catch(ye){ge(ye)}finally{Se.hide()}})),de.add(Se.onDidHide(()=>de.dispose())),Se.show()})}registerActions(){this.userDataSyncEnablementService.canToggleEnablement()&&(this.registerTurnOnSyncAction(),this.registerTurnOffSyncAction(),this.registerTurnOnSyncAfterInitializationAction()),this.registerTurningOnSyncAction(),this.registerSignInAction(),this.registerShowSettingsConflictsAction(),this.registerShowKeybindingsConflictsAction(),this.registerShowSnippetsConflictsAction(),this.registerShowTasksConflictsAction(),this.registerEnableSyncViewsAction(),this.registerManageSyncAction(),this.registerSyncNowAction(),this.registerConfigureSyncAction(),this.registerShowSettingsAction(),this.registerHelpAction(),this.registerShowLogAction(),this.registerResetSyncDataAction()}registerTurnOnSyncAction(){const ve=s.ContextKeyExpr.and(U.CONTEXT_SYNC_STATE.notEqualsTo("uninitialized"),U.CONTEXT_SYNC_ENABLEMENT.toNegated(),U.CONTEXT_ACCOUNT_STATE.notEqualsTo("uninitialized"),fe.negate());i.CommandsRegistry.registerCommand($.id,()=>this.turnOn()),c.MenuRegistry.appendMenuItem(c.MenuId.GlobalActivity,{group:"5_sync",command:{id:$.id,title:(0,o.localize)(75,null)},when:s.ContextKeyExpr.and(ve,oe.negate()),order:1}),c.MenuRegistry.appendMenuItem(c.MenuId.CommandPalette,{command:$,when:ve}),c.MenuRegistry.appendMenuItem(c.MenuId.MenubarPreferencesMenu,{group:"5_sync",command:{id:$.id,title:(0,o.localize)(76,null)},when:ve}),c.MenuRegistry.appendMenuItem(c.MenuId.AccountsContext,{group:"1_sync",command:{id:$.id,title:(0,o.localize)(77,null)},when:ve})}registerTurnOnSyncAfterInitializationAction(){const ve=this,he="workbench.userData.actions.askToTunrOnAfterInit",ge=s.ContextKeyExpr.and(U.CONTEXT_SYNC_STATE.notEqualsTo("uninitialized"),U.CONTEXT_SYNC_ENABLEMENT.toNegated(),U.CONTEXT_ACCOUNT_STATE.isEqualTo("available"),fe.negate(),oe);this._register((0,c.registerAction2)(class extends c.Action2{constructor(){super({id:he,title:(0,o.localize)(78,null),menu:{group:"5_sync",id:c.MenuId.GlobalActivity,when:ge,order:2}})}async run(){try{await ve.turnOnSyncAfterInitialization()}catch(Se){ve.notificationService.error(Se)}}}))}registerTurningOnSyncAction(){const ve=s.ContextKeyExpr.and(U.CONTEXT_SYNC_STATE.notEqualsTo("uninitialized"),U.CONTEXT_SYNC_ENABLEMENT.toNegated(),U.CONTEXT_ACCOUNT_STATE.notEqualsTo("uninitialized"),fe);this._register((0,c.registerAction2)(class extends c.Action2{constructor(){super({id:"workbench.userData.actions.turningOn",title:(0,o.localize)(79,null),precondition:s.ContextKeyExpr.false(),menu:[{group:"5_sync",id:c.MenuId.GlobalActivity,when:ve,order:2},{group:"1_sync",id:c.MenuId.AccountsContext,when:ve}]})}async run(){}}))}registerSignInAction(){const ve=this,he="workbench.userData.actions.signin",ge=s.ContextKeyExpr.and(U.CONTEXT_SYNC_STATE.notEqualsTo("uninitialized"),U.CONTEXT_SYNC_ENABLEMENT,U.CONTEXT_ACCOUNT_STATE.isEqualTo("unavailable"));this._register((0,c.registerAction2)(class extends c.Action2{constructor(){super({id:"workbench.userData.actions.signin",title:(0,o.localize)(80,null),menu:{group:"5_sync",id:c.MenuId.GlobalActivity,when:ge,order:2}})}async run(){try{await ve.userDataSyncWorkbenchService.signIn()}catch(Se){ve.notificationService.error(Se)}}})),this._register(c.MenuRegistry.appendMenuItem(c.MenuId.AccountsContext,{group:"1_sync",command:{id:he,title:(0,o.localize)(81,null)},when:ge}))}registerShowSettingsConflictsAction(){const ve=s.ContextKeyExpr.regex(Y.keys()[0],/.*settings.*/i);i.CommandsRegistry.registerCommand(te.id,()=>this.handleSyncResourceConflicts("settings")),c.MenuRegistry.appendMenuItem(c.MenuId.GlobalActivity,{group:"5_sync",command:{id:te.id,title:(0,o.localize)(82,null,U.SYNC_TITLE)},when:ve,order:2}),c.MenuRegistry.appendMenuItem(c.MenuId.MenubarPreferencesMenu,{group:"5_sync",command:{id:te.id,title:(0,o.localize)(83,null,U.SYNC_TITLE)},when:ve,order:2}),c.MenuRegistry.appendMenuItem(c.MenuId.CommandPalette,{command:te,when:ve})}registerShowKeybindingsConflictsAction(){const ve=s.ContextKeyExpr.regex(Y.keys()[0],/.*keybindings.*/i);i.CommandsRegistry.registerCommand(se.id,()=>this.handleSyncResourceConflicts("keybindings")),c.MenuRegistry.appendMenuItem(c.MenuId.GlobalActivity,{group:"5_sync",command:{id:se.id,title:(0,o.localize)(84,null,U.SYNC_TITLE)},when:ve,order:2}),c.MenuRegistry.appendMenuItem(c.MenuId.MenubarPreferencesMenu,{group:"5_sync",command:{id:se.id,title:(0,o.localize)(85,null,U.SYNC_TITLE)},when:ve,order:2}),c.MenuRegistry.appendMenuItem(c.MenuId.CommandPalette,{command:se,when:ve})}registerShowTasksConflictsAction(){const ve=s.ContextKeyExpr.regex(Y.keys()[0],/.*tasks.*/i);i.CommandsRegistry.registerCommand(ce.id,()=>this.handleSyncResourceConflicts("tasks")),c.MenuRegistry.appendMenuItem(c.MenuId.GlobalActivity,{group:"5_sync",command:{id:ce.id,title:(0,o.localize)(86,null,U.SYNC_TITLE)},when:ve,order:2}),c.MenuRegistry.appendMenuItem(c.MenuId.MenubarPreferencesMenu,{group:"5_sync",command:{id:se.id,title:(0,o.localize)(87,null,U.SYNC_TITLE)},when:ve,order:2}),c.MenuRegistry.appendMenuItem(c.MenuId.CommandPalette,{command:ce,when:ve})}registerShowSnippetsConflictsAction(){this._snippetsConflictsActionsDisposable.clear();const ve=s.ContextKeyExpr.regex(Y.keys()[0],/.*snippets.*/i),he=this.userDataSyncService.conflicts.filter(([ge])=>ge==="snippets")[0]?.[1];this._snippetsConflictsActionsDisposable.add(i.CommandsRegistry.registerCommand(ie.id,()=>this.handleSyncResourceConflicts("snippets"))),this._snippetsConflictsActionsDisposable.add(c.MenuRegistry.appendMenuItem(c.MenuId.GlobalActivity,{group:"5_sync",command:{id:ie.id,title:(0,o.localize)(88,null,U.SYNC_TITLE,he?.length||1)},when:ve,order:2})),this._snippetsConflictsActionsDisposable.add(c.MenuRegistry.appendMenuItem(c.MenuId.MenubarPreferencesMenu,{group:"5_sync",command:{id:ie.id,title:(0,o.localize)(89,null,U.SYNC_TITLE,he?.length||1)},when:ve,order:2})),this._snippetsConflictsActionsDisposable.add(c.MenuRegistry.appendMenuItem(c.MenuId.CommandPalette,{command:ie,when:ve}))}registerManageSyncAction(){const ve=this,he=s.ContextKeyExpr.and(U.CONTEXT_SYNC_ENABLEMENT,U.CONTEXT_ACCOUNT_STATE.isEqualTo("available"),U.CONTEXT_SYNC_STATE.notEqualsTo("uninitialized"));this._register((0,c.registerAction2)(class extends c.Action2{constructor(){super({id:"workbench.userDataSync.actions.manage",title:(0,o.localize)(90,null),menu:[{id:c.MenuId.GlobalActivity,group:"5_sync",when:he,order:3},{id:c.MenuId.MenubarPreferencesMenu,group:"5_sync",when:he,order:3},{id:c.MenuId.AccountsContext,group:"1_sync",when:he}]})}run(de){return new Promise((Se,we)=>{const ye=de.get(u.IQuickInputService),ke=de.get(i.ICommandService),Ie=new A.DisposableStore,Te=ye.createQuickPick();Ie.add(Te);const De=[];if(ve.userDataSyncService.conflicts.length){for(const[_e]of ve.userDataSyncService.conflicts)switch(_e){case"settings":De.push({id:te.id,label:te.title});break;case"keybindings":De.push({id:se.id,label:se.title});break;case"snippets":De.push({id:ie.id,label:ie.title});break;case"tasks":De.push({id:ce.id,label:ce.title});break}De.push({type:"separator"})}if(De.push({id:ee.id,label:ee.title}),De.push({id:ae.id,label:ae.title}),De.push({id:ue.id,label:ue.title}),De.push({type:"separator"}),De.push({id:le.id,label:le.title,description:le.description(ve.userDataSyncService)}),ve.userDataSyncEnablementService.canToggleEnablement()){const _e=ve.userDataSyncWorkbenchService.current;De.push({id:J.id,label:J.title,description:_e?`${_e.accountName} (${ve.authenticationService.getLabel(_e.authenticationProviderId)})`:void 0})}Te.items=De,Ie.add(Te.onDidAccept(()=>{Te.selectedItems[0]&&Te.selectedItems[0].id&&ke.executeCommand(Te.selectedItems[0].id),Te.hide()})),Ie.add(Te.onDidHide(()=>{Ie.dispose(),Se()})),Te.show()})}}))}registerEnableSyncViewsAction(){const ve=this,he=s.ContextKeyExpr.and(U.CONTEXT_ACCOUNT_STATE.isEqualTo("available"),U.CONTEXT_SYNC_STATE.notEqualsTo("uninitialized"));this._register((0,c.registerAction2)(class extends c.Action2{constructor(){super({id:ue.id,title:{value:(0,o.localize)(91,null),original:"Show Synced Data"},category:{value:U.SYNC_TITLE,original:"Settings Sync"},precondition:he,menu:{id:c.MenuId.CommandPalette,when:he}})}run(de){return ve.userDataSyncWorkbenchService.showSyncActivity()}}))}registerSyncNowAction(){const ve=this;this._register((0,c.registerAction2)(class extends c.Action2{constructor(){super({id:le.id,title:le.title,menu:{id:c.MenuId.CommandPalette,when:s.ContextKeyExpr.and(U.CONTEXT_SYNC_ENABLEMENT,U.CONTEXT_ACCOUNT_STATE.isEqualTo("available"),U.CONTEXT_SYNC_STATE.notEqualsTo("uninitialized"))}})}run(ge){return ve.userDataSyncWorkbenchService.syncNow()}}))}registerTurnOffSyncAction(){const ve=this;this._register((0,c.registerAction2)(class extends c.Action2{constructor(){super({id:J.id,title:J.title,menu:{id:c.MenuId.CommandPalette,when:s.ContextKeyExpr.and(U.CONTEXT_SYNC_STATE.notEqualsTo("uninitialized"),U.CONTEXT_SYNC_ENABLEMENT)}})}async run(){try{await ve.turnOff()}catch(ge){(0,f.isCancellationError)(ge)||ve.notificationService.error((0,o.localize)(92,null,`command:${U.SHOW_SYNC_LOG_COMMAND_ID}`))}}}))}registerConfigureSyncAction(){const ve=this,he=s.ContextKeyExpr.and(U.CONTEXT_SYNC_STATE.notEqualsTo("uninitialized"),U.CONTEXT_SYNC_ENABLEMENT);this._register((0,c.registerAction2)(class extends c.Action2{constructor(){super({id:ee.id,title:ee.title,icon:H.Codicon.settingsGear,tooltip:(0,o.localize)(93,null),menu:[{id:c.MenuId.CommandPalette,when:he},{id:c.MenuId.ViewContainerTitle,when:s.ContextKeyExpr.equals("viewContainer",U.SYNC_VIEW_CONTAINER_ID),group:"navigation",order:2}]})}run(){return ve.configureSyncOptions()}}))}registerShowLogAction(){const ve=this;this._register((0,c.registerAction2)(class extends c.Action2{constructor(){super({id:U.SHOW_SYNC_LOG_COMMAND_ID,title:(0,o.localize)(94,null,U.SYNC_TITLE),tooltip:(0,o.localize)(95,null),icon:H.Codicon.output,menu:[{id:c.MenuId.CommandPalette,when:s.ContextKeyExpr.and(U.CONTEXT_SYNC_STATE.notEqualsTo("uninitialized"))},{id:c.MenuId.ViewContainerTitle,when:s.ContextKeyExpr.equals("viewContainer",U.SYNC_VIEW_CONTAINER_ID),group:"navigation",order:1}]})}run(){return ve.showSyncActivity()}}))}registerShowSettingsAction(){this._register((0,c.registerAction2)(class extends c.Action2{constructor(){super({id:ae.id,title:ae.title,menu:{id:c.MenuId.CommandPalette,when:s.ContextKeyExpr.and(U.CONTEXT_SYNC_STATE.notEqualsTo("uninitialized"))}})}run(he){he.get(R.IPreferencesService).openUserSettings({jsonEditor:!1,query:"@tag:sync"})}}))}registerHelpAction(){const ve=this;this._register((0,c.registerAction2)(class extends c.Action2{constructor(){super({id:"workbench.userDataSync.actions.help",title:{value:U.SYNC_TITLE,original:"Settings Sync"},category:q.CATEGORIES.Help,menu:[{id:c.MenuId.CommandPalette,when:s.ContextKeyExpr.and(U.CONTEXT_SYNC_STATE.notEqualsTo("uninitialized"))}]})}run(){return ve.openerService.open(D.URI.parse("https://aka.ms/vscode-settings-sync-help"))}})),c.MenuRegistry.appendMenuItem(c.MenuId.ViewContainerTitle,{command:{id:"workbench.userDataSync.actions.help",title:q.CATEGORIES.Help.value},when:s.ContextKeyExpr.equals("viewContainer",U.SYNC_VIEW_CONTAINER_ID),group:"1_help"})}registerViews(){const ve=this.registerViewContainer();this.registerDataViews(ve)}registerViewContainer(){return B.Registry.as(V.Extensions.ViewContainersRegistry).registerViewContainer({id:U.SYNC_VIEW_CONTAINER_ID,title:U.SYNC_TITLE,ctorDescriptor:new P.SyncDescriptor(K.ViewPaneContainer,[U.SYNC_VIEW_CONTAINER_ID,{mergeViewWithContainerWhenSingleView:!0}]),icon:U.SYNC_VIEW_ICON,hideIfEmpty:!0},0)}registerResetSyncDataAction(){const ve=this;this._register((0,c.registerAction2)(class extends c.Action2{constructor(){super({id:"workbench.actions.syncData.reset",title:(0,o.localize)(96,null),menu:[{id:c.MenuId.ViewContainerTitle,when:s.ContextKeyExpr.equals("viewContainer",U.SYNC_VIEW_CONTAINER_ID),group:"0_configure"}]})}run(){return ve.userDataSyncWorkbenchService.resetSyncedData()}}))}registerDataViews(ve){this._register(this.instantiationService.createInstance(z.UserDataSyncDataViews,ve))}};pe=Ee([W(0,n.IUserDataSyncEnablementService),W(1,n.IUserDataSyncService),W(2,U.IUserDataSyncWorkbenchService),W(3,s.IContextKeyService),W(4,E.IActivityService),W(5,p.INotificationService),W(6,y.IEditorService),W(7,T.IWorkbenchEnvironmentService),W(8,l.IDialogService),W(9,u.IQuickInputService),W(10,r.IInstantiationService),W(11,b.IOutputService),W(12,O.IUserDataSyncAccountService),W(13,n.IUserDataAutoSyncService),W(14,C.ITextModelService),W(15,R.IPreferencesService),W(16,a.ITelemetryService),W(17,F.IProductService),W(18,L.IStorageService),W(19,M.IOpenerService),W(20,N.IAuthenticationService),W(21,n.IUserDataSyncStoreManagementService),W(22,S.IConfigurationService),W(23,Z.IUserDataInitializationService),W(24,X.IHostService)],pe),e.UserDataSyncWorkbenchContribution=pe;let me=class{constructor(ve,he,ge){this.userDataSyncService=ve,this.modelService=he,this.languageService=ge}provideTextContent(ve){return ve.scheme===n.USER_DATA_SYNC_SCHEME?this.userDataSyncService.resolveContent(ve).then(he=>this.modelService.createModel(he||"",this.languageService.createById("jsonc"),ve)):null}};me=Ee([W(0,n.IUserDataSyncService),W(1,w.IModelService),W(2,v.ILanguageService)],me);let be=class Dl extends A.Disposable{constructor(ve,he,ge,de,Se,we,ye,ke){super();this.editor=ve,this.instantiationService=he,this.userDataSyncService=ge,this.notificationService=de,this.dialogService=Se,this.configurationService=we,this.telemetryService=ye,this.userDataSyncEnablementService=ke,this.update(),this.registerListeners()}static get(ve){return ve.getContribution(Dl.ID)}registerListeners(){this._register(this.editor.onDidChangeModel(()=>this.update())),this._register(this.userDataSyncService.onDidChangeConflicts(()=>this.update())),this._register(_.Event.filter(this.configurationService.onDidChangeConfiguration,ve=>ve.affectsConfiguration("diffEditor.renderSideBySide"))(()=>this.update()))}update(){if(!this.shouldShowButton(this.editor)){this.disposeAcceptChangesWidgetRenderer();return}this.createAcceptChangesWidgetRenderer()}shouldShowButton(ve){const he=ve.getModel();if(!he||!this.userDataSyncEnablementService.isEnabled())return!1;const ge=this.getSyncResourceConflicts(he.uri);return ge?ge[1].some(({previewResource:de})=>(0,k.isEqual)(de,he.uri))?!0:ge[1].some(({remoteResource:de})=>(0,k.isEqual)(de,he.uri))?this.configurationService.getValue("diffEditor.renderSideBySide"):!1:!1}createAcceptChangesWidgetRenderer(){if(!this.acceptChangesButton){const ve=this.editor.getModel().uri,[he,ge]=this.getSyncResourceConflicts(ve),de=ge.some(({remoteResource:Ie})=>(0,k.isEqual)(Ie,ve)),Se=(0,o.localize)(97,null),we=(0,o.localize)(98,null),ye=(0,o.localize)(99,null),ke=(0,o.localize)(100,null);this.acceptChangesButton=this.instantiationService.createInstance(h.FloatingClickWidget,this.editor,de?Se:we,null),this._register(this.acceptChangesButton.onClick(async()=>{const Ie=this.editor.getModel();if(Ie){this.telemetryService.publicLog2("sync/handleConflicts",{source:he,action:de?"acceptRemote":"acceptLocal"});const Te=(0,U.getSyncAreaLabel)(he);if((await this.dialogService.confirm({type:"info",title:de?(0,o.localize)(101,null,U.SYNC_TITLE,Se):(0,o.localize)(102,null,U.SYNC_TITLE,we),message:de?(0,o.localize)(103,null,Te.toLowerCase(),Te.toLowerCase()):(0,o.localize)(104,null,Te.toLowerCase()),primaryButton:de?ye:ke})).confirmed)try{await this.userDataSyncService.accept(he,Ie.uri,Ie.getValue(),!0)}catch(_e){_e instanceof n.UserDataSyncError&&_e.code==="LocalPreconditionFailed"?this.userDataSyncService.conflicts.filter(Ne=>Ne[0]===he)[0]&&ge.some(Ne=>(0,k.isEqual)(Ne.previewResource,Ie.uri)||(0,k.isEqual)(Ne.remoteResource,Ie.uri))&&this.notificationService.warn((0,o.localize)(105,null)):this.notificationService.error((0,o.localize)(106,null,`command:${U.SHOW_SYNC_LOG_COMMAND_ID}`))}}})),this.acceptChangesButton.render()}}getSyncResourceConflicts(ve){return this.userDataSyncService.conflicts.filter(([,he])=>he.some(({previewResource:ge,remoteResource:de})=>(0,k.isEqual)(ge,ve)||(0,k.isEqual)(de,ve)))[0]}disposeAcceptChangesWidgetRenderer(){(0,A.dispose)(this.acceptChangesButton),this.acceptChangesButton=void 0}dispose(){this.disposeAcceptChangesWidgetRenderer(),super.dispose()}};be.ID="editor.contrib.acceptChangesButton",be=Ee([W(1,r.IInstantiationService),W(2,n.IUserDataSyncService),W(3,p.INotificationService),W(4,l.IDialogService),W(5,S.IConfigurationService),W(6,a.ITelemetryService),W(7,n.IUserDataSyncEnablementService)],be)}),define(ne[2789],re([1,0,47,17,2788,96,26,2,1813,14,2505,36,46,28,69,257]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let s=class extends D.Disposable{constructor(p,u,a,n,h){super();this.notificationService=u,this.productService=a,this.commandService=n,this.hostService=h,this._register(p.onError(g=>this.onAutoSyncError(g)))}onAutoSyncError(p){switch(p.code){case"LocalTooManyRequests":{const u=w.isWeb?(0,I.localize)(0,null,this.productService.nameLong):(0,I.localize)(1,null,this.productService.nameLong);this.notificationService.notify({severity:k.Severity.Error,message:u,actions:{primary:[new C.Action("Show Sync Logs",(0,I.localize)(2,null),void 0,!0,()=>this.commandService.executeCommand(S.SHOW_SYNC_LOG_COMMAND_ID)),new C.Action("Restart",w.isWeb?(0,I.localize)(3,null):(0,I.localize)(4,null),void 0,!0,()=>this.hostService.restart())]}});return}case"RemoteTooManyRequests":{const u=p.operationId?(0,I.localize)(5,null,p.operationId):void 0,a=(0,I.localize)(6,null);this.notificationService.notify({severity:k.Severity.Error,message:u?`${a} ${u}`:a,source:p.operationId?(0,I.localize)(7,null,p.operationId):void 0,actions:{primary:[new C.Action("Show Sync Logs",(0,I.localize)(8,null),void 0,!0,()=>this.commandService.executeCommand(S.SHOW_SYNC_LOG_COMMAND_ID))]}});return}}}};s=Ee([W(0,A.IUserDataAutoSyncService),W(1,k.INotificationService),W(2,o.IProductService),W(3,c.ICommandService),W(4,i.IHostService)],s);const l=f.Registry.as(t.Extensions.Workbench);l.registerWorkbenchContribution(_.UserDataSyncWorkbenchContribution,2),l.registerWorkbenchContribution(v.UserDataSyncTrigger,4),l.registerWorkbenchContribution(s,2)}),define(ne[2790],re([1,0,2,14,38,27,1817,17,57,34,47,76,8,377,299,621,80,323,10,392,59,28,13,248,289,275,12,68,7,176,1130]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WatermarkContribution=void 0;const T=r.$,R={text:k.localize(0,null),id:S.ShowAllCommandsAction.ID},O={text:k.localize(1,null),id:"workbench.action.quickOpen"},x={text:k.localize(2,null),id:c.OpenFileAction.ID,mac:!1},F={text:k.localize(3,null),id:c.OpenFolderAction.ID,mac:!1},L={text:k.localize(4,null),id:c.OpenFileFolderAction.ID,mac:!0},M={text:k.localize(5,null),id:i.OpenRecentAction.ID},N={text:k.localize(6,null),id:g.NEW_UNTITLED_FILE_COMMAND_ID},B=Object.assign({mac:!0},N),P={text:k.localize(7,null),id:l.FindInFilesActionId},V={text:k.localize(8,null),id:"workbench.action.terminal.toggleTerminal",when:y.TerminalContextKeys.processSupported},z={text:k.localize(9,null),id:d.DEBUG_START_COMMAND_ID,when:y.TerminalContextKeys.processSupported},U={text:k.localize(10,null),id:"workbench.action.toggleFullScreen",when:y.TerminalContextKeys.processSupported.toNegated()},H={text:k.localize(11,null),id:"workbench.action.openSettings",when:y.TerminalContextKeys.processSupported.toNegated()},K=[R,x,F,L,M,B],G=[R,O,P,z,V,U,H],q="workbench.tips.enabled";let Z=class extends t.Disposable{constructor(X,Y,$,J,ee,te,se,ie,ce){super();this.lifecycleService=X,this.layoutService=Y,this.keybindingService=$,this.contextService=J,this.contextKeyService=ee,this.configurationService=te,this.editorGroupsService=se,this.themeService=ie,this.telemetryService=ce,this.watermarkDisposable=this._register(new t.DisposableStore),this.workbenchState=J.getWorkbenchState(),this.enabled=this.configurationService.getValue(q),this.registerListeners(),this.enabled&&this.create()}registerListeners(){this.lifecycleService.onDidShutdown(()=>this.dispose()),this._register(this.configurationService.onDidChangeConfiguration($=>{if($.affectsConfiguration(q)){const J=this.configurationService.getValue(q);J!==this.enabled&&(this.enabled=J,this.enabled?this.create():this.destroy())}})),this._register(this.contextService.onDidChangeWorkbenchState($=>{const J=this.workbenchState;this.workbenchState=this.contextService.getWorkbenchState(),this.enabled&&this.workbenchState!==J&&this.recreate()}));const X=[...K,...G].filter($=>$.when!==void 0).map($=>$.when),Y=new Set;X.forEach($=>$.keys().forEach(J=>Y.add(J))),this._register(this.contextKeyService.onDidChangeContext($=>{$.affectsSome(Y)&&this.recreate()}))}create(){const X=(0,n.assertIsDefined)(this.layoutService.getContainer("workbench.parts.editor"));X.classList.add("has-watermark"),this.watermark=T(".watermark");const Y=r.append(this.watermark,T(".watermark-box")),J=(this.workbenchState!==1?G:K).filter(se=>!("when"in se)||this.contextKeyService.contextMatchesRules(se.when)).filter(se=>!("mac"in se)||se.mac===(f.isMacintosh&&!f.isWeb)).filter(se=>!!a.CommandsRegistry.getCommand(se.id)),ee=this.watermarkDisposable.add(new t.DisposableStore),te=()=>{r.clearNode(Y),ee.clear(),J.map(se=>{const ie=r.append(Y,T("dl")),ce=r.append(ie,T("dt"));ce.textContent=se.text;const le=r.append(ie,T("dd")),ae=new p.KeybindingLabel(le,f.OS,{renderUnboundKeybindings:!0});ee.add((0,b.attachKeybindingLabelStyler)(ae,this.themeService)),ae.set(this.keybindingService.lookupKeybinding(se.id))})};te(),r.prepend(X.firstElementChild,this.watermark),this.watermarkDisposable.add(this.keybindingService.onDidUpdateKeybindings(te)),this.watermarkDisposable.add(this.editorGroupsService.onDidLayout(se=>this.handleEditorPartSize(X,se))),this.handleEditorPartSize(X,this.editorGroupsService.contentDimension),this.telemetryService.publicLog("watermark:open")}handleEditorPartSize(X,Y){X.classList.toggle("max-height-478px",Y.height<=478)}destroy(){if(this.watermark){this.watermark.remove();const X=this.layoutService.getContainer("workbench.parts.editor");X&&X.classList.remove("has-watermark"),this.watermarkDisposable.clear()}}recreate(){this.destroy(),this.create()}};Z=Ee([W(0,C.ILifecycleService),W(1,s.IWorkbenchLayoutService),W(2,_.IKeybindingService),W(3,w.IWorkspaceContextService),W(4,E.IContextKeyService),W(5,o.IConfigurationService),W(6,u.IEditorGroupsService),W(7,m.IThemeService),W(8,A.ITelemetryService)],Z),e.WatermarkContribution=Z,D.Registry.as(v.Extensions.Workbench).registerWorkbenchContribution(Z,3),D.Registry.as(I.Extensions.Configuration).registerConfiguration({...h.workbenchConfigurationNodeBase,properties:{"workbench.tips.enabled":{type:"boolean",default:!0,description:k.localize(12,null)}}})}),define(ne[2791],re([1,0,1823,5,2,13,10,28,46,897,12,2248,32,38,27,139,833,41,9,166,24,8,7,189,34,22,45,111,69,14,11,600,59,53,162,68,237,446,202,42,40,89,23,180,26,18,15,193,82,834,186,2249,91,199,74,377,299,244,33,924,2317,98,679]),function(Q,e,t,f,_,A,k,D,I,w,v,C,o,c,i,S,s,l,r,p,u,a,n,h,g,d,m,b,E,y,T,R,O,x,F,L,M,N,B,P,V,z,U,H,K,G,q,Z,j,X,Y,$,J,ee,te,se,ie,ce,le,ae,ue,oe){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GettingStartedInputSerializer=e.GettingStartedPage=e.embedderIdentifierContext=e.inWelcomeContext=e.allWalkthroughsHiddenContext=void 0;const fe=250,pe="workbench.startupEditor";e.allWalkthroughsHiddenContext=new n.RawContextKey("allWalkthroughsHidden",!1),e.inWelcomeContext=new n.RawContextKey("inWelcome",!1),e.embedderIdentifierContext=new n.RawContextKey("embedderIdentifier",void 0);const me=X.startEntries.map((he,ge)=>({command:he.content.command,description:he.description,icon:{type:"icon",icon:he.icon},id:he.id,order:ge,title:he.title,when:n.ContextKeyExpr.deserialize(he.when)??n.ContextKeyExpr.true()})),be="workbench.welcomePage.preferReducedMotion";let Ce=class Tl extends p.EditorPane{constructor(ge,de,Se,we,ye,ke,Ie,Te,De,_e,Re,Ne,xe,Ae,Le,Me,We,Ve,Ue,et,Ze,Fe,Qe){super(Tl.ID,ke,_e,Re);this.commandService=ge,this.productService=de,this.keybindingService=Se,this.gettingStartedService=we,this.configurationService=ye,this.languageService=Ie,this.fileService=Te,this.openerService=De,this.storageService=Re,this.extensionService=Ne,this.instantiationService=xe,this.notificationService=Ae,this.groupsService=Le,this.quickInputService=We,this.labelService=Ue,this.hostService=et,this.webviewService=Ze,this.workspaceContextService=Fe,this.accessibilityService=Qe,this.inProgressScroll=Promise.resolve(),this.dispatchListeners=new _.DisposableStore,this.stepDisposables=new _.DisposableStore,this.detailsPageDisposables=new _.DisposableStore,this.buildSlideThrottle=new T.Throttler,this.hasScrolledToFirstCategory=!1,this.webviewID=(0,z.generateUuid)(),this.currentMediaComponent=void 0,this.container=(0,k.$)(".gettingStartedContainer",{role:"document",tabindex:0,"aria-label":(0,t.localize)(0,null)}),this.stepMediaComponent=(0,k.$)(".getting-started-media"),this.stepMediaComponent.id=(0,z.generateUuid)(),this.categoriesSlideDisposables=this._register(new _.DisposableStore),this.detailsRenderer=new ue.GettingStartedDetailsRenderer(this.fileService,this.notificationService,this.extensionService,this.languageService),this.contextService=this._register(Me.createScoped(this.container)),e.inWelcomeContext.bindTo(this.contextService).set(!0),e.embedderIdentifierContext.bindTo(this.contextService).set(de.embedderIdentifier),this.gettingStartedCategories=this.gettingStartedService.getWalkthroughs(),this._register(this.dispatchListeners),this.buildSlideThrottle=new T.Throttler;const qe=()=>{if(this.gettingStartedCategories=this.gettingStartedService.getWalkthroughs(),this.currentWalkthrough){const Be=this.currentWalkthrough.steps.map(Xe=>Xe.id),Ke=this.gettingStartedCategories.find(Xe=>this.currentWalkthrough?.id===Xe.id);if(Ke){const Xe=Ke.steps.map(rt=>rt.id);(0,q.equals)(Xe,Be)||this.buildSlideThrottle.queue(()=>this.buildCategoriesSlide())}}else this.buildSlideThrottle.queue(()=>this.buildCategoriesSlide())};this._register(this.gettingStartedService.onDidAddWalkthrough(qe)),this._register(this.gettingStartedService.onDidRemoveWalkthrough(qe)),this._register(this.gettingStartedService.onDidChangeWalkthrough(Be=>{const Ke=this.gettingStartedCategories.find(Xe=>Xe.id===Be.id);!Ke||(Ke.title=Be.title,Ke.description=Be.description,this.container.querySelectorAll(`[x-category-title-for="${Be.id}"]`).forEach(Xe=>Xe.innerText=Ke.title),this.container.querySelectorAll(`[x-category-description-for="${Be.id}"]`).forEach(Xe=>Xe.innerText=Ke.description))})),this._register(this.gettingStartedService.onDidProgressStep(Be=>{const Ke=this.gettingStartedCategories.find(it=>it.id===Be.category);if(!Ke)throw Error("Could not find category with ID: "+Be.category);const Xe=Ke.steps.find(it=>it.id===Be.id);if(!Xe)throw Error("Could not find step with ID: "+Be.id);const rt=this.getWalkthroughCompletionStats(Ke);!Xe.done&&rt.stepsComplete===rt.stepsTotal-1&&this.hideCategory(Ke.id),this._register(this.configurationService.onDidChangeConfiguration(it=>{it.affectsConfiguration(be)&&this.container.classList.toggle("animatable",this.shouldAnimate())})),Xe.done=Be.done,Ke.id===this.currentWalkthrough?.id&&(0,A.assertIsDefined)(document.querySelectorAll(`[data-done-step-id="${Be.id}"]`)).forEach(at=>{Be.done?(at.parentElement?.setAttribute("aria-checked","true"),at.classList.remove(...v.ThemeIcon.asClassNameArray(s.gettingStartedUncheckedCodicon)),at.classList.add("complete",...v.ThemeIcon.asClassNameArray(s.gettingStartedCheckedCodicon))):(at.parentElement?.setAttribute("aria-checked","false"),at.classList.remove("complete",...v.ThemeIcon.asClassNameArray(s.gettingStartedCheckedCodicon)),at.classList.add(...v.ThemeIcon.asClassNameArray(s.gettingStartedUncheckedCodicon)))}),this.updateCategoryProgress()})),this.recentlyOpened=Ve.getRecentlyOpened()}shouldAnimate(){return!(this.configurationService.getValue(be)||this.accessibilityService.isMotionReduced())}getWalkthroughCompletionStats(ge){const de=ge.steps.filter(Se=>this.contextService.contextMatchesRules(Se.when));return{stepsComplete:de.filter(Se=>Se.done).length,stepsTotal:de.length}}async setInput(ge,de,Se,we){this.container.classList.remove("animatable"),this.editorInput=ge,await super.setInput(ge,de,Se,we),await this.buildCategoriesSlide(),this.shouldAnimate()&&setTimeout(()=>this.container.classList.add("animatable"),0)}async makeCategoryVisibleWhenAvailable(ge,de){if(this.gettingStartedCategories.some(we=>we.id===ge)||(await this.gettingStartedService.installedExtensionsRegistered,this.gettingStartedCategories=this.gettingStartedService.getWalkthroughs()),!this.gettingStartedCategories.find(we=>we.id===ge))throw Error("Could not find category with ID: "+ge);this.scrollToCategory(ge,de)}registerDispatchListeners(){this.dispatchListeners.clear(),this.container.querySelectorAll("[x-dispatch]").forEach(ge=>{const[de,Se]=(ge.getAttribute("x-dispatch")??"").split(":");de&&(this.dispatchListeners.add((0,k.addDisposableListener)(ge,"click",we=>{we.stopPropagation(),this.runDispatchCommand(de,Se)})),this.dispatchListeners.add((0,k.addDisposableListener)(ge,"keyup",we=>{const ye=new J.StandardKeyboardEvent(we);switch(we.stopPropagation(),ye.keyCode){case 3:case 10:this.runDispatchCommand(de,Se);return}})))})}async runDispatchCommand(ge,de){switch(this.commandService.executeCommand("workbench.action.keepEditor"),this.telemetryService.publicLog2("gettingStarted.ActionExecuted",{command:ge,argument:de}),ge){case"scrollPrev":{this.scrollPrev();break}case"skip":{this.runSkip();break}case"showMoreRecents":{this.commandService.executeCommand(ie.OpenRecentAction.ID);break}case"seeAllWalkthroughs":{await this.openWalkthroughSelector();break}case"openFolder":{this.contextService.contextMatchesRules(n.ContextKeyExpr.and(te.WorkbenchStateContext.isEqualTo("workspace")))?this.commandService.executeCommand(se.OpenFolderViaWorkspaceAction.ID):this.commandService.executeCommand(y.isMacintosh?"workbench.action.files.openFileFolder":"workbench.action.files.openFolder");break}case"selectCategory":{if(!this.gettingStartedCategories.find(we=>we.id===de))throw Error("Could not find category with ID "+de);this.gettingStartedService.markWalkthroughOpened(de),this.gettingStartedList?.setEntries(this.gettingStartedService.getWalkthroughs()),this.scrollToCategory(de);break}case"selectStartEntry":{const Se=X.startEntries.find(we=>we.id===de);if(Se)this.runStepCommand(Se.content.command);else throw Error("could not find start entry with id: "+de);break}case"hideCategory":{this.hideCategory(de);break}case"selectTask":{this.selectStep(de);break}case"toggleStepCompletion":{this.toggleStepCompletion(de);break}case"allDone":{this.markAllStepsComplete();break}case"nextSection":{const Se=this.currentWalkthrough?.next;Se?this.scrollToCategory(Se):console.error("Error scrolling to next section of",this.currentWalkthrough);break}default:{console.error("Dispatch to",ge,de,"not defined");break}}}hideCategory(ge){if(!this.gettingStartedCategories.find(Se=>Se.id===ge))throw Error("Could not find category with ID "+ge);this.setHiddenCategories([...this.getHiddenCategories().add(ge)]),this.gettingStartedList?.rerender()}markAllStepsComplete(){if(this.currentWalkthrough)this.currentWalkthrough?.steps.forEach(ge=>{ge.done||this.gettingStartedService.progressStep(ge.id)}),this.hideCategory(this.currentWalkthrough?.id),this.scrollPrev();else throw Error("No walkthrough opened")}toggleStepCompletion(ge){(0,A.assertIsDefined)(this.currentWalkthrough?.steps.find(Se=>Se.id===ge)).done?this.gettingStartedService.deprogressStep(ge):this.gettingStartedService.progressStep(ge)}async openWalkthroughSelector(){const ge=await this.quickInputService.pick(this.gettingStartedCategories.filter(de=>this.contextService.contextMatchesRules(de.when)).map(de=>({id:de.id,label:de.title,detail:de.description,description:de.source})),{canPickMany:!1,matchOnDescription:!0,matchOnDetail:!0,title:(0,t.localize)(1,null)});ge&&this.runDispatchCommand("selectCategory",ge.id)}getHiddenCategories(){return new Set(JSON.parse(this.storageService.get(w.hiddenEntriesConfigurationKey,0,"[]")))}setHiddenCategories(ge){this.storageService.store(w.hiddenEntriesConfigurationKey,JSON.stringify(ge),0,0)}async buildMediaComponent(ge){if(!this.currentWalkthrough)throw Error("no walkthrough selected");const de=(0,A.assertIsDefined)(this.currentWalkthrough.steps.find(Se=>Se.id===ge));if(this.currentMediaComponent!==ge){if(this.currentMediaComponent=ge,this.stepDisposables.clear(),this.stepDisposables.add({dispose:()=>{(0,k.clearNode)(this.stepMediaComponent),this.currentMediaComponent=void 0}}),de.media.type==="image"){this.stepsContent.classList.add("image"),this.stepsContent.classList.remove("markdown");const Se=de.media,we=(0,k.$)("img");this.stepMediaComponent.appendChild(we),we.setAttribute("alt",Se.altText),this.updateMediaSourceForColorMode(we,Se.path),this.stepDisposables.add((0,k.addDisposableListener)(this.stepMediaComponent,"click",()=>{const ye=(0,q.flatten)(de.description.map(ke=>ke.nodes.filter(Ie=>typeof Ie!="string").map(Ie=>Ie.href)));if(ye.length===1){const ke=ye[0];ke.startsWith("http")&&(this.telemetryService.publicLog2("gettingStarted.ActionExecuted",{command:"runStepAction",argument:ke}),this.openerService.open(ke))}})),this.stepDisposables.add(this.themeService.onDidColorThemeChange(()=>this.updateMediaSourceForColorMode(we,Se.path)))}else if(de.media.type==="svg"){this.stepsContent.classList.add("image"),this.stepsContent.classList.remove("markdown");const Se=de.media,we=this.stepDisposables.add(this.webviewService.createWebviewElement(this.webviewID,{},{},void 0));we.mountTo(this.stepMediaComponent),we.html=await this.detailsRenderer.renderSVG(Se.path);let ye=!1;this.stepDisposables.add((0,_.toDisposable)(()=>{ye=!0})),this.stepDisposables.add(this.themeService.onDidColorThemeChange(async()=>{const ke=await this.detailsRenderer.renderSVG(Se.path);ye||(we.html=ke)})),this.stepDisposables.add((0,k.addDisposableListener)(this.stepMediaComponent,"click",()=>{const ke=(0,q.flatten)(de.description.map(Ie=>Ie.nodes.filter(Te=>typeof Te!="string").map(Te=>Te.href)));if(ke.length===1){const Ie=ke[0];Ie.startsWith("http")&&(this.telemetryService.publicLog2("gettingStarted.ActionExecuted",{command:"runStepAction",argument:Ie}),this.openerService.open(Ie))}})),this.stepDisposables.add(we.onDidClickLink(ke=>{((0,l.matchesScheme)(ke,G.Schemas.https)||(0,l.matchesScheme)(ke,G.Schemas.http)||(0,l.matchesScheme)(ke,G.Schemas.command))&&this.openerService.open(ke,{allowCommands:!0})}))}else if(de.media.type==="markdown"){this.stepsContent.classList.remove("image"),this.stepsContent.classList.add("markdown");const Se=de.media,we=this.stepDisposables.add(this.webviewService.createWebviewElement(this.webviewID,{},{localResourceRoots:[Se.root],allowScripts:!0},void 0));we.mountTo(this.stepMediaComponent);const ye=await this.detailsRenderer.renderMarkdown(Se.path,Se.base);we.html=ye;const ke=ye.match(/checked-on=\"([^'][^"]*)\"/g)?.map(_e=>_e.slice('checked-on="'.length,-1).replace(/'/g,"'").replace(/&/g,"&")),Ie=()=>{const _e=ke?.filter(Re=>this.contextService.contextMatchesRules(n.ContextKeyExpr.deserialize(Re)));_e&&we.postMessage({enabledContextKeys:_e})};if(ke){const _e=(0,q.coalesce)(ke.map(Ne=>n.ContextKeyExpr.deserialize(Ne))),Re=new Set((0,q.flatten)(_e.map(Ne=>Ne.keys())));this.stepDisposables.add(this.contextService.onDidChangeContext(Ne=>{Ne.affectsSome(Re)&&Ie()}))}let Te=!1;this.stepDisposables.add((0,_.toDisposable)(()=>{Te=!0})),this.stepDisposables.add(we.onDidClickLink(_e=>{((0,l.matchesScheme)(_e,G.Schemas.https)||(0,l.matchesScheme)(_e,G.Schemas.http)||(0,l.matchesScheme)(_e,G.Schemas.command))&&this.openerService.open(_e,{allowCommands:!0})})),this.stepDisposables.add(this.themeService.onDidColorThemeChange(async()=>{const _e=await this.detailsRenderer.renderMarkdown(Se.path,Se.base);Te||(we.html=_e,Ie())}));const De=new T.Delayer(50);this.layoutMarkdown=()=>{De.trigger(()=>{we.postMessage({layoutMeNow:!0})})},this.stepDisposables.add(De),this.stepDisposables.add({dispose:()=>this.layoutMarkdown=void 0}),Ie(),this.stepDisposables.add(we.onMessage(_e=>{const Re=_e.message;Re.startsWith("command:")?this.openerService.open(Re,{allowCommands:!0}):Re.startsWith("setTheme:")?this.configurationService.updateValue(Z.ThemeSettings.COLOR_THEME,Re.slice("setTheme:".length),1):console.error("Unexpected message",Re)}))}}}async selectStepLoose(ge){const de=this.editorInput.selectedCategory+"#"+ge;this.selectStep(de)}async selectStep(ge,de=!0,Se=!1){if(!(ge&&this.editorInput.selectedStep===ge&&!Se)){if(ge){let we=this.container.querySelector(`[data-step-id="${ge}"]`);if(!we){if(we=this.container.querySelector("[data-step-id]"),!we)return;ge=(0,A.assertIsDefined)(we.getAttribute("data-step-id"))}we.parentElement?.querySelectorAll(".expanded").forEach(ye=>{ye.getAttribute("data-step-id")!==ge&&(ye.classList.remove("expanded"),ye.setAttribute("aria-expanded","false"))}),setTimeout(()=>we.focus(),de&&this.shouldAnimate()?fe:0),this.editorInput.selectedStep=ge,we.classList.add("expanded"),we.setAttribute("aria-expanded","true"),this.buildMediaComponent(ge),this.gettingStartedService.progressByEvent("stepSelected:"+ge)}else this.editorInput.selectedStep=void 0;this.detailsPageScrollbar?.scanDomNode(),this.detailsScrollbar?.scanDomNode()}}updateMediaSourceForColorMode(ge,de){const Se=this.themeService.getColorTheme().type,we=de[Se].toString(!0).replace(/ /g,"%20");ge.srcset=we.toLowerCase().endsWith(".svg")?we:we+" 1.5x"}createEditor(ge){this.detailsPageScrollbar&&this.detailsPageScrollbar.dispose(),this.categoriesPageScrollbar&&this.categoriesPageScrollbar.dispose(),this.categoriesSlide=(0,k.$)(".gettingStartedSlideCategories.gettingStartedSlide");const de=(0,k.$)("button.prev-button.button-link",{"x-dispatch":"scrollPrev"},(0,k.$)("span.scroll-button.codicon.codicon-chevron-left"),(0,k.$)("span.moreText",{},(0,t.localize)(2,null)));this.stepsSlide=(0,k.$)(".gettingStartedSlideDetails.gettingStartedSlide",{},de),this.stepsContent=(0,k.$)(".gettingStartedDetailsContent",{}),this.detailsPageScrollbar=this._register(new S.DomScrollableElement(this.stepsContent,{className:"full-height-scrollable"})),this.categoriesPageScrollbar=this._register(new S.DomScrollableElement(this.categoriesSlide,{className:"full-height-scrollable categoriesScrollbar"})),this.stepsSlide.appendChild(this.detailsPageScrollbar.getDomNode());const Se=(0,k.$)(".gettingStarted",{},this.categoriesPageScrollbar.getDomNode(),this.stepsSlide);this.container.appendChild(Se),this.categoriesPageScrollbar.scanDomNode(),this.detailsPageScrollbar.scanDomNode(),ge.appendChild(this.container)}async buildCategoriesSlide(){this.categoriesSlideDisposables.clear();const ge=new ce.Toggle({icon:le.Codicon.check,actionClassName:"getting-started-checkbox",isChecked:this.configurationService.getValue(pe)==="welcomePage",title:(0,t.localize)(3,null)});ge.domNode.id="showOnStartup";const de=(0,k.$)("label.caption",{for:"showOnStartup"},(0,t.localize)(4,null)),Se=()=>{ge.checked?(this.telemetryService.publicLog2("gettingStarted.ActionExecuted",{command:"showOnStartupChecked",argument:void 0}),this.configurationService.updateValue(pe,"welcomePage")):(this.telemetryService.publicLog2("gettingStarted.ActionExecuted",{command:"showOnStartupUnchecked",argument:void 0}),this.configurationService.updateValue(pe,"none"))};this.categoriesSlideDisposables.add(ge),this.categoriesSlideDisposables.add(ge.onChange(()=>{Se()})),this.categoriesSlideDisposables.add((0,k.addDisposableListener)(de,"click",()=>{ge.checked=!ge.checked,Se()}));const we=(0,k.$)(".header",{},(0,k.$)("h1.product-name.caption",{},this.productService.nameLong),(0,k.$)("p.subtitle.description",{},(0,t.localize)(5,null))),ye=(0,k.$)(".categories-column.categories-column-left",{}),ke=(0,k.$)(".categories-column.categories-column-right",{}),Ie=this.buildStartList(),Te=this.buildRecentlyOpenedList(),De=this.buildGettingStartedWalkthroughsList(),_e=(0,k.$)(".footer",{},(0,k.$)("p.showOnStartup",{},ge.domNode,de)),Re=()=>{De.itemCount?(this.container.classList.remove("noWalkthroughs"),(0,k.reset)(ye,Ie.getDomElement(),Te.getDomElement()),(0,k.reset)(ke,De.getDomElement()),Te.setLimit(5)):(this.container.classList.add("noWalkthroughs"),(0,k.reset)(ye,Ie.getDomElement()),(0,k.reset)(ke,Te.getDomElement()),Te.setLimit(10)),setTimeout(()=>this.categoriesPageScrollbar?.scanDomNode(),50)};if(De.onDidChange(Re),Re(),(0,k.reset)(this.categoriesSlide,(0,k.$)(".gettingStartedCategoriesContainer",{},we,ye,ke,_e)),this.categoriesPageScrollbar?.scanDomNode(),this.updateCategoryProgress(),this.registerDispatchListeners(),this.editorInput.selectedCategory)if(this.currentWalkthrough=this.gettingStartedCategories.find(xe=>xe.id===this.editorInput.selectedCategory),this.currentWalkthrough||(this.container.classList.add("loading"),await this.gettingStartedService.installedExtensionsRegistered,this.container.classList.remove("loading"),this.gettingStartedCategories=this.gettingStartedService.getWalkthroughs()),this.currentWalkthrough=this.gettingStartedCategories.find(xe=>xe.id===this.editorInput.selectedCategory),!this.currentWalkthrough)console.error("Could not restore to category "+this.editorInput.selectedCategory+" as it was not found"),this.editorInput.selectedCategory=void 0,this.editorInput.selectedStep=void 0;else{this.buildCategorySlide(this.editorInput.selectedCategory,this.editorInput.selectedStep),this.setSlide("details");return}const Ne=this.gettingStartedCategories.some(xe=>xe.steps.find(Ae=>Ae.done));if(this.editorInput.showTelemetryNotice&&this.productService.openToWelcomeMainPage){const xe=(0,k.$)("p.telemetry-notice");this.buildTelemetryFooter(xe),_e.appendChild(xe)}else if(!this.productService.openToWelcomeMainPage&&!Ne&&!this.hasScrolledToFirstCategory){const xe=this.storageService.get(i.firstSessionDateStorageKey,0)||new Date().toUTCString();if(((+new Date-+new Date(xe))/1e3/60/60/24<1?"openToFirstCategory":"index")==="openToFirstCategory"){const Me=this.gettingStartedCategories.filter(We=>!We.when||this.contextService.contextMatchesRules(We.when))[0];if(this.hasScrolledToFirstCategory=!0,Me){this.currentWalkthrough=Me,this.editorInput.selectedCategory=this.currentWalkthrough?.id,this.buildCategorySlide(this.editorInput.selectedCategory,void 0),this.setSlide("details");return}}}this.setSlide("categories")}buildRecentlyOpenedList(){const ge=Se=>{let we,ye;(0,h.isRecentFolder)(Se)?(ye={folderUri:Se.folderUri},we=Se.label||this.labelService.getWorkspaceLabel(Se.folderUri,{verbose:!0})):(we=Se.label||this.labelService.getWorkspaceLabel(Se.workspace,{verbose:!0}),ye={workspaceUri:Se.workspace.configPath});const{name:ke,parentPath:Ie}=(0,b.splitName)(we),Te=(0,k.$)("li"),De=(0,k.$)("button.button-link");De.innerText=ke,De.title=we,De.setAttribute("aria-label",(0,t.localize)(6,null,ke,Ie)),De.addEventListener("click",Re=>{this.telemetryService.publicLog2("gettingStarted.ActionExecuted",{command:"openRecent",argument:void 0}),this.hostService.openWindow([ye],{forceNewWindow:Re.ctrlKey||Re.metaKey,remoteAuthority:Se.remoteAuthority||null}),Re.preventDefault(),Re.stopPropagation()}),Te.appendChild(De);const _e=(0,k.$)("span");return _e.classList.add("path"),_e.classList.add("detail"),_e.innerText=Ie,_e.title=we,Te.appendChild(_e),Te};this.recentlyOpenedList&&this.recentlyOpenedList.dispose();const de=this.recentlyOpenedList=new $.GettingStartedIndexList({title:(0,t.localize)(7,null),klass:"recently-opened",limit:5,empty:(0,k.$)(".empty-recent",{},(0,t.localize)(8,null),(0,k.$)("button.button-link",{"x-dispatch":"openFolder"},(0,t.localize)(9,null)),(0,t.localize)(10,null)),more:(0,k.$)(".more",{},(0,k.$)("button.button-link",{"x-dispatch":"showMoreRecents",title:(0,t.localize)(11,null,this.getKeybindingLabel(ie.OpenRecentAction.ID))},"More...")),renderElement:ge,contextService:this.contextService});return de.onDidChange(()=>this.registerDispatchListeners()),this.recentlyOpened.then(({workspaces:Se})=>{const we=Se.filter(ke=>!this.workspaceContextService.isCurrentWorkspace((0,h.isRecentWorkspace)(ke)?ke.workspace:ke.folderUri)).map(ke=>({...ke,id:(0,h.isRecentWorkspace)(ke)?ke.workspace.id:ke.folderUri.toString()})),ye=()=>{de.setEntries(we)};ye(),de.register(this.labelService.onDidChangeFormatters(()=>ye()))}).catch(d.onUnexpectedError),de}buildStartList(){const ge=Se=>(0,k.$)("li",{},(0,k.$)("button.button-link",{"x-dispatch":"selectStartEntry:"+Se.id,title:Se.description+" "+this.getKeybindingLabel(Se.command)},this.iconWidgetFor(Se),(0,k.$)("span",{},Se.title)));this.startList&&this.startList.dispose();const de=this.startList=new $.GettingStartedIndexList({title:(0,t.localize)(12,null),klass:"start-container",limit:10,renderElement:ge,rankElement:Se=>-Se.order,contextService:this.contextService});return de.setEntries(me),de.onDidChange(()=>this.registerDispatchListeners()),de}buildGettingStartedWalkthroughsList(){const ge=we=>{const ye=(we.newItems||we.newEntry)&&!we.isFeatured,ke=(0,k.$)(".new-badge",{});we.newEntry?(0,k.reset)(ke,(0,k.$)(".new-category",{},(0,t.localize)(13,null))):we.newItems&&(0,k.reset)(ke,(0,k.$)(".new-items",{},(0,t.localize)(14,null)));const Ie=(0,k.$)(".featured-badge",{}),Te=(0,k.$)(".description-content",{});return we.isFeatured&&((0,k.reset)(Ie,(0,k.$)(".featured",{},(0,k.$)("span.featured-icon.codicon.codicon-star-empty"))),(0,k.reset)(Te,we.description)),(0,k.$)("button.getting-started-category"+(we.isFeatured?".featured":""),{"x-dispatch":"selectCategory:"+we.id,title:we.description},Ie,(0,k.$)(".main-content",{},this.iconWidgetFor(we),(0,k.$)("h3.category-title.max-lines-3",{"x-category-title-for":we.id},we.title),ye?ke:(0,k.$)(".no-badge"),(0,k.$)("a.codicon.codicon-close.hide-category-button",{tabindex:0,"x-dispatch":"hideCategory:"+we.id,title:(0,t.localize)(15,null)})),Te,(0,k.$)(".category-progress",{"x-data-category-id":we.id},(0,k.$)(".progress-bar-outer",{role:"progressbar"},(0,k.$)(".progress-bar-inner"))))};this.gettingStartedList&&this.gettingStartedList.dispose();const de=we=>{let ye=we.order;return we.isFeatured&&(ye+=7),we.newEntry&&(ye+=3),we.newItems&&(ye+=2),we.recencyBonus&&(ye+=4*we.recencyBonus),this.getHiddenCategories().has(we.id)&&(ye=null),ye},Se=this.gettingStartedList=new $.GettingStartedIndexList({title:(0,t.localize)(16,null),klass:"getting-started",limit:5,footer:(0,k.$)("span.button-link.see-all-walkthroughs",{"x-dispatch":"seeAllWalkthroughs",tabindex:0},(0,t.localize)(17,null)),renderElement:ge,rankElement:de,contextService:this.contextService});return Se.onDidChange(()=>{const ye=this.getHiddenCategories().size||Se.itemCount<this.gettingStartedCategories.filter(ke=>this.contextService.contextMatchesRules(ke.when)).length;this.container.classList.toggle("someWalkthroughsHidden",!!ye),this.registerDispatchListeners(),e.allWalkthroughsHiddenContext.bindTo(this.contextService).set(Se.itemCount===0),this.updateCategoryProgress()}),Se.setEntries(this.gettingStartedCategories),e.allWalkthroughsHiddenContext.bindTo(this.contextService).set(Se.itemCount===0),Se}layout(ge){this.detailsScrollbar?.scanDomNode(),this.categoriesPageScrollbar?.scanDomNode(),this.detailsPageScrollbar?.scanDomNode(),this.startList?.layout(ge),this.gettingStartedList?.layout(ge),this.recentlyOpenedList?.layout(ge),this.layoutMarkdown?.(),this.container.classList[ge.height<=600?"add":"remove"]("height-constrained"),this.container.classList[ge.width<=400?"add":"remove"]("width-constrained"),this.container.classList[ge.width<=800?"add":"remove"]("width-semi-constrained")}updateCategoryProgress(){document.querySelectorAll(".category-progress").forEach(ge=>{const de=ge.getAttribute("x-data-category-id"),Se=this.gettingStartedCategories.find(Ie=>Ie.id===de);if(!Se)throw Error("Could not find category with ID "+de);const we=this.getWalkthroughCompletionStats(Se),ye=(0,A.assertIsDefined)(ge.querySelector(".progress-bar-inner"));ye.setAttribute("aria-valuemin","0"),ye.setAttribute("aria-valuenow",""+we.stepsComplete),ye.setAttribute("aria-valuemax",""+we.stepsTotal);const ke=we.stepsComplete/we.stepsTotal*100;ye.style.width=`${ke}%`,ge.parentElement.classList.toggle("no-progress",we.stepsComplete===0),we.stepsTotal===we.stepsComplete?ye.title=(0,t.localize)(18,null,we.stepsComplete):ye.title=(0,t.localize)(19,null,we.stepsComplete,we.stepsTotal)})}async scrollToCategory(ge,de){this.inProgressScroll=this.inProgressScroll.then(async()=>{(0,k.reset)(this.stepsContent),this.editorInput.selectedCategory=ge,this.editorInput.selectedStep=de,this.currentWalkthrough=this.gettingStartedCategories.find(Se=>Se.id===ge),this.buildCategorySlide(ge),this.setSlide("details")})}iconWidgetFor(ge){const de=ge.icon.type==="icon"?(0,k.$)(v.ThemeIcon.asCSSSelector(ge.icon.icon)):(0,k.$)("img.category-icon",{src:ge.icon.path});return de.classList.add("icon-widget"),de}runStepCommand(ge){const de=ge.startsWith("command:"),Se=ge.startsWith("command:toSide:"),we=ge.replace(/command:(toSide:)?/,"command:");this.telemetryService.publicLog2("gettingStarted.ActionExecuted",{command:"runStepAction",argument:ge});const ye=this.groupsService.contentDimension;if(Se&&ye.width>700){if(this.groupsService.count===1){this.groupsService.addGroup(this.groupsService.groups[0],2,{activate:!0});let Ie;ye.width>1600?Ie=800:ye.width>800?Ie=400:Ie=350;const Te=this.groupsService.getGroups(1).find(De=>De.activeEditor instanceof R.GettingStartedInput);this.groupsService.setSize((0,A.assertIsDefined)(Te),{width:Ie,height:ye.height})}const ke=this.groupsService.getGroups(1).find(Ie=>!(Ie.activeEditor instanceof R.GettingStartedInput));ke&&(this.groupsService.activateGroup(ke),ke.focus())}if(de){const ke=r.URI.parse(we);let Ie=[];try{Ie=(0,H.parse)(decodeURIComponent(ke.query))}catch{try{Ie=(0,H.parse)(ke.query)}catch{}}Array.isArray(Ie)||(Ie=[Ie]),this.commandService.executeCommand(ke.path,...Ie).then(Te=>{const De=Te?.openFolder;if(De){if(!r.URI.isUri(De)){console.warn("Warn: Running walkthrough command",ge,"yielded non-URI `openFolder` result",De,". It will be disregarded.");return}const _e={folder:De.toString(),category:this.editorInput.selectedCategory,step:this.editorInput.selectedStep};this.storageService.store(ae.restoreWalkthroughsConfigurationKey,JSON.stringify(_e),0,1),this.hostService.openWindow([{folderUri:De}])}})}else this.openerService.open(we,{allowCommands:!0});!de&&(ge.startsWith("https://")||ge.startsWith("http://"))&&this.gettingStartedService.progressByEvent("onLink:"+ge)}buildStepMarkdownDescription(ge,de){for(;ge.firstChild;)ge.removeChild(ge.firstChild);for(const Se of de)if(Se.nodes.length===1&&typeof Se.nodes[0]!="string"){const we=Se.nodes[0],ye=(0,k.append)(ge,(0,k.$)(".button-container")),ke=new F.Button(ye,{title:we.title,supportIcons:!0}),Ie=we.href.startsWith("command:"),Te=we.href.replace(/command:(toSide:)?/,"command:");if(ke.label=we.label,ke.onDidClick(De=>{De.stopPropagation(),De.preventDefault(),this.runStepCommand(we.href)},null,this.detailsPageDisposables),Ie){const De=this.getKeybindingLabel(Te);De&&ge.appendChild((0,k.$)("span.shortcut-message",{},"Tip: Use keyboard shortcut ",(0,k.$)("span.keybinding",{},De)))}this.detailsPageDisposables.add(ke),this.detailsPageDisposables.add((0,L.attachButtonStyler)(ke,this.themeService))}else{const we=(0,k.append)(ge,(0,k.$)("p"